From 79016936a615d66803ce59f92e28915c7985b723 Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Wed, 30 Sep 2015 11:55:11 +0200 Subject: [PATCH] Regenerating all services --- gogol-adexchange-buyer/LICENSE | 373 + gogol-adexchange-buyer/Makefile | 1 + gogol-adexchange-buyer/README.md | 28 + gogol-adexchange-buyer/Setup.hs | 2 + .../gen/Network/Google/AdExchangeBuyer.hs | 957 + .../Network/Google/AdExchangeBuyer/Types.hs | 746 + .../Google/AdExchangeBuyer/Types/Product.hs | 6898 ++++++ .../Google/AdExchangeBuyer/Types/Sum.hs | 18 + .../Resource/AdExchangeBuyer/Accounts/Get.hs | 150 + .../Resource/AdExchangeBuyer/Accounts/List.hs | 139 + .../AdExchangeBuyer/Accounts/Patch.hs | 151 + .../AdExchangeBuyer/Accounts/Update.hs | 152 + .../AdExchangeBuyer/BillingInfo/Get.hs | 157 + .../AdExchangeBuyer/BillingInfo/List.hs | 145 + .../Resource/AdExchangeBuyer/Budget/Get.hs | 167 + .../Resource/AdExchangeBuyer/Budget/Patch.hs | 169 + .../Resource/AdExchangeBuyer/Budget/Update.hs | 168 + .../AdExchangeBuyer/Clientaccess/Delete.hs | 168 + .../AdExchangeBuyer/Clientaccess/Get.hs | 170 + .../AdExchangeBuyer/Clientaccess/Insert.hs | 166 + .../AdExchangeBuyer/Clientaccess/List.hs | 145 + .../AdExchangeBuyer/Clientaccess/Patch.hs | 168 + .../AdExchangeBuyer/Clientaccess/Update.hs | 169 + .../Resource/AdExchangeBuyer/Creatives/Get.hs | 170 + .../AdExchangeBuyer/Creatives/Insert.hs | 140 + .../AdExchangeBuyer/Creatives/List.hs | 224 + .../Resource/AdExchangeBuyer/Deals/Get.hs | 149 + .../Marketplacedeals/Delete.hs | 160 + .../Marketplacedeals/Insert.hs | 160 + .../AdExchangeBuyer/Marketplacedeals/List.hs | 158 + .../Marketplacedeals/Update.hs | 160 + .../Marketplacenotes/Insert.hs | 157 + .../AdExchangeBuyer/Marketplacenotes/List.hs | 155 + .../AdExchangeBuyer/Marketplaceoffers/Get.hs | 155 + .../Marketplaceoffers/Search.hs | 155 + .../AdExchangeBuyer/Marketplaceorders/Get.hs | 158 + .../Marketplaceorders/Insert.hs | 142 + .../Marketplaceorders/Patch.hs | 187 + .../Marketplaceorders/Search.hs | 158 + .../Marketplaceorders/Update.hs | 187 + .../Negotiationrounds/Insert.hs | 157 + .../AdExchangeBuyer/Negotiations/Get.hs | 154 + .../AdExchangeBuyer/Negotiations/Insert.hs | 140 + .../AdExchangeBuyer/Negotiations/List.hs | 141 + .../Resource/AdExchangeBuyer/Offers/Get.hs | 150 + .../Resource/AdExchangeBuyer/Offers/Insert.hs | 139 + .../Resource/AdExchangeBuyer/Offers/List.hs | 138 + .../AdExchangeBuyer/PerformanceReport/List.hs | 216 + .../PretargetingConfig/Delete.hs | 172 + .../AdExchangeBuyer/PretargetingConfig/Get.hs | 172 + .../PretargetingConfig/Insert.hs | 161 + .../PretargetingConfig/List.hs | 162 + .../PretargetingConfig/Patch.hs | 174 + .../PretargetingConfig/Update.hs | 174 + .../gogol-adexchange-buyer.cabal | 90 + gogol-adexchange-buyer/src/.gitkeep | 0 gogol-adexchange-seller/LICENSE | 373 + gogol-adexchange-seller/Makefile | 1 + gogol-adexchange-seller/README.md | 28 + gogol-adexchange-seller/Setup.hs | 2 + .../gen/Network/Google/AdExchangeSeller.hs | 239 + .../Network/Google/AdExchangeSeller/Types.hs | 170 + .../Google/AdExchangeSeller/Types/Product.hs | 1272 ++ .../Google/AdExchangeSeller/Types/Sum.hs | 18 + .../Accounts/Adclients/List.hs | 188 + .../AdExchangeSeller/Accounts/Alerts/List.hs | 167 + .../Accounts/Customchannels/Get.hs | 191 + .../Accounts/Customchannels/List.hs | 206 + .../Resource/AdExchangeSeller/Accounts/Get.hs | 152 + .../AdExchangeSeller/Accounts/List.hs | 166 + .../Accounts/Metadata/Dimensions/List.hs | 165 + .../Accounts/Metadata/Metrics/List.hs | 162 + .../Accounts/Preferreddeals/Get.hs | 173 + .../Accounts/Preferreddeals/List.hs | 160 + .../Accounts/Reports/Generate.hs | 278 + .../Accounts/Reports/Saved/Generate.hs | 217 + .../Accounts/Reports/Saved/List.hs | 193 + .../Accounts/URLchannels/List.hs | 205 + .../gogol-adexchange-seller.cabal | 57 + gogol-adexchange-seller/src/.gitkeep | 0 gogol-admin-datatransfer/LICENSE | 373 + gogol-admin-datatransfer/Makefile | 1 + gogol-admin-datatransfer/README.md | 28 + gogol-admin-datatransfer/Setup.hs | 2 + .../gen/Network/Google/AdminDataTransfer.hs | 114 + .../Network/Google/AdminDataTransfer/Types.hs | 80 + .../Google/AdminDataTransfer/Types/Product.hs | 485 + .../Google/AdminDataTransfer/Types/Sum.hs | 18 + .../Resource/Datatransfer/Applications/Get.hs | 157 + .../Datatransfer/Applications/List.hs | 180 + .../Resource/Datatransfer/Transfers/Get.hs | 156 + .../Resource/Datatransfer/Transfers/Insert.hs | 141 + .../Resource/Datatransfer/Transfers/List.hs | 217 + .../gogol-admin-datatransfer.cabal | 48 + gogol-admin-datatransfer/src/.gitkeep | 0 gogol-admin-directory/LICENSE | 373 + gogol-admin-directory/Makefile | 1 + gogol-admin-directory/README.md | 28 + gogol-admin-directory/Setup.hs | 2 + .../gen/Network/Google/AdminDirectory.hs | 765 + .../Network/Google/AdminDirectory/Types.hs | 474 + .../Google/AdminDirectory/Types/Product.hs | 4178 ++++ .../Google/AdminDirectory/Types/Sum.hs | 18 + .../Google/Resource/Admin/Channels/Stop.hs | 141 + .../Google/Resource/Directory/Asps/Delete.hs | 164 + .../Google/Resource/Directory/Asps/Get.hs | 164 + .../Google/Resource/Directory/Asps/List.hs | 152 + .../Resource/Directory/Chromeosdevices/Get.hs | 183 + .../Directory/Chromeosdevices/List.hs | 230 + .../Directory/Chromeosdevices/Patch.hs | 183 + .../Directory/Chromeosdevices/Update.hs | 183 + .../Directory/Groups/Aliases/Delete.hs | 171 + .../Directory/Groups/Aliases/Insert.hs | 159 + .../Resource/Directory/Groups/Aliases/List.hs | 159 + .../Resource/Directory/Groups/Delete.hs | 153 + .../Google/Resource/Directory/Groups/Get.hs | 152 + .../Resource/Directory/Groups/Insert.hs | 138 + .../Google/Resource/Directory/Groups/List.hs | 201 + .../Google/Resource/Directory/Groups/Patch.hs | 153 + .../Resource/Directory/Groups/Update.hs | 154 + .../Resource/Directory/Members/Delete.hs | 167 + .../Google/Resource/Directory/Members/Get.hs | 166 + .../Resource/Directory/Members/Insert.hs | 154 + .../Google/Resource/Directory/Members/List.hs | 187 + .../Resource/Directory/Members/Patch.hs | 171 + .../Resource/Directory/Members/Update.hs | 169 + .../Directory/Mobiledevices/Action.hs | 171 + .../Directory/Mobiledevices/Delete.hs | 175 + .../Resource/Directory/Mobiledevices/Get.hs | 189 + .../Resource/Directory/Mobiledevices/List.hs | 228 + .../Directory/Notifications/Delete.hs | 171 + .../Resource/Directory/Notifications/Get.hs | 172 + .../Resource/Directory/Notifications/List.hs | 194 + .../Resource/Directory/Notifications/Patch.hs | 171 + .../Directory/Notifications/Update.hs | 171 + .../Resource/Directory/Orgunits/Delete.hs | 168 + .../Google/Resource/Directory/Orgunits/Get.hs | 166 + .../Resource/Directory/Orgunits/Insert.hs | 155 + .../Resource/Directory/Orgunits/List.hs | 178 + .../Resource/Directory/Orgunits/Patch.hs | 168 + .../Resource/Directory/Orgunits/Update.hs | 165 + .../Resource/Directory/Schemas/Delete.hs | 167 + .../Google/Resource/Directory/Schemas/Get.hs | 166 + .../Resource/Directory/Schemas/Insert.hs | 154 + .../Google/Resource/Directory/Schemas/List.hs | 153 + .../Resource/Directory/Schemas/Patch.hs | 167 + .../Resource/Directory/Schemas/Update.hs | 167 + .../Resource/Directory/Tokens/Delete.hs | 168 + .../Google/Resource/Directory/Tokens/Get.hs | 167 + .../Google/Resource/Directory/Tokens/List.hs | 155 + .../Directory/Users/Aliases/Delete.hs | 171 + .../Directory/Users/Aliases/Insert.hs | 158 + .../Resource/Directory/Users/Aliases/List.hs | 170 + .../Resource/Directory/Users/Aliases/Watch.hs | 171 + .../Google/Resource/Directory/Users/Delete.hs | 151 + .../Google/Resource/Directory/Users/Get.hs | 190 + .../Google/Resource/Directory/Users/Insert.hs | 137 + .../Google/Resource/Directory/Users/List.hs | 286 + .../Resource/Directory/Users/MakeAdmin.hs | 157 + .../Google/Resource/Directory/Users/Patch.hs | 152 + .../Resource/Directory/Users/Photos/Delete.hs | 158 + .../Resource/Directory/Users/Photos/Get.hs | 157 + .../Resource/Directory/Users/Photos/Patch.hs | 158 + .../Resource/Directory/Users/Photos/Update.hs | 158 + .../Resource/Directory/Users/Undelete.hs | 153 + .../Google/Resource/Directory/Users/Update.hs | 149 + .../Google/Resource/Directory/Users/Watch.hs | 288 + .../Directory/VerificationCodes/Generate.hs | 159 + .../Directory/VerificationCodes/Invalidate.hs | 160 + .../Directory/VerificationCodes/List.hs | 161 + .../gogol-admin-directory.cabal | 111 + gogol-admin-directory/src/.gitkeep | 0 gogol-admin-emailmigration/LICENSE | 373 + gogol-admin-emailmigration/Makefile | 1 + gogol-admin-emailmigration/README.md | 28 + gogol-admin-emailmigration/Setup.hs | 2 + .../gen/Network/Google/AdminEmailMigration.hs | 59 + .../Google/AdminEmailMigration/Types.hs | 43 + .../AdminEmailMigration/Types/Product.hs | 143 + .../Google/AdminEmailMigration/Types/Sum.hs | 18 + .../Resource/EmailMigration/Mail/Insert.hs | 151 + .../gogol-admin-emailmigration.cabal | 43 + gogol-admin-emailmigration/src/.gitkeep | 0 gogol-admin-reports/LICENSE | 373 + gogol-admin-reports/Makefile | 1 + gogol-admin-reports/README.md | 28 + gogol-admin-reports/Setup.hs | 2 + .../gen/Network/Google/AdminReports.hs | 116 + .../gen/Network/Google/AdminReports/Types.hs | 81 + .../Google/AdminReports/Types/Product.hs | 480 + .../Network/Google/AdminReports/Types/Sum.hs | 18 + .../Google/Resource/Admin/Channels/Stop.hs | 141 + .../Resource/Reports/Activities/List.hs | 272 + .../Resource/Reports/Activities/Watch.hs | 273 + .../Reports/CustomerUsageReports/Get.hs | 203 + .../Resource/Reports/UserUsageReport/Get.hs | 243 + gogol-admin-reports/gogol-admin-reports.cabal | 48 + gogol-admin-reports/src/.gitkeep | 0 gogol-adsense-host/LICENSE | 373 + gogol-adsense-host/Makefile | 1 + gogol-adsense-host/README.md | 28 + gogol-adsense-host/Setup.hs | 2 + .../gen/Network/Google/AdSenseHost.hs | 272 + .../gen/Network/Google/AdSenseHost/Types.hs | 151 + .../Google/AdSenseHost/Types/Product.hs | 1099 + .../Network/Google/AdSenseHost/Types/Sum.hs | 18 + .../AdSenseHost/Accounts/Adclients/Get.hs | 175 + .../AdSenseHost/Accounts/Adclients/List.hs | 188 + .../AdSenseHost/Accounts/Adunits/Delete.hs | 189 + .../AdSenseHost/Accounts/Adunits/Get.hs | 189 + .../AdSenseHost/Accounts/Adunits/GetAdCode.hs | 208 + .../AdSenseHost/Accounts/Adunits/Insert.hs | 176 + .../AdSenseHost/Accounts/Adunits/List.hs | 216 + .../AdSenseHost/Accounts/Adunits/Patch.hs | 189 + .../AdSenseHost/Accounts/Adunits/Update.hs | 174 + .../Resource/AdSenseHost/Accounts/Get.hs | 155 + .../Resource/AdSenseHost/Accounts/List.hs | 159 + .../AdSenseHost/Accounts/Reports/Generate.hs | 278 + .../Resource/AdSenseHost/Adclients/Get.hs | 153 + .../Resource/AdSenseHost/Adclients/List.hs | 167 + .../AdSenseHost/Associationsessions/Start.hs | 198 + .../AdSenseHost/Associationsessions/Verify.hs | 160 + .../AdSenseHost/Customchannels/Delete.hs | 171 + .../AdSenseHost/Customchannels/Get.hs | 171 + .../AdSenseHost/Customchannels/Insert.hs | 156 + .../AdSenseHost/Customchannels/List.hs | 184 + .../AdSenseHost/Customchannels/Patch.hs | 174 + .../AdSenseHost/Customchannels/Update.hs | 156 + .../Resource/AdSenseHost/Reports/Generate.hs | 255 + .../AdSenseHost/URLchannels/Delete.hs | 171 + .../AdSenseHost/URLchannels/Insert.hs | 156 + .../Resource/AdSenseHost/URLchannels/List.hs | 183 + gogol-adsense-host/gogol-adsense-host.cabal | 69 + gogol-adsense-host/src/.gitkeep | 0 gogol-adsense/LICENSE | 373 + gogol-adsense/Makefile | 1 + gogol-adsense/README.md | 28 + gogol-adsense/Setup.hs | 2 + gogol-adsense/gen/Network/Google/AdSense.hs | 398 + .../gen/Network/Google/AdSense/Types.hs | 226 + .../Network/Google/AdSense/Types/Product.hs | 1782 ++ .../gen/Network/Google/AdSense/Types/Sum.hs | 18 + .../AdSense/Accounts/Adclients/List.hs | 188 + .../Accounts/Adunits/Customchannels/List.hs | 223 + .../Resource/AdSense/Accounts/Adunits/Get.hs | 189 + .../AdSense/Accounts/Adunits/GetAdCode.hs | 192 + .../Resource/AdSense/Accounts/Adunits/List.hs | 216 + .../AdSense/Accounts/Alerts/Delete.hs | 174 + .../Resource/AdSense/Accounts/Alerts/List.hs | 167 + .../Accounts/Customchannels/Adunits/List.hs | 236 + .../AdSense/Accounts/Customchannels/Get.hs | 193 + .../AdSense/Accounts/Customchannels/List.hs | 206 + .../Google/Resource/AdSense/Accounts/Get.hs | 162 + .../Google/Resource/AdSense/Accounts/List.hs | 170 + .../AdSense/Accounts/Payments/List.hs | 159 + .../AdSense/Accounts/Reports/Generate.hs | 307 + .../Accounts/Reports/Saved/Generate.hs | 219 + .../AdSense/Accounts/Reports/Saved/List.hs | 193 + .../AdSense/Accounts/Savedadstyles/Get.hs | 175 + .../AdSense/Accounts/Savedadstyles/List.hs | 189 + .../AdSense/Accounts/URLchannels/List.hs | 205 + .../Google/Resource/AdSense/Adclients/List.hs | 167 + .../AdSense/Adunits/Customchannels/List.hs | 204 + .../Google/Resource/AdSense/Adunits/Get.hs | 170 + .../Resource/AdSense/Adunits/GetAdCode.hs | 175 + .../Google/Resource/AdSense/Adunits/List.hs | 193 + .../Google/Resource/AdSense/Alerts/Delete.hs | 154 + .../Google/Resource/AdSense/Alerts/List.hs | 156 + .../AdSense/Customchannels/Adunits/List.hs | 218 + .../Resource/AdSense/Customchannels/Get.hs | 171 + .../Resource/AdSense/Customchannels/List.hs | 186 + .../AdSense/Metadata/Dimensions/List.hs | 144 + .../Resource/AdSense/Metadata/Metrics/List.hs | 144 + .../Google/Resource/AdSense/Payments/List.hs | 139 + .../Resource/AdSense/Reports/Generate.hs | 296 + .../AdSense/Reports/Saved/Generate.hs | 202 + .../Resource/AdSense/Reports/Saved/List.hs | 174 + .../Resource/AdSense/Savedadstyles/Get.hs | 157 + .../Resource/AdSense/Savedadstyles/List.hs | 169 + .../Resource/AdSense/URLchannels/List.hs | 185 + gogol-adsense/gogol-adsense.cabal | 81 + gogol-adsense/src/.gitkeep | 0 gogol-affiliates/LICENSE | 373 + gogol-affiliates/Makefile | 1 + gogol-affiliates/README.md | 28 + gogol-affiliates/Setup.hs | 2 + .../gen/Network/Google/Affiliates.hs | 291 + .../gen/Network/Google/Affiliates/Types.hs | 236 + .../Google/Affiliates/Types/Product.hs | 2241 ++ .../Network/Google/Affiliates/Types/Sum.hs | 18 + .../Google/Resource/Gan/Advertisers/Get.hs | 186 + .../Google/Resource/Gan/Advertisers/List.hs | 269 + .../Google/Resource/Gan/CcOffers/List.hs | 183 + .../Google/Resource/Gan/Events/List.hs | 380 + .../Network/Google/Resource/Gan/Links/Get.hs | 180 + .../Google/Resource/Gan/Links/Insert.hs | 162 + .../Network/Google/Resource/Gan/Links/List.hs | 330 + .../Google/Resource/Gan/Publishers/Get.hs | 184 + .../Google/Resource/Gan/Publishers/List.hs | 268 + .../Google/Resource/Gan/Reports/Get.hs | 318 + gogol-affiliates/gogol-affiliates.cabal | 52 + gogol-affiliates/src/.gitkeep | 0 gogol-analytics/LICENSE | 373 + gogol-analytics/Makefile | 1 + gogol-analytics/README.md | 28 + gogol-analytics/Setup.hs | 2 + .../gen/Network/Google/Analytics.hs | 980 + .../gen/Network/Google/Analytics/Types.hs | 655 + .../Network/Google/Analytics/Types/Product.hs | 6354 ++++++ .../gen/Network/Google/Analytics/Types/Sum.hs | 18 + .../Google/Resource/Analytics/Data/Ga/Get.hs | 304 + .../Google/Resource/Analytics/Data/Mcf/Get.hs | 280 + .../Resource/Analytics/Data/Realtime/Get.hs | 225 + .../Management/AccountSummaries/List.hs | 181 + .../Management/AccountUserLinks/Delete.hs | 177 + .../Management/AccountUserLinks/Insert.hs | 165 + .../Management/AccountUserLinks/List.hs | 193 + .../Management/AccountUserLinks/Update.hs | 178 + .../Analytics/Management/Accounts/List.hs | 173 + .../Management/CustomDataSources/List.hs | 210 + .../Management/CustomDimensions/Get.hs | 196 + .../Management/CustomDimensions/Insert.hs | 181 + .../Management/CustomDimensions/List.hs | 209 + .../Management/CustomDimensions/Patch.hs | 212 + .../Management/CustomDimensions/Update.hs | 210 + .../Analytics/Management/CustomMetrics/Get.hs | 194 + .../Management/CustomMetrics/Insert.hs | 180 + .../Management/CustomMetrics/List.hs | 207 + .../Management/CustomMetrics/Patch.hs | 208 + .../Management/CustomMetrics/Update.hs | 209 + .../Management/Experiments/Delete.hs | 204 + .../Analytics/Management/Experiments/Get.hs | 204 + .../Management/Experiments/Insert.hs | 190 + .../Analytics/Management/Experiments/List.hs | 218 + .../Analytics/Management/Experiments/Patch.hs | 205 + .../Management/Experiments/Update.hs | 204 + .../Analytics/Management/Filters/Delete.hs | 173 + .../Analytics/Management/Filters/Get.hs | 173 + .../Analytics/Management/Filters/Insert.hs | 160 + .../Analytics/Management/Filters/List.hs | 187 + .../Analytics/Management/Filters/Patch.hs | 173 + .../Analytics/Management/Filters/Update.hs | 173 + .../Analytics/Management/Goals/Get.hs | 201 + .../Analytics/Management/Goals/Insert.hs | 189 + .../Analytics/Management/Goals/List.hs | 221 + .../Analytics/Management/Goals/Patch.hs | 204 + .../Analytics/Management/Goals/Update.hs | 201 + .../Management/ProfileFilterLinks/Delete.hs | 209 + .../Management/ProfileFilterLinks/Get.hs | 210 + .../Management/ProfileFilterLinks/Insert.hs | 198 + .../Management/ProfileFilterLinks/List.hs | 228 + .../Management/ProfileFilterLinks/Patch.hs | 212 + .../Management/ProfileFilterLinks/Update.hs | 211 + .../Management/ProfileUserLinks/Delete.hs | 208 + .../Management/ProfileUserLinks/Insert.hs | 196 + .../Management/ProfileUserLinks/List.hs | 228 + .../Management/ProfileUserLinks/Update.hs | 209 + .../Analytics/Management/Profiles/Delete.hs | 189 + .../Analytics/Management/Profiles/Get.hs | 188 + .../Analytics/Management/Profiles/Insert.hs | 176 + .../Analytics/Management/Profiles/List.hs | 207 + .../Analytics/Management/Profiles/Patch.hs | 190 + .../Analytics/Management/Profiles/Update.hs | 189 + .../Analytics/Management/Segments/List.hs | 173 + .../Management/UnsampledReports/Get.hs | 211 + .../Management/UnsampledReports/Insert.hs | 196 + .../Management/UnsampledReports/List.hs | 227 + .../Management/Uploads/DeleteUploadData.hs | 195 + .../Analytics/Management/Uploads/Get.hs | 203 + .../Analytics/Management/Uploads/List.hs | 217 + .../Management/Uploads/UploadData.hs | 194 + .../WebPropertyAdWordsLinks/Delete.hs | 200 + .../Management/WebPropertyAdWordsLinks/Get.hs | 201 + .../WebPropertyAdWordsLinks/Insert.hs | 187 + .../WebPropertyAdWordsLinks/List.hs | 216 + .../WebPropertyAdWordsLinks/Patch.hs | 203 + .../WebPropertyAdWordsLinks/Update.hs | 201 + .../Analytics/Management/Webproperties/Get.hs | 176 + .../Management/Webproperties/Insert.hs | 166 + .../Management/Webproperties/List.hs | 191 + .../Management/Webproperties/Patch.hs | 176 + .../Management/Webproperties/Update.hs | 177 + .../Management/WebpropertyUserLinks/Delete.hs | 194 + .../Management/WebpropertyUserLinks/Insert.hs | 182 + .../Management/WebpropertyUserLinks/List.hs | 214 + .../Management/WebpropertyUserLinks/Update.hs | 195 + .../Analytics/Metadata/Columns/List.hs | 160 + .../Provisioning/CreateAccountTicket.hs | 150 + gogol-analytics/gogol-analytics.cabal | 120 + gogol-analytics/src/.gitkeep | 0 gogol-appengine-taskqueue/LICENSE | 373 + gogol-appengine-taskqueue/Makefile | 1 + gogol-appengine-taskqueue/README.md | 28 + gogol-appengine-taskqueue/Setup.hs | 2 + .../gen/Network/Google/AppEngineTaskQueue.hs | 107 + .../Google/AppEngineTaskQueue/Types.hs | 63 + .../AppEngineTaskQueue/Types/Product.hs | 302 + .../Google/AppEngineTaskQueue/Types/Sum.hs | 18 + .../Resource/Taskqueue/Taskqueues/Get.hs | 182 + .../Google/Resource/Taskqueue/Tasks/Delete.hs | 178 + .../Google/Resource/Taskqueue/Tasks/Get.hs | 178 + .../Google/Resource/Taskqueue/Tasks/Insert.hs | 167 + .../Google/Resource/Taskqueue/Tasks/Lease.hs | 217 + .../Google/Resource/Taskqueue/Tasks/List.hs | 167 + .../Google/Resource/Taskqueue/Tasks/Patch.hs | 194 + .../Google/Resource/Taskqueue/Tasks/Update.hs | 192 + .../gogol-appengine-taskqueue.cabal | 50 + gogol-appengine-taskqueue/src/.gitkeep | 0 gogol-appengine/LICENSE | 373 + gogol-appengine/Makefile | 1 + gogol-appengine/README.md | 28 + gogol-appengine/Setup.hs | 2 + .../gen/Network/Google/AppEngine.hs | 336 + .../gen/Network/Google/AppEngine/Types.hs | 278 + .../Network/Google/AppEngine/Types/Product.hs | 2455 ++ .../gen/Network/Google/AppEngine/Types/Sum.hs | 18 + .../Google/Resource/AppEngine/Apps/Get.hs | 237 + .../Resource/AppEngine/Apps/Modules/Delete.hs | 241 + .../Resource/AppEngine/Apps/Modules/Get.hs | 240 + .../Resource/AppEngine/Apps/Modules/List.hs | 252 + .../Resource/AppEngine/Apps/Modules/Patch.hs | 266 + .../AppEngine/Apps/Modules/Versions/Create.hs | 246 + .../AppEngine/Apps/Modules/Versions/Delete.hs | 260 + .../AppEngine/Apps/Modules/Versions/Get.hs | 270 + .../AppEngine/Apps/Modules/Versions/List.hs | 283 + .../Resource/AppEngine/Apps/Operations/Get.hs | 245 + .../AppEngine/Apps/Operations/List.hs | 272 + gogol-appengine/gogol-appengine.cabal | 54 + gogol-appengine/src/.gitkeep | 0 gogol-apps-activity/LICENSE | 373 + gogol-apps-activity/Makefile | 1 + gogol-apps-activity/README.md | 28 + gogol-apps-activity/Setup.hs | 2 + .../gen/Network/Google/AppsActivity.hs | 124 + .../gen/Network/Google/AppsActivity/Types.hs | 108 + .../Google/AppsActivity/Types/Product.hs | 692 + .../Network/Google/AppsActivity/Types/Sum.hs | 18 + .../Resource/AppsActivity/Activities/List.hs | 242 + gogol-apps-activity/gogol-apps-activity.cabal | 43 + gogol-apps-activity/src/.gitkeep | 0 gogol-apps-calendar/LICENSE | 373 + gogol-apps-calendar/Makefile | 1 + gogol-apps-calendar/README.md | 28 + gogol-apps-calendar/Setup.hs | 2 + .../gen/Network/Google/AppsCalendar.hs | 446 + .../gen/Network/Google/AppsCalendar/Types.hs | 281 + .../Google/AppsCalendar/Types/Product.hs | 2466 ++ .../Network/Google/AppsCalendar/Types/Sum.hs | 18 + .../Google/Resource/Calendar/ACL/Delete.hs | 166 + .../Google/Resource/Calendar/ACL/Get.hs | 166 + .../Google/Resource/Calendar/ACL/Insert.hs | 155 + .../Google/Resource/Calendar/ACL/List.hs | 216 + .../Google/Resource/Calendar/ACL/Patch.hs | 167 + .../Google/Resource/Calendar/ACL/Update.hs | 166 + .../Google/Resource/Calendar/ACL/Watch.hs | 217 + .../Resource/Calendar/CalendarList/Delete.hs | 163 + .../Resource/Calendar/CalendarList/Get.hs | 163 + .../Resource/Calendar/CalendarList/Insert.hs | 164 + .../Resource/Calendar/CalendarList/List.hs | 240 + .../Resource/Calendar/CalendarList/Patch.hs | 182 + .../Resource/Calendar/CalendarList/Update.hs | 180 + .../Resource/Calendar/CalendarList/Watch.hs | 240 + .../Resource/Calendar/Calendars/Clear.hs | 159 + .../Resource/Calendar/Calendars/Delete.hs | 158 + .../Google/Resource/Calendar/Calendars/Get.hs | 155 + .../Resource/Calendar/Calendars/Insert.hs | 140 + .../Resource/Calendar/Calendars/Patch.hs | 156 + .../Resource/Calendar/Calendars/Update.hs | 156 + .../Google/Resource/Calendar/Channels/Stop.hs | 139 + .../Google/Resource/Calendar/Colors/Get.hs | 136 + .../Google/Resource/Calendar/Events/Delete.hs | 184 + .../Google/Resource/Calendar/Events/Get.hs | 215 + .../Google/Resource/Calendar/Events/Import.hs | 178 + .../Google/Resource/Calendar/Events/Insert.hs | 200 + .../Resource/Calendar/Events/Instances.hs | 294 + .../Google/Resource/Calendar/Events/List.hs | 413 + .../Google/Resource/Calendar/Events/Move.hs | 198 + .../Google/Resource/Calendar/Events/Patch.hs | 230 + .../Resource/Calendar/Events/QuickAdd.hs | 189 + .../Google/Resource/Calendar/Events/Update.hs | 231 + .../Google/Resource/Calendar/Events/Watch.hs | 416 + .../Resource/Calendar/Freebusy/Query.hs | 139 + .../Google/Resource/Calendar/Settings/Get.hs | 153 + .../Google/Resource/Calendar/Settings/List.hs | 186 + .../Resource/Calendar/Settings/Watch.hs | 187 + gogol-apps-calendar/gogol-apps-calendar.cabal | 79 + gogol-apps-calendar/src/.gitkeep | 0 gogol-apps-licensing/LICENSE | 373 + gogol-apps-licensing/Makefile | 1 + gogol-apps-licensing/README.md | 28 + gogol-apps-licensing/Setup.hs | 2 + .../gen/Network/Google/AppsLicensing.hs | 93 + .../gen/Network/Google/AppsLicensing/Types.hs | 53 + .../Google/AppsLicensing/Types/Product.hs | 210 + .../Network/Google/AppsLicensing/Types/Sum.hs | 18 + .../Licensing/LicenseAssignments/Delete.hs | 184 + .../Licensing/LicenseAssignments/Get.hs | 185 + .../Licensing/LicenseAssignments/Insert.hs | 172 + .../LicenseAssignments/ListForProduct.hs | 207 + .../ListForProductAndSku.hs | 227 + .../Licensing/LicenseAssignments/Patch.hs | 185 + .../Licensing/LicenseAssignments/Update.hs | 186 + .../gogol-apps-licensing.cabal | 49 + gogol-apps-licensing/src/.gitkeep | 0 gogol-apps-reseller/LICENSE | 373 + gogol-apps-reseller/Makefile | 1 + gogol-apps-reseller/README.md | 28 + gogol-apps-reseller/Setup.hs | 2 + .../gen/Network/Google/AppsReseller.hs | 171 + .../gen/Network/Google/AppsReseller/Types.hs | 103 + .../Google/AppsReseller/Types/Product.hs | 720 + .../Network/Google/AppsReseller/Types/Sum.hs | 18 + .../Google/Resource/Reseller/Customers/Get.hs | 153 + .../Resource/Reseller/Customers/Insert.hs | 156 + .../Resource/Reseller/Customers/Patch.hs | 156 + .../Resource/Reseller/Customers/Update.hs | 156 + .../Reseller/Subscriptions/Activate.hs | 171 + .../Reseller/Subscriptions/ChangePlan.hs | 175 + .../Subscriptions/ChangeRenewalSettings.hs | 180 + .../Reseller/Subscriptions/ChangeSeats.hs | 176 + .../Resource/Reseller/Subscriptions/Delete.hs | 184 + .../Resource/Reseller/Subscriptions/Get.hs | 171 + .../Resource/Reseller/Subscriptions/Insert.hs | 172 + .../Resource/Reseller/Subscriptions/List.hs | 210 + .../Subscriptions/StartPaidService.hs | 178 + .../Reseller/Subscriptions/Suspend.hs | 169 + gogol-apps-reseller/gogol-apps-reseller.cabal | 56 + gogol-apps-reseller/src/.gitkeep | 0 gogol-apps-tasks/LICENSE | 373 + gogol-apps-tasks/Makefile | 1 + gogol-apps-tasks/README.md | 28 + gogol-apps-tasks/Setup.hs | 2 + .../gen/Network/Google/AppsTasks.hs | 143 + .../gen/Network/Google/AppsTasks/Types.hs | 75 + .../Network/Google/AppsTasks/Types/Product.hs | 427 + .../gen/Network/Google/AppsTasks/Types/Sum.hs | 18 + .../Google/Resource/Tasks/Tasklists/Delete.hs | 158 + .../Google/Resource/Tasks/Tasklists/Get.hs | 157 + .../Google/Resource/Tasks/Tasklists/Insert.hs | 141 + .../Google/Resource/Tasks/Tasklists/List.hs | 171 + .../Google/Resource/Tasks/Tasklists/Patch.hs | 160 + .../Google/Resource/Tasks/Tasklists/Update.hs | 158 + .../Google/Resource/Tasks/Tasks/Clear.hs | 155 + .../Google/Resource/Tasks/Tasks/Delete.hs | 163 + .../Google/Resource/Tasks/Tasks/Get.hs | 163 + .../Google/Resource/Tasks/Tasks/Insert.hs | 177 + .../Google/Resource/Tasks/Tasks/List.hs | 284 + .../Google/Resource/Tasks/Tasks/Move.hs | 194 + .../Google/Resource/Tasks/Tasks/Patch.hs | 163 + .../Google/Resource/Tasks/Tasks/Update.hs | 163 + gogol-apps-tasks/gogol-apps-tasks.cabal | 56 + gogol-apps-tasks/src/.gitkeep | 0 gogol-bigquery/LICENSE | 373 + gogol-bigquery/Makefile | 1 + gogol-bigquery/README.md | 28 + gogol-bigquery/Setup.hs | 2 + gogol-bigquery/gen/Network/Google/BigQuery.hs | 496 + .../gen/Network/Google/BigQuery/Types.hs | 398 + .../Network/Google/BigQuery/Types/Product.hs | 3643 +++ .../gen/Network/Google/BigQuery/Types/Sum.hs | 18 + .../Resource/BigQuery/Datasets/Delete.hs | 187 + .../Google/Resource/BigQuery/Datasets/Get.hs | 165 + .../Resource/BigQuery/Datasets/Insert.hs | 154 + .../Google/Resource/BigQuery/Datasets/List.hs | 192 + .../Resource/BigQuery/Datasets/Patch.hs | 172 + .../Resource/BigQuery/Datasets/Update.hs | 171 + .../Google/Resource/BigQuery/Jobs/Cancel.hs | 169 + .../Google/Resource/BigQuery/Jobs/Get.hs | 167 + .../Resource/BigQuery/Jobs/GetQueryResults.hs | 231 + .../Google/Resource/BigQuery/Jobs/Insert.hs | 152 + .../Google/Resource/BigQuery/Jobs/List.hs | 222 + .../Google/Resource/BigQuery/Jobs/Query.hs | 154 + .../Google/Resource/BigQuery/Projects/List.hs | 165 + .../Resource/BigQuery/Tabledata/InsertAll.hs | 190 + .../Resource/BigQuery/Tabledata/List.hs | 218 + .../Google/Resource/BigQuery/Tables/Delete.hs | 182 + .../Google/Resource/BigQuery/Tables/Get.hs | 183 + .../Google/Resource/BigQuery/Tables/Insert.hs | 167 + .../Google/Resource/BigQuery/Tables/List.hs | 194 + .../Google/Resource/BigQuery/Tables/Patch.hs | 185 + .../Google/Resource/BigQuery/Tables/Update.hs | 184 + gogol-bigquery/gogol-bigquery.cabal | 63 + gogol-bigquery/src/.gitkeep | 0 gogol-billing/LICENSE | 373 + gogol-billing/Makefile | 1 + gogol-billing/README.md | 28 + gogol-billing/Setup.hs | 2 + gogol-billing/gen/Network/Google/Billing.hs | 90 + .../gen/Network/Google/Billing/Types.hs | 57 + .../Network/Google/Billing/Types/Product.hs | 279 + .../gen/Network/Google/Billing/Types/Sum.hs | 18 + .../Cloudbilling/BillingAccounts/Get.hs | 228 + .../Cloudbilling/BillingAccounts/List.hs | 245 + .../BillingAccounts/Projects/List.hs | 265 + .../Cloudbilling/Projects/GetBillingInfo.hs | 234 + .../Projects/UpdateBillingInfo.hs | 282 + gogol-billing/gogol-billing.cabal | 48 + gogol-billing/src/.gitkeep | 0 gogol-blogger/LICENSE | 373 + gogol-blogger/Makefile | 1 + gogol-blogger/README.md | 28 + gogol-blogger/Setup.hs | 2 + gogol-blogger/gen/Network/Google/Blogger.hs | 342 + .../gen/Network/Google/Blogger/Types.hs | 193 + .../Network/Google/Blogger/Types/Product.hs | 1477 ++ .../gen/Network/Google/Blogger/Types/Sum.hs | 18 + .../Resource/Blogger/BlogUserInfos/Get.hs | 187 + .../Google/Resource/Blogger/Blogs/Get.hs | 174 + .../Google/Resource/Blogger/Blogs/GetByURL.hs | 169 + .../Resource/Blogger/Blogs/ListByUser.hs | 213 + .../Resource/Blogger/Comments/Approve.hs | 180 + .../Resource/Blogger/Comments/Delete.hs | 179 + .../Google/Resource/Blogger/Comments/Get.hs | 191 + .../Google/Resource/Blogger/Comments/List.hs | 249 + .../Resource/Blogger/Comments/ListByBlog.hs | 236 + .../Resource/Blogger/Comments/MarkAsSpam.hs | 189 + .../Blogger/Comments/RemoveContent.hs | 187 + .../Google/Resource/Blogger/PageViews/Get.hs | 167 + .../Google/Resource/Blogger/Pages/Delete.hs | 162 + .../Google/Resource/Blogger/Pages/Get.hs | 173 + .../Google/Resource/Blogger/Pages/Insert.hs | 163 + .../Google/Resource/Blogger/Pages/List.hs | 211 + .../Google/Resource/Blogger/Pages/Patch.hs | 188 + .../Google/Resource/Blogger/Pages/Publish.hs | 171 + .../Google/Resource/Blogger/Pages/Revert.hs | 164 + .../Google/Resource/Blogger/Pages/Update.hs | 188 + .../Resource/Blogger/PostUserInfos/Get.hs | 206 + .../Resource/Blogger/PostUserInfos/List.hs | 291 + .../Google/Resource/Blogger/Posts/Delete.hs | 168 + .../Google/Resource/Blogger/Posts/Get.hs | 222 + .../Resource/Blogger/Posts/GetByPath.hs | 197 + .../Google/Resource/Blogger/Posts/Insert.hs | 196 + .../Google/Resource/Blogger/Posts/List.hs | 282 + .../Google/Resource/Blogger/Posts/Patch.hs | 236 + .../Google/Resource/Blogger/Posts/Publish.hs | 190 + .../Google/Resource/Blogger/Posts/Revert.hs | 170 + .../Google/Resource/Blogger/Posts/Search.hs | 192 + .../Google/Resource/Blogger/Posts/Update.hs | 236 + .../Google/Resource/Blogger/Users/Get.hs | 149 + gogol-blogger/gogol-blogger.cabal | 75 + gogol-blogger/src/.gitkeep | 0 gogol-books/LICENSE | 373 + gogol-books/Makefile | 1 + gogol-books/README.md | 28 + gogol-books/Setup.hs | 2 + gogol-books/gen/Network/Google/Books.hs | 509 + gogol-books/gen/Network/Google/Books/Types.hs | 314 + .../gen/Network/Google/Books/Types/Product.hs | 2615 +++ .../gen/Network/Google/Books/Types/Sum.hs | 18 + .../Google/Resource/Books/Bookshelves/Get.hs | 176 + .../Google/Resource/Books/Bookshelves/List.hs | 164 + .../Books/Bookshelves/Volumes/List.hs | 224 + .../Resource/Books/Cloudloading/AddBook.hs | 197 + .../Resource/Books/Cloudloading/DeleteBook.hs | 158 + .../Resource/Books/Cloudloading/UpdateBook.hs | 147 + .../Books/Dictionary/ListOfflineMetadata.hs | 163 + .../Books/Layers/AnnotationData/Get.hs | 276 + .../Books/Layers/AnnotationData/List.hs | 319 + .../Google/Resource/Books/Layers/Get.hs | 190 + .../Google/Resource/Books/Layers/List.hs | 202 + .../Books/Layers/VolumeAnnotations/Get.hs | 216 + .../Books/Layers/VolumeAnnotations/List.hs | 348 + .../Books/Myconfig/GetUserSettings.hs | 147 + .../Books/Myconfig/ReleaseDownloadAccess.hs | 203 + .../Resource/Books/Myconfig/RequestAccess.hs | 223 + .../Books/Myconfig/SyncVolumeLicenses.hs | 240 + .../Books/Myconfig/UpdateUserSettings.hs | 152 + .../Books/Mylibrary/Annotations/Delete.hs | 172 + .../Books/Mylibrary/Annotations/Insert.hs | 185 + .../Books/Mylibrary/Annotations/List.hs | 276 + .../Books/Mylibrary/Annotations/Summary.hs | 175 + .../Books/Mylibrary/Annotations/Update.hs | 172 + .../Books/Mylibrary/Bookshelves/AddVolume.hs | 200 + .../Mylibrary/Bookshelves/ClearVolumes.hs | 175 + .../Books/Mylibrary/Bookshelves/Get.hs | 172 + .../Books/Mylibrary/Bookshelves/List.hs | 158 + .../Books/Mylibrary/Bookshelves/MoveVolume.hs | 203 + .../Mylibrary/Bookshelves/RemoveVolume.hs | 200 + .../Mylibrary/Bookshelves/Volumes/List.hs | 251 + .../Books/Mylibrary/Readingpositions/Get.hs | 187 + .../Mylibrary/Readingpositions/SetPosition.hs | 242 + .../Books/Onboarding/ListCategories.hs | 160 + .../Books/Onboarding/ListCategoryVolumes.hs | 214 + .../Resource/Books/Promooffer/Accept.hs | 236 + .../Resource/Books/Promooffer/Dismiss.hs | 225 + .../Google/Resource/Books/Promooffer/Get.hs | 211 + .../Resource/Books/Volumes/Associated/List.hs | 211 + .../Google/Resource/Books/Volumes/Get.hs | 211 + .../Google/Resource/Books/Volumes/List.hs | 296 + .../Resource/Books/Volumes/Mybooks/List.hs | 225 + .../Books/Volumes/Recommended/List.hs | 185 + .../Books/Volumes/Recommended/Rate.hs | 200 + .../Books/Volumes/Useruploaded/List.hs | 224 + gogol-books/gogol-books.cabal | 86 + gogol-books/src/.gitkeep | 0 gogol-civicinfo/LICENSE | 373 + gogol-civicinfo/Makefile | 1 + gogol-civicinfo/README.md | 28 + gogol-civicinfo/Setup.hs | 2 + .../gen/Network/Google/CivicInfo.hs | 268 + .../gen/Network/Google/CivicInfo/Types.hs | 235 + .../Network/Google/CivicInfo/Types/Product.hs | 2078 ++ .../gen/Network/Google/CivicInfo/Types/Sum.hs | 18 + .../Resource/CivicInfo/Divisions/Search.hs | 156 + .../CivicInfo/Elections/ElectionQuery.hs | 145 + .../CivicInfo/Elections/VoterInfoQuery.hs | 190 + .../RepresentativeInfoByAddress.hs | 208 + .../RepresentativeInfoByDivision.hs | 208 + gogol-civicinfo/gogol-civicinfo.cabal | 47 + gogol-civicinfo/src/.gitkeep | 0 gogol-classroom/LICENSE | 373 + gogol-classroom/Makefile | 1 + gogol-classroom/README.md | 28 + gogol-classroom/Setup.hs | 2 + .../gen/Network/Google/Classroom.hs | 233 + .../gen/Network/Google/Classroom/Types.hs | 127 + .../Network/Google/Classroom/Types/Product.hs | 891 + .../gen/Network/Google/Classroom/Types/Sum.hs | 18 + .../Classroom/Courses/Aliases/Create.hs | 237 + .../Classroom/Courses/Aliases/Delete.hs | 247 + .../Classroom/Courses/Aliases/List.hs | 270 + .../Resource/Classroom/Courses/Create.hs | 221 + .../Resource/Classroom/Courses/Delete.hs | 230 + .../Google/Resource/Classroom/Courses/Get.hs | 228 + .../Google/Resource/Classroom/Courses/List.hs | 279 + .../Resource/Classroom/Courses/Patch.hs | 249 + .../Classroom/Courses/Students/Create.hs | 258 + .../Classroom/Courses/Students/Delete.hs | 252 + .../Classroom/Courses/Students/Get.hs | 252 + .../Classroom/Courses/Students/List.hs | 266 + .../Classroom/Courses/Teachers/Create.hs | 241 + .../Classroom/Courses/Teachers/Delete.hs | 256 + .../Classroom/Courses/Teachers/Get.hs | 252 + .../Classroom/Courses/Teachers/List.hs | 266 + .../Resource/Classroom/Courses/Update.hs | 229 + .../Resource/Classroom/Invitations/Accept.hs | 233 + .../Resource/Classroom/Invitations/Create.hs | 227 + .../Resource/Classroom/Invitations/Delete.hs | 230 + .../Resource/Classroom/Invitations/Get.hs | 229 + .../Resource/Classroom/Invitations/List.hs | 277 + .../Resource/Classroom/UserProfiles/Get.hs | 233 + gogol-classroom/gogol-classroom.cabal | 65 + gogol-classroom/src/.gitkeep | 0 gogol-compute-autoscaler/LICENSE | 373 + gogol-compute-autoscaler/Makefile | 1 + gogol-compute-autoscaler/README.md | 28 + gogol-compute-autoscaler/Setup.hs | 2 + .../gen/Network/Google/ComputeAutoscaler.hs | 197 + .../Network/Google/ComputeAutoscaler/Types.hs | 143 + .../Google/ComputeAutoscaler/Types/Product.hs | 1054 + .../Google/ComputeAutoscaler/Types/Sum.hs | 18 + .../Resource/Autoscaler/Autoscalers/Delete.hs | 182 + .../Resource/Autoscaler/Autoscalers/Get.hs | 181 + .../Resource/Autoscaler/Autoscalers/Insert.hs | 169 + .../Resource/Autoscaler/Autoscalers/List.hs | 201 + .../Resource/Autoscaler/Autoscalers/Patch.hs | 184 + .../Resource/Autoscaler/Autoscalers/Update.hs | 182 + .../Autoscaler/ZoneOperations/Delete.hs | 182 + .../Resource/Autoscaler/ZoneOperations/Get.hs | 182 + .../Autoscaler/ZoneOperations/List.hs | 207 + .../Google/Resource/Autoscaler/Zones/List.hs | 184 + .../gogol-compute-autoscaler.cabal | 53 + gogol-compute-autoscaler/src/.gitkeep | 0 gogol-compute-useraccounts/LICENSE | 373 + gogol-compute-useraccounts/Makefile | 1 + gogol-compute-useraccounts/README.md | 28 + gogol-compute-useraccounts/Setup.hs | 2 + .../gen/Network/Google/ComputeUserAccounts.hs | 248 + .../Google/ComputeUserAccounts/Types.hs | 166 + .../ComputeUserAccounts/Types/Product.hs | 1278 ++ .../Google/ComputeUserAccounts/Types/Sum.hs | 18 + .../GlobalAccountsOperations/Delete.hs | 177 + .../GlobalAccountsOperations/Get.hs | 176 + .../GlobalAccountsOperations/List.hs | 234 + .../Clouduseraccounts/Groups/AddMember.hs | 173 + .../Clouduseraccounts/Groups/Delete.hs | 167 + .../Resource/Clouduseraccounts/Groups/Get.hs | 166 + .../Clouduseraccounts/Groups/Insert.hs | 155 + .../Resource/Clouduseraccounts/Groups/List.hs | 221 + .../Clouduseraccounts/Groups/RemoveMember.hs | 174 + .../Linux/GetAuthorizedKeysView.hs | 217 + .../Linux/GetLinuxAccountViews.hs | 262 + .../Clouduseraccounts/Users/AddPublicKey.hs | 176 + .../Clouduseraccounts/Users/Delete.hs | 165 + .../Resource/Clouduseraccounts/Users/Get.hs | 164 + .../Clouduseraccounts/Users/Insert.hs | 154 + .../Resource/Clouduseraccounts/Users/List.hs | 221 + .../Users/RemovePublicKey.hs | 191 + .../gogol-compute-useraccounts.cabal | 59 + gogol-compute-useraccounts/src/.gitkeep | 0 gogol-compute/LICENSE | 373 + gogol-compute/Makefile | 1 + gogol-compute/README.md | 28 + gogol-compute/Setup.hs | 2 + gogol-compute/gen/Network/Google/Compute.hs | 2032 ++ .../gen/Network/Google/Compute/Types.hs | 1294 ++ .../Network/Google/Compute/Types/Product.hs | 12196 ++++++++++ .../gen/Network/Google/Compute/Types/Sum.hs | 18 + .../Compute/Addresses/AggregatedList.hs | 210 + .../Resource/Compute/Addresses/Delete.hs | 179 + .../Google/Resource/Compute/Addresses/Get.hs | 178 + .../Resource/Compute/Addresses/Insert.hs | 168 + .../Google/Resource/Compute/Addresses/List.hs | 215 + .../Compute/Autoscalers/AggregatedList.hs | 203 + .../Resource/Compute/Autoscalers/Delete.hs | 185 + .../Resource/Compute/Autoscalers/Get.hs | 184 + .../Resource/Compute/Autoscalers/Insert.hs | 173 + .../Resource/Compute/Autoscalers/List.hs | 222 + .../Resource/Compute/Autoscalers/Patch.hs | 183 + .../Resource/Compute/Autoscalers/Update.hs | 181 + .../Compute/BackendServices/Delete.hs | 174 + .../Resource/Compute/BackendServices/Get.hs | 174 + .../Compute/BackendServices/GetHealth.hs | 177 + .../Compute/BackendServices/Insert.hs | 161 + .../Resource/Compute/BackendServices/List.hs | 211 + .../Resource/Compute/BackendServices/Patch.hs | 176 + .../Compute/BackendServices/Update.hs | 174 + .../Compute/DiskTypes/AggregatedList.hs | 212 + .../Google/Resource/Compute/DiskTypes/Get.hs | 182 + .../Google/Resource/Compute/DiskTypes/List.hs | 221 + .../Resource/Compute/Disks/AggregatedList.hs | 209 + .../Resource/Compute/Disks/CreateSnapshot.hs | 184 + .../Google/Resource/Compute/Disks/Delete.hs | 182 + .../Google/Resource/Compute/Disks/Get.hs | 175 + .../Google/Resource/Compute/Disks/Insert.hs | 181 + .../Google/Resource/Compute/Disks/List.hs | 214 + .../Resource/Compute/Firewalls/Delete.hs | 167 + .../Google/Resource/Compute/Firewalls/Get.hs | 166 + .../Resource/Compute/Firewalls/Insert.hs | 155 + .../Google/Resource/Compute/Firewalls/List.hs | 203 + .../Resource/Compute/Firewalls/Patch.hs | 169 + .../Resource/Compute/Firewalls/Update.hs | 169 + .../Compute/ForwardingRules/AggregatedList.hs | 214 + .../Compute/ForwardingRules/Delete.hs | 187 + .../Resource/Compute/ForwardingRules/Get.hs | 187 + .../Compute/ForwardingRules/Insert.hs | 174 + .../Resource/Compute/ForwardingRules/List.hs | 224 + .../Compute/ForwardingRules/SetTarget.hs | 189 + .../Compute/GlobalAddresses/Delete.hs | 172 + .../Resource/Compute/GlobalAddresses/Get.hs | 172 + .../Compute/GlobalAddresses/Insert.hs | 160 + .../Resource/Compute/GlobalAddresses/List.hs | 209 + .../Compute/GlobalForwardingRules/Delete.hs | 176 + .../Compute/GlobalForwardingRules/Get.hs | 176 + .../Compute/GlobalForwardingRules/Insert.hs | 163 + .../Compute/GlobalForwardingRules/List.hs | 215 + .../GlobalForwardingRules/SetTarget.hs | 177 + .../GlobalOperations/AggregatedList.hs | 214 + .../Compute/GlobalOperations/Delete.hs | 172 + .../Resource/Compute/GlobalOperations/Get.hs | 172 + .../Resource/Compute/GlobalOperations/List.hs | 211 + .../Compute/HTTPHealthChecks/Delete.hs | 181 + .../Resource/Compute/HTTPHealthChecks/Get.hs | 181 + .../Compute/HTTPHealthChecks/Insert.hs | 168 + .../Resource/Compute/HTTPHealthChecks/List.hs | 220 + .../Compute/HTTPHealthChecks/Patch.hs | 183 + .../Compute/HTTPHealthChecks/Update.hs | 183 + .../Google/Resource/Compute/Images/Delete.hs | 163 + .../Resource/Compute/Images/Deprecate.hs | 169 + .../Google/Resource/Compute/Images/Get.hs | 163 + .../Google/Resource/Compute/Images/Insert.hs | 154 + .../Google/Resource/Compute/Images/List.hs | 202 + .../InstanceGroupManagers/AbandonInstances.hs | 198 + .../InstanceGroupManagers/AggregatedList.hs | 217 + .../Compute/InstanceGroupManagers/Delete.hs | 188 + .../InstanceGroupManagers/DeleteInstances.hs | 198 + .../Compute/InstanceGroupManagers/Get.hs | 189 + .../Compute/InstanceGroupManagers/Insert.hs | 175 + .../Compute/InstanceGroupManagers/List.hs | 227 + .../ListManagedInstances.hs | 198 + .../RecreateInstances.hs | 194 + .../Compute/InstanceGroupManagers/Resize.hs | 209 + .../SetInstanceTemplate.hs | 200 + .../InstanceGroupManagers/SetTargetPools.hs | 200 + .../Compute/InstanceGroups/AddInstances.hs | 190 + .../Compute/InstanceGroups/AggregatedList.hs | 213 + .../Resource/Compute/InstanceGroups/Delete.hs | 186 + .../Resource/Compute/InstanceGroups/Get.hs | 187 + .../Resource/Compute/InstanceGroups/Insert.hs | 173 + .../Resource/Compute/InstanceGroups/List.hs | 223 + .../Compute/InstanceGroups/ListInstances.hs | 245 + .../Compute/InstanceGroups/RemoveInstances.hs | 190 + .../Compute/InstanceGroups/SetNamedPorts.hs | 189 + .../Compute/InstanceTemplates/Delete.hs | 174 + .../Resource/Compute/InstanceTemplates/Get.hs | 174 + .../Compute/InstanceTemplates/Insert.hs | 161 + .../Compute/InstanceTemplates/List.hs | 211 + .../Compute/Instances/AddAccessConfig.hs | 202 + .../Compute/Instances/AggregatedList.hs | 209 + .../Resource/Compute/Instances/AttachDisk.hs | 185 + .../Resource/Compute/Instances/Delete.hs | 185 + .../Compute/Instances/DeleteAccessConfig.hs | 216 + .../Resource/Compute/Instances/DetachDisk.hs | 200 + .../Google/Resource/Compute/Instances/Get.hs | 182 + .../Compute/Instances/GetSerialPortOutput.hs | 203 + .../Resource/Compute/Instances/Insert.hs | 172 + .../Google/Resource/Compute/Instances/List.hs | 221 + .../Resource/Compute/Instances/Reset.hs | 184 + .../Compute/Instances/SetDiskAutoDelete.hs | 218 + .../Resource/Compute/Instances/SetMetadata.hs | 187 + .../Compute/Instances/SetScheduling.hs | 185 + .../Resource/Compute/Instances/SetTags.hs | 187 + .../Resource/Compute/Instances/Start.hs | 182 + .../Google/Resource/Compute/Instances/Stop.hs | 194 + .../Google/Resource/Compute/Licenses/Get.hs | 165 + .../Compute/MachineTypes/AggregatedList.hs | 213 + .../Resource/Compute/MachineTypes/Get.hs | 184 + .../Resource/Compute/MachineTypes/List.hs | 223 + .../Resource/Compute/Networks/Delete.hs | 167 + .../Google/Resource/Compute/Networks/Get.hs | 165 + .../Resource/Compute/Networks/Insert.hs | 155 + .../Google/Resource/Compute/Networks/List.hs | 203 + .../Google/Resource/Compute/Projects/Get.hs | 150 + .../Resource/Compute/Projects/MoveDisk.hs | 158 + .../Resource/Compute/Projects/MoveInstance.hs | 160 + .../Projects/SetCommonInstanceMetadata.hs | 164 + .../Compute/Projects/SetUsageExportBucket.hs | 164 + .../Compute/RegionOperations/Delete.hs | 185 + .../Resource/Compute/RegionOperations/Get.hs | 185 + .../Resource/Compute/RegionOperations/List.hs | 224 + .../Google/Resource/Compute/Regions/Get.hs | 168 + .../Google/Resource/Compute/Regions/List.hs | 199 + .../Google/Resource/Compute/Routes/Delete.hs | 165 + .../Google/Resource/Compute/Routes/Get.hs | 163 + .../Google/Resource/Compute/Routes/Insert.hs | 154 + .../Google/Resource/Compute/Routes/List.hs | 202 + .../Resource/Compute/Snapshots/Delete.hs | 176 + .../Google/Resource/Compute/Snapshots/Get.hs | 167 + .../Google/Resource/Compute/Snapshots/List.hs | 203 + .../Compute/TargetHTTPProxies/Delete.hs | 181 + .../Resource/Compute/TargetHTTPProxies/Get.hs | 181 + .../Compute/TargetHTTPProxies/Insert.hs | 168 + .../Compute/TargetHTTPProxies/List.hs | 220 + .../Compute/TargetHTTPProxies/SetURLMap.hs | 181 + .../Compute/TargetInstances/AggregatedList.hs | 214 + .../Compute/TargetInstances/Delete.hs | 186 + .../Resource/Compute/TargetInstances/Get.hs | 186 + .../Compute/TargetInstances/Insert.hs | 173 + .../Resource/Compute/TargetInstances/List.hs | 223 + .../Compute/TargetPools/AddHealthCheck.hs | 189 + .../Compute/TargetPools/AddInstance.hs | 187 + .../Compute/TargetPools/AggregatedList.hs | 213 + .../Resource/Compute/TargetPools/Delete.hs | 186 + .../Resource/Compute/TargetPools/Get.hs | 185 + .../Resource/Compute/TargetPools/GetHealth.hs | 190 + .../Resource/Compute/TargetPools/Insert.hs | 174 + .../Resource/Compute/TargetPools/List.hs | 223 + .../Compute/TargetPools/RemoveHealthCheck.hs | 189 + .../Compute/TargetPools/RemoveInstance.hs | 188 + .../Resource/Compute/TargetPools/SetBackup.hs | 202 + .../TargetVPNGateways/AggregatedList.hs | 214 + .../Compute/TargetVPNGateways/Delete.hs | 188 + .../Resource/Compute/TargetVPNGateways/Get.hs | 188 + .../Compute/TargetVPNGateways/Insert.hs | 175 + .../Compute/TargetVPNGateways/List.hs | 226 + .../Google/Resource/Compute/URLMaps/Delete.hs | 170 + .../Google/Resource/Compute/URLMaps/Get.hs | 169 + .../Google/Resource/Compute/URLMaps/Insert.hs | 158 + .../Google/Resource/Compute/URLMaps/List.hs | 208 + .../Google/Resource/Compute/URLMaps/Patch.hs | 172 + .../Google/Resource/Compute/URLMaps/Update.hs | 170 + .../Resource/Compute/URLMaps/Validate.hs | 176 + .../Compute/VPNTunnels/AggregatedList.hs | 213 + .../Resource/Compute/VPNTunnels/Delete.hs | 185 + .../Google/Resource/Compute/VPNTunnels/Get.hs | 183 + .../Resource/Compute/VPNTunnels/Insert.hs | 174 + .../Resource/Compute/VPNTunnels/List.hs | 223 + .../Resource/Compute/ZoneOperations/Delete.hs | 184 + .../Resource/Compute/ZoneOperations/Get.hs | 184 + .../Resource/Compute/ZoneOperations/List.hs | 223 + .../Google/Resource/Compute/Zones/Get.hs | 162 + .../Google/Resource/Compute/Zones/List.hs | 199 + gogol-compute/gogol-compute.cabal | 216 + gogol-compute/src/.gitkeep | 0 gogol-container/LICENSE | 373 + gogol-container/Makefile | 1 + gogol-container/README.md | 28 + gogol-container/Setup.hs | 2 + .../gen/Network/Google/Container.hs | 159 + .../gen/Network/Google/Container/Types.hs | 113 + .../Network/Google/Container/Types/Product.hs | 812 + .../gen/Network/Google/Container/Types/Sum.hs | 18 + .../Container/Projects/Clusters/List.hs | 159 + .../Container/Projects/Operations/List.hs | 159 + .../Projects/Zones/Clusters/Create.hs | 189 + .../Projects/Zones/Clusters/Delete.hs | 193 + .../Container/Projects/Zones/Clusters/Get.hs | 189 + .../Container/Projects/Zones/Clusters/List.hs | 176 + .../Projects/Zones/Operations/Get.hs | 191 + .../Projects/Zones/Operations/List.hs | 176 + gogol-container/gogol-container.cabal | 52 + gogol-container/src/.gitkeep | 0 gogol-customsearch/LICENSE | 373 + gogol-customsearch/Makefile | 1 + gogol-customsearch/README.md | 28 + gogol-customsearch/Setup.hs | 2 + .../gen/Network/Google/CustomSearch.hs | 134 + .../gen/Network/Google/CustomSearch/Types.hs | 118 + .../Google/CustomSearch/Types/Product.hs | 802 + .../Network/Google/CustomSearch/Types/Sum.hs | 18 + .../Google/Resource/Search/Cse/List.hs | 555 + gogol-customsearch/gogol-customsearch.cabal | 43 + gogol-customsearch/src/.gitkeep | 0 gogol-dataflow/LICENSE | 373 + gogol-dataflow/Makefile | 1 + gogol-dataflow/README.md | 28 + gogol-dataflow/Setup.hs | 2 + gogol-dataflow/gen/Network/Google/Dataflow.hs | 633 + .../gen/Network/Google/Dataflow/Types.hs | 588 + .../Network/Google/Dataflow/Types/Product.hs | 5359 +++++ .../gen/Network/Google/Dataflow/Types/Sum.hs | 18 + .../Resource/Dataflow/Projects/Jobs/Create.hs | 251 + .../Resource/Dataflow/Projects/Jobs/Get.hs | 249 + .../Dataflow/Projects/Jobs/GetMetrics.hs | 258 + .../Resource/Dataflow/Projects/Jobs/List.hs | 266 + .../Dataflow/Projects/Jobs/Messages/List.hs | 315 + .../Resource/Dataflow/Projects/Jobs/Update.hs | 238 + .../Dataflow/Projects/Jobs/WorkItems/Lease.hs | 248 + .../Projects/Jobs/WorkItems/ReportStatus.hs | 251 + gogol-dataflow/gogol-dataflow.cabal | 50 + gogol-dataflow/src/.gitkeep | 0 gogol-datastore/LICENSE | 373 + gogol-datastore/Makefile | 1 + gogol-datastore/README.md | 28 + gogol-datastore/Setup.hs | 2 + .../gen/Network/Google/Datastore.hs | 307 + .../gen/Network/Google/Datastore/Types.hs | 271 + .../Network/Google/Datastore/Types/Product.hs | 2125 ++ .../gen/Network/Google/Datastore/Types/Sum.hs | 18 + .../Datastore/Datasets/AllocateIds.hs | 159 + .../Datastore/Datasets/BeginTransaction.hs | 160 + .../Resource/Datastore/Datasets/Commit.hs | 155 + .../Resource/Datastore/Datasets/Lookup.hs | 153 + .../Resource/Datastore/Datasets/Rollback.hs | 154 + .../Resource/Datastore/Datasets/RunQuery.hs | 157 + gogol-datastore/gogol-datastore.cabal | 48 + gogol-datastore/src/.gitkeep | 0 gogol-debugger/LICENSE | 373 + gogol-debugger/Makefile | 1 + gogol-debugger/README.md | 28 + gogol-debugger/Setup.hs | 2 + gogol-debugger/gen/Network/Google/Debugger.hs | 247 + .../gen/Network/Google/Debugger/Types.hs | 202 + .../Network/Google/Debugger/Types/Product.hs | 1581 ++ .../gen/Network/Google/Debugger/Types/Sum.hs | 18 + .../Controller/Debuggees/Breakpoints/List.hs | 271 + .../Debuggees/Breakpoints/Update.hs | 260 + .../Controller/Debuggees/Register.hs | 229 + .../Debugger/Debuggees/Breakpoints/Delete.hs | 248 + .../Debugger/Debuggees/Breakpoints/Get.hs | 249 + .../Debugger/Debuggees/Breakpoints/List.hs | 307 + .../Debugger/Debuggees/Breakpoints/Set.hs | 235 + .../Clouddebugger/Debugger/Debuggees/List.hs | 243 + gogol-debugger/gogol-debugger.cabal | 51 + gogol-debugger/src/.gitkeep | 0 gogol-deploymentmanager/LICENSE | 373 + gogol-deploymentmanager/Makefile | 1 + gogol-deploymentmanager/README.md | 28 + gogol-deploymentmanager/Setup.hs | 2 + .../gen/Network/Google/DeploymentManager.hs | 230 + .../Network/Google/DeploymentManager/Types.hs | 163 + .../Google/DeploymentManager/Types/Product.hs | 1297 ++ .../Google/DeploymentManager/Types/Sum.hs | 18 + .../DeploymentManager/Deployments/Delete.hs | 169 + .../DeploymentManager/Deployments/Get.hs | 168 + .../DeploymentManager/Deployments/Insert.hs | 157 + .../DeploymentManager/Deployments/List.hs | 203 + .../DeploymentManager/Deployments/Patch.hs | 213 + .../DeploymentManager/Deployments/Update.hs | 213 + .../DeploymentManager/Manifests/Get.hs | 181 + .../DeploymentManager/Manifests/List.hs | 216 + .../DeploymentManager/Operations/Get.hs | 168 + .../DeploymentManager/Operations/List.hs | 203 + .../DeploymentManager/Resources/Get.hs | 181 + .../DeploymentManager/Resources/List.hs | 216 + .../Resource/DeploymentManager/Types/List.hs | 201 + .../gogol-deploymentmanager.cabal | 56 + gogol-deploymentmanager/src/.gitkeep | 0 gogol-dfareporting/LICENSE | 373 + gogol-dfareporting/Makefile | 1 + gogol-dfareporting/README.md | 28 + gogol-dfareporting/Setup.hs | 2 + .../gen/Network/Google/DFAReporting.hs | 2722 +++ .../gen/Network/Google/DFAReporting/Types.hs | 1884 ++ .../Google/DFAReporting/Types/Product.hs | 18934 ++++++++++++++++ .../Network/Google/DFAReporting/Types/Sum.hs | 18 + .../AccountActiveAdSummaries/Get.hs | 178 + .../AccountPermissionGroups/Get.hs | 176 + .../AccountPermissionGroups/List.hs | 164 + .../DFAReporting/AccountPermissions/Get.hs | 173 + .../DFAReporting/AccountPermissions/List.hs | 161 + .../DFAReporting/AccountUserProfiles/Get.hs | 173 + .../AccountUserProfiles/Insert.hs | 164 + .../DFAReporting/AccountUserProfiles/List.hs | 283 + .../DFAReporting/AccountUserProfiles/Patch.hs | 178 + .../AccountUserProfiles/Update.hs | 164 + .../Resource/DFAReporting/Accounts/Get.hs | 168 + .../Resource/DFAReporting/Accounts/List.hs | 245 + .../Resource/DFAReporting/Accounts/Patch.hs | 164 + .../Resource/DFAReporting/Accounts/Update.hs | 155 + .../Google/Resource/DFAReporting/Ads/Get.hs | 167 + .../Resource/DFAReporting/Ads/Insert.hs | 155 + .../Google/Resource/DFAReporting/Ads/List.hs | 490 + .../Google/Resource/DFAReporting/Ads/Patch.hs | 169 + .../Resource/DFAReporting/Ads/Update.hs | 152 + .../DFAReporting/AdvertiserGroups/Delete.hs | 171 + .../DFAReporting/AdvertiserGroups/Get.hs | 173 + .../DFAReporting/AdvertiserGroups/Insert.hs | 159 + .../DFAReporting/AdvertiserGroups/List.hs | 241 + .../DFAReporting/AdvertiserGroups/Patch.hs | 174 + .../DFAReporting/AdvertiserGroups/Update.hs | 159 + .../Resource/DFAReporting/Advertisers/Get.hs | 170 + .../DFAReporting/Advertisers/Insert.hs | 156 + .../Resource/DFAReporting/Advertisers/List.hs | 318 + .../DFAReporting/Advertisers/Patch.hs | 171 + .../DFAReporting/Advertisers/Update.hs | 159 + .../Resource/DFAReporting/Browsers/List.hs | 154 + .../CampaignCreativeAssociations/Insert.hs | 185 + .../CampaignCreativeAssociations/List.hs | 221 + .../Resource/DFAReporting/Campaigns/Get.hs | 171 + .../Resource/DFAReporting/Campaigns/Insert.hs | 185 + .../Resource/DFAReporting/Campaigns/List.hs | 322 + .../Resource/DFAReporting/Campaigns/Patch.hs | 167 + .../Resource/DFAReporting/Campaigns/Update.hs | 155 + .../Resource/DFAReporting/ChangeLogs/Get.hs | 169 + .../Resource/DFAReporting/ChangeLogs/List.hs | 297 + .../Resource/DFAReporting/Cities/List.hs | 208 + .../DFAReporting/ConnectionTypes/Get.hs | 171 + .../DFAReporting/ConnectionTypes/List.hs | 161 + .../DFAReporting/ContentCategories/Delete.hs | 171 + .../DFAReporting/ContentCategories/Get.hs | 171 + .../DFAReporting/ContentCategories/Insert.hs | 159 + .../DFAReporting/ContentCategories/List.hs | 241 + .../DFAReporting/ContentCategories/Patch.hs | 174 + .../DFAReporting/ContentCategories/Update.hs | 159 + .../Resource/DFAReporting/Countries/Get.hs | 166 + .../Resource/DFAReporting/Countries/List.hs | 157 + .../DFAReporting/CreativeAssets/Insert.hs | 175 + .../CreativeFieldValues/Delete.hs | 190 + .../DFAReporting/CreativeFieldValues/Get.hs | 189 + .../CreativeFieldValues/Insert.hs | 180 + .../DFAReporting/CreativeFieldValues/List.hs | 256 + .../DFAReporting/CreativeFieldValues/Patch.hs | 194 + .../CreativeFieldValues/Update.hs | 180 + .../DFAReporting/CreativeFields/Delete.hs | 171 + .../DFAReporting/CreativeFields/Get.hs | 171 + .../DFAReporting/CreativeFields/Insert.hs | 159 + .../DFAReporting/CreativeFields/List.hs | 254 + .../DFAReporting/CreativeFields/Patch.hs | 173 + .../DFAReporting/CreativeFields/Update.hs | 159 + .../DFAReporting/CreativeGroups/Get.hs | 171 + .../DFAReporting/CreativeGroups/Insert.hs | 159 + .../DFAReporting/CreativeGroups/List.hs | 267 + .../DFAReporting/CreativeGroups/Patch.hs | 173 + .../DFAReporting/CreativeGroups/Update.hs | 159 + .../Resource/DFAReporting/Creatives/Get.hs | 171 + .../Resource/DFAReporting/Creatives/Insert.hs | 158 + .../Resource/DFAReporting/Creatives/List.hs | 358 + .../Resource/DFAReporting/Creatives/Patch.hs | 170 + .../Resource/DFAReporting/Creatives/Update.hs | 158 + .../DFAReporting/DimensionValues/Query.hs | 186 + .../DFAReporting/DirectorySiteContacts/Get.hs | 176 + .../DirectorySiteContacts/List.hs | 262 + .../DFAReporting/DirectorySites/Get.hs | 171 + .../DFAReporting/DirectorySites/Insert.hs | 159 + .../DFAReporting/DirectorySites/List.hs | 333 + .../Resource/DFAReporting/EventTags/Delete.hs | 170 + .../Resource/DFAReporting/EventTags/Get.hs | 169 + .../Resource/DFAReporting/EventTags/Insert.hs | 158 + .../Resource/DFAReporting/EventTags/List.hs | 302 + .../Resource/DFAReporting/EventTags/Patch.hs | 170 + .../Resource/DFAReporting/EventTags/Update.hs | 158 + .../Google/Resource/DFAReporting/Files/Get.hs | 164 + .../Resource/DFAReporting/Files/List.hs | 212 + .../FloodlightActivities/Delete.hs | 172 + .../FloodlightActivities/Generatetag.hs | 177 + .../DFAReporting/FloodlightActivities/Get.hs | 171 + .../FloodlightActivities/Insert.hs | 162 + .../DFAReporting/FloodlightActivities/List.hs | 344 + .../FloodlightActivities/Patch.hs | 176 + .../FloodlightActivities/Update.hs | 162 + .../FloodlightActivityGroups/Delete.hs | 175 + .../FloodlightActivityGroups/Get.hs | 176 + .../FloodlightActivityGroups/Insert.hs | 165 + .../FloodlightActivityGroups/List.hs | 293 + .../FloodlightActivityGroups/Patch.hs | 179 + .../FloodlightActivityGroups/Update.hs | 165 + .../FloodlightConfigurations/Get.hs | 174 + .../FloodlightConfigurations/List.hs | 173 + .../FloodlightConfigurations/Patch.hs | 177 + .../FloodlightConfigurations/Update.hs | 163 + .../DFAReporting/InventoryItems/Get.hs | 185 + .../DFAReporting/InventoryItems/List.hs | 270 + .../DFAReporting/LandingPages/Delete.hs | 186 + .../Resource/DFAReporting/LandingPages/Get.hs | 185 + .../DFAReporting/LandingPages/Insert.hs | 174 + .../DFAReporting/LandingPages/List.hs | 175 + .../DFAReporting/LandingPages/Patch.hs | 188 + .../DFAReporting/LandingPages/Update.hs | 174 + .../Resource/DFAReporting/Metros/List.hs | 153 + .../DFAReporting/MobileCarriers/Get.hs | 171 + .../DFAReporting/MobileCarriers/List.hs | 161 + .../OperatingSystemVersions/Get.hs | 176 + .../OperatingSystemVersions/List.hs | 164 + .../DFAReporting/OperatingSystems/Get.hs | 172 + .../DFAReporting/OperatingSystems/List.hs | 161 + .../DFAReporting/OrderDocuments/Get.hs | 185 + .../DFAReporting/OrderDocuments/List.hs | 292 + .../Resource/DFAReporting/Orders/Get.hs | 178 + .../Resource/DFAReporting/Orders/List.hs | 256 + .../DFAReporting/PlacementGroups/Get.hs | 173 + .../DFAReporting/PlacementGroups/Insert.hs | 159 + .../DFAReporting/PlacementGroups/List.hs | 427 + .../DFAReporting/PlacementGroups/Patch.hs | 173 + .../DFAReporting/PlacementGroups/Update.hs | 159 + .../PlacementStrategies/Delete.hs | 172 + .../DFAReporting/PlacementStrategies/Get.hs | 171 + .../PlacementStrategies/Insert.hs | 162 + .../DFAReporting/PlacementStrategies/List.hs | 241 + .../DFAReporting/PlacementStrategies/Patch.hs | 175 + .../PlacementStrategies/Update.hs | 162 + .../DFAReporting/Placements/Generatetags.hs | 195 + .../Resource/DFAReporting/Placements/Get.hs | 169 + .../DFAReporting/Placements/Insert.hs | 156 + .../Resource/DFAReporting/Placements/List.hs | 457 + .../Resource/DFAReporting/Placements/Patch.hs | 170 + .../DFAReporting/Placements/Update.hs | 156 + .../DFAReporting/PlatformTypes/Get.hs | 171 + .../DFAReporting/PlatformTypes/List.hs | 161 + .../Resource/DFAReporting/PostalCodes/Get.hs | 170 + .../Resource/DFAReporting/PostalCodes/List.hs | 158 + .../Resource/DFAReporting/Projects/Get.hs | 170 + .../Resource/DFAReporting/Projects/List.hs | 250 + .../Resource/DFAReporting/Regions/List.hs | 151 + .../DFAReporting/RemarketingListShares/Get.hs | 178 + .../RemarketingListShares/Patch.hs | 180 + .../RemarketingListShares/Update.hs | 164 + .../DFAReporting/RemarketingLists/Get.hs | 171 + .../DFAReporting/RemarketingLists/Insert.hs | 159 + .../DFAReporting/RemarketingLists/List.hs | 267 + .../DFAReporting/RemarketingLists/Patch.hs | 174 + .../DFAReporting/RemarketingLists/Update.hs | 159 + .../Reports/CompatibleFields/Query.hs | 169 + .../Resource/DFAReporting/Reports/Delete.hs | 167 + .../DFAReporting/Reports/Files/Get.hs | 184 + .../DFAReporting/Reports/Files/List.hs | 222 + .../Resource/DFAReporting/Reports/Get.hs | 166 + .../Resource/DFAReporting/Reports/Insert.hs | 154 + .../Resource/DFAReporting/Reports/List.hs | 213 + .../Resource/DFAReporting/Reports/Patch.hs | 167 + .../Resource/DFAReporting/Reports/Run.hs | 180 + .../Resource/DFAReporting/Reports/Update.hs | 167 + .../Google/Resource/DFAReporting/Sites/Get.hs | 164 + .../Resource/DFAReporting/Sites/Insert.hs | 153 + .../Resource/DFAReporting/Sites/List.hs | 351 + .../Resource/DFAReporting/Sites/Patch.hs | 165 + .../Resource/DFAReporting/Sites/Update.hs | 153 + .../Google/Resource/DFAReporting/Sizes/Get.hs | 167 + .../Resource/DFAReporting/Sizes/Insert.hs | 151 + .../Resource/DFAReporting/Sizes/List.hs | 204 + .../Resource/DFAReporting/Subaccounts/Get.hs | 172 + .../DFAReporting/Subaccounts/Insert.hs | 159 + .../Resource/DFAReporting/Subaccounts/List.hs | 234 + .../DFAReporting/Subaccounts/Patch.hs | 171 + .../DFAReporting/Subaccounts/Update.hs | 159 + .../TargetableRemarketingLists/Get.hs | 177 + .../TargetableRemarketingLists/List.hs | 262 + .../Resource/DFAReporting/UserProfiles/Get.hs | 157 + .../DFAReporting/UserProfiles/List.hs | 144 + .../UserRolePermissionGroups/Get.hs | 176 + .../UserRolePermissionGroups/List.hs | 164 + .../DFAReporting/UserRolePermissions/Get.hs | 171 + .../DFAReporting/UserRolePermissions/List.hs | 174 + .../Resource/DFAReporting/UserRoles/Delete.hs | 170 + .../Resource/DFAReporting/UserRoles/Get.hs | 169 + .../Resource/DFAReporting/UserRoles/Insert.hs | 158 + .../Resource/DFAReporting/UserRoles/List.hs | 264 + .../Resource/DFAReporting/UserRoles/Patch.hs | 165 + .../Resource/DFAReporting/UserRoles/Update.hs | 158 + gogol-dfareporting/gogol-dfareporting.cabal | 235 + gogol-dfareporting/src/.gitkeep | 0 gogol-discovery/LICENSE | 373 + gogol-discovery/Makefile | 1 + gogol-discovery/README.md | 28 + gogol-discovery/Setup.hs | 2 + .../gen/Network/Google/Discovery.hs | 140 + .../gen/Network/Google/Discovery/Types.hs | 119 + .../Network/Google/Discovery/Types/Product.hs | 944 + .../gen/Network/Google/Discovery/Types/Sum.hs | 18 + .../Google/Resource/Discovery/APIs/GetRest.hs | 167 + .../Google/Resource/Discovery/APIs/List.hs | 162 + gogol-discovery/gogol-discovery.cabal | 45 + gogol-discovery/src/.gitkeep | 0 gogol-dns/LICENSE | 373 + gogol-dns/Makefile | 1 + gogol-dns/README.md | 28 + gogol-dns/Setup.hs | 2 + gogol-dns/gen/Network/Google/DNS.hs | 152 + gogol-dns/gen/Network/Google/DNS/Types.hs | 101 + .../gen/Network/Google/DNS/Types/Product.hs | 716 + gogol-dns/gen/Network/Google/DNS/Types/Sum.hs | 18 + .../Google/Resource/DNS/Changes/Create.hs | 168 + .../Google/Resource/DNS/Changes/Get.hs | 181 + .../Google/Resource/DNS/Changes/List.hs | 217 + .../Resource/DNS/ManagedZones/Create.hs | 158 + .../Resource/DNS/ManagedZones/Delete.hs | 173 + .../Google/Resource/DNS/ManagedZones/Get.hs | 172 + .../Google/Resource/DNS/ManagedZones/List.hs | 198 + .../Google/Resource/DNS/Projects/Get.hs | 150 + .../Resource/DNS/ResourceRecordSets/List.hs | 229 + gogol-dns/gogol-dns.cabal | 52 + gogol-dns/src/.gitkeep | 0 gogol-doubleclick-bids/LICENSE | 373 + gogol-doubleclick-bids/Makefile | 1 + gogol-doubleclick-bids/README.md | 28 + gogol-doubleclick-bids/Setup.hs | 2 + .../gen/Network/Google/DoubleClickBids.hs | 219 + .../Network/Google/DoubleClickBids/Types.hs | 174 + .../Google/DoubleClickBids/Types/Product.hs | 1309 ++ .../Google/DoubleClickBids/Types/Sum.hs | 18 + .../Lineitems/Downloadlineitems.hs | 145 + .../Lineitems/Uploadlineitems.hs | 145 + .../Queries/Createquery.hs | 141 + .../Queries/Deletequery.hs | 154 + .../Doubleclickbidmanager/Queries/Getquery.hs | 153 + .../Queries/Listqueries.hs | 141 + .../Doubleclickbidmanager/Queries/Runquery.hs | 152 + .../Reports/Listreports.hs | 155 + .../gogol-doubleclick-bids.cabal | 50 + gogol-doubleclick-bids/src/.gitkeep | 0 gogol-doubleclick-search/LICENSE | 373 + gogol-doubleclick-search/Makefile | 1 + gogol-doubleclick-search/README.md | 28 + gogol-doubleclick-search/Setup.hs | 2 + .../gen/Network/Google/DoubleClickSearch.hs | 220 + .../Network/Google/DoubleClickSearch/Types.hs | 166 + .../Google/DoubleClickSearch/Types/Product.hs | 1408 ++ .../Google/DoubleClickSearch/Types/Sum.hs | 18 + .../DoubleClickSearch/Conversion/Get.hs | 290 + .../DoubleClickSearch/Conversion/Insert.hs | 142 + .../DoubleClickSearch/Conversion/Patch.hs | 241 + .../DoubleClickSearch/Conversion/Update.hs | 142 + .../Conversion/UpdateAvailability.hs | 151 + .../DoubleClickSearch/Reports/Generate.hs | 140 + .../Resource/DoubleClickSearch/Reports/Get.hs | 153 + .../DoubleClickSearch/Reports/GetFile.hs | 173 + .../DoubleClickSearch/Reports/Request.hs | 141 + .../DoubleClickSearch/SavedColumns/List.hs | 175 + .../gogol-doubleclick-search.cabal | 53 + gogol-doubleclick-search/src/.gitkeep | 0 gogol-drive/LICENSE | 373 + gogol-drive/Makefile | 1 + gogol-drive/README.md | 28 + gogol-drive/Setup.hs | 2 + gogol-drive/gen/Network/Google/Drive.hs | 645 + gogol-drive/gen/Network/Google/Drive/Types.hs | 383 + .../gen/Network/Google/Drive/Types/Product.hs | 3618 +++ .../gen/Network/Google/Drive/Types/Sum.hs | 18 + .../Google/Resource/Drive/About/Get.hs | 184 + .../Network/Google/Resource/Drive/Apps/Get.hs | 149 + .../Google/Resource/Drive/Apps/List.hs | 187 + .../Google/Resource/Drive/Changes/Get.hs | 152 + .../Google/Resource/Drive/Changes/List.hs | 217 + .../Google/Resource/Drive/Changes/Watch.hs | 219 + .../Google/Resource/Drive/Channels/Stop.hs | 139 + .../Google/Resource/Drive/Children/Delete.hs | 168 + .../Google/Resource/Drive/Children/Get.hs | 169 + .../Google/Resource/Drive/Children/Insert.hs | 155 + .../Google/Resource/Drive/Children/List.hs | 206 + .../Google/Resource/Drive/Comments/Delete.hs | 170 + .../Google/Resource/Drive/Comments/Get.hs | 183 + .../Google/Resource/Drive/Comments/Insert.hs | 157 + .../Google/Resource/Drive/Comments/List.hs | 213 + .../Google/Resource/Drive/Comments/Patch.hs | 165 + .../Google/Resource/Drive/Comments/Update.hs | 166 + .../Google/Resource/Drive/Files/Copy.hs | 240 + .../Google/Resource/Drive/Files/Delete.hs | 151 + .../Google/Resource/Drive/Files/EmptyTrash.hs | 143 + .../Resource/Drive/Files/GenerateIds.hs | 172 + .../Google/Resource/Drive/Files/Get.hs | 204 + .../Google/Resource/Drive/Files/Insert.hs | 240 + .../Google/Resource/Drive/Files/List.hs | 227 + .../Google/Resource/Drive/Files/Patch.hs | 326 + .../Google/Resource/Drive/Files/Touch.hs | 149 + .../Google/Resource/Drive/Files/Trash.hs | 152 + .../Google/Resource/Drive/Files/Untrash.hs | 152 + .../Google/Resource/Drive/Files/Update.hs | 330 + .../Google/Resource/Drive/Files/Watch.hs | 205 + .../Google/Resource/Drive/Parents/Delete.hs | 165 + .../Google/Resource/Drive/Parents/Get.hs | 165 + .../Google/Resource/Drive/Parents/Insert.hs | 152 + .../Google/Resource/Drive/Parents/List.hs | 151 + .../Resource/Drive/Permissions/Delete.hs | 172 + .../Google/Resource/Drive/Permissions/Get.hs | 171 + .../Drive/Permissions/GetIdForEmail.hs | 160 + .../Resource/Drive/Permissions/Insert.hs | 186 + .../Google/Resource/Drive/Permissions/List.hs | 157 + .../Resource/Drive/Permissions/Patch.hs | 183 + .../Resource/Drive/Permissions/Update.hs | 183 + .../Resource/Drive/Properties/Delete.hs | 186 + .../Google/Resource/Drive/Properties/Get.hs | 184 + .../Resource/Drive/Properties/Insert.hs | 158 + .../Google/Resource/Drive/Properties/List.hs | 159 + .../Google/Resource/Drive/Properties/Patch.hs | 186 + .../Resource/Drive/Properties/Update.hs | 186 + .../Google/Resource/Drive/Realtime/Get.hs | 167 + .../Google/Resource/Drive/Realtime/Update.hs | 177 + .../Google/Resource/Drive/Replies/Delete.hs | 179 + .../Google/Resource/Drive/Replies/Get.hs | 192 + .../Google/Resource/Drive/Replies/Insert.hs | 166 + .../Google/Resource/Drive/Replies/List.hs | 207 + .../Google/Resource/Drive/Replies/Patch.hs | 179 + .../Google/Resource/Drive/Replies/Update.hs | 179 + .../Google/Resource/Drive/Revisions/Delete.hs | 171 + .../Google/Resource/Drive/Revisions/Get.hs | 170 + .../Google/Resource/Drive/Revisions/List.hs | 156 + .../Google/Resource/Drive/Revisions/Patch.hs | 171 + .../Google/Resource/Drive/Revisions/Update.hs | 171 + gogol-drive/gogol-drive.cabal | 102 + gogol-drive/src/.gitkeep | 0 gogol-fitness/LICENSE | 373 + gogol-fitness/Makefile | 1 + gogol-fitness/README.md | 28 + gogol-fitness/Setup.hs | 2 + gogol-fitness/gen/Network/Google/Fitness.hs | 248 + .../gen/Network/Google/Fitness/Types.hs | 184 + .../Network/Google/Fitness/Types/Product.hs | 1513 ++ .../gen/Network/Google/Fitness/Types/Sum.hs | 18 + .../Fitness/Users/DataSources/Create.hs | 174 + .../Users/DataSources/Datasets/Delete.hs | 233 + .../Fitness/Users/DataSources/Datasets/Get.hs | 232 + .../Users/DataSources/Datasets/Patch.hs | 216 + .../Fitness/Users/DataSources/Delete.hs | 175 + .../Resource/Fitness/Users/DataSources/Get.hs | 174 + .../Fitness/Users/DataSources/List.hs | 183 + .../Fitness/Users/DataSources/Patch.hs | 185 + .../Fitness/Users/DataSources/Update.hs | 182 + .../Fitness/Users/Dataset/Aggregate.hs | 165 + .../Resource/Fitness/Users/Sessions/Delete.hs | 186 + .../Resource/Fitness/Users/Sessions/List.hs | 215 + .../Resource/Fitness/Users/Sessions/Update.hs | 186 + gogol-fitness/gogol-fitness.cabal | 55 + gogol-fitness/src/.gitkeep | 0 gogol-fonts/LICENSE | 373 + gogol-fonts/Makefile | 1 + gogol-fonts/README.md | 28 + gogol-fonts/Setup.hs | 2 + gogol-fonts/gen/Network/Google/Fonts.hs | 64 + gogol-fonts/gen/Network/Google/Fonts/Types.hs | 48 + .../gen/Network/Google/Fonts/Types/Product.hs | 182 + .../gen/Network/Google/Fonts/Types/Sum.hs | 18 + .../Google/Resource/Webfonts/Webfonts/List.hs | 152 + gogol-fonts/gogol-fonts.cabal | 43 + gogol-fonts/src/.gitkeep | 0 gogol-freebasesearch/LICENSE | 373 + gogol-freebasesearch/Makefile | 1 + gogol-freebasesearch/README.md | 28 + gogol-freebasesearch/Setup.hs | 2 + .../gen/Network/Google/FreebaseSearch.hs | 68 + .../Network/Google/FreebaseSearch/Types.hs | 47 + .../Google/FreebaseSearch/Types/Product.hs | 174 + .../Google/FreebaseSearch/Types/Sum.hs | 18 + .../Google/Method/Freebase/Reconcile.hs | 204 + .../Network/Google/Method/Freebase/Search.hs | 396 + .../gogol-freebasesearch.cabal | 44 + gogol-freebasesearch/src/.gitkeep | 0 gogol-fusiontables/LICENSE | 373 + gogol-fusiontables/Makefile | 1 + gogol-fusiontables/README.md | 28 + gogol-fusiontables/Setup.hs | 2 + .../gen/Network/Google/FusionTables.hs | 361 + .../gen/Network/Google/FusionTables/Types.hs | 215 + .../Google/FusionTables/Types/Product.hs | 1767 ++ .../Network/Google/FusionTables/Types/Sum.hs | 18 + .../Resource/FusionTables/Column/Delete.hs | 166 + .../Resource/FusionTables/Column/Get.hs | 165 + .../Resource/FusionTables/Column/Insert.hs | 153 + .../Resource/FusionTables/Column/List.hs | 177 + .../Resource/FusionTables/Column/Patch.hs | 167 + .../Resource/FusionTables/Column/Update.hs | 166 + .../Google/Resource/FusionTables/Query/Sql.hs | 176 + .../Resource/FusionTables/Query/SqlGet.hs | 176 + .../Resource/FusionTables/Style/Delete.hs | 165 + .../Google/Resource/FusionTables/Style/Get.hs | 165 + .../Resource/FusionTables/Style/Insert.hs | 152 + .../Resource/FusionTables/Style/List.hs | 177 + .../Resource/FusionTables/Style/Patch.hs | 165 + .../Resource/FusionTables/Style/Update.hs | 165 + .../Resource/FusionTables/Table/Copy.hs | 166 + .../Resource/FusionTables/Table/Delete.hs | 156 + .../Google/Resource/FusionTables/Table/Get.hs | 154 + .../Resource/FusionTables/Table/ImportRows.hs | 226 + .../FusionTables/Table/ImportTable.hs | 183 + .../Resource/FusionTables/Table/Insert.hs | 140 + .../Resource/FusionTables/Table/List.hs | 167 + .../Resource/FusionTables/Table/Patch.hs | 175 + .../FusionTables/Table/ReplaceRows.hs | 230 + .../Resource/FusionTables/Table/Update.hs | 173 + .../Resource/FusionTables/Task/Delete.hs | 165 + .../Google/Resource/FusionTables/Task/Get.hs | 163 + .../Google/Resource/FusionTables/Task/List.hs | 189 + .../Resource/FusionTables/Template/Delete.hs | 172 + .../Resource/FusionTables/Template/Get.hs | 170 + .../Resource/FusionTables/Template/Insert.hs | 154 + .../Resource/FusionTables/Template/List.hs | 176 + .../Resource/FusionTables/Template/Patch.hs | 167 + .../Resource/FusionTables/Template/Update.hs | 168 + gogol-fusiontables/gogol-fusiontables.cabal | 75 + gogol-fusiontables/src/.gitkeep | 0 gogol-games-appstate/LICENSE | 373 + gogol-games-appstate/Makefile | 1 + gogol-games-appstate/README.md | 28 + gogol-games-appstate/Setup.hs | 2 + .../gen/Network/Google/GamesAppState.hs | 90 + .../gen/Network/Google/GamesAppState/Types.hs | 58 + .../Google/GamesAppState/Types/Product.hs | 256 + .../Network/Google/GamesAppState/Types/Sum.hs | 18 + .../Google/Resource/Appstate/States/Clear.hs | 172 + .../Google/Resource/Appstate/States/Delete.hs | 161 + .../Google/Resource/Appstate/States/Get.hs | 154 + .../Google/Resource/Appstate/States/List.hs | 154 + .../Google/Resource/Appstate/States/Update.hs | 175 + .../gogol-games-appstate.cabal | 47 + gogol-games-appstate/src/.gitkeep | 0 gogol-games-configuration/LICENSE | 373 + gogol-games-configuration/Makefile | 1 + gogol-games-configuration/README.md | 28 + gogol-games-configuration/Setup.hs | 2 + .../gen/Network/Google/GamesConfiguration.hs | 192 + .../Google/GamesConfiguration/Types.hs | 126 + .../GamesConfiguration/Types/Product.hs | 908 + .../Google/GamesConfiguration/Types/Sum.hs | 18 + .../AchievementConfigurations/Delete.hs | 162 + .../AchievementConfigurations/Get.hs | 165 + .../AchievementConfigurations/Insert.hs | 165 + .../AchievementConfigurations/List.hs | 192 + .../AchievementConfigurations/Patch.hs | 166 + .../AchievementConfigurations/Update.hs | 164 + .../ImageConfigurations/Upload.hs | 177 + .../LeaderboardConfigurations/Delete.hs | 162 + .../LeaderboardConfigurations/Get.hs | 165 + .../LeaderboardConfigurations/Insert.hs | 165 + .../LeaderboardConfigurations/List.hs | 192 + .../LeaderboardConfigurations/Patch.hs | 166 + .../LeaderboardConfigurations/Update.hs | 164 + .../gogol-games-configuration.cabal | 55 + gogol-games-configuration/src/.gitkeep | 0 gogol-games-management/LICENSE | 373 + gogol-games-management/Makefile | 1 + gogol-games-management/README.md | 28 + gogol-games-management/Setup.hs | 2 + .../gen/Network/Google/GamesManagement.hs | 253 + .../Network/Google/GamesManagement/Types.hs | 128 + .../Google/GamesManagement/Types/Product.hs | 920 + .../Google/GamesManagement/Types/Sum.hs | 18 + .../GamesManagement/Achievements/Reset.hs | 161 + .../GamesManagement/Achievements/ResetAll.hs | 150 + .../Achievements/ResetAllForAllPlayers.hs | 154 + .../Achievements/ResetForAllPlayers.hs | 168 + .../ResetMultipleForAllPlayers.hs | 157 + .../Applications/ListHidden.hs | 191 + .../Resource/GamesManagement/Events/Reset.hs | 157 + .../GamesManagement/Events/ResetAll.hs | 147 + .../Events/ResetAllForAllPlayers.hs | 155 + .../Events/ResetForAllPlayers.hs | 165 + .../Events/ResetMultipleForAllPlayers.hs | 156 + .../Resource/GamesManagement/Players/Hide.hs | 173 + .../GamesManagement/Players/Unhide.hs | 174 + .../Resource/GamesManagement/Quests/Reset.hs | 155 + .../GamesManagement/Quests/ResetAll.hs | 147 + .../Quests/ResetAllForAllPlayers.hs | 153 + .../Quests/ResetForAllPlayers.hs | 165 + .../Quests/ResetMultipleForAllPlayers.hs | 156 + .../Resource/GamesManagement/Rooms/Reset.hs | 142 + .../Rooms/ResetForAllPlayers.hs | 150 + .../Resource/GamesManagement/Scores/Reset.hs | 159 + .../GamesManagement/Scores/ResetAll.hs | 148 + .../Scores/ResetAllForAllPlayers.hs | 153 + .../Scores/ResetForAllPlayers.hs | 166 + .../Scores/ResetMultipleForAllPlayers.hs | 156 + .../GamesManagement/TurnBasedMatches/Reset.hs | 148 + .../TurnBasedMatches/ResetForAllPlayers.hs | 159 + .../gogol-games-management.cabal | 69 + gogol-games-management/src/.gitkeep | 0 gogol-games/LICENSE | 373 + gogol-games/Makefile | 1 + gogol-games/README.md | 28 + gogol-games/Setup.hs | 2 + gogol-games/gen/Network/Google/Games.hs | 1114 + gogol-games/gen/Network/Google/Games/Types.hs | 881 + .../gen/Network/Google/Games/Types/Product.hs | 8255 +++++++ .../gen/Network/Google/Games/Types/Sum.hs | 18 + .../Games/AchievementDefinitions/List.hs | 186 + .../Resource/Games/Achievements/Increment.hs | 189 + .../Resource/Games/Achievements/List.hs | 210 + .../Resource/Games/Achievements/Reveal.hs | 160 + .../Games/Achievements/SetStepsAtLeast.hs | 184 + .../Resource/Games/Achievements/Unlock.hs | 158 + .../Games/Achievements/UpdateMultiple.hs | 148 + .../Google/Resource/Games/Applications/Get.hs | 184 + .../Resource/Games/Applications/Played.hs | 143 + .../Resource/Games/Events/ListByPlayer.hs | 189 + .../Resource/Games/Events/ListDefinitions.hs | 185 + .../Google/Resource/Games/Events/Record.hs | 154 + .../Google/Resource/Games/Leaderboards/Get.hs | 167 + .../Resource/Games/Leaderboards/List.hs | 180 + .../Games/Metagame/GetMetagameConfig.hs | 147 + .../Games/Metagame/ListCategoriesByPlayer.hs | 223 + .../Google/Resource/Games/Players/Get.hs | 166 + .../Google/Resource/Games/Players/List.hs | 193 + .../Resource/Games/Pushtokens/Remove.hs | 143 + .../Resource/Games/Pushtokens/Update.hs | 141 + .../Resource/Games/QuestMilestones/Claim.hs | 193 + .../Google/Resource/Games/Quests/Accept.hs | 167 + .../Google/Resource/Games/Quests/List.hs | 195 + .../Google/Resource/Games/Revisions/Check.hs | 160 + .../Google/Resource/Games/Rooms/Create.hs | 153 + .../Google/Resource/Games/Rooms/Decline.hs | 166 + .../Google/Resource/Games/Rooms/Dismiss.hs | 157 + .../Google/Resource/Games/Rooms/Get.hs | 162 + .../Google/Resource/Games/Rooms/Join.hs | 165 + .../Google/Resource/Games/Rooms/Leave.hs | 169 + .../Google/Resource/Games/Rooms/List.hs | 176 + .../Resource/Games/Rooms/ReportStatus.hs | 174 + .../Google/Resource/Games/Scores/Get.hs | 249 + .../Google/Resource/Games/Scores/List.hs | 217 + .../Resource/Games/Scores/ListWindow.hs | 259 + .../Google/Resource/Games/Scores/Submit.hs | 202 + .../Resource/Games/Scores/SubmitMultiple.hs | 159 + .../Google/Resource/Games/Snapshots/Get.hs | 164 + .../Google/Resource/Games/Snapshots/List.hs | 195 + .../Resource/Games/TurnBasedMatches/Cancel.hs | 159 + .../Resource/Games/TurnBasedMatches/Create.hs | 160 + .../Games/TurnBasedMatches/Decline.hs | 173 + .../Games/TurnBasedMatches/Dismiss.hs | 154 + .../Resource/Games/TurnBasedMatches/Finish.hs | 177 + .../Resource/Games/TurnBasedMatches/Get.hs | 185 + .../Resource/Games/TurnBasedMatches/Join.hs | 173 + .../Resource/Games/TurnBasedMatches/Leave.hs | 173 + .../Games/TurnBasedMatches/LeaveTurn.hs | 207 + .../Resource/Games/TurnBasedMatches/List.hs | 220 + .../Games/TurnBasedMatches/Rematch.hs | 195 + .../Resource/Games/TurnBasedMatches/Sync.hs | 227 + .../Games/TurnBasedMatches/TakeTurn.hs | 175 + gogol-games/gogol-games.cabal | 94 + gogol-games/src/.gitkeep | 0 gogol-genomics/LICENSE | 373 + gogol-genomics/Makefile | 1 + gogol-genomics/README.md | 28 + gogol-genomics/Setup.hs | 2 + gogol-genomics/gen/Network/Google/Genomics.hs | 914 + .../gen/Network/Google/Genomics/Types.hs | 652 + .../Network/Google/Genomics/Types/Product.hs | 6004 +++++ .../gen/Network/Google/Genomics/Types/Sum.hs | 18 + .../Genomics/AnnotationSets/Create.hs | 146 + .../Genomics/AnnotationSets/Delete.hs | 162 + .../Resource/Genomics/AnnotationSets/Get.hs | 163 + .../Resource/Genomics/AnnotationSets/Patch.hs | 167 + .../Genomics/AnnotationSets/Search.hs | 150 + .../Genomics/AnnotationSets/Update.hs | 165 + .../Genomics/Annotations/BatchCreate.hs | 160 + .../Resource/Genomics/Annotations/Create.hs | 143 + .../Resource/Genomics/Annotations/Delete.hs | 157 + .../Resource/Genomics/Annotations/Get.hs | 156 + .../Resource/Genomics/Annotations/Patch.hs | 162 + .../Resource/Genomics/Annotations/Search.hs | 149 + .../Resource/Genomics/Annotations/Update.hs | 159 + .../Resource/Genomics/Callsets/Create.hs | 140 + .../Resource/Genomics/Callsets/Delete.hs | 153 + .../Google/Resource/Genomics/Callsets/Get.hs | 151 + .../Resource/Genomics/Callsets/Patch.hs | 152 + .../Resource/Genomics/Callsets/Search.hs | 143 + .../Resource/Genomics/Callsets/Update.hs | 153 + .../Resource/Genomics/Datasets/Create.hs | 140 + .../Resource/Genomics/Datasets/Delete.hs | 153 + .../Google/Resource/Genomics/Datasets/Get.hs | 151 + .../Google/Resource/Genomics/Datasets/List.hs | 181 + .../Resource/Genomics/Datasets/Patch.hs | 152 + .../Resource/Genomics/Datasets/Undelete.hs | 159 + .../Resource/Genomics/Datasets/Update.hs | 152 + .../Genomics/Experimental/Jobs/Create.hs | 150 + .../Google/Resource/Genomics/Jobs/Cancel.hs | 152 + .../Google/Resource/Genomics/Jobs/Get.hs | 149 + .../Google/Resource/Genomics/Jobs/Search.hs | 138 + .../Resource/Genomics/Readgroupsets/Align.hs | 147 + .../Resource/Genomics/Readgroupsets/Call.hs | 147 + .../Readgroupsets/Coveragebuckets/List.hs | 263 + .../Resource/Genomics/Readgroupsets/Delete.hs | 157 + .../Resource/Genomics/Readgroupsets/Export.hs | 149 + .../Resource/Genomics/Readgroupsets/Get.hs | 160 + .../Resource/Genomics/Readgroupsets/Import.hs | 157 + .../Resource/Genomics/Readgroupsets/Patch.hs | 158 + .../Resource/Genomics/Readgroupsets/Search.hs | 144 + .../Resource/Genomics/Readgroupsets/Update.hs | 158 + .../Google/Resource/Genomics/Reads/Search.hs | 159 + .../Genomics/References/Bases/List.hs | 212 + .../Resource/Genomics/References/Get.hs | 154 + .../Resource/Genomics/References/Search.hs | 144 + .../Resource/Genomics/Referencesets/Get.hs | 160 + .../Resource/Genomics/Referencesets/Search.hs | 148 + .../Resource/Genomics/Variants/Create.hs | 140 + .../Resource/Genomics/Variants/Delete.hs | 153 + .../Google/Resource/Genomics/Variants/Get.hs | 151 + .../Resource/Genomics/Variants/Search.hs | 143 + .../Resource/Genomics/Variants/Update.hs | 155 + .../Resource/Genomics/Variantsets/Create.hs | 146 + .../Resource/Genomics/Variantsets/Delete.hs | 161 + .../Resource/Genomics/Variantsets/Export.hs | 159 + .../Resource/Genomics/Variantsets/Get.hs | 158 + .../Genomics/Variantsets/ImportVariants.hs | 179 + .../Genomics/Variantsets/MergeVariants.hs | 171 + .../Resource/Genomics/Variantsets/Patch.hs | 159 + .../Resource/Genomics/Variantsets/Search.hs | 148 + .../Resource/Genomics/Variantsets/Update.hs | 161 + gogol-genomics/gogol-genomics.cabal | 102 + gogol-genomics/src/.gitkeep | 0 gogol-gmail/LICENSE | 373 + gogol-gmail/Makefile | 1 + gogol-gmail/README.md | 28 + gogol-gmail/Setup.hs | 2 + gogol-gmail/gen/Network/Google/Gmail.hs | 331 + gogol-gmail/gen/Network/Google/Gmail/Types.hs | 191 + .../gen/Network/Google/Gmail/Types/Product.hs | 1446 ++ .../gen/Network/Google/Gmail/Types/Sum.hs | 18 + .../Resource/Gmail/Users/Drafts/Create.hs | 159 + .../Resource/Gmail/Users/Drafts/Delete.hs | 172 + .../Google/Resource/Gmail/Users/Drafts/Get.hs | 182 + .../Resource/Gmail/Users/Drafts/List.hs | 184 + .../Resource/Gmail/Users/Drafts/Send.hs | 160 + .../Resource/Gmail/Users/Drafts/Update.hs | 170 + .../Google/Resource/Gmail/Users/GetProfile.hs | 158 + .../Resource/Gmail/Users/History/List.hs | 222 + .../Resource/Gmail/Users/Labels/Create.hs | 159 + .../Resource/Gmail/Users/Labels/Delete.hs | 172 + .../Google/Resource/Gmail/Users/Labels/Get.hs | 169 + .../Resource/Gmail/Users/Labels/List.hs | 158 + .../Resource/Gmail/Users/Labels/Patch.hs | 170 + .../Resource/Gmail/Users/Labels/Update.hs | 170 + .../Gmail/Users/Messages/Attachments/Get.hs | 189 + .../Resource/Gmail/Users/Messages/Delete.hs | 172 + .../Resource/Gmail/Users/Messages/Get.hs | 197 + .../Resource/Gmail/Users/Messages/Import.hs | 213 + .../Resource/Gmail/Users/Messages/Insert.hs | 191 + .../Resource/Gmail/Users/Messages/List.hs | 223 + .../Resource/Gmail/Users/Messages/Modify.hs | 171 + .../Resource/Gmail/Users/Messages/Send.hs | 161 + .../Resource/Gmail/Users/Messages/Trash.hs | 171 + .../Resource/Gmail/Users/Messages/Untrash.hs | 172 + .../Google/Resource/Gmail/Users/Stop.hs | 150 + .../Resource/Gmail/Users/Threads/Delete.hs | 172 + .../Resource/Gmail/Users/Threads/Get.hs | 196 + .../Resource/Gmail/Users/Threads/List.hs | 223 + .../Resource/Gmail/Users/Threads/Modify.hs | 173 + .../Resource/Gmail/Users/Threads/Trash.hs | 171 + .../Resource/Gmail/Users/Threads/Untrash.hs | 171 + .../Google/Resource/Gmail/Users/Watch.hs | 151 + gogol-gmail/gogol-gmail.cabal | 74 + gogol-gmail/src/.gitkeep | 0 gogol-groups-migration/LICENSE | 373 + gogol-groups-migration/Makefile | 1 + gogol-groups-migration/README.md | 28 + gogol-groups-migration/Setup.hs | 2 + .../gen/Network/Google/GroupsMigration.hs | 52 + .../Network/Google/GroupsMigration/Types.hs | 36 + .../Google/GroupsMigration/Types/Product.hs | 67 + .../Google/GroupsMigration/Types/Sum.hs | 18 + .../gen/Network/Google/GroupsSettings.hs | 86 + .../Network/Google/GroupsSettings/Types.hs | 62 + .../Google/GroupsSettings/Types/Product.hs | 394 + .../Google/GroupsSettings/Types/Sum.hs | 18 + .../GroupsMigration/Archive/Insert.hs | 152 + .../Resource/GroupsSettings/Groups/Get.hs | 151 + .../Resource/GroupsSettings/Groups/Patch.hs | 151 + .../Resource/GroupsSettings/Groups/Update.hs | 152 + .../gogol-groups-migration.cabal | 45 + gogol-groups-migration/src/.gitkeep | 0 gogol-identity-toolkit/LICENSE | 373 + gogol-identity-toolkit/Makefile | 1 + gogol-identity-toolkit/README.md | 28 + gogol-identity-toolkit/Setup.hs | 2 + .../gen/Network/Google/IdentityToolkit.hs | 317 + .../Network/Google/IdentityToolkit/Types.hs | 257 + .../Google/IdentityToolkit/Types/Product.hs | 2261 ++ .../Google/IdentityToolkit/Types/Sum.hs | 18 + .../Relyingparty/CreateAuthURI.hs | 148 + .../Relyingparty/DeleteAccount.hs | 146 + .../Relyingparty/DownloadAccount.hs | 147 + .../Relyingparty/GetAccountInfo.hs | 149 + .../Relyingparty/GetOobConfirmationCode.hs | 151 + .../Relyingparty/GetPublicKeys.hs | 150 + .../Relyingparty/GetRecaptchaParam.hs | 150 + .../Relyingparty/ResetPassword.hs | 146 + .../Relyingparty/SetAccountInfo.hs | 149 + .../Relyingparty/UploadAccount.hs | 146 + .../Relyingparty/VerifyAssertion.hs | 147 + .../Relyingparty/VerifyPassword.hs | 147 + .../gogol-identity-toolkit.cabal | 54 + gogol-identity-toolkit/src/.gitkeep | 0 gogol-latencytest/LICENSE | 373 + gogol-latencytest/Makefile | 1 + gogol-latencytest/README.md | 28 + gogol-latencytest/Setup.hs | 2 + .../gen/Network/Google/LatencyTest.hs | 91 + .../gen/Network/Google/LatencyTest/Types.hs | 71 + .../Google/LatencyTest/Types/Product.hs | 310 + .../Network/Google/LatencyTest/Types/Sum.hs | 18 + .../Statscollection/Updateaggregatedstats.hs | 145 + .../Statscollection/Updatestats.hs | 142 + gogol-latencytest/gogol-latencytest.cabal | 44 + gogol-latencytest/src/.gitkeep | 0 gogol-logging/LICENSE | 373 + gogol-logging/Makefile | 1 + gogol-logging/README.md | 28 + gogol-logging/Setup.hs | 2 + gogol-logging/gen/Network/Google/Logging.hs | 296 + .../gen/Network/Google/Logging/Types.hs | 201 + .../Network/Google/Logging/Types/Product.hs | 1699 ++ .../gen/Network/Google/Logging/Types/Sum.hs | 18 + .../Projects/LogServices/Indexes/List.hs | 340 + .../Logging/Projects/LogServices/List.hs | 277 + .../Projects/LogServices/Sinks/Create.hs | 251 + .../Projects/LogServices/Sinks/Delete.hs | 264 + .../Logging/Projects/LogServices/Sinks/Get.hs | 261 + .../Projects/LogServices/Sinks/List.hs | 248 + .../Projects/LogServices/Sinks/Update.hs | 262 + .../Resource/Logging/Projects/Logs/Delete.hs | 243 + .../Logging/Projects/Logs/Entries/Write.hs | 258 + .../Resource/Logging/Projects/Logs/List.hs | 293 + .../Logging/Projects/Logs/Sinks/Create.hs | 247 + .../Logging/Projects/Logs/Sinks/Delete.hs | 259 + .../Logging/Projects/Logs/Sinks/Get.hs | 257 + .../Logging/Projects/Logs/Sinks/List.hs | 235 + .../Logging/Projects/Logs/Sinks/Update.hs | 257 + .../Resource/Logging/Projects/Sinks/Create.hs | 231 + .../Resource/Logging/Projects/Sinks/Delete.hs | 243 + .../Resource/Logging/Projects/Sinks/Get.hs | 241 + .../Resource/Logging/Projects/Sinks/List.hs | 228 + .../Resource/Logging/Projects/Sinks/Update.hs | 243 + gogol-logging/gogol-logging.cabal | 63 + gogol-logging/src/.gitkeep | 0 gogol-maps-coordinate/LICENSE | 373 + gogol-maps-coordinate/Makefile | 1 + gogol-maps-coordinate/README.md | 28 + gogol-maps-coordinate/Setup.hs | 2 + .../gen/Network/Google/MapsCoordinate.hs | 231 + .../Network/Google/MapsCoordinate/Types.hs | 168 + .../Google/MapsCoordinate/Types/Product.hs | 1215 + .../Google/MapsCoordinate/Types/Sum.hs | 18 + .../Coordinate/CustomFieldDef/List.hs | 162 + .../Google/Resource/Coordinate/Jobs/Get.hs | 162 + .../Google/Resource/Coordinate/Jobs/Insert.hs | 267 + .../Google/Resource/Coordinate/Jobs/List.hs | 202 + .../Google/Resource/Coordinate/Jobs/Patch.hs | 290 + .../Google/Resource/Coordinate/Jobs/Update.hs | 287 + .../Resource/Coordinate/Location/List.hs | 207 + .../Resource/Coordinate/Schedule/Get.hs | 164 + .../Resource/Coordinate/Schedule/Patch.hs | 216 + .../Resource/Coordinate/Schedule/Update.hs | 214 + .../Google/Resource/Coordinate/Team/List.hs | 174 + .../Google/Resource/Coordinate/Worker/List.hs | 151 + .../gogol-maps-coordinate.cabal | 54 + gogol-maps-coordinate/src/.gitkeep | 0 gogol-maps-engine/LICENSE | 373 + gogol-maps-engine/Makefile | 1 + gogol-maps-engine/README.md | 28 + gogol-maps-engine/Setup.hs | 2 + .../gen/Network/Google/MapEngine.hs | 928 + .../gen/Network/Google/MapEngine/Types.hs | 604 + .../Network/Google/MapEngine/Types/Product.hs | 5180 +++++ .../gen/Network/Google/MapEngine/Types/Sum.hs | 18 + .../Google/Resource/Mapsengine/Assets/Get.hs | 149 + .../Google/Resource/Mapsengine/Assets/List.hs | 313 + .../Mapsengine/Assets/Parents/List.hs | 186 + .../Mapsengine/Assets/Permissions/List.hs | 158 + .../Mapsengine/Layers/CancelProcessing.hs | 157 + .../Resource/Mapsengine/Layers/Create.hs | 151 + .../Resource/Mapsengine/Layers/Delete.hs | 153 + .../Google/Resource/Mapsengine/Layers/Get.hs | 165 + .../Mapsengine/Layers/GetPublished.hs | 157 + .../Google/Resource/Mapsengine/Layers/List.hs | 312 + .../Mapsengine/Layers/ListPublished.hs | 190 + .../Mapsengine/Layers/Parents/List.hs | 186 + .../Resource/Mapsengine/Layers/Patch.hs | 152 + .../Layers/Permissions/BatchDelete.hs | 163 + .../Layers/Permissions/BatchUpdate.hs | 167 + .../Mapsengine/Layers/Permissions/List.hs | 158 + .../Resource/Mapsengine/Layers/Process.hs | 152 + .../Resource/Mapsengine/Layers/Publish.hs | 172 + .../Resource/Mapsengine/Layers/Unpublish.hs | 153 + .../Google/Resource/Mapsengine/Maps/Create.hs | 137 + .../Google/Resource/Mapsengine/Maps/Delete.hs | 151 + .../Google/Resource/Mapsengine/Maps/Get.hs | 165 + .../Resource/Mapsengine/Maps/GetPublished.hs | 157 + .../Google/Resource/Mapsengine/Maps/List.hs | 311 + .../Resource/Mapsengine/Maps/ListPublished.hs | 190 + .../Google/Resource/Mapsengine/Maps/Patch.hs | 149 + .../Maps/Permissions/BatchDelete.hs | 163 + .../Maps/Permissions/BatchUpdate.hs | 167 + .../Mapsengine/Maps/Permissions/List.hs | 158 + .../Resource/Mapsengine/Maps/Publish.hs | 169 + .../Resource/Mapsengine/Maps/Unpublish.hs | 152 + .../Mapsengine/Projects/Icons/Create.hs | 158 + .../Resource/Mapsengine/Projects/Icons/Get.hs | 169 + .../Mapsengine/Projects/Icons/List.hs | 187 + .../Resource/Mapsengine/Projects/List.hs | 139 + .../RasterCollections/CancelProcessing.hs | 162 + .../Mapsengine/RasterCollections/Create.hs | 144 + .../Mapsengine/RasterCollections/Delete.hs | 159 + .../Mapsengine/RasterCollections/Get.hs | 156 + .../Mapsengine/RasterCollections/List.hs | 321 + .../RasterCollections/Parents/List.hs | 191 + .../Mapsengine/RasterCollections/Patch.hs | 158 + .../Permissions/BatchDelete.hs | 165 + .../Permissions/BatchUpdate.hs | 169 + .../RasterCollections/Permissions/List.hs | 162 + .../Mapsengine/RasterCollections/Process.hs | 158 + .../RasterCollections/Rasters/BatchDelete.hs | 170 + .../RasterCollections/Rasters/BatchInsert.hs | 172 + .../RasterCollections/Rasters/List.hs | 312 + .../Resource/Mapsengine/Rasters/Delete.hs | 152 + .../Mapsengine/Rasters/Files/Insert.hs | 170 + .../Google/Resource/Mapsengine/Rasters/Get.hs | 149 + .../Resource/Mapsengine/Rasters/List.hs | 313 + .../Mapsengine/Rasters/Parents/List.hs | 186 + .../Resource/Mapsengine/Rasters/Patch.hs | 153 + .../Rasters/Permissions/BatchDelete.hs | 164 + .../Rasters/Permissions/BatchUpdate.hs | 168 + .../Mapsengine/Rasters/Permissions/List.hs | 158 + .../Resource/Mapsengine/Rasters/Process.hs | 153 + .../Resource/Mapsengine/Rasters/Upload.hs | 139 + .../Resource/Mapsengine/Tables/Create.hs | 138 + .../Resource/Mapsengine/Tables/Delete.hs | 152 + .../Mapsengine/Tables/Features/BatchDelete.hs | 160 + .../Mapsengine/Tables/Features/BatchInsert.hs | 172 + .../Mapsengine/Tables/Features/BatchPatch.hs | 182 + .../Mapsengine/Tables/Features/Get.hs | 195 + .../Mapsengine/Tables/Features/List.hs | 274 + .../Mapsengine/Tables/Files/Insert.hs | 176 + .../Google/Resource/Mapsengine/Tables/Get.hs | 161 + .../Google/Resource/Mapsengine/Tables/List.hs | 312 + .../Mapsengine/Tables/Parents/List.hs | 186 + .../Resource/Mapsengine/Tables/Patch.hs | 152 + .../Tables/Permissions/BatchDelete.hs | 163 + .../Tables/Permissions/BatchUpdate.hs | 167 + .../Mapsengine/Tables/Permissions/List.hs | 158 + .../Resource/Mapsengine/Tables/Process.hs | 152 + .../Resource/Mapsengine/Tables/Upload.hs | 147 + gogol-maps-engine/gogol-maps-engine.cabal | 120 + gogol-maps-engine/src/.gitkeep | 0 gogol-mirror/LICENSE | 373 + gogol-mirror/Makefile | 1 + gogol-mirror/README.md | 28 + gogol-mirror/Setup.hs | 2 + gogol-mirror/gen/Network/Google/Mirror.hs | 323 + .../gen/Network/Google/Mirror/Types.hs | 211 + .../Network/Google/Mirror/Types/Product.hs | 1814 ++ .../gen/Network/Google/Mirror/Types/Sum.hs | 18 + .../Google/Resource/Mirror/Accounts/Insert.hs | 182 + .../Google/Resource/Mirror/Contacts/Delete.hs | 151 + .../Google/Resource/Mirror/Contacts/Get.hs | 150 + .../Google/Resource/Mirror/Contacts/Insert.hs | 140 + .../Google/Resource/Mirror/Contacts/List.hs | 139 + .../Google/Resource/Mirror/Contacts/Patch.hs | 151 + .../Google/Resource/Mirror/Contacts/Update.hs | 152 + .../Google/Resource/Mirror/Locations/Get.hs | 151 + .../Google/Resource/Mirror/Locations/List.hs | 139 + .../Google/Resource/Mirror/Settings/Get.hs | 154 + .../Resource/Mirror/Subscriptions/Delete.hs | 153 + .../Resource/Mirror/Subscriptions/Insert.hs | 141 + .../Resource/Mirror/Subscriptions/List.hs | 145 + .../Resource/Mirror/Subscriptions/Update.hs | 153 + .../Mirror/Timeline/Attachments/Delete.hs | 174 + .../Mirror/Timeline/Attachments/Get.hs | 173 + .../Mirror/Timeline/Attachments/Insert.hs | 160 + .../Mirror/Timeline/Attachments/List.hs | 160 + .../Google/Resource/Mirror/Timeline/Delete.hs | 151 + .../Google/Resource/Mirror/Timeline/Get.hs | 150 + .../Google/Resource/Mirror/Timeline/Insert.hs | 140 + .../Google/Resource/Mirror/Timeline/List.hs | 227 + .../Google/Resource/Mirror/Timeline/Patch.hs | 151 + .../Google/Resource/Mirror/Timeline/Update.hs | 152 + gogol-mirror/gogol-mirror.cabal | 66 + gogol-mirror/src/.gitkeep | 0 gogol-monitoring/LICENSE | 373 + gogol-monitoring/Makefile | 1 + gogol-monitoring/README.md | 28 + gogol-monitoring/Setup.hs | 2 + .../gen/Network/Google/Monitoring.hs | 207 + .../gen/Network/Google/Monitoring/Types.hs | 169 + .../Google/Monitoring/Types/Product.hs | 1238 + .../Network/Google/Monitoring/Types/Sum.hs | 18 + .../MetricDescriptors/Create.hs | 159 + .../MetricDescriptors/Delete.hs | 173 + .../Cloudmonitoring/MetricDescriptors/List.hs | 210 + .../Cloudmonitoring/Timeseries/List.hs | 293 + .../Cloudmonitoring/Timeseries/Write.hs | 167 + .../TimeseriesDescriptors/List.hs | 294 + gogol-monitoring/gogol-monitoring.cabal | 48 + gogol-monitoring/src/.gitkeep | 0 gogol-oauth2/LICENSE | 373 + gogol-oauth2/Makefile | 1 + gogol-oauth2/README.md | 28 + gogol-oauth2/Setup.hs | 2 + .../Method/OAuth2/GetCertForOpenIdConnect.hs | 148 + .../Network/Google/Method/OAuth2/Tokeninfo.hs | 178 + gogol-oauth2/gen/Network/Google/OAuth2.hs | 93 + .../gen/Network/Google/OAuth2/Types.hs | 61 + .../Network/Google/OAuth2/Types/Product.hs | 310 + .../gen/Network/Google/OAuth2/Types/Sum.hs | 18 + .../Google/Resource/OAuth2/Userinfo/Get.hs | 138 + .../Resource/OAuth2/Userinfo/V2/Me/Get.hs | 145 + gogol-oauth2/gogol-oauth2.cabal | 46 + gogol-oauth2/src/.gitkeep | 0 gogol-pagespeed/LICENSE | 373 + gogol-pagespeed/Makefile | 1 + gogol-pagespeed/README.md | 28 + gogol-pagespeed/Setup.hs | 2 + .../gen/Network/Google/PageSpeed.hs | 77 + .../gen/Network/Google/PageSpeed/Types.hs | 60 + .../Network/Google/PageSpeed/Types/Product.hs | 299 + .../gen/Network/Google/PageSpeed/Types/Sum.hs | 18 + .../Pagespeedapi/Runpagespeed.hs | 219 + gogol-pagespeed/gogol-pagespeed.cabal | 44 + gogol-pagespeed/src/.gitkeep | 0 gogol-partners/LICENSE | 373 + gogol-partners/Makefile | 1 + gogol-partners/README.md | 28 + gogol-partners/Setup.hs | 2 + gogol-partners/gen/Network/Google/Partners.hs | 260 + .../gen/Network/Google/Partners/Types.hs | 220 + .../Network/Google/Partners/Types/Product.hs | 1716 ++ .../gen/Network/Google/Partners/Types/Sum.hs | 18 + .../Resource/Partners/ClientMessages/Log.hs | 218 + .../Google/Resource/Partners/Companies/Get.hs | 386 + .../Partners/Companies/Leads/Create.hs | 227 + .../Resource/Partners/Companies/List.hs | 567 + .../Resource/Partners/UserEvents/Log.hs | 211 + .../Resource/Partners/UserStates/List.hs | 324 + gogol-partners/gogol-partners.cabal | 49 + gogol-partners/src/.gitkeep | 0 gogol-play-developer/LICENSE | 373 + gogol-play-developer/Makefile | 1 + gogol-play-developer/README.md | 28 + gogol-play-developer/Setup.hs | 2 + .../gen/Network/Google/PlayDeveloper.hs | 551 + .../gen/Network/Google/PlayDeveloper/Types.hs | 329 + .../Google/PlayDeveloper/Types/Product.hs | 2530 +++ .../Network/Google/PlayDeveloper/Types/Sum.hs | 18 + .../Edits/Apklistings/Delete.hs | 208 + .../Edits/Apklistings/Deleteall.hs | 191 + .../Androidpublisher/Edits/Apklistings/Get.hs | 207 + .../Edits/Apklistings/List.hs | 191 + .../Edits/Apklistings/Patch.hs | 207 + .../Edits/Apklistings/Update.hs | 207 + .../Edits/Apks/Addexternallyhosted.hs | 184 + .../Androidpublisher/Edits/Apks/List.hs | 172 + .../Androidpublisher/Edits/Apks/Upload.hs | 172 + .../Resource/Androidpublisher/Edits/Commit.hs | 165 + .../Resource/Androidpublisher/Edits/Delete.hs | 169 + .../Androidpublisher/Edits/Details/Get.hs | 175 + .../Androidpublisher/Edits/Details/Patch.hs | 174 + .../Androidpublisher/Edits/Details/Update.hs | 174 + .../Edits/Expansionfiles/Get.hs | 204 + .../Edits/Expansionfiles/Patch.hs | 209 + .../Edits/Expansionfiles/Update.hs | 209 + .../Edits/Expansionfiles/Upload.hs | 206 + .../Resource/Androidpublisher/Edits/Get.hs | 168 + .../Androidpublisher/Edits/Images/Delete.hs | 207 + .../Edits/Images/Deleteall.hs | 203 + .../Androidpublisher/Edits/Images/List.hs | 201 + .../Androidpublisher/Edits/Images/Upload.hs | 204 + .../Resource/Androidpublisher/Edits/Insert.hs | 154 + .../Androidpublisher/Edits/Listings/Delete.hs | 189 + .../Edits/Listings/Deleteall.hs | 174 + .../Androidpublisher/Edits/Listings/Get.hs | 188 + .../Androidpublisher/Edits/Listings/List.hs | 174 + .../Androidpublisher/Edits/Listings/Patch.hs | 190 + .../Androidpublisher/Edits/Listings/Update.hs | 188 + .../Androidpublisher/Edits/Testers/Get.hs | 185 + .../Androidpublisher/Edits/Testers/Patch.hs | 186 + .../Androidpublisher/Edits/Testers/Update.hs | 186 + .../Androidpublisher/Edits/Tracks/Get.hs | 186 + .../Androidpublisher/Edits/Tracks/List.hs | 173 + .../Androidpublisher/Edits/Tracks/Patch.hs | 192 + .../Androidpublisher/Edits/Tracks/Update.hs | 189 + .../Androidpublisher/Edits/Validate.hs | 169 + .../Androidpublisher/Entitlements/List.hs | 203 + .../Androidpublisher/Inappproducts/Batch.hs | 142 + .../Androidpublisher/Inappproducts/Delete.hs | 169 + .../Androidpublisher/Inappproducts/Get.hs | 167 + .../Androidpublisher/Inappproducts/Insert.hs | 174 + .../Androidpublisher/Inappproducts/List.hs | 193 + .../Androidpublisher/Inappproducts/Patch.hs | 189 + .../Androidpublisher/Inappproducts/Update.hs | 187 + .../Purchases/Products/Get.hs | 188 + .../Purchases/Subscriptions/Cancel.hs | 191 + .../Purchases/Subscriptions/Defer.hs | 194 + .../Purchases/Subscriptions/Get.hs | 194 + .../Purchases/Subscriptions/Refund.hs | 191 + .../Purchases/Subscriptions/Revoke.hs | 187 + .../gogol-play-developer.cabal | 94 + gogol-play-developer/src/.gitkeep | 0 gogol-play-enterprise/LICENSE | 373 + gogol-play-enterprise/Makefile | 1 + gogol-play-enterprise/README.md | 28 + gogol-play-enterprise/Setup.hs | 2 + .../gen/Network/Google/PlayEnterprise.hs | 472 + .../Network/Google/PlayEnterprise/Types.hs | 254 + .../Google/PlayEnterprise/Types/Product.hs | 2180 ++ .../Google/PlayEnterprise/Types/Sum.hs | 18 + .../Androidenterprise/Collections/Delete.hs | 174 + .../Androidenterprise/Collections/Get.hs | 173 + .../Androidenterprise/Collections/Insert.hs | 157 + .../Androidenterprise/Collections/List.hs | 155 + .../Androidenterprise/Collections/Patch.hs | 175 + .../Androidenterprise/Collections/Update.hs | 174 + .../Collectionviewers/Delete.hs | 187 + .../Collectionviewers/Get.hs | 187 + .../Collectionviewers/List.hs | 177 + .../Collectionviewers/Patch.hs | 190 + .../Collectionviewers/Update.hs | 187 + .../Resource/Androidenterprise/Devices/Get.hs | 180 + .../Androidenterprise/Devices/GetState.hs | 195 + .../Androidenterprise/Devices/List.hs | 167 + .../Androidenterprise/Devices/SetState.hs | 195 + .../Androidenterprise/Enterprises/Delete.hs | 162 + .../Androidenterprise/Enterprises/Enroll.hs | 155 + .../Androidenterprise/Enterprises/Get.hs | 155 + .../Androidenterprise/Enterprises/Insert.hs | 156 + .../Androidenterprise/Enterprises/List.hs | 154 + .../Enterprises/SendTestPushNotification.hs | 170 + .../Enterprises/SetAccount.hs | 162 + .../Androidenterprise/Enterprises/Unenroll.hs | 157 + .../Androidenterprise/Entitlements/Delete.hs | 188 + .../Androidenterprise/Entitlements/Get.hs | 188 + .../Androidenterprise/Entitlements/List.hs | 170 + .../Androidenterprise/Entitlements/Patch.hs | 202 + .../Androidenterprise/Entitlements/Update.hs | 203 + .../Androidenterprise/Grouplicenses/Get.hs | 173 + .../Androidenterprise/Grouplicenses/List.hs | 161 + .../Grouplicenseusers/List.hs | 175 + .../Androidenterprise/Installs/Delete.hs | 201 + .../Androidenterprise/Installs/Get.hs | 195 + .../Androidenterprise/Installs/List.hs | 182 + .../Androidenterprise/Installs/Patch.hs | 200 + .../Androidenterprise/Installs/Update.hs | 201 + .../Androidenterprise/Permissions/Get.hs | 169 + .../Androidenterprise/Products/Approve.hs | 172 + .../Products/GenerateApprovalURL.hs | 208 + .../Androidenterprise/Products/Get.hs | 179 + .../Products/GetAppRestrictionsSchema.hs | 199 + .../Products/GetPermissions.hs | 174 + .../Products/UpdatePermissions.hs | 178 + .../Androidenterprise/Users/GenerateToken.hs | 178 + .../Resource/Androidenterprise/Users/Get.hs | 165 + .../Users/GetAvailableProductSet.hs | 177 + .../Resource/Androidenterprise/Users/List.hs | 167 + .../Androidenterprise/Users/RevokeToken.hs | 173 + .../Users/SetAvailableProductSet.hs | 177 + .../gogol-play-enterprise.cabal | 92 + gogol-play-enterprise/src/.gitkeep | 0 gogol-play-moviespartner/LICENSE | 373 + gogol-play-moviespartner/Makefile | 1 + gogol-play-moviespartner/README.md | 28 + gogol-play-moviespartner/Setup.hs | 2 + .../gen/Network/Google/PlayMoviesPartner.hs | 214 + .../Network/Google/PlayMoviesPartner/Types.hs | 173 + .../Google/PlayMoviesPartner/Types/Product.hs | 1592 ++ .../Google/PlayMoviesPartner/Types/Sum.hs | 18 + .../PlayMoviesPartner/Accounts/Avails/List.hs | 331 + .../Accounts/ExperienceLocales/Get.hs | 249 + .../Accounts/ExperienceLocales/List.hs | 353 + .../PlayMoviesPartner/Accounts/Orders/Get.hs | 243 + .../PlayMoviesPartner/Accounts/Orders/List.hs | 318 + .../Accounts/StoreInfos/Country/Get.hs | 264 + .../Accounts/StoreInfos/List.hs | 340 + .../gogol-play-moviespartner.cabal | 50 + gogol-play-moviespartner/src/.gitkeep | 0 gogol-plus-domains/LICENSE | 373 + gogol-plus-domains/Makefile | 1 + gogol-plus-domains/README.md | 28 + gogol-plus-domains/Setup.hs | 2 + .../gen/Network/Google/PlusDomains.hs | 328 + .../gen/Network/Google/PlusDomains/Types.hs | 232 + .../Google/PlusDomains/Types/Product.hs | 1970 ++ .../Network/Google/PlusDomains/Types/Sum.hs | 18 + .../Resource/PlusDomains/Activities/Get.hs | 153 + .../Resource/PlusDomains/Activities/Insert.hs | 169 + .../Resource/PlusDomains/Activities/List.hs | 199 + .../Resource/PlusDomains/Audiences/List.hs | 181 + .../Resource/PlusDomains/Circles/AddPeople.hs | 184 + .../Resource/PlusDomains/Circles/Get.hs | 154 + .../Resource/PlusDomains/Circles/Insert.hs | 152 + .../Resource/PlusDomains/Circles/List.hs | 187 + .../Resource/PlusDomains/Circles/Patch.hs | 152 + .../Resource/PlusDomains/Circles/Remove.hs | 152 + .../PlusDomains/Circles/RemovePeople.hs | 182 + .../Resource/PlusDomains/Circles/Update.hs | 152 + .../Resource/PlusDomains/Comments/Get.hs | 151 + .../Resource/PlusDomains/Comments/Insert.hs | 155 + .../Resource/PlusDomains/Comments/List.hs | 195 + .../Resource/PlusDomains/Media/Insert.hs | 170 + .../Google/Resource/PlusDomains/People/Get.hs | 151 + .../Resource/PlusDomains/People/List.hs | 206 + .../PlusDomains/People/ListByActivity.hs | 208 + .../PlusDomains/People/ListByCircle.hs | 191 + gogol-plus-domains/gogol-plus-domains.cabal | 63 + gogol-plus-domains/src/.gitkeep | 0 gogol-plus/LICENSE | 373 + gogol-plus/Makefile | 1 + gogol-plus/README.md | 28 + gogol-plus/Setup.hs | 2 + gogol-plus/gen/Network/Google/Plus.hs | 302 + gogol-plus/gen/Network/Google/Plus/Types.hs | 243 + .../gen/Network/Google/Plus/Types/Product.hs | 2202 ++ .../gen/Network/Google/Plus/Types/Sum.hs | 18 + .../Google/Resource/Plus/Activities/Get.hs | 153 + .../Google/Resource/Plus/Activities/List.hs | 199 + .../Google/Resource/Plus/Activities/Search.hs | 209 + .../Google/Resource/Plus/Comments/Get.hs | 151 + .../Google/Resource/Plus/Comments/List.hs | 195 + .../Google/Resource/Plus/Moments/Insert.hs | 180 + .../Google/Resource/Plus/Moments/List.hs | 218 + .../Google/Resource/Plus/People/Get.hs | 155 + .../Google/Resource/Plus/People/List.hs | 206 + .../Resource/Plus/People/ListByActivity.hs | 208 + .../Google/Resource/Plus/People/Search.hs | 195 + gogol-plus/gogol-plus.cabal | 54 + gogol-plus/src/.gitkeep | 0 gogol-prediction/LICENSE | 373 + gogol-prediction/Makefile | 1 + gogol-prediction/README.md | 28 + gogol-prediction/Setup.hs | 2 + .../gen/Network/Google/Prediction.hs | 141 + .../gen/Network/Google/Prediction/Types.hs | 96 + .../Google/Prediction/Types/Product.hs | 624 + .../Network/Google/Prediction/Types/Sum.hs | 18 + .../Prediction/Hostedmodels/Predict.hs | 169 + .../Prediction/Trainedmodels/Analyze.hs | 166 + .../Prediction/Trainedmodels/Delete.hs | 166 + .../Resource/Prediction/Trainedmodels/Get.hs | 166 + .../Prediction/Trainedmodels/Insert.hs | 154 + .../Resource/Prediction/Trainedmodels/List.hs | 179 + .../Prediction/Trainedmodels/Predict.hs | 166 + .../Prediction/Trainedmodels/Update.hs | 166 + gogol-prediction/gogol-prediction.cabal | 51 + gogol-prediction/src/.gitkeep | 0 gogol-proximitybeacon/LICENSE | 373 + gogol-proximitybeacon/Makefile | 1 + gogol-proximitybeacon/README.md | 28 + gogol-proximitybeacon/Setup.hs | 2 + .../gen/Network/Google/ProximityBeacon.hs | 221 + .../Network/Google/ProximityBeacon/Types.hs | 151 + .../Google/ProximityBeacon/Types/Product.hs | 1108 + .../Google/ProximityBeacon/Types/Sum.hs | 18 + .../Beaconinfo/Getforobserved.hs | 212 + .../ProximityBeacon/Beacons/Activate.hs | 227 + .../Beacons/Attachments/BatchDelete.hs | 258 + .../Beacons/Attachments/Create.hs | 240 + .../Beacons/Attachments/Delete.hs | 238 + .../Beacons/Attachments/List.hs | 254 + .../ProximityBeacon/Beacons/Deactivate.hs | 230 + .../ProximityBeacon/Beacons/Decommission.hs | 232 + .../Beacons/Diagnostics/List.hs | 273 + .../Resource/ProximityBeacon/Beacons/Get.hs | 218 + .../Resource/ProximityBeacon/Beacons/List.hs | 293 + .../ProximityBeacon/Beacons/Register.hs | 213 + .../ProximityBeacon/Beacons/Update.hs | 234 + .../ProximityBeacon/Namespaces/List.hs | 213 + .../gogol-proximitybeacon.cabal | 57 + gogol-proximitybeacon/src/.gitkeep | 0 gogol-pubsub/LICENSE | 373 + gogol-pubsub/Makefile | 1 + gogol-pubsub/README.md | 28 + gogol-pubsub/Setup.hs | 2 + gogol-pubsub/gen/Network/Google/PubSub.hs | 243 + .../gen/Network/Google/PubSub/Types.hs | 148 + .../Network/Google/PubSub/Types/Product.hs | 1066 + .../gen/Network/Google/PubSub/Types/Sum.hs | 18 + .../Projects/Subscriptions/Acknowledge.hs | 236 + .../PubSub/Projects/Subscriptions/Create.hs | 238 + .../PubSub/Projects/Subscriptions/Delete.hs | 235 + .../PubSub/Projects/Subscriptions/Get.hs | 227 + .../Projects/Subscriptions/GetIAMPolicy.hs | 234 + .../PubSub/Projects/Subscriptions/List.hs | 255 + .../Subscriptions/ModifyAckDeadline.hs | 240 + .../Subscriptions/ModifyPushConfig.hs | 242 + .../PubSub/Projects/Subscriptions/Pull.hs | 233 + .../Projects/Subscriptions/SetIAMPolicy.hs | 235 + .../Subscriptions/TestIAMPermissions.hs | 235 + .../Resource/PubSub/Projects/Topics/Create.hs | 229 + .../Resource/PubSub/Projects/Topics/Delete.hs | 231 + .../Resource/PubSub/Projects/Topics/Get.hs | 223 + .../PubSub/Projects/Topics/GetIAMPolicy.hs | 233 + .../Resource/PubSub/Projects/Topics/List.hs | 253 + .../PubSub/Projects/Topics/Publish.hs | 228 + .../PubSub/Projects/Topics/SetIAMPolicy.hs | 234 + .../Projects/Topics/Subscriptions/List.hs | 259 + .../Projects/Topics/TestIAMPermissions.hs | 234 + gogol-pubsub/gogol-pubsub.cabal | 63 + gogol-pubsub/src/.gitkeep | 0 gogol-qpxexpress/LICENSE | 373 + gogol-qpxexpress/Makefile | 1 + gogol-qpxexpress/README.md | 28 + gogol-qpxexpress/Setup.hs | 2 + .../gen/Network/Google/QPXExpress.hs | 278 + .../gen/Network/Google/QPXExpress/Types.hs | 261 + .../Google/QPXExpress/Types/Product.hs | 2243 ++ .../Network/Google/QPXExpress/Types/Sum.hs | 18 + .../Resource/QPXExpress/Trips/Search.hs | 138 + gogol-qpxexpress/gogol-qpxexpress.cabal | 44 + gogol-qpxexpress/src/.gitkeep | 0 gogol-replicapool-updater/LICENSE | 373 + gogol-replicapool-updater/Makefile | 1 + gogol-replicapool-updater/README.md | 28 + gogol-replicapool-updater/Setup.hs | 2 + .../Network/Google/InstanceGroupsUpdater.hs | 162 + .../Google/InstanceGroupsUpdater/Types.hs | 108 + .../InstanceGroupsUpdater/Types/Product.hs | 799 + .../Google/InstanceGroupsUpdater/Types/Sum.hs | 18 + .../RollingUpdates/Cancel.hs | 189 + .../Replicapoolupdater/RollingUpdates/Get.hs | 187 + .../RollingUpdates/Insert.hs | 172 + .../Replicapoolupdater/RollingUpdates/List.hs | 214 + .../RollingUpdates/ListInstanceUpdates.hs | 234 + .../RollingUpdates/Pause.hs | 189 + .../RollingUpdates/Resume.hs | 184 + .../RollingUpdates/Rollback.hs | 189 + .../Replicapoolupdater/ZoneOperations/Get.hs | 185 + .../Replicapoolupdater/ZoneOperations/List.hs | 214 + .../gogol-replicapool-updater.cabal | 53 + gogol-replicapool-updater/src/.gitkeep | 0 gogol-replicapool/LICENSE | 373 + gogol-replicapool/Makefile | 1 + gogol-replicapool/README.md | 28 + gogol-replicapool/Setup.hs | 2 + .../Network/Google/InstanceGroupsManager.hs | 186 + .../Google/InstanceGroupsManager/Types.hs | 124 + .../InstanceGroupsManager/Types/Product.hs | 954 + .../Google/InstanceGroupsManager/Types/Sum.hs | 18 + .../InstanceGroupManagers/AbandonInstances.hs | 197 + .../InstanceGroupManagers/Delete.hs | 193 + .../InstanceGroupManagers/DeleteInstances.hs | 199 + .../Replicapool/InstanceGroupManagers/Get.hs | 190 + .../InstanceGroupManagers/Insert.hs | 188 + .../Replicapool/InstanceGroupManagers/List.hs | 218 + .../RecreateInstances.hs | 195 + .../InstanceGroupManagers/Resize.hs | 207 + .../SetInstanceTemplate.hs | 199 + .../InstanceGroupManagers/SetTargetPools.hs | 199 + .../Replicapool/ZoneOperations/Get.hs | 185 + .../Replicapool/ZoneOperations/List.hs | 214 + gogol-replicapool/gogol-replicapool.cabal | 55 + gogol-replicapool/src/.gitkeep | 0 gogol-resourcemanager/LICENSE | 373 + gogol-resourcemanager/Makefile | 1 + gogol-resourcemanager/README.md | 28 + gogol-resourcemanager/Setup.hs | 2 + .../Cloudresourcemanager/Organizations/Get.hs | 225 + .../Organizations/GetIAMPolicy.hs | 232 + .../Organizations/List.hs | 257 + .../Organizations/SetIAMPolicy.hs | 233 + .../Organizations/TestIAMPermissions.hs | 234 + .../Organizations/Update.hs | 227 + .../Cloudresourcemanager/Projects/Create.hs | 214 + .../Cloudresourcemanager/Projects/Delete.hs | 268 + .../Cloudresourcemanager/Projects/Get.hs | 224 + .../Projects/GetIAMPolicy.hs | 229 + .../Cloudresourcemanager/Projects/List.hs | 263 + .../Projects/SetIAMPolicy.hs | 234 + .../Projects/TestIAMPermissions.hs | 235 + .../Cloudresourcemanager/Projects/Undelete.hs | 239 + .../Cloudresourcemanager/Projects/Update.hs | 229 + .../gen/Network/Google/ResourceManager.hs | 180 + .../Network/Google/ResourceManager/Types.hs | 107 + .../Google/ResourceManager/Types/Product.hs | 705 + .../Google/ResourceManager/Types/Sum.hs | 18 + .../gogol-resourcemanager.cabal | 58 + gogol-resourcemanager/src/.gitkeep | 0 gogol-resourceviews/LICENSE | 373 + gogol-resourceviews/Makefile | 1 + gogol-resourceviews/README.md | 28 + gogol-resourceviews/Setup.hs | 2 + .../gen/Network/Google/InstanceGroups.hs | 195 + .../Network/Google/InstanceGroups/Types.hs | 137 + .../Google/InstanceGroups/Types/Product.hs | 1008 + .../Google/InstanceGroups/Types/Sum.hs | 18 + .../Resourceviews/ZoneOperations/Get.hs | 184 + .../Resourceviews/ZoneOperations/List.hs | 213 + .../Resourceviews/ZoneViews/AddResources.hs | 188 + .../Resourceviews/ZoneViews/Delete.hs | 185 + .../Resource/Resourceviews/ZoneViews/Get.hs | 184 + .../Resourceviews/ZoneViews/GetService.hs | 204 + .../Resourceviews/ZoneViews/Insert.hs | 170 + .../Resource/Resourceviews/ZoneViews/List.hs | 198 + .../Resourceviews/ZoneViews/ListResources.hs | 260 + .../ZoneViews/RemoveResources.hs | 189 + .../Resourceviews/ZoneViews/SetService.hs | 188 + gogol-resourceviews/gogol-resourceviews.cabal | 54 + gogol-resourceviews/src/.gitkeep | 0 gogol-shopping-content/LICENSE | 373 + gogol-shopping-content/Makefile | 1 + gogol-shopping-content/README.md | 28 + gogol-shopping-content/Setup.hs | 2 + .../Resource/Content/Orders/Acknowledge.hs | 171 + .../Content/Orders/Advancetestorder.hs | 177 + .../Google/Resource/Content/Orders/Cancel.hs | 171 + .../Resource/Content/Orders/Cancellineitem.hs | 168 + .../Content/Orders/Createtestorder.hs | 157 + .../Resource/Content/Orders/Custombatch.hs | 146 + .../Google/Resource/Content/Orders/Get.hs | 169 + .../Content/Orders/Getbymerchantorderid.hs | 172 + .../Content/Orders/Gettestordertemplate.hs | 174 + .../Google/Resource/Content/Orders/List.hs | 257 + .../Google/Resource/Content/Orders/Refund.hs | 167 + .../Resource/Content/Orders/Returnlineitem.hs | 175 + .../Resource/Content/Orders/Shiplineitems.hs | 171 + .../Content/Orders/Updatemerchantorderid.hs | 172 + .../Resource/Content/Orders/Updateshipment.hs | 175 + .../gen/Network/Google/ShoppingContent.hs | 570 + .../Network/Google/ShoppingContent/Types.hs | 497 + .../Google/ShoppingContent/Types/Product.hs | 4270 ++++ .../Google/ShoppingContent/Types/Sum.hs | 18 + .../gogol-shopping-content.cabal | 58 + gogol-shopping-content/src/.gitkeep | 0 gogol-siteverification/LICENSE | 373 + gogol-siteverification/Makefile | 1 + gogol-siteverification/README.md | 28 + gogol-siteverification/Setup.hs | 2 + .../SiteVerification/WebResource/Delete.hs | 156 + .../SiteVerification/WebResource/Get.hs | 157 + .../SiteVerification/WebResource/GetToken.hs | 149 + .../SiteVerification/WebResource/Insert.hs | 160 + .../SiteVerification/WebResource/List.hs | 145 + .../SiteVerification/WebResource/Patch.hs | 160 + .../SiteVerification/WebResource/Update.hs | 158 + .../gen/Network/Google/SiteVerification.hs | 95 + .../Network/Google/SiteVerification/Types.hs | 54 + .../Google/SiteVerification/Types/Product.hs | 227 + .../Google/SiteVerification/Types/Sum.hs | 18 + .../gogol-siteverification.cabal | 50 + gogol-siteverification/src/.gitkeep | 0 gogol-spectrum/LICENSE | 373 + gogol-spectrum/Makefile | 1 + gogol-spectrum/README.md | 28 + gogol-spectrum/Setup.hs | 2 + .../Resource/Spectrum/Paws/GetSpectrum.hs | 147 + .../Spectrum/Paws/GetSpectrumBatch.hs | 150 + .../Google/Resource/Spectrum/Paws/Init.hs | 140 + .../Spectrum/Paws/NotifySpectrumUse.hs | 154 + .../Google/Resource/Spectrum/Paws/Register.hs | 141 + .../Resource/Spectrum/Paws/VerifyDevice.hs | 149 + gogol-spectrum/gen/Network/Google/Spectrum.hs | 334 + .../gen/Network/Google/Spectrum/Types.hs | 298 + .../Network/Google/Spectrum/Types/Product.hs | 2753 +++ .../gen/Network/Google/Spectrum/Types/Sum.hs | 18 + gogol-spectrum/gogol-spectrum.cabal | 48 + gogol-spectrum/src/.gitkeep | 0 gogol-sqladmin/LICENSE | 373 + gogol-sqladmin/Makefile | 1 + gogol-sqladmin/README.md | 28 + gogol-sqladmin/Setup.hs | 2 + .../Google/Resource/Sql/BackupRuns/Delete.hs | 185 + .../Google/Resource/Sql/BackupRuns/Get.hs | 183 + .../Google/Resource/Sql/BackupRuns/List.hs | 201 + .../Google/Resource/Sql/Databases/Delete.hs | 184 + .../Google/Resource/Sql/Databases/Get.hs | 183 + .../Google/Resource/Sql/Databases/Insert.hs | 174 + .../Google/Resource/Sql/Databases/List.hs | 167 + .../Google/Resource/Sql/Databases/Patch.hs | 184 + .../Google/Resource/Sql/Databases/Update.hs | 184 + .../Network/Google/Resource/Sql/Flags/List.hs | 138 + .../Google/Resource/Sql/Instances/Clone.hs | 169 + .../Google/Resource/Sql/Instances/Delete.hs | 167 + .../Google/Resource/Sql/Instances/Export.hs | 170 + .../Google/Resource/Sql/Instances/Get.hs | 167 + .../Google/Resource/Sql/Instances/Import.hs | 168 + .../Google/Resource/Sql/Instances/Insert.hs | 155 + .../Google/Resource/Sql/Instances/List.hs | 181 + .../Google/Resource/Sql/Instances/Patch.hs | 173 + .../Resource/Sql/Instances/PromoteReplica.hs | 175 + .../Resource/Sql/Instances/ResetSSLConfig.hs | 180 + .../Google/Resource/Sql/Instances/Restart.hs | 169 + .../Resource/Sql/Instances/RestoreBackup.hs | 173 + .../Resource/Sql/Instances/StartReplica.hs | 173 + .../Resource/Sql/Instances/StopReplica.hs | 173 + .../Google/Resource/Sql/Instances/Update.hs | 171 + .../Google/Resource/Sql/Operations/Get.hs | 167 + .../Google/Resource/Sql/Operations/List.hs | 195 + .../Resource/Sql/SSLCerts/CreateEphemeral.hs | 180 + .../Google/Resource/Sql/SSLCerts/Delete.hs | 189 + .../Google/Resource/Sql/SSLCerts/Get.hs | 188 + .../Google/Resource/Sql/SSLCerts/Insert.hs | 177 + .../Google/Resource/Sql/SSLCerts/List.hs | 171 + .../Network/Google/Resource/Sql/Tiers/List.hs | 154 + .../Google/Resource/Sql/Users/Delete.hs | 190 + .../Google/Resource/Sql/Users/Insert.hs | 166 + .../Network/Google/Resource/Sql/Users/List.hs | 166 + .../Google/Resource/Sql/Users/Update.hs | 190 + gogol-sqladmin/gen/Network/Google/SQLAdmin.hs | 542 + .../gen/Network/Google/SQLAdmin/Types.hs | 377 + .../Network/Google/SQLAdmin/Types/Product.hs | 3249 +++ .../gen/Network/Google/SQLAdmin/Types/Sum.hs | 18 + gogol-sqladmin/gogol-sqladmin.cabal | 79 + gogol-sqladmin/src/.gitkeep | 0 gogol-storage-transfer/LICENSE | 373 + gogol-storage-transfer/Makefile | 1 + gogol-storage-transfer/README.md | 28 + gogol-storage-transfer/Setup.hs | 2 + .../GetGoogleServiceAccount.hs | 242 + .../GoogleServiceAccounts/Get.hs | 245 + .../StorageTransfer/TransferJobs/Create.hs | 212 + .../StorageTransfer/TransferJobs/Get.hs | 238 + .../StorageTransfer/TransferJobs/List.hs | 257 + .../StorageTransfer/TransferJobs/Patch.hs | 228 + .../TransferOperations/Cancel.hs | 226 + .../TransferOperations/Delete.hs | 224 + .../StorageTransfer/TransferOperations/Get.hs | 227 + .../TransferOperations/List.hs | 270 + .../TransferOperations/Pause.hs | 223 + .../TransferOperations/Resume.hs | 224 + .../gen/Network/Google/StorageTransfer.hs | 273 + .../Network/Google/StorageTransfer/Types.hs | 210 + .../Google/StorageTransfer/Types/Product.hs | 1779 ++ .../Google/StorageTransfer/Types/Sum.hs | 18 + .../gogol-storage-transfer.cabal | 55 + gogol-storage-transfer/src/.gitkeep | 0 gogol-storage/LICENSE | 373 + gogol-storage/Makefile | 1 + gogol-storage/README.md | 28 + gogol-storage/Setup.hs | 2 + .../Storage/BucketAccessControls/Delete.hs | 177 + .../Storage/BucketAccessControls/Get.hs | 177 + .../Storage/BucketAccessControls/Insert.hs | 162 + .../Storage/BucketAccessControls/List.hs | 162 + .../Storage/BucketAccessControls/Patch.hs | 180 + .../Storage/BucketAccessControls/Update.hs | 178 + .../Google/Resource/Storage/Buckets/Delete.hs | 182 + .../Google/Resource/Storage/Buckets/Get.hs | 192 + .../Google/Resource/Storage/Buckets/Insert.hs | 167 + .../Google/Resource/Storage/Buckets/List.hs | 189 + .../Google/Resource/Storage/Buckets/Patch.hs | 193 + .../Google/Resource/Storage/Buckets/Update.hs | 193 + .../Google/Resource/Storage/Channels/Stop.hs | 139 + .../DefaultObjectAccessControls/Delete.hs | 179 + .../DefaultObjectAccessControls/Get.hs | 181 + .../DefaultObjectAccessControls/Insert.hs | 164 + .../DefaultObjectAccessControls/List.hs | 193 + .../DefaultObjectAccessControls/Patch.hs | 181 + .../DefaultObjectAccessControls/Update.hs | 179 + .../Storage/ObjectAccessControls/Delete.hs | 206 + .../Storage/ObjectAccessControls/Get.hs | 205 + .../Storage/ObjectAccessControls/Insert.hs | 191 + .../Storage/ObjectAccessControls/List.hs | 191 + .../Storage/ObjectAccessControls/Patch.hs | 208 + .../Storage/ObjectAccessControls/Update.hs | 206 + .../Resource/Storage/Objects/Compose.hs | 202 + .../Google/Resource/Storage/Objects/Copy.hs | 349 + .../Google/Resource/Storage/Objects/Delete.hs | 239 + .../Google/Resource/Storage/Objects/Get.hs | 246 + .../Google/Resource/Storage/Objects/Insert.hs | 236 + .../Google/Resource/Storage/Objects/List.hs | 228 + .../Google/Resource/Storage/Objects/Patch.hs | 250 + .../Google/Resource/Storage/Objects/Update.hs | 247 + .../Resource/Storage/Objects/WatchAll.hs | 240 + gogol-storage/gen/Network/Google/Storage.hs | 309 + .../gen/Network/Google/Storage/Types.hs | 157 + .../Network/Google/Storage/Types/Product.hs | 1267 ++ .../gen/Network/Google/Storage/Types/Sum.hs | 18 + gogol-storage/gogol-storage.cabal | 76 + gogol-storage/src/.gitkeep | 0 gogol-tagmanager/LICENSE | 373 + gogol-tagmanager/Makefile | 1 + gogol-tagmanager/README.md | 28 + gogol-tagmanager/Setup.hs | 2 + .../TagManager/Accounts/Containers/Create.hs | 162 + .../TagManager/Accounts/Containers/Delete.hs | 174 + .../Accounts/Containers/Folders/Create.hs | 178 + .../Accounts/Containers/Folders/Delete.hs | 191 + .../Containers/Folders/Entities/List.hs | 196 + .../Accounts/Containers/Folders/Get.hs | 190 + .../Accounts/Containers/Folders/List.hs | 179 + .../Accounts/Containers/Folders/Update.hs | 205 + .../TagManager/Accounts/Containers/Get.hs | 173 + .../TagManager/Accounts/Containers/List.hs | 160 + .../Accounts/Containers/MACros/Create.hs | 181 + .../Accounts/Containers/MACros/Delete.hs | 195 + .../Accounts/Containers/MACros/Get.hs | 194 + .../Accounts/Containers/MACros/List.hs | 181 + .../Accounts/Containers/MACros/Update.hs | 209 + .../Containers/Move_folders/Update.hs | 230 + .../Accounts/Containers/Rules/Create.hs | 178 + .../Accounts/Containers/Rules/Delete.hs | 190 + .../Accounts/Containers/Rules/Get.hs | 189 + .../Accounts/Containers/Rules/List.hs | 178 + .../Accounts/Containers/Rules/Update.hs | 205 + .../Accounts/Containers/Tags/Create.hs | 178 + .../Accounts/Containers/Tags/Delete.hs | 190 + .../Accounts/Containers/Tags/Get.hs | 190 + .../Accounts/Containers/Tags/List.hs | 179 + .../Accounts/Containers/Tags/Update.hs | 205 + .../Accounts/Containers/Triggers/Create.hs | 178 + .../Accounts/Containers/Triggers/Delete.hs | 192 + .../Accounts/Containers/Triggers/Get.hs | 192 + .../Accounts/Containers/Triggers/List.hs | 179 + .../Accounts/Containers/Triggers/Update.hs | 206 + .../TagManager/Accounts/Containers/Update.hs | 189 + .../Accounts/Containers/Variables/Create.hs | 178 + .../Accounts/Containers/Variables/Delete.hs | 192 + .../Accounts/Containers/Variables/Get.hs | 192 + .../Accounts/Containers/Variables/List.hs | 179 + .../Accounts/Containers/Variables/Update.hs | 206 + .../Accounts/Containers/Versions/Create.hs | 181 + .../Accounts/Containers/Versions/Delete.hs | 194 + .../Accounts/Containers/Versions/Get.hs | 196 + .../Accounts/Containers/Versions/List.hs | 190 + .../Accounts/Containers/Versions/Publish.hs | 209 + .../Accounts/Containers/Versions/Restore.hs | 200 + .../Accounts/Containers/Versions/Undelete.hs | 196 + .../Accounts/Containers/Versions/Update.hs | 203 + .../Resource/TagManager/Accounts/Get.hs | 152 + .../Resource/TagManager/Accounts/List.hs | 139 + .../TagManager/Accounts/Permissions/Create.hs | 160 + .../TagManager/Accounts/Permissions/Delete.hs | 176 + .../TagManager/Accounts/Permissions/Get.hs | 173 + .../TagManager/Accounts/Permissions/List.hs | 162 + .../TagManager/Accounts/Permissions/Update.hs | 174 + .../Resource/TagManager/Accounts/Update.hs | 168 + .../gen/Network/Google/TagManager.hs | 534 + .../gen/Network/Google/TagManager/Types.hs | 310 + .../Google/TagManager/Types/Product.hs | 2702 +++ .../Network/Google/TagManager/Types/Sum.hs | 18 + gogol-tagmanager/gogol-tagmanager.cabal | 95 + gogol-tagmanager/src/.gitkeep | 0 gogol-translate/LICENSE | 373 + gogol-translate/Makefile | 1 + gogol-translate/README.md | 28 + gogol-translate/Setup.hs | 2 + .../Resource/Language/Detections/List.hs | 155 + .../Resource/Language/Languages/List.hs | 153 + .../Resource/Language/Translations/List.hs | 199 + .../gen/Network/Google/Translate.hs | 82 + .../gen/Network/Google/Translate/Types.hs | 57 + .../Network/Google/Translate/Types/Product.hs | 232 + .../gen/Network/Google/Translate/Types/Sum.hs | 18 + gogol-translate/gogol-translate.cabal | 45 + gogol-translate/src/.gitkeep | 0 gogol-urlshortener/LICENSE | 373 + gogol-urlshortener/Makefile | 1 + gogol-urlshortener/README.md | 28 + gogol-urlshortener/Setup.hs | 2 + .../Google/Resource/URLShortener/URL/Get.hs | 163 + .../Resource/URLShortener/URL/Insert.hs | 137 + .../Google/Resource/URLShortener/URL/List.hs | 165 + .../gen/Network/Google/URLShortener.hs | 98 + .../gen/Network/Google/URLShortener/Types.hs | 74 + .../Google/URLShortener/Types/Product.hs | 420 + .../Network/Google/URLShortener/Types/Sum.hs | 18 + gogol-urlshortener/gogol-urlshortener.cabal | 45 + gogol-urlshortener/src/.gitkeep | 0 gogol-webmaster-tools/LICENSE | 373 + gogol-webmaster-tools/Makefile | 1 + gogol-webmaster-tools/README.md | 28 + gogol-webmaster-tools/Setup.hs | 2 + .../Webmasters/Searchanalytics/Query.hs | 168 + .../Resource/Webmasters/Sitemaps/Delete.hs | 170 + .../Resource/Webmasters/Sitemaps/Get.hs | 168 + .../Resource/Webmasters/Sitemaps/List.hs | 171 + .../Resource/Webmasters/Sitemaps/Submit.hs | 170 + .../Google/Resource/Webmasters/Sites/Add.hs | 150 + .../Resource/Webmasters/Sites/Delete.hs | 156 + .../Google/Resource/Webmasters/Sites/Get.hs | 156 + .../Google/Resource/Webmasters/Sites/List.hs | 137 + .../Webmasters/URLcrawlerrorscounts/Query.hs | 202 + .../Webmasters/URLcrawlerrorssamples/Get.hs | 201 + .../Webmasters/URLcrawlerrorssamples/List.hs | 188 + .../URLcrawlerrorssamples/MarkAsFixed.hs | 207 + .../gen/Network/Google/WebmasterTools.hs | 211 + .../Network/Google/WebmasterTools/Types.hs | 143 + .../Google/WebmasterTools/Types/Product.hs | 1032 + .../Google/WebmasterTools/Types/Sum.hs | 18 + .../gogol-webmaster-tools.cabal | 55 + gogol-webmaster-tools/src/.gitkeep | 0 gogol-youtube-analytics/LICENSE | 373 + gogol-youtube-analytics/Makefile | 1 + gogol-youtube-analytics/README.md | 28 + gogol-youtube-analytics/Setup.hs | 2 + .../BatchReportDefinitions/List.hs | 164 + .../YouTubeAnalytics/BatchReports/List.hs | 177 + .../YouTubeAnalytics/GroupItems/Delete.hs | 180 + .../YouTubeAnalytics/GroupItems/Insert.hs | 168 + .../YouTubeAnalytics/GroupItems/List.hs | 183 + .../YouTubeAnalytics/Groups/Delete.hs | 175 + .../YouTubeAnalytics/Groups/Insert.hs | 163 + .../Resource/YouTubeAnalytics/Groups/List.hs | 189 + .../YouTubeAnalytics/Groups/Update.hs | 163 + .../YouTubeAnalytics/Reports/Query.hs | 291 + .../gen/Network/Google/YouTubeAnalytics.hs | 154 + .../Network/Google/YouTubeAnalytics/Types.hs | 100 + .../Google/YouTubeAnalytics/Types/Product.hs | 633 + .../Google/YouTubeAnalytics/Types/Sum.hs | 18 + .../gogol-youtube-analytics.cabal | 52 + gogol-youtube-analytics/src/.gitkeep | 0 gogol-youtube/LICENSE | 373 + gogol-youtube/Makefile | 1 + gogol-youtube/README.md | 28 + gogol-youtube/Setup.hs | 2 + .../Resource/YouTube/Activities/Insert.hs | 168 + .../Resource/YouTube/Activities/List.hs | 285 + .../Resource/YouTube/Captions/Delete.hs | 194 + .../Resource/YouTube/Captions/Download.hs | 225 + .../Resource/YouTube/Captions/Insert.hs | 206 + .../Google/Resource/YouTube/Captions/List.hs | 222 + .../Resource/YouTube/Captions/Update.hs | 211 + .../Resource/YouTube/ChannelBanners/Insert.hs | 185 + .../YouTube/ChannelSections/Delete.hs | 181 + .../YouTube/ChannelSections/Insert.hs | 211 + .../Resource/YouTube/ChannelSections/List.hs | 246 + .../YouTube/ChannelSections/Update.hs | 183 + .../Google/Resource/YouTube/Channels/List.hs | 311 + .../Resource/YouTube/Channels/Update.hs | 183 + .../Resource/YouTube/CommentThreads/Insert.hs | 161 + .../Resource/YouTube/CommentThreads/List.hs | 304 + .../Resource/YouTube/CommentThreads/Update.hs | 160 + .../Resource/YouTube/Comments/Delete.hs | 158 + .../Resource/YouTube/Comments/Insert.hs | 160 + .../Google/Resource/YouTube/Comments/List.hs | 229 + .../Resource/YouTube/Comments/MarkAsSpam.hs | 162 + .../YouTube/Comments/SetModerationStatus.hs | 196 + .../Resource/YouTube/Comments/Update.hs | 159 + .../Resource/YouTube/GuideCategories/List.hs | 203 + .../Resource/YouTube/I18nLanguages/List.hs | 173 + .../Resource/YouTube/I18nRegions/List.hs | 170 + .../Resource/YouTube/LiveBroadcasts/Bind.hs | 246 + .../YouTube/LiveBroadcasts/Bind_direct.hs | 243 + .../YouTube/LiveBroadcasts/Control.hs | 277 + .../Resource/YouTube/LiveBroadcasts/Delete.hs | 208 + .../Resource/YouTube/LiveBroadcasts/Insert.hs | 212 + .../Resource/YouTube/LiveBroadcasts/List.hs | 282 + .../YouTube/LiveBroadcasts/Transition.hs | 252 + .../Resource/YouTube/LiveBroadcasts/Update.hs | 222 + .../Resource/YouTube/LiveStreams/Delete.hs | 208 + .../Resource/YouTube/LiveStreams/Insert.hs | 213 + .../Resource/YouTube/LiveStreams/List.hs | 264 + .../Resource/YouTube/LiveStreams/Update.hs | 219 + .../Resource/YouTube/PlaylistItems/Delete.hs | 158 + .../Resource/YouTube/PlaylistItems/Insert.hs | 182 + .../Resource/YouTube/PlaylistItems/List.hs | 260 + .../Resource/YouTube/PlaylistItems/Update.hs | 171 + .../Resource/YouTube/Playlists/Delete.hs | 177 + .../Resource/YouTube/Playlists/Insert.hs | 206 + .../Google/Resource/YouTube/Playlists/List.hs | 291 + .../Resource/YouTube/Playlists/Update.hs | 186 + .../Google/Resource/YouTube/Search/List.hs | 652 + .../Resource/YouTube/Subscriptions/Delete.hs | 155 + .../Resource/YouTube/Subscriptions/Insert.hs | 156 + .../Resource/YouTube/Subscriptions/List.hs | 318 + .../Google/Resource/YouTube/Thumbnails/Set.hs | 178 + .../YouTube/VideoAbuseReportReasons/List.hs | 178 + .../Resource/YouTube/VideoCategories/List.hs | 199 + .../Google/Resource/YouTube/Videos/Delete.hs | 176 + .../Resource/YouTube/Videos/GetRating.hs | 184 + .../Google/Resource/YouTube/Videos/Insert.hs | 254 + .../Google/Resource/YouTube/Videos/List.hs | 309 + .../Google/Resource/YouTube/Videos/Rate.hs | 169 + .../Resource/YouTube/Videos/ReportAbuse.hs | 169 + .../Google/Resource/YouTube/Videos/Update.hs | 191 + .../Google/Resource/YouTube/Watermarks/Set.hs | 178 + .../Resource/YouTube/Watermarks/Unset.hs | 179 + gogol-youtube/gen/Network/Google/YouTube.hs | 1685 ++ .../gen/Network/Google/YouTube/Types.hs | 1405 ++ .../Network/Google/YouTube/Types/Product.hs | 13242 +++++++++++ .../gen/Network/Google/YouTube/Types/Sum.hs | 18 + gogol-youtube/gogol-youtube.cabal | 104 + gogol-youtube/src/.gitkeep | 0 2775 files changed, 643812 insertions(+) create mode 100644 gogol-adexchange-buyer/LICENSE create mode 100644 gogol-adexchange-buyer/Makefile create mode 100644 gogol-adexchange-buyer/README.md create mode 100644 gogol-adexchange-buyer/Setup.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Sum.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Patch.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Update.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Patch.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Update.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Delete.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Patch.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Update.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Deals/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Delete.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Update.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Search.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Patch.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Search.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Update.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiationrounds/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PerformanceReport/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Delete.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Get.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Insert.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/List.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Patch.hs create mode 100644 gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Update.hs create mode 100644 gogol-adexchange-buyer/gogol-adexchange-buyer.cabal create mode 100644 gogol-adexchange-buyer/src/.gitkeep create mode 100644 gogol-adexchange-seller/LICENSE create mode 100644 gogol-adexchange-seller/Makefile create mode 100644 gogol-adexchange-seller/README.md create mode 100644 gogol-adexchange-seller/Setup.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Sum.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Adclients/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Alerts/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/Get.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Get.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Dimensions/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Metrics/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/Get.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Generate.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/Generate.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/List.hs create mode 100644 gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/URLchannels/List.hs create mode 100644 gogol-adexchange-seller/gogol-adexchange-seller.cabal create mode 100644 gogol-adexchange-seller/src/.gitkeep create mode 100644 gogol-admin-datatransfer/LICENSE create mode 100644 gogol-admin-datatransfer/Makefile create mode 100644 gogol-admin-datatransfer/README.md create mode 100644 gogol-admin-datatransfer/Setup.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Product.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Sum.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/Get.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/List.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Get.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Insert.hs create mode 100644 gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/List.hs create mode 100644 gogol-admin-datatransfer/gogol-admin-datatransfer.cabal create mode 100644 gogol-admin-datatransfer/src/.gitkeep create mode 100644 gogol-admin-directory/LICENSE create mode 100644 gogol-admin-directory/Makefile create mode 100644 gogol-admin-directory/README.md create mode 100644 gogol-admin-directory/Setup.hs create mode 100644 gogol-admin-directory/gen/Network/Google/AdminDirectory.hs create mode 100644 gogol-admin-directory/gen/Network/Google/AdminDirectory/Types.hs create mode 100644 gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Product.hs create mode 100644 gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Sum.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Admin/Channels/Stop.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Action.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Watch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Insert.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/List.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/MakeAdmin.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Delete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Get.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Patch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Undelete.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Update.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Watch.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Generate.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Invalidate.hs create mode 100644 gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/List.hs create mode 100644 gogol-admin-directory/gogol-admin-directory.cabal create mode 100644 gogol-admin-directory/src/.gitkeep create mode 100644 gogol-admin-emailmigration/LICENSE create mode 100644 gogol-admin-emailmigration/Makefile create mode 100644 gogol-admin-emailmigration/README.md create mode 100644 gogol-admin-emailmigration/Setup.hs create mode 100644 gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration.hs create mode 100644 gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types.hs create mode 100644 gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Product.hs create mode 100644 gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Sum.hs create mode 100644 gogol-admin-emailmigration/gen/Network/Google/Resource/EmailMigration/Mail/Insert.hs create mode 100644 gogol-admin-emailmigration/gogol-admin-emailmigration.cabal create mode 100644 gogol-admin-emailmigration/src/.gitkeep create mode 100644 gogol-admin-reports/LICENSE create mode 100644 gogol-admin-reports/Makefile create mode 100644 gogol-admin-reports/README.md create mode 100644 gogol-admin-reports/Setup.hs create mode 100644 gogol-admin-reports/gen/Network/Google/AdminReports.hs create mode 100644 gogol-admin-reports/gen/Network/Google/AdminReports/Types.hs create mode 100644 gogol-admin-reports/gen/Network/Google/AdminReports/Types/Product.hs create mode 100644 gogol-admin-reports/gen/Network/Google/AdminReports/Types/Sum.hs create mode 100644 gogol-admin-reports/gen/Network/Google/Resource/Admin/Channels/Stop.hs create mode 100644 gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/List.hs create mode 100644 gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/Watch.hs create mode 100644 gogol-admin-reports/gen/Network/Google/Resource/Reports/CustomerUsageReports/Get.hs create mode 100644 gogol-admin-reports/gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs create mode 100644 gogol-admin-reports/gogol-admin-reports.cabal create mode 100644 gogol-admin-reports/src/.gitkeep create mode 100644 gogol-adsense-host/LICENSE create mode 100644 gogol-adsense-host/Makefile create mode 100644 gogol-adsense-host/README.md create mode 100644 gogol-adsense-host/Setup.hs create mode 100644 gogol-adsense-host/gen/Network/Google/AdSenseHost.hs create mode 100644 gogol-adsense-host/gen/Network/Google/AdSenseHost/Types.hs create mode 100644 gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs create mode 100644 gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Sum.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/Get.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/List.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Delete.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Get.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/GetAdCode.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Insert.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/List.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Patch.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Update.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Get.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/List.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Reports/Generate.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/Get.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/List.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Start.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Verify.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Delete.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Get.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Insert.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/List.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Patch.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Update.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Reports/Generate.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Delete.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Insert.hs create mode 100644 gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/List.hs create mode 100644 gogol-adsense-host/gogol-adsense-host.cabal create mode 100644 gogol-adsense-host/src/.gitkeep create mode 100644 gogol-adsense/LICENSE create mode 100644 gogol-adsense/Makefile create mode 100644 gogol-adsense/README.md create mode 100644 gogol-adsense/Setup.hs create mode 100644 gogol-adsense/gen/Network/Google/AdSense.hs create mode 100644 gogol-adsense/gen/Network/Google/AdSense/Types.hs create mode 100644 gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs create mode 100644 gogol-adsense/gen/Network/Google/AdSense/Types/Sum.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adclients/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Customchannels/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/GetAdCode.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/Delete.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Adunits/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Payments/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Generate.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/Generate.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/URLchannels/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Adclients/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Customchannels/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/GetAdCode.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/Delete.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Adunits/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Dimensions/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Metrics/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Payments/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Generate.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/Generate.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/Get.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/List.hs create mode 100644 gogol-adsense/gen/Network/Google/Resource/AdSense/URLchannels/List.hs create mode 100644 gogol-adsense/gogol-adsense.cabal create mode 100644 gogol-adsense/src/.gitkeep create mode 100644 gogol-affiliates/LICENSE create mode 100644 gogol-affiliates/Makefile create mode 100644 gogol-affiliates/README.md create mode 100644 gogol-affiliates/Setup.hs create mode 100644 gogol-affiliates/gen/Network/Google/Affiliates.hs create mode 100644 gogol-affiliates/gen/Network/Google/Affiliates/Types.hs create mode 100644 gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs create mode 100644 gogol-affiliates/gen/Network/Google/Affiliates/Types/Sum.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/Get.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/List.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/CcOffers/List.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Events/List.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Get.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Insert.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Links/List.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/Get.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/List.hs create mode 100644 gogol-affiliates/gen/Network/Google/Resource/Gan/Reports/Get.hs create mode 100644 gogol-affiliates/gogol-affiliates.cabal create mode 100644 gogol-affiliates/src/.gitkeep create mode 100644 gogol-analytics/LICENSE create mode 100644 gogol-analytics/Makefile create mode 100644 gogol-analytics/README.md create mode 100644 gogol-analytics/Setup.hs create mode 100644 gogol-analytics/gen/Network/Google/Analytics.hs create mode 100644 gogol-analytics/gen/Network/Google/Analytics/Types.hs create mode 100644 gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs create mode 100644 gogol-analytics/gen/Network/Google/Analytics/Types/Sum.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Ga/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Mcf/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Realtime/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountSummaries/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Accounts/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDataSources/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Segments/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/DeleteUploadData.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/UploadData.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Get.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Patch.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Delete.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Insert.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Update.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Metadata/Columns/List.hs create mode 100644 gogol-analytics/gen/Network/Google/Resource/Analytics/Provisioning/CreateAccountTicket.hs create mode 100644 gogol-analytics/gogol-analytics.cabal create mode 100644 gogol-analytics/src/.gitkeep create mode 100644 gogol-appengine-taskqueue/LICENSE create mode 100644 gogol-appengine-taskqueue/Makefile create mode 100644 gogol-appengine-taskqueue/README.md create mode 100644 gogol-appengine-taskqueue/Setup.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Product.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Sum.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Taskqueues/Get.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Delete.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Get.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Insert.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Lease.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/List.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Patch.hs create mode 100644 gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Update.hs create mode 100644 gogol-appengine-taskqueue/gogol-appengine-taskqueue.cabal create mode 100644 gogol-appengine-taskqueue/src/.gitkeep create mode 100644 gogol-appengine/LICENSE create mode 100644 gogol-appengine/Makefile create mode 100644 gogol-appengine/README.md create mode 100644 gogol-appengine/Setup.hs create mode 100644 gogol-appengine/gen/Network/Google/AppEngine.hs create mode 100644 gogol-appengine/gen/Network/Google/AppEngine/Types.hs create mode 100644 gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs create mode 100644 gogol-appengine/gen/Network/Google/AppEngine/Types/Sum.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Get.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Delete.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Get.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/List.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Patch.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Create.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Delete.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Get.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/List.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/Get.hs create mode 100644 gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/List.hs create mode 100644 gogol-appengine/gogol-appengine.cabal create mode 100644 gogol-appengine/src/.gitkeep create mode 100644 gogol-apps-activity/LICENSE create mode 100644 gogol-apps-activity/Makefile create mode 100644 gogol-apps-activity/README.md create mode 100644 gogol-apps-activity/Setup.hs create mode 100644 gogol-apps-activity/gen/Network/Google/AppsActivity.hs create mode 100644 gogol-apps-activity/gen/Network/Google/AppsActivity/Types.hs create mode 100644 gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Product.hs create mode 100644 gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Sum.hs create mode 100644 gogol-apps-activity/gen/Network/Google/Resource/AppsActivity/Activities/List.hs create mode 100644 gogol-apps-activity/gogol-apps-activity.cabal create mode 100644 gogol-apps-activity/src/.gitkeep create mode 100644 gogol-apps-calendar/LICENSE create mode 100644 gogol-apps-calendar/Makefile create mode 100644 gogol-apps-calendar/README.md create mode 100644 gogol-apps-calendar/Setup.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/AppsCalendar.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Sum.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Delete.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Insert.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/List.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Patch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Update.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Delete.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Insert.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/List.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Patch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Update.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Watch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Clear.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Delete.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Insert.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Patch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Update.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Channels/Stop.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Colors/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Delete.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Import.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Insert.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Instances.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/List.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Move.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Patch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/QuickAdd.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Update.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Watch.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Freebusy/Query.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Get.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/List.hs create mode 100644 gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Watch.hs create mode 100644 gogol-apps-calendar/gogol-apps-calendar.cabal create mode 100644 gogol-apps-calendar/src/.gitkeep create mode 100644 gogol-apps-licensing/LICENSE create mode 100644 gogol-apps-licensing/Makefile create mode 100644 gogol-apps-licensing/README.md create mode 100644 gogol-apps-licensing/Setup.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/AppsLicensing.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Product.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Sum.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Delete.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Get.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Insert.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProduct.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProductAndSku.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Patch.hs create mode 100644 gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Update.hs create mode 100644 gogol-apps-licensing/gogol-apps-licensing.cabal create mode 100644 gogol-apps-licensing/src/.gitkeep create mode 100644 gogol-apps-reseller/LICENSE create mode 100644 gogol-apps-reseller/Makefile create mode 100644 gogol-apps-reseller/README.md create mode 100644 gogol-apps-reseller/Setup.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/AppsReseller.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Sum.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Get.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Insert.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Patch.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Update.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs create mode 100644 gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs create mode 100644 gogol-apps-reseller/gogol-apps-reseller.cabal create mode 100644 gogol-apps-reseller/src/.gitkeep create mode 100644 gogol-apps-tasks/LICENSE create mode 100644 gogol-apps-tasks/Makefile create mode 100644 gogol-apps-tasks/README.md create mode 100644 gogol-apps-tasks/Setup.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/AppsTasks.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/AppsTasks/Types.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Product.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Sum.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Delete.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Get.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Insert.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/List.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Patch.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Update.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Clear.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Delete.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Get.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Insert.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/List.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Move.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Patch.hs create mode 100644 gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Update.hs create mode 100644 gogol-apps-tasks/gogol-apps-tasks.cabal create mode 100644 gogol-apps-tasks/src/.gitkeep create mode 100644 gogol-bigquery/LICENSE create mode 100644 gogol-bigquery/Makefile create mode 100644 gogol-bigquery/README.md create mode 100644 gogol-bigquery/Setup.hs create mode 100644 gogol-bigquery/gen/Network/Google/BigQuery.hs create mode 100644 gogol-bigquery/gen/Network/Google/BigQuery/Types.hs create mode 100644 gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs create mode 100644 gogol-bigquery/gen/Network/Google/BigQuery/Types/Sum.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Delete.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Get.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Insert.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/List.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Patch.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Update.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Get.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/GetQueryResults.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Insert.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/List.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Query.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Projects/List.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/InsertAll.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/List.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Delete.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Get.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Insert.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/List.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Patch.hs create mode 100644 gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Update.hs create mode 100644 gogol-bigquery/gogol-bigquery.cabal create mode 100644 gogol-bigquery/src/.gitkeep create mode 100644 gogol-billing/LICENSE create mode 100644 gogol-billing/Makefile create mode 100644 gogol-billing/README.md create mode 100644 gogol-billing/Setup.hs create mode 100644 gogol-billing/gen/Network/Google/Billing.hs create mode 100644 gogol-billing/gen/Network/Google/Billing/Types.hs create mode 100644 gogol-billing/gen/Network/Google/Billing/Types/Product.hs create mode 100644 gogol-billing/gen/Network/Google/Billing/Types/Sum.hs create mode 100644 gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Get.hs create mode 100644 gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/List.hs create mode 100644 gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Projects/List.hs create mode 100644 gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/GetBillingInfo.hs create mode 100644 gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/UpdateBillingInfo.hs create mode 100644 gogol-billing/gogol-billing.cabal create mode 100644 gogol-billing/src/.gitkeep create mode 100644 gogol-blogger/LICENSE create mode 100644 gogol-blogger/Makefile create mode 100644 gogol-blogger/README.md create mode 100644 gogol-blogger/Setup.hs create mode 100644 gogol-blogger/gen/Network/Google/Blogger.hs create mode 100644 gogol-blogger/gen/Network/Google/Blogger/Types.hs create mode 100644 gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs create mode 100644 gogol-blogger/gen/Network/Google/Blogger/Types/Sum.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/GetByURL.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Approve.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Delete.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/List.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/ListByBlog.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/MarkAsSpam.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/RemoveContent.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/PageViews/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Delete.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Insert.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/List.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Patch.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Publish.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Revert.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Update.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/List.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Delete.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Get.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/GetByPath.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Insert.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/List.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Patch.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Publish.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Revert.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Search.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Update.hs create mode 100644 gogol-blogger/gen/Network/Google/Resource/Blogger/Users/Get.hs create mode 100644 gogol-blogger/gogol-blogger.cabal create mode 100644 gogol-blogger/src/.gitkeep create mode 100644 gogol-books/LICENSE create mode 100644 gogol-books/Makefile create mode 100644 gogol-books/README.md create mode 100644 gogol-books/Setup.hs create mode 100644 gogol-books/gen/Network/Google/Books.hs create mode 100644 gogol-books/gen/Network/Google/Books/Types.hs create mode 100644 gogol-books/gen/Network/Google/Books/Types/Product.hs create mode 100644 gogol-books/gen/Network/Google/Books/Types/Sum.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Bookshelves/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Volumes/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Cloudloading/AddBook.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Cloudloading/DeleteBook.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Cloudloading/UpdateBook.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Dictionary/ListOfflineMetadata.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Myconfig/GetUserSettings.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Myconfig/ReleaseDownloadAccess.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Myconfig/RequestAccess.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Myconfig/SyncVolumeLicenses.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Myconfig/UpdateUserSettings.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Delete.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Insert.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Summary.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Update.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/AddVolume.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/ClearVolumes.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/MoveVolume.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/RemoveVolume.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Volumes/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/SetPosition.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategories.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategoryVolumes.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Promooffer/Accept.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Promooffer/Dismiss.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Promooffer/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Associated/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Get.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/List.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/Rate.hs create mode 100644 gogol-books/gen/Network/Google/Resource/Books/Volumes/Useruploaded/List.hs create mode 100644 gogol-books/gogol-books.cabal create mode 100644 gogol-books/src/.gitkeep create mode 100644 gogol-civicinfo/LICENSE create mode 100644 gogol-civicinfo/Makefile create mode 100644 gogol-civicinfo/README.md create mode 100644 gogol-civicinfo/Setup.hs create mode 100644 gogol-civicinfo/gen/Network/Google/CivicInfo.hs create mode 100644 gogol-civicinfo/gen/Network/Google/CivicInfo/Types.hs create mode 100644 gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs create mode 100644 gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Sum.hs create mode 100644 gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Divisions/Search.hs create mode 100644 gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/ElectionQuery.hs create mode 100644 gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/VoterInfoQuery.hs create mode 100644 gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByAddress.hs create mode 100644 gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByDivision.hs create mode 100644 gogol-civicinfo/gogol-civicinfo.cabal create mode 100644 gogol-civicinfo/src/.gitkeep create mode 100644 gogol-classroom/LICENSE create mode 100644 gogol-classroom/Makefile create mode 100644 gogol-classroom/README.md create mode 100644 gogol-classroom/Setup.hs create mode 100644 gogol-classroom/gen/Network/Google/Classroom.hs create mode 100644 gogol-classroom/gen/Network/Google/Classroom/Types.hs create mode 100644 gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs create mode 100644 gogol-classroom/gen/Network/Google/Classroom/Types/Sum.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Create.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/List.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Create.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Delete.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Get.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/List.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Patch.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Create.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Delete.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Get.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/List.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Create.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Delete.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Get.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/List.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Update.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Accept.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Create.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Delete.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Get.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/List.hs create mode 100644 gogol-classroom/gen/Network/Google/Resource/Classroom/UserProfiles/Get.hs create mode 100644 gogol-classroom/gogol-classroom.cabal create mode 100644 gogol-classroom/src/.gitkeep create mode 100644 gogol-compute-autoscaler/LICENSE create mode 100644 gogol-compute-autoscaler/Makefile create mode 100644 gogol-compute-autoscaler/README.md create mode 100644 gogol-compute-autoscaler/Setup.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Product.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Sum.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Delete.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Get.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Insert.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/List.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Patch.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Update.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Delete.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Get.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/List.hs create mode 100644 gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs create mode 100644 gogol-compute-autoscaler/gogol-compute-autoscaler.cabal create mode 100644 gogol-compute-autoscaler/src/.gitkeep create mode 100644 gogol-compute-useraccounts/LICENSE create mode 100644 gogol-compute-useraccounts/Makefile create mode 100644 gogol-compute-useraccounts/README.md create mode 100644 gogol-compute-useraccounts/Setup.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Product.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Sum.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Delete.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Get.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/List.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/AddMember.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Delete.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Get.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Insert.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/List.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/RemoveMember.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetAuthorizedKeysView.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetLinuxAccountViews.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/AddPublicKey.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Delete.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Get.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Insert.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/List.hs create mode 100644 gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/RemovePublicKey.hs create mode 100644 gogol-compute-useraccounts/gogol-compute-useraccounts.cabal create mode 100644 gogol-compute-useraccounts/src/.gitkeep create mode 100644 gogol-compute/LICENSE create mode 100644 gogol-compute/Makefile create mode 100644 gogol-compute/README.md create mode 100644 gogol-compute/Setup.hs create mode 100644 gogol-compute/gen/Network/Google/Compute.hs create mode 100644 gogol-compute/gen/Network/Google/Compute/Types.hs create mode 100644 gogol-compute/gen/Network/Google/Compute/Types/Product.hs create mode 100644 gogol-compute/gen/Network/Google/Compute/Types/Sum.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Addresses/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Addresses/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Patch.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Update.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/GetHealth.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Patch.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Update.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/CreateSnapshot.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Disks/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Patch.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Update.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/SetTarget.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/SetTarget.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Patch.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Update.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Images/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Images/Deprecate.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Images/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Images/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Images/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AbandonInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/DeleteInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/ListManagedInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/RecreateInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Resize.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetInstanceTemplate.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetTargetPools.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AddInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/ListInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/RemoveInstances.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/SetNamedPorts.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/AddAccessConfig.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/AttachDisk.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/DeleteAccessConfig.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/DetachDisk.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetSerialPortOutput.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDiskAutoDelete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetScheduling.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetTags.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Start.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Instances/Stop.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Licenses/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Networks/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Networks/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Networks/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Networks/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Projects/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveDisk.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveInstance.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetCommonInstanceMetadata.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetUsageExportBucket.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Regions/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Regions/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Routes/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Routes/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Routes/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Routes/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/SetURLMap.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddHealthCheck.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddInstance.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/GetHealth.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveHealthCheck.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveInstance.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/SetBackup.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Patch.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Update.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Validate.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/AggregatedList.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Insert.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Delete.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/List.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Zones/Get.hs create mode 100644 gogol-compute/gen/Network/Google/Resource/Compute/Zones/List.hs create mode 100644 gogol-compute/gogol-compute.cabal create mode 100644 gogol-compute/src/.gitkeep create mode 100644 gogol-container/LICENSE create mode 100644 gogol-container/Makefile create mode 100644 gogol-container/README.md create mode 100644 gogol-container/Setup.hs create mode 100644 gogol-container/gen/Network/Google/Container.hs create mode 100644 gogol-container/gen/Network/Google/Container/Types.hs create mode 100644 gogol-container/gen/Network/Google/Container/Types/Product.hs create mode 100644 gogol-container/gen/Network/Google/Container/Types/Sum.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Clusters/List.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Operations/List.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Create.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Get.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/List.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Get.hs create mode 100644 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/List.hs create mode 100644 gogol-container/gogol-container.cabal create mode 100644 gogol-container/src/.gitkeep create mode 100644 gogol-customsearch/LICENSE create mode 100644 gogol-customsearch/Makefile create mode 100644 gogol-customsearch/README.md create mode 100644 gogol-customsearch/Setup.hs create mode 100644 gogol-customsearch/gen/Network/Google/CustomSearch.hs create mode 100644 gogol-customsearch/gen/Network/Google/CustomSearch/Types.hs create mode 100644 gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs create mode 100644 gogol-customsearch/gen/Network/Google/CustomSearch/Types/Sum.hs create mode 100644 gogol-customsearch/gen/Network/Google/Resource/Search/Cse/List.hs create mode 100644 gogol-customsearch/gogol-customsearch.cabal create mode 100644 gogol-customsearch/src/.gitkeep create mode 100644 gogol-dataflow/LICENSE create mode 100644 gogol-dataflow/Makefile create mode 100644 gogol-dataflow/README.md create mode 100644 gogol-dataflow/Setup.hs create mode 100644 gogol-dataflow/gen/Network/Google/Dataflow.hs create mode 100644 gogol-dataflow/gen/Network/Google/Dataflow/Types.hs create mode 100644 gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs create mode 100644 gogol-dataflow/gen/Network/Google/Dataflow/Types/Sum.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs create mode 100644 gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs create mode 100644 gogol-dataflow/gogol-dataflow.cabal create mode 100644 gogol-dataflow/src/.gitkeep create mode 100644 gogol-datastore/LICENSE create mode 100644 gogol-datastore/Makefile create mode 100644 gogol-datastore/README.md create mode 100644 gogol-datastore/Setup.hs create mode 100644 gogol-datastore/gen/Network/Google/Datastore.hs create mode 100644 gogol-datastore/gen/Network/Google/Datastore/Types.hs create mode 100644 gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs create mode 100644 gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/AllocateIds.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/BeginTransaction.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Commit.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Lookup.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Rollback.hs create mode 100644 gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/RunQuery.hs create mode 100644 gogol-datastore/gogol-datastore.cabal create mode 100644 gogol-datastore/src/.gitkeep create mode 100644 gogol-debugger/LICENSE create mode 100644 gogol-debugger/Makefile create mode 100644 gogol-debugger/README.md create mode 100644 gogol-debugger/Setup.hs create mode 100644 gogol-debugger/gen/Network/Google/Debugger.hs create mode 100644 gogol-debugger/gen/Network/Google/Debugger/Types.hs create mode 100644 gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs create mode 100644 gogol-debugger/gen/Network/Google/Debugger/Types/Sum.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/List.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/Update.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Register.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Delete.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Get.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/List.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Set.hs create mode 100644 gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/List.hs create mode 100644 gogol-debugger/gogol-debugger.cabal create mode 100644 gogol-debugger/src/.gitkeep create mode 100644 gogol-deploymentmanager/LICENSE create mode 100644 gogol-deploymentmanager/Makefile create mode 100644 gogol-deploymentmanager/README.md create mode 100644 gogol-deploymentmanager/Setup.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Sum.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Delete.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Get.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Insert.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/List.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Patch.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/Get.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/List.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/Get.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/List.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/Get.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/List.hs create mode 100644 gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Types/List.hs create mode 100644 gogol-deploymentmanager/gogol-deploymentmanager.cabal create mode 100644 gogol-deploymentmanager/src/.gitkeep create mode 100644 gogol-dfareporting/LICENSE create mode 100644 gogol-dfareporting/Makefile create mode 100644 gogol-dfareporting/README.md create mode 100644 gogol-dfareporting/Setup.hs create mode 100644 gogol-dfareporting/gen/Network/Google/DFAReporting.hs create mode 100644 gogol-dfareporting/gen/Network/Google/DFAReporting/Types.hs create mode 100644 gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs create mode 100644 gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountActiveAdSummaries/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Browsers/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeAssets/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DimensionValues/Query.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Generatetag.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Metros/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Generatetags.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Regions/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/CompatibleFields/Query.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Run.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Update.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Delete.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Get.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Insert.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/List.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Patch.hs create mode 100644 gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Update.hs create mode 100644 gogol-dfareporting/gogol-dfareporting.cabal create mode 100644 gogol-dfareporting/src/.gitkeep create mode 100644 gogol-discovery/LICENSE create mode 100644 gogol-discovery/Makefile create mode 100644 gogol-discovery/README.md create mode 100644 gogol-discovery/Setup.hs create mode 100644 gogol-discovery/gen/Network/Google/Discovery.hs create mode 100644 gogol-discovery/gen/Network/Google/Discovery/Types.hs create mode 100644 gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs create mode 100644 gogol-discovery/gen/Network/Google/Discovery/Types/Sum.hs create mode 100644 gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/GetRest.hs create mode 100644 gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/List.hs create mode 100644 gogol-discovery/gogol-discovery.cabal create mode 100644 gogol-discovery/src/.gitkeep create mode 100644 gogol-dns/LICENSE create mode 100644 gogol-dns/Makefile create mode 100644 gogol-dns/README.md create mode 100644 gogol-dns/Setup.hs create mode 100644 gogol-dns/gen/Network/Google/DNS.hs create mode 100644 gogol-dns/gen/Network/Google/DNS/Types.hs create mode 100644 gogol-dns/gen/Network/Google/DNS/Types/Product.hs create mode 100644 gogol-dns/gen/Network/Google/DNS/Types/Sum.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/Changes/Create.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/Changes/Get.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/Changes/List.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Create.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Delete.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Get.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/List.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/Projects/Get.hs create mode 100644 gogol-dns/gen/Network/Google/Resource/DNS/ResourceRecordSets/List.hs create mode 100644 gogol-dns/gogol-dns.cabal create mode 100644 gogol-dns/src/.gitkeep create mode 100644 gogol-doubleclick-bids/LICENSE create mode 100644 gogol-doubleclick-bids/Makefile create mode 100644 gogol-doubleclick-bids/README.md create mode 100644 gogol-doubleclick-bids/Setup.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Product.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Sum.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Downloadlineitems.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Uploadlineitems.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Createquery.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Deletequery.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Getquery.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Listqueries.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Runquery.hs create mode 100644 gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Reports/Listreports.hs create mode 100644 gogol-doubleclick-bids/gogol-doubleclick-bids.cabal create mode 100644 gogol-doubleclick-bids/src/.gitkeep create mode 100644 gogol-doubleclick-search/LICENSE create mode 100644 gogol-doubleclick-search/Makefile create mode 100644 gogol-doubleclick-search/README.md create mode 100644 gogol-doubleclick-search/Setup.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Sum.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Get.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Insert.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Patch.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Update.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/UpdateAvailability.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Generate.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Get.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/GetFile.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Request.hs create mode 100644 gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs create mode 100644 gogol-doubleclick-search/gogol-doubleclick-search.cabal create mode 100644 gogol-doubleclick-search/src/.gitkeep create mode 100644 gogol-drive/LICENSE create mode 100644 gogol-drive/Makefile create mode 100644 gogol-drive/README.md create mode 100644 gogol-drive/Setup.hs create mode 100644 gogol-drive/gen/Network/Google/Drive.hs create mode 100644 gogol-drive/gen/Network/Google/Drive/Types.hs create mode 100644 gogol-drive/gen/Network/Google/Drive/Types/Product.hs create mode 100644 gogol-drive/gen/Network/Google/Drive/Types/Sum.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/About/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Apps/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Apps/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Changes/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Changes/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Changes/Watch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Channels/Stop.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Children/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Children/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Children/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Children/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Comments/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Copy.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/EmptyTrash.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/GenerateIds.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Touch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Trash.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Untrash.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Files/Watch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Parents/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Parents/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Parents/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Parents/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/GetIdForEmail.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Properties/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/Insert.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Replies/Update.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Delete.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Get.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Patch.hs create mode 100644 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Update.hs create mode 100644 gogol-drive/gogol-drive.cabal create mode 100644 gogol-drive/src/.gitkeep create mode 100644 gogol-fitness/LICENSE create mode 100644 gogol-fitness/Makefile create mode 100644 gogol-fitness/README.md create mode 100644 gogol-fitness/Setup.hs create mode 100644 gogol-fitness/gen/Network/Google/Fitness.hs create mode 100644 gogol-fitness/gen/Network/Google/Fitness/Types.hs create mode 100644 gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs create mode 100644 gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Delete.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Get.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Patch.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Dataset/Aggregate.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs create mode 100644 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Update.hs create mode 100644 gogol-fitness/gogol-fitness.cabal create mode 100644 gogol-fitness/src/.gitkeep create mode 100644 gogol-fonts/LICENSE create mode 100644 gogol-fonts/Makefile create mode 100644 gogol-fonts/README.md create mode 100644 gogol-fonts/Setup.hs create mode 100644 gogol-fonts/gen/Network/Google/Fonts.hs create mode 100644 gogol-fonts/gen/Network/Google/Fonts/Types.hs create mode 100644 gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs create mode 100644 gogol-fonts/gen/Network/Google/Fonts/Types/Sum.hs create mode 100644 gogol-fonts/gen/Network/Google/Resource/Webfonts/Webfonts/List.hs create mode 100644 gogol-fonts/gogol-fonts.cabal create mode 100644 gogol-fonts/src/.gitkeep create mode 100644 gogol-freebasesearch/LICENSE create mode 100644 gogol-freebasesearch/Makefile create mode 100644 gogol-freebasesearch/README.md create mode 100644 gogol-freebasesearch/Setup.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/FreebaseSearch.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Product.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Sum.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/Method/Freebase/Reconcile.hs create mode 100644 gogol-freebasesearch/gen/Network/Google/Method/Freebase/Search.hs create mode 100644 gogol-freebasesearch/gogol-freebasesearch.cabal create mode 100644 gogol-freebasesearch/src/.gitkeep create mode 100644 gogol-fusiontables/LICENSE create mode 100644 gogol-fusiontables/Makefile create mode 100644 gogol-fusiontables/README.md create mode 100644 gogol-fusiontables/Setup.hs create mode 100644 gogol-fusiontables/gen/Network/Google/FusionTables.hs create mode 100644 gogol-fusiontables/gen/Network/Google/FusionTables/Types.hs create mode 100644 gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs create mode 100644 gogol-fusiontables/gen/Network/Google/FusionTables/Types/Sum.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Delete.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Get.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Insert.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/List.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Patch.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Update.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/Sql.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/SqlGet.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Delete.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Get.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Insert.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/List.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Patch.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Update.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Copy.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Delete.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Get.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportRows.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportTable.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Insert.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/List.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Patch.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ReplaceRows.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Update.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Delete.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Get.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/List.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Delete.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Get.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Insert.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/List.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Patch.hs create mode 100644 gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Update.hs create mode 100644 gogol-fusiontables/gogol-fusiontables.cabal create mode 100644 gogol-fusiontables/src/.gitkeep create mode 100644 gogol-games-appstate/LICENSE create mode 100644 gogol-games-appstate/Makefile create mode 100644 gogol-games-appstate/README.md create mode 100644 gogol-games-appstate/Setup.hs create mode 100644 gogol-games-appstate/gen/Network/Google/GamesAppState.hs create mode 100644 gogol-games-appstate/gen/Network/Google/GamesAppState/Types.hs create mode 100644 gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Product.hs create mode 100644 gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Sum.hs create mode 100644 gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Clear.hs create mode 100644 gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Delete.hs create mode 100644 gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Get.hs create mode 100644 gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/List.hs create mode 100644 gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Update.hs create mode 100644 gogol-games-appstate/gogol-games-appstate.cabal create mode 100644 gogol-games-appstate/src/.gitkeep create mode 100644 gogol-games-configuration/LICENSE create mode 100644 gogol-games-configuration/Makefile create mode 100644 gogol-games-configuration/README.md create mode 100644 gogol-games-configuration/Setup.hs create mode 100644 gogol-games-configuration/gen/Network/Google/GamesConfiguration.hs create mode 100644 gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types.hs create mode 100644 gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs create mode 100644 gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Sum.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Delete.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Insert.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/List.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Patch.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Update.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/ImageConfigurations/Upload.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Delete.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Get.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Insert.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/List.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Patch.hs create mode 100644 gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Update.hs create mode 100644 gogol-games-configuration/gogol-games-configuration.cabal create mode 100644 gogol-games-configuration/src/.gitkeep create mode 100644 gogol-games-management/LICENSE create mode 100644 gogol-games-management/Makefile create mode 100644 gogol-games-management/README.md create mode 100644 gogol-games-management/Setup.hs create mode 100644 gogol-games-management/gen/Network/Google/GamesManagement.hs create mode 100644 gogol-games-management/gen/Network/Google/GamesManagement/Types.hs create mode 100644 gogol-games-management/gen/Network/Google/GamesManagement/Types/Product.hs create mode 100644 gogol-games-management/gen/Network/Google/GamesManagement/Types/Sum.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAll.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAllForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetMultipleForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Applications/ListHidden.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAll.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAllForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetMultipleForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Hide.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Unhide.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAll.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAllForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetMultipleForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAll.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAllForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetMultipleForAllPlayers.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/Reset.hs create mode 100644 gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/ResetForAllPlayers.hs create mode 100644 gogol-games-management/gogol-games-management.cabal create mode 100644 gogol-games-management/src/.gitkeep create mode 100644 gogol-games/LICENSE create mode 100644 gogol-games/Makefile create mode 100644 gogol-games/README.md create mode 100644 gogol-games/Setup.hs create mode 100644 gogol-games/gen/Network/Google/Games.hs create mode 100644 gogol-games/gen/Network/Google/Games/Types.hs create mode 100644 gogol-games/gen/Network/Google/Games/Types/Product.hs create mode 100644 gogol-games/gen/Network/Google/Games/Types/Sum.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/AchievementDefinitions/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/Increment.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/Reveal.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/SetStepsAtLeast.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/Unlock.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Applications/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Applications/Played.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Events/ListByPlayer.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Events/ListDefinitions.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Events/Record.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Leaderboards/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Leaderboards/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Metagame/GetMetagameConfig.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Metagame/ListCategoriesByPlayer.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Players/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Players/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Remove.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Update.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/QuestMilestones/Claim.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Quests/Accept.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Quests/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Revisions/Check.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Create.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Decline.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Dismiss.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Join.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/Leave.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Rooms/ReportStatus.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Scores/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Scores/ListWindow.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Scores/Submit.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Scores/SubmitMultiple.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Snapshots/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/Snapshots/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Cancel.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Create.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Decline.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Dismiss.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Finish.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Get.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Join.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Leave.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/LeaveTurn.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/List.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Rematch.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Sync.hs create mode 100644 gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/TakeTurn.hs create mode 100644 gogol-games/gogol-games.cabal create mode 100644 gogol-games/src/.gitkeep create mode 100644 gogol-genomics/LICENSE create mode 100644 gogol-genomics/Makefile create mode 100644 gogol-genomics/README.md create mode 100644 gogol-genomics/Setup.hs create mode 100644 gogol-genomics/gen/Network/Google/Genomics.hs create mode 100644 gogol-genomics/gen/Network/Google/Genomics/Types.hs create mode 100644 gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs create mode 100644 gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/BatchCreate.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/List.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Undelete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Experimental/Jobs/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Cancel.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Align.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Call.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Coveragebuckets/List.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Export.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Import.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Reads/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/References/Bases/List.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/References/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/References/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Update.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Create.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Delete.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Export.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Get.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/ImportVariants.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/MergeVariants.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Patch.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Search.hs create mode 100644 gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Update.hs create mode 100644 gogol-genomics/gogol-genomics.cabal create mode 100644 gogol-genomics/src/.gitkeep create mode 100644 gogol-gmail/LICENSE create mode 100644 gogol-gmail/Makefile create mode 100644 gogol-gmail/README.md create mode 100644 gogol-gmail/Setup.hs create mode 100644 gogol-gmail/gen/Network/Google/Gmail.hs create mode 100644 gogol-gmail/gen/Network/Google/Gmail/Types.hs create mode 100644 gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs create mode 100644 gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Create.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Delete.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Get.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/List.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Send.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Update.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/GetProfile.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/History/List.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Create.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Delete.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Get.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/List.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Patch.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Update.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Attachments/Get.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Delete.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Get.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Import.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Insert.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/List.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Modify.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Send.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Trash.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Untrash.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Stop.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Delete.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Get.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/List.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Modify.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Trash.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Untrash.hs create mode 100644 gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Watch.hs create mode 100644 gogol-gmail/gogol-gmail.cabal create mode 100644 gogol-gmail/src/.gitkeep create mode 100644 gogol-groups-migration/LICENSE create mode 100644 gogol-groups-migration/Makefile create mode 100644 gogol-groups-migration/README.md create mode 100644 gogol-groups-migration/Setup.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsMigration.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsMigration/Types.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Product.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Sum.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsSettings.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsSettings/Types.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Product.hs create mode 100644 gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Sum.hs create mode 100644 gogol-groups-migration/gen/Network/Google/Resource/GroupsMigration/Archive/Insert.hs create mode 100644 gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Get.hs create mode 100644 gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Patch.hs create mode 100644 gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Update.hs create mode 100644 gogol-groups-migration/gogol-groups-migration.cabal create mode 100644 gogol-groups-migration/src/.gitkeep create mode 100644 gogol-identity-toolkit/LICENSE create mode 100644 gogol-identity-toolkit/Makefile create mode 100644 gogol-identity-toolkit/README.md create mode 100644 gogol-identity-toolkit/Setup.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Sum.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/CreateAuthURI.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DeleteAccount.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DownloadAccount.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetAccountInfo.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetOobConfirmationCode.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetPublicKeys.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetRecaptchaParam.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/ResetPassword.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/SetAccountInfo.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/UploadAccount.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyAssertion.hs create mode 100644 gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyPassword.hs create mode 100644 gogol-identity-toolkit/gogol-identity-toolkit.cabal create mode 100644 gogol-identity-toolkit/src/.gitkeep create mode 100644 gogol-latencytest/LICENSE create mode 100644 gogol-latencytest/Makefile create mode 100644 gogol-latencytest/README.md create mode 100644 gogol-latencytest/Setup.hs create mode 100644 gogol-latencytest/gen/Network/Google/LatencyTest.hs create mode 100644 gogol-latencytest/gen/Network/Google/LatencyTest/Types.hs create mode 100644 gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs create mode 100644 gogol-latencytest/gen/Network/Google/LatencyTest/Types/Sum.hs create mode 100644 gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updateaggregatedstats.hs create mode 100644 gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updatestats.hs create mode 100644 gogol-latencytest/gogol-latencytest.cabal create mode 100644 gogol-latencytest/src/.gitkeep create mode 100644 gogol-logging/LICENSE create mode 100644 gogol-logging/Makefile create mode 100644 gogol-logging/README.md create mode 100644 gogol-logging/Setup.hs create mode 100644 gogol-logging/gen/Network/Google/Logging.hs create mode 100644 gogol-logging/gen/Network/Google/Logging/Types.hs create mode 100644 gogol-logging/gen/Network/Google/Logging/Types/Product.hs create mode 100644 gogol-logging/gen/Network/Google/Logging/Types/Sum.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Indexes/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Create.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Delete.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Get.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Update.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Entries/Write.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Create.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Delete.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Get.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Update.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs create mode 100644 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs create mode 100644 gogol-logging/gogol-logging.cabal create mode 100644 gogol-logging/src/.gitkeep create mode 100644 gogol-maps-coordinate/LICENSE create mode 100644 gogol-maps-coordinate/Makefile create mode 100644 gogol-maps-coordinate/README.md create mode 100644 gogol-maps-coordinate/Setup.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/MapsCoordinate.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Sum.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Get.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/List.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Update.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Location/List.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Get.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Update.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Team/List.hs create mode 100644 gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Worker/List.hs create mode 100644 gogol-maps-coordinate/gogol-maps-coordinate.cabal create mode 100644 gogol-maps-coordinate/src/.gitkeep create mode 100644 gogol-maps-engine/LICENSE create mode 100644 gogol-maps-engine/Makefile create mode 100644 gogol-maps-engine/README.md create mode 100644 gogol-maps-engine/Setup.hs create mode 100644 gogol-maps-engine/gen/Network/Google/MapEngine.hs create mode 100644 gogol-maps-engine/gen/Network/Google/MapEngine/Types.hs create mode 100644 gogol-maps-engine/gen/Network/Google/MapEngine/Types/Product.hs create mode 100644 gogol-maps-engine/gen/Network/Google/MapEngine/Types/Sum.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Parents/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/CancelProcessing.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Create.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Delete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/GetPublished.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/ListPublished.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Parents/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Patch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchUpdate.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Process.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Publish.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Unpublish.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Create.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Delete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/GetPublished.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/ListPublished.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Patch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchUpdate.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Publish.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Unpublish.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Create.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/CancelProcessing.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Create.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Delete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Parents/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Patch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchUpdate.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Process.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchInsert.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Delete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Files/Insert.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Parents/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Patch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchUpdate.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Process.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Upload.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Create.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Delete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchInsert.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchPatch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Files/Insert.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Get.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Parents/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Patch.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchDelete.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchUpdate.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/List.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Process.hs create mode 100644 gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Upload.hs create mode 100644 gogol-maps-engine/gogol-maps-engine.cabal create mode 100644 gogol-maps-engine/src/.gitkeep create mode 100644 gogol-mirror/LICENSE create mode 100644 gogol-mirror/Makefile create mode 100644 gogol-mirror/README.md create mode 100644 gogol-mirror/Setup.hs create mode 100644 gogol-mirror/gen/Network/Google/Mirror.hs create mode 100644 gogol-mirror/gen/Network/Google/Mirror/Types.hs create mode 100644 gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs create mode 100644 gogol-mirror/gen/Network/Google/Mirror/Types/Sum.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Accounts/Insert.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Delete.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Get.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Insert.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/List.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Patch.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Update.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/Get.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/List.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Settings/Get.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Delete.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Insert.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/List.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Update.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Delete.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Get.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Insert.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/List.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Delete.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Get.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Insert.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/List.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Patch.hs create mode 100644 gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Update.hs create mode 100644 gogol-mirror/gogol-mirror.cabal create mode 100644 gogol-mirror/src/.gitkeep create mode 100644 gogol-monitoring/LICENSE create mode 100644 gogol-monitoring/Makefile create mode 100644 gogol-monitoring/README.md create mode 100644 gogol-monitoring/Setup.hs create mode 100644 gogol-monitoring/gen/Network/Google/Monitoring.hs create mode 100644 gogol-monitoring/gen/Network/Google/Monitoring/Types.hs create mode 100644 gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs create mode 100644 gogol-monitoring/gen/Network/Google/Monitoring/Types/Sum.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Create.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Delete.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/List.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/List.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/Write.hs create mode 100644 gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/TimeseriesDescriptors/List.hs create mode 100644 gogol-monitoring/gogol-monitoring.cabal create mode 100644 gogol-monitoring/src/.gitkeep create mode 100644 gogol-oauth2/LICENSE create mode 100644 gogol-oauth2/Makefile create mode 100644 gogol-oauth2/README.md create mode 100644 gogol-oauth2/Setup.hs create mode 100644 gogol-oauth2/gen/Network/Google/Method/OAuth2/GetCertForOpenIdConnect.hs create mode 100644 gogol-oauth2/gen/Network/Google/Method/OAuth2/Tokeninfo.hs create mode 100644 gogol-oauth2/gen/Network/Google/OAuth2.hs create mode 100644 gogol-oauth2/gen/Network/Google/OAuth2/Types.hs create mode 100644 gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs create mode 100644 gogol-oauth2/gen/Network/Google/OAuth2/Types/Sum.hs create mode 100644 gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/Get.hs create mode 100644 gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/V2/Me/Get.hs create mode 100644 gogol-oauth2/gogol-oauth2.cabal create mode 100644 gogol-oauth2/src/.gitkeep create mode 100644 gogol-pagespeed/LICENSE create mode 100644 gogol-pagespeed/Makefile create mode 100644 gogol-pagespeed/README.md create mode 100644 gogol-pagespeed/Setup.hs create mode 100644 gogol-pagespeed/gen/Network/Google/PageSpeed.hs create mode 100644 gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs create mode 100644 gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs create mode 100644 gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs create mode 100644 gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hs create mode 100644 gogol-pagespeed/gogol-pagespeed.cabal create mode 100644 gogol-pagespeed/src/.gitkeep create mode 100644 gogol-partners/LICENSE create mode 100644 gogol-partners/Makefile create mode 100644 gogol-partners/README.md create mode 100644 gogol-partners/Setup.hs create mode 100644 gogol-partners/gen/Network/Google/Partners.hs create mode 100644 gogol-partners/gen/Network/Google/Partners/Types.hs create mode 100644 gogol-partners/gen/Network/Google/Partners/Types/Product.hs create mode 100644 gogol-partners/gen/Network/Google/Partners/Types/Sum.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/ClientMessages/Log.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/Companies/Get.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/Companies/Leads/Create.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/Companies/List.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/UserEvents/Log.hs create mode 100644 gogol-partners/gen/Network/Google/Resource/Partners/UserStates/List.hs create mode 100644 gogol-partners/gogol-partners.cabal create mode 100644 gogol-partners/src/.gitkeep create mode 100644 gogol-play-developer/LICENSE create mode 100644 gogol-play-developer/Makefile create mode 100644 gogol-play-developer/README.md create mode 100644 gogol-play-developer/Setup.hs create mode 100644 gogol-play-developer/gen/Network/Google/PlayDeveloper.hs create mode 100644 gogol-play-developer/gen/Network/Google/PlayDeveloper/Types.hs create mode 100644 gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Product.hs create mode 100644 gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Sum.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Delete.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Deleteall.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Addexternallyhosted.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Upload.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Commit.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Delete.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Upload.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Delete.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Deleteall.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Upload.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Insert.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Delete.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Deleteall.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Validate.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Entitlements/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Batch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Delete.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Insert.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/List.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Patch.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Update.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Products/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Cancel.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Defer.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Get.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Refund.hs create mode 100644 gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Revoke.hs create mode 100644 gogol-play-developer/gogol-play-developer.cabal create mode 100644 gogol-play-developer/src/.gitkeep create mode 100644 gogol-play-enterprise/LICENSE create mode 100644 gogol-play-enterprise/Makefile create mode 100644 gogol-play-enterprise/README.md create mode 100644 gogol-play-enterprise/Setup.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/PlayEnterprise.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Product.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Sum.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Delete.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Insert.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Patch.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Update.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Delete.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Patch.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Update.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/GetState.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/SetState.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Delete.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Enroll.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Insert.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SendTestPushNotification.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SetAccount.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Unenroll.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Delete.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Patch.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Update.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenseusers/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Delete.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Patch.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Update.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Permissions/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Approve.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GenerateApprovalURL.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetAppRestrictionsSchema.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetPermissions.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/UpdatePermissions.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GenerateToken.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/Get.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GetAvailableProductSet.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/List.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/RevokeToken.hs create mode 100644 gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/SetAvailableProductSet.hs create mode 100644 gogol-play-enterprise/gogol-play-enterprise.cabal create mode 100644 gogol-play-enterprise/src/.gitkeep create mode 100644 gogol-play-moviespartner/LICENSE create mode 100644 gogol-play-moviespartner/Makefile create mode 100644 gogol-play-moviespartner/README.md create mode 100644 gogol-play-moviespartner/Setup.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Sum.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Avails/List.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/Get.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/List.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/Get.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/List.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/Country/Get.hs create mode 100644 gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/List.hs create mode 100644 gogol-play-moviespartner/gogol-play-moviespartner.cabal create mode 100644 gogol-play-moviespartner/src/.gitkeep create mode 100644 gogol-plus-domains/LICENSE create mode 100644 gogol-plus-domains/Makefile create mode 100644 gogol-plus-domains/README.md create mode 100644 gogol-plus-domains/Setup.hs create mode 100644 gogol-plus-domains/gen/Network/Google/PlusDomains.hs create mode 100644 gogol-plus-domains/gen/Network/Google/PlusDomains/Types.hs create mode 100644 gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs create mode 100644 gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Sum.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Get.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Insert.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/List.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Audiences/List.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/AddPeople.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Get.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Insert.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/List.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Patch.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Remove.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/RemovePeople.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Update.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Get.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Insert.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/List.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Media/Insert.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/Get.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/List.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByActivity.hs create mode 100644 gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByCircle.hs create mode 100644 gogol-plus-domains/gogol-plus-domains.cabal create mode 100644 gogol-plus-domains/src/.gitkeep create mode 100644 gogol-plus/LICENSE create mode 100644 gogol-plus/Makefile create mode 100644 gogol-plus/README.md create mode 100644 gogol-plus/Setup.hs create mode 100644 gogol-plus/gen/Network/Google/Plus.hs create mode 100644 gogol-plus/gen/Network/Google/Plus/Types.hs create mode 100644 gogol-plus/gen/Network/Google/Plus/Types/Product.hs create mode 100644 gogol-plus/gen/Network/Google/Plus/Types/Sum.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Activities/Get.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Activities/List.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Activities/Search.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Comments/Get.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Comments/List.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Moments/Insert.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/Moments/List.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/People/Get.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/People/List.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/People/ListByActivity.hs create mode 100644 gogol-plus/gen/Network/Google/Resource/Plus/People/Search.hs create mode 100644 gogol-plus/gogol-plus.cabal create mode 100644 gogol-plus/src/.gitkeep create mode 100644 gogol-prediction/LICENSE create mode 100644 gogol-prediction/Makefile create mode 100644 gogol-prediction/README.md create mode 100644 gogol-prediction/Setup.hs create mode 100644 gogol-prediction/gen/Network/Google/Prediction.hs create mode 100644 gogol-prediction/gen/Network/Google/Prediction/Types.hs create mode 100644 gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs create mode 100644 gogol-prediction/gen/Network/Google/Prediction/Types/Sum.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Hostedmodels/Predict.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Analyze.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Delete.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Get.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Insert.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/List.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Predict.hs create mode 100644 gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Update.hs create mode 100644 gogol-prediction/gogol-prediction.cabal create mode 100644 gogol-prediction/src/.gitkeep create mode 100644 gogol-proximitybeacon/LICENSE create mode 100644 gogol-proximitybeacon/Makefile create mode 100644 gogol-proximitybeacon/README.md create mode 100644 gogol-proximitybeacon/Setup.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Sum.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beaconinfo/Getforobserved.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Activate.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Create.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Delete.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/List.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Deactivate.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Decommission.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Diagnostics/List.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/List.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Update.hs create mode 100644 gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Namespaces/List.hs create mode 100644 gogol-proximitybeacon/gogol-proximitybeacon.cabal create mode 100644 gogol-proximitybeacon/src/.gitkeep create mode 100644 gogol-pubsub/LICENSE create mode 100644 gogol-pubsub/Makefile create mode 100644 gogol-pubsub/README.md create mode 100644 gogol-pubsub/Setup.hs create mode 100644 gogol-pubsub/gen/Network/Google/PubSub.hs create mode 100644 gogol-pubsub/gen/Network/Google/PubSub/Types.hs create mode 100644 gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs create mode 100644 gogol-pubsub/gen/Network/Google/PubSub/Types/Sum.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Acknowledge.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Create.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Delete.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Get.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/GetIAMPolicy.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/List.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyAckDeadline.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyPushConfig.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Pull.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/SetIAMPolicy.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/TestIAMPermissions.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Create.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Delete.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Get.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/GetIAMPolicy.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/List.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Publish.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Subscriptions/List.hs create mode 100644 gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/TestIAMPermissions.hs create mode 100644 gogol-pubsub/gogol-pubsub.cabal create mode 100644 gogol-pubsub/src/.gitkeep create mode 100644 gogol-qpxexpress/LICENSE create mode 100644 gogol-qpxexpress/Makefile create mode 100644 gogol-qpxexpress/README.md create mode 100644 gogol-qpxexpress/Setup.hs create mode 100644 gogol-qpxexpress/gen/Network/Google/QPXExpress.hs create mode 100644 gogol-qpxexpress/gen/Network/Google/QPXExpress/Types.hs create mode 100644 gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs create mode 100644 gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Sum.hs create mode 100644 gogol-qpxexpress/gen/Network/Google/Resource/QPXExpress/Trips/Search.hs create mode 100644 gogol-qpxexpress/gogol-qpxexpress.cabal create mode 100644 gogol-qpxexpress/src/.gitkeep create mode 100644 gogol-replicapool-updater/LICENSE create mode 100644 gogol-replicapool-updater/Makefile create mode 100644 gogol-replicapool-updater/README.md create mode 100644 gogol-replicapool-updater/Setup.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Product.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Sum.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Cancel.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Get.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Insert.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/List.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/ListInstanceUpdates.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Pause.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Resume.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Rollback.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/Get.hs create mode 100644 gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/List.hs create mode 100644 gogol-replicapool-updater/gogol-replicapool-updater.cabal create mode 100644 gogol-replicapool-updater/src/.gitkeep create mode 100644 gogol-replicapool/LICENSE create mode 100644 gogol-replicapool/Makefile create mode 100644 gogol-replicapool/README.md create mode 100644 gogol-replicapool/Setup.hs create mode 100644 gogol-replicapool/gen/Network/Google/InstanceGroupsManager.hs create mode 100644 gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types.hs create mode 100644 gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Product.hs create mode 100644 gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Sum.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/AbandonInstances.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Delete.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/DeleteInstances.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Get.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Insert.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/List.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/RecreateInstances.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Resize.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetInstanceTemplate.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetTargetPools.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/Get.hs create mode 100644 gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/List.hs create mode 100644 gogol-replicapool/gogol-replicapool.cabal create mode 100644 gogol-replicapool/src/.gitkeep create mode 100644 gogol-resourcemanager/LICENSE create mode 100644 gogol-resourcemanager/Makefile create mode 100644 gogol-resourcemanager/README.md create mode 100644 gogol-resourcemanager/Setup.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Get.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/GetIAMPolicy.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/List.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/SetIAMPolicy.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/TestIAMPermissions.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Update.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Create.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Delete.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Get.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/GetIAMPolicy.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/List.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/SetIAMPolicy.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/TestIAMPermissions.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Undelete.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Update.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/ResourceManager.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs create mode 100644 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs create mode 100644 gogol-resourcemanager/gogol-resourcemanager.cabal create mode 100644 gogol-resourcemanager/src/.gitkeep create mode 100644 gogol-resourceviews/LICENSE create mode 100644 gogol-resourceviews/Makefile create mode 100644 gogol-resourceviews/README.md create mode 100644 gogol-resourceviews/Setup.hs create mode 100644 gogol-resourceviews/gen/Network/Google/InstanceGroups.hs create mode 100644 gogol-resourceviews/gen/Network/Google/InstanceGroups/Types.hs create mode 100644 gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Product.hs create mode 100644 gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Sum.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/Get.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/List.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/AddResources.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Delete.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Get.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/GetService.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Insert.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/List.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/ListResources.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/RemoveResources.hs create mode 100644 gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/SetService.hs create mode 100644 gogol-resourceviews/gogol-resourceviews.cabal create mode 100644 gogol-resourceviews/src/.gitkeep create mode 100644 gogol-shopping-content/LICENSE create mode 100644 gogol-shopping-content/Makefile create mode 100644 gogol-shopping-content/README.md create mode 100644 gogol-shopping-content/Setup.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Acknowledge.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Advancetestorder.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancel.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancellineitem.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Createtestorder.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Custombatch.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Get.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Getbymerchantorderid.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Gettestordertemplate.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/List.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Refund.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Returnlineitem.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Shiplineitems.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updatemerchantorderid.hs create mode 100644 gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updateshipment.hs create mode 100644 gogol-shopping-content/gen/Network/Google/ShoppingContent.hs create mode 100644 gogol-shopping-content/gen/Network/Google/ShoppingContent/Types.hs create mode 100644 gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs create mode 100644 gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Sum.hs create mode 100644 gogol-shopping-content/gogol-shopping-content.cabal create mode 100644 gogol-shopping-content/src/.gitkeep create mode 100644 gogol-siteverification/LICENSE create mode 100644 gogol-siteverification/Makefile create mode 100644 gogol-siteverification/README.md create mode 100644 gogol-siteverification/Setup.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Delete.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Get.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/GetToken.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Insert.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/List.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Patch.hs create mode 100644 gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Update.hs create mode 100644 gogol-siteverification/gen/Network/Google/SiteVerification.hs create mode 100644 gogol-siteverification/gen/Network/Google/SiteVerification/Types.hs create mode 100644 gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs create mode 100644 gogol-siteverification/gen/Network/Google/SiteVerification/Types/Sum.hs create mode 100644 gogol-siteverification/gogol-siteverification.cabal create mode 100644 gogol-siteverification/src/.gitkeep create mode 100644 gogol-spectrum/LICENSE create mode 100644 gogol-spectrum/Makefile create mode 100644 gogol-spectrum/README.md create mode 100644 gogol-spectrum/Setup.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrum.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrumBatch.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Init.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/NotifySpectrumUse.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Register.hs create mode 100644 gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/VerifyDevice.hs create mode 100644 gogol-spectrum/gen/Network/Google/Spectrum.hs create mode 100644 gogol-spectrum/gen/Network/Google/Spectrum/Types.hs create mode 100644 gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs create mode 100644 gogol-spectrum/gen/Network/Google/Spectrum/Types/Sum.hs create mode 100644 gogol-spectrum/gogol-spectrum.cabal create mode 100644 gogol-spectrum/src/.gitkeep create mode 100644 gogol-sqladmin/LICENSE create mode 100644 gogol-sqladmin/Makefile create mode 100644 gogol-sqladmin/README.md create mode 100644 gogol-sqladmin/Setup.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Delete.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Get.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Delete.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Get.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Insert.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Patch.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Update.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Flags/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Clone.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Delete.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Export.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Get.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Import.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Insert.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Patch.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/PromoteReplica.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/ResetSSLConfig.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Restart.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/RestoreBackup.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StartReplica.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StopReplica.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Update.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/Get.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/CreateEphemeral.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Delete.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Get.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Insert.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Tiers/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Delete.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Insert.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/List.hs create mode 100644 gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Update.hs create mode 100644 gogol-sqladmin/gen/Network/Google/SQLAdmin.hs create mode 100644 gogol-sqladmin/gen/Network/Google/SQLAdmin/Types.hs create mode 100644 gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs create mode 100644 gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Sum.hs create mode 100644 gogol-sqladmin/gogol-sqladmin.cabal create mode 100644 gogol-sqladmin/src/.gitkeep create mode 100644 gogol-storage-transfer/LICENSE create mode 100644 gogol-storage-transfer/Makefile create mode 100644 gogol-storage-transfer/README.md create mode 100644 gogol-storage-transfer/Setup.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GetGoogleServiceAccount.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GoogleServiceAccounts/Get.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Create.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Get.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/List.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Patch.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Cancel.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Get.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/List.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Pause.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Resume.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/StorageTransfer.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs create mode 100644 gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Sum.hs create mode 100644 gogol-storage-transfer/gogol-storage-transfer.cabal create mode 100644 gogol-storage-transfer/src/.gitkeep create mode 100644 gogol-storage/LICENSE create mode 100644 gogol-storage/Makefile create mode 100644 gogol-storage/README.md create mode 100644 gogol-storage/Setup.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Delete.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Get.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Insert.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/List.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Patch.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Update.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Delete.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Get.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Insert.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/List.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Update.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Channels/Stop.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Delete.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Get.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Insert.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/List.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Patch.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Update.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Delete.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Get.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Insert.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/List.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Patch.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Update.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Compose.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Copy.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Delete.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Get.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Insert.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Patch.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs create mode 100644 gogol-storage/gen/Network/Google/Resource/Storage/Objects/WatchAll.hs create mode 100644 gogol-storage/gen/Network/Google/Storage.hs create mode 100644 gogol-storage/gen/Network/Google/Storage/Types.hs create mode 100644 gogol-storage/gen/Network/Google/Storage/Types/Product.hs create mode 100644 gogol-storage/gen/Network/Google/Storage/Types/Sum.hs create mode 100644 gogol-storage/gogol-storage.cabal create mode 100644 gogol-storage/src/.gitkeep create mode 100644 gogol-tagmanager/LICENSE create mode 100644 gogol-tagmanager/Makefile create mode 100644 gogol-tagmanager/README.md create mode 100644 gogol-tagmanager/Setup.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Entities/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Move_folders/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Publish.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Restore.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Undelete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Create.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Delete.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Get.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/List.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs create mode 100644 gogol-tagmanager/gen/Network/Google/TagManager.hs create mode 100644 gogol-tagmanager/gen/Network/Google/TagManager/Types.hs create mode 100644 gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs create mode 100644 gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs create mode 100644 gogol-tagmanager/gogol-tagmanager.cabal create mode 100644 gogol-tagmanager/src/.gitkeep create mode 100644 gogol-translate/LICENSE create mode 100644 gogol-translate/Makefile create mode 100644 gogol-translate/README.md create mode 100644 gogol-translate/Setup.hs create mode 100644 gogol-translate/gen/Network/Google/Resource/Language/Detections/List.hs create mode 100644 gogol-translate/gen/Network/Google/Resource/Language/Languages/List.hs create mode 100644 gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs create mode 100644 gogol-translate/gen/Network/Google/Translate.hs create mode 100644 gogol-translate/gen/Network/Google/Translate/Types.hs create mode 100644 gogol-translate/gen/Network/Google/Translate/Types/Product.hs create mode 100644 gogol-translate/gen/Network/Google/Translate/Types/Sum.hs create mode 100644 gogol-translate/gogol-translate.cabal create mode 100644 gogol-translate/src/.gitkeep create mode 100644 gogol-urlshortener/LICENSE create mode 100644 gogol-urlshortener/Makefile create mode 100644 gogol-urlshortener/README.md create mode 100644 gogol-urlshortener/Setup.hs create mode 100644 gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Get.hs create mode 100644 gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Insert.hs create mode 100644 gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/List.hs create mode 100644 gogol-urlshortener/gen/Network/Google/URLShortener.hs create mode 100644 gogol-urlshortener/gen/Network/Google/URLShortener/Types.hs create mode 100644 gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs create mode 100644 gogol-urlshortener/gen/Network/Google/URLShortener/Types/Sum.hs create mode 100644 gogol-urlshortener/gogol-urlshortener.cabal create mode 100644 gogol-urlshortener/src/.gitkeep create mode 100644 gogol-webmaster-tools/LICENSE create mode 100644 gogol-webmaster-tools/Makefile create mode 100644 gogol-webmaster-tools/README.md create mode 100644 gogol-webmaster-tools/Setup.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Searchanalytics/Query.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Delete.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Get.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/List.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Submit.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Add.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Delete.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Get.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/List.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorscounts/Query.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/Get.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/List.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/MarkAsFixed.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/WebmasterTools.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Product.hs create mode 100644 gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Sum.hs create mode 100644 gogol-webmaster-tools/gogol-webmaster-tools.cabal create mode 100644 gogol-webmaster-tools/src/.gitkeep create mode 100644 gogol-youtube-analytics/LICENSE create mode 100644 gogol-youtube-analytics/Makefile create mode 100644 gogol-youtube-analytics/README.md create mode 100644 gogol-youtube-analytics/Setup.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReportDefinitions/List.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReports/List.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Insert.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/List.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Delete.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Insert.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/List.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Update.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Reports/Query.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Product.hs create mode 100644 gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Sum.hs create mode 100644 gogol-youtube-analytics/gogol-youtube-analytics.cabal create mode 100644 gogol-youtube-analytics/src/.gitkeep create mode 100644 gogol-youtube/LICENSE create mode 100644 gogol-youtube/Makefile create mode 100644 gogol-youtube/README.md create mode 100644 gogol-youtube/Setup.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Download.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelBanners/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/MarkAsSpam.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/GuideCategories/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/I18nLanguages/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/I18nRegions/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind_direct.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Control.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Transition.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Search/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Thumbnails/Set.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/VideoAbuseReportReasons/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/VideoCategories/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Delete.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/GetRating.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Insert.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Rate.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/ReportAbuse.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Update.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Set.hs create mode 100644 gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Unset.hs create mode 100644 gogol-youtube/gen/Network/Google/YouTube.hs create mode 100644 gogol-youtube/gen/Network/Google/YouTube/Types.hs create mode 100644 gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs create mode 100644 gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs create mode 100644 gogol-youtube/gogol-youtube.cabal create mode 100644 gogol-youtube/src/.gitkeep diff --git a/gogol-adexchange-buyer/LICENSE b/gogol-adexchange-buyer/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-adexchange-buyer/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-adexchange-buyer/Makefile b/gogol-adexchange-buyer/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-adexchange-buyer/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-adexchange-buyer/README.md b/gogol-adexchange-buyer/README.md new file mode 100644 index 000000000..d221c9faf --- /dev/null +++ b/gogol-adexchange-buyer/README.md @@ -0,0 +1,28 @@ +# gogol-adexchange-buyer + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Ad Exchange Buyer API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-adexchange-buyer` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-adexchange-buyer/Setup.hs b/gogol-adexchange-buyer/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-adexchange-buyer/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer.hs b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer.hs new file mode 100644 index 000000000..759a72816 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer.hs @@ -0,0 +1,957 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdExchangeBuyer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Accesses your bidding-account information, submits creatives for +-- validation, finds available direct deals, and retrieves performance +-- reports. +-- +-- /See:/ +module Network.Google.AdExchangeBuyer + ( + -- * API + AdExchangeBuyerAPI + , adExchangeBuyerAPI + , adExchangeBuyerURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdexchangebuyerAccountsGet + , module AdExchangeBuyer.Accounts.Get + + -- ** AdexchangebuyerAccountsList + , module AdExchangeBuyer.Accounts.List + + -- ** AdexchangebuyerAccountsPatch + , module AdExchangeBuyer.Accounts.Patch + + -- ** AdexchangebuyerAccountsUpdate + , module AdExchangeBuyer.Accounts.Update + + -- ** AdexchangebuyerBillingInfoGet + , module AdExchangeBuyer.BillingInfo.Get + + -- ** AdexchangebuyerBillingInfoList + , module AdExchangeBuyer.BillingInfo.List + + -- ** AdexchangebuyerBudgetGet + , module AdExchangeBuyer.Budget.Get + + -- ** AdexchangebuyerBudgetPatch + , module AdExchangeBuyer.Budget.Patch + + -- ** AdexchangebuyerBudgetUpdate + , module AdExchangeBuyer.Budget.Update + + -- ** AdexchangebuyerClientaccessDelete + , module AdExchangeBuyer.Clientaccess.Delete + + -- ** AdexchangebuyerClientaccessGet + , module AdExchangeBuyer.Clientaccess.Get + + -- ** AdexchangebuyerClientaccessInsert + , module AdExchangeBuyer.Clientaccess.Insert + + -- ** AdexchangebuyerClientaccessList + , module AdExchangeBuyer.Clientaccess.List + + -- ** AdexchangebuyerClientaccessPatch + , module AdExchangeBuyer.Clientaccess.Patch + + -- ** AdexchangebuyerClientaccessUpdate + , module AdExchangeBuyer.Clientaccess.Update + + -- ** AdexchangebuyerCreativesGet + , module AdExchangeBuyer.Creatives.Get + + -- ** AdexchangebuyerCreativesInsert + , module AdExchangeBuyer.Creatives.Insert + + -- ** AdexchangebuyerCreativesList + , module AdExchangeBuyer.Creatives.List + + -- ** AdexchangebuyerDealsGet + , module AdExchangeBuyer.Deals.Get + + -- ** AdexchangebuyerMarketplacedealsDelete + , module AdExchangeBuyer.Marketplacedeals.Delete + + -- ** AdexchangebuyerMarketplacedealsInsert + , module AdExchangeBuyer.Marketplacedeals.Insert + + -- ** AdexchangebuyerMarketplacedealsList + , module AdExchangeBuyer.Marketplacedeals.List + + -- ** AdexchangebuyerMarketplacedealsUpdate + , module AdExchangeBuyer.Marketplacedeals.Update + + -- ** AdexchangebuyerMarketplacenotesInsert + , module AdExchangeBuyer.Marketplacenotes.Insert + + -- ** AdexchangebuyerMarketplacenotesList + , module AdExchangeBuyer.Marketplacenotes.List + + -- ** AdexchangebuyerMarketplaceoffersGet + , module AdExchangeBuyer.Marketplaceoffers.Get + + -- ** AdexchangebuyerMarketplaceoffersSearch + , module AdExchangeBuyer.Marketplaceoffers.Search + + -- ** AdexchangebuyerMarketplaceordersGet + , module AdExchangeBuyer.Marketplaceorders.Get + + -- ** AdexchangebuyerMarketplaceordersInsert + , module AdExchangeBuyer.Marketplaceorders.Insert + + -- ** AdexchangebuyerMarketplaceordersPatch + , module AdExchangeBuyer.Marketplaceorders.Patch + + -- ** AdexchangebuyerMarketplaceordersSearch + , module AdExchangeBuyer.Marketplaceorders.Search + + -- ** AdexchangebuyerMarketplaceordersUpdate + , module AdExchangeBuyer.Marketplaceorders.Update + + -- ** AdexchangebuyerNegotiationroundsInsert + , module AdExchangeBuyer.Negotiationrounds.Insert + + -- ** AdexchangebuyerNegotiationsGet + , module AdExchangeBuyer.Negotiations.Get + + -- ** AdexchangebuyerNegotiationsInsert + , module AdExchangeBuyer.Negotiations.Insert + + -- ** AdexchangebuyerNegotiationsList + , module AdExchangeBuyer.Negotiations.List + + -- ** AdexchangebuyerOffersGet + , module AdExchangeBuyer.Offers.Get + + -- ** AdexchangebuyerOffersInsert + , module AdExchangeBuyer.Offers.Insert + + -- ** AdexchangebuyerOffersList + , module AdExchangeBuyer.Offers.List + + -- ** AdexchangebuyerPerformanceReportList + , module AdExchangeBuyer.PerformanceReport.List + + -- ** AdexchangebuyerPretargetingConfigDelete + , module AdExchangeBuyer.PretargetingConfig.Delete + + -- ** AdexchangebuyerPretargetingConfigGet + , module AdExchangeBuyer.PretargetingConfig.Get + + -- ** AdexchangebuyerPretargetingConfigInsert + , module AdExchangeBuyer.PretargetingConfig.Insert + + -- ** AdexchangebuyerPretargetingConfigList + , module AdExchangeBuyer.PretargetingConfig.List + + -- ** AdexchangebuyerPretargetingConfigPatch + , module AdExchangeBuyer.PretargetingConfig.Patch + + -- ** AdexchangebuyerPretargetingConfigUpdate + , module AdExchangeBuyer.PretargetingConfig.Update + + -- * Types + + -- ** BrandDto + , BrandDto + , brandDto + , bdAdvertiserId + , bdName + , bdId + + -- ** EditAllOrderDealsResponse + , EditAllOrderDealsResponse + , editAllOrderDealsResponse + , eaodrDeals + + -- ** MarketplaceNote + , MarketplaceNote + , marketplaceNote + , mnNote + , mnKind + , mnTimestampMs + , mnDealId + , mnNoteId + , mnCreatorRole + , mnOrderId + , mnOrderRevisionNumber + + -- ** TermsDto + , TermsDto + , termsDto + , tdFinalizeAutomatically + , tdBuyerBillingType + , tdTargetingAllAdSlots + , tdUrls + , tdEndDate + , tdCpm + , tdEstimatedSpend + , tdAdvertisers + , tdEstimatedImpressionsPerDay + , tdMonetizerType + , tdAudienceSegmentDescription + , tdCreativeReviewPolicy + , tdMinimumTrueLooks + , tdStartDate + , tdCreativeBlockingLevel + , tdSemiTransparent + , tdAudienceSegment + , tdDealPremium + , tdIsReservation + , tdAdSlots + , tdTermsAttributes + , tdInventorySegmentTargeting + , tdDescriptiveName + , tdMinimumSpendMicros + , tdTargetByDealId + , tdBillingTerms + , tdDescription + + -- ** CreativesList + , CreativesList + , creativesList + , clNextPageToken + , clKind + , clItems + + -- ** CreateOrdersResponse + , CreateOrdersResponse + , createOrdersResponse + , corOrders + + -- ** AddOrderNotesRequest + , AddOrderNotesRequest + , addOrderNotesRequest + , aonrNotes + + -- ** MarketplaceDealParty + , MarketplaceDealParty + , marketplaceDealParty + , mdpSeller + , mdpBuyer + + -- ** DealPartyDto + , DealPartyDto + , dealPartyDto + , dpdBuyerSellerRole + , dpdCustomerId + , dpdName + , dpdWebProperty + , dpdBuyer + + -- ** DeliveryControlFrequencyCap + , DeliveryControlFrequencyCap + , deliveryControlFrequencyCap + , dcfcMaxImpressions + , dcfcNumTimeUnits + , dcfcTimeUnitType + + -- ** GetNegotiationsResponse + , GetNegotiationsResponse + , getNegotiationsResponse + , gnrKind + , gnrNegotiations + + -- ** Budget + , Budget + , budget + , bCurrencyCode + , bKind + , bBudgetAmount + , bAccountId + , bId + , bBillingId + + -- ** GetFinalizedNegotiationByExternalDealIdRequest + , GetFinalizedNegotiationByExternalDealIdRequest + , getFinalizedNegotiationByExternalDealIdRequest + , gfnbedirIncludePrivateAuctions + + -- ** PrivateData + , PrivateData + , privateData + , pdReferencePayload + , pdReferenceId + + -- ** AdSize + , AdSize + , adSize + , asHeight + , asWidth + + -- ** RuleKeyValuePair + , RuleKeyValuePair + , ruleKeyValuePair + , rkvpKeyName + , rkvpValue + + -- ** GetOrdersResponse + , GetOrdersResponse + , getOrdersResponse + , gorOrders + + -- ** AccountsList + , AccountsList + , accountsList + , alKind + , alItems + + -- ** GetOrderNotesResponse + , GetOrderNotesResponse + , getOrderNotesResponse + , gonrNotes + + -- ** CreateOrdersRequest + , CreateOrdersRequest + , createOrdersRequest + , cWebPropertyCode + , cOrders + + -- ** PricePerBuyer + , PricePerBuyer + , pricePerBuyer + , ppbPrice + , ppbBuyer + + -- ** TargetingValueDayPartTargetingDayPart + , TargetingValueDayPartTargetingDayPart + , targetingValueDayPartTargetingDayPart + , tvdptdpEndHour + , tvdptdpStartHour + , tvdptdpStartMinute + , tvdptdpDayOfWeek + , tvdptdpEndMinute + + -- ** DeliveryControl + , DeliveryControl + , deliveryControl + , dcFrequencyCaps + , dcDeliveryRateType + + -- ** Creative + , Creative + , creative + , cAttribute + , cNativeAd + , cHeight + , cBuyerCreativeId + , cAdvertiserName + , cAgencyId + , cCorrections + , cProductCategories + , cKind + , cHTMLSnippet + , cAdvertiserId + , cRestrictedCategories + , cDealsStatus + , cWidth + , cClickThroughUrl + , cVendorType + , cAccountId + , cImpressionTrackingUrl + , cFilteringReasons + , cVersion + , cSensitiveCategories + , cVideoURL + , cApiUploadTimestamp + , cServingRestrictions + , cOpenAuctionStatus + + -- ** AddOrderDealsResponse + , AddOrderDealsResponse + , addOrderDealsResponse + , aodrDeals + , aodrOrderRevisionNumber + + -- ** PretargetingConfigList + , PretargetingConfigList + , pretargetingConfigList + , pclKind + , pclItems + + -- ** BuyerDto + , BuyerDto + , buyerDto + , buySponsorAccountId + , buyEnabledForInterestTargetingDeals + , buyCustomerId + , buyEnabledForPreferredDeals + , buyAccountId + , buyDisplayName + , buyId + + -- ** DealTermsNonGuaranteedFixedPriceTerms + , DealTermsNonGuaranteedFixedPriceTerms + , dealTermsNonGuaranteedFixedPriceTerms + , dtngfptFixedPrices + + -- ** AdSlotDto + , AdSlotDto + , adSlotDto + , asdWebPropertyId + , asdSize + , asdChannelCode + , asdChannelId + , asdName + , asdDescription + + -- ** PerformanceReport + , PerformanceReport + , performanceReport + , prFilteredBidRate + , prKind + , prLatency95thPercentile + , prCookieMatcherStatusRate + , prHostedMatchStatusRate + , prUnsuccessfulRequestRate + , prBidRequestRate + , prQuotaThrottledLimit + , prQuotaConfiguredLimit + , prSuccessfulRequestRate + , prLatency85thPercentile + , prCalloutStatusRate + , prLatency50thPercentile + , prBidRate + , prCreativeStatusRate + , prNoQuotaInRegion + , prRegion + , prInventoryMatchRate + , prPixelMatchResponses + , prTimestamp + , prPixelMatchRequests + , prOutOfQuota + + -- ** Account + , Account + , account + , aMaximumTotalQps + , aKind + , aCookieMatchingUrl + , aMaximumActiveCreatives + , aCookieMatchingNid + , aNumberActiveCreatives + , aId + , aBidderLocation + + -- ** Seller + , Seller + , seller + , sAccountId + , sSubAccountId + + -- ** DeleteOrderDealsRequest + , DeleteOrderDealsRequest + , deleteOrderDealsRequest + , dodrUpdateAction + , dodrDealIds + , dodrOrderRevisionNumber + + -- ** GetOrderDealsResponse + , GetOrderDealsResponse + , getOrderDealsResponse + , godrDeals + + -- ** ContactInformation + , ContactInformation + , contactInformation + , ciEmail + , ciName + + -- ** TargetingValueCreativeSize + , TargetingValueCreativeSize + , targetingValueCreativeSize + , tvcsSize + , tvcsCompanionSizes + , tvcsCreativeSizeType + + -- ** PretargetingConfig + , PretargetingConfig + , pretargetingConfig + , pcPlatforms + , pcMobileCarriers + , pcVendorTypes + , pcExcludedGeoCriteriaIds + , pcSupportedCreativeAttributes + , pcUserLists + , pcKind + , pcExcludedPlacements + , pcMobileDevices + , pcLanguages + , pcVerticals + , pcConfigId + , pcPlacements + , pcExcludedUserLists + , pcConfigName + , pcGeoCriteriaIds + , pcDimensions + , pcExcludedVerticals + , pcCreativeType + , pcIsActive + , pcExcludedContentLabels + , pcBillingId + , pcMobileOperatingSystemVersions + + -- ** PerformanceReportList + , PerformanceReportList + , performanceReportList + , prlKind + , prlPerformanceReport + + -- ** NegotiationDto + , NegotiationDto + , negotiationDto + , ndNegotiationState + , ndExternalDealId + , ndStatus + , ndDealType + , ndNegotiationRounds + , ndKind + , ndBilledBuyer + , ndBuyerEmailContacts + , ndStats + , ndSeller + , ndLabelNames + , ndOfferId + , ndNegotiationId + , ndSellerEmailContacts + , ndBuyer + + -- ** AudienceSegment + , AudienceSegment + , audienceSegment + , asNumCookies + , asName + , asId + , asDescription + + -- ** OfferDto + , OfferDto + , offerDto + , odCreator + , odStatus + , odOfferState + , odPointOfContact + , odTerms + , odKind + , odBilledBuyer + , odOpenToDealParties + , odEmailContacts + , odLabelNames + , odOfferId + , odClosedToDealParties + , odAnonymous + , odIsOpen + + -- ** TargetingValueSize + , TargetingValueSize + , targetingValueSize + , tvsHeight + , tvsWidth + + -- ** MarketplaceOffer + , MarketplaceOffer + , marketplaceOffer + , moState + , moWebPropertyCode + , moCreationTimeMs + , moTerms + , moLastUpdateTimeMs + , moKind + , moRevisionNumber + , moHasCreatorSignedOff + , moFlightStartTimeMs + , moSharedTargetings + , moSeller + , moSyndicationProduct + , moFlightEndTimeMs + , moName + , moCreatorContacts + , moOfferId + , moLabels + + -- ** GetNegotiationsRequest + , GetNegotiationsRequest + , getNegotiationsRequest + , gnrSinceTimestampMillis + , gnrFinalized + , gnrIncludePrivateAuctions + + -- ** BillingInfoList + , BillingInfoList + , billingInfoList + , bilKind + , bilItems + + -- ** AddOrderNotesResponse + , AddOrderNotesResponse + , addOrderNotesResponse + , aNotes + + -- ** MoneyDto + , MoneyDto + , moneyDto + , mdCurrencyCode + , mdMicros + + -- ** ListClientAccessCapabilitiesResponse + , ListClientAccessCapabilitiesResponse + , listClientAccessCapabilitiesResponse + , lcacrClientAccessPermissions + + -- ** GetNegotiationByIdRequest + , GetNegotiationByIdRequest + , getNegotiationByIdRequest + , gnbirIncludePrivateAuctions + + -- ** ListOffersResponse + , ListOffersResponse + , listOffersResponse + , lorKind + , lorOffers + + -- ** AdvertiserDto + , AdvertiserDto + , advertiserDto + , adStatus + , adBrands + , adName + , adId + + -- ** TargetingValue + , TargetingValue + , targetingValue + , tvCreativeSizeValue + , tvStringValue + , tvLongValue + , tvDayPartTargetingValue + + -- ** Price + , Price + , price + , pCurrencyCode + , pAmountMicros + + -- ** EditAllOrderDealsRequest + , EditAllOrderDealsRequest + , editAllOrderDealsRequest + , eUpdateAction + , eDeals + , eOrder + , eOrderRevisionNumber + + -- ** BillingInfo + , BillingInfo + , billingInfo + , biKind + , biAccountName + , biAccountId + , biBillingId + + -- ** WebPropertyDto + , WebPropertyDto + , webPropertyDto + , wpdEnabledForPreferredDeals + , wpdSyndicationProduct + , wpdName + , wpdPropertyCode + , wpdId + , wpdSiteUrls + , wpdAllowInterestTargetedAds + + -- ** TargetingValueDayPartTargeting + , TargetingValueDayPartTargeting + , targetingValueDayPartTargeting + , tvdptTimeZoneType + , tvdptDayParts + + -- ** ListOffersRequest + , ListOffersRequest + , listOffersRequest + , lorSinceTimestampMillis + + -- ** ListClientAccessCapabilitiesRequest + , ListClientAccessCapabilitiesRequest + , listClientAccessCapabilitiesRequest + , lcacrSponsorAccountId + + -- ** InventorySegmentTargeting + , InventorySegmentTargeting + , inventorySegmentTargeting + , istNegativeVideoDurationSegments + , istNegativeIcmBrands + , istNegativeKeyValues + , istPositiveAudienceSegments + , istPositiveXfpPlacements + , istNegativeXfpAdSlots + , istPositiveOperatingSystemVersions + , istPositiveSizes + , istPositiveDeviceCategories + , istPositiveLocations + , istNegativeAdSizes + , istPositiveOperatingSystems + , istPositiveSiteUrls + , istNegativeInventorySlots + , istNegativeVideoAdPositionSegments + , istPositiveAdTypeSegments + , istPositiveIcmInterests + , istPositiveMobileApps + , istPositiveKeyValues + , istPositiveIcmBrands + , istPositiveVideoDurationSegments + , istNegativeAudienceSegments + , istNegativeXfpPlacements + , istPositiveXfpAdSlots + , istNegativeOperatingSystemVersions + , istNegativeSizes + , istNegativeLocations + , istNegativeDeviceCategories + , istNegativeOperatingSystems + , istPositiveAdSizes + , istNegativeSiteUrls + , istNegativeAdTypeSegments + , istPositiveVideoAdPositionSegments + , istPositiveInventorySlots + , istNegativeMobileApps + , istNegativeIcmInterests + + -- ** SharedTargeting + , SharedTargeting + , sharedTargeting + , stKey + , stExclusions + , stInclusions + + -- ** ClientAccessCapabilities + , ClientAccessCapabilities + , clientAccessCapabilities + , cacClientAccountId + , cacCapabilities + + -- ** DeleteOrderDealsResponse + , DeleteOrderDealsResponse + , deleteOrderDealsResponse + , dDeals + , dOrderRevisionNumber + + -- ** MarketplaceDeal + , MarketplaceDeal + , marketplaceDeal + , mdExternalDealId + , mdBuyerPrivateData + , mdWebPropertyCode + , mdCreationTimeMs + , mdTerms + , mdOfferRevisionNumber + , mdLastUpdateTimeMs + , mdKind + , mdDeliveryControl + , mdFlightStartTimeMs + , mdSharedTargetings + , mdDealId + , mdInventoryDescription + , mdSyndicationProduct + , mdFlightEndTimeMs + , mdName + , mdSellerContacts + , mdOfferId + , mdOrderId + + -- ** NegotiationRoundDto + , NegotiationRoundDto + , negotiationRoundDto + , nrdTerms + , nrdKind + , nrdOriginatorRole + , nrdAction + , nrdDbmPartnerId + , nrdNotes + , nrdNegotiationId + , nrdEditHistory + , nrdRoundNumber + + -- ** StatsDto + , StatsDto + , statsDto + , sdBids + , sdSpend + , sdImpressions + , sdGoodBids + , sdRevenue + , sdRequests + + -- ** GetOffersResponse + , GetOffersResponse + , getOffersResponse + , gorOffers + + -- ** DealTermsNonGuaranteedAuctionTerms + , DealTermsNonGuaranteedAuctionTerms + , dealTermsNonGuaranteedAuctionTerms + , dtngatReservePricePerBuyers + , dtngatPrivateAuctionId + + -- ** Buyer + , Buyer + , buyer + , bbAccountId + + -- ** MarketplaceLabel + , MarketplaceLabel + , marketplaceLabel + , mlDeprecatedMarketplaceDealParty + , mlAccountId + , mlCreateTimeMs + , mlLabel + + -- ** DateTime + , DateTime + , dateTime + , dtSecond + , dtDay + , dtYear + , dtHour + , dtMonth + , dtMinute + , dtTimeZoneId + + -- ** DealTermsGuaranteedFixedPriceTerms + , DealTermsGuaranteedFixedPriceTerms + , dealTermsGuaranteedFixedPriceTerms + , dtgfptGuaranteedLooks + , dtgfptGuaranteedImpressions + , dtgfptFixedPrices + + -- ** MarketplaceOrder + , MarketplaceOrder + , marketplaceOrder + , mBuyerPrivateData + , mIsSetupComplete + , mBuyerContacts + , mKind + , mOriginatorRole + , mRevisionNumber + , mBilledBuyer + , mIsRenegotiating + , mHasSellerSignedOff + , mSeller + , mOrderState + , mName + , mSellerContacts + , mLastUpdaterRole + , mLabels + , mRevisionTimeMs + , mOrderId + , mLastUpdaterOrCommentorRole + , mHasBuyerSignedOff + , mBuyer + + -- ** AddOrderDealsRequest + , AddOrderDealsRequest + , addOrderDealsRequest + , aUpdateAction + , aDeals + , aOrderRevisionNumber + + -- ** DealTerms + , DealTerms + , dealTerms + , dtNonGuaranteedFixedPriceTerms + , dtNonGuaranteedAuctionTerms + , dtGuaranteedFixedPriceTerms + , dtDescription + + -- ** EditHistoryDto + , EditHistoryDto + , editHistoryDto + , ehdLastUpdatedByLoginName + , ehdCreatedByLoginName + , ehdLastUpdateTimeStamp + , ehdCreatedTimeStamp + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude +import Network.Google.Resource.AdExchangeBuyer.Accounts.Get +import Network.Google.Resource.AdExchangeBuyer.Accounts.List +import Network.Google.Resource.AdExchangeBuyer.Accounts.Patch +import Network.Google.Resource.AdExchangeBuyer.Accounts.Update +import Network.Google.Resource.AdExchangeBuyer.BillingInfo.Get +import Network.Google.Resource.AdExchangeBuyer.BillingInfo.List +import Network.Google.Resource.AdExchangeBuyer.Budget.Get +import Network.Google.Resource.AdExchangeBuyer.Budget.Patch +import Network.Google.Resource.AdExchangeBuyer.Budget.Update +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.Delete +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.Get +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.Insert +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.List +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.Patch +import Network.Google.Resource.AdExchangeBuyer.Clientaccess.Update +import Network.Google.Resource.AdExchangeBuyer.Creatives.Get +import Network.Google.Resource.AdExchangeBuyer.Creatives.Insert +import Network.Google.Resource.AdExchangeBuyer.Creatives.List +import Network.Google.Resource.AdExchangeBuyer.Deals.Get +import Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Delete +import Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Insert +import Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.List +import Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Update +import Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.Insert +import Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.List +import Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Get +import Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Search +import Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Get +import Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Insert +import Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Patch +import Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Search +import Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Update +import Network.Google.Resource.AdExchangeBuyer.Negotiationrounds.Insert +import Network.Google.Resource.AdExchangeBuyer.Negotiations.Get +import Network.Google.Resource.AdExchangeBuyer.Negotiations.Insert +import Network.Google.Resource.AdExchangeBuyer.Negotiations.List +import Network.Google.Resource.AdExchangeBuyer.Offers.Get +import Network.Google.Resource.AdExchangeBuyer.Offers.Insert +import Network.Google.Resource.AdExchangeBuyer.Offers.List +import Network.Google.Resource.AdExchangeBuyer.PerformanceReport.List +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Delete +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Get +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Insert +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.List +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Patch +import Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Update + +{- $resources +TODO +-} + +type AdExchangeBuyerAPI = + Marketplacenotes :<|> Deals :<|> Negotiationrounds + :<|> Accounts + :<|> Budget + :<|> Creatives + :<|> PerformanceReport + :<|> Marketplaceoffers + :<|> PretargetingConfig + :<|> Marketplaceorders + :<|> Clientaccess + :<|> BillingInfo + :<|> Marketplacedeals + :<|> Negotiations + :<|> Offers + +adExchangeBuyerAPI :: Proxy AdExchangeBuyerAPI +adExchangeBuyerAPI = Proxy diff --git a/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types.hs b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types.hs new file mode 100644 index 000000000..c4a230f87 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types.hs @@ -0,0 +1,746 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeBuyer.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeBuyer.Types + ( + -- * Service URL + adExchangeBuyerURL + + -- * BrandDto + , BrandDto + , brandDto + , bdAdvertiserId + , bdName + , bdId + + -- * EditAllOrderDealsResponse + , EditAllOrderDealsResponse + , editAllOrderDealsResponse + , eaodrDeals + + -- * MarketplaceNote + , MarketplaceNote + , marketplaceNote + , mnNote + , mnKind + , mnTimestampMs + , mnDealId + , mnNoteId + , mnCreatorRole + , mnOrderId + , mnOrderRevisionNumber + + -- * TermsDto + , TermsDto + , termsDto + , tdFinalizeAutomatically + , tdBuyerBillingType + , tdTargetingAllAdSlots + , tdUrls + , tdEndDate + , tdCpm + , tdEstimatedSpend + , tdAdvertisers + , tdEstimatedImpressionsPerDay + , tdMonetizerType + , tdAudienceSegmentDescription + , tdCreativeReviewPolicy + , tdMinimumTrueLooks + , tdStartDate + , tdCreativeBlockingLevel + , tdSemiTransparent + , tdAudienceSegment + , tdDealPremium + , tdIsReservation + , tdAdSlots + , tdTermsAttributes + , tdInventorySegmentTargeting + , tdDescriptiveName + , tdMinimumSpendMicros + , tdTargetByDealId + , tdBillingTerms + , tdDescription + + -- * CreativesList + , CreativesList + , creativesList + , clNextPageToken + , clKind + , clItems + + -- * CreateOrdersResponse + , CreateOrdersResponse + , createOrdersResponse + , corOrders + + -- * AddOrderNotesRequest + , AddOrderNotesRequest + , addOrderNotesRequest + , aonrNotes + + -- * MarketplaceDealParty + , MarketplaceDealParty + , marketplaceDealParty + , mdpSeller + , mdpBuyer + + -- * DealPartyDto + , DealPartyDto + , dealPartyDto + , dpdBuyerSellerRole + , dpdCustomerId + , dpdName + , dpdWebProperty + , dpdBuyer + + -- * DeliveryControlFrequencyCap + , DeliveryControlFrequencyCap + , deliveryControlFrequencyCap + , dcfcMaxImpressions + , dcfcNumTimeUnits + , dcfcTimeUnitType + + -- * GetNegotiationsResponse + , GetNegotiationsResponse + , getNegotiationsResponse + , gnrKind + , gnrNegotiations + + -- * Budget + , Budget + , budget + , bCurrencyCode + , bKind + , bBudgetAmount + , bAccountId + , bId + , bBillingId + + -- * GetFinalizedNegotiationByExternalDealIdRequest + , GetFinalizedNegotiationByExternalDealIdRequest + , getFinalizedNegotiationByExternalDealIdRequest + , gfnbedirIncludePrivateAuctions + + -- * PrivateData + , PrivateData + , privateData + , pdReferencePayload + , pdReferenceId + + -- * AdSize + , AdSize + , adSize + , asHeight + , asWidth + + -- * RuleKeyValuePair + , RuleKeyValuePair + , ruleKeyValuePair + , rkvpKeyName + , rkvpValue + + -- * GetOrdersResponse + , GetOrdersResponse + , getOrdersResponse + , gorOrders + + -- * AccountsList + , AccountsList + , accountsList + , alKind + , alItems + + -- * GetOrderNotesResponse + , GetOrderNotesResponse + , getOrderNotesResponse + , gonrNotes + + -- * CreateOrdersRequest + , CreateOrdersRequest + , createOrdersRequest + , cWebPropertyCode + , cOrders + + -- * PricePerBuyer + , PricePerBuyer + , pricePerBuyer + , ppbPrice + , ppbBuyer + + -- * TargetingValueDayPartTargetingDayPart + , TargetingValueDayPartTargetingDayPart + , targetingValueDayPartTargetingDayPart + , tvdptdpEndHour + , tvdptdpStartHour + , tvdptdpStartMinute + , tvdptdpDayOfWeek + , tvdptdpEndMinute + + -- * DeliveryControl + , DeliveryControl + , deliveryControl + , dcFrequencyCaps + , dcDeliveryRateType + + -- * Creative + , Creative + , creative + , cAttribute + , cNativeAd + , cHeight + , cBuyerCreativeId + , cAdvertiserName + , cAgencyId + , cCorrections + , cProductCategories + , cKind + , cHTMLSnippet + , cAdvertiserId + , cRestrictedCategories + , cDealsStatus + , cWidth + , cClickThroughUrl + , cVendorType + , cAccountId + , cImpressionTrackingUrl + , cFilteringReasons + , cVersion + , cSensitiveCategories + , cVideoURL + , cApiUploadTimestamp + , cServingRestrictions + , cOpenAuctionStatus + + -- * AddOrderDealsResponse + , AddOrderDealsResponse + , addOrderDealsResponse + , aodrDeals + , aodrOrderRevisionNumber + + -- * PretargetingConfigList + , PretargetingConfigList + , pretargetingConfigList + , pclKind + , pclItems + + -- * BuyerDto + , BuyerDto + , buyerDto + , buySponsorAccountId + , buyEnabledForInterestTargetingDeals + , buyCustomerId + , buyEnabledForPreferredDeals + , buyAccountId + , buyDisplayName + , buyId + + -- * DealTermsNonGuaranteedFixedPriceTerms + , DealTermsNonGuaranteedFixedPriceTerms + , dealTermsNonGuaranteedFixedPriceTerms + , dtngfptFixedPrices + + -- * AdSlotDto + , AdSlotDto + , adSlotDto + , asdWebPropertyId + , asdSize + , asdChannelCode + , asdChannelId + , asdName + , asdDescription + + -- * PerformanceReport + , PerformanceReport + , performanceReport + , prFilteredBidRate + , prKind + , prLatency95thPercentile + , prCookieMatcherStatusRate + , prHostedMatchStatusRate + , prUnsuccessfulRequestRate + , prBidRequestRate + , prQuotaThrottledLimit + , prQuotaConfiguredLimit + , prSuccessfulRequestRate + , prLatency85thPercentile + , prCalloutStatusRate + , prLatency50thPercentile + , prBidRate + , prCreativeStatusRate + , prNoQuotaInRegion + , prRegion + , prInventoryMatchRate + , prPixelMatchResponses + , prTimestamp + , prPixelMatchRequests + , prOutOfQuota + + -- * Account + , Account + , account + , aMaximumTotalQps + , aKind + , aCookieMatchingUrl + , aMaximumActiveCreatives + , aCookieMatchingNid + , aNumberActiveCreatives + , aId + , aBidderLocation + + -- * Seller + , Seller + , seller + , sAccountId + , sSubAccountId + + -- * DeleteOrderDealsRequest + , DeleteOrderDealsRequest + , deleteOrderDealsRequest + , dodrUpdateAction + , dodrDealIds + , dodrOrderRevisionNumber + + -- * GetOrderDealsResponse + , GetOrderDealsResponse + , getOrderDealsResponse + , godrDeals + + -- * ContactInformation + , ContactInformation + , contactInformation + , ciEmail + , ciName + + -- * TargetingValueCreativeSize + , TargetingValueCreativeSize + , targetingValueCreativeSize + , tvcsSize + , tvcsCompanionSizes + , tvcsCreativeSizeType + + -- * PretargetingConfig + , PretargetingConfig + , pretargetingConfig + , pcPlatforms + , pcMobileCarriers + , pcVendorTypes + , pcExcludedGeoCriteriaIds + , pcSupportedCreativeAttributes + , pcUserLists + , pcKind + , pcExcludedPlacements + , pcMobileDevices + , pcLanguages + , pcVerticals + , pcConfigId + , pcPlacements + , pcExcludedUserLists + , pcConfigName + , pcGeoCriteriaIds + , pcDimensions + , pcExcludedVerticals + , pcCreativeType + , pcIsActive + , pcExcludedContentLabels + , pcBillingId + , pcMobileOperatingSystemVersions + + -- * PerformanceReportList + , PerformanceReportList + , performanceReportList + , prlKind + , prlPerformanceReport + + -- * NegotiationDto + , NegotiationDto + , negotiationDto + , ndNegotiationState + , ndExternalDealId + , ndStatus + , ndDealType + , ndNegotiationRounds + , ndKind + , ndBilledBuyer + , ndBuyerEmailContacts + , ndStats + , ndSeller + , ndLabelNames + , ndOfferId + , ndNegotiationId + , ndSellerEmailContacts + , ndBuyer + + -- * AudienceSegment + , AudienceSegment + , audienceSegment + , asNumCookies + , asName + , asId + , asDescription + + -- * OfferDto + , OfferDto + , offerDto + , odCreator + , odStatus + , odOfferState + , odPointOfContact + , odTerms + , odKind + , odBilledBuyer + , odOpenToDealParties + , odEmailContacts + , odLabelNames + , odOfferId + , odClosedToDealParties + , odAnonymous + , odIsOpen + + -- * TargetingValueSize + , TargetingValueSize + , targetingValueSize + , tvsHeight + , tvsWidth + + -- * MarketplaceOffer + , MarketplaceOffer + , marketplaceOffer + , moState + , moWebPropertyCode + , moCreationTimeMs + , moTerms + , moLastUpdateTimeMs + , moKind + , moRevisionNumber + , moHasCreatorSignedOff + , moFlightStartTimeMs + , moSharedTargetings + , moSeller + , moSyndicationProduct + , moFlightEndTimeMs + , moName + , moCreatorContacts + , moOfferId + , moLabels + + -- * GetNegotiationsRequest + , GetNegotiationsRequest + , getNegotiationsRequest + , gnrSinceTimestampMillis + , gnrFinalized + , gnrIncludePrivateAuctions + + -- * BillingInfoList + , BillingInfoList + , billingInfoList + , bilKind + , bilItems + + -- * AddOrderNotesResponse + , AddOrderNotesResponse + , addOrderNotesResponse + , aNotes + + -- * MoneyDto + , MoneyDto + , moneyDto + , mdCurrencyCode + , mdMicros + + -- * ListClientAccessCapabilitiesResponse + , ListClientAccessCapabilitiesResponse + , listClientAccessCapabilitiesResponse + , lcacrClientAccessPermissions + + -- * GetNegotiationByIdRequest + , GetNegotiationByIdRequest + , getNegotiationByIdRequest + , gnbirIncludePrivateAuctions + + -- * ListOffersResponse + , ListOffersResponse + , listOffersResponse + , lorKind + , lorOffers + + -- * AdvertiserDto + , AdvertiserDto + , advertiserDto + , adStatus + , adBrands + , adName + , adId + + -- * TargetingValue + , TargetingValue + , targetingValue + , tvCreativeSizeValue + , tvStringValue + , tvLongValue + , tvDayPartTargetingValue + + -- * Price + , Price + , price + , pCurrencyCode + , pAmountMicros + + -- * EditAllOrderDealsRequest + , EditAllOrderDealsRequest + , editAllOrderDealsRequest + , eUpdateAction + , eDeals + , eOrder + , eOrderRevisionNumber + + -- * BillingInfo + , BillingInfo + , billingInfo + , biKind + , biAccountName + , biAccountId + , biBillingId + + -- * WebPropertyDto + , WebPropertyDto + , webPropertyDto + , wpdEnabledForPreferredDeals + , wpdSyndicationProduct + , wpdName + , wpdPropertyCode + , wpdId + , wpdSiteUrls + , wpdAllowInterestTargetedAds + + -- * TargetingValueDayPartTargeting + , TargetingValueDayPartTargeting + , targetingValueDayPartTargeting + , tvdptTimeZoneType + , tvdptDayParts + + -- * ListOffersRequest + , ListOffersRequest + , listOffersRequest + , lorSinceTimestampMillis + + -- * ListClientAccessCapabilitiesRequest + , ListClientAccessCapabilitiesRequest + , listClientAccessCapabilitiesRequest + , lcacrSponsorAccountId + + -- * InventorySegmentTargeting + , InventorySegmentTargeting + , inventorySegmentTargeting + , istNegativeVideoDurationSegments + , istNegativeIcmBrands + , istNegativeKeyValues + , istPositiveAudienceSegments + , istPositiveXfpPlacements + , istNegativeXfpAdSlots + , istPositiveOperatingSystemVersions + , istPositiveSizes + , istPositiveDeviceCategories + , istPositiveLocations + , istNegativeAdSizes + , istPositiveOperatingSystems + , istPositiveSiteUrls + , istNegativeInventorySlots + , istNegativeVideoAdPositionSegments + , istPositiveAdTypeSegments + , istPositiveIcmInterests + , istPositiveMobileApps + , istPositiveKeyValues + , istPositiveIcmBrands + , istPositiveVideoDurationSegments + , istNegativeAudienceSegments + , istNegativeXfpPlacements + , istPositiveXfpAdSlots + , istNegativeOperatingSystemVersions + , istNegativeSizes + , istNegativeLocations + , istNegativeDeviceCategories + , istNegativeOperatingSystems + , istPositiveAdSizes + , istNegativeSiteUrls + , istNegativeAdTypeSegments + , istPositiveVideoAdPositionSegments + , istPositiveInventorySlots + , istNegativeMobileApps + , istNegativeIcmInterests + + -- * SharedTargeting + , SharedTargeting + , sharedTargeting + , stKey + , stExclusions + , stInclusions + + -- * ClientAccessCapabilities + , ClientAccessCapabilities + , clientAccessCapabilities + , cacClientAccountId + , cacCapabilities + + -- * DeleteOrderDealsResponse + , DeleteOrderDealsResponse + , deleteOrderDealsResponse + , dDeals + , dOrderRevisionNumber + + -- * MarketplaceDeal + , MarketplaceDeal + , marketplaceDeal + , mdExternalDealId + , mdBuyerPrivateData + , mdWebPropertyCode + , mdCreationTimeMs + , mdTerms + , mdOfferRevisionNumber + , mdLastUpdateTimeMs + , mdKind + , mdDeliveryControl + , mdFlightStartTimeMs + , mdSharedTargetings + , mdDealId + , mdInventoryDescription + , mdSyndicationProduct + , mdFlightEndTimeMs + , mdName + , mdSellerContacts + , mdOfferId + , mdOrderId + + -- * NegotiationRoundDto + , NegotiationRoundDto + , negotiationRoundDto + , nrdTerms + , nrdKind + , nrdOriginatorRole + , nrdAction + , nrdDbmPartnerId + , nrdNotes + , nrdNegotiationId + , nrdEditHistory + , nrdRoundNumber + + -- * StatsDto + , StatsDto + , statsDto + , sdBids + , sdSpend + , sdImpressions + , sdGoodBids + , sdRevenue + , sdRequests + + -- * GetOffersResponse + , GetOffersResponse + , getOffersResponse + , gorOffers + + -- * DealTermsNonGuaranteedAuctionTerms + , DealTermsNonGuaranteedAuctionTerms + , dealTermsNonGuaranteedAuctionTerms + , dtngatReservePricePerBuyers + , dtngatPrivateAuctionId + + -- * Buyer + , Buyer + , buyer + , bbAccountId + + -- * MarketplaceLabel + , MarketplaceLabel + , marketplaceLabel + , mlDeprecatedMarketplaceDealParty + , mlAccountId + , mlCreateTimeMs + , mlLabel + + -- * DateTime + , DateTime + , dateTime + , dtSecond + , dtDay + , dtYear + , dtHour + , dtMonth + , dtMinute + , dtTimeZoneId + + -- * DealTermsGuaranteedFixedPriceTerms + , DealTermsGuaranteedFixedPriceTerms + , dealTermsGuaranteedFixedPriceTerms + , dtgfptGuaranteedLooks + , dtgfptGuaranteedImpressions + , dtgfptFixedPrices + + -- * MarketplaceOrder + , MarketplaceOrder + , marketplaceOrder + , mBuyerPrivateData + , mIsSetupComplete + , mBuyerContacts + , mKind + , mOriginatorRole + , mRevisionNumber + , mBilledBuyer + , mIsRenegotiating + , mHasSellerSignedOff + , mSeller + , mOrderState + , mName + , mSellerContacts + , mLastUpdaterRole + , mLabels + , mRevisionTimeMs + , mOrderId + , mLastUpdaterOrCommentorRole + , mHasBuyerSignedOff + , mBuyer + + -- * AddOrderDealsRequest + , AddOrderDealsRequest + , addOrderDealsRequest + , aUpdateAction + , aDeals + , aOrderRevisionNumber + + -- * DealTerms + , DealTerms + , dealTerms + , dtNonGuaranteedFixedPriceTerms + , dtNonGuaranteedAuctionTerms + , dtGuaranteedFixedPriceTerms + , dtDescription + + -- * EditHistoryDto + , EditHistoryDto + , editHistoryDto + , ehdLastUpdatedByLoginName + , ehdCreatedByLoginName + , ehdLastUpdateTimeStamp + , ehdCreatedTimeStamp + ) where + +import Network.Google.AdExchangeBuyer.Types.Product +import Network.Google.AdExchangeBuyer.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1.4' of the Ad Exchange Buyer API. +adExchangeBuyerURL :: BaseURL +adExchangeBuyerURL + = BaseUrl Https + "https://www.googleapis.com/adexchangebuyer/v1.4/" + 443 diff --git a/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs new file mode 100644 index 000000000..bab742cbd --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs @@ -0,0 +1,6898 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeBuyer.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeBuyer.Types.Product where + +import Network.Google.AdExchangeBuyer.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'brandDto' smart constructor. +data BrandDto = BrandDto + { _bdAdvertiserId :: !(Maybe Int64) + , _bdName :: !(Maybe Text) + , _bdId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BrandDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bdAdvertiserId' +-- +-- * 'bdName' +-- +-- * 'bdId' +brandDto + :: BrandDto +brandDto = + BrandDto + { _bdAdvertiserId = Nothing + , _bdName = Nothing + , _bdId = Nothing + } + +bdAdvertiserId :: Lens' BrandDto (Maybe Int64) +bdAdvertiserId + = lens _bdAdvertiserId + (\ s a -> s{_bdAdvertiserId = a}) + +bdName :: Lens' BrandDto (Maybe Text) +bdName = lens _bdName (\ s a -> s{_bdName = a}) + +bdId :: Lens' BrandDto (Maybe Int64) +bdId = lens _bdId (\ s a -> s{_bdId = a}) + +instance FromJSON BrandDto where + parseJSON + = withObject "BrandDto" + (\ o -> + BrandDto <$> + (o .:? "advertiserId") <*> (o .:? "name") <*> + (o .:? "id")) + +instance ToJSON BrandDto where + toJSON BrandDto{..} + = object + (catMaybes + [("advertiserId" .=) <$> _bdAdvertiserId, + ("name" .=) <$> _bdName, ("id" .=) <$> _bdId]) + +-- +-- /See:/ 'editAllOrderDealsResponse' smart constructor. +newtype EditAllOrderDealsResponse = EditAllOrderDealsResponse + { _eaodrDeals :: Maybe [Maybe MarketplaceDeal] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditAllOrderDealsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eaodrDeals' +editAllOrderDealsResponse + :: EditAllOrderDealsResponse +editAllOrderDealsResponse = + EditAllOrderDealsResponse + { _eaodrDeals = Nothing + } + +-- | List of all deals in the order after edit. +eaodrDeals :: Lens' EditAllOrderDealsResponse [Maybe MarketplaceDeal] +eaodrDeals + = lens _eaodrDeals (\ s a -> s{_eaodrDeals = a}) . + _Default + . _Coerce + +instance FromJSON EditAllOrderDealsResponse where + parseJSON + = withObject "EditAllOrderDealsResponse" + (\ o -> + EditAllOrderDealsResponse <$> + (o .:? "deals" .!= mempty)) + +instance ToJSON EditAllOrderDealsResponse where + toJSON EditAllOrderDealsResponse{..} + = object (catMaybes [("deals" .=) <$> _eaodrDeals]) + +-- | An order is associated with a bunch of notes which may optionally be +-- associated with a deal and\/or revision number. +-- +-- /See:/ 'marketplaceNote' smart constructor. +data MarketplaceNote = MarketplaceNote + { _mnNote :: !(Maybe Text) + , _mnKind :: !Text + , _mnTimestampMs :: !(Maybe Int64) + , _mnDealId :: !(Maybe Text) + , _mnNoteId :: !(Maybe Text) + , _mnCreatorRole :: !(Maybe Text) + , _mnOrderId :: !(Maybe Text) + , _mnOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceNote' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mnNote' +-- +-- * 'mnKind' +-- +-- * 'mnTimestampMs' +-- +-- * 'mnDealId' +-- +-- * 'mnNoteId' +-- +-- * 'mnCreatorRole' +-- +-- * 'mnOrderId' +-- +-- * 'mnOrderRevisionNumber' +marketplaceNote + :: MarketplaceNote +marketplaceNote = + MarketplaceNote + { _mnNote = Nothing + , _mnKind = "adexchangebuyer#marketplaceNote" + , _mnTimestampMs = Nothing + , _mnDealId = Nothing + , _mnNoteId = Nothing + , _mnCreatorRole = Nothing + , _mnOrderId = Nothing + , _mnOrderRevisionNumber = Nothing + } + +-- | The actual note to attach. (readonly, except on create) +mnNote :: Lens' MarketplaceNote (Maybe Text) +mnNote = lens _mnNote (\ s a -> s{_mnNote = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"adexchangebuyer#marketplaceNote\". +mnKind :: Lens' MarketplaceNote Text +mnKind = lens _mnKind (\ s a -> s{_mnKind = a}) + +-- | The timestamp (ms since epoch) that this note was created. (readonly) +mnTimestampMs :: Lens' MarketplaceNote (Maybe Int64) +mnTimestampMs + = lens _mnTimestampMs + (\ s a -> s{_mnTimestampMs = a}) + +-- | Notes can optionally be associated with a deal. (readonly, except on +-- create) +mnDealId :: Lens' MarketplaceNote (Maybe Text) +mnDealId = lens _mnDealId (\ s a -> s{_mnDealId = a}) + +-- | The unique id for the note. (readonly) +mnNoteId :: Lens' MarketplaceNote (Maybe Text) +mnNoteId = lens _mnNoteId (\ s a -> s{_mnNoteId = a}) + +-- | The role of the person (buyer\/seller) creating the note. (readonly) +mnCreatorRole :: Lens' MarketplaceNote (Maybe Text) +mnCreatorRole + = lens _mnCreatorRole + (\ s a -> s{_mnCreatorRole = a}) + +-- | The order_id that a note is attached to. (readonly) +mnOrderId :: Lens' MarketplaceNote (Maybe Text) +mnOrderId + = lens _mnOrderId (\ s a -> s{_mnOrderId = a}) + +-- | If the note is associated with an order revision number, then store that +-- here. (readonly, except on create) +mnOrderRevisionNumber :: Lens' MarketplaceNote (Maybe Int64) +mnOrderRevisionNumber + = lens _mnOrderRevisionNumber + (\ s a -> s{_mnOrderRevisionNumber = a}) + +instance FromJSON MarketplaceNote where + parseJSON + = withObject "MarketplaceNote" + (\ o -> + MarketplaceNote <$> + (o .:? "note") <*> + (o .:? "kind" .!= "adexchangebuyer#marketplaceNote") + <*> (o .:? "timestampMs") + <*> (o .:? "dealId") + <*> (o .:? "noteId") + <*> (o .:? "creatorRole") + <*> (o .:? "orderId") + <*> (o .:? "orderRevisionNumber")) + +instance ToJSON MarketplaceNote where + toJSON MarketplaceNote{..} + = object + (catMaybes + [("note" .=) <$> _mnNote, Just ("kind" .= _mnKind), + ("timestampMs" .=) <$> _mnTimestampMs, + ("dealId" .=) <$> _mnDealId, + ("noteId" .=) <$> _mnNoteId, + ("creatorRole" .=) <$> _mnCreatorRole, + ("orderId" .=) <$> _mnOrderId, + ("orderRevisionNumber" .=) <$> + _mnOrderRevisionNumber]) + +-- +-- /See:/ 'termsDto' smart constructor. +data TermsDto = TermsDto + { _tdFinalizeAutomatically :: !(Maybe Bool) + , _tdBuyerBillingType :: !(Maybe Text) + , _tdTargetingAllAdSlots :: !(Maybe Bool) + , _tdUrls :: !(Maybe [Text]) + , _tdEndDate :: !(Maybe (Maybe DateTime)) + , _tdCpm :: !(Maybe (Maybe MoneyDto)) + , _tdEstimatedSpend :: !(Maybe (Maybe MoneyDto)) + , _tdAdvertisers :: !(Maybe [Maybe AdvertiserDto]) + , _tdEstimatedImpressionsPerDay :: !(Maybe Int64) + , _tdMonetizerType :: !(Maybe Text) + , _tdAudienceSegmentDescription :: !(Maybe Text) + , _tdCreativeReviewPolicy :: !(Maybe Text) + , _tdMinimumTrueLooks :: !(Maybe Int64) + , _tdStartDate :: !(Maybe (Maybe DateTime)) + , _tdCreativeBlockingLevel :: !(Maybe Text) + , _tdSemiTransparent :: !(Maybe Bool) + , _tdAudienceSegment :: !(Maybe (Maybe AudienceSegment)) + , _tdDealPremium :: !(Maybe (Maybe MoneyDto)) + , _tdIsReservation :: !(Maybe Bool) + , _tdAdSlots :: !(Maybe [Maybe AdSlotDto]) + , _tdTermsAttributes :: !(Maybe [Text]) + , _tdInventorySegmentTargeting :: !(Maybe (Maybe InventorySegmentTargeting)) + , _tdDescriptiveName :: !(Maybe Text) + , _tdMinimumSpendMicros :: !(Maybe Int64) + , _tdTargetByDealId :: !(Maybe Bool) + , _tdBillingTerms :: !(Maybe Text) + , _tdDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TermsDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdFinalizeAutomatically' +-- +-- * 'tdBuyerBillingType' +-- +-- * 'tdTargetingAllAdSlots' +-- +-- * 'tdUrls' +-- +-- * 'tdEndDate' +-- +-- * 'tdCpm' +-- +-- * 'tdEstimatedSpend' +-- +-- * 'tdAdvertisers' +-- +-- * 'tdEstimatedImpressionsPerDay' +-- +-- * 'tdMonetizerType' +-- +-- * 'tdAudienceSegmentDescription' +-- +-- * 'tdCreativeReviewPolicy' +-- +-- * 'tdMinimumTrueLooks' +-- +-- * 'tdStartDate' +-- +-- * 'tdCreativeBlockingLevel' +-- +-- * 'tdSemiTransparent' +-- +-- * 'tdAudienceSegment' +-- +-- * 'tdDealPremium' +-- +-- * 'tdIsReservation' +-- +-- * 'tdAdSlots' +-- +-- * 'tdTermsAttributes' +-- +-- * 'tdInventorySegmentTargeting' +-- +-- * 'tdDescriptiveName' +-- +-- * 'tdMinimumSpendMicros' +-- +-- * 'tdTargetByDealId' +-- +-- * 'tdBillingTerms' +-- +-- * 'tdDescription' +termsDto + :: TermsDto +termsDto = + TermsDto + { _tdFinalizeAutomatically = Nothing + , _tdBuyerBillingType = Nothing + , _tdTargetingAllAdSlots = Nothing + , _tdUrls = Nothing + , _tdEndDate = Nothing + , _tdCpm = Nothing + , _tdEstimatedSpend = Nothing + , _tdAdvertisers = Nothing + , _tdEstimatedImpressionsPerDay = Nothing + , _tdMonetizerType = Nothing + , _tdAudienceSegmentDescription = Nothing + , _tdCreativeReviewPolicy = Nothing + , _tdMinimumTrueLooks = Nothing + , _tdStartDate = Nothing + , _tdCreativeBlockingLevel = Nothing + , _tdSemiTransparent = Nothing + , _tdAudienceSegment = Nothing + , _tdDealPremium = Nothing + , _tdIsReservation = Nothing + , _tdAdSlots = Nothing + , _tdTermsAttributes = Nothing + , _tdInventorySegmentTargeting = Nothing + , _tdDescriptiveName = Nothing + , _tdMinimumSpendMicros = Nothing + , _tdTargetByDealId = Nothing + , _tdBillingTerms = Nothing + , _tdDescription = Nothing + } + +-- | If true, the offer will finalize automatically when accepted. +tdFinalizeAutomatically :: Lens' TermsDto (Maybe Bool) +tdFinalizeAutomatically + = lens _tdFinalizeAutomatically + (\ s a -> s{_tdFinalizeAutomatically = a}) + +-- | The buyer billing type. +tdBuyerBillingType :: Lens' TermsDto (Maybe Text) +tdBuyerBillingType + = lens _tdBuyerBillingType + (\ s a -> s{_tdBuyerBillingType = a}) + +-- | If true, the offer targets all ad slots. +tdTargetingAllAdSlots :: Lens' TermsDto (Maybe Bool) +tdTargetingAllAdSlots + = lens _tdTargetingAllAdSlots + (\ s a -> s{_tdTargetingAllAdSlots = a}) + +-- | The urls applicable to the offer. +tdUrls :: Lens' TermsDto [Text] +tdUrls + = lens _tdUrls (\ s a -> s{_tdUrls = a}) . _Default . + _Coerce + +-- | The end date for the offer. +tdEndDate :: Lens' TermsDto (Maybe (Maybe DateTime)) +tdEndDate + = lens _tdEndDate (\ s a -> s{_tdEndDate = a}) + +-- | The cpm terms. +tdCpm :: Lens' TermsDto (Maybe (Maybe MoneyDto)) +tdCpm = lens _tdCpm (\ s a -> s{_tdCpm = a}) + +-- | The estimated spend for the offer. +tdEstimatedSpend :: Lens' TermsDto (Maybe (Maybe MoneyDto)) +tdEstimatedSpend + = lens _tdEstimatedSpend + (\ s a -> s{_tdEstimatedSpend = a}) + +-- | A list of advertisers for this offer. +tdAdvertisers :: Lens' TermsDto [Maybe AdvertiserDto] +tdAdvertisers + = lens _tdAdvertisers + (\ s a -> s{_tdAdvertisers = a}) + . _Default + . _Coerce + +-- | The estimated daily impressions for the offer. +tdEstimatedImpressionsPerDay :: Lens' TermsDto (Maybe Int64) +tdEstimatedImpressionsPerDay + = lens _tdEstimatedImpressionsPerDay + (\ s a -> s{_tdEstimatedImpressionsPerDay = a}) + +-- | The monetizer type. +tdMonetizerType :: Lens' TermsDto (Maybe Text) +tdMonetizerType + = lens _tdMonetizerType + (\ s a -> s{_tdMonetizerType = a}) + +-- | A description of the audience segment for the offer. +tdAudienceSegmentDescription :: Lens' TermsDto (Maybe Text) +tdAudienceSegmentDescription + = lens _tdAudienceSegmentDescription + (\ s a -> s{_tdAudienceSegmentDescription = a}) + +-- | Whether to use publisher review policy or AdX review policy. +tdCreativeReviewPolicy :: Lens' TermsDto (Maybe Text) +tdCreativeReviewPolicy + = lens _tdCreativeReviewPolicy + (\ s a -> s{_tdCreativeReviewPolicy = a}) + +-- | The minimum true looks for the offer. +tdMinimumTrueLooks :: Lens' TermsDto (Maybe Int64) +tdMinimumTrueLooks + = lens _tdMinimumTrueLooks + (\ s a -> s{_tdMinimumTrueLooks = a}) + +-- | The start date for the offer. +tdStartDate :: Lens' TermsDto (Maybe (Maybe DateTime)) +tdStartDate + = lens _tdStartDate (\ s a -> s{_tdStartDate = a}) + +-- | Whether to use or ignore publisher blocking rules. +tdCreativeBlockingLevel :: Lens' TermsDto (Maybe Text) +tdCreativeBlockingLevel + = lens _tdCreativeBlockingLevel + (\ s a -> s{_tdCreativeBlockingLevel = a}) + +-- | Whether this offer is semi-transparent. +tdSemiTransparent :: Lens' TermsDto (Maybe Bool) +tdSemiTransparent + = lens _tdSemiTransparent + (\ s a -> s{_tdSemiTransparent = a}) + +-- | The audience segment for the offer. +tdAudienceSegment :: Lens' TermsDto (Maybe (Maybe AudienceSegment)) +tdAudienceSegment + = lens _tdAudienceSegment + (\ s a -> s{_tdAudienceSegment = a}) + +-- | The premium terms. +tdDealPremium :: Lens' TermsDto (Maybe (Maybe MoneyDto)) +tdDealPremium + = lens _tdDealPremium + (\ s a -> s{_tdDealPremium = a}) + +-- | Whether the offer is a reservation. +tdIsReservation :: Lens' TermsDto (Maybe Bool) +tdIsReservation + = lens _tdIsReservation + (\ s a -> s{_tdIsReservation = a}) + +-- | The particular ad slots targeted by the offer. +tdAdSlots :: Lens' TermsDto [Maybe AdSlotDto] +tdAdSlots + = lens _tdAdSlots (\ s a -> s{_tdAdSlots = a}) . + _Default + . _Coerce + +-- | A list of terms attributes. +tdTermsAttributes :: Lens' TermsDto [Text] +tdTermsAttributes + = lens _tdTermsAttributes + (\ s a -> s{_tdTermsAttributes = a}) + . _Default + . _Coerce + +-- | The inventory segment targeting for the offer. +tdInventorySegmentTargeting :: Lens' TermsDto (Maybe (Maybe InventorySegmentTargeting)) +tdInventorySegmentTargeting + = lens _tdInventorySegmentTargeting + (\ s a -> s{_tdInventorySegmentTargeting = a}) + +-- | A descriptive name for these terms. +tdDescriptiveName :: Lens' TermsDto (Maybe Text) +tdDescriptiveName + = lens _tdDescriptiveName + (\ s a -> s{_tdDescriptiveName = a}) + +-- | The minimum spend for the offer. +tdMinimumSpendMicros :: Lens' TermsDto (Maybe Int64) +tdMinimumSpendMicros + = lens _tdMinimumSpendMicros + (\ s a -> s{_tdMinimumSpendMicros = a}) + +-- | Whether to target by deal id. +tdTargetByDealId :: Lens' TermsDto (Maybe Bool) +tdTargetByDealId + = lens _tdTargetByDealId + (\ s a -> s{_tdTargetByDealId = a}) + +-- | The billing terms. +tdBillingTerms :: Lens' TermsDto (Maybe Text) +tdBillingTerms + = lens _tdBillingTerms + (\ s a -> s{_tdBillingTerms = a}) + +-- | A description for these terms. +tdDescription :: Lens' TermsDto (Maybe Text) +tdDescription + = lens _tdDescription + (\ s a -> s{_tdDescription = a}) + +instance FromJSON TermsDto where + parseJSON + = withObject "TermsDto" + (\ o -> + TermsDto <$> + (o .:? "finalizeAutomatically") <*> + (o .:? "buyerBillingType") + <*> (o .:? "targetingAllAdSlots") + <*> (o .:? "urls" .!= mempty) + <*> (o .:? "endDate") + <*> (o .:? "cpm") + <*> (o .:? "estimatedSpend") + <*> (o .:? "advertisers" .!= mempty) + <*> (o .:? "estimatedImpressionsPerDay") + <*> (o .:? "monetizerType") + <*> (o .:? "audienceSegmentDescription") + <*> (o .:? "creativeReviewPolicy") + <*> (o .:? "minimumTrueLooks") + <*> (o .:? "startDate") + <*> (o .:? "creativeBlockingLevel") + <*> (o .:? "semiTransparent") + <*> (o .:? "audienceSegment") + <*> (o .:? "dealPremium") + <*> (o .:? "isReservation") + <*> (o .:? "adSlots" .!= mempty) + <*> (o .:? "termsAttributes" .!= mempty) + <*> (o .:? "inventorySegmentTargeting") + <*> (o .:? "descriptiveName") + <*> (o .:? "minimumSpendMicros") + <*> (o .:? "targetByDealId") + <*> (o .:? "billingTerms") + <*> (o .:? "description")) + +instance ToJSON TermsDto where + toJSON TermsDto{..} + = object + (catMaybes + [("finalizeAutomatically" .=) <$> + _tdFinalizeAutomatically, + ("buyerBillingType" .=) <$> _tdBuyerBillingType, + ("targetingAllAdSlots" .=) <$> + _tdTargetingAllAdSlots, + ("urls" .=) <$> _tdUrls, + ("endDate" .=) <$> _tdEndDate, ("cpm" .=) <$> _tdCpm, + ("estimatedSpend" .=) <$> _tdEstimatedSpend, + ("advertisers" .=) <$> _tdAdvertisers, + ("estimatedImpressionsPerDay" .=) <$> + _tdEstimatedImpressionsPerDay, + ("monetizerType" .=) <$> _tdMonetizerType, + ("audienceSegmentDescription" .=) <$> + _tdAudienceSegmentDescription, + ("creativeReviewPolicy" .=) <$> + _tdCreativeReviewPolicy, + ("minimumTrueLooks" .=) <$> _tdMinimumTrueLooks, + ("startDate" .=) <$> _tdStartDate, + ("creativeBlockingLevel" .=) <$> + _tdCreativeBlockingLevel, + ("semiTransparent" .=) <$> _tdSemiTransparent, + ("audienceSegment" .=) <$> _tdAudienceSegment, + ("dealPremium" .=) <$> _tdDealPremium, + ("isReservation" .=) <$> _tdIsReservation, + ("adSlots" .=) <$> _tdAdSlots, + ("termsAttributes" .=) <$> _tdTermsAttributes, + ("inventorySegmentTargeting" .=) <$> + _tdInventorySegmentTargeting, + ("descriptiveName" .=) <$> _tdDescriptiveName, + ("minimumSpendMicros" .=) <$> _tdMinimumSpendMicros, + ("targetByDealId" .=) <$> _tdTargetByDealId, + ("billingTerms" .=) <$> _tdBillingTerms, + ("description" .=) <$> _tdDescription]) + +-- | The creatives feed lists the active creatives for the Ad Exchange buyer +-- accounts that the user has access to. Each entry in the feed corresponds +-- to a single creative. +-- +-- /See:/ 'creativesList' smart constructor. +data CreativesList = CreativesList + { _clNextPageToken :: !(Maybe Text) + , _clKind :: !Text + , _clItems :: !(Maybe [Maybe Creative]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clNextPageToken' +-- +-- * 'clKind' +-- +-- * 'clItems' +creativesList + :: CreativesList +creativesList = + CreativesList + { _clNextPageToken = Nothing + , _clKind = "adexchangebuyer#creativesList" + , _clItems = Nothing + } + +-- | Continuation token used to page through creatives. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +clNextPageToken :: Lens' CreativesList (Maybe Text) +clNextPageToken + = lens _clNextPageToken + (\ s a -> s{_clNextPageToken = a}) + +-- | Resource type. +clKind :: Lens' CreativesList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | A list of creatives. +clItems :: Lens' CreativesList [Maybe Creative] +clItems + = lens _clItems (\ s a -> s{_clItems = a}) . _Default + . _Coerce + +instance FromJSON CreativesList where + parseJSON + = withObject "CreativesList" + (\ o -> + CreativesList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangebuyer#creativesList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CreativesList where + toJSON CreativesList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _clNextPageToken, + Just ("kind" .= _clKind), ("items" .=) <$> _clItems]) + +-- +-- /See:/ 'createOrdersResponse' smart constructor. +newtype CreateOrdersResponse = CreateOrdersResponse + { _corOrders :: Maybe [Maybe MarketplaceOrder] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateOrdersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'corOrders' +createOrdersResponse + :: CreateOrdersResponse +createOrdersResponse = + CreateOrdersResponse + { _corOrders = Nothing + } + +-- | The list of orders successfully created. +corOrders :: Lens' CreateOrdersResponse [Maybe MarketplaceOrder] +corOrders + = lens _corOrders (\ s a -> s{_corOrders = a}) . + _Default + . _Coerce + +instance FromJSON CreateOrdersResponse where + parseJSON + = withObject "CreateOrdersResponse" + (\ o -> + CreateOrdersResponse <$> (o .:? "orders" .!= mempty)) + +instance ToJSON CreateOrdersResponse where + toJSON CreateOrdersResponse{..} + = object (catMaybes [("orders" .=) <$> _corOrders]) + +-- +-- /See:/ 'addOrderNotesRequest' smart constructor. +newtype AddOrderNotesRequest = AddOrderNotesRequest + { _aonrNotes :: Maybe [Maybe MarketplaceNote] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddOrderNotesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aonrNotes' +addOrderNotesRequest + :: AddOrderNotesRequest +addOrderNotesRequest = + AddOrderNotesRequest + { _aonrNotes = Nothing + } + +-- | The list of notes to add. +aonrNotes :: Lens' AddOrderNotesRequest [Maybe MarketplaceNote] +aonrNotes + = lens _aonrNotes (\ s a -> s{_aonrNotes = a}) . + _Default + . _Coerce + +instance FromJSON AddOrderNotesRequest where + parseJSON + = withObject "AddOrderNotesRequest" + (\ o -> + AddOrderNotesRequest <$> (o .:? "notes" .!= mempty)) + +instance ToJSON AddOrderNotesRequest where + toJSON AddOrderNotesRequest{..} + = object (catMaybes [("notes" .=) <$> _aonrNotes]) + +-- +-- /See:/ 'marketplaceDealParty' smart constructor. +data MarketplaceDealParty = MarketplaceDealParty + { _mdpSeller :: !(Maybe (Maybe Seller)) + , _mdpBuyer :: !(Maybe (Maybe Buyer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceDealParty' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdpSeller' +-- +-- * 'mdpBuyer' +marketplaceDealParty + :: MarketplaceDealParty +marketplaceDealParty = + MarketplaceDealParty + { _mdpSeller = Nothing + , _mdpBuyer = Nothing + } + +-- | The buyer\/seller associated with the deal. One of buyer\/seller is +-- specified for a deal party. +mdpSeller :: Lens' MarketplaceDealParty (Maybe (Maybe Seller)) +mdpSeller + = lens _mdpSeller (\ s a -> s{_mdpSeller = a}) + +-- | The buyer\/seller associated with the deal. One of buyer\/seller is +-- specified for a deal-party. +mdpBuyer :: Lens' MarketplaceDealParty (Maybe (Maybe Buyer)) +mdpBuyer = lens _mdpBuyer (\ s a -> s{_mdpBuyer = a}) + +instance FromJSON MarketplaceDealParty where + parseJSON + = withObject "MarketplaceDealParty" + (\ o -> + MarketplaceDealParty <$> + (o .:? "seller") <*> (o .:? "buyer")) + +instance ToJSON MarketplaceDealParty where + toJSON MarketplaceDealParty{..} + = object + (catMaybes + [("seller" .=) <$> _mdpSeller, + ("buyer" .=) <$> _mdpBuyer]) + +-- +-- /See:/ 'dealPartyDto' smart constructor. +data DealPartyDto = DealPartyDto + { _dpdBuyerSellerRole :: !(Maybe Text) + , _dpdCustomerId :: !(Maybe Int32) + , _dpdName :: !(Maybe Text) + , _dpdWebProperty :: !(Maybe (Maybe WebPropertyDto)) + , _dpdBuyer :: !(Maybe (Maybe BuyerDto)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealPartyDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpdBuyerSellerRole' +-- +-- * 'dpdCustomerId' +-- +-- * 'dpdName' +-- +-- * 'dpdWebProperty' +-- +-- * 'dpdBuyer' +dealPartyDto + :: DealPartyDto +dealPartyDto = + DealPartyDto + { _dpdBuyerSellerRole = Nothing + , _dpdCustomerId = Nothing + , _dpdName = Nothing + , _dpdWebProperty = Nothing + , _dpdBuyer = Nothing + } + +dpdBuyerSellerRole :: Lens' DealPartyDto (Maybe Text) +dpdBuyerSellerRole + = lens _dpdBuyerSellerRole + (\ s a -> s{_dpdBuyerSellerRole = a}) + +dpdCustomerId :: Lens' DealPartyDto (Maybe Int32) +dpdCustomerId + = lens _dpdCustomerId + (\ s a -> s{_dpdCustomerId = a}) + +dpdName :: Lens' DealPartyDto (Maybe Text) +dpdName = lens _dpdName (\ s a -> s{_dpdName = a}) + +dpdWebProperty :: Lens' DealPartyDto (Maybe (Maybe WebPropertyDto)) +dpdWebProperty + = lens _dpdWebProperty + (\ s a -> s{_dpdWebProperty = a}) + +dpdBuyer :: Lens' DealPartyDto (Maybe (Maybe BuyerDto)) +dpdBuyer = lens _dpdBuyer (\ s a -> s{_dpdBuyer = a}) + +instance FromJSON DealPartyDto where + parseJSON + = withObject "DealPartyDto" + (\ o -> + DealPartyDto <$> + (o .:? "buyerSellerRole") <*> (o .:? "customerId") + <*> (o .:? "name") + <*> (o .:? "webProperty") + <*> (o .:? "buyer")) + +instance ToJSON DealPartyDto where + toJSON DealPartyDto{..} + = object + (catMaybes + [("buyerSellerRole" .=) <$> _dpdBuyerSellerRole, + ("customerId" .=) <$> _dpdCustomerId, + ("name" .=) <$> _dpdName, + ("webProperty" .=) <$> _dpdWebProperty, + ("buyer" .=) <$> _dpdBuyer]) + +-- +-- /See:/ 'deliveryControlFrequencyCap' smart constructor. +data DeliveryControlFrequencyCap = DeliveryControlFrequencyCap + { _dcfcMaxImpressions :: !(Maybe Int32) + , _dcfcNumTimeUnits :: !(Maybe Int32) + , _dcfcTimeUnitType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeliveryControlFrequencyCap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcfcMaxImpressions' +-- +-- * 'dcfcNumTimeUnits' +-- +-- * 'dcfcTimeUnitType' +deliveryControlFrequencyCap + :: DeliveryControlFrequencyCap +deliveryControlFrequencyCap = + DeliveryControlFrequencyCap + { _dcfcMaxImpressions = Nothing + , _dcfcNumTimeUnits = Nothing + , _dcfcTimeUnitType = Nothing + } + +dcfcMaxImpressions :: Lens' DeliveryControlFrequencyCap (Maybe Int32) +dcfcMaxImpressions + = lens _dcfcMaxImpressions + (\ s a -> s{_dcfcMaxImpressions = a}) + +dcfcNumTimeUnits :: Lens' DeliveryControlFrequencyCap (Maybe Int32) +dcfcNumTimeUnits + = lens _dcfcNumTimeUnits + (\ s a -> s{_dcfcNumTimeUnits = a}) + +dcfcTimeUnitType :: Lens' DeliveryControlFrequencyCap (Maybe Text) +dcfcTimeUnitType + = lens _dcfcTimeUnitType + (\ s a -> s{_dcfcTimeUnitType = a}) + +instance FromJSON DeliveryControlFrequencyCap where + parseJSON + = withObject "DeliveryControlFrequencyCap" + (\ o -> + DeliveryControlFrequencyCap <$> + (o .:? "maxImpressions") <*> (o .:? "numTimeUnits") + <*> (o .:? "timeUnitType")) + +instance ToJSON DeliveryControlFrequencyCap where + toJSON DeliveryControlFrequencyCap{..} + = object + (catMaybes + [("maxImpressions" .=) <$> _dcfcMaxImpressions, + ("numTimeUnits" .=) <$> _dcfcNumTimeUnits, + ("timeUnitType" .=) <$> _dcfcTimeUnitType]) + +-- +-- /See:/ 'getNegotiationsResponse' smart constructor. +data GetNegotiationsResponse = GetNegotiationsResponse + { _gnrKind :: !Text + , _gnrNegotiations :: !(Maybe [Maybe NegotiationDto]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetNegotiationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gnrKind' +-- +-- * 'gnrNegotiations' +getNegotiationsResponse + :: GetNegotiationsResponse +getNegotiationsResponse = + GetNegotiationsResponse + { _gnrKind = "adexchangebuyer#negotiationsList" + , _gnrNegotiations = Nothing + } + +gnrKind :: Lens' GetNegotiationsResponse Text +gnrKind = lens _gnrKind (\ s a -> s{_gnrKind = a}) + +gnrNegotiations :: Lens' GetNegotiationsResponse [Maybe NegotiationDto] +gnrNegotiations + = lens _gnrNegotiations + (\ s a -> s{_gnrNegotiations = a}) + . _Default + . _Coerce + +instance FromJSON GetNegotiationsResponse where + parseJSON + = withObject "GetNegotiationsResponse" + (\ o -> + GetNegotiationsResponse <$> + (o .:? "kind" .!= "adexchangebuyer#negotiationsList") + <*> (o .:? "negotiations" .!= mempty)) + +instance ToJSON GetNegotiationsResponse where + toJSON GetNegotiationsResponse{..} + = object + (catMaybes + [Just ("kind" .= _gnrKind), + ("negotiations" .=) <$> _gnrNegotiations]) + +-- | The configuration data for Ad Exchange RTB - Budget API. +-- +-- /See:/ 'budget' smart constructor. +data Budget = Budget + { _bCurrencyCode :: !(Maybe Text) + , _bKind :: !Text + , _bBudgetAmount :: !(Maybe Int64) + , _bAccountId :: !(Maybe Int64) + , _bId :: !(Maybe Text) + , _bBillingId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Budget' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bCurrencyCode' +-- +-- * 'bKind' +-- +-- * 'bBudgetAmount' +-- +-- * 'bAccountId' +-- +-- * 'bId' +-- +-- * 'bBillingId' +budget + :: Budget +budget = + Budget + { _bCurrencyCode = Nothing + , _bKind = "adexchangebuyer#budget" + , _bBudgetAmount = Nothing + , _bAccountId = Nothing + , _bId = Nothing + , _bBillingId = Nothing + } + +-- | The currency code for the buyer. This cannot be altered here. +bCurrencyCode :: Lens' Budget (Maybe Text) +bCurrencyCode + = lens _bCurrencyCode + (\ s a -> s{_bCurrencyCode = a}) + +-- | The kind of the resource, i.e. \"adexchangebuyer#budget\". +bKind :: Lens' Budget Text +bKind = lens _bKind (\ s a -> s{_bKind = a}) + +-- | The budget amount to apply for the billingId provided. This is required +-- for update requests. +bBudgetAmount :: Lens' Budget (Maybe Int64) +bBudgetAmount + = lens _bBudgetAmount + (\ s a -> s{_bBudgetAmount = a}) + +-- | The id of the account. This is required for get and update requests. +bAccountId :: Lens' Budget (Maybe Int64) +bAccountId + = lens _bAccountId (\ s a -> s{_bAccountId = a}) + +-- | The unique id that describes this item. +bId :: Lens' Budget (Maybe Text) +bId = lens _bId (\ s a -> s{_bId = a}) + +-- | The billing id to determine which adgroup to provide budget information +-- for. This is required for get and update requests. +bBillingId :: Lens' Budget (Maybe Int64) +bBillingId + = lens _bBillingId (\ s a -> s{_bBillingId = a}) + +instance FromJSON Budget where + parseJSON + = withObject "Budget" + (\ o -> + Budget <$> + (o .:? "currencyCode") <*> + (o .:? "kind" .!= "adexchangebuyer#budget") + <*> (o .:? "budgetAmount") + <*> (o .:? "accountId") + <*> (o .:? "id") + <*> (o .:? "billingId")) + +instance ToJSON Budget where + toJSON Budget{..} + = object + (catMaybes + [("currencyCode" .=) <$> _bCurrencyCode, + Just ("kind" .= _bKind), + ("budgetAmount" .=) <$> _bBudgetAmount, + ("accountId" .=) <$> _bAccountId, ("id" .=) <$> _bId, + ("billingId" .=) <$> _bBillingId]) + +-- +-- /See:/ 'getFinalizedNegotiationByExternalDealIdRequest' smart constructor. +newtype GetFinalizedNegotiationByExternalDealIdRequest = GetFinalizedNegotiationByExternalDealIdRequest + { _gfnbedirIncludePrivateAuctions :: Maybe Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetFinalizedNegotiationByExternalDealIdRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfnbedirIncludePrivateAuctions' +getFinalizedNegotiationByExternalDealIdRequest + :: GetFinalizedNegotiationByExternalDealIdRequest +getFinalizedNegotiationByExternalDealIdRequest = + GetFinalizedNegotiationByExternalDealIdRequest + { _gfnbedirIncludePrivateAuctions = Nothing + } + +gfnbedirIncludePrivateAuctions :: Lens' GetFinalizedNegotiationByExternalDealIdRequest (Maybe Bool) +gfnbedirIncludePrivateAuctions + = lens _gfnbedirIncludePrivateAuctions + (\ s a -> s{_gfnbedirIncludePrivateAuctions = a}) + +instance FromJSON + GetFinalizedNegotiationByExternalDealIdRequest where + parseJSON + = withObject + "GetFinalizedNegotiationByExternalDealIdRequest" + (\ o -> + GetFinalizedNegotiationByExternalDealIdRequest <$> + (o .:? "includePrivateAuctions")) + +instance ToJSON + GetFinalizedNegotiationByExternalDealIdRequest where + toJSON + GetFinalizedNegotiationByExternalDealIdRequest{..} + = object + (catMaybes + [("includePrivateAuctions" .=) <$> + _gfnbedirIncludePrivateAuctions]) + +-- +-- /See:/ 'privateData' smart constructor. +data PrivateData = PrivateData + { _pdReferencePayload :: !(Maybe Word8) + , _pdReferenceId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PrivateData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdReferencePayload' +-- +-- * 'pdReferenceId' +privateData + :: PrivateData +privateData = + PrivateData + { _pdReferencePayload = Nothing + , _pdReferenceId = Nothing + } + +pdReferencePayload :: Lens' PrivateData (Maybe Word8) +pdReferencePayload + = lens _pdReferencePayload + (\ s a -> s{_pdReferencePayload = a}) + +pdReferenceId :: Lens' PrivateData (Maybe Text) +pdReferenceId + = lens _pdReferenceId + (\ s a -> s{_pdReferenceId = a}) + +instance FromJSON PrivateData where + parseJSON + = withObject "PrivateData" + (\ o -> + PrivateData <$> + (o .:? "referencePayload") <*> (o .:? "referenceId")) + +instance ToJSON PrivateData where + toJSON PrivateData{..} + = object + (catMaybes + [("referencePayload" .=) <$> _pdReferencePayload, + ("referenceId" .=) <$> _pdReferenceId]) + +-- +-- /See:/ 'adSize' smart constructor. +data AdSize = AdSize + { _asHeight :: !(Maybe Int32) + , _asWidth :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdSize' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asHeight' +-- +-- * 'asWidth' +adSize + :: AdSize +adSize = + AdSize + { _asHeight = Nothing + , _asWidth = Nothing + } + +asHeight :: Lens' AdSize (Maybe Int32) +asHeight = lens _asHeight (\ s a -> s{_asHeight = a}) + +asWidth :: Lens' AdSize (Maybe Int32) +asWidth = lens _asWidth (\ s a -> s{_asWidth = a}) + +instance FromJSON AdSize where + parseJSON + = withObject "AdSize" + (\ o -> + AdSize <$> (o .:? "height") <*> (o .:? "width")) + +instance ToJSON AdSize where + toJSON AdSize{..} + = object + (catMaybes + [("height" .=) <$> _asHeight, + ("width" .=) <$> _asWidth]) + +-- +-- /See:/ 'ruleKeyValuePair' smart constructor. +data RuleKeyValuePair = RuleKeyValuePair + { _rkvpKeyName :: !(Maybe Text) + , _rkvpValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RuleKeyValuePair' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rkvpKeyName' +-- +-- * 'rkvpValue' +ruleKeyValuePair + :: RuleKeyValuePair +ruleKeyValuePair = + RuleKeyValuePair + { _rkvpKeyName = Nothing + , _rkvpValue = Nothing + } + +rkvpKeyName :: Lens' RuleKeyValuePair (Maybe Text) +rkvpKeyName + = lens _rkvpKeyName (\ s a -> s{_rkvpKeyName = a}) + +rkvpValue :: Lens' RuleKeyValuePair (Maybe Text) +rkvpValue + = lens _rkvpValue (\ s a -> s{_rkvpValue = a}) + +instance FromJSON RuleKeyValuePair where + parseJSON + = withObject "RuleKeyValuePair" + (\ o -> + RuleKeyValuePair <$> + (o .:? "keyName") <*> (o .:? "value")) + +instance ToJSON RuleKeyValuePair where + toJSON RuleKeyValuePair{..} + = object + (catMaybes + [("keyName" .=) <$> _rkvpKeyName, + ("value" .=) <$> _rkvpValue]) + +-- +-- /See:/ 'getOrdersResponse' smart constructor. +newtype GetOrdersResponse = GetOrdersResponse + { _gorOrders :: Maybe [Maybe MarketplaceOrder] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetOrdersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gorOrders' +getOrdersResponse + :: GetOrdersResponse +getOrdersResponse = + GetOrdersResponse + { _gorOrders = Nothing + } + +-- | The list of matching orders. +gorOrders :: Lens' GetOrdersResponse [Maybe MarketplaceOrder] +gorOrders + = lens _gorOrders (\ s a -> s{_gorOrders = a}) . + _Default + . _Coerce + +instance FromJSON GetOrdersResponse where + parseJSON + = withObject "GetOrdersResponse" + (\ o -> + GetOrdersResponse <$> (o .:? "orders" .!= mempty)) + +instance ToJSON GetOrdersResponse where + toJSON GetOrdersResponse{..} + = object (catMaybes [("orders" .=) <$> _gorOrders]) + +-- | An account feed lists Ad Exchange buyer accounts that the user has +-- access to. Each entry in the feed corresponds to a single buyer account. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _alKind :: !Text + , _alItems :: !(Maybe [Maybe Account]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alKind' +-- +-- * 'alItems' +accountsList + :: AccountsList +accountsList = + AccountsList + { _alKind = "adexchangebuyer#accountsList" + , _alItems = Nothing + } + +-- | Resource type. +alKind :: Lens' AccountsList Text +alKind = lens _alKind (\ s a -> s{_alKind = a}) + +-- | A list of accounts. +alItems :: Lens' AccountsList [Maybe Account] +alItems + = lens _alItems (\ s a -> s{_alItems = a}) . _Default + . _Coerce + +instance FromJSON AccountsList where + parseJSON + = withObject "AccountsList" + (\ o -> + AccountsList <$> + (o .:? "kind" .!= "adexchangebuyer#accountsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON AccountsList where + toJSON AccountsList{..} + = object + (catMaybes + [Just ("kind" .= _alKind), + ("items" .=) <$> _alItems]) + +-- +-- /See:/ 'getOrderNotesResponse' smart constructor. +newtype GetOrderNotesResponse = GetOrderNotesResponse + { _gonrNotes :: Maybe [Maybe MarketplaceNote] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetOrderNotesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gonrNotes' +getOrderNotesResponse + :: GetOrderNotesResponse +getOrderNotesResponse = + GetOrderNotesResponse + { _gonrNotes = Nothing + } + +-- | The list of matching notes. +gonrNotes :: Lens' GetOrderNotesResponse [Maybe MarketplaceNote] +gonrNotes + = lens _gonrNotes (\ s a -> s{_gonrNotes = a}) . + _Default + . _Coerce + +instance FromJSON GetOrderNotesResponse where + parseJSON + = withObject "GetOrderNotesResponse" + (\ o -> + GetOrderNotesResponse <$> (o .:? "notes" .!= mempty)) + +instance ToJSON GetOrderNotesResponse where + toJSON GetOrderNotesResponse{..} + = object (catMaybes [("notes" .=) <$> _gonrNotes]) + +-- +-- /See:/ 'createOrdersRequest' smart constructor. +data CreateOrdersRequest = CreateOrdersRequest + { _cWebPropertyCode :: !(Maybe Text) + , _cOrders :: !(Maybe [Maybe MarketplaceOrder]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateOrdersRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cWebPropertyCode' +-- +-- * 'cOrders' +createOrdersRequest + :: CreateOrdersRequest +createOrdersRequest = + CreateOrdersRequest + { _cWebPropertyCode = Nothing + , _cOrders = Nothing + } + +cWebPropertyCode :: Lens' CreateOrdersRequest (Maybe Text) +cWebPropertyCode + = lens _cWebPropertyCode + (\ s a -> s{_cWebPropertyCode = a}) + +-- | The list of orders to create. +cOrders :: Lens' CreateOrdersRequest [Maybe MarketplaceOrder] +cOrders + = lens _cOrders (\ s a -> s{_cOrders = a}) . _Default + . _Coerce + +instance FromJSON CreateOrdersRequest where + parseJSON + = withObject "CreateOrdersRequest" + (\ o -> + CreateOrdersRequest <$> + (o .:? "webPropertyCode") <*> + (o .:? "orders" .!= mempty)) + +instance ToJSON CreateOrdersRequest where + toJSON CreateOrdersRequest{..} + = object + (catMaybes + [("webPropertyCode" .=) <$> _cWebPropertyCode, + ("orders" .=) <$> _cOrders]) + +-- | Used to specify pricing rules for buyers\/advertisers. Each +-- PricePerBuyer in an offer can become [0,1] deals. To check if there is a +-- PricePerBuyer for a particular buyer or buyer\/advertiser pair, we look +-- for the most specific matching rule - we first look for a rule matching +-- the buyer and advertiser, next a rule with the buyer but an empty +-- advertiser list, and otherwise look for a matching rule where no buyer +-- is set. +-- +-- /See:/ 'pricePerBuyer' smart constructor. +data PricePerBuyer = PricePerBuyer + { _ppbPrice :: !(Maybe (Maybe Price)) + , _ppbBuyer :: !(Maybe (Maybe Buyer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PricePerBuyer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppbPrice' +-- +-- * 'ppbBuyer' +pricePerBuyer + :: PricePerBuyer +pricePerBuyer = + PricePerBuyer + { _ppbPrice = Nothing + , _ppbBuyer = Nothing + } + +-- | The specified price +ppbPrice :: Lens' PricePerBuyer (Maybe (Maybe Price)) +ppbPrice = lens _ppbPrice (\ s a -> s{_ppbPrice = a}) + +-- | The buyer who will pay this price. If unset, all buyers can pay this +-- price (if the advertisers match, and there\'s no more specific rule +-- matching the buyer). +ppbBuyer :: Lens' PricePerBuyer (Maybe (Maybe Buyer)) +ppbBuyer = lens _ppbBuyer (\ s a -> s{_ppbBuyer = a}) + +instance FromJSON PricePerBuyer where + parseJSON + = withObject "PricePerBuyer" + (\ o -> + PricePerBuyer <$> + (o .:? "price") <*> (o .:? "buyer")) + +instance ToJSON PricePerBuyer where + toJSON PricePerBuyer{..} + = object + (catMaybes + [("price" .=) <$> _ppbPrice, + ("buyer" .=) <$> _ppbBuyer]) + +-- +-- /See:/ 'targetingValueDayPartTargetingDayPart' smart constructor. +data TargetingValueDayPartTargetingDayPart = TargetingValueDayPartTargetingDayPart + { _tvdptdpEndHour :: !(Maybe Int32) + , _tvdptdpStartHour :: !(Maybe Int32) + , _tvdptdpStartMinute :: !(Maybe Int32) + , _tvdptdpDayOfWeek :: !(Maybe Text) + , _tvdptdpEndMinute :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetingValueDayPartTargetingDayPart' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvdptdpEndHour' +-- +-- * 'tvdptdpStartHour' +-- +-- * 'tvdptdpStartMinute' +-- +-- * 'tvdptdpDayOfWeek' +-- +-- * 'tvdptdpEndMinute' +targetingValueDayPartTargetingDayPart + :: TargetingValueDayPartTargetingDayPart +targetingValueDayPartTargetingDayPart = + TargetingValueDayPartTargetingDayPart + { _tvdptdpEndHour = Nothing + , _tvdptdpStartHour = Nothing + , _tvdptdpStartMinute = Nothing + , _tvdptdpDayOfWeek = Nothing + , _tvdptdpEndMinute = Nothing + } + +tvdptdpEndHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) +tvdptdpEndHour + = lens _tvdptdpEndHour + (\ s a -> s{_tvdptdpEndHour = a}) + +tvdptdpStartHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) +tvdptdpStartHour + = lens _tvdptdpStartHour + (\ s a -> s{_tvdptdpStartHour = a}) + +tvdptdpStartMinute :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) +tvdptdpStartMinute + = lens _tvdptdpStartMinute + (\ s a -> s{_tvdptdpStartMinute = a}) + +tvdptdpDayOfWeek :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Text) +tvdptdpDayOfWeek + = lens _tvdptdpDayOfWeek + (\ s a -> s{_tvdptdpDayOfWeek = a}) + +tvdptdpEndMinute :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32) +tvdptdpEndMinute + = lens _tvdptdpEndMinute + (\ s a -> s{_tvdptdpEndMinute = a}) + +instance FromJSON + TargetingValueDayPartTargetingDayPart where + parseJSON + = withObject "TargetingValueDayPartTargetingDayPart" + (\ o -> + TargetingValueDayPartTargetingDayPart <$> + (o .:? "endHour") <*> (o .:? "startHour") <*> + (o .:? "startMinute") + <*> (o .:? "dayOfWeek") + <*> (o .:? "endMinute")) + +instance ToJSON TargetingValueDayPartTargetingDayPart + where + toJSON TargetingValueDayPartTargetingDayPart{..} + = object + (catMaybes + [("endHour" .=) <$> _tvdptdpEndHour, + ("startHour" .=) <$> _tvdptdpStartHour, + ("startMinute" .=) <$> _tvdptdpStartMinute, + ("dayOfWeek" .=) <$> _tvdptdpDayOfWeek, + ("endMinute" .=) <$> _tvdptdpEndMinute]) + +-- +-- /See:/ 'deliveryControl' smart constructor. +data DeliveryControl = DeliveryControl + { _dcFrequencyCaps :: !(Maybe [Maybe DeliveryControlFrequencyCap]) + , _dcDeliveryRateType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeliveryControl' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcFrequencyCaps' +-- +-- * 'dcDeliveryRateType' +deliveryControl + :: DeliveryControl +deliveryControl = + DeliveryControl + { _dcFrequencyCaps = Nothing + , _dcDeliveryRateType = Nothing + } + +dcFrequencyCaps :: Lens' DeliveryControl [Maybe DeliveryControlFrequencyCap] +dcFrequencyCaps + = lens _dcFrequencyCaps + (\ s a -> s{_dcFrequencyCaps = a}) + . _Default + . _Coerce + +dcDeliveryRateType :: Lens' DeliveryControl (Maybe Text) +dcDeliveryRateType + = lens _dcDeliveryRateType + (\ s a -> s{_dcDeliveryRateType = a}) + +instance FromJSON DeliveryControl where + parseJSON + = withObject "DeliveryControl" + (\ o -> + DeliveryControl <$> + (o .:? "frequencyCaps" .!= mempty) <*> + (o .:? "deliveryRateType")) + +instance ToJSON DeliveryControl where + toJSON DeliveryControl{..} + = object + (catMaybes + [("frequencyCaps" .=) <$> _dcFrequencyCaps, + ("deliveryRateType" .=) <$> _dcDeliveryRateType]) + +-- | A creative and its classification data. +-- +-- /See:/ 'creative' smart constructor. +data Creative = Creative + { _cAttribute :: !(Maybe [Int32]) + , _cNativeAd :: !(Maybe CreativeNATiveAd) + , _cHeight :: !(Maybe Int32) + , _cBuyerCreativeId :: !(Maybe Text) + , _cAdvertiserName :: !(Maybe Text) + , _cAgencyId :: !(Maybe Int64) + , _cCorrections :: !(Maybe [CreativeCorrectionsItem]) + , _cProductCategories :: !(Maybe [Int32]) + , _cKind :: !Text + , _cHTMLSnippet :: !(Maybe Text) + , _cAdvertiserId :: !(Maybe [Int64]) + , _cRestrictedCategories :: !(Maybe [Int32]) + , _cDealsStatus :: !(Maybe Text) + , _cWidth :: !(Maybe Int32) + , _cClickThroughUrl :: !(Maybe [Text]) + , _cVendorType :: !(Maybe [Int32]) + , _cAccountId :: !(Maybe Int32) + , _cImpressionTrackingUrl :: !(Maybe [Text]) + , _cFilteringReasons :: !(Maybe CreativeFilteringReasons) + , _cVersion :: !(Maybe Int32) + , _cSensitiveCategories :: !(Maybe [Int32]) + , _cVideoURL :: !(Maybe Text) + , _cApiUploadTimestamp :: !(Maybe UTCTime) + , _cServingRestrictions :: !(Maybe [CreativeServingRestrictionsItem]) + , _cOpenAuctionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Creative' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cAttribute' +-- +-- * 'cNativeAd' +-- +-- * 'cHeight' +-- +-- * 'cBuyerCreativeId' +-- +-- * 'cAdvertiserName' +-- +-- * 'cAgencyId' +-- +-- * 'cCorrections' +-- +-- * 'cProductCategories' +-- +-- * 'cKind' +-- +-- * 'cHTMLSnippet' +-- +-- * 'cAdvertiserId' +-- +-- * 'cRestrictedCategories' +-- +-- * 'cDealsStatus' +-- +-- * 'cWidth' +-- +-- * 'cClickThroughUrl' +-- +-- * 'cVendorType' +-- +-- * 'cAccountId' +-- +-- * 'cImpressionTrackingUrl' +-- +-- * 'cFilteringReasons' +-- +-- * 'cVersion' +-- +-- * 'cSensitiveCategories' +-- +-- * 'cVideoURL' +-- +-- * 'cApiUploadTimestamp' +-- +-- * 'cServingRestrictions' +-- +-- * 'cOpenAuctionStatus' +creative + :: Creative +creative = + Creative + { _cAttribute = Nothing + , _cNativeAd = Nothing + , _cHeight = Nothing + , _cBuyerCreativeId = Nothing + , _cAdvertiserName = Nothing + , _cAgencyId = Nothing + , _cCorrections = Nothing + , _cProductCategories = Nothing + , _cKind = "adexchangebuyer#creative" + , _cHTMLSnippet = Nothing + , _cAdvertiserId = Nothing + , _cRestrictedCategories = Nothing + , _cDealsStatus = Nothing + , _cWidth = Nothing + , _cClickThroughUrl = Nothing + , _cVendorType = Nothing + , _cAccountId = Nothing + , _cImpressionTrackingUrl = Nothing + , _cFilteringReasons = Nothing + , _cVersion = Nothing + , _cSensitiveCategories = Nothing + , _cVideoURL = Nothing + , _cApiUploadTimestamp = Nothing + , _cServingRestrictions = Nothing + , _cOpenAuctionStatus = Nothing + } + +-- | All attributes for the ads that may be shown from this snippet. +cAttribute :: Lens' Creative [Int32] +cAttribute + = lens _cAttribute (\ s a -> s{_cAttribute = a}) . + _Default + . _Coerce + +-- | If nativeAd is set, HTMLSnippet and videoURL should not be set. +cNativeAd :: Lens' Creative (Maybe CreativeNATiveAd) +cNativeAd + = lens _cNativeAd (\ s a -> s{_cNativeAd = a}) + +-- | Ad height. +cHeight :: Lens' Creative (Maybe Int32) +cHeight = lens _cHeight (\ s a -> s{_cHeight = a}) + +-- | A buyer-specific id identifying the creative in this ad. +cBuyerCreativeId :: Lens' Creative (Maybe Text) +cBuyerCreativeId + = lens _cBuyerCreativeId + (\ s a -> s{_cBuyerCreativeId = a}) + +-- | The name of the company being advertised in the creative. +cAdvertiserName :: Lens' Creative (Maybe Text) +cAdvertiserName + = lens _cAdvertiserName + (\ s a -> s{_cAdvertiserName = a}) + +-- | The agency id for this creative. +cAgencyId :: Lens' Creative (Maybe Int64) +cAgencyId + = lens _cAgencyId (\ s a -> s{_cAgencyId = a}) + +-- | Shows any corrections that were applied to this creative. Read-only. +-- This field should not be set in requests. +cCorrections :: Lens' Creative [CreativeCorrectionsItem] +cCorrections + = lens _cCorrections (\ s a -> s{_cCorrections = a}) + . _Default + . _Coerce + +-- | Detected product categories, if any. Read-only. This field should not be +-- set in requests. +cProductCategories :: Lens' Creative [Int32] +cProductCategories + = lens _cProductCategories + (\ s a -> s{_cProductCategories = a}) + . _Default + . _Coerce + +-- | Resource type. +cKind :: Lens' Creative Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The HTML snippet that displays the ad when inserted in the web page. If +-- set, videoURL should not be set. +cHTMLSnippet :: Lens' Creative (Maybe Text) +cHTMLSnippet + = lens _cHTMLSnippet (\ s a -> s{_cHTMLSnippet = a}) + +-- | Detected advertiser id, if any. Read-only. This field should not be set +-- in requests. +cAdvertiserId :: Lens' Creative [Int64] +cAdvertiserId + = lens _cAdvertiserId + (\ s a -> s{_cAdvertiserId = a}) + . _Default + . _Coerce + +-- | All restricted categories for the ads that may be shown from this +-- snippet. +cRestrictedCategories :: Lens' Creative [Int32] +cRestrictedCategories + = lens _cRestrictedCategories + (\ s a -> s{_cRestrictedCategories = a}) + . _Default + . _Coerce + +-- | Top-level deals status. Read-only. This field should not be set in +-- requests. If disapproved, an entry for auctionType=DIRECT_DEALS (or ALL) +-- in servingRestrictions will also exist. Note that this may be nuanced +-- with other contextual restrictions, in which case it may be preferable +-- to read from servingRestrictions directly. +cDealsStatus :: Lens' Creative (Maybe Text) +cDealsStatus + = lens _cDealsStatus (\ s a -> s{_cDealsStatus = a}) + +-- | Ad width. +cWidth :: Lens' Creative (Maybe Int32) +cWidth = lens _cWidth (\ s a -> s{_cWidth = a}) + +-- | The set of destination urls for the snippet. +cClickThroughUrl :: Lens' Creative [Text] +cClickThroughUrl + = lens _cClickThroughUrl + (\ s a -> s{_cClickThroughUrl = a}) + . _Default + . _Coerce + +-- | All vendor types for the ads that may be shown from this snippet. +cVendorType :: Lens' Creative [Int32] +cVendorType + = lens _cVendorType (\ s a -> s{_cVendorType = a}) . + _Default + . _Coerce + +-- | Account id. +cAccountId :: Lens' Creative (Maybe Int32) +cAccountId + = lens _cAccountId (\ s a -> s{_cAccountId = a}) + +-- | The set of urls to be called to record an impression. +cImpressionTrackingUrl :: Lens' Creative [Text] +cImpressionTrackingUrl + = lens _cImpressionTrackingUrl + (\ s a -> s{_cImpressionTrackingUrl = a}) + . _Default + . _Coerce + +-- | The filtering reasons for the creative. Read-only. This field should not +-- be set in requests. +cFilteringReasons :: Lens' Creative (Maybe CreativeFilteringReasons) +cFilteringReasons + = lens _cFilteringReasons + (\ s a -> s{_cFilteringReasons = a}) + +-- | The version for this creative. Read-only. This field should not be set +-- in requests. +cVersion :: Lens' Creative (Maybe Int32) +cVersion = lens _cVersion (\ s a -> s{_cVersion = a}) + +-- | Detected sensitive categories, if any. Read-only. This field should not +-- be set in requests. +cSensitiveCategories :: Lens' Creative [Int32] +cSensitiveCategories + = lens _cSensitiveCategories + (\ s a -> s{_cSensitiveCategories = a}) + . _Default + . _Coerce + +-- | The url to fetch a video ad. If set, HTMLSnippet should not be set. +cVideoURL :: Lens' Creative (Maybe Text) +cVideoURL + = lens _cVideoURL (\ s a -> s{_cVideoURL = a}) + +-- | The last upload timestamp of this creative if it was uploaded via API. +-- Read-only. The value of this field is generated, and will be ignored for +-- uploads. (formatted RFC 3339 timestamp). +cApiUploadTimestamp :: Lens' Creative (Maybe UTCTime) +cApiUploadTimestamp + = lens _cApiUploadTimestamp + (\ s a -> s{_cApiUploadTimestamp = a}) + +-- | The granular status of this ad in specific contexts. A context here +-- relates to where something ultimately serves (for example, a physical +-- location, a platform, an HTTPS vs HTTP request, or the type of auction). +-- Read-only. This field should not be set in requests. +cServingRestrictions :: Lens' Creative [CreativeServingRestrictionsItem] +cServingRestrictions + = lens _cServingRestrictions + (\ s a -> s{_cServingRestrictions = a}) + . _Default + . _Coerce + +-- | Top-level open auction status. Read-only. This field should not be set +-- in requests. If disapproved, an entry for auctionType=OPEN_AUCTION (or +-- ALL) in servingRestrictions will also exist. Note that this may be +-- nuanced with other contextual restrictions, in which case it may be +-- preferable to read from ServingRestrictions directly. +cOpenAuctionStatus :: Lens' Creative (Maybe Text) +cOpenAuctionStatus + = lens _cOpenAuctionStatus + (\ s a -> s{_cOpenAuctionStatus = a}) + +instance FromJSON Creative where + parseJSON + = withObject "Creative" + (\ o -> + Creative <$> + (o .:? "attribute" .!= mempty) <*> (o .:? "nativeAd") + <*> (o .:? "height") + <*> (o .:? "buyerCreativeId") + <*> (o .:? "advertiserName") + <*> (o .:? "agencyId") + <*> (o .:? "corrections" .!= mempty) + <*> (o .:? "productCategories" .!= mempty) + <*> (o .:? "kind" .!= "adexchangebuyer#creative") + <*> (o .:? "HTMLSnippet") + <*> (o .:? "advertiserId" .!= mempty) + <*> (o .:? "restrictedCategories" .!= mempty) + <*> (o .:? "dealsStatus") + <*> (o .:? "width") + <*> (o .:? "clickThroughUrl" .!= mempty) + <*> (o .:? "vendorType" .!= mempty) + <*> (o .:? "accountId") + <*> (o .:? "impressionTrackingUrl" .!= mempty) + <*> (o .:? "filteringReasons") + <*> (o .:? "version") + <*> (o .:? "sensitiveCategories" .!= mempty) + <*> (o .:? "videoURL") + <*> (o .:? "api_upload_timestamp") + <*> (o .:? "servingRestrictions" .!= mempty) + <*> (o .:? "openAuctionStatus")) + +instance ToJSON Creative where + toJSON Creative{..} + = object + (catMaybes + [("attribute" .=) <$> _cAttribute, + ("nativeAd" .=) <$> _cNativeAd, + ("height" .=) <$> _cHeight, + ("buyerCreativeId" .=) <$> _cBuyerCreativeId, + ("advertiserName" .=) <$> _cAdvertiserName, + ("agencyId" .=) <$> _cAgencyId, + ("corrections" .=) <$> _cCorrections, + ("productCategories" .=) <$> _cProductCategories, + Just ("kind" .= _cKind), + ("HTMLSnippet" .=) <$> _cHTMLSnippet, + ("advertiserId" .=) <$> _cAdvertiserId, + ("restrictedCategories" .=) <$> + _cRestrictedCategories, + ("dealsStatus" .=) <$> _cDealsStatus, + ("width" .=) <$> _cWidth, + ("clickThroughUrl" .=) <$> _cClickThroughUrl, + ("vendorType" .=) <$> _cVendorType, + ("accountId" .=) <$> _cAccountId, + ("impressionTrackingUrl" .=) <$> + _cImpressionTrackingUrl, + ("filteringReasons" .=) <$> _cFilteringReasons, + ("version" .=) <$> _cVersion, + ("sensitiveCategories" .=) <$> _cSensitiveCategories, + ("videoURL" .=) <$> _cVideoURL, + ("api_upload_timestamp" .=) <$> _cApiUploadTimestamp, + ("servingRestrictions" .=) <$> _cServingRestrictions, + ("openAuctionStatus" .=) <$> _cOpenAuctionStatus]) + +-- +-- /See:/ 'addOrderDealsResponse' smart constructor. +data AddOrderDealsResponse = AddOrderDealsResponse + { _aodrDeals :: !(Maybe [Maybe MarketplaceDeal]) + , _aodrOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddOrderDealsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aodrDeals' +-- +-- * 'aodrOrderRevisionNumber' +addOrderDealsResponse + :: AddOrderDealsResponse +addOrderDealsResponse = + AddOrderDealsResponse + { _aodrDeals = Nothing + , _aodrOrderRevisionNumber = Nothing + } + +-- | List of deals added (in the same order as passed in the request) +aodrDeals :: Lens' AddOrderDealsResponse [Maybe MarketplaceDeal] +aodrDeals + = lens _aodrDeals (\ s a -> s{_aodrDeals = a}) . + _Default + . _Coerce + +-- | The updated revision number for the order. +aodrOrderRevisionNumber :: Lens' AddOrderDealsResponse (Maybe Int64) +aodrOrderRevisionNumber + = lens _aodrOrderRevisionNumber + (\ s a -> s{_aodrOrderRevisionNumber = a}) + +instance FromJSON AddOrderDealsResponse where + parseJSON + = withObject "AddOrderDealsResponse" + (\ o -> + AddOrderDealsResponse <$> + (o .:? "deals" .!= mempty) <*> + (o .:? "orderRevisionNumber")) + +instance ToJSON AddOrderDealsResponse where + toJSON AddOrderDealsResponse{..} + = object + (catMaybes + [("deals" .=) <$> _aodrDeals, + ("orderRevisionNumber" .=) <$> + _aodrOrderRevisionNumber]) + +-- +-- /See:/ 'pretargetingConfigList' smart constructor. +data PretargetingConfigList = PretargetingConfigList + { _pclKind :: !Text + , _pclItems :: !(Maybe [Maybe PretargetingConfig]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pclKind' +-- +-- * 'pclItems' +pretargetingConfigList + :: PretargetingConfigList +pretargetingConfigList = + PretargetingConfigList + { _pclKind = "adexchangebuyer#pretargetingConfigList" + , _pclItems = Nothing + } + +-- | Resource type. +pclKind :: Lens' PretargetingConfigList Text +pclKind = lens _pclKind (\ s a -> s{_pclKind = a}) + +-- | A list of pretargeting configs +pclItems :: Lens' PretargetingConfigList [Maybe PretargetingConfig] +pclItems + = lens _pclItems (\ s a -> s{_pclItems = a}) . + _Default + . _Coerce + +instance FromJSON PretargetingConfigList where + parseJSON + = withObject "PretargetingConfigList" + (\ o -> + PretargetingConfigList <$> + (o .:? "kind" .!= + "adexchangebuyer#pretargetingConfigList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PretargetingConfigList where + toJSON PretargetingConfigList{..} + = object + (catMaybes + [Just ("kind" .= _pclKind), + ("items" .=) <$> _pclItems]) + +-- +-- /See:/ 'buyerDto' smart constructor. +data BuyerDto = BuyerDto + { _buySponsorAccountId :: !(Maybe Int32) + , _buyEnabledForInterestTargetingDeals :: !(Maybe Bool) + , _buyCustomerId :: !(Maybe Int32) + , _buyEnabledForPreferredDeals :: !(Maybe Bool) + , _buyAccountId :: !(Maybe Int32) + , _buyDisplayName :: !(Maybe Text) + , _buyId :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BuyerDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buySponsorAccountId' +-- +-- * 'buyEnabledForInterestTargetingDeals' +-- +-- * 'buyCustomerId' +-- +-- * 'buyEnabledForPreferredDeals' +-- +-- * 'buyAccountId' +-- +-- * 'buyDisplayName' +-- +-- * 'buyId' +buyerDto + :: BuyerDto +buyerDto = + BuyerDto + { _buySponsorAccountId = Nothing + , _buyEnabledForInterestTargetingDeals = Nothing + , _buyCustomerId = Nothing + , _buyEnabledForPreferredDeals = Nothing + , _buyAccountId = Nothing + , _buyDisplayName = Nothing + , _buyId = Nothing + } + +buySponsorAccountId :: Lens' BuyerDto (Maybe Int32) +buySponsorAccountId + = lens _buySponsorAccountId + (\ s a -> s{_buySponsorAccountId = a}) + +buyEnabledForInterestTargetingDeals :: Lens' BuyerDto (Maybe Bool) +buyEnabledForInterestTargetingDeals + = lens _buyEnabledForInterestTargetingDeals + (\ s a -> + s{_buyEnabledForInterestTargetingDeals = a}) + +buyCustomerId :: Lens' BuyerDto (Maybe Int32) +buyCustomerId + = lens _buyCustomerId + (\ s a -> s{_buyCustomerId = a}) + +buyEnabledForPreferredDeals :: Lens' BuyerDto (Maybe Bool) +buyEnabledForPreferredDeals + = lens _buyEnabledForPreferredDeals + (\ s a -> s{_buyEnabledForPreferredDeals = a}) + +buyAccountId :: Lens' BuyerDto (Maybe Int32) +buyAccountId + = lens _buyAccountId (\ s a -> s{_buyAccountId = a}) + +buyDisplayName :: Lens' BuyerDto (Maybe Text) +buyDisplayName + = lens _buyDisplayName + (\ s a -> s{_buyDisplayName = a}) + +buyId :: Lens' BuyerDto (Maybe Int32) +buyId = lens _buyId (\ s a -> s{_buyId = a}) + +instance FromJSON BuyerDto where + parseJSON + = withObject "BuyerDto" + (\ o -> + BuyerDto <$> + (o .:? "sponsorAccountId") <*> + (o .:? "enabledForInterestTargetingDeals") + <*> (o .:? "customerId") + <*> (o .:? "enabledForPreferredDeals") + <*> (o .:? "accountId") + <*> (o .:? "displayName") + <*> (o .:? "id")) + +instance ToJSON BuyerDto where + toJSON BuyerDto{..} + = object + (catMaybes + [("sponsorAccountId" .=) <$> _buySponsorAccountId, + ("enabledForInterestTargetingDeals" .=) <$> + _buyEnabledForInterestTargetingDeals, + ("customerId" .=) <$> _buyCustomerId, + ("enabledForPreferredDeals" .=) <$> + _buyEnabledForPreferredDeals, + ("accountId" .=) <$> _buyAccountId, + ("displayName" .=) <$> _buyDisplayName, + ("id" .=) <$> _buyId]) + +-- +-- /See:/ 'dealTermsNonGuaranteedFixedPriceTerms' smart constructor. +newtype DealTermsNonGuaranteedFixedPriceTerms = DealTermsNonGuaranteedFixedPriceTerms + { _dtngfptFixedPrices :: Maybe [Maybe PricePerBuyer] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealTermsNonGuaranteedFixedPriceTerms' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtngfptFixedPrices' +dealTermsNonGuaranteedFixedPriceTerms + :: DealTermsNonGuaranteedFixedPriceTerms +dealTermsNonGuaranteedFixedPriceTerms = + DealTermsNonGuaranteedFixedPriceTerms + { _dtngfptFixedPrices = Nothing + } + +-- | Fixed price for the specified buyer. +dtngfptFixedPrices :: Lens' DealTermsNonGuaranteedFixedPriceTerms [Maybe PricePerBuyer] +dtngfptFixedPrices + = lens _dtngfptFixedPrices + (\ s a -> s{_dtngfptFixedPrices = a}) + . _Default + . _Coerce + +instance FromJSON + DealTermsNonGuaranteedFixedPriceTerms where + parseJSON + = withObject "DealTermsNonGuaranteedFixedPriceTerms" + (\ o -> + DealTermsNonGuaranteedFixedPriceTerms <$> + (o .:? "fixedPrices" .!= mempty)) + +instance ToJSON DealTermsNonGuaranteedFixedPriceTerms + where + toJSON DealTermsNonGuaranteedFixedPriceTerms{..} + = object + (catMaybes + [("fixedPrices" .=) <$> _dtngfptFixedPrices]) + +-- +-- /See:/ 'adSlotDto' smart constructor. +data AdSlotDto = AdSlotDto + { _asdWebPropertyId :: !(Maybe Int32) + , _asdSize :: !(Maybe Text) + , _asdChannelCode :: !(Maybe Text) + , _asdChannelId :: !(Maybe Int32) + , _asdName :: !(Maybe Text) + , _asdDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdSlotDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asdWebPropertyId' +-- +-- * 'asdSize' +-- +-- * 'asdChannelCode' +-- +-- * 'asdChannelId' +-- +-- * 'asdName' +-- +-- * 'asdDescription' +adSlotDto + :: AdSlotDto +adSlotDto = + AdSlotDto + { _asdWebPropertyId = Nothing + , _asdSize = Nothing + , _asdChannelCode = Nothing + , _asdChannelId = Nothing + , _asdName = Nothing + , _asdDescription = Nothing + } + +asdWebPropertyId :: Lens' AdSlotDto (Maybe Int32) +asdWebPropertyId + = lens _asdWebPropertyId + (\ s a -> s{_asdWebPropertyId = a}) + +asdSize :: Lens' AdSlotDto (Maybe Text) +asdSize = lens _asdSize (\ s a -> s{_asdSize = a}) + +asdChannelCode :: Lens' AdSlotDto (Maybe Text) +asdChannelCode + = lens _asdChannelCode + (\ s a -> s{_asdChannelCode = a}) + +asdChannelId :: Lens' AdSlotDto (Maybe Int32) +asdChannelId + = lens _asdChannelId (\ s a -> s{_asdChannelId = a}) + +asdName :: Lens' AdSlotDto (Maybe Text) +asdName = lens _asdName (\ s a -> s{_asdName = a}) + +asdDescription :: Lens' AdSlotDto (Maybe Text) +asdDescription + = lens _asdDescription + (\ s a -> s{_asdDescription = a}) + +instance FromJSON AdSlotDto where + parseJSON + = withObject "AdSlotDto" + (\ o -> + AdSlotDto <$> + (o .:? "webPropertyId") <*> (o .:? "size") <*> + (o .:? "channelCode") + <*> (o .:? "channelId") + <*> (o .:? "name") + <*> (o .:? "description")) + +instance ToJSON AdSlotDto where + toJSON AdSlotDto{..} + = object + (catMaybes + [("webPropertyId" .=) <$> _asdWebPropertyId, + ("size" .=) <$> _asdSize, + ("channelCode" .=) <$> _asdChannelCode, + ("channelId" .=) <$> _asdChannelId, + ("name" .=) <$> _asdName, + ("description" .=) <$> _asdDescription]) + +-- | The configuration data for an Ad Exchange performance report list. +-- +-- /See:/ 'performanceReport' smart constructor. +data PerformanceReport = PerformanceReport + { _prFilteredBidRate :: !(Maybe Double) + , _prKind :: !Text + , _prLatency95thPercentile :: !(Maybe Double) + , _prCookieMatcherStatusRate :: !(Maybe [JSON]) + , _prHostedMatchStatusRate :: !(Maybe [JSON]) + , _prUnsuccessfulRequestRate :: !(Maybe Double) + , _prBidRequestRate :: !(Maybe Double) + , _prQuotaThrottledLimit :: !(Maybe Double) + , _prQuotaConfiguredLimit :: !(Maybe Double) + , _prSuccessfulRequestRate :: !(Maybe Double) + , _prLatency85thPercentile :: !(Maybe Double) + , _prCalloutStatusRate :: !(Maybe [JSON]) + , _prLatency50thPercentile :: !(Maybe Double) + , _prBidRate :: !(Maybe Double) + , _prCreativeStatusRate :: !(Maybe [JSON]) + , _prNoQuotaInRegion :: !(Maybe Double) + , _prRegion :: !(Maybe Text) + , _prInventoryMatchRate :: !(Maybe Double) + , _prPixelMatchResponses :: !(Maybe Double) + , _prTimestamp :: !(Maybe Int64) + , _prPixelMatchRequests :: !(Maybe Double) + , _prOutOfQuota :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PerformanceReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prFilteredBidRate' +-- +-- * 'prKind' +-- +-- * 'prLatency95thPercentile' +-- +-- * 'prCookieMatcherStatusRate' +-- +-- * 'prHostedMatchStatusRate' +-- +-- * 'prUnsuccessfulRequestRate' +-- +-- * 'prBidRequestRate' +-- +-- * 'prQuotaThrottledLimit' +-- +-- * 'prQuotaConfiguredLimit' +-- +-- * 'prSuccessfulRequestRate' +-- +-- * 'prLatency85thPercentile' +-- +-- * 'prCalloutStatusRate' +-- +-- * 'prLatency50thPercentile' +-- +-- * 'prBidRate' +-- +-- * 'prCreativeStatusRate' +-- +-- * 'prNoQuotaInRegion' +-- +-- * 'prRegion' +-- +-- * 'prInventoryMatchRate' +-- +-- * 'prPixelMatchResponses' +-- +-- * 'prTimestamp' +-- +-- * 'prPixelMatchRequests' +-- +-- * 'prOutOfQuota' +performanceReport + :: PerformanceReport +performanceReport = + PerformanceReport + { _prFilteredBidRate = Nothing + , _prKind = "adexchangebuyer#performanceReport" + , _prLatency95thPercentile = Nothing + , _prCookieMatcherStatusRate = Nothing + , _prHostedMatchStatusRate = Nothing + , _prUnsuccessfulRequestRate = Nothing + , _prBidRequestRate = Nothing + , _prQuotaThrottledLimit = Nothing + , _prQuotaConfiguredLimit = Nothing + , _prSuccessfulRequestRate = Nothing + , _prLatency85thPercentile = Nothing + , _prCalloutStatusRate = Nothing + , _prLatency50thPercentile = Nothing + , _prBidRate = Nothing + , _prCreativeStatusRate = Nothing + , _prNoQuotaInRegion = Nothing + , _prRegion = Nothing + , _prInventoryMatchRate = Nothing + , _prPixelMatchResponses = Nothing + , _prTimestamp = Nothing + , _prPixelMatchRequests = Nothing + , _prOutOfQuota = Nothing + } + +-- | The number of bid responses that were filtered due to a policy violation +-- or other errors. +prFilteredBidRate :: Lens' PerformanceReport (Maybe Double) +prFilteredBidRate + = lens _prFilteredBidRate + (\ s a -> s{_prFilteredBidRate = a}) + +-- | Resource type. +prKind :: Lens' PerformanceReport Text +prKind = lens _prKind (\ s a -> s{_prKind = a}) + +-- | The 95th percentile round trip latency(ms) as perceived from Google +-- servers for the duration period covered by the report. +prLatency95thPercentile :: Lens' PerformanceReport (Maybe Double) +prLatency95thPercentile + = lens _prLatency95thPercentile + (\ s a -> s{_prLatency95thPercentile = a}) + +-- | Average QPS for cookie matcher operations. +prCookieMatcherStatusRate :: Lens' PerformanceReport [JSON] +prCookieMatcherStatusRate + = lens _prCookieMatcherStatusRate + (\ s a -> s{_prCookieMatcherStatusRate = a}) + . _Default + . _Coerce + +-- | Average QPS for hosted match operations. +prHostedMatchStatusRate :: Lens' PerformanceReport [JSON] +prHostedMatchStatusRate + = lens _prHostedMatchStatusRate + (\ s a -> s{_prHostedMatchStatusRate = a}) + . _Default + . _Coerce + +-- | The number of bid responses that were unsuccessful due to timeouts, +-- incorrect formatting, etc. +prUnsuccessfulRequestRate :: Lens' PerformanceReport (Maybe Double) +prUnsuccessfulRequestRate + = lens _prUnsuccessfulRequestRate + (\ s a -> s{_prUnsuccessfulRequestRate = a}) + +-- | The number of bid requests sent to your bidder. +prBidRequestRate :: Lens' PerformanceReport (Maybe Double) +prBidRequestRate + = lens _prBidRequestRate + (\ s a -> s{_prBidRequestRate = a}) + +-- | The throttled quota limits for this account. +prQuotaThrottledLimit :: Lens' PerformanceReport (Maybe Double) +prQuotaThrottledLimit + = lens _prQuotaThrottledLimit + (\ s a -> s{_prQuotaThrottledLimit = a}) + +-- | The configured quota limits for this account. +prQuotaConfiguredLimit :: Lens' PerformanceReport (Maybe Double) +prQuotaConfiguredLimit + = lens _prQuotaConfiguredLimit + (\ s a -> s{_prQuotaConfiguredLimit = a}) + +-- | The number of properly formed bid responses received by our servers +-- within the deadline. +prSuccessfulRequestRate :: Lens' PerformanceReport (Maybe Double) +prSuccessfulRequestRate + = lens _prSuccessfulRequestRate + (\ s a -> s{_prSuccessfulRequestRate = a}) + +-- | The 85th percentile round trip latency(ms) as perceived from Google +-- servers for the duration period covered by the report. +prLatency85thPercentile :: Lens' PerformanceReport (Maybe Double) +prLatency85thPercentile + = lens _prLatency85thPercentile + (\ s a -> s{_prLatency85thPercentile = a}) + +-- | Rate of various prefiltering statuses per match. Please refer to the +-- callout-status-codes.txt file for different statuses. +prCalloutStatusRate :: Lens' PerformanceReport [JSON] +prCalloutStatusRate + = lens _prCalloutStatusRate + (\ s a -> s{_prCalloutStatusRate = a}) + . _Default + . _Coerce + +-- | The 50th percentile round trip latency(ms) as perceived from Google +-- servers for the duration period covered by the report. +prLatency50thPercentile :: Lens' PerformanceReport (Maybe Double) +prLatency50thPercentile + = lens _prLatency50thPercentile + (\ s a -> s{_prLatency50thPercentile = a}) + +-- | The number of bid responses with an ad. +prBidRate :: Lens' PerformanceReport (Maybe Double) +prBidRate + = lens _prBidRate (\ s a -> s{_prBidRate = a}) + +-- | Rate of ads with a given status. Please refer to the +-- creative-status-codes.txt file for different statuses. +prCreativeStatusRate :: Lens' PerformanceReport [JSON] +prCreativeStatusRate + = lens _prCreativeStatusRate + (\ s a -> s{_prCreativeStatusRate = a}) + . _Default + . _Coerce + +-- | Rate of various quota account statuses per quota check. +prNoQuotaInRegion :: Lens' PerformanceReport (Maybe Double) +prNoQuotaInRegion + = lens _prNoQuotaInRegion + (\ s a -> s{_prNoQuotaInRegion = a}) + +-- | The trading location of this data. +prRegion :: Lens' PerformanceReport (Maybe Text) +prRegion = lens _prRegion (\ s a -> s{_prRegion = a}) + +-- | The number of potential queries based on your pretargeting settings. +prInventoryMatchRate :: Lens' PerformanceReport (Maybe Double) +prInventoryMatchRate + = lens _prInventoryMatchRate + (\ s a -> s{_prInventoryMatchRate = a}) + +-- | Average QPS for pixel match responses from clients. +prPixelMatchResponses :: Lens' PerformanceReport (Maybe Double) +prPixelMatchResponses + = lens _prPixelMatchResponses + (\ s a -> s{_prPixelMatchResponses = a}) + +-- | The unix timestamp of the starting time of this performance data. +prTimestamp :: Lens' PerformanceReport (Maybe Int64) +prTimestamp + = lens _prTimestamp (\ s a -> s{_prTimestamp = a}) + +-- | Average QPS for pixel match requests from clients. +prPixelMatchRequests :: Lens' PerformanceReport (Maybe Double) +prPixelMatchRequests + = lens _prPixelMatchRequests + (\ s a -> s{_prPixelMatchRequests = a}) + +-- | Rate of various quota account statuses per quota check. +prOutOfQuota :: Lens' PerformanceReport (Maybe Double) +prOutOfQuota + = lens _prOutOfQuota (\ s a -> s{_prOutOfQuota = a}) + +instance FromJSON PerformanceReport where + parseJSON + = withObject "PerformanceReport" + (\ o -> + PerformanceReport <$> + (o .:? "filteredBidRate") <*> + (o .:? "kind" .!= + "adexchangebuyer#performanceReport") + <*> (o .:? "latency95thPercentile") + <*> (o .:? "cookieMatcherStatusRate" .!= mempty) + <*> (o .:? "hostedMatchStatusRate" .!= mempty) + <*> (o .:? "unsuccessfulRequestRate") + <*> (o .:? "bidRequestRate") + <*> (o .:? "quotaThrottledLimit") + <*> (o .:? "quotaConfiguredLimit") + <*> (o .:? "successfulRequestRate") + <*> (o .:? "latency85thPercentile") + <*> (o .:? "calloutStatusRate" .!= mempty) + <*> (o .:? "latency50thPercentile") + <*> (o .:? "bidRate") + <*> (o .:? "creativeStatusRate" .!= mempty) + <*> (o .:? "noQuotaInRegion") + <*> (o .:? "region") + <*> (o .:? "inventoryMatchRate") + <*> (o .:? "pixelMatchResponses") + <*> (o .:? "timestamp") + <*> (o .:? "pixelMatchRequests") + <*> (o .:? "outOfQuota")) + +instance ToJSON PerformanceReport where + toJSON PerformanceReport{..} + = object + (catMaybes + [("filteredBidRate" .=) <$> _prFilteredBidRate, + Just ("kind" .= _prKind), + ("latency95thPercentile" .=) <$> + _prLatency95thPercentile, + ("cookieMatcherStatusRate" .=) <$> + _prCookieMatcherStatusRate, + ("hostedMatchStatusRate" .=) <$> + _prHostedMatchStatusRate, + ("unsuccessfulRequestRate" .=) <$> + _prUnsuccessfulRequestRate, + ("bidRequestRate" .=) <$> _prBidRequestRate, + ("quotaThrottledLimit" .=) <$> + _prQuotaThrottledLimit, + ("quotaConfiguredLimit" .=) <$> + _prQuotaConfiguredLimit, + ("successfulRequestRate" .=) <$> + _prSuccessfulRequestRate, + ("latency85thPercentile" .=) <$> + _prLatency85thPercentile, + ("calloutStatusRate" .=) <$> _prCalloutStatusRate, + ("latency50thPercentile" .=) <$> + _prLatency50thPercentile, + ("bidRate" .=) <$> _prBidRate, + ("creativeStatusRate" .=) <$> _prCreativeStatusRate, + ("noQuotaInRegion" .=) <$> _prNoQuotaInRegion, + ("region" .=) <$> _prRegion, + ("inventoryMatchRate" .=) <$> _prInventoryMatchRate, + ("pixelMatchResponses" .=) <$> + _prPixelMatchResponses, + ("timestamp" .=) <$> _prTimestamp, + ("pixelMatchRequests" .=) <$> _prPixelMatchRequests, + ("outOfQuota" .=) <$> _prOutOfQuota]) + +-- | Configuration data for an Ad Exchange buyer account. +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _aMaximumTotalQps :: !(Maybe Int32) + , _aKind :: !Text + , _aCookieMatchingUrl :: !(Maybe Text) + , _aMaximumActiveCreatives :: !(Maybe Int32) + , _aCookieMatchingNid :: !(Maybe Text) + , _aNumberActiveCreatives :: !(Maybe Int32) + , _aId :: !(Maybe Int32) + , _aBidderLocation :: !(Maybe [AccountBidderLocationItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aMaximumTotalQps' +-- +-- * 'aKind' +-- +-- * 'aCookieMatchingUrl' +-- +-- * 'aMaximumActiveCreatives' +-- +-- * 'aCookieMatchingNid' +-- +-- * 'aNumberActiveCreatives' +-- +-- * 'aId' +-- +-- * 'aBidderLocation' +account + :: Account +account = + Account + { _aMaximumTotalQps = Nothing + , _aKind = "adexchangebuyer#account" + , _aCookieMatchingUrl = Nothing + , _aMaximumActiveCreatives = Nothing + , _aCookieMatchingNid = Nothing + , _aNumberActiveCreatives = Nothing + , _aId = Nothing + , _aBidderLocation = Nothing + } + +-- | The sum of all bidderLocation.maximumQps values cannot exceed this. +-- Please contact your technical account manager if you need to change +-- this. +aMaximumTotalQps :: Lens' Account (Maybe Int32) +aMaximumTotalQps + = lens _aMaximumTotalQps + (\ s a -> s{_aMaximumTotalQps = a}) + +-- | Resource type. +aKind :: Lens' Account Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The base URL used in cookie match requests. +aCookieMatchingUrl :: Lens' Account (Maybe Text) +aCookieMatchingUrl + = lens _aCookieMatchingUrl + (\ s a -> s{_aCookieMatchingUrl = a}) + +-- | The maximum number of active creatives that an account can have, where a +-- creative is active if it was inserted or bid with in the last 30 days. +-- Please contact your technical account manager if you need to change +-- this. +aMaximumActiveCreatives :: Lens' Account (Maybe Int32) +aMaximumActiveCreatives + = lens _aMaximumActiveCreatives + (\ s a -> s{_aMaximumActiveCreatives = a}) + +-- | The nid parameter value used in cookie match requests. Please contact +-- your technical account manager if you need to change this. +aCookieMatchingNid :: Lens' Account (Maybe Text) +aCookieMatchingNid + = lens _aCookieMatchingNid + (\ s a -> s{_aCookieMatchingNid = a}) + +-- | The number of creatives that this account inserted or bid with in the +-- last 30 days. +aNumberActiveCreatives :: Lens' Account (Maybe Int32) +aNumberActiveCreatives + = lens _aNumberActiveCreatives + (\ s a -> s{_aNumberActiveCreatives = a}) + +-- | Account id. +aId :: Lens' Account (Maybe Int32) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | Your bidder locations that have distinct URLs. +aBidderLocation :: Lens' Account [AccountBidderLocationItem] +aBidderLocation + = lens _aBidderLocation + (\ s a -> s{_aBidderLocation = a}) + . _Default + . _Coerce + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "maximumTotalQps") <*> + (o .:? "kind" .!= "adexchangebuyer#account") + <*> (o .:? "cookieMatchingUrl") + <*> (o .:? "maximumActiveCreatives") + <*> (o .:? "cookieMatchingNid") + <*> (o .:? "numberActiveCreatives") + <*> (o .:? "id") + <*> (o .:? "bidderLocation" .!= mempty)) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("maximumTotalQps" .=) <$> _aMaximumTotalQps, + Just ("kind" .= _aKind), + ("cookieMatchingUrl" .=) <$> _aCookieMatchingUrl, + ("maximumActiveCreatives" .=) <$> + _aMaximumActiveCreatives, + ("cookieMatchingNid" .=) <$> _aCookieMatchingNid, + ("numberActiveCreatives" .=) <$> + _aNumberActiveCreatives, + ("id" .=) <$> _aId, + ("bidderLocation" .=) <$> _aBidderLocation]) + +-- +-- /See:/ 'seller' smart constructor. +data Seller = Seller + { _sAccountId :: !(Maybe Text) + , _sSubAccountId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Seller' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sAccountId' +-- +-- * 'sSubAccountId' +seller + :: Seller +seller = + Seller + { _sAccountId = Nothing + , _sSubAccountId = Nothing + } + +-- | The unique id for the seller. The seller fills in this field. The seller +-- account id is then available to buyer in the offer. +sAccountId :: Lens' Seller (Maybe Text) +sAccountId + = lens _sAccountId (\ s a -> s{_sAccountId = a}) + +-- | Optional sub-account id for the seller. +sSubAccountId :: Lens' Seller (Maybe Text) +sSubAccountId + = lens _sSubAccountId + (\ s a -> s{_sSubAccountId = a}) + +instance FromJSON Seller where + parseJSON + = withObject "Seller" + (\ o -> + Seller <$> + (o .:? "accountId") <*> (o .:? "subAccountId")) + +instance ToJSON Seller where + toJSON Seller{..} + = object + (catMaybes + [("accountId" .=) <$> _sAccountId, + ("subAccountId" .=) <$> _sSubAccountId]) + +-- +-- /See:/ 'deleteOrderDealsRequest' smart constructor. +data DeleteOrderDealsRequest = DeleteOrderDealsRequest + { _dodrUpdateAction :: !(Maybe Text) + , _dodrDealIds :: !(Maybe [Text]) + , _dodrOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeleteOrderDealsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dodrUpdateAction' +-- +-- * 'dodrDealIds' +-- +-- * 'dodrOrderRevisionNumber' +deleteOrderDealsRequest + :: DeleteOrderDealsRequest +deleteOrderDealsRequest = + DeleteOrderDealsRequest + { _dodrUpdateAction = Nothing + , _dodrDealIds = Nothing + , _dodrOrderRevisionNumber = Nothing + } + +dodrUpdateAction :: Lens' DeleteOrderDealsRequest (Maybe Text) +dodrUpdateAction + = lens _dodrUpdateAction + (\ s a -> s{_dodrUpdateAction = a}) + +-- | List of deals to delete for a given order +dodrDealIds :: Lens' DeleteOrderDealsRequest [Text] +dodrDealIds + = lens _dodrDealIds (\ s a -> s{_dodrDealIds = a}) . + _Default + . _Coerce + +-- | The last known order revision number. +dodrOrderRevisionNumber :: Lens' DeleteOrderDealsRequest (Maybe Int64) +dodrOrderRevisionNumber + = lens _dodrOrderRevisionNumber + (\ s a -> s{_dodrOrderRevisionNumber = a}) + +instance FromJSON DeleteOrderDealsRequest where + parseJSON + = withObject "DeleteOrderDealsRequest" + (\ o -> + DeleteOrderDealsRequest <$> + (o .:? "updateAction") <*> + (o .:? "dealIds" .!= mempty) + <*> (o .:? "orderRevisionNumber")) + +instance ToJSON DeleteOrderDealsRequest where + toJSON DeleteOrderDealsRequest{..} + = object + (catMaybes + [("updateAction" .=) <$> _dodrUpdateAction, + ("dealIds" .=) <$> _dodrDealIds, + ("orderRevisionNumber" .=) <$> + _dodrOrderRevisionNumber]) + +-- +-- /See:/ 'getOrderDealsResponse' smart constructor. +newtype GetOrderDealsResponse = GetOrderDealsResponse + { _godrDeals :: Maybe [Maybe MarketplaceDeal] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetOrderDealsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'godrDeals' +getOrderDealsResponse + :: GetOrderDealsResponse +getOrderDealsResponse = + GetOrderDealsResponse + { _godrDeals = Nothing + } + +-- | List of deals for the order +godrDeals :: Lens' GetOrderDealsResponse [Maybe MarketplaceDeal] +godrDeals + = lens _godrDeals (\ s a -> s{_godrDeals = a}) . + _Default + . _Coerce + +instance FromJSON GetOrderDealsResponse where + parseJSON + = withObject "GetOrderDealsResponse" + (\ o -> + GetOrderDealsResponse <$> (o .:? "deals" .!= mempty)) + +instance ToJSON GetOrderDealsResponse where + toJSON GetOrderDealsResponse{..} + = object (catMaybes [("deals" .=) <$> _godrDeals]) + +-- +-- /See:/ 'contactInformation' smart constructor. +data ContactInformation = ContactInformation + { _ciEmail :: !(Maybe Text) + , _ciName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactInformation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciEmail' +-- +-- * 'ciName' +contactInformation + :: ContactInformation +contactInformation = + ContactInformation + { _ciEmail = Nothing + , _ciName = Nothing + } + +-- | Email address of the contact. +ciEmail :: Lens' ContactInformation (Maybe Text) +ciEmail = lens _ciEmail (\ s a -> s{_ciEmail = a}) + +-- | The name of the contact. +ciName :: Lens' ContactInformation (Maybe Text) +ciName = lens _ciName (\ s a -> s{_ciName = a}) + +instance FromJSON ContactInformation where + parseJSON + = withObject "ContactInformation" + (\ o -> + ContactInformation <$> + (o .:? "email") <*> (o .:? "name")) + +instance ToJSON ContactInformation where + toJSON ContactInformation{..} + = object + (catMaybes + [("email" .=) <$> _ciEmail, ("name" .=) <$> _ciName]) + +-- +-- /See:/ 'targetingValueCreativeSize' smart constructor. +data TargetingValueCreativeSize = TargetingValueCreativeSize + { _tvcsSize :: !(Maybe (Maybe TargetingValueSize)) + , _tvcsCompanionSizes :: !(Maybe [Maybe TargetingValueSize]) + , _tvcsCreativeSizeType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetingValueCreativeSize' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvcsSize' +-- +-- * 'tvcsCompanionSizes' +-- +-- * 'tvcsCreativeSizeType' +targetingValueCreativeSize + :: TargetingValueCreativeSize +targetingValueCreativeSize = + TargetingValueCreativeSize + { _tvcsSize = Nothing + , _tvcsCompanionSizes = Nothing + , _tvcsCreativeSizeType = Nothing + } + +-- | For regular creative size type, specifies the size of the creative. +tvcsSize :: Lens' TargetingValueCreativeSize (Maybe (Maybe TargetingValueSize)) +tvcsSize = lens _tvcsSize (\ s a -> s{_tvcsSize = a}) + +-- | For video size type, the list of companion sizes. +tvcsCompanionSizes :: Lens' TargetingValueCreativeSize [Maybe TargetingValueSize] +tvcsCompanionSizes + = lens _tvcsCompanionSizes + (\ s a -> s{_tvcsCompanionSizes = a}) + . _Default + . _Coerce + +-- | The Creative size type. +tvcsCreativeSizeType :: Lens' TargetingValueCreativeSize (Maybe Text) +tvcsCreativeSizeType + = lens _tvcsCreativeSizeType + (\ s a -> s{_tvcsCreativeSizeType = a}) + +instance FromJSON TargetingValueCreativeSize where + parseJSON + = withObject "TargetingValueCreativeSize" + (\ o -> + TargetingValueCreativeSize <$> + (o .:? "size") <*> + (o .:? "companionSizes" .!= mempty) + <*> (o .:? "creativeSizeType")) + +instance ToJSON TargetingValueCreativeSize where + toJSON TargetingValueCreativeSize{..} + = object + (catMaybes + [("size" .=) <$> _tvcsSize, + ("companionSizes" .=) <$> _tvcsCompanionSizes, + ("creativeSizeType" .=) <$> _tvcsCreativeSizeType]) + +-- +-- /See:/ 'pretargetingConfig' smart constructor. +data PretargetingConfig = PretargetingConfig + { _pcPlatforms :: !(Maybe [Text]) + , _pcMobileCarriers :: !(Maybe [Int64]) + , _pcVendorTypes :: !(Maybe [Int64]) + , _pcExcludedGeoCriteriaIds :: !(Maybe [Int64]) + , _pcSupportedCreativeAttributes :: !(Maybe [Int64]) + , _pcUserLists :: !(Maybe [Int64]) + , _pcKind :: !Text + , _pcExcludedPlacements :: !(Maybe [PretargetingConfigExcludedPlacementsItem]) + , _pcMobileDevices :: !(Maybe [Int64]) + , _pcLanguages :: !(Maybe [Text]) + , _pcVerticals :: !(Maybe [Int64]) + , _pcConfigId :: !(Maybe Int64) + , _pcPlacements :: !(Maybe [PretargetingConfigPlacementsItem]) + , _pcExcludedUserLists :: !(Maybe [Int64]) + , _pcConfigName :: !(Maybe Text) + , _pcGeoCriteriaIds :: !(Maybe [Int64]) + , _pcDimensions :: !(Maybe [PretargetingConfigDimensionsItem]) + , _pcExcludedVerticals :: !(Maybe [Int64]) + , _pcCreativeType :: !(Maybe [Text]) + , _pcIsActive :: !(Maybe Bool) + , _pcExcludedContentLabels :: !(Maybe [Int64]) + , _pcBillingId :: !(Maybe Int64) + , _pcMobileOperatingSystemVersions :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcPlatforms' +-- +-- * 'pcMobileCarriers' +-- +-- * 'pcVendorTypes' +-- +-- * 'pcExcludedGeoCriteriaIds' +-- +-- * 'pcSupportedCreativeAttributes' +-- +-- * 'pcUserLists' +-- +-- * 'pcKind' +-- +-- * 'pcExcludedPlacements' +-- +-- * 'pcMobileDevices' +-- +-- * 'pcLanguages' +-- +-- * 'pcVerticals' +-- +-- * 'pcConfigId' +-- +-- * 'pcPlacements' +-- +-- * 'pcExcludedUserLists' +-- +-- * 'pcConfigName' +-- +-- * 'pcGeoCriteriaIds' +-- +-- * 'pcDimensions' +-- +-- * 'pcExcludedVerticals' +-- +-- * 'pcCreativeType' +-- +-- * 'pcIsActive' +-- +-- * 'pcExcludedContentLabels' +-- +-- * 'pcBillingId' +-- +-- * 'pcMobileOperatingSystemVersions' +pretargetingConfig + :: PretargetingConfig +pretargetingConfig = + PretargetingConfig + { _pcPlatforms = Nothing + , _pcMobileCarriers = Nothing + , _pcVendorTypes = Nothing + , _pcExcludedGeoCriteriaIds = Nothing + , _pcSupportedCreativeAttributes = Nothing + , _pcUserLists = Nothing + , _pcKind = "adexchangebuyer#pretargetingConfig" + , _pcExcludedPlacements = Nothing + , _pcMobileDevices = Nothing + , _pcLanguages = Nothing + , _pcVerticals = Nothing + , _pcConfigId = Nothing + , _pcPlacements = Nothing + , _pcExcludedUserLists = Nothing + , _pcConfigName = Nothing + , _pcGeoCriteriaIds = Nothing + , _pcDimensions = Nothing + , _pcExcludedVerticals = Nothing + , _pcCreativeType = Nothing + , _pcIsActive = Nothing + , _pcExcludedContentLabels = Nothing + , _pcBillingId = Nothing + , _pcMobileOperatingSystemVersions = Nothing + } + +-- | Requests matching any of these platforms will match. Possible values are +-- PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and +-- PRETARGETING_PLATFORM_TABLET. +pcPlatforms :: Lens' PretargetingConfig [Text] +pcPlatforms + = lens _pcPlatforms (\ s a -> s{_pcPlatforms = a}) . + _Default + . _Coerce + +-- | Requests containing any of these mobile carrier ids will match. Values +-- are from mobile-carriers.csv in the downloadable files section. +pcMobileCarriers :: Lens' PretargetingConfig [Int64] +pcMobileCarriers + = lens _pcMobileCarriers + (\ s a -> s{_pcMobileCarriers = a}) + . _Default + . _Coerce + +-- | Requests that allow any of these vendor ids will match. Values are from +-- vendors.txt in the downloadable files section. +pcVendorTypes :: Lens' PretargetingConfig [Int64] +pcVendorTypes + = lens _pcVendorTypes + (\ s a -> s{_pcVendorTypes = a}) + . _Default + . _Coerce + +-- | Requests containing any of these geo criteria ids will not match. +pcExcludedGeoCriteriaIds :: Lens' PretargetingConfig [Int64] +pcExcludedGeoCriteriaIds + = lens _pcExcludedGeoCriteriaIds + (\ s a -> s{_pcExcludedGeoCriteriaIds = a}) + . _Default + . _Coerce + +-- | Creative attributes should be declared here if all creatives +-- corresponding to this pretargeting configuration have that creative +-- attribute. Values are from pretargetable-creative-attributes.txt in the +-- downloadable files section. +pcSupportedCreativeAttributes :: Lens' PretargetingConfig [Int64] +pcSupportedCreativeAttributes + = lens _pcSupportedCreativeAttributes + (\ s a -> s{_pcSupportedCreativeAttributes = a}) + . _Default + . _Coerce + +-- | Requests containing any of these user list ids will match. +pcUserLists :: Lens' PretargetingConfig [Int64] +pcUserLists + = lens _pcUserLists (\ s a -> s{_pcUserLists = a}) . + _Default + . _Coerce + +-- | The kind of the resource, i.e. \"adexchangebuyer#pretargetingConfig\". +pcKind :: Lens' PretargetingConfig Text +pcKind = lens _pcKind (\ s a -> s{_pcKind = a}) + +-- | Requests containing any of these placements will not match. +pcExcludedPlacements :: Lens' PretargetingConfig [PretargetingConfigExcludedPlacementsItem] +pcExcludedPlacements + = lens _pcExcludedPlacements + (\ s a -> s{_pcExcludedPlacements = a}) + . _Default + . _Coerce + +-- | Requests containing any of these mobile device ids will match. Values +-- are from mobile-devices.csv in the downloadable files section. +pcMobileDevices :: Lens' PretargetingConfig [Int64] +pcMobileDevices + = lens _pcMobileDevices + (\ s a -> s{_pcMobileDevices = a}) + . _Default + . _Coerce + +-- | Request containing any of these language codes will match. +pcLanguages :: Lens' PretargetingConfig [Text] +pcLanguages + = lens _pcLanguages (\ s a -> s{_pcLanguages = a}) . + _Default + . _Coerce + +-- | Requests containing any of these vertical ids will match. +pcVerticals :: Lens' PretargetingConfig [Int64] +pcVerticals + = lens _pcVerticals (\ s a -> s{_pcVerticals = a}) . + _Default + . _Coerce + +-- | The config id; generated automatically. Leave this field blank for +-- insert requests. +pcConfigId :: Lens' PretargetingConfig (Maybe Int64) +pcConfigId + = lens _pcConfigId (\ s a -> s{_pcConfigId = a}) + +-- | Requests containing any of these placements will match. +pcPlacements :: Lens' PretargetingConfig [PretargetingConfigPlacementsItem] +pcPlacements + = lens _pcPlacements (\ s a -> s{_pcPlacements = a}) + . _Default + . _Coerce + +-- | Requests containing any of these users list ids will not match. +pcExcludedUserLists :: Lens' PretargetingConfig [Int64] +pcExcludedUserLists + = lens _pcExcludedUserLists + (\ s a -> s{_pcExcludedUserLists = a}) + . _Default + . _Coerce + +-- | The name of the config. Must be unique. Required for all requests. +pcConfigName :: Lens' PretargetingConfig (Maybe Text) +pcConfigName + = lens _pcConfigName (\ s a -> s{_pcConfigName = a}) + +-- | Requests containing any of these geo criteria ids will match. +pcGeoCriteriaIds :: Lens' PretargetingConfig [Int64] +pcGeoCriteriaIds + = lens _pcGeoCriteriaIds + (\ s a -> s{_pcGeoCriteriaIds = a}) + . _Default + . _Coerce + +-- | Requests which allow one of these (width, height) pairs will match. All +-- pairs must be supported ad dimensions. +pcDimensions :: Lens' PretargetingConfig [PretargetingConfigDimensionsItem] +pcDimensions + = lens _pcDimensions (\ s a -> s{_pcDimensions = a}) + . _Default + . _Coerce + +-- | Requests containing any of these vertical ids will not match. Values are +-- from the publisher-verticals.txt file in the downloadable files section. +pcExcludedVerticals :: Lens' PretargetingConfig [Int64] +pcExcludedVerticals + = lens _pcExcludedVerticals + (\ s a -> s{_pcExcludedVerticals = a}) + . _Default + . _Coerce + +-- | List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or +-- PRETARGETING_CREATIVE_TYPE_VIDEO. +pcCreativeType :: Lens' PretargetingConfig [Text] +pcCreativeType + = lens _pcCreativeType + (\ s a -> s{_pcCreativeType = a}) + . _Default + . _Coerce + +-- | Whether this config is active. Required for all requests. +pcIsActive :: Lens' PretargetingConfig (Maybe Bool) +pcIsActive + = lens _pcIsActive (\ s a -> s{_pcIsActive = a}) + +-- | Requests with any of these content labels will not match. Values are +-- from content-labels.txt in the downloadable files section. +pcExcludedContentLabels :: Lens' PretargetingConfig [Int64] +pcExcludedContentLabels + = lens _pcExcludedContentLabels + (\ s a -> s{_pcExcludedContentLabels = a}) + . _Default + . _Coerce + +-- | The id for billing purposes, provided for reference. Leave this field +-- blank for insert requests; the id will be generated automatically. +pcBillingId :: Lens' PretargetingConfig (Maybe Int64) +pcBillingId + = lens _pcBillingId (\ s a -> s{_pcBillingId = a}) + +-- | Requests containing any of these mobile operating system version ids +-- will match. Values are from mobile-os.csv in the downloadable files +-- section. +pcMobileOperatingSystemVersions :: Lens' PretargetingConfig [Int64] +pcMobileOperatingSystemVersions + = lens _pcMobileOperatingSystemVersions + (\ s a -> s{_pcMobileOperatingSystemVersions = a}) + . _Default + . _Coerce + +instance FromJSON PretargetingConfig where + parseJSON + = withObject "PretargetingConfig" + (\ o -> + PretargetingConfig <$> + (o .:? "platforms" .!= mempty) <*> + (o .:? "mobileCarriers" .!= mempty) + <*> (o .:? "vendorTypes" .!= mempty) + <*> (o .:? "excludedGeoCriteriaIds" .!= mempty) + <*> (o .:? "supportedCreativeAttributes" .!= mempty) + <*> (o .:? "userLists" .!= mempty) + <*> + (o .:? "kind" .!= + "adexchangebuyer#pretargetingConfig") + <*> (o .:? "excludedPlacements" .!= mempty) + <*> (o .:? "mobileDevices" .!= mempty) + <*> (o .:? "languages" .!= mempty) + <*> (o .:? "verticals" .!= mempty) + <*> (o .:? "configId") + <*> (o .:? "placements" .!= mempty) + <*> (o .:? "excludedUserLists" .!= mempty) + <*> (o .:? "configName") + <*> (o .:? "geoCriteriaIds" .!= mempty) + <*> (o .:? "dimensions" .!= mempty) + <*> (o .:? "excludedVerticals" .!= mempty) + <*> (o .:? "creativeType" .!= mempty) + <*> (o .:? "isActive") + <*> (o .:? "excludedContentLabels" .!= mempty) + <*> (o .:? "billingId") + <*> + (o .:? "mobileOperatingSystemVersions" .!= mempty)) + +instance ToJSON PretargetingConfig where + toJSON PretargetingConfig{..} + = object + (catMaybes + [("platforms" .=) <$> _pcPlatforms, + ("mobileCarriers" .=) <$> _pcMobileCarriers, + ("vendorTypes" .=) <$> _pcVendorTypes, + ("excludedGeoCriteriaIds" .=) <$> + _pcExcludedGeoCriteriaIds, + ("supportedCreativeAttributes" .=) <$> + _pcSupportedCreativeAttributes, + ("userLists" .=) <$> _pcUserLists, + Just ("kind" .= _pcKind), + ("excludedPlacements" .=) <$> _pcExcludedPlacements, + ("mobileDevices" .=) <$> _pcMobileDevices, + ("languages" .=) <$> _pcLanguages, + ("verticals" .=) <$> _pcVerticals, + ("configId" .=) <$> _pcConfigId, + ("placements" .=) <$> _pcPlacements, + ("excludedUserLists" .=) <$> _pcExcludedUserLists, + ("configName" .=) <$> _pcConfigName, + ("geoCriteriaIds" .=) <$> _pcGeoCriteriaIds, + ("dimensions" .=) <$> _pcDimensions, + ("excludedVerticals" .=) <$> _pcExcludedVerticals, + ("creativeType" .=) <$> _pcCreativeType, + ("isActive" .=) <$> _pcIsActive, + ("excludedContentLabels" .=) <$> + _pcExcludedContentLabels, + ("billingId" .=) <$> _pcBillingId, + ("mobileOperatingSystemVersions" .=) <$> + _pcMobileOperatingSystemVersions]) + +-- | The configuration data for an Ad Exchange performance report list. +-- https:\/\/sites.google.com\/a\/google.com\/adx-integration\/Home\/engineering\/binary-releases\/rtb-api-release +-- https:\/\/cs.corp.google.com\/#piper\/\/\/depot\/google3\/contentads\/adx\/tools\/rtb_api\/adxrtb.py +-- +-- /See:/ 'performanceReportList' smart constructor. +data PerformanceReportList = PerformanceReportList + { _prlKind :: !Text + , _prlPerformanceReport :: !(Maybe [Maybe PerformanceReport]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PerformanceReportList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prlKind' +-- +-- * 'prlPerformanceReport' +performanceReportList + :: PerformanceReportList +performanceReportList = + PerformanceReportList + { _prlKind = "adexchangebuyer#performanceReportList" + , _prlPerformanceReport = Nothing + } + +-- | Resource type. +prlKind :: Lens' PerformanceReportList Text +prlKind = lens _prlKind (\ s a -> s{_prlKind = a}) + +-- | A list of performance reports relevant for the account. +prlPerformanceReport :: Lens' PerformanceReportList [Maybe PerformanceReport] +prlPerformanceReport + = lens _prlPerformanceReport + (\ s a -> s{_prlPerformanceReport = a}) + . _Default + . _Coerce + +instance FromJSON PerformanceReportList where + parseJSON + = withObject "PerformanceReportList" + (\ o -> + PerformanceReportList <$> + (o .:? "kind" .!= + "adexchangebuyer#performanceReportList") + <*> (o .:? "performanceReport" .!= mempty)) + +instance ToJSON PerformanceReportList where + toJSON PerformanceReportList{..} + = object + (catMaybes + [Just ("kind" .= _prlKind), + ("performanceReport" .=) <$> _prlPerformanceReport]) + +-- +-- /See:/ 'negotiationDto' smart constructor. +data NegotiationDto = NegotiationDto + { _ndNegotiationState :: !(Maybe Text) + , _ndExternalDealId :: !(Maybe Int64) + , _ndStatus :: !(Maybe Text) + , _ndDealType :: !(Maybe Text) + , _ndNegotiationRounds :: !(Maybe [Maybe NegotiationRoundDto]) + , _ndKind :: !Text + , _ndBilledBuyer :: !(Maybe (Maybe DealPartyDto)) + , _ndBuyerEmailContacts :: !(Maybe [Text]) + , _ndStats :: !(Maybe (Maybe StatsDto)) + , _ndSeller :: !(Maybe (Maybe DealPartyDto)) + , _ndLabelNames :: !(Maybe [Text]) + , _ndOfferId :: !(Maybe Int64) + , _ndNegotiationId :: !(Maybe Int64) + , _ndSellerEmailContacts :: !(Maybe [Text]) + , _ndBuyer :: !(Maybe (Maybe DealPartyDto)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ndNegotiationState' +-- +-- * 'ndExternalDealId' +-- +-- * 'ndStatus' +-- +-- * 'ndDealType' +-- +-- * 'ndNegotiationRounds' +-- +-- * 'ndKind' +-- +-- * 'ndBilledBuyer' +-- +-- * 'ndBuyerEmailContacts' +-- +-- * 'ndStats' +-- +-- * 'ndSeller' +-- +-- * 'ndLabelNames' +-- +-- * 'ndOfferId' +-- +-- * 'ndNegotiationId' +-- +-- * 'ndSellerEmailContacts' +-- +-- * 'ndBuyer' +negotiationDto + :: NegotiationDto +negotiationDto = + NegotiationDto + { _ndNegotiationState = Nothing + , _ndExternalDealId = Nothing + , _ndStatus = Nothing + , _ndDealType = Nothing + , _ndNegotiationRounds = Nothing + , _ndKind = "adexchangebuyer#negotiation" + , _ndBilledBuyer = Nothing + , _ndBuyerEmailContacts = Nothing + , _ndStats = Nothing + , _ndSeller = Nothing + , _ndLabelNames = Nothing + , _ndOfferId = Nothing + , _ndNegotiationId = Nothing + , _ndSellerEmailContacts = Nothing + , _ndBuyer = Nothing + } + +-- | The state of this negotiation. +ndNegotiationState :: Lens' NegotiationDto (Maybe Text) +ndNegotiationState + = lens _ndNegotiationState + (\ s a -> s{_ndNegotiationState = a}) + +-- | For finalized negotiations, the ID of the finalized deal. +ndExternalDealId :: Lens' NegotiationDto (Maybe Int64) +ndExternalDealId + = lens _ndExternalDealId + (\ s a -> s{_ndExternalDealId = a}) + +-- | The status of this negotiation. +ndStatus :: Lens' NegotiationDto (Maybe Text) +ndStatus = lens _ndStatus (\ s a -> s{_ndStatus = a}) + +-- | The type of this deal. +ndDealType :: Lens' NegotiationDto (Maybe Text) +ndDealType + = lens _ndDealType (\ s a -> s{_ndDealType = a}) + +-- | The series of negotiation rounds for this negotiation. +ndNegotiationRounds :: Lens' NegotiationDto [Maybe NegotiationRoundDto] +ndNegotiationRounds + = lens _ndNegotiationRounds + (\ s a -> s{_ndNegotiationRounds = a}) + . _Default + . _Coerce + +ndKind :: Lens' NegotiationDto Text +ndKind = lens _ndKind (\ s a -> s{_ndKind = a}) + +-- | The billed buyer; Specified by a buyer buying through an intermediary. +ndBilledBuyer :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto)) +ndBilledBuyer + = lens _ndBilledBuyer + (\ s a -> s{_ndBilledBuyer = a}) + +-- | The buyer party\'s contact email. +ndBuyerEmailContacts :: Lens' NegotiationDto [Text] +ndBuyerEmailContacts + = lens _ndBuyerEmailContacts + (\ s a -> s{_ndBuyerEmailContacts = a}) + . _Default + . _Coerce + +-- | The stats for this negotiation. +ndStats :: Lens' NegotiationDto (Maybe (Maybe StatsDto)) +ndStats = lens _ndStats (\ s a -> s{_ndStats = a}) + +-- | Details of the seller party in this negotiation. +ndSeller :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto)) +ndSeller = lens _ndSeller (\ s a -> s{_ndSeller = a}) + +-- | A list of label names applicable to this negotiation. +ndLabelNames :: Lens' NegotiationDto [Text] +ndLabelNames + = lens _ndLabelNames (\ s a -> s{_ndLabelNames = a}) + . _Default + . _Coerce + +-- | The ID of this negotiation\'s original offer. +ndOfferId :: Lens' NegotiationDto (Maybe Int64) +ndOfferId + = lens _ndOfferId (\ s a -> s{_ndOfferId = a}) + +-- | The unique ID of this negotiation. +ndNegotiationId :: Lens' NegotiationDto (Maybe Int64) +ndNegotiationId + = lens _ndNegotiationId + (\ s a -> s{_ndNegotiationId = a}) + +-- | The seller party\'s contact email. +ndSellerEmailContacts :: Lens' NegotiationDto [Text] +ndSellerEmailContacts + = lens _ndSellerEmailContacts + (\ s a -> s{_ndSellerEmailContacts = a}) + . _Default + . _Coerce + +-- | Details of the buyer party in this negotiation. +ndBuyer :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto)) +ndBuyer = lens _ndBuyer (\ s a -> s{_ndBuyer = a}) + +instance FromJSON NegotiationDto where + parseJSON + = withObject "NegotiationDto" + (\ o -> + NegotiationDto <$> + (o .:? "negotiationState") <*> + (o .:? "externalDealId") + <*> (o .:? "status") + <*> (o .:? "dealType") + <*> (o .:? "negotiationRounds" .!= mempty) + <*> (o .:? "kind" .!= "adexchangebuyer#negotiation") + <*> (o .:? "billedBuyer") + <*> (o .:? "buyerEmailContacts" .!= mempty) + <*> (o .:? "stats") + <*> (o .:? "seller") + <*> (o .:? "labelNames" .!= mempty) + <*> (o .:? "offerId") + <*> (o .:? "negotiationId") + <*> (o .:? "sellerEmailContacts" .!= mempty) + <*> (o .:? "buyer")) + +instance ToJSON NegotiationDto where + toJSON NegotiationDto{..} + = object + (catMaybes + [("negotiationState" .=) <$> _ndNegotiationState, + ("externalDealId" .=) <$> _ndExternalDealId, + ("status" .=) <$> _ndStatus, + ("dealType" .=) <$> _ndDealType, + ("negotiationRounds" .=) <$> _ndNegotiationRounds, + Just ("kind" .= _ndKind), + ("billedBuyer" .=) <$> _ndBilledBuyer, + ("buyerEmailContacts" .=) <$> _ndBuyerEmailContacts, + ("stats" .=) <$> _ndStats, + ("seller" .=) <$> _ndSeller, + ("labelNames" .=) <$> _ndLabelNames, + ("offerId" .=) <$> _ndOfferId, + ("negotiationId" .=) <$> _ndNegotiationId, + ("sellerEmailContacts" .=) <$> + _ndSellerEmailContacts, + ("buyer" .=) <$> _ndBuyer]) + +-- +-- /See:/ 'audienceSegment' smart constructor. +data AudienceSegment = AudienceSegment + { _asNumCookies :: !(Maybe Int64) + , _asName :: !(Maybe Text) + , _asId :: !(Maybe Int64) + , _asDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AudienceSegment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asNumCookies' +-- +-- * 'asName' +-- +-- * 'asId' +-- +-- * 'asDescription' +audienceSegment + :: AudienceSegment +audienceSegment = + AudienceSegment + { _asNumCookies = Nothing + , _asName = Nothing + , _asId = Nothing + , _asDescription = Nothing + } + +asNumCookies :: Lens' AudienceSegment (Maybe Int64) +asNumCookies + = lens _asNumCookies (\ s a -> s{_asNumCookies = a}) + +asName :: Lens' AudienceSegment (Maybe Text) +asName = lens _asName (\ s a -> s{_asName = a}) + +asId :: Lens' AudienceSegment (Maybe Int64) +asId = lens _asId (\ s a -> s{_asId = a}) + +asDescription :: Lens' AudienceSegment (Maybe Text) +asDescription + = lens _asDescription + (\ s a -> s{_asDescription = a}) + +instance FromJSON AudienceSegment where + parseJSON + = withObject "AudienceSegment" + (\ o -> + AudienceSegment <$> + (o .:? "numCookies") <*> (o .:? "name") <*> + (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON AudienceSegment where + toJSON AudienceSegment{..} + = object + (catMaybes + [("numCookies" .=) <$> _asNumCookies, + ("name" .=) <$> _asName, ("id" .=) <$> _asId, + ("description" .=) <$> _asDescription]) + +-- +-- /See:/ 'offerDto' smart constructor. +data OfferDto = OfferDto + { _odCreator :: !(Maybe (Maybe DealPartyDto)) + , _odStatus :: !(Maybe Text) + , _odOfferState :: !(Maybe Text) + , _odPointOfContact :: !(Maybe Text) + , _odTerms :: !(Maybe (Maybe TermsDto)) + , _odKind :: !Text + , _odBilledBuyer :: !(Maybe (Maybe DealPartyDto)) + , _odOpenToDealParties :: !(Maybe [Maybe DealPartyDto]) + , _odEmailContacts :: !(Maybe [Text]) + , _odLabelNames :: !(Maybe [Text]) + , _odOfferId :: !(Maybe Int64) + , _odClosedToDealParties :: !(Maybe [Maybe DealPartyDto]) + , _odAnonymous :: !(Maybe Bool) + , _odIsOpen :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OfferDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odCreator' +-- +-- * 'odStatus' +-- +-- * 'odOfferState' +-- +-- * 'odPointOfContact' +-- +-- * 'odTerms' +-- +-- * 'odKind' +-- +-- * 'odBilledBuyer' +-- +-- * 'odOpenToDealParties' +-- +-- * 'odEmailContacts' +-- +-- * 'odLabelNames' +-- +-- * 'odOfferId' +-- +-- * 'odClosedToDealParties' +-- +-- * 'odAnonymous' +-- +-- * 'odIsOpen' +offerDto + :: OfferDto +offerDto = + OfferDto + { _odCreator = Nothing + , _odStatus = Nothing + , _odOfferState = Nothing + , _odPointOfContact = Nothing + , _odTerms = Nothing + , _odKind = "adexchangebuyer#offer" + , _odBilledBuyer = Nothing + , _odOpenToDealParties = Nothing + , _odEmailContacts = Nothing + , _odLabelNames = Nothing + , _odOfferId = Nothing + , _odClosedToDealParties = Nothing + , _odAnonymous = Nothing + , _odIsOpen = Nothing + } + +-- | The creator of this offer. +odCreator :: Lens' OfferDto (Maybe (Maybe DealPartyDto)) +odCreator + = lens _odCreator (\ s a -> s{_odCreator = a}) + +-- | The status of this offer. +odStatus :: Lens' OfferDto (Maybe Text) +odStatus = lens _odStatus (\ s a -> s{_odStatus = a}) + +-- | The state of this offer. +odOfferState :: Lens' OfferDto (Maybe Text) +odOfferState + = lens _odOfferState (\ s a -> s{_odOfferState = a}) + +-- | The point of contact for this offer. +odPointOfContact :: Lens' OfferDto (Maybe Text) +odPointOfContact + = lens _odPointOfContact + (\ s a -> s{_odPointOfContact = a}) + +-- | The terms of this offer. +odTerms :: Lens' OfferDto (Maybe (Maybe TermsDto)) +odTerms = lens _odTerms (\ s a -> s{_odTerms = a}) + +odKind :: Lens' OfferDto Text +odKind = lens _odKind (\ s a -> s{_odKind = a}) + +-- | The billed buyer; For buyer initiated offers, buying through an +-- intermediary. +odBilledBuyer :: Lens' OfferDto (Maybe (Maybe DealPartyDto)) +odBilledBuyer + = lens _odBilledBuyer + (\ s a -> s{_odBilledBuyer = a}) + +-- | The list of buyer or seller parties this offer is open to. +odOpenToDealParties :: Lens' OfferDto [Maybe DealPartyDto] +odOpenToDealParties + = lens _odOpenToDealParties + (\ s a -> s{_odOpenToDealParties = a}) + . _Default + . _Coerce + +-- | The list of email contacts for this offer. +odEmailContacts :: Lens' OfferDto [Text] +odEmailContacts + = lens _odEmailContacts + (\ s a -> s{_odEmailContacts = a}) + . _Default + . _Coerce + +-- | The list of label names applicable to this offer. +odLabelNames :: Lens' OfferDto [Text] +odLabelNames + = lens _odLabelNames (\ s a -> s{_odLabelNames = a}) + . _Default + . _Coerce + +-- | The unique ID of this offer. +odOfferId :: Lens' OfferDto (Maybe Int64) +odOfferId + = lens _odOfferId (\ s a -> s{_odOfferId = a}) + +-- | The list of buyer or seller parties this offer is closed to. +odClosedToDealParties :: Lens' OfferDto [Maybe DealPartyDto] +odClosedToDealParties + = lens _odClosedToDealParties + (\ s a -> s{_odClosedToDealParties = a}) + . _Default + . _Coerce + +-- | Whether this offer is anonymous. +odAnonymous :: Lens' OfferDto (Maybe Bool) +odAnonymous + = lens _odAnonymous (\ s a -> s{_odAnonymous = a}) + +-- | Whether this offer is open. +odIsOpen :: Lens' OfferDto (Maybe Bool) +odIsOpen = lens _odIsOpen (\ s a -> s{_odIsOpen = a}) + +instance FromJSON OfferDto where + parseJSON + = withObject "OfferDto" + (\ o -> + OfferDto <$> + (o .:? "creator") <*> (o .:? "status") <*> + (o .:? "offerState") + <*> (o .:? "pointOfContact") + <*> (o .:? "terms") + <*> (o .:? "kind" .!= "adexchangebuyer#offer") + <*> (o .:? "billedBuyer") + <*> (o .:? "openToDealParties" .!= mempty) + <*> (o .:? "emailContacts" .!= mempty) + <*> (o .:? "labelNames" .!= mempty) + <*> (o .:? "offerId") + <*> (o .:? "closedToDealParties" .!= mempty) + <*> (o .:? "anonymous") + <*> (o .:? "isOpen")) + +instance ToJSON OfferDto where + toJSON OfferDto{..} + = object + (catMaybes + [("creator" .=) <$> _odCreator, + ("status" .=) <$> _odStatus, + ("offerState" .=) <$> _odOfferState, + ("pointOfContact" .=) <$> _odPointOfContact, + ("terms" .=) <$> _odTerms, Just ("kind" .= _odKind), + ("billedBuyer" .=) <$> _odBilledBuyer, + ("openToDealParties" .=) <$> _odOpenToDealParties, + ("emailContacts" .=) <$> _odEmailContacts, + ("labelNames" .=) <$> _odLabelNames, + ("offerId" .=) <$> _odOfferId, + ("closedToDealParties" .=) <$> + _odClosedToDealParties, + ("anonymous" .=) <$> _odAnonymous, + ("isOpen" .=) <$> _odIsOpen]) + +-- +-- /See:/ 'targetingValueSize' smart constructor. +data TargetingValueSize = TargetingValueSize + { _tvsHeight :: !(Maybe Int32) + , _tvsWidth :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetingValueSize' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvsHeight' +-- +-- * 'tvsWidth' +targetingValueSize + :: TargetingValueSize +targetingValueSize = + TargetingValueSize + { _tvsHeight = Nothing + , _tvsWidth = Nothing + } + +-- | The height of the creative. +tvsHeight :: Lens' TargetingValueSize (Maybe Int32) +tvsHeight + = lens _tvsHeight (\ s a -> s{_tvsHeight = a}) + +-- | The width of the creative. +tvsWidth :: Lens' TargetingValueSize (Maybe Int32) +tvsWidth = lens _tvsWidth (\ s a -> s{_tvsWidth = a}) + +instance FromJSON TargetingValueSize where + parseJSON + = withObject "TargetingValueSize" + (\ o -> + TargetingValueSize <$> + (o .:? "height") <*> (o .:? "width")) + +instance ToJSON TargetingValueSize where + toJSON TargetingValueSize{..} + = object + (catMaybes + [("height" .=) <$> _tvsHeight, + ("width" .=) <$> _tvsWidth]) + +-- | An offer is segment of inventory that a seller wishes to sell. It is +-- associated with certain terms and targeting information which helps +-- buyer know more about the inventory. Each field in an order can have one +-- of the following setting: (readonly) - It is an error to try and set +-- this field. (buyer-readonly) - Only the seller can set this field. +-- (seller-readonly) - Only the buyer can set this field. (updatable) - The +-- field is updatable at all times by either buyer or the seller. +-- +-- /See:/ 'marketplaceOffer' smart constructor. +data MarketplaceOffer = MarketplaceOffer + { _moState :: !(Maybe Text) + , _moWebPropertyCode :: !(Maybe Text) + , _moCreationTimeMs :: !(Maybe Int64) + , _moTerms :: !(Maybe (Maybe DealTerms)) + , _moLastUpdateTimeMs :: !(Maybe Int64) + , _moKind :: !Text + , _moRevisionNumber :: !(Maybe Int64) + , _moHasCreatorSignedOff :: !(Maybe Bool) + , _moFlightStartTimeMs :: !(Maybe Int64) + , _moSharedTargetings :: !(Maybe [Maybe SharedTargeting]) + , _moSeller :: !(Maybe (Maybe Seller)) + , _moSyndicationProduct :: !(Maybe Text) + , _moFlightEndTimeMs :: !(Maybe Int64) + , _moName :: !(Maybe Text) + , _moCreatorContacts :: !(Maybe [Maybe ContactInformation]) + , _moOfferId :: !(Maybe Text) + , _moLabels :: !(Maybe [Maybe MarketplaceLabel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceOffer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'moState' +-- +-- * 'moWebPropertyCode' +-- +-- * 'moCreationTimeMs' +-- +-- * 'moTerms' +-- +-- * 'moLastUpdateTimeMs' +-- +-- * 'moKind' +-- +-- * 'moRevisionNumber' +-- +-- * 'moHasCreatorSignedOff' +-- +-- * 'moFlightStartTimeMs' +-- +-- * 'moSharedTargetings' +-- +-- * 'moSeller' +-- +-- * 'moSyndicationProduct' +-- +-- * 'moFlightEndTimeMs' +-- +-- * 'moName' +-- +-- * 'moCreatorContacts' +-- +-- * 'moOfferId' +-- +-- * 'moLabels' +marketplaceOffer + :: MarketplaceOffer +marketplaceOffer = + MarketplaceOffer + { _moState = Nothing + , _moWebPropertyCode = Nothing + , _moCreationTimeMs = Nothing + , _moTerms = Nothing + , _moLastUpdateTimeMs = Nothing + , _moKind = "adexchangebuyer#marketplaceOffer" + , _moRevisionNumber = Nothing + , _moHasCreatorSignedOff = Nothing + , _moFlightStartTimeMs = Nothing + , _moSharedTargetings = Nothing + , _moSeller = Nothing + , _moSyndicationProduct = Nothing + , _moFlightEndTimeMs = Nothing + , _moName = Nothing + , _moCreatorContacts = Nothing + , _moOfferId = Nothing + , _moLabels = Nothing + } + +-- | The state of the offer. (buyer-readonly) +moState :: Lens' MarketplaceOffer (Maybe Text) +moState = lens _moState (\ s a -> s{_moState = a}) + +moWebPropertyCode :: Lens' MarketplaceOffer (Maybe Text) +moWebPropertyCode + = lens _moWebPropertyCode + (\ s a -> s{_moWebPropertyCode = a}) + +-- | Creation time in ms. since epoch (readonly) +moCreationTimeMs :: Lens' MarketplaceOffer (Maybe Int64) +moCreationTimeMs + = lens _moCreationTimeMs + (\ s a -> s{_moCreationTimeMs = a}) + +-- | The negotiable terms of the deal (buyer-readonly) +moTerms :: Lens' MarketplaceOffer (Maybe (Maybe DealTerms)) +moTerms = lens _moTerms (\ s a -> s{_moTerms = a}) + +-- | Time of last update in ms. since epoch (readonly) +moLastUpdateTimeMs :: Lens' MarketplaceOffer (Maybe Int64) +moLastUpdateTimeMs + = lens _moLastUpdateTimeMs + (\ s a -> s{_moLastUpdateTimeMs = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"adexchangebuyer#marketplaceOffer\". +moKind :: Lens' MarketplaceOffer Text +moKind = lens _moKind (\ s a -> s{_moKind = a}) + +-- | The revision number of the offer. (readonly) +moRevisionNumber :: Lens' MarketplaceOffer (Maybe Int64) +moRevisionNumber + = lens _moRevisionNumber + (\ s a -> s{_moRevisionNumber = a}) + +-- | If the creator has already signed off on the offer, then the buyer can +-- finalize the deal by accepting the offer as is. When copying to an +-- order, if any of the terms are changed, then auto_finalize is +-- automatically set to false. +moHasCreatorSignedOff :: Lens' MarketplaceOffer (Maybe Bool) +moHasCreatorSignedOff + = lens _moHasCreatorSignedOff + (\ s a -> s{_moHasCreatorSignedOff = a}) + +-- | Inventory availability dates. (times are in ms since epoch) The +-- granularity is generally in the order of seconds. (buyer-readonly) +moFlightStartTimeMs :: Lens' MarketplaceOffer (Maybe Int64) +moFlightStartTimeMs + = lens _moFlightStartTimeMs + (\ s a -> s{_moFlightStartTimeMs = a}) + +-- | Targeting that is shared between the buyer and the seller. Each +-- targeting criteria has a specified key and for each key there is a list +-- of inclusion value or exclusion values. (buyer-readonly) +moSharedTargetings :: Lens' MarketplaceOffer [Maybe SharedTargeting] +moSharedTargetings + = lens _moSharedTargetings + (\ s a -> s{_moSharedTargetings = a}) + . _Default + . _Coerce + +-- | Information about the seller that created this offer (readonly, except +-- on create) +moSeller :: Lens' MarketplaceOffer (Maybe (Maybe Seller)) +moSeller = lens _moSeller (\ s a -> s{_moSeller = a}) + +-- | The syndication product associated with the deal. (readonly, except on +-- create) +moSyndicationProduct :: Lens' MarketplaceOffer (Maybe Text) +moSyndicationProduct + = lens _moSyndicationProduct + (\ s a -> s{_moSyndicationProduct = a}) + +-- | The proposed end time for the deal (ms since epoch) (buyer-readonly) +moFlightEndTimeMs :: Lens' MarketplaceOffer (Maybe Int64) +moFlightEndTimeMs + = lens _moFlightEndTimeMs + (\ s a -> s{_moFlightEndTimeMs = a}) + +-- | The name for this offer as set by the seller. (buyer-readonly) +moName :: Lens' MarketplaceOffer (Maybe Text) +moName = lens _moName (\ s a -> s{_moName = a}) + +-- | Optional contact information for the creator of this offer. +-- (buyer-readonly) +moCreatorContacts :: Lens' MarketplaceOffer [Maybe ContactInformation] +moCreatorContacts + = lens _moCreatorContacts + (\ s a -> s{_moCreatorContacts = a}) + . _Default + . _Coerce + +-- | The unique id for the offer (readonly) +moOfferId :: Lens' MarketplaceOffer (Maybe Text) +moOfferId + = lens _moOfferId (\ s a -> s{_moOfferId = a}) + +-- | Optional List of labels for the offer (optional, buyer-readonly). +moLabels :: Lens' MarketplaceOffer [Maybe MarketplaceLabel] +moLabels + = lens _moLabels (\ s a -> s{_moLabels = a}) . + _Default + . _Coerce + +instance FromJSON MarketplaceOffer where + parseJSON + = withObject "MarketplaceOffer" + (\ o -> + MarketplaceOffer <$> + (o .:? "state") <*> (o .:? "webPropertyCode") <*> + (o .:? "creationTimeMs") + <*> (o .:? "terms") + <*> (o .:? "lastUpdateTimeMs") + <*> + (o .:? "kind" .!= "adexchangebuyer#marketplaceOffer") + <*> (o .:? "revisionNumber") + <*> (o .:? "hasCreatorSignedOff") + <*> (o .:? "flightStartTimeMs") + <*> (o .:? "sharedTargetings" .!= mempty) + <*> (o .:? "seller") + <*> (o .:? "syndicationProduct") + <*> (o .:? "flightEndTimeMs") + <*> (o .:? "name") + <*> (o .:? "creatorContacts" .!= mempty) + <*> (o .:? "offerId") + <*> (o .:? "labels" .!= mempty)) + +instance ToJSON MarketplaceOffer where + toJSON MarketplaceOffer{..} + = object + (catMaybes + [("state" .=) <$> _moState, + ("webPropertyCode" .=) <$> _moWebPropertyCode, + ("creationTimeMs" .=) <$> _moCreationTimeMs, + ("terms" .=) <$> _moTerms, + ("lastUpdateTimeMs" .=) <$> _moLastUpdateTimeMs, + Just ("kind" .= _moKind), + ("revisionNumber" .=) <$> _moRevisionNumber, + ("hasCreatorSignedOff" .=) <$> + _moHasCreatorSignedOff, + ("flightStartTimeMs" .=) <$> _moFlightStartTimeMs, + ("sharedTargetings" .=) <$> _moSharedTargetings, + ("seller" .=) <$> _moSeller, + ("syndicationProduct" .=) <$> _moSyndicationProduct, + ("flightEndTimeMs" .=) <$> _moFlightEndTimeMs, + ("name" .=) <$> _moName, + ("creatorContacts" .=) <$> _moCreatorContacts, + ("offerId" .=) <$> _moOfferId, + ("labels" .=) <$> _moLabels]) + +-- +-- /See:/ 'getNegotiationsRequest' smart constructor. +data GetNegotiationsRequest = GetNegotiationsRequest + { _gnrSinceTimestampMillis :: !(Maybe Int64) + , _gnrFinalized :: !(Maybe Bool) + , _gnrIncludePrivateAuctions :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetNegotiationsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gnrSinceTimestampMillis' +-- +-- * 'gnrFinalized' +-- +-- * 'gnrIncludePrivateAuctions' +getNegotiationsRequest + :: GetNegotiationsRequest +getNegotiationsRequest = + GetNegotiationsRequest + { _gnrSinceTimestampMillis = Nothing + , _gnrFinalized = Nothing + , _gnrIncludePrivateAuctions = Nothing + } + +gnrSinceTimestampMillis :: Lens' GetNegotiationsRequest (Maybe Int64) +gnrSinceTimestampMillis + = lens _gnrSinceTimestampMillis + (\ s a -> s{_gnrSinceTimestampMillis = a}) + +gnrFinalized :: Lens' GetNegotiationsRequest (Maybe Bool) +gnrFinalized + = lens _gnrFinalized (\ s a -> s{_gnrFinalized = a}) + +gnrIncludePrivateAuctions :: Lens' GetNegotiationsRequest (Maybe Bool) +gnrIncludePrivateAuctions + = lens _gnrIncludePrivateAuctions + (\ s a -> s{_gnrIncludePrivateAuctions = a}) + +instance FromJSON GetNegotiationsRequest where + parseJSON + = withObject "GetNegotiationsRequest" + (\ o -> + GetNegotiationsRequest <$> + (o .:? "sinceTimestampMillis") <*> + (o .:? "finalized") + <*> (o .:? "includePrivateAuctions")) + +instance ToJSON GetNegotiationsRequest where + toJSON GetNegotiationsRequest{..} + = object + (catMaybes + [("sinceTimestampMillis" .=) <$> + _gnrSinceTimestampMillis, + ("finalized" .=) <$> _gnrFinalized, + ("includePrivateAuctions" .=) <$> + _gnrIncludePrivateAuctions]) + +-- | A billing info feed lists Billing Info the Ad Exchange buyer account has +-- access to. Each entry in the feed corresponds to a single billing info. +-- +-- /See:/ 'billingInfoList' smart constructor. +data BillingInfoList = BillingInfoList + { _bilKind :: !Text + , _bilItems :: !(Maybe [Maybe BillingInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingInfoList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bilKind' +-- +-- * 'bilItems' +billingInfoList + :: BillingInfoList +billingInfoList = + BillingInfoList + { _bilKind = "adexchangebuyer#billingInfoList" + , _bilItems = Nothing + } + +-- | Resource type. +bilKind :: Lens' BillingInfoList Text +bilKind = lens _bilKind (\ s a -> s{_bilKind = a}) + +-- | A list of billing info relevant for your account. +bilItems :: Lens' BillingInfoList [Maybe BillingInfo] +bilItems + = lens _bilItems (\ s a -> s{_bilItems = a}) . + _Default + . _Coerce + +instance FromJSON BillingInfoList where + parseJSON + = withObject "BillingInfoList" + (\ o -> + BillingInfoList <$> + (o .:? "kind" .!= "adexchangebuyer#billingInfoList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON BillingInfoList where + toJSON BillingInfoList{..} + = object + (catMaybes + [Just ("kind" .= _bilKind), + ("items" .=) <$> _bilItems]) + +-- +-- /See:/ 'addOrderNotesResponse' smart constructor. +newtype AddOrderNotesResponse = AddOrderNotesResponse + { _aNotes :: Maybe [Maybe MarketplaceNote] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddOrderNotesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aNotes' +addOrderNotesResponse + :: AddOrderNotesResponse +addOrderNotesResponse = + AddOrderNotesResponse + { _aNotes = Nothing + } + +aNotes :: Lens' AddOrderNotesResponse [Maybe MarketplaceNote] +aNotes + = lens _aNotes (\ s a -> s{_aNotes = a}) . _Default . + _Coerce + +instance FromJSON AddOrderNotesResponse where + parseJSON + = withObject "AddOrderNotesResponse" + (\ o -> + AddOrderNotesResponse <$> (o .:? "notes" .!= mempty)) + +instance ToJSON AddOrderNotesResponse where + toJSON AddOrderNotesResponse{..} + = object (catMaybes [("notes" .=) <$> _aNotes]) + +-- +-- /See:/ 'moneyDto' smart constructor. +data MoneyDto = MoneyDto + { _mdCurrencyCode :: !(Maybe Text) + , _mdMicros :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MoneyDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdCurrencyCode' +-- +-- * 'mdMicros' +moneyDto + :: MoneyDto +moneyDto = + MoneyDto + { _mdCurrencyCode = Nothing + , _mdMicros = Nothing + } + +mdCurrencyCode :: Lens' MoneyDto (Maybe Text) +mdCurrencyCode + = lens _mdCurrencyCode + (\ s a -> s{_mdCurrencyCode = a}) + +mdMicros :: Lens' MoneyDto (Maybe Int64) +mdMicros = lens _mdMicros (\ s a -> s{_mdMicros = a}) + +instance FromJSON MoneyDto where + parseJSON + = withObject "MoneyDto" + (\ o -> + MoneyDto <$> + (o .:? "currencyCode") <*> (o .:? "micros")) + +instance ToJSON MoneyDto where + toJSON MoneyDto{..} + = object + (catMaybes + [("currencyCode" .=) <$> _mdCurrencyCode, + ("micros" .=) <$> _mdMicros]) + +-- +-- /See:/ 'listClientAccessCapabilitiesResponse' smart constructor. +newtype ListClientAccessCapabilitiesResponse = ListClientAccessCapabilitiesResponse + { _lcacrClientAccessPermissions :: Maybe [Maybe ClientAccessCapabilities] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListClientAccessCapabilitiesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcacrClientAccessPermissions' +listClientAccessCapabilitiesResponse + :: ListClientAccessCapabilitiesResponse +listClientAccessCapabilitiesResponse = + ListClientAccessCapabilitiesResponse + { _lcacrClientAccessPermissions = Nothing + } + +lcacrClientAccessPermissions :: Lens' ListClientAccessCapabilitiesResponse [Maybe ClientAccessCapabilities] +lcacrClientAccessPermissions + = lens _lcacrClientAccessPermissions + (\ s a -> s{_lcacrClientAccessPermissions = a}) + . _Default + . _Coerce + +instance FromJSON + ListClientAccessCapabilitiesResponse where + parseJSON + = withObject "ListClientAccessCapabilitiesResponse" + (\ o -> + ListClientAccessCapabilitiesResponse <$> + (o .:? "clientAccessPermissions" .!= mempty)) + +instance ToJSON ListClientAccessCapabilitiesResponse + where + toJSON ListClientAccessCapabilitiesResponse{..} + = object + (catMaybes + [("clientAccessPermissions" .=) <$> + _lcacrClientAccessPermissions]) + +-- +-- /See:/ 'getNegotiationByIdRequest' smart constructor. +newtype GetNegotiationByIdRequest = GetNegotiationByIdRequest + { _gnbirIncludePrivateAuctions :: Maybe Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetNegotiationByIdRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gnbirIncludePrivateAuctions' +getNegotiationByIdRequest + :: GetNegotiationByIdRequest +getNegotiationByIdRequest = + GetNegotiationByIdRequest + { _gnbirIncludePrivateAuctions = Nothing + } + +gnbirIncludePrivateAuctions :: Lens' GetNegotiationByIdRequest (Maybe Bool) +gnbirIncludePrivateAuctions + = lens _gnbirIncludePrivateAuctions + (\ s a -> s{_gnbirIncludePrivateAuctions = a}) + +instance FromJSON GetNegotiationByIdRequest where + parseJSON + = withObject "GetNegotiationByIdRequest" + (\ o -> + GetNegotiationByIdRequest <$> + (o .:? "includePrivateAuctions")) + +instance ToJSON GetNegotiationByIdRequest where + toJSON GetNegotiationByIdRequest{..} + = object + (catMaybes + [("includePrivateAuctions" .=) <$> + _gnbirIncludePrivateAuctions]) + +-- +-- /See:/ 'listOffersResponse' smart constructor. +data ListOffersResponse = ListOffersResponse + { _lorKind :: !Text + , _lorOffers :: !(Maybe [Maybe OfferDto]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOffersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorKind' +-- +-- * 'lorOffers' +listOffersResponse + :: ListOffersResponse +listOffersResponse = + ListOffersResponse + { _lorKind = "adexchangebuyer#offersList" + , _lorOffers = Nothing + } + +lorKind :: Lens' ListOffersResponse Text +lorKind = lens _lorKind (\ s a -> s{_lorKind = a}) + +lorOffers :: Lens' ListOffersResponse [Maybe OfferDto] +lorOffers + = lens _lorOffers (\ s a -> s{_lorOffers = a}) . + _Default + . _Coerce + +instance FromJSON ListOffersResponse where + parseJSON + = withObject "ListOffersResponse" + (\ o -> + ListOffersResponse <$> + (o .:? "kind" .!= "adexchangebuyer#offersList") <*> + (o .:? "offers" .!= mempty)) + +instance ToJSON ListOffersResponse where + toJSON ListOffersResponse{..} + = object + (catMaybes + [Just ("kind" .= _lorKind), + ("offers" .=) <$> _lorOffers]) + +-- +-- /See:/ 'advertiserDto' smart constructor. +data AdvertiserDto = AdvertiserDto + { _adStatus :: !(Maybe Text) + , _adBrands :: !(Maybe [Maybe BrandDto]) + , _adName :: !(Maybe Text) + , _adId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adStatus' +-- +-- * 'adBrands' +-- +-- * 'adName' +-- +-- * 'adId' +advertiserDto + :: AdvertiserDto +advertiserDto = + AdvertiserDto + { _adStatus = Nothing + , _adBrands = Nothing + , _adName = Nothing + , _adId = Nothing + } + +adStatus :: Lens' AdvertiserDto (Maybe Text) +adStatus = lens _adStatus (\ s a -> s{_adStatus = a}) + +adBrands :: Lens' AdvertiserDto [Maybe BrandDto] +adBrands + = lens _adBrands (\ s a -> s{_adBrands = a}) . + _Default + . _Coerce + +adName :: Lens' AdvertiserDto (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +adId :: Lens' AdvertiserDto (Maybe Int64) +adId = lens _adId (\ s a -> s{_adId = a}) + +instance FromJSON AdvertiserDto where + parseJSON + = withObject "AdvertiserDto" + (\ o -> + AdvertiserDto <$> + (o .:? "status") <*> (o .:? "brands" .!= mempty) <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AdvertiserDto where + toJSON AdvertiserDto{..} + = object + (catMaybes + [("status" .=) <$> _adStatus, + ("brands" .=) <$> _adBrands, ("name" .=) <$> _adName, + ("id" .=) <$> _adId]) + +-- +-- /See:/ 'targetingValue' smart constructor. +data TargetingValue = TargetingValue + { _tvCreativeSizeValue :: !(Maybe (Maybe TargetingValueCreativeSize)) + , _tvStringValue :: !(Maybe Text) + , _tvLongValue :: !(Maybe Int64) + , _tvDayPartTargetingValue :: !(Maybe (Maybe TargetingValueDayPartTargeting)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetingValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvCreativeSizeValue' +-- +-- * 'tvStringValue' +-- +-- * 'tvLongValue' +-- +-- * 'tvDayPartTargetingValue' +targetingValue + :: TargetingValue +targetingValue = + TargetingValue + { _tvCreativeSizeValue = Nothing + , _tvStringValue = Nothing + , _tvLongValue = Nothing + , _tvDayPartTargetingValue = Nothing + } + +-- | The creative size value to exclude\/include. +tvCreativeSizeValue :: Lens' TargetingValue (Maybe (Maybe TargetingValueCreativeSize)) +tvCreativeSizeValue + = lens _tvCreativeSizeValue + (\ s a -> s{_tvCreativeSizeValue = a}) + +-- | The string value to exclude\/include. +tvStringValue :: Lens' TargetingValue (Maybe Text) +tvStringValue + = lens _tvStringValue + (\ s a -> s{_tvStringValue = a}) + +-- | The long value to exclude\/include. +tvLongValue :: Lens' TargetingValue (Maybe Int64) +tvLongValue + = lens _tvLongValue (\ s a -> s{_tvLongValue = a}) + +-- | The daypart targeting to include \/ exclude. Filled in when the key is +-- GOOG_DAYPART_TARGETING. +tvDayPartTargetingValue :: Lens' TargetingValue (Maybe (Maybe TargetingValueDayPartTargeting)) +tvDayPartTargetingValue + = lens _tvDayPartTargetingValue + (\ s a -> s{_tvDayPartTargetingValue = a}) + +instance FromJSON TargetingValue where + parseJSON + = withObject "TargetingValue" + (\ o -> + TargetingValue <$> + (o .:? "creativeSizeValue") <*> (o .:? "stringValue") + <*> (o .:? "longValue") + <*> (o .:? "dayPartTargetingValue")) + +instance ToJSON TargetingValue where + toJSON TargetingValue{..} + = object + (catMaybes + [("creativeSizeValue" .=) <$> _tvCreativeSizeValue, + ("stringValue" .=) <$> _tvStringValue, + ("longValue" .=) <$> _tvLongValue, + ("dayPartTargetingValue" .=) <$> + _tvDayPartTargetingValue]) + +-- +-- /See:/ 'price' smart constructor. +data Price = Price + { _pCurrencyCode :: !(Maybe Text) + , _pAmountMicros :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Price' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pCurrencyCode' +-- +-- * 'pAmountMicros' +price + :: Price +price = + Price + { _pCurrencyCode = Nothing + , _pAmountMicros = Nothing + } + +-- | The currency code for the price. +pCurrencyCode :: Lens' Price (Maybe Text) +pCurrencyCode + = lens _pCurrencyCode + (\ s a -> s{_pCurrencyCode = a}) + +-- | The CPM value in micros. +pAmountMicros :: Lens' Price (Maybe Double) +pAmountMicros + = lens _pAmountMicros + (\ s a -> s{_pAmountMicros = a}) + +instance FromJSON Price where + parseJSON + = withObject "Price" + (\ o -> + Price <$> + (o .:? "currencyCode") <*> (o .:? "amountMicros")) + +instance ToJSON Price where + toJSON Price{..} + = object + (catMaybes + [("currencyCode" .=) <$> _pCurrencyCode, + ("amountMicros" .=) <$> _pAmountMicros]) + +-- +-- /See:/ 'editAllOrderDealsRequest' smart constructor. +data EditAllOrderDealsRequest = EditAllOrderDealsRequest + { _eUpdateAction :: !(Maybe Text) + , _eDeals :: !(Maybe [Maybe MarketplaceDeal]) + , _eOrder :: !(Maybe (Maybe MarketplaceOrder)) + , _eOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditAllOrderDealsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eUpdateAction' +-- +-- * 'eDeals' +-- +-- * 'eOrder' +-- +-- * 'eOrderRevisionNumber' +editAllOrderDealsRequest + :: EditAllOrderDealsRequest +editAllOrderDealsRequest = + EditAllOrderDealsRequest + { _eUpdateAction = Nothing + , _eDeals = Nothing + , _eOrder = Nothing + , _eOrderRevisionNumber = Nothing + } + +-- | Indicates an optional action to take on the order +eUpdateAction :: Lens' EditAllOrderDealsRequest (Maybe Text) +eUpdateAction + = lens _eUpdateAction + (\ s a -> s{_eUpdateAction = a}) + +-- | List of deals to edit. Service may perform 3 different operations based +-- on comparison of deals in this list vs deals already persisted in +-- database: 1. Add new deal to order If a deal in this list does not exist +-- in the order, the service will create a new deal and add it to the +-- order. Validation will follow AddOrderDealsRequest. 2. Update existing +-- deal in the order If a deal in this list already exist in the order, the +-- service will update that existing deal to this new deal in the request. +-- Validation will follow UpdateOrderDealsRequest. 3. Delete deals from the +-- order (just need the id) If a existing deal in the order is not present +-- in this list, the service will delete that deal from the order. +-- Validation will follow DeleteOrderDealsRequest. +eDeals :: Lens' EditAllOrderDealsRequest [Maybe MarketplaceDeal] +eDeals + = lens _eDeals (\ s a -> s{_eDeals = a}) . _Default . + _Coerce + +-- | If specified, also updates the order in the batch transaction. This is +-- useful when the order and the deals need to be updated in one +-- transaction. +eOrder :: Lens' EditAllOrderDealsRequest (Maybe (Maybe MarketplaceOrder)) +eOrder = lens _eOrder (\ s a -> s{_eOrder = a}) + +-- | The last known revision number for the order. +eOrderRevisionNumber :: Lens' EditAllOrderDealsRequest (Maybe Int64) +eOrderRevisionNumber + = lens _eOrderRevisionNumber + (\ s a -> s{_eOrderRevisionNumber = a}) + +instance FromJSON EditAllOrderDealsRequest where + parseJSON + = withObject "EditAllOrderDealsRequest" + (\ o -> + EditAllOrderDealsRequest <$> + (o .:? "updateAction") <*> (o .:? "deals" .!= mempty) + <*> (o .:? "order") + <*> (o .:? "orderRevisionNumber")) + +instance ToJSON EditAllOrderDealsRequest where + toJSON EditAllOrderDealsRequest{..} + = object + (catMaybes + [("updateAction" .=) <$> _eUpdateAction, + ("deals" .=) <$> _eDeals, ("order" .=) <$> _eOrder, + ("orderRevisionNumber" .=) <$> + _eOrderRevisionNumber]) + +-- | The configuration data for an Ad Exchange billing info. +-- +-- /See:/ 'billingInfo' smart constructor. +data BillingInfo = BillingInfo + { _biKind :: !Text + , _biAccountName :: !(Maybe Text) + , _biAccountId :: !(Maybe Int32) + , _biBillingId :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'biKind' +-- +-- * 'biAccountName' +-- +-- * 'biAccountId' +-- +-- * 'biBillingId' +billingInfo + :: BillingInfo +billingInfo = + BillingInfo + { _biKind = "adexchangebuyer#billingInfo" + , _biAccountName = Nothing + , _biAccountId = Nothing + , _biBillingId = Nothing + } + +-- | Resource type. +biKind :: Lens' BillingInfo Text +biKind = lens _biKind (\ s a -> s{_biKind = a}) + +-- | Account name. +biAccountName :: Lens' BillingInfo (Maybe Text) +biAccountName + = lens _biAccountName + (\ s a -> s{_biAccountName = a}) + +-- | Account id. +biAccountId :: Lens' BillingInfo (Maybe Int32) +biAccountId + = lens _biAccountId (\ s a -> s{_biAccountId = a}) + +-- | A list of adgroup IDs associated with this particular account. These IDs +-- may show up as part of a realtime bidding BidRequest, which indicates a +-- bid request for this account. +biBillingId :: Lens' BillingInfo [Text] +biBillingId + = lens _biBillingId (\ s a -> s{_biBillingId = a}) . + _Default + . _Coerce + +instance FromJSON BillingInfo where + parseJSON + = withObject "BillingInfo" + (\ o -> + BillingInfo <$> + (o .:? "kind" .!= "adexchangebuyer#billingInfo") <*> + (o .:? "accountName") + <*> (o .:? "accountId") + <*> (o .:? "billingId" .!= mempty)) + +instance ToJSON BillingInfo where + toJSON BillingInfo{..} + = object + (catMaybes + [Just ("kind" .= _biKind), + ("accountName" .=) <$> _biAccountName, + ("accountId" .=) <$> _biAccountId, + ("billingId" .=) <$> _biBillingId]) + +-- +-- /See:/ 'webPropertyDto' smart constructor. +data WebPropertyDto = WebPropertyDto + { _wpdEnabledForPreferredDeals :: !(Maybe Bool) + , _wpdSyndicationProduct :: !(Maybe Text) + , _wpdName :: !(Maybe Text) + , _wpdPropertyCode :: !(Maybe Text) + , _wpdId :: !(Maybe Int32) + , _wpdSiteUrls :: !(Maybe [Text]) + , _wpdAllowInterestTargetedAds :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebPropertyDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wpdEnabledForPreferredDeals' +-- +-- * 'wpdSyndicationProduct' +-- +-- * 'wpdName' +-- +-- * 'wpdPropertyCode' +-- +-- * 'wpdId' +-- +-- * 'wpdSiteUrls' +-- +-- * 'wpdAllowInterestTargetedAds' +webPropertyDto + :: WebPropertyDto +webPropertyDto = + WebPropertyDto + { _wpdEnabledForPreferredDeals = Nothing + , _wpdSyndicationProduct = Nothing + , _wpdName = Nothing + , _wpdPropertyCode = Nothing + , _wpdId = Nothing + , _wpdSiteUrls = Nothing + , _wpdAllowInterestTargetedAds = Nothing + } + +wpdEnabledForPreferredDeals :: Lens' WebPropertyDto (Maybe Bool) +wpdEnabledForPreferredDeals + = lens _wpdEnabledForPreferredDeals + (\ s a -> s{_wpdEnabledForPreferredDeals = a}) + +wpdSyndicationProduct :: Lens' WebPropertyDto (Maybe Text) +wpdSyndicationProduct + = lens _wpdSyndicationProduct + (\ s a -> s{_wpdSyndicationProduct = a}) + +wpdName :: Lens' WebPropertyDto (Maybe Text) +wpdName = lens _wpdName (\ s a -> s{_wpdName = a}) + +wpdPropertyCode :: Lens' WebPropertyDto (Maybe Text) +wpdPropertyCode + = lens _wpdPropertyCode + (\ s a -> s{_wpdPropertyCode = a}) + +wpdId :: Lens' WebPropertyDto (Maybe Int32) +wpdId = lens _wpdId (\ s a -> s{_wpdId = a}) + +wpdSiteUrls :: Lens' WebPropertyDto [Text] +wpdSiteUrls + = lens _wpdSiteUrls (\ s a -> s{_wpdSiteUrls = a}) . + _Default + . _Coerce + +wpdAllowInterestTargetedAds :: Lens' WebPropertyDto (Maybe Bool) +wpdAllowInterestTargetedAds + = lens _wpdAllowInterestTargetedAds + (\ s a -> s{_wpdAllowInterestTargetedAds = a}) + +instance FromJSON WebPropertyDto where + parseJSON + = withObject "WebPropertyDto" + (\ o -> + WebPropertyDto <$> + (o .:? "enabledForPreferredDeals") <*> + (o .:? "syndicationProduct") + <*> (o .:? "name") + <*> (o .:? "propertyCode") + <*> (o .:? "id") + <*> (o .:? "siteUrls" .!= mempty) + <*> (o .:? "allowInterestTargetedAds")) + +instance ToJSON WebPropertyDto where + toJSON WebPropertyDto{..} + = object + (catMaybes + [("enabledForPreferredDeals" .=) <$> + _wpdEnabledForPreferredDeals, + ("syndicationProduct" .=) <$> _wpdSyndicationProduct, + ("name" .=) <$> _wpdName, + ("propertyCode" .=) <$> _wpdPropertyCode, + ("id" .=) <$> _wpdId, + ("siteUrls" .=) <$> _wpdSiteUrls, + ("allowInterestTargetedAds" .=) <$> + _wpdAllowInterestTargetedAds]) + +-- +-- /See:/ 'targetingValueDayPartTargeting' smart constructor. +data TargetingValueDayPartTargeting = TargetingValueDayPartTargeting + { _tvdptTimeZoneType :: !(Maybe Text) + , _tvdptDayParts :: !(Maybe [Maybe TargetingValueDayPartTargetingDayPart]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetingValueDayPartTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvdptTimeZoneType' +-- +-- * 'tvdptDayParts' +targetingValueDayPartTargeting + :: TargetingValueDayPartTargeting +targetingValueDayPartTargeting = + TargetingValueDayPartTargeting + { _tvdptTimeZoneType = Nothing + , _tvdptDayParts = Nothing + } + +tvdptTimeZoneType :: Lens' TargetingValueDayPartTargeting (Maybe Text) +tvdptTimeZoneType + = lens _tvdptTimeZoneType + (\ s a -> s{_tvdptTimeZoneType = a}) + +tvdptDayParts :: Lens' TargetingValueDayPartTargeting [Maybe TargetingValueDayPartTargetingDayPart] +tvdptDayParts + = lens _tvdptDayParts + (\ s a -> s{_tvdptDayParts = a}) + . _Default + . _Coerce + +instance FromJSON TargetingValueDayPartTargeting + where + parseJSON + = withObject "TargetingValueDayPartTargeting" + (\ o -> + TargetingValueDayPartTargeting <$> + (o .:? "timeZoneType") <*> + (o .:? "dayParts" .!= mempty)) + +instance ToJSON TargetingValueDayPartTargeting where + toJSON TargetingValueDayPartTargeting{..} + = object + (catMaybes + [("timeZoneType" .=) <$> _tvdptTimeZoneType, + ("dayParts" .=) <$> _tvdptDayParts]) + +-- +-- /See:/ 'listOffersRequest' smart constructor. +newtype ListOffersRequest = ListOffersRequest + { _lorSinceTimestampMillis :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOffersRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorSinceTimestampMillis' +listOffersRequest + :: ListOffersRequest +listOffersRequest = + ListOffersRequest + { _lorSinceTimestampMillis = Nothing + } + +lorSinceTimestampMillis :: Lens' ListOffersRequest (Maybe Int64) +lorSinceTimestampMillis + = lens _lorSinceTimestampMillis + (\ s a -> s{_lorSinceTimestampMillis = a}) + +instance FromJSON ListOffersRequest where + parseJSON + = withObject "ListOffersRequest" + (\ o -> + ListOffersRequest <$> (o .:? "sinceTimestampMillis")) + +instance ToJSON ListOffersRequest where + toJSON ListOffersRequest{..} + = object + (catMaybes + [("sinceTimestampMillis" .=) <$> + _lorSinceTimestampMillis]) + +-- +-- /See:/ 'listClientAccessCapabilitiesRequest' smart constructor. +newtype ListClientAccessCapabilitiesRequest = ListClientAccessCapabilitiesRequest + { _lcacrSponsorAccountId :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListClientAccessCapabilitiesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcacrSponsorAccountId' +listClientAccessCapabilitiesRequest + :: ListClientAccessCapabilitiesRequest +listClientAccessCapabilitiesRequest = + ListClientAccessCapabilitiesRequest + { _lcacrSponsorAccountId = Nothing + } + +lcacrSponsorAccountId :: Lens' ListClientAccessCapabilitiesRequest (Maybe Int64) +lcacrSponsorAccountId + = lens _lcacrSponsorAccountId + (\ s a -> s{_lcacrSponsorAccountId = a}) + +instance FromJSON ListClientAccessCapabilitiesRequest + where + parseJSON + = withObject "ListClientAccessCapabilitiesRequest" + (\ o -> + ListClientAccessCapabilitiesRequest <$> + (o .:? "sponsorAccountId")) + +instance ToJSON ListClientAccessCapabilitiesRequest + where + toJSON ListClientAccessCapabilitiesRequest{..} + = object + (catMaybes + [("sponsorAccountId" .=) <$> _lcacrSponsorAccountId]) + +-- +-- /See:/ 'inventorySegmentTargeting' smart constructor. +data InventorySegmentTargeting = InventorySegmentTargeting + { _istNegativeVideoDurationSegments :: !(Maybe [Int64]) + , _istNegativeIcmBrands :: !(Maybe [Int64]) + , _istNegativeKeyValues :: !(Maybe [Maybe RuleKeyValuePair]) + , _istPositiveAudienceSegments :: !(Maybe [Int64]) + , _istPositiveXfpPlacements :: !(Maybe [Int64]) + , _istNegativeXfpAdSlots :: !(Maybe [Int64]) + , _istPositiveOperatingSystemVersions :: !(Maybe [Int64]) + , _istPositiveSizes :: !(Maybe [Int64]) + , _istPositiveDeviceCategories :: !(Maybe [Int64]) + , _istPositiveLocations :: !(Maybe [Int64]) + , _istNegativeAdSizes :: !(Maybe [Maybe AdSize]) + , _istPositiveOperatingSystems :: !(Maybe [Int64]) + , _istPositiveSiteUrls :: !(Maybe [Text]) + , _istNegativeInventorySlots :: !(Maybe [Text]) + , _istNegativeVideoAdPositionSegments :: !(Maybe [Text]) + , _istPositiveAdTypeSegments :: !(Maybe [Text]) + , _istPositiveIcmInterests :: !(Maybe [Int64]) + , _istPositiveMobileApps :: !(Maybe [Text]) + , _istPositiveKeyValues :: !(Maybe [Maybe RuleKeyValuePair]) + , _istPositiveIcmBrands :: !(Maybe [Int64]) + , _istPositiveVideoDurationSegments :: !(Maybe [Int64]) + , _istNegativeAudienceSegments :: !(Maybe [Int64]) + , _istNegativeXfpPlacements :: !(Maybe [Int64]) + , _istPositiveXfpAdSlots :: !(Maybe [Int64]) + , _istNegativeOperatingSystemVersions :: !(Maybe [Int64]) + , _istNegativeSizes :: !(Maybe [Int64]) + , _istNegativeLocations :: !(Maybe [Int64]) + , _istNegativeDeviceCategories :: !(Maybe [Int64]) + , _istNegativeOperatingSystems :: !(Maybe [Int64]) + , _istPositiveAdSizes :: !(Maybe [Maybe AdSize]) + , _istNegativeSiteUrls :: !(Maybe [Text]) + , _istNegativeAdTypeSegments :: !(Maybe [Text]) + , _istPositiveVideoAdPositionSegments :: !(Maybe [Text]) + , _istPositiveInventorySlots :: !(Maybe [Text]) + , _istNegativeMobileApps :: !(Maybe [Text]) + , _istNegativeIcmInterests :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InventorySegmentTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'istNegativeVideoDurationSegments' +-- +-- * 'istNegativeIcmBrands' +-- +-- * 'istNegativeKeyValues' +-- +-- * 'istPositiveAudienceSegments' +-- +-- * 'istPositiveXfpPlacements' +-- +-- * 'istNegativeXfpAdSlots' +-- +-- * 'istPositiveOperatingSystemVersions' +-- +-- * 'istPositiveSizes' +-- +-- * 'istPositiveDeviceCategories' +-- +-- * 'istPositiveLocations' +-- +-- * 'istNegativeAdSizes' +-- +-- * 'istPositiveOperatingSystems' +-- +-- * 'istPositiveSiteUrls' +-- +-- * 'istNegativeInventorySlots' +-- +-- * 'istNegativeVideoAdPositionSegments' +-- +-- * 'istPositiveAdTypeSegments' +-- +-- * 'istPositiveIcmInterests' +-- +-- * 'istPositiveMobileApps' +-- +-- * 'istPositiveKeyValues' +-- +-- * 'istPositiveIcmBrands' +-- +-- * 'istPositiveVideoDurationSegments' +-- +-- * 'istNegativeAudienceSegments' +-- +-- * 'istNegativeXfpPlacements' +-- +-- * 'istPositiveXfpAdSlots' +-- +-- * 'istNegativeOperatingSystemVersions' +-- +-- * 'istNegativeSizes' +-- +-- * 'istNegativeLocations' +-- +-- * 'istNegativeDeviceCategories' +-- +-- * 'istNegativeOperatingSystems' +-- +-- * 'istPositiveAdSizes' +-- +-- * 'istNegativeSiteUrls' +-- +-- * 'istNegativeAdTypeSegments' +-- +-- * 'istPositiveVideoAdPositionSegments' +-- +-- * 'istPositiveInventorySlots' +-- +-- * 'istNegativeMobileApps' +-- +-- * 'istNegativeIcmInterests' +inventorySegmentTargeting + :: InventorySegmentTargeting +inventorySegmentTargeting = + InventorySegmentTargeting + { _istNegativeVideoDurationSegments = Nothing + , _istNegativeIcmBrands = Nothing + , _istNegativeKeyValues = Nothing + , _istPositiveAudienceSegments = Nothing + , _istPositiveXfpPlacements = Nothing + , _istNegativeXfpAdSlots = Nothing + , _istPositiveOperatingSystemVersions = Nothing + , _istPositiveSizes = Nothing + , _istPositiveDeviceCategories = Nothing + , _istPositiveLocations = Nothing + , _istNegativeAdSizes = Nothing + , _istPositiveOperatingSystems = Nothing + , _istPositiveSiteUrls = Nothing + , _istNegativeInventorySlots = Nothing + , _istNegativeVideoAdPositionSegments = Nothing + , _istPositiveAdTypeSegments = Nothing + , _istPositiveIcmInterests = Nothing + , _istPositiveMobileApps = Nothing + , _istPositiveKeyValues = Nothing + , _istPositiveIcmBrands = Nothing + , _istPositiveVideoDurationSegments = Nothing + , _istNegativeAudienceSegments = Nothing + , _istNegativeXfpPlacements = Nothing + , _istPositiveXfpAdSlots = Nothing + , _istNegativeOperatingSystemVersions = Nothing + , _istNegativeSizes = Nothing + , _istNegativeLocations = Nothing + , _istNegativeDeviceCategories = Nothing + , _istNegativeOperatingSystems = Nothing + , _istPositiveAdSizes = Nothing + , _istNegativeSiteUrls = Nothing + , _istNegativeAdTypeSegments = Nothing + , _istPositiveVideoAdPositionSegments = Nothing + , _istPositiveInventorySlots = Nothing + , _istNegativeMobileApps = Nothing + , _istNegativeIcmInterests = Nothing + } + +istNegativeVideoDurationSegments :: Lens' InventorySegmentTargeting [Int64] +istNegativeVideoDurationSegments + = lens _istNegativeVideoDurationSegments + (\ s a -> s{_istNegativeVideoDurationSegments = a}) + . _Default + . _Coerce + +istNegativeIcmBrands :: Lens' InventorySegmentTargeting [Int64] +istNegativeIcmBrands + = lens _istNegativeIcmBrands + (\ s a -> s{_istNegativeIcmBrands = a}) + . _Default + . _Coerce + +istNegativeKeyValues :: Lens' InventorySegmentTargeting [Maybe RuleKeyValuePair] +istNegativeKeyValues + = lens _istNegativeKeyValues + (\ s a -> s{_istNegativeKeyValues = a}) + . _Default + . _Coerce + +istPositiveAudienceSegments :: Lens' InventorySegmentTargeting [Int64] +istPositiveAudienceSegments + = lens _istPositiveAudienceSegments + (\ s a -> s{_istPositiveAudienceSegments = a}) + . _Default + . _Coerce + +istPositiveXfpPlacements :: Lens' InventorySegmentTargeting [Int64] +istPositiveXfpPlacements + = lens _istPositiveXfpPlacements + (\ s a -> s{_istPositiveXfpPlacements = a}) + . _Default + . _Coerce + +istNegativeXfpAdSlots :: Lens' InventorySegmentTargeting [Int64] +istNegativeXfpAdSlots + = lens _istNegativeXfpAdSlots + (\ s a -> s{_istNegativeXfpAdSlots = a}) + . _Default + . _Coerce + +istPositiveOperatingSystemVersions :: Lens' InventorySegmentTargeting [Int64] +istPositiveOperatingSystemVersions + = lens _istPositiveOperatingSystemVersions + (\ s a -> s{_istPositiveOperatingSystemVersions = a}) + . _Default + . _Coerce + +istPositiveSizes :: Lens' InventorySegmentTargeting [Int64] +istPositiveSizes + = lens _istPositiveSizes + (\ s a -> s{_istPositiveSizes = a}) + . _Default + . _Coerce + +istPositiveDeviceCategories :: Lens' InventorySegmentTargeting [Int64] +istPositiveDeviceCategories + = lens _istPositiveDeviceCategories + (\ s a -> s{_istPositiveDeviceCategories = a}) + . _Default + . _Coerce + +istPositiveLocations :: Lens' InventorySegmentTargeting [Int64] +istPositiveLocations + = lens _istPositiveLocations + (\ s a -> s{_istPositiveLocations = a}) + . _Default + . _Coerce + +istNegativeAdSizes :: Lens' InventorySegmentTargeting [Maybe AdSize] +istNegativeAdSizes + = lens _istNegativeAdSizes + (\ s a -> s{_istNegativeAdSizes = a}) + . _Default + . _Coerce + +istPositiveOperatingSystems :: Lens' InventorySegmentTargeting [Int64] +istPositiveOperatingSystems + = lens _istPositiveOperatingSystems + (\ s a -> s{_istPositiveOperatingSystems = a}) + . _Default + . _Coerce + +istPositiveSiteUrls :: Lens' InventorySegmentTargeting [Text] +istPositiveSiteUrls + = lens _istPositiveSiteUrls + (\ s a -> s{_istPositiveSiteUrls = a}) + . _Default + . _Coerce + +istNegativeInventorySlots :: Lens' InventorySegmentTargeting [Text] +istNegativeInventorySlots + = lens _istNegativeInventorySlots + (\ s a -> s{_istNegativeInventorySlots = a}) + . _Default + . _Coerce + +istNegativeVideoAdPositionSegments :: Lens' InventorySegmentTargeting [Text] +istNegativeVideoAdPositionSegments + = lens _istNegativeVideoAdPositionSegments + (\ s a -> s{_istNegativeVideoAdPositionSegments = a}) + . _Default + . _Coerce + +istPositiveAdTypeSegments :: Lens' InventorySegmentTargeting [Text] +istPositiveAdTypeSegments + = lens _istPositiveAdTypeSegments + (\ s a -> s{_istPositiveAdTypeSegments = a}) + . _Default + . _Coerce + +istPositiveIcmInterests :: Lens' InventorySegmentTargeting [Int64] +istPositiveIcmInterests + = lens _istPositiveIcmInterests + (\ s a -> s{_istPositiveIcmInterests = a}) + . _Default + . _Coerce + +istPositiveMobileApps :: Lens' InventorySegmentTargeting [Text] +istPositiveMobileApps + = lens _istPositiveMobileApps + (\ s a -> s{_istPositiveMobileApps = a}) + . _Default + . _Coerce + +istPositiveKeyValues :: Lens' InventorySegmentTargeting [Maybe RuleKeyValuePair] +istPositiveKeyValues + = lens _istPositiveKeyValues + (\ s a -> s{_istPositiveKeyValues = a}) + . _Default + . _Coerce + +istPositiveIcmBrands :: Lens' InventorySegmentTargeting [Int64] +istPositiveIcmBrands + = lens _istPositiveIcmBrands + (\ s a -> s{_istPositiveIcmBrands = a}) + . _Default + . _Coerce + +istPositiveVideoDurationSegments :: Lens' InventorySegmentTargeting [Int64] +istPositiveVideoDurationSegments + = lens _istPositiveVideoDurationSegments + (\ s a -> s{_istPositiveVideoDurationSegments = a}) + . _Default + . _Coerce + +istNegativeAudienceSegments :: Lens' InventorySegmentTargeting [Int64] +istNegativeAudienceSegments + = lens _istNegativeAudienceSegments + (\ s a -> s{_istNegativeAudienceSegments = a}) + . _Default + . _Coerce + +istNegativeXfpPlacements :: Lens' InventorySegmentTargeting [Int64] +istNegativeXfpPlacements + = lens _istNegativeXfpPlacements + (\ s a -> s{_istNegativeXfpPlacements = a}) + . _Default + . _Coerce + +istPositiveXfpAdSlots :: Lens' InventorySegmentTargeting [Int64] +istPositiveXfpAdSlots + = lens _istPositiveXfpAdSlots + (\ s a -> s{_istPositiveXfpAdSlots = a}) + . _Default + . _Coerce + +istNegativeOperatingSystemVersions :: Lens' InventorySegmentTargeting [Int64] +istNegativeOperatingSystemVersions + = lens _istNegativeOperatingSystemVersions + (\ s a -> s{_istNegativeOperatingSystemVersions = a}) + . _Default + . _Coerce + +istNegativeSizes :: Lens' InventorySegmentTargeting [Int64] +istNegativeSizes + = lens _istNegativeSizes + (\ s a -> s{_istNegativeSizes = a}) + . _Default + . _Coerce + +istNegativeLocations :: Lens' InventorySegmentTargeting [Int64] +istNegativeLocations + = lens _istNegativeLocations + (\ s a -> s{_istNegativeLocations = a}) + . _Default + . _Coerce + +istNegativeDeviceCategories :: Lens' InventorySegmentTargeting [Int64] +istNegativeDeviceCategories + = lens _istNegativeDeviceCategories + (\ s a -> s{_istNegativeDeviceCategories = a}) + . _Default + . _Coerce + +istNegativeOperatingSystems :: Lens' InventorySegmentTargeting [Int64] +istNegativeOperatingSystems + = lens _istNegativeOperatingSystems + (\ s a -> s{_istNegativeOperatingSystems = a}) + . _Default + . _Coerce + +istPositiveAdSizes :: Lens' InventorySegmentTargeting [Maybe AdSize] +istPositiveAdSizes + = lens _istPositiveAdSizes + (\ s a -> s{_istPositiveAdSizes = a}) + . _Default + . _Coerce + +istNegativeSiteUrls :: Lens' InventorySegmentTargeting [Text] +istNegativeSiteUrls + = lens _istNegativeSiteUrls + (\ s a -> s{_istNegativeSiteUrls = a}) + . _Default + . _Coerce + +istNegativeAdTypeSegments :: Lens' InventorySegmentTargeting [Text] +istNegativeAdTypeSegments + = lens _istNegativeAdTypeSegments + (\ s a -> s{_istNegativeAdTypeSegments = a}) + . _Default + . _Coerce + +istPositiveVideoAdPositionSegments :: Lens' InventorySegmentTargeting [Text] +istPositiveVideoAdPositionSegments + = lens _istPositiveVideoAdPositionSegments + (\ s a -> s{_istPositiveVideoAdPositionSegments = a}) + . _Default + . _Coerce + +istPositiveInventorySlots :: Lens' InventorySegmentTargeting [Text] +istPositiveInventorySlots + = lens _istPositiveInventorySlots + (\ s a -> s{_istPositiveInventorySlots = a}) + . _Default + . _Coerce + +istNegativeMobileApps :: Lens' InventorySegmentTargeting [Text] +istNegativeMobileApps + = lens _istNegativeMobileApps + (\ s a -> s{_istNegativeMobileApps = a}) + . _Default + . _Coerce + +istNegativeIcmInterests :: Lens' InventorySegmentTargeting [Int64] +istNegativeIcmInterests + = lens _istNegativeIcmInterests + (\ s a -> s{_istNegativeIcmInterests = a}) + . _Default + . _Coerce + +instance FromJSON InventorySegmentTargeting where + parseJSON + = withObject "InventorySegmentTargeting" + (\ o -> + InventorySegmentTargeting <$> + (o .:? "negativeVideoDurationSegments" .!= mempty) + <*> (o .:? "negativeIcmBrands" .!= mempty) + <*> (o .:? "negativeKeyValues" .!= mempty) + <*> (o .:? "positiveAudienceSegments" .!= mempty) + <*> (o .:? "positiveXfpPlacements" .!= mempty) + <*> (o .:? "negativeXfpAdSlots" .!= mempty) + <*> + (o .:? "positiveOperatingSystemVersions" .!= mempty) + <*> (o .:? "positiveSizes" .!= mempty) + <*> (o .:? "positiveDeviceCategories" .!= mempty) + <*> (o .:? "positiveLocations" .!= mempty) + <*> (o .:? "negativeAdSizes" .!= mempty) + <*> (o .:? "positiveOperatingSystems" .!= mempty) + <*> (o .:? "positiveSiteUrls" .!= mempty) + <*> (o .:? "negativeInventorySlots" .!= mempty) + <*> + (o .:? "negativeVideoAdPositionSegments" .!= mempty) + <*> (o .:? "positiveAdTypeSegments" .!= mempty) + <*> (o .:? "positiveIcmInterests" .!= mempty) + <*> (o .:? "positiveMobileApps" .!= mempty) + <*> (o .:? "positiveKeyValues" .!= mempty) + <*> (o .:? "positiveIcmBrands" .!= mempty) + <*> + (o .:? "positiveVideoDurationSegments" .!= mempty) + <*> (o .:? "negativeAudienceSegments" .!= mempty) + <*> (o .:? "negativeXfpPlacements" .!= mempty) + <*> (o .:? "positiveXfpAdSlots" .!= mempty) + <*> + (o .:? "negativeOperatingSystemVersions" .!= mempty) + <*> (o .:? "negativeSizes" .!= mempty) + <*> (o .:? "negativeLocations" .!= mempty) + <*> (o .:? "negativeDeviceCategories" .!= mempty) + <*> (o .:? "negativeOperatingSystems" .!= mempty) + <*> (o .:? "positiveAdSizes" .!= mempty) + <*> (o .:? "negativeSiteUrls" .!= mempty) + <*> (o .:? "negativeAdTypeSegments" .!= mempty) + <*> + (o .:? "positiveVideoAdPositionSegments" .!= mempty) + <*> (o .:? "positiveInventorySlots" .!= mempty) + <*> (o .:? "negativeMobileApps" .!= mempty) + <*> (o .:? "negativeIcmInterests" .!= mempty)) + +instance ToJSON InventorySegmentTargeting where + toJSON InventorySegmentTargeting{..} + = object + (catMaybes + [("negativeVideoDurationSegments" .=) <$> + _istNegativeVideoDurationSegments, + ("negativeIcmBrands" .=) <$> _istNegativeIcmBrands, + ("negativeKeyValues" .=) <$> _istNegativeKeyValues, + ("positiveAudienceSegments" .=) <$> + _istPositiveAudienceSegments, + ("positiveXfpPlacements" .=) <$> + _istPositiveXfpPlacements, + ("negativeXfpAdSlots" .=) <$> _istNegativeXfpAdSlots, + ("positiveOperatingSystemVersions" .=) <$> + _istPositiveOperatingSystemVersions, + ("positiveSizes" .=) <$> _istPositiveSizes, + ("positiveDeviceCategories" .=) <$> + _istPositiveDeviceCategories, + ("positiveLocations" .=) <$> _istPositiveLocations, + ("negativeAdSizes" .=) <$> _istNegativeAdSizes, + ("positiveOperatingSystems" .=) <$> + _istPositiveOperatingSystems, + ("positiveSiteUrls" .=) <$> _istPositiveSiteUrls, + ("negativeInventorySlots" .=) <$> + _istNegativeInventorySlots, + ("negativeVideoAdPositionSegments" .=) <$> + _istNegativeVideoAdPositionSegments, + ("positiveAdTypeSegments" .=) <$> + _istPositiveAdTypeSegments, + ("positiveIcmInterests" .=) <$> + _istPositiveIcmInterests, + ("positiveMobileApps" .=) <$> _istPositiveMobileApps, + ("positiveKeyValues" .=) <$> _istPositiveKeyValues, + ("positiveIcmBrands" .=) <$> _istPositiveIcmBrands, + ("positiveVideoDurationSegments" .=) <$> + _istPositiveVideoDurationSegments, + ("negativeAudienceSegments" .=) <$> + _istNegativeAudienceSegments, + ("negativeXfpPlacements" .=) <$> + _istNegativeXfpPlacements, + ("positiveXfpAdSlots" .=) <$> _istPositiveXfpAdSlots, + ("negativeOperatingSystemVersions" .=) <$> + _istNegativeOperatingSystemVersions, + ("negativeSizes" .=) <$> _istNegativeSizes, + ("negativeLocations" .=) <$> _istNegativeLocations, + ("negativeDeviceCategories" .=) <$> + _istNegativeDeviceCategories, + ("negativeOperatingSystems" .=) <$> + _istNegativeOperatingSystems, + ("positiveAdSizes" .=) <$> _istPositiveAdSizes, + ("negativeSiteUrls" .=) <$> _istNegativeSiteUrls, + ("negativeAdTypeSegments" .=) <$> + _istNegativeAdTypeSegments, + ("positiveVideoAdPositionSegments" .=) <$> + _istPositiveVideoAdPositionSegments, + ("positiveInventorySlots" .=) <$> + _istPositiveInventorySlots, + ("negativeMobileApps" .=) <$> _istNegativeMobileApps, + ("negativeIcmInterests" .=) <$> + _istNegativeIcmInterests]) + +-- +-- /See:/ 'sharedTargeting' smart constructor. +data SharedTargeting = SharedTargeting + { _stKey :: !(Maybe Text) + , _stExclusions :: !(Maybe [Maybe TargetingValue]) + , _stInclusions :: !(Maybe [Maybe TargetingValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SharedTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'stKey' +-- +-- * 'stExclusions' +-- +-- * 'stInclusions' +sharedTargeting + :: SharedTargeting +sharedTargeting = + SharedTargeting + { _stKey = Nothing + , _stExclusions = Nothing + , _stInclusions = Nothing + } + +-- | The key representing the shared targeting criterion. +stKey :: Lens' SharedTargeting (Maybe Text) +stKey = lens _stKey (\ s a -> s{_stKey = a}) + +-- | The list of values to exclude from targeting. +stExclusions :: Lens' SharedTargeting [Maybe TargetingValue] +stExclusions + = lens _stExclusions (\ s a -> s{_stExclusions = a}) + . _Default + . _Coerce + +-- | The list of value to include as part of the targeting. +stInclusions :: Lens' SharedTargeting [Maybe TargetingValue] +stInclusions + = lens _stInclusions (\ s a -> s{_stInclusions = a}) + . _Default + . _Coerce + +instance FromJSON SharedTargeting where + parseJSON + = withObject "SharedTargeting" + (\ o -> + SharedTargeting <$> + (o .:? "key") <*> (o .:? "exclusions" .!= mempty) <*> + (o .:? "inclusions" .!= mempty)) + +instance ToJSON SharedTargeting where + toJSON SharedTargeting{..} + = object + (catMaybes + [("key" .=) <$> _stKey, + ("exclusions" .=) <$> _stExclusions, + ("inclusions" .=) <$> _stInclusions]) + +-- +-- /See:/ 'clientAccessCapabilities' smart constructor. +data ClientAccessCapabilities = ClientAccessCapabilities + { _cacClientAccountId :: !(Maybe Int64) + , _cacCapabilities :: !(Maybe [Int32]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientAccessCapabilities' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cacClientAccountId' +-- +-- * 'cacCapabilities' +clientAccessCapabilities + :: ClientAccessCapabilities +clientAccessCapabilities = + ClientAccessCapabilities + { _cacClientAccountId = Nothing + , _cacCapabilities = Nothing + } + +cacClientAccountId :: Lens' ClientAccessCapabilities (Maybe Int64) +cacClientAccountId + = lens _cacClientAccountId + (\ s a -> s{_cacClientAccountId = a}) + +cacCapabilities :: Lens' ClientAccessCapabilities [Int32] +cacCapabilities + = lens _cacCapabilities + (\ s a -> s{_cacCapabilities = a}) + . _Default + . _Coerce + +instance FromJSON ClientAccessCapabilities where + parseJSON + = withObject "ClientAccessCapabilities" + (\ o -> + ClientAccessCapabilities <$> + (o .:? "clientAccountId") <*> + (o .:? "capabilities" .!= mempty)) + +instance ToJSON ClientAccessCapabilities where + toJSON ClientAccessCapabilities{..} + = object + (catMaybes + [("clientAccountId" .=) <$> _cacClientAccountId, + ("capabilities" .=) <$> _cacCapabilities]) + +-- +-- /See:/ 'deleteOrderDealsResponse' smart constructor. +data DeleteOrderDealsResponse = DeleteOrderDealsResponse + { _dDeals :: !(Maybe [Maybe MarketplaceDeal]) + , _dOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeleteOrderDealsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dDeals' +-- +-- * 'dOrderRevisionNumber' +deleteOrderDealsResponse + :: DeleteOrderDealsResponse +deleteOrderDealsResponse = + DeleteOrderDealsResponse + { _dDeals = Nothing + , _dOrderRevisionNumber = Nothing + } + +-- | List of deals deleted (in the same order as passed in the request) +dDeals :: Lens' DeleteOrderDealsResponse [Maybe MarketplaceDeal] +dDeals + = lens _dDeals (\ s a -> s{_dDeals = a}) . _Default . + _Coerce + +-- | The updated revision number for the order. +dOrderRevisionNumber :: Lens' DeleteOrderDealsResponse (Maybe Int64) +dOrderRevisionNumber + = lens _dOrderRevisionNumber + (\ s a -> s{_dOrderRevisionNumber = a}) + +instance FromJSON DeleteOrderDealsResponse where + parseJSON + = withObject "DeleteOrderDealsResponse" + (\ o -> + DeleteOrderDealsResponse <$> + (o .:? "deals" .!= mempty) <*> + (o .:? "orderRevisionNumber")) + +instance ToJSON DeleteOrderDealsResponse where + toJSON DeleteOrderDealsResponse{..} + = object + (catMaybes + [("deals" .=) <$> _dDeals, + ("orderRevisionNumber" .=) <$> + _dOrderRevisionNumber]) + +-- | An order can contain multiple deals. A deal contains the terms and +-- targeting information that is used for serving. +-- +-- /See:/ 'marketplaceDeal' smart constructor. +data MarketplaceDeal = MarketplaceDeal + { _mdExternalDealId :: !(Maybe Text) + , _mdBuyerPrivateData :: !(Maybe (Maybe PrivateData)) + , _mdWebPropertyCode :: !(Maybe Text) + , _mdCreationTimeMs :: !(Maybe Int64) + , _mdTerms :: !(Maybe (Maybe DealTerms)) + , _mdOfferRevisionNumber :: !(Maybe Int64) + , _mdLastUpdateTimeMs :: !(Maybe Int64) + , _mdKind :: !Text + , _mdDeliveryControl :: !(Maybe (Maybe DeliveryControl)) + , _mdFlightStartTimeMs :: !(Maybe Int64) + , _mdSharedTargetings :: !(Maybe [Maybe SharedTargeting]) + , _mdDealId :: !(Maybe Text) + , _mdInventoryDescription :: !(Maybe Text) + , _mdSyndicationProduct :: !(Maybe Text) + , _mdFlightEndTimeMs :: !(Maybe Int64) + , _mdName :: !(Maybe Text) + , _mdSellerContacts :: !(Maybe [Maybe ContactInformation]) + , _mdOfferId :: !(Maybe Text) + , _mdOrderId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceDeal' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdExternalDealId' +-- +-- * 'mdBuyerPrivateData' +-- +-- * 'mdWebPropertyCode' +-- +-- * 'mdCreationTimeMs' +-- +-- * 'mdTerms' +-- +-- * 'mdOfferRevisionNumber' +-- +-- * 'mdLastUpdateTimeMs' +-- +-- * 'mdKind' +-- +-- * 'mdDeliveryControl' +-- +-- * 'mdFlightStartTimeMs' +-- +-- * 'mdSharedTargetings' +-- +-- * 'mdDealId' +-- +-- * 'mdInventoryDescription' +-- +-- * 'mdSyndicationProduct' +-- +-- * 'mdFlightEndTimeMs' +-- +-- * 'mdName' +-- +-- * 'mdSellerContacts' +-- +-- * 'mdOfferId' +-- +-- * 'mdOrderId' +marketplaceDeal + :: MarketplaceDeal +marketplaceDeal = + MarketplaceDeal + { _mdExternalDealId = Nothing + , _mdBuyerPrivateData = Nothing + , _mdWebPropertyCode = Nothing + , _mdCreationTimeMs = Nothing + , _mdTerms = Nothing + , _mdOfferRevisionNumber = Nothing + , _mdLastUpdateTimeMs = Nothing + , _mdKind = "adexchangebuyer#marketplaceDeal" + , _mdDeliveryControl = Nothing + , _mdFlightStartTimeMs = Nothing + , _mdSharedTargetings = Nothing + , _mdDealId = Nothing + , _mdInventoryDescription = Nothing + , _mdSyndicationProduct = Nothing + , _mdFlightEndTimeMs = Nothing + , _mdName = Nothing + , _mdSellerContacts = Nothing + , _mdOfferId = Nothing + , _mdOrderId = Nothing + } + +-- | The external deal id assigned to this deal once the deal is finalized. +-- This is the deal-id that shows up in serving\/reporting etc. (readonly) +mdExternalDealId :: Lens' MarketplaceDeal (Maybe Text) +mdExternalDealId + = lens _mdExternalDealId + (\ s a -> s{_mdExternalDealId = a}) + +-- | Buyer private data (hidden from seller). +mdBuyerPrivateData :: Lens' MarketplaceDeal (Maybe (Maybe PrivateData)) +mdBuyerPrivateData + = lens _mdBuyerPrivateData + (\ s a -> s{_mdBuyerPrivateData = a}) + +mdWebPropertyCode :: Lens' MarketplaceDeal (Maybe Text) +mdWebPropertyCode + = lens _mdWebPropertyCode + (\ s a -> s{_mdWebPropertyCode = a}) + +-- | The time (ms since epoch) of the deal creation. (readonly) +mdCreationTimeMs :: Lens' MarketplaceDeal (Maybe Int64) +mdCreationTimeMs + = lens _mdCreationTimeMs + (\ s a -> s{_mdCreationTimeMs = a}) + +-- | The negotiable terms of the deal. (updatable) +mdTerms :: Lens' MarketplaceDeal (Maybe (Maybe DealTerms)) +mdTerms = lens _mdTerms (\ s a -> s{_mdTerms = a}) + +-- | The revision number of the offer that the deal was created from +-- (readonly, except on create) +mdOfferRevisionNumber :: Lens' MarketplaceDeal (Maybe Int64) +mdOfferRevisionNumber + = lens _mdOfferRevisionNumber + (\ s a -> s{_mdOfferRevisionNumber = a}) + +-- | The time (ms since epoch) when the deal was last updated. (readonly) +mdLastUpdateTimeMs :: Lens' MarketplaceDeal (Maybe Int64) +mdLastUpdateTimeMs + = lens _mdLastUpdateTimeMs + (\ s a -> s{_mdLastUpdateTimeMs = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"adexchangebuyer#marketplaceDeal\". +mdKind :: Lens' MarketplaceDeal Text +mdKind = lens _mdKind (\ s a -> s{_mdKind = a}) + +-- | The set of fields around delivery control that are interesting for a +-- buyer to see but are non-negotiable. These are set by the publisher. +-- This message is assigned an id of 100 since some day we would want to +-- model this as a protobuf extension. +mdDeliveryControl :: Lens' MarketplaceDeal (Maybe (Maybe DeliveryControl)) +mdDeliveryControl + = lens _mdDeliveryControl + (\ s a -> s{_mdDeliveryControl = a}) + +-- | Proposed flight start time of the deal (ms since epoch) This will +-- generally be stored in a granularity of a second. (updatable) +mdFlightStartTimeMs :: Lens' MarketplaceDeal (Maybe Int64) +mdFlightStartTimeMs + = lens _mdFlightStartTimeMs + (\ s a -> s{_mdFlightStartTimeMs = a}) + +-- | The shared targeting visible to buyers and sellers. (updatable) +mdSharedTargetings :: Lens' MarketplaceDeal [Maybe SharedTargeting] +mdSharedTargetings + = lens _mdSharedTargetings + (\ s a -> s{_mdSharedTargetings = a}) + . _Default + . _Coerce + +-- | A unique deal=id for the deal (readonly). +mdDealId :: Lens' MarketplaceDeal (Maybe Text) +mdDealId = lens _mdDealId (\ s a -> s{_mdDealId = a}) + +-- | Description for the deal terms. (updatable) +mdInventoryDescription :: Lens' MarketplaceDeal (Maybe Text) +mdInventoryDescription + = lens _mdInventoryDescription + (\ s a -> s{_mdInventoryDescription = a}) + +-- | The syndication product associated with the deal. (readonly, except on +-- create) +mdSyndicationProduct :: Lens' MarketplaceDeal (Maybe Text) +mdSyndicationProduct + = lens _mdSyndicationProduct + (\ s a -> s{_mdSyndicationProduct = a}) + +-- | Proposed flight end time of the deal (ms since epoch) This will +-- generally be stored in a granularity of a second. (updatable) +mdFlightEndTimeMs :: Lens' MarketplaceDeal (Maybe Int64) +mdFlightEndTimeMs + = lens _mdFlightEndTimeMs + (\ s a -> s{_mdFlightEndTimeMs = a}) + +-- | The name of the deal. (updatable) +mdName :: Lens' MarketplaceDeal (Maybe Text) +mdName = lens _mdName (\ s a -> s{_mdName = a}) + +-- | Optional Seller contact information for the deal (buyer-readonly) +mdSellerContacts :: Lens' MarketplaceDeal [Maybe ContactInformation] +mdSellerContacts + = lens _mdSellerContacts + (\ s a -> s{_mdSellerContacts = a}) + . _Default + . _Coerce + +-- | The offer-id from which this deal was created. (readonly, except on +-- create) +mdOfferId :: Lens' MarketplaceDeal (Maybe Text) +mdOfferId + = lens _mdOfferId (\ s a -> s{_mdOfferId = a}) + +mdOrderId :: Lens' MarketplaceDeal (Maybe Text) +mdOrderId + = lens _mdOrderId (\ s a -> s{_mdOrderId = a}) + +instance FromJSON MarketplaceDeal where + parseJSON + = withObject "MarketplaceDeal" + (\ o -> + MarketplaceDeal <$> + (o .:? "externalDealId") <*> + (o .:? "buyerPrivateData") + <*> (o .:? "webPropertyCode") + <*> (o .:? "creationTimeMs") + <*> (o .:? "terms") + <*> (o .:? "offerRevisionNumber") + <*> (o .:? "lastUpdateTimeMs") + <*> + (o .:? "kind" .!= "adexchangebuyer#marketplaceDeal") + <*> (o .:? "deliveryControl") + <*> (o .:? "flightStartTimeMs") + <*> (o .:? "sharedTargetings" .!= mempty) + <*> (o .:? "dealId") + <*> (o .:? "inventoryDescription") + <*> (o .:? "syndicationProduct") + <*> (o .:? "flightEndTimeMs") + <*> (o .:? "name") + <*> (o .:? "sellerContacts" .!= mempty) + <*> (o .:? "offerId") + <*> (o .:? "orderId")) + +instance ToJSON MarketplaceDeal where + toJSON MarketplaceDeal{..} + = object + (catMaybes + [("externalDealId" .=) <$> _mdExternalDealId, + ("buyerPrivateData" .=) <$> _mdBuyerPrivateData, + ("webPropertyCode" .=) <$> _mdWebPropertyCode, + ("creationTimeMs" .=) <$> _mdCreationTimeMs, + ("terms" .=) <$> _mdTerms, + ("offerRevisionNumber" .=) <$> + _mdOfferRevisionNumber, + ("lastUpdateTimeMs" .=) <$> _mdLastUpdateTimeMs, + Just ("kind" .= _mdKind), + ("deliveryControl" .=) <$> _mdDeliveryControl, + ("flightStartTimeMs" .=) <$> _mdFlightStartTimeMs, + ("sharedTargetings" .=) <$> _mdSharedTargetings, + ("dealId" .=) <$> _mdDealId, + ("inventoryDescription" .=) <$> + _mdInventoryDescription, + ("syndicationProduct" .=) <$> _mdSyndicationProduct, + ("flightEndTimeMs" .=) <$> _mdFlightEndTimeMs, + ("name" .=) <$> _mdName, + ("sellerContacts" .=) <$> _mdSellerContacts, + ("offerId" .=) <$> _mdOfferId, + ("orderId" .=) <$> _mdOrderId]) + +-- +-- /See:/ 'negotiationRoundDto' smart constructor. +data NegotiationRoundDto = NegotiationRoundDto + { _nrdTerms :: !(Maybe (Maybe TermsDto)) + , _nrdKind :: !Text + , _nrdOriginatorRole :: !(Maybe Text) + , _nrdAction :: !(Maybe Text) + , _nrdDbmPartnerId :: !(Maybe Int64) + , _nrdNotes :: !(Maybe Text) + , _nrdNegotiationId :: !(Maybe Int64) + , _nrdEditHistory :: !(Maybe (Maybe EditHistoryDto)) + , _nrdRoundNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationRoundDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nrdTerms' +-- +-- * 'nrdKind' +-- +-- * 'nrdOriginatorRole' +-- +-- * 'nrdAction' +-- +-- * 'nrdDbmPartnerId' +-- +-- * 'nrdNotes' +-- +-- * 'nrdNegotiationId' +-- +-- * 'nrdEditHistory' +-- +-- * 'nrdRoundNumber' +negotiationRoundDto + :: NegotiationRoundDto +negotiationRoundDto = + NegotiationRoundDto + { _nrdTerms = Nothing + , _nrdKind = "adexchangebuyer#negotiationRound" + , _nrdOriginatorRole = Nothing + , _nrdAction = Nothing + , _nrdDbmPartnerId = Nothing + , _nrdNotes = Nothing + , _nrdNegotiationId = Nothing + , _nrdEditHistory = Nothing + , _nrdRoundNumber = Nothing + } + +-- | The detailed terms proposed in this negotiation round. +nrdTerms :: Lens' NegotiationRoundDto (Maybe (Maybe TermsDto)) +nrdTerms = lens _nrdTerms (\ s a -> s{_nrdTerms = a}) + +nrdKind :: Lens' NegotiationRoundDto Text +nrdKind = lens _nrdKind (\ s a -> s{_nrdKind = a}) + +-- | The role, either buyer or seller, initiating this negotiation round. +nrdOriginatorRole :: Lens' NegotiationRoundDto (Maybe Text) +nrdOriginatorRole + = lens _nrdOriginatorRole + (\ s a -> s{_nrdOriginatorRole = a}) + +-- | The action performed by this negotiation round. +nrdAction :: Lens' NegotiationRoundDto (Maybe Text) +nrdAction + = lens _nrdAction (\ s a -> s{_nrdAction = a}) + +-- | Stores DBM partner ID for use by DBM +nrdDbmPartnerId :: Lens' NegotiationRoundDto (Maybe Int64) +nrdDbmPartnerId + = lens _nrdDbmPartnerId + (\ s a -> s{_nrdDbmPartnerId = a}) + +-- | Notes regarding this negotiation round. +nrdNotes :: Lens' NegotiationRoundDto (Maybe Text) +nrdNotes = lens _nrdNotes (\ s a -> s{_nrdNotes = a}) + +-- | The ID of the negotiation to which this negotiation round applies. +nrdNegotiationId :: Lens' NegotiationRoundDto (Maybe Int64) +nrdNegotiationId + = lens _nrdNegotiationId + (\ s a -> s{_nrdNegotiationId = a}) + +-- | The edit history of this negotiation round. +nrdEditHistory :: Lens' NegotiationRoundDto (Maybe (Maybe EditHistoryDto)) +nrdEditHistory + = lens _nrdEditHistory + (\ s a -> s{_nrdEditHistory = a}) + +-- | The number of this negotiation round, in sequence. +nrdRoundNumber :: Lens' NegotiationRoundDto (Maybe Int64) +nrdRoundNumber + = lens _nrdRoundNumber + (\ s a -> s{_nrdRoundNumber = a}) + +instance FromJSON NegotiationRoundDto where + parseJSON + = withObject "NegotiationRoundDto" + (\ o -> + NegotiationRoundDto <$> + (o .:? "terms") <*> + (o .:? "kind" .!= "adexchangebuyer#negotiationRound") + <*> (o .:? "originatorRole") + <*> (o .:? "action") + <*> (o .:? "dbmPartnerId") + <*> (o .:? "notes") + <*> (o .:? "negotiationId") + <*> (o .:? "editHistory") + <*> (o .:? "roundNumber")) + +instance ToJSON NegotiationRoundDto where + toJSON NegotiationRoundDto{..} + = object + (catMaybes + [("terms" .=) <$> _nrdTerms, + Just ("kind" .= _nrdKind), + ("originatorRole" .=) <$> _nrdOriginatorRole, + ("action" .=) <$> _nrdAction, + ("dbmPartnerId" .=) <$> _nrdDbmPartnerId, + ("notes" .=) <$> _nrdNotes, + ("negotiationId" .=) <$> _nrdNegotiationId, + ("editHistory" .=) <$> _nrdEditHistory, + ("roundNumber" .=) <$> _nrdRoundNumber]) + +-- +-- /See:/ 'statsDto' smart constructor. +data StatsDto = StatsDto + { _sdBids :: !(Maybe Int64) + , _sdSpend :: !(Maybe (Maybe MoneyDto)) + , _sdImpressions :: !(Maybe Int64) + , _sdGoodBids :: !(Maybe Int64) + , _sdRevenue :: !(Maybe (Maybe MoneyDto)) + , _sdRequests :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatsDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdBids' +-- +-- * 'sdSpend' +-- +-- * 'sdImpressions' +-- +-- * 'sdGoodBids' +-- +-- * 'sdRevenue' +-- +-- * 'sdRequests' +statsDto + :: StatsDto +statsDto = + StatsDto + { _sdBids = Nothing + , _sdSpend = Nothing + , _sdImpressions = Nothing + , _sdGoodBids = Nothing + , _sdRevenue = Nothing + , _sdRequests = Nothing + } + +sdBids :: Lens' StatsDto (Maybe Int64) +sdBids = lens _sdBids (\ s a -> s{_sdBids = a}) + +sdSpend :: Lens' StatsDto (Maybe (Maybe MoneyDto)) +sdSpend = lens _sdSpend (\ s a -> s{_sdSpend = a}) + +sdImpressions :: Lens' StatsDto (Maybe Int64) +sdImpressions + = lens _sdImpressions + (\ s a -> s{_sdImpressions = a}) + +sdGoodBids :: Lens' StatsDto (Maybe Int64) +sdGoodBids + = lens _sdGoodBids (\ s a -> s{_sdGoodBids = a}) + +sdRevenue :: Lens' StatsDto (Maybe (Maybe MoneyDto)) +sdRevenue + = lens _sdRevenue (\ s a -> s{_sdRevenue = a}) + +sdRequests :: Lens' StatsDto (Maybe Int64) +sdRequests + = lens _sdRequests (\ s a -> s{_sdRequests = a}) + +instance FromJSON StatsDto where + parseJSON + = withObject "StatsDto" + (\ o -> + StatsDto <$> + (o .:? "bids") <*> (o .:? "spend") <*> + (o .:? "impressions") + <*> (o .:? "goodBids") + <*> (o .:? "revenue") + <*> (o .:? "requests")) + +instance ToJSON StatsDto where + toJSON StatsDto{..} + = object + (catMaybes + [("bids" .=) <$> _sdBids, ("spend" .=) <$> _sdSpend, + ("impressions" .=) <$> _sdImpressions, + ("goodBids" .=) <$> _sdGoodBids, + ("revenue" .=) <$> _sdRevenue, + ("requests" .=) <$> _sdRequests]) + +-- +-- /See:/ 'getOffersResponse' smart constructor. +newtype GetOffersResponse = GetOffersResponse + { _gorOffers :: Maybe [Maybe MarketplaceOffer] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetOffersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gorOffers' +getOffersResponse + :: GetOffersResponse +getOffersResponse = + GetOffersResponse + { _gorOffers = Nothing + } + +-- | The returned list of offers. +gorOffers :: Lens' GetOffersResponse [Maybe MarketplaceOffer] +gorOffers + = lens _gorOffers (\ s a -> s{_gorOffers = a}) . + _Default + . _Coerce + +instance FromJSON GetOffersResponse where + parseJSON + = withObject "GetOffersResponse" + (\ o -> + GetOffersResponse <$> (o .:? "offers" .!= mempty)) + +instance ToJSON GetOffersResponse where + toJSON GetOffersResponse{..} + = object (catMaybes [("offers" .=) <$> _gorOffers]) + +-- +-- /See:/ 'dealTermsNonGuaranteedAuctionTerms' smart constructor. +data DealTermsNonGuaranteedAuctionTerms = DealTermsNonGuaranteedAuctionTerms + { _dtngatReservePricePerBuyers :: !(Maybe [Maybe PricePerBuyer]) + , _dtngatPrivateAuctionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealTermsNonGuaranteedAuctionTerms' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtngatReservePricePerBuyers' +-- +-- * 'dtngatPrivateAuctionId' +dealTermsNonGuaranteedAuctionTerms + :: DealTermsNonGuaranteedAuctionTerms +dealTermsNonGuaranteedAuctionTerms = + DealTermsNonGuaranteedAuctionTerms + { _dtngatReservePricePerBuyers = Nothing + , _dtngatPrivateAuctionId = Nothing + } + +-- | Reserve price for the specified buyer. +dtngatReservePricePerBuyers :: Lens' DealTermsNonGuaranteedAuctionTerms [Maybe PricePerBuyer] +dtngatReservePricePerBuyers + = lens _dtngatReservePricePerBuyers + (\ s a -> s{_dtngatReservePricePerBuyers = a}) + . _Default + . _Coerce + +-- | Id of the corresponding private auction. +dtngatPrivateAuctionId :: Lens' DealTermsNonGuaranteedAuctionTerms (Maybe Text) +dtngatPrivateAuctionId + = lens _dtngatPrivateAuctionId + (\ s a -> s{_dtngatPrivateAuctionId = a}) + +instance FromJSON DealTermsNonGuaranteedAuctionTerms + where + parseJSON + = withObject "DealTermsNonGuaranteedAuctionTerms" + (\ o -> + DealTermsNonGuaranteedAuctionTerms <$> + (o .:? "reservePricePerBuyers" .!= mempty) <*> + (o .:? "privateAuctionId")) + +instance ToJSON DealTermsNonGuaranteedAuctionTerms + where + toJSON DealTermsNonGuaranteedAuctionTerms{..} + = object + (catMaybes + [("reservePricePerBuyers" .=) <$> + _dtngatReservePricePerBuyers, + ("privateAuctionId" .=) <$> _dtngatPrivateAuctionId]) + +-- +-- /See:/ 'buyer' smart constructor. +newtype Buyer = Buyer + { _bbAccountId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Buyer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bbAccountId' +buyer + :: Buyer +buyer = + Buyer + { _bbAccountId = Nothing + } + +-- | Adx account id of the buyer. +bbAccountId :: Lens' Buyer (Maybe Text) +bbAccountId + = lens _bbAccountId (\ s a -> s{_bbAccountId = a}) + +instance FromJSON Buyer where + parseJSON + = withObject "Buyer" + (\ o -> Buyer <$> (o .:? "accountId")) + +instance ToJSON Buyer where + toJSON Buyer{..} + = object + (catMaybes [("accountId" .=) <$> _bbAccountId]) + +-- +-- /See:/ 'marketplaceLabel' smart constructor. +data MarketplaceLabel = MarketplaceLabel + { _mlDeprecatedMarketplaceDealParty :: !(Maybe (Maybe MarketplaceDealParty)) + , _mlAccountId :: !(Maybe Text) + , _mlCreateTimeMs :: !(Maybe Int64) + , _mlLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceLabel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlDeprecatedMarketplaceDealParty' +-- +-- * 'mlAccountId' +-- +-- * 'mlCreateTimeMs' +-- +-- * 'mlLabel' +marketplaceLabel + :: MarketplaceLabel +marketplaceLabel = + MarketplaceLabel + { _mlDeprecatedMarketplaceDealParty = Nothing + , _mlAccountId = Nothing + , _mlCreateTimeMs = Nothing + , _mlLabel = Nothing + } + +-- | Information about the party that created the label. +mlDeprecatedMarketplaceDealParty :: Lens' MarketplaceLabel (Maybe (Maybe MarketplaceDealParty)) +mlDeprecatedMarketplaceDealParty + = lens _mlDeprecatedMarketplaceDealParty + (\ s a -> s{_mlDeprecatedMarketplaceDealParty = a}) + +-- | The accountId of the party that created the label. +mlAccountId :: Lens' MarketplaceLabel (Maybe Text) +mlAccountId + = lens _mlAccountId (\ s a -> s{_mlAccountId = a}) + +-- | The creation time (in ms since epoch) for the label. +mlCreateTimeMs :: Lens' MarketplaceLabel (Maybe Int64) +mlCreateTimeMs + = lens _mlCreateTimeMs + (\ s a -> s{_mlCreateTimeMs = a}) + +-- | The label to use. +mlLabel :: Lens' MarketplaceLabel (Maybe Text) +mlLabel = lens _mlLabel (\ s a -> s{_mlLabel = a}) + +instance FromJSON MarketplaceLabel where + parseJSON + = withObject "MarketplaceLabel" + (\ o -> + MarketplaceLabel <$> + (o .:? "deprecatedMarketplaceDealParty") <*> + (o .:? "accountId") + <*> (o .:? "createTimeMs") + <*> (o .:? "label")) + +instance ToJSON MarketplaceLabel where + toJSON MarketplaceLabel{..} + = object + (catMaybes + [("deprecatedMarketplaceDealParty" .=) <$> + _mlDeprecatedMarketplaceDealParty, + ("accountId" .=) <$> _mlAccountId, + ("createTimeMs" .=) <$> _mlCreateTimeMs, + ("label" .=) <$> _mlLabel]) + +-- +-- /See:/ 'dateTime' smart constructor. +data DateTime = DateTime + { _dtSecond :: !(Maybe Int32) + , _dtDay :: !(Maybe Int32) + , _dtYear :: !(Maybe Int32) + , _dtHour :: !(Maybe Int32) + , _dtMonth :: !(Maybe Int32) + , _dtMinute :: !(Maybe Int32) + , _dtTimeZoneId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DateTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtSecond' +-- +-- * 'dtDay' +-- +-- * 'dtYear' +-- +-- * 'dtHour' +-- +-- * 'dtMonth' +-- +-- * 'dtMinute' +-- +-- * 'dtTimeZoneId' +dateTime + :: DateTime +dateTime = + DateTime + { _dtSecond = Nothing + , _dtDay = Nothing + , _dtYear = Nothing + , _dtHour = Nothing + , _dtMonth = Nothing + , _dtMinute = Nothing + , _dtTimeZoneId = Nothing + } + +dtSecond :: Lens' DateTime (Maybe Int32) +dtSecond = lens _dtSecond (\ s a -> s{_dtSecond = a}) + +dtDay :: Lens' DateTime (Maybe Int32) +dtDay = lens _dtDay (\ s a -> s{_dtDay = a}) + +dtYear :: Lens' DateTime (Maybe Int32) +dtYear = lens _dtYear (\ s a -> s{_dtYear = a}) + +dtHour :: Lens' DateTime (Maybe Int32) +dtHour = lens _dtHour (\ s a -> s{_dtHour = a}) + +dtMonth :: Lens' DateTime (Maybe Int32) +dtMonth = lens _dtMonth (\ s a -> s{_dtMonth = a}) + +dtMinute :: Lens' DateTime (Maybe Int32) +dtMinute = lens _dtMinute (\ s a -> s{_dtMinute = a}) + +dtTimeZoneId :: Lens' DateTime (Maybe Text) +dtTimeZoneId + = lens _dtTimeZoneId (\ s a -> s{_dtTimeZoneId = a}) + +instance FromJSON DateTime where + parseJSON + = withObject "DateTime" + (\ o -> + DateTime <$> + (o .:? "second") <*> (o .:? "day") <*> (o .:? "year") + <*> (o .:? "hour") + <*> (o .:? "month") + <*> (o .:? "minute") + <*> (o .:? "timeZoneId")) + +instance ToJSON DateTime where + toJSON DateTime{..} + = object + (catMaybes + [("second" .=) <$> _dtSecond, ("day" .=) <$> _dtDay, + ("year" .=) <$> _dtYear, ("hour" .=) <$> _dtHour, + ("month" .=) <$> _dtMonth, + ("minute" .=) <$> _dtMinute, + ("timeZoneId" .=) <$> _dtTimeZoneId]) + +-- +-- /See:/ 'dealTermsGuaranteedFixedPriceTerms' smart constructor. +data DealTermsGuaranteedFixedPriceTerms = DealTermsGuaranteedFixedPriceTerms + { _dtgfptGuaranteedLooks :: !(Maybe Int64) + , _dtgfptGuaranteedImpressions :: !(Maybe Int64) + , _dtgfptFixedPrices :: !(Maybe [Maybe PricePerBuyer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealTermsGuaranteedFixedPriceTerms' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtgfptGuaranteedLooks' +-- +-- * 'dtgfptGuaranteedImpressions' +-- +-- * 'dtgfptFixedPrices' +dealTermsGuaranteedFixedPriceTerms + :: DealTermsGuaranteedFixedPriceTerms +dealTermsGuaranteedFixedPriceTerms = + DealTermsGuaranteedFixedPriceTerms + { _dtgfptGuaranteedLooks = Nothing + , _dtgfptGuaranteedImpressions = Nothing + , _dtgfptFixedPrices = Nothing + } + +-- | Count of guaranteed looks. Required for deal, optional for offer. +dtgfptGuaranteedLooks :: Lens' DealTermsGuaranteedFixedPriceTerms (Maybe Int64) +dtgfptGuaranteedLooks + = lens _dtgfptGuaranteedLooks + (\ s a -> s{_dtgfptGuaranteedLooks = a}) + +-- | Guaranteed impressions as a percentage. This is the percentage of +-- guaranteed looks that the buyer is guaranteeing to buy. +dtgfptGuaranteedImpressions :: Lens' DealTermsGuaranteedFixedPriceTerms (Maybe Int64) +dtgfptGuaranteedImpressions + = lens _dtgfptGuaranteedImpressions + (\ s a -> s{_dtgfptGuaranteedImpressions = a}) + +-- | Fixed price for the specified buyer. +dtgfptFixedPrices :: Lens' DealTermsGuaranteedFixedPriceTerms [Maybe PricePerBuyer] +dtgfptFixedPrices + = lens _dtgfptFixedPrices + (\ s a -> s{_dtgfptFixedPrices = a}) + . _Default + . _Coerce + +instance FromJSON DealTermsGuaranteedFixedPriceTerms + where + parseJSON + = withObject "DealTermsGuaranteedFixedPriceTerms" + (\ o -> + DealTermsGuaranteedFixedPriceTerms <$> + (o .:? "guaranteedLooks") <*> + (o .:? "guaranteedImpressions") + <*> (o .:? "fixedPrices" .!= mempty)) + +instance ToJSON DealTermsGuaranteedFixedPriceTerms + where + toJSON DealTermsGuaranteedFixedPriceTerms{..} + = object + (catMaybes + [("guaranteedLooks" .=) <$> _dtgfptGuaranteedLooks, + ("guaranteedImpressions" .=) <$> + _dtgfptGuaranteedImpressions, + ("fixedPrices" .=) <$> _dtgfptFixedPrices]) + +-- | Represents an order in the marketplace. An order is the unit of +-- negotiation between a seller and a buyer and contains deals which are +-- served. Each field in an order can have one of the following setting: +-- (readonly) - It is an error to try and set this field. (buyer-readonly) +-- - Only the seller can set this field. (seller-readonly) - Only the buyer +-- can set this field. (updatable) - The field is updatable at all times by +-- either buyer or the seller. +-- +-- /See:/ 'marketplaceOrder' smart constructor. +data MarketplaceOrder = MarketplaceOrder + { _mBuyerPrivateData :: !(Maybe (Maybe PrivateData)) + , _mIsSetupComplete :: !(Maybe Bool) + , _mBuyerContacts :: !(Maybe [Maybe ContactInformation]) + , _mKind :: !Text + , _mOriginatorRole :: !(Maybe Text) + , _mRevisionNumber :: !(Maybe Int64) + , _mBilledBuyer :: !(Maybe (Maybe Buyer)) + , _mIsRenegotiating :: !(Maybe Bool) + , _mHasSellerSignedOff :: !(Maybe Bool) + , _mSeller :: !(Maybe (Maybe Seller)) + , _mOrderState :: !(Maybe Text) + , _mName :: !(Maybe Text) + , _mSellerContacts :: !(Maybe [Maybe ContactInformation]) + , _mLastUpdaterRole :: !(Maybe Text) + , _mLabels :: !(Maybe [Maybe MarketplaceLabel]) + , _mRevisionTimeMs :: !(Maybe Int64) + , _mOrderId :: !(Maybe Text) + , _mLastUpdaterOrCommentorRole :: !(Maybe Text) + , _mHasBuyerSignedOff :: !(Maybe Bool) + , _mBuyer :: !(Maybe (Maybe Buyer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceOrder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mBuyerPrivateData' +-- +-- * 'mIsSetupComplete' +-- +-- * 'mBuyerContacts' +-- +-- * 'mKind' +-- +-- * 'mOriginatorRole' +-- +-- * 'mRevisionNumber' +-- +-- * 'mBilledBuyer' +-- +-- * 'mIsRenegotiating' +-- +-- * 'mHasSellerSignedOff' +-- +-- * 'mSeller' +-- +-- * 'mOrderState' +-- +-- * 'mName' +-- +-- * 'mSellerContacts' +-- +-- * 'mLastUpdaterRole' +-- +-- * 'mLabels' +-- +-- * 'mRevisionTimeMs' +-- +-- * 'mOrderId' +-- +-- * 'mLastUpdaterOrCommentorRole' +-- +-- * 'mHasBuyerSignedOff' +-- +-- * 'mBuyer' +marketplaceOrder + :: MarketplaceOrder +marketplaceOrder = + MarketplaceOrder + { _mBuyerPrivateData = Nothing + , _mIsSetupComplete = Nothing + , _mBuyerContacts = Nothing + , _mKind = "adexchangebuyer#marketplaceOrder" + , _mOriginatorRole = Nothing + , _mRevisionNumber = Nothing + , _mBilledBuyer = Nothing + , _mIsRenegotiating = Nothing + , _mHasSellerSignedOff = Nothing + , _mSeller = Nothing + , _mOrderState = Nothing + , _mName = Nothing + , _mSellerContacts = Nothing + , _mLastUpdaterRole = Nothing + , _mLabels = Nothing + , _mRevisionTimeMs = Nothing + , _mOrderId = Nothing + , _mLastUpdaterOrCommentorRole = Nothing + , _mHasBuyerSignedOff = Nothing + , _mBuyer = Nothing + } + +-- | Private data for buyer. (hidden from seller). +mBuyerPrivateData :: Lens' MarketplaceOrder (Maybe (Maybe PrivateData)) +mBuyerPrivateData + = lens _mBuyerPrivateData + (\ s a -> s{_mBuyerPrivateData = a}) + +-- | True, if the buyside inventory setup is complete for this order. +-- (readonly) +mIsSetupComplete :: Lens' MarketplaceOrder (Maybe Bool) +mIsSetupComplete + = lens _mIsSetupComplete + (\ s a -> s{_mIsSetupComplete = a}) + +-- | Optional contact information fort the buyer. (seller-readonly) +mBuyerContacts :: Lens' MarketplaceOrder [Maybe ContactInformation] +mBuyerContacts + = lens _mBuyerContacts + (\ s a -> s{_mBuyerContacts = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"adexchangebuyer#marketplaceOrder\". +mKind :: Lens' MarketplaceOrder Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | Indicates whether the buyer\/seller created the offer.(readonly) +mOriginatorRole :: Lens' MarketplaceOrder (Maybe Text) +mOriginatorRole + = lens _mOriginatorRole + (\ s a -> s{_mOriginatorRole = a}) + +-- | The revision number for the order (readonly). +mRevisionNumber :: Lens' MarketplaceOrder (Maybe Int64) +mRevisionNumber + = lens _mRevisionNumber + (\ s a -> s{_mRevisionNumber = a}) + +-- | Reference to the buyer that will get billed for this order. (readonly) +mBilledBuyer :: Lens' MarketplaceOrder (Maybe (Maybe Buyer)) +mBilledBuyer + = lens _mBilledBuyer (\ s a -> s{_mBilledBuyer = a}) + +-- | True if the order is being renegotiated (readonly). +mIsRenegotiating :: Lens' MarketplaceOrder (Maybe Bool) +mIsRenegotiating + = lens _mIsRenegotiating + (\ s a -> s{_mIsRenegotiating = a}) + +-- | When an order is in an accepted state, indicates whether the buyer has +-- signed off Once both sides have signed off on a deal, the order can be +-- finalized by the seller. (buyer-readonly) +mHasSellerSignedOff :: Lens' MarketplaceOrder (Maybe Bool) +mHasSellerSignedOff + = lens _mHasSellerSignedOff + (\ s a -> s{_mHasSellerSignedOff = a}) + +-- | Reference to the seller on the order. (readonly, except on create) +mSeller :: Lens' MarketplaceOrder (Maybe (Maybe Seller)) +mSeller = lens _mSeller (\ s a -> s{_mSeller = a}) + +-- | The current state of the order. (readonly) +mOrderState :: Lens' MarketplaceOrder (Maybe Text) +mOrderState + = lens _mOrderState (\ s a -> s{_mOrderState = a}) + +-- | The name for the order (updatable) +mName :: Lens' MarketplaceOrder (Maybe Text) +mName = lens _mName (\ s a -> s{_mName = a}) + +-- | Optional contact information for the seller (buyer-readonly). +mSellerContacts :: Lens' MarketplaceOrder [Maybe ContactInformation] +mSellerContacts + = lens _mSellerContacts + (\ s a -> s{_mSellerContacts = a}) + . _Default + . _Coerce + +mLastUpdaterRole :: Lens' MarketplaceOrder (Maybe Text) +mLastUpdaterRole + = lens _mLastUpdaterRole + (\ s a -> s{_mLastUpdaterRole = a}) + +-- | List of labels associated with the order. (readonly) +mLabels :: Lens' MarketplaceOrder [Maybe MarketplaceLabel] +mLabels + = lens _mLabels (\ s a -> s{_mLabels = a}) . _Default + . _Coerce + +-- | The time (ms since epoch) when the order was last revised (readonly). +mRevisionTimeMs :: Lens' MarketplaceOrder (Maybe Int64) +mRevisionTimeMs + = lens _mRevisionTimeMs + (\ s a -> s{_mRevisionTimeMs = a}) + +-- | The unique id of the order. (readonly). +mOrderId :: Lens' MarketplaceOrder (Maybe Text) +mOrderId = lens _mOrderId (\ s a -> s{_mOrderId = a}) + +-- | The role of the last user that either updated the order or left a +-- comment. (readonly) +mLastUpdaterOrCommentorRole :: Lens' MarketplaceOrder (Maybe Text) +mLastUpdaterOrCommentorRole + = lens _mLastUpdaterOrCommentorRole + (\ s a -> s{_mLastUpdaterOrCommentorRole = a}) + +-- | When an order is in an accepted state, indicates whether the buyer has +-- signed off Once both sides have signed off on a deal, the order can be +-- finalized by the seller. (seller-readonly) +mHasBuyerSignedOff :: Lens' MarketplaceOrder (Maybe Bool) +mHasBuyerSignedOff + = lens _mHasBuyerSignedOff + (\ s a -> s{_mHasBuyerSignedOff = a}) + +-- | Reference to the buyer on the order. (readonly, except on create) +mBuyer :: Lens' MarketplaceOrder (Maybe (Maybe Buyer)) +mBuyer = lens _mBuyer (\ s a -> s{_mBuyer = a}) + +instance FromJSON MarketplaceOrder where + parseJSON + = withObject "MarketplaceOrder" + (\ o -> + MarketplaceOrder <$> + (o .:? "buyerPrivateData") <*> + (o .:? "isSetupComplete") + <*> (o .:? "buyerContacts" .!= mempty) + <*> + (o .:? "kind" .!= "adexchangebuyer#marketplaceOrder") + <*> (o .:? "originatorRole") + <*> (o .:? "revisionNumber") + <*> (o .:? "billedBuyer") + <*> (o .:? "isRenegotiating") + <*> (o .:? "hasSellerSignedOff") + <*> (o .:? "seller") + <*> (o .:? "orderState") + <*> (o .:? "name") + <*> (o .:? "sellerContacts" .!= mempty) + <*> (o .:? "lastUpdaterRole") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "revisionTimeMs") + <*> (o .:? "orderId") + <*> (o .:? "lastUpdaterOrCommentorRole") + <*> (o .:? "hasBuyerSignedOff") + <*> (o .:? "buyer")) + +instance ToJSON MarketplaceOrder where + toJSON MarketplaceOrder{..} + = object + (catMaybes + [("buyerPrivateData" .=) <$> _mBuyerPrivateData, + ("isSetupComplete" .=) <$> _mIsSetupComplete, + ("buyerContacts" .=) <$> _mBuyerContacts, + Just ("kind" .= _mKind), + ("originatorRole" .=) <$> _mOriginatorRole, + ("revisionNumber" .=) <$> _mRevisionNumber, + ("billedBuyer" .=) <$> _mBilledBuyer, + ("isRenegotiating" .=) <$> _mIsRenegotiating, + ("hasSellerSignedOff" .=) <$> _mHasSellerSignedOff, + ("seller" .=) <$> _mSeller, + ("orderState" .=) <$> _mOrderState, + ("name" .=) <$> _mName, + ("sellerContacts" .=) <$> _mSellerContacts, + ("lastUpdaterRole" .=) <$> _mLastUpdaterRole, + ("labels" .=) <$> _mLabels, + ("revisionTimeMs" .=) <$> _mRevisionTimeMs, + ("orderId" .=) <$> _mOrderId, + ("lastUpdaterOrCommentorRole" .=) <$> + _mLastUpdaterOrCommentorRole, + ("hasBuyerSignedOff" .=) <$> _mHasBuyerSignedOff, + ("buyer" .=) <$> _mBuyer]) + +-- +-- /See:/ 'addOrderDealsRequest' smart constructor. +data AddOrderDealsRequest = AddOrderDealsRequest + { _aUpdateAction :: !(Maybe Text) + , _aDeals :: !(Maybe [Maybe MarketplaceDeal]) + , _aOrderRevisionNumber :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddOrderDealsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aUpdateAction' +-- +-- * 'aDeals' +-- +-- * 'aOrderRevisionNumber' +addOrderDealsRequest + :: AddOrderDealsRequest +addOrderDealsRequest = + AddOrderDealsRequest + { _aUpdateAction = Nothing + , _aDeals = Nothing + , _aOrderRevisionNumber = Nothing + } + +-- | Indicates an optional action to take on the order +aUpdateAction :: Lens' AddOrderDealsRequest (Maybe Text) +aUpdateAction + = lens _aUpdateAction + (\ s a -> s{_aUpdateAction = a}) + +-- | The list of deals to add +aDeals :: Lens' AddOrderDealsRequest [Maybe MarketplaceDeal] +aDeals + = lens _aDeals (\ s a -> s{_aDeals = a}) . _Default . + _Coerce + +-- | The last known order revision number. +aOrderRevisionNumber :: Lens' AddOrderDealsRequest (Maybe Int64) +aOrderRevisionNumber + = lens _aOrderRevisionNumber + (\ s a -> s{_aOrderRevisionNumber = a}) + +instance FromJSON AddOrderDealsRequest where + parseJSON + = withObject "AddOrderDealsRequest" + (\ o -> + AddOrderDealsRequest <$> + (o .:? "updateAction") <*> (o .:? "deals" .!= mempty) + <*> (o .:? "orderRevisionNumber")) + +instance ToJSON AddOrderDealsRequest where + toJSON AddOrderDealsRequest{..} + = object + (catMaybes + [("updateAction" .=) <$> _aUpdateAction, + ("deals" .=) <$> _aDeals, + ("orderRevisionNumber" .=) <$> + _aOrderRevisionNumber]) + +-- +-- /See:/ 'dealTerms' smart constructor. +data DealTerms = DealTerms + { _dtNonGuaranteedFixedPriceTerms :: !(Maybe (Maybe DealTermsNonGuaranteedFixedPriceTerms)) + , _dtNonGuaranteedAuctionTerms :: !(Maybe (Maybe DealTermsNonGuaranteedAuctionTerms)) + , _dtGuaranteedFixedPriceTerms :: !(Maybe (Maybe DealTermsGuaranteedFixedPriceTerms)) + , _dtDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealTerms' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtNonGuaranteedFixedPriceTerms' +-- +-- * 'dtNonGuaranteedAuctionTerms' +-- +-- * 'dtGuaranteedFixedPriceTerms' +-- +-- * 'dtDescription' +dealTerms + :: DealTerms +dealTerms = + DealTerms + { _dtNonGuaranteedFixedPriceTerms = Nothing + , _dtNonGuaranteedAuctionTerms = Nothing + , _dtGuaranteedFixedPriceTerms = Nothing + , _dtDescription = Nothing + } + +-- | The terms for non-guaranteed fixed price deals. +dtNonGuaranteedFixedPriceTerms :: Lens' DealTerms (Maybe (Maybe DealTermsNonGuaranteedFixedPriceTerms)) +dtNonGuaranteedFixedPriceTerms + = lens _dtNonGuaranteedFixedPriceTerms + (\ s a -> s{_dtNonGuaranteedFixedPriceTerms = a}) + +-- | The terms for non-guaranteed auction deals. +dtNonGuaranteedAuctionTerms :: Lens' DealTerms (Maybe (Maybe DealTermsNonGuaranteedAuctionTerms)) +dtNonGuaranteedAuctionTerms + = lens _dtNonGuaranteedAuctionTerms + (\ s a -> s{_dtNonGuaranteedAuctionTerms = a}) + +-- | The terms for guaranteed fixed price deals. +dtGuaranteedFixedPriceTerms :: Lens' DealTerms (Maybe (Maybe DealTermsGuaranteedFixedPriceTerms)) +dtGuaranteedFixedPriceTerms + = lens _dtGuaranteedFixedPriceTerms + (\ s a -> s{_dtGuaranteedFixedPriceTerms = a}) + +-- | Description for the proposed terms of the deal. +dtDescription :: Lens' DealTerms (Maybe Text) +dtDescription + = lens _dtDescription + (\ s a -> s{_dtDescription = a}) + +instance FromJSON DealTerms where + parseJSON + = withObject "DealTerms" + (\ o -> + DealTerms <$> + (o .:? "nonGuaranteedFixedPriceTerms") <*> + (o .:? "nonGuaranteedAuctionTerms") + <*> (o .:? "guaranteedFixedPriceTerms") + <*> (o .:? "description")) + +instance ToJSON DealTerms where + toJSON DealTerms{..} + = object + (catMaybes + [("nonGuaranteedFixedPriceTerms" .=) <$> + _dtNonGuaranteedFixedPriceTerms, + ("nonGuaranteedAuctionTerms" .=) <$> + _dtNonGuaranteedAuctionTerms, + ("guaranteedFixedPriceTerms" .=) <$> + _dtGuaranteedFixedPriceTerms, + ("description" .=) <$> _dtDescription]) + +-- +-- /See:/ 'editHistoryDto' smart constructor. +data EditHistoryDto = EditHistoryDto + { _ehdLastUpdatedByLoginName :: !(Maybe Text) + , _ehdCreatedByLoginName :: !(Maybe Text) + , _ehdLastUpdateTimeStamp :: !(Maybe Int64) + , _ehdCreatedTimeStamp :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditHistoryDto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ehdLastUpdatedByLoginName' +-- +-- * 'ehdCreatedByLoginName' +-- +-- * 'ehdLastUpdateTimeStamp' +-- +-- * 'ehdCreatedTimeStamp' +editHistoryDto + :: EditHistoryDto +editHistoryDto = + EditHistoryDto + { _ehdLastUpdatedByLoginName = Nothing + , _ehdCreatedByLoginName = Nothing + , _ehdLastUpdateTimeStamp = Nothing + , _ehdCreatedTimeStamp = Nothing + } + +ehdLastUpdatedByLoginName :: Lens' EditHistoryDto (Maybe Text) +ehdLastUpdatedByLoginName + = lens _ehdLastUpdatedByLoginName + (\ s a -> s{_ehdLastUpdatedByLoginName = a}) + +ehdCreatedByLoginName :: Lens' EditHistoryDto (Maybe Text) +ehdCreatedByLoginName + = lens _ehdCreatedByLoginName + (\ s a -> s{_ehdCreatedByLoginName = a}) + +ehdLastUpdateTimeStamp :: Lens' EditHistoryDto (Maybe Int64) +ehdLastUpdateTimeStamp + = lens _ehdLastUpdateTimeStamp + (\ s a -> s{_ehdLastUpdateTimeStamp = a}) + +ehdCreatedTimeStamp :: Lens' EditHistoryDto (Maybe Int64) +ehdCreatedTimeStamp + = lens _ehdCreatedTimeStamp + (\ s a -> s{_ehdCreatedTimeStamp = a}) + +instance FromJSON EditHistoryDto where + parseJSON + = withObject "EditHistoryDto" + (\ o -> + EditHistoryDto <$> + (o .:? "lastUpdatedByLoginName") <*> + (o .:? "createdByLoginName") + <*> (o .:? "lastUpdateTimeStamp") + <*> (o .:? "createdTimeStamp")) + +instance ToJSON EditHistoryDto where + toJSON EditHistoryDto{..} + = object + (catMaybes + [("lastUpdatedByLoginName" .=) <$> + _ehdLastUpdatedByLoginName, + ("createdByLoginName" .=) <$> _ehdCreatedByLoginName, + ("lastUpdateTimeStamp" .=) <$> + _ehdLastUpdateTimeStamp, + ("createdTimeStamp" .=) <$> _ehdCreatedTimeStamp]) diff --git a/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Sum.hs b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Sum.hs new file mode 100644 index 000000000..ea6d52b79 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeBuyer.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeBuyer.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Get.hs new file mode 100644 index 000000000..3648c0765 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one account by ID. +-- +-- /See:/ for @AdexchangebuyerAccountsGet@. +module AdExchangeBuyer.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agKey + , agId + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "accounts" :> + Capture "id" Int32 :> Get '[JSON] Account + +-- | Gets one account by ID. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agKey :: !(Maybe Text) + , _agId :: !Int32 + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agKey' +-- +-- * 'agId' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +accountsGet + :: Int32 -- ^ 'id' + -> AccountsGet +accountsGet pAgId_ = + AccountsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agKey = Nothing + , _agId = pAgId_ + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AccountsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AccountsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AccountsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AccountsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | The account id +agId :: Lens' AccountsGet' Int32 +agId = lens _agId (\ s a -> s{_agId = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AccountsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AccountsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AccountsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u AccountsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp _agKey + _agId + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/List.hs new file mode 100644 index 000000000..90526511a --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the authenticated user\'s list of accounts. +-- +-- /See:/ for @AdexchangebuyerAccountsList@. +module AdExchangeBuyer.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alOauthToken + , alFields + , alAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "accounts" :> Get '[JSON] AccountsList + +-- | Retrieves the authenticated user\'s list of accounts. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alOauthToken' +-- +-- * 'alFields' +-- +-- * 'alAlt' +accountsList + :: AccountsList +accountsList = + AccountsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alOauthToken = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AccountsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AccountsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AccountsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AccountsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AccountsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AccountsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AccountsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = AccountsList + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u AccountsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alOauthToken + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Patch.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Patch.hs new file mode 100644 index 000000000..a6403518d --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Patch.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Accounts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account. This method supports patch semantics. +-- +-- /See:/ for @AdexchangebuyerAccountsPatch@. +module AdExchangeBuyer.Accounts.Patch + ( + -- * REST Resource + AccountsPatchAPI + + -- * Creating a Request + , accountsPatch + , AccountsPatch + + -- * Request Lenses + , apQuotaUser + , apPrettyPrint + , apUserIp + , apKey + , apId + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerAccountsPatch@ which the +-- 'AccountsPatch' request conforms to. +type AccountsPatchAPI = + "accounts" :> + Capture "id" Int32 :> Patch '[JSON] Account + +-- | Updates an existing account. This method supports patch semantics. +-- +-- /See:/ 'accountsPatch' smart constructor. +data AccountsPatch = AccountsPatch + { _apQuotaUser :: !(Maybe Text) + , _apPrettyPrint :: !Bool + , _apUserIp :: !(Maybe Text) + , _apKey :: !(Maybe Text) + , _apId :: !Int32 + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apPrettyPrint' +-- +-- * 'apUserIp' +-- +-- * 'apKey' +-- +-- * 'apId' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +accountsPatch + :: Int32 -- ^ 'id' + -> AccountsPatch +accountsPatch pApId_ = + AccountsPatch + { _apQuotaUser = Nothing + , _apPrettyPrint = True + , _apUserIp = Nothing + , _apKey = Nothing + , _apId = pApId_ + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' AccountsPatch' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' AccountsPatch' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' AccountsPatch' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' AccountsPatch' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | The account id +apId :: Lens' AccountsPatch' Int32 +apId = lens _apId (\ s a -> s{_apId = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' AccountsPatch' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' AccountsPatch' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' AccountsPatch' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest AccountsPatch' where + type Rs AccountsPatch' = Account + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u AccountsPatch{..} + = go _apQuotaUser _apPrettyPrint _apUserIp _apKey + _apId + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsPatchAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Update.hs new file mode 100644 index 000000000..db11004b9 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Accounts/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Accounts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account. +-- +-- /See:/ for @AdexchangebuyerAccountsUpdate@. +module AdExchangeBuyer.Accounts.Update + ( + -- * REST Resource + AccountsUpdateAPI + + -- * Creating a Request + , accountsUpdate + , AccountsUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auUserIp + , auKey + , auId + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerAccountsUpdate@ which the +-- 'AccountsUpdate' request conforms to. +type AccountsUpdateAPI = + "accounts" :> + Capture "id" Int32 :> Put '[JSON] Account + +-- | Updates an existing account. +-- +-- /See:/ 'accountsUpdate' smart constructor. +data AccountsUpdate = AccountsUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auUserIp :: !(Maybe Text) + , _auKey :: !(Maybe Text) + , _auId :: !Int32 + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auUserIp' +-- +-- * 'auKey' +-- +-- * 'auId' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +accountsUpdate + :: Int32 -- ^ 'id' + -> AccountsUpdate +accountsUpdate pAuId_ = + AccountsUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auUserIp = Nothing + , _auKey = Nothing + , _auId = pAuId_ + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AccountsUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AccountsUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AccountsUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AccountsUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | The account id +auId :: Lens' AccountsUpdate' Int32 +auId = lens _auId (\ s a -> s{_auId = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AccountsUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AccountsUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AccountsUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AccountsUpdate' where + type Rs AccountsUpdate' = Account + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u AccountsUpdate{..} + = go _auQuotaUser _auPrettyPrint _auUserIp _auKey + _auId + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsUpdateAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/Get.hs new file mode 100644 index 000000000..9094dcce1 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.BillingInfo.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the billing information for one account specified by account ID. +-- +-- /See:/ for @AdexchangebuyerBillingInfoGet@. +module AdExchangeBuyer.BillingInfo.Get + ( + -- * REST Resource + BillingInfoGetAPI + + -- * Creating a Request + , billingInfoGet + , BillingInfoGet + + -- * Request Lenses + , bigQuotaUser + , bigPrettyPrint + , bigUserIp + , bigAccountId + , bigKey + , bigOauthToken + , bigFields + , bigAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerBillingInfoGet@ which the +-- 'BillingInfoGet' request conforms to. +type BillingInfoGetAPI = + "billinginfo" :> + Capture "accountId" Int32 :> Get '[JSON] BillingInfo + +-- | Returns the billing information for one account specified by account ID. +-- +-- /See:/ 'billingInfoGet' smart constructor. +data BillingInfoGet = BillingInfoGet + { _bigQuotaUser :: !(Maybe Text) + , _bigPrettyPrint :: !Bool + , _bigUserIp :: !(Maybe Text) + , _bigAccountId :: !Int32 + , _bigKey :: !(Maybe Text) + , _bigOauthToken :: !(Maybe Text) + , _bigFields :: !(Maybe Text) + , _bigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingInfoGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bigQuotaUser' +-- +-- * 'bigPrettyPrint' +-- +-- * 'bigUserIp' +-- +-- * 'bigAccountId' +-- +-- * 'bigKey' +-- +-- * 'bigOauthToken' +-- +-- * 'bigFields' +-- +-- * 'bigAlt' +billingInfoGet + :: Int32 -- ^ 'accountId' + -> BillingInfoGet +billingInfoGet pBigAccountId_ = + BillingInfoGet + { _bigQuotaUser = Nothing + , _bigPrettyPrint = True + , _bigUserIp = Nothing + , _bigAccountId = pBigAccountId_ + , _bigKey = Nothing + , _bigOauthToken = Nothing + , _bigFields = Nothing + , _bigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bigQuotaUser :: Lens' BillingInfoGet' (Maybe Text) +bigQuotaUser + = lens _bigQuotaUser (\ s a -> s{_bigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bigPrettyPrint :: Lens' BillingInfoGet' Bool +bigPrettyPrint + = lens _bigPrettyPrint + (\ s a -> s{_bigPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bigUserIp :: Lens' BillingInfoGet' (Maybe Text) +bigUserIp + = lens _bigUserIp (\ s a -> s{_bigUserIp = a}) + +-- | The account id. +bigAccountId :: Lens' BillingInfoGet' Int32 +bigAccountId + = lens _bigAccountId (\ s a -> s{_bigAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bigKey :: Lens' BillingInfoGet' (Maybe Text) +bigKey = lens _bigKey (\ s a -> s{_bigKey = a}) + +-- | OAuth 2.0 token for the current user. +bigOauthToken :: Lens' BillingInfoGet' (Maybe Text) +bigOauthToken + = lens _bigOauthToken + (\ s a -> s{_bigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bigFields :: Lens' BillingInfoGet' (Maybe Text) +bigFields + = lens _bigFields (\ s a -> s{_bigFields = a}) + +-- | Data format for the response. +bigAlt :: Lens' BillingInfoGet' Text +bigAlt = lens _bigAlt (\ s a -> s{_bigAlt = a}) + +instance GoogleRequest BillingInfoGet' where + type Rs BillingInfoGet' = BillingInfo + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u BillingInfoGet{..} + = go _bigQuotaUser _bigPrettyPrint _bigUserIp + _bigAccountId + _bigKey + _bigOauthToken + _bigFields + _bigAlt + where go + = clientWithRoute (Proxy :: Proxy BillingInfoGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/List.hs new file mode 100644 index 000000000..4680b9957 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/BillingInfo/List.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.BillingInfo.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of billing information for all accounts of the +-- authenticated user. +-- +-- /See:/ for @AdexchangebuyerBillingInfoList@. +module AdExchangeBuyer.BillingInfo.List + ( + -- * REST Resource + BillingInfoListAPI + + -- * Creating a Request + , billingInfoList + , BillingInfoList + + -- * Request Lenses + , bilQuotaUser + , bilPrettyPrint + , bilUserIp + , bilKey + , bilOauthToken + , bilFields + , bilAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerBillingInfoList@ which the +-- 'BillingInfoList' request conforms to. +type BillingInfoListAPI = + "billinginfo" :> Get '[JSON] BillingInfoList + +-- | Retrieves a list of billing information for all accounts of the +-- authenticated user. +-- +-- /See:/ 'billingInfoList' smart constructor. +data BillingInfoList = BillingInfoList + { _bilQuotaUser :: !(Maybe Text) + , _bilPrettyPrint :: !Bool + , _bilUserIp :: !(Maybe Text) + , _bilKey :: !(Maybe Text) + , _bilOauthToken :: !(Maybe Text) + , _bilFields :: !(Maybe Text) + , _bilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingInfoList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bilQuotaUser' +-- +-- * 'bilPrettyPrint' +-- +-- * 'bilUserIp' +-- +-- * 'bilKey' +-- +-- * 'bilOauthToken' +-- +-- * 'bilFields' +-- +-- * 'bilAlt' +billingInfoList + :: BillingInfoList +billingInfoList = + BillingInfoList + { _bilQuotaUser = Nothing + , _bilPrettyPrint = True + , _bilUserIp = Nothing + , _bilKey = Nothing + , _bilOauthToken = Nothing + , _bilFields = Nothing + , _bilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bilQuotaUser :: Lens' BillingInfoList' (Maybe Text) +bilQuotaUser + = lens _bilQuotaUser (\ s a -> s{_bilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bilPrettyPrint :: Lens' BillingInfoList' Bool +bilPrettyPrint + = lens _bilPrettyPrint + (\ s a -> s{_bilPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bilUserIp :: Lens' BillingInfoList' (Maybe Text) +bilUserIp + = lens _bilUserIp (\ s a -> s{_bilUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bilKey :: Lens' BillingInfoList' (Maybe Text) +bilKey = lens _bilKey (\ s a -> s{_bilKey = a}) + +-- | OAuth 2.0 token for the current user. +bilOauthToken :: Lens' BillingInfoList' (Maybe Text) +bilOauthToken + = lens _bilOauthToken + (\ s a -> s{_bilOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bilFields :: Lens' BillingInfoList' (Maybe Text) +bilFields + = lens _bilFields (\ s a -> s{_bilFields = a}) + +-- | Data format for the response. +bilAlt :: Lens' BillingInfoList' Text +bilAlt = lens _bilAlt (\ s a -> s{_bilAlt = a}) + +instance GoogleRequest BillingInfoList' where + type Rs BillingInfoList' = BillingInfoList + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u BillingInfoList{..} + = go _bilQuotaUser _bilPrettyPrint _bilUserIp _bilKey + _bilOauthToken + _bilFields + _bilAlt + where go + = clientWithRoute (Proxy :: Proxy BillingInfoListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Get.hs new file mode 100644 index 000000000..a2c4cfe80 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Budget.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the budget information for the adgroup specified by the +-- accountId and billingId. +-- +-- /See:/ for @AdexchangebuyerBudgetGet@. +module AdExchangeBuyer.Budget.Get + ( + -- * REST Resource + BudgetGetAPI + + -- * Creating a Request + , budgetGet + , BudgetGet + + -- * Request Lenses + , bgQuotaUser + , bgPrettyPrint + , bgUserIp + , bgAccountId + , bgKey + , bgOauthToken + , bgBillingId + , bgFields + , bgAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerBudgetGet@ which the +-- 'BudgetGet' request conforms to. +type BudgetGetAPI = + "billinginfo" :> + Capture "accountId" Int64 :> + Capture "billingId" Int64 :> Get '[JSON] Budget + +-- | Returns the budget information for the adgroup specified by the +-- accountId and billingId. +-- +-- /See:/ 'budgetGet' smart constructor. +data BudgetGet = BudgetGet + { _bgQuotaUser :: !(Maybe Text) + , _bgPrettyPrint :: !Bool + , _bgUserIp :: !(Maybe Text) + , _bgAccountId :: !Int64 + , _bgKey :: !(Maybe Text) + , _bgOauthToken :: !(Maybe Text) + , _bgBillingId :: !Int64 + , _bgFields :: !(Maybe Text) + , _bgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BudgetGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgQuotaUser' +-- +-- * 'bgPrettyPrint' +-- +-- * 'bgUserIp' +-- +-- * 'bgAccountId' +-- +-- * 'bgKey' +-- +-- * 'bgOauthToken' +-- +-- * 'bgBillingId' +-- +-- * 'bgFields' +-- +-- * 'bgAlt' +budgetGet + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'billingId' + -> BudgetGet +budgetGet pBgAccountId_ pBgBillingId_ = + BudgetGet + { _bgQuotaUser = Nothing + , _bgPrettyPrint = True + , _bgUserIp = Nothing + , _bgAccountId = pBgAccountId_ + , _bgKey = Nothing + , _bgOauthToken = Nothing + , _bgBillingId = pBgBillingId_ + , _bgFields = Nothing + , _bgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bgQuotaUser :: Lens' BudgetGet' (Maybe Text) +bgQuotaUser + = lens _bgQuotaUser (\ s a -> s{_bgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bgPrettyPrint :: Lens' BudgetGet' Bool +bgPrettyPrint + = lens _bgPrettyPrint + (\ s a -> s{_bgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bgUserIp :: Lens' BudgetGet' (Maybe Text) +bgUserIp = lens _bgUserIp (\ s a -> s{_bgUserIp = a}) + +-- | The account id to get the budget information for. +bgAccountId :: Lens' BudgetGet' Int64 +bgAccountId + = lens _bgAccountId (\ s a -> s{_bgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgKey :: Lens' BudgetGet' (Maybe Text) +bgKey = lens _bgKey (\ s a -> s{_bgKey = a}) + +-- | OAuth 2.0 token for the current user. +bgOauthToken :: Lens' BudgetGet' (Maybe Text) +bgOauthToken + = lens _bgOauthToken (\ s a -> s{_bgOauthToken = a}) + +-- | The billing id to get the budget information for. +bgBillingId :: Lens' BudgetGet' Int64 +bgBillingId + = lens _bgBillingId (\ s a -> s{_bgBillingId = a}) + +-- | Selector specifying which fields to include in a partial response. +bgFields :: Lens' BudgetGet' (Maybe Text) +bgFields = lens _bgFields (\ s a -> s{_bgFields = a}) + +-- | Data format for the response. +bgAlt :: Lens' BudgetGet' Text +bgAlt = lens _bgAlt (\ s a -> s{_bgAlt = a}) + +instance GoogleRequest BudgetGet' where + type Rs BudgetGet' = Budget + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u BudgetGet{..} + = go _bgQuotaUser _bgPrettyPrint _bgUserIp + _bgAccountId + _bgKey + _bgOauthToken + _bgBillingId + _bgFields + _bgAlt + where go + = clientWithRoute (Proxy :: Proxy BudgetGetAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Patch.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Patch.hs new file mode 100644 index 000000000..1eceb4056 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Patch.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Budget.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the budget amount for the budget of the adgroup specified by the +-- accountId and billingId, with the budget amount in the request. This +-- method supports patch semantics. +-- +-- /See:/ for @AdexchangebuyerBudgetPatch@. +module AdExchangeBuyer.Budget.Patch + ( + -- * REST Resource + BudgetPatchAPI + + -- * Creating a Request + , budgetPatch + , BudgetPatch + + -- * Request Lenses + , bpQuotaUser + , bpPrettyPrint + , bpUserIp + , bpAccountId + , bpKey + , bpOauthToken + , bpBillingId + , bpFields + , bpAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerBudgetPatch@ which the +-- 'BudgetPatch' request conforms to. +type BudgetPatchAPI = + "billinginfo" :> + Capture "accountId" Int64 :> + Capture "billingId" Int64 :> Patch '[JSON] Budget + +-- | Updates the budget amount for the budget of the adgroup specified by the +-- accountId and billingId, with the budget amount in the request. This +-- method supports patch semantics. +-- +-- /See:/ 'budgetPatch' smart constructor. +data BudgetPatch = BudgetPatch + { _bpQuotaUser :: !(Maybe Text) + , _bpPrettyPrint :: !Bool + , _bpUserIp :: !(Maybe Text) + , _bpAccountId :: !Int64 + , _bpKey :: !(Maybe Text) + , _bpOauthToken :: !(Maybe Text) + , _bpBillingId :: !Int64 + , _bpFields :: !(Maybe Text) + , _bpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BudgetPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bpQuotaUser' +-- +-- * 'bpPrettyPrint' +-- +-- * 'bpUserIp' +-- +-- * 'bpAccountId' +-- +-- * 'bpKey' +-- +-- * 'bpOauthToken' +-- +-- * 'bpBillingId' +-- +-- * 'bpFields' +-- +-- * 'bpAlt' +budgetPatch + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'billingId' + -> BudgetPatch +budgetPatch pBpAccountId_ pBpBillingId_ = + BudgetPatch + { _bpQuotaUser = Nothing + , _bpPrettyPrint = True + , _bpUserIp = Nothing + , _bpAccountId = pBpAccountId_ + , _bpKey = Nothing + , _bpOauthToken = Nothing + , _bpBillingId = pBpBillingId_ + , _bpFields = Nothing + , _bpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bpQuotaUser :: Lens' BudgetPatch' (Maybe Text) +bpQuotaUser + = lens _bpQuotaUser (\ s a -> s{_bpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bpPrettyPrint :: Lens' BudgetPatch' Bool +bpPrettyPrint + = lens _bpPrettyPrint + (\ s a -> s{_bpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bpUserIp :: Lens' BudgetPatch' (Maybe Text) +bpUserIp = lens _bpUserIp (\ s a -> s{_bpUserIp = a}) + +-- | The account id associated with the budget being updated. +bpAccountId :: Lens' BudgetPatch' Int64 +bpAccountId + = lens _bpAccountId (\ s a -> s{_bpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bpKey :: Lens' BudgetPatch' (Maybe Text) +bpKey = lens _bpKey (\ s a -> s{_bpKey = a}) + +-- | OAuth 2.0 token for the current user. +bpOauthToken :: Lens' BudgetPatch' (Maybe Text) +bpOauthToken + = lens _bpOauthToken (\ s a -> s{_bpOauthToken = a}) + +-- | The billing id associated with the budget being updated. +bpBillingId :: Lens' BudgetPatch' Int64 +bpBillingId + = lens _bpBillingId (\ s a -> s{_bpBillingId = a}) + +-- | Selector specifying which fields to include in a partial response. +bpFields :: Lens' BudgetPatch' (Maybe Text) +bpFields = lens _bpFields (\ s a -> s{_bpFields = a}) + +-- | Data format for the response. +bpAlt :: Lens' BudgetPatch' Text +bpAlt = lens _bpAlt (\ s a -> s{_bpAlt = a}) + +instance GoogleRequest BudgetPatch' where + type Rs BudgetPatch' = Budget + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u BudgetPatch{..} + = go _bpQuotaUser _bpPrettyPrint _bpUserIp + _bpAccountId + _bpKey + _bpOauthToken + _bpBillingId + _bpFields + _bpAlt + where go + = clientWithRoute (Proxy :: Proxy BudgetPatchAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Update.hs new file mode 100644 index 000000000..b9a9ed566 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Budget/Update.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Budget.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the budget amount for the budget of the adgroup specified by the +-- accountId and billingId, with the budget amount in the request. +-- +-- /See:/ for @AdexchangebuyerBudgetUpdate@. +module AdExchangeBuyer.Budget.Update + ( + -- * REST Resource + BudgetUpdateAPI + + -- * Creating a Request + , budgetUpdate + , BudgetUpdate + + -- * Request Lenses + , buQuotaUser + , buPrettyPrint + , buUserIp + , buAccountId + , buKey + , buOauthToken + , buBillingId + , buFields + , buAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerBudgetUpdate@ which the +-- 'BudgetUpdate' request conforms to. +type BudgetUpdateAPI = + "billinginfo" :> + Capture "accountId" Int64 :> + Capture "billingId" Int64 :> Put '[JSON] Budget + +-- | Updates the budget amount for the budget of the adgroup specified by the +-- accountId and billingId, with the budget amount in the request. +-- +-- /See:/ 'budgetUpdate' smart constructor. +data BudgetUpdate = BudgetUpdate + { _buQuotaUser :: !(Maybe Text) + , _buPrettyPrint :: !Bool + , _buUserIp :: !(Maybe Text) + , _buAccountId :: !Int64 + , _buKey :: !(Maybe Text) + , _buOauthToken :: !(Maybe Text) + , _buBillingId :: !Int64 + , _buFields :: !(Maybe Text) + , _buAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BudgetUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buQuotaUser' +-- +-- * 'buPrettyPrint' +-- +-- * 'buUserIp' +-- +-- * 'buAccountId' +-- +-- * 'buKey' +-- +-- * 'buOauthToken' +-- +-- * 'buBillingId' +-- +-- * 'buFields' +-- +-- * 'buAlt' +budgetUpdate + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'billingId' + -> BudgetUpdate +budgetUpdate pBuAccountId_ pBuBillingId_ = + BudgetUpdate + { _buQuotaUser = Nothing + , _buPrettyPrint = True + , _buUserIp = Nothing + , _buAccountId = pBuAccountId_ + , _buKey = Nothing + , _buOauthToken = Nothing + , _buBillingId = pBuBillingId_ + , _buFields = Nothing + , _buAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +buQuotaUser :: Lens' BudgetUpdate' (Maybe Text) +buQuotaUser + = lens _buQuotaUser (\ s a -> s{_buQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +buPrettyPrint :: Lens' BudgetUpdate' Bool +buPrettyPrint + = lens _buPrettyPrint + (\ s a -> s{_buPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +buUserIp :: Lens' BudgetUpdate' (Maybe Text) +buUserIp = lens _buUserIp (\ s a -> s{_buUserIp = a}) + +-- | The account id associated with the budget being updated. +buAccountId :: Lens' BudgetUpdate' Int64 +buAccountId + = lens _buAccountId (\ s a -> s{_buAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +buKey :: Lens' BudgetUpdate' (Maybe Text) +buKey = lens _buKey (\ s a -> s{_buKey = a}) + +-- | OAuth 2.0 token for the current user. +buOauthToken :: Lens' BudgetUpdate' (Maybe Text) +buOauthToken + = lens _buOauthToken (\ s a -> s{_buOauthToken = a}) + +-- | The billing id associated with the budget being updated. +buBillingId :: Lens' BudgetUpdate' Int64 +buBillingId + = lens _buBillingId (\ s a -> s{_buBillingId = a}) + +-- | Selector specifying which fields to include in a partial response. +buFields :: Lens' BudgetUpdate' (Maybe Text) +buFields = lens _buFields (\ s a -> s{_buFields = a}) + +-- | Data format for the response. +buAlt :: Lens' BudgetUpdate' Text +buAlt = lens _buAlt (\ s a -> s{_buAlt = a}) + +instance GoogleRequest BudgetUpdate' where + type Rs BudgetUpdate' = Budget + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u BudgetUpdate{..} + = go _buQuotaUser _buPrettyPrint _buUserIp + _buAccountId + _buKey + _buOauthToken + _buBillingId + _buFields + _buAlt + where go + = clientWithRoute (Proxy :: Proxy BudgetUpdateAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Delete.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Delete.hs new file mode 100644 index 000000000..f5376e5f4 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Delete.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessDelete@. +module AdExchangeBuyer.Clientaccess.Delete + ( + -- * REST Resource + ClientaccessDeleteAPI + + -- * Creating a Request + , clientaccessDelete + , ClientaccessDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdSponsorAccountId + , cdKey + , cdClientAccountId + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessDelete@ which the +-- 'ClientaccessDelete' request conforms to. +type ClientaccessDeleteAPI = + "clientAccess" :> + Capture "clientAccountId" Int64 :> + QueryParam "sponsorAccountId" Int32 :> + Delete '[JSON] () + +-- +-- /See:/ 'clientaccessDelete' smart constructor. +data ClientaccessDelete = ClientaccessDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdSponsorAccountId :: !Int32 + , _cdKey :: !(Maybe Text) + , _cdClientAccountId :: !Int64 + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdSponsorAccountId' +-- +-- * 'cdKey' +-- +-- * 'cdClientAccountId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +clientaccessDelete + :: Int32 -- ^ 'sponsorAccountId' + -> Int64 -- ^ 'clientAccountId' + -> ClientaccessDelete +clientaccessDelete pCdSponsorAccountId_ pCdClientAccountId_ = + ClientaccessDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdSponsorAccountId = pCdSponsorAccountId_ + , _cdKey = Nothing + , _cdClientAccountId = pCdClientAccountId_ + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' ClientaccessDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' ClientaccessDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' ClientaccessDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +cdSponsorAccountId :: Lens' ClientaccessDelete' Int32 +cdSponsorAccountId + = lens _cdSponsorAccountId + (\ s a -> s{_cdSponsorAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' ClientaccessDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +cdClientAccountId :: Lens' ClientaccessDelete' Int64 +cdClientAccountId + = lens _cdClientAccountId + (\ s a -> s{_cdClientAccountId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' ClientaccessDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' ClientaccessDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' ClientaccessDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest ClientaccessDelete' where + type Rs ClientaccessDelete' = () + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp + (Just _cdSponsorAccountId) + _cdKey + _cdClientAccountId + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientaccessDeleteAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Get.hs new file mode 100644 index 000000000..95fb067e1 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessGet@. +module AdExchangeBuyer.Clientaccess.Get + ( + -- * REST Resource + ClientaccessGetAPI + + -- * Creating a Request + , clientaccessGet + , ClientaccessGet + + -- * Request Lenses + , cggQuotaUser + , cggPrettyPrint + , cggUserIp + , cggSponsorAccountId + , cggKey + , cggClientAccountId + , cggOauthToken + , cggFields + , cggAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessGet@ which the +-- 'ClientaccessGet' request conforms to. +type ClientaccessGetAPI = + "clientAccess" :> + Capture "clientAccountId" Int64 :> + QueryParam "sponsorAccountId" Int32 :> + Get '[JSON] ClientAccessCapabilities + +-- +-- /See:/ 'clientaccessGet' smart constructor. +data ClientaccessGet = ClientaccessGet + { _cggQuotaUser :: !(Maybe Text) + , _cggPrettyPrint :: !Bool + , _cggUserIp :: !(Maybe Text) + , _cggSponsorAccountId :: !Int32 + , _cggKey :: !(Maybe Text) + , _cggClientAccountId :: !Int64 + , _cggOauthToken :: !(Maybe Text) + , _cggFields :: !(Maybe Text) + , _cggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cggQuotaUser' +-- +-- * 'cggPrettyPrint' +-- +-- * 'cggUserIp' +-- +-- * 'cggSponsorAccountId' +-- +-- * 'cggKey' +-- +-- * 'cggClientAccountId' +-- +-- * 'cggOauthToken' +-- +-- * 'cggFields' +-- +-- * 'cggAlt' +clientaccessGet + :: Int32 -- ^ 'sponsorAccountId' + -> Int64 -- ^ 'clientAccountId' + -> ClientaccessGet +clientaccessGet pCggSponsorAccountId_ pCggClientAccountId_ = + ClientaccessGet + { _cggQuotaUser = Nothing + , _cggPrettyPrint = True + , _cggUserIp = Nothing + , _cggSponsorAccountId = pCggSponsorAccountId_ + , _cggKey = Nothing + , _cggClientAccountId = pCggClientAccountId_ + , _cggOauthToken = Nothing + , _cggFields = Nothing + , _cggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cggQuotaUser :: Lens' ClientaccessGet' (Maybe Text) +cggQuotaUser + = lens _cggQuotaUser (\ s a -> s{_cggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cggPrettyPrint :: Lens' ClientaccessGet' Bool +cggPrettyPrint + = lens _cggPrettyPrint + (\ s a -> s{_cggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cggUserIp :: Lens' ClientaccessGet' (Maybe Text) +cggUserIp + = lens _cggUserIp (\ s a -> s{_cggUserIp = a}) + +cggSponsorAccountId :: Lens' ClientaccessGet' Int32 +cggSponsorAccountId + = lens _cggSponsorAccountId + (\ s a -> s{_cggSponsorAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cggKey :: Lens' ClientaccessGet' (Maybe Text) +cggKey = lens _cggKey (\ s a -> s{_cggKey = a}) + +cggClientAccountId :: Lens' ClientaccessGet' Int64 +cggClientAccountId + = lens _cggClientAccountId + (\ s a -> s{_cggClientAccountId = a}) + +-- | OAuth 2.0 token for the current user. +cggOauthToken :: Lens' ClientaccessGet' (Maybe Text) +cggOauthToken + = lens _cggOauthToken + (\ s a -> s{_cggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cggFields :: Lens' ClientaccessGet' (Maybe Text) +cggFields + = lens _cggFields (\ s a -> s{_cggFields = a}) + +-- | Data format for the response. +cggAlt :: Lens' ClientaccessGet' Text +cggAlt = lens _cggAlt (\ s a -> s{_cggAlt = a}) + +instance GoogleRequest ClientaccessGet' where + type Rs ClientaccessGet' = ClientAccessCapabilities + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessGet{..} + = go _cggQuotaUser _cggPrettyPrint _cggUserIp + (Just _cggSponsorAccountId) + _cggKey + _cggClientAccountId + _cggOauthToken + _cggFields + _cggAlt + where go + = clientWithRoute (Proxy :: Proxy ClientaccessGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Insert.hs new file mode 100644 index 000000000..388062d60 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Insert.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessInsert@. +module AdExchangeBuyer.Clientaccess.Insert + ( + -- * REST Resource + ClientaccessInsertAPI + + -- * Creating a Request + , clientaccessInsert + , ClientaccessInsert + + -- * Request Lenses + , cQuotaUser + , cPrettyPrint + , cUserIp + , cSponsorAccountId + , cKey + , cClientAccountId + , cOauthToken + , cFields + , cAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessInsert@ which the +-- 'ClientaccessInsert' request conforms to. +type ClientaccessInsertAPI = + "clientAccess" :> + QueryParam "sponsorAccountId" Int32 :> + QueryParam "clientAccountId" Int64 :> + Post '[JSON] ClientAccessCapabilities + +-- +-- /See:/ 'clientaccessInsert' smart constructor. +data ClientaccessInsert = ClientaccessInsert + { _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cUserIp :: !(Maybe Text) + , _cSponsorAccountId :: !(Maybe Int32) + , _cKey :: !(Maybe Text) + , _cClientAccountId :: !(Maybe Int64) + , _cOauthToken :: !(Maybe Text) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cUserIp' +-- +-- * 'cSponsorAccountId' +-- +-- * 'cKey' +-- +-- * 'cClientAccountId' +-- +-- * 'cOauthToken' +-- +-- * 'cFields' +-- +-- * 'cAlt' +clientaccessInsert + :: ClientaccessInsert +clientaccessInsert = + ClientaccessInsert + { _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cUserIp = Nothing + , _cSponsorAccountId = Nothing + , _cKey = Nothing + , _cClientAccountId = Nothing + , _cOauthToken = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' ClientaccessInsert' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' ClientaccessInsert' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' ClientaccessInsert' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +cSponsorAccountId :: Lens' ClientaccessInsert' (Maybe Int32) +cSponsorAccountId + = lens _cSponsorAccountId + (\ s a -> s{_cSponsorAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' ClientaccessInsert' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +cClientAccountId :: Lens' ClientaccessInsert' (Maybe Int64) +cClientAccountId + = lens _cClientAccountId + (\ s a -> s{_cClientAccountId = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' ClientaccessInsert' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' ClientaccessInsert' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' ClientaccessInsert' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest ClientaccessInsert' where + type Rs ClientaccessInsert' = + ClientAccessCapabilities + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessInsert{..} + = go _cQuotaUser _cPrettyPrint _cUserIp + _cSponsorAccountId + _cKey + _cClientAccountId + _cOauthToken + _cFields + _cAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientaccessInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/List.hs new file mode 100644 index 000000000..3ba4a0741 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/List.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessList@. +module AdExchangeBuyer.Clientaccess.List + ( + -- * REST Resource + ClientaccessListAPI + + -- * Creating a Request + , clientaccessList + , ClientaccessList + + -- * Request Lenses + , cliQuotaUser + , cliPrettyPrint + , cliUserIp + , cliKey + , cliOauthToken + , cliFields + , cliAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessList@ which the +-- 'ClientaccessList' request conforms to. +type ClientaccessListAPI = + "clientAccess" :> + Get '[JSON] ListClientAccessCapabilitiesResponse + +-- +-- /See:/ 'clientaccessList' smart constructor. +data ClientaccessList = ClientaccessList + { _cliQuotaUser :: !(Maybe Text) + , _cliPrettyPrint :: !Bool + , _cliUserIp :: !(Maybe Text) + , _cliKey :: !(Maybe Text) + , _cliOauthToken :: !(Maybe Text) + , _cliFields :: !(Maybe Text) + , _cliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cliQuotaUser' +-- +-- * 'cliPrettyPrint' +-- +-- * 'cliUserIp' +-- +-- * 'cliKey' +-- +-- * 'cliOauthToken' +-- +-- * 'cliFields' +-- +-- * 'cliAlt' +clientaccessList + :: ClientaccessList +clientaccessList = + ClientaccessList + { _cliQuotaUser = Nothing + , _cliPrettyPrint = True + , _cliUserIp = Nothing + , _cliKey = Nothing + , _cliOauthToken = Nothing + , _cliFields = Nothing + , _cliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cliQuotaUser :: Lens' ClientaccessList' (Maybe Text) +cliQuotaUser + = lens _cliQuotaUser (\ s a -> s{_cliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cliPrettyPrint :: Lens' ClientaccessList' Bool +cliPrettyPrint + = lens _cliPrettyPrint + (\ s a -> s{_cliPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cliUserIp :: Lens' ClientaccessList' (Maybe Text) +cliUserIp + = lens _cliUserIp (\ s a -> s{_cliUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cliKey :: Lens' ClientaccessList' (Maybe Text) +cliKey = lens _cliKey (\ s a -> s{_cliKey = a}) + +-- | OAuth 2.0 token for the current user. +cliOauthToken :: Lens' ClientaccessList' (Maybe Text) +cliOauthToken + = lens _cliOauthToken + (\ s a -> s{_cliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cliFields :: Lens' ClientaccessList' (Maybe Text) +cliFields + = lens _cliFields (\ s a -> s{_cliFields = a}) + +-- | Data format for the response. +cliAlt :: Lens' ClientaccessList' Text +cliAlt = lens _cliAlt (\ s a -> s{_cliAlt = a}) + +instance GoogleRequest ClientaccessList' where + type Rs ClientaccessList' = + ListClientAccessCapabilitiesResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessList{..} + = go _cliQuotaUser _cliPrettyPrint _cliUserIp _cliKey + _cliOauthToken + _cliFields + _cliAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientaccessListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Patch.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Patch.hs new file mode 100644 index 000000000..3ba0bb09a --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Patch.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessPatch@. +module AdExchangeBuyer.Clientaccess.Patch + ( + -- * REST Resource + ClientaccessPatchAPI + + -- * Creating a Request + , clientaccessPatch + , ClientaccessPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpSponsorAccountId + , cpKey + , cpClientAccountId + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessPatch@ which the +-- 'ClientaccessPatch' request conforms to. +type ClientaccessPatchAPI = + "clientAccess" :> + Capture "clientAccountId" Int64 :> + QueryParam "sponsorAccountId" Int32 :> + Patch '[JSON] ClientAccessCapabilities + +-- +-- /See:/ 'clientaccessPatch' smart constructor. +data ClientaccessPatch = ClientaccessPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpSponsorAccountId :: !Int32 + , _cpKey :: !(Maybe Text) + , _cpClientAccountId :: !Int64 + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpSponsorAccountId' +-- +-- * 'cpKey' +-- +-- * 'cpClientAccountId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +clientaccessPatch + :: Int32 -- ^ 'sponsorAccountId' + -> Int64 -- ^ 'clientAccountId' + -> ClientaccessPatch +clientaccessPatch pCpSponsorAccountId_ pCpClientAccountId_ = + ClientaccessPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpSponsorAccountId = pCpSponsorAccountId_ + , _cpKey = Nothing + , _cpClientAccountId = pCpClientAccountId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' ClientaccessPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' ClientaccessPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' ClientaccessPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +cpSponsorAccountId :: Lens' ClientaccessPatch' Int32 +cpSponsorAccountId + = lens _cpSponsorAccountId + (\ s a -> s{_cpSponsorAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' ClientaccessPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +cpClientAccountId :: Lens' ClientaccessPatch' Int64 +cpClientAccountId + = lens _cpClientAccountId + (\ s a -> s{_cpClientAccountId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' ClientaccessPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' ClientaccessPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' ClientaccessPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest ClientaccessPatch' where + type Rs ClientaccessPatch' = ClientAccessCapabilities + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp + (Just _cpSponsorAccountId) + _cpKey + _cpClientAccountId + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientaccessPatchAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Update.hs new file mode 100644 index 000000000..66b6a8e5e --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Clientaccess/Update.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Clientaccess.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AdexchangebuyerClientaccessUpdate@. +module AdExchangeBuyer.Clientaccess.Update + ( + -- * REST Resource + ClientaccessUpdateAPI + + -- * Creating a Request + , clientaccessUpdate + , ClientaccessUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuSponsorAccountId + , cuKey + , cuClientAccountId + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerClientaccessUpdate@ which the +-- 'ClientaccessUpdate' request conforms to. +type ClientaccessUpdateAPI = + "clientAccess" :> + Capture "clientAccountId" Int64 :> + QueryParam "sponsorAccountId" Int32 :> + Put '[JSON] ClientAccessCapabilities + +-- +-- /See:/ 'clientaccessUpdate' smart constructor. +data ClientaccessUpdate = ClientaccessUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuSponsorAccountId :: !Int32 + , _cuKey :: !(Maybe Text) + , _cuClientAccountId :: !Int64 + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientaccessUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuSponsorAccountId' +-- +-- * 'cuKey' +-- +-- * 'cuClientAccountId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +clientaccessUpdate + :: Int32 -- ^ 'sponsorAccountId' + -> Int64 -- ^ 'clientAccountId' + -> ClientaccessUpdate +clientaccessUpdate pCuSponsorAccountId_ pCuClientAccountId_ = + ClientaccessUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuSponsorAccountId = pCuSponsorAccountId_ + , _cuKey = Nothing + , _cuClientAccountId = pCuClientAccountId_ + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' ClientaccessUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' ClientaccessUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' ClientaccessUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +cuSponsorAccountId :: Lens' ClientaccessUpdate' Int32 +cuSponsorAccountId + = lens _cuSponsorAccountId + (\ s a -> s{_cuSponsorAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' ClientaccessUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +cuClientAccountId :: Lens' ClientaccessUpdate' Int64 +cuClientAccountId + = lens _cuClientAccountId + (\ s a -> s{_cuClientAccountId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' ClientaccessUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' ClientaccessUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' ClientaccessUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest ClientaccessUpdate' where + type Rs ClientaccessUpdate' = + ClientAccessCapabilities + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u ClientaccessUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp + (Just _cuSponsorAccountId) + _cuKey + _cuClientAccountId + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientaccessUpdateAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Get.hs new file mode 100644 index 000000000..3a5a33e53 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Creatives.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the status for a single creative. A creative will be available +-- 30-40 minutes after submission. +-- +-- /See:/ for @AdexchangebuyerCreativesGet@. +module AdExchangeBuyer.Creatives.Get + ( + -- * REST Resource + CreativesGetAPI + + -- * Creating a Request + , creativesGet + , CreativesGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgBuyerCreativeId + , cgUserIp + , cgAccountId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerCreativesGet@ which the +-- 'CreativesGet' request conforms to. +type CreativesGetAPI = + "creatives" :> + Capture "accountId" Int32 :> + Capture "buyerCreativeId" Text :> + Get '[JSON] Creative + +-- | Gets the status for a single creative. A creative will be available +-- 30-40 minutes after submission. +-- +-- /See:/ 'creativesGet' smart constructor. +data CreativesGet = CreativesGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgBuyerCreativeId :: !Text + , _cgUserIp :: !(Maybe Text) + , _cgAccountId :: !Int32 + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgBuyerCreativeId' +-- +-- * 'cgUserIp' +-- +-- * 'cgAccountId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +creativesGet + :: Text -- ^ 'buyerCreativeId' + -> Int32 -- ^ 'accountId' + -> CreativesGet +creativesGet pCgBuyerCreativeId_ pCgAccountId_ = + CreativesGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgBuyerCreativeId = pCgBuyerCreativeId_ + , _cgUserIp = Nothing + , _cgAccountId = pCgAccountId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CreativesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CreativesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | The buyer-specific id for this creative. +cgBuyerCreativeId :: Lens' CreativesGet' Text +cgBuyerCreativeId + = lens _cgBuyerCreativeId + (\ s a -> s{_cgBuyerCreativeId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CreativesGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | The id for the account that will serve this creative. +cgAccountId :: Lens' CreativesGet' Int32 +cgAccountId + = lens _cgAccountId (\ s a -> s{_cgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CreativesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CreativesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CreativesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CreativesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CreativesGet' where + type Rs CreativesGet' = Creative + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u CreativesGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgBuyerCreativeId + _cgUserIp + _cgAccountId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesGetAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Insert.hs new file mode 100644 index 000000000..84723a28e --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Creatives.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submit a new creative. +-- +-- /See:/ for @AdexchangebuyerCreativesInsert@. +module AdExchangeBuyer.Creatives.Insert + ( + -- * REST Resource + CreativesInsertAPI + + -- * Creating a Request + , creativesInsert + , CreativesInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerCreativesInsert@ which the +-- 'CreativesInsert' request conforms to. +type CreativesInsertAPI = + "creatives" :> Post '[JSON] Creative + +-- | Submit a new creative. +-- +-- /See:/ 'creativesInsert' smart constructor. +data CreativesInsert = CreativesInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +creativesInsert + :: CreativesInsert +creativesInsert = + CreativesInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CreativesInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CreativesInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CreativesInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CreativesInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CreativesInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CreativesInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CreativesInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CreativesInsert' where + type Rs CreativesInsert' = Creative + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u CreativesInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/List.hs new file mode 100644 index 000000000..40ebdaf0c --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Creatives/List.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Creatives.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of the authenticated user\'s active creatives. A +-- creative will be available 30-40 minutes after submission. +-- +-- /See:/ for @AdexchangebuyerCreativesList@. +module AdExchangeBuyer.Creatives.List + ( + -- * REST Resource + CreativesListAPI + + -- * Creating a Request + , creativesList + , CreativesList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clBuyerCreativeId + , clUserIp + , clOpenAuctionStatusFilter + , clAccountId + , clKey + , clPageToken + , clDealsStatusFilter + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerCreativesList@ which the +-- 'CreativesList' request conforms to. +type CreativesListAPI = + "creatives" :> + QueryParams "buyerCreativeId" Text :> + QueryParam "openAuctionStatusFilter" Text :> + QueryParams "accountId" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "dealsStatusFilter" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CreativesList + +-- | Retrieves a list of the authenticated user\'s active creatives. A +-- creative will be available 30-40 minutes after submission. +-- +-- /See:/ 'creativesList' smart constructor. +data CreativesList = CreativesList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clBuyerCreativeId :: !(Maybe Text) + , _clUserIp :: !(Maybe Text) + , _clOpenAuctionStatusFilter :: !(Maybe Text) + , _clAccountId :: !(Maybe Int32) + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clDealsStatusFilter :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !(Maybe Word32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clBuyerCreativeId' +-- +-- * 'clUserIp' +-- +-- * 'clOpenAuctionStatusFilter' +-- +-- * 'clAccountId' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clDealsStatusFilter' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +creativesList + :: CreativesList +creativesList = + CreativesList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clBuyerCreativeId = Nothing + , _clUserIp = Nothing + , _clOpenAuctionStatusFilter = Nothing + , _clAccountId = Nothing + , _clKey = Nothing + , _clPageToken = Nothing + , _clDealsStatusFilter = Nothing + , _clOauthToken = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CreativesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CreativesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | When specified, only creatives for the given buyer creative ids are +-- returned. +clBuyerCreativeId :: Lens' CreativesList' (Maybe Text) +clBuyerCreativeId + = lens _clBuyerCreativeId + (\ s a -> s{_clBuyerCreativeId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CreativesList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | When specified, only creatives having the given open auction status are +-- returned. +clOpenAuctionStatusFilter :: Lens' CreativesList' (Maybe Text) +clOpenAuctionStatusFilter + = lens _clOpenAuctionStatusFilter + (\ s a -> s{_clOpenAuctionStatusFilter = a}) + +-- | When specified, only creatives for the given account ids are returned. +clAccountId :: Lens' CreativesList' (Maybe Int32) +clAccountId + = lens _clAccountId (\ s a -> s{_clAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CreativesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. Optional. +clPageToken :: Lens' CreativesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | When specified, only creatives having the given direct deals status are +-- returned. +clDealsStatusFilter :: Lens' CreativesList' (Maybe Text) +clDealsStatusFilter + = lens _clDealsStatusFilter + (\ s a -> s{_clDealsStatusFilter = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CreativesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Maximum number of entries returned on one result page. If not set, the +-- default is 100. Optional. +clMaxResults :: Lens' CreativesList' (Maybe Word32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CreativesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CreativesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CreativesList' where + type Rs CreativesList' = CreativesList + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u CreativesList{..} + = go _clQuotaUser _clPrettyPrint _clBuyerCreativeId + _clUserIp + _clOpenAuctionStatusFilter + _clAccountId + _clKey + _clPageToken + _clDealsStatusFilter + _clOauthToken + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesListAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Deals/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Deals/Get.hs new file mode 100644 index 000000000..15594015b --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Deals/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Deals.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the requested deal. +-- +-- /See:/ for @AdexchangebuyerDealsGet@. +module AdExchangeBuyer.Deals.Get + ( + -- * REST Resource + DealsGetAPI + + -- * Creating a Request + , dealsGet + , DealsGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgUserIp + , dgDealId + , dgKey + , dgOauthToken + , dgFields + , dgAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerDealsGet@ which the +-- 'DealsGet' request conforms to. +type DealsGetAPI = + "deals" :> + Capture "dealId" Int64 :> Get '[JSON] NegotiationDto + +-- | Gets the requested deal. +-- +-- /See:/ 'dealsGet' smart constructor. +data DealsGet = DealsGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgUserIp :: !(Maybe Text) + , _dgDealId :: !Int64 + , _dgKey :: !(Maybe Text) + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DealsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgUserIp' +-- +-- * 'dgDealId' +-- +-- * 'dgKey' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +dealsGet + :: Int64 -- ^ 'dealId' + -> DealsGet +dealsGet pDgDealId_ = + DealsGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgUserIp = Nothing + , _dgDealId = pDgDealId_ + , _dgKey = Nothing + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DealsGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DealsGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DealsGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +dgDealId :: Lens' DealsGet' Int64 +dgDealId = lens _dgDealId (\ s a -> s{_dgDealId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DealsGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DealsGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DealsGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DealsGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +instance GoogleRequest DealsGet' where + type Rs DealsGet' = NegotiationDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u DealsGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgUserIp _dgDealId + _dgKey + _dgOauthToken + _dgFields + _dgAlt + where go + = clientWithRoute (Proxy :: Proxy DealsGetAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Delete.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Delete.hs new file mode 100644 index 000000000..3f180f0b1 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Delete.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete the specified deals from the order +-- +-- /See:/ for @AdexchangebuyerMarketplacedealsDelete@. +module AdExchangeBuyer.Marketplacedeals.Delete + ( + -- * REST Resource + MarketplacedealsDeleteAPI + + -- * Creating a Request + , marketplacedealsDelete + , MarketplacedealsDelete + + -- * Request Lenses + , mddQuotaUser + , mddPrettyPrint + , mddUserIp + , mddKey + , mddOauthToken + , mddOrderId + , mddFields + , mddAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacedealsDelete@ which the +-- 'MarketplacedealsDelete' request conforms to. +type MarketplacedealsDeleteAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "deals" :> + "delete" :> Post '[JSON] DeleteOrderDealsResponse + +-- | Delete the specified deals from the order +-- +-- /See:/ 'marketplacedealsDelete' smart constructor. +data MarketplacedealsDelete = MarketplacedealsDelete + { _mddQuotaUser :: !(Maybe Text) + , _mddPrettyPrint :: !Bool + , _mddUserIp :: !(Maybe Text) + , _mddKey :: !(Maybe Text) + , _mddOauthToken :: !(Maybe Text) + , _mddOrderId :: !Text + , _mddFields :: !(Maybe Text) + , _mddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacedealsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mddQuotaUser' +-- +-- * 'mddPrettyPrint' +-- +-- * 'mddUserIp' +-- +-- * 'mddKey' +-- +-- * 'mddOauthToken' +-- +-- * 'mddOrderId' +-- +-- * 'mddFields' +-- +-- * 'mddAlt' +marketplacedealsDelete + :: Text -- ^ 'orderId' + -> MarketplacedealsDelete +marketplacedealsDelete pMddOrderId_ = + MarketplacedealsDelete + { _mddQuotaUser = Nothing + , _mddPrettyPrint = True + , _mddUserIp = Nothing + , _mddKey = Nothing + , _mddOauthToken = Nothing + , _mddOrderId = pMddOrderId_ + , _mddFields = Nothing + , _mddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mddQuotaUser :: Lens' MarketplacedealsDelete' (Maybe Text) +mddQuotaUser + = lens _mddQuotaUser (\ s a -> s{_mddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mddPrettyPrint :: Lens' MarketplacedealsDelete' Bool +mddPrettyPrint + = lens _mddPrettyPrint + (\ s a -> s{_mddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mddUserIp :: Lens' MarketplacedealsDelete' (Maybe Text) +mddUserIp + = lens _mddUserIp (\ s a -> s{_mddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mddKey :: Lens' MarketplacedealsDelete' (Maybe Text) +mddKey = lens _mddKey (\ s a -> s{_mddKey = a}) + +-- | OAuth 2.0 token for the current user. +mddOauthToken :: Lens' MarketplacedealsDelete' (Maybe Text) +mddOauthToken + = lens _mddOauthToken + (\ s a -> s{_mddOauthToken = a}) + +-- | The orderId to delete deals from. +mddOrderId :: Lens' MarketplacedealsDelete' Text +mddOrderId + = lens _mddOrderId (\ s a -> s{_mddOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +mddFields :: Lens' MarketplacedealsDelete' (Maybe Text) +mddFields + = lens _mddFields (\ s a -> s{_mddFields = a}) + +-- | Data format for the response. +mddAlt :: Lens' MarketplacedealsDelete' Text +mddAlt = lens _mddAlt (\ s a -> s{_mddAlt = a}) + +instance GoogleRequest MarketplacedealsDelete' where + type Rs MarketplacedealsDelete' = + DeleteOrderDealsResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacedealsDelete{..} + = go _mddQuotaUser _mddPrettyPrint _mddUserIp _mddKey + _mddOauthToken + _mddOrderId + _mddFields + _mddAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacedealsDeleteAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Insert.hs new file mode 100644 index 000000000..badb14779 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add new deals for the specified order +-- +-- /See:/ for @AdexchangebuyerMarketplacedealsInsert@. +module AdExchangeBuyer.Marketplacedeals.Insert + ( + -- * REST Resource + MarketplacedealsInsertAPI + + -- * Creating a Request + , marketplacedealsInsert + , MarketplacedealsInsert + + -- * Request Lenses + , miiQuotaUser + , miiPrettyPrint + , miiUserIp + , miiKey + , miiOauthToken + , miiOrderId + , miiFields + , miiAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacedealsInsert@ which the +-- 'MarketplacedealsInsert' request conforms to. +type MarketplacedealsInsertAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "deals" :> + "insert" :> Post '[JSON] AddOrderDealsResponse + +-- | Add new deals for the specified order +-- +-- /See:/ 'marketplacedealsInsert' smart constructor. +data MarketplacedealsInsert = MarketplacedealsInsert + { _miiQuotaUser :: !(Maybe Text) + , _miiPrettyPrint :: !Bool + , _miiUserIp :: !(Maybe Text) + , _miiKey :: !(Maybe Text) + , _miiOauthToken :: !(Maybe Text) + , _miiOrderId :: !Text + , _miiFields :: !(Maybe Text) + , _miiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacedealsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miiQuotaUser' +-- +-- * 'miiPrettyPrint' +-- +-- * 'miiUserIp' +-- +-- * 'miiKey' +-- +-- * 'miiOauthToken' +-- +-- * 'miiOrderId' +-- +-- * 'miiFields' +-- +-- * 'miiAlt' +marketplacedealsInsert + :: Text -- ^ 'orderId' + -> MarketplacedealsInsert +marketplacedealsInsert pMiiOrderId_ = + MarketplacedealsInsert + { _miiQuotaUser = Nothing + , _miiPrettyPrint = True + , _miiUserIp = Nothing + , _miiKey = Nothing + , _miiOauthToken = Nothing + , _miiOrderId = pMiiOrderId_ + , _miiFields = Nothing + , _miiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miiQuotaUser :: Lens' MarketplacedealsInsert' (Maybe Text) +miiQuotaUser + = lens _miiQuotaUser (\ s a -> s{_miiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miiPrettyPrint :: Lens' MarketplacedealsInsert' Bool +miiPrettyPrint + = lens _miiPrettyPrint + (\ s a -> s{_miiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miiUserIp :: Lens' MarketplacedealsInsert' (Maybe Text) +miiUserIp + = lens _miiUserIp (\ s a -> s{_miiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miiKey :: Lens' MarketplacedealsInsert' (Maybe Text) +miiKey = lens _miiKey (\ s a -> s{_miiKey = a}) + +-- | OAuth 2.0 token for the current user. +miiOauthToken :: Lens' MarketplacedealsInsert' (Maybe Text) +miiOauthToken + = lens _miiOauthToken + (\ s a -> s{_miiOauthToken = a}) + +-- | OrderId for which deals need to be added. +miiOrderId :: Lens' MarketplacedealsInsert' Text +miiOrderId + = lens _miiOrderId (\ s a -> s{_miiOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +miiFields :: Lens' MarketplacedealsInsert' (Maybe Text) +miiFields + = lens _miiFields (\ s a -> s{_miiFields = a}) + +-- | Data format for the response. +miiAlt :: Lens' MarketplacedealsInsert' Text +miiAlt = lens _miiAlt (\ s a -> s{_miiAlt = a}) + +instance GoogleRequest MarketplacedealsInsert' where + type Rs MarketplacedealsInsert' = + AddOrderDealsResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacedealsInsert{..} + = go _miiQuotaUser _miiPrettyPrint _miiUserIp _miiKey + _miiOauthToken + _miiOrderId + _miiFields + _miiAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacedealsInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/List.hs new file mode 100644 index 000000000..09fba17c0 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all the deals for a given order +-- +-- /See:/ for @AdexchangebuyerMarketplacedealsList@. +module AdExchangeBuyer.Marketplacedeals.List + ( + -- * REST Resource + MarketplacedealsListAPI + + -- * Creating a Request + , marketplacedealsList + , MarketplacedealsList + + -- * Request Lenses + , mllQuotaUser + , mllPrettyPrint + , mllUserIp + , mllKey + , mllOauthToken + , mllOrderId + , mllFields + , mllAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacedealsList@ which the +-- 'MarketplacedealsList' request conforms to. +type MarketplacedealsListAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "deals" :> Get '[JSON] GetOrderDealsResponse + +-- | List all the deals for a given order +-- +-- /See:/ 'marketplacedealsList' smart constructor. +data MarketplacedealsList = MarketplacedealsList + { _mllQuotaUser :: !(Maybe Text) + , _mllPrettyPrint :: !Bool + , _mllUserIp :: !(Maybe Text) + , _mllKey :: !(Maybe Text) + , _mllOauthToken :: !(Maybe Text) + , _mllOrderId :: !Text + , _mllFields :: !(Maybe Text) + , _mllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacedealsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mllQuotaUser' +-- +-- * 'mllPrettyPrint' +-- +-- * 'mllUserIp' +-- +-- * 'mllKey' +-- +-- * 'mllOauthToken' +-- +-- * 'mllOrderId' +-- +-- * 'mllFields' +-- +-- * 'mllAlt' +marketplacedealsList + :: Text -- ^ 'orderId' + -> MarketplacedealsList +marketplacedealsList pMllOrderId_ = + MarketplacedealsList + { _mllQuotaUser = Nothing + , _mllPrettyPrint = True + , _mllUserIp = Nothing + , _mllKey = Nothing + , _mllOauthToken = Nothing + , _mllOrderId = pMllOrderId_ + , _mllFields = Nothing + , _mllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mllQuotaUser :: Lens' MarketplacedealsList' (Maybe Text) +mllQuotaUser + = lens _mllQuotaUser (\ s a -> s{_mllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mllPrettyPrint :: Lens' MarketplacedealsList' Bool +mllPrettyPrint + = lens _mllPrettyPrint + (\ s a -> s{_mllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mllUserIp :: Lens' MarketplacedealsList' (Maybe Text) +mllUserIp + = lens _mllUserIp (\ s a -> s{_mllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mllKey :: Lens' MarketplacedealsList' (Maybe Text) +mllKey = lens _mllKey (\ s a -> s{_mllKey = a}) + +-- | OAuth 2.0 token for the current user. +mllOauthToken :: Lens' MarketplacedealsList' (Maybe Text) +mllOauthToken + = lens _mllOauthToken + (\ s a -> s{_mllOauthToken = a}) + +-- | The orderId to get deals for. +mllOrderId :: Lens' MarketplacedealsList' Text +mllOrderId + = lens _mllOrderId (\ s a -> s{_mllOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +mllFields :: Lens' MarketplacedealsList' (Maybe Text) +mllFields + = lens _mllFields (\ s a -> s{_mllFields = a}) + +-- | Data format for the response. +mllAlt :: Lens' MarketplacedealsList' Text +mllAlt = lens _mllAlt (\ s a -> s{_mllAlt = a}) + +instance GoogleRequest MarketplacedealsList' where + type Rs MarketplacedealsList' = GetOrderDealsResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacedealsList{..} + = go _mllQuotaUser _mllPrettyPrint _mllUserIp _mllKey + _mllOauthToken + _mllOrderId + _mllFields + _mllAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacedealsListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Update.hs new file mode 100644 index 000000000..2e2ff5a22 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacedeals/Update.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Replaces all the deals in the order with the passed in deals +-- +-- /See:/ for @AdexchangebuyerMarketplacedealsUpdate@. +module AdExchangeBuyer.Marketplacedeals.Update + ( + -- * REST Resource + MarketplacedealsUpdateAPI + + -- * Creating a Request + , marketplacedealsUpdate + , MarketplacedealsUpdate + + -- * Request Lenses + , muuQuotaUser + , muuPrettyPrint + , muuUserIp + , muuKey + , muuOauthToken + , muuOrderId + , muuFields + , muuAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacedealsUpdate@ which the +-- 'MarketplacedealsUpdate' request conforms to. +type MarketplacedealsUpdateAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "deals" :> + "update" :> Post '[JSON] EditAllOrderDealsResponse + +-- | Replaces all the deals in the order with the passed in deals +-- +-- /See:/ 'marketplacedealsUpdate' smart constructor. +data MarketplacedealsUpdate = MarketplacedealsUpdate + { _muuQuotaUser :: !(Maybe Text) + , _muuPrettyPrint :: !Bool + , _muuUserIp :: !(Maybe Text) + , _muuKey :: !(Maybe Text) + , _muuOauthToken :: !(Maybe Text) + , _muuOrderId :: !Text + , _muuFields :: !(Maybe Text) + , _muuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacedealsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muuQuotaUser' +-- +-- * 'muuPrettyPrint' +-- +-- * 'muuUserIp' +-- +-- * 'muuKey' +-- +-- * 'muuOauthToken' +-- +-- * 'muuOrderId' +-- +-- * 'muuFields' +-- +-- * 'muuAlt' +marketplacedealsUpdate + :: Text -- ^ 'orderId' + -> MarketplacedealsUpdate +marketplacedealsUpdate pMuuOrderId_ = + MarketplacedealsUpdate + { _muuQuotaUser = Nothing + , _muuPrettyPrint = True + , _muuUserIp = Nothing + , _muuKey = Nothing + , _muuOauthToken = Nothing + , _muuOrderId = pMuuOrderId_ + , _muuFields = Nothing + , _muuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muuQuotaUser :: Lens' MarketplacedealsUpdate' (Maybe Text) +muuQuotaUser + = lens _muuQuotaUser (\ s a -> s{_muuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +muuPrettyPrint :: Lens' MarketplacedealsUpdate' Bool +muuPrettyPrint + = lens _muuPrettyPrint + (\ s a -> s{_muuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muuUserIp :: Lens' MarketplacedealsUpdate' (Maybe Text) +muuUserIp + = lens _muuUserIp (\ s a -> s{_muuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muuKey :: Lens' MarketplacedealsUpdate' (Maybe Text) +muuKey = lens _muuKey (\ s a -> s{_muuKey = a}) + +-- | OAuth 2.0 token for the current user. +muuOauthToken :: Lens' MarketplacedealsUpdate' (Maybe Text) +muuOauthToken + = lens _muuOauthToken + (\ s a -> s{_muuOauthToken = a}) + +-- | The orderId to edit deals on. +muuOrderId :: Lens' MarketplacedealsUpdate' Text +muuOrderId + = lens _muuOrderId (\ s a -> s{_muuOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +muuFields :: Lens' MarketplacedealsUpdate' (Maybe Text) +muuFields + = lens _muuFields (\ s a -> s{_muuFields = a}) + +-- | Data format for the response. +muuAlt :: Lens' MarketplacedealsUpdate' Text +muuAlt = lens _muuAlt (\ s a -> s{_muuAlt = a}) + +instance GoogleRequest MarketplacedealsUpdate' where + type Rs MarketplacedealsUpdate' = + EditAllOrderDealsResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacedealsUpdate{..} + = go _muuQuotaUser _muuPrettyPrint _muuUserIp _muuKey + _muuOauthToken + _muuOrderId + _muuFields + _muuAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacedealsUpdateAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/Insert.hs new file mode 100644 index 000000000..e99de72e8 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/Insert.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add notes to the order +-- +-- /See:/ for @AdexchangebuyerMarketplacenotesInsert@. +module AdExchangeBuyer.Marketplacenotes.Insert + ( + -- * REST Resource + MarketplacenotesInsertAPI + + -- * Creating a Request + , marketplacenotesInsert + , MarketplacenotesInsert + + -- * Request Lenses + , miQuotaUser + , miPrettyPrint + , miUserIp + , miKey + , miOauthToken + , miOrderId + , miFields + , miAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacenotesInsert@ which the +-- 'MarketplacenotesInsert' request conforms to. +type MarketplacenotesInsertAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "notes" :> + "insert" :> Post '[JSON] AddOrderNotesResponse + +-- | Add notes to the order +-- +-- /See:/ 'marketplacenotesInsert' smart constructor. +data MarketplacenotesInsert = MarketplacenotesInsert + { _miQuotaUser :: !(Maybe Text) + , _miPrettyPrint :: !Bool + , _miUserIp :: !(Maybe Text) + , _miKey :: !(Maybe Text) + , _miOauthToken :: !(Maybe Text) + , _miOrderId :: !Text + , _miFields :: !(Maybe Text) + , _miAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacenotesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miQuotaUser' +-- +-- * 'miPrettyPrint' +-- +-- * 'miUserIp' +-- +-- * 'miKey' +-- +-- * 'miOauthToken' +-- +-- * 'miOrderId' +-- +-- * 'miFields' +-- +-- * 'miAlt' +marketplacenotesInsert + :: Text -- ^ 'orderId' + -> MarketplacenotesInsert +marketplacenotesInsert pMiOrderId_ = + MarketplacenotesInsert + { _miQuotaUser = Nothing + , _miPrettyPrint = True + , _miUserIp = Nothing + , _miKey = Nothing + , _miOauthToken = Nothing + , _miOrderId = pMiOrderId_ + , _miFields = Nothing + , _miAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miQuotaUser :: Lens' MarketplacenotesInsert' (Maybe Text) +miQuotaUser + = lens _miQuotaUser (\ s a -> s{_miQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miPrettyPrint :: Lens' MarketplacenotesInsert' Bool +miPrettyPrint + = lens _miPrettyPrint + (\ s a -> s{_miPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miUserIp :: Lens' MarketplacenotesInsert' (Maybe Text) +miUserIp = lens _miUserIp (\ s a -> s{_miUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miKey :: Lens' MarketplacenotesInsert' (Maybe Text) +miKey = lens _miKey (\ s a -> s{_miKey = a}) + +-- | OAuth 2.0 token for the current user. +miOauthToken :: Lens' MarketplacenotesInsert' (Maybe Text) +miOauthToken + = lens _miOauthToken (\ s a -> s{_miOauthToken = a}) + +-- | The orderId to add notes for. +miOrderId :: Lens' MarketplacenotesInsert' Text +miOrderId + = lens _miOrderId (\ s a -> s{_miOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +miFields :: Lens' MarketplacenotesInsert' (Maybe Text) +miFields = lens _miFields (\ s a -> s{_miFields = a}) + +-- | Data format for the response. +miAlt :: Lens' MarketplacenotesInsert' Text +miAlt = lens _miAlt (\ s a -> s{_miAlt = a}) + +instance GoogleRequest MarketplacenotesInsert' where + type Rs MarketplacenotesInsert' = + AddOrderNotesResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacenotesInsert{..} + = go _miQuotaUser _miPrettyPrint _miUserIp _miKey + _miOauthToken + _miOrderId + _miFields + _miAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacenotesInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/List.hs new file mode 100644 index 000000000..f97c09e6c --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplacenotes/List.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get all the notes associated with an order +-- +-- /See:/ for @AdexchangebuyerMarketplacenotesList@. +module AdExchangeBuyer.Marketplacenotes.List + ( + -- * REST Resource + MarketplacenotesListAPI + + -- * Creating a Request + , marketplacenotesList + , MarketplacenotesList + + -- * Request Lenses + , mlQuotaUser + , mlPrettyPrint + , mlUserIp + , mlKey + , mlOauthToken + , mlOrderId + , mlFields + , mlAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplacenotesList@ which the +-- 'MarketplacenotesList' request conforms to. +type MarketplacenotesListAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + "notes" :> Get '[JSON] GetOrderNotesResponse + +-- | Get all the notes associated with an order +-- +-- /See:/ 'marketplacenotesList' smart constructor. +data MarketplacenotesList = MarketplacenotesList + { _mlQuotaUser :: !(Maybe Text) + , _mlPrettyPrint :: !Bool + , _mlUserIp :: !(Maybe Text) + , _mlKey :: !(Maybe Text) + , _mlOauthToken :: !(Maybe Text) + , _mlOrderId :: !Text + , _mlFields :: !(Maybe Text) + , _mlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplacenotesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlQuotaUser' +-- +-- * 'mlPrettyPrint' +-- +-- * 'mlUserIp' +-- +-- * 'mlKey' +-- +-- * 'mlOauthToken' +-- +-- * 'mlOrderId' +-- +-- * 'mlFields' +-- +-- * 'mlAlt' +marketplacenotesList + :: Text -- ^ 'orderId' + -> MarketplacenotesList +marketplacenotesList pMlOrderId_ = + MarketplacenotesList + { _mlQuotaUser = Nothing + , _mlPrettyPrint = True + , _mlUserIp = Nothing + , _mlKey = Nothing + , _mlOauthToken = Nothing + , _mlOrderId = pMlOrderId_ + , _mlFields = Nothing + , _mlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlQuotaUser :: Lens' MarketplacenotesList' (Maybe Text) +mlQuotaUser + = lens _mlQuotaUser (\ s a -> s{_mlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlPrettyPrint :: Lens' MarketplacenotesList' Bool +mlPrettyPrint + = lens _mlPrettyPrint + (\ s a -> s{_mlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlUserIp :: Lens' MarketplacenotesList' (Maybe Text) +mlUserIp = lens _mlUserIp (\ s a -> s{_mlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlKey :: Lens' MarketplacenotesList' (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | OAuth 2.0 token for the current user. +mlOauthToken :: Lens' MarketplacenotesList' (Maybe Text) +mlOauthToken + = lens _mlOauthToken (\ s a -> s{_mlOauthToken = a}) + +-- | The orderId to get notes for. +mlOrderId :: Lens' MarketplacenotesList' Text +mlOrderId + = lens _mlOrderId (\ s a -> s{_mlOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +mlFields :: Lens' MarketplacenotesList' (Maybe Text) +mlFields = lens _mlFields (\ s a -> s{_mlFields = a}) + +-- | Data format for the response. +mlAlt :: Lens' MarketplacenotesList' Text +mlAlt = lens _mlAlt (\ s a -> s{_mlAlt = a}) + +instance GoogleRequest MarketplacenotesList' where + type Rs MarketplacenotesList' = GetOrderNotesResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplacenotesList{..} + = go _mlQuotaUser _mlPrettyPrint _mlUserIp _mlKey + _mlOauthToken + _mlOrderId + _mlFields + _mlAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplacenotesListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Get.hs new file mode 100644 index 000000000..32e14d088 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Get.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the requested negotiation. +-- +-- /See:/ for @AdexchangebuyerMarketplaceoffersGet@. +module AdExchangeBuyer.Marketplaceoffers.Get + ( + -- * REST Resource + MarketplaceoffersGetAPI + + -- * Creating a Request + , marketplaceoffersGet + , MarketplaceoffersGet + + -- * Request Lenses + , mgQuotaUser + , mgPrettyPrint + , mgUserIp + , mgKey + , mgOfferId + , mgOauthToken + , mgFields + , mgAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceoffersGet@ which the +-- 'MarketplaceoffersGet' request conforms to. +type MarketplaceoffersGetAPI = + "marketplaceOffers" :> + Capture "offerId" Text :> + Get '[JSON] MarketplaceOffer + +-- | Gets the requested negotiation. +-- +-- /See:/ 'marketplaceoffersGet' smart constructor. +data MarketplaceoffersGet = MarketplaceoffersGet + { _mgQuotaUser :: !(Maybe Text) + , _mgPrettyPrint :: !Bool + , _mgUserIp :: !(Maybe Text) + , _mgKey :: !(Maybe Text) + , _mgOfferId :: !Text + , _mgOauthToken :: !(Maybe Text) + , _mgFields :: !(Maybe Text) + , _mgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceoffersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgQuotaUser' +-- +-- * 'mgPrettyPrint' +-- +-- * 'mgUserIp' +-- +-- * 'mgKey' +-- +-- * 'mgOfferId' +-- +-- * 'mgOauthToken' +-- +-- * 'mgFields' +-- +-- * 'mgAlt' +marketplaceoffersGet + :: Text -- ^ 'offerId' + -> MarketplaceoffersGet +marketplaceoffersGet pMgOfferId_ = + MarketplaceoffersGet + { _mgQuotaUser = Nothing + , _mgPrettyPrint = True + , _mgUserIp = Nothing + , _mgKey = Nothing + , _mgOfferId = pMgOfferId_ + , _mgOauthToken = Nothing + , _mgFields = Nothing + , _mgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgQuotaUser :: Lens' MarketplaceoffersGet' (Maybe Text) +mgQuotaUser + = lens _mgQuotaUser (\ s a -> s{_mgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgPrettyPrint :: Lens' MarketplaceoffersGet' Bool +mgPrettyPrint + = lens _mgPrettyPrint + (\ s a -> s{_mgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgUserIp :: Lens' MarketplaceoffersGet' (Maybe Text) +mgUserIp = lens _mgUserIp (\ s a -> s{_mgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgKey :: Lens' MarketplaceoffersGet' (Maybe Text) +mgKey = lens _mgKey (\ s a -> s{_mgKey = a}) + +-- | The offerId for the offer to get the head revision for. +mgOfferId :: Lens' MarketplaceoffersGet' Text +mgOfferId + = lens _mgOfferId (\ s a -> s{_mgOfferId = a}) + +-- | OAuth 2.0 token for the current user. +mgOauthToken :: Lens' MarketplaceoffersGet' (Maybe Text) +mgOauthToken + = lens _mgOauthToken (\ s a -> s{_mgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgFields :: Lens' MarketplaceoffersGet' (Maybe Text) +mgFields = lens _mgFields (\ s a -> s{_mgFields = a}) + +-- | Data format for the response. +mgAlt :: Lens' MarketplaceoffersGet' Text +mgAlt = lens _mgAlt (\ s a -> s{_mgAlt = a}) + +instance GoogleRequest MarketplaceoffersGet' where + type Rs MarketplaceoffersGet' = MarketplaceOffer + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceoffersGet{..} + = go _mgQuotaUser _mgPrettyPrint _mgUserIp _mgKey + _mgOfferId + _mgOauthToken + _mgFields + _mgAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceoffersGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Search.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Search.hs new file mode 100644 index 000000000..41a7fdd0f --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceoffers/Search.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the requested negotiation. +-- +-- /See:/ for @AdexchangebuyerMarketplaceoffersSearch@. +module AdExchangeBuyer.Marketplaceoffers.Search + ( + -- * REST Resource + MarketplaceoffersSearchAPI + + -- * Creating a Request + , marketplaceoffersSearch + , MarketplaceoffersSearch + + -- * Request Lenses + , msQuotaUser + , msPrettyPrint + , msUserIp + , msKey + , msPqlQuery + , msOauthToken + , msFields + , msAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceoffersSearch@ which the +-- 'MarketplaceoffersSearch' request conforms to. +type MarketplaceoffersSearchAPI = + "marketplaceOffers" :> + "search" :> + QueryParam "pqlQuery" Text :> + Get '[JSON] GetOffersResponse + +-- | Gets the requested negotiation. +-- +-- /See:/ 'marketplaceoffersSearch' smart constructor. +data MarketplaceoffersSearch = MarketplaceoffersSearch + { _msQuotaUser :: !(Maybe Text) + , _msPrettyPrint :: !Bool + , _msUserIp :: !(Maybe Text) + , _msKey :: !(Maybe Text) + , _msPqlQuery :: !(Maybe Text) + , _msOauthToken :: !(Maybe Text) + , _msFields :: !(Maybe Text) + , _msAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceoffersSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msQuotaUser' +-- +-- * 'msPrettyPrint' +-- +-- * 'msUserIp' +-- +-- * 'msKey' +-- +-- * 'msPqlQuery' +-- +-- * 'msOauthToken' +-- +-- * 'msFields' +-- +-- * 'msAlt' +marketplaceoffersSearch + :: MarketplaceoffersSearch +marketplaceoffersSearch = + MarketplaceoffersSearch + { _msQuotaUser = Nothing + , _msPrettyPrint = True + , _msUserIp = Nothing + , _msKey = Nothing + , _msPqlQuery = Nothing + , _msOauthToken = Nothing + , _msFields = Nothing + , _msAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +msQuotaUser :: Lens' MarketplaceoffersSearch' (Maybe Text) +msQuotaUser + = lens _msQuotaUser (\ s a -> s{_msQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +msPrettyPrint :: Lens' MarketplaceoffersSearch' Bool +msPrettyPrint + = lens _msPrettyPrint + (\ s a -> s{_msPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +msUserIp :: Lens' MarketplaceoffersSearch' (Maybe Text) +msUserIp = lens _msUserIp (\ s a -> s{_msUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +msKey :: Lens' MarketplaceoffersSearch' (Maybe Text) +msKey = lens _msKey (\ s a -> s{_msKey = a}) + +-- | The pql query used to query for offers. +msPqlQuery :: Lens' MarketplaceoffersSearch' (Maybe Text) +msPqlQuery + = lens _msPqlQuery (\ s a -> s{_msPqlQuery = a}) + +-- | OAuth 2.0 token for the current user. +msOauthToken :: Lens' MarketplaceoffersSearch' (Maybe Text) +msOauthToken + = lens _msOauthToken (\ s a -> s{_msOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +msFields :: Lens' MarketplaceoffersSearch' (Maybe Text) +msFields = lens _msFields (\ s a -> s{_msFields = a}) + +-- | Data format for the response. +msAlt :: Lens' MarketplaceoffersSearch' Text +msAlt = lens _msAlt (\ s a -> s{_msAlt = a}) + +instance GoogleRequest MarketplaceoffersSearch' where + type Rs MarketplaceoffersSearch' = GetOffersResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceoffersSearch{..} + = go _msQuotaUser _msPrettyPrint _msUserIp _msKey + _msPqlQuery + _msOauthToken + _msFields + _msAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceoffersSearchAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Get.hs new file mode 100644 index 000000000..165fa0984 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Get.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get an order given its id +-- +-- /See:/ for @AdexchangebuyerMarketplaceordersGet@. +module AdExchangeBuyer.Marketplaceorders.Get + ( + -- * REST Resource + MarketplaceordersGetAPI + + -- * Creating a Request + , marketplaceordersGet + , MarketplaceordersGet + + -- * Request Lenses + , marQuotaUser + , marPrettyPrint + , marUserIp + , marKey + , marOauthToken + , marOrderId + , marFields + , marAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceordersGet@ which the +-- 'MarketplaceordersGet' request conforms to. +type MarketplaceordersGetAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + Get '[JSON] MarketplaceOrder + +-- | Get an order given its id +-- +-- /See:/ 'marketplaceordersGet' smart constructor. +data MarketplaceordersGet = MarketplaceordersGet + { _marQuotaUser :: !(Maybe Text) + , _marPrettyPrint :: !Bool + , _marUserIp :: !(Maybe Text) + , _marKey :: !(Maybe Text) + , _marOauthToken :: !(Maybe Text) + , _marOrderId :: !Text + , _marFields :: !(Maybe Text) + , _marAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceordersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'marQuotaUser' +-- +-- * 'marPrettyPrint' +-- +-- * 'marUserIp' +-- +-- * 'marKey' +-- +-- * 'marOauthToken' +-- +-- * 'marOrderId' +-- +-- * 'marFields' +-- +-- * 'marAlt' +marketplaceordersGet + :: Text -- ^ 'orderId' + -> MarketplaceordersGet +marketplaceordersGet pMarOrderId_ = + MarketplaceordersGet + { _marQuotaUser = Nothing + , _marPrettyPrint = True + , _marUserIp = Nothing + , _marKey = Nothing + , _marOauthToken = Nothing + , _marOrderId = pMarOrderId_ + , _marFields = Nothing + , _marAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +marQuotaUser :: Lens' MarketplaceordersGet' (Maybe Text) +marQuotaUser + = lens _marQuotaUser (\ s a -> s{_marQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +marPrettyPrint :: Lens' MarketplaceordersGet' Bool +marPrettyPrint + = lens _marPrettyPrint + (\ s a -> s{_marPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +marUserIp :: Lens' MarketplaceordersGet' (Maybe Text) +marUserIp + = lens _marUserIp (\ s a -> s{_marUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +marKey :: Lens' MarketplaceordersGet' (Maybe Text) +marKey = lens _marKey (\ s a -> s{_marKey = a}) + +-- | OAuth 2.0 token for the current user. +marOauthToken :: Lens' MarketplaceordersGet' (Maybe Text) +marOauthToken + = lens _marOauthToken + (\ s a -> s{_marOauthToken = a}) + +-- | Id of the order to retrieve. +marOrderId :: Lens' MarketplaceordersGet' Text +marOrderId + = lens _marOrderId (\ s a -> s{_marOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +marFields :: Lens' MarketplaceordersGet' (Maybe Text) +marFields + = lens _marFields (\ s a -> s{_marFields = a}) + +-- | Data format for the response. +marAlt :: Lens' MarketplaceordersGet' Text +marAlt = lens _marAlt (\ s a -> s{_marAlt = a}) + +instance GoogleRequest MarketplaceordersGet' where + type Rs MarketplaceordersGet' = MarketplaceOrder + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceordersGet{..} + = go _marQuotaUser _marPrettyPrint _marUserIp _marKey + _marOauthToken + _marOrderId + _marFields + _marAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceordersGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Insert.hs new file mode 100644 index 000000000..60bdb41c6 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Insert.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create the given list of orders +-- +-- /See:/ for @AdexchangebuyerMarketplaceordersInsert@. +module AdExchangeBuyer.Marketplaceorders.Insert + ( + -- * REST Resource + MarketplaceordersInsertAPI + + -- * Creating a Request + , marketplaceordersInsert + , MarketplaceordersInsert + + -- * Request Lenses + , mQuotaUser + , mPrettyPrint + , mUserIp + , mKey + , mOauthToken + , mFields + , mAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceordersInsert@ which the +-- 'MarketplaceordersInsert' request conforms to. +type MarketplaceordersInsertAPI = + "marketplaceOrders" :> + "insert" :> Post '[JSON] CreateOrdersResponse + +-- | Create the given list of orders +-- +-- /See:/ 'marketplaceordersInsert' smart constructor. +data MarketplaceordersInsert = MarketplaceordersInsert + { _mQuotaUser :: !(Maybe Text) + , _mPrettyPrint :: !Bool + , _mUserIp :: !(Maybe Text) + , _mKey :: !(Maybe Text) + , _mOauthToken :: !(Maybe Text) + , _mFields :: !(Maybe Text) + , _mAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceordersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mQuotaUser' +-- +-- * 'mPrettyPrint' +-- +-- * 'mUserIp' +-- +-- * 'mKey' +-- +-- * 'mOauthToken' +-- +-- * 'mFields' +-- +-- * 'mAlt' +marketplaceordersInsert + :: MarketplaceordersInsert +marketplaceordersInsert = + MarketplaceordersInsert + { _mQuotaUser = Nothing + , _mPrettyPrint = True + , _mUserIp = Nothing + , _mKey = Nothing + , _mOauthToken = Nothing + , _mFields = Nothing + , _mAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mQuotaUser :: Lens' MarketplaceordersInsert' (Maybe Text) +mQuotaUser + = lens _mQuotaUser (\ s a -> s{_mQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mPrettyPrint :: Lens' MarketplaceordersInsert' Bool +mPrettyPrint + = lens _mPrettyPrint (\ s a -> s{_mPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mUserIp :: Lens' MarketplaceordersInsert' (Maybe Text) +mUserIp = lens _mUserIp (\ s a -> s{_mUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mKey :: Lens' MarketplaceordersInsert' (Maybe Text) +mKey = lens _mKey (\ s a -> s{_mKey = a}) + +-- | OAuth 2.0 token for the current user. +mOauthToken :: Lens' MarketplaceordersInsert' (Maybe Text) +mOauthToken + = lens _mOauthToken (\ s a -> s{_mOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mFields :: Lens' MarketplaceordersInsert' (Maybe Text) +mFields = lens _mFields (\ s a -> s{_mFields = a}) + +-- | Data format for the response. +mAlt :: Lens' MarketplaceordersInsert' Text +mAlt = lens _mAlt (\ s a -> s{_mAlt = a}) + +instance GoogleRequest MarketplaceordersInsert' where + type Rs MarketplaceordersInsert' = + CreateOrdersResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceordersInsert{..} + = go _mQuotaUser _mPrettyPrint _mUserIp _mKey + _mOauthToken + _mFields + _mAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceordersInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Patch.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Patch.hs new file mode 100644 index 000000000..5715c20b1 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Patch.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the given order. This method supports patch semantics. +-- +-- /See:/ for @AdexchangebuyerMarketplaceordersPatch@. +module AdExchangeBuyer.Marketplaceorders.Patch + ( + -- * REST Resource + MarketplaceordersPatchAPI + + -- * Creating a Request + , marketplaceordersPatch + , MarketplaceordersPatch + + -- * Request Lenses + , mpQuotaUser + , mpUpdateAction + , mpPrettyPrint + , mpUserIp + , mpRevisionNumber + , mpKey + , mpOauthToken + , mpOrderId + , mpFields + , mpAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceordersPatch@ which the +-- 'MarketplaceordersPatch' request conforms to. +type MarketplaceordersPatchAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + Capture "revisionNumber" Int64 :> + Capture "updateAction" Text :> + Patch '[JSON] MarketplaceOrder + +-- | Update the given order. This method supports patch semantics. +-- +-- /See:/ 'marketplaceordersPatch' smart constructor. +data MarketplaceordersPatch = MarketplaceordersPatch + { _mpQuotaUser :: !(Maybe Text) + , _mpUpdateAction :: !Text + , _mpPrettyPrint :: !Bool + , _mpUserIp :: !(Maybe Text) + , _mpRevisionNumber :: !Int64 + , _mpKey :: !(Maybe Text) + , _mpOauthToken :: !(Maybe Text) + , _mpOrderId :: !Text + , _mpFields :: !(Maybe Text) + , _mpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceordersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpQuotaUser' +-- +-- * 'mpUpdateAction' +-- +-- * 'mpPrettyPrint' +-- +-- * 'mpUserIp' +-- +-- * 'mpRevisionNumber' +-- +-- * 'mpKey' +-- +-- * 'mpOauthToken' +-- +-- * 'mpOrderId' +-- +-- * 'mpFields' +-- +-- * 'mpAlt' +marketplaceordersPatch + :: Text -- ^ 'updateAction' + -> Int64 -- ^ 'revisionNumber' + -> Text -- ^ 'orderId' + -> MarketplaceordersPatch +marketplaceordersPatch pMpUpdateAction_ pMpRevisionNumber_ pMpOrderId_ = + MarketplaceordersPatch + { _mpQuotaUser = Nothing + , _mpUpdateAction = pMpUpdateAction_ + , _mpPrettyPrint = True + , _mpUserIp = Nothing + , _mpRevisionNumber = pMpRevisionNumber_ + , _mpKey = Nothing + , _mpOauthToken = Nothing + , _mpOrderId = pMpOrderId_ + , _mpFields = Nothing + , _mpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpQuotaUser :: Lens' MarketplaceordersPatch' (Maybe Text) +mpQuotaUser + = lens _mpQuotaUser (\ s a -> s{_mpQuotaUser = a}) + +-- | The proposed action to take on the order. +mpUpdateAction :: Lens' MarketplaceordersPatch' Text +mpUpdateAction + = lens _mpUpdateAction + (\ s a -> s{_mpUpdateAction = a}) + +-- | Returns response with indentations and line breaks. +mpPrettyPrint :: Lens' MarketplaceordersPatch' Bool +mpPrettyPrint + = lens _mpPrettyPrint + (\ s a -> s{_mpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpUserIp :: Lens' MarketplaceordersPatch' (Maybe Text) +mpUserIp = lens _mpUserIp (\ s a -> s{_mpUserIp = a}) + +-- | The last known revision number to update. If the head revision in the +-- marketplace database has since changed, an error will be thrown. The +-- caller should then fetch the lastest order at head revision and retry +-- the update at that revision. +mpRevisionNumber :: Lens' MarketplaceordersPatch' Int64 +mpRevisionNumber + = lens _mpRevisionNumber + (\ s a -> s{_mpRevisionNumber = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpKey :: Lens' MarketplaceordersPatch' (Maybe Text) +mpKey = lens _mpKey (\ s a -> s{_mpKey = a}) + +-- | OAuth 2.0 token for the current user. +mpOauthToken :: Lens' MarketplaceordersPatch' (Maybe Text) +mpOauthToken + = lens _mpOauthToken (\ s a -> s{_mpOauthToken = a}) + +-- | The order id to update. +mpOrderId :: Lens' MarketplaceordersPatch' Text +mpOrderId + = lens _mpOrderId (\ s a -> s{_mpOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +mpFields :: Lens' MarketplaceordersPatch' (Maybe Text) +mpFields = lens _mpFields (\ s a -> s{_mpFields = a}) + +-- | Data format for the response. +mpAlt :: Lens' MarketplaceordersPatch' Text +mpAlt = lens _mpAlt (\ s a -> s{_mpAlt = a}) + +instance GoogleRequest MarketplaceordersPatch' where + type Rs MarketplaceordersPatch' = MarketplaceOrder + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceordersPatch{..} + = go _mpQuotaUser _mpUpdateAction _mpPrettyPrint + _mpUserIp + _mpRevisionNumber + _mpKey + _mpOauthToken + _mpOrderId + _mpFields + _mpAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceordersPatchAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Search.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Search.hs new file mode 100644 index 000000000..94dd37cfe --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Search.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Search for orders using pql query +-- +-- /See:/ for @AdexchangebuyerMarketplaceordersSearch@. +module AdExchangeBuyer.Marketplaceorders.Search + ( + -- * REST Resource + MarketplaceordersSearchAPI + + -- * Creating a Request + , marketplaceordersSearch + , MarketplaceordersSearch + + -- * Request Lenses + , mssQuotaUser + , mssPrettyPrint + , mssUserIp + , mssKey + , mssPqlQuery + , mssOauthToken + , mssFields + , mssAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceordersSearch@ which the +-- 'MarketplaceordersSearch' request conforms to. +type MarketplaceordersSearchAPI = + "marketplaceOrders" :> + "search" :> + QueryParam "pqlQuery" Text :> + Get '[JSON] GetOrdersResponse + +-- | Search for orders using pql query +-- +-- /See:/ 'marketplaceordersSearch' smart constructor. +data MarketplaceordersSearch = MarketplaceordersSearch + { _mssQuotaUser :: !(Maybe Text) + , _mssPrettyPrint :: !Bool + , _mssUserIp :: !(Maybe Text) + , _mssKey :: !(Maybe Text) + , _mssPqlQuery :: !(Maybe Text) + , _mssOauthToken :: !(Maybe Text) + , _mssFields :: !(Maybe Text) + , _mssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceordersSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mssQuotaUser' +-- +-- * 'mssPrettyPrint' +-- +-- * 'mssUserIp' +-- +-- * 'mssKey' +-- +-- * 'mssPqlQuery' +-- +-- * 'mssOauthToken' +-- +-- * 'mssFields' +-- +-- * 'mssAlt' +marketplaceordersSearch + :: MarketplaceordersSearch +marketplaceordersSearch = + MarketplaceordersSearch + { _mssQuotaUser = Nothing + , _mssPrettyPrint = True + , _mssUserIp = Nothing + , _mssKey = Nothing + , _mssPqlQuery = Nothing + , _mssOauthToken = Nothing + , _mssFields = Nothing + , _mssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mssQuotaUser :: Lens' MarketplaceordersSearch' (Maybe Text) +mssQuotaUser + = lens _mssQuotaUser (\ s a -> s{_mssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mssPrettyPrint :: Lens' MarketplaceordersSearch' Bool +mssPrettyPrint + = lens _mssPrettyPrint + (\ s a -> s{_mssPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mssUserIp :: Lens' MarketplaceordersSearch' (Maybe Text) +mssUserIp + = lens _mssUserIp (\ s a -> s{_mssUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mssKey :: Lens' MarketplaceordersSearch' (Maybe Text) +mssKey = lens _mssKey (\ s a -> s{_mssKey = a}) + +-- | Query string to retrieve specific orders. +mssPqlQuery :: Lens' MarketplaceordersSearch' (Maybe Text) +mssPqlQuery + = lens _mssPqlQuery (\ s a -> s{_mssPqlQuery = a}) + +-- | OAuth 2.0 token for the current user. +mssOauthToken :: Lens' MarketplaceordersSearch' (Maybe Text) +mssOauthToken + = lens _mssOauthToken + (\ s a -> s{_mssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mssFields :: Lens' MarketplaceordersSearch' (Maybe Text) +mssFields + = lens _mssFields (\ s a -> s{_mssFields = a}) + +-- | Data format for the response. +mssAlt :: Lens' MarketplaceordersSearch' Text +mssAlt = lens _mssAlt (\ s a -> s{_mssAlt = a}) + +instance GoogleRequest MarketplaceordersSearch' where + type Rs MarketplaceordersSearch' = GetOrdersResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceordersSearch{..} + = go _mssQuotaUser _mssPrettyPrint _mssUserIp _mssKey + _mssPqlQuery + _mssOauthToken + _mssFields + _mssAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceordersSearchAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Update.hs new file mode 100644 index 000000000..002fcd75f --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Marketplaceorders/Update.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the given order +-- +-- /See:/ for @AdexchangebuyerMarketplaceordersUpdate@. +module AdExchangeBuyer.Marketplaceorders.Update + ( + -- * REST Resource + MarketplaceordersUpdateAPI + + -- * Creating a Request + , marketplaceordersUpdate + , MarketplaceordersUpdate + + -- * Request Lenses + , muQuotaUser + , muUpdateAction + , muPrettyPrint + , muUserIp + , muRevisionNumber + , muKey + , muOauthToken + , muOrderId + , muFields + , muAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerMarketplaceordersUpdate@ which the +-- 'MarketplaceordersUpdate' request conforms to. +type MarketplaceordersUpdateAPI = + "marketplaceOrders" :> + Capture "orderId" Text :> + Capture "revisionNumber" Int64 :> + Capture "updateAction" Text :> + Put '[JSON] MarketplaceOrder + +-- | Update the given order +-- +-- /See:/ 'marketplaceordersUpdate' smart constructor. +data MarketplaceordersUpdate = MarketplaceordersUpdate + { _muQuotaUser :: !(Maybe Text) + , _muUpdateAction :: !Text + , _muPrettyPrint :: !Bool + , _muUserIp :: !(Maybe Text) + , _muRevisionNumber :: !Int64 + , _muKey :: !(Maybe Text) + , _muOauthToken :: !(Maybe Text) + , _muOrderId :: !Text + , _muFields :: !(Maybe Text) + , _muAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MarketplaceordersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muQuotaUser' +-- +-- * 'muUpdateAction' +-- +-- * 'muPrettyPrint' +-- +-- * 'muUserIp' +-- +-- * 'muRevisionNumber' +-- +-- * 'muKey' +-- +-- * 'muOauthToken' +-- +-- * 'muOrderId' +-- +-- * 'muFields' +-- +-- * 'muAlt' +marketplaceordersUpdate + :: Text -- ^ 'updateAction' + -> Int64 -- ^ 'revisionNumber' + -> Text -- ^ 'orderId' + -> MarketplaceordersUpdate +marketplaceordersUpdate pMuUpdateAction_ pMuRevisionNumber_ pMuOrderId_ = + MarketplaceordersUpdate + { _muQuotaUser = Nothing + , _muUpdateAction = pMuUpdateAction_ + , _muPrettyPrint = True + , _muUserIp = Nothing + , _muRevisionNumber = pMuRevisionNumber_ + , _muKey = Nothing + , _muOauthToken = Nothing + , _muOrderId = pMuOrderId_ + , _muFields = Nothing + , _muAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muQuotaUser :: Lens' MarketplaceordersUpdate' (Maybe Text) +muQuotaUser + = lens _muQuotaUser (\ s a -> s{_muQuotaUser = a}) + +-- | The proposed action to take on the order. +muUpdateAction :: Lens' MarketplaceordersUpdate' Text +muUpdateAction + = lens _muUpdateAction + (\ s a -> s{_muUpdateAction = a}) + +-- | Returns response with indentations and line breaks. +muPrettyPrint :: Lens' MarketplaceordersUpdate' Bool +muPrettyPrint + = lens _muPrettyPrint + (\ s a -> s{_muPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muUserIp :: Lens' MarketplaceordersUpdate' (Maybe Text) +muUserIp = lens _muUserIp (\ s a -> s{_muUserIp = a}) + +-- | The last known revision number to update. If the head revision in the +-- marketplace database has since changed, an error will be thrown. The +-- caller should then fetch the lastest order at head revision and retry +-- the update at that revision. +muRevisionNumber :: Lens' MarketplaceordersUpdate' Int64 +muRevisionNumber + = lens _muRevisionNumber + (\ s a -> s{_muRevisionNumber = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muKey :: Lens' MarketplaceordersUpdate' (Maybe Text) +muKey = lens _muKey (\ s a -> s{_muKey = a}) + +-- | OAuth 2.0 token for the current user. +muOauthToken :: Lens' MarketplaceordersUpdate' (Maybe Text) +muOauthToken + = lens _muOauthToken (\ s a -> s{_muOauthToken = a}) + +-- | The order id to update. +muOrderId :: Lens' MarketplaceordersUpdate' Text +muOrderId + = lens _muOrderId (\ s a -> s{_muOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +muFields :: Lens' MarketplaceordersUpdate' (Maybe Text) +muFields = lens _muFields (\ s a -> s{_muFields = a}) + +-- | Data format for the response. +muAlt :: Lens' MarketplaceordersUpdate' Text +muAlt = lens _muAlt (\ s a -> s{_muAlt = a}) + +instance GoogleRequest MarketplaceordersUpdate' where + type Rs MarketplaceordersUpdate' = MarketplaceOrder + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u MarketplaceordersUpdate{..} + = go _muQuotaUser _muUpdateAction _muPrettyPrint + _muUserIp + _muRevisionNumber + _muKey + _muOauthToken + _muOrderId + _muFields + _muAlt + where go + = clientWithRoute + (Proxy :: Proxy MarketplaceordersUpdateAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiationrounds/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiationrounds/Insert.hs new file mode 100644 index 000000000..f57bdb10a --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiationrounds/Insert.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Negotiationrounds.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds the requested negotiationRound to the requested negotiation. +-- +-- /See:/ for @AdexchangebuyerNegotiationroundsInsert@. +module AdExchangeBuyer.Negotiationrounds.Insert + ( + -- * REST Resource + NegotiationroundsInsertAPI + + -- * Creating a Request + , negotiationroundsInsert + , NegotiationroundsInsert + + -- * Request Lenses + , niQuotaUser + , niPrettyPrint + , niUserIp + , niKey + , niOauthToken + , niNegotiationId + , niFields + , niAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerNegotiationroundsInsert@ which the +-- 'NegotiationroundsInsert' request conforms to. +type NegotiationroundsInsertAPI = + "negotiations" :> + Capture "negotiationId" Int64 :> + "negotiationrounds" :> + Post '[JSON] NegotiationRoundDto + +-- | Adds the requested negotiationRound to the requested negotiation. +-- +-- /See:/ 'negotiationroundsInsert' smart constructor. +data NegotiationroundsInsert = NegotiationroundsInsert + { _niQuotaUser :: !(Maybe Text) + , _niPrettyPrint :: !Bool + , _niUserIp :: !(Maybe Text) + , _niKey :: !(Maybe Text) + , _niOauthToken :: !(Maybe Text) + , _niNegotiationId :: !Int64 + , _niFields :: !(Maybe Text) + , _niAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationroundsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'niQuotaUser' +-- +-- * 'niPrettyPrint' +-- +-- * 'niUserIp' +-- +-- * 'niKey' +-- +-- * 'niOauthToken' +-- +-- * 'niNegotiationId' +-- +-- * 'niFields' +-- +-- * 'niAlt' +negotiationroundsInsert + :: Int64 -- ^ 'negotiationId' + -> NegotiationroundsInsert +negotiationroundsInsert pNiNegotiationId_ = + NegotiationroundsInsert + { _niQuotaUser = Nothing + , _niPrettyPrint = True + , _niUserIp = Nothing + , _niKey = Nothing + , _niOauthToken = Nothing + , _niNegotiationId = pNiNegotiationId_ + , _niFields = Nothing + , _niAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +niQuotaUser :: Lens' NegotiationroundsInsert' (Maybe Text) +niQuotaUser + = lens _niQuotaUser (\ s a -> s{_niQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +niPrettyPrint :: Lens' NegotiationroundsInsert' Bool +niPrettyPrint + = lens _niPrettyPrint + (\ s a -> s{_niPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +niUserIp :: Lens' NegotiationroundsInsert' (Maybe Text) +niUserIp = lens _niUserIp (\ s a -> s{_niUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +niKey :: Lens' NegotiationroundsInsert' (Maybe Text) +niKey = lens _niKey (\ s a -> s{_niKey = a}) + +-- | OAuth 2.0 token for the current user. +niOauthToken :: Lens' NegotiationroundsInsert' (Maybe Text) +niOauthToken + = lens _niOauthToken (\ s a -> s{_niOauthToken = a}) + +niNegotiationId :: Lens' NegotiationroundsInsert' Int64 +niNegotiationId + = lens _niNegotiationId + (\ s a -> s{_niNegotiationId = a}) + +-- | Selector specifying which fields to include in a partial response. +niFields :: Lens' NegotiationroundsInsert' (Maybe Text) +niFields = lens _niFields (\ s a -> s{_niFields = a}) + +-- | Data format for the response. +niAlt :: Lens' NegotiationroundsInsert' Text +niAlt = lens _niAlt (\ s a -> s{_niAlt = a}) + +instance GoogleRequest NegotiationroundsInsert' where + type Rs NegotiationroundsInsert' = + NegotiationRoundDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u NegotiationroundsInsert{..} + = go _niQuotaUser _niPrettyPrint _niUserIp _niKey + _niOauthToken + _niNegotiationId + _niFields + _niAlt + where go + = clientWithRoute + (Proxy :: Proxy NegotiationroundsInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Get.hs new file mode 100644 index 000000000..79ed92c3f --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Negotiations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the requested negotiation. +-- +-- /See:/ for @AdexchangebuyerNegotiationsGet@. +module AdExchangeBuyer.Negotiations.Get + ( + -- * REST Resource + NegotiationsGetAPI + + -- * Creating a Request + , negotiationsGet + , NegotiationsGet + + -- * Request Lenses + , ngQuotaUser + , ngPrettyPrint + , ngUserIp + , ngKey + , ngOauthToken + , ngNegotiationId + , ngFields + , ngAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerNegotiationsGet@ which the +-- 'NegotiationsGet' request conforms to. +type NegotiationsGetAPI = + "negotiations" :> + Capture "negotiationId" Int64 :> + Get '[JSON] NegotiationDto + +-- | Gets the requested negotiation. +-- +-- /See:/ 'negotiationsGet' smart constructor. +data NegotiationsGet = NegotiationsGet + { _ngQuotaUser :: !(Maybe Text) + , _ngPrettyPrint :: !Bool + , _ngUserIp :: !(Maybe Text) + , _ngKey :: !(Maybe Text) + , _ngOauthToken :: !(Maybe Text) + , _ngNegotiationId :: !Int64 + , _ngFields :: !(Maybe Text) + , _ngAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ngQuotaUser' +-- +-- * 'ngPrettyPrint' +-- +-- * 'ngUserIp' +-- +-- * 'ngKey' +-- +-- * 'ngOauthToken' +-- +-- * 'ngNegotiationId' +-- +-- * 'ngFields' +-- +-- * 'ngAlt' +negotiationsGet + :: Int64 -- ^ 'negotiationId' + -> NegotiationsGet +negotiationsGet pNgNegotiationId_ = + NegotiationsGet + { _ngQuotaUser = Nothing + , _ngPrettyPrint = True + , _ngUserIp = Nothing + , _ngKey = Nothing + , _ngOauthToken = Nothing + , _ngNegotiationId = pNgNegotiationId_ + , _ngFields = Nothing + , _ngAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ngQuotaUser :: Lens' NegotiationsGet' (Maybe Text) +ngQuotaUser + = lens _ngQuotaUser (\ s a -> s{_ngQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ngPrettyPrint :: Lens' NegotiationsGet' Bool +ngPrettyPrint + = lens _ngPrettyPrint + (\ s a -> s{_ngPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ngUserIp :: Lens' NegotiationsGet' (Maybe Text) +ngUserIp = lens _ngUserIp (\ s a -> s{_ngUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ngKey :: Lens' NegotiationsGet' (Maybe Text) +ngKey = lens _ngKey (\ s a -> s{_ngKey = a}) + +-- | OAuth 2.0 token for the current user. +ngOauthToken :: Lens' NegotiationsGet' (Maybe Text) +ngOauthToken + = lens _ngOauthToken (\ s a -> s{_ngOauthToken = a}) + +ngNegotiationId :: Lens' NegotiationsGet' Int64 +ngNegotiationId + = lens _ngNegotiationId + (\ s a -> s{_ngNegotiationId = a}) + +-- | Selector specifying which fields to include in a partial response. +ngFields :: Lens' NegotiationsGet' (Maybe Text) +ngFields = lens _ngFields (\ s a -> s{_ngFields = a}) + +-- | Data format for the response. +ngAlt :: Lens' NegotiationsGet' Text +ngAlt = lens _ngAlt (\ s a -> s{_ngAlt = a}) + +instance GoogleRequest NegotiationsGet' where + type Rs NegotiationsGet' = NegotiationDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u NegotiationsGet{..} + = go _ngQuotaUser _ngPrettyPrint _ngUserIp _ngKey + _ngOauthToken + _ngNegotiationId + _ngFields + _ngAlt + where go + = clientWithRoute (Proxy :: Proxy NegotiationsGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Insert.hs new file mode 100644 index 000000000..a4ab2862b --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Negotiations.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates or updates the requested negotiation. +-- +-- /See:/ for @AdexchangebuyerNegotiationsInsert@. +module AdExchangeBuyer.Negotiations.Insert + ( + -- * REST Resource + NegotiationsInsertAPI + + -- * Creating a Request + , negotiationsInsert + , NegotiationsInsert + + -- * Request Lenses + , nQuotaUser + , nPrettyPrint + , nUserIp + , nKey + , nOauthToken + , nFields + , nAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerNegotiationsInsert@ which the +-- 'NegotiationsInsert' request conforms to. +type NegotiationsInsertAPI = + "negotiations" :> Post '[JSON] NegotiationDto + +-- | Creates or updates the requested negotiation. +-- +-- /See:/ 'negotiationsInsert' smart constructor. +data NegotiationsInsert = NegotiationsInsert + { _nQuotaUser :: !(Maybe Text) + , _nPrettyPrint :: !Bool + , _nUserIp :: !(Maybe Text) + , _nKey :: !(Maybe Text) + , _nOauthToken :: !(Maybe Text) + , _nFields :: !(Maybe Text) + , _nAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nQuotaUser' +-- +-- * 'nPrettyPrint' +-- +-- * 'nUserIp' +-- +-- * 'nKey' +-- +-- * 'nOauthToken' +-- +-- * 'nFields' +-- +-- * 'nAlt' +negotiationsInsert + :: NegotiationsInsert +negotiationsInsert = + NegotiationsInsert + { _nQuotaUser = Nothing + , _nPrettyPrint = True + , _nUserIp = Nothing + , _nKey = Nothing + , _nOauthToken = Nothing + , _nFields = Nothing + , _nAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +nQuotaUser :: Lens' NegotiationsInsert' (Maybe Text) +nQuotaUser + = lens _nQuotaUser (\ s a -> s{_nQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nPrettyPrint :: Lens' NegotiationsInsert' Bool +nPrettyPrint + = lens _nPrettyPrint (\ s a -> s{_nPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +nUserIp :: Lens' NegotiationsInsert' (Maybe Text) +nUserIp = lens _nUserIp (\ s a -> s{_nUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nKey :: Lens' NegotiationsInsert' (Maybe Text) +nKey = lens _nKey (\ s a -> s{_nKey = a}) + +-- | OAuth 2.0 token for the current user. +nOauthToken :: Lens' NegotiationsInsert' (Maybe Text) +nOauthToken + = lens _nOauthToken (\ s a -> s{_nOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +nFields :: Lens' NegotiationsInsert' (Maybe Text) +nFields = lens _nFields (\ s a -> s{_nFields = a}) + +-- | Data format for the response. +nAlt :: Lens' NegotiationsInsert' Text +nAlt = lens _nAlt (\ s a -> s{_nAlt = a}) + +instance GoogleRequest NegotiationsInsert' where + type Rs NegotiationsInsert' = NegotiationDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u NegotiationsInsert{..} + = go _nQuotaUser _nPrettyPrint _nUserIp _nKey + _nOauthToken + _nFields + _nAlt + where go + = clientWithRoute + (Proxy :: Proxy NegotiationsInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/List.hs new file mode 100644 index 000000000..fb68d4d45 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Negotiations/List.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Negotiations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all negotiations the authenticated user has access to. +-- +-- /See:/ for @AdexchangebuyerNegotiationsList@. +module AdExchangeBuyer.Negotiations.List + ( + -- * REST Resource + NegotiationsListAPI + + -- * Creating a Request + , negotiationsList + , NegotiationsList + + -- * Request Lenses + , nlQuotaUser + , nlPrettyPrint + , nlUserIp + , nlKey + , nlOauthToken + , nlFields + , nlAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerNegotiationsList@ which the +-- 'NegotiationsList' request conforms to. +type NegotiationsListAPI = + "negotiations" :> Get '[JSON] GetNegotiationsResponse + +-- | Lists all negotiations the authenticated user has access to. +-- +-- /See:/ 'negotiationsList' smart constructor. +data NegotiationsList = NegotiationsList + { _nlQuotaUser :: !(Maybe Text) + , _nlPrettyPrint :: !Bool + , _nlUserIp :: !(Maybe Text) + , _nlKey :: !(Maybe Text) + , _nlOauthToken :: !(Maybe Text) + , _nlFields :: !(Maybe Text) + , _nlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NegotiationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nlQuotaUser' +-- +-- * 'nlPrettyPrint' +-- +-- * 'nlUserIp' +-- +-- * 'nlKey' +-- +-- * 'nlOauthToken' +-- +-- * 'nlFields' +-- +-- * 'nlAlt' +negotiationsList + :: NegotiationsList +negotiationsList = + NegotiationsList + { _nlQuotaUser = Nothing + , _nlPrettyPrint = True + , _nlUserIp = Nothing + , _nlKey = Nothing + , _nlOauthToken = Nothing + , _nlFields = Nothing + , _nlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +nlQuotaUser :: Lens' NegotiationsList' (Maybe Text) +nlQuotaUser + = lens _nlQuotaUser (\ s a -> s{_nlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nlPrettyPrint :: Lens' NegotiationsList' Bool +nlPrettyPrint + = lens _nlPrettyPrint + (\ s a -> s{_nlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +nlUserIp :: Lens' NegotiationsList' (Maybe Text) +nlUserIp = lens _nlUserIp (\ s a -> s{_nlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nlKey :: Lens' NegotiationsList' (Maybe Text) +nlKey = lens _nlKey (\ s a -> s{_nlKey = a}) + +-- | OAuth 2.0 token for the current user. +nlOauthToken :: Lens' NegotiationsList' (Maybe Text) +nlOauthToken + = lens _nlOauthToken (\ s a -> s{_nlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +nlFields :: Lens' NegotiationsList' (Maybe Text) +nlFields = lens _nlFields (\ s a -> s{_nlFields = a}) + +-- | Data format for the response. +nlAlt :: Lens' NegotiationsList' Text +nlAlt = lens _nlAlt (\ s a -> s{_nlAlt = a}) + +instance GoogleRequest NegotiationsList' where + type Rs NegotiationsList' = GetNegotiationsResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u NegotiationsList{..} + = go _nlQuotaUser _nlPrettyPrint _nlUserIp _nlKey + _nlOauthToken + _nlFields + _nlAlt + where go + = clientWithRoute + (Proxy :: Proxy NegotiationsListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Get.hs new file mode 100644 index 000000000..9286e07e1 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Offers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the requested offer. +-- +-- /See:/ for @AdexchangebuyerOffersGet@. +module AdExchangeBuyer.Offers.Get + ( + -- * REST Resource + OffersGetAPI + + -- * Creating a Request + , offersGet + , OffersGet + + -- * Request Lenses + , ogQuotaUser + , ogPrettyPrint + , ogUserIp + , ogKey + , ogOfferId + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerOffersGet@ which the +-- 'OffersGet' request conforms to. +type OffersGetAPI = + "offers" :> + Capture "offerId" Int64 :> Get '[JSON] OfferDto + +-- | Gets the requested offer. +-- +-- /See:/ 'offersGet' smart constructor. +data OffersGet = OffersGet + { _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogUserIp :: !(Maybe Text) + , _ogKey :: !(Maybe Text) + , _ogOfferId :: !Int64 + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OffersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogUserIp' +-- +-- * 'ogKey' +-- +-- * 'ogOfferId' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +offersGet + :: Int64 -- ^ 'offerId' + -> OffersGet +offersGet pOgOfferId_ = + OffersGet + { _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogUserIp = Nothing + , _ogKey = Nothing + , _ogOfferId = pOgOfferId_ + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OffersGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OffersGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OffersGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OffersGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +ogOfferId :: Lens' OffersGet' Int64 +ogOfferId + = lens _ogOfferId (\ s a -> s{_ogOfferId = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OffersGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OffersGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OffersGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OffersGet' where + type Rs OffersGet' = OfferDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u OffersGet{..} + = go _ogQuotaUser _ogPrettyPrint _ogUserIp _ogKey + _ogOfferId + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy OffersGetAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Insert.hs new file mode 100644 index 000000000..267fb3c02 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/Insert.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Offers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates or updates the requested offer. +-- +-- /See:/ for @AdexchangebuyerOffersInsert@. +module AdExchangeBuyer.Offers.Insert + ( + -- * REST Resource + OffersInsertAPI + + -- * Creating a Request + , offersInsert + , OffersInsert + + -- * Request Lenses + , oiQuotaUser + , oiPrettyPrint + , oiUserIp + , oiKey + , oiOauthToken + , oiFields + , oiAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerOffersInsert@ which the +-- 'OffersInsert' request conforms to. +type OffersInsertAPI = + "offers" :> Post '[JSON] OfferDto + +-- | Creates or updates the requested offer. +-- +-- /See:/ 'offersInsert' smart constructor. +data OffersInsert = OffersInsert + { _oiQuotaUser :: !(Maybe Text) + , _oiPrettyPrint :: !Bool + , _oiUserIp :: !(Maybe Text) + , _oiKey :: !(Maybe Text) + , _oiOauthToken :: !(Maybe Text) + , _oiFields :: !(Maybe Text) + , _oiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OffersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oiQuotaUser' +-- +-- * 'oiPrettyPrint' +-- +-- * 'oiUserIp' +-- +-- * 'oiKey' +-- +-- * 'oiOauthToken' +-- +-- * 'oiFields' +-- +-- * 'oiAlt' +offersInsert + :: OffersInsert +offersInsert = + OffersInsert + { _oiQuotaUser = Nothing + , _oiPrettyPrint = True + , _oiUserIp = Nothing + , _oiKey = Nothing + , _oiOauthToken = Nothing + , _oiFields = Nothing + , _oiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oiQuotaUser :: Lens' OffersInsert' (Maybe Text) +oiQuotaUser + = lens _oiQuotaUser (\ s a -> s{_oiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oiPrettyPrint :: Lens' OffersInsert' Bool +oiPrettyPrint + = lens _oiPrettyPrint + (\ s a -> s{_oiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oiUserIp :: Lens' OffersInsert' (Maybe Text) +oiUserIp = lens _oiUserIp (\ s a -> s{_oiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oiKey :: Lens' OffersInsert' (Maybe Text) +oiKey = lens _oiKey (\ s a -> s{_oiKey = a}) + +-- | OAuth 2.0 token for the current user. +oiOauthToken :: Lens' OffersInsert' (Maybe Text) +oiOauthToken + = lens _oiOauthToken (\ s a -> s{_oiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oiFields :: Lens' OffersInsert' (Maybe Text) +oiFields = lens _oiFields (\ s a -> s{_oiFields = a}) + +-- | Data format for the response. +oiAlt :: Lens' OffersInsert' Text +oiAlt = lens _oiAlt (\ s a -> s{_oiAlt = a}) + +instance GoogleRequest OffersInsert' where + type Rs OffersInsert' = OfferDto + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u OffersInsert{..} + = go _oiQuotaUser _oiPrettyPrint _oiUserIp _oiKey + _oiOauthToken + _oiFields + _oiAlt + where go + = clientWithRoute (Proxy :: Proxy OffersInsertAPI) r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/List.hs new file mode 100644 index 000000000..17473a38c --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Offers/List.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.Offers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all offers the authenticated user has access to. +-- +-- /See:/ for @AdexchangebuyerOffersList@. +module AdExchangeBuyer.Offers.List + ( + -- * REST Resource + OffersListAPI + + -- * Creating a Request + , offersList + , OffersList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olUserIp + , olKey + , olOauthToken + , olFields + , olAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerOffersList@ which the +-- 'OffersList' request conforms to. +type OffersListAPI = + "offers" :> Get '[JSON] ListOffersResponse + +-- | Lists all offers the authenticated user has access to. +-- +-- /See:/ 'offersList' smart constructor. +data OffersList = OffersList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olUserIp :: !(Maybe Text) + , _olKey :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OffersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olUserIp' +-- +-- * 'olKey' +-- +-- * 'olOauthToken' +-- +-- * 'olFields' +-- +-- * 'olAlt' +offersList + :: OffersList +offersList = + OffersList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olUserIp = Nothing + , _olKey = Nothing + , _olOauthToken = Nothing + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OffersList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OffersList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OffersList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OffersList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OffersList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OffersList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OffersList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OffersList' where + type Rs OffersList' = ListOffersResponse + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u OffersList{..} + = go _olQuotaUser _olPrettyPrint _olUserIp _olKey + _olOauthToken + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy OffersListAPI) r u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PerformanceReport/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PerformanceReport/List.hs new file mode 100644 index 000000000..34e625949 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PerformanceReport/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PerformanceReport.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the authenticated user\'s list of performance metrics. +-- +-- /See:/ for @AdexchangebuyerPerformanceReportList@. +module AdExchangeBuyer.PerformanceReport.List + ( + -- * REST Resource + PerformanceReportListAPI + + -- * Creating a Request + , performanceReportList + , PerformanceReportList + + -- * Request Lenses + , prlQuotaUser + , prlPrettyPrint + , prlUserIp + , prlAccountId + , prlKey + , prlPageToken + , prlOauthToken + , prlEndDateTime + , prlMaxResults + , prlStartDateTime + , prlFields + , prlAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPerformanceReportList@ which the +-- 'PerformanceReportList' request conforms to. +type PerformanceReportListAPI = + "performancereport" :> + QueryParam "accountId" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "endDateTime" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "startDateTime" Text :> + Get '[JSON] PerformanceReportList + +-- | Retrieves the authenticated user\'s list of performance metrics. +-- +-- /See:/ 'performanceReportList' smart constructor. +data PerformanceReportList = PerformanceReportList + { _prlQuotaUser :: !(Maybe Text) + , _prlPrettyPrint :: !Bool + , _prlUserIp :: !(Maybe Text) + , _prlAccountId :: !Int64 + , _prlKey :: !(Maybe Text) + , _prlPageToken :: !(Maybe Text) + , _prlOauthToken :: !(Maybe Text) + , _prlEndDateTime :: !Text + , _prlMaxResults :: !(Maybe Word32) + , _prlStartDateTime :: !Text + , _prlFields :: !(Maybe Text) + , _prlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PerformanceReportList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prlQuotaUser' +-- +-- * 'prlPrettyPrint' +-- +-- * 'prlUserIp' +-- +-- * 'prlAccountId' +-- +-- * 'prlKey' +-- +-- * 'prlPageToken' +-- +-- * 'prlOauthToken' +-- +-- * 'prlEndDateTime' +-- +-- * 'prlMaxResults' +-- +-- * 'prlStartDateTime' +-- +-- * 'prlFields' +-- +-- * 'prlAlt' +performanceReportList + :: Int64 -- ^ 'accountId' + -> Text -- ^ 'endDateTime' + -> Text -- ^ 'startDateTime' + -> PerformanceReportList +performanceReportList pPrlAccountId_ pPrlEndDateTime_ pPrlStartDateTime_ = + PerformanceReportList + { _prlQuotaUser = Nothing + , _prlPrettyPrint = True + , _prlUserIp = Nothing + , _prlAccountId = pPrlAccountId_ + , _prlKey = Nothing + , _prlPageToken = Nothing + , _prlOauthToken = Nothing + , _prlEndDateTime = pPrlEndDateTime_ + , _prlMaxResults = Nothing + , _prlStartDateTime = pPrlStartDateTime_ + , _prlFields = Nothing + , _prlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prlQuotaUser :: Lens' PerformanceReportList' (Maybe Text) +prlQuotaUser + = lens _prlQuotaUser (\ s a -> s{_prlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prlPrettyPrint :: Lens' PerformanceReportList' Bool +prlPrettyPrint + = lens _prlPrettyPrint + (\ s a -> s{_prlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prlUserIp :: Lens' PerformanceReportList' (Maybe Text) +prlUserIp + = lens _prlUserIp (\ s a -> s{_prlUserIp = a}) + +-- | The account id to get the reports. +prlAccountId :: Lens' PerformanceReportList' Int64 +prlAccountId + = lens _prlAccountId (\ s a -> s{_prlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prlKey :: Lens' PerformanceReportList' (Maybe Text) +prlKey = lens _prlKey (\ s a -> s{_prlKey = a}) + +-- | A continuation token, used to page through performance reports. To +-- retrieve the next page, set this parameter to the value of +-- \"nextPageToken\" from the previous response. Optional. +prlPageToken :: Lens' PerformanceReportList' (Maybe Text) +prlPageToken + = lens _prlPageToken (\ s a -> s{_prlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +prlOauthToken :: Lens' PerformanceReportList' (Maybe Text) +prlOauthToken + = lens _prlOauthToken + (\ s a -> s{_prlOauthToken = a}) + +-- | The end time of the report in ISO 8601 timestamp format using UTC. +prlEndDateTime :: Lens' PerformanceReportList' Text +prlEndDateTime + = lens _prlEndDateTime + (\ s a -> s{_prlEndDateTime = a}) + +-- | Maximum number of entries returned on one result page. If not set, the +-- default is 100. Optional. +prlMaxResults :: Lens' PerformanceReportList' (Maybe Word32) +prlMaxResults + = lens _prlMaxResults + (\ s a -> s{_prlMaxResults = a}) + +-- | The start time of the report in ISO 8601 timestamp format using UTC. +prlStartDateTime :: Lens' PerformanceReportList' Text +prlStartDateTime + = lens _prlStartDateTime + (\ s a -> s{_prlStartDateTime = a}) + +-- | Selector specifying which fields to include in a partial response. +prlFields :: Lens' PerformanceReportList' (Maybe Text) +prlFields + = lens _prlFields (\ s a -> s{_prlFields = a}) + +-- | Data format for the response. +prlAlt :: Lens' PerformanceReportList' Text +prlAlt = lens _prlAlt (\ s a -> s{_prlAlt = a}) + +instance GoogleRequest PerformanceReportList' where + type Rs PerformanceReportList' = + PerformanceReportList + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PerformanceReportList{..} + = go _prlQuotaUser _prlPrettyPrint _prlUserIp + (Just _prlAccountId) + _prlKey + _prlPageToken + _prlOauthToken + (Just _prlEndDateTime) + _prlMaxResults + (Just _prlStartDateTime) + _prlFields + _prlAlt + where go + = clientWithRoute + (Proxy :: Proxy PerformanceReportListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Delete.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Delete.hs new file mode 100644 index 000000000..26949a46e --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing pretargeting config. +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigDelete@. +module AdExchangeBuyer.PretargetingConfig.Delete + ( + -- * REST Resource + PretargetingConfigDeleteAPI + + -- * Creating a Request + , pretargetingConfigDelete + , PretargetingConfigDelete + + -- * Request Lenses + , pcdQuotaUser + , pcdPrettyPrint + , pcdUserIp + , pcdAccountId + , pcdKey + , pcdConfigId + , pcdOauthToken + , pcdFields + , pcdAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigDelete@ which the +-- 'PretargetingConfigDelete' request conforms to. +type PretargetingConfigDeleteAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Capture "configId" Int64 :> Delete '[JSON] () + +-- | Deletes an existing pretargeting config. +-- +-- /See:/ 'pretargetingConfigDelete' smart constructor. +data PretargetingConfigDelete = PretargetingConfigDelete + { _pcdQuotaUser :: !(Maybe Text) + , _pcdPrettyPrint :: !Bool + , _pcdUserIp :: !(Maybe Text) + , _pcdAccountId :: !Int64 + , _pcdKey :: !(Maybe Text) + , _pcdConfigId :: !Int64 + , _pcdOauthToken :: !(Maybe Text) + , _pcdFields :: !(Maybe Text) + , _pcdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcdQuotaUser' +-- +-- * 'pcdPrettyPrint' +-- +-- * 'pcdUserIp' +-- +-- * 'pcdAccountId' +-- +-- * 'pcdKey' +-- +-- * 'pcdConfigId' +-- +-- * 'pcdOauthToken' +-- +-- * 'pcdFields' +-- +-- * 'pcdAlt' +pretargetingConfigDelete + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'configId' + -> PretargetingConfigDelete +pretargetingConfigDelete pPcdAccountId_ pPcdConfigId_ = + PretargetingConfigDelete + { _pcdQuotaUser = Nothing + , _pcdPrettyPrint = True + , _pcdUserIp = Nothing + , _pcdAccountId = pPcdAccountId_ + , _pcdKey = Nothing + , _pcdConfigId = pPcdConfigId_ + , _pcdOauthToken = Nothing + , _pcdFields = Nothing + , _pcdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcdQuotaUser :: Lens' PretargetingConfigDelete' (Maybe Text) +pcdQuotaUser + = lens _pcdQuotaUser (\ s a -> s{_pcdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcdPrettyPrint :: Lens' PretargetingConfigDelete' Bool +pcdPrettyPrint + = lens _pcdPrettyPrint + (\ s a -> s{_pcdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcdUserIp :: Lens' PretargetingConfigDelete' (Maybe Text) +pcdUserIp + = lens _pcdUserIp (\ s a -> s{_pcdUserIp = a}) + +-- | The account id to delete the pretargeting config for. +pcdAccountId :: Lens' PretargetingConfigDelete' Int64 +pcdAccountId + = lens _pcdAccountId (\ s a -> s{_pcdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcdKey :: Lens' PretargetingConfigDelete' (Maybe Text) +pcdKey = lens _pcdKey (\ s a -> s{_pcdKey = a}) + +-- | The specific id of the configuration to delete. +pcdConfigId :: Lens' PretargetingConfigDelete' Int64 +pcdConfigId + = lens _pcdConfigId (\ s a -> s{_pcdConfigId = a}) + +-- | OAuth 2.0 token for the current user. +pcdOauthToken :: Lens' PretargetingConfigDelete' (Maybe Text) +pcdOauthToken + = lens _pcdOauthToken + (\ s a -> s{_pcdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcdFields :: Lens' PretargetingConfigDelete' (Maybe Text) +pcdFields + = lens _pcdFields (\ s a -> s{_pcdFields = a}) + +-- | Data format for the response. +pcdAlt :: Lens' PretargetingConfigDelete' Text +pcdAlt = lens _pcdAlt (\ s a -> s{_pcdAlt = a}) + +instance GoogleRequest PretargetingConfigDelete' + where + type Rs PretargetingConfigDelete' = () + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigDelete{..} + = go _pcdQuotaUser _pcdPrettyPrint _pcdUserIp + _pcdAccountId + _pcdKey + _pcdConfigId + _pcdOauthToken + _pcdFields + _pcdAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigDeleteAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Get.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Get.hs new file mode 100644 index 000000000..0f34b5460 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific pretargeting configuration +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigGet@. +module AdExchangeBuyer.PretargetingConfig.Get + ( + -- * REST Resource + PretargetingConfigGetAPI + + -- * Creating a Request + , pretargetingConfigGet + , PretargetingConfigGet + + -- * Request Lenses + , pcgQuotaUser + , pcgPrettyPrint + , pcgUserIp + , pcgAccountId + , pcgKey + , pcgConfigId + , pcgOauthToken + , pcgFields + , pcgAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigGet@ which the +-- 'PretargetingConfigGet' request conforms to. +type PretargetingConfigGetAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Capture "configId" Int64 :> + Get '[JSON] PretargetingConfig + +-- | Gets a specific pretargeting configuration +-- +-- /See:/ 'pretargetingConfigGet' smart constructor. +data PretargetingConfigGet = PretargetingConfigGet + { _pcgQuotaUser :: !(Maybe Text) + , _pcgPrettyPrint :: !Bool + , _pcgUserIp :: !(Maybe Text) + , _pcgAccountId :: !Int64 + , _pcgKey :: !(Maybe Text) + , _pcgConfigId :: !Int64 + , _pcgOauthToken :: !(Maybe Text) + , _pcgFields :: !(Maybe Text) + , _pcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcgQuotaUser' +-- +-- * 'pcgPrettyPrint' +-- +-- * 'pcgUserIp' +-- +-- * 'pcgAccountId' +-- +-- * 'pcgKey' +-- +-- * 'pcgConfigId' +-- +-- * 'pcgOauthToken' +-- +-- * 'pcgFields' +-- +-- * 'pcgAlt' +pretargetingConfigGet + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'configId' + -> PretargetingConfigGet +pretargetingConfigGet pPcgAccountId_ pPcgConfigId_ = + PretargetingConfigGet + { _pcgQuotaUser = Nothing + , _pcgPrettyPrint = True + , _pcgUserIp = Nothing + , _pcgAccountId = pPcgAccountId_ + , _pcgKey = Nothing + , _pcgConfigId = pPcgConfigId_ + , _pcgOauthToken = Nothing + , _pcgFields = Nothing + , _pcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcgQuotaUser :: Lens' PretargetingConfigGet' (Maybe Text) +pcgQuotaUser + = lens _pcgQuotaUser (\ s a -> s{_pcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcgPrettyPrint :: Lens' PretargetingConfigGet' Bool +pcgPrettyPrint + = lens _pcgPrettyPrint + (\ s a -> s{_pcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcgUserIp :: Lens' PretargetingConfigGet' (Maybe Text) +pcgUserIp + = lens _pcgUserIp (\ s a -> s{_pcgUserIp = a}) + +-- | The account id to get the pretargeting config for. +pcgAccountId :: Lens' PretargetingConfigGet' Int64 +pcgAccountId + = lens _pcgAccountId (\ s a -> s{_pcgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcgKey :: Lens' PretargetingConfigGet' (Maybe Text) +pcgKey = lens _pcgKey (\ s a -> s{_pcgKey = a}) + +-- | The specific id of the configuration to retrieve. +pcgConfigId :: Lens' PretargetingConfigGet' Int64 +pcgConfigId + = lens _pcgConfigId (\ s a -> s{_pcgConfigId = a}) + +-- | OAuth 2.0 token for the current user. +pcgOauthToken :: Lens' PretargetingConfigGet' (Maybe Text) +pcgOauthToken + = lens _pcgOauthToken + (\ s a -> s{_pcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcgFields :: Lens' PretargetingConfigGet' (Maybe Text) +pcgFields + = lens _pcgFields (\ s a -> s{_pcgFields = a}) + +-- | Data format for the response. +pcgAlt :: Lens' PretargetingConfigGet' Text +pcgAlt = lens _pcgAlt (\ s a -> s{_pcgAlt = a}) + +instance GoogleRequest PretargetingConfigGet' where + type Rs PretargetingConfigGet' = PretargetingConfig + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigGet{..} + = go _pcgQuotaUser _pcgPrettyPrint _pcgUserIp + _pcgAccountId + _pcgKey + _pcgConfigId + _pcgOauthToken + _pcgFields + _pcgAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigGetAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Insert.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Insert.hs new file mode 100644 index 000000000..e6e1e31a5 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Insert.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new pretargeting configuration. +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigInsert@. +module AdExchangeBuyer.PretargetingConfig.Insert + ( + -- * REST Resource + PretargetingConfigInsertAPI + + -- * Creating a Request + , pretargetingConfigInsert + , PretargetingConfigInsert + + -- * Request Lenses + , pciQuotaUser + , pciPrettyPrint + , pciUserIp + , pciAccountId + , pciKey + , pciOauthToken + , pciFields + , pciAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigInsert@ which the +-- 'PretargetingConfigInsert' request conforms to. +type PretargetingConfigInsertAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Post '[JSON] PretargetingConfig + +-- | Inserts a new pretargeting configuration. +-- +-- /See:/ 'pretargetingConfigInsert' smart constructor. +data PretargetingConfigInsert = PretargetingConfigInsert + { _pciQuotaUser :: !(Maybe Text) + , _pciPrettyPrint :: !Bool + , _pciUserIp :: !(Maybe Text) + , _pciAccountId :: !Int64 + , _pciKey :: !(Maybe Text) + , _pciOauthToken :: !(Maybe Text) + , _pciFields :: !(Maybe Text) + , _pciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pciQuotaUser' +-- +-- * 'pciPrettyPrint' +-- +-- * 'pciUserIp' +-- +-- * 'pciAccountId' +-- +-- * 'pciKey' +-- +-- * 'pciOauthToken' +-- +-- * 'pciFields' +-- +-- * 'pciAlt' +pretargetingConfigInsert + :: Int64 -- ^ 'accountId' + -> PretargetingConfigInsert +pretargetingConfigInsert pPciAccountId_ = + PretargetingConfigInsert + { _pciQuotaUser = Nothing + , _pciPrettyPrint = True + , _pciUserIp = Nothing + , _pciAccountId = pPciAccountId_ + , _pciKey = Nothing + , _pciOauthToken = Nothing + , _pciFields = Nothing + , _pciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pciQuotaUser :: Lens' PretargetingConfigInsert' (Maybe Text) +pciQuotaUser + = lens _pciQuotaUser (\ s a -> s{_pciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pciPrettyPrint :: Lens' PretargetingConfigInsert' Bool +pciPrettyPrint + = lens _pciPrettyPrint + (\ s a -> s{_pciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pciUserIp :: Lens' PretargetingConfigInsert' (Maybe Text) +pciUserIp + = lens _pciUserIp (\ s a -> s{_pciUserIp = a}) + +-- | The account id to insert the pretargeting config for. +pciAccountId :: Lens' PretargetingConfigInsert' Int64 +pciAccountId + = lens _pciAccountId (\ s a -> s{_pciAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pciKey :: Lens' PretargetingConfigInsert' (Maybe Text) +pciKey = lens _pciKey (\ s a -> s{_pciKey = a}) + +-- | OAuth 2.0 token for the current user. +pciOauthToken :: Lens' PretargetingConfigInsert' (Maybe Text) +pciOauthToken + = lens _pciOauthToken + (\ s a -> s{_pciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pciFields :: Lens' PretargetingConfigInsert' (Maybe Text) +pciFields + = lens _pciFields (\ s a -> s{_pciFields = a}) + +-- | Data format for the response. +pciAlt :: Lens' PretargetingConfigInsert' Text +pciAlt = lens _pciAlt (\ s a -> s{_pciAlt = a}) + +instance GoogleRequest PretargetingConfigInsert' + where + type Rs PretargetingConfigInsert' = + PretargetingConfig + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigInsert{..} + = go _pciQuotaUser _pciPrettyPrint _pciUserIp + _pciAccountId + _pciKey + _pciOauthToken + _pciFields + _pciAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigInsertAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/List.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/List.hs new file mode 100644 index 000000000..6a14d48e3 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of the authenticated user\'s pretargeting +-- configurations. +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigList@. +module AdExchangeBuyer.PretargetingConfig.List + ( + -- * REST Resource + PretargetingConfigListAPI + + -- * Creating a Request + , pretargetingConfigList + , PretargetingConfigList + + -- * Request Lenses + , pclQuotaUser + , pclPrettyPrint + , pclUserIp + , pclAccountId + , pclKey + , pclOauthToken + , pclFields + , pclAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigList@ which the +-- 'PretargetingConfigList' request conforms to. +type PretargetingConfigListAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Get '[JSON] PretargetingConfigList + +-- | Retrieves a list of the authenticated user\'s pretargeting +-- configurations. +-- +-- /See:/ 'pretargetingConfigList' smart constructor. +data PretargetingConfigList = PretargetingConfigList + { _pclQuotaUser :: !(Maybe Text) + , _pclPrettyPrint :: !Bool + , _pclUserIp :: !(Maybe Text) + , _pclAccountId :: !Int64 + , _pclKey :: !(Maybe Text) + , _pclOauthToken :: !(Maybe Text) + , _pclFields :: !(Maybe Text) + , _pclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pclQuotaUser' +-- +-- * 'pclPrettyPrint' +-- +-- * 'pclUserIp' +-- +-- * 'pclAccountId' +-- +-- * 'pclKey' +-- +-- * 'pclOauthToken' +-- +-- * 'pclFields' +-- +-- * 'pclAlt' +pretargetingConfigList + :: Int64 -- ^ 'accountId' + -> PretargetingConfigList +pretargetingConfigList pPclAccountId_ = + PretargetingConfigList + { _pclQuotaUser = Nothing + , _pclPrettyPrint = True + , _pclUserIp = Nothing + , _pclAccountId = pPclAccountId_ + , _pclKey = Nothing + , _pclOauthToken = Nothing + , _pclFields = Nothing + , _pclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pclQuotaUser :: Lens' PretargetingConfigList' (Maybe Text) +pclQuotaUser + = lens _pclQuotaUser (\ s a -> s{_pclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pclPrettyPrint :: Lens' PretargetingConfigList' Bool +pclPrettyPrint + = lens _pclPrettyPrint + (\ s a -> s{_pclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pclUserIp :: Lens' PretargetingConfigList' (Maybe Text) +pclUserIp + = lens _pclUserIp (\ s a -> s{_pclUserIp = a}) + +-- | The account id to get the pretargeting configs for. +pclAccountId :: Lens' PretargetingConfigList' Int64 +pclAccountId + = lens _pclAccountId (\ s a -> s{_pclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pclKey :: Lens' PretargetingConfigList' (Maybe Text) +pclKey = lens _pclKey (\ s a -> s{_pclKey = a}) + +-- | OAuth 2.0 token for the current user. +pclOauthToken :: Lens' PretargetingConfigList' (Maybe Text) +pclOauthToken + = lens _pclOauthToken + (\ s a -> s{_pclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pclFields :: Lens' PretargetingConfigList' (Maybe Text) +pclFields + = lens _pclFields (\ s a -> s{_pclFields = a}) + +-- | Data format for the response. +pclAlt :: Lens' PretargetingConfigList' Text +pclAlt = lens _pclAlt (\ s a -> s{_pclAlt = a}) + +instance GoogleRequest PretargetingConfigList' where + type Rs PretargetingConfigList' = + PretargetingConfigList + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigList{..} + = go _pclQuotaUser _pclPrettyPrint _pclUserIp + _pclAccountId + _pclKey + _pclOauthToken + _pclFields + _pclAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigListAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Patch.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Patch.hs new file mode 100644 index 000000000..99cfb81b2 --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing pretargeting config. This method supports patch +-- semantics. +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigPatch@. +module AdExchangeBuyer.PretargetingConfig.Patch + ( + -- * REST Resource + PretargetingConfigPatchAPI + + -- * Creating a Request + , pretargetingConfigPatch + , PretargetingConfigPatch + + -- * Request Lenses + , pcpQuotaUser + , pcpPrettyPrint + , pcpUserIp + , pcpAccountId + , pcpKey + , pcpConfigId + , pcpOauthToken + , pcpFields + , pcpAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigPatch@ which the +-- 'PretargetingConfigPatch' request conforms to. +type PretargetingConfigPatchAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Capture "configId" Int64 :> + Patch '[JSON] PretargetingConfig + +-- | Updates an existing pretargeting config. This method supports patch +-- semantics. +-- +-- /See:/ 'pretargetingConfigPatch' smart constructor. +data PretargetingConfigPatch = PretargetingConfigPatch + { _pcpQuotaUser :: !(Maybe Text) + , _pcpPrettyPrint :: !Bool + , _pcpUserIp :: !(Maybe Text) + , _pcpAccountId :: !Int64 + , _pcpKey :: !(Maybe Text) + , _pcpConfigId :: !Int64 + , _pcpOauthToken :: !(Maybe Text) + , _pcpFields :: !(Maybe Text) + , _pcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcpQuotaUser' +-- +-- * 'pcpPrettyPrint' +-- +-- * 'pcpUserIp' +-- +-- * 'pcpAccountId' +-- +-- * 'pcpKey' +-- +-- * 'pcpConfigId' +-- +-- * 'pcpOauthToken' +-- +-- * 'pcpFields' +-- +-- * 'pcpAlt' +pretargetingConfigPatch + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'configId' + -> PretargetingConfigPatch +pretargetingConfigPatch pPcpAccountId_ pPcpConfigId_ = + PretargetingConfigPatch + { _pcpQuotaUser = Nothing + , _pcpPrettyPrint = True + , _pcpUserIp = Nothing + , _pcpAccountId = pPcpAccountId_ + , _pcpKey = Nothing + , _pcpConfigId = pPcpConfigId_ + , _pcpOauthToken = Nothing + , _pcpFields = Nothing + , _pcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcpQuotaUser :: Lens' PretargetingConfigPatch' (Maybe Text) +pcpQuotaUser + = lens _pcpQuotaUser (\ s a -> s{_pcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcpPrettyPrint :: Lens' PretargetingConfigPatch' Bool +pcpPrettyPrint + = lens _pcpPrettyPrint + (\ s a -> s{_pcpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcpUserIp :: Lens' PretargetingConfigPatch' (Maybe Text) +pcpUserIp + = lens _pcpUserIp (\ s a -> s{_pcpUserIp = a}) + +-- | The account id to update the pretargeting config for. +pcpAccountId :: Lens' PretargetingConfigPatch' Int64 +pcpAccountId + = lens _pcpAccountId (\ s a -> s{_pcpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcpKey :: Lens' PretargetingConfigPatch' (Maybe Text) +pcpKey = lens _pcpKey (\ s a -> s{_pcpKey = a}) + +-- | The specific id of the configuration to update. +pcpConfigId :: Lens' PretargetingConfigPatch' Int64 +pcpConfigId + = lens _pcpConfigId (\ s a -> s{_pcpConfigId = a}) + +-- | OAuth 2.0 token for the current user. +pcpOauthToken :: Lens' PretargetingConfigPatch' (Maybe Text) +pcpOauthToken + = lens _pcpOauthToken + (\ s a -> s{_pcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcpFields :: Lens' PretargetingConfigPatch' (Maybe Text) +pcpFields + = lens _pcpFields (\ s a -> s{_pcpFields = a}) + +-- | Data format for the response. +pcpAlt :: Lens' PretargetingConfigPatch' Text +pcpAlt = lens _pcpAlt (\ s a -> s{_pcpAlt = a}) + +instance GoogleRequest PretargetingConfigPatch' where + type Rs PretargetingConfigPatch' = PretargetingConfig + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigPatch{..} + = go _pcpQuotaUser _pcpPrettyPrint _pcpUserIp + _pcpAccountId + _pcpKey + _pcpConfigId + _pcpOauthToken + _pcpFields + _pcpAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigPatchAPI) + r + u diff --git a/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Update.hs b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Update.hs new file mode 100644 index 000000000..392e7c37d --- /dev/null +++ b/gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing pretargeting config. +-- +-- /See:/ for @AdexchangebuyerPretargetingConfigUpdate@. +module AdExchangeBuyer.PretargetingConfig.Update + ( + -- * REST Resource + PretargetingConfigUpdateAPI + + -- * Creating a Request + , pretargetingConfigUpdate + , PretargetingConfigUpdate + + -- * Request Lenses + , pcuQuotaUser + , pcuPrettyPrint + , pcuUserIp + , pcuAccountId + , pcuKey + , pcuConfigId + , pcuOauthToken + , pcuFields + , pcuAlt + ) where + +import Network.Google.AdExchangeBuyer.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangebuyerPretargetingConfigUpdate@ which the +-- 'PretargetingConfigUpdate' request conforms to. +type PretargetingConfigUpdateAPI = + "pretargetingconfigs" :> + Capture "accountId" Int64 :> + Capture "configId" Int64 :> + Put '[JSON] PretargetingConfig + +-- | Updates an existing pretargeting config. +-- +-- /See:/ 'pretargetingConfigUpdate' smart constructor. +data PretargetingConfigUpdate = PretargetingConfigUpdate + { _pcuQuotaUser :: !(Maybe Text) + , _pcuPrettyPrint :: !Bool + , _pcuUserIp :: !(Maybe Text) + , _pcuAccountId :: !Int64 + , _pcuKey :: !(Maybe Text) + , _pcuConfigId :: !Int64 + , _pcuOauthToken :: !(Maybe Text) + , _pcuFields :: !(Maybe Text) + , _pcuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PretargetingConfigUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcuQuotaUser' +-- +-- * 'pcuPrettyPrint' +-- +-- * 'pcuUserIp' +-- +-- * 'pcuAccountId' +-- +-- * 'pcuKey' +-- +-- * 'pcuConfigId' +-- +-- * 'pcuOauthToken' +-- +-- * 'pcuFields' +-- +-- * 'pcuAlt' +pretargetingConfigUpdate + :: Int64 -- ^ 'accountId' + -> Int64 -- ^ 'configId' + -> PretargetingConfigUpdate +pretargetingConfigUpdate pPcuAccountId_ pPcuConfigId_ = + PretargetingConfigUpdate + { _pcuQuotaUser = Nothing + , _pcuPrettyPrint = True + , _pcuUserIp = Nothing + , _pcuAccountId = pPcuAccountId_ + , _pcuKey = Nothing + , _pcuConfigId = pPcuConfigId_ + , _pcuOauthToken = Nothing + , _pcuFields = Nothing + , _pcuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcuQuotaUser :: Lens' PretargetingConfigUpdate' (Maybe Text) +pcuQuotaUser + = lens _pcuQuotaUser (\ s a -> s{_pcuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcuPrettyPrint :: Lens' PretargetingConfigUpdate' Bool +pcuPrettyPrint + = lens _pcuPrettyPrint + (\ s a -> s{_pcuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcuUserIp :: Lens' PretargetingConfigUpdate' (Maybe Text) +pcuUserIp + = lens _pcuUserIp (\ s a -> s{_pcuUserIp = a}) + +-- | The account id to update the pretargeting config for. +pcuAccountId :: Lens' PretargetingConfigUpdate' Int64 +pcuAccountId + = lens _pcuAccountId (\ s a -> s{_pcuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcuKey :: Lens' PretargetingConfigUpdate' (Maybe Text) +pcuKey = lens _pcuKey (\ s a -> s{_pcuKey = a}) + +-- | The specific id of the configuration to update. +pcuConfigId :: Lens' PretargetingConfigUpdate' Int64 +pcuConfigId + = lens _pcuConfigId (\ s a -> s{_pcuConfigId = a}) + +-- | OAuth 2.0 token for the current user. +pcuOauthToken :: Lens' PretargetingConfigUpdate' (Maybe Text) +pcuOauthToken + = lens _pcuOauthToken + (\ s a -> s{_pcuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcuFields :: Lens' PretargetingConfigUpdate' (Maybe Text) +pcuFields + = lens _pcuFields (\ s a -> s{_pcuFields = a}) + +-- | Data format for the response. +pcuAlt :: Lens' PretargetingConfigUpdate' Text +pcuAlt = lens _pcuAlt (\ s a -> s{_pcuAlt = a}) + +instance GoogleRequest PretargetingConfigUpdate' + where + type Rs PretargetingConfigUpdate' = + PretargetingConfig + request = requestWithRoute defReq adExchangeBuyerURL + requestWithRoute r u PretargetingConfigUpdate{..} + = go _pcuQuotaUser _pcuPrettyPrint _pcuUserIp + _pcuAccountId + _pcuKey + _pcuConfigId + _pcuOauthToken + _pcuFields + _pcuAlt + where go + = clientWithRoute + (Proxy :: Proxy PretargetingConfigUpdateAPI) + r + u diff --git a/gogol-adexchange-buyer/gogol-adexchange-buyer.cabal b/gogol-adexchange-buyer/gogol-adexchange-buyer.cabal new file mode 100644 index 000000000..51043d933 --- /dev/null +++ b/gogol-adexchange-buyer/gogol-adexchange-buyer.cabal @@ -0,0 +1,90 @@ +name: gogol-adexchange-buyer +version: 0.0.1 +synopsis: Ad Exchange Buyer API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Accesses your bidding-account information, submits creatives for + validation, finds available direct deals, and retrieves performance + reports. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdExchangeBuyer + , Network.Google.AdExchangeBuyer.Types + , Network.Google.Resource.AdExchangeBuyer.Accounts.Get + , Network.Google.Resource.AdExchangeBuyer.Accounts.List + , Network.Google.Resource.AdExchangeBuyer.Accounts.Patch + , Network.Google.Resource.AdExchangeBuyer.Accounts.Update + , Network.Google.Resource.AdExchangeBuyer.BillingInfo.Get + , Network.Google.Resource.AdExchangeBuyer.BillingInfo.List + , Network.Google.Resource.AdExchangeBuyer.Budget.Get + , Network.Google.Resource.AdExchangeBuyer.Budget.Patch + , Network.Google.Resource.AdExchangeBuyer.Budget.Update + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.Delete + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.Get + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.Insert + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.List + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.Patch + , Network.Google.Resource.AdExchangeBuyer.Clientaccess.Update + , Network.Google.Resource.AdExchangeBuyer.Creatives.Get + , Network.Google.Resource.AdExchangeBuyer.Creatives.Insert + , Network.Google.Resource.AdExchangeBuyer.Creatives.List + , Network.Google.Resource.AdExchangeBuyer.Deals.Get + , Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Delete + , Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Insert + , Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.List + , Network.Google.Resource.AdExchangeBuyer.Marketplacedeals.Update + , Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.Insert + , Network.Google.Resource.AdExchangeBuyer.Marketplacenotes.List + , Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Get + , Network.Google.Resource.AdExchangeBuyer.Marketplaceoffers.Search + , Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Get + , Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Insert + , Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Patch + , Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Search + , Network.Google.Resource.AdExchangeBuyer.Marketplaceorders.Update + , Network.Google.Resource.AdExchangeBuyer.Negotiationrounds.Insert + , Network.Google.Resource.AdExchangeBuyer.Negotiations.Get + , Network.Google.Resource.AdExchangeBuyer.Negotiations.Insert + , Network.Google.Resource.AdExchangeBuyer.Negotiations.List + , Network.Google.Resource.AdExchangeBuyer.Offers.Get + , Network.Google.Resource.AdExchangeBuyer.Offers.Insert + , Network.Google.Resource.AdExchangeBuyer.Offers.List + , Network.Google.Resource.AdExchangeBuyer.PerformanceReport.List + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Delete + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Get + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Insert + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.List + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Patch + , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Update + + other-modules: + Network.Google.AdExchangeBuyer.Types.Product + , Network.Google.AdExchangeBuyer.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-adexchange-buyer/src/.gitkeep b/gogol-adexchange-buyer/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-adexchange-seller/LICENSE b/gogol-adexchange-seller/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-adexchange-seller/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-adexchange-seller/Makefile b/gogol-adexchange-seller/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-adexchange-seller/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-adexchange-seller/README.md b/gogol-adexchange-seller/README.md new file mode 100644 index 000000000..afeaa775e --- /dev/null +++ b/gogol-adexchange-seller/README.md @@ -0,0 +1,28 @@ +# gogol-adexchange-seller + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Ad Exchange Seller API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-adexchange-seller` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-adexchange-seller/Setup.hs b/gogol-adexchange-seller/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-adexchange-seller/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller.hs b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller.hs new file mode 100644 index 000000000..44bc02618 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller.hs @@ -0,0 +1,239 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdExchangeSeller +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Gives Ad Exchange seller users access to their inventory and the ability +-- to generate reports +-- +-- /See:/ +module Network.Google.AdExchangeSeller + ( + -- * API + AdExchangeSellerAPI + , adExchangeSellerAPI + , adExchangeSellerURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdexchangesellerAccountsAdclientsList + , module AdExchangeSeller.Accounts.Adclients.List + + -- ** AdexchangesellerAccountsAlertsList + , module AdExchangeSeller.Accounts.Alerts.List + + -- ** AdexchangesellerAccountsCustomchannelsGet + , module AdExchangeSeller.Accounts.Customchannels.Get + + -- ** AdexchangesellerAccountsCustomchannelsList + , module AdExchangeSeller.Accounts.Customchannels.List + + -- ** AdexchangesellerAccountsGet + , module AdExchangeSeller.Accounts.Get + + -- ** AdexchangesellerAccountsList + , module AdExchangeSeller.Accounts.List + + -- ** AdexchangesellerAccountsMetadataDimensionsList + , module AdExchangeSeller.Accounts.Metadata.Dimensions.List + + -- ** AdexchangesellerAccountsMetadataMetricsList + , module AdExchangeSeller.Accounts.Metadata.Metrics.List + + -- ** AdexchangesellerAccountsPreferreddealsGet + , module AdExchangeSeller.Accounts.Preferreddeals.Get + + -- ** AdexchangesellerAccountsPreferreddealsList + , module AdExchangeSeller.Accounts.Preferreddeals.List + + -- ** AdexchangesellerAccountsReportsGenerate + , module AdExchangeSeller.Accounts.Reports.Generate + + -- ** AdexchangesellerAccountsReportsSavedGenerate + , module AdExchangeSeller.Accounts.Reports.Saved.Generate + + -- ** AdexchangesellerAccountsReportsSavedList + , module AdExchangeSeller.Accounts.Reports.Saved.List + + -- ** AdexchangesellerAccountsURLchannelsList + , module AdExchangeSeller.Accounts.URLchannels.List + + -- * Types + + -- ** ReportingMetadataEntry + , ReportingMetadataEntry + , reportingMetadataEntry + , rmeKind + , rmeRequiredMetrics + , rmeCompatibleMetrics + , rmeRequiredDimensions + , rmeId + , rmeCompatibleDimensions + , rmeSupportedProducts + + -- ** AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- ** Accounts + , Accounts + , accounts + , aEtag + , aNextPageToken + , aKind + , aItems + + -- ** Alerts + , Alerts + , alerts + , aleKind + , aleItems + + -- ** SavedReports + , SavedReports + , savedReports + , srEtag + , srNextPageToken + , srKind + , srItems + + -- ** SavedReport + , SavedReport + , savedReport + , sKind + , sName + , sId + + -- ** URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- ** CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- ** Alert + , Alert + , alert + , aaKind + , aaSeverity + , aaId + , aaType + , aaMessage + + -- ** Report + , Report + , report + , rKind + , rAverages + , rWarnings + , rRows + , rTotals + , rHeaders + , rTotalMatchedRows + + -- ** Account + , Account + , account + , accKind + , accName + , accId + + -- ** AdClient + , AdClient + , adClient + , adKind + , adArcOptIn + , adSupportsReporting + , adId + , adProductCode + + -- ** PreferredDeals + , PreferredDeals + , preferredDeals + , pdKind + , pdItems + + -- ** Metadata + , Metadata + , metadata + , mKind + , mItems + + -- ** CustomChannel + , CustomChannel + , customChannel + , cTargetingInfo + , cKind + , cName + , cCode + , cId + + -- ** URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- ** PreferredDeal + , PreferredDeal + , preferredDeal + , pAdvertiserName + , pCurrencyCode + , pStartTime + , pKind + , pBuyerNetworkName + , pEndTime + , pId + , pFixedCpm + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude +import Network.Google.Resource.AdExchangeSeller.Accounts.Adclients.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Alerts.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.Get +import Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Get +import Network.Google.Resource.AdExchangeSeller.Accounts.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Dimensions.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Metrics.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.Get +import Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.List +import Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Generate +import Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.Generate +import Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.List +import Network.Google.Resource.AdExchangeSeller.Accounts.URLchannels.List + +{- $resources +TODO +-} + +type AdExchangeSellerAPI = Accounts + +adExchangeSellerAPI :: Proxy AdExchangeSellerAPI +adExchangeSellerAPI = Proxy diff --git a/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types.hs b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types.hs new file mode 100644 index 000000000..8ce4c311a --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeSeller.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeSeller.Types + ( + -- * Service URL + adExchangeSellerURL + + -- * ReportingMetadataEntry + , ReportingMetadataEntry + , reportingMetadataEntry + , rmeKind + , rmeRequiredMetrics + , rmeCompatibleMetrics + , rmeRequiredDimensions + , rmeId + , rmeCompatibleDimensions + , rmeSupportedProducts + + -- * AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- * Accounts + , Accounts + , accounts + , aEtag + , aNextPageToken + , aKind + , aItems + + -- * Alerts + , Alerts + , alerts + , aleKind + , aleItems + + -- * SavedReports + , SavedReports + , savedReports + , srEtag + , srNextPageToken + , srKind + , srItems + + -- * SavedReport + , SavedReport + , savedReport + , sKind + , sName + , sId + + -- * URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- * CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- * Alert + , Alert + , alert + , aaKind + , aaSeverity + , aaId + , aaType + , aaMessage + + -- * Report + , Report + , report + , rKind + , rAverages + , rWarnings + , rRows + , rTotals + , rHeaders + , rTotalMatchedRows + + -- * Account + , Account + , account + , accKind + , accName + , accId + + -- * AdClient + , AdClient + , adClient + , adKind + , adArcOptIn + , adSupportsReporting + , adId + , adProductCode + + -- * PreferredDeals + , PreferredDeals + , preferredDeals + , pdKind + , pdItems + + -- * Metadata + , Metadata + , metadata + , mKind + , mItems + + -- * CustomChannel + , CustomChannel + , customChannel + , cTargetingInfo + , cKind + , cName + , cCode + , cId + + -- * URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- * PreferredDeal + , PreferredDeal + , preferredDeal + , pAdvertiserName + , pCurrencyCode + , pStartTime + , pKind + , pBuyerNetworkName + , pEndTime + , pId + , pFixedCpm + ) where + +import Network.Google.AdExchangeSeller.Types.Product +import Network.Google.AdExchangeSeller.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2.0' of the Ad Exchange Seller API. +adExchangeSellerURL :: BaseURL +adExchangeSellerURL + = BaseUrl Https + "https://www.googleapis.com/adexchangeseller/v2.0/" + 443 diff --git a/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs new file mode 100644 index 000000000..9b165c3ad --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs @@ -0,0 +1,1272 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeSeller.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeSeller.Types.Product where + +import Network.Google.AdExchangeSeller.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'reportingMetadataEntry' smart constructor. +data ReportingMetadataEntry = ReportingMetadataEntry + { _rmeKind :: !Text + , _rmeRequiredMetrics :: !(Maybe [Text]) + , _rmeCompatibleMetrics :: !(Maybe [Text]) + , _rmeRequiredDimensions :: !(Maybe [Text]) + , _rmeId :: !(Maybe Text) + , _rmeCompatibleDimensions :: !(Maybe [Text]) + , _rmeSupportedProducts :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportingMetadataEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmeKind' +-- +-- * 'rmeRequiredMetrics' +-- +-- * 'rmeCompatibleMetrics' +-- +-- * 'rmeRequiredDimensions' +-- +-- * 'rmeId' +-- +-- * 'rmeCompatibleDimensions' +-- +-- * 'rmeSupportedProducts' +reportingMetadataEntry + :: ReportingMetadataEntry +reportingMetadataEntry = + ReportingMetadataEntry + { _rmeKind = "adexchangeseller#reportingMetadataEntry" + , _rmeRequiredMetrics = Nothing + , _rmeCompatibleMetrics = Nothing + , _rmeRequiredDimensions = Nothing + , _rmeId = Nothing + , _rmeCompatibleDimensions = Nothing + , _rmeSupportedProducts = Nothing + } + +-- | Kind of resource this is, in this case +-- adexchangeseller#reportingMetadataEntry. +rmeKind :: Lens' ReportingMetadataEntry Text +rmeKind = lens _rmeKind (\ s a -> s{_rmeKind = a}) + +-- | The names of the metrics which the dimension or metric this reporting +-- metadata entry describes requires to also be present in order for the +-- report to be valid. Omitting these will not cause an error or warning, +-- but may result in data which cannot be correctly interpreted. +rmeRequiredMetrics :: Lens' ReportingMetadataEntry [Text] +rmeRequiredMetrics + = lens _rmeRequiredMetrics + (\ s a -> s{_rmeRequiredMetrics = a}) + . _Default + . _Coerce + +-- | The names of the metrics the dimension or metric this reporting metadata +-- entry describes is compatible with. +rmeCompatibleMetrics :: Lens' ReportingMetadataEntry [Text] +rmeCompatibleMetrics + = lens _rmeCompatibleMetrics + (\ s a -> s{_rmeCompatibleMetrics = a}) + . _Default + . _Coerce + +-- | The names of the dimensions which the dimension or metric this reporting +-- metadata entry describes requires to also be present in order for the +-- report to be valid. Omitting these will not cause an error or warning, +-- but may result in data which cannot be correctly interpreted. +rmeRequiredDimensions :: Lens' ReportingMetadataEntry [Text] +rmeRequiredDimensions + = lens _rmeRequiredDimensions + (\ s a -> s{_rmeRequiredDimensions = a}) + . _Default + . _Coerce + +-- | Unique identifier of this reporting metadata entry, corresponding to the +-- name of the appropriate dimension or metric. +rmeId :: Lens' ReportingMetadataEntry (Maybe Text) +rmeId = lens _rmeId (\ s a -> s{_rmeId = a}) + +-- | For metrics this is a list of dimension IDs which the metric is +-- compatible with, for dimensions it is a list of compatibility groups the +-- dimension belongs to. +rmeCompatibleDimensions :: Lens' ReportingMetadataEntry [Text] +rmeCompatibleDimensions + = lens _rmeCompatibleDimensions + (\ s a -> s{_rmeCompatibleDimensions = a}) + . _Default + . _Coerce + +-- | The codes of the projects supported by the dimension or metric this +-- reporting metadata entry describes. +rmeSupportedProducts :: Lens' ReportingMetadataEntry [Text] +rmeSupportedProducts + = lens _rmeSupportedProducts + (\ s a -> s{_rmeSupportedProducts = a}) + . _Default + . _Coerce + +instance FromJSON ReportingMetadataEntry where + parseJSON + = withObject "ReportingMetadataEntry" + (\ o -> + ReportingMetadataEntry <$> + (o .:? "kind" .!= + "adexchangeseller#reportingMetadataEntry") + <*> (o .:? "requiredMetrics" .!= mempty) + <*> (o .:? "compatibleMetrics" .!= mempty) + <*> (o .:? "requiredDimensions" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "compatibleDimensions" .!= mempty) + <*> (o .:? "supportedProducts" .!= mempty)) + +instance ToJSON ReportingMetadataEntry where + toJSON ReportingMetadataEntry{..} + = object + (catMaybes + [Just ("kind" .= _rmeKind), + ("requiredMetrics" .=) <$> _rmeRequiredMetrics, + ("compatibleMetrics" .=) <$> _rmeCompatibleMetrics, + ("requiredDimensions" .=) <$> _rmeRequiredDimensions, + ("id" .=) <$> _rmeId, + ("compatibleDimensions" .=) <$> + _rmeCompatibleDimensions, + ("supportedProducts" .=) <$> _rmeSupportedProducts]) + +-- +-- /See:/ 'adClients' smart constructor. +data AdClients = AdClients + { _acEtag :: !(Maybe Text) + , _acNextPageToken :: !(Maybe Text) + , _acKind :: !Text + , _acItems :: !(Maybe [Maybe AdClient]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClients' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acEtag' +-- +-- * 'acNextPageToken' +-- +-- * 'acKind' +-- +-- * 'acItems' +adClients + :: AdClients +adClients = + AdClients + { _acEtag = Nothing + , _acNextPageToken = Nothing + , _acKind = "adexchangeseller#adClients" + , _acItems = Nothing + } + +-- | ETag of this response for caching purposes. +acEtag :: Lens' AdClients (Maybe Text) +acEtag = lens _acEtag (\ s a -> s{_acEtag = a}) + +-- | Continuation token used to page through ad clients. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +acNextPageToken :: Lens' AdClients (Maybe Text) +acNextPageToken + = lens _acNextPageToken + (\ s a -> s{_acNextPageToken = a}) + +-- | Kind of list this is, in this case adexchangeseller#adClients. +acKind :: Lens' AdClients Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | The ad clients returned in this list response. +acItems :: Lens' AdClients [Maybe AdClient] +acItems + = lens _acItems (\ s a -> s{_acItems = a}) . _Default + . _Coerce + +instance FromJSON AdClients where + parseJSON + = withObject "AdClients" + (\ o -> + AdClients <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangeseller#adClients") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AdClients where + toJSON AdClients{..} + = object + (catMaybes + [("etag" .=) <$> _acEtag, + ("nextPageToken" .=) <$> _acNextPageToken, + Just ("kind" .= _acKind), ("items" .=) <$> _acItems]) + +-- +-- /See:/ 'accounts' smart constructor. +data Accounts = Accounts + { _aEtag :: !(Maybe Text) + , _aNextPageToken :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Account]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Accounts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aNextPageToken' +-- +-- * 'aKind' +-- +-- * 'aItems' +accounts + :: Accounts +accounts = + Accounts + { _aEtag = Nothing + , _aNextPageToken = Nothing + , _aKind = "adexchangeseller#accounts" + , _aItems = Nothing + } + +-- | ETag of this response for caching purposes. +aEtag :: Lens' Accounts (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Continuation token used to page through accounts. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +aNextPageToken :: Lens' Accounts (Maybe Text) +aNextPageToken + = lens _aNextPageToken + (\ s a -> s{_aNextPageToken = a}) + +-- | Kind of list this is, in this case adexchangeseller#accounts. +aKind :: Lens' Accounts Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The accounts returned in this list response. +aItems :: Lens' Accounts [Maybe Account] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Accounts where + parseJSON + = withObject "Accounts" + (\ o -> + Accounts <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangeseller#accounts") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Accounts where + toJSON Accounts{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, + ("nextPageToken" .=) <$> _aNextPageToken, + Just ("kind" .= _aKind), ("items" .=) <$> _aItems]) + +-- +-- /See:/ 'alerts' smart constructor. +data Alerts = Alerts + { _aleKind :: !Text + , _aleItems :: !(Maybe [Maybe Alert]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Alerts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aleKind' +-- +-- * 'aleItems' +alerts + :: Alerts +alerts = + Alerts + { _aleKind = "adexchangeseller#alerts" + , _aleItems = Nothing + } + +-- | Kind of list this is, in this case adexchangeseller#alerts. +aleKind :: Lens' Alerts Text +aleKind = lens _aleKind (\ s a -> s{_aleKind = a}) + +-- | The alerts returned in this list response. +aleItems :: Lens' Alerts [Maybe Alert] +aleItems + = lens _aleItems (\ s a -> s{_aleItems = a}) . + _Default + . _Coerce + +instance FromJSON Alerts where + parseJSON + = withObject "Alerts" + (\ o -> + Alerts <$> + (o .:? "kind" .!= "adexchangeseller#alerts") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Alerts where + toJSON Alerts{..} + = object + (catMaybes + [Just ("kind" .= _aleKind), + ("items" .=) <$> _aleItems]) + +-- +-- /See:/ 'savedReports' smart constructor. +data SavedReports = SavedReports + { _srEtag :: !(Maybe Text) + , _srNextPageToken :: !(Maybe Text) + , _srKind :: !Text + , _srItems :: !(Maybe [Maybe SavedReport]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedReports' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srEtag' +-- +-- * 'srNextPageToken' +-- +-- * 'srKind' +-- +-- * 'srItems' +savedReports + :: SavedReports +savedReports = + SavedReports + { _srEtag = Nothing + , _srNextPageToken = Nothing + , _srKind = "adexchangeseller#savedReports" + , _srItems = Nothing + } + +-- | ETag of this response for caching purposes. +srEtag :: Lens' SavedReports (Maybe Text) +srEtag = lens _srEtag (\ s a -> s{_srEtag = a}) + +-- | Continuation token used to page through saved reports. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +srNextPageToken :: Lens' SavedReports (Maybe Text) +srNextPageToken + = lens _srNextPageToken + (\ s a -> s{_srNextPageToken = a}) + +-- | Kind of list this is, in this case adexchangeseller#savedReports. +srKind :: Lens' SavedReports Text +srKind = lens _srKind (\ s a -> s{_srKind = a}) + +-- | The saved reports returned in this list response. +srItems :: Lens' SavedReports [Maybe SavedReport] +srItems + = lens _srItems (\ s a -> s{_srItems = a}) . _Default + . _Coerce + +instance FromJSON SavedReports where + parseJSON + = withObject "SavedReports" + (\ o -> + SavedReports <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangeseller#savedReports") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON SavedReports where + toJSON SavedReports{..} + = object + (catMaybes + [("etag" .=) <$> _srEtag, + ("nextPageToken" .=) <$> _srNextPageToken, + Just ("kind" .= _srKind), ("items" .=) <$> _srItems]) + +-- +-- /See:/ 'savedReport' smart constructor. +data SavedReport = SavedReport + { _sKind :: !Text + , _sName :: !(Maybe Text) + , _sId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sName' +-- +-- * 'sId' +savedReport + :: SavedReport +savedReport = + SavedReport + { _sKind = "adexchangeseller#savedReport" + , _sName = Nothing + , _sId = Nothing + } + +-- | Kind of resource this is, in this case adexchangeseller#savedReport. +sKind :: Lens' SavedReport Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | This saved report\'s name. +sName :: Lens' SavedReport (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | Unique identifier of this saved report. +sId :: Lens' SavedReport (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +instance FromJSON SavedReport where + parseJSON + = withObject "SavedReport" + (\ o -> + SavedReport <$> + (o .:? "kind" .!= "adexchangeseller#savedReport") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON SavedReport where + toJSON SavedReport{..} + = object + (catMaybes + [Just ("kind" .= _sKind), ("name" .=) <$> _sName, + ("id" .=) <$> _sId]) + +-- +-- /See:/ 'uRLChannels' smart constructor. +data URLChannels = URLChannels + { _ucEtag :: !(Maybe Text) + , _ucNextPageToken :: !(Maybe Text) + , _ucKind :: !Text + , _ucItems :: !(Maybe [Maybe URLChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucEtag' +-- +-- * 'ucNextPageToken' +-- +-- * 'ucKind' +-- +-- * 'ucItems' +uRLChannels + :: URLChannels +uRLChannels = + URLChannels + { _ucEtag = Nothing + , _ucNextPageToken = Nothing + , _ucKind = "adexchangeseller#urlChannels" + , _ucItems = Nothing + } + +-- | ETag of this response for caching purposes. +ucEtag :: Lens' URLChannels (Maybe Text) +ucEtag = lens _ucEtag (\ s a -> s{_ucEtag = a}) + +-- | Continuation token used to page through URL channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ucNextPageToken :: Lens' URLChannels (Maybe Text) +ucNextPageToken + = lens _ucNextPageToken + (\ s a -> s{_ucNextPageToken = a}) + +-- | Kind of list this is, in this case adexchangeseller#urlChannels. +ucKind :: Lens' URLChannels Text +ucKind = lens _ucKind (\ s a -> s{_ucKind = a}) + +-- | The URL channels returned in this list response. +ucItems :: Lens' URLChannels [Maybe URLChannel] +ucItems + = lens _ucItems (\ s a -> s{_ucItems = a}) . _Default + . _Coerce + +instance FromJSON URLChannels where + parseJSON + = withObject "URLChannels" + (\ o -> + URLChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangeseller#urlChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON URLChannels where + toJSON URLChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ucEtag, + ("nextPageToken" .=) <$> _ucNextPageToken, + Just ("kind" .= _ucKind), ("items" .=) <$> _ucItems]) + +-- +-- /See:/ 'customChannels' smart constructor. +data CustomChannels = CustomChannels + { _ccEtag :: !(Maybe Text) + , _ccNextPageToken :: !(Maybe Text) + , _ccKind :: !Text + , _ccItems :: !(Maybe [Maybe CustomChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccEtag' +-- +-- * 'ccNextPageToken' +-- +-- * 'ccKind' +-- +-- * 'ccItems' +customChannels + :: CustomChannels +customChannels = + CustomChannels + { _ccEtag = Nothing + , _ccNextPageToken = Nothing + , _ccKind = "adexchangeseller#customChannels" + , _ccItems = Nothing + } + +-- | ETag of this response for caching purposes. +ccEtag :: Lens' CustomChannels (Maybe Text) +ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a}) + +-- | Continuation token used to page through custom channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ccNextPageToken :: Lens' CustomChannels (Maybe Text) +ccNextPageToken + = lens _ccNextPageToken + (\ s a -> s{_ccNextPageToken = a}) + +-- | Kind of list this is, in this case adexchangeseller#customChannels. +ccKind :: Lens' CustomChannels Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | The custom channels returned in this list response. +ccItems :: Lens' CustomChannels [Maybe CustomChannel] +ccItems + = lens _ccItems (\ s a -> s{_ccItems = a}) . _Default + . _Coerce + +instance FromJSON CustomChannels where + parseJSON + = withObject "CustomChannels" + (\ o -> + CustomChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adexchangeseller#customChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CustomChannels where + toJSON CustomChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ccEtag, + ("nextPageToken" .=) <$> _ccNextPageToken, + Just ("kind" .= _ccKind), ("items" .=) <$> _ccItems]) + +-- +-- /See:/ 'alert' smart constructor. +data Alert = Alert + { _aaKind :: !Text + , _aaSeverity :: !(Maybe Text) + , _aaId :: !(Maybe Text) + , _aaType :: !(Maybe Text) + , _aaMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Alert' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaKind' +-- +-- * 'aaSeverity' +-- +-- * 'aaId' +-- +-- * 'aaType' +-- +-- * 'aaMessage' +alert + :: Alert +alert = + Alert + { _aaKind = "adexchangeseller#alert" + , _aaSeverity = Nothing + , _aaId = Nothing + , _aaType = Nothing + , _aaMessage = Nothing + } + +-- | Kind of resource this is, in this case adexchangeseller#alert. +aaKind :: Lens' Alert Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | Severity of this alert. Possible values: INFO, WARNING, SEVERE. +aaSeverity :: Lens' Alert (Maybe Text) +aaSeverity + = lens _aaSeverity (\ s a -> s{_aaSeverity = a}) + +-- | Unique identifier of this alert. This should be considered an opaque +-- identifier; it is not safe to rely on it being in any particular format. +aaId :: Lens' Alert (Maybe Text) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, +-- ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, +-- GRAYLISTED_PUBLISHER, API_HOLD. +aaType :: Lens' Alert (Maybe Text) +aaType = lens _aaType (\ s a -> s{_aaType = a}) + +-- | The localized alert message. +aaMessage :: Lens' Alert (Maybe Text) +aaMessage + = lens _aaMessage (\ s a -> s{_aaMessage = a}) + +instance FromJSON Alert where + parseJSON + = withObject "Alert" + (\ o -> + Alert <$> + (o .:? "kind" .!= "adexchangeseller#alert") <*> + (o .:? "severity") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "message")) + +instance ToJSON Alert where + toJSON Alert{..} + = object + (catMaybes + [Just ("kind" .= _aaKind), + ("severity" .=) <$> _aaSeverity, ("id" .=) <$> _aaId, + ("type" .=) <$> _aaType, + ("message" .=) <$> _aaMessage]) + +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rKind :: !Text + , _rAverages :: !(Maybe [Text]) + , _rWarnings :: !(Maybe [Text]) + , _rRows :: !(Maybe [[Text]]) + , _rTotals :: !(Maybe [Text]) + , _rHeaders :: !(Maybe [ReportHeadersItem]) + , _rTotalMatchedRows :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rKind' +-- +-- * 'rAverages' +-- +-- * 'rWarnings' +-- +-- * 'rRows' +-- +-- * 'rTotals' +-- +-- * 'rHeaders' +-- +-- * 'rTotalMatchedRows' +report + :: Report +report = + Report + { _rKind = "adexchangeseller#report" + , _rAverages = Nothing + , _rWarnings = Nothing + , _rRows = Nothing + , _rTotals = Nothing + , _rHeaders = Nothing + , _rTotalMatchedRows = Nothing + } + +-- | Kind this is, in this case adexchangeseller#report. +rKind :: Lens' Report Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The averages of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +rAverages :: Lens' Report [Text] +rAverages + = lens _rAverages (\ s a -> s{_rAverages = a}) . + _Default + . _Coerce + +-- | Any warnings associated with generation of the report. +rWarnings :: Lens' Report [Text] +rWarnings + = lens _rWarnings (\ s a -> s{_rWarnings = a}) . + _Default + . _Coerce + +-- | The output rows of the report. Each row is a list of cells; one for each +-- dimension in the request, followed by one for each metric in the +-- request. The dimension cells contain strings, and the metric cells +-- contain numbers. +rRows :: Lens' Report [[Text]] +rRows + = lens _rRows (\ s a -> s{_rRows = a}) . _Default . + _Coerce + +-- | The totals of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +rTotals :: Lens' Report [Text] +rTotals + = lens _rTotals (\ s a -> s{_rTotals = a}) . _Default + . _Coerce + +-- | The header information of the columns requested in the report. This is a +-- list of headers; one for each dimension in the request, followed by one +-- for each metric in the request. +rHeaders :: Lens' Report [ReportHeadersItem] +rHeaders + = lens _rHeaders (\ s a -> s{_rHeaders = a}) . + _Default + . _Coerce + +-- | The total number of rows matched by the report request. Fewer rows may +-- be returned in the response due to being limited by the row count +-- requested or the report row limit. +rTotalMatchedRows :: Lens' Report (Maybe Int64) +rTotalMatchedRows + = lens _rTotalMatchedRows + (\ s a -> s{_rTotalMatchedRows = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "kind" .!= "adexchangeseller#report") <*> + (o .:? "averages" .!= mempty) + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "totals" .!= mempty) + <*> (o .:? "headers" .!= mempty) + <*> (o .:? "totalMatchedRows")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [Just ("kind" .= _rKind), + ("averages" .=) <$> _rAverages, + ("warnings" .=) <$> _rWarnings, + ("rows" .=) <$> _rRows, ("totals" .=) <$> _rTotals, + ("headers" .=) <$> _rHeaders, + ("totalMatchedRows" .=) <$> _rTotalMatchedRows]) + +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _accKind :: !Text + , _accName :: !(Maybe Text) + , _accId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accKind' +-- +-- * 'accName' +-- +-- * 'accId' +account + :: Account +account = + Account + { _accKind = "adexchangeseller#account" + , _accName = Nothing + , _accId = Nothing + } + +-- | Kind of resource this is, in this case adexchangeseller#account. +accKind :: Lens' Account Text +accKind = lens _accKind (\ s a -> s{_accKind = a}) + +-- | Name of this account. +accName :: Lens' Account (Maybe Text) +accName = lens _accName (\ s a -> s{_accName = a}) + +-- | Unique identifier of this account. +accId :: Lens' Account (Maybe Text) +accId = lens _accId (\ s a -> s{_accId = a}) + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "kind" .!= "adexchangeseller#account") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [Just ("kind" .= _accKind), ("name" .=) <$> _accName, + ("id" .=) <$> _accId]) + +-- +-- /See:/ 'adClient' smart constructor. +data AdClient = AdClient + { _adKind :: !Text + , _adArcOptIn :: !(Maybe Bool) + , _adSupportsReporting :: !(Maybe Bool) + , _adId :: !(Maybe Text) + , _adProductCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClient' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adKind' +-- +-- * 'adArcOptIn' +-- +-- * 'adSupportsReporting' +-- +-- * 'adId' +-- +-- * 'adProductCode' +adClient + :: AdClient +adClient = + AdClient + { _adKind = "adexchangeseller#adClient" + , _adArcOptIn = Nothing + , _adSupportsReporting = Nothing + , _adId = Nothing + , _adProductCode = Nothing + } + +-- | Kind of resource this is, in this case adexchangeseller#adClient. +adKind :: Lens' AdClient Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | Whether this ad client is opted in to ARC. +adArcOptIn :: Lens' AdClient (Maybe Bool) +adArcOptIn + = lens _adArcOptIn (\ s a -> s{_adArcOptIn = a}) + +-- | Whether this ad client supports being reported on. +adSupportsReporting :: Lens' AdClient (Maybe Bool) +adSupportsReporting + = lens _adSupportsReporting + (\ s a -> s{_adSupportsReporting = a}) + +-- | Unique identifier of this ad client. +adId :: Lens' AdClient (Maybe Text) +adId = lens _adId (\ s a -> s{_adId = a}) + +-- | This ad client\'s product code, which corresponds to the PRODUCT_CODE +-- report dimension. +adProductCode :: Lens' AdClient (Maybe Text) +adProductCode + = lens _adProductCode + (\ s a -> s{_adProductCode = a}) + +instance FromJSON AdClient where + parseJSON + = withObject "AdClient" + (\ o -> + AdClient <$> + (o .:? "kind" .!= "adexchangeseller#adClient") <*> + (o .:? "arcOptIn") + <*> (o .:? "supportsReporting") + <*> (o .:? "id") + <*> (o .:? "productCode")) + +instance ToJSON AdClient where + toJSON AdClient{..} + = object + (catMaybes + [Just ("kind" .= _adKind), + ("arcOptIn" .=) <$> _adArcOptIn, + ("supportsReporting" .=) <$> _adSupportsReporting, + ("id" .=) <$> _adId, + ("productCode" .=) <$> _adProductCode]) + +-- +-- /See:/ 'preferredDeals' smart constructor. +data PreferredDeals = PreferredDeals + { _pdKind :: !Text + , _pdItems :: !(Maybe [Maybe PreferredDeal]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PreferredDeals' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdKind' +-- +-- * 'pdItems' +preferredDeals + :: PreferredDeals +preferredDeals = + PreferredDeals + { _pdKind = "adexchangeseller#preferredDeals" + , _pdItems = Nothing + } + +-- | Kind of list this is, in this case adexchangeseller#preferredDeals. +pdKind :: Lens' PreferredDeals Text +pdKind = lens _pdKind (\ s a -> s{_pdKind = a}) + +-- | The preferred deals returned in this list response. +pdItems :: Lens' PreferredDeals [Maybe PreferredDeal] +pdItems + = lens _pdItems (\ s a -> s{_pdItems = a}) . _Default + . _Coerce + +instance FromJSON PreferredDeals where + parseJSON + = withObject "PreferredDeals" + (\ o -> + PreferredDeals <$> + (o .:? "kind" .!= "adexchangeseller#preferredDeals") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PreferredDeals where + toJSON PreferredDeals{..} + = object + (catMaybes + [Just ("kind" .= _pdKind), + ("items" .=) <$> _pdItems]) + +-- +-- /See:/ 'metadata' smart constructor. +data Metadata = Metadata + { _mKind :: !Text + , _mItems :: !(Maybe [Maybe ReportingMetadataEntry]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mItems' +metadata + :: Metadata +metadata = + Metadata + { _mKind = "adexchangeseller#metadata" + , _mItems = Nothing + } + +-- | Kind of list this is, in this case adexchangeseller#metadata. +mKind :: Lens' Metadata Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +mItems :: Lens' Metadata [Maybe ReportingMetadataEntry] +mItems + = lens _mItems (\ s a -> s{_mItems = a}) . _Default . + _Coerce + +instance FromJSON Metadata where + parseJSON + = withObject "Metadata" + (\ o -> + Metadata <$> + (o .:? "kind" .!= "adexchangeseller#metadata") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Metadata where + toJSON Metadata{..} + = object + (catMaybes + [Just ("kind" .= _mKind), ("items" .=) <$> _mItems]) + +-- +-- /See:/ 'customChannel' smart constructor. +data CustomChannel = CustomChannel + { _cTargetingInfo :: !(Maybe CustomChannelTargetingInfo) + , _cKind :: !Text + , _cName :: !(Maybe Text) + , _cCode :: !(Maybe Text) + , _cId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cTargetingInfo' +-- +-- * 'cKind' +-- +-- * 'cName' +-- +-- * 'cCode' +-- +-- * 'cId' +customChannel + :: CustomChannel +customChannel = + CustomChannel + { _cTargetingInfo = Nothing + , _cKind = "adexchangeseller#customChannel" + , _cName = Nothing + , _cCode = Nothing + , _cId = Nothing + } + +-- | The targeting information of this custom channel, if activated. +cTargetingInfo :: Lens' CustomChannel (Maybe CustomChannelTargetingInfo) +cTargetingInfo + = lens _cTargetingInfo + (\ s a -> s{_cTargetingInfo = a}) + +-- | Kind of resource this is, in this case adexchangeseller#customChannel. +cKind :: Lens' CustomChannel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Name of this custom channel. +cName :: Lens' CustomChannel (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Code of this custom channel, not necessarily unique across ad clients. +cCode :: Lens' CustomChannel (Maybe Text) +cCode = lens _cCode (\ s a -> s{_cCode = a}) + +-- | Unique identifier of this custom channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +cId :: Lens' CustomChannel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +instance FromJSON CustomChannel where + parseJSON + = withObject "CustomChannel" + (\ o -> + CustomChannel <$> + (o .:? "targetingInfo") <*> + (o .:? "kind" .!= "adexchangeseller#customChannel") + <*> (o .:? "name") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON CustomChannel where + toJSON CustomChannel{..} + = object + (catMaybes + [("targetingInfo" .=) <$> _cTargetingInfo, + Just ("kind" .= _cKind), ("name" .=) <$> _cName, + ("code" .=) <$> _cCode, ("id" .=) <$> _cId]) + +-- +-- /See:/ 'uRLChannel' smart constructor. +data URLChannel = URLChannel + { _urlcKind :: !Text + , _urlcId :: !(Maybe Text) + , _urlcUrlPattern :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlcKind' +-- +-- * 'urlcId' +-- +-- * 'urlcUrlPattern' +uRLChannel + :: URLChannel +uRLChannel = + URLChannel + { _urlcKind = "adexchangeseller#urlChannel" + , _urlcId = Nothing + , _urlcUrlPattern = Nothing + } + +-- | Kind of resource this is, in this case adexchangeseller#urlChannel. +urlcKind :: Lens' URLChannel Text +urlcKind = lens _urlcKind (\ s a -> s{_urlcKind = a}) + +-- | Unique identifier of this URL channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +urlcId :: Lens' URLChannel (Maybe Text) +urlcId = lens _urlcId (\ s a -> s{_urlcId = a}) + +-- | URL Pattern of this URL channel. Does not include \"http:\/\/\" or +-- \"https:\/\/\". Example: www.example.com\/home +urlcUrlPattern :: Lens' URLChannel (Maybe Text) +urlcUrlPattern + = lens _urlcUrlPattern + (\ s a -> s{_urlcUrlPattern = a}) + +instance FromJSON URLChannel where + parseJSON + = withObject "URLChannel" + (\ o -> + URLChannel <$> + (o .:? "kind" .!= "adexchangeseller#urlChannel") <*> + (o .:? "id") + <*> (o .:? "urlPattern")) + +instance ToJSON URLChannel where + toJSON URLChannel{..} + = object + (catMaybes + [Just ("kind" .= _urlcKind), ("id" .=) <$> _urlcId, + ("urlPattern" .=) <$> _urlcUrlPattern]) + +-- +-- /See:/ 'preferredDeal' smart constructor. +data PreferredDeal = PreferredDeal + { _pAdvertiserName :: !(Maybe Text) + , _pCurrencyCode :: !(Maybe Text) + , _pStartTime :: !(Maybe Word64) + , _pKind :: !Text + , _pBuyerNetworkName :: !(Maybe Text) + , _pEndTime :: !(Maybe Word64) + , _pId :: !(Maybe Int64) + , _pFixedCpm :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PreferredDeal' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pAdvertiserName' +-- +-- * 'pCurrencyCode' +-- +-- * 'pStartTime' +-- +-- * 'pKind' +-- +-- * 'pBuyerNetworkName' +-- +-- * 'pEndTime' +-- +-- * 'pId' +-- +-- * 'pFixedCpm' +preferredDeal + :: PreferredDeal +preferredDeal = + PreferredDeal + { _pAdvertiserName = Nothing + , _pCurrencyCode = Nothing + , _pStartTime = Nothing + , _pKind = "adexchangeseller#preferredDeal" + , _pBuyerNetworkName = Nothing + , _pEndTime = Nothing + , _pId = Nothing + , _pFixedCpm = Nothing + } + +-- | The name of the advertiser this deal is for. +pAdvertiserName :: Lens' PreferredDeal (Maybe Text) +pAdvertiserName + = lens _pAdvertiserName + (\ s a -> s{_pAdvertiserName = a}) + +-- | The currency code that applies to the fixed_cpm value. If not set then +-- assumed to be USD. +pCurrencyCode :: Lens' PreferredDeal (Maybe Text) +pCurrencyCode + = lens _pCurrencyCode + (\ s a -> s{_pCurrencyCode = a}) + +-- | Time when this deal becomes active in seconds since the epoch (GMT). If +-- not set then this deal is active immediately upon creation. +pStartTime :: Lens' PreferredDeal (Maybe Word64) +pStartTime + = lens _pStartTime (\ s a -> s{_pStartTime = a}) + +-- | Kind of resource this is, in this case adexchangeseller#preferredDeal. +pKind :: Lens' PreferredDeal Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The name of the buyer network this deal is for. +pBuyerNetworkName :: Lens' PreferredDeal (Maybe Text) +pBuyerNetworkName + = lens _pBuyerNetworkName + (\ s a -> s{_pBuyerNetworkName = a}) + +-- | Time when this deal stops being active in seconds since the epoch (GMT). +-- If not set then this deal is valid until manually disabled by the +-- publisher. +pEndTime :: Lens' PreferredDeal (Maybe Word64) +pEndTime = lens _pEndTime (\ s a -> s{_pEndTime = a}) + +-- | Unique identifier of this preferred deal. +pId :: Lens' PreferredDeal (Maybe Int64) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | The fixed price for this preferred deal. In cpm micros of currency +-- according to currencyCode. If set, then this preferred deal is eligible +-- for the fixed price tier of buying (highest priority, pay exactly the +-- configured fixed price). +pFixedCpm :: Lens' PreferredDeal (Maybe Int64) +pFixedCpm + = lens _pFixedCpm (\ s a -> s{_pFixedCpm = a}) + +instance FromJSON PreferredDeal where + parseJSON + = withObject "PreferredDeal" + (\ o -> + PreferredDeal <$> + (o .:? "advertiserName") <*> (o .:? "currencyCode") + <*> (o .:? "startTime") + <*> + (o .:? "kind" .!= "adexchangeseller#preferredDeal") + <*> (o .:? "buyerNetworkName") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "fixedCpm")) + +instance ToJSON PreferredDeal where + toJSON PreferredDeal{..} + = object + (catMaybes + [("advertiserName" .=) <$> _pAdvertiserName, + ("currencyCode" .=) <$> _pCurrencyCode, + ("startTime" .=) <$> _pStartTime, + Just ("kind" .= _pKind), + ("buyerNetworkName" .=) <$> _pBuyerNetworkName, + ("endTime" .=) <$> _pEndTime, ("id" .=) <$> _pId, + ("fixedCpm" .=) <$> _pFixedCpm]) diff --git a/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Sum.hs b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Sum.hs new file mode 100644 index 000000000..43414fd39 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdExchangeSeller.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdExchangeSeller.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Adclients/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Adclients/List.hs new file mode 100644 index 000000000..83ed41306 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Adclients/List.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Adclients.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad clients in this Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsAdclientsList@. +module AdExchangeSeller.Accounts.Adclients.List + ( + -- * REST Resource + AccountsAdclientsListAPI + + -- * Creating a Request + , accountsAdclientsList + , AccountsAdclientsList + + -- * Request Lenses + , aalQuotaUser + , aalPrettyPrint + , aalUserIp + , aalAccountId + , aalKey + , aalPageToken + , aalOauthToken + , aalMaxResults + , aalFields + , aalAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsAdclientsList@ which the +-- 'AccountsAdclientsList' request conforms to. +type AccountsAdclientsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AdClients + +-- | List all ad clients in this Ad Exchange account. +-- +-- /See:/ 'accountsAdclientsList' smart constructor. +data AccountsAdclientsList = AccountsAdclientsList + { _aalQuotaUser :: !(Maybe Text) + , _aalPrettyPrint :: !Bool + , _aalUserIp :: !(Maybe Text) + , _aalAccountId :: !Text + , _aalKey :: !(Maybe Text) + , _aalPageToken :: !(Maybe Text) + , _aalOauthToken :: !(Maybe Text) + , _aalMaxResults :: !(Maybe Word32) + , _aalFields :: !(Maybe Text) + , _aalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdclientsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalQuotaUser' +-- +-- * 'aalPrettyPrint' +-- +-- * 'aalUserIp' +-- +-- * 'aalAccountId' +-- +-- * 'aalKey' +-- +-- * 'aalPageToken' +-- +-- * 'aalOauthToken' +-- +-- * 'aalMaxResults' +-- +-- * 'aalFields' +-- +-- * 'aalAlt' +accountsAdclientsList + :: Text -- ^ 'accountId' + -> AccountsAdclientsList +accountsAdclientsList pAalAccountId_ = + AccountsAdclientsList + { _aalQuotaUser = Nothing + , _aalPrettyPrint = True + , _aalUserIp = Nothing + , _aalAccountId = pAalAccountId_ + , _aalKey = Nothing + , _aalPageToken = Nothing + , _aalOauthToken = Nothing + , _aalMaxResults = Nothing + , _aalFields = Nothing + , _aalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aalQuotaUser :: Lens' AccountsAdclientsList' (Maybe Text) +aalQuotaUser + = lens _aalQuotaUser (\ s a -> s{_aalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aalPrettyPrint :: Lens' AccountsAdclientsList' Bool +aalPrettyPrint + = lens _aalPrettyPrint + (\ s a -> s{_aalPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aalUserIp :: Lens' AccountsAdclientsList' (Maybe Text) +aalUserIp + = lens _aalUserIp (\ s a -> s{_aalUserIp = a}) + +-- | Account to which the ad client belongs. +aalAccountId :: Lens' AccountsAdclientsList' Text +aalAccountId + = lens _aalAccountId (\ s a -> s{_aalAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aalKey :: Lens' AccountsAdclientsList' (Maybe Text) +aalKey = lens _aalKey (\ s a -> s{_aalKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aalPageToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalPageToken + = lens _aalPageToken (\ s a -> s{_aalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aalOauthToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalOauthToken + = lens _aalOauthToken + (\ s a -> s{_aalOauthToken = a}) + +-- | The maximum number of ad clients to include in the response, used for +-- paging. +aalMaxResults :: Lens' AccountsAdclientsList' (Maybe Word32) +aalMaxResults + = lens _aalMaxResults + (\ s a -> s{_aalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aalFields :: Lens' AccountsAdclientsList' (Maybe Text) +aalFields + = lens _aalFields (\ s a -> s{_aalFields = a}) + +-- | Data format for the response. +aalAlt :: Lens' AccountsAdclientsList' Text +aalAlt = lens _aalAlt (\ s a -> s{_aalAlt = a}) + +instance GoogleRequest AccountsAdclientsList' where + type Rs AccountsAdclientsList' = AdClients + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsAdclientsList{..} + = go _aalQuotaUser _aalPrettyPrint _aalUserIp + _aalAccountId + _aalKey + _aalPageToken + _aalOauthToken + _aalMaxResults + _aalFields + _aalAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdclientsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Alerts/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Alerts/List.hs new file mode 100644 index 000000000..7fb3e7866 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Alerts/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Alerts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the alerts for this Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsAlertsList@. +module AdExchangeSeller.Accounts.Alerts.List + ( + -- * REST Resource + AccountsAlertsListAPI + + -- * Creating a Request + , accountsAlertsList + , AccountsAlertsList + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aLocale + , aAccountId + , aKey + , aOauthToken + , aFields + , aAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsAlertsList@ which the +-- 'AccountsAlertsList' request conforms to. +type AccountsAlertsListAPI = + "accounts" :> + Capture "accountId" Text :> + "alerts" :> + QueryParam "locale" Text :> Get '[JSON] Alerts + +-- | List the alerts for this Ad Exchange account. +-- +-- /See:/ 'accountsAlertsList' smart constructor. +data AccountsAlertsList = AccountsAlertsList + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aLocale :: !(Maybe Text) + , _aAccountId :: !Text + , _aKey :: !(Maybe Text) + , _aOauthToken :: !(Maybe Text) + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAlertsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aLocale' +-- +-- * 'aAccountId' +-- +-- * 'aKey' +-- +-- * 'aOauthToken' +-- +-- * 'aFields' +-- +-- * 'aAlt' +accountsAlertsList + :: Text -- ^ 'accountId' + -> AccountsAlertsList +accountsAlertsList pAAccountId_ = + AccountsAlertsList + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aLocale = Nothing + , _aAccountId = pAAccountId_ + , _aKey = Nothing + , _aOauthToken = Nothing + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AccountsAlertsList' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AccountsAlertsList' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AccountsAlertsList' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | The locale to use for translating alert messages. The account locale +-- will be used if this is not supplied. The AdSense default (English) will +-- be used if the supplied locale is invalid or unsupported. +aLocale :: Lens' AccountsAlertsList' (Maybe Text) +aLocale = lens _aLocale (\ s a -> s{_aLocale = a}) + +-- | Account owning the alerts. +aAccountId :: Lens' AccountsAlertsList' Text +aAccountId + = lens _aAccountId (\ s a -> s{_aAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AccountsAlertsList' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AccountsAlertsList' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AccountsAlertsList' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AccountsAlertsList' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AccountsAlertsList' where + type Rs AccountsAlertsList' = Alerts + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsAlertsList{..} + = go _aQuotaUser _aPrettyPrint _aUserIp _aLocale + _aAccountId + _aKey + _aOauthToken + _aFields + _aAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAlertsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/Get.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/Get.hs new file mode 100644 index 000000000..39bbf5914 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/Get.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the specified custom channel from the specified ad client. +-- +-- /See:/ for @AdexchangesellerAccountsCustomchannelsGet@. +module AdExchangeSeller.Accounts.Customchannels.Get + ( + -- * REST Resource + AccountsCustomchannelsGetAPI + + -- * Creating a Request + , accountsCustomchannelsGet + , AccountsCustomchannelsGet + + -- * Request Lenses + , acgQuotaUser + , acgPrettyPrint + , acgCustomChannelId + , acgUserIp + , acgAdClientId + , acgAccountId + , acgKey + , acgOauthToken + , acgFields + , acgAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsCustomchannelsGet@ which the +-- 'AccountsCustomchannelsGet' request conforms to. +type AccountsCustomchannelsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + Get '[JSON] CustomChannel + +-- | Get the specified custom channel from the specified ad client. +-- +-- /See:/ 'accountsCustomchannelsGet' smart constructor. +data AccountsCustomchannelsGet = AccountsCustomchannelsGet + { _acgQuotaUser :: !(Maybe Text) + , _acgPrettyPrint :: !Bool + , _acgCustomChannelId :: !Text + , _acgUserIp :: !(Maybe Text) + , _acgAdClientId :: !Text + , _acgAccountId :: !Text + , _acgKey :: !(Maybe Text) + , _acgOauthToken :: !(Maybe Text) + , _acgFields :: !(Maybe Text) + , _acgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsCustomchannelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acgQuotaUser' +-- +-- * 'acgPrettyPrint' +-- +-- * 'acgCustomChannelId' +-- +-- * 'acgUserIp' +-- +-- * 'acgAdClientId' +-- +-- * 'acgAccountId' +-- +-- * 'acgKey' +-- +-- * 'acgOauthToken' +-- +-- * 'acgFields' +-- +-- * 'acgAlt' +accountsCustomchannelsGet + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsCustomchannelsGet +accountsCustomchannelsGet pAcgCustomChannelId_ pAcgAdClientId_ pAcgAccountId_ = + AccountsCustomchannelsGet + { _acgQuotaUser = Nothing + , _acgPrettyPrint = True + , _acgCustomChannelId = pAcgCustomChannelId_ + , _acgUserIp = Nothing + , _acgAdClientId = pAcgAdClientId_ + , _acgAccountId = pAcgAccountId_ + , _acgKey = Nothing + , _acgOauthToken = Nothing + , _acgFields = Nothing + , _acgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acgQuotaUser :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgQuotaUser + = lens _acgQuotaUser (\ s a -> s{_acgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acgPrettyPrint :: Lens' AccountsCustomchannelsGet' Bool +acgPrettyPrint + = lens _acgPrettyPrint + (\ s a -> s{_acgPrettyPrint = a}) + +-- | Custom channel to retrieve. +acgCustomChannelId :: Lens' AccountsCustomchannelsGet' Text +acgCustomChannelId + = lens _acgCustomChannelId + (\ s a -> s{_acgCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acgUserIp :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgUserIp + = lens _acgUserIp (\ s a -> s{_acgUserIp = a}) + +-- | Ad client which contains the custom channel. +acgAdClientId :: Lens' AccountsCustomchannelsGet' Text +acgAdClientId + = lens _acgAdClientId + (\ s a -> s{_acgAdClientId = a}) + +-- | Account to which the ad client belongs. +acgAccountId :: Lens' AccountsCustomchannelsGet' Text +acgAccountId + = lens _acgAccountId (\ s a -> s{_acgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acgKey :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgKey = lens _acgKey (\ s a -> s{_acgKey = a}) + +-- | OAuth 2.0 token for the current user. +acgOauthToken :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgOauthToken + = lens _acgOauthToken + (\ s a -> s{_acgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acgFields :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgFields + = lens _acgFields (\ s a -> s{_acgFields = a}) + +-- | Data format for the response. +acgAlt :: Lens' AccountsCustomchannelsGet' Text +acgAlt = lens _acgAlt (\ s a -> s{_acgAlt = a}) + +instance GoogleRequest AccountsCustomchannelsGet' + where + type Rs AccountsCustomchannelsGet' = CustomChannel + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsCustomchannelsGet{..} + = go _acgQuotaUser _acgPrettyPrint + _acgCustomChannelId + _acgUserIp + _acgAdClientId + _acgAccountId + _acgKey + _acgOauthToken + _acgFields + _acgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsCustomchannelsGetAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/List.hs new file mode 100644 index 000000000..d6bf54b91 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Customchannels/List.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all custom channels in the specified ad client for this Ad Exchange +-- account. +-- +-- /See:/ for @AdexchangesellerAccountsCustomchannelsList@. +module AdExchangeSeller.Accounts.Customchannels.List + ( + -- * REST Resource + AccountsCustomchannelsListAPI + + -- * Creating a Request + , accountsCustomchannelsList + , AccountsCustomchannelsList + + -- * Request Lenses + , aclQuotaUser + , aclPrettyPrint + , aclUserIp + , aclAdClientId + , aclAccountId + , aclKey + , aclPageToken + , aclOauthToken + , aclMaxResults + , aclFields + , aclAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsCustomchannelsList@ which the +-- 'AccountsCustomchannelsList' request conforms to. +type AccountsCustomchannelsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CustomChannels + +-- | List all custom channels in the specified ad client for this Ad Exchange +-- account. +-- +-- /See:/ 'accountsCustomchannelsList' smart constructor. +data AccountsCustomchannelsList = AccountsCustomchannelsList + { _aclQuotaUser :: !(Maybe Text) + , _aclPrettyPrint :: !Bool + , _aclUserIp :: !(Maybe Text) + , _aclAdClientId :: !Text + , _aclAccountId :: !Text + , _aclKey :: !(Maybe Text) + , _aclPageToken :: !(Maybe Text) + , _aclOauthToken :: !(Maybe Text) + , _aclMaxResults :: !(Maybe Word32) + , _aclFields :: !(Maybe Text) + , _aclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsCustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclQuotaUser' +-- +-- * 'aclPrettyPrint' +-- +-- * 'aclUserIp' +-- +-- * 'aclAdClientId' +-- +-- * 'aclAccountId' +-- +-- * 'aclKey' +-- +-- * 'aclPageToken' +-- +-- * 'aclOauthToken' +-- +-- * 'aclMaxResults' +-- +-- * 'aclFields' +-- +-- * 'aclAlt' +accountsCustomchannelsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsCustomchannelsList +accountsCustomchannelsList pAclAdClientId_ pAclAccountId_ = + AccountsCustomchannelsList + { _aclQuotaUser = Nothing + , _aclPrettyPrint = True + , _aclUserIp = Nothing + , _aclAdClientId = pAclAdClientId_ + , _aclAccountId = pAclAccountId_ + , _aclKey = Nothing + , _aclPageToken = Nothing + , _aclOauthToken = Nothing + , _aclMaxResults = Nothing + , _aclFields = Nothing + , _aclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aclQuotaUser :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclQuotaUser + = lens _aclQuotaUser (\ s a -> s{_aclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aclPrettyPrint :: Lens' AccountsCustomchannelsList' Bool +aclPrettyPrint + = lens _aclPrettyPrint + (\ s a -> s{_aclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aclUserIp :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclUserIp + = lens _aclUserIp (\ s a -> s{_aclUserIp = a}) + +-- | Ad client for which to list custom channels. +aclAdClientId :: Lens' AccountsCustomchannelsList' Text +aclAdClientId + = lens _aclAdClientId + (\ s a -> s{_aclAdClientId = a}) + +-- | Account to which the ad client belongs. +aclAccountId :: Lens' AccountsCustomchannelsList' Text +aclAccountId + = lens _aclAccountId (\ s a -> s{_aclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aclKey :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclKey = lens _aclKey (\ s a -> s{_aclKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +aclPageToken :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclPageToken + = lens _aclPageToken (\ s a -> s{_aclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aclOauthToken :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclOauthToken + = lens _aclOauthToken + (\ s a -> s{_aclOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +aclMaxResults :: Lens' AccountsCustomchannelsList' (Maybe Word32) +aclMaxResults + = lens _aclMaxResults + (\ s a -> s{_aclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aclFields :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclFields + = lens _aclFields (\ s a -> s{_aclFields = a}) + +-- | Data format for the response. +aclAlt :: Lens' AccountsCustomchannelsList' Text +aclAlt = lens _aclAlt (\ s a -> s{_aclAlt = a}) + +instance GoogleRequest AccountsCustomchannelsList' + where + type Rs AccountsCustomchannelsList' = CustomChannels + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsCustomchannelsList{..} + = go _aclQuotaUser _aclPrettyPrint _aclUserIp + _aclAdClientId + _aclAccountId + _aclKey + _aclPageToken + _aclOauthToken + _aclMaxResults + _aclFields + _aclAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsCustomchannelsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Get.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Get.hs new file mode 100644 index 000000000..c9210104c --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Get.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about the selected Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsGet@. +module AdExchangeSeller.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agAccountId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "accounts" :> + Capture "accountId" Text :> Get '[JSON] Account + +-- | Get information about the selected Ad Exchange account. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agAccountId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agAccountId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +accountsGet + :: Text -- ^ 'accountId' + -> AccountsGet +accountsGet pAgAccountId_ = + AccountsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agAccountId = pAgAccountId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AccountsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AccountsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AccountsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | Account to get information about. Tip: \'myaccount\' is a valid ID. +agAccountId :: Lens' AccountsGet' Text +agAccountId + = lens _agAccountId (\ s a -> s{_agAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AccountsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AccountsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AccountsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AccountsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agAccountId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/List.hs new file mode 100644 index 000000000..9c896d9fc --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/List.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all accounts available to this Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsList@. +module AdExchangeSeller.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "accounts" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Accounts + +-- | List all accounts available to this Ad Exchange account. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +accountsList + :: AccountsList +accountsList = + AccountsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AccountsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AccountsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AccountsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AccountsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | A continuation token, used to page through accounts. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +alPageToken :: Lens' AccountsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AccountsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of accounts to include in the response, used for +-- paging. +alMaxResults :: Lens' AccountsList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AccountsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AccountsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = Accounts + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Dimensions/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Dimensions/List.hs new file mode 100644 index 000000000..e3d8a5726 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Dimensions/List.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Dimensions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the metadata for the dimensions available to this AdExchange +-- account. +-- +-- /See:/ for @AdexchangesellerAccountsMetadataDimensionsList@. +module AdExchangeSeller.Accounts.Metadata.Dimensions.List + ( + -- * REST Resource + AccountsMetadataDimensionsListAPI + + -- * Creating a Request + , accountsMetadataDimensionsList + , AccountsMetadataDimensionsList + + -- * Request Lenses + , amdlQuotaUser + , amdlPrettyPrint + , amdlUserIp + , amdlAccountId + , amdlKey + , amdlOauthToken + , amdlFields + , amdlAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsMetadataDimensionsList@ which the +-- 'AccountsMetadataDimensionsList' request conforms to. +type AccountsMetadataDimensionsListAPI = + "accounts" :> + Capture "accountId" Text :> + "metadata" :> "dimensions" :> Get '[JSON] Metadata + +-- | List the metadata for the dimensions available to this AdExchange +-- account. +-- +-- /See:/ 'accountsMetadataDimensionsList' smart constructor. +data AccountsMetadataDimensionsList = AccountsMetadataDimensionsList + { _amdlQuotaUser :: !(Maybe Text) + , _amdlPrettyPrint :: !Bool + , _amdlUserIp :: !(Maybe Text) + , _amdlAccountId :: !Text + , _amdlKey :: !(Maybe Text) + , _amdlOauthToken :: !(Maybe Text) + , _amdlFields :: !(Maybe Text) + , _amdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsMetadataDimensionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amdlQuotaUser' +-- +-- * 'amdlPrettyPrint' +-- +-- * 'amdlUserIp' +-- +-- * 'amdlAccountId' +-- +-- * 'amdlKey' +-- +-- * 'amdlOauthToken' +-- +-- * 'amdlFields' +-- +-- * 'amdlAlt' +accountsMetadataDimensionsList + :: Text -- ^ 'accountId' + -> AccountsMetadataDimensionsList +accountsMetadataDimensionsList pAmdlAccountId_ = + AccountsMetadataDimensionsList + { _amdlQuotaUser = Nothing + , _amdlPrettyPrint = True + , _amdlUserIp = Nothing + , _amdlAccountId = pAmdlAccountId_ + , _amdlKey = Nothing + , _amdlOauthToken = Nothing + , _amdlFields = Nothing + , _amdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +amdlQuotaUser :: Lens' AccountsMetadataDimensionsList' (Maybe Text) +amdlQuotaUser + = lens _amdlQuotaUser + (\ s a -> s{_amdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amdlPrettyPrint :: Lens' AccountsMetadataDimensionsList' Bool +amdlPrettyPrint + = lens _amdlPrettyPrint + (\ s a -> s{_amdlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +amdlUserIp :: Lens' AccountsMetadataDimensionsList' (Maybe Text) +amdlUserIp + = lens _amdlUserIp (\ s a -> s{_amdlUserIp = a}) + +-- | Account with visibility to the dimensions. +amdlAccountId :: Lens' AccountsMetadataDimensionsList' Text +amdlAccountId + = lens _amdlAccountId + (\ s a -> s{_amdlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amdlKey :: Lens' AccountsMetadataDimensionsList' (Maybe Text) +amdlKey = lens _amdlKey (\ s a -> s{_amdlKey = a}) + +-- | OAuth 2.0 token for the current user. +amdlOauthToken :: Lens' AccountsMetadataDimensionsList' (Maybe Text) +amdlOauthToken + = lens _amdlOauthToken + (\ s a -> s{_amdlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amdlFields :: Lens' AccountsMetadataDimensionsList' (Maybe Text) +amdlFields + = lens _amdlFields (\ s a -> s{_amdlFields = a}) + +-- | Data format for the response. +amdlAlt :: Lens' AccountsMetadataDimensionsList' Text +amdlAlt = lens _amdlAlt (\ s a -> s{_amdlAlt = a}) + +instance GoogleRequest + AccountsMetadataDimensionsList' where + type Rs AccountsMetadataDimensionsList' = Metadata + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u + AccountsMetadataDimensionsList{..} + = go _amdlQuotaUser _amdlPrettyPrint _amdlUserIp + _amdlAccountId + _amdlKey + _amdlOauthToken + _amdlFields + _amdlAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsMetadataDimensionsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Metrics/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Metrics/List.hs new file mode 100644 index 000000000..fe4151708 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Metadata/Metrics/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Metrics.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the metadata for the metrics available to this AdExchange account. +-- +-- /See:/ for @AdexchangesellerAccountsMetadataMetricsList@. +module AdExchangeSeller.Accounts.Metadata.Metrics.List + ( + -- * REST Resource + AccountsMetadataMetricsListAPI + + -- * Creating a Request + , accountsMetadataMetricsList + , AccountsMetadataMetricsList + + -- * Request Lenses + , ammlQuotaUser + , ammlPrettyPrint + , ammlUserIp + , ammlAccountId + , ammlKey + , ammlOauthToken + , ammlFields + , ammlAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsMetadataMetricsList@ which the +-- 'AccountsMetadataMetricsList' request conforms to. +type AccountsMetadataMetricsListAPI = + "accounts" :> + Capture "accountId" Text :> + "metadata" :> "metrics" :> Get '[JSON] Metadata + +-- | List the metadata for the metrics available to this AdExchange account. +-- +-- /See:/ 'accountsMetadataMetricsList' smart constructor. +data AccountsMetadataMetricsList = AccountsMetadataMetricsList + { _ammlQuotaUser :: !(Maybe Text) + , _ammlPrettyPrint :: !Bool + , _ammlUserIp :: !(Maybe Text) + , _ammlAccountId :: !Text + , _ammlKey :: !(Maybe Text) + , _ammlOauthToken :: !(Maybe Text) + , _ammlFields :: !(Maybe Text) + , _ammlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsMetadataMetricsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ammlQuotaUser' +-- +-- * 'ammlPrettyPrint' +-- +-- * 'ammlUserIp' +-- +-- * 'ammlAccountId' +-- +-- * 'ammlKey' +-- +-- * 'ammlOauthToken' +-- +-- * 'ammlFields' +-- +-- * 'ammlAlt' +accountsMetadataMetricsList + :: Text -- ^ 'accountId' + -> AccountsMetadataMetricsList +accountsMetadataMetricsList pAmmlAccountId_ = + AccountsMetadataMetricsList + { _ammlQuotaUser = Nothing + , _ammlPrettyPrint = True + , _ammlUserIp = Nothing + , _ammlAccountId = pAmmlAccountId_ + , _ammlKey = Nothing + , _ammlOauthToken = Nothing + , _ammlFields = Nothing + , _ammlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ammlQuotaUser :: Lens' AccountsMetadataMetricsList' (Maybe Text) +ammlQuotaUser + = lens _ammlQuotaUser + (\ s a -> s{_ammlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ammlPrettyPrint :: Lens' AccountsMetadataMetricsList' Bool +ammlPrettyPrint + = lens _ammlPrettyPrint + (\ s a -> s{_ammlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ammlUserIp :: Lens' AccountsMetadataMetricsList' (Maybe Text) +ammlUserIp + = lens _ammlUserIp (\ s a -> s{_ammlUserIp = a}) + +-- | Account with visibility to the metrics. +ammlAccountId :: Lens' AccountsMetadataMetricsList' Text +ammlAccountId + = lens _ammlAccountId + (\ s a -> s{_ammlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ammlKey :: Lens' AccountsMetadataMetricsList' (Maybe Text) +ammlKey = lens _ammlKey (\ s a -> s{_ammlKey = a}) + +-- | OAuth 2.0 token for the current user. +ammlOauthToken :: Lens' AccountsMetadataMetricsList' (Maybe Text) +ammlOauthToken + = lens _ammlOauthToken + (\ s a -> s{_ammlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ammlFields :: Lens' AccountsMetadataMetricsList' (Maybe Text) +ammlFields + = lens _ammlFields (\ s a -> s{_ammlFields = a}) + +-- | Data format for the response. +ammlAlt :: Lens' AccountsMetadataMetricsList' Text +ammlAlt = lens _ammlAlt (\ s a -> s{_ammlAlt = a}) + +instance GoogleRequest AccountsMetadataMetricsList' + where + type Rs AccountsMetadataMetricsList' = Metadata + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsMetadataMetricsList{..} + = go _ammlQuotaUser _ammlPrettyPrint _ammlUserIp + _ammlAccountId + _ammlKey + _ammlOauthToken + _ammlFields + _ammlAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsMetadataMetricsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/Get.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/Get.hs new file mode 100644 index 000000000..e506a6520 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about the selected Ad Exchange Preferred Deal. +-- +-- /See:/ for @AdexchangesellerAccountsPreferreddealsGet@. +module AdExchangeSeller.Accounts.Preferreddeals.Get + ( + -- * REST Resource + AccountsPreferreddealsGetAPI + + -- * Creating a Request + , accountsPreferreddealsGet + , AccountsPreferreddealsGet + + -- * Request Lenses + , apgQuotaUser + , apgPrettyPrint + , apgUserIp + , apgDealId + , apgAccountId + , apgKey + , apgOauthToken + , apgFields + , apgAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsPreferreddealsGet@ which the +-- 'AccountsPreferreddealsGet' request conforms to. +type AccountsPreferreddealsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "preferreddeals" :> + Capture "dealId" Text :> Get '[JSON] PreferredDeal + +-- | Get information about the selected Ad Exchange Preferred Deal. +-- +-- /See:/ 'accountsPreferreddealsGet' smart constructor. +data AccountsPreferreddealsGet = AccountsPreferreddealsGet + { _apgQuotaUser :: !(Maybe Text) + , _apgPrettyPrint :: !Bool + , _apgUserIp :: !(Maybe Text) + , _apgDealId :: !Text + , _apgAccountId :: !Text + , _apgKey :: !(Maybe Text) + , _apgOauthToken :: !(Maybe Text) + , _apgFields :: !(Maybe Text) + , _apgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPreferreddealsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apgQuotaUser' +-- +-- * 'apgPrettyPrint' +-- +-- * 'apgUserIp' +-- +-- * 'apgDealId' +-- +-- * 'apgAccountId' +-- +-- * 'apgKey' +-- +-- * 'apgOauthToken' +-- +-- * 'apgFields' +-- +-- * 'apgAlt' +accountsPreferreddealsGet + :: Text -- ^ 'dealId' + -> Text -- ^ 'accountId' + -> AccountsPreferreddealsGet +accountsPreferreddealsGet pApgDealId_ pApgAccountId_ = + AccountsPreferreddealsGet + { _apgQuotaUser = Nothing + , _apgPrettyPrint = True + , _apgUserIp = Nothing + , _apgDealId = pApgDealId_ + , _apgAccountId = pApgAccountId_ + , _apgKey = Nothing + , _apgOauthToken = Nothing + , _apgFields = Nothing + , _apgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apgQuotaUser :: Lens' AccountsPreferreddealsGet' (Maybe Text) +apgQuotaUser + = lens _apgQuotaUser (\ s a -> s{_apgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apgPrettyPrint :: Lens' AccountsPreferreddealsGet' Bool +apgPrettyPrint + = lens _apgPrettyPrint + (\ s a -> s{_apgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apgUserIp :: Lens' AccountsPreferreddealsGet' (Maybe Text) +apgUserIp + = lens _apgUserIp (\ s a -> s{_apgUserIp = a}) + +-- | Preferred deal to get information about. +apgDealId :: Lens' AccountsPreferreddealsGet' Text +apgDealId + = lens _apgDealId (\ s a -> s{_apgDealId = a}) + +-- | Account owning the deal. +apgAccountId :: Lens' AccountsPreferreddealsGet' Text +apgAccountId + = lens _apgAccountId (\ s a -> s{_apgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apgKey :: Lens' AccountsPreferreddealsGet' (Maybe Text) +apgKey = lens _apgKey (\ s a -> s{_apgKey = a}) + +-- | OAuth 2.0 token for the current user. +apgOauthToken :: Lens' AccountsPreferreddealsGet' (Maybe Text) +apgOauthToken + = lens _apgOauthToken + (\ s a -> s{_apgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apgFields :: Lens' AccountsPreferreddealsGet' (Maybe Text) +apgFields + = lens _apgFields (\ s a -> s{_apgFields = a}) + +-- | Data format for the response. +apgAlt :: Lens' AccountsPreferreddealsGet' Text +apgAlt = lens _apgAlt (\ s a -> s{_apgAlt = a}) + +instance GoogleRequest AccountsPreferreddealsGet' + where + type Rs AccountsPreferreddealsGet' = PreferredDeal + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsPreferreddealsGet{..} + = go _apgQuotaUser _apgPrettyPrint _apgUserIp + _apgDealId + _apgAccountId + _apgKey + _apgOauthToken + _apgFields + _apgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPreferreddealsGetAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/List.hs new file mode 100644 index 000000000..f0b857c35 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Preferreddeals/List.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the preferred deals for this Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsPreferreddealsList@. +module AdExchangeSeller.Accounts.Preferreddeals.List + ( + -- * REST Resource + AccountsPreferreddealsListAPI + + -- * Creating a Request + , accountsPreferreddealsList + , AccountsPreferreddealsList + + -- * Request Lenses + , aplQuotaUser + , aplPrettyPrint + , aplUserIp + , aplAccountId + , aplKey + , aplOauthToken + , aplFields + , aplAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsPreferreddealsList@ which the +-- 'AccountsPreferreddealsList' request conforms to. +type AccountsPreferreddealsListAPI = + "accounts" :> + Capture "accountId" Text :> + "preferreddeals" :> Get '[JSON] PreferredDeals + +-- | List the preferred deals for this Ad Exchange account. +-- +-- /See:/ 'accountsPreferreddealsList' smart constructor. +data AccountsPreferreddealsList = AccountsPreferreddealsList + { _aplQuotaUser :: !(Maybe Text) + , _aplPrettyPrint :: !Bool + , _aplUserIp :: !(Maybe Text) + , _aplAccountId :: !Text + , _aplKey :: !(Maybe Text) + , _aplOauthToken :: !(Maybe Text) + , _aplFields :: !(Maybe Text) + , _aplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPreferreddealsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplQuotaUser' +-- +-- * 'aplPrettyPrint' +-- +-- * 'aplUserIp' +-- +-- * 'aplAccountId' +-- +-- * 'aplKey' +-- +-- * 'aplOauthToken' +-- +-- * 'aplFields' +-- +-- * 'aplAlt' +accountsPreferreddealsList + :: Text -- ^ 'accountId' + -> AccountsPreferreddealsList +accountsPreferreddealsList pAplAccountId_ = + AccountsPreferreddealsList + { _aplQuotaUser = Nothing + , _aplPrettyPrint = True + , _aplUserIp = Nothing + , _aplAccountId = pAplAccountId_ + , _aplKey = Nothing + , _aplOauthToken = Nothing + , _aplFields = Nothing + , _aplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aplQuotaUser :: Lens' AccountsPreferreddealsList' (Maybe Text) +aplQuotaUser + = lens _aplQuotaUser (\ s a -> s{_aplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aplPrettyPrint :: Lens' AccountsPreferreddealsList' Bool +aplPrettyPrint + = lens _aplPrettyPrint + (\ s a -> s{_aplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aplUserIp :: Lens' AccountsPreferreddealsList' (Maybe Text) +aplUserIp + = lens _aplUserIp (\ s a -> s{_aplUserIp = a}) + +-- | Account owning the deals. +aplAccountId :: Lens' AccountsPreferreddealsList' Text +aplAccountId + = lens _aplAccountId (\ s a -> s{_aplAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aplKey :: Lens' AccountsPreferreddealsList' (Maybe Text) +aplKey = lens _aplKey (\ s a -> s{_aplKey = a}) + +-- | OAuth 2.0 token for the current user. +aplOauthToken :: Lens' AccountsPreferreddealsList' (Maybe Text) +aplOauthToken + = lens _aplOauthToken + (\ s a -> s{_aplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aplFields :: Lens' AccountsPreferreddealsList' (Maybe Text) +aplFields + = lens _aplFields (\ s a -> s{_aplFields = a}) + +-- | Data format for the response. +aplAlt :: Lens' AccountsPreferreddealsList' Text +aplAlt = lens _aplAlt (\ s a -> s{_aplAlt = a}) + +instance GoogleRequest AccountsPreferreddealsList' + where + type Rs AccountsPreferreddealsList' = PreferredDeals + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsPreferreddealsList{..} + = go _aplQuotaUser _aplPrettyPrint _aplUserIp + _aplAccountId + _aplKey + _aplOauthToken + _aplFields + _aplAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPreferreddealsListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Generate.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Generate.hs new file mode 100644 index 000000000..8a19633c1 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Generate.hs @@ -0,0 +1,278 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an Ad Exchange report based on the report request sent in the +-- query parameters. Returns the result as JSON; to retrieve output in CSV +-- format specify \"alt=csv\" as a query parameter. +-- +-- /See:/ for @AdexchangesellerAccountsReportsGenerate@. +module AdExchangeSeller.Accounts.Reports.Generate + ( + -- * REST Resource + AccountsReportsGenerateAPI + + -- * Creating a Request + , accountsReportsGenerate + , AccountsReportsGenerate + + -- * Request Lenses + , argQuotaUser + , argPrettyPrint + , argUserIp + , argDimension + , argLocale + , argEndDate + , argStartDate + , argAccountId + , argMetric + , argKey + , argSort + , argFilter + , argOauthToken + , argStartIndex + , argMaxResults + , argFields + , argAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsReportsGenerate@ which the +-- 'AccountsReportsGenerate' request conforms to. +type AccountsReportsGenerateAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + QueryParams "dimension" Text :> + QueryParam "locale" Text :> + QueryParam "endDate" Text :> + QueryParam "startDate" Text :> + QueryParams "metric" Text :> + QueryParams "sort" Text :> + QueryParams "filter" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> Get '[JSON] Report + +-- | Generate an Ad Exchange report based on the report request sent in the +-- query parameters. Returns the result as JSON; to retrieve output in CSV +-- format specify \"alt=csv\" as a query parameter. +-- +-- /See:/ 'accountsReportsGenerate' smart constructor. +data AccountsReportsGenerate = AccountsReportsGenerate + { _argQuotaUser :: !(Maybe Text) + , _argPrettyPrint :: !Bool + , _argUserIp :: !(Maybe Text) + , _argDimension :: !(Maybe Text) + , _argLocale :: !(Maybe Text) + , _argEndDate :: !Text + , _argStartDate :: !Text + , _argAccountId :: !Text + , _argMetric :: !(Maybe Text) + , _argKey :: !(Maybe Text) + , _argSort :: !(Maybe Text) + , _argFilter :: !(Maybe Text) + , _argOauthToken :: !(Maybe Text) + , _argStartIndex :: !(Maybe Word32) + , _argMaxResults :: !(Maybe Word32) + , _argFields :: !(Maybe Text) + , _argAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argQuotaUser' +-- +-- * 'argPrettyPrint' +-- +-- * 'argUserIp' +-- +-- * 'argDimension' +-- +-- * 'argLocale' +-- +-- * 'argEndDate' +-- +-- * 'argStartDate' +-- +-- * 'argAccountId' +-- +-- * 'argMetric' +-- +-- * 'argKey' +-- +-- * 'argSort' +-- +-- * 'argFilter' +-- +-- * 'argOauthToken' +-- +-- * 'argStartIndex' +-- +-- * 'argMaxResults' +-- +-- * 'argFields' +-- +-- * 'argAlt' +accountsReportsGenerate + :: Text -- ^ 'endDate' + -> Text -- ^ 'startDate' + -> Text -- ^ 'accountId' + -> AccountsReportsGenerate +accountsReportsGenerate pArgEndDate_ pArgStartDate_ pArgAccountId_ = + AccountsReportsGenerate + { _argQuotaUser = Nothing + , _argPrettyPrint = True + , _argUserIp = Nothing + , _argDimension = Nothing + , _argLocale = Nothing + , _argEndDate = pArgEndDate_ + , _argStartDate = pArgStartDate_ + , _argAccountId = pArgAccountId_ + , _argMetric = Nothing + , _argKey = Nothing + , _argSort = Nothing + , _argFilter = Nothing + , _argOauthToken = Nothing + , _argStartIndex = Nothing + , _argMaxResults = Nothing + , _argFields = Nothing + , _argAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +argQuotaUser :: Lens' AccountsReportsGenerate' (Maybe Text) +argQuotaUser + = lens _argQuotaUser (\ s a -> s{_argQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +argPrettyPrint :: Lens' AccountsReportsGenerate' Bool +argPrettyPrint + = lens _argPrettyPrint + (\ s a -> s{_argPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +argUserIp :: Lens' AccountsReportsGenerate' (Maybe Text) +argUserIp + = lens _argUserIp (\ s a -> s{_argUserIp = a}) + +-- | Dimensions to base the report on. +argDimension :: Lens' AccountsReportsGenerate' (Maybe Text) +argDimension + = lens _argDimension (\ s a -> s{_argDimension = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +argLocale :: Lens' AccountsReportsGenerate' (Maybe Text) +argLocale + = lens _argLocale (\ s a -> s{_argLocale = a}) + +-- | End of the date range to report on in \"YYYY-MM-DD\" format, inclusive. +argEndDate :: Lens' AccountsReportsGenerate' Text +argEndDate + = lens _argEndDate (\ s a -> s{_argEndDate = a}) + +-- | Start of the date range to report on in \"YYYY-MM-DD\" format, +-- inclusive. +argStartDate :: Lens' AccountsReportsGenerate' Text +argStartDate + = lens _argStartDate (\ s a -> s{_argStartDate = a}) + +-- | Account which owns the generated report. +argAccountId :: Lens' AccountsReportsGenerate' Text +argAccountId + = lens _argAccountId (\ s a -> s{_argAccountId = a}) + +-- | Numeric columns to include in the report. +argMetric :: Lens' AccountsReportsGenerate' (Maybe Text) +argMetric + = lens _argMetric (\ s a -> s{_argMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +argKey :: Lens' AccountsReportsGenerate' (Maybe Text) +argKey = lens _argKey (\ s a -> s{_argKey = a}) + +-- | The name of a dimension or metric to sort the resulting report on, +-- optionally prefixed with \"+\" to sort ascending or \"-\" to sort +-- descending. If no prefix is specified, the column is sorted ascending. +argSort :: Lens' AccountsReportsGenerate' (Maybe Text) +argSort = lens _argSort (\ s a -> s{_argSort = a}) + +-- | Filters to be run on the report. +argFilter :: Lens' AccountsReportsGenerate' (Maybe Text) +argFilter + = lens _argFilter (\ s a -> s{_argFilter = a}) + +-- | OAuth 2.0 token for the current user. +argOauthToken :: Lens' AccountsReportsGenerate' (Maybe Text) +argOauthToken + = lens _argOauthToken + (\ s a -> s{_argOauthToken = a}) + +-- | Index of the first row of report data to return. +argStartIndex :: Lens' AccountsReportsGenerate' (Maybe Word32) +argStartIndex + = lens _argStartIndex + (\ s a -> s{_argStartIndex = a}) + +-- | The maximum number of rows of report data to return. +argMaxResults :: Lens' AccountsReportsGenerate' (Maybe Word32) +argMaxResults + = lens _argMaxResults + (\ s a -> s{_argMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +argFields :: Lens' AccountsReportsGenerate' (Maybe Text) +argFields + = lens _argFields (\ s a -> s{_argFields = a}) + +-- | Data format for the response. +argAlt :: Lens' AccountsReportsGenerate' Text +argAlt = lens _argAlt (\ s a -> s{_argAlt = a}) + +instance GoogleRequest AccountsReportsGenerate' where + type Rs AccountsReportsGenerate' = Report + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsReportsGenerate{..} + = go _argQuotaUser _argPrettyPrint _argUserIp + _argDimension + _argLocale + (Just _argEndDate) + (Just _argStartDate) + _argAccountId + _argMetric + _argKey + _argSort + _argFilter + _argOauthToken + _argStartIndex + _argMaxResults + _argFields + _argAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsGenerateAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/Generate.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/Generate.hs new file mode 100644 index 000000000..a095d5fa2 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/Generate.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an Ad Exchange report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ for @AdexchangesellerAccountsReportsSavedGenerate@. +module AdExchangeSeller.Accounts.Reports.Saved.Generate + ( + -- * REST Resource + AccountsReportsSavedGenerateAPI + + -- * Creating a Request + , accountsReportsSavedGenerate + , AccountsReportsSavedGenerate + + -- * Request Lenses + , arsgQuotaUser + , arsgPrettyPrint + , arsgUserIp + , arsgLocale + , arsgSavedReportId + , arsgAccountId + , arsgKey + , arsgOauthToken + , arsgStartIndex + , arsgMaxResults + , arsgFields + , arsgAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsReportsSavedGenerate@ which the +-- 'AccountsReportsSavedGenerate' request conforms to. +type AccountsReportsSavedGenerateAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + Capture "savedReportId" Text :> + QueryParam "locale" Text :> + QueryParam "startIndex" Int32 :> + QueryParam "maxResults" Int32 :> Get '[JSON] Report + +-- | Generate an Ad Exchange report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ 'accountsReportsSavedGenerate' smart constructor. +data AccountsReportsSavedGenerate = AccountsReportsSavedGenerate + { _arsgQuotaUser :: !(Maybe Text) + , _arsgPrettyPrint :: !Bool + , _arsgUserIp :: !(Maybe Text) + , _arsgLocale :: !(Maybe Text) + , _arsgSavedReportId :: !Text + , _arsgAccountId :: !Text + , _arsgKey :: !(Maybe Text) + , _arsgOauthToken :: !(Maybe Text) + , _arsgStartIndex :: !(Maybe Int32) + , _arsgMaxResults :: !(Maybe Int32) + , _arsgFields :: !(Maybe Text) + , _arsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsSavedGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arsgQuotaUser' +-- +-- * 'arsgPrettyPrint' +-- +-- * 'arsgUserIp' +-- +-- * 'arsgLocale' +-- +-- * 'arsgSavedReportId' +-- +-- * 'arsgAccountId' +-- +-- * 'arsgKey' +-- +-- * 'arsgOauthToken' +-- +-- * 'arsgStartIndex' +-- +-- * 'arsgMaxResults' +-- +-- * 'arsgFields' +-- +-- * 'arsgAlt' +accountsReportsSavedGenerate + :: Text -- ^ 'savedReportId' + -> Text -- ^ 'accountId' + -> AccountsReportsSavedGenerate +accountsReportsSavedGenerate pArsgSavedReportId_ pArsgAccountId_ = + AccountsReportsSavedGenerate + { _arsgQuotaUser = Nothing + , _arsgPrettyPrint = True + , _arsgUserIp = Nothing + , _arsgLocale = Nothing + , _arsgSavedReportId = pArsgSavedReportId_ + , _arsgAccountId = pArsgAccountId_ + , _arsgKey = Nothing + , _arsgOauthToken = Nothing + , _arsgStartIndex = Nothing + , _arsgMaxResults = Nothing + , _arsgFields = Nothing + , _arsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arsgQuotaUser :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgQuotaUser + = lens _arsgQuotaUser + (\ s a -> s{_arsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arsgPrettyPrint :: Lens' AccountsReportsSavedGenerate' Bool +arsgPrettyPrint + = lens _arsgPrettyPrint + (\ s a -> s{_arsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arsgUserIp :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgUserIp + = lens _arsgUserIp (\ s a -> s{_arsgUserIp = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +arsgLocale :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgLocale + = lens _arsgLocale (\ s a -> s{_arsgLocale = a}) + +-- | The saved report to retrieve. +arsgSavedReportId :: Lens' AccountsReportsSavedGenerate' Text +arsgSavedReportId + = lens _arsgSavedReportId + (\ s a -> s{_arsgSavedReportId = a}) + +-- | Account owning the saved report. +arsgAccountId :: Lens' AccountsReportsSavedGenerate' Text +arsgAccountId + = lens _arsgAccountId + (\ s a -> s{_arsgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arsgKey :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgKey = lens _arsgKey (\ s a -> s{_arsgKey = a}) + +-- | OAuth 2.0 token for the current user. +arsgOauthToken :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgOauthToken + = lens _arsgOauthToken + (\ s a -> s{_arsgOauthToken = a}) + +-- | Index of the first row of report data to return. +arsgStartIndex :: Lens' AccountsReportsSavedGenerate' (Maybe Int32) +arsgStartIndex + = lens _arsgStartIndex + (\ s a -> s{_arsgStartIndex = a}) + +-- | The maximum number of rows of report data to return. +arsgMaxResults :: Lens' AccountsReportsSavedGenerate' (Maybe Int32) +arsgMaxResults + = lens _arsgMaxResults + (\ s a -> s{_arsgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +arsgFields :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgFields + = lens _arsgFields (\ s a -> s{_arsgFields = a}) + +-- | Data format for the response. +arsgAlt :: Lens' AccountsReportsSavedGenerate' Text +arsgAlt = lens _arsgAlt (\ s a -> s{_arsgAlt = a}) + +instance GoogleRequest AccountsReportsSavedGenerate' + where + type Rs AccountsReportsSavedGenerate' = Report + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsReportsSavedGenerate{..} + = go _arsgQuotaUser _arsgPrettyPrint _arsgUserIp + _arsgLocale + _arsgSavedReportId + _arsgAccountId + _arsgKey + _arsgOauthToken + _arsgStartIndex + _arsgMaxResults + _arsgFields + _arsgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsSavedGenerateAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/List.hs new file mode 100644 index 000000000..7488c82fe --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/Reports/Saved/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all saved reports in this Ad Exchange account. +-- +-- /See:/ for @AdexchangesellerAccountsReportsSavedList@. +module AdExchangeSeller.Accounts.Reports.Saved.List + ( + -- * REST Resource + AccountsReportsSavedListAPI + + -- * Creating a Request + , accountsReportsSavedList + , AccountsReportsSavedList + + -- * Request Lenses + , arslQuotaUser + , arslPrettyPrint + , arslUserIp + , arslAccountId + , arslKey + , arslPageToken + , arslOauthToken + , arslMaxResults + , arslFields + , arslAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsReportsSavedList@ which the +-- 'AccountsReportsSavedList' request conforms to. +type AccountsReportsSavedListAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + "saved" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SavedReports + +-- | List all saved reports in this Ad Exchange account. +-- +-- /See:/ 'accountsReportsSavedList' smart constructor. +data AccountsReportsSavedList = AccountsReportsSavedList + { _arslQuotaUser :: !(Maybe Text) + , _arslPrettyPrint :: !Bool + , _arslUserIp :: !(Maybe Text) + , _arslAccountId :: !Text + , _arslKey :: !(Maybe Text) + , _arslPageToken :: !(Maybe Text) + , _arslOauthToken :: !(Maybe Text) + , _arslMaxResults :: !(Maybe Int32) + , _arslFields :: !(Maybe Text) + , _arslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsSavedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arslQuotaUser' +-- +-- * 'arslPrettyPrint' +-- +-- * 'arslUserIp' +-- +-- * 'arslAccountId' +-- +-- * 'arslKey' +-- +-- * 'arslPageToken' +-- +-- * 'arslOauthToken' +-- +-- * 'arslMaxResults' +-- +-- * 'arslFields' +-- +-- * 'arslAlt' +accountsReportsSavedList + :: Text -- ^ 'accountId' + -> AccountsReportsSavedList +accountsReportsSavedList pArslAccountId_ = + AccountsReportsSavedList + { _arslQuotaUser = Nothing + , _arslPrettyPrint = True + , _arslUserIp = Nothing + , _arslAccountId = pArslAccountId_ + , _arslKey = Nothing + , _arslPageToken = Nothing + , _arslOauthToken = Nothing + , _arslMaxResults = Nothing + , _arslFields = Nothing + , _arslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arslQuotaUser :: Lens' AccountsReportsSavedList' (Maybe Text) +arslQuotaUser + = lens _arslQuotaUser + (\ s a -> s{_arslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arslPrettyPrint :: Lens' AccountsReportsSavedList' Bool +arslPrettyPrint + = lens _arslPrettyPrint + (\ s a -> s{_arslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arslUserIp :: Lens' AccountsReportsSavedList' (Maybe Text) +arslUserIp + = lens _arslUserIp (\ s a -> s{_arslUserIp = a}) + +-- | Account owning the saved reports. +arslAccountId :: Lens' AccountsReportsSavedList' Text +arslAccountId + = lens _arslAccountId + (\ s a -> s{_arslAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arslKey :: Lens' AccountsReportsSavedList' (Maybe Text) +arslKey = lens _arslKey (\ s a -> s{_arslKey = a}) + +-- | A continuation token, used to page through saved reports. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +arslPageToken :: Lens' AccountsReportsSavedList' (Maybe Text) +arslPageToken + = lens _arslPageToken + (\ s a -> s{_arslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +arslOauthToken :: Lens' AccountsReportsSavedList' (Maybe Text) +arslOauthToken + = lens _arslOauthToken + (\ s a -> s{_arslOauthToken = a}) + +-- | The maximum number of saved reports to include in the response, used for +-- paging. +arslMaxResults :: Lens' AccountsReportsSavedList' (Maybe Int32) +arslMaxResults + = lens _arslMaxResults + (\ s a -> s{_arslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +arslFields :: Lens' AccountsReportsSavedList' (Maybe Text) +arslFields + = lens _arslFields (\ s a -> s{_arslFields = a}) + +-- | Data format for the response. +arslAlt :: Lens' AccountsReportsSavedList' Text +arslAlt = lens _arslAlt (\ s a -> s{_arslAlt = a}) + +instance GoogleRequest AccountsReportsSavedList' + where + type Rs AccountsReportsSavedList' = SavedReports + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsReportsSavedList{..} + = go _arslQuotaUser _arslPrettyPrint _arslUserIp + _arslAccountId + _arslKey + _arslPageToken + _arslOauthToken + _arslMaxResults + _arslFields + _arslAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsSavedListAPI) + r + u diff --git a/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/URLchannels/List.hs b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/URLchannels/List.hs new file mode 100644 index 000000000..71fc1bf45 --- /dev/null +++ b/gogol-adexchange-seller/gen/Network/Google/Resource/AdExchangeSeller/Accounts/URLchannels/List.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdExchangeSeller.Accounts.URLchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all URL channels in the specified ad client for this Ad Exchange +-- account. +-- +-- /See:/ for @AdexchangesellerAccountsURLchannelsList@. +module AdExchangeSeller.Accounts.URLchannels.List + ( + -- * REST Resource + AccountsUrlchannelsListAPI + + -- * Creating a Request + , accountsURLchannelsList + , AccountsURLchannelsList + + -- * Request Lenses + , aulQuotaUser + , aulPrettyPrint + , aulUserIp + , aulAdClientId + , aulAccountId + , aulKey + , aulPageToken + , aulOauthToken + , aulMaxResults + , aulFields + , aulAlt + ) where + +import Network.Google.AdExchangeSeller.Types +import Network.Google.Prelude + +-- | A resource alias for @AdexchangesellerAccountsURLchannelsList@ which the +-- 'AccountsURLchannelsList' request conforms to. +type AccountsUrlchannelsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] URLChannels + +-- | List all URL channels in the specified ad client for this Ad Exchange +-- account. +-- +-- /See:/ 'accountsURLchannelsList' smart constructor. +data AccountsURLchannelsList = AccountsURLchannelsList + { _aulQuotaUser :: !(Maybe Text) + , _aulPrettyPrint :: !Bool + , _aulUserIp :: !(Maybe Text) + , _aulAdClientId :: !Text + , _aulAccountId :: !Text + , _aulKey :: !(Maybe Text) + , _aulPageToken :: !(Maybe Text) + , _aulOauthToken :: !(Maybe Text) + , _aulMaxResults :: !(Maybe Word32) + , _aulFields :: !(Maybe Text) + , _aulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsURLchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aulQuotaUser' +-- +-- * 'aulPrettyPrint' +-- +-- * 'aulUserIp' +-- +-- * 'aulAdClientId' +-- +-- * 'aulAccountId' +-- +-- * 'aulKey' +-- +-- * 'aulPageToken' +-- +-- * 'aulOauthToken' +-- +-- * 'aulMaxResults' +-- +-- * 'aulFields' +-- +-- * 'aulAlt' +accountsURLchannelsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsURLchannelsList +accountsURLchannelsList pAulAdClientId_ pAulAccountId_ = + AccountsURLchannelsList + { _aulQuotaUser = Nothing + , _aulPrettyPrint = True + , _aulUserIp = Nothing + , _aulAdClientId = pAulAdClientId_ + , _aulAccountId = pAulAccountId_ + , _aulKey = Nothing + , _aulPageToken = Nothing + , _aulOauthToken = Nothing + , _aulMaxResults = Nothing + , _aulFields = Nothing + , _aulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aulQuotaUser :: Lens' AccountsURLchannelsList' (Maybe Text) +aulQuotaUser + = lens _aulQuotaUser (\ s a -> s{_aulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aulPrettyPrint :: Lens' AccountsURLchannelsList' Bool +aulPrettyPrint + = lens _aulPrettyPrint + (\ s a -> s{_aulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aulUserIp :: Lens' AccountsURLchannelsList' (Maybe Text) +aulUserIp + = lens _aulUserIp (\ s a -> s{_aulUserIp = a}) + +-- | Ad client for which to list URL channels. +aulAdClientId :: Lens' AccountsURLchannelsList' Text +aulAdClientId + = lens _aulAdClientId + (\ s a -> s{_aulAdClientId = a}) + +-- | Account to which the ad client belongs. +aulAccountId :: Lens' AccountsURLchannelsList' Text +aulAccountId + = lens _aulAccountId (\ s a -> s{_aulAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aulKey :: Lens' AccountsURLchannelsList' (Maybe Text) +aulKey = lens _aulKey (\ s a -> s{_aulKey = a}) + +-- | A continuation token, used to page through URL channels. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aulPageToken :: Lens' AccountsURLchannelsList' (Maybe Text) +aulPageToken + = lens _aulPageToken (\ s a -> s{_aulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aulOauthToken :: Lens' AccountsURLchannelsList' (Maybe Text) +aulOauthToken + = lens _aulOauthToken + (\ s a -> s{_aulOauthToken = a}) + +-- | The maximum number of URL channels to include in the response, used for +-- paging. +aulMaxResults :: Lens' AccountsURLchannelsList' (Maybe Word32) +aulMaxResults + = lens _aulMaxResults + (\ s a -> s{_aulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aulFields :: Lens' AccountsURLchannelsList' (Maybe Text) +aulFields + = lens _aulFields (\ s a -> s{_aulFields = a}) + +-- | Data format for the response. +aulAlt :: Lens' AccountsURLchannelsList' Text +aulAlt = lens _aulAlt (\ s a -> s{_aulAlt = a}) + +instance GoogleRequest AccountsURLchannelsList' where + type Rs AccountsURLchannelsList' = URLChannels + request = requestWithRoute defReq adExchangeSellerURL + requestWithRoute r u AccountsURLchannelsList{..} + = go _aulQuotaUser _aulPrettyPrint _aulUserIp + _aulAdClientId + _aulAccountId + _aulKey + _aulPageToken + _aulOauthToken + _aulMaxResults + _aulFields + _aulAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsUrlchannelsListAPI) + r + u diff --git a/gogol-adexchange-seller/gogol-adexchange-seller.cabal b/gogol-adexchange-seller/gogol-adexchange-seller.cabal new file mode 100644 index 000000000..98ad4ae5f --- /dev/null +++ b/gogol-adexchange-seller/gogol-adexchange-seller.cabal @@ -0,0 +1,57 @@ +name: gogol-adexchange-seller +version: 0.0.1 +synopsis: Ad Exchange Seller API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Gives Ad Exchange seller users access to their inventory and the ability + to generate reports + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdExchangeSeller + , Network.Google.AdExchangeSeller.Types + , Network.Google.Resource.AdExchangeSeller.Accounts.Adclients.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Alerts.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.Get + , Network.Google.Resource.AdExchangeSeller.Accounts.Customchannels.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Get + , Network.Google.Resource.AdExchangeSeller.Accounts.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Dimensions.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Metadata.Metrics.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.Get + , Network.Google.Resource.AdExchangeSeller.Accounts.Preferreddeals.List + , Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Generate + , Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.Generate + , Network.Google.Resource.AdExchangeSeller.Accounts.Reports.Saved.List + , Network.Google.Resource.AdExchangeSeller.Accounts.URLchannels.List + + other-modules: + Network.Google.AdExchangeSeller.Types.Product + , Network.Google.AdExchangeSeller.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-adexchange-seller/src/.gitkeep b/gogol-adexchange-seller/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-admin-datatransfer/LICENSE b/gogol-admin-datatransfer/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-admin-datatransfer/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-admin-datatransfer/Makefile b/gogol-admin-datatransfer/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-admin-datatransfer/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-admin-datatransfer/README.md b/gogol-admin-datatransfer/README.md new file mode 100644 index 000000000..9d42151ab --- /dev/null +++ b/gogol-admin-datatransfer/README.md @@ -0,0 +1,28 @@ +# gogol-admin-datatransfer + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Admin Data Transfer API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-admin-datatransfer` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-admin-datatransfer/Setup.hs b/gogol-admin-datatransfer/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-admin-datatransfer/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer.hs b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer.hs new file mode 100644 index 000000000..e0012c5ad --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer.hs @@ -0,0 +1,114 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdminDataTransfer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Admin Data Transfer API lets you transfer user data from one user to +-- another. +-- +-- /See:/ +module Network.Google.AdminDataTransfer + ( + -- * API + AdminDataTransferAPI + , adminDataTransferAPI + , adminDataTransferURL + + -- * Service Methods + + -- * REST Resources + + -- ** DatatransferApplicationsGet + , module Datatransfer.Applications.Get + + -- ** DatatransferApplicationsList + , module Datatransfer.Applications.List + + -- ** DatatransferTransfersGet + , module Datatransfer.Transfers.Get + + -- ** DatatransferTransfersInsert + , module Datatransfer.Transfers.Insert + + -- ** DatatransferTransfersList + , module Datatransfer.Transfers.List + + -- * Types + + -- ** Application + , Application + , application + , aTransferParams + , aEtag + , aKind + , aName + , aId + + -- ** ApplicationTransferParam + , ApplicationTransferParam + , applicationTransferParam + , atpValue + , atpKey + + -- ** ApplicationsListResponse + , ApplicationsListResponse + , applicationsListResponse + , alrEtag + , alrNextPageToken + , alrKind + , alrApplications + + -- ** DataTransfer + , DataTransfer + , dataTransfer + , dtEtag + , dtOldOwnerUserId + , dtKind + , dtNewOwnerUserId + , dtRequestTime + , dtApplicationDataTransfers + , dtId + , dtOverallTransferStatusCode + + -- ** DataTransfersListResponse + , DataTransfersListResponse + , dataTransfersListResponse + , dtlrEtag + , dtlrNextPageToken + , dtlrKind + , dtlrDataTransfers + + -- ** ApplicationDataTransfer + , ApplicationDataTransfer + , applicationDataTransfer + , adtApplicationTransferParams + , adtApplicationId + , adtApplicationTransferStatus + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude +import Network.Google.Resource.Datatransfer.Applications.Get +import Network.Google.Resource.Datatransfer.Applications.List +import Network.Google.Resource.Datatransfer.Transfers.Get +import Network.Google.Resource.Datatransfer.Transfers.Insert +import Network.Google.Resource.Datatransfer.Transfers.List + +{- $resources +TODO +-} + +type AdminDataTransferAPI = + Transfers :<|> Applications + +adminDataTransferAPI :: Proxy AdminDataTransferAPI +adminDataTransferAPI = Proxy diff --git a/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types.hs b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types.hs new file mode 100644 index 000000000..440025761 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types.hs @@ -0,0 +1,80 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDataTransfer.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDataTransfer.Types + ( + -- * Service URL + adminDataTransferURL + + -- * Application + , Application + , application + , aTransferParams + , aEtag + , aKind + , aName + , aId + + -- * ApplicationTransferParam + , ApplicationTransferParam + , applicationTransferParam + , atpValue + , atpKey + + -- * ApplicationsListResponse + , ApplicationsListResponse + , applicationsListResponse + , alrEtag + , alrNextPageToken + , alrKind + , alrApplications + + -- * DataTransfer + , DataTransfer + , dataTransfer + , dtEtag + , dtOldOwnerUserId + , dtKind + , dtNewOwnerUserId + , dtRequestTime + , dtApplicationDataTransfers + , dtId + , dtOverallTransferStatusCode + + -- * DataTransfersListResponse + , DataTransfersListResponse + , dataTransfersListResponse + , dtlrEtag + , dtlrNextPageToken + , dtlrKind + , dtlrDataTransfers + + -- * ApplicationDataTransfer + , ApplicationDataTransfer + , applicationDataTransfer + , adtApplicationTransferParams + , adtApplicationId + , adtApplicationTransferStatus + ) where + +import Network.Google.AdminDataTransfer.Types.Product +import Network.Google.AdminDataTransfer.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'datatransfer_v1' of the Admin Data Transfer API. +adminDataTransferURL :: BaseURL +adminDataTransferURL + = BaseUrl Https + "https://www.googleapis.com/admin/datatransfer/v1/" + 443 diff --git a/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Product.hs b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Product.hs new file mode 100644 index 000000000..4c346c48e --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Product.hs @@ -0,0 +1,485 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDataTransfer.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDataTransfer.Types.Product where + +import Network.Google.AdminDataTransfer.Types.Sum +import Network.Google.Prelude + +-- | The JSON template for an Application resource. +-- +-- /See:/ 'application' smart constructor. +data Application = Application + { _aTransferParams :: !(Maybe [Maybe ApplicationTransferParam]) + , _aEtag :: !(Maybe Text) + , _aKind :: !Text + , _aName :: !(Maybe Text) + , _aId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Application' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aTransferParams' +-- +-- * 'aEtag' +-- +-- * 'aKind' +-- +-- * 'aName' +-- +-- * 'aId' +application + :: Application +application = + Application + { _aTransferParams = Nothing + , _aEtag = Nothing + , _aKind = "admin#datatransfer#ApplicationResource" + , _aName = Nothing + , _aId = Nothing + } + +-- | The list of all possible transfer parameters for this application. These +-- parameters can be used to select the data of the user in this +-- application to be transfered. +aTransferParams :: Lens' Application [Maybe ApplicationTransferParam] +aTransferParams + = lens _aTransferParams + (\ s a -> s{_aTransferParams = a}) + . _Default + . _Coerce + +-- | Etag of the resource. +aEtag :: Lens' Application (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Identifies the resource as a DataTransfer Application Resource. +aKind :: Lens' Application Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The application\'s name. +aName :: Lens' Application (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | The application\'s ID. +aId :: Lens' Application (Maybe Int64) +aId = lens _aId (\ s a -> s{_aId = a}) + +instance FromJSON Application where + parseJSON + = withObject "Application" + (\ o -> + Application <$> + (o .:? "transferParams" .!= mempty) <*> + (o .:? "etag") + <*> + (o .:? "kind" .!= + "admin#datatransfer#ApplicationResource") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Application where + toJSON Application{..} + = object + (catMaybes + [("transferParams" .=) <$> _aTransferParams, + ("etag" .=) <$> _aEtag, Just ("kind" .= _aKind), + ("name" .=) <$> _aName, ("id" .=) <$> _aId]) + +-- | Template for application transfer parameters. +-- +-- /See:/ 'applicationTransferParam' smart constructor. +data ApplicationTransferParam = ApplicationTransferParam + { _atpValue :: !(Maybe [Text]) + , _atpKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationTransferParam' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'atpValue' +-- +-- * 'atpKey' +applicationTransferParam + :: ApplicationTransferParam +applicationTransferParam = + ApplicationTransferParam + { _atpValue = Nothing + , _atpKey = Nothing + } + +-- | The value of the coressponding transfer parameter. eg: \'PRIVATE\' or +-- \'SHARED\' +atpValue :: Lens' ApplicationTransferParam [Text] +atpValue + = lens _atpValue (\ s a -> s{_atpValue = a}) . + _Default + . _Coerce + +-- | The type of the transfer parameter. eg: \'PRIVACY_LEVEL\' +atpKey :: Lens' ApplicationTransferParam (Maybe Text) +atpKey = lens _atpKey (\ s a -> s{_atpKey = a}) + +instance FromJSON ApplicationTransferParam where + parseJSON + = withObject "ApplicationTransferParam" + (\ o -> + ApplicationTransferParam <$> + (o .:? "value" .!= mempty) <*> (o .:? "key")) + +instance ToJSON ApplicationTransferParam where + toJSON ApplicationTransferParam{..} + = object + (catMaybes + [("value" .=) <$> _atpValue, ("key" .=) <$> _atpKey]) + +-- | Template for a collection of Applications. +-- +-- /See:/ 'applicationsListResponse' smart constructor. +data ApplicationsListResponse = ApplicationsListResponse + { _alrEtag :: !(Maybe Text) + , _alrNextPageToken :: !(Maybe Text) + , _alrKind :: !Text + , _alrApplications :: !(Maybe [Maybe Application]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrEtag' +-- +-- * 'alrNextPageToken' +-- +-- * 'alrKind' +-- +-- * 'alrApplications' +applicationsListResponse + :: ApplicationsListResponse +applicationsListResponse = + ApplicationsListResponse + { _alrEtag = Nothing + , _alrNextPageToken = Nothing + , _alrKind = "admin#datatransfer#applicationsList" + , _alrApplications = Nothing + } + +-- | ETag of the resource. +alrEtag :: Lens' ApplicationsListResponse (Maybe Text) +alrEtag = lens _alrEtag (\ s a -> s{_alrEtag = a}) + +-- | Continuation token which will be used to specify next page in list API. +alrNextPageToken :: Lens' ApplicationsListResponse (Maybe Text) +alrNextPageToken + = lens _alrNextPageToken + (\ s a -> s{_alrNextPageToken = a}) + +-- | Identifies the resource as a collection of Applications. +alrKind :: Lens' ApplicationsListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +-- | List of applications that support data transfer and are also installed +-- for the customer. +alrApplications :: Lens' ApplicationsListResponse [Maybe Application] +alrApplications + = lens _alrApplications + (\ s a -> s{_alrApplications = a}) + . _Default + . _Coerce + +instance FromJSON ApplicationsListResponse where + parseJSON + = withObject "ApplicationsListResponse" + (\ o -> + ApplicationsListResponse <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "admin#datatransfer#applicationsList") + <*> (o .:? "applications" .!= mempty)) + +instance ToJSON ApplicationsListResponse where + toJSON ApplicationsListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _alrEtag, + ("nextPageToken" .=) <$> _alrNextPageToken, + Just ("kind" .= _alrKind), + ("applications" .=) <$> _alrApplications]) + +-- | The JSON template for a DataTransfer resource. +-- +-- /See:/ 'dataTransfer' smart constructor. +data DataTransfer = DataTransfer + { _dtEtag :: !(Maybe Text) + , _dtOldOwnerUserId :: !(Maybe Text) + , _dtKind :: !Text + , _dtNewOwnerUserId :: !(Maybe Text) + , _dtRequestTime :: !(Maybe UTCTime) + , _dtApplicationDataTransfers :: !(Maybe [Maybe ApplicationDataTransfer]) + , _dtId :: !(Maybe Text) + , _dtOverallTransferStatusCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataTransfer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtEtag' +-- +-- * 'dtOldOwnerUserId' +-- +-- * 'dtKind' +-- +-- * 'dtNewOwnerUserId' +-- +-- * 'dtRequestTime' +-- +-- * 'dtApplicationDataTransfers' +-- +-- * 'dtId' +-- +-- * 'dtOverallTransferStatusCode' +dataTransfer + :: DataTransfer +dataTransfer = + DataTransfer + { _dtEtag = Nothing + , _dtOldOwnerUserId = Nothing + , _dtKind = "admin#datatransfer#DataTransfer" + , _dtNewOwnerUserId = Nothing + , _dtRequestTime = Nothing + , _dtApplicationDataTransfers = Nothing + , _dtId = Nothing + , _dtOverallTransferStatusCode = Nothing + } + +-- | ETag of the resource. +dtEtag :: Lens' DataTransfer (Maybe Text) +dtEtag = lens _dtEtag (\ s a -> s{_dtEtag = a}) + +-- | ID of the user whose data is being transfered. +dtOldOwnerUserId :: Lens' DataTransfer (Maybe Text) +dtOldOwnerUserId + = lens _dtOldOwnerUserId + (\ s a -> s{_dtOldOwnerUserId = a}) + +-- | Identifies the resource as a DataTransfer request. +dtKind :: Lens' DataTransfer Text +dtKind = lens _dtKind (\ s a -> s{_dtKind = a}) + +-- | ID of the user to whom the data is being transfered. +dtNewOwnerUserId :: Lens' DataTransfer (Maybe Text) +dtNewOwnerUserId + = lens _dtNewOwnerUserId + (\ s a -> s{_dtNewOwnerUserId = a}) + +-- | The time at which the data transfer was requested (Read-only). +dtRequestTime :: Lens' DataTransfer (Maybe UTCTime) +dtRequestTime + = lens _dtRequestTime + (\ s a -> s{_dtRequestTime = a}) + +-- | List of per application data transfer resources. It contains data +-- transfer details of the applications associated with this transfer +-- resource. Note that this list is also used to specify the applications +-- for which data transfer has to be done at the time of the transfer +-- resource creation. +dtApplicationDataTransfers :: Lens' DataTransfer [Maybe ApplicationDataTransfer] +dtApplicationDataTransfers + = lens _dtApplicationDataTransfers + (\ s a -> s{_dtApplicationDataTransfers = a}) + . _Default + . _Coerce + +-- | The transfer\'s ID (Read-only). +dtId :: Lens' DataTransfer (Maybe Text) +dtId = lens _dtId (\ s a -> s{_dtId = a}) + +-- | Overall transfer status (Read-only). +dtOverallTransferStatusCode :: Lens' DataTransfer (Maybe Text) +dtOverallTransferStatusCode + = lens _dtOverallTransferStatusCode + (\ s a -> s{_dtOverallTransferStatusCode = a}) + +instance FromJSON DataTransfer where + parseJSON + = withObject "DataTransfer" + (\ o -> + DataTransfer <$> + (o .:? "etag") <*> (o .:? "oldOwnerUserId") <*> + (o .:? "kind" .!= "admin#datatransfer#DataTransfer") + <*> (o .:? "newOwnerUserId") + <*> (o .:? "requestTime") + <*> (o .:? "applicationDataTransfers" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "overallTransferStatusCode")) + +instance ToJSON DataTransfer where + toJSON DataTransfer{..} + = object + (catMaybes + [("etag" .=) <$> _dtEtag, + ("oldOwnerUserId" .=) <$> _dtOldOwnerUserId, + Just ("kind" .= _dtKind), + ("newOwnerUserId" .=) <$> _dtNewOwnerUserId, + ("requestTime" .=) <$> _dtRequestTime, + ("applicationDataTransfers" .=) <$> + _dtApplicationDataTransfers, + ("id" .=) <$> _dtId, + ("overallTransferStatusCode" .=) <$> + _dtOverallTransferStatusCode]) + +-- | Template for a collection of DataTransfer resources. +-- +-- /See:/ 'dataTransfersListResponse' smart constructor. +data DataTransfersListResponse = DataTransfersListResponse + { _dtlrEtag :: !(Maybe Text) + , _dtlrNextPageToken :: !(Maybe Text) + , _dtlrKind :: !Text + , _dtlrDataTransfers :: !(Maybe [Maybe DataTransfer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataTransfersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtlrEtag' +-- +-- * 'dtlrNextPageToken' +-- +-- * 'dtlrKind' +-- +-- * 'dtlrDataTransfers' +dataTransfersListResponse + :: DataTransfersListResponse +dataTransfersListResponse = + DataTransfersListResponse + { _dtlrEtag = Nothing + , _dtlrNextPageToken = Nothing + , _dtlrKind = "admin#datatransfer#dataTransfersList" + , _dtlrDataTransfers = Nothing + } + +-- | ETag of the resource. +dtlrEtag :: Lens' DataTransfersListResponse (Maybe Text) +dtlrEtag = lens _dtlrEtag (\ s a -> s{_dtlrEtag = a}) + +-- | Continuation token which will be used to specify next page in list API. +dtlrNextPageToken :: Lens' DataTransfersListResponse (Maybe Text) +dtlrNextPageToken + = lens _dtlrNextPageToken + (\ s a -> s{_dtlrNextPageToken = a}) + +-- | Identifies the resource as a collection of data transfer requests. +dtlrKind :: Lens' DataTransfersListResponse Text +dtlrKind = lens _dtlrKind (\ s a -> s{_dtlrKind = a}) + +-- | List of data transfer requests. +dtlrDataTransfers :: Lens' DataTransfersListResponse [Maybe DataTransfer] +dtlrDataTransfers + = lens _dtlrDataTransfers + (\ s a -> s{_dtlrDataTransfers = a}) + . _Default + . _Coerce + +instance FromJSON DataTransfersListResponse where + parseJSON + = withObject "DataTransfersListResponse" + (\ o -> + DataTransfersListResponse <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "admin#datatransfer#dataTransfersList") + <*> (o .:? "dataTransfers" .!= mempty)) + +instance ToJSON DataTransfersListResponse where + toJSON DataTransfersListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _dtlrEtag, + ("nextPageToken" .=) <$> _dtlrNextPageToken, + Just ("kind" .= _dtlrKind), + ("dataTransfers" .=) <$> _dtlrDataTransfers]) + +-- | Template to map fields of ApplicationDataTransfer resource. +-- +-- /See:/ 'applicationDataTransfer' smart constructor. +data ApplicationDataTransfer = ApplicationDataTransfer + { _adtApplicationTransferParams :: !(Maybe [Maybe ApplicationTransferParam]) + , _adtApplicationId :: !(Maybe Int64) + , _adtApplicationTransferStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationDataTransfer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adtApplicationTransferParams' +-- +-- * 'adtApplicationId' +-- +-- * 'adtApplicationTransferStatus' +applicationDataTransfer + :: ApplicationDataTransfer +applicationDataTransfer = + ApplicationDataTransfer + { _adtApplicationTransferParams = Nothing + , _adtApplicationId = Nothing + , _adtApplicationTransferStatus = Nothing + } + +-- | The transfer parameters for the application. These parameters are used +-- to select the data which will get transfered in context of this +-- application. +adtApplicationTransferParams :: Lens' ApplicationDataTransfer [Maybe ApplicationTransferParam] +adtApplicationTransferParams + = lens _adtApplicationTransferParams + (\ s a -> s{_adtApplicationTransferParams = a}) + . _Default + . _Coerce + +-- | The application\'s ID. +adtApplicationId :: Lens' ApplicationDataTransfer (Maybe Int64) +adtApplicationId + = lens _adtApplicationId + (\ s a -> s{_adtApplicationId = a}) + +-- | Current status of transfer for this application. (Read-only) +adtApplicationTransferStatus :: Lens' ApplicationDataTransfer (Maybe Text) +adtApplicationTransferStatus + = lens _adtApplicationTransferStatus + (\ s a -> s{_adtApplicationTransferStatus = a}) + +instance FromJSON ApplicationDataTransfer where + parseJSON + = withObject "ApplicationDataTransfer" + (\ o -> + ApplicationDataTransfer <$> + (o .:? "applicationTransferParams" .!= mempty) <*> + (o .:? "applicationId") + <*> (o .:? "applicationTransferStatus")) + +instance ToJSON ApplicationDataTransfer where + toJSON ApplicationDataTransfer{..} + = object + (catMaybes + [("applicationTransferParams" .=) <$> + _adtApplicationTransferParams, + ("applicationId" .=) <$> _adtApplicationId, + ("applicationTransferStatus" .=) <$> + _adtApplicationTransferStatus]) diff --git a/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Sum.hs b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Sum.hs new file mode 100644 index 000000000..6b3692538 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/AdminDataTransfer/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDataTransfer.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDataTransfer.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/Get.hs b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/Get.hs new file mode 100644 index 000000000..d679f0ed9 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datatransfer.Applications.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves information about an application for the given application ID. +-- +-- /See:/ for @DatatransferApplicationsGet@. +module Datatransfer.Applications.Get + ( + -- * REST Resource + ApplicationsGetAPI + + -- * Creating a Request + , applicationsGet + , ApplicationsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agApplicationId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude + +-- | A resource alias for @DatatransferApplicationsGet@ which the +-- 'ApplicationsGet' request conforms to. +type ApplicationsGetAPI = + "applications" :> + Capture "applicationId" Int64 :> + Get '[JSON] Application + +-- | Retrieves information about an application for the given application ID. +-- +-- /See:/ 'applicationsGet' smart constructor. +data ApplicationsGet = ApplicationsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agApplicationId :: !Int64 + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agApplicationId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +applicationsGet + :: Int64 -- ^ 'applicationId' + -> ApplicationsGet +applicationsGet pAgApplicationId_ = + ApplicationsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agApplicationId = pAgApplicationId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' ApplicationsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' ApplicationsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' ApplicationsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | ID of the application resource to be retrieved. +agApplicationId :: Lens' ApplicationsGet' Int64 +agApplicationId + = lens _agApplicationId + (\ s a -> s{_agApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' ApplicationsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' ApplicationsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' ApplicationsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' ApplicationsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest ApplicationsGet' where + type Rs ApplicationsGet' = Application + request + = requestWithRoute defReq adminDataTransferURL + requestWithRoute r u ApplicationsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agApplicationId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy ApplicationsGetAPI) + r + u diff --git a/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/List.hs b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/List.hs new file mode 100644 index 000000000..90d206da0 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Applications/List.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datatransfer.Applications.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the applications available for data transfer for a customer. +-- +-- /See:/ for @DatatransferApplicationsList@. +module Datatransfer.Applications.List + ( + -- * REST Resource + ApplicationsListAPI + + -- * Creating a Request + , applicationsList + , ApplicationsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alCustomerId + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude + +-- | A resource alias for @DatatransferApplicationsList@ which the +-- 'ApplicationsList' request conforms to. +type ApplicationsListAPI = + "applications" :> + QueryParam "customerId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ApplicationsListResponse + +-- | Lists the applications available for data transfer for a customer. +-- +-- /See:/ 'applicationsList' smart constructor. +data ApplicationsList = ApplicationsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alCustomerId :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Word32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alCustomerId' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +applicationsList + :: ApplicationsList +applicationsList = + ApplicationsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alCustomerId = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ApplicationsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ApplicationsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ApplicationsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Immutable ID of the Google Apps account. +alCustomerId :: Lens' ApplicationsList' (Maybe Text) +alCustomerId + = lens _alCustomerId (\ s a -> s{_alCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ApplicationsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Token to specify next page in the list. +alPageToken :: Lens' ApplicationsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ApplicationsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Maximum number of results to return. Default is 100. +alMaxResults :: Lens' ApplicationsList' (Maybe Word32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ApplicationsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ApplicationsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ApplicationsList' where + type Rs ApplicationsList' = ApplicationsListResponse + request + = requestWithRoute defReq adminDataTransferURL + requestWithRoute r u ApplicationsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alCustomerId + _alKey + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute + (Proxy :: Proxy ApplicationsListAPI) + r + u diff --git a/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Get.hs b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Get.hs new file mode 100644 index 000000000..7af7dbdf3 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Get.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datatransfer.Transfers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a data transfer request by its resource ID. +-- +-- /See:/ for @DatatransferTransfersGet@. +module Datatransfer.Transfers.Get + ( + -- * REST Resource + TransfersGetAPI + + -- * Creating a Request + , transfersGet + , TransfersGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgOauthToken + , tgDataTransferId + , tgFields + , tgAlt + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude + +-- | A resource alias for @DatatransferTransfersGet@ which the +-- 'TransfersGet' request conforms to. +type TransfersGetAPI = + "transfers" :> + Capture "dataTransferId" Text :> + Get '[JSON] DataTransfer + +-- | Retrieves a data transfer request by its resource ID. +-- +-- /See:/ 'transfersGet' smart constructor. +data TransfersGet = TransfersGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgOauthToken :: !(Maybe Text) + , _tgDataTransferId :: !Text + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransfersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgOauthToken' +-- +-- * 'tgDataTransferId' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +transfersGet + :: Text -- ^ 'dataTransferId' + -> TransfersGet +transfersGet pTgDataTransferId_ = + TransfersGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgOauthToken = Nothing + , _tgDataTransferId = pTgDataTransferId_ + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TransfersGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TransfersGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TransfersGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TransfersGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TransfersGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | ID of the resource to be retrieved. This is returned in the response +-- from the insert method. +tgDataTransferId :: Lens' TransfersGet' Text +tgDataTransferId + = lens _tgDataTransferId + (\ s a -> s{_tgDataTransferId = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TransfersGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TransfersGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TransfersGet' where + type Rs TransfersGet' = DataTransfer + request + = requestWithRoute defReq adminDataTransferURL + requestWithRoute r u TransfersGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgUserIp _tgKey + _tgOauthToken + _tgDataTransferId + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TransfersGetAPI) r + u diff --git a/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Insert.hs b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Insert.hs new file mode 100644 index 000000000..fdd7f8e4e --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/Insert.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datatransfer.Transfers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a data transfer request. +-- +-- /See:/ for @DatatransferTransfersInsert@. +module Datatransfer.Transfers.Insert + ( + -- * REST Resource + TransfersInsertAPI + + -- * Creating a Request + , transfersInsert + , TransfersInsert + + -- * Request Lenses + , tiQuotaUser + , tiPrettyPrint + , tiUserIp + , tiKey + , tiOauthToken + , tiFields + , tiAlt + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude + +-- | A resource alias for @DatatransferTransfersInsert@ which the +-- 'TransfersInsert' request conforms to. +type TransfersInsertAPI = + "transfers" :> Post '[JSON] DataTransfer + +-- | Inserts a data transfer request. +-- +-- /See:/ 'transfersInsert' smart constructor. +data TransfersInsert = TransfersInsert + { _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransfersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +transfersInsert + :: TransfersInsert +transfersInsert = + TransfersInsert + { _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TransfersInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TransfersInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TransfersInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TransfersInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TransfersInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TransfersInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TransfersInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TransfersInsert' where + type Rs TransfersInsert' = DataTransfer + request + = requestWithRoute defReq adminDataTransferURL + requestWithRoute r u TransfersInsert{..} + = go _tiQuotaUser _tiPrettyPrint _tiUserIp _tiKey + _tiOauthToken + _tiFields + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TransfersInsertAPI) + r + u diff --git a/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/List.hs b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/List.hs new file mode 100644 index 000000000..77e795a95 --- /dev/null +++ b/gogol-admin-datatransfer/gen/Network/Google/Resource/Datatransfer/Transfers/List.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datatransfer.Transfers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the transfers for a customer by source user, destination user, or +-- status. +-- +-- /See:/ for @DatatransferTransfersList@. +module Datatransfer.Transfers.List + ( + -- * REST Resource + TransfersListAPI + + -- * Creating a Request + , transfersList + , TransfersList + + -- * Request Lenses + , tlStatus + , tlQuotaUser + , tlPrettyPrint + , tlOldOwnerUserId + , tlUserIp + , tlNewOwnerUserId + , tlCustomerId + , tlKey + , tlPageToken + , tlOauthToken + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.AdminDataTransfer.Types +import Network.Google.Prelude + +-- | A resource alias for @DatatransferTransfersList@ which the +-- 'TransfersList' request conforms to. +type TransfersListAPI = + "transfers" :> + QueryParam "status" Text :> + QueryParam "oldOwnerUserId" Text :> + QueryParam "newOwnerUserId" Text :> + QueryParam "customerId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] DataTransfersListResponse + +-- | Lists the transfers for a customer by source user, destination user, or +-- status. +-- +-- /See:/ 'transfersList' smart constructor. +data TransfersList = TransfersList + { _tlStatus :: !(Maybe Text) + , _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlOldOwnerUserId :: !(Maybe Text) + , _tlUserIp :: !(Maybe Text) + , _tlNewOwnerUserId :: !(Maybe Text) + , _tlCustomerId :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Int32) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransfersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlStatus' +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlOldOwnerUserId' +-- +-- * 'tlUserIp' +-- +-- * 'tlNewOwnerUserId' +-- +-- * 'tlCustomerId' +-- +-- * 'tlKey' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +transfersList + :: TransfersList +transfersList = + TransfersList + { _tlStatus = Nothing + , _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlOldOwnerUserId = Nothing + , _tlUserIp = Nothing + , _tlNewOwnerUserId = Nothing + , _tlCustomerId = Nothing + , _tlKey = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlMaxResults = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Status of the transfer. +tlStatus :: Lens' TransfersList' (Maybe Text) +tlStatus = lens _tlStatus (\ s a -> s{_tlStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TransfersList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TransfersList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | Source user\'s profile ID. +tlOldOwnerUserId :: Lens' TransfersList' (Maybe Text) +tlOldOwnerUserId + = lens _tlOldOwnerUserId + (\ s a -> s{_tlOldOwnerUserId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TransfersList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | Destination user\'s profile ID. +tlNewOwnerUserId :: Lens' TransfersList' (Maybe Text) +tlNewOwnerUserId + = lens _tlNewOwnerUserId + (\ s a -> s{_tlNewOwnerUserId = a}) + +-- | Immutable ID of the Google Apps account. +tlCustomerId :: Lens' TransfersList' (Maybe Text) +tlCustomerId + = lens _tlCustomerId (\ s a -> s{_tlCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TransfersList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Token to specify the next page in the list. +tlPageToken :: Lens' TransfersList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TransfersList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Maximum number of results to return. Default is 100. +tlMaxResults :: Lens' TransfersList' (Maybe Int32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TransfersList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TransfersList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TransfersList' where + type Rs TransfersList' = DataTransfersListResponse + request + = requestWithRoute defReq adminDataTransferURL + requestWithRoute r u TransfersList{..} + = go _tlStatus _tlQuotaUser _tlPrettyPrint + _tlOldOwnerUserId + _tlUserIp + _tlNewOwnerUserId + _tlCustomerId + _tlKey + _tlPageToken + _tlOauthToken + _tlMaxResults + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TransfersListAPI) r + u diff --git a/gogol-admin-datatransfer/gogol-admin-datatransfer.cabal b/gogol-admin-datatransfer/gogol-admin-datatransfer.cabal new file mode 100644 index 000000000..f71da0441 --- /dev/null +++ b/gogol-admin-datatransfer/gogol-admin-datatransfer.cabal @@ -0,0 +1,48 @@ +name: gogol-admin-datatransfer +version: 0.0.1 +synopsis: Admin Data Transfer API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Admin Data Transfer API lets you transfer user data from one user to + another. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdminDataTransfer + , Network.Google.AdminDataTransfer.Types + , Network.Google.Resource.Datatransfer.Applications.Get + , Network.Google.Resource.Datatransfer.Applications.List + , Network.Google.Resource.Datatransfer.Transfers.Get + , Network.Google.Resource.Datatransfer.Transfers.Insert + , Network.Google.Resource.Datatransfer.Transfers.List + + other-modules: + Network.Google.AdminDataTransfer.Types.Product + , Network.Google.AdminDataTransfer.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-admin-datatransfer/src/.gitkeep b/gogol-admin-datatransfer/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-admin-directory/LICENSE b/gogol-admin-directory/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-admin-directory/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-admin-directory/Makefile b/gogol-admin-directory/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-admin-directory/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-admin-directory/README.md b/gogol-admin-directory/README.md new file mode 100644 index 000000000..e09213413 --- /dev/null +++ b/gogol-admin-directory/README.md @@ -0,0 +1,28 @@ +# gogol-admin-directory + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Admin Directory API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-admin-directory` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-admin-directory/Setup.hs b/gogol-admin-directory/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-admin-directory/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-admin-directory/gen/Network/Google/AdminDirectory.hs b/gogol-admin-directory/gen/Network/Google/AdminDirectory.hs new file mode 100644 index 000000000..99a0165bc --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/AdminDirectory.hs @@ -0,0 +1,765 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdminDirectory +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Admin SDK Directory API lets you view and manage enterprise +-- resources such as users and groups, administrative notifications, +-- security features, and more. +-- +-- /See:/ +module Network.Google.AdminDirectory + ( + -- * API + AdminDirectoryAPI + , adminDirectoryAPI + , adminDirectoryURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdminChannelsStop + , module Admin.Channels.Stop + + -- ** DirectoryAspsDelete + , module Directory.Asps.Delete + + -- ** DirectoryAspsGet + , module Directory.Asps.Get + + -- ** DirectoryAspsList + , module Directory.Asps.List + + -- ** DirectoryChromeosdevicesGet + , module Directory.Chromeosdevices.Get + + -- ** DirectoryChromeosdevicesList + , module Directory.Chromeosdevices.List + + -- ** DirectoryChromeosdevicesPatch + , module Directory.Chromeosdevices.Patch + + -- ** DirectoryChromeosdevicesUpdate + , module Directory.Chromeosdevices.Update + + -- ** DirectoryGroupsAliasesDelete + , module Directory.Groups.Aliases.Delete + + -- ** DirectoryGroupsAliasesInsert + , module Directory.Groups.Aliases.Insert + + -- ** DirectoryGroupsAliasesList + , module Directory.Groups.Aliases.List + + -- ** DirectoryGroupsDelete + , module Directory.Groups.Delete + + -- ** DirectoryGroupsGet + , module Directory.Groups.Get + + -- ** DirectoryGroupsInsert + , module Directory.Groups.Insert + + -- ** DirectoryGroupsList + , module Directory.Groups.List + + -- ** DirectoryGroupsPatch + , module Directory.Groups.Patch + + -- ** DirectoryGroupsUpdate + , module Directory.Groups.Update + + -- ** DirectoryMembersDelete + , module Directory.Members.Delete + + -- ** DirectoryMembersGet + , module Directory.Members.Get + + -- ** DirectoryMembersInsert + , module Directory.Members.Insert + + -- ** DirectoryMembersList + , module Directory.Members.List + + -- ** DirectoryMembersPatch + , module Directory.Members.Patch + + -- ** DirectoryMembersUpdate + , module Directory.Members.Update + + -- ** DirectoryMobiledevicesAction + , module Directory.Mobiledevices.Action + + -- ** DirectoryMobiledevicesDelete + , module Directory.Mobiledevices.Delete + + -- ** DirectoryMobiledevicesGet + , module Directory.Mobiledevices.Get + + -- ** DirectoryMobiledevicesList + , module Directory.Mobiledevices.List + + -- ** DirectoryNotificationsDelete + , module Directory.Notifications.Delete + + -- ** DirectoryNotificationsGet + , module Directory.Notifications.Get + + -- ** DirectoryNotificationsList + , module Directory.Notifications.List + + -- ** DirectoryNotificationsPatch + , module Directory.Notifications.Patch + + -- ** DirectoryNotificationsUpdate + , module Directory.Notifications.Update + + -- ** DirectoryOrgunitsDelete + , module Directory.Orgunits.Delete + + -- ** DirectoryOrgunitsGet + , module Directory.Orgunits.Get + + -- ** DirectoryOrgunitsInsert + , module Directory.Orgunits.Insert + + -- ** DirectoryOrgunitsList + , module Directory.Orgunits.List + + -- ** DirectoryOrgunitsPatch + , module Directory.Orgunits.Patch + + -- ** DirectoryOrgunitsUpdate + , module Directory.Orgunits.Update + + -- ** DirectorySchemasDelete + , module Directory.Schemas.Delete + + -- ** DirectorySchemasGet + , module Directory.Schemas.Get + + -- ** DirectorySchemasInsert + , module Directory.Schemas.Insert + + -- ** DirectorySchemasList + , module Directory.Schemas.List + + -- ** DirectorySchemasPatch + , module Directory.Schemas.Patch + + -- ** DirectorySchemasUpdate + , module Directory.Schemas.Update + + -- ** DirectoryTokensDelete + , module Directory.Tokens.Delete + + -- ** DirectoryTokensGet + , module Directory.Tokens.Get + + -- ** DirectoryTokensList + , module Directory.Tokens.List + + -- ** DirectoryUsersAliasesDelete + , module Directory.Users.Aliases.Delete + + -- ** DirectoryUsersAliasesInsert + , module Directory.Users.Aliases.Insert + + -- ** DirectoryUsersAliasesList + , module Directory.Users.Aliases.List + + -- ** DirectoryUsersAliasesWatch + , module Directory.Users.Aliases.Watch + + -- ** DirectoryUsersDelete + , module Directory.Users.Delete + + -- ** DirectoryUsersGet + , module Directory.Users.Get + + -- ** DirectoryUsersInsert + , module Directory.Users.Insert + + -- ** DirectoryUsersList + , module Directory.Users.List + + -- ** DirectoryUsersMakeAdmin + , module Directory.Users.MakeAdmin + + -- ** DirectoryUsersPatch + , module Directory.Users.Patch + + -- ** DirectoryUsersPhotosDelete + , module Directory.Users.Photos.Delete + + -- ** DirectoryUsersPhotosGet + , module Directory.Users.Photos.Get + + -- ** DirectoryUsersPhotosPatch + , module Directory.Users.Photos.Patch + + -- ** DirectoryUsersPhotosUpdate + , module Directory.Users.Photos.Update + + -- ** DirectoryUsersUndelete + , module Directory.Users.Undelete + + -- ** DirectoryUsersUpdate + , module Directory.Users.Update + + -- ** DirectoryUsersWatch + , module Directory.Users.Watch + + -- ** DirectoryVerificationCodesGenerate + , module Directory.VerificationCodes.Generate + + -- ** DirectoryVerificationCodesInvalidate + , module Directory.VerificationCodes.Invalidate + + -- ** DirectoryVerificationCodesList + , module Directory.VerificationCodes.List + + -- * Types + + -- ** UserAbout + , UserAbout + , userAbout + , uaValue + , uaContentType + + -- ** VerificationCode + , VerificationCode + , verificationCode + , vcVerificationCode + , vcEtag + , vcKind + , vcUserId + + -- ** OrgUnit + , OrgUnit + , orgUnit + , ouEtag + , ouParentOrgUnitPath + , ouKind + , ouOrgUnitPath + , ouName + , ouBlockInheritance + , ouParentOrgUnitId + , ouDescription + , ouOrgUnitId + + -- ** Groups + , Groups + , groups + , gGroups + , gEtag + , gNextPageToken + , gKind + + -- ** UserMakeAdmin + , UserMakeAdmin + , userMakeAdmin + , umaStatus + + -- ** UserAddress + , UserAddress + , userAddress + , uaStreetAddress + , uaPoBox + , uaCountry + , uaPostalCode + , uaFormatted + , uaExtendedAddress + , uaLocality + , uaPrimary + , uaCountryCode + , uaRegion + , uaType + , uaCustomType + , uaSourceIsStructured + + -- ** Group + , Group + , group' + , groEmail + , groEtag + , groDirectMembersCount + , groKind + , groAliases + , groNonEditableAliases + , groName + , groAdminCreated + , groId + , groDescription + + -- ** Asp + , Asp + , asp + , aspCreationTime + , aspEtag + , aspCodeId + , aspKind + , aspName + , aspLastTimeUsed + , aspUserKey + + -- ** Schemas + , Schemas + , schemas + , sEtag + , sSchemas + , sKind + + -- ** ChromeOsDevice + , ChromeOsDevice + , chromeOsDevice + , codStatus + , codEtag + , codAnnotatedUser + , codPlatformVersion + , codLastSync + , codActiveTimeRanges + , codKind + , codEthernetMacAddress + , codLastEnrollmentTime + , codAnnotatedLocation + , codMacAddress + , codOrgUnitPath + , codRecentUsers + , codSupportEndDate + , codModel + , codWillAutoRenew + , codMeid + , codDeviceId + , codBootMode + , codOrderNumber + , codAnnotatedAssetId + , codNotes + , codSerialNumber + , codFirmwareVersion + , codOsVersion + + -- ** Users + , Users + , users + , uEtag + , uNextPageToken + , uUsers + , uKind + , uTriggerEvent + + -- ** UserIm + , UserIm + , userIm + , uiIm + , uiProtocol + , uiPrimary + , uiCustomProtocol + , uiType + , uiCustomType + + -- ** Notification + , Notification + , notification + , nSubject + , nEtag + , nKind + , nBody + , nFromAddress + , nIsUnread + , nNotificationId + , nSendTime + + -- ** Aliases + , Aliases + , aliases + , aEtag + , aKind + , aAliases + + -- ** Tokens + , Tokens + , tokens + , tEtag + , tKind + , tItems + + -- ** Token + , Token + , token + , tokClientId + , tokEtag + , tokDisplayText + , tokKind + , tokScopes + , tokNativeApp + , tokAnonymous + , tokUserKey + + -- ** UserUndelete + , UserUndelete + , userUndelete + , uuOrgUnitPath + + -- ** MobileDevices + , MobileDevices + , mobileDevices + , mdEtag + , mdNextPageToken + , mdKind + , mdMobiledevices + + -- ** Members + , Members + , members + , mEtag + , mNextPageToken + , mKind + , mMembers + + -- ** Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- ** Alias + , Alias + , alias + , aliEtag + , aliKind + , aliAlias + , aliId + , aliPrimaryEmail + + -- ** UserName + , UserName + , userName + , unGivenName + , unFullName + , unFamilyName + + -- ** User + , User + , user + , useCreationTime + , useLastLoginTime + , useThumbnailPhotoEtag + , useEtag + , useIpWhitelisted + , useRelations + , useHashFunction + , useKind + , useChangePasswordAtNextLogin + , useWebsites + , useAddresses + , useAliases + , useThumbnailPhotoUrl + , useExternalIds + , useSuspended + , useAgreedToTerms + , useDeletionTime + , useNonEditableAliases + , useOrgUnitPath + , useCustomerId + , useIncludeInGlobalAddressList + , usePhones + , useName + , usePassword + , useEmails + , useIms + , useIsAdmin + , useId + , useOrganizations + , usePrimaryEmail + , useNotes + , useIsDelegatedAdmin + , useIsMailboxSetup + , useCustomSchemas + , useSuspensionReason + + -- ** Schema + , Schema + , schema + , schEtag + , schKind + , schSchemaName + , schSchemaId + , schFields + + -- ** OrgUnits + , OrgUnits + , orgUnits + , oEtag + , oKind + , oOrganizationUnits + + -- ** VerificationCodes + , VerificationCodes + , verificationCodes + , vEtag + , vKind + , vItems + + -- ** UserRelation + , UserRelation + , userRelation + , urValue + , urType + , urCustomType + + -- ** UserWebsite + , UserWebsite + , userWebsite + , uwValue + , uwPrimary + , uwType + , uwCustomType + + -- ** UserOrganization + , UserOrganization + , userOrganization + , uoDepartment + , uoLocation + , uoCostCenter + , uoDomain + , uoSymbol + , uoPrimary + , uoName + , uoTitle + , uoType + , uoCustomType + , uoDescription + + -- ** UserPhone + , UserPhone + , userPhone + , upValue + , upPrimary + , upType + , upCustomType + + -- ** UserPhoto + , UserPhoto + , userPhoto + , upPhotoData + , upEtag + , upHeight + , upKind + , upWidth + , upMimeType + , upId + , upPrimaryEmail + + -- ** UserEmail + , UserEmail + , userEmail + , ueAddress + , uePrimary + , ueType + , ueCustomType + + -- ** Member + , Member + , member + , memEmail + , memEtag + , memKind + , memRole + , memId + , memType + + -- ** MobileDevice + , MobileDevice + , mobileDevice + , mobEmail + , mobStatus + , mobEtag + , mobResourceId + , mobBuildNumber + , mobManagedAccountIsOnOwnerProfile + , mobLastSync + , mobOtherAccountsInfo + , mobKind + , mobAdbStatus + , mobNetworkOperator + , mobKernelVersion + , mobOs + , mobName + , mobModel + , mobDeveloperOptionsStatus + , mobUnknownSourcesStatus + , mobMeid + , mobDeviceId + , mobFirstSync + , mobUserAgent + , mobImei + , mobType + , mobWifiMacAddress + , mobSerialNumber + , mobHardwareId + , mobBasebandVersion + , mobSupportsWorkProfile + , mobDeviceCompromisedStatus + , mobApplications + , mobDefaultLanguage + + -- ** UserCustomProperties + , UserCustomProperties + , userCustomProperties + + -- ** MobileDeviceAction + , MobileDeviceAction + , mobileDeviceAction + , mdaAction + + -- ** SchemaFieldSpec + , SchemaFieldSpec + , schemaFieldSpec + , sfsEtag + , sfsKind + , sfsNumericIndexingSpec + , sfsReadAccessType + , sfsFieldId + , sfsIndexed + , sfsFieldType + , sfsFieldName + , sfsMultiValued + + -- ** Notifications + , Notifications + , notifications + , notEtag + , notNextPageToken + , notKind + , notItems + , notUnreadNotificationsCount + + -- ** UserExternalId + , UserExternalId + , userExternalId + , ueiValue + , ueiType + , ueiCustomType + + -- ** Asps + , Asps + , asps + , aaEtag + , aaKind + , aaItems + + -- ** ChromeOsDevices + , ChromeOsDevices + , chromeOsDevices + , codsEtag + , codsNextPageToken + , codsKind + , codsChromeosdevices + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude +import Network.Google.Resource.Admin.Channels.Stop +import Network.Google.Resource.Directory.Asps.Delete +import Network.Google.Resource.Directory.Asps.Get +import Network.Google.Resource.Directory.Asps.List +import Network.Google.Resource.Directory.Chromeosdevices.Get +import Network.Google.Resource.Directory.Chromeosdevices.List +import Network.Google.Resource.Directory.Chromeosdevices.Patch +import Network.Google.Resource.Directory.Chromeosdevices.Update +import Network.Google.Resource.Directory.Groups.Aliases.Delete +import Network.Google.Resource.Directory.Groups.Aliases.Insert +import Network.Google.Resource.Directory.Groups.Aliases.List +import Network.Google.Resource.Directory.Groups.Delete +import Network.Google.Resource.Directory.Groups.Get +import Network.Google.Resource.Directory.Groups.Insert +import Network.Google.Resource.Directory.Groups.List +import Network.Google.Resource.Directory.Groups.Patch +import Network.Google.Resource.Directory.Groups.Update +import Network.Google.Resource.Directory.Members.Delete +import Network.Google.Resource.Directory.Members.Get +import Network.Google.Resource.Directory.Members.Insert +import Network.Google.Resource.Directory.Members.List +import Network.Google.Resource.Directory.Members.Patch +import Network.Google.Resource.Directory.Members.Update +import Network.Google.Resource.Directory.Mobiledevices.Action +import Network.Google.Resource.Directory.Mobiledevices.Delete +import Network.Google.Resource.Directory.Mobiledevices.Get +import Network.Google.Resource.Directory.Mobiledevices.List +import Network.Google.Resource.Directory.Notifications.Delete +import Network.Google.Resource.Directory.Notifications.Get +import Network.Google.Resource.Directory.Notifications.List +import Network.Google.Resource.Directory.Notifications.Patch +import Network.Google.Resource.Directory.Notifications.Update +import Network.Google.Resource.Directory.Orgunits.Delete +import Network.Google.Resource.Directory.Orgunits.Get +import Network.Google.Resource.Directory.Orgunits.Insert +import Network.Google.Resource.Directory.Orgunits.List +import Network.Google.Resource.Directory.Orgunits.Patch +import Network.Google.Resource.Directory.Orgunits.Update +import Network.Google.Resource.Directory.Schemas.Delete +import Network.Google.Resource.Directory.Schemas.Get +import Network.Google.Resource.Directory.Schemas.Insert +import Network.Google.Resource.Directory.Schemas.List +import Network.Google.Resource.Directory.Schemas.Patch +import Network.Google.Resource.Directory.Schemas.Update +import Network.Google.Resource.Directory.Tokens.Delete +import Network.Google.Resource.Directory.Tokens.Get +import Network.Google.Resource.Directory.Tokens.List +import Network.Google.Resource.Directory.Users.Aliases.Delete +import Network.Google.Resource.Directory.Users.Aliases.Insert +import Network.Google.Resource.Directory.Users.Aliases.List +import Network.Google.Resource.Directory.Users.Aliases.Watch +import Network.Google.Resource.Directory.Users.Delete +import Network.Google.Resource.Directory.Users.Get +import Network.Google.Resource.Directory.Users.Insert +import Network.Google.Resource.Directory.Users.List +import Network.Google.Resource.Directory.Users.MakeAdmin +import Network.Google.Resource.Directory.Users.Patch +import Network.Google.Resource.Directory.Users.Photos.Delete +import Network.Google.Resource.Directory.Users.Photos.Get +import Network.Google.Resource.Directory.Users.Photos.Patch +import Network.Google.Resource.Directory.Users.Photos.Update +import Network.Google.Resource.Directory.Users.Undelete +import Network.Google.Resource.Directory.Users.Update +import Network.Google.Resource.Directory.Users.Watch +import Network.Google.Resource.Directory.VerificationCodes.Generate +import Network.Google.Resource.Directory.VerificationCodes.Invalidate +import Network.Google.Resource.Directory.VerificationCodes.List + +{- $resources +TODO +-} + +type AdminDirectoryAPI = + Groups :<|> Users :<|> Schemas :<|> Tokens :<|> + Channels + :<|> Members + :<|> Mobiledevices + :<|> Orgunits + :<|> VerificationCodes + :<|> Notifications + :<|> Chromeosdevices + :<|> Asps + +adminDirectoryAPI :: Proxy AdminDirectoryAPI +adminDirectoryAPI = Proxy diff --git a/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types.hs b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types.hs new file mode 100644 index 000000000..e23e3a52c --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types.hs @@ -0,0 +1,474 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDirectory.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDirectory.Types + ( + -- * Service URL + adminDirectoryURL + + -- * UserAbout + , UserAbout + , userAbout + , uaValue + , uaContentType + + -- * VerificationCode + , VerificationCode + , verificationCode + , vcVerificationCode + , vcEtag + , vcKind + , vcUserId + + -- * OrgUnit + , OrgUnit + , orgUnit + , ouEtag + , ouParentOrgUnitPath + , ouKind + , ouOrgUnitPath + , ouName + , ouBlockInheritance + , ouParentOrgUnitId + , ouDescription + , ouOrgUnitId + + -- * Groups + , Groups + , groups + , gGroups + , gEtag + , gNextPageToken + , gKind + + -- * UserMakeAdmin + , UserMakeAdmin + , userMakeAdmin + , umaStatus + + -- * UserAddress + , UserAddress + , userAddress + , uaStreetAddress + , uaPoBox + , uaCountry + , uaPostalCode + , uaFormatted + , uaExtendedAddress + , uaLocality + , uaPrimary + , uaCountryCode + , uaRegion + , uaType + , uaCustomType + , uaSourceIsStructured + + -- * Group + , Group + , group' + , groEmail + , groEtag + , groDirectMembersCount + , groKind + , groAliases + , groNonEditableAliases + , groName + , groAdminCreated + , groId + , groDescription + + -- * Asp + , Asp + , asp + , aspCreationTime + , aspEtag + , aspCodeId + , aspKind + , aspName + , aspLastTimeUsed + , aspUserKey + + -- * Schemas + , Schemas + , schemas + , sEtag + , sSchemas + , sKind + + -- * ChromeOsDevice + , ChromeOsDevice + , chromeOsDevice + , codStatus + , codEtag + , codAnnotatedUser + , codPlatformVersion + , codLastSync + , codActiveTimeRanges + , codKind + , codEthernetMacAddress + , codLastEnrollmentTime + , codAnnotatedLocation + , codMacAddress + , codOrgUnitPath + , codRecentUsers + , codSupportEndDate + , codModel + , codWillAutoRenew + , codMeid + , codDeviceId + , codBootMode + , codOrderNumber + , codAnnotatedAssetId + , codNotes + , codSerialNumber + , codFirmwareVersion + , codOsVersion + + -- * Users + , Users + , users + , uEtag + , uNextPageToken + , uUsers + , uKind + , uTriggerEvent + + -- * UserIm + , UserIm + , userIm + , uiIm + , uiProtocol + , uiPrimary + , uiCustomProtocol + , uiType + , uiCustomType + + -- * Notification + , Notification + , notification + , nSubject + , nEtag + , nKind + , nBody + , nFromAddress + , nIsUnread + , nNotificationId + , nSendTime + + -- * Aliases + , Aliases + , aliases + , aEtag + , aKind + , aAliases + + -- * Tokens + , Tokens + , tokens + , tEtag + , tKind + , tItems + + -- * Token + , Token + , token + , tokClientId + , tokEtag + , tokDisplayText + , tokKind + , tokScopes + , tokNativeApp + , tokAnonymous + , tokUserKey + + -- * UserUndelete + , UserUndelete + , userUndelete + , uuOrgUnitPath + + -- * MobileDevices + , MobileDevices + , mobileDevices + , mdEtag + , mdNextPageToken + , mdKind + , mdMobiledevices + + -- * Members + , Members + , members + , mEtag + , mNextPageToken + , mKind + , mMembers + + -- * Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- * Alias + , Alias + , alias + , aliEtag + , aliKind + , aliAlias + , aliId + , aliPrimaryEmail + + -- * UserName + , UserName + , userName + , unGivenName + , unFullName + , unFamilyName + + -- * User + , User + , user + , useCreationTime + , useLastLoginTime + , useThumbnailPhotoEtag + , useEtag + , useIpWhitelisted + , useRelations + , useHashFunction + , useKind + , useChangePasswordAtNextLogin + , useWebsites + , useAddresses + , useAliases + , useThumbnailPhotoUrl + , useExternalIds + , useSuspended + , useAgreedToTerms + , useDeletionTime + , useNonEditableAliases + , useOrgUnitPath + , useCustomerId + , useIncludeInGlobalAddressList + , usePhones + , useName + , usePassword + , useEmails + , useIms + , useIsAdmin + , useId + , useOrganizations + , usePrimaryEmail + , useNotes + , useIsDelegatedAdmin + , useIsMailboxSetup + , useCustomSchemas + , useSuspensionReason + + -- * Schema + , Schema + , schema + , schEtag + , schKind + , schSchemaName + , schSchemaId + , schFields + + -- * OrgUnits + , OrgUnits + , orgUnits + , oEtag + , oKind + , oOrganizationUnits + + -- * VerificationCodes + , VerificationCodes + , verificationCodes + , vEtag + , vKind + , vItems + + -- * UserRelation + , UserRelation + , userRelation + , urValue + , urType + , urCustomType + + -- * UserWebsite + , UserWebsite + , userWebsite + , uwValue + , uwPrimary + , uwType + , uwCustomType + + -- * UserOrganization + , UserOrganization + , userOrganization + , uoDepartment + , uoLocation + , uoCostCenter + , uoDomain + , uoSymbol + , uoPrimary + , uoName + , uoTitle + , uoType + , uoCustomType + , uoDescription + + -- * UserPhone + , UserPhone + , userPhone + , upValue + , upPrimary + , upType + , upCustomType + + -- * UserPhoto + , UserPhoto + , userPhoto + , upPhotoData + , upEtag + , upHeight + , upKind + , upWidth + , upMimeType + , upId + , upPrimaryEmail + + -- * UserEmail + , UserEmail + , userEmail + , ueAddress + , uePrimary + , ueType + , ueCustomType + + -- * Member + , Member + , member + , memEmail + , memEtag + , memKind + , memRole + , memId + , memType + + -- * MobileDevice + , MobileDevice + , mobileDevice + , mobEmail + , mobStatus + , mobEtag + , mobResourceId + , mobBuildNumber + , mobManagedAccountIsOnOwnerProfile + , mobLastSync + , mobOtherAccountsInfo + , mobKind + , mobAdbStatus + , mobNetworkOperator + , mobKernelVersion + , mobOs + , mobName + , mobModel + , mobDeveloperOptionsStatus + , mobUnknownSourcesStatus + , mobMeid + , mobDeviceId + , mobFirstSync + , mobUserAgent + , mobImei + , mobType + , mobWifiMacAddress + , mobSerialNumber + , mobHardwareId + , mobBasebandVersion + , mobSupportsWorkProfile + , mobDeviceCompromisedStatus + , mobApplications + , mobDefaultLanguage + + -- * UserCustomProperties + , UserCustomProperties + , userCustomProperties + + -- * MobileDeviceAction + , MobileDeviceAction + , mobileDeviceAction + , mdaAction + + -- * SchemaFieldSpec + , SchemaFieldSpec + , schemaFieldSpec + , sfsEtag + , sfsKind + , sfsNumericIndexingSpec + , sfsReadAccessType + , sfsFieldId + , sfsIndexed + , sfsFieldType + , sfsFieldName + , sfsMultiValued + + -- * Notifications + , Notifications + , notifications + , notEtag + , notNextPageToken + , notKind + , notItems + , notUnreadNotificationsCount + + -- * UserExternalId + , UserExternalId + , userExternalId + , ueiValue + , ueiType + , ueiCustomType + + -- * Asps + , Asps + , asps + , aaEtag + , aaKind + , aaItems + + -- * ChromeOsDevices + , ChromeOsDevices + , chromeOsDevices + , codsEtag + , codsNextPageToken + , codsKind + , codsChromeosdevices + ) where + +import Network.Google.AdminDirectory.Types.Product +import Network.Google.AdminDirectory.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'directory_v1' of the Admin Directory API. +adminDirectoryURL :: BaseURL +adminDirectoryURL + = BaseUrl Https + "https://www.googleapis.com/admin/directory/v1/" + 443 diff --git a/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Product.hs b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Product.hs new file mode 100644 index 000000000..6b6717dd7 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Product.hs @@ -0,0 +1,4178 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDirectory.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDirectory.Types.Product where + +import Network.Google.AdminDirectory.Types.Sum +import Network.Google.Prelude + +-- | JSON template for About (notes) of a user in Directory API. +-- +-- /See:/ 'userAbout' smart constructor. +data UserAbout = UserAbout + { _uaValue :: !(Maybe Text) + , _uaContentType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserAbout' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uaValue' +-- +-- * 'uaContentType' +userAbout + :: UserAbout +userAbout = + UserAbout + { _uaValue = Nothing + , _uaContentType = Nothing + } + +-- | Actual value of notes. +uaValue :: Lens' UserAbout (Maybe Text) +uaValue = lens _uaValue (\ s a -> s{_uaValue = a}) + +-- | About entry can have a type which indicates the content type. It can +-- either be plain or html. By default, notes contents are assumed to +-- contain plain text. +uaContentType :: Lens' UserAbout (Maybe Text) +uaContentType + = lens _uaContentType + (\ s a -> s{_uaContentType = a}) + +instance FromJSON UserAbout where + parseJSON + = withObject "UserAbout" + (\ o -> + UserAbout <$> + (o .:? "value") <*> (o .:? "contentType")) + +instance ToJSON UserAbout where + toJSON UserAbout{..} + = object + (catMaybes + [("value" .=) <$> _uaValue, + ("contentType" .=) <$> _uaContentType]) + +-- | JSON template for verification codes in Directory API. +-- +-- /See:/ 'verificationCode' smart constructor. +data VerificationCode = VerificationCode + { _vcVerificationCode :: !(Maybe Text) + , _vcEtag :: !(Maybe Text) + , _vcKind :: !Text + , _vcUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerificationCode' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcVerificationCode' +-- +-- * 'vcEtag' +-- +-- * 'vcKind' +-- +-- * 'vcUserId' +verificationCode + :: VerificationCode +verificationCode = + VerificationCode + { _vcVerificationCode = Nothing + , _vcEtag = Nothing + , _vcKind = "admin#directory#verificationCode" + , _vcUserId = Nothing + } + +-- | A current verification code for the user. Invalidated or used +-- verification codes are not returned as part of the result. +vcVerificationCode :: Lens' VerificationCode (Maybe Text) +vcVerificationCode + = lens _vcVerificationCode + (\ s a -> s{_vcVerificationCode = a}) + +-- | ETag of the resource. +vcEtag :: Lens' VerificationCode (Maybe Text) +vcEtag = lens _vcEtag (\ s a -> s{_vcEtag = a}) + +-- | The type of the resource. This is always +-- admin#directory#verificationCode. +vcKind :: Lens' VerificationCode Text +vcKind = lens _vcKind (\ s a -> s{_vcKind = a}) + +-- | The obfuscated unique ID of the user. +vcUserId :: Lens' VerificationCode (Maybe Text) +vcUserId = lens _vcUserId (\ s a -> s{_vcUserId = a}) + +instance FromJSON VerificationCode where + parseJSON + = withObject "VerificationCode" + (\ o -> + VerificationCode <$> + (o .:? "verificationCode") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#verificationCode") + <*> (o .:? "userId")) + +instance ToJSON VerificationCode where + toJSON VerificationCode{..} + = object + (catMaybes + [("verificationCode" .=) <$> _vcVerificationCode, + ("etag" .=) <$> _vcEtag, Just ("kind" .= _vcKind), + ("userId" .=) <$> _vcUserId]) + +-- | JSON template for Org Unit resource in Directory API. +-- +-- /See:/ 'orgUnit' smart constructor. +data OrgUnit = OrgUnit + { _ouEtag :: !(Maybe Text) + , _ouParentOrgUnitPath :: !(Maybe Text) + , _ouKind :: !Text + , _ouOrgUnitPath :: !(Maybe Text) + , _ouName :: !(Maybe Text) + , _ouBlockInheritance :: !(Maybe Bool) + , _ouParentOrgUnitId :: !(Maybe Text) + , _ouDescription :: !(Maybe Text) + , _ouOrgUnitId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgUnit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ouEtag' +-- +-- * 'ouParentOrgUnitPath' +-- +-- * 'ouKind' +-- +-- * 'ouOrgUnitPath' +-- +-- * 'ouName' +-- +-- * 'ouBlockInheritance' +-- +-- * 'ouParentOrgUnitId' +-- +-- * 'ouDescription' +-- +-- * 'ouOrgUnitId' +orgUnit + :: OrgUnit +orgUnit = + OrgUnit + { _ouEtag = Nothing + , _ouParentOrgUnitPath = Nothing + , _ouKind = "admin#directory#orgUnit" + , _ouOrgUnitPath = Nothing + , _ouName = Nothing + , _ouBlockInheritance = Nothing + , _ouParentOrgUnitId = Nothing + , _ouDescription = Nothing + , _ouOrgUnitId = Nothing + } + +-- | ETag of the resource. +ouEtag :: Lens' OrgUnit (Maybe Text) +ouEtag = lens _ouEtag (\ s a -> s{_ouEtag = a}) + +-- | Path of parent OrgUnit +ouParentOrgUnitPath :: Lens' OrgUnit (Maybe Text) +ouParentOrgUnitPath + = lens _ouParentOrgUnitPath + (\ s a -> s{_ouParentOrgUnitPath = a}) + +-- | Kind of resource this is. +ouKind :: Lens' OrgUnit Text +ouKind = lens _ouKind (\ s a -> s{_ouKind = a}) + +-- | Path of OrgUnit +ouOrgUnitPath :: Lens' OrgUnit (Maybe Text) +ouOrgUnitPath + = lens _ouOrgUnitPath + (\ s a -> s{_ouOrgUnitPath = a}) + +-- | Name of OrgUnit +ouName :: Lens' OrgUnit (Maybe Text) +ouName = lens _ouName (\ s a -> s{_ouName = a}) + +-- | Should block inheritance +ouBlockInheritance :: Lens' OrgUnit (Maybe Bool) +ouBlockInheritance + = lens _ouBlockInheritance + (\ s a -> s{_ouBlockInheritance = a}) + +-- | Id of parent OrgUnit +ouParentOrgUnitId :: Lens' OrgUnit (Maybe Text) +ouParentOrgUnitId + = lens _ouParentOrgUnitId + (\ s a -> s{_ouParentOrgUnitId = a}) + +-- | Description of OrgUnit +ouDescription :: Lens' OrgUnit (Maybe Text) +ouDescription + = lens _ouDescription + (\ s a -> s{_ouDescription = a}) + +-- | Id of OrgUnit +ouOrgUnitId :: Lens' OrgUnit (Maybe Text) +ouOrgUnitId + = lens _ouOrgUnitId (\ s a -> s{_ouOrgUnitId = a}) + +instance FromJSON OrgUnit where + parseJSON + = withObject "OrgUnit" + (\ o -> + OrgUnit <$> + (o .:? "etag") <*> (o .:? "parentOrgUnitPath") <*> + (o .:? "kind" .!= "admin#directory#orgUnit") + <*> (o .:? "orgUnitPath") + <*> (o .:? "name") + <*> (o .:? "blockInheritance") + <*> (o .:? "parentOrgUnitId") + <*> (o .:? "description") + <*> (o .:? "orgUnitId")) + +instance ToJSON OrgUnit where + toJSON OrgUnit{..} + = object + (catMaybes + [("etag" .=) <$> _ouEtag, + ("parentOrgUnitPath" .=) <$> _ouParentOrgUnitPath, + Just ("kind" .= _ouKind), + ("orgUnitPath" .=) <$> _ouOrgUnitPath, + ("name" .=) <$> _ouName, + ("blockInheritance" .=) <$> _ouBlockInheritance, + ("parentOrgUnitId" .=) <$> _ouParentOrgUnitId, + ("description" .=) <$> _ouDescription, + ("orgUnitId" .=) <$> _ouOrgUnitId]) + +-- | JSON response template for List Groups operation in Directory API. +-- +-- /See:/ 'groups' smart constructor. +data Groups = Groups + { _gGroups :: !(Maybe [Maybe Group]) + , _gEtag :: !(Maybe Text) + , _gNextPageToken :: !(Maybe Text) + , _gKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Groups' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gGroups' +-- +-- * 'gEtag' +-- +-- * 'gNextPageToken' +-- +-- * 'gKind' +groups + :: Groups +groups = + Groups + { _gGroups = Nothing + , _gEtag = Nothing + , _gNextPageToken = Nothing + , _gKind = "admin#directory#groups" + } + +-- | List of group objects. +gGroups :: Lens' Groups [Maybe Group] +gGroups + = lens _gGroups (\ s a -> s{_gGroups = a}) . _Default + . _Coerce + +-- | ETag of the resource. +gEtag :: Lens' Groups (Maybe Text) +gEtag = lens _gEtag (\ s a -> s{_gEtag = a}) + +-- | Token used to access next page of this result. +gNextPageToken :: Lens' Groups (Maybe Text) +gNextPageToken + = lens _gNextPageToken + (\ s a -> s{_gNextPageToken = a}) + +-- | Kind of resource this is. +gKind :: Lens' Groups Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +instance FromJSON Groups where + parseJSON + = withObject "Groups" + (\ o -> + Groups <$> + (o .:? "groups" .!= mempty) <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "admin#directory#groups")) + +instance ToJSON Groups where + toJSON Groups{..} + = object + (catMaybes + [("groups" .=) <$> _gGroups, ("etag" .=) <$> _gEtag, + ("nextPageToken" .=) <$> _gNextPageToken, + Just ("kind" .= _gKind)]) + +-- | JSON request template for setting\/revoking admin status of a user in +-- Directory API. +-- +-- /See:/ 'userMakeAdmin' smart constructor. +newtype UserMakeAdmin = UserMakeAdmin + { _umaStatus :: Maybe Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserMakeAdmin' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umaStatus' +userMakeAdmin + :: UserMakeAdmin +userMakeAdmin = + UserMakeAdmin + { _umaStatus = Nothing + } + +-- | Boolean indicating new admin status of the user +umaStatus :: Lens' UserMakeAdmin (Maybe Bool) +umaStatus + = lens _umaStatus (\ s a -> s{_umaStatus = a}) + +instance FromJSON UserMakeAdmin where + parseJSON + = withObject "UserMakeAdmin" + (\ o -> UserMakeAdmin <$> (o .:? "status")) + +instance ToJSON UserMakeAdmin where + toJSON UserMakeAdmin{..} + = object (catMaybes [("status" .=) <$> _umaStatus]) + +-- | JSON template for address. +-- +-- /See:/ 'userAddress' smart constructor. +data UserAddress = UserAddress + { _uaStreetAddress :: !(Maybe Text) + , _uaPoBox :: !(Maybe Text) + , _uaCountry :: !(Maybe Text) + , _uaPostalCode :: !(Maybe Text) + , _uaFormatted :: !(Maybe Text) + , _uaExtendedAddress :: !(Maybe Text) + , _uaLocality :: !(Maybe Text) + , _uaPrimary :: !(Maybe Bool) + , _uaCountryCode :: !(Maybe Text) + , _uaRegion :: !(Maybe Text) + , _uaType :: !(Maybe Text) + , _uaCustomType :: !(Maybe Text) + , _uaSourceIsStructured :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserAddress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uaStreetAddress' +-- +-- * 'uaPoBox' +-- +-- * 'uaCountry' +-- +-- * 'uaPostalCode' +-- +-- * 'uaFormatted' +-- +-- * 'uaExtendedAddress' +-- +-- * 'uaLocality' +-- +-- * 'uaPrimary' +-- +-- * 'uaCountryCode' +-- +-- * 'uaRegion' +-- +-- * 'uaType' +-- +-- * 'uaCustomType' +-- +-- * 'uaSourceIsStructured' +userAddress + :: UserAddress +userAddress = + UserAddress + { _uaStreetAddress = Nothing + , _uaPoBox = Nothing + , _uaCountry = Nothing + , _uaPostalCode = Nothing + , _uaFormatted = Nothing + , _uaExtendedAddress = Nothing + , _uaLocality = Nothing + , _uaPrimary = Nothing + , _uaCountryCode = Nothing + , _uaRegion = Nothing + , _uaType = Nothing + , _uaCustomType = Nothing + , _uaSourceIsStructured = Nothing + } + +-- | Street. +uaStreetAddress :: Lens' UserAddress (Maybe Text) +uaStreetAddress + = lens _uaStreetAddress + (\ s a -> s{_uaStreetAddress = a}) + +-- | Other parts of address. +uaPoBox :: Lens' UserAddress (Maybe Text) +uaPoBox = lens _uaPoBox (\ s a -> s{_uaPoBox = a}) + +-- | Country. +uaCountry :: Lens' UserAddress (Maybe Text) +uaCountry + = lens _uaCountry (\ s a -> s{_uaCountry = a}) + +-- | Postal code. +uaPostalCode :: Lens' UserAddress (Maybe Text) +uaPostalCode + = lens _uaPostalCode (\ s a -> s{_uaPostalCode = a}) + +-- | Formatted address. +uaFormatted :: Lens' UserAddress (Maybe Text) +uaFormatted + = lens _uaFormatted (\ s a -> s{_uaFormatted = a}) + +-- | Extended Address. +uaExtendedAddress :: Lens' UserAddress (Maybe Text) +uaExtendedAddress + = lens _uaExtendedAddress + (\ s a -> s{_uaExtendedAddress = a}) + +-- | Locality. +uaLocality :: Lens' UserAddress (Maybe Text) +uaLocality + = lens _uaLocality (\ s a -> s{_uaLocality = a}) + +-- | If this is user\'s primary address. Only one entry could be marked as +-- primary. +uaPrimary :: Lens' UserAddress (Maybe Bool) +uaPrimary + = lens _uaPrimary (\ s a -> s{_uaPrimary = a}) + +-- | Country code. +uaCountryCode :: Lens' UserAddress (Maybe Text) +uaCountryCode + = lens _uaCountryCode + (\ s a -> s{_uaCountryCode = a}) + +-- | Region. +uaRegion :: Lens' UserAddress (Maybe Text) +uaRegion = lens _uaRegion (\ s a -> s{_uaRegion = a}) + +-- | Each entry can have a type which indicates standard values of that +-- entry. For example address could be of home, work etc. In addition to +-- the standard type, an entry can have a custom type and can take any +-- value. Such type should have the CUSTOM value as type and also have a +-- customType value. +uaType :: Lens' UserAddress (Maybe Text) +uaType = lens _uaType (\ s a -> s{_uaType = a}) + +-- | Custom type. +uaCustomType :: Lens' UserAddress (Maybe Text) +uaCustomType + = lens _uaCustomType (\ s a -> s{_uaCustomType = a}) + +-- | User supplied address was structured. Structured addresses are NOT +-- supported at this time. You might be able to write structured addresses, +-- but any values will eventually be clobbered. +uaSourceIsStructured :: Lens' UserAddress (Maybe Bool) +uaSourceIsStructured + = lens _uaSourceIsStructured + (\ s a -> s{_uaSourceIsStructured = a}) + +instance FromJSON UserAddress where + parseJSON + = withObject "UserAddress" + (\ o -> + UserAddress <$> + (o .:? "streetAddress") <*> (o .:? "poBox") <*> + (o .:? "country") + <*> (o .:? "postalCode") + <*> (o .:? "formatted") + <*> (o .:? "extendedAddress") + <*> (o .:? "locality") + <*> (o .:? "primary") + <*> (o .:? "countryCode") + <*> (o .:? "region") + <*> (o .:? "type") + <*> (o .:? "customType") + <*> (o .:? "sourceIsStructured")) + +instance ToJSON UserAddress where + toJSON UserAddress{..} + = object + (catMaybes + [("streetAddress" .=) <$> _uaStreetAddress, + ("poBox" .=) <$> _uaPoBox, + ("country" .=) <$> _uaCountry, + ("postalCode" .=) <$> _uaPostalCode, + ("formatted" .=) <$> _uaFormatted, + ("extendedAddress" .=) <$> _uaExtendedAddress, + ("locality" .=) <$> _uaLocality, + ("primary" .=) <$> _uaPrimary, + ("countryCode" .=) <$> _uaCountryCode, + ("region" .=) <$> _uaRegion, ("type" .=) <$> _uaType, + ("customType" .=) <$> _uaCustomType, + ("sourceIsStructured" .=) <$> _uaSourceIsStructured]) + +-- | JSON template for Group resource in Directory API. +-- +-- /See:/ 'group'' smart constructor. +data Group = Group + { _groEmail :: !(Maybe Text) + , _groEtag :: !(Maybe Text) + , _groDirectMembersCount :: !(Maybe Int64) + , _groKind :: !Text + , _groAliases :: !(Maybe [Text]) + , _groNonEditableAliases :: !(Maybe [Text]) + , _groName :: !(Maybe Text) + , _groAdminCreated :: !(Maybe Bool) + , _groId :: !(Maybe Text) + , _groDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Group' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'groEmail' +-- +-- * 'groEtag' +-- +-- * 'groDirectMembersCount' +-- +-- * 'groKind' +-- +-- * 'groAliases' +-- +-- * 'groNonEditableAliases' +-- +-- * 'groName' +-- +-- * 'groAdminCreated' +-- +-- * 'groId' +-- +-- * 'groDescription' +group' + :: Group +group' = + Group + { _groEmail = Nothing + , _groEtag = Nothing + , _groDirectMembersCount = Nothing + , _groKind = "admin#directory#group" + , _groAliases = Nothing + , _groNonEditableAliases = Nothing + , _groName = Nothing + , _groAdminCreated = Nothing + , _groId = Nothing + , _groDescription = Nothing + } + +-- | Email of Group +groEmail :: Lens' Group (Maybe Text) +groEmail = lens _groEmail (\ s a -> s{_groEmail = a}) + +-- | ETag of the resource. +groEtag :: Lens' Group (Maybe Text) +groEtag = lens _groEtag (\ s a -> s{_groEtag = a}) + +-- | Group direct members count +groDirectMembersCount :: Lens' Group (Maybe Int64) +groDirectMembersCount + = lens _groDirectMembersCount + (\ s a -> s{_groDirectMembersCount = a}) + +-- | Kind of resource this is. +groKind :: Lens' Group Text +groKind = lens _groKind (\ s a -> s{_groKind = a}) + +-- | List of aliases (Read-only) +groAliases :: Lens' Group [Text] +groAliases + = lens _groAliases (\ s a -> s{_groAliases = a}) . + _Default + . _Coerce + +-- | List of non editable aliases (Read-only) +groNonEditableAliases :: Lens' Group [Text] +groNonEditableAliases + = lens _groNonEditableAliases + (\ s a -> s{_groNonEditableAliases = a}) + . _Default + . _Coerce + +-- | Group name +groName :: Lens' Group (Maybe Text) +groName = lens _groName (\ s a -> s{_groName = a}) + +-- | Is the group created by admin (Read-only) * +groAdminCreated :: Lens' Group (Maybe Bool) +groAdminCreated + = lens _groAdminCreated + (\ s a -> s{_groAdminCreated = a}) + +-- | Unique identifier of Group (Read-only) +groId :: Lens' Group (Maybe Text) +groId = lens _groId (\ s a -> s{_groId = a}) + +-- | Description of the group +groDescription :: Lens' Group (Maybe Text) +groDescription + = lens _groDescription + (\ s a -> s{_groDescription = a}) + +instance FromJSON Group where + parseJSON + = withObject "Group" + (\ o -> + Group <$> + (o .:? "email") <*> (o .:? "etag") <*> + (o .:? "directMembersCount") + <*> (o .:? "kind" .!= "admin#directory#group") + <*> (o .:? "aliases" .!= mempty) + <*> (o .:? "nonEditableAliases" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "adminCreated") + <*> (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON Group where + toJSON Group{..} + = object + (catMaybes + [("email" .=) <$> _groEmail, + ("etag" .=) <$> _groEtag, + ("directMembersCount" .=) <$> _groDirectMembersCount, + Just ("kind" .= _groKind), + ("aliases" .=) <$> _groAliases, + ("nonEditableAliases" .=) <$> _groNonEditableAliases, + ("name" .=) <$> _groName, + ("adminCreated" .=) <$> _groAdminCreated, + ("id" .=) <$> _groId, + ("description" .=) <$> _groDescription]) + +-- | The template that returns individual ASP (Access Code) data. +-- +-- /See:/ 'asp' smart constructor. +data Asp = Asp + { _aspCreationTime :: !(Maybe Int64) + , _aspEtag :: !(Maybe Text) + , _aspCodeId :: !(Maybe Int32) + , _aspKind :: !Text + , _aspName :: !(Maybe Text) + , _aspLastTimeUsed :: !(Maybe Int64) + , _aspUserKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Asp' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aspCreationTime' +-- +-- * 'aspEtag' +-- +-- * 'aspCodeId' +-- +-- * 'aspKind' +-- +-- * 'aspName' +-- +-- * 'aspLastTimeUsed' +-- +-- * 'aspUserKey' +asp + :: Asp +asp = + Asp + { _aspCreationTime = Nothing + , _aspEtag = Nothing + , _aspCodeId = Nothing + , _aspKind = "admin#directory#asp" + , _aspName = Nothing + , _aspLastTimeUsed = Nothing + , _aspUserKey = Nothing + } + +-- | The time when the ASP was created. Expressed in Unix time format. +aspCreationTime :: Lens' Asp (Maybe Int64) +aspCreationTime + = lens _aspCreationTime + (\ s a -> s{_aspCreationTime = a}) + +-- | ETag of the ASP. +aspEtag :: Lens' Asp (Maybe Text) +aspEtag = lens _aspEtag (\ s a -> s{_aspEtag = a}) + +-- | The unique ID of the ASP. +aspCodeId :: Lens' Asp (Maybe Int32) +aspCodeId + = lens _aspCodeId (\ s a -> s{_aspCodeId = a}) + +-- | The type of the API resource. This is always admin#directory#asp. +aspKind :: Lens' Asp Text +aspKind = lens _aspKind (\ s a -> s{_aspKind = a}) + +-- | The name of the application that the user, represented by their userId, +-- entered when the ASP was created. +aspName :: Lens' Asp (Maybe Text) +aspName = lens _aspName (\ s a -> s{_aspName = a}) + +-- | The time when the ASP was last used. Expressed in Unix time format. +aspLastTimeUsed :: Lens' Asp (Maybe Int64) +aspLastTimeUsed + = lens _aspLastTimeUsed + (\ s a -> s{_aspLastTimeUsed = a}) + +-- | The unique ID of the user who issued the ASP. +aspUserKey :: Lens' Asp (Maybe Text) +aspUserKey + = lens _aspUserKey (\ s a -> s{_aspUserKey = a}) + +instance FromJSON Asp where + parseJSON + = withObject "Asp" + (\ o -> + Asp <$> + (o .:? "creationTime") <*> (o .:? "etag") <*> + (o .:? "codeId") + <*> (o .:? "kind" .!= "admin#directory#asp") + <*> (o .:? "name") + <*> (o .:? "lastTimeUsed") + <*> (o .:? "userKey")) + +instance ToJSON Asp where + toJSON Asp{..} + = object + (catMaybes + [("creationTime" .=) <$> _aspCreationTime, + ("etag" .=) <$> _aspEtag, + ("codeId" .=) <$> _aspCodeId, + Just ("kind" .= _aspKind), ("name" .=) <$> _aspName, + ("lastTimeUsed" .=) <$> _aspLastTimeUsed, + ("userKey" .=) <$> _aspUserKey]) + +-- | JSON response template for List Schema operation in Directory API. +-- +-- /See:/ 'schemas' smart constructor. +data Schemas = Schemas + { _sEtag :: !(Maybe Text) + , _sSchemas :: !(Maybe [Maybe Schema]) + , _sKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Schemas' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sEtag' +-- +-- * 'sSchemas' +-- +-- * 'sKind' +schemas + :: Schemas +schemas = + Schemas + { _sEtag = Nothing + , _sSchemas = Nothing + , _sKind = "admin#directory#schemas" + } + +-- | ETag of the resource. +sEtag :: Lens' Schemas (Maybe Text) +sEtag = lens _sEtag (\ s a -> s{_sEtag = a}) + +-- | List of UserSchema objects. +sSchemas :: Lens' Schemas [Maybe Schema] +sSchemas + = lens _sSchemas (\ s a -> s{_sSchemas = a}) . + _Default + . _Coerce + +-- | Kind of resource this is. +sKind :: Lens' Schemas Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +instance FromJSON Schemas where + parseJSON + = withObject "Schemas" + (\ o -> + Schemas <$> + (o .:? "etag") <*> (o .:? "schemas" .!= mempty) <*> + (o .:? "kind" .!= "admin#directory#schemas")) + +instance ToJSON Schemas where + toJSON Schemas{..} + = object + (catMaybes + [("etag" .=) <$> _sEtag, + ("schemas" .=) <$> _sSchemas, + Just ("kind" .= _sKind)]) + +-- | JSON template for Chrome Os Device resource in Directory API. +-- +-- /See:/ 'chromeOsDevice' smart constructor. +data ChromeOsDevice = ChromeOsDevice + { _codStatus :: !(Maybe Text) + , _codEtag :: !(Maybe Text) + , _codAnnotatedUser :: !(Maybe Text) + , _codPlatformVersion :: !(Maybe Text) + , _codLastSync :: !(Maybe UTCTime) + , _codActiveTimeRanges :: !(Maybe [ChromeOsDeviceActiveTimeRangesItem]) + , _codKind :: !Text + , _codEthernetMacAddress :: !(Maybe Text) + , _codLastEnrollmentTime :: !(Maybe UTCTime) + , _codAnnotatedLocation :: !(Maybe Text) + , _codMacAddress :: !(Maybe Text) + , _codOrgUnitPath :: !(Maybe Text) + , _codRecentUsers :: !(Maybe [ChromeOsDeviceRecentUsersItem]) + , _codSupportEndDate :: !(Maybe UTCTime) + , _codModel :: !(Maybe Text) + , _codWillAutoRenew :: !(Maybe Bool) + , _codMeid :: !(Maybe Text) + , _codDeviceId :: !(Maybe Text) + , _codBootMode :: !(Maybe Text) + , _codOrderNumber :: !(Maybe Text) + , _codAnnotatedAssetId :: !(Maybe Text) + , _codNotes :: !(Maybe Text) + , _codSerialNumber :: !(Maybe Text) + , _codFirmwareVersion :: !(Maybe Text) + , _codOsVersion :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeOsDevice' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'codStatus' +-- +-- * 'codEtag' +-- +-- * 'codAnnotatedUser' +-- +-- * 'codPlatformVersion' +-- +-- * 'codLastSync' +-- +-- * 'codActiveTimeRanges' +-- +-- * 'codKind' +-- +-- * 'codEthernetMacAddress' +-- +-- * 'codLastEnrollmentTime' +-- +-- * 'codAnnotatedLocation' +-- +-- * 'codMacAddress' +-- +-- * 'codOrgUnitPath' +-- +-- * 'codRecentUsers' +-- +-- * 'codSupportEndDate' +-- +-- * 'codModel' +-- +-- * 'codWillAutoRenew' +-- +-- * 'codMeid' +-- +-- * 'codDeviceId' +-- +-- * 'codBootMode' +-- +-- * 'codOrderNumber' +-- +-- * 'codAnnotatedAssetId' +-- +-- * 'codNotes' +-- +-- * 'codSerialNumber' +-- +-- * 'codFirmwareVersion' +-- +-- * 'codOsVersion' +chromeOsDevice + :: ChromeOsDevice +chromeOsDevice = + ChromeOsDevice + { _codStatus = Nothing + , _codEtag = Nothing + , _codAnnotatedUser = Nothing + , _codPlatformVersion = Nothing + , _codLastSync = Nothing + , _codActiveTimeRanges = Nothing + , _codKind = "admin#directory#chromeosdevice" + , _codEthernetMacAddress = Nothing + , _codLastEnrollmentTime = Nothing + , _codAnnotatedLocation = Nothing + , _codMacAddress = Nothing + , _codOrgUnitPath = Nothing + , _codRecentUsers = Nothing + , _codSupportEndDate = Nothing + , _codModel = Nothing + , _codWillAutoRenew = Nothing + , _codMeid = Nothing + , _codDeviceId = Nothing + , _codBootMode = Nothing + , _codOrderNumber = Nothing + , _codAnnotatedAssetId = Nothing + , _codNotes = Nothing + , _codSerialNumber = Nothing + , _codFirmwareVersion = Nothing + , _codOsVersion = Nothing + } + +-- | status of the device (Read-only) +codStatus :: Lens' ChromeOsDevice (Maybe Text) +codStatus + = lens _codStatus (\ s a -> s{_codStatus = a}) + +-- | ETag of the resource. +codEtag :: Lens' ChromeOsDevice (Maybe Text) +codEtag = lens _codEtag (\ s a -> s{_codEtag = a}) + +-- | User of the device +codAnnotatedUser :: Lens' ChromeOsDevice (Maybe Text) +codAnnotatedUser + = lens _codAnnotatedUser + (\ s a -> s{_codAnnotatedUser = a}) + +-- | Chromebook platform version (Read-only) +codPlatformVersion :: Lens' ChromeOsDevice (Maybe Text) +codPlatformVersion + = lens _codPlatformVersion + (\ s a -> s{_codPlatformVersion = a}) + +-- | Date and time the device was last synchronized with the policy settings +-- in the Google Apps administrator control panel (Read-only) +codLastSync :: Lens' ChromeOsDevice (Maybe UTCTime) +codLastSync + = lens _codLastSync (\ s a -> s{_codLastSync = a}) + +-- | List of active time ranges (Read-only) +codActiveTimeRanges :: Lens' ChromeOsDevice [ChromeOsDeviceActiveTimeRangesItem] +codActiveTimeRanges + = lens _codActiveTimeRanges + (\ s a -> s{_codActiveTimeRanges = a}) + . _Default + . _Coerce + +-- | Kind of resource this is. +codKind :: Lens' ChromeOsDevice Text +codKind = lens _codKind (\ s a -> s{_codKind = a}) + +-- | Chromebook Mac Address on ethernet network interface (Read-only) +codEthernetMacAddress :: Lens' ChromeOsDevice (Maybe Text) +codEthernetMacAddress + = lens _codEthernetMacAddress + (\ s a -> s{_codEthernetMacAddress = a}) + +-- | Date and time the device was last enrolled (Read-only) +codLastEnrollmentTime :: Lens' ChromeOsDevice (Maybe UTCTime) +codLastEnrollmentTime + = lens _codLastEnrollmentTime + (\ s a -> s{_codLastEnrollmentTime = a}) + +-- | Address or location of the device as noted by the administrator +codAnnotatedLocation :: Lens' ChromeOsDevice (Maybe Text) +codAnnotatedLocation + = lens _codAnnotatedLocation + (\ s a -> s{_codAnnotatedLocation = a}) + +-- | Chromebook Mac Address on wifi network interface (Read-only) +codMacAddress :: Lens' ChromeOsDevice (Maybe Text) +codMacAddress + = lens _codMacAddress + (\ s a -> s{_codMacAddress = a}) + +-- | OrgUnit of the device +codOrgUnitPath :: Lens' ChromeOsDevice (Maybe Text) +codOrgUnitPath + = lens _codOrgUnitPath + (\ s a -> s{_codOrgUnitPath = a}) + +-- | List of recent device users, in descending order by last login time +-- (Read-only) +codRecentUsers :: Lens' ChromeOsDevice [ChromeOsDeviceRecentUsersItem] +codRecentUsers + = lens _codRecentUsers + (\ s a -> s{_codRecentUsers = a}) + . _Default + . _Coerce + +-- | Final date the device will be supported (Read-only) +codSupportEndDate :: Lens' ChromeOsDevice (Maybe UTCTime) +codSupportEndDate + = lens _codSupportEndDate + (\ s a -> s{_codSupportEndDate = a}) + +-- | Chromebook Model (Read-only) +codModel :: Lens' ChromeOsDevice (Maybe Text) +codModel = lens _codModel (\ s a -> s{_codModel = a}) + +-- | Will Chromebook auto renew after support end date (Read-only) +codWillAutoRenew :: Lens' ChromeOsDevice (Maybe Bool) +codWillAutoRenew + = lens _codWillAutoRenew + (\ s a -> s{_codWillAutoRenew = a}) + +-- | Mobile Equipment identifier for the 3G mobile card in the Chromebook +-- (Read-only) +codMeid :: Lens' ChromeOsDevice (Maybe Text) +codMeid = lens _codMeid (\ s a -> s{_codMeid = a}) + +-- | Unique identifier of Chrome OS Device (Read-only) +codDeviceId :: Lens' ChromeOsDevice (Maybe Text) +codDeviceId + = lens _codDeviceId (\ s a -> s{_codDeviceId = a}) + +-- | Chromebook boot mode (Read-only) +codBootMode :: Lens' ChromeOsDevice (Maybe Text) +codBootMode + = lens _codBootMode (\ s a -> s{_codBootMode = a}) + +-- | Chromebook order number (Read-only) +codOrderNumber :: Lens' ChromeOsDevice (Maybe Text) +codOrderNumber + = lens _codOrderNumber + (\ s a -> s{_codOrderNumber = a}) + +-- | AssetId specified during enrollment or through later annotation +codAnnotatedAssetId :: Lens' ChromeOsDevice (Maybe Text) +codAnnotatedAssetId + = lens _codAnnotatedAssetId + (\ s a -> s{_codAnnotatedAssetId = a}) + +-- | Notes added by the administrator +codNotes :: Lens' ChromeOsDevice (Maybe Text) +codNotes = lens _codNotes (\ s a -> s{_codNotes = a}) + +-- | Chromebook serial number (Read-only) +codSerialNumber :: Lens' ChromeOsDevice (Maybe Text) +codSerialNumber + = lens _codSerialNumber + (\ s a -> s{_codSerialNumber = a}) + +-- | Chromebook firmware version (Read-only) +codFirmwareVersion :: Lens' ChromeOsDevice (Maybe Text) +codFirmwareVersion + = lens _codFirmwareVersion + (\ s a -> s{_codFirmwareVersion = a}) + +-- | Chromebook Os Version (Read-only) +codOsVersion :: Lens' ChromeOsDevice (Maybe Text) +codOsVersion + = lens _codOsVersion (\ s a -> s{_codOsVersion = a}) + +instance FromJSON ChromeOsDevice where + parseJSON + = withObject "ChromeOsDevice" + (\ o -> + ChromeOsDevice <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "annotatedUser") + <*> (o .:? "platformVersion") + <*> (o .:? "lastSync") + <*> (o .:? "activeTimeRanges" .!= mempty) + <*> + (o .:? "kind" .!= "admin#directory#chromeosdevice") + <*> (o .:? "ethernetMacAddress") + <*> (o .:? "lastEnrollmentTime") + <*> (o .:? "annotatedLocation") + <*> (o .:? "macAddress") + <*> (o .:? "orgUnitPath") + <*> (o .:? "recentUsers" .!= mempty) + <*> (o .:? "supportEndDate") + <*> (o .:? "model") + <*> (o .:? "willAutoRenew") + <*> (o .:? "meid") + <*> (o .:? "deviceId") + <*> (o .:? "bootMode") + <*> (o .:? "orderNumber") + <*> (o .:? "annotatedAssetId") + <*> (o .:? "notes") + <*> (o .:? "serialNumber") + <*> (o .:? "firmwareVersion") + <*> (o .:? "osVersion")) + +instance ToJSON ChromeOsDevice where + toJSON ChromeOsDevice{..} + = object + (catMaybes + [("status" .=) <$> _codStatus, + ("etag" .=) <$> _codEtag, + ("annotatedUser" .=) <$> _codAnnotatedUser, + ("platformVersion" .=) <$> _codPlatformVersion, + ("lastSync" .=) <$> _codLastSync, + ("activeTimeRanges" .=) <$> _codActiveTimeRanges, + Just ("kind" .= _codKind), + ("ethernetMacAddress" .=) <$> _codEthernetMacAddress, + ("lastEnrollmentTime" .=) <$> _codLastEnrollmentTime, + ("annotatedLocation" .=) <$> _codAnnotatedLocation, + ("macAddress" .=) <$> _codMacAddress, + ("orgUnitPath" .=) <$> _codOrgUnitPath, + ("recentUsers" .=) <$> _codRecentUsers, + ("supportEndDate" .=) <$> _codSupportEndDate, + ("model" .=) <$> _codModel, + ("willAutoRenew" .=) <$> _codWillAutoRenew, + ("meid" .=) <$> _codMeid, + ("deviceId" .=) <$> _codDeviceId, + ("bootMode" .=) <$> _codBootMode, + ("orderNumber" .=) <$> _codOrderNumber, + ("annotatedAssetId" .=) <$> _codAnnotatedAssetId, + ("notes" .=) <$> _codNotes, + ("serialNumber" .=) <$> _codSerialNumber, + ("firmwareVersion" .=) <$> _codFirmwareVersion, + ("osVersion" .=) <$> _codOsVersion]) + +-- | JSON response template for List Users operation in Apps Directory API. +-- +-- /See:/ 'users' smart constructor. +data Users = Users + { _uEtag :: !(Maybe Text) + , _uNextPageToken :: !(Maybe Text) + , _uUsers :: !(Maybe [Maybe User]) + , _uKind :: !Text + , _uTriggerEvent :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Users' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uEtag' +-- +-- * 'uNextPageToken' +-- +-- * 'uUsers' +-- +-- * 'uKind' +-- +-- * 'uTriggerEvent' +users + :: Users +users = + Users + { _uEtag = Nothing + , _uNextPageToken = Nothing + , _uUsers = Nothing + , _uKind = "admin#directory#users" + , _uTriggerEvent = Nothing + } + +-- | ETag of the resource. +uEtag :: Lens' Users (Maybe Text) +uEtag = lens _uEtag (\ s a -> s{_uEtag = a}) + +-- | Token used to access next page of this result. +uNextPageToken :: Lens' Users (Maybe Text) +uNextPageToken + = lens _uNextPageToken + (\ s a -> s{_uNextPageToken = a}) + +-- | List of user objects. +uUsers :: Lens' Users [Maybe User] +uUsers + = lens _uUsers (\ s a -> s{_uUsers = a}) . _Default . + _Coerce + +-- | Kind of resource this is. +uKind :: Lens' Users Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | Event that triggered this response (only used in case of Push Response) +uTriggerEvent :: Lens' Users (Maybe Text) +uTriggerEvent + = lens _uTriggerEvent + (\ s a -> s{_uTriggerEvent = a}) + +instance FromJSON Users where + parseJSON + = withObject "Users" + (\ o -> + Users <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "users" .!= mempty) + <*> (o .:? "kind" .!= "admin#directory#users") + <*> (o .:? "trigger_event")) + +instance ToJSON Users where + toJSON Users{..} + = object + (catMaybes + [("etag" .=) <$> _uEtag, + ("nextPageToken" .=) <$> _uNextPageToken, + ("users" .=) <$> _uUsers, Just ("kind" .= _uKind), + ("trigger_event" .=) <$> _uTriggerEvent]) + +-- | JSON template for instant messenger of an user. +-- +-- /See:/ 'userIm' smart constructor. +data UserIm = UserIm + { _uiIm :: !(Maybe Text) + , _uiProtocol :: !(Maybe Text) + , _uiPrimary :: !(Maybe Bool) + , _uiCustomProtocol :: !(Maybe Text) + , _uiType :: !(Maybe Text) + , _uiCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserIm' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiIm' +-- +-- * 'uiProtocol' +-- +-- * 'uiPrimary' +-- +-- * 'uiCustomProtocol' +-- +-- * 'uiType' +-- +-- * 'uiCustomType' +userIm + :: UserIm +userIm = + UserIm + { _uiIm = Nothing + , _uiProtocol = Nothing + , _uiPrimary = Nothing + , _uiCustomProtocol = Nothing + , _uiType = Nothing + , _uiCustomType = Nothing + } + +-- | Instant messenger id. +uiIm :: Lens' UserIm (Maybe Text) +uiIm = lens _uiIm (\ s a -> s{_uiIm = a}) + +-- | Protocol used in the instant messenger. It should be one of the values +-- from ImProtocolTypes map. Similar to type, it can take a CUSTOM value +-- and specify the custom name in customProtocol field. +uiProtocol :: Lens' UserIm (Maybe Text) +uiProtocol + = lens _uiProtocol (\ s a -> s{_uiProtocol = a}) + +-- | If this is user\'s primary im. Only one entry could be marked as +-- primary. +uiPrimary :: Lens' UserIm (Maybe Bool) +uiPrimary + = lens _uiPrimary (\ s a -> s{_uiPrimary = a}) + +-- | Custom protocol. +uiCustomProtocol :: Lens' UserIm (Maybe Text) +uiCustomProtocol + = lens _uiCustomProtocol + (\ s a -> s{_uiCustomProtocol = a}) + +-- | Each entry can have a type which indicates standard types of that entry. +-- For example instant messengers could be of home, work etc. In addition +-- to the standard type, an entry can have a custom type and can take any +-- value. Such types should have the CUSTOM value as type and also have a +-- customType value. +uiType :: Lens' UserIm (Maybe Text) +uiType = lens _uiType (\ s a -> s{_uiType = a}) + +-- | Custom type. +uiCustomType :: Lens' UserIm (Maybe Text) +uiCustomType + = lens _uiCustomType (\ s a -> s{_uiCustomType = a}) + +instance FromJSON UserIm where + parseJSON + = withObject "UserIm" + (\ o -> + UserIm <$> + (o .:? "im") <*> (o .:? "protocol") <*> + (o .:? "primary") + <*> (o .:? "customProtocol") + <*> (o .:? "type") + <*> (o .:? "customType")) + +instance ToJSON UserIm where + toJSON UserIm{..} + = object + (catMaybes + [("im" .=) <$> _uiIm, + ("protocol" .=) <$> _uiProtocol, + ("primary" .=) <$> _uiPrimary, + ("customProtocol" .=) <$> _uiCustomProtocol, + ("type" .=) <$> _uiType, + ("customType" .=) <$> _uiCustomType]) + +-- | Template for a notification resource. +-- +-- /See:/ 'notification' smart constructor. +data Notification = Notification + { _nSubject :: !(Maybe Text) + , _nEtag :: !(Maybe Text) + , _nKind :: !Text + , _nBody :: !(Maybe Text) + , _nFromAddress :: !(Maybe Text) + , _nIsUnread :: !(Maybe Bool) + , _nNotificationId :: !(Maybe Text) + , _nSendTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Notification' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nSubject' +-- +-- * 'nEtag' +-- +-- * 'nKind' +-- +-- * 'nBody' +-- +-- * 'nFromAddress' +-- +-- * 'nIsUnread' +-- +-- * 'nNotificationId' +-- +-- * 'nSendTime' +notification + :: Notification +notification = + Notification + { _nSubject = Nothing + , _nEtag = Nothing + , _nKind = "admin#directory#notification" + , _nBody = Nothing + , _nFromAddress = Nothing + , _nIsUnread = Nothing + , _nNotificationId = Nothing + , _nSendTime = Nothing + } + +-- | Subject of the notification (Read-only) +nSubject :: Lens' Notification (Maybe Text) +nSubject = lens _nSubject (\ s a -> s{_nSubject = a}) + +-- | ETag of the resource. +nEtag :: Lens' Notification (Maybe Text) +nEtag = lens _nEtag (\ s a -> s{_nEtag = a}) + +-- | The type of the resource. +nKind :: Lens' Notification Text +nKind = lens _nKind (\ s a -> s{_nKind = a}) + +-- | Body of the notification (Read-only) +nBody :: Lens' Notification (Maybe Text) +nBody = lens _nBody (\ s a -> s{_nBody = a}) + +-- | Address from which the notification is received (Read-only) +nFromAddress :: Lens' Notification (Maybe Text) +nFromAddress + = lens _nFromAddress (\ s a -> s{_nFromAddress = a}) + +-- | Boolean indicating whether the notification is unread or not. +nIsUnread :: Lens' Notification (Maybe Bool) +nIsUnread + = lens _nIsUnread (\ s a -> s{_nIsUnread = a}) + +nNotificationId :: Lens' Notification (Maybe Text) +nNotificationId + = lens _nNotificationId + (\ s a -> s{_nNotificationId = a}) + +-- | Time at which notification was sent (Read-only) +nSendTime :: Lens' Notification (Maybe UTCTime) +nSendTime + = lens _nSendTime (\ s a -> s{_nSendTime = a}) + +instance FromJSON Notification where + parseJSON + = withObject "Notification" + (\ o -> + Notification <$> + (o .:? "subject") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#notification") + <*> (o .:? "body") + <*> (o .:? "fromAddress") + <*> (o .:? "isUnread") + <*> (o .:? "notificationId") + <*> (o .:? "sendTime")) + +instance ToJSON Notification where + toJSON Notification{..} + = object + (catMaybes + [("subject" .=) <$> _nSubject, + ("etag" .=) <$> _nEtag, Just ("kind" .= _nKind), + ("body" .=) <$> _nBody, + ("fromAddress" .=) <$> _nFromAddress, + ("isUnread" .=) <$> _nIsUnread, + ("notificationId" .=) <$> _nNotificationId, + ("sendTime" .=) <$> _nSendTime]) + +-- | JSON response template to list aliases in Directory API. +-- +-- /See:/ 'aliases' smart constructor. +data Aliases = Aliases + { _aEtag :: !(Maybe Text) + , _aKind :: !Text + , _aAliases :: !(Maybe [Maybe Alias]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Aliases' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aKind' +-- +-- * 'aAliases' +aliases + :: Aliases +aliases = + Aliases + { _aEtag = Nothing + , _aKind = "admin#directory#aliases" + , _aAliases = Nothing + } + +-- | ETag of the resource. +aEtag :: Lens' Aliases (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Kind of resource this is. +aKind :: Lens' Aliases Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | List of alias objects. +aAliases :: Lens' Aliases [Maybe Alias] +aAliases + = lens _aAliases (\ s a -> s{_aAliases = a}) . + _Default + . _Coerce + +instance FromJSON Aliases where + parseJSON + = withObject "Aliases" + (\ o -> + Aliases <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#aliases") + <*> (o .:? "aliases" .!= mempty)) + +instance ToJSON Aliases where + toJSON Aliases{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, Just ("kind" .= _aKind), + ("aliases" .=) <$> _aAliases]) + +-- | JSON response template for List tokens operation in Directory API. +-- +-- /See:/ 'tokens' smart constructor. +data Tokens = Tokens + { _tEtag :: !(Maybe Text) + , _tKind :: !Text + , _tItems :: !(Maybe [Maybe Token]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tokens' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tEtag' +-- +-- * 'tKind' +-- +-- * 'tItems' +tokens + :: Tokens +tokens = + Tokens + { _tEtag = Nothing + , _tKind = "admin#directory#tokenList" + , _tItems = Nothing + } + +-- | ETag of the resource. +tEtag :: Lens' Tokens (Maybe Text) +tEtag = lens _tEtag (\ s a -> s{_tEtag = a}) + +-- | The type of the API resource. This is always admin#directory#tokenList. +tKind :: Lens' Tokens Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | A list of Token resources. +tItems :: Lens' Tokens [Maybe Token] +tItems + = lens _tItems (\ s a -> s{_tItems = a}) . _Default . + _Coerce + +instance FromJSON Tokens where + parseJSON + = withObject "Tokens" + (\ o -> + Tokens <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#tokenList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Tokens where + toJSON Tokens{..} + = object + (catMaybes + [("etag" .=) <$> _tEtag, Just ("kind" .= _tKind), + ("items" .=) <$> _tItems]) + +-- | JSON template for token resource in Directory API. +-- +-- /See:/ 'token' smart constructor. +data Token = Token + { _tokClientId :: !(Maybe Text) + , _tokEtag :: !(Maybe Text) + , _tokDisplayText :: !(Maybe Text) + , _tokKind :: !Text + , _tokScopes :: !(Maybe [Text]) + , _tokNativeApp :: !(Maybe Bool) + , _tokAnonymous :: !(Maybe Bool) + , _tokUserKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Token' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tokClientId' +-- +-- * 'tokEtag' +-- +-- * 'tokDisplayText' +-- +-- * 'tokKind' +-- +-- * 'tokScopes' +-- +-- * 'tokNativeApp' +-- +-- * 'tokAnonymous' +-- +-- * 'tokUserKey' +token + :: Token +token = + Token + { _tokClientId = Nothing + , _tokEtag = Nothing + , _tokDisplayText = Nothing + , _tokKind = "admin#directory#token" + , _tokScopes = Nothing + , _tokNativeApp = Nothing + , _tokAnonymous = Nothing + , _tokUserKey = Nothing + } + +-- | The Client ID of the application the token is issued to. +tokClientId :: Lens' Token (Maybe Text) +tokClientId + = lens _tokClientId (\ s a -> s{_tokClientId = a}) + +-- | ETag of the resource. +tokEtag :: Lens' Token (Maybe Text) +tokEtag = lens _tokEtag (\ s a -> s{_tokEtag = a}) + +-- | The displayable name of the application the token is issued to. +tokDisplayText :: Lens' Token (Maybe Text) +tokDisplayText + = lens _tokDisplayText + (\ s a -> s{_tokDisplayText = a}) + +-- | The type of the API resource. This is always admin#directory#token. +tokKind :: Lens' Token Text +tokKind = lens _tokKind (\ s a -> s{_tokKind = a}) + +-- | A list of authorization scopes the application is granted. +tokScopes :: Lens' Token [Text] +tokScopes + = lens _tokScopes (\ s a -> s{_tokScopes = a}) . + _Default + . _Coerce + +-- | Whether the token is issued to an installed application. The value is +-- true if the application is installed to a desktop or mobile device. +tokNativeApp :: Lens' Token (Maybe Bool) +tokNativeApp + = lens _tokNativeApp (\ s a -> s{_tokNativeApp = a}) + +-- | Whether the application is registered with Google. The value is true if +-- the application has an anonymous Client ID. +tokAnonymous :: Lens' Token (Maybe Bool) +tokAnonymous + = lens _tokAnonymous (\ s a -> s{_tokAnonymous = a}) + +-- | The unique ID of the user that issued the token. +tokUserKey :: Lens' Token (Maybe Text) +tokUserKey + = lens _tokUserKey (\ s a -> s{_tokUserKey = a}) + +instance FromJSON Token where + parseJSON + = withObject "Token" + (\ o -> + Token <$> + (o .:? "clientId") <*> (o .:? "etag") <*> + (o .:? "displayText") + <*> (o .:? "kind" .!= "admin#directory#token") + <*> (o .:? "scopes" .!= mempty) + <*> (o .:? "nativeApp") + <*> (o .:? "anonymous") + <*> (o .:? "userKey")) + +instance ToJSON Token where + toJSON Token{..} + = object + (catMaybes + [("clientId" .=) <$> _tokClientId, + ("etag" .=) <$> _tokEtag, + ("displayText" .=) <$> _tokDisplayText, + Just ("kind" .= _tokKind), + ("scopes" .=) <$> _tokScopes, + ("nativeApp" .=) <$> _tokNativeApp, + ("anonymous" .=) <$> _tokAnonymous, + ("userKey" .=) <$> _tokUserKey]) + +-- | JSON request template to undelete a user in Directory API. +-- +-- /See:/ 'userUndelete' smart constructor. +newtype UserUndelete = UserUndelete + { _uuOrgUnitPath :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserUndelete' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uuOrgUnitPath' +userUndelete + :: UserUndelete +userUndelete = + UserUndelete + { _uuOrgUnitPath = Nothing + } + +-- | OrgUnit of User +uuOrgUnitPath :: Lens' UserUndelete (Maybe Text) +uuOrgUnitPath + = lens _uuOrgUnitPath + (\ s a -> s{_uuOrgUnitPath = a}) + +instance FromJSON UserUndelete where + parseJSON + = withObject "UserUndelete" + (\ o -> UserUndelete <$> (o .:? "orgUnitPath")) + +instance ToJSON UserUndelete where + toJSON UserUndelete{..} + = object + (catMaybes [("orgUnitPath" .=) <$> _uuOrgUnitPath]) + +-- | JSON response template for List Mobile Devices operation in Directory +-- API. +-- +-- /See:/ 'mobileDevices' smart constructor. +data MobileDevices = MobileDevices + { _mdEtag :: !(Maybe Text) + , _mdNextPageToken :: !(Maybe Text) + , _mdKind :: !Text + , _mdMobiledevices :: !(Maybe [Maybe MobileDevice]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileDevices' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdEtag' +-- +-- * 'mdNextPageToken' +-- +-- * 'mdKind' +-- +-- * 'mdMobiledevices' +mobileDevices + :: MobileDevices +mobileDevices = + MobileDevices + { _mdEtag = Nothing + , _mdNextPageToken = Nothing + , _mdKind = "admin#directory#mobiledevices" + , _mdMobiledevices = Nothing + } + +-- | ETag of the resource. +mdEtag :: Lens' MobileDevices (Maybe Text) +mdEtag = lens _mdEtag (\ s a -> s{_mdEtag = a}) + +-- | Token used to access next page of this result. +mdNextPageToken :: Lens' MobileDevices (Maybe Text) +mdNextPageToken + = lens _mdNextPageToken + (\ s a -> s{_mdNextPageToken = a}) + +-- | Kind of resource this is. +mdKind :: Lens' MobileDevices Text +mdKind = lens _mdKind (\ s a -> s{_mdKind = a}) + +-- | List of Mobile Device objects. +mdMobiledevices :: Lens' MobileDevices [Maybe MobileDevice] +mdMobiledevices + = lens _mdMobiledevices + (\ s a -> s{_mdMobiledevices = a}) + . _Default + . _Coerce + +instance FromJSON MobileDevices where + parseJSON + = withObject "MobileDevices" + (\ o -> + MobileDevices <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "admin#directory#mobiledevices") + <*> (o .:? "mobiledevices" .!= mempty)) + +instance ToJSON MobileDevices where + toJSON MobileDevices{..} + = object + (catMaybes + [("etag" .=) <$> _mdEtag, + ("nextPageToken" .=) <$> _mdNextPageToken, + Just ("kind" .= _mdKind), + ("mobiledevices" .=) <$> _mdMobiledevices]) + +-- | JSON response template for List Members operation in Directory API. +-- +-- /See:/ 'members' smart constructor. +data Members = Members + { _mEtag :: !(Maybe Text) + , _mNextPageToken :: !(Maybe Text) + , _mKind :: !Text + , _mMembers :: !(Maybe [Maybe Member]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Members' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mEtag' +-- +-- * 'mNextPageToken' +-- +-- * 'mKind' +-- +-- * 'mMembers' +members + :: Members +members = + Members + { _mEtag = Nothing + , _mNextPageToken = Nothing + , _mKind = "admin#directory#members" + , _mMembers = Nothing + } + +-- | ETag of the resource. +mEtag :: Lens' Members (Maybe Text) +mEtag = lens _mEtag (\ s a -> s{_mEtag = a}) + +-- | Token used to access next page of this result. +mNextPageToken :: Lens' Members (Maybe Text) +mNextPageToken + = lens _mNextPageToken + (\ s a -> s{_mNextPageToken = a}) + +-- | Kind of resource this is. +mKind :: Lens' Members Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | List of member objects. +mMembers :: Lens' Members [Maybe Member] +mMembers + = lens _mMembers (\ s a -> s{_mMembers = a}) . + _Default + . _Coerce + +instance FromJSON Members where + parseJSON + = withObject "Members" + (\ o -> + Members <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "admin#directory#members") + <*> (o .:? "members" .!= mempty)) + +instance ToJSON Members where + toJSON Members{..} + = object + (catMaybes + [("etag" .=) <$> _mEtag, + ("nextPageToken" .=) <$> _mNextPageToken, + Just ("kind" .= _mKind), + ("members" .=) <$> _mMembers]) + +-- | An notification channel used to watch for resource changes. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cResourceUri :: !(Maybe Text) + , _cResourceId :: !(Maybe Text) + , _cKind :: !Text + , _cExpiration :: !(Maybe Int64) + , _cToken :: !(Maybe Text) + , _cAddress :: !(Maybe Text) + , _cPayload :: !(Maybe Bool) + , _cParams :: !(Maybe ChannelParams) + , _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUri' +-- +-- * 'cResourceId' +-- +-- * 'cKind' +-- +-- * 'cExpiration' +-- +-- * 'cToken' +-- +-- * 'cAddress' +-- +-- * 'cPayload' +-- +-- * 'cParams' +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cResourceUri = Nothing + , _cResourceId = Nothing + , _cKind = "api#channel" + , _cExpiration = Nothing + , _cToken = Nothing + , _cAddress = Nothing + , _cPayload = Nothing + , _cParams = Nothing + , _cId = Nothing + , _cType = Nothing + } + +-- | A version-specific identifier for the watched resource. +cResourceUri :: Lens' Channel (Maybe Text) +cResourceUri + = lens _cResourceUri (\ s a -> s{_cResourceUri = a}) + +-- | An opaque ID that identifies the resource being watched on this channel. +-- Stable across different API versions. +cResourceId :: Lens' Channel (Maybe Text) +cResourceId + = lens _cResourceId (\ s a -> s{_cResourceId = a}) + +-- | Identifies this as a notification channel used to watch for changes to a +-- resource. Value: the fixed string \"api#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Date and time of notification channel expiration, expressed as a Unix +-- timestamp, in milliseconds. Optional. +cExpiration :: Lens' Channel (Maybe Int64) +cExpiration + = lens _cExpiration (\ s a -> s{_cExpiration = a}) + +-- | An arbitrary string delivered to the target address with each +-- notification delivered over this channel. Optional. +cToken :: Lens' Channel (Maybe Text) +cToken = lens _cToken (\ s a -> s{_cToken = a}) + +-- | The address where notifications are delivered for this channel. +cAddress :: Lens' Channel (Maybe Text) +cAddress = lens _cAddress (\ s a -> s{_cAddress = a}) + +-- | A Boolean value to indicate whether payload is wanted. Optional. +cPayload :: Lens' Channel (Maybe Bool) +cPayload = lens _cPayload (\ s a -> s{_cPayload = a}) + +-- | Additional parameters controlling delivery channel behavior. Optional. +cParams :: Lens' Channel (Maybe ChannelParams) +cParams = lens _cParams (\ s a -> s{_cParams = a}) + +-- | A UUID or similar unique string that identifies this channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of delivery mechanism used for this channel. +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "resourceUri") <*> (o .:? "resourceId") <*> + (o .:? "kind" .!= "api#channel") + <*> (o .:? "expiration") + <*> (o .:? "token") + <*> (o .:? "address") + <*> (o .:? "payload") + <*> (o .:? "params") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("resourceUri" .=) <$> _cResourceUri, + ("resourceId" .=) <$> _cResourceId, + Just ("kind" .= _cKind), + ("expiration" .=) <$> _cExpiration, + ("token" .=) <$> _cToken, + ("address" .=) <$> _cAddress, + ("payload" .=) <$> _cPayload, + ("params" .=) <$> _cParams, ("id" .=) <$> _cId, + ("type" .=) <$> _cType]) + +-- | JSON template for Alias object in Directory API. +-- +-- /See:/ 'alias' smart constructor. +data Alias = Alias + { _aliEtag :: !(Maybe Text) + , _aliKind :: !Text + , _aliAlias :: !(Maybe Text) + , _aliId :: !(Maybe Text) + , _aliPrimaryEmail :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Alias' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aliEtag' +-- +-- * 'aliKind' +-- +-- * 'aliAlias' +-- +-- * 'aliId' +-- +-- * 'aliPrimaryEmail' +alias + :: Alias +alias = + Alias + { _aliEtag = Nothing + , _aliKind = "admin#directory#alias" + , _aliAlias = Nothing + , _aliId = Nothing + , _aliPrimaryEmail = Nothing + } + +-- | ETag of the resource. +aliEtag :: Lens' Alias (Maybe Text) +aliEtag = lens _aliEtag (\ s a -> s{_aliEtag = a}) + +-- | Kind of resource this is. +aliKind :: Lens' Alias Text +aliKind = lens _aliKind (\ s a -> s{_aliKind = a}) + +-- | A alias email +aliAlias :: Lens' Alias (Maybe Text) +aliAlias = lens _aliAlias (\ s a -> s{_aliAlias = a}) + +-- | Unique id of the group (Read-only) Unique id of the user (Read-only) +aliId :: Lens' Alias (Maybe Text) +aliId = lens _aliId (\ s a -> s{_aliId = a}) + +-- | Group\'s primary email (Read-only) User\'s primary email (Read-only) +aliPrimaryEmail :: Lens' Alias (Maybe Text) +aliPrimaryEmail + = lens _aliPrimaryEmail + (\ s a -> s{_aliPrimaryEmail = a}) + +instance FromJSON Alias where + parseJSON + = withObject "Alias" + (\ o -> + Alias <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#alias") + <*> (o .:? "alias") + <*> (o .:? "id") + <*> (o .:? "primaryEmail")) + +instance ToJSON Alias where + toJSON Alias{..} + = object + (catMaybes + [("etag" .=) <$> _aliEtag, Just ("kind" .= _aliKind), + ("alias" .=) <$> _aliAlias, ("id" .=) <$> _aliId, + ("primaryEmail" .=) <$> _aliPrimaryEmail]) + +-- | JSON template for name of a user in Directory API. +-- +-- /See:/ 'userName' smart constructor. +data UserName = UserName + { _unGivenName :: !(Maybe Text) + , _unFullName :: !(Maybe Text) + , _unFamilyName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserName' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'unGivenName' +-- +-- * 'unFullName' +-- +-- * 'unFamilyName' +userName + :: UserName +userName = + UserName + { _unGivenName = Nothing + , _unFullName = Nothing + , _unFamilyName = Nothing + } + +-- | First Name +unGivenName :: Lens' UserName (Maybe Text) +unGivenName + = lens _unGivenName (\ s a -> s{_unGivenName = a}) + +-- | Full Name +unFullName :: Lens' UserName (Maybe Text) +unFullName + = lens _unFullName (\ s a -> s{_unFullName = a}) + +-- | Last Name +unFamilyName :: Lens' UserName (Maybe Text) +unFamilyName + = lens _unFamilyName (\ s a -> s{_unFamilyName = a}) + +instance FromJSON UserName where + parseJSON + = withObject "UserName" + (\ o -> + UserName <$> + (o .:? "givenName") <*> (o .:? "fullName") <*> + (o .:? "familyName")) + +instance ToJSON UserName where + toJSON UserName{..} + = object + (catMaybes + [("givenName" .=) <$> _unGivenName, + ("fullName" .=) <$> _unFullName, + ("familyName" .=) <$> _unFamilyName]) + +-- | JSON template for User object in Directory API. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _useCreationTime :: !(Maybe UTCTime) + , _useLastLoginTime :: !(Maybe UTCTime) + , _useThumbnailPhotoEtag :: !(Maybe Text) + , _useEtag :: !(Maybe Text) + , _useIpWhitelisted :: !(Maybe Bool) + , _useRelations :: !(Maybe JSON) + , _useHashFunction :: !(Maybe Text) + , _useKind :: !Text + , _useChangePasswordAtNextLogin :: !(Maybe Bool) + , _useWebsites :: !(Maybe JSON) + , _useAddresses :: !(Maybe JSON) + , _useAliases :: !(Maybe [Text]) + , _useThumbnailPhotoUrl :: !(Maybe Text) + , _useExternalIds :: !(Maybe JSON) + , _useSuspended :: !(Maybe Bool) + , _useAgreedToTerms :: !(Maybe Bool) + , _useDeletionTime :: !(Maybe UTCTime) + , _useNonEditableAliases :: !(Maybe [Text]) + , _useOrgUnitPath :: !(Maybe Text) + , _useCustomerId :: !(Maybe Text) + , _useIncludeInGlobalAddressList :: !(Maybe Bool) + , _usePhones :: !(Maybe JSON) + , _useName :: !(Maybe (Maybe UserName)) + , _usePassword :: !(Maybe Text) + , _useEmails :: !(Maybe JSON) + , _useIms :: !(Maybe JSON) + , _useIsAdmin :: !(Maybe Bool) + , _useId :: !(Maybe Text) + , _useOrganizations :: !(Maybe JSON) + , _usePrimaryEmail :: !(Maybe Text) + , _useNotes :: !(Maybe JSON) + , _useIsDelegatedAdmin :: !(Maybe Bool) + , _useIsMailboxSetup :: !(Maybe Bool) + , _useCustomSchemas :: !(Maybe UserCustomSchemas) + , _useSuspensionReason :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'useCreationTime' +-- +-- * 'useLastLoginTime' +-- +-- * 'useThumbnailPhotoEtag' +-- +-- * 'useEtag' +-- +-- * 'useIpWhitelisted' +-- +-- * 'useRelations' +-- +-- * 'useHashFunction' +-- +-- * 'useKind' +-- +-- * 'useChangePasswordAtNextLogin' +-- +-- * 'useWebsites' +-- +-- * 'useAddresses' +-- +-- * 'useAliases' +-- +-- * 'useThumbnailPhotoUrl' +-- +-- * 'useExternalIds' +-- +-- * 'useSuspended' +-- +-- * 'useAgreedToTerms' +-- +-- * 'useDeletionTime' +-- +-- * 'useNonEditableAliases' +-- +-- * 'useOrgUnitPath' +-- +-- * 'useCustomerId' +-- +-- * 'useIncludeInGlobalAddressList' +-- +-- * 'usePhones' +-- +-- * 'useName' +-- +-- * 'usePassword' +-- +-- * 'useEmails' +-- +-- * 'useIms' +-- +-- * 'useIsAdmin' +-- +-- * 'useId' +-- +-- * 'useOrganizations' +-- +-- * 'usePrimaryEmail' +-- +-- * 'useNotes' +-- +-- * 'useIsDelegatedAdmin' +-- +-- * 'useIsMailboxSetup' +-- +-- * 'useCustomSchemas' +-- +-- * 'useSuspensionReason' +user + :: User +user = + User + { _useCreationTime = Nothing + , _useLastLoginTime = Nothing + , _useThumbnailPhotoEtag = Nothing + , _useEtag = Nothing + , _useIpWhitelisted = Nothing + , _useRelations = Nothing + , _useHashFunction = Nothing + , _useKind = "admin#directory#user" + , _useChangePasswordAtNextLogin = Nothing + , _useWebsites = Nothing + , _useAddresses = Nothing + , _useAliases = Nothing + , _useThumbnailPhotoUrl = Nothing + , _useExternalIds = Nothing + , _useSuspended = Nothing + , _useAgreedToTerms = Nothing + , _useDeletionTime = Nothing + , _useNonEditableAliases = Nothing + , _useOrgUnitPath = Nothing + , _useCustomerId = Nothing + , _useIncludeInGlobalAddressList = Nothing + , _usePhones = Nothing + , _useName = Nothing + , _usePassword = Nothing + , _useEmails = Nothing + , _useIms = Nothing + , _useIsAdmin = Nothing + , _useId = Nothing + , _useOrganizations = Nothing + , _usePrimaryEmail = Nothing + , _useNotes = Nothing + , _useIsDelegatedAdmin = Nothing + , _useIsMailboxSetup = Nothing + , _useCustomSchemas = Nothing + , _useSuspensionReason = Nothing + } + +-- | User\'s Google account creation time. (Read-only) +useCreationTime :: Lens' User (Maybe UTCTime) +useCreationTime + = lens _useCreationTime + (\ s a -> s{_useCreationTime = a}) + +-- | User\'s last login time. (Read-only) +useLastLoginTime :: Lens' User (Maybe UTCTime) +useLastLoginTime + = lens _useLastLoginTime + (\ s a -> s{_useLastLoginTime = a}) + +-- | ETag of the user\'s photo (Read-only) +useThumbnailPhotoEtag :: Lens' User (Maybe Text) +useThumbnailPhotoEtag + = lens _useThumbnailPhotoEtag + (\ s a -> s{_useThumbnailPhotoEtag = a}) + +-- | ETag of the resource. +useEtag :: Lens' User (Maybe Text) +useEtag = lens _useEtag (\ s a -> s{_useEtag = a}) + +-- | Boolean indicating if ip is whitelisted +useIpWhitelisted :: Lens' User (Maybe Bool) +useIpWhitelisted + = lens _useIpWhitelisted + (\ s a -> s{_useIpWhitelisted = a}) + +useRelations :: Lens' User (Maybe JSON) +useRelations + = lens _useRelations (\ s a -> s{_useRelations = a}) + +-- | Hash function name for password. Supported are MD5, SHA-1 and crypt +useHashFunction :: Lens' User (Maybe Text) +useHashFunction + = lens _useHashFunction + (\ s a -> s{_useHashFunction = a}) + +-- | Kind of resource this is. +useKind :: Lens' User Text +useKind = lens _useKind (\ s a -> s{_useKind = a}) + +-- | Boolean indicating if the user should change password in next login +useChangePasswordAtNextLogin :: Lens' User (Maybe Bool) +useChangePasswordAtNextLogin + = lens _useChangePasswordAtNextLogin + (\ s a -> s{_useChangePasswordAtNextLogin = a}) + +useWebsites :: Lens' User (Maybe JSON) +useWebsites + = lens _useWebsites (\ s a -> s{_useWebsites = a}) + +useAddresses :: Lens' User (Maybe JSON) +useAddresses + = lens _useAddresses (\ s a -> s{_useAddresses = a}) + +-- | List of aliases (Read-only) +useAliases :: Lens' User [Text] +useAliases + = lens _useAliases (\ s a -> s{_useAliases = a}) . + _Default + . _Coerce + +-- | Photo Url of the user (Read-only) +useThumbnailPhotoUrl :: Lens' User (Maybe Text) +useThumbnailPhotoUrl + = lens _useThumbnailPhotoUrl + (\ s a -> s{_useThumbnailPhotoUrl = a}) + +useExternalIds :: Lens' User (Maybe JSON) +useExternalIds + = lens _useExternalIds + (\ s a -> s{_useExternalIds = a}) + +-- | Indicates if user is suspended +useSuspended :: Lens' User (Maybe Bool) +useSuspended + = lens _useSuspended (\ s a -> s{_useSuspended = a}) + +-- | Indicates if user has agreed to terms (Read-only) +useAgreedToTerms :: Lens' User (Maybe Bool) +useAgreedToTerms + = lens _useAgreedToTerms + (\ s a -> s{_useAgreedToTerms = a}) + +useDeletionTime :: Lens' User (Maybe UTCTime) +useDeletionTime + = lens _useDeletionTime + (\ s a -> s{_useDeletionTime = a}) + +-- | List of non editable aliases (Read-only) +useNonEditableAliases :: Lens' User [Text] +useNonEditableAliases + = lens _useNonEditableAliases + (\ s a -> s{_useNonEditableAliases = a}) + . _Default + . _Coerce + +-- | OrgUnit of User +useOrgUnitPath :: Lens' User (Maybe Text) +useOrgUnitPath + = lens _useOrgUnitPath + (\ s a -> s{_useOrgUnitPath = a}) + +-- | CustomerId of User (Read-only) +useCustomerId :: Lens' User (Maybe Text) +useCustomerId + = lens _useCustomerId + (\ s a -> s{_useCustomerId = a}) + +-- | Boolean indicating if user is included in Global Address List +useIncludeInGlobalAddressList :: Lens' User (Maybe Bool) +useIncludeInGlobalAddressList + = lens _useIncludeInGlobalAddressList + (\ s a -> s{_useIncludeInGlobalAddressList = a}) + +usePhones :: Lens' User (Maybe JSON) +usePhones + = lens _usePhones (\ s a -> s{_usePhones = a}) + +-- | User\'s name +useName :: Lens' User (Maybe (Maybe UserName)) +useName = lens _useName (\ s a -> s{_useName = a}) + +-- | User\'s password +usePassword :: Lens' User (Maybe Text) +usePassword + = lens _usePassword (\ s a -> s{_usePassword = a}) + +useEmails :: Lens' User (Maybe JSON) +useEmails + = lens _useEmails (\ s a -> s{_useEmails = a}) + +useIms :: Lens' User (Maybe JSON) +useIms = lens _useIms (\ s a -> s{_useIms = a}) + +-- | Boolean indicating if the user is admin (Read-only) +useIsAdmin :: Lens' User (Maybe Bool) +useIsAdmin + = lens _useIsAdmin (\ s a -> s{_useIsAdmin = a}) + +-- | Unique identifier of User (Read-only) +useId :: Lens' User (Maybe Text) +useId = lens _useId (\ s a -> s{_useId = a}) + +useOrganizations :: Lens' User (Maybe JSON) +useOrganizations + = lens _useOrganizations + (\ s a -> s{_useOrganizations = a}) + +-- | username of User +usePrimaryEmail :: Lens' User (Maybe Text) +usePrimaryEmail + = lens _usePrimaryEmail + (\ s a -> s{_usePrimaryEmail = a}) + +useNotes :: Lens' User (Maybe JSON) +useNotes = lens _useNotes (\ s a -> s{_useNotes = a}) + +-- | Boolean indicating if the user is delegated admin (Read-only) +useIsDelegatedAdmin :: Lens' User (Maybe Bool) +useIsDelegatedAdmin + = lens _useIsDelegatedAdmin + (\ s a -> s{_useIsDelegatedAdmin = a}) + +-- | Is mailbox setup (Read-only) +useIsMailboxSetup :: Lens' User (Maybe Bool) +useIsMailboxSetup + = lens _useIsMailboxSetup + (\ s a -> s{_useIsMailboxSetup = a}) + +-- | Custom fields of the user. +useCustomSchemas :: Lens' User (Maybe UserCustomSchemas) +useCustomSchemas + = lens _useCustomSchemas + (\ s a -> s{_useCustomSchemas = a}) + +-- | Suspension reason if user is suspended (Read-only) +useSuspensionReason :: Lens' User (Maybe Text) +useSuspensionReason + = lens _useSuspensionReason + (\ s a -> s{_useSuspensionReason = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "creationTime") <*> (o .:? "lastLoginTime") + <*> (o .:? "thumbnailPhotoEtag") + <*> (o .:? "etag") + <*> (o .:? "ipWhitelisted") + <*> (o .:? "relations") + <*> (o .:? "hashFunction") + <*> (o .:? "kind" .!= "admin#directory#user") + <*> (o .:? "changePasswordAtNextLogin") + <*> (o .:? "websites") + <*> (o .:? "addresses") + <*> (o .:? "aliases" .!= mempty) + <*> (o .:? "thumbnailPhotoUrl") + <*> (o .:? "externalIds") + <*> (o .:? "suspended") + <*> (o .:? "agreedToTerms") + <*> (o .:? "deletionTime") + <*> (o .:? "nonEditableAliases" .!= mempty) + <*> (o .:? "orgUnitPath") + <*> (o .:? "customerId") + <*> (o .:? "includeInGlobalAddressList") + <*> (o .:? "phones") + <*> (o .:? "name") + <*> (o .:? "password") + <*> (o .:? "emails") + <*> (o .:? "ims") + <*> (o .:? "isAdmin") + <*> (o .:? "id") + <*> (o .:? "organizations") + <*> (o .:? "primaryEmail") + <*> (o .:? "notes") + <*> (o .:? "isDelegatedAdmin") + <*> (o .:? "isMailboxSetup") + <*> (o .:? "customSchemas") + <*> (o .:? "suspensionReason")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("creationTime" .=) <$> _useCreationTime, + ("lastLoginTime" .=) <$> _useLastLoginTime, + ("thumbnailPhotoEtag" .=) <$> _useThumbnailPhotoEtag, + ("etag" .=) <$> _useEtag, + ("ipWhitelisted" .=) <$> _useIpWhitelisted, + ("relations" .=) <$> _useRelations, + ("hashFunction" .=) <$> _useHashFunction, + Just ("kind" .= _useKind), + ("changePasswordAtNextLogin" .=) <$> + _useChangePasswordAtNextLogin, + ("websites" .=) <$> _useWebsites, + ("addresses" .=) <$> _useAddresses, + ("aliases" .=) <$> _useAliases, + ("thumbnailPhotoUrl" .=) <$> _useThumbnailPhotoUrl, + ("externalIds" .=) <$> _useExternalIds, + ("suspended" .=) <$> _useSuspended, + ("agreedToTerms" .=) <$> _useAgreedToTerms, + ("deletionTime" .=) <$> _useDeletionTime, + ("nonEditableAliases" .=) <$> _useNonEditableAliases, + ("orgUnitPath" .=) <$> _useOrgUnitPath, + ("customerId" .=) <$> _useCustomerId, + ("includeInGlobalAddressList" .=) <$> + _useIncludeInGlobalAddressList, + ("phones" .=) <$> _usePhones, + ("name" .=) <$> _useName, + ("password" .=) <$> _usePassword, + ("emails" .=) <$> _useEmails, ("ims" .=) <$> _useIms, + ("isAdmin" .=) <$> _useIsAdmin, ("id" .=) <$> _useId, + ("organizations" .=) <$> _useOrganizations, + ("primaryEmail" .=) <$> _usePrimaryEmail, + ("notes" .=) <$> _useNotes, + ("isDelegatedAdmin" .=) <$> _useIsDelegatedAdmin, + ("isMailboxSetup" .=) <$> _useIsMailboxSetup, + ("customSchemas" .=) <$> _useCustomSchemas, + ("suspensionReason" .=) <$> _useSuspensionReason]) + +-- | JSON template for Schema resource in Directory API. +-- +-- /See:/ 'schema' smart constructor. +data Schema = Schema + { _schEtag :: !(Maybe Text) + , _schKind :: !Text + , _schSchemaName :: !(Maybe Text) + , _schSchemaId :: !(Maybe Text) + , _schFields :: !(Maybe [Maybe SchemaFieldSpec]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Schema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'schEtag' +-- +-- * 'schKind' +-- +-- * 'schSchemaName' +-- +-- * 'schSchemaId' +-- +-- * 'schFields' +schema + :: Schema +schema = + Schema + { _schEtag = Nothing + , _schKind = "admin#directory#schema" + , _schSchemaName = Nothing + , _schSchemaId = Nothing + , _schFields = Nothing + } + +-- | ETag of the resource. +schEtag :: Lens' Schema (Maybe Text) +schEtag = lens _schEtag (\ s a -> s{_schEtag = a}) + +-- | Kind of resource this is. +schKind :: Lens' Schema Text +schKind = lens _schKind (\ s a -> s{_schKind = a}) + +-- | Schema name +schSchemaName :: Lens' Schema (Maybe Text) +schSchemaName + = lens _schSchemaName + (\ s a -> s{_schSchemaName = a}) + +-- | Unique identifier of Schema (Read-only) +schSchemaId :: Lens' Schema (Maybe Text) +schSchemaId + = lens _schSchemaId (\ s a -> s{_schSchemaId = a}) + +-- | Fields of Schema +schFields :: Lens' Schema [Maybe SchemaFieldSpec] +schFields + = lens _schFields (\ s a -> s{_schFields = a}) . + _Default + . _Coerce + +instance FromJSON Schema where + parseJSON + = withObject "Schema" + (\ o -> + Schema <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#schema") + <*> (o .:? "schemaName") + <*> (o .:? "schemaId") + <*> (o .:? "fields" .!= mempty)) + +instance ToJSON Schema where + toJSON Schema{..} + = object + (catMaybes + [("etag" .=) <$> _schEtag, Just ("kind" .= _schKind), + ("schemaName" .=) <$> _schSchemaName, + ("schemaId" .=) <$> _schSchemaId, + ("fields" .=) <$> _schFields]) + +-- | JSON response template for List Organization Units operation in +-- Directory API. +-- +-- /See:/ 'orgUnits' smart constructor. +data OrgUnits = OrgUnits + { _oEtag :: !(Maybe Text) + , _oKind :: !Text + , _oOrganizationUnits :: !(Maybe [Maybe OrgUnit]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgUnits' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oEtag' +-- +-- * 'oKind' +-- +-- * 'oOrganizationUnits' +orgUnits + :: OrgUnits +orgUnits = + OrgUnits + { _oEtag = Nothing + , _oKind = "admin#directory#orgUnits" + , _oOrganizationUnits = Nothing + } + +-- | ETag of the resource. +oEtag :: Lens' OrgUnits (Maybe Text) +oEtag = lens _oEtag (\ s a -> s{_oEtag = a}) + +-- | Kind of resource this is. +oKind :: Lens' OrgUnits Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | List of user objects. +oOrganizationUnits :: Lens' OrgUnits [Maybe OrgUnit] +oOrganizationUnits + = lens _oOrganizationUnits + (\ s a -> s{_oOrganizationUnits = a}) + . _Default + . _Coerce + +instance FromJSON OrgUnits where + parseJSON + = withObject "OrgUnits" + (\ o -> + OrgUnits <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#orgUnits") + <*> (o .:? "organizationUnits" .!= mempty)) + +instance ToJSON OrgUnits where + toJSON OrgUnits{..} + = object + (catMaybes + [("etag" .=) <$> _oEtag, Just ("kind" .= _oKind), + ("organizationUnits" .=) <$> _oOrganizationUnits]) + +-- | JSON response template for List verification codes operation in +-- Directory API. +-- +-- /See:/ 'verificationCodes' smart constructor. +data VerificationCodes = VerificationCodes + { _vEtag :: !(Maybe Text) + , _vKind :: !Text + , _vItems :: !(Maybe [Maybe VerificationCode]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerificationCodes' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vEtag' +-- +-- * 'vKind' +-- +-- * 'vItems' +verificationCodes + :: VerificationCodes +verificationCodes = + VerificationCodes + { _vEtag = Nothing + , _vKind = "admin#directory#verificationCodesList" + , _vItems = Nothing + } + +-- | ETag of the resource. +vEtag :: Lens' VerificationCodes (Maybe Text) +vEtag = lens _vEtag (\ s a -> s{_vEtag = a}) + +-- | The type of the resource. This is always +-- admin#directory#verificationCodesList. +vKind :: Lens' VerificationCodes Text +vKind = lens _vKind (\ s a -> s{_vKind = a}) + +-- | A list of verification code resources. +vItems :: Lens' VerificationCodes [Maybe VerificationCode] +vItems + = lens _vItems (\ s a -> s{_vItems = a}) . _Default . + _Coerce + +instance FromJSON VerificationCodes where + parseJSON + = withObject "VerificationCodes" + (\ o -> + VerificationCodes <$> + (o .:? "etag") <*> + (o .:? "kind" .!= + "admin#directory#verificationCodesList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON VerificationCodes where + toJSON VerificationCodes{..} + = object + (catMaybes + [("etag" .=) <$> _vEtag, Just ("kind" .= _vKind), + ("items" .=) <$> _vItems]) + +-- | JSON template for a relation entry. +-- +-- /See:/ 'userRelation' smart constructor. +data UserRelation = UserRelation + { _urValue :: !(Maybe Text) + , _urType :: !(Maybe Text) + , _urCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRelation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urValue' +-- +-- * 'urType' +-- +-- * 'urCustomType' +userRelation + :: UserRelation +userRelation = + UserRelation + { _urValue = Nothing + , _urType = Nothing + , _urCustomType = Nothing + } + +-- | The name of the relation. +urValue :: Lens' UserRelation (Maybe Text) +urValue = lens _urValue (\ s a -> s{_urValue = a}) + +-- | The relation of the user. Some of the possible values are mother, +-- father, sister, brother, manager, assistant, partner. +urType :: Lens' UserRelation (Maybe Text) +urType = lens _urType (\ s a -> s{_urType = a}) + +-- | Custom Type. +urCustomType :: Lens' UserRelation (Maybe Text) +urCustomType + = lens _urCustomType (\ s a -> s{_urCustomType = a}) + +instance FromJSON UserRelation where + parseJSON + = withObject "UserRelation" + (\ o -> + UserRelation <$> + (o .:? "value") <*> (o .:? "type") <*> + (o .:? "customType")) + +instance ToJSON UserRelation where + toJSON UserRelation{..} + = object + (catMaybes + [("value" .=) <$> _urValue, ("type" .=) <$> _urType, + ("customType" .=) <$> _urCustomType]) + +-- | JSON template for a website entry. +-- +-- /See:/ 'userWebsite' smart constructor. +data UserWebsite = UserWebsite + { _uwValue :: !(Maybe Text) + , _uwPrimary :: !(Maybe Bool) + , _uwType :: !(Maybe Text) + , _uwCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserWebsite' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uwValue' +-- +-- * 'uwPrimary' +-- +-- * 'uwType' +-- +-- * 'uwCustomType' +userWebsite + :: UserWebsite +userWebsite = + UserWebsite + { _uwValue = Nothing + , _uwPrimary = Nothing + , _uwType = Nothing + , _uwCustomType = Nothing + } + +-- | Website. +uwValue :: Lens' UserWebsite (Maybe Text) +uwValue = lens _uwValue (\ s a -> s{_uwValue = a}) + +-- | If this is user\'s primary website or not. +uwPrimary :: Lens' UserWebsite (Maybe Bool) +uwPrimary + = lens _uwPrimary (\ s a -> s{_uwPrimary = a}) + +-- | Each entry can have a type which indicates standard types of that entry. +-- For example website could be of home, work, blog etc. In addition to the +-- standard type, an entry can have a custom type and can give it any name. +-- Such types should have the CUSTOM value as type and also have a +-- customType value. +uwType :: Lens' UserWebsite (Maybe Text) +uwType = lens _uwType (\ s a -> s{_uwType = a}) + +-- | Custom Type. +uwCustomType :: Lens' UserWebsite (Maybe Text) +uwCustomType + = lens _uwCustomType (\ s a -> s{_uwCustomType = a}) + +instance FromJSON UserWebsite where + parseJSON + = withObject "UserWebsite" + (\ o -> + UserWebsite <$> + (o .:? "value") <*> (o .:? "primary") <*> + (o .:? "type") + <*> (o .:? "customType")) + +instance ToJSON UserWebsite where + toJSON UserWebsite{..} + = object + (catMaybes + [("value" .=) <$> _uwValue, + ("primary" .=) <$> _uwPrimary, + ("type" .=) <$> _uwType, + ("customType" .=) <$> _uwCustomType]) + +-- | JSON template for an organization entry. +-- +-- /See:/ 'userOrganization' smart constructor. +data UserOrganization = UserOrganization + { _uoDepartment :: !(Maybe Text) + , _uoLocation :: !(Maybe Text) + , _uoCostCenter :: !(Maybe Text) + , _uoDomain :: !(Maybe Text) + , _uoSymbol :: !(Maybe Text) + , _uoPrimary :: !(Maybe Bool) + , _uoName :: !(Maybe Text) + , _uoTitle :: !(Maybe Text) + , _uoType :: !(Maybe Text) + , _uoCustomType :: !(Maybe Text) + , _uoDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserOrganization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uoDepartment' +-- +-- * 'uoLocation' +-- +-- * 'uoCostCenter' +-- +-- * 'uoDomain' +-- +-- * 'uoSymbol' +-- +-- * 'uoPrimary' +-- +-- * 'uoName' +-- +-- * 'uoTitle' +-- +-- * 'uoType' +-- +-- * 'uoCustomType' +-- +-- * 'uoDescription' +userOrganization + :: UserOrganization +userOrganization = + UserOrganization + { _uoDepartment = Nothing + , _uoLocation = Nothing + , _uoCostCenter = Nothing + , _uoDomain = Nothing + , _uoSymbol = Nothing + , _uoPrimary = Nothing + , _uoName = Nothing + , _uoTitle = Nothing + , _uoType = Nothing + , _uoCustomType = Nothing + , _uoDescription = Nothing + } + +-- | Department within the organization. +uoDepartment :: Lens' UserOrganization (Maybe Text) +uoDepartment + = lens _uoDepartment (\ s a -> s{_uoDepartment = a}) + +-- | Location of the organization. This need not be fully qualified address. +uoLocation :: Lens' UserOrganization (Maybe Text) +uoLocation + = lens _uoLocation (\ s a -> s{_uoLocation = a}) + +-- | The cost center of the users department. +uoCostCenter :: Lens' UserOrganization (Maybe Text) +uoCostCenter + = lens _uoCostCenter (\ s a -> s{_uoCostCenter = a}) + +-- | The domain to which the organization belongs to. +uoDomain :: Lens' UserOrganization (Maybe Text) +uoDomain = lens _uoDomain (\ s a -> s{_uoDomain = a}) + +-- | Symbol of the organization. +uoSymbol :: Lens' UserOrganization (Maybe Text) +uoSymbol = lens _uoSymbol (\ s a -> s{_uoSymbol = a}) + +-- | If it user\'s primary organization. +uoPrimary :: Lens' UserOrganization (Maybe Bool) +uoPrimary + = lens _uoPrimary (\ s a -> s{_uoPrimary = a}) + +-- | Name of the organization +uoName :: Lens' UserOrganization (Maybe Text) +uoName = lens _uoName (\ s a -> s{_uoName = a}) + +-- | Title (designation) of the user in the organization. +uoTitle :: Lens' UserOrganization (Maybe Text) +uoTitle = lens _uoTitle (\ s a -> s{_uoTitle = a}) + +-- | Each entry can have a type which indicates standard types of that entry. +-- For example organization could be of school, work etc. In addition to +-- the standard type, an entry can have a custom type and can give it any +-- name. Such types should have the CUSTOM value as type and also have a +-- CustomType value. +uoType :: Lens' UserOrganization (Maybe Text) +uoType = lens _uoType (\ s a -> s{_uoType = a}) + +-- | Custom type. +uoCustomType :: Lens' UserOrganization (Maybe Text) +uoCustomType + = lens _uoCustomType (\ s a -> s{_uoCustomType = a}) + +-- | Description of the organization. +uoDescription :: Lens' UserOrganization (Maybe Text) +uoDescription + = lens _uoDescription + (\ s a -> s{_uoDescription = a}) + +instance FromJSON UserOrganization where + parseJSON + = withObject "UserOrganization" + (\ o -> + UserOrganization <$> + (o .:? "department") <*> (o .:? "location") <*> + (o .:? "costCenter") + <*> (o .:? "domain") + <*> (o .:? "symbol") + <*> (o .:? "primary") + <*> (o .:? "name") + <*> (o .:? "title") + <*> (o .:? "type") + <*> (o .:? "customType") + <*> (o .:? "description")) + +instance ToJSON UserOrganization where + toJSON UserOrganization{..} + = object + (catMaybes + [("department" .=) <$> _uoDepartment, + ("location" .=) <$> _uoLocation, + ("costCenter" .=) <$> _uoCostCenter, + ("domain" .=) <$> _uoDomain, + ("symbol" .=) <$> _uoSymbol, + ("primary" .=) <$> _uoPrimary, + ("name" .=) <$> _uoName, ("title" .=) <$> _uoTitle, + ("type" .=) <$> _uoType, + ("customType" .=) <$> _uoCustomType, + ("description" .=) <$> _uoDescription]) + +-- | JSON template for a phone entry. +-- +-- /See:/ 'userPhone' smart constructor. +data UserPhone = UserPhone + { _upValue :: !(Maybe Text) + , _upPrimary :: !(Maybe Bool) + , _upType :: !(Maybe Text) + , _upCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserPhone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upValue' +-- +-- * 'upPrimary' +-- +-- * 'upType' +-- +-- * 'upCustomType' +userPhone + :: UserPhone +userPhone = + UserPhone + { _upValue = Nothing + , _upPrimary = Nothing + , _upType = Nothing + , _upCustomType = Nothing + } + +-- | Phone number. +upValue :: Lens' UserPhone (Maybe Text) +upValue = lens _upValue (\ s a -> s{_upValue = a}) + +-- | If this is user\'s primary phone or not. +upPrimary :: Lens' UserPhone (Maybe Bool) +upPrimary + = lens _upPrimary (\ s a -> s{_upPrimary = a}) + +-- | Each entry can have a type which indicates standard types of that entry. +-- For example phone could be of home_fax, work, mobile etc. In addition to +-- the standard type, an entry can have a custom type and can give it any +-- name. Such types should have the CUSTOM value as type and also have a +-- customType value. +upType :: Lens' UserPhone (Maybe Text) +upType = lens _upType (\ s a -> s{_upType = a}) + +-- | Custom Type. +upCustomType :: Lens' UserPhone (Maybe Text) +upCustomType + = lens _upCustomType (\ s a -> s{_upCustomType = a}) + +instance FromJSON UserPhone where + parseJSON + = withObject "UserPhone" + (\ o -> + UserPhone <$> + (o .:? "value") <*> (o .:? "primary") <*> + (o .:? "type") + <*> (o .:? "customType")) + +instance ToJSON UserPhone where + toJSON UserPhone{..} + = object + (catMaybes + [("value" .=) <$> _upValue, + ("primary" .=) <$> _upPrimary, + ("type" .=) <$> _upType, + ("customType" .=) <$> _upCustomType]) + +-- | JSON template for Photo object in Directory API. +-- +-- /See:/ 'userPhoto' smart constructor. +data UserPhoto = UserPhoto + { _upPhotoData :: !(Maybe Word8) + , _upEtag :: !(Maybe Text) + , _upHeight :: !(Maybe Int32) + , _upKind :: !Text + , _upWidth :: !(Maybe Int32) + , _upMimeType :: !(Maybe Text) + , _upId :: !(Maybe Text) + , _upPrimaryEmail :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserPhoto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upPhotoData' +-- +-- * 'upEtag' +-- +-- * 'upHeight' +-- +-- * 'upKind' +-- +-- * 'upWidth' +-- +-- * 'upMimeType' +-- +-- * 'upId' +-- +-- * 'upPrimaryEmail' +userPhoto + :: UserPhoto +userPhoto = + UserPhoto + { _upPhotoData = Nothing + , _upEtag = Nothing + , _upHeight = Nothing + , _upKind = "admin#directory#user#photo" + , _upWidth = Nothing + , _upMimeType = Nothing + , _upId = Nothing + , _upPrimaryEmail = Nothing + } + +-- | Base64 encoded photo data +upPhotoData :: Lens' UserPhoto (Maybe Word8) +upPhotoData + = lens _upPhotoData (\ s a -> s{_upPhotoData = a}) + +-- | ETag of the resource. +upEtag :: Lens' UserPhoto (Maybe Text) +upEtag = lens _upEtag (\ s a -> s{_upEtag = a}) + +-- | Height in pixels of the photo +upHeight :: Lens' UserPhoto (Maybe Int32) +upHeight = lens _upHeight (\ s a -> s{_upHeight = a}) + +-- | Kind of resource this is. +upKind :: Lens' UserPhoto Text +upKind = lens _upKind (\ s a -> s{_upKind = a}) + +-- | Width in pixels of the photo +upWidth :: Lens' UserPhoto (Maybe Int32) +upWidth = lens _upWidth (\ s a -> s{_upWidth = a}) + +-- | Mime Type of the photo +upMimeType :: Lens' UserPhoto (Maybe Text) +upMimeType + = lens _upMimeType (\ s a -> s{_upMimeType = a}) + +-- | Unique identifier of User (Read-only) +upId :: Lens' UserPhoto (Maybe Text) +upId = lens _upId (\ s a -> s{_upId = a}) + +-- | Primary email of User (Read-only) +upPrimaryEmail :: Lens' UserPhoto (Maybe Text) +upPrimaryEmail + = lens _upPrimaryEmail + (\ s a -> s{_upPrimaryEmail = a}) + +instance FromJSON UserPhoto where + parseJSON + = withObject "UserPhoto" + (\ o -> + UserPhoto <$> + (o .:? "photoData") <*> (o .:? "etag") <*> + (o .:? "height") + <*> (o .:? "kind" .!= "admin#directory#user#photo") + <*> (o .:? "width") + <*> (o .:? "mimeType") + <*> (o .:? "id") + <*> (o .:? "primaryEmail")) + +instance ToJSON UserPhoto where + toJSON UserPhoto{..} + = object + (catMaybes + [("photoData" .=) <$> _upPhotoData, + ("etag" .=) <$> _upEtag, ("height" .=) <$> _upHeight, + Just ("kind" .= _upKind), ("width" .=) <$> _upWidth, + ("mimeType" .=) <$> _upMimeType, ("id" .=) <$> _upId, + ("primaryEmail" .=) <$> _upPrimaryEmail]) + +-- | JSON template for an email. +-- +-- /See:/ 'userEmail' smart constructor. +data UserEmail = UserEmail + { _ueAddress :: !(Maybe Text) + , _uePrimary :: !(Maybe Bool) + , _ueType :: !(Maybe Text) + , _ueCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserEmail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ueAddress' +-- +-- * 'uePrimary' +-- +-- * 'ueType' +-- +-- * 'ueCustomType' +userEmail + :: UserEmail +userEmail = + UserEmail + { _ueAddress = Nothing + , _uePrimary = Nothing + , _ueType = Nothing + , _ueCustomType = Nothing + } + +-- | Email id of the user. +ueAddress :: Lens' UserEmail (Maybe Text) +ueAddress + = lens _ueAddress (\ s a -> s{_ueAddress = a}) + +-- | If this is user\'s primary email. Only one entry could be marked as +-- primary. +uePrimary :: Lens' UserEmail (Maybe Bool) +uePrimary + = lens _uePrimary (\ s a -> s{_uePrimary = a}) + +-- | Each entry can have a type which indicates standard types of that entry. +-- For example email could be of home, work etc. In addition to the +-- standard type, an entry can have a custom type and can take any value +-- Such types should have the CUSTOM value as type and also have a +-- customType value. +ueType :: Lens' UserEmail (Maybe Text) +ueType = lens _ueType (\ s a -> s{_ueType = a}) + +-- | Custom Type. +ueCustomType :: Lens' UserEmail (Maybe Text) +ueCustomType + = lens _ueCustomType (\ s a -> s{_ueCustomType = a}) + +instance FromJSON UserEmail where + parseJSON + = withObject "UserEmail" + (\ o -> + UserEmail <$> + (o .:? "address") <*> (o .:? "primary") <*> + (o .:? "type") + <*> (o .:? "customType")) + +instance ToJSON UserEmail where + toJSON UserEmail{..} + = object + (catMaybes + [("address" .=) <$> _ueAddress, + ("primary" .=) <$> _uePrimary, + ("type" .=) <$> _ueType, + ("customType" .=) <$> _ueCustomType]) + +-- | JSON template for Member resource in Directory API. +-- +-- /See:/ 'member' smart constructor. +data Member = Member + { _memEmail :: !(Maybe Text) + , _memEtag :: !(Maybe Text) + , _memKind :: !Text + , _memRole :: !(Maybe Text) + , _memId :: !(Maybe Text) + , _memType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Member' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'memEmail' +-- +-- * 'memEtag' +-- +-- * 'memKind' +-- +-- * 'memRole' +-- +-- * 'memId' +-- +-- * 'memType' +member + :: Member +member = + Member + { _memEmail = Nothing + , _memEtag = Nothing + , _memKind = "admin#directory#member" + , _memRole = Nothing + , _memId = Nothing + , _memType = Nothing + } + +-- | Email of member (Read-only) +memEmail :: Lens' Member (Maybe Text) +memEmail = lens _memEmail (\ s a -> s{_memEmail = a}) + +-- | ETag of the resource. +memEtag :: Lens' Member (Maybe Text) +memEtag = lens _memEtag (\ s a -> s{_memEtag = a}) + +-- | Kind of resource this is. +memKind :: Lens' Member Text +memKind = lens _memKind (\ s a -> s{_memKind = a}) + +-- | Role of member +memRole :: Lens' Member (Maybe Text) +memRole = lens _memRole (\ s a -> s{_memRole = a}) + +-- | Unique identifier of customer member (Read-only) Unique identifier of +-- group (Read-only) Unique identifier of member (Read-only) +memId :: Lens' Member (Maybe Text) +memId = lens _memId (\ s a -> s{_memId = a}) + +-- | Type of member (Immutable) +memType :: Lens' Member (Maybe Text) +memType = lens _memType (\ s a -> s{_memType = a}) + +instance FromJSON Member where + parseJSON + = withObject "Member" + (\ o -> + Member <$> + (o .:? "email") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#member") + <*> (o .:? "role") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Member where + toJSON Member{..} + = object + (catMaybes + [("email" .=) <$> _memEmail, + ("etag" .=) <$> _memEtag, Just ("kind" .= _memKind), + ("role" .=) <$> _memRole, ("id" .=) <$> _memId, + ("type" .=) <$> _memType]) + +-- | JSON template for Mobile Device resource in Directory API. +-- +-- /See:/ 'mobileDevice' smart constructor. +data MobileDevice = MobileDevice + { _mobEmail :: !(Maybe [Text]) + , _mobStatus :: !(Maybe Text) + , _mobEtag :: !(Maybe Text) + , _mobResourceId :: !(Maybe Text) + , _mobBuildNumber :: !(Maybe Text) + , _mobManagedAccountIsOnOwnerProfile :: !(Maybe Bool) + , _mobLastSync :: !(Maybe UTCTime) + , _mobOtherAccountsInfo :: !(Maybe [Text]) + , _mobKind :: !Text + , _mobAdbStatus :: !(Maybe Bool) + , _mobNetworkOperator :: !(Maybe Text) + , _mobKernelVersion :: !(Maybe Text) + , _mobOs :: !(Maybe Text) + , _mobName :: !(Maybe [Text]) + , _mobModel :: !(Maybe Text) + , _mobDeveloperOptionsStatus :: !(Maybe Bool) + , _mobUnknownSourcesStatus :: !(Maybe Bool) + , _mobMeid :: !(Maybe Text) + , _mobDeviceId :: !(Maybe Text) + , _mobFirstSync :: !(Maybe UTCTime) + , _mobUserAgent :: !(Maybe Text) + , _mobImei :: !(Maybe Text) + , _mobType :: !(Maybe Text) + , _mobWifiMacAddress :: !(Maybe Text) + , _mobSerialNumber :: !(Maybe Text) + , _mobHardwareId :: !(Maybe Text) + , _mobBasebandVersion :: !(Maybe Text) + , _mobSupportsWorkProfile :: !(Maybe Bool) + , _mobDeviceCompromisedStatus :: !(Maybe Text) + , _mobApplications :: !(Maybe [MobileDeviceApplicationsItem]) + , _mobDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileDevice' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mobEmail' +-- +-- * 'mobStatus' +-- +-- * 'mobEtag' +-- +-- * 'mobResourceId' +-- +-- * 'mobBuildNumber' +-- +-- * 'mobManagedAccountIsOnOwnerProfile' +-- +-- * 'mobLastSync' +-- +-- * 'mobOtherAccountsInfo' +-- +-- * 'mobKind' +-- +-- * 'mobAdbStatus' +-- +-- * 'mobNetworkOperator' +-- +-- * 'mobKernelVersion' +-- +-- * 'mobOs' +-- +-- * 'mobName' +-- +-- * 'mobModel' +-- +-- * 'mobDeveloperOptionsStatus' +-- +-- * 'mobUnknownSourcesStatus' +-- +-- * 'mobMeid' +-- +-- * 'mobDeviceId' +-- +-- * 'mobFirstSync' +-- +-- * 'mobUserAgent' +-- +-- * 'mobImei' +-- +-- * 'mobType' +-- +-- * 'mobWifiMacAddress' +-- +-- * 'mobSerialNumber' +-- +-- * 'mobHardwareId' +-- +-- * 'mobBasebandVersion' +-- +-- * 'mobSupportsWorkProfile' +-- +-- * 'mobDeviceCompromisedStatus' +-- +-- * 'mobApplications' +-- +-- * 'mobDefaultLanguage' +mobileDevice + :: MobileDevice +mobileDevice = + MobileDevice + { _mobEmail = Nothing + , _mobStatus = Nothing + , _mobEtag = Nothing + , _mobResourceId = Nothing + , _mobBuildNumber = Nothing + , _mobManagedAccountIsOnOwnerProfile = Nothing + , _mobLastSync = Nothing + , _mobOtherAccountsInfo = Nothing + , _mobKind = "admin#directory#mobiledevice" + , _mobAdbStatus = Nothing + , _mobNetworkOperator = Nothing + , _mobKernelVersion = Nothing + , _mobOs = Nothing + , _mobName = Nothing + , _mobModel = Nothing + , _mobDeveloperOptionsStatus = Nothing + , _mobUnknownSourcesStatus = Nothing + , _mobMeid = Nothing + , _mobDeviceId = Nothing + , _mobFirstSync = Nothing + , _mobUserAgent = Nothing + , _mobImei = Nothing + , _mobType = Nothing + , _mobWifiMacAddress = Nothing + , _mobSerialNumber = Nothing + , _mobHardwareId = Nothing + , _mobBasebandVersion = Nothing + , _mobSupportsWorkProfile = Nothing + , _mobDeviceCompromisedStatus = Nothing + , _mobApplications = Nothing + , _mobDefaultLanguage = Nothing + } + +-- | List of owner user\'s email addresses (Read-only) +mobEmail :: Lens' MobileDevice [Text] +mobEmail + = lens _mobEmail (\ s a -> s{_mobEmail = a}) . + _Default + . _Coerce + +-- | Status of the device (Read-only) +mobStatus :: Lens' MobileDevice (Maybe Text) +mobStatus + = lens _mobStatus (\ s a -> s{_mobStatus = a}) + +-- | ETag of the resource. +mobEtag :: Lens' MobileDevice (Maybe Text) +mobEtag = lens _mobEtag (\ s a -> s{_mobEtag = a}) + +-- | Unique identifier of Mobile Device (Read-only) +mobResourceId :: Lens' MobileDevice (Maybe Text) +mobResourceId + = lens _mobResourceId + (\ s a -> s{_mobResourceId = a}) + +-- | Mobile Device Build number (Read-only) +mobBuildNumber :: Lens' MobileDevice (Maybe Text) +mobBuildNumber + = lens _mobBuildNumber + (\ s a -> s{_mobBuildNumber = a}) + +-- | Boolean indicating if this account is on owner\/primary profile or not +-- (Read-only) +mobManagedAccountIsOnOwnerProfile :: Lens' MobileDevice (Maybe Bool) +mobManagedAccountIsOnOwnerProfile + = lens _mobManagedAccountIsOnOwnerProfile + (\ s a -> s{_mobManagedAccountIsOnOwnerProfile = a}) + +-- | Date and time the device was last synchronized with the policy settings +-- in the Google Apps administrator control panel (Read-only) +mobLastSync :: Lens' MobileDevice (Maybe UTCTime) +mobLastSync + = lens _mobLastSync (\ s a -> s{_mobLastSync = a}) + +-- | List of accounts added on device (Read-only) +mobOtherAccountsInfo :: Lens' MobileDevice [Text] +mobOtherAccountsInfo + = lens _mobOtherAccountsInfo + (\ s a -> s{_mobOtherAccountsInfo = a}) + . _Default + . _Coerce + +-- | Kind of resource this is. +mobKind :: Lens' MobileDevice Text +mobKind = lens _mobKind (\ s a -> s{_mobKind = a}) + +-- | Adb (USB debugging) enabled or disabled on device (Read-only) +mobAdbStatus :: Lens' MobileDevice (Maybe Bool) +mobAdbStatus + = lens _mobAdbStatus (\ s a -> s{_mobAdbStatus = a}) + +-- | Mobile Device mobile or network operator (if available) (Read-only) +mobNetworkOperator :: Lens' MobileDevice (Maybe Text) +mobNetworkOperator + = lens _mobNetworkOperator + (\ s a -> s{_mobNetworkOperator = a}) + +-- | Mobile Device Kernel version (Read-only) +mobKernelVersion :: Lens' MobileDevice (Maybe Text) +mobKernelVersion + = lens _mobKernelVersion + (\ s a -> s{_mobKernelVersion = a}) + +-- | Name of the mobile operating system +mobOs :: Lens' MobileDevice (Maybe Text) +mobOs = lens _mobOs (\ s a -> s{_mobOs = a}) + +-- | List of owner user\'s names (Read-only) +mobName :: Lens' MobileDevice [Text] +mobName + = lens _mobName (\ s a -> s{_mobName = a}) . _Default + . _Coerce + +-- | Name of the model of the device +mobModel :: Lens' MobileDevice (Maybe Text) +mobModel = lens _mobModel (\ s a -> s{_mobModel = a}) + +-- | Developer options enabled or disabled on device (Read-only) +mobDeveloperOptionsStatus :: Lens' MobileDevice (Maybe Bool) +mobDeveloperOptionsStatus + = lens _mobDeveloperOptionsStatus + (\ s a -> s{_mobDeveloperOptionsStatus = a}) + +-- | Unknown sources enabled or disabled on device (Read-only) +mobUnknownSourcesStatus :: Lens' MobileDevice (Maybe Bool) +mobUnknownSourcesStatus + = lens _mobUnknownSourcesStatus + (\ s a -> s{_mobUnknownSourcesStatus = a}) + +-- | Mobile Device MEID number (Read-only) +mobMeid :: Lens' MobileDevice (Maybe Text) +mobMeid = lens _mobMeid (\ s a -> s{_mobMeid = a}) + +-- | Mobile Device serial number (Read-only) +mobDeviceId :: Lens' MobileDevice (Maybe Text) +mobDeviceId + = lens _mobDeviceId (\ s a -> s{_mobDeviceId = a}) + +-- | Date and time the device was first synchronized with the policy settings +-- in the Google Apps administrator control panel (Read-only) +mobFirstSync :: Lens' MobileDevice (Maybe UTCTime) +mobFirstSync + = lens _mobFirstSync (\ s a -> s{_mobFirstSync = a}) + +-- | Mobile Device user agent +mobUserAgent :: Lens' MobileDevice (Maybe Text) +mobUserAgent + = lens _mobUserAgent (\ s a -> s{_mobUserAgent = a}) + +-- | Mobile Device IMEI number (Read-only) +mobImei :: Lens' MobileDevice (Maybe Text) +mobImei = lens _mobImei (\ s a -> s{_mobImei = a}) + +-- | The type of device (Read-only) +mobType :: Lens' MobileDevice (Maybe Text) +mobType = lens _mobType (\ s a -> s{_mobType = a}) + +-- | Mobile Device WiFi MAC address (Read-only) +mobWifiMacAddress :: Lens' MobileDevice (Maybe Text) +mobWifiMacAddress + = lens _mobWifiMacAddress + (\ s a -> s{_mobWifiMacAddress = a}) + +-- | Mobile Device SSN or Serial Number (Read-only) +mobSerialNumber :: Lens' MobileDevice (Maybe Text) +mobSerialNumber + = lens _mobSerialNumber + (\ s a -> s{_mobSerialNumber = a}) + +-- | Mobile Device Hardware Id (Read-only) +mobHardwareId :: Lens' MobileDevice (Maybe Text) +mobHardwareId + = lens _mobHardwareId + (\ s a -> s{_mobHardwareId = a}) + +-- | Mobile Device Baseband version (Read-only) +mobBasebandVersion :: Lens' MobileDevice (Maybe Text) +mobBasebandVersion + = lens _mobBasebandVersion + (\ s a -> s{_mobBasebandVersion = a}) + +-- | Work profile supported on device (Read-only) +mobSupportsWorkProfile :: Lens' MobileDevice (Maybe Bool) +mobSupportsWorkProfile + = lens _mobSupportsWorkProfile + (\ s a -> s{_mobSupportsWorkProfile = a}) + +-- | Mobile Device compromised status (Read-only) +mobDeviceCompromisedStatus :: Lens' MobileDevice (Maybe Text) +mobDeviceCompromisedStatus + = lens _mobDeviceCompromisedStatus + (\ s a -> s{_mobDeviceCompromisedStatus = a}) + +-- | List of applications installed on Mobile Device +mobApplications :: Lens' MobileDevice [MobileDeviceApplicationsItem] +mobApplications + = lens _mobApplications + (\ s a -> s{_mobApplications = a}) + . _Default + . _Coerce + +-- | The default locale used on the Mobile Device (Read-only) +mobDefaultLanguage :: Lens' MobileDevice (Maybe Text) +mobDefaultLanguage + = lens _mobDefaultLanguage + (\ s a -> s{_mobDefaultLanguage = a}) + +instance FromJSON MobileDevice where + parseJSON + = withObject "MobileDevice" + (\ o -> + MobileDevice <$> + (o .:? "email" .!= mempty) <*> (o .:? "status") <*> + (o .:? "etag") + <*> (o .:? "resourceId") + <*> (o .:? "buildNumber") + <*> (o .:? "managedAccountIsOnOwnerProfile") + <*> (o .:? "lastSync") + <*> (o .:? "otherAccountsInfo" .!= mempty) + <*> (o .:? "kind" .!= "admin#directory#mobiledevice") + <*> (o .:? "adbStatus") + <*> (o .:? "networkOperator") + <*> (o .:? "kernelVersion") + <*> (o .:? "os") + <*> (o .:? "name" .!= mempty) + <*> (o .:? "model") + <*> (o .:? "developerOptionsStatus") + <*> (o .:? "unknownSourcesStatus") + <*> (o .:? "meid") + <*> (o .:? "deviceId") + <*> (o .:? "firstSync") + <*> (o .:? "userAgent") + <*> (o .:? "imei") + <*> (o .:? "type") + <*> (o .:? "wifiMacAddress") + <*> (o .:? "serialNumber") + <*> (o .:? "hardwareId") + <*> (o .:? "basebandVersion") + <*> (o .:? "supportsWorkProfile") + <*> (o .:? "deviceCompromisedStatus") + <*> (o .:? "applications" .!= mempty) + <*> (o .:? "defaultLanguage")) + +instance ToJSON MobileDevice where + toJSON MobileDevice{..} + = object + (catMaybes + [("email" .=) <$> _mobEmail, + ("status" .=) <$> _mobStatus, + ("etag" .=) <$> _mobEtag, + ("resourceId" .=) <$> _mobResourceId, + ("buildNumber" .=) <$> _mobBuildNumber, + ("managedAccountIsOnOwnerProfile" .=) <$> + _mobManagedAccountIsOnOwnerProfile, + ("lastSync" .=) <$> _mobLastSync, + ("otherAccountsInfo" .=) <$> _mobOtherAccountsInfo, + Just ("kind" .= _mobKind), + ("adbStatus" .=) <$> _mobAdbStatus, + ("networkOperator" .=) <$> _mobNetworkOperator, + ("kernelVersion" .=) <$> _mobKernelVersion, + ("os" .=) <$> _mobOs, ("name" .=) <$> _mobName, + ("model" .=) <$> _mobModel, + ("developerOptionsStatus" .=) <$> + _mobDeveloperOptionsStatus, + ("unknownSourcesStatus" .=) <$> + _mobUnknownSourcesStatus, + ("meid" .=) <$> _mobMeid, + ("deviceId" .=) <$> _mobDeviceId, + ("firstSync" .=) <$> _mobFirstSync, + ("userAgent" .=) <$> _mobUserAgent, + ("imei" .=) <$> _mobImei, ("type" .=) <$> _mobType, + ("wifiMacAddress" .=) <$> _mobWifiMacAddress, + ("serialNumber" .=) <$> _mobSerialNumber, + ("hardwareId" .=) <$> _mobHardwareId, + ("basebandVersion" .=) <$> _mobBasebandVersion, + ("supportsWorkProfile" .=) <$> + _mobSupportsWorkProfile, + ("deviceCompromisedStatus" .=) <$> + _mobDeviceCompromisedStatus, + ("applications" .=) <$> _mobApplications, + ("defaultLanguage" .=) <$> _mobDefaultLanguage]) + +-- | JSON template for a set of custom properties (i.e. all fields in a +-- particular schema) +-- +-- /See:/ 'userCustomProperties' smart constructor. +data UserCustomProperties = + UserCustomProperties + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserCustomProperties' with the minimum fields required to make a request. +-- +userCustomProperties + :: UserCustomProperties +userCustomProperties = UserCustomProperties + +instance FromJSON UserCustomProperties where + parseJSON + = withObject "UserCustomProperties" + (\ o -> pure UserCustomProperties) + +instance ToJSON UserCustomProperties where + toJSON = const (Object mempty) + +-- | JSON request template for firing commands on Mobile Device in Directory +-- Devices API. +-- +-- /See:/ 'mobileDeviceAction' smart constructor. +newtype MobileDeviceAction = MobileDeviceAction + { _mdaAction :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileDeviceAction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdaAction' +mobileDeviceAction + :: MobileDeviceAction +mobileDeviceAction = + MobileDeviceAction + { _mdaAction = Nothing + } + +-- | Action to be taken on the Mobile Device +mdaAction :: Lens' MobileDeviceAction (Maybe Text) +mdaAction + = lens _mdaAction (\ s a -> s{_mdaAction = a}) + +instance FromJSON MobileDeviceAction where + parseJSON + = withObject "MobileDeviceAction" + (\ o -> MobileDeviceAction <$> (o .:? "action")) + +instance ToJSON MobileDeviceAction where + toJSON MobileDeviceAction{..} + = object (catMaybes [("action" .=) <$> _mdaAction]) + +-- | JSON template for FieldSpec resource for Schemas in Directory API. +-- +-- /See:/ 'schemaFieldSpec' smart constructor. +data SchemaFieldSpec = SchemaFieldSpec + { _sfsEtag :: !(Maybe Text) + , _sfsKind :: !Text + , _sfsNumericIndexingSpec :: !(Maybe SchemaFieldSpecNumericIndexingSpec) + , _sfsReadAccessType :: !Text + , _sfsFieldId :: !(Maybe Text) + , _sfsIndexed :: !Bool + , _sfsFieldType :: !(Maybe Text) + , _sfsFieldName :: !(Maybe Text) + , _sfsMultiValued :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemaFieldSpec' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfsEtag' +-- +-- * 'sfsKind' +-- +-- * 'sfsNumericIndexingSpec' +-- +-- * 'sfsReadAccessType' +-- +-- * 'sfsFieldId' +-- +-- * 'sfsIndexed' +-- +-- * 'sfsFieldType' +-- +-- * 'sfsFieldName' +-- +-- * 'sfsMultiValued' +schemaFieldSpec + :: SchemaFieldSpec +schemaFieldSpec = + SchemaFieldSpec + { _sfsEtag = Nothing + , _sfsKind = "admin#directory#schema#fieldspec" + , _sfsNumericIndexingSpec = Nothing + , _sfsReadAccessType = "ALL_DOMAIN_USERS" + , _sfsFieldId = Nothing + , _sfsIndexed = True + , _sfsFieldType = Nothing + , _sfsFieldName = Nothing + , _sfsMultiValued = Nothing + } + +-- | ETag of the resource. +sfsEtag :: Lens' SchemaFieldSpec (Maybe Text) +sfsEtag = lens _sfsEtag (\ s a -> s{_sfsEtag = a}) + +-- | Kind of resource this is. +sfsKind :: Lens' SchemaFieldSpec Text +sfsKind = lens _sfsKind (\ s a -> s{_sfsKind = a}) + +-- | Indexing spec for a numeric field. By default, only exact match queries +-- will be supported for numeric fields. Setting the numericIndexingSpec +-- allows range queries to be supported. +sfsNumericIndexingSpec :: Lens' SchemaFieldSpec (Maybe SchemaFieldSpecNumericIndexingSpec) +sfsNumericIndexingSpec + = lens _sfsNumericIndexingSpec + (\ s a -> s{_sfsNumericIndexingSpec = a}) + +-- | Read ACLs on the field specifying who can view values of this field. +-- Valid values are \"ALL_DOMAIN_USERS\" and \"ADMINS_AND_SELF\". +sfsReadAccessType :: Lens' SchemaFieldSpec Text +sfsReadAccessType + = lens _sfsReadAccessType + (\ s a -> s{_sfsReadAccessType = a}) + +-- | Unique identifier of Field (Read-only) +sfsFieldId :: Lens' SchemaFieldSpec (Maybe Text) +sfsFieldId + = lens _sfsFieldId (\ s a -> s{_sfsFieldId = a}) + +-- | Boolean specifying whether the field is indexed or not. +sfsIndexed :: Lens' SchemaFieldSpec Bool +sfsIndexed + = lens _sfsIndexed (\ s a -> s{_sfsIndexed = a}) + +-- | Type of the field. +sfsFieldType :: Lens' SchemaFieldSpec (Maybe Text) +sfsFieldType + = lens _sfsFieldType (\ s a -> s{_sfsFieldType = a}) + +-- | Name of the field. +sfsFieldName :: Lens' SchemaFieldSpec (Maybe Text) +sfsFieldName + = lens _sfsFieldName (\ s a -> s{_sfsFieldName = a}) + +-- | Boolean specifying whether this is a multi-valued field or not. +sfsMultiValued :: Lens' SchemaFieldSpec (Maybe Bool) +sfsMultiValued + = lens _sfsMultiValued + (\ s a -> s{_sfsMultiValued = a}) + +instance FromJSON SchemaFieldSpec where + parseJSON + = withObject "SchemaFieldSpec" + (\ o -> + SchemaFieldSpec <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#schema#fieldspec") + <*> (o .:? "numericIndexingSpec") + <*> (o .:? "readAccessType" .!= "ALL_DOMAIN_USERS") + <*> (o .:? "fieldId") + <*> (o .:? "indexed" .!= True) + <*> (o .:? "fieldType") + <*> (o .:? "fieldName") + <*> (o .:? "multiValued")) + +instance ToJSON SchemaFieldSpec where + toJSON SchemaFieldSpec{..} + = object + (catMaybes + [("etag" .=) <$> _sfsEtag, Just ("kind" .= _sfsKind), + ("numericIndexingSpec" .=) <$> + _sfsNumericIndexingSpec, + Just ("readAccessType" .= _sfsReadAccessType), + ("fieldId" .=) <$> _sfsFieldId, + Just ("indexed" .= _sfsIndexed), + ("fieldType" .=) <$> _sfsFieldType, + ("fieldName" .=) <$> _sfsFieldName, + ("multiValued" .=) <$> _sfsMultiValued]) + +-- | Template for notifications list response. +-- +-- /See:/ 'notifications' smart constructor. +data Notifications = Notifications + { _notEtag :: !(Maybe Text) + , _notNextPageToken :: !(Maybe Text) + , _notKind :: !Text + , _notItems :: !(Maybe [Maybe Notification]) + , _notUnreadNotificationsCount :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Notifications' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'notEtag' +-- +-- * 'notNextPageToken' +-- +-- * 'notKind' +-- +-- * 'notItems' +-- +-- * 'notUnreadNotificationsCount' +notifications + :: Notifications +notifications = + Notifications + { _notEtag = Nothing + , _notNextPageToken = Nothing + , _notKind = "admin#directory#notifications" + , _notItems = Nothing + , _notUnreadNotificationsCount = Nothing + } + +-- | ETag of the resource. +notEtag :: Lens' Notifications (Maybe Text) +notEtag = lens _notEtag (\ s a -> s{_notEtag = a}) + +-- | Token for fetching the next page of notifications. +notNextPageToken :: Lens' Notifications (Maybe Text) +notNextPageToken + = lens _notNextPageToken + (\ s a -> s{_notNextPageToken = a}) + +-- | The type of the resource. +notKind :: Lens' Notifications Text +notKind = lens _notKind (\ s a -> s{_notKind = a}) + +-- | List of notifications in this page. +notItems :: Lens' Notifications [Maybe Notification] +notItems + = lens _notItems (\ s a -> s{_notItems = a}) . + _Default + . _Coerce + +-- | Number of unread notification for the domain. +notUnreadNotificationsCount :: Lens' Notifications (Maybe Int32) +notUnreadNotificationsCount + = lens _notUnreadNotificationsCount + (\ s a -> s{_notUnreadNotificationsCount = a}) + +instance FromJSON Notifications where + parseJSON + = withObject "Notifications" + (\ o -> + Notifications <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "admin#directory#notifications") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "unreadNotificationsCount")) + +instance ToJSON Notifications where + toJSON Notifications{..} + = object + (catMaybes + [("etag" .=) <$> _notEtag, + ("nextPageToken" .=) <$> _notNextPageToken, + Just ("kind" .= _notKind), + ("items" .=) <$> _notItems, + ("unreadNotificationsCount" .=) <$> + _notUnreadNotificationsCount]) + +-- | JSON template for an externalId entry. +-- +-- /See:/ 'userExternalId' smart constructor. +data UserExternalId = UserExternalId + { _ueiValue :: !(Maybe Text) + , _ueiType :: !(Maybe Text) + , _ueiCustomType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserExternalId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ueiValue' +-- +-- * 'ueiType' +-- +-- * 'ueiCustomType' +userExternalId + :: UserExternalId +userExternalId = + UserExternalId + { _ueiValue = Nothing + , _ueiType = Nothing + , _ueiCustomType = Nothing + } + +-- | The value of the id. +ueiValue :: Lens' UserExternalId (Maybe Text) +ueiValue = lens _ueiValue (\ s a -> s{_ueiValue = a}) + +-- | The type of the Id. +ueiType :: Lens' UserExternalId (Maybe Text) +ueiType = lens _ueiType (\ s a -> s{_ueiType = a}) + +-- | Custom type. +ueiCustomType :: Lens' UserExternalId (Maybe Text) +ueiCustomType + = lens _ueiCustomType + (\ s a -> s{_ueiCustomType = a}) + +instance FromJSON UserExternalId where + parseJSON + = withObject "UserExternalId" + (\ o -> + UserExternalId <$> + (o .:? "value") <*> (o .:? "type") <*> + (o .:? "customType")) + +instance ToJSON UserExternalId where + toJSON UserExternalId{..} + = object + (catMaybes + [("value" .=) <$> _ueiValue, + ("type" .=) <$> _ueiType, + ("customType" .=) <$> _ueiCustomType]) + +-- +-- /See:/ 'asps' smart constructor. +data Asps = Asps + { _aaEtag :: !(Maybe Text) + , _aaKind :: !Text + , _aaItems :: !(Maybe [Maybe Asp]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Asps' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaEtag' +-- +-- * 'aaKind' +-- +-- * 'aaItems' +asps + :: Asps +asps = + Asps + { _aaEtag = Nothing + , _aaKind = "admin#directory#aspList" + , _aaItems = Nothing + } + +-- | ETag of the resource. +aaEtag :: Lens' Asps (Maybe Text) +aaEtag = lens _aaEtag (\ s a -> s{_aaEtag = a}) + +-- | The type of the API resource. This is always admin#directory#aspList. +aaKind :: Lens' Asps Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | A list of ASP resources. +aaItems :: Lens' Asps [Maybe Asp] +aaItems + = lens _aaItems (\ s a -> s{_aaItems = a}) . _Default + . _Coerce + +instance FromJSON Asps where + parseJSON + = withObject "Asps" + (\ o -> + Asps <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#directory#aspList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Asps where + toJSON Asps{..} + = object + (catMaybes + [("etag" .=) <$> _aaEtag, Just ("kind" .= _aaKind), + ("items" .=) <$> _aaItems]) + +-- | JSON response template for List Chrome OS Devices operation in Directory +-- API. +-- +-- /See:/ 'chromeOsDevices' smart constructor. +data ChromeOsDevices = ChromeOsDevices + { _codsEtag :: !(Maybe Text) + , _codsNextPageToken :: !(Maybe Text) + , _codsKind :: !Text + , _codsChromeosdevices :: !(Maybe [Maybe ChromeOsDevice]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeOsDevices' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'codsEtag' +-- +-- * 'codsNextPageToken' +-- +-- * 'codsKind' +-- +-- * 'codsChromeosdevices' +chromeOsDevices + :: ChromeOsDevices +chromeOsDevices = + ChromeOsDevices + { _codsEtag = Nothing + , _codsNextPageToken = Nothing + , _codsKind = "admin#directory#chromeosdevices" + , _codsChromeosdevices = Nothing + } + +-- | ETag of the resource. +codsEtag :: Lens' ChromeOsDevices (Maybe Text) +codsEtag = lens _codsEtag (\ s a -> s{_codsEtag = a}) + +-- | Token used to access next page of this result. +codsNextPageToken :: Lens' ChromeOsDevices (Maybe Text) +codsNextPageToken + = lens _codsNextPageToken + (\ s a -> s{_codsNextPageToken = a}) + +-- | Kind of resource this is. +codsKind :: Lens' ChromeOsDevices Text +codsKind = lens _codsKind (\ s a -> s{_codsKind = a}) + +-- | List of Chrome OS Device objects. +codsChromeosdevices :: Lens' ChromeOsDevices [Maybe ChromeOsDevice] +codsChromeosdevices + = lens _codsChromeosdevices + (\ s a -> s{_codsChromeosdevices = a}) + . _Default + . _Coerce + +instance FromJSON ChromeOsDevices where + parseJSON + = withObject "ChromeOsDevices" + (\ o -> + ChromeOsDevices <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "admin#directory#chromeosdevices") + <*> (o .:? "chromeosdevices" .!= mempty)) + +instance ToJSON ChromeOsDevices where + toJSON ChromeOsDevices{..} + = object + (catMaybes + [("etag" .=) <$> _codsEtag, + ("nextPageToken" .=) <$> _codsNextPageToken, + Just ("kind" .= _codsKind), + ("chromeosdevices" .=) <$> _codsChromeosdevices]) diff --git a/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Sum.hs b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Sum.hs new file mode 100644 index 000000000..fba49ac9b --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/AdminDirectory/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminDirectory.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminDirectory.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Admin/Channels/Stop.hs b/gogol-admin-directory/gen/Network/Google/Resource/Admin/Channels/Stop.hs new file mode 100644 index 000000000..aa40ab19c --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Admin/Channels/Stop.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Admin.Channels.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop watching resources through this channel +-- +-- /See:/ for @AdminChannelsStop@. +module Admin.Channels.Stop + ( + -- * REST Resource + ChannelsStopAPI + + -- * Creating a Request + , channelsStop + , ChannelsStop + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @AdminChannelsStop@ which the +-- 'ChannelsStop' request conforms to. +type ChannelsStopAPI = + "admin" :> + "directory_v1" :> + "channels" :> "stop" :> Post '[JSON] () + +-- | Stop watching resources through this channel +-- +-- /See:/ 'channelsStop' smart constructor. +data ChannelsStop = ChannelsStop + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +channelsStop + :: ChannelsStop +channelsStop = + ChannelsStop + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' ChannelsStop' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' ChannelsStop' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' ChannelsStop' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' ChannelsStop' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' ChannelsStop' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' ChannelsStop' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' ChannelsStop' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest ChannelsStop' where + type Rs ChannelsStop' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u ChannelsStop{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsStopAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Delete.hs new file mode 100644 index 000000000..53862d804 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Delete.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Asps.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete an ASP issued by a user. +-- +-- /See:/ for @DirectoryAspsDelete@. +module Directory.Asps.Delete + ( + -- * REST Resource + AspsDeleteAPI + + -- * Creating a Request + , aspsDelete + , AspsDelete + + -- * Request Lenses + , adQuotaUser + , adPrettyPrint + , adCodeId + , adUserIp + , adKey + , adOauthToken + , adUserKey + , adFields + , adAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryAspsDelete@ which the +-- 'AspsDelete' request conforms to. +type AspsDeleteAPI = + "users" :> + Capture "userKey" Text :> + "asps" :> Capture "codeId" Int32 :> Delete '[JSON] () + +-- | Delete an ASP issued by a user. +-- +-- /See:/ 'aspsDelete' smart constructor. +data AspsDelete = AspsDelete + { _adQuotaUser :: !(Maybe Text) + , _adPrettyPrint :: !Bool + , _adCodeId :: !Int32 + , _adUserIp :: !(Maybe Text) + , _adKey :: !(Maybe Text) + , _adOauthToken :: !(Maybe Text) + , _adUserKey :: !Text + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AspsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adPrettyPrint' +-- +-- * 'adCodeId' +-- +-- * 'adUserIp' +-- +-- * 'adKey' +-- +-- * 'adOauthToken' +-- +-- * 'adUserKey' +-- +-- * 'adFields' +-- +-- * 'adAlt' +aspsDelete + :: Int32 -- ^ 'codeId' + -> Text -- ^ 'userKey' + -> AspsDelete +aspsDelete pAdCodeId_ pAdUserKey_ = + AspsDelete + { _adQuotaUser = Nothing + , _adPrettyPrint = True + , _adCodeId = pAdCodeId_ + , _adUserIp = Nothing + , _adKey = Nothing + , _adOauthToken = Nothing + , _adUserKey = pAdUserKey_ + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' AspsDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' AspsDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | The unique ID of the ASP to be deleted. +adCodeId :: Lens' AspsDelete' Int32 +adCodeId = lens _adCodeId (\ s a -> s{_adCodeId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' AspsDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' AspsDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' AspsDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +adUserKey :: Lens' AspsDelete' Text +adUserKey + = lens _adUserKey (\ s a -> s{_adUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' AspsDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' AspsDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest AspsDelete' where + type Rs AspsDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u AspsDelete{..} + = go _adQuotaUser _adPrettyPrint _adCodeId _adUserIp + _adKey + _adOauthToken + _adUserKey + _adFields + _adAlt + where go + = clientWithRoute (Proxy :: Proxy AspsDeleteAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Get.hs new file mode 100644 index 000000000..8adae0793 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Asps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about an ASP issued by a user. +-- +-- /See:/ for @DirectoryAspsGet@. +module Directory.Asps.Get + ( + -- * REST Resource + AspsGetAPI + + -- * Creating a Request + , aspsGet + , AspsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agCodeId + , agUserIp + , agKey + , agOauthToken + , agUserKey + , agFields + , agAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryAspsGet@ which the +-- 'AspsGet' request conforms to. +type AspsGetAPI = + "users" :> + Capture "userKey" Text :> + "asps" :> Capture "codeId" Int32 :> Get '[JSON] Asp + +-- | Get information about an ASP issued by a user. +-- +-- /See:/ 'aspsGet' smart constructor. +data AspsGet = AspsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agCodeId :: !Int32 + , _agUserIp :: !(Maybe Text) + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agUserKey :: !Text + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AspsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agCodeId' +-- +-- * 'agUserIp' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agUserKey' +-- +-- * 'agFields' +-- +-- * 'agAlt' +aspsGet + :: Int32 -- ^ 'codeId' + -> Text -- ^ 'userKey' + -> AspsGet +aspsGet pAgCodeId_ pAgUserKey_ = + AspsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agCodeId = pAgCodeId_ + , _agUserIp = Nothing + , _agKey = Nothing + , _agOauthToken = Nothing + , _agUserKey = pAgUserKey_ + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AspsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AspsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | The unique ID of the ASP. +agCodeId :: Lens' AspsGet' Int32 +agCodeId = lens _agCodeId (\ s a -> s{_agCodeId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AspsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AspsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AspsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +agUserKey :: Lens' AspsGet' Text +agUserKey + = lens _agUserKey (\ s a -> s{_agUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AspsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AspsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AspsGet' where + type Rs AspsGet' = Asp + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u AspsGet{..} + = go _agQuotaUser _agPrettyPrint _agCodeId _agUserIp + _agKey + _agOauthToken + _agUserKey + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AspsGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/List.hs new file mode 100644 index 000000000..1cb45d867 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/List.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Asps.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the ASPs issued by a user. +-- +-- /See:/ for @DirectoryAspsList@. +module Directory.Asps.List + ( + -- * REST Resource + AspsListAPI + + -- * Creating a Request + , aspsList + , AspsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alOauthToken + , alUserKey + , alFields + , alAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryAspsList@ which the +-- 'AspsList' request conforms to. +type AspsListAPI = + "users" :> + Capture "userKey" Text :> "asps" :> Get '[JSON] Asps + +-- | List the ASPs issued by a user. +-- +-- /See:/ 'aspsList' smart constructor. +data AspsList = AspsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alUserKey :: !Text + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AspsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alOauthToken' +-- +-- * 'alUserKey' +-- +-- * 'alFields' +-- +-- * 'alAlt' +aspsList + :: Text -- ^ 'userKey' + -> AspsList +aspsList pAlUserKey_ = + AspsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alOauthToken = Nothing + , _alUserKey = pAlUserKey_ + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AspsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AspsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AspsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AspsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AspsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +alUserKey :: Lens' AspsList' Text +alUserKey + = lens _alUserKey (\ s a -> s{_alUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AspsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AspsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AspsList' where + type Rs AspsList' = Asps + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u AspsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alOauthToken + _alUserKey + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AspsListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Get.hs new file mode 100644 index 000000000..ff0be006b --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Chromeosdevices.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve Chrome OS Device +-- +-- /See:/ for @DirectoryChromeosdevicesGet@. +module Directory.Chromeosdevices.Get + ( + -- * REST Resource + ChromeosdevicesGetAPI + + -- * Creating a Request + , chromeosdevicesGet + , ChromeosdevicesGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgCustomerId + , cgKey + , cgDeviceId + , cgProjection + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryChromeosdevicesGet@ which the +-- 'ChromeosdevicesGet' request conforms to. +type ChromeosdevicesGetAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "chromeos" :> + Capture "deviceId" Text :> + QueryParam "projection" Text :> + Get '[JSON] ChromeOsDevice + +-- | Retrieve Chrome OS Device +-- +-- /See:/ 'chromeosdevicesGet' smart constructor. +data ChromeosdevicesGet = ChromeosdevicesGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgCustomerId :: !Text + , _cgKey :: !(Maybe Text) + , _cgDeviceId :: !Text + , _cgProjection :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeosdevicesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgCustomerId' +-- +-- * 'cgKey' +-- +-- * 'cgDeviceId' +-- +-- * 'cgProjection' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +chromeosdevicesGet + :: Text -- ^ 'customerId' + -> Text -- ^ 'deviceId' + -> ChromeosdevicesGet +chromeosdevicesGet pCgCustomerId_ pCgDeviceId_ = + ChromeosdevicesGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgCustomerId = pCgCustomerId_ + , _cgKey = Nothing + , _cgDeviceId = pCgDeviceId_ + , _cgProjection = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ChromeosdevicesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ChromeosdevicesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ChromeosdevicesGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | Immutable id of the Google Apps account +cgCustomerId :: Lens' ChromeosdevicesGet' Text +cgCustomerId + = lens _cgCustomerId (\ s a -> s{_cgCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ChromeosdevicesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | Immutable id of Chrome OS Device +cgDeviceId :: Lens' ChromeosdevicesGet' Text +cgDeviceId + = lens _cgDeviceId (\ s a -> s{_cgDeviceId = a}) + +-- | Restrict information returned to a set of selected fields. +cgProjection :: Lens' ChromeosdevicesGet' (Maybe Text) +cgProjection + = lens _cgProjection (\ s a -> s{_cgProjection = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ChromeosdevicesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ChromeosdevicesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ChromeosdevicesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ChromeosdevicesGet' where + type Rs ChromeosdevicesGet' = ChromeOsDevice + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u ChromeosdevicesGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp + _cgCustomerId + _cgKey + _cgDeviceId + _cgProjection + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute + (Proxy :: Proxy ChromeosdevicesGetAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/List.hs new file mode 100644 index 000000000..b07ac03b5 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/List.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Chromeosdevices.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all Chrome OS Devices of a customer (paginated) +-- +-- /See:/ for @DirectoryChromeosdevicesList@. +module Directory.Chromeosdevices.List + ( + -- * REST Resource + ChromeosdevicesListAPI + + -- * Creating a Request + , chromeosdevicesList + , ChromeosdevicesList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clOrderBy + , clUserIp + , clCustomerId + , clSortOrder + , clKey + , clQuery + , clProjection + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryChromeosdevicesList@ which the +-- 'ChromeosdevicesList' request conforms to. +type ChromeosdevicesListAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "chromeos" :> + QueryParam "orderBy" Text :> + QueryParam "sortOrder" Text :> + QueryParam "query" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ChromeOsDevices + +-- | Retrieve all Chrome OS Devices of a customer (paginated) +-- +-- /See:/ 'chromeosdevicesList' smart constructor. +data ChromeosdevicesList = ChromeosdevicesList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clOrderBy :: !(Maybe Text) + , _clUserIp :: !(Maybe Text) + , _clCustomerId :: !Text + , _clSortOrder :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clQuery :: !(Maybe Text) + , _clProjection :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !(Maybe Int32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeosdevicesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clOrderBy' +-- +-- * 'clUserIp' +-- +-- * 'clCustomerId' +-- +-- * 'clSortOrder' +-- +-- * 'clKey' +-- +-- * 'clQuery' +-- +-- * 'clProjection' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +chromeosdevicesList + :: Text -- ^ 'customerId' + -> ChromeosdevicesList +chromeosdevicesList pClCustomerId_ = + ChromeosdevicesList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clOrderBy = Nothing + , _clUserIp = Nothing + , _clCustomerId = pClCustomerId_ + , _clSortOrder = Nothing + , _clKey = Nothing + , _clQuery = Nothing + , _clProjection = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' ChromeosdevicesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' ChromeosdevicesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | Column to use for sorting results +clOrderBy :: Lens' ChromeosdevicesList' (Maybe Text) +clOrderBy + = lens _clOrderBy (\ s a -> s{_clOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' ChromeosdevicesList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Immutable id of the Google Apps account +clCustomerId :: Lens' ChromeosdevicesList' Text +clCustomerId + = lens _clCustomerId (\ s a -> s{_clCustomerId = a}) + +-- | Whether to return results in ascending or descending order. Only of use +-- when orderBy is also used +clSortOrder :: Lens' ChromeosdevicesList' (Maybe Text) +clSortOrder + = lens _clSortOrder (\ s a -> s{_clSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' ChromeosdevicesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Search string in the format given at +-- http:\/\/support.google.com\/chromeos\/a\/bin\/answer.py?hl=en&answer=1698333 +clQuery :: Lens' ChromeosdevicesList' (Maybe Text) +clQuery = lens _clQuery (\ s a -> s{_clQuery = a}) + +-- | Restrict information returned to a set of selected fields. +clProjection :: Lens' ChromeosdevicesList' (Maybe Text) +clProjection + = lens _clProjection (\ s a -> s{_clProjection = a}) + +-- | Token to specify next page in the list +clPageToken :: Lens' ChromeosdevicesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' ChromeosdevicesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Maximum number of results to return. Default is 100 +clMaxResults :: Lens' ChromeosdevicesList' (Maybe Int32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' ChromeosdevicesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' ChromeosdevicesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest ChromeosdevicesList' where + type Rs ChromeosdevicesList' = ChromeOsDevices + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u ChromeosdevicesList{..} + = go _clQuotaUser _clPrettyPrint _clOrderBy _clUserIp + _clCustomerId + _clSortOrder + _clKey + _clQuery + _clProjection + _clPageToken + _clOauthToken + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute + (Proxy :: Proxy ChromeosdevicesListAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Patch.hs new file mode 100644 index 000000000..ea92ffad0 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Patch.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Chromeosdevices.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Chrome OS Device. This method supports patch semantics. +-- +-- /See:/ for @DirectoryChromeosdevicesPatch@. +module Directory.Chromeosdevices.Patch + ( + -- * REST Resource + ChromeosdevicesPatchAPI + + -- * Creating a Request + , chromeosdevicesPatch + , ChromeosdevicesPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpCustomerId + , cpKey + , cpDeviceId + , cpProjection + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryChromeosdevicesPatch@ which the +-- 'ChromeosdevicesPatch' request conforms to. +type ChromeosdevicesPatchAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "chromeos" :> + Capture "deviceId" Text :> + QueryParam "projection" Text :> + Patch '[JSON] ChromeOsDevice + +-- | Update Chrome OS Device. This method supports patch semantics. +-- +-- /See:/ 'chromeosdevicesPatch' smart constructor. +data ChromeosdevicesPatch = ChromeosdevicesPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpCustomerId :: !Text + , _cpKey :: !(Maybe Text) + , _cpDeviceId :: !Text + , _cpProjection :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeosdevicesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpCustomerId' +-- +-- * 'cpKey' +-- +-- * 'cpDeviceId' +-- +-- * 'cpProjection' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +chromeosdevicesPatch + :: Text -- ^ 'customerId' + -> Text -- ^ 'deviceId' + -> ChromeosdevicesPatch +chromeosdevicesPatch pCpCustomerId_ pCpDeviceId_ = + ChromeosdevicesPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpCustomerId = pCpCustomerId_ + , _cpKey = Nothing + , _cpDeviceId = pCpDeviceId_ + , _cpProjection = Nothing + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' ChromeosdevicesPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | Immutable id of the Google Apps account +cpCustomerId :: Lens' ChromeosdevicesPatch' Text +cpCustomerId + = lens _cpCustomerId (\ s a -> s{_cpCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | Immutable id of Chrome OS Device +cpDeviceId :: Lens' ChromeosdevicesPatch' Text +cpDeviceId + = lens _cpDeviceId (\ s a -> s{_cpDeviceId = a}) + +-- | Restrict information returned to a set of selected fields. +cpProjection :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpProjection + = lens _cpProjection (\ s a -> s{_cpProjection = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' ChromeosdevicesPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' ChromeosdevicesPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest ChromeosdevicesPatch' where + type Rs ChromeosdevicesPatch' = ChromeOsDevice + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u ChromeosdevicesPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp + _cpCustomerId + _cpKey + _cpDeviceId + _cpProjection + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute + (Proxy :: Proxy ChromeosdevicesPatchAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Update.hs new file mode 100644 index 000000000..eaf282c58 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Chromeosdevices/Update.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Chromeosdevices.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Chrome OS Device +-- +-- /See:/ for @DirectoryChromeosdevicesUpdate@. +module Directory.Chromeosdevices.Update + ( + -- * REST Resource + ChromeosdevicesUpdateAPI + + -- * Creating a Request + , chromeosdevicesUpdate + , ChromeosdevicesUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuCustomerId + , cuKey + , cuDeviceId + , cuProjection + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryChromeosdevicesUpdate@ which the +-- 'ChromeosdevicesUpdate' request conforms to. +type ChromeosdevicesUpdateAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "chromeos" :> + Capture "deviceId" Text :> + QueryParam "projection" Text :> + Put '[JSON] ChromeOsDevice + +-- | Update Chrome OS Device +-- +-- /See:/ 'chromeosdevicesUpdate' smart constructor. +data ChromeosdevicesUpdate = ChromeosdevicesUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuCustomerId :: !Text + , _cuKey :: !(Maybe Text) + , _cuDeviceId :: !Text + , _cuProjection :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChromeosdevicesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuCustomerId' +-- +-- * 'cuKey' +-- +-- * 'cuDeviceId' +-- +-- * 'cuProjection' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +chromeosdevicesUpdate + :: Text -- ^ 'customerId' + -> Text -- ^ 'deviceId' + -> ChromeosdevicesUpdate +chromeosdevicesUpdate pCuCustomerId_ pCuDeviceId_ = + ChromeosdevicesUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuCustomerId = pCuCustomerId_ + , _cuKey = Nothing + , _cuDeviceId = pCuDeviceId_ + , _cuProjection = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' ChromeosdevicesUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | Immutable id of the Google Apps account +cuCustomerId :: Lens' ChromeosdevicesUpdate' Text +cuCustomerId + = lens _cuCustomerId (\ s a -> s{_cuCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | Immutable id of Chrome OS Device +cuDeviceId :: Lens' ChromeosdevicesUpdate' Text +cuDeviceId + = lens _cuDeviceId (\ s a -> s{_cuDeviceId = a}) + +-- | Restrict information returned to a set of selected fields. +cuProjection :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuProjection + = lens _cuProjection (\ s a -> s{_cuProjection = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' ChromeosdevicesUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' ChromeosdevicesUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest ChromeosdevicesUpdate' where + type Rs ChromeosdevicesUpdate' = ChromeOsDevice + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u ChromeosdevicesUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp + _cuCustomerId + _cuKey + _cuDeviceId + _cuProjection + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute + (Proxy :: Proxy ChromeosdevicesUpdateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Delete.hs new file mode 100644 index 000000000..76bc89db0 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Aliases.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove a alias for the group +-- +-- /See:/ for @DirectoryGroupsAliasesDelete@. +module Directory.Groups.Aliases.Delete + ( + -- * REST Resource + GroupsAliasesDeleteAPI + + -- * Creating a Request + , groupsAliasesDelete + , GroupsAliasesDelete + + -- * Request Lenses + , gadQuotaUser + , gadPrettyPrint + , gadUserIp + , gadGroupKey + , gadAlias + , gadKey + , gadOauthToken + , gadFields + , gadAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsAliasesDelete@ which the +-- 'GroupsAliasesDelete' request conforms to. +type GroupsAliasesDeleteAPI = + "groups" :> + Capture "groupKey" Text :> + "aliases" :> + Capture "alias" Text :> Delete '[JSON] () + +-- | Remove a alias for the group +-- +-- /See:/ 'groupsAliasesDelete' smart constructor. +data GroupsAliasesDelete = GroupsAliasesDelete + { _gadQuotaUser :: !(Maybe Text) + , _gadPrettyPrint :: !Bool + , _gadUserIp :: !(Maybe Text) + , _gadGroupKey :: !Text + , _gadAlias :: !Text + , _gadKey :: !(Maybe Text) + , _gadOauthToken :: !(Maybe Text) + , _gadFields :: !(Maybe Text) + , _gadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsAliasesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gadQuotaUser' +-- +-- * 'gadPrettyPrint' +-- +-- * 'gadUserIp' +-- +-- * 'gadGroupKey' +-- +-- * 'gadAlias' +-- +-- * 'gadKey' +-- +-- * 'gadOauthToken' +-- +-- * 'gadFields' +-- +-- * 'gadAlt' +groupsAliasesDelete + :: Text -- ^ 'groupKey' + -> Text -- ^ 'alias' + -> GroupsAliasesDelete +groupsAliasesDelete pGadGroupKey_ pGadAlias_ = + GroupsAliasesDelete + { _gadQuotaUser = Nothing + , _gadPrettyPrint = True + , _gadUserIp = Nothing + , _gadGroupKey = pGadGroupKey_ + , _gadAlias = pGadAlias_ + , _gadKey = Nothing + , _gadOauthToken = Nothing + , _gadFields = Nothing + , _gadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gadQuotaUser :: Lens' GroupsAliasesDelete' (Maybe Text) +gadQuotaUser + = lens _gadQuotaUser (\ s a -> s{_gadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gadPrettyPrint :: Lens' GroupsAliasesDelete' Bool +gadPrettyPrint + = lens _gadPrettyPrint + (\ s a -> s{_gadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gadUserIp :: Lens' GroupsAliasesDelete' (Maybe Text) +gadUserIp + = lens _gadUserIp (\ s a -> s{_gadUserIp = a}) + +-- | Email or immutable Id of the group +gadGroupKey :: Lens' GroupsAliasesDelete' Text +gadGroupKey + = lens _gadGroupKey (\ s a -> s{_gadGroupKey = a}) + +-- | The alias to be removed +gadAlias :: Lens' GroupsAliasesDelete' Text +gadAlias = lens _gadAlias (\ s a -> s{_gadAlias = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gadKey :: Lens' GroupsAliasesDelete' (Maybe Text) +gadKey = lens _gadKey (\ s a -> s{_gadKey = a}) + +-- | OAuth 2.0 token for the current user. +gadOauthToken :: Lens' GroupsAliasesDelete' (Maybe Text) +gadOauthToken + = lens _gadOauthToken + (\ s a -> s{_gadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gadFields :: Lens' GroupsAliasesDelete' (Maybe Text) +gadFields + = lens _gadFields (\ s a -> s{_gadFields = a}) + +-- | Data format for the response. +gadAlt :: Lens' GroupsAliasesDelete' Text +gadAlt = lens _gadAlt (\ s a -> s{_gadAlt = a}) + +instance GoogleRequest GroupsAliasesDelete' where + type Rs GroupsAliasesDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsAliasesDelete{..} + = go _gadQuotaUser _gadPrettyPrint _gadUserIp + _gadGroupKey + _gadAlias + _gadKey + _gadOauthToken + _gadFields + _gadAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupsAliasesDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Insert.hs new file mode 100644 index 000000000..7a1bd456f --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Aliases.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a alias for the group +-- +-- /See:/ for @DirectoryGroupsAliasesInsert@. +module Directory.Groups.Aliases.Insert + ( + -- * REST Resource + GroupsAliasesInsertAPI + + -- * Creating a Request + , groupsAliasesInsert + , GroupsAliasesInsert + + -- * Request Lenses + , gaiQuotaUser + , gaiPrettyPrint + , gaiUserIp + , gaiGroupKey + , gaiKey + , gaiOauthToken + , gaiFields + , gaiAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsAliasesInsert@ which the +-- 'GroupsAliasesInsert' request conforms to. +type GroupsAliasesInsertAPI = + "groups" :> + Capture "groupKey" Text :> + "aliases" :> Post '[JSON] Alias + +-- | Add a alias for the group +-- +-- /See:/ 'groupsAliasesInsert' smart constructor. +data GroupsAliasesInsert = GroupsAliasesInsert + { _gaiQuotaUser :: !(Maybe Text) + , _gaiPrettyPrint :: !Bool + , _gaiUserIp :: !(Maybe Text) + , _gaiGroupKey :: !Text + , _gaiKey :: !(Maybe Text) + , _gaiOauthToken :: !(Maybe Text) + , _gaiFields :: !(Maybe Text) + , _gaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsAliasesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaiQuotaUser' +-- +-- * 'gaiPrettyPrint' +-- +-- * 'gaiUserIp' +-- +-- * 'gaiGroupKey' +-- +-- * 'gaiKey' +-- +-- * 'gaiOauthToken' +-- +-- * 'gaiFields' +-- +-- * 'gaiAlt' +groupsAliasesInsert + :: Text -- ^ 'groupKey' + -> GroupsAliasesInsert +groupsAliasesInsert pGaiGroupKey_ = + GroupsAliasesInsert + { _gaiQuotaUser = Nothing + , _gaiPrettyPrint = True + , _gaiUserIp = Nothing + , _gaiGroupKey = pGaiGroupKey_ + , _gaiKey = Nothing + , _gaiOauthToken = Nothing + , _gaiFields = Nothing + , _gaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gaiQuotaUser :: Lens' GroupsAliasesInsert' (Maybe Text) +gaiQuotaUser + = lens _gaiQuotaUser (\ s a -> s{_gaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gaiPrettyPrint :: Lens' GroupsAliasesInsert' Bool +gaiPrettyPrint + = lens _gaiPrettyPrint + (\ s a -> s{_gaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gaiUserIp :: Lens' GroupsAliasesInsert' (Maybe Text) +gaiUserIp + = lens _gaiUserIp (\ s a -> s{_gaiUserIp = a}) + +-- | Email or immutable Id of the group +gaiGroupKey :: Lens' GroupsAliasesInsert' Text +gaiGroupKey + = lens _gaiGroupKey (\ s a -> s{_gaiGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gaiKey :: Lens' GroupsAliasesInsert' (Maybe Text) +gaiKey = lens _gaiKey (\ s a -> s{_gaiKey = a}) + +-- | OAuth 2.0 token for the current user. +gaiOauthToken :: Lens' GroupsAliasesInsert' (Maybe Text) +gaiOauthToken + = lens _gaiOauthToken + (\ s a -> s{_gaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gaiFields :: Lens' GroupsAliasesInsert' (Maybe Text) +gaiFields + = lens _gaiFields (\ s a -> s{_gaiFields = a}) + +-- | Data format for the response. +gaiAlt :: Lens' GroupsAliasesInsert' Text +gaiAlt = lens _gaiAlt (\ s a -> s{_gaiAlt = a}) + +instance GoogleRequest GroupsAliasesInsert' where + type Rs GroupsAliasesInsert' = Alias + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsAliasesInsert{..} + = go _gaiQuotaUser _gaiPrettyPrint _gaiUserIp + _gaiGroupKey + _gaiKey + _gaiOauthToken + _gaiFields + _gaiAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupsAliasesInsertAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/List.hs new file mode 100644 index 000000000..0c7b2ec7d --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Aliases/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Aliases.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all aliases for a group +-- +-- /See:/ for @DirectoryGroupsAliasesList@. +module Directory.Groups.Aliases.List + ( + -- * REST Resource + GroupsAliasesListAPI + + -- * Creating a Request + , groupsAliasesList + , GroupsAliasesList + + -- * Request Lenses + , galQuotaUser + , galPrettyPrint + , galUserIp + , galGroupKey + , galKey + , galOauthToken + , galFields + , galAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsAliasesList@ which the +-- 'GroupsAliasesList' request conforms to. +type GroupsAliasesListAPI = + "groups" :> + Capture "groupKey" Text :> + "aliases" :> Get '[JSON] Aliases + +-- | List all aliases for a group +-- +-- /See:/ 'groupsAliasesList' smart constructor. +data GroupsAliasesList = GroupsAliasesList + { _galQuotaUser :: !(Maybe Text) + , _galPrettyPrint :: !Bool + , _galUserIp :: !(Maybe Text) + , _galGroupKey :: !Text + , _galKey :: !(Maybe Text) + , _galOauthToken :: !(Maybe Text) + , _galFields :: !(Maybe Text) + , _galAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsAliasesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'galQuotaUser' +-- +-- * 'galPrettyPrint' +-- +-- * 'galUserIp' +-- +-- * 'galGroupKey' +-- +-- * 'galKey' +-- +-- * 'galOauthToken' +-- +-- * 'galFields' +-- +-- * 'galAlt' +groupsAliasesList + :: Text -- ^ 'groupKey' + -> GroupsAliasesList +groupsAliasesList pGalGroupKey_ = + GroupsAliasesList + { _galQuotaUser = Nothing + , _galPrettyPrint = True + , _galUserIp = Nothing + , _galGroupKey = pGalGroupKey_ + , _galKey = Nothing + , _galOauthToken = Nothing + , _galFields = Nothing + , _galAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +galQuotaUser :: Lens' GroupsAliasesList' (Maybe Text) +galQuotaUser + = lens _galQuotaUser (\ s a -> s{_galQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +galPrettyPrint :: Lens' GroupsAliasesList' Bool +galPrettyPrint + = lens _galPrettyPrint + (\ s a -> s{_galPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +galUserIp :: Lens' GroupsAliasesList' (Maybe Text) +galUserIp + = lens _galUserIp (\ s a -> s{_galUserIp = a}) + +-- | Email or immutable Id of the group +galGroupKey :: Lens' GroupsAliasesList' Text +galGroupKey + = lens _galGroupKey (\ s a -> s{_galGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +galKey :: Lens' GroupsAliasesList' (Maybe Text) +galKey = lens _galKey (\ s a -> s{_galKey = a}) + +-- | OAuth 2.0 token for the current user. +galOauthToken :: Lens' GroupsAliasesList' (Maybe Text) +galOauthToken + = lens _galOauthToken + (\ s a -> s{_galOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +galFields :: Lens' GroupsAliasesList' (Maybe Text) +galFields + = lens _galFields (\ s a -> s{_galFields = a}) + +-- | Data format for the response. +galAlt :: Lens' GroupsAliasesList' Text +galAlt = lens _galAlt (\ s a -> s{_galAlt = a}) + +instance GoogleRequest GroupsAliasesList' where + type Rs GroupsAliasesList' = Aliases + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsAliasesList{..} + = go _galQuotaUser _galPrettyPrint _galUserIp + _galGroupKey + _galKey + _galOauthToken + _galFields + _galAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupsAliasesListAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Delete.hs new file mode 100644 index 000000000..310d79f06 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete Group +-- +-- /See:/ for @DirectoryGroupsDelete@. +module Directory.Groups.Delete + ( + -- * REST Resource + GroupsDeleteAPI + + -- * Creating a Request + , groupsDelete + , GroupsDelete + + -- * Request Lenses + , gdQuotaUser + , gdPrettyPrint + , gdUserIp + , gdGroupKey + , gdKey + , gdOauthToken + , gdFields + , gdAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsDelete@ which the +-- 'GroupsDelete' request conforms to. +type GroupsDeleteAPI = + "groups" :> + Capture "groupKey" Text :> Delete '[JSON] () + +-- | Delete Group +-- +-- /See:/ 'groupsDelete' smart constructor. +data GroupsDelete = GroupsDelete + { _gdQuotaUser :: !(Maybe Text) + , _gdPrettyPrint :: !Bool + , _gdUserIp :: !(Maybe Text) + , _gdGroupKey :: !Text + , _gdKey :: !(Maybe Text) + , _gdOauthToken :: !(Maybe Text) + , _gdFields :: !(Maybe Text) + , _gdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdQuotaUser' +-- +-- * 'gdPrettyPrint' +-- +-- * 'gdUserIp' +-- +-- * 'gdGroupKey' +-- +-- * 'gdKey' +-- +-- * 'gdOauthToken' +-- +-- * 'gdFields' +-- +-- * 'gdAlt' +groupsDelete + :: Text -- ^ 'groupKey' + -> GroupsDelete +groupsDelete pGdGroupKey_ = + GroupsDelete + { _gdQuotaUser = Nothing + , _gdPrettyPrint = True + , _gdUserIp = Nothing + , _gdGroupKey = pGdGroupKey_ + , _gdKey = Nothing + , _gdOauthToken = Nothing + , _gdFields = Nothing + , _gdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gdQuotaUser :: Lens' GroupsDelete' (Maybe Text) +gdQuotaUser + = lens _gdQuotaUser (\ s a -> s{_gdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gdPrettyPrint :: Lens' GroupsDelete' Bool +gdPrettyPrint + = lens _gdPrettyPrint + (\ s a -> s{_gdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gdUserIp :: Lens' GroupsDelete' (Maybe Text) +gdUserIp = lens _gdUserIp (\ s a -> s{_gdUserIp = a}) + +-- | Email or immutable Id of the group +gdGroupKey :: Lens' GroupsDelete' Text +gdGroupKey + = lens _gdGroupKey (\ s a -> s{_gdGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gdKey :: Lens' GroupsDelete' (Maybe Text) +gdKey = lens _gdKey (\ s a -> s{_gdKey = a}) + +-- | OAuth 2.0 token for the current user. +gdOauthToken :: Lens' GroupsDelete' (Maybe Text) +gdOauthToken + = lens _gdOauthToken (\ s a -> s{_gdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gdFields :: Lens' GroupsDelete' (Maybe Text) +gdFields = lens _gdFields (\ s a -> s{_gdFields = a}) + +-- | Data format for the response. +gdAlt :: Lens' GroupsDelete' Text +gdAlt = lens _gdAlt (\ s a -> s{_gdAlt = a}) + +instance GoogleRequest GroupsDelete' where + type Rs GroupsDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsDelete{..} + = go _gdQuotaUser _gdPrettyPrint _gdUserIp + _gdGroupKey + _gdKey + _gdOauthToken + _gdFields + _gdAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsDeleteAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Get.hs new file mode 100644 index 000000000..86a7f11af --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Get.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve Group +-- +-- /See:/ for @DirectoryGroupsGet@. +module Directory.Groups.Get + ( + -- * REST Resource + GroupsGetAPI + + -- * Creating a Request + , groupsGet + , GroupsGet + + -- * Request Lenses + , ggQuotaUser + , ggPrettyPrint + , ggUserIp + , ggGroupKey + , ggKey + , ggOauthToken + , ggFields + , ggAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsGet@ which the +-- 'GroupsGet' request conforms to. +type GroupsGetAPI = + "groups" :> + Capture "groupKey" Text :> Get '[JSON] Group + +-- | Retrieve Group +-- +-- /See:/ 'groupsGet' smart constructor. +data GroupsGet = GroupsGet + { _ggQuotaUser :: !(Maybe Text) + , _ggPrettyPrint :: !Bool + , _ggUserIp :: !(Maybe Text) + , _ggGroupKey :: !Text + , _ggKey :: !(Maybe Text) + , _ggOauthToken :: !(Maybe Text) + , _ggFields :: !(Maybe Text) + , _ggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ggQuotaUser' +-- +-- * 'ggPrettyPrint' +-- +-- * 'ggUserIp' +-- +-- * 'ggGroupKey' +-- +-- * 'ggKey' +-- +-- * 'ggOauthToken' +-- +-- * 'ggFields' +-- +-- * 'ggAlt' +groupsGet + :: Text -- ^ 'groupKey' + -> GroupsGet +groupsGet pGgGroupKey_ = + GroupsGet + { _ggQuotaUser = Nothing + , _ggPrettyPrint = True + , _ggUserIp = Nothing + , _ggGroupKey = pGgGroupKey_ + , _ggKey = Nothing + , _ggOauthToken = Nothing + , _ggFields = Nothing + , _ggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ggQuotaUser :: Lens' GroupsGet' (Maybe Text) +ggQuotaUser + = lens _ggQuotaUser (\ s a -> s{_ggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ggPrettyPrint :: Lens' GroupsGet' Bool +ggPrettyPrint + = lens _ggPrettyPrint + (\ s a -> s{_ggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ggUserIp :: Lens' GroupsGet' (Maybe Text) +ggUserIp = lens _ggUserIp (\ s a -> s{_ggUserIp = a}) + +-- | Email or immutable Id of the group +ggGroupKey :: Lens' GroupsGet' Text +ggGroupKey + = lens _ggGroupKey (\ s a -> s{_ggGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ggKey :: Lens' GroupsGet' (Maybe Text) +ggKey = lens _ggKey (\ s a -> s{_ggKey = a}) + +-- | OAuth 2.0 token for the current user. +ggOauthToken :: Lens' GroupsGet' (Maybe Text) +ggOauthToken + = lens _ggOauthToken (\ s a -> s{_ggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ggFields :: Lens' GroupsGet' (Maybe Text) +ggFields = lens _ggFields (\ s a -> s{_ggFields = a}) + +-- | Data format for the response. +ggAlt :: Lens' GroupsGet' Text +ggAlt = lens _ggAlt (\ s a -> s{_ggAlt = a}) + +instance GoogleRequest GroupsGet' where + type Rs GroupsGet' = Group + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsGet{..} + = go _ggQuotaUser _ggPrettyPrint _ggUserIp + _ggGroupKey + _ggKey + _ggOauthToken + _ggFields + _ggAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Insert.hs new file mode 100644 index 000000000..7f1960a19 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Insert.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create Group +-- +-- /See:/ for @DirectoryGroupsInsert@. +module Directory.Groups.Insert + ( + -- * REST Resource + GroupsInsertAPI + + -- * Creating a Request + , groupsInsert + , GroupsInsert + + -- * Request Lenses + , giQuotaUser + , giPrettyPrint + , giUserIp + , giKey + , giOauthToken + , giFields + , giAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsInsert@ which the +-- 'GroupsInsert' request conforms to. +type GroupsInsertAPI = "groups" :> Post '[JSON] Group + +-- | Create Group +-- +-- /See:/ 'groupsInsert' smart constructor. +data GroupsInsert = GroupsInsert + { _giQuotaUser :: !(Maybe Text) + , _giPrettyPrint :: !Bool + , _giUserIp :: !(Maybe Text) + , _giKey :: !(Maybe Text) + , _giOauthToken :: !(Maybe Text) + , _giFields :: !(Maybe Text) + , _giAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giQuotaUser' +-- +-- * 'giPrettyPrint' +-- +-- * 'giUserIp' +-- +-- * 'giKey' +-- +-- * 'giOauthToken' +-- +-- * 'giFields' +-- +-- * 'giAlt' +groupsInsert + :: GroupsInsert +groupsInsert = + GroupsInsert + { _giQuotaUser = Nothing + , _giPrettyPrint = True + , _giUserIp = Nothing + , _giKey = Nothing + , _giOauthToken = Nothing + , _giFields = Nothing + , _giAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +giQuotaUser :: Lens' GroupsInsert' (Maybe Text) +giQuotaUser + = lens _giQuotaUser (\ s a -> s{_giQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +giPrettyPrint :: Lens' GroupsInsert' Bool +giPrettyPrint + = lens _giPrettyPrint + (\ s a -> s{_giPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +giUserIp :: Lens' GroupsInsert' (Maybe Text) +giUserIp = lens _giUserIp (\ s a -> s{_giUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +giKey :: Lens' GroupsInsert' (Maybe Text) +giKey = lens _giKey (\ s a -> s{_giKey = a}) + +-- | OAuth 2.0 token for the current user. +giOauthToken :: Lens' GroupsInsert' (Maybe Text) +giOauthToken + = lens _giOauthToken (\ s a -> s{_giOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +giFields :: Lens' GroupsInsert' (Maybe Text) +giFields = lens _giFields (\ s a -> s{_giFields = a}) + +-- | Data format for the response. +giAlt :: Lens' GroupsInsert' Text +giAlt = lens _giAlt (\ s a -> s{_giAlt = a}) + +instance GoogleRequest GroupsInsert' where + type Rs GroupsInsert' = Group + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsInsert{..} + = go _giQuotaUser _giPrettyPrint _giUserIp _giKey + _giOauthToken + _giFields + _giAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsInsertAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/List.hs new file mode 100644 index 000000000..b76774b63 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/List.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all groups in a domain (paginated) +-- +-- /See:/ for @DirectoryGroupsList@. +module Directory.Groups.List + ( + -- * REST Resource + GroupsListAPI + + -- * Creating a Request + , groupsList + , GroupsList + + -- * Request Lenses + , glQuotaUser + , glPrettyPrint + , glUserIp + , glDomain + , glCustomer + , glKey + , glPageToken + , glOauthToken + , glUserKey + , glMaxResults + , glFields + , glAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsList@ which the +-- 'GroupsList' request conforms to. +type GroupsListAPI = + "groups" :> + QueryParam "domain" Text :> + QueryParam "customer" Text :> + QueryParam "pageToken" Text :> + QueryParam "userKey" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Groups + +-- | Retrieve all groups in a domain (paginated) +-- +-- /See:/ 'groupsList' smart constructor. +data GroupsList = GroupsList + { _glQuotaUser :: !(Maybe Text) + , _glPrettyPrint :: !Bool + , _glUserIp :: !(Maybe Text) + , _glDomain :: !(Maybe Text) + , _glCustomer :: !(Maybe Text) + , _glKey :: !(Maybe Text) + , _glPageToken :: !(Maybe Text) + , _glOauthToken :: !(Maybe Text) + , _glUserKey :: !(Maybe Text) + , _glMaxResults :: !(Maybe Int32) + , _glFields :: !(Maybe Text) + , _glAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glQuotaUser' +-- +-- * 'glPrettyPrint' +-- +-- * 'glUserIp' +-- +-- * 'glDomain' +-- +-- * 'glCustomer' +-- +-- * 'glKey' +-- +-- * 'glPageToken' +-- +-- * 'glOauthToken' +-- +-- * 'glUserKey' +-- +-- * 'glMaxResults' +-- +-- * 'glFields' +-- +-- * 'glAlt' +groupsList + :: GroupsList +groupsList = + GroupsList + { _glQuotaUser = Nothing + , _glPrettyPrint = True + , _glUserIp = Nothing + , _glDomain = Nothing + , _glCustomer = Nothing + , _glKey = Nothing + , _glPageToken = Nothing + , _glOauthToken = Nothing + , _glUserKey = Nothing + , _glMaxResults = Nothing + , _glFields = Nothing + , _glAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +glQuotaUser :: Lens' GroupsList' (Maybe Text) +glQuotaUser + = lens _glQuotaUser (\ s a -> s{_glQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +glPrettyPrint :: Lens' GroupsList' Bool +glPrettyPrint + = lens _glPrettyPrint + (\ s a -> s{_glPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +glUserIp :: Lens' GroupsList' (Maybe Text) +glUserIp = lens _glUserIp (\ s a -> s{_glUserIp = a}) + +-- | Name of the domain. Fill this field to get groups from only this domain. +-- To return all groups in a multi-domain fill customer field instead. +glDomain :: Lens' GroupsList' (Maybe Text) +glDomain = lens _glDomain (\ s a -> s{_glDomain = a}) + +-- | Immutable id of the Google Apps account. In case of multi-domain, to +-- fetch all groups for a customer, fill this field instead of domain. +glCustomer :: Lens' GroupsList' (Maybe Text) +glCustomer + = lens _glCustomer (\ s a -> s{_glCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +glKey :: Lens' GroupsList' (Maybe Text) +glKey = lens _glKey (\ s a -> s{_glKey = a}) + +-- | Token to specify next page in the list +glPageToken :: Lens' GroupsList' (Maybe Text) +glPageToken + = lens _glPageToken (\ s a -> s{_glPageToken = a}) + +-- | OAuth 2.0 token for the current user. +glOauthToken :: Lens' GroupsList' (Maybe Text) +glOauthToken + = lens _glOauthToken (\ s a -> s{_glOauthToken = a}) + +-- | Email or immutable Id of the user if only those groups are to be listed, +-- the given user is a member of. If Id, it should match with id of user +-- object +glUserKey :: Lens' GroupsList' (Maybe Text) +glUserKey + = lens _glUserKey (\ s a -> s{_glUserKey = a}) + +-- | Maximum number of results to return. Default is 200 +glMaxResults :: Lens' GroupsList' (Maybe Int32) +glMaxResults + = lens _glMaxResults (\ s a -> s{_glMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +glFields :: Lens' GroupsList' (Maybe Text) +glFields = lens _glFields (\ s a -> s{_glFields = a}) + +-- | Data format for the response. +glAlt :: Lens' GroupsList' Text +glAlt = lens _glAlt (\ s a -> s{_glAlt = a}) + +instance GoogleRequest GroupsList' where + type Rs GroupsList' = Groups + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsList{..} + = go _glQuotaUser _glPrettyPrint _glUserIp _glDomain + _glCustomer + _glKey + _glPageToken + _glOauthToken + _glUserKey + _glMaxResults + _glFields + _glAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Patch.hs new file mode 100644 index 000000000..2a09148cc --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Patch.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Group. This method supports patch semantics. +-- +-- /See:/ for @DirectoryGroupsPatch@. +module Directory.Groups.Patch + ( + -- * REST Resource + GroupsPatchAPI + + -- * Creating a Request + , groupsPatch + , GroupsPatch + + -- * Request Lenses + , gpQuotaUser + , gpPrettyPrint + , gpUserIp + , gpGroupKey + , gpKey + , gpOauthToken + , gpFields + , gpAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsPatch@ which the +-- 'GroupsPatch' request conforms to. +type GroupsPatchAPI = + "groups" :> + Capture "groupKey" Text :> Patch '[JSON] Group + +-- | Update Group. This method supports patch semantics. +-- +-- /See:/ 'groupsPatch' smart constructor. +data GroupsPatch = GroupsPatch + { _gpQuotaUser :: !(Maybe Text) + , _gpPrettyPrint :: !Bool + , _gpUserIp :: !(Maybe Text) + , _gpGroupKey :: !Text + , _gpKey :: !(Maybe Text) + , _gpOauthToken :: !(Maybe Text) + , _gpFields :: !(Maybe Text) + , _gpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gpQuotaUser' +-- +-- * 'gpPrettyPrint' +-- +-- * 'gpUserIp' +-- +-- * 'gpGroupKey' +-- +-- * 'gpKey' +-- +-- * 'gpOauthToken' +-- +-- * 'gpFields' +-- +-- * 'gpAlt' +groupsPatch + :: Text -- ^ 'groupKey' + -> GroupsPatch +groupsPatch pGpGroupKey_ = + GroupsPatch + { _gpQuotaUser = Nothing + , _gpPrettyPrint = True + , _gpUserIp = Nothing + , _gpGroupKey = pGpGroupKey_ + , _gpKey = Nothing + , _gpOauthToken = Nothing + , _gpFields = Nothing + , _gpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gpQuotaUser :: Lens' GroupsPatch' (Maybe Text) +gpQuotaUser + = lens _gpQuotaUser (\ s a -> s{_gpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gpPrettyPrint :: Lens' GroupsPatch' Bool +gpPrettyPrint + = lens _gpPrettyPrint + (\ s a -> s{_gpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gpUserIp :: Lens' GroupsPatch' (Maybe Text) +gpUserIp = lens _gpUserIp (\ s a -> s{_gpUserIp = a}) + +-- | Email or immutable Id of the group. If Id, it should match with id of +-- group object +gpGroupKey :: Lens' GroupsPatch' Text +gpGroupKey + = lens _gpGroupKey (\ s a -> s{_gpGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gpKey :: Lens' GroupsPatch' (Maybe Text) +gpKey = lens _gpKey (\ s a -> s{_gpKey = a}) + +-- | OAuth 2.0 token for the current user. +gpOauthToken :: Lens' GroupsPatch' (Maybe Text) +gpOauthToken + = lens _gpOauthToken (\ s a -> s{_gpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gpFields :: Lens' GroupsPatch' (Maybe Text) +gpFields = lens _gpFields (\ s a -> s{_gpFields = a}) + +-- | Data format for the response. +gpAlt :: Lens' GroupsPatch' Text +gpAlt = lens _gpAlt (\ s a -> s{_gpAlt = a}) + +instance GoogleRequest GroupsPatch' where + type Rs GroupsPatch' = Group + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsPatch{..} + = go _gpQuotaUser _gpPrettyPrint _gpUserIp + _gpGroupKey + _gpKey + _gpOauthToken + _gpFields + _gpAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsPatchAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Update.hs new file mode 100644 index 000000000..dbe375e4c --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Update.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Groups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Group +-- +-- /See:/ for @DirectoryGroupsUpdate@. +module Directory.Groups.Update + ( + -- * REST Resource + GroupsUpdateAPI + + -- * Creating a Request + , groupsUpdate + , GroupsUpdate + + -- * Request Lenses + , guQuotaUser + , guPrettyPrint + , guUserIp + , guGroupKey + , guKey + , guOauthToken + , guFields + , guAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryGroupsUpdate@ which the +-- 'GroupsUpdate' request conforms to. +type GroupsUpdateAPI = + "groups" :> + Capture "groupKey" Text :> Put '[JSON] Group + +-- | Update Group +-- +-- /See:/ 'groupsUpdate' smart constructor. +data GroupsUpdate = GroupsUpdate + { _guQuotaUser :: !(Maybe Text) + , _guPrettyPrint :: !Bool + , _guUserIp :: !(Maybe Text) + , _guGroupKey :: !Text + , _guKey :: !(Maybe Text) + , _guOauthToken :: !(Maybe Text) + , _guFields :: !(Maybe Text) + , _guAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'guQuotaUser' +-- +-- * 'guPrettyPrint' +-- +-- * 'guUserIp' +-- +-- * 'guGroupKey' +-- +-- * 'guKey' +-- +-- * 'guOauthToken' +-- +-- * 'guFields' +-- +-- * 'guAlt' +groupsUpdate + :: Text -- ^ 'groupKey' + -> GroupsUpdate +groupsUpdate pGuGroupKey_ = + GroupsUpdate + { _guQuotaUser = Nothing + , _guPrettyPrint = True + , _guUserIp = Nothing + , _guGroupKey = pGuGroupKey_ + , _guKey = Nothing + , _guOauthToken = Nothing + , _guFields = Nothing + , _guAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +guQuotaUser :: Lens' GroupsUpdate' (Maybe Text) +guQuotaUser + = lens _guQuotaUser (\ s a -> s{_guQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +guPrettyPrint :: Lens' GroupsUpdate' Bool +guPrettyPrint + = lens _guPrettyPrint + (\ s a -> s{_guPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +guUserIp :: Lens' GroupsUpdate' (Maybe Text) +guUserIp = lens _guUserIp (\ s a -> s{_guUserIp = a}) + +-- | Email or immutable Id of the group. If Id, it should match with id of +-- group object +guGroupKey :: Lens' GroupsUpdate' Text +guGroupKey + = lens _guGroupKey (\ s a -> s{_guGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +guKey :: Lens' GroupsUpdate' (Maybe Text) +guKey = lens _guKey (\ s a -> s{_guKey = a}) + +-- | OAuth 2.0 token for the current user. +guOauthToken :: Lens' GroupsUpdate' (Maybe Text) +guOauthToken + = lens _guOauthToken (\ s a -> s{_guOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +guFields :: Lens' GroupsUpdate' (Maybe Text) +guFields = lens _guFields (\ s a -> s{_guFields = a}) + +-- | Data format for the response. +guAlt :: Lens' GroupsUpdate' Text +guAlt = lens _guAlt (\ s a -> s{_guAlt = a}) + +instance GoogleRequest GroupsUpdate' where + type Rs GroupsUpdate' = Group + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u GroupsUpdate{..} + = go _guQuotaUser _guPrettyPrint _guUserIp + _guGroupKey + _guKey + _guOauthToken + _guFields + _guAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsUpdateAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Delete.hs new file mode 100644 index 000000000..a54a17cc3 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove membership. +-- +-- /See:/ for @DirectoryMembersDelete@. +module Directory.Members.Delete + ( + -- * REST Resource + MembersDeleteAPI + + -- * Creating a Request + , membersDelete + , MembersDelete + + -- * Request Lenses + , mdQuotaUser + , mdMemberKey + , mdPrettyPrint + , mdUserIp + , mdGroupKey + , mdKey + , mdOauthToken + , mdFields + , mdAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersDelete@ which the +-- 'MembersDelete' request conforms to. +type MembersDeleteAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> + Capture "memberKey" Text :> Delete '[JSON] () + +-- | Remove membership. +-- +-- /See:/ 'membersDelete' smart constructor. +data MembersDelete = MembersDelete + { _mdQuotaUser :: !(Maybe Text) + , _mdMemberKey :: !Text + , _mdPrettyPrint :: !Bool + , _mdUserIp :: !(Maybe Text) + , _mdGroupKey :: !Text + , _mdKey :: !(Maybe Text) + , _mdOauthToken :: !(Maybe Text) + , _mdFields :: !(Maybe Text) + , _mdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdQuotaUser' +-- +-- * 'mdMemberKey' +-- +-- * 'mdPrettyPrint' +-- +-- * 'mdUserIp' +-- +-- * 'mdGroupKey' +-- +-- * 'mdKey' +-- +-- * 'mdOauthToken' +-- +-- * 'mdFields' +-- +-- * 'mdAlt' +membersDelete + :: Text -- ^ 'memberKey' + -> Text -- ^ 'groupKey' + -> MembersDelete +membersDelete pMdMemberKey_ pMdGroupKey_ = + MembersDelete + { _mdQuotaUser = Nothing + , _mdMemberKey = pMdMemberKey_ + , _mdPrettyPrint = True + , _mdUserIp = Nothing + , _mdGroupKey = pMdGroupKey_ + , _mdKey = Nothing + , _mdOauthToken = Nothing + , _mdFields = Nothing + , _mdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mdQuotaUser :: Lens' MembersDelete' (Maybe Text) +mdQuotaUser + = lens _mdQuotaUser (\ s a -> s{_mdQuotaUser = a}) + +-- | Email or immutable Id of the member +mdMemberKey :: Lens' MembersDelete' Text +mdMemberKey + = lens _mdMemberKey (\ s a -> s{_mdMemberKey = a}) + +-- | Returns response with indentations and line breaks. +mdPrettyPrint :: Lens' MembersDelete' Bool +mdPrettyPrint + = lens _mdPrettyPrint + (\ s a -> s{_mdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mdUserIp :: Lens' MembersDelete' (Maybe Text) +mdUserIp = lens _mdUserIp (\ s a -> s{_mdUserIp = a}) + +-- | Email or immutable Id of the group +mdGroupKey :: Lens' MembersDelete' Text +mdGroupKey + = lens _mdGroupKey (\ s a -> s{_mdGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mdKey :: Lens' MembersDelete' (Maybe Text) +mdKey = lens _mdKey (\ s a -> s{_mdKey = a}) + +-- | OAuth 2.0 token for the current user. +mdOauthToken :: Lens' MembersDelete' (Maybe Text) +mdOauthToken + = lens _mdOauthToken (\ s a -> s{_mdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mdFields :: Lens' MembersDelete' (Maybe Text) +mdFields = lens _mdFields (\ s a -> s{_mdFields = a}) + +-- | Data format for the response. +mdAlt :: Lens' MembersDelete' Text +mdAlt = lens _mdAlt (\ s a -> s{_mdAlt = a}) + +instance GoogleRequest MembersDelete' where + type Rs MembersDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersDelete{..} + = go _mdQuotaUser _mdMemberKey _mdPrettyPrint + _mdUserIp + _mdGroupKey + _mdKey + _mdOauthToken + _mdFields + _mdAlt + where go + = clientWithRoute (Proxy :: Proxy MembersDeleteAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Get.hs new file mode 100644 index 000000000..b2dc5fa01 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve Group Member +-- +-- /See:/ for @DirectoryMembersGet@. +module Directory.Members.Get + ( + -- * REST Resource + MembersGetAPI + + -- * Creating a Request + , membersGet + , MembersGet + + -- * Request Lenses + , mgQuotaUser + , mgMemberKey + , mgPrettyPrint + , mgUserIp + , mgGroupKey + , mgKey + , mgOauthToken + , mgFields + , mgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersGet@ which the +-- 'MembersGet' request conforms to. +type MembersGetAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> + Capture "memberKey" Text :> Get '[JSON] Member + +-- | Retrieve Group Member +-- +-- /See:/ 'membersGet' smart constructor. +data MembersGet = MembersGet + { _mgQuotaUser :: !(Maybe Text) + , _mgMemberKey :: !Text + , _mgPrettyPrint :: !Bool + , _mgUserIp :: !(Maybe Text) + , _mgGroupKey :: !Text + , _mgKey :: !(Maybe Text) + , _mgOauthToken :: !(Maybe Text) + , _mgFields :: !(Maybe Text) + , _mgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgQuotaUser' +-- +-- * 'mgMemberKey' +-- +-- * 'mgPrettyPrint' +-- +-- * 'mgUserIp' +-- +-- * 'mgGroupKey' +-- +-- * 'mgKey' +-- +-- * 'mgOauthToken' +-- +-- * 'mgFields' +-- +-- * 'mgAlt' +membersGet + :: Text -- ^ 'memberKey' + -> Text -- ^ 'groupKey' + -> MembersGet +membersGet pMgMemberKey_ pMgGroupKey_ = + MembersGet + { _mgQuotaUser = Nothing + , _mgMemberKey = pMgMemberKey_ + , _mgPrettyPrint = True + , _mgUserIp = Nothing + , _mgGroupKey = pMgGroupKey_ + , _mgKey = Nothing + , _mgOauthToken = Nothing + , _mgFields = Nothing + , _mgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgQuotaUser :: Lens' MembersGet' (Maybe Text) +mgQuotaUser + = lens _mgQuotaUser (\ s a -> s{_mgQuotaUser = a}) + +-- | Email or immutable Id of the member +mgMemberKey :: Lens' MembersGet' Text +mgMemberKey + = lens _mgMemberKey (\ s a -> s{_mgMemberKey = a}) + +-- | Returns response with indentations and line breaks. +mgPrettyPrint :: Lens' MembersGet' Bool +mgPrettyPrint + = lens _mgPrettyPrint + (\ s a -> s{_mgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgUserIp :: Lens' MembersGet' (Maybe Text) +mgUserIp = lens _mgUserIp (\ s a -> s{_mgUserIp = a}) + +-- | Email or immutable Id of the group +mgGroupKey :: Lens' MembersGet' Text +mgGroupKey + = lens _mgGroupKey (\ s a -> s{_mgGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgKey :: Lens' MembersGet' (Maybe Text) +mgKey = lens _mgKey (\ s a -> s{_mgKey = a}) + +-- | OAuth 2.0 token for the current user. +mgOauthToken :: Lens' MembersGet' (Maybe Text) +mgOauthToken + = lens _mgOauthToken (\ s a -> s{_mgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgFields :: Lens' MembersGet' (Maybe Text) +mgFields = lens _mgFields (\ s a -> s{_mgFields = a}) + +-- | Data format for the response. +mgAlt :: Lens' MembersGet' Text +mgAlt = lens _mgAlt (\ s a -> s{_mgAlt = a}) + +instance GoogleRequest MembersGet' where + type Rs MembersGet' = Member + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersGet{..} + = go _mgQuotaUser _mgMemberKey _mgPrettyPrint + _mgUserIp + _mgGroupKey + _mgKey + _mgOauthToken + _mgFields + _mgAlt + where go + = clientWithRoute (Proxy :: Proxy MembersGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Insert.hs new file mode 100644 index 000000000..1700e4bd8 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add user to the specified group. +-- +-- /See:/ for @DirectoryMembersInsert@. +module Directory.Members.Insert + ( + -- * REST Resource + MembersInsertAPI + + -- * Creating a Request + , membersInsert + , MembersInsert + + -- * Request Lenses + , miQuotaUser + , miPrettyPrint + , miUserIp + , miGroupKey + , miKey + , miOauthToken + , miFields + , miAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersInsert@ which the +-- 'MembersInsert' request conforms to. +type MembersInsertAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> Post '[JSON] Member + +-- | Add user to the specified group. +-- +-- /See:/ 'membersInsert' smart constructor. +data MembersInsert = MembersInsert + { _miQuotaUser :: !(Maybe Text) + , _miPrettyPrint :: !Bool + , _miUserIp :: !(Maybe Text) + , _miGroupKey :: !Text + , _miKey :: !(Maybe Text) + , _miOauthToken :: !(Maybe Text) + , _miFields :: !(Maybe Text) + , _miAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miQuotaUser' +-- +-- * 'miPrettyPrint' +-- +-- * 'miUserIp' +-- +-- * 'miGroupKey' +-- +-- * 'miKey' +-- +-- * 'miOauthToken' +-- +-- * 'miFields' +-- +-- * 'miAlt' +membersInsert + :: Text -- ^ 'groupKey' + -> MembersInsert +membersInsert pMiGroupKey_ = + MembersInsert + { _miQuotaUser = Nothing + , _miPrettyPrint = True + , _miUserIp = Nothing + , _miGroupKey = pMiGroupKey_ + , _miKey = Nothing + , _miOauthToken = Nothing + , _miFields = Nothing + , _miAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miQuotaUser :: Lens' MembersInsert' (Maybe Text) +miQuotaUser + = lens _miQuotaUser (\ s a -> s{_miQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miPrettyPrint :: Lens' MembersInsert' Bool +miPrettyPrint + = lens _miPrettyPrint + (\ s a -> s{_miPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miUserIp :: Lens' MembersInsert' (Maybe Text) +miUserIp = lens _miUserIp (\ s a -> s{_miUserIp = a}) + +-- | Email or immutable Id of the group +miGroupKey :: Lens' MembersInsert' Text +miGroupKey + = lens _miGroupKey (\ s a -> s{_miGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miKey :: Lens' MembersInsert' (Maybe Text) +miKey = lens _miKey (\ s a -> s{_miKey = a}) + +-- | OAuth 2.0 token for the current user. +miOauthToken :: Lens' MembersInsert' (Maybe Text) +miOauthToken + = lens _miOauthToken (\ s a -> s{_miOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +miFields :: Lens' MembersInsert' (Maybe Text) +miFields = lens _miFields (\ s a -> s{_miFields = a}) + +-- | Data format for the response. +miAlt :: Lens' MembersInsert' Text +miAlt = lens _miAlt (\ s a -> s{_miAlt = a}) + +instance GoogleRequest MembersInsert' where + type Rs MembersInsert' = Member + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersInsert{..} + = go _miQuotaUser _miPrettyPrint _miUserIp + _miGroupKey + _miKey + _miOauthToken + _miFields + _miAlt + where go + = clientWithRoute (Proxy :: Proxy MembersInsertAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/List.hs new file mode 100644 index 000000000..c28be6526 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/List.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all members in a group (paginated) +-- +-- /See:/ for @DirectoryMembersList@. +module Directory.Members.List + ( + -- * REST Resource + MembersListAPI + + -- * Creating a Request + , membersList + , MembersList + + -- * Request Lenses + , mlQuotaUser + , mlRoles + , mlPrettyPrint + , mlUserIp + , mlGroupKey + , mlKey + , mlPageToken + , mlOauthToken + , mlMaxResults + , mlFields + , mlAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersList@ which the +-- 'MembersList' request conforms to. +type MembersListAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> + QueryParam "roles" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Members + +-- | Retrieve all members in a group (paginated) +-- +-- /See:/ 'membersList' smart constructor. +data MembersList = MembersList + { _mlQuotaUser :: !(Maybe Text) + , _mlRoles :: !(Maybe Text) + , _mlPrettyPrint :: !Bool + , _mlUserIp :: !(Maybe Text) + , _mlGroupKey :: !Text + , _mlKey :: !(Maybe Text) + , _mlPageToken :: !(Maybe Text) + , _mlOauthToken :: !(Maybe Text) + , _mlMaxResults :: !(Maybe Int32) + , _mlFields :: !(Maybe Text) + , _mlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlQuotaUser' +-- +-- * 'mlRoles' +-- +-- * 'mlPrettyPrint' +-- +-- * 'mlUserIp' +-- +-- * 'mlGroupKey' +-- +-- * 'mlKey' +-- +-- * 'mlPageToken' +-- +-- * 'mlOauthToken' +-- +-- * 'mlMaxResults' +-- +-- * 'mlFields' +-- +-- * 'mlAlt' +membersList + :: Text -- ^ 'groupKey' + -> MembersList +membersList pMlGroupKey_ = + MembersList + { _mlQuotaUser = Nothing + , _mlRoles = Nothing + , _mlPrettyPrint = True + , _mlUserIp = Nothing + , _mlGroupKey = pMlGroupKey_ + , _mlKey = Nothing + , _mlPageToken = Nothing + , _mlOauthToken = Nothing + , _mlMaxResults = Nothing + , _mlFields = Nothing + , _mlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlQuotaUser :: Lens' MembersList' (Maybe Text) +mlQuotaUser + = lens _mlQuotaUser (\ s a -> s{_mlQuotaUser = a}) + +-- | Comma separated role values to filter list results on. +mlRoles :: Lens' MembersList' (Maybe Text) +mlRoles = lens _mlRoles (\ s a -> s{_mlRoles = a}) + +-- | Returns response with indentations and line breaks. +mlPrettyPrint :: Lens' MembersList' Bool +mlPrettyPrint + = lens _mlPrettyPrint + (\ s a -> s{_mlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlUserIp :: Lens' MembersList' (Maybe Text) +mlUserIp = lens _mlUserIp (\ s a -> s{_mlUserIp = a}) + +-- | Email or immutable Id of the group +mlGroupKey :: Lens' MembersList' Text +mlGroupKey + = lens _mlGroupKey (\ s a -> s{_mlGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlKey :: Lens' MembersList' (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | Token to specify next page in the list +mlPageToken :: Lens' MembersList' (Maybe Text) +mlPageToken + = lens _mlPageToken (\ s a -> s{_mlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mlOauthToken :: Lens' MembersList' (Maybe Text) +mlOauthToken + = lens _mlOauthToken (\ s a -> s{_mlOauthToken = a}) + +-- | Maximum number of results to return. Default is 200 +mlMaxResults :: Lens' MembersList' (Maybe Int32) +mlMaxResults + = lens _mlMaxResults (\ s a -> s{_mlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mlFields :: Lens' MembersList' (Maybe Text) +mlFields = lens _mlFields (\ s a -> s{_mlFields = a}) + +-- | Data format for the response. +mlAlt :: Lens' MembersList' Text +mlAlt = lens _mlAlt (\ s a -> s{_mlAlt = a}) + +instance GoogleRequest MembersList' where + type Rs MembersList' = Members + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersList{..} + = go _mlQuotaUser _mlRoles _mlPrettyPrint _mlUserIp + _mlGroupKey + _mlKey + _mlPageToken + _mlOauthToken + _mlMaxResults + _mlFields + _mlAlt + where go + = clientWithRoute (Proxy :: Proxy MembersListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Patch.hs new file mode 100644 index 000000000..3a041d20a --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Patch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update membership of a user in the specified group. This method supports +-- patch semantics. +-- +-- /See:/ for @DirectoryMembersPatch@. +module Directory.Members.Patch + ( + -- * REST Resource + MembersPatchAPI + + -- * Creating a Request + , membersPatch + , MembersPatch + + -- * Request Lenses + , mpQuotaUser + , mpMemberKey + , mpPrettyPrint + , mpUserIp + , mpGroupKey + , mpKey + , mpOauthToken + , mpFields + , mpAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersPatch@ which the +-- 'MembersPatch' request conforms to. +type MembersPatchAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> + Capture "memberKey" Text :> Patch '[JSON] Member + +-- | Update membership of a user in the specified group. This method supports +-- patch semantics. +-- +-- /See:/ 'membersPatch' smart constructor. +data MembersPatch = MembersPatch + { _mpQuotaUser :: !(Maybe Text) + , _mpMemberKey :: !Text + , _mpPrettyPrint :: !Bool + , _mpUserIp :: !(Maybe Text) + , _mpGroupKey :: !Text + , _mpKey :: !(Maybe Text) + , _mpOauthToken :: !(Maybe Text) + , _mpFields :: !(Maybe Text) + , _mpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpQuotaUser' +-- +-- * 'mpMemberKey' +-- +-- * 'mpPrettyPrint' +-- +-- * 'mpUserIp' +-- +-- * 'mpGroupKey' +-- +-- * 'mpKey' +-- +-- * 'mpOauthToken' +-- +-- * 'mpFields' +-- +-- * 'mpAlt' +membersPatch + :: Text -- ^ 'memberKey' + -> Text -- ^ 'groupKey' + -> MembersPatch +membersPatch pMpMemberKey_ pMpGroupKey_ = + MembersPatch + { _mpQuotaUser = Nothing + , _mpMemberKey = pMpMemberKey_ + , _mpPrettyPrint = True + , _mpUserIp = Nothing + , _mpGroupKey = pMpGroupKey_ + , _mpKey = Nothing + , _mpOauthToken = Nothing + , _mpFields = Nothing + , _mpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpQuotaUser :: Lens' MembersPatch' (Maybe Text) +mpQuotaUser + = lens _mpQuotaUser (\ s a -> s{_mpQuotaUser = a}) + +-- | Email or immutable Id of the user. If Id, it should match with id of +-- member object +mpMemberKey :: Lens' MembersPatch' Text +mpMemberKey + = lens _mpMemberKey (\ s a -> s{_mpMemberKey = a}) + +-- | Returns response with indentations and line breaks. +mpPrettyPrint :: Lens' MembersPatch' Bool +mpPrettyPrint + = lens _mpPrettyPrint + (\ s a -> s{_mpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpUserIp :: Lens' MembersPatch' (Maybe Text) +mpUserIp = lens _mpUserIp (\ s a -> s{_mpUserIp = a}) + +-- | Email or immutable Id of the group. If Id, it should match with id of +-- group object +mpGroupKey :: Lens' MembersPatch' Text +mpGroupKey + = lens _mpGroupKey (\ s a -> s{_mpGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpKey :: Lens' MembersPatch' (Maybe Text) +mpKey = lens _mpKey (\ s a -> s{_mpKey = a}) + +-- | OAuth 2.0 token for the current user. +mpOauthToken :: Lens' MembersPatch' (Maybe Text) +mpOauthToken + = lens _mpOauthToken (\ s a -> s{_mpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpFields :: Lens' MembersPatch' (Maybe Text) +mpFields = lens _mpFields (\ s a -> s{_mpFields = a}) + +-- | Data format for the response. +mpAlt :: Lens' MembersPatch' Text +mpAlt = lens _mpAlt (\ s a -> s{_mpAlt = a}) + +instance GoogleRequest MembersPatch' where + type Rs MembersPatch' = Member + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersPatch{..} + = go _mpQuotaUser _mpMemberKey _mpPrettyPrint + _mpUserIp + _mpGroupKey + _mpKey + _mpOauthToken + _mpFields + _mpAlt + where go + = clientWithRoute (Proxy :: Proxy MembersPatchAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Update.hs new file mode 100644 index 000000000..eec6871e4 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Members/Update.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Members.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update membership of a user in the specified group. +-- +-- /See:/ for @DirectoryMembersUpdate@. +module Directory.Members.Update + ( + -- * REST Resource + MembersUpdateAPI + + -- * Creating a Request + , membersUpdate + , MembersUpdate + + -- * Request Lenses + , muQuotaUser + , muMemberKey + , muPrettyPrint + , muUserIp + , muGroupKey + , muKey + , muOauthToken + , muFields + , muAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMembersUpdate@ which the +-- 'MembersUpdate' request conforms to. +type MembersUpdateAPI = + "groups" :> + Capture "groupKey" Text :> + "members" :> + Capture "memberKey" Text :> Put '[JSON] Member + +-- | Update membership of a user in the specified group. +-- +-- /See:/ 'membersUpdate' smart constructor. +data MembersUpdate = MembersUpdate + { _muQuotaUser :: !(Maybe Text) + , _muMemberKey :: !Text + , _muPrettyPrint :: !Bool + , _muUserIp :: !(Maybe Text) + , _muGroupKey :: !Text + , _muKey :: !(Maybe Text) + , _muOauthToken :: !(Maybe Text) + , _muFields :: !(Maybe Text) + , _muAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MembersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muQuotaUser' +-- +-- * 'muMemberKey' +-- +-- * 'muPrettyPrint' +-- +-- * 'muUserIp' +-- +-- * 'muGroupKey' +-- +-- * 'muKey' +-- +-- * 'muOauthToken' +-- +-- * 'muFields' +-- +-- * 'muAlt' +membersUpdate + :: Text -- ^ 'memberKey' + -> Text -- ^ 'groupKey' + -> MembersUpdate +membersUpdate pMuMemberKey_ pMuGroupKey_ = + MembersUpdate + { _muQuotaUser = Nothing + , _muMemberKey = pMuMemberKey_ + , _muPrettyPrint = True + , _muUserIp = Nothing + , _muGroupKey = pMuGroupKey_ + , _muKey = Nothing + , _muOauthToken = Nothing + , _muFields = Nothing + , _muAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muQuotaUser :: Lens' MembersUpdate' (Maybe Text) +muQuotaUser + = lens _muQuotaUser (\ s a -> s{_muQuotaUser = a}) + +-- | Email or immutable Id of the user. If Id, it should match with id of +-- member object +muMemberKey :: Lens' MembersUpdate' Text +muMemberKey + = lens _muMemberKey (\ s a -> s{_muMemberKey = a}) + +-- | Returns response with indentations and line breaks. +muPrettyPrint :: Lens' MembersUpdate' Bool +muPrettyPrint + = lens _muPrettyPrint + (\ s a -> s{_muPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muUserIp :: Lens' MembersUpdate' (Maybe Text) +muUserIp = lens _muUserIp (\ s a -> s{_muUserIp = a}) + +-- | Email or immutable Id of the group. If Id, it should match with id of +-- group object +muGroupKey :: Lens' MembersUpdate' Text +muGroupKey + = lens _muGroupKey (\ s a -> s{_muGroupKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muKey :: Lens' MembersUpdate' (Maybe Text) +muKey = lens _muKey (\ s a -> s{_muKey = a}) + +-- | OAuth 2.0 token for the current user. +muOauthToken :: Lens' MembersUpdate' (Maybe Text) +muOauthToken + = lens _muOauthToken (\ s a -> s{_muOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +muFields :: Lens' MembersUpdate' (Maybe Text) +muFields = lens _muFields (\ s a -> s{_muFields = a}) + +-- | Data format for the response. +muAlt :: Lens' MembersUpdate' Text +muAlt = lens _muAlt (\ s a -> s{_muAlt = a}) + +instance GoogleRequest MembersUpdate' where + type Rs MembersUpdate' = Member + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MembersUpdate{..} + = go _muQuotaUser _muMemberKey _muPrettyPrint + _muUserIp + _muGroupKey + _muKey + _muOauthToken + _muFields + _muAlt + where go + = clientWithRoute (Proxy :: Proxy MembersUpdateAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Action.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Action.hs new file mode 100644 index 000000000..7f5495b44 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Action.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Mobiledevices.Action +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Take action on Mobile Device +-- +-- /See:/ for @DirectoryMobiledevicesAction@. +module Directory.Mobiledevices.Action + ( + -- * REST Resource + MobiledevicesActionAPI + + -- * Creating a Request + , mobiledevicesAction + , MobiledevicesAction + + -- * Request Lenses + , maQuotaUser + , maResourceId + , maPrettyPrint + , maUserIp + , maCustomerId + , maKey + , maOauthToken + , maFields + , maAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMobiledevicesAction@ which the +-- 'MobiledevicesAction' request conforms to. +type MobiledevicesActionAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "mobile" :> + Capture "resourceId" Text :> + "action" :> Post '[JSON] () + +-- | Take action on Mobile Device +-- +-- /See:/ 'mobiledevicesAction' smart constructor. +data MobiledevicesAction = MobiledevicesAction + { _maQuotaUser :: !(Maybe Text) + , _maResourceId :: !Text + , _maPrettyPrint :: !Bool + , _maUserIp :: !(Maybe Text) + , _maCustomerId :: !Text + , _maKey :: !(Maybe Text) + , _maOauthToken :: !(Maybe Text) + , _maFields :: !(Maybe Text) + , _maAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobiledevicesAction'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'maQuotaUser' +-- +-- * 'maResourceId' +-- +-- * 'maPrettyPrint' +-- +-- * 'maUserIp' +-- +-- * 'maCustomerId' +-- +-- * 'maKey' +-- +-- * 'maOauthToken' +-- +-- * 'maFields' +-- +-- * 'maAlt' +mobiledevicesAction + :: Text -- ^ 'resourceId' + -> Text -- ^ 'customerId' + -> MobiledevicesAction +mobiledevicesAction pMaResourceId_ pMaCustomerId_ = + MobiledevicesAction + { _maQuotaUser = Nothing + , _maResourceId = pMaResourceId_ + , _maPrettyPrint = True + , _maUserIp = Nothing + , _maCustomerId = pMaCustomerId_ + , _maKey = Nothing + , _maOauthToken = Nothing + , _maFields = Nothing + , _maAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +maQuotaUser :: Lens' MobiledevicesAction' (Maybe Text) +maQuotaUser + = lens _maQuotaUser (\ s a -> s{_maQuotaUser = a}) + +-- | Immutable id of Mobile Device +maResourceId :: Lens' MobiledevicesAction' Text +maResourceId + = lens _maResourceId (\ s a -> s{_maResourceId = a}) + +-- | Returns response with indentations and line breaks. +maPrettyPrint :: Lens' MobiledevicesAction' Bool +maPrettyPrint + = lens _maPrettyPrint + (\ s a -> s{_maPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +maUserIp :: Lens' MobiledevicesAction' (Maybe Text) +maUserIp = lens _maUserIp (\ s a -> s{_maUserIp = a}) + +-- | Immutable id of the Google Apps account +maCustomerId :: Lens' MobiledevicesAction' Text +maCustomerId + = lens _maCustomerId (\ s a -> s{_maCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +maKey :: Lens' MobiledevicesAction' (Maybe Text) +maKey = lens _maKey (\ s a -> s{_maKey = a}) + +-- | OAuth 2.0 token for the current user. +maOauthToken :: Lens' MobiledevicesAction' (Maybe Text) +maOauthToken + = lens _maOauthToken (\ s a -> s{_maOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +maFields :: Lens' MobiledevicesAction' (Maybe Text) +maFields = lens _maFields (\ s a -> s{_maFields = a}) + +-- | Data format for the response. +maAlt :: Lens' MobiledevicesAction' Text +maAlt = lens _maAlt (\ s a -> s{_maAlt = a}) + +instance GoogleRequest MobiledevicesAction' where + type Rs MobiledevicesAction' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MobiledevicesAction{..} + = go _maQuotaUser _maResourceId _maPrettyPrint + _maUserIp + _maCustomerId + _maKey + _maOauthToken + _maFields + _maAlt + where go + = clientWithRoute + (Proxy :: Proxy MobiledevicesActionAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Delete.hs new file mode 100644 index 000000000..43e64c451 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Delete.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Mobiledevices.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete Mobile Device +-- +-- /See:/ for @DirectoryMobiledevicesDelete@. +module Directory.Mobiledevices.Delete + ( + -- * REST Resource + MobiledevicesDeleteAPI + + -- * Creating a Request + , mobiledevicesDelete + , MobiledevicesDelete + + -- * Request Lenses + , mddQuotaUser + , mddResourceId + , mddPrettyPrint + , mddUserIp + , mddCustomerId + , mddKey + , mddOauthToken + , mddFields + , mddAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMobiledevicesDelete@ which the +-- 'MobiledevicesDelete' request conforms to. +type MobiledevicesDeleteAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "mobile" :> + Capture "resourceId" Text :> Delete '[JSON] () + +-- | Delete Mobile Device +-- +-- /See:/ 'mobiledevicesDelete' smart constructor. +data MobiledevicesDelete = MobiledevicesDelete + { _mddQuotaUser :: !(Maybe Text) + , _mddResourceId :: !Text + , _mddPrettyPrint :: !Bool + , _mddUserIp :: !(Maybe Text) + , _mddCustomerId :: !Text + , _mddKey :: !(Maybe Text) + , _mddOauthToken :: !(Maybe Text) + , _mddFields :: !(Maybe Text) + , _mddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobiledevicesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mddQuotaUser' +-- +-- * 'mddResourceId' +-- +-- * 'mddPrettyPrint' +-- +-- * 'mddUserIp' +-- +-- * 'mddCustomerId' +-- +-- * 'mddKey' +-- +-- * 'mddOauthToken' +-- +-- * 'mddFields' +-- +-- * 'mddAlt' +mobiledevicesDelete + :: Text -- ^ 'resourceId' + -> Text -- ^ 'customerId' + -> MobiledevicesDelete +mobiledevicesDelete pMddResourceId_ pMddCustomerId_ = + MobiledevicesDelete + { _mddQuotaUser = Nothing + , _mddResourceId = pMddResourceId_ + , _mddPrettyPrint = True + , _mddUserIp = Nothing + , _mddCustomerId = pMddCustomerId_ + , _mddKey = Nothing + , _mddOauthToken = Nothing + , _mddFields = Nothing + , _mddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mddQuotaUser :: Lens' MobiledevicesDelete' (Maybe Text) +mddQuotaUser + = lens _mddQuotaUser (\ s a -> s{_mddQuotaUser = a}) + +-- | Immutable id of Mobile Device +mddResourceId :: Lens' MobiledevicesDelete' Text +mddResourceId + = lens _mddResourceId + (\ s a -> s{_mddResourceId = a}) + +-- | Returns response with indentations and line breaks. +mddPrettyPrint :: Lens' MobiledevicesDelete' Bool +mddPrettyPrint + = lens _mddPrettyPrint + (\ s a -> s{_mddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mddUserIp :: Lens' MobiledevicesDelete' (Maybe Text) +mddUserIp + = lens _mddUserIp (\ s a -> s{_mddUserIp = a}) + +-- | Immutable id of the Google Apps account +mddCustomerId :: Lens' MobiledevicesDelete' Text +mddCustomerId + = lens _mddCustomerId + (\ s a -> s{_mddCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mddKey :: Lens' MobiledevicesDelete' (Maybe Text) +mddKey = lens _mddKey (\ s a -> s{_mddKey = a}) + +-- | OAuth 2.0 token for the current user. +mddOauthToken :: Lens' MobiledevicesDelete' (Maybe Text) +mddOauthToken + = lens _mddOauthToken + (\ s a -> s{_mddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mddFields :: Lens' MobiledevicesDelete' (Maybe Text) +mddFields + = lens _mddFields (\ s a -> s{_mddFields = a}) + +-- | Data format for the response. +mddAlt :: Lens' MobiledevicesDelete' Text +mddAlt = lens _mddAlt (\ s a -> s{_mddAlt = a}) + +instance GoogleRequest MobiledevicesDelete' where + type Rs MobiledevicesDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MobiledevicesDelete{..} + = go _mddQuotaUser _mddResourceId _mddPrettyPrint + _mddUserIp + _mddCustomerId + _mddKey + _mddOauthToken + _mddFields + _mddAlt + where go + = clientWithRoute + (Proxy :: Proxy MobiledevicesDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Get.hs new file mode 100644 index 000000000..816c6b38e --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Mobiledevices.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve Mobile Device +-- +-- /See:/ for @DirectoryMobiledevicesGet@. +module Directory.Mobiledevices.Get + ( + -- * REST Resource + MobiledevicesGetAPI + + -- * Creating a Request + , mobiledevicesGet + , MobiledevicesGet + + -- * Request Lenses + , mggQuotaUser + , mggResourceId + , mggPrettyPrint + , mggUserIp + , mggCustomerId + , mggKey + , mggProjection + , mggOauthToken + , mggFields + , mggAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMobiledevicesGet@ which the +-- 'MobiledevicesGet' request conforms to. +type MobiledevicesGetAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "mobile" :> + Capture "resourceId" Text :> + QueryParam "projection" Text :> + Get '[JSON] MobileDevice + +-- | Retrieve Mobile Device +-- +-- /See:/ 'mobiledevicesGet' smart constructor. +data MobiledevicesGet = MobiledevicesGet + { _mggQuotaUser :: !(Maybe Text) + , _mggResourceId :: !Text + , _mggPrettyPrint :: !Bool + , _mggUserIp :: !(Maybe Text) + , _mggCustomerId :: !Text + , _mggKey :: !(Maybe Text) + , _mggProjection :: !(Maybe Text) + , _mggOauthToken :: !(Maybe Text) + , _mggFields :: !(Maybe Text) + , _mggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobiledevicesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mggQuotaUser' +-- +-- * 'mggResourceId' +-- +-- * 'mggPrettyPrint' +-- +-- * 'mggUserIp' +-- +-- * 'mggCustomerId' +-- +-- * 'mggKey' +-- +-- * 'mggProjection' +-- +-- * 'mggOauthToken' +-- +-- * 'mggFields' +-- +-- * 'mggAlt' +mobiledevicesGet + :: Text -- ^ 'resourceId' + -> Text -- ^ 'customerId' + -> MobiledevicesGet +mobiledevicesGet pMggResourceId_ pMggCustomerId_ = + MobiledevicesGet + { _mggQuotaUser = Nothing + , _mggResourceId = pMggResourceId_ + , _mggPrettyPrint = True + , _mggUserIp = Nothing + , _mggCustomerId = pMggCustomerId_ + , _mggKey = Nothing + , _mggProjection = Nothing + , _mggOauthToken = Nothing + , _mggFields = Nothing + , _mggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mggQuotaUser :: Lens' MobiledevicesGet' (Maybe Text) +mggQuotaUser + = lens _mggQuotaUser (\ s a -> s{_mggQuotaUser = a}) + +-- | Immutable id of Mobile Device +mggResourceId :: Lens' MobiledevicesGet' Text +mggResourceId + = lens _mggResourceId + (\ s a -> s{_mggResourceId = a}) + +-- | Returns response with indentations and line breaks. +mggPrettyPrint :: Lens' MobiledevicesGet' Bool +mggPrettyPrint + = lens _mggPrettyPrint + (\ s a -> s{_mggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mggUserIp :: Lens' MobiledevicesGet' (Maybe Text) +mggUserIp + = lens _mggUserIp (\ s a -> s{_mggUserIp = a}) + +-- | Immutable id of the Google Apps account +mggCustomerId :: Lens' MobiledevicesGet' Text +mggCustomerId + = lens _mggCustomerId + (\ s a -> s{_mggCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mggKey :: Lens' MobiledevicesGet' (Maybe Text) +mggKey = lens _mggKey (\ s a -> s{_mggKey = a}) + +-- | Restrict information returned to a set of selected fields. +mggProjection :: Lens' MobiledevicesGet' (Maybe Text) +mggProjection + = lens _mggProjection + (\ s a -> s{_mggProjection = a}) + +-- | OAuth 2.0 token for the current user. +mggOauthToken :: Lens' MobiledevicesGet' (Maybe Text) +mggOauthToken + = lens _mggOauthToken + (\ s a -> s{_mggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mggFields :: Lens' MobiledevicesGet' (Maybe Text) +mggFields + = lens _mggFields (\ s a -> s{_mggFields = a}) + +-- | Data format for the response. +mggAlt :: Lens' MobiledevicesGet' Text +mggAlt = lens _mggAlt (\ s a -> s{_mggAlt = a}) + +instance GoogleRequest MobiledevicesGet' where + type Rs MobiledevicesGet' = MobileDevice + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MobiledevicesGet{..} + = go _mggQuotaUser _mggResourceId _mggPrettyPrint + _mggUserIp + _mggCustomerId + _mggKey + _mggProjection + _mggOauthToken + _mggFields + _mggAlt + where go + = clientWithRoute + (Proxy :: Proxy MobiledevicesGetAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/List.hs new file mode 100644 index 000000000..ea3570d35 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Mobiledevices/List.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Mobiledevices.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all Mobile Devices of a customer (paginated) +-- +-- /See:/ for @DirectoryMobiledevicesList@. +module Directory.Mobiledevices.List + ( + -- * REST Resource + MobiledevicesListAPI + + -- * Creating a Request + , mobiledevicesList + , MobiledevicesList + + -- * Request Lenses + , mQuotaUser + , mPrettyPrint + , mOrderBy + , mUserIp + , mCustomerId + , mSortOrder + , mKey + , mQuery + , mProjection + , mPageToken + , mOauthToken + , mMaxResults + , mFields + , mAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryMobiledevicesList@ which the +-- 'MobiledevicesList' request conforms to. +type MobiledevicesListAPI = + "customer" :> + Capture "customerId" Text :> + "devices" :> + "mobile" :> + QueryParam "orderBy" Text :> + QueryParam "sortOrder" Text :> + QueryParam "query" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] MobileDevices + +-- | Retrieve all Mobile Devices of a customer (paginated) +-- +-- /See:/ 'mobiledevicesList' smart constructor. +data MobiledevicesList = MobiledevicesList + { _mQuotaUser :: !(Maybe Text) + , _mPrettyPrint :: !Bool + , _mOrderBy :: !(Maybe Text) + , _mUserIp :: !(Maybe Text) + , _mCustomerId :: !Text + , _mSortOrder :: !(Maybe Text) + , _mKey :: !(Maybe Text) + , _mQuery :: !(Maybe Text) + , _mProjection :: !(Maybe Text) + , _mPageToken :: !(Maybe Text) + , _mOauthToken :: !(Maybe Text) + , _mMaxResults :: !(Maybe Int32) + , _mFields :: !(Maybe Text) + , _mAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobiledevicesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mQuotaUser' +-- +-- * 'mPrettyPrint' +-- +-- * 'mOrderBy' +-- +-- * 'mUserIp' +-- +-- * 'mCustomerId' +-- +-- * 'mSortOrder' +-- +-- * 'mKey' +-- +-- * 'mQuery' +-- +-- * 'mProjection' +-- +-- * 'mPageToken' +-- +-- * 'mOauthToken' +-- +-- * 'mMaxResults' +-- +-- * 'mFields' +-- +-- * 'mAlt' +mobiledevicesList + :: Text -- ^ 'customerId' + -> MobiledevicesList +mobiledevicesList pMCustomerId_ = + MobiledevicesList + { _mQuotaUser = Nothing + , _mPrettyPrint = True + , _mOrderBy = Nothing + , _mUserIp = Nothing + , _mCustomerId = pMCustomerId_ + , _mSortOrder = Nothing + , _mKey = Nothing + , _mQuery = Nothing + , _mProjection = Nothing + , _mPageToken = Nothing + , _mOauthToken = Nothing + , _mMaxResults = Nothing + , _mFields = Nothing + , _mAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mQuotaUser :: Lens' MobiledevicesList' (Maybe Text) +mQuotaUser + = lens _mQuotaUser (\ s a -> s{_mQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mPrettyPrint :: Lens' MobiledevicesList' Bool +mPrettyPrint + = lens _mPrettyPrint (\ s a -> s{_mPrettyPrint = a}) + +-- | Column to use for sorting results +mOrderBy :: Lens' MobiledevicesList' (Maybe Text) +mOrderBy = lens _mOrderBy (\ s a -> s{_mOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mUserIp :: Lens' MobiledevicesList' (Maybe Text) +mUserIp = lens _mUserIp (\ s a -> s{_mUserIp = a}) + +-- | Immutable id of the Google Apps account +mCustomerId :: Lens' MobiledevicesList' Text +mCustomerId + = lens _mCustomerId (\ s a -> s{_mCustomerId = a}) + +-- | Whether to return results in ascending or descending order. Only of use +-- when orderBy is also used +mSortOrder :: Lens' MobiledevicesList' (Maybe Text) +mSortOrder + = lens _mSortOrder (\ s a -> s{_mSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mKey :: Lens' MobiledevicesList' (Maybe Text) +mKey = lens _mKey (\ s a -> s{_mKey = a}) + +-- | Search string in the format given at +-- http:\/\/support.google.com\/a\/bin\/answer.py?hl=en&answer=1408863#search +mQuery :: Lens' MobiledevicesList' (Maybe Text) +mQuery = lens _mQuery (\ s a -> s{_mQuery = a}) + +-- | Restrict information returned to a set of selected fields. +mProjection :: Lens' MobiledevicesList' (Maybe Text) +mProjection + = lens _mProjection (\ s a -> s{_mProjection = a}) + +-- | Token to specify next page in the list +mPageToken :: Lens' MobiledevicesList' (Maybe Text) +mPageToken + = lens _mPageToken (\ s a -> s{_mPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mOauthToken :: Lens' MobiledevicesList' (Maybe Text) +mOauthToken + = lens _mOauthToken (\ s a -> s{_mOauthToken = a}) + +-- | Maximum number of results to return. Default is 100 +mMaxResults :: Lens' MobiledevicesList' (Maybe Int32) +mMaxResults + = lens _mMaxResults (\ s a -> s{_mMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mFields :: Lens' MobiledevicesList' (Maybe Text) +mFields = lens _mFields (\ s a -> s{_mFields = a}) + +-- | Data format for the response. +mAlt :: Lens' MobiledevicesList' Text +mAlt = lens _mAlt (\ s a -> s{_mAlt = a}) + +instance GoogleRequest MobiledevicesList' where + type Rs MobiledevicesList' = MobileDevices + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u MobiledevicesList{..} + = go _mQuotaUser _mPrettyPrint _mOrderBy _mUserIp + _mCustomerId + _mSortOrder + _mKey + _mQuery + _mProjection + _mPageToken + _mOauthToken + _mMaxResults + _mFields + _mAlt + where go + = clientWithRoute + (Proxy :: Proxy MobiledevicesListAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Delete.hs new file mode 100644 index 000000000..e9c65312d --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Notifications.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a notification +-- +-- /See:/ for @DirectoryNotificationsDelete@. +module Directory.Notifications.Delete + ( + -- * REST Resource + NotificationsDeleteAPI + + -- * Creating a Request + , notificationsDelete + , NotificationsDelete + + -- * Request Lenses + , ndQuotaUser + , ndPrettyPrint + , ndUserIp + , ndCustomer + , ndKey + , ndNotificationId + , ndOauthToken + , ndFields + , ndAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryNotificationsDelete@ which the +-- 'NotificationsDelete' request conforms to. +type NotificationsDeleteAPI = + "customer" :> + Capture "customer" Text :> + "notifications" :> + Capture "notificationId" Text :> Delete '[JSON] () + +-- | Deletes a notification +-- +-- /See:/ 'notificationsDelete' smart constructor. +data NotificationsDelete = NotificationsDelete + { _ndQuotaUser :: !(Maybe Text) + , _ndPrettyPrint :: !Bool + , _ndUserIp :: !(Maybe Text) + , _ndCustomer :: !Text + , _ndKey :: !(Maybe Text) + , _ndNotificationId :: !Text + , _ndOauthToken :: !(Maybe Text) + , _ndFields :: !(Maybe Text) + , _ndAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ndQuotaUser' +-- +-- * 'ndPrettyPrint' +-- +-- * 'ndUserIp' +-- +-- * 'ndCustomer' +-- +-- * 'ndKey' +-- +-- * 'ndNotificationId' +-- +-- * 'ndOauthToken' +-- +-- * 'ndFields' +-- +-- * 'ndAlt' +notificationsDelete + :: Text -- ^ 'customer' + -> Text -- ^ 'notificationId' + -> NotificationsDelete +notificationsDelete pNdCustomer_ pNdNotificationId_ = + NotificationsDelete + { _ndQuotaUser = Nothing + , _ndPrettyPrint = True + , _ndUserIp = Nothing + , _ndCustomer = pNdCustomer_ + , _ndKey = Nothing + , _ndNotificationId = pNdNotificationId_ + , _ndOauthToken = Nothing + , _ndFields = Nothing + , _ndAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ndQuotaUser :: Lens' NotificationsDelete' (Maybe Text) +ndQuotaUser + = lens _ndQuotaUser (\ s a -> s{_ndQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ndPrettyPrint :: Lens' NotificationsDelete' Bool +ndPrettyPrint + = lens _ndPrettyPrint + (\ s a -> s{_ndPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ndUserIp :: Lens' NotificationsDelete' (Maybe Text) +ndUserIp = lens _ndUserIp (\ s a -> s{_ndUserIp = a}) + +-- | The unique ID for the customer\'s Google account. The customerId is also +-- returned as part of the Users resource. +ndCustomer :: Lens' NotificationsDelete' Text +ndCustomer + = lens _ndCustomer (\ s a -> s{_ndCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ndKey :: Lens' NotificationsDelete' (Maybe Text) +ndKey = lens _ndKey (\ s a -> s{_ndKey = a}) + +-- | The unique ID of the notification. +ndNotificationId :: Lens' NotificationsDelete' Text +ndNotificationId + = lens _ndNotificationId + (\ s a -> s{_ndNotificationId = a}) + +-- | OAuth 2.0 token for the current user. +ndOauthToken :: Lens' NotificationsDelete' (Maybe Text) +ndOauthToken + = lens _ndOauthToken (\ s a -> s{_ndOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ndFields :: Lens' NotificationsDelete' (Maybe Text) +ndFields = lens _ndFields (\ s a -> s{_ndFields = a}) + +-- | Data format for the response. +ndAlt :: Lens' NotificationsDelete' Text +ndAlt = lens _ndAlt (\ s a -> s{_ndAlt = a}) + +instance GoogleRequest NotificationsDelete' where + type Rs NotificationsDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u NotificationsDelete{..} + = go _ndQuotaUser _ndPrettyPrint _ndUserIp + _ndCustomer + _ndKey + _ndNotificationId + _ndOauthToken + _ndFields + _ndAlt + where go + = clientWithRoute + (Proxy :: Proxy NotificationsDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Get.hs new file mode 100644 index 000000000..6e4994cea --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Notifications.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a notification. +-- +-- /See:/ for @DirectoryNotificationsGet@. +module Directory.Notifications.Get + ( + -- * REST Resource + NotificationsGetAPI + + -- * Creating a Request + , notificationsGet + , NotificationsGet + + -- * Request Lenses + , ngQuotaUser + , ngPrettyPrint + , ngUserIp + , ngCustomer + , ngKey + , ngNotificationId + , ngOauthToken + , ngFields + , ngAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryNotificationsGet@ which the +-- 'NotificationsGet' request conforms to. +type NotificationsGetAPI = + "customer" :> + Capture "customer" Text :> + "notifications" :> + Capture "notificationId" Text :> + Get '[JSON] Notification + +-- | Retrieves a notification. +-- +-- /See:/ 'notificationsGet' smart constructor. +data NotificationsGet = NotificationsGet + { _ngQuotaUser :: !(Maybe Text) + , _ngPrettyPrint :: !Bool + , _ngUserIp :: !(Maybe Text) + , _ngCustomer :: !Text + , _ngKey :: !(Maybe Text) + , _ngNotificationId :: !Text + , _ngOauthToken :: !(Maybe Text) + , _ngFields :: !(Maybe Text) + , _ngAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ngQuotaUser' +-- +-- * 'ngPrettyPrint' +-- +-- * 'ngUserIp' +-- +-- * 'ngCustomer' +-- +-- * 'ngKey' +-- +-- * 'ngNotificationId' +-- +-- * 'ngOauthToken' +-- +-- * 'ngFields' +-- +-- * 'ngAlt' +notificationsGet + :: Text -- ^ 'customer' + -> Text -- ^ 'notificationId' + -> NotificationsGet +notificationsGet pNgCustomer_ pNgNotificationId_ = + NotificationsGet + { _ngQuotaUser = Nothing + , _ngPrettyPrint = True + , _ngUserIp = Nothing + , _ngCustomer = pNgCustomer_ + , _ngKey = Nothing + , _ngNotificationId = pNgNotificationId_ + , _ngOauthToken = Nothing + , _ngFields = Nothing + , _ngAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ngQuotaUser :: Lens' NotificationsGet' (Maybe Text) +ngQuotaUser + = lens _ngQuotaUser (\ s a -> s{_ngQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ngPrettyPrint :: Lens' NotificationsGet' Bool +ngPrettyPrint + = lens _ngPrettyPrint + (\ s a -> s{_ngPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ngUserIp :: Lens' NotificationsGet' (Maybe Text) +ngUserIp = lens _ngUserIp (\ s a -> s{_ngUserIp = a}) + +-- | The unique ID for the customer\'s Google account. The customerId is also +-- returned as part of the Users resource. +ngCustomer :: Lens' NotificationsGet' Text +ngCustomer + = lens _ngCustomer (\ s a -> s{_ngCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ngKey :: Lens' NotificationsGet' (Maybe Text) +ngKey = lens _ngKey (\ s a -> s{_ngKey = a}) + +-- | The unique ID of the notification. +ngNotificationId :: Lens' NotificationsGet' Text +ngNotificationId + = lens _ngNotificationId + (\ s a -> s{_ngNotificationId = a}) + +-- | OAuth 2.0 token for the current user. +ngOauthToken :: Lens' NotificationsGet' (Maybe Text) +ngOauthToken + = lens _ngOauthToken (\ s a -> s{_ngOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ngFields :: Lens' NotificationsGet' (Maybe Text) +ngFields = lens _ngFields (\ s a -> s{_ngFields = a}) + +-- | Data format for the response. +ngAlt :: Lens' NotificationsGet' Text +ngAlt = lens _ngAlt (\ s a -> s{_ngAlt = a}) + +instance GoogleRequest NotificationsGet' where + type Rs NotificationsGet' = Notification + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u NotificationsGet{..} + = go _ngQuotaUser _ngPrettyPrint _ngUserIp + _ngCustomer + _ngKey + _ngNotificationId + _ngOauthToken + _ngFields + _ngAlt + where go + = clientWithRoute + (Proxy :: Proxy NotificationsGetAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/List.hs new file mode 100644 index 000000000..86e393646 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/List.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Notifications.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of notifications. +-- +-- /See:/ for @DirectoryNotificationsList@. +module Directory.Notifications.List + ( + -- * REST Resource + NotificationsListAPI + + -- * Creating a Request + , notificationsList + , NotificationsList + + -- * Request Lenses + , nlQuotaUser + , nlPrettyPrint + , nlUserIp + , nlCustomer + , nlKey + , nlLanguage + , nlPageToken + , nlOauthToken + , nlMaxResults + , nlFields + , nlAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryNotificationsList@ which the +-- 'NotificationsList' request conforms to. +type NotificationsListAPI = + "customer" :> + Capture "customer" Text :> + "notifications" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Notifications + +-- | Retrieves a list of notifications. +-- +-- /See:/ 'notificationsList' smart constructor. +data NotificationsList = NotificationsList + { _nlQuotaUser :: !(Maybe Text) + , _nlPrettyPrint :: !Bool + , _nlUserIp :: !(Maybe Text) + , _nlCustomer :: !Text + , _nlKey :: !(Maybe Text) + , _nlLanguage :: !(Maybe Text) + , _nlPageToken :: !(Maybe Text) + , _nlOauthToken :: !(Maybe Text) + , _nlMaxResults :: !(Maybe Word32) + , _nlFields :: !(Maybe Text) + , _nlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nlQuotaUser' +-- +-- * 'nlPrettyPrint' +-- +-- * 'nlUserIp' +-- +-- * 'nlCustomer' +-- +-- * 'nlKey' +-- +-- * 'nlLanguage' +-- +-- * 'nlPageToken' +-- +-- * 'nlOauthToken' +-- +-- * 'nlMaxResults' +-- +-- * 'nlFields' +-- +-- * 'nlAlt' +notificationsList + :: Text -- ^ 'customer' + -> NotificationsList +notificationsList pNlCustomer_ = + NotificationsList + { _nlQuotaUser = Nothing + , _nlPrettyPrint = True + , _nlUserIp = Nothing + , _nlCustomer = pNlCustomer_ + , _nlKey = Nothing + , _nlLanguage = Nothing + , _nlPageToken = Nothing + , _nlOauthToken = Nothing + , _nlMaxResults = Nothing + , _nlFields = Nothing + , _nlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +nlQuotaUser :: Lens' NotificationsList' (Maybe Text) +nlQuotaUser + = lens _nlQuotaUser (\ s a -> s{_nlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nlPrettyPrint :: Lens' NotificationsList' Bool +nlPrettyPrint + = lens _nlPrettyPrint + (\ s a -> s{_nlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +nlUserIp :: Lens' NotificationsList' (Maybe Text) +nlUserIp = lens _nlUserIp (\ s a -> s{_nlUserIp = a}) + +-- | The unique ID for the customer\'s Google account. +nlCustomer :: Lens' NotificationsList' Text +nlCustomer + = lens _nlCustomer (\ s a -> s{_nlCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nlKey :: Lens' NotificationsList' (Maybe Text) +nlKey = lens _nlKey (\ s a -> s{_nlKey = a}) + +-- | The ISO 639-1 code of the language notifications are returned in. The +-- default is English (en). +nlLanguage :: Lens' NotificationsList' (Maybe Text) +nlLanguage + = lens _nlLanguage (\ s a -> s{_nlLanguage = a}) + +-- | The token to specify the page of results to retrieve. +nlPageToken :: Lens' NotificationsList' (Maybe Text) +nlPageToken + = lens _nlPageToken (\ s a -> s{_nlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +nlOauthToken :: Lens' NotificationsList' (Maybe Text) +nlOauthToken + = lens _nlOauthToken (\ s a -> s{_nlOauthToken = a}) + +-- | Maximum number of notifications to return per page. The default is 100. +nlMaxResults :: Lens' NotificationsList' (Maybe Word32) +nlMaxResults + = lens _nlMaxResults (\ s a -> s{_nlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +nlFields :: Lens' NotificationsList' (Maybe Text) +nlFields = lens _nlFields (\ s a -> s{_nlFields = a}) + +-- | Data format for the response. +nlAlt :: Lens' NotificationsList' Text +nlAlt = lens _nlAlt (\ s a -> s{_nlAlt = a}) + +instance GoogleRequest NotificationsList' where + type Rs NotificationsList' = Notifications + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u NotificationsList{..} + = go _nlQuotaUser _nlPrettyPrint _nlUserIp + _nlCustomer + _nlKey + _nlLanguage + _nlPageToken + _nlOauthToken + _nlMaxResults + _nlFields + _nlAlt + where go + = clientWithRoute + (Proxy :: Proxy NotificationsListAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Patch.hs new file mode 100644 index 000000000..e1f527cfa --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Patch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Notifications.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a notification. This method supports patch semantics. +-- +-- /See:/ for @DirectoryNotificationsPatch@. +module Directory.Notifications.Patch + ( + -- * REST Resource + NotificationsPatchAPI + + -- * Creating a Request + , notificationsPatch + , NotificationsPatch + + -- * Request Lenses + , npQuotaUser + , npPrettyPrint + , npUserIp + , npCustomer + , npKey + , npNotificationId + , npOauthToken + , npFields + , npAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryNotificationsPatch@ which the +-- 'NotificationsPatch' request conforms to. +type NotificationsPatchAPI = + "customer" :> + Capture "customer" Text :> + "notifications" :> + Capture "notificationId" Text :> + Patch '[JSON] Notification + +-- | Updates a notification. This method supports patch semantics. +-- +-- /See:/ 'notificationsPatch' smart constructor. +data NotificationsPatch = NotificationsPatch + { _npQuotaUser :: !(Maybe Text) + , _npPrettyPrint :: !Bool + , _npUserIp :: !(Maybe Text) + , _npCustomer :: !Text + , _npKey :: !(Maybe Text) + , _npNotificationId :: !Text + , _npOauthToken :: !(Maybe Text) + , _npFields :: !(Maybe Text) + , _npAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'npQuotaUser' +-- +-- * 'npPrettyPrint' +-- +-- * 'npUserIp' +-- +-- * 'npCustomer' +-- +-- * 'npKey' +-- +-- * 'npNotificationId' +-- +-- * 'npOauthToken' +-- +-- * 'npFields' +-- +-- * 'npAlt' +notificationsPatch + :: Text -- ^ 'customer' + -> Text -- ^ 'notificationId' + -> NotificationsPatch +notificationsPatch pNpCustomer_ pNpNotificationId_ = + NotificationsPatch + { _npQuotaUser = Nothing + , _npPrettyPrint = True + , _npUserIp = Nothing + , _npCustomer = pNpCustomer_ + , _npKey = Nothing + , _npNotificationId = pNpNotificationId_ + , _npOauthToken = Nothing + , _npFields = Nothing + , _npAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +npQuotaUser :: Lens' NotificationsPatch' (Maybe Text) +npQuotaUser + = lens _npQuotaUser (\ s a -> s{_npQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +npPrettyPrint :: Lens' NotificationsPatch' Bool +npPrettyPrint + = lens _npPrettyPrint + (\ s a -> s{_npPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +npUserIp :: Lens' NotificationsPatch' (Maybe Text) +npUserIp = lens _npUserIp (\ s a -> s{_npUserIp = a}) + +-- | The unique ID for the customer\'s Google account. +npCustomer :: Lens' NotificationsPatch' Text +npCustomer + = lens _npCustomer (\ s a -> s{_npCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +npKey :: Lens' NotificationsPatch' (Maybe Text) +npKey = lens _npKey (\ s a -> s{_npKey = a}) + +-- | The unique ID of the notification. +npNotificationId :: Lens' NotificationsPatch' Text +npNotificationId + = lens _npNotificationId + (\ s a -> s{_npNotificationId = a}) + +-- | OAuth 2.0 token for the current user. +npOauthToken :: Lens' NotificationsPatch' (Maybe Text) +npOauthToken + = lens _npOauthToken (\ s a -> s{_npOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +npFields :: Lens' NotificationsPatch' (Maybe Text) +npFields = lens _npFields (\ s a -> s{_npFields = a}) + +-- | Data format for the response. +npAlt :: Lens' NotificationsPatch' Text +npAlt = lens _npAlt (\ s a -> s{_npAlt = a}) + +instance GoogleRequest NotificationsPatch' where + type Rs NotificationsPatch' = Notification + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u NotificationsPatch{..} + = go _npQuotaUser _npPrettyPrint _npUserIp + _npCustomer + _npKey + _npNotificationId + _npOauthToken + _npFields + _npAlt + where go + = clientWithRoute + (Proxy :: Proxy NotificationsPatchAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Update.hs new file mode 100644 index 000000000..cad33079e --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Notifications/Update.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Notifications.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a notification. +-- +-- /See:/ for @DirectoryNotificationsUpdate@. +module Directory.Notifications.Update + ( + -- * REST Resource + NotificationsUpdateAPI + + -- * Creating a Request + , notificationsUpdate + , NotificationsUpdate + + -- * Request Lenses + , nuQuotaUser + , nuPrettyPrint + , nuUserIp + , nuCustomer + , nuKey + , nuNotificationId + , nuOauthToken + , nuFields + , nuAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryNotificationsUpdate@ which the +-- 'NotificationsUpdate' request conforms to. +type NotificationsUpdateAPI = + "customer" :> + Capture "customer" Text :> + "notifications" :> + Capture "notificationId" Text :> + Put '[JSON] Notification + +-- | Updates a notification. +-- +-- /See:/ 'notificationsUpdate' smart constructor. +data NotificationsUpdate = NotificationsUpdate + { _nuQuotaUser :: !(Maybe Text) + , _nuPrettyPrint :: !Bool + , _nuUserIp :: !(Maybe Text) + , _nuCustomer :: !Text + , _nuKey :: !(Maybe Text) + , _nuNotificationId :: !Text + , _nuOauthToken :: !(Maybe Text) + , _nuFields :: !(Maybe Text) + , _nuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nuQuotaUser' +-- +-- * 'nuPrettyPrint' +-- +-- * 'nuUserIp' +-- +-- * 'nuCustomer' +-- +-- * 'nuKey' +-- +-- * 'nuNotificationId' +-- +-- * 'nuOauthToken' +-- +-- * 'nuFields' +-- +-- * 'nuAlt' +notificationsUpdate + :: Text -- ^ 'customer' + -> Text -- ^ 'notificationId' + -> NotificationsUpdate +notificationsUpdate pNuCustomer_ pNuNotificationId_ = + NotificationsUpdate + { _nuQuotaUser = Nothing + , _nuPrettyPrint = True + , _nuUserIp = Nothing + , _nuCustomer = pNuCustomer_ + , _nuKey = Nothing + , _nuNotificationId = pNuNotificationId_ + , _nuOauthToken = Nothing + , _nuFields = Nothing + , _nuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +nuQuotaUser :: Lens' NotificationsUpdate' (Maybe Text) +nuQuotaUser + = lens _nuQuotaUser (\ s a -> s{_nuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nuPrettyPrint :: Lens' NotificationsUpdate' Bool +nuPrettyPrint + = lens _nuPrettyPrint + (\ s a -> s{_nuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +nuUserIp :: Lens' NotificationsUpdate' (Maybe Text) +nuUserIp = lens _nuUserIp (\ s a -> s{_nuUserIp = a}) + +-- | The unique ID for the customer\'s Google account. +nuCustomer :: Lens' NotificationsUpdate' Text +nuCustomer + = lens _nuCustomer (\ s a -> s{_nuCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nuKey :: Lens' NotificationsUpdate' (Maybe Text) +nuKey = lens _nuKey (\ s a -> s{_nuKey = a}) + +-- | The unique ID of the notification. +nuNotificationId :: Lens' NotificationsUpdate' Text +nuNotificationId + = lens _nuNotificationId + (\ s a -> s{_nuNotificationId = a}) + +-- | OAuth 2.0 token for the current user. +nuOauthToken :: Lens' NotificationsUpdate' (Maybe Text) +nuOauthToken + = lens _nuOauthToken (\ s a -> s{_nuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +nuFields :: Lens' NotificationsUpdate' (Maybe Text) +nuFields = lens _nuFields (\ s a -> s{_nuFields = a}) + +-- | Data format for the response. +nuAlt :: Lens' NotificationsUpdate' Text +nuAlt = lens _nuAlt (\ s a -> s{_nuAlt = a}) + +instance GoogleRequest NotificationsUpdate' where + type Rs NotificationsUpdate' = Notification + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u NotificationsUpdate{..} + = go _nuQuotaUser _nuPrettyPrint _nuUserIp + _nuCustomer + _nuKey + _nuNotificationId + _nuOauthToken + _nuFields + _nuAlt + where go + = clientWithRoute + (Proxy :: Proxy NotificationsUpdateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Delete.hs new file mode 100644 index 000000000..fd69edafe --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Delete.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove Organization Unit +-- +-- /See:/ for @DirectoryOrgunitsDelete@. +module Directory.Orgunits.Delete + ( + -- * REST Resource + OrgunitsDeleteAPI + + -- * Creating a Request + , orgunitsDelete + , OrgunitsDelete + + -- * Request Lenses + , odQuotaUser + , odPrettyPrint + , odUserIp + , odOrgUnitPath + , odCustomerId + , odKey + , odOauthToken + , odFields + , odAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsDelete@ which the +-- 'OrgunitsDelete' request conforms to. +type OrgunitsDeleteAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits{" :> "orgUnitPath*}" :> Delete '[JSON] () + +-- | Remove Organization Unit +-- +-- /See:/ 'orgunitsDelete' smart constructor. +data OrgunitsDelete = OrgunitsDelete + { _odQuotaUser :: !(Maybe Text) + , _odPrettyPrint :: !Bool + , _odUserIp :: !(Maybe Text) + , _odOrgUnitPath :: !Text + , _odCustomerId :: !Text + , _odKey :: !(Maybe Text) + , _odOauthToken :: !(Maybe Text) + , _odFields :: !(Maybe Text) + , _odAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odQuotaUser' +-- +-- * 'odPrettyPrint' +-- +-- * 'odUserIp' +-- +-- * 'odOrgUnitPath' +-- +-- * 'odCustomerId' +-- +-- * 'odKey' +-- +-- * 'odOauthToken' +-- +-- * 'odFields' +-- +-- * 'odAlt' +orgunitsDelete + :: Text -- ^ 'orgUnitPath' + -> Text -- ^ 'customerId' + -> OrgunitsDelete +orgunitsDelete pOdOrgUnitPath_ pOdCustomerId_ = + OrgunitsDelete + { _odQuotaUser = Nothing + , _odPrettyPrint = True + , _odUserIp = Nothing + , _odOrgUnitPath = pOdOrgUnitPath_ + , _odCustomerId = pOdCustomerId_ + , _odKey = Nothing + , _odOauthToken = Nothing + , _odFields = Nothing + , _odAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +odQuotaUser :: Lens' OrgunitsDelete' (Maybe Text) +odQuotaUser + = lens _odQuotaUser (\ s a -> s{_odQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +odPrettyPrint :: Lens' OrgunitsDelete' Bool +odPrettyPrint + = lens _odPrettyPrint + (\ s a -> s{_odPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +odUserIp :: Lens' OrgunitsDelete' (Maybe Text) +odUserIp = lens _odUserIp (\ s a -> s{_odUserIp = a}) + +-- | Full path of the organization unit or its Id +odOrgUnitPath :: Lens' OrgunitsDelete' Text +odOrgUnitPath + = lens _odOrgUnitPath + (\ s a -> s{_odOrgUnitPath = a}) + +-- | Immutable id of the Google Apps account +odCustomerId :: Lens' OrgunitsDelete' Text +odCustomerId + = lens _odCustomerId (\ s a -> s{_odCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +odKey :: Lens' OrgunitsDelete' (Maybe Text) +odKey = lens _odKey (\ s a -> s{_odKey = a}) + +-- | OAuth 2.0 token for the current user. +odOauthToken :: Lens' OrgunitsDelete' (Maybe Text) +odOauthToken + = lens _odOauthToken (\ s a -> s{_odOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +odFields :: Lens' OrgunitsDelete' (Maybe Text) +odFields = lens _odFields (\ s a -> s{_odFields = a}) + +-- | Data format for the response. +odAlt :: Lens' OrgunitsDelete' Text +odAlt = lens _odAlt (\ s a -> s{_odAlt = a}) + +instance GoogleRequest OrgunitsDelete' where + type Rs OrgunitsDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsDelete{..} + = go _odQuotaUser _odPrettyPrint _odUserIp + _odOrgUnitPath + _odCustomerId + _odKey + _odOauthToken + _odFields + _odAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Get.hs new file mode 100644 index 000000000..6f6fc1d26 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve Organization Unit +-- +-- /See:/ for @DirectoryOrgunitsGet@. +module Directory.Orgunits.Get + ( + -- * REST Resource + OrgunitsGetAPI + + -- * Creating a Request + , orgunitsGet + , OrgunitsGet + + -- * Request Lenses + , ogQuotaUser + , ogPrettyPrint + , ogUserIp + , ogOrgUnitPath + , ogCustomerId + , ogKey + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsGet@ which the +-- 'OrgunitsGet' request conforms to. +type OrgunitsGetAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits{" :> "orgUnitPath*}" :> Get '[JSON] OrgUnit + +-- | Retrieve Organization Unit +-- +-- /See:/ 'orgunitsGet' smart constructor. +data OrgunitsGet = OrgunitsGet + { _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogUserIp :: !(Maybe Text) + , _ogOrgUnitPath :: !Text + , _ogCustomerId :: !Text + , _ogKey :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogUserIp' +-- +-- * 'ogOrgUnitPath' +-- +-- * 'ogCustomerId' +-- +-- * 'ogKey' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +orgunitsGet + :: Text -- ^ 'orgUnitPath' + -> Text -- ^ 'customerId' + -> OrgunitsGet +orgunitsGet pOgOrgUnitPath_ pOgCustomerId_ = + OrgunitsGet + { _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogUserIp = Nothing + , _ogOrgUnitPath = pOgOrgUnitPath_ + , _ogCustomerId = pOgCustomerId_ + , _ogKey = Nothing + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OrgunitsGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OrgunitsGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OrgunitsGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | Full path of the organization unit or its Id +ogOrgUnitPath :: Lens' OrgunitsGet' Text +ogOrgUnitPath + = lens _ogOrgUnitPath + (\ s a -> s{_ogOrgUnitPath = a}) + +-- | Immutable id of the Google Apps account +ogCustomerId :: Lens' OrgunitsGet' Text +ogCustomerId + = lens _ogCustomerId (\ s a -> s{_ogCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OrgunitsGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OrgunitsGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OrgunitsGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OrgunitsGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OrgunitsGet' where + type Rs OrgunitsGet' = OrgUnit + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsGet{..} + = go _ogQuotaUser _ogPrettyPrint _ogUserIp + _ogOrgUnitPath + _ogCustomerId + _ogKey + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Insert.hs new file mode 100644 index 000000000..642ad62d8 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add Organization Unit +-- +-- /See:/ for @DirectoryOrgunitsInsert@. +module Directory.Orgunits.Insert + ( + -- * REST Resource + OrgunitsInsertAPI + + -- * Creating a Request + , orgunitsInsert + , OrgunitsInsert + + -- * Request Lenses + , oiQuotaUser + , oiPrettyPrint + , oiUserIp + , oiCustomerId + , oiKey + , oiOauthToken + , oiFields + , oiAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsInsert@ which the +-- 'OrgunitsInsert' request conforms to. +type OrgunitsInsertAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits" :> Post '[JSON] OrgUnit + +-- | Add Organization Unit +-- +-- /See:/ 'orgunitsInsert' smart constructor. +data OrgunitsInsert = OrgunitsInsert + { _oiQuotaUser :: !(Maybe Text) + , _oiPrettyPrint :: !Bool + , _oiUserIp :: !(Maybe Text) + , _oiCustomerId :: !Text + , _oiKey :: !(Maybe Text) + , _oiOauthToken :: !(Maybe Text) + , _oiFields :: !(Maybe Text) + , _oiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oiQuotaUser' +-- +-- * 'oiPrettyPrint' +-- +-- * 'oiUserIp' +-- +-- * 'oiCustomerId' +-- +-- * 'oiKey' +-- +-- * 'oiOauthToken' +-- +-- * 'oiFields' +-- +-- * 'oiAlt' +orgunitsInsert + :: Text -- ^ 'customerId' + -> OrgunitsInsert +orgunitsInsert pOiCustomerId_ = + OrgunitsInsert + { _oiQuotaUser = Nothing + , _oiPrettyPrint = True + , _oiUserIp = Nothing + , _oiCustomerId = pOiCustomerId_ + , _oiKey = Nothing + , _oiOauthToken = Nothing + , _oiFields = Nothing + , _oiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oiQuotaUser :: Lens' OrgunitsInsert' (Maybe Text) +oiQuotaUser + = lens _oiQuotaUser (\ s a -> s{_oiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oiPrettyPrint :: Lens' OrgunitsInsert' Bool +oiPrettyPrint + = lens _oiPrettyPrint + (\ s a -> s{_oiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oiUserIp :: Lens' OrgunitsInsert' (Maybe Text) +oiUserIp = lens _oiUserIp (\ s a -> s{_oiUserIp = a}) + +-- | Immutable id of the Google Apps account +oiCustomerId :: Lens' OrgunitsInsert' Text +oiCustomerId + = lens _oiCustomerId (\ s a -> s{_oiCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oiKey :: Lens' OrgunitsInsert' (Maybe Text) +oiKey = lens _oiKey (\ s a -> s{_oiKey = a}) + +-- | OAuth 2.0 token for the current user. +oiOauthToken :: Lens' OrgunitsInsert' (Maybe Text) +oiOauthToken + = lens _oiOauthToken (\ s a -> s{_oiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oiFields :: Lens' OrgunitsInsert' (Maybe Text) +oiFields = lens _oiFields (\ s a -> s{_oiFields = a}) + +-- | Data format for the response. +oiAlt :: Lens' OrgunitsInsert' Text +oiAlt = lens _oiAlt (\ s a -> s{_oiAlt = a}) + +instance GoogleRequest OrgunitsInsert' where + type Rs OrgunitsInsert' = OrgUnit + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsInsert{..} + = go _oiQuotaUser _oiPrettyPrint _oiUserIp + _oiCustomerId + _oiKey + _oiOauthToken + _oiFields + _oiAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsInsertAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/List.hs new file mode 100644 index 000000000..b2a8a29a2 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/List.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all Organization Units +-- +-- /See:/ for @DirectoryOrgunitsList@. +module Directory.Orgunits.List + ( + -- * REST Resource + OrgunitsListAPI + + -- * Creating a Request + , orgunitsList + , OrgunitsList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olUserIp + , olOrgUnitPath + , olCustomerId + , olKey + , olType + , olOauthToken + , olFields + , olAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsList@ which the +-- 'OrgunitsList' request conforms to. +type OrgunitsListAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits" :> + QueryParam "orgUnitPath" Text :> + QueryParam "type" Text :> Get '[JSON] OrgUnits + +-- | Retrieve all Organization Units +-- +-- /See:/ 'orgunitsList' smart constructor. +data OrgunitsList = OrgunitsList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olUserIp :: !(Maybe Text) + , _olOrgUnitPath :: !Text + , _olCustomerId :: !Text + , _olKey :: !(Maybe Text) + , _olType :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olUserIp' +-- +-- * 'olOrgUnitPath' +-- +-- * 'olCustomerId' +-- +-- * 'olKey' +-- +-- * 'olType' +-- +-- * 'olOauthToken' +-- +-- * 'olFields' +-- +-- * 'olAlt' +orgunitsList + :: Text -- ^ 'customerId' + -> OrgunitsList +orgunitsList pOlCustomerId_ = + OrgunitsList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olUserIp = Nothing + , _olOrgUnitPath = "" + , _olCustomerId = pOlCustomerId_ + , _olKey = Nothing + , _olType = Nothing + , _olOauthToken = Nothing + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OrgunitsList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OrgunitsList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OrgunitsList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | the URL-encoded organization unit\'s path or its Id +olOrgUnitPath :: Lens' OrgunitsList' Text +olOrgUnitPath + = lens _olOrgUnitPath + (\ s a -> s{_olOrgUnitPath = a}) + +-- | Immutable id of the Google Apps account +olCustomerId :: Lens' OrgunitsList' Text +olCustomerId + = lens _olCustomerId (\ s a -> s{_olCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OrgunitsList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | Whether to return all sub-organizations or just immediate children +olType :: Lens' OrgunitsList' (Maybe Text) +olType = lens _olType (\ s a -> s{_olType = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OrgunitsList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OrgunitsList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OrgunitsList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OrgunitsList' where + type Rs OrgunitsList' = OrgUnits + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsList{..} + = go _olQuotaUser _olPrettyPrint _olUserIp + (Just _olOrgUnitPath) + _olCustomerId + _olKey + _olType + _olOauthToken + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsListAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Patch.hs new file mode 100644 index 000000000..d06026088 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Patch.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Organization Unit. This method supports patch semantics. +-- +-- /See:/ for @DirectoryOrgunitsPatch@. +module Directory.Orgunits.Patch + ( + -- * REST Resource + OrgunitsPatchAPI + + -- * Creating a Request + , orgunitsPatch + , OrgunitsPatch + + -- * Request Lenses + , opQuotaUser + , opPrettyPrint + , opUserIp + , opOrgUnitPath + , opCustomerId + , opKey + , opOauthToken + , opFields + , opAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsPatch@ which the +-- 'OrgunitsPatch' request conforms to. +type OrgunitsPatchAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits{" :> + "orgUnitPath*}" :> Patch '[JSON] OrgUnit + +-- | Update Organization Unit. This method supports patch semantics. +-- +-- /See:/ 'orgunitsPatch' smart constructor. +data OrgunitsPatch = OrgunitsPatch + { _opQuotaUser :: !(Maybe Text) + , _opPrettyPrint :: !Bool + , _opUserIp :: !(Maybe Text) + , _opOrgUnitPath :: !Text + , _opCustomerId :: !Text + , _opKey :: !(Maybe Text) + , _opOauthToken :: !(Maybe Text) + , _opFields :: !(Maybe Text) + , _opAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opQuotaUser' +-- +-- * 'opPrettyPrint' +-- +-- * 'opUserIp' +-- +-- * 'opOrgUnitPath' +-- +-- * 'opCustomerId' +-- +-- * 'opKey' +-- +-- * 'opOauthToken' +-- +-- * 'opFields' +-- +-- * 'opAlt' +orgunitsPatch + :: Text -- ^ 'orgUnitPath' + -> Text -- ^ 'customerId' + -> OrgunitsPatch +orgunitsPatch pOpOrgUnitPath_ pOpCustomerId_ = + OrgunitsPatch + { _opQuotaUser = Nothing + , _opPrettyPrint = True + , _opUserIp = Nothing + , _opOrgUnitPath = pOpOrgUnitPath_ + , _opCustomerId = pOpCustomerId_ + , _opKey = Nothing + , _opOauthToken = Nothing + , _opFields = Nothing + , _opAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +opQuotaUser :: Lens' OrgunitsPatch' (Maybe Text) +opQuotaUser + = lens _opQuotaUser (\ s a -> s{_opQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +opPrettyPrint :: Lens' OrgunitsPatch' Bool +opPrettyPrint + = lens _opPrettyPrint + (\ s a -> s{_opPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +opUserIp :: Lens' OrgunitsPatch' (Maybe Text) +opUserIp = lens _opUserIp (\ s a -> s{_opUserIp = a}) + +-- | Full path of the organization unit or its Id +opOrgUnitPath :: Lens' OrgunitsPatch' Text +opOrgUnitPath + = lens _opOrgUnitPath + (\ s a -> s{_opOrgUnitPath = a}) + +-- | Immutable id of the Google Apps account +opCustomerId :: Lens' OrgunitsPatch' Text +opCustomerId + = lens _opCustomerId (\ s a -> s{_opCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +opKey :: Lens' OrgunitsPatch' (Maybe Text) +opKey = lens _opKey (\ s a -> s{_opKey = a}) + +-- | OAuth 2.0 token for the current user. +opOauthToken :: Lens' OrgunitsPatch' (Maybe Text) +opOauthToken + = lens _opOauthToken (\ s a -> s{_opOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +opFields :: Lens' OrgunitsPatch' (Maybe Text) +opFields = lens _opFields (\ s a -> s{_opFields = a}) + +-- | Data format for the response. +opAlt :: Lens' OrgunitsPatch' Text +opAlt = lens _opAlt (\ s a -> s{_opAlt = a}) + +instance GoogleRequest OrgunitsPatch' where + type Rs OrgunitsPatch' = OrgUnit + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsPatch{..} + = go _opQuotaUser _opPrettyPrint _opUserIp + _opOrgUnitPath + _opCustomerId + _opKey + _opOauthToken + _opFields + _opAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsPatchAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Update.hs new file mode 100644 index 000000000..a99c910df --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Orgunits/Update.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Orgunits.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update Organization Unit +-- +-- /See:/ for @DirectoryOrgunitsUpdate@. +module Directory.Orgunits.Update + ( + -- * REST Resource + OrgunitsUpdateAPI + + -- * Creating a Request + , orgunitsUpdate + , OrgunitsUpdate + + -- * Request Lenses + , oQuotaUser + , oPrettyPrint + , oUserIp + , oOrgUnitPath + , oCustomerId + , oKey + , oOauthToken + , oFields + , oAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryOrgunitsUpdate@ which the +-- 'OrgunitsUpdate' request conforms to. +type OrgunitsUpdateAPI = + "customer" :> + Capture "customerId" Text :> + "orgunits{" :> "orgUnitPath*}" :> Put '[JSON] OrgUnit + +-- | Update Organization Unit +-- +-- /See:/ 'orgunitsUpdate' smart constructor. +data OrgunitsUpdate = OrgunitsUpdate + { _oQuotaUser :: !(Maybe Text) + , _oPrettyPrint :: !Bool + , _oUserIp :: !(Maybe Text) + , _oOrgUnitPath :: !Text + , _oCustomerId :: !Text + , _oKey :: !(Maybe Text) + , _oOauthToken :: !(Maybe Text) + , _oFields :: !(Maybe Text) + , _oAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrgunitsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oQuotaUser' +-- +-- * 'oPrettyPrint' +-- +-- * 'oUserIp' +-- +-- * 'oOrgUnitPath' +-- +-- * 'oCustomerId' +-- +-- * 'oKey' +-- +-- * 'oOauthToken' +-- +-- * 'oFields' +-- +-- * 'oAlt' +orgunitsUpdate + :: Text -- ^ 'orgUnitPath' + -> Text -- ^ 'customerId' + -> OrgunitsUpdate +orgunitsUpdate pOOrgUnitPath_ pOCustomerId_ = + OrgunitsUpdate + { _oQuotaUser = Nothing + , _oPrettyPrint = True + , _oUserIp = Nothing + , _oOrgUnitPath = pOOrgUnitPath_ + , _oCustomerId = pOCustomerId_ + , _oKey = Nothing + , _oOauthToken = Nothing + , _oFields = Nothing + , _oAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oQuotaUser :: Lens' OrgunitsUpdate' (Maybe Text) +oQuotaUser + = lens _oQuotaUser (\ s a -> s{_oQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oPrettyPrint :: Lens' OrgunitsUpdate' Bool +oPrettyPrint + = lens _oPrettyPrint (\ s a -> s{_oPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oUserIp :: Lens' OrgunitsUpdate' (Maybe Text) +oUserIp = lens _oUserIp (\ s a -> s{_oUserIp = a}) + +-- | Full path of the organization unit or its Id +oOrgUnitPath :: Lens' OrgunitsUpdate' Text +oOrgUnitPath + = lens _oOrgUnitPath (\ s a -> s{_oOrgUnitPath = a}) + +-- | Immutable id of the Google Apps account +oCustomerId :: Lens' OrgunitsUpdate' Text +oCustomerId + = lens _oCustomerId (\ s a -> s{_oCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oKey :: Lens' OrgunitsUpdate' (Maybe Text) +oKey = lens _oKey (\ s a -> s{_oKey = a}) + +-- | OAuth 2.0 token for the current user. +oOauthToken :: Lens' OrgunitsUpdate' (Maybe Text) +oOauthToken + = lens _oOauthToken (\ s a -> s{_oOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oFields :: Lens' OrgunitsUpdate' (Maybe Text) +oFields = lens _oFields (\ s a -> s{_oFields = a}) + +-- | Data format for the response. +oAlt :: Lens' OrgunitsUpdate' Text +oAlt = lens _oAlt (\ s a -> s{_oAlt = a}) + +instance GoogleRequest OrgunitsUpdate' where + type Rs OrgunitsUpdate' = OrgUnit + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u OrgunitsUpdate{..} + = go _oQuotaUser _oPrettyPrint _oUserIp _oOrgUnitPath + _oCustomerId + _oKey + _oOauthToken + _oFields + _oAlt + where go + = clientWithRoute (Proxy :: Proxy OrgunitsUpdateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Delete.hs new file mode 100644 index 000000000..74cf83cd7 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete schema +-- +-- /See:/ for @DirectorySchemasDelete@. +module Directory.Schemas.Delete + ( + -- * REST Resource + SchemasDeleteAPI + + -- * Creating a Request + , schemasDelete + , SchemasDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdCustomerId + , sdKey + , sdOauthToken + , sdSchemaKey + , sdFields + , sdAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasDelete@ which the +-- 'SchemasDelete' request conforms to. +type SchemasDeleteAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> + Capture "schemaKey" Text :> Delete '[JSON] () + +-- | Delete schema +-- +-- /See:/ 'schemasDelete' smart constructor. +data SchemasDelete = SchemasDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdCustomerId :: !Text + , _sdKey :: !(Maybe Text) + , _sdOauthToken :: !(Maybe Text) + , _sdSchemaKey :: !Text + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdCustomerId' +-- +-- * 'sdKey' +-- +-- * 'sdOauthToken' +-- +-- * 'sdSchemaKey' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +schemasDelete + :: Text -- ^ 'customerId' + -> Text -- ^ 'schemaKey' + -> SchemasDelete +schemasDelete pSdCustomerId_ pSdSchemaKey_ = + SchemasDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdCustomerId = pSdCustomerId_ + , _sdKey = Nothing + , _sdOauthToken = Nothing + , _sdSchemaKey = pSdSchemaKey_ + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SchemasDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SchemasDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SchemasDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | Immutable id of the Google Apps account +sdCustomerId :: Lens' SchemasDelete' Text +sdCustomerId + = lens _sdCustomerId (\ s a -> s{_sdCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SchemasDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SchemasDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Name or immutable Id of the schema +sdSchemaKey :: Lens' SchemasDelete' Text +sdSchemaKey + = lens _sdSchemaKey (\ s a -> s{_sdSchemaKey = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SchemasDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SchemasDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SchemasDelete' where + type Rs SchemasDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp + _sdCustomerId + _sdKey + _sdOauthToken + _sdSchemaKey + _sdFields + _sdAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasDeleteAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Get.hs new file mode 100644 index 000000000..12e0ae1f3 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve schema +-- +-- /See:/ for @DirectorySchemasGet@. +module Directory.Schemas.Get + ( + -- * REST Resource + SchemasGetAPI + + -- * Creating a Request + , schemasGet + , SchemasGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgCustomerId + , sgKey + , sgOauthToken + , sgSchemaKey + , sgFields + , sgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasGet@ which the +-- 'SchemasGet' request conforms to. +type SchemasGetAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> + Capture "schemaKey" Text :> Get '[JSON] Schema + +-- | Retrieve schema +-- +-- /See:/ 'schemasGet' smart constructor. +data SchemasGet = SchemasGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgCustomerId :: !Text + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgSchemaKey :: !Text + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgCustomerId' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgSchemaKey' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +schemasGet + :: Text -- ^ 'customerId' + -> Text -- ^ 'schemaKey' + -> SchemasGet +schemasGet pSgCustomerId_ pSgSchemaKey_ = + SchemasGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgCustomerId = pSgCustomerId_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgSchemaKey = pSgSchemaKey_ + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SchemasGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SchemasGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SchemasGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | Immutable id of the Google Apps account +sgCustomerId :: Lens' SchemasGet' Text +sgCustomerId + = lens _sgCustomerId (\ s a -> s{_sgCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SchemasGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SchemasGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Name or immutable Id of the schema +sgSchemaKey :: Lens' SchemasGet' Text +sgSchemaKey + = lens _sgSchemaKey (\ s a -> s{_sgSchemaKey = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SchemasGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SchemasGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SchemasGet' where + type Rs SchemasGet' = Schema + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp + _sgCustomerId + _sgKey + _sgOauthToken + _sgSchemaKey + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Insert.hs new file mode 100644 index 000000000..5d9211e45 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create schema. +-- +-- /See:/ for @DirectorySchemasInsert@. +module Directory.Schemas.Insert + ( + -- * REST Resource + SchemasInsertAPI + + -- * Creating a Request + , schemasInsert + , SchemasInsert + + -- * Request Lenses + , siQuotaUser + , siPrettyPrint + , siUserIp + , siCustomerId + , siKey + , siOauthToken + , siFields + , siAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasInsert@ which the +-- 'SchemasInsert' request conforms to. +type SchemasInsertAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> Post '[JSON] Schema + +-- | Create schema. +-- +-- /See:/ 'schemasInsert' smart constructor. +data SchemasInsert = SchemasInsert + { _siQuotaUser :: !(Maybe Text) + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siCustomerId :: !Text + , _siKey :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siCustomerId' +-- +-- * 'siKey' +-- +-- * 'siOauthToken' +-- +-- * 'siFields' +-- +-- * 'siAlt' +schemasInsert + :: Text -- ^ 'customerId' + -> SchemasInsert +schemasInsert pSiCustomerId_ = + SchemasInsert + { _siQuotaUser = Nothing + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siCustomerId = pSiCustomerId_ + , _siKey = Nothing + , _siOauthToken = Nothing + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' SchemasInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' SchemasInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' SchemasInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | Immutable id of the Google Apps account +siCustomerId :: Lens' SchemasInsert' Text +siCustomerId + = lens _siCustomerId (\ s a -> s{_siCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' SchemasInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' SchemasInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' SchemasInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' SchemasInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest SchemasInsert' where + type Rs SchemasInsert' = Schema + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasInsert{..} + = go _siQuotaUser _siPrettyPrint _siUserIp + _siCustomerId + _siKey + _siOauthToken + _siFields + _siAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasInsertAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/List.hs new file mode 100644 index 000000000..6cd21b9d3 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/List.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve all schemas for a customer +-- +-- /See:/ for @DirectorySchemasList@. +module Directory.Schemas.List + ( + -- * REST Resource + SchemasListAPI + + -- * Creating a Request + , schemasList + , SchemasList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slCustomerId + , slKey + , slOauthToken + , slFields + , slAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasList@ which the +-- 'SchemasList' request conforms to. +type SchemasListAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> Get '[JSON] Schemas + +-- | Retrieve all schemas for a customer +-- +-- /See:/ 'schemasList' smart constructor. +data SchemasList = SchemasList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slCustomerId :: !Text + , _slKey :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slCustomerId' +-- +-- * 'slKey' +-- +-- * 'slOauthToken' +-- +-- * 'slFields' +-- +-- * 'slAlt' +schemasList + :: Text -- ^ 'customerId' + -> SchemasList +schemasList pSlCustomerId_ = + SchemasList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slCustomerId = pSlCustomerId_ + , _slKey = Nothing + , _slOauthToken = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SchemasList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SchemasList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SchemasList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | Immutable id of the Google Apps account +slCustomerId :: Lens' SchemasList' Text +slCustomerId + = lens _slCustomerId (\ s a -> s{_slCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SchemasList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SchemasList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SchemasList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SchemasList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SchemasList' where + type Rs SchemasList' = Schemas + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp + _slCustomerId + _slKey + _slOauthToken + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Patch.hs new file mode 100644 index 000000000..e220590ef --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update schema. This method supports patch semantics. +-- +-- /See:/ for @DirectorySchemasPatch@. +module Directory.Schemas.Patch + ( + -- * REST Resource + SchemasPatchAPI + + -- * Creating a Request + , schemasPatch + , SchemasPatch + + -- * Request Lenses + , spQuotaUser + , spPrettyPrint + , spUserIp + , spCustomerId + , spKey + , spOauthToken + , spSchemaKey + , spFields + , spAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasPatch@ which the +-- 'SchemasPatch' request conforms to. +type SchemasPatchAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> + Capture "schemaKey" Text :> Patch '[JSON] Schema + +-- | Update schema. This method supports patch semantics. +-- +-- /See:/ 'schemasPatch' smart constructor. +data SchemasPatch = SchemasPatch + { _spQuotaUser :: !(Maybe Text) + , _spPrettyPrint :: !Bool + , _spUserIp :: !(Maybe Text) + , _spCustomerId :: !Text + , _spKey :: !(Maybe Text) + , _spOauthToken :: !(Maybe Text) + , _spSchemaKey :: !Text + , _spFields :: !(Maybe Text) + , _spAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spQuotaUser' +-- +-- * 'spPrettyPrint' +-- +-- * 'spUserIp' +-- +-- * 'spCustomerId' +-- +-- * 'spKey' +-- +-- * 'spOauthToken' +-- +-- * 'spSchemaKey' +-- +-- * 'spFields' +-- +-- * 'spAlt' +schemasPatch + :: Text -- ^ 'customerId' + -> Text -- ^ 'schemaKey' + -> SchemasPatch +schemasPatch pSpCustomerId_ pSpSchemaKey_ = + SchemasPatch + { _spQuotaUser = Nothing + , _spPrettyPrint = True + , _spUserIp = Nothing + , _spCustomerId = pSpCustomerId_ + , _spKey = Nothing + , _spOauthToken = Nothing + , _spSchemaKey = pSpSchemaKey_ + , _spFields = Nothing + , _spAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +spQuotaUser :: Lens' SchemasPatch' (Maybe Text) +spQuotaUser + = lens _spQuotaUser (\ s a -> s{_spQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +spPrettyPrint :: Lens' SchemasPatch' Bool +spPrettyPrint + = lens _spPrettyPrint + (\ s a -> s{_spPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +spUserIp :: Lens' SchemasPatch' (Maybe Text) +spUserIp = lens _spUserIp (\ s a -> s{_spUserIp = a}) + +-- | Immutable id of the Google Apps account +spCustomerId :: Lens' SchemasPatch' Text +spCustomerId + = lens _spCustomerId (\ s a -> s{_spCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +spKey :: Lens' SchemasPatch' (Maybe Text) +spKey = lens _spKey (\ s a -> s{_spKey = a}) + +-- | OAuth 2.0 token for the current user. +spOauthToken :: Lens' SchemasPatch' (Maybe Text) +spOauthToken + = lens _spOauthToken (\ s a -> s{_spOauthToken = a}) + +-- | Name or immutable Id of the schema. +spSchemaKey :: Lens' SchemasPatch' Text +spSchemaKey + = lens _spSchemaKey (\ s a -> s{_spSchemaKey = a}) + +-- | Selector specifying which fields to include in a partial response. +spFields :: Lens' SchemasPatch' (Maybe Text) +spFields = lens _spFields (\ s a -> s{_spFields = a}) + +-- | Data format for the response. +spAlt :: Lens' SchemasPatch' Text +spAlt = lens _spAlt (\ s a -> s{_spAlt = a}) + +instance GoogleRequest SchemasPatch' where + type Rs SchemasPatch' = Schema + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasPatch{..} + = go _spQuotaUser _spPrettyPrint _spUserIp + _spCustomerId + _spKey + _spOauthToken + _spSchemaKey + _spFields + _spAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasPatchAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Update.hs new file mode 100644 index 000000000..c13c7d1e3 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Update.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Schemas.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update schema +-- +-- /See:/ for @DirectorySchemasUpdate@. +module Directory.Schemas.Update + ( + -- * REST Resource + SchemasUpdateAPI + + -- * Creating a Request + , schemasUpdate + , SchemasUpdate + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suUserIp + , suCustomerId + , suKey + , suOauthToken + , suSchemaKey + , suFields + , suAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectorySchemasUpdate@ which the +-- 'SchemasUpdate' request conforms to. +type SchemasUpdateAPI = + "customer" :> + Capture "customerId" Text :> + "schemas" :> + Capture "schemaKey" Text :> Put '[JSON] Schema + +-- | Update schema +-- +-- /See:/ 'schemasUpdate' smart constructor. +data SchemasUpdate = SchemasUpdate + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suCustomerId :: !Text + , _suKey :: !(Maybe Text) + , _suOauthToken :: !(Maybe Text) + , _suSchemaKey :: !Text + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchemasUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suCustomerId' +-- +-- * 'suKey' +-- +-- * 'suOauthToken' +-- +-- * 'suSchemaKey' +-- +-- * 'suFields' +-- +-- * 'suAlt' +schemasUpdate + :: Text -- ^ 'customerId' + -> Text -- ^ 'schemaKey' + -> SchemasUpdate +schemasUpdate pSuCustomerId_ pSuSchemaKey_ = + SchemasUpdate + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suCustomerId = pSuCustomerId_ + , _suKey = Nothing + , _suOauthToken = Nothing + , _suSchemaKey = pSuSchemaKey_ + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' SchemasUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' SchemasUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' SchemasUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | Immutable id of the Google Apps account +suCustomerId :: Lens' SchemasUpdate' Text +suCustomerId + = lens _suCustomerId (\ s a -> s{_suCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' SchemasUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' SchemasUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Name or immutable Id of the schema. +suSchemaKey :: Lens' SchemasUpdate' Text +suSchemaKey + = lens _suSchemaKey (\ s a -> s{_suSchemaKey = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' SchemasUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' SchemasUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest SchemasUpdate' where + type Rs SchemasUpdate' = Schema + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u SchemasUpdate{..} + = go _suQuotaUser _suPrettyPrint _suUserIp + _suCustomerId + _suKey + _suOauthToken + _suSchemaKey + _suFields + _suAlt + where go + = clientWithRoute (Proxy :: Proxy SchemasUpdateAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs new file mode 100644 index 000000000..487f4df97 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Tokens.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete all access tokens issued by a user for an application. +-- +-- /See:/ for @DirectoryTokensDelete@. +module Directory.Tokens.Delete + ( + -- * REST Resource + TokensDeleteAPI + + -- * Creating a Request + , tokensDelete + , TokensDelete + + -- * Request Lenses + , tdClientId + , tdQuotaUser + , tdPrettyPrint + , tdUserIp + , tdKey + , tdOauthToken + , tdUserKey + , tdFields + , tdAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryTokensDelete@ which the +-- 'TokensDelete' request conforms to. +type TokensDeleteAPI = + "users" :> + Capture "userKey" Text :> + "tokens" :> + Capture "clientId" Text :> Delete '[JSON] () + +-- | Delete all access tokens issued by a user for an application. +-- +-- /See:/ 'tokensDelete' smart constructor. +data TokensDelete = TokensDelete + { _tdClientId :: !Text + , _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdOauthToken :: !(Maybe Text) + , _tdUserKey :: !Text + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokensDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdClientId' +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdOauthToken' +-- +-- * 'tdUserKey' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +tokensDelete + :: Text -- ^ 'clientId' + -> Text -- ^ 'userKey' + -> TokensDelete +tokensDelete pTdClientId_ pTdUserKey_ = + TokensDelete + { _tdClientId = pTdClientId_ + , _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdOauthToken = Nothing + , _tdUserKey = pTdUserKey_ + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | The Client ID of the application the token is issued to. +tdClientId :: Lens' TokensDelete' Text +tdClientId + = lens _tdClientId (\ s a -> s{_tdClientId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TokensDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TokensDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TokensDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TokensDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TokensDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +tdUserKey :: Lens' TokensDelete' Text +tdUserKey + = lens _tdUserKey (\ s a -> s{_tdUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TokensDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TokensDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TokensDelete' where + type Rs TokensDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u TokensDelete{..} + = go _tdClientId _tdQuotaUser _tdPrettyPrint + _tdUserIp + _tdKey + _tdOauthToken + _tdUserKey + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TokensDeleteAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Get.hs new file mode 100644 index 000000000..0693621b0 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Tokens.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about an access token issued by a user. +-- +-- /See:/ for @DirectoryTokensGet@. +module Directory.Tokens.Get + ( + -- * REST Resource + TokensGetAPI + + -- * Creating a Request + , tokensGet + , TokensGet + + -- * Request Lenses + , tgClientId + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgOauthToken + , tgUserKey + , tgFields + , tgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryTokensGet@ which the +-- 'TokensGet' request conforms to. +type TokensGetAPI = + "users" :> + Capture "userKey" Text :> + "tokens" :> + Capture "clientId" Text :> Get '[JSON] Token + +-- | Get information about an access token issued by a user. +-- +-- /See:/ 'tokensGet' smart constructor. +data TokensGet = TokensGet + { _tgClientId :: !Text + , _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgOauthToken :: !(Maybe Text) + , _tgUserKey :: !Text + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokensGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgClientId' +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgOauthToken' +-- +-- * 'tgUserKey' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +tokensGet + :: Text -- ^ 'clientId' + -> Text -- ^ 'userKey' + -> TokensGet +tokensGet pTgClientId_ pTgUserKey_ = + TokensGet + { _tgClientId = pTgClientId_ + , _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgOauthToken = Nothing + , _tgUserKey = pTgUserKey_ + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | The Client ID of the application the token is issued to. +tgClientId :: Lens' TokensGet' Text +tgClientId + = lens _tgClientId (\ s a -> s{_tgClientId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TokensGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TokensGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TokensGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TokensGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TokensGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +tgUserKey :: Lens' TokensGet' Text +tgUserKey + = lens _tgUserKey (\ s a -> s{_tgUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TokensGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TokensGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TokensGet' where + type Rs TokensGet' = Token + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u TokensGet{..} + = go _tgClientId _tgQuotaUser _tgPrettyPrint + _tgUserIp + _tgKey + _tgOauthToken + _tgUserKey + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TokensGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/List.hs new file mode 100644 index 000000000..49c1f0d88 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/List.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Tokens.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the set of tokens specified user has issued to 3rd party +-- applications. +-- +-- /See:/ for @DirectoryTokensList@. +module Directory.Tokens.List + ( + -- * REST Resource + TokensListAPI + + -- * Creating a Request + , tokensList + , TokensList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlKey + , tlOauthToken + , tlUserKey + , tlFields + , tlAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryTokensList@ which the +-- 'TokensList' request conforms to. +type TokensListAPI = + "users" :> + Capture "userKey" Text :> + "tokens" :> Get '[JSON] Tokens + +-- | Returns the set of tokens specified user has issued to 3rd party +-- applications. +-- +-- /See:/ 'tokensList' smart constructor. +data TokensList = TokensList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlUserKey :: !Text + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokensList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlOauthToken' +-- +-- * 'tlUserKey' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +tokensList + :: Text -- ^ 'userKey' + -> TokensList +tokensList pTlUserKey_ = + TokensList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlOauthToken = Nothing + , _tlUserKey = pTlUserKey_ + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TokensList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TokensList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TokensList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TokensList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TokensList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +tlUserKey :: Lens' TokensList' Text +tlUserKey + = lens _tlUserKey (\ s a -> s{_tlUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TokensList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TokensList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TokensList' where + type Rs TokensList' = Tokens + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u TokensList{..} + = go _tlQuotaUser _tlPrettyPrint _tlUserIp _tlKey + _tlOauthToken + _tlUserKey + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TokensListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Delete.hs new file mode 100644 index 000000000..e656d36e0 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Aliases.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove a alias for the user +-- +-- /See:/ for @DirectoryUsersAliasesDelete@. +module Directory.Users.Aliases.Delete + ( + -- * REST Resource + UsersAliasesDeleteAPI + + -- * Creating a Request + , usersAliasesDelete + , UsersAliasesDelete + + -- * Request Lenses + , uadQuotaUser + , uadPrettyPrint + , uadUserIp + , uadAlias + , uadKey + , uadOauthToken + , uadUserKey + , uadFields + , uadAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersAliasesDelete@ which the +-- 'UsersAliasesDelete' request conforms to. +type UsersAliasesDeleteAPI = + "users" :> + Capture "userKey" Text :> + "aliases" :> + Capture "alias" Text :> Delete '[JSON] () + +-- | Remove a alias for the user +-- +-- /See:/ 'usersAliasesDelete' smart constructor. +data UsersAliasesDelete = UsersAliasesDelete + { _uadQuotaUser :: !(Maybe Text) + , _uadPrettyPrint :: !Bool + , _uadUserIp :: !(Maybe Text) + , _uadAlias :: !Text + , _uadKey :: !(Maybe Text) + , _uadOauthToken :: !(Maybe Text) + , _uadUserKey :: !Text + , _uadFields :: !(Maybe Text) + , _uadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersAliasesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uadQuotaUser' +-- +-- * 'uadPrettyPrint' +-- +-- * 'uadUserIp' +-- +-- * 'uadAlias' +-- +-- * 'uadKey' +-- +-- * 'uadOauthToken' +-- +-- * 'uadUserKey' +-- +-- * 'uadFields' +-- +-- * 'uadAlt' +usersAliasesDelete + :: Text -- ^ 'alias' + -> Text -- ^ 'userKey' + -> UsersAliasesDelete +usersAliasesDelete pUadAlias_ pUadUserKey_ = + UsersAliasesDelete + { _uadQuotaUser = Nothing + , _uadPrettyPrint = True + , _uadUserIp = Nothing + , _uadAlias = pUadAlias_ + , _uadKey = Nothing + , _uadOauthToken = Nothing + , _uadUserKey = pUadUserKey_ + , _uadFields = Nothing + , _uadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uadQuotaUser :: Lens' UsersAliasesDelete' (Maybe Text) +uadQuotaUser + = lens _uadQuotaUser (\ s a -> s{_uadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uadPrettyPrint :: Lens' UsersAliasesDelete' Bool +uadPrettyPrint + = lens _uadPrettyPrint + (\ s a -> s{_uadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uadUserIp :: Lens' UsersAliasesDelete' (Maybe Text) +uadUserIp + = lens _uadUserIp (\ s a -> s{_uadUserIp = a}) + +-- | The alias to be removed +uadAlias :: Lens' UsersAliasesDelete' Text +uadAlias = lens _uadAlias (\ s a -> s{_uadAlias = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uadKey :: Lens' UsersAliasesDelete' (Maybe Text) +uadKey = lens _uadKey (\ s a -> s{_uadKey = a}) + +-- | OAuth 2.0 token for the current user. +uadOauthToken :: Lens' UsersAliasesDelete' (Maybe Text) +uadOauthToken + = lens _uadOauthToken + (\ s a -> s{_uadOauthToken = a}) + +-- | Email or immutable Id of the user +uadUserKey :: Lens' UsersAliasesDelete' Text +uadUserKey + = lens _uadUserKey (\ s a -> s{_uadUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uadFields :: Lens' UsersAliasesDelete' (Maybe Text) +uadFields + = lens _uadFields (\ s a -> s{_uadFields = a}) + +-- | Data format for the response. +uadAlt :: Lens' UsersAliasesDelete' Text +uadAlt = lens _uadAlt (\ s a -> s{_uadAlt = a}) + +instance GoogleRequest UsersAliasesDelete' where + type Rs UsersAliasesDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersAliasesDelete{..} + = go _uadQuotaUser _uadPrettyPrint _uadUserIp + _uadAlias + _uadKey + _uadOauthToken + _uadUserKey + _uadFields + _uadAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersAliasesDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Insert.hs new file mode 100644 index 000000000..862a93121 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Aliases.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a alias for the user +-- +-- /See:/ for @DirectoryUsersAliasesInsert@. +module Directory.Users.Aliases.Insert + ( + -- * REST Resource + UsersAliasesInsertAPI + + -- * Creating a Request + , usersAliasesInsert + , UsersAliasesInsert + + -- * Request Lenses + , uaiQuotaUser + , uaiPrettyPrint + , uaiUserIp + , uaiKey + , uaiOauthToken + , uaiUserKey + , uaiFields + , uaiAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersAliasesInsert@ which the +-- 'UsersAliasesInsert' request conforms to. +type UsersAliasesInsertAPI = + "users" :> + Capture "userKey" Text :> + "aliases" :> Post '[JSON] Alias + +-- | Add a alias for the user +-- +-- /See:/ 'usersAliasesInsert' smart constructor. +data UsersAliasesInsert = UsersAliasesInsert + { _uaiQuotaUser :: !(Maybe Text) + , _uaiPrettyPrint :: !Bool + , _uaiUserIp :: !(Maybe Text) + , _uaiKey :: !(Maybe Text) + , _uaiOauthToken :: !(Maybe Text) + , _uaiUserKey :: !Text + , _uaiFields :: !(Maybe Text) + , _uaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersAliasesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uaiQuotaUser' +-- +-- * 'uaiPrettyPrint' +-- +-- * 'uaiUserIp' +-- +-- * 'uaiKey' +-- +-- * 'uaiOauthToken' +-- +-- * 'uaiUserKey' +-- +-- * 'uaiFields' +-- +-- * 'uaiAlt' +usersAliasesInsert + :: Text -- ^ 'userKey' + -> UsersAliasesInsert +usersAliasesInsert pUaiUserKey_ = + UsersAliasesInsert + { _uaiQuotaUser = Nothing + , _uaiPrettyPrint = True + , _uaiUserIp = Nothing + , _uaiKey = Nothing + , _uaiOauthToken = Nothing + , _uaiUserKey = pUaiUserKey_ + , _uaiFields = Nothing + , _uaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uaiQuotaUser :: Lens' UsersAliasesInsert' (Maybe Text) +uaiQuotaUser + = lens _uaiQuotaUser (\ s a -> s{_uaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uaiPrettyPrint :: Lens' UsersAliasesInsert' Bool +uaiPrettyPrint + = lens _uaiPrettyPrint + (\ s a -> s{_uaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uaiUserIp :: Lens' UsersAliasesInsert' (Maybe Text) +uaiUserIp + = lens _uaiUserIp (\ s a -> s{_uaiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uaiKey :: Lens' UsersAliasesInsert' (Maybe Text) +uaiKey = lens _uaiKey (\ s a -> s{_uaiKey = a}) + +-- | OAuth 2.0 token for the current user. +uaiOauthToken :: Lens' UsersAliasesInsert' (Maybe Text) +uaiOauthToken + = lens _uaiOauthToken + (\ s a -> s{_uaiOauthToken = a}) + +-- | Email or immutable Id of the user +uaiUserKey :: Lens' UsersAliasesInsert' Text +uaiUserKey + = lens _uaiUserKey (\ s a -> s{_uaiUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uaiFields :: Lens' UsersAliasesInsert' (Maybe Text) +uaiFields + = lens _uaiFields (\ s a -> s{_uaiFields = a}) + +-- | Data format for the response. +uaiAlt :: Lens' UsersAliasesInsert' Text +uaiAlt = lens _uaiAlt (\ s a -> s{_uaiAlt = a}) + +instance GoogleRequest UsersAliasesInsert' where + type Rs UsersAliasesInsert' = Alias + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersAliasesInsert{..} + = go _uaiQuotaUser _uaiPrettyPrint _uaiUserIp _uaiKey + _uaiOauthToken + _uaiUserKey + _uaiFields + _uaiAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersAliasesInsertAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/List.hs new file mode 100644 index 000000000..a496e8b32 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/List.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Aliases.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all aliases for a user +-- +-- /See:/ for @DirectoryUsersAliasesList@. +module Directory.Users.Aliases.List + ( + -- * REST Resource + UsersAliasesListAPI + + -- * Creating a Request + , usersAliasesList + , UsersAliasesList + + -- * Request Lenses + , ualEvent + , ualQuotaUser + , ualPrettyPrint + , ualUserIp + , ualKey + , ualOauthToken + , ualUserKey + , ualFields + , ualAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersAliasesList@ which the +-- 'UsersAliasesList' request conforms to. +type UsersAliasesListAPI = + "users" :> + Capture "userKey" Text :> + "aliases" :> + QueryParam "event" Text :> Get '[JSON] Aliases + +-- | List all aliases for a user +-- +-- /See:/ 'usersAliasesList' smart constructor. +data UsersAliasesList = UsersAliasesList + { _ualEvent :: !(Maybe Text) + , _ualQuotaUser :: !(Maybe Text) + , _ualPrettyPrint :: !Bool + , _ualUserIp :: !(Maybe Text) + , _ualKey :: !(Maybe Text) + , _ualOauthToken :: !(Maybe Text) + , _ualUserKey :: !Text + , _ualFields :: !(Maybe Text) + , _ualAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersAliasesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ualEvent' +-- +-- * 'ualQuotaUser' +-- +-- * 'ualPrettyPrint' +-- +-- * 'ualUserIp' +-- +-- * 'ualKey' +-- +-- * 'ualOauthToken' +-- +-- * 'ualUserKey' +-- +-- * 'ualFields' +-- +-- * 'ualAlt' +usersAliasesList + :: Text -- ^ 'userKey' + -> UsersAliasesList +usersAliasesList pUalUserKey_ = + UsersAliasesList + { _ualEvent = Nothing + , _ualQuotaUser = Nothing + , _ualPrettyPrint = True + , _ualUserIp = Nothing + , _ualKey = Nothing + , _ualOauthToken = Nothing + , _ualUserKey = pUalUserKey_ + , _ualFields = Nothing + , _ualAlt = "json" + } + +-- | Event on which subscription is intended (if subscribing) +ualEvent :: Lens' UsersAliasesList' (Maybe Text) +ualEvent = lens _ualEvent (\ s a -> s{_ualEvent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ualQuotaUser :: Lens' UsersAliasesList' (Maybe Text) +ualQuotaUser + = lens _ualQuotaUser (\ s a -> s{_ualQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ualPrettyPrint :: Lens' UsersAliasesList' Bool +ualPrettyPrint + = lens _ualPrettyPrint + (\ s a -> s{_ualPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ualUserIp :: Lens' UsersAliasesList' (Maybe Text) +ualUserIp + = lens _ualUserIp (\ s a -> s{_ualUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ualKey :: Lens' UsersAliasesList' (Maybe Text) +ualKey = lens _ualKey (\ s a -> s{_ualKey = a}) + +-- | OAuth 2.0 token for the current user. +ualOauthToken :: Lens' UsersAliasesList' (Maybe Text) +ualOauthToken + = lens _ualOauthToken + (\ s a -> s{_ualOauthToken = a}) + +-- | Email or immutable Id of the user +ualUserKey :: Lens' UsersAliasesList' Text +ualUserKey + = lens _ualUserKey (\ s a -> s{_ualUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +ualFields :: Lens' UsersAliasesList' (Maybe Text) +ualFields + = lens _ualFields (\ s a -> s{_ualFields = a}) + +-- | Data format for the response. +ualAlt :: Lens' UsersAliasesList' Text +ualAlt = lens _ualAlt (\ s a -> s{_ualAlt = a}) + +instance GoogleRequest UsersAliasesList' where + type Rs UsersAliasesList' = Aliases + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersAliasesList{..} + = go _ualEvent _ualQuotaUser _ualPrettyPrint + _ualUserIp + _ualKey + _ualOauthToken + _ualUserKey + _ualFields + _ualAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersAliasesListAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Watch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Watch.hs new file mode 100644 index 000000000..35491f9fc --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Watch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Aliases.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes in user aliases list +-- +-- /See:/ for @DirectoryUsersAliasesWatch@. +module Directory.Users.Aliases.Watch + ( + -- * REST Resource + UsersAliasesWatchAPI + + -- * Creating a Request + , usersAliasesWatch + , UsersAliasesWatch + + -- * Request Lenses + , uawEvent + , uawQuotaUser + , uawPrettyPrint + , uawUserIp + , uawKey + , uawOauthToken + , uawUserKey + , uawFields + , uawAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersAliasesWatch@ which the +-- 'UsersAliasesWatch' request conforms to. +type UsersAliasesWatchAPI = + "users" :> + Capture "userKey" Text :> + "aliases" :> + "watch" :> + QueryParam "event" Text :> Post '[JSON] Channel + +-- | Watch for changes in user aliases list +-- +-- /See:/ 'usersAliasesWatch' smart constructor. +data UsersAliasesWatch = UsersAliasesWatch + { _uawEvent :: !(Maybe Text) + , _uawQuotaUser :: !(Maybe Text) + , _uawPrettyPrint :: !Bool + , _uawUserIp :: !(Maybe Text) + , _uawKey :: !(Maybe Text) + , _uawOauthToken :: !(Maybe Text) + , _uawUserKey :: !Text + , _uawFields :: !(Maybe Text) + , _uawAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersAliasesWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uawEvent' +-- +-- * 'uawQuotaUser' +-- +-- * 'uawPrettyPrint' +-- +-- * 'uawUserIp' +-- +-- * 'uawKey' +-- +-- * 'uawOauthToken' +-- +-- * 'uawUserKey' +-- +-- * 'uawFields' +-- +-- * 'uawAlt' +usersAliasesWatch + :: Text -- ^ 'userKey' + -> UsersAliasesWatch +usersAliasesWatch pUawUserKey_ = + UsersAliasesWatch + { _uawEvent = Nothing + , _uawQuotaUser = Nothing + , _uawPrettyPrint = True + , _uawUserIp = Nothing + , _uawKey = Nothing + , _uawOauthToken = Nothing + , _uawUserKey = pUawUserKey_ + , _uawFields = Nothing + , _uawAlt = "json" + } + +-- | Event on which subscription is intended (if subscribing) +uawEvent :: Lens' UsersAliasesWatch' (Maybe Text) +uawEvent = lens _uawEvent (\ s a -> s{_uawEvent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uawQuotaUser :: Lens' UsersAliasesWatch' (Maybe Text) +uawQuotaUser + = lens _uawQuotaUser (\ s a -> s{_uawQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uawPrettyPrint :: Lens' UsersAliasesWatch' Bool +uawPrettyPrint + = lens _uawPrettyPrint + (\ s a -> s{_uawPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uawUserIp :: Lens' UsersAliasesWatch' (Maybe Text) +uawUserIp + = lens _uawUserIp (\ s a -> s{_uawUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uawKey :: Lens' UsersAliasesWatch' (Maybe Text) +uawKey = lens _uawKey (\ s a -> s{_uawKey = a}) + +-- | OAuth 2.0 token for the current user. +uawOauthToken :: Lens' UsersAliasesWatch' (Maybe Text) +uawOauthToken + = lens _uawOauthToken + (\ s a -> s{_uawOauthToken = a}) + +-- | Email or immutable Id of the user +uawUserKey :: Lens' UsersAliasesWatch' Text +uawUserKey + = lens _uawUserKey (\ s a -> s{_uawUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uawFields :: Lens' UsersAliasesWatch' (Maybe Text) +uawFields + = lens _uawFields (\ s a -> s{_uawFields = a}) + +-- | Data format for the response. +uawAlt :: Lens' UsersAliasesWatch' Text +uawAlt = lens _uawAlt (\ s a -> s{_uawAlt = a}) + +instance GoogleRequest UsersAliasesWatch' where + type Rs UsersAliasesWatch' = Channel + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersAliasesWatch{..} + = go _uawEvent _uawQuotaUser _uawPrettyPrint + _uawUserIp + _uawKey + _uawOauthToken + _uawUserKey + _uawFields + _uawAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersAliasesWatchAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Delete.hs new file mode 100644 index 000000000..adbdb4283 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Delete.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete user +-- +-- /See:/ for @DirectoryUsersDelete@. +module Directory.Users.Delete + ( + -- * REST Resource + UsersDeleteAPI + + -- * Creating a Request + , usersDelete + , UsersDelete + + -- * Request Lenses + , udQuotaUser + , udPrettyPrint + , udUserIp + , udKey + , udOauthToken + , udUserKey + , udFields + , udAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersDelete@ which the +-- 'UsersDelete' request conforms to. +type UsersDeleteAPI = + "users" :> + Capture "userKey" Text :> Delete '[JSON] () + +-- | Delete user +-- +-- /See:/ 'usersDelete' smart constructor. +data UsersDelete = UsersDelete + { _udQuotaUser :: !(Maybe Text) + , _udPrettyPrint :: !Bool + , _udUserIp :: !(Maybe Text) + , _udKey :: !(Maybe Text) + , _udOauthToken :: !(Maybe Text) + , _udUserKey :: !Text + , _udFields :: !(Maybe Text) + , _udAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udQuotaUser' +-- +-- * 'udPrettyPrint' +-- +-- * 'udUserIp' +-- +-- * 'udKey' +-- +-- * 'udOauthToken' +-- +-- * 'udUserKey' +-- +-- * 'udFields' +-- +-- * 'udAlt' +usersDelete + :: Text -- ^ 'userKey' + -> UsersDelete +usersDelete pUdUserKey_ = + UsersDelete + { _udQuotaUser = Nothing + , _udPrettyPrint = True + , _udUserIp = Nothing + , _udKey = Nothing + , _udOauthToken = Nothing + , _udUserKey = pUdUserKey_ + , _udFields = Nothing + , _udAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udQuotaUser :: Lens' UsersDelete' (Maybe Text) +udQuotaUser + = lens _udQuotaUser (\ s a -> s{_udQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udPrettyPrint :: Lens' UsersDelete' Bool +udPrettyPrint + = lens _udPrettyPrint + (\ s a -> s{_udPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udUserIp :: Lens' UsersDelete' (Maybe Text) +udUserIp = lens _udUserIp (\ s a -> s{_udUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udKey :: Lens' UsersDelete' (Maybe Text) +udKey = lens _udKey (\ s a -> s{_udKey = a}) + +-- | OAuth 2.0 token for the current user. +udOauthToken :: Lens' UsersDelete' (Maybe Text) +udOauthToken + = lens _udOauthToken (\ s a -> s{_udOauthToken = a}) + +-- | Email or immutable Id of the user +udUserKey :: Lens' UsersDelete' Text +udUserKey + = lens _udUserKey (\ s a -> s{_udUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +udFields :: Lens' UsersDelete' (Maybe Text) +udFields = lens _udFields (\ s a -> s{_udFields = a}) + +-- | Data format for the response. +udAlt :: Lens' UsersDelete' Text +udAlt = lens _udAlt (\ s a -> s{_udAlt = a}) + +instance GoogleRequest UsersDelete' where + type Rs UsersDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersDelete{..} + = go _udQuotaUser _udPrettyPrint _udUserIp _udKey + _udOauthToken + _udUserKey + _udFields + _udAlt + where go + = clientWithRoute (Proxy :: Proxy UsersDeleteAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Get.hs new file mode 100644 index 000000000..f1959d053 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Get.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | retrieve user +-- +-- /See:/ for @DirectoryUsersGet@. +module Directory.Users.Get + ( + -- * REST Resource + UsersGetAPI + + -- * Creating a Request + , usersGet + , UsersGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugViewType + , ugCustomFieldMask + , ugUserIp + , ugKey + , ugProjection + , ugOauthToken + , ugUserKey + , ugFields + , ugAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersGet@ which the +-- 'UsersGet' request conforms to. +type UsersGetAPI = + "users" :> + Capture "userKey" Text :> + QueryParam "viewType" Text :> + QueryParam "customFieldMask" Text :> + QueryParam "projection" Text :> Get '[JSON] User + +-- | retrieve user +-- +-- /See:/ 'usersGet' smart constructor. +data UsersGet = UsersGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugViewType :: !Text + , _ugCustomFieldMask :: !(Maybe Text) + , _ugUserIp :: !(Maybe Text) + , _ugKey :: !(Maybe Text) + , _ugProjection :: !Text + , _ugOauthToken :: !(Maybe Text) + , _ugUserKey :: !Text + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugViewType' +-- +-- * 'ugCustomFieldMask' +-- +-- * 'ugUserIp' +-- +-- * 'ugKey' +-- +-- * 'ugProjection' +-- +-- * 'ugOauthToken' +-- +-- * 'ugUserKey' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +usersGet + :: Text -- ^ 'userKey' + -> UsersGet +usersGet pUgUserKey_ = + UsersGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugViewType = "admin_view" + , _ugCustomFieldMask = Nothing + , _ugUserIp = Nothing + , _ugKey = Nothing + , _ugProjection = "basic" + , _ugOauthToken = Nothing + , _ugUserKey = pUgUserKey_ + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' UsersGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' UsersGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +ugViewType :: Lens' UsersGet' Text +ugViewType + = lens _ugViewType (\ s a -> s{_ugViewType = a}) + +-- | Comma-separated list of schema names. All fields from these schemas are +-- fetched. This should only be set when projection=custom. +ugCustomFieldMask :: Lens' UsersGet' (Maybe Text) +ugCustomFieldMask + = lens _ugCustomFieldMask + (\ s a -> s{_ugCustomFieldMask = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' UsersGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' UsersGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | What subset of fields to fetch for this user. +ugProjection :: Lens' UsersGet' Text +ugProjection + = lens _ugProjection (\ s a -> s{_ugProjection = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' UsersGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Email or immutable Id of the user +ugUserKey :: Lens' UsersGet' Text +ugUserKey + = lens _ugUserKey (\ s a -> s{_ugUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' UsersGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' UsersGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest UsersGet' where + type Rs UsersGet' = User + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersGet{..} + = go _ugQuotaUser _ugPrettyPrint (Just _ugViewType) + _ugCustomFieldMask + _ugUserIp + _ugKey + (Just _ugProjection) + _ugOauthToken + _ugUserKey + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UsersGetAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Insert.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Insert.hs new file mode 100644 index 000000000..06e2f727a --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Insert.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | create user. +-- +-- /See:/ for @DirectoryUsersInsert@. +module Directory.Users.Insert + ( + -- * REST Resource + UsersInsertAPI + + -- * Creating a Request + , usersInsert + , UsersInsert + + -- * Request Lenses + , uiQuotaUser + , uiPrettyPrint + , uiUserIp + , uiKey + , uiOauthToken + , uiFields + , uiAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersInsert@ which the +-- 'UsersInsert' request conforms to. +type UsersInsertAPI = "users" :> Post '[JSON] User + +-- | create user. +-- +-- /See:/ 'usersInsert' smart constructor. +data UsersInsert = UsersInsert + { _uiQuotaUser :: !(Maybe Text) + , _uiPrettyPrint :: !Bool + , _uiUserIp :: !(Maybe Text) + , _uiKey :: !(Maybe Text) + , _uiOauthToken :: !(Maybe Text) + , _uiFields :: !(Maybe Text) + , _uiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiQuotaUser' +-- +-- * 'uiPrettyPrint' +-- +-- * 'uiUserIp' +-- +-- * 'uiKey' +-- +-- * 'uiOauthToken' +-- +-- * 'uiFields' +-- +-- * 'uiAlt' +usersInsert + :: UsersInsert +usersInsert = + UsersInsert + { _uiQuotaUser = Nothing + , _uiPrettyPrint = True + , _uiUserIp = Nothing + , _uiKey = Nothing + , _uiOauthToken = Nothing + , _uiFields = Nothing + , _uiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uiQuotaUser :: Lens' UsersInsert' (Maybe Text) +uiQuotaUser + = lens _uiQuotaUser (\ s a -> s{_uiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uiPrettyPrint :: Lens' UsersInsert' Bool +uiPrettyPrint + = lens _uiPrettyPrint + (\ s a -> s{_uiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uiUserIp :: Lens' UsersInsert' (Maybe Text) +uiUserIp = lens _uiUserIp (\ s a -> s{_uiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uiKey :: Lens' UsersInsert' (Maybe Text) +uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) + +-- | OAuth 2.0 token for the current user. +uiOauthToken :: Lens' UsersInsert' (Maybe Text) +uiOauthToken + = lens _uiOauthToken (\ s a -> s{_uiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uiFields :: Lens' UsersInsert' (Maybe Text) +uiFields = lens _uiFields (\ s a -> s{_uiFields = a}) + +-- | Data format for the response. +uiAlt :: Lens' UsersInsert' Text +uiAlt = lens _uiAlt (\ s a -> s{_uiAlt = a}) + +instance GoogleRequest UsersInsert' where + type Rs UsersInsert' = User + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersInsert{..} + = go _uiQuotaUser _uiPrettyPrint _uiUserIp _uiKey + _uiOauthToken + _uiFields + _uiAlt + where go + = clientWithRoute (Proxy :: Proxy UsersInsertAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/List.hs new file mode 100644 index 000000000..81ce5beb2 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/List.hs @@ -0,0 +1,286 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve either deleted users or all users in a domain (paginated) +-- +-- /See:/ for @DirectoryUsersList@. +module Directory.Users.List + ( + -- * REST Resource + UsersListAPI + + -- * Creating a Request + , usersList + , UsersList + + -- * Request Lenses + , ulEvent + , ulQuotaUser + , ulPrettyPrint + , ulOrderBy + , ulViewType + , ulCustomFieldMask + , ulUserIp + , ulDomain + , ulShowDeleted + , ulSortOrder + , ulCustomer + , ulKey + , ulQuery + , ulProjection + , ulPageToken + , ulOauthToken + , ulMaxResults + , ulFields + , ulAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersList@ which the +-- 'UsersList' request conforms to. +type UsersListAPI = + "users" :> + QueryParam "event" Text :> + QueryParam "orderBy" Text :> + QueryParam "viewType" Text :> + QueryParam "customFieldMask" Text :> + QueryParam "domain" Text :> + QueryParam "showDeleted" Text :> + QueryParam "sortOrder" Text :> + QueryParam "customer" Text :> + QueryParam "query" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Users + +-- | Retrieve either deleted users or all users in a domain (paginated) +-- +-- /See:/ 'usersList' smart constructor. +data UsersList = UsersList + { _ulEvent :: !(Maybe Text) + , _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulOrderBy :: !(Maybe Text) + , _ulViewType :: !Text + , _ulCustomFieldMask :: !(Maybe Text) + , _ulUserIp :: !(Maybe Text) + , _ulDomain :: !(Maybe Text) + , _ulShowDeleted :: !(Maybe Text) + , _ulSortOrder :: !(Maybe Text) + , _ulCustomer :: !(Maybe Text) + , _ulKey :: !(Maybe Text) + , _ulQuery :: !(Maybe Text) + , _ulProjection :: !Text + , _ulPageToken :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulMaxResults :: !(Maybe Int32) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulEvent' +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulOrderBy' +-- +-- * 'ulViewType' +-- +-- * 'ulCustomFieldMask' +-- +-- * 'ulUserIp' +-- +-- * 'ulDomain' +-- +-- * 'ulShowDeleted' +-- +-- * 'ulSortOrder' +-- +-- * 'ulCustomer' +-- +-- * 'ulKey' +-- +-- * 'ulQuery' +-- +-- * 'ulProjection' +-- +-- * 'ulPageToken' +-- +-- * 'ulOauthToken' +-- +-- * 'ulMaxResults' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +usersList + :: UsersList +usersList = + UsersList + { _ulEvent = Nothing + , _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulOrderBy = Nothing + , _ulViewType = "admin_view" + , _ulCustomFieldMask = Nothing + , _ulUserIp = Nothing + , _ulDomain = Nothing + , _ulShowDeleted = Nothing + , _ulSortOrder = Nothing + , _ulCustomer = Nothing + , _ulKey = Nothing + , _ulQuery = Nothing + , _ulProjection = "basic" + , _ulPageToken = Nothing + , _ulOauthToken = Nothing + , _ulMaxResults = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Event on which subscription is intended (if subscribing) +ulEvent :: Lens' UsersList' (Maybe Text) +ulEvent = lens _ulEvent (\ s a -> s{_ulEvent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' UsersList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' UsersList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | Column to use for sorting results +ulOrderBy :: Lens' UsersList' (Maybe Text) +ulOrderBy + = lens _ulOrderBy (\ s a -> s{_ulOrderBy = a}) + +-- | Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +ulViewType :: Lens' UsersList' Text +ulViewType + = lens _ulViewType (\ s a -> s{_ulViewType = a}) + +-- | Comma-separated list of schema names. All fields from these schemas are +-- fetched. This should only be set when projection=custom. +ulCustomFieldMask :: Lens' UsersList' (Maybe Text) +ulCustomFieldMask + = lens _ulCustomFieldMask + (\ s a -> s{_ulCustomFieldMask = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' UsersList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | Name of the domain. Fill this field to get users from only this domain. +-- To return all users in a multi-domain fill customer field instead. +ulDomain :: Lens' UsersList' (Maybe Text) +ulDomain = lens _ulDomain (\ s a -> s{_ulDomain = a}) + +-- | If set to true retrieves the list of deleted users. Default is false +ulShowDeleted :: Lens' UsersList' (Maybe Text) +ulShowDeleted + = lens _ulShowDeleted + (\ s a -> s{_ulShowDeleted = a}) + +-- | Whether to return results in ascending or descending order. +ulSortOrder :: Lens' UsersList' (Maybe Text) +ulSortOrder + = lens _ulSortOrder (\ s a -> s{_ulSortOrder = a}) + +-- | Immutable id of the Google Apps account. In case of multi-domain, to +-- fetch all users for a customer, fill this field instead of domain. +ulCustomer :: Lens' UsersList' (Maybe Text) +ulCustomer + = lens _ulCustomer (\ s a -> s{_ulCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' UsersList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | Query string search. Should be of the form \"\". Complete documentation +-- is at +-- https:\/\/developers.google.com\/admin-sdk\/directory\/v1\/guides\/search-users +ulQuery :: Lens' UsersList' (Maybe Text) +ulQuery = lens _ulQuery (\ s a -> s{_ulQuery = a}) + +-- | What subset of fields to fetch for this user. +ulProjection :: Lens' UsersList' Text +ulProjection + = lens _ulProjection (\ s a -> s{_ulProjection = a}) + +-- | Token to specify next page in the list +ulPageToken :: Lens' UsersList' (Maybe Text) +ulPageToken + = lens _ulPageToken (\ s a -> s{_ulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' UsersList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Maximum number of results to return. Default is 100. Max allowed is 500 +ulMaxResults :: Lens' UsersList' (Maybe Int32) +ulMaxResults + = lens _ulMaxResults (\ s a -> s{_ulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' UsersList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' UsersList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest UsersList' where + type Rs UsersList' = Users + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersList{..} + = go _ulEvent _ulQuotaUser _ulPrettyPrint _ulOrderBy + (Just _ulViewType) + _ulCustomFieldMask + _ulUserIp + _ulDomain + _ulShowDeleted + _ulSortOrder + _ulCustomer + _ulKey + _ulQuery + (Just _ulProjection) + _ulPageToken + _ulOauthToken + _ulMaxResults + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UsersListAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/MakeAdmin.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/MakeAdmin.hs new file mode 100644 index 000000000..7ecf90a26 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/MakeAdmin.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.MakeAdmin +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | change admin status of a user +-- +-- /See:/ for @DirectoryUsersMakeAdmin@. +module Directory.Users.MakeAdmin + ( + -- * REST Resource + UsersMakeAdminAPI + + -- * Creating a Request + , usersMakeAdmin + , UsersMakeAdmin + + -- * Request Lenses + , umaQuotaUser + , umaPrettyPrint + , umaUserIp + , umaKey + , umaOauthToken + , umaUserKey + , umaFields + , umaAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersMakeAdmin@ which the +-- 'UsersMakeAdmin' request conforms to. +type UsersMakeAdminAPI = + "users" :> + Capture "userKey" Text :> + "makeAdmin" :> Post '[JSON] () + +-- | change admin status of a user +-- +-- /See:/ 'usersMakeAdmin' smart constructor. +data UsersMakeAdmin = UsersMakeAdmin + { _umaQuotaUser :: !(Maybe Text) + , _umaPrettyPrint :: !Bool + , _umaUserIp :: !(Maybe Text) + , _umaKey :: !(Maybe Text) + , _umaOauthToken :: !(Maybe Text) + , _umaUserKey :: !Text + , _umaFields :: !(Maybe Text) + , _umaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMakeAdmin'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umaQuotaUser' +-- +-- * 'umaPrettyPrint' +-- +-- * 'umaUserIp' +-- +-- * 'umaKey' +-- +-- * 'umaOauthToken' +-- +-- * 'umaUserKey' +-- +-- * 'umaFields' +-- +-- * 'umaAlt' +usersMakeAdmin + :: Text -- ^ 'userKey' + -> UsersMakeAdmin +usersMakeAdmin pUmaUserKey_ = + UsersMakeAdmin + { _umaQuotaUser = Nothing + , _umaPrettyPrint = True + , _umaUserIp = Nothing + , _umaKey = Nothing + , _umaOauthToken = Nothing + , _umaUserKey = pUmaUserKey_ + , _umaFields = Nothing + , _umaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umaQuotaUser :: Lens' UsersMakeAdmin' (Maybe Text) +umaQuotaUser + = lens _umaQuotaUser (\ s a -> s{_umaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umaPrettyPrint :: Lens' UsersMakeAdmin' Bool +umaPrettyPrint + = lens _umaPrettyPrint + (\ s a -> s{_umaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umaUserIp :: Lens' UsersMakeAdmin' (Maybe Text) +umaUserIp + = lens _umaUserIp (\ s a -> s{_umaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umaKey :: Lens' UsersMakeAdmin' (Maybe Text) +umaKey = lens _umaKey (\ s a -> s{_umaKey = a}) + +-- | OAuth 2.0 token for the current user. +umaOauthToken :: Lens' UsersMakeAdmin' (Maybe Text) +umaOauthToken + = lens _umaOauthToken + (\ s a -> s{_umaOauthToken = a}) + +-- | Email or immutable Id of the user as admin +umaUserKey :: Lens' UsersMakeAdmin' Text +umaUserKey + = lens _umaUserKey (\ s a -> s{_umaUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +umaFields :: Lens' UsersMakeAdmin' (Maybe Text) +umaFields + = lens _umaFields (\ s a -> s{_umaFields = a}) + +-- | Data format for the response. +umaAlt :: Lens' UsersMakeAdmin' Text +umaAlt = lens _umaAlt (\ s a -> s{_umaAlt = a}) + +instance GoogleRequest UsersMakeAdmin' where + type Rs UsersMakeAdmin' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersMakeAdmin{..} + = go _umaQuotaUser _umaPrettyPrint _umaUserIp _umaKey + _umaOauthToken + _umaUserKey + _umaFields + _umaAlt + where go + = clientWithRoute (Proxy :: Proxy UsersMakeAdminAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Patch.hs new file mode 100644 index 000000000..5b6de1ba6 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | update user. This method supports patch semantics. +-- +-- /See:/ for @DirectoryUsersPatch@. +module Directory.Users.Patch + ( + -- * REST Resource + UsersPatchAPI + + -- * Creating a Request + , usersPatch + , UsersPatch + + -- * Request Lenses + , upQuotaUser + , upPrettyPrint + , upUserIp + , upKey + , upOauthToken + , upUserKey + , upFields + , upAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersPatch@ which the +-- 'UsersPatch' request conforms to. +type UsersPatchAPI = + "users" :> + Capture "userKey" Text :> Patch '[JSON] User + +-- | update user. This method supports patch semantics. +-- +-- /See:/ 'usersPatch' smart constructor. +data UsersPatch = UsersPatch + { _upQuotaUser :: !(Maybe Text) + , _upPrettyPrint :: !Bool + , _upUserIp :: !(Maybe Text) + , _upKey :: !(Maybe Text) + , _upOauthToken :: !(Maybe Text) + , _upUserKey :: !Text + , _upFields :: !(Maybe Text) + , _upAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upQuotaUser' +-- +-- * 'upPrettyPrint' +-- +-- * 'upUserIp' +-- +-- * 'upKey' +-- +-- * 'upOauthToken' +-- +-- * 'upUserKey' +-- +-- * 'upFields' +-- +-- * 'upAlt' +usersPatch + :: Text -- ^ 'userKey' + -> UsersPatch +usersPatch pUpUserKey_ = + UsersPatch + { _upQuotaUser = Nothing + , _upPrettyPrint = True + , _upUserIp = Nothing + , _upKey = Nothing + , _upOauthToken = Nothing + , _upUserKey = pUpUserKey_ + , _upFields = Nothing + , _upAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +upQuotaUser :: Lens' UsersPatch' (Maybe Text) +upQuotaUser + = lens _upQuotaUser (\ s a -> s{_upQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +upPrettyPrint :: Lens' UsersPatch' Bool +upPrettyPrint + = lens _upPrettyPrint + (\ s a -> s{_upPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +upUserIp :: Lens' UsersPatch' (Maybe Text) +upUserIp = lens _upUserIp (\ s a -> s{_upUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +upKey :: Lens' UsersPatch' (Maybe Text) +upKey = lens _upKey (\ s a -> s{_upKey = a}) + +-- | OAuth 2.0 token for the current user. +upOauthToken :: Lens' UsersPatch' (Maybe Text) +upOauthToken + = lens _upOauthToken (\ s a -> s{_upOauthToken = a}) + +-- | Email or immutable Id of the user. If Id, it should match with id of +-- user object +upUserKey :: Lens' UsersPatch' Text +upUserKey + = lens _upUserKey (\ s a -> s{_upUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +upFields :: Lens' UsersPatch' (Maybe Text) +upFields = lens _upFields (\ s a -> s{_upFields = a}) + +-- | Data format for the response. +upAlt :: Lens' UsersPatch' Text +upAlt = lens _upAlt (\ s a -> s{_upAlt = a}) + +instance GoogleRequest UsersPatch' where + type Rs UsersPatch' = User + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersPatch{..} + = go _upQuotaUser _upPrettyPrint _upUserIp _upKey + _upOauthToken + _upUserKey + _upFields + _upAlt + where go + = clientWithRoute (Proxy :: Proxy UsersPatchAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Delete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Delete.hs new file mode 100644 index 000000000..5aa400fad --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Delete.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Photos.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove photos for the user +-- +-- /See:/ for @DirectoryUsersPhotosDelete@. +module Directory.Users.Photos.Delete + ( + -- * REST Resource + UsersPhotosDeleteAPI + + -- * Creating a Request + , usersPhotosDelete + , UsersPhotosDelete + + -- * Request Lenses + , updQuotaUser + , updPrettyPrint + , updUserIp + , updKey + , updOauthToken + , updUserKey + , updFields + , updAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersPhotosDelete@ which the +-- 'UsersPhotosDelete' request conforms to. +type UsersPhotosDeleteAPI = + "users" :> + Capture "userKey" Text :> + "photos" :> "thumbnail" :> Delete '[JSON] () + +-- | Remove photos for the user +-- +-- /See:/ 'usersPhotosDelete' smart constructor. +data UsersPhotosDelete = UsersPhotosDelete + { _updQuotaUser :: !(Maybe Text) + , _updPrettyPrint :: !Bool + , _updUserIp :: !(Maybe Text) + , _updKey :: !(Maybe Text) + , _updOauthToken :: !(Maybe Text) + , _updUserKey :: !Text + , _updFields :: !(Maybe Text) + , _updAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersPhotosDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'updQuotaUser' +-- +-- * 'updPrettyPrint' +-- +-- * 'updUserIp' +-- +-- * 'updKey' +-- +-- * 'updOauthToken' +-- +-- * 'updUserKey' +-- +-- * 'updFields' +-- +-- * 'updAlt' +usersPhotosDelete + :: Text -- ^ 'userKey' + -> UsersPhotosDelete +usersPhotosDelete pUpdUserKey_ = + UsersPhotosDelete + { _updQuotaUser = Nothing + , _updPrettyPrint = True + , _updUserIp = Nothing + , _updKey = Nothing + , _updOauthToken = Nothing + , _updUserKey = pUpdUserKey_ + , _updFields = Nothing + , _updAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +updQuotaUser :: Lens' UsersPhotosDelete' (Maybe Text) +updQuotaUser + = lens _updQuotaUser (\ s a -> s{_updQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +updPrettyPrint :: Lens' UsersPhotosDelete' Bool +updPrettyPrint + = lens _updPrettyPrint + (\ s a -> s{_updPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +updUserIp :: Lens' UsersPhotosDelete' (Maybe Text) +updUserIp + = lens _updUserIp (\ s a -> s{_updUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +updKey :: Lens' UsersPhotosDelete' (Maybe Text) +updKey = lens _updKey (\ s a -> s{_updKey = a}) + +-- | OAuth 2.0 token for the current user. +updOauthToken :: Lens' UsersPhotosDelete' (Maybe Text) +updOauthToken + = lens _updOauthToken + (\ s a -> s{_updOauthToken = a}) + +-- | Email or immutable Id of the user +updUserKey :: Lens' UsersPhotosDelete' Text +updUserKey + = lens _updUserKey (\ s a -> s{_updUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +updFields :: Lens' UsersPhotosDelete' (Maybe Text) +updFields + = lens _updFields (\ s a -> s{_updFields = a}) + +-- | Data format for the response. +updAlt :: Lens' UsersPhotosDelete' Text +updAlt = lens _updAlt (\ s a -> s{_updAlt = a}) + +instance GoogleRequest UsersPhotosDelete' where + type Rs UsersPhotosDelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersPhotosDelete{..} + = go _updQuotaUser _updPrettyPrint _updUserIp _updKey + _updOauthToken + _updUserKey + _updFields + _updAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersPhotosDeleteAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Get.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Get.hs new file mode 100644 index 000000000..77e4d61fe --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Photos.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve photo of a user +-- +-- /See:/ for @DirectoryUsersPhotosGet@. +module Directory.Users.Photos.Get + ( + -- * REST Resource + UsersPhotosGetAPI + + -- * Creating a Request + , usersPhotosGet + , UsersPhotosGet + + -- * Request Lenses + , upgQuotaUser + , upgPrettyPrint + , upgUserIp + , upgKey + , upgOauthToken + , upgUserKey + , upgFields + , upgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersPhotosGet@ which the +-- 'UsersPhotosGet' request conforms to. +type UsersPhotosGetAPI = + "users" :> + Capture "userKey" Text :> + "photos" :> "thumbnail" :> Get '[JSON] UserPhoto + +-- | Retrieve photo of a user +-- +-- /See:/ 'usersPhotosGet' smart constructor. +data UsersPhotosGet = UsersPhotosGet + { _upgQuotaUser :: !(Maybe Text) + , _upgPrettyPrint :: !Bool + , _upgUserIp :: !(Maybe Text) + , _upgKey :: !(Maybe Text) + , _upgOauthToken :: !(Maybe Text) + , _upgUserKey :: !Text + , _upgFields :: !(Maybe Text) + , _upgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersPhotosGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upgQuotaUser' +-- +-- * 'upgPrettyPrint' +-- +-- * 'upgUserIp' +-- +-- * 'upgKey' +-- +-- * 'upgOauthToken' +-- +-- * 'upgUserKey' +-- +-- * 'upgFields' +-- +-- * 'upgAlt' +usersPhotosGet + :: Text -- ^ 'userKey' + -> UsersPhotosGet +usersPhotosGet pUpgUserKey_ = + UsersPhotosGet + { _upgQuotaUser = Nothing + , _upgPrettyPrint = True + , _upgUserIp = Nothing + , _upgKey = Nothing + , _upgOauthToken = Nothing + , _upgUserKey = pUpgUserKey_ + , _upgFields = Nothing + , _upgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +upgQuotaUser :: Lens' UsersPhotosGet' (Maybe Text) +upgQuotaUser + = lens _upgQuotaUser (\ s a -> s{_upgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +upgPrettyPrint :: Lens' UsersPhotosGet' Bool +upgPrettyPrint + = lens _upgPrettyPrint + (\ s a -> s{_upgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +upgUserIp :: Lens' UsersPhotosGet' (Maybe Text) +upgUserIp + = lens _upgUserIp (\ s a -> s{_upgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +upgKey :: Lens' UsersPhotosGet' (Maybe Text) +upgKey = lens _upgKey (\ s a -> s{_upgKey = a}) + +-- | OAuth 2.0 token for the current user. +upgOauthToken :: Lens' UsersPhotosGet' (Maybe Text) +upgOauthToken + = lens _upgOauthToken + (\ s a -> s{_upgOauthToken = a}) + +-- | Email or immutable Id of the user +upgUserKey :: Lens' UsersPhotosGet' Text +upgUserKey + = lens _upgUserKey (\ s a -> s{_upgUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +upgFields :: Lens' UsersPhotosGet' (Maybe Text) +upgFields + = lens _upgFields (\ s a -> s{_upgFields = a}) + +-- | Data format for the response. +upgAlt :: Lens' UsersPhotosGet' Text +upgAlt = lens _upgAlt (\ s a -> s{_upgAlt = a}) + +instance GoogleRequest UsersPhotosGet' where + type Rs UsersPhotosGet' = UserPhoto + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersPhotosGet{..} + = go _upgQuotaUser _upgPrettyPrint _upgUserIp _upgKey + _upgOauthToken + _upgUserKey + _upgFields + _upgAlt + where go + = clientWithRoute (Proxy :: Proxy UsersPhotosGetAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Patch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Patch.hs new file mode 100644 index 000000000..531eaf430 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Patch.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Photos.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a photo for the user. This method supports patch semantics. +-- +-- /See:/ for @DirectoryUsersPhotosPatch@. +module Directory.Users.Photos.Patch + ( + -- * REST Resource + UsersPhotosPatchAPI + + -- * Creating a Request + , usersPhotosPatch + , UsersPhotosPatch + + -- * Request Lenses + , uppQuotaUser + , uppPrettyPrint + , uppUserIp + , uppKey + , uppOauthToken + , uppUserKey + , uppFields + , uppAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersPhotosPatch@ which the +-- 'UsersPhotosPatch' request conforms to. +type UsersPhotosPatchAPI = + "users" :> + Capture "userKey" Text :> + "photos" :> "thumbnail" :> Patch '[JSON] UserPhoto + +-- | Add a photo for the user. This method supports patch semantics. +-- +-- /See:/ 'usersPhotosPatch' smart constructor. +data UsersPhotosPatch = UsersPhotosPatch + { _uppQuotaUser :: !(Maybe Text) + , _uppPrettyPrint :: !Bool + , _uppUserIp :: !(Maybe Text) + , _uppKey :: !(Maybe Text) + , _uppOauthToken :: !(Maybe Text) + , _uppUserKey :: !Text + , _uppFields :: !(Maybe Text) + , _uppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersPhotosPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uppQuotaUser' +-- +-- * 'uppPrettyPrint' +-- +-- * 'uppUserIp' +-- +-- * 'uppKey' +-- +-- * 'uppOauthToken' +-- +-- * 'uppUserKey' +-- +-- * 'uppFields' +-- +-- * 'uppAlt' +usersPhotosPatch + :: Text -- ^ 'userKey' + -> UsersPhotosPatch +usersPhotosPatch pUppUserKey_ = + UsersPhotosPatch + { _uppQuotaUser = Nothing + , _uppPrettyPrint = True + , _uppUserIp = Nothing + , _uppKey = Nothing + , _uppOauthToken = Nothing + , _uppUserKey = pUppUserKey_ + , _uppFields = Nothing + , _uppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uppQuotaUser :: Lens' UsersPhotosPatch' (Maybe Text) +uppQuotaUser + = lens _uppQuotaUser (\ s a -> s{_uppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uppPrettyPrint :: Lens' UsersPhotosPatch' Bool +uppPrettyPrint + = lens _uppPrettyPrint + (\ s a -> s{_uppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uppUserIp :: Lens' UsersPhotosPatch' (Maybe Text) +uppUserIp + = lens _uppUserIp (\ s a -> s{_uppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uppKey :: Lens' UsersPhotosPatch' (Maybe Text) +uppKey = lens _uppKey (\ s a -> s{_uppKey = a}) + +-- | OAuth 2.0 token for the current user. +uppOauthToken :: Lens' UsersPhotosPatch' (Maybe Text) +uppOauthToken + = lens _uppOauthToken + (\ s a -> s{_uppOauthToken = a}) + +-- | Email or immutable Id of the user +uppUserKey :: Lens' UsersPhotosPatch' Text +uppUserKey + = lens _uppUserKey (\ s a -> s{_uppUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uppFields :: Lens' UsersPhotosPatch' (Maybe Text) +uppFields + = lens _uppFields (\ s a -> s{_uppFields = a}) + +-- | Data format for the response. +uppAlt :: Lens' UsersPhotosPatch' Text +uppAlt = lens _uppAlt (\ s a -> s{_uppAlt = a}) + +instance GoogleRequest UsersPhotosPatch' where + type Rs UsersPhotosPatch' = UserPhoto + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersPhotosPatch{..} + = go _uppQuotaUser _uppPrettyPrint _uppUserIp _uppKey + _uppOauthToken + _uppUserKey + _uppFields + _uppAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersPhotosPatchAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Update.hs new file mode 100644 index 000000000..cfd1bbbc8 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Photos/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Photos.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a photo for the user +-- +-- /See:/ for @DirectoryUsersPhotosUpdate@. +module Directory.Users.Photos.Update + ( + -- * REST Resource + UsersPhotosUpdateAPI + + -- * Creating a Request + , usersPhotosUpdate + , UsersPhotosUpdate + + -- * Request Lenses + , upuQuotaUser + , upuPrettyPrint + , upuUserIp + , upuKey + , upuOauthToken + , upuUserKey + , upuFields + , upuAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersPhotosUpdate@ which the +-- 'UsersPhotosUpdate' request conforms to. +type UsersPhotosUpdateAPI = + "users" :> + Capture "userKey" Text :> + "photos" :> "thumbnail" :> Put '[JSON] UserPhoto + +-- | Add a photo for the user +-- +-- /See:/ 'usersPhotosUpdate' smart constructor. +data UsersPhotosUpdate = UsersPhotosUpdate + { _upuQuotaUser :: !(Maybe Text) + , _upuPrettyPrint :: !Bool + , _upuUserIp :: !(Maybe Text) + , _upuKey :: !(Maybe Text) + , _upuOauthToken :: !(Maybe Text) + , _upuUserKey :: !Text + , _upuFields :: !(Maybe Text) + , _upuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersPhotosUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upuQuotaUser' +-- +-- * 'upuPrettyPrint' +-- +-- * 'upuUserIp' +-- +-- * 'upuKey' +-- +-- * 'upuOauthToken' +-- +-- * 'upuUserKey' +-- +-- * 'upuFields' +-- +-- * 'upuAlt' +usersPhotosUpdate + :: Text -- ^ 'userKey' + -> UsersPhotosUpdate +usersPhotosUpdate pUpuUserKey_ = + UsersPhotosUpdate + { _upuQuotaUser = Nothing + , _upuPrettyPrint = True + , _upuUserIp = Nothing + , _upuKey = Nothing + , _upuOauthToken = Nothing + , _upuUserKey = pUpuUserKey_ + , _upuFields = Nothing + , _upuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +upuQuotaUser :: Lens' UsersPhotosUpdate' (Maybe Text) +upuQuotaUser + = lens _upuQuotaUser (\ s a -> s{_upuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +upuPrettyPrint :: Lens' UsersPhotosUpdate' Bool +upuPrettyPrint + = lens _upuPrettyPrint + (\ s a -> s{_upuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +upuUserIp :: Lens' UsersPhotosUpdate' (Maybe Text) +upuUserIp + = lens _upuUserIp (\ s a -> s{_upuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +upuKey :: Lens' UsersPhotosUpdate' (Maybe Text) +upuKey = lens _upuKey (\ s a -> s{_upuKey = a}) + +-- | OAuth 2.0 token for the current user. +upuOauthToken :: Lens' UsersPhotosUpdate' (Maybe Text) +upuOauthToken + = lens _upuOauthToken + (\ s a -> s{_upuOauthToken = a}) + +-- | Email or immutable Id of the user +upuUserKey :: Lens' UsersPhotosUpdate' Text +upuUserKey + = lens _upuUserKey (\ s a -> s{_upuUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +upuFields :: Lens' UsersPhotosUpdate' (Maybe Text) +upuFields + = lens _upuFields (\ s a -> s{_upuFields = a}) + +-- | Data format for the response. +upuAlt :: Lens' UsersPhotosUpdate' Text +upuAlt = lens _upuAlt (\ s a -> s{_upuAlt = a}) + +instance GoogleRequest UsersPhotosUpdate' where + type Rs UsersPhotosUpdate' = UserPhoto + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersPhotosUpdate{..} + = go _upuQuotaUser _upuPrettyPrint _upuUserIp _upuKey + _upuOauthToken + _upuUserKey + _upuFields + _upuAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersPhotosUpdateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Undelete.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Undelete.hs new file mode 100644 index 000000000..4744804be --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Undelete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Undelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Undelete a deleted user +-- +-- /See:/ for @DirectoryUsersUndelete@. +module Directory.Users.Undelete + ( + -- * REST Resource + UsersUndeleteAPI + + -- * Creating a Request + , usersUndelete + , UsersUndelete + + -- * Request Lenses + , uuQuotaUser + , uuPrettyPrint + , uuUserIp + , uuKey + , uuOauthToken + , uuUserKey + , uuFields + , uuAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersUndelete@ which the +-- 'UsersUndelete' request conforms to. +type UsersUndeleteAPI = + "users" :> + Capture "userKey" Text :> + "undelete" :> Post '[JSON] () + +-- | Undelete a deleted user +-- +-- /See:/ 'usersUndelete' smart constructor. +data UsersUndelete = UsersUndelete + { _uuQuotaUser :: !(Maybe Text) + , _uuPrettyPrint :: !Bool + , _uuUserIp :: !(Maybe Text) + , _uuKey :: !(Maybe Text) + , _uuOauthToken :: !(Maybe Text) + , _uuUserKey :: !Text + , _uuFields :: !(Maybe Text) + , _uuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersUndelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uuQuotaUser' +-- +-- * 'uuPrettyPrint' +-- +-- * 'uuUserIp' +-- +-- * 'uuKey' +-- +-- * 'uuOauthToken' +-- +-- * 'uuUserKey' +-- +-- * 'uuFields' +-- +-- * 'uuAlt' +usersUndelete + :: Text -- ^ 'userKey' + -> UsersUndelete +usersUndelete pUuUserKey_ = + UsersUndelete + { _uuQuotaUser = Nothing + , _uuPrettyPrint = True + , _uuUserIp = Nothing + , _uuKey = Nothing + , _uuOauthToken = Nothing + , _uuUserKey = pUuUserKey_ + , _uuFields = Nothing + , _uuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uuQuotaUser :: Lens' UsersUndelete' (Maybe Text) +uuQuotaUser + = lens _uuQuotaUser (\ s a -> s{_uuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uuPrettyPrint :: Lens' UsersUndelete' Bool +uuPrettyPrint + = lens _uuPrettyPrint + (\ s a -> s{_uuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uuUserIp :: Lens' UsersUndelete' (Maybe Text) +uuUserIp = lens _uuUserIp (\ s a -> s{_uuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uuKey :: Lens' UsersUndelete' (Maybe Text) +uuKey = lens _uuKey (\ s a -> s{_uuKey = a}) + +-- | OAuth 2.0 token for the current user. +uuOauthToken :: Lens' UsersUndelete' (Maybe Text) +uuOauthToken + = lens _uuOauthToken (\ s a -> s{_uuOauthToken = a}) + +-- | The immutable id of the user +uuUserKey :: Lens' UsersUndelete' Text +uuUserKey + = lens _uuUserKey (\ s a -> s{_uuUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uuFields :: Lens' UsersUndelete' (Maybe Text) +uuFields = lens _uuFields (\ s a -> s{_uuFields = a}) + +-- | Data format for the response. +uuAlt :: Lens' UsersUndelete' Text +uuAlt = lens _uuAlt (\ s a -> s{_uuAlt = a}) + +instance GoogleRequest UsersUndelete' where + type Rs UsersUndelete' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersUndelete{..} + = go _uuQuotaUser _uuPrettyPrint _uuUserIp _uuKey + _uuOauthToken + _uuUserKey + _uuFields + _uuAlt + where go + = clientWithRoute (Proxy :: Proxy UsersUndeleteAPI) r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Update.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Update.hs new file mode 100644 index 000000000..dcd292a5f --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Update.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | update user +-- +-- /See:/ for @DirectoryUsersUpdate@. +module Directory.Users.Update + ( + -- * REST Resource + UsersUpdateAPI + + -- * Creating a Request + , usersUpdate + , UsersUpdate + + -- * Request Lenses + , uQuotaUser + , uPrettyPrint + , uUserIp + , uKey + , uOauthToken + , uUserKey + , uFields + , uAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersUpdate@ which the +-- 'UsersUpdate' request conforms to. +type UsersUpdateAPI = + "users" :> Capture "userKey" Text :> Put '[JSON] User + +-- | update user +-- +-- /See:/ 'usersUpdate' smart constructor. +data UsersUpdate = UsersUpdate + { _uQuotaUser :: !(Maybe Text) + , _uPrettyPrint :: !Bool + , _uUserIp :: !(Maybe Text) + , _uKey :: !(Maybe Text) + , _uOauthToken :: !(Maybe Text) + , _uUserKey :: !Text + , _uFields :: !(Maybe Text) + , _uAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uQuotaUser' +-- +-- * 'uPrettyPrint' +-- +-- * 'uUserIp' +-- +-- * 'uKey' +-- +-- * 'uOauthToken' +-- +-- * 'uUserKey' +-- +-- * 'uFields' +-- +-- * 'uAlt' +usersUpdate + :: Text -- ^ 'userKey' + -> UsersUpdate +usersUpdate pUUserKey_ = + UsersUpdate + { _uQuotaUser = Nothing + , _uPrettyPrint = True + , _uUserIp = Nothing + , _uKey = Nothing + , _uOauthToken = Nothing + , _uUserKey = pUUserKey_ + , _uFields = Nothing + , _uAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uQuotaUser :: Lens' UsersUpdate' (Maybe Text) +uQuotaUser + = lens _uQuotaUser (\ s a -> s{_uQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uPrettyPrint :: Lens' UsersUpdate' Bool +uPrettyPrint + = lens _uPrettyPrint (\ s a -> s{_uPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uUserIp :: Lens' UsersUpdate' (Maybe Text) +uUserIp = lens _uUserIp (\ s a -> s{_uUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uKey :: Lens' UsersUpdate' (Maybe Text) +uKey = lens _uKey (\ s a -> s{_uKey = a}) + +-- | OAuth 2.0 token for the current user. +uOauthToken :: Lens' UsersUpdate' (Maybe Text) +uOauthToken + = lens _uOauthToken (\ s a -> s{_uOauthToken = a}) + +-- | Email or immutable Id of the user. If Id, it should match with id of +-- user object +uUserKey :: Lens' UsersUpdate' Text +uUserKey = lens _uUserKey (\ s a -> s{_uUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +uFields :: Lens' UsersUpdate' (Maybe Text) +uFields = lens _uFields (\ s a -> s{_uFields = a}) + +-- | Data format for the response. +uAlt :: Lens' UsersUpdate' Text +uAlt = lens _uAlt (\ s a -> s{_uAlt = a}) + +instance GoogleRequest UsersUpdate' where + type Rs UsersUpdate' = User + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersUpdate{..} + = go _uQuotaUser _uPrettyPrint _uUserIp _uKey + _uOauthToken + _uUserKey + _uFields + _uAlt + where go + = clientWithRoute (Proxy :: Proxy UsersUpdateAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Watch.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Watch.hs new file mode 100644 index 000000000..8ffab5495 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Watch.hs @@ -0,0 +1,288 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.Users.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes in users list +-- +-- /See:/ for @DirectoryUsersWatch@. +module Directory.Users.Watch + ( + -- * REST Resource + UsersWatchAPI + + -- * Creating a Request + , usersWatch + , UsersWatch + + -- * Request Lenses + , uwEvent + , uwQuotaUser + , uwPrettyPrint + , uwOrderBy + , uwViewType + , uwCustomFieldMask + , uwUserIp + , uwDomain + , uwShowDeleted + , uwSortOrder + , uwCustomer + , uwKey + , uwQuery + , uwProjection + , uwPageToken + , uwOauthToken + , uwMaxResults + , uwFields + , uwAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryUsersWatch@ which the +-- 'UsersWatch' request conforms to. +type UsersWatchAPI = + "users" :> + "watch" :> + QueryParam "event" Text :> + QueryParam "orderBy" Text :> + QueryParam "viewType" Text :> + QueryParam "customFieldMask" Text :> + QueryParam "domain" Text :> + QueryParam "showDeleted" Text :> + QueryParam "sortOrder" Text :> + QueryParam "customer" Text :> + QueryParam "query" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Post '[JSON] Channel + +-- | Watch for changes in users list +-- +-- /See:/ 'usersWatch' smart constructor. +data UsersWatch = UsersWatch + { _uwEvent :: !(Maybe Text) + , _uwQuotaUser :: !(Maybe Text) + , _uwPrettyPrint :: !Bool + , _uwOrderBy :: !(Maybe Text) + , _uwViewType :: !Text + , _uwCustomFieldMask :: !(Maybe Text) + , _uwUserIp :: !(Maybe Text) + , _uwDomain :: !(Maybe Text) + , _uwShowDeleted :: !(Maybe Text) + , _uwSortOrder :: !(Maybe Text) + , _uwCustomer :: !(Maybe Text) + , _uwKey :: !(Maybe Text) + , _uwQuery :: !(Maybe Text) + , _uwProjection :: !Text + , _uwPageToken :: !(Maybe Text) + , _uwOauthToken :: !(Maybe Text) + , _uwMaxResults :: !(Maybe Int32) + , _uwFields :: !(Maybe Text) + , _uwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uwEvent' +-- +-- * 'uwQuotaUser' +-- +-- * 'uwPrettyPrint' +-- +-- * 'uwOrderBy' +-- +-- * 'uwViewType' +-- +-- * 'uwCustomFieldMask' +-- +-- * 'uwUserIp' +-- +-- * 'uwDomain' +-- +-- * 'uwShowDeleted' +-- +-- * 'uwSortOrder' +-- +-- * 'uwCustomer' +-- +-- * 'uwKey' +-- +-- * 'uwQuery' +-- +-- * 'uwProjection' +-- +-- * 'uwPageToken' +-- +-- * 'uwOauthToken' +-- +-- * 'uwMaxResults' +-- +-- * 'uwFields' +-- +-- * 'uwAlt' +usersWatch + :: UsersWatch +usersWatch = + UsersWatch + { _uwEvent = Nothing + , _uwQuotaUser = Nothing + , _uwPrettyPrint = True + , _uwOrderBy = Nothing + , _uwViewType = "admin_view" + , _uwCustomFieldMask = Nothing + , _uwUserIp = Nothing + , _uwDomain = Nothing + , _uwShowDeleted = Nothing + , _uwSortOrder = Nothing + , _uwCustomer = Nothing + , _uwKey = Nothing + , _uwQuery = Nothing + , _uwProjection = "basic" + , _uwPageToken = Nothing + , _uwOauthToken = Nothing + , _uwMaxResults = Nothing + , _uwFields = Nothing + , _uwAlt = "json" + } + +-- | Event on which subscription is intended (if subscribing) +uwEvent :: Lens' UsersWatch' (Maybe Text) +uwEvent = lens _uwEvent (\ s a -> s{_uwEvent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uwQuotaUser :: Lens' UsersWatch' (Maybe Text) +uwQuotaUser + = lens _uwQuotaUser (\ s a -> s{_uwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uwPrettyPrint :: Lens' UsersWatch' Bool +uwPrettyPrint + = lens _uwPrettyPrint + (\ s a -> s{_uwPrettyPrint = a}) + +-- | Column to use for sorting results +uwOrderBy :: Lens' UsersWatch' (Maybe Text) +uwOrderBy + = lens _uwOrderBy (\ s a -> s{_uwOrderBy = a}) + +-- | Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. +uwViewType :: Lens' UsersWatch' Text +uwViewType + = lens _uwViewType (\ s a -> s{_uwViewType = a}) + +-- | Comma-separated list of schema names. All fields from these schemas are +-- fetched. This should only be set when projection=custom. +uwCustomFieldMask :: Lens' UsersWatch' (Maybe Text) +uwCustomFieldMask + = lens _uwCustomFieldMask + (\ s a -> s{_uwCustomFieldMask = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uwUserIp :: Lens' UsersWatch' (Maybe Text) +uwUserIp = lens _uwUserIp (\ s a -> s{_uwUserIp = a}) + +-- | Name of the domain. Fill this field to get users from only this domain. +-- To return all users in a multi-domain fill customer field instead. +uwDomain :: Lens' UsersWatch' (Maybe Text) +uwDomain = lens _uwDomain (\ s a -> s{_uwDomain = a}) + +-- | If set to true retrieves the list of deleted users. Default is false +uwShowDeleted :: Lens' UsersWatch' (Maybe Text) +uwShowDeleted + = lens _uwShowDeleted + (\ s a -> s{_uwShowDeleted = a}) + +-- | Whether to return results in ascending or descending order. +uwSortOrder :: Lens' UsersWatch' (Maybe Text) +uwSortOrder + = lens _uwSortOrder (\ s a -> s{_uwSortOrder = a}) + +-- | Immutable id of the Google Apps account. In case of multi-domain, to +-- fetch all users for a customer, fill this field instead of domain. +uwCustomer :: Lens' UsersWatch' (Maybe Text) +uwCustomer + = lens _uwCustomer (\ s a -> s{_uwCustomer = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uwKey :: Lens' UsersWatch' (Maybe Text) +uwKey = lens _uwKey (\ s a -> s{_uwKey = a}) + +-- | Query string search. Should be of the form \"\". Complete documentation +-- is at +-- https:\/\/developers.google.com\/admin-sdk\/directory\/v1\/guides\/search-users +uwQuery :: Lens' UsersWatch' (Maybe Text) +uwQuery = lens _uwQuery (\ s a -> s{_uwQuery = a}) + +-- | What subset of fields to fetch for this user. +uwProjection :: Lens' UsersWatch' Text +uwProjection + = lens _uwProjection (\ s a -> s{_uwProjection = a}) + +-- | Token to specify next page in the list +uwPageToken :: Lens' UsersWatch' (Maybe Text) +uwPageToken + = lens _uwPageToken (\ s a -> s{_uwPageToken = a}) + +-- | OAuth 2.0 token for the current user. +uwOauthToken :: Lens' UsersWatch' (Maybe Text) +uwOauthToken + = lens _uwOauthToken (\ s a -> s{_uwOauthToken = a}) + +-- | Maximum number of results to return. Default is 100. Max allowed is 500 +uwMaxResults :: Lens' UsersWatch' (Maybe Int32) +uwMaxResults + = lens _uwMaxResults (\ s a -> s{_uwMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +uwFields :: Lens' UsersWatch' (Maybe Text) +uwFields = lens _uwFields (\ s a -> s{_uwFields = a}) + +-- | Data format for the response. +uwAlt :: Lens' UsersWatch' Text +uwAlt = lens _uwAlt (\ s a -> s{_uwAlt = a}) + +instance GoogleRequest UsersWatch' where + type Rs UsersWatch' = Channel + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u UsersWatch{..} + = go _uwEvent _uwQuotaUser _uwPrettyPrint _uwOrderBy + (Just _uwViewType) + _uwCustomFieldMask + _uwUserIp + _uwDomain + _uwShowDeleted + _uwSortOrder + _uwCustomer + _uwKey + _uwQuery + (Just _uwProjection) + _uwPageToken + _uwOauthToken + _uwMaxResults + _uwFields + _uwAlt + where go + = clientWithRoute (Proxy :: Proxy UsersWatchAPI) r u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Generate.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Generate.hs new file mode 100644 index 000000000..096cb1650 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Generate.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.VerificationCodes.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate new backup verification codes for the user. +-- +-- /See:/ for @DirectoryVerificationCodesGenerate@. +module Directory.VerificationCodes.Generate + ( + -- * REST Resource + VerificationCodesGenerateAPI + + -- * Creating a Request + , verificationCodesGenerate + , VerificationCodesGenerate + + -- * Request Lenses + , vcgQuotaUser + , vcgPrettyPrint + , vcgUserIp + , vcgKey + , vcgOauthToken + , vcgUserKey + , vcgFields + , vcgAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryVerificationCodesGenerate@ which the +-- 'VerificationCodesGenerate' request conforms to. +type VerificationCodesGenerateAPI = + "users" :> + Capture "userKey" Text :> + "verificationCodes" :> "generate" :> Post '[JSON] () + +-- | Generate new backup verification codes for the user. +-- +-- /See:/ 'verificationCodesGenerate' smart constructor. +data VerificationCodesGenerate = VerificationCodesGenerate + { _vcgQuotaUser :: !(Maybe Text) + , _vcgPrettyPrint :: !Bool + , _vcgUserIp :: !(Maybe Text) + , _vcgKey :: !(Maybe Text) + , _vcgOauthToken :: !(Maybe Text) + , _vcgUserKey :: !Text + , _vcgFields :: !(Maybe Text) + , _vcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerificationCodesGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcgQuotaUser' +-- +-- * 'vcgPrettyPrint' +-- +-- * 'vcgUserIp' +-- +-- * 'vcgKey' +-- +-- * 'vcgOauthToken' +-- +-- * 'vcgUserKey' +-- +-- * 'vcgFields' +-- +-- * 'vcgAlt' +verificationCodesGenerate + :: Text -- ^ 'userKey' + -> VerificationCodesGenerate +verificationCodesGenerate pVcgUserKey_ = + VerificationCodesGenerate + { _vcgQuotaUser = Nothing + , _vcgPrettyPrint = True + , _vcgUserIp = Nothing + , _vcgKey = Nothing + , _vcgOauthToken = Nothing + , _vcgUserKey = pVcgUserKey_ + , _vcgFields = Nothing + , _vcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vcgQuotaUser :: Lens' VerificationCodesGenerate' (Maybe Text) +vcgQuotaUser + = lens _vcgQuotaUser (\ s a -> s{_vcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vcgPrettyPrint :: Lens' VerificationCodesGenerate' Bool +vcgPrettyPrint + = lens _vcgPrettyPrint + (\ s a -> s{_vcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vcgUserIp :: Lens' VerificationCodesGenerate' (Maybe Text) +vcgUserIp + = lens _vcgUserIp (\ s a -> s{_vcgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vcgKey :: Lens' VerificationCodesGenerate' (Maybe Text) +vcgKey = lens _vcgKey (\ s a -> s{_vcgKey = a}) + +-- | OAuth 2.0 token for the current user. +vcgOauthToken :: Lens' VerificationCodesGenerate' (Maybe Text) +vcgOauthToken + = lens _vcgOauthToken + (\ s a -> s{_vcgOauthToken = a}) + +-- | Email or immutable Id of the user +vcgUserKey :: Lens' VerificationCodesGenerate' Text +vcgUserKey + = lens _vcgUserKey (\ s a -> s{_vcgUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +vcgFields :: Lens' VerificationCodesGenerate' (Maybe Text) +vcgFields + = lens _vcgFields (\ s a -> s{_vcgFields = a}) + +-- | Data format for the response. +vcgAlt :: Lens' VerificationCodesGenerate' Text +vcgAlt = lens _vcgAlt (\ s a -> s{_vcgAlt = a}) + +instance GoogleRequest VerificationCodesGenerate' + where + type Rs VerificationCodesGenerate' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u VerificationCodesGenerate{..} + = go _vcgQuotaUser _vcgPrettyPrint _vcgUserIp _vcgKey + _vcgOauthToken + _vcgUserKey + _vcgFields + _vcgAlt + where go + = clientWithRoute + (Proxy :: Proxy VerificationCodesGenerateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Invalidate.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Invalidate.hs new file mode 100644 index 000000000..0bdd9edc9 --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/Invalidate.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.VerificationCodes.Invalidate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Invalidate the current backup verification codes for the user. +-- +-- /See:/ for @DirectoryVerificationCodesInvalidate@. +module Directory.VerificationCodes.Invalidate + ( + -- * REST Resource + VerificationCodesInvalidateAPI + + -- * Creating a Request + , verificationCodesInvalidate + , VerificationCodesInvalidate + + -- * Request Lenses + , vciQuotaUser + , vciPrettyPrint + , vciUserIp + , vciKey + , vciOauthToken + , vciUserKey + , vciFields + , vciAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryVerificationCodesInvalidate@ which the +-- 'VerificationCodesInvalidate' request conforms to. +type VerificationCodesInvalidateAPI = + "users" :> + Capture "userKey" Text :> + "verificationCodes" :> + "invalidate" :> Post '[JSON] () + +-- | Invalidate the current backup verification codes for the user. +-- +-- /See:/ 'verificationCodesInvalidate' smart constructor. +data VerificationCodesInvalidate = VerificationCodesInvalidate + { _vciQuotaUser :: !(Maybe Text) + , _vciPrettyPrint :: !Bool + , _vciUserIp :: !(Maybe Text) + , _vciKey :: !(Maybe Text) + , _vciOauthToken :: !(Maybe Text) + , _vciUserKey :: !Text + , _vciFields :: !(Maybe Text) + , _vciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerificationCodesInvalidate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vciQuotaUser' +-- +-- * 'vciPrettyPrint' +-- +-- * 'vciUserIp' +-- +-- * 'vciKey' +-- +-- * 'vciOauthToken' +-- +-- * 'vciUserKey' +-- +-- * 'vciFields' +-- +-- * 'vciAlt' +verificationCodesInvalidate + :: Text -- ^ 'userKey' + -> VerificationCodesInvalidate +verificationCodesInvalidate pVciUserKey_ = + VerificationCodesInvalidate + { _vciQuotaUser = Nothing + , _vciPrettyPrint = True + , _vciUserIp = Nothing + , _vciKey = Nothing + , _vciOauthToken = Nothing + , _vciUserKey = pVciUserKey_ + , _vciFields = Nothing + , _vciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vciQuotaUser :: Lens' VerificationCodesInvalidate' (Maybe Text) +vciQuotaUser + = lens _vciQuotaUser (\ s a -> s{_vciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vciPrettyPrint :: Lens' VerificationCodesInvalidate' Bool +vciPrettyPrint + = lens _vciPrettyPrint + (\ s a -> s{_vciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vciUserIp :: Lens' VerificationCodesInvalidate' (Maybe Text) +vciUserIp + = lens _vciUserIp (\ s a -> s{_vciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vciKey :: Lens' VerificationCodesInvalidate' (Maybe Text) +vciKey = lens _vciKey (\ s a -> s{_vciKey = a}) + +-- | OAuth 2.0 token for the current user. +vciOauthToken :: Lens' VerificationCodesInvalidate' (Maybe Text) +vciOauthToken + = lens _vciOauthToken + (\ s a -> s{_vciOauthToken = a}) + +-- | Email or immutable Id of the user +vciUserKey :: Lens' VerificationCodesInvalidate' Text +vciUserKey + = lens _vciUserKey (\ s a -> s{_vciUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +vciFields :: Lens' VerificationCodesInvalidate' (Maybe Text) +vciFields + = lens _vciFields (\ s a -> s{_vciFields = a}) + +-- | Data format for the response. +vciAlt :: Lens' VerificationCodesInvalidate' Text +vciAlt = lens _vciAlt (\ s a -> s{_vciAlt = a}) + +instance GoogleRequest VerificationCodesInvalidate' + where + type Rs VerificationCodesInvalidate' = () + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u VerificationCodesInvalidate{..} + = go _vciQuotaUser _vciPrettyPrint _vciUserIp _vciKey + _vciOauthToken + _vciUserKey + _vciFields + _vciAlt + where go + = clientWithRoute + (Proxy :: Proxy VerificationCodesInvalidateAPI) + r + u diff --git a/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/List.hs b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/List.hs new file mode 100644 index 000000000..e548f55aa --- /dev/null +++ b/gogol-admin-directory/gen/Network/Google/Resource/Directory/VerificationCodes/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Directory.VerificationCodes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the current set of valid backup verification codes for the +-- specified user. +-- +-- /See:/ for @DirectoryVerificationCodesList@. +module Directory.VerificationCodes.List + ( + -- * REST Resource + VerificationCodesListAPI + + -- * Creating a Request + , verificationCodesList + , VerificationCodesList + + -- * Request Lenses + , vclQuotaUser + , vclPrettyPrint + , vclUserIp + , vclKey + , vclOauthToken + , vclUserKey + , vclFields + , vclAlt + ) where + +import Network.Google.AdminDirectory.Types +import Network.Google.Prelude + +-- | A resource alias for @DirectoryVerificationCodesList@ which the +-- 'VerificationCodesList' request conforms to. +type VerificationCodesListAPI = + "users" :> + Capture "userKey" Text :> + "verificationCodes" :> Get '[JSON] VerificationCodes + +-- | Returns the current set of valid backup verification codes for the +-- specified user. +-- +-- /See:/ 'verificationCodesList' smart constructor. +data VerificationCodesList = VerificationCodesList + { _vclQuotaUser :: !(Maybe Text) + , _vclPrettyPrint :: !Bool + , _vclUserIp :: !(Maybe Text) + , _vclKey :: !(Maybe Text) + , _vclOauthToken :: !(Maybe Text) + , _vclUserKey :: !Text + , _vclFields :: !(Maybe Text) + , _vclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerificationCodesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vclQuotaUser' +-- +-- * 'vclPrettyPrint' +-- +-- * 'vclUserIp' +-- +-- * 'vclKey' +-- +-- * 'vclOauthToken' +-- +-- * 'vclUserKey' +-- +-- * 'vclFields' +-- +-- * 'vclAlt' +verificationCodesList + :: Text -- ^ 'userKey' + -> VerificationCodesList +verificationCodesList pVclUserKey_ = + VerificationCodesList + { _vclQuotaUser = Nothing + , _vclPrettyPrint = True + , _vclUserIp = Nothing + , _vclKey = Nothing + , _vclOauthToken = Nothing + , _vclUserKey = pVclUserKey_ + , _vclFields = Nothing + , _vclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vclQuotaUser :: Lens' VerificationCodesList' (Maybe Text) +vclQuotaUser + = lens _vclQuotaUser (\ s a -> s{_vclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vclPrettyPrint :: Lens' VerificationCodesList' Bool +vclPrettyPrint + = lens _vclPrettyPrint + (\ s a -> s{_vclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vclUserIp :: Lens' VerificationCodesList' (Maybe Text) +vclUserIp + = lens _vclUserIp (\ s a -> s{_vclUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vclKey :: Lens' VerificationCodesList' (Maybe Text) +vclKey = lens _vclKey (\ s a -> s{_vclKey = a}) + +-- | OAuth 2.0 token for the current user. +vclOauthToken :: Lens' VerificationCodesList' (Maybe Text) +vclOauthToken + = lens _vclOauthToken + (\ s a -> s{_vclOauthToken = a}) + +-- | Identifies the user in the API request. The value can be the user\'s +-- primary email address, alias email address, or unique user ID. +vclUserKey :: Lens' VerificationCodesList' Text +vclUserKey + = lens _vclUserKey (\ s a -> s{_vclUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +vclFields :: Lens' VerificationCodesList' (Maybe Text) +vclFields + = lens _vclFields (\ s a -> s{_vclFields = a}) + +-- | Data format for the response. +vclAlt :: Lens' VerificationCodesList' Text +vclAlt = lens _vclAlt (\ s a -> s{_vclAlt = a}) + +instance GoogleRequest VerificationCodesList' where + type Rs VerificationCodesList' = VerificationCodes + request = requestWithRoute defReq adminDirectoryURL + requestWithRoute r u VerificationCodesList{..} + = go _vclQuotaUser _vclPrettyPrint _vclUserIp _vclKey + _vclOauthToken + _vclUserKey + _vclFields + _vclAlt + where go + = clientWithRoute + (Proxy :: Proxy VerificationCodesListAPI) + r + u diff --git a/gogol-admin-directory/gogol-admin-directory.cabal b/gogol-admin-directory/gogol-admin-directory.cabal new file mode 100644 index 000000000..72bba702e --- /dev/null +++ b/gogol-admin-directory/gogol-admin-directory.cabal @@ -0,0 +1,111 @@ +name: gogol-admin-directory +version: 0.0.1 +synopsis: Admin Directory API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Admin SDK Directory API lets you view and manage enterprise + resources such as users and groups, administrative notifications, + security features, and more. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdminDirectory + , Network.Google.AdminDirectory.Types + , Network.Google.Resource.Admin.Channels.Stop + , Network.Google.Resource.Directory.Asps.Delete + , Network.Google.Resource.Directory.Asps.Get + , Network.Google.Resource.Directory.Asps.List + , Network.Google.Resource.Directory.Chromeosdevices.Get + , Network.Google.Resource.Directory.Chromeosdevices.List + , Network.Google.Resource.Directory.Chromeosdevices.Patch + , Network.Google.Resource.Directory.Chromeosdevices.Update + , Network.Google.Resource.Directory.Groups.Aliases.Delete + , Network.Google.Resource.Directory.Groups.Aliases.Insert + , Network.Google.Resource.Directory.Groups.Aliases.List + , Network.Google.Resource.Directory.Groups.Delete + , Network.Google.Resource.Directory.Groups.Get + , Network.Google.Resource.Directory.Groups.Insert + , Network.Google.Resource.Directory.Groups.List + , Network.Google.Resource.Directory.Groups.Patch + , Network.Google.Resource.Directory.Groups.Update + , Network.Google.Resource.Directory.Members.Delete + , Network.Google.Resource.Directory.Members.Get + , Network.Google.Resource.Directory.Members.Insert + , Network.Google.Resource.Directory.Members.List + , Network.Google.Resource.Directory.Members.Patch + , Network.Google.Resource.Directory.Members.Update + , Network.Google.Resource.Directory.Mobiledevices.Action + , Network.Google.Resource.Directory.Mobiledevices.Delete + , Network.Google.Resource.Directory.Mobiledevices.Get + , Network.Google.Resource.Directory.Mobiledevices.List + , Network.Google.Resource.Directory.Notifications.Delete + , Network.Google.Resource.Directory.Notifications.Get + , Network.Google.Resource.Directory.Notifications.List + , Network.Google.Resource.Directory.Notifications.Patch + , Network.Google.Resource.Directory.Notifications.Update + , Network.Google.Resource.Directory.Orgunits.Delete + , Network.Google.Resource.Directory.Orgunits.Get + , Network.Google.Resource.Directory.Orgunits.Insert + , Network.Google.Resource.Directory.Orgunits.List + , Network.Google.Resource.Directory.Orgunits.Patch + , Network.Google.Resource.Directory.Orgunits.Update + , Network.Google.Resource.Directory.Schemas.Delete + , Network.Google.Resource.Directory.Schemas.Get + , Network.Google.Resource.Directory.Schemas.Insert + , Network.Google.Resource.Directory.Schemas.List + , Network.Google.Resource.Directory.Schemas.Patch + , Network.Google.Resource.Directory.Schemas.Update + , Network.Google.Resource.Directory.Tokens.Delete + , Network.Google.Resource.Directory.Tokens.Get + , Network.Google.Resource.Directory.Tokens.List + , Network.Google.Resource.Directory.Users.Aliases.Delete + , Network.Google.Resource.Directory.Users.Aliases.Insert + , Network.Google.Resource.Directory.Users.Aliases.List + , Network.Google.Resource.Directory.Users.Aliases.Watch + , Network.Google.Resource.Directory.Users.Delete + , Network.Google.Resource.Directory.Users.Get + , Network.Google.Resource.Directory.Users.Insert + , Network.Google.Resource.Directory.Users.List + , Network.Google.Resource.Directory.Users.MakeAdmin + , Network.Google.Resource.Directory.Users.Patch + , Network.Google.Resource.Directory.Users.Photos.Delete + , Network.Google.Resource.Directory.Users.Photos.Get + , Network.Google.Resource.Directory.Users.Photos.Patch + , Network.Google.Resource.Directory.Users.Photos.Update + , Network.Google.Resource.Directory.Users.Undelete + , Network.Google.Resource.Directory.Users.Update + , Network.Google.Resource.Directory.Users.Watch + , Network.Google.Resource.Directory.VerificationCodes.Generate + , Network.Google.Resource.Directory.VerificationCodes.Invalidate + , Network.Google.Resource.Directory.VerificationCodes.List + + other-modules: + Network.Google.AdminDirectory.Types.Product + , Network.Google.AdminDirectory.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-admin-directory/src/.gitkeep b/gogol-admin-directory/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-admin-emailmigration/LICENSE b/gogol-admin-emailmigration/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-admin-emailmigration/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-admin-emailmigration/Makefile b/gogol-admin-emailmigration/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-admin-emailmigration/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-admin-emailmigration/README.md b/gogol-admin-emailmigration/README.md new file mode 100644 index 000000000..9f0979fb8 --- /dev/null +++ b/gogol-admin-emailmigration/README.md @@ -0,0 +1,28 @@ +# gogol-admin-emailmigration + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Email Migration API v2. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-admin-emailmigration` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-admin-emailmigration/Setup.hs b/gogol-admin-emailmigration/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-admin-emailmigration/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration.hs b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration.hs new file mode 100644 index 000000000..a3ad5b84f --- /dev/null +++ b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration.hs @@ -0,0 +1,59 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdminEmailMigration +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Email Migration API lets you migrate emails of users to Google backends. +-- +-- /See:/ +module Network.Google.AdminEmailMigration + ( + -- * API + AdminEmailMigrationAPI + , adminEmailMigrationAPI + , adminEmailMigrationURL + + -- * Service Methods + + -- * REST Resources + + -- ** EmailMigrationMailInsert + , module EmailMigration.Mail.Insert + + -- * Types + + -- ** MailItem + , MailItem + , mailItem + , miIsDeleted + , miIsDraft + , miIsStarred + , miKind + , miIsUnread + , miLabels + , miIsInbox + , miIsTrash + , miIsSent + ) where + +import Network.Google.AdminEmailMigration.Types +import Network.Google.Prelude +import Network.Google.Resource.EmailMigration.Mail.Insert + +{- $resources +TODO +-} + +type AdminEmailMigrationAPI = Mail + +adminEmailMigrationAPI :: Proxy AdminEmailMigrationAPI +adminEmailMigrationAPI = Proxy diff --git a/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types.hs b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types.hs new file mode 100644 index 000000000..ecdc3810c --- /dev/null +++ b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types.hs @@ -0,0 +1,43 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminEmailMigration.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminEmailMigration.Types + ( + -- * Service URL + adminEmailMigrationURL + + -- * MailItem + , MailItem + , mailItem + , miIsDeleted + , miIsDraft + , miIsStarred + , miKind + , miIsUnread + , miLabels + , miIsInbox + , miIsTrash + , miIsSent + ) where + +import Network.Google.AdminEmailMigration.Types.Product +import Network.Google.AdminEmailMigration.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'email_migration_v2' of the Email Migration API v2. +adminEmailMigrationURL :: BaseURL +adminEmailMigrationURL + = BaseUrl Https + "https://www.googleapis.com/email/v2/users/" + 443 diff --git a/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Product.hs b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Product.hs new file mode 100644 index 000000000..59b94a216 --- /dev/null +++ b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Product.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminEmailMigration.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminEmailMigration.Types.Product where + +import Network.Google.AdminEmailMigration.Types.Sum +import Network.Google.Prelude + +-- | JSON template for MailItem object in Email Migration API. +-- +-- /See:/ 'mailItem' smart constructor. +data MailItem = MailItem + { _miIsDeleted :: !(Maybe Bool) + , _miIsDraft :: !(Maybe Bool) + , _miIsStarred :: !(Maybe Bool) + , _miKind :: !Text + , _miIsUnread :: !(Maybe Bool) + , _miLabels :: !(Maybe [Text]) + , _miIsInbox :: !(Maybe Bool) + , _miIsTrash :: !(Maybe Bool) + , _miIsSent :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MailItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miIsDeleted' +-- +-- * 'miIsDraft' +-- +-- * 'miIsStarred' +-- +-- * 'miKind' +-- +-- * 'miIsUnread' +-- +-- * 'miLabels' +-- +-- * 'miIsInbox' +-- +-- * 'miIsTrash' +-- +-- * 'miIsSent' +mailItem + :: MailItem +mailItem = + MailItem + { _miIsDeleted = Nothing + , _miIsDraft = Nothing + , _miIsStarred = Nothing + , _miKind = "mailItem" + , _miIsUnread = Nothing + , _miLabels = Nothing + , _miIsInbox = Nothing + , _miIsTrash = Nothing + , _miIsSent = Nothing + } + +-- | Boolean indicating if the mail is deleted (used in Vault) +miIsDeleted :: Lens' MailItem (Maybe Bool) +miIsDeleted + = lens _miIsDeleted (\ s a -> s{_miIsDeleted = a}) + +-- | Boolean indicating if the mail is draft +miIsDraft :: Lens' MailItem (Maybe Bool) +miIsDraft + = lens _miIsDraft (\ s a -> s{_miIsDraft = a}) + +-- | Boolean indicating if the mail is starred +miIsStarred :: Lens' MailItem (Maybe Bool) +miIsStarred + = lens _miIsStarred (\ s a -> s{_miIsStarred = a}) + +-- | Kind of resource this is. +miKind :: Lens' MailItem Text +miKind = lens _miKind (\ s a -> s{_miKind = a}) + +-- | Boolean indicating if the mail is unread +miIsUnread :: Lens' MailItem (Maybe Bool) +miIsUnread + = lens _miIsUnread (\ s a -> s{_miIsUnread = a}) + +-- | List of labels (strings) +miLabels :: Lens' MailItem [Text] +miLabels + = lens _miLabels (\ s a -> s{_miLabels = a}) . + _Default + . _Coerce + +-- | Boolean indicating if the mail is in inbox +miIsInbox :: Lens' MailItem (Maybe Bool) +miIsInbox + = lens _miIsInbox (\ s a -> s{_miIsInbox = a}) + +-- | Boolean indicating if the mail is in trash +miIsTrash :: Lens' MailItem (Maybe Bool) +miIsTrash + = lens _miIsTrash (\ s a -> s{_miIsTrash = a}) + +-- | Boolean indicating if the mail is in \'sent mails\' +miIsSent :: Lens' MailItem (Maybe Bool) +miIsSent = lens _miIsSent (\ s a -> s{_miIsSent = a}) + +instance FromJSON MailItem where + parseJSON + = withObject "MailItem" + (\ o -> + MailItem <$> + (o .:? "isDeleted") <*> (o .:? "isDraft") <*> + (o .:? "isStarred") + <*> (o .:? "kind" .!= "mailItem") + <*> (o .:? "isUnread") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "isInbox") + <*> (o .:? "isTrash") + <*> (o .:? "isSent")) + +instance ToJSON MailItem where + toJSON MailItem{..} + = object + (catMaybes + [("isDeleted" .=) <$> _miIsDeleted, + ("isDraft" .=) <$> _miIsDraft, + ("isStarred" .=) <$> _miIsStarred, + Just ("kind" .= _miKind), + ("isUnread" .=) <$> _miIsUnread, + ("labels" .=) <$> _miLabels, + ("isInbox" .=) <$> _miIsInbox, + ("isTrash" .=) <$> _miIsTrash, + ("isSent" .=) <$> _miIsSent]) diff --git a/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Sum.hs b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Sum.hs new file mode 100644 index 000000000..400b8da4e --- /dev/null +++ b/gogol-admin-emailmigration/gen/Network/Google/AdminEmailMigration/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminEmailMigration.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminEmailMigration.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-admin-emailmigration/gen/Network/Google/Resource/EmailMigration/Mail/Insert.hs b/gogol-admin-emailmigration/gen/Network/Google/Resource/EmailMigration/Mail/Insert.hs new file mode 100644 index 000000000..64290773d --- /dev/null +++ b/gogol-admin-emailmigration/gen/Network/Google/Resource/EmailMigration/Mail/Insert.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.EmailMigration.Mail.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert Mail into Google\'s Gmail backends +-- +-- /See:/ for @EmailMigrationMailInsert@. +module EmailMigration.Mail.Insert + ( + -- * REST Resource + MailInsertAPI + + -- * Creating a Request + , mailInsert + , MailInsert + + -- * Request Lenses + , miQuotaUser + , miPrettyPrint + , miUserIp + , miKey + , miOauthToken + , miUserKey + , miFields + , miAlt + ) where + +import Network.Google.AdminEmailMigration.Types +import Network.Google.Prelude + +-- | A resource alias for @EmailMigrationMailInsert@ which the +-- 'MailInsert' request conforms to. +type MailInsertAPI = + Capture "userKey" Text :> "mail" :> Post '[JSON] () + +-- | Insert Mail into Google\'s Gmail backends +-- +-- /See:/ 'mailInsert' smart constructor. +data MailInsert = MailInsert + { _miQuotaUser :: !(Maybe Text) + , _miPrettyPrint :: !Bool + , _miUserIp :: !(Maybe Text) + , _miKey :: !(Maybe Text) + , _miOauthToken :: !(Maybe Text) + , _miUserKey :: !Text + , _miFields :: !(Maybe Text) + , _miAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MailInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miQuotaUser' +-- +-- * 'miPrettyPrint' +-- +-- * 'miUserIp' +-- +-- * 'miKey' +-- +-- * 'miOauthToken' +-- +-- * 'miUserKey' +-- +-- * 'miFields' +-- +-- * 'miAlt' +mailInsert + :: Text -- ^ 'userKey' + -> MailInsert +mailInsert pMiUserKey_ = + MailInsert + { _miQuotaUser = Nothing + , _miPrettyPrint = True + , _miUserIp = Nothing + , _miKey = Nothing + , _miOauthToken = Nothing + , _miUserKey = pMiUserKey_ + , _miFields = Nothing + , _miAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miQuotaUser :: Lens' MailInsert' (Maybe Text) +miQuotaUser + = lens _miQuotaUser (\ s a -> s{_miQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miPrettyPrint :: Lens' MailInsert' Bool +miPrettyPrint + = lens _miPrettyPrint + (\ s a -> s{_miPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miUserIp :: Lens' MailInsert' (Maybe Text) +miUserIp = lens _miUserIp (\ s a -> s{_miUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miKey :: Lens' MailInsert' (Maybe Text) +miKey = lens _miKey (\ s a -> s{_miKey = a}) + +-- | OAuth 2.0 token for the current user. +miOauthToken :: Lens' MailInsert' (Maybe Text) +miOauthToken + = lens _miOauthToken (\ s a -> s{_miOauthToken = a}) + +-- | The email or immutable id of the user +miUserKey :: Lens' MailInsert' Text +miUserKey + = lens _miUserKey (\ s a -> s{_miUserKey = a}) + +-- | Selector specifying which fields to include in a partial response. +miFields :: Lens' MailInsert' (Maybe Text) +miFields = lens _miFields (\ s a -> s{_miFields = a}) + +-- | Data format for the response. +miAlt :: Lens' MailInsert' Text +miAlt = lens _miAlt (\ s a -> s{_miAlt = a}) + +instance GoogleRequest MailInsert' where + type Rs MailInsert' = () + request + = requestWithRoute defReq adminEmailMigrationURL + requestWithRoute r u MailInsert{..} + = go _miQuotaUser _miPrettyPrint _miUserIp _miKey + _miOauthToken + _miUserKey + _miFields + _miAlt + where go + = clientWithRoute (Proxy :: Proxy MailInsertAPI) r u diff --git a/gogol-admin-emailmigration/gogol-admin-emailmigration.cabal b/gogol-admin-emailmigration/gogol-admin-emailmigration.cabal new file mode 100644 index 000000000..70471c3a0 --- /dev/null +++ b/gogol-admin-emailmigration/gogol-admin-emailmigration.cabal @@ -0,0 +1,43 @@ +name: gogol-admin-emailmigration +version: 0.0.1 +synopsis: Email Migration API v2 Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Email Migration API lets you migrate emails of users to Google backends. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdminEmailMigration + , Network.Google.AdminEmailMigration.Types + , Network.Google.Resource.EmailMigration.Mail.Insert + + other-modules: + Network.Google.AdminEmailMigration.Types.Product + , Network.Google.AdminEmailMigration.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-admin-emailmigration/src/.gitkeep b/gogol-admin-emailmigration/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-admin-reports/LICENSE b/gogol-admin-reports/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-admin-reports/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-admin-reports/Makefile b/gogol-admin-reports/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-admin-reports/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-admin-reports/README.md b/gogol-admin-reports/README.md new file mode 100644 index 000000000..47efdd080 --- /dev/null +++ b/gogol-admin-reports/README.md @@ -0,0 +1,28 @@ +# gogol-admin-reports + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Admin Reports API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-admin-reports` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-admin-reports/Setup.hs b/gogol-admin-reports/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-admin-reports/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-admin-reports/gen/Network/Google/AdminReports.hs b/gogol-admin-reports/gen/Network/Google/AdminReports.hs new file mode 100644 index 000000000..323014fff --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/AdminReports.hs @@ -0,0 +1,116 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdminReports +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Allows the administrators of Google Apps customers to fetch reports +-- about the usage, collaboration, security and risk for their users. +-- +-- /See:/ +module Network.Google.AdminReports + ( + -- * API + AdminReportsAPI + , adminReportsAPI + , adminReportsURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdminChannelsStop + , module Admin.Channels.Stop + + -- ** ReportsActivitiesList + , module Reports.Activities.List + + -- ** ReportsActivitiesWatch + , module Reports.Activities.Watch + + -- ** ReportsCustomerUsageReportsGet + , module Reports.CustomerUsageReports.Get + + -- ** ReportsUserUsageReportGet + , module Reports.UserUsageReport.Get + + -- * Types + + -- ** UsageReports + , UsageReports + , usageReports + , urEtag + , urNextPageToken + , urUsageReports + , urKind + , urWarnings + + -- ** Activities + , Activities + , activities + , aEtag + , aNextPageToken + , aKind + , aItems + + -- ** UsageReport + , UsageReport + , usageReport + , uEtag + , uKind + , uDate + , uParameters + , uEntity + + -- ** Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- ** Activity + , Activity + , activity + , actEtag + , actIpAddress + , actKind + , actActor + , actOwnerDomain + , actEvents + , actId + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude +import Network.Google.Resource.Admin.Channels.Stop +import Network.Google.Resource.Reports.Activities.List +import Network.Google.Resource.Reports.Activities.Watch +import Network.Google.Resource.Reports.CustomerUsageReports.Get +import Network.Google.Resource.Reports.UserUsageReport.Get + +{- $resources +TODO +-} + +type AdminReportsAPI = + Channels :<|> Activities :<|> CustomerUsageReports + :<|> UserUsageReport + +adminReportsAPI :: Proxy AdminReportsAPI +adminReportsAPI = Proxy diff --git a/gogol-admin-reports/gen/Network/Google/AdminReports/Types.hs b/gogol-admin-reports/gen/Network/Google/AdminReports/Types.hs new file mode 100644 index 000000000..f9fbc22ff --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/AdminReports/Types.hs @@ -0,0 +1,81 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminReports.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminReports.Types + ( + -- * Service URL + adminReportsURL + + -- * UsageReports + , UsageReports + , usageReports + , urEtag + , urNextPageToken + , urUsageReports + , urKind + , urWarnings + + -- * Activities + , Activities + , activities + , aEtag + , aNextPageToken + , aKind + , aItems + + -- * UsageReport + , UsageReport + , usageReport + , uEtag + , uKind + , uDate + , uParameters + , uEntity + + -- * Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- * Activity + , Activity + , activity + , actEtag + , actIpAddress + , actKind + , actActor + , actOwnerDomain + , actEvents + , actId + ) where + +import Network.Google.AdminReports.Types.Product +import Network.Google.AdminReports.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'reports_v1' of the Admin Reports API. +adminReportsURL :: BaseURL +adminReportsURL + = BaseUrl Https + "https://www.googleapis.com/admin/reports/v1/" + 443 diff --git a/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Product.hs b/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Product.hs new file mode 100644 index 000000000..13fa3524f --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Product.hs @@ -0,0 +1,480 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminReports.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminReports.Types.Product where + +import Network.Google.AdminReports.Types.Sum +import Network.Google.Prelude + +-- | JSON template for a collection of usage reports. +-- +-- /See:/ 'usageReports' smart constructor. +data UsageReports = UsageReports + { _urEtag :: !(Maybe Text) + , _urNextPageToken :: !(Maybe Text) + , _urUsageReports :: !(Maybe [Maybe UsageReport]) + , _urKind :: !Text + , _urWarnings :: !(Maybe [UsageReportsWarningsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsageReports' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urEtag' +-- +-- * 'urNextPageToken' +-- +-- * 'urUsageReports' +-- +-- * 'urKind' +-- +-- * 'urWarnings' +usageReports + :: UsageReports +usageReports = + UsageReports + { _urEtag = Nothing + , _urNextPageToken = Nothing + , _urUsageReports = Nothing + , _urKind = "admin#reports#usageReports" + , _urWarnings = Nothing + } + +-- | ETag of the resource. +urEtag :: Lens' UsageReports (Maybe Text) +urEtag = lens _urEtag (\ s a -> s{_urEtag = a}) + +-- | Token for retrieving the next page +urNextPageToken :: Lens' UsageReports (Maybe Text) +urNextPageToken + = lens _urNextPageToken + (\ s a -> s{_urNextPageToken = a}) + +-- | Various application parameter records. +urUsageReports :: Lens' UsageReports [Maybe UsageReport] +urUsageReports + = lens _urUsageReports + (\ s a -> s{_urUsageReports = a}) + . _Default + . _Coerce + +-- | The kind of object. +urKind :: Lens' UsageReports Text +urKind = lens _urKind (\ s a -> s{_urKind = a}) + +-- | Warnings if any. +urWarnings :: Lens' UsageReports [UsageReportsWarningsItem] +urWarnings + = lens _urWarnings (\ s a -> s{_urWarnings = a}) . + _Default + . _Coerce + +instance FromJSON UsageReports where + parseJSON + = withObject "UsageReports" + (\ o -> + UsageReports <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "usageReports" .!= mempty) + <*> (o .:? "kind" .!= "admin#reports#usageReports") + <*> (o .:? "warnings" .!= mempty)) + +instance ToJSON UsageReports where + toJSON UsageReports{..} + = object + (catMaybes + [("etag" .=) <$> _urEtag, + ("nextPageToken" .=) <$> _urNextPageToken, + ("usageReports" .=) <$> _urUsageReports, + Just ("kind" .= _urKind), + ("warnings" .=) <$> _urWarnings]) + +-- | JSON template for a collection of activites. +-- +-- /See:/ 'activities' smart constructor. +data Activities = Activities + { _aEtag :: !(Maybe Text) + , _aNextPageToken :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Activity]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activities' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aNextPageToken' +-- +-- * 'aKind' +-- +-- * 'aItems' +activities + :: Activities +activities = + Activities + { _aEtag = Nothing + , _aNextPageToken = Nothing + , _aKind = "admin#reports#activities" + , _aItems = Nothing + } + +-- | ETag of the resource. +aEtag :: Lens' Activities (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Token for retrieving the next page +aNextPageToken :: Lens' Activities (Maybe Text) +aNextPageToken + = lens _aNextPageToken + (\ s a -> s{_aNextPageToken = a}) + +-- | Kind of list response this is. +aKind :: Lens' Activities Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | Each record in read response. +aItems :: Lens' Activities [Maybe Activity] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Activities where + parseJSON + = withObject "Activities" + (\ o -> + Activities <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "admin#reports#activities") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Activities where + toJSON Activities{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, + ("nextPageToken" .=) <$> _aNextPageToken, + Just ("kind" .= _aKind), ("items" .=) <$> _aItems]) + +-- | JSON template for a usage report. +-- +-- /See:/ 'usageReport' smart constructor. +data UsageReport = UsageReport + { _uEtag :: !(Maybe Text) + , _uKind :: !Text + , _uDate :: !(Maybe Text) + , _uParameters :: !(Maybe [UsageReportParametersItem]) + , _uEntity :: !(Maybe UsageReportEntity) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsageReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uEtag' +-- +-- * 'uKind' +-- +-- * 'uDate' +-- +-- * 'uParameters' +-- +-- * 'uEntity' +usageReport + :: UsageReport +usageReport = + UsageReport + { _uEtag = Nothing + , _uKind = "admin#reports#usageReport" + , _uDate = Nothing + , _uParameters = Nothing + , _uEntity = Nothing + } + +-- | ETag of the resource. +uEtag :: Lens' UsageReport (Maybe Text) +uEtag = lens _uEtag (\ s a -> s{_uEtag = a}) + +-- | The kind of object. +uKind :: Lens' UsageReport Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | The date to which the record belongs. +uDate :: Lens' UsageReport (Maybe Text) +uDate = lens _uDate (\ s a -> s{_uDate = a}) + +-- | Parameter value pairs for various applications. +uParameters :: Lens' UsageReport [UsageReportParametersItem] +uParameters + = lens _uParameters (\ s a -> s{_uParameters = a}) . + _Default + . _Coerce + +-- | Information about the type of the item. +uEntity :: Lens' UsageReport (Maybe UsageReportEntity) +uEntity = lens _uEntity (\ s a -> s{_uEntity = a}) + +instance FromJSON UsageReport where + parseJSON + = withObject "UsageReport" + (\ o -> + UsageReport <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "admin#reports#usageReport") + <*> (o .:? "date") + <*> (o .:? "parameters" .!= mempty) + <*> (o .:? "entity")) + +instance ToJSON UsageReport where + toJSON UsageReport{..} + = object + (catMaybes + [("etag" .=) <$> _uEtag, Just ("kind" .= _uKind), + ("date" .=) <$> _uDate, + ("parameters" .=) <$> _uParameters, + ("entity" .=) <$> _uEntity]) + +-- | An notification channel used to watch for resource changes. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cResourceUri :: !(Maybe Text) + , _cResourceId :: !(Maybe Text) + , _cKind :: !Text + , _cExpiration :: !(Maybe Int64) + , _cToken :: !(Maybe Text) + , _cAddress :: !(Maybe Text) + , _cPayload :: !(Maybe Bool) + , _cParams :: !(Maybe ChannelParams) + , _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUri' +-- +-- * 'cResourceId' +-- +-- * 'cKind' +-- +-- * 'cExpiration' +-- +-- * 'cToken' +-- +-- * 'cAddress' +-- +-- * 'cPayload' +-- +-- * 'cParams' +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cResourceUri = Nothing + , _cResourceId = Nothing + , _cKind = "api#channel" + , _cExpiration = Nothing + , _cToken = Nothing + , _cAddress = Nothing + , _cPayload = Nothing + , _cParams = Nothing + , _cId = Nothing + , _cType = Nothing + } + +-- | A version-specific identifier for the watched resource. +cResourceUri :: Lens' Channel (Maybe Text) +cResourceUri + = lens _cResourceUri (\ s a -> s{_cResourceUri = a}) + +-- | An opaque ID that identifies the resource being watched on this channel. +-- Stable across different API versions. +cResourceId :: Lens' Channel (Maybe Text) +cResourceId + = lens _cResourceId (\ s a -> s{_cResourceId = a}) + +-- | Identifies this as a notification channel used to watch for changes to a +-- resource. Value: the fixed string \"api#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Date and time of notification channel expiration, expressed as a Unix +-- timestamp, in milliseconds. Optional. +cExpiration :: Lens' Channel (Maybe Int64) +cExpiration + = lens _cExpiration (\ s a -> s{_cExpiration = a}) + +-- | An arbitrary string delivered to the target address with each +-- notification delivered over this channel. Optional. +cToken :: Lens' Channel (Maybe Text) +cToken = lens _cToken (\ s a -> s{_cToken = a}) + +-- | The address where notifications are delivered for this channel. +cAddress :: Lens' Channel (Maybe Text) +cAddress = lens _cAddress (\ s a -> s{_cAddress = a}) + +-- | A Boolean value to indicate whether payload is wanted. Optional. +cPayload :: Lens' Channel (Maybe Bool) +cPayload = lens _cPayload (\ s a -> s{_cPayload = a}) + +-- | Additional parameters controlling delivery channel behavior. Optional. +cParams :: Lens' Channel (Maybe ChannelParams) +cParams = lens _cParams (\ s a -> s{_cParams = a}) + +-- | A UUID or similar unique string that identifies this channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of delivery mechanism used for this channel. +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "resourceUri") <*> (o .:? "resourceId") <*> + (o .:? "kind" .!= "api#channel") + <*> (o .:? "expiration") + <*> (o .:? "token") + <*> (o .:? "address") + <*> (o .:? "payload") + <*> (o .:? "params") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("resourceUri" .=) <$> _cResourceUri, + ("resourceId" .=) <$> _cResourceId, + Just ("kind" .= _cKind), + ("expiration" .=) <$> _cExpiration, + ("token" .=) <$> _cToken, + ("address" .=) <$> _cAddress, + ("payload" .=) <$> _cPayload, + ("params" .=) <$> _cParams, ("id" .=) <$> _cId, + ("type" .=) <$> _cType]) + +-- | JSON template for the activity resource. +-- +-- /See:/ 'activity' smart constructor. +data Activity = Activity + { _actEtag :: !(Maybe Text) + , _actIpAddress :: !(Maybe Text) + , _actKind :: !Text + , _actActor :: !(Maybe ActivityActor) + , _actOwnerDomain :: !(Maybe Text) + , _actEvents :: !(Maybe [ActivityEventsItem]) + , _actId :: !(Maybe ActivityId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actEtag' +-- +-- * 'actIpAddress' +-- +-- * 'actKind' +-- +-- * 'actActor' +-- +-- * 'actOwnerDomain' +-- +-- * 'actEvents' +-- +-- * 'actId' +activity + :: Activity +activity = + Activity + { _actEtag = Nothing + , _actIpAddress = Nothing + , _actKind = "admin#reports#activity" + , _actActor = Nothing + , _actOwnerDomain = Nothing + , _actEvents = Nothing + , _actId = Nothing + } + +-- | ETag of the entry. +actEtag :: Lens' Activity (Maybe Text) +actEtag = lens _actEtag (\ s a -> s{_actEtag = a}) + +-- | IP Address of the user doing the action. +actIpAddress :: Lens' Activity (Maybe Text) +actIpAddress + = lens _actIpAddress (\ s a -> s{_actIpAddress = a}) + +-- | Kind of resource this is. +actKind :: Lens' Activity Text +actKind = lens _actKind (\ s a -> s{_actKind = a}) + +-- | User doing the action. +actActor :: Lens' Activity (Maybe ActivityActor) +actActor = lens _actActor (\ s a -> s{_actActor = a}) + +-- | Domain of source customer. +actOwnerDomain :: Lens' Activity (Maybe Text) +actOwnerDomain + = lens _actOwnerDomain + (\ s a -> s{_actOwnerDomain = a}) + +-- | Activity events. +actEvents :: Lens' Activity [ActivityEventsItem] +actEvents + = lens _actEvents (\ s a -> s{_actEvents = a}) . + _Default + . _Coerce + +-- | Unique identifier for each activity record. +actId :: Lens' Activity (Maybe ActivityId) +actId = lens _actId (\ s a -> s{_actId = a}) + +instance FromJSON Activity where + parseJSON + = withObject "Activity" + (\ o -> + Activity <$> + (o .:? "etag") <*> (o .:? "ipAddress") <*> + (o .:? "kind" .!= "admin#reports#activity") + <*> (o .:? "actor") + <*> (o .:? "ownerDomain") + <*> (o .:? "events" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON Activity where + toJSON Activity{..} + = object + (catMaybes + [("etag" .=) <$> _actEtag, + ("ipAddress" .=) <$> _actIpAddress, + Just ("kind" .= _actKind), + ("actor" .=) <$> _actActor, + ("ownerDomain" .=) <$> _actOwnerDomain, + ("events" .=) <$> _actEvents, ("id" .=) <$> _actId]) diff --git a/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Sum.hs b/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Sum.hs new file mode 100644 index 000000000..53ffa5996 --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/AdminReports/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdminReports.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdminReports.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-admin-reports/gen/Network/Google/Resource/Admin/Channels/Stop.hs b/gogol-admin-reports/gen/Network/Google/Resource/Admin/Channels/Stop.hs new file mode 100644 index 000000000..e381caa0e --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/Resource/Admin/Channels/Stop.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Admin.Channels.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop watching resources through this channel +-- +-- /See:/ for @AdminChannelsStop@. +module Admin.Channels.Stop + ( + -- * REST Resource + ChannelsStopAPI + + -- * Creating a Request + , channelsStop + , ChannelsStop + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude + +-- | A resource alias for @AdminChannelsStop@ which the +-- 'ChannelsStop' request conforms to. +type ChannelsStopAPI = + "admin" :> + "reports_v1" :> + "channels" :> "stop" :> Post '[JSON] () + +-- | Stop watching resources through this channel +-- +-- /See:/ 'channelsStop' smart constructor. +data ChannelsStop = ChannelsStop + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +channelsStop + :: ChannelsStop +channelsStop = + ChannelsStop + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' ChannelsStop' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' ChannelsStop' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' ChannelsStop' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' ChannelsStop' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' ChannelsStop' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' ChannelsStop' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' ChannelsStop' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest ChannelsStop' where + type Rs ChannelsStop' = () + request = requestWithRoute defReq adminReportsURL + requestWithRoute r u ChannelsStop{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsStopAPI) r + u diff --git a/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/List.hs b/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/List.hs new file mode 100644 index 000000000..6536ec63c --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/List.hs @@ -0,0 +1,272 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reports.Activities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of activities for a specific customer and application. +-- +-- /See:/ for @ReportsActivitiesList@. +module Reports.Activities.List + ( + -- * REST Resource + ActivitiesListAPI + + -- * Creating a Request + , activitiesList + , ActivitiesList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alStartTime + , alUserIp + , alFilters + , alCustomerId + , alActorIpAddress + , alKey + , alEndTime + , alApplicationName + , alPageToken + , alOauthToken + , alEventName + , alUserKey + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude + +-- | A resource alias for @ReportsActivitiesList@ which the +-- 'ActivitiesList' request conforms to. +type ActivitiesListAPI = + "activity" :> + "users" :> + Capture "userKey" Text :> + "applications" :> + Capture "applicationName" Text :> + QueryParam "startTime" Text :> + QueryParam "filters" Text :> + QueryParam "customerId" Text :> + QueryParam "actorIpAddress" Text :> + QueryParam "endTime" Text :> + QueryParam "pageToken" Text :> + QueryParam "eventName" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] Activities + +-- | Retrieves a list of activities for a specific customer and application. +-- +-- /See:/ 'activitiesList' smart constructor. +data ActivitiesList = ActivitiesList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alStartTime :: !(Maybe Text) + , _alUserIp :: !(Maybe Text) + , _alFilters :: !(Maybe Text) + , _alCustomerId :: !(Maybe Text) + , _alActorIpAddress :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alEndTime :: !(Maybe Text) + , _alApplicationName :: !Text + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alEventName :: !(Maybe Text) + , _alUserKey :: !Text + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alStartTime' +-- +-- * 'alUserIp' +-- +-- * 'alFilters' +-- +-- * 'alCustomerId' +-- +-- * 'alActorIpAddress' +-- +-- * 'alKey' +-- +-- * 'alEndTime' +-- +-- * 'alApplicationName' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alEventName' +-- +-- * 'alUserKey' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +activitiesList + :: Text -- ^ 'applicationName' + -> Text -- ^ 'userKey' + -> ActivitiesList +activitiesList pAlApplicationName_ pAlUserKey_ = + ActivitiesList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alStartTime = Nothing + , _alUserIp = Nothing + , _alFilters = Nothing + , _alCustomerId = Nothing + , _alActorIpAddress = Nothing + , _alKey = Nothing + , _alEndTime = Nothing + , _alApplicationName = pAlApplicationName_ + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alEventName = Nothing + , _alUserKey = pAlUserKey_ + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ActivitiesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ActivitiesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Return events which occured at or after this time. +alStartTime :: Lens' ActivitiesList' (Maybe Text) +alStartTime + = lens _alStartTime (\ s a -> s{_alStartTime = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ActivitiesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Event parameters in the form [parameter1 name][operator][parameter1 +-- value],[parameter2 name][operator][parameter2 value],... +alFilters :: Lens' ActivitiesList' (Maybe Text) +alFilters + = lens _alFilters (\ s a -> s{_alFilters = a}) + +-- | Represents the customer for which the data is to be fetched. +alCustomerId :: Lens' ActivitiesList' (Maybe Text) +alCustomerId + = lens _alCustomerId (\ s a -> s{_alCustomerId = a}) + +-- | IP Address of host where the event was performed. Supports both IPv4 and +-- IPv6 addresses. +alActorIpAddress :: Lens' ActivitiesList' (Maybe Text) +alActorIpAddress + = lens _alActorIpAddress + (\ s a -> s{_alActorIpAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ActivitiesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Return events which occured at or before this time. +alEndTime :: Lens' ActivitiesList' (Maybe Text) +alEndTime + = lens _alEndTime (\ s a -> s{_alEndTime = a}) + +-- | Application name for which the events are to be retrieved. +alApplicationName :: Lens' ActivitiesList' Text +alApplicationName + = lens _alApplicationName + (\ s a -> s{_alApplicationName = a}) + +-- | Token to specify next page. +alPageToken :: Lens' ActivitiesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ActivitiesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Name of the event being queried. +alEventName :: Lens' ActivitiesList' (Maybe Text) +alEventName + = lens _alEventName (\ s a -> s{_alEventName = a}) + +-- | Represents the profile id or the user email for which the data should be +-- filtered. When \'all\' is specified as the userKey, it returns +-- usageReports for all users. +alUserKey :: Lens' ActivitiesList' Text +alUserKey + = lens _alUserKey (\ s a -> s{_alUserKey = a}) + +-- | Number of activity records to be shown in each page. +alMaxResults :: Lens' ActivitiesList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ActivitiesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ActivitiesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ActivitiesList' where + type Rs ActivitiesList' = Activities + request = requestWithRoute defReq adminReportsURL + requestWithRoute r u ActivitiesList{..} + = go _alQuotaUser _alPrettyPrint _alStartTime + _alUserIp + _alFilters + _alCustomerId + _alActorIpAddress + _alKey + _alEndTime + _alApplicationName + _alPageToken + _alOauthToken + _alEventName + _alUserKey + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesListAPI) + r + u diff --git a/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/Watch.hs b/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/Watch.hs new file mode 100644 index 000000000..d4e69ef7d --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/Watch.hs @@ -0,0 +1,273 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reports.Activities.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Push changes to activities +-- +-- /See:/ for @ReportsActivitiesWatch@. +module Reports.Activities.Watch + ( + -- * REST Resource + ActivitiesWatchAPI + + -- * Creating a Request + , activitiesWatch + , ActivitiesWatch + + -- * Request Lenses + , awQuotaUser + , awPrettyPrint + , awStartTime + , awUserIp + , awFilters + , awCustomerId + , awActorIpAddress + , awKey + , awEndTime + , awApplicationName + , awPageToken + , awOauthToken + , awEventName + , awUserKey + , awMaxResults + , awFields + , awAlt + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude + +-- | A resource alias for @ReportsActivitiesWatch@ which the +-- 'ActivitiesWatch' request conforms to. +type ActivitiesWatchAPI = + "activity" :> + "users" :> + Capture "userKey" Text :> + "applications" :> + Capture "applicationName" Text :> + "watch" :> + QueryParam "startTime" Text :> + QueryParam "filters" Text :> + QueryParam "customerId" Text :> + QueryParam "actorIpAddress" Text :> + QueryParam "endTime" Text :> + QueryParam "pageToken" Text :> + QueryParam "eventName" Text :> + QueryParam "maxResults" Int32 :> + Post '[JSON] Channel + +-- | Push changes to activities +-- +-- /See:/ 'activitiesWatch' smart constructor. +data ActivitiesWatch = ActivitiesWatch + { _awQuotaUser :: !(Maybe Text) + , _awPrettyPrint :: !Bool + , _awStartTime :: !(Maybe Text) + , _awUserIp :: !(Maybe Text) + , _awFilters :: !(Maybe Text) + , _awCustomerId :: !(Maybe Text) + , _awActorIpAddress :: !(Maybe Text) + , _awKey :: !(Maybe Text) + , _awEndTime :: !(Maybe Text) + , _awApplicationName :: !Text + , _awPageToken :: !(Maybe Text) + , _awOauthToken :: !(Maybe Text) + , _awEventName :: !(Maybe Text) + , _awUserKey :: !Text + , _awMaxResults :: !(Maybe Int32) + , _awFields :: !(Maybe Text) + , _awAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'awQuotaUser' +-- +-- * 'awPrettyPrint' +-- +-- * 'awStartTime' +-- +-- * 'awUserIp' +-- +-- * 'awFilters' +-- +-- * 'awCustomerId' +-- +-- * 'awActorIpAddress' +-- +-- * 'awKey' +-- +-- * 'awEndTime' +-- +-- * 'awApplicationName' +-- +-- * 'awPageToken' +-- +-- * 'awOauthToken' +-- +-- * 'awEventName' +-- +-- * 'awUserKey' +-- +-- * 'awMaxResults' +-- +-- * 'awFields' +-- +-- * 'awAlt' +activitiesWatch + :: Text -- ^ 'applicationName' + -> Text -- ^ 'userKey' + -> ActivitiesWatch +activitiesWatch pAwApplicationName_ pAwUserKey_ = + ActivitiesWatch + { _awQuotaUser = Nothing + , _awPrettyPrint = True + , _awStartTime = Nothing + , _awUserIp = Nothing + , _awFilters = Nothing + , _awCustomerId = Nothing + , _awActorIpAddress = Nothing + , _awKey = Nothing + , _awEndTime = Nothing + , _awApplicationName = pAwApplicationName_ + , _awPageToken = Nothing + , _awOauthToken = Nothing + , _awEventName = Nothing + , _awUserKey = pAwUserKey_ + , _awMaxResults = Nothing + , _awFields = Nothing + , _awAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +awQuotaUser :: Lens' ActivitiesWatch' (Maybe Text) +awQuotaUser + = lens _awQuotaUser (\ s a -> s{_awQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +awPrettyPrint :: Lens' ActivitiesWatch' Bool +awPrettyPrint + = lens _awPrettyPrint + (\ s a -> s{_awPrettyPrint = a}) + +-- | Return events which occured at or after this time. +awStartTime :: Lens' ActivitiesWatch' (Maybe Text) +awStartTime + = lens _awStartTime (\ s a -> s{_awStartTime = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +awUserIp :: Lens' ActivitiesWatch' (Maybe Text) +awUserIp = lens _awUserIp (\ s a -> s{_awUserIp = a}) + +-- | Event parameters in the form [parameter1 name][operator][parameter1 +-- value],[parameter2 name][operator][parameter2 value],... +awFilters :: Lens' ActivitiesWatch' (Maybe Text) +awFilters + = lens _awFilters (\ s a -> s{_awFilters = a}) + +-- | Represents the customer for which the data is to be fetched. +awCustomerId :: Lens' ActivitiesWatch' (Maybe Text) +awCustomerId + = lens _awCustomerId (\ s a -> s{_awCustomerId = a}) + +-- | IP Address of host where the event was performed. Supports both IPv4 and +-- IPv6 addresses. +awActorIpAddress :: Lens' ActivitiesWatch' (Maybe Text) +awActorIpAddress + = lens _awActorIpAddress + (\ s a -> s{_awActorIpAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +awKey :: Lens' ActivitiesWatch' (Maybe Text) +awKey = lens _awKey (\ s a -> s{_awKey = a}) + +-- | Return events which occured at or before this time. +awEndTime :: Lens' ActivitiesWatch' (Maybe Text) +awEndTime + = lens _awEndTime (\ s a -> s{_awEndTime = a}) + +-- | Application name for which the events are to be retrieved. +awApplicationName :: Lens' ActivitiesWatch' Text +awApplicationName + = lens _awApplicationName + (\ s a -> s{_awApplicationName = a}) + +-- | Token to specify next page. +awPageToken :: Lens' ActivitiesWatch' (Maybe Text) +awPageToken + = lens _awPageToken (\ s a -> s{_awPageToken = a}) + +-- | OAuth 2.0 token for the current user. +awOauthToken :: Lens' ActivitiesWatch' (Maybe Text) +awOauthToken + = lens _awOauthToken (\ s a -> s{_awOauthToken = a}) + +-- | Name of the event being queried. +awEventName :: Lens' ActivitiesWatch' (Maybe Text) +awEventName + = lens _awEventName (\ s a -> s{_awEventName = a}) + +-- | Represents the profile id or the user email for which the data should be +-- filtered. When \'all\' is specified as the userKey, it returns +-- usageReports for all users. +awUserKey :: Lens' ActivitiesWatch' Text +awUserKey + = lens _awUserKey (\ s a -> s{_awUserKey = a}) + +-- | Number of activity records to be shown in each page. +awMaxResults :: Lens' ActivitiesWatch' (Maybe Int32) +awMaxResults + = lens _awMaxResults (\ s a -> s{_awMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +awFields :: Lens' ActivitiesWatch' (Maybe Text) +awFields = lens _awFields (\ s a -> s{_awFields = a}) + +-- | Data format for the response. +awAlt :: Lens' ActivitiesWatch' Text +awAlt = lens _awAlt (\ s a -> s{_awAlt = a}) + +instance GoogleRequest ActivitiesWatch' where + type Rs ActivitiesWatch' = Channel + request = requestWithRoute defReq adminReportsURL + requestWithRoute r u ActivitiesWatch{..} + = go _awQuotaUser _awPrettyPrint _awStartTime + _awUserIp + _awFilters + _awCustomerId + _awActorIpAddress + _awKey + _awEndTime + _awApplicationName + _awPageToken + _awOauthToken + _awEventName + _awUserKey + _awMaxResults + _awFields + _awAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesWatchAPI) + r + u diff --git a/gogol-admin-reports/gen/Network/Google/Resource/Reports/CustomerUsageReports/Get.hs b/gogol-admin-reports/gen/Network/Google/Resource/Reports/CustomerUsageReports/Get.hs new file mode 100644 index 000000000..7a5006ddb --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/Resource/Reports/CustomerUsageReports/Get.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reports.CustomerUsageReports.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report which is a collection of properties \/ statistics for +-- a specific customer. +-- +-- /See:/ for @ReportsCustomerUsageReportsGet@. +module Reports.CustomerUsageReports.Get + ( + -- * REST Resource + CustomerUsageReportsGetAPI + + -- * Creating a Request + , customerUsageReportsGet + , CustomerUsageReportsGet + + -- * Request Lenses + , curgQuotaUser + , curgPrettyPrint + , curgUserIp + , curgCustomerId + , curgDate + , curgKey + , curgParameters + , curgPageToken + , curgOauthToken + , curgFields + , curgAlt + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude + +-- | A resource alias for @ReportsCustomerUsageReportsGet@ which the +-- 'CustomerUsageReportsGet' request conforms to. +type CustomerUsageReportsGetAPI = + "usage" :> + "dates" :> + Capture "date" Text :> + QueryParam "customerId" Text :> + QueryParam "parameters" Text :> + QueryParam "pageToken" Text :> + Get '[JSON] UsageReports + +-- | Retrieves a report which is a collection of properties \/ statistics for +-- a specific customer. +-- +-- /See:/ 'customerUsageReportsGet' smart constructor. +data CustomerUsageReportsGet = CustomerUsageReportsGet + { _curgQuotaUser :: !(Maybe Text) + , _curgPrettyPrint :: !Bool + , _curgUserIp :: !(Maybe Text) + , _curgCustomerId :: !(Maybe Text) + , _curgDate :: !Text + , _curgKey :: !(Maybe Text) + , _curgParameters :: !(Maybe Text) + , _curgPageToken :: !(Maybe Text) + , _curgOauthToken :: !(Maybe Text) + , _curgFields :: !(Maybe Text) + , _curgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomerUsageReportsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'curgQuotaUser' +-- +-- * 'curgPrettyPrint' +-- +-- * 'curgUserIp' +-- +-- * 'curgCustomerId' +-- +-- * 'curgDate' +-- +-- * 'curgKey' +-- +-- * 'curgParameters' +-- +-- * 'curgPageToken' +-- +-- * 'curgOauthToken' +-- +-- * 'curgFields' +-- +-- * 'curgAlt' +customerUsageReportsGet + :: Text -- ^ 'date' + -> CustomerUsageReportsGet +customerUsageReportsGet pCurgDate_ = + CustomerUsageReportsGet + { _curgQuotaUser = Nothing + , _curgPrettyPrint = True + , _curgUserIp = Nothing + , _curgCustomerId = Nothing + , _curgDate = pCurgDate_ + , _curgKey = Nothing + , _curgParameters = Nothing + , _curgPageToken = Nothing + , _curgOauthToken = Nothing + , _curgFields = Nothing + , _curgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +curgQuotaUser :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgQuotaUser + = lens _curgQuotaUser + (\ s a -> s{_curgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +curgPrettyPrint :: Lens' CustomerUsageReportsGet' Bool +curgPrettyPrint + = lens _curgPrettyPrint + (\ s a -> s{_curgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +curgUserIp :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgUserIp + = lens _curgUserIp (\ s a -> s{_curgUserIp = a}) + +-- | Represents the customer for which the data is to be fetched. +curgCustomerId :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgCustomerId + = lens _curgCustomerId + (\ s a -> s{_curgCustomerId = a}) + +-- | Represents the date in yyyy-mm-dd format for which the data is to be +-- fetched. +curgDate :: Lens' CustomerUsageReportsGet' Text +curgDate = lens _curgDate (\ s a -> s{_curgDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +curgKey :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgKey = lens _curgKey (\ s a -> s{_curgKey = a}) + +-- | Represents the application name, parameter name pairs to fetch in csv as +-- app_name1:param_name1, app_name2:param_name2. +curgParameters :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgParameters + = lens _curgParameters + (\ s a -> s{_curgParameters = a}) + +-- | Token to specify next page. +curgPageToken :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgPageToken + = lens _curgPageToken + (\ s a -> s{_curgPageToken = a}) + +-- | OAuth 2.0 token for the current user. +curgOauthToken :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgOauthToken + = lens _curgOauthToken + (\ s a -> s{_curgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +curgFields :: Lens' CustomerUsageReportsGet' (Maybe Text) +curgFields + = lens _curgFields (\ s a -> s{_curgFields = a}) + +-- | Data format for the response. +curgAlt :: Lens' CustomerUsageReportsGet' Text +curgAlt = lens _curgAlt (\ s a -> s{_curgAlt = a}) + +instance GoogleRequest CustomerUsageReportsGet' where + type Rs CustomerUsageReportsGet' = UsageReports + request = requestWithRoute defReq adminReportsURL + requestWithRoute r u CustomerUsageReportsGet{..} + = go _curgQuotaUser _curgPrettyPrint _curgUserIp + _curgCustomerId + _curgDate + _curgKey + _curgParameters + _curgPageToken + _curgOauthToken + _curgFields + _curgAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomerUsageReportsGetAPI) + r + u diff --git a/gogol-admin-reports/gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs b/gogol-admin-reports/gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs new file mode 100644 index 000000000..54c43c723 --- /dev/null +++ b/gogol-admin-reports/gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reports.UserUsageReport.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report which is a collection of properties \/ statistics for +-- a set of users. +-- +-- /See:/ for @ReportsUserUsageReportGet@. +module Reports.UserUsageReport.Get + ( + -- * REST Resource + UserUsageReportGetAPI + + -- * Creating a Request + , userUsageReportGet + , UserUsageReportGet + + -- * Request Lenses + , uurgQuotaUser + , uurgPrettyPrint + , uurgUserIp + , uurgFilters + , uurgCustomerId + , uurgDate + , uurgKey + , uurgParameters + , uurgPageToken + , uurgOauthToken + , uurgUserKey + , uurgMaxResults + , uurgFields + , uurgAlt + ) where + +import Network.Google.AdminReports.Types +import Network.Google.Prelude + +-- | A resource alias for @ReportsUserUsageReportGet@ which the +-- 'UserUsageReportGet' request conforms to. +type UserUsageReportGetAPI = + "usage" :> + "users" :> + Capture "userKey" Text :> + "dates" :> + Capture "date" Text :> + QueryParam "filters" Text :> + QueryParam "customerId" Text :> + QueryParam "parameters" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] UsageReports + +-- | Retrieves a report which is a collection of properties \/ statistics for +-- a set of users. +-- +-- /See:/ 'userUsageReportGet' smart constructor. +data UserUsageReportGet = UserUsageReportGet + { _uurgQuotaUser :: !(Maybe Text) + , _uurgPrettyPrint :: !Bool + , _uurgUserIp :: !(Maybe Text) + , _uurgFilters :: !(Maybe Text) + , _uurgCustomerId :: !(Maybe Text) + , _uurgDate :: !Text + , _uurgKey :: !(Maybe Text) + , _uurgParameters :: !(Maybe Text) + , _uurgPageToken :: !(Maybe Text) + , _uurgOauthToken :: !(Maybe Text) + , _uurgUserKey :: !Text + , _uurgMaxResults :: !(Maybe Word32) + , _uurgFields :: !(Maybe Text) + , _uurgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserUsageReportGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uurgQuotaUser' +-- +-- * 'uurgPrettyPrint' +-- +-- * 'uurgUserIp' +-- +-- * 'uurgFilters' +-- +-- * 'uurgCustomerId' +-- +-- * 'uurgDate' +-- +-- * 'uurgKey' +-- +-- * 'uurgParameters' +-- +-- * 'uurgPageToken' +-- +-- * 'uurgOauthToken' +-- +-- * 'uurgUserKey' +-- +-- * 'uurgMaxResults' +-- +-- * 'uurgFields' +-- +-- * 'uurgAlt' +userUsageReportGet + :: Text -- ^ 'date' + -> Text -- ^ 'userKey' + -> UserUsageReportGet +userUsageReportGet pUurgDate_ pUurgUserKey_ = + UserUsageReportGet + { _uurgQuotaUser = Nothing + , _uurgPrettyPrint = True + , _uurgUserIp = Nothing + , _uurgFilters = Nothing + , _uurgCustomerId = Nothing + , _uurgDate = pUurgDate_ + , _uurgKey = Nothing + , _uurgParameters = Nothing + , _uurgPageToken = Nothing + , _uurgOauthToken = Nothing + , _uurgUserKey = pUurgUserKey_ + , _uurgMaxResults = Nothing + , _uurgFields = Nothing + , _uurgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uurgQuotaUser :: Lens' UserUsageReportGet' (Maybe Text) +uurgQuotaUser + = lens _uurgQuotaUser + (\ s a -> s{_uurgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uurgPrettyPrint :: Lens' UserUsageReportGet' Bool +uurgPrettyPrint + = lens _uurgPrettyPrint + (\ s a -> s{_uurgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uurgUserIp :: Lens' UserUsageReportGet' (Maybe Text) +uurgUserIp + = lens _uurgUserIp (\ s a -> s{_uurgUserIp = a}) + +-- | Represents the set of filters including parameter operator value. +uurgFilters :: Lens' UserUsageReportGet' (Maybe Text) +uurgFilters + = lens _uurgFilters (\ s a -> s{_uurgFilters = a}) + +-- | Represents the customer for which the data is to be fetched. +uurgCustomerId :: Lens' UserUsageReportGet' (Maybe Text) +uurgCustomerId + = lens _uurgCustomerId + (\ s a -> s{_uurgCustomerId = a}) + +-- | Represents the date in yyyy-mm-dd format for which the data is to be +-- fetched. +uurgDate :: Lens' UserUsageReportGet' Text +uurgDate = lens _uurgDate (\ s a -> s{_uurgDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uurgKey :: Lens' UserUsageReportGet' (Maybe Text) +uurgKey = lens _uurgKey (\ s a -> s{_uurgKey = a}) + +-- | Represents the application name, parameter name pairs to fetch in csv as +-- app_name1:param_name1, app_name2:param_name2. +uurgParameters :: Lens' UserUsageReportGet' (Maybe Text) +uurgParameters + = lens _uurgParameters + (\ s a -> s{_uurgParameters = a}) + +-- | Token to specify next page. +uurgPageToken :: Lens' UserUsageReportGet' (Maybe Text) +uurgPageToken + = lens _uurgPageToken + (\ s a -> s{_uurgPageToken = a}) + +-- | OAuth 2.0 token for the current user. +uurgOauthToken :: Lens' UserUsageReportGet' (Maybe Text) +uurgOauthToken + = lens _uurgOauthToken + (\ s a -> s{_uurgOauthToken = a}) + +-- | Represents the profile id or the user email for which the data should be +-- filtered. +uurgUserKey :: Lens' UserUsageReportGet' Text +uurgUserKey + = lens _uurgUserKey (\ s a -> s{_uurgUserKey = a}) + +-- | Maximum number of results to return. Maximum allowed is 1000 +uurgMaxResults :: Lens' UserUsageReportGet' (Maybe Word32) +uurgMaxResults + = lens _uurgMaxResults + (\ s a -> s{_uurgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +uurgFields :: Lens' UserUsageReportGet' (Maybe Text) +uurgFields + = lens _uurgFields (\ s a -> s{_uurgFields = a}) + +-- | Data format for the response. +uurgAlt :: Lens' UserUsageReportGet' Text +uurgAlt = lens _uurgAlt (\ s a -> s{_uurgAlt = a}) + +instance GoogleRequest UserUsageReportGet' where + type Rs UserUsageReportGet' = UsageReports + request = requestWithRoute defReq adminReportsURL + requestWithRoute r u UserUsageReportGet{..} + = go _uurgQuotaUser _uurgPrettyPrint _uurgUserIp + _uurgFilters + _uurgCustomerId + _uurgDate + _uurgKey + _uurgParameters + _uurgPageToken + _uurgOauthToken + _uurgUserKey + _uurgMaxResults + _uurgFields + _uurgAlt + where go + = clientWithRoute + (Proxy :: Proxy UserUsageReportGetAPI) + r + u diff --git a/gogol-admin-reports/gogol-admin-reports.cabal b/gogol-admin-reports/gogol-admin-reports.cabal new file mode 100644 index 000000000..7c0233cdb --- /dev/null +++ b/gogol-admin-reports/gogol-admin-reports.cabal @@ -0,0 +1,48 @@ +name: gogol-admin-reports +version: 0.0.1 +synopsis: Admin Reports API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Allows the administrators of Google Apps customers to fetch reports + about the usage, collaboration, security and risk for their users. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdminReports + , Network.Google.AdminReports.Types + , Network.Google.Resource.Admin.Channels.Stop + , Network.Google.Resource.Reports.Activities.List + , Network.Google.Resource.Reports.Activities.Watch + , Network.Google.Resource.Reports.CustomerUsageReports.Get + , Network.Google.Resource.Reports.UserUsageReport.Get + + other-modules: + Network.Google.AdminReports.Types.Product + , Network.Google.AdminReports.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-admin-reports/src/.gitkeep b/gogol-admin-reports/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-adsense-host/LICENSE b/gogol-adsense-host/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-adsense-host/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-adsense-host/Makefile b/gogol-adsense-host/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-adsense-host/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-adsense-host/README.md b/gogol-adsense-host/README.md new file mode 100644 index 000000000..68f4f5081 --- /dev/null +++ b/gogol-adsense-host/README.md @@ -0,0 +1,28 @@ +# gogol-adsense-host + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the AdSense Host API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-adsense-host` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-adsense-host/Setup.hs b/gogol-adsense-host/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-adsense-host/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-adsense-host/gen/Network/Google/AdSenseHost.hs b/gogol-adsense-host/gen/Network/Google/AdSenseHost.hs new file mode 100644 index 000000000..4b74066d3 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/AdSenseHost.hs @@ -0,0 +1,272 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdSenseHost +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Gives AdSense Hosts access to report generation, ad code generation, and +-- publisher management capabilities. +-- +-- /See:/ +module Network.Google.AdSenseHost + ( + -- * API + AdSenseHostAPI + , adSenseHostAPI + , adSenseHostURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdsensehostAccountsAdclientsGet + , module AdSenseHost.Accounts.Adclients.Get + + -- ** AdsensehostAccountsAdclientsList + , module AdSenseHost.Accounts.Adclients.List + + -- ** AdsensehostAccountsAdunitsDelete + , module AdSenseHost.Accounts.Adunits.Delete + + -- ** AdsensehostAccountsAdunitsGet + , module AdSenseHost.Accounts.Adunits.Get + + -- ** AdsensehostAccountsAdunitsGetAdCode + , module AdSenseHost.Accounts.Adunits.GetAdCode + + -- ** AdsensehostAccountsAdunitsInsert + , module AdSenseHost.Accounts.Adunits.Insert + + -- ** AdsensehostAccountsAdunitsList + , module AdSenseHost.Accounts.Adunits.List + + -- ** AdsensehostAccountsAdunitsPatch + , module AdSenseHost.Accounts.Adunits.Patch + + -- ** AdsensehostAccountsAdunitsUpdate + , module AdSenseHost.Accounts.Adunits.Update + + -- ** AdsensehostAccountsGet + , module AdSenseHost.Accounts.Get + + -- ** AdsensehostAccountsList + , module AdSenseHost.Accounts.List + + -- ** AdsensehostAccountsReportsGenerate + , module AdSenseHost.Accounts.Reports.Generate + + -- ** AdsensehostAdclientsGet + , module AdSenseHost.Adclients.Get + + -- ** AdsensehostAdclientsList + , module AdSenseHost.Adclients.List + + -- ** AdsensehostAssociationsessionsStart + , module AdSenseHost.Associationsessions.Start + + -- ** AdsensehostAssociationsessionsVerify + , module AdSenseHost.Associationsessions.Verify + + -- ** AdsensehostCustomchannelsDelete + , module AdSenseHost.Customchannels.Delete + + -- ** AdsensehostCustomchannelsGet + , module AdSenseHost.Customchannels.Get + + -- ** AdsensehostCustomchannelsInsert + , module AdSenseHost.Customchannels.Insert + + -- ** AdsensehostCustomchannelsList + , module AdSenseHost.Customchannels.List + + -- ** AdsensehostCustomchannelsPatch + , module AdSenseHost.Customchannels.Patch + + -- ** AdsensehostCustomchannelsUpdate + , module AdSenseHost.Customchannels.Update + + -- ** AdsensehostReportsGenerate + , module AdSenseHost.Reports.Generate + + -- ** AdsensehostURLchannelsDelete + , module AdSenseHost.URLchannels.Delete + + -- ** AdsensehostURLchannelsInsert + , module AdSenseHost.URLchannels.Insert + + -- ** AdsensehostURLchannelsList + , module AdSenseHost.URLchannels.List + + -- * Types + + -- ** AssociationSession + , AssociationSession + , associationSession + , asStatus + , asKind + , asWebsiteLocale + , asUserLocale + , asAccountId + , asProductCodes + , asId + , asWebsiteUrl + , asRedirectUrl + + -- ** AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- ** Accounts + , Accounts + , accounts + , aEtag + , aKind + , aItems + + -- ** AdUnits + , AdUnits + , adUnits + , auEtag + , auNextPageToken + , auKind + , auItems + + -- ** AdUnit + , AdUnit + , adUnit + , adStatus + , adMobileContentAdsSettings + , adKind + , adCustomStyle + , adName + , adContentAdsSettings + , adCode + , adId + + -- ** URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- ** CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- ** Report + , Report + , report + , rKind + , rAverages + , rWarnings + , rRows + , rTotals + , rHeaders + , rTotalMatchedRows + + -- ** Account + , Account + , account + , accStatus + , accKind + , accName + , accId + + -- ** AdClient + , AdClient + , adClient + , aaKind + , aaArcOptIn + , aaSupportsReporting + , aaId + , aaProductCode + + -- ** AdStyle + , AdStyle + , adStyle + , assCorners + , assKind + , assFont + , assColors + + -- ** CustomChannel + , CustomChannel + , customChannel + , cKind + , cName + , cCode + , cId + + -- ** URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- ** AdCode + , AdCode + , adCode + , addKind + , addAdCode + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude +import Network.Google.Resource.AdSenseHost.Accounts.Adclients.Get +import Network.Google.Resource.AdSenseHost.Accounts.Adclients.List +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.Delete +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.Get +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.GetAdCode +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.Insert +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.List +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.Patch +import Network.Google.Resource.AdSenseHost.Accounts.Adunits.Update +import Network.Google.Resource.AdSenseHost.Accounts.Get +import Network.Google.Resource.AdSenseHost.Accounts.List +import Network.Google.Resource.AdSenseHost.Accounts.Reports.Generate +import Network.Google.Resource.AdSenseHost.Adclients.Get +import Network.Google.Resource.AdSenseHost.Adclients.List +import Network.Google.Resource.AdSenseHost.Associationsessions.Start +import Network.Google.Resource.AdSenseHost.Associationsessions.Verify +import Network.Google.Resource.AdSenseHost.Customchannels.Delete +import Network.Google.Resource.AdSenseHost.Customchannels.Get +import Network.Google.Resource.AdSenseHost.Customchannels.Insert +import Network.Google.Resource.AdSenseHost.Customchannels.List +import Network.Google.Resource.AdSenseHost.Customchannels.Patch +import Network.Google.Resource.AdSenseHost.Customchannels.Update +import Network.Google.Resource.AdSenseHost.Reports.Generate +import Network.Google.Resource.AdSenseHost.URLchannels.Delete +import Network.Google.Resource.AdSenseHost.URLchannels.Insert +import Network.Google.Resource.AdSenseHost.URLchannels.List + +{- $resources +TODO +-} + +type AdSenseHostAPI = + Associationsessions :<|> Adclients :<|> Accounts :<|> + Reports + :<|> URLchannels + :<|> Customchannels + +adSenseHostAPI :: Proxy AdSenseHostAPI +adSenseHostAPI = Proxy diff --git a/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types.hs b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types.hs new file mode 100644 index 000000000..2dc6e6824 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSenseHost.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSenseHost.Types + ( + -- * Service URL + adSenseHostURL + + -- * AssociationSession + , AssociationSession + , associationSession + , asStatus + , asKind + , asWebsiteLocale + , asUserLocale + , asAccountId + , asProductCodes + , asId + , asWebsiteUrl + , asRedirectUrl + + -- * AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- * Accounts + , Accounts + , accounts + , aEtag + , aKind + , aItems + + -- * AdUnits + , AdUnits + , adUnits + , auEtag + , auNextPageToken + , auKind + , auItems + + -- * AdUnit + , AdUnit + , adUnit + , adStatus + , adMobileContentAdsSettings + , adKind + , adCustomStyle + , adName + , adContentAdsSettings + , adCode + , adId + + -- * URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- * CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- * Report + , Report + , report + , rKind + , rAverages + , rWarnings + , rRows + , rTotals + , rHeaders + , rTotalMatchedRows + + -- * Account + , Account + , account + , accStatus + , accKind + , accName + , accId + + -- * AdClient + , AdClient + , adClient + , aaKind + , aaArcOptIn + , aaSupportsReporting + , aaId + , aaProductCode + + -- * AdStyle + , AdStyle + , adStyle + , assCorners + , assKind + , assFont + , assColors + + -- * CustomChannel + , CustomChannel + , customChannel + , cKind + , cName + , cCode + , cId + + -- * URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- * AdCode + , AdCode + , adCode + , addKind + , addAdCode + ) where + +import Network.Google.AdSenseHost.Types.Product +import Network.Google.AdSenseHost.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v4.1' of the AdSense Host API. +adSenseHostURL :: BaseURL +adSenseHostURL + = BaseUrl Https + "https://www.googleapis.com/adsensehost/v4.1/" + 443 diff --git a/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs new file mode 100644 index 000000000..32d6011b4 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs @@ -0,0 +1,1099 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSenseHost.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSenseHost.Types.Product where + +import Network.Google.AdSenseHost.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'associationSession' smart constructor. +data AssociationSession = AssociationSession + { _asStatus :: !(Maybe Text) + , _asKind :: !Text + , _asWebsiteLocale :: !(Maybe Text) + , _asUserLocale :: !(Maybe Text) + , _asAccountId :: !(Maybe Text) + , _asProductCodes :: !(Maybe [Text]) + , _asId :: !(Maybe Text) + , _asWebsiteUrl :: !(Maybe Text) + , _asRedirectUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssociationSession' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asStatus' +-- +-- * 'asKind' +-- +-- * 'asWebsiteLocale' +-- +-- * 'asUserLocale' +-- +-- * 'asAccountId' +-- +-- * 'asProductCodes' +-- +-- * 'asId' +-- +-- * 'asWebsiteUrl' +-- +-- * 'asRedirectUrl' +associationSession + :: AssociationSession +associationSession = + AssociationSession + { _asStatus = Nothing + , _asKind = "adsensehost#associationSession" + , _asWebsiteLocale = Nothing + , _asUserLocale = Nothing + , _asAccountId = Nothing + , _asProductCodes = Nothing + , _asId = Nothing + , _asWebsiteUrl = Nothing + , _asRedirectUrl = Nothing + } + +-- | Status of the completed association, available once the association +-- callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. +asStatus :: Lens' AssociationSession (Maybe Text) +asStatus = lens _asStatus (\ s a -> s{_asStatus = a}) + +-- | Kind of resource this is, in this case adsensehost#associationSession. +asKind :: Lens' AssociationSession Text +asKind = lens _asKind (\ s a -> s{_asKind = a}) + +-- | The locale of the user\'s hosted website. +asWebsiteLocale :: Lens' AssociationSession (Maybe Text) +asWebsiteLocale + = lens _asWebsiteLocale + (\ s a -> s{_asWebsiteLocale = a}) + +-- | The preferred locale of the user themselves when going through the +-- AdSense association flow. +asUserLocale :: Lens' AssociationSession (Maybe Text) +asUserLocale + = lens _asUserLocale (\ s a -> s{_asUserLocale = a}) + +-- | Hosted account id of the associated publisher after association. Present +-- if status is ACCEPTED. +asAccountId :: Lens' AssociationSession (Maybe Text) +asAccountId + = lens _asAccountId (\ s a -> s{_asAccountId = a}) + +-- | The products to associate with the user. Options: AFC, AFF, AFS, AFMC +asProductCodes :: Lens' AssociationSession [Text] +asProductCodes + = lens _asProductCodes + (\ s a -> s{_asProductCodes = a}) + . _Default + . _Coerce + +-- | Unique identifier of this association session. +asId :: Lens' AssociationSession (Maybe Text) +asId = lens _asId (\ s a -> s{_asId = a}) + +-- | The URL of the user\'s hosted website. +asWebsiteUrl :: Lens' AssociationSession (Maybe Text) +asWebsiteUrl + = lens _asWebsiteUrl (\ s a -> s{_asWebsiteUrl = a}) + +-- | Redirect URL of this association session. Used to redirect users into +-- the AdSense association flow. +asRedirectUrl :: Lens' AssociationSession (Maybe Text) +asRedirectUrl + = lens _asRedirectUrl + (\ s a -> s{_asRedirectUrl = a}) + +instance FromJSON AssociationSession where + parseJSON + = withObject "AssociationSession" + (\ o -> + AssociationSession <$> + (o .:? "status") <*> + (o .:? "kind" .!= "adsensehost#associationSession") + <*> (o .:? "websiteLocale") + <*> (o .:? "userLocale") + <*> (o .:? "accountId") + <*> (o .:? "productCodes" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "websiteUrl") + <*> (o .:? "redirectUrl")) + +instance ToJSON AssociationSession where + toJSON AssociationSession{..} + = object + (catMaybes + [("status" .=) <$> _asStatus, + Just ("kind" .= _asKind), + ("websiteLocale" .=) <$> _asWebsiteLocale, + ("userLocale" .=) <$> _asUserLocale, + ("accountId" .=) <$> _asAccountId, + ("productCodes" .=) <$> _asProductCodes, + ("id" .=) <$> _asId, + ("websiteUrl" .=) <$> _asWebsiteUrl, + ("redirectUrl" .=) <$> _asRedirectUrl]) + +-- +-- /See:/ 'adClients' smart constructor. +data AdClients = AdClients + { _acEtag :: !(Maybe Text) + , _acNextPageToken :: !(Maybe Text) + , _acKind :: !Text + , _acItems :: !(Maybe [Maybe AdClient]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClients' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acEtag' +-- +-- * 'acNextPageToken' +-- +-- * 'acKind' +-- +-- * 'acItems' +adClients + :: AdClients +adClients = + AdClients + { _acEtag = Nothing + , _acNextPageToken = Nothing + , _acKind = "adsensehost#adClients" + , _acItems = Nothing + } + +-- | ETag of this response for caching purposes. +acEtag :: Lens' AdClients (Maybe Text) +acEtag = lens _acEtag (\ s a -> s{_acEtag = a}) + +-- | Continuation token used to page through ad clients. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +acNextPageToken :: Lens' AdClients (Maybe Text) +acNextPageToken + = lens _acNextPageToken + (\ s a -> s{_acNextPageToken = a}) + +-- | Kind of list this is, in this case adsensehost#adClients. +acKind :: Lens' AdClients Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | The ad clients returned in this list response. +acItems :: Lens' AdClients [Maybe AdClient] +acItems + = lens _acItems (\ s a -> s{_acItems = a}) . _Default + . _Coerce + +instance FromJSON AdClients where + parseJSON + = withObject "AdClients" + (\ o -> + AdClients <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsensehost#adClients") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AdClients where + toJSON AdClients{..} + = object + (catMaybes + [("etag" .=) <$> _acEtag, + ("nextPageToken" .=) <$> _acNextPageToken, + Just ("kind" .= _acKind), ("items" .=) <$> _acItems]) + +-- +-- /See:/ 'accounts' smart constructor. +data Accounts = Accounts + { _aEtag :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Account]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Accounts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aKind' +-- +-- * 'aItems' +accounts + :: Accounts +accounts = + Accounts + { _aEtag = Nothing + , _aKind = "adsensehost#accounts" + , _aItems = Nothing + } + +-- | ETag of this response for caching purposes. +aEtag :: Lens' Accounts (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Kind of list this is, in this case adsensehost#accounts. +aKind :: Lens' Accounts Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The accounts returned in this list response. +aItems :: Lens' Accounts [Maybe Account] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Accounts where + parseJSON + = withObject "Accounts" + (\ o -> + Accounts <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "adsensehost#accounts") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Accounts where + toJSON Accounts{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, Just ("kind" .= _aKind), + ("items" .=) <$> _aItems]) + +-- +-- /See:/ 'adUnits' smart constructor. +data AdUnits = AdUnits + { _auEtag :: !(Maybe Text) + , _auNextPageToken :: !(Maybe Text) + , _auKind :: !Text + , _auItems :: !(Maybe [Maybe AdUnit]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdUnits' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auEtag' +-- +-- * 'auNextPageToken' +-- +-- * 'auKind' +-- +-- * 'auItems' +adUnits + :: AdUnits +adUnits = + AdUnits + { _auEtag = Nothing + , _auNextPageToken = Nothing + , _auKind = "adsensehost#adUnits" + , _auItems = Nothing + } + +-- | ETag of this response for caching purposes. +auEtag :: Lens' AdUnits (Maybe Text) +auEtag = lens _auEtag (\ s a -> s{_auEtag = a}) + +-- | Continuation token used to page through ad units. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +auNextPageToken :: Lens' AdUnits (Maybe Text) +auNextPageToken + = lens _auNextPageToken + (\ s a -> s{_auNextPageToken = a}) + +-- | Kind of list this is, in this case adsensehost#adUnits. +auKind :: Lens' AdUnits Text +auKind = lens _auKind (\ s a -> s{_auKind = a}) + +-- | The ad units returned in this list response. +auItems :: Lens' AdUnits [Maybe AdUnit] +auItems + = lens _auItems (\ s a -> s{_auItems = a}) . _Default + . _Coerce + +instance FromJSON AdUnits where + parseJSON + = withObject "AdUnits" + (\ o -> + AdUnits <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsensehost#adUnits") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AdUnits where + toJSON AdUnits{..} + = object + (catMaybes + [("etag" .=) <$> _auEtag, + ("nextPageToken" .=) <$> _auNextPageToken, + Just ("kind" .= _auKind), ("items" .=) <$> _auItems]) + +-- +-- /See:/ 'adUnit' smart constructor. +data AdUnit = AdUnit + { _adStatus :: !(Maybe Text) + , _adMobileContentAdsSettings :: !(Maybe AdUnitMobileContentAdsSettings) + , _adKind :: !Text + , _adCustomStyle :: !(Maybe (Maybe AdStyle)) + , _adName :: !(Maybe Text) + , _adContentAdsSettings :: !(Maybe AdUnitContentAdsSettings) + , _adCode :: !(Maybe Text) + , _adId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdUnit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adStatus' +-- +-- * 'adMobileContentAdsSettings' +-- +-- * 'adKind' +-- +-- * 'adCustomStyle' +-- +-- * 'adName' +-- +-- * 'adContentAdsSettings' +-- +-- * 'adCode' +-- +-- * 'adId' +adUnit + :: AdUnit +adUnit = + AdUnit + { _adStatus = Nothing + , _adMobileContentAdsSettings = Nothing + , _adKind = "adsensehost#adUnit" + , _adCustomStyle = Nothing + , _adName = Nothing + , _adContentAdsSettings = Nothing + , _adCode = Nothing + , _adId = Nothing + } + +-- | Status of this ad unit. Possible values are: NEW: Indicates that the ad +-- unit was created within the last seven days and does not yet have any +-- activity associated with it. ACTIVE: Indicates that there has been +-- activity on this ad unit in the last seven days. INACTIVE: Indicates +-- that there has been no activity on this ad unit in the last seven days. +adStatus :: Lens' AdUnit (Maybe Text) +adStatus = lens _adStatus (\ s a -> s{_adStatus = a}) + +-- | Settings specific to WAP mobile content ads (AFMC). +adMobileContentAdsSettings :: Lens' AdUnit (Maybe AdUnitMobileContentAdsSettings) +adMobileContentAdsSettings + = lens _adMobileContentAdsSettings + (\ s a -> s{_adMobileContentAdsSettings = a}) + +-- | Kind of resource this is, in this case adsensehost#adUnit. +adKind :: Lens' AdUnit Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | Custom style information specific to this ad unit. +adCustomStyle :: Lens' AdUnit (Maybe (Maybe AdStyle)) +adCustomStyle + = lens _adCustomStyle + (\ s a -> s{_adCustomStyle = a}) + +-- | Name of this ad unit. +adName :: Lens' AdUnit (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +-- | Settings specific to content ads (AFC) and highend mobile content ads +-- (AFMC). +adContentAdsSettings :: Lens' AdUnit (Maybe AdUnitContentAdsSettings) +adContentAdsSettings + = lens _adContentAdsSettings + (\ s a -> s{_adContentAdsSettings = a}) + +-- | Identity code of this ad unit, not necessarily unique across ad clients. +adCode :: Lens' AdUnit (Maybe Text) +adCode = lens _adCode (\ s a -> s{_adCode = a}) + +-- | Unique identifier of this ad unit. This should be considered an opaque +-- identifier; it is not safe to rely on it being in any particular format. +adId :: Lens' AdUnit (Maybe Text) +adId = lens _adId (\ s a -> s{_adId = a}) + +instance FromJSON AdUnit where + parseJSON + = withObject "AdUnit" + (\ o -> + AdUnit <$> + (o .:? "status") <*> + (o .:? "mobileContentAdsSettings") + <*> (o .:? "kind" .!= "adsensehost#adUnit") + <*> (o .:? "customStyle") + <*> (o .:? "name") + <*> (o .:? "contentAdsSettings") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON AdUnit where + toJSON AdUnit{..} + = object + (catMaybes + [("status" .=) <$> _adStatus, + ("mobileContentAdsSettings" .=) <$> + _adMobileContentAdsSettings, + Just ("kind" .= _adKind), + ("customStyle" .=) <$> _adCustomStyle, + ("name" .=) <$> _adName, + ("contentAdsSettings" .=) <$> _adContentAdsSettings, + ("code" .=) <$> _adCode, ("id" .=) <$> _adId]) + +-- +-- /See:/ 'uRLChannels' smart constructor. +data URLChannels = URLChannels + { _ucEtag :: !(Maybe Text) + , _ucNextPageToken :: !(Maybe Text) + , _ucKind :: !Text + , _ucItems :: !(Maybe [Maybe URLChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucEtag' +-- +-- * 'ucNextPageToken' +-- +-- * 'ucKind' +-- +-- * 'ucItems' +uRLChannels + :: URLChannels +uRLChannels = + URLChannels + { _ucEtag = Nothing + , _ucNextPageToken = Nothing + , _ucKind = "adsensehost#urlChannels" + , _ucItems = Nothing + } + +-- | ETag of this response for caching purposes. +ucEtag :: Lens' URLChannels (Maybe Text) +ucEtag = lens _ucEtag (\ s a -> s{_ucEtag = a}) + +-- | Continuation token used to page through URL channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ucNextPageToken :: Lens' URLChannels (Maybe Text) +ucNextPageToken + = lens _ucNextPageToken + (\ s a -> s{_ucNextPageToken = a}) + +-- | Kind of list this is, in this case adsensehost#urlChannels. +ucKind :: Lens' URLChannels Text +ucKind = lens _ucKind (\ s a -> s{_ucKind = a}) + +-- | The URL channels returned in this list response. +ucItems :: Lens' URLChannels [Maybe URLChannel] +ucItems + = lens _ucItems (\ s a -> s{_ucItems = a}) . _Default + . _Coerce + +instance FromJSON URLChannels where + parseJSON + = withObject "URLChannels" + (\ o -> + URLChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsensehost#urlChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON URLChannels where + toJSON URLChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ucEtag, + ("nextPageToken" .=) <$> _ucNextPageToken, + Just ("kind" .= _ucKind), ("items" .=) <$> _ucItems]) + +-- +-- /See:/ 'customChannels' smart constructor. +data CustomChannels = CustomChannels + { _ccEtag :: !(Maybe Text) + , _ccNextPageToken :: !(Maybe Text) + , _ccKind :: !Text + , _ccItems :: !(Maybe [Maybe CustomChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccEtag' +-- +-- * 'ccNextPageToken' +-- +-- * 'ccKind' +-- +-- * 'ccItems' +customChannels + :: CustomChannels +customChannels = + CustomChannels + { _ccEtag = Nothing + , _ccNextPageToken = Nothing + , _ccKind = "adsensehost#customChannels" + , _ccItems = Nothing + } + +-- | ETag of this response for caching purposes. +ccEtag :: Lens' CustomChannels (Maybe Text) +ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a}) + +-- | Continuation token used to page through custom channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ccNextPageToken :: Lens' CustomChannels (Maybe Text) +ccNextPageToken + = lens _ccNextPageToken + (\ s a -> s{_ccNextPageToken = a}) + +-- | Kind of list this is, in this case adsensehost#customChannels. +ccKind :: Lens' CustomChannels Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | The custom channels returned in this list response. +ccItems :: Lens' CustomChannels [Maybe CustomChannel] +ccItems + = lens _ccItems (\ s a -> s{_ccItems = a}) . _Default + . _Coerce + +instance FromJSON CustomChannels where + parseJSON + = withObject "CustomChannels" + (\ o -> + CustomChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsensehost#customChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CustomChannels where + toJSON CustomChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ccEtag, + ("nextPageToken" .=) <$> _ccNextPageToken, + Just ("kind" .= _ccKind), ("items" .=) <$> _ccItems]) + +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rKind :: !Text + , _rAverages :: !(Maybe [Text]) + , _rWarnings :: !(Maybe [Text]) + , _rRows :: !(Maybe [[Text]]) + , _rTotals :: !(Maybe [Text]) + , _rHeaders :: !(Maybe [ReportHeadersItem]) + , _rTotalMatchedRows :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rKind' +-- +-- * 'rAverages' +-- +-- * 'rWarnings' +-- +-- * 'rRows' +-- +-- * 'rTotals' +-- +-- * 'rHeaders' +-- +-- * 'rTotalMatchedRows' +report + :: Report +report = + Report + { _rKind = "adsensehost#report" + , _rAverages = Nothing + , _rWarnings = Nothing + , _rRows = Nothing + , _rTotals = Nothing + , _rHeaders = Nothing + , _rTotalMatchedRows = Nothing + } + +-- | Kind this is, in this case adsensehost#report. +rKind :: Lens' Report Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The averages of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +rAverages :: Lens' Report [Text] +rAverages + = lens _rAverages (\ s a -> s{_rAverages = a}) . + _Default + . _Coerce + +-- | Any warnings associated with generation of the report. +rWarnings :: Lens' Report [Text] +rWarnings + = lens _rWarnings (\ s a -> s{_rWarnings = a}) . + _Default + . _Coerce + +-- | The output rows of the report. Each row is a list of cells; one for each +-- dimension in the request, followed by one for each metric in the +-- request. The dimension cells contain strings, and the metric cells +-- contain numbers. +rRows :: Lens' Report [[Text]] +rRows + = lens _rRows (\ s a -> s{_rRows = a}) . _Default . + _Coerce + +-- | The totals of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +rTotals :: Lens' Report [Text] +rTotals + = lens _rTotals (\ s a -> s{_rTotals = a}) . _Default + . _Coerce + +-- | The header information of the columns requested in the report. This is a +-- list of headers; one for each dimension in the request, followed by one +-- for each metric in the request. +rHeaders :: Lens' Report [ReportHeadersItem] +rHeaders + = lens _rHeaders (\ s a -> s{_rHeaders = a}) . + _Default + . _Coerce + +-- | The total number of rows matched by the report request. Fewer rows may +-- be returned in the response due to being limited by the row count +-- requested or the report row limit. +rTotalMatchedRows :: Lens' Report (Maybe Int64) +rTotalMatchedRows + = lens _rTotalMatchedRows + (\ s a -> s{_rTotalMatchedRows = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "kind" .!= "adsensehost#report") <*> + (o .:? "averages" .!= mempty) + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "totals" .!= mempty) + <*> (o .:? "headers" .!= mempty) + <*> (o .:? "totalMatchedRows")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [Just ("kind" .= _rKind), + ("averages" .=) <$> _rAverages, + ("warnings" .=) <$> _rWarnings, + ("rows" .=) <$> _rRows, ("totals" .=) <$> _rTotals, + ("headers" .=) <$> _rHeaders, + ("totalMatchedRows" .=) <$> _rTotalMatchedRows]) + +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _accStatus :: !(Maybe Text) + , _accKind :: !Text + , _accName :: !(Maybe Text) + , _accId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accStatus' +-- +-- * 'accKind' +-- +-- * 'accName' +-- +-- * 'accId' +account + :: Account +account = + Account + { _accStatus = Nothing + , _accKind = "adsensehost#account" + , _accName = Nothing + , _accId = Nothing + } + +-- | Approval status of this account. One of: PENDING, APPROVED, DISABLED. +accStatus :: Lens' Account (Maybe Text) +accStatus + = lens _accStatus (\ s a -> s{_accStatus = a}) + +-- | Kind of resource this is, in this case adsensehost#account. +accKind :: Lens' Account Text +accKind = lens _accKind (\ s a -> s{_accKind = a}) + +-- | Name of this account. +accName :: Lens' Account (Maybe Text) +accName = lens _accName (\ s a -> s{_accName = a}) + +-- | Unique identifier of this account. +accId :: Lens' Account (Maybe Text) +accId = lens _accId (\ s a -> s{_accId = a}) + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "status") <*> + (o .:? "kind" .!= "adsensehost#account") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("status" .=) <$> _accStatus, + Just ("kind" .= _accKind), ("name" .=) <$> _accName, + ("id" .=) <$> _accId]) + +-- +-- /See:/ 'adClient' smart constructor. +data AdClient = AdClient + { _aaKind :: !Text + , _aaArcOptIn :: !(Maybe Bool) + , _aaSupportsReporting :: !(Maybe Bool) + , _aaId :: !(Maybe Text) + , _aaProductCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClient' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaKind' +-- +-- * 'aaArcOptIn' +-- +-- * 'aaSupportsReporting' +-- +-- * 'aaId' +-- +-- * 'aaProductCode' +adClient + :: AdClient +adClient = + AdClient + { _aaKind = "adsensehost#adClient" + , _aaArcOptIn = Nothing + , _aaSupportsReporting = Nothing + , _aaId = Nothing + , _aaProductCode = Nothing + } + +-- | Kind of resource this is, in this case adsensehost#adClient. +aaKind :: Lens' AdClient Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | Whether this ad client is opted in to ARC. +aaArcOptIn :: Lens' AdClient (Maybe Bool) +aaArcOptIn + = lens _aaArcOptIn (\ s a -> s{_aaArcOptIn = a}) + +-- | Whether this ad client supports being reported on. +aaSupportsReporting :: Lens' AdClient (Maybe Bool) +aaSupportsReporting + = lens _aaSupportsReporting + (\ s a -> s{_aaSupportsReporting = a}) + +-- | Unique identifier of this ad client. +aaId :: Lens' AdClient (Maybe Text) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | This ad client\'s product code, which corresponds to the PRODUCT_CODE +-- report dimension. +aaProductCode :: Lens' AdClient (Maybe Text) +aaProductCode + = lens _aaProductCode + (\ s a -> s{_aaProductCode = a}) + +instance FromJSON AdClient where + parseJSON + = withObject "AdClient" + (\ o -> + AdClient <$> + (o .:? "kind" .!= "adsensehost#adClient") <*> + (o .:? "arcOptIn") + <*> (o .:? "supportsReporting") + <*> (o .:? "id") + <*> (o .:? "productCode")) + +instance ToJSON AdClient where + toJSON AdClient{..} + = object + (catMaybes + [Just ("kind" .= _aaKind), + ("arcOptIn" .=) <$> _aaArcOptIn, + ("supportsReporting" .=) <$> _aaSupportsReporting, + ("id" .=) <$> _aaId, + ("productCode" .=) <$> _aaProductCode]) + +-- +-- /See:/ 'adStyle' smart constructor. +data AdStyle = AdStyle + { _assCorners :: !(Maybe Text) + , _assKind :: !Text + , _assFont :: !(Maybe AdStyleFont) + , _assColors :: !(Maybe AdStyleColors) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assCorners' +-- +-- * 'assKind' +-- +-- * 'assFont' +-- +-- * 'assColors' +adStyle + :: AdStyle +adStyle = + AdStyle + { _assCorners = Nothing + , _assKind = "adsensehost#adStyle" + , _assFont = Nothing + , _assColors = Nothing + } + +-- | The style of the corners in the ad. Possible values are SQUARE, +-- SLIGHTLY_ROUNDED and VERY_ROUNDED. +assCorners :: Lens' AdStyle (Maybe Text) +assCorners + = lens _assCorners (\ s a -> s{_assCorners = a}) + +-- | Kind this is, in this case adsensehost#adStyle. +assKind :: Lens' AdStyle Text +assKind = lens _assKind (\ s a -> s{_assKind = a}) + +-- | The font which is included in the style. +assFont :: Lens' AdStyle (Maybe AdStyleFont) +assFont = lens _assFont (\ s a -> s{_assFont = a}) + +-- | The colors included in the style. These are represented as six +-- hexadecimal characters, similar to HTML color codes, but without the +-- leading hash. +assColors :: Lens' AdStyle (Maybe AdStyleColors) +assColors + = lens _assColors (\ s a -> s{_assColors = a}) + +instance FromJSON AdStyle where + parseJSON + = withObject "AdStyle" + (\ o -> + AdStyle <$> + (o .:? "corners") <*> + (o .:? "kind" .!= "adsensehost#adStyle") + <*> (o .:? "font") + <*> (o .:? "colors")) + +instance ToJSON AdStyle where + toJSON AdStyle{..} + = object + (catMaybes + [("corners" .=) <$> _assCorners, + Just ("kind" .= _assKind), ("font" .=) <$> _assFont, + ("colors" .=) <$> _assColors]) + +-- +-- /See:/ 'customChannel' smart constructor. +data CustomChannel = CustomChannel + { _cKind :: !Text + , _cName :: !(Maybe Text) + , _cCode :: !(Maybe Text) + , _cId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cKind' +-- +-- * 'cName' +-- +-- * 'cCode' +-- +-- * 'cId' +customChannel + :: CustomChannel +customChannel = + CustomChannel + { _cKind = "adsensehost#customChannel" + , _cName = Nothing + , _cCode = Nothing + , _cId = Nothing + } + +-- | Kind of resource this is, in this case adsensehost#customChannel. +cKind :: Lens' CustomChannel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Name of this custom channel. +cName :: Lens' CustomChannel (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Code of this custom channel, not necessarily unique across ad clients. +cCode :: Lens' CustomChannel (Maybe Text) +cCode = lens _cCode (\ s a -> s{_cCode = a}) + +-- | Unique identifier of this custom channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +cId :: Lens' CustomChannel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +instance FromJSON CustomChannel where + parseJSON + = withObject "CustomChannel" + (\ o -> + CustomChannel <$> + (o .:? "kind" .!= "adsensehost#customChannel") <*> + (o .:? "name") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON CustomChannel where + toJSON CustomChannel{..} + = object + (catMaybes + [Just ("kind" .= _cKind), ("name" .=) <$> _cName, + ("code" .=) <$> _cCode, ("id" .=) <$> _cId]) + +-- +-- /See:/ 'uRLChannel' smart constructor. +data URLChannel = URLChannel + { _urlcKind :: !Text + , _urlcId :: !(Maybe Text) + , _urlcUrlPattern :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlcKind' +-- +-- * 'urlcId' +-- +-- * 'urlcUrlPattern' +uRLChannel + :: URLChannel +uRLChannel = + URLChannel + { _urlcKind = "adsensehost#urlChannel" + , _urlcId = Nothing + , _urlcUrlPattern = Nothing + } + +-- | Kind of resource this is, in this case adsensehost#urlChannel. +urlcKind :: Lens' URLChannel Text +urlcKind = lens _urlcKind (\ s a -> s{_urlcKind = a}) + +-- | Unique identifier of this URL channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +urlcId :: Lens' URLChannel (Maybe Text) +urlcId = lens _urlcId (\ s a -> s{_urlcId = a}) + +-- | URL Pattern of this URL channel. Does not include \"http:\/\/\" or +-- \"https:\/\/\". Example: www.example.com\/home +urlcUrlPattern :: Lens' URLChannel (Maybe Text) +urlcUrlPattern + = lens _urlcUrlPattern + (\ s a -> s{_urlcUrlPattern = a}) + +instance FromJSON URLChannel where + parseJSON + = withObject "URLChannel" + (\ o -> + URLChannel <$> + (o .:? "kind" .!= "adsensehost#urlChannel") <*> + (o .:? "id") + <*> (o .:? "urlPattern")) + +instance ToJSON URLChannel where + toJSON URLChannel{..} + = object + (catMaybes + [Just ("kind" .= _urlcKind), ("id" .=) <$> _urlcId, + ("urlPattern" .=) <$> _urlcUrlPattern]) + +-- +-- /See:/ 'adCode' smart constructor. +data AdCode = AdCode + { _addKind :: !Text + , _addAdCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdCode' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'addKind' +-- +-- * 'addAdCode' +adCode + :: AdCode +adCode = + AdCode + { _addKind = "adsensehost#adCode" + , _addAdCode = Nothing + } + +-- | Kind this is, in this case adsensehost#adCode. +addKind :: Lens' AdCode Text +addKind = lens _addKind (\ s a -> s{_addKind = a}) + +-- | The ad code snippet. +addAdCode :: Lens' AdCode (Maybe Text) +addAdCode + = lens _addAdCode (\ s a -> s{_addAdCode = a}) + +instance FromJSON AdCode where + parseJSON + = withObject "AdCode" + (\ o -> + AdCode <$> + (o .:? "kind" .!= "adsensehost#adCode") <*> + (o .:? "adCode")) + +instance ToJSON AdCode where + toJSON AdCode{..} + = object + (catMaybes + [Just ("kind" .= _addKind), + ("adCode" .=) <$> _addAdCode]) diff --git a/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Sum.hs b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Sum.hs new file mode 100644 index 000000000..9b6b0b8d6 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSenseHost.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSenseHost.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/Get.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/Get.hs new file mode 100644 index 000000000..3facc3190 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/Get.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adclients.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about one of the ad clients in the specified +-- publisher\'s AdSense account. +-- +-- /See:/ for @AdsensehostAccountsAdclientsGet@. +module AdSenseHost.Accounts.Adclients.Get + ( + -- * REST Resource + AccountsAdclientsGetAPI + + -- * Creating a Request + , accountsAdclientsGet + , AccountsAdclientsGet + + -- * Request Lenses + , aagQuotaUser + , aagPrettyPrint + , aagUserIp + , aagAdClientId + , aagAccountId + , aagKey + , aagOauthToken + , aagFields + , aagAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdclientsGet@ which the +-- 'AccountsAdclientsGet' request conforms to. +type AccountsAdclientsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> Get '[JSON] AdClient + +-- | Get information about one of the ad clients in the specified +-- publisher\'s AdSense account. +-- +-- /See:/ 'accountsAdclientsGet' smart constructor. +data AccountsAdclientsGet = AccountsAdclientsGet + { _aagQuotaUser :: !(Maybe Text) + , _aagPrettyPrint :: !Bool + , _aagUserIp :: !(Maybe Text) + , _aagAdClientId :: !Text + , _aagAccountId :: !Text + , _aagKey :: !(Maybe Text) + , _aagOauthToken :: !(Maybe Text) + , _aagFields :: !(Maybe Text) + , _aagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdclientsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aagQuotaUser' +-- +-- * 'aagPrettyPrint' +-- +-- * 'aagUserIp' +-- +-- * 'aagAdClientId' +-- +-- * 'aagAccountId' +-- +-- * 'aagKey' +-- +-- * 'aagOauthToken' +-- +-- * 'aagFields' +-- +-- * 'aagAlt' +accountsAdclientsGet + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdclientsGet +accountsAdclientsGet pAagAdClientId_ pAagAccountId_ = + AccountsAdclientsGet + { _aagQuotaUser = Nothing + , _aagPrettyPrint = True + , _aagUserIp = Nothing + , _aagAdClientId = pAagAdClientId_ + , _aagAccountId = pAagAccountId_ + , _aagKey = Nothing + , _aagOauthToken = Nothing + , _aagFields = Nothing + , _aagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aagQuotaUser :: Lens' AccountsAdclientsGet' (Maybe Text) +aagQuotaUser + = lens _aagQuotaUser (\ s a -> s{_aagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aagPrettyPrint :: Lens' AccountsAdclientsGet' Bool +aagPrettyPrint + = lens _aagPrettyPrint + (\ s a -> s{_aagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aagUserIp :: Lens' AccountsAdclientsGet' (Maybe Text) +aagUserIp + = lens _aagUserIp (\ s a -> s{_aagUserIp = a}) + +-- | Ad client to get. +aagAdClientId :: Lens' AccountsAdclientsGet' Text +aagAdClientId + = lens _aagAdClientId + (\ s a -> s{_aagAdClientId = a}) + +-- | Account which contains the ad client. +aagAccountId :: Lens' AccountsAdclientsGet' Text +aagAccountId + = lens _aagAccountId (\ s a -> s{_aagAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aagKey :: Lens' AccountsAdclientsGet' (Maybe Text) +aagKey = lens _aagKey (\ s a -> s{_aagKey = a}) + +-- | OAuth 2.0 token for the current user. +aagOauthToken :: Lens' AccountsAdclientsGet' (Maybe Text) +aagOauthToken + = lens _aagOauthToken + (\ s a -> s{_aagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aagFields :: Lens' AccountsAdclientsGet' (Maybe Text) +aagFields + = lens _aagFields (\ s a -> s{_aagFields = a}) + +-- | Data format for the response. +aagAlt :: Lens' AccountsAdclientsGet' Text +aagAlt = lens _aagAlt (\ s a -> s{_aagAlt = a}) + +instance GoogleRequest AccountsAdclientsGet' where + type Rs AccountsAdclientsGet' = AdClient + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdclientsGet{..} + = go _aagQuotaUser _aagPrettyPrint _aagUserIp + _aagAdClientId + _aagAccountId + _aagKey + _aagOauthToken + _aagFields + _aagAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdclientsGetAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/List.hs new file mode 100644 index 000000000..309d79a87 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adclients/List.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adclients.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all hosted ad clients in the specified hosted account. +-- +-- /See:/ for @AdsensehostAccountsAdclientsList@. +module AdSenseHost.Accounts.Adclients.List + ( + -- * REST Resource + AccountsAdclientsListAPI + + -- * Creating a Request + , accountsAdclientsList + , AccountsAdclientsList + + -- * Request Lenses + , aalQuotaUser + , aalPrettyPrint + , aalUserIp + , aalAccountId + , aalKey + , aalPageToken + , aalOauthToken + , aalMaxResults + , aalFields + , aalAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdclientsList@ which the +-- 'AccountsAdclientsList' request conforms to. +type AccountsAdclientsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AdClients + +-- | List all hosted ad clients in the specified hosted account. +-- +-- /See:/ 'accountsAdclientsList' smart constructor. +data AccountsAdclientsList = AccountsAdclientsList + { _aalQuotaUser :: !(Maybe Text) + , _aalPrettyPrint :: !Bool + , _aalUserIp :: !(Maybe Text) + , _aalAccountId :: !Text + , _aalKey :: !(Maybe Text) + , _aalPageToken :: !(Maybe Text) + , _aalOauthToken :: !(Maybe Text) + , _aalMaxResults :: !(Maybe Word32) + , _aalFields :: !(Maybe Text) + , _aalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdclientsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalQuotaUser' +-- +-- * 'aalPrettyPrint' +-- +-- * 'aalUserIp' +-- +-- * 'aalAccountId' +-- +-- * 'aalKey' +-- +-- * 'aalPageToken' +-- +-- * 'aalOauthToken' +-- +-- * 'aalMaxResults' +-- +-- * 'aalFields' +-- +-- * 'aalAlt' +accountsAdclientsList + :: Text -- ^ 'accountId' + -> AccountsAdclientsList +accountsAdclientsList pAalAccountId_ = + AccountsAdclientsList + { _aalQuotaUser = Nothing + , _aalPrettyPrint = True + , _aalUserIp = Nothing + , _aalAccountId = pAalAccountId_ + , _aalKey = Nothing + , _aalPageToken = Nothing + , _aalOauthToken = Nothing + , _aalMaxResults = Nothing + , _aalFields = Nothing + , _aalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aalQuotaUser :: Lens' AccountsAdclientsList' (Maybe Text) +aalQuotaUser + = lens _aalQuotaUser (\ s a -> s{_aalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aalPrettyPrint :: Lens' AccountsAdclientsList' Bool +aalPrettyPrint + = lens _aalPrettyPrint + (\ s a -> s{_aalPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aalUserIp :: Lens' AccountsAdclientsList' (Maybe Text) +aalUserIp + = lens _aalUserIp (\ s a -> s{_aalUserIp = a}) + +-- | Account for which to list ad clients. +aalAccountId :: Lens' AccountsAdclientsList' Text +aalAccountId + = lens _aalAccountId (\ s a -> s{_aalAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aalKey :: Lens' AccountsAdclientsList' (Maybe Text) +aalKey = lens _aalKey (\ s a -> s{_aalKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aalPageToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalPageToken + = lens _aalPageToken (\ s a -> s{_aalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aalOauthToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalOauthToken + = lens _aalOauthToken + (\ s a -> s{_aalOauthToken = a}) + +-- | The maximum number of ad clients to include in the response, used for +-- paging. +aalMaxResults :: Lens' AccountsAdclientsList' (Maybe Word32) +aalMaxResults + = lens _aalMaxResults + (\ s a -> s{_aalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aalFields :: Lens' AccountsAdclientsList' (Maybe Text) +aalFields + = lens _aalFields (\ s a -> s{_aalFields = a}) + +-- | Data format for the response. +aalAlt :: Lens' AccountsAdclientsList' Text +aalAlt = lens _aalAlt (\ s a -> s{_aalAlt = a}) + +instance GoogleRequest AccountsAdclientsList' where + type Rs AccountsAdclientsList' = AdClients + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdclientsList{..} + = go _aalQuotaUser _aalPrettyPrint _aalUserIp + _aalAccountId + _aalKey + _aalPageToken + _aalOauthToken + _aalMaxResults + _aalFields + _aalAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdclientsListAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Delete.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Delete.hs new file mode 100644 index 000000000..56f3eb4b4 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Delete.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete the specified ad unit from the specified publisher AdSense +-- account. +-- +-- /See:/ for @AdsensehostAccountsAdunitsDelete@. +module AdSenseHost.Accounts.Adunits.Delete + ( + -- * REST Resource + AccountsAdunitsDeleteAPI + + -- * Creating a Request + , accountsAdunitsDelete + , AccountsAdunitsDelete + + -- * Request Lenses + , aadQuotaUser + , aadPrettyPrint + , aadUserIp + , aadAdUnitId + , aadAdClientId + , aadAccountId + , aadKey + , aadOauthToken + , aadFields + , aadAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsDelete@ which the +-- 'AccountsAdunitsDelete' request conforms to. +type AccountsAdunitsDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> Delete '[JSON] AdUnit + +-- | Delete the specified ad unit from the specified publisher AdSense +-- account. +-- +-- /See:/ 'accountsAdunitsDelete' smart constructor. +data AccountsAdunitsDelete = AccountsAdunitsDelete + { _aadQuotaUser :: !(Maybe Text) + , _aadPrettyPrint :: !Bool + , _aadUserIp :: !(Maybe Text) + , _aadAdUnitId :: !Text + , _aadAdClientId :: !Text + , _aadAccountId :: !Text + , _aadKey :: !(Maybe Text) + , _aadOauthToken :: !(Maybe Text) + , _aadFields :: !(Maybe Text) + , _aadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aadQuotaUser' +-- +-- * 'aadPrettyPrint' +-- +-- * 'aadUserIp' +-- +-- * 'aadAdUnitId' +-- +-- * 'aadAdClientId' +-- +-- * 'aadAccountId' +-- +-- * 'aadKey' +-- +-- * 'aadOauthToken' +-- +-- * 'aadFields' +-- +-- * 'aadAlt' +accountsAdunitsDelete + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsDelete +accountsAdunitsDelete pAadAdUnitId_ pAadAdClientId_ pAadAccountId_ = + AccountsAdunitsDelete + { _aadQuotaUser = Nothing + , _aadPrettyPrint = True + , _aadUserIp = Nothing + , _aadAdUnitId = pAadAdUnitId_ + , _aadAdClientId = pAadAdClientId_ + , _aadAccountId = pAadAccountId_ + , _aadKey = Nothing + , _aadOauthToken = Nothing + , _aadFields = Nothing + , _aadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aadQuotaUser :: Lens' AccountsAdunitsDelete' (Maybe Text) +aadQuotaUser + = lens _aadQuotaUser (\ s a -> s{_aadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aadPrettyPrint :: Lens' AccountsAdunitsDelete' Bool +aadPrettyPrint + = lens _aadPrettyPrint + (\ s a -> s{_aadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aadUserIp :: Lens' AccountsAdunitsDelete' (Maybe Text) +aadUserIp + = lens _aadUserIp (\ s a -> s{_aadUserIp = a}) + +-- | Ad unit to delete. +aadAdUnitId :: Lens' AccountsAdunitsDelete' Text +aadAdUnitId + = lens _aadAdUnitId (\ s a -> s{_aadAdUnitId = a}) + +-- | Ad client for which to get ad unit. +aadAdClientId :: Lens' AccountsAdunitsDelete' Text +aadAdClientId + = lens _aadAdClientId + (\ s a -> s{_aadAdClientId = a}) + +-- | Account which contains the ad unit. +aadAccountId :: Lens' AccountsAdunitsDelete' Text +aadAccountId + = lens _aadAccountId (\ s a -> s{_aadAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aadKey :: Lens' AccountsAdunitsDelete' (Maybe Text) +aadKey = lens _aadKey (\ s a -> s{_aadKey = a}) + +-- | OAuth 2.0 token for the current user. +aadOauthToken :: Lens' AccountsAdunitsDelete' (Maybe Text) +aadOauthToken + = lens _aadOauthToken + (\ s a -> s{_aadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aadFields :: Lens' AccountsAdunitsDelete' (Maybe Text) +aadFields + = lens _aadFields (\ s a -> s{_aadFields = a}) + +-- | Data format for the response. +aadAlt :: Lens' AccountsAdunitsDelete' Text +aadAlt = lens _aadAlt (\ s a -> s{_aadAlt = a}) + +instance GoogleRequest AccountsAdunitsDelete' where + type Rs AccountsAdunitsDelete' = AdUnit + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsDelete{..} + = go _aadQuotaUser _aadPrettyPrint _aadUserIp + _aadAdUnitId + _aadAdClientId + _aadAccountId + _aadKey + _aadOauthToken + _aadFields + _aadAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsDeleteAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Get.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Get.hs new file mode 100644 index 000000000..0a4ae9068 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the specified host ad unit in this AdSense account. +-- +-- /See:/ for @AdsensehostAccountsAdunitsGet@. +module AdSenseHost.Accounts.Adunits.Get + ( + -- * REST Resource + AccountsAdunitsGetAPI + + -- * Creating a Request + , accountsAdunitsGet + , AccountsAdunitsGet + + -- * Request Lenses + , aagaQuotaUser + , aagaPrettyPrint + , aagaUserIp + , aagaAdUnitId + , aagaAdClientId + , aagaAccountId + , aagaKey + , aagaOauthToken + , aagaFields + , aagaAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsGet@ which the +-- 'AccountsAdunitsGet' request conforms to. +type AccountsAdunitsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> Get '[JSON] AdUnit + +-- | Get the specified host ad unit in this AdSense account. +-- +-- /See:/ 'accountsAdunitsGet' smart constructor. +data AccountsAdunitsGet = AccountsAdunitsGet + { _aagaQuotaUser :: !(Maybe Text) + , _aagaPrettyPrint :: !Bool + , _aagaUserIp :: !(Maybe Text) + , _aagaAdUnitId :: !Text + , _aagaAdClientId :: !Text + , _aagaAccountId :: !Text + , _aagaKey :: !(Maybe Text) + , _aagaOauthToken :: !(Maybe Text) + , _aagaFields :: !(Maybe Text) + , _aagaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aagaQuotaUser' +-- +-- * 'aagaPrettyPrint' +-- +-- * 'aagaUserIp' +-- +-- * 'aagaAdUnitId' +-- +-- * 'aagaAdClientId' +-- +-- * 'aagaAccountId' +-- +-- * 'aagaKey' +-- +-- * 'aagaOauthToken' +-- +-- * 'aagaFields' +-- +-- * 'aagaAlt' +accountsAdunitsGet + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsGet +accountsAdunitsGet pAagaAdUnitId_ pAagaAdClientId_ pAagaAccountId_ = + AccountsAdunitsGet + { _aagaQuotaUser = Nothing + , _aagaPrettyPrint = True + , _aagaUserIp = Nothing + , _aagaAdUnitId = pAagaAdUnitId_ + , _aagaAdClientId = pAagaAdClientId_ + , _aagaAccountId = pAagaAccountId_ + , _aagaKey = Nothing + , _aagaOauthToken = Nothing + , _aagaFields = Nothing + , _aagaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aagaQuotaUser :: Lens' AccountsAdunitsGet' (Maybe Text) +aagaQuotaUser + = lens _aagaQuotaUser + (\ s a -> s{_aagaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aagaPrettyPrint :: Lens' AccountsAdunitsGet' Bool +aagaPrettyPrint + = lens _aagaPrettyPrint + (\ s a -> s{_aagaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aagaUserIp :: Lens' AccountsAdunitsGet' (Maybe Text) +aagaUserIp + = lens _aagaUserIp (\ s a -> s{_aagaUserIp = a}) + +-- | Ad unit to get. +aagaAdUnitId :: Lens' AccountsAdunitsGet' Text +aagaAdUnitId + = lens _aagaAdUnitId (\ s a -> s{_aagaAdUnitId = a}) + +-- | Ad client for which to get ad unit. +aagaAdClientId :: Lens' AccountsAdunitsGet' Text +aagaAdClientId + = lens _aagaAdClientId + (\ s a -> s{_aagaAdClientId = a}) + +-- | Account which contains the ad unit. +aagaAccountId :: Lens' AccountsAdunitsGet' Text +aagaAccountId + = lens _aagaAccountId + (\ s a -> s{_aagaAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aagaKey :: Lens' AccountsAdunitsGet' (Maybe Text) +aagaKey = lens _aagaKey (\ s a -> s{_aagaKey = a}) + +-- | OAuth 2.0 token for the current user. +aagaOauthToken :: Lens' AccountsAdunitsGet' (Maybe Text) +aagaOauthToken + = lens _aagaOauthToken + (\ s a -> s{_aagaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aagaFields :: Lens' AccountsAdunitsGet' (Maybe Text) +aagaFields + = lens _aagaFields (\ s a -> s{_aagaFields = a}) + +-- | Data format for the response. +aagaAlt :: Lens' AccountsAdunitsGet' Text +aagaAlt = lens _aagaAlt (\ s a -> s{_aagaAlt = a}) + +instance GoogleRequest AccountsAdunitsGet' where + type Rs AccountsAdunitsGet' = AdUnit + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsGet{..} + = go _aagaQuotaUser _aagaPrettyPrint _aagaUserIp + _aagaAdUnitId + _aagaAdClientId + _aagaAccountId + _aagaKey + _aagaOauthToken + _aagaFields + _aagaAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsGetAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/GetAdCode.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/GetAdCode.hs new file mode 100644 index 000000000..075b80788 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/GetAdCode.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.GetAdCode +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get ad code for the specified ad unit, attaching the specified host +-- custom channels. +-- +-- /See:/ for @AdsensehostAccountsAdunitsGetAdCode@. +module AdSenseHost.Accounts.Adunits.GetAdCode + ( + -- * REST Resource + AccountsAdunitsGetAdCodeAPI + + -- * Creating a Request + , accountsAdunitsGetAdCode + , AccountsAdunitsGetAdCode + + -- * Request Lenses + , aagacQuotaUser + , aagacPrettyPrint + , aagacUserIp + , aagacAdUnitId + , aagacAdClientId + , aagacAccountId + , aagacKey + , aagacHostCustomChannelId + , aagacOauthToken + , aagacFields + , aagacAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsGetAdCode@ which the +-- 'AccountsAdunitsGetAdCode' request conforms to. +type AccountsAdunitsGetAdCodeAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> + "adcode" :> + QueryParams "hostCustomChannelId" Text :> + Get '[JSON] AdCode + +-- | Get ad code for the specified ad unit, attaching the specified host +-- custom channels. +-- +-- /See:/ 'accountsAdunitsGetAdCode' smart constructor. +data AccountsAdunitsGetAdCode = AccountsAdunitsGetAdCode + { _aagacQuotaUser :: !(Maybe Text) + , _aagacPrettyPrint :: !Bool + , _aagacUserIp :: !(Maybe Text) + , _aagacAdUnitId :: !Text + , _aagacAdClientId :: !Text + , _aagacAccountId :: !Text + , _aagacKey :: !(Maybe Text) + , _aagacHostCustomChannelId :: !(Maybe Text) + , _aagacOauthToken :: !(Maybe Text) + , _aagacFields :: !(Maybe Text) + , _aagacAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsGetAdCode'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aagacQuotaUser' +-- +-- * 'aagacPrettyPrint' +-- +-- * 'aagacUserIp' +-- +-- * 'aagacAdUnitId' +-- +-- * 'aagacAdClientId' +-- +-- * 'aagacAccountId' +-- +-- * 'aagacKey' +-- +-- * 'aagacHostCustomChannelId' +-- +-- * 'aagacOauthToken' +-- +-- * 'aagacFields' +-- +-- * 'aagacAlt' +accountsAdunitsGetAdCode + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsGetAdCode +accountsAdunitsGetAdCode pAagacAdUnitId_ pAagacAdClientId_ pAagacAccountId_ = + AccountsAdunitsGetAdCode + { _aagacQuotaUser = Nothing + , _aagacPrettyPrint = True + , _aagacUserIp = Nothing + , _aagacAdUnitId = pAagacAdUnitId_ + , _aagacAdClientId = pAagacAdClientId_ + , _aagacAccountId = pAagacAccountId_ + , _aagacKey = Nothing + , _aagacHostCustomChannelId = Nothing + , _aagacOauthToken = Nothing + , _aagacFields = Nothing + , _aagacAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aagacQuotaUser :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacQuotaUser + = lens _aagacQuotaUser + (\ s a -> s{_aagacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aagacPrettyPrint :: Lens' AccountsAdunitsGetAdCode' Bool +aagacPrettyPrint + = lens _aagacPrettyPrint + (\ s a -> s{_aagacPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aagacUserIp :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacUserIp + = lens _aagacUserIp (\ s a -> s{_aagacUserIp = a}) + +-- | Ad unit to get the code for. +aagacAdUnitId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAdUnitId + = lens _aagacAdUnitId + (\ s a -> s{_aagacAdUnitId = a}) + +-- | Ad client with contains the ad unit. +aagacAdClientId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAdClientId + = lens _aagacAdClientId + (\ s a -> s{_aagacAdClientId = a}) + +-- | Account which contains the ad client. +aagacAccountId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAccountId + = lens _aagacAccountId + (\ s a -> s{_aagacAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aagacKey :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacKey = lens _aagacKey (\ s a -> s{_aagacKey = a}) + +-- | Host custom channel to attach to the ad code. +aagacHostCustomChannelId :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacHostCustomChannelId + = lens _aagacHostCustomChannelId + (\ s a -> s{_aagacHostCustomChannelId = a}) + +-- | OAuth 2.0 token for the current user. +aagacOauthToken :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacOauthToken + = lens _aagacOauthToken + (\ s a -> s{_aagacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aagacFields :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacFields + = lens _aagacFields (\ s a -> s{_aagacFields = a}) + +-- | Data format for the response. +aagacAlt :: Lens' AccountsAdunitsGetAdCode' Text +aagacAlt = lens _aagacAlt (\ s a -> s{_aagacAlt = a}) + +instance GoogleRequest AccountsAdunitsGetAdCode' + where + type Rs AccountsAdunitsGetAdCode' = AdCode + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsGetAdCode{..} + = go _aagacQuotaUser _aagacPrettyPrint _aagacUserIp + _aagacAdUnitId + _aagacAdClientId + _aagacAccountId + _aagacKey + _aagacHostCustomChannelId + _aagacOauthToken + _aagacFields + _aagacAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsGetAdCodeAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Insert.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Insert.hs new file mode 100644 index 000000000..f6968fd24 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Insert.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert the supplied ad unit into the specified publisher AdSense +-- account. +-- +-- /See:/ for @AdsensehostAccountsAdunitsInsert@. +module AdSenseHost.Accounts.Adunits.Insert + ( + -- * REST Resource + AccountsAdunitsInsertAPI + + -- * Creating a Request + , accountsAdunitsInsert + , AccountsAdunitsInsert + + -- * Request Lenses + , aaiQuotaUser + , aaiPrettyPrint + , aaiUserIp + , aaiAdClientId + , aaiAccountId + , aaiKey + , aaiOauthToken + , aaiFields + , aaiAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsInsert@ which the +-- 'AccountsAdunitsInsert' request conforms to. +type AccountsAdunitsInsertAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> Post '[JSON] AdUnit + +-- | Insert the supplied ad unit into the specified publisher AdSense +-- account. +-- +-- /See:/ 'accountsAdunitsInsert' smart constructor. +data AccountsAdunitsInsert = AccountsAdunitsInsert + { _aaiQuotaUser :: !(Maybe Text) + , _aaiPrettyPrint :: !Bool + , _aaiUserIp :: !(Maybe Text) + , _aaiAdClientId :: !Text + , _aaiAccountId :: !Text + , _aaiKey :: !(Maybe Text) + , _aaiOauthToken :: !(Maybe Text) + , _aaiFields :: !(Maybe Text) + , _aaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaiQuotaUser' +-- +-- * 'aaiPrettyPrint' +-- +-- * 'aaiUserIp' +-- +-- * 'aaiAdClientId' +-- +-- * 'aaiAccountId' +-- +-- * 'aaiKey' +-- +-- * 'aaiOauthToken' +-- +-- * 'aaiFields' +-- +-- * 'aaiAlt' +accountsAdunitsInsert + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsInsert +accountsAdunitsInsert pAaiAdClientId_ pAaiAccountId_ = + AccountsAdunitsInsert + { _aaiQuotaUser = Nothing + , _aaiPrettyPrint = True + , _aaiUserIp = Nothing + , _aaiAdClientId = pAaiAdClientId_ + , _aaiAccountId = pAaiAccountId_ + , _aaiKey = Nothing + , _aaiOauthToken = Nothing + , _aaiFields = Nothing + , _aaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaiQuotaUser :: Lens' AccountsAdunitsInsert' (Maybe Text) +aaiQuotaUser + = lens _aaiQuotaUser (\ s a -> s{_aaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaiPrettyPrint :: Lens' AccountsAdunitsInsert' Bool +aaiPrettyPrint + = lens _aaiPrettyPrint + (\ s a -> s{_aaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaiUserIp :: Lens' AccountsAdunitsInsert' (Maybe Text) +aaiUserIp + = lens _aaiUserIp (\ s a -> s{_aaiUserIp = a}) + +-- | Ad client into which to insert the ad unit. +aaiAdClientId :: Lens' AccountsAdunitsInsert' Text +aaiAdClientId + = lens _aaiAdClientId + (\ s a -> s{_aaiAdClientId = a}) + +-- | Account which will contain the ad unit. +aaiAccountId :: Lens' AccountsAdunitsInsert' Text +aaiAccountId + = lens _aaiAccountId (\ s a -> s{_aaiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaiKey :: Lens' AccountsAdunitsInsert' (Maybe Text) +aaiKey = lens _aaiKey (\ s a -> s{_aaiKey = a}) + +-- | OAuth 2.0 token for the current user. +aaiOauthToken :: Lens' AccountsAdunitsInsert' (Maybe Text) +aaiOauthToken + = lens _aaiOauthToken + (\ s a -> s{_aaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aaiFields :: Lens' AccountsAdunitsInsert' (Maybe Text) +aaiFields + = lens _aaiFields (\ s a -> s{_aaiFields = a}) + +-- | Data format for the response. +aaiAlt :: Lens' AccountsAdunitsInsert' Text +aaiAlt = lens _aaiAlt (\ s a -> s{_aaiAlt = a}) + +instance GoogleRequest AccountsAdunitsInsert' where + type Rs AccountsAdunitsInsert' = AdUnit + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsInsert{..} + = go _aaiQuotaUser _aaiPrettyPrint _aaiUserIp + _aaiAdClientId + _aaiAccountId + _aaiKey + _aaiOauthToken + _aaiFields + _aaiAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsInsertAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/List.hs new file mode 100644 index 000000000..4f7ac6924 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad units in the specified publisher\'s AdSense account. +-- +-- /See:/ for @AdsensehostAccountsAdunitsList@. +module AdSenseHost.Accounts.Adunits.List + ( + -- * REST Resource + AccountsAdunitsListAPI + + -- * Creating a Request + , accountsAdunitsList + , AccountsAdunitsList + + -- * Request Lenses + , accQuotaUser + , accPrettyPrint + , accIncludeInactive + , accUserIp + , accAdClientId + , accAccountId + , accKey + , accPageToken + , accOauthToken + , accMaxResults + , accFields + , accAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsList@ which the +-- 'AccountsAdunitsList' request conforms to. +type AccountsAdunitsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + QueryParam "includeInactive" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> Get '[JSON] AdUnits + +-- | List all ad units in the specified publisher\'s AdSense account. +-- +-- /See:/ 'accountsAdunitsList' smart constructor. +data AccountsAdunitsList = AccountsAdunitsList + { _accQuotaUser :: !(Maybe Text) + , _accPrettyPrint :: !Bool + , _accIncludeInactive :: !(Maybe Bool) + , _accUserIp :: !(Maybe Text) + , _accAdClientId :: !Text + , _accAccountId :: !Text + , _accKey :: !(Maybe Text) + , _accPageToken :: !(Maybe Text) + , _accOauthToken :: !(Maybe Text) + , _accMaxResults :: !(Maybe Word32) + , _accFields :: !(Maybe Text) + , _accAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accQuotaUser' +-- +-- * 'accPrettyPrint' +-- +-- * 'accIncludeInactive' +-- +-- * 'accUserIp' +-- +-- * 'accAdClientId' +-- +-- * 'accAccountId' +-- +-- * 'accKey' +-- +-- * 'accPageToken' +-- +-- * 'accOauthToken' +-- +-- * 'accMaxResults' +-- +-- * 'accFields' +-- +-- * 'accAlt' +accountsAdunitsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsList +accountsAdunitsList pAccAdClientId_ pAccAccountId_ = + AccountsAdunitsList + { _accQuotaUser = Nothing + , _accPrettyPrint = True + , _accIncludeInactive = Nothing + , _accUserIp = Nothing + , _accAdClientId = pAccAdClientId_ + , _accAccountId = pAccAccountId_ + , _accKey = Nothing + , _accPageToken = Nothing + , _accOauthToken = Nothing + , _accMaxResults = Nothing + , _accFields = Nothing + , _accAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +accQuotaUser :: Lens' AccountsAdunitsList' (Maybe Text) +accQuotaUser + = lens _accQuotaUser (\ s a -> s{_accQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +accPrettyPrint :: Lens' AccountsAdunitsList' Bool +accPrettyPrint + = lens _accPrettyPrint + (\ s a -> s{_accPrettyPrint = a}) + +-- | Whether to include inactive ad units. Default: true. +accIncludeInactive :: Lens' AccountsAdunitsList' (Maybe Bool) +accIncludeInactive + = lens _accIncludeInactive + (\ s a -> s{_accIncludeInactive = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +accUserIp :: Lens' AccountsAdunitsList' (Maybe Text) +accUserIp + = lens _accUserIp (\ s a -> s{_accUserIp = a}) + +-- | Ad client for which to list ad units. +accAdClientId :: Lens' AccountsAdunitsList' Text +accAdClientId + = lens _accAdClientId + (\ s a -> s{_accAdClientId = a}) + +-- | Account which contains the ad client. +accAccountId :: Lens' AccountsAdunitsList' Text +accAccountId + = lens _accAccountId (\ s a -> s{_accAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +accKey :: Lens' AccountsAdunitsList' (Maybe Text) +accKey = lens _accKey (\ s a -> s{_accKey = a}) + +-- | A continuation token, used to page through ad units. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +accPageToken :: Lens' AccountsAdunitsList' (Maybe Text) +accPageToken + = lens _accPageToken (\ s a -> s{_accPageToken = a}) + +-- | OAuth 2.0 token for the current user. +accOauthToken :: Lens' AccountsAdunitsList' (Maybe Text) +accOauthToken + = lens _accOauthToken + (\ s a -> s{_accOauthToken = a}) + +-- | The maximum number of ad units to include in the response, used for +-- paging. +accMaxResults :: Lens' AccountsAdunitsList' (Maybe Word32) +accMaxResults + = lens _accMaxResults + (\ s a -> s{_accMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +accFields :: Lens' AccountsAdunitsList' (Maybe Text) +accFields + = lens _accFields (\ s a -> s{_accFields = a}) + +-- | Data format for the response. +accAlt :: Lens' AccountsAdunitsList' Text +accAlt = lens _accAlt (\ s a -> s{_accAlt = a}) + +instance GoogleRequest AccountsAdunitsList' where + type Rs AccountsAdunitsList' = AdUnits + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsList{..} + = go _accQuotaUser _accPrettyPrint + _accIncludeInactive + _accUserIp + _accAdClientId + _accAccountId + _accKey + _accPageToken + _accOauthToken + _accMaxResults + _accFields + _accAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsListAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Patch.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Patch.hs new file mode 100644 index 000000000..a53abbdfa --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Patch.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the supplied ad unit in the specified publisher AdSense account. +-- This method supports patch semantics. +-- +-- /See:/ for @AdsensehostAccountsAdunitsPatch@. +module AdSenseHost.Accounts.Adunits.Patch + ( + -- * REST Resource + AccountsAdunitsPatchAPI + + -- * Creating a Request + , accountsAdunitsPatch + , AccountsAdunitsPatch + + -- * Request Lenses + , aapQuotaUser + , aapPrettyPrint + , aapUserIp + , aapAdUnitId + , aapAdClientId + , aapAccountId + , aapKey + , aapOauthToken + , aapFields + , aapAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsPatch@ which the +-- 'AccountsAdunitsPatch' request conforms to. +type AccountsAdunitsPatchAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + QueryParam "adUnitId" Text :> Patch '[JSON] AdUnit + +-- | Update the supplied ad unit in the specified publisher AdSense account. +-- This method supports patch semantics. +-- +-- /See:/ 'accountsAdunitsPatch' smart constructor. +data AccountsAdunitsPatch = AccountsAdunitsPatch + { _aapQuotaUser :: !(Maybe Text) + , _aapPrettyPrint :: !Bool + , _aapUserIp :: !(Maybe Text) + , _aapAdUnitId :: !Text + , _aapAdClientId :: !Text + , _aapAccountId :: !Text + , _aapKey :: !(Maybe Text) + , _aapOauthToken :: !(Maybe Text) + , _aapFields :: !(Maybe Text) + , _aapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aapQuotaUser' +-- +-- * 'aapPrettyPrint' +-- +-- * 'aapUserIp' +-- +-- * 'aapAdUnitId' +-- +-- * 'aapAdClientId' +-- +-- * 'aapAccountId' +-- +-- * 'aapKey' +-- +-- * 'aapOauthToken' +-- +-- * 'aapFields' +-- +-- * 'aapAlt' +accountsAdunitsPatch + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsPatch +accountsAdunitsPatch pAapAdUnitId_ pAapAdClientId_ pAapAccountId_ = + AccountsAdunitsPatch + { _aapQuotaUser = Nothing + , _aapPrettyPrint = True + , _aapUserIp = Nothing + , _aapAdUnitId = pAapAdUnitId_ + , _aapAdClientId = pAapAdClientId_ + , _aapAccountId = pAapAccountId_ + , _aapKey = Nothing + , _aapOauthToken = Nothing + , _aapFields = Nothing + , _aapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aapQuotaUser :: Lens' AccountsAdunitsPatch' (Maybe Text) +aapQuotaUser + = lens _aapQuotaUser (\ s a -> s{_aapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aapPrettyPrint :: Lens' AccountsAdunitsPatch' Bool +aapPrettyPrint + = lens _aapPrettyPrint + (\ s a -> s{_aapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aapUserIp :: Lens' AccountsAdunitsPatch' (Maybe Text) +aapUserIp + = lens _aapUserIp (\ s a -> s{_aapUserIp = a}) + +-- | Ad unit to get. +aapAdUnitId :: Lens' AccountsAdunitsPatch' Text +aapAdUnitId + = lens _aapAdUnitId (\ s a -> s{_aapAdUnitId = a}) + +-- | Ad client which contains the ad unit. +aapAdClientId :: Lens' AccountsAdunitsPatch' Text +aapAdClientId + = lens _aapAdClientId + (\ s a -> s{_aapAdClientId = a}) + +-- | Account which contains the ad client. +aapAccountId :: Lens' AccountsAdunitsPatch' Text +aapAccountId + = lens _aapAccountId (\ s a -> s{_aapAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aapKey :: Lens' AccountsAdunitsPatch' (Maybe Text) +aapKey = lens _aapKey (\ s a -> s{_aapKey = a}) + +-- | OAuth 2.0 token for the current user. +aapOauthToken :: Lens' AccountsAdunitsPatch' (Maybe Text) +aapOauthToken + = lens _aapOauthToken + (\ s a -> s{_aapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aapFields :: Lens' AccountsAdunitsPatch' (Maybe Text) +aapFields + = lens _aapFields (\ s a -> s{_aapFields = a}) + +-- | Data format for the response. +aapAlt :: Lens' AccountsAdunitsPatch' Text +aapAlt = lens _aapAlt (\ s a -> s{_aapAlt = a}) + +instance GoogleRequest AccountsAdunitsPatch' where + type Rs AccountsAdunitsPatch' = AdUnit + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsPatch{..} + = go _aapQuotaUser _aapPrettyPrint _aapUserIp + (Just _aapAdUnitId) + _aapAdClientId + _aapAccountId + _aapKey + _aapOauthToken + _aapFields + _aapAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsPatchAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Update.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Update.hs new file mode 100644 index 000000000..78c7ef7d9 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Adunits/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Adunits.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the supplied ad unit in the specified publisher AdSense account. +-- +-- /See:/ for @AdsensehostAccountsAdunitsUpdate@. +module AdSenseHost.Accounts.Adunits.Update + ( + -- * REST Resource + AccountsAdunitsUpdateAPI + + -- * Creating a Request + , accountsAdunitsUpdate + , AccountsAdunitsUpdate + + -- * Request Lenses + , aauQuotaUser + , aauPrettyPrint + , aauUserIp + , aauAdClientId + , aauAccountId + , aauKey + , aauOauthToken + , aauFields + , aauAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsAdunitsUpdate@ which the +-- 'AccountsAdunitsUpdate' request conforms to. +type AccountsAdunitsUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> Put '[JSON] AdUnit + +-- | Update the supplied ad unit in the specified publisher AdSense account. +-- +-- /See:/ 'accountsAdunitsUpdate' smart constructor. +data AccountsAdunitsUpdate = AccountsAdunitsUpdate + { _aauQuotaUser :: !(Maybe Text) + , _aauPrettyPrint :: !Bool + , _aauUserIp :: !(Maybe Text) + , _aauAdClientId :: !Text + , _aauAccountId :: !Text + , _aauKey :: !(Maybe Text) + , _aauOauthToken :: !(Maybe Text) + , _aauFields :: !(Maybe Text) + , _aauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aauQuotaUser' +-- +-- * 'aauPrettyPrint' +-- +-- * 'aauUserIp' +-- +-- * 'aauAdClientId' +-- +-- * 'aauAccountId' +-- +-- * 'aauKey' +-- +-- * 'aauOauthToken' +-- +-- * 'aauFields' +-- +-- * 'aauAlt' +accountsAdunitsUpdate + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsUpdate +accountsAdunitsUpdate pAauAdClientId_ pAauAccountId_ = + AccountsAdunitsUpdate + { _aauQuotaUser = Nothing + , _aauPrettyPrint = True + , _aauUserIp = Nothing + , _aauAdClientId = pAauAdClientId_ + , _aauAccountId = pAauAccountId_ + , _aauKey = Nothing + , _aauOauthToken = Nothing + , _aauFields = Nothing + , _aauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aauQuotaUser :: Lens' AccountsAdunitsUpdate' (Maybe Text) +aauQuotaUser + = lens _aauQuotaUser (\ s a -> s{_aauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aauPrettyPrint :: Lens' AccountsAdunitsUpdate' Bool +aauPrettyPrint + = lens _aauPrettyPrint + (\ s a -> s{_aauPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aauUserIp :: Lens' AccountsAdunitsUpdate' (Maybe Text) +aauUserIp + = lens _aauUserIp (\ s a -> s{_aauUserIp = a}) + +-- | Ad client which contains the ad unit. +aauAdClientId :: Lens' AccountsAdunitsUpdate' Text +aauAdClientId + = lens _aauAdClientId + (\ s a -> s{_aauAdClientId = a}) + +-- | Account which contains the ad client. +aauAccountId :: Lens' AccountsAdunitsUpdate' Text +aauAccountId + = lens _aauAccountId (\ s a -> s{_aauAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aauKey :: Lens' AccountsAdunitsUpdate' (Maybe Text) +aauKey = lens _aauKey (\ s a -> s{_aauKey = a}) + +-- | OAuth 2.0 token for the current user. +aauOauthToken :: Lens' AccountsAdunitsUpdate' (Maybe Text) +aauOauthToken + = lens _aauOauthToken + (\ s a -> s{_aauOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aauFields :: Lens' AccountsAdunitsUpdate' (Maybe Text) +aauFields + = lens _aauFields (\ s a -> s{_aauFields = a}) + +-- | Data format for the response. +aauAlt :: Lens' AccountsAdunitsUpdate' Text +aauAlt = lens _aauAlt (\ s a -> s{_aauAlt = a}) + +instance GoogleRequest AccountsAdunitsUpdate' where + type Rs AccountsAdunitsUpdate' = AdUnit + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsAdunitsUpdate{..} + = go _aauQuotaUser _aauPrettyPrint _aauUserIp + _aauAdClientId + _aauAccountId + _aauKey + _aauOauthToken + _aauFields + _aauAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsUpdateAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Get.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Get.hs new file mode 100644 index 000000000..ea53a8653 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Get.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about the selected associated AdSense account. +-- +-- /See:/ for @AdsensehostAccountsGet@. +module AdSenseHost.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , aggQuotaUser + , aggPrettyPrint + , aggUserIp + , aggAccountId + , aggKey + , aggOauthToken + , aggFields + , aggAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "accounts" :> + Capture "accountId" Text :> Get '[JSON] Account + +-- | Get information about the selected associated AdSense account. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _aggQuotaUser :: !(Maybe Text) + , _aggPrettyPrint :: !Bool + , _aggUserIp :: !(Maybe Text) + , _aggAccountId :: !Text + , _aggKey :: !(Maybe Text) + , _aggOauthToken :: !(Maybe Text) + , _aggFields :: !(Maybe Text) + , _aggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aggQuotaUser' +-- +-- * 'aggPrettyPrint' +-- +-- * 'aggUserIp' +-- +-- * 'aggAccountId' +-- +-- * 'aggKey' +-- +-- * 'aggOauthToken' +-- +-- * 'aggFields' +-- +-- * 'aggAlt' +accountsGet + :: Text -- ^ 'accountId' + -> AccountsGet +accountsGet pAggAccountId_ = + AccountsGet + { _aggQuotaUser = Nothing + , _aggPrettyPrint = True + , _aggUserIp = Nothing + , _aggAccountId = pAggAccountId_ + , _aggKey = Nothing + , _aggOauthToken = Nothing + , _aggFields = Nothing + , _aggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aggQuotaUser :: Lens' AccountsGet' (Maybe Text) +aggQuotaUser + = lens _aggQuotaUser (\ s a -> s{_aggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aggPrettyPrint :: Lens' AccountsGet' Bool +aggPrettyPrint + = lens _aggPrettyPrint + (\ s a -> s{_aggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aggUserIp :: Lens' AccountsGet' (Maybe Text) +aggUserIp + = lens _aggUserIp (\ s a -> s{_aggUserIp = a}) + +-- | Account to get information about. +aggAccountId :: Lens' AccountsGet' Text +aggAccountId + = lens _aggAccountId (\ s a -> s{_aggAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aggKey :: Lens' AccountsGet' (Maybe Text) +aggKey = lens _aggKey (\ s a -> s{_aggKey = a}) + +-- | OAuth 2.0 token for the current user. +aggOauthToken :: Lens' AccountsGet' (Maybe Text) +aggOauthToken + = lens _aggOauthToken + (\ s a -> s{_aggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aggFields :: Lens' AccountsGet' (Maybe Text) +aggFields + = lens _aggFields (\ s a -> s{_aggFields = a}) + +-- | Data format for the response. +aggAlt :: Lens' AccountsGet' Text +aggAlt = lens _aggAlt (\ s a -> s{_aggAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsGet{..} + = go _aggQuotaUser _aggPrettyPrint _aggUserIp + _aggAccountId + _aggKey + _aggOauthToken + _aggFields + _aggAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/List.hs new file mode 100644 index 000000000..65af4bd90 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List hosted accounts associated with this AdSense account by ad client +-- id. +-- +-- /See:/ for @AdsensehostAccountsList@. +module AdSenseHost.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , allQuotaUser + , allPrettyPrint + , allUserIp + , allKey + , allOauthToken + , allFilterAdClientId + , allFields + , allAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "accounts" :> + QueryParams "filterAdClientId" Text :> + Get '[JSON] Accounts + +-- | List hosted accounts associated with this AdSense account by ad client +-- id. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _allQuotaUser :: !(Maybe Text) + , _allPrettyPrint :: !Bool + , _allUserIp :: !(Maybe Text) + , _allKey :: !(Maybe Text) + , _allOauthToken :: !(Maybe Text) + , _allFilterAdClientId :: !Text + , _allFields :: !(Maybe Text) + , _allAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'allQuotaUser' +-- +-- * 'allPrettyPrint' +-- +-- * 'allUserIp' +-- +-- * 'allKey' +-- +-- * 'allOauthToken' +-- +-- * 'allFilterAdClientId' +-- +-- * 'allFields' +-- +-- * 'allAlt' +accountsList + :: Text -- ^ 'filterAdClientId' + -> AccountsList +accountsList pAllFilterAdClientId_ = + AccountsList + { _allQuotaUser = Nothing + , _allPrettyPrint = True + , _allUserIp = Nothing + , _allKey = Nothing + , _allOauthToken = Nothing + , _allFilterAdClientId = pAllFilterAdClientId_ + , _allFields = Nothing + , _allAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +allQuotaUser :: Lens' AccountsList' (Maybe Text) +allQuotaUser + = lens _allQuotaUser (\ s a -> s{_allQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +allPrettyPrint :: Lens' AccountsList' Bool +allPrettyPrint + = lens _allPrettyPrint + (\ s a -> s{_allPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +allUserIp :: Lens' AccountsList' (Maybe Text) +allUserIp + = lens _allUserIp (\ s a -> s{_allUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +allKey :: Lens' AccountsList' (Maybe Text) +allKey = lens _allKey (\ s a -> s{_allKey = a}) + +-- | OAuth 2.0 token for the current user. +allOauthToken :: Lens' AccountsList' (Maybe Text) +allOauthToken + = lens _allOauthToken + (\ s a -> s{_allOauthToken = a}) + +-- | Ad clients to list accounts for. +allFilterAdClientId :: Lens' AccountsList' Text +allFilterAdClientId + = lens _allFilterAdClientId + (\ s a -> s{_allFilterAdClientId = a}) + +-- | Selector specifying which fields to include in a partial response. +allFields :: Lens' AccountsList' (Maybe Text) +allFields + = lens _allFields (\ s a -> s{_allFields = a}) + +-- | Data format for the response. +allAlt :: Lens' AccountsList' Text +allAlt = lens _allAlt (\ s a -> s{_allAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = Accounts + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsList{..} + = go _allQuotaUser _allPrettyPrint _allUserIp _allKey + _allOauthToken + (Just _allFilterAdClientId) + _allFields + _allAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Reports/Generate.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Reports/Generate.hs new file mode 100644 index 000000000..f9a002c6b --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/Reports/Generate.hs @@ -0,0 +1,278 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Accounts.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ for @AdsensehostAccountsReportsGenerate@. +module AdSenseHost.Accounts.Reports.Generate + ( + -- * REST Resource + AccountsReportsGenerateAPI + + -- * Creating a Request + , accountsReportsGenerate + , AccountsReportsGenerate + + -- * Request Lenses + , argQuotaUser + , argPrettyPrint + , argUserIp + , argDimension + , argLocale + , argEndDate + , argStartDate + , argAccountId + , argMetric + , argKey + , argSort + , argFilter + , argOauthToken + , argStartIndex + , argMaxResults + , argFields + , argAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAccountsReportsGenerate@ which the +-- 'AccountsReportsGenerate' request conforms to. +type AccountsReportsGenerateAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + QueryParams "dimension" Text :> + QueryParam "locale" Text :> + QueryParam "endDate" Text :> + QueryParam "startDate" Text :> + QueryParams "metric" Text :> + QueryParams "sort" Text :> + QueryParams "filter" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> Get '[JSON] Report + +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ 'accountsReportsGenerate' smart constructor. +data AccountsReportsGenerate = AccountsReportsGenerate + { _argQuotaUser :: !(Maybe Text) + , _argPrettyPrint :: !Bool + , _argUserIp :: !(Maybe Text) + , _argDimension :: !(Maybe Text) + , _argLocale :: !(Maybe Text) + , _argEndDate :: !Text + , _argStartDate :: !Text + , _argAccountId :: !Text + , _argMetric :: !(Maybe Text) + , _argKey :: !(Maybe Text) + , _argSort :: !(Maybe Text) + , _argFilter :: !(Maybe Text) + , _argOauthToken :: !(Maybe Text) + , _argStartIndex :: !(Maybe Word32) + , _argMaxResults :: !(Maybe Word32) + , _argFields :: !(Maybe Text) + , _argAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argQuotaUser' +-- +-- * 'argPrettyPrint' +-- +-- * 'argUserIp' +-- +-- * 'argDimension' +-- +-- * 'argLocale' +-- +-- * 'argEndDate' +-- +-- * 'argStartDate' +-- +-- * 'argAccountId' +-- +-- * 'argMetric' +-- +-- * 'argKey' +-- +-- * 'argSort' +-- +-- * 'argFilter' +-- +-- * 'argOauthToken' +-- +-- * 'argStartIndex' +-- +-- * 'argMaxResults' +-- +-- * 'argFields' +-- +-- * 'argAlt' +accountsReportsGenerate + :: Text -- ^ 'endDate' + -> Text -- ^ 'startDate' + -> Text -- ^ 'accountId' + -> AccountsReportsGenerate +accountsReportsGenerate pArgEndDate_ pArgStartDate_ pArgAccountId_ = + AccountsReportsGenerate + { _argQuotaUser = Nothing + , _argPrettyPrint = True + , _argUserIp = Nothing + , _argDimension = Nothing + , _argLocale = Nothing + , _argEndDate = pArgEndDate_ + , _argStartDate = pArgStartDate_ + , _argAccountId = pArgAccountId_ + , _argMetric = Nothing + , _argKey = Nothing + , _argSort = Nothing + , _argFilter = Nothing + , _argOauthToken = Nothing + , _argStartIndex = Nothing + , _argMaxResults = Nothing + , _argFields = Nothing + , _argAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +argQuotaUser :: Lens' AccountsReportsGenerate' (Maybe Text) +argQuotaUser + = lens _argQuotaUser (\ s a -> s{_argQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +argPrettyPrint :: Lens' AccountsReportsGenerate' Bool +argPrettyPrint + = lens _argPrettyPrint + (\ s a -> s{_argPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +argUserIp :: Lens' AccountsReportsGenerate' (Maybe Text) +argUserIp + = lens _argUserIp (\ s a -> s{_argUserIp = a}) + +-- | Dimensions to base the report on. +argDimension :: Lens' AccountsReportsGenerate' (Maybe Text) +argDimension + = lens _argDimension (\ s a -> s{_argDimension = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +argLocale :: Lens' AccountsReportsGenerate' (Maybe Text) +argLocale + = lens _argLocale (\ s a -> s{_argLocale = a}) + +-- | End of the date range to report on in \"YYYY-MM-DD\" format, inclusive. +argEndDate :: Lens' AccountsReportsGenerate' Text +argEndDate + = lens _argEndDate (\ s a -> s{_argEndDate = a}) + +-- | Start of the date range to report on in \"YYYY-MM-DD\" format, +-- inclusive. +argStartDate :: Lens' AccountsReportsGenerate' Text +argStartDate + = lens _argStartDate (\ s a -> s{_argStartDate = a}) + +-- | Hosted account upon which to report. +argAccountId :: Lens' AccountsReportsGenerate' Text +argAccountId + = lens _argAccountId (\ s a -> s{_argAccountId = a}) + +-- | Numeric columns to include in the report. +argMetric :: Lens' AccountsReportsGenerate' (Maybe Text) +argMetric + = lens _argMetric (\ s a -> s{_argMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +argKey :: Lens' AccountsReportsGenerate' (Maybe Text) +argKey = lens _argKey (\ s a -> s{_argKey = a}) + +-- | The name of a dimension or metric to sort the resulting report on, +-- optionally prefixed with \"+\" to sort ascending or \"-\" to sort +-- descending. If no prefix is specified, the column is sorted ascending. +argSort :: Lens' AccountsReportsGenerate' (Maybe Text) +argSort = lens _argSort (\ s a -> s{_argSort = a}) + +-- | Filters to be run on the report. +argFilter :: Lens' AccountsReportsGenerate' (Maybe Text) +argFilter + = lens _argFilter (\ s a -> s{_argFilter = a}) + +-- | OAuth 2.0 token for the current user. +argOauthToken :: Lens' AccountsReportsGenerate' (Maybe Text) +argOauthToken + = lens _argOauthToken + (\ s a -> s{_argOauthToken = a}) + +-- | Index of the first row of report data to return. +argStartIndex :: Lens' AccountsReportsGenerate' (Maybe Word32) +argStartIndex + = lens _argStartIndex + (\ s a -> s{_argStartIndex = a}) + +-- | The maximum number of rows of report data to return. +argMaxResults :: Lens' AccountsReportsGenerate' (Maybe Word32) +argMaxResults + = lens _argMaxResults + (\ s a -> s{_argMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +argFields :: Lens' AccountsReportsGenerate' (Maybe Text) +argFields + = lens _argFields (\ s a -> s{_argFields = a}) + +-- | Data format for the response. +argAlt :: Lens' AccountsReportsGenerate' Text +argAlt = lens _argAlt (\ s a -> s{_argAlt = a}) + +instance GoogleRequest AccountsReportsGenerate' where + type Rs AccountsReportsGenerate' = Report + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AccountsReportsGenerate{..} + = go _argQuotaUser _argPrettyPrint _argUserIp + _argDimension + _argLocale + (Just _argEndDate) + (Just _argStartDate) + _argAccountId + _argMetric + _argKey + _argSort + _argFilter + _argOauthToken + _argStartIndex + _argMaxResults + _argFields + _argAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsGenerateAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/Get.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/Get.hs new file mode 100644 index 000000000..18b67c94a --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Adclients.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about one of the ad clients in the Host AdSense account. +-- +-- /See:/ for @AdsensehostAdclientsGet@. +module AdSenseHost.Adclients.Get + ( + -- * REST Resource + AdclientsGetAPI + + -- * Creating a Request + , adclientsGet + , AdclientsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agAdClientId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAdclientsGet@ which the +-- 'AdclientsGet' request conforms to. +type AdclientsGetAPI = + "adclients" :> + Capture "adClientId" Text :> Get '[JSON] AdClient + +-- | Get information about one of the ad clients in the Host AdSense account. +-- +-- /See:/ 'adclientsGet' smart constructor. +data AdclientsGet = AdclientsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agAdClientId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdclientsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agAdClientId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +adclientsGet + :: Text -- ^ 'adClientId' + -> AdclientsGet +adclientsGet pAgAdClientId_ = + AdclientsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agAdClientId = pAgAdClientId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AdclientsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AdclientsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AdclientsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | Ad client to get. +agAdClientId :: Lens' AdclientsGet' Text +agAdClientId + = lens _agAdClientId (\ s a -> s{_agAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AdclientsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AdclientsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AdclientsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AdclientsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AdclientsGet' where + type Rs AdclientsGet' = AdClient + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AdclientsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agAdClientId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AdclientsGetAPI) r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/List.hs new file mode 100644 index 000000000..8e1a11b86 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Adclients/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Adclients.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all host ad clients in this AdSense account. +-- +-- /See:/ for @AdsensehostAdclientsList@. +module AdSenseHost.Adclients.List + ( + -- * REST Resource + AdclientsListAPI + + -- * Creating a Request + , adclientsList + , AdclientsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAdclientsList@ which the +-- 'AdclientsList' request conforms to. +type AdclientsListAPI = + "adclients" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AdClients + +-- | List all host ad clients in this AdSense account. +-- +-- /See:/ 'adclientsList' smart constructor. +data AdclientsList = AdclientsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Word32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdclientsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +adclientsList + :: AdclientsList +adclientsList = + AdclientsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AdclientsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AdclientsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AdclientsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AdclientsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +alPageToken :: Lens' AdclientsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AdclientsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of ad clients to include in the response, used for +-- paging. +alMaxResults :: Lens' AdclientsList' (Maybe Word32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AdclientsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AdclientsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AdclientsList' where + type Rs AdclientsList' = AdClients + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AdclientsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AdclientsListAPI) r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Start.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Start.hs new file mode 100644 index 000000000..8c79f2d5b --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Start.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Associationsessions.Start +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create an association session for initiating an association with an +-- AdSense user. +-- +-- /See:/ for @AdsensehostAssociationsessionsStart@. +module AdSenseHost.Associationsessions.Start + ( + -- * REST Resource + AssociationsessionsStartAPI + + -- * Creating a Request + , associationsessionsStart + , AssociationsessionsStart + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aWebsiteLocale + , aUserLocale + , aKey + , aWebsiteUrl + , aOauthToken + , aProductCode + , aFields + , aAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAssociationsessionsStart@ which the +-- 'AssociationsessionsStart' request conforms to. +type AssociationsessionsStartAPI = + "associationsessions" :> + "start" :> + QueryParam "websiteLocale" Text :> + QueryParam "userLocale" Text :> + QueryParam "websiteUrl" Text :> + QueryParams "productCode" Text :> + Get '[JSON] AssociationSession + +-- | Create an association session for initiating an association with an +-- AdSense user. +-- +-- /See:/ 'associationsessionsStart' smart constructor. +data AssociationsessionsStart = AssociationsessionsStart + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aWebsiteLocale :: !(Maybe Text) + , _aUserLocale :: !(Maybe Text) + , _aKey :: !(Maybe Text) + , _aWebsiteUrl :: !Text + , _aOauthToken :: !(Maybe Text) + , _aProductCode :: !Text + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssociationsessionsStart'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aWebsiteLocale' +-- +-- * 'aUserLocale' +-- +-- * 'aKey' +-- +-- * 'aWebsiteUrl' +-- +-- * 'aOauthToken' +-- +-- * 'aProductCode' +-- +-- * 'aFields' +-- +-- * 'aAlt' +associationsessionsStart + :: Text -- ^ 'websiteUrl' + -> Text -- ^ 'productCode' + -> AssociationsessionsStart +associationsessionsStart pAWebsiteUrl_ pAProductCode_ = + AssociationsessionsStart + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aWebsiteLocale = Nothing + , _aUserLocale = Nothing + , _aKey = Nothing + , _aWebsiteUrl = pAWebsiteUrl_ + , _aOauthToken = Nothing + , _aProductCode = pAProductCode_ + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AssociationsessionsStart' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AssociationsessionsStart' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AssociationsessionsStart' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | The locale of the user\'s hosted website. +aWebsiteLocale :: Lens' AssociationsessionsStart' (Maybe Text) +aWebsiteLocale + = lens _aWebsiteLocale + (\ s a -> s{_aWebsiteLocale = a}) + +-- | The preferred locale of the user. +aUserLocale :: Lens' AssociationsessionsStart' (Maybe Text) +aUserLocale + = lens _aUserLocale (\ s a -> s{_aUserLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AssociationsessionsStart' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | The URL of the user\'s hosted website. +aWebsiteUrl :: Lens' AssociationsessionsStart' Text +aWebsiteUrl + = lens _aWebsiteUrl (\ s a -> s{_aWebsiteUrl = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AssociationsessionsStart' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Products to associate with the user. +aProductCode :: Lens' AssociationsessionsStart' Text +aProductCode + = lens _aProductCode (\ s a -> s{_aProductCode = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AssociationsessionsStart' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AssociationsessionsStart' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AssociationsessionsStart' + where + type Rs AssociationsessionsStart' = + AssociationSession + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AssociationsessionsStart{..} + = go _aQuotaUser _aPrettyPrint _aUserIp + _aWebsiteLocale + _aUserLocale + _aKey + (Just _aWebsiteUrl) + _aOauthToken + (Just _aProductCode) + _aFields + _aAlt + where go + = clientWithRoute + (Proxy :: Proxy AssociationsessionsStartAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Verify.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Verify.hs new file mode 100644 index 000000000..b3aa51cb9 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Associationsessions/Verify.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Associationsessions.Verify +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Verify an association session after the association callback returns +-- from AdSense signup. +-- +-- /See:/ for @AdsensehostAssociationsessionsVerify@. +module AdSenseHost.Associationsessions.Verify + ( + -- * REST Resource + AssociationsessionsVerifyAPI + + -- * Creating a Request + , associationsessionsVerify + , AssociationsessionsVerify + + -- * Request Lenses + , avQuotaUser + , avPrettyPrint + , avUserIp + , avToken + , avKey + , avOauthToken + , avFields + , avAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostAssociationsessionsVerify@ which the +-- 'AssociationsessionsVerify' request conforms to. +type AssociationsessionsVerifyAPI = + "associationsessions" :> + "verify" :> + QueryParam "token" Text :> + Get '[JSON] AssociationSession + +-- | Verify an association session after the association callback returns +-- from AdSense signup. +-- +-- /See:/ 'associationsessionsVerify' smart constructor. +data AssociationsessionsVerify = AssociationsessionsVerify + { _avQuotaUser :: !(Maybe Text) + , _avPrettyPrint :: !Bool + , _avUserIp :: !(Maybe Text) + , _avToken :: !Text + , _avKey :: !(Maybe Text) + , _avOauthToken :: !(Maybe Text) + , _avFields :: !(Maybe Text) + , _avAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssociationsessionsVerify'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'avQuotaUser' +-- +-- * 'avPrettyPrint' +-- +-- * 'avUserIp' +-- +-- * 'avToken' +-- +-- * 'avKey' +-- +-- * 'avOauthToken' +-- +-- * 'avFields' +-- +-- * 'avAlt' +associationsessionsVerify + :: Text -- ^ 'token' + -> AssociationsessionsVerify +associationsessionsVerify pAvToken_ = + AssociationsessionsVerify + { _avQuotaUser = Nothing + , _avPrettyPrint = True + , _avUserIp = Nothing + , _avToken = pAvToken_ + , _avKey = Nothing + , _avOauthToken = Nothing + , _avFields = Nothing + , _avAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +avQuotaUser :: Lens' AssociationsessionsVerify' (Maybe Text) +avQuotaUser + = lens _avQuotaUser (\ s a -> s{_avQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +avPrettyPrint :: Lens' AssociationsessionsVerify' Bool +avPrettyPrint + = lens _avPrettyPrint + (\ s a -> s{_avPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +avUserIp :: Lens' AssociationsessionsVerify' (Maybe Text) +avUserIp = lens _avUserIp (\ s a -> s{_avUserIp = a}) + +-- | The token returned to the association callback URL. +avToken :: Lens' AssociationsessionsVerify' Text +avToken = lens _avToken (\ s a -> s{_avToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +avKey :: Lens' AssociationsessionsVerify' (Maybe Text) +avKey = lens _avKey (\ s a -> s{_avKey = a}) + +-- | OAuth 2.0 token for the current user. +avOauthToken :: Lens' AssociationsessionsVerify' (Maybe Text) +avOauthToken + = lens _avOauthToken (\ s a -> s{_avOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +avFields :: Lens' AssociationsessionsVerify' (Maybe Text) +avFields = lens _avFields (\ s a -> s{_avFields = a}) + +-- | Data format for the response. +avAlt :: Lens' AssociationsessionsVerify' Text +avAlt = lens _avAlt (\ s a -> s{_avAlt = a}) + +instance GoogleRequest AssociationsessionsVerify' + where + type Rs AssociationsessionsVerify' = + AssociationSession + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u AssociationsessionsVerify{..} + = go _avQuotaUser _avPrettyPrint _avUserIp + (Just _avToken) + _avKey + _avOauthToken + _avFields + _avAlt + where go + = clientWithRoute + (Proxy :: Proxy AssociationsessionsVerifyAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Delete.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Delete.hs new file mode 100644 index 000000000..9c23adc35 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a specific custom channel from the host AdSense account. +-- +-- /See:/ for @AdsensehostCustomchannelsDelete@. +module AdSenseHost.Customchannels.Delete + ( + -- * REST Resource + CustomchannelsDeleteAPI + + -- * Creating a Request + , customchannelsDelete + , CustomchannelsDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdCustomChannelId + , cdUserIp + , cdAdClientId + , cdKey + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsDelete@ which the +-- 'CustomchannelsDelete' request conforms to. +type CustomchannelsDeleteAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + Delete '[JSON] CustomChannel + +-- | Delete a specific custom channel from the host AdSense account. +-- +-- /See:/ 'customchannelsDelete' smart constructor. +data CustomchannelsDelete = CustomchannelsDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdCustomChannelId :: !Text + , _cdUserIp :: !(Maybe Text) + , _cdAdClientId :: !Text + , _cdKey :: !(Maybe Text) + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdCustomChannelId' +-- +-- * 'cdUserIp' +-- +-- * 'cdAdClientId' +-- +-- * 'cdKey' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +customchannelsDelete + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> CustomchannelsDelete +customchannelsDelete pCdCustomChannelId_ pCdAdClientId_ = + CustomchannelsDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdCustomChannelId = pCdCustomChannelId_ + , _cdUserIp = Nothing + , _cdAdClientId = pCdAdClientId_ + , _cdKey = Nothing + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CustomchannelsDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CustomchannelsDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | Custom channel to delete. +cdCustomChannelId :: Lens' CustomchannelsDelete' Text +cdCustomChannelId + = lens _cdCustomChannelId + (\ s a -> s{_cdCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CustomchannelsDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | Ad client from which to delete the custom channel. +cdAdClientId :: Lens' CustomchannelsDelete' Text +cdAdClientId + = lens _cdAdClientId (\ s a -> s{_cdAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CustomchannelsDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CustomchannelsDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CustomchannelsDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CustomchannelsDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CustomchannelsDelete' where + type Rs CustomchannelsDelete' = CustomChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdCustomChannelId + _cdUserIp + _cdAdClientId + _cdKey + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsDeleteAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Get.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Get.hs new file mode 100644 index 000000000..5209fd296 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a specific custom channel from the host AdSense account. +-- +-- /See:/ for @AdsensehostCustomchannelsGet@. +module AdSenseHost.Customchannels.Get + ( + -- * REST Resource + CustomchannelsGetAPI + + -- * Creating a Request + , customchannelsGet + , CustomchannelsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgCustomChannelId + , cgUserIp + , cgAdClientId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsGet@ which the +-- 'CustomchannelsGet' request conforms to. +type CustomchannelsGetAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + Get '[JSON] CustomChannel + +-- | Get a specific custom channel from the host AdSense account. +-- +-- /See:/ 'customchannelsGet' smart constructor. +data CustomchannelsGet = CustomchannelsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgCustomChannelId :: !Text + , _cgUserIp :: !(Maybe Text) + , _cgAdClientId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgCustomChannelId' +-- +-- * 'cgUserIp' +-- +-- * 'cgAdClientId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +customchannelsGet + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> CustomchannelsGet +customchannelsGet pCgCustomChannelId_ pCgAdClientId_ = + CustomchannelsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgCustomChannelId = pCgCustomChannelId_ + , _cgUserIp = Nothing + , _cgAdClientId = pCgAdClientId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CustomchannelsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CustomchannelsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | Custom channel to get. +cgCustomChannelId :: Lens' CustomchannelsGet' Text +cgCustomChannelId + = lens _cgCustomChannelId + (\ s a -> s{_cgCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CustomchannelsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | Ad client from which to get the custom channel. +cgAdClientId :: Lens' CustomchannelsGet' Text +cgAdClientId + = lens _cgAdClientId (\ s a -> s{_cgAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CustomchannelsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CustomchannelsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CustomchannelsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CustomchannelsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CustomchannelsGet' where + type Rs CustomchannelsGet' = CustomChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgCustomChannelId + _cgUserIp + _cgAdClientId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsGetAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Insert.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Insert.hs new file mode 100644 index 000000000..a135a1b05 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a new custom channel to the host AdSense account. +-- +-- /See:/ for @AdsensehostCustomchannelsInsert@. +module AdSenseHost.Customchannels.Insert + ( + -- * REST Resource + CustomchannelsInsertAPI + + -- * Creating a Request + , customchannelsInsert + , CustomchannelsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciAdClientId + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsInsert@ which the +-- 'CustomchannelsInsert' request conforms to. +type CustomchannelsInsertAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> Post '[JSON] CustomChannel + +-- | Add a new custom channel to the host AdSense account. +-- +-- /See:/ 'customchannelsInsert' smart constructor. +data CustomchannelsInsert = CustomchannelsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciAdClientId :: !Text + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciAdClientId' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +customchannelsInsert + :: Text -- ^ 'adClientId' + -> CustomchannelsInsert +customchannelsInsert pCiAdClientId_ = + CustomchannelsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciAdClientId = pCiAdClientId_ + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CustomchannelsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CustomchannelsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CustomchannelsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | Ad client to which the new custom channel will be added. +ciAdClientId :: Lens' CustomchannelsInsert' Text +ciAdClientId + = lens _ciAdClientId (\ s a -> s{_ciAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CustomchannelsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CustomchannelsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CustomchannelsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CustomchannelsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CustomchannelsInsert' where + type Rs CustomchannelsInsert' = CustomChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp + _ciAdClientId + _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsInsertAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/List.hs new file mode 100644 index 000000000..fd3f8c90b --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/List.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all host custom channels in this AdSense account. +-- +-- /See:/ for @AdsensehostCustomchannelsList@. +module AdSenseHost.Customchannels.List + ( + -- * REST Resource + CustomchannelsListAPI + + -- * Creating a Request + , customchannelsList + , CustomchannelsList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clAdClientId + , clKey + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsList@ which the +-- 'CustomchannelsList' request conforms to. +type CustomchannelsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CustomChannels + +-- | List all host custom channels in this AdSense account. +-- +-- /See:/ 'customchannelsList' smart constructor. +data CustomchannelsList = CustomchannelsList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clAdClientId :: !Text + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !(Maybe Word32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clAdClientId' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +customchannelsList + :: Text -- ^ 'adClientId' + -> CustomchannelsList +customchannelsList pClAdClientId_ = + CustomchannelsList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clAdClientId = pClAdClientId_ + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CustomchannelsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CustomchannelsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CustomchannelsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Ad client for which to list custom channels. +clAdClientId :: Lens' CustomchannelsList' Text +clAdClientId + = lens _clAdClientId (\ s a -> s{_clAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CustomchannelsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +clPageToken :: Lens' CustomchannelsList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CustomchannelsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +clMaxResults :: Lens' CustomchannelsList' (Maybe Word32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CustomchannelsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CustomchannelsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CustomchannelsList' where + type Rs CustomchannelsList' = CustomChannels + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp + _clAdClientId + _clKey + _clPageToken + _clOauthToken + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsListAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Patch.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Patch.hs new file mode 100644 index 000000000..0a6cde485 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a custom channel in the host AdSense account. This method +-- supports patch semantics. +-- +-- /See:/ for @AdsensehostCustomchannelsPatch@. +module AdSenseHost.Customchannels.Patch + ( + -- * REST Resource + CustomchannelsPatchAPI + + -- * Creating a Request + , customchannelsPatch + , CustomchannelsPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpCustomChannelId + , cpUserIp + , cpAdClientId + , cpKey + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsPatch@ which the +-- 'CustomchannelsPatch' request conforms to. +type CustomchannelsPatchAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + QueryParam "customChannelId" Text :> + Patch '[JSON] CustomChannel + +-- | Update a custom channel in the host AdSense account. This method +-- supports patch semantics. +-- +-- /See:/ 'customchannelsPatch' smart constructor. +data CustomchannelsPatch = CustomchannelsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpCustomChannelId :: !Text + , _cpUserIp :: !(Maybe Text) + , _cpAdClientId :: !Text + , _cpKey :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpCustomChannelId' +-- +-- * 'cpUserIp' +-- +-- * 'cpAdClientId' +-- +-- * 'cpKey' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +customchannelsPatch + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> CustomchannelsPatch +customchannelsPatch pCpCustomChannelId_ pCpAdClientId_ = + CustomchannelsPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpCustomChannelId = pCpCustomChannelId_ + , _cpUserIp = Nothing + , _cpAdClientId = pCpAdClientId_ + , _cpKey = Nothing + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CustomchannelsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CustomchannelsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | Custom channel to get. +cpCustomChannelId :: Lens' CustomchannelsPatch' Text +cpCustomChannelId + = lens _cpCustomChannelId + (\ s a -> s{_cpCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CustomchannelsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | Ad client in which the custom channel will be updated. +cpAdClientId :: Lens' CustomchannelsPatch' Text +cpAdClientId + = lens _cpAdClientId (\ s a -> s{_cpAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CustomchannelsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CustomchannelsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CustomchannelsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CustomchannelsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CustomchannelsPatch' where + type Rs CustomchannelsPatch' = CustomChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsPatch{..} + = go _cpQuotaUser _cpPrettyPrint + (Just _cpCustomChannelId) + _cpUserIp + _cpAdClientId + _cpKey + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsPatchAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Update.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Update.hs new file mode 100644 index 000000000..aec31d76e --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Customchannels/Update.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Customchannels.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a custom channel in the host AdSense account. +-- +-- /See:/ for @AdsensehostCustomchannelsUpdate@. +module AdSenseHost.Customchannels.Update + ( + -- * REST Resource + CustomchannelsUpdateAPI + + -- * Creating a Request + , customchannelsUpdate + , CustomchannelsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuAdClientId + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostCustomchannelsUpdate@ which the +-- 'CustomchannelsUpdate' request conforms to. +type CustomchannelsUpdateAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> Put '[JSON] CustomChannel + +-- | Update a custom channel in the host AdSense account. +-- +-- /See:/ 'customchannelsUpdate' smart constructor. +data CustomchannelsUpdate = CustomchannelsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuAdClientId :: !Text + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuAdClientId' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +customchannelsUpdate + :: Text -- ^ 'adClientId' + -> CustomchannelsUpdate +customchannelsUpdate pCuAdClientId_ = + CustomchannelsUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuAdClientId = pCuAdClientId_ + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CustomchannelsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CustomchannelsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CustomchannelsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | Ad client in which the custom channel will be updated. +cuAdClientId :: Lens' CustomchannelsUpdate' Text +cuAdClientId + = lens _cuAdClientId (\ s a -> s{_cuAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CustomchannelsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CustomchannelsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CustomchannelsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CustomchannelsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CustomchannelsUpdate' where + type Rs CustomchannelsUpdate' = CustomChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u CustomchannelsUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp + _cuAdClientId + _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsUpdateAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Reports/Generate.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Reports/Generate.hs new file mode 100644 index 000000000..8ecb7b80a --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Reports/Generate.hs @@ -0,0 +1,255 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ for @AdsensehostReportsGenerate@. +module AdSenseHost.Reports.Generate + ( + -- * REST Resource + ReportsGenerateAPI + + -- * Creating a Request + , reportsGenerate + , ReportsGenerate + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgDimension + , rgLocale + , rgEndDate + , rgStartDate + , rgMetric + , rgKey + , rgSort + , rgFilter + , rgOauthToken + , rgStartIndex + , rgMaxResults + , rgFields + , rgAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostReportsGenerate@ which the +-- 'ReportsGenerate' request conforms to. +type ReportsGenerateAPI = + "reports" :> + QueryParams "dimension" Text :> + QueryParam "locale" Text :> + QueryParam "endDate" Text :> + QueryParam "startDate" Text :> + QueryParams "metric" Text :> + QueryParams "sort" Text :> + QueryParams "filter" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> Get '[JSON] Report + +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ 'reportsGenerate' smart constructor. +data ReportsGenerate = ReportsGenerate + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgDimension :: !(Maybe Text) + , _rgLocale :: !(Maybe Text) + , _rgEndDate :: !Text + , _rgStartDate :: !Text + , _rgMetric :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgSort :: !(Maybe Text) + , _rgFilter :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgStartIndex :: !(Maybe Word32) + , _rgMaxResults :: !(Maybe Word32) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgDimension' +-- +-- * 'rgLocale' +-- +-- * 'rgEndDate' +-- +-- * 'rgStartDate' +-- +-- * 'rgMetric' +-- +-- * 'rgKey' +-- +-- * 'rgSort' +-- +-- * 'rgFilter' +-- +-- * 'rgOauthToken' +-- +-- * 'rgStartIndex' +-- +-- * 'rgMaxResults' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +reportsGenerate + :: Text -- ^ 'endDate' + -> Text -- ^ 'startDate' + -> ReportsGenerate +reportsGenerate pRgEndDate_ pRgStartDate_ = + ReportsGenerate + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgDimension = Nothing + , _rgLocale = Nothing + , _rgEndDate = pRgEndDate_ + , _rgStartDate = pRgStartDate_ + , _rgMetric = Nothing + , _rgKey = Nothing + , _rgSort = Nothing + , _rgFilter = Nothing + , _rgOauthToken = Nothing + , _rgStartIndex = Nothing + , _rgMaxResults = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReportsGenerate' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReportsGenerate' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReportsGenerate' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | Dimensions to base the report on. +rgDimension :: Lens' ReportsGenerate' (Maybe Text) +rgDimension + = lens _rgDimension (\ s a -> s{_rgDimension = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +rgLocale :: Lens' ReportsGenerate' (Maybe Text) +rgLocale = lens _rgLocale (\ s a -> s{_rgLocale = a}) + +-- | End of the date range to report on in \"YYYY-MM-DD\" format, inclusive. +rgEndDate :: Lens' ReportsGenerate' Text +rgEndDate + = lens _rgEndDate (\ s a -> s{_rgEndDate = a}) + +-- | Start of the date range to report on in \"YYYY-MM-DD\" format, +-- inclusive. +rgStartDate :: Lens' ReportsGenerate' Text +rgStartDate + = lens _rgStartDate (\ s a -> s{_rgStartDate = a}) + +-- | Numeric columns to include in the report. +rgMetric :: Lens' ReportsGenerate' (Maybe Text) +rgMetric = lens _rgMetric (\ s a -> s{_rgMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReportsGenerate' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | The name of a dimension or metric to sort the resulting report on, +-- optionally prefixed with \"+\" to sort ascending or \"-\" to sort +-- descending. If no prefix is specified, the column is sorted ascending. +rgSort :: Lens' ReportsGenerate' (Maybe Text) +rgSort = lens _rgSort (\ s a -> s{_rgSort = a}) + +-- | Filters to be run on the report. +rgFilter :: Lens' ReportsGenerate' (Maybe Text) +rgFilter = lens _rgFilter (\ s a -> s{_rgFilter = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReportsGenerate' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Index of the first row of report data to return. +rgStartIndex :: Lens' ReportsGenerate' (Maybe Word32) +rgStartIndex + = lens _rgStartIndex (\ s a -> s{_rgStartIndex = a}) + +-- | The maximum number of rows of report data to return. +rgMaxResults :: Lens' ReportsGenerate' (Maybe Word32) +rgMaxResults + = lens _rgMaxResults (\ s a -> s{_rgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReportsGenerate' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReportsGenerate' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReportsGenerate' where + type Rs ReportsGenerate' = Report + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u ReportsGenerate{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgDimension + _rgLocale + (Just _rgEndDate) + (Just _rgStartDate) + _rgMetric + _rgKey + _rgSort + _rgFilter + _rgOauthToken + _rgStartIndex + _rgMaxResults + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGenerateAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Delete.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Delete.hs new file mode 100644 index 000000000..37e97a490 --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.URLchannels.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a URL channel from the host AdSense account. +-- +-- /See:/ for @AdsensehostURLchannelsDelete@. +module AdSenseHost.URLchannels.Delete + ( + -- * REST Resource + UrlchannelsDeleteAPI + + -- * Creating a Request + , uRLchannelsDelete + , URLchannelsDelete + + -- * Request Lenses + , udQuotaUser + , udPrettyPrint + , udUrlChannelId + , udUserIp + , udAdClientId + , udKey + , udOauthToken + , udFields + , udAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostURLchannelsDelete@ which the +-- 'URLchannelsDelete' request conforms to. +type UrlchannelsDeleteAPI = + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> + Capture "urlChannelId" Text :> + Delete '[JSON] URLChannel + +-- | Delete a URL channel from the host AdSense account. +-- +-- /See:/ 'uRLchannelsDelete' smart constructor. +data URLchannelsDelete = URLchannelsDelete + { _udQuotaUser :: !(Maybe Text) + , _udPrettyPrint :: !Bool + , _udUrlChannelId :: !Text + , _udUserIp :: !(Maybe Text) + , _udAdClientId :: !Text + , _udKey :: !(Maybe Text) + , _udOauthToken :: !(Maybe Text) + , _udFields :: !(Maybe Text) + , _udAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLchannelsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udQuotaUser' +-- +-- * 'udPrettyPrint' +-- +-- * 'udUrlChannelId' +-- +-- * 'udUserIp' +-- +-- * 'udAdClientId' +-- +-- * 'udKey' +-- +-- * 'udOauthToken' +-- +-- * 'udFields' +-- +-- * 'udAlt' +uRLchannelsDelete + :: Text -- ^ 'urlChannelId' + -> Text -- ^ 'adClientId' + -> URLchannelsDelete +uRLchannelsDelete pUdUrlChannelId_ pUdAdClientId_ = + URLchannelsDelete + { _udQuotaUser = Nothing + , _udPrettyPrint = True + , _udUrlChannelId = pUdUrlChannelId_ + , _udUserIp = Nothing + , _udAdClientId = pUdAdClientId_ + , _udKey = Nothing + , _udOauthToken = Nothing + , _udFields = Nothing + , _udAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udQuotaUser :: Lens' URLchannelsDelete' (Maybe Text) +udQuotaUser + = lens _udQuotaUser (\ s a -> s{_udQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udPrettyPrint :: Lens' URLchannelsDelete' Bool +udPrettyPrint + = lens _udPrettyPrint + (\ s a -> s{_udPrettyPrint = a}) + +-- | URL channel to delete. +udUrlChannelId :: Lens' URLchannelsDelete' Text +udUrlChannelId + = lens _udUrlChannelId + (\ s a -> s{_udUrlChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udUserIp :: Lens' URLchannelsDelete' (Maybe Text) +udUserIp = lens _udUserIp (\ s a -> s{_udUserIp = a}) + +-- | Ad client from which to delete the URL channel. +udAdClientId :: Lens' URLchannelsDelete' Text +udAdClientId + = lens _udAdClientId (\ s a -> s{_udAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udKey :: Lens' URLchannelsDelete' (Maybe Text) +udKey = lens _udKey (\ s a -> s{_udKey = a}) + +-- | OAuth 2.0 token for the current user. +udOauthToken :: Lens' URLchannelsDelete' (Maybe Text) +udOauthToken + = lens _udOauthToken (\ s a -> s{_udOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udFields :: Lens' URLchannelsDelete' (Maybe Text) +udFields = lens _udFields (\ s a -> s{_udFields = a}) + +-- | Data format for the response. +udAlt :: Lens' URLchannelsDelete' Text +udAlt = lens _udAlt (\ s a -> s{_udAlt = a}) + +instance GoogleRequest URLchannelsDelete' where + type Rs URLchannelsDelete' = URLChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u URLchannelsDelete{..} + = go _udQuotaUser _udPrettyPrint _udUrlChannelId + _udUserIp + _udAdClientId + _udKey + _udOauthToken + _udFields + _udAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlchannelsDeleteAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Insert.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Insert.hs new file mode 100644 index 000000000..05f11006c --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.URLchannels.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a new URL channel to the host AdSense account. +-- +-- /See:/ for @AdsensehostURLchannelsInsert@. +module AdSenseHost.URLchannels.Insert + ( + -- * REST Resource + UrlchannelsInsertAPI + + -- * Creating a Request + , uRLchannelsInsert + , URLchannelsInsert + + -- * Request Lenses + , uiQuotaUser + , uiPrettyPrint + , uiUserIp + , uiAdClientId + , uiKey + , uiOauthToken + , uiFields + , uiAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostURLchannelsInsert@ which the +-- 'URLchannelsInsert' request conforms to. +type UrlchannelsInsertAPI = + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> Post '[JSON] URLChannel + +-- | Add a new URL channel to the host AdSense account. +-- +-- /See:/ 'uRLchannelsInsert' smart constructor. +data URLchannelsInsert = URLchannelsInsert + { _uiQuotaUser :: !(Maybe Text) + , _uiPrettyPrint :: !Bool + , _uiUserIp :: !(Maybe Text) + , _uiAdClientId :: !Text + , _uiKey :: !(Maybe Text) + , _uiOauthToken :: !(Maybe Text) + , _uiFields :: !(Maybe Text) + , _uiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLchannelsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiQuotaUser' +-- +-- * 'uiPrettyPrint' +-- +-- * 'uiUserIp' +-- +-- * 'uiAdClientId' +-- +-- * 'uiKey' +-- +-- * 'uiOauthToken' +-- +-- * 'uiFields' +-- +-- * 'uiAlt' +uRLchannelsInsert + :: Text -- ^ 'adClientId' + -> URLchannelsInsert +uRLchannelsInsert pUiAdClientId_ = + URLchannelsInsert + { _uiQuotaUser = Nothing + , _uiPrettyPrint = True + , _uiUserIp = Nothing + , _uiAdClientId = pUiAdClientId_ + , _uiKey = Nothing + , _uiOauthToken = Nothing + , _uiFields = Nothing + , _uiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uiQuotaUser :: Lens' URLchannelsInsert' (Maybe Text) +uiQuotaUser + = lens _uiQuotaUser (\ s a -> s{_uiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uiPrettyPrint :: Lens' URLchannelsInsert' Bool +uiPrettyPrint + = lens _uiPrettyPrint + (\ s a -> s{_uiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uiUserIp :: Lens' URLchannelsInsert' (Maybe Text) +uiUserIp = lens _uiUserIp (\ s a -> s{_uiUserIp = a}) + +-- | Ad client to which the new URL channel will be added. +uiAdClientId :: Lens' URLchannelsInsert' Text +uiAdClientId + = lens _uiAdClientId (\ s a -> s{_uiAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uiKey :: Lens' URLchannelsInsert' (Maybe Text) +uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) + +-- | OAuth 2.0 token for the current user. +uiOauthToken :: Lens' URLchannelsInsert' (Maybe Text) +uiOauthToken + = lens _uiOauthToken (\ s a -> s{_uiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uiFields :: Lens' URLchannelsInsert' (Maybe Text) +uiFields = lens _uiFields (\ s a -> s{_uiFields = a}) + +-- | Data format for the response. +uiAlt :: Lens' URLchannelsInsert' Text +uiAlt = lens _uiAlt (\ s a -> s{_uiAlt = a}) + +instance GoogleRequest URLchannelsInsert' where + type Rs URLchannelsInsert' = URLChannel + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u URLchannelsInsert{..} + = go _uiQuotaUser _uiPrettyPrint _uiUserIp + _uiAdClientId + _uiKey + _uiOauthToken + _uiFields + _uiAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlchannelsInsertAPI) + r + u diff --git a/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/List.hs b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/List.hs new file mode 100644 index 000000000..746ff570b --- /dev/null +++ b/gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/URLchannels/List.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSenseHost.URLchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all host URL channels in the host AdSense account. +-- +-- /See:/ for @AdsensehostURLchannelsList@. +module AdSenseHost.URLchannels.List + ( + -- * REST Resource + UrlchannelsListAPI + + -- * Creating a Request + , uRLchannelsList + , URLchannelsList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulUserIp + , ulAdClientId + , ulKey + , ulPageToken + , ulOauthToken + , ulMaxResults + , ulFields + , ulAlt + ) where + +import Network.Google.AdSenseHost.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensehostURLchannelsList@ which the +-- 'URLchannelsList' request conforms to. +type UrlchannelsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] URLChannels + +-- | List all host URL channels in the host AdSense account. +-- +-- /See:/ 'uRLchannelsList' smart constructor. +data URLchannelsList = URLchannelsList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulUserIp :: !(Maybe Text) + , _ulAdClientId :: !Text + , _ulKey :: !(Maybe Text) + , _ulPageToken :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulMaxResults :: !(Maybe Word32) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulUserIp' +-- +-- * 'ulAdClientId' +-- +-- * 'ulKey' +-- +-- * 'ulPageToken' +-- +-- * 'ulOauthToken' +-- +-- * 'ulMaxResults' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +uRLchannelsList + :: Text -- ^ 'adClientId' + -> URLchannelsList +uRLchannelsList pUlAdClientId_ = + URLchannelsList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulUserIp = Nothing + , _ulAdClientId = pUlAdClientId_ + , _ulKey = Nothing + , _ulPageToken = Nothing + , _ulOauthToken = Nothing + , _ulMaxResults = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' URLchannelsList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' URLchannelsList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' URLchannelsList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | Ad client for which to list URL channels. +ulAdClientId :: Lens' URLchannelsList' Text +ulAdClientId + = lens _ulAdClientId (\ s a -> s{_ulAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' URLchannelsList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | A continuation token, used to page through URL channels. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +ulPageToken :: Lens' URLchannelsList' (Maybe Text) +ulPageToken + = lens _ulPageToken (\ s a -> s{_ulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' URLchannelsList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | The maximum number of URL channels to include in the response, used for +-- paging. +ulMaxResults :: Lens' URLchannelsList' (Maybe Word32) +ulMaxResults + = lens _ulMaxResults (\ s a -> s{_ulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' URLchannelsList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' URLchannelsList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest URLchannelsList' where + type Rs URLchannelsList' = URLChannels + request = requestWithRoute defReq adSenseHostURL + requestWithRoute r u URLchannelsList{..} + = go _ulQuotaUser _ulPrettyPrint _ulUserIp + _ulAdClientId + _ulKey + _ulPageToken + _ulOauthToken + _ulMaxResults + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UrlchannelsListAPI) + r + u diff --git a/gogol-adsense-host/gogol-adsense-host.cabal b/gogol-adsense-host/gogol-adsense-host.cabal new file mode 100644 index 000000000..226f288b0 --- /dev/null +++ b/gogol-adsense-host/gogol-adsense-host.cabal @@ -0,0 +1,69 @@ +name: gogol-adsense-host +version: 0.0.1 +synopsis: AdSense Host API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Gives AdSense Hosts access to report generation, ad code generation, and + publisher management capabilities. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdSenseHost + , Network.Google.AdSenseHost.Types + , Network.Google.Resource.AdSenseHost.Accounts.Adclients.Get + , Network.Google.Resource.AdSenseHost.Accounts.Adclients.List + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.Delete + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.Get + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.GetAdCode + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.Insert + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.List + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.Patch + , Network.Google.Resource.AdSenseHost.Accounts.Adunits.Update + , Network.Google.Resource.AdSenseHost.Accounts.Get + , Network.Google.Resource.AdSenseHost.Accounts.List + , Network.Google.Resource.AdSenseHost.Accounts.Reports.Generate + , Network.Google.Resource.AdSenseHost.Adclients.Get + , Network.Google.Resource.AdSenseHost.Adclients.List + , Network.Google.Resource.AdSenseHost.Associationsessions.Start + , Network.Google.Resource.AdSenseHost.Associationsessions.Verify + , Network.Google.Resource.AdSenseHost.Customchannels.Delete + , Network.Google.Resource.AdSenseHost.Customchannels.Get + , Network.Google.Resource.AdSenseHost.Customchannels.Insert + , Network.Google.Resource.AdSenseHost.Customchannels.List + , Network.Google.Resource.AdSenseHost.Customchannels.Patch + , Network.Google.Resource.AdSenseHost.Customchannels.Update + , Network.Google.Resource.AdSenseHost.Reports.Generate + , Network.Google.Resource.AdSenseHost.URLchannels.Delete + , Network.Google.Resource.AdSenseHost.URLchannels.Insert + , Network.Google.Resource.AdSenseHost.URLchannels.List + + other-modules: + Network.Google.AdSenseHost.Types.Product + , Network.Google.AdSenseHost.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-adsense-host/src/.gitkeep b/gogol-adsense-host/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-adsense/LICENSE b/gogol-adsense/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-adsense/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-adsense/Makefile b/gogol-adsense/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-adsense/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-adsense/README.md b/gogol-adsense/README.md new file mode 100644 index 000000000..fbd3f34bc --- /dev/null +++ b/gogol-adsense/README.md @@ -0,0 +1,28 @@ +# gogol-adsense + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the AdSense Management API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-adsense` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-adsense/Setup.hs b/gogol-adsense/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-adsense/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-adsense/gen/Network/Google/AdSense.hs b/gogol-adsense/gen/Network/Google/AdSense.hs new file mode 100644 index 000000000..3663be80b --- /dev/null +++ b/gogol-adsense/gen/Network/Google/AdSense.hs @@ -0,0 +1,398 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AdSense +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Gives AdSense publishers access to their inventory and the ability to +-- generate reports +-- +-- /See:/ +module Network.Google.AdSense + ( + -- * API + AdSenseAPI + , adSenseAPI + , adSenseURL + + -- * Service Methods + + -- * REST Resources + + -- ** AdsenseAccountsAdclientsList + , module AdSense.Accounts.Adclients.List + + -- ** AdsenseAccountsAdunitsCustomchannelsList + , module AdSense.Accounts.Adunits.Customchannels.List + + -- ** AdsenseAccountsAdunitsGet + , module AdSense.Accounts.Adunits.Get + + -- ** AdsenseAccountsAdunitsGetAdCode + , module AdSense.Accounts.Adunits.GetAdCode + + -- ** AdsenseAccountsAdunitsList + , module AdSense.Accounts.Adunits.List + + -- ** AdsenseAccountsAlertsDelete + , module AdSense.Accounts.Alerts.Delete + + -- ** AdsenseAccountsAlertsList + , module AdSense.Accounts.Alerts.List + + -- ** AdsenseAccountsCustomchannelsAdunitsList + , module AdSense.Accounts.Customchannels.Adunits.List + + -- ** AdsenseAccountsCustomchannelsGet + , module AdSense.Accounts.Customchannels.Get + + -- ** AdsenseAccountsCustomchannelsList + , module AdSense.Accounts.Customchannels.List + + -- ** AdsenseAccountsGet + , module AdSense.Accounts.Get + + -- ** AdsenseAccountsList + , module AdSense.Accounts.List + + -- ** AdsenseAccountsPaymentsList + , module AdSense.Accounts.Payments.List + + -- ** AdsenseAccountsReportsGenerate + , module AdSense.Accounts.Reports.Generate + + -- ** AdsenseAccountsReportsSavedGenerate + , module AdSense.Accounts.Reports.Saved.Generate + + -- ** AdsenseAccountsReportsSavedList + , module AdSense.Accounts.Reports.Saved.List + + -- ** AdsenseAccountsSavedadstylesGet + , module AdSense.Accounts.Savedadstyles.Get + + -- ** AdsenseAccountsSavedadstylesList + , module AdSense.Accounts.Savedadstyles.List + + -- ** AdsenseAccountsURLchannelsList + , module AdSense.Accounts.URLchannels.List + + -- ** AdsenseAdclientsList + , module AdSense.Adclients.List + + -- ** AdsenseAdunitsCustomchannelsList + , module AdSense.Adunits.Customchannels.List + + -- ** AdsenseAdunitsGet + , module AdSense.Adunits.Get + + -- ** AdsenseAdunitsGetAdCode + , module AdSense.Adunits.GetAdCode + + -- ** AdsenseAdunitsList + , module AdSense.Adunits.List + + -- ** AdsenseAlertsDelete + , module AdSense.Alerts.Delete + + -- ** AdsenseAlertsList + , module AdSense.Alerts.List + + -- ** AdsenseCustomchannelsAdunitsList + , module AdSense.Customchannels.Adunits.List + + -- ** AdsenseCustomchannelsGet + , module AdSense.Customchannels.Get + + -- ** AdsenseCustomchannelsList + , module AdSense.Customchannels.List + + -- ** AdsenseMetadataDimensionsList + , module AdSense.Metadata.Dimensions.List + + -- ** AdsenseMetadataMetricsList + , module AdSense.Metadata.Metrics.List + + -- ** AdsensePaymentsList + , module AdSense.Payments.List + + -- ** AdsenseReportsGenerate + , module AdSense.Reports.Generate + + -- ** AdsenseReportsSavedGenerate + , module AdSense.Reports.Saved.Generate + + -- ** AdsenseReportsSavedList + , module AdSense.Reports.Saved.List + + -- ** AdsenseSavedadstylesGet + , module AdSense.Savedadstyles.Get + + -- ** AdsenseSavedadstylesList + , module AdSense.Savedadstyles.List + + -- ** AdsenseURLchannelsList + , module AdSense.URLchannels.List + + -- * Types + + -- ** ReportingMetadataEntry + , ReportingMetadataEntry + , reportingMetadataEntry + , rmeKind + , rmeRequiredMetrics + , rmeCompatibleMetrics + , rmeRequiredDimensions + , rmeId + , rmeCompatibleDimensions + , rmeSupportedProducts + + -- ** AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- ** Accounts + , Accounts + , accounts + , aEtag + , aNextPageToken + , aKind + , aItems + + -- ** Payment + , Payment + , payment + , pPaymentAmountCurrencyCode + , pKind + , pPaymentDate + , pId + , pPaymentAmount + + -- ** Alerts + , Alerts + , alerts + , aleKind + , aleItems + + -- ** SavedReports + , SavedReports + , savedReports + , srEtag + , srNextPageToken + , srKind + , srItems + + -- ** AdUnits + , AdUnits + , adUnits + , auEtag + , auNextPageToken + , auKind + , auItems + + -- ** AdUnit + , AdUnit + , adUnit + , adStatus + , adMobileContentAdsSettings + , adKind + , adFeedAdsSettings + , adCustomStyle + , adSavedStyleId + , adName + , adContentAdsSettings + , adCode + , adId + + -- ** SavedReport + , SavedReport + , savedReport + , sKind + , sName + , sId + + -- ** URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- ** CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- ** Alert + , Alert + , alert + , aaIsDismissible + , aaKind + , aaSeverity + , aaId + , aaType + , aaMessage + + -- ** Account + , Account + , account + , accKind + , accPremium + , accName + , accId + , accTimezone + , accSubAccounts + + -- ** AdClient + , AdClient + , adClient + , addKind + , addArcOptIn + , addSupportsReporting + , addId + , addProductCode + , addArcReviewMode + + -- ** SavedAdStyles + , SavedAdStyles + , savedAdStyles + , sasEtag + , sasNextPageToken + , sasKind + , sasItems + + -- ** SavedAdStyle + , SavedAdStyle + , savedAdStyle + , savKind + , savName + , savAdStyle + , savId + + -- ** AdStyle + , AdStyle + , adStyle + , asCorners + , asKind + , asFont + , asColors + + -- ** Metadata + , Metadata + , metadata + , mKind + , mItems + + -- ** CustomChannel + , CustomChannel + , customChannel + , cTargetingInfo + , cKind + , cName + , cCode + , cId + + -- ** URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- ** AdCode + , AdCode + , adCode + , ac1Kind + , ac1AdCode + + -- ** AdsenseReportsGenerateResponse + , AdsenseReportsGenerateResponse + , adsenseReportsGenerateResponse + , argrKind + , argrAverages + , argrEndDate + , argrWarnings + , argrRows + , argrTotals + , argrStartDate + , argrHeaders + , argrTotalMatchedRows + + -- ** Payments + , Payments + , payments + , payKind + , payItems + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude +import Network.Google.Resource.AdSense.Accounts.Adclients.List +import Network.Google.Resource.AdSense.Accounts.Adunits.Customchannels.List +import Network.Google.Resource.AdSense.Accounts.Adunits.Get +import Network.Google.Resource.AdSense.Accounts.Adunits.GetAdCode +import Network.Google.Resource.AdSense.Accounts.Adunits.List +import Network.Google.Resource.AdSense.Accounts.Alerts.Delete +import Network.Google.Resource.AdSense.Accounts.Alerts.List +import Network.Google.Resource.AdSense.Accounts.Customchannels.Adunits.List +import Network.Google.Resource.AdSense.Accounts.Customchannels.Get +import Network.Google.Resource.AdSense.Accounts.Customchannels.List +import Network.Google.Resource.AdSense.Accounts.Get +import Network.Google.Resource.AdSense.Accounts.List +import Network.Google.Resource.AdSense.Accounts.Payments.List +import Network.Google.Resource.AdSense.Accounts.Reports.Generate +import Network.Google.Resource.AdSense.Accounts.Reports.Saved.Generate +import Network.Google.Resource.AdSense.Accounts.Reports.Saved.List +import Network.Google.Resource.AdSense.Accounts.Savedadstyles.Get +import Network.Google.Resource.AdSense.Accounts.Savedadstyles.List +import Network.Google.Resource.AdSense.Accounts.URLchannels.List +import Network.Google.Resource.AdSense.Adclients.List +import Network.Google.Resource.AdSense.Adunits.Customchannels.List +import Network.Google.Resource.AdSense.Adunits.Get +import Network.Google.Resource.AdSense.Adunits.GetAdCode +import Network.Google.Resource.AdSense.Adunits.List +import Network.Google.Resource.AdSense.Alerts.Delete +import Network.Google.Resource.AdSense.Alerts.List +import Network.Google.Resource.AdSense.Customchannels.Adunits.List +import Network.Google.Resource.AdSense.Customchannels.Get +import Network.Google.Resource.AdSense.Customchannels.List +import Network.Google.Resource.AdSense.Metadata.Dimensions.List +import Network.Google.Resource.AdSense.Metadata.Metrics.List +import Network.Google.Resource.AdSense.Payments.List +import Network.Google.Resource.AdSense.Reports.Generate +import Network.Google.Resource.AdSense.Reports.Saved.Generate +import Network.Google.Resource.AdSense.Reports.Saved.List +import Network.Google.Resource.AdSense.Savedadstyles.Get +import Network.Google.Resource.AdSense.Savedadstyles.List +import Network.Google.Resource.AdSense.URLchannels.List + +{- $resources +TODO +-} + +type AdSenseAPI = + Adclients :<|> Accounts :<|> Reports :<|> Alerts :<|> + Adunits + :<|> URLchannels + :<|> Customchannels + :<|> Savedadstyles + :<|> Metadata + :<|> Payments + +adSenseAPI :: Proxy AdSenseAPI +adSenseAPI = Proxy diff --git a/gogol-adsense/gen/Network/Google/AdSense/Types.hs b/gogol-adsense/gen/Network/Google/AdSense/Types.hs new file mode 100644 index 000000000..07fef3f23 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/AdSense/Types.hs @@ -0,0 +1,226 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSense.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSense.Types + ( + -- * Service URL + adSenseURL + + -- * ReportingMetadataEntry + , ReportingMetadataEntry + , reportingMetadataEntry + , rmeKind + , rmeRequiredMetrics + , rmeCompatibleMetrics + , rmeRequiredDimensions + , rmeId + , rmeCompatibleDimensions + , rmeSupportedProducts + + -- * AdClients + , AdClients + , adClients + , acEtag + , acNextPageToken + , acKind + , acItems + + -- * Accounts + , Accounts + , accounts + , aEtag + , aNextPageToken + , aKind + , aItems + + -- * Payment + , Payment + , payment + , pPaymentAmountCurrencyCode + , pKind + , pPaymentDate + , pId + , pPaymentAmount + + -- * Alerts + , Alerts + , alerts + , aleKind + , aleItems + + -- * SavedReports + , SavedReports + , savedReports + , srEtag + , srNextPageToken + , srKind + , srItems + + -- * AdUnits + , AdUnits + , adUnits + , auEtag + , auNextPageToken + , auKind + , auItems + + -- * AdUnit + , AdUnit + , adUnit + , adStatus + , adMobileContentAdsSettings + , adKind + , adFeedAdsSettings + , adCustomStyle + , adSavedStyleId + , adName + , adContentAdsSettings + , adCode + , adId + + -- * SavedReport + , SavedReport + , savedReport + , sKind + , sName + , sId + + -- * URLChannels + , URLChannels + , uRLChannels + , ucEtag + , ucNextPageToken + , ucKind + , ucItems + + -- * CustomChannels + , CustomChannels + , customChannels + , ccEtag + , ccNextPageToken + , ccKind + , ccItems + + -- * Alert + , Alert + , alert + , aaIsDismissible + , aaKind + , aaSeverity + , aaId + , aaType + , aaMessage + + -- * Account + , Account + , account + , accKind + , accPremium + , accName + , accId + , accTimezone + , accSubAccounts + + -- * AdClient + , AdClient + , adClient + , addKind + , addArcOptIn + , addSupportsReporting + , addId + , addProductCode + , addArcReviewMode + + -- * SavedAdStyles + , SavedAdStyles + , savedAdStyles + , sasEtag + , sasNextPageToken + , sasKind + , sasItems + + -- * SavedAdStyle + , SavedAdStyle + , savedAdStyle + , savKind + , savName + , savAdStyle + , savId + + -- * AdStyle + , AdStyle + , adStyle + , asCorners + , asKind + , asFont + , asColors + + -- * Metadata + , Metadata + , metadata + , mKind + , mItems + + -- * CustomChannel + , CustomChannel + , customChannel + , cTargetingInfo + , cKind + , cName + , cCode + , cId + + -- * URLChannel + , URLChannel + , uRLChannel + , urlcKind + , urlcId + , urlcUrlPattern + + -- * AdCode + , AdCode + , adCode + , ac1Kind + , ac1AdCode + + -- * AdsenseReportsGenerateResponse + , AdsenseReportsGenerateResponse + , adsenseReportsGenerateResponse + , argrKind + , argrAverages + , argrEndDate + , argrWarnings + , argrRows + , argrTotals + , argrStartDate + , argrHeaders + , argrTotalMatchedRows + + -- * Payments + , Payments + , payments + , payKind + , payItems + ) where + +import Network.Google.AdSense.Types.Product +import Network.Google.AdSense.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1.4' of the AdSense Management API. +adSenseURL :: BaseURL +adSenseURL + = BaseUrl Https + "https://www.googleapis.com/adsense/v1.4/" + 443 diff --git a/gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs b/gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs new file mode 100644 index 000000000..dc6bf1835 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs @@ -0,0 +1,1782 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSense.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSense.Types.Product where + +import Network.Google.AdSense.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'reportingMetadataEntry' smart constructor. +data ReportingMetadataEntry = ReportingMetadataEntry + { _rmeKind :: !Text + , _rmeRequiredMetrics :: !(Maybe [Text]) + , _rmeCompatibleMetrics :: !(Maybe [Text]) + , _rmeRequiredDimensions :: !(Maybe [Text]) + , _rmeId :: !(Maybe Text) + , _rmeCompatibleDimensions :: !(Maybe [Text]) + , _rmeSupportedProducts :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportingMetadataEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmeKind' +-- +-- * 'rmeRequiredMetrics' +-- +-- * 'rmeCompatibleMetrics' +-- +-- * 'rmeRequiredDimensions' +-- +-- * 'rmeId' +-- +-- * 'rmeCompatibleDimensions' +-- +-- * 'rmeSupportedProducts' +reportingMetadataEntry + :: ReportingMetadataEntry +reportingMetadataEntry = + ReportingMetadataEntry + { _rmeKind = "adsense#reportingMetadataEntry" + , _rmeRequiredMetrics = Nothing + , _rmeCompatibleMetrics = Nothing + , _rmeRequiredDimensions = Nothing + , _rmeId = Nothing + , _rmeCompatibleDimensions = Nothing + , _rmeSupportedProducts = Nothing + } + +-- | Kind of resource this is, in this case adsense#reportingMetadataEntry. +rmeKind :: Lens' ReportingMetadataEntry Text +rmeKind = lens _rmeKind (\ s a -> s{_rmeKind = a}) + +-- | The names of the metrics which the dimension or metric this reporting +-- metadata entry describes requires to also be present in order for the +-- report to be valid. Omitting these will not cause an error or warning, +-- but may result in data which cannot be correctly interpreted. +rmeRequiredMetrics :: Lens' ReportingMetadataEntry [Text] +rmeRequiredMetrics + = lens _rmeRequiredMetrics + (\ s a -> s{_rmeRequiredMetrics = a}) + . _Default + . _Coerce + +-- | The names of the metrics the dimension or metric this reporting metadata +-- entry describes is compatible with. +rmeCompatibleMetrics :: Lens' ReportingMetadataEntry [Text] +rmeCompatibleMetrics + = lens _rmeCompatibleMetrics + (\ s a -> s{_rmeCompatibleMetrics = a}) + . _Default + . _Coerce + +-- | The names of the dimensions which the dimension or metric this reporting +-- metadata entry describes requires to also be present in order for the +-- report to be valid. Omitting these will not cause an error or warning, +-- but may result in data which cannot be correctly interpreted. +rmeRequiredDimensions :: Lens' ReportingMetadataEntry [Text] +rmeRequiredDimensions + = lens _rmeRequiredDimensions + (\ s a -> s{_rmeRequiredDimensions = a}) + . _Default + . _Coerce + +-- | Unique identifier of this reporting metadata entry, corresponding to the +-- name of the appropriate dimension or metric. +rmeId :: Lens' ReportingMetadataEntry (Maybe Text) +rmeId = lens _rmeId (\ s a -> s{_rmeId = a}) + +-- | For metrics this is a list of dimension IDs which the metric is +-- compatible with, for dimensions it is a list of compatibility groups the +-- dimension belongs to. +rmeCompatibleDimensions :: Lens' ReportingMetadataEntry [Text] +rmeCompatibleDimensions + = lens _rmeCompatibleDimensions + (\ s a -> s{_rmeCompatibleDimensions = a}) + . _Default + . _Coerce + +-- | The codes of the projects supported by the dimension or metric this +-- reporting metadata entry describes. +rmeSupportedProducts :: Lens' ReportingMetadataEntry [Text] +rmeSupportedProducts + = lens _rmeSupportedProducts + (\ s a -> s{_rmeSupportedProducts = a}) + . _Default + . _Coerce + +instance FromJSON ReportingMetadataEntry where + parseJSON + = withObject "ReportingMetadataEntry" + (\ o -> + ReportingMetadataEntry <$> + (o .:? "kind" .!= "adsense#reportingMetadataEntry") + <*> (o .:? "requiredMetrics" .!= mempty) + <*> (o .:? "compatibleMetrics" .!= mempty) + <*> (o .:? "requiredDimensions" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "compatibleDimensions" .!= mempty) + <*> (o .:? "supportedProducts" .!= mempty)) + +instance ToJSON ReportingMetadataEntry where + toJSON ReportingMetadataEntry{..} + = object + (catMaybes + [Just ("kind" .= _rmeKind), + ("requiredMetrics" .=) <$> _rmeRequiredMetrics, + ("compatibleMetrics" .=) <$> _rmeCompatibleMetrics, + ("requiredDimensions" .=) <$> _rmeRequiredDimensions, + ("id" .=) <$> _rmeId, + ("compatibleDimensions" .=) <$> + _rmeCompatibleDimensions, + ("supportedProducts" .=) <$> _rmeSupportedProducts]) + +-- +-- /See:/ 'adClients' smart constructor. +data AdClients = AdClients + { _acEtag :: !(Maybe Text) + , _acNextPageToken :: !(Maybe Text) + , _acKind :: !Text + , _acItems :: !(Maybe [Maybe AdClient]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClients' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acEtag' +-- +-- * 'acNextPageToken' +-- +-- * 'acKind' +-- +-- * 'acItems' +adClients + :: AdClients +adClients = + AdClients + { _acEtag = Nothing + , _acNextPageToken = Nothing + , _acKind = "adsense#adClients" + , _acItems = Nothing + } + +-- | ETag of this response for caching purposes. +acEtag :: Lens' AdClients (Maybe Text) +acEtag = lens _acEtag (\ s a -> s{_acEtag = a}) + +-- | Continuation token used to page through ad clients. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +acNextPageToken :: Lens' AdClients (Maybe Text) +acNextPageToken + = lens _acNextPageToken + (\ s a -> s{_acNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#adClients. +acKind :: Lens' AdClients Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | The ad clients returned in this list response. +acItems :: Lens' AdClients [Maybe AdClient] +acItems + = lens _acItems (\ s a -> s{_acItems = a}) . _Default + . _Coerce + +instance FromJSON AdClients where + parseJSON + = withObject "AdClients" + (\ o -> + AdClients <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#adClients") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AdClients where + toJSON AdClients{..} + = object + (catMaybes + [("etag" .=) <$> _acEtag, + ("nextPageToken" .=) <$> _acNextPageToken, + Just ("kind" .= _acKind), ("items" .=) <$> _acItems]) + +-- +-- /See:/ 'accounts' smart constructor. +data Accounts = Accounts + { _aEtag :: !(Maybe Text) + , _aNextPageToken :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Account]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Accounts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aNextPageToken' +-- +-- * 'aKind' +-- +-- * 'aItems' +accounts + :: Accounts +accounts = + Accounts + { _aEtag = Nothing + , _aNextPageToken = Nothing + , _aKind = "adsense#accounts" + , _aItems = Nothing + } + +-- | ETag of this response for caching purposes. +aEtag :: Lens' Accounts (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Continuation token used to page through accounts. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +aNextPageToken :: Lens' Accounts (Maybe Text) +aNextPageToken + = lens _aNextPageToken + (\ s a -> s{_aNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#accounts. +aKind :: Lens' Accounts Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The accounts returned in this list response. +aItems :: Lens' Accounts [Maybe Account] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Accounts where + parseJSON + = withObject "Accounts" + (\ o -> + Accounts <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#accounts") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Accounts where + toJSON Accounts{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, + ("nextPageToken" .=) <$> _aNextPageToken, + Just ("kind" .= _aKind), ("items" .=) <$> _aItems]) + +-- +-- /See:/ 'payment' smart constructor. +data Payment = Payment + { _pPaymentAmountCurrencyCode :: !(Maybe Text) + , _pKind :: !Text + , _pPaymentDate :: !(Maybe Text) + , _pId :: !(Maybe Text) + , _pPaymentAmount :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Payment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pPaymentAmountCurrencyCode' +-- +-- * 'pKind' +-- +-- * 'pPaymentDate' +-- +-- * 'pId' +-- +-- * 'pPaymentAmount' +payment + :: Payment +payment = + Payment + { _pPaymentAmountCurrencyCode = Nothing + , _pKind = "adsense#payment" + , _pPaymentDate = Nothing + , _pId = Nothing + , _pPaymentAmount = Nothing + } + +-- | The currency code for the amount to be paid. +pPaymentAmountCurrencyCode :: Lens' Payment (Maybe Text) +pPaymentAmountCurrencyCode + = lens _pPaymentAmountCurrencyCode + (\ s a -> s{_pPaymentAmountCurrencyCode = a}) + +-- | Kind of resource this is, in this case adsense#payment. +pKind :: Lens' Payment Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The date this payment was\/will be credited to the user, or none if the +-- payment threshold has not been met. +pPaymentDate :: Lens' Payment (Maybe Text) +pPaymentDate + = lens _pPaymentDate (\ s a -> s{_pPaymentDate = a}) + +-- | Unique identifier of this Payment. +pId :: Lens' Payment (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | The amount to be paid. +pPaymentAmount :: Lens' Payment (Maybe Text) +pPaymentAmount + = lens _pPaymentAmount + (\ s a -> s{_pPaymentAmount = a}) + +instance FromJSON Payment where + parseJSON + = withObject "Payment" + (\ o -> + Payment <$> + (o .:? "paymentAmountCurrencyCode") <*> + (o .:? "kind" .!= "adsense#payment") + <*> (o .:? "paymentDate") + <*> (o .:? "id") + <*> (o .:? "paymentAmount")) + +instance ToJSON Payment where + toJSON Payment{..} + = object + (catMaybes + [("paymentAmountCurrencyCode" .=) <$> + _pPaymentAmountCurrencyCode, + Just ("kind" .= _pKind), + ("paymentDate" .=) <$> _pPaymentDate, + ("id" .=) <$> _pId, + ("paymentAmount" .=) <$> _pPaymentAmount]) + +-- +-- /See:/ 'alerts' smart constructor. +data Alerts = Alerts + { _aleKind :: !Text + , _aleItems :: !(Maybe [Maybe Alert]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Alerts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aleKind' +-- +-- * 'aleItems' +alerts + :: Alerts +alerts = + Alerts + { _aleKind = "adsense#alerts" + , _aleItems = Nothing + } + +-- | Kind of list this is, in this case adsense#alerts. +aleKind :: Lens' Alerts Text +aleKind = lens _aleKind (\ s a -> s{_aleKind = a}) + +-- | The alerts returned in this list response. +aleItems :: Lens' Alerts [Maybe Alert] +aleItems + = lens _aleItems (\ s a -> s{_aleItems = a}) . + _Default + . _Coerce + +instance FromJSON Alerts where + parseJSON + = withObject "Alerts" + (\ o -> + Alerts <$> + (o .:? "kind" .!= "adsense#alerts") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Alerts where + toJSON Alerts{..} + = object + (catMaybes + [Just ("kind" .= _aleKind), + ("items" .=) <$> _aleItems]) + +-- +-- /See:/ 'savedReports' smart constructor. +data SavedReports = SavedReports + { _srEtag :: !(Maybe Text) + , _srNextPageToken :: !(Maybe Text) + , _srKind :: !Text + , _srItems :: !(Maybe [Maybe SavedReport]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedReports' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srEtag' +-- +-- * 'srNextPageToken' +-- +-- * 'srKind' +-- +-- * 'srItems' +savedReports + :: SavedReports +savedReports = + SavedReports + { _srEtag = Nothing + , _srNextPageToken = Nothing + , _srKind = "adsense#savedReports" + , _srItems = Nothing + } + +-- | ETag of this response for caching purposes. +srEtag :: Lens' SavedReports (Maybe Text) +srEtag = lens _srEtag (\ s a -> s{_srEtag = a}) + +-- | Continuation token used to page through saved reports. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +srNextPageToken :: Lens' SavedReports (Maybe Text) +srNextPageToken + = lens _srNextPageToken + (\ s a -> s{_srNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#savedReports. +srKind :: Lens' SavedReports Text +srKind = lens _srKind (\ s a -> s{_srKind = a}) + +-- | The saved reports returned in this list response. +srItems :: Lens' SavedReports [Maybe SavedReport] +srItems + = lens _srItems (\ s a -> s{_srItems = a}) . _Default + . _Coerce + +instance FromJSON SavedReports where + parseJSON + = withObject "SavedReports" + (\ o -> + SavedReports <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#savedReports") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON SavedReports where + toJSON SavedReports{..} + = object + (catMaybes + [("etag" .=) <$> _srEtag, + ("nextPageToken" .=) <$> _srNextPageToken, + Just ("kind" .= _srKind), ("items" .=) <$> _srItems]) + +-- +-- /See:/ 'adUnits' smart constructor. +data AdUnits = AdUnits + { _auEtag :: !(Maybe Text) + , _auNextPageToken :: !(Maybe Text) + , _auKind :: !Text + , _auItems :: !(Maybe [Maybe AdUnit]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdUnits' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auEtag' +-- +-- * 'auNextPageToken' +-- +-- * 'auKind' +-- +-- * 'auItems' +adUnits + :: AdUnits +adUnits = + AdUnits + { _auEtag = Nothing + , _auNextPageToken = Nothing + , _auKind = "adsense#adUnits" + , _auItems = Nothing + } + +-- | ETag of this response for caching purposes. +auEtag :: Lens' AdUnits (Maybe Text) +auEtag = lens _auEtag (\ s a -> s{_auEtag = a}) + +-- | Continuation token used to page through ad units. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +auNextPageToken :: Lens' AdUnits (Maybe Text) +auNextPageToken + = lens _auNextPageToken + (\ s a -> s{_auNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#adUnits. +auKind :: Lens' AdUnits Text +auKind = lens _auKind (\ s a -> s{_auKind = a}) + +-- | The ad units returned in this list response. +auItems :: Lens' AdUnits [Maybe AdUnit] +auItems + = lens _auItems (\ s a -> s{_auItems = a}) . _Default + . _Coerce + +instance FromJSON AdUnits where + parseJSON + = withObject "AdUnits" + (\ o -> + AdUnits <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#adUnits") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AdUnits where + toJSON AdUnits{..} + = object + (catMaybes + [("etag" .=) <$> _auEtag, + ("nextPageToken" .=) <$> _auNextPageToken, + Just ("kind" .= _auKind), ("items" .=) <$> _auItems]) + +-- +-- /See:/ 'adUnit' smart constructor. +data AdUnit = AdUnit + { _adStatus :: !(Maybe Text) + , _adMobileContentAdsSettings :: !(Maybe AdUnitMobileContentAdsSettings) + , _adKind :: !Text + , _adFeedAdsSettings :: !(Maybe AdUnitFeedAdsSettings) + , _adCustomStyle :: !(Maybe (Maybe AdStyle)) + , _adSavedStyleId :: !(Maybe Text) + , _adName :: !(Maybe Text) + , _adContentAdsSettings :: !(Maybe AdUnitContentAdsSettings) + , _adCode :: !(Maybe Text) + , _adId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdUnit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adStatus' +-- +-- * 'adMobileContentAdsSettings' +-- +-- * 'adKind' +-- +-- * 'adFeedAdsSettings' +-- +-- * 'adCustomStyle' +-- +-- * 'adSavedStyleId' +-- +-- * 'adName' +-- +-- * 'adContentAdsSettings' +-- +-- * 'adCode' +-- +-- * 'adId' +adUnit + :: AdUnit +adUnit = + AdUnit + { _adStatus = Nothing + , _adMobileContentAdsSettings = Nothing + , _adKind = "adsense#adUnit" + , _adFeedAdsSettings = Nothing + , _adCustomStyle = Nothing + , _adSavedStyleId = Nothing + , _adName = Nothing + , _adContentAdsSettings = Nothing + , _adCode = Nothing + , _adId = Nothing + } + +-- | Status of this ad unit. Possible values are: NEW: Indicates that the ad +-- unit was created within the last seven days and does not yet have any +-- activity associated with it. ACTIVE: Indicates that there has been +-- activity on this ad unit in the last seven days. INACTIVE: Indicates +-- that there has been no activity on this ad unit in the last seven days. +adStatus :: Lens' AdUnit (Maybe Text) +adStatus = lens _adStatus (\ s a -> s{_adStatus = a}) + +-- | Settings specific to WAP mobile content ads (AFMC). +adMobileContentAdsSettings :: Lens' AdUnit (Maybe AdUnitMobileContentAdsSettings) +adMobileContentAdsSettings + = lens _adMobileContentAdsSettings + (\ s a -> s{_adMobileContentAdsSettings = a}) + +-- | Kind of resource this is, in this case adsense#adUnit. +adKind :: Lens' AdUnit Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | Settings specific to feed ads (AFF). +adFeedAdsSettings :: Lens' AdUnit (Maybe AdUnitFeedAdsSettings) +adFeedAdsSettings + = lens _adFeedAdsSettings + (\ s a -> s{_adFeedAdsSettings = a}) + +-- | Custom style information specific to this ad unit. +adCustomStyle :: Lens' AdUnit (Maybe (Maybe AdStyle)) +adCustomStyle + = lens _adCustomStyle + (\ s a -> s{_adCustomStyle = a}) + +-- | ID of the saved ad style which holds this ad unit\'s style information. +adSavedStyleId :: Lens' AdUnit (Maybe Text) +adSavedStyleId + = lens _adSavedStyleId + (\ s a -> s{_adSavedStyleId = a}) + +-- | Name of this ad unit. +adName :: Lens' AdUnit (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +-- | Settings specific to content ads (AFC) and highend mobile content ads +-- (AFMC). +adContentAdsSettings :: Lens' AdUnit (Maybe AdUnitContentAdsSettings) +adContentAdsSettings + = lens _adContentAdsSettings + (\ s a -> s{_adContentAdsSettings = a}) + +-- | Identity code of this ad unit, not necessarily unique across ad clients. +adCode :: Lens' AdUnit (Maybe Text) +adCode = lens _adCode (\ s a -> s{_adCode = a}) + +-- | Unique identifier of this ad unit. This should be considered an opaque +-- identifier; it is not safe to rely on it being in any particular format. +adId :: Lens' AdUnit (Maybe Text) +adId = lens _adId (\ s a -> s{_adId = a}) + +instance FromJSON AdUnit where + parseJSON + = withObject "AdUnit" + (\ o -> + AdUnit <$> + (o .:? "status") <*> + (o .:? "mobileContentAdsSettings") + <*> (o .:? "kind" .!= "adsense#adUnit") + <*> (o .:? "feedAdsSettings") + <*> (o .:? "customStyle") + <*> (o .:? "savedStyleId") + <*> (o .:? "name") + <*> (o .:? "contentAdsSettings") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON AdUnit where + toJSON AdUnit{..} + = object + (catMaybes + [("status" .=) <$> _adStatus, + ("mobileContentAdsSettings" .=) <$> + _adMobileContentAdsSettings, + Just ("kind" .= _adKind), + ("feedAdsSettings" .=) <$> _adFeedAdsSettings, + ("customStyle" .=) <$> _adCustomStyle, + ("savedStyleId" .=) <$> _adSavedStyleId, + ("name" .=) <$> _adName, + ("contentAdsSettings" .=) <$> _adContentAdsSettings, + ("code" .=) <$> _adCode, ("id" .=) <$> _adId]) + +-- +-- /See:/ 'savedReport' smart constructor. +data SavedReport = SavedReport + { _sKind :: !Text + , _sName :: !(Maybe Text) + , _sId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sName' +-- +-- * 'sId' +savedReport + :: SavedReport +savedReport = + SavedReport + { _sKind = "adsense#savedReport" + , _sName = Nothing + , _sId = Nothing + } + +-- | Kind of resource this is, in this case adsense#savedReport. +sKind :: Lens' SavedReport Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | This saved report\'s name. +sName :: Lens' SavedReport (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | Unique identifier of this saved report. +sId :: Lens' SavedReport (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +instance FromJSON SavedReport where + parseJSON + = withObject "SavedReport" + (\ o -> + SavedReport <$> + (o .:? "kind" .!= "adsense#savedReport") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON SavedReport where + toJSON SavedReport{..} + = object + (catMaybes + [Just ("kind" .= _sKind), ("name" .=) <$> _sName, + ("id" .=) <$> _sId]) + +-- +-- /See:/ 'uRLChannels' smart constructor. +data URLChannels = URLChannels + { _ucEtag :: !(Maybe Text) + , _ucNextPageToken :: !(Maybe Text) + , _ucKind :: !Text + , _ucItems :: !(Maybe [Maybe URLChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucEtag' +-- +-- * 'ucNextPageToken' +-- +-- * 'ucKind' +-- +-- * 'ucItems' +uRLChannels + :: URLChannels +uRLChannels = + URLChannels + { _ucEtag = Nothing + , _ucNextPageToken = Nothing + , _ucKind = "adsense#urlChannels" + , _ucItems = Nothing + } + +-- | ETag of this response for caching purposes. +ucEtag :: Lens' URLChannels (Maybe Text) +ucEtag = lens _ucEtag (\ s a -> s{_ucEtag = a}) + +-- | Continuation token used to page through URL channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ucNextPageToken :: Lens' URLChannels (Maybe Text) +ucNextPageToken + = lens _ucNextPageToken + (\ s a -> s{_ucNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#urlChannels. +ucKind :: Lens' URLChannels Text +ucKind = lens _ucKind (\ s a -> s{_ucKind = a}) + +-- | The URL channels returned in this list response. +ucItems :: Lens' URLChannels [Maybe URLChannel] +ucItems + = lens _ucItems (\ s a -> s{_ucItems = a}) . _Default + . _Coerce + +instance FromJSON URLChannels where + parseJSON + = withObject "URLChannels" + (\ o -> + URLChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#urlChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON URLChannels where + toJSON URLChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ucEtag, + ("nextPageToken" .=) <$> _ucNextPageToken, + Just ("kind" .= _ucKind), ("items" .=) <$> _ucItems]) + +-- +-- /See:/ 'customChannels' smart constructor. +data CustomChannels = CustomChannels + { _ccEtag :: !(Maybe Text) + , _ccNextPageToken :: !(Maybe Text) + , _ccKind :: !Text + , _ccItems :: !(Maybe [Maybe CustomChannel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccEtag' +-- +-- * 'ccNextPageToken' +-- +-- * 'ccKind' +-- +-- * 'ccItems' +customChannels + :: CustomChannels +customChannels = + CustomChannels + { _ccEtag = Nothing + , _ccNextPageToken = Nothing + , _ccKind = "adsense#customChannels" + , _ccItems = Nothing + } + +-- | ETag of this response for caching purposes. +ccEtag :: Lens' CustomChannels (Maybe Text) +ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a}) + +-- | Continuation token used to page through custom channels. To retrieve the +-- next page of results, set the next request\'s \"pageToken\" value to +-- this. +ccNextPageToken :: Lens' CustomChannels (Maybe Text) +ccNextPageToken + = lens _ccNextPageToken + (\ s a -> s{_ccNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#customChannels. +ccKind :: Lens' CustomChannels Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | The custom channels returned in this list response. +ccItems :: Lens' CustomChannels [Maybe CustomChannel] +ccItems + = lens _ccItems (\ s a -> s{_ccItems = a}) . _Default + . _Coerce + +instance FromJSON CustomChannels where + parseJSON + = withObject "CustomChannels" + (\ o -> + CustomChannels <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#customChannels") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CustomChannels where + toJSON CustomChannels{..} + = object + (catMaybes + [("etag" .=) <$> _ccEtag, + ("nextPageToken" .=) <$> _ccNextPageToken, + Just ("kind" .= _ccKind), ("items" .=) <$> _ccItems]) + +-- +-- /See:/ 'alert' smart constructor. +data Alert = Alert + { _aaIsDismissible :: !(Maybe Bool) + , _aaKind :: !Text + , _aaSeverity :: !(Maybe Text) + , _aaId :: !(Maybe Text) + , _aaType :: !(Maybe Text) + , _aaMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Alert' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaIsDismissible' +-- +-- * 'aaKind' +-- +-- * 'aaSeverity' +-- +-- * 'aaId' +-- +-- * 'aaType' +-- +-- * 'aaMessage' +alert + :: Alert +alert = + Alert + { _aaIsDismissible = Nothing + , _aaKind = "adsense#alert" + , _aaSeverity = Nothing + , _aaId = Nothing + , _aaType = Nothing + , _aaMessage = Nothing + } + +-- | Whether this alert can be dismissed. +aaIsDismissible :: Lens' Alert (Maybe Bool) +aaIsDismissible + = lens _aaIsDismissible + (\ s a -> s{_aaIsDismissible = a}) + +-- | Kind of resource this is, in this case adsense#alert. +aaKind :: Lens' Alert Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | Severity of this alert. Possible values: INFO, WARNING, SEVERE. +aaSeverity :: Lens' Alert (Maybe Text) +aaSeverity + = lens _aaSeverity (\ s a -> s{_aaSeverity = a}) + +-- | Unique identifier of this alert. This should be considered an opaque +-- identifier; it is not safe to rely on it being in any particular format. +aaId :: Lens' Alert (Maybe Text) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, +-- ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, +-- GRAYLISTED_PUBLISHER, API_HOLD. +aaType :: Lens' Alert (Maybe Text) +aaType = lens _aaType (\ s a -> s{_aaType = a}) + +-- | The localized alert message. +aaMessage :: Lens' Alert (Maybe Text) +aaMessage + = lens _aaMessage (\ s a -> s{_aaMessage = a}) + +instance FromJSON Alert where + parseJSON + = withObject "Alert" + (\ o -> + Alert <$> + (o .:? "isDismissible") <*> + (o .:? "kind" .!= "adsense#alert") + <*> (o .:? "severity") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "message")) + +instance ToJSON Alert where + toJSON Alert{..} + = object + (catMaybes + [("isDismissible" .=) <$> _aaIsDismissible, + Just ("kind" .= _aaKind), + ("severity" .=) <$> _aaSeverity, ("id" .=) <$> _aaId, + ("type" .=) <$> _aaType, + ("message" .=) <$> _aaMessage]) + +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _accKind :: !Text + , _accPremium :: !(Maybe Bool) + , _accName :: !(Maybe Text) + , _accId :: !(Maybe Text) + , _accTimezone :: !(Maybe Text) + , _accSubAccounts :: !(Maybe [Maybe Account]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accKind' +-- +-- * 'accPremium' +-- +-- * 'accName' +-- +-- * 'accId' +-- +-- * 'accTimezone' +-- +-- * 'accSubAccounts' +account + :: Account +account = + Account + { _accKind = "adsense#account" + , _accPremium = Nothing + , _accName = Nothing + , _accId = Nothing + , _accTimezone = Nothing + , _accSubAccounts = Nothing + } + +-- | Kind of resource this is, in this case adsense#account. +accKind :: Lens' Account Text +accKind = lens _accKind (\ s a -> s{_accKind = a}) + +-- | Whether this account is premium. +accPremium :: Lens' Account (Maybe Bool) +accPremium + = lens _accPremium (\ s a -> s{_accPremium = a}) + +-- | Name of this account. +accName :: Lens' Account (Maybe Text) +accName = lens _accName (\ s a -> s{_accName = a}) + +-- | Unique identifier of this account. +accId :: Lens' Account (Maybe Text) +accId = lens _accId (\ s a -> s{_accId = a}) + +-- | AdSense timezone of this account. +accTimezone :: Lens' Account (Maybe Text) +accTimezone + = lens _accTimezone (\ s a -> s{_accTimezone = a}) + +-- | Sub accounts of the this account. +accSubAccounts :: Lens' Account [Maybe Account] +accSubAccounts + = lens _accSubAccounts + (\ s a -> s{_accSubAccounts = a}) + . _Default + . _Coerce + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "kind" .!= "adsense#account") <*> + (o .:? "premium") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "timezone") + <*> (o .:? "subAccounts" .!= mempty)) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [Just ("kind" .= _accKind), + ("premium" .=) <$> _accPremium, + ("name" .=) <$> _accName, ("id" .=) <$> _accId, + ("timezone" .=) <$> _accTimezone, + ("subAccounts" .=) <$> _accSubAccounts]) + +-- +-- /See:/ 'adClient' smart constructor. +data AdClient = AdClient + { _addKind :: !Text + , _addArcOptIn :: !(Maybe Bool) + , _addSupportsReporting :: !(Maybe Bool) + , _addId :: !(Maybe Text) + , _addProductCode :: !(Maybe Text) + , _addArcReviewMode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdClient' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'addKind' +-- +-- * 'addArcOptIn' +-- +-- * 'addSupportsReporting' +-- +-- * 'addId' +-- +-- * 'addProductCode' +-- +-- * 'addArcReviewMode' +adClient + :: AdClient +adClient = + AdClient + { _addKind = "adsense#adClient" + , _addArcOptIn = Nothing + , _addSupportsReporting = Nothing + , _addId = Nothing + , _addProductCode = Nothing + , _addArcReviewMode = Nothing + } + +-- | Kind of resource this is, in this case adsense#adClient. +addKind :: Lens' AdClient Text +addKind = lens _addKind (\ s a -> s{_addKind = a}) + +-- | Whether this ad client is opted in to ARC. +addArcOptIn :: Lens' AdClient (Maybe Bool) +addArcOptIn + = lens _addArcOptIn (\ s a -> s{_addArcOptIn = a}) + +-- | Whether this ad client supports being reported on. +addSupportsReporting :: Lens' AdClient (Maybe Bool) +addSupportsReporting + = lens _addSupportsReporting + (\ s a -> s{_addSupportsReporting = a}) + +-- | Unique identifier of this ad client. +addId :: Lens' AdClient (Maybe Text) +addId = lens _addId (\ s a -> s{_addId = a}) + +-- | This ad client\'s product code, which corresponds to the PRODUCT_CODE +-- report dimension. +addProductCode :: Lens' AdClient (Maybe Text) +addProductCode + = lens _addProductCode + (\ s a -> s{_addProductCode = a}) + +-- | ARC review mode this ad client is in. Empty if the client is not opted +-- in to ARC. Possible values: POST_REVIEW, AUTOMATIC_PRE_REVIEW. +addArcReviewMode :: Lens' AdClient (Maybe Text) +addArcReviewMode + = lens _addArcReviewMode + (\ s a -> s{_addArcReviewMode = a}) + +instance FromJSON AdClient where + parseJSON + = withObject "AdClient" + (\ o -> + AdClient <$> + (o .:? "kind" .!= "adsense#adClient") <*> + (o .:? "arcOptIn") + <*> (o .:? "supportsReporting") + <*> (o .:? "id") + <*> (o .:? "productCode") + <*> (o .:? "arcReviewMode")) + +instance ToJSON AdClient where + toJSON AdClient{..} + = object + (catMaybes + [Just ("kind" .= _addKind), + ("arcOptIn" .=) <$> _addArcOptIn, + ("supportsReporting" .=) <$> _addSupportsReporting, + ("id" .=) <$> _addId, + ("productCode" .=) <$> _addProductCode, + ("arcReviewMode" .=) <$> _addArcReviewMode]) + +-- +-- /See:/ 'savedAdStyles' smart constructor. +data SavedAdStyles = SavedAdStyles + { _sasEtag :: !(Maybe Text) + , _sasNextPageToken :: !(Maybe Text) + , _sasKind :: !Text + , _sasItems :: !(Maybe [Maybe SavedAdStyle]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedAdStyles' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sasEtag' +-- +-- * 'sasNextPageToken' +-- +-- * 'sasKind' +-- +-- * 'sasItems' +savedAdStyles + :: SavedAdStyles +savedAdStyles = + SavedAdStyles + { _sasEtag = Nothing + , _sasNextPageToken = Nothing + , _sasKind = "adsense#savedAdStyles" + , _sasItems = Nothing + } + +-- | ETag of this response for caching purposes. +sasEtag :: Lens' SavedAdStyles (Maybe Text) +sasEtag = lens _sasEtag (\ s a -> s{_sasEtag = a}) + +-- | Continuation token used to page through ad units. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" value to this. +sasNextPageToken :: Lens' SavedAdStyles (Maybe Text) +sasNextPageToken + = lens _sasNextPageToken + (\ s a -> s{_sasNextPageToken = a}) + +-- | Kind of list this is, in this case adsense#savedAdStyles. +sasKind :: Lens' SavedAdStyles Text +sasKind = lens _sasKind (\ s a -> s{_sasKind = a}) + +-- | The saved ad styles returned in this list response. +sasItems :: Lens' SavedAdStyles [Maybe SavedAdStyle] +sasItems + = lens _sasItems (\ s a -> s{_sasItems = a}) . + _Default + . _Coerce + +instance FromJSON SavedAdStyles where + parseJSON + = withObject "SavedAdStyles" + (\ o -> + SavedAdStyles <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "adsense#savedAdStyles") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON SavedAdStyles where + toJSON SavedAdStyles{..} + = object + (catMaybes + [("etag" .=) <$> _sasEtag, + ("nextPageToken" .=) <$> _sasNextPageToken, + Just ("kind" .= _sasKind), + ("items" .=) <$> _sasItems]) + +-- +-- /See:/ 'savedAdStyle' smart constructor. +data SavedAdStyle = SavedAdStyle + { _savKind :: !Text + , _savName :: !(Maybe Text) + , _savAdStyle :: !(Maybe (Maybe AdStyle)) + , _savId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedAdStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'savKind' +-- +-- * 'savName' +-- +-- * 'savAdStyle' +-- +-- * 'savId' +savedAdStyle + :: SavedAdStyle +savedAdStyle = + SavedAdStyle + { _savKind = "adsense#savedAdStyle" + , _savName = Nothing + , _savAdStyle = Nothing + , _savId = Nothing + } + +-- | Kind of resource this is, in this case adsense#savedAdStyle. +savKind :: Lens' SavedAdStyle Text +savKind = lens _savKind (\ s a -> s{_savKind = a}) + +-- | The user selected name of this SavedAdStyle. +savName :: Lens' SavedAdStyle (Maybe Text) +savName = lens _savName (\ s a -> s{_savName = a}) + +-- | The AdStyle itself. +savAdStyle :: Lens' SavedAdStyle (Maybe (Maybe AdStyle)) +savAdStyle + = lens _savAdStyle (\ s a -> s{_savAdStyle = a}) + +-- | Unique identifier of this saved ad style. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +savId :: Lens' SavedAdStyle (Maybe Text) +savId = lens _savId (\ s a -> s{_savId = a}) + +instance FromJSON SavedAdStyle where + parseJSON + = withObject "SavedAdStyle" + (\ o -> + SavedAdStyle <$> + (o .:? "kind" .!= "adsense#savedAdStyle") <*> + (o .:? "name") + <*> (o .:? "adStyle") + <*> (o .:? "id")) + +instance ToJSON SavedAdStyle where + toJSON SavedAdStyle{..} + = object + (catMaybes + [Just ("kind" .= _savKind), ("name" .=) <$> _savName, + ("adStyle" .=) <$> _savAdStyle, + ("id" .=) <$> _savId]) + +-- +-- /See:/ 'adStyle' smart constructor. +data AdStyle = AdStyle + { _asCorners :: !(Maybe Text) + , _asKind :: !Text + , _asFont :: !(Maybe AdStyleFont) + , _asColors :: !(Maybe AdStyleColors) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asCorners' +-- +-- * 'asKind' +-- +-- * 'asFont' +-- +-- * 'asColors' +adStyle + :: AdStyle +adStyle = + AdStyle + { _asCorners = Nothing + , _asKind = "adsense#adStyle" + , _asFont = Nothing + , _asColors = Nothing + } + +-- | The style of the corners in the ad. +asCorners :: Lens' AdStyle (Maybe Text) +asCorners + = lens _asCorners (\ s a -> s{_asCorners = a}) + +-- | Kind this is, in this case adsense#adStyle. +asKind :: Lens' AdStyle Text +asKind = lens _asKind (\ s a -> s{_asKind = a}) + +-- | The font which is included in the style. +asFont :: Lens' AdStyle (Maybe AdStyleFont) +asFont = lens _asFont (\ s a -> s{_asFont = a}) + +-- | The colors which are included in the style. These are represented as six +-- hexadecimal characters, similar to HTML color codes, but without the +-- leading hash. +asColors :: Lens' AdStyle (Maybe AdStyleColors) +asColors = lens _asColors (\ s a -> s{_asColors = a}) + +instance FromJSON AdStyle where + parseJSON + = withObject "AdStyle" + (\ o -> + AdStyle <$> + (o .:? "corners") <*> + (o .:? "kind" .!= "adsense#adStyle") + <*> (o .:? "font") + <*> (o .:? "colors")) + +instance ToJSON AdStyle where + toJSON AdStyle{..} + = object + (catMaybes + [("corners" .=) <$> _asCorners, + Just ("kind" .= _asKind), ("font" .=) <$> _asFont, + ("colors" .=) <$> _asColors]) + +-- +-- /See:/ 'metadata' smart constructor. +data Metadata = Metadata + { _mKind :: !Text + , _mItems :: !(Maybe [Maybe ReportingMetadataEntry]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mItems' +metadata + :: Metadata +metadata = + Metadata + { _mKind = "adsense#metadata" + , _mItems = Nothing + } + +-- | Kind of list this is, in this case adsense#metadata. +mKind :: Lens' Metadata Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +mItems :: Lens' Metadata [Maybe ReportingMetadataEntry] +mItems + = lens _mItems (\ s a -> s{_mItems = a}) . _Default . + _Coerce + +instance FromJSON Metadata where + parseJSON + = withObject "Metadata" + (\ o -> + Metadata <$> + (o .:? "kind" .!= "adsense#metadata") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Metadata where + toJSON Metadata{..} + = object + (catMaybes + [Just ("kind" .= _mKind), ("items" .=) <$> _mItems]) + +-- +-- /See:/ 'customChannel' smart constructor. +data CustomChannel = CustomChannel + { _cTargetingInfo :: !(Maybe CustomChannelTargetingInfo) + , _cKind :: !Text + , _cName :: !(Maybe Text) + , _cCode :: !(Maybe Text) + , _cId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cTargetingInfo' +-- +-- * 'cKind' +-- +-- * 'cName' +-- +-- * 'cCode' +-- +-- * 'cId' +customChannel + :: CustomChannel +customChannel = + CustomChannel + { _cTargetingInfo = Nothing + , _cKind = "adsense#customChannel" + , _cName = Nothing + , _cCode = Nothing + , _cId = Nothing + } + +-- | The targeting information of this custom channel, if activated. +cTargetingInfo :: Lens' CustomChannel (Maybe CustomChannelTargetingInfo) +cTargetingInfo + = lens _cTargetingInfo + (\ s a -> s{_cTargetingInfo = a}) + +-- | Kind of resource this is, in this case adsense#customChannel. +cKind :: Lens' CustomChannel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Name of this custom channel. +cName :: Lens' CustomChannel (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Code of this custom channel, not necessarily unique across ad clients. +cCode :: Lens' CustomChannel (Maybe Text) +cCode = lens _cCode (\ s a -> s{_cCode = a}) + +-- | Unique identifier of this custom channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +cId :: Lens' CustomChannel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +instance FromJSON CustomChannel where + parseJSON + = withObject "CustomChannel" + (\ o -> + CustomChannel <$> + (o .:? "targetingInfo") <*> + (o .:? "kind" .!= "adsense#customChannel") + <*> (o .:? "name") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON CustomChannel where + toJSON CustomChannel{..} + = object + (catMaybes + [("targetingInfo" .=) <$> _cTargetingInfo, + Just ("kind" .= _cKind), ("name" .=) <$> _cName, + ("code" .=) <$> _cCode, ("id" .=) <$> _cId]) + +-- +-- /See:/ 'uRLChannel' smart constructor. +data URLChannel = URLChannel + { _urlcKind :: !Text + , _urlcId :: !(Maybe Text) + , _urlcUrlPattern :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLChannel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlcKind' +-- +-- * 'urlcId' +-- +-- * 'urlcUrlPattern' +uRLChannel + :: URLChannel +uRLChannel = + URLChannel + { _urlcKind = "adsense#urlChannel" + , _urlcId = Nothing + , _urlcUrlPattern = Nothing + } + +-- | Kind of resource this is, in this case adsense#urlChannel. +urlcKind :: Lens' URLChannel Text +urlcKind = lens _urlcKind (\ s a -> s{_urlcKind = a}) + +-- | Unique identifier of this URL channel. This should be considered an +-- opaque identifier; it is not safe to rely on it being in any particular +-- format. +urlcId :: Lens' URLChannel (Maybe Text) +urlcId = lens _urlcId (\ s a -> s{_urlcId = a}) + +-- | URL Pattern of this URL channel. Does not include \"http:\/\/\" or +-- \"https:\/\/\". Example: www.example.com\/home +urlcUrlPattern :: Lens' URLChannel (Maybe Text) +urlcUrlPattern + = lens _urlcUrlPattern + (\ s a -> s{_urlcUrlPattern = a}) + +instance FromJSON URLChannel where + parseJSON + = withObject "URLChannel" + (\ o -> + URLChannel <$> + (o .:? "kind" .!= "adsense#urlChannel") <*> + (o .:? "id") + <*> (o .:? "urlPattern")) + +instance ToJSON URLChannel where + toJSON URLChannel{..} + = object + (catMaybes + [Just ("kind" .= _urlcKind), ("id" .=) <$> _urlcId, + ("urlPattern" .=) <$> _urlcUrlPattern]) + +-- +-- /See:/ 'adCode' smart constructor. +data AdCode = AdCode + { _ac1Kind :: !Text + , _ac1AdCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdCode' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ac1Kind' +-- +-- * 'ac1AdCode' +adCode + :: AdCode +adCode = + AdCode + { _ac1Kind = "adsense#adCode" + , _ac1AdCode = Nothing + } + +-- | Kind this is, in this case adsense#adCode. +ac1Kind :: Lens' AdCode Text +ac1Kind = lens _ac1Kind (\ s a -> s{_ac1Kind = a}) + +-- | The ad code snippet. +ac1AdCode :: Lens' AdCode (Maybe Text) +ac1AdCode + = lens _ac1AdCode (\ s a -> s{_ac1AdCode = a}) + +instance FromJSON AdCode where + parseJSON + = withObject "AdCode" + (\ o -> + AdCode <$> + (o .:? "kind" .!= "adsense#adCode") <*> + (o .:? "adCode")) + +instance ToJSON AdCode where + toJSON AdCode{..} + = object + (catMaybes + [Just ("kind" .= _ac1Kind), + ("adCode" .=) <$> _ac1AdCode]) + +-- +-- /See:/ 'adsenseReportsGenerateResponse' smart constructor. +data AdsenseReportsGenerateResponse = AdsenseReportsGenerateResponse + { _argrKind :: !Text + , _argrAverages :: !(Maybe [Text]) + , _argrEndDate :: !(Maybe Text) + , _argrWarnings :: !(Maybe [Text]) + , _argrRows :: !(Maybe [[Text]]) + , _argrTotals :: !(Maybe [Text]) + , _argrStartDate :: !(Maybe Text) + , _argrHeaders :: !(Maybe [AdsenseReportsGenerateResponseHeadersItem]) + , _argrTotalMatchedRows :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsenseReportsGenerateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argrKind' +-- +-- * 'argrAverages' +-- +-- * 'argrEndDate' +-- +-- * 'argrWarnings' +-- +-- * 'argrRows' +-- +-- * 'argrTotals' +-- +-- * 'argrStartDate' +-- +-- * 'argrHeaders' +-- +-- * 'argrTotalMatchedRows' +adsenseReportsGenerateResponse + :: AdsenseReportsGenerateResponse +adsenseReportsGenerateResponse = + AdsenseReportsGenerateResponse + { _argrKind = "adsense#report" + , _argrAverages = Nothing + , _argrEndDate = Nothing + , _argrWarnings = Nothing + , _argrRows = Nothing + , _argrTotals = Nothing + , _argrStartDate = Nothing + , _argrHeaders = Nothing + , _argrTotalMatchedRows = Nothing + } + +-- | Kind this is, in this case adsense#report. +argrKind :: Lens' AdsenseReportsGenerateResponse Text +argrKind = lens _argrKind (\ s a -> s{_argrKind = a}) + +-- | The averages of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +argrAverages :: Lens' AdsenseReportsGenerateResponse [Text] +argrAverages + = lens _argrAverages (\ s a -> s{_argrAverages = a}) + . _Default + . _Coerce + +-- | The requested end date in yyyy-mm-dd format. +argrEndDate :: Lens' AdsenseReportsGenerateResponse (Maybe Text) +argrEndDate + = lens _argrEndDate (\ s a -> s{_argrEndDate = a}) + +-- | Any warnings associated with generation of the report. +argrWarnings :: Lens' AdsenseReportsGenerateResponse [Text] +argrWarnings + = lens _argrWarnings (\ s a -> s{_argrWarnings = a}) + . _Default + . _Coerce + +-- | The output rows of the report. Each row is a list of cells; one for each +-- dimension in the request, followed by one for each metric in the +-- request. The dimension cells contain strings, and the metric cells +-- contain numbers. +argrRows :: Lens' AdsenseReportsGenerateResponse [[Text]] +argrRows + = lens _argrRows (\ s a -> s{_argrRows = a}) . + _Default + . _Coerce + +-- | The totals of the report. This is the same length as any other row in +-- the report; cells corresponding to dimension columns are empty. +argrTotals :: Lens' AdsenseReportsGenerateResponse [Text] +argrTotals + = lens _argrTotals (\ s a -> s{_argrTotals = a}) . + _Default + . _Coerce + +-- | The requested start date in yyyy-mm-dd format. +argrStartDate :: Lens' AdsenseReportsGenerateResponse (Maybe Text) +argrStartDate + = lens _argrStartDate + (\ s a -> s{_argrStartDate = a}) + +-- | The header information of the columns requested in the report. This is a +-- list of headers; one for each dimension in the request, followed by one +-- for each metric in the request. +argrHeaders :: Lens' AdsenseReportsGenerateResponse [AdsenseReportsGenerateResponseHeadersItem] +argrHeaders + = lens _argrHeaders (\ s a -> s{_argrHeaders = a}) . + _Default + . _Coerce + +-- | The total number of rows matched by the report request. Fewer rows may +-- be returned in the response due to being limited by the row count +-- requested or the report row limit. +argrTotalMatchedRows :: Lens' AdsenseReportsGenerateResponse (Maybe Int64) +argrTotalMatchedRows + = lens _argrTotalMatchedRows + (\ s a -> s{_argrTotalMatchedRows = a}) + +instance FromJSON AdsenseReportsGenerateResponse + where + parseJSON + = withObject "AdsenseReportsGenerateResponse" + (\ o -> + AdsenseReportsGenerateResponse <$> + (o .:? "kind" .!= "adsense#report") <*> + (o .:? "averages" .!= mempty) + <*> (o .:? "endDate") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "totals" .!= mempty) + <*> (o .:? "startDate") + <*> (o .:? "headers" .!= mempty) + <*> (o .:? "totalMatchedRows")) + +instance ToJSON AdsenseReportsGenerateResponse where + toJSON AdsenseReportsGenerateResponse{..} + = object + (catMaybes + [Just ("kind" .= _argrKind), + ("averages" .=) <$> _argrAverages, + ("endDate" .=) <$> _argrEndDate, + ("warnings" .=) <$> _argrWarnings, + ("rows" .=) <$> _argrRows, + ("totals" .=) <$> _argrTotals, + ("startDate" .=) <$> _argrStartDate, + ("headers" .=) <$> _argrHeaders, + ("totalMatchedRows" .=) <$> _argrTotalMatchedRows]) + +-- +-- /See:/ 'payments' smart constructor. +data Payments = Payments + { _payKind :: !Text + , _payItems :: !(Maybe [Maybe Payment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Payments' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'payKind' +-- +-- * 'payItems' +payments + :: Payments +payments = + Payments + { _payKind = "adsense#payments" + , _payItems = Nothing + } + +-- | Kind of list this is, in this case adsense#payments. +payKind :: Lens' Payments Text +payKind = lens _payKind (\ s a -> s{_payKind = a}) + +-- | The list of Payments for the account. One or both of a) the account\'s +-- most recent payment; and b) the account\'s upcoming payment. +payItems :: Lens' Payments [Maybe Payment] +payItems + = lens _payItems (\ s a -> s{_payItems = a}) . + _Default + . _Coerce + +instance FromJSON Payments where + parseJSON + = withObject "Payments" + (\ o -> + Payments <$> + (o .:? "kind" .!= "adsense#payments") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Payments where + toJSON Payments{..} + = object + (catMaybes + [Just ("kind" .= _payKind), + ("items" .=) <$> _payItems]) diff --git a/gogol-adsense/gen/Network/Google/AdSense/Types/Sum.hs b/gogol-adsense/gen/Network/Google/AdSense/Types/Sum.hs new file mode 100644 index 000000000..476818950 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/AdSense/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AdSense.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AdSense.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adclients/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adclients/List.hs new file mode 100644 index 000000000..b53cdf672 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adclients/List.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Adclients.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad clients in the specified account. +-- +-- /See:/ for @AdsenseAccountsAdclientsList@. +module AdSense.Accounts.Adclients.List + ( + -- * REST Resource + AccountsAdclientsListAPI + + -- * Creating a Request + , accountsAdclientsList + , AccountsAdclientsList + + -- * Request Lenses + , aalQuotaUser + , aalPrettyPrint + , aalUserIp + , aalAccountId + , aalKey + , aalPageToken + , aalOauthToken + , aalMaxResults + , aalFields + , aalAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAdclientsList@ which the +-- 'AccountsAdclientsList' request conforms to. +type AccountsAdclientsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdClients + +-- | List all ad clients in the specified account. +-- +-- /See:/ 'accountsAdclientsList' smart constructor. +data AccountsAdclientsList = AccountsAdclientsList + { _aalQuotaUser :: !(Maybe Text) + , _aalPrettyPrint :: !Bool + , _aalUserIp :: !(Maybe Text) + , _aalAccountId :: !Text + , _aalKey :: !(Maybe Text) + , _aalPageToken :: !(Maybe Text) + , _aalOauthToken :: !(Maybe Text) + , _aalMaxResults :: !(Maybe Int32) + , _aalFields :: !(Maybe Text) + , _aalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdclientsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalQuotaUser' +-- +-- * 'aalPrettyPrint' +-- +-- * 'aalUserIp' +-- +-- * 'aalAccountId' +-- +-- * 'aalKey' +-- +-- * 'aalPageToken' +-- +-- * 'aalOauthToken' +-- +-- * 'aalMaxResults' +-- +-- * 'aalFields' +-- +-- * 'aalAlt' +accountsAdclientsList + :: Text -- ^ 'accountId' + -> AccountsAdclientsList +accountsAdclientsList pAalAccountId_ = + AccountsAdclientsList + { _aalQuotaUser = Nothing + , _aalPrettyPrint = True + , _aalUserIp = Nothing + , _aalAccountId = pAalAccountId_ + , _aalKey = Nothing + , _aalPageToken = Nothing + , _aalOauthToken = Nothing + , _aalMaxResults = Nothing + , _aalFields = Nothing + , _aalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aalQuotaUser :: Lens' AccountsAdclientsList' (Maybe Text) +aalQuotaUser + = lens _aalQuotaUser (\ s a -> s{_aalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aalPrettyPrint :: Lens' AccountsAdclientsList' Bool +aalPrettyPrint + = lens _aalPrettyPrint + (\ s a -> s{_aalPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aalUserIp :: Lens' AccountsAdclientsList' (Maybe Text) +aalUserIp + = lens _aalUserIp (\ s a -> s{_aalUserIp = a}) + +-- | Account for which to list ad clients. +aalAccountId :: Lens' AccountsAdclientsList' Text +aalAccountId + = lens _aalAccountId (\ s a -> s{_aalAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aalKey :: Lens' AccountsAdclientsList' (Maybe Text) +aalKey = lens _aalKey (\ s a -> s{_aalKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aalPageToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalPageToken + = lens _aalPageToken (\ s a -> s{_aalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aalOauthToken :: Lens' AccountsAdclientsList' (Maybe Text) +aalOauthToken + = lens _aalOauthToken + (\ s a -> s{_aalOauthToken = a}) + +-- | The maximum number of ad clients to include in the response, used for +-- paging. +aalMaxResults :: Lens' AccountsAdclientsList' (Maybe Int32) +aalMaxResults + = lens _aalMaxResults + (\ s a -> s{_aalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aalFields :: Lens' AccountsAdclientsList' (Maybe Text) +aalFields + = lens _aalFields (\ s a -> s{_aalFields = a}) + +-- | Data format for the response. +aalAlt :: Lens' AccountsAdclientsList' Text +aalAlt = lens _aalAlt (\ s a -> s{_aalAlt = a}) + +instance GoogleRequest AccountsAdclientsList' where + type Rs AccountsAdclientsList' = AdClients + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAdclientsList{..} + = go _aalQuotaUser _aalPrettyPrint _aalUserIp + _aalAccountId + _aalKey + _aalPageToken + _aalOauthToken + _aalMaxResults + _aalFields + _aalAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdclientsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Customchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Customchannels/List.hs new file mode 100644 index 000000000..90a8fff50 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Customchannels/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Adunits.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all custom channels which the specified ad unit belongs to. +-- +-- /See:/ for @AdsenseAccountsAdunitsCustomchannelsList@. +module AdSense.Accounts.Adunits.Customchannels.List + ( + -- * REST Resource + AccountsAdunitsCustomchannelsListAPI + + -- * Creating a Request + , accountsAdunitsCustomchannelsList + , AccountsAdunitsCustomchannelsList + + -- * Request Lenses + , aaclQuotaUser + , aaclPrettyPrint + , aaclUserIp + , aaclAdUnitId + , aaclAdClientId + , aaclAccountId + , aaclKey + , aaclPageToken + , aaclOauthToken + , aaclMaxResults + , aaclFields + , aaclAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAdunitsCustomchannelsList@ which the +-- 'AccountsAdunitsCustomchannelsList' request conforms to. +type AccountsAdunitsCustomchannelsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CustomChannels + +-- | List all custom channels which the specified ad unit belongs to. +-- +-- /See:/ 'accountsAdunitsCustomchannelsList' smart constructor. +data AccountsAdunitsCustomchannelsList = AccountsAdunitsCustomchannelsList + { _aaclQuotaUser :: !(Maybe Text) + , _aaclPrettyPrint :: !Bool + , _aaclUserIp :: !(Maybe Text) + , _aaclAdUnitId :: !Text + , _aaclAdClientId :: !Text + , _aaclAccountId :: !Text + , _aaclKey :: !(Maybe Text) + , _aaclPageToken :: !(Maybe Text) + , _aaclOauthToken :: !(Maybe Text) + , _aaclMaxResults :: !(Maybe Int32) + , _aaclFields :: !(Maybe Text) + , _aaclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsCustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaclQuotaUser' +-- +-- * 'aaclPrettyPrint' +-- +-- * 'aaclUserIp' +-- +-- * 'aaclAdUnitId' +-- +-- * 'aaclAdClientId' +-- +-- * 'aaclAccountId' +-- +-- * 'aaclKey' +-- +-- * 'aaclPageToken' +-- +-- * 'aaclOauthToken' +-- +-- * 'aaclMaxResults' +-- +-- * 'aaclFields' +-- +-- * 'aaclAlt' +accountsAdunitsCustomchannelsList + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsCustomchannelsList +accountsAdunitsCustomchannelsList pAaclAdUnitId_ pAaclAdClientId_ pAaclAccountId_ = + AccountsAdunitsCustomchannelsList + { _aaclQuotaUser = Nothing + , _aaclPrettyPrint = True + , _aaclUserIp = Nothing + , _aaclAdUnitId = pAaclAdUnitId_ + , _aaclAdClientId = pAaclAdClientId_ + , _aaclAccountId = pAaclAccountId_ + , _aaclKey = Nothing + , _aaclPageToken = Nothing + , _aaclOauthToken = Nothing + , _aaclMaxResults = Nothing + , _aaclFields = Nothing + , _aaclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaclQuotaUser :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclQuotaUser + = lens _aaclQuotaUser + (\ s a -> s{_aaclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaclPrettyPrint :: Lens' AccountsAdunitsCustomchannelsList' Bool +aaclPrettyPrint + = lens _aaclPrettyPrint + (\ s a -> s{_aaclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaclUserIp :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclUserIp + = lens _aaclUserIp (\ s a -> s{_aaclUserIp = a}) + +-- | Ad unit for which to list custom channels. +aaclAdUnitId :: Lens' AccountsAdunitsCustomchannelsList' Text +aaclAdUnitId + = lens _aaclAdUnitId (\ s a -> s{_aaclAdUnitId = a}) + +-- | Ad client which contains the ad unit. +aaclAdClientId :: Lens' AccountsAdunitsCustomchannelsList' Text +aaclAdClientId + = lens _aaclAdClientId + (\ s a -> s{_aaclAdClientId = a}) + +-- | Account to which the ad client belongs. +aaclAccountId :: Lens' AccountsAdunitsCustomchannelsList' Text +aaclAccountId + = lens _aaclAccountId + (\ s a -> s{_aaclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaclKey :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclKey = lens _aaclKey (\ s a -> s{_aaclKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +aaclPageToken :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclPageToken + = lens _aaclPageToken + (\ s a -> s{_aaclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aaclOauthToken :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclOauthToken + = lens _aaclOauthToken + (\ s a -> s{_aaclOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +aaclMaxResults :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Int32) +aaclMaxResults + = lens _aaclMaxResults + (\ s a -> s{_aaclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aaclFields :: Lens' AccountsAdunitsCustomchannelsList' (Maybe Text) +aaclFields + = lens _aaclFields (\ s a -> s{_aaclFields = a}) + +-- | Data format for the response. +aaclAlt :: Lens' AccountsAdunitsCustomchannelsList' Text +aaclAlt = lens _aaclAlt (\ s a -> s{_aaclAlt = a}) + +instance GoogleRequest + AccountsAdunitsCustomchannelsList' where + type Rs AccountsAdunitsCustomchannelsList' = + CustomChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u + AccountsAdunitsCustomchannelsList{..} + = go _aaclQuotaUser _aaclPrettyPrint _aaclUserIp + _aaclAdUnitId + _aaclAdClientId + _aaclAccountId + _aaclKey + _aaclPageToken + _aaclOauthToken + _aaclMaxResults + _aaclFields + _aaclAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsCustomchannelsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Get.hs new file mode 100644 index 000000000..5a1c28898 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Adunits.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified ad unit in the specified ad client for the specified +-- account. +-- +-- /See:/ for @AdsenseAccountsAdunitsGet@. +module AdSense.Accounts.Adunits.Get + ( + -- * REST Resource + AccountsAdunitsGetAPI + + -- * Creating a Request + , accountsAdunitsGet + , AccountsAdunitsGet + + -- * Request Lenses + , aagQuotaUser + , aagPrettyPrint + , aagUserIp + , aagAdUnitId + , aagAdClientId + , aagAccountId + , aagKey + , aagOauthToken + , aagFields + , aagAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAdunitsGet@ which the +-- 'AccountsAdunitsGet' request conforms to. +type AccountsAdunitsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> Get '[JSON] AdUnit + +-- | Gets the specified ad unit in the specified ad client for the specified +-- account. +-- +-- /See:/ 'accountsAdunitsGet' smart constructor. +data AccountsAdunitsGet = AccountsAdunitsGet + { _aagQuotaUser :: !(Maybe Text) + , _aagPrettyPrint :: !Bool + , _aagUserIp :: !(Maybe Text) + , _aagAdUnitId :: !Text + , _aagAdClientId :: !Text + , _aagAccountId :: !Text + , _aagKey :: !(Maybe Text) + , _aagOauthToken :: !(Maybe Text) + , _aagFields :: !(Maybe Text) + , _aagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aagQuotaUser' +-- +-- * 'aagPrettyPrint' +-- +-- * 'aagUserIp' +-- +-- * 'aagAdUnitId' +-- +-- * 'aagAdClientId' +-- +-- * 'aagAccountId' +-- +-- * 'aagKey' +-- +-- * 'aagOauthToken' +-- +-- * 'aagFields' +-- +-- * 'aagAlt' +accountsAdunitsGet + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsGet +accountsAdunitsGet pAagAdUnitId_ pAagAdClientId_ pAagAccountId_ = + AccountsAdunitsGet + { _aagQuotaUser = Nothing + , _aagPrettyPrint = True + , _aagUserIp = Nothing + , _aagAdUnitId = pAagAdUnitId_ + , _aagAdClientId = pAagAdClientId_ + , _aagAccountId = pAagAccountId_ + , _aagKey = Nothing + , _aagOauthToken = Nothing + , _aagFields = Nothing + , _aagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aagQuotaUser :: Lens' AccountsAdunitsGet' (Maybe Text) +aagQuotaUser + = lens _aagQuotaUser (\ s a -> s{_aagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aagPrettyPrint :: Lens' AccountsAdunitsGet' Bool +aagPrettyPrint + = lens _aagPrettyPrint + (\ s a -> s{_aagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aagUserIp :: Lens' AccountsAdunitsGet' (Maybe Text) +aagUserIp + = lens _aagUserIp (\ s a -> s{_aagUserIp = a}) + +-- | Ad unit to retrieve. +aagAdUnitId :: Lens' AccountsAdunitsGet' Text +aagAdUnitId + = lens _aagAdUnitId (\ s a -> s{_aagAdUnitId = a}) + +-- | Ad client for which to get the ad unit. +aagAdClientId :: Lens' AccountsAdunitsGet' Text +aagAdClientId + = lens _aagAdClientId + (\ s a -> s{_aagAdClientId = a}) + +-- | Account to which the ad client belongs. +aagAccountId :: Lens' AccountsAdunitsGet' Text +aagAccountId + = lens _aagAccountId (\ s a -> s{_aagAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aagKey :: Lens' AccountsAdunitsGet' (Maybe Text) +aagKey = lens _aagKey (\ s a -> s{_aagKey = a}) + +-- | OAuth 2.0 token for the current user. +aagOauthToken :: Lens' AccountsAdunitsGet' (Maybe Text) +aagOauthToken + = lens _aagOauthToken + (\ s a -> s{_aagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aagFields :: Lens' AccountsAdunitsGet' (Maybe Text) +aagFields + = lens _aagFields (\ s a -> s{_aagFields = a}) + +-- | Data format for the response. +aagAlt :: Lens' AccountsAdunitsGet' Text +aagAlt = lens _aagAlt (\ s a -> s{_aagAlt = a}) + +instance GoogleRequest AccountsAdunitsGet' where + type Rs AccountsAdunitsGet' = AdUnit + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAdunitsGet{..} + = go _aagQuotaUser _aagPrettyPrint _aagUserIp + _aagAdUnitId + _aagAdClientId + _aagAccountId + _aagKey + _aagOauthToken + _aagFields + _aagAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsGetAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/GetAdCode.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/GetAdCode.hs new file mode 100644 index 000000000..0b1112261 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/GetAdCode.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Adunits.GetAdCode +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get ad code for the specified ad unit. +-- +-- /See:/ for @AdsenseAccountsAdunitsGetAdCode@. +module AdSense.Accounts.Adunits.GetAdCode + ( + -- * REST Resource + AccountsAdunitsGetAdCodeAPI + + -- * Creating a Request + , accountsAdunitsGetAdCode + , AccountsAdunitsGetAdCode + + -- * Request Lenses + , aagacQuotaUser + , aagacPrettyPrint + , aagacUserIp + , aagacAdUnitId + , aagacAdClientId + , aagacAccountId + , aagacKey + , aagacOauthToken + , aagacFields + , aagacAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAdunitsGetAdCode@ which the +-- 'AccountsAdunitsGetAdCode' request conforms to. +type AccountsAdunitsGetAdCodeAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> + "adcode" :> Get '[JSON] AdCode + +-- | Get ad code for the specified ad unit. +-- +-- /See:/ 'accountsAdunitsGetAdCode' smart constructor. +data AccountsAdunitsGetAdCode = AccountsAdunitsGetAdCode + { _aagacQuotaUser :: !(Maybe Text) + , _aagacPrettyPrint :: !Bool + , _aagacUserIp :: !(Maybe Text) + , _aagacAdUnitId :: !Text + , _aagacAdClientId :: !Text + , _aagacAccountId :: !Text + , _aagacKey :: !(Maybe Text) + , _aagacOauthToken :: !(Maybe Text) + , _aagacFields :: !(Maybe Text) + , _aagacAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsGetAdCode'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aagacQuotaUser' +-- +-- * 'aagacPrettyPrint' +-- +-- * 'aagacUserIp' +-- +-- * 'aagacAdUnitId' +-- +-- * 'aagacAdClientId' +-- +-- * 'aagacAccountId' +-- +-- * 'aagacKey' +-- +-- * 'aagacOauthToken' +-- +-- * 'aagacFields' +-- +-- * 'aagacAlt' +accountsAdunitsGetAdCode + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsGetAdCode +accountsAdunitsGetAdCode pAagacAdUnitId_ pAagacAdClientId_ pAagacAccountId_ = + AccountsAdunitsGetAdCode + { _aagacQuotaUser = Nothing + , _aagacPrettyPrint = True + , _aagacUserIp = Nothing + , _aagacAdUnitId = pAagacAdUnitId_ + , _aagacAdClientId = pAagacAdClientId_ + , _aagacAccountId = pAagacAccountId_ + , _aagacKey = Nothing + , _aagacOauthToken = Nothing + , _aagacFields = Nothing + , _aagacAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aagacQuotaUser :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacQuotaUser + = lens _aagacQuotaUser + (\ s a -> s{_aagacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aagacPrettyPrint :: Lens' AccountsAdunitsGetAdCode' Bool +aagacPrettyPrint + = lens _aagacPrettyPrint + (\ s a -> s{_aagacPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aagacUserIp :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacUserIp + = lens _aagacUserIp (\ s a -> s{_aagacUserIp = a}) + +-- | Ad unit to get the code for. +aagacAdUnitId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAdUnitId + = lens _aagacAdUnitId + (\ s a -> s{_aagacAdUnitId = a}) + +-- | Ad client with contains the ad unit. +aagacAdClientId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAdClientId + = lens _aagacAdClientId + (\ s a -> s{_aagacAdClientId = a}) + +-- | Account which contains the ad client. +aagacAccountId :: Lens' AccountsAdunitsGetAdCode' Text +aagacAccountId + = lens _aagacAccountId + (\ s a -> s{_aagacAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aagacKey :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacKey = lens _aagacKey (\ s a -> s{_aagacKey = a}) + +-- | OAuth 2.0 token for the current user. +aagacOauthToken :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacOauthToken + = lens _aagacOauthToken + (\ s a -> s{_aagacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aagacFields :: Lens' AccountsAdunitsGetAdCode' (Maybe Text) +aagacFields + = lens _aagacFields (\ s a -> s{_aagacFields = a}) + +-- | Data format for the response. +aagacAlt :: Lens' AccountsAdunitsGetAdCode' Text +aagacAlt = lens _aagacAlt (\ s a -> s{_aagacAlt = a}) + +instance GoogleRequest AccountsAdunitsGetAdCode' + where + type Rs AccountsAdunitsGetAdCode' = AdCode + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAdunitsGetAdCode{..} + = go _aagacQuotaUser _aagacPrettyPrint _aagacUserIp + _aagacAdUnitId + _aagacAdClientId + _aagacAccountId + _aagacKey + _aagacOauthToken + _aagacFields + _aagacAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsGetAdCodeAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/List.hs new file mode 100644 index 000000000..0fda02e23 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Adunits/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Adunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad units in the specified ad client for the specified account. +-- +-- /See:/ for @AdsenseAccountsAdunitsList@. +module AdSense.Accounts.Adunits.List + ( + -- * REST Resource + AccountsAdunitsListAPI + + -- * Creating a Request + , accountsAdunitsList + , AccountsAdunitsList + + -- * Request Lenses + , accQuotaUser + , accPrettyPrint + , accIncludeInactive + , accUserIp + , accAdClientId + , accAccountId + , accKey + , accPageToken + , accOauthToken + , accMaxResults + , accFields + , accAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAdunitsList@ which the +-- 'AccountsAdunitsList' request conforms to. +type AccountsAdunitsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + QueryParam "includeInactive" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] AdUnits + +-- | List all ad units in the specified ad client for the specified account. +-- +-- /See:/ 'accountsAdunitsList' smart constructor. +data AccountsAdunitsList = AccountsAdunitsList + { _accQuotaUser :: !(Maybe Text) + , _accPrettyPrint :: !Bool + , _accIncludeInactive :: !(Maybe Bool) + , _accUserIp :: !(Maybe Text) + , _accAdClientId :: !Text + , _accAccountId :: !Text + , _accKey :: !(Maybe Text) + , _accPageToken :: !(Maybe Text) + , _accOauthToken :: !(Maybe Text) + , _accMaxResults :: !(Maybe Int32) + , _accFields :: !(Maybe Text) + , _accAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAdunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accQuotaUser' +-- +-- * 'accPrettyPrint' +-- +-- * 'accIncludeInactive' +-- +-- * 'accUserIp' +-- +-- * 'accAdClientId' +-- +-- * 'accAccountId' +-- +-- * 'accKey' +-- +-- * 'accPageToken' +-- +-- * 'accOauthToken' +-- +-- * 'accMaxResults' +-- +-- * 'accFields' +-- +-- * 'accAlt' +accountsAdunitsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsAdunitsList +accountsAdunitsList pAccAdClientId_ pAccAccountId_ = + AccountsAdunitsList + { _accQuotaUser = Nothing + , _accPrettyPrint = True + , _accIncludeInactive = Nothing + , _accUserIp = Nothing + , _accAdClientId = pAccAdClientId_ + , _accAccountId = pAccAccountId_ + , _accKey = Nothing + , _accPageToken = Nothing + , _accOauthToken = Nothing + , _accMaxResults = Nothing + , _accFields = Nothing + , _accAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +accQuotaUser :: Lens' AccountsAdunitsList' (Maybe Text) +accQuotaUser + = lens _accQuotaUser (\ s a -> s{_accQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +accPrettyPrint :: Lens' AccountsAdunitsList' Bool +accPrettyPrint + = lens _accPrettyPrint + (\ s a -> s{_accPrettyPrint = a}) + +-- | Whether to include inactive ad units. Default: true. +accIncludeInactive :: Lens' AccountsAdunitsList' (Maybe Bool) +accIncludeInactive + = lens _accIncludeInactive + (\ s a -> s{_accIncludeInactive = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +accUserIp :: Lens' AccountsAdunitsList' (Maybe Text) +accUserIp + = lens _accUserIp (\ s a -> s{_accUserIp = a}) + +-- | Ad client for which to list ad units. +accAdClientId :: Lens' AccountsAdunitsList' Text +accAdClientId + = lens _accAdClientId + (\ s a -> s{_accAdClientId = a}) + +-- | Account to which the ad client belongs. +accAccountId :: Lens' AccountsAdunitsList' Text +accAccountId + = lens _accAccountId (\ s a -> s{_accAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +accKey :: Lens' AccountsAdunitsList' (Maybe Text) +accKey = lens _accKey (\ s a -> s{_accKey = a}) + +-- | A continuation token, used to page through ad units. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +accPageToken :: Lens' AccountsAdunitsList' (Maybe Text) +accPageToken + = lens _accPageToken (\ s a -> s{_accPageToken = a}) + +-- | OAuth 2.0 token for the current user. +accOauthToken :: Lens' AccountsAdunitsList' (Maybe Text) +accOauthToken + = lens _accOauthToken + (\ s a -> s{_accOauthToken = a}) + +-- | The maximum number of ad units to include in the response, used for +-- paging. +accMaxResults :: Lens' AccountsAdunitsList' (Maybe Int32) +accMaxResults + = lens _accMaxResults + (\ s a -> s{_accMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +accFields :: Lens' AccountsAdunitsList' (Maybe Text) +accFields + = lens _accFields (\ s a -> s{_accFields = a}) + +-- | Data format for the response. +accAlt :: Lens' AccountsAdunitsList' Text +accAlt = lens _accAlt (\ s a -> s{_accAlt = a}) + +instance GoogleRequest AccountsAdunitsList' where + type Rs AccountsAdunitsList' = AdUnits + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAdunitsList{..} + = go _accQuotaUser _accPrettyPrint + _accIncludeInactive + _accUserIp + _accAdClientId + _accAccountId + _accKey + _accPageToken + _accOauthToken + _accMaxResults + _accFields + _accAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAdunitsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/Delete.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/Delete.hs new file mode 100644 index 000000000..5ec8c76ec --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Alerts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Dismiss (delete) the specified alert from the specified publisher +-- AdSense account. +-- +-- /See:/ for @AdsenseAccountsAlertsDelete@. +module AdSense.Accounts.Alerts.Delete + ( + -- * REST Resource + AccountsAlertsDeleteAPI + + -- * Creating a Request + , accountsAlertsDelete + , AccountsAlertsDelete + + -- * Request Lenses + , aadQuotaUser + , aadPrettyPrint + , aadUserIp + , aadAlertId + , aadAccountId + , aadKey + , aadOauthToken + , aadFields + , aadAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAlertsDelete@ which the +-- 'AccountsAlertsDelete' request conforms to. +type AccountsAlertsDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "alerts" :> + Capture "alertId" Text :> Delete '[JSON] () + +-- | Dismiss (delete) the specified alert from the specified publisher +-- AdSense account. +-- +-- /See:/ 'accountsAlertsDelete' smart constructor. +data AccountsAlertsDelete = AccountsAlertsDelete + { _aadQuotaUser :: !(Maybe Text) + , _aadPrettyPrint :: !Bool + , _aadUserIp :: !(Maybe Text) + , _aadAlertId :: !Text + , _aadAccountId :: !Text + , _aadKey :: !(Maybe Text) + , _aadOauthToken :: !(Maybe Text) + , _aadFields :: !(Maybe Text) + , _aadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAlertsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aadQuotaUser' +-- +-- * 'aadPrettyPrint' +-- +-- * 'aadUserIp' +-- +-- * 'aadAlertId' +-- +-- * 'aadAccountId' +-- +-- * 'aadKey' +-- +-- * 'aadOauthToken' +-- +-- * 'aadFields' +-- +-- * 'aadAlt' +accountsAlertsDelete + :: Text -- ^ 'alertId' + -> Text -- ^ 'accountId' + -> AccountsAlertsDelete +accountsAlertsDelete pAadAlertId_ pAadAccountId_ = + AccountsAlertsDelete + { _aadQuotaUser = Nothing + , _aadPrettyPrint = True + , _aadUserIp = Nothing + , _aadAlertId = pAadAlertId_ + , _aadAccountId = pAadAccountId_ + , _aadKey = Nothing + , _aadOauthToken = Nothing + , _aadFields = Nothing + , _aadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aadQuotaUser :: Lens' AccountsAlertsDelete' (Maybe Text) +aadQuotaUser + = lens _aadQuotaUser (\ s a -> s{_aadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aadPrettyPrint :: Lens' AccountsAlertsDelete' Bool +aadPrettyPrint + = lens _aadPrettyPrint + (\ s a -> s{_aadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aadUserIp :: Lens' AccountsAlertsDelete' (Maybe Text) +aadUserIp + = lens _aadUserIp (\ s a -> s{_aadUserIp = a}) + +-- | Alert to delete. +aadAlertId :: Lens' AccountsAlertsDelete' Text +aadAlertId + = lens _aadAlertId (\ s a -> s{_aadAlertId = a}) + +-- | Account which contains the ad unit. +aadAccountId :: Lens' AccountsAlertsDelete' Text +aadAccountId + = lens _aadAccountId (\ s a -> s{_aadAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aadKey :: Lens' AccountsAlertsDelete' (Maybe Text) +aadKey = lens _aadKey (\ s a -> s{_aadKey = a}) + +-- | OAuth 2.0 token for the current user. +aadOauthToken :: Lens' AccountsAlertsDelete' (Maybe Text) +aadOauthToken + = lens _aadOauthToken + (\ s a -> s{_aadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aadFields :: Lens' AccountsAlertsDelete' (Maybe Text) +aadFields + = lens _aadFields (\ s a -> s{_aadFields = a}) + +-- | Data format for the response. +aadAlt :: Lens' AccountsAlertsDelete' Text +aadAlt = lens _aadAlt (\ s a -> s{_aadAlt = a}) + +instance GoogleRequest AccountsAlertsDelete' where + type Rs AccountsAlertsDelete' = () + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAlertsDelete{..} + = go _aadQuotaUser _aadPrettyPrint _aadUserIp + _aadAlertId + _aadAccountId + _aadKey + _aadOauthToken + _aadFields + _aadAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAlertsDeleteAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs new file mode 100644 index 000000000..9deac3837 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Alerts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the alerts for the specified AdSense account. +-- +-- /See:/ for @AdsenseAccountsAlertsList@. +module AdSense.Accounts.Alerts.List + ( + -- * REST Resource + AccountsAlertsListAPI + + -- * Creating a Request + , accountsAlertsList + , AccountsAlertsList + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aLocale + , aAccountId + , aKey + , aOauthToken + , aFields + , aAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsAlertsList@ which the +-- 'AccountsAlertsList' request conforms to. +type AccountsAlertsListAPI = + "accounts" :> + Capture "accountId" Text :> + "alerts" :> + QueryParam "locale" Text :> Get '[JSON] Alerts + +-- | List the alerts for the specified AdSense account. +-- +-- /See:/ 'accountsAlertsList' smart constructor. +data AccountsAlertsList = AccountsAlertsList + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aLocale :: !(Maybe Text) + , _aAccountId :: !Text + , _aKey :: !(Maybe Text) + , _aOauthToken :: !(Maybe Text) + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAlertsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aLocale' +-- +-- * 'aAccountId' +-- +-- * 'aKey' +-- +-- * 'aOauthToken' +-- +-- * 'aFields' +-- +-- * 'aAlt' +accountsAlertsList + :: Text -- ^ 'accountId' + -> AccountsAlertsList +accountsAlertsList pAAccountId_ = + AccountsAlertsList + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aLocale = Nothing + , _aAccountId = pAAccountId_ + , _aKey = Nothing + , _aOauthToken = Nothing + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AccountsAlertsList' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AccountsAlertsList' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AccountsAlertsList' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | The locale to use for translating alert messages. The account locale +-- will be used if this is not supplied. The AdSense default (English) will +-- be used if the supplied locale is invalid or unsupported. +aLocale :: Lens' AccountsAlertsList' (Maybe Text) +aLocale = lens _aLocale (\ s a -> s{_aLocale = a}) + +-- | Account for which to retrieve the alerts. +aAccountId :: Lens' AccountsAlertsList' Text +aAccountId + = lens _aAccountId (\ s a -> s{_aAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AccountsAlertsList' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AccountsAlertsList' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AccountsAlertsList' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AccountsAlertsList' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AccountsAlertsList' where + type Rs AccountsAlertsList' = Alerts + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsAlertsList{..} + = go _aQuotaUser _aPrettyPrint _aUserIp _aLocale + _aAccountId + _aKey + _aOauthToken + _aFields + _aAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAlertsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Adunits/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Adunits/List.hs new file mode 100644 index 000000000..69b6dffa4 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Adunits/List.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Customchannels.Adunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad units in the specified custom channel. +-- +-- /See:/ for @AdsenseAccountsCustomchannelsAdunitsList@. +module AdSense.Accounts.Customchannels.Adunits.List + ( + -- * REST Resource + AccountsCustomchannelsAdunitsListAPI + + -- * Creating a Request + , accountsCustomchannelsAdunitsList + , AccountsCustomchannelsAdunitsList + + -- * Request Lenses + , acalQuotaUser + , acalPrettyPrint + , acalIncludeInactive + , acalCustomChannelId + , acalUserIp + , acalAdClientId + , acalAccountId + , acalKey + , acalPageToken + , acalOauthToken + , acalMaxResults + , acalFields + , acalAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsCustomchannelsAdunitsList@ which the +-- 'AccountsCustomchannelsAdunitsList' request conforms to. +type AccountsCustomchannelsAdunitsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + "adunits" :> + QueryParam "includeInactive" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] AdUnits + +-- | List all ad units in the specified custom channel. +-- +-- /See:/ 'accountsCustomchannelsAdunitsList' smart constructor. +data AccountsCustomchannelsAdunitsList = AccountsCustomchannelsAdunitsList + { _acalQuotaUser :: !(Maybe Text) + , _acalPrettyPrint :: !Bool + , _acalIncludeInactive :: !(Maybe Bool) + , _acalCustomChannelId :: !Text + , _acalUserIp :: !(Maybe Text) + , _acalAdClientId :: !Text + , _acalAccountId :: !Text + , _acalKey :: !(Maybe Text) + , _acalPageToken :: !(Maybe Text) + , _acalOauthToken :: !(Maybe Text) + , _acalMaxResults :: !(Maybe Int32) + , _acalFields :: !(Maybe Text) + , _acalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsCustomchannelsAdunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acalQuotaUser' +-- +-- * 'acalPrettyPrint' +-- +-- * 'acalIncludeInactive' +-- +-- * 'acalCustomChannelId' +-- +-- * 'acalUserIp' +-- +-- * 'acalAdClientId' +-- +-- * 'acalAccountId' +-- +-- * 'acalKey' +-- +-- * 'acalPageToken' +-- +-- * 'acalOauthToken' +-- +-- * 'acalMaxResults' +-- +-- * 'acalFields' +-- +-- * 'acalAlt' +accountsCustomchannelsAdunitsList + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsCustomchannelsAdunitsList +accountsCustomchannelsAdunitsList pAcalCustomChannelId_ pAcalAdClientId_ pAcalAccountId_ = + AccountsCustomchannelsAdunitsList + { _acalQuotaUser = Nothing + , _acalPrettyPrint = True + , _acalIncludeInactive = Nothing + , _acalCustomChannelId = pAcalCustomChannelId_ + , _acalUserIp = Nothing + , _acalAdClientId = pAcalAdClientId_ + , _acalAccountId = pAcalAccountId_ + , _acalKey = Nothing + , _acalPageToken = Nothing + , _acalOauthToken = Nothing + , _acalMaxResults = Nothing + , _acalFields = Nothing + , _acalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acalQuotaUser :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalQuotaUser + = lens _acalQuotaUser + (\ s a -> s{_acalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acalPrettyPrint :: Lens' AccountsCustomchannelsAdunitsList' Bool +acalPrettyPrint + = lens _acalPrettyPrint + (\ s a -> s{_acalPrettyPrint = a}) + +-- | Whether to include inactive ad units. Default: true. +acalIncludeInactive :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Bool) +acalIncludeInactive + = lens _acalIncludeInactive + (\ s a -> s{_acalIncludeInactive = a}) + +-- | Custom channel for which to list ad units. +acalCustomChannelId :: Lens' AccountsCustomchannelsAdunitsList' Text +acalCustomChannelId + = lens _acalCustomChannelId + (\ s a -> s{_acalCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acalUserIp :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalUserIp + = lens _acalUserIp (\ s a -> s{_acalUserIp = a}) + +-- | Ad client which contains the custom channel. +acalAdClientId :: Lens' AccountsCustomchannelsAdunitsList' Text +acalAdClientId + = lens _acalAdClientId + (\ s a -> s{_acalAdClientId = a}) + +-- | Account to which the ad client belongs. +acalAccountId :: Lens' AccountsCustomchannelsAdunitsList' Text +acalAccountId + = lens _acalAccountId + (\ s a -> s{_acalAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acalKey :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalKey = lens _acalKey (\ s a -> s{_acalKey = a}) + +-- | A continuation token, used to page through ad units. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +acalPageToken :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalPageToken + = lens _acalPageToken + (\ s a -> s{_acalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +acalOauthToken :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalOauthToken + = lens _acalOauthToken + (\ s a -> s{_acalOauthToken = a}) + +-- | The maximum number of ad units to include in the response, used for +-- paging. +acalMaxResults :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Int32) +acalMaxResults + = lens _acalMaxResults + (\ s a -> s{_acalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +acalFields :: Lens' AccountsCustomchannelsAdunitsList' (Maybe Text) +acalFields + = lens _acalFields (\ s a -> s{_acalFields = a}) + +-- | Data format for the response. +acalAlt :: Lens' AccountsCustomchannelsAdunitsList' Text +acalAlt = lens _acalAlt (\ s a -> s{_acalAlt = a}) + +instance GoogleRequest + AccountsCustomchannelsAdunitsList' where + type Rs AccountsCustomchannelsAdunitsList' = AdUnits + request = requestWithRoute defReq adSenseURL + requestWithRoute r u + AccountsCustomchannelsAdunitsList{..} + = go _acalQuotaUser _acalPrettyPrint + _acalIncludeInactive + _acalCustomChannelId + _acalUserIp + _acalAdClientId + _acalAccountId + _acalKey + _acalPageToken + _acalOauthToken + _acalMaxResults + _acalFields + _acalAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsCustomchannelsAdunitsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Get.hs new file mode 100644 index 000000000..de457fa43 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/Get.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Customchannels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the specified custom channel from the specified ad client for the +-- specified account. +-- +-- /See:/ for @AdsenseAccountsCustomchannelsGet@. +module AdSense.Accounts.Customchannels.Get + ( + -- * REST Resource + AccountsCustomchannelsGetAPI + + -- * Creating a Request + , accountsCustomchannelsGet + , AccountsCustomchannelsGet + + -- * Request Lenses + , acgQuotaUser + , acgPrettyPrint + , acgCustomChannelId + , acgUserIp + , acgAdClientId + , acgAccountId + , acgKey + , acgOauthToken + , acgFields + , acgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsCustomchannelsGet@ which the +-- 'AccountsCustomchannelsGet' request conforms to. +type AccountsCustomchannelsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + Get '[JSON] CustomChannel + +-- | Get the specified custom channel from the specified ad client for the +-- specified account. +-- +-- /See:/ 'accountsCustomchannelsGet' smart constructor. +data AccountsCustomchannelsGet = AccountsCustomchannelsGet + { _acgQuotaUser :: !(Maybe Text) + , _acgPrettyPrint :: !Bool + , _acgCustomChannelId :: !Text + , _acgUserIp :: !(Maybe Text) + , _acgAdClientId :: !Text + , _acgAccountId :: !Text + , _acgKey :: !(Maybe Text) + , _acgOauthToken :: !(Maybe Text) + , _acgFields :: !(Maybe Text) + , _acgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsCustomchannelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acgQuotaUser' +-- +-- * 'acgPrettyPrint' +-- +-- * 'acgCustomChannelId' +-- +-- * 'acgUserIp' +-- +-- * 'acgAdClientId' +-- +-- * 'acgAccountId' +-- +-- * 'acgKey' +-- +-- * 'acgOauthToken' +-- +-- * 'acgFields' +-- +-- * 'acgAlt' +accountsCustomchannelsGet + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsCustomchannelsGet +accountsCustomchannelsGet pAcgCustomChannelId_ pAcgAdClientId_ pAcgAccountId_ = + AccountsCustomchannelsGet + { _acgQuotaUser = Nothing + , _acgPrettyPrint = True + , _acgCustomChannelId = pAcgCustomChannelId_ + , _acgUserIp = Nothing + , _acgAdClientId = pAcgAdClientId_ + , _acgAccountId = pAcgAccountId_ + , _acgKey = Nothing + , _acgOauthToken = Nothing + , _acgFields = Nothing + , _acgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acgQuotaUser :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgQuotaUser + = lens _acgQuotaUser (\ s a -> s{_acgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acgPrettyPrint :: Lens' AccountsCustomchannelsGet' Bool +acgPrettyPrint + = lens _acgPrettyPrint + (\ s a -> s{_acgPrettyPrint = a}) + +-- | Custom channel to retrieve. +acgCustomChannelId :: Lens' AccountsCustomchannelsGet' Text +acgCustomChannelId + = lens _acgCustomChannelId + (\ s a -> s{_acgCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acgUserIp :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgUserIp + = lens _acgUserIp (\ s a -> s{_acgUserIp = a}) + +-- | Ad client which contains the custom channel. +acgAdClientId :: Lens' AccountsCustomchannelsGet' Text +acgAdClientId + = lens _acgAdClientId + (\ s a -> s{_acgAdClientId = a}) + +-- | Account to which the ad client belongs. +acgAccountId :: Lens' AccountsCustomchannelsGet' Text +acgAccountId + = lens _acgAccountId (\ s a -> s{_acgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acgKey :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgKey = lens _acgKey (\ s a -> s{_acgKey = a}) + +-- | OAuth 2.0 token for the current user. +acgOauthToken :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgOauthToken + = lens _acgOauthToken + (\ s a -> s{_acgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acgFields :: Lens' AccountsCustomchannelsGet' (Maybe Text) +acgFields + = lens _acgFields (\ s a -> s{_acgFields = a}) + +-- | Data format for the response. +acgAlt :: Lens' AccountsCustomchannelsGet' Text +acgAlt = lens _acgAlt (\ s a -> s{_acgAlt = a}) + +instance GoogleRequest AccountsCustomchannelsGet' + where + type Rs AccountsCustomchannelsGet' = CustomChannel + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsCustomchannelsGet{..} + = go _acgQuotaUser _acgPrettyPrint + _acgCustomChannelId + _acgUserIp + _acgAdClientId + _acgAccountId + _acgKey + _acgOauthToken + _acgFields + _acgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsCustomchannelsGetAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/List.hs new file mode 100644 index 000000000..a993bff31 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Customchannels/List.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all custom channels in the specified ad client for the specified +-- account. +-- +-- /See:/ for @AdsenseAccountsCustomchannelsList@. +module AdSense.Accounts.Customchannels.List + ( + -- * REST Resource + AccountsCustomchannelsListAPI + + -- * Creating a Request + , accountsCustomchannelsList + , AccountsCustomchannelsList + + -- * Request Lenses + , aclQuotaUser + , aclPrettyPrint + , aclUserIp + , aclAdClientId + , aclAccountId + , aclKey + , aclPageToken + , aclOauthToken + , aclMaxResults + , aclFields + , aclAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsCustomchannelsList@ which the +-- 'AccountsCustomchannelsList' request conforms to. +type AccountsCustomchannelsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CustomChannels + +-- | List all custom channels in the specified ad client for the specified +-- account. +-- +-- /See:/ 'accountsCustomchannelsList' smart constructor. +data AccountsCustomchannelsList = AccountsCustomchannelsList + { _aclQuotaUser :: !(Maybe Text) + , _aclPrettyPrint :: !Bool + , _aclUserIp :: !(Maybe Text) + , _aclAdClientId :: !Text + , _aclAccountId :: !Text + , _aclKey :: !(Maybe Text) + , _aclPageToken :: !(Maybe Text) + , _aclOauthToken :: !(Maybe Text) + , _aclMaxResults :: !(Maybe Int32) + , _aclFields :: !(Maybe Text) + , _aclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsCustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclQuotaUser' +-- +-- * 'aclPrettyPrint' +-- +-- * 'aclUserIp' +-- +-- * 'aclAdClientId' +-- +-- * 'aclAccountId' +-- +-- * 'aclKey' +-- +-- * 'aclPageToken' +-- +-- * 'aclOauthToken' +-- +-- * 'aclMaxResults' +-- +-- * 'aclFields' +-- +-- * 'aclAlt' +accountsCustomchannelsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsCustomchannelsList +accountsCustomchannelsList pAclAdClientId_ pAclAccountId_ = + AccountsCustomchannelsList + { _aclQuotaUser = Nothing + , _aclPrettyPrint = True + , _aclUserIp = Nothing + , _aclAdClientId = pAclAdClientId_ + , _aclAccountId = pAclAccountId_ + , _aclKey = Nothing + , _aclPageToken = Nothing + , _aclOauthToken = Nothing + , _aclMaxResults = Nothing + , _aclFields = Nothing + , _aclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aclQuotaUser :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclQuotaUser + = lens _aclQuotaUser (\ s a -> s{_aclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aclPrettyPrint :: Lens' AccountsCustomchannelsList' Bool +aclPrettyPrint + = lens _aclPrettyPrint + (\ s a -> s{_aclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aclUserIp :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclUserIp + = lens _aclUserIp (\ s a -> s{_aclUserIp = a}) + +-- | Ad client for which to list custom channels. +aclAdClientId :: Lens' AccountsCustomchannelsList' Text +aclAdClientId + = lens _aclAdClientId + (\ s a -> s{_aclAdClientId = a}) + +-- | Account to which the ad client belongs. +aclAccountId :: Lens' AccountsCustomchannelsList' Text +aclAccountId + = lens _aclAccountId (\ s a -> s{_aclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aclKey :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclKey = lens _aclKey (\ s a -> s{_aclKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +aclPageToken :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclPageToken + = lens _aclPageToken (\ s a -> s{_aclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aclOauthToken :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclOauthToken + = lens _aclOauthToken + (\ s a -> s{_aclOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +aclMaxResults :: Lens' AccountsCustomchannelsList' (Maybe Int32) +aclMaxResults + = lens _aclMaxResults + (\ s a -> s{_aclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aclFields :: Lens' AccountsCustomchannelsList' (Maybe Text) +aclFields + = lens _aclFields (\ s a -> s{_aclFields = a}) + +-- | Data format for the response. +aclAlt :: Lens' AccountsCustomchannelsList' Text +aclAlt = lens _aclAlt (\ s a -> s{_aclAlt = a}) + +instance GoogleRequest AccountsCustomchannelsList' + where + type Rs AccountsCustomchannelsList' = CustomChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsCustomchannelsList{..} + = go _aclQuotaUser _aclPrettyPrint _aclUserIp + _aclAdClientId + _aclAccountId + _aclKey + _aclPageToken + _aclOauthToken + _aclMaxResults + _aclFields + _aclAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsCustomchannelsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Get.hs new file mode 100644 index 000000000..b38f526e3 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Get.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get information about the selected AdSense account. +-- +-- /See:/ for @AdsenseAccountsGet@. +module AdSense.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agTree + , agAccountId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "accounts" :> + Capture "accountId" Text :> + QueryParam "tree" Bool :> Get '[JSON] Account + +-- | Get information about the selected AdSense account. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agTree :: !(Maybe Bool) + , _agAccountId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agTree' +-- +-- * 'agAccountId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +accountsGet + :: Text -- ^ 'accountId' + -> AccountsGet +accountsGet pAgAccountId_ = + AccountsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agTree = Nothing + , _agAccountId = pAgAccountId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AccountsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AccountsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AccountsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | Whether the tree of sub accounts should be returned. +agTree :: Lens' AccountsGet' (Maybe Bool) +agTree = lens _agTree (\ s a -> s{_agTree = a}) + +-- | Account to get information about. +agAccountId :: Lens' AccountsGet' Text +agAccountId + = lens _agAccountId (\ s a -> s{_agAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AccountsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AccountsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AccountsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AccountsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp _agTree + _agAccountId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/List.hs new file mode 100644 index 000000000..623b406b4 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/List.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all accounts available to this AdSense account. +-- +-- /See:/ for @AdsenseAccountsList@. +module AdSense.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , allQuotaUser + , allPrettyPrint + , allUserIp + , allKey + , allPageToken + , allOauthToken + , allMaxResults + , allFields + , allAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "accounts" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Accounts + +-- | List all accounts available to this AdSense account. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _allQuotaUser :: !(Maybe Text) + , _allPrettyPrint :: !Bool + , _allUserIp :: !(Maybe Text) + , _allKey :: !(Maybe Text) + , _allPageToken :: !(Maybe Text) + , _allOauthToken :: !(Maybe Text) + , _allMaxResults :: !(Maybe Int32) + , _allFields :: !(Maybe Text) + , _allAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'allQuotaUser' +-- +-- * 'allPrettyPrint' +-- +-- * 'allUserIp' +-- +-- * 'allKey' +-- +-- * 'allPageToken' +-- +-- * 'allOauthToken' +-- +-- * 'allMaxResults' +-- +-- * 'allFields' +-- +-- * 'allAlt' +accountsList + :: AccountsList +accountsList = + AccountsList + { _allQuotaUser = Nothing + , _allPrettyPrint = True + , _allUserIp = Nothing + , _allKey = Nothing + , _allPageToken = Nothing + , _allOauthToken = Nothing + , _allMaxResults = Nothing + , _allFields = Nothing + , _allAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +allQuotaUser :: Lens' AccountsList' (Maybe Text) +allQuotaUser + = lens _allQuotaUser (\ s a -> s{_allQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +allPrettyPrint :: Lens' AccountsList' Bool +allPrettyPrint + = lens _allPrettyPrint + (\ s a -> s{_allPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +allUserIp :: Lens' AccountsList' (Maybe Text) +allUserIp + = lens _allUserIp (\ s a -> s{_allUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +allKey :: Lens' AccountsList' (Maybe Text) +allKey = lens _allKey (\ s a -> s{_allKey = a}) + +-- | A continuation token, used to page through accounts. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +allPageToken :: Lens' AccountsList' (Maybe Text) +allPageToken + = lens _allPageToken (\ s a -> s{_allPageToken = a}) + +-- | OAuth 2.0 token for the current user. +allOauthToken :: Lens' AccountsList' (Maybe Text) +allOauthToken + = lens _allOauthToken + (\ s a -> s{_allOauthToken = a}) + +-- | The maximum number of accounts to include in the response, used for +-- paging. +allMaxResults :: Lens' AccountsList' (Maybe Int32) +allMaxResults + = lens _allMaxResults + (\ s a -> s{_allMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +allFields :: Lens' AccountsList' (Maybe Text) +allFields + = lens _allFields (\ s a -> s{_allFields = a}) + +-- | Data format for the response. +allAlt :: Lens' AccountsList' Text +allAlt = lens _allAlt (\ s a -> s{_allAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = Accounts + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsList{..} + = go _allQuotaUser _allPrettyPrint _allUserIp _allKey + _allPageToken + _allOauthToken + _allMaxResults + _allFields + _allAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Payments/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Payments/List.hs new file mode 100644 index 000000000..fb8cb091b --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Payments/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Payments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the payments for the specified AdSense account. +-- +-- /See:/ for @AdsenseAccountsPaymentsList@. +module AdSense.Accounts.Payments.List + ( + -- * REST Resource + AccountsPaymentsListAPI + + -- * Creating a Request + , accountsPaymentsList + , AccountsPaymentsList + + -- * Request Lenses + , aplQuotaUser + , aplPrettyPrint + , aplUserIp + , aplAccountId + , aplKey + , aplOauthToken + , aplFields + , aplAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsPaymentsList@ which the +-- 'AccountsPaymentsList' request conforms to. +type AccountsPaymentsListAPI = + "accounts" :> + Capture "accountId" Text :> + "payments" :> Get '[JSON] Payments + +-- | List the payments for the specified AdSense account. +-- +-- /See:/ 'accountsPaymentsList' smart constructor. +data AccountsPaymentsList = AccountsPaymentsList + { _aplQuotaUser :: !(Maybe Text) + , _aplPrettyPrint :: !Bool + , _aplUserIp :: !(Maybe Text) + , _aplAccountId :: !Text + , _aplKey :: !(Maybe Text) + , _aplOauthToken :: !(Maybe Text) + , _aplFields :: !(Maybe Text) + , _aplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPaymentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplQuotaUser' +-- +-- * 'aplPrettyPrint' +-- +-- * 'aplUserIp' +-- +-- * 'aplAccountId' +-- +-- * 'aplKey' +-- +-- * 'aplOauthToken' +-- +-- * 'aplFields' +-- +-- * 'aplAlt' +accountsPaymentsList + :: Text -- ^ 'accountId' + -> AccountsPaymentsList +accountsPaymentsList pAplAccountId_ = + AccountsPaymentsList + { _aplQuotaUser = Nothing + , _aplPrettyPrint = True + , _aplUserIp = Nothing + , _aplAccountId = pAplAccountId_ + , _aplKey = Nothing + , _aplOauthToken = Nothing + , _aplFields = Nothing + , _aplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aplQuotaUser :: Lens' AccountsPaymentsList' (Maybe Text) +aplQuotaUser + = lens _aplQuotaUser (\ s a -> s{_aplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aplPrettyPrint :: Lens' AccountsPaymentsList' Bool +aplPrettyPrint + = lens _aplPrettyPrint + (\ s a -> s{_aplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aplUserIp :: Lens' AccountsPaymentsList' (Maybe Text) +aplUserIp + = lens _aplUserIp (\ s a -> s{_aplUserIp = a}) + +-- | Account for which to retrieve the payments. +aplAccountId :: Lens' AccountsPaymentsList' Text +aplAccountId + = lens _aplAccountId (\ s a -> s{_aplAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aplKey :: Lens' AccountsPaymentsList' (Maybe Text) +aplKey = lens _aplKey (\ s a -> s{_aplKey = a}) + +-- | OAuth 2.0 token for the current user. +aplOauthToken :: Lens' AccountsPaymentsList' (Maybe Text) +aplOauthToken + = lens _aplOauthToken + (\ s a -> s{_aplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aplFields :: Lens' AccountsPaymentsList' (Maybe Text) +aplFields + = lens _aplFields (\ s a -> s{_aplFields = a}) + +-- | Data format for the response. +aplAlt :: Lens' AccountsPaymentsList' Text +aplAlt = lens _aplAlt (\ s a -> s{_aplAlt = a}) + +instance GoogleRequest AccountsPaymentsList' where + type Rs AccountsPaymentsList' = Payments + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsPaymentsList{..} + = go _aplQuotaUser _aplPrettyPrint _aplUserIp + _aplAccountId + _aplKey + _aplOauthToken + _aplFields + _aplAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPaymentsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Generate.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Generate.hs new file mode 100644 index 000000000..9b19680f6 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Generate.hs @@ -0,0 +1,307 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ for @AdsenseAccountsReportsGenerate@. +module AdSense.Accounts.Reports.Generate + ( + -- * REST Resource + AccountsReportsGenerateAPI + + -- * Creating a Request + , accountsReportsGenerate + , AccountsReportsGenerate + + -- * Request Lenses + , argQuotaUser + , argPrettyPrint + , argUserIp + , argDimension + , argLocale + , argEndDate + , argStartDate + , argAccountId + , argMetric + , argKey + , argCurrency + , argSort + , argFilter + , argOauthToken + , argStartIndex + , argUseTimezoneReporting + , argMaxResults + , argFields + , argAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsReportsGenerate@ which the +-- 'AccountsReportsGenerate' request conforms to. +type AccountsReportsGenerateAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + QueryParams "dimension" Text :> + QueryParam "locale" Text :> + QueryParam "endDate" Text :> + QueryParam "startDate" Text :> + QueryParams "metric" Text :> + QueryParam "currency" Text :> + QueryParams "sort" Text :> + QueryParams "filter" Text :> + QueryParam "startIndex" Int32 :> + QueryParam "useTimezoneReporting" Bool :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdsenseReportsGenerateResponse + +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ 'accountsReportsGenerate' smart constructor. +data AccountsReportsGenerate = AccountsReportsGenerate + { _argQuotaUser :: !(Maybe Text) + , _argPrettyPrint :: !Bool + , _argUserIp :: !(Maybe Text) + , _argDimension :: !(Maybe Text) + , _argLocale :: !(Maybe Text) + , _argEndDate :: !Text + , _argStartDate :: !Text + , _argAccountId :: !Text + , _argMetric :: !(Maybe Text) + , _argKey :: !(Maybe Text) + , _argCurrency :: !(Maybe Text) + , _argSort :: !(Maybe Text) + , _argFilter :: !(Maybe Text) + , _argOauthToken :: !(Maybe Text) + , _argStartIndex :: !(Maybe Int32) + , _argUseTimezoneReporting :: !(Maybe Bool) + , _argMaxResults :: !(Maybe Int32) + , _argFields :: !(Maybe Text) + , _argAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argQuotaUser' +-- +-- * 'argPrettyPrint' +-- +-- * 'argUserIp' +-- +-- * 'argDimension' +-- +-- * 'argLocale' +-- +-- * 'argEndDate' +-- +-- * 'argStartDate' +-- +-- * 'argAccountId' +-- +-- * 'argMetric' +-- +-- * 'argKey' +-- +-- * 'argCurrency' +-- +-- * 'argSort' +-- +-- * 'argFilter' +-- +-- * 'argOauthToken' +-- +-- * 'argStartIndex' +-- +-- * 'argUseTimezoneReporting' +-- +-- * 'argMaxResults' +-- +-- * 'argFields' +-- +-- * 'argAlt' +accountsReportsGenerate + :: Text -- ^ 'endDate' + -> Text -- ^ 'startDate' + -> Text -- ^ 'accountId' + -> AccountsReportsGenerate +accountsReportsGenerate pArgEndDate_ pArgStartDate_ pArgAccountId_ = + AccountsReportsGenerate + { _argQuotaUser = Nothing + , _argPrettyPrint = True + , _argUserIp = Nothing + , _argDimension = Nothing + , _argLocale = Nothing + , _argEndDate = pArgEndDate_ + , _argStartDate = pArgStartDate_ + , _argAccountId = pArgAccountId_ + , _argMetric = Nothing + , _argKey = Nothing + , _argCurrency = Nothing + , _argSort = Nothing + , _argFilter = Nothing + , _argOauthToken = Nothing + , _argStartIndex = Nothing + , _argUseTimezoneReporting = Nothing + , _argMaxResults = Nothing + , _argFields = Nothing + , _argAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +argQuotaUser :: Lens' AccountsReportsGenerate' (Maybe Text) +argQuotaUser + = lens _argQuotaUser (\ s a -> s{_argQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +argPrettyPrint :: Lens' AccountsReportsGenerate' Bool +argPrettyPrint + = lens _argPrettyPrint + (\ s a -> s{_argPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +argUserIp :: Lens' AccountsReportsGenerate' (Maybe Text) +argUserIp + = lens _argUserIp (\ s a -> s{_argUserIp = a}) + +-- | Dimensions to base the report on. +argDimension :: Lens' AccountsReportsGenerate' (Maybe Text) +argDimension + = lens _argDimension (\ s a -> s{_argDimension = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +argLocale :: Lens' AccountsReportsGenerate' (Maybe Text) +argLocale + = lens _argLocale (\ s a -> s{_argLocale = a}) + +-- | End of the date range to report on in \"YYYY-MM-DD\" format, inclusive. +argEndDate :: Lens' AccountsReportsGenerate' Text +argEndDate + = lens _argEndDate (\ s a -> s{_argEndDate = a}) + +-- | Start of the date range to report on in \"YYYY-MM-DD\" format, +-- inclusive. +argStartDate :: Lens' AccountsReportsGenerate' Text +argStartDate + = lens _argStartDate (\ s a -> s{_argStartDate = a}) + +-- | Account upon which to report. +argAccountId :: Lens' AccountsReportsGenerate' Text +argAccountId + = lens _argAccountId (\ s a -> s{_argAccountId = a}) + +-- | Numeric columns to include in the report. +argMetric :: Lens' AccountsReportsGenerate' (Maybe Text) +argMetric + = lens _argMetric (\ s a -> s{_argMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +argKey :: Lens' AccountsReportsGenerate' (Maybe Text) +argKey = lens _argKey (\ s a -> s{_argKey = a}) + +-- | Optional currency to use when reporting on monetary metrics. Defaults to +-- the account\'s currency if not set. +argCurrency :: Lens' AccountsReportsGenerate' (Maybe Text) +argCurrency + = lens _argCurrency (\ s a -> s{_argCurrency = a}) + +-- | The name of a dimension or metric to sort the resulting report on, +-- optionally prefixed with \"+\" to sort ascending or \"-\" to sort +-- descending. If no prefix is specified, the column is sorted ascending. +argSort :: Lens' AccountsReportsGenerate' (Maybe Text) +argSort = lens _argSort (\ s a -> s{_argSort = a}) + +-- | Filters to be run on the report. +argFilter :: Lens' AccountsReportsGenerate' (Maybe Text) +argFilter + = lens _argFilter (\ s a -> s{_argFilter = a}) + +-- | OAuth 2.0 token for the current user. +argOauthToken :: Lens' AccountsReportsGenerate' (Maybe Text) +argOauthToken + = lens _argOauthToken + (\ s a -> s{_argOauthToken = a}) + +-- | Index of the first row of report data to return. +argStartIndex :: Lens' AccountsReportsGenerate' (Maybe Int32) +argStartIndex + = lens _argStartIndex + (\ s a -> s{_argStartIndex = a}) + +-- | Whether the report should be generated in the AdSense account\'s local +-- timezone. If false default PST\/PDT timezone will be used. +argUseTimezoneReporting :: Lens' AccountsReportsGenerate' (Maybe Bool) +argUseTimezoneReporting + = lens _argUseTimezoneReporting + (\ s a -> s{_argUseTimezoneReporting = a}) + +-- | The maximum number of rows of report data to return. +argMaxResults :: Lens' AccountsReportsGenerate' (Maybe Int32) +argMaxResults + = lens _argMaxResults + (\ s a -> s{_argMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +argFields :: Lens' AccountsReportsGenerate' (Maybe Text) +argFields + = lens _argFields (\ s a -> s{_argFields = a}) + +-- | Data format for the response. +argAlt :: Lens' AccountsReportsGenerate' Text +argAlt = lens _argAlt (\ s a -> s{_argAlt = a}) + +instance GoogleRequest AccountsReportsGenerate' where + type Rs AccountsReportsGenerate' = + AdsenseReportsGenerateResponse + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsReportsGenerate{..} + = go _argQuotaUser _argPrettyPrint _argUserIp + _argDimension + _argLocale + (Just _argEndDate) + (Just _argStartDate) + _argAccountId + _argMetric + _argKey + _argCurrency + _argSort + _argFilter + _argOauthToken + _argStartIndex + _argUseTimezoneReporting + _argMaxResults + _argFields + _argAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsGenerateAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/Generate.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/Generate.hs new file mode 100644 index 000000000..9ec719b92 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/Generate.hs @@ -0,0 +1,219 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Reports.Saved.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ for @AdsenseAccountsReportsSavedGenerate@. +module AdSense.Accounts.Reports.Saved.Generate + ( + -- * REST Resource + AccountsReportsSavedGenerateAPI + + -- * Creating a Request + , accountsReportsSavedGenerate + , AccountsReportsSavedGenerate + + -- * Request Lenses + , arsgQuotaUser + , arsgPrettyPrint + , arsgUserIp + , arsgLocale + , arsgSavedReportId + , arsgAccountId + , arsgKey + , arsgOauthToken + , arsgStartIndex + , arsgMaxResults + , arsgFields + , arsgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsReportsSavedGenerate@ which the +-- 'AccountsReportsSavedGenerate' request conforms to. +type AccountsReportsSavedGenerateAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + Capture "savedReportId" Text :> + QueryParam "locale" Text :> + QueryParam "startIndex" Int32 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdsenseReportsGenerateResponse + +-- | Generate an AdSense report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ 'accountsReportsSavedGenerate' smart constructor. +data AccountsReportsSavedGenerate = AccountsReportsSavedGenerate + { _arsgQuotaUser :: !(Maybe Text) + , _arsgPrettyPrint :: !Bool + , _arsgUserIp :: !(Maybe Text) + , _arsgLocale :: !(Maybe Text) + , _arsgSavedReportId :: !Text + , _arsgAccountId :: !Text + , _arsgKey :: !(Maybe Text) + , _arsgOauthToken :: !(Maybe Text) + , _arsgStartIndex :: !(Maybe Int32) + , _arsgMaxResults :: !(Maybe Int32) + , _arsgFields :: !(Maybe Text) + , _arsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsSavedGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arsgQuotaUser' +-- +-- * 'arsgPrettyPrint' +-- +-- * 'arsgUserIp' +-- +-- * 'arsgLocale' +-- +-- * 'arsgSavedReportId' +-- +-- * 'arsgAccountId' +-- +-- * 'arsgKey' +-- +-- * 'arsgOauthToken' +-- +-- * 'arsgStartIndex' +-- +-- * 'arsgMaxResults' +-- +-- * 'arsgFields' +-- +-- * 'arsgAlt' +accountsReportsSavedGenerate + :: Text -- ^ 'savedReportId' + -> Text -- ^ 'accountId' + -> AccountsReportsSavedGenerate +accountsReportsSavedGenerate pArsgSavedReportId_ pArsgAccountId_ = + AccountsReportsSavedGenerate + { _arsgQuotaUser = Nothing + , _arsgPrettyPrint = True + , _arsgUserIp = Nothing + , _arsgLocale = Nothing + , _arsgSavedReportId = pArsgSavedReportId_ + , _arsgAccountId = pArsgAccountId_ + , _arsgKey = Nothing + , _arsgOauthToken = Nothing + , _arsgStartIndex = Nothing + , _arsgMaxResults = Nothing + , _arsgFields = Nothing + , _arsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arsgQuotaUser :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgQuotaUser + = lens _arsgQuotaUser + (\ s a -> s{_arsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arsgPrettyPrint :: Lens' AccountsReportsSavedGenerate' Bool +arsgPrettyPrint + = lens _arsgPrettyPrint + (\ s a -> s{_arsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arsgUserIp :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgUserIp + = lens _arsgUserIp (\ s a -> s{_arsgUserIp = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +arsgLocale :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgLocale + = lens _arsgLocale (\ s a -> s{_arsgLocale = a}) + +-- | The saved report to retrieve. +arsgSavedReportId :: Lens' AccountsReportsSavedGenerate' Text +arsgSavedReportId + = lens _arsgSavedReportId + (\ s a -> s{_arsgSavedReportId = a}) + +-- | Account to which the saved reports belong. +arsgAccountId :: Lens' AccountsReportsSavedGenerate' Text +arsgAccountId + = lens _arsgAccountId + (\ s a -> s{_arsgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arsgKey :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgKey = lens _arsgKey (\ s a -> s{_arsgKey = a}) + +-- | OAuth 2.0 token for the current user. +arsgOauthToken :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgOauthToken + = lens _arsgOauthToken + (\ s a -> s{_arsgOauthToken = a}) + +-- | Index of the first row of report data to return. +arsgStartIndex :: Lens' AccountsReportsSavedGenerate' (Maybe Int32) +arsgStartIndex + = lens _arsgStartIndex + (\ s a -> s{_arsgStartIndex = a}) + +-- | The maximum number of rows of report data to return. +arsgMaxResults :: Lens' AccountsReportsSavedGenerate' (Maybe Int32) +arsgMaxResults + = lens _arsgMaxResults + (\ s a -> s{_arsgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +arsgFields :: Lens' AccountsReportsSavedGenerate' (Maybe Text) +arsgFields + = lens _arsgFields (\ s a -> s{_arsgFields = a}) + +-- | Data format for the response. +arsgAlt :: Lens' AccountsReportsSavedGenerate' Text +arsgAlt = lens _arsgAlt (\ s a -> s{_arsgAlt = a}) + +instance GoogleRequest AccountsReportsSavedGenerate' + where + type Rs AccountsReportsSavedGenerate' = + AdsenseReportsGenerateResponse + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsReportsSavedGenerate{..} + = go _arsgQuotaUser _arsgPrettyPrint _arsgUserIp + _arsgLocale + _arsgSavedReportId + _arsgAccountId + _arsgKey + _arsgOauthToken + _arsgStartIndex + _arsgMaxResults + _arsgFields + _arsgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsSavedGenerateAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/List.hs new file mode 100644 index 000000000..bb75a339f --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Reports.Saved.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all saved reports in the specified AdSense account. +-- +-- /See:/ for @AdsenseAccountsReportsSavedList@. +module AdSense.Accounts.Reports.Saved.List + ( + -- * REST Resource + AccountsReportsSavedListAPI + + -- * Creating a Request + , accountsReportsSavedList + , AccountsReportsSavedList + + -- * Request Lenses + , arslQuotaUser + , arslPrettyPrint + , arslUserIp + , arslAccountId + , arslKey + , arslPageToken + , arslOauthToken + , arslMaxResults + , arslFields + , arslAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsReportsSavedList@ which the +-- 'AccountsReportsSavedList' request conforms to. +type AccountsReportsSavedListAPI = + "accounts" :> + Capture "accountId" Text :> + "reports" :> + "saved" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SavedReports + +-- | List all saved reports in the specified AdSense account. +-- +-- /See:/ 'accountsReportsSavedList' smart constructor. +data AccountsReportsSavedList = AccountsReportsSavedList + { _arslQuotaUser :: !(Maybe Text) + , _arslPrettyPrint :: !Bool + , _arslUserIp :: !(Maybe Text) + , _arslAccountId :: !Text + , _arslKey :: !(Maybe Text) + , _arslPageToken :: !(Maybe Text) + , _arslOauthToken :: !(Maybe Text) + , _arslMaxResults :: !(Maybe Int32) + , _arslFields :: !(Maybe Text) + , _arslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsReportsSavedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arslQuotaUser' +-- +-- * 'arslPrettyPrint' +-- +-- * 'arslUserIp' +-- +-- * 'arslAccountId' +-- +-- * 'arslKey' +-- +-- * 'arslPageToken' +-- +-- * 'arslOauthToken' +-- +-- * 'arslMaxResults' +-- +-- * 'arslFields' +-- +-- * 'arslAlt' +accountsReportsSavedList + :: Text -- ^ 'accountId' + -> AccountsReportsSavedList +accountsReportsSavedList pArslAccountId_ = + AccountsReportsSavedList + { _arslQuotaUser = Nothing + , _arslPrettyPrint = True + , _arslUserIp = Nothing + , _arslAccountId = pArslAccountId_ + , _arslKey = Nothing + , _arslPageToken = Nothing + , _arslOauthToken = Nothing + , _arslMaxResults = Nothing + , _arslFields = Nothing + , _arslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arslQuotaUser :: Lens' AccountsReportsSavedList' (Maybe Text) +arslQuotaUser + = lens _arslQuotaUser + (\ s a -> s{_arslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arslPrettyPrint :: Lens' AccountsReportsSavedList' Bool +arslPrettyPrint + = lens _arslPrettyPrint + (\ s a -> s{_arslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arslUserIp :: Lens' AccountsReportsSavedList' (Maybe Text) +arslUserIp + = lens _arslUserIp (\ s a -> s{_arslUserIp = a}) + +-- | Account to which the saved reports belong. +arslAccountId :: Lens' AccountsReportsSavedList' Text +arslAccountId + = lens _arslAccountId + (\ s a -> s{_arslAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arslKey :: Lens' AccountsReportsSavedList' (Maybe Text) +arslKey = lens _arslKey (\ s a -> s{_arslKey = a}) + +-- | A continuation token, used to page through saved reports. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +arslPageToken :: Lens' AccountsReportsSavedList' (Maybe Text) +arslPageToken + = lens _arslPageToken + (\ s a -> s{_arslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +arslOauthToken :: Lens' AccountsReportsSavedList' (Maybe Text) +arslOauthToken + = lens _arslOauthToken + (\ s a -> s{_arslOauthToken = a}) + +-- | The maximum number of saved reports to include in the response, used for +-- paging. +arslMaxResults :: Lens' AccountsReportsSavedList' (Maybe Int32) +arslMaxResults + = lens _arslMaxResults + (\ s a -> s{_arslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +arslFields :: Lens' AccountsReportsSavedList' (Maybe Text) +arslFields + = lens _arslFields (\ s a -> s{_arslFields = a}) + +-- | Data format for the response. +arslAlt :: Lens' AccountsReportsSavedList' Text +arslAlt = lens _arslAlt (\ s a -> s{_arslAlt = a}) + +instance GoogleRequest AccountsReportsSavedList' + where + type Rs AccountsReportsSavedList' = SavedReports + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsReportsSavedList{..} + = go _arslQuotaUser _arslPrettyPrint _arslUserIp + _arslAccountId + _arslKey + _arslPageToken + _arslOauthToken + _arslMaxResults + _arslFields + _arslAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsReportsSavedListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/Get.hs new file mode 100644 index 000000000..8d8e943a2 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/Get.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Savedadstyles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List a specific saved ad style for the specified account. +-- +-- /See:/ for @AdsenseAccountsSavedadstylesGet@. +module AdSense.Accounts.Savedadstyles.Get + ( + -- * REST Resource + AccountsSavedadstylesGetAPI + + -- * Creating a Request + , accountsSavedadstylesGet + , AccountsSavedadstylesGet + + -- * Request Lenses + , asgQuotaUser + , asgPrettyPrint + , asgSavedAdStyleId + , asgUserIp + , asgAccountId + , asgKey + , asgOauthToken + , asgFields + , asgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsSavedadstylesGet@ which the +-- 'AccountsSavedadstylesGet' request conforms to. +type AccountsSavedadstylesGetAPI = + "accounts" :> + Capture "accountId" Text :> + "savedadstyles" :> + Capture "savedAdStyleId" Text :> + Get '[JSON] SavedAdStyle + +-- | List a specific saved ad style for the specified account. +-- +-- /See:/ 'accountsSavedadstylesGet' smart constructor. +data AccountsSavedadstylesGet = AccountsSavedadstylesGet + { _asgQuotaUser :: !(Maybe Text) + , _asgPrettyPrint :: !Bool + , _asgSavedAdStyleId :: !Text + , _asgUserIp :: !(Maybe Text) + , _asgAccountId :: !Text + , _asgKey :: !(Maybe Text) + , _asgOauthToken :: !(Maybe Text) + , _asgFields :: !(Maybe Text) + , _asgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsSavedadstylesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asgQuotaUser' +-- +-- * 'asgPrettyPrint' +-- +-- * 'asgSavedAdStyleId' +-- +-- * 'asgUserIp' +-- +-- * 'asgAccountId' +-- +-- * 'asgKey' +-- +-- * 'asgOauthToken' +-- +-- * 'asgFields' +-- +-- * 'asgAlt' +accountsSavedadstylesGet + :: Text -- ^ 'savedAdStyleId' + -> Text -- ^ 'accountId' + -> AccountsSavedadstylesGet +accountsSavedadstylesGet pAsgSavedAdStyleId_ pAsgAccountId_ = + AccountsSavedadstylesGet + { _asgQuotaUser = Nothing + , _asgPrettyPrint = True + , _asgSavedAdStyleId = pAsgSavedAdStyleId_ + , _asgUserIp = Nothing + , _asgAccountId = pAsgAccountId_ + , _asgKey = Nothing + , _asgOauthToken = Nothing + , _asgFields = Nothing + , _asgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asgQuotaUser :: Lens' AccountsSavedadstylesGet' (Maybe Text) +asgQuotaUser + = lens _asgQuotaUser (\ s a -> s{_asgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asgPrettyPrint :: Lens' AccountsSavedadstylesGet' Bool +asgPrettyPrint + = lens _asgPrettyPrint + (\ s a -> s{_asgPrettyPrint = a}) + +-- | Saved ad style to retrieve. +asgSavedAdStyleId :: Lens' AccountsSavedadstylesGet' Text +asgSavedAdStyleId + = lens _asgSavedAdStyleId + (\ s a -> s{_asgSavedAdStyleId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asgUserIp :: Lens' AccountsSavedadstylesGet' (Maybe Text) +asgUserIp + = lens _asgUserIp (\ s a -> s{_asgUserIp = a}) + +-- | Account for which to get the saved ad style. +asgAccountId :: Lens' AccountsSavedadstylesGet' Text +asgAccountId + = lens _asgAccountId (\ s a -> s{_asgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asgKey :: Lens' AccountsSavedadstylesGet' (Maybe Text) +asgKey = lens _asgKey (\ s a -> s{_asgKey = a}) + +-- | OAuth 2.0 token for the current user. +asgOauthToken :: Lens' AccountsSavedadstylesGet' (Maybe Text) +asgOauthToken + = lens _asgOauthToken + (\ s a -> s{_asgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asgFields :: Lens' AccountsSavedadstylesGet' (Maybe Text) +asgFields + = lens _asgFields (\ s a -> s{_asgFields = a}) + +-- | Data format for the response. +asgAlt :: Lens' AccountsSavedadstylesGet' Text +asgAlt = lens _asgAlt (\ s a -> s{_asgAlt = a}) + +instance GoogleRequest AccountsSavedadstylesGet' + where + type Rs AccountsSavedadstylesGet' = SavedAdStyle + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsSavedadstylesGet{..} + = go _asgQuotaUser _asgPrettyPrint _asgSavedAdStyleId + _asgUserIp + _asgAccountId + _asgKey + _asgOauthToken + _asgFields + _asgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsSavedadstylesGetAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/List.hs new file mode 100644 index 000000000..7646ccb64 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Savedadstyles/List.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.Savedadstyles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all saved ad styles in the specified account. +-- +-- /See:/ for @AdsenseAccountsSavedadstylesList@. +module AdSense.Accounts.Savedadstyles.List + ( + -- * REST Resource + AccountsSavedadstylesListAPI + + -- * Creating a Request + , accountsSavedadstylesList + , AccountsSavedadstylesList + + -- * Request Lenses + , aslQuotaUser + , aslPrettyPrint + , aslUserIp + , aslAccountId + , aslKey + , aslPageToken + , aslOauthToken + , aslMaxResults + , aslFields + , aslAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsSavedadstylesList@ which the +-- 'AccountsSavedadstylesList' request conforms to. +type AccountsSavedadstylesListAPI = + "accounts" :> + Capture "accountId" Text :> + "savedadstyles" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SavedAdStyles + +-- | List all saved ad styles in the specified account. +-- +-- /See:/ 'accountsSavedadstylesList' smart constructor. +data AccountsSavedadstylesList = AccountsSavedadstylesList + { _aslQuotaUser :: !(Maybe Text) + , _aslPrettyPrint :: !Bool + , _aslUserIp :: !(Maybe Text) + , _aslAccountId :: !Text + , _aslKey :: !(Maybe Text) + , _aslPageToken :: !(Maybe Text) + , _aslOauthToken :: !(Maybe Text) + , _aslMaxResults :: !(Maybe Int32) + , _aslFields :: !(Maybe Text) + , _aslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsSavedadstylesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aslQuotaUser' +-- +-- * 'aslPrettyPrint' +-- +-- * 'aslUserIp' +-- +-- * 'aslAccountId' +-- +-- * 'aslKey' +-- +-- * 'aslPageToken' +-- +-- * 'aslOauthToken' +-- +-- * 'aslMaxResults' +-- +-- * 'aslFields' +-- +-- * 'aslAlt' +accountsSavedadstylesList + :: Text -- ^ 'accountId' + -> AccountsSavedadstylesList +accountsSavedadstylesList pAslAccountId_ = + AccountsSavedadstylesList + { _aslQuotaUser = Nothing + , _aslPrettyPrint = True + , _aslUserIp = Nothing + , _aslAccountId = pAslAccountId_ + , _aslKey = Nothing + , _aslPageToken = Nothing + , _aslOauthToken = Nothing + , _aslMaxResults = Nothing + , _aslFields = Nothing + , _aslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aslQuotaUser :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslQuotaUser + = lens _aslQuotaUser (\ s a -> s{_aslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aslPrettyPrint :: Lens' AccountsSavedadstylesList' Bool +aslPrettyPrint + = lens _aslPrettyPrint + (\ s a -> s{_aslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aslUserIp :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslUserIp + = lens _aslUserIp (\ s a -> s{_aslUserIp = a}) + +-- | Account for which to list saved ad styles. +aslAccountId :: Lens' AccountsSavedadstylesList' Text +aslAccountId + = lens _aslAccountId (\ s a -> s{_aslAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aslKey :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslKey = lens _aslKey (\ s a -> s{_aslKey = a}) + +-- | A continuation token, used to page through saved ad styles. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +aslPageToken :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslPageToken + = lens _aslPageToken (\ s a -> s{_aslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aslOauthToken :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslOauthToken + = lens _aslOauthToken + (\ s a -> s{_aslOauthToken = a}) + +-- | The maximum number of saved ad styles to include in the response, used +-- for paging. +aslMaxResults :: Lens' AccountsSavedadstylesList' (Maybe Int32) +aslMaxResults + = lens _aslMaxResults + (\ s a -> s{_aslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aslFields :: Lens' AccountsSavedadstylesList' (Maybe Text) +aslFields + = lens _aslFields (\ s a -> s{_aslFields = a}) + +-- | Data format for the response. +aslAlt :: Lens' AccountsSavedadstylesList' Text +aslAlt = lens _aslAlt (\ s a -> s{_aslAlt = a}) + +instance GoogleRequest AccountsSavedadstylesList' + where + type Rs AccountsSavedadstylesList' = SavedAdStyles + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsSavedadstylesList{..} + = go _aslQuotaUser _aslPrettyPrint _aslUserIp + _aslAccountId + _aslKey + _aslPageToken + _aslOauthToken + _aslMaxResults + _aslFields + _aslAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsSavedadstylesListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/URLchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/URLchannels/List.hs new file mode 100644 index 000000000..43eb0de33 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/URLchannels/List.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Accounts.URLchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all URL channels in the specified ad client for the specified +-- account. +-- +-- /See:/ for @AdsenseAccountsURLchannelsList@. +module AdSense.Accounts.URLchannels.List + ( + -- * REST Resource + AccountsUrlchannelsListAPI + + -- * Creating a Request + , accountsURLchannelsList + , AccountsURLchannelsList + + -- * Request Lenses + , aulQuotaUser + , aulPrettyPrint + , aulUserIp + , aulAdClientId + , aulAccountId + , aulKey + , aulPageToken + , aulOauthToken + , aulMaxResults + , aulFields + , aulAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAccountsURLchannelsList@ which the +-- 'AccountsURLchannelsList' request conforms to. +type AccountsUrlchannelsListAPI = + "accounts" :> + Capture "accountId" Text :> + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] URLChannels + +-- | List all URL channels in the specified ad client for the specified +-- account. +-- +-- /See:/ 'accountsURLchannelsList' smart constructor. +data AccountsURLchannelsList = AccountsURLchannelsList + { _aulQuotaUser :: !(Maybe Text) + , _aulPrettyPrint :: !Bool + , _aulUserIp :: !(Maybe Text) + , _aulAdClientId :: !Text + , _aulAccountId :: !Text + , _aulKey :: !(Maybe Text) + , _aulPageToken :: !(Maybe Text) + , _aulOauthToken :: !(Maybe Text) + , _aulMaxResults :: !(Maybe Int32) + , _aulFields :: !(Maybe Text) + , _aulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsURLchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aulQuotaUser' +-- +-- * 'aulPrettyPrint' +-- +-- * 'aulUserIp' +-- +-- * 'aulAdClientId' +-- +-- * 'aulAccountId' +-- +-- * 'aulKey' +-- +-- * 'aulPageToken' +-- +-- * 'aulOauthToken' +-- +-- * 'aulMaxResults' +-- +-- * 'aulFields' +-- +-- * 'aulAlt' +accountsURLchannelsList + :: Text -- ^ 'adClientId' + -> Text -- ^ 'accountId' + -> AccountsURLchannelsList +accountsURLchannelsList pAulAdClientId_ pAulAccountId_ = + AccountsURLchannelsList + { _aulQuotaUser = Nothing + , _aulPrettyPrint = True + , _aulUserIp = Nothing + , _aulAdClientId = pAulAdClientId_ + , _aulAccountId = pAulAccountId_ + , _aulKey = Nothing + , _aulPageToken = Nothing + , _aulOauthToken = Nothing + , _aulMaxResults = Nothing + , _aulFields = Nothing + , _aulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aulQuotaUser :: Lens' AccountsURLchannelsList' (Maybe Text) +aulQuotaUser + = lens _aulQuotaUser (\ s a -> s{_aulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aulPrettyPrint :: Lens' AccountsURLchannelsList' Bool +aulPrettyPrint + = lens _aulPrettyPrint + (\ s a -> s{_aulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aulUserIp :: Lens' AccountsURLchannelsList' (Maybe Text) +aulUserIp + = lens _aulUserIp (\ s a -> s{_aulUserIp = a}) + +-- | Ad client for which to list URL channels. +aulAdClientId :: Lens' AccountsURLchannelsList' Text +aulAdClientId + = lens _aulAdClientId + (\ s a -> s{_aulAdClientId = a}) + +-- | Account to which the ad client belongs. +aulAccountId :: Lens' AccountsURLchannelsList' Text +aulAccountId + = lens _aulAccountId (\ s a -> s{_aulAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aulKey :: Lens' AccountsURLchannelsList' (Maybe Text) +aulKey = lens _aulKey (\ s a -> s{_aulKey = a}) + +-- | A continuation token, used to page through URL channels. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aulPageToken :: Lens' AccountsURLchannelsList' (Maybe Text) +aulPageToken + = lens _aulPageToken (\ s a -> s{_aulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aulOauthToken :: Lens' AccountsURLchannelsList' (Maybe Text) +aulOauthToken + = lens _aulOauthToken + (\ s a -> s{_aulOauthToken = a}) + +-- | The maximum number of URL channels to include in the response, used for +-- paging. +aulMaxResults :: Lens' AccountsURLchannelsList' (Maybe Int32) +aulMaxResults + = lens _aulMaxResults + (\ s a -> s{_aulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aulFields :: Lens' AccountsURLchannelsList' (Maybe Text) +aulFields + = lens _aulFields (\ s a -> s{_aulFields = a}) + +-- | Data format for the response. +aulAlt :: Lens' AccountsURLchannelsList' Text +aulAlt = lens _aulAlt (\ s a -> s{_aulAlt = a}) + +instance GoogleRequest AccountsURLchannelsList' where + type Rs AccountsURLchannelsList' = URLChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AccountsURLchannelsList{..} + = go _aulQuotaUser _aulPrettyPrint _aulUserIp + _aulAdClientId + _aulAccountId + _aulKey + _aulPageToken + _aulOauthToken + _aulMaxResults + _aulFields + _aulAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsUrlchannelsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Adclients/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adclients/List.hs new file mode 100644 index 000000000..ebd44f7a6 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adclients/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Adclients.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad clients in this AdSense account. +-- +-- /See:/ for @AdsenseAdclientsList@. +module AdSense.Adclients.List + ( + -- * REST Resource + AdclientsListAPI + + -- * Creating a Request + , adclientsList + , AdclientsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAdclientsList@ which the +-- 'AdclientsList' request conforms to. +type AdclientsListAPI = + "adclients" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdClients + +-- | List all ad clients in this AdSense account. +-- +-- /See:/ 'adclientsList' smart constructor. +data AdclientsList = AdclientsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdclientsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +adclientsList + :: AdclientsList +adclientsList = + AdclientsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AdclientsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AdclientsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AdclientsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AdclientsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | A continuation token, used to page through ad clients. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +alPageToken :: Lens' AdclientsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AdclientsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of ad clients to include in the response, used for +-- paging. +alMaxResults :: Lens' AdclientsList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AdclientsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AdclientsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AdclientsList' where + type Rs AdclientsList' = AdClients + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AdclientsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AdclientsListAPI) r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Customchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Customchannels/List.hs new file mode 100644 index 000000000..c6f85be57 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Customchannels/List.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Adunits.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all custom channels which the specified ad unit belongs to. +-- +-- /See:/ for @AdsenseAdunitsCustomchannelsList@. +module AdSense.Adunits.Customchannels.List + ( + -- * REST Resource + AdunitsCustomchannelsListAPI + + -- * Creating a Request + , adunitsCustomchannelsList + , AdunitsCustomchannelsList + + -- * Request Lenses + , aduQuotaUser + , aduPrettyPrint + , aduUserIp + , aduAdUnitId + , aduAdClientId + , aduKey + , aduPageToken + , aduOauthToken + , aduMaxResults + , aduFields + , aduAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAdunitsCustomchannelsList@ which the +-- 'AdunitsCustomchannelsList' request conforms to. +type AdunitsCustomchannelsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CustomChannels + +-- | List all custom channels which the specified ad unit belongs to. +-- +-- /See:/ 'adunitsCustomchannelsList' smart constructor. +data AdunitsCustomchannelsList = AdunitsCustomchannelsList + { _aduQuotaUser :: !(Maybe Text) + , _aduPrettyPrint :: !Bool + , _aduUserIp :: !(Maybe Text) + , _aduAdUnitId :: !Text + , _aduAdClientId :: !Text + , _aduKey :: !(Maybe Text) + , _aduPageToken :: !(Maybe Text) + , _aduOauthToken :: !(Maybe Text) + , _aduMaxResults :: !(Maybe Int32) + , _aduFields :: !(Maybe Text) + , _aduAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdunitsCustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aduQuotaUser' +-- +-- * 'aduPrettyPrint' +-- +-- * 'aduUserIp' +-- +-- * 'aduAdUnitId' +-- +-- * 'aduAdClientId' +-- +-- * 'aduKey' +-- +-- * 'aduPageToken' +-- +-- * 'aduOauthToken' +-- +-- * 'aduMaxResults' +-- +-- * 'aduFields' +-- +-- * 'aduAlt' +adunitsCustomchannelsList + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> AdunitsCustomchannelsList +adunitsCustomchannelsList pAduAdUnitId_ pAduAdClientId_ = + AdunitsCustomchannelsList + { _aduQuotaUser = Nothing + , _aduPrettyPrint = True + , _aduUserIp = Nothing + , _aduAdUnitId = pAduAdUnitId_ + , _aduAdClientId = pAduAdClientId_ + , _aduKey = Nothing + , _aduPageToken = Nothing + , _aduOauthToken = Nothing + , _aduMaxResults = Nothing + , _aduFields = Nothing + , _aduAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aduQuotaUser :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduQuotaUser + = lens _aduQuotaUser (\ s a -> s{_aduQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aduPrettyPrint :: Lens' AdunitsCustomchannelsList' Bool +aduPrettyPrint + = lens _aduPrettyPrint + (\ s a -> s{_aduPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aduUserIp :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduUserIp + = lens _aduUserIp (\ s a -> s{_aduUserIp = a}) + +-- | Ad unit for which to list custom channels. +aduAdUnitId :: Lens' AdunitsCustomchannelsList' Text +aduAdUnitId + = lens _aduAdUnitId (\ s a -> s{_aduAdUnitId = a}) + +-- | Ad client which contains the ad unit. +aduAdClientId :: Lens' AdunitsCustomchannelsList' Text +aduAdClientId + = lens _aduAdClientId + (\ s a -> s{_aduAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aduKey :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduKey = lens _aduKey (\ s a -> s{_aduKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +aduPageToken :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduPageToken + = lens _aduPageToken (\ s a -> s{_aduPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aduOauthToken :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduOauthToken + = lens _aduOauthToken + (\ s a -> s{_aduOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +aduMaxResults :: Lens' AdunitsCustomchannelsList' (Maybe Int32) +aduMaxResults + = lens _aduMaxResults + (\ s a -> s{_aduMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aduFields :: Lens' AdunitsCustomchannelsList' (Maybe Text) +aduFields + = lens _aduFields (\ s a -> s{_aduFields = a}) + +-- | Data format for the response. +aduAlt :: Lens' AdunitsCustomchannelsList' Text +aduAlt = lens _aduAlt (\ s a -> s{_aduAlt = a}) + +instance GoogleRequest AdunitsCustomchannelsList' + where + type Rs AdunitsCustomchannelsList' = CustomChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AdunitsCustomchannelsList{..} + = go _aduQuotaUser _aduPrettyPrint _aduUserIp + _aduAdUnitId + _aduAdClientId + _aduKey + _aduPageToken + _aduOauthToken + _aduMaxResults + _aduFields + _aduAlt + where go + = clientWithRoute + (Proxy :: Proxy AdunitsCustomchannelsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Get.hs new file mode 100644 index 000000000..11a714398 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Adunits.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified ad unit in the specified ad client. +-- +-- /See:/ for @AdsenseAdunitsGet@. +module AdSense.Adunits.Get + ( + -- * REST Resource + AdunitsGetAPI + + -- * Creating a Request + , adunitsGet + , AdunitsGet + + -- * Request Lenses + , aggQuotaUser + , aggPrettyPrint + , aggUserIp + , aggAdUnitId + , aggAdClientId + , aggKey + , aggOauthToken + , aggFields + , aggAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAdunitsGet@ which the +-- 'AdunitsGet' request conforms to. +type AdunitsGetAPI = + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> Get '[JSON] AdUnit + +-- | Gets the specified ad unit in the specified ad client. +-- +-- /See:/ 'adunitsGet' smart constructor. +data AdunitsGet = AdunitsGet + { _aggQuotaUser :: !(Maybe Text) + , _aggPrettyPrint :: !Bool + , _aggUserIp :: !(Maybe Text) + , _aggAdUnitId :: !Text + , _aggAdClientId :: !Text + , _aggKey :: !(Maybe Text) + , _aggOauthToken :: !(Maybe Text) + , _aggFields :: !(Maybe Text) + , _aggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdunitsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aggQuotaUser' +-- +-- * 'aggPrettyPrint' +-- +-- * 'aggUserIp' +-- +-- * 'aggAdUnitId' +-- +-- * 'aggAdClientId' +-- +-- * 'aggKey' +-- +-- * 'aggOauthToken' +-- +-- * 'aggFields' +-- +-- * 'aggAlt' +adunitsGet + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> AdunitsGet +adunitsGet pAggAdUnitId_ pAggAdClientId_ = + AdunitsGet + { _aggQuotaUser = Nothing + , _aggPrettyPrint = True + , _aggUserIp = Nothing + , _aggAdUnitId = pAggAdUnitId_ + , _aggAdClientId = pAggAdClientId_ + , _aggKey = Nothing + , _aggOauthToken = Nothing + , _aggFields = Nothing + , _aggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aggQuotaUser :: Lens' AdunitsGet' (Maybe Text) +aggQuotaUser + = lens _aggQuotaUser (\ s a -> s{_aggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aggPrettyPrint :: Lens' AdunitsGet' Bool +aggPrettyPrint + = lens _aggPrettyPrint + (\ s a -> s{_aggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aggUserIp :: Lens' AdunitsGet' (Maybe Text) +aggUserIp + = lens _aggUserIp (\ s a -> s{_aggUserIp = a}) + +-- | Ad unit to retrieve. +aggAdUnitId :: Lens' AdunitsGet' Text +aggAdUnitId + = lens _aggAdUnitId (\ s a -> s{_aggAdUnitId = a}) + +-- | Ad client for which to get the ad unit. +aggAdClientId :: Lens' AdunitsGet' Text +aggAdClientId + = lens _aggAdClientId + (\ s a -> s{_aggAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aggKey :: Lens' AdunitsGet' (Maybe Text) +aggKey = lens _aggKey (\ s a -> s{_aggKey = a}) + +-- | OAuth 2.0 token for the current user. +aggOauthToken :: Lens' AdunitsGet' (Maybe Text) +aggOauthToken + = lens _aggOauthToken + (\ s a -> s{_aggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aggFields :: Lens' AdunitsGet' (Maybe Text) +aggFields + = lens _aggFields (\ s a -> s{_aggFields = a}) + +-- | Data format for the response. +aggAlt :: Lens' AdunitsGet' Text +aggAlt = lens _aggAlt (\ s a -> s{_aggAlt = a}) + +instance GoogleRequest AdunitsGet' where + type Rs AdunitsGet' = AdUnit + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AdunitsGet{..} + = go _aggQuotaUser _aggPrettyPrint _aggUserIp + _aggAdUnitId + _aggAdClientId + _aggKey + _aggOauthToken + _aggFields + _aggAlt + where go + = clientWithRoute (Proxy :: Proxy AdunitsGetAPI) r u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/GetAdCode.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/GetAdCode.hs new file mode 100644 index 000000000..203b89d28 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/GetAdCode.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Adunits.GetAdCode +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get ad code for the specified ad unit. +-- +-- /See:/ for @AdsenseAdunitsGetAdCode@. +module AdSense.Adunits.GetAdCode + ( + -- * REST Resource + AdunitsGetAdCodeAPI + + -- * Creating a Request + , adunitsGetAdCode + , AdunitsGetAdCode + + -- * Request Lenses + , agacQuotaUser + , agacPrettyPrint + , agacUserIp + , agacAdUnitId + , agacAdClientId + , agacKey + , agacOauthToken + , agacFields + , agacAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAdunitsGetAdCode@ which the +-- 'AdunitsGetAdCode' request conforms to. +type AdunitsGetAdCodeAPI = + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + Capture "adUnitId" Text :> + "adcode" :> Get '[JSON] AdCode + +-- | Get ad code for the specified ad unit. +-- +-- /See:/ 'adunitsGetAdCode' smart constructor. +data AdunitsGetAdCode = AdunitsGetAdCode + { _agacQuotaUser :: !(Maybe Text) + , _agacPrettyPrint :: !Bool + , _agacUserIp :: !(Maybe Text) + , _agacAdUnitId :: !Text + , _agacAdClientId :: !Text + , _agacKey :: !(Maybe Text) + , _agacOauthToken :: !(Maybe Text) + , _agacFields :: !(Maybe Text) + , _agacAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdunitsGetAdCode'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agacQuotaUser' +-- +-- * 'agacPrettyPrint' +-- +-- * 'agacUserIp' +-- +-- * 'agacAdUnitId' +-- +-- * 'agacAdClientId' +-- +-- * 'agacKey' +-- +-- * 'agacOauthToken' +-- +-- * 'agacFields' +-- +-- * 'agacAlt' +adunitsGetAdCode + :: Text -- ^ 'adUnitId' + -> Text -- ^ 'adClientId' + -> AdunitsGetAdCode +adunitsGetAdCode pAgacAdUnitId_ pAgacAdClientId_ = + AdunitsGetAdCode + { _agacQuotaUser = Nothing + , _agacPrettyPrint = True + , _agacUserIp = Nothing + , _agacAdUnitId = pAgacAdUnitId_ + , _agacAdClientId = pAgacAdClientId_ + , _agacKey = Nothing + , _agacOauthToken = Nothing + , _agacFields = Nothing + , _agacAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agacQuotaUser :: Lens' AdunitsGetAdCode' (Maybe Text) +agacQuotaUser + = lens _agacQuotaUser + (\ s a -> s{_agacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agacPrettyPrint :: Lens' AdunitsGetAdCode' Bool +agacPrettyPrint + = lens _agacPrettyPrint + (\ s a -> s{_agacPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agacUserIp :: Lens' AdunitsGetAdCode' (Maybe Text) +agacUserIp + = lens _agacUserIp (\ s a -> s{_agacUserIp = a}) + +-- | Ad unit to get the code for. +agacAdUnitId :: Lens' AdunitsGetAdCode' Text +agacAdUnitId + = lens _agacAdUnitId (\ s a -> s{_agacAdUnitId = a}) + +-- | Ad client with contains the ad unit. +agacAdClientId :: Lens' AdunitsGetAdCode' Text +agacAdClientId + = lens _agacAdClientId + (\ s a -> s{_agacAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agacKey :: Lens' AdunitsGetAdCode' (Maybe Text) +agacKey = lens _agacKey (\ s a -> s{_agacKey = a}) + +-- | OAuth 2.0 token for the current user. +agacOauthToken :: Lens' AdunitsGetAdCode' (Maybe Text) +agacOauthToken + = lens _agacOauthToken + (\ s a -> s{_agacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agacFields :: Lens' AdunitsGetAdCode' (Maybe Text) +agacFields + = lens _agacFields (\ s a -> s{_agacFields = a}) + +-- | Data format for the response. +agacAlt :: Lens' AdunitsGetAdCode' Text +agacAlt = lens _agacAlt (\ s a -> s{_agacAlt = a}) + +instance GoogleRequest AdunitsGetAdCode' where + type Rs AdunitsGetAdCode' = AdCode + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AdunitsGetAdCode{..} + = go _agacQuotaUser _agacPrettyPrint _agacUserIp + _agacAdUnitId + _agacAdClientId + _agacKey + _agacOauthToken + _agacFields + _agacAlt + where go + = clientWithRoute + (Proxy :: Proxy AdunitsGetAdCodeAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/List.hs new file mode 100644 index 000000000..34911ee47 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Adunits/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Adunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad units in the specified ad client for this AdSense account. +-- +-- /See:/ for @AdsenseAdunitsList@. +module AdSense.Adunits.List + ( + -- * REST Resource + AdunitsListAPI + + -- * Creating a Request + , adunitsList + , AdunitsList + + -- * Request Lenses + , aaQuotaUser + , aaPrettyPrint + , aaIncludeInactive + , aaUserIp + , aaAdClientId + , aaKey + , aaPageToken + , aaOauthToken + , aaMaxResults + , aaFields + , aaAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAdunitsList@ which the +-- 'AdunitsList' request conforms to. +type AdunitsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "adunits" :> + QueryParam "includeInactive" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] AdUnits + +-- | List all ad units in the specified ad client for this AdSense account. +-- +-- /See:/ 'adunitsList' smart constructor. +data AdunitsList = AdunitsList + { _aaQuotaUser :: !(Maybe Text) + , _aaPrettyPrint :: !Bool + , _aaIncludeInactive :: !(Maybe Bool) + , _aaUserIp :: !(Maybe Text) + , _aaAdClientId :: !Text + , _aaKey :: !(Maybe Text) + , _aaPageToken :: !(Maybe Text) + , _aaOauthToken :: !(Maybe Text) + , _aaMaxResults :: !(Maybe Int32) + , _aaFields :: !(Maybe Text) + , _aaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaQuotaUser' +-- +-- * 'aaPrettyPrint' +-- +-- * 'aaIncludeInactive' +-- +-- * 'aaUserIp' +-- +-- * 'aaAdClientId' +-- +-- * 'aaKey' +-- +-- * 'aaPageToken' +-- +-- * 'aaOauthToken' +-- +-- * 'aaMaxResults' +-- +-- * 'aaFields' +-- +-- * 'aaAlt' +adunitsList + :: Text -- ^ 'adClientId' + -> AdunitsList +adunitsList pAaAdClientId_ = + AdunitsList + { _aaQuotaUser = Nothing + , _aaPrettyPrint = True + , _aaIncludeInactive = Nothing + , _aaUserIp = Nothing + , _aaAdClientId = pAaAdClientId_ + , _aaKey = Nothing + , _aaPageToken = Nothing + , _aaOauthToken = Nothing + , _aaMaxResults = Nothing + , _aaFields = Nothing + , _aaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaQuotaUser :: Lens' AdunitsList' (Maybe Text) +aaQuotaUser + = lens _aaQuotaUser (\ s a -> s{_aaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaPrettyPrint :: Lens' AdunitsList' Bool +aaPrettyPrint + = lens _aaPrettyPrint + (\ s a -> s{_aaPrettyPrint = a}) + +-- | Whether to include inactive ad units. Default: true. +aaIncludeInactive :: Lens' AdunitsList' (Maybe Bool) +aaIncludeInactive + = lens _aaIncludeInactive + (\ s a -> s{_aaIncludeInactive = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaUserIp :: Lens' AdunitsList' (Maybe Text) +aaUserIp = lens _aaUserIp (\ s a -> s{_aaUserIp = a}) + +-- | Ad client for which to list ad units. +aaAdClientId :: Lens' AdunitsList' Text +aaAdClientId + = lens _aaAdClientId (\ s a -> s{_aaAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaKey :: Lens' AdunitsList' (Maybe Text) +aaKey = lens _aaKey (\ s a -> s{_aaKey = a}) + +-- | A continuation token, used to page through ad units. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +aaPageToken :: Lens' AdunitsList' (Maybe Text) +aaPageToken + = lens _aaPageToken (\ s a -> s{_aaPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aaOauthToken :: Lens' AdunitsList' (Maybe Text) +aaOauthToken + = lens _aaOauthToken (\ s a -> s{_aaOauthToken = a}) + +-- | The maximum number of ad units to include in the response, used for +-- paging. +aaMaxResults :: Lens' AdunitsList' (Maybe Int32) +aaMaxResults + = lens _aaMaxResults (\ s a -> s{_aaMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aaFields :: Lens' AdunitsList' (Maybe Text) +aaFields = lens _aaFields (\ s a -> s{_aaFields = a}) + +-- | Data format for the response. +aaAlt :: Lens' AdunitsList' Text +aaAlt = lens _aaAlt (\ s a -> s{_aaAlt = a}) + +instance GoogleRequest AdunitsList' where + type Rs AdunitsList' = AdUnits + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AdunitsList{..} + = go _aaQuotaUser _aaPrettyPrint _aaIncludeInactive + _aaUserIp + _aaAdClientId + _aaKey + _aaPageToken + _aaOauthToken + _aaMaxResults + _aaFields + _aaAlt + where go + = clientWithRoute (Proxy :: Proxy AdunitsListAPI) r u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/Delete.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/Delete.hs new file mode 100644 index 000000000..7ef6bad28 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/Delete.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Alerts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Dismiss (delete) the specified alert from the publisher\'s AdSense +-- account. +-- +-- /See:/ for @AdsenseAlertsDelete@. +module AdSense.Alerts.Delete + ( + -- * REST Resource + AlertsDeleteAPI + + -- * Creating a Request + , alertsDelete + , AlertsDelete + + -- * Request Lenses + , adQuotaUser + , adPrettyPrint + , adUserIp + , adAlertId + , adKey + , adOauthToken + , adFields + , adAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAlertsDelete@ which the +-- 'AlertsDelete' request conforms to. +type AlertsDeleteAPI = + "alerts" :> + Capture "alertId" Text :> Delete '[JSON] () + +-- | Dismiss (delete) the specified alert from the publisher\'s AdSense +-- account. +-- +-- /See:/ 'alertsDelete' smart constructor. +data AlertsDelete = AlertsDelete + { _adQuotaUser :: !(Maybe Text) + , _adPrettyPrint :: !Bool + , _adUserIp :: !(Maybe Text) + , _adAlertId :: !Text + , _adKey :: !(Maybe Text) + , _adOauthToken :: !(Maybe Text) + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AlertsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adPrettyPrint' +-- +-- * 'adUserIp' +-- +-- * 'adAlertId' +-- +-- * 'adKey' +-- +-- * 'adOauthToken' +-- +-- * 'adFields' +-- +-- * 'adAlt' +alertsDelete + :: Text -- ^ 'alertId' + -> AlertsDelete +alertsDelete pAdAlertId_ = + AlertsDelete + { _adQuotaUser = Nothing + , _adPrettyPrint = True + , _adUserIp = Nothing + , _adAlertId = pAdAlertId_ + , _adKey = Nothing + , _adOauthToken = Nothing + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' AlertsDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' AlertsDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' AlertsDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | Alert to delete. +adAlertId :: Lens' AlertsDelete' Text +adAlertId + = lens _adAlertId (\ s a -> s{_adAlertId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' AlertsDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' AlertsDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' AlertsDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' AlertsDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest AlertsDelete' where + type Rs AlertsDelete' = () + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AlertsDelete{..} + = go _adQuotaUser _adPrettyPrint _adUserIp _adAlertId + _adKey + _adOauthToken + _adFields + _adAlt + where go + = clientWithRoute (Proxy :: Proxy AlertsDeleteAPI) r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/List.hs new file mode 100644 index 000000000..0c382ec04 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Alerts/List.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Alerts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the alerts for this AdSense account. +-- +-- /See:/ for @AdsenseAlertsList@. +module AdSense.Alerts.List + ( + -- * REST Resource + AlertsListAPI + + -- * Creating a Request + , alertsList + , AlertsList + + -- * Request Lenses + , aleQuotaUser + , alePrettyPrint + , aleUserIp + , aleLocale + , aleKey + , aleOauthToken + , aleFields + , aleAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseAlertsList@ which the +-- 'AlertsList' request conforms to. +type AlertsListAPI = + "alerts" :> + QueryParam "locale" Text :> Get '[JSON] Alerts + +-- | List the alerts for this AdSense account. +-- +-- /See:/ 'alertsList' smart constructor. +data AlertsList = AlertsList + { _aleQuotaUser :: !(Maybe Text) + , _alePrettyPrint :: !Bool + , _aleUserIp :: !(Maybe Text) + , _aleLocale :: !(Maybe Text) + , _aleKey :: !(Maybe Text) + , _aleOauthToken :: !(Maybe Text) + , _aleFields :: !(Maybe Text) + , _aleAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AlertsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aleQuotaUser' +-- +-- * 'alePrettyPrint' +-- +-- * 'aleUserIp' +-- +-- * 'aleLocale' +-- +-- * 'aleKey' +-- +-- * 'aleOauthToken' +-- +-- * 'aleFields' +-- +-- * 'aleAlt' +alertsList + :: AlertsList +alertsList = + AlertsList + { _aleQuotaUser = Nothing + , _alePrettyPrint = True + , _aleUserIp = Nothing + , _aleLocale = Nothing + , _aleKey = Nothing + , _aleOauthToken = Nothing + , _aleFields = Nothing + , _aleAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aleQuotaUser :: Lens' AlertsList' (Maybe Text) +aleQuotaUser + = lens _aleQuotaUser (\ s a -> s{_aleQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alePrettyPrint :: Lens' AlertsList' Bool +alePrettyPrint + = lens _alePrettyPrint + (\ s a -> s{_alePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aleUserIp :: Lens' AlertsList' (Maybe Text) +aleUserIp + = lens _aleUserIp (\ s a -> s{_aleUserIp = a}) + +-- | The locale to use for translating alert messages. The account locale +-- will be used if this is not supplied. The AdSense default (English) will +-- be used if the supplied locale is invalid or unsupported. +aleLocale :: Lens' AlertsList' (Maybe Text) +aleLocale + = lens _aleLocale (\ s a -> s{_aleLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aleKey :: Lens' AlertsList' (Maybe Text) +aleKey = lens _aleKey (\ s a -> s{_aleKey = a}) + +-- | OAuth 2.0 token for the current user. +aleOauthToken :: Lens' AlertsList' (Maybe Text) +aleOauthToken + = lens _aleOauthToken + (\ s a -> s{_aleOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aleFields :: Lens' AlertsList' (Maybe Text) +aleFields + = lens _aleFields (\ s a -> s{_aleFields = a}) + +-- | Data format for the response. +aleAlt :: Lens' AlertsList' Text +aleAlt = lens _aleAlt (\ s a -> s{_aleAlt = a}) + +instance GoogleRequest AlertsList' where + type Rs AlertsList' = Alerts + request = requestWithRoute defReq adSenseURL + requestWithRoute r u AlertsList{..} + = go _aleQuotaUser _alePrettyPrint _aleUserIp + _aleLocale + _aleKey + _aleOauthToken + _aleFields + _aleAlt + where go + = clientWithRoute (Proxy :: Proxy AlertsListAPI) r u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Adunits/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Adunits/List.hs new file mode 100644 index 000000000..02f24fd74 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Adunits/List.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Customchannels.Adunits.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all ad units in the specified custom channel. +-- +-- /See:/ for @AdsenseCustomchannelsAdunitsList@. +module AdSense.Customchannels.Adunits.List + ( + -- * REST Resource + CustomchannelsAdunitsListAPI + + -- * Creating a Request + , customchannelsAdunitsList + , CustomchannelsAdunitsList + + -- * Request Lenses + , calQuotaUser + , calPrettyPrint + , calIncludeInactive + , calCustomChannelId + , calUserIp + , calAdClientId + , calKey + , calPageToken + , calOauthToken + , calMaxResults + , calFields + , calAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseCustomchannelsAdunitsList@ which the +-- 'CustomchannelsAdunitsList' request conforms to. +type CustomchannelsAdunitsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + "adunits" :> + QueryParam "includeInactive" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] AdUnits + +-- | List all ad units in the specified custom channel. +-- +-- /See:/ 'customchannelsAdunitsList' smart constructor. +data CustomchannelsAdunitsList = CustomchannelsAdunitsList + { _calQuotaUser :: !(Maybe Text) + , _calPrettyPrint :: !Bool + , _calIncludeInactive :: !(Maybe Bool) + , _calCustomChannelId :: !Text + , _calUserIp :: !(Maybe Text) + , _calAdClientId :: !Text + , _calKey :: !(Maybe Text) + , _calPageToken :: !(Maybe Text) + , _calOauthToken :: !(Maybe Text) + , _calMaxResults :: !(Maybe Int32) + , _calFields :: !(Maybe Text) + , _calAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsAdunitsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'calQuotaUser' +-- +-- * 'calPrettyPrint' +-- +-- * 'calIncludeInactive' +-- +-- * 'calCustomChannelId' +-- +-- * 'calUserIp' +-- +-- * 'calAdClientId' +-- +-- * 'calKey' +-- +-- * 'calPageToken' +-- +-- * 'calOauthToken' +-- +-- * 'calMaxResults' +-- +-- * 'calFields' +-- +-- * 'calAlt' +customchannelsAdunitsList + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> CustomchannelsAdunitsList +customchannelsAdunitsList pCalCustomChannelId_ pCalAdClientId_ = + CustomchannelsAdunitsList + { _calQuotaUser = Nothing + , _calPrettyPrint = True + , _calIncludeInactive = Nothing + , _calCustomChannelId = pCalCustomChannelId_ + , _calUserIp = Nothing + , _calAdClientId = pCalAdClientId_ + , _calKey = Nothing + , _calPageToken = Nothing + , _calOauthToken = Nothing + , _calMaxResults = Nothing + , _calFields = Nothing + , _calAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +calQuotaUser :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calQuotaUser + = lens _calQuotaUser (\ s a -> s{_calQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +calPrettyPrint :: Lens' CustomchannelsAdunitsList' Bool +calPrettyPrint + = lens _calPrettyPrint + (\ s a -> s{_calPrettyPrint = a}) + +-- | Whether to include inactive ad units. Default: true. +calIncludeInactive :: Lens' CustomchannelsAdunitsList' (Maybe Bool) +calIncludeInactive + = lens _calIncludeInactive + (\ s a -> s{_calIncludeInactive = a}) + +-- | Custom channel for which to list ad units. +calCustomChannelId :: Lens' CustomchannelsAdunitsList' Text +calCustomChannelId + = lens _calCustomChannelId + (\ s a -> s{_calCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +calUserIp :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calUserIp + = lens _calUserIp (\ s a -> s{_calUserIp = a}) + +-- | Ad client which contains the custom channel. +calAdClientId :: Lens' CustomchannelsAdunitsList' Text +calAdClientId + = lens _calAdClientId + (\ s a -> s{_calAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +calKey :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calKey = lens _calKey (\ s a -> s{_calKey = a}) + +-- | A continuation token, used to page through ad units. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +calPageToken :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calPageToken + = lens _calPageToken (\ s a -> s{_calPageToken = a}) + +-- | OAuth 2.0 token for the current user. +calOauthToken :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calOauthToken + = lens _calOauthToken + (\ s a -> s{_calOauthToken = a}) + +-- | The maximum number of ad units to include in the response, used for +-- paging. +calMaxResults :: Lens' CustomchannelsAdunitsList' (Maybe Int32) +calMaxResults + = lens _calMaxResults + (\ s a -> s{_calMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +calFields :: Lens' CustomchannelsAdunitsList' (Maybe Text) +calFields + = lens _calFields (\ s a -> s{_calFields = a}) + +-- | Data format for the response. +calAlt :: Lens' CustomchannelsAdunitsList' Text +calAlt = lens _calAlt (\ s a -> s{_calAlt = a}) + +instance GoogleRequest CustomchannelsAdunitsList' + where + type Rs CustomchannelsAdunitsList' = AdUnits + request = requestWithRoute defReq adSenseURL + requestWithRoute r u CustomchannelsAdunitsList{..} + = go _calQuotaUser _calPrettyPrint + _calIncludeInactive + _calCustomChannelId + _calUserIp + _calAdClientId + _calKey + _calPageToken + _calOauthToken + _calMaxResults + _calFields + _calAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsAdunitsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Get.hs new file mode 100644 index 000000000..1f4e71609 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Customchannels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the specified custom channel from the specified ad client. +-- +-- /See:/ for @AdsenseCustomchannelsGet@. +module AdSense.Customchannels.Get + ( + -- * REST Resource + CustomchannelsGetAPI + + -- * Creating a Request + , customchannelsGet + , CustomchannelsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgCustomChannelId + , cgUserIp + , cgAdClientId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseCustomchannelsGet@ which the +-- 'CustomchannelsGet' request conforms to. +type CustomchannelsGetAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + Capture "customChannelId" Text :> + Get '[JSON] CustomChannel + +-- | Get the specified custom channel from the specified ad client. +-- +-- /See:/ 'customchannelsGet' smart constructor. +data CustomchannelsGet = CustomchannelsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgCustomChannelId :: !Text + , _cgUserIp :: !(Maybe Text) + , _cgAdClientId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgCustomChannelId' +-- +-- * 'cgUserIp' +-- +-- * 'cgAdClientId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +customchannelsGet + :: Text -- ^ 'customChannelId' + -> Text -- ^ 'adClientId' + -> CustomchannelsGet +customchannelsGet pCgCustomChannelId_ pCgAdClientId_ = + CustomchannelsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgCustomChannelId = pCgCustomChannelId_ + , _cgUserIp = Nothing + , _cgAdClientId = pCgAdClientId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CustomchannelsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CustomchannelsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | Custom channel to retrieve. +cgCustomChannelId :: Lens' CustomchannelsGet' Text +cgCustomChannelId + = lens _cgCustomChannelId + (\ s a -> s{_cgCustomChannelId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CustomchannelsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | Ad client which contains the custom channel. +cgAdClientId :: Lens' CustomchannelsGet' Text +cgAdClientId + = lens _cgAdClientId (\ s a -> s{_cgAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CustomchannelsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CustomchannelsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CustomchannelsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CustomchannelsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CustomchannelsGet' where + type Rs CustomchannelsGet' = CustomChannel + request = requestWithRoute defReq adSenseURL + requestWithRoute r u CustomchannelsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgCustomChannelId + _cgUserIp + _cgAdClientId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsGetAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/List.hs new file mode 100644 index 000000000..d929b66af --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Customchannels/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Customchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all custom channels in the specified ad client for this AdSense +-- account. +-- +-- /See:/ for @AdsenseCustomchannelsList@. +module AdSense.Customchannels.List + ( + -- * REST Resource + CustomchannelsListAPI + + -- * Creating a Request + , customchannelsList + , CustomchannelsList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clAdClientId + , clKey + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseCustomchannelsList@ which the +-- 'CustomchannelsList' request conforms to. +type CustomchannelsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "customchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CustomChannels + +-- | List all custom channels in the specified ad client for this AdSense +-- account. +-- +-- /See:/ 'customchannelsList' smart constructor. +data CustomchannelsList = CustomchannelsList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clAdClientId :: !Text + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !(Maybe Int32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clAdClientId' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +customchannelsList + :: Text -- ^ 'adClientId' + -> CustomchannelsList +customchannelsList pClAdClientId_ = + CustomchannelsList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clAdClientId = pClAdClientId_ + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CustomchannelsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CustomchannelsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CustomchannelsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Ad client for which to list custom channels. +clAdClientId :: Lens' CustomchannelsList' Text +clAdClientId + = lens _clAdClientId (\ s a -> s{_clAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CustomchannelsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | A continuation token, used to page through custom channels. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +clPageToken :: Lens' CustomchannelsList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CustomchannelsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | The maximum number of custom channels to include in the response, used +-- for paging. +clMaxResults :: Lens' CustomchannelsList' (Maybe Int32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CustomchannelsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CustomchannelsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CustomchannelsList' where + type Rs CustomchannelsList' = CustomChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u CustomchannelsList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp + _clAdClientId + _clKey + _clPageToken + _clOauthToken + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomchannelsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Dimensions/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Dimensions/List.hs new file mode 100644 index 000000000..438c7c9d8 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Dimensions/List.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Metadata.Dimensions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the metadata for the dimensions available to this AdSense account. +-- +-- /See:/ for @AdsenseMetadataDimensionsList@. +module AdSense.Metadata.Dimensions.List + ( + -- * REST Resource + MetadataDimensionsListAPI + + -- * Creating a Request + , metadataDimensionsList + , MetadataDimensionsList + + -- * Request Lenses + , mdlQuotaUser + , mdlPrettyPrint + , mdlUserIp + , mdlKey + , mdlOauthToken + , mdlFields + , mdlAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseMetadataDimensionsList@ which the +-- 'MetadataDimensionsList' request conforms to. +type MetadataDimensionsListAPI = + "metadata" :> "dimensions" :> Get '[JSON] Metadata + +-- | List the metadata for the dimensions available to this AdSense account. +-- +-- /See:/ 'metadataDimensionsList' smart constructor. +data MetadataDimensionsList = MetadataDimensionsList + { _mdlQuotaUser :: !(Maybe Text) + , _mdlPrettyPrint :: !Bool + , _mdlUserIp :: !(Maybe Text) + , _mdlKey :: !(Maybe Text) + , _mdlOauthToken :: !(Maybe Text) + , _mdlFields :: !(Maybe Text) + , _mdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetadataDimensionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdlQuotaUser' +-- +-- * 'mdlPrettyPrint' +-- +-- * 'mdlUserIp' +-- +-- * 'mdlKey' +-- +-- * 'mdlOauthToken' +-- +-- * 'mdlFields' +-- +-- * 'mdlAlt' +metadataDimensionsList + :: MetadataDimensionsList +metadataDimensionsList = + MetadataDimensionsList + { _mdlQuotaUser = Nothing + , _mdlPrettyPrint = True + , _mdlUserIp = Nothing + , _mdlKey = Nothing + , _mdlOauthToken = Nothing + , _mdlFields = Nothing + , _mdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mdlQuotaUser :: Lens' MetadataDimensionsList' (Maybe Text) +mdlQuotaUser + = lens _mdlQuotaUser (\ s a -> s{_mdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mdlPrettyPrint :: Lens' MetadataDimensionsList' Bool +mdlPrettyPrint + = lens _mdlPrettyPrint + (\ s a -> s{_mdlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mdlUserIp :: Lens' MetadataDimensionsList' (Maybe Text) +mdlUserIp + = lens _mdlUserIp (\ s a -> s{_mdlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mdlKey :: Lens' MetadataDimensionsList' (Maybe Text) +mdlKey = lens _mdlKey (\ s a -> s{_mdlKey = a}) + +-- | OAuth 2.0 token for the current user. +mdlOauthToken :: Lens' MetadataDimensionsList' (Maybe Text) +mdlOauthToken + = lens _mdlOauthToken + (\ s a -> s{_mdlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mdlFields :: Lens' MetadataDimensionsList' (Maybe Text) +mdlFields + = lens _mdlFields (\ s a -> s{_mdlFields = a}) + +-- | Data format for the response. +mdlAlt :: Lens' MetadataDimensionsList' Text +mdlAlt = lens _mdlAlt (\ s a -> s{_mdlAlt = a}) + +instance GoogleRequest MetadataDimensionsList' where + type Rs MetadataDimensionsList' = Metadata + request = requestWithRoute defReq adSenseURL + requestWithRoute r u MetadataDimensionsList{..} + = go _mdlQuotaUser _mdlPrettyPrint _mdlUserIp _mdlKey + _mdlOauthToken + _mdlFields + _mdlAlt + where go + = clientWithRoute + (Proxy :: Proxy MetadataDimensionsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Metrics/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Metrics/List.hs new file mode 100644 index 000000000..fbd3f2292 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Metadata/Metrics/List.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Metadata.Metrics.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the metadata for the metrics available to this AdSense account. +-- +-- /See:/ for @AdsenseMetadataMetricsList@. +module AdSense.Metadata.Metrics.List + ( + -- * REST Resource + MetadataMetricsListAPI + + -- * Creating a Request + , metadataMetricsList + , MetadataMetricsList + + -- * Request Lenses + , mmlQuotaUser + , mmlPrettyPrint + , mmlUserIp + , mmlKey + , mmlOauthToken + , mmlFields + , mmlAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseMetadataMetricsList@ which the +-- 'MetadataMetricsList' request conforms to. +type MetadataMetricsListAPI = + "metadata" :> "metrics" :> Get '[JSON] Metadata + +-- | List the metadata for the metrics available to this AdSense account. +-- +-- /See:/ 'metadataMetricsList' smart constructor. +data MetadataMetricsList = MetadataMetricsList + { _mmlQuotaUser :: !(Maybe Text) + , _mmlPrettyPrint :: !Bool + , _mmlUserIp :: !(Maybe Text) + , _mmlKey :: !(Maybe Text) + , _mmlOauthToken :: !(Maybe Text) + , _mmlFields :: !(Maybe Text) + , _mmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetadataMetricsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mmlQuotaUser' +-- +-- * 'mmlPrettyPrint' +-- +-- * 'mmlUserIp' +-- +-- * 'mmlKey' +-- +-- * 'mmlOauthToken' +-- +-- * 'mmlFields' +-- +-- * 'mmlAlt' +metadataMetricsList + :: MetadataMetricsList +metadataMetricsList = + MetadataMetricsList + { _mmlQuotaUser = Nothing + , _mmlPrettyPrint = True + , _mmlUserIp = Nothing + , _mmlKey = Nothing + , _mmlOauthToken = Nothing + , _mmlFields = Nothing + , _mmlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mmlQuotaUser :: Lens' MetadataMetricsList' (Maybe Text) +mmlQuotaUser + = lens _mmlQuotaUser (\ s a -> s{_mmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mmlPrettyPrint :: Lens' MetadataMetricsList' Bool +mmlPrettyPrint + = lens _mmlPrettyPrint + (\ s a -> s{_mmlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mmlUserIp :: Lens' MetadataMetricsList' (Maybe Text) +mmlUserIp + = lens _mmlUserIp (\ s a -> s{_mmlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mmlKey :: Lens' MetadataMetricsList' (Maybe Text) +mmlKey = lens _mmlKey (\ s a -> s{_mmlKey = a}) + +-- | OAuth 2.0 token for the current user. +mmlOauthToken :: Lens' MetadataMetricsList' (Maybe Text) +mmlOauthToken + = lens _mmlOauthToken + (\ s a -> s{_mmlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mmlFields :: Lens' MetadataMetricsList' (Maybe Text) +mmlFields + = lens _mmlFields (\ s a -> s{_mmlFields = a}) + +-- | Data format for the response. +mmlAlt :: Lens' MetadataMetricsList' Text +mmlAlt = lens _mmlAlt (\ s a -> s{_mmlAlt = a}) + +instance GoogleRequest MetadataMetricsList' where + type Rs MetadataMetricsList' = Metadata + request = requestWithRoute defReq adSenseURL + requestWithRoute r u MetadataMetricsList{..} + = go _mmlQuotaUser _mmlPrettyPrint _mmlUserIp _mmlKey + _mmlOauthToken + _mmlFields + _mmlAlt + where go + = clientWithRoute + (Proxy :: Proxy MetadataMetricsListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Payments/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Payments/List.hs new file mode 100644 index 000000000..c89a3f2e2 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Payments/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Payments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the payments for this AdSense account. +-- +-- /See:/ for @AdsensePaymentsList@. +module AdSense.Payments.List + ( + -- * REST Resource + PaymentsListAPI + + -- * Creating a Request + , paymentsList + , PaymentsList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plKey + , plOauthToken + , plFields + , plAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsensePaymentsList@ which the +-- 'PaymentsList' request conforms to. +type PaymentsListAPI = + "payments" :> Get '[JSON] Payments + +-- | List the payments for this AdSense account. +-- +-- /See:/ 'paymentsList' smart constructor. +data PaymentsList = PaymentsList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PaymentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plKey' +-- +-- * 'plOauthToken' +-- +-- * 'plFields' +-- +-- * 'plAlt' +paymentsList + :: PaymentsList +paymentsList = + PaymentsList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plKey = Nothing + , _plOauthToken = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PaymentsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PaymentsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PaymentsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PaymentsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PaymentsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PaymentsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PaymentsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PaymentsList' where + type Rs PaymentsList' = Payments + request = requestWithRoute defReq adSenseURL + requestWithRoute r u PaymentsList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp _plKey + _plOauthToken + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PaymentsListAPI) r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Generate.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Generate.hs new file mode 100644 index 000000000..a66746e8e --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Generate.hs @@ -0,0 +1,296 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ for @AdsenseReportsGenerate@. +module AdSense.Reports.Generate + ( + -- * REST Resource + ReportsGenerateAPI + + -- * Creating a Request + , reportsGenerate + , ReportsGenerate + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgDimension + , rgLocale + , rgEndDate + , rgStartDate + , rgAccountId + , rgMetric + , rgKey + , rgCurrency + , rgSort + , rgFilter + , rgOauthToken + , rgStartIndex + , rgUseTimezoneReporting + , rgMaxResults + , rgFields + , rgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseReportsGenerate@ which the +-- 'ReportsGenerate' request conforms to. +type ReportsGenerateAPI = + "reports" :> + QueryParams "dimension" Text :> + QueryParam "locale" Text :> + QueryParam "endDate" Text :> + QueryParam "startDate" Text :> + QueryParams "accountId" Text :> + QueryParams "metric" Text :> + QueryParam "currency" Text :> + QueryParams "sort" Text :> + QueryParams "filter" Text :> + QueryParam "startIndex" Int32 :> + QueryParam "useTimezoneReporting" Bool :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdsenseReportsGenerateResponse + +-- | Generate an AdSense report based on the report request sent in the query +-- parameters. Returns the result as JSON; to retrieve output in CSV format +-- specify \"alt=csv\" as a query parameter. +-- +-- /See:/ 'reportsGenerate' smart constructor. +data ReportsGenerate = ReportsGenerate + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgDimension :: !(Maybe Text) + , _rgLocale :: !(Maybe Text) + , _rgEndDate :: !Text + , _rgStartDate :: !Text + , _rgAccountId :: !(Maybe Text) + , _rgMetric :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgCurrency :: !(Maybe Text) + , _rgSort :: !(Maybe Text) + , _rgFilter :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgStartIndex :: !(Maybe Int32) + , _rgUseTimezoneReporting :: !(Maybe Bool) + , _rgMaxResults :: !(Maybe Int32) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgDimension' +-- +-- * 'rgLocale' +-- +-- * 'rgEndDate' +-- +-- * 'rgStartDate' +-- +-- * 'rgAccountId' +-- +-- * 'rgMetric' +-- +-- * 'rgKey' +-- +-- * 'rgCurrency' +-- +-- * 'rgSort' +-- +-- * 'rgFilter' +-- +-- * 'rgOauthToken' +-- +-- * 'rgStartIndex' +-- +-- * 'rgUseTimezoneReporting' +-- +-- * 'rgMaxResults' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +reportsGenerate + :: Text -- ^ 'endDate' + -> Text -- ^ 'startDate' + -> ReportsGenerate +reportsGenerate pRgEndDate_ pRgStartDate_ = + ReportsGenerate + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgDimension = Nothing + , _rgLocale = Nothing + , _rgEndDate = pRgEndDate_ + , _rgStartDate = pRgStartDate_ + , _rgAccountId = Nothing + , _rgMetric = Nothing + , _rgKey = Nothing + , _rgCurrency = Nothing + , _rgSort = Nothing + , _rgFilter = Nothing + , _rgOauthToken = Nothing + , _rgStartIndex = Nothing + , _rgUseTimezoneReporting = Nothing + , _rgMaxResults = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReportsGenerate' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReportsGenerate' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReportsGenerate' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | Dimensions to base the report on. +rgDimension :: Lens' ReportsGenerate' (Maybe Text) +rgDimension + = lens _rgDimension (\ s a -> s{_rgDimension = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +rgLocale :: Lens' ReportsGenerate' (Maybe Text) +rgLocale = lens _rgLocale (\ s a -> s{_rgLocale = a}) + +-- | End of the date range to report on in \"YYYY-MM-DD\" format, inclusive. +rgEndDate :: Lens' ReportsGenerate' Text +rgEndDate + = lens _rgEndDate (\ s a -> s{_rgEndDate = a}) + +-- | Start of the date range to report on in \"YYYY-MM-DD\" format, +-- inclusive. +rgStartDate :: Lens' ReportsGenerate' Text +rgStartDate + = lens _rgStartDate (\ s a -> s{_rgStartDate = a}) + +-- | Accounts upon which to report. +rgAccountId :: Lens' ReportsGenerate' (Maybe Text) +rgAccountId + = lens _rgAccountId (\ s a -> s{_rgAccountId = a}) + +-- | Numeric columns to include in the report. +rgMetric :: Lens' ReportsGenerate' (Maybe Text) +rgMetric = lens _rgMetric (\ s a -> s{_rgMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReportsGenerate' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | Optional currency to use when reporting on monetary metrics. Defaults to +-- the account\'s currency if not set. +rgCurrency :: Lens' ReportsGenerate' (Maybe Text) +rgCurrency + = lens _rgCurrency (\ s a -> s{_rgCurrency = a}) + +-- | The name of a dimension or metric to sort the resulting report on, +-- optionally prefixed with \"+\" to sort ascending or \"-\" to sort +-- descending. If no prefix is specified, the column is sorted ascending. +rgSort :: Lens' ReportsGenerate' (Maybe Text) +rgSort = lens _rgSort (\ s a -> s{_rgSort = a}) + +-- | Filters to be run on the report. +rgFilter :: Lens' ReportsGenerate' (Maybe Text) +rgFilter = lens _rgFilter (\ s a -> s{_rgFilter = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReportsGenerate' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Index of the first row of report data to return. +rgStartIndex :: Lens' ReportsGenerate' (Maybe Int32) +rgStartIndex + = lens _rgStartIndex (\ s a -> s{_rgStartIndex = a}) + +-- | Whether the report should be generated in the AdSense account\'s local +-- timezone. If false default PST\/PDT timezone will be used. +rgUseTimezoneReporting :: Lens' ReportsGenerate' (Maybe Bool) +rgUseTimezoneReporting + = lens _rgUseTimezoneReporting + (\ s a -> s{_rgUseTimezoneReporting = a}) + +-- | The maximum number of rows of report data to return. +rgMaxResults :: Lens' ReportsGenerate' (Maybe Int32) +rgMaxResults + = lens _rgMaxResults (\ s a -> s{_rgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReportsGenerate' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReportsGenerate' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReportsGenerate' where + type Rs ReportsGenerate' = + AdsenseReportsGenerateResponse + request = requestWithRoute defReq adSenseURL + requestWithRoute r u ReportsGenerate{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgDimension + _rgLocale + (Just _rgEndDate) + (Just _rgStartDate) + _rgAccountId + _rgMetric + _rgKey + _rgCurrency + _rgSort + _rgFilter + _rgOauthToken + _rgStartIndex + _rgUseTimezoneReporting + _rgMaxResults + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGenerateAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/Generate.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/Generate.hs new file mode 100644 index 000000000..463f650cc --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/Generate.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Reports.Saved.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generate an AdSense report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ for @AdsenseReportsSavedGenerate@. +module AdSense.Reports.Saved.Generate + ( + -- * REST Resource + ReportsSavedGenerateAPI + + -- * Creating a Request + , reportsSavedGenerate + , ReportsSavedGenerate + + -- * Request Lenses + , rsgQuotaUser + , rsgPrettyPrint + , rsgUserIp + , rsgLocale + , rsgSavedReportId + , rsgKey + , rsgOauthToken + , rsgStartIndex + , rsgMaxResults + , rsgFields + , rsgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseReportsSavedGenerate@ which the +-- 'ReportsSavedGenerate' request conforms to. +type ReportsSavedGenerateAPI = + "reports" :> + Capture "savedReportId" Text :> + QueryParam "locale" Text :> + QueryParam "startIndex" Int32 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdsenseReportsGenerateResponse + +-- | Generate an AdSense report based on the saved report ID sent in the +-- query parameters. +-- +-- /See:/ 'reportsSavedGenerate' smart constructor. +data ReportsSavedGenerate = ReportsSavedGenerate + { _rsgQuotaUser :: !(Maybe Text) + , _rsgPrettyPrint :: !Bool + , _rsgUserIp :: !(Maybe Text) + , _rsgLocale :: !(Maybe Text) + , _rsgSavedReportId :: !Text + , _rsgKey :: !(Maybe Text) + , _rsgOauthToken :: !(Maybe Text) + , _rsgStartIndex :: !(Maybe Int32) + , _rsgMaxResults :: !(Maybe Int32) + , _rsgFields :: !(Maybe Text) + , _rsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsSavedGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsgQuotaUser' +-- +-- * 'rsgPrettyPrint' +-- +-- * 'rsgUserIp' +-- +-- * 'rsgLocale' +-- +-- * 'rsgSavedReportId' +-- +-- * 'rsgKey' +-- +-- * 'rsgOauthToken' +-- +-- * 'rsgStartIndex' +-- +-- * 'rsgMaxResults' +-- +-- * 'rsgFields' +-- +-- * 'rsgAlt' +reportsSavedGenerate + :: Text -- ^ 'savedReportId' + -> ReportsSavedGenerate +reportsSavedGenerate pRsgSavedReportId_ = + ReportsSavedGenerate + { _rsgQuotaUser = Nothing + , _rsgPrettyPrint = True + , _rsgUserIp = Nothing + , _rsgLocale = Nothing + , _rsgSavedReportId = pRsgSavedReportId_ + , _rsgKey = Nothing + , _rsgOauthToken = Nothing + , _rsgStartIndex = Nothing + , _rsgMaxResults = Nothing + , _rsgFields = Nothing + , _rsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rsgQuotaUser :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgQuotaUser + = lens _rsgQuotaUser (\ s a -> s{_rsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rsgPrettyPrint :: Lens' ReportsSavedGenerate' Bool +rsgPrettyPrint + = lens _rsgPrettyPrint + (\ s a -> s{_rsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rsgUserIp :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgUserIp + = lens _rsgUserIp (\ s a -> s{_rsgUserIp = a}) + +-- | Optional locale to use for translating report output to a local +-- language. Defaults to \"en_US\" if not specified. +rsgLocale :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgLocale + = lens _rsgLocale (\ s a -> s{_rsgLocale = a}) + +-- | The saved report to retrieve. +rsgSavedReportId :: Lens' ReportsSavedGenerate' Text +rsgSavedReportId + = lens _rsgSavedReportId + (\ s a -> s{_rsgSavedReportId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rsgKey :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgKey = lens _rsgKey (\ s a -> s{_rsgKey = a}) + +-- | OAuth 2.0 token for the current user. +rsgOauthToken :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgOauthToken + = lens _rsgOauthToken + (\ s a -> s{_rsgOauthToken = a}) + +-- | Index of the first row of report data to return. +rsgStartIndex :: Lens' ReportsSavedGenerate' (Maybe Int32) +rsgStartIndex + = lens _rsgStartIndex + (\ s a -> s{_rsgStartIndex = a}) + +-- | The maximum number of rows of report data to return. +rsgMaxResults :: Lens' ReportsSavedGenerate' (Maybe Int32) +rsgMaxResults + = lens _rsgMaxResults + (\ s a -> s{_rsgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rsgFields :: Lens' ReportsSavedGenerate' (Maybe Text) +rsgFields + = lens _rsgFields (\ s a -> s{_rsgFields = a}) + +-- | Data format for the response. +rsgAlt :: Lens' ReportsSavedGenerate' Text +rsgAlt = lens _rsgAlt (\ s a -> s{_rsgAlt = a}) + +instance GoogleRequest ReportsSavedGenerate' where + type Rs ReportsSavedGenerate' = + AdsenseReportsGenerateResponse + request = requestWithRoute defReq adSenseURL + requestWithRoute r u ReportsSavedGenerate{..} + = go _rsgQuotaUser _rsgPrettyPrint _rsgUserIp + _rsgLocale + _rsgSavedReportId + _rsgKey + _rsgOauthToken + _rsgStartIndex + _rsgMaxResults + _rsgFields + _rsgAlt + where go + = clientWithRoute + (Proxy :: Proxy ReportsSavedGenerateAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/List.hs new file mode 100644 index 000000000..26ca53ed2 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Reports/Saved/List.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Reports.Saved.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all saved reports in this AdSense account. +-- +-- /See:/ for @AdsenseReportsSavedList@. +module AdSense.Reports.Saved.List + ( + -- * REST Resource + ReportsSavedListAPI + + -- * Creating a Request + , reportsSavedList + , ReportsSavedList + + -- * Request Lenses + , rslQuotaUser + , rslPrettyPrint + , rslUserIp + , rslKey + , rslPageToken + , rslOauthToken + , rslMaxResults + , rslFields + , rslAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseReportsSavedList@ which the +-- 'ReportsSavedList' request conforms to. +type ReportsSavedListAPI = + "reports" :> + "saved" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SavedReports + +-- | List all saved reports in this AdSense account. +-- +-- /See:/ 'reportsSavedList' smart constructor. +data ReportsSavedList = ReportsSavedList + { _rslQuotaUser :: !(Maybe Text) + , _rslPrettyPrint :: !Bool + , _rslUserIp :: !(Maybe Text) + , _rslKey :: !(Maybe Text) + , _rslPageToken :: !(Maybe Text) + , _rslOauthToken :: !(Maybe Text) + , _rslMaxResults :: !(Maybe Int32) + , _rslFields :: !(Maybe Text) + , _rslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsSavedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rslQuotaUser' +-- +-- * 'rslPrettyPrint' +-- +-- * 'rslUserIp' +-- +-- * 'rslKey' +-- +-- * 'rslPageToken' +-- +-- * 'rslOauthToken' +-- +-- * 'rslMaxResults' +-- +-- * 'rslFields' +-- +-- * 'rslAlt' +reportsSavedList + :: ReportsSavedList +reportsSavedList = + ReportsSavedList + { _rslQuotaUser = Nothing + , _rslPrettyPrint = True + , _rslUserIp = Nothing + , _rslKey = Nothing + , _rslPageToken = Nothing + , _rslOauthToken = Nothing + , _rslMaxResults = Nothing + , _rslFields = Nothing + , _rslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rslQuotaUser :: Lens' ReportsSavedList' (Maybe Text) +rslQuotaUser + = lens _rslQuotaUser (\ s a -> s{_rslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rslPrettyPrint :: Lens' ReportsSavedList' Bool +rslPrettyPrint + = lens _rslPrettyPrint + (\ s a -> s{_rslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rslUserIp :: Lens' ReportsSavedList' (Maybe Text) +rslUserIp + = lens _rslUserIp (\ s a -> s{_rslUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rslKey :: Lens' ReportsSavedList' (Maybe Text) +rslKey = lens _rslKey (\ s a -> s{_rslKey = a}) + +-- | A continuation token, used to page through saved reports. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +rslPageToken :: Lens' ReportsSavedList' (Maybe Text) +rslPageToken + = lens _rslPageToken (\ s a -> s{_rslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rslOauthToken :: Lens' ReportsSavedList' (Maybe Text) +rslOauthToken + = lens _rslOauthToken + (\ s a -> s{_rslOauthToken = a}) + +-- | The maximum number of saved reports to include in the response, used for +-- paging. +rslMaxResults :: Lens' ReportsSavedList' (Maybe Int32) +rslMaxResults + = lens _rslMaxResults + (\ s a -> s{_rslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rslFields :: Lens' ReportsSavedList' (Maybe Text) +rslFields + = lens _rslFields (\ s a -> s{_rslFields = a}) + +-- | Data format for the response. +rslAlt :: Lens' ReportsSavedList' Text +rslAlt = lens _rslAlt (\ s a -> s{_rslAlt = a}) + +instance GoogleRequest ReportsSavedList' where + type Rs ReportsSavedList' = SavedReports + request = requestWithRoute defReq adSenseURL + requestWithRoute r u ReportsSavedList{..} + = go _rslQuotaUser _rslPrettyPrint _rslUserIp _rslKey + _rslPageToken + _rslOauthToken + _rslMaxResults + _rslFields + _rslAlt + where go + = clientWithRoute + (Proxy :: Proxy ReportsSavedListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/Get.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/Get.hs new file mode 100644 index 000000000..ba08fdc07 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Savedadstyles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a specific saved ad style from the user\'s account. +-- +-- /See:/ for @AdsenseSavedadstylesGet@. +module AdSense.Savedadstyles.Get + ( + -- * REST Resource + SavedadstylesGetAPI + + -- * Creating a Request + , savedadstylesGet + , SavedadstylesGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgSavedAdStyleId + , sgUserIp + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseSavedadstylesGet@ which the +-- 'SavedadstylesGet' request conforms to. +type SavedadstylesGetAPI = + "savedadstyles" :> + Capture "savedAdStyleId" Text :> + Get '[JSON] SavedAdStyle + +-- | Get a specific saved ad style from the user\'s account. +-- +-- /See:/ 'savedadstylesGet' smart constructor. +data SavedadstylesGet = SavedadstylesGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgSavedAdStyleId :: !Text + , _sgUserIp :: !(Maybe Text) + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedadstylesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgSavedAdStyleId' +-- +-- * 'sgUserIp' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +savedadstylesGet + :: Text -- ^ 'savedAdStyleId' + -> SavedadstylesGet +savedadstylesGet pSgSavedAdStyleId_ = + SavedadstylesGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgSavedAdStyleId = pSgSavedAdStyleId_ + , _sgUserIp = Nothing + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SavedadstylesGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SavedadstylesGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | Saved ad style to retrieve. +sgSavedAdStyleId :: Lens' SavedadstylesGet' Text +sgSavedAdStyleId + = lens _sgSavedAdStyleId + (\ s a -> s{_sgSavedAdStyleId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SavedadstylesGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SavedadstylesGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SavedadstylesGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SavedadstylesGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SavedadstylesGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SavedadstylesGet' where + type Rs SavedadstylesGet' = SavedAdStyle + request = requestWithRoute defReq adSenseURL + requestWithRoute r u SavedadstylesGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgSavedAdStyleId + _sgUserIp + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute + (Proxy :: Proxy SavedadstylesGetAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/List.hs new file mode 100644 index 000000000..3dbbb1d85 --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/List.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.Savedadstyles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all saved ad styles in the user\'s account. +-- +-- /See:/ for @AdsenseSavedadstylesList@. +module AdSense.Savedadstyles.List + ( + -- * REST Resource + SavedadstylesListAPI + + -- * Creating a Request + , savedadstylesList + , SavedadstylesList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slPageToken + , slOauthToken + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseSavedadstylesList@ which the +-- 'SavedadstylesList' request conforms to. +type SavedadstylesListAPI = + "savedadstyles" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SavedAdStyles + +-- | List all saved ad styles in the user\'s account. +-- +-- /See:/ 'savedadstylesList' smart constructor. +data SavedadstylesList = SavedadstylesList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slMaxResults :: !(Maybe Int32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedadstylesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +savedadstylesList + :: SavedadstylesList +savedadstylesList = + SavedadstylesList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SavedadstylesList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SavedadstylesList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SavedadstylesList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SavedadstylesList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | A continuation token, used to page through saved ad styles. To retrieve +-- the next page, set this parameter to the value of \"nextPageToken\" from +-- the previous response. +slPageToken :: Lens' SavedadstylesList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SavedadstylesList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | The maximum number of saved ad styles to include in the response, used +-- for paging. +slMaxResults :: Lens' SavedadstylesList' (Maybe Int32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SavedadstylesList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SavedadstylesList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SavedadstylesList' where + type Rs SavedadstylesList' = SavedAdStyles + request = requestWithRoute defReq adSenseURL + requestWithRoute r u SavedadstylesList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp _slKey + _slPageToken + _slOauthToken + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute + (Proxy :: Proxy SavedadstylesListAPI) + r + u diff --git a/gogol-adsense/gen/Network/Google/Resource/AdSense/URLchannels/List.hs b/gogol-adsense/gen/Network/Google/Resource/AdSense/URLchannels/List.hs new file mode 100644 index 000000000..2154e76bf --- /dev/null +++ b/gogol-adsense/gen/Network/Google/Resource/AdSense/URLchannels/List.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AdSense.URLchannels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all URL channels in the specified ad client for this AdSense +-- account. +-- +-- /See:/ for @AdsenseURLchannelsList@. +module AdSense.URLchannels.List + ( + -- * REST Resource + UrlchannelsListAPI + + -- * Creating a Request + , uRLchannelsList + , URLchannelsList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulUserIp + , ulAdClientId + , ulKey + , ulPageToken + , ulOauthToken + , ulMaxResults + , ulFields + , ulAlt + ) where + +import Network.Google.AdSense.Types +import Network.Google.Prelude + +-- | A resource alias for @AdsenseURLchannelsList@ which the +-- 'URLchannelsList' request conforms to. +type UrlchannelsListAPI = + "adclients" :> + Capture "adClientId" Text :> + "urlchannels" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] URLChannels + +-- | List all URL channels in the specified ad client for this AdSense +-- account. +-- +-- /See:/ 'uRLchannelsList' smart constructor. +data URLchannelsList = URLchannelsList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulUserIp :: !(Maybe Text) + , _ulAdClientId :: !Text + , _ulKey :: !(Maybe Text) + , _ulPageToken :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulMaxResults :: !(Maybe Int32) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLchannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulUserIp' +-- +-- * 'ulAdClientId' +-- +-- * 'ulKey' +-- +-- * 'ulPageToken' +-- +-- * 'ulOauthToken' +-- +-- * 'ulMaxResults' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +uRLchannelsList + :: Text -- ^ 'adClientId' + -> URLchannelsList +uRLchannelsList pUlAdClientId_ = + URLchannelsList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulUserIp = Nothing + , _ulAdClientId = pUlAdClientId_ + , _ulKey = Nothing + , _ulPageToken = Nothing + , _ulOauthToken = Nothing + , _ulMaxResults = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' URLchannelsList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' URLchannelsList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' URLchannelsList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | Ad client for which to list URL channels. +ulAdClientId :: Lens' URLchannelsList' Text +ulAdClientId + = lens _ulAdClientId (\ s a -> s{_ulAdClientId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' URLchannelsList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | A continuation token, used to page through URL channels. To retrieve the +-- next page, set this parameter to the value of \"nextPageToken\" from the +-- previous response. +ulPageToken :: Lens' URLchannelsList' (Maybe Text) +ulPageToken + = lens _ulPageToken (\ s a -> s{_ulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' URLchannelsList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | The maximum number of URL channels to include in the response, used for +-- paging. +ulMaxResults :: Lens' URLchannelsList' (Maybe Int32) +ulMaxResults + = lens _ulMaxResults (\ s a -> s{_ulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' URLchannelsList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' URLchannelsList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest URLchannelsList' where + type Rs URLchannelsList' = URLChannels + request = requestWithRoute defReq adSenseURL + requestWithRoute r u URLchannelsList{..} + = go _ulQuotaUser _ulPrettyPrint _ulUserIp + _ulAdClientId + _ulKey + _ulPageToken + _ulOauthToken + _ulMaxResults + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UrlchannelsListAPI) + r + u diff --git a/gogol-adsense/gogol-adsense.cabal b/gogol-adsense/gogol-adsense.cabal new file mode 100644 index 000000000..3ad0ea357 --- /dev/null +++ b/gogol-adsense/gogol-adsense.cabal @@ -0,0 +1,81 @@ +name: gogol-adsense +version: 0.0.1 +synopsis: AdSense Management API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Gives AdSense publishers access to their inventory and the ability to + generate reports + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AdSense + , Network.Google.AdSense.Types + , Network.Google.Resource.AdSense.Accounts.Adclients.List + , Network.Google.Resource.AdSense.Accounts.Adunits.Customchannels.List + , Network.Google.Resource.AdSense.Accounts.Adunits.Get + , Network.Google.Resource.AdSense.Accounts.Adunits.GetAdCode + , Network.Google.Resource.AdSense.Accounts.Adunits.List + , Network.Google.Resource.AdSense.Accounts.Alerts.Delete + , Network.Google.Resource.AdSense.Accounts.Alerts.List + , Network.Google.Resource.AdSense.Accounts.Customchannels.Adunits.List + , Network.Google.Resource.AdSense.Accounts.Customchannels.Get + , Network.Google.Resource.AdSense.Accounts.Customchannels.List + , Network.Google.Resource.AdSense.Accounts.Get + , Network.Google.Resource.AdSense.Accounts.List + , Network.Google.Resource.AdSense.Accounts.Payments.List + , Network.Google.Resource.AdSense.Accounts.Reports.Generate + , Network.Google.Resource.AdSense.Accounts.Reports.Saved.Generate + , Network.Google.Resource.AdSense.Accounts.Reports.Saved.List + , Network.Google.Resource.AdSense.Accounts.Savedadstyles.Get + , Network.Google.Resource.AdSense.Accounts.Savedadstyles.List + , Network.Google.Resource.AdSense.Accounts.URLchannels.List + , Network.Google.Resource.AdSense.Adclients.List + , Network.Google.Resource.AdSense.Adunits.Customchannels.List + , Network.Google.Resource.AdSense.Adunits.Get + , Network.Google.Resource.AdSense.Adunits.GetAdCode + , Network.Google.Resource.AdSense.Adunits.List + , Network.Google.Resource.AdSense.Alerts.Delete + , Network.Google.Resource.AdSense.Alerts.List + , Network.Google.Resource.AdSense.Customchannels.Adunits.List + , Network.Google.Resource.AdSense.Customchannels.Get + , Network.Google.Resource.AdSense.Customchannels.List + , Network.Google.Resource.AdSense.Metadata.Dimensions.List + , Network.Google.Resource.AdSense.Metadata.Metrics.List + , Network.Google.Resource.AdSense.Payments.List + , Network.Google.Resource.AdSense.Reports.Generate + , Network.Google.Resource.AdSense.Reports.Saved.Generate + , Network.Google.Resource.AdSense.Reports.Saved.List + , Network.Google.Resource.AdSense.Savedadstyles.Get + , Network.Google.Resource.AdSense.Savedadstyles.List + , Network.Google.Resource.AdSense.URLchannels.List + + other-modules: + Network.Google.AdSense.Types.Product + , Network.Google.AdSense.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-adsense/src/.gitkeep b/gogol-adsense/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-affiliates/LICENSE b/gogol-affiliates/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-affiliates/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-affiliates/Makefile b/gogol-affiliates/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-affiliates/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-affiliates/README.md b/gogol-affiliates/README.md new file mode 100644 index 000000000..6ae2fde4f --- /dev/null +++ b/gogol-affiliates/README.md @@ -0,0 +1,28 @@ +# gogol-affiliates + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Affiliate Network API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-affiliates` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-affiliates/Setup.hs b/gogol-affiliates/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-affiliates/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-affiliates/gen/Network/Google/Affiliates.hs b/gogol-affiliates/gen/Network/Google/Affiliates.hs new file mode 100644 index 000000000..1d6f5469b --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Affiliates.hs @@ -0,0 +1,291 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Affiliates +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you have programmatic access to your Google Affiliate Network data. +-- +-- /See:/ +module Network.Google.Affiliates + ( + -- * API + AffiliatesAPI + , affiliatesAPI + , affiliatesURL + + -- * Service Methods + + -- * REST Resources + + -- ** GanAdvertisersGet + , module Gan.Advertisers.Get + + -- ** GanAdvertisersList + , module Gan.Advertisers.List + + -- ** GanCcOffersList + , module Gan.CcOffers.List + + -- ** GanEventsList + , module Gan.Events.List + + -- ** GanLinksGet + , module Gan.Links.Get + + -- ** GanLinksInsert + , module Gan.Links.Insert + + -- ** GanLinksList + , module Gan.Links.List + + -- ** GanPublishersGet + , module Gan.Publishers.Get + + -- ** GanPublishersList + , module Gan.Publishers.List + + -- ** GanReportsGet + , module Gan.Reports.Get + + -- * Types + + -- ** Event + , Event + , event + , eModifyDate + , eStatus + , eCommissionableSales + , eChargeId + , eAdvertiserName + , eChargeType + , eMemberId + , eKind + , eNetworkFee + , eAdvertiserId + , eEventDate + , eProducts + , ePublisherFee + , eType + , eOrderId + , ePublisherId + , eEarnings + , ePublisherName + + -- ** Link + , Link + , link + , lAuthorship + , lDestinationUrl + , lClickTrackingUrl + , lCreateDate + , lKind + , lAdvertiserId + , lEndDate + , lImageAltText + , lPromotionType + , lAvailability + , lStartDate + , lName + , lImpressionTrackingUrl + , lSpecialOffers + , lEpcSevenDayAverage + , lId + , lEpcNinetyDayAverage + , lLinkType + , lIsActive + , lDuration + , lDescription + + -- ** Money + , Money + , money + , mAmount + , mCurrencyCode + + -- ** CcOffers + , CcOffers + , ccOffers + , coKind + , coItems + + -- ** Advertisers + , Advertisers + , advertisers + , aNextPageToken + , aKind + , aItems + + -- ** Report + , Report + , report + , rEndDate + , rTotalsRows + , rKind + , rStartDate + , rRows + , rMatchingRowCount + , rColumnNames + , rType + + -- ** Events + , Events + , events + , eveNextPageToken + , eveKind + , eveItems + + -- ** Publishers + , Publishers + , publishers + , pNextPageToken + , pKind + , pItems + + -- ** Advertiser + , Advertiser + , advertiser + , advAllowPublisherCreatedLinks + , advContactPhone + , advContactEmail + , advStatus + , advLogoUrl + , advKind + , advCategory + , advSiteUrl + , advPayoutRank + , advJoinDate + , advDefaultLinkId + , advRedirectDomains + , advName + , advProductFeedsEnabled + , advMerchantCenterIds + , advEpcSevenDayAverage + , advItem + , advId + , advEpcNinetyDayAverage + , advCommissionDuration + , advDescription + + -- ** CcOffer + , CcOffer + , ccOffer + , cMinimumFinanceCharge + , cTrackingUrl + , cProhibitedCategories + , cBalanceComputationMethod + , cInitialSetupAndProcessingFee + , cReturnedPaymentFee + , cAgeMinimumDetails + , cVariableRatesUpdateFrequency + , cCreditLimitMin + , cTravelInsurance + , cApprovedCategories + , cAnnualFeeDisplay + , cOverLimitFee + , cMaxPurchaseRate + , cAgeMinimum + , cVariableRatesLastUpdated + , cIntroCashAdvanceTerms + , cIssuerWebsite + , cLuggageInsurance + , cKind + , cRewardsHaveBlackoutDates + , cDisclaimer + , cAdditionalCardHolderFee + , cExistingCustomerOnly + , cEmergencyInsurance + , cNetwork + , cCashAdvanceTerms + , cStatementCopyFee + , cAprDisplay + , cOffersImmediateCashReward + , cRewards + , cCardType + , cImageUrl + , cCreditLimitMax + , cLandingPageUrl + , cAnnualFee + , cRewardsExpire + , cFirstYearAnnualFee + , cCarRentalInsurance + , cPurchaseRateAdditionalDetails + , cOfferId + , cGracePeriodDisplay + , cIntroPurchaseTerms + , cCreditRatingDisplay + , cBalanceTransferTerms + , cLatePaymentFee + , cCardBenefits + , cIssuer + , cCardName + , cMinPurchaseRate + , cFraudLiability + , cForeignCurrencyTransactionFee + , cExtendedWarranty + , cAnnualRewardMaximum + , cIssuerId + , cIntroBalanceTransferTerms + , cDefaultFees + , cAdditionalCardBenefits + , cRewardUnit + , cBonusRewards + , cFlightAccidentInsurance + , cRewardPartner + , cPurchaseRateType + + -- ** Links + , Links + , links + , linNextPageToken + , linKind + , linItems + + -- ** Publisher + , Publisher + , publisher + , pubStatus + , pubKind + , pubPayoutRank + , pubJoinDate + , pubClassification + , pubName + , pubEpcSevenDayAverage + , pubItem + , pubId + , pubEpcNinetyDayAverage + , pubSites + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude +import Network.Google.Resource.Gan.Advertisers.Get +import Network.Google.Resource.Gan.Advertisers.List +import Network.Google.Resource.Gan.CcOffers.List +import Network.Google.Resource.Gan.Events.List +import Network.Google.Resource.Gan.Links.Get +import Network.Google.Resource.Gan.Links.Insert +import Network.Google.Resource.Gan.Links.List +import Network.Google.Resource.Gan.Publishers.Get +import Network.Google.Resource.Gan.Publishers.List +import Network.Google.Resource.Gan.Reports.Get + +{- $resources +TODO +-} + +type AffiliatesAPI = + Reports :<|> CcOffers :<|> Advertisers :<|> Events + :<|> Publishers + :<|> Links + +affiliatesAPI :: Proxy AffiliatesAPI +affiliatesAPI = Proxy diff --git a/gogol-affiliates/gen/Network/Google/Affiliates/Types.hs b/gogol-affiliates/gen/Network/Google/Affiliates/Types.hs new file mode 100644 index 000000000..85e3f4499 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Affiliates/Types.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Affiliates.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Affiliates.Types + ( + -- * Service URL + affiliatesURL + + -- * Event + , Event + , event + , eModifyDate + , eStatus + , eCommissionableSales + , eChargeId + , eAdvertiserName + , eChargeType + , eMemberId + , eKind + , eNetworkFee + , eAdvertiserId + , eEventDate + , eProducts + , ePublisherFee + , eType + , eOrderId + , ePublisherId + , eEarnings + , ePublisherName + + -- * Link + , Link + , link + , lAuthorship + , lDestinationUrl + , lClickTrackingUrl + , lCreateDate + , lKind + , lAdvertiserId + , lEndDate + , lImageAltText + , lPromotionType + , lAvailability + , lStartDate + , lName + , lImpressionTrackingUrl + , lSpecialOffers + , lEpcSevenDayAverage + , lId + , lEpcNinetyDayAverage + , lLinkType + , lIsActive + , lDuration + , lDescription + + -- * Money + , Money + , money + , mAmount + , mCurrencyCode + + -- * CcOffers + , CcOffers + , ccOffers + , coKind + , coItems + + -- * Advertisers + , Advertisers + , advertisers + , aNextPageToken + , aKind + , aItems + + -- * Report + , Report + , report + , rEndDate + , rTotalsRows + , rKind + , rStartDate + , rRows + , rMatchingRowCount + , rColumnNames + , rType + + -- * Events + , Events + , events + , eveNextPageToken + , eveKind + , eveItems + + -- * Publishers + , Publishers + , publishers + , pNextPageToken + , pKind + , pItems + + -- * Advertiser + , Advertiser + , advertiser + , advAllowPublisherCreatedLinks + , advContactPhone + , advContactEmail + , advStatus + , advLogoUrl + , advKind + , advCategory + , advSiteUrl + , advPayoutRank + , advJoinDate + , advDefaultLinkId + , advRedirectDomains + , advName + , advProductFeedsEnabled + , advMerchantCenterIds + , advEpcSevenDayAverage + , advItem + , advId + , advEpcNinetyDayAverage + , advCommissionDuration + , advDescription + + -- * CcOffer + , CcOffer + , ccOffer + , cMinimumFinanceCharge + , cTrackingUrl + , cProhibitedCategories + , cBalanceComputationMethod + , cInitialSetupAndProcessingFee + , cReturnedPaymentFee + , cAgeMinimumDetails + , cVariableRatesUpdateFrequency + , cCreditLimitMin + , cTravelInsurance + , cApprovedCategories + , cAnnualFeeDisplay + , cOverLimitFee + , cMaxPurchaseRate + , cAgeMinimum + , cVariableRatesLastUpdated + , cIntroCashAdvanceTerms + , cIssuerWebsite + , cLuggageInsurance + , cKind + , cRewardsHaveBlackoutDates + , cDisclaimer + , cAdditionalCardHolderFee + , cExistingCustomerOnly + , cEmergencyInsurance + , cNetwork + , cCashAdvanceTerms + , cStatementCopyFee + , cAprDisplay + , cOffersImmediateCashReward + , cRewards + , cCardType + , cImageUrl + , cCreditLimitMax + , cLandingPageUrl + , cAnnualFee + , cRewardsExpire + , cFirstYearAnnualFee + , cCarRentalInsurance + , cPurchaseRateAdditionalDetails + , cOfferId + , cGracePeriodDisplay + , cIntroPurchaseTerms + , cCreditRatingDisplay + , cBalanceTransferTerms + , cLatePaymentFee + , cCardBenefits + , cIssuer + , cCardName + , cMinPurchaseRate + , cFraudLiability + , cForeignCurrencyTransactionFee + , cExtendedWarranty + , cAnnualRewardMaximum + , cIssuerId + , cIntroBalanceTransferTerms + , cDefaultFees + , cAdditionalCardBenefits + , cRewardUnit + , cBonusRewards + , cFlightAccidentInsurance + , cRewardPartner + , cPurchaseRateType + + -- * Links + , Links + , links + , linNextPageToken + , linKind + , linItems + + -- * Publisher + , Publisher + , publisher + , pubStatus + , pubKind + , pubPayoutRank + , pubJoinDate + , pubClassification + , pubName + , pubEpcSevenDayAverage + , pubItem + , pubId + , pubEpcNinetyDayAverage + , pubSites + ) where + +import Network.Google.Affiliates.Types.Product +import Network.Google.Affiliates.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta1' of the Google Affiliate Network API. +affiliatesURL :: BaseURL +affiliatesURL + = BaseUrl Https + "https://www.googleapis.com/gan/v1beta1/" + 443 diff --git a/gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs b/gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs new file mode 100644 index 000000000..d4502482e --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs @@ -0,0 +1,2241 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Affiliates.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Affiliates.Types.Product where + +import Network.Google.Affiliates.Types.Sum +import Network.Google.Prelude + +-- | An EventResource. +-- +-- /See:/ 'event' smart constructor. +data Event = Event + { _eModifyDate :: !(Maybe UTCTime) + , _eStatus :: !(Maybe Text) + , _eCommissionableSales :: !(Maybe (Maybe Money)) + , _eChargeId :: !(Maybe Text) + , _eAdvertiserName :: !(Maybe Text) + , _eChargeType :: !(Maybe Text) + , _eMemberId :: !(Maybe Text) + , _eKind :: !Text + , _eNetworkFee :: !(Maybe (Maybe Money)) + , _eAdvertiserId :: !(Maybe Int64) + , _eEventDate :: !(Maybe UTCTime) + , _eProducts :: !(Maybe [EventProductsItem]) + , _ePublisherFee :: !(Maybe (Maybe Money)) + , _eType :: !(Maybe Text) + , _eOrderId :: !(Maybe Text) + , _ePublisherId :: !(Maybe Int64) + , _eEarnings :: !(Maybe (Maybe Money)) + , _ePublisherName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Event' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eModifyDate' +-- +-- * 'eStatus' +-- +-- * 'eCommissionableSales' +-- +-- * 'eChargeId' +-- +-- * 'eAdvertiserName' +-- +-- * 'eChargeType' +-- +-- * 'eMemberId' +-- +-- * 'eKind' +-- +-- * 'eNetworkFee' +-- +-- * 'eAdvertiserId' +-- +-- * 'eEventDate' +-- +-- * 'eProducts' +-- +-- * 'ePublisherFee' +-- +-- * 'eType' +-- +-- * 'eOrderId' +-- +-- * 'ePublisherId' +-- +-- * 'eEarnings' +-- +-- * 'ePublisherName' +event + :: Event +event = + Event + { _eModifyDate = Nothing + , _eStatus = Nothing + , _eCommissionableSales = Nothing + , _eChargeId = Nothing + , _eAdvertiserName = Nothing + , _eChargeType = Nothing + , _eMemberId = Nothing + , _eKind = "gan#event" + , _eNetworkFee = Nothing + , _eAdvertiserId = Nothing + , _eEventDate = Nothing + , _eProducts = Nothing + , _ePublisherFee = Nothing + , _eType = Nothing + , _eOrderId = Nothing + , _ePublisherId = Nothing + , _eEarnings = Nothing + , _ePublisherName = Nothing + } + +-- | The date-time this event was last modified as a RFC 3339 date-time +-- value. +eModifyDate :: Lens' Event (Maybe UTCTime) +eModifyDate + = lens _eModifyDate (\ s a -> s{_eModifyDate = a}) + +-- | Status of the event (active|canceled). Only returned for charge and +-- conversion events. +eStatus :: Lens' Event (Maybe Text) +eStatus = lens _eStatus (\ s a -> s{_eStatus = a}) + +-- | Amount of money exchanged during the transaction. Only returned for +-- charge and conversion events. +eCommissionableSales :: Lens' Event (Maybe (Maybe Money)) +eCommissionableSales + = lens _eCommissionableSales + (\ s a -> s{_eCommissionableSales = a}) + +-- | The charge ID for this event. Only returned for charge events. +eChargeId :: Lens' Event (Maybe Text) +eChargeId + = lens _eChargeId (\ s a -> s{_eChargeId = a}) + +-- | The name of the advertiser for this event. +eAdvertiserName :: Lens' Event (Maybe Text) +eAdvertiserName + = lens _eAdvertiserName + (\ s a -> s{_eAdvertiserName = a}) + +-- | Charge type of the event +-- (other|slotting_fee|monthly_minimum|tier_bonus|debit|credit). Only +-- returned for charge events. +eChargeType :: Lens' Event (Maybe Text) +eChargeType + = lens _eChargeType (\ s a -> s{_eChargeType = a}) + +-- | The ID of the member attached to this event. Only returned for +-- conversion events. +eMemberId :: Lens' Event (Maybe Text) +eMemberId + = lens _eMemberId (\ s a -> s{_eMemberId = a}) + +-- | The kind for one event. +eKind :: Lens' Event Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | Fee that the advertiser paid to the Google Affiliate Network. +eNetworkFee :: Lens' Event (Maybe (Maybe Money)) +eNetworkFee + = lens _eNetworkFee (\ s a -> s{_eNetworkFee = a}) + +-- | The ID of advertiser for this event. +eAdvertiserId :: Lens' Event (Maybe Int64) +eAdvertiserId + = lens _eAdvertiserId + (\ s a -> s{_eAdvertiserId = a}) + +-- | The date-time this event was initiated as a RFC 3339 date-time value. +eEventDate :: Lens' Event (Maybe UTCTime) +eEventDate + = lens _eEventDate (\ s a -> s{_eEventDate = a}) + +-- | Products associated with the event. +eProducts :: Lens' Event [EventProductsItem] +eProducts + = lens _eProducts (\ s a -> s{_eProducts = a}) . + _Default + . _Coerce + +-- | Fee that the advertiser paid to the publisher. +ePublisherFee :: Lens' Event (Maybe (Maybe Money)) +ePublisherFee + = lens _ePublisherFee + (\ s a -> s{_ePublisherFee = a}) + +-- | Type of the event (action|transaction|charge). +eType :: Lens' Event (Maybe Text) +eType = lens _eType (\ s a -> s{_eType = a}) + +-- | The order ID for this event. Only returned for conversion events. +eOrderId :: Lens' Event (Maybe Text) +eOrderId = lens _eOrderId (\ s a -> s{_eOrderId = a}) + +-- | The ID of the publisher for this event. +ePublisherId :: Lens' Event (Maybe Int64) +ePublisherId + = lens _ePublisherId (\ s a -> s{_ePublisherId = a}) + +-- | Earnings by the publisher. +eEarnings :: Lens' Event (Maybe (Maybe Money)) +eEarnings + = lens _eEarnings (\ s a -> s{_eEarnings = a}) + +-- | The name of the publisher for this event. +ePublisherName :: Lens' Event (Maybe Text) +ePublisherName + = lens _ePublisherName + (\ s a -> s{_ePublisherName = a}) + +instance FromJSON Event where + parseJSON + = withObject "Event" + (\ o -> + Event <$> + (o .:? "modifyDate") <*> (o .:? "status") <*> + (o .:? "commissionableSales") + <*> (o .:? "chargeId") + <*> (o .:? "advertiserName") + <*> (o .:? "chargeType") + <*> (o .:? "memberId") + <*> (o .:? "kind" .!= "gan#event") + <*> (o .:? "networkFee") + <*> (o .:? "advertiserId") + <*> (o .:? "eventDate") + <*> (o .:? "products" .!= mempty) + <*> (o .:? "publisherFee") + <*> (o .:? "type") + <*> (o .:? "orderId") + <*> (o .:? "publisherId") + <*> (o .:? "earnings") + <*> (o .:? "publisherName")) + +instance ToJSON Event where + toJSON Event{..} + = object + (catMaybes + [("modifyDate" .=) <$> _eModifyDate, + ("status" .=) <$> _eStatus, + ("commissionableSales" .=) <$> _eCommissionableSales, + ("chargeId" .=) <$> _eChargeId, + ("advertiserName" .=) <$> _eAdvertiserName, + ("chargeType" .=) <$> _eChargeType, + ("memberId" .=) <$> _eMemberId, + Just ("kind" .= _eKind), + ("networkFee" .=) <$> _eNetworkFee, + ("advertiserId" .=) <$> _eAdvertiserId, + ("eventDate" .=) <$> _eEventDate, + ("products" .=) <$> _eProducts, + ("publisherFee" .=) <$> _ePublisherFee, + ("type" .=) <$> _eType, ("orderId" .=) <$> _eOrderId, + ("publisherId" .=) <$> _ePublisherId, + ("earnings" .=) <$> _eEarnings, + ("publisherName" .=) <$> _ePublisherName]) + +-- | A LinkResource. +-- +-- /See:/ 'link' smart constructor. +data Link = Link + { _lAuthorship :: !(Maybe Text) + , _lDestinationUrl :: !(Maybe Text) + , _lClickTrackingUrl :: !(Maybe Text) + , _lCreateDate :: !(Maybe UTCTime) + , _lKind :: !Text + , _lAdvertiserId :: !(Maybe Int64) + , _lEndDate :: !(Maybe UTCTime) + , _lImageAltText :: !(Maybe Text) + , _lPromotionType :: !(Maybe Text) + , _lAvailability :: !(Maybe Text) + , _lStartDate :: !(Maybe UTCTime) + , _lName :: !(Maybe Text) + , _lImpressionTrackingUrl :: !(Maybe Text) + , _lSpecialOffers :: !(Maybe LinkSpecialOffers) + , _lEpcSevenDayAverage :: !(Maybe (Maybe Money)) + , _lId :: !(Maybe Int64) + , _lEpcNinetyDayAverage :: !(Maybe (Maybe Money)) + , _lLinkType :: !(Maybe Text) + , _lIsActive :: !(Maybe Bool) + , _lDuration :: !(Maybe Text) + , _lDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Link' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lAuthorship' +-- +-- * 'lDestinationUrl' +-- +-- * 'lClickTrackingUrl' +-- +-- * 'lCreateDate' +-- +-- * 'lKind' +-- +-- * 'lAdvertiserId' +-- +-- * 'lEndDate' +-- +-- * 'lImageAltText' +-- +-- * 'lPromotionType' +-- +-- * 'lAvailability' +-- +-- * 'lStartDate' +-- +-- * 'lName' +-- +-- * 'lImpressionTrackingUrl' +-- +-- * 'lSpecialOffers' +-- +-- * 'lEpcSevenDayAverage' +-- +-- * 'lId' +-- +-- * 'lEpcNinetyDayAverage' +-- +-- * 'lLinkType' +-- +-- * 'lIsActive' +-- +-- * 'lDuration' +-- +-- * 'lDescription' +link + :: Link +link = + Link + { _lAuthorship = Nothing + , _lDestinationUrl = Nothing + , _lClickTrackingUrl = Nothing + , _lCreateDate = Nothing + , _lKind = "gan#link" + , _lAdvertiserId = Nothing + , _lEndDate = Nothing + , _lImageAltText = Nothing + , _lPromotionType = Nothing + , _lAvailability = Nothing + , _lStartDate = Nothing + , _lName = Nothing + , _lImpressionTrackingUrl = Nothing + , _lSpecialOffers = Nothing + , _lEpcSevenDayAverage = Nothing + , _lId = Nothing + , _lEpcNinetyDayAverage = Nothing + , _lLinkType = Nothing + , _lIsActive = Nothing + , _lDuration = Nothing + , _lDescription = Nothing + } + +-- | Authorship +lAuthorship :: Lens' Link (Maybe Text) +lAuthorship + = lens _lAuthorship (\ s a -> s{_lAuthorship = a}) + +-- | The destination URL for the link. +lDestinationUrl :: Lens' Link (Maybe Text) +lDestinationUrl + = lens _lDestinationUrl + (\ s a -> s{_lDestinationUrl = a}) + +-- | Tracking url for clicks. +lClickTrackingUrl :: Lens' Link (Maybe Text) +lClickTrackingUrl + = lens _lClickTrackingUrl + (\ s a -> s{_lClickTrackingUrl = a}) + +-- | Date that this link was created. +lCreateDate :: Lens' Link (Maybe UTCTime) +lCreateDate + = lens _lCreateDate (\ s a -> s{_lCreateDate = a}) + +-- | The kind for one entity. +lKind :: Lens' Link Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | The advertiser id for the advertiser who owns this link. +lAdvertiserId :: Lens' Link (Maybe Int64) +lAdvertiserId + = lens _lAdvertiserId + (\ s a -> s{_lAdvertiserId = a}) + +-- | Date that this link becomes inactive. +lEndDate :: Lens' Link (Maybe UTCTime) +lEndDate = lens _lEndDate (\ s a -> s{_lEndDate = a}) + +-- | image alt text. +lImageAltText :: Lens' Link (Maybe Text) +lImageAltText + = lens _lImageAltText + (\ s a -> s{_lImageAltText = a}) + +-- | Promotion Type +lPromotionType :: Lens' Link (Maybe Text) +lPromotionType + = lens _lPromotionType + (\ s a -> s{_lPromotionType = a}) + +-- | Availability. +lAvailability :: Lens' Link (Maybe Text) +lAvailability + = lens _lAvailability + (\ s a -> s{_lAvailability = a}) + +-- | Date that this link becomes active. +lStartDate :: Lens' Link (Maybe UTCTime) +lStartDate + = lens _lStartDate (\ s a -> s{_lStartDate = a}) + +-- | The logical name for this link. +lName :: Lens' Link (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | Tracking url for impressions. +lImpressionTrackingUrl :: Lens' Link (Maybe Text) +lImpressionTrackingUrl + = lens _lImpressionTrackingUrl + (\ s a -> s{_lImpressionTrackingUrl = a}) + +-- | Special offers on the link. +lSpecialOffers :: Lens' Link (Maybe LinkSpecialOffers) +lSpecialOffers + = lens _lSpecialOffers + (\ s a -> s{_lSpecialOffers = a}) + +-- | The sum of fees paid to publishers divided by the total number of clicks +-- over the past seven days on this link. This value should be multiplied +-- by 100 at the time of display. +lEpcSevenDayAverage :: Lens' Link (Maybe (Maybe Money)) +lEpcSevenDayAverage + = lens _lEpcSevenDayAverage + (\ s a -> s{_lEpcSevenDayAverage = a}) + +-- | The ID of this link. +lId :: Lens' Link (Maybe Int64) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | The sum of fees paid to publishers divided by the total number of clicks +-- over the past three months on this link. This value should be multiplied +-- by 100 at the time of display. +lEpcNinetyDayAverage :: Lens' Link (Maybe (Maybe Money)) +lEpcNinetyDayAverage + = lens _lEpcNinetyDayAverage + (\ s a -> s{_lEpcNinetyDayAverage = a}) + +-- | The link type. +lLinkType :: Lens' Link (Maybe Text) +lLinkType + = lens _lLinkType (\ s a -> s{_lLinkType = a}) + +-- | Flag for if this link is active. +lIsActive :: Lens' Link (Maybe Bool) +lIsActive + = lens _lIsActive (\ s a -> s{_lIsActive = a}) + +-- | Duration +lDuration :: Lens' Link (Maybe Text) +lDuration + = lens _lDuration (\ s a -> s{_lDuration = a}) + +-- | Description. +lDescription :: Lens' Link (Maybe Text) +lDescription + = lens _lDescription (\ s a -> s{_lDescription = a}) + +instance FromJSON Link where + parseJSON + = withObject "Link" + (\ o -> + Link <$> + (o .:? "authorship") <*> (o .:? "destinationUrl") <*> + (o .:? "clickTrackingUrl") + <*> (o .:? "createDate") + <*> (o .:? "kind" .!= "gan#link") + <*> (o .:? "advertiserId") + <*> (o .:? "endDate") + <*> (o .:? "imageAltText") + <*> (o .:? "promotionType") + <*> (o .:? "availability") + <*> (o .:? "startDate") + <*> (o .:? "name") + <*> (o .:? "impressionTrackingUrl") + <*> (o .:? "specialOffers") + <*> (o .:? "epcSevenDayAverage") + <*> (o .:? "id") + <*> (o .:? "epcNinetyDayAverage") + <*> (o .:? "linkType") + <*> (o .:? "isActive") + <*> (o .:? "duration") + <*> (o .:? "description")) + +instance ToJSON Link where + toJSON Link{..} + = object + (catMaybes + [("authorship" .=) <$> _lAuthorship, + ("destinationUrl" .=) <$> _lDestinationUrl, + ("clickTrackingUrl" .=) <$> _lClickTrackingUrl, + ("createDate" .=) <$> _lCreateDate, + Just ("kind" .= _lKind), + ("advertiserId" .=) <$> _lAdvertiserId, + ("endDate" .=) <$> _lEndDate, + ("imageAltText" .=) <$> _lImageAltText, + ("promotionType" .=) <$> _lPromotionType, + ("availability" .=) <$> _lAvailability, + ("startDate" .=) <$> _lStartDate, + ("name" .=) <$> _lName, + ("impressionTrackingUrl" .=) <$> + _lImpressionTrackingUrl, + ("specialOffers" .=) <$> _lSpecialOffers, + ("epcSevenDayAverage" .=) <$> _lEpcSevenDayAverage, + ("id" .=) <$> _lId, + ("epcNinetyDayAverage" .=) <$> _lEpcNinetyDayAverage, + ("linkType" .=) <$> _lLinkType, + ("isActive" .=) <$> _lIsActive, + ("duration" .=) <$> _lDuration, + ("description" .=) <$> _lDescription]) + +-- | An ApiMoneyProto. +-- +-- /See:/ 'money' smart constructor. +data Money = Money + { _mAmount :: !(Maybe Double) + , _mCurrencyCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Money' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mAmount' +-- +-- * 'mCurrencyCode' +money + :: Money +money = + Money + { _mAmount = Nothing + , _mCurrencyCode = Nothing + } + +-- | The amount of money. +mAmount :: Lens' Money (Maybe Double) +mAmount = lens _mAmount (\ s a -> s{_mAmount = a}) + +-- | The 3-letter code of the currency in question. +mCurrencyCode :: Lens' Money (Maybe Text) +mCurrencyCode + = lens _mCurrencyCode + (\ s a -> s{_mCurrencyCode = a}) + +instance FromJSON Money where + parseJSON + = withObject "Money" + (\ o -> + Money <$> + (o .:? "amount") <*> (o .:? "currencyCode")) + +instance ToJSON Money where + toJSON Money{..} + = object + (catMaybes + [("amount" .=) <$> _mAmount, + ("currencyCode" .=) <$> _mCurrencyCode]) + +-- +-- /See:/ 'ccOffers' smart constructor. +data CcOffers = CcOffers + { _coKind :: !Text + , _coItems :: !(Maybe [Maybe CcOffer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CcOffers' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'coKind' +-- +-- * 'coItems' +ccOffers + :: CcOffers +ccOffers = + CcOffers + { _coKind = "gan#ccOffers" + , _coItems = Nothing + } + +-- | The kind for a page of credit card offers. +coKind :: Lens' CcOffers Text +coKind = lens _coKind (\ s a -> s{_coKind = a}) + +-- | The credit card offers. +coItems :: Lens' CcOffers [Maybe CcOffer] +coItems + = lens _coItems (\ s a -> s{_coItems = a}) . _Default + . _Coerce + +instance FromJSON CcOffers where + parseJSON + = withObject "CcOffers" + (\ o -> + CcOffers <$> + (o .:? "kind" .!= "gan#ccOffers") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON CcOffers where + toJSON CcOffers{..} + = object + (catMaybes + [Just ("kind" .= _coKind), + ("items" .=) <$> _coItems]) + +-- +-- /See:/ 'advertisers' smart constructor. +data Advertisers = Advertisers + { _aNextPageToken :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Advertiser]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Advertisers' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aNextPageToken' +-- +-- * 'aKind' +-- +-- * 'aItems' +advertisers + :: Advertisers +advertisers = + Advertisers + { _aNextPageToken = Nothing + , _aKind = "gan#advertisers" + , _aItems = Nothing + } + +-- | The \'pageToken\' to pass to the next request to get the next page, if +-- there are more to retrieve. +aNextPageToken :: Lens' Advertisers (Maybe Text) +aNextPageToken + = lens _aNextPageToken + (\ s a -> s{_aNextPageToken = a}) + +-- | The kind for a page of advertisers. +aKind :: Lens' Advertisers Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The advertiser list. +aItems :: Lens' Advertisers [Maybe Advertiser] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Advertisers where + parseJSON + = withObject "Advertisers" + (\ o -> + Advertisers <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "gan#advertisers") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Advertisers where + toJSON Advertisers{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _aNextPageToken, + Just ("kind" .= _aKind), ("items" .=) <$> _aItems]) + +-- | A ReportResource representing a report of a certain type either for an +-- advertiser or publisher. +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rEndDate :: !(Maybe Text) + , _rTotalsRows :: !(Maybe [[JSON]]) + , _rKind :: !Text + , _rStartDate :: !(Maybe Text) + , _rRows :: !(Maybe [[JSON]]) + , _rMatchingRowCount :: !(Maybe Int64) + , _rColumnNames :: !(Maybe [Text]) + , _rType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rEndDate' +-- +-- * 'rTotalsRows' +-- +-- * 'rKind' +-- +-- * 'rStartDate' +-- +-- * 'rRows' +-- +-- * 'rMatchingRowCount' +-- +-- * 'rColumnNames' +-- +-- * 'rType' +report + :: Report +report = + Report + { _rEndDate = Nothing + , _rTotalsRows = Nothing + , _rKind = "gan#report" + , _rStartDate = Nothing + , _rRows = Nothing + , _rMatchingRowCount = Nothing + , _rColumnNames = Nothing + , _rType = Nothing + } + +-- | The end of the date range for this report, exclusive. +rEndDate :: Lens' Report (Maybe Text) +rEndDate = lens _rEndDate (\ s a -> s{_rEndDate = a}) + +-- | The totals rows for the report +rTotalsRows :: Lens' Report [[JSON]] +rTotalsRows + = lens _rTotalsRows (\ s a -> s{_rTotalsRows = a}) . + _Default + . _Coerce + +-- | The kind for a report. +rKind :: Lens' Report Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The start of the date range for this report, inclusive. +rStartDate :: Lens' Report (Maybe Text) +rStartDate + = lens _rStartDate (\ s a -> s{_rStartDate = a}) + +-- | The rows of data for the report +rRows :: Lens' Report [[JSON]] +rRows + = lens _rRows (\ s a -> s{_rRows = a}) . _Default . + _Coerce + +-- | The number of matching rows before paging is applied. +rMatchingRowCount :: Lens' Report (Maybe Int64) +rMatchingRowCount + = lens _rMatchingRowCount + (\ s a -> s{_rMatchingRowCount = a}) + +-- | The column names for the report +rColumnNames :: Lens' Report [Text] +rColumnNames + = lens _rColumnNames (\ s a -> s{_rColumnNames = a}) + . _Default + . _Coerce + +-- | The report type. +rType :: Lens' Report (Maybe Text) +rType = lens _rType (\ s a -> s{_rType = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "end_date") <*> + (o .:? "totals_rows" .!= mempty) + <*> (o .:? "kind" .!= "gan#report") + <*> (o .:? "start_date") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "matching_row_count") + <*> (o .:? "column_names" .!= mempty) + <*> (o .:? "type")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [("end_date" .=) <$> _rEndDate, + ("totals_rows" .=) <$> _rTotalsRows, + Just ("kind" .= _rKind), + ("start_date" .=) <$> _rStartDate, + ("rows" .=) <$> _rRows, + ("matching_row_count" .=) <$> _rMatchingRowCount, + ("column_names" .=) <$> _rColumnNames, + ("type" .=) <$> _rType]) + +-- +-- /See:/ 'events' smart constructor. +data Events = Events + { _eveNextPageToken :: !(Maybe Text) + , _eveKind :: !Text + , _eveItems :: !(Maybe [Maybe Event]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Events' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eveNextPageToken' +-- +-- * 'eveKind' +-- +-- * 'eveItems' +events + :: Events +events = + Events + { _eveNextPageToken = Nothing + , _eveKind = "gan#events" + , _eveItems = Nothing + } + +-- | The \'pageToken\' to pass to the next request to get the next page, if +-- there are more to retrieve. +eveNextPageToken :: Lens' Events (Maybe Text) +eveNextPageToken + = lens _eveNextPageToken + (\ s a -> s{_eveNextPageToken = a}) + +-- | The kind for a page of events. +eveKind :: Lens' Events Text +eveKind = lens _eveKind (\ s a -> s{_eveKind = a}) + +-- | The event list. +eveItems :: Lens' Events [Maybe Event] +eveItems + = lens _eveItems (\ s a -> s{_eveItems = a}) . + _Default + . _Coerce + +instance FromJSON Events where + parseJSON + = withObject "Events" + (\ o -> + Events <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "gan#events") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Events where + toJSON Events{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _eveNextPageToken, + Just ("kind" .= _eveKind), + ("items" .=) <$> _eveItems]) + +-- +-- /See:/ 'publishers' smart constructor. +data Publishers = Publishers + { _pNextPageToken :: !(Maybe Text) + , _pKind :: !Text + , _pItems :: !(Maybe [Maybe Publisher]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Publishers' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pNextPageToken' +-- +-- * 'pKind' +-- +-- * 'pItems' +publishers + :: Publishers +publishers = + Publishers + { _pNextPageToken = Nothing + , _pKind = "gan#publishers" + , _pItems = Nothing + } + +-- | The \'pageToken\' to pass to the next request to get the next page, if +-- there are more to retrieve. +pNextPageToken :: Lens' Publishers (Maybe Text) +pNextPageToken + = lens _pNextPageToken + (\ s a -> s{_pNextPageToken = a}) + +-- | The kind for a page of entities. +pKind :: Lens' Publishers Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The entity list. +pItems :: Lens' Publishers [Maybe Publisher] +pItems + = lens _pItems (\ s a -> s{_pItems = a}) . _Default . + _Coerce + +instance FromJSON Publishers where + parseJSON + = withObject "Publishers" + (\ o -> + Publishers <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "gan#publishers") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Publishers where + toJSON Publishers{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _pNextPageToken, + Just ("kind" .= _pKind), ("items" .=) <$> _pItems]) + +-- | An AdvertiserResource. +-- +-- /See:/ 'advertiser' smart constructor. +data Advertiser = Advertiser + { _advAllowPublisherCreatedLinks :: !(Maybe Bool) + , _advContactPhone :: !(Maybe Text) + , _advContactEmail :: !(Maybe Text) + , _advStatus :: !(Maybe Text) + , _advLogoUrl :: !(Maybe Text) + , _advKind :: !Text + , _advCategory :: !(Maybe Text) + , _advSiteUrl :: !(Maybe Text) + , _advPayoutRank :: !(Maybe Text) + , _advJoinDate :: !(Maybe UTCTime) + , _advDefaultLinkId :: !(Maybe Int64) + , _advRedirectDomains :: !(Maybe [Text]) + , _advName :: !(Maybe Text) + , _advProductFeedsEnabled :: !(Maybe Bool) + , _advMerchantCenterIds :: !(Maybe [Int64]) + , _advEpcSevenDayAverage :: !(Maybe (Maybe Money)) + , _advItem :: !(Maybe (Maybe Advertiser)) + , _advId :: !(Maybe Int64) + , _advEpcNinetyDayAverage :: !(Maybe (Maybe Money)) + , _advCommissionDuration :: !(Maybe Int32) + , _advDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Advertiser' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'advAllowPublisherCreatedLinks' +-- +-- * 'advContactPhone' +-- +-- * 'advContactEmail' +-- +-- * 'advStatus' +-- +-- * 'advLogoUrl' +-- +-- * 'advKind' +-- +-- * 'advCategory' +-- +-- * 'advSiteUrl' +-- +-- * 'advPayoutRank' +-- +-- * 'advJoinDate' +-- +-- * 'advDefaultLinkId' +-- +-- * 'advRedirectDomains' +-- +-- * 'advName' +-- +-- * 'advProductFeedsEnabled' +-- +-- * 'advMerchantCenterIds' +-- +-- * 'advEpcSevenDayAverage' +-- +-- * 'advItem' +-- +-- * 'advId' +-- +-- * 'advEpcNinetyDayAverage' +-- +-- * 'advCommissionDuration' +-- +-- * 'advDescription' +advertiser + :: Advertiser +advertiser = + Advertiser + { _advAllowPublisherCreatedLinks = Nothing + , _advContactPhone = Nothing + , _advContactEmail = Nothing + , _advStatus = Nothing + , _advLogoUrl = Nothing + , _advKind = "gan#advertiser" + , _advCategory = Nothing + , _advSiteUrl = Nothing + , _advPayoutRank = Nothing + , _advJoinDate = Nothing + , _advDefaultLinkId = Nothing + , _advRedirectDomains = Nothing + , _advName = Nothing + , _advProductFeedsEnabled = Nothing + , _advMerchantCenterIds = Nothing + , _advEpcSevenDayAverage = Nothing + , _advItem = Nothing + , _advId = Nothing + , _advEpcNinetyDayAverage = Nothing + , _advCommissionDuration = Nothing + , _advDescription = Nothing + } + +-- | True if the advertiser allows publisher created links, otherwise false. +advAllowPublisherCreatedLinks :: Lens' Advertiser (Maybe Bool) +advAllowPublisherCreatedLinks + = lens _advAllowPublisherCreatedLinks + (\ s a -> s{_advAllowPublisherCreatedLinks = a}) + +-- | Phone that this advertiser would like publishers to contact them with. +advContactPhone :: Lens' Advertiser (Maybe Text) +advContactPhone + = lens _advContactPhone + (\ s a -> s{_advContactPhone = a}) + +-- | Email that this advertiser would like publishers to contact them with. +advContactEmail :: Lens' Advertiser (Maybe Text) +advContactEmail + = lens _advContactEmail + (\ s a -> s{_advContactEmail = a}) + +-- | The status of the requesting publisher\'s relationship this advertiser. +advStatus :: Lens' Advertiser (Maybe Text) +advStatus + = lens _advStatus (\ s a -> s{_advStatus = a}) + +-- | URL to the logo this advertiser uses on the Google Affiliate Network. +advLogoUrl :: Lens' Advertiser (Maybe Text) +advLogoUrl + = lens _advLogoUrl (\ s a -> s{_advLogoUrl = a}) + +-- | The kind for an advertiser. +advKind :: Lens' Advertiser Text +advKind = lens _advKind (\ s a -> s{_advKind = a}) + +-- | Category that this advertiser belongs to. A valid list of categories can +-- be found here: +-- http:\/\/www.google.com\/support\/affiliatenetwork\/advertiser\/bin\/answer.py?hl=en&answer=107581 +advCategory :: Lens' Advertiser (Maybe Text) +advCategory + = lens _advCategory (\ s a -> s{_advCategory = a}) + +-- | URL of the website this advertiser advertises from. +advSiteUrl :: Lens' Advertiser (Maybe Text) +advSiteUrl + = lens _advSiteUrl (\ s a -> s{_advSiteUrl = a}) + +-- | A rank based on commissions paid to publishers over the past 90 days. A +-- number between 1 and 4 where 4 means the top quartile (most money paid) +-- and 1 means the bottom quartile (least money paid). +advPayoutRank :: Lens' Advertiser (Maybe Text) +advPayoutRank + = lens _advPayoutRank + (\ s a -> s{_advPayoutRank = a}) + +-- | Date that this advertiser was approved as a Google Affiliate Network +-- advertiser. +advJoinDate :: Lens' Advertiser (Maybe UTCTime) +advJoinDate + = lens _advJoinDate (\ s a -> s{_advJoinDate = a}) + +-- | The default link id for this advertiser. +advDefaultLinkId :: Lens' Advertiser (Maybe Int64) +advDefaultLinkId + = lens _advDefaultLinkId + (\ s a -> s{_advDefaultLinkId = a}) + +-- | List of redirect URLs for this advertiser +advRedirectDomains :: Lens' Advertiser [Text] +advRedirectDomains + = lens _advRedirectDomains + (\ s a -> s{_advRedirectDomains = a}) + . _Default + . _Coerce + +-- | The name of this advertiser. +advName :: Lens' Advertiser (Maybe Text) +advName = lens _advName (\ s a -> s{_advName = a}) + +-- | Allows advertisers to submit product listings to Google Product Search. +advProductFeedsEnabled :: Lens' Advertiser (Maybe Bool) +advProductFeedsEnabled + = lens _advProductFeedsEnabled + (\ s a -> s{_advProductFeedsEnabled = a}) + +-- | List of merchant center ids for this advertiser +advMerchantCenterIds :: Lens' Advertiser [Int64] +advMerchantCenterIds + = lens _advMerchantCenterIds + (\ s a -> s{_advMerchantCenterIds = a}) + . _Default + . _Coerce + +-- | The sum of fees paid to publishers divided by the total number of clicks +-- over the past seven days. This value should be multiplied by 100 at the +-- time of display. +advEpcSevenDayAverage :: Lens' Advertiser (Maybe (Maybe Money)) +advEpcSevenDayAverage + = lens _advEpcSevenDayAverage + (\ s a -> s{_advEpcSevenDayAverage = a}) + +-- | The requested advertiser. +advItem :: Lens' Advertiser (Maybe (Maybe Advertiser)) +advItem = lens _advItem (\ s a -> s{_advItem = a}) + +-- | The ID of this advertiser. +advId :: Lens' Advertiser (Maybe Int64) +advId = lens _advId (\ s a -> s{_advId = a}) + +-- | The sum of fees paid to publishers divided by the total number of clicks +-- over the past three months. This value should be multiplied by 100 at +-- the time of display. +advEpcNinetyDayAverage :: Lens' Advertiser (Maybe (Maybe Money)) +advEpcNinetyDayAverage + = lens _advEpcNinetyDayAverage + (\ s a -> s{_advEpcNinetyDayAverage = a}) + +-- | The longest possible length of a commission (how long the cookies on the +-- customer\'s browser last before they expire). +advCommissionDuration :: Lens' Advertiser (Maybe Int32) +advCommissionDuration + = lens _advCommissionDuration + (\ s a -> s{_advCommissionDuration = a}) + +-- | Description of the website the advertiser advertises from. +advDescription :: Lens' Advertiser (Maybe Text) +advDescription + = lens _advDescription + (\ s a -> s{_advDescription = a}) + +instance FromJSON Advertiser where + parseJSON + = withObject "Advertiser" + (\ o -> + Advertiser <$> + (o .:? "allowPublisherCreatedLinks") <*> + (o .:? "contactPhone") + <*> (o .:? "contactEmail") + <*> (o .:? "status") + <*> (o .:? "logoUrl") + <*> (o .:? "kind" .!= "gan#advertiser") + <*> (o .:? "category") + <*> (o .:? "siteUrl") + <*> (o .:? "payoutRank") + <*> (o .:? "joinDate") + <*> (o .:? "defaultLinkId") + <*> (o .:? "redirectDomains" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "productFeedsEnabled") + <*> (o .:? "merchantCenterIds" .!= mempty) + <*> (o .:? "epcSevenDayAverage") + <*> (o .:? "item") + <*> (o .:? "id") + <*> (o .:? "epcNinetyDayAverage") + <*> (o .:? "commissionDuration") + <*> (o .:? "description")) + +instance ToJSON Advertiser where + toJSON Advertiser{..} + = object + (catMaybes + [("allowPublisherCreatedLinks" .=) <$> + _advAllowPublisherCreatedLinks, + ("contactPhone" .=) <$> _advContactPhone, + ("contactEmail" .=) <$> _advContactEmail, + ("status" .=) <$> _advStatus, + ("logoUrl" .=) <$> _advLogoUrl, + Just ("kind" .= _advKind), + ("category" .=) <$> _advCategory, + ("siteUrl" .=) <$> _advSiteUrl, + ("payoutRank" .=) <$> _advPayoutRank, + ("joinDate" .=) <$> _advJoinDate, + ("defaultLinkId" .=) <$> _advDefaultLinkId, + ("redirectDomains" .=) <$> _advRedirectDomains, + ("name" .=) <$> _advName, + ("productFeedsEnabled" .=) <$> + _advProductFeedsEnabled, + ("merchantCenterIds" .=) <$> _advMerchantCenterIds, + ("epcSevenDayAverage" .=) <$> _advEpcSevenDayAverage, + ("item" .=) <$> _advItem, ("id" .=) <$> _advId, + ("epcNinetyDayAverage" .=) <$> + _advEpcNinetyDayAverage, + ("commissionDuration" .=) <$> _advCommissionDuration, + ("description" .=) <$> _advDescription]) + +-- | A credit card offer. There are many possible result fields. We provide +-- two different views of the data, or \"projections.\" The \"full\" +-- projection includes every result field. And the \"summary\" projection, +-- which is the default, includes a smaller subset of the fields. The +-- fields included in the summary projection are marked as such in their +-- descriptions. +-- +-- /See:/ 'ccOffer' smart constructor. +data CcOffer = CcOffer + { _cMinimumFinanceCharge :: !(Maybe Text) + , _cTrackingUrl :: !(Maybe Text) + , _cProhibitedCategories :: !(Maybe [Text]) + , _cBalanceComputationMethod :: !(Maybe Text) + , _cInitialSetupAndProcessingFee :: !(Maybe Text) + , _cReturnedPaymentFee :: !(Maybe Text) + , _cAgeMinimumDetails :: !(Maybe Text) + , _cVariableRatesUpdateFrequency :: !(Maybe Text) + , _cCreditLimitMin :: !(Maybe Double) + , _cTravelInsurance :: !(Maybe Text) + , _cApprovedCategories :: !(Maybe [Text]) + , _cAnnualFeeDisplay :: !(Maybe Text) + , _cOverLimitFee :: !(Maybe Text) + , _cMaxPurchaseRate :: !(Maybe Double) + , _cAgeMinimum :: !(Maybe Double) + , _cVariableRatesLastUpdated :: !(Maybe Text) + , _cIntroCashAdvanceTerms :: !(Maybe Text) + , _cIssuerWebsite :: !(Maybe Text) + , _cLuggageInsurance :: !(Maybe Text) + , _cKind :: !Text + , _cRewardsHaveBlackoutDates :: !(Maybe Bool) + , _cDisclaimer :: !(Maybe Text) + , _cAdditionalCardHolderFee :: !(Maybe Text) + , _cExistingCustomerOnly :: !(Maybe Bool) + , _cEmergencyInsurance :: !(Maybe Text) + , _cNetwork :: !(Maybe Text) + , _cCashAdvanceTerms :: !(Maybe Text) + , _cStatementCopyFee :: !(Maybe Text) + , _cAprDisplay :: !(Maybe Text) + , _cOffersImmediateCashReward :: !(Maybe Bool) + , _cRewards :: !(Maybe [CcOfferRewardsItem]) + , _cCardType :: !(Maybe Text) + , _cImageUrl :: !(Maybe Text) + , _cCreditLimitMax :: !(Maybe Double) + , _cLandingPageUrl :: !(Maybe Text) + , _cAnnualFee :: !(Maybe Double) + , _cRewardsExpire :: !(Maybe Bool) + , _cFirstYearAnnualFee :: !(Maybe Double) + , _cCarRentalInsurance :: !(Maybe Text) + , _cPurchaseRateAdditionalDetails :: !(Maybe Text) + , _cOfferId :: !(Maybe Text) + , _cGracePeriodDisplay :: !(Maybe Text) + , _cIntroPurchaseTerms :: !(Maybe Text) + , _cCreditRatingDisplay :: !(Maybe Text) + , _cBalanceTransferTerms :: !(Maybe Text) + , _cLatePaymentFee :: !(Maybe Text) + , _cCardBenefits :: !(Maybe [Text]) + , _cIssuer :: !(Maybe Text) + , _cCardName :: !(Maybe Text) + , _cMinPurchaseRate :: !(Maybe Double) + , _cFraudLiability :: !(Maybe Text) + , _cForeignCurrencyTransactionFee :: !(Maybe Text) + , _cExtendedWarranty :: !(Maybe Text) + , _cAnnualRewardMaximum :: !(Maybe Double) + , _cIssuerId :: !(Maybe Text) + , _cIntroBalanceTransferTerms :: !(Maybe Text) + , _cDefaultFees :: !(Maybe [CcOfferDefaultFeesItem]) + , _cAdditionalCardBenefits :: !(Maybe [Text]) + , _cRewardUnit :: !(Maybe Text) + , _cBonusRewards :: !(Maybe [CcOfferBonusRewardsItem]) + , _cFlightAccidentInsurance :: !(Maybe Text) + , _cRewardPartner :: !(Maybe Text) + , _cPurchaseRateType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CcOffer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cMinimumFinanceCharge' +-- +-- * 'cTrackingUrl' +-- +-- * 'cProhibitedCategories' +-- +-- * 'cBalanceComputationMethod' +-- +-- * 'cInitialSetupAndProcessingFee' +-- +-- * 'cReturnedPaymentFee' +-- +-- * 'cAgeMinimumDetails' +-- +-- * 'cVariableRatesUpdateFrequency' +-- +-- * 'cCreditLimitMin' +-- +-- * 'cTravelInsurance' +-- +-- * 'cApprovedCategories' +-- +-- * 'cAnnualFeeDisplay' +-- +-- * 'cOverLimitFee' +-- +-- * 'cMaxPurchaseRate' +-- +-- * 'cAgeMinimum' +-- +-- * 'cVariableRatesLastUpdated' +-- +-- * 'cIntroCashAdvanceTerms' +-- +-- * 'cIssuerWebsite' +-- +-- * 'cLuggageInsurance' +-- +-- * 'cKind' +-- +-- * 'cRewardsHaveBlackoutDates' +-- +-- * 'cDisclaimer' +-- +-- * 'cAdditionalCardHolderFee' +-- +-- * 'cExistingCustomerOnly' +-- +-- * 'cEmergencyInsurance' +-- +-- * 'cNetwork' +-- +-- * 'cCashAdvanceTerms' +-- +-- * 'cStatementCopyFee' +-- +-- * 'cAprDisplay' +-- +-- * 'cOffersImmediateCashReward' +-- +-- * 'cRewards' +-- +-- * 'cCardType' +-- +-- * 'cImageUrl' +-- +-- * 'cCreditLimitMax' +-- +-- * 'cLandingPageUrl' +-- +-- * 'cAnnualFee' +-- +-- * 'cRewardsExpire' +-- +-- * 'cFirstYearAnnualFee' +-- +-- * 'cCarRentalInsurance' +-- +-- * 'cPurchaseRateAdditionalDetails' +-- +-- * 'cOfferId' +-- +-- * 'cGracePeriodDisplay' +-- +-- * 'cIntroPurchaseTerms' +-- +-- * 'cCreditRatingDisplay' +-- +-- * 'cBalanceTransferTerms' +-- +-- * 'cLatePaymentFee' +-- +-- * 'cCardBenefits' +-- +-- * 'cIssuer' +-- +-- * 'cCardName' +-- +-- * 'cMinPurchaseRate' +-- +-- * 'cFraudLiability' +-- +-- * 'cForeignCurrencyTransactionFee' +-- +-- * 'cExtendedWarranty' +-- +-- * 'cAnnualRewardMaximum' +-- +-- * 'cIssuerId' +-- +-- * 'cIntroBalanceTransferTerms' +-- +-- * 'cDefaultFees' +-- +-- * 'cAdditionalCardBenefits' +-- +-- * 'cRewardUnit' +-- +-- * 'cBonusRewards' +-- +-- * 'cFlightAccidentInsurance' +-- +-- * 'cRewardPartner' +-- +-- * 'cPurchaseRateType' +ccOffer + :: CcOffer +ccOffer = + CcOffer + { _cMinimumFinanceCharge = Nothing + , _cTrackingUrl = Nothing + , _cProhibitedCategories = Nothing + , _cBalanceComputationMethod = Nothing + , _cInitialSetupAndProcessingFee = Nothing + , _cReturnedPaymentFee = Nothing + , _cAgeMinimumDetails = Nothing + , _cVariableRatesUpdateFrequency = Nothing + , _cCreditLimitMin = Nothing + , _cTravelInsurance = Nothing + , _cApprovedCategories = Nothing + , _cAnnualFeeDisplay = Nothing + , _cOverLimitFee = Nothing + , _cMaxPurchaseRate = Nothing + , _cAgeMinimum = Nothing + , _cVariableRatesLastUpdated = Nothing + , _cIntroCashAdvanceTerms = Nothing + , _cIssuerWebsite = Nothing + , _cLuggageInsurance = Nothing + , _cKind = "gan#ccOffer" + , _cRewardsHaveBlackoutDates = Nothing + , _cDisclaimer = Nothing + , _cAdditionalCardHolderFee = Nothing + , _cExistingCustomerOnly = Nothing + , _cEmergencyInsurance = Nothing + , _cNetwork = Nothing + , _cCashAdvanceTerms = Nothing + , _cStatementCopyFee = Nothing + , _cAprDisplay = Nothing + , _cOffersImmediateCashReward = Nothing + , _cRewards = Nothing + , _cCardType = Nothing + , _cImageUrl = Nothing + , _cCreditLimitMax = Nothing + , _cLandingPageUrl = Nothing + , _cAnnualFee = Nothing + , _cRewardsExpire = Nothing + , _cFirstYearAnnualFee = Nothing + , _cCarRentalInsurance = Nothing + , _cPurchaseRateAdditionalDetails = Nothing + , _cOfferId = Nothing + , _cGracePeriodDisplay = Nothing + , _cIntroPurchaseTerms = Nothing + , _cCreditRatingDisplay = Nothing + , _cBalanceTransferTerms = Nothing + , _cLatePaymentFee = Nothing + , _cCardBenefits = Nothing + , _cIssuer = Nothing + , _cCardName = Nothing + , _cMinPurchaseRate = Nothing + , _cFraudLiability = Nothing + , _cForeignCurrencyTransactionFee = Nothing + , _cExtendedWarranty = Nothing + , _cAnnualRewardMaximum = Nothing + , _cIssuerId = Nothing + , _cIntroBalanceTransferTerms = Nothing + , _cDefaultFees = Nothing + , _cAdditionalCardBenefits = Nothing + , _cRewardUnit = Nothing + , _cBonusRewards = Nothing + , _cFlightAccidentInsurance = Nothing + , _cRewardPartner = Nothing + , _cPurchaseRateType = Nothing + } + +-- | Text describing how much missing the grace period will cost. +cMinimumFinanceCharge :: Lens' CcOffer (Maybe Text) +cMinimumFinanceCharge + = lens _cMinimumFinanceCharge + (\ s a -> s{_cMinimumFinanceCharge = a}) + +-- | The link to ping to register a click on this offer. A summary field. +cTrackingUrl :: Lens' CcOffer (Maybe Text) +cTrackingUrl + = lens _cTrackingUrl (\ s a -> s{_cTrackingUrl = a}) + +-- | Categories in which the issuer does not wish the card to be displayed. A +-- summary field. +cProhibitedCategories :: Lens' CcOffer [Text] +cProhibitedCategories + = lens _cProhibitedCategories + (\ s a -> s{_cProhibitedCategories = a}) + . _Default + . _Coerce + +-- | Text describing how the balance is computed. A summary field. +cBalanceComputationMethod :: Lens' CcOffer (Maybe Text) +cBalanceComputationMethod + = lens _cBalanceComputationMethod + (\ s a -> s{_cBalanceComputationMethod = a}) + +-- | Fee for setting up the card. +cInitialSetupAndProcessingFee :: Lens' CcOffer (Maybe Text) +cInitialSetupAndProcessingFee + = lens _cInitialSetupAndProcessingFee + (\ s a -> s{_cInitialSetupAndProcessingFee = a}) + +-- | Text describing the fee for a payment that doesn\'t clear. A summary +-- field. +cReturnedPaymentFee :: Lens' CcOffer (Maybe Text) +cReturnedPaymentFee + = lens _cReturnedPaymentFee + (\ s a -> s{_cReturnedPaymentFee = a}) + +-- | Text describing the details of the age minimum restriction. +cAgeMinimumDetails :: Lens' CcOffer (Maybe Text) +cAgeMinimumDetails + = lens _cAgeMinimumDetails + (\ s a -> s{_cAgeMinimumDetails = a}) + +-- | How often variable rates are updated. +cVariableRatesUpdateFrequency :: Lens' CcOffer (Maybe Text) +cVariableRatesUpdateFrequency + = lens _cVariableRatesUpdateFrequency + (\ s a -> s{_cVariableRatesUpdateFrequency = a}) + +-- | The low end for credit limits the issuer imposes on recipients of this +-- card. +cCreditLimitMin :: Lens' CcOffer (Maybe Double) +cCreditLimitMin + = lens _cCreditLimitMin + (\ s a -> s{_cCreditLimitMin = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cTravelInsurance :: Lens' CcOffer (Maybe Text) +cTravelInsurance + = lens _cTravelInsurance + (\ s a -> s{_cTravelInsurance = a}) + +-- | Possible categories for this card, eg \"Low Interest\" or \"Good.\" A +-- summary field. +cApprovedCategories :: Lens' CcOffer [Text] +cApprovedCategories + = lens _cApprovedCategories + (\ s a -> s{_cApprovedCategories = a}) + . _Default + . _Coerce + +-- | Text describing the annual fee, including any difference for the first +-- year. A summary field. +cAnnualFeeDisplay :: Lens' CcOffer (Maybe Text) +cAnnualFeeDisplay + = lens _cAnnualFeeDisplay + (\ s a -> s{_cAnnualFeeDisplay = a}) + +-- | Fee for exceeding the card\'s charge limit. +cOverLimitFee :: Lens' CcOffer (Maybe Text) +cOverLimitFee + = lens _cOverLimitFee + (\ s a -> s{_cOverLimitFee = a}) + +-- | The highest interest rate the issuer charges on this card. Expressed as +-- an absolute number, not as a percentage. +cMaxPurchaseRate :: Lens' CcOffer (Maybe Double) +cMaxPurchaseRate + = lens _cMaxPurchaseRate + (\ s a -> s{_cMaxPurchaseRate = a}) + +-- | The youngest a recipient of this card may be. +cAgeMinimum :: Lens' CcOffer (Maybe Double) +cAgeMinimum + = lens _cAgeMinimum (\ s a -> s{_cAgeMinimum = a}) + +-- | When variable rates were last updated. +cVariableRatesLastUpdated :: Lens' CcOffer (Maybe Text) +cVariableRatesLastUpdated + = lens _cVariableRatesLastUpdated + (\ s a -> s{_cVariableRatesLastUpdated = a}) + +-- | Text describing the terms for introductory period cash advances. A +-- summary field. +cIntroCashAdvanceTerms :: Lens' CcOffer (Maybe Text) +cIntroCashAdvanceTerms + = lens _cIntroCashAdvanceTerms + (\ s a -> s{_cIntroCashAdvanceTerms = a}) + +-- | The generic link to the issuer\'s site. +cIssuerWebsite :: Lens' CcOffer (Maybe Text) +cIssuerWebsite + = lens _cIssuerWebsite + (\ s a -> s{_cIssuerWebsite = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cLuggageInsurance :: Lens' CcOffer (Maybe Text) +cLuggageInsurance + = lens _cLuggageInsurance + (\ s a -> s{_cLuggageInsurance = a}) + +-- | The kind for one credit card offer. A summary field. +cKind :: Lens' CcOffer Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | For airline miles rewards, tells whether blackout dates apply to the +-- miles. +cRewardsHaveBlackoutDates :: Lens' CcOffer (Maybe Bool) +cRewardsHaveBlackoutDates + = lens _cRewardsHaveBlackoutDates + (\ s a -> s{_cRewardsHaveBlackoutDates = a}) + +-- | A notice that, if present, is referenced via an asterisk by many of the +-- other summary fields. If this field is present, it will always start +-- with an asterisk (\"*\"), and must be prominently displayed with the +-- offer. A summary field. +cDisclaimer :: Lens' CcOffer (Maybe Text) +cDisclaimer + = lens _cDisclaimer (\ s a -> s{_cDisclaimer = a}) + +-- | Any extra fees levied on card holders. +cAdditionalCardHolderFee :: Lens' CcOffer (Maybe Text) +cAdditionalCardHolderFee + = lens _cAdditionalCardHolderFee + (\ s a -> s{_cAdditionalCardHolderFee = a}) + +-- | Whether this card is only available to existing customers of the issuer. +cExistingCustomerOnly :: Lens' CcOffer (Maybe Bool) +cExistingCustomerOnly + = lens _cExistingCustomerOnly + (\ s a -> s{_cExistingCustomerOnly = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cEmergencyInsurance :: Lens' CcOffer (Maybe Text) +cEmergencyInsurance + = lens _cEmergencyInsurance + (\ s a -> s{_cEmergencyInsurance = a}) + +-- | Which network (eg Visa) the card belongs to. A summary field. +cNetwork :: Lens' CcOffer (Maybe Text) +cNetwork = lens _cNetwork (\ s a -> s{_cNetwork = a}) + +-- | Text describing the terms for cash advances. A summary field. +cCashAdvanceTerms :: Lens' CcOffer (Maybe Text) +cCashAdvanceTerms + = lens _cCashAdvanceTerms + (\ s a -> s{_cCashAdvanceTerms = a}) + +-- | Fee for requesting a copy of your statement. +cStatementCopyFee :: Lens' CcOffer (Maybe Text) +cStatementCopyFee + = lens _cStatementCopyFee + (\ s a -> s{_cStatementCopyFee = a}) + +-- | Text describing the purchase APR. A summary field. +cAprDisplay :: Lens' CcOffer (Maybe Text) +cAprDisplay + = lens _cAprDisplay (\ s a -> s{_cAprDisplay = a}) + +-- | Whether a cash reward program lets you get cash back sooner than end of +-- year or other longish period. +cOffersImmediateCashReward :: Lens' CcOffer (Maybe Bool) +cOffersImmediateCashReward + = lens _cOffersImmediateCashReward + (\ s a -> s{_cOffersImmediateCashReward = a}) + +-- | For cards with rewards programs, detailed rules about how the program +-- works. +cRewards :: Lens' CcOffer [CcOfferRewardsItem] +cRewards + = lens _cRewards (\ s a -> s{_cRewards = a}) . + _Default + . _Coerce + +-- | What kind of credit card this is, for example secured or unsecured. +cCardType :: Lens' CcOffer (Maybe Text) +cCardType + = lens _cCardType (\ s a -> s{_cCardType = a}) + +-- | The link to the image of the card that is shown on Connect Commerce. A +-- summary field. +cImageUrl :: Lens' CcOffer (Maybe Text) +cImageUrl + = lens _cImageUrl (\ s a -> s{_cImageUrl = a}) + +-- | The high end for credit limits the issuer imposes on recipients of this +-- card. +cCreditLimitMax :: Lens' CcOffer (Maybe Double) +cCreditLimitMax + = lens _cCreditLimitMax + (\ s a -> s{_cCreditLimitMax = a}) + +-- | The link to the issuer\'s page for this card. A summary field. +cLandingPageUrl :: Lens' CcOffer (Maybe Text) +cLandingPageUrl + = lens _cLandingPageUrl + (\ s a -> s{_cLandingPageUrl = a}) + +-- | The ongoing annual fee, in dollars. +cAnnualFee :: Lens' CcOffer (Maybe Double) +cAnnualFee + = lens _cAnnualFee (\ s a -> s{_cAnnualFee = a}) + +-- | Whether accumulated rewards ever expire. +cRewardsExpire :: Lens' CcOffer (Maybe Bool) +cRewardsExpire + = lens _cRewardsExpire + (\ s a -> s{_cRewardsExpire = a}) + +-- | The annual fee for the first year, if different from the ongoing fee. +-- Optional. +cFirstYearAnnualFee :: Lens' CcOffer (Maybe Double) +cFirstYearAnnualFee + = lens _cFirstYearAnnualFee + (\ s a -> s{_cFirstYearAnnualFee = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cCarRentalInsurance :: Lens' CcOffer (Maybe Text) +cCarRentalInsurance + = lens _cCarRentalInsurance + (\ s a -> s{_cCarRentalInsurance = a}) + +-- | Text describing any additional details for the purchase rate. A summary +-- field. +cPurchaseRateAdditionalDetails :: Lens' CcOffer (Maybe Text) +cPurchaseRateAdditionalDetails + = lens _cPurchaseRateAdditionalDetails + (\ s a -> s{_cPurchaseRateAdditionalDetails = a}) + +-- | This offer\'s ID. A summary field. +cOfferId :: Lens' CcOffer (Maybe Text) +cOfferId = lens _cOfferId (\ s a -> s{_cOfferId = a}) + +-- | Text describing the grace period before finance charges apply. A summary +-- field. +cGracePeriodDisplay :: Lens' CcOffer (Maybe Text) +cGracePeriodDisplay + = lens _cGracePeriodDisplay + (\ s a -> s{_cGracePeriodDisplay = a}) + +-- | Text describing the terms for introductory period purchases. A summary +-- field. +cIntroPurchaseTerms :: Lens' CcOffer (Maybe Text) +cIntroPurchaseTerms + = lens _cIntroPurchaseTerms + (\ s a -> s{_cIntroPurchaseTerms = a}) + +-- | Text describing the credit ratings required for recipients of this card, +-- for example \"Excellent\/Good.\" A summary field. +cCreditRatingDisplay :: Lens' CcOffer (Maybe Text) +cCreditRatingDisplay + = lens _cCreditRatingDisplay + (\ s a -> s{_cCreditRatingDisplay = a}) + +-- | Text describing the terms for balance transfers. A summary field. +cBalanceTransferTerms :: Lens' CcOffer (Maybe Text) +cBalanceTransferTerms + = lens _cBalanceTransferTerms + (\ s a -> s{_cBalanceTransferTerms = a}) + +-- | Text describing how much a late payment will cost, eg \"up to $35.\" A +-- summary field. +cLatePaymentFee :: Lens' CcOffer (Maybe Text) +cLatePaymentFee + = lens _cLatePaymentFee + (\ s a -> s{_cLatePaymentFee = a}) + +-- | A list of what the issuer thinks are the most important benefits of the +-- card. Usually summarizes the rewards program, if there is one. A summary +-- field. +cCardBenefits :: Lens' CcOffer [Text] +cCardBenefits + = lens _cCardBenefits + (\ s a -> s{_cCardBenefits = a}) + . _Default + . _Coerce + +-- | Name of card issuer. A summary field. +cIssuer :: Lens' CcOffer (Maybe Text) +cIssuer = lens _cIssuer (\ s a -> s{_cIssuer = a}) + +-- | The issuer\'s name for the card, including any trademark or service mark +-- designators. A summary field. +cCardName :: Lens' CcOffer (Maybe Text) +cCardName + = lens _cCardName (\ s a -> s{_cCardName = a}) + +-- | The lowest interest rate the issuer charges on this card. Expressed as +-- an absolute number, not as a percentage. +cMinPurchaseRate :: Lens' CcOffer (Maybe Double) +cMinPurchaseRate + = lens _cMinPurchaseRate + (\ s a -> s{_cMinPurchaseRate = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cFraudLiability :: Lens' CcOffer (Maybe Text) +cFraudLiability + = lens _cFraudLiability + (\ s a -> s{_cFraudLiability = a}) + +-- | Fee for each transaction involving a foreign currency. +cForeignCurrencyTransactionFee :: Lens' CcOffer (Maybe Text) +cForeignCurrencyTransactionFee + = lens _cForeignCurrencyTransactionFee + (\ s a -> s{_cForeignCurrencyTransactionFee = a}) + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cExtendedWarranty :: Lens' CcOffer (Maybe Text) +cExtendedWarranty + = lens _cExtendedWarranty + (\ s a -> s{_cExtendedWarranty = a}) + +-- | The largest number of units you may accumulate in a year. +cAnnualRewardMaximum :: Lens' CcOffer (Maybe Double) +cAnnualRewardMaximum + = lens _cAnnualRewardMaximum + (\ s a -> s{_cAnnualRewardMaximum = a}) + +-- | The Google Affiliate Network ID of the advertiser making this offer. +cIssuerId :: Lens' CcOffer (Maybe Text) +cIssuerId + = lens _cIssuerId (\ s a -> s{_cIssuerId = a}) + +-- | Text describing the terms for introductory period balance transfers. A +-- summary field. +cIntroBalanceTransferTerms :: Lens' CcOffer (Maybe Text) +cIntroBalanceTransferTerms + = lens _cIntroBalanceTransferTerms + (\ s a -> s{_cIntroBalanceTransferTerms = a}) + +-- | Fees for defaulting on your payments. +cDefaultFees :: Lens' CcOffer [CcOfferDefaultFeesItem] +cDefaultFees + = lens _cDefaultFees (\ s a -> s{_cDefaultFees = a}) + . _Default + . _Coerce + +-- | More marketing copy about the card\'s benefits. A summary field. +cAdditionalCardBenefits :: Lens' CcOffer [Text] +cAdditionalCardBenefits + = lens _cAdditionalCardBenefits + (\ s a -> s{_cAdditionalCardBenefits = a}) + . _Default + . _Coerce + +-- | For cards with rewards programs, the unit of reward. For example, miles, +-- cash back, points. +cRewardUnit :: Lens' CcOffer (Maybe Text) +cRewardUnit + = lens _cRewardUnit (\ s a -> s{_cRewardUnit = a}) + +-- | For cards with rewards programs, extra circumstances whereby additional +-- rewards may be granted. +cBonusRewards :: Lens' CcOffer [CcOfferBonusRewardsItem] +cBonusRewards + = lens _cBonusRewards + (\ s a -> s{_cBonusRewards = a}) + . _Default + . _Coerce + +-- | If you get coverage when you use the card for the given activity, this +-- field describes it. +cFlightAccidentInsurance :: Lens' CcOffer (Maybe Text) +cFlightAccidentInsurance + = lens _cFlightAccidentInsurance + (\ s a -> s{_cFlightAccidentInsurance = a}) + +-- | The company that redeems the rewards, if different from the issuer. +cRewardPartner :: Lens' CcOffer (Maybe Text) +cRewardPartner + = lens _cRewardPartner + (\ s a -> s{_cRewardPartner = a}) + +-- | Fixed or variable. +cPurchaseRateType :: Lens' CcOffer (Maybe Text) +cPurchaseRateType + = lens _cPurchaseRateType + (\ s a -> s{_cPurchaseRateType = a}) + +instance FromJSON CcOffer where + parseJSON + = withObject "CcOffer" + (\ o -> + CcOffer <$> + (o .:? "minimumFinanceCharge") <*> + (o .:? "trackingUrl") + <*> (o .:? "prohibitedCategories" .!= mempty) + <*> (o .:? "balanceComputationMethod") + <*> (o .:? "initialSetupAndProcessingFee") + <*> (o .:? "returnedPaymentFee") + <*> (o .:? "ageMinimumDetails") + <*> (o .:? "variableRatesUpdateFrequency") + <*> (o .:? "creditLimitMin") + <*> (o .:? "travelInsurance") + <*> (o .:? "approvedCategories" .!= mempty) + <*> (o .:? "annualFeeDisplay") + <*> (o .:? "overLimitFee") + <*> (o .:? "maxPurchaseRate") + <*> (o .:? "ageMinimum") + <*> (o .:? "variableRatesLastUpdated") + <*> (o .:? "introCashAdvanceTerms") + <*> (o .:? "issuerWebsite") + <*> (o .:? "luggageInsurance") + <*> (o .:? "kind" .!= "gan#ccOffer") + <*> (o .:? "rewardsHaveBlackoutDates") + <*> (o .:? "disclaimer") + <*> (o .:? "additionalCardHolderFee") + <*> (o .:? "existingCustomerOnly") + <*> (o .:? "emergencyInsurance") + <*> (o .:? "network") + <*> (o .:? "cashAdvanceTerms") + <*> (o .:? "statementCopyFee") + <*> (o .:? "aprDisplay") + <*> (o .:? "offersImmediateCashReward") + <*> (o .:? "rewards" .!= mempty) + <*> (o .:? "cardType") + <*> (o .:? "imageUrl") + <*> (o .:? "creditLimitMax") + <*> (o .:? "landingPageUrl") + <*> (o .:? "annualFee") + <*> (o .:? "rewardsExpire") + <*> (o .:? "firstYearAnnualFee") + <*> (o .:? "carRentalInsurance") + <*> (o .:? "purchaseRateAdditionalDetails") + <*> (o .:? "offerId") + <*> (o .:? "gracePeriodDisplay") + <*> (o .:? "introPurchaseTerms") + <*> (o .:? "creditRatingDisplay") + <*> (o .:? "balanceTransferTerms") + <*> (o .:? "latePaymentFee") + <*> (o .:? "cardBenefits" .!= mempty) + <*> (o .:? "issuer") + <*> (o .:? "cardName") + <*> (o .:? "minPurchaseRate") + <*> (o .:? "fraudLiability") + <*> (o .:? "foreignCurrencyTransactionFee") + <*> (o .:? "extendedWarranty") + <*> (o .:? "annualRewardMaximum") + <*> (o .:? "issuerId") + <*> (o .:? "introBalanceTransferTerms") + <*> (o .:? "defaultFees" .!= mempty) + <*> (o .:? "additionalCardBenefits" .!= mempty) + <*> (o .:? "rewardUnit") + <*> (o .:? "bonusRewards" .!= mempty) + <*> (o .:? "flightAccidentInsurance") + <*> (o .:? "rewardPartner") + <*> (o .:? "purchaseRateType")) + +instance ToJSON CcOffer where + toJSON CcOffer{..} + = object + (catMaybes + [("minimumFinanceCharge" .=) <$> + _cMinimumFinanceCharge, + ("trackingUrl" .=) <$> _cTrackingUrl, + ("prohibitedCategories" .=) <$> + _cProhibitedCategories, + ("balanceComputationMethod" .=) <$> + _cBalanceComputationMethod, + ("initialSetupAndProcessingFee" .=) <$> + _cInitialSetupAndProcessingFee, + ("returnedPaymentFee" .=) <$> _cReturnedPaymentFee, + ("ageMinimumDetails" .=) <$> _cAgeMinimumDetails, + ("variableRatesUpdateFrequency" .=) <$> + _cVariableRatesUpdateFrequency, + ("creditLimitMin" .=) <$> _cCreditLimitMin, + ("travelInsurance" .=) <$> _cTravelInsurance, + ("approvedCategories" .=) <$> _cApprovedCategories, + ("annualFeeDisplay" .=) <$> _cAnnualFeeDisplay, + ("overLimitFee" .=) <$> _cOverLimitFee, + ("maxPurchaseRate" .=) <$> _cMaxPurchaseRate, + ("ageMinimum" .=) <$> _cAgeMinimum, + ("variableRatesLastUpdated" .=) <$> + _cVariableRatesLastUpdated, + ("introCashAdvanceTerms" .=) <$> + _cIntroCashAdvanceTerms, + ("issuerWebsite" .=) <$> _cIssuerWebsite, + ("luggageInsurance" .=) <$> _cLuggageInsurance, + Just ("kind" .= _cKind), + ("rewardsHaveBlackoutDates" .=) <$> + _cRewardsHaveBlackoutDates, + ("disclaimer" .=) <$> _cDisclaimer, + ("additionalCardHolderFee" .=) <$> + _cAdditionalCardHolderFee, + ("existingCustomerOnly" .=) <$> + _cExistingCustomerOnly, + ("emergencyInsurance" .=) <$> _cEmergencyInsurance, + ("network" .=) <$> _cNetwork, + ("cashAdvanceTerms" .=) <$> _cCashAdvanceTerms, + ("statementCopyFee" .=) <$> _cStatementCopyFee, + ("aprDisplay" .=) <$> _cAprDisplay, + ("offersImmediateCashReward" .=) <$> + _cOffersImmediateCashReward, + ("rewards" .=) <$> _cRewards, + ("cardType" .=) <$> _cCardType, + ("imageUrl" .=) <$> _cImageUrl, + ("creditLimitMax" .=) <$> _cCreditLimitMax, + ("landingPageUrl" .=) <$> _cLandingPageUrl, + ("annualFee" .=) <$> _cAnnualFee, + ("rewardsExpire" .=) <$> _cRewardsExpire, + ("firstYearAnnualFee" .=) <$> _cFirstYearAnnualFee, + ("carRentalInsurance" .=) <$> _cCarRentalInsurance, + ("purchaseRateAdditionalDetails" .=) <$> + _cPurchaseRateAdditionalDetails, + ("offerId" .=) <$> _cOfferId, + ("gracePeriodDisplay" .=) <$> _cGracePeriodDisplay, + ("introPurchaseTerms" .=) <$> _cIntroPurchaseTerms, + ("creditRatingDisplay" .=) <$> _cCreditRatingDisplay, + ("balanceTransferTerms" .=) <$> + _cBalanceTransferTerms, + ("latePaymentFee" .=) <$> _cLatePaymentFee, + ("cardBenefits" .=) <$> _cCardBenefits, + ("issuer" .=) <$> _cIssuer, + ("cardName" .=) <$> _cCardName, + ("minPurchaseRate" .=) <$> _cMinPurchaseRate, + ("fraudLiability" .=) <$> _cFraudLiability, + ("foreignCurrencyTransactionFee" .=) <$> + _cForeignCurrencyTransactionFee, + ("extendedWarranty" .=) <$> _cExtendedWarranty, + ("annualRewardMaximum" .=) <$> _cAnnualRewardMaximum, + ("issuerId" .=) <$> _cIssuerId, + ("introBalanceTransferTerms" .=) <$> + _cIntroBalanceTransferTerms, + ("defaultFees" .=) <$> _cDefaultFees, + ("additionalCardBenefits" .=) <$> + _cAdditionalCardBenefits, + ("rewardUnit" .=) <$> _cRewardUnit, + ("bonusRewards" .=) <$> _cBonusRewards, + ("flightAccidentInsurance" .=) <$> + _cFlightAccidentInsurance, + ("rewardPartner" .=) <$> _cRewardPartner, + ("purchaseRateType" .=) <$> _cPurchaseRateType]) + +-- +-- /See:/ 'links' smart constructor. +data Links = Links + { _linNextPageToken :: !(Maybe Text) + , _linKind :: !Text + , _linItems :: !(Maybe [Maybe Link]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Links' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'linNextPageToken' +-- +-- * 'linKind' +-- +-- * 'linItems' +links + :: Links +links = + Links + { _linNextPageToken = Nothing + , _linKind = "gan#links" + , _linItems = Nothing + } + +-- | The next page token. +linNextPageToken :: Lens' Links (Maybe Text) +linNextPageToken + = lens _linNextPageToken + (\ s a -> s{_linNextPageToken = a}) + +-- | The kind for a page of links. +linKind :: Lens' Links Text +linKind = lens _linKind (\ s a -> s{_linKind = a}) + +-- | The links. +linItems :: Lens' Links [Maybe Link] +linItems + = lens _linItems (\ s a -> s{_linItems = a}) . + _Default + . _Coerce + +instance FromJSON Links where + parseJSON + = withObject "Links" + (\ o -> + Links <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "gan#links") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Links where + toJSON Links{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _linNextPageToken, + Just ("kind" .= _linKind), + ("items" .=) <$> _linItems]) + +-- | A PublisherResource. +-- +-- /See:/ 'publisher' smart constructor. +data Publisher = Publisher + { _pubStatus :: !(Maybe Text) + , _pubKind :: !Text + , _pubPayoutRank :: !(Maybe Text) + , _pubJoinDate :: !(Maybe UTCTime) + , _pubClassification :: !(Maybe Text) + , _pubName :: !(Maybe Text) + , _pubEpcSevenDayAverage :: !(Maybe (Maybe Money)) + , _pubItem :: !(Maybe (Maybe Publisher)) + , _pubId :: !(Maybe Int64) + , _pubEpcNinetyDayAverage :: !(Maybe (Maybe Money)) + , _pubSites :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Publisher' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pubStatus' +-- +-- * 'pubKind' +-- +-- * 'pubPayoutRank' +-- +-- * 'pubJoinDate' +-- +-- * 'pubClassification' +-- +-- * 'pubName' +-- +-- * 'pubEpcSevenDayAverage' +-- +-- * 'pubItem' +-- +-- * 'pubId' +-- +-- * 'pubEpcNinetyDayAverage' +-- +-- * 'pubSites' +publisher + :: Publisher +publisher = + Publisher + { _pubStatus = Nothing + , _pubKind = "gan#publisher" + , _pubPayoutRank = Nothing + , _pubJoinDate = Nothing + , _pubClassification = Nothing + , _pubName = Nothing + , _pubEpcSevenDayAverage = Nothing + , _pubItem = Nothing + , _pubId = Nothing + , _pubEpcNinetyDayAverage = Nothing + , _pubSites = Nothing + } + +-- | The status of the requesting advertiser\'s relationship with this +-- publisher. +pubStatus :: Lens' Publisher (Maybe Text) +pubStatus + = lens _pubStatus (\ s a -> s{_pubStatus = a}) + +-- | The kind for a publisher. +pubKind :: Lens' Publisher Text +pubKind = lens _pubKind (\ s a -> s{_pubKind = a}) + +-- | A rank based on commissions paid to this publisher over the past 90 +-- days. A number between 1 and 4 where 4 means the top quartile (most +-- money paid) and 1 means the bottom quartile (least money paid). +pubPayoutRank :: Lens' Publisher (Maybe Text) +pubPayoutRank + = lens _pubPayoutRank + (\ s a -> s{_pubPayoutRank = a}) + +-- | Date that this publisher was approved as a Google Affiliate Network +-- publisher. +pubJoinDate :: Lens' Publisher (Maybe UTCTime) +pubJoinDate + = lens _pubJoinDate (\ s a -> s{_pubJoinDate = a}) + +-- | Classification that this publisher belongs to. See this link for all +-- publisher classifications: +-- http:\/\/www.google.com\/support\/affiliatenetwork\/advertiser\/bin\/answer.py?hl=en&answer=107625&ctx=cb&src=cb&cbid=-k5fihzthfaik&cbrank=4 +pubClassification :: Lens' Publisher (Maybe Text) +pubClassification + = lens _pubClassification + (\ s a -> s{_pubClassification = a}) + +-- | The name of this publisher. +pubName :: Lens' Publisher (Maybe Text) +pubName = lens _pubName (\ s a -> s{_pubName = a}) + +-- | The sum of fees paid to this publisher divided by the total number of +-- clicks over the past seven days. Values are multiplied by 100 for +-- display purposes. +pubEpcSevenDayAverage :: Lens' Publisher (Maybe (Maybe Money)) +pubEpcSevenDayAverage + = lens _pubEpcSevenDayAverage + (\ s a -> s{_pubEpcSevenDayAverage = a}) + +-- | The requested publisher. +pubItem :: Lens' Publisher (Maybe (Maybe Publisher)) +pubItem = lens _pubItem (\ s a -> s{_pubItem = a}) + +-- | The ID of this publisher. +pubId :: Lens' Publisher (Maybe Int64) +pubId = lens _pubId (\ s a -> s{_pubId = a}) + +-- | The sum of fees paid to this publisher divided by the total number of +-- clicks over the past three months. Values are multiplied by 100 for +-- display purposes. +pubEpcNinetyDayAverage :: Lens' Publisher (Maybe (Maybe Money)) +pubEpcNinetyDayAverage + = lens _pubEpcNinetyDayAverage + (\ s a -> s{_pubEpcNinetyDayAverage = a}) + +-- | Websites that this publisher uses to advertise. +pubSites :: Lens' Publisher [Text] +pubSites + = lens _pubSites (\ s a -> s{_pubSites = a}) . + _Default + . _Coerce + +instance FromJSON Publisher where + parseJSON + = withObject "Publisher" + (\ o -> + Publisher <$> + (o .:? "status") <*> + (o .:? "kind" .!= "gan#publisher") + <*> (o .:? "payoutRank") + <*> (o .:? "joinDate") + <*> (o .:? "classification") + <*> (o .:? "name") + <*> (o .:? "epcSevenDayAverage") + <*> (o .:? "item") + <*> (o .:? "id") + <*> (o .:? "epcNinetyDayAverage") + <*> (o .:? "sites" .!= mempty)) + +instance ToJSON Publisher where + toJSON Publisher{..} + = object + (catMaybes + [("status" .=) <$> _pubStatus, + Just ("kind" .= _pubKind), + ("payoutRank" .=) <$> _pubPayoutRank, + ("joinDate" .=) <$> _pubJoinDate, + ("classification" .=) <$> _pubClassification, + ("name" .=) <$> _pubName, + ("epcSevenDayAverage" .=) <$> _pubEpcSevenDayAverage, + ("item" .=) <$> _pubItem, ("id" .=) <$> _pubId, + ("epcNinetyDayAverage" .=) <$> + _pubEpcNinetyDayAverage, + ("sites" .=) <$> _pubSites]) diff --git a/gogol-affiliates/gen/Network/Google/Affiliates/Types/Sum.hs b/gogol-affiliates/gen/Network/Google/Affiliates/Types/Sum.hs new file mode 100644 index 000000000..712fc638c --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Affiliates/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Affiliates.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Affiliates.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/Get.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/Get.hs new file mode 100644 index 000000000..9d55e3d21 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/Get.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Advertisers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves data about a single advertiser if that the requesting +-- advertiser\/publisher has access to it. Only publishers can lookup +-- advertisers. Advertisers can request information about themselves by +-- omitting the advertiserId query parameter. +-- +-- /See:/ for @GanAdvertisersGet@. +module Gan.Advertisers.Get + ( + -- * REST Resource + AdvertisersGetAPI + + -- * Creating a Request + , advertisersGet + , AdvertisersGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agAdvertiserId + , agRoleId + , agRole + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanAdvertisersGet@ which the +-- 'AdvertisersGet' request conforms to. +type AdvertisersGetAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "advertiser" :> + QueryParam "advertiserId" Text :> + Get '[JSON] Advertiser + +-- | Retrieves data about a single advertiser if that the requesting +-- advertiser\/publisher has access to it. Only publishers can lookup +-- advertisers. Advertisers can request information about themselves by +-- omitting the advertiserId query parameter. +-- +-- /See:/ 'advertisersGet' smart constructor. +data AdvertisersGet = AdvertisersGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agAdvertiserId :: !(Maybe Text) + , _agRoleId :: !Text + , _agRole :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agAdvertiserId' +-- +-- * 'agRoleId' +-- +-- * 'agRole' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +advertisersGet + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> AdvertisersGet +advertisersGet pAgRoleId_ pAgRole_ = + AdvertisersGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agAdvertiserId = Nothing + , _agRoleId = pAgRoleId_ + , _agRole = pAgRole_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AdvertisersGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AdvertisersGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AdvertisersGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The ID of the advertiser to look up. Optional. +agAdvertiserId :: Lens' AdvertisersGet' (Maybe Text) +agAdvertiserId + = lens _agAdvertiserId + (\ s a -> s{_agAdvertiserId = a}) + +-- | The ID of the requesting advertiser or publisher. +agRoleId :: Lens' AdvertisersGet' Text +agRoleId = lens _agRoleId (\ s a -> s{_agRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +agRole :: Lens' AdvertisersGet' Text +agRole = lens _agRole (\ s a -> s{_agRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AdvertisersGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AdvertisersGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AdvertisersGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AdvertisersGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AdvertisersGet' where + type Rs AdvertisersGet' = Advertiser + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u AdvertisersGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agAdvertiserId + _agRoleId + _agRole + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AdvertisersGetAPI) + r + u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/List.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/List.hs new file mode 100644 index 000000000..52a63e93c --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Advertisers/List.hs @@ -0,0 +1,269 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Advertisers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves data about all advertisers that the requesting +-- advertiser\/publisher has access to. +-- +-- /See:/ for @GanAdvertisersList@. +module Gan.Advertisers.List + ( + -- * REST Resource + AdvertisersListAPI + + -- * Creating a Request + , advertisersList + , AdvertisersList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alRelationshipStatus + , alMinSevenDayEpc + , alRoleId + , alMinNinetyDayEpc + , alRole + , alKey + , alMinPayoutRank + , alAdvertiserCategory + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanAdvertisersList@ which the +-- 'AdvertisersList' request conforms to. +type AdvertisersListAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "advertisers" :> + QueryParam "relationshipStatus" Text :> + QueryParam "minSevenDayEpc" Double :> + QueryParam "minNinetyDayEpc" Double :> + QueryParam "minPayoutRank" Int32 :> + QueryParam "advertiserCategory" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Advertisers + +-- | Retrieves data about all advertisers that the requesting +-- advertiser\/publisher has access to. +-- +-- /See:/ 'advertisersList' smart constructor. +data AdvertisersList = AdvertisersList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alRelationshipStatus :: !(Maybe Text) + , _alMinSevenDayEpc :: !(Maybe Double) + , _alRoleId :: !Text + , _alMinNinetyDayEpc :: !(Maybe Double) + , _alRole :: !Text + , _alKey :: !(Maybe Text) + , _alMinPayoutRank :: !(Maybe Int32) + , _alAdvertiserCategory :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Word32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alRelationshipStatus' +-- +-- * 'alMinSevenDayEpc' +-- +-- * 'alRoleId' +-- +-- * 'alMinNinetyDayEpc' +-- +-- * 'alRole' +-- +-- * 'alKey' +-- +-- * 'alMinPayoutRank' +-- +-- * 'alAdvertiserCategory' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +advertisersList + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> AdvertisersList +advertisersList pAlRoleId_ pAlRole_ = + AdvertisersList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alRelationshipStatus = Nothing + , _alMinSevenDayEpc = Nothing + , _alRoleId = pAlRoleId_ + , _alMinNinetyDayEpc = Nothing + , _alRole = pAlRole_ + , _alKey = Nothing + , _alMinPayoutRank = Nothing + , _alAdvertiserCategory = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AdvertisersList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AdvertisersList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AdvertisersList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Filters out all advertisers for which do not have the given relationship +-- status with the requesting publisher. +alRelationshipStatus :: Lens' AdvertisersList' (Maybe Text) +alRelationshipStatus + = lens _alRelationshipStatus + (\ s a -> s{_alRelationshipStatus = a}) + +-- | Filters out all advertisers that have a seven day EPC average lower than +-- the given value (inclusive). Min value: 0.0. Optional. +alMinSevenDayEpc :: Lens' AdvertisersList' (Maybe Double) +alMinSevenDayEpc + = lens _alMinSevenDayEpc + (\ s a -> s{_alMinSevenDayEpc = a}) + +-- | The ID of the requesting advertiser or publisher. +alRoleId :: Lens' AdvertisersList' Text +alRoleId = lens _alRoleId (\ s a -> s{_alRoleId = a}) + +-- | Filters out all advertisers that have a ninety day EPC average lower +-- than the given value (inclusive). Min value: 0.0. Optional. +alMinNinetyDayEpc :: Lens' AdvertisersList' (Maybe Double) +alMinNinetyDayEpc + = lens _alMinNinetyDayEpc + (\ s a -> s{_alMinNinetyDayEpc = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +alRole :: Lens' AdvertisersList' Text +alRole = lens _alRole (\ s a -> s{_alRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AdvertisersList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | A value between 1 and 4, where 1 represents the quartile of advertisers +-- with the lowest ranks and 4 represents the quartile of advertisers with +-- the highest ranks. Filters out all advertisers with a lower rank than +-- the given quartile. For example if a 2 was given only advertisers with a +-- payout rank of 25 or higher would be included. Optional. +alMinPayoutRank :: Lens' AdvertisersList' (Maybe Int32) +alMinPayoutRank + = lens _alMinPayoutRank + (\ s a -> s{_alMinPayoutRank = a}) + +-- | Caret(^) delimted list of advertiser categories. Valid categories are +-- defined here: +-- http:\/\/www.google.com\/support\/affiliatenetwork\/advertiser\/bin\/answer.py?hl=en&answer=107581. +-- Filters out all advertisers not in one of the given advertiser +-- categories. Optional. +alAdvertiserCategory :: Lens' AdvertisersList' (Maybe Text) +alAdvertiserCategory + = lens _alAdvertiserCategory + (\ s a -> s{_alAdvertiserCategory = a}) + +-- | The value of \'nextPageToken\' from the previous page. Optional. +alPageToken :: Lens' AdvertisersList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AdvertisersList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Max number of items to return in this page. Optional. Defaults to 20. +alMaxResults :: Lens' AdvertisersList' (Maybe Word32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AdvertisersList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AdvertisersList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AdvertisersList' where + type Rs AdvertisersList' = Advertisers + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u AdvertisersList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alRelationshipStatus + _alMinSevenDayEpc + _alRoleId + _alMinNinetyDayEpc + _alRole + _alKey + _alMinPayoutRank + _alAdvertiserCategory + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AdvertisersListAPI) + r + u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/CcOffers/List.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/CcOffers/List.hs new file mode 100644 index 000000000..2719ba614 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/CcOffers/List.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.CcOffers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves credit card offers for the given publisher. +-- +-- /See:/ for @GanCcOffersList@. +module Gan.CcOffers.List + ( + -- * REST Resource + CcOffersListAPI + + -- * Creating a Request + , ccOffersList + , CcOffersList + + -- * Request Lenses + , colQuotaUser + , colPrettyPrint + , colUserIp + , colKey + , colAdvertiser + , colProjection + , colOauthToken + , colPublisher + , colFields + , colAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanCcOffersList@ which the +-- 'CcOffersList' request conforms to. +type CcOffersListAPI = + "publishers" :> + Capture "publisher" Text :> + "ccOffers" :> + QueryParams "advertiser" Text :> + QueryParam "projection" Text :> Get '[JSON] CcOffers + +-- | Retrieves credit card offers for the given publisher. +-- +-- /See:/ 'ccOffersList' smart constructor. +data CcOffersList = CcOffersList + { _colQuotaUser :: !(Maybe Text) + , _colPrettyPrint :: !Bool + , _colUserIp :: !(Maybe Text) + , _colKey :: !(Maybe Text) + , _colAdvertiser :: !(Maybe Text) + , _colProjection :: !(Maybe Text) + , _colOauthToken :: !(Maybe Text) + , _colPublisher :: !Text + , _colFields :: !(Maybe Text) + , _colAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CcOffersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'colQuotaUser' +-- +-- * 'colPrettyPrint' +-- +-- * 'colUserIp' +-- +-- * 'colKey' +-- +-- * 'colAdvertiser' +-- +-- * 'colProjection' +-- +-- * 'colOauthToken' +-- +-- * 'colPublisher' +-- +-- * 'colFields' +-- +-- * 'colAlt' +ccOffersList + :: Text -- ^ 'publisher' + -> CcOffersList +ccOffersList pColPublisher_ = + CcOffersList + { _colQuotaUser = Nothing + , _colPrettyPrint = True + , _colUserIp = Nothing + , _colKey = Nothing + , _colAdvertiser = Nothing + , _colProjection = Nothing + , _colOauthToken = Nothing + , _colPublisher = pColPublisher_ + , _colFields = Nothing + , _colAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +colQuotaUser :: Lens' CcOffersList' (Maybe Text) +colQuotaUser + = lens _colQuotaUser (\ s a -> s{_colQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +colPrettyPrint :: Lens' CcOffersList' Bool +colPrettyPrint + = lens _colPrettyPrint + (\ s a -> s{_colPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +colUserIp :: Lens' CcOffersList' (Maybe Text) +colUserIp + = lens _colUserIp (\ s a -> s{_colUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +colKey :: Lens' CcOffersList' (Maybe Text) +colKey = lens _colKey (\ s a -> s{_colKey = a}) + +-- | The advertiser ID of a card issuer whose offers to include. Optional, +-- may be repeated. +colAdvertiser :: Lens' CcOffersList' (Maybe Text) +colAdvertiser + = lens _colAdvertiser + (\ s a -> s{_colAdvertiser = a}) + +-- | The set of fields to return. +colProjection :: Lens' CcOffersList' (Maybe Text) +colProjection + = lens _colProjection + (\ s a -> s{_colProjection = a}) + +-- | OAuth 2.0 token for the current user. +colOauthToken :: Lens' CcOffersList' (Maybe Text) +colOauthToken + = lens _colOauthToken + (\ s a -> s{_colOauthToken = a}) + +-- | The ID of the publisher in question. +colPublisher :: Lens' CcOffersList' Text +colPublisher + = lens _colPublisher (\ s a -> s{_colPublisher = a}) + +-- | Selector specifying which fields to include in a partial response. +colFields :: Lens' CcOffersList' (Maybe Text) +colFields + = lens _colFields (\ s a -> s{_colFields = a}) + +-- | Data format for the response. +colAlt :: Lens' CcOffersList' Text +colAlt = lens _colAlt (\ s a -> s{_colAlt = a}) + +instance GoogleRequest CcOffersList' where + type Rs CcOffersList' = CcOffers + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u CcOffersList{..} + = go _colQuotaUser _colPrettyPrint _colUserIp _colKey + _colAdvertiser + _colProjection + _colOauthToken + _colPublisher + _colFields + _colAlt + where go + = clientWithRoute (Proxy :: Proxy CcOffersListAPI) r + u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Events/List.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Events/List.hs new file mode 100644 index 000000000..061c8cf8f --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Events/List.hs @@ -0,0 +1,380 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Events.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves event data for a given advertiser\/publisher. +-- +-- /See:/ for @GanEventsList@. +module Gan.Events.List + ( + -- * REST Resource + EventsListAPI + + -- * Creating a Request + , eventsList + , EventsList + + -- * Request Lenses + , elStatus + , elQuotaUser + , elPrettyPrint + , elEventDateMin + , elChargeType + , elMemberId + , elUserIp + , elModifyDateMax + , elAdvertiserId + , elModifyDateMin + , elRoleId + , elRole + , elEventDateMax + , elKey + , elSku + , elLinkId + , elPageToken + , elType + , elOauthToken + , elOrderId + , elPublisherId + , elProductCategory + , elMaxResults + , elFields + , elAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanEventsList@ which the +-- 'EventsList' request conforms to. +type EventsListAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "events" :> + QueryParam "status" Text :> + QueryParam "eventDateMin" Text :> + QueryParam "chargeType" Text :> + QueryParam "memberId" Text :> + QueryParam "modifyDateMax" Text :> + QueryParam "advertiserId" Text :> + QueryParam "modifyDateMin" Text :> + QueryParam "eventDateMax" Text :> + QueryParam "sku" Text :> + QueryParam "linkId" Text :> + QueryParam "pageToken" Text :> + QueryParam "type" Text :> + QueryParam "orderId" Text :> + QueryParam "publisherId" Text :> + QueryParam "productCategory" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Events + +-- | Retrieves event data for a given advertiser\/publisher. +-- +-- /See:/ 'eventsList' smart constructor. +data EventsList = EventsList + { _elStatus :: !(Maybe Text) + , _elQuotaUser :: !(Maybe Text) + , _elPrettyPrint :: !Bool + , _elEventDateMin :: !(Maybe Text) + , _elChargeType :: !(Maybe Text) + , _elMemberId :: !(Maybe Text) + , _elUserIp :: !(Maybe Text) + , _elModifyDateMax :: !(Maybe Text) + , _elAdvertiserId :: !(Maybe Text) + , _elModifyDateMin :: !(Maybe Text) + , _elRoleId :: !Text + , _elRole :: !Text + , _elEventDateMax :: !(Maybe Text) + , _elKey :: !(Maybe Text) + , _elSku :: !(Maybe Text) + , _elLinkId :: !(Maybe Text) + , _elPageToken :: !(Maybe Text) + , _elType :: !(Maybe Text) + , _elOauthToken :: !(Maybe Text) + , _elOrderId :: !(Maybe Text) + , _elPublisherId :: !(Maybe Text) + , _elProductCategory :: !(Maybe Text) + , _elMaxResults :: !(Maybe Word32) + , _elFields :: !(Maybe Text) + , _elAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elStatus' +-- +-- * 'elQuotaUser' +-- +-- * 'elPrettyPrint' +-- +-- * 'elEventDateMin' +-- +-- * 'elChargeType' +-- +-- * 'elMemberId' +-- +-- * 'elUserIp' +-- +-- * 'elModifyDateMax' +-- +-- * 'elAdvertiserId' +-- +-- * 'elModifyDateMin' +-- +-- * 'elRoleId' +-- +-- * 'elRole' +-- +-- * 'elEventDateMax' +-- +-- * 'elKey' +-- +-- * 'elSku' +-- +-- * 'elLinkId' +-- +-- * 'elPageToken' +-- +-- * 'elType' +-- +-- * 'elOauthToken' +-- +-- * 'elOrderId' +-- +-- * 'elPublisherId' +-- +-- * 'elProductCategory' +-- +-- * 'elMaxResults' +-- +-- * 'elFields' +-- +-- * 'elAlt' +eventsList + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> EventsList +eventsList pElRoleId_ pElRole_ = + EventsList + { _elStatus = Nothing + , _elQuotaUser = Nothing + , _elPrettyPrint = True + , _elEventDateMin = Nothing + , _elChargeType = Nothing + , _elMemberId = Nothing + , _elUserIp = Nothing + , _elModifyDateMax = Nothing + , _elAdvertiserId = Nothing + , _elModifyDateMin = Nothing + , _elRoleId = pElRoleId_ + , _elRole = pElRole_ + , _elEventDateMax = Nothing + , _elKey = Nothing + , _elSku = Nothing + , _elLinkId = Nothing + , _elPageToken = Nothing + , _elType = Nothing + , _elOauthToken = Nothing + , _elOrderId = Nothing + , _elPublisherId = Nothing + , _elProductCategory = Nothing + , _elMaxResults = Nothing + , _elFields = Nothing + , _elAlt = "json" + } + +-- | Filters out all events that do not have the given status. Valid values: +-- \'active\', \'canceled\'. Optional. +elStatus :: Lens' EventsList' (Maybe Text) +elStatus = lens _elStatus (\ s a -> s{_elStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elQuotaUser :: Lens' EventsList' (Maybe Text) +elQuotaUser + = lens _elQuotaUser (\ s a -> s{_elQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elPrettyPrint :: Lens' EventsList' Bool +elPrettyPrint + = lens _elPrettyPrint + (\ s a -> s{_elPrettyPrint = a}) + +-- | Filters out all events earlier than given date. Optional. Defaults to 24 +-- hours from current date\/time. +elEventDateMin :: Lens' EventsList' (Maybe Text) +elEventDateMin + = lens _elEventDateMin + (\ s a -> s{_elEventDateMin = a}) + +-- | Filters out all charge events that are not of the given charge type. +-- Valid values: \'other\', \'slotting_fee\', \'monthly_minimum\', +-- \'tier_bonus\', \'credit\', \'debit\'. Optional. +elChargeType :: Lens' EventsList' (Maybe Text) +elChargeType + = lens _elChargeType (\ s a -> s{_elChargeType = a}) + +-- | Caret(^) delimited list of member IDs. Filters out all events that do +-- not reference one of the given member IDs. Optional. +elMemberId :: Lens' EventsList' (Maybe Text) +elMemberId + = lens _elMemberId (\ s a -> s{_elMemberId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elUserIp :: Lens' EventsList' (Maybe Text) +elUserIp = lens _elUserIp (\ s a -> s{_elUserIp = a}) + +-- | Filters out all events modified later than given date. Optional. +-- Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly +-- set. +elModifyDateMax :: Lens' EventsList' (Maybe Text) +elModifyDateMax + = lens _elModifyDateMax + (\ s a -> s{_elModifyDateMax = a}) + +-- | Caret(^) delimited list of advertiser IDs. Filters out all events that +-- do not reference one of the given advertiser IDs. Only used when under +-- publishers role. Optional. +elAdvertiserId :: Lens' EventsList' (Maybe Text) +elAdvertiserId + = lens _elAdvertiserId + (\ s a -> s{_elAdvertiserId = a}) + +-- | Filters out all events modified earlier than given date. Optional. +-- Defaults to 24 hours before the current modifyDateMax, if modifyDateMax +-- is explicitly set. +elModifyDateMin :: Lens' EventsList' (Maybe Text) +elModifyDateMin + = lens _elModifyDateMin + (\ s a -> s{_elModifyDateMin = a}) + +-- | The ID of the requesting advertiser or publisher. +elRoleId :: Lens' EventsList' Text +elRoleId = lens _elRoleId (\ s a -> s{_elRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +elRole :: Lens' EventsList' Text +elRole = lens _elRole (\ s a -> s{_elRole = a}) + +-- | Filters out all events later than given date. Optional. Defaults to 24 +-- hours after eventMin. +elEventDateMax :: Lens' EventsList' (Maybe Text) +elEventDateMax + = lens _elEventDateMax + (\ s a -> s{_elEventDateMax = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elKey :: Lens' EventsList' (Maybe Text) +elKey = lens _elKey (\ s a -> s{_elKey = a}) + +-- | Caret(^) delimited list of SKUs. Filters out all events that do not +-- reference one of the given SKU. Optional. +elSku :: Lens' EventsList' (Maybe Text) +elSku = lens _elSku (\ s a -> s{_elSku = a}) + +-- | Caret(^) delimited list of link IDs. Filters out all events that do not +-- reference one of the given link IDs. Optional. +elLinkId :: Lens' EventsList' (Maybe Text) +elLinkId = lens _elLinkId (\ s a -> s{_elLinkId = a}) + +-- | The value of \'nextPageToken\' from the previous page. Optional. +elPageToken :: Lens' EventsList' (Maybe Text) +elPageToken + = lens _elPageToken (\ s a -> s{_elPageToken = a}) + +-- | Filters out all events that are not of the given type. Valid values: +-- \'action\', \'transaction\', \'charge\'. Optional. +elType :: Lens' EventsList' (Maybe Text) +elType = lens _elType (\ s a -> s{_elType = a}) + +-- | OAuth 2.0 token for the current user. +elOauthToken :: Lens' EventsList' (Maybe Text) +elOauthToken + = lens _elOauthToken (\ s a -> s{_elOauthToken = a}) + +-- | Caret(^) delimited list of order IDs. Filters out all events that do not +-- reference one of the given order IDs. Optional. +elOrderId :: Lens' EventsList' (Maybe Text) +elOrderId + = lens _elOrderId (\ s a -> s{_elOrderId = a}) + +-- | Caret(^) delimited list of publisher IDs. Filters out all events that do +-- not reference one of the given publishers IDs. Only used when under +-- advertiser role. Optional. +elPublisherId :: Lens' EventsList' (Maybe Text) +elPublisherId + = lens _elPublisherId + (\ s a -> s{_elPublisherId = a}) + +-- | Caret(^) delimited list of product categories. Filters out all events +-- that do not reference a product in one of the given product categories. +-- Optional. +elProductCategory :: Lens' EventsList' (Maybe Text) +elProductCategory + = lens _elProductCategory + (\ s a -> s{_elProductCategory = a}) + +-- | Max number of offers to return in this page. Optional. Defaults to 20. +elMaxResults :: Lens' EventsList' (Maybe Word32) +elMaxResults + = lens _elMaxResults (\ s a -> s{_elMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +elFields :: Lens' EventsList' (Maybe Text) +elFields = lens _elFields (\ s a -> s{_elFields = a}) + +-- | Data format for the response. +elAlt :: Lens' EventsList' Text +elAlt = lens _elAlt (\ s a -> s{_elAlt = a}) + +instance GoogleRequest EventsList' where + type Rs EventsList' = Events + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u EventsList{..} + = go _elStatus _elQuotaUser _elPrettyPrint + _elEventDateMin + _elChargeType + _elMemberId + _elUserIp + _elModifyDateMax + _elAdvertiserId + _elModifyDateMin + _elRoleId + _elRole + _elEventDateMax + _elKey + _elSku + _elLinkId + _elPageToken + _elType + _elOauthToken + _elOrderId + _elPublisherId + _elProductCategory + _elMaxResults + _elFields + _elAlt + where go + = clientWithRoute (Proxy :: Proxy EventsListAPI) r u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Get.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Get.hs new file mode 100644 index 000000000..fbe7d84b0 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Get.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Links.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves data about a single link if the requesting +-- advertiser\/publisher has access to it. Advertisers can look up their +-- own links. Publishers can look up visible links or links belonging to +-- advertisers they are in a relationship with. +-- +-- /See:/ for @GanLinksGet@. +module Gan.Links.Get + ( + -- * REST Resource + LinksGetAPI + + -- * Creating a Request + , linksGet + , LinksGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgUserIp + , lgRoleId + , lgRole + , lgKey + , lgLinkId + , lgOauthToken + , lgFields + , lgAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanLinksGet@ which the +-- 'LinksGet' request conforms to. +type LinksGetAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "link" :> Capture "linkId" Int64 :> Get '[JSON] Link + +-- | Retrieves data about a single link if the requesting +-- advertiser\/publisher has access to it. Advertisers can look up their +-- own links. Publishers can look up visible links or links belonging to +-- advertisers they are in a relationship with. +-- +-- /See:/ 'linksGet' smart constructor. +data LinksGet = LinksGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgUserIp :: !(Maybe Text) + , _lgRoleId :: !Text + , _lgRole :: !Text + , _lgKey :: !(Maybe Text) + , _lgLinkId :: !Int64 + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgUserIp' +-- +-- * 'lgRoleId' +-- +-- * 'lgRole' +-- +-- * 'lgKey' +-- +-- * 'lgLinkId' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgAlt' +linksGet + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> Int64 -- ^ 'linkId' + -> LinksGet +linksGet pLgRoleId_ pLgRole_ pLgLinkId_ = + LinksGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgUserIp = Nothing + , _lgRoleId = pLgRoleId_ + , _lgRole = pLgRole_ + , _lgKey = Nothing + , _lgLinkId = pLgLinkId_ + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LinksGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LinksGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LinksGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | The ID of the requesting advertiser or publisher. +lgRoleId :: Lens' LinksGet' Text +lgRoleId = lens _lgRoleId (\ s a -> s{_lgRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +lgRole :: Lens' LinksGet' Text +lgRole = lens _lgRole (\ s a -> s{_lgRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LinksGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | The ID of the link to look up. +lgLinkId :: Lens' LinksGet' Int64 +lgLinkId = lens _lgLinkId (\ s a -> s{_lgLinkId = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LinksGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LinksGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | Data format for the response. +lgAlt :: Lens' LinksGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LinksGet' where + type Rs LinksGet' = Link + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u LinksGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgUserIp _lgRoleId + _lgRole + _lgKey + _lgLinkId + _lgOauthToken + _lgFields + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LinksGetAPI) r u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Insert.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Insert.hs new file mode 100644 index 000000000..90ae5f287 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/Insert.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Links.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new link. +-- +-- /See:/ for @GanLinksInsert@. +module Gan.Links.Insert + ( + -- * REST Resource + LinksInsertAPI + + -- * Creating a Request + , linksInsert + , LinksInsert + + -- * Request Lenses + , liQuotaUser + , liPrettyPrint + , liUserIp + , liRoleId + , liRole + , liKey + , liOauthToken + , liFields + , liAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanLinksInsert@ which the +-- 'LinksInsert' request conforms to. +type LinksInsertAPI = + Capture "role" Text :> + Capture "roleId" Text :> "link" :> Post '[JSON] Link + +-- | Inserts a new link. +-- +-- /See:/ 'linksInsert' smart constructor. +data LinksInsert = LinksInsert + { _liQuotaUser :: !(Maybe Text) + , _liPrettyPrint :: !Bool + , _liUserIp :: !(Maybe Text) + , _liRoleId :: !Text + , _liRole :: !Text + , _liKey :: !(Maybe Text) + , _liOauthToken :: !(Maybe Text) + , _liFields :: !(Maybe Text) + , _liAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'liQuotaUser' +-- +-- * 'liPrettyPrint' +-- +-- * 'liUserIp' +-- +-- * 'liRoleId' +-- +-- * 'liRole' +-- +-- * 'liKey' +-- +-- * 'liOauthToken' +-- +-- * 'liFields' +-- +-- * 'liAlt' +linksInsert + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> LinksInsert +linksInsert pLiRoleId_ pLiRole_ = + LinksInsert + { _liQuotaUser = Nothing + , _liPrettyPrint = True + , _liUserIp = Nothing + , _liRoleId = pLiRoleId_ + , _liRole = pLiRole_ + , _liKey = Nothing + , _liOauthToken = Nothing + , _liFields = Nothing + , _liAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +liQuotaUser :: Lens' LinksInsert' (Maybe Text) +liQuotaUser + = lens _liQuotaUser (\ s a -> s{_liQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +liPrettyPrint :: Lens' LinksInsert' Bool +liPrettyPrint + = lens _liPrettyPrint + (\ s a -> s{_liPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +liUserIp :: Lens' LinksInsert' (Maybe Text) +liUserIp = lens _liUserIp (\ s a -> s{_liUserIp = a}) + +-- | The ID of the requesting advertiser or publisher. +liRoleId :: Lens' LinksInsert' Text +liRoleId = lens _liRoleId (\ s a -> s{_liRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +liRole :: Lens' LinksInsert' Text +liRole = lens _liRole (\ s a -> s{_liRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +liKey :: Lens' LinksInsert' (Maybe Text) +liKey = lens _liKey (\ s a -> s{_liKey = a}) + +-- | OAuth 2.0 token for the current user. +liOauthToken :: Lens' LinksInsert' (Maybe Text) +liOauthToken + = lens _liOauthToken (\ s a -> s{_liOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +liFields :: Lens' LinksInsert' (Maybe Text) +liFields = lens _liFields (\ s a -> s{_liFields = a}) + +-- | Data format for the response. +liAlt :: Lens' LinksInsert' Text +liAlt = lens _liAlt (\ s a -> s{_liAlt = a}) + +instance GoogleRequest LinksInsert' where + type Rs LinksInsert' = Link + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u LinksInsert{..} + = go _liQuotaUser _liPrettyPrint _liUserIp _liRoleId + _liRole + _liKey + _liOauthToken + _liFields + _liAlt + where go + = clientWithRoute (Proxy :: Proxy LinksInsertAPI) r u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/List.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/List.hs new file mode 100644 index 000000000..eac6ffc98 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Links/List.hs @@ -0,0 +1,330 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Links.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves all links that match the query parameters. +-- +-- /See:/ for @GanLinksList@. +module Gan.Links.List + ( + -- * REST Resource + LinksListAPI + + -- * Creating a Request + , linksList + , LinksList + + -- * Request Lenses + , llCreateDateMax + , llAuthorship + , llQuotaUser + , llPrettyPrint + , llAssetSize + , llUserIp + , llRelationshipStatus + , llAdvertiserId + , llSearchText + , llPromotionType + , llRoleId + , llRole + , llKey + , llCreateDateMin + , llLinkType + , llPageToken + , llStartDateMax + , llOauthToken + , llStartDateMin + , llMaxResults + , llFields + , llAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanLinksList@ which the +-- 'LinksList' request conforms to. +type LinksListAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "links" :> + QueryParam "createDateMax" Text :> + QueryParam "authorship" Text :> + QueryParams "assetSize" Text :> + QueryParam "relationshipStatus" Text :> + QueryParams "advertiserId" Int64 :> + QueryParam "searchText" Text :> + QueryParams "promotionType" Text :> + QueryParam "createDateMin" Text :> + QueryParam "linkType" Text :> + QueryParam "pageToken" Text :> + QueryParam "startDateMax" Text :> + QueryParam "startDateMin" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Links + +-- | Retrieves all links that match the query parameters. +-- +-- /See:/ 'linksList' smart constructor. +data LinksList = LinksList + { _llCreateDateMax :: !(Maybe Text) + , _llAuthorship :: !(Maybe Text) + , _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llAssetSize :: !(Maybe Text) + , _llUserIp :: !(Maybe Text) + , _llRelationshipStatus :: !(Maybe Text) + , _llAdvertiserId :: !(Maybe Int64) + , _llSearchText :: !(Maybe Text) + , _llPromotionType :: !(Maybe Text) + , _llRoleId :: !Text + , _llRole :: !Text + , _llKey :: !(Maybe Text) + , _llCreateDateMin :: !(Maybe Text) + , _llLinkType :: !(Maybe Text) + , _llPageToken :: !(Maybe Text) + , _llStartDateMax :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llStartDateMin :: !(Maybe Text) + , _llMaxResults :: !(Maybe Word32) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llCreateDateMax' +-- +-- * 'llAuthorship' +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llAssetSize' +-- +-- * 'llUserIp' +-- +-- * 'llRelationshipStatus' +-- +-- * 'llAdvertiserId' +-- +-- * 'llSearchText' +-- +-- * 'llPromotionType' +-- +-- * 'llRoleId' +-- +-- * 'llRole' +-- +-- * 'llKey' +-- +-- * 'llCreateDateMin' +-- +-- * 'llLinkType' +-- +-- * 'llPageToken' +-- +-- * 'llStartDateMax' +-- +-- * 'llOauthToken' +-- +-- * 'llStartDateMin' +-- +-- * 'llMaxResults' +-- +-- * 'llFields' +-- +-- * 'llAlt' +linksList + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> LinksList +linksList pLlRoleId_ pLlRole_ = + LinksList + { _llCreateDateMax = Nothing + , _llAuthorship = Nothing + , _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llAssetSize = Nothing + , _llUserIp = Nothing + , _llRelationshipStatus = Nothing + , _llAdvertiserId = Nothing + , _llSearchText = Nothing + , _llPromotionType = Nothing + , _llRoleId = pLlRoleId_ + , _llRole = pLlRole_ + , _llKey = Nothing + , _llCreateDateMin = Nothing + , _llLinkType = Nothing + , _llPageToken = Nothing + , _llStartDateMax = Nothing + , _llOauthToken = Nothing + , _llStartDateMin = Nothing + , _llMaxResults = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | The end of the create date range. +llCreateDateMax :: Lens' LinksList' (Maybe Text) +llCreateDateMax + = lens _llCreateDateMax + (\ s a -> s{_llCreateDateMax = a}) + +-- | The role of the author of the link. +llAuthorship :: Lens' LinksList' (Maybe Text) +llAuthorship + = lens _llAuthorship (\ s a -> s{_llAuthorship = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LinksList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LinksList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | The size of the given asset. +llAssetSize :: Lens' LinksList' (Maybe Text) +llAssetSize + = lens _llAssetSize (\ s a -> s{_llAssetSize = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LinksList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | The status of the relationship. +llRelationshipStatus :: Lens' LinksList' (Maybe Text) +llRelationshipStatus + = lens _llRelationshipStatus + (\ s a -> s{_llRelationshipStatus = a}) + +-- | Limits the resulting links to the ones belonging to the listed +-- advertisers. +llAdvertiserId :: Lens' LinksList' (Maybe Int64) +llAdvertiserId + = lens _llAdvertiserId + (\ s a -> s{_llAdvertiserId = a}) + +-- | Field for full text search across title and merchandising text, supports +-- link id search. +llSearchText :: Lens' LinksList' (Maybe Text) +llSearchText + = lens _llSearchText (\ s a -> s{_llSearchText = a}) + +-- | The promotion type. +llPromotionType :: Lens' LinksList' (Maybe Text) +llPromotionType + = lens _llPromotionType + (\ s a -> s{_llPromotionType = a}) + +-- | The ID of the requesting advertiser or publisher. +llRoleId :: Lens' LinksList' Text +llRoleId = lens _llRoleId (\ s a -> s{_llRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +llRole :: Lens' LinksList' Text +llRole = lens _llRole (\ s a -> s{_llRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LinksList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | The beginning of the create date range. +llCreateDateMin :: Lens' LinksList' (Maybe Text) +llCreateDateMin + = lens _llCreateDateMin + (\ s a -> s{_llCreateDateMin = a}) + +-- | The type of the link. +llLinkType :: Lens' LinksList' (Maybe Text) +llLinkType + = lens _llLinkType (\ s a -> s{_llLinkType = a}) + +-- | The value of \'nextPageToken\' from the previous page. Optional. +llPageToken :: Lens' LinksList' (Maybe Text) +llPageToken + = lens _llPageToken (\ s a -> s{_llPageToken = a}) + +-- | The end of the start date range. +llStartDateMax :: Lens' LinksList' (Maybe Text) +llStartDateMax + = lens _llStartDateMax + (\ s a -> s{_llStartDateMax = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LinksList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | The beginning of the start date range. +llStartDateMin :: Lens' LinksList' (Maybe Text) +llStartDateMin + = lens _llStartDateMin + (\ s a -> s{_llStartDateMin = a}) + +-- | Max number of items to return in this page. Optional. Defaults to 20. +llMaxResults :: Lens' LinksList' (Maybe Word32) +llMaxResults + = lens _llMaxResults (\ s a -> s{_llMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LinksList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LinksList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LinksList' where + type Rs LinksList' = Links + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u LinksList{..} + = go _llCreateDateMax _llAuthorship _llQuotaUser + _llPrettyPrint + _llAssetSize + _llUserIp + _llRelationshipStatus + _llAdvertiserId + _llSearchText + _llPromotionType + _llRoleId + _llRole + _llKey + _llCreateDateMin + _llLinkType + _llPageToken + _llStartDateMax + _llOauthToken + _llStartDateMin + _llMaxResults + _llFields + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LinksListAPI) r u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/Get.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/Get.hs new file mode 100644 index 000000000..5da72349a --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Publishers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves data about a single advertiser if that the requesting +-- advertiser\/publisher has access to it. Only advertisers can look up +-- publishers. Publishers can request information about themselves by +-- omitting the publisherId query parameter. +-- +-- /See:/ for @GanPublishersGet@. +module Gan.Publishers.Get + ( + -- * REST Resource + PublishersGetAPI + + -- * Creating a Request + , publishersGet + , PublishersGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgRoleId + , pgRole + , pgKey + , pgOauthToken + , pgPublisherId + , pgFields + , pgAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanPublishersGet@ which the +-- 'PublishersGet' request conforms to. +type PublishersGetAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "publisher" :> + QueryParam "publisherId" Text :> + Get '[JSON] Publisher + +-- | Retrieves data about a single advertiser if that the requesting +-- advertiser\/publisher has access to it. Only advertisers can look up +-- publishers. Publishers can request information about themselves by +-- omitting the publisherId query parameter. +-- +-- /See:/ 'publishersGet' smart constructor. +data PublishersGet = PublishersGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgRoleId :: !Text + , _pgRole :: !Text + , _pgKey :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgPublisherId :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgRoleId' +-- +-- * 'pgRole' +-- +-- * 'pgKey' +-- +-- * 'pgOauthToken' +-- +-- * 'pgPublisherId' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +publishersGet + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> PublishersGet +publishersGet pPgRoleId_ pPgRole_ = + PublishersGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgRoleId = pPgRoleId_ + , _pgRole = pPgRole_ + , _pgKey = Nothing + , _pgOauthToken = Nothing + , _pgPublisherId = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PublishersGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PublishersGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PublishersGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | The ID of the requesting advertiser or publisher. +pgRoleId :: Lens' PublishersGet' Text +pgRoleId = lens _pgRoleId (\ s a -> s{_pgRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +pgRole :: Lens' PublishersGet' Text +pgRole = lens _pgRole (\ s a -> s{_pgRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PublishersGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PublishersGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | The ID of the publisher to look up. Optional. +pgPublisherId :: Lens' PublishersGet' (Maybe Text) +pgPublisherId + = lens _pgPublisherId + (\ s a -> s{_pgPublisherId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PublishersGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PublishersGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PublishersGet' where + type Rs PublishersGet' = Publisher + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u PublishersGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgRoleId + _pgRole + _pgKey + _pgOauthToken + _pgPublisherId + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PublishersGetAPI) r + u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/List.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/List.hs new file mode 100644 index 000000000..4313cd0b8 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Publishers/List.hs @@ -0,0 +1,268 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Publishers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves data about all publishers that the requesting +-- advertiser\/publisher has access to. +-- +-- /See:/ for @GanPublishersList@. +module Gan.Publishers.List + ( + -- * REST Resource + PublishersListAPI + + -- * Creating a Request + , publishersList + , PublishersList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plRelationshipStatus + , plMinSevenDayEpc + , plRoleId + , plMinNinetyDayEpc + , plRole + , plKey + , plMinPayoutRank + , plPageToken + , plOauthToken + , plPublisherCategory + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanPublishersList@ which the +-- 'PublishersList' request conforms to. +type PublishersListAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "publishers" :> + QueryParam "relationshipStatus" Text :> + QueryParam "minSevenDayEpc" Double :> + QueryParam "minNinetyDayEpc" Double :> + QueryParam "minPayoutRank" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "publisherCategory" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Publishers + +-- | Retrieves data about all publishers that the requesting +-- advertiser\/publisher has access to. +-- +-- /See:/ 'publishersList' smart constructor. +data PublishersList = PublishersList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plRelationshipStatus :: !(Maybe Text) + , _plMinSevenDayEpc :: !(Maybe Double) + , _plRoleId :: !Text + , _plMinNinetyDayEpc :: !(Maybe Double) + , _plRole :: !Text + , _plKey :: !(Maybe Text) + , _plMinPayoutRank :: !(Maybe Int32) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plPublisherCategory :: !(Maybe Text) + , _plMaxResults :: !(Maybe Word32) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plRelationshipStatus' +-- +-- * 'plMinSevenDayEpc' +-- +-- * 'plRoleId' +-- +-- * 'plMinNinetyDayEpc' +-- +-- * 'plRole' +-- +-- * 'plKey' +-- +-- * 'plMinPayoutRank' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plPublisherCategory' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +publishersList + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> PublishersList +publishersList pPlRoleId_ pPlRole_ = + PublishersList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plRelationshipStatus = Nothing + , _plMinSevenDayEpc = Nothing + , _plRoleId = pPlRoleId_ + , _plMinNinetyDayEpc = Nothing + , _plRole = pPlRole_ + , _plKey = Nothing + , _plMinPayoutRank = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plPublisherCategory = Nothing + , _plMaxResults = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PublishersList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PublishersList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PublishersList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | Filters out all publishers for which do not have the given relationship +-- status with the requesting publisher. +plRelationshipStatus :: Lens' PublishersList' (Maybe Text) +plRelationshipStatus + = lens _plRelationshipStatus + (\ s a -> s{_plRelationshipStatus = a}) + +-- | Filters out all publishers that have a seven day EPC average lower than +-- the given value (inclusive). Min value 0.0. Optional. +plMinSevenDayEpc :: Lens' PublishersList' (Maybe Double) +plMinSevenDayEpc + = lens _plMinSevenDayEpc + (\ s a -> s{_plMinSevenDayEpc = a}) + +-- | The ID of the requesting advertiser or publisher. +plRoleId :: Lens' PublishersList' Text +plRoleId = lens _plRoleId (\ s a -> s{_plRoleId = a}) + +-- | Filters out all publishers that have a ninety day EPC average lower than +-- the given value (inclusive). Min value: 0.0. Optional. +plMinNinetyDayEpc :: Lens' PublishersList' (Maybe Double) +plMinNinetyDayEpc + = lens _plMinNinetyDayEpc + (\ s a -> s{_plMinNinetyDayEpc = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +plRole :: Lens' PublishersList' Text +plRole = lens _plRole (\ s a -> s{_plRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PublishersList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | A value between 1 and 4, where 1 represents the quartile of publishers +-- with the lowest ranks and 4 represents the quartile of publishers with +-- the highest ranks. Filters out all publishers with a lower rank than the +-- given quartile. For example if a 2 was given only publishers with a +-- payout rank of 25 or higher would be included. Optional. +plMinPayoutRank :: Lens' PublishersList' (Maybe Int32) +plMinPayoutRank + = lens _plMinPayoutRank + (\ s a -> s{_plMinPayoutRank = a}) + +-- | The value of \'nextPageToken\' from the previous page. Optional. +plPageToken :: Lens' PublishersList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PublishersList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Caret(^) delimted list of publisher categories. Valid categories: +-- (unclassified|community_and_content|shopping_and_promotion|loyalty_and_rewards|network|search_specialist|comparison_shopping|email). +-- Filters out all publishers not in one of the given advertiser +-- categories. Optional. +plPublisherCategory :: Lens' PublishersList' (Maybe Text) +plPublisherCategory + = lens _plPublisherCategory + (\ s a -> s{_plPublisherCategory = a}) + +-- | Max number of items to return in this page. Optional. Defaults to 20. +plMaxResults :: Lens' PublishersList' (Maybe Word32) +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PublishersList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PublishersList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PublishersList' where + type Rs PublishersList' = Publishers + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u PublishersList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp + _plRelationshipStatus + _plMinSevenDayEpc + _plRoleId + _plMinNinetyDayEpc + _plRole + _plKey + _plMinPayoutRank + _plPageToken + _plOauthToken + _plPublisherCategory + _plMaxResults + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PublishersListAPI) + r + u diff --git a/gogol-affiliates/gen/Network/Google/Resource/Gan/Reports/Get.hs b/gogol-affiliates/gen/Network/Google/Resource/Gan/Reports/Get.hs new file mode 100644 index 000000000..359967c44 --- /dev/null +++ b/gogol-affiliates/gen/Network/Google/Resource/Gan/Reports/Get.hs @@ -0,0 +1,318 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gan.Reports.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report of the specified type. +-- +-- /See:/ for @GanReportsGet@. +module Gan.Reports.Get + ( + -- * REST Resource + ReportsGetAPI + + -- * Creating a Request + , reportsGet + , ReportsGet + + -- * Request Lenses + , rgStatus + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgAdvertiserId + , rgEndDate + , rgRoleId + , rgRole + , rgEventType + , rgStartDate + , rgKey + , rgCalculateTotals + , rgLinkId + , rgOauthToken + , rgOrderId + , rgPublisherId + , rgReportType + , rgStartIndex + , rgMaxResults + , rgFields + , rgAlt + ) where + +import Network.Google.Affiliates.Types +import Network.Google.Prelude + +-- | A resource alias for @GanReportsGet@ which the +-- 'ReportsGet' request conforms to. +type ReportsGetAPI = + Capture "role" Text :> + Capture "roleId" Text :> + "report" :> + Capture "reportType" Text :> + QueryParam "status" Text :> + QueryParams "advertiserId" Text :> + QueryParam "endDate" Text :> + QueryParam "eventType" Text :> + QueryParam "startDate" Text :> + QueryParam "calculateTotals" Bool :> + QueryParams "linkId" Text :> + QueryParams "orderId" Text :> + QueryParams "publisherId" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Report + +-- | Retrieves a report of the specified type. +-- +-- /See:/ 'reportsGet' smart constructor. +data ReportsGet = ReportsGet + { _rgStatus :: !(Maybe Text) + , _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgAdvertiserId :: !(Maybe Text) + , _rgEndDate :: !(Maybe Text) + , _rgRoleId :: !Text + , _rgRole :: !Text + , _rgEventType :: !(Maybe Text) + , _rgStartDate :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgCalculateTotals :: !(Maybe Bool) + , _rgLinkId :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgOrderId :: !(Maybe Text) + , _rgPublisherId :: !(Maybe Text) + , _rgReportType :: !Text + , _rgStartIndex :: !(Maybe Word32) + , _rgMaxResults :: !(Maybe Word32) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgStatus' +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgAdvertiserId' +-- +-- * 'rgEndDate' +-- +-- * 'rgRoleId' +-- +-- * 'rgRole' +-- +-- * 'rgEventType' +-- +-- * 'rgStartDate' +-- +-- * 'rgKey' +-- +-- * 'rgCalculateTotals' +-- +-- * 'rgLinkId' +-- +-- * 'rgOauthToken' +-- +-- * 'rgOrderId' +-- +-- * 'rgPublisherId' +-- +-- * 'rgReportType' +-- +-- * 'rgStartIndex' +-- +-- * 'rgMaxResults' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +reportsGet + :: Text -- ^ 'roleId' + -> Text -- ^ 'role' + -> Text -- ^ 'reportType' + -> ReportsGet +reportsGet pRgRoleId_ pRgRole_ pRgReportType_ = + ReportsGet + { _rgStatus = Nothing + , _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgAdvertiserId = Nothing + , _rgEndDate = Nothing + , _rgRoleId = pRgRoleId_ + , _rgRole = pRgRole_ + , _rgEventType = Nothing + , _rgStartDate = Nothing + , _rgKey = Nothing + , _rgCalculateTotals = Nothing + , _rgLinkId = Nothing + , _rgOauthToken = Nothing + , _rgOrderId = Nothing + , _rgPublisherId = Nothing + , _rgReportType = pRgReportType_ + , _rgStartIndex = Nothing + , _rgMaxResults = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Filters out all events that do not have the given status. Valid values: +-- \'active\', \'canceled\', or \'invalid\'. Optional. +rgStatus :: Lens' ReportsGet' (Maybe Text) +rgStatus = lens _rgStatus (\ s a -> s{_rgStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReportsGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReportsGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReportsGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | The IDs of the advertisers to look up, if applicable. +rgAdvertiserId :: Lens' ReportsGet' (Maybe Text) +rgAdvertiserId + = lens _rgAdvertiserId + (\ s a -> s{_rgAdvertiserId = a}) + +-- | The end date (exclusive), in RFC 3339 format, for the report data to be +-- returned. Defaults to one day after startDate, if that is given, or +-- today. Optional. +rgEndDate :: Lens' ReportsGet' (Maybe Text) +rgEndDate + = lens _rgEndDate (\ s a -> s{_rgEndDate = a}) + +-- | The ID of the requesting advertiser or publisher. +rgRoleId :: Lens' ReportsGet' Text +rgRoleId = lens _rgRoleId (\ s a -> s{_rgRoleId = a}) + +-- | The role of the requester. Valid values: \'advertisers\' or +-- \'publishers\'. +rgRole :: Lens' ReportsGet' Text +rgRole = lens _rgRole (\ s a -> s{_rgRole = a}) + +-- | Filters out all events that are not of the given type. Valid values: +-- \'action\', \'transaction\', or \'charge\'. Optional. +rgEventType :: Lens' ReportsGet' (Maybe Text) +rgEventType + = lens _rgEventType (\ s a -> s{_rgEventType = a}) + +-- | The start date (inclusive), in RFC 3339 format, for the report data to +-- be returned. Defaults to one day before endDate, if that is given, or +-- yesterday. Optional. +rgStartDate :: Lens' ReportsGet' (Maybe Text) +rgStartDate + = lens _rgStartDate (\ s a -> s{_rgStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReportsGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | Whether or not to calculate totals rows. Optional. +rgCalculateTotals :: Lens' ReportsGet' (Maybe Bool) +rgCalculateTotals + = lens _rgCalculateTotals + (\ s a -> s{_rgCalculateTotals = a}) + +-- | Filters to capture one of given link IDs. Optional. +rgLinkId :: Lens' ReportsGet' (Maybe Text) +rgLinkId = lens _rgLinkId (\ s a -> s{_rgLinkId = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReportsGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Filters to capture one of the given order IDs. Optional. +rgOrderId :: Lens' ReportsGet' (Maybe Text) +rgOrderId + = lens _rgOrderId (\ s a -> s{_rgOrderId = a}) + +-- | The IDs of the publishers to look up, if applicable. +rgPublisherId :: Lens' ReportsGet' (Maybe Text) +rgPublisherId + = lens _rgPublisherId + (\ s a -> s{_rgPublisherId = a}) + +-- | The type of report being requested. Valid values: \'order_delta\'. +-- Required. +rgReportType :: Lens' ReportsGet' Text +rgReportType + = lens _rgReportType (\ s a -> s{_rgReportType = a}) + +-- | Offset on which to return results when paging. Optional. +rgStartIndex :: Lens' ReportsGet' (Maybe Word32) +rgStartIndex + = lens _rgStartIndex (\ s a -> s{_rgStartIndex = a}) + +-- | Max number of items to return in this page. Optional. Defaults to return +-- all results. +rgMaxResults :: Lens' ReportsGet' (Maybe Word32) +rgMaxResults + = lens _rgMaxResults (\ s a -> s{_rgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReportsGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReportsGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReportsGet' where + type Rs ReportsGet' = Report + request = requestWithRoute defReq affiliatesURL + requestWithRoute r u ReportsGet{..} + = go _rgStatus _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgAdvertiserId + _rgEndDate + _rgRoleId + _rgRole + _rgEventType + _rgStartDate + _rgKey + _rgCalculateTotals + _rgLinkId + _rgOauthToken + _rgOrderId + _rgPublisherId + _rgReportType + _rgStartIndex + _rgMaxResults + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGetAPI) r u diff --git a/gogol-affiliates/gogol-affiliates.cabal b/gogol-affiliates/gogol-affiliates.cabal new file mode 100644 index 000000000..538afbcbb --- /dev/null +++ b/gogol-affiliates/gogol-affiliates.cabal @@ -0,0 +1,52 @@ +name: gogol-affiliates +version: 0.0.1 +synopsis: Google Affiliate Network API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you have programmatic access to your Google Affiliate Network data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Affiliates + , Network.Google.Affiliates.Types + , Network.Google.Resource.Gan.Advertisers.Get + , Network.Google.Resource.Gan.Advertisers.List + , Network.Google.Resource.Gan.CcOffers.List + , Network.Google.Resource.Gan.Events.List + , Network.Google.Resource.Gan.Links.Get + , Network.Google.Resource.Gan.Links.Insert + , Network.Google.Resource.Gan.Links.List + , Network.Google.Resource.Gan.Publishers.Get + , Network.Google.Resource.Gan.Publishers.List + , Network.Google.Resource.Gan.Reports.Get + + other-modules: + Network.Google.Affiliates.Types.Product + , Network.Google.Affiliates.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-affiliates/src/.gitkeep b/gogol-affiliates/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-analytics/LICENSE b/gogol-analytics/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-analytics/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-analytics/Makefile b/gogol-analytics/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-analytics/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-analytics/README.md b/gogol-analytics/README.md new file mode 100644 index 000000000..be59264c7 --- /dev/null +++ b/gogol-analytics/README.md @@ -0,0 +1,28 @@ +# gogol-analytics + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Analytics API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-analytics` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-analytics/Setup.hs b/gogol-analytics/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-analytics/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-analytics/gen/Network/Google/Analytics.hs b/gogol-analytics/gen/Network/Google/Analytics.hs new file mode 100644 index 000000000..6be8b56f6 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Analytics.hs @@ -0,0 +1,980 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Analytics +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | View and manage your Google Analytics data +-- +-- /See:/ +module Network.Google.Analytics + ( + -- * API + AnalyticsAPI + , analyticsAPI + , analyticsURL + + -- * Service Methods + + -- * REST Resources + + -- ** AnalyticsDataGaGet + , module Analytics.Data.Ga.Get + + -- ** AnalyticsDataMcfGet + , module Analytics.Data.Mcf.Get + + -- ** AnalyticsDataRealtimeGet + , module Analytics.Data.Realtime.Get + + -- ** AnalyticsManagementAccountSummariesList + , module Analytics.Management.AccountSummaries.List + + -- ** AnalyticsManagementAccountUserLinksDelete + , module Analytics.Management.AccountUserLinks.Delete + + -- ** AnalyticsManagementAccountUserLinksInsert + , module Analytics.Management.AccountUserLinks.Insert + + -- ** AnalyticsManagementAccountUserLinksList + , module Analytics.Management.AccountUserLinks.List + + -- ** AnalyticsManagementAccountUserLinksUpdate + , module Analytics.Management.AccountUserLinks.Update + + -- ** AnalyticsManagementAccountsList + , module Analytics.Management.Accounts.List + + -- ** AnalyticsManagementCustomDataSourcesList + , module Analytics.Management.CustomDataSources.List + + -- ** AnalyticsManagementCustomDimensionsGet + , module Analytics.Management.CustomDimensions.Get + + -- ** AnalyticsManagementCustomDimensionsInsert + , module Analytics.Management.CustomDimensions.Insert + + -- ** AnalyticsManagementCustomDimensionsList + , module Analytics.Management.CustomDimensions.List + + -- ** AnalyticsManagementCustomDimensionsPatch + , module Analytics.Management.CustomDimensions.Patch + + -- ** AnalyticsManagementCustomDimensionsUpdate + , module Analytics.Management.CustomDimensions.Update + + -- ** AnalyticsManagementCustomMetricsGet + , module Analytics.Management.CustomMetrics.Get + + -- ** AnalyticsManagementCustomMetricsInsert + , module Analytics.Management.CustomMetrics.Insert + + -- ** AnalyticsManagementCustomMetricsList + , module Analytics.Management.CustomMetrics.List + + -- ** AnalyticsManagementCustomMetricsPatch + , module Analytics.Management.CustomMetrics.Patch + + -- ** AnalyticsManagementCustomMetricsUpdate + , module Analytics.Management.CustomMetrics.Update + + -- ** AnalyticsManagementExperimentsDelete + , module Analytics.Management.Experiments.Delete + + -- ** AnalyticsManagementExperimentsGet + , module Analytics.Management.Experiments.Get + + -- ** AnalyticsManagementExperimentsInsert + , module Analytics.Management.Experiments.Insert + + -- ** AnalyticsManagementExperimentsList + , module Analytics.Management.Experiments.List + + -- ** AnalyticsManagementExperimentsPatch + , module Analytics.Management.Experiments.Patch + + -- ** AnalyticsManagementExperimentsUpdate + , module Analytics.Management.Experiments.Update + + -- ** AnalyticsManagementFiltersDelete + , module Analytics.Management.Filters.Delete + + -- ** AnalyticsManagementFiltersGet + , module Analytics.Management.Filters.Get + + -- ** AnalyticsManagementFiltersInsert + , module Analytics.Management.Filters.Insert + + -- ** AnalyticsManagementFiltersList + , module Analytics.Management.Filters.List + + -- ** AnalyticsManagementFiltersPatch + , module Analytics.Management.Filters.Patch + + -- ** AnalyticsManagementFiltersUpdate + , module Analytics.Management.Filters.Update + + -- ** AnalyticsManagementGoalsGet + , module Analytics.Management.Goals.Get + + -- ** AnalyticsManagementGoalsInsert + , module Analytics.Management.Goals.Insert + + -- ** AnalyticsManagementGoalsList + , module Analytics.Management.Goals.List + + -- ** AnalyticsManagementGoalsPatch + , module Analytics.Management.Goals.Patch + + -- ** AnalyticsManagementGoalsUpdate + , module Analytics.Management.Goals.Update + + -- ** AnalyticsManagementProfileFilterLinksDelete + , module Analytics.Management.ProfileFilterLinks.Delete + + -- ** AnalyticsManagementProfileFilterLinksGet + , module Analytics.Management.ProfileFilterLinks.Get + + -- ** AnalyticsManagementProfileFilterLinksInsert + , module Analytics.Management.ProfileFilterLinks.Insert + + -- ** AnalyticsManagementProfileFilterLinksList + , module Analytics.Management.ProfileFilterLinks.List + + -- ** AnalyticsManagementProfileFilterLinksPatch + , module Analytics.Management.ProfileFilterLinks.Patch + + -- ** AnalyticsManagementProfileFilterLinksUpdate + , module Analytics.Management.ProfileFilterLinks.Update + + -- ** AnalyticsManagementProfileUserLinksDelete + , module Analytics.Management.ProfileUserLinks.Delete + + -- ** AnalyticsManagementProfileUserLinksInsert + , module Analytics.Management.ProfileUserLinks.Insert + + -- ** AnalyticsManagementProfileUserLinksList + , module Analytics.Management.ProfileUserLinks.List + + -- ** AnalyticsManagementProfileUserLinksUpdate + , module Analytics.Management.ProfileUserLinks.Update + + -- ** AnalyticsManagementProfilesDelete + , module Analytics.Management.Profiles.Delete + + -- ** AnalyticsManagementProfilesGet + , module Analytics.Management.Profiles.Get + + -- ** AnalyticsManagementProfilesInsert + , module Analytics.Management.Profiles.Insert + + -- ** AnalyticsManagementProfilesList + , module Analytics.Management.Profiles.List + + -- ** AnalyticsManagementProfilesPatch + , module Analytics.Management.Profiles.Patch + + -- ** AnalyticsManagementProfilesUpdate + , module Analytics.Management.Profiles.Update + + -- ** AnalyticsManagementSegmentsList + , module Analytics.Management.Segments.List + + -- ** AnalyticsManagementUnsampledReportsGet + , module Analytics.Management.UnsampledReports.Get + + -- ** AnalyticsManagementUnsampledReportsInsert + , module Analytics.Management.UnsampledReports.Insert + + -- ** AnalyticsManagementUnsampledReportsList + , module Analytics.Management.UnsampledReports.List + + -- ** AnalyticsManagementUploadsDeleteUploadData + , module Analytics.Management.Uploads.DeleteUploadData + + -- ** AnalyticsManagementUploadsGet + , module Analytics.Management.Uploads.Get + + -- ** AnalyticsManagementUploadsList + , module Analytics.Management.Uploads.List + + -- ** AnalyticsManagementUploadsUploadData + , module Analytics.Management.Uploads.UploadData + + -- ** AnalyticsManagementWebPropertyAdWordsLinksDelete + , module Analytics.Management.WebPropertyAdWordsLinks.Delete + + -- ** AnalyticsManagementWebPropertyAdWordsLinksGet + , module Analytics.Management.WebPropertyAdWordsLinks.Get + + -- ** AnalyticsManagementWebPropertyAdWordsLinksInsert + , module Analytics.Management.WebPropertyAdWordsLinks.Insert + + -- ** AnalyticsManagementWebPropertyAdWordsLinksList + , module Analytics.Management.WebPropertyAdWordsLinks.List + + -- ** AnalyticsManagementWebPropertyAdWordsLinksPatch + , module Analytics.Management.WebPropertyAdWordsLinks.Patch + + -- ** AnalyticsManagementWebPropertyAdWordsLinksUpdate + , module Analytics.Management.WebPropertyAdWordsLinks.Update + + -- ** AnalyticsManagementWebpropertiesGet + , module Analytics.Management.Webproperties.Get + + -- ** AnalyticsManagementWebpropertiesInsert + , module Analytics.Management.Webproperties.Insert + + -- ** AnalyticsManagementWebpropertiesList + , module Analytics.Management.Webproperties.List + + -- ** AnalyticsManagementWebpropertiesPatch + , module Analytics.Management.Webproperties.Patch + + -- ** AnalyticsManagementWebpropertiesUpdate + , module Analytics.Management.Webproperties.Update + + -- ** AnalyticsManagementWebpropertyUserLinksDelete + , module Analytics.Management.WebpropertyUserLinks.Delete + + -- ** AnalyticsManagementWebpropertyUserLinksInsert + , module Analytics.Management.WebpropertyUserLinks.Insert + + -- ** AnalyticsManagementWebpropertyUserLinksList + , module Analytics.Management.WebpropertyUserLinks.List + + -- ** AnalyticsManagementWebpropertyUserLinksUpdate + , module Analytics.Management.WebpropertyUserLinks.Update + + -- ** AnalyticsMetadataColumnsList + , module Analytics.Metadata.Columns.List + + -- ** AnalyticsProvisioningCreateAccountTicket + , module Analytics.Provisioning.CreateAccountTicket + + -- * Types + + -- ** UnsampledReports + , UnsampledReports + , unsampledReports + , urNextLink + , urItemsPerPage + , urKind + , urUsername + , urItems + , urTotalResults + , urStartIndex + , urPreviousLink + + -- ** UnsampledReport + , UnsampledReport + , unsampledReport + , uDownloadType + , uStatus + , uMetrics + , uDriveDownloadDetails + , uWebPropertyId + , uKind + , uCreated + , uFilters + , uProfileId + , uEndDate + , uSelfLink + , uAccountId + , uId + , uUpdated + , uTitle + , uDimensions + , uSegment + , uCloudStorageDownloadDetails + , uStartDate + + -- ** ProfileRef + , ProfileRef + , profileRef + , prWebPropertyId + , prKind + , prHref + , prAccountId + , prName + , prInternalWebPropertyId + , prId + + -- ** Experiments + , Experiments + , experiments + , eNextLink + , eItemsPerPage + , eKind + , eUsername + , eItems + , eTotalResults + , eStartIndex + , ePreviousLink + + -- ** Accounts + , Accounts + , accounts + , aNextLink + , aItemsPerPage + , aKind + , aUsername + , aItems + , aTotalResults + , aStartIndex + , aPreviousLink + + -- ** FilterExpression + , FilterExpression + , filterExpression + , feFieldIndex + , feField + , feKind + , feMatchType + , feCaseSensitive + , feExpressionValue + + -- ** CustomDataSources + , CustomDataSources + , customDataSources + , cdsNextLink + , cdsItemsPerPage + , cdsKind + , cdsUsername + , cdsItems + , cdsTotalResults + , cdsStartIndex + , cdsPreviousLink + + -- ** AccountRef + , AccountRef + , accountRef + , arKind + , arHref + , arName + , arId + + -- ** EntityAdWordsLinks + , EntityAdWordsLinks + , entityAdWordsLinks + , eawlNextLink + , eawlItemsPerPage + , eawlKind + , eawlItems + , eawlTotalResults + , eawlStartIndex + , eawlPreviousLink + + -- ** McfData + , McfData + , mcfData + , mdNextLink + , mdSampleSpace + , mdItemsPerPage + , mdProfileInfo + , mdKind + , mdSampleSize + , mdRows + , mdSelfLink + , mdQuery + , mdColumnHeaders + , mdId + , mdTotalResults + , mdContainsSampledData + , mdTotalsForAllResults + , mdPreviousLink + + -- ** AnalyticsDataimportDeleteUploadDataRequest + , AnalyticsDataimportDeleteUploadDataRequest + , analyticsDataimportDeleteUploadDataRequest + , addudrCustomDataImportUids + + -- ** Profiles + , Profiles + , profiles + , pNextLink + , pItemsPerPage + , pKind + , pUsername + , pItems + , pTotalResults + , pStartIndex + , pPreviousLink + + -- ** UserRef + , UserRef + , userRef + , useEmail + , useKind + , useId + + -- ** Filters + , Filters + , filters + , fNextLink + , fItemsPerPage + , fKind + , fUsername + , fItems + , fTotalResults + , fStartIndex + , fPreviousLink + + -- ** WebPropertySummary + , WebPropertySummary + , webPropertySummary + , wpsKind + , wpsProfiles + , wpsName + , wpsInternalWebPropertyId + , wpsId + , wpsWebsiteUrl + , wpsLevel + + -- ** AccountSummaries + , AccountSummaries + , accountSummaries + , asNextLink + , asItemsPerPage + , asKind + , asUsername + , asItems + , asTotalResults + , asStartIndex + , asPreviousLink + + -- ** EntityAdWordsLink + , EntityAdWordsLink + , entityAdWordsLink + , entAdWordsAccounts + , entProfileIds + , entKind + , entSelfLink + , entName + , entId + , entEntity + + -- ** Profile + , Profile + , profile + , proParentLink + , proECommerceTracking + , proSiteSearchCategoryParameters + , proWebPropertyId + , proChildLink + , proSiteSearchQueryParameters + , proKind + , proDefaultPage + , proCreated + , proSelfLink + , proAccountId + , proName + , proCurrency + , proInternalWebPropertyId + , proId + , proUpdated + , proPermissions + , proWebsiteUrl + , proType + , proStripSiteSearchCategoryParameters + , proTimezone + , proExcludeQueryParameters + , proEnhancedECommerceTracking + , proStripSiteSearchQueryParameters + + -- ** GaData + , GaData + , gaData + , gdNextLink + , gdSampleSpace + , gdItemsPerPage + , gdProfileInfo + , gdKind + , gdSampleSize + , gdRows + , gdSelfLink + , gdQuery + , gdColumnHeaders + , gdId + , gdTotalResults + , gdDataTable + , gdContainsSampledData + , gdTotalsForAllResults + , gdPreviousLink + + -- ** WebPropertyRef + , WebPropertyRef + , webPropertyRef + , wprKind + , wprHref + , wprAccountId + , wprName + , wprInternalWebPropertyId + , wprId + + -- ** Goals + , Goals + , goals + , gNextLink + , gItemsPerPage + , gKind + , gUsername + , gItems + , gTotalResults + , gStartIndex + , gPreviousLink + + -- ** CustomDataSource + , CustomDataSource + , customDataSource + , cParentLink + , cWebPropertyId + , cChildLink + , cKind + , cCreated + , cUploadType + , cImportBehavior + , cSelfLink + , cAccountId + , cName + , cId + , cUpdated + , cType + , cDescription + , cProfilesLinked + + -- ** Webproperties + , Webproperties + , webproperties + , wNextLink + , wItemsPerPage + , wKind + , wUsername + , wItems + , wTotalResults + , wStartIndex + , wPreviousLink + + -- ** AdWordsAccount + , AdWordsAccount + , adWordsAccount + , awaAutoTaggingEnabled + , awaKind + , awaCustomerId + + -- ** Account + , Account + , account + , accChildLink + , accKind + , accCreated + , accSelfLink + , accName + , accId + , accUpdated + , accPermissions + + -- ** FilterRef + , FilterRef + , filterRef + , frKind + , frHref + , frAccountId + , frName + , frId + + -- ** Experiment + , Experiment + , experiment + , expParentLink + , expEqualWeighting + , expStatus + , expWebPropertyId + , expStartTime + , expSnippet + , expKind + , expCreated + , expReasonExperimentEnded + , expTrafficCoverage + , expEditableInGaUi + , expMinimumExperimentLengthInDays + , expProfileId + , expOptimizationType + , expSelfLink + , expAccountId + , expName + , expWinnerFound + , expEndTime + , expVariations + , expInternalWebPropertyId + , expId + , expUpdated + , expRewriteVariationUrlsAsOriginal + , expObjectiveMetric + , expWinnerConfidenceLevel + , expServingFramework + , expDescription + + -- ** EntityUserLinks + , EntityUserLinks + , entityUserLinks + , eulNextLink + , eulItemsPerPage + , eulKind + , eulItems + , eulTotalResults + , eulStartIndex + , eulPreviousLink + + -- ** CustomMetrics + , CustomMetrics + , customMetrics + , cmNextLink + , cmItemsPerPage + , cmKind + , cmUsername + , cmItems + , cmTotalResults + , cmStartIndex + , cmPreviousLink + + -- ** Webproperty + , Webproperty + , webproperty + , webParentLink + , webChildLink + , webDefaultProfileId + , webKind + , webCreated + , webSelfLink + , webAccountId + , webName + , webInternalWebPropertyId + , webId + , webUpdated + , webProfileCount + , webPermissions + , webWebsiteUrl + , webIndustryVertical + , webLevel + + -- ** CustomMetric + , CustomMetric + , customMetric + , cusParentLink + , cusWebPropertyId + , cusKind + , cusMaxValue + , cusCreated + , cusMinValue + , cusActive + , cusSelfLink + , cusAccountId + , cusName + , cusScope + , cusId + , cusUpdated + , cusType + , cusIndex + + -- ** RealtimeData + , RealtimeData + , realtimeData + , rdProfileInfo + , rdKind + , rdRows + , rdSelfLink + , rdQuery + , rdColumnHeaders + , rdId + , rdTotalResults + , rdTotalsForAllResults + + -- ** ProfileSummary + , ProfileSummary + , profileSummary + , psKind + , psName + , psId + , psType + + -- ** EntityUserLink + , EntityUserLink + , entityUserLink + , euluKind + , euluUserRef + , euluSelfLink + , euluId + , euluPermissions + , euluEntity + + -- ** AccountTicket + , AccountTicket + , accountTicket + , atRedirectUri + , atKind + , atProfile + , atAccount + , atWebproperty + , atId + + -- ** AccountSummary + , AccountSummary + , accountSummary + , assKind + , assWebProperties + , assName + , assId + + -- ** Goal + , Goal + , goal + , goaParentLink + , goaWebPropertyId + , goaKind + , goaCreated + , goaValue + , goaProfileId + , goaEventDetails + , goaActive + , goaSelfLink + , goaVisitTimeOnSiteDetails + , goaAccountId + , goaName + , goaInternalWebPropertyId + , goaId + , goaUrlDestinationDetails + , goaVisitNumPagesDetails + , goaUpdated + , goaType + + -- ** Columns + , Columns + , columns + , colEtag + , colKind + , colItems + , colTotalResults + , colAttributeNames + + -- ** CustomDimensions + , CustomDimensions + , customDimensions + , cdNextLink + , cdItemsPerPage + , cdKind + , cdUsername + , cdItems + , cdTotalResults + , cdStartIndex + , cdPreviousLink + + -- ** Uploads + , Uploads + , uploads + , uplNextLink + , uplItemsPerPage + , uplKind + , uplItems + , uplTotalResults + , uplStartIndex + , uplPreviousLink + + -- ** Filter + , Filter + , filter' + , filParentLink + , filAdvancedDetails + , filUppercaseDetails + , filLowercaseDetails + , filKind + , filCreated + , filIncludeDetails + , filExcludeDetails + , filSelfLink + , filAccountId + , filName + , filId + , filUpdated + , filType + , filSearchAndReplaceDetails + + -- ** Segments + , Segments + , segments + , sNextLink + , sItemsPerPage + , sKind + , sUsername + , sItems + , sTotalResults + , sStartIndex + , sPreviousLink + + -- ** ProfileFilterLinks + , ProfileFilterLinks + , profileFilterLinks + , pflNextLink + , pflItemsPerPage + , pflKind + , pflUsername + , pflItems + , pflTotalResults + , pflStartIndex + , pflPreviousLink + + -- ** Segment + , Segment + , segment + , segDefinition + , segKind + , segCreated + , segSelfLink + , segName + , segId + , segUpdated + , segType + , segSegmentId + + -- ** CustomDimension + , CustomDimension + , customDimension + , cddParentLink + , cddWebPropertyId + , cddKind + , cddCreated + , cddActive + , cddSelfLink + , cddAccountId + , cddName + , cddScope + , cddId + , cddUpdated + , cddIndex + + -- ** Upload + , Upload + , upload + , uuStatus + , uuKind + , uuCustomDataSourceId + , uuAccountId + , uuId + , uuErrors + + -- ** ProfileFilterLink + , ProfileFilterLink + , profileFilterLink + , pflfProfileRef + , pflfKind + , pflfFilterRef + , pflfSelfLink + , pflfId + , pflfRank + + -- ** Column + , Column + , column + , ccKind + , ccAttributes + , ccId + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude +import Network.Google.Resource.Analytics.Data.Ga.Get +import Network.Google.Resource.Analytics.Data.Mcf.Get +import Network.Google.Resource.Analytics.Data.Realtime.Get +import Network.Google.Resource.Analytics.Management.Accounts.List +import Network.Google.Resource.Analytics.Management.AccountSummaries.List +import Network.Google.Resource.Analytics.Management.AccountUserLinks.Delete +import Network.Google.Resource.Analytics.Management.AccountUserLinks.Insert +import Network.Google.Resource.Analytics.Management.AccountUserLinks.List +import Network.Google.Resource.Analytics.Management.AccountUserLinks.Update +import Network.Google.Resource.Analytics.Management.CustomDataSources.List +import Network.Google.Resource.Analytics.Management.CustomDimensions.Get +import Network.Google.Resource.Analytics.Management.CustomDimensions.Insert +import Network.Google.Resource.Analytics.Management.CustomDimensions.List +import Network.Google.Resource.Analytics.Management.CustomDimensions.Patch +import Network.Google.Resource.Analytics.Management.CustomDimensions.Update +import Network.Google.Resource.Analytics.Management.CustomMetrics.Get +import Network.Google.Resource.Analytics.Management.CustomMetrics.Insert +import Network.Google.Resource.Analytics.Management.CustomMetrics.List +import Network.Google.Resource.Analytics.Management.CustomMetrics.Patch +import Network.Google.Resource.Analytics.Management.CustomMetrics.Update +import Network.Google.Resource.Analytics.Management.Experiments.Delete +import Network.Google.Resource.Analytics.Management.Experiments.Get +import Network.Google.Resource.Analytics.Management.Experiments.Insert +import Network.Google.Resource.Analytics.Management.Experiments.List +import Network.Google.Resource.Analytics.Management.Experiments.Patch +import Network.Google.Resource.Analytics.Management.Experiments.Update +import Network.Google.Resource.Analytics.Management.Filters.Delete +import Network.Google.Resource.Analytics.Management.Filters.Get +import Network.Google.Resource.Analytics.Management.Filters.Insert +import Network.Google.Resource.Analytics.Management.Filters.List +import Network.Google.Resource.Analytics.Management.Filters.Patch +import Network.Google.Resource.Analytics.Management.Filters.Update +import Network.Google.Resource.Analytics.Management.Goals.Get +import Network.Google.Resource.Analytics.Management.Goals.Insert +import Network.Google.Resource.Analytics.Management.Goals.List +import Network.Google.Resource.Analytics.Management.Goals.Patch +import Network.Google.Resource.Analytics.Management.Goals.Update +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Delete +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Get +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Insert +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.List +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Patch +import Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Update +import Network.Google.Resource.Analytics.Management.Profiles.Delete +import Network.Google.Resource.Analytics.Management.Profiles.Get +import Network.Google.Resource.Analytics.Management.Profiles.Insert +import Network.Google.Resource.Analytics.Management.Profiles.List +import Network.Google.Resource.Analytics.Management.Profiles.Patch +import Network.Google.Resource.Analytics.Management.Profiles.Update +import Network.Google.Resource.Analytics.Management.ProfileUserLinks.Delete +import Network.Google.Resource.Analytics.Management.ProfileUserLinks.Insert +import Network.Google.Resource.Analytics.Management.ProfileUserLinks.List +import Network.Google.Resource.Analytics.Management.ProfileUserLinks.Update +import Network.Google.Resource.Analytics.Management.Segments.List +import Network.Google.Resource.Analytics.Management.UnsampledReports.Get +import Network.Google.Resource.Analytics.Management.UnsampledReports.Insert +import Network.Google.Resource.Analytics.Management.UnsampledReports.List +import Network.Google.Resource.Analytics.Management.Uploads.DeleteUploadData +import Network.Google.Resource.Analytics.Management.Uploads.Get +import Network.Google.Resource.Analytics.Management.Uploads.List +import Network.Google.Resource.Analytics.Management.Uploads.UploadData +import Network.Google.Resource.Analytics.Management.Webproperties.Get +import Network.Google.Resource.Analytics.Management.Webproperties.Insert +import Network.Google.Resource.Analytics.Management.Webproperties.List +import Network.Google.Resource.Analytics.Management.Webproperties.Patch +import Network.Google.Resource.Analytics.Management.Webproperties.Update +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Delete +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Get +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Insert +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.List +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Patch +import Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Update +import Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Delete +import Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Insert +import Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.List +import Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Update +import Network.Google.Resource.Analytics.Metadata.Columns.List +import Network.Google.Resource.Analytics.Provisioning.CreateAccountTicket + +{- $resources +TODO +-} + +type AnalyticsAPI = + Data :<|> Management :<|> Provisioning :<|> Metadata + +analyticsAPI :: Proxy AnalyticsAPI +analyticsAPI = Proxy diff --git a/gogol-analytics/gen/Network/Google/Analytics/Types.hs b/gogol-analytics/gen/Network/Google/Analytics/Types.hs new file mode 100644 index 000000000..c77d6dc7e --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Analytics/Types.hs @@ -0,0 +1,655 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Analytics.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Analytics.Types + ( + -- * Service URL + analyticsURL + + -- * UnsampledReports + , UnsampledReports + , unsampledReports + , urNextLink + , urItemsPerPage + , urKind + , urUsername + , urItems + , urTotalResults + , urStartIndex + , urPreviousLink + + -- * UnsampledReport + , UnsampledReport + , unsampledReport + , uDownloadType + , uStatus + , uMetrics + , uDriveDownloadDetails + , uWebPropertyId + , uKind + , uCreated + , uFilters + , uProfileId + , uEndDate + , uSelfLink + , uAccountId + , uId + , uUpdated + , uTitle + , uDimensions + , uSegment + , uCloudStorageDownloadDetails + , uStartDate + + -- * ProfileRef + , ProfileRef + , profileRef + , prWebPropertyId + , prKind + , prHref + , prAccountId + , prName + , prInternalWebPropertyId + , prId + + -- * Experiments + , Experiments + , experiments + , eNextLink + , eItemsPerPage + , eKind + , eUsername + , eItems + , eTotalResults + , eStartIndex + , ePreviousLink + + -- * Accounts + , Accounts + , accounts + , aNextLink + , aItemsPerPage + , aKind + , aUsername + , aItems + , aTotalResults + , aStartIndex + , aPreviousLink + + -- * FilterExpression + , FilterExpression + , filterExpression + , feFieldIndex + , feField + , feKind + , feMatchType + , feCaseSensitive + , feExpressionValue + + -- * CustomDataSources + , CustomDataSources + , customDataSources + , cdsNextLink + , cdsItemsPerPage + , cdsKind + , cdsUsername + , cdsItems + , cdsTotalResults + , cdsStartIndex + , cdsPreviousLink + + -- * AccountRef + , AccountRef + , accountRef + , arKind + , arHref + , arName + , arId + + -- * EntityAdWordsLinks + , EntityAdWordsLinks + , entityAdWordsLinks + , eawlNextLink + , eawlItemsPerPage + , eawlKind + , eawlItems + , eawlTotalResults + , eawlStartIndex + , eawlPreviousLink + + -- * McfData + , McfData + , mcfData + , mdNextLink + , mdSampleSpace + , mdItemsPerPage + , mdProfileInfo + , mdKind + , mdSampleSize + , mdRows + , mdSelfLink + , mdQuery + , mdColumnHeaders + , mdId + , mdTotalResults + , mdContainsSampledData + , mdTotalsForAllResults + , mdPreviousLink + + -- * AnalyticsDataimportDeleteUploadDataRequest + , AnalyticsDataimportDeleteUploadDataRequest + , analyticsDataimportDeleteUploadDataRequest + , addudrCustomDataImportUids + + -- * Profiles + , Profiles + , profiles + , pNextLink + , pItemsPerPage + , pKind + , pUsername + , pItems + , pTotalResults + , pStartIndex + , pPreviousLink + + -- * UserRef + , UserRef + , userRef + , useEmail + , useKind + , useId + + -- * Filters + , Filters + , filters + , fNextLink + , fItemsPerPage + , fKind + , fUsername + , fItems + , fTotalResults + , fStartIndex + , fPreviousLink + + -- * WebPropertySummary + , WebPropertySummary + , webPropertySummary + , wpsKind + , wpsProfiles + , wpsName + , wpsInternalWebPropertyId + , wpsId + , wpsWebsiteUrl + , wpsLevel + + -- * AccountSummaries + , AccountSummaries + , accountSummaries + , asNextLink + , asItemsPerPage + , asKind + , asUsername + , asItems + , asTotalResults + , asStartIndex + , asPreviousLink + + -- * EntityAdWordsLink + , EntityAdWordsLink + , entityAdWordsLink + , entAdWordsAccounts + , entProfileIds + , entKind + , entSelfLink + , entName + , entId + , entEntity + + -- * Profile + , Profile + , profile + , proParentLink + , proECommerceTracking + , proSiteSearchCategoryParameters + , proWebPropertyId + , proChildLink + , proSiteSearchQueryParameters + , proKind + , proDefaultPage + , proCreated + , proSelfLink + , proAccountId + , proName + , proCurrency + , proInternalWebPropertyId + , proId + , proUpdated + , proPermissions + , proWebsiteUrl + , proType + , proStripSiteSearchCategoryParameters + , proTimezone + , proExcludeQueryParameters + , proEnhancedECommerceTracking + , proStripSiteSearchQueryParameters + + -- * GaData + , GaData + , gaData + , gdNextLink + , gdSampleSpace + , gdItemsPerPage + , gdProfileInfo + , gdKind + , gdSampleSize + , gdRows + , gdSelfLink + , gdQuery + , gdColumnHeaders + , gdId + , gdTotalResults + , gdDataTable + , gdContainsSampledData + , gdTotalsForAllResults + , gdPreviousLink + + -- * WebPropertyRef + , WebPropertyRef + , webPropertyRef + , wprKind + , wprHref + , wprAccountId + , wprName + , wprInternalWebPropertyId + , wprId + + -- * Goals + , Goals + , goals + , gNextLink + , gItemsPerPage + , gKind + , gUsername + , gItems + , gTotalResults + , gStartIndex + , gPreviousLink + + -- * CustomDataSource + , CustomDataSource + , customDataSource + , cParentLink + , cWebPropertyId + , cChildLink + , cKind + , cCreated + , cUploadType + , cImportBehavior + , cSelfLink + , cAccountId + , cName + , cId + , cUpdated + , cType + , cDescription + , cProfilesLinked + + -- * Webproperties + , Webproperties + , webproperties + , wNextLink + , wItemsPerPage + , wKind + , wUsername + , wItems + , wTotalResults + , wStartIndex + , wPreviousLink + + -- * AdWordsAccount + , AdWordsAccount + , adWordsAccount + , awaAutoTaggingEnabled + , awaKind + , awaCustomerId + + -- * Account + , Account + , account + , accChildLink + , accKind + , accCreated + , accSelfLink + , accName + , accId + , accUpdated + , accPermissions + + -- * FilterRef + , FilterRef + , filterRef + , frKind + , frHref + , frAccountId + , frName + , frId + + -- * Experiment + , Experiment + , experiment + , expParentLink + , expEqualWeighting + , expStatus + , expWebPropertyId + , expStartTime + , expSnippet + , expKind + , expCreated + , expReasonExperimentEnded + , expTrafficCoverage + , expEditableInGaUi + , expMinimumExperimentLengthInDays + , expProfileId + , expOptimizationType + , expSelfLink + , expAccountId + , expName + , expWinnerFound + , expEndTime + , expVariations + , expInternalWebPropertyId + , expId + , expUpdated + , expRewriteVariationUrlsAsOriginal + , expObjectiveMetric + , expWinnerConfidenceLevel + , expServingFramework + , expDescription + + -- * EntityUserLinks + , EntityUserLinks + , entityUserLinks + , eulNextLink + , eulItemsPerPage + , eulKind + , eulItems + , eulTotalResults + , eulStartIndex + , eulPreviousLink + + -- * CustomMetrics + , CustomMetrics + , customMetrics + , cmNextLink + , cmItemsPerPage + , cmKind + , cmUsername + , cmItems + , cmTotalResults + , cmStartIndex + , cmPreviousLink + + -- * Webproperty + , Webproperty + , webproperty + , webParentLink + , webChildLink + , webDefaultProfileId + , webKind + , webCreated + , webSelfLink + , webAccountId + , webName + , webInternalWebPropertyId + , webId + , webUpdated + , webProfileCount + , webPermissions + , webWebsiteUrl + , webIndustryVertical + , webLevel + + -- * CustomMetric + , CustomMetric + , customMetric + , cusParentLink + , cusWebPropertyId + , cusKind + , cusMaxValue + , cusCreated + , cusMinValue + , cusActive + , cusSelfLink + , cusAccountId + , cusName + , cusScope + , cusId + , cusUpdated + , cusType + , cusIndex + + -- * RealtimeData + , RealtimeData + , realtimeData + , rdProfileInfo + , rdKind + , rdRows + , rdSelfLink + , rdQuery + , rdColumnHeaders + , rdId + , rdTotalResults + , rdTotalsForAllResults + + -- * ProfileSummary + , ProfileSummary + , profileSummary + , psKind + , psName + , psId + , psType + + -- * EntityUserLink + , EntityUserLink + , entityUserLink + , euluKind + , euluUserRef + , euluSelfLink + , euluId + , euluPermissions + , euluEntity + + -- * AccountTicket + , AccountTicket + , accountTicket + , atRedirectUri + , atKind + , atProfile + , atAccount + , atWebproperty + , atId + + -- * AccountSummary + , AccountSummary + , accountSummary + , assKind + , assWebProperties + , assName + , assId + + -- * Goal + , Goal + , goal + , goaParentLink + , goaWebPropertyId + , goaKind + , goaCreated + , goaValue + , goaProfileId + , goaEventDetails + , goaActive + , goaSelfLink + , goaVisitTimeOnSiteDetails + , goaAccountId + , goaName + , goaInternalWebPropertyId + , goaId + , goaUrlDestinationDetails + , goaVisitNumPagesDetails + , goaUpdated + , goaType + + -- * Columns + , Columns + , columns + , colEtag + , colKind + , colItems + , colTotalResults + , colAttributeNames + + -- * CustomDimensions + , CustomDimensions + , customDimensions + , cdNextLink + , cdItemsPerPage + , cdKind + , cdUsername + , cdItems + , cdTotalResults + , cdStartIndex + , cdPreviousLink + + -- * Uploads + , Uploads + , uploads + , uplNextLink + , uplItemsPerPage + , uplKind + , uplItems + , uplTotalResults + , uplStartIndex + , uplPreviousLink + + -- * Filter + , Filter + , filter' + , filParentLink + , filAdvancedDetails + , filUppercaseDetails + , filLowercaseDetails + , filKind + , filCreated + , filIncludeDetails + , filExcludeDetails + , filSelfLink + , filAccountId + , filName + , filId + , filUpdated + , filType + , filSearchAndReplaceDetails + + -- * Segments + , Segments + , segments + , sNextLink + , sItemsPerPage + , sKind + , sUsername + , sItems + , sTotalResults + , sStartIndex + , sPreviousLink + + -- * ProfileFilterLinks + , ProfileFilterLinks + , profileFilterLinks + , pflNextLink + , pflItemsPerPage + , pflKind + , pflUsername + , pflItems + , pflTotalResults + , pflStartIndex + , pflPreviousLink + + -- * Segment + , Segment + , segment + , segDefinition + , segKind + , segCreated + , segSelfLink + , segName + , segId + , segUpdated + , segType + , segSegmentId + + -- * CustomDimension + , CustomDimension + , customDimension + , cddParentLink + , cddWebPropertyId + , cddKind + , cddCreated + , cddActive + , cddSelfLink + , cddAccountId + , cddName + , cddScope + , cddId + , cddUpdated + , cddIndex + + -- * Upload + , Upload + , upload + , uuStatus + , uuKind + , uuCustomDataSourceId + , uuAccountId + , uuId + , uuErrors + + -- * ProfileFilterLink + , ProfileFilterLink + , profileFilterLink + , pflfProfileRef + , pflfKind + , pflfFilterRef + , pflfSelfLink + , pflfId + , pflfRank + + -- * Column + , Column + , column + , ccKind + , ccAttributes + , ccId + ) where + +import Network.Google.Analytics.Types.Product +import Network.Google.Analytics.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v3' of the Google Analytics API. +analyticsURL :: BaseURL +analyticsURL + = BaseUrl Https + "https://www.googleapis.com/analytics/v3/" + 443 diff --git a/gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs b/gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs new file mode 100644 index 000000000..03d5e0d47 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs @@ -0,0 +1,6354 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Analytics.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Analytics.Types.Product where + +import Network.Google.Analytics.Types.Sum +import Network.Google.Prelude + +-- | An unsampled report collection lists Analytics unsampled reports to +-- which the user has access. Each view (profile) can have a set of +-- unsampled reports. Each resource in the unsampled report collection +-- corresponds to a single Analytics unsampled report. +-- +-- /See:/ 'unsampledReports' smart constructor. +data UnsampledReports = UnsampledReports + { _urNextLink :: !(Maybe Text) + , _urItemsPerPage :: !(Maybe Int32) + , _urKind :: !Text + , _urUsername :: !(Maybe Text) + , _urItems :: !(Maybe [Maybe UnsampledReport]) + , _urTotalResults :: !(Maybe Int32) + , _urStartIndex :: !(Maybe Int32) + , _urPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UnsampledReports' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urNextLink' +-- +-- * 'urItemsPerPage' +-- +-- * 'urKind' +-- +-- * 'urUsername' +-- +-- * 'urItems' +-- +-- * 'urTotalResults' +-- +-- * 'urStartIndex' +-- +-- * 'urPreviousLink' +unsampledReports + :: UnsampledReports +unsampledReports = + UnsampledReports + { _urNextLink = Nothing + , _urItemsPerPage = Nothing + , _urKind = "analytics#unsampledReports" + , _urUsername = Nothing + , _urItems = Nothing + , _urTotalResults = Nothing + , _urStartIndex = Nothing + , _urPreviousLink = Nothing + } + +-- | Link to next page for this unsampled report collection. +urNextLink :: Lens' UnsampledReports (Maybe Text) +urNextLink + = lens _urNextLink (\ s a -> s{_urNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +urItemsPerPage :: Lens' UnsampledReports (Maybe Int32) +urItemsPerPage + = lens _urItemsPerPage + (\ s a -> s{_urItemsPerPage = a}) + +-- | Collection type. +urKind :: Lens' UnsampledReports Text +urKind = lens _urKind (\ s a -> s{_urKind = a}) + +-- | Email ID of the authenticated user +urUsername :: Lens' UnsampledReports (Maybe Text) +urUsername + = lens _urUsername (\ s a -> s{_urUsername = a}) + +-- | A list of unsampled reports. +urItems :: Lens' UnsampledReports [Maybe UnsampledReport] +urItems + = lens _urItems (\ s a -> s{_urItems = a}) . _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- resources in the result. +urTotalResults :: Lens' UnsampledReports (Maybe Int32) +urTotalResults + = lens _urTotalResults + (\ s a -> s{_urTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +urStartIndex :: Lens' UnsampledReports (Maybe Int32) +urStartIndex + = lens _urStartIndex (\ s a -> s{_urStartIndex = a}) + +-- | Link to previous page for this unsampled report collection. +urPreviousLink :: Lens' UnsampledReports (Maybe Text) +urPreviousLink + = lens _urPreviousLink + (\ s a -> s{_urPreviousLink = a}) + +instance FromJSON UnsampledReports where + parseJSON + = withObject "UnsampledReports" + (\ o -> + UnsampledReports <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#unsampledReports") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON UnsampledReports where + toJSON UnsampledReports{..} + = object + (catMaybes + [("nextLink" .=) <$> _urNextLink, + ("itemsPerPage" .=) <$> _urItemsPerPage, + Just ("kind" .= _urKind), + ("username" .=) <$> _urUsername, + ("items" .=) <$> _urItems, + ("totalResults" .=) <$> _urTotalResults, + ("startIndex" .=) <$> _urStartIndex, + ("previousLink" .=) <$> _urPreviousLink]) + +-- | JSON template for Analytics unsampled report resource. +-- +-- /See:/ 'unsampledReport' smart constructor. +data UnsampledReport = UnsampledReport + { _uDownloadType :: !(Maybe Text) + , _uStatus :: !(Maybe Text) + , _uMetrics :: !(Maybe Text) + , _uDriveDownloadDetails :: !(Maybe UnsampledReportDriveDownloadDetails) + , _uWebPropertyId :: !(Maybe Text) + , _uKind :: !Text + , _uCreated :: !(Maybe UTCTime) + , _uFilters :: !(Maybe Text) + , _uProfileId :: !(Maybe Text) + , _uEndDate :: !(Maybe Text) + , _uSelfLink :: !(Maybe Text) + , _uAccountId :: !(Maybe Text) + , _uId :: !(Maybe Text) + , _uUpdated :: !(Maybe UTCTime) + , _uTitle :: !(Maybe Text) + , _uDimensions :: !(Maybe Text) + , _uSegment :: !(Maybe Text) + , _uCloudStorageDownloadDetails :: !(Maybe UnsampledReportCloudStorageDownloadDetails) + , _uStartDate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UnsampledReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uDownloadType' +-- +-- * 'uStatus' +-- +-- * 'uMetrics' +-- +-- * 'uDriveDownloadDetails' +-- +-- * 'uWebPropertyId' +-- +-- * 'uKind' +-- +-- * 'uCreated' +-- +-- * 'uFilters' +-- +-- * 'uProfileId' +-- +-- * 'uEndDate' +-- +-- * 'uSelfLink' +-- +-- * 'uAccountId' +-- +-- * 'uId' +-- +-- * 'uUpdated' +-- +-- * 'uTitle' +-- +-- * 'uDimensions' +-- +-- * 'uSegment' +-- +-- * 'uCloudStorageDownloadDetails' +-- +-- * 'uStartDate' +unsampledReport + :: UnsampledReport +unsampledReport = + UnsampledReport + { _uDownloadType = Nothing + , _uStatus = Nothing + , _uMetrics = Nothing + , _uDriveDownloadDetails = Nothing + , _uWebPropertyId = Nothing + , _uKind = "analytics#unsampledReport" + , _uCreated = Nothing + , _uFilters = Nothing + , _uProfileId = Nothing + , _uEndDate = Nothing + , _uSelfLink = Nothing + , _uAccountId = Nothing + , _uId = Nothing + , _uUpdated = Nothing + , _uTitle = Nothing + , _uDimensions = Nothing + , _uSegment = Nothing + , _uCloudStorageDownloadDetails = Nothing + , _uStartDate = Nothing + } + +-- | The type of download you need to use for the report data file. +uDownloadType :: Lens' UnsampledReport (Maybe Text) +uDownloadType + = lens _uDownloadType + (\ s a -> s{_uDownloadType = a}) + +-- | Status of this unsampled report. Possible values are PENDING, COMPLETED, +-- or FAILED. +uStatus :: Lens' UnsampledReport (Maybe Text) +uStatus = lens _uStatus (\ s a -> s{_uStatus = a}) + +-- | The metrics for the unsampled report. +uMetrics :: Lens' UnsampledReport (Maybe Text) +uMetrics = lens _uMetrics (\ s a -> s{_uMetrics = a}) + +-- | Download details for a file stored in Google Drive. +uDriveDownloadDetails :: Lens' UnsampledReport (Maybe UnsampledReportDriveDownloadDetails) +uDriveDownloadDetails + = lens _uDriveDownloadDetails + (\ s a -> s{_uDriveDownloadDetails = a}) + +-- | Web property ID to which this unsampled report belongs. The web property +-- ID is of the form UA-XXXXX-YY. +uWebPropertyId :: Lens' UnsampledReport (Maybe Text) +uWebPropertyId + = lens _uWebPropertyId + (\ s a -> s{_uWebPropertyId = a}) + +-- | Resource type for an Analytics unsampled report. +uKind :: Lens' UnsampledReport Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | Time this unsampled report was created. +uCreated :: Lens' UnsampledReport (Maybe UTCTime) +uCreated = lens _uCreated (\ s a -> s{_uCreated = a}) + +-- | The filters for the unsampled report. +uFilters :: Lens' UnsampledReport (Maybe Text) +uFilters = lens _uFilters (\ s a -> s{_uFilters = a}) + +-- | View (Profile) ID to which this unsampled report belongs. +uProfileId :: Lens' UnsampledReport (Maybe Text) +uProfileId + = lens _uProfileId (\ s a -> s{_uProfileId = a}) + +-- | The end date for the unsampled report. +uEndDate :: Lens' UnsampledReport (Maybe Text) +uEndDate = lens _uEndDate (\ s a -> s{_uEndDate = a}) + +-- | Link for this unsampled report. +uSelfLink :: Lens' UnsampledReport (Maybe Text) +uSelfLink + = lens _uSelfLink (\ s a -> s{_uSelfLink = a}) + +-- | Account ID to which this unsampled report belongs. +uAccountId :: Lens' UnsampledReport (Maybe Text) +uAccountId + = lens _uAccountId (\ s a -> s{_uAccountId = a}) + +-- | Unsampled report ID. +uId :: Lens' UnsampledReport (Maybe Text) +uId = lens _uId (\ s a -> s{_uId = a}) + +-- | Time this unsampled report was last modified. +uUpdated :: Lens' UnsampledReport (Maybe UTCTime) +uUpdated = lens _uUpdated (\ s a -> s{_uUpdated = a}) + +-- | Title of the unsampled report. +uTitle :: Lens' UnsampledReport (Maybe Text) +uTitle = lens _uTitle (\ s a -> s{_uTitle = a}) + +-- | The dimensions for the unsampled report. +uDimensions :: Lens' UnsampledReport (Maybe Text) +uDimensions + = lens _uDimensions (\ s a -> s{_uDimensions = a}) + +-- | The segment for the unsampled report. +uSegment :: Lens' UnsampledReport (Maybe Text) +uSegment = lens _uSegment (\ s a -> s{_uSegment = a}) + +-- | Download details for a file stored in Google Cloud Storage. +uCloudStorageDownloadDetails :: Lens' UnsampledReport (Maybe UnsampledReportCloudStorageDownloadDetails) +uCloudStorageDownloadDetails + = lens _uCloudStorageDownloadDetails + (\ s a -> s{_uCloudStorageDownloadDetails = a}) + +-- | The start date for the unsampled report. +uStartDate :: Lens' UnsampledReport (Maybe Text) +uStartDate + = lens _uStartDate (\ s a -> s{_uStartDate = a}) + +instance FromJSON UnsampledReport where + parseJSON + = withObject "UnsampledReport" + (\ o -> + UnsampledReport <$> + (o .:? "downloadType") <*> (o .:? "status") <*> + (o .:? "metrics") + <*> (o .:? "driveDownloadDetails") + <*> (o .:? "webPropertyId") + <*> (o .:? "kind" .!= "analytics#unsampledReport") + <*> (o .:? "created") + <*> (o .:? "filters") + <*> (o .:? "profileId") + <*> (o .:? "end-date") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title") + <*> (o .:? "dimensions") + <*> (o .:? "segment") + <*> (o .:? "cloudStorageDownloadDetails") + <*> (o .:? "start-date")) + +instance ToJSON UnsampledReport where + toJSON UnsampledReport{..} + = object + (catMaybes + [("downloadType" .=) <$> _uDownloadType, + ("status" .=) <$> _uStatus, + ("metrics" .=) <$> _uMetrics, + ("driveDownloadDetails" .=) <$> + _uDriveDownloadDetails, + ("webPropertyId" .=) <$> _uWebPropertyId, + Just ("kind" .= _uKind), + ("created" .=) <$> _uCreated, + ("filters" .=) <$> _uFilters, + ("profileId" .=) <$> _uProfileId, + ("end-date" .=) <$> _uEndDate, + ("selfLink" .=) <$> _uSelfLink, + ("accountId" .=) <$> _uAccountId, ("id" .=) <$> _uId, + ("updated" .=) <$> _uUpdated, + ("title" .=) <$> _uTitle, + ("dimensions" .=) <$> _uDimensions, + ("segment" .=) <$> _uSegment, + ("cloudStorageDownloadDetails" .=) <$> + _uCloudStorageDownloadDetails, + ("start-date" .=) <$> _uStartDate]) + +-- | JSON template for a linked view (profile). +-- +-- /See:/ 'profileRef' smart constructor. +data ProfileRef = ProfileRef + { _prWebPropertyId :: !(Maybe Text) + , _prKind :: !Text + , _prHref :: !(Maybe Text) + , _prAccountId :: !(Maybe Text) + , _prName :: !(Maybe Text) + , _prInternalWebPropertyId :: !(Maybe Text) + , _prId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProfileRef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prWebPropertyId' +-- +-- * 'prKind' +-- +-- * 'prHref' +-- +-- * 'prAccountId' +-- +-- * 'prName' +-- +-- * 'prInternalWebPropertyId' +-- +-- * 'prId' +profileRef + :: ProfileRef +profileRef = + ProfileRef + { _prWebPropertyId = Nothing + , _prKind = "analytics#profileRef" + , _prHref = Nothing + , _prAccountId = Nothing + , _prName = Nothing + , _prInternalWebPropertyId = Nothing + , _prId = Nothing + } + +-- | Web property ID of the form UA-XXXXX-YY to which this view (profile) +-- belongs. +prWebPropertyId :: Lens' ProfileRef (Maybe Text) +prWebPropertyId + = lens _prWebPropertyId + (\ s a -> s{_prWebPropertyId = a}) + +-- | Analytics view (profile) reference. +prKind :: Lens' ProfileRef Text +prKind = lens _prKind (\ s a -> s{_prKind = a}) + +-- | Link for this view (profile). +prHref :: Lens' ProfileRef (Maybe Text) +prHref = lens _prHref (\ s a -> s{_prHref = a}) + +-- | Account ID to which this view (profile) belongs. +prAccountId :: Lens' ProfileRef (Maybe Text) +prAccountId + = lens _prAccountId (\ s a -> s{_prAccountId = a}) + +-- | Name of this view (profile). +prName :: Lens' ProfileRef (Maybe Text) +prName = lens _prName (\ s a -> s{_prName = a}) + +-- | Internal ID for the web property to which this view (profile) belongs. +prInternalWebPropertyId :: Lens' ProfileRef (Maybe Text) +prInternalWebPropertyId + = lens _prInternalWebPropertyId + (\ s a -> s{_prInternalWebPropertyId = a}) + +-- | View (Profile) ID. +prId :: Lens' ProfileRef (Maybe Text) +prId = lens _prId (\ s a -> s{_prId = a}) + +instance FromJSON ProfileRef where + parseJSON + = withObject "ProfileRef" + (\ o -> + ProfileRef <$> + (o .:? "webPropertyId") <*> + (o .:? "kind" .!= "analytics#profileRef") + <*> (o .:? "href") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id")) + +instance ToJSON ProfileRef where + toJSON ProfileRef{..} + = object + (catMaybes + [("webPropertyId" .=) <$> _prWebPropertyId, + Just ("kind" .= _prKind), ("href" .=) <$> _prHref, + ("accountId" .=) <$> _prAccountId, + ("name" .=) <$> _prName, + ("internalWebPropertyId" .=) <$> + _prInternalWebPropertyId, + ("id" .=) <$> _prId]) + +-- | An experiment collection lists Analytics experiments to which the user +-- has access. Each view (profile) can have a set of experiments. Each +-- resource in the Experiment collection corresponds to a single Analytics +-- experiment. +-- +-- /See:/ 'experiments' smart constructor. +data Experiments = Experiments + { _eNextLink :: !(Maybe Text) + , _eItemsPerPage :: !(Maybe Int32) + , _eKind :: !Text + , _eUsername :: !(Maybe Text) + , _eItems :: !(Maybe [Maybe Experiment]) + , _eTotalResults :: !(Maybe Int32) + , _eStartIndex :: !(Maybe Int32) + , _ePreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Experiments' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eNextLink' +-- +-- * 'eItemsPerPage' +-- +-- * 'eKind' +-- +-- * 'eUsername' +-- +-- * 'eItems' +-- +-- * 'eTotalResults' +-- +-- * 'eStartIndex' +-- +-- * 'ePreviousLink' +experiments + :: Experiments +experiments = + Experiments + { _eNextLink = Nothing + , _eItemsPerPage = Nothing + , _eKind = "analytics#experiments" + , _eUsername = Nothing + , _eItems = Nothing + , _eTotalResults = Nothing + , _eStartIndex = Nothing + , _ePreviousLink = Nothing + } + +-- | Link to next page for this experiment collection. +eNextLink :: Lens' Experiments (Maybe Text) +eNextLink + = lens _eNextLink (\ s a -> s{_eNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +eItemsPerPage :: Lens' Experiments (Maybe Int32) +eItemsPerPage + = lens _eItemsPerPage + (\ s a -> s{_eItemsPerPage = a}) + +-- | Collection type. +eKind :: Lens' Experiments Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | Email ID of the authenticated user +eUsername :: Lens' Experiments (Maybe Text) +eUsername + = lens _eUsername (\ s a -> s{_eUsername = a}) + +-- | A list of experiments. +eItems :: Lens' Experiments [Maybe Experiment] +eItems + = lens _eItems (\ s a -> s{_eItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- resources in the result. +eTotalResults :: Lens' Experiments (Maybe Int32) +eTotalResults + = lens _eTotalResults + (\ s a -> s{_eTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +eStartIndex :: Lens' Experiments (Maybe Int32) +eStartIndex + = lens _eStartIndex (\ s a -> s{_eStartIndex = a}) + +-- | Link to previous page for this experiment collection. +ePreviousLink :: Lens' Experiments (Maybe Text) +ePreviousLink + = lens _ePreviousLink + (\ s a -> s{_ePreviousLink = a}) + +instance FromJSON Experiments where + parseJSON + = withObject "Experiments" + (\ o -> + Experiments <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#experiments") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Experiments where + toJSON Experiments{..} + = object + (catMaybes + [("nextLink" .=) <$> _eNextLink, + ("itemsPerPage" .=) <$> _eItemsPerPage, + Just ("kind" .= _eKind), + ("username" .=) <$> _eUsername, + ("items" .=) <$> _eItems, + ("totalResults" .=) <$> _eTotalResults, + ("startIndex" .=) <$> _eStartIndex, + ("previousLink" .=) <$> _ePreviousLink]) + +-- | An account collection provides a list of Analytics accounts to which a +-- user has access. The account collection is the entry point to all +-- management information. Each resource in the collection corresponds to a +-- single Analytics account. +-- +-- /See:/ 'accounts' smart constructor. +data Accounts = Accounts + { _aNextLink :: !(Maybe Text) + , _aItemsPerPage :: !(Maybe Int32) + , _aKind :: !Text + , _aUsername :: !(Maybe Text) + , _aItems :: !(Maybe [Maybe Account]) + , _aTotalResults :: !(Maybe Int32) + , _aStartIndex :: !(Maybe Int32) + , _aPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Accounts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aNextLink' +-- +-- * 'aItemsPerPage' +-- +-- * 'aKind' +-- +-- * 'aUsername' +-- +-- * 'aItems' +-- +-- * 'aTotalResults' +-- +-- * 'aStartIndex' +-- +-- * 'aPreviousLink' +accounts + :: Accounts +accounts = + Accounts + { _aNextLink = Nothing + , _aItemsPerPage = Nothing + , _aKind = "analytics#accounts" + , _aUsername = Nothing + , _aItems = Nothing + , _aTotalResults = Nothing + , _aStartIndex = Nothing + , _aPreviousLink = Nothing + } + +-- | Next link for this account collection. +aNextLink :: Lens' Accounts (Maybe Text) +aNextLink + = lens _aNextLink (\ s a -> s{_aNextLink = a}) + +-- | The maximum number of entries the response can contain, regardless of +-- the actual number of entries returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +aItemsPerPage :: Lens' Accounts (Maybe Int32) +aItemsPerPage + = lens _aItemsPerPage + (\ s a -> s{_aItemsPerPage = a}) + +-- | Collection type. +aKind :: Lens' Accounts Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | Email ID of the authenticated user +aUsername :: Lens' Accounts (Maybe Text) +aUsername + = lens _aUsername (\ s a -> s{_aUsername = a}) + +-- | A list of accounts. +aItems :: Lens' Accounts [Maybe Account] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +aTotalResults :: Lens' Accounts (Maybe Int32) +aTotalResults + = lens _aTotalResults + (\ s a -> s{_aTotalResults = a}) + +-- | The starting index of the entries, which is 1 by default or otherwise +-- specified by the start-index query parameter. +aStartIndex :: Lens' Accounts (Maybe Int32) +aStartIndex + = lens _aStartIndex (\ s a -> s{_aStartIndex = a}) + +-- | Previous link for this account collection. +aPreviousLink :: Lens' Accounts (Maybe Text) +aPreviousLink + = lens _aPreviousLink + (\ s a -> s{_aPreviousLink = a}) + +instance FromJSON Accounts where + parseJSON + = withObject "Accounts" + (\ o -> + Accounts <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#accounts") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Accounts where + toJSON Accounts{..} + = object + (catMaybes + [("nextLink" .=) <$> _aNextLink, + ("itemsPerPage" .=) <$> _aItemsPerPage, + Just ("kind" .= _aKind), + ("username" .=) <$> _aUsername, + ("items" .=) <$> _aItems, + ("totalResults" .=) <$> _aTotalResults, + ("startIndex" .=) <$> _aStartIndex, + ("previousLink" .=) <$> _aPreviousLink]) + +-- | JSON template for an Analytics filter expression. +-- +-- /See:/ 'filterExpression' smart constructor. +data FilterExpression = FilterExpression + { _feFieldIndex :: !(Maybe Int32) + , _feField :: !(Maybe Text) + , _feKind :: !Text + , _feMatchType :: !(Maybe Text) + , _feCaseSensitive :: !(Maybe Bool) + , _feExpressionValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilterExpression' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'feFieldIndex' +-- +-- * 'feField' +-- +-- * 'feKind' +-- +-- * 'feMatchType' +-- +-- * 'feCaseSensitive' +-- +-- * 'feExpressionValue' +filterExpression + :: FilterExpression +filterExpression = + FilterExpression + { _feFieldIndex = Nothing + , _feField = Nothing + , _feKind = "analytics#filterExpression" + , _feMatchType = Nothing + , _feCaseSensitive = Nothing + , _feExpressionValue = Nothing + } + +-- | The Index of the custom dimension. Set only if the field is a is +-- CUSTOM_DIMENSION. +feFieldIndex :: Lens' FilterExpression (Maybe Int32) +feFieldIndex + = lens _feFieldIndex (\ s a -> s{_feFieldIndex = a}) + +-- | Field to filter. Possible values: - Content and Traffic - +-- PAGE_REQUEST_URI, - PAGE_HOSTNAME, - PAGE_TITLE, - REFERRAL, - +-- COST_DATA_URI (Campaign target URL), - HIT_TYPE, - INTERNAL_SEARCH_TERM, +-- - INTERNAL_SEARCH_TYPE, - SOURCE_PROPERTY_TRACKING_ID, - Campaign or +-- AdGroup - CAMPAIGN_SOURCE, - CAMPAIGN_MEDIUM, - CAMPAIGN_NAME, - +-- CAMPAIGN_AD_GROUP, - CAMPAIGN_TERM, - CAMPAIGN_CONTENT, - CAMPAIGN_CODE, +-- - CAMPAIGN_REFERRAL_PATH, - E-Commerce - TRANSACTION_COUNTRY, - +-- TRANSACTION_REGION, - TRANSACTION_CITY, - TRANSACTION_AFFILIATION (Store +-- or order location), - ITEM_NAME, - ITEM_CODE, - ITEM_VARIATION, - +-- TRANSACTION_ID, - TRANSACTION_CURRENCY_CODE, - PRODUCT_ACTION_TYPE, - +-- Audience\/Users - BROWSER, - BROWSER_VERSION, - BROWSER_SIZE, - +-- PLATFORM, - PLATFORM_VERSION, - LANGUAGE, - SCREEN_RESOLUTION, - +-- SCREEN_COLORS, - JAVA_ENABLED (Boolean Field), - FLASH_VERSION, - +-- GEO_SPEED (Connection speed), - VISITOR_TYPE, - GEO_ORGANIZATION (ISP +-- organization), - GEO_DOMAIN, - GEO_IP_ADDRESS, - GEO_IP_VERSION, - +-- Location - GEO_COUNTRY, - GEO_REGION, - GEO_CITY, - Event - +-- EVENT_CATEGORY, - EVENT_ACTION, - EVENT_LABEL, - Other - CUSTOM_FIELD_1, +-- - CUSTOM_FIELD_2, - USER_DEFINED_VALUE, - Application - APP_ID, - +-- APP_INSTALLER_ID, - APP_NAME, - APP_VERSION, - SCREEN, - IS_APP (Boolean +-- Field), - IS_FATAL_EXCEPTION (Boolean Field), - EXCEPTION_DESCRIPTION, - +-- Mobile device - IS_MOBILE (Boolean Field, Deprecated. Use +-- DEVICE_CATEGORY=mobile), - IS_TABLET (Boolean Field, Deprecated. Use +-- DEVICE_CATEGORY=tablet), - DEVICE_CATEGORY, - MOBILE_HAS_QWERTY_KEYBOARD +-- (Boolean Field), - MOBILE_HAS_NFC_SUPPORT (Boolean Field), - +-- MOBILE_HAS_CELLULAR_RADIO (Boolean Field), - MOBILE_HAS_WIFI_SUPPORT +-- (Boolean Field), - MOBILE_BRAND_NAME, - MOBILE_MODEL_NAME, - +-- MOBILE_MARKETING_NAME, - MOBILE_POINTING_METHOD, - Social - +-- SOCIAL_NETWORK, - SOCIAL_ACTION, - SOCIAL_ACTION_TARGET, - Custom +-- dimension - CUSTOM_DIMENSION (See accompanying field index), +feField :: Lens' FilterExpression (Maybe Text) +feField = lens _feField (\ s a -> s{_feField = a}) + +-- | Kind value for filter expression +feKind :: Lens' FilterExpression Text +feKind = lens _feKind (\ s a -> s{_feKind = a}) + +-- | Match type for this filter. Possible values are BEGINS_WITH, EQUAL, +-- ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN, GEO_IP_ADDRESS, +-- PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use any match type; all +-- other filters must use MATCHES. +feMatchType :: Lens' FilterExpression (Maybe Text) +feMatchType + = lens _feMatchType (\ s a -> s{_feMatchType = a}) + +-- | Determines if the filter is case sensitive. +feCaseSensitive :: Lens' FilterExpression (Maybe Bool) +feCaseSensitive + = lens _feCaseSensitive + (\ s a -> s{_feCaseSensitive = a}) + +-- | Filter expression value +feExpressionValue :: Lens' FilterExpression (Maybe Text) +feExpressionValue + = lens _feExpressionValue + (\ s a -> s{_feExpressionValue = a}) + +instance FromJSON FilterExpression where + parseJSON + = withObject "FilterExpression" + (\ o -> + FilterExpression <$> + (o .:? "fieldIndex") <*> (o .:? "field") <*> + (o .:? "kind" .!= "analytics#filterExpression") + <*> (o .:? "matchType") + <*> (o .:? "caseSensitive") + <*> (o .:? "expressionValue")) + +instance ToJSON FilterExpression where + toJSON FilterExpression{..} + = object + (catMaybes + [("fieldIndex" .=) <$> _feFieldIndex, + ("field" .=) <$> _feField, Just ("kind" .= _feKind), + ("matchType" .=) <$> _feMatchType, + ("caseSensitive" .=) <$> _feCaseSensitive, + ("expressionValue" .=) <$> _feExpressionValue]) + +-- | Lists Analytics custom data sources to which the user has access. Each +-- resource in the collection corresponds to a single Analytics custom data +-- source. +-- +-- /See:/ 'customDataSources' smart constructor. +data CustomDataSources = CustomDataSources + { _cdsNextLink :: !(Maybe Text) + , _cdsItemsPerPage :: !(Maybe Int32) + , _cdsKind :: !Text + , _cdsUsername :: !(Maybe Text) + , _cdsItems :: !(Maybe [Maybe CustomDataSource]) + , _cdsTotalResults :: !(Maybe Int32) + , _cdsStartIndex :: !(Maybe Int32) + , _cdsPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomDataSources' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdsNextLink' +-- +-- * 'cdsItemsPerPage' +-- +-- * 'cdsKind' +-- +-- * 'cdsUsername' +-- +-- * 'cdsItems' +-- +-- * 'cdsTotalResults' +-- +-- * 'cdsStartIndex' +-- +-- * 'cdsPreviousLink' +customDataSources + :: CustomDataSources +customDataSources = + CustomDataSources + { _cdsNextLink = Nothing + , _cdsItemsPerPage = Nothing + , _cdsKind = "analytics#customDataSources" + , _cdsUsername = Nothing + , _cdsItems = Nothing + , _cdsTotalResults = Nothing + , _cdsStartIndex = Nothing + , _cdsPreviousLink = Nothing + } + +-- | Link to next page for this custom data source collection. +cdsNextLink :: Lens' CustomDataSources (Maybe Text) +cdsNextLink + = lens _cdsNextLink (\ s a -> s{_cdsNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +cdsItemsPerPage :: Lens' CustomDataSources (Maybe Int32) +cdsItemsPerPage + = lens _cdsItemsPerPage + (\ s a -> s{_cdsItemsPerPage = a}) + +-- | Collection type. +cdsKind :: Lens' CustomDataSources Text +cdsKind = lens _cdsKind (\ s a -> s{_cdsKind = a}) + +-- | Email ID of the authenticated user +cdsUsername :: Lens' CustomDataSources (Maybe Text) +cdsUsername + = lens _cdsUsername (\ s a -> s{_cdsUsername = a}) + +-- | Collection of custom data sources. +cdsItems :: Lens' CustomDataSources [Maybe CustomDataSource] +cdsItems + = lens _cdsItems (\ s a -> s{_cdsItems = a}) . + _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +cdsTotalResults :: Lens' CustomDataSources (Maybe Int32) +cdsTotalResults + = lens _cdsTotalResults + (\ s a -> s{_cdsTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +cdsStartIndex :: Lens' CustomDataSources (Maybe Int32) +cdsStartIndex + = lens _cdsStartIndex + (\ s a -> s{_cdsStartIndex = a}) + +-- | Link to previous page for this custom data source collection. +cdsPreviousLink :: Lens' CustomDataSources (Maybe Text) +cdsPreviousLink + = lens _cdsPreviousLink + (\ s a -> s{_cdsPreviousLink = a}) + +instance FromJSON CustomDataSources where + parseJSON + = withObject "CustomDataSources" + (\ o -> + CustomDataSources <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#customDataSources") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON CustomDataSources where + toJSON CustomDataSources{..} + = object + (catMaybes + [("nextLink" .=) <$> _cdsNextLink, + ("itemsPerPage" .=) <$> _cdsItemsPerPage, + Just ("kind" .= _cdsKind), + ("username" .=) <$> _cdsUsername, + ("items" .=) <$> _cdsItems, + ("totalResults" .=) <$> _cdsTotalResults, + ("startIndex" .=) <$> _cdsStartIndex, + ("previousLink" .=) <$> _cdsPreviousLink]) + +-- | JSON template for a linked account. +-- +-- /See:/ 'accountRef' smart constructor. +data AccountRef = AccountRef + { _arKind :: !Text + , _arHref :: !(Maybe Text) + , _arName :: !(Maybe Text) + , _arId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountRef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arKind' +-- +-- * 'arHref' +-- +-- * 'arName' +-- +-- * 'arId' +accountRef + :: AccountRef +accountRef = + AccountRef + { _arKind = "analytics#accountRef" + , _arHref = Nothing + , _arName = Nothing + , _arId = Nothing + } + +-- | Analytics account reference. +arKind :: Lens' AccountRef Text +arKind = lens _arKind (\ s a -> s{_arKind = a}) + +-- | Link for this account. +arHref :: Lens' AccountRef (Maybe Text) +arHref = lens _arHref (\ s a -> s{_arHref = a}) + +-- | Account name. +arName :: Lens' AccountRef (Maybe Text) +arName = lens _arName (\ s a -> s{_arName = a}) + +-- | Account ID. +arId :: Lens' AccountRef (Maybe Text) +arId = lens _arId (\ s a -> s{_arId = a}) + +instance FromJSON AccountRef where + parseJSON + = withObject "AccountRef" + (\ o -> + AccountRef <$> + (o .:? "kind" .!= "analytics#accountRef") <*> + (o .:? "href") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AccountRef where + toJSON AccountRef{..} + = object + (catMaybes + [Just ("kind" .= _arKind), ("href" .=) <$> _arHref, + ("name" .=) <$> _arName, ("id" .=) <$> _arId]) + +-- | An entity AdWords link collection provides a list of GA-AdWords links +-- Each resource in this collection corresponds to a single link. +-- +-- /See:/ 'entityAdWordsLinks' smart constructor. +data EntityAdWordsLinks = EntityAdWordsLinks + { _eawlNextLink :: !(Maybe Text) + , _eawlItemsPerPage :: !(Maybe Int32) + , _eawlKind :: !Text + , _eawlItems :: !(Maybe [Maybe EntityAdWordsLink]) + , _eawlTotalResults :: !(Maybe Int32) + , _eawlStartIndex :: !(Maybe Int32) + , _eawlPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntityAdWordsLinks' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eawlNextLink' +-- +-- * 'eawlItemsPerPage' +-- +-- * 'eawlKind' +-- +-- * 'eawlItems' +-- +-- * 'eawlTotalResults' +-- +-- * 'eawlStartIndex' +-- +-- * 'eawlPreviousLink' +entityAdWordsLinks + :: EntityAdWordsLinks +entityAdWordsLinks = + EntityAdWordsLinks + { _eawlNextLink = Nothing + , _eawlItemsPerPage = Nothing + , _eawlKind = "analytics#entityAdWordsLinks" + , _eawlItems = Nothing + , _eawlTotalResults = Nothing + , _eawlStartIndex = Nothing + , _eawlPreviousLink = Nothing + } + +-- | Next link for this AdWords link collection. +eawlNextLink :: Lens' EntityAdWordsLinks (Maybe Text) +eawlNextLink + = lens _eawlNextLink (\ s a -> s{_eawlNextLink = a}) + +-- | The maximum number of entries the response can contain, regardless of +-- the actual number of entries returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +eawlItemsPerPage :: Lens' EntityAdWordsLinks (Maybe Int32) +eawlItemsPerPage + = lens _eawlItemsPerPage + (\ s a -> s{_eawlItemsPerPage = a}) + +-- | Collection type. +eawlKind :: Lens' EntityAdWordsLinks Text +eawlKind = lens _eawlKind (\ s a -> s{_eawlKind = a}) + +-- | A list of entity AdWords links. +eawlItems :: Lens' EntityAdWordsLinks [Maybe EntityAdWordsLink] +eawlItems + = lens _eawlItems (\ s a -> s{_eawlItems = a}) . + _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +eawlTotalResults :: Lens' EntityAdWordsLinks (Maybe Int32) +eawlTotalResults + = lens _eawlTotalResults + (\ s a -> s{_eawlTotalResults = a}) + +-- | The starting index of the entries, which is 1 by default or otherwise +-- specified by the start-index query parameter. +eawlStartIndex :: Lens' EntityAdWordsLinks (Maybe Int32) +eawlStartIndex + = lens _eawlStartIndex + (\ s a -> s{_eawlStartIndex = a}) + +-- | Previous link for this AdWords link collection. +eawlPreviousLink :: Lens' EntityAdWordsLinks (Maybe Text) +eawlPreviousLink + = lens _eawlPreviousLink + (\ s a -> s{_eawlPreviousLink = a}) + +instance FromJSON EntityAdWordsLinks where + parseJSON + = withObject "EntityAdWordsLinks" + (\ o -> + EntityAdWordsLinks <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#entityAdWordsLinks") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON EntityAdWordsLinks where + toJSON EntityAdWordsLinks{..} + = object + (catMaybes + [("nextLink" .=) <$> _eawlNextLink, + ("itemsPerPage" .=) <$> _eawlItemsPerPage, + Just ("kind" .= _eawlKind), + ("items" .=) <$> _eawlItems, + ("totalResults" .=) <$> _eawlTotalResults, + ("startIndex" .=) <$> _eawlStartIndex, + ("previousLink" .=) <$> _eawlPreviousLink]) + +-- | Multi-Channel Funnels data for a given view (profile). +-- +-- /See:/ 'mcfData' smart constructor. +data McfData = McfData + { _mdNextLink :: !(Maybe Text) + , _mdSampleSpace :: !(Maybe Int64) + , _mdItemsPerPage :: !(Maybe Int32) + , _mdProfileInfo :: !(Maybe McfDataProfileInfo) + , _mdKind :: !Text + , _mdSampleSize :: !(Maybe Int64) + , _mdRows :: !(Maybe [[McfDataRowsItemItem]]) + , _mdSelfLink :: !(Maybe Text) + , _mdQuery :: !(Maybe McfDataQuery) + , _mdColumnHeaders :: !(Maybe [McfDataColumnHeadersItem]) + , _mdId :: !(Maybe Text) + , _mdTotalResults :: !(Maybe Int32) + , _mdContainsSampledData :: !(Maybe Bool) + , _mdTotalsForAllResults :: !(Maybe McfDataTotalsForAllResults) + , _mdPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'McfData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdNextLink' +-- +-- * 'mdSampleSpace' +-- +-- * 'mdItemsPerPage' +-- +-- * 'mdProfileInfo' +-- +-- * 'mdKind' +-- +-- * 'mdSampleSize' +-- +-- * 'mdRows' +-- +-- * 'mdSelfLink' +-- +-- * 'mdQuery' +-- +-- * 'mdColumnHeaders' +-- +-- * 'mdId' +-- +-- * 'mdTotalResults' +-- +-- * 'mdContainsSampledData' +-- +-- * 'mdTotalsForAllResults' +-- +-- * 'mdPreviousLink' +mcfData + :: McfData +mcfData = + McfData + { _mdNextLink = Nothing + , _mdSampleSpace = Nothing + , _mdItemsPerPage = Nothing + , _mdProfileInfo = Nothing + , _mdKind = "analytics#mcfData" + , _mdSampleSize = Nothing + , _mdRows = Nothing + , _mdSelfLink = Nothing + , _mdQuery = Nothing + , _mdColumnHeaders = Nothing + , _mdId = Nothing + , _mdTotalResults = Nothing + , _mdContainsSampledData = Nothing + , _mdTotalsForAllResults = Nothing + , _mdPreviousLink = Nothing + } + +-- | Link to next page for this Analytics data query. +mdNextLink :: Lens' McfData (Maybe Text) +mdNextLink + = lens _mdNextLink (\ s a -> s{_mdNextLink = a}) + +-- | Total size of the sample space from which the samples were selected. +mdSampleSpace :: Lens' McfData (Maybe Int64) +mdSampleSpace + = lens _mdSampleSpace + (\ s a -> s{_mdSampleSpace = a}) + +-- | The maximum number of rows the response can contain, regardless of the +-- actual number of rows returned. Its value ranges from 1 to 10,000 with a +-- value of 1000 by default, or otherwise specified by the max-results +-- query parameter. +mdItemsPerPage :: Lens' McfData (Maybe Int32) +mdItemsPerPage + = lens _mdItemsPerPage + (\ s a -> s{_mdItemsPerPage = a}) + +-- | Information for the view (profile), for which the Analytics data was +-- requested. +mdProfileInfo :: Lens' McfData (Maybe McfDataProfileInfo) +mdProfileInfo + = lens _mdProfileInfo + (\ s a -> s{_mdProfileInfo = a}) + +-- | Resource type. +mdKind :: Lens' McfData Text +mdKind = lens _mdKind (\ s a -> s{_mdKind = a}) + +-- | The number of samples used to calculate the result. +mdSampleSize :: Lens' McfData (Maybe Int64) +mdSampleSize + = lens _mdSampleSize (\ s a -> s{_mdSampleSize = a}) + +-- | Analytics data rows, where each row contains a list of dimension values +-- followed by the metric values. The order of dimensions and metrics is +-- same as specified in the request. +mdRows :: Lens' McfData [[McfDataRowsItemItem]] +mdRows + = lens _mdRows (\ s a -> s{_mdRows = a}) . _Default . + _Coerce + +-- | Link to this page. +mdSelfLink :: Lens' McfData (Maybe Text) +mdSelfLink + = lens _mdSelfLink (\ s a -> s{_mdSelfLink = a}) + +-- | Analytics data request query parameters. +mdQuery :: Lens' McfData (Maybe McfDataQuery) +mdQuery = lens _mdQuery (\ s a -> s{_mdQuery = a}) + +-- | Column headers that list dimension names followed by the metric names. +-- The order of dimensions and metrics is same as specified in the request. +mdColumnHeaders :: Lens' McfData [McfDataColumnHeadersItem] +mdColumnHeaders + = lens _mdColumnHeaders + (\ s a -> s{_mdColumnHeaders = a}) + . _Default + . _Coerce + +-- | Unique ID for this data response. +mdId :: Lens' McfData (Maybe Text) +mdId = lens _mdId (\ s a -> s{_mdId = a}) + +-- | The total number of rows for the query, regardless of the number of rows +-- in the response. +mdTotalResults :: Lens' McfData (Maybe Int32) +mdTotalResults + = lens _mdTotalResults + (\ s a -> s{_mdTotalResults = a}) + +-- | Determines if the Analytics data contains sampled data. +mdContainsSampledData :: Lens' McfData (Maybe Bool) +mdContainsSampledData + = lens _mdContainsSampledData + (\ s a -> s{_mdContainsSampledData = a}) + +-- | Total values for the requested metrics over all the results, not just +-- the results returned in this response. The order of the metric totals is +-- same as the metric order specified in the request. +mdTotalsForAllResults :: Lens' McfData (Maybe McfDataTotalsForAllResults) +mdTotalsForAllResults + = lens _mdTotalsForAllResults + (\ s a -> s{_mdTotalsForAllResults = a}) + +-- | Link to previous page for this Analytics data query. +mdPreviousLink :: Lens' McfData (Maybe Text) +mdPreviousLink + = lens _mdPreviousLink + (\ s a -> s{_mdPreviousLink = a}) + +instance FromJSON McfData where + parseJSON + = withObject "McfData" + (\ o -> + McfData <$> + (o .:? "nextLink") <*> (o .:? "sampleSpace") <*> + (o .:? "itemsPerPage") + <*> (o .:? "profileInfo") + <*> (o .:? "kind" .!= "analytics#mcfData") + <*> (o .:? "sampleSize") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "query") + <*> (o .:? "columnHeaders" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "totalResults") + <*> (o .:? "containsSampledData") + <*> (o .:? "totalsForAllResults") + <*> (o .:? "previousLink")) + +instance ToJSON McfData where + toJSON McfData{..} + = object + (catMaybes + [("nextLink" .=) <$> _mdNextLink, + ("sampleSpace" .=) <$> _mdSampleSpace, + ("itemsPerPage" .=) <$> _mdItemsPerPage, + ("profileInfo" .=) <$> _mdProfileInfo, + Just ("kind" .= _mdKind), + ("sampleSize" .=) <$> _mdSampleSize, + ("rows" .=) <$> _mdRows, + ("selfLink" .=) <$> _mdSelfLink, + ("query" .=) <$> _mdQuery, + ("columnHeaders" .=) <$> _mdColumnHeaders, + ("id" .=) <$> _mdId, + ("totalResults" .=) <$> _mdTotalResults, + ("containsSampledData" .=) <$> + _mdContainsSampledData, + ("totalsForAllResults" .=) <$> + _mdTotalsForAllResults, + ("previousLink" .=) <$> _mdPreviousLink]) + +-- | Request template for the delete upload data request. +-- +-- /See:/ 'analyticsDataimportDeleteUploadDataRequest' smart constructor. +newtype AnalyticsDataimportDeleteUploadDataRequest = AnalyticsDataimportDeleteUploadDataRequest + { _addudrCustomDataImportUids :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnalyticsDataimportDeleteUploadDataRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'addudrCustomDataImportUids' +analyticsDataimportDeleteUploadDataRequest + :: AnalyticsDataimportDeleteUploadDataRequest +analyticsDataimportDeleteUploadDataRequest = + AnalyticsDataimportDeleteUploadDataRequest + { _addudrCustomDataImportUids = Nothing + } + +-- | A list of upload UIDs. +addudrCustomDataImportUids :: Lens' AnalyticsDataimportDeleteUploadDataRequest [Text] +addudrCustomDataImportUids + = lens _addudrCustomDataImportUids + (\ s a -> s{_addudrCustomDataImportUids = a}) + . _Default + . _Coerce + +instance FromJSON + AnalyticsDataimportDeleteUploadDataRequest where + parseJSON + = withObject + "AnalyticsDataimportDeleteUploadDataRequest" + (\ o -> + AnalyticsDataimportDeleteUploadDataRequest <$> + (o .:? "customDataImportUids" .!= mempty)) + +instance ToJSON + AnalyticsDataimportDeleteUploadDataRequest where + toJSON AnalyticsDataimportDeleteUploadDataRequest{..} + = object + (catMaybes + [("customDataImportUids" .=) <$> + _addudrCustomDataImportUids]) + +-- | A view (profile) collection lists Analytics views (profiles) to which +-- the user has access. Each resource in the collection corresponds to a +-- single Analytics view (profile). +-- +-- /See:/ 'profiles' smart constructor. +data Profiles = Profiles + { _pNextLink :: !(Maybe Text) + , _pItemsPerPage :: !(Maybe Int32) + , _pKind :: !Text + , _pUsername :: !(Maybe Text) + , _pItems :: !(Maybe [Maybe Profile]) + , _pTotalResults :: !(Maybe Int32) + , _pStartIndex :: !(Maybe Int32) + , _pPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Profiles' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pNextLink' +-- +-- * 'pItemsPerPage' +-- +-- * 'pKind' +-- +-- * 'pUsername' +-- +-- * 'pItems' +-- +-- * 'pTotalResults' +-- +-- * 'pStartIndex' +-- +-- * 'pPreviousLink' +profiles + :: Profiles +profiles = + Profiles + { _pNextLink = Nothing + , _pItemsPerPage = Nothing + , _pKind = "analytics#profiles" + , _pUsername = Nothing + , _pItems = Nothing + , _pTotalResults = Nothing + , _pStartIndex = Nothing + , _pPreviousLink = Nothing + } + +-- | Link to next page for this view (profile) collection. +pNextLink :: Lens' Profiles (Maybe Text) +pNextLink + = lens _pNextLink (\ s a -> s{_pNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +pItemsPerPage :: Lens' Profiles (Maybe Int32) +pItemsPerPage + = lens _pItemsPerPage + (\ s a -> s{_pItemsPerPage = a}) + +-- | Collection type. +pKind :: Lens' Profiles Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | Email ID of the authenticated user +pUsername :: Lens' Profiles (Maybe Text) +pUsername + = lens _pUsername (\ s a -> s{_pUsername = a}) + +-- | A list of views (profiles). +pItems :: Lens' Profiles [Maybe Profile] +pItems + = lens _pItems (\ s a -> s{_pItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +pTotalResults :: Lens' Profiles (Maybe Int32) +pTotalResults + = lens _pTotalResults + (\ s a -> s{_pTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +pStartIndex :: Lens' Profiles (Maybe Int32) +pStartIndex + = lens _pStartIndex (\ s a -> s{_pStartIndex = a}) + +-- | Link to previous page for this view (profile) collection. +pPreviousLink :: Lens' Profiles (Maybe Text) +pPreviousLink + = lens _pPreviousLink + (\ s a -> s{_pPreviousLink = a}) + +instance FromJSON Profiles where + parseJSON + = withObject "Profiles" + (\ o -> + Profiles <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#profiles") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Profiles where + toJSON Profiles{..} + = object + (catMaybes + [("nextLink" .=) <$> _pNextLink, + ("itemsPerPage" .=) <$> _pItemsPerPage, + Just ("kind" .= _pKind), + ("username" .=) <$> _pUsername, + ("items" .=) <$> _pItems, + ("totalResults" .=) <$> _pTotalResults, + ("startIndex" .=) <$> _pStartIndex, + ("previousLink" .=) <$> _pPreviousLink]) + +-- | JSON template for a user reference. +-- +-- /See:/ 'userRef' smart constructor. +data UserRef = UserRef + { _useEmail :: !(Maybe Text) + , _useKind :: !Text + , _useId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'useEmail' +-- +-- * 'useKind' +-- +-- * 'useId' +userRef + :: UserRef +userRef = + UserRef + { _useEmail = Nothing + , _useKind = "analytics#userRef" + , _useId = Nothing + } + +-- | Email ID of this user. +useEmail :: Lens' UserRef (Maybe Text) +useEmail = lens _useEmail (\ s a -> s{_useEmail = a}) + +useKind :: Lens' UserRef Text +useKind = lens _useKind (\ s a -> s{_useKind = a}) + +-- | User ID. +useId :: Lens' UserRef (Maybe Text) +useId = lens _useId (\ s a -> s{_useId = a}) + +instance FromJSON UserRef where + parseJSON + = withObject "UserRef" + (\ o -> + UserRef <$> + (o .:? "email") <*> + (o .:? "kind" .!= "analytics#userRef") + <*> (o .:? "id")) + +instance ToJSON UserRef where + toJSON UserRef{..} + = object + (catMaybes + [("email" .=) <$> _useEmail, + Just ("kind" .= _useKind), ("id" .=) <$> _useId]) + +-- | A filter collection lists filters created by users in an Analytics +-- account. Each resource in the collection corresponds to a filter. +-- +-- /See:/ 'filters' smart constructor. +data Filters = Filters + { _fNextLink :: !(Maybe Text) + , _fItemsPerPage :: !(Maybe Int32) + , _fKind :: !Text + , _fUsername :: !(Maybe Text) + , _fItems :: !(Maybe [Maybe Filter]) + , _fTotalResults :: !(Maybe Int32) + , _fStartIndex :: !(Maybe Int32) + , _fPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Filters' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fNextLink' +-- +-- * 'fItemsPerPage' +-- +-- * 'fKind' +-- +-- * 'fUsername' +-- +-- * 'fItems' +-- +-- * 'fTotalResults' +-- +-- * 'fStartIndex' +-- +-- * 'fPreviousLink' +filters + :: Filters +filters = + Filters + { _fNextLink = Nothing + , _fItemsPerPage = Nothing + , _fKind = "analytics#filters" + , _fUsername = Nothing + , _fItems = Nothing + , _fTotalResults = Nothing + , _fStartIndex = Nothing + , _fPreviousLink = Nothing + } + +-- | Link to next page for this filter collection. +fNextLink :: Lens' Filters (Maybe Text) +fNextLink + = lens _fNextLink (\ s a -> s{_fNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to +-- 1,000 with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +fItemsPerPage :: Lens' Filters (Maybe Int32) +fItemsPerPage + = lens _fItemsPerPage + (\ s a -> s{_fItemsPerPage = a}) + +-- | Collection type. +fKind :: Lens' Filters Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +-- | Email ID of the authenticated user +fUsername :: Lens' Filters (Maybe Text) +fUsername + = lens _fUsername (\ s a -> s{_fUsername = a}) + +-- | A list of filters. +fItems :: Lens' Filters [Maybe Filter] +fItems + = lens _fItems (\ s a -> s{_fItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +fTotalResults :: Lens' Filters (Maybe Int32) +fTotalResults + = lens _fTotalResults + (\ s a -> s{_fTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +fStartIndex :: Lens' Filters (Maybe Int32) +fStartIndex + = lens _fStartIndex (\ s a -> s{_fStartIndex = a}) + +-- | Link to previous page for this filter collection. +fPreviousLink :: Lens' Filters (Maybe Text) +fPreviousLink + = lens _fPreviousLink + (\ s a -> s{_fPreviousLink = a}) + +instance FromJSON Filters where + parseJSON + = withObject "Filters" + (\ o -> + Filters <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#filters") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Filters where + toJSON Filters{..} + = object + (catMaybes + [("nextLink" .=) <$> _fNextLink, + ("itemsPerPage" .=) <$> _fItemsPerPage, + Just ("kind" .= _fKind), + ("username" .=) <$> _fUsername, + ("items" .=) <$> _fItems, + ("totalResults" .=) <$> _fTotalResults, + ("startIndex" .=) <$> _fStartIndex, + ("previousLink" .=) <$> _fPreviousLink]) + +-- | JSON template for an Analytics WebPropertySummary. WebPropertySummary +-- returns basic information (i.e., summary) for a web property. +-- +-- /See:/ 'webPropertySummary' smart constructor. +data WebPropertySummary = WebPropertySummary + { _wpsKind :: !Text + , _wpsProfiles :: !(Maybe [Maybe ProfileSummary]) + , _wpsName :: !(Maybe Text) + , _wpsInternalWebPropertyId :: !(Maybe Text) + , _wpsId :: !(Maybe Text) + , _wpsWebsiteUrl :: !(Maybe Text) + , _wpsLevel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebPropertySummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wpsKind' +-- +-- * 'wpsProfiles' +-- +-- * 'wpsName' +-- +-- * 'wpsInternalWebPropertyId' +-- +-- * 'wpsId' +-- +-- * 'wpsWebsiteUrl' +-- +-- * 'wpsLevel' +webPropertySummary + :: WebPropertySummary +webPropertySummary = + WebPropertySummary + { _wpsKind = "analytics#webPropertySummary" + , _wpsProfiles = Nothing + , _wpsName = Nothing + , _wpsInternalWebPropertyId = Nothing + , _wpsId = Nothing + , _wpsWebsiteUrl = Nothing + , _wpsLevel = Nothing + } + +-- | Resource type for Analytics WebPropertySummary. +wpsKind :: Lens' WebPropertySummary Text +wpsKind = lens _wpsKind (\ s a -> s{_wpsKind = a}) + +-- | List of profiles under this web property. +wpsProfiles :: Lens' WebPropertySummary [Maybe ProfileSummary] +wpsProfiles + = lens _wpsProfiles (\ s a -> s{_wpsProfiles = a}) . + _Default + . _Coerce + +-- | Web property name. +wpsName :: Lens' WebPropertySummary (Maybe Text) +wpsName = lens _wpsName (\ s a -> s{_wpsName = a}) + +-- | Internal ID for this web property. +wpsInternalWebPropertyId :: Lens' WebPropertySummary (Maybe Text) +wpsInternalWebPropertyId + = lens _wpsInternalWebPropertyId + (\ s a -> s{_wpsInternalWebPropertyId = a}) + +-- | Web property ID of the form UA-XXXXX-YY. +wpsId :: Lens' WebPropertySummary (Maybe Text) +wpsId = lens _wpsId (\ s a -> s{_wpsId = a}) + +-- | Website url for this web property. +wpsWebsiteUrl :: Lens' WebPropertySummary (Maybe Text) +wpsWebsiteUrl + = lens _wpsWebsiteUrl + (\ s a -> s{_wpsWebsiteUrl = a}) + +-- | Level for this web property. Possible values are STANDARD or PREMIUM. +wpsLevel :: Lens' WebPropertySummary (Maybe Text) +wpsLevel = lens _wpsLevel (\ s a -> s{_wpsLevel = a}) + +instance FromJSON WebPropertySummary where + parseJSON + = withObject "WebPropertySummary" + (\ o -> + WebPropertySummary <$> + (o .:? "kind" .!= "analytics#webPropertySummary") <*> + (o .:? "profiles" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id") + <*> (o .:? "websiteUrl") + <*> (o .:? "level")) + +instance ToJSON WebPropertySummary where + toJSON WebPropertySummary{..} + = object + (catMaybes + [Just ("kind" .= _wpsKind), + ("profiles" .=) <$> _wpsProfiles, + ("name" .=) <$> _wpsName, + ("internalWebPropertyId" .=) <$> + _wpsInternalWebPropertyId, + ("id" .=) <$> _wpsId, + ("websiteUrl" .=) <$> _wpsWebsiteUrl, + ("level" .=) <$> _wpsLevel]) + +-- | An AccountSummary collection lists a summary of accounts, properties and +-- views (profiles) to which the user has access. Each resource in the +-- collection corresponds to a single AccountSummary. +-- +-- /See:/ 'accountSummaries' smart constructor. +data AccountSummaries = AccountSummaries + { _asNextLink :: !(Maybe Text) + , _asItemsPerPage :: !(Maybe Int32) + , _asKind :: !Text + , _asUsername :: !(Maybe Text) + , _asItems :: !(Maybe [Maybe AccountSummary]) + , _asTotalResults :: !(Maybe Int32) + , _asStartIndex :: !(Maybe Int32) + , _asPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountSummaries' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asNextLink' +-- +-- * 'asItemsPerPage' +-- +-- * 'asKind' +-- +-- * 'asUsername' +-- +-- * 'asItems' +-- +-- * 'asTotalResults' +-- +-- * 'asStartIndex' +-- +-- * 'asPreviousLink' +accountSummaries + :: AccountSummaries +accountSummaries = + AccountSummaries + { _asNextLink = Nothing + , _asItemsPerPage = Nothing + , _asKind = "analytics#accountSummaries" + , _asUsername = Nothing + , _asItems = Nothing + , _asTotalResults = Nothing + , _asStartIndex = Nothing + , _asPreviousLink = Nothing + } + +-- | Link to next page for this AccountSummary collection. +asNextLink :: Lens' AccountSummaries (Maybe Text) +asNextLink + = lens _asNextLink (\ s a -> s{_asNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +asItemsPerPage :: Lens' AccountSummaries (Maybe Int32) +asItemsPerPage + = lens _asItemsPerPage + (\ s a -> s{_asItemsPerPage = a}) + +-- | Collection type. +asKind :: Lens' AccountSummaries Text +asKind = lens _asKind (\ s a -> s{_asKind = a}) + +-- | Email ID of the authenticated user +asUsername :: Lens' AccountSummaries (Maybe Text) +asUsername + = lens _asUsername (\ s a -> s{_asUsername = a}) + +-- | A list of AccountSummaries. +asItems :: Lens' AccountSummaries [Maybe AccountSummary] +asItems + = lens _asItems (\ s a -> s{_asItems = a}) . _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +asTotalResults :: Lens' AccountSummaries (Maybe Int32) +asTotalResults + = lens _asTotalResults + (\ s a -> s{_asTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +asStartIndex :: Lens' AccountSummaries (Maybe Int32) +asStartIndex + = lens _asStartIndex (\ s a -> s{_asStartIndex = a}) + +-- | Link to previous page for this AccountSummary collection. +asPreviousLink :: Lens' AccountSummaries (Maybe Text) +asPreviousLink + = lens _asPreviousLink + (\ s a -> s{_asPreviousLink = a}) + +instance FromJSON AccountSummaries where + parseJSON + = withObject "AccountSummaries" + (\ o -> + AccountSummaries <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#accountSummaries") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON AccountSummaries where + toJSON AccountSummaries{..} + = object + (catMaybes + [("nextLink" .=) <$> _asNextLink, + ("itemsPerPage" .=) <$> _asItemsPerPage, + Just ("kind" .= _asKind), + ("username" .=) <$> _asUsername, + ("items" .=) <$> _asItems, + ("totalResults" .=) <$> _asTotalResults, + ("startIndex" .=) <$> _asStartIndex, + ("previousLink" .=) <$> _asPreviousLink]) + +-- | JSON template for Analytics Entity AdWords Link. +-- +-- /See:/ 'entityAdWordsLink' smart constructor. +data EntityAdWordsLink = EntityAdWordsLink + { _entAdWordsAccounts :: !(Maybe [Maybe AdWordsAccount]) + , _entProfileIds :: !(Maybe [Text]) + , _entKind :: !Text + , _entSelfLink :: !(Maybe Text) + , _entName :: !(Maybe Text) + , _entId :: !(Maybe Text) + , _entEntity :: !(Maybe EntityAdWordsLinkEntity) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntityAdWordsLink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'entAdWordsAccounts' +-- +-- * 'entProfileIds' +-- +-- * 'entKind' +-- +-- * 'entSelfLink' +-- +-- * 'entName' +-- +-- * 'entId' +-- +-- * 'entEntity' +entityAdWordsLink + :: EntityAdWordsLink +entityAdWordsLink = + EntityAdWordsLink + { _entAdWordsAccounts = Nothing + , _entProfileIds = Nothing + , _entKind = "analytics#entityAdWordsLink" + , _entSelfLink = Nothing + , _entName = Nothing + , _entId = Nothing + , _entEntity = Nothing + } + +-- | A list of AdWords client accounts. These cannot be MCC accounts. This +-- field is required when creating an AdWords link. It cannot be empty. +entAdWordsAccounts :: Lens' EntityAdWordsLink [Maybe AdWordsAccount] +entAdWordsAccounts + = lens _entAdWordsAccounts + (\ s a -> s{_entAdWordsAccounts = a}) + . _Default + . _Coerce + +-- | IDs of linked Views (Profiles) represented as strings. +entProfileIds :: Lens' EntityAdWordsLink [Text] +entProfileIds + = lens _entProfileIds + (\ s a -> s{_entProfileIds = a}) + . _Default + . _Coerce + +-- | Resource type for entity AdWords link. +entKind :: Lens' EntityAdWordsLink Text +entKind = lens _entKind (\ s a -> s{_entKind = a}) + +-- | URL link for this Google Analytics - Google AdWords link. +entSelfLink :: Lens' EntityAdWordsLink (Maybe Text) +entSelfLink + = lens _entSelfLink (\ s a -> s{_entSelfLink = a}) + +-- | Name of the link. This field is required when creating an AdWords link. +entName :: Lens' EntityAdWordsLink (Maybe Text) +entName = lens _entName (\ s a -> s{_entName = a}) + +-- | Entity AdWords link ID +entId :: Lens' EntityAdWordsLink (Maybe Text) +entId = lens _entId (\ s a -> s{_entId = a}) + +-- | Web property being linked. +entEntity :: Lens' EntityAdWordsLink (Maybe EntityAdWordsLinkEntity) +entEntity + = lens _entEntity (\ s a -> s{_entEntity = a}) + +instance FromJSON EntityAdWordsLink where + parseJSON + = withObject "EntityAdWordsLink" + (\ o -> + EntityAdWordsLink <$> + (o .:? "adWordsAccounts" .!= mempty) <*> + (o .:? "profileIds" .!= mempty) + <*> (o .:? "kind" .!= "analytics#entityAdWordsLink") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "entity")) + +instance ToJSON EntityAdWordsLink where + toJSON EntityAdWordsLink{..} + = object + (catMaybes + [("adWordsAccounts" .=) <$> _entAdWordsAccounts, + ("profileIds" .=) <$> _entProfileIds, + Just ("kind" .= _entKind), + ("selfLink" .=) <$> _entSelfLink, + ("name" .=) <$> _entName, ("id" .=) <$> _entId, + ("entity" .=) <$> _entEntity]) + +-- | JSON template for an Analytics view (profile). +-- +-- /See:/ 'profile' smart constructor. +data Profile = Profile + { _proParentLink :: !(Maybe ProfileParentLink) + , _proECommerceTracking :: !(Maybe Bool) + , _proSiteSearchCategoryParameters :: !(Maybe Text) + , _proWebPropertyId :: !(Maybe Text) + , _proChildLink :: !(Maybe ProfileChildLink) + , _proSiteSearchQueryParameters :: !(Maybe Text) + , _proKind :: !Text + , _proDefaultPage :: !(Maybe Text) + , _proCreated :: !(Maybe UTCTime) + , _proSelfLink :: !(Maybe Text) + , _proAccountId :: !(Maybe Text) + , _proName :: !(Maybe Text) + , _proCurrency :: !(Maybe Text) + , _proInternalWebPropertyId :: !(Maybe Text) + , _proId :: !(Maybe Text) + , _proUpdated :: !(Maybe UTCTime) + , _proPermissions :: !(Maybe ProfilePermissions) + , _proWebsiteUrl :: !(Maybe Text) + , _proType :: !(Maybe Text) + , _proStripSiteSearchCategoryParameters :: !(Maybe Bool) + , _proTimezone :: !(Maybe Text) + , _proExcludeQueryParameters :: !(Maybe Text) + , _proEnhancedECommerceTracking :: !(Maybe Bool) + , _proStripSiteSearchQueryParameters :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Profile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proParentLink' +-- +-- * 'proECommerceTracking' +-- +-- * 'proSiteSearchCategoryParameters' +-- +-- * 'proWebPropertyId' +-- +-- * 'proChildLink' +-- +-- * 'proSiteSearchQueryParameters' +-- +-- * 'proKind' +-- +-- * 'proDefaultPage' +-- +-- * 'proCreated' +-- +-- * 'proSelfLink' +-- +-- * 'proAccountId' +-- +-- * 'proName' +-- +-- * 'proCurrency' +-- +-- * 'proInternalWebPropertyId' +-- +-- * 'proId' +-- +-- * 'proUpdated' +-- +-- * 'proPermissions' +-- +-- * 'proWebsiteUrl' +-- +-- * 'proType' +-- +-- * 'proStripSiteSearchCategoryParameters' +-- +-- * 'proTimezone' +-- +-- * 'proExcludeQueryParameters' +-- +-- * 'proEnhancedECommerceTracking' +-- +-- * 'proStripSiteSearchQueryParameters' +profile + :: Profile +profile = + Profile + { _proParentLink = Nothing + , _proECommerceTracking = Nothing + , _proSiteSearchCategoryParameters = Nothing + , _proWebPropertyId = Nothing + , _proChildLink = Nothing + , _proSiteSearchQueryParameters = Nothing + , _proKind = "analytics#profile" + , _proDefaultPage = Nothing + , _proCreated = Nothing + , _proSelfLink = Nothing + , _proAccountId = Nothing + , _proName = Nothing + , _proCurrency = Nothing + , _proInternalWebPropertyId = Nothing + , _proId = Nothing + , _proUpdated = Nothing + , _proPermissions = Nothing + , _proWebsiteUrl = Nothing + , _proType = Nothing + , _proStripSiteSearchCategoryParameters = Nothing + , _proTimezone = Nothing + , _proExcludeQueryParameters = Nothing + , _proEnhancedECommerceTracking = Nothing + , _proStripSiteSearchQueryParameters = Nothing + } + +-- | Parent link for this view (profile). Points to the web property to which +-- this view (profile) belongs. +proParentLink :: Lens' Profile (Maybe ProfileParentLink) +proParentLink + = lens _proParentLink + (\ s a -> s{_proParentLink = a}) + +-- | Indicates whether ecommerce tracking is enabled for this view (profile). +proECommerceTracking :: Lens' Profile (Maybe Bool) +proECommerceTracking + = lens _proECommerceTracking + (\ s a -> s{_proECommerceTracking = a}) + +-- | Site search category parameters for this view (profile). +proSiteSearchCategoryParameters :: Lens' Profile (Maybe Text) +proSiteSearchCategoryParameters + = lens _proSiteSearchCategoryParameters + (\ s a -> s{_proSiteSearchCategoryParameters = a}) + +-- | Web property ID of the form UA-XXXXX-YY to which this view (profile) +-- belongs. +proWebPropertyId :: Lens' Profile (Maybe Text) +proWebPropertyId + = lens _proWebPropertyId + (\ s a -> s{_proWebPropertyId = a}) + +-- | Child link for this view (profile). Points to the list of goals for this +-- view (profile). +proChildLink :: Lens' Profile (Maybe ProfileChildLink) +proChildLink + = lens _proChildLink (\ s a -> s{_proChildLink = a}) + +-- | The site search query parameters for this view (profile). +proSiteSearchQueryParameters :: Lens' Profile (Maybe Text) +proSiteSearchQueryParameters + = lens _proSiteSearchQueryParameters + (\ s a -> s{_proSiteSearchQueryParameters = a}) + +-- | Resource type for Analytics view (profile). +proKind :: Lens' Profile Text +proKind = lens _proKind (\ s a -> s{_proKind = a}) + +-- | Default page for this view (profile). +proDefaultPage :: Lens' Profile (Maybe Text) +proDefaultPage + = lens _proDefaultPage + (\ s a -> s{_proDefaultPage = a}) + +-- | Time this view (profile) was created. +proCreated :: Lens' Profile (Maybe UTCTime) +proCreated + = lens _proCreated (\ s a -> s{_proCreated = a}) + +-- | Link for this view (profile). +proSelfLink :: Lens' Profile (Maybe Text) +proSelfLink + = lens _proSelfLink (\ s a -> s{_proSelfLink = a}) + +-- | Account ID to which this view (profile) belongs. +proAccountId :: Lens' Profile (Maybe Text) +proAccountId + = lens _proAccountId (\ s a -> s{_proAccountId = a}) + +-- | Name of this view (profile). +proName :: Lens' Profile (Maybe Text) +proName = lens _proName (\ s a -> s{_proName = a}) + +-- | The currency type associated with this view (profile), defaults to USD. +-- The supported values are: ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, +-- EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, +-- RUB, SEK, THB, TRY, TWD, USD, VND, ZAR +proCurrency :: Lens' Profile (Maybe Text) +proCurrency + = lens _proCurrency (\ s a -> s{_proCurrency = a}) + +-- | Internal ID for the web property to which this view (profile) belongs. +proInternalWebPropertyId :: Lens' Profile (Maybe Text) +proInternalWebPropertyId + = lens _proInternalWebPropertyId + (\ s a -> s{_proInternalWebPropertyId = a}) + +-- | View (Profile) ID. +proId :: Lens' Profile (Maybe Text) +proId = lens _proId (\ s a -> s{_proId = a}) + +-- | Time this view (profile) was last modified. +proUpdated :: Lens' Profile (Maybe UTCTime) +proUpdated + = lens _proUpdated (\ s a -> s{_proUpdated = a}) + +-- | Permissions the user has for this view (profile). +proPermissions :: Lens' Profile (Maybe ProfilePermissions) +proPermissions + = lens _proPermissions + (\ s a -> s{_proPermissions = a}) + +-- | Website URL for this view (profile). +proWebsiteUrl :: Lens' Profile (Maybe Text) +proWebsiteUrl + = lens _proWebsiteUrl + (\ s a -> s{_proWebsiteUrl = a}) + +-- | View (Profile) type. Supported types: WEB or APP. +proType :: Lens' Profile (Maybe Text) +proType = lens _proType (\ s a -> s{_proType = a}) + +-- | Whether or not Analytics will strip search category parameters from the +-- URLs in your reports. +proStripSiteSearchCategoryParameters :: Lens' Profile (Maybe Bool) +proStripSiteSearchCategoryParameters + = lens _proStripSiteSearchCategoryParameters + (\ s a -> + s{_proStripSiteSearchCategoryParameters = a}) + +-- | Time zone for which this view (profile) has been configured. Time zones +-- are identified by strings from the TZ database. +proTimezone :: Lens' Profile (Maybe Text) +proTimezone + = lens _proTimezone (\ s a -> s{_proTimezone = a}) + +-- | The query parameters that are excluded from this view (profile). +proExcludeQueryParameters :: Lens' Profile (Maybe Text) +proExcludeQueryParameters + = lens _proExcludeQueryParameters + (\ s a -> s{_proExcludeQueryParameters = a}) + +-- | Indicates whether enhanced ecommerce tracking is enabled for this view +-- (profile). This property can only be enabled if ecommerce tracking is +-- enabled. +proEnhancedECommerceTracking :: Lens' Profile (Maybe Bool) +proEnhancedECommerceTracking + = lens _proEnhancedECommerceTracking + (\ s a -> s{_proEnhancedECommerceTracking = a}) + +-- | Whether or not Analytics will strip search query parameters from the +-- URLs in your reports. +proStripSiteSearchQueryParameters :: Lens' Profile (Maybe Bool) +proStripSiteSearchQueryParameters + = lens _proStripSiteSearchQueryParameters + (\ s a -> s{_proStripSiteSearchQueryParameters = a}) + +instance FromJSON Profile where + parseJSON + = withObject "Profile" + (\ o -> + Profile <$> + (o .:? "parentLink") <*> (o .:? "eCommerceTracking") + <*> (o .:? "siteSearchCategoryParameters") + <*> (o .:? "webPropertyId") + <*> (o .:? "childLink") + <*> (o .:? "siteSearchQueryParameters") + <*> (o .:? "kind" .!= "analytics#profile") + <*> (o .:? "defaultPage") + <*> (o .:? "created") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "currency") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "permissions") + <*> (o .:? "websiteUrl") + <*> (o .:? "type") + <*> (o .:? "stripSiteSearchCategoryParameters") + <*> (o .:? "timezone") + <*> (o .:? "excludeQueryParameters") + <*> (o .:? "enhancedECommerceTracking") + <*> (o .:? "stripSiteSearchQueryParameters")) + +instance ToJSON Profile where + toJSON Profile{..} + = object + (catMaybes + [("parentLink" .=) <$> _proParentLink, + ("eCommerceTracking" .=) <$> _proECommerceTracking, + ("siteSearchCategoryParameters" .=) <$> + _proSiteSearchCategoryParameters, + ("webPropertyId" .=) <$> _proWebPropertyId, + ("childLink" .=) <$> _proChildLink, + ("siteSearchQueryParameters" .=) <$> + _proSiteSearchQueryParameters, + Just ("kind" .= _proKind), + ("defaultPage" .=) <$> _proDefaultPage, + ("created" .=) <$> _proCreated, + ("selfLink" .=) <$> _proSelfLink, + ("accountId" .=) <$> _proAccountId, + ("name" .=) <$> _proName, + ("currency" .=) <$> _proCurrency, + ("internalWebPropertyId" .=) <$> + _proInternalWebPropertyId, + ("id" .=) <$> _proId, ("updated" .=) <$> _proUpdated, + ("permissions" .=) <$> _proPermissions, + ("websiteUrl" .=) <$> _proWebsiteUrl, + ("type" .=) <$> _proType, + ("stripSiteSearchCategoryParameters" .=) <$> + _proStripSiteSearchCategoryParameters, + ("timezone" .=) <$> _proTimezone, + ("excludeQueryParameters" .=) <$> + _proExcludeQueryParameters, + ("enhancedECommerceTracking" .=) <$> + _proEnhancedECommerceTracking, + ("stripSiteSearchQueryParameters" .=) <$> + _proStripSiteSearchQueryParameters]) + +-- | Analytics data for a given view (profile). +-- +-- /See:/ 'gaData' smart constructor. +data GaData = GaData + { _gdNextLink :: !(Maybe Text) + , _gdSampleSpace :: !(Maybe Int64) + , _gdItemsPerPage :: !(Maybe Int32) + , _gdProfileInfo :: !(Maybe GaDataProfileInfo) + , _gdKind :: !Text + , _gdSampleSize :: !(Maybe Int64) + , _gdRows :: !(Maybe [[Text]]) + , _gdSelfLink :: !(Maybe Text) + , _gdQuery :: !(Maybe GaDataQuery) + , _gdColumnHeaders :: !(Maybe [GaDataColumnHeadersItem]) + , _gdId :: !(Maybe Text) + , _gdTotalResults :: !(Maybe Int32) + , _gdDataTable :: !(Maybe GaDataDataTable) + , _gdContainsSampledData :: !(Maybe Bool) + , _gdTotalsForAllResults :: !(Maybe GaDataTotalsForAllResults) + , _gdPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GaData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdNextLink' +-- +-- * 'gdSampleSpace' +-- +-- * 'gdItemsPerPage' +-- +-- * 'gdProfileInfo' +-- +-- * 'gdKind' +-- +-- * 'gdSampleSize' +-- +-- * 'gdRows' +-- +-- * 'gdSelfLink' +-- +-- * 'gdQuery' +-- +-- * 'gdColumnHeaders' +-- +-- * 'gdId' +-- +-- * 'gdTotalResults' +-- +-- * 'gdDataTable' +-- +-- * 'gdContainsSampledData' +-- +-- * 'gdTotalsForAllResults' +-- +-- * 'gdPreviousLink' +gaData + :: GaData +gaData = + GaData + { _gdNextLink = Nothing + , _gdSampleSpace = Nothing + , _gdItemsPerPage = Nothing + , _gdProfileInfo = Nothing + , _gdKind = "analytics#gaData" + , _gdSampleSize = Nothing + , _gdRows = Nothing + , _gdSelfLink = Nothing + , _gdQuery = Nothing + , _gdColumnHeaders = Nothing + , _gdId = Nothing + , _gdTotalResults = Nothing + , _gdDataTable = Nothing + , _gdContainsSampledData = Nothing + , _gdTotalsForAllResults = Nothing + , _gdPreviousLink = Nothing + } + +-- | Link to next page for this Analytics data query. +gdNextLink :: Lens' GaData (Maybe Text) +gdNextLink + = lens _gdNextLink (\ s a -> s{_gdNextLink = a}) + +-- | Total size of the sample space from which the samples were selected. +gdSampleSpace :: Lens' GaData (Maybe Int64) +gdSampleSpace + = lens _gdSampleSpace + (\ s a -> s{_gdSampleSpace = a}) + +-- | The maximum number of rows the response can contain, regardless of the +-- actual number of rows returned. Its value ranges from 1 to 10,000 with a +-- value of 1000 by default, or otherwise specified by the max-results +-- query parameter. +gdItemsPerPage :: Lens' GaData (Maybe Int32) +gdItemsPerPage + = lens _gdItemsPerPage + (\ s a -> s{_gdItemsPerPage = a}) + +-- | Information for the view (profile), for which the Analytics data was +-- requested. +gdProfileInfo :: Lens' GaData (Maybe GaDataProfileInfo) +gdProfileInfo + = lens _gdProfileInfo + (\ s a -> s{_gdProfileInfo = a}) + +-- | Resource type. +gdKind :: Lens' GaData Text +gdKind = lens _gdKind (\ s a -> s{_gdKind = a}) + +-- | The number of samples used to calculate the result. +gdSampleSize :: Lens' GaData (Maybe Int64) +gdSampleSize + = lens _gdSampleSize (\ s a -> s{_gdSampleSize = a}) + +-- | Analytics data rows, where each row contains a list of dimension values +-- followed by the metric values. The order of dimensions and metrics is +-- same as specified in the request. +gdRows :: Lens' GaData [[Text]] +gdRows + = lens _gdRows (\ s a -> s{_gdRows = a}) . _Default . + _Coerce + +-- | Link to this page. +gdSelfLink :: Lens' GaData (Maybe Text) +gdSelfLink + = lens _gdSelfLink (\ s a -> s{_gdSelfLink = a}) + +-- | Analytics data request query parameters. +gdQuery :: Lens' GaData (Maybe GaDataQuery) +gdQuery = lens _gdQuery (\ s a -> s{_gdQuery = a}) + +-- | Column headers that list dimension names followed by the metric names. +-- The order of dimensions and metrics is same as specified in the request. +gdColumnHeaders :: Lens' GaData [GaDataColumnHeadersItem] +gdColumnHeaders + = lens _gdColumnHeaders + (\ s a -> s{_gdColumnHeaders = a}) + . _Default + . _Coerce + +-- | Unique ID for this data response. +gdId :: Lens' GaData (Maybe Text) +gdId = lens _gdId (\ s a -> s{_gdId = a}) + +-- | The total number of rows for the query, regardless of the number of rows +-- in the response. +gdTotalResults :: Lens' GaData (Maybe Int32) +gdTotalResults + = lens _gdTotalResults + (\ s a -> s{_gdTotalResults = a}) + +gdDataTable :: Lens' GaData (Maybe GaDataDataTable) +gdDataTable + = lens _gdDataTable (\ s a -> s{_gdDataTable = a}) + +-- | Determines if Analytics data contains samples. +gdContainsSampledData :: Lens' GaData (Maybe Bool) +gdContainsSampledData + = lens _gdContainsSampledData + (\ s a -> s{_gdContainsSampledData = a}) + +-- | Total values for the requested metrics over all the results, not just +-- the results returned in this response. The order of the metric totals is +-- same as the metric order specified in the request. +gdTotalsForAllResults :: Lens' GaData (Maybe GaDataTotalsForAllResults) +gdTotalsForAllResults + = lens _gdTotalsForAllResults + (\ s a -> s{_gdTotalsForAllResults = a}) + +-- | Link to previous page for this Analytics data query. +gdPreviousLink :: Lens' GaData (Maybe Text) +gdPreviousLink + = lens _gdPreviousLink + (\ s a -> s{_gdPreviousLink = a}) + +instance FromJSON GaData where + parseJSON + = withObject "GaData" + (\ o -> + GaData <$> + (o .:? "nextLink") <*> (o .:? "sampleSpace") <*> + (o .:? "itemsPerPage") + <*> (o .:? "profileInfo") + <*> (o .:? "kind" .!= "analytics#gaData") + <*> (o .:? "sampleSize") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "query") + <*> (o .:? "columnHeaders" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "totalResults") + <*> (o .:? "dataTable") + <*> (o .:? "containsSampledData") + <*> (o .:? "totalsForAllResults") + <*> (o .:? "previousLink")) + +instance ToJSON GaData where + toJSON GaData{..} + = object + (catMaybes + [("nextLink" .=) <$> _gdNextLink, + ("sampleSpace" .=) <$> _gdSampleSpace, + ("itemsPerPage" .=) <$> _gdItemsPerPage, + ("profileInfo" .=) <$> _gdProfileInfo, + Just ("kind" .= _gdKind), + ("sampleSize" .=) <$> _gdSampleSize, + ("rows" .=) <$> _gdRows, + ("selfLink" .=) <$> _gdSelfLink, + ("query" .=) <$> _gdQuery, + ("columnHeaders" .=) <$> _gdColumnHeaders, + ("id" .=) <$> _gdId, + ("totalResults" .=) <$> _gdTotalResults, + ("dataTable" .=) <$> _gdDataTable, + ("containsSampledData" .=) <$> + _gdContainsSampledData, + ("totalsForAllResults" .=) <$> + _gdTotalsForAllResults, + ("previousLink" .=) <$> _gdPreviousLink]) + +-- | JSON template for a web property reference. +-- +-- /See:/ 'webPropertyRef' smart constructor. +data WebPropertyRef = WebPropertyRef + { _wprKind :: !Text + , _wprHref :: !(Maybe Text) + , _wprAccountId :: !(Maybe Text) + , _wprName :: !(Maybe Text) + , _wprInternalWebPropertyId :: !(Maybe Text) + , _wprId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebPropertyRef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wprKind' +-- +-- * 'wprHref' +-- +-- * 'wprAccountId' +-- +-- * 'wprName' +-- +-- * 'wprInternalWebPropertyId' +-- +-- * 'wprId' +webPropertyRef + :: WebPropertyRef +webPropertyRef = + WebPropertyRef + { _wprKind = "analytics#webPropertyRef" + , _wprHref = Nothing + , _wprAccountId = Nothing + , _wprName = Nothing + , _wprInternalWebPropertyId = Nothing + , _wprId = Nothing + } + +-- | Analytics web property reference. +wprKind :: Lens' WebPropertyRef Text +wprKind = lens _wprKind (\ s a -> s{_wprKind = a}) + +-- | Link for this web property. +wprHref :: Lens' WebPropertyRef (Maybe Text) +wprHref = lens _wprHref (\ s a -> s{_wprHref = a}) + +-- | Account ID to which this web property belongs. +wprAccountId :: Lens' WebPropertyRef (Maybe Text) +wprAccountId + = lens _wprAccountId (\ s a -> s{_wprAccountId = a}) + +-- | Name of this web property. +wprName :: Lens' WebPropertyRef (Maybe Text) +wprName = lens _wprName (\ s a -> s{_wprName = a}) + +-- | Internal ID for this web property. +wprInternalWebPropertyId :: Lens' WebPropertyRef (Maybe Text) +wprInternalWebPropertyId + = lens _wprInternalWebPropertyId + (\ s a -> s{_wprInternalWebPropertyId = a}) + +-- | Web property ID of the form UA-XXXXX-YY. +wprId :: Lens' WebPropertyRef (Maybe Text) +wprId = lens _wprId (\ s a -> s{_wprId = a}) + +instance FromJSON WebPropertyRef where + parseJSON + = withObject "WebPropertyRef" + (\ o -> + WebPropertyRef <$> + (o .:? "kind" .!= "analytics#webPropertyRef") <*> + (o .:? "href") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id")) + +instance ToJSON WebPropertyRef where + toJSON WebPropertyRef{..} + = object + (catMaybes + [Just ("kind" .= _wprKind), ("href" .=) <$> _wprHref, + ("accountId" .=) <$> _wprAccountId, + ("name" .=) <$> _wprName, + ("internalWebPropertyId" .=) <$> + _wprInternalWebPropertyId, + ("id" .=) <$> _wprId]) + +-- | A goal collection lists Analytics goals to which the user has access. +-- Each view (profile) can have a set of goals. Each resource in the Goal +-- collection corresponds to a single Analytics goal. +-- +-- /See:/ 'goals' smart constructor. +data Goals = Goals + { _gNextLink :: !(Maybe Text) + , _gItemsPerPage :: !(Maybe Int32) + , _gKind :: !Text + , _gUsername :: !(Maybe Text) + , _gItems :: !(Maybe [Maybe Goal]) + , _gTotalResults :: !(Maybe Int32) + , _gStartIndex :: !(Maybe Int32) + , _gPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Goals' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gNextLink' +-- +-- * 'gItemsPerPage' +-- +-- * 'gKind' +-- +-- * 'gUsername' +-- +-- * 'gItems' +-- +-- * 'gTotalResults' +-- +-- * 'gStartIndex' +-- +-- * 'gPreviousLink' +goals + :: Goals +goals = + Goals + { _gNextLink = Nothing + , _gItemsPerPage = Nothing + , _gKind = "analytics#goals" + , _gUsername = Nothing + , _gItems = Nothing + , _gTotalResults = Nothing + , _gStartIndex = Nothing + , _gPreviousLink = Nothing + } + +-- | Link to next page for this goal collection. +gNextLink :: Lens' Goals (Maybe Text) +gNextLink + = lens _gNextLink (\ s a -> s{_gNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +gItemsPerPage :: Lens' Goals (Maybe Int32) +gItemsPerPage + = lens _gItemsPerPage + (\ s a -> s{_gItemsPerPage = a}) + +-- | Collection type. +gKind :: Lens' Goals Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +-- | Email ID of the authenticated user +gUsername :: Lens' Goals (Maybe Text) +gUsername + = lens _gUsername (\ s a -> s{_gUsername = a}) + +-- | A list of goals. +gItems :: Lens' Goals [Maybe Goal] +gItems + = lens _gItems (\ s a -> s{_gItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- resources in the result. +gTotalResults :: Lens' Goals (Maybe Int32) +gTotalResults + = lens _gTotalResults + (\ s a -> s{_gTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +gStartIndex :: Lens' Goals (Maybe Int32) +gStartIndex + = lens _gStartIndex (\ s a -> s{_gStartIndex = a}) + +-- | Link to previous page for this goal collection. +gPreviousLink :: Lens' Goals (Maybe Text) +gPreviousLink + = lens _gPreviousLink + (\ s a -> s{_gPreviousLink = a}) + +instance FromJSON Goals where + parseJSON + = withObject "Goals" + (\ o -> + Goals <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#goals") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Goals where + toJSON Goals{..} + = object + (catMaybes + [("nextLink" .=) <$> _gNextLink, + ("itemsPerPage" .=) <$> _gItemsPerPage, + Just ("kind" .= _gKind), + ("username" .=) <$> _gUsername, + ("items" .=) <$> _gItems, + ("totalResults" .=) <$> _gTotalResults, + ("startIndex" .=) <$> _gStartIndex, + ("previousLink" .=) <$> _gPreviousLink]) + +-- | JSON template for an Analytics custom data source. +-- +-- /See:/ 'customDataSource' smart constructor. +data CustomDataSource = CustomDataSource + { _cParentLink :: !(Maybe CustomDataSourceParentLink) + , _cWebPropertyId :: !(Maybe Text) + , _cChildLink :: !(Maybe CustomDataSourceChildLink) + , _cKind :: !Text + , _cCreated :: !(Maybe UTCTime) + , _cUploadType :: !(Maybe Text) + , _cImportBehavior :: !(Maybe Text) + , _cSelfLink :: !(Maybe Text) + , _cAccountId :: !(Maybe Text) + , _cName :: !(Maybe Text) + , _cId :: !(Maybe Text) + , _cUpdated :: !(Maybe UTCTime) + , _cType :: !(Maybe Text) + , _cDescription :: !(Maybe Text) + , _cProfilesLinked :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomDataSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cParentLink' +-- +-- * 'cWebPropertyId' +-- +-- * 'cChildLink' +-- +-- * 'cKind' +-- +-- * 'cCreated' +-- +-- * 'cUploadType' +-- +-- * 'cImportBehavior' +-- +-- * 'cSelfLink' +-- +-- * 'cAccountId' +-- +-- * 'cName' +-- +-- * 'cId' +-- +-- * 'cUpdated' +-- +-- * 'cType' +-- +-- * 'cDescription' +-- +-- * 'cProfilesLinked' +customDataSource + :: CustomDataSource +customDataSource = + CustomDataSource + { _cParentLink = Nothing + , _cWebPropertyId = Nothing + , _cChildLink = Nothing + , _cKind = "analytics#customDataSource" + , _cCreated = Nothing + , _cUploadType = Nothing + , _cImportBehavior = Nothing + , _cSelfLink = Nothing + , _cAccountId = Nothing + , _cName = Nothing + , _cId = Nothing + , _cUpdated = Nothing + , _cType = Nothing + , _cDescription = Nothing + , _cProfilesLinked = Nothing + } + +-- | Parent link for this custom data source. Points to the web property to +-- which this custom data source belongs. +cParentLink :: Lens' CustomDataSource (Maybe CustomDataSourceParentLink) +cParentLink + = lens _cParentLink (\ s a -> s{_cParentLink = a}) + +-- | Web property ID of the form UA-XXXXX-YY to which this custom data source +-- belongs. +cWebPropertyId :: Lens' CustomDataSource (Maybe Text) +cWebPropertyId + = lens _cWebPropertyId + (\ s a -> s{_cWebPropertyId = a}) + +cChildLink :: Lens' CustomDataSource (Maybe CustomDataSourceChildLink) +cChildLink + = lens _cChildLink (\ s a -> s{_cChildLink = a}) + +-- | Resource type for Analytics custom data source. +cKind :: Lens' CustomDataSource Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Time this custom data source was created. +cCreated :: Lens' CustomDataSource (Maybe UTCTime) +cCreated = lens _cCreated (\ s a -> s{_cCreated = a}) + +cUploadType :: Lens' CustomDataSource (Maybe Text) +cUploadType + = lens _cUploadType (\ s a -> s{_cUploadType = a}) + +cImportBehavior :: Lens' CustomDataSource (Maybe Text) +cImportBehavior + = lens _cImportBehavior + (\ s a -> s{_cImportBehavior = a}) + +-- | Link for this Analytics custom data source. +cSelfLink :: Lens' CustomDataSource (Maybe Text) +cSelfLink + = lens _cSelfLink (\ s a -> s{_cSelfLink = a}) + +-- | Account ID to which this custom data source belongs. +cAccountId :: Lens' CustomDataSource (Maybe Text) +cAccountId + = lens _cAccountId (\ s a -> s{_cAccountId = a}) + +-- | Name of this custom data source. +cName :: Lens' CustomDataSource (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Custom data source ID. +cId :: Lens' CustomDataSource (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | Time this custom data source was last modified. +cUpdated :: Lens' CustomDataSource (Maybe UTCTime) +cUpdated = lens _cUpdated (\ s a -> s{_cUpdated = a}) + +-- | Type of the custom data source. +cType :: Lens' CustomDataSource (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +-- | Description of custom data source. +cDescription :: Lens' CustomDataSource (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +-- | IDs of views (profiles) linked to the custom data source. +cProfilesLinked :: Lens' CustomDataSource [Text] +cProfilesLinked + = lens _cProfilesLinked + (\ s a -> s{_cProfilesLinked = a}) + . _Default + . _Coerce + +instance FromJSON CustomDataSource where + parseJSON + = withObject "CustomDataSource" + (\ o -> + CustomDataSource <$> + (o .:? "parentLink") <*> (o .:? "webPropertyId") <*> + (o .:? "childLink") + <*> (o .:? "kind" .!= "analytics#customDataSource") + <*> (o .:? "created") + <*> (o .:? "uploadType") + <*> (o .:? "importBehavior") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "type") + <*> (o .:? "description") + <*> (o .:? "profilesLinked" .!= mempty)) + +instance ToJSON CustomDataSource where + toJSON CustomDataSource{..} + = object + (catMaybes + [("parentLink" .=) <$> _cParentLink, + ("webPropertyId" .=) <$> _cWebPropertyId, + ("childLink" .=) <$> _cChildLink, + Just ("kind" .= _cKind), + ("created" .=) <$> _cCreated, + ("uploadType" .=) <$> _cUploadType, + ("importBehavior" .=) <$> _cImportBehavior, + ("selfLink" .=) <$> _cSelfLink, + ("accountId" .=) <$> _cAccountId, + ("name" .=) <$> _cName, ("id" .=) <$> _cId, + ("updated" .=) <$> _cUpdated, ("type" .=) <$> _cType, + ("description" .=) <$> _cDescription, + ("profilesLinked" .=) <$> _cProfilesLinked]) + +-- | A web property collection lists Analytics web properties to which the +-- user has access. Each resource in the collection corresponds to a single +-- Analytics web property. +-- +-- /See:/ 'webproperties' smart constructor. +data Webproperties = Webproperties + { _wNextLink :: !(Maybe Text) + , _wItemsPerPage :: !(Maybe Int32) + , _wKind :: !Text + , _wUsername :: !(Maybe Text) + , _wItems :: !(Maybe [Maybe Webproperty]) + , _wTotalResults :: !(Maybe Int32) + , _wStartIndex :: !(Maybe Int32) + , _wPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Webproperties' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wNextLink' +-- +-- * 'wItemsPerPage' +-- +-- * 'wKind' +-- +-- * 'wUsername' +-- +-- * 'wItems' +-- +-- * 'wTotalResults' +-- +-- * 'wStartIndex' +-- +-- * 'wPreviousLink' +webproperties + :: Webproperties +webproperties = + Webproperties + { _wNextLink = Nothing + , _wItemsPerPage = Nothing + , _wKind = "analytics#webproperties" + , _wUsername = Nothing + , _wItems = Nothing + , _wTotalResults = Nothing + , _wStartIndex = Nothing + , _wPreviousLink = Nothing + } + +-- | Link to next page for this web property collection. +wNextLink :: Lens' Webproperties (Maybe Text) +wNextLink + = lens _wNextLink (\ s a -> s{_wNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +wItemsPerPage :: Lens' Webproperties (Maybe Int32) +wItemsPerPage + = lens _wItemsPerPage + (\ s a -> s{_wItemsPerPage = a}) + +-- | Collection type. +wKind :: Lens' Webproperties Text +wKind = lens _wKind (\ s a -> s{_wKind = a}) + +-- | Email ID of the authenticated user +wUsername :: Lens' Webproperties (Maybe Text) +wUsername + = lens _wUsername (\ s a -> s{_wUsername = a}) + +-- | A list of web properties. +wItems :: Lens' Webproperties [Maybe Webproperty] +wItems + = lens _wItems (\ s a -> s{_wItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +wTotalResults :: Lens' Webproperties (Maybe Int32) +wTotalResults + = lens _wTotalResults + (\ s a -> s{_wTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +wStartIndex :: Lens' Webproperties (Maybe Int32) +wStartIndex + = lens _wStartIndex (\ s a -> s{_wStartIndex = a}) + +-- | Link to previous page for this web property collection. +wPreviousLink :: Lens' Webproperties (Maybe Text) +wPreviousLink + = lens _wPreviousLink + (\ s a -> s{_wPreviousLink = a}) + +instance FromJSON Webproperties where + parseJSON + = withObject "Webproperties" + (\ o -> + Webproperties <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#webproperties") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Webproperties where + toJSON Webproperties{..} + = object + (catMaybes + [("nextLink" .=) <$> _wNextLink, + ("itemsPerPage" .=) <$> _wItemsPerPage, + Just ("kind" .= _wKind), + ("username" .=) <$> _wUsername, + ("items" .=) <$> _wItems, + ("totalResults" .=) <$> _wTotalResults, + ("startIndex" .=) <$> _wStartIndex, + ("previousLink" .=) <$> _wPreviousLink]) + +-- | JSON template for an AdWords account. +-- +-- /See:/ 'adWordsAccount' smart constructor. +data AdWordsAccount = AdWordsAccount + { _awaAutoTaggingEnabled :: !(Maybe Bool) + , _awaKind :: !Text + , _awaCustomerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdWordsAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'awaAutoTaggingEnabled' +-- +-- * 'awaKind' +-- +-- * 'awaCustomerId' +adWordsAccount + :: AdWordsAccount +adWordsAccount = + AdWordsAccount + { _awaAutoTaggingEnabled = Nothing + , _awaKind = "analytics#adWordsAccount" + , _awaCustomerId = Nothing + } + +-- | True if auto-tagging is enabled on the AdWords account. Read-only after +-- the insert operation. +awaAutoTaggingEnabled :: Lens' AdWordsAccount (Maybe Bool) +awaAutoTaggingEnabled + = lens _awaAutoTaggingEnabled + (\ s a -> s{_awaAutoTaggingEnabled = a}) + +-- | Resource type for AdWords account. +awaKind :: Lens' AdWordsAccount Text +awaKind = lens _awaKind (\ s a -> s{_awaKind = a}) + +-- | Customer ID. This field is required when creating an AdWords link. +awaCustomerId :: Lens' AdWordsAccount (Maybe Text) +awaCustomerId + = lens _awaCustomerId + (\ s a -> s{_awaCustomerId = a}) + +instance FromJSON AdWordsAccount where + parseJSON + = withObject "AdWordsAccount" + (\ o -> + AdWordsAccount <$> + (o .:? "autoTaggingEnabled") <*> + (o .:? "kind" .!= "analytics#adWordsAccount") + <*> (o .:? "customerId")) + +instance ToJSON AdWordsAccount where + toJSON AdWordsAccount{..} + = object + (catMaybes + [("autoTaggingEnabled" .=) <$> + _awaAutoTaggingEnabled, + Just ("kind" .= _awaKind), + ("customerId" .=) <$> _awaCustomerId]) + +-- | JSON template for Analytics account entry. +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _accChildLink :: !(Maybe AccountChildLink) + , _accKind :: !Text + , _accCreated :: !(Maybe UTCTime) + , _accSelfLink :: !(Maybe Text) + , _accName :: !(Maybe Text) + , _accId :: !(Maybe Text) + , _accUpdated :: !(Maybe UTCTime) + , _accPermissions :: !(Maybe AccountPermissions) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accChildLink' +-- +-- * 'accKind' +-- +-- * 'accCreated' +-- +-- * 'accSelfLink' +-- +-- * 'accName' +-- +-- * 'accId' +-- +-- * 'accUpdated' +-- +-- * 'accPermissions' +account + :: Account +account = + Account + { _accChildLink = Nothing + , _accKind = "analytics#account" + , _accCreated = Nothing + , _accSelfLink = Nothing + , _accName = Nothing + , _accId = Nothing + , _accUpdated = Nothing + , _accPermissions = Nothing + } + +-- | Child link for an account entry. Points to the list of web properties +-- for this account. +accChildLink :: Lens' Account (Maybe AccountChildLink) +accChildLink + = lens _accChildLink (\ s a -> s{_accChildLink = a}) + +-- | Resource type for Analytics account. +accKind :: Lens' Account Text +accKind = lens _accKind (\ s a -> s{_accKind = a}) + +-- | Time the account was created. +accCreated :: Lens' Account (Maybe UTCTime) +accCreated + = lens _accCreated (\ s a -> s{_accCreated = a}) + +-- | Link for this account. +accSelfLink :: Lens' Account (Maybe Text) +accSelfLink + = lens _accSelfLink (\ s a -> s{_accSelfLink = a}) + +-- | Account name. +accName :: Lens' Account (Maybe Text) +accName = lens _accName (\ s a -> s{_accName = a}) + +-- | Account ID. +accId :: Lens' Account (Maybe Text) +accId = lens _accId (\ s a -> s{_accId = a}) + +-- | Time the account was last modified. +accUpdated :: Lens' Account (Maybe UTCTime) +accUpdated + = lens _accUpdated (\ s a -> s{_accUpdated = a}) + +-- | Permissions the user has for this account. +accPermissions :: Lens' Account (Maybe AccountPermissions) +accPermissions + = lens _accPermissions + (\ s a -> s{_accPermissions = a}) + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "childLink") <*> + (o .:? "kind" .!= "analytics#account") + <*> (o .:? "created") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "permissions")) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("childLink" .=) <$> _accChildLink, + Just ("kind" .= _accKind), + ("created" .=) <$> _accCreated, + ("selfLink" .=) <$> _accSelfLink, + ("name" .=) <$> _accName, ("id" .=) <$> _accId, + ("updated" .=) <$> _accUpdated, + ("permissions" .=) <$> _accPermissions]) + +-- | JSON template for a profile filter link. +-- +-- /See:/ 'filterRef' smart constructor. +data FilterRef = FilterRef + { _frKind :: !Text + , _frHref :: !(Maybe Text) + , _frAccountId :: !(Maybe Text) + , _frName :: !(Maybe Text) + , _frId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilterRef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frKind' +-- +-- * 'frHref' +-- +-- * 'frAccountId' +-- +-- * 'frName' +-- +-- * 'frId' +filterRef + :: FilterRef +filterRef = + FilterRef + { _frKind = "analytics#filterRef" + , _frHref = Nothing + , _frAccountId = Nothing + , _frName = Nothing + , _frId = Nothing + } + +-- | Kind value for filter reference. +frKind :: Lens' FilterRef Text +frKind = lens _frKind (\ s a -> s{_frKind = a}) + +-- | Link for this filter. +frHref :: Lens' FilterRef (Maybe Text) +frHref = lens _frHref (\ s a -> s{_frHref = a}) + +-- | Account ID to which this filter belongs. +frAccountId :: Lens' FilterRef (Maybe Text) +frAccountId + = lens _frAccountId (\ s a -> s{_frAccountId = a}) + +-- | Name of this filter. +frName :: Lens' FilterRef (Maybe Text) +frName = lens _frName (\ s a -> s{_frName = a}) + +-- | Filter ID. +frId :: Lens' FilterRef (Maybe Text) +frId = lens _frId (\ s a -> s{_frId = a}) + +instance FromJSON FilterRef where + parseJSON + = withObject "FilterRef" + (\ o -> + FilterRef <$> + (o .:? "kind" .!= "analytics#filterRef") <*> + (o .:? "href") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON FilterRef where + toJSON FilterRef{..} + = object + (catMaybes + [Just ("kind" .= _frKind), ("href" .=) <$> _frHref, + ("accountId" .=) <$> _frAccountId, + ("name" .=) <$> _frName, ("id" .=) <$> _frId]) + +-- | JSON template for Analytics experiment resource. +-- +-- /See:/ 'experiment' smart constructor. +data Experiment = Experiment + { _expParentLink :: !(Maybe ExperimentParentLink) + , _expEqualWeighting :: !(Maybe Bool) + , _expStatus :: !(Maybe Text) + , _expWebPropertyId :: !(Maybe Text) + , _expStartTime :: !(Maybe UTCTime) + , _expSnippet :: !(Maybe Text) + , _expKind :: !Text + , _expCreated :: !(Maybe UTCTime) + , _expReasonExperimentEnded :: !(Maybe Text) + , _expTrafficCoverage :: !(Maybe Double) + , _expEditableInGaUi :: !(Maybe Bool) + , _expMinimumExperimentLengthInDays :: !(Maybe Int32) + , _expProfileId :: !(Maybe Text) + , _expOptimizationType :: !(Maybe Text) + , _expSelfLink :: !(Maybe Text) + , _expAccountId :: !(Maybe Text) + , _expName :: !(Maybe Text) + , _expWinnerFound :: !(Maybe Bool) + , _expEndTime :: !(Maybe UTCTime) + , _expVariations :: !(Maybe [ExperimentVariationsItem]) + , _expInternalWebPropertyId :: !(Maybe Text) + , _expId :: !(Maybe Text) + , _expUpdated :: !(Maybe UTCTime) + , _expRewriteVariationUrlsAsOriginal :: !(Maybe Bool) + , _expObjectiveMetric :: !(Maybe Text) + , _expWinnerConfidenceLevel :: !(Maybe Double) + , _expServingFramework :: !(Maybe Text) + , _expDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Experiment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'expParentLink' +-- +-- * 'expEqualWeighting' +-- +-- * 'expStatus' +-- +-- * 'expWebPropertyId' +-- +-- * 'expStartTime' +-- +-- * 'expSnippet' +-- +-- * 'expKind' +-- +-- * 'expCreated' +-- +-- * 'expReasonExperimentEnded' +-- +-- * 'expTrafficCoverage' +-- +-- * 'expEditableInGaUi' +-- +-- * 'expMinimumExperimentLengthInDays' +-- +-- * 'expProfileId' +-- +-- * 'expOptimizationType' +-- +-- * 'expSelfLink' +-- +-- * 'expAccountId' +-- +-- * 'expName' +-- +-- * 'expWinnerFound' +-- +-- * 'expEndTime' +-- +-- * 'expVariations' +-- +-- * 'expInternalWebPropertyId' +-- +-- * 'expId' +-- +-- * 'expUpdated' +-- +-- * 'expRewriteVariationUrlsAsOriginal' +-- +-- * 'expObjectiveMetric' +-- +-- * 'expWinnerConfidenceLevel' +-- +-- * 'expServingFramework' +-- +-- * 'expDescription' +experiment + :: Experiment +experiment = + Experiment + { _expParentLink = Nothing + , _expEqualWeighting = Nothing + , _expStatus = Nothing + , _expWebPropertyId = Nothing + , _expStartTime = Nothing + , _expSnippet = Nothing + , _expKind = "analytics#experiment" + , _expCreated = Nothing + , _expReasonExperimentEnded = Nothing + , _expTrafficCoverage = Nothing + , _expEditableInGaUi = Nothing + , _expMinimumExperimentLengthInDays = Nothing + , _expProfileId = Nothing + , _expOptimizationType = Nothing + , _expSelfLink = Nothing + , _expAccountId = Nothing + , _expName = Nothing + , _expWinnerFound = Nothing + , _expEndTime = Nothing + , _expVariations = Nothing + , _expInternalWebPropertyId = Nothing + , _expId = Nothing + , _expUpdated = Nothing + , _expRewriteVariationUrlsAsOriginal = Nothing + , _expObjectiveMetric = Nothing + , _expWinnerConfidenceLevel = Nothing + , _expServingFramework = Nothing + , _expDescription = Nothing + } + +-- | Parent link for an experiment. Points to the view (profile) to which +-- this experiment belongs. +expParentLink :: Lens' Experiment (Maybe ExperimentParentLink) +expParentLink + = lens _expParentLink + (\ s a -> s{_expParentLink = a}) + +-- | Boolean specifying whether to distribute traffic evenly across all +-- variations. If the value is False, content experiments follows the +-- default behavior of adjusting traffic dynamically based on variation +-- performance. Optional -- defaults to False. This field may not be +-- changed for an experiment whose status is ENDED. +expEqualWeighting :: Lens' Experiment (Maybe Bool) +expEqualWeighting + = lens _expEqualWeighting + (\ s a -> s{_expEqualWeighting = a}) + +-- | Experiment status. Possible values: \"DRAFT\", \"READY_TO_RUN\", +-- \"RUNNING\", \"ENDED\". Experiments can be created in the \"DRAFT\", +-- \"READY_TO_RUN\" or \"RUNNING\" state. This field is required when +-- creating an experiment. +expStatus :: Lens' Experiment (Maybe Text) +expStatus + = lens _expStatus (\ s a -> s{_expStatus = a}) + +-- | Web property ID to which this experiment belongs. The web property ID is +-- of the form UA-XXXXX-YY. This field is read-only. +expWebPropertyId :: Lens' Experiment (Maybe Text) +expWebPropertyId + = lens _expWebPropertyId + (\ s a -> s{_expWebPropertyId = a}) + +-- | The starting time of the experiment (the time the status changed from +-- READY_TO_RUN to RUNNING). This field is present only if the experiment +-- has started. This field is read-only. +expStartTime :: Lens' Experiment (Maybe UTCTime) +expStartTime + = lens _expStartTime (\ s a -> s{_expStartTime = a}) + +-- | The snippet of code to include on the control page(s). This field is +-- read-only. +expSnippet :: Lens' Experiment (Maybe Text) +expSnippet + = lens _expSnippet (\ s a -> s{_expSnippet = a}) + +-- | Resource type for an Analytics experiment. This field is read-only. +expKind :: Lens' Experiment Text +expKind = lens _expKind (\ s a -> s{_expKind = a}) + +-- | Time the experiment was created. This field is read-only. +expCreated :: Lens' Experiment (Maybe UTCTime) +expCreated + = lens _expCreated (\ s a -> s{_expCreated = a}) + +-- | Why the experiment ended. Possible values: \"STOPPED_BY_USER\", +-- \"WINNER_FOUND\", \"EXPERIMENT_EXPIRED\", \"ENDED_WITH_NO_WINNER\", +-- \"GOAL_OBJECTIVE_CHANGED\". \"ENDED_WITH_NO_WINNER\" means that the +-- experiment didn\'t expire but no winner was projected to be found. If +-- the experiment status is changed via the API to ENDED this field is set +-- to STOPPED_BY_USER. This field is read-only. +expReasonExperimentEnded :: Lens' Experiment (Maybe Text) +expReasonExperimentEnded + = lens _expReasonExperimentEnded + (\ s a -> s{_expReasonExperimentEnded = a}) + +-- | A floating-point number in (0, 1]. Specifies the fraction of the traffic +-- that participates in the experiment. Can be changed for a running +-- experiment. This field may not be changed for an experiments whose +-- status is ENDED. +expTrafficCoverage :: Lens' Experiment (Maybe Double) +expTrafficCoverage + = lens _expTrafficCoverage + (\ s a -> s{_expTrafficCoverage = a}) + +-- | If true, the end user will be able to edit the experiment via the Google +-- Analytics user interface. +expEditableInGaUi :: Lens' Experiment (Maybe Bool) +expEditableInGaUi + = lens _expEditableInGaUi + (\ s a -> s{_expEditableInGaUi = a}) + +-- | An integer number in [3, 90]. Specifies the minimum length of the +-- experiment. Can be changed for a running experiment. This field may not +-- be changed for an experiments whose status is ENDED. +expMinimumExperimentLengthInDays :: Lens' Experiment (Maybe Int32) +expMinimumExperimentLengthInDays + = lens _expMinimumExperimentLengthInDays + (\ s a -> s{_expMinimumExperimentLengthInDays = a}) + +-- | View (Profile) ID to which this experiment belongs. This field is +-- read-only. +expProfileId :: Lens' Experiment (Maybe Text) +expProfileId + = lens _expProfileId (\ s a -> s{_expProfileId = a}) + +-- | Whether the objectiveMetric should be minimized or maximized. Possible +-- values: \"MAXIMUM\", \"MINIMUM\". Optional--defaults to \"MAXIMUM\". +-- Cannot be specified without objectiveMetric. Cannot be modified when +-- status is \"RUNNING\" or \"ENDED\". +expOptimizationType :: Lens' Experiment (Maybe Text) +expOptimizationType + = lens _expOptimizationType + (\ s a -> s{_expOptimizationType = a}) + +-- | Link for this experiment. This field is read-only. +expSelfLink :: Lens' Experiment (Maybe Text) +expSelfLink + = lens _expSelfLink (\ s a -> s{_expSelfLink = a}) + +-- | Account ID to which this experiment belongs. This field is read-only. +expAccountId :: Lens' Experiment (Maybe Text) +expAccountId + = lens _expAccountId (\ s a -> s{_expAccountId = a}) + +-- | Experiment name. This field may not be changed for an experiment whose +-- status is ENDED. This field is required when creating an experiment. +expName :: Lens' Experiment (Maybe Text) +expName = lens _expName (\ s a -> s{_expName = a}) + +-- | Boolean specifying whether a winner has been found for this experiment. +-- This field is read-only. +expWinnerFound :: Lens' Experiment (Maybe Bool) +expWinnerFound + = lens _expWinnerFound + (\ s a -> s{_expWinnerFound = a}) + +-- | The ending time of the experiment (the time the status changed from +-- RUNNING to ENDED). This field is present only if the experiment has +-- ended. This field is read-only. +expEndTime :: Lens' Experiment (Maybe UTCTime) +expEndTime + = lens _expEndTime (\ s a -> s{_expEndTime = a}) + +-- | Array of variations. The first variation in the array is the original. +-- The number of variations may not change once an experiment is in the +-- RUNNING state. At least two variations are required before status can be +-- set to RUNNING. +expVariations :: Lens' Experiment [ExperimentVariationsItem] +expVariations + = lens _expVariations + (\ s a -> s{_expVariations = a}) + . _Default + . _Coerce + +-- | Internal ID for the web property to which this experiment belongs. This +-- field is read-only. +expInternalWebPropertyId :: Lens' Experiment (Maybe Text) +expInternalWebPropertyId + = lens _expInternalWebPropertyId + (\ s a -> s{_expInternalWebPropertyId = a}) + +-- | Experiment ID. Required for patch and update. Disallowed for create. +expId :: Lens' Experiment (Maybe Text) +expId = lens _expId (\ s a -> s{_expId = a}) + +-- | Time the experiment was last modified. This field is read-only. +expUpdated :: Lens' Experiment (Maybe UTCTime) +expUpdated + = lens _expUpdated (\ s a -> s{_expUpdated = a}) + +-- | Boolean specifying whether variations URLS are rewritten to match those +-- of the original. This field may not be changed for an experiments whose +-- status is ENDED. +expRewriteVariationUrlsAsOriginal :: Lens' Experiment (Maybe Bool) +expRewriteVariationUrlsAsOriginal + = lens _expRewriteVariationUrlsAsOriginal + (\ s a -> s{_expRewriteVariationUrlsAsOriginal = a}) + +-- | The metric that the experiment is optimizing. Valid values: +-- \"ga:goal(n)Completions\", \"ga:adsenseAdsClicks\", +-- \"ga:adsenseAdsViewed\", \"ga:adsenseRevenue\", \"ga:bounces\", +-- \"ga:pageviews\", \"ga:sessionDuration\", \"ga:transactions\", +-- \"ga:transactionRevenue\". This field is required if status is +-- \"RUNNING\" and servingFramework is one of \"REDIRECT\" or \"API\". +expObjectiveMetric :: Lens' Experiment (Maybe Text) +expObjectiveMetric + = lens _expObjectiveMetric + (\ s a -> s{_expObjectiveMetric = a}) + +-- | A floating-point number in (0, 1). Specifies the necessary confidence +-- level to choose a winner. This field may not be changed for an +-- experiments whose status is ENDED. +expWinnerConfidenceLevel :: Lens' Experiment (Maybe Double) +expWinnerConfidenceLevel + = lens _expWinnerConfidenceLevel + (\ s a -> s{_expWinnerConfidenceLevel = a}) + +-- | The framework used to serve the experiment variations and evaluate the +-- results. One of: - REDIRECT: Google Analytics redirects traffic to +-- different variation pages, reports the chosen variation and evaluates +-- the results. - API: Google Analytics chooses and reports the variation +-- to serve and evaluates the results; the caller is responsible for +-- serving the selected variation. - EXTERNAL: The variations will be +-- served externally and the chosen variation reported to Google Analytics. +-- The caller is responsible for serving the selected variation and +-- evaluating the results. +expServingFramework :: Lens' Experiment (Maybe Text) +expServingFramework + = lens _expServingFramework + (\ s a -> s{_expServingFramework = a}) + +-- | Notes about this experiment. +expDescription :: Lens' Experiment (Maybe Text) +expDescription + = lens _expDescription + (\ s a -> s{_expDescription = a}) + +instance FromJSON Experiment where + parseJSON + = withObject "Experiment" + (\ o -> + Experiment <$> + (o .:? "parentLink") <*> (o .:? "equalWeighting") <*> + (o .:? "status") + <*> (o .:? "webPropertyId") + <*> (o .:? "startTime") + <*> (o .:? "snippet") + <*> (o .:? "kind" .!= "analytics#experiment") + <*> (o .:? "created") + <*> (o .:? "reasonExperimentEnded") + <*> (o .:? "trafficCoverage") + <*> (o .:? "editableInGaUi") + <*> (o .:? "minimumExperimentLengthInDays") + <*> (o .:? "profileId") + <*> (o .:? "optimizationType") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "winnerFound") + <*> (o .:? "endTime") + <*> (o .:? "variations" .!= mempty) + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "rewriteVariationUrlsAsOriginal") + <*> (o .:? "objectiveMetric") + <*> (o .:? "winnerConfidenceLevel") + <*> (o .:? "servingFramework") + <*> (o .:? "description")) + +instance ToJSON Experiment where + toJSON Experiment{..} + = object + (catMaybes + [("parentLink" .=) <$> _expParentLink, + ("equalWeighting" .=) <$> _expEqualWeighting, + ("status" .=) <$> _expStatus, + ("webPropertyId" .=) <$> _expWebPropertyId, + ("startTime" .=) <$> _expStartTime, + ("snippet" .=) <$> _expSnippet, + Just ("kind" .= _expKind), + ("created" .=) <$> _expCreated, + ("reasonExperimentEnded" .=) <$> + _expReasonExperimentEnded, + ("trafficCoverage" .=) <$> _expTrafficCoverage, + ("editableInGaUi" .=) <$> _expEditableInGaUi, + ("minimumExperimentLengthInDays" .=) <$> + _expMinimumExperimentLengthInDays, + ("profileId" .=) <$> _expProfileId, + ("optimizationType" .=) <$> _expOptimizationType, + ("selfLink" .=) <$> _expSelfLink, + ("accountId" .=) <$> _expAccountId, + ("name" .=) <$> _expName, + ("winnerFound" .=) <$> _expWinnerFound, + ("endTime" .=) <$> _expEndTime, + ("variations" .=) <$> _expVariations, + ("internalWebPropertyId" .=) <$> + _expInternalWebPropertyId, + ("id" .=) <$> _expId, ("updated" .=) <$> _expUpdated, + ("rewriteVariationUrlsAsOriginal" .=) <$> + _expRewriteVariationUrlsAsOriginal, + ("objectiveMetric" .=) <$> _expObjectiveMetric, + ("winnerConfidenceLevel" .=) <$> + _expWinnerConfidenceLevel, + ("servingFramework" .=) <$> _expServingFramework, + ("description" .=) <$> _expDescription]) + +-- | An entity user link collection provides a list of Analytics ACL links +-- Each resource in this collection corresponds to a single link. +-- +-- /See:/ 'entityUserLinks' smart constructor. +data EntityUserLinks = EntityUserLinks + { _eulNextLink :: !(Maybe Text) + , _eulItemsPerPage :: !(Maybe Int32) + , _eulKind :: !Text + , _eulItems :: !(Maybe [Maybe EntityUserLink]) + , _eulTotalResults :: !(Maybe Int32) + , _eulStartIndex :: !(Maybe Int32) + , _eulPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntityUserLinks' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eulNextLink' +-- +-- * 'eulItemsPerPage' +-- +-- * 'eulKind' +-- +-- * 'eulItems' +-- +-- * 'eulTotalResults' +-- +-- * 'eulStartIndex' +-- +-- * 'eulPreviousLink' +entityUserLinks + :: EntityUserLinks +entityUserLinks = + EntityUserLinks + { _eulNextLink = Nothing + , _eulItemsPerPage = Nothing + , _eulKind = "analytics#entityUserLinks" + , _eulItems = Nothing + , _eulTotalResults = Nothing + , _eulStartIndex = Nothing + , _eulPreviousLink = Nothing + } + +-- | Next link for this account collection. +eulNextLink :: Lens' EntityUserLinks (Maybe Text) +eulNextLink + = lens _eulNextLink (\ s a -> s{_eulNextLink = a}) + +-- | The maximum number of entries the response can contain, regardless of +-- the actual number of entries returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +eulItemsPerPage :: Lens' EntityUserLinks (Maybe Int32) +eulItemsPerPage + = lens _eulItemsPerPage + (\ s a -> s{_eulItemsPerPage = a}) + +-- | Collection type. +eulKind :: Lens' EntityUserLinks Text +eulKind = lens _eulKind (\ s a -> s{_eulKind = a}) + +-- | A list of entity user links. +eulItems :: Lens' EntityUserLinks [Maybe EntityUserLink] +eulItems + = lens _eulItems (\ s a -> s{_eulItems = a}) . + _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +eulTotalResults :: Lens' EntityUserLinks (Maybe Int32) +eulTotalResults + = lens _eulTotalResults + (\ s a -> s{_eulTotalResults = a}) + +-- | The starting index of the entries, which is 1 by default or otherwise +-- specified by the start-index query parameter. +eulStartIndex :: Lens' EntityUserLinks (Maybe Int32) +eulStartIndex + = lens _eulStartIndex + (\ s a -> s{_eulStartIndex = a}) + +-- | Previous link for this account collection. +eulPreviousLink :: Lens' EntityUserLinks (Maybe Text) +eulPreviousLink + = lens _eulPreviousLink + (\ s a -> s{_eulPreviousLink = a}) + +instance FromJSON EntityUserLinks where + parseJSON + = withObject "EntityUserLinks" + (\ o -> + EntityUserLinks <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#entityUserLinks") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON EntityUserLinks where + toJSON EntityUserLinks{..} + = object + (catMaybes + [("nextLink" .=) <$> _eulNextLink, + ("itemsPerPage" .=) <$> _eulItemsPerPage, + Just ("kind" .= _eulKind), + ("items" .=) <$> _eulItems, + ("totalResults" .=) <$> _eulTotalResults, + ("startIndex" .=) <$> _eulStartIndex, + ("previousLink" .=) <$> _eulPreviousLink]) + +-- | A custom metric collection lists Analytics custom metrics to which the +-- user has access. Each resource in the collection corresponds to a single +-- Analytics custom metric. +-- +-- /See:/ 'customMetrics' smart constructor. +data CustomMetrics = CustomMetrics + { _cmNextLink :: !(Maybe Text) + , _cmItemsPerPage :: !(Maybe Int32) + , _cmKind :: !Text + , _cmUsername :: !(Maybe Text) + , _cmItems :: !(Maybe [Maybe CustomMetric]) + , _cmTotalResults :: !(Maybe Int32) + , _cmStartIndex :: !(Maybe Int32) + , _cmPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomMetrics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cmNextLink' +-- +-- * 'cmItemsPerPage' +-- +-- * 'cmKind' +-- +-- * 'cmUsername' +-- +-- * 'cmItems' +-- +-- * 'cmTotalResults' +-- +-- * 'cmStartIndex' +-- +-- * 'cmPreviousLink' +customMetrics + :: CustomMetrics +customMetrics = + CustomMetrics + { _cmNextLink = Nothing + , _cmItemsPerPage = Nothing + , _cmKind = "analytics#customMetrics" + , _cmUsername = Nothing + , _cmItems = Nothing + , _cmTotalResults = Nothing + , _cmStartIndex = Nothing + , _cmPreviousLink = Nothing + } + +-- | Link to next page for this custom metric collection. +cmNextLink :: Lens' CustomMetrics (Maybe Text) +cmNextLink + = lens _cmNextLink (\ s a -> s{_cmNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +cmItemsPerPage :: Lens' CustomMetrics (Maybe Int32) +cmItemsPerPage + = lens _cmItemsPerPage + (\ s a -> s{_cmItemsPerPage = a}) + +-- | Collection type. +cmKind :: Lens' CustomMetrics Text +cmKind = lens _cmKind (\ s a -> s{_cmKind = a}) + +-- | Email ID of the authenticated user +cmUsername :: Lens' CustomMetrics (Maybe Text) +cmUsername + = lens _cmUsername (\ s a -> s{_cmUsername = a}) + +-- | Collection of custom metrics. +cmItems :: Lens' CustomMetrics [Maybe CustomMetric] +cmItems + = lens _cmItems (\ s a -> s{_cmItems = a}) . _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +cmTotalResults :: Lens' CustomMetrics (Maybe Int32) +cmTotalResults + = lens _cmTotalResults + (\ s a -> s{_cmTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +cmStartIndex :: Lens' CustomMetrics (Maybe Int32) +cmStartIndex + = lens _cmStartIndex (\ s a -> s{_cmStartIndex = a}) + +-- | Link to previous page for this custom metric collection. +cmPreviousLink :: Lens' CustomMetrics (Maybe Text) +cmPreviousLink + = lens _cmPreviousLink + (\ s a -> s{_cmPreviousLink = a}) + +instance FromJSON CustomMetrics where + parseJSON + = withObject "CustomMetrics" + (\ o -> + CustomMetrics <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#customMetrics") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON CustomMetrics where + toJSON CustomMetrics{..} + = object + (catMaybes + [("nextLink" .=) <$> _cmNextLink, + ("itemsPerPage" .=) <$> _cmItemsPerPage, + Just ("kind" .= _cmKind), + ("username" .=) <$> _cmUsername, + ("items" .=) <$> _cmItems, + ("totalResults" .=) <$> _cmTotalResults, + ("startIndex" .=) <$> _cmStartIndex, + ("previousLink" .=) <$> _cmPreviousLink]) + +-- | JSON template for an Analytics web property. +-- +-- /See:/ 'webproperty' smart constructor. +data Webproperty = Webproperty + { _webParentLink :: !(Maybe WebpropertyParentLink) + , _webChildLink :: !(Maybe WebpropertyChildLink) + , _webDefaultProfileId :: !(Maybe Int64) + , _webKind :: !Text + , _webCreated :: !(Maybe UTCTime) + , _webSelfLink :: !(Maybe Text) + , _webAccountId :: !(Maybe Text) + , _webName :: !(Maybe Text) + , _webInternalWebPropertyId :: !(Maybe Text) + , _webId :: !(Maybe Text) + , _webUpdated :: !(Maybe UTCTime) + , _webProfileCount :: !(Maybe Int32) + , _webPermissions :: !(Maybe WebpropertyPermissions) + , _webWebsiteUrl :: !(Maybe Text) + , _webIndustryVertical :: !(Maybe Text) + , _webLevel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Webproperty' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'webParentLink' +-- +-- * 'webChildLink' +-- +-- * 'webDefaultProfileId' +-- +-- * 'webKind' +-- +-- * 'webCreated' +-- +-- * 'webSelfLink' +-- +-- * 'webAccountId' +-- +-- * 'webName' +-- +-- * 'webInternalWebPropertyId' +-- +-- * 'webId' +-- +-- * 'webUpdated' +-- +-- * 'webProfileCount' +-- +-- * 'webPermissions' +-- +-- * 'webWebsiteUrl' +-- +-- * 'webIndustryVertical' +-- +-- * 'webLevel' +webproperty + :: Webproperty +webproperty = + Webproperty + { _webParentLink = Nothing + , _webChildLink = Nothing + , _webDefaultProfileId = Nothing + , _webKind = "analytics#webproperty" + , _webCreated = Nothing + , _webSelfLink = Nothing + , _webAccountId = Nothing + , _webName = Nothing + , _webInternalWebPropertyId = Nothing + , _webId = Nothing + , _webUpdated = Nothing + , _webProfileCount = Nothing + , _webPermissions = Nothing + , _webWebsiteUrl = Nothing + , _webIndustryVertical = Nothing + , _webLevel = Nothing + } + +-- | Parent link for this web property. Points to the account to which this +-- web property belongs. +webParentLink :: Lens' Webproperty (Maybe WebpropertyParentLink) +webParentLink + = lens _webParentLink + (\ s a -> s{_webParentLink = a}) + +-- | Child link for this web property. Points to the list of views (profiles) +-- for this web property. +webChildLink :: Lens' Webproperty (Maybe WebpropertyChildLink) +webChildLink + = lens _webChildLink (\ s a -> s{_webChildLink = a}) + +-- | Default view (profile) ID. +webDefaultProfileId :: Lens' Webproperty (Maybe Int64) +webDefaultProfileId + = lens _webDefaultProfileId + (\ s a -> s{_webDefaultProfileId = a}) + +-- | Resource type for Analytics WebProperty. +webKind :: Lens' Webproperty Text +webKind = lens _webKind (\ s a -> s{_webKind = a}) + +-- | Time this web property was created. +webCreated :: Lens' Webproperty (Maybe UTCTime) +webCreated + = lens _webCreated (\ s a -> s{_webCreated = a}) + +-- | Link for this web property. +webSelfLink :: Lens' Webproperty (Maybe Text) +webSelfLink + = lens _webSelfLink (\ s a -> s{_webSelfLink = a}) + +-- | Account ID to which this web property belongs. +webAccountId :: Lens' Webproperty (Maybe Text) +webAccountId + = lens _webAccountId (\ s a -> s{_webAccountId = a}) + +-- | Name of this web property. +webName :: Lens' Webproperty (Maybe Text) +webName = lens _webName (\ s a -> s{_webName = a}) + +-- | Internal ID for this web property. +webInternalWebPropertyId :: Lens' Webproperty (Maybe Text) +webInternalWebPropertyId + = lens _webInternalWebPropertyId + (\ s a -> s{_webInternalWebPropertyId = a}) + +-- | Web property ID of the form UA-XXXXX-YY. +webId :: Lens' Webproperty (Maybe Text) +webId = lens _webId (\ s a -> s{_webId = a}) + +-- | Time this web property was last modified. +webUpdated :: Lens' Webproperty (Maybe UTCTime) +webUpdated + = lens _webUpdated (\ s a -> s{_webUpdated = a}) + +-- | View (Profile) count for this web property. +webProfileCount :: Lens' Webproperty (Maybe Int32) +webProfileCount + = lens _webProfileCount + (\ s a -> s{_webProfileCount = a}) + +-- | Permissions the user has for this web property. +webPermissions :: Lens' Webproperty (Maybe WebpropertyPermissions) +webPermissions + = lens _webPermissions + (\ s a -> s{_webPermissions = a}) + +-- | Website url for this web property. +webWebsiteUrl :: Lens' Webproperty (Maybe Text) +webWebsiteUrl + = lens _webWebsiteUrl + (\ s a -> s{_webWebsiteUrl = a}) + +-- | The industry vertical\/category selected for this web property. +webIndustryVertical :: Lens' Webproperty (Maybe Text) +webIndustryVertical + = lens _webIndustryVertical + (\ s a -> s{_webIndustryVertical = a}) + +-- | Level for this web property. Possible values are STANDARD or PREMIUM. +webLevel :: Lens' Webproperty (Maybe Text) +webLevel = lens _webLevel (\ s a -> s{_webLevel = a}) + +instance FromJSON Webproperty where + parseJSON + = withObject "Webproperty" + (\ o -> + Webproperty <$> + (o .:? "parentLink") <*> (o .:? "childLink") <*> + (o .:? "defaultProfileId") + <*> (o .:? "kind" .!= "analytics#webproperty") + <*> (o .:? "created") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "profileCount") + <*> (o .:? "permissions") + <*> (o .:? "websiteUrl") + <*> (o .:? "industryVertical") + <*> (o .:? "level")) + +instance ToJSON Webproperty where + toJSON Webproperty{..} + = object + (catMaybes + [("parentLink" .=) <$> _webParentLink, + ("childLink" .=) <$> _webChildLink, + ("defaultProfileId" .=) <$> _webDefaultProfileId, + Just ("kind" .= _webKind), + ("created" .=) <$> _webCreated, + ("selfLink" .=) <$> _webSelfLink, + ("accountId" .=) <$> _webAccountId, + ("name" .=) <$> _webName, + ("internalWebPropertyId" .=) <$> + _webInternalWebPropertyId, + ("id" .=) <$> _webId, ("updated" .=) <$> _webUpdated, + ("profileCount" .=) <$> _webProfileCount, + ("permissions" .=) <$> _webPermissions, + ("websiteUrl" .=) <$> _webWebsiteUrl, + ("industryVertical" .=) <$> _webIndustryVertical, + ("level" .=) <$> _webLevel]) + +-- | JSON template for Analytics Custom Metric. +-- +-- /See:/ 'customMetric' smart constructor. +data CustomMetric = CustomMetric + { _cusParentLink :: !(Maybe CustomMetricParentLink) + , _cusWebPropertyId :: !(Maybe Text) + , _cusKind :: !Text + , _cusMaxValue :: !(Maybe Text) + , _cusCreated :: !(Maybe UTCTime) + , _cusMinValue :: !(Maybe Text) + , _cusActive :: !(Maybe Bool) + , _cusSelfLink :: !(Maybe Text) + , _cusAccountId :: !(Maybe Text) + , _cusName :: !(Maybe Text) + , _cusScope :: !(Maybe Text) + , _cusId :: !(Maybe Text) + , _cusUpdated :: !(Maybe UTCTime) + , _cusType :: !(Maybe Text) + , _cusIndex :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomMetric' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cusParentLink' +-- +-- * 'cusWebPropertyId' +-- +-- * 'cusKind' +-- +-- * 'cusMaxValue' +-- +-- * 'cusCreated' +-- +-- * 'cusMinValue' +-- +-- * 'cusActive' +-- +-- * 'cusSelfLink' +-- +-- * 'cusAccountId' +-- +-- * 'cusName' +-- +-- * 'cusScope' +-- +-- * 'cusId' +-- +-- * 'cusUpdated' +-- +-- * 'cusType' +-- +-- * 'cusIndex' +customMetric + :: CustomMetric +customMetric = + CustomMetric + { _cusParentLink = Nothing + , _cusWebPropertyId = Nothing + , _cusKind = "analytics#customMetric" + , _cusMaxValue = Nothing + , _cusCreated = Nothing + , _cusMinValue = Nothing + , _cusActive = Nothing + , _cusSelfLink = Nothing + , _cusAccountId = Nothing + , _cusName = Nothing + , _cusScope = Nothing + , _cusId = Nothing + , _cusUpdated = Nothing + , _cusType = Nothing + , _cusIndex = Nothing + } + +-- | Parent link for the custom metric. Points to the property to which the +-- custom metric belongs. +cusParentLink :: Lens' CustomMetric (Maybe CustomMetricParentLink) +cusParentLink + = lens _cusParentLink + (\ s a -> s{_cusParentLink = a}) + +-- | Property ID. +cusWebPropertyId :: Lens' CustomMetric (Maybe Text) +cusWebPropertyId + = lens _cusWebPropertyId + (\ s a -> s{_cusWebPropertyId = a}) + +-- | Kind value for a custom metric. Set to \"analytics#customMetric\". It is +-- a read-only field. +cusKind :: Lens' CustomMetric Text +cusKind = lens _cusKind (\ s a -> s{_cusKind = a}) + +-- | Max value of custom metric. +cusMaxValue :: Lens' CustomMetric (Maybe Text) +cusMaxValue + = lens _cusMaxValue (\ s a -> s{_cusMaxValue = a}) + +-- | Time the custom metric was created. +cusCreated :: Lens' CustomMetric (Maybe UTCTime) +cusCreated + = lens _cusCreated (\ s a -> s{_cusCreated = a}) + +-- | Min value of custom metric. +cusMinValue :: Lens' CustomMetric (Maybe Text) +cusMinValue + = lens _cusMinValue (\ s a -> s{_cusMinValue = a}) + +-- | Boolean indicating whether the custom metric is active. +cusActive :: Lens' CustomMetric (Maybe Bool) +cusActive + = lens _cusActive (\ s a -> s{_cusActive = a}) + +-- | Link for the custom metric +cusSelfLink :: Lens' CustomMetric (Maybe Text) +cusSelfLink + = lens _cusSelfLink (\ s a -> s{_cusSelfLink = a}) + +-- | Account ID. +cusAccountId :: Lens' CustomMetric (Maybe Text) +cusAccountId + = lens _cusAccountId (\ s a -> s{_cusAccountId = a}) + +-- | Name of the custom metric. +cusName :: Lens' CustomMetric (Maybe Text) +cusName = lens _cusName (\ s a -> s{_cusName = a}) + +-- | Scope of the custom metric: HIT or PRODUCT. +cusScope :: Lens' CustomMetric (Maybe Text) +cusScope = lens _cusScope (\ s a -> s{_cusScope = a}) + +-- | Custom metric ID. +cusId :: Lens' CustomMetric (Maybe Text) +cusId = lens _cusId (\ s a -> s{_cusId = a}) + +-- | Time the custom metric was last modified. +cusUpdated :: Lens' CustomMetric (Maybe UTCTime) +cusUpdated + = lens _cusUpdated (\ s a -> s{_cusUpdated = a}) + +-- | Data type of custom metric. +cusType :: Lens' CustomMetric (Maybe Text) +cusType = lens _cusType (\ s a -> s{_cusType = a}) + +-- | Index of the custom metric. +cusIndex :: Lens' CustomMetric (Maybe Int32) +cusIndex = lens _cusIndex (\ s a -> s{_cusIndex = a}) + +instance FromJSON CustomMetric where + parseJSON + = withObject "CustomMetric" + (\ o -> + CustomMetric <$> + (o .:? "parentLink") <*> (o .:? "webPropertyId") <*> + (o .:? "kind" .!= "analytics#customMetric") + <*> (o .:? "max_value") + <*> (o .:? "created") + <*> (o .:? "min_value") + <*> (o .:? "active") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "scope") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "type") + <*> (o .:? "index")) + +instance ToJSON CustomMetric where + toJSON CustomMetric{..} + = object + (catMaybes + [("parentLink" .=) <$> _cusParentLink, + ("webPropertyId" .=) <$> _cusWebPropertyId, + Just ("kind" .= _cusKind), + ("max_value" .=) <$> _cusMaxValue, + ("created" .=) <$> _cusCreated, + ("min_value" .=) <$> _cusMinValue, + ("active" .=) <$> _cusActive, + ("selfLink" .=) <$> _cusSelfLink, + ("accountId" .=) <$> _cusAccountId, + ("name" .=) <$> _cusName, ("scope" .=) <$> _cusScope, + ("id" .=) <$> _cusId, ("updated" .=) <$> _cusUpdated, + ("type" .=) <$> _cusType, + ("index" .=) <$> _cusIndex]) + +-- | Real time data for a given view (profile). +-- +-- /See:/ 'realtimeData' smart constructor. +data RealtimeData = RealtimeData + { _rdProfileInfo :: !(Maybe RealtimeDataProfileInfo) + , _rdKind :: !Text + , _rdRows :: !(Maybe [[Text]]) + , _rdSelfLink :: !(Maybe Text) + , _rdQuery :: !(Maybe RealtimeDataQuery) + , _rdColumnHeaders :: !(Maybe [RealtimeDataColumnHeadersItem]) + , _rdId :: !(Maybe Text) + , _rdTotalResults :: !(Maybe Int32) + , _rdTotalsForAllResults :: !(Maybe RealtimeDataTotalsForAllResults) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RealtimeData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdProfileInfo' +-- +-- * 'rdKind' +-- +-- * 'rdRows' +-- +-- * 'rdSelfLink' +-- +-- * 'rdQuery' +-- +-- * 'rdColumnHeaders' +-- +-- * 'rdId' +-- +-- * 'rdTotalResults' +-- +-- * 'rdTotalsForAllResults' +realtimeData + :: RealtimeData +realtimeData = + RealtimeData + { _rdProfileInfo = Nothing + , _rdKind = "analytics#realtimeData" + , _rdRows = Nothing + , _rdSelfLink = Nothing + , _rdQuery = Nothing + , _rdColumnHeaders = Nothing + , _rdId = Nothing + , _rdTotalResults = Nothing + , _rdTotalsForAllResults = Nothing + } + +-- | Information for the view (profile), for which the real time data was +-- requested. +rdProfileInfo :: Lens' RealtimeData (Maybe RealtimeDataProfileInfo) +rdProfileInfo + = lens _rdProfileInfo + (\ s a -> s{_rdProfileInfo = a}) + +-- | Resource type. +rdKind :: Lens' RealtimeData Text +rdKind = lens _rdKind (\ s a -> s{_rdKind = a}) + +-- | Real time data rows, where each row contains a list of dimension values +-- followed by the metric values. The order of dimensions and metrics is +-- same as specified in the request. +rdRows :: Lens' RealtimeData [[Text]] +rdRows + = lens _rdRows (\ s a -> s{_rdRows = a}) . _Default . + _Coerce + +-- | Link to this page. +rdSelfLink :: Lens' RealtimeData (Maybe Text) +rdSelfLink + = lens _rdSelfLink (\ s a -> s{_rdSelfLink = a}) + +-- | Real time data request query parameters. +rdQuery :: Lens' RealtimeData (Maybe RealtimeDataQuery) +rdQuery = lens _rdQuery (\ s a -> s{_rdQuery = a}) + +-- | Column headers that list dimension names followed by the metric names. +-- The order of dimensions and metrics is same as specified in the request. +rdColumnHeaders :: Lens' RealtimeData [RealtimeDataColumnHeadersItem] +rdColumnHeaders + = lens _rdColumnHeaders + (\ s a -> s{_rdColumnHeaders = a}) + . _Default + . _Coerce + +-- | Unique ID for this data response. +rdId :: Lens' RealtimeData (Maybe Text) +rdId = lens _rdId (\ s a -> s{_rdId = a}) + +-- | The total number of rows for the query, regardless of the number of rows +-- in the response. +rdTotalResults :: Lens' RealtimeData (Maybe Int32) +rdTotalResults + = lens _rdTotalResults + (\ s a -> s{_rdTotalResults = a}) + +-- | Total values for the requested metrics over all the results, not just +-- the results returned in this response. The order of the metric totals is +-- same as the metric order specified in the request. +rdTotalsForAllResults :: Lens' RealtimeData (Maybe RealtimeDataTotalsForAllResults) +rdTotalsForAllResults + = lens _rdTotalsForAllResults + (\ s a -> s{_rdTotalsForAllResults = a}) + +instance FromJSON RealtimeData where + parseJSON + = withObject "RealtimeData" + (\ o -> + RealtimeData <$> + (o .:? "profileInfo") <*> + (o .:? "kind" .!= "analytics#realtimeData") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "query") + <*> (o .:? "columnHeaders" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "totalResults") + <*> (o .:? "totalsForAllResults")) + +instance ToJSON RealtimeData where + toJSON RealtimeData{..} + = object + (catMaybes + [("profileInfo" .=) <$> _rdProfileInfo, + Just ("kind" .= _rdKind), ("rows" .=) <$> _rdRows, + ("selfLink" .=) <$> _rdSelfLink, + ("query" .=) <$> _rdQuery, + ("columnHeaders" .=) <$> _rdColumnHeaders, + ("id" .=) <$> _rdId, + ("totalResults" .=) <$> _rdTotalResults, + ("totalsForAllResults" .=) <$> + _rdTotalsForAllResults]) + +-- | JSON template for an Analytics ProfileSummary. ProfileSummary returns +-- basic information (i.e., summary) for a profile. +-- +-- /See:/ 'profileSummary' smart constructor. +data ProfileSummary = ProfileSummary + { _psKind :: !Text + , _psName :: !(Maybe Text) + , _psId :: !(Maybe Text) + , _psType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProfileSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psKind' +-- +-- * 'psName' +-- +-- * 'psId' +-- +-- * 'psType' +profileSummary + :: ProfileSummary +profileSummary = + ProfileSummary + { _psKind = "analytics#profileSummary" + , _psName = Nothing + , _psId = Nothing + , _psType = Nothing + } + +-- | Resource type for Analytics ProfileSummary. +psKind :: Lens' ProfileSummary Text +psKind = lens _psKind (\ s a -> s{_psKind = a}) + +-- | View (profile) name. +psName :: Lens' ProfileSummary (Maybe Text) +psName = lens _psName (\ s a -> s{_psName = a}) + +-- | View (profile) ID. +psId :: Lens' ProfileSummary (Maybe Text) +psId = lens _psId (\ s a -> s{_psId = a}) + +-- | View (Profile) type. Supported types: WEB or APP. +psType :: Lens' ProfileSummary (Maybe Text) +psType = lens _psType (\ s a -> s{_psType = a}) + +instance FromJSON ProfileSummary where + parseJSON + = withObject "ProfileSummary" + (\ o -> + ProfileSummary <$> + (o .:? "kind" .!= "analytics#profileSummary") <*> + (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON ProfileSummary where + toJSON ProfileSummary{..} + = object + (catMaybes + [Just ("kind" .= _psKind), ("name" .=) <$> _psName, + ("id" .=) <$> _psId, ("type" .=) <$> _psType]) + +-- | JSON template for an Analytics Entity-User Link. Returns permissions +-- that a user has for an entity. +-- +-- /See:/ 'entityUserLink' smart constructor. +data EntityUserLink = EntityUserLink + { _euluKind :: !Text + , _euluUserRef :: !(Maybe (Maybe UserRef)) + , _euluSelfLink :: !(Maybe Text) + , _euluId :: !(Maybe Text) + , _euluPermissions :: !(Maybe EntityUserLinkPermissions) + , _euluEntity :: !(Maybe EntityUserLinkEntity) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntityUserLink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'euluKind' +-- +-- * 'euluUserRef' +-- +-- * 'euluSelfLink' +-- +-- * 'euluId' +-- +-- * 'euluPermissions' +-- +-- * 'euluEntity' +entityUserLink + :: EntityUserLink +entityUserLink = + EntityUserLink + { _euluKind = "analytics#entityUserLink" + , _euluUserRef = Nothing + , _euluSelfLink = Nothing + , _euluId = Nothing + , _euluPermissions = Nothing + , _euluEntity = Nothing + } + +-- | Resource type for entity user link. +euluKind :: Lens' EntityUserLink Text +euluKind = lens _euluKind (\ s a -> s{_euluKind = a}) + +-- | User reference. +euluUserRef :: Lens' EntityUserLink (Maybe (Maybe UserRef)) +euluUserRef + = lens _euluUserRef (\ s a -> s{_euluUserRef = a}) + +-- | Self link for this resource. +euluSelfLink :: Lens' EntityUserLink (Maybe Text) +euluSelfLink + = lens _euluSelfLink (\ s a -> s{_euluSelfLink = a}) + +-- | Entity user link ID +euluId :: Lens' EntityUserLink (Maybe Text) +euluId = lens _euluId (\ s a -> s{_euluId = a}) + +-- | Permissions the user has for this entity. +euluPermissions :: Lens' EntityUserLink (Maybe EntityUserLinkPermissions) +euluPermissions + = lens _euluPermissions + (\ s a -> s{_euluPermissions = a}) + +-- | Entity for this link. It can be an account, a web property, or a view +-- (profile). +euluEntity :: Lens' EntityUserLink (Maybe EntityUserLinkEntity) +euluEntity + = lens _euluEntity (\ s a -> s{_euluEntity = a}) + +instance FromJSON EntityUserLink where + parseJSON + = withObject "EntityUserLink" + (\ o -> + EntityUserLink <$> + (o .:? "kind" .!= "analytics#entityUserLink") <*> + (o .:? "userRef") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "permissions") + <*> (o .:? "entity")) + +instance ToJSON EntityUserLink where + toJSON EntityUserLink{..} + = object + (catMaybes + [Just ("kind" .= _euluKind), + ("userRef" .=) <$> _euluUserRef, + ("selfLink" .=) <$> _euluSelfLink, + ("id" .=) <$> _euluId, + ("permissions" .=) <$> _euluPermissions, + ("entity" .=) <$> _euluEntity]) + +-- | JSON template for an Analytics account ticket. The account ticket +-- consists of the ticket ID and the basic information for the account, +-- property and profile. +-- +-- /See:/ 'accountTicket' smart constructor. +data AccountTicket = AccountTicket + { _atRedirectUri :: !(Maybe Text) + , _atKind :: !Text + , _atProfile :: !(Maybe (Maybe Profile)) + , _atAccount :: !(Maybe (Maybe Account)) + , _atWebproperty :: !(Maybe (Maybe Webproperty)) + , _atId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountTicket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'atRedirectUri' +-- +-- * 'atKind' +-- +-- * 'atProfile' +-- +-- * 'atAccount' +-- +-- * 'atWebproperty' +-- +-- * 'atId' +accountTicket + :: AccountTicket +accountTicket = + AccountTicket + { _atRedirectUri = Nothing + , _atKind = "analytics#accountTicket" + , _atProfile = Nothing + , _atAccount = Nothing + , _atWebproperty = Nothing + , _atId = Nothing + } + +-- | Redirect URI where the user will be sent after accepting Terms of +-- Service. Must be configured in APIs console as a callback URL. +atRedirectUri :: Lens' AccountTicket (Maybe Text) +atRedirectUri + = lens _atRedirectUri + (\ s a -> s{_atRedirectUri = a}) + +-- | Resource type for account ticket. +atKind :: Lens' AccountTicket Text +atKind = lens _atKind (\ s a -> s{_atKind = a}) + +-- | View (Profile) for the account. +atProfile :: Lens' AccountTicket (Maybe (Maybe Profile)) +atProfile + = lens _atProfile (\ s a -> s{_atProfile = a}) + +-- | Account for this ticket. +atAccount :: Lens' AccountTicket (Maybe (Maybe Account)) +atAccount + = lens _atAccount (\ s a -> s{_atAccount = a}) + +-- | Web property for the account. +atWebproperty :: Lens' AccountTicket (Maybe (Maybe Webproperty)) +atWebproperty + = lens _atWebproperty + (\ s a -> s{_atWebproperty = a}) + +-- | Account ticket ID used to access the account ticket. +atId :: Lens' AccountTicket (Maybe Text) +atId = lens _atId (\ s a -> s{_atId = a}) + +instance FromJSON AccountTicket where + parseJSON + = withObject "AccountTicket" + (\ o -> + AccountTicket <$> + (o .:? "redirectUri") <*> + (o .:? "kind" .!= "analytics#accountTicket") + <*> (o .:? "profile") + <*> (o .:? "account") + <*> (o .:? "webproperty") + <*> (o .:? "id")) + +instance ToJSON AccountTicket where + toJSON AccountTicket{..} + = object + (catMaybes + [("redirectUri" .=) <$> _atRedirectUri, + Just ("kind" .= _atKind), + ("profile" .=) <$> _atProfile, + ("account" .=) <$> _atAccount, + ("webproperty" .=) <$> _atWebproperty, + ("id" .=) <$> _atId]) + +-- | JSON template for an Analytics AccountSummary. An AccountSummary is a +-- lightweight tree comprised of properties\/profiles. +-- +-- /See:/ 'accountSummary' smart constructor. +data AccountSummary = AccountSummary + { _assKind :: !Text + , _assWebProperties :: !(Maybe [Maybe WebPropertySummary]) + , _assName :: !(Maybe Text) + , _assId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assKind' +-- +-- * 'assWebProperties' +-- +-- * 'assName' +-- +-- * 'assId' +accountSummary + :: AccountSummary +accountSummary = + AccountSummary + { _assKind = "analytics#accountSummary" + , _assWebProperties = Nothing + , _assName = Nothing + , _assId = Nothing + } + +-- | Resource type for Analytics AccountSummary. +assKind :: Lens' AccountSummary Text +assKind = lens _assKind (\ s a -> s{_assKind = a}) + +-- | List of web properties under this account. +assWebProperties :: Lens' AccountSummary [Maybe WebPropertySummary] +assWebProperties + = lens _assWebProperties + (\ s a -> s{_assWebProperties = a}) + . _Default + . _Coerce + +-- | Account name. +assName :: Lens' AccountSummary (Maybe Text) +assName = lens _assName (\ s a -> s{_assName = a}) + +-- | Account ID. +assId :: Lens' AccountSummary (Maybe Text) +assId = lens _assId (\ s a -> s{_assId = a}) + +instance FromJSON AccountSummary where + parseJSON + = withObject "AccountSummary" + (\ o -> + AccountSummary <$> + (o .:? "kind" .!= "analytics#accountSummary") <*> + (o .:? "webProperties" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AccountSummary where + toJSON AccountSummary{..} + = object + (catMaybes + [Just ("kind" .= _assKind), + ("webProperties" .=) <$> _assWebProperties, + ("name" .=) <$> _assName, ("id" .=) <$> _assId]) + +-- | JSON template for Analytics goal resource. +-- +-- /See:/ 'goal' smart constructor. +data Goal = Goal + { _goaParentLink :: !(Maybe GoalParentLink) + , _goaWebPropertyId :: !(Maybe Text) + , _goaKind :: !Text + , _goaCreated :: !(Maybe UTCTime) + , _goaValue :: !(Maybe Float) + , _goaProfileId :: !(Maybe Text) + , _goaEventDetails :: !(Maybe GoalEventDetails) + , _goaActive :: !(Maybe Bool) + , _goaSelfLink :: !(Maybe Text) + , _goaVisitTimeOnSiteDetails :: !(Maybe GoalVisitTimeOnSiteDetails) + , _goaAccountId :: !(Maybe Text) + , _goaName :: !(Maybe Text) + , _goaInternalWebPropertyId :: !(Maybe Text) + , _goaId :: !(Maybe Text) + , _goaUrlDestinationDetails :: !(Maybe GoalURLDestinationDetails) + , _goaVisitNumPagesDetails :: !(Maybe GoalVisitNumPagesDetails) + , _goaUpdated :: !(Maybe UTCTime) + , _goaType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Goal' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'goaParentLink' +-- +-- * 'goaWebPropertyId' +-- +-- * 'goaKind' +-- +-- * 'goaCreated' +-- +-- * 'goaValue' +-- +-- * 'goaProfileId' +-- +-- * 'goaEventDetails' +-- +-- * 'goaActive' +-- +-- * 'goaSelfLink' +-- +-- * 'goaVisitTimeOnSiteDetails' +-- +-- * 'goaAccountId' +-- +-- * 'goaName' +-- +-- * 'goaInternalWebPropertyId' +-- +-- * 'goaId' +-- +-- * 'goaUrlDestinationDetails' +-- +-- * 'goaVisitNumPagesDetails' +-- +-- * 'goaUpdated' +-- +-- * 'goaType' +goal + :: Goal +goal = + Goal + { _goaParentLink = Nothing + , _goaWebPropertyId = Nothing + , _goaKind = "analytics#goal" + , _goaCreated = Nothing + , _goaValue = Nothing + , _goaProfileId = Nothing + , _goaEventDetails = Nothing + , _goaActive = Nothing + , _goaSelfLink = Nothing + , _goaVisitTimeOnSiteDetails = Nothing + , _goaAccountId = Nothing + , _goaName = Nothing + , _goaInternalWebPropertyId = Nothing + , _goaId = Nothing + , _goaUrlDestinationDetails = Nothing + , _goaVisitNumPagesDetails = Nothing + , _goaUpdated = Nothing + , _goaType = Nothing + } + +-- | Parent link for a goal. Points to the view (profile) to which this goal +-- belongs. +goaParentLink :: Lens' Goal (Maybe GoalParentLink) +goaParentLink + = lens _goaParentLink + (\ s a -> s{_goaParentLink = a}) + +-- | Web property ID to which this goal belongs. The web property ID is of +-- the form UA-XXXXX-YY. +goaWebPropertyId :: Lens' Goal (Maybe Text) +goaWebPropertyId + = lens _goaWebPropertyId + (\ s a -> s{_goaWebPropertyId = a}) + +-- | Resource type for an Analytics goal. +goaKind :: Lens' Goal Text +goaKind = lens _goaKind (\ s a -> s{_goaKind = a}) + +-- | Time this goal was created. +goaCreated :: Lens' Goal (Maybe UTCTime) +goaCreated + = lens _goaCreated (\ s a -> s{_goaCreated = a}) + +-- | Goal value. +goaValue :: Lens' Goal (Maybe Float) +goaValue = lens _goaValue (\ s a -> s{_goaValue = a}) + +-- | View (Profile) ID to which this goal belongs. +goaProfileId :: Lens' Goal (Maybe Text) +goaProfileId + = lens _goaProfileId (\ s a -> s{_goaProfileId = a}) + +-- | Details for the goal of the type EVENT. +goaEventDetails :: Lens' Goal (Maybe GoalEventDetails) +goaEventDetails + = lens _goaEventDetails + (\ s a -> s{_goaEventDetails = a}) + +-- | Determines whether this goal is active. +goaActive :: Lens' Goal (Maybe Bool) +goaActive + = lens _goaActive (\ s a -> s{_goaActive = a}) + +-- | Link for this goal. +goaSelfLink :: Lens' Goal (Maybe Text) +goaSelfLink + = lens _goaSelfLink (\ s a -> s{_goaSelfLink = a}) + +-- | Details for the goal of the type VISIT_TIME_ON_SITE. +goaVisitTimeOnSiteDetails :: Lens' Goal (Maybe GoalVisitTimeOnSiteDetails) +goaVisitTimeOnSiteDetails + = lens _goaVisitTimeOnSiteDetails + (\ s a -> s{_goaVisitTimeOnSiteDetails = a}) + +-- | Account ID to which this goal belongs. +goaAccountId :: Lens' Goal (Maybe Text) +goaAccountId + = lens _goaAccountId (\ s a -> s{_goaAccountId = a}) + +-- | Goal name. +goaName :: Lens' Goal (Maybe Text) +goaName = lens _goaName (\ s a -> s{_goaName = a}) + +-- | Internal ID for the web property to which this goal belongs. +goaInternalWebPropertyId :: Lens' Goal (Maybe Text) +goaInternalWebPropertyId + = lens _goaInternalWebPropertyId + (\ s a -> s{_goaInternalWebPropertyId = a}) + +-- | Goal ID. +goaId :: Lens' Goal (Maybe Text) +goaId = lens _goaId (\ s a -> s{_goaId = a}) + +-- | Details for the goal of the type URL_DESTINATION. +goaUrlDestinationDetails :: Lens' Goal (Maybe GoalURLDestinationDetails) +goaUrlDestinationDetails + = lens _goaUrlDestinationDetails + (\ s a -> s{_goaUrlDestinationDetails = a}) + +-- | Details for the goal of the type VISIT_NUM_PAGES. +goaVisitNumPagesDetails :: Lens' Goal (Maybe GoalVisitNumPagesDetails) +goaVisitNumPagesDetails + = lens _goaVisitNumPagesDetails + (\ s a -> s{_goaVisitNumPagesDetails = a}) + +-- | Time this goal was last modified. +goaUpdated :: Lens' Goal (Maybe UTCTime) +goaUpdated + = lens _goaUpdated (\ s a -> s{_goaUpdated = a}) + +-- | Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, +-- VISIT_NUM_PAGES, AND EVENT. +goaType :: Lens' Goal (Maybe Text) +goaType = lens _goaType (\ s a -> s{_goaType = a}) + +instance FromJSON Goal where + parseJSON + = withObject "Goal" + (\ o -> + Goal <$> + (o .:? "parentLink") <*> (o .:? "webPropertyId") <*> + (o .:? "kind" .!= "analytics#goal") + <*> (o .:? "created") + <*> (o .:? "value") + <*> (o .:? "profileId") + <*> (o .:? "eventDetails") + <*> (o .:? "active") + <*> (o .:? "selfLink") + <*> (o .:? "visitTimeOnSiteDetails") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "internalWebPropertyId") + <*> (o .:? "id") + <*> (o .:? "urlDestinationDetails") + <*> (o .:? "visitNumPagesDetails") + <*> (o .:? "updated") + <*> (o .:? "type")) + +instance ToJSON Goal where + toJSON Goal{..} + = object + (catMaybes + [("parentLink" .=) <$> _goaParentLink, + ("webPropertyId" .=) <$> _goaWebPropertyId, + Just ("kind" .= _goaKind), + ("created" .=) <$> _goaCreated, + ("value" .=) <$> _goaValue, + ("profileId" .=) <$> _goaProfileId, + ("eventDetails" .=) <$> _goaEventDetails, + ("active" .=) <$> _goaActive, + ("selfLink" .=) <$> _goaSelfLink, + ("visitTimeOnSiteDetails" .=) <$> + _goaVisitTimeOnSiteDetails, + ("accountId" .=) <$> _goaAccountId, + ("name" .=) <$> _goaName, + ("internalWebPropertyId" .=) <$> + _goaInternalWebPropertyId, + ("id" .=) <$> _goaId, + ("urlDestinationDetails" .=) <$> + _goaUrlDestinationDetails, + ("visitNumPagesDetails" .=) <$> + _goaVisitNumPagesDetails, + ("updated" .=) <$> _goaUpdated, + ("type" .=) <$> _goaType]) + +-- | Lists columns (dimensions and metrics) for a particular report type. +-- +-- /See:/ 'columns' smart constructor. +data Columns = Columns + { _colEtag :: !(Maybe Text) + , _colKind :: !Text + , _colItems :: !(Maybe [Maybe Column]) + , _colTotalResults :: !(Maybe Int32) + , _colAttributeNames :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Columns' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'colEtag' +-- +-- * 'colKind' +-- +-- * 'colItems' +-- +-- * 'colTotalResults' +-- +-- * 'colAttributeNames' +columns + :: Columns +columns = + Columns + { _colEtag = Nothing + , _colKind = "analytics#columns" + , _colItems = Nothing + , _colTotalResults = Nothing + , _colAttributeNames = Nothing + } + +-- | Etag of collection. This etag can be compared with the last response +-- etag to check if response has changed. +colEtag :: Lens' Columns (Maybe Text) +colEtag = lens _colEtag (\ s a -> s{_colEtag = a}) + +-- | Collection type. +colKind :: Lens' Columns Text +colKind = lens _colKind (\ s a -> s{_colKind = a}) + +-- | List of columns for a report type. +colItems :: Lens' Columns [Maybe Column] +colItems + = lens _colItems (\ s a -> s{_colItems = a}) . + _Default + . _Coerce + +-- | Total number of columns returned in the response. +colTotalResults :: Lens' Columns (Maybe Int32) +colTotalResults + = lens _colTotalResults + (\ s a -> s{_colTotalResults = a}) + +-- | List of attributes names returned by columns. +colAttributeNames :: Lens' Columns [Text] +colAttributeNames + = lens _colAttributeNames + (\ s a -> s{_colAttributeNames = a}) + . _Default + . _Coerce + +instance FromJSON Columns where + parseJSON + = withObject "Columns" + (\ o -> + Columns <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "analytics#columns") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "attributeNames" .!= mempty)) + +instance ToJSON Columns where + toJSON Columns{..} + = object + (catMaybes + [("etag" .=) <$> _colEtag, Just ("kind" .= _colKind), + ("items" .=) <$> _colItems, + ("totalResults" .=) <$> _colTotalResults, + ("attributeNames" .=) <$> _colAttributeNames]) + +-- | A custom dimension collection lists Analytics custom dimensions to which +-- the user has access. Each resource in the collection corresponds to a +-- single Analytics custom dimension. +-- +-- /See:/ 'customDimensions' smart constructor. +data CustomDimensions = CustomDimensions + { _cdNextLink :: !(Maybe Text) + , _cdItemsPerPage :: !(Maybe Int32) + , _cdKind :: !Text + , _cdUsername :: !(Maybe Text) + , _cdItems :: !(Maybe [Maybe CustomDimension]) + , _cdTotalResults :: !(Maybe Int32) + , _cdStartIndex :: !(Maybe Int32) + , _cdPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomDimensions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdNextLink' +-- +-- * 'cdItemsPerPage' +-- +-- * 'cdKind' +-- +-- * 'cdUsername' +-- +-- * 'cdItems' +-- +-- * 'cdTotalResults' +-- +-- * 'cdStartIndex' +-- +-- * 'cdPreviousLink' +customDimensions + :: CustomDimensions +customDimensions = + CustomDimensions + { _cdNextLink = Nothing + , _cdItemsPerPage = Nothing + , _cdKind = "analytics#customDimensions" + , _cdUsername = Nothing + , _cdItems = Nothing + , _cdTotalResults = Nothing + , _cdStartIndex = Nothing + , _cdPreviousLink = Nothing + } + +-- | Link to next page for this custom dimension collection. +cdNextLink :: Lens' CustomDimensions (Maybe Text) +cdNextLink + = lens _cdNextLink (\ s a -> s{_cdNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +cdItemsPerPage :: Lens' CustomDimensions (Maybe Int32) +cdItemsPerPage + = lens _cdItemsPerPage + (\ s a -> s{_cdItemsPerPage = a}) + +-- | Collection type. +cdKind :: Lens' CustomDimensions Text +cdKind = lens _cdKind (\ s a -> s{_cdKind = a}) + +-- | Email ID of the authenticated user +cdUsername :: Lens' CustomDimensions (Maybe Text) +cdUsername + = lens _cdUsername (\ s a -> s{_cdUsername = a}) + +-- | Collection of custom dimensions. +cdItems :: Lens' CustomDimensions [Maybe CustomDimension] +cdItems + = lens _cdItems (\ s a -> s{_cdItems = a}) . _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +cdTotalResults :: Lens' CustomDimensions (Maybe Int32) +cdTotalResults + = lens _cdTotalResults + (\ s a -> s{_cdTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +cdStartIndex :: Lens' CustomDimensions (Maybe Int32) +cdStartIndex + = lens _cdStartIndex (\ s a -> s{_cdStartIndex = a}) + +-- | Link to previous page for this custom dimension collection. +cdPreviousLink :: Lens' CustomDimensions (Maybe Text) +cdPreviousLink + = lens _cdPreviousLink + (\ s a -> s{_cdPreviousLink = a}) + +instance FromJSON CustomDimensions where + parseJSON + = withObject "CustomDimensions" + (\ o -> + CustomDimensions <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#customDimensions") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON CustomDimensions where + toJSON CustomDimensions{..} + = object + (catMaybes + [("nextLink" .=) <$> _cdNextLink, + ("itemsPerPage" .=) <$> _cdItemsPerPage, + Just ("kind" .= _cdKind), + ("username" .=) <$> _cdUsername, + ("items" .=) <$> _cdItems, + ("totalResults" .=) <$> _cdTotalResults, + ("startIndex" .=) <$> _cdStartIndex, + ("previousLink" .=) <$> _cdPreviousLink]) + +-- | Upload collection lists Analytics uploads to which the user has access. +-- Each custom data source can have a set of uploads. Each resource in the +-- upload collection corresponds to a single Analytics data upload. +-- +-- /See:/ 'uploads' smart constructor. +data Uploads = Uploads + { _uplNextLink :: !(Maybe Text) + , _uplItemsPerPage :: !(Maybe Int32) + , _uplKind :: !Text + , _uplItems :: !(Maybe [Maybe Upload]) + , _uplTotalResults :: !(Maybe Int32) + , _uplStartIndex :: !(Maybe Int32) + , _uplPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Uploads' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uplNextLink' +-- +-- * 'uplItemsPerPage' +-- +-- * 'uplKind' +-- +-- * 'uplItems' +-- +-- * 'uplTotalResults' +-- +-- * 'uplStartIndex' +-- +-- * 'uplPreviousLink' +uploads + :: Uploads +uploads = + Uploads + { _uplNextLink = Nothing + , _uplItemsPerPage = Nothing + , _uplKind = "analytics#uploads" + , _uplItems = Nothing + , _uplTotalResults = Nothing + , _uplStartIndex = Nothing + , _uplPreviousLink = Nothing + } + +-- | Link to next page for this upload collection. +uplNextLink :: Lens' Uploads (Maybe Text) +uplNextLink + = lens _uplNextLink (\ s a -> s{_uplNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +uplItemsPerPage :: Lens' Uploads (Maybe Int32) +uplItemsPerPage + = lens _uplItemsPerPage + (\ s a -> s{_uplItemsPerPage = a}) + +-- | Collection type. +uplKind :: Lens' Uploads Text +uplKind = lens _uplKind (\ s a -> s{_uplKind = a}) + +-- | A list of uploads. +uplItems :: Lens' Uploads [Maybe Upload] +uplItems + = lens _uplItems (\ s a -> s{_uplItems = a}) . + _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- resources in the result. +uplTotalResults :: Lens' Uploads (Maybe Int32) +uplTotalResults + = lens _uplTotalResults + (\ s a -> s{_uplTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +uplStartIndex :: Lens' Uploads (Maybe Int32) +uplStartIndex + = lens _uplStartIndex + (\ s a -> s{_uplStartIndex = a}) + +-- | Link to previous page for this upload collection. +uplPreviousLink :: Lens' Uploads (Maybe Text) +uplPreviousLink + = lens _uplPreviousLink + (\ s a -> s{_uplPreviousLink = a}) + +instance FromJSON Uploads where + parseJSON + = withObject "Uploads" + (\ o -> + Uploads <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#uploads") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Uploads where + toJSON Uploads{..} + = object + (catMaybes + [("nextLink" .=) <$> _uplNextLink, + ("itemsPerPage" .=) <$> _uplItemsPerPage, + Just ("kind" .= _uplKind), + ("items" .=) <$> _uplItems, + ("totalResults" .=) <$> _uplTotalResults, + ("startIndex" .=) <$> _uplStartIndex, + ("previousLink" .=) <$> _uplPreviousLink]) + +-- | JSON template for an Analytics account filter. +-- +-- /See:/ 'filter'' smart constructor. +data Filter = Filter + { _filParentLink :: !(Maybe FilterParentLink) + , _filAdvancedDetails :: !(Maybe FilterAdvancedDetails) + , _filUppercaseDetails :: !(Maybe FilterUppercaseDetails) + , _filLowercaseDetails :: !(Maybe FilterLowercaseDetails) + , _filKind :: !Text + , _filCreated :: !(Maybe UTCTime) + , _filIncludeDetails :: !(Maybe (Maybe FilterExpression)) + , _filExcludeDetails :: !(Maybe (Maybe FilterExpression)) + , _filSelfLink :: !(Maybe Text) + , _filAccountId :: !(Maybe Text) + , _filName :: !(Maybe Text) + , _filId :: !(Maybe Text) + , _filUpdated :: !(Maybe UTCTime) + , _filType :: !(Maybe Text) + , _filSearchAndReplaceDetails :: !(Maybe FilterSearchAndReplaceDetails) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Filter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'filParentLink' +-- +-- * 'filAdvancedDetails' +-- +-- * 'filUppercaseDetails' +-- +-- * 'filLowercaseDetails' +-- +-- * 'filKind' +-- +-- * 'filCreated' +-- +-- * 'filIncludeDetails' +-- +-- * 'filExcludeDetails' +-- +-- * 'filSelfLink' +-- +-- * 'filAccountId' +-- +-- * 'filName' +-- +-- * 'filId' +-- +-- * 'filUpdated' +-- +-- * 'filType' +-- +-- * 'filSearchAndReplaceDetails' +filter' + :: Filter +filter' = + Filter + { _filParentLink = Nothing + , _filAdvancedDetails = Nothing + , _filUppercaseDetails = Nothing + , _filLowercaseDetails = Nothing + , _filKind = "analytics#filter" + , _filCreated = Nothing + , _filIncludeDetails = Nothing + , _filExcludeDetails = Nothing + , _filSelfLink = Nothing + , _filAccountId = Nothing + , _filName = Nothing + , _filId = Nothing + , _filUpdated = Nothing + , _filType = Nothing + , _filSearchAndReplaceDetails = Nothing + } + +-- | Parent link for this filter. Points to the account to which this filter +-- belongs. +filParentLink :: Lens' Filter (Maybe FilterParentLink) +filParentLink + = lens _filParentLink + (\ s a -> s{_filParentLink = a}) + +-- | Details for the filter of the type ADVANCED. +filAdvancedDetails :: Lens' Filter (Maybe FilterAdvancedDetails) +filAdvancedDetails + = lens _filAdvancedDetails + (\ s a -> s{_filAdvancedDetails = a}) + +-- | Details for the filter of the type UPPER. +filUppercaseDetails :: Lens' Filter (Maybe FilterUppercaseDetails) +filUppercaseDetails + = lens _filUppercaseDetails + (\ s a -> s{_filUppercaseDetails = a}) + +-- | Details for the filter of the type LOWER. +filLowercaseDetails :: Lens' Filter (Maybe FilterLowercaseDetails) +filLowercaseDetails + = lens _filLowercaseDetails + (\ s a -> s{_filLowercaseDetails = a}) + +-- | Resource type for Analytics filter. +filKind :: Lens' Filter Text +filKind = lens _filKind (\ s a -> s{_filKind = a}) + +-- | Time this filter was created. +filCreated :: Lens' Filter (Maybe UTCTime) +filCreated + = lens _filCreated (\ s a -> s{_filCreated = a}) + +-- | Details for the filter of the type INCLUDE. +filIncludeDetails :: Lens' Filter (Maybe (Maybe FilterExpression)) +filIncludeDetails + = lens _filIncludeDetails + (\ s a -> s{_filIncludeDetails = a}) + +-- | Details for the filter of the type EXCLUDE. +filExcludeDetails :: Lens' Filter (Maybe (Maybe FilterExpression)) +filExcludeDetails + = lens _filExcludeDetails + (\ s a -> s{_filExcludeDetails = a}) + +-- | Link for this filter. +filSelfLink :: Lens' Filter (Maybe Text) +filSelfLink + = lens _filSelfLink (\ s a -> s{_filSelfLink = a}) + +-- | Account ID to which this filter belongs. +filAccountId :: Lens' Filter (Maybe Text) +filAccountId + = lens _filAccountId (\ s a -> s{_filAccountId = a}) + +-- | Name of this filter. +filName :: Lens' Filter (Maybe Text) +filName = lens _filName (\ s a -> s{_filName = a}) + +-- | Filter ID. +filId :: Lens' Filter (Maybe Text) +filId = lens _filId (\ s a -> s{_filId = a}) + +-- | Time this filter was last modified. +filUpdated :: Lens' Filter (Maybe UTCTime) +filUpdated + = lens _filUpdated (\ s a -> s{_filUpdated = a}) + +-- | Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, +-- UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. +filType :: Lens' Filter (Maybe Text) +filType = lens _filType (\ s a -> s{_filType = a}) + +-- | Details for the filter of the type SEARCH_AND_REPLACE. +filSearchAndReplaceDetails :: Lens' Filter (Maybe FilterSearchAndReplaceDetails) +filSearchAndReplaceDetails + = lens _filSearchAndReplaceDetails + (\ s a -> s{_filSearchAndReplaceDetails = a}) + +instance FromJSON Filter where + parseJSON + = withObject "Filter" + (\ o -> + Filter <$> + (o .:? "parentLink") <*> (o .:? "advancedDetails") + <*> (o .:? "uppercaseDetails") + <*> (o .:? "lowercaseDetails") + <*> (o .:? "kind" .!= "analytics#filter") + <*> (o .:? "created") + <*> (o .:? "includeDetails") + <*> (o .:? "excludeDetails") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "type") + <*> (o .:? "searchAndReplaceDetails")) + +instance ToJSON Filter where + toJSON Filter{..} + = object + (catMaybes + [("parentLink" .=) <$> _filParentLink, + ("advancedDetails" .=) <$> _filAdvancedDetails, + ("uppercaseDetails" .=) <$> _filUppercaseDetails, + ("lowercaseDetails" .=) <$> _filLowercaseDetails, + Just ("kind" .= _filKind), + ("created" .=) <$> _filCreated, + ("includeDetails" .=) <$> _filIncludeDetails, + ("excludeDetails" .=) <$> _filExcludeDetails, + ("selfLink" .=) <$> _filSelfLink, + ("accountId" .=) <$> _filAccountId, + ("name" .=) <$> _filName, ("id" .=) <$> _filId, + ("updated" .=) <$> _filUpdated, + ("type" .=) <$> _filType, + ("searchAndReplaceDetails" .=) <$> + _filSearchAndReplaceDetails]) + +-- | An segment collection lists Analytics segments that the user has access +-- to. Each resource in the collection corresponds to a single Analytics +-- segment. +-- +-- /See:/ 'segments' smart constructor. +data Segments = Segments + { _sNextLink :: !(Maybe Text) + , _sItemsPerPage :: !(Maybe Int32) + , _sKind :: !Text + , _sUsername :: !(Maybe Text) + , _sItems :: !(Maybe [Maybe Segment]) + , _sTotalResults :: !(Maybe Int32) + , _sStartIndex :: !(Maybe Int32) + , _sPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Segments' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sNextLink' +-- +-- * 'sItemsPerPage' +-- +-- * 'sKind' +-- +-- * 'sUsername' +-- +-- * 'sItems' +-- +-- * 'sTotalResults' +-- +-- * 'sStartIndex' +-- +-- * 'sPreviousLink' +segments + :: Segments +segments = + Segments + { _sNextLink = Nothing + , _sItemsPerPage = Nothing + , _sKind = "analytics#segments" + , _sUsername = Nothing + , _sItems = Nothing + , _sTotalResults = Nothing + , _sStartIndex = Nothing + , _sPreviousLink = Nothing + } + +-- | Link to next page for this segment collection. +sNextLink :: Lens' Segments (Maybe Text) +sNextLink + = lens _sNextLink (\ s a -> s{_sNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to 1000 +-- with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +sItemsPerPage :: Lens' Segments (Maybe Int32) +sItemsPerPage + = lens _sItemsPerPage + (\ s a -> s{_sItemsPerPage = a}) + +-- | Collection type for segments. +sKind :: Lens' Segments Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | Email ID of the authenticated user +sUsername :: Lens' Segments (Maybe Text) +sUsername + = lens _sUsername (\ s a -> s{_sUsername = a}) + +-- | A list of segments. +sItems :: Lens' Segments [Maybe Segment] +sItems + = lens _sItems (\ s a -> s{_sItems = a}) . _Default . + _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +sTotalResults :: Lens' Segments (Maybe Int32) +sTotalResults + = lens _sTotalResults + (\ s a -> s{_sTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +sStartIndex :: Lens' Segments (Maybe Int32) +sStartIndex + = lens _sStartIndex (\ s a -> s{_sStartIndex = a}) + +-- | Link to previous page for this segment collection. +sPreviousLink :: Lens' Segments (Maybe Text) +sPreviousLink + = lens _sPreviousLink + (\ s a -> s{_sPreviousLink = a}) + +instance FromJSON Segments where + parseJSON + = withObject "Segments" + (\ o -> + Segments <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#segments") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON Segments where + toJSON Segments{..} + = object + (catMaybes + [("nextLink" .=) <$> _sNextLink, + ("itemsPerPage" .=) <$> _sItemsPerPage, + Just ("kind" .= _sKind), + ("username" .=) <$> _sUsername, + ("items" .=) <$> _sItems, + ("totalResults" .=) <$> _sTotalResults, + ("startIndex" .=) <$> _sStartIndex, + ("previousLink" .=) <$> _sPreviousLink]) + +-- | A profile filter link collection lists profile filter links between +-- profiles and filters. Each resource in the collection corresponds to a +-- profile filter link. +-- +-- /See:/ 'profileFilterLinks' smart constructor. +data ProfileFilterLinks = ProfileFilterLinks + { _pflNextLink :: !(Maybe Text) + , _pflItemsPerPage :: !(Maybe Int32) + , _pflKind :: !Text + , _pflUsername :: !(Maybe Text) + , _pflItems :: !(Maybe [Maybe ProfileFilterLink]) + , _pflTotalResults :: !(Maybe Int32) + , _pflStartIndex :: !(Maybe Int32) + , _pflPreviousLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProfileFilterLinks' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pflNextLink' +-- +-- * 'pflItemsPerPage' +-- +-- * 'pflKind' +-- +-- * 'pflUsername' +-- +-- * 'pflItems' +-- +-- * 'pflTotalResults' +-- +-- * 'pflStartIndex' +-- +-- * 'pflPreviousLink' +profileFilterLinks + :: ProfileFilterLinks +profileFilterLinks = + ProfileFilterLinks + { _pflNextLink = Nothing + , _pflItemsPerPage = Nothing + , _pflKind = "analytics#profileFilterLinks" + , _pflUsername = Nothing + , _pflItems = Nothing + , _pflTotalResults = Nothing + , _pflStartIndex = Nothing + , _pflPreviousLink = Nothing + } + +-- | Link to next page for this profile filter link collection. +pflNextLink :: Lens' ProfileFilterLinks (Maybe Text) +pflNextLink + = lens _pflNextLink (\ s a -> s{_pflNextLink = a}) + +-- | The maximum number of resources the response can contain, regardless of +-- the actual number of resources returned. Its value ranges from 1 to +-- 1,000 with a value of 1000 by default, or otherwise specified by the +-- max-results query parameter. +pflItemsPerPage :: Lens' ProfileFilterLinks (Maybe Int32) +pflItemsPerPage + = lens _pflItemsPerPage + (\ s a -> s{_pflItemsPerPage = a}) + +-- | Collection type. +pflKind :: Lens' ProfileFilterLinks Text +pflKind = lens _pflKind (\ s a -> s{_pflKind = a}) + +-- | Email ID of the authenticated user +pflUsername :: Lens' ProfileFilterLinks (Maybe Text) +pflUsername + = lens _pflUsername (\ s a -> s{_pflUsername = a}) + +-- | A list of profile filter links. +pflItems :: Lens' ProfileFilterLinks [Maybe ProfileFilterLink] +pflItems + = lens _pflItems (\ s a -> s{_pflItems = a}) . + _Default + . _Coerce + +-- | The total number of results for the query, regardless of the number of +-- results in the response. +pflTotalResults :: Lens' ProfileFilterLinks (Maybe Int32) +pflTotalResults + = lens _pflTotalResults + (\ s a -> s{_pflTotalResults = a}) + +-- | The starting index of the resources, which is 1 by default or otherwise +-- specified by the start-index query parameter. +pflStartIndex :: Lens' ProfileFilterLinks (Maybe Int32) +pflStartIndex + = lens _pflStartIndex + (\ s a -> s{_pflStartIndex = a}) + +-- | Link to previous page for this profile filter link collection. +pflPreviousLink :: Lens' ProfileFilterLinks (Maybe Text) +pflPreviousLink + = lens _pflPreviousLink + (\ s a -> s{_pflPreviousLink = a}) + +instance FromJSON ProfileFilterLinks where + parseJSON + = withObject "ProfileFilterLinks" + (\ o -> + ProfileFilterLinks <$> + (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*> + (o .:? "kind" .!= "analytics#profileFilterLinks") + <*> (o .:? "username") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "totalResults") + <*> (o .:? "startIndex") + <*> (o .:? "previousLink")) + +instance ToJSON ProfileFilterLinks where + toJSON ProfileFilterLinks{..} + = object + (catMaybes + [("nextLink" .=) <$> _pflNextLink, + ("itemsPerPage" .=) <$> _pflItemsPerPage, + Just ("kind" .= _pflKind), + ("username" .=) <$> _pflUsername, + ("items" .=) <$> _pflItems, + ("totalResults" .=) <$> _pflTotalResults, + ("startIndex" .=) <$> _pflStartIndex, + ("previousLink" .=) <$> _pflPreviousLink]) + +-- | JSON template for an Analytics segment. +-- +-- /See:/ 'segment' smart constructor. +data Segment = Segment + { _segDefinition :: !(Maybe Text) + , _segKind :: !Text + , _segCreated :: !(Maybe UTCTime) + , _segSelfLink :: !(Maybe Text) + , _segName :: !(Maybe Text) + , _segId :: !(Maybe Text) + , _segUpdated :: !(Maybe UTCTime) + , _segType :: !(Maybe Text) + , _segSegmentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Segment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'segDefinition' +-- +-- * 'segKind' +-- +-- * 'segCreated' +-- +-- * 'segSelfLink' +-- +-- * 'segName' +-- +-- * 'segId' +-- +-- * 'segUpdated' +-- +-- * 'segType' +-- +-- * 'segSegmentId' +segment + :: Segment +segment = + Segment + { _segDefinition = Nothing + , _segKind = "analytics#segment" + , _segCreated = Nothing + , _segSelfLink = Nothing + , _segName = Nothing + , _segId = Nothing + , _segUpdated = Nothing + , _segType = Nothing + , _segSegmentId = Nothing + } + +-- | Segment definition. +segDefinition :: Lens' Segment (Maybe Text) +segDefinition + = lens _segDefinition + (\ s a -> s{_segDefinition = a}) + +-- | Resource type for Analytics segment. +segKind :: Lens' Segment Text +segKind = lens _segKind (\ s a -> s{_segKind = a}) + +-- | Time the segment was created. +segCreated :: Lens' Segment (Maybe UTCTime) +segCreated + = lens _segCreated (\ s a -> s{_segCreated = a}) + +-- | Link for this segment. +segSelfLink :: Lens' Segment (Maybe Text) +segSelfLink + = lens _segSelfLink (\ s a -> s{_segSelfLink = a}) + +-- | Segment name. +segName :: Lens' Segment (Maybe Text) +segName = lens _segName (\ s a -> s{_segName = a}) + +-- | Segment ID. +segId :: Lens' Segment (Maybe Text) +segId = lens _segId (\ s a -> s{_segId = a}) + +-- | Time the segment was last modified. +segUpdated :: Lens' Segment (Maybe UTCTime) +segUpdated + = lens _segUpdated (\ s a -> s{_segUpdated = a}) + +-- | Type for a segment. Possible values are \"BUILT_IN\" or \"CUSTOM\". +segType :: Lens' Segment (Maybe Text) +segType = lens _segType (\ s a -> s{_segType = a}) + +-- | Segment ID. Can be used with the \'segment\' parameter in Core Reporting +-- API. +segSegmentId :: Lens' Segment (Maybe Text) +segSegmentId + = lens _segSegmentId (\ s a -> s{_segSegmentId = a}) + +instance FromJSON Segment where + parseJSON + = withObject "Segment" + (\ o -> + Segment <$> + (o .:? "definition") <*> + (o .:? "kind" .!= "analytics#segment") + <*> (o .:? "created") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "type") + <*> (o .:? "segmentId")) + +instance ToJSON Segment where + toJSON Segment{..} + = object + (catMaybes + [("definition" .=) <$> _segDefinition, + Just ("kind" .= _segKind), + ("created" .=) <$> _segCreated, + ("selfLink" .=) <$> _segSelfLink, + ("name" .=) <$> _segName, ("id" .=) <$> _segId, + ("updated" .=) <$> _segUpdated, + ("type" .=) <$> _segType, + ("segmentId" .=) <$> _segSegmentId]) + +-- | JSON template for Analytics Custom Dimension. +-- +-- /See:/ 'customDimension' smart constructor. +data CustomDimension = CustomDimension + { _cddParentLink :: !(Maybe CustomDimensionParentLink) + , _cddWebPropertyId :: !(Maybe Text) + , _cddKind :: !Text + , _cddCreated :: !(Maybe UTCTime) + , _cddActive :: !(Maybe Bool) + , _cddSelfLink :: !(Maybe Text) + , _cddAccountId :: !(Maybe Text) + , _cddName :: !(Maybe Text) + , _cddScope :: !(Maybe Text) + , _cddId :: !(Maybe Text) + , _cddUpdated :: !(Maybe UTCTime) + , _cddIndex :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomDimension' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cddParentLink' +-- +-- * 'cddWebPropertyId' +-- +-- * 'cddKind' +-- +-- * 'cddCreated' +-- +-- * 'cddActive' +-- +-- * 'cddSelfLink' +-- +-- * 'cddAccountId' +-- +-- * 'cddName' +-- +-- * 'cddScope' +-- +-- * 'cddId' +-- +-- * 'cddUpdated' +-- +-- * 'cddIndex' +customDimension + :: CustomDimension +customDimension = + CustomDimension + { _cddParentLink = Nothing + , _cddWebPropertyId = Nothing + , _cddKind = "analytics#customDimension" + , _cddCreated = Nothing + , _cddActive = Nothing + , _cddSelfLink = Nothing + , _cddAccountId = Nothing + , _cddName = Nothing + , _cddScope = Nothing + , _cddId = Nothing + , _cddUpdated = Nothing + , _cddIndex = Nothing + } + +-- | Parent link for the custom dimension. Points to the property to which +-- the custom dimension belongs. +cddParentLink :: Lens' CustomDimension (Maybe CustomDimensionParentLink) +cddParentLink + = lens _cddParentLink + (\ s a -> s{_cddParentLink = a}) + +-- | Property ID. +cddWebPropertyId :: Lens' CustomDimension (Maybe Text) +cddWebPropertyId + = lens _cddWebPropertyId + (\ s a -> s{_cddWebPropertyId = a}) + +-- | Kind value for a custom dimension. Set to \"analytics#customDimension\". +-- It is a read-only field. +cddKind :: Lens' CustomDimension Text +cddKind = lens _cddKind (\ s a -> s{_cddKind = a}) + +-- | Time the custom dimension was created. +cddCreated :: Lens' CustomDimension (Maybe UTCTime) +cddCreated + = lens _cddCreated (\ s a -> s{_cddCreated = a}) + +-- | Boolean indicating whether the custom dimension is active. +cddActive :: Lens' CustomDimension (Maybe Bool) +cddActive + = lens _cddActive (\ s a -> s{_cddActive = a}) + +-- | Link for the custom dimension +cddSelfLink :: Lens' CustomDimension (Maybe Text) +cddSelfLink + = lens _cddSelfLink (\ s a -> s{_cddSelfLink = a}) + +-- | Account ID. +cddAccountId :: Lens' CustomDimension (Maybe Text) +cddAccountId + = lens _cddAccountId (\ s a -> s{_cddAccountId = a}) + +-- | Name of the custom dimension. +cddName :: Lens' CustomDimension (Maybe Text) +cddName = lens _cddName (\ s a -> s{_cddName = a}) + +-- | Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. +cddScope :: Lens' CustomDimension (Maybe Text) +cddScope = lens _cddScope (\ s a -> s{_cddScope = a}) + +-- | Custom dimension ID. +cddId :: Lens' CustomDimension (Maybe Text) +cddId = lens _cddId (\ s a -> s{_cddId = a}) + +-- | Time the custom dimension was last modified. +cddUpdated :: Lens' CustomDimension (Maybe UTCTime) +cddUpdated + = lens _cddUpdated (\ s a -> s{_cddUpdated = a}) + +-- | Index of the custom dimension. +cddIndex :: Lens' CustomDimension (Maybe Int32) +cddIndex = lens _cddIndex (\ s a -> s{_cddIndex = a}) + +instance FromJSON CustomDimension where + parseJSON + = withObject "CustomDimension" + (\ o -> + CustomDimension <$> + (o .:? "parentLink") <*> (o .:? "webPropertyId") <*> + (o .:? "kind" .!= "analytics#customDimension") + <*> (o .:? "created") + <*> (o .:? "active") + <*> (o .:? "selfLink") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "scope") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "index")) + +instance ToJSON CustomDimension where + toJSON CustomDimension{..} + = object + (catMaybes + [("parentLink" .=) <$> _cddParentLink, + ("webPropertyId" .=) <$> _cddWebPropertyId, + Just ("kind" .= _cddKind), + ("created" .=) <$> _cddCreated, + ("active" .=) <$> _cddActive, + ("selfLink" .=) <$> _cddSelfLink, + ("accountId" .=) <$> _cddAccountId, + ("name" .=) <$> _cddName, ("scope" .=) <$> _cddScope, + ("id" .=) <$> _cddId, ("updated" .=) <$> _cddUpdated, + ("index" .=) <$> _cddIndex]) + +-- | Metadata returned for an upload operation. +-- +-- /See:/ 'upload' smart constructor. +data Upload = Upload + { _uuStatus :: !(Maybe Text) + , _uuKind :: !Text + , _uuCustomDataSourceId :: !(Maybe Text) + , _uuAccountId :: !(Maybe Int64) + , _uuId :: !(Maybe Text) + , _uuErrors :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Upload' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uuStatus' +-- +-- * 'uuKind' +-- +-- * 'uuCustomDataSourceId' +-- +-- * 'uuAccountId' +-- +-- * 'uuId' +-- +-- * 'uuErrors' +upload + :: Upload +upload = + Upload + { _uuStatus = Nothing + , _uuKind = "analytics#upload" + , _uuCustomDataSourceId = Nothing + , _uuAccountId = Nothing + , _uuId = Nothing + , _uuErrors = Nothing + } + +-- | Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, +-- DELETED. +uuStatus :: Lens' Upload (Maybe Text) +uuStatus = lens _uuStatus (\ s a -> s{_uuStatus = a}) + +-- | Resource type for Analytics upload. +uuKind :: Lens' Upload Text +uuKind = lens _uuKind (\ s a -> s{_uuKind = a}) + +-- | Custom data source Id to which this data import belongs. +uuCustomDataSourceId :: Lens' Upload (Maybe Text) +uuCustomDataSourceId + = lens _uuCustomDataSourceId + (\ s a -> s{_uuCustomDataSourceId = a}) + +-- | Account Id to which this upload belongs. +uuAccountId :: Lens' Upload (Maybe Int64) +uuAccountId + = lens _uuAccountId (\ s a -> s{_uuAccountId = a}) + +-- | A unique ID for this upload. +uuId :: Lens' Upload (Maybe Text) +uuId = lens _uuId (\ s a -> s{_uuId = a}) + +-- | Data import errors collection. +uuErrors :: Lens' Upload [Text] +uuErrors + = lens _uuErrors (\ s a -> s{_uuErrors = a}) . + _Default + . _Coerce + +instance FromJSON Upload where + parseJSON + = withObject "Upload" + (\ o -> + Upload <$> + (o .:? "status") <*> + (o .:? "kind" .!= "analytics#upload") + <*> (o .:? "customDataSourceId") + <*> (o .:? "accountId") + <*> (o .:? "id") + <*> (o .:? "errors" .!= mempty)) + +instance ToJSON Upload where + toJSON Upload{..} + = object + (catMaybes + [("status" .=) <$> _uuStatus, + Just ("kind" .= _uuKind), + ("customDataSourceId" .=) <$> _uuCustomDataSourceId, + ("accountId" .=) <$> _uuAccountId, + ("id" .=) <$> _uuId, ("errors" .=) <$> _uuErrors]) + +-- | JSON template for an Analytics profile filter link. +-- +-- /See:/ 'profileFilterLink' smart constructor. +data ProfileFilterLink = ProfileFilterLink + { _pflfProfileRef :: !(Maybe (Maybe ProfileRef)) + , _pflfKind :: !Text + , _pflfFilterRef :: !(Maybe (Maybe FilterRef)) + , _pflfSelfLink :: !(Maybe Text) + , _pflfId :: !(Maybe Text) + , _pflfRank :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProfileFilterLink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pflfProfileRef' +-- +-- * 'pflfKind' +-- +-- * 'pflfFilterRef' +-- +-- * 'pflfSelfLink' +-- +-- * 'pflfId' +-- +-- * 'pflfRank' +profileFilterLink + :: ProfileFilterLink +profileFilterLink = + ProfileFilterLink + { _pflfProfileRef = Nothing + , _pflfKind = "analytics#profileFilterLink" + , _pflfFilterRef = Nothing + , _pflfSelfLink = Nothing + , _pflfId = Nothing + , _pflfRank = Nothing + } + +-- | View (Profile) for this link. +pflfProfileRef :: Lens' ProfileFilterLink (Maybe (Maybe ProfileRef)) +pflfProfileRef + = lens _pflfProfileRef + (\ s a -> s{_pflfProfileRef = a}) + +-- | Resource type for Analytics filter. +pflfKind :: Lens' ProfileFilterLink Text +pflfKind = lens _pflfKind (\ s a -> s{_pflfKind = a}) + +-- | Filter for this link. +pflfFilterRef :: Lens' ProfileFilterLink (Maybe (Maybe FilterRef)) +pflfFilterRef + = lens _pflfFilterRef + (\ s a -> s{_pflfFilterRef = a}) + +-- | Link for this profile filter link. +pflfSelfLink :: Lens' ProfileFilterLink (Maybe Text) +pflfSelfLink + = lens _pflfSelfLink (\ s a -> s{_pflfSelfLink = a}) + +-- | Profile filter link ID. +pflfId :: Lens' ProfileFilterLink (Maybe Text) +pflfId = lens _pflfId (\ s a -> s{_pflfId = a}) + +-- | The rank of this profile filter link relative to the other filters +-- linked to the same profile. For readonly (i.e., list and get) +-- operations, the rank always starts at 1. For write (i.e., create, +-- update, or delete) operations, you may specify a value between 0 and 255 +-- inclusively, [0, 255]. In order to insert a link at the end of the list, +-- either don\'t specify a rank or set a rank to a number greater than the +-- largest rank in the list. In order to insert a link to the beginning of +-- the list specify a rank that is less than or equal to 1. The new link +-- will move all existing filters with the same or lower rank down the +-- list. After the link is inserted\/updated\/deleted all profile filter +-- links will be renumbered starting at 1. +pflfRank :: Lens' ProfileFilterLink (Maybe Int32) +pflfRank = lens _pflfRank (\ s a -> s{_pflfRank = a}) + +instance FromJSON ProfileFilterLink where + parseJSON + = withObject "ProfileFilterLink" + (\ o -> + ProfileFilterLink <$> + (o .:? "profileRef") <*> + (o .:? "kind" .!= "analytics#profileFilterLink") + <*> (o .:? "filterRef") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "rank")) + +instance ToJSON ProfileFilterLink where + toJSON ProfileFilterLink{..} + = object + (catMaybes + [("profileRef" .=) <$> _pflfProfileRef, + Just ("kind" .= _pflfKind), + ("filterRef" .=) <$> _pflfFilterRef, + ("selfLink" .=) <$> _pflfSelfLink, + ("id" .=) <$> _pflfId, ("rank" .=) <$> _pflfRank]) + +-- | JSON template for a metadata column. +-- +-- /See:/ 'column' smart constructor. +data Column = Column + { _ccKind :: !Text + , _ccAttributes :: !(Maybe ColumnAttributes) + , _ccId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Column' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccKind' +-- +-- * 'ccAttributes' +-- +-- * 'ccId' +column + :: Column +column = + Column + { _ccKind = "analytics#column" + , _ccAttributes = Nothing + , _ccId = Nothing + } + +-- | Resource type for Analytics column. +ccKind :: Lens' Column Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | Map of attribute name and value for this column. +ccAttributes :: Lens' Column (Maybe ColumnAttributes) +ccAttributes + = lens _ccAttributes (\ s a -> s{_ccAttributes = a}) + +-- | Column id. +ccId :: Lens' Column (Maybe Text) +ccId = lens _ccId (\ s a -> s{_ccId = a}) + +instance FromJSON Column where + parseJSON + = withObject "Column" + (\ o -> + Column <$> + (o .:? "kind" .!= "analytics#column") <*> + (o .:? "attributes") + <*> (o .:? "id")) + +instance ToJSON Column where + toJSON Column{..} + = object + (catMaybes + [Just ("kind" .= _ccKind), + ("attributes" .=) <$> _ccAttributes, + ("id" .=) <$> _ccId]) diff --git a/gogol-analytics/gen/Network/Google/Analytics/Types/Sum.hs b/gogol-analytics/gen/Network/Google/Analytics/Types/Sum.hs new file mode 100644 index 000000000..cd5653e8e --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Analytics/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Analytics.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Analytics.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Ga/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Ga/Get.hs new file mode 100644 index 000000000..05879355e --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Ga/Get.hs @@ -0,0 +1,304 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Data.Ga.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns Analytics data for a view (profile). +-- +-- /See:/ for @AnalyticsDataGaGet@. +module Analytics.Data.Ga.Get + ( + -- * REST Resource + DataGaGetAPI + + -- * Creating a Request + , dataGaGet + , DataGaGet + + -- * Request Lenses + , dggQuotaUser + , dggMetrics + , dggPrettyPrint + , dggSamplingLevel + , dggUserIp + , dggFilters + , dggIds + , dggEndDate + , dggKey + , dggOutput + , dggSort + , dggDimensions + , dggOauthToken + , dggStartIndex + , dggMaxResults + , dggSegment + , dggStartDate + , dggFields + , dggAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsDataGaGet@ which the +-- 'DataGaGet' request conforms to. +type DataGaGetAPI = + "data" :> + "ga" :> + QueryParam "metrics" Text :> + QueryParam "samplingLevel" Text :> + QueryParam "filters" Text :> + QueryParam "ids" Text :> + QueryParam "end-date" Text :> + QueryParam "output" Text :> + QueryParam "sort" Text :> + QueryParam "dimensions" Text :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + QueryParam "segment" Text :> + QueryParam "start-date" Text :> + Get '[JSON] GaData + +-- | Returns Analytics data for a view (profile). +-- +-- /See:/ 'dataGaGet' smart constructor. +data DataGaGet = DataGaGet + { _dggQuotaUser :: !(Maybe Text) + , _dggMetrics :: !Text + , _dggPrettyPrint :: !Bool + , _dggSamplingLevel :: !(Maybe Text) + , _dggUserIp :: !(Maybe Text) + , _dggFilters :: !(Maybe Text) + , _dggIds :: !Text + , _dggEndDate :: !Text + , _dggKey :: !(Maybe Text) + , _dggOutput :: !(Maybe Text) + , _dggSort :: !(Maybe Text) + , _dggDimensions :: !(Maybe Text) + , _dggOauthToken :: !(Maybe Text) + , _dggStartIndex :: !(Maybe Int32) + , _dggMaxResults :: !(Maybe Int32) + , _dggSegment :: !(Maybe Text) + , _dggStartDate :: !Text + , _dggFields :: !(Maybe Text) + , _dggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataGaGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dggQuotaUser' +-- +-- * 'dggMetrics' +-- +-- * 'dggPrettyPrint' +-- +-- * 'dggSamplingLevel' +-- +-- * 'dggUserIp' +-- +-- * 'dggFilters' +-- +-- * 'dggIds' +-- +-- * 'dggEndDate' +-- +-- * 'dggKey' +-- +-- * 'dggOutput' +-- +-- * 'dggSort' +-- +-- * 'dggDimensions' +-- +-- * 'dggOauthToken' +-- +-- * 'dggStartIndex' +-- +-- * 'dggMaxResults' +-- +-- * 'dggSegment' +-- +-- * 'dggStartDate' +-- +-- * 'dggFields' +-- +-- * 'dggAlt' +dataGaGet + :: Text -- ^ 'metrics' + -> Text -- ^ 'ids' + -> Text -- ^ 'end-date' + -> Text -- ^ 'start-date' + -> DataGaGet +dataGaGet pDggMetrics_ pDggIds_ pDggEndDate_ pDggStartDate_ = + DataGaGet + { _dggQuotaUser = Nothing + , _dggMetrics = pDggMetrics_ + , _dggPrettyPrint = False + , _dggSamplingLevel = Nothing + , _dggUserIp = Nothing + , _dggFilters = Nothing + , _dggIds = pDggIds_ + , _dggEndDate = pDggEndDate_ + , _dggKey = Nothing + , _dggOutput = Nothing + , _dggSort = Nothing + , _dggDimensions = Nothing + , _dggOauthToken = Nothing + , _dggStartIndex = Nothing + , _dggMaxResults = Nothing + , _dggSegment = Nothing + , _dggStartDate = pDggStartDate_ + , _dggFields = Nothing + , _dggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dggQuotaUser :: Lens' DataGaGet' (Maybe Text) +dggQuotaUser + = lens _dggQuotaUser (\ s a -> s{_dggQuotaUser = a}) + +-- | A comma-separated list of Analytics metrics. E.g., +-- \'ga:sessions,ga:pageviews\'. At least one metric must be specified. +dggMetrics :: Lens' DataGaGet' Text +dggMetrics + = lens _dggMetrics (\ s a -> s{_dggMetrics = a}) + +-- | Returns response with indentations and line breaks. +dggPrettyPrint :: Lens' DataGaGet' Bool +dggPrettyPrint + = lens _dggPrettyPrint + (\ s a -> s{_dggPrettyPrint = a}) + +-- | The desired sampling level. +dggSamplingLevel :: Lens' DataGaGet' (Maybe Text) +dggSamplingLevel + = lens _dggSamplingLevel + (\ s a -> s{_dggSamplingLevel = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dggUserIp :: Lens' DataGaGet' (Maybe Text) +dggUserIp + = lens _dggUserIp (\ s a -> s{_dggUserIp = a}) + +-- | A comma-separated list of dimension or metric filters to be applied to +-- Analytics data. +dggFilters :: Lens' DataGaGet' (Maybe Text) +dggFilters + = lens _dggFilters (\ s a -> s{_dggFilters = a}) + +-- | Unique table ID for retrieving Analytics data. Table ID is of the form +-- ga:XXXX, where XXXX is the Analytics view (profile) ID. +dggIds :: Lens' DataGaGet' Text +dggIds = lens _dggIds (\ s a -> s{_dggIds = a}) + +-- | End date for fetching Analytics data. Request can should specify an end +-- date formatted as YYYY-MM-DD, or as a relative date (e.g., today, +-- yesterday, or 7daysAgo). The default value is yesterday. +dggEndDate :: Lens' DataGaGet' Text +dggEndDate + = lens _dggEndDate (\ s a -> s{_dggEndDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dggKey :: Lens' DataGaGet' (Maybe Text) +dggKey = lens _dggKey (\ s a -> s{_dggKey = a}) + +-- | The selected format for the response. Default format is JSON. +dggOutput :: Lens' DataGaGet' (Maybe Text) +dggOutput + = lens _dggOutput (\ s a -> s{_dggOutput = a}) + +-- | A comma-separated list of dimensions or metrics that determine the sort +-- order for Analytics data. +dggSort :: Lens' DataGaGet' (Maybe Text) +dggSort = lens _dggSort (\ s a -> s{_dggSort = a}) + +-- | A comma-separated list of Analytics dimensions. E.g., +-- \'ga:browser,ga:city\'. +dggDimensions :: Lens' DataGaGet' (Maybe Text) +dggDimensions + = lens _dggDimensions + (\ s a -> s{_dggDimensions = a}) + +-- | OAuth 2.0 token for the current user. +dggOauthToken :: Lens' DataGaGet' (Maybe Text) +dggOauthToken + = lens _dggOauthToken + (\ s a -> s{_dggOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +dggStartIndex :: Lens' DataGaGet' (Maybe Int32) +dggStartIndex + = lens _dggStartIndex + (\ s a -> s{_dggStartIndex = a}) + +-- | The maximum number of entries to include in this feed. +dggMaxResults :: Lens' DataGaGet' (Maybe Int32) +dggMaxResults + = lens _dggMaxResults + (\ s a -> s{_dggMaxResults = a}) + +-- | An Analytics segment to be applied to data. +dggSegment :: Lens' DataGaGet' (Maybe Text) +dggSegment + = lens _dggSegment (\ s a -> s{_dggSegment = a}) + +-- | Start date for fetching Analytics data. Requests can specify a start +-- date formatted as YYYY-MM-DD, or as a relative date (e.g., today, +-- yesterday, or 7daysAgo). The default value is 7daysAgo. +dggStartDate :: Lens' DataGaGet' Text +dggStartDate + = lens _dggStartDate (\ s a -> s{_dggStartDate = a}) + +-- | Selector specifying which fields to include in a partial response. +dggFields :: Lens' DataGaGet' (Maybe Text) +dggFields + = lens _dggFields (\ s a -> s{_dggFields = a}) + +-- | Data format for the response. +dggAlt :: Lens' DataGaGet' Text +dggAlt = lens _dggAlt (\ s a -> s{_dggAlt = a}) + +instance GoogleRequest DataGaGet' where + type Rs DataGaGet' = GaData + request = requestWithRoute defReq analyticsURL + requestWithRoute r u DataGaGet{..} + = go _dggQuotaUser (Just _dggMetrics) _dggPrettyPrint + _dggSamplingLevel + _dggUserIp + _dggFilters + (Just _dggIds) + (Just _dggEndDate) + _dggKey + _dggOutput + _dggSort + _dggDimensions + _dggOauthToken + _dggStartIndex + _dggMaxResults + _dggSegment + (Just _dggStartDate) + _dggFields + _dggAlt + where go + = clientWithRoute (Proxy :: Proxy DataGaGetAPI) r u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Mcf/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Mcf/Get.hs new file mode 100644 index 000000000..ea428b91f --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Mcf/Get.hs @@ -0,0 +1,280 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Data.Mcf.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns Analytics Multi-Channel Funnels data for a view (profile). +-- +-- /See:/ for @AnalyticsDataMcfGet@. +module Analytics.Data.Mcf.Get + ( + -- * REST Resource + DataMcfGetAPI + + -- * Creating a Request + , dataMcfGet + , DataMcfGet + + -- * Request Lenses + , dmgQuotaUser + , dmgMetrics + , dmgPrettyPrint + , dmgSamplingLevel + , dmgUserIp + , dmgFilters + , dmgIds + , dmgEndDate + , dmgKey + , dmgSort + , dmgDimensions + , dmgOauthToken + , dmgStartIndex + , dmgMaxResults + , dmgStartDate + , dmgFields + , dmgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsDataMcfGet@ which the +-- 'DataMcfGet' request conforms to. +type DataMcfGetAPI = + "data" :> + "mcf" :> + QueryParam "metrics" Text :> + QueryParam "samplingLevel" Text :> + QueryParam "filters" Text :> + QueryParam "ids" Text :> + QueryParam "end-date" Text :> + QueryParam "sort" Text :> + QueryParam "dimensions" Text :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + QueryParam "start-date" Text :> Get '[JSON] McfData + +-- | Returns Analytics Multi-Channel Funnels data for a view (profile). +-- +-- /See:/ 'dataMcfGet' smart constructor. +data DataMcfGet = DataMcfGet + { _dmgQuotaUser :: !(Maybe Text) + , _dmgMetrics :: !Text + , _dmgPrettyPrint :: !Bool + , _dmgSamplingLevel :: !(Maybe Text) + , _dmgUserIp :: !(Maybe Text) + , _dmgFilters :: !(Maybe Text) + , _dmgIds :: !Text + , _dmgEndDate :: !Text + , _dmgKey :: !(Maybe Text) + , _dmgSort :: !(Maybe Text) + , _dmgDimensions :: !(Maybe Text) + , _dmgOauthToken :: !(Maybe Text) + , _dmgStartIndex :: !(Maybe Int32) + , _dmgMaxResults :: !(Maybe Int32) + , _dmgStartDate :: !Text + , _dmgFields :: !(Maybe Text) + , _dmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataMcfGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dmgQuotaUser' +-- +-- * 'dmgMetrics' +-- +-- * 'dmgPrettyPrint' +-- +-- * 'dmgSamplingLevel' +-- +-- * 'dmgUserIp' +-- +-- * 'dmgFilters' +-- +-- * 'dmgIds' +-- +-- * 'dmgEndDate' +-- +-- * 'dmgKey' +-- +-- * 'dmgSort' +-- +-- * 'dmgDimensions' +-- +-- * 'dmgOauthToken' +-- +-- * 'dmgStartIndex' +-- +-- * 'dmgMaxResults' +-- +-- * 'dmgStartDate' +-- +-- * 'dmgFields' +-- +-- * 'dmgAlt' +dataMcfGet + :: Text -- ^ 'metrics' + -> Text -- ^ 'ids' + -> Text -- ^ 'end-date' + -> Text -- ^ 'start-date' + -> DataMcfGet +dataMcfGet pDmgMetrics_ pDmgIds_ pDmgEndDate_ pDmgStartDate_ = + DataMcfGet + { _dmgQuotaUser = Nothing + , _dmgMetrics = pDmgMetrics_ + , _dmgPrettyPrint = False + , _dmgSamplingLevel = Nothing + , _dmgUserIp = Nothing + , _dmgFilters = Nothing + , _dmgIds = pDmgIds_ + , _dmgEndDate = pDmgEndDate_ + , _dmgKey = Nothing + , _dmgSort = Nothing + , _dmgDimensions = Nothing + , _dmgOauthToken = Nothing + , _dmgStartIndex = Nothing + , _dmgMaxResults = Nothing + , _dmgStartDate = pDmgStartDate_ + , _dmgFields = Nothing + , _dmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dmgQuotaUser :: Lens' DataMcfGet' (Maybe Text) +dmgQuotaUser + = lens _dmgQuotaUser (\ s a -> s{_dmgQuotaUser = a}) + +-- | A comma-separated list of Multi-Channel Funnels metrics. E.g., +-- \'mcf:totalConversions,mcf:totalConversionValue\'. At least one metric +-- must be specified. +dmgMetrics :: Lens' DataMcfGet' Text +dmgMetrics + = lens _dmgMetrics (\ s a -> s{_dmgMetrics = a}) + +-- | Returns response with indentations and line breaks. +dmgPrettyPrint :: Lens' DataMcfGet' Bool +dmgPrettyPrint + = lens _dmgPrettyPrint + (\ s a -> s{_dmgPrettyPrint = a}) + +-- | The desired sampling level. +dmgSamplingLevel :: Lens' DataMcfGet' (Maybe Text) +dmgSamplingLevel + = lens _dmgSamplingLevel + (\ s a -> s{_dmgSamplingLevel = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dmgUserIp :: Lens' DataMcfGet' (Maybe Text) +dmgUserIp + = lens _dmgUserIp (\ s a -> s{_dmgUserIp = a}) + +-- | A comma-separated list of dimension or metric filters to be applied to +-- the Analytics data. +dmgFilters :: Lens' DataMcfGet' (Maybe Text) +dmgFilters + = lens _dmgFilters (\ s a -> s{_dmgFilters = a}) + +-- | Unique table ID for retrieving Analytics data. Table ID is of the form +-- ga:XXXX, where XXXX is the Analytics view (profile) ID. +dmgIds :: Lens' DataMcfGet' Text +dmgIds = lens _dmgIds (\ s a -> s{_dmgIds = a}) + +-- | End date for fetching Analytics data. Requests can specify a start date +-- formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, +-- or 7daysAgo). The default value is 7daysAgo. +dmgEndDate :: Lens' DataMcfGet' Text +dmgEndDate + = lens _dmgEndDate (\ s a -> s{_dmgEndDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dmgKey :: Lens' DataMcfGet' (Maybe Text) +dmgKey = lens _dmgKey (\ s a -> s{_dmgKey = a}) + +-- | A comma-separated list of dimensions or metrics that determine the sort +-- order for the Analytics data. +dmgSort :: Lens' DataMcfGet' (Maybe Text) +dmgSort = lens _dmgSort (\ s a -> s{_dmgSort = a}) + +-- | A comma-separated list of Multi-Channel Funnels dimensions. E.g., +-- \'mcf:source,mcf:medium\'. +dmgDimensions :: Lens' DataMcfGet' (Maybe Text) +dmgDimensions + = lens _dmgDimensions + (\ s a -> s{_dmgDimensions = a}) + +-- | OAuth 2.0 token for the current user. +dmgOauthToken :: Lens' DataMcfGet' (Maybe Text) +dmgOauthToken + = lens _dmgOauthToken + (\ s a -> s{_dmgOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +dmgStartIndex :: Lens' DataMcfGet' (Maybe Int32) +dmgStartIndex + = lens _dmgStartIndex + (\ s a -> s{_dmgStartIndex = a}) + +-- | The maximum number of entries to include in this feed. +dmgMaxResults :: Lens' DataMcfGet' (Maybe Int32) +dmgMaxResults + = lens _dmgMaxResults + (\ s a -> s{_dmgMaxResults = a}) + +-- | Start date for fetching Analytics data. Requests can specify a start +-- date formatted as YYYY-MM-DD, or as a relative date (e.g., today, +-- yesterday, or 7daysAgo). The default value is 7daysAgo. +dmgStartDate :: Lens' DataMcfGet' Text +dmgStartDate + = lens _dmgStartDate (\ s a -> s{_dmgStartDate = a}) + +-- | Selector specifying which fields to include in a partial response. +dmgFields :: Lens' DataMcfGet' (Maybe Text) +dmgFields + = lens _dmgFields (\ s a -> s{_dmgFields = a}) + +-- | Data format for the response. +dmgAlt :: Lens' DataMcfGet' Text +dmgAlt = lens _dmgAlt (\ s a -> s{_dmgAlt = a}) + +instance GoogleRequest DataMcfGet' where + type Rs DataMcfGet' = McfData + request = requestWithRoute defReq analyticsURL + requestWithRoute r u DataMcfGet{..} + = go _dmgQuotaUser (Just _dmgMetrics) _dmgPrettyPrint + _dmgSamplingLevel + _dmgUserIp + _dmgFilters + (Just _dmgIds) + (Just _dmgEndDate) + _dmgKey + _dmgSort + _dmgDimensions + _dmgOauthToken + _dmgStartIndex + _dmgMaxResults + (Just _dmgStartDate) + _dmgFields + _dmgAlt + where go + = clientWithRoute (Proxy :: Proxy DataMcfGetAPI) r u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Realtime/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Realtime/Get.hs new file mode 100644 index 000000000..d7eda60cf --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Data/Realtime/Get.hs @@ -0,0 +1,225 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Data.Realtime.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns real time data for a view (profile). +-- +-- /See:/ for @AnalyticsDataRealtimeGet@. +module Analytics.Data.Realtime.Get + ( + -- * REST Resource + DataRealtimeGetAPI + + -- * Creating a Request + , dataRealtimeGet + , DataRealtimeGet + + -- * Request Lenses + , drgQuotaUser + , drgMetrics + , drgPrettyPrint + , drgUserIp + , drgFilters + , drgIds + , drgKey + , drgSort + , drgDimensions + , drgOauthToken + , drgMaxResults + , drgFields + , drgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsDataRealtimeGet@ which the +-- 'DataRealtimeGet' request conforms to. +type DataRealtimeGetAPI = + "data" :> + "realtime" :> + QueryParam "metrics" Text :> + QueryParam "filters" Text :> + QueryParam "ids" Text :> + QueryParam "sort" Text :> + QueryParam "dimensions" Text :> + QueryParam "max-results" Int32 :> + Get '[JSON] RealtimeData + +-- | Returns real time data for a view (profile). +-- +-- /See:/ 'dataRealtimeGet' smart constructor. +data DataRealtimeGet = DataRealtimeGet + { _drgQuotaUser :: !(Maybe Text) + , _drgMetrics :: !Text + , _drgPrettyPrint :: !Bool + , _drgUserIp :: !(Maybe Text) + , _drgFilters :: !(Maybe Text) + , _drgIds :: !Text + , _drgKey :: !(Maybe Text) + , _drgSort :: !(Maybe Text) + , _drgDimensions :: !(Maybe Text) + , _drgOauthToken :: !(Maybe Text) + , _drgMaxResults :: !(Maybe Int32) + , _drgFields :: !(Maybe Text) + , _drgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataRealtimeGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drgQuotaUser' +-- +-- * 'drgMetrics' +-- +-- * 'drgPrettyPrint' +-- +-- * 'drgUserIp' +-- +-- * 'drgFilters' +-- +-- * 'drgIds' +-- +-- * 'drgKey' +-- +-- * 'drgSort' +-- +-- * 'drgDimensions' +-- +-- * 'drgOauthToken' +-- +-- * 'drgMaxResults' +-- +-- * 'drgFields' +-- +-- * 'drgAlt' +dataRealtimeGet + :: Text -- ^ 'metrics' + -> Text -- ^ 'ids' + -> DataRealtimeGet +dataRealtimeGet pDrgMetrics_ pDrgIds_ = + DataRealtimeGet + { _drgQuotaUser = Nothing + , _drgMetrics = pDrgMetrics_ + , _drgPrettyPrint = False + , _drgUserIp = Nothing + , _drgFilters = Nothing + , _drgIds = pDrgIds_ + , _drgKey = Nothing + , _drgSort = Nothing + , _drgDimensions = Nothing + , _drgOauthToken = Nothing + , _drgMaxResults = Nothing + , _drgFields = Nothing + , _drgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +drgQuotaUser :: Lens' DataRealtimeGet' (Maybe Text) +drgQuotaUser + = lens _drgQuotaUser (\ s a -> s{_drgQuotaUser = a}) + +-- | A comma-separated list of real time metrics. E.g., \'rt:activeUsers\'. +-- At least one metric must be specified. +drgMetrics :: Lens' DataRealtimeGet' Text +drgMetrics + = lens _drgMetrics (\ s a -> s{_drgMetrics = a}) + +-- | Returns response with indentations and line breaks. +drgPrettyPrint :: Lens' DataRealtimeGet' Bool +drgPrettyPrint + = lens _drgPrettyPrint + (\ s a -> s{_drgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +drgUserIp :: Lens' DataRealtimeGet' (Maybe Text) +drgUserIp + = lens _drgUserIp (\ s a -> s{_drgUserIp = a}) + +-- | A comma-separated list of dimension or metric filters to be applied to +-- real time data. +drgFilters :: Lens' DataRealtimeGet' (Maybe Text) +drgFilters + = lens _drgFilters (\ s a -> s{_drgFilters = a}) + +-- | Unique table ID for retrieving real time data. Table ID is of the form +-- ga:XXXX, where XXXX is the Analytics view (profile) ID. +drgIds :: Lens' DataRealtimeGet' Text +drgIds = lens _drgIds (\ s a -> s{_drgIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +drgKey :: Lens' DataRealtimeGet' (Maybe Text) +drgKey = lens _drgKey (\ s a -> s{_drgKey = a}) + +-- | A comma-separated list of dimensions or metrics that determine the sort +-- order for real time data. +drgSort :: Lens' DataRealtimeGet' (Maybe Text) +drgSort = lens _drgSort (\ s a -> s{_drgSort = a}) + +-- | A comma-separated list of real time dimensions. E.g., +-- \'rt:medium,rt:city\'. +drgDimensions :: Lens' DataRealtimeGet' (Maybe Text) +drgDimensions + = lens _drgDimensions + (\ s a -> s{_drgDimensions = a}) + +-- | OAuth 2.0 token for the current user. +drgOauthToken :: Lens' DataRealtimeGet' (Maybe Text) +drgOauthToken + = lens _drgOauthToken + (\ s a -> s{_drgOauthToken = a}) + +-- | The maximum number of entries to include in this feed. +drgMaxResults :: Lens' DataRealtimeGet' (Maybe Int32) +drgMaxResults + = lens _drgMaxResults + (\ s a -> s{_drgMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +drgFields :: Lens' DataRealtimeGet' (Maybe Text) +drgFields + = lens _drgFields (\ s a -> s{_drgFields = a}) + +-- | Data format for the response. +drgAlt :: Lens' DataRealtimeGet' Text +drgAlt = lens _drgAlt (\ s a -> s{_drgAlt = a}) + +instance GoogleRequest DataRealtimeGet' where + type Rs DataRealtimeGet' = RealtimeData + request = requestWithRoute defReq analyticsURL + requestWithRoute r u DataRealtimeGet{..} + = go _drgQuotaUser (Just _drgMetrics) _drgPrettyPrint + _drgUserIp + _drgFilters + (Just _drgIds) + _drgKey + _drgSort + _drgDimensions + _drgOauthToken + _drgMaxResults + _drgFields + _drgAlt + where go + = clientWithRoute (Proxy :: Proxy DataRealtimeGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountSummaries/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountSummaries/List.hs new file mode 100644 index 000000000..ae857e93d --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountSummaries/List.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.AccountSummaries.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists account summaries (lightweight tree comprised of +-- accounts\/properties\/profiles) to which the user has access. +-- +-- /See:/ for @AnalyticsManagementAccountSummariesList@. +module Analytics.Management.AccountSummaries.List + ( + -- * REST Resource + ManagementAccountSummariesListAPI + + -- * Creating a Request + , managementAccountSummariesList + , ManagementAccountSummariesList + + -- * Request Lenses + , maslQuotaUser + , maslPrettyPrint + , maslUserIp + , maslKey + , maslOauthToken + , maslStartIndex + , maslMaxResults + , maslFields + , maslAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountSummariesList@ which the +-- 'ManagementAccountSummariesList' request conforms to. +type ManagementAccountSummariesListAPI = + "management" :> + "accountSummaries" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] AccountSummaries + +-- | Lists account summaries (lightweight tree comprised of +-- accounts\/properties\/profiles) to which the user has access. +-- +-- /See:/ 'managementAccountSummariesList' smart constructor. +data ManagementAccountSummariesList = ManagementAccountSummariesList + { _maslQuotaUser :: !(Maybe Text) + , _maslPrettyPrint :: !Bool + , _maslUserIp :: !(Maybe Text) + , _maslKey :: !(Maybe Text) + , _maslOauthToken :: !(Maybe Text) + , _maslStartIndex :: !(Maybe Int32) + , _maslMaxResults :: !(Maybe Int32) + , _maslFields :: !(Maybe Text) + , _maslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountSummariesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'maslQuotaUser' +-- +-- * 'maslPrettyPrint' +-- +-- * 'maslUserIp' +-- +-- * 'maslKey' +-- +-- * 'maslOauthToken' +-- +-- * 'maslStartIndex' +-- +-- * 'maslMaxResults' +-- +-- * 'maslFields' +-- +-- * 'maslAlt' +managementAccountSummariesList + :: ManagementAccountSummariesList +managementAccountSummariesList = + ManagementAccountSummariesList + { _maslQuotaUser = Nothing + , _maslPrettyPrint = False + , _maslUserIp = Nothing + , _maslKey = Nothing + , _maslOauthToken = Nothing + , _maslStartIndex = Nothing + , _maslMaxResults = Nothing + , _maslFields = Nothing + , _maslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +maslQuotaUser :: Lens' ManagementAccountSummariesList' (Maybe Text) +maslQuotaUser + = lens _maslQuotaUser + (\ s a -> s{_maslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +maslPrettyPrint :: Lens' ManagementAccountSummariesList' Bool +maslPrettyPrint + = lens _maslPrettyPrint + (\ s a -> s{_maslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +maslUserIp :: Lens' ManagementAccountSummariesList' (Maybe Text) +maslUserIp + = lens _maslUserIp (\ s a -> s{_maslUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +maslKey :: Lens' ManagementAccountSummariesList' (Maybe Text) +maslKey = lens _maslKey (\ s a -> s{_maslKey = a}) + +-- | OAuth 2.0 token for the current user. +maslOauthToken :: Lens' ManagementAccountSummariesList' (Maybe Text) +maslOauthToken + = lens _maslOauthToken + (\ s a -> s{_maslOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +maslStartIndex :: Lens' ManagementAccountSummariesList' (Maybe Int32) +maslStartIndex + = lens _maslStartIndex + (\ s a -> s{_maslStartIndex = a}) + +-- | The maximum number of account summaries to include in this response, +-- where the largest acceptable value is 1000. +maslMaxResults :: Lens' ManagementAccountSummariesList' (Maybe Int32) +maslMaxResults + = lens _maslMaxResults + (\ s a -> s{_maslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +maslFields :: Lens' ManagementAccountSummariesList' (Maybe Text) +maslFields + = lens _maslFields (\ s a -> s{_maslFields = a}) + +-- | Data format for the response. +maslAlt :: Lens' ManagementAccountSummariesList' Text +maslAlt = lens _maslAlt (\ s a -> s{_maslAlt = a}) + +instance GoogleRequest + ManagementAccountSummariesList' where + type Rs ManagementAccountSummariesList' = + AccountSummaries + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementAccountSummariesList{..} + = go _maslQuotaUser _maslPrettyPrint _maslUserIp + _maslKey + _maslOauthToken + _maslStartIndex + _maslMaxResults + _maslFields + _maslAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountSummariesListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Delete.hs new file mode 100644 index 000000000..b12d1633f --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Delete.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.AccountUserLinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a user from the given account. +-- +-- /See:/ for @AnalyticsManagementAccountUserLinksDelete@. +module Analytics.Management.AccountUserLinks.Delete + ( + -- * REST Resource + ManagementAccountUserLinksDeleteAPI + + -- * Creating a Request + , managementAccountUserLinksDelete + , ManagementAccountUserLinksDelete + + -- * Request Lenses + , mauldQuotaUser + , mauldPrettyPrint + , mauldUserIp + , mauldAccountId + , mauldKey + , mauldLinkId + , mauldOauthToken + , mauldFields + , mauldAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountUserLinksDelete@ which the +-- 'ManagementAccountUserLinksDelete' request conforms to. +type ManagementAccountUserLinksDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Delete '[JSON] () + +-- | Removes a user from the given account. +-- +-- /See:/ 'managementAccountUserLinksDelete' smart constructor. +data ManagementAccountUserLinksDelete = ManagementAccountUserLinksDelete + { _mauldQuotaUser :: !(Maybe Text) + , _mauldPrettyPrint :: !Bool + , _mauldUserIp :: !(Maybe Text) + , _mauldAccountId :: !Text + , _mauldKey :: !(Maybe Text) + , _mauldLinkId :: !Text + , _mauldOauthToken :: !(Maybe Text) + , _mauldFields :: !(Maybe Text) + , _mauldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountUserLinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mauldQuotaUser' +-- +-- * 'mauldPrettyPrint' +-- +-- * 'mauldUserIp' +-- +-- * 'mauldAccountId' +-- +-- * 'mauldKey' +-- +-- * 'mauldLinkId' +-- +-- * 'mauldOauthToken' +-- +-- * 'mauldFields' +-- +-- * 'mauldAlt' +managementAccountUserLinksDelete + :: Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementAccountUserLinksDelete +managementAccountUserLinksDelete pMauldAccountId_ pMauldLinkId_ = + ManagementAccountUserLinksDelete + { _mauldQuotaUser = Nothing + , _mauldPrettyPrint = False + , _mauldUserIp = Nothing + , _mauldAccountId = pMauldAccountId_ + , _mauldKey = Nothing + , _mauldLinkId = pMauldLinkId_ + , _mauldOauthToken = Nothing + , _mauldFields = Nothing + , _mauldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mauldQuotaUser :: Lens' ManagementAccountUserLinksDelete' (Maybe Text) +mauldQuotaUser + = lens _mauldQuotaUser + (\ s a -> s{_mauldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mauldPrettyPrint :: Lens' ManagementAccountUserLinksDelete' Bool +mauldPrettyPrint + = lens _mauldPrettyPrint + (\ s a -> s{_mauldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mauldUserIp :: Lens' ManagementAccountUserLinksDelete' (Maybe Text) +mauldUserIp + = lens _mauldUserIp (\ s a -> s{_mauldUserIp = a}) + +-- | Account ID to delete the user link for. +mauldAccountId :: Lens' ManagementAccountUserLinksDelete' Text +mauldAccountId + = lens _mauldAccountId + (\ s a -> s{_mauldAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mauldKey :: Lens' ManagementAccountUserLinksDelete' (Maybe Text) +mauldKey = lens _mauldKey (\ s a -> s{_mauldKey = a}) + +-- | Link ID to delete the user link for. +mauldLinkId :: Lens' ManagementAccountUserLinksDelete' Text +mauldLinkId + = lens _mauldLinkId (\ s a -> s{_mauldLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mauldOauthToken :: Lens' ManagementAccountUserLinksDelete' (Maybe Text) +mauldOauthToken + = lens _mauldOauthToken + (\ s a -> s{_mauldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mauldFields :: Lens' ManagementAccountUserLinksDelete' (Maybe Text) +mauldFields + = lens _mauldFields (\ s a -> s{_mauldFields = a}) + +-- | Data format for the response. +mauldAlt :: Lens' ManagementAccountUserLinksDelete' Text +mauldAlt = lens _mauldAlt (\ s a -> s{_mauldAlt = a}) + +instance GoogleRequest + ManagementAccountUserLinksDelete' where + type Rs ManagementAccountUserLinksDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementAccountUserLinksDelete{..} + = go _mauldQuotaUser _mauldPrettyPrint _mauldUserIp + _mauldAccountId + _mauldKey + _mauldLinkId + _mauldOauthToken + _mauldFields + _mauldAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountUserLinksDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Insert.hs new file mode 100644 index 000000000..5e7b1dc50 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Insert.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.AccountUserLinks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new user to the given account. +-- +-- /See:/ for @AnalyticsManagementAccountUserLinksInsert@. +module Analytics.Management.AccountUserLinks.Insert + ( + -- * REST Resource + ManagementAccountUserLinksInsertAPI + + -- * Creating a Request + , managementAccountUserLinksInsert + , ManagementAccountUserLinksInsert + + -- * Request Lenses + , mauliQuotaUser + , mauliPrettyPrint + , mauliUserIp + , mauliAccountId + , mauliKey + , mauliOauthToken + , mauliFields + , mauliAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountUserLinksInsert@ which the +-- 'ManagementAccountUserLinksInsert' request conforms to. +type ManagementAccountUserLinksInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "entityUserLinks" :> Post '[JSON] EntityUserLink + +-- | Adds a new user to the given account. +-- +-- /See:/ 'managementAccountUserLinksInsert' smart constructor. +data ManagementAccountUserLinksInsert = ManagementAccountUserLinksInsert + { _mauliQuotaUser :: !(Maybe Text) + , _mauliPrettyPrint :: !Bool + , _mauliUserIp :: !(Maybe Text) + , _mauliAccountId :: !Text + , _mauliKey :: !(Maybe Text) + , _mauliOauthToken :: !(Maybe Text) + , _mauliFields :: !(Maybe Text) + , _mauliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountUserLinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mauliQuotaUser' +-- +-- * 'mauliPrettyPrint' +-- +-- * 'mauliUserIp' +-- +-- * 'mauliAccountId' +-- +-- * 'mauliKey' +-- +-- * 'mauliOauthToken' +-- +-- * 'mauliFields' +-- +-- * 'mauliAlt' +managementAccountUserLinksInsert + :: Text -- ^ 'accountId' + -> ManagementAccountUserLinksInsert +managementAccountUserLinksInsert pMauliAccountId_ = + ManagementAccountUserLinksInsert + { _mauliQuotaUser = Nothing + , _mauliPrettyPrint = False + , _mauliUserIp = Nothing + , _mauliAccountId = pMauliAccountId_ + , _mauliKey = Nothing + , _mauliOauthToken = Nothing + , _mauliFields = Nothing + , _mauliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mauliQuotaUser :: Lens' ManagementAccountUserLinksInsert' (Maybe Text) +mauliQuotaUser + = lens _mauliQuotaUser + (\ s a -> s{_mauliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mauliPrettyPrint :: Lens' ManagementAccountUserLinksInsert' Bool +mauliPrettyPrint + = lens _mauliPrettyPrint + (\ s a -> s{_mauliPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mauliUserIp :: Lens' ManagementAccountUserLinksInsert' (Maybe Text) +mauliUserIp + = lens _mauliUserIp (\ s a -> s{_mauliUserIp = a}) + +-- | Account ID to create the user link for. +mauliAccountId :: Lens' ManagementAccountUserLinksInsert' Text +mauliAccountId + = lens _mauliAccountId + (\ s a -> s{_mauliAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mauliKey :: Lens' ManagementAccountUserLinksInsert' (Maybe Text) +mauliKey = lens _mauliKey (\ s a -> s{_mauliKey = a}) + +-- | OAuth 2.0 token for the current user. +mauliOauthToken :: Lens' ManagementAccountUserLinksInsert' (Maybe Text) +mauliOauthToken + = lens _mauliOauthToken + (\ s a -> s{_mauliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mauliFields :: Lens' ManagementAccountUserLinksInsert' (Maybe Text) +mauliFields + = lens _mauliFields (\ s a -> s{_mauliFields = a}) + +-- | Data format for the response. +mauliAlt :: Lens' ManagementAccountUserLinksInsert' Text +mauliAlt = lens _mauliAlt (\ s a -> s{_mauliAlt = a}) + +instance GoogleRequest + ManagementAccountUserLinksInsert' where + type Rs ManagementAccountUserLinksInsert' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementAccountUserLinksInsert{..} + = go _mauliQuotaUser _mauliPrettyPrint _mauliUserIp + _mauliAccountId + _mauliKey + _mauliOauthToken + _mauliFields + _mauliAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountUserLinksInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/List.hs new file mode 100644 index 000000000..a2c5d1157 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.AccountUserLinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists account-user links for a given account. +-- +-- /See:/ for @AnalyticsManagementAccountUserLinksList@. +module Analytics.Management.AccountUserLinks.List + ( + -- * REST Resource + ManagementAccountUserLinksListAPI + + -- * Creating a Request + , managementAccountUserLinksList + , ManagementAccountUserLinksList + + -- * Request Lenses + , maullQuotaUser + , maullPrettyPrint + , maullUserIp + , maullAccountId + , maullKey + , maullOauthToken + , maullStartIndex + , maullMaxResults + , maullFields + , maullAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountUserLinksList@ which the +-- 'ManagementAccountUserLinksList' request conforms to. +type ManagementAccountUserLinksListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "entityUserLinks" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] EntityUserLinks + +-- | Lists account-user links for a given account. +-- +-- /See:/ 'managementAccountUserLinksList' smart constructor. +data ManagementAccountUserLinksList = ManagementAccountUserLinksList + { _maullQuotaUser :: !(Maybe Text) + , _maullPrettyPrint :: !Bool + , _maullUserIp :: !(Maybe Text) + , _maullAccountId :: !Text + , _maullKey :: !(Maybe Text) + , _maullOauthToken :: !(Maybe Text) + , _maullStartIndex :: !(Maybe Int32) + , _maullMaxResults :: !(Maybe Int32) + , _maullFields :: !(Maybe Text) + , _maullAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountUserLinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'maullQuotaUser' +-- +-- * 'maullPrettyPrint' +-- +-- * 'maullUserIp' +-- +-- * 'maullAccountId' +-- +-- * 'maullKey' +-- +-- * 'maullOauthToken' +-- +-- * 'maullStartIndex' +-- +-- * 'maullMaxResults' +-- +-- * 'maullFields' +-- +-- * 'maullAlt' +managementAccountUserLinksList + :: Text -- ^ 'accountId' + -> ManagementAccountUserLinksList +managementAccountUserLinksList pMaullAccountId_ = + ManagementAccountUserLinksList + { _maullQuotaUser = Nothing + , _maullPrettyPrint = False + , _maullUserIp = Nothing + , _maullAccountId = pMaullAccountId_ + , _maullKey = Nothing + , _maullOauthToken = Nothing + , _maullStartIndex = Nothing + , _maullMaxResults = Nothing + , _maullFields = Nothing + , _maullAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +maullQuotaUser :: Lens' ManagementAccountUserLinksList' (Maybe Text) +maullQuotaUser + = lens _maullQuotaUser + (\ s a -> s{_maullQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +maullPrettyPrint :: Lens' ManagementAccountUserLinksList' Bool +maullPrettyPrint + = lens _maullPrettyPrint + (\ s a -> s{_maullPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +maullUserIp :: Lens' ManagementAccountUserLinksList' (Maybe Text) +maullUserIp + = lens _maullUserIp (\ s a -> s{_maullUserIp = a}) + +-- | Account ID to retrieve the user links for. +maullAccountId :: Lens' ManagementAccountUserLinksList' Text +maullAccountId + = lens _maullAccountId + (\ s a -> s{_maullAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +maullKey :: Lens' ManagementAccountUserLinksList' (Maybe Text) +maullKey = lens _maullKey (\ s a -> s{_maullKey = a}) + +-- | OAuth 2.0 token for the current user. +maullOauthToken :: Lens' ManagementAccountUserLinksList' (Maybe Text) +maullOauthToken + = lens _maullOauthToken + (\ s a -> s{_maullOauthToken = a}) + +-- | An index of the first account-user link to retrieve. Use this parameter +-- as a pagination mechanism along with the max-results parameter. +maullStartIndex :: Lens' ManagementAccountUserLinksList' (Maybe Int32) +maullStartIndex + = lens _maullStartIndex + (\ s a -> s{_maullStartIndex = a}) + +-- | The maximum number of account-user links to include in this response. +maullMaxResults :: Lens' ManagementAccountUserLinksList' (Maybe Int32) +maullMaxResults + = lens _maullMaxResults + (\ s a -> s{_maullMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +maullFields :: Lens' ManagementAccountUserLinksList' (Maybe Text) +maullFields + = lens _maullFields (\ s a -> s{_maullFields = a}) + +-- | Data format for the response. +maullAlt :: Lens' ManagementAccountUserLinksList' Text +maullAlt = lens _maullAlt (\ s a -> s{_maullAlt = a}) + +instance GoogleRequest + ManagementAccountUserLinksList' where + type Rs ManagementAccountUserLinksList' = + EntityUserLinks + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementAccountUserLinksList{..} + = go _maullQuotaUser _maullPrettyPrint _maullUserIp + _maullAccountId + _maullKey + _maullOauthToken + _maullStartIndex + _maullMaxResults + _maullFields + _maullAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountUserLinksListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Update.hs new file mode 100644 index 000000000..55c4be275 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Update.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.AccountUserLinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates permissions for an existing user on the given account. +-- +-- /See:/ for @AnalyticsManagementAccountUserLinksUpdate@. +module Analytics.Management.AccountUserLinks.Update + ( + -- * REST Resource + ManagementAccountUserLinksUpdateAPI + + -- * Creating a Request + , managementAccountUserLinksUpdate + , ManagementAccountUserLinksUpdate + + -- * Request Lenses + , mauluQuotaUser + , mauluPrettyPrint + , mauluUserIp + , mauluAccountId + , mauluKey + , mauluLinkId + , mauluOauthToken + , mauluFields + , mauluAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountUserLinksUpdate@ which the +-- 'ManagementAccountUserLinksUpdate' request conforms to. +type ManagementAccountUserLinksUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Put '[JSON] EntityUserLink + +-- | Updates permissions for an existing user on the given account. +-- +-- /See:/ 'managementAccountUserLinksUpdate' smart constructor. +data ManagementAccountUserLinksUpdate = ManagementAccountUserLinksUpdate + { _mauluQuotaUser :: !(Maybe Text) + , _mauluPrettyPrint :: !Bool + , _mauluUserIp :: !(Maybe Text) + , _mauluAccountId :: !Text + , _mauluKey :: !(Maybe Text) + , _mauluLinkId :: !Text + , _mauluOauthToken :: !(Maybe Text) + , _mauluFields :: !(Maybe Text) + , _mauluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountUserLinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mauluQuotaUser' +-- +-- * 'mauluPrettyPrint' +-- +-- * 'mauluUserIp' +-- +-- * 'mauluAccountId' +-- +-- * 'mauluKey' +-- +-- * 'mauluLinkId' +-- +-- * 'mauluOauthToken' +-- +-- * 'mauluFields' +-- +-- * 'mauluAlt' +managementAccountUserLinksUpdate + :: Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementAccountUserLinksUpdate +managementAccountUserLinksUpdate pMauluAccountId_ pMauluLinkId_ = + ManagementAccountUserLinksUpdate + { _mauluQuotaUser = Nothing + , _mauluPrettyPrint = False + , _mauluUserIp = Nothing + , _mauluAccountId = pMauluAccountId_ + , _mauluKey = Nothing + , _mauluLinkId = pMauluLinkId_ + , _mauluOauthToken = Nothing + , _mauluFields = Nothing + , _mauluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mauluQuotaUser :: Lens' ManagementAccountUserLinksUpdate' (Maybe Text) +mauluQuotaUser + = lens _mauluQuotaUser + (\ s a -> s{_mauluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mauluPrettyPrint :: Lens' ManagementAccountUserLinksUpdate' Bool +mauluPrettyPrint + = lens _mauluPrettyPrint + (\ s a -> s{_mauluPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mauluUserIp :: Lens' ManagementAccountUserLinksUpdate' (Maybe Text) +mauluUserIp + = lens _mauluUserIp (\ s a -> s{_mauluUserIp = a}) + +-- | Account ID to update the account-user link for. +mauluAccountId :: Lens' ManagementAccountUserLinksUpdate' Text +mauluAccountId + = lens _mauluAccountId + (\ s a -> s{_mauluAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mauluKey :: Lens' ManagementAccountUserLinksUpdate' (Maybe Text) +mauluKey = lens _mauluKey (\ s a -> s{_mauluKey = a}) + +-- | Link ID to update the account-user link for. +mauluLinkId :: Lens' ManagementAccountUserLinksUpdate' Text +mauluLinkId + = lens _mauluLinkId (\ s a -> s{_mauluLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mauluOauthToken :: Lens' ManagementAccountUserLinksUpdate' (Maybe Text) +mauluOauthToken + = lens _mauluOauthToken + (\ s a -> s{_mauluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mauluFields :: Lens' ManagementAccountUserLinksUpdate' (Maybe Text) +mauluFields + = lens _mauluFields (\ s a -> s{_mauluFields = a}) + +-- | Data format for the response. +mauluAlt :: Lens' ManagementAccountUserLinksUpdate' Text +mauluAlt = lens _mauluAlt (\ s a -> s{_mauluAlt = a}) + +instance GoogleRequest + ManagementAccountUserLinksUpdate' where + type Rs ManagementAccountUserLinksUpdate' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementAccountUserLinksUpdate{..} + = go _mauluQuotaUser _mauluPrettyPrint _mauluUserIp + _mauluAccountId + _mauluKey + _mauluLinkId + _mauluOauthToken + _mauluFields + _mauluAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountUserLinksUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Accounts/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Accounts/List.hs new file mode 100644 index 000000000..4fcb7f966 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Accounts/List.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all accounts to which the user has access. +-- +-- /See:/ for @AnalyticsManagementAccountsList@. +module Analytics.Management.Accounts.List + ( + -- * REST Resource + ManagementAccountsListAPI + + -- * Creating a Request + , managementAccountsList + , ManagementAccountsList + + -- * Request Lenses + , malQuotaUser + , malPrettyPrint + , malUserIp + , malKey + , malOauthToken + , malStartIndex + , malMaxResults + , malFields + , malAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementAccountsList@ which the +-- 'ManagementAccountsList' request conforms to. +type ManagementAccountsListAPI = + "management" :> + "accounts" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] Accounts + +-- | Lists all accounts to which the user has access. +-- +-- /See:/ 'managementAccountsList' smart constructor. +data ManagementAccountsList = ManagementAccountsList + { _malQuotaUser :: !(Maybe Text) + , _malPrettyPrint :: !Bool + , _malUserIp :: !(Maybe Text) + , _malKey :: !(Maybe Text) + , _malOauthToken :: !(Maybe Text) + , _malStartIndex :: !(Maybe Int32) + , _malMaxResults :: !(Maybe Int32) + , _malFields :: !(Maybe Text) + , _malAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementAccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'malQuotaUser' +-- +-- * 'malPrettyPrint' +-- +-- * 'malUserIp' +-- +-- * 'malKey' +-- +-- * 'malOauthToken' +-- +-- * 'malStartIndex' +-- +-- * 'malMaxResults' +-- +-- * 'malFields' +-- +-- * 'malAlt' +managementAccountsList + :: ManagementAccountsList +managementAccountsList = + ManagementAccountsList + { _malQuotaUser = Nothing + , _malPrettyPrint = False + , _malUserIp = Nothing + , _malKey = Nothing + , _malOauthToken = Nothing + , _malStartIndex = Nothing + , _malMaxResults = Nothing + , _malFields = Nothing + , _malAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +malQuotaUser :: Lens' ManagementAccountsList' (Maybe Text) +malQuotaUser + = lens _malQuotaUser (\ s a -> s{_malQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +malPrettyPrint :: Lens' ManagementAccountsList' Bool +malPrettyPrint + = lens _malPrettyPrint + (\ s a -> s{_malPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +malUserIp :: Lens' ManagementAccountsList' (Maybe Text) +malUserIp + = lens _malUserIp (\ s a -> s{_malUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +malKey :: Lens' ManagementAccountsList' (Maybe Text) +malKey = lens _malKey (\ s a -> s{_malKey = a}) + +-- | OAuth 2.0 token for the current user. +malOauthToken :: Lens' ManagementAccountsList' (Maybe Text) +malOauthToken + = lens _malOauthToken + (\ s a -> s{_malOauthToken = a}) + +-- | An index of the first account to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +malStartIndex :: Lens' ManagementAccountsList' (Maybe Int32) +malStartIndex + = lens _malStartIndex + (\ s a -> s{_malStartIndex = a}) + +-- | The maximum number of accounts to include in this response. +malMaxResults :: Lens' ManagementAccountsList' (Maybe Int32) +malMaxResults + = lens _malMaxResults + (\ s a -> s{_malMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +malFields :: Lens' ManagementAccountsList' (Maybe Text) +malFields + = lens _malFields (\ s a -> s{_malFields = a}) + +-- | Data format for the response. +malAlt :: Lens' ManagementAccountsList' Text +malAlt = lens _malAlt (\ s a -> s{_malAlt = a}) + +instance GoogleRequest ManagementAccountsList' where + type Rs ManagementAccountsList' = Accounts + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementAccountsList{..} + = go _malQuotaUser _malPrettyPrint _malUserIp _malKey + _malOauthToken + _malStartIndex + _malMaxResults + _malFields + _malAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementAccountsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDataSources/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDataSources/List.hs new file mode 100644 index 000000000..ca48552d6 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDataSources/List.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDataSources.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List custom data sources to which the user has access. +-- +-- /See:/ for @AnalyticsManagementCustomDataSourcesList@. +module Analytics.Management.CustomDataSources.List + ( + -- * REST Resource + ManagementCustomDataSourcesListAPI + + -- * Creating a Request + , managementCustomDataSourcesList + , ManagementCustomDataSourcesList + + -- * Request Lenses + , mcdslQuotaUser + , mcdslPrettyPrint + , mcdslWebPropertyId + , mcdslUserIp + , mcdslAccountId + , mcdslKey + , mcdslOauthToken + , mcdslStartIndex + , mcdslMaxResults + , mcdslFields + , mcdslAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDataSourcesList@ which the +-- 'ManagementCustomDataSourcesList' request conforms to. +type ManagementCustomDataSourcesListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDataSources" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] CustomDataSources + +-- | List custom data sources to which the user has access. +-- +-- /See:/ 'managementCustomDataSourcesList' smart constructor. +data ManagementCustomDataSourcesList = ManagementCustomDataSourcesList + { _mcdslQuotaUser :: !(Maybe Text) + , _mcdslPrettyPrint :: !Bool + , _mcdslWebPropertyId :: !Text + , _mcdslUserIp :: !(Maybe Text) + , _mcdslAccountId :: !Text + , _mcdslKey :: !(Maybe Text) + , _mcdslOauthToken :: !(Maybe Text) + , _mcdslStartIndex :: !(Maybe Int32) + , _mcdslMaxResults :: !(Maybe Int32) + , _mcdslFields :: !(Maybe Text) + , _mcdslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDataSourcesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcdslQuotaUser' +-- +-- * 'mcdslPrettyPrint' +-- +-- * 'mcdslWebPropertyId' +-- +-- * 'mcdslUserIp' +-- +-- * 'mcdslAccountId' +-- +-- * 'mcdslKey' +-- +-- * 'mcdslOauthToken' +-- +-- * 'mcdslStartIndex' +-- +-- * 'mcdslMaxResults' +-- +-- * 'mcdslFields' +-- +-- * 'mcdslAlt' +managementCustomDataSourcesList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomDataSourcesList +managementCustomDataSourcesList pMcdslWebPropertyId_ pMcdslAccountId_ = + ManagementCustomDataSourcesList + { _mcdslQuotaUser = Nothing + , _mcdslPrettyPrint = False + , _mcdslWebPropertyId = pMcdslWebPropertyId_ + , _mcdslUserIp = Nothing + , _mcdslAccountId = pMcdslAccountId_ + , _mcdslKey = Nothing + , _mcdslOauthToken = Nothing + , _mcdslStartIndex = Nothing + , _mcdslMaxResults = Nothing + , _mcdslFields = Nothing + , _mcdslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcdslQuotaUser :: Lens' ManagementCustomDataSourcesList' (Maybe Text) +mcdslQuotaUser + = lens _mcdslQuotaUser + (\ s a -> s{_mcdslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcdslPrettyPrint :: Lens' ManagementCustomDataSourcesList' Bool +mcdslPrettyPrint + = lens _mcdslPrettyPrint + (\ s a -> s{_mcdslPrettyPrint = a}) + +-- | Web property Id for the custom data sources to retrieve. +mcdslWebPropertyId :: Lens' ManagementCustomDataSourcesList' Text +mcdslWebPropertyId + = lens _mcdslWebPropertyId + (\ s a -> s{_mcdslWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcdslUserIp :: Lens' ManagementCustomDataSourcesList' (Maybe Text) +mcdslUserIp + = lens _mcdslUserIp (\ s a -> s{_mcdslUserIp = a}) + +-- | Account Id for the custom data sources to retrieve. +mcdslAccountId :: Lens' ManagementCustomDataSourcesList' Text +mcdslAccountId + = lens _mcdslAccountId + (\ s a -> s{_mcdslAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcdslKey :: Lens' ManagementCustomDataSourcesList' (Maybe Text) +mcdslKey = lens _mcdslKey (\ s a -> s{_mcdslKey = a}) + +-- | OAuth 2.0 token for the current user. +mcdslOauthToken :: Lens' ManagementCustomDataSourcesList' (Maybe Text) +mcdslOauthToken + = lens _mcdslOauthToken + (\ s a -> s{_mcdslOauthToken = a}) + +-- | A 1-based index of the first custom data source to retrieve. Use this +-- parameter as a pagination mechanism along with the max-results +-- parameter. +mcdslStartIndex :: Lens' ManagementCustomDataSourcesList' (Maybe Int32) +mcdslStartIndex + = lens _mcdslStartIndex + (\ s a -> s{_mcdslStartIndex = a}) + +-- | The maximum number of custom data sources to include in this response. +mcdslMaxResults :: Lens' ManagementCustomDataSourcesList' (Maybe Int32) +mcdslMaxResults + = lens _mcdslMaxResults + (\ s a -> s{_mcdslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mcdslFields :: Lens' ManagementCustomDataSourcesList' (Maybe Text) +mcdslFields + = lens _mcdslFields (\ s a -> s{_mcdslFields = a}) + +-- | Data format for the response. +mcdslAlt :: Lens' ManagementCustomDataSourcesList' Text +mcdslAlt = lens _mcdslAlt (\ s a -> s{_mcdslAlt = a}) + +instance GoogleRequest + ManagementCustomDataSourcesList' where + type Rs ManagementCustomDataSourcesList' = + CustomDataSources + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDataSourcesList{..} + = go _mcdslQuotaUser _mcdslPrettyPrint + _mcdslWebPropertyId + _mcdslUserIp + _mcdslAccountId + _mcdslKey + _mcdslOauthToken + _mcdslStartIndex + _mcdslMaxResults + _mcdslFields + _mcdslAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDataSourcesListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Get.hs new file mode 100644 index 000000000..0e44d3a0d --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Get.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDimensions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a custom dimension to which the user has access. +-- +-- /See:/ for @AnalyticsManagementCustomDimensionsGet@. +module Analytics.Management.CustomDimensions.Get + ( + -- * REST Resource + ManagementCustomDimensionsGetAPI + + -- * Creating a Request + , managementCustomDimensionsGet + , ManagementCustomDimensionsGet + + -- * Request Lenses + , mcdgQuotaUser + , mcdgPrettyPrint + , mcdgWebPropertyId + , mcdgUserIp + , mcdgAccountId + , mcdgKey + , mcdgOauthToken + , mcdgCustomDimensionId + , mcdgFields + , mcdgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDimensionsGet@ which the +-- 'ManagementCustomDimensionsGet' request conforms to. +type ManagementCustomDimensionsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDimensions" :> + Capture "customDimensionId" Text :> + Get '[JSON] CustomDimension + +-- | Get a custom dimension to which the user has access. +-- +-- /See:/ 'managementCustomDimensionsGet' smart constructor. +data ManagementCustomDimensionsGet = ManagementCustomDimensionsGet + { _mcdgQuotaUser :: !(Maybe Text) + , _mcdgPrettyPrint :: !Bool + , _mcdgWebPropertyId :: !Text + , _mcdgUserIp :: !(Maybe Text) + , _mcdgAccountId :: !Text + , _mcdgKey :: !(Maybe Text) + , _mcdgOauthToken :: !(Maybe Text) + , _mcdgCustomDimensionId :: !Text + , _mcdgFields :: !(Maybe Text) + , _mcdgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDimensionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcdgQuotaUser' +-- +-- * 'mcdgPrettyPrint' +-- +-- * 'mcdgWebPropertyId' +-- +-- * 'mcdgUserIp' +-- +-- * 'mcdgAccountId' +-- +-- * 'mcdgKey' +-- +-- * 'mcdgOauthToken' +-- +-- * 'mcdgCustomDimensionId' +-- +-- * 'mcdgFields' +-- +-- * 'mcdgAlt' +managementCustomDimensionsGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'customDimensionId' + -> ManagementCustomDimensionsGet +managementCustomDimensionsGet pMcdgWebPropertyId_ pMcdgAccountId_ pMcdgCustomDimensionId_ = + ManagementCustomDimensionsGet + { _mcdgQuotaUser = Nothing + , _mcdgPrettyPrint = False + , _mcdgWebPropertyId = pMcdgWebPropertyId_ + , _mcdgUserIp = Nothing + , _mcdgAccountId = pMcdgAccountId_ + , _mcdgKey = Nothing + , _mcdgOauthToken = Nothing + , _mcdgCustomDimensionId = pMcdgCustomDimensionId_ + , _mcdgFields = Nothing + , _mcdgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcdgQuotaUser :: Lens' ManagementCustomDimensionsGet' (Maybe Text) +mcdgQuotaUser + = lens _mcdgQuotaUser + (\ s a -> s{_mcdgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcdgPrettyPrint :: Lens' ManagementCustomDimensionsGet' Bool +mcdgPrettyPrint + = lens _mcdgPrettyPrint + (\ s a -> s{_mcdgPrettyPrint = a}) + +-- | Web property ID for the custom dimension to retrieve. +mcdgWebPropertyId :: Lens' ManagementCustomDimensionsGet' Text +mcdgWebPropertyId + = lens _mcdgWebPropertyId + (\ s a -> s{_mcdgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcdgUserIp :: Lens' ManagementCustomDimensionsGet' (Maybe Text) +mcdgUserIp + = lens _mcdgUserIp (\ s a -> s{_mcdgUserIp = a}) + +-- | Account ID for the custom dimension to retrieve. +mcdgAccountId :: Lens' ManagementCustomDimensionsGet' Text +mcdgAccountId + = lens _mcdgAccountId + (\ s a -> s{_mcdgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcdgKey :: Lens' ManagementCustomDimensionsGet' (Maybe Text) +mcdgKey = lens _mcdgKey (\ s a -> s{_mcdgKey = a}) + +-- | OAuth 2.0 token for the current user. +mcdgOauthToken :: Lens' ManagementCustomDimensionsGet' (Maybe Text) +mcdgOauthToken + = lens _mcdgOauthToken + (\ s a -> s{_mcdgOauthToken = a}) + +-- | The ID of the custom dimension to retrieve. +mcdgCustomDimensionId :: Lens' ManagementCustomDimensionsGet' Text +mcdgCustomDimensionId + = lens _mcdgCustomDimensionId + (\ s a -> s{_mcdgCustomDimensionId = a}) + +-- | Selector specifying which fields to include in a partial response. +mcdgFields :: Lens' ManagementCustomDimensionsGet' (Maybe Text) +mcdgFields + = lens _mcdgFields (\ s a -> s{_mcdgFields = a}) + +-- | Data format for the response. +mcdgAlt :: Lens' ManagementCustomDimensionsGet' Text +mcdgAlt = lens _mcdgAlt (\ s a -> s{_mcdgAlt = a}) + +instance GoogleRequest ManagementCustomDimensionsGet' + where + type Rs ManagementCustomDimensionsGet' = + CustomDimension + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDimensionsGet{..} + = go _mcdgQuotaUser _mcdgPrettyPrint + _mcdgWebPropertyId + _mcdgUserIp + _mcdgAccountId + _mcdgKey + _mcdgOauthToken + _mcdgCustomDimensionId + _mcdgFields + _mcdgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDimensionsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Insert.hs new file mode 100644 index 000000000..e36386af0 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Insert.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDimensions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new custom dimension. +-- +-- /See:/ for @AnalyticsManagementCustomDimensionsInsert@. +module Analytics.Management.CustomDimensions.Insert + ( + -- * REST Resource + ManagementCustomDimensionsInsertAPI + + -- * Creating a Request + , managementCustomDimensionsInsert + , ManagementCustomDimensionsInsert + + -- * Request Lenses + , mcdiQuotaUser + , mcdiPrettyPrint + , mcdiWebPropertyId + , mcdiUserIp + , mcdiAccountId + , mcdiKey + , mcdiOauthToken + , mcdiFields + , mcdiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDimensionsInsert@ which the +-- 'ManagementCustomDimensionsInsert' request conforms to. +type ManagementCustomDimensionsInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDimensions" :> Post '[JSON] CustomDimension + +-- | Create a new custom dimension. +-- +-- /See:/ 'managementCustomDimensionsInsert' smart constructor. +data ManagementCustomDimensionsInsert = ManagementCustomDimensionsInsert + { _mcdiQuotaUser :: !(Maybe Text) + , _mcdiPrettyPrint :: !Bool + , _mcdiWebPropertyId :: !Text + , _mcdiUserIp :: !(Maybe Text) + , _mcdiAccountId :: !Text + , _mcdiKey :: !(Maybe Text) + , _mcdiOauthToken :: !(Maybe Text) + , _mcdiFields :: !(Maybe Text) + , _mcdiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDimensionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcdiQuotaUser' +-- +-- * 'mcdiPrettyPrint' +-- +-- * 'mcdiWebPropertyId' +-- +-- * 'mcdiUserIp' +-- +-- * 'mcdiAccountId' +-- +-- * 'mcdiKey' +-- +-- * 'mcdiOauthToken' +-- +-- * 'mcdiFields' +-- +-- * 'mcdiAlt' +managementCustomDimensionsInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomDimensionsInsert +managementCustomDimensionsInsert pMcdiWebPropertyId_ pMcdiAccountId_ = + ManagementCustomDimensionsInsert + { _mcdiQuotaUser = Nothing + , _mcdiPrettyPrint = False + , _mcdiWebPropertyId = pMcdiWebPropertyId_ + , _mcdiUserIp = Nothing + , _mcdiAccountId = pMcdiAccountId_ + , _mcdiKey = Nothing + , _mcdiOauthToken = Nothing + , _mcdiFields = Nothing + , _mcdiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcdiQuotaUser :: Lens' ManagementCustomDimensionsInsert' (Maybe Text) +mcdiQuotaUser + = lens _mcdiQuotaUser + (\ s a -> s{_mcdiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcdiPrettyPrint :: Lens' ManagementCustomDimensionsInsert' Bool +mcdiPrettyPrint + = lens _mcdiPrettyPrint + (\ s a -> s{_mcdiPrettyPrint = a}) + +-- | Web property ID for the custom dimension to create. +mcdiWebPropertyId :: Lens' ManagementCustomDimensionsInsert' Text +mcdiWebPropertyId + = lens _mcdiWebPropertyId + (\ s a -> s{_mcdiWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcdiUserIp :: Lens' ManagementCustomDimensionsInsert' (Maybe Text) +mcdiUserIp + = lens _mcdiUserIp (\ s a -> s{_mcdiUserIp = a}) + +-- | Account ID for the custom dimension to create. +mcdiAccountId :: Lens' ManagementCustomDimensionsInsert' Text +mcdiAccountId + = lens _mcdiAccountId + (\ s a -> s{_mcdiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcdiKey :: Lens' ManagementCustomDimensionsInsert' (Maybe Text) +mcdiKey = lens _mcdiKey (\ s a -> s{_mcdiKey = a}) + +-- | OAuth 2.0 token for the current user. +mcdiOauthToken :: Lens' ManagementCustomDimensionsInsert' (Maybe Text) +mcdiOauthToken + = lens _mcdiOauthToken + (\ s a -> s{_mcdiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcdiFields :: Lens' ManagementCustomDimensionsInsert' (Maybe Text) +mcdiFields + = lens _mcdiFields (\ s a -> s{_mcdiFields = a}) + +-- | Data format for the response. +mcdiAlt :: Lens' ManagementCustomDimensionsInsert' Text +mcdiAlt = lens _mcdiAlt (\ s a -> s{_mcdiAlt = a}) + +instance GoogleRequest + ManagementCustomDimensionsInsert' where + type Rs ManagementCustomDimensionsInsert' = + CustomDimension + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDimensionsInsert{..} + = go _mcdiQuotaUser _mcdiPrettyPrint + _mcdiWebPropertyId + _mcdiUserIp + _mcdiAccountId + _mcdiKey + _mcdiOauthToken + _mcdiFields + _mcdiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDimensionsInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/List.hs new file mode 100644 index 000000000..3395d9639 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/List.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDimensions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists custom dimensions to which the user has access. +-- +-- /See:/ for @AnalyticsManagementCustomDimensionsList@. +module Analytics.Management.CustomDimensions.List + ( + -- * REST Resource + ManagementCustomDimensionsListAPI + + -- * Creating a Request + , managementCustomDimensionsList + , ManagementCustomDimensionsList + + -- * Request Lenses + , mcdlQuotaUser + , mcdlPrettyPrint + , mcdlWebPropertyId + , mcdlUserIp + , mcdlAccountId + , mcdlKey + , mcdlOauthToken + , mcdlStartIndex + , mcdlMaxResults + , mcdlFields + , mcdlAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDimensionsList@ which the +-- 'ManagementCustomDimensionsList' request conforms to. +type ManagementCustomDimensionsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDimensions" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] CustomDimensions + +-- | Lists custom dimensions to which the user has access. +-- +-- /See:/ 'managementCustomDimensionsList' smart constructor. +data ManagementCustomDimensionsList = ManagementCustomDimensionsList + { _mcdlQuotaUser :: !(Maybe Text) + , _mcdlPrettyPrint :: !Bool + , _mcdlWebPropertyId :: !Text + , _mcdlUserIp :: !(Maybe Text) + , _mcdlAccountId :: !Text + , _mcdlKey :: !(Maybe Text) + , _mcdlOauthToken :: !(Maybe Text) + , _mcdlStartIndex :: !(Maybe Int32) + , _mcdlMaxResults :: !(Maybe Int32) + , _mcdlFields :: !(Maybe Text) + , _mcdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDimensionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcdlQuotaUser' +-- +-- * 'mcdlPrettyPrint' +-- +-- * 'mcdlWebPropertyId' +-- +-- * 'mcdlUserIp' +-- +-- * 'mcdlAccountId' +-- +-- * 'mcdlKey' +-- +-- * 'mcdlOauthToken' +-- +-- * 'mcdlStartIndex' +-- +-- * 'mcdlMaxResults' +-- +-- * 'mcdlFields' +-- +-- * 'mcdlAlt' +managementCustomDimensionsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomDimensionsList +managementCustomDimensionsList pMcdlWebPropertyId_ pMcdlAccountId_ = + ManagementCustomDimensionsList + { _mcdlQuotaUser = Nothing + , _mcdlPrettyPrint = False + , _mcdlWebPropertyId = pMcdlWebPropertyId_ + , _mcdlUserIp = Nothing + , _mcdlAccountId = pMcdlAccountId_ + , _mcdlKey = Nothing + , _mcdlOauthToken = Nothing + , _mcdlStartIndex = Nothing + , _mcdlMaxResults = Nothing + , _mcdlFields = Nothing + , _mcdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcdlQuotaUser :: Lens' ManagementCustomDimensionsList' (Maybe Text) +mcdlQuotaUser + = lens _mcdlQuotaUser + (\ s a -> s{_mcdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcdlPrettyPrint :: Lens' ManagementCustomDimensionsList' Bool +mcdlPrettyPrint + = lens _mcdlPrettyPrint + (\ s a -> s{_mcdlPrettyPrint = a}) + +-- | Web property ID for the custom dimensions to retrieve. +mcdlWebPropertyId :: Lens' ManagementCustomDimensionsList' Text +mcdlWebPropertyId + = lens _mcdlWebPropertyId + (\ s a -> s{_mcdlWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcdlUserIp :: Lens' ManagementCustomDimensionsList' (Maybe Text) +mcdlUserIp + = lens _mcdlUserIp (\ s a -> s{_mcdlUserIp = a}) + +-- | Account ID for the custom dimensions to retrieve. +mcdlAccountId :: Lens' ManagementCustomDimensionsList' Text +mcdlAccountId + = lens _mcdlAccountId + (\ s a -> s{_mcdlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcdlKey :: Lens' ManagementCustomDimensionsList' (Maybe Text) +mcdlKey = lens _mcdlKey (\ s a -> s{_mcdlKey = a}) + +-- | OAuth 2.0 token for the current user. +mcdlOauthToken :: Lens' ManagementCustomDimensionsList' (Maybe Text) +mcdlOauthToken + = lens _mcdlOauthToken + (\ s a -> s{_mcdlOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mcdlStartIndex :: Lens' ManagementCustomDimensionsList' (Maybe Int32) +mcdlStartIndex + = lens _mcdlStartIndex + (\ s a -> s{_mcdlStartIndex = a}) + +-- | The maximum number of custom dimensions to include in this response. +mcdlMaxResults :: Lens' ManagementCustomDimensionsList' (Maybe Int32) +mcdlMaxResults + = lens _mcdlMaxResults + (\ s a -> s{_mcdlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mcdlFields :: Lens' ManagementCustomDimensionsList' (Maybe Text) +mcdlFields + = lens _mcdlFields (\ s a -> s{_mcdlFields = a}) + +-- | Data format for the response. +mcdlAlt :: Lens' ManagementCustomDimensionsList' Text +mcdlAlt = lens _mcdlAlt (\ s a -> s{_mcdlAlt = a}) + +instance GoogleRequest + ManagementCustomDimensionsList' where + type Rs ManagementCustomDimensionsList' = + CustomDimensions + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDimensionsList{..} + = go _mcdlQuotaUser _mcdlPrettyPrint + _mcdlWebPropertyId + _mcdlUserIp + _mcdlAccountId + _mcdlKey + _mcdlOauthToken + _mcdlStartIndex + _mcdlMaxResults + _mcdlFields + _mcdlAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDimensionsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Patch.hs new file mode 100644 index 000000000..a8c909d99 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Patch.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDimensions.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing custom dimension. This method supports patch +-- semantics. +-- +-- /See:/ for @AnalyticsManagementCustomDimensionsPatch@. +module Analytics.Management.CustomDimensions.Patch + ( + -- * REST Resource + ManagementCustomDimensionsPatchAPI + + -- * Creating a Request + , managementCustomDimensionsPatch + , ManagementCustomDimensionsPatch + + -- * Request Lenses + , mcdpQuotaUser + , mcdpPrettyPrint + , mcdpWebPropertyId + , mcdpIgnoreCustomDataSourceLinks + , mcdpUserIp + , mcdpAccountId + , mcdpKey + , mcdpOauthToken + , mcdpCustomDimensionId + , mcdpFields + , mcdpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDimensionsPatch@ which the +-- 'ManagementCustomDimensionsPatch' request conforms to. +type ManagementCustomDimensionsPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDimensions" :> + Capture "customDimensionId" Text :> + QueryParam "ignoreCustomDataSourceLinks" Bool :> + Patch '[JSON] CustomDimension + +-- | Updates an existing custom dimension. This method supports patch +-- semantics. +-- +-- /See:/ 'managementCustomDimensionsPatch' smart constructor. +data ManagementCustomDimensionsPatch = ManagementCustomDimensionsPatch + { _mcdpQuotaUser :: !(Maybe Text) + , _mcdpPrettyPrint :: !Bool + , _mcdpWebPropertyId :: !Text + , _mcdpIgnoreCustomDataSourceLinks :: !Bool + , _mcdpUserIp :: !(Maybe Text) + , _mcdpAccountId :: !Text + , _mcdpKey :: !(Maybe Text) + , _mcdpOauthToken :: !(Maybe Text) + , _mcdpCustomDimensionId :: !Text + , _mcdpFields :: !(Maybe Text) + , _mcdpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDimensionsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcdpQuotaUser' +-- +-- * 'mcdpPrettyPrint' +-- +-- * 'mcdpWebPropertyId' +-- +-- * 'mcdpIgnoreCustomDataSourceLinks' +-- +-- * 'mcdpUserIp' +-- +-- * 'mcdpAccountId' +-- +-- * 'mcdpKey' +-- +-- * 'mcdpOauthToken' +-- +-- * 'mcdpCustomDimensionId' +-- +-- * 'mcdpFields' +-- +-- * 'mcdpAlt' +managementCustomDimensionsPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'customDimensionId' + -> ManagementCustomDimensionsPatch +managementCustomDimensionsPatch pMcdpWebPropertyId_ pMcdpAccountId_ pMcdpCustomDimensionId_ = + ManagementCustomDimensionsPatch + { _mcdpQuotaUser = Nothing + , _mcdpPrettyPrint = False + , _mcdpWebPropertyId = pMcdpWebPropertyId_ + , _mcdpIgnoreCustomDataSourceLinks = False + , _mcdpUserIp = Nothing + , _mcdpAccountId = pMcdpAccountId_ + , _mcdpKey = Nothing + , _mcdpOauthToken = Nothing + , _mcdpCustomDimensionId = pMcdpCustomDimensionId_ + , _mcdpFields = Nothing + , _mcdpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcdpQuotaUser :: Lens' ManagementCustomDimensionsPatch' (Maybe Text) +mcdpQuotaUser + = lens _mcdpQuotaUser + (\ s a -> s{_mcdpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcdpPrettyPrint :: Lens' ManagementCustomDimensionsPatch' Bool +mcdpPrettyPrint + = lens _mcdpPrettyPrint + (\ s a -> s{_mcdpPrettyPrint = a}) + +-- | Web property ID for the custom dimension to update. +mcdpWebPropertyId :: Lens' ManagementCustomDimensionsPatch' Text +mcdpWebPropertyId + = lens _mcdpWebPropertyId + (\ s a -> s{_mcdpWebPropertyId = a}) + +-- | Force the update and ignore any warnings related to the custom dimension +-- being linked to a custom data source \/ data set. +mcdpIgnoreCustomDataSourceLinks :: Lens' ManagementCustomDimensionsPatch' Bool +mcdpIgnoreCustomDataSourceLinks + = lens _mcdpIgnoreCustomDataSourceLinks + (\ s a -> s{_mcdpIgnoreCustomDataSourceLinks = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcdpUserIp :: Lens' ManagementCustomDimensionsPatch' (Maybe Text) +mcdpUserIp + = lens _mcdpUserIp (\ s a -> s{_mcdpUserIp = a}) + +-- | Account ID for the custom dimension to update. +mcdpAccountId :: Lens' ManagementCustomDimensionsPatch' Text +mcdpAccountId + = lens _mcdpAccountId + (\ s a -> s{_mcdpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcdpKey :: Lens' ManagementCustomDimensionsPatch' (Maybe Text) +mcdpKey = lens _mcdpKey (\ s a -> s{_mcdpKey = a}) + +-- | OAuth 2.0 token for the current user. +mcdpOauthToken :: Lens' ManagementCustomDimensionsPatch' (Maybe Text) +mcdpOauthToken + = lens _mcdpOauthToken + (\ s a -> s{_mcdpOauthToken = a}) + +-- | Custom dimension ID for the custom dimension to update. +mcdpCustomDimensionId :: Lens' ManagementCustomDimensionsPatch' Text +mcdpCustomDimensionId + = lens _mcdpCustomDimensionId + (\ s a -> s{_mcdpCustomDimensionId = a}) + +-- | Selector specifying which fields to include in a partial response. +mcdpFields :: Lens' ManagementCustomDimensionsPatch' (Maybe Text) +mcdpFields + = lens _mcdpFields (\ s a -> s{_mcdpFields = a}) + +-- | Data format for the response. +mcdpAlt :: Lens' ManagementCustomDimensionsPatch' Text +mcdpAlt = lens _mcdpAlt (\ s a -> s{_mcdpAlt = a}) + +instance GoogleRequest + ManagementCustomDimensionsPatch' where + type Rs ManagementCustomDimensionsPatch' = + CustomDimension + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDimensionsPatch{..} + = go _mcdpQuotaUser _mcdpPrettyPrint + _mcdpWebPropertyId + (Just _mcdpIgnoreCustomDataSourceLinks) + _mcdpUserIp + _mcdpAccountId + _mcdpKey + _mcdpOauthToken + _mcdpCustomDimensionId + _mcdpFields + _mcdpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDimensionsPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Update.hs new file mode 100644 index 000000000..88a6809ad --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomDimensions/Update.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomDimensions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing custom dimension. +-- +-- /See:/ for @AnalyticsManagementCustomDimensionsUpdate@. +module Analytics.Management.CustomDimensions.Update + ( + -- * REST Resource + ManagementCustomDimensionsUpdateAPI + + -- * Creating a Request + , managementCustomDimensionsUpdate + , ManagementCustomDimensionsUpdate + + -- * Request Lenses + , mcduQuotaUser + , mcduPrettyPrint + , mcduWebPropertyId + , mcduIgnoreCustomDataSourceLinks + , mcduUserIp + , mcduAccountId + , mcduKey + , mcduOauthToken + , mcduCustomDimensionId + , mcduFields + , mcduAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomDimensionsUpdate@ which the +-- 'ManagementCustomDimensionsUpdate' request conforms to. +type ManagementCustomDimensionsUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDimensions" :> + Capture "customDimensionId" Text :> + QueryParam "ignoreCustomDataSourceLinks" Bool :> + Put '[JSON] CustomDimension + +-- | Updates an existing custom dimension. +-- +-- /See:/ 'managementCustomDimensionsUpdate' smart constructor. +data ManagementCustomDimensionsUpdate = ManagementCustomDimensionsUpdate + { _mcduQuotaUser :: !(Maybe Text) + , _mcduPrettyPrint :: !Bool + , _mcduWebPropertyId :: !Text + , _mcduIgnoreCustomDataSourceLinks :: !Bool + , _mcduUserIp :: !(Maybe Text) + , _mcduAccountId :: !Text + , _mcduKey :: !(Maybe Text) + , _mcduOauthToken :: !(Maybe Text) + , _mcduCustomDimensionId :: !Text + , _mcduFields :: !(Maybe Text) + , _mcduAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomDimensionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcduQuotaUser' +-- +-- * 'mcduPrettyPrint' +-- +-- * 'mcduWebPropertyId' +-- +-- * 'mcduIgnoreCustomDataSourceLinks' +-- +-- * 'mcduUserIp' +-- +-- * 'mcduAccountId' +-- +-- * 'mcduKey' +-- +-- * 'mcduOauthToken' +-- +-- * 'mcduCustomDimensionId' +-- +-- * 'mcduFields' +-- +-- * 'mcduAlt' +managementCustomDimensionsUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'customDimensionId' + -> ManagementCustomDimensionsUpdate +managementCustomDimensionsUpdate pMcduWebPropertyId_ pMcduAccountId_ pMcduCustomDimensionId_ = + ManagementCustomDimensionsUpdate + { _mcduQuotaUser = Nothing + , _mcduPrettyPrint = False + , _mcduWebPropertyId = pMcduWebPropertyId_ + , _mcduIgnoreCustomDataSourceLinks = False + , _mcduUserIp = Nothing + , _mcduAccountId = pMcduAccountId_ + , _mcduKey = Nothing + , _mcduOauthToken = Nothing + , _mcduCustomDimensionId = pMcduCustomDimensionId_ + , _mcduFields = Nothing + , _mcduAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcduQuotaUser :: Lens' ManagementCustomDimensionsUpdate' (Maybe Text) +mcduQuotaUser + = lens _mcduQuotaUser + (\ s a -> s{_mcduQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcduPrettyPrint :: Lens' ManagementCustomDimensionsUpdate' Bool +mcduPrettyPrint + = lens _mcduPrettyPrint + (\ s a -> s{_mcduPrettyPrint = a}) + +-- | Web property ID for the custom dimension to update. +mcduWebPropertyId :: Lens' ManagementCustomDimensionsUpdate' Text +mcduWebPropertyId + = lens _mcduWebPropertyId + (\ s a -> s{_mcduWebPropertyId = a}) + +-- | Force the update and ignore any warnings related to the custom dimension +-- being linked to a custom data source \/ data set. +mcduIgnoreCustomDataSourceLinks :: Lens' ManagementCustomDimensionsUpdate' Bool +mcduIgnoreCustomDataSourceLinks + = lens _mcduIgnoreCustomDataSourceLinks + (\ s a -> s{_mcduIgnoreCustomDataSourceLinks = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcduUserIp :: Lens' ManagementCustomDimensionsUpdate' (Maybe Text) +mcduUserIp + = lens _mcduUserIp (\ s a -> s{_mcduUserIp = a}) + +-- | Account ID for the custom dimension to update. +mcduAccountId :: Lens' ManagementCustomDimensionsUpdate' Text +mcduAccountId + = lens _mcduAccountId + (\ s a -> s{_mcduAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcduKey :: Lens' ManagementCustomDimensionsUpdate' (Maybe Text) +mcduKey = lens _mcduKey (\ s a -> s{_mcduKey = a}) + +-- | OAuth 2.0 token for the current user. +mcduOauthToken :: Lens' ManagementCustomDimensionsUpdate' (Maybe Text) +mcduOauthToken + = lens _mcduOauthToken + (\ s a -> s{_mcduOauthToken = a}) + +-- | Custom dimension ID for the custom dimension to update. +mcduCustomDimensionId :: Lens' ManagementCustomDimensionsUpdate' Text +mcduCustomDimensionId + = lens _mcduCustomDimensionId + (\ s a -> s{_mcduCustomDimensionId = a}) + +-- | Selector specifying which fields to include in a partial response. +mcduFields :: Lens' ManagementCustomDimensionsUpdate' (Maybe Text) +mcduFields + = lens _mcduFields (\ s a -> s{_mcduFields = a}) + +-- | Data format for the response. +mcduAlt :: Lens' ManagementCustomDimensionsUpdate' Text +mcduAlt = lens _mcduAlt (\ s a -> s{_mcduAlt = a}) + +instance GoogleRequest + ManagementCustomDimensionsUpdate' where + type Rs ManagementCustomDimensionsUpdate' = + CustomDimension + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomDimensionsUpdate{..} + = go _mcduQuotaUser _mcduPrettyPrint + _mcduWebPropertyId + (Just _mcduIgnoreCustomDataSourceLinks) + _mcduUserIp + _mcduAccountId + _mcduKey + _mcduOauthToken + _mcduCustomDimensionId + _mcduFields + _mcduAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomDimensionsUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Get.hs new file mode 100644 index 000000000..d45d91308 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Get.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomMetrics.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a custom metric to which the user has access. +-- +-- /See:/ for @AnalyticsManagementCustomMetricsGet@. +module Analytics.Management.CustomMetrics.Get + ( + -- * REST Resource + ManagementCustomMetricsGetAPI + + -- * Creating a Request + , managementCustomMetricsGet + , ManagementCustomMetricsGet + + -- * Request Lenses + , mcmgQuotaUser + , mcmgPrettyPrint + , mcmgCustomMetricId + , mcmgWebPropertyId + , mcmgUserIp + , mcmgAccountId + , mcmgKey + , mcmgOauthToken + , mcmgFields + , mcmgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomMetricsGet@ which the +-- 'ManagementCustomMetricsGet' request conforms to. +type ManagementCustomMetricsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customMetrics" :> + Capture "customMetricId" Text :> + Get '[JSON] CustomMetric + +-- | Get a custom metric to which the user has access. +-- +-- /See:/ 'managementCustomMetricsGet' smart constructor. +data ManagementCustomMetricsGet = ManagementCustomMetricsGet + { _mcmgQuotaUser :: !(Maybe Text) + , _mcmgPrettyPrint :: !Bool + , _mcmgCustomMetricId :: !Text + , _mcmgWebPropertyId :: !Text + , _mcmgUserIp :: !(Maybe Text) + , _mcmgAccountId :: !Text + , _mcmgKey :: !(Maybe Text) + , _mcmgOauthToken :: !(Maybe Text) + , _mcmgFields :: !(Maybe Text) + , _mcmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomMetricsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcmgQuotaUser' +-- +-- * 'mcmgPrettyPrint' +-- +-- * 'mcmgCustomMetricId' +-- +-- * 'mcmgWebPropertyId' +-- +-- * 'mcmgUserIp' +-- +-- * 'mcmgAccountId' +-- +-- * 'mcmgKey' +-- +-- * 'mcmgOauthToken' +-- +-- * 'mcmgFields' +-- +-- * 'mcmgAlt' +managementCustomMetricsGet + :: Text -- ^ 'customMetricId' + -> Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomMetricsGet +managementCustomMetricsGet pMcmgCustomMetricId_ pMcmgWebPropertyId_ pMcmgAccountId_ = + ManagementCustomMetricsGet + { _mcmgQuotaUser = Nothing + , _mcmgPrettyPrint = False + , _mcmgCustomMetricId = pMcmgCustomMetricId_ + , _mcmgWebPropertyId = pMcmgWebPropertyId_ + , _mcmgUserIp = Nothing + , _mcmgAccountId = pMcmgAccountId_ + , _mcmgKey = Nothing + , _mcmgOauthToken = Nothing + , _mcmgFields = Nothing + , _mcmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcmgQuotaUser :: Lens' ManagementCustomMetricsGet' (Maybe Text) +mcmgQuotaUser + = lens _mcmgQuotaUser + (\ s a -> s{_mcmgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcmgPrettyPrint :: Lens' ManagementCustomMetricsGet' Bool +mcmgPrettyPrint + = lens _mcmgPrettyPrint + (\ s a -> s{_mcmgPrettyPrint = a}) + +-- | The ID of the custom metric to retrieve. +mcmgCustomMetricId :: Lens' ManagementCustomMetricsGet' Text +mcmgCustomMetricId + = lens _mcmgCustomMetricId + (\ s a -> s{_mcmgCustomMetricId = a}) + +-- | Web property ID for the custom metric to retrieve. +mcmgWebPropertyId :: Lens' ManagementCustomMetricsGet' Text +mcmgWebPropertyId + = lens _mcmgWebPropertyId + (\ s a -> s{_mcmgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcmgUserIp :: Lens' ManagementCustomMetricsGet' (Maybe Text) +mcmgUserIp + = lens _mcmgUserIp (\ s a -> s{_mcmgUserIp = a}) + +-- | Account ID for the custom metric to retrieve. +mcmgAccountId :: Lens' ManagementCustomMetricsGet' Text +mcmgAccountId + = lens _mcmgAccountId + (\ s a -> s{_mcmgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcmgKey :: Lens' ManagementCustomMetricsGet' (Maybe Text) +mcmgKey = lens _mcmgKey (\ s a -> s{_mcmgKey = a}) + +-- | OAuth 2.0 token for the current user. +mcmgOauthToken :: Lens' ManagementCustomMetricsGet' (Maybe Text) +mcmgOauthToken + = lens _mcmgOauthToken + (\ s a -> s{_mcmgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcmgFields :: Lens' ManagementCustomMetricsGet' (Maybe Text) +mcmgFields + = lens _mcmgFields (\ s a -> s{_mcmgFields = a}) + +-- | Data format for the response. +mcmgAlt :: Lens' ManagementCustomMetricsGet' Text +mcmgAlt = lens _mcmgAlt (\ s a -> s{_mcmgAlt = a}) + +instance GoogleRequest ManagementCustomMetricsGet' + where + type Rs ManagementCustomMetricsGet' = CustomMetric + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementCustomMetricsGet{..} + = go _mcmgQuotaUser _mcmgPrettyPrint + _mcmgCustomMetricId + _mcmgWebPropertyId + _mcmgUserIp + _mcmgAccountId + _mcmgKey + _mcmgOauthToken + _mcmgFields + _mcmgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomMetricsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Insert.hs new file mode 100644 index 000000000..5ef8c8f4d --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Insert.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomMetrics.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new custom metric. +-- +-- /See:/ for @AnalyticsManagementCustomMetricsInsert@. +module Analytics.Management.CustomMetrics.Insert + ( + -- * REST Resource + ManagementCustomMetricsInsertAPI + + -- * Creating a Request + , managementCustomMetricsInsert + , ManagementCustomMetricsInsert + + -- * Request Lenses + , mcmiQuotaUser + , mcmiPrettyPrint + , mcmiWebPropertyId + , mcmiUserIp + , mcmiAccountId + , mcmiKey + , mcmiOauthToken + , mcmiFields + , mcmiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomMetricsInsert@ which the +-- 'ManagementCustomMetricsInsert' request conforms to. +type ManagementCustomMetricsInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customMetrics" :> Post '[JSON] CustomMetric + +-- | Create a new custom metric. +-- +-- /See:/ 'managementCustomMetricsInsert' smart constructor. +data ManagementCustomMetricsInsert = ManagementCustomMetricsInsert + { _mcmiQuotaUser :: !(Maybe Text) + , _mcmiPrettyPrint :: !Bool + , _mcmiWebPropertyId :: !Text + , _mcmiUserIp :: !(Maybe Text) + , _mcmiAccountId :: !Text + , _mcmiKey :: !(Maybe Text) + , _mcmiOauthToken :: !(Maybe Text) + , _mcmiFields :: !(Maybe Text) + , _mcmiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomMetricsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcmiQuotaUser' +-- +-- * 'mcmiPrettyPrint' +-- +-- * 'mcmiWebPropertyId' +-- +-- * 'mcmiUserIp' +-- +-- * 'mcmiAccountId' +-- +-- * 'mcmiKey' +-- +-- * 'mcmiOauthToken' +-- +-- * 'mcmiFields' +-- +-- * 'mcmiAlt' +managementCustomMetricsInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomMetricsInsert +managementCustomMetricsInsert pMcmiWebPropertyId_ pMcmiAccountId_ = + ManagementCustomMetricsInsert + { _mcmiQuotaUser = Nothing + , _mcmiPrettyPrint = False + , _mcmiWebPropertyId = pMcmiWebPropertyId_ + , _mcmiUserIp = Nothing + , _mcmiAccountId = pMcmiAccountId_ + , _mcmiKey = Nothing + , _mcmiOauthToken = Nothing + , _mcmiFields = Nothing + , _mcmiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcmiQuotaUser :: Lens' ManagementCustomMetricsInsert' (Maybe Text) +mcmiQuotaUser + = lens _mcmiQuotaUser + (\ s a -> s{_mcmiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcmiPrettyPrint :: Lens' ManagementCustomMetricsInsert' Bool +mcmiPrettyPrint + = lens _mcmiPrettyPrint + (\ s a -> s{_mcmiPrettyPrint = a}) + +-- | Web property ID for the custom dimension to create. +mcmiWebPropertyId :: Lens' ManagementCustomMetricsInsert' Text +mcmiWebPropertyId + = lens _mcmiWebPropertyId + (\ s a -> s{_mcmiWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcmiUserIp :: Lens' ManagementCustomMetricsInsert' (Maybe Text) +mcmiUserIp + = lens _mcmiUserIp (\ s a -> s{_mcmiUserIp = a}) + +-- | Account ID for the custom metric to create. +mcmiAccountId :: Lens' ManagementCustomMetricsInsert' Text +mcmiAccountId + = lens _mcmiAccountId + (\ s a -> s{_mcmiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcmiKey :: Lens' ManagementCustomMetricsInsert' (Maybe Text) +mcmiKey = lens _mcmiKey (\ s a -> s{_mcmiKey = a}) + +-- | OAuth 2.0 token for the current user. +mcmiOauthToken :: Lens' ManagementCustomMetricsInsert' (Maybe Text) +mcmiOauthToken + = lens _mcmiOauthToken + (\ s a -> s{_mcmiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcmiFields :: Lens' ManagementCustomMetricsInsert' (Maybe Text) +mcmiFields + = lens _mcmiFields (\ s a -> s{_mcmiFields = a}) + +-- | Data format for the response. +mcmiAlt :: Lens' ManagementCustomMetricsInsert' Text +mcmiAlt = lens _mcmiAlt (\ s a -> s{_mcmiAlt = a}) + +instance GoogleRequest ManagementCustomMetricsInsert' + where + type Rs ManagementCustomMetricsInsert' = CustomMetric + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomMetricsInsert{..} + = go _mcmiQuotaUser _mcmiPrettyPrint + _mcmiWebPropertyId + _mcmiUserIp + _mcmiAccountId + _mcmiKey + _mcmiOauthToken + _mcmiFields + _mcmiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomMetricsInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/List.hs new file mode 100644 index 000000000..ed07652cd --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/List.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomMetrics.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists custom metrics to which the user has access. +-- +-- /See:/ for @AnalyticsManagementCustomMetricsList@. +module Analytics.Management.CustomMetrics.List + ( + -- * REST Resource + ManagementCustomMetricsListAPI + + -- * Creating a Request + , managementCustomMetricsList + , ManagementCustomMetricsList + + -- * Request Lenses + , mcmlQuotaUser + , mcmlPrettyPrint + , mcmlWebPropertyId + , mcmlUserIp + , mcmlAccountId + , mcmlKey + , mcmlOauthToken + , mcmlStartIndex + , mcmlMaxResults + , mcmlFields + , mcmlAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomMetricsList@ which the +-- 'ManagementCustomMetricsList' request conforms to. +type ManagementCustomMetricsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customMetrics" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] CustomMetrics + +-- | Lists custom metrics to which the user has access. +-- +-- /See:/ 'managementCustomMetricsList' smart constructor. +data ManagementCustomMetricsList = ManagementCustomMetricsList + { _mcmlQuotaUser :: !(Maybe Text) + , _mcmlPrettyPrint :: !Bool + , _mcmlWebPropertyId :: !Text + , _mcmlUserIp :: !(Maybe Text) + , _mcmlAccountId :: !Text + , _mcmlKey :: !(Maybe Text) + , _mcmlOauthToken :: !(Maybe Text) + , _mcmlStartIndex :: !(Maybe Int32) + , _mcmlMaxResults :: !(Maybe Int32) + , _mcmlFields :: !(Maybe Text) + , _mcmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomMetricsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcmlQuotaUser' +-- +-- * 'mcmlPrettyPrint' +-- +-- * 'mcmlWebPropertyId' +-- +-- * 'mcmlUserIp' +-- +-- * 'mcmlAccountId' +-- +-- * 'mcmlKey' +-- +-- * 'mcmlOauthToken' +-- +-- * 'mcmlStartIndex' +-- +-- * 'mcmlMaxResults' +-- +-- * 'mcmlFields' +-- +-- * 'mcmlAlt' +managementCustomMetricsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomMetricsList +managementCustomMetricsList pMcmlWebPropertyId_ pMcmlAccountId_ = + ManagementCustomMetricsList + { _mcmlQuotaUser = Nothing + , _mcmlPrettyPrint = False + , _mcmlWebPropertyId = pMcmlWebPropertyId_ + , _mcmlUserIp = Nothing + , _mcmlAccountId = pMcmlAccountId_ + , _mcmlKey = Nothing + , _mcmlOauthToken = Nothing + , _mcmlStartIndex = Nothing + , _mcmlMaxResults = Nothing + , _mcmlFields = Nothing + , _mcmlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcmlQuotaUser :: Lens' ManagementCustomMetricsList' (Maybe Text) +mcmlQuotaUser + = lens _mcmlQuotaUser + (\ s a -> s{_mcmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcmlPrettyPrint :: Lens' ManagementCustomMetricsList' Bool +mcmlPrettyPrint + = lens _mcmlPrettyPrint + (\ s a -> s{_mcmlPrettyPrint = a}) + +-- | Web property ID for the custom metrics to retrieve. +mcmlWebPropertyId :: Lens' ManagementCustomMetricsList' Text +mcmlWebPropertyId + = lens _mcmlWebPropertyId + (\ s a -> s{_mcmlWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcmlUserIp :: Lens' ManagementCustomMetricsList' (Maybe Text) +mcmlUserIp + = lens _mcmlUserIp (\ s a -> s{_mcmlUserIp = a}) + +-- | Account ID for the custom metrics to retrieve. +mcmlAccountId :: Lens' ManagementCustomMetricsList' Text +mcmlAccountId + = lens _mcmlAccountId + (\ s a -> s{_mcmlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcmlKey :: Lens' ManagementCustomMetricsList' (Maybe Text) +mcmlKey = lens _mcmlKey (\ s a -> s{_mcmlKey = a}) + +-- | OAuth 2.0 token for the current user. +mcmlOauthToken :: Lens' ManagementCustomMetricsList' (Maybe Text) +mcmlOauthToken + = lens _mcmlOauthToken + (\ s a -> s{_mcmlOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mcmlStartIndex :: Lens' ManagementCustomMetricsList' (Maybe Int32) +mcmlStartIndex + = lens _mcmlStartIndex + (\ s a -> s{_mcmlStartIndex = a}) + +-- | The maximum number of custom metrics to include in this response. +mcmlMaxResults :: Lens' ManagementCustomMetricsList' (Maybe Int32) +mcmlMaxResults + = lens _mcmlMaxResults + (\ s a -> s{_mcmlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mcmlFields :: Lens' ManagementCustomMetricsList' (Maybe Text) +mcmlFields + = lens _mcmlFields (\ s a -> s{_mcmlFields = a}) + +-- | Data format for the response. +mcmlAlt :: Lens' ManagementCustomMetricsList' Text +mcmlAlt = lens _mcmlAlt (\ s a -> s{_mcmlAlt = a}) + +instance GoogleRequest ManagementCustomMetricsList' + where + type Rs ManagementCustomMetricsList' = CustomMetrics + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementCustomMetricsList{..} + = go _mcmlQuotaUser _mcmlPrettyPrint + _mcmlWebPropertyId + _mcmlUserIp + _mcmlAccountId + _mcmlKey + _mcmlOauthToken + _mcmlStartIndex + _mcmlMaxResults + _mcmlFields + _mcmlAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomMetricsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Patch.hs new file mode 100644 index 000000000..e39e62474 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Patch.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomMetrics.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing custom metric. This method supports patch semantics. +-- +-- /See:/ for @AnalyticsManagementCustomMetricsPatch@. +module Analytics.Management.CustomMetrics.Patch + ( + -- * REST Resource + ManagementCustomMetricsPatchAPI + + -- * Creating a Request + , managementCustomMetricsPatch + , ManagementCustomMetricsPatch + + -- * Request Lenses + , mcmpQuotaUser + , mcmpPrettyPrint + , mcmpCustomMetricId + , mcmpWebPropertyId + , mcmpIgnoreCustomDataSourceLinks + , mcmpUserIp + , mcmpAccountId + , mcmpKey + , mcmpOauthToken + , mcmpFields + , mcmpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomMetricsPatch@ which the +-- 'ManagementCustomMetricsPatch' request conforms to. +type ManagementCustomMetricsPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customMetrics" :> + Capture "customMetricId" Text :> + QueryParam "ignoreCustomDataSourceLinks" Bool :> + Patch '[JSON] CustomMetric + +-- | Updates an existing custom metric. This method supports patch semantics. +-- +-- /See:/ 'managementCustomMetricsPatch' smart constructor. +data ManagementCustomMetricsPatch = ManagementCustomMetricsPatch + { _mcmpQuotaUser :: !(Maybe Text) + , _mcmpPrettyPrint :: !Bool + , _mcmpCustomMetricId :: !Text + , _mcmpWebPropertyId :: !Text + , _mcmpIgnoreCustomDataSourceLinks :: !Bool + , _mcmpUserIp :: !(Maybe Text) + , _mcmpAccountId :: !Text + , _mcmpKey :: !(Maybe Text) + , _mcmpOauthToken :: !(Maybe Text) + , _mcmpFields :: !(Maybe Text) + , _mcmpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomMetricsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcmpQuotaUser' +-- +-- * 'mcmpPrettyPrint' +-- +-- * 'mcmpCustomMetricId' +-- +-- * 'mcmpWebPropertyId' +-- +-- * 'mcmpIgnoreCustomDataSourceLinks' +-- +-- * 'mcmpUserIp' +-- +-- * 'mcmpAccountId' +-- +-- * 'mcmpKey' +-- +-- * 'mcmpOauthToken' +-- +-- * 'mcmpFields' +-- +-- * 'mcmpAlt' +managementCustomMetricsPatch + :: Text -- ^ 'customMetricId' + -> Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomMetricsPatch +managementCustomMetricsPatch pMcmpCustomMetricId_ pMcmpWebPropertyId_ pMcmpAccountId_ = + ManagementCustomMetricsPatch + { _mcmpQuotaUser = Nothing + , _mcmpPrettyPrint = False + , _mcmpCustomMetricId = pMcmpCustomMetricId_ + , _mcmpWebPropertyId = pMcmpWebPropertyId_ + , _mcmpIgnoreCustomDataSourceLinks = False + , _mcmpUserIp = Nothing + , _mcmpAccountId = pMcmpAccountId_ + , _mcmpKey = Nothing + , _mcmpOauthToken = Nothing + , _mcmpFields = Nothing + , _mcmpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcmpQuotaUser :: Lens' ManagementCustomMetricsPatch' (Maybe Text) +mcmpQuotaUser + = lens _mcmpQuotaUser + (\ s a -> s{_mcmpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcmpPrettyPrint :: Lens' ManagementCustomMetricsPatch' Bool +mcmpPrettyPrint + = lens _mcmpPrettyPrint + (\ s a -> s{_mcmpPrettyPrint = a}) + +-- | Custom metric ID for the custom metric to update. +mcmpCustomMetricId :: Lens' ManagementCustomMetricsPatch' Text +mcmpCustomMetricId + = lens _mcmpCustomMetricId + (\ s a -> s{_mcmpCustomMetricId = a}) + +-- | Web property ID for the custom metric to update. +mcmpWebPropertyId :: Lens' ManagementCustomMetricsPatch' Text +mcmpWebPropertyId + = lens _mcmpWebPropertyId + (\ s a -> s{_mcmpWebPropertyId = a}) + +-- | Force the update and ignore any warnings related to the custom metric +-- being linked to a custom data source \/ data set. +mcmpIgnoreCustomDataSourceLinks :: Lens' ManagementCustomMetricsPatch' Bool +mcmpIgnoreCustomDataSourceLinks + = lens _mcmpIgnoreCustomDataSourceLinks + (\ s a -> s{_mcmpIgnoreCustomDataSourceLinks = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcmpUserIp :: Lens' ManagementCustomMetricsPatch' (Maybe Text) +mcmpUserIp + = lens _mcmpUserIp (\ s a -> s{_mcmpUserIp = a}) + +-- | Account ID for the custom metric to update. +mcmpAccountId :: Lens' ManagementCustomMetricsPatch' Text +mcmpAccountId + = lens _mcmpAccountId + (\ s a -> s{_mcmpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcmpKey :: Lens' ManagementCustomMetricsPatch' (Maybe Text) +mcmpKey = lens _mcmpKey (\ s a -> s{_mcmpKey = a}) + +-- | OAuth 2.0 token for the current user. +mcmpOauthToken :: Lens' ManagementCustomMetricsPatch' (Maybe Text) +mcmpOauthToken + = lens _mcmpOauthToken + (\ s a -> s{_mcmpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcmpFields :: Lens' ManagementCustomMetricsPatch' (Maybe Text) +mcmpFields + = lens _mcmpFields (\ s a -> s{_mcmpFields = a}) + +-- | Data format for the response. +mcmpAlt :: Lens' ManagementCustomMetricsPatch' Text +mcmpAlt = lens _mcmpAlt (\ s a -> s{_mcmpAlt = a}) + +instance GoogleRequest ManagementCustomMetricsPatch' + where + type Rs ManagementCustomMetricsPatch' = CustomMetric + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementCustomMetricsPatch{..} + = go _mcmpQuotaUser _mcmpPrettyPrint + _mcmpCustomMetricId + _mcmpWebPropertyId + (Just _mcmpIgnoreCustomDataSourceLinks) + _mcmpUserIp + _mcmpAccountId + _mcmpKey + _mcmpOauthToken + _mcmpFields + _mcmpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomMetricsPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Update.hs new file mode 100644 index 000000000..390625c2b --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/CustomMetrics/Update.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.CustomMetrics.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing custom metric. +-- +-- /See:/ for @AnalyticsManagementCustomMetricsUpdate@. +module Analytics.Management.CustomMetrics.Update + ( + -- * REST Resource + ManagementCustomMetricsUpdateAPI + + -- * Creating a Request + , managementCustomMetricsUpdate + , ManagementCustomMetricsUpdate + + -- * Request Lenses + , mcmuQuotaUser + , mcmuPrettyPrint + , mcmuCustomMetricId + , mcmuWebPropertyId + , mcmuIgnoreCustomDataSourceLinks + , mcmuUserIp + , mcmuAccountId + , mcmuKey + , mcmuOauthToken + , mcmuFields + , mcmuAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementCustomMetricsUpdate@ which the +-- 'ManagementCustomMetricsUpdate' request conforms to. +type ManagementCustomMetricsUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customMetrics" :> + Capture "customMetricId" Text :> + QueryParam "ignoreCustomDataSourceLinks" Bool :> + Put '[JSON] CustomMetric + +-- | Updates an existing custom metric. +-- +-- /See:/ 'managementCustomMetricsUpdate' smart constructor. +data ManagementCustomMetricsUpdate = ManagementCustomMetricsUpdate + { _mcmuQuotaUser :: !(Maybe Text) + , _mcmuPrettyPrint :: !Bool + , _mcmuCustomMetricId :: !Text + , _mcmuWebPropertyId :: !Text + , _mcmuIgnoreCustomDataSourceLinks :: !Bool + , _mcmuUserIp :: !(Maybe Text) + , _mcmuAccountId :: !Text + , _mcmuKey :: !(Maybe Text) + , _mcmuOauthToken :: !(Maybe Text) + , _mcmuFields :: !(Maybe Text) + , _mcmuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementCustomMetricsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcmuQuotaUser' +-- +-- * 'mcmuPrettyPrint' +-- +-- * 'mcmuCustomMetricId' +-- +-- * 'mcmuWebPropertyId' +-- +-- * 'mcmuIgnoreCustomDataSourceLinks' +-- +-- * 'mcmuUserIp' +-- +-- * 'mcmuAccountId' +-- +-- * 'mcmuKey' +-- +-- * 'mcmuOauthToken' +-- +-- * 'mcmuFields' +-- +-- * 'mcmuAlt' +managementCustomMetricsUpdate + :: Text -- ^ 'customMetricId' + -> Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementCustomMetricsUpdate +managementCustomMetricsUpdate pMcmuCustomMetricId_ pMcmuWebPropertyId_ pMcmuAccountId_ = + ManagementCustomMetricsUpdate + { _mcmuQuotaUser = Nothing + , _mcmuPrettyPrint = False + , _mcmuCustomMetricId = pMcmuCustomMetricId_ + , _mcmuWebPropertyId = pMcmuWebPropertyId_ + , _mcmuIgnoreCustomDataSourceLinks = False + , _mcmuUserIp = Nothing + , _mcmuAccountId = pMcmuAccountId_ + , _mcmuKey = Nothing + , _mcmuOauthToken = Nothing + , _mcmuFields = Nothing + , _mcmuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcmuQuotaUser :: Lens' ManagementCustomMetricsUpdate' (Maybe Text) +mcmuQuotaUser + = lens _mcmuQuotaUser + (\ s a -> s{_mcmuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcmuPrettyPrint :: Lens' ManagementCustomMetricsUpdate' Bool +mcmuPrettyPrint + = lens _mcmuPrettyPrint + (\ s a -> s{_mcmuPrettyPrint = a}) + +-- | Custom metric ID for the custom metric to update. +mcmuCustomMetricId :: Lens' ManagementCustomMetricsUpdate' Text +mcmuCustomMetricId + = lens _mcmuCustomMetricId + (\ s a -> s{_mcmuCustomMetricId = a}) + +-- | Web property ID for the custom metric to update. +mcmuWebPropertyId :: Lens' ManagementCustomMetricsUpdate' Text +mcmuWebPropertyId + = lens _mcmuWebPropertyId + (\ s a -> s{_mcmuWebPropertyId = a}) + +-- | Force the update and ignore any warnings related to the custom metric +-- being linked to a custom data source \/ data set. +mcmuIgnoreCustomDataSourceLinks :: Lens' ManagementCustomMetricsUpdate' Bool +mcmuIgnoreCustomDataSourceLinks + = lens _mcmuIgnoreCustomDataSourceLinks + (\ s a -> s{_mcmuIgnoreCustomDataSourceLinks = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcmuUserIp :: Lens' ManagementCustomMetricsUpdate' (Maybe Text) +mcmuUserIp + = lens _mcmuUserIp (\ s a -> s{_mcmuUserIp = a}) + +-- | Account ID for the custom metric to update. +mcmuAccountId :: Lens' ManagementCustomMetricsUpdate' Text +mcmuAccountId + = lens _mcmuAccountId + (\ s a -> s{_mcmuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcmuKey :: Lens' ManagementCustomMetricsUpdate' (Maybe Text) +mcmuKey = lens _mcmuKey (\ s a -> s{_mcmuKey = a}) + +-- | OAuth 2.0 token for the current user. +mcmuOauthToken :: Lens' ManagementCustomMetricsUpdate' (Maybe Text) +mcmuOauthToken + = lens _mcmuOauthToken + (\ s a -> s{_mcmuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcmuFields :: Lens' ManagementCustomMetricsUpdate' (Maybe Text) +mcmuFields + = lens _mcmuFields (\ s a -> s{_mcmuFields = a}) + +-- | Data format for the response. +mcmuAlt :: Lens' ManagementCustomMetricsUpdate' Text +mcmuAlt = lens _mcmuAlt (\ s a -> s{_mcmuAlt = a}) + +instance GoogleRequest ManagementCustomMetricsUpdate' + where + type Rs ManagementCustomMetricsUpdate' = CustomMetric + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementCustomMetricsUpdate{..} + = go _mcmuQuotaUser _mcmuPrettyPrint + _mcmuCustomMetricId + _mcmuWebPropertyId + (Just _mcmuIgnoreCustomDataSourceLinks) + _mcmuUserIp + _mcmuAccountId + _mcmuKey + _mcmuOauthToken + _mcmuFields + _mcmuAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementCustomMetricsUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Delete.hs new file mode 100644 index 000000000..3db474d25 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Delete.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete an experiment. +-- +-- /See:/ for @AnalyticsManagementExperimentsDelete@. +module Analytics.Management.Experiments.Delete + ( + -- * REST Resource + ManagementExperimentsDeleteAPI + + -- * Creating a Request + , managementExperimentsDelete + , ManagementExperimentsDelete + + -- * Request Lenses + , medQuotaUser + , medPrettyPrint + , medWebPropertyId + , medUserIp + , medProfileId + , medAccountId + , medExperimentId + , medKey + , medOauthToken + , medFields + , medAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsDelete@ which the +-- 'ManagementExperimentsDelete' request conforms to. +type ManagementExperimentsDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> + Capture "experimentId" Text :> Delete '[JSON] () + +-- | Delete an experiment. +-- +-- /See:/ 'managementExperimentsDelete' smart constructor. +data ManagementExperimentsDelete = ManagementExperimentsDelete + { _medQuotaUser :: !(Maybe Text) + , _medPrettyPrint :: !Bool + , _medWebPropertyId :: !Text + , _medUserIp :: !(Maybe Text) + , _medProfileId :: !Text + , _medAccountId :: !Text + , _medExperimentId :: !Text + , _medKey :: !(Maybe Text) + , _medOauthToken :: !(Maybe Text) + , _medFields :: !(Maybe Text) + , _medAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'medQuotaUser' +-- +-- * 'medPrettyPrint' +-- +-- * 'medWebPropertyId' +-- +-- * 'medUserIp' +-- +-- * 'medProfileId' +-- +-- * 'medAccountId' +-- +-- * 'medExperimentId' +-- +-- * 'medKey' +-- +-- * 'medOauthToken' +-- +-- * 'medFields' +-- +-- * 'medAlt' +managementExperimentsDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'experimentId' + -> ManagementExperimentsDelete +managementExperimentsDelete pMedWebPropertyId_ pMedProfileId_ pMedAccountId_ pMedExperimentId_ = + ManagementExperimentsDelete + { _medQuotaUser = Nothing + , _medPrettyPrint = False + , _medWebPropertyId = pMedWebPropertyId_ + , _medUserIp = Nothing + , _medProfileId = pMedProfileId_ + , _medAccountId = pMedAccountId_ + , _medExperimentId = pMedExperimentId_ + , _medKey = Nothing + , _medOauthToken = Nothing + , _medFields = Nothing + , _medAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +medQuotaUser :: Lens' ManagementExperimentsDelete' (Maybe Text) +medQuotaUser + = lens _medQuotaUser (\ s a -> s{_medQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +medPrettyPrint :: Lens' ManagementExperimentsDelete' Bool +medPrettyPrint + = lens _medPrettyPrint + (\ s a -> s{_medPrettyPrint = a}) + +-- | Web property ID to which the experiment belongs +medWebPropertyId :: Lens' ManagementExperimentsDelete' Text +medWebPropertyId + = lens _medWebPropertyId + (\ s a -> s{_medWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +medUserIp :: Lens' ManagementExperimentsDelete' (Maybe Text) +medUserIp + = lens _medUserIp (\ s a -> s{_medUserIp = a}) + +-- | View (Profile) ID to which the experiment belongs +medProfileId :: Lens' ManagementExperimentsDelete' Text +medProfileId + = lens _medProfileId (\ s a -> s{_medProfileId = a}) + +-- | Account ID to which the experiment belongs +medAccountId :: Lens' ManagementExperimentsDelete' Text +medAccountId + = lens _medAccountId (\ s a -> s{_medAccountId = a}) + +-- | ID of the experiment to delete +medExperimentId :: Lens' ManagementExperimentsDelete' Text +medExperimentId + = lens _medExperimentId + (\ s a -> s{_medExperimentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +medKey :: Lens' ManagementExperimentsDelete' (Maybe Text) +medKey = lens _medKey (\ s a -> s{_medKey = a}) + +-- | OAuth 2.0 token for the current user. +medOauthToken :: Lens' ManagementExperimentsDelete' (Maybe Text) +medOauthToken + = lens _medOauthToken + (\ s a -> s{_medOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +medFields :: Lens' ManagementExperimentsDelete' (Maybe Text) +medFields + = lens _medFields (\ s a -> s{_medFields = a}) + +-- | Data format for the response. +medAlt :: Lens' ManagementExperimentsDelete' Text +medAlt = lens _medAlt (\ s a -> s{_medAlt = a}) + +instance GoogleRequest ManagementExperimentsDelete' + where + type Rs ManagementExperimentsDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsDelete{..} + = go _medQuotaUser _medPrettyPrint _medWebPropertyId + _medUserIp + _medProfileId + _medAccountId + _medExperimentId + _medKey + _medOauthToken + _medFields + _medAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Get.hs new file mode 100644 index 000000000..f417ad377 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Get.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns an experiment to which the user has access. +-- +-- /See:/ for @AnalyticsManagementExperimentsGet@. +module Analytics.Management.Experiments.Get + ( + -- * REST Resource + ManagementExperimentsGetAPI + + -- * Creating a Request + , managementExperimentsGet + , ManagementExperimentsGet + + -- * Request Lenses + , megQuotaUser + , megPrettyPrint + , megWebPropertyId + , megUserIp + , megProfileId + , megAccountId + , megExperimentId + , megKey + , megOauthToken + , megFields + , megAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsGet@ which the +-- 'ManagementExperimentsGet' request conforms to. +type ManagementExperimentsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> + Capture "experimentId" Text :> Get '[JSON] Experiment + +-- | Returns an experiment to which the user has access. +-- +-- /See:/ 'managementExperimentsGet' smart constructor. +data ManagementExperimentsGet = ManagementExperimentsGet + { _megQuotaUser :: !(Maybe Text) + , _megPrettyPrint :: !Bool + , _megWebPropertyId :: !Text + , _megUserIp :: !(Maybe Text) + , _megProfileId :: !Text + , _megAccountId :: !Text + , _megExperimentId :: !Text + , _megKey :: !(Maybe Text) + , _megOauthToken :: !(Maybe Text) + , _megFields :: !(Maybe Text) + , _megAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'megQuotaUser' +-- +-- * 'megPrettyPrint' +-- +-- * 'megWebPropertyId' +-- +-- * 'megUserIp' +-- +-- * 'megProfileId' +-- +-- * 'megAccountId' +-- +-- * 'megExperimentId' +-- +-- * 'megKey' +-- +-- * 'megOauthToken' +-- +-- * 'megFields' +-- +-- * 'megAlt' +managementExperimentsGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'experimentId' + -> ManagementExperimentsGet +managementExperimentsGet pMegWebPropertyId_ pMegProfileId_ pMegAccountId_ pMegExperimentId_ = + ManagementExperimentsGet + { _megQuotaUser = Nothing + , _megPrettyPrint = False + , _megWebPropertyId = pMegWebPropertyId_ + , _megUserIp = Nothing + , _megProfileId = pMegProfileId_ + , _megAccountId = pMegAccountId_ + , _megExperimentId = pMegExperimentId_ + , _megKey = Nothing + , _megOauthToken = Nothing + , _megFields = Nothing + , _megAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +megQuotaUser :: Lens' ManagementExperimentsGet' (Maybe Text) +megQuotaUser + = lens _megQuotaUser (\ s a -> s{_megQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +megPrettyPrint :: Lens' ManagementExperimentsGet' Bool +megPrettyPrint + = lens _megPrettyPrint + (\ s a -> s{_megPrettyPrint = a}) + +-- | Web property ID to retrieve the experiment for. +megWebPropertyId :: Lens' ManagementExperimentsGet' Text +megWebPropertyId + = lens _megWebPropertyId + (\ s a -> s{_megWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +megUserIp :: Lens' ManagementExperimentsGet' (Maybe Text) +megUserIp + = lens _megUserIp (\ s a -> s{_megUserIp = a}) + +-- | View (Profile) ID to retrieve the experiment for. +megProfileId :: Lens' ManagementExperimentsGet' Text +megProfileId + = lens _megProfileId (\ s a -> s{_megProfileId = a}) + +-- | Account ID to retrieve the experiment for. +megAccountId :: Lens' ManagementExperimentsGet' Text +megAccountId + = lens _megAccountId (\ s a -> s{_megAccountId = a}) + +-- | Experiment ID to retrieve the experiment for. +megExperimentId :: Lens' ManagementExperimentsGet' Text +megExperimentId + = lens _megExperimentId + (\ s a -> s{_megExperimentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +megKey :: Lens' ManagementExperimentsGet' (Maybe Text) +megKey = lens _megKey (\ s a -> s{_megKey = a}) + +-- | OAuth 2.0 token for the current user. +megOauthToken :: Lens' ManagementExperimentsGet' (Maybe Text) +megOauthToken + = lens _megOauthToken + (\ s a -> s{_megOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +megFields :: Lens' ManagementExperimentsGet' (Maybe Text) +megFields + = lens _megFields (\ s a -> s{_megFields = a}) + +-- | Data format for the response. +megAlt :: Lens' ManagementExperimentsGet' Text +megAlt = lens _megAlt (\ s a -> s{_megAlt = a}) + +instance GoogleRequest ManagementExperimentsGet' + where + type Rs ManagementExperimentsGet' = Experiment + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsGet{..} + = go _megQuotaUser _megPrettyPrint _megWebPropertyId + _megUserIp + _megProfileId + _megAccountId + _megExperimentId + _megKey + _megOauthToken + _megFields + _megAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Insert.hs new file mode 100644 index 000000000..933d8c8b4 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Insert.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new experiment. +-- +-- /See:/ for @AnalyticsManagementExperimentsInsert@. +module Analytics.Management.Experiments.Insert + ( + -- * REST Resource + ManagementExperimentsInsertAPI + + -- * Creating a Request + , managementExperimentsInsert + , ManagementExperimentsInsert + + -- * Request Lenses + , meiQuotaUser + , meiPrettyPrint + , meiWebPropertyId + , meiUserIp + , meiProfileId + , meiAccountId + , meiKey + , meiOauthToken + , meiFields + , meiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsInsert@ which the +-- 'ManagementExperimentsInsert' request conforms to. +type ManagementExperimentsInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> Post '[JSON] Experiment + +-- | Create a new experiment. +-- +-- /See:/ 'managementExperimentsInsert' smart constructor. +data ManagementExperimentsInsert = ManagementExperimentsInsert + { _meiQuotaUser :: !(Maybe Text) + , _meiPrettyPrint :: !Bool + , _meiWebPropertyId :: !Text + , _meiUserIp :: !(Maybe Text) + , _meiProfileId :: !Text + , _meiAccountId :: !Text + , _meiKey :: !(Maybe Text) + , _meiOauthToken :: !(Maybe Text) + , _meiFields :: !(Maybe Text) + , _meiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'meiQuotaUser' +-- +-- * 'meiPrettyPrint' +-- +-- * 'meiWebPropertyId' +-- +-- * 'meiUserIp' +-- +-- * 'meiProfileId' +-- +-- * 'meiAccountId' +-- +-- * 'meiKey' +-- +-- * 'meiOauthToken' +-- +-- * 'meiFields' +-- +-- * 'meiAlt' +managementExperimentsInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementExperimentsInsert +managementExperimentsInsert pMeiWebPropertyId_ pMeiProfileId_ pMeiAccountId_ = + ManagementExperimentsInsert + { _meiQuotaUser = Nothing + , _meiPrettyPrint = False + , _meiWebPropertyId = pMeiWebPropertyId_ + , _meiUserIp = Nothing + , _meiProfileId = pMeiProfileId_ + , _meiAccountId = pMeiAccountId_ + , _meiKey = Nothing + , _meiOauthToken = Nothing + , _meiFields = Nothing + , _meiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +meiQuotaUser :: Lens' ManagementExperimentsInsert' (Maybe Text) +meiQuotaUser + = lens _meiQuotaUser (\ s a -> s{_meiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +meiPrettyPrint :: Lens' ManagementExperimentsInsert' Bool +meiPrettyPrint + = lens _meiPrettyPrint + (\ s a -> s{_meiPrettyPrint = a}) + +-- | Web property ID to create the experiment for. +meiWebPropertyId :: Lens' ManagementExperimentsInsert' Text +meiWebPropertyId + = lens _meiWebPropertyId + (\ s a -> s{_meiWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +meiUserIp :: Lens' ManagementExperimentsInsert' (Maybe Text) +meiUserIp + = lens _meiUserIp (\ s a -> s{_meiUserIp = a}) + +-- | View (Profile) ID to create the experiment for. +meiProfileId :: Lens' ManagementExperimentsInsert' Text +meiProfileId + = lens _meiProfileId (\ s a -> s{_meiProfileId = a}) + +-- | Account ID to create the experiment for. +meiAccountId :: Lens' ManagementExperimentsInsert' Text +meiAccountId + = lens _meiAccountId (\ s a -> s{_meiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +meiKey :: Lens' ManagementExperimentsInsert' (Maybe Text) +meiKey = lens _meiKey (\ s a -> s{_meiKey = a}) + +-- | OAuth 2.0 token for the current user. +meiOauthToken :: Lens' ManagementExperimentsInsert' (Maybe Text) +meiOauthToken + = lens _meiOauthToken + (\ s a -> s{_meiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +meiFields :: Lens' ManagementExperimentsInsert' (Maybe Text) +meiFields + = lens _meiFields (\ s a -> s{_meiFields = a}) + +-- | Data format for the response. +meiAlt :: Lens' ManagementExperimentsInsert' Text +meiAlt = lens _meiAlt (\ s a -> s{_meiAlt = a}) + +instance GoogleRequest ManagementExperimentsInsert' + where + type Rs ManagementExperimentsInsert' = Experiment + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsInsert{..} + = go _meiQuotaUser _meiPrettyPrint _meiWebPropertyId + _meiUserIp + _meiProfileId + _meiAccountId + _meiKey + _meiOauthToken + _meiFields + _meiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/List.hs new file mode 100644 index 000000000..09ff98aee --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/List.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists experiments to which the user has access. +-- +-- /See:/ for @AnalyticsManagementExperimentsList@. +module Analytics.Management.Experiments.List + ( + -- * REST Resource + ManagementExperimentsListAPI + + -- * Creating a Request + , managementExperimentsList + , ManagementExperimentsList + + -- * Request Lenses + , melQuotaUser + , melPrettyPrint + , melWebPropertyId + , melUserIp + , melProfileId + , melAccountId + , melKey + , melOauthToken + , melStartIndex + , melMaxResults + , melFields + , melAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsList@ which the +-- 'ManagementExperimentsList' request conforms to. +type ManagementExperimentsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] Experiments + +-- | Lists experiments to which the user has access. +-- +-- /See:/ 'managementExperimentsList' smart constructor. +data ManagementExperimentsList = ManagementExperimentsList + { _melQuotaUser :: !(Maybe Text) + , _melPrettyPrint :: !Bool + , _melWebPropertyId :: !Text + , _melUserIp :: !(Maybe Text) + , _melProfileId :: !Text + , _melAccountId :: !Text + , _melKey :: !(Maybe Text) + , _melOauthToken :: !(Maybe Text) + , _melStartIndex :: !(Maybe Int32) + , _melMaxResults :: !(Maybe Int32) + , _melFields :: !(Maybe Text) + , _melAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'melQuotaUser' +-- +-- * 'melPrettyPrint' +-- +-- * 'melWebPropertyId' +-- +-- * 'melUserIp' +-- +-- * 'melProfileId' +-- +-- * 'melAccountId' +-- +-- * 'melKey' +-- +-- * 'melOauthToken' +-- +-- * 'melStartIndex' +-- +-- * 'melMaxResults' +-- +-- * 'melFields' +-- +-- * 'melAlt' +managementExperimentsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementExperimentsList +managementExperimentsList pMelWebPropertyId_ pMelProfileId_ pMelAccountId_ = + ManagementExperimentsList + { _melQuotaUser = Nothing + , _melPrettyPrint = False + , _melWebPropertyId = pMelWebPropertyId_ + , _melUserIp = Nothing + , _melProfileId = pMelProfileId_ + , _melAccountId = pMelAccountId_ + , _melKey = Nothing + , _melOauthToken = Nothing + , _melStartIndex = Nothing + , _melMaxResults = Nothing + , _melFields = Nothing + , _melAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +melQuotaUser :: Lens' ManagementExperimentsList' (Maybe Text) +melQuotaUser + = lens _melQuotaUser (\ s a -> s{_melQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +melPrettyPrint :: Lens' ManagementExperimentsList' Bool +melPrettyPrint + = lens _melPrettyPrint + (\ s a -> s{_melPrettyPrint = a}) + +-- | Web property ID to retrieve experiments for. +melWebPropertyId :: Lens' ManagementExperimentsList' Text +melWebPropertyId + = lens _melWebPropertyId + (\ s a -> s{_melWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +melUserIp :: Lens' ManagementExperimentsList' (Maybe Text) +melUserIp + = lens _melUserIp (\ s a -> s{_melUserIp = a}) + +-- | View (Profile) ID to retrieve experiments for. +melProfileId :: Lens' ManagementExperimentsList' Text +melProfileId + = lens _melProfileId (\ s a -> s{_melProfileId = a}) + +-- | Account ID to retrieve experiments for. +melAccountId :: Lens' ManagementExperimentsList' Text +melAccountId + = lens _melAccountId (\ s a -> s{_melAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +melKey :: Lens' ManagementExperimentsList' (Maybe Text) +melKey = lens _melKey (\ s a -> s{_melKey = a}) + +-- | OAuth 2.0 token for the current user. +melOauthToken :: Lens' ManagementExperimentsList' (Maybe Text) +melOauthToken + = lens _melOauthToken + (\ s a -> s{_melOauthToken = a}) + +-- | An index of the first experiment to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +melStartIndex :: Lens' ManagementExperimentsList' (Maybe Int32) +melStartIndex + = lens _melStartIndex + (\ s a -> s{_melStartIndex = a}) + +-- | The maximum number of experiments to include in this response. +melMaxResults :: Lens' ManagementExperimentsList' (Maybe Int32) +melMaxResults + = lens _melMaxResults + (\ s a -> s{_melMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +melFields :: Lens' ManagementExperimentsList' (Maybe Text) +melFields + = lens _melFields (\ s a -> s{_melFields = a}) + +-- | Data format for the response. +melAlt :: Lens' ManagementExperimentsList' Text +melAlt = lens _melAlt (\ s a -> s{_melAlt = a}) + +instance GoogleRequest ManagementExperimentsList' + where + type Rs ManagementExperimentsList' = Experiments + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsList{..} + = go _melQuotaUser _melPrettyPrint _melWebPropertyId + _melUserIp + _melProfileId + _melAccountId + _melKey + _melOauthToken + _melStartIndex + _melMaxResults + _melFields + _melAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Patch.hs new file mode 100644 index 000000000..f975e0383 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Patch.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update an existing experiment. This method supports patch semantics. +-- +-- /See:/ for @AnalyticsManagementExperimentsPatch@. +module Analytics.Management.Experiments.Patch + ( + -- * REST Resource + ManagementExperimentsPatchAPI + + -- * Creating a Request + , managementExperimentsPatch + , ManagementExperimentsPatch + + -- * Request Lenses + , mepQuotaUser + , mepPrettyPrint + , mepWebPropertyId + , mepUserIp + , mepProfileId + , mepAccountId + , mepExperimentId + , mepKey + , mepOauthToken + , mepFields + , mepAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsPatch@ which the +-- 'ManagementExperimentsPatch' request conforms to. +type ManagementExperimentsPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> + Capture "experimentId" Text :> + Patch '[JSON] Experiment + +-- | Update an existing experiment. This method supports patch semantics. +-- +-- /See:/ 'managementExperimentsPatch' smart constructor. +data ManagementExperimentsPatch = ManagementExperimentsPatch + { _mepQuotaUser :: !(Maybe Text) + , _mepPrettyPrint :: !Bool + , _mepWebPropertyId :: !Text + , _mepUserIp :: !(Maybe Text) + , _mepProfileId :: !Text + , _mepAccountId :: !Text + , _mepExperimentId :: !Text + , _mepKey :: !(Maybe Text) + , _mepOauthToken :: !(Maybe Text) + , _mepFields :: !(Maybe Text) + , _mepAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mepQuotaUser' +-- +-- * 'mepPrettyPrint' +-- +-- * 'mepWebPropertyId' +-- +-- * 'mepUserIp' +-- +-- * 'mepProfileId' +-- +-- * 'mepAccountId' +-- +-- * 'mepExperimentId' +-- +-- * 'mepKey' +-- +-- * 'mepOauthToken' +-- +-- * 'mepFields' +-- +-- * 'mepAlt' +managementExperimentsPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'experimentId' + -> ManagementExperimentsPatch +managementExperimentsPatch pMepWebPropertyId_ pMepProfileId_ pMepAccountId_ pMepExperimentId_ = + ManagementExperimentsPatch + { _mepQuotaUser = Nothing + , _mepPrettyPrint = False + , _mepWebPropertyId = pMepWebPropertyId_ + , _mepUserIp = Nothing + , _mepProfileId = pMepProfileId_ + , _mepAccountId = pMepAccountId_ + , _mepExperimentId = pMepExperimentId_ + , _mepKey = Nothing + , _mepOauthToken = Nothing + , _mepFields = Nothing + , _mepAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mepQuotaUser :: Lens' ManagementExperimentsPatch' (Maybe Text) +mepQuotaUser + = lens _mepQuotaUser (\ s a -> s{_mepQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mepPrettyPrint :: Lens' ManagementExperimentsPatch' Bool +mepPrettyPrint + = lens _mepPrettyPrint + (\ s a -> s{_mepPrettyPrint = a}) + +-- | Web property ID of the experiment to update. +mepWebPropertyId :: Lens' ManagementExperimentsPatch' Text +mepWebPropertyId + = lens _mepWebPropertyId + (\ s a -> s{_mepWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mepUserIp :: Lens' ManagementExperimentsPatch' (Maybe Text) +mepUserIp + = lens _mepUserIp (\ s a -> s{_mepUserIp = a}) + +-- | View (Profile) ID of the experiment to update. +mepProfileId :: Lens' ManagementExperimentsPatch' Text +mepProfileId + = lens _mepProfileId (\ s a -> s{_mepProfileId = a}) + +-- | Account ID of the experiment to update. +mepAccountId :: Lens' ManagementExperimentsPatch' Text +mepAccountId + = lens _mepAccountId (\ s a -> s{_mepAccountId = a}) + +-- | Experiment ID of the experiment to update. +mepExperimentId :: Lens' ManagementExperimentsPatch' Text +mepExperimentId + = lens _mepExperimentId + (\ s a -> s{_mepExperimentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mepKey :: Lens' ManagementExperimentsPatch' (Maybe Text) +mepKey = lens _mepKey (\ s a -> s{_mepKey = a}) + +-- | OAuth 2.0 token for the current user. +mepOauthToken :: Lens' ManagementExperimentsPatch' (Maybe Text) +mepOauthToken + = lens _mepOauthToken + (\ s a -> s{_mepOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mepFields :: Lens' ManagementExperimentsPatch' (Maybe Text) +mepFields + = lens _mepFields (\ s a -> s{_mepFields = a}) + +-- | Data format for the response. +mepAlt :: Lens' ManagementExperimentsPatch' Text +mepAlt = lens _mepAlt (\ s a -> s{_mepAlt = a}) + +instance GoogleRequest ManagementExperimentsPatch' + where + type Rs ManagementExperimentsPatch' = Experiment + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsPatch{..} + = go _mepQuotaUser _mepPrettyPrint _mepWebPropertyId + _mepUserIp + _mepProfileId + _mepAccountId + _mepExperimentId + _mepKey + _mepOauthToken + _mepFields + _mepAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Update.hs new file mode 100644 index 000000000..8cdab1916 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Update.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Experiments.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update an existing experiment. +-- +-- /See:/ for @AnalyticsManagementExperimentsUpdate@. +module Analytics.Management.Experiments.Update + ( + -- * REST Resource + ManagementExperimentsUpdateAPI + + -- * Creating a Request + , managementExperimentsUpdate + , ManagementExperimentsUpdate + + -- * Request Lenses + , meuQuotaUser + , meuPrettyPrint + , meuWebPropertyId + , meuUserIp + , meuProfileId + , meuAccountId + , meuExperimentId + , meuKey + , meuOauthToken + , meuFields + , meuAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementExperimentsUpdate@ which the +-- 'ManagementExperimentsUpdate' request conforms to. +type ManagementExperimentsUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "experiments" :> + Capture "experimentId" Text :> Put '[JSON] Experiment + +-- | Update an existing experiment. +-- +-- /See:/ 'managementExperimentsUpdate' smart constructor. +data ManagementExperimentsUpdate = ManagementExperimentsUpdate + { _meuQuotaUser :: !(Maybe Text) + , _meuPrettyPrint :: !Bool + , _meuWebPropertyId :: !Text + , _meuUserIp :: !(Maybe Text) + , _meuProfileId :: !Text + , _meuAccountId :: !Text + , _meuExperimentId :: !Text + , _meuKey :: !(Maybe Text) + , _meuOauthToken :: !(Maybe Text) + , _meuFields :: !(Maybe Text) + , _meuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementExperimentsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'meuQuotaUser' +-- +-- * 'meuPrettyPrint' +-- +-- * 'meuWebPropertyId' +-- +-- * 'meuUserIp' +-- +-- * 'meuProfileId' +-- +-- * 'meuAccountId' +-- +-- * 'meuExperimentId' +-- +-- * 'meuKey' +-- +-- * 'meuOauthToken' +-- +-- * 'meuFields' +-- +-- * 'meuAlt' +managementExperimentsUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'experimentId' + -> ManagementExperimentsUpdate +managementExperimentsUpdate pMeuWebPropertyId_ pMeuProfileId_ pMeuAccountId_ pMeuExperimentId_ = + ManagementExperimentsUpdate + { _meuQuotaUser = Nothing + , _meuPrettyPrint = False + , _meuWebPropertyId = pMeuWebPropertyId_ + , _meuUserIp = Nothing + , _meuProfileId = pMeuProfileId_ + , _meuAccountId = pMeuAccountId_ + , _meuExperimentId = pMeuExperimentId_ + , _meuKey = Nothing + , _meuOauthToken = Nothing + , _meuFields = Nothing + , _meuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +meuQuotaUser :: Lens' ManagementExperimentsUpdate' (Maybe Text) +meuQuotaUser + = lens _meuQuotaUser (\ s a -> s{_meuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +meuPrettyPrint :: Lens' ManagementExperimentsUpdate' Bool +meuPrettyPrint + = lens _meuPrettyPrint + (\ s a -> s{_meuPrettyPrint = a}) + +-- | Web property ID of the experiment to update. +meuWebPropertyId :: Lens' ManagementExperimentsUpdate' Text +meuWebPropertyId + = lens _meuWebPropertyId + (\ s a -> s{_meuWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +meuUserIp :: Lens' ManagementExperimentsUpdate' (Maybe Text) +meuUserIp + = lens _meuUserIp (\ s a -> s{_meuUserIp = a}) + +-- | View (Profile) ID of the experiment to update. +meuProfileId :: Lens' ManagementExperimentsUpdate' Text +meuProfileId + = lens _meuProfileId (\ s a -> s{_meuProfileId = a}) + +-- | Account ID of the experiment to update. +meuAccountId :: Lens' ManagementExperimentsUpdate' Text +meuAccountId + = lens _meuAccountId (\ s a -> s{_meuAccountId = a}) + +-- | Experiment ID of the experiment to update. +meuExperimentId :: Lens' ManagementExperimentsUpdate' Text +meuExperimentId + = lens _meuExperimentId + (\ s a -> s{_meuExperimentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +meuKey :: Lens' ManagementExperimentsUpdate' (Maybe Text) +meuKey = lens _meuKey (\ s a -> s{_meuKey = a}) + +-- | OAuth 2.0 token for the current user. +meuOauthToken :: Lens' ManagementExperimentsUpdate' (Maybe Text) +meuOauthToken + = lens _meuOauthToken + (\ s a -> s{_meuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +meuFields :: Lens' ManagementExperimentsUpdate' (Maybe Text) +meuFields + = lens _meuFields (\ s a -> s{_meuFields = a}) + +-- | Data format for the response. +meuAlt :: Lens' ManagementExperimentsUpdate' Text +meuAlt = lens _meuAlt (\ s a -> s{_meuAlt = a}) + +instance GoogleRequest ManagementExperimentsUpdate' + where + type Rs ManagementExperimentsUpdate' = Experiment + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementExperimentsUpdate{..} + = go _meuQuotaUser _meuPrettyPrint _meuWebPropertyId + _meuUserIp + _meuProfileId + _meuAccountId + _meuExperimentId + _meuKey + _meuOauthToken + _meuFields + _meuAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementExperimentsUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Delete.hs new file mode 100644 index 000000000..c9caa488a --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Delete.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a filter. +-- +-- /See:/ for @AnalyticsManagementFiltersDelete@. +module Analytics.Management.Filters.Delete + ( + -- * REST Resource + ManagementFiltersDeleteAPI + + -- * Creating a Request + , managementFiltersDelete + , ManagementFiltersDelete + + -- * Request Lenses + , mfdQuotaUser + , mfdPrettyPrint + , mfdFilterId + , mfdUserIp + , mfdAccountId + , mfdKey + , mfdOauthToken + , mfdFields + , mfdAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersDelete@ which the +-- 'ManagementFiltersDelete' request conforms to. +type ManagementFiltersDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> + Capture "filterId" Text :> Delete '[JSON] Filter + +-- | Delete a filter. +-- +-- /See:/ 'managementFiltersDelete' smart constructor. +data ManagementFiltersDelete = ManagementFiltersDelete + { _mfdQuotaUser :: !(Maybe Text) + , _mfdPrettyPrint :: !Bool + , _mfdFilterId :: !Text + , _mfdUserIp :: !(Maybe Text) + , _mfdAccountId :: !Text + , _mfdKey :: !(Maybe Text) + , _mfdOauthToken :: !(Maybe Text) + , _mfdFields :: !(Maybe Text) + , _mfdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfdQuotaUser' +-- +-- * 'mfdPrettyPrint' +-- +-- * 'mfdFilterId' +-- +-- * 'mfdUserIp' +-- +-- * 'mfdAccountId' +-- +-- * 'mfdKey' +-- +-- * 'mfdOauthToken' +-- +-- * 'mfdFields' +-- +-- * 'mfdAlt' +managementFiltersDelete + :: Text -- ^ 'filterId' + -> Text -- ^ 'accountId' + -> ManagementFiltersDelete +managementFiltersDelete pMfdFilterId_ pMfdAccountId_ = + ManagementFiltersDelete + { _mfdQuotaUser = Nothing + , _mfdPrettyPrint = False + , _mfdFilterId = pMfdFilterId_ + , _mfdUserIp = Nothing + , _mfdAccountId = pMfdAccountId_ + , _mfdKey = Nothing + , _mfdOauthToken = Nothing + , _mfdFields = Nothing + , _mfdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mfdQuotaUser :: Lens' ManagementFiltersDelete' (Maybe Text) +mfdQuotaUser + = lens _mfdQuotaUser (\ s a -> s{_mfdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mfdPrettyPrint :: Lens' ManagementFiltersDelete' Bool +mfdPrettyPrint + = lens _mfdPrettyPrint + (\ s a -> s{_mfdPrettyPrint = a}) + +-- | ID of the filter to be deleted. +mfdFilterId :: Lens' ManagementFiltersDelete' Text +mfdFilterId + = lens _mfdFilterId (\ s a -> s{_mfdFilterId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mfdUserIp :: Lens' ManagementFiltersDelete' (Maybe Text) +mfdUserIp + = lens _mfdUserIp (\ s a -> s{_mfdUserIp = a}) + +-- | Account ID to delete the filter for. +mfdAccountId :: Lens' ManagementFiltersDelete' Text +mfdAccountId + = lens _mfdAccountId (\ s a -> s{_mfdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mfdKey :: Lens' ManagementFiltersDelete' (Maybe Text) +mfdKey = lens _mfdKey (\ s a -> s{_mfdKey = a}) + +-- | OAuth 2.0 token for the current user. +mfdOauthToken :: Lens' ManagementFiltersDelete' (Maybe Text) +mfdOauthToken + = lens _mfdOauthToken + (\ s a -> s{_mfdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mfdFields :: Lens' ManagementFiltersDelete' (Maybe Text) +mfdFields + = lens _mfdFields (\ s a -> s{_mfdFields = a}) + +-- | Data format for the response. +mfdAlt :: Lens' ManagementFiltersDelete' Text +mfdAlt = lens _mfdAlt (\ s a -> s{_mfdAlt = a}) + +instance GoogleRequest ManagementFiltersDelete' where + type Rs ManagementFiltersDelete' = Filter + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersDelete{..} + = go _mfdQuotaUser _mfdPrettyPrint _mfdFilterId + _mfdUserIp + _mfdAccountId + _mfdKey + _mfdOauthToken + _mfdFields + _mfdAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Get.hs new file mode 100644 index 000000000..b95bbd6f3 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a filters to which the user has access. +-- +-- /See:/ for @AnalyticsManagementFiltersGet@. +module Analytics.Management.Filters.Get + ( + -- * REST Resource + ManagementFiltersGetAPI + + -- * Creating a Request + , managementFiltersGet + , ManagementFiltersGet + + -- * Request Lenses + , mfgQuotaUser + , mfgPrettyPrint + , mfgFilterId + , mfgUserIp + , mfgAccountId + , mfgKey + , mfgOauthToken + , mfgFields + , mfgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersGet@ which the +-- 'ManagementFiltersGet' request conforms to. +type ManagementFiltersGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> + Capture "filterId" Text :> Get '[JSON] Filter + +-- | Returns a filters to which the user has access. +-- +-- /See:/ 'managementFiltersGet' smart constructor. +data ManagementFiltersGet = ManagementFiltersGet + { _mfgQuotaUser :: !(Maybe Text) + , _mfgPrettyPrint :: !Bool + , _mfgFilterId :: !Text + , _mfgUserIp :: !(Maybe Text) + , _mfgAccountId :: !Text + , _mfgKey :: !(Maybe Text) + , _mfgOauthToken :: !(Maybe Text) + , _mfgFields :: !(Maybe Text) + , _mfgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfgQuotaUser' +-- +-- * 'mfgPrettyPrint' +-- +-- * 'mfgFilterId' +-- +-- * 'mfgUserIp' +-- +-- * 'mfgAccountId' +-- +-- * 'mfgKey' +-- +-- * 'mfgOauthToken' +-- +-- * 'mfgFields' +-- +-- * 'mfgAlt' +managementFiltersGet + :: Text -- ^ 'filterId' + -> Text -- ^ 'accountId' + -> ManagementFiltersGet +managementFiltersGet pMfgFilterId_ pMfgAccountId_ = + ManagementFiltersGet + { _mfgQuotaUser = Nothing + , _mfgPrettyPrint = False + , _mfgFilterId = pMfgFilterId_ + , _mfgUserIp = Nothing + , _mfgAccountId = pMfgAccountId_ + , _mfgKey = Nothing + , _mfgOauthToken = Nothing + , _mfgFields = Nothing + , _mfgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mfgQuotaUser :: Lens' ManagementFiltersGet' (Maybe Text) +mfgQuotaUser + = lens _mfgQuotaUser (\ s a -> s{_mfgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mfgPrettyPrint :: Lens' ManagementFiltersGet' Bool +mfgPrettyPrint + = lens _mfgPrettyPrint + (\ s a -> s{_mfgPrettyPrint = a}) + +-- | Filter ID to retrieve filters for. +mfgFilterId :: Lens' ManagementFiltersGet' Text +mfgFilterId + = lens _mfgFilterId (\ s a -> s{_mfgFilterId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mfgUserIp :: Lens' ManagementFiltersGet' (Maybe Text) +mfgUserIp + = lens _mfgUserIp (\ s a -> s{_mfgUserIp = a}) + +-- | Account ID to retrieve filters for. +mfgAccountId :: Lens' ManagementFiltersGet' Text +mfgAccountId + = lens _mfgAccountId (\ s a -> s{_mfgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mfgKey :: Lens' ManagementFiltersGet' (Maybe Text) +mfgKey = lens _mfgKey (\ s a -> s{_mfgKey = a}) + +-- | OAuth 2.0 token for the current user. +mfgOauthToken :: Lens' ManagementFiltersGet' (Maybe Text) +mfgOauthToken + = lens _mfgOauthToken + (\ s a -> s{_mfgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mfgFields :: Lens' ManagementFiltersGet' (Maybe Text) +mfgFields + = lens _mfgFields (\ s a -> s{_mfgFields = a}) + +-- | Data format for the response. +mfgAlt :: Lens' ManagementFiltersGet' Text +mfgAlt = lens _mfgAlt (\ s a -> s{_mfgAlt = a}) + +instance GoogleRequest ManagementFiltersGet' where + type Rs ManagementFiltersGet' = Filter + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersGet{..} + = go _mfgQuotaUser _mfgPrettyPrint _mfgFilterId + _mfgUserIp + _mfgAccountId + _mfgKey + _mfgOauthToken + _mfgFields + _mfgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Insert.hs new file mode 100644 index 000000000..48b422690 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new filter. +-- +-- /See:/ for @AnalyticsManagementFiltersInsert@. +module Analytics.Management.Filters.Insert + ( + -- * REST Resource + ManagementFiltersInsertAPI + + -- * Creating a Request + , managementFiltersInsert + , ManagementFiltersInsert + + -- * Request Lenses + , mfiQuotaUser + , mfiPrettyPrint + , mfiUserIp + , mfiAccountId + , mfiKey + , mfiOauthToken + , mfiFields + , mfiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersInsert@ which the +-- 'ManagementFiltersInsert' request conforms to. +type ManagementFiltersInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> Post '[JSON] Filter + +-- | Create a new filter. +-- +-- /See:/ 'managementFiltersInsert' smart constructor. +data ManagementFiltersInsert = ManagementFiltersInsert + { _mfiQuotaUser :: !(Maybe Text) + , _mfiPrettyPrint :: !Bool + , _mfiUserIp :: !(Maybe Text) + , _mfiAccountId :: !Text + , _mfiKey :: !(Maybe Text) + , _mfiOauthToken :: !(Maybe Text) + , _mfiFields :: !(Maybe Text) + , _mfiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfiQuotaUser' +-- +-- * 'mfiPrettyPrint' +-- +-- * 'mfiUserIp' +-- +-- * 'mfiAccountId' +-- +-- * 'mfiKey' +-- +-- * 'mfiOauthToken' +-- +-- * 'mfiFields' +-- +-- * 'mfiAlt' +managementFiltersInsert + :: Text -- ^ 'accountId' + -> ManagementFiltersInsert +managementFiltersInsert pMfiAccountId_ = + ManagementFiltersInsert + { _mfiQuotaUser = Nothing + , _mfiPrettyPrint = False + , _mfiUserIp = Nothing + , _mfiAccountId = pMfiAccountId_ + , _mfiKey = Nothing + , _mfiOauthToken = Nothing + , _mfiFields = Nothing + , _mfiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mfiQuotaUser :: Lens' ManagementFiltersInsert' (Maybe Text) +mfiQuotaUser + = lens _mfiQuotaUser (\ s a -> s{_mfiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mfiPrettyPrint :: Lens' ManagementFiltersInsert' Bool +mfiPrettyPrint + = lens _mfiPrettyPrint + (\ s a -> s{_mfiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mfiUserIp :: Lens' ManagementFiltersInsert' (Maybe Text) +mfiUserIp + = lens _mfiUserIp (\ s a -> s{_mfiUserIp = a}) + +-- | Account ID to create filter for. +mfiAccountId :: Lens' ManagementFiltersInsert' Text +mfiAccountId + = lens _mfiAccountId (\ s a -> s{_mfiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mfiKey :: Lens' ManagementFiltersInsert' (Maybe Text) +mfiKey = lens _mfiKey (\ s a -> s{_mfiKey = a}) + +-- | OAuth 2.0 token for the current user. +mfiOauthToken :: Lens' ManagementFiltersInsert' (Maybe Text) +mfiOauthToken + = lens _mfiOauthToken + (\ s a -> s{_mfiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mfiFields :: Lens' ManagementFiltersInsert' (Maybe Text) +mfiFields + = lens _mfiFields (\ s a -> s{_mfiFields = a}) + +-- | Data format for the response. +mfiAlt :: Lens' ManagementFiltersInsert' Text +mfiAlt = lens _mfiAlt (\ s a -> s{_mfiAlt = a}) + +instance GoogleRequest ManagementFiltersInsert' where + type Rs ManagementFiltersInsert' = Filter + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersInsert{..} + = go _mfiQuotaUser _mfiPrettyPrint _mfiUserIp + _mfiAccountId + _mfiKey + _mfiOauthToken + _mfiFields + _mfiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/List.hs new file mode 100644 index 000000000..31f5dc085 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/List.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all filters for an account +-- +-- /See:/ for @AnalyticsManagementFiltersList@. +module Analytics.Management.Filters.List + ( + -- * REST Resource + ManagementFiltersListAPI + + -- * Creating a Request + , managementFiltersList + , ManagementFiltersList + + -- * Request Lenses + , mflQuotaUser + , mflPrettyPrint + , mflUserIp + , mflAccountId + , mflKey + , mflOauthToken + , mflStartIndex + , mflMaxResults + , mflFields + , mflAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersList@ which the +-- 'ManagementFiltersList' request conforms to. +type ManagementFiltersListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> Get '[JSON] Filters + +-- | Lists all filters for an account +-- +-- /See:/ 'managementFiltersList' smart constructor. +data ManagementFiltersList = ManagementFiltersList + { _mflQuotaUser :: !(Maybe Text) + , _mflPrettyPrint :: !Bool + , _mflUserIp :: !(Maybe Text) + , _mflAccountId :: !Text + , _mflKey :: !(Maybe Text) + , _mflOauthToken :: !(Maybe Text) + , _mflStartIndex :: !(Maybe Int32) + , _mflMaxResults :: !(Maybe Int32) + , _mflFields :: !(Maybe Text) + , _mflAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mflQuotaUser' +-- +-- * 'mflPrettyPrint' +-- +-- * 'mflUserIp' +-- +-- * 'mflAccountId' +-- +-- * 'mflKey' +-- +-- * 'mflOauthToken' +-- +-- * 'mflStartIndex' +-- +-- * 'mflMaxResults' +-- +-- * 'mflFields' +-- +-- * 'mflAlt' +managementFiltersList + :: Text -- ^ 'accountId' + -> ManagementFiltersList +managementFiltersList pMflAccountId_ = + ManagementFiltersList + { _mflQuotaUser = Nothing + , _mflPrettyPrint = False + , _mflUserIp = Nothing + , _mflAccountId = pMflAccountId_ + , _mflKey = Nothing + , _mflOauthToken = Nothing + , _mflStartIndex = Nothing + , _mflMaxResults = Nothing + , _mflFields = Nothing + , _mflAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mflQuotaUser :: Lens' ManagementFiltersList' (Maybe Text) +mflQuotaUser + = lens _mflQuotaUser (\ s a -> s{_mflQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mflPrettyPrint :: Lens' ManagementFiltersList' Bool +mflPrettyPrint + = lens _mflPrettyPrint + (\ s a -> s{_mflPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mflUserIp :: Lens' ManagementFiltersList' (Maybe Text) +mflUserIp + = lens _mflUserIp (\ s a -> s{_mflUserIp = a}) + +-- | Account ID to retrieve filters for. +mflAccountId :: Lens' ManagementFiltersList' Text +mflAccountId + = lens _mflAccountId (\ s a -> s{_mflAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mflKey :: Lens' ManagementFiltersList' (Maybe Text) +mflKey = lens _mflKey (\ s a -> s{_mflKey = a}) + +-- | OAuth 2.0 token for the current user. +mflOauthToken :: Lens' ManagementFiltersList' (Maybe Text) +mflOauthToken + = lens _mflOauthToken + (\ s a -> s{_mflOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mflStartIndex :: Lens' ManagementFiltersList' (Maybe Int32) +mflStartIndex + = lens _mflStartIndex + (\ s a -> s{_mflStartIndex = a}) + +-- | The maximum number of filters to include in this response. +mflMaxResults :: Lens' ManagementFiltersList' (Maybe Int32) +mflMaxResults + = lens _mflMaxResults + (\ s a -> s{_mflMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mflFields :: Lens' ManagementFiltersList' (Maybe Text) +mflFields + = lens _mflFields (\ s a -> s{_mflFields = a}) + +-- | Data format for the response. +mflAlt :: Lens' ManagementFiltersList' Text +mflAlt = lens _mflAlt (\ s a -> s{_mflAlt = a}) + +instance GoogleRequest ManagementFiltersList' where + type Rs ManagementFiltersList' = Filters + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersList{..} + = go _mflQuotaUser _mflPrettyPrint _mflUserIp + _mflAccountId + _mflKey + _mflOauthToken + _mflStartIndex + _mflMaxResults + _mflFields + _mflAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Patch.hs new file mode 100644 index 000000000..c600701f6 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Patch.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing filter. This method supports patch semantics. +-- +-- /See:/ for @AnalyticsManagementFiltersPatch@. +module Analytics.Management.Filters.Patch + ( + -- * REST Resource + ManagementFiltersPatchAPI + + -- * Creating a Request + , managementFiltersPatch + , ManagementFiltersPatch + + -- * Request Lenses + , mfpQuotaUser + , mfpPrettyPrint + , mfpFilterId + , mfpUserIp + , mfpAccountId + , mfpKey + , mfpOauthToken + , mfpFields + , mfpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersPatch@ which the +-- 'ManagementFiltersPatch' request conforms to. +type ManagementFiltersPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> + Capture "filterId" Text :> Patch '[JSON] Filter + +-- | Updates an existing filter. This method supports patch semantics. +-- +-- /See:/ 'managementFiltersPatch' smart constructor. +data ManagementFiltersPatch = ManagementFiltersPatch + { _mfpQuotaUser :: !(Maybe Text) + , _mfpPrettyPrint :: !Bool + , _mfpFilterId :: !Text + , _mfpUserIp :: !(Maybe Text) + , _mfpAccountId :: !Text + , _mfpKey :: !(Maybe Text) + , _mfpOauthToken :: !(Maybe Text) + , _mfpFields :: !(Maybe Text) + , _mfpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfpQuotaUser' +-- +-- * 'mfpPrettyPrint' +-- +-- * 'mfpFilterId' +-- +-- * 'mfpUserIp' +-- +-- * 'mfpAccountId' +-- +-- * 'mfpKey' +-- +-- * 'mfpOauthToken' +-- +-- * 'mfpFields' +-- +-- * 'mfpAlt' +managementFiltersPatch + :: Text -- ^ 'filterId' + -> Text -- ^ 'accountId' + -> ManagementFiltersPatch +managementFiltersPatch pMfpFilterId_ pMfpAccountId_ = + ManagementFiltersPatch + { _mfpQuotaUser = Nothing + , _mfpPrettyPrint = False + , _mfpFilterId = pMfpFilterId_ + , _mfpUserIp = Nothing + , _mfpAccountId = pMfpAccountId_ + , _mfpKey = Nothing + , _mfpOauthToken = Nothing + , _mfpFields = Nothing + , _mfpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mfpQuotaUser :: Lens' ManagementFiltersPatch' (Maybe Text) +mfpQuotaUser + = lens _mfpQuotaUser (\ s a -> s{_mfpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mfpPrettyPrint :: Lens' ManagementFiltersPatch' Bool +mfpPrettyPrint + = lens _mfpPrettyPrint + (\ s a -> s{_mfpPrettyPrint = a}) + +-- | ID of the filter to be updated. +mfpFilterId :: Lens' ManagementFiltersPatch' Text +mfpFilterId + = lens _mfpFilterId (\ s a -> s{_mfpFilterId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mfpUserIp :: Lens' ManagementFiltersPatch' (Maybe Text) +mfpUserIp + = lens _mfpUserIp (\ s a -> s{_mfpUserIp = a}) + +-- | Account ID to which the filter belongs. +mfpAccountId :: Lens' ManagementFiltersPatch' Text +mfpAccountId + = lens _mfpAccountId (\ s a -> s{_mfpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mfpKey :: Lens' ManagementFiltersPatch' (Maybe Text) +mfpKey = lens _mfpKey (\ s a -> s{_mfpKey = a}) + +-- | OAuth 2.0 token for the current user. +mfpOauthToken :: Lens' ManagementFiltersPatch' (Maybe Text) +mfpOauthToken + = lens _mfpOauthToken + (\ s a -> s{_mfpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mfpFields :: Lens' ManagementFiltersPatch' (Maybe Text) +mfpFields + = lens _mfpFields (\ s a -> s{_mfpFields = a}) + +-- | Data format for the response. +mfpAlt :: Lens' ManagementFiltersPatch' Text +mfpAlt = lens _mfpAlt (\ s a -> s{_mfpAlt = a}) + +instance GoogleRequest ManagementFiltersPatch' where + type Rs ManagementFiltersPatch' = Filter + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersPatch{..} + = go _mfpQuotaUser _mfpPrettyPrint _mfpFilterId + _mfpUserIp + _mfpAccountId + _mfpKey + _mfpOauthToken + _mfpFields + _mfpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Update.hs new file mode 100644 index 000000000..b3ab908f5 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Update.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Filters.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing filter. +-- +-- /See:/ for @AnalyticsManagementFiltersUpdate@. +module Analytics.Management.Filters.Update + ( + -- * REST Resource + ManagementFiltersUpdateAPI + + -- * Creating a Request + , managementFiltersUpdate + , ManagementFiltersUpdate + + -- * Request Lenses + , mfuQuotaUser + , mfuPrettyPrint + , mfuFilterId + , mfuUserIp + , mfuAccountId + , mfuKey + , mfuOauthToken + , mfuFields + , mfuAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementFiltersUpdate@ which the +-- 'ManagementFiltersUpdate' request conforms to. +type ManagementFiltersUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "filters" :> + Capture "filterId" Text :> Put '[JSON] Filter + +-- | Updates an existing filter. +-- +-- /See:/ 'managementFiltersUpdate' smart constructor. +data ManagementFiltersUpdate = ManagementFiltersUpdate + { _mfuQuotaUser :: !(Maybe Text) + , _mfuPrettyPrint :: !Bool + , _mfuFilterId :: !Text + , _mfuUserIp :: !(Maybe Text) + , _mfuAccountId :: !Text + , _mfuKey :: !(Maybe Text) + , _mfuOauthToken :: !(Maybe Text) + , _mfuFields :: !(Maybe Text) + , _mfuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementFiltersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfuQuotaUser' +-- +-- * 'mfuPrettyPrint' +-- +-- * 'mfuFilterId' +-- +-- * 'mfuUserIp' +-- +-- * 'mfuAccountId' +-- +-- * 'mfuKey' +-- +-- * 'mfuOauthToken' +-- +-- * 'mfuFields' +-- +-- * 'mfuAlt' +managementFiltersUpdate + :: Text -- ^ 'filterId' + -> Text -- ^ 'accountId' + -> ManagementFiltersUpdate +managementFiltersUpdate pMfuFilterId_ pMfuAccountId_ = + ManagementFiltersUpdate + { _mfuQuotaUser = Nothing + , _mfuPrettyPrint = False + , _mfuFilterId = pMfuFilterId_ + , _mfuUserIp = Nothing + , _mfuAccountId = pMfuAccountId_ + , _mfuKey = Nothing + , _mfuOauthToken = Nothing + , _mfuFields = Nothing + , _mfuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mfuQuotaUser :: Lens' ManagementFiltersUpdate' (Maybe Text) +mfuQuotaUser + = lens _mfuQuotaUser (\ s a -> s{_mfuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mfuPrettyPrint :: Lens' ManagementFiltersUpdate' Bool +mfuPrettyPrint + = lens _mfuPrettyPrint + (\ s a -> s{_mfuPrettyPrint = a}) + +-- | ID of the filter to be updated. +mfuFilterId :: Lens' ManagementFiltersUpdate' Text +mfuFilterId + = lens _mfuFilterId (\ s a -> s{_mfuFilterId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mfuUserIp :: Lens' ManagementFiltersUpdate' (Maybe Text) +mfuUserIp + = lens _mfuUserIp (\ s a -> s{_mfuUserIp = a}) + +-- | Account ID to which the filter belongs. +mfuAccountId :: Lens' ManagementFiltersUpdate' Text +mfuAccountId + = lens _mfuAccountId (\ s a -> s{_mfuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mfuKey :: Lens' ManagementFiltersUpdate' (Maybe Text) +mfuKey = lens _mfuKey (\ s a -> s{_mfuKey = a}) + +-- | OAuth 2.0 token for the current user. +mfuOauthToken :: Lens' ManagementFiltersUpdate' (Maybe Text) +mfuOauthToken + = lens _mfuOauthToken + (\ s a -> s{_mfuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mfuFields :: Lens' ManagementFiltersUpdate' (Maybe Text) +mfuFields + = lens _mfuFields (\ s a -> s{_mfuFields = a}) + +-- | Data format for the response. +mfuAlt :: Lens' ManagementFiltersUpdate' Text +mfuAlt = lens _mfuAlt (\ s a -> s{_mfuAlt = a}) + +instance GoogleRequest ManagementFiltersUpdate' where + type Rs ManagementFiltersUpdate' = Filter + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementFiltersUpdate{..} + = go _mfuQuotaUser _mfuPrettyPrint _mfuFilterId + _mfuUserIp + _mfuAccountId + _mfuKey + _mfuOauthToken + _mfuFields + _mfuAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementFiltersUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Get.hs new file mode 100644 index 000000000..24be876f4 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Get.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Goals.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a goal to which the user has access. +-- +-- /See:/ for @AnalyticsManagementGoalsGet@. +module Analytics.Management.Goals.Get + ( + -- * REST Resource + ManagementGoalsGetAPI + + -- * Creating a Request + , managementGoalsGet + , ManagementGoalsGet + + -- * Request Lenses + , mggQuotaUser + , mggPrettyPrint + , mggWebPropertyId + , mggGoalId + , mggUserIp + , mggProfileId + , mggAccountId + , mggKey + , mggOauthToken + , mggFields + , mggAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementGoalsGet@ which the +-- 'ManagementGoalsGet' request conforms to. +type ManagementGoalsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "goals" :> Capture "goalId" Text :> Get '[JSON] Goal + +-- | Gets a goal to which the user has access. +-- +-- /See:/ 'managementGoalsGet' smart constructor. +data ManagementGoalsGet = ManagementGoalsGet + { _mggQuotaUser :: !(Maybe Text) + , _mggPrettyPrint :: !Bool + , _mggWebPropertyId :: !Text + , _mggGoalId :: !Text + , _mggUserIp :: !(Maybe Text) + , _mggProfileId :: !Text + , _mggAccountId :: !Text + , _mggKey :: !(Maybe Text) + , _mggOauthToken :: !(Maybe Text) + , _mggFields :: !(Maybe Text) + , _mggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementGoalsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mggQuotaUser' +-- +-- * 'mggPrettyPrint' +-- +-- * 'mggWebPropertyId' +-- +-- * 'mggGoalId' +-- +-- * 'mggUserIp' +-- +-- * 'mggProfileId' +-- +-- * 'mggAccountId' +-- +-- * 'mggKey' +-- +-- * 'mggOauthToken' +-- +-- * 'mggFields' +-- +-- * 'mggAlt' +managementGoalsGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'goalId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementGoalsGet +managementGoalsGet pMggWebPropertyId_ pMggGoalId_ pMggProfileId_ pMggAccountId_ = + ManagementGoalsGet + { _mggQuotaUser = Nothing + , _mggPrettyPrint = False + , _mggWebPropertyId = pMggWebPropertyId_ + , _mggGoalId = pMggGoalId_ + , _mggUserIp = Nothing + , _mggProfileId = pMggProfileId_ + , _mggAccountId = pMggAccountId_ + , _mggKey = Nothing + , _mggOauthToken = Nothing + , _mggFields = Nothing + , _mggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mggQuotaUser :: Lens' ManagementGoalsGet' (Maybe Text) +mggQuotaUser + = lens _mggQuotaUser (\ s a -> s{_mggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mggPrettyPrint :: Lens' ManagementGoalsGet' Bool +mggPrettyPrint + = lens _mggPrettyPrint + (\ s a -> s{_mggPrettyPrint = a}) + +-- | Web property ID to retrieve the goal for. +mggWebPropertyId :: Lens' ManagementGoalsGet' Text +mggWebPropertyId + = lens _mggWebPropertyId + (\ s a -> s{_mggWebPropertyId = a}) + +-- | Goal ID to retrieve the goal for. +mggGoalId :: Lens' ManagementGoalsGet' Text +mggGoalId + = lens _mggGoalId (\ s a -> s{_mggGoalId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mggUserIp :: Lens' ManagementGoalsGet' (Maybe Text) +mggUserIp + = lens _mggUserIp (\ s a -> s{_mggUserIp = a}) + +-- | View (Profile) ID to retrieve the goal for. +mggProfileId :: Lens' ManagementGoalsGet' Text +mggProfileId + = lens _mggProfileId (\ s a -> s{_mggProfileId = a}) + +-- | Account ID to retrieve the goal for. +mggAccountId :: Lens' ManagementGoalsGet' Text +mggAccountId + = lens _mggAccountId (\ s a -> s{_mggAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mggKey :: Lens' ManagementGoalsGet' (Maybe Text) +mggKey = lens _mggKey (\ s a -> s{_mggKey = a}) + +-- | OAuth 2.0 token for the current user. +mggOauthToken :: Lens' ManagementGoalsGet' (Maybe Text) +mggOauthToken + = lens _mggOauthToken + (\ s a -> s{_mggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mggFields :: Lens' ManagementGoalsGet' (Maybe Text) +mggFields + = lens _mggFields (\ s a -> s{_mggFields = a}) + +-- | Data format for the response. +mggAlt :: Lens' ManagementGoalsGet' Text +mggAlt = lens _mggAlt (\ s a -> s{_mggAlt = a}) + +instance GoogleRequest ManagementGoalsGet' where + type Rs ManagementGoalsGet' = Goal + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementGoalsGet{..} + = go _mggQuotaUser _mggPrettyPrint _mggWebPropertyId + _mggGoalId + _mggUserIp + _mggProfileId + _mggAccountId + _mggKey + _mggOauthToken + _mggFields + _mggAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementGoalsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Insert.hs new file mode 100644 index 000000000..05fcd720b --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Insert.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Goals.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new goal. +-- +-- /See:/ for @AnalyticsManagementGoalsInsert@. +module Analytics.Management.Goals.Insert + ( + -- * REST Resource + ManagementGoalsInsertAPI + + -- * Creating a Request + , managementGoalsInsert + , ManagementGoalsInsert + + -- * Request Lenses + , mgiQuotaUser + , mgiPrettyPrint + , mgiWebPropertyId + , mgiUserIp + , mgiProfileId + , mgiAccountId + , mgiKey + , mgiOauthToken + , mgiFields + , mgiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementGoalsInsert@ which the +-- 'ManagementGoalsInsert' request conforms to. +type ManagementGoalsInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "goals" :> Post '[JSON] Goal + +-- | Create a new goal. +-- +-- /See:/ 'managementGoalsInsert' smart constructor. +data ManagementGoalsInsert = ManagementGoalsInsert + { _mgiQuotaUser :: !(Maybe Text) + , _mgiPrettyPrint :: !Bool + , _mgiWebPropertyId :: !Text + , _mgiUserIp :: !(Maybe Text) + , _mgiProfileId :: !Text + , _mgiAccountId :: !Text + , _mgiKey :: !(Maybe Text) + , _mgiOauthToken :: !(Maybe Text) + , _mgiFields :: !(Maybe Text) + , _mgiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementGoalsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgiQuotaUser' +-- +-- * 'mgiPrettyPrint' +-- +-- * 'mgiWebPropertyId' +-- +-- * 'mgiUserIp' +-- +-- * 'mgiProfileId' +-- +-- * 'mgiAccountId' +-- +-- * 'mgiKey' +-- +-- * 'mgiOauthToken' +-- +-- * 'mgiFields' +-- +-- * 'mgiAlt' +managementGoalsInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementGoalsInsert +managementGoalsInsert pMgiWebPropertyId_ pMgiProfileId_ pMgiAccountId_ = + ManagementGoalsInsert + { _mgiQuotaUser = Nothing + , _mgiPrettyPrint = False + , _mgiWebPropertyId = pMgiWebPropertyId_ + , _mgiUserIp = Nothing + , _mgiProfileId = pMgiProfileId_ + , _mgiAccountId = pMgiAccountId_ + , _mgiKey = Nothing + , _mgiOauthToken = Nothing + , _mgiFields = Nothing + , _mgiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgiQuotaUser :: Lens' ManagementGoalsInsert' (Maybe Text) +mgiQuotaUser + = lens _mgiQuotaUser (\ s a -> s{_mgiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgiPrettyPrint :: Lens' ManagementGoalsInsert' Bool +mgiPrettyPrint + = lens _mgiPrettyPrint + (\ s a -> s{_mgiPrettyPrint = a}) + +-- | Web property ID to create the goal for. +mgiWebPropertyId :: Lens' ManagementGoalsInsert' Text +mgiWebPropertyId + = lens _mgiWebPropertyId + (\ s a -> s{_mgiWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgiUserIp :: Lens' ManagementGoalsInsert' (Maybe Text) +mgiUserIp + = lens _mgiUserIp (\ s a -> s{_mgiUserIp = a}) + +-- | View (Profile) ID to create the goal for. +mgiProfileId :: Lens' ManagementGoalsInsert' Text +mgiProfileId + = lens _mgiProfileId (\ s a -> s{_mgiProfileId = a}) + +-- | Account ID to create the goal for. +mgiAccountId :: Lens' ManagementGoalsInsert' Text +mgiAccountId + = lens _mgiAccountId (\ s a -> s{_mgiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgiKey :: Lens' ManagementGoalsInsert' (Maybe Text) +mgiKey = lens _mgiKey (\ s a -> s{_mgiKey = a}) + +-- | OAuth 2.0 token for the current user. +mgiOauthToken :: Lens' ManagementGoalsInsert' (Maybe Text) +mgiOauthToken + = lens _mgiOauthToken + (\ s a -> s{_mgiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgiFields :: Lens' ManagementGoalsInsert' (Maybe Text) +mgiFields + = lens _mgiFields (\ s a -> s{_mgiFields = a}) + +-- | Data format for the response. +mgiAlt :: Lens' ManagementGoalsInsert' Text +mgiAlt = lens _mgiAlt (\ s a -> s{_mgiAlt = a}) + +instance GoogleRequest ManagementGoalsInsert' where + type Rs ManagementGoalsInsert' = Goal + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementGoalsInsert{..} + = go _mgiQuotaUser _mgiPrettyPrint _mgiWebPropertyId + _mgiUserIp + _mgiProfileId + _mgiAccountId + _mgiKey + _mgiOauthToken + _mgiFields + _mgiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementGoalsInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/List.hs new file mode 100644 index 000000000..202584689 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Goals.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists goals to which the user has access. +-- +-- /See:/ for @AnalyticsManagementGoalsList@. +module Analytics.Management.Goals.List + ( + -- * REST Resource + ManagementGoalsListAPI + + -- * Creating a Request + , managementGoalsList + , ManagementGoalsList + + -- * Request Lenses + , mglQuotaUser + , mglPrettyPrint + , mglWebPropertyId + , mglUserIp + , mglProfileId + , mglAccountId + , mglKey + , mglOauthToken + , mglStartIndex + , mglMaxResults + , mglFields + , mglAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementGoalsList@ which the +-- 'ManagementGoalsList' request conforms to. +type ManagementGoalsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "goals" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> Get '[JSON] Goals + +-- | Lists goals to which the user has access. +-- +-- /See:/ 'managementGoalsList' smart constructor. +data ManagementGoalsList = ManagementGoalsList + { _mglQuotaUser :: !(Maybe Text) + , _mglPrettyPrint :: !Bool + , _mglWebPropertyId :: !Text + , _mglUserIp :: !(Maybe Text) + , _mglProfileId :: !Text + , _mglAccountId :: !Text + , _mglKey :: !(Maybe Text) + , _mglOauthToken :: !(Maybe Text) + , _mglStartIndex :: !(Maybe Int32) + , _mglMaxResults :: !(Maybe Int32) + , _mglFields :: !(Maybe Text) + , _mglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementGoalsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mglQuotaUser' +-- +-- * 'mglPrettyPrint' +-- +-- * 'mglWebPropertyId' +-- +-- * 'mglUserIp' +-- +-- * 'mglProfileId' +-- +-- * 'mglAccountId' +-- +-- * 'mglKey' +-- +-- * 'mglOauthToken' +-- +-- * 'mglStartIndex' +-- +-- * 'mglMaxResults' +-- +-- * 'mglFields' +-- +-- * 'mglAlt' +managementGoalsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementGoalsList +managementGoalsList pMglWebPropertyId_ pMglProfileId_ pMglAccountId_ = + ManagementGoalsList + { _mglQuotaUser = Nothing + , _mglPrettyPrint = False + , _mglWebPropertyId = pMglWebPropertyId_ + , _mglUserIp = Nothing + , _mglProfileId = pMglProfileId_ + , _mglAccountId = pMglAccountId_ + , _mglKey = Nothing + , _mglOauthToken = Nothing + , _mglStartIndex = Nothing + , _mglMaxResults = Nothing + , _mglFields = Nothing + , _mglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mglQuotaUser :: Lens' ManagementGoalsList' (Maybe Text) +mglQuotaUser + = lens _mglQuotaUser (\ s a -> s{_mglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mglPrettyPrint :: Lens' ManagementGoalsList' Bool +mglPrettyPrint + = lens _mglPrettyPrint + (\ s a -> s{_mglPrettyPrint = a}) + +-- | Web property ID to retrieve goals for. Can either be a specific web +-- property ID or \'~all\', which refers to all the web properties that +-- user has access to. +mglWebPropertyId :: Lens' ManagementGoalsList' Text +mglWebPropertyId + = lens _mglWebPropertyId + (\ s a -> s{_mglWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mglUserIp :: Lens' ManagementGoalsList' (Maybe Text) +mglUserIp + = lens _mglUserIp (\ s a -> s{_mglUserIp = a}) + +-- | View (Profile) ID to retrieve goals for. Can either be a specific view +-- (profile) ID or \'~all\', which refers to all the views (profiles) that +-- user has access to. +mglProfileId :: Lens' ManagementGoalsList' Text +mglProfileId + = lens _mglProfileId (\ s a -> s{_mglProfileId = a}) + +-- | Account ID to retrieve goals for. Can either be a specific account ID or +-- \'~all\', which refers to all the accounts that user has access to. +mglAccountId :: Lens' ManagementGoalsList' Text +mglAccountId + = lens _mglAccountId (\ s a -> s{_mglAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mglKey :: Lens' ManagementGoalsList' (Maybe Text) +mglKey = lens _mglKey (\ s a -> s{_mglKey = a}) + +-- | OAuth 2.0 token for the current user. +mglOauthToken :: Lens' ManagementGoalsList' (Maybe Text) +mglOauthToken + = lens _mglOauthToken + (\ s a -> s{_mglOauthToken = a}) + +-- | An index of the first goal to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mglStartIndex :: Lens' ManagementGoalsList' (Maybe Int32) +mglStartIndex + = lens _mglStartIndex + (\ s a -> s{_mglStartIndex = a}) + +-- | The maximum number of goals to include in this response. +mglMaxResults :: Lens' ManagementGoalsList' (Maybe Int32) +mglMaxResults + = lens _mglMaxResults + (\ s a -> s{_mglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mglFields :: Lens' ManagementGoalsList' (Maybe Text) +mglFields + = lens _mglFields (\ s a -> s{_mglFields = a}) + +-- | Data format for the response. +mglAlt :: Lens' ManagementGoalsList' Text +mglAlt = lens _mglAlt (\ s a -> s{_mglAlt = a}) + +instance GoogleRequest ManagementGoalsList' where + type Rs ManagementGoalsList' = Goals + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementGoalsList{..} + = go _mglQuotaUser _mglPrettyPrint _mglWebPropertyId + _mglUserIp + _mglProfileId + _mglAccountId + _mglKey + _mglOauthToken + _mglStartIndex + _mglMaxResults + _mglFields + _mglAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementGoalsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Patch.hs new file mode 100644 index 000000000..90803631f --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Patch.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Goals.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing view (profile). This method supports patch +-- semantics. +-- +-- /See:/ for @AnalyticsManagementGoalsPatch@. +module Analytics.Management.Goals.Patch + ( + -- * REST Resource + ManagementGoalsPatchAPI + + -- * Creating a Request + , managementGoalsPatch + , ManagementGoalsPatch + + -- * Request Lenses + , mgpQuotaUser + , mgpPrettyPrint + , mgpWebPropertyId + , mgpGoalId + , mgpUserIp + , mgpProfileId + , mgpAccountId + , mgpKey + , mgpOauthToken + , mgpFields + , mgpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementGoalsPatch@ which the +-- 'ManagementGoalsPatch' request conforms to. +type ManagementGoalsPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "goals" :> + Capture "goalId" Text :> Patch '[JSON] Goal + +-- | Updates an existing view (profile). This method supports patch +-- semantics. +-- +-- /See:/ 'managementGoalsPatch' smart constructor. +data ManagementGoalsPatch = ManagementGoalsPatch + { _mgpQuotaUser :: !(Maybe Text) + , _mgpPrettyPrint :: !Bool + , _mgpWebPropertyId :: !Text + , _mgpGoalId :: !Text + , _mgpUserIp :: !(Maybe Text) + , _mgpProfileId :: !Text + , _mgpAccountId :: !Text + , _mgpKey :: !(Maybe Text) + , _mgpOauthToken :: !(Maybe Text) + , _mgpFields :: !(Maybe Text) + , _mgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementGoalsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgpQuotaUser' +-- +-- * 'mgpPrettyPrint' +-- +-- * 'mgpWebPropertyId' +-- +-- * 'mgpGoalId' +-- +-- * 'mgpUserIp' +-- +-- * 'mgpProfileId' +-- +-- * 'mgpAccountId' +-- +-- * 'mgpKey' +-- +-- * 'mgpOauthToken' +-- +-- * 'mgpFields' +-- +-- * 'mgpAlt' +managementGoalsPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'goalId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementGoalsPatch +managementGoalsPatch pMgpWebPropertyId_ pMgpGoalId_ pMgpProfileId_ pMgpAccountId_ = + ManagementGoalsPatch + { _mgpQuotaUser = Nothing + , _mgpPrettyPrint = False + , _mgpWebPropertyId = pMgpWebPropertyId_ + , _mgpGoalId = pMgpGoalId_ + , _mgpUserIp = Nothing + , _mgpProfileId = pMgpProfileId_ + , _mgpAccountId = pMgpAccountId_ + , _mgpKey = Nothing + , _mgpOauthToken = Nothing + , _mgpFields = Nothing + , _mgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgpQuotaUser :: Lens' ManagementGoalsPatch' (Maybe Text) +mgpQuotaUser + = lens _mgpQuotaUser (\ s a -> s{_mgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgpPrettyPrint :: Lens' ManagementGoalsPatch' Bool +mgpPrettyPrint + = lens _mgpPrettyPrint + (\ s a -> s{_mgpPrettyPrint = a}) + +-- | Web property ID to update the goal. +mgpWebPropertyId :: Lens' ManagementGoalsPatch' Text +mgpWebPropertyId + = lens _mgpWebPropertyId + (\ s a -> s{_mgpWebPropertyId = a}) + +-- | Index of the goal to be updated. +mgpGoalId :: Lens' ManagementGoalsPatch' Text +mgpGoalId + = lens _mgpGoalId (\ s a -> s{_mgpGoalId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgpUserIp :: Lens' ManagementGoalsPatch' (Maybe Text) +mgpUserIp + = lens _mgpUserIp (\ s a -> s{_mgpUserIp = a}) + +-- | View (Profile) ID to update the goal. +mgpProfileId :: Lens' ManagementGoalsPatch' Text +mgpProfileId + = lens _mgpProfileId (\ s a -> s{_mgpProfileId = a}) + +-- | Account ID to update the goal. +mgpAccountId :: Lens' ManagementGoalsPatch' Text +mgpAccountId + = lens _mgpAccountId (\ s a -> s{_mgpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgpKey :: Lens' ManagementGoalsPatch' (Maybe Text) +mgpKey = lens _mgpKey (\ s a -> s{_mgpKey = a}) + +-- | OAuth 2.0 token for the current user. +mgpOauthToken :: Lens' ManagementGoalsPatch' (Maybe Text) +mgpOauthToken + = lens _mgpOauthToken + (\ s a -> s{_mgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgpFields :: Lens' ManagementGoalsPatch' (Maybe Text) +mgpFields + = lens _mgpFields (\ s a -> s{_mgpFields = a}) + +-- | Data format for the response. +mgpAlt :: Lens' ManagementGoalsPatch' Text +mgpAlt = lens _mgpAlt (\ s a -> s{_mgpAlt = a}) + +instance GoogleRequest ManagementGoalsPatch' where + type Rs ManagementGoalsPatch' = Goal + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementGoalsPatch{..} + = go _mgpQuotaUser _mgpPrettyPrint _mgpWebPropertyId + _mgpGoalId + _mgpUserIp + _mgpProfileId + _mgpAccountId + _mgpKey + _mgpOauthToken + _mgpFields + _mgpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementGoalsPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Update.hs new file mode 100644 index 000000000..1d3429e47 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Update.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Goals.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing view (profile). +-- +-- /See:/ for @AnalyticsManagementGoalsUpdate@. +module Analytics.Management.Goals.Update + ( + -- * REST Resource + ManagementGoalsUpdateAPI + + -- * Creating a Request + , managementGoalsUpdate + , ManagementGoalsUpdate + + -- * Request Lenses + , mguQuotaUser + , mguPrettyPrint + , mguWebPropertyId + , mguGoalId + , mguUserIp + , mguProfileId + , mguAccountId + , mguKey + , mguOauthToken + , mguFields + , mguAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementGoalsUpdate@ which the +-- 'ManagementGoalsUpdate' request conforms to. +type ManagementGoalsUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "goals" :> Capture "goalId" Text :> Put '[JSON] Goal + +-- | Updates an existing view (profile). +-- +-- /See:/ 'managementGoalsUpdate' smart constructor. +data ManagementGoalsUpdate = ManagementGoalsUpdate + { _mguQuotaUser :: !(Maybe Text) + , _mguPrettyPrint :: !Bool + , _mguWebPropertyId :: !Text + , _mguGoalId :: !Text + , _mguUserIp :: !(Maybe Text) + , _mguProfileId :: !Text + , _mguAccountId :: !Text + , _mguKey :: !(Maybe Text) + , _mguOauthToken :: !(Maybe Text) + , _mguFields :: !(Maybe Text) + , _mguAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementGoalsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mguQuotaUser' +-- +-- * 'mguPrettyPrint' +-- +-- * 'mguWebPropertyId' +-- +-- * 'mguGoalId' +-- +-- * 'mguUserIp' +-- +-- * 'mguProfileId' +-- +-- * 'mguAccountId' +-- +-- * 'mguKey' +-- +-- * 'mguOauthToken' +-- +-- * 'mguFields' +-- +-- * 'mguAlt' +managementGoalsUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'goalId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementGoalsUpdate +managementGoalsUpdate pMguWebPropertyId_ pMguGoalId_ pMguProfileId_ pMguAccountId_ = + ManagementGoalsUpdate + { _mguQuotaUser = Nothing + , _mguPrettyPrint = False + , _mguWebPropertyId = pMguWebPropertyId_ + , _mguGoalId = pMguGoalId_ + , _mguUserIp = Nothing + , _mguProfileId = pMguProfileId_ + , _mguAccountId = pMguAccountId_ + , _mguKey = Nothing + , _mguOauthToken = Nothing + , _mguFields = Nothing + , _mguAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mguQuotaUser :: Lens' ManagementGoalsUpdate' (Maybe Text) +mguQuotaUser + = lens _mguQuotaUser (\ s a -> s{_mguQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mguPrettyPrint :: Lens' ManagementGoalsUpdate' Bool +mguPrettyPrint + = lens _mguPrettyPrint + (\ s a -> s{_mguPrettyPrint = a}) + +-- | Web property ID to update the goal. +mguWebPropertyId :: Lens' ManagementGoalsUpdate' Text +mguWebPropertyId + = lens _mguWebPropertyId + (\ s a -> s{_mguWebPropertyId = a}) + +-- | Index of the goal to be updated. +mguGoalId :: Lens' ManagementGoalsUpdate' Text +mguGoalId + = lens _mguGoalId (\ s a -> s{_mguGoalId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mguUserIp :: Lens' ManagementGoalsUpdate' (Maybe Text) +mguUserIp + = lens _mguUserIp (\ s a -> s{_mguUserIp = a}) + +-- | View (Profile) ID to update the goal. +mguProfileId :: Lens' ManagementGoalsUpdate' Text +mguProfileId + = lens _mguProfileId (\ s a -> s{_mguProfileId = a}) + +-- | Account ID to update the goal. +mguAccountId :: Lens' ManagementGoalsUpdate' Text +mguAccountId + = lens _mguAccountId (\ s a -> s{_mguAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mguKey :: Lens' ManagementGoalsUpdate' (Maybe Text) +mguKey = lens _mguKey (\ s a -> s{_mguKey = a}) + +-- | OAuth 2.0 token for the current user. +mguOauthToken :: Lens' ManagementGoalsUpdate' (Maybe Text) +mguOauthToken + = lens _mguOauthToken + (\ s a -> s{_mguOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mguFields :: Lens' ManagementGoalsUpdate' (Maybe Text) +mguFields + = lens _mguFields (\ s a -> s{_mguFields = a}) + +-- | Data format for the response. +mguAlt :: Lens' ManagementGoalsUpdate' Text +mguAlt = lens _mguAlt (\ s a -> s{_mguAlt = a}) + +instance GoogleRequest ManagementGoalsUpdate' where + type Rs ManagementGoalsUpdate' = Goal + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementGoalsUpdate{..} + = go _mguQuotaUser _mguPrettyPrint _mguWebPropertyId + _mguGoalId + _mguUserIp + _mguProfileId + _mguAccountId + _mguKey + _mguOauthToken + _mguFields + _mguAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementGoalsUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Delete.hs new file mode 100644 index 000000000..66ab9d3e2 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Delete.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a profile filter link. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksDelete@. +module Analytics.Management.ProfileFilterLinks.Delete + ( + -- * REST Resource + ManagementProfileFilterLinksDeleteAPI + + -- * Creating a Request + , managementProfileFilterLinksDelete + , ManagementProfileFilterLinksDelete + + -- * Request Lenses + , mpfldQuotaUser + , mpfldPrettyPrint + , mpfldWebPropertyId + , mpfldUserIp + , mpfldProfileId + , mpfldAccountId + , mpfldKey + , mpfldLinkId + , mpfldOauthToken + , mpfldFields + , mpfldAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksDelete@ which the +-- 'ManagementProfileFilterLinksDelete' request conforms to. +type ManagementProfileFilterLinksDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + Capture "linkId" Text :> Delete '[JSON] () + +-- | Delete a profile filter link. +-- +-- /See:/ 'managementProfileFilterLinksDelete' smart constructor. +data ManagementProfileFilterLinksDelete = ManagementProfileFilterLinksDelete + { _mpfldQuotaUser :: !(Maybe Text) + , _mpfldPrettyPrint :: !Bool + , _mpfldWebPropertyId :: !Text + , _mpfldUserIp :: !(Maybe Text) + , _mpfldProfileId :: !Text + , _mpfldAccountId :: !Text + , _mpfldKey :: !(Maybe Text) + , _mpfldLinkId :: !Text + , _mpfldOauthToken :: !(Maybe Text) + , _mpfldFields :: !(Maybe Text) + , _mpfldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpfldQuotaUser' +-- +-- * 'mpfldPrettyPrint' +-- +-- * 'mpfldWebPropertyId' +-- +-- * 'mpfldUserIp' +-- +-- * 'mpfldProfileId' +-- +-- * 'mpfldAccountId' +-- +-- * 'mpfldKey' +-- +-- * 'mpfldLinkId' +-- +-- * 'mpfldOauthToken' +-- +-- * 'mpfldFields' +-- +-- * 'mpfldAlt' +managementProfileFilterLinksDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileFilterLinksDelete +managementProfileFilterLinksDelete pMpfldWebPropertyId_ pMpfldProfileId_ pMpfldAccountId_ pMpfldLinkId_ = + ManagementProfileFilterLinksDelete + { _mpfldQuotaUser = Nothing + , _mpfldPrettyPrint = False + , _mpfldWebPropertyId = pMpfldWebPropertyId_ + , _mpfldUserIp = Nothing + , _mpfldProfileId = pMpfldProfileId_ + , _mpfldAccountId = pMpfldAccountId_ + , _mpfldKey = Nothing + , _mpfldLinkId = pMpfldLinkId_ + , _mpfldOauthToken = Nothing + , _mpfldFields = Nothing + , _mpfldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpfldQuotaUser :: Lens' ManagementProfileFilterLinksDelete' (Maybe Text) +mpfldQuotaUser + = lens _mpfldQuotaUser + (\ s a -> s{_mpfldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpfldPrettyPrint :: Lens' ManagementProfileFilterLinksDelete' Bool +mpfldPrettyPrint + = lens _mpfldPrettyPrint + (\ s a -> s{_mpfldPrettyPrint = a}) + +-- | Web property Id to which the profile filter link belongs. +mpfldWebPropertyId :: Lens' ManagementProfileFilterLinksDelete' Text +mpfldWebPropertyId + = lens _mpfldWebPropertyId + (\ s a -> s{_mpfldWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpfldUserIp :: Lens' ManagementProfileFilterLinksDelete' (Maybe Text) +mpfldUserIp + = lens _mpfldUserIp (\ s a -> s{_mpfldUserIp = a}) + +-- | Profile ID to which the filter link belongs. +mpfldProfileId :: Lens' ManagementProfileFilterLinksDelete' Text +mpfldProfileId + = lens _mpfldProfileId + (\ s a -> s{_mpfldProfileId = a}) + +-- | Account ID to which the profile filter link belongs. +mpfldAccountId :: Lens' ManagementProfileFilterLinksDelete' Text +mpfldAccountId + = lens _mpfldAccountId + (\ s a -> s{_mpfldAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpfldKey :: Lens' ManagementProfileFilterLinksDelete' (Maybe Text) +mpfldKey = lens _mpfldKey (\ s a -> s{_mpfldKey = a}) + +-- | ID of the profile filter link to delete. +mpfldLinkId :: Lens' ManagementProfileFilterLinksDelete' Text +mpfldLinkId + = lens _mpfldLinkId (\ s a -> s{_mpfldLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpfldOauthToken :: Lens' ManagementProfileFilterLinksDelete' (Maybe Text) +mpfldOauthToken + = lens _mpfldOauthToken + (\ s a -> s{_mpfldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpfldFields :: Lens' ManagementProfileFilterLinksDelete' (Maybe Text) +mpfldFields + = lens _mpfldFields (\ s a -> s{_mpfldFields = a}) + +-- | Data format for the response. +mpfldAlt :: Lens' ManagementProfileFilterLinksDelete' Text +mpfldAlt = lens _mpfldAlt (\ s a -> s{_mpfldAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksDelete' where + type Rs ManagementProfileFilterLinksDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksDelete{..} + = go _mpfldQuotaUser _mpfldPrettyPrint + _mpfldWebPropertyId + _mpfldUserIp + _mpfldProfileId + _mpfldAccountId + _mpfldKey + _mpfldLinkId + _mpfldOauthToken + _mpfldFields + _mpfldAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementProfileFilterLinksDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Get.hs new file mode 100644 index 000000000..3b6f4de2f --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Get.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a single profile filter link. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksGet@. +module Analytics.Management.ProfileFilterLinks.Get + ( + -- * REST Resource + ManagementProfileFilterLinksGetAPI + + -- * Creating a Request + , managementProfileFilterLinksGet + , ManagementProfileFilterLinksGet + + -- * Request Lenses + , mpflgQuotaUser + , mpflgPrettyPrint + , mpflgWebPropertyId + , mpflgUserIp + , mpflgProfileId + , mpflgAccountId + , mpflgKey + , mpflgLinkId + , mpflgOauthToken + , mpflgFields + , mpflgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksGet@ which the +-- 'ManagementProfileFilterLinksGet' request conforms to. +type ManagementProfileFilterLinksGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + Capture "linkId" Text :> + Get '[JSON] ProfileFilterLink + +-- | Returns a single profile filter link. +-- +-- /See:/ 'managementProfileFilterLinksGet' smart constructor. +data ManagementProfileFilterLinksGet = ManagementProfileFilterLinksGet + { _mpflgQuotaUser :: !(Maybe Text) + , _mpflgPrettyPrint :: !Bool + , _mpflgWebPropertyId :: !Text + , _mpflgUserIp :: !(Maybe Text) + , _mpflgProfileId :: !Text + , _mpflgAccountId :: !Text + , _mpflgKey :: !(Maybe Text) + , _mpflgLinkId :: !Text + , _mpflgOauthToken :: !(Maybe Text) + , _mpflgFields :: !(Maybe Text) + , _mpflgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpflgQuotaUser' +-- +-- * 'mpflgPrettyPrint' +-- +-- * 'mpflgWebPropertyId' +-- +-- * 'mpflgUserIp' +-- +-- * 'mpflgProfileId' +-- +-- * 'mpflgAccountId' +-- +-- * 'mpflgKey' +-- +-- * 'mpflgLinkId' +-- +-- * 'mpflgOauthToken' +-- +-- * 'mpflgFields' +-- +-- * 'mpflgAlt' +managementProfileFilterLinksGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileFilterLinksGet +managementProfileFilterLinksGet pMpflgWebPropertyId_ pMpflgProfileId_ pMpflgAccountId_ pMpflgLinkId_ = + ManagementProfileFilterLinksGet + { _mpflgQuotaUser = Nothing + , _mpflgPrettyPrint = False + , _mpflgWebPropertyId = pMpflgWebPropertyId_ + , _mpflgUserIp = Nothing + , _mpflgProfileId = pMpflgProfileId_ + , _mpflgAccountId = pMpflgAccountId_ + , _mpflgKey = Nothing + , _mpflgLinkId = pMpflgLinkId_ + , _mpflgOauthToken = Nothing + , _mpflgFields = Nothing + , _mpflgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpflgQuotaUser :: Lens' ManagementProfileFilterLinksGet' (Maybe Text) +mpflgQuotaUser + = lens _mpflgQuotaUser + (\ s a -> s{_mpflgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpflgPrettyPrint :: Lens' ManagementProfileFilterLinksGet' Bool +mpflgPrettyPrint + = lens _mpflgPrettyPrint + (\ s a -> s{_mpflgPrettyPrint = a}) + +-- | Web property Id to retrieve profile filter link for. +mpflgWebPropertyId :: Lens' ManagementProfileFilterLinksGet' Text +mpflgWebPropertyId + = lens _mpflgWebPropertyId + (\ s a -> s{_mpflgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpflgUserIp :: Lens' ManagementProfileFilterLinksGet' (Maybe Text) +mpflgUserIp + = lens _mpflgUserIp (\ s a -> s{_mpflgUserIp = a}) + +-- | Profile ID to retrieve filter link for. +mpflgProfileId :: Lens' ManagementProfileFilterLinksGet' Text +mpflgProfileId + = lens _mpflgProfileId + (\ s a -> s{_mpflgProfileId = a}) + +-- | Account ID to retrieve profile filter link for. +mpflgAccountId :: Lens' ManagementProfileFilterLinksGet' Text +mpflgAccountId + = lens _mpflgAccountId + (\ s a -> s{_mpflgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpflgKey :: Lens' ManagementProfileFilterLinksGet' (Maybe Text) +mpflgKey = lens _mpflgKey (\ s a -> s{_mpflgKey = a}) + +-- | ID of the profile filter link. +mpflgLinkId :: Lens' ManagementProfileFilterLinksGet' Text +mpflgLinkId + = lens _mpflgLinkId (\ s a -> s{_mpflgLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpflgOauthToken :: Lens' ManagementProfileFilterLinksGet' (Maybe Text) +mpflgOauthToken + = lens _mpflgOauthToken + (\ s a -> s{_mpflgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpflgFields :: Lens' ManagementProfileFilterLinksGet' (Maybe Text) +mpflgFields + = lens _mpflgFields (\ s a -> s{_mpflgFields = a}) + +-- | Data format for the response. +mpflgAlt :: Lens' ManagementProfileFilterLinksGet' Text +mpflgAlt = lens _mpflgAlt (\ s a -> s{_mpflgAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksGet' where + type Rs ManagementProfileFilterLinksGet' = + ProfileFilterLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksGet{..} + = go _mpflgQuotaUser _mpflgPrettyPrint + _mpflgWebPropertyId + _mpflgUserIp + _mpflgProfileId + _mpflgAccountId + _mpflgKey + _mpflgLinkId + _mpflgOauthToken + _mpflgFields + _mpflgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileFilterLinksGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Insert.hs new file mode 100644 index 000000000..61f56322c --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Insert.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new profile filter link. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksInsert@. +module Analytics.Management.ProfileFilterLinks.Insert + ( + -- * REST Resource + ManagementProfileFilterLinksInsertAPI + + -- * Creating a Request + , managementProfileFilterLinksInsert + , ManagementProfileFilterLinksInsert + + -- * Request Lenses + , mpfliQuotaUser + , mpfliPrettyPrint + , mpfliWebPropertyId + , mpfliUserIp + , mpfliProfileId + , mpfliAccountId + , mpfliKey + , mpfliOauthToken + , mpfliFields + , mpfliAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksInsert@ which the +-- 'ManagementProfileFilterLinksInsert' request conforms to. +type ManagementProfileFilterLinksInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + Post '[JSON] ProfileFilterLink + +-- | Create a new profile filter link. +-- +-- /See:/ 'managementProfileFilterLinksInsert' smart constructor. +data ManagementProfileFilterLinksInsert = ManagementProfileFilterLinksInsert + { _mpfliQuotaUser :: !(Maybe Text) + , _mpfliPrettyPrint :: !Bool + , _mpfliWebPropertyId :: !Text + , _mpfliUserIp :: !(Maybe Text) + , _mpfliProfileId :: !Text + , _mpfliAccountId :: !Text + , _mpfliKey :: !(Maybe Text) + , _mpfliOauthToken :: !(Maybe Text) + , _mpfliFields :: !(Maybe Text) + , _mpfliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpfliQuotaUser' +-- +-- * 'mpfliPrettyPrint' +-- +-- * 'mpfliWebPropertyId' +-- +-- * 'mpfliUserIp' +-- +-- * 'mpfliProfileId' +-- +-- * 'mpfliAccountId' +-- +-- * 'mpfliKey' +-- +-- * 'mpfliOauthToken' +-- +-- * 'mpfliFields' +-- +-- * 'mpfliAlt' +managementProfileFilterLinksInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfileFilterLinksInsert +managementProfileFilterLinksInsert pMpfliWebPropertyId_ pMpfliProfileId_ pMpfliAccountId_ = + ManagementProfileFilterLinksInsert + { _mpfliQuotaUser = Nothing + , _mpfliPrettyPrint = False + , _mpfliWebPropertyId = pMpfliWebPropertyId_ + , _mpfliUserIp = Nothing + , _mpfliProfileId = pMpfliProfileId_ + , _mpfliAccountId = pMpfliAccountId_ + , _mpfliKey = Nothing + , _mpfliOauthToken = Nothing + , _mpfliFields = Nothing + , _mpfliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpfliQuotaUser :: Lens' ManagementProfileFilterLinksInsert' (Maybe Text) +mpfliQuotaUser + = lens _mpfliQuotaUser + (\ s a -> s{_mpfliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpfliPrettyPrint :: Lens' ManagementProfileFilterLinksInsert' Bool +mpfliPrettyPrint + = lens _mpfliPrettyPrint + (\ s a -> s{_mpfliPrettyPrint = a}) + +-- | Web property Id to create profile filter link for. +mpfliWebPropertyId :: Lens' ManagementProfileFilterLinksInsert' Text +mpfliWebPropertyId + = lens _mpfliWebPropertyId + (\ s a -> s{_mpfliWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpfliUserIp :: Lens' ManagementProfileFilterLinksInsert' (Maybe Text) +mpfliUserIp + = lens _mpfliUserIp (\ s a -> s{_mpfliUserIp = a}) + +-- | Profile ID to create filter link for. +mpfliProfileId :: Lens' ManagementProfileFilterLinksInsert' Text +mpfliProfileId + = lens _mpfliProfileId + (\ s a -> s{_mpfliProfileId = a}) + +-- | Account ID to create profile filter link for. +mpfliAccountId :: Lens' ManagementProfileFilterLinksInsert' Text +mpfliAccountId + = lens _mpfliAccountId + (\ s a -> s{_mpfliAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpfliKey :: Lens' ManagementProfileFilterLinksInsert' (Maybe Text) +mpfliKey = lens _mpfliKey (\ s a -> s{_mpfliKey = a}) + +-- | OAuth 2.0 token for the current user. +mpfliOauthToken :: Lens' ManagementProfileFilterLinksInsert' (Maybe Text) +mpfliOauthToken + = lens _mpfliOauthToken + (\ s a -> s{_mpfliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpfliFields :: Lens' ManagementProfileFilterLinksInsert' (Maybe Text) +mpfliFields + = lens _mpfliFields (\ s a -> s{_mpfliFields = a}) + +-- | Data format for the response. +mpfliAlt :: Lens' ManagementProfileFilterLinksInsert' Text +mpfliAlt = lens _mpfliAlt (\ s a -> s{_mpfliAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksInsert' where + type Rs ManagementProfileFilterLinksInsert' = + ProfileFilterLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksInsert{..} + = go _mpfliQuotaUser _mpfliPrettyPrint + _mpfliWebPropertyId + _mpfliUserIp + _mpfliProfileId + _mpfliAccountId + _mpfliKey + _mpfliOauthToken + _mpfliFields + _mpfliAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementProfileFilterLinksInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/List.hs new file mode 100644 index 000000000..5ad1132d0 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/List.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all profile filter links for a profile. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksList@. +module Analytics.Management.ProfileFilterLinks.List + ( + -- * REST Resource + ManagementProfileFilterLinksListAPI + + -- * Creating a Request + , managementProfileFilterLinksList + , ManagementProfileFilterLinksList + + -- * Request Lenses + , mpfllQuotaUser + , mpfllPrettyPrint + , mpfllWebPropertyId + , mpfllUserIp + , mpfllProfileId + , mpfllAccountId + , mpfllKey + , mpfllOauthToken + , mpfllStartIndex + , mpfllMaxResults + , mpfllFields + , mpfllAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksList@ which the +-- 'ManagementProfileFilterLinksList' request conforms to. +type ManagementProfileFilterLinksListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] ProfileFilterLinks + +-- | Lists all profile filter links for a profile. +-- +-- /See:/ 'managementProfileFilterLinksList' smart constructor. +data ManagementProfileFilterLinksList = ManagementProfileFilterLinksList + { _mpfllQuotaUser :: !(Maybe Text) + , _mpfllPrettyPrint :: !Bool + , _mpfllWebPropertyId :: !Text + , _mpfllUserIp :: !(Maybe Text) + , _mpfllProfileId :: !Text + , _mpfllAccountId :: !Text + , _mpfllKey :: !(Maybe Text) + , _mpfllOauthToken :: !(Maybe Text) + , _mpfllStartIndex :: !(Maybe Int32) + , _mpfllMaxResults :: !(Maybe Int32) + , _mpfllFields :: !(Maybe Text) + , _mpfllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpfllQuotaUser' +-- +-- * 'mpfllPrettyPrint' +-- +-- * 'mpfllWebPropertyId' +-- +-- * 'mpfllUserIp' +-- +-- * 'mpfllProfileId' +-- +-- * 'mpfllAccountId' +-- +-- * 'mpfllKey' +-- +-- * 'mpfllOauthToken' +-- +-- * 'mpfllStartIndex' +-- +-- * 'mpfllMaxResults' +-- +-- * 'mpfllFields' +-- +-- * 'mpfllAlt' +managementProfileFilterLinksList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfileFilterLinksList +managementProfileFilterLinksList pMpfllWebPropertyId_ pMpfllProfileId_ pMpfllAccountId_ = + ManagementProfileFilterLinksList + { _mpfllQuotaUser = Nothing + , _mpfllPrettyPrint = False + , _mpfllWebPropertyId = pMpfllWebPropertyId_ + , _mpfllUserIp = Nothing + , _mpfllProfileId = pMpfllProfileId_ + , _mpfllAccountId = pMpfllAccountId_ + , _mpfllKey = Nothing + , _mpfllOauthToken = Nothing + , _mpfllStartIndex = Nothing + , _mpfllMaxResults = Nothing + , _mpfllFields = Nothing + , _mpfllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpfllQuotaUser :: Lens' ManagementProfileFilterLinksList' (Maybe Text) +mpfllQuotaUser + = lens _mpfllQuotaUser + (\ s a -> s{_mpfllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpfllPrettyPrint :: Lens' ManagementProfileFilterLinksList' Bool +mpfllPrettyPrint + = lens _mpfllPrettyPrint + (\ s a -> s{_mpfllPrettyPrint = a}) + +-- | Web property Id for profile filter links for. Can either be a specific +-- web property ID or \'~all\', which refers to all the web properties that +-- user has access to. +mpfllWebPropertyId :: Lens' ManagementProfileFilterLinksList' Text +mpfllWebPropertyId + = lens _mpfllWebPropertyId + (\ s a -> s{_mpfllWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpfllUserIp :: Lens' ManagementProfileFilterLinksList' (Maybe Text) +mpfllUserIp + = lens _mpfllUserIp (\ s a -> s{_mpfllUserIp = a}) + +-- | Profile ID to retrieve filter links for. Can either be a specific +-- profile ID or \'~all\', which refers to all the profiles that user has +-- access to. +mpfllProfileId :: Lens' ManagementProfileFilterLinksList' Text +mpfllProfileId + = lens _mpfllProfileId + (\ s a -> s{_mpfllProfileId = a}) + +-- | Account ID to retrieve profile filter links for. +mpfllAccountId :: Lens' ManagementProfileFilterLinksList' Text +mpfllAccountId + = lens _mpfllAccountId + (\ s a -> s{_mpfllAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpfllKey :: Lens' ManagementProfileFilterLinksList' (Maybe Text) +mpfllKey = lens _mpfllKey (\ s a -> s{_mpfllKey = a}) + +-- | OAuth 2.0 token for the current user. +mpfllOauthToken :: Lens' ManagementProfileFilterLinksList' (Maybe Text) +mpfllOauthToken + = lens _mpfllOauthToken + (\ s a -> s{_mpfllOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mpfllStartIndex :: Lens' ManagementProfileFilterLinksList' (Maybe Int32) +mpfllStartIndex + = lens _mpfllStartIndex + (\ s a -> s{_mpfllStartIndex = a}) + +-- | The maximum number of profile filter links to include in this response. +mpfllMaxResults :: Lens' ManagementProfileFilterLinksList' (Maybe Int32) +mpfllMaxResults + = lens _mpfllMaxResults + (\ s a -> s{_mpfllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mpfllFields :: Lens' ManagementProfileFilterLinksList' (Maybe Text) +mpfllFields + = lens _mpfllFields (\ s a -> s{_mpfllFields = a}) + +-- | Data format for the response. +mpfllAlt :: Lens' ManagementProfileFilterLinksList' Text +mpfllAlt = lens _mpfllAlt (\ s a -> s{_mpfllAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksList' where + type Rs ManagementProfileFilterLinksList' = + ProfileFilterLinks + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksList{..} + = go _mpfllQuotaUser _mpfllPrettyPrint + _mpfllWebPropertyId + _mpfllUserIp + _mpfllProfileId + _mpfllAccountId + _mpfllKey + _mpfllOauthToken + _mpfllStartIndex + _mpfllMaxResults + _mpfllFields + _mpfllAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileFilterLinksListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Patch.hs new file mode 100644 index 000000000..e45d18e51 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Patch.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update an existing profile filter link. This method supports patch +-- semantics. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksPatch@. +module Analytics.Management.ProfileFilterLinks.Patch + ( + -- * REST Resource + ManagementProfileFilterLinksPatchAPI + + -- * Creating a Request + , managementProfileFilterLinksPatch + , ManagementProfileFilterLinksPatch + + -- * Request Lenses + , mpflpQuotaUser + , mpflpPrettyPrint + , mpflpWebPropertyId + , mpflpUserIp + , mpflpProfileId + , mpflpAccountId + , mpflpKey + , mpflpLinkId + , mpflpOauthToken + , mpflpFields + , mpflpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksPatch@ which the +-- 'ManagementProfileFilterLinksPatch' request conforms to. +type ManagementProfileFilterLinksPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + Capture "linkId" Text :> + Patch '[JSON] ProfileFilterLink + +-- | Update an existing profile filter link. This method supports patch +-- semantics. +-- +-- /See:/ 'managementProfileFilterLinksPatch' smart constructor. +data ManagementProfileFilterLinksPatch = ManagementProfileFilterLinksPatch + { _mpflpQuotaUser :: !(Maybe Text) + , _mpflpPrettyPrint :: !Bool + , _mpflpWebPropertyId :: !Text + , _mpflpUserIp :: !(Maybe Text) + , _mpflpProfileId :: !Text + , _mpflpAccountId :: !Text + , _mpflpKey :: !(Maybe Text) + , _mpflpLinkId :: !Text + , _mpflpOauthToken :: !(Maybe Text) + , _mpflpFields :: !(Maybe Text) + , _mpflpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpflpQuotaUser' +-- +-- * 'mpflpPrettyPrint' +-- +-- * 'mpflpWebPropertyId' +-- +-- * 'mpflpUserIp' +-- +-- * 'mpflpProfileId' +-- +-- * 'mpflpAccountId' +-- +-- * 'mpflpKey' +-- +-- * 'mpflpLinkId' +-- +-- * 'mpflpOauthToken' +-- +-- * 'mpflpFields' +-- +-- * 'mpflpAlt' +managementProfileFilterLinksPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileFilterLinksPatch +managementProfileFilterLinksPatch pMpflpWebPropertyId_ pMpflpProfileId_ pMpflpAccountId_ pMpflpLinkId_ = + ManagementProfileFilterLinksPatch + { _mpflpQuotaUser = Nothing + , _mpflpPrettyPrint = False + , _mpflpWebPropertyId = pMpflpWebPropertyId_ + , _mpflpUserIp = Nothing + , _mpflpProfileId = pMpflpProfileId_ + , _mpflpAccountId = pMpflpAccountId_ + , _mpflpKey = Nothing + , _mpflpLinkId = pMpflpLinkId_ + , _mpflpOauthToken = Nothing + , _mpflpFields = Nothing + , _mpflpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpflpQuotaUser :: Lens' ManagementProfileFilterLinksPatch' (Maybe Text) +mpflpQuotaUser + = lens _mpflpQuotaUser + (\ s a -> s{_mpflpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpflpPrettyPrint :: Lens' ManagementProfileFilterLinksPatch' Bool +mpflpPrettyPrint + = lens _mpflpPrettyPrint + (\ s a -> s{_mpflpPrettyPrint = a}) + +-- | Web property Id to which profile filter link belongs +mpflpWebPropertyId :: Lens' ManagementProfileFilterLinksPatch' Text +mpflpWebPropertyId + = lens _mpflpWebPropertyId + (\ s a -> s{_mpflpWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpflpUserIp :: Lens' ManagementProfileFilterLinksPatch' (Maybe Text) +mpflpUserIp + = lens _mpflpUserIp (\ s a -> s{_mpflpUserIp = a}) + +-- | Profile ID to which filter link belongs +mpflpProfileId :: Lens' ManagementProfileFilterLinksPatch' Text +mpflpProfileId + = lens _mpflpProfileId + (\ s a -> s{_mpflpProfileId = a}) + +-- | Account ID to which profile filter link belongs. +mpflpAccountId :: Lens' ManagementProfileFilterLinksPatch' Text +mpflpAccountId + = lens _mpflpAccountId + (\ s a -> s{_mpflpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpflpKey :: Lens' ManagementProfileFilterLinksPatch' (Maybe Text) +mpflpKey = lens _mpflpKey (\ s a -> s{_mpflpKey = a}) + +-- | ID of the profile filter link to be updated. +mpflpLinkId :: Lens' ManagementProfileFilterLinksPatch' Text +mpflpLinkId + = lens _mpflpLinkId (\ s a -> s{_mpflpLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpflpOauthToken :: Lens' ManagementProfileFilterLinksPatch' (Maybe Text) +mpflpOauthToken + = lens _mpflpOauthToken + (\ s a -> s{_mpflpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpflpFields :: Lens' ManagementProfileFilterLinksPatch' (Maybe Text) +mpflpFields + = lens _mpflpFields (\ s a -> s{_mpflpFields = a}) + +-- | Data format for the response. +mpflpAlt :: Lens' ManagementProfileFilterLinksPatch' Text +mpflpAlt = lens _mpflpAlt (\ s a -> s{_mpflpAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksPatch' where + type Rs ManagementProfileFilterLinksPatch' = + ProfileFilterLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksPatch{..} + = go _mpflpQuotaUser _mpflpPrettyPrint + _mpflpWebPropertyId + _mpflpUserIp + _mpflpProfileId + _mpflpAccountId + _mpflpKey + _mpflpLinkId + _mpflpOauthToken + _mpflpFields + _mpflpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileFilterLinksPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Update.hs new file mode 100644 index 000000000..fabe241e3 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileFilterLinks/Update.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update an existing profile filter link. +-- +-- /See:/ for @AnalyticsManagementProfileFilterLinksUpdate@. +module Analytics.Management.ProfileFilterLinks.Update + ( + -- * REST Resource + ManagementProfileFilterLinksUpdateAPI + + -- * Creating a Request + , managementProfileFilterLinksUpdate + , ManagementProfileFilterLinksUpdate + + -- * Request Lenses + , mpfluQuotaUser + , mpfluPrettyPrint + , mpfluWebPropertyId + , mpfluUserIp + , mpfluProfileId + , mpfluAccountId + , mpfluKey + , mpfluLinkId + , mpfluOauthToken + , mpfluFields + , mpfluAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileFilterLinksUpdate@ which the +-- 'ManagementProfileFilterLinksUpdate' request conforms to. +type ManagementProfileFilterLinksUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "profileFilterLinks" :> + Capture "linkId" Text :> + Put '[JSON] ProfileFilterLink + +-- | Update an existing profile filter link. +-- +-- /See:/ 'managementProfileFilterLinksUpdate' smart constructor. +data ManagementProfileFilterLinksUpdate = ManagementProfileFilterLinksUpdate + { _mpfluQuotaUser :: !(Maybe Text) + , _mpfluPrettyPrint :: !Bool + , _mpfluWebPropertyId :: !Text + , _mpfluUserIp :: !(Maybe Text) + , _mpfluProfileId :: !Text + , _mpfluAccountId :: !Text + , _mpfluKey :: !(Maybe Text) + , _mpfluLinkId :: !Text + , _mpfluOauthToken :: !(Maybe Text) + , _mpfluFields :: !(Maybe Text) + , _mpfluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileFilterLinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpfluQuotaUser' +-- +-- * 'mpfluPrettyPrint' +-- +-- * 'mpfluWebPropertyId' +-- +-- * 'mpfluUserIp' +-- +-- * 'mpfluProfileId' +-- +-- * 'mpfluAccountId' +-- +-- * 'mpfluKey' +-- +-- * 'mpfluLinkId' +-- +-- * 'mpfluOauthToken' +-- +-- * 'mpfluFields' +-- +-- * 'mpfluAlt' +managementProfileFilterLinksUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileFilterLinksUpdate +managementProfileFilterLinksUpdate pMpfluWebPropertyId_ pMpfluProfileId_ pMpfluAccountId_ pMpfluLinkId_ = + ManagementProfileFilterLinksUpdate + { _mpfluQuotaUser = Nothing + , _mpfluPrettyPrint = False + , _mpfluWebPropertyId = pMpfluWebPropertyId_ + , _mpfluUserIp = Nothing + , _mpfluProfileId = pMpfluProfileId_ + , _mpfluAccountId = pMpfluAccountId_ + , _mpfluKey = Nothing + , _mpfluLinkId = pMpfluLinkId_ + , _mpfluOauthToken = Nothing + , _mpfluFields = Nothing + , _mpfluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpfluQuotaUser :: Lens' ManagementProfileFilterLinksUpdate' (Maybe Text) +mpfluQuotaUser + = lens _mpfluQuotaUser + (\ s a -> s{_mpfluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpfluPrettyPrint :: Lens' ManagementProfileFilterLinksUpdate' Bool +mpfluPrettyPrint + = lens _mpfluPrettyPrint + (\ s a -> s{_mpfluPrettyPrint = a}) + +-- | Web property Id to which profile filter link belongs +mpfluWebPropertyId :: Lens' ManagementProfileFilterLinksUpdate' Text +mpfluWebPropertyId + = lens _mpfluWebPropertyId + (\ s a -> s{_mpfluWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpfluUserIp :: Lens' ManagementProfileFilterLinksUpdate' (Maybe Text) +mpfluUserIp + = lens _mpfluUserIp (\ s a -> s{_mpfluUserIp = a}) + +-- | Profile ID to which filter link belongs +mpfluProfileId :: Lens' ManagementProfileFilterLinksUpdate' Text +mpfluProfileId + = lens _mpfluProfileId + (\ s a -> s{_mpfluProfileId = a}) + +-- | Account ID to which profile filter link belongs. +mpfluAccountId :: Lens' ManagementProfileFilterLinksUpdate' Text +mpfluAccountId + = lens _mpfluAccountId + (\ s a -> s{_mpfluAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpfluKey :: Lens' ManagementProfileFilterLinksUpdate' (Maybe Text) +mpfluKey = lens _mpfluKey (\ s a -> s{_mpfluKey = a}) + +-- | ID of the profile filter link to be updated. +mpfluLinkId :: Lens' ManagementProfileFilterLinksUpdate' Text +mpfluLinkId + = lens _mpfluLinkId (\ s a -> s{_mpfluLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpfluOauthToken :: Lens' ManagementProfileFilterLinksUpdate' (Maybe Text) +mpfluOauthToken + = lens _mpfluOauthToken + (\ s a -> s{_mpfluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpfluFields :: Lens' ManagementProfileFilterLinksUpdate' (Maybe Text) +mpfluFields + = lens _mpfluFields (\ s a -> s{_mpfluFields = a}) + +-- | Data format for the response. +mpfluAlt :: Lens' ManagementProfileFilterLinksUpdate' Text +mpfluAlt = lens _mpfluAlt (\ s a -> s{_mpfluAlt = a}) + +instance GoogleRequest + ManagementProfileFilterLinksUpdate' where + type Rs ManagementProfileFilterLinksUpdate' = + ProfileFilterLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileFilterLinksUpdate{..} + = go _mpfluQuotaUser _mpfluPrettyPrint + _mpfluWebPropertyId + _mpfluUserIp + _mpfluProfileId + _mpfluAccountId + _mpfluKey + _mpfluLinkId + _mpfluOauthToken + _mpfluFields + _mpfluAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementProfileFilterLinksUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Delete.hs new file mode 100644 index 000000000..f14062516 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Delete.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileUserLinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a user from the given view (profile). +-- +-- /See:/ for @AnalyticsManagementProfileUserLinksDelete@. +module Analytics.Management.ProfileUserLinks.Delete + ( + -- * REST Resource + ManagementProfileUserLinksDeleteAPI + + -- * Creating a Request + , managementProfileUserLinksDelete + , ManagementProfileUserLinksDelete + + -- * Request Lenses + , mpuldQuotaUser + , mpuldPrettyPrint + , mpuldWebPropertyId + , mpuldUserIp + , mpuldProfileId + , mpuldAccountId + , mpuldKey + , mpuldLinkId + , mpuldOauthToken + , mpuldFields + , mpuldAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileUserLinksDelete@ which the +-- 'ManagementProfileUserLinksDelete' request conforms to. +type ManagementProfileUserLinksDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Delete '[JSON] () + +-- | Removes a user from the given view (profile). +-- +-- /See:/ 'managementProfileUserLinksDelete' smart constructor. +data ManagementProfileUserLinksDelete = ManagementProfileUserLinksDelete + { _mpuldQuotaUser :: !(Maybe Text) + , _mpuldPrettyPrint :: !Bool + , _mpuldWebPropertyId :: !Text + , _mpuldUserIp :: !(Maybe Text) + , _mpuldProfileId :: !Text + , _mpuldAccountId :: !Text + , _mpuldKey :: !(Maybe Text) + , _mpuldLinkId :: !Text + , _mpuldOauthToken :: !(Maybe Text) + , _mpuldFields :: !(Maybe Text) + , _mpuldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileUserLinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpuldQuotaUser' +-- +-- * 'mpuldPrettyPrint' +-- +-- * 'mpuldWebPropertyId' +-- +-- * 'mpuldUserIp' +-- +-- * 'mpuldProfileId' +-- +-- * 'mpuldAccountId' +-- +-- * 'mpuldKey' +-- +-- * 'mpuldLinkId' +-- +-- * 'mpuldOauthToken' +-- +-- * 'mpuldFields' +-- +-- * 'mpuldAlt' +managementProfileUserLinksDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileUserLinksDelete +managementProfileUserLinksDelete pMpuldWebPropertyId_ pMpuldProfileId_ pMpuldAccountId_ pMpuldLinkId_ = + ManagementProfileUserLinksDelete + { _mpuldQuotaUser = Nothing + , _mpuldPrettyPrint = False + , _mpuldWebPropertyId = pMpuldWebPropertyId_ + , _mpuldUserIp = Nothing + , _mpuldProfileId = pMpuldProfileId_ + , _mpuldAccountId = pMpuldAccountId_ + , _mpuldKey = Nothing + , _mpuldLinkId = pMpuldLinkId_ + , _mpuldOauthToken = Nothing + , _mpuldFields = Nothing + , _mpuldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpuldQuotaUser :: Lens' ManagementProfileUserLinksDelete' (Maybe Text) +mpuldQuotaUser + = lens _mpuldQuotaUser + (\ s a -> s{_mpuldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpuldPrettyPrint :: Lens' ManagementProfileUserLinksDelete' Bool +mpuldPrettyPrint + = lens _mpuldPrettyPrint + (\ s a -> s{_mpuldPrettyPrint = a}) + +-- | Web Property ID to delete the user link for. +mpuldWebPropertyId :: Lens' ManagementProfileUserLinksDelete' Text +mpuldWebPropertyId + = lens _mpuldWebPropertyId + (\ s a -> s{_mpuldWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpuldUserIp :: Lens' ManagementProfileUserLinksDelete' (Maybe Text) +mpuldUserIp + = lens _mpuldUserIp (\ s a -> s{_mpuldUserIp = a}) + +-- | View (Profile) ID to delete the user link for. +mpuldProfileId :: Lens' ManagementProfileUserLinksDelete' Text +mpuldProfileId + = lens _mpuldProfileId + (\ s a -> s{_mpuldProfileId = a}) + +-- | Account ID to delete the user link for. +mpuldAccountId :: Lens' ManagementProfileUserLinksDelete' Text +mpuldAccountId + = lens _mpuldAccountId + (\ s a -> s{_mpuldAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpuldKey :: Lens' ManagementProfileUserLinksDelete' (Maybe Text) +mpuldKey = lens _mpuldKey (\ s a -> s{_mpuldKey = a}) + +-- | Link ID to delete the user link for. +mpuldLinkId :: Lens' ManagementProfileUserLinksDelete' Text +mpuldLinkId + = lens _mpuldLinkId (\ s a -> s{_mpuldLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpuldOauthToken :: Lens' ManagementProfileUserLinksDelete' (Maybe Text) +mpuldOauthToken + = lens _mpuldOauthToken + (\ s a -> s{_mpuldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpuldFields :: Lens' ManagementProfileUserLinksDelete' (Maybe Text) +mpuldFields + = lens _mpuldFields (\ s a -> s{_mpuldFields = a}) + +-- | Data format for the response. +mpuldAlt :: Lens' ManagementProfileUserLinksDelete' Text +mpuldAlt = lens _mpuldAlt (\ s a -> s{_mpuldAlt = a}) + +instance GoogleRequest + ManagementProfileUserLinksDelete' where + type Rs ManagementProfileUserLinksDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileUserLinksDelete{..} + = go _mpuldQuotaUser _mpuldPrettyPrint + _mpuldWebPropertyId + _mpuldUserIp + _mpuldProfileId + _mpuldAccountId + _mpuldKey + _mpuldLinkId + _mpuldOauthToken + _mpuldFields + _mpuldAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileUserLinksDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Insert.hs new file mode 100644 index 000000000..d95f65fd5 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Insert.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileUserLinks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new user to the given view (profile). +-- +-- /See:/ for @AnalyticsManagementProfileUserLinksInsert@. +module Analytics.Management.ProfileUserLinks.Insert + ( + -- * REST Resource + ManagementProfileUserLinksInsertAPI + + -- * Creating a Request + , managementProfileUserLinksInsert + , ManagementProfileUserLinksInsert + + -- * Request Lenses + , mpuliQuotaUser + , mpuliPrettyPrint + , mpuliWebPropertyId + , mpuliUserIp + , mpuliProfileId + , mpuliAccountId + , mpuliKey + , mpuliOauthToken + , mpuliFields + , mpuliAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileUserLinksInsert@ which the +-- 'ManagementProfileUserLinksInsert' request conforms to. +type ManagementProfileUserLinksInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "entityUserLinks" :> Post '[JSON] EntityUserLink + +-- | Adds a new user to the given view (profile). +-- +-- /See:/ 'managementProfileUserLinksInsert' smart constructor. +data ManagementProfileUserLinksInsert = ManagementProfileUserLinksInsert + { _mpuliQuotaUser :: !(Maybe Text) + , _mpuliPrettyPrint :: !Bool + , _mpuliWebPropertyId :: !Text + , _mpuliUserIp :: !(Maybe Text) + , _mpuliProfileId :: !Text + , _mpuliAccountId :: !Text + , _mpuliKey :: !(Maybe Text) + , _mpuliOauthToken :: !(Maybe Text) + , _mpuliFields :: !(Maybe Text) + , _mpuliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileUserLinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpuliQuotaUser' +-- +-- * 'mpuliPrettyPrint' +-- +-- * 'mpuliWebPropertyId' +-- +-- * 'mpuliUserIp' +-- +-- * 'mpuliProfileId' +-- +-- * 'mpuliAccountId' +-- +-- * 'mpuliKey' +-- +-- * 'mpuliOauthToken' +-- +-- * 'mpuliFields' +-- +-- * 'mpuliAlt' +managementProfileUserLinksInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfileUserLinksInsert +managementProfileUserLinksInsert pMpuliWebPropertyId_ pMpuliProfileId_ pMpuliAccountId_ = + ManagementProfileUserLinksInsert + { _mpuliQuotaUser = Nothing + , _mpuliPrettyPrint = False + , _mpuliWebPropertyId = pMpuliWebPropertyId_ + , _mpuliUserIp = Nothing + , _mpuliProfileId = pMpuliProfileId_ + , _mpuliAccountId = pMpuliAccountId_ + , _mpuliKey = Nothing + , _mpuliOauthToken = Nothing + , _mpuliFields = Nothing + , _mpuliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpuliQuotaUser :: Lens' ManagementProfileUserLinksInsert' (Maybe Text) +mpuliQuotaUser + = lens _mpuliQuotaUser + (\ s a -> s{_mpuliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpuliPrettyPrint :: Lens' ManagementProfileUserLinksInsert' Bool +mpuliPrettyPrint + = lens _mpuliPrettyPrint + (\ s a -> s{_mpuliPrettyPrint = a}) + +-- | Web Property ID to create the user link for. +mpuliWebPropertyId :: Lens' ManagementProfileUserLinksInsert' Text +mpuliWebPropertyId + = lens _mpuliWebPropertyId + (\ s a -> s{_mpuliWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpuliUserIp :: Lens' ManagementProfileUserLinksInsert' (Maybe Text) +mpuliUserIp + = lens _mpuliUserIp (\ s a -> s{_mpuliUserIp = a}) + +-- | View (Profile) ID to create the user link for. +mpuliProfileId :: Lens' ManagementProfileUserLinksInsert' Text +mpuliProfileId + = lens _mpuliProfileId + (\ s a -> s{_mpuliProfileId = a}) + +-- | Account ID to create the user link for. +mpuliAccountId :: Lens' ManagementProfileUserLinksInsert' Text +mpuliAccountId + = lens _mpuliAccountId + (\ s a -> s{_mpuliAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpuliKey :: Lens' ManagementProfileUserLinksInsert' (Maybe Text) +mpuliKey = lens _mpuliKey (\ s a -> s{_mpuliKey = a}) + +-- | OAuth 2.0 token for the current user. +mpuliOauthToken :: Lens' ManagementProfileUserLinksInsert' (Maybe Text) +mpuliOauthToken + = lens _mpuliOauthToken + (\ s a -> s{_mpuliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpuliFields :: Lens' ManagementProfileUserLinksInsert' (Maybe Text) +mpuliFields + = lens _mpuliFields (\ s a -> s{_mpuliFields = a}) + +-- | Data format for the response. +mpuliAlt :: Lens' ManagementProfileUserLinksInsert' Text +mpuliAlt = lens _mpuliAlt (\ s a -> s{_mpuliAlt = a}) + +instance GoogleRequest + ManagementProfileUserLinksInsert' where + type Rs ManagementProfileUserLinksInsert' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileUserLinksInsert{..} + = go _mpuliQuotaUser _mpuliPrettyPrint + _mpuliWebPropertyId + _mpuliUserIp + _mpuliProfileId + _mpuliAccountId + _mpuliKey + _mpuliOauthToken + _mpuliFields + _mpuliAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileUserLinksInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/List.hs new file mode 100644 index 000000000..4f26e823e --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/List.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileUserLinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists profile-user links for a given view (profile). +-- +-- /See:/ for @AnalyticsManagementProfileUserLinksList@. +module Analytics.Management.ProfileUserLinks.List + ( + -- * REST Resource + ManagementProfileUserLinksListAPI + + -- * Creating a Request + , managementProfileUserLinksList + , ManagementProfileUserLinksList + + -- * Request Lenses + , mpullQuotaUser + , mpullPrettyPrint + , mpullWebPropertyId + , mpullUserIp + , mpullProfileId + , mpullAccountId + , mpullKey + , mpullOauthToken + , mpullStartIndex + , mpullMaxResults + , mpullFields + , mpullAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileUserLinksList@ which the +-- 'ManagementProfileUserLinksList' request conforms to. +type ManagementProfileUserLinksListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "entityUserLinks" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] EntityUserLinks + +-- | Lists profile-user links for a given view (profile). +-- +-- /See:/ 'managementProfileUserLinksList' smart constructor. +data ManagementProfileUserLinksList = ManagementProfileUserLinksList + { _mpullQuotaUser :: !(Maybe Text) + , _mpullPrettyPrint :: !Bool + , _mpullWebPropertyId :: !Text + , _mpullUserIp :: !(Maybe Text) + , _mpullProfileId :: !Text + , _mpullAccountId :: !Text + , _mpullKey :: !(Maybe Text) + , _mpullOauthToken :: !(Maybe Text) + , _mpullStartIndex :: !(Maybe Int32) + , _mpullMaxResults :: !(Maybe Int32) + , _mpullFields :: !(Maybe Text) + , _mpullAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileUserLinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpullQuotaUser' +-- +-- * 'mpullPrettyPrint' +-- +-- * 'mpullWebPropertyId' +-- +-- * 'mpullUserIp' +-- +-- * 'mpullProfileId' +-- +-- * 'mpullAccountId' +-- +-- * 'mpullKey' +-- +-- * 'mpullOauthToken' +-- +-- * 'mpullStartIndex' +-- +-- * 'mpullMaxResults' +-- +-- * 'mpullFields' +-- +-- * 'mpullAlt' +managementProfileUserLinksList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfileUserLinksList +managementProfileUserLinksList pMpullWebPropertyId_ pMpullProfileId_ pMpullAccountId_ = + ManagementProfileUserLinksList + { _mpullQuotaUser = Nothing + , _mpullPrettyPrint = False + , _mpullWebPropertyId = pMpullWebPropertyId_ + , _mpullUserIp = Nothing + , _mpullProfileId = pMpullProfileId_ + , _mpullAccountId = pMpullAccountId_ + , _mpullKey = Nothing + , _mpullOauthToken = Nothing + , _mpullStartIndex = Nothing + , _mpullMaxResults = Nothing + , _mpullFields = Nothing + , _mpullAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpullQuotaUser :: Lens' ManagementProfileUserLinksList' (Maybe Text) +mpullQuotaUser + = lens _mpullQuotaUser + (\ s a -> s{_mpullQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpullPrettyPrint :: Lens' ManagementProfileUserLinksList' Bool +mpullPrettyPrint + = lens _mpullPrettyPrint + (\ s a -> s{_mpullPrettyPrint = a}) + +-- | Web Property ID which the given view (profile) belongs to. Can either be +-- a specific web property ID or \'~all\', which refers to all the web +-- properties that user has access to. +mpullWebPropertyId :: Lens' ManagementProfileUserLinksList' Text +mpullWebPropertyId + = lens _mpullWebPropertyId + (\ s a -> s{_mpullWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpullUserIp :: Lens' ManagementProfileUserLinksList' (Maybe Text) +mpullUserIp + = lens _mpullUserIp (\ s a -> s{_mpullUserIp = a}) + +-- | View (Profile) ID to retrieve the profile-user links for. Can either be +-- a specific profile ID or \'~all\', which refers to all the profiles that +-- user has access to. +mpullProfileId :: Lens' ManagementProfileUserLinksList' Text +mpullProfileId + = lens _mpullProfileId + (\ s a -> s{_mpullProfileId = a}) + +-- | Account ID which the given view (profile) belongs to. +mpullAccountId :: Lens' ManagementProfileUserLinksList' Text +mpullAccountId + = lens _mpullAccountId + (\ s a -> s{_mpullAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpullKey :: Lens' ManagementProfileUserLinksList' (Maybe Text) +mpullKey = lens _mpullKey (\ s a -> s{_mpullKey = a}) + +-- | OAuth 2.0 token for the current user. +mpullOauthToken :: Lens' ManagementProfileUserLinksList' (Maybe Text) +mpullOauthToken + = lens _mpullOauthToken + (\ s a -> s{_mpullOauthToken = a}) + +-- | An index of the first profile-user link to retrieve. Use this parameter +-- as a pagination mechanism along with the max-results parameter. +mpullStartIndex :: Lens' ManagementProfileUserLinksList' (Maybe Int32) +mpullStartIndex + = lens _mpullStartIndex + (\ s a -> s{_mpullStartIndex = a}) + +-- | The maximum number of profile-user links to include in this response. +mpullMaxResults :: Lens' ManagementProfileUserLinksList' (Maybe Int32) +mpullMaxResults + = lens _mpullMaxResults + (\ s a -> s{_mpullMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mpullFields :: Lens' ManagementProfileUserLinksList' (Maybe Text) +mpullFields + = lens _mpullFields (\ s a -> s{_mpullFields = a}) + +-- | Data format for the response. +mpullAlt :: Lens' ManagementProfileUserLinksList' Text +mpullAlt = lens _mpullAlt (\ s a -> s{_mpullAlt = a}) + +instance GoogleRequest + ManagementProfileUserLinksList' where + type Rs ManagementProfileUserLinksList' = + EntityUserLinks + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileUserLinksList{..} + = go _mpullQuotaUser _mpullPrettyPrint + _mpullWebPropertyId + _mpullUserIp + _mpullProfileId + _mpullAccountId + _mpullKey + _mpullOauthToken + _mpullStartIndex + _mpullMaxResults + _mpullFields + _mpullAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileUserLinksListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Update.hs new file mode 100644 index 000000000..ee1e7a2f1 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProfileUserLinks/Update.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.ProfileUserLinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates permissions for an existing user on the given view (profile). +-- +-- /See:/ for @AnalyticsManagementProfileUserLinksUpdate@. +module Analytics.Management.ProfileUserLinks.Update + ( + -- * REST Resource + ManagementProfileUserLinksUpdateAPI + + -- * Creating a Request + , managementProfileUserLinksUpdate + , ManagementProfileUserLinksUpdate + + -- * Request Lenses + , mpuluQuotaUser + , mpuluPrettyPrint + , mpuluWebPropertyId + , mpuluUserIp + , mpuluProfileId + , mpuluAccountId + , mpuluKey + , mpuluLinkId + , mpuluOauthToken + , mpuluFields + , mpuluAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfileUserLinksUpdate@ which the +-- 'ManagementProfileUserLinksUpdate' request conforms to. +type ManagementProfileUserLinksUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Put '[JSON] EntityUserLink + +-- | Updates permissions for an existing user on the given view (profile). +-- +-- /See:/ 'managementProfileUserLinksUpdate' smart constructor. +data ManagementProfileUserLinksUpdate = ManagementProfileUserLinksUpdate + { _mpuluQuotaUser :: !(Maybe Text) + , _mpuluPrettyPrint :: !Bool + , _mpuluWebPropertyId :: !Text + , _mpuluUserIp :: !(Maybe Text) + , _mpuluProfileId :: !Text + , _mpuluAccountId :: !Text + , _mpuluKey :: !(Maybe Text) + , _mpuluLinkId :: !Text + , _mpuluOauthToken :: !(Maybe Text) + , _mpuluFields :: !(Maybe Text) + , _mpuluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfileUserLinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpuluQuotaUser' +-- +-- * 'mpuluPrettyPrint' +-- +-- * 'mpuluWebPropertyId' +-- +-- * 'mpuluUserIp' +-- +-- * 'mpuluProfileId' +-- +-- * 'mpuluAccountId' +-- +-- * 'mpuluKey' +-- +-- * 'mpuluLinkId' +-- +-- * 'mpuluOauthToken' +-- +-- * 'mpuluFields' +-- +-- * 'mpuluAlt' +managementProfileUserLinksUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementProfileUserLinksUpdate +managementProfileUserLinksUpdate pMpuluWebPropertyId_ pMpuluProfileId_ pMpuluAccountId_ pMpuluLinkId_ = + ManagementProfileUserLinksUpdate + { _mpuluQuotaUser = Nothing + , _mpuluPrettyPrint = False + , _mpuluWebPropertyId = pMpuluWebPropertyId_ + , _mpuluUserIp = Nothing + , _mpuluProfileId = pMpuluProfileId_ + , _mpuluAccountId = pMpuluAccountId_ + , _mpuluKey = Nothing + , _mpuluLinkId = pMpuluLinkId_ + , _mpuluOauthToken = Nothing + , _mpuluFields = Nothing + , _mpuluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpuluQuotaUser :: Lens' ManagementProfileUserLinksUpdate' (Maybe Text) +mpuluQuotaUser + = lens _mpuluQuotaUser + (\ s a -> s{_mpuluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpuluPrettyPrint :: Lens' ManagementProfileUserLinksUpdate' Bool +mpuluPrettyPrint + = lens _mpuluPrettyPrint + (\ s a -> s{_mpuluPrettyPrint = a}) + +-- | Web Property ID to update the user link for. +mpuluWebPropertyId :: Lens' ManagementProfileUserLinksUpdate' Text +mpuluWebPropertyId + = lens _mpuluWebPropertyId + (\ s a -> s{_mpuluWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpuluUserIp :: Lens' ManagementProfileUserLinksUpdate' (Maybe Text) +mpuluUserIp + = lens _mpuluUserIp (\ s a -> s{_mpuluUserIp = a}) + +-- | View (Profile ID) to update the user link for. +mpuluProfileId :: Lens' ManagementProfileUserLinksUpdate' Text +mpuluProfileId + = lens _mpuluProfileId + (\ s a -> s{_mpuluProfileId = a}) + +-- | Account ID to update the user link for. +mpuluAccountId :: Lens' ManagementProfileUserLinksUpdate' Text +mpuluAccountId + = lens _mpuluAccountId + (\ s a -> s{_mpuluAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpuluKey :: Lens' ManagementProfileUserLinksUpdate' (Maybe Text) +mpuluKey = lens _mpuluKey (\ s a -> s{_mpuluKey = a}) + +-- | Link ID to update the user link for. +mpuluLinkId :: Lens' ManagementProfileUserLinksUpdate' Text +mpuluLinkId + = lens _mpuluLinkId (\ s a -> s{_mpuluLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mpuluOauthToken :: Lens' ManagementProfileUserLinksUpdate' (Maybe Text) +mpuluOauthToken + = lens _mpuluOauthToken + (\ s a -> s{_mpuluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpuluFields :: Lens' ManagementProfileUserLinksUpdate' (Maybe Text) +mpuluFields + = lens _mpuluFields (\ s a -> s{_mpuluFields = a}) + +-- | Data format for the response. +mpuluAlt :: Lens' ManagementProfileUserLinksUpdate' Text +mpuluAlt = lens _mpuluAlt (\ s a -> s{_mpuluAlt = a}) + +instance GoogleRequest + ManagementProfileUserLinksUpdate' where + type Rs ManagementProfileUserLinksUpdate' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementProfileUserLinksUpdate{..} + = go _mpuluQuotaUser _mpuluPrettyPrint + _mpuluWebPropertyId + _mpuluUserIp + _mpuluProfileId + _mpuluAccountId + _mpuluKey + _mpuluLinkId + _mpuluOauthToken + _mpuluFields + _mpuluAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfileUserLinksUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Delete.hs new file mode 100644 index 000000000..dcc071000 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Delete.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a view (profile). +-- +-- /See:/ for @AnalyticsManagementProfilesDelete@. +module Analytics.Management.Profiles.Delete + ( + -- * REST Resource + ManagementProfilesDeleteAPI + + -- * Creating a Request + , managementProfilesDelete + , ManagementProfilesDelete + + -- * Request Lenses + , mpdQuotaUser + , mpdPrettyPrint + , mpdWebPropertyId + , mpdUserIp + , mpdProfileId + , mpdAccountId + , mpdKey + , mpdOauthToken + , mpdFields + , mpdAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesDelete@ which the +-- 'ManagementProfilesDelete' request conforms to. +type ManagementProfilesDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> Delete '[JSON] () + +-- | Deletes a view (profile). +-- +-- /See:/ 'managementProfilesDelete' smart constructor. +data ManagementProfilesDelete = ManagementProfilesDelete + { _mpdQuotaUser :: !(Maybe Text) + , _mpdPrettyPrint :: !Bool + , _mpdWebPropertyId :: !Text + , _mpdUserIp :: !(Maybe Text) + , _mpdProfileId :: !Text + , _mpdAccountId :: !Text + , _mpdKey :: !(Maybe Text) + , _mpdOauthToken :: !(Maybe Text) + , _mpdFields :: !(Maybe Text) + , _mpdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpdQuotaUser' +-- +-- * 'mpdPrettyPrint' +-- +-- * 'mpdWebPropertyId' +-- +-- * 'mpdUserIp' +-- +-- * 'mpdProfileId' +-- +-- * 'mpdAccountId' +-- +-- * 'mpdKey' +-- +-- * 'mpdOauthToken' +-- +-- * 'mpdFields' +-- +-- * 'mpdAlt' +managementProfilesDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfilesDelete +managementProfilesDelete pMpdWebPropertyId_ pMpdProfileId_ pMpdAccountId_ = + ManagementProfilesDelete + { _mpdQuotaUser = Nothing + , _mpdPrettyPrint = False + , _mpdWebPropertyId = pMpdWebPropertyId_ + , _mpdUserIp = Nothing + , _mpdProfileId = pMpdProfileId_ + , _mpdAccountId = pMpdAccountId_ + , _mpdKey = Nothing + , _mpdOauthToken = Nothing + , _mpdFields = Nothing + , _mpdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpdQuotaUser :: Lens' ManagementProfilesDelete' (Maybe Text) +mpdQuotaUser + = lens _mpdQuotaUser (\ s a -> s{_mpdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpdPrettyPrint :: Lens' ManagementProfilesDelete' Bool +mpdPrettyPrint + = lens _mpdPrettyPrint + (\ s a -> s{_mpdPrettyPrint = a}) + +-- | Web property ID to delete the view (profile) for. +mpdWebPropertyId :: Lens' ManagementProfilesDelete' Text +mpdWebPropertyId + = lens _mpdWebPropertyId + (\ s a -> s{_mpdWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpdUserIp :: Lens' ManagementProfilesDelete' (Maybe Text) +mpdUserIp + = lens _mpdUserIp (\ s a -> s{_mpdUserIp = a}) + +-- | ID of the view (profile) to be deleted. +mpdProfileId :: Lens' ManagementProfilesDelete' Text +mpdProfileId + = lens _mpdProfileId (\ s a -> s{_mpdProfileId = a}) + +-- | Account ID to delete the view (profile) for. +mpdAccountId :: Lens' ManagementProfilesDelete' Text +mpdAccountId + = lens _mpdAccountId (\ s a -> s{_mpdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpdKey :: Lens' ManagementProfilesDelete' (Maybe Text) +mpdKey = lens _mpdKey (\ s a -> s{_mpdKey = a}) + +-- | OAuth 2.0 token for the current user. +mpdOauthToken :: Lens' ManagementProfilesDelete' (Maybe Text) +mpdOauthToken + = lens _mpdOauthToken + (\ s a -> s{_mpdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpdFields :: Lens' ManagementProfilesDelete' (Maybe Text) +mpdFields + = lens _mpdFields (\ s a -> s{_mpdFields = a}) + +-- | Data format for the response. +mpdAlt :: Lens' ManagementProfilesDelete' Text +mpdAlt = lens _mpdAlt (\ s a -> s{_mpdAlt = a}) + +instance GoogleRequest ManagementProfilesDelete' + where + type Rs ManagementProfilesDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesDelete{..} + = go _mpdQuotaUser _mpdPrettyPrint _mpdWebPropertyId + _mpdUserIp + _mpdProfileId + _mpdAccountId + _mpdKey + _mpdOauthToken + _mpdFields + _mpdAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Get.hs new file mode 100644 index 000000000..5d77353d6 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a view (profile) to which the user has access. +-- +-- /See:/ for @AnalyticsManagementProfilesGet@. +module Analytics.Management.Profiles.Get + ( + -- * REST Resource + ManagementProfilesGetAPI + + -- * Creating a Request + , managementProfilesGet + , ManagementProfilesGet + + -- * Request Lenses + , mpgQuotaUser + , mpgPrettyPrint + , mpgWebPropertyId + , mpgUserIp + , mpgProfileId + , mpgAccountId + , mpgKey + , mpgOauthToken + , mpgFields + , mpgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesGet@ which the +-- 'ManagementProfilesGet' request conforms to. +type ManagementProfilesGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> Get '[JSON] Profile + +-- | Gets a view (profile) to which the user has access. +-- +-- /See:/ 'managementProfilesGet' smart constructor. +data ManagementProfilesGet = ManagementProfilesGet + { _mpgQuotaUser :: !(Maybe Text) + , _mpgPrettyPrint :: !Bool + , _mpgWebPropertyId :: !Text + , _mpgUserIp :: !(Maybe Text) + , _mpgProfileId :: !Text + , _mpgAccountId :: !Text + , _mpgKey :: !(Maybe Text) + , _mpgOauthToken :: !(Maybe Text) + , _mpgFields :: !(Maybe Text) + , _mpgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpgQuotaUser' +-- +-- * 'mpgPrettyPrint' +-- +-- * 'mpgWebPropertyId' +-- +-- * 'mpgUserIp' +-- +-- * 'mpgProfileId' +-- +-- * 'mpgAccountId' +-- +-- * 'mpgKey' +-- +-- * 'mpgOauthToken' +-- +-- * 'mpgFields' +-- +-- * 'mpgAlt' +managementProfilesGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfilesGet +managementProfilesGet pMpgWebPropertyId_ pMpgProfileId_ pMpgAccountId_ = + ManagementProfilesGet + { _mpgQuotaUser = Nothing + , _mpgPrettyPrint = False + , _mpgWebPropertyId = pMpgWebPropertyId_ + , _mpgUserIp = Nothing + , _mpgProfileId = pMpgProfileId_ + , _mpgAccountId = pMpgAccountId_ + , _mpgKey = Nothing + , _mpgOauthToken = Nothing + , _mpgFields = Nothing + , _mpgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpgQuotaUser :: Lens' ManagementProfilesGet' (Maybe Text) +mpgQuotaUser + = lens _mpgQuotaUser (\ s a -> s{_mpgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpgPrettyPrint :: Lens' ManagementProfilesGet' Bool +mpgPrettyPrint + = lens _mpgPrettyPrint + (\ s a -> s{_mpgPrettyPrint = a}) + +-- | Web property ID to retrieve the goal for. +mpgWebPropertyId :: Lens' ManagementProfilesGet' Text +mpgWebPropertyId + = lens _mpgWebPropertyId + (\ s a -> s{_mpgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpgUserIp :: Lens' ManagementProfilesGet' (Maybe Text) +mpgUserIp + = lens _mpgUserIp (\ s a -> s{_mpgUserIp = a}) + +-- | View (Profile) ID to retrieve the goal for. +mpgProfileId :: Lens' ManagementProfilesGet' Text +mpgProfileId + = lens _mpgProfileId (\ s a -> s{_mpgProfileId = a}) + +-- | Account ID to retrieve the goal for. +mpgAccountId :: Lens' ManagementProfilesGet' Text +mpgAccountId + = lens _mpgAccountId (\ s a -> s{_mpgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpgKey :: Lens' ManagementProfilesGet' (Maybe Text) +mpgKey = lens _mpgKey (\ s a -> s{_mpgKey = a}) + +-- | OAuth 2.0 token for the current user. +mpgOauthToken :: Lens' ManagementProfilesGet' (Maybe Text) +mpgOauthToken + = lens _mpgOauthToken + (\ s a -> s{_mpgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpgFields :: Lens' ManagementProfilesGet' (Maybe Text) +mpgFields + = lens _mpgFields (\ s a -> s{_mpgFields = a}) + +-- | Data format for the response. +mpgAlt :: Lens' ManagementProfilesGet' Text +mpgAlt = lens _mpgAlt (\ s a -> s{_mpgAlt = a}) + +instance GoogleRequest ManagementProfilesGet' where + type Rs ManagementProfilesGet' = Profile + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesGet{..} + = go _mpgQuotaUser _mpgPrettyPrint _mpgWebPropertyId + _mpgUserIp + _mpgProfileId + _mpgAccountId + _mpgKey + _mpgOauthToken + _mpgFields + _mpgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Insert.hs new file mode 100644 index 000000000..75f902824 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Insert.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new view (profile). +-- +-- /See:/ for @AnalyticsManagementProfilesInsert@. +module Analytics.Management.Profiles.Insert + ( + -- * REST Resource + ManagementProfilesInsertAPI + + -- * Creating a Request + , managementProfilesInsert + , ManagementProfilesInsert + + -- * Request Lenses + , mpiQuotaUser + , mpiPrettyPrint + , mpiWebPropertyId + , mpiUserIp + , mpiAccountId + , mpiKey + , mpiOauthToken + , mpiFields + , mpiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesInsert@ which the +-- 'ManagementProfilesInsert' request conforms to. +type ManagementProfilesInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> Post '[JSON] Profile + +-- | Create a new view (profile). +-- +-- /See:/ 'managementProfilesInsert' smart constructor. +data ManagementProfilesInsert = ManagementProfilesInsert + { _mpiQuotaUser :: !(Maybe Text) + , _mpiPrettyPrint :: !Bool + , _mpiWebPropertyId :: !Text + , _mpiUserIp :: !(Maybe Text) + , _mpiAccountId :: !Text + , _mpiKey :: !(Maybe Text) + , _mpiOauthToken :: !(Maybe Text) + , _mpiFields :: !(Maybe Text) + , _mpiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpiQuotaUser' +-- +-- * 'mpiPrettyPrint' +-- +-- * 'mpiWebPropertyId' +-- +-- * 'mpiUserIp' +-- +-- * 'mpiAccountId' +-- +-- * 'mpiKey' +-- +-- * 'mpiOauthToken' +-- +-- * 'mpiFields' +-- +-- * 'mpiAlt' +managementProfilesInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementProfilesInsert +managementProfilesInsert pMpiWebPropertyId_ pMpiAccountId_ = + ManagementProfilesInsert + { _mpiQuotaUser = Nothing + , _mpiPrettyPrint = False + , _mpiWebPropertyId = pMpiWebPropertyId_ + , _mpiUserIp = Nothing + , _mpiAccountId = pMpiAccountId_ + , _mpiKey = Nothing + , _mpiOauthToken = Nothing + , _mpiFields = Nothing + , _mpiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpiQuotaUser :: Lens' ManagementProfilesInsert' (Maybe Text) +mpiQuotaUser + = lens _mpiQuotaUser (\ s a -> s{_mpiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpiPrettyPrint :: Lens' ManagementProfilesInsert' Bool +mpiPrettyPrint + = lens _mpiPrettyPrint + (\ s a -> s{_mpiPrettyPrint = a}) + +-- | Web property ID to create the view (profile) for. +mpiWebPropertyId :: Lens' ManagementProfilesInsert' Text +mpiWebPropertyId + = lens _mpiWebPropertyId + (\ s a -> s{_mpiWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpiUserIp :: Lens' ManagementProfilesInsert' (Maybe Text) +mpiUserIp + = lens _mpiUserIp (\ s a -> s{_mpiUserIp = a}) + +-- | Account ID to create the view (profile) for. +mpiAccountId :: Lens' ManagementProfilesInsert' Text +mpiAccountId + = lens _mpiAccountId (\ s a -> s{_mpiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpiKey :: Lens' ManagementProfilesInsert' (Maybe Text) +mpiKey = lens _mpiKey (\ s a -> s{_mpiKey = a}) + +-- | OAuth 2.0 token for the current user. +mpiOauthToken :: Lens' ManagementProfilesInsert' (Maybe Text) +mpiOauthToken + = lens _mpiOauthToken + (\ s a -> s{_mpiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpiFields :: Lens' ManagementProfilesInsert' (Maybe Text) +mpiFields + = lens _mpiFields (\ s a -> s{_mpiFields = a}) + +-- | Data format for the response. +mpiAlt :: Lens' ManagementProfilesInsert' Text +mpiAlt = lens _mpiAlt (\ s a -> s{_mpiAlt = a}) + +instance GoogleRequest ManagementProfilesInsert' + where + type Rs ManagementProfilesInsert' = Profile + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesInsert{..} + = go _mpiQuotaUser _mpiPrettyPrint _mpiWebPropertyId + _mpiUserIp + _mpiAccountId + _mpiKey + _mpiOauthToken + _mpiFields + _mpiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/List.hs new file mode 100644 index 000000000..0dc926edd --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/List.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists views (profiles) to which the user has access. +-- +-- /See:/ for @AnalyticsManagementProfilesList@. +module Analytics.Management.Profiles.List + ( + -- * REST Resource + ManagementProfilesListAPI + + -- * Creating a Request + , managementProfilesList + , ManagementProfilesList + + -- * Request Lenses + , mplQuotaUser + , mplPrettyPrint + , mplWebPropertyId + , mplUserIp + , mplAccountId + , mplKey + , mplOauthToken + , mplStartIndex + , mplMaxResults + , mplFields + , mplAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesList@ which the +-- 'ManagementProfilesList' request conforms to. +type ManagementProfilesListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] Profiles + +-- | Lists views (profiles) to which the user has access. +-- +-- /See:/ 'managementProfilesList' smart constructor. +data ManagementProfilesList = ManagementProfilesList + { _mplQuotaUser :: !(Maybe Text) + , _mplPrettyPrint :: !Bool + , _mplWebPropertyId :: !Text + , _mplUserIp :: !(Maybe Text) + , _mplAccountId :: !Text + , _mplKey :: !(Maybe Text) + , _mplOauthToken :: !(Maybe Text) + , _mplStartIndex :: !(Maybe Int32) + , _mplMaxResults :: !(Maybe Int32) + , _mplFields :: !(Maybe Text) + , _mplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mplQuotaUser' +-- +-- * 'mplPrettyPrint' +-- +-- * 'mplWebPropertyId' +-- +-- * 'mplUserIp' +-- +-- * 'mplAccountId' +-- +-- * 'mplKey' +-- +-- * 'mplOauthToken' +-- +-- * 'mplStartIndex' +-- +-- * 'mplMaxResults' +-- +-- * 'mplFields' +-- +-- * 'mplAlt' +managementProfilesList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementProfilesList +managementProfilesList pMplWebPropertyId_ pMplAccountId_ = + ManagementProfilesList + { _mplQuotaUser = Nothing + , _mplPrettyPrint = False + , _mplWebPropertyId = pMplWebPropertyId_ + , _mplUserIp = Nothing + , _mplAccountId = pMplAccountId_ + , _mplKey = Nothing + , _mplOauthToken = Nothing + , _mplStartIndex = Nothing + , _mplMaxResults = Nothing + , _mplFields = Nothing + , _mplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mplQuotaUser :: Lens' ManagementProfilesList' (Maybe Text) +mplQuotaUser + = lens _mplQuotaUser (\ s a -> s{_mplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mplPrettyPrint :: Lens' ManagementProfilesList' Bool +mplPrettyPrint + = lens _mplPrettyPrint + (\ s a -> s{_mplPrettyPrint = a}) + +-- | Web property ID for the views (profiles) to retrieve. Can either be a +-- specific web property ID or \'~all\', which refers to all the web +-- properties to which the user has access. +mplWebPropertyId :: Lens' ManagementProfilesList' Text +mplWebPropertyId + = lens _mplWebPropertyId + (\ s a -> s{_mplWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mplUserIp :: Lens' ManagementProfilesList' (Maybe Text) +mplUserIp + = lens _mplUserIp (\ s a -> s{_mplUserIp = a}) + +-- | Account ID for the view (profiles) to retrieve. Can either be a specific +-- account ID or \'~all\', which refers to all the accounts to which the +-- user has access. +mplAccountId :: Lens' ManagementProfilesList' Text +mplAccountId + = lens _mplAccountId (\ s a -> s{_mplAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mplKey :: Lens' ManagementProfilesList' (Maybe Text) +mplKey = lens _mplKey (\ s a -> s{_mplKey = a}) + +-- | OAuth 2.0 token for the current user. +mplOauthToken :: Lens' ManagementProfilesList' (Maybe Text) +mplOauthToken + = lens _mplOauthToken + (\ s a -> s{_mplOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mplStartIndex :: Lens' ManagementProfilesList' (Maybe Int32) +mplStartIndex + = lens _mplStartIndex + (\ s a -> s{_mplStartIndex = a}) + +-- | The maximum number of views (profiles) to include in this response. +mplMaxResults :: Lens' ManagementProfilesList' (Maybe Int32) +mplMaxResults + = lens _mplMaxResults + (\ s a -> s{_mplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mplFields :: Lens' ManagementProfilesList' (Maybe Text) +mplFields + = lens _mplFields (\ s a -> s{_mplFields = a}) + +-- | Data format for the response. +mplAlt :: Lens' ManagementProfilesList' Text +mplAlt = lens _mplAlt (\ s a -> s{_mplAlt = a}) + +instance GoogleRequest ManagementProfilesList' where + type Rs ManagementProfilesList' = Profiles + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesList{..} + = go _mplQuotaUser _mplPrettyPrint _mplWebPropertyId + _mplUserIp + _mplAccountId + _mplKey + _mplOauthToken + _mplStartIndex + _mplMaxResults + _mplFields + _mplAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Patch.hs new file mode 100644 index 000000000..3033598a9 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Patch.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing view (profile). This method supports patch +-- semantics. +-- +-- /See:/ for @AnalyticsManagementProfilesPatch@. +module Analytics.Management.Profiles.Patch + ( + -- * REST Resource + ManagementProfilesPatchAPI + + -- * Creating a Request + , managementProfilesPatch + , ManagementProfilesPatch + + -- * Request Lenses + , mppQuotaUser + , mppPrettyPrint + , mppWebPropertyId + , mppUserIp + , mppProfileId + , mppAccountId + , mppKey + , mppOauthToken + , mppFields + , mppAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesPatch@ which the +-- 'ManagementProfilesPatch' request conforms to. +type ManagementProfilesPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> Patch '[JSON] Profile + +-- | Updates an existing view (profile). This method supports patch +-- semantics. +-- +-- /See:/ 'managementProfilesPatch' smart constructor. +data ManagementProfilesPatch = ManagementProfilesPatch + { _mppQuotaUser :: !(Maybe Text) + , _mppPrettyPrint :: !Bool + , _mppWebPropertyId :: !Text + , _mppUserIp :: !(Maybe Text) + , _mppProfileId :: !Text + , _mppAccountId :: !Text + , _mppKey :: !(Maybe Text) + , _mppOauthToken :: !(Maybe Text) + , _mppFields :: !(Maybe Text) + , _mppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mppQuotaUser' +-- +-- * 'mppPrettyPrint' +-- +-- * 'mppWebPropertyId' +-- +-- * 'mppUserIp' +-- +-- * 'mppProfileId' +-- +-- * 'mppAccountId' +-- +-- * 'mppKey' +-- +-- * 'mppOauthToken' +-- +-- * 'mppFields' +-- +-- * 'mppAlt' +managementProfilesPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfilesPatch +managementProfilesPatch pMppWebPropertyId_ pMppProfileId_ pMppAccountId_ = + ManagementProfilesPatch + { _mppQuotaUser = Nothing + , _mppPrettyPrint = False + , _mppWebPropertyId = pMppWebPropertyId_ + , _mppUserIp = Nothing + , _mppProfileId = pMppProfileId_ + , _mppAccountId = pMppAccountId_ + , _mppKey = Nothing + , _mppOauthToken = Nothing + , _mppFields = Nothing + , _mppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mppQuotaUser :: Lens' ManagementProfilesPatch' (Maybe Text) +mppQuotaUser + = lens _mppQuotaUser (\ s a -> s{_mppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mppPrettyPrint :: Lens' ManagementProfilesPatch' Bool +mppPrettyPrint + = lens _mppPrettyPrint + (\ s a -> s{_mppPrettyPrint = a}) + +-- | Web property ID to which the view (profile) belongs +mppWebPropertyId :: Lens' ManagementProfilesPatch' Text +mppWebPropertyId + = lens _mppWebPropertyId + (\ s a -> s{_mppWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mppUserIp :: Lens' ManagementProfilesPatch' (Maybe Text) +mppUserIp + = lens _mppUserIp (\ s a -> s{_mppUserIp = a}) + +-- | ID of the view (profile) to be updated. +mppProfileId :: Lens' ManagementProfilesPatch' Text +mppProfileId + = lens _mppProfileId (\ s a -> s{_mppProfileId = a}) + +-- | Account ID to which the view (profile) belongs +mppAccountId :: Lens' ManagementProfilesPatch' Text +mppAccountId + = lens _mppAccountId (\ s a -> s{_mppAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mppKey :: Lens' ManagementProfilesPatch' (Maybe Text) +mppKey = lens _mppKey (\ s a -> s{_mppKey = a}) + +-- | OAuth 2.0 token for the current user. +mppOauthToken :: Lens' ManagementProfilesPatch' (Maybe Text) +mppOauthToken + = lens _mppOauthToken + (\ s a -> s{_mppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mppFields :: Lens' ManagementProfilesPatch' (Maybe Text) +mppFields + = lens _mppFields (\ s a -> s{_mppFields = a}) + +-- | Data format for the response. +mppAlt :: Lens' ManagementProfilesPatch' Text +mppAlt = lens _mppAlt (\ s a -> s{_mppAlt = a}) + +instance GoogleRequest ManagementProfilesPatch' where + type Rs ManagementProfilesPatch' = Profile + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesPatch{..} + = go _mppQuotaUser _mppPrettyPrint _mppWebPropertyId + _mppUserIp + _mppProfileId + _mppAccountId + _mppKey + _mppOauthToken + _mppFields + _mppAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Update.hs new file mode 100644 index 000000000..c422d324c --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Profiles/Update.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Profiles.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing view (profile). +-- +-- /See:/ for @AnalyticsManagementProfilesUpdate@. +module Analytics.Management.Profiles.Update + ( + -- * REST Resource + ManagementProfilesUpdateAPI + + -- * Creating a Request + , managementProfilesUpdate + , ManagementProfilesUpdate + + -- * Request Lenses + , mpuQuotaUser + , mpuPrettyPrint + , mpuWebPropertyId + , mpuUserIp + , mpuProfileId + , mpuAccountId + , mpuKey + , mpuOauthToken + , mpuFields + , mpuAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementProfilesUpdate@ which the +-- 'ManagementProfilesUpdate' request conforms to. +type ManagementProfilesUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> Put '[JSON] Profile + +-- | Updates an existing view (profile). +-- +-- /See:/ 'managementProfilesUpdate' smart constructor. +data ManagementProfilesUpdate = ManagementProfilesUpdate + { _mpuQuotaUser :: !(Maybe Text) + , _mpuPrettyPrint :: !Bool + , _mpuWebPropertyId :: !Text + , _mpuUserIp :: !(Maybe Text) + , _mpuProfileId :: !Text + , _mpuAccountId :: !Text + , _mpuKey :: !(Maybe Text) + , _mpuOauthToken :: !(Maybe Text) + , _mpuFields :: !(Maybe Text) + , _mpuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementProfilesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpuQuotaUser' +-- +-- * 'mpuPrettyPrint' +-- +-- * 'mpuWebPropertyId' +-- +-- * 'mpuUserIp' +-- +-- * 'mpuProfileId' +-- +-- * 'mpuAccountId' +-- +-- * 'mpuKey' +-- +-- * 'mpuOauthToken' +-- +-- * 'mpuFields' +-- +-- * 'mpuAlt' +managementProfilesUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementProfilesUpdate +managementProfilesUpdate pMpuWebPropertyId_ pMpuProfileId_ pMpuAccountId_ = + ManagementProfilesUpdate + { _mpuQuotaUser = Nothing + , _mpuPrettyPrint = False + , _mpuWebPropertyId = pMpuWebPropertyId_ + , _mpuUserIp = Nothing + , _mpuProfileId = pMpuProfileId_ + , _mpuAccountId = pMpuAccountId_ + , _mpuKey = Nothing + , _mpuOauthToken = Nothing + , _mpuFields = Nothing + , _mpuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpuQuotaUser :: Lens' ManagementProfilesUpdate' (Maybe Text) +mpuQuotaUser + = lens _mpuQuotaUser (\ s a -> s{_mpuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpuPrettyPrint :: Lens' ManagementProfilesUpdate' Bool +mpuPrettyPrint + = lens _mpuPrettyPrint + (\ s a -> s{_mpuPrettyPrint = a}) + +-- | Web property ID to which the view (profile) belongs +mpuWebPropertyId :: Lens' ManagementProfilesUpdate' Text +mpuWebPropertyId + = lens _mpuWebPropertyId + (\ s a -> s{_mpuWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpuUserIp :: Lens' ManagementProfilesUpdate' (Maybe Text) +mpuUserIp + = lens _mpuUserIp (\ s a -> s{_mpuUserIp = a}) + +-- | ID of the view (profile) to be updated. +mpuProfileId :: Lens' ManagementProfilesUpdate' Text +mpuProfileId + = lens _mpuProfileId (\ s a -> s{_mpuProfileId = a}) + +-- | Account ID to which the view (profile) belongs +mpuAccountId :: Lens' ManagementProfilesUpdate' Text +mpuAccountId + = lens _mpuAccountId (\ s a -> s{_mpuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpuKey :: Lens' ManagementProfilesUpdate' (Maybe Text) +mpuKey = lens _mpuKey (\ s a -> s{_mpuKey = a}) + +-- | OAuth 2.0 token for the current user. +mpuOauthToken :: Lens' ManagementProfilesUpdate' (Maybe Text) +mpuOauthToken + = lens _mpuOauthToken + (\ s a -> s{_mpuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpuFields :: Lens' ManagementProfilesUpdate' (Maybe Text) +mpuFields + = lens _mpuFields (\ s a -> s{_mpuFields = a}) + +-- | Data format for the response. +mpuAlt :: Lens' ManagementProfilesUpdate' Text +mpuAlt = lens _mpuAlt (\ s a -> s{_mpuAlt = a}) + +instance GoogleRequest ManagementProfilesUpdate' + where + type Rs ManagementProfilesUpdate' = Profile + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementProfilesUpdate{..} + = go _mpuQuotaUser _mpuPrettyPrint _mpuWebPropertyId + _mpuUserIp + _mpuProfileId + _mpuAccountId + _mpuKey + _mpuOauthToken + _mpuFields + _mpuAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementProfilesUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Segments/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Segments/List.hs new file mode 100644 index 000000000..ed8e63cc7 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Segments/List.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Segments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists segments to which the user has access. +-- +-- /See:/ for @AnalyticsManagementSegmentsList@. +module Analytics.Management.Segments.List + ( + -- * REST Resource + ManagementSegmentsListAPI + + -- * Creating a Request + , managementSegmentsList + , ManagementSegmentsList + + -- * Request Lenses + , mslQuotaUser + , mslPrettyPrint + , mslUserIp + , mslKey + , mslOauthToken + , mslStartIndex + , mslMaxResults + , mslFields + , mslAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementSegmentsList@ which the +-- 'ManagementSegmentsList' request conforms to. +type ManagementSegmentsListAPI = + "management" :> + "segments" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] Segments + +-- | Lists segments to which the user has access. +-- +-- /See:/ 'managementSegmentsList' smart constructor. +data ManagementSegmentsList = ManagementSegmentsList + { _mslQuotaUser :: !(Maybe Text) + , _mslPrettyPrint :: !Bool + , _mslUserIp :: !(Maybe Text) + , _mslKey :: !(Maybe Text) + , _mslOauthToken :: !(Maybe Text) + , _mslStartIndex :: !(Maybe Int32) + , _mslMaxResults :: !(Maybe Int32) + , _mslFields :: !(Maybe Text) + , _mslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementSegmentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mslQuotaUser' +-- +-- * 'mslPrettyPrint' +-- +-- * 'mslUserIp' +-- +-- * 'mslKey' +-- +-- * 'mslOauthToken' +-- +-- * 'mslStartIndex' +-- +-- * 'mslMaxResults' +-- +-- * 'mslFields' +-- +-- * 'mslAlt' +managementSegmentsList + :: ManagementSegmentsList +managementSegmentsList = + ManagementSegmentsList + { _mslQuotaUser = Nothing + , _mslPrettyPrint = False + , _mslUserIp = Nothing + , _mslKey = Nothing + , _mslOauthToken = Nothing + , _mslStartIndex = Nothing + , _mslMaxResults = Nothing + , _mslFields = Nothing + , _mslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mslQuotaUser :: Lens' ManagementSegmentsList' (Maybe Text) +mslQuotaUser + = lens _mslQuotaUser (\ s a -> s{_mslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mslPrettyPrint :: Lens' ManagementSegmentsList' Bool +mslPrettyPrint + = lens _mslPrettyPrint + (\ s a -> s{_mslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mslUserIp :: Lens' ManagementSegmentsList' (Maybe Text) +mslUserIp + = lens _mslUserIp (\ s a -> s{_mslUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mslKey :: Lens' ManagementSegmentsList' (Maybe Text) +mslKey = lens _mslKey (\ s a -> s{_mslKey = a}) + +-- | OAuth 2.0 token for the current user. +mslOauthToken :: Lens' ManagementSegmentsList' (Maybe Text) +mslOauthToken + = lens _mslOauthToken + (\ s a -> s{_mslOauthToken = a}) + +-- | An index of the first segment to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mslStartIndex :: Lens' ManagementSegmentsList' (Maybe Int32) +mslStartIndex + = lens _mslStartIndex + (\ s a -> s{_mslStartIndex = a}) + +-- | The maximum number of segments to include in this response. +mslMaxResults :: Lens' ManagementSegmentsList' (Maybe Int32) +mslMaxResults + = lens _mslMaxResults + (\ s a -> s{_mslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mslFields :: Lens' ManagementSegmentsList' (Maybe Text) +mslFields + = lens _mslFields (\ s a -> s{_mslFields = a}) + +-- | Data format for the response. +mslAlt :: Lens' ManagementSegmentsList' Text +mslAlt = lens _mslAlt (\ s a -> s{_mslAlt = a}) + +instance GoogleRequest ManagementSegmentsList' where + type Rs ManagementSegmentsList' = Segments + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementSegmentsList{..} + = go _mslQuotaUser _mslPrettyPrint _mslUserIp _mslKey + _mslOauthToken + _mslStartIndex + _mslMaxResults + _mslFields + _mslAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementSegmentsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Get.hs new file mode 100644 index 000000000..3a3484fb4 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Get.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.UnsampledReports.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a single unsampled report. +-- +-- /See:/ for @AnalyticsManagementUnsampledReportsGet@. +module Analytics.Management.UnsampledReports.Get + ( + -- * REST Resource + ManagementUnsampledReportsGetAPI + + -- * Creating a Request + , managementUnsampledReportsGet + , ManagementUnsampledReportsGet + + -- * Request Lenses + , murgQuotaUser + , murgPrettyPrint + , murgWebPropertyId + , murgUserIp + , murgProfileId + , murgAccountId + , murgKey + , murgUnsampledReportId + , murgOauthToken + , murgFields + , murgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUnsampledReportsGet@ which the +-- 'ManagementUnsampledReportsGet' request conforms to. +type ManagementUnsampledReportsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "unsampledReports" :> + Capture "unsampledReportId" Text :> + Get '[JSON] UnsampledReport + +-- | Returns a single unsampled report. +-- +-- /See:/ 'managementUnsampledReportsGet' smart constructor. +data ManagementUnsampledReportsGet = ManagementUnsampledReportsGet + { _murgQuotaUser :: !(Maybe Text) + , _murgPrettyPrint :: !Bool + , _murgWebPropertyId :: !Text + , _murgUserIp :: !(Maybe Text) + , _murgProfileId :: !Text + , _murgAccountId :: !Text + , _murgKey :: !(Maybe Text) + , _murgUnsampledReportId :: !Text + , _murgOauthToken :: !(Maybe Text) + , _murgFields :: !(Maybe Text) + , _murgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUnsampledReportsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'murgQuotaUser' +-- +-- * 'murgPrettyPrint' +-- +-- * 'murgWebPropertyId' +-- +-- * 'murgUserIp' +-- +-- * 'murgProfileId' +-- +-- * 'murgAccountId' +-- +-- * 'murgKey' +-- +-- * 'murgUnsampledReportId' +-- +-- * 'murgOauthToken' +-- +-- * 'murgFields' +-- +-- * 'murgAlt' +managementUnsampledReportsGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'unsampledReportId' + -> ManagementUnsampledReportsGet +managementUnsampledReportsGet pMurgWebPropertyId_ pMurgProfileId_ pMurgAccountId_ pMurgUnsampledReportId_ = + ManagementUnsampledReportsGet + { _murgQuotaUser = Nothing + , _murgPrettyPrint = False + , _murgWebPropertyId = pMurgWebPropertyId_ + , _murgUserIp = Nothing + , _murgProfileId = pMurgProfileId_ + , _murgAccountId = pMurgAccountId_ + , _murgKey = Nothing + , _murgUnsampledReportId = pMurgUnsampledReportId_ + , _murgOauthToken = Nothing + , _murgFields = Nothing + , _murgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +murgQuotaUser :: Lens' ManagementUnsampledReportsGet' (Maybe Text) +murgQuotaUser + = lens _murgQuotaUser + (\ s a -> s{_murgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +murgPrettyPrint :: Lens' ManagementUnsampledReportsGet' Bool +murgPrettyPrint + = lens _murgPrettyPrint + (\ s a -> s{_murgPrettyPrint = a}) + +-- | Web property ID to retrieve unsampled reports for. +murgWebPropertyId :: Lens' ManagementUnsampledReportsGet' Text +murgWebPropertyId + = lens _murgWebPropertyId + (\ s a -> s{_murgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +murgUserIp :: Lens' ManagementUnsampledReportsGet' (Maybe Text) +murgUserIp + = lens _murgUserIp (\ s a -> s{_murgUserIp = a}) + +-- | View (Profile) ID to retrieve unsampled report for. +murgProfileId :: Lens' ManagementUnsampledReportsGet' Text +murgProfileId + = lens _murgProfileId + (\ s a -> s{_murgProfileId = a}) + +-- | Account ID to retrieve unsampled report for. +murgAccountId :: Lens' ManagementUnsampledReportsGet' Text +murgAccountId + = lens _murgAccountId + (\ s a -> s{_murgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +murgKey :: Lens' ManagementUnsampledReportsGet' (Maybe Text) +murgKey = lens _murgKey (\ s a -> s{_murgKey = a}) + +-- | ID of the unsampled report to retrieve. +murgUnsampledReportId :: Lens' ManagementUnsampledReportsGet' Text +murgUnsampledReportId + = lens _murgUnsampledReportId + (\ s a -> s{_murgUnsampledReportId = a}) + +-- | OAuth 2.0 token for the current user. +murgOauthToken :: Lens' ManagementUnsampledReportsGet' (Maybe Text) +murgOauthToken + = lens _murgOauthToken + (\ s a -> s{_murgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +murgFields :: Lens' ManagementUnsampledReportsGet' (Maybe Text) +murgFields + = lens _murgFields (\ s a -> s{_murgFields = a}) + +-- | Data format for the response. +murgAlt :: Lens' ManagementUnsampledReportsGet' Text +murgAlt = lens _murgAlt (\ s a -> s{_murgAlt = a}) + +instance GoogleRequest ManagementUnsampledReportsGet' + where + type Rs ManagementUnsampledReportsGet' = + UnsampledReport + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementUnsampledReportsGet{..} + = go _murgQuotaUser _murgPrettyPrint + _murgWebPropertyId + _murgUserIp + _murgProfileId + _murgAccountId + _murgKey + _murgUnsampledReportId + _murgOauthToken + _murgFields + _murgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUnsampledReportsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Insert.hs new file mode 100644 index 000000000..6984b0031 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/Insert.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.UnsampledReports.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new unsampled report. +-- +-- /See:/ for @AnalyticsManagementUnsampledReportsInsert@. +module Analytics.Management.UnsampledReports.Insert + ( + -- * REST Resource + ManagementUnsampledReportsInsertAPI + + -- * Creating a Request + , managementUnsampledReportsInsert + , ManagementUnsampledReportsInsert + + -- * Request Lenses + , muriQuotaUser + , muriPrettyPrint + , muriWebPropertyId + , muriUserIp + , muriProfileId + , muriAccountId + , muriKey + , muriOauthToken + , muriFields + , muriAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUnsampledReportsInsert@ which the +-- 'ManagementUnsampledReportsInsert' request conforms to. +type ManagementUnsampledReportsInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "unsampledReports" :> Post '[JSON] UnsampledReport + +-- | Create a new unsampled report. +-- +-- /See:/ 'managementUnsampledReportsInsert' smart constructor. +data ManagementUnsampledReportsInsert = ManagementUnsampledReportsInsert + { _muriQuotaUser :: !(Maybe Text) + , _muriPrettyPrint :: !Bool + , _muriWebPropertyId :: !Text + , _muriUserIp :: !(Maybe Text) + , _muriProfileId :: !Text + , _muriAccountId :: !Text + , _muriKey :: !(Maybe Text) + , _muriOauthToken :: !(Maybe Text) + , _muriFields :: !(Maybe Text) + , _muriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUnsampledReportsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muriQuotaUser' +-- +-- * 'muriPrettyPrint' +-- +-- * 'muriWebPropertyId' +-- +-- * 'muriUserIp' +-- +-- * 'muriProfileId' +-- +-- * 'muriAccountId' +-- +-- * 'muriKey' +-- +-- * 'muriOauthToken' +-- +-- * 'muriFields' +-- +-- * 'muriAlt' +managementUnsampledReportsInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementUnsampledReportsInsert +managementUnsampledReportsInsert pMuriWebPropertyId_ pMuriProfileId_ pMuriAccountId_ = + ManagementUnsampledReportsInsert + { _muriQuotaUser = Nothing + , _muriPrettyPrint = False + , _muriWebPropertyId = pMuriWebPropertyId_ + , _muriUserIp = Nothing + , _muriProfileId = pMuriProfileId_ + , _muriAccountId = pMuriAccountId_ + , _muriKey = Nothing + , _muriOauthToken = Nothing + , _muriFields = Nothing + , _muriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muriQuotaUser :: Lens' ManagementUnsampledReportsInsert' (Maybe Text) +muriQuotaUser + = lens _muriQuotaUser + (\ s a -> s{_muriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +muriPrettyPrint :: Lens' ManagementUnsampledReportsInsert' Bool +muriPrettyPrint + = lens _muriPrettyPrint + (\ s a -> s{_muriPrettyPrint = a}) + +-- | Web property ID to create the unsampled report for. +muriWebPropertyId :: Lens' ManagementUnsampledReportsInsert' Text +muriWebPropertyId + = lens _muriWebPropertyId + (\ s a -> s{_muriWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muriUserIp :: Lens' ManagementUnsampledReportsInsert' (Maybe Text) +muriUserIp + = lens _muriUserIp (\ s a -> s{_muriUserIp = a}) + +-- | View (Profile) ID to create the unsampled report for. +muriProfileId :: Lens' ManagementUnsampledReportsInsert' Text +muriProfileId + = lens _muriProfileId + (\ s a -> s{_muriProfileId = a}) + +-- | Account ID to create the unsampled report for. +muriAccountId :: Lens' ManagementUnsampledReportsInsert' Text +muriAccountId + = lens _muriAccountId + (\ s a -> s{_muriAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muriKey :: Lens' ManagementUnsampledReportsInsert' (Maybe Text) +muriKey = lens _muriKey (\ s a -> s{_muriKey = a}) + +-- | OAuth 2.0 token for the current user. +muriOauthToken :: Lens' ManagementUnsampledReportsInsert' (Maybe Text) +muriOauthToken + = lens _muriOauthToken + (\ s a -> s{_muriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +muriFields :: Lens' ManagementUnsampledReportsInsert' (Maybe Text) +muriFields + = lens _muriFields (\ s a -> s{_muriFields = a}) + +-- | Data format for the response. +muriAlt :: Lens' ManagementUnsampledReportsInsert' Text +muriAlt = lens _muriAlt (\ s a -> s{_muriAlt = a}) + +instance GoogleRequest + ManagementUnsampledReportsInsert' where + type Rs ManagementUnsampledReportsInsert' = + UnsampledReport + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementUnsampledReportsInsert{..} + = go _muriQuotaUser _muriPrettyPrint + _muriWebPropertyId + _muriUserIp + _muriProfileId + _muriAccountId + _muriKey + _muriOauthToken + _muriFields + _muriAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUnsampledReportsInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/List.hs new file mode 100644 index 000000000..a8b15f7be --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnsampledReports/List.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.UnsampledReports.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists unsampled reports to which the user has access. +-- +-- /See:/ for @AnalyticsManagementUnsampledReportsList@. +module Analytics.Management.UnsampledReports.List + ( + -- * REST Resource + ManagementUnsampledReportsListAPI + + -- * Creating a Request + , managementUnsampledReportsList + , ManagementUnsampledReportsList + + -- * Request Lenses + , murlQuotaUser + , murlPrettyPrint + , murlWebPropertyId + , murlUserIp + , murlProfileId + , murlAccountId + , murlKey + , murlOauthToken + , murlStartIndex + , murlMaxResults + , murlFields + , murlAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUnsampledReportsList@ which the +-- 'ManagementUnsampledReportsList' request conforms to. +type ManagementUnsampledReportsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "profiles" :> + Capture "profileId" Text :> + "unsampledReports" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] UnsampledReports + +-- | Lists unsampled reports to which the user has access. +-- +-- /See:/ 'managementUnsampledReportsList' smart constructor. +data ManagementUnsampledReportsList = ManagementUnsampledReportsList + { _murlQuotaUser :: !(Maybe Text) + , _murlPrettyPrint :: !Bool + , _murlWebPropertyId :: !Text + , _murlUserIp :: !(Maybe Text) + , _murlProfileId :: !Text + , _murlAccountId :: !Text + , _murlKey :: !(Maybe Text) + , _murlOauthToken :: !(Maybe Text) + , _murlStartIndex :: !(Maybe Int32) + , _murlMaxResults :: !(Maybe Int32) + , _murlFields :: !(Maybe Text) + , _murlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUnsampledReportsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'murlQuotaUser' +-- +-- * 'murlPrettyPrint' +-- +-- * 'murlWebPropertyId' +-- +-- * 'murlUserIp' +-- +-- * 'murlProfileId' +-- +-- * 'murlAccountId' +-- +-- * 'murlKey' +-- +-- * 'murlOauthToken' +-- +-- * 'murlStartIndex' +-- +-- * 'murlMaxResults' +-- +-- * 'murlFields' +-- +-- * 'murlAlt' +managementUnsampledReportsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'profileId' + -> Text -- ^ 'accountId' + -> ManagementUnsampledReportsList +managementUnsampledReportsList pMurlWebPropertyId_ pMurlProfileId_ pMurlAccountId_ = + ManagementUnsampledReportsList + { _murlQuotaUser = Nothing + , _murlPrettyPrint = False + , _murlWebPropertyId = pMurlWebPropertyId_ + , _murlUserIp = Nothing + , _murlProfileId = pMurlProfileId_ + , _murlAccountId = pMurlAccountId_ + , _murlKey = Nothing + , _murlOauthToken = Nothing + , _murlStartIndex = Nothing + , _murlMaxResults = Nothing + , _murlFields = Nothing + , _murlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +murlQuotaUser :: Lens' ManagementUnsampledReportsList' (Maybe Text) +murlQuotaUser + = lens _murlQuotaUser + (\ s a -> s{_murlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +murlPrettyPrint :: Lens' ManagementUnsampledReportsList' Bool +murlPrettyPrint + = lens _murlPrettyPrint + (\ s a -> s{_murlPrettyPrint = a}) + +-- | Web property ID to retrieve unsampled reports for. Must be a specific +-- web property ID, ~all is not supported. +murlWebPropertyId :: Lens' ManagementUnsampledReportsList' Text +murlWebPropertyId + = lens _murlWebPropertyId + (\ s a -> s{_murlWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +murlUserIp :: Lens' ManagementUnsampledReportsList' (Maybe Text) +murlUserIp + = lens _murlUserIp (\ s a -> s{_murlUserIp = a}) + +-- | View (Profile) ID to retrieve unsampled reports for. Must be a specific +-- view (profile) ID, ~all is not supported. +murlProfileId :: Lens' ManagementUnsampledReportsList' Text +murlProfileId + = lens _murlProfileId + (\ s a -> s{_murlProfileId = a}) + +-- | Account ID to retrieve unsampled reports for. Must be a specific account +-- ID, ~all is not supported. +murlAccountId :: Lens' ManagementUnsampledReportsList' Text +murlAccountId + = lens _murlAccountId + (\ s a -> s{_murlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +murlKey :: Lens' ManagementUnsampledReportsList' (Maybe Text) +murlKey = lens _murlKey (\ s a -> s{_murlKey = a}) + +-- | OAuth 2.0 token for the current user. +murlOauthToken :: Lens' ManagementUnsampledReportsList' (Maybe Text) +murlOauthToken + = lens _murlOauthToken + (\ s a -> s{_murlOauthToken = a}) + +-- | An index of the first unsampled report to retrieve. Use this parameter +-- as a pagination mechanism along with the max-results parameter. +murlStartIndex :: Lens' ManagementUnsampledReportsList' (Maybe Int32) +murlStartIndex + = lens _murlStartIndex + (\ s a -> s{_murlStartIndex = a}) + +-- | The maximum number of unsampled reports to include in this response. +murlMaxResults :: Lens' ManagementUnsampledReportsList' (Maybe Int32) +murlMaxResults + = lens _murlMaxResults + (\ s a -> s{_murlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +murlFields :: Lens' ManagementUnsampledReportsList' (Maybe Text) +murlFields + = lens _murlFields (\ s a -> s{_murlFields = a}) + +-- | Data format for the response. +murlAlt :: Lens' ManagementUnsampledReportsList' Text +murlAlt = lens _murlAlt (\ s a -> s{_murlAlt = a}) + +instance GoogleRequest + ManagementUnsampledReportsList' where + type Rs ManagementUnsampledReportsList' = + UnsampledReports + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementUnsampledReportsList{..} + = go _murlQuotaUser _murlPrettyPrint + _murlWebPropertyId + _murlUserIp + _murlProfileId + _murlAccountId + _murlKey + _murlOauthToken + _murlStartIndex + _murlMaxResults + _murlFields + _murlAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUnsampledReportsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/DeleteUploadData.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/DeleteUploadData.hs new file mode 100644 index 000000000..40a0b0cf5 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/DeleteUploadData.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Uploads.DeleteUploadData +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete data associated with a previous upload. +-- +-- /See:/ for @AnalyticsManagementUploadsDeleteUploadData@. +module Analytics.Management.Uploads.DeleteUploadData + ( + -- * REST Resource + ManagementUploadsDeleteUploadDataAPI + + -- * Creating a Request + , managementUploadsDeleteUploadData + , ManagementUploadsDeleteUploadData + + -- * Request Lenses + , mududQuotaUser + , mududPrettyPrint + , mududWebPropertyId + , mududUserIp + , mududCustomDataSourceId + , mududAccountId + , mududKey + , mududOauthToken + , mududFields + , mududAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUploadsDeleteUploadData@ which the +-- 'ManagementUploadsDeleteUploadData' request conforms to. +type ManagementUploadsDeleteUploadDataAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDataSources" :> + Capture "customDataSourceId" Text :> + "deleteUploadData" :> Post '[JSON] () + +-- | Delete data associated with a previous upload. +-- +-- /See:/ 'managementUploadsDeleteUploadData' smart constructor. +data ManagementUploadsDeleteUploadData = ManagementUploadsDeleteUploadData + { _mududQuotaUser :: !(Maybe Text) + , _mududPrettyPrint :: !Bool + , _mududWebPropertyId :: !Text + , _mududUserIp :: !(Maybe Text) + , _mududCustomDataSourceId :: !Text + , _mududAccountId :: !Text + , _mududKey :: !(Maybe Text) + , _mududOauthToken :: !(Maybe Text) + , _mududFields :: !(Maybe Text) + , _mududAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUploadsDeleteUploadData'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mududQuotaUser' +-- +-- * 'mududPrettyPrint' +-- +-- * 'mududWebPropertyId' +-- +-- * 'mududUserIp' +-- +-- * 'mududCustomDataSourceId' +-- +-- * 'mududAccountId' +-- +-- * 'mududKey' +-- +-- * 'mududOauthToken' +-- +-- * 'mududFields' +-- +-- * 'mududAlt' +managementUploadsDeleteUploadData + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'customDataSourceId' + -> Text -- ^ 'accountId' + -> ManagementUploadsDeleteUploadData +managementUploadsDeleteUploadData pMududWebPropertyId_ pMududCustomDataSourceId_ pMududAccountId_ = + ManagementUploadsDeleteUploadData + { _mududQuotaUser = Nothing + , _mududPrettyPrint = False + , _mududWebPropertyId = pMududWebPropertyId_ + , _mududUserIp = Nothing + , _mududCustomDataSourceId = pMududCustomDataSourceId_ + , _mududAccountId = pMududAccountId_ + , _mududKey = Nothing + , _mududOauthToken = Nothing + , _mududFields = Nothing + , _mududAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mududQuotaUser :: Lens' ManagementUploadsDeleteUploadData' (Maybe Text) +mududQuotaUser + = lens _mududQuotaUser + (\ s a -> s{_mududQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mududPrettyPrint :: Lens' ManagementUploadsDeleteUploadData' Bool +mududPrettyPrint + = lens _mududPrettyPrint + (\ s a -> s{_mududPrettyPrint = a}) + +-- | Web property Id for the uploads to be deleted. +mududWebPropertyId :: Lens' ManagementUploadsDeleteUploadData' Text +mududWebPropertyId + = lens _mududWebPropertyId + (\ s a -> s{_mududWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mududUserIp :: Lens' ManagementUploadsDeleteUploadData' (Maybe Text) +mududUserIp + = lens _mududUserIp (\ s a -> s{_mududUserIp = a}) + +-- | Custom data source Id for the uploads to be deleted. +mududCustomDataSourceId :: Lens' ManagementUploadsDeleteUploadData' Text +mududCustomDataSourceId + = lens _mududCustomDataSourceId + (\ s a -> s{_mududCustomDataSourceId = a}) + +-- | Account Id for the uploads to be deleted. +mududAccountId :: Lens' ManagementUploadsDeleteUploadData' Text +mududAccountId + = lens _mududAccountId + (\ s a -> s{_mududAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mududKey :: Lens' ManagementUploadsDeleteUploadData' (Maybe Text) +mududKey = lens _mududKey (\ s a -> s{_mududKey = a}) + +-- | OAuth 2.0 token for the current user. +mududOauthToken :: Lens' ManagementUploadsDeleteUploadData' (Maybe Text) +mududOauthToken + = lens _mududOauthToken + (\ s a -> s{_mududOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mududFields :: Lens' ManagementUploadsDeleteUploadData' (Maybe Text) +mududFields + = lens _mududFields (\ s a -> s{_mududFields = a}) + +-- | Data format for the response. +mududAlt :: Lens' ManagementUploadsDeleteUploadData' Text +mududAlt = lens _mududAlt (\ s a -> s{_mududAlt = a}) + +instance GoogleRequest + ManagementUploadsDeleteUploadData' where + type Rs ManagementUploadsDeleteUploadData' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementUploadsDeleteUploadData{..} + = go _mududQuotaUser _mududPrettyPrint + _mududWebPropertyId + _mududUserIp + _mududCustomDataSourceId + _mududAccountId + _mududKey + _mududOauthToken + _mududFields + _mududAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUploadsDeleteUploadDataAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/Get.hs new file mode 100644 index 000000000..5e2518263 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/Get.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Uploads.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List uploads to which the user has access. +-- +-- /See:/ for @AnalyticsManagementUploadsGet@. +module Analytics.Management.Uploads.Get + ( + -- * REST Resource + ManagementUploadsGetAPI + + -- * Creating a Request + , managementUploadsGet + , ManagementUploadsGet + + -- * Request Lenses + , mugQuotaUser + , mugPrettyPrint + , mugWebPropertyId + , mugUserIp + , mugCustomDataSourceId + , mugAccountId + , mugKey + , mugOauthToken + , mugUploadId + , mugFields + , mugAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUploadsGet@ which the +-- 'ManagementUploadsGet' request conforms to. +type ManagementUploadsGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDataSources" :> + Capture "customDataSourceId" Text :> + "uploads" :> + Capture "uploadId" Text :> Get '[JSON] Upload + +-- | List uploads to which the user has access. +-- +-- /See:/ 'managementUploadsGet' smart constructor. +data ManagementUploadsGet = ManagementUploadsGet + { _mugQuotaUser :: !(Maybe Text) + , _mugPrettyPrint :: !Bool + , _mugWebPropertyId :: !Text + , _mugUserIp :: !(Maybe Text) + , _mugCustomDataSourceId :: !Text + , _mugAccountId :: !Text + , _mugKey :: !(Maybe Text) + , _mugOauthToken :: !(Maybe Text) + , _mugUploadId :: !Text + , _mugFields :: !(Maybe Text) + , _mugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUploadsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mugQuotaUser' +-- +-- * 'mugPrettyPrint' +-- +-- * 'mugWebPropertyId' +-- +-- * 'mugUserIp' +-- +-- * 'mugCustomDataSourceId' +-- +-- * 'mugAccountId' +-- +-- * 'mugKey' +-- +-- * 'mugOauthToken' +-- +-- * 'mugUploadId' +-- +-- * 'mugFields' +-- +-- * 'mugAlt' +managementUploadsGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'customDataSourceId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'uploadId' + -> ManagementUploadsGet +managementUploadsGet pMugWebPropertyId_ pMugCustomDataSourceId_ pMugAccountId_ pMugUploadId_ = + ManagementUploadsGet + { _mugQuotaUser = Nothing + , _mugPrettyPrint = False + , _mugWebPropertyId = pMugWebPropertyId_ + , _mugUserIp = Nothing + , _mugCustomDataSourceId = pMugCustomDataSourceId_ + , _mugAccountId = pMugAccountId_ + , _mugKey = Nothing + , _mugOauthToken = Nothing + , _mugUploadId = pMugUploadId_ + , _mugFields = Nothing + , _mugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mugQuotaUser :: Lens' ManagementUploadsGet' (Maybe Text) +mugQuotaUser + = lens _mugQuotaUser (\ s a -> s{_mugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mugPrettyPrint :: Lens' ManagementUploadsGet' Bool +mugPrettyPrint + = lens _mugPrettyPrint + (\ s a -> s{_mugPrettyPrint = a}) + +-- | Web property Id for the upload to retrieve. +mugWebPropertyId :: Lens' ManagementUploadsGet' Text +mugWebPropertyId + = lens _mugWebPropertyId + (\ s a -> s{_mugWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mugUserIp :: Lens' ManagementUploadsGet' (Maybe Text) +mugUserIp + = lens _mugUserIp (\ s a -> s{_mugUserIp = a}) + +-- | Custom data source Id for upload to retrieve. +mugCustomDataSourceId :: Lens' ManagementUploadsGet' Text +mugCustomDataSourceId + = lens _mugCustomDataSourceId + (\ s a -> s{_mugCustomDataSourceId = a}) + +-- | Account Id for the upload to retrieve. +mugAccountId :: Lens' ManagementUploadsGet' Text +mugAccountId + = lens _mugAccountId (\ s a -> s{_mugAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mugKey :: Lens' ManagementUploadsGet' (Maybe Text) +mugKey = lens _mugKey (\ s a -> s{_mugKey = a}) + +-- | OAuth 2.0 token for the current user. +mugOauthToken :: Lens' ManagementUploadsGet' (Maybe Text) +mugOauthToken + = lens _mugOauthToken + (\ s a -> s{_mugOauthToken = a}) + +-- | Upload Id to retrieve. +mugUploadId :: Lens' ManagementUploadsGet' Text +mugUploadId + = lens _mugUploadId (\ s a -> s{_mugUploadId = a}) + +-- | Selector specifying which fields to include in a partial response. +mugFields :: Lens' ManagementUploadsGet' (Maybe Text) +mugFields + = lens _mugFields (\ s a -> s{_mugFields = a}) + +-- | Data format for the response. +mugAlt :: Lens' ManagementUploadsGet' Text +mugAlt = lens _mugAlt (\ s a -> s{_mugAlt = a}) + +instance GoogleRequest ManagementUploadsGet' where + type Rs ManagementUploadsGet' = Upload + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementUploadsGet{..} + = go _mugQuotaUser _mugPrettyPrint _mugWebPropertyId + _mugUserIp + _mugCustomDataSourceId + _mugAccountId + _mugKey + _mugOauthToken + _mugUploadId + _mugFields + _mugAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUploadsGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/List.hs new file mode 100644 index 000000000..d3d0bcced --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/List.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Uploads.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List uploads to which the user has access. +-- +-- /See:/ for @AnalyticsManagementUploadsList@. +module Analytics.Management.Uploads.List + ( + -- * REST Resource + ManagementUploadsListAPI + + -- * Creating a Request + , managementUploadsList + , ManagementUploadsList + + -- * Request Lenses + , mulQuotaUser + , mulPrettyPrint + , mulWebPropertyId + , mulUserIp + , mulCustomDataSourceId + , mulAccountId + , mulKey + , mulOauthToken + , mulStartIndex + , mulMaxResults + , mulFields + , mulAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUploadsList@ which the +-- 'ManagementUploadsList' request conforms to. +type ManagementUploadsListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDataSources" :> + Capture "customDataSourceId" Text :> + "uploads" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> Get '[JSON] Uploads + +-- | List uploads to which the user has access. +-- +-- /See:/ 'managementUploadsList' smart constructor. +data ManagementUploadsList = ManagementUploadsList + { _mulQuotaUser :: !(Maybe Text) + , _mulPrettyPrint :: !Bool + , _mulWebPropertyId :: !Text + , _mulUserIp :: !(Maybe Text) + , _mulCustomDataSourceId :: !Text + , _mulAccountId :: !Text + , _mulKey :: !(Maybe Text) + , _mulOauthToken :: !(Maybe Text) + , _mulStartIndex :: !(Maybe Int32) + , _mulMaxResults :: !(Maybe Int32) + , _mulFields :: !(Maybe Text) + , _mulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUploadsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mulQuotaUser' +-- +-- * 'mulPrettyPrint' +-- +-- * 'mulWebPropertyId' +-- +-- * 'mulUserIp' +-- +-- * 'mulCustomDataSourceId' +-- +-- * 'mulAccountId' +-- +-- * 'mulKey' +-- +-- * 'mulOauthToken' +-- +-- * 'mulStartIndex' +-- +-- * 'mulMaxResults' +-- +-- * 'mulFields' +-- +-- * 'mulAlt' +managementUploadsList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'customDataSourceId' + -> Text -- ^ 'accountId' + -> ManagementUploadsList +managementUploadsList pMulWebPropertyId_ pMulCustomDataSourceId_ pMulAccountId_ = + ManagementUploadsList + { _mulQuotaUser = Nothing + , _mulPrettyPrint = False + , _mulWebPropertyId = pMulWebPropertyId_ + , _mulUserIp = Nothing + , _mulCustomDataSourceId = pMulCustomDataSourceId_ + , _mulAccountId = pMulAccountId_ + , _mulKey = Nothing + , _mulOauthToken = Nothing + , _mulStartIndex = Nothing + , _mulMaxResults = Nothing + , _mulFields = Nothing + , _mulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mulQuotaUser :: Lens' ManagementUploadsList' (Maybe Text) +mulQuotaUser + = lens _mulQuotaUser (\ s a -> s{_mulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mulPrettyPrint :: Lens' ManagementUploadsList' Bool +mulPrettyPrint + = lens _mulPrettyPrint + (\ s a -> s{_mulPrettyPrint = a}) + +-- | Web property Id for the uploads to retrieve. +mulWebPropertyId :: Lens' ManagementUploadsList' Text +mulWebPropertyId + = lens _mulWebPropertyId + (\ s a -> s{_mulWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mulUserIp :: Lens' ManagementUploadsList' (Maybe Text) +mulUserIp + = lens _mulUserIp (\ s a -> s{_mulUserIp = a}) + +-- | Custom data source Id for uploads to retrieve. +mulCustomDataSourceId :: Lens' ManagementUploadsList' Text +mulCustomDataSourceId + = lens _mulCustomDataSourceId + (\ s a -> s{_mulCustomDataSourceId = a}) + +-- | Account Id for the uploads to retrieve. +mulAccountId :: Lens' ManagementUploadsList' Text +mulAccountId + = lens _mulAccountId (\ s a -> s{_mulAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mulKey :: Lens' ManagementUploadsList' (Maybe Text) +mulKey = lens _mulKey (\ s a -> s{_mulKey = a}) + +-- | OAuth 2.0 token for the current user. +mulOauthToken :: Lens' ManagementUploadsList' (Maybe Text) +mulOauthToken + = lens _mulOauthToken + (\ s a -> s{_mulOauthToken = a}) + +-- | A 1-based index of the first upload to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mulStartIndex :: Lens' ManagementUploadsList' (Maybe Int32) +mulStartIndex + = lens _mulStartIndex + (\ s a -> s{_mulStartIndex = a}) + +-- | The maximum number of uploads to include in this response. +mulMaxResults :: Lens' ManagementUploadsList' (Maybe Int32) +mulMaxResults + = lens _mulMaxResults + (\ s a -> s{_mulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mulFields :: Lens' ManagementUploadsList' (Maybe Text) +mulFields + = lens _mulFields (\ s a -> s{_mulFields = a}) + +-- | Data format for the response. +mulAlt :: Lens' ManagementUploadsList' Text +mulAlt = lens _mulAlt (\ s a -> s{_mulAlt = a}) + +instance GoogleRequest ManagementUploadsList' where + type Rs ManagementUploadsList' = Uploads + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementUploadsList{..} + = go _mulQuotaUser _mulPrettyPrint _mulWebPropertyId + _mulUserIp + _mulCustomDataSourceId + _mulAccountId + _mulKey + _mulOauthToken + _mulStartIndex + _mulMaxResults + _mulFields + _mulAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUploadsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/UploadData.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/UploadData.hs new file mode 100644 index 000000000..7a4403113 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Uploads/UploadData.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Uploads.UploadData +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Upload data for a custom data source. +-- +-- /See:/ for @AnalyticsManagementUploadsUploadData@. +module Analytics.Management.Uploads.UploadData + ( + -- * REST Resource + ManagementUploadsUploadDataAPI + + -- * Creating a Request + , managementUploadsUploadData + , ManagementUploadsUploadData + + -- * Request Lenses + , muudQuotaUser + , muudPrettyPrint + , muudWebPropertyId + , muudUserIp + , muudCustomDataSourceId + , muudAccountId + , muudKey + , muudOauthToken + , muudFields + , muudAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementUploadsUploadData@ which the +-- 'ManagementUploadsUploadData' request conforms to. +type ManagementUploadsUploadDataAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "customDataSources" :> + Capture "customDataSourceId" Text :> + "uploads" :> Post '[JSON] Upload + +-- | Upload data for a custom data source. +-- +-- /See:/ 'managementUploadsUploadData' smart constructor. +data ManagementUploadsUploadData = ManagementUploadsUploadData + { _muudQuotaUser :: !(Maybe Text) + , _muudPrettyPrint :: !Bool + , _muudWebPropertyId :: !Text + , _muudUserIp :: !(Maybe Text) + , _muudCustomDataSourceId :: !Text + , _muudAccountId :: !Text + , _muudKey :: !(Maybe Text) + , _muudOauthToken :: !(Maybe Text) + , _muudFields :: !(Maybe Text) + , _muudAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementUploadsUploadData'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muudQuotaUser' +-- +-- * 'muudPrettyPrint' +-- +-- * 'muudWebPropertyId' +-- +-- * 'muudUserIp' +-- +-- * 'muudCustomDataSourceId' +-- +-- * 'muudAccountId' +-- +-- * 'muudKey' +-- +-- * 'muudOauthToken' +-- +-- * 'muudFields' +-- +-- * 'muudAlt' +managementUploadsUploadData + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'customDataSourceId' + -> Text -- ^ 'accountId' + -> ManagementUploadsUploadData +managementUploadsUploadData pMuudWebPropertyId_ pMuudCustomDataSourceId_ pMuudAccountId_ = + ManagementUploadsUploadData + { _muudQuotaUser = Nothing + , _muudPrettyPrint = False + , _muudWebPropertyId = pMuudWebPropertyId_ + , _muudUserIp = Nothing + , _muudCustomDataSourceId = pMuudCustomDataSourceId_ + , _muudAccountId = pMuudAccountId_ + , _muudKey = Nothing + , _muudOauthToken = Nothing + , _muudFields = Nothing + , _muudAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muudQuotaUser :: Lens' ManagementUploadsUploadData' (Maybe Text) +muudQuotaUser + = lens _muudQuotaUser + (\ s a -> s{_muudQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +muudPrettyPrint :: Lens' ManagementUploadsUploadData' Bool +muudPrettyPrint + = lens _muudPrettyPrint + (\ s a -> s{_muudPrettyPrint = a}) + +-- | Web property UA-string associated with the upload. +muudWebPropertyId :: Lens' ManagementUploadsUploadData' Text +muudWebPropertyId + = lens _muudWebPropertyId + (\ s a -> s{_muudWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muudUserIp :: Lens' ManagementUploadsUploadData' (Maybe Text) +muudUserIp + = lens _muudUserIp (\ s a -> s{_muudUserIp = a}) + +-- | Custom data source Id to which the data being uploaded belongs. +muudCustomDataSourceId :: Lens' ManagementUploadsUploadData' Text +muudCustomDataSourceId + = lens _muudCustomDataSourceId + (\ s a -> s{_muudCustomDataSourceId = a}) + +-- | Account Id associated with the upload. +muudAccountId :: Lens' ManagementUploadsUploadData' Text +muudAccountId + = lens _muudAccountId + (\ s a -> s{_muudAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muudKey :: Lens' ManagementUploadsUploadData' (Maybe Text) +muudKey = lens _muudKey (\ s a -> s{_muudKey = a}) + +-- | OAuth 2.0 token for the current user. +muudOauthToken :: Lens' ManagementUploadsUploadData' (Maybe Text) +muudOauthToken + = lens _muudOauthToken + (\ s a -> s{_muudOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +muudFields :: Lens' ManagementUploadsUploadData' (Maybe Text) +muudFields + = lens _muudFields (\ s a -> s{_muudFields = a}) + +-- | Data format for the response. +muudAlt :: Lens' ManagementUploadsUploadData' Text +muudAlt = lens _muudAlt (\ s a -> s{_muudAlt = a}) + +instance GoogleRequest ManagementUploadsUploadData' + where + type Rs ManagementUploadsUploadData' = Upload + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementUploadsUploadData{..} + = go _muudQuotaUser _muudPrettyPrint + _muudWebPropertyId + _muudUserIp + _muudCustomDataSourceId + _muudAccountId + _muudKey + _muudOauthToken + _muudFields + _muudAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementUploadsUploadDataAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs new file mode 100644 index 000000000..81aa8d5b6 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a web property-AdWords link. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksDelete@. +module Analytics.Management.WebPropertyAdWordsLinks.Delete + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksDeleteAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksDelete + , ManagementWebPropertyAdWordsLinksDelete + + -- * Request Lenses + , mwpawldQuotaUser + , mwpawldPrettyPrint + , mwpawldWebPropertyId + , mwpawldUserIp + , mwpawldAccountId + , mwpawldKey + , mwpawldWebPropertyAdWordsLinkId + , mwpawldOauthToken + , mwpawldFields + , mwpawldAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksDelete@ which the +-- 'ManagementWebPropertyAdWordsLinksDelete' request conforms to. +type ManagementWebPropertyAdWordsLinksDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + Capture "webPropertyAdWordsLinkId" Text :> + Delete '[JSON] () + +-- | Deletes a web property-AdWords link. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksDelete' smart constructor. +data ManagementWebPropertyAdWordsLinksDelete = ManagementWebPropertyAdWordsLinksDelete + { _mwpawldQuotaUser :: !(Maybe Text) + , _mwpawldPrettyPrint :: !Bool + , _mwpawldWebPropertyId :: !Text + , _mwpawldUserIp :: !(Maybe Text) + , _mwpawldAccountId :: !Text + , _mwpawldKey :: !(Maybe Text) + , _mwpawldWebPropertyAdWordsLinkId :: !Text + , _mwpawldOauthToken :: !(Maybe Text) + , _mwpawldFields :: !(Maybe Text) + , _mwpawldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawldQuotaUser' +-- +-- * 'mwpawldPrettyPrint' +-- +-- * 'mwpawldWebPropertyId' +-- +-- * 'mwpawldUserIp' +-- +-- * 'mwpawldAccountId' +-- +-- * 'mwpawldKey' +-- +-- * 'mwpawldWebPropertyAdWordsLinkId' +-- +-- * 'mwpawldOauthToken' +-- +-- * 'mwpawldFields' +-- +-- * 'mwpawldAlt' +managementWebPropertyAdWordsLinksDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'webPropertyAdWordsLinkId' + -> ManagementWebPropertyAdWordsLinksDelete +managementWebPropertyAdWordsLinksDelete pMwpawldWebPropertyId_ pMwpawldAccountId_ pMwpawldWebPropertyAdWordsLinkId_ = + ManagementWebPropertyAdWordsLinksDelete + { _mwpawldQuotaUser = Nothing + , _mwpawldPrettyPrint = False + , _mwpawldWebPropertyId = pMwpawldWebPropertyId_ + , _mwpawldUserIp = Nothing + , _mwpawldAccountId = pMwpawldAccountId_ + , _mwpawldKey = Nothing + , _mwpawldWebPropertyAdWordsLinkId = pMwpawldWebPropertyAdWordsLinkId_ + , _mwpawldOauthToken = Nothing + , _mwpawldFields = Nothing + , _mwpawldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawldQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksDelete' (Maybe Text) +mwpawldQuotaUser + = lens _mwpawldQuotaUser + (\ s a -> s{_mwpawldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawldPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksDelete' Bool +mwpawldPrettyPrint + = lens _mwpawldPrettyPrint + (\ s a -> s{_mwpawldPrettyPrint = a}) + +-- | Web property ID to delete the AdWords link for. +mwpawldWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksDelete' Text +mwpawldWebPropertyId + = lens _mwpawldWebPropertyId + (\ s a -> s{_mwpawldWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawldUserIp :: Lens' ManagementWebPropertyAdWordsLinksDelete' (Maybe Text) +mwpawldUserIp + = lens _mwpawldUserIp + (\ s a -> s{_mwpawldUserIp = a}) + +-- | ID of the account which the given web property belongs to. +mwpawldAccountId :: Lens' ManagementWebPropertyAdWordsLinksDelete' Text +mwpawldAccountId + = lens _mwpawldAccountId + (\ s a -> s{_mwpawldAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawldKey :: Lens' ManagementWebPropertyAdWordsLinksDelete' (Maybe Text) +mwpawldKey + = lens _mwpawldKey (\ s a -> s{_mwpawldKey = a}) + +-- | Web property AdWords link ID. +mwpawldWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksDelete' Text +mwpawldWebPropertyAdWordsLinkId + = lens _mwpawldWebPropertyAdWordsLinkId + (\ s a -> s{_mwpawldWebPropertyAdWordsLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwpawldOauthToken :: Lens' ManagementWebPropertyAdWordsLinksDelete' (Maybe Text) +mwpawldOauthToken + = lens _mwpawldOauthToken + (\ s a -> s{_mwpawldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawldFields :: Lens' ManagementWebPropertyAdWordsLinksDelete' (Maybe Text) +mwpawldFields + = lens _mwpawldFields + (\ s a -> s{_mwpawldFields = a}) + +-- | Data format for the response. +mwpawldAlt :: Lens' ManagementWebPropertyAdWordsLinksDelete' Text +mwpawldAlt + = lens _mwpawldAlt (\ s a -> s{_mwpawldAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksDelete' where + type Rs ManagementWebPropertyAdWordsLinksDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksDelete{..} + = go _mwpawldQuotaUser _mwpawldPrettyPrint + _mwpawldWebPropertyId + _mwpawldUserIp + _mwpawldAccountId + _mwpawldKey + _mwpawldWebPropertyAdWordsLinkId + _mwpawldOauthToken + _mwpawldFields + _mwpawldAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Get.hs new file mode 100644 index 000000000..b274dc59f --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Get.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a web property-AdWords link to which the user has access. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksGet@. +module Analytics.Management.WebPropertyAdWordsLinks.Get + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksGetAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksGet + , ManagementWebPropertyAdWordsLinksGet + + -- * Request Lenses + , mwpawlgQuotaUser + , mwpawlgPrettyPrint + , mwpawlgWebPropertyId + , mwpawlgUserIp + , mwpawlgAccountId + , mwpawlgKey + , mwpawlgWebPropertyAdWordsLinkId + , mwpawlgOauthToken + , mwpawlgFields + , mwpawlgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksGet@ which the +-- 'ManagementWebPropertyAdWordsLinksGet' request conforms to. +type ManagementWebPropertyAdWordsLinksGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + Capture "webPropertyAdWordsLinkId" Text :> + Get '[JSON] EntityAdWordsLink + +-- | Returns a web property-AdWords link to which the user has access. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksGet' smart constructor. +data ManagementWebPropertyAdWordsLinksGet = ManagementWebPropertyAdWordsLinksGet + { _mwpawlgQuotaUser :: !(Maybe Text) + , _mwpawlgPrettyPrint :: !Bool + , _mwpawlgWebPropertyId :: !Text + , _mwpawlgUserIp :: !(Maybe Text) + , _mwpawlgAccountId :: !Text + , _mwpawlgKey :: !(Maybe Text) + , _mwpawlgWebPropertyAdWordsLinkId :: !Text + , _mwpawlgOauthToken :: !(Maybe Text) + , _mwpawlgFields :: !(Maybe Text) + , _mwpawlgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawlgQuotaUser' +-- +-- * 'mwpawlgPrettyPrint' +-- +-- * 'mwpawlgWebPropertyId' +-- +-- * 'mwpawlgUserIp' +-- +-- * 'mwpawlgAccountId' +-- +-- * 'mwpawlgKey' +-- +-- * 'mwpawlgWebPropertyAdWordsLinkId' +-- +-- * 'mwpawlgOauthToken' +-- +-- * 'mwpawlgFields' +-- +-- * 'mwpawlgAlt' +managementWebPropertyAdWordsLinksGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'webPropertyAdWordsLinkId' + -> ManagementWebPropertyAdWordsLinksGet +managementWebPropertyAdWordsLinksGet pMwpawlgWebPropertyId_ pMwpawlgAccountId_ pMwpawlgWebPropertyAdWordsLinkId_ = + ManagementWebPropertyAdWordsLinksGet + { _mwpawlgQuotaUser = Nothing + , _mwpawlgPrettyPrint = False + , _mwpawlgWebPropertyId = pMwpawlgWebPropertyId_ + , _mwpawlgUserIp = Nothing + , _mwpawlgAccountId = pMwpawlgAccountId_ + , _mwpawlgKey = Nothing + , _mwpawlgWebPropertyAdWordsLinkId = pMwpawlgWebPropertyAdWordsLinkId_ + , _mwpawlgOauthToken = Nothing + , _mwpawlgFields = Nothing + , _mwpawlgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawlgQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksGet' (Maybe Text) +mwpawlgQuotaUser + = lens _mwpawlgQuotaUser + (\ s a -> s{_mwpawlgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawlgPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksGet' Bool +mwpawlgPrettyPrint + = lens _mwpawlgPrettyPrint + (\ s a -> s{_mwpawlgPrettyPrint = a}) + +-- | Web property ID to retrieve the AdWords link for. +mwpawlgWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksGet' Text +mwpawlgWebPropertyId + = lens _mwpawlgWebPropertyId + (\ s a -> s{_mwpawlgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawlgUserIp :: Lens' ManagementWebPropertyAdWordsLinksGet' (Maybe Text) +mwpawlgUserIp + = lens _mwpawlgUserIp + (\ s a -> s{_mwpawlgUserIp = a}) + +-- | ID of the account which the given web property belongs to. +mwpawlgAccountId :: Lens' ManagementWebPropertyAdWordsLinksGet' Text +mwpawlgAccountId + = lens _mwpawlgAccountId + (\ s a -> s{_mwpawlgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawlgKey :: Lens' ManagementWebPropertyAdWordsLinksGet' (Maybe Text) +mwpawlgKey + = lens _mwpawlgKey (\ s a -> s{_mwpawlgKey = a}) + +-- | Web property-AdWords link ID. +mwpawlgWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksGet' Text +mwpawlgWebPropertyAdWordsLinkId + = lens _mwpawlgWebPropertyAdWordsLinkId + (\ s a -> s{_mwpawlgWebPropertyAdWordsLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwpawlgOauthToken :: Lens' ManagementWebPropertyAdWordsLinksGet' (Maybe Text) +mwpawlgOauthToken + = lens _mwpawlgOauthToken + (\ s a -> s{_mwpawlgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawlgFields :: Lens' ManagementWebPropertyAdWordsLinksGet' (Maybe Text) +mwpawlgFields + = lens _mwpawlgFields + (\ s a -> s{_mwpawlgFields = a}) + +-- | Data format for the response. +mwpawlgAlt :: Lens' ManagementWebPropertyAdWordsLinksGet' Text +mwpawlgAlt + = lens _mwpawlgAlt (\ s a -> s{_mwpawlgAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksGet' where + type Rs ManagementWebPropertyAdWordsLinksGet' = + EntityAdWordsLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksGet{..} + = go _mwpawlgQuotaUser _mwpawlgPrettyPrint + _mwpawlgWebPropertyId + _mwpawlgUserIp + _mwpawlgAccountId + _mwpawlgKey + _mwpawlgWebPropertyAdWordsLinkId + _mwpawlgOauthToken + _mwpawlgFields + _mwpawlgAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Insert.hs new file mode 100644 index 000000000..b61a3403a --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Insert.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a webProperty-AdWords link. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksInsert@. +module Analytics.Management.WebPropertyAdWordsLinks.Insert + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksInsertAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksInsert + , ManagementWebPropertyAdWordsLinksInsert + + -- * Request Lenses + , mwpawliQuotaUser + , mwpawliPrettyPrint + , mwpawliWebPropertyId + , mwpawliUserIp + , mwpawliAccountId + , mwpawliKey + , mwpawliOauthToken + , mwpawliFields + , mwpawliAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksInsert@ which the +-- 'ManagementWebPropertyAdWordsLinksInsert' request conforms to. +type ManagementWebPropertyAdWordsLinksInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + Post '[JSON] EntityAdWordsLink + +-- | Creates a webProperty-AdWords link. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksInsert' smart constructor. +data ManagementWebPropertyAdWordsLinksInsert = ManagementWebPropertyAdWordsLinksInsert + { _mwpawliQuotaUser :: !(Maybe Text) + , _mwpawliPrettyPrint :: !Bool + , _mwpawliWebPropertyId :: !Text + , _mwpawliUserIp :: !(Maybe Text) + , _mwpawliAccountId :: !Text + , _mwpawliKey :: !(Maybe Text) + , _mwpawliOauthToken :: !(Maybe Text) + , _mwpawliFields :: !(Maybe Text) + , _mwpawliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawliQuotaUser' +-- +-- * 'mwpawliPrettyPrint' +-- +-- * 'mwpawliWebPropertyId' +-- +-- * 'mwpawliUserIp' +-- +-- * 'mwpawliAccountId' +-- +-- * 'mwpawliKey' +-- +-- * 'mwpawliOauthToken' +-- +-- * 'mwpawliFields' +-- +-- * 'mwpawliAlt' +managementWebPropertyAdWordsLinksInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebPropertyAdWordsLinksInsert +managementWebPropertyAdWordsLinksInsert pMwpawliWebPropertyId_ pMwpawliAccountId_ = + ManagementWebPropertyAdWordsLinksInsert + { _mwpawliQuotaUser = Nothing + , _mwpawliPrettyPrint = False + , _mwpawliWebPropertyId = pMwpawliWebPropertyId_ + , _mwpawliUserIp = Nothing + , _mwpawliAccountId = pMwpawliAccountId_ + , _mwpawliKey = Nothing + , _mwpawliOauthToken = Nothing + , _mwpawliFields = Nothing + , _mwpawliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawliQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksInsert' (Maybe Text) +mwpawliQuotaUser + = lens _mwpawliQuotaUser + (\ s a -> s{_mwpawliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawliPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksInsert' Bool +mwpawliPrettyPrint + = lens _mwpawliPrettyPrint + (\ s a -> s{_mwpawliPrettyPrint = a}) + +-- | Web property ID to create the link for. +mwpawliWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksInsert' Text +mwpawliWebPropertyId + = lens _mwpawliWebPropertyId + (\ s a -> s{_mwpawliWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawliUserIp :: Lens' ManagementWebPropertyAdWordsLinksInsert' (Maybe Text) +mwpawliUserIp + = lens _mwpawliUserIp + (\ s a -> s{_mwpawliUserIp = a}) + +-- | ID of the Google Analytics account to create the link for. +mwpawliAccountId :: Lens' ManagementWebPropertyAdWordsLinksInsert' Text +mwpawliAccountId + = lens _mwpawliAccountId + (\ s a -> s{_mwpawliAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawliKey :: Lens' ManagementWebPropertyAdWordsLinksInsert' (Maybe Text) +mwpawliKey + = lens _mwpawliKey (\ s a -> s{_mwpawliKey = a}) + +-- | OAuth 2.0 token for the current user. +mwpawliOauthToken :: Lens' ManagementWebPropertyAdWordsLinksInsert' (Maybe Text) +mwpawliOauthToken + = lens _mwpawliOauthToken + (\ s a -> s{_mwpawliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawliFields :: Lens' ManagementWebPropertyAdWordsLinksInsert' (Maybe Text) +mwpawliFields + = lens _mwpawliFields + (\ s a -> s{_mwpawliFields = a}) + +-- | Data format for the response. +mwpawliAlt :: Lens' ManagementWebPropertyAdWordsLinksInsert' Text +mwpawliAlt + = lens _mwpawliAlt (\ s a -> s{_mwpawliAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksInsert' where + type Rs ManagementWebPropertyAdWordsLinksInsert' = + EntityAdWordsLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksInsert{..} + = go _mwpawliQuotaUser _mwpawliPrettyPrint + _mwpawliWebPropertyId + _mwpawliUserIp + _mwpawliAccountId + _mwpawliKey + _mwpawliOauthToken + _mwpawliFields + _mwpawliAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/List.hs new file mode 100644 index 000000000..db97ab171 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists webProperty-AdWords links for a given web property. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksList@. +module Analytics.Management.WebPropertyAdWordsLinks.List + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksListAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksList + , ManagementWebPropertyAdWordsLinksList + + -- * Request Lenses + , mwpawllQuotaUser + , mwpawllPrettyPrint + , mwpawllWebPropertyId + , mwpawllUserIp + , mwpawllAccountId + , mwpawllKey + , mwpawllOauthToken + , mwpawllStartIndex + , mwpawllMaxResults + , mwpawllFields + , mwpawllAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksList@ which the +-- 'ManagementWebPropertyAdWordsLinksList' request conforms to. +type ManagementWebPropertyAdWordsLinksListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] EntityAdWordsLinks + +-- | Lists webProperty-AdWords links for a given web property. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksList' smart constructor. +data ManagementWebPropertyAdWordsLinksList = ManagementWebPropertyAdWordsLinksList + { _mwpawllQuotaUser :: !(Maybe Text) + , _mwpawllPrettyPrint :: !Bool + , _mwpawllWebPropertyId :: !Text + , _mwpawllUserIp :: !(Maybe Text) + , _mwpawllAccountId :: !Text + , _mwpawllKey :: !(Maybe Text) + , _mwpawllOauthToken :: !(Maybe Text) + , _mwpawllStartIndex :: !(Maybe Int32) + , _mwpawllMaxResults :: !(Maybe Int32) + , _mwpawllFields :: !(Maybe Text) + , _mwpawllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawllQuotaUser' +-- +-- * 'mwpawllPrettyPrint' +-- +-- * 'mwpawllWebPropertyId' +-- +-- * 'mwpawllUserIp' +-- +-- * 'mwpawllAccountId' +-- +-- * 'mwpawllKey' +-- +-- * 'mwpawllOauthToken' +-- +-- * 'mwpawllStartIndex' +-- +-- * 'mwpawllMaxResults' +-- +-- * 'mwpawllFields' +-- +-- * 'mwpawllAlt' +managementWebPropertyAdWordsLinksList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebPropertyAdWordsLinksList +managementWebPropertyAdWordsLinksList pMwpawllWebPropertyId_ pMwpawllAccountId_ = + ManagementWebPropertyAdWordsLinksList + { _mwpawllQuotaUser = Nothing + , _mwpawllPrettyPrint = False + , _mwpawllWebPropertyId = pMwpawllWebPropertyId_ + , _mwpawllUserIp = Nothing + , _mwpawllAccountId = pMwpawllAccountId_ + , _mwpawllKey = Nothing + , _mwpawllOauthToken = Nothing + , _mwpawllStartIndex = Nothing + , _mwpawllMaxResults = Nothing + , _mwpawllFields = Nothing + , _mwpawllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawllQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Text) +mwpawllQuotaUser + = lens _mwpawllQuotaUser + (\ s a -> s{_mwpawllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawllPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksList' Bool +mwpawllPrettyPrint + = lens _mwpawllPrettyPrint + (\ s a -> s{_mwpawllPrettyPrint = a}) + +-- | Web property ID to retrieve the AdWords links for. +mwpawllWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksList' Text +mwpawllWebPropertyId + = lens _mwpawllWebPropertyId + (\ s a -> s{_mwpawllWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawllUserIp :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Text) +mwpawllUserIp + = lens _mwpawllUserIp + (\ s a -> s{_mwpawllUserIp = a}) + +-- | ID of the account which the given web property belongs to. +mwpawllAccountId :: Lens' ManagementWebPropertyAdWordsLinksList' Text +mwpawllAccountId + = lens _mwpawllAccountId + (\ s a -> s{_mwpawllAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawllKey :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Text) +mwpawllKey + = lens _mwpawllKey (\ s a -> s{_mwpawllKey = a}) + +-- | OAuth 2.0 token for the current user. +mwpawllOauthToken :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Text) +mwpawllOauthToken + = lens _mwpawllOauthToken + (\ s a -> s{_mwpawllOauthToken = a}) + +-- | An index of the first webProperty-AdWords link to retrieve. Use this +-- parameter as a pagination mechanism along with the max-results +-- parameter. +mwpawllStartIndex :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Int32) +mwpawllStartIndex + = lens _mwpawllStartIndex + (\ s a -> s{_mwpawllStartIndex = a}) + +-- | The maximum number of webProperty-AdWords links to include in this +-- response. +mwpawllMaxResults :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Int32) +mwpawllMaxResults + = lens _mwpawllMaxResults + (\ s a -> s{_mwpawllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawllFields :: Lens' ManagementWebPropertyAdWordsLinksList' (Maybe Text) +mwpawllFields + = lens _mwpawllFields + (\ s a -> s{_mwpawllFields = a}) + +-- | Data format for the response. +mwpawllAlt :: Lens' ManagementWebPropertyAdWordsLinksList' Text +mwpawllAlt + = lens _mwpawllAlt (\ s a -> s{_mwpawllAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksList' where + type Rs ManagementWebPropertyAdWordsLinksList' = + EntityAdWordsLinks + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksList{..} + = go _mwpawllQuotaUser _mwpawllPrettyPrint + _mwpawllWebPropertyId + _mwpawllUserIp + _mwpawllAccountId + _mwpawllKey + _mwpawllOauthToken + _mwpawllStartIndex + _mwpawllMaxResults + _mwpawllFields + _mwpawllAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Patch.hs new file mode 100644 index 000000000..19ae6d47e --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Patch.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing webProperty-AdWords link. This method supports patch +-- semantics. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksPatch@. +module Analytics.Management.WebPropertyAdWordsLinks.Patch + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksPatchAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksPatch + , ManagementWebPropertyAdWordsLinksPatch + + -- * Request Lenses + , mwpawlpQuotaUser + , mwpawlpPrettyPrint + , mwpawlpWebPropertyId + , mwpawlpUserIp + , mwpawlpAccountId + , mwpawlpKey + , mwpawlpWebPropertyAdWordsLinkId + , mwpawlpOauthToken + , mwpawlpFields + , mwpawlpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksPatch@ which the +-- 'ManagementWebPropertyAdWordsLinksPatch' request conforms to. +type ManagementWebPropertyAdWordsLinksPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + Capture "webPropertyAdWordsLinkId" Text :> + Patch '[JSON] EntityAdWordsLink + +-- | Updates an existing webProperty-AdWords link. This method supports patch +-- semantics. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksPatch' smart constructor. +data ManagementWebPropertyAdWordsLinksPatch = ManagementWebPropertyAdWordsLinksPatch + { _mwpawlpQuotaUser :: !(Maybe Text) + , _mwpawlpPrettyPrint :: !Bool + , _mwpawlpWebPropertyId :: !Text + , _mwpawlpUserIp :: !(Maybe Text) + , _mwpawlpAccountId :: !Text + , _mwpawlpKey :: !(Maybe Text) + , _mwpawlpWebPropertyAdWordsLinkId :: !Text + , _mwpawlpOauthToken :: !(Maybe Text) + , _mwpawlpFields :: !(Maybe Text) + , _mwpawlpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawlpQuotaUser' +-- +-- * 'mwpawlpPrettyPrint' +-- +-- * 'mwpawlpWebPropertyId' +-- +-- * 'mwpawlpUserIp' +-- +-- * 'mwpawlpAccountId' +-- +-- * 'mwpawlpKey' +-- +-- * 'mwpawlpWebPropertyAdWordsLinkId' +-- +-- * 'mwpawlpOauthToken' +-- +-- * 'mwpawlpFields' +-- +-- * 'mwpawlpAlt' +managementWebPropertyAdWordsLinksPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'webPropertyAdWordsLinkId' + -> ManagementWebPropertyAdWordsLinksPatch +managementWebPropertyAdWordsLinksPatch pMwpawlpWebPropertyId_ pMwpawlpAccountId_ pMwpawlpWebPropertyAdWordsLinkId_ = + ManagementWebPropertyAdWordsLinksPatch + { _mwpawlpQuotaUser = Nothing + , _mwpawlpPrettyPrint = False + , _mwpawlpWebPropertyId = pMwpawlpWebPropertyId_ + , _mwpawlpUserIp = Nothing + , _mwpawlpAccountId = pMwpawlpAccountId_ + , _mwpawlpKey = Nothing + , _mwpawlpWebPropertyAdWordsLinkId = pMwpawlpWebPropertyAdWordsLinkId_ + , _mwpawlpOauthToken = Nothing + , _mwpawlpFields = Nothing + , _mwpawlpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawlpQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksPatch' (Maybe Text) +mwpawlpQuotaUser + = lens _mwpawlpQuotaUser + (\ s a -> s{_mwpawlpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawlpPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksPatch' Bool +mwpawlpPrettyPrint + = lens _mwpawlpPrettyPrint + (\ s a -> s{_mwpawlpPrettyPrint = a}) + +-- | Web property ID to retrieve the AdWords link for. +mwpawlpWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksPatch' Text +mwpawlpWebPropertyId + = lens _mwpawlpWebPropertyId + (\ s a -> s{_mwpawlpWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawlpUserIp :: Lens' ManagementWebPropertyAdWordsLinksPatch' (Maybe Text) +mwpawlpUserIp + = lens _mwpawlpUserIp + (\ s a -> s{_mwpawlpUserIp = a}) + +-- | ID of the account which the given web property belongs to. +mwpawlpAccountId :: Lens' ManagementWebPropertyAdWordsLinksPatch' Text +mwpawlpAccountId + = lens _mwpawlpAccountId + (\ s a -> s{_mwpawlpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawlpKey :: Lens' ManagementWebPropertyAdWordsLinksPatch' (Maybe Text) +mwpawlpKey + = lens _mwpawlpKey (\ s a -> s{_mwpawlpKey = a}) + +-- | Web property-AdWords link ID. +mwpawlpWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksPatch' Text +mwpawlpWebPropertyAdWordsLinkId + = lens _mwpawlpWebPropertyAdWordsLinkId + (\ s a -> s{_mwpawlpWebPropertyAdWordsLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwpawlpOauthToken :: Lens' ManagementWebPropertyAdWordsLinksPatch' (Maybe Text) +mwpawlpOauthToken + = lens _mwpawlpOauthToken + (\ s a -> s{_mwpawlpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawlpFields :: Lens' ManagementWebPropertyAdWordsLinksPatch' (Maybe Text) +mwpawlpFields + = lens _mwpawlpFields + (\ s a -> s{_mwpawlpFields = a}) + +-- | Data format for the response. +mwpawlpAlt :: Lens' ManagementWebPropertyAdWordsLinksPatch' Text +mwpawlpAlt + = lens _mwpawlpAlt (\ s a -> s{_mwpawlpAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksPatch' where + type Rs ManagementWebPropertyAdWordsLinksPatch' = + EntityAdWordsLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksPatch{..} + = go _mwpawlpQuotaUser _mwpawlpPrettyPrint + _mwpawlpWebPropertyId + _mwpawlpUserIp + _mwpawlpAccountId + _mwpawlpKey + _mwpawlpWebPropertyAdWordsLinkId + _mwpawlpOauthToken + _mwpawlpFields + _mwpawlpAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Update.hs new file mode 100644 index 000000000..dff14b775 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Update.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing webProperty-AdWords link. +-- +-- /See:/ for @AnalyticsManagementWebPropertyAdWordsLinksUpdate@. +module Analytics.Management.WebPropertyAdWordsLinks.Update + ( + -- * REST Resource + ManagementWebPropertyAdWordsLinksUpdateAPI + + -- * Creating a Request + , managementWebPropertyAdWordsLinksUpdate + , ManagementWebPropertyAdWordsLinksUpdate + + -- * Request Lenses + , mwpawluQuotaUser + , mwpawluPrettyPrint + , mwpawluWebPropertyId + , mwpawluUserIp + , mwpawluAccountId + , mwpawluKey + , mwpawluWebPropertyAdWordsLinkId + , mwpawluOauthToken + , mwpawluFields + , mwpawluAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebPropertyAdWordsLinksUpdate@ which the +-- 'ManagementWebPropertyAdWordsLinksUpdate' request conforms to. +type ManagementWebPropertyAdWordsLinksUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityAdWordsLinks" :> + Capture "webPropertyAdWordsLinkId" Text :> + Put '[JSON] EntityAdWordsLink + +-- | Updates an existing webProperty-AdWords link. +-- +-- /See:/ 'managementWebPropertyAdWordsLinksUpdate' smart constructor. +data ManagementWebPropertyAdWordsLinksUpdate = ManagementWebPropertyAdWordsLinksUpdate + { _mwpawluQuotaUser :: !(Maybe Text) + , _mwpawluPrettyPrint :: !Bool + , _mwpawluWebPropertyId :: !Text + , _mwpawluUserIp :: !(Maybe Text) + , _mwpawluAccountId :: !Text + , _mwpawluKey :: !(Maybe Text) + , _mwpawluWebPropertyAdWordsLinkId :: !Text + , _mwpawluOauthToken :: !(Maybe Text) + , _mwpawluFields :: !(Maybe Text) + , _mwpawluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebPropertyAdWordsLinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpawluQuotaUser' +-- +-- * 'mwpawluPrettyPrint' +-- +-- * 'mwpawluWebPropertyId' +-- +-- * 'mwpawluUserIp' +-- +-- * 'mwpawluAccountId' +-- +-- * 'mwpawluKey' +-- +-- * 'mwpawluWebPropertyAdWordsLinkId' +-- +-- * 'mwpawluOauthToken' +-- +-- * 'mwpawluFields' +-- +-- * 'mwpawluAlt' +managementWebPropertyAdWordsLinksUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'webPropertyAdWordsLinkId' + -> ManagementWebPropertyAdWordsLinksUpdate +managementWebPropertyAdWordsLinksUpdate pMwpawluWebPropertyId_ pMwpawluAccountId_ pMwpawluWebPropertyAdWordsLinkId_ = + ManagementWebPropertyAdWordsLinksUpdate + { _mwpawluQuotaUser = Nothing + , _mwpawluPrettyPrint = False + , _mwpawluWebPropertyId = pMwpawluWebPropertyId_ + , _mwpawluUserIp = Nothing + , _mwpawluAccountId = pMwpawluAccountId_ + , _mwpawluKey = Nothing + , _mwpawluWebPropertyAdWordsLinkId = pMwpawluWebPropertyAdWordsLinkId_ + , _mwpawluOauthToken = Nothing + , _mwpawluFields = Nothing + , _mwpawluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpawluQuotaUser :: Lens' ManagementWebPropertyAdWordsLinksUpdate' (Maybe Text) +mwpawluQuotaUser + = lens _mwpawluQuotaUser + (\ s a -> s{_mwpawluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpawluPrettyPrint :: Lens' ManagementWebPropertyAdWordsLinksUpdate' Bool +mwpawluPrettyPrint + = lens _mwpawluPrettyPrint + (\ s a -> s{_mwpawluPrettyPrint = a}) + +-- | Web property ID to retrieve the AdWords link for. +mwpawluWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksUpdate' Text +mwpawluWebPropertyId + = lens _mwpawluWebPropertyId + (\ s a -> s{_mwpawluWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpawluUserIp :: Lens' ManagementWebPropertyAdWordsLinksUpdate' (Maybe Text) +mwpawluUserIp + = lens _mwpawluUserIp + (\ s a -> s{_mwpawluUserIp = a}) + +-- | ID of the account which the given web property belongs to. +mwpawluAccountId :: Lens' ManagementWebPropertyAdWordsLinksUpdate' Text +mwpawluAccountId + = lens _mwpawluAccountId + (\ s a -> s{_mwpawluAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpawluKey :: Lens' ManagementWebPropertyAdWordsLinksUpdate' (Maybe Text) +mwpawluKey + = lens _mwpawluKey (\ s a -> s{_mwpawluKey = a}) + +-- | Web property-AdWords link ID. +mwpawluWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksUpdate' Text +mwpawluWebPropertyAdWordsLinkId + = lens _mwpawluWebPropertyAdWordsLinkId + (\ s a -> s{_mwpawluWebPropertyAdWordsLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwpawluOauthToken :: Lens' ManagementWebPropertyAdWordsLinksUpdate' (Maybe Text) +mwpawluOauthToken + = lens _mwpawluOauthToken + (\ s a -> s{_mwpawluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpawluFields :: Lens' ManagementWebPropertyAdWordsLinksUpdate' (Maybe Text) +mwpawluFields + = lens _mwpawluFields + (\ s a -> s{_mwpawluFields = a}) + +-- | Data format for the response. +mwpawluAlt :: Lens' ManagementWebPropertyAdWordsLinksUpdate' Text +mwpawluAlt + = lens _mwpawluAlt (\ s a -> s{_mwpawluAlt = a}) + +instance GoogleRequest + ManagementWebPropertyAdWordsLinksUpdate' where + type Rs ManagementWebPropertyAdWordsLinksUpdate' = + EntityAdWordsLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebPropertyAdWordsLinksUpdate{..} + = go _mwpawluQuotaUser _mwpawluPrettyPrint + _mwpawluWebPropertyId + _mwpawluUserIp + _mwpawluAccountId + _mwpawluKey + _mwpawluWebPropertyAdWordsLinkId + _mwpawluOauthToken + _mwpawluFields + _mwpawluAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebPropertyAdWordsLinksUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Get.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Get.hs new file mode 100644 index 000000000..701eb9c5d --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Webproperties.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a web property to which the user has access. +-- +-- /See:/ for @AnalyticsManagementWebpropertiesGet@. +module Analytics.Management.Webproperties.Get + ( + -- * REST Resource + ManagementWebpropertiesGetAPI + + -- * Creating a Request + , managementWebpropertiesGet + , ManagementWebpropertiesGet + + -- * Request Lenses + , mwgQuotaUser + , mwgPrettyPrint + , mwgWebPropertyId + , mwgUserIp + , mwgAccountId + , mwgKey + , mwgOauthToken + , mwgFields + , mwgAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertiesGet@ which the +-- 'ManagementWebpropertiesGet' request conforms to. +type ManagementWebpropertiesGetAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + Get '[JSON] Webproperty + +-- | Gets a web property to which the user has access. +-- +-- /See:/ 'managementWebpropertiesGet' smart constructor. +data ManagementWebpropertiesGet = ManagementWebpropertiesGet + { _mwgQuotaUser :: !(Maybe Text) + , _mwgPrettyPrint :: !Bool + , _mwgWebPropertyId :: !Text + , _mwgUserIp :: !(Maybe Text) + , _mwgAccountId :: !Text + , _mwgKey :: !(Maybe Text) + , _mwgOauthToken :: !(Maybe Text) + , _mwgFields :: !(Maybe Text) + , _mwgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwgQuotaUser' +-- +-- * 'mwgPrettyPrint' +-- +-- * 'mwgWebPropertyId' +-- +-- * 'mwgUserIp' +-- +-- * 'mwgAccountId' +-- +-- * 'mwgKey' +-- +-- * 'mwgOauthToken' +-- +-- * 'mwgFields' +-- +-- * 'mwgAlt' +managementWebpropertiesGet + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebpropertiesGet +managementWebpropertiesGet pMwgWebPropertyId_ pMwgAccountId_ = + ManagementWebpropertiesGet + { _mwgQuotaUser = Nothing + , _mwgPrettyPrint = False + , _mwgWebPropertyId = pMwgWebPropertyId_ + , _mwgUserIp = Nothing + , _mwgAccountId = pMwgAccountId_ + , _mwgKey = Nothing + , _mwgOauthToken = Nothing + , _mwgFields = Nothing + , _mwgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwgQuotaUser :: Lens' ManagementWebpropertiesGet' (Maybe Text) +mwgQuotaUser + = lens _mwgQuotaUser (\ s a -> s{_mwgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwgPrettyPrint :: Lens' ManagementWebpropertiesGet' Bool +mwgPrettyPrint + = lens _mwgPrettyPrint + (\ s a -> s{_mwgPrettyPrint = a}) + +-- | ID to retrieve the web property for. +mwgWebPropertyId :: Lens' ManagementWebpropertiesGet' Text +mwgWebPropertyId + = lens _mwgWebPropertyId + (\ s a -> s{_mwgWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwgUserIp :: Lens' ManagementWebpropertiesGet' (Maybe Text) +mwgUserIp + = lens _mwgUserIp (\ s a -> s{_mwgUserIp = a}) + +-- | Account ID to retrieve the web property for. +mwgAccountId :: Lens' ManagementWebpropertiesGet' Text +mwgAccountId + = lens _mwgAccountId (\ s a -> s{_mwgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwgKey :: Lens' ManagementWebpropertiesGet' (Maybe Text) +mwgKey = lens _mwgKey (\ s a -> s{_mwgKey = a}) + +-- | OAuth 2.0 token for the current user. +mwgOauthToken :: Lens' ManagementWebpropertiesGet' (Maybe Text) +mwgOauthToken + = lens _mwgOauthToken + (\ s a -> s{_mwgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwgFields :: Lens' ManagementWebpropertiesGet' (Maybe Text) +mwgFields + = lens _mwgFields (\ s a -> s{_mwgFields = a}) + +-- | Data format for the response. +mwgAlt :: Lens' ManagementWebpropertiesGet' Text +mwgAlt = lens _mwgAlt (\ s a -> s{_mwgAlt = a}) + +instance GoogleRequest ManagementWebpropertiesGet' + where + type Rs ManagementWebpropertiesGet' = Webproperty + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementWebpropertiesGet{..} + = go _mwgQuotaUser _mwgPrettyPrint _mwgWebPropertyId + _mwgUserIp + _mwgAccountId + _mwgKey + _mwgOauthToken + _mwgFields + _mwgAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementWebpropertiesGetAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Insert.hs new file mode 100644 index 000000000..4f140b8a3 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Insert.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Webproperties.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new property if the account has fewer than 20 properties. Web +-- properties are visible in the Google Analytics interface only if they +-- have at least one profile. +-- +-- /See:/ for @AnalyticsManagementWebpropertiesInsert@. +module Analytics.Management.Webproperties.Insert + ( + -- * REST Resource + ManagementWebpropertiesInsertAPI + + -- * Creating a Request + , managementWebpropertiesInsert + , ManagementWebpropertiesInsert + + -- * Request Lenses + , mwiQuotaUser + , mwiPrettyPrint + , mwiUserIp + , mwiAccountId + , mwiKey + , mwiOauthToken + , mwiFields + , mwiAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertiesInsert@ which the +-- 'ManagementWebpropertiesInsert' request conforms to. +type ManagementWebpropertiesInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> Post '[JSON] Webproperty + +-- | Create a new property if the account has fewer than 20 properties. Web +-- properties are visible in the Google Analytics interface only if they +-- have at least one profile. +-- +-- /See:/ 'managementWebpropertiesInsert' smart constructor. +data ManagementWebpropertiesInsert = ManagementWebpropertiesInsert + { _mwiQuotaUser :: !(Maybe Text) + , _mwiPrettyPrint :: !Bool + , _mwiUserIp :: !(Maybe Text) + , _mwiAccountId :: !Text + , _mwiKey :: !(Maybe Text) + , _mwiOauthToken :: !(Maybe Text) + , _mwiFields :: !(Maybe Text) + , _mwiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwiQuotaUser' +-- +-- * 'mwiPrettyPrint' +-- +-- * 'mwiUserIp' +-- +-- * 'mwiAccountId' +-- +-- * 'mwiKey' +-- +-- * 'mwiOauthToken' +-- +-- * 'mwiFields' +-- +-- * 'mwiAlt' +managementWebpropertiesInsert + :: Text -- ^ 'accountId' + -> ManagementWebpropertiesInsert +managementWebpropertiesInsert pMwiAccountId_ = + ManagementWebpropertiesInsert + { _mwiQuotaUser = Nothing + , _mwiPrettyPrint = False + , _mwiUserIp = Nothing + , _mwiAccountId = pMwiAccountId_ + , _mwiKey = Nothing + , _mwiOauthToken = Nothing + , _mwiFields = Nothing + , _mwiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwiQuotaUser :: Lens' ManagementWebpropertiesInsert' (Maybe Text) +mwiQuotaUser + = lens _mwiQuotaUser (\ s a -> s{_mwiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwiPrettyPrint :: Lens' ManagementWebpropertiesInsert' Bool +mwiPrettyPrint + = lens _mwiPrettyPrint + (\ s a -> s{_mwiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwiUserIp :: Lens' ManagementWebpropertiesInsert' (Maybe Text) +mwiUserIp + = lens _mwiUserIp (\ s a -> s{_mwiUserIp = a}) + +-- | Account ID to create the web property for. +mwiAccountId :: Lens' ManagementWebpropertiesInsert' Text +mwiAccountId + = lens _mwiAccountId (\ s a -> s{_mwiAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwiKey :: Lens' ManagementWebpropertiesInsert' (Maybe Text) +mwiKey = lens _mwiKey (\ s a -> s{_mwiKey = a}) + +-- | OAuth 2.0 token for the current user. +mwiOauthToken :: Lens' ManagementWebpropertiesInsert' (Maybe Text) +mwiOauthToken + = lens _mwiOauthToken + (\ s a -> s{_mwiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwiFields :: Lens' ManagementWebpropertiesInsert' (Maybe Text) +mwiFields + = lens _mwiFields (\ s a -> s{_mwiFields = a}) + +-- | Data format for the response. +mwiAlt :: Lens' ManagementWebpropertiesInsert' Text +mwiAlt = lens _mwiAlt (\ s a -> s{_mwiAlt = a}) + +instance GoogleRequest ManagementWebpropertiesInsert' + where + type Rs ManagementWebpropertiesInsert' = Webproperty + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertiesInsert{..} + = go _mwiQuotaUser _mwiPrettyPrint _mwiUserIp + _mwiAccountId + _mwiKey + _mwiOauthToken + _mwiFields + _mwiAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementWebpropertiesInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/List.hs new file mode 100644 index 000000000..7a5833668 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/List.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Webproperties.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists web properties to which the user has access. +-- +-- /See:/ for @AnalyticsManagementWebpropertiesList@. +module Analytics.Management.Webproperties.List + ( + -- * REST Resource + ManagementWebpropertiesListAPI + + -- * Creating a Request + , managementWebpropertiesList + , ManagementWebpropertiesList + + -- * Request Lenses + , mwlQuotaUser + , mwlPrettyPrint + , mwlUserIp + , mwlAccountId + , mwlKey + , mwlOauthToken + , mwlStartIndex + , mwlMaxResults + , mwlFields + , mwlAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertiesList@ which the +-- 'ManagementWebpropertiesList' request conforms to. +type ManagementWebpropertiesListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] Webproperties + +-- | Lists web properties to which the user has access. +-- +-- /See:/ 'managementWebpropertiesList' smart constructor. +data ManagementWebpropertiesList = ManagementWebpropertiesList + { _mwlQuotaUser :: !(Maybe Text) + , _mwlPrettyPrint :: !Bool + , _mwlUserIp :: !(Maybe Text) + , _mwlAccountId :: !Text + , _mwlKey :: !(Maybe Text) + , _mwlOauthToken :: !(Maybe Text) + , _mwlStartIndex :: !(Maybe Int32) + , _mwlMaxResults :: !(Maybe Int32) + , _mwlFields :: !(Maybe Text) + , _mwlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwlQuotaUser' +-- +-- * 'mwlPrettyPrint' +-- +-- * 'mwlUserIp' +-- +-- * 'mwlAccountId' +-- +-- * 'mwlKey' +-- +-- * 'mwlOauthToken' +-- +-- * 'mwlStartIndex' +-- +-- * 'mwlMaxResults' +-- +-- * 'mwlFields' +-- +-- * 'mwlAlt' +managementWebpropertiesList + :: Text -- ^ 'accountId' + -> ManagementWebpropertiesList +managementWebpropertiesList pMwlAccountId_ = + ManagementWebpropertiesList + { _mwlQuotaUser = Nothing + , _mwlPrettyPrint = False + , _mwlUserIp = Nothing + , _mwlAccountId = pMwlAccountId_ + , _mwlKey = Nothing + , _mwlOauthToken = Nothing + , _mwlStartIndex = Nothing + , _mwlMaxResults = Nothing + , _mwlFields = Nothing + , _mwlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwlQuotaUser :: Lens' ManagementWebpropertiesList' (Maybe Text) +mwlQuotaUser + = lens _mwlQuotaUser (\ s a -> s{_mwlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwlPrettyPrint :: Lens' ManagementWebpropertiesList' Bool +mwlPrettyPrint + = lens _mwlPrettyPrint + (\ s a -> s{_mwlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwlUserIp :: Lens' ManagementWebpropertiesList' (Maybe Text) +mwlUserIp + = lens _mwlUserIp (\ s a -> s{_mwlUserIp = a}) + +-- | Account ID to retrieve web properties for. Can either be a specific +-- account ID or \'~all\', which refers to all the accounts that user has +-- access to. +mwlAccountId :: Lens' ManagementWebpropertiesList' Text +mwlAccountId + = lens _mwlAccountId (\ s a -> s{_mwlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwlKey :: Lens' ManagementWebpropertiesList' (Maybe Text) +mwlKey = lens _mwlKey (\ s a -> s{_mwlKey = a}) + +-- | OAuth 2.0 token for the current user. +mwlOauthToken :: Lens' ManagementWebpropertiesList' (Maybe Text) +mwlOauthToken + = lens _mwlOauthToken + (\ s a -> s{_mwlOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter. +mwlStartIndex :: Lens' ManagementWebpropertiesList' (Maybe Int32) +mwlStartIndex + = lens _mwlStartIndex + (\ s a -> s{_mwlStartIndex = a}) + +-- | The maximum number of web properties to include in this response. +mwlMaxResults :: Lens' ManagementWebpropertiesList' (Maybe Int32) +mwlMaxResults + = lens _mwlMaxResults + (\ s a -> s{_mwlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mwlFields :: Lens' ManagementWebpropertiesList' (Maybe Text) +mwlFields + = lens _mwlFields (\ s a -> s{_mwlFields = a}) + +-- | Data format for the response. +mwlAlt :: Lens' ManagementWebpropertiesList' Text +mwlAlt = lens _mwlAlt (\ s a -> s{_mwlAlt = a}) + +instance GoogleRequest ManagementWebpropertiesList' + where + type Rs ManagementWebpropertiesList' = Webproperties + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementWebpropertiesList{..} + = go _mwlQuotaUser _mwlPrettyPrint _mwlUserIp + _mwlAccountId + _mwlKey + _mwlOauthToken + _mwlStartIndex + _mwlMaxResults + _mwlFields + _mwlAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementWebpropertiesListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Patch.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Patch.hs new file mode 100644 index 000000000..5d2e3817b --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Patch.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Webproperties.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing web property. This method supports patch semantics. +-- +-- /See:/ for @AnalyticsManagementWebpropertiesPatch@. +module Analytics.Management.Webproperties.Patch + ( + -- * REST Resource + ManagementWebpropertiesPatchAPI + + -- * Creating a Request + , managementWebpropertiesPatch + , ManagementWebpropertiesPatch + + -- * Request Lenses + , mwpQuotaUser + , mwpPrettyPrint + , mwpWebPropertyId + , mwpUserIp + , mwpAccountId + , mwpKey + , mwpOauthToken + , mwpFields + , mwpAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertiesPatch@ which the +-- 'ManagementWebpropertiesPatch' request conforms to. +type ManagementWebpropertiesPatchAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + Patch '[JSON] Webproperty + +-- | Updates an existing web property. This method supports patch semantics. +-- +-- /See:/ 'managementWebpropertiesPatch' smart constructor. +data ManagementWebpropertiesPatch = ManagementWebpropertiesPatch + { _mwpQuotaUser :: !(Maybe Text) + , _mwpPrettyPrint :: !Bool + , _mwpWebPropertyId :: !Text + , _mwpUserIp :: !(Maybe Text) + , _mwpAccountId :: !Text + , _mwpKey :: !(Maybe Text) + , _mwpOauthToken :: !(Maybe Text) + , _mwpFields :: !(Maybe Text) + , _mwpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertiesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwpQuotaUser' +-- +-- * 'mwpPrettyPrint' +-- +-- * 'mwpWebPropertyId' +-- +-- * 'mwpUserIp' +-- +-- * 'mwpAccountId' +-- +-- * 'mwpKey' +-- +-- * 'mwpOauthToken' +-- +-- * 'mwpFields' +-- +-- * 'mwpAlt' +managementWebpropertiesPatch + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebpropertiesPatch +managementWebpropertiesPatch pMwpWebPropertyId_ pMwpAccountId_ = + ManagementWebpropertiesPatch + { _mwpQuotaUser = Nothing + , _mwpPrettyPrint = False + , _mwpWebPropertyId = pMwpWebPropertyId_ + , _mwpUserIp = Nothing + , _mwpAccountId = pMwpAccountId_ + , _mwpKey = Nothing + , _mwpOauthToken = Nothing + , _mwpFields = Nothing + , _mwpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwpQuotaUser :: Lens' ManagementWebpropertiesPatch' (Maybe Text) +mwpQuotaUser + = lens _mwpQuotaUser (\ s a -> s{_mwpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwpPrettyPrint :: Lens' ManagementWebpropertiesPatch' Bool +mwpPrettyPrint + = lens _mwpPrettyPrint + (\ s a -> s{_mwpPrettyPrint = a}) + +-- | Web property ID +mwpWebPropertyId :: Lens' ManagementWebpropertiesPatch' Text +mwpWebPropertyId + = lens _mwpWebPropertyId + (\ s a -> s{_mwpWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwpUserIp :: Lens' ManagementWebpropertiesPatch' (Maybe Text) +mwpUserIp + = lens _mwpUserIp (\ s a -> s{_mwpUserIp = a}) + +-- | Account ID to which the web property belongs +mwpAccountId :: Lens' ManagementWebpropertiesPatch' Text +mwpAccountId + = lens _mwpAccountId (\ s a -> s{_mwpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwpKey :: Lens' ManagementWebpropertiesPatch' (Maybe Text) +mwpKey = lens _mwpKey (\ s a -> s{_mwpKey = a}) + +-- | OAuth 2.0 token for the current user. +mwpOauthToken :: Lens' ManagementWebpropertiesPatch' (Maybe Text) +mwpOauthToken + = lens _mwpOauthToken + (\ s a -> s{_mwpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwpFields :: Lens' ManagementWebpropertiesPatch' (Maybe Text) +mwpFields + = lens _mwpFields (\ s a -> s{_mwpFields = a}) + +-- | Data format for the response. +mwpAlt :: Lens' ManagementWebpropertiesPatch' Text +mwpAlt = lens _mwpAlt (\ s a -> s{_mwpAlt = a}) + +instance GoogleRequest ManagementWebpropertiesPatch' + where + type Rs ManagementWebpropertiesPatch' = Webproperty + request = requestWithRoute defReq analyticsURL + requestWithRoute r u ManagementWebpropertiesPatch{..} + = go _mwpQuotaUser _mwpPrettyPrint _mwpWebPropertyId + _mwpUserIp + _mwpAccountId + _mwpKey + _mwpOauthToken + _mwpFields + _mwpAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementWebpropertiesPatchAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Update.hs new file mode 100644 index 000000000..130f18025 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Webproperties/Update.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.Webproperties.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing web property. +-- +-- /See:/ for @AnalyticsManagementWebpropertiesUpdate@. +module Analytics.Management.Webproperties.Update + ( + -- * REST Resource + ManagementWebpropertiesUpdateAPI + + -- * Creating a Request + , managementWebpropertiesUpdate + , ManagementWebpropertiesUpdate + + -- * Request Lenses + , mwuQuotaUser + , mwuPrettyPrint + , mwuWebPropertyId + , mwuUserIp + , mwuAccountId + , mwuKey + , mwuOauthToken + , mwuFields + , mwuAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertiesUpdate@ which the +-- 'ManagementWebpropertiesUpdate' request conforms to. +type ManagementWebpropertiesUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + Put '[JSON] Webproperty + +-- | Updates an existing web property. +-- +-- /See:/ 'managementWebpropertiesUpdate' smart constructor. +data ManagementWebpropertiesUpdate = ManagementWebpropertiesUpdate + { _mwuQuotaUser :: !(Maybe Text) + , _mwuPrettyPrint :: !Bool + , _mwuWebPropertyId :: !Text + , _mwuUserIp :: !(Maybe Text) + , _mwuAccountId :: !Text + , _mwuKey :: !(Maybe Text) + , _mwuOauthToken :: !(Maybe Text) + , _mwuFields :: !(Maybe Text) + , _mwuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertiesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwuQuotaUser' +-- +-- * 'mwuPrettyPrint' +-- +-- * 'mwuWebPropertyId' +-- +-- * 'mwuUserIp' +-- +-- * 'mwuAccountId' +-- +-- * 'mwuKey' +-- +-- * 'mwuOauthToken' +-- +-- * 'mwuFields' +-- +-- * 'mwuAlt' +managementWebpropertiesUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebpropertiesUpdate +managementWebpropertiesUpdate pMwuWebPropertyId_ pMwuAccountId_ = + ManagementWebpropertiesUpdate + { _mwuQuotaUser = Nothing + , _mwuPrettyPrint = False + , _mwuWebPropertyId = pMwuWebPropertyId_ + , _mwuUserIp = Nothing + , _mwuAccountId = pMwuAccountId_ + , _mwuKey = Nothing + , _mwuOauthToken = Nothing + , _mwuFields = Nothing + , _mwuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwuQuotaUser :: Lens' ManagementWebpropertiesUpdate' (Maybe Text) +mwuQuotaUser + = lens _mwuQuotaUser (\ s a -> s{_mwuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwuPrettyPrint :: Lens' ManagementWebpropertiesUpdate' Bool +mwuPrettyPrint + = lens _mwuPrettyPrint + (\ s a -> s{_mwuPrettyPrint = a}) + +-- | Web property ID +mwuWebPropertyId :: Lens' ManagementWebpropertiesUpdate' Text +mwuWebPropertyId + = lens _mwuWebPropertyId + (\ s a -> s{_mwuWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwuUserIp :: Lens' ManagementWebpropertiesUpdate' (Maybe Text) +mwuUserIp + = lens _mwuUserIp (\ s a -> s{_mwuUserIp = a}) + +-- | Account ID to which the web property belongs +mwuAccountId :: Lens' ManagementWebpropertiesUpdate' Text +mwuAccountId + = lens _mwuAccountId (\ s a -> s{_mwuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwuKey :: Lens' ManagementWebpropertiesUpdate' (Maybe Text) +mwuKey = lens _mwuKey (\ s a -> s{_mwuKey = a}) + +-- | OAuth 2.0 token for the current user. +mwuOauthToken :: Lens' ManagementWebpropertiesUpdate' (Maybe Text) +mwuOauthToken + = lens _mwuOauthToken + (\ s a -> s{_mwuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwuFields :: Lens' ManagementWebpropertiesUpdate' (Maybe Text) +mwuFields + = lens _mwuFields (\ s a -> s{_mwuFields = a}) + +-- | Data format for the response. +mwuAlt :: Lens' ManagementWebpropertiesUpdate' Text +mwuAlt = lens _mwuAlt (\ s a -> s{_mwuAlt = a}) + +instance GoogleRequest ManagementWebpropertiesUpdate' + where + type Rs ManagementWebpropertiesUpdate' = Webproperty + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertiesUpdate{..} + = go _mwuQuotaUser _mwuPrettyPrint _mwuWebPropertyId + _mwuUserIp + _mwuAccountId + _mwuKey + _mwuOauthToken + _mwuFields + _mwuAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagementWebpropertiesUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Delete.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Delete.hs new file mode 100644 index 000000000..e27ed7900 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Delete.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a user from the given web property. +-- +-- /See:/ for @AnalyticsManagementWebpropertyUserLinksDelete@. +module Analytics.Management.WebpropertyUserLinks.Delete + ( + -- * REST Resource + ManagementWebpropertyUserLinksDeleteAPI + + -- * Creating a Request + , managementWebpropertyUserLinksDelete + , ManagementWebpropertyUserLinksDelete + + -- * Request Lenses + , mwuldQuotaUser + , mwuldPrettyPrint + , mwuldWebPropertyId + , mwuldUserIp + , mwuldAccountId + , mwuldKey + , mwuldLinkId + , mwuldOauthToken + , mwuldFields + , mwuldAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertyUserLinksDelete@ which the +-- 'ManagementWebpropertyUserLinksDelete' request conforms to. +type ManagementWebpropertyUserLinksDeleteAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Delete '[JSON] () + +-- | Removes a user from the given web property. +-- +-- /See:/ 'managementWebpropertyUserLinksDelete' smart constructor. +data ManagementWebpropertyUserLinksDelete = ManagementWebpropertyUserLinksDelete + { _mwuldQuotaUser :: !(Maybe Text) + , _mwuldPrettyPrint :: !Bool + , _mwuldWebPropertyId :: !Text + , _mwuldUserIp :: !(Maybe Text) + , _mwuldAccountId :: !Text + , _mwuldKey :: !(Maybe Text) + , _mwuldLinkId :: !Text + , _mwuldOauthToken :: !(Maybe Text) + , _mwuldFields :: !(Maybe Text) + , _mwuldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertyUserLinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwuldQuotaUser' +-- +-- * 'mwuldPrettyPrint' +-- +-- * 'mwuldWebPropertyId' +-- +-- * 'mwuldUserIp' +-- +-- * 'mwuldAccountId' +-- +-- * 'mwuldKey' +-- +-- * 'mwuldLinkId' +-- +-- * 'mwuldOauthToken' +-- +-- * 'mwuldFields' +-- +-- * 'mwuldAlt' +managementWebpropertyUserLinksDelete + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementWebpropertyUserLinksDelete +managementWebpropertyUserLinksDelete pMwuldWebPropertyId_ pMwuldAccountId_ pMwuldLinkId_ = + ManagementWebpropertyUserLinksDelete + { _mwuldQuotaUser = Nothing + , _mwuldPrettyPrint = False + , _mwuldWebPropertyId = pMwuldWebPropertyId_ + , _mwuldUserIp = Nothing + , _mwuldAccountId = pMwuldAccountId_ + , _mwuldKey = Nothing + , _mwuldLinkId = pMwuldLinkId_ + , _mwuldOauthToken = Nothing + , _mwuldFields = Nothing + , _mwuldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwuldQuotaUser :: Lens' ManagementWebpropertyUserLinksDelete' (Maybe Text) +mwuldQuotaUser + = lens _mwuldQuotaUser + (\ s a -> s{_mwuldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwuldPrettyPrint :: Lens' ManagementWebpropertyUserLinksDelete' Bool +mwuldPrettyPrint + = lens _mwuldPrettyPrint + (\ s a -> s{_mwuldPrettyPrint = a}) + +-- | Web Property ID to delete the user link for. +mwuldWebPropertyId :: Lens' ManagementWebpropertyUserLinksDelete' Text +mwuldWebPropertyId + = lens _mwuldWebPropertyId + (\ s a -> s{_mwuldWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwuldUserIp :: Lens' ManagementWebpropertyUserLinksDelete' (Maybe Text) +mwuldUserIp + = lens _mwuldUserIp (\ s a -> s{_mwuldUserIp = a}) + +-- | Account ID to delete the user link for. +mwuldAccountId :: Lens' ManagementWebpropertyUserLinksDelete' Text +mwuldAccountId + = lens _mwuldAccountId + (\ s a -> s{_mwuldAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwuldKey :: Lens' ManagementWebpropertyUserLinksDelete' (Maybe Text) +mwuldKey = lens _mwuldKey (\ s a -> s{_mwuldKey = a}) + +-- | Link ID to delete the user link for. +mwuldLinkId :: Lens' ManagementWebpropertyUserLinksDelete' Text +mwuldLinkId + = lens _mwuldLinkId (\ s a -> s{_mwuldLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwuldOauthToken :: Lens' ManagementWebpropertyUserLinksDelete' (Maybe Text) +mwuldOauthToken + = lens _mwuldOauthToken + (\ s a -> s{_mwuldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwuldFields :: Lens' ManagementWebpropertyUserLinksDelete' (Maybe Text) +mwuldFields + = lens _mwuldFields (\ s a -> s{_mwuldFields = a}) + +-- | Data format for the response. +mwuldAlt :: Lens' ManagementWebpropertyUserLinksDelete' Text +mwuldAlt = lens _mwuldAlt (\ s a -> s{_mwuldAlt = a}) + +instance GoogleRequest + ManagementWebpropertyUserLinksDelete' where + type Rs ManagementWebpropertyUserLinksDelete' = () + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertyUserLinksDelete{..} + = go _mwuldQuotaUser _mwuldPrettyPrint + _mwuldWebPropertyId + _mwuldUserIp + _mwuldAccountId + _mwuldKey + _mwuldLinkId + _mwuldOauthToken + _mwuldFields + _mwuldAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebpropertyUserLinksDeleteAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Insert.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Insert.hs new file mode 100644 index 000000000..77433c327 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Insert.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new user to the given web property. +-- +-- /See:/ for @AnalyticsManagementWebpropertyUserLinksInsert@. +module Analytics.Management.WebpropertyUserLinks.Insert + ( + -- * REST Resource + ManagementWebpropertyUserLinksInsertAPI + + -- * Creating a Request + , managementWebpropertyUserLinksInsert + , ManagementWebpropertyUserLinksInsert + + -- * Request Lenses + , mwuliQuotaUser + , mwuliPrettyPrint + , mwuliWebPropertyId + , mwuliUserIp + , mwuliAccountId + , mwuliKey + , mwuliOauthToken + , mwuliFields + , mwuliAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertyUserLinksInsert@ which the +-- 'ManagementWebpropertyUserLinksInsert' request conforms to. +type ManagementWebpropertyUserLinksInsertAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityUserLinks" :> Post '[JSON] EntityUserLink + +-- | Adds a new user to the given web property. +-- +-- /See:/ 'managementWebpropertyUserLinksInsert' smart constructor. +data ManagementWebpropertyUserLinksInsert = ManagementWebpropertyUserLinksInsert + { _mwuliQuotaUser :: !(Maybe Text) + , _mwuliPrettyPrint :: !Bool + , _mwuliWebPropertyId :: !Text + , _mwuliUserIp :: !(Maybe Text) + , _mwuliAccountId :: !Text + , _mwuliKey :: !(Maybe Text) + , _mwuliOauthToken :: !(Maybe Text) + , _mwuliFields :: !(Maybe Text) + , _mwuliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertyUserLinksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwuliQuotaUser' +-- +-- * 'mwuliPrettyPrint' +-- +-- * 'mwuliWebPropertyId' +-- +-- * 'mwuliUserIp' +-- +-- * 'mwuliAccountId' +-- +-- * 'mwuliKey' +-- +-- * 'mwuliOauthToken' +-- +-- * 'mwuliFields' +-- +-- * 'mwuliAlt' +managementWebpropertyUserLinksInsert + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebpropertyUserLinksInsert +managementWebpropertyUserLinksInsert pMwuliWebPropertyId_ pMwuliAccountId_ = + ManagementWebpropertyUserLinksInsert + { _mwuliQuotaUser = Nothing + , _mwuliPrettyPrint = False + , _mwuliWebPropertyId = pMwuliWebPropertyId_ + , _mwuliUserIp = Nothing + , _mwuliAccountId = pMwuliAccountId_ + , _mwuliKey = Nothing + , _mwuliOauthToken = Nothing + , _mwuliFields = Nothing + , _mwuliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwuliQuotaUser :: Lens' ManagementWebpropertyUserLinksInsert' (Maybe Text) +mwuliQuotaUser + = lens _mwuliQuotaUser + (\ s a -> s{_mwuliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwuliPrettyPrint :: Lens' ManagementWebpropertyUserLinksInsert' Bool +mwuliPrettyPrint + = lens _mwuliPrettyPrint + (\ s a -> s{_mwuliPrettyPrint = a}) + +-- | Web Property ID to create the user link for. +mwuliWebPropertyId :: Lens' ManagementWebpropertyUserLinksInsert' Text +mwuliWebPropertyId + = lens _mwuliWebPropertyId + (\ s a -> s{_mwuliWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwuliUserIp :: Lens' ManagementWebpropertyUserLinksInsert' (Maybe Text) +mwuliUserIp + = lens _mwuliUserIp (\ s a -> s{_mwuliUserIp = a}) + +-- | Account ID to create the user link for. +mwuliAccountId :: Lens' ManagementWebpropertyUserLinksInsert' Text +mwuliAccountId + = lens _mwuliAccountId + (\ s a -> s{_mwuliAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwuliKey :: Lens' ManagementWebpropertyUserLinksInsert' (Maybe Text) +mwuliKey = lens _mwuliKey (\ s a -> s{_mwuliKey = a}) + +-- | OAuth 2.0 token for the current user. +mwuliOauthToken :: Lens' ManagementWebpropertyUserLinksInsert' (Maybe Text) +mwuliOauthToken + = lens _mwuliOauthToken + (\ s a -> s{_mwuliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwuliFields :: Lens' ManagementWebpropertyUserLinksInsert' (Maybe Text) +mwuliFields + = lens _mwuliFields (\ s a -> s{_mwuliFields = a}) + +-- | Data format for the response. +mwuliAlt :: Lens' ManagementWebpropertyUserLinksInsert' Text +mwuliAlt = lens _mwuliAlt (\ s a -> s{_mwuliAlt = a}) + +instance GoogleRequest + ManagementWebpropertyUserLinksInsert' where + type Rs ManagementWebpropertyUserLinksInsert' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertyUserLinksInsert{..} + = go _mwuliQuotaUser _mwuliPrettyPrint + _mwuliWebPropertyId + _mwuliUserIp + _mwuliAccountId + _mwuliKey + _mwuliOauthToken + _mwuliFields + _mwuliAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebpropertyUserLinksInsertAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/List.hs new file mode 100644 index 000000000..1f169c1f8 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/List.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists webProperty-user links for a given web property. +-- +-- /See:/ for @AnalyticsManagementWebpropertyUserLinksList@. +module Analytics.Management.WebpropertyUserLinks.List + ( + -- * REST Resource + ManagementWebpropertyUserLinksListAPI + + -- * Creating a Request + , managementWebpropertyUserLinksList + , ManagementWebpropertyUserLinksList + + -- * Request Lenses + , mwullQuotaUser + , mwullPrettyPrint + , mwullWebPropertyId + , mwullUserIp + , mwullAccountId + , mwullKey + , mwullOauthToken + , mwullStartIndex + , mwullMaxResults + , mwullFields + , mwullAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertyUserLinksList@ which the +-- 'ManagementWebpropertyUserLinksList' request conforms to. +type ManagementWebpropertyUserLinksListAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityUserLinks" :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + Get '[JSON] EntityUserLinks + +-- | Lists webProperty-user links for a given web property. +-- +-- /See:/ 'managementWebpropertyUserLinksList' smart constructor. +data ManagementWebpropertyUserLinksList = ManagementWebpropertyUserLinksList + { _mwullQuotaUser :: !(Maybe Text) + , _mwullPrettyPrint :: !Bool + , _mwullWebPropertyId :: !Text + , _mwullUserIp :: !(Maybe Text) + , _mwullAccountId :: !Text + , _mwullKey :: !(Maybe Text) + , _mwullOauthToken :: !(Maybe Text) + , _mwullStartIndex :: !(Maybe Int32) + , _mwullMaxResults :: !(Maybe Int32) + , _mwullFields :: !(Maybe Text) + , _mwullAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertyUserLinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwullQuotaUser' +-- +-- * 'mwullPrettyPrint' +-- +-- * 'mwullWebPropertyId' +-- +-- * 'mwullUserIp' +-- +-- * 'mwullAccountId' +-- +-- * 'mwullKey' +-- +-- * 'mwullOauthToken' +-- +-- * 'mwullStartIndex' +-- +-- * 'mwullMaxResults' +-- +-- * 'mwullFields' +-- +-- * 'mwullAlt' +managementWebpropertyUserLinksList + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> ManagementWebpropertyUserLinksList +managementWebpropertyUserLinksList pMwullWebPropertyId_ pMwullAccountId_ = + ManagementWebpropertyUserLinksList + { _mwullQuotaUser = Nothing + , _mwullPrettyPrint = False + , _mwullWebPropertyId = pMwullWebPropertyId_ + , _mwullUserIp = Nothing + , _mwullAccountId = pMwullAccountId_ + , _mwullKey = Nothing + , _mwullOauthToken = Nothing + , _mwullStartIndex = Nothing + , _mwullMaxResults = Nothing + , _mwullFields = Nothing + , _mwullAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwullQuotaUser :: Lens' ManagementWebpropertyUserLinksList' (Maybe Text) +mwullQuotaUser + = lens _mwullQuotaUser + (\ s a -> s{_mwullQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwullPrettyPrint :: Lens' ManagementWebpropertyUserLinksList' Bool +mwullPrettyPrint + = lens _mwullPrettyPrint + (\ s a -> s{_mwullPrettyPrint = a}) + +-- | Web Property ID for the webProperty-user links to retrieve. Can either +-- be a specific web property ID or \'~all\', which refers to all the web +-- properties that user has access to. +mwullWebPropertyId :: Lens' ManagementWebpropertyUserLinksList' Text +mwullWebPropertyId + = lens _mwullWebPropertyId + (\ s a -> s{_mwullWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwullUserIp :: Lens' ManagementWebpropertyUserLinksList' (Maybe Text) +mwullUserIp + = lens _mwullUserIp (\ s a -> s{_mwullUserIp = a}) + +-- | Account ID which the given web property belongs to. +mwullAccountId :: Lens' ManagementWebpropertyUserLinksList' Text +mwullAccountId + = lens _mwullAccountId + (\ s a -> s{_mwullAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwullKey :: Lens' ManagementWebpropertyUserLinksList' (Maybe Text) +mwullKey = lens _mwullKey (\ s a -> s{_mwullKey = a}) + +-- | OAuth 2.0 token for the current user. +mwullOauthToken :: Lens' ManagementWebpropertyUserLinksList' (Maybe Text) +mwullOauthToken + = lens _mwullOauthToken + (\ s a -> s{_mwullOauthToken = a}) + +-- | An index of the first webProperty-user link to retrieve. Use this +-- parameter as a pagination mechanism along with the max-results +-- parameter. +mwullStartIndex :: Lens' ManagementWebpropertyUserLinksList' (Maybe Int32) +mwullStartIndex + = lens _mwullStartIndex + (\ s a -> s{_mwullStartIndex = a}) + +-- | The maximum number of webProperty-user Links to include in this +-- response. +mwullMaxResults :: Lens' ManagementWebpropertyUserLinksList' (Maybe Int32) +mwullMaxResults + = lens _mwullMaxResults + (\ s a -> s{_mwullMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mwullFields :: Lens' ManagementWebpropertyUserLinksList' (Maybe Text) +mwullFields + = lens _mwullFields (\ s a -> s{_mwullFields = a}) + +-- | Data format for the response. +mwullAlt :: Lens' ManagementWebpropertyUserLinksList' Text +mwullAlt = lens _mwullAlt (\ s a -> s{_mwullAlt = a}) + +instance GoogleRequest + ManagementWebpropertyUserLinksList' where + type Rs ManagementWebpropertyUserLinksList' = + EntityUserLinks + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertyUserLinksList{..} + = go _mwullQuotaUser _mwullPrettyPrint + _mwullWebPropertyId + _mwullUserIp + _mwullAccountId + _mwullKey + _mwullOauthToken + _mwullStartIndex + _mwullMaxResults + _mwullFields + _mwullAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebpropertyUserLinksListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Update.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Update.hs new file mode 100644 index 000000000..b9da97b52 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebpropertyUserLinks/Update.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates permissions for an existing user on the given web property. +-- +-- /See:/ for @AnalyticsManagementWebpropertyUserLinksUpdate@. +module Analytics.Management.WebpropertyUserLinks.Update + ( + -- * REST Resource + ManagementWebpropertyUserLinksUpdateAPI + + -- * Creating a Request + , managementWebpropertyUserLinksUpdate + , ManagementWebpropertyUserLinksUpdate + + -- * Request Lenses + , mwuluQuotaUser + , mwuluPrettyPrint + , mwuluWebPropertyId + , mwuluUserIp + , mwuluAccountId + , mwuluKey + , mwuluLinkId + , mwuluOauthToken + , mwuluFields + , mwuluAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsManagementWebpropertyUserLinksUpdate@ which the +-- 'ManagementWebpropertyUserLinksUpdate' request conforms to. +type ManagementWebpropertyUserLinksUpdateAPI = + "management" :> + "accounts" :> + Capture "accountId" Text :> + "webproperties" :> + Capture "webPropertyId" Text :> + "entityUserLinks" :> + Capture "linkId" Text :> Put '[JSON] EntityUserLink + +-- | Updates permissions for an existing user on the given web property. +-- +-- /See:/ 'managementWebpropertyUserLinksUpdate' smart constructor. +data ManagementWebpropertyUserLinksUpdate = ManagementWebpropertyUserLinksUpdate + { _mwuluQuotaUser :: !(Maybe Text) + , _mwuluPrettyPrint :: !Bool + , _mwuluWebPropertyId :: !Text + , _mwuluUserIp :: !(Maybe Text) + , _mwuluAccountId :: !Text + , _mwuluKey :: !(Maybe Text) + , _mwuluLinkId :: !Text + , _mwuluOauthToken :: !(Maybe Text) + , _mwuluFields :: !(Maybe Text) + , _mwuluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagementWebpropertyUserLinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mwuluQuotaUser' +-- +-- * 'mwuluPrettyPrint' +-- +-- * 'mwuluWebPropertyId' +-- +-- * 'mwuluUserIp' +-- +-- * 'mwuluAccountId' +-- +-- * 'mwuluKey' +-- +-- * 'mwuluLinkId' +-- +-- * 'mwuluOauthToken' +-- +-- * 'mwuluFields' +-- +-- * 'mwuluAlt' +managementWebpropertyUserLinksUpdate + :: Text -- ^ 'webPropertyId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'linkId' + -> ManagementWebpropertyUserLinksUpdate +managementWebpropertyUserLinksUpdate pMwuluWebPropertyId_ pMwuluAccountId_ pMwuluLinkId_ = + ManagementWebpropertyUserLinksUpdate + { _mwuluQuotaUser = Nothing + , _mwuluPrettyPrint = False + , _mwuluWebPropertyId = pMwuluWebPropertyId_ + , _mwuluUserIp = Nothing + , _mwuluAccountId = pMwuluAccountId_ + , _mwuluKey = Nothing + , _mwuluLinkId = pMwuluLinkId_ + , _mwuluOauthToken = Nothing + , _mwuluFields = Nothing + , _mwuluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mwuluQuotaUser :: Lens' ManagementWebpropertyUserLinksUpdate' (Maybe Text) +mwuluQuotaUser + = lens _mwuluQuotaUser + (\ s a -> s{_mwuluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mwuluPrettyPrint :: Lens' ManagementWebpropertyUserLinksUpdate' Bool +mwuluPrettyPrint + = lens _mwuluPrettyPrint + (\ s a -> s{_mwuluPrettyPrint = a}) + +-- | Web property ID to update the account-user link for. +mwuluWebPropertyId :: Lens' ManagementWebpropertyUserLinksUpdate' Text +mwuluWebPropertyId + = lens _mwuluWebPropertyId + (\ s a -> s{_mwuluWebPropertyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mwuluUserIp :: Lens' ManagementWebpropertyUserLinksUpdate' (Maybe Text) +mwuluUserIp + = lens _mwuluUserIp (\ s a -> s{_mwuluUserIp = a}) + +-- | Account ID to update the account-user link for. +mwuluAccountId :: Lens' ManagementWebpropertyUserLinksUpdate' Text +mwuluAccountId + = lens _mwuluAccountId + (\ s a -> s{_mwuluAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mwuluKey :: Lens' ManagementWebpropertyUserLinksUpdate' (Maybe Text) +mwuluKey = lens _mwuluKey (\ s a -> s{_mwuluKey = a}) + +-- | Link ID to update the account-user link for. +mwuluLinkId :: Lens' ManagementWebpropertyUserLinksUpdate' Text +mwuluLinkId + = lens _mwuluLinkId (\ s a -> s{_mwuluLinkId = a}) + +-- | OAuth 2.0 token for the current user. +mwuluOauthToken :: Lens' ManagementWebpropertyUserLinksUpdate' (Maybe Text) +mwuluOauthToken + = lens _mwuluOauthToken + (\ s a -> s{_mwuluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mwuluFields :: Lens' ManagementWebpropertyUserLinksUpdate' (Maybe Text) +mwuluFields + = lens _mwuluFields (\ s a -> s{_mwuluFields = a}) + +-- | Data format for the response. +mwuluAlt :: Lens' ManagementWebpropertyUserLinksUpdate' Text +mwuluAlt = lens _mwuluAlt (\ s a -> s{_mwuluAlt = a}) + +instance GoogleRequest + ManagementWebpropertyUserLinksUpdate' where + type Rs ManagementWebpropertyUserLinksUpdate' = + EntityUserLink + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ManagementWebpropertyUserLinksUpdate{..} + = go _mwuluQuotaUser _mwuluPrettyPrint + _mwuluWebPropertyId + _mwuluUserIp + _mwuluAccountId + _mwuluKey + _mwuluLinkId + _mwuluOauthToken + _mwuluFields + _mwuluAlt + where go + = clientWithRoute + (Proxy :: + Proxy ManagementWebpropertyUserLinksUpdateAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Metadata/Columns/List.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Metadata/Columns/List.hs new file mode 100644 index 000000000..ecedaf557 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Metadata/Columns/List.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Metadata.Columns.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all columns for a report type +-- +-- /See:/ for @AnalyticsMetadataColumnsList@. +module Analytics.Metadata.Columns.List + ( + -- * REST Resource + MetadataColumnsListAPI + + -- * Creating a Request + , metadataColumnsList + , MetadataColumnsList + + -- * Request Lenses + , mclQuotaUser + , mclPrettyPrint + , mclUserIp + , mclKey + , mclOauthToken + , mclReportType + , mclFields + , mclAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsMetadataColumnsList@ which the +-- 'MetadataColumnsList' request conforms to. +type MetadataColumnsListAPI = + "metadata" :> + Capture "reportType" Text :> + "columns" :> Get '[JSON] Columns + +-- | Lists all columns for a report type +-- +-- /See:/ 'metadataColumnsList' smart constructor. +data MetadataColumnsList = MetadataColumnsList + { _mclQuotaUser :: !(Maybe Text) + , _mclPrettyPrint :: !Bool + , _mclUserIp :: !(Maybe Text) + , _mclKey :: !(Maybe Text) + , _mclOauthToken :: !(Maybe Text) + , _mclReportType :: !Text + , _mclFields :: !(Maybe Text) + , _mclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetadataColumnsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mclQuotaUser' +-- +-- * 'mclPrettyPrint' +-- +-- * 'mclUserIp' +-- +-- * 'mclKey' +-- +-- * 'mclOauthToken' +-- +-- * 'mclReportType' +-- +-- * 'mclFields' +-- +-- * 'mclAlt' +metadataColumnsList + :: Text -- ^ 'reportType' + -> MetadataColumnsList +metadataColumnsList pMclReportType_ = + MetadataColumnsList + { _mclQuotaUser = Nothing + , _mclPrettyPrint = False + , _mclUserIp = Nothing + , _mclKey = Nothing + , _mclOauthToken = Nothing + , _mclReportType = pMclReportType_ + , _mclFields = Nothing + , _mclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mclQuotaUser :: Lens' MetadataColumnsList' (Maybe Text) +mclQuotaUser + = lens _mclQuotaUser (\ s a -> s{_mclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mclPrettyPrint :: Lens' MetadataColumnsList' Bool +mclPrettyPrint + = lens _mclPrettyPrint + (\ s a -> s{_mclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mclUserIp :: Lens' MetadataColumnsList' (Maybe Text) +mclUserIp + = lens _mclUserIp (\ s a -> s{_mclUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mclKey :: Lens' MetadataColumnsList' (Maybe Text) +mclKey = lens _mclKey (\ s a -> s{_mclKey = a}) + +-- | OAuth 2.0 token for the current user. +mclOauthToken :: Lens' MetadataColumnsList' (Maybe Text) +mclOauthToken + = lens _mclOauthToken + (\ s a -> s{_mclOauthToken = a}) + +-- | Report type. Allowed Values: \'ga\'. Where \'ga\' corresponds to the +-- Core Reporting API +mclReportType :: Lens' MetadataColumnsList' Text +mclReportType + = lens _mclReportType + (\ s a -> s{_mclReportType = a}) + +-- | Selector specifying which fields to include in a partial response. +mclFields :: Lens' MetadataColumnsList' (Maybe Text) +mclFields + = lens _mclFields (\ s a -> s{_mclFields = a}) + +-- | Data format for the response. +mclAlt :: Lens' MetadataColumnsList' Text +mclAlt = lens _mclAlt (\ s a -> s{_mclAlt = a}) + +instance GoogleRequest MetadataColumnsList' where + type Rs MetadataColumnsList' = Columns + request = requestWithRoute defReq analyticsURL + requestWithRoute r u MetadataColumnsList{..} + = go _mclQuotaUser _mclPrettyPrint _mclUserIp _mclKey + _mclOauthToken + _mclReportType + _mclFields + _mclAlt + where go + = clientWithRoute + (Proxy :: Proxy MetadataColumnsListAPI) + r + u diff --git a/gogol-analytics/gen/Network/Google/Resource/Analytics/Provisioning/CreateAccountTicket.hs b/gogol-analytics/gen/Network/Google/Resource/Analytics/Provisioning/CreateAccountTicket.hs new file mode 100644 index 000000000..a00bc77c4 --- /dev/null +++ b/gogol-analytics/gen/Network/Google/Resource/Analytics/Provisioning/CreateAccountTicket.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Analytics.Provisioning.CreateAccountTicket +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an account ticket. +-- +-- /See:/ for @AnalyticsProvisioningCreateAccountTicket@. +module Analytics.Provisioning.CreateAccountTicket + ( + -- * REST Resource + ProvisioningCreateAccountTicketAPI + + -- * Creating a Request + , provisioningCreateAccountTicket + , ProvisioningCreateAccountTicket + + -- * Request Lenses + , pcatQuotaUser + , pcatPrettyPrint + , pcatUserIp + , pcatKey + , pcatOauthToken + , pcatFields + , pcatAlt + ) where + +import Network.Google.Analytics.Types +import Network.Google.Prelude + +-- | A resource alias for @AnalyticsProvisioningCreateAccountTicket@ which the +-- 'ProvisioningCreateAccountTicket' request conforms to. +type ProvisioningCreateAccountTicketAPI = + "provisioning" :> + "createAccountTicket" :> Post '[JSON] AccountTicket + +-- | Creates an account ticket. +-- +-- /See:/ 'provisioningCreateAccountTicket' smart constructor. +data ProvisioningCreateAccountTicket = ProvisioningCreateAccountTicket + { _pcatQuotaUser :: !(Maybe Text) + , _pcatPrettyPrint :: !Bool + , _pcatUserIp :: !(Maybe Text) + , _pcatKey :: !(Maybe Text) + , _pcatOauthToken :: !(Maybe Text) + , _pcatFields :: !(Maybe Text) + , _pcatAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProvisioningCreateAccountTicket'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcatQuotaUser' +-- +-- * 'pcatPrettyPrint' +-- +-- * 'pcatUserIp' +-- +-- * 'pcatKey' +-- +-- * 'pcatOauthToken' +-- +-- * 'pcatFields' +-- +-- * 'pcatAlt' +provisioningCreateAccountTicket + :: ProvisioningCreateAccountTicket +provisioningCreateAccountTicket = + ProvisioningCreateAccountTicket + { _pcatQuotaUser = Nothing + , _pcatPrettyPrint = False + , _pcatUserIp = Nothing + , _pcatKey = Nothing + , _pcatOauthToken = Nothing + , _pcatFields = Nothing + , _pcatAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcatQuotaUser :: Lens' ProvisioningCreateAccountTicket' (Maybe Text) +pcatQuotaUser + = lens _pcatQuotaUser + (\ s a -> s{_pcatQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcatPrettyPrint :: Lens' ProvisioningCreateAccountTicket' Bool +pcatPrettyPrint + = lens _pcatPrettyPrint + (\ s a -> s{_pcatPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcatUserIp :: Lens' ProvisioningCreateAccountTicket' (Maybe Text) +pcatUserIp + = lens _pcatUserIp (\ s a -> s{_pcatUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcatKey :: Lens' ProvisioningCreateAccountTicket' (Maybe Text) +pcatKey = lens _pcatKey (\ s a -> s{_pcatKey = a}) + +-- | OAuth 2.0 token for the current user. +pcatOauthToken :: Lens' ProvisioningCreateAccountTicket' (Maybe Text) +pcatOauthToken + = lens _pcatOauthToken + (\ s a -> s{_pcatOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcatFields :: Lens' ProvisioningCreateAccountTicket' (Maybe Text) +pcatFields + = lens _pcatFields (\ s a -> s{_pcatFields = a}) + +-- | Data format for the response. +pcatAlt :: Lens' ProvisioningCreateAccountTicket' Text +pcatAlt = lens _pcatAlt (\ s a -> s{_pcatAlt = a}) + +instance GoogleRequest + ProvisioningCreateAccountTicket' where + type Rs ProvisioningCreateAccountTicket' = + AccountTicket + request = requestWithRoute defReq analyticsURL + requestWithRoute r u + ProvisioningCreateAccountTicket{..} + = go _pcatQuotaUser _pcatPrettyPrint _pcatUserIp + _pcatKey + _pcatOauthToken + _pcatFields + _pcatAlt + where go + = clientWithRoute + (Proxy :: Proxy ProvisioningCreateAccountTicketAPI) + r + u diff --git a/gogol-analytics/gogol-analytics.cabal b/gogol-analytics/gogol-analytics.cabal new file mode 100644 index 000000000..1f4497b7a --- /dev/null +++ b/gogol-analytics/gogol-analytics.cabal @@ -0,0 +1,120 @@ +name: gogol-analytics +version: 0.0.1 +synopsis: Google Analytics API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + View and manage your Google Analytics data + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Analytics + , Network.Google.Analytics.Types + , Network.Google.Resource.Analytics.Data.Ga.Get + , Network.Google.Resource.Analytics.Data.Mcf.Get + , Network.Google.Resource.Analytics.Data.Realtime.Get + , Network.Google.Resource.Analytics.Management.AccountSummaries.List + , Network.Google.Resource.Analytics.Management.AccountUserLinks.Delete + , Network.Google.Resource.Analytics.Management.AccountUserLinks.Insert + , Network.Google.Resource.Analytics.Management.AccountUserLinks.List + , Network.Google.Resource.Analytics.Management.AccountUserLinks.Update + , Network.Google.Resource.Analytics.Management.Accounts.List + , Network.Google.Resource.Analytics.Management.CustomDataSources.List + , Network.Google.Resource.Analytics.Management.CustomDimensions.Get + , Network.Google.Resource.Analytics.Management.CustomDimensions.Insert + , Network.Google.Resource.Analytics.Management.CustomDimensions.List + , Network.Google.Resource.Analytics.Management.CustomDimensions.Patch + , Network.Google.Resource.Analytics.Management.CustomDimensions.Update + , Network.Google.Resource.Analytics.Management.CustomMetrics.Get + , Network.Google.Resource.Analytics.Management.CustomMetrics.Insert + , Network.Google.Resource.Analytics.Management.CustomMetrics.List + , Network.Google.Resource.Analytics.Management.CustomMetrics.Patch + , Network.Google.Resource.Analytics.Management.CustomMetrics.Update + , Network.Google.Resource.Analytics.Management.Experiments.Delete + , Network.Google.Resource.Analytics.Management.Experiments.Get + , Network.Google.Resource.Analytics.Management.Experiments.Insert + , Network.Google.Resource.Analytics.Management.Experiments.List + , Network.Google.Resource.Analytics.Management.Experiments.Patch + , Network.Google.Resource.Analytics.Management.Experiments.Update + , Network.Google.Resource.Analytics.Management.Filters.Delete + , Network.Google.Resource.Analytics.Management.Filters.Get + , Network.Google.Resource.Analytics.Management.Filters.Insert + , Network.Google.Resource.Analytics.Management.Filters.List + , Network.Google.Resource.Analytics.Management.Filters.Patch + , Network.Google.Resource.Analytics.Management.Filters.Update + , Network.Google.Resource.Analytics.Management.Goals.Get + , Network.Google.Resource.Analytics.Management.Goals.Insert + , Network.Google.Resource.Analytics.Management.Goals.List + , Network.Google.Resource.Analytics.Management.Goals.Patch + , Network.Google.Resource.Analytics.Management.Goals.Update + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Delete + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Get + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Insert + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.List + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Patch + , Network.Google.Resource.Analytics.Management.ProfileFilterLinks.Update + , Network.Google.Resource.Analytics.Management.ProfileUserLinks.Delete + , Network.Google.Resource.Analytics.Management.ProfileUserLinks.Insert + , Network.Google.Resource.Analytics.Management.ProfileUserLinks.List + , Network.Google.Resource.Analytics.Management.ProfileUserLinks.Update + , Network.Google.Resource.Analytics.Management.Profiles.Delete + , Network.Google.Resource.Analytics.Management.Profiles.Get + , Network.Google.Resource.Analytics.Management.Profiles.Insert + , Network.Google.Resource.Analytics.Management.Profiles.List + , Network.Google.Resource.Analytics.Management.Profiles.Patch + , Network.Google.Resource.Analytics.Management.Profiles.Update + , Network.Google.Resource.Analytics.Management.Segments.List + , Network.Google.Resource.Analytics.Management.UnsampledReports.Get + , Network.Google.Resource.Analytics.Management.UnsampledReports.Insert + , Network.Google.Resource.Analytics.Management.UnsampledReports.List + , Network.Google.Resource.Analytics.Management.Uploads.DeleteUploadData + , Network.Google.Resource.Analytics.Management.Uploads.Get + , Network.Google.Resource.Analytics.Management.Uploads.List + , Network.Google.Resource.Analytics.Management.Uploads.UploadData + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Delete + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Get + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Insert + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.List + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Patch + , Network.Google.Resource.Analytics.Management.WebPropertyAdWordsLinks.Update + , Network.Google.Resource.Analytics.Management.Webproperties.Get + , Network.Google.Resource.Analytics.Management.Webproperties.Insert + , Network.Google.Resource.Analytics.Management.Webproperties.List + , Network.Google.Resource.Analytics.Management.Webproperties.Patch + , Network.Google.Resource.Analytics.Management.Webproperties.Update + , Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Delete + , Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Insert + , Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.List + , Network.Google.Resource.Analytics.Management.WebpropertyUserLinks.Update + , Network.Google.Resource.Analytics.Metadata.Columns.List + , Network.Google.Resource.Analytics.Provisioning.CreateAccountTicket + + other-modules: + Network.Google.Analytics.Types.Product + , Network.Google.Analytics.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-analytics/src/.gitkeep b/gogol-analytics/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-appengine-taskqueue/LICENSE b/gogol-appengine-taskqueue/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-appengine-taskqueue/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-appengine-taskqueue/Makefile b/gogol-appengine-taskqueue/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-appengine-taskqueue/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-appengine-taskqueue/README.md b/gogol-appengine-taskqueue/README.md new file mode 100644 index 000000000..a5f08c70b --- /dev/null +++ b/gogol-appengine-taskqueue/README.md @@ -0,0 +1,28 @@ +# gogol-appengine-taskqueue + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the TaskQueue API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-appengine-taskqueue` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-appengine-taskqueue/Setup.hs b/gogol-appengine-taskqueue/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-appengine-taskqueue/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue.hs b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue.hs new file mode 100644 index 000000000..e998d4f0e --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue.hs @@ -0,0 +1,107 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppEngineTaskQueue +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you access a Google App Engine Pull Task Queue over REST. +-- +-- /See:/ +module Network.Google.AppEngineTaskQueue + ( + -- * API + AppEngineTaskQueueAPI + , appEngineTaskQueueAPI + , appEngineTaskQueueURL + + -- * Service Methods + + -- * REST Resources + + -- ** TaskqueueTaskqueuesGet + , module Taskqueue.Taskqueues.Get + + -- ** TaskqueueTasksDelete + , module Taskqueue.Tasks.Delete + + -- ** TaskqueueTasksGet + , module Taskqueue.Tasks.Get + + -- ** TaskqueueTasksInsert + , module Taskqueue.Tasks.Insert + + -- ** TaskqueueTasksLease + , module Taskqueue.Tasks.Lease + + -- ** TaskqueueTasksList + , module Taskqueue.Tasks.List + + -- ** TaskqueueTasksPatch + , module Taskqueue.Tasks.Patch + + -- ** TaskqueueTasksUpdate + , module Taskqueue.Tasks.Update + + -- * Types + + -- ** TaskQueue + , TaskQueue + , taskQueue + , tqKind + , tqStats + , tqMaxLeases + , tqId + , tqAcl + + -- ** Tasks2 + , Tasks2 + , tasks2 + , tKind + , tItems + + -- ** Tasks + , Tasks + , tasks + , tasKind + , tasItems + + -- ** Task + , Task + , task + , ttRetryCount + , ttEnqueueTimestamp + , ttTag + , ttKind + , ttQueueName + , ttPayloadBase64 + , ttId + , ttLeaseTimestamp + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude +import Network.Google.Resource.Taskqueue.Taskqueues.Get +import Network.Google.Resource.Taskqueue.Tasks.Delete +import Network.Google.Resource.Taskqueue.Tasks.Get +import Network.Google.Resource.Taskqueue.Tasks.Insert +import Network.Google.Resource.Taskqueue.Tasks.Lease +import Network.Google.Resource.Taskqueue.Tasks.List +import Network.Google.Resource.Taskqueue.Tasks.Patch +import Network.Google.Resource.Taskqueue.Tasks.Update + +{- $resources +TODO +-} + +type AppEngineTaskQueueAPI = Tasks :<|> Taskqueues + +appEngineTaskQueueAPI :: Proxy AppEngineTaskQueueAPI +appEngineTaskQueueAPI = Proxy diff --git a/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types.hs b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types.hs new file mode 100644 index 000000000..e59b17ab8 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types.hs @@ -0,0 +1,63 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngineTaskQueue.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngineTaskQueue.Types + ( + -- * Service URL + appEngineTaskQueueURL + + -- * TaskQueue + , TaskQueue + , taskQueue + , tqKind + , tqStats + , tqMaxLeases + , tqId + , tqAcl + + -- * Tasks2 + , Tasks2 + , tasks2 + , tKind + , tItems + + -- * Tasks + , Tasks + , tasks + , tasKind + , tasItems + + -- * Task + , Task + , task + , ttRetryCount + , ttEnqueueTimestamp + , ttTag + , ttKind + , ttQueueName + , ttPayloadBase64 + , ttId + , ttLeaseTimestamp + ) where + +import Network.Google.AppEngineTaskQueue.Types.Product +import Network.Google.AppEngineTaskQueue.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the TaskQueue API. +appEngineTaskQueueURL :: BaseURL +appEngineTaskQueueURL + = BaseUrl Https + "https://www.googleapis.com/taskqueue/v1beta2/projects/" + 443 diff --git a/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Product.hs b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Product.hs new file mode 100644 index 000000000..87a980323 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Product.hs @@ -0,0 +1,302 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngineTaskQueue.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngineTaskQueue.Types.Product where + +import Network.Google.AppEngineTaskQueue.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'taskQueue' smart constructor. +data TaskQueue = TaskQueue + { _tqKind :: !Text + , _tqStats :: !(Maybe TaskQueueStats) + , _tqMaxLeases :: !(Maybe Int32) + , _tqId :: !(Maybe Text) + , _tqAcl :: !(Maybe TaskQueueACL) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskQueue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tqKind' +-- +-- * 'tqStats' +-- +-- * 'tqMaxLeases' +-- +-- * 'tqId' +-- +-- * 'tqAcl' +taskQueue + :: TaskQueue +taskQueue = + TaskQueue + { _tqKind = "taskqueues#taskqueue" + , _tqStats = Nothing + , _tqMaxLeases = Nothing + , _tqId = Nothing + , _tqAcl = Nothing + } + +-- | The kind of REST object returned, in this case taskqueue. +tqKind :: Lens' TaskQueue Text +tqKind = lens _tqKind (\ s a -> s{_tqKind = a}) + +-- | Statistics for the TaskQueue object in question. +tqStats :: Lens' TaskQueue (Maybe TaskQueueStats) +tqStats = lens _tqStats (\ s a -> s{_tqStats = a}) + +-- | The number of times we should lease out tasks before giving up on them. +-- If unset we lease them out forever until a worker deletes the task. +tqMaxLeases :: Lens' TaskQueue (Maybe Int32) +tqMaxLeases + = lens _tqMaxLeases (\ s a -> s{_tqMaxLeases = a}) + +-- | Name of the taskqueue. +tqId :: Lens' TaskQueue (Maybe Text) +tqId = lens _tqId (\ s a -> s{_tqId = a}) + +-- | ACLs that are applicable to this TaskQueue object. +tqAcl :: Lens' TaskQueue (Maybe TaskQueueACL) +tqAcl = lens _tqAcl (\ s a -> s{_tqAcl = a}) + +instance FromJSON TaskQueue where + parseJSON + = withObject "TaskQueue" + (\ o -> + TaskQueue <$> + (o .:? "kind" .!= "taskqueues#taskqueue") <*> + (o .:? "stats") + <*> (o .:? "maxLeases") + <*> (o .:? "id") + <*> (o .:? "acl")) + +instance ToJSON TaskQueue where + toJSON TaskQueue{..} + = object + (catMaybes + [Just ("kind" .= _tqKind), ("stats" .=) <$> _tqStats, + ("maxLeases" .=) <$> _tqMaxLeases, + ("id" .=) <$> _tqId, ("acl" .=) <$> _tqAcl]) + +-- +-- /See:/ 'tasks2' smart constructor. +data Tasks2 = Tasks2 + { _tKind :: !Text + , _tItems :: !(Maybe [Maybe Task]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tasks2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tKind' +-- +-- * 'tItems' +tasks2 + :: Tasks2 +tasks2 = + Tasks2 + { _tKind = "taskqueues#tasks" + , _tItems = Nothing + } + +-- | The kind of object returned, a list of tasks. +tKind :: Lens' Tasks2 Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | The actual list of tasks currently active in the TaskQueue. +tItems :: Lens' Tasks2 [Maybe Task] +tItems + = lens _tItems (\ s a -> s{_tItems = a}) . _Default . + _Coerce + +instance FromJSON Tasks2 where + parseJSON + = withObject "Tasks2" + (\ o -> + Tasks2 <$> + (o .:? "kind" .!= "taskqueues#tasks") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Tasks2 where + toJSON Tasks2{..} + = object + (catMaybes + [Just ("kind" .= _tKind), ("items" .=) <$> _tItems]) + +-- +-- /See:/ 'tasks' smart constructor. +data Tasks = Tasks + { _tasKind :: !Text + , _tasItems :: !(Maybe [Maybe Task]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tasks' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tasKind' +-- +-- * 'tasItems' +tasks + :: Tasks +tasks = + Tasks + { _tasKind = "taskqueue#tasks" + , _tasItems = Nothing + } + +-- | The kind of object returned, a list of tasks. +tasKind :: Lens' Tasks Text +tasKind = lens _tasKind (\ s a -> s{_tasKind = a}) + +-- | The actual list of tasks returned as a result of the lease operation. +tasItems :: Lens' Tasks [Maybe Task] +tasItems + = lens _tasItems (\ s a -> s{_tasItems = a}) . + _Default + . _Coerce + +instance FromJSON Tasks where + parseJSON + = withObject "Tasks" + (\ o -> + Tasks <$> + (o .:? "kind" .!= "taskqueue#tasks") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Tasks where + toJSON Tasks{..} + = object + (catMaybes + [Just ("kind" .= _tasKind), + ("items" .=) <$> _tasItems]) + +-- +-- /See:/ 'task' smart constructor. +data Task = Task + { _ttRetryCount :: !(Maybe Int32) + , _ttEnqueueTimestamp :: !(Maybe Int64) + , _ttTag :: !(Maybe Text) + , _ttKind :: !Text + , _ttQueueName :: !(Maybe Text) + , _ttPayloadBase64 :: !(Maybe Text) + , _ttId :: !(Maybe Text) + , _ttLeaseTimestamp :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Task' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ttRetryCount' +-- +-- * 'ttEnqueueTimestamp' +-- +-- * 'ttTag' +-- +-- * 'ttKind' +-- +-- * 'ttQueueName' +-- +-- * 'ttPayloadBase64' +-- +-- * 'ttId' +-- +-- * 'ttLeaseTimestamp' +task + :: Task +task = + Task + { _ttRetryCount = Nothing + , _ttEnqueueTimestamp = Nothing + , _ttTag = Nothing + , _ttKind = "taskqueues#task" + , _ttQueueName = Nothing + , _ttPayloadBase64 = Nothing + , _ttId = Nothing + , _ttLeaseTimestamp = Nothing + } + +-- | The number of leases applied to this task. +ttRetryCount :: Lens' Task (Maybe Int32) +ttRetryCount + = lens _ttRetryCount (\ s a -> s{_ttRetryCount = a}) + +-- | Time (in seconds since the epoch) at which the task was enqueued. +ttEnqueueTimestamp :: Lens' Task (Maybe Int64) +ttEnqueueTimestamp + = lens _ttEnqueueTimestamp + (\ s a -> s{_ttEnqueueTimestamp = a}) + +-- | Tag for the task, could be used later to lease tasks grouped by a +-- specific tag. +ttTag :: Lens' Task (Maybe Text) +ttTag = lens _ttTag (\ s a -> s{_ttTag = a}) + +-- | The kind of object returned, in this case set to task. +ttKind :: Lens' Task Text +ttKind = lens _ttKind (\ s a -> s{_ttKind = a}) + +-- | Name of the queue that the task is in. +ttQueueName :: Lens' Task (Maybe Text) +ttQueueName + = lens _ttQueueName (\ s a -> s{_ttQueueName = a}) + +-- | A bag of bytes which is the task payload. The payload on the JSON side +-- is always Base64 encoded. +ttPayloadBase64 :: Lens' Task (Maybe Text) +ttPayloadBase64 + = lens _ttPayloadBase64 + (\ s a -> s{_ttPayloadBase64 = a}) + +-- | Name of the task. +ttId :: Lens' Task (Maybe Text) +ttId = lens _ttId (\ s a -> s{_ttId = a}) + +-- | Time (in seconds since the epoch) at which the task lease will expire. +-- This value is 0 if the task isnt currently leased out to a worker. +ttLeaseTimestamp :: Lens' Task (Maybe Int64) +ttLeaseTimestamp + = lens _ttLeaseTimestamp + (\ s a -> s{_ttLeaseTimestamp = a}) + +instance FromJSON Task where + parseJSON + = withObject "Task" + (\ o -> + Task <$> + (o .:? "retry_count") <*> (o .:? "enqueueTimestamp") + <*> (o .:? "tag") + <*> (o .:? "kind" .!= "taskqueues#task") + <*> (o .:? "queueName") + <*> (o .:? "payloadBase64") + <*> (o .:? "id") + <*> (o .:? "leaseTimestamp")) + +instance ToJSON Task where + toJSON Task{..} + = object + (catMaybes + [("retry_count" .=) <$> _ttRetryCount, + ("enqueueTimestamp" .=) <$> _ttEnqueueTimestamp, + ("tag" .=) <$> _ttTag, Just ("kind" .= _ttKind), + ("queueName" .=) <$> _ttQueueName, + ("payloadBase64" .=) <$> _ttPayloadBase64, + ("id" .=) <$> _ttId, + ("leaseTimestamp" .=) <$> _ttLeaseTimestamp]) diff --git a/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Sum.hs b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Sum.hs new file mode 100644 index 000000000..d3e92bafb --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/AppEngineTaskQueue/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngineTaskQueue.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngineTaskQueue.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Taskqueues/Get.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Taskqueues/Get.hs new file mode 100644 index 000000000..fd4b3fd8f --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Taskqueues/Get.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Taskqueues.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get detailed information about a TaskQueue. +-- +-- /See:/ for @TaskqueueTaskqueuesGet@. +module Taskqueue.Taskqueues.Get + ( + -- * REST Resource + TaskqueuesGetAPI + + -- * Creating a Request + , taskqueuesGet + , TaskqueuesGet + + -- * Request Lenses + , tasTaskqueue + , tasQuotaUser + , tasPrettyPrint + , tasProject + , tasUserIp + , tasKey + , tasGetStats + , tasOauthToken + , tasFields + , tasAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTaskqueuesGet@ which the +-- 'TaskqueuesGet' request conforms to. +type TaskqueuesGetAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + QueryParam "getStats" Bool :> Get '[JSON] TaskQueue + +-- | Get detailed information about a TaskQueue. +-- +-- /See:/ 'taskqueuesGet' smart constructor. +data TaskqueuesGet = TaskqueuesGet + { _tasTaskqueue :: !Text + , _tasQuotaUser :: !(Maybe Text) + , _tasPrettyPrint :: !Bool + , _tasProject :: !Text + , _tasUserIp :: !(Maybe Text) + , _tasKey :: !(Maybe Text) + , _tasGetStats :: !(Maybe Bool) + , _tasOauthToken :: !(Maybe Text) + , _tasFields :: !(Maybe Text) + , _tasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskqueuesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tasTaskqueue' +-- +-- * 'tasQuotaUser' +-- +-- * 'tasPrettyPrint' +-- +-- * 'tasProject' +-- +-- * 'tasUserIp' +-- +-- * 'tasKey' +-- +-- * 'tasGetStats' +-- +-- * 'tasOauthToken' +-- +-- * 'tasFields' +-- +-- * 'tasAlt' +taskqueuesGet + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> TaskqueuesGet +taskqueuesGet pTasTaskqueue_ pTasProject_ = + TaskqueuesGet + { _tasTaskqueue = pTasTaskqueue_ + , _tasQuotaUser = Nothing + , _tasPrettyPrint = True + , _tasProject = pTasProject_ + , _tasUserIp = Nothing + , _tasKey = Nothing + , _tasGetStats = Nothing + , _tasOauthToken = Nothing + , _tasFields = Nothing + , _tasAlt = "json" + } + +-- | The id of the taskqueue to get the properties of. +tasTaskqueue :: Lens' TaskqueuesGet' Text +tasTaskqueue + = lens _tasTaskqueue (\ s a -> s{_tasTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tasQuotaUser :: Lens' TaskqueuesGet' (Maybe Text) +tasQuotaUser + = lens _tasQuotaUser (\ s a -> s{_tasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tasPrettyPrint :: Lens' TaskqueuesGet' Bool +tasPrettyPrint + = lens _tasPrettyPrint + (\ s a -> s{_tasPrettyPrint = a}) + +-- | The project under which the queue lies. +tasProject :: Lens' TaskqueuesGet' Text +tasProject + = lens _tasProject (\ s a -> s{_tasProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tasUserIp :: Lens' TaskqueuesGet' (Maybe Text) +tasUserIp + = lens _tasUserIp (\ s a -> s{_tasUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tasKey :: Lens' TaskqueuesGet' (Maybe Text) +tasKey = lens _tasKey (\ s a -> s{_tasKey = a}) + +-- | Whether to get stats. Optional. +tasGetStats :: Lens' TaskqueuesGet' (Maybe Bool) +tasGetStats + = lens _tasGetStats (\ s a -> s{_tasGetStats = a}) + +-- | OAuth 2.0 token for the current user. +tasOauthToken :: Lens' TaskqueuesGet' (Maybe Text) +tasOauthToken + = lens _tasOauthToken + (\ s a -> s{_tasOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tasFields :: Lens' TaskqueuesGet' (Maybe Text) +tasFields + = lens _tasFields (\ s a -> s{_tasFields = a}) + +-- | Data format for the response. +tasAlt :: Lens' TaskqueuesGet' Text +tasAlt = lens _tasAlt (\ s a -> s{_tasAlt = a}) + +instance GoogleRequest TaskqueuesGet' where + type Rs TaskqueuesGet' = TaskQueue + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TaskqueuesGet{..} + = go _tasTaskqueue _tasQuotaUser _tasPrettyPrint + _tasProject + _tasUserIp + _tasKey + _tasGetStats + _tasOauthToken + _tasFields + _tasAlt + where go + = clientWithRoute (Proxy :: Proxy TaskqueuesGetAPI) r + u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Delete.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Delete.hs new file mode 100644 index 000000000..799f78a89 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Delete.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a task from a TaskQueue. +-- +-- /See:/ for @TaskqueueTasksDelete@. +module Taskqueue.Tasks.Delete + ( + -- * REST Resource + TasksDeleteAPI + + -- * Creating a Request + , tasksDelete + , TasksDelete + + -- * Request Lenses + , tdTaskqueue + , tdQuotaUser + , tdPrettyPrint + , tdProject + , tdUserIp + , tdKey + , tdTask + , tdOauthToken + , tdFields + , tdAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksDelete@ which the +-- 'TasksDelete' request conforms to. +type TasksDeleteAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> Capture "task" Text :> Delete '[JSON] () + +-- | Delete a task from a TaskQueue. +-- +-- /See:/ 'tasksDelete' smart constructor. +data TasksDelete = TasksDelete + { _tdTaskqueue :: !Text + , _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdProject :: !Text + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdTask :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdTaskqueue' +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdProject' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdTask' +-- +-- * 'tdOauthToken' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +tasksDelete + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> Text -- ^ 'task' + -> TasksDelete +tasksDelete pTdTaskqueue_ pTdProject_ pTdTask_ = + TasksDelete + { _tdTaskqueue = pTdTaskqueue_ + , _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdProject = pTdProject_ + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdTask = pTdTask_ + , _tdOauthToken = Nothing + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | The taskqueue to delete a task from. +tdTaskqueue :: Lens' TasksDelete' Text +tdTaskqueue + = lens _tdTaskqueue (\ s a -> s{_tdTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TasksDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TasksDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | The project under which the queue lies. +tdProject :: Lens' TasksDelete' Text +tdProject + = lens _tdProject (\ s a -> s{_tdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TasksDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TasksDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | The id of the task to delete. +tdTask :: Lens' TasksDelete' Text +tdTask = lens _tdTask (\ s a -> s{_tdTask = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TasksDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TasksDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TasksDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TasksDelete' where + type Rs TasksDelete' = () + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksDelete{..} + = go _tdTaskqueue _tdQuotaUser _tdPrettyPrint + _tdProject + _tdUserIp + _tdKey + _tdTask + _tdOauthToken + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TasksDeleteAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Get.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Get.hs new file mode 100644 index 000000000..177bd81e8 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Get.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a particular task from a TaskQueue. +-- +-- /See:/ for @TaskqueueTasksGet@. +module Taskqueue.Tasks.Get + ( + -- * REST Resource + TasksGetAPI + + -- * Creating a Request + , tasksGet + , TasksGet + + -- * Request Lenses + , tgTaskqueue + , tgQuotaUser + , tgPrettyPrint + , tgProject + , tgUserIp + , tgKey + , tgTask + , tgOauthToken + , tgFields + , tgAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksGet@ which the +-- 'TasksGet' request conforms to. +type TasksGetAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> Capture "task" Text :> Get '[JSON] Task + +-- | Get a particular task from a TaskQueue. +-- +-- /See:/ 'tasksGet' smart constructor. +data TasksGet = TasksGet + { _tgTaskqueue :: !Text + , _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgProject :: !Text + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgTask :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgTaskqueue' +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgProject' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgTask' +-- +-- * 'tgOauthToken' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +tasksGet + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> Text -- ^ 'task' + -> TasksGet +tasksGet pTgTaskqueue_ pTgProject_ pTgTask_ = + TasksGet + { _tgTaskqueue = pTgTaskqueue_ + , _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgProject = pTgProject_ + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgTask = pTgTask_ + , _tgOauthToken = Nothing + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | The taskqueue in which the task belongs. +tgTaskqueue :: Lens' TasksGet' Text +tgTaskqueue + = lens _tgTaskqueue (\ s a -> s{_tgTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TasksGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TasksGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | The project under which the queue lies. +tgProject :: Lens' TasksGet' Text +tgProject + = lens _tgProject (\ s a -> s{_tgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TasksGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TasksGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | The task to get properties of. +tgTask :: Lens' TasksGet' Text +tgTask = lens _tgTask (\ s a -> s{_tgTask = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TasksGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TasksGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TasksGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TasksGet' where + type Rs TasksGet' = Task + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksGet{..} + = go _tgTaskqueue _tgQuotaUser _tgPrettyPrint + _tgProject + _tgUserIp + _tgKey + _tgTask + _tgOauthToken + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TasksGetAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Insert.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Insert.hs new file mode 100644 index 000000000..bfae33ecc --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Insert.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert a new task in a TaskQueue +-- +-- /See:/ for @TaskqueueTasksInsert@. +module Taskqueue.Tasks.Insert + ( + -- * REST Resource + TasksInsertAPI + + -- * Creating a Request + , tasksInsert + , TasksInsert + + -- * Request Lenses + , tiTaskqueue + , tiQuotaUser + , tiPrettyPrint + , tiProject + , tiUserIp + , tiKey + , tiOauthToken + , tiFields + , tiAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksInsert@ which the +-- 'TasksInsert' request conforms to. +type TasksInsertAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> Post '[JSON] Task + +-- | Insert a new task in a TaskQueue +-- +-- /See:/ 'tasksInsert' smart constructor. +data TasksInsert = TasksInsert + { _tiTaskqueue :: !Text + , _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiProject :: !Text + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiTaskqueue' +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiProject' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +tasksInsert + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> TasksInsert +tasksInsert pTiTaskqueue_ pTiProject_ = + TasksInsert + { _tiTaskqueue = pTiTaskqueue_ + , _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiProject = pTiProject_ + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | The taskqueue to insert the task into +tiTaskqueue :: Lens' TasksInsert' Text +tiTaskqueue + = lens _tiTaskqueue (\ s a -> s{_tiTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TasksInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TasksInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | The project under which the queue lies +tiProject :: Lens' TasksInsert' Text +tiProject + = lens _tiProject (\ s a -> s{_tiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TasksInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TasksInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TasksInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TasksInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TasksInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TasksInsert' where + type Rs TasksInsert' = Task + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksInsert{..} + = go _tiTaskqueue _tiQuotaUser _tiPrettyPrint + _tiProject + _tiUserIp + _tiKey + _tiOauthToken + _tiFields + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TasksInsertAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Lease.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Lease.hs new file mode 100644 index 000000000..075fa0660 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Lease.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Lease +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lease 1 or more tasks from a TaskQueue. +-- +-- /See:/ for @TaskqueueTasksLease@. +module Taskqueue.Tasks.Lease + ( + -- * REST Resource + TasksLeaseAPI + + -- * Creating a Request + , tasksLease + , TasksLease + + -- * Request Lenses + , tTaskqueue + , tQuotaUser + , tPrettyPrint + , tTag + , tProject + , tUserIp + , tNumTasks + , tKey + , tLeaseSecs + , tOauthToken + , tGroupByTag + , tFields + , tAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksLease@ which the +-- 'TasksLease' request conforms to. +type TasksLeaseAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> + "lease" :> + QueryParam "tag" Text :> + QueryParam "numTasks" Int32 :> + QueryParam "leaseSecs" Int32 :> + QueryParam "groupByTag" Bool :> Post '[JSON] Tasks + +-- | Lease 1 or more tasks from a TaskQueue. +-- +-- /See:/ 'tasksLease' smart constructor. +data TasksLease = TasksLease + { _tTaskqueue :: !Text + , _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tTag :: !(Maybe Text) + , _tProject :: !Text + , _tUserIp :: !(Maybe Text) + , _tNumTasks :: !Int32 + , _tKey :: !(Maybe Text) + , _tLeaseSecs :: !Int32 + , _tOauthToken :: !(Maybe Text) + , _tGroupByTag :: !(Maybe Bool) + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksLease'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tTaskqueue' +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tTag' +-- +-- * 'tProject' +-- +-- * 'tUserIp' +-- +-- * 'tNumTasks' +-- +-- * 'tKey' +-- +-- * 'tLeaseSecs' +-- +-- * 'tOauthToken' +-- +-- * 'tGroupByTag' +-- +-- * 'tFields' +-- +-- * 'tAlt' +tasksLease + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> Int32 -- ^ 'numTasks' + -> Int32 -- ^ 'leaseSecs' + -> TasksLease +tasksLease pTTaskqueue_ pTProject_ pTNumTasks_ pTLeaseSecs_ = + TasksLease + { _tTaskqueue = pTTaskqueue_ + , _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tTag = Nothing + , _tProject = pTProject_ + , _tUserIp = Nothing + , _tNumTasks = pTNumTasks_ + , _tKey = Nothing + , _tLeaseSecs = pTLeaseSecs_ + , _tOauthToken = Nothing + , _tGroupByTag = Nothing + , _tFields = Nothing + , _tAlt = "json" + } + +-- | The taskqueue to lease a task from. +tTaskqueue :: Lens' TasksLease' Text +tTaskqueue + = lens _tTaskqueue (\ s a -> s{_tTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TasksLease' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TasksLease' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | The tag allowed for tasks in the response. Must only be specified if +-- group_by_tag is true. If group_by_tag is true and tag is not specified +-- the tag will be that of the oldest task by eta, i.e. the first available +-- tag +tTag :: Lens' TasksLease' (Maybe Text) +tTag = lens _tTag (\ s a -> s{_tTag = a}) + +-- | The project under which the queue lies. +tProject :: Lens' TasksLease' Text +tProject = lens _tProject (\ s a -> s{_tProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TasksLease' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | The number of tasks to lease. +tNumTasks :: Lens' TasksLease' Int32 +tNumTasks + = lens _tNumTasks (\ s a -> s{_tNumTasks = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TasksLease' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | The lease in seconds. +tLeaseSecs :: Lens' TasksLease' Int32 +tLeaseSecs + = lens _tLeaseSecs (\ s a -> s{_tLeaseSecs = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TasksLease' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | When true, all returned tasks will have the same tag +tGroupByTag :: Lens' TasksLease' (Maybe Bool) +tGroupByTag + = lens _tGroupByTag (\ s a -> s{_tGroupByTag = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TasksLease' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TasksLease' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TasksLease' where + type Rs TasksLease' = Tasks + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksLease{..} + = go _tTaskqueue _tQuotaUser _tPrettyPrint _tTag + _tProject + _tUserIp + (Just _tNumTasks) + _tKey + (Just _tLeaseSecs) + _tOauthToken + _tGroupByTag + _tFields + _tAlt + where go + = clientWithRoute (Proxy :: Proxy TasksLeaseAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/List.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/List.hs new file mode 100644 index 000000000..88a1cace6 --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List Tasks in a TaskQueue +-- +-- /See:/ for @TaskqueueTasksList@. +module Taskqueue.Tasks.List + ( + -- * REST Resource + TasksListAPI + + -- * Creating a Request + , tasksList + , TasksList + + -- * Request Lenses + , tlTaskqueue + , tlQuotaUser + , tlPrettyPrint + , tlProject + , tlUserIp + , tlKey + , tlOauthToken + , tlFields + , tlAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksList@ which the +-- 'TasksList' request conforms to. +type TasksListAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> Get '[JSON] Tasks2 + +-- | List Tasks in a TaskQueue +-- +-- /See:/ 'tasksList' smart constructor. +data TasksList = TasksList + { _tlTaskqueue :: !Text + , _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlProject :: !Text + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlTaskqueue' +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlProject' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlOauthToken' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +tasksList + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> TasksList +tasksList pTlTaskqueue_ pTlProject_ = + TasksList + { _tlTaskqueue = pTlTaskqueue_ + , _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlProject = pTlProject_ + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlOauthToken = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | The id of the taskqueue to list tasks from. +tlTaskqueue :: Lens' TasksList' Text +tlTaskqueue + = lens _tlTaskqueue (\ s a -> s{_tlTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TasksList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TasksList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | The project under which the queue lies. +tlProject :: Lens' TasksList' Text +tlProject + = lens _tlProject (\ s a -> s{_tlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TasksList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TasksList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TasksList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TasksList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TasksList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TasksList' where + type Rs TasksList' = Tasks2 + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksList{..} + = go _tlTaskqueue _tlQuotaUser _tlPrettyPrint + _tlProject + _tlUserIp + _tlKey + _tlOauthToken + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TasksListAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Patch.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Patch.hs new file mode 100644 index 000000000..3b664b5eb --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Patch.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update tasks that are leased out of a TaskQueue. This method supports +-- patch semantics. +-- +-- /See:/ for @TaskqueueTasksPatch@. +module Taskqueue.Tasks.Patch + ( + -- * REST Resource + TasksPatchAPI + + -- * Creating a Request + , tasksPatch + , TasksPatch + + -- * Request Lenses + , tpTaskqueue + , tpQuotaUser + , tpPrettyPrint + , tpProject + , tpUserIp + , tpKey + , tpTask + , tpOauthToken + , tpNewLeaseSeconds + , tpFields + , tpAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksPatch@ which the +-- 'TasksPatch' request conforms to. +type TasksPatchAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> + Capture "task" Text :> + QueryParam "newLeaseSeconds" Int32 :> + Patch '[JSON] Task + +-- | Update tasks that are leased out of a TaskQueue. This method supports +-- patch semantics. +-- +-- /See:/ 'tasksPatch' smart constructor. +data TasksPatch = TasksPatch + { _tpTaskqueue :: !Text + , _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpProject :: !Text + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpTask :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpNewLeaseSeconds :: !Int32 + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpTaskqueue' +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpProject' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpTask' +-- +-- * 'tpOauthToken' +-- +-- * 'tpNewLeaseSeconds' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +tasksPatch + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> Text -- ^ 'task' + -> Int32 -- ^ 'newLeaseSeconds' + -> TasksPatch +tasksPatch pTpTaskqueue_ pTpProject_ pTpTask_ pTpNewLeaseSeconds_ = + TasksPatch + { _tpTaskqueue = pTpTaskqueue_ + , _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpProject = pTpProject_ + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpTask = pTpTask_ + , _tpOauthToken = Nothing + , _tpNewLeaseSeconds = pTpNewLeaseSeconds_ + , _tpFields = Nothing + , _tpAlt = "json" + } + +tpTaskqueue :: Lens' TasksPatch' Text +tpTaskqueue + = lens _tpTaskqueue (\ s a -> s{_tpTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TasksPatch' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TasksPatch' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | The project under which the queue lies. +tpProject :: Lens' TasksPatch' Text +tpProject + = lens _tpProject (\ s a -> s{_tpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TasksPatch' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TasksPatch' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +tpTask :: Lens' TasksPatch' Text +tpTask = lens _tpTask (\ s a -> s{_tpTask = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TasksPatch' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | The new lease in seconds. +tpNewLeaseSeconds :: Lens' TasksPatch' Int32 +tpNewLeaseSeconds + = lens _tpNewLeaseSeconds + (\ s a -> s{_tpNewLeaseSeconds = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TasksPatch' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TasksPatch' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TasksPatch' where + type Rs TasksPatch' = Task + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksPatch{..} + = go _tpTaskqueue _tpQuotaUser _tpPrettyPrint + _tpProject + _tpUserIp + _tpKey + _tpTask + _tpOauthToken + (Just _tpNewLeaseSeconds) + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TasksPatchAPI) r u diff --git a/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Update.hs b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Update.hs new file mode 100644 index 000000000..f0d8710fa --- /dev/null +++ b/gogol-appengine-taskqueue/gen/Network/Google/Resource/Taskqueue/Tasks/Update.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Taskqueue.Tasks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update tasks that are leased out of a TaskQueue. +-- +-- /See:/ for @TaskqueueTasksUpdate@. +module Taskqueue.Tasks.Update + ( + -- * REST Resource + TasksUpdateAPI + + -- * Creating a Request + , tasksUpdate + , TasksUpdate + + -- * Request Lenses + , tuTaskqueue + , tuQuotaUser + , tuPrettyPrint + , tuProject + , tuUserIp + , tuKey + , tuTask + , tuOauthToken + , tuNewLeaseSeconds + , tuFields + , tuAlt + ) where + +import Network.Google.AppEngineTaskQueue.Types +import Network.Google.Prelude + +-- | A resource alias for @TaskqueueTasksUpdate@ which the +-- 'TasksUpdate' request conforms to. +type TasksUpdateAPI = + Capture "project" Text :> + "taskqueues" :> + Capture "taskqueue" Text :> + "tasks" :> + Capture "task" Text :> + QueryParam "newLeaseSeconds" Int32 :> + Post '[JSON] Task + +-- | Update tasks that are leased out of a TaskQueue. +-- +-- /See:/ 'tasksUpdate' smart constructor. +data TasksUpdate = TasksUpdate + { _tuTaskqueue :: !Text + , _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuProject :: !Text + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuTask :: !Text + , _tuOauthToken :: !(Maybe Text) + , _tuNewLeaseSeconds :: !Int32 + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuTaskqueue' +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuProject' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuTask' +-- +-- * 'tuOauthToken' +-- +-- * 'tuNewLeaseSeconds' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +tasksUpdate + :: Text -- ^ 'taskqueue' + -> Text -- ^ 'project' + -> Text -- ^ 'task' + -> Int32 -- ^ 'newLeaseSeconds' + -> TasksUpdate +tasksUpdate pTuTaskqueue_ pTuProject_ pTuTask_ pTuNewLeaseSeconds_ = + TasksUpdate + { _tuTaskqueue = pTuTaskqueue_ + , _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuProject = pTuProject_ + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuTask = pTuTask_ + , _tuOauthToken = Nothing + , _tuNewLeaseSeconds = pTuNewLeaseSeconds_ + , _tuFields = Nothing + , _tuAlt = "json" + } + +tuTaskqueue :: Lens' TasksUpdate' Text +tuTaskqueue + = lens _tuTaskqueue (\ s a -> s{_tuTaskqueue = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TasksUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TasksUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | The project under which the queue lies. +tuProject :: Lens' TasksUpdate' Text +tuProject + = lens _tuProject (\ s a -> s{_tuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TasksUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TasksUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +tuTask :: Lens' TasksUpdate' Text +tuTask = lens _tuTask (\ s a -> s{_tuTask = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TasksUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | The new lease in seconds. +tuNewLeaseSeconds :: Lens' TasksUpdate' Int32 +tuNewLeaseSeconds + = lens _tuNewLeaseSeconds + (\ s a -> s{_tuNewLeaseSeconds = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TasksUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TasksUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TasksUpdate' where + type Rs TasksUpdate' = Task + request + = requestWithRoute defReq appEngineTaskQueueURL + requestWithRoute r u TasksUpdate{..} + = go _tuTaskqueue _tuQuotaUser _tuPrettyPrint + _tuProject + _tuUserIp + _tuKey + _tuTask + _tuOauthToken + (Just _tuNewLeaseSeconds) + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TasksUpdateAPI) r u diff --git a/gogol-appengine-taskqueue/gogol-appengine-taskqueue.cabal b/gogol-appengine-taskqueue/gogol-appengine-taskqueue.cabal new file mode 100644 index 000000000..0306d8775 --- /dev/null +++ b/gogol-appengine-taskqueue/gogol-appengine-taskqueue.cabal @@ -0,0 +1,50 @@ +name: gogol-appengine-taskqueue +version: 0.0.1 +synopsis: TaskQueue API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you access a Google App Engine Pull Task Queue over REST. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppEngineTaskQueue + , Network.Google.AppEngineTaskQueue.Types + , Network.Google.Resource.Taskqueue.Taskqueues.Get + , Network.Google.Resource.Taskqueue.Tasks.Delete + , Network.Google.Resource.Taskqueue.Tasks.Get + , Network.Google.Resource.Taskqueue.Tasks.Insert + , Network.Google.Resource.Taskqueue.Tasks.Lease + , Network.Google.Resource.Taskqueue.Tasks.List + , Network.Google.Resource.Taskqueue.Tasks.Patch + , Network.Google.Resource.Taskqueue.Tasks.Update + + other-modules: + Network.Google.AppEngineTaskQueue.Types.Product + , Network.Google.AppEngineTaskQueue.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-appengine-taskqueue/src/.gitkeep b/gogol-appengine-taskqueue/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-appengine/LICENSE b/gogol-appengine/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-appengine/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-appengine/Makefile b/gogol-appengine/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-appengine/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-appengine/README.md b/gogol-appengine/README.md new file mode 100644 index 000000000..228fec6ff --- /dev/null +++ b/gogol-appengine/README.md @@ -0,0 +1,28 @@ +# gogol-appengine + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google App Engine Admin API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-appengine` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-appengine/Setup.hs b/gogol-appengine/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-appengine/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-appengine/gen/Network/Google/AppEngine.hs b/gogol-appengine/gen/Network/Google/AppEngine.hs new file mode 100644 index 000000000..d34667d7f --- /dev/null +++ b/gogol-appengine/gen/Network/Google/AppEngine.hs @@ -0,0 +1,336 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppEngine +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google App Engine Admin API enables developers to provision and +-- manage their App Engine applications. +-- +-- /See:/ +module Network.Google.AppEngine + ( + -- * API + AppEngineAPI + , appEngineAPI + , appEngineURL + + -- * Service Methods + + -- * REST Resources + + -- ** AppengineAppsGet + , module AppEngine.Apps.Get + + -- ** AppengineAppsModulesDelete + , module AppEngine.Apps.Modules.Delete + + -- ** AppengineAppsModulesGet + , module AppEngine.Apps.Modules.Get + + -- ** AppengineAppsModulesList + , module AppEngine.Apps.Modules.List + + -- ** AppengineAppsModulesPatch + , module AppEngine.Apps.Modules.Patch + + -- ** AppengineAppsModulesVersionsCreate + , module AppEngine.Apps.Modules.Versions.Create + + -- ** AppengineAppsModulesVersionsDelete + , module AppEngine.Apps.Modules.Versions.Delete + + -- ** AppengineAppsModulesVersionsGet + , module AppEngine.Apps.Modules.Versions.Get + + -- ** AppengineAppsModulesVersionsList + , module AppEngine.Apps.Modules.Versions.List + + -- ** AppengineAppsOperationsGet + , module AppEngine.Apps.Operations.Get + + -- ** AppengineAppsOperationsList + , module AppEngine.Apps.Operations.List + + -- * Types + + -- ** Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- ** Library + , Library + , library + , lName + , lVersion + + -- ** ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorNextPageToken + , lorOperations + + -- ** TrafficSplit + , TrafficSplit + , trafficSplit + , tsShardBy + , tsAllocations + + -- ** ScriptHandler + , ScriptHandler + , scriptHandler + , shScriptPath + + -- ** URLMap + , URLMap + , uRLMap + , umScript + , umSecurityLevel + , umApiEndpoint + , umUrlRegex + , umRedirectHttpResponseCode + , umAuthFailAction + , umStaticFiles + , umLogin + , umStaticDirectory + + -- ** APIConfigHandler + , APIConfigHandler + , aPIConfigHandler + , achScript + , achSecurityLevel + , achUrl + , achAuthFailAction + , achLogin + + -- ** Application + , Application + , application + , aLocation + , aCodeBucket + , aName + , aDispatchRules + , aId + + -- ** HealthCheck + , HealthCheck + , healthCheck + , hcHealthyThreshold + , hcDisableHealthCheck + , hcCheckInterval + , hcRestartThreshold + , hcHost + , hcTimeout + , hcUnhealthyThreshold + + -- ** URLDispatchRule + , URLDispatchRule + , uRLDispatchRule + , udrPath + , udrDomain + , udrModule + + -- ** Operation + , Operation + , operation + , oDone + , oError + , oResponse + , oName + , oMetadata + + -- ** ListVersionsResponse + , ListVersionsResponse + , listVersionsResponse + , lvrNextPageToken + , lvrVersions + + -- ** ListModulesResponse + , ListModulesResponse + , listModulesResponse + , lmrNextPageToken + , lmrModules + + -- ** FileInfo + , FileInfo + , fileInfo + , fiSha1Sum + , fiMimeType + , fiSourceUrl + + -- ** AutomaticScaling + , AutomaticScaling + , automaticScaling + , asMaxTotalInstances + , asMinIdleInstances + , asMinPendingLatency + , asCpuUtilization + , asMaxIdleInstances + , asMinTotalInstances + , asMaxConcurrentRequests + , asCoolDownPeriod + , asMaxPendingLatency + + -- ** APIEndpointHandler + , APIEndpointHandler + , aPIEndpointHandler + , aehScriptPath + + -- ** Network + , Network + , network + , nForwardedPorts + , nInstanceTag + , nName + + -- ** Resources + , Resources + , resources + , rMemoryGb + , rDiskGb + , rCpu + + -- ** CPUUtilization + , CPUUtilization + , cPUUtilization + , cuAggregationWindowLength + , cuTargetUtilization + + -- ** ManualScaling + , ManualScaling + , manualScaling + , msInstances + + -- ** BasicScaling + , BasicScaling + , basicScaling + , bsMaxInstances + , bsIdleTimeout + + -- ** Version + , Version + , version + , vCreationTime + , vRuntime + , vDeployer + , vNobuildFilesRegex + , vInstanceClass + , vHealthCheck + , vEnv + , vDefaultExpiration + , vAutomaticScaling + , vErrorHandlers + , vVm + , vHandlers + , vInboundServices + , vNetwork + , vResources + , vName + , vThreadsafe + , vBetaSettings + , vBasicScaling + , vManualScaling + , vApiConfig + , vId + , vEnvVariables + , vServingStatus + , vLibraries + , vDeployment + + -- ** Module + , Module + , module' + , mSplit + , mName + , mId + + -- ** StaticFilesHandler + , StaticFilesHandler + , staticFilesHandler + , sfhHttpHeaders + , sfhPath + , sfhRequireMatchingFile + , sfhExpiration + , sfhMimeType + , sfhApplicationReadable + , sfhUploadPathRegex + + -- ** ErrorHandler + , ErrorHandler + , errorHandler + , ehMimeType + , ehErrorCode + , ehStaticFile + + -- ** OperationMetadata + , OperationMetadata + , operationMetadata + , omInsertTime + , omUser + , omMethod + , omEndTime + , omOperationType + , omTarget + + -- ** SourceReference + , SourceReference + , sourceReference + , srRepository + , srRevisionId + + -- ** ContainerInfo + , ContainerInfo + , containerInfo + , ciImage + + -- ** Deployment + , Deployment + , deployment + , dContainer + , dFiles + , dSourceReferences + + -- ** StaticDirectoryHandler + , StaticDirectoryHandler + , staticDirectoryHandler + , sdhHttpHeaders + , sdhRequireMatchingFile + , sdhExpiration + , sdhMimeType + , sdhApplicationReadable + , sdhDirectory + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude +import Network.Google.Resource.AppEngine.Apps.Get +import Network.Google.Resource.AppEngine.Apps.Modules.Delete +import Network.Google.Resource.AppEngine.Apps.Modules.Get +import Network.Google.Resource.AppEngine.Apps.Modules.List +import Network.Google.Resource.AppEngine.Apps.Modules.Patch +import Network.Google.Resource.AppEngine.Apps.Modules.Versions.Create +import Network.Google.Resource.AppEngine.Apps.Modules.Versions.Delete +import Network.Google.Resource.AppEngine.Apps.Modules.Versions.Get +import Network.Google.Resource.AppEngine.Apps.Modules.Versions.List +import Network.Google.Resource.AppEngine.Apps.Operations.Get +import Network.Google.Resource.AppEngine.Apps.Operations.List + +{- $resources +TODO +-} + +type AppEngineAPI = Apps + +appEngineAPI :: Proxy AppEngineAPI +appEngineAPI = Proxy diff --git a/gogol-appengine/gen/Network/Google/AppEngine/Types.hs b/gogol-appengine/gen/Network/Google/AppEngine/Types.hs new file mode 100644 index 000000000..3efd30b51 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/AppEngine/Types.hs @@ -0,0 +1,278 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngine.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngine.Types + ( + -- * Service URL + appEngineURL + + -- * Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- * Library + , Library + , library + , lName + , lVersion + + -- * ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorNextPageToken + , lorOperations + + -- * TrafficSplit + , TrafficSplit + , trafficSplit + , tsShardBy + , tsAllocations + + -- * ScriptHandler + , ScriptHandler + , scriptHandler + , shScriptPath + + -- * URLMap + , URLMap + , uRLMap + , umScript + , umSecurityLevel + , umApiEndpoint + , umUrlRegex + , umRedirectHttpResponseCode + , umAuthFailAction + , umStaticFiles + , umLogin + , umStaticDirectory + + -- * APIConfigHandler + , APIConfigHandler + , aPIConfigHandler + , achScript + , achSecurityLevel + , achUrl + , achAuthFailAction + , achLogin + + -- * Application + , Application + , application + , aLocation + , aCodeBucket + , aName + , aDispatchRules + , aId + + -- * HealthCheck + , HealthCheck + , healthCheck + , hcHealthyThreshold + , hcDisableHealthCheck + , hcCheckInterval + , hcRestartThreshold + , hcHost + , hcTimeout + , hcUnhealthyThreshold + + -- * URLDispatchRule + , URLDispatchRule + , uRLDispatchRule + , udrPath + , udrDomain + , udrModule + + -- * Operation + , Operation + , operation + , oDone + , oError + , oResponse + , oName + , oMetadata + + -- * ListVersionsResponse + , ListVersionsResponse + , listVersionsResponse + , lvrNextPageToken + , lvrVersions + + -- * ListModulesResponse + , ListModulesResponse + , listModulesResponse + , lmrNextPageToken + , lmrModules + + -- * FileInfo + , FileInfo + , fileInfo + , fiSha1Sum + , fiMimeType + , fiSourceUrl + + -- * AutomaticScaling + , AutomaticScaling + , automaticScaling + , asMaxTotalInstances + , asMinIdleInstances + , asMinPendingLatency + , asCpuUtilization + , asMaxIdleInstances + , asMinTotalInstances + , asMaxConcurrentRequests + , asCoolDownPeriod + , asMaxPendingLatency + + -- * APIEndpointHandler + , APIEndpointHandler + , aPIEndpointHandler + , aehScriptPath + + -- * Network + , Network + , network + , nForwardedPorts + , nInstanceTag + , nName + + -- * Resources + , Resources + , resources + , rMemoryGb + , rDiskGb + , rCpu + + -- * CPUUtilization + , CPUUtilization + , cPUUtilization + , cuAggregationWindowLength + , cuTargetUtilization + + -- * ManualScaling + , ManualScaling + , manualScaling + , msInstances + + -- * BasicScaling + , BasicScaling + , basicScaling + , bsMaxInstances + , bsIdleTimeout + + -- * Version + , Version + , version + , vCreationTime + , vRuntime + , vDeployer + , vNobuildFilesRegex + , vInstanceClass + , vHealthCheck + , vEnv + , vDefaultExpiration + , vAutomaticScaling + , vErrorHandlers + , vVm + , vHandlers + , vInboundServices + , vNetwork + , vResources + , vName + , vThreadsafe + , vBetaSettings + , vBasicScaling + , vManualScaling + , vApiConfig + , vId + , vEnvVariables + , vServingStatus + , vLibraries + , vDeployment + + -- * Module + , Module + , module' + , mSplit + , mName + , mId + + -- * StaticFilesHandler + , StaticFilesHandler + , staticFilesHandler + , sfhHttpHeaders + , sfhPath + , sfhRequireMatchingFile + , sfhExpiration + , sfhMimeType + , sfhApplicationReadable + , sfhUploadPathRegex + + -- * ErrorHandler + , ErrorHandler + , errorHandler + , ehMimeType + , ehErrorCode + , ehStaticFile + + -- * OperationMetadata + , OperationMetadata + , operationMetadata + , omInsertTime + , omUser + , omMethod + , omEndTime + , omOperationType + , omTarget + + -- * SourceReference + , SourceReference + , sourceReference + , srRepository + , srRevisionId + + -- * ContainerInfo + , ContainerInfo + , containerInfo + , ciImage + + -- * Deployment + , Deployment + , deployment + , dContainer + , dFiles + , dSourceReferences + + -- * StaticDirectoryHandler + , StaticDirectoryHandler + , staticDirectoryHandler + , sdhHttpHeaders + , sdhRequireMatchingFile + , sdhExpiration + , sdhMimeType + , sdhApplicationReadable + , sdhDirectory + ) where + +import Network.Google.AppEngine.Types.Product +import Network.Google.AppEngine.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta4' of the Google App Engine Admin API. +appEngineURL :: BaseURL +appEngineURL + = BaseUrl Https "https://appengine.googleapis.com/" + 443 diff --git a/gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs b/gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs new file mode 100644 index 000000000..75962e098 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs @@ -0,0 +1,2455 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngine.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngine.Types.Product where + +import Network.Google.AppEngine.Types.Sum +import Network.Google.Prelude + +-- | The \`Status\` type defines a logical error model that is suitable for +-- different programming environments, including REST APIs and RPC APIs. It +-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is +-- designed to be: - Simple to use and understand for most users - Flexible +-- enough to meet unexpected needs # Overview The \`Status\` message +-- contains three pieces of data: error code, error message, and error +-- details. The error code should be an enum value of +-- [google.rpc.Code][google.rpc.Code], but it may accept additional error +-- codes if needed. The error message should be a developer-facing English +-- message that helps developers *understand* and *resolve* the error. If a +-- localized user-facing error message is needed, put the localized message +-- in the error details or localize it in the client. The optional error +-- details may contain arbitrary information about the error. There is a +-- predefined set of error detail types in the package \`google.rpc\` which +-- can be used for common error conditions. # Language mapping The +-- \`Status\` message is the logical representation of the error model, but +-- it is not necessarily the actual wire format. When the \`Status\` +-- message is exposed in different client libraries and different wire +-- protocols, it can be mapped differently. For example, it will likely be +-- mapped to some exceptions in Java, but more likely mapped to some error +-- codes in C. # Other uses The error model and the \`Status\` message can +-- be used in a variety of environments, either with or without APIs, to +-- provide a consistent developer experience across different environments. +-- Example uses of this error model include: - Partial errors. If a service +-- needs to return partial errors to the client, it may embed the +-- \`Status\` in the normal response to indicate the partial errors. - +-- Workflow errors. A typical workflow has multiple steps. Each step may +-- have a \`Status\` message for error reporting purpose. - Batch +-- operations. If a client uses batch request and batch response, the +-- \`Status\` message should be used directly inside batch response, one +-- for each error sub-response. - Asynchronous operations. If an API call +-- embeds asynchronous operation results in its response, the status of +-- those operations should be represented directly using the \`Status\` +-- message. - Logging. If some API errors are stored in logs, the message +-- \`Status\` could be used directly after any stripping needed for +-- security\/privacy reasons. +-- +-- /See:/ 'status' smart constructor. +data Status = Status + { _sDetails :: !(Maybe [StatusDetailsItem]) + , _sCode :: !(Maybe Int32) + , _sMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Status' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sDetails' +-- +-- * 'sCode' +-- +-- * 'sMessage' +status + :: Status +status = + Status + { _sDetails = Nothing + , _sCode = Nothing + , _sMessage = Nothing + } + +-- | A list of messages that carry the error details. There will be a common +-- set of message types for APIs to use. +sDetails :: Lens' Status [StatusDetailsItem] +sDetails + = lens _sDetails (\ s a -> s{_sDetails = a}) . + _Default + . _Coerce + +-- | The status code, which should be an enum value of +-- [google.rpc.Code][google.rpc.Code]. +sCode :: Lens' Status (Maybe Int32) +sCode = lens _sCode (\ s a -> s{_sCode = a}) + +-- | A developer-facing error message, which should be in English. Any +-- user-facing error message should be localized and sent in the +-- [google.rpc.Status.details][google.rpc.Status.details] field, or +-- localized by the client. +sMessage :: Lens' Status (Maybe Text) +sMessage = lens _sMessage (\ s a -> s{_sMessage = a}) + +instance FromJSON Status where + parseJSON + = withObject "Status" + (\ o -> + Status <$> + (o .:? "details" .!= mempty) <*> (o .:? "code") <*> + (o .:? "message")) + +instance ToJSON Status where + toJSON Status{..} + = object + (catMaybes + [("details" .=) <$> _sDetails, + ("code" .=) <$> _sCode, + ("message" .=) <$> _sMessage]) + +-- | A Python runtime third-party library required by the application. +-- +-- /See:/ 'library' smart constructor. +data Library = Library + { _lName :: !(Maybe Text) + , _lVersion :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Library' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lName' +-- +-- * 'lVersion' +library + :: Library +library = + Library + { _lName = Nothing + , _lVersion = Nothing + } + +-- | The name of the library, e.g. \"PIL\" or \"django\". +lName :: Lens' Library (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | The version of the library to select, or \"latest\". +lVersion :: Lens' Library (Maybe Text) +lVersion = lens _lVersion (\ s a -> s{_lVersion = a}) + +instance FromJSON Library where + parseJSON + = withObject "Library" + (\ o -> + Library <$> (o .:? "name") <*> (o .:? "version")) + +instance ToJSON Library where + toJSON Library{..} + = object + (catMaybes + [("name" .=) <$> _lName, + ("version" .=) <$> _lVersion]) + +-- | The response message for +-- [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +-- +-- /See:/ 'listOperationsResponse' smart constructor. +data ListOperationsResponse = ListOperationsResponse + { _lorNextPageToken :: !(Maybe Text) + , _lorOperations :: !(Maybe [Maybe Operation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorNextPageToken' +-- +-- * 'lorOperations' +listOperationsResponse + :: ListOperationsResponse +listOperationsResponse = + ListOperationsResponse + { _lorNextPageToken = Nothing + , _lorOperations = Nothing + } + +-- | The standard List next-page token. +lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text) +lorNextPageToken + = lens _lorNextPageToken + (\ s a -> s{_lorNextPageToken = a}) + +-- | A list of operations that matches the specified filter in the request. +lorOperations :: Lens' ListOperationsResponse [Maybe Operation] +lorOperations + = lens _lorOperations + (\ s a -> s{_lorOperations = a}) + . _Default + . _Coerce + +instance FromJSON ListOperationsResponse where + parseJSON + = withObject "ListOperationsResponse" + (\ o -> + ListOperationsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "operations" .!= mempty)) + +instance ToJSON ListOperationsResponse where + toJSON ListOperationsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lorNextPageToken, + ("operations" .=) <$> _lorOperations]) + +-- | Configuration for traffic splitting for versions within a single module. +-- Traffic splitting allows traffic directed to the module to be assigned +-- to one of several versions in a fractional way, enabling experiments and +-- canarying new builds, for example. +-- +-- /See:/ 'trafficSplit' smart constructor. +data TrafficSplit = TrafficSplit + { _tsShardBy :: !(Maybe Text) + , _tsAllocations :: !(Maybe TrafficSplitAllocations) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrafficSplit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsShardBy' +-- +-- * 'tsAllocations' +trafficSplit + :: TrafficSplit +trafficSplit = + TrafficSplit + { _tsShardBy = Nothing + , _tsAllocations = Nothing + } + +-- | Which mechanism should be used as a selector when choosing a version to +-- send a request to. The traffic selection algorithm will be stable for +-- either type until allocations are changed. +tsShardBy :: Lens' TrafficSplit (Maybe Text) +tsShardBy + = lens _tsShardBy (\ s a -> s{_tsShardBy = a}) + +-- | Mapping from module version IDs within the module to fractional (0.000, +-- 1] allocations of traffic for that version. Each version may only be +-- specified once, but some versions in the module may not have any traffic +-- allocation. Modules that have traffic allocated in this field may not be +-- deleted until the module is deleted, or their traffic allocation is +-- removed. Allocations must sum to 1. Supports precision up to two decimal +-- places for IP-based splits and up to three decimal places for +-- cookie-based splits. +tsAllocations :: Lens' TrafficSplit (Maybe TrafficSplitAllocations) +tsAllocations + = lens _tsAllocations + (\ s a -> s{_tsAllocations = a}) + +instance FromJSON TrafficSplit where + parseJSON + = withObject "TrafficSplit" + (\ o -> + TrafficSplit <$> + (o .:? "shardBy") <*> (o .:? "allocations")) + +instance ToJSON TrafficSplit where + toJSON TrafficSplit{..} + = object + (catMaybes + [("shardBy" .=) <$> _tsShardBy, + ("allocations" .=) <$> _tsAllocations]) + +-- | Executes a script to handle the request that matches the URL pattern. +-- +-- /See:/ 'scriptHandler' smart constructor. +newtype ScriptHandler = ScriptHandler + { _shScriptPath :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScriptHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'shScriptPath' +scriptHandler + :: ScriptHandler +scriptHandler = + ScriptHandler + { _shScriptPath = Nothing + } + +-- | Specifies the path to the script from the application root directory. +shScriptPath :: Lens' ScriptHandler (Maybe Text) +shScriptPath + = lens _shScriptPath (\ s a -> s{_shScriptPath = a}) + +instance FromJSON ScriptHandler where + parseJSON + = withObject "ScriptHandler" + (\ o -> ScriptHandler <$> (o .:? "scriptPath")) + +instance ToJSON ScriptHandler where + toJSON ScriptHandler{..} + = object + (catMaybes [("scriptPath" .=) <$> _shScriptPath]) + +-- | A URL pattern and description of how it should be handled. App Engine +-- can handle URLs by executing application code, or by serving static +-- files uploaded with the code, such as images, CSS or JavaScript. +-- +-- /See:/ 'uRLMap' smart constructor. +data URLMap = URLMap + { _umScript :: !(Maybe (Maybe ScriptHandler)) + , _umSecurityLevel :: !(Maybe Text) + , _umApiEndpoint :: !(Maybe (Maybe APIEndpointHandler)) + , _umUrlRegex :: !(Maybe Text) + , _umRedirectHttpResponseCode :: !(Maybe Text) + , _umAuthFailAction :: !(Maybe Text) + , _umStaticFiles :: !(Maybe (Maybe StaticFilesHandler)) + , _umLogin :: !(Maybe Text) + , _umStaticDirectory :: !(Maybe (Maybe StaticDirectoryHandler)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umScript' +-- +-- * 'umSecurityLevel' +-- +-- * 'umApiEndpoint' +-- +-- * 'umUrlRegex' +-- +-- * 'umRedirectHttpResponseCode' +-- +-- * 'umAuthFailAction' +-- +-- * 'umStaticFiles' +-- +-- * 'umLogin' +-- +-- * 'umStaticDirectory' +uRLMap + :: URLMap +uRLMap = + URLMap + { _umScript = Nothing + , _umSecurityLevel = Nothing + , _umApiEndpoint = Nothing + , _umUrlRegex = Nothing + , _umRedirectHttpResponseCode = Nothing + , _umAuthFailAction = Nothing + , _umStaticFiles = Nothing + , _umLogin = Nothing + , _umStaticDirectory = Nothing + } + +-- | Executes a script to handle the request that matches the URL pattern. +umScript :: Lens' URLMap (Maybe (Maybe ScriptHandler)) +umScript = lens _umScript (\ s a -> s{_umScript = a}) + +-- | Configures whether security (HTTPS) should be enforced for this URL. +umSecurityLevel :: Lens' URLMap (Maybe Text) +umSecurityLevel + = lens _umSecurityLevel + (\ s a -> s{_umSecurityLevel = a}) + +-- | Use API Endpoints to handle requests. +umApiEndpoint :: Lens' URLMap (Maybe (Maybe APIEndpointHandler)) +umApiEndpoint + = lens _umApiEndpoint + (\ s a -> s{_umApiEndpoint = a}) + +-- | A URL prefix. This value uses regular expression syntax (and so regexp +-- special characters must be escaped), but it should not contain +-- groupings. All URLs that begin with this prefix are handled by this +-- handler, using the portion of the URL after the prefix as part of the +-- file path. This is always required. +umUrlRegex :: Lens' URLMap (Maybe Text) +umUrlRegex + = lens _umUrlRegex (\ s a -> s{_umUrlRegex = a}) + +-- | \`30x\` code to use when performing redirects for the \`secure\` field. +-- A \`302\` is used by default. +umRedirectHttpResponseCode :: Lens' URLMap (Maybe Text) +umRedirectHttpResponseCode + = lens _umRedirectHttpResponseCode + (\ s a -> s{_umRedirectHttpResponseCode = a}) + +-- | For users not logged in, how to handle access to resources with required +-- login. Defaults to \"redirect\". +umAuthFailAction :: Lens' URLMap (Maybe Text) +umAuthFailAction + = lens _umAuthFailAction + (\ s a -> s{_umAuthFailAction = a}) + +-- | Returns the contents of a file, such as an image, as the response. +umStaticFiles :: Lens' URLMap (Maybe (Maybe StaticFilesHandler)) +umStaticFiles + = lens _umStaticFiles + (\ s a -> s{_umStaticFiles = a}) + +-- | What level of login is required to access this resource. +umLogin :: Lens' URLMap (Maybe Text) +umLogin = lens _umLogin (\ s a -> s{_umLogin = a}) + +-- | Serves the entire contents of a directory as static files. This +-- attribute is deprecated. You can mimic the behavior of static +-- directories using static files. +umStaticDirectory :: Lens' URLMap (Maybe (Maybe StaticDirectoryHandler)) +umStaticDirectory + = lens _umStaticDirectory + (\ s a -> s{_umStaticDirectory = a}) + +instance FromJSON URLMap where + parseJSON + = withObject "URLMap" + (\ o -> + URLMap <$> + (o .:? "script") <*> (o .:? "securityLevel") <*> + (o .:? "apiEndpoint") + <*> (o .:? "urlRegex") + <*> (o .:? "redirectHttpResponseCode") + <*> (o .:? "authFailAction") + <*> (o .:? "staticFiles") + <*> (o .:? "login") + <*> (o .:? "staticDirectory")) + +instance ToJSON URLMap where + toJSON URLMap{..} + = object + (catMaybes + [("script" .=) <$> _umScript, + ("securityLevel" .=) <$> _umSecurityLevel, + ("apiEndpoint" .=) <$> _umApiEndpoint, + ("urlRegex" .=) <$> _umUrlRegex, + ("redirectHttpResponseCode" .=) <$> + _umRedirectHttpResponseCode, + ("authFailAction" .=) <$> _umAuthFailAction, + ("staticFiles" .=) <$> _umStaticFiles, + ("login" .=) <$> _umLogin, + ("staticDirectory" .=) <$> _umStaticDirectory]) + +-- | API Serving configuration for Cloud Endpoints. +-- +-- /See:/ 'aPIConfigHandler' smart constructor. +data APIConfigHandler = APIConfigHandler + { _achScript :: !(Maybe Text) + , _achSecurityLevel :: !(Maybe Text) + , _achUrl :: !(Maybe Text) + , _achAuthFailAction :: !(Maybe Text) + , _achLogin :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIConfigHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'achScript' +-- +-- * 'achSecurityLevel' +-- +-- * 'achUrl' +-- +-- * 'achAuthFailAction' +-- +-- * 'achLogin' +aPIConfigHandler + :: APIConfigHandler +aPIConfigHandler = + APIConfigHandler + { _achScript = Nothing + , _achSecurityLevel = Nothing + , _achUrl = Nothing + , _achAuthFailAction = Nothing + , _achLogin = Nothing + } + +-- | Specifies the path to the script from the application root directory. +achScript :: Lens' APIConfigHandler (Maybe Text) +achScript + = lens _achScript (\ s a -> s{_achScript = a}) + +-- | Configures whether security (HTTPS) should be enforced for this URL. +achSecurityLevel :: Lens' APIConfigHandler (Maybe Text) +achSecurityLevel + = lens _achSecurityLevel + (\ s a -> s{_achSecurityLevel = a}) + +-- | URL to serve the endpoint at. +achUrl :: Lens' APIConfigHandler (Maybe Text) +achUrl = lens _achUrl (\ s a -> s{_achUrl = a}) + +-- | For users not logged in, how to handle access to resources with required +-- login. Defaults to \"redirect\". +achAuthFailAction :: Lens' APIConfigHandler (Maybe Text) +achAuthFailAction + = lens _achAuthFailAction + (\ s a -> s{_achAuthFailAction = a}) + +-- | What level of login is required to access this resource. Default is +-- \"optional\". +achLogin :: Lens' APIConfigHandler (Maybe Text) +achLogin = lens _achLogin (\ s a -> s{_achLogin = a}) + +instance FromJSON APIConfigHandler where + parseJSON + = withObject "APIConfigHandler" + (\ o -> + APIConfigHandler <$> + (o .:? "script") <*> (o .:? "securityLevel") <*> + (o .:? "url") + <*> (o .:? "authFailAction") + <*> (o .:? "login")) + +instance ToJSON APIConfigHandler where + toJSON APIConfigHandler{..} + = object + (catMaybes + [("script" .=) <$> _achScript, + ("securityLevel" .=) <$> _achSecurityLevel, + ("url" .=) <$> _achUrl, + ("authFailAction" .=) <$> _achAuthFailAction, + ("login" .=) <$> _achLogin]) + +-- | An Application contains the top-level configuration of an App Engine +-- application. +-- +-- /See:/ 'application' smart constructor. +data Application = Application + { _aLocation :: !(Maybe Text) + , _aCodeBucket :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aDispatchRules :: !(Maybe [Maybe URLDispatchRule]) + , _aId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Application' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aLocation' +-- +-- * 'aCodeBucket' +-- +-- * 'aName' +-- +-- * 'aDispatchRules' +-- +-- * 'aId' +application + :: Application +application = + Application + { _aLocation = Nothing + , _aCodeBucket = Nothing + , _aName = Nothing + , _aDispatchRules = Nothing + , _aId = Nothing + } + +-- | The location from which the application will be run. Choices are +-- \"us-central\" for United States and \"europe-west\" for European Union. +-- Application instances will run out of data centers in the chosen +-- location and all of the application\'s End User Content will be stored +-- at rest in the chosen location. The default is \"us-central\". +aLocation :: Lens' Application (Maybe Text) +aLocation + = lens _aLocation (\ s a -> s{_aLocation = a}) + +-- | A Google Cloud Storage bucket which can be used for storing files +-- associated with an application. This bucket is associated with the +-- application and can be used by the gcloud deployment commands. +-- \'OutputOnly +aCodeBucket :: Lens' Application (Maybe Text) +aCodeBucket + = lens _aCodeBucket (\ s a -> s{_aCodeBucket = a}) + +-- | The full path to the application in the API. Example: \"apps\/myapp\". +-- \'OutputOnly +aName :: Lens' Application (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | HTTP path dispatch rules for requests to the app that do not explicitly +-- target a module or version. The rules are order-dependent. +aDispatchRules :: Lens' Application [Maybe URLDispatchRule] +aDispatchRules + = lens _aDispatchRules + (\ s a -> s{_aDispatchRules = a}) + . _Default + . _Coerce + +-- | The relative name\/path of the application. Example: \"myapp\". +-- \'OutputOnly +aId :: Lens' Application (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +instance FromJSON Application where + parseJSON + = withObject "Application" + (\ o -> + Application <$> + (o .:? "location") <*> (o .:? "codeBucket") <*> + (o .:? "name") + <*> (o .:? "dispatchRules" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON Application where + toJSON Application{..} + = object + (catMaybes + [("location" .=) <$> _aLocation, + ("codeBucket" .=) <$> _aCodeBucket, + ("name" .=) <$> _aName, + ("dispatchRules" .=) <$> _aDispatchRules, + ("id" .=) <$> _aId]) + +-- | Configure health checking for the VM instances. Unhealthy VM instances +-- will be killed and replaced with new instances. +-- +-- /See:/ 'healthCheck' smart constructor. +data HealthCheck = HealthCheck + { _hcHealthyThreshold :: !(Maybe Word32) + , _hcDisableHealthCheck :: !(Maybe Bool) + , _hcCheckInterval :: !(Maybe Text) + , _hcRestartThreshold :: !(Maybe Word32) + , _hcHost :: !(Maybe Text) + , _hcTimeout :: !(Maybe Text) + , _hcUnhealthyThreshold :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HealthCheck' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hcHealthyThreshold' +-- +-- * 'hcDisableHealthCheck' +-- +-- * 'hcCheckInterval' +-- +-- * 'hcRestartThreshold' +-- +-- * 'hcHost' +-- +-- * 'hcTimeout' +-- +-- * 'hcUnhealthyThreshold' +healthCheck + :: HealthCheck +healthCheck = + HealthCheck + { _hcHealthyThreshold = Nothing + , _hcDisableHealthCheck = Nothing + , _hcCheckInterval = Nothing + , _hcRestartThreshold = Nothing + , _hcHost = Nothing + , _hcTimeout = Nothing + , _hcUnhealthyThreshold = Nothing + } + +-- | The number of consecutive successful health checks before receiving +-- traffic. +hcHealthyThreshold :: Lens' HealthCheck (Maybe Word32) +hcHealthyThreshold + = lens _hcHealthyThreshold + (\ s a -> s{_hcHealthyThreshold = a}) + +-- | Whether to explicitly disable health checks for this instance. +hcDisableHealthCheck :: Lens' HealthCheck (Maybe Bool) +hcDisableHealthCheck + = lens _hcDisableHealthCheck + (\ s a -> s{_hcDisableHealthCheck = a}) + +-- | The interval between health checks. +hcCheckInterval :: Lens' HealthCheck (Maybe Text) +hcCheckInterval + = lens _hcCheckInterval + (\ s a -> s{_hcCheckInterval = a}) + +-- | The number of consecutive failed health checks before an instance is +-- restarted. +hcRestartThreshold :: Lens' HealthCheck (Maybe Word32) +hcRestartThreshold + = lens _hcRestartThreshold + (\ s a -> s{_hcRestartThreshold = a}) + +-- | The host header to send when performing an HTTP health check (e.g. +-- myapp.appspot.com) +hcHost :: Lens' HealthCheck (Maybe Text) +hcHost = lens _hcHost (\ s a -> s{_hcHost = a}) + +-- | The amount of time before the health check is considered failed. +hcTimeout :: Lens' HealthCheck (Maybe Text) +hcTimeout + = lens _hcTimeout (\ s a -> s{_hcTimeout = a}) + +-- | The number of consecutive failed health checks before removing traffic. +hcUnhealthyThreshold :: Lens' HealthCheck (Maybe Word32) +hcUnhealthyThreshold + = lens _hcUnhealthyThreshold + (\ s a -> s{_hcUnhealthyThreshold = a}) + +instance FromJSON HealthCheck where + parseJSON + = withObject "HealthCheck" + (\ o -> + HealthCheck <$> + (o .:? "healthyThreshold") <*> + (o .:? "disableHealthCheck") + <*> (o .:? "checkInterval") + <*> (o .:? "restartThreshold") + <*> (o .:? "host") + <*> (o .:? "timeout") + <*> (o .:? "unhealthyThreshold")) + +instance ToJSON HealthCheck where + toJSON HealthCheck{..} + = object + (catMaybes + [("healthyThreshold" .=) <$> _hcHealthyThreshold, + ("disableHealthCheck" .=) <$> _hcDisableHealthCheck, + ("checkInterval" .=) <$> _hcCheckInterval, + ("restartThreshold" .=) <$> _hcRestartThreshold, + ("host" .=) <$> _hcHost, + ("timeout" .=) <$> _hcTimeout, + ("unhealthyThreshold" .=) <$> _hcUnhealthyThreshold]) + +-- | Rules to match an HTTP request and dispatch that request to a module. +-- +-- /See:/ 'uRLDispatchRule' smart constructor. +data URLDispatchRule = URLDispatchRule + { _udrPath :: !(Maybe Text) + , _udrDomain :: !(Maybe Text) + , _udrModule :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLDispatchRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udrPath' +-- +-- * 'udrDomain' +-- +-- * 'udrModule' +uRLDispatchRule + :: URLDispatchRule +uRLDispatchRule = + URLDispatchRule + { _udrPath = Nothing + , _udrDomain = Nothing + , _udrModule = Nothing + } + +-- | The pathname within the host. This must start with a \'\/\'. A single +-- \'*\' (glob) can be included at the end of the path. The sum of the +-- lengths of the domain and path may not exceed 100 characters. +udrPath :: Lens' URLDispatchRule (Maybe Text) +udrPath = lens _udrPath (\ s a -> s{_udrPath = a}) + +-- | The domain name to match on. Supports \'*\' (glob) wildcarding on the +-- left-hand side of a \'.\'. If empty, all domains will be matched (the +-- same as \'*\'). +udrDomain :: Lens' URLDispatchRule (Maybe Text) +udrDomain + = lens _udrDomain (\ s a -> s{_udrDomain = a}) + +-- | The resource id of a Module in this application that should service the +-- matched request. The Module must already exist. Example: \"default\". +udrModule :: Lens' URLDispatchRule (Maybe Text) +udrModule + = lens _udrModule (\ s a -> s{_udrModule = a}) + +instance FromJSON URLDispatchRule where + parseJSON + = withObject "URLDispatchRule" + (\ o -> + URLDispatchRule <$> + (o .:? "path") <*> (o .:? "domain") <*> + (o .:? "module")) + +instance ToJSON URLDispatchRule where + toJSON URLDispatchRule{..} + = object + (catMaybes + [("path" .=) <$> _udrPath, + ("domain" .=) <$> _udrDomain, + ("module" .=) <$> _udrModule]) + +-- | This resource represents a long-running operation that is the result of +-- a network API call. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oDone :: !(Maybe Bool) + , _oError :: !(Maybe (Maybe Status)) + , _oResponse :: !(Maybe OperationResponse) + , _oName :: !(Maybe Text) + , _oMetadata :: !(Maybe OperationMetadata) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oDone' +-- +-- * 'oError' +-- +-- * 'oResponse' +-- +-- * 'oName' +-- +-- * 'oMetadata' +operation + :: Operation +operation = + Operation + { _oDone = Nothing + , _oError = Nothing + , _oResponse = Nothing + , _oName = Nothing + , _oMetadata = Nothing + } + +-- | If the value is \`false\`, it means the operation is still in progress. +-- If true, the operation is completed, and either \`error\` or +-- \`response\` is available. +oDone :: Lens' Operation (Maybe Bool) +oDone = lens _oDone (\ s a -> s{_oDone = a}) + +-- | The error result of the operation in case of failure. +oError :: Lens' Operation (Maybe (Maybe Status)) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | The normal response of the operation in case of success. If the original +-- method returns no data on success, such as \`Delete\`, the response is +-- \`google.protobuf.Empty\`. If the original method is standard +-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource. +-- For other methods, the response should have the type \`XxxResponse\`, +-- where \`Xxx\` is the original method name. For example, if the original +-- method name is \`TakeSnapshot()\`, the inferred response type is +-- \`TakeSnapshotResponse\`. +oResponse :: Lens' Operation (Maybe OperationResponse) +oResponse + = lens _oResponse (\ s a -> s{_oResponse = a}) + +-- | The server-assigned name, which is only unique within the same service +-- that originally returns it. If you use the default HTTP mapping above, +-- the \`name\` should have the format of +-- \`operations\/some\/unique\/name\`. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | Service-specific metadata associated with the operation. It typically +-- contains progress information and common metadata such as create time. +-- Some services might not provide such metadata. Any method that returns a +-- long-running operation should document the metadata type, if any. +oMetadata :: Lens' Operation (Maybe OperationMetadata) +oMetadata + = lens _oMetadata (\ s a -> s{_oMetadata = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "done") <*> (o .:? "error") <*> + (o .:? "response") + <*> (o .:? "name") + <*> (o .:? "metadata")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("done" .=) <$> _oDone, ("error" .=) <$> _oError, + ("response" .=) <$> _oResponse, + ("name" .=) <$> _oName, + ("metadata" .=) <$> _oMetadata]) + +-- | Response message for \`Versions.ListVersions\`. +-- +-- /See:/ 'listVersionsResponse' smart constructor. +data ListVersionsResponse = ListVersionsResponse + { _lvrNextPageToken :: !(Maybe Text) + , _lvrVersions :: !(Maybe [Maybe Version]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListVersionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lvrNextPageToken' +-- +-- * 'lvrVersions' +listVersionsResponse + :: ListVersionsResponse +listVersionsResponse = + ListVersionsResponse + { _lvrNextPageToken = Nothing + , _lvrVersions = Nothing + } + +-- | Continuation token for fetching the next page of results. +lvrNextPageToken :: Lens' ListVersionsResponse (Maybe Text) +lvrNextPageToken + = lens _lvrNextPageToken + (\ s a -> s{_lvrNextPageToken = a}) + +-- | The versions belonging to the requested application module. +lvrVersions :: Lens' ListVersionsResponse [Maybe Version] +lvrVersions + = lens _lvrVersions (\ s a -> s{_lvrVersions = a}) . + _Default + . _Coerce + +instance FromJSON ListVersionsResponse where + parseJSON + = withObject "ListVersionsResponse" + (\ o -> + ListVersionsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "versions" .!= mempty)) + +instance ToJSON ListVersionsResponse where + toJSON ListVersionsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lvrNextPageToken, + ("versions" .=) <$> _lvrVersions]) + +-- | Response message for \`Modules.ListModules\`. +-- +-- /See:/ 'listModulesResponse' smart constructor. +data ListModulesResponse = ListModulesResponse + { _lmrNextPageToken :: !(Maybe Text) + , _lmrModules :: !(Maybe [Maybe Module]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListModulesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmrNextPageToken' +-- +-- * 'lmrModules' +listModulesResponse + :: ListModulesResponse +listModulesResponse = + ListModulesResponse + { _lmrNextPageToken = Nothing + , _lmrModules = Nothing + } + +-- | Continuation token for fetching the next page of results. +lmrNextPageToken :: Lens' ListModulesResponse (Maybe Text) +lmrNextPageToken + = lens _lmrNextPageToken + (\ s a -> s{_lmrNextPageToken = a}) + +-- | The modules belonging to the requested application. +lmrModules :: Lens' ListModulesResponse [Maybe Module] +lmrModules + = lens _lmrModules (\ s a -> s{_lmrModules = a}) . + _Default + . _Coerce + +instance FromJSON ListModulesResponse where + parseJSON + = withObject "ListModulesResponse" + (\ o -> + ListModulesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "modules" .!= mempty)) + +instance ToJSON ListModulesResponse where + toJSON ListModulesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lmrNextPageToken, + ("modules" .=) <$> _lmrModules]) + +-- | A single source file which is part of the application to be deployed. +-- +-- /See:/ 'fileInfo' smart constructor. +data FileInfo = FileInfo + { _fiSha1Sum :: !(Maybe Text) + , _fiMimeType :: !(Maybe Text) + , _fiSourceUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FileInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiSha1Sum' +-- +-- * 'fiMimeType' +-- +-- * 'fiSourceUrl' +fileInfo + :: FileInfo +fileInfo = + FileInfo + { _fiSha1Sum = Nothing + , _fiMimeType = Nothing + , _fiSourceUrl = Nothing + } + +-- | The SHA1 (160 bits) hash of the file in hex. +fiSha1Sum :: Lens' FileInfo (Maybe Text) +fiSha1Sum + = lens _fiSha1Sum (\ s a -> s{_fiSha1Sum = a}) + +-- | The MIME type of the file; if unspecified, the value from Google Cloud +-- Storage will be used. +fiMimeType :: Lens' FileInfo (Maybe Text) +fiMimeType + = lens _fiMimeType (\ s a -> s{_fiMimeType = a}) + +-- | The URL source to use to fetch this file. Must be a URL to a resource in +-- Google Cloud Storage. +fiSourceUrl :: Lens' FileInfo (Maybe Text) +fiSourceUrl + = lens _fiSourceUrl (\ s a -> s{_fiSourceUrl = a}) + +instance FromJSON FileInfo where + parseJSON + = withObject "FileInfo" + (\ o -> + FileInfo <$> + (o .:? "sha1Sum") <*> (o .:? "mimeType") <*> + (o .:? "sourceUrl")) + +instance ToJSON FileInfo where + toJSON FileInfo{..} + = object + (catMaybes + [("sha1Sum" .=) <$> _fiSha1Sum, + ("mimeType" .=) <$> _fiMimeType, + ("sourceUrl" .=) <$> _fiSourceUrl]) + +-- | Automatic scaling is the scaling policy that App Engine has used since +-- its inception. It is based on request rate, response latencies, and +-- other application metrics. +-- +-- /See:/ 'automaticScaling' smart constructor. +data AutomaticScaling = AutomaticScaling + { _asMaxTotalInstances :: !(Maybe Int32) + , _asMinIdleInstances :: !(Maybe Int32) + , _asMinPendingLatency :: !(Maybe Text) + , _asCpuUtilization :: !(Maybe (Maybe CPUUtilization)) + , _asMaxIdleInstances :: !(Maybe Int32) + , _asMinTotalInstances :: !(Maybe Int32) + , _asMaxConcurrentRequests :: !(Maybe Int32) + , _asCoolDownPeriod :: !(Maybe Text) + , _asMaxPendingLatency :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutomaticScaling' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asMaxTotalInstances' +-- +-- * 'asMinIdleInstances' +-- +-- * 'asMinPendingLatency' +-- +-- * 'asCpuUtilization' +-- +-- * 'asMaxIdleInstances' +-- +-- * 'asMinTotalInstances' +-- +-- * 'asMaxConcurrentRequests' +-- +-- * 'asCoolDownPeriod' +-- +-- * 'asMaxPendingLatency' +automaticScaling + :: AutomaticScaling +automaticScaling = + AutomaticScaling + { _asMaxTotalInstances = Nothing + , _asMinIdleInstances = Nothing + , _asMinPendingLatency = Nothing + , _asCpuUtilization = Nothing + , _asMaxIdleInstances = Nothing + , _asMinTotalInstances = Nothing + , _asMaxConcurrentRequests = Nothing + , _asCoolDownPeriod = Nothing + , _asMaxPendingLatency = Nothing + } + +-- | Max number of instances that App Engine should start to handle requests. +asMaxTotalInstances :: Lens' AutomaticScaling (Maybe Int32) +asMaxTotalInstances + = lens _asMaxTotalInstances + (\ s a -> s{_asMaxTotalInstances = a}) + +-- | The minimum number of idle instances that App Engine should maintain for +-- this version. Only applies to the default version of a module, since +-- other versions are not expected to receive significant traffic. +asMinIdleInstances :: Lens' AutomaticScaling (Maybe Int32) +asMinIdleInstances + = lens _asMinIdleInstances + (\ s a -> s{_asMinIdleInstances = a}) + +-- | The minimum amount of time that App Engine should allow a request to +-- wait in the pending queue before starting a new instance to handle it. +asMinPendingLatency :: Lens' AutomaticScaling (Maybe Text) +asMinPendingLatency + = lens _asMinPendingLatency + (\ s a -> s{_asMinPendingLatency = a}) + +-- | Target scaling by CPU usage. +asCpuUtilization :: Lens' AutomaticScaling (Maybe (Maybe CPUUtilization)) +asCpuUtilization + = lens _asCpuUtilization + (\ s a -> s{_asCpuUtilization = a}) + +-- | The maximum number of idle instances that App Engine should maintain for +-- this version. +asMaxIdleInstances :: Lens' AutomaticScaling (Maybe Int32) +asMaxIdleInstances + = lens _asMaxIdleInstances + (\ s a -> s{_asMaxIdleInstances = a}) + +-- | Minimum number of instances that App Engine should maintain. +asMinTotalInstances :: Lens' AutomaticScaling (Maybe Int32) +asMinTotalInstances + = lens _asMinTotalInstances + (\ s a -> s{_asMinTotalInstances = a}) + +-- | The number of concurrent requests an automatic scaling instance can +-- accept before the scheduler spawns a new instance. Default value is +-- chosen based on the runtime. +asMaxConcurrentRequests :: Lens' AutomaticScaling (Maybe Int32) +asMaxConcurrentRequests + = lens _asMaxConcurrentRequests + (\ s a -> s{_asMaxConcurrentRequests = a}) + +-- | The amount of time that the +-- [Autoscaler](https:\/\/cloud.google.com\/compute\/docs\/autoscaler\/) +-- should wait between changes to the number of virtual machines. Applies +-- only to the VM runtime. +asCoolDownPeriod :: Lens' AutomaticScaling (Maybe Text) +asCoolDownPeriod + = lens _asCoolDownPeriod + (\ s a -> s{_asCoolDownPeriod = a}) + +-- | The maximum amount of time that App Engine should allow a request to +-- wait in the pending queue before starting a new instance to handle it. +asMaxPendingLatency :: Lens' AutomaticScaling (Maybe Text) +asMaxPendingLatency + = lens _asMaxPendingLatency + (\ s a -> s{_asMaxPendingLatency = a}) + +instance FromJSON AutomaticScaling where + parseJSON + = withObject "AutomaticScaling" + (\ o -> + AutomaticScaling <$> + (o .:? "maxTotalInstances") <*> + (o .:? "minIdleInstances") + <*> (o .:? "minPendingLatency") + <*> (o .:? "cpuUtilization") + <*> (o .:? "maxIdleInstances") + <*> (o .:? "minTotalInstances") + <*> (o .:? "maxConcurrentRequests") + <*> (o .:? "coolDownPeriod") + <*> (o .:? "maxPendingLatency")) + +instance ToJSON AutomaticScaling where + toJSON AutomaticScaling{..} + = object + (catMaybes + [("maxTotalInstances" .=) <$> _asMaxTotalInstances, + ("minIdleInstances" .=) <$> _asMinIdleInstances, + ("minPendingLatency" .=) <$> _asMinPendingLatency, + ("cpuUtilization" .=) <$> _asCpuUtilization, + ("maxIdleInstances" .=) <$> _asMaxIdleInstances, + ("minTotalInstances" .=) <$> _asMinTotalInstances, + ("maxConcurrentRequests" .=) <$> + _asMaxConcurrentRequests, + ("coolDownPeriod" .=) <$> _asCoolDownPeriod, + ("maxPendingLatency" .=) <$> _asMaxPendingLatency]) + +-- | Use Google Cloud Endpoints to handle requests. +-- +-- /See:/ 'aPIEndpointHandler' smart constructor. +newtype APIEndpointHandler = APIEndpointHandler + { _aehScriptPath :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIEndpointHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aehScriptPath' +aPIEndpointHandler + :: APIEndpointHandler +aPIEndpointHandler = + APIEndpointHandler + { _aehScriptPath = Nothing + } + +-- | Specifies the path to the script from the application root directory. +aehScriptPath :: Lens' APIEndpointHandler (Maybe Text) +aehScriptPath + = lens _aehScriptPath + (\ s a -> s{_aehScriptPath = a}) + +instance FromJSON APIEndpointHandler where + parseJSON + = withObject "APIEndpointHandler" + (\ o -> APIEndpointHandler <$> (o .:? "scriptPath")) + +instance ToJSON APIEndpointHandler where + toJSON APIEndpointHandler{..} + = object + (catMaybes [("scriptPath" .=) <$> _aehScriptPath]) + +-- | Used to specify extra network settings (for VM runtimes only). +-- +-- /See:/ 'network' smart constructor. +data Network = Network + { _nForwardedPorts :: !(Maybe [Text]) + , _nInstanceTag :: !(Maybe Text) + , _nName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Network' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nForwardedPorts' +-- +-- * 'nInstanceTag' +-- +-- * 'nName' +network + :: Network +network = + Network + { _nForwardedPorts = Nothing + , _nInstanceTag = Nothing + , _nName = Nothing + } + +-- | A list of ports (or port pairs) to forward from the VM into the app +-- container. +nForwardedPorts :: Lens' Network [Text] +nForwardedPorts + = lens _nForwardedPorts + (\ s a -> s{_nForwardedPorts = a}) + . _Default + . _Coerce + +-- | A tag to apply to the VM instance during creation. +nInstanceTag :: Lens' Network (Maybe Text) +nInstanceTag + = lens _nInstanceTag (\ s a -> s{_nInstanceTag = a}) + +-- | The Google Compute Engine network where the VMs will be created. If not +-- specified, or empty, the network named \"default\" will be used. (The +-- short name should be specified, not the resource path.) +nName :: Lens' Network (Maybe Text) +nName = lens _nName (\ s a -> s{_nName = a}) + +instance FromJSON Network where + parseJSON + = withObject "Network" + (\ o -> + Network <$> + (o .:? "forwardedPorts" .!= mempty) <*> + (o .:? "instanceTag") + <*> (o .:? "name")) + +instance ToJSON Network where + toJSON Network{..} + = object + (catMaybes + [("forwardedPorts" .=) <$> _nForwardedPorts, + ("instanceTag" .=) <$> _nInstanceTag, + ("name" .=) <$> _nName]) + +-- | Used to specify how many machine resources an app version needs. +-- +-- /See:/ 'resources' smart constructor. +data Resources = Resources + { _rMemoryGb :: !(Maybe Double) + , _rDiskGb :: !(Maybe Double) + , _rCpu :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Resources' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rMemoryGb' +-- +-- * 'rDiskGb' +-- +-- * 'rCpu' +resources + :: Resources +resources = + Resources + { _rMemoryGb = Nothing + , _rDiskGb = Nothing + , _rCpu = Nothing + } + +-- | How much memory, in GB, an app version needs. +rMemoryGb :: Lens' Resources (Maybe Double) +rMemoryGb + = lens _rMemoryGb (\ s a -> s{_rMemoryGb = a}) + +-- | How much disk size, in GB, an app version needs. +rDiskGb :: Lens' Resources (Maybe Double) +rDiskGb = lens _rDiskGb (\ s a -> s{_rDiskGb = a}) + +-- | How many CPU cores an app version needs. +rCpu :: Lens' Resources (Maybe Double) +rCpu = lens _rCpu (\ s a -> s{_rCpu = a}) + +instance FromJSON Resources where + parseJSON + = withObject "Resources" + (\ o -> + Resources <$> + (o .:? "memoryGb") <*> (o .:? "diskGb") <*> + (o .:? "cpu")) + +instance ToJSON Resources where + toJSON Resources{..} + = object + (catMaybes + [("memoryGb" .=) <$> _rMemoryGb, + ("diskGb" .=) <$> _rDiskGb, ("cpu" .=) <$> _rCpu]) + +-- | Target scaling by CPU usage. +-- +-- /See:/ 'cPUUtilization' smart constructor. +data CPUUtilization = CPUUtilization + { _cuAggregationWindowLength :: !(Maybe Text) + , _cuTargetUtilization :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CPUUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuAggregationWindowLength' +-- +-- * 'cuTargetUtilization' +cPUUtilization + :: CPUUtilization +cPUUtilization = + CPUUtilization + { _cuAggregationWindowLength = Nothing + , _cuTargetUtilization = Nothing + } + +-- | The period of time over which CPU utilization is calculated. +cuAggregationWindowLength :: Lens' CPUUtilization (Maybe Text) +cuAggregationWindowLength + = lens _cuAggregationWindowLength + (\ s a -> s{_cuAggregationWindowLength = a}) + +-- | Target (0-1) CPU utilization ratio to maintain when scaling. +cuTargetUtilization :: Lens' CPUUtilization (Maybe Double) +cuTargetUtilization + = lens _cuTargetUtilization + (\ s a -> s{_cuTargetUtilization = a}) + +instance FromJSON CPUUtilization where + parseJSON + = withObject "CPUUtilization" + (\ o -> + CPUUtilization <$> + (o .:? "aggregationWindowLength") <*> + (o .:? "targetUtilization")) + +instance ToJSON CPUUtilization where + toJSON CPUUtilization{..} + = object + (catMaybes + [("aggregationWindowLength" .=) <$> + _cuAggregationWindowLength, + ("targetUtilization" .=) <$> _cuTargetUtilization]) + +-- | A module with manual scaling runs continuously, allowing you to perform +-- complex initialization and rely on the state of its memory over time. +-- +-- /See:/ 'manualScaling' smart constructor. +newtype ManualScaling = ManualScaling + { _msInstances :: Maybe Int32 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManualScaling' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msInstances' +manualScaling + :: ManualScaling +manualScaling = + ManualScaling + { _msInstances = Nothing + } + +-- | The number of instances to assign to the module at the start. This +-- number can later be altered by using the [Modules +-- API](https:\/\/cloud.google.com\/appengine\/docs\/python\/modules\/functions) +-- \`set_num_instances()\` function. +msInstances :: Lens' ManualScaling (Maybe Int32) +msInstances + = lens _msInstances (\ s a -> s{_msInstances = a}) + +instance FromJSON ManualScaling where + parseJSON + = withObject "ManualScaling" + (\ o -> ManualScaling <$> (o .:? "instances")) + +instance ToJSON ManualScaling where + toJSON ManualScaling{..} + = object + (catMaybes [("instances" .=) <$> _msInstances]) + +-- | A module with basic scaling will create an instance when the application +-- receives a request. The instance will be turned down when the app +-- becomes idle. Basic scaling is ideal for work that is intermittent or +-- driven by user activity. +-- +-- /See:/ 'basicScaling' smart constructor. +data BasicScaling = BasicScaling + { _bsMaxInstances :: !(Maybe Int32) + , _bsIdleTimeout :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BasicScaling' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsMaxInstances' +-- +-- * 'bsIdleTimeout' +basicScaling + :: BasicScaling +basicScaling = + BasicScaling + { _bsMaxInstances = Nothing + , _bsIdleTimeout = Nothing + } + +-- | The maximum number of instances for App Engine to create for this +-- version. +bsMaxInstances :: Lens' BasicScaling (Maybe Int32) +bsMaxInstances + = lens _bsMaxInstances + (\ s a -> s{_bsMaxInstances = a}) + +-- | The instance will be shut down this amount of time after receiving its +-- last request. +bsIdleTimeout :: Lens' BasicScaling (Maybe Text) +bsIdleTimeout + = lens _bsIdleTimeout + (\ s a -> s{_bsIdleTimeout = a}) + +instance FromJSON BasicScaling where + parseJSON + = withObject "BasicScaling" + (\ o -> + BasicScaling <$> + (o .:? "maxInstances") <*> (o .:? "idleTimeout")) + +instance ToJSON BasicScaling where + toJSON BasicScaling{..} + = object + (catMaybes + [("maxInstances" .=) <$> _bsMaxInstances, + ("idleTimeout" .=) <$> _bsIdleTimeout]) + +-- | A Version is a specific set of source code and configuration files +-- deployed to a module. +-- +-- /See:/ 'version' smart constructor. +data Version = Version + { _vCreationTime :: !(Maybe Text) + , _vRuntime :: !(Maybe Text) + , _vDeployer :: !(Maybe Text) + , _vNobuildFilesRegex :: !(Maybe Text) + , _vInstanceClass :: !(Maybe Text) + , _vHealthCheck :: !(Maybe (Maybe HealthCheck)) + , _vEnv :: !(Maybe Text) + , _vDefaultExpiration :: !(Maybe Text) + , _vAutomaticScaling :: !(Maybe (Maybe AutomaticScaling)) + , _vErrorHandlers :: !(Maybe [Maybe ErrorHandler]) + , _vVm :: !(Maybe Bool) + , _vHandlers :: !(Maybe [Maybe URLMap]) + , _vInboundServices :: !(Maybe [Text]) + , _vNetwork :: !(Maybe (Maybe Network)) + , _vResources :: !(Maybe (Maybe Resources)) + , _vName :: !(Maybe Text) + , _vThreadsafe :: !(Maybe Bool) + , _vBetaSettings :: !(Maybe VersionBetaSettings) + , _vBasicScaling :: !(Maybe (Maybe BasicScaling)) + , _vManualScaling :: !(Maybe (Maybe ManualScaling)) + , _vApiConfig :: !(Maybe (Maybe APIConfigHandler)) + , _vId :: !(Maybe Text) + , _vEnvVariables :: !(Maybe VersionEnvVariables) + , _vServingStatus :: !(Maybe Text) + , _vLibraries :: !(Maybe [Maybe Library]) + , _vDeployment :: !(Maybe (Maybe Deployment)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Version' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vCreationTime' +-- +-- * 'vRuntime' +-- +-- * 'vDeployer' +-- +-- * 'vNobuildFilesRegex' +-- +-- * 'vInstanceClass' +-- +-- * 'vHealthCheck' +-- +-- * 'vEnv' +-- +-- * 'vDefaultExpiration' +-- +-- * 'vAutomaticScaling' +-- +-- * 'vErrorHandlers' +-- +-- * 'vVm' +-- +-- * 'vHandlers' +-- +-- * 'vInboundServices' +-- +-- * 'vNetwork' +-- +-- * 'vResources' +-- +-- * 'vName' +-- +-- * 'vThreadsafe' +-- +-- * 'vBetaSettings' +-- +-- * 'vBasicScaling' +-- +-- * 'vManualScaling' +-- +-- * 'vApiConfig' +-- +-- * 'vId' +-- +-- * 'vEnvVariables' +-- +-- * 'vServingStatus' +-- +-- * 'vLibraries' +-- +-- * 'vDeployment' +version + :: Version +version = + Version + { _vCreationTime = Nothing + , _vRuntime = Nothing + , _vDeployer = Nothing + , _vNobuildFilesRegex = Nothing + , _vInstanceClass = Nothing + , _vHealthCheck = Nothing + , _vEnv = Nothing + , _vDefaultExpiration = Nothing + , _vAutomaticScaling = Nothing + , _vErrorHandlers = Nothing + , _vVm = Nothing + , _vHandlers = Nothing + , _vInboundServices = Nothing + , _vNetwork = Nothing + , _vResources = Nothing + , _vName = Nothing + , _vThreadsafe = Nothing + , _vBetaSettings = Nothing + , _vBasicScaling = Nothing + , _vManualScaling = Nothing + , _vApiConfig = Nothing + , _vId = Nothing + , _vEnvVariables = Nothing + , _vServingStatus = Nothing + , _vLibraries = Nothing + , _vDeployment = Nothing + } + +-- | Creation time of this version. This will be between the start and end +-- times of the operation that creates this version. \'OutputOnly +vCreationTime :: Lens' Version (Maybe Text) +vCreationTime + = lens _vCreationTime + (\ s a -> s{_vCreationTime = a}) + +-- | The desired runtime. Values can include python27, java7, go, etc. +vRuntime :: Lens' Version (Maybe Text) +vRuntime = lens _vRuntime (\ s a -> s{_vRuntime = a}) + +-- | The email address of the user who created this version. \'OutputOnly +vDeployer :: Lens' Version (Maybe Text) +vDeployer + = lens _vDeployer (\ s a -> s{_vDeployer = a}) + +-- | Go only. Files that match this pattern will not be built into the app. +-- May only be set on create requests. +vNobuildFilesRegex :: Lens' Version (Maybe Text) +vNobuildFilesRegex + = lens _vNobuildFilesRegex + (\ s a -> s{_vNobuildFilesRegex = a}) + +-- | The frontend instance class to use to run this app. Valid values are +-- \`[F1, F2, F4, F4_1G]\`. Default: \"F1\" +vInstanceClass :: Lens' Version (Maybe Text) +vInstanceClass + = lens _vInstanceClass + (\ s a -> s{_vInstanceClass = a}) + +-- | Configure health checking for the VM instances. Unhealthy VM instances +-- will be stopped and replaced with new instances. Only returned in +-- \`GET\` requests if \`view=FULL\` is set. May only be set on create +-- requests; once created, is immutable. +vHealthCheck :: Lens' Version (Maybe (Maybe HealthCheck)) +vHealthCheck + = lens _vHealthCheck (\ s a -> s{_vHealthCheck = a}) + +-- | The App Engine execution environment to use for this version. Default: +-- \"1\" +vEnv :: Lens' Version (Maybe Text) +vEnv = lens _vEnv (\ s a -> s{_vEnv = a}) + +-- | The length of time a static file served by a static file handler ought +-- to be cached by web proxies and browsers, if the handler does not +-- specify its own expiration. Only returned in \`GET\` requests if +-- \`view=FULL\` is set. May only be set on create requests; once created, +-- is immutable. +vDefaultExpiration :: Lens' Version (Maybe Text) +vDefaultExpiration + = lens _vDefaultExpiration + (\ s a -> s{_vDefaultExpiration = a}) + +-- | Automatic scaling is the scaling policy that App Engine has used since +-- its inception. It is based on request rate, response latencies, and +-- other application metrics. +vAutomaticScaling :: Lens' Version (Maybe (Maybe AutomaticScaling)) +vAutomaticScaling + = lens _vAutomaticScaling + (\ s a -> s{_vAutomaticScaling = a}) + +-- | Custom static error pages instead of these generic error pages, (limit +-- 10 KB\/page) Only returned in \`GET\` requests if \`view=FULL\` is set. +-- May only be set on create requests; once created, is immutable. +vErrorHandlers :: Lens' Version [Maybe ErrorHandler] +vErrorHandlers + = lens _vErrorHandlers + (\ s a -> s{_vErrorHandlers = a}) + . _Default + . _Coerce + +-- | Whether to deploy this app in a VM container (deprecated, use +-- \"env\":\"2\"). +vVm :: Lens' Version (Maybe Bool) +vVm = lens _vVm (\ s a -> s{_vVm = a}) + +-- | An ordered list of URL Matching patterns that should be applied to +-- incoming requests. The first matching URL consumes the request, and +-- subsequent handlers are not attempted. Only returned in \`GET\` requests +-- if \`view=FULL\` is set. May only be set on create requests; once +-- created, is immutable. +vHandlers :: Lens' Version [Maybe URLMap] +vHandlers + = lens _vHandlers (\ s a -> s{_vHandlers = a}) . + _Default + . _Coerce + +-- | Before an application can receive email or XMPP messages, the +-- application must be configured to enable the service. +vInboundServices :: Lens' Version [Text] +vInboundServices + = lens _vInboundServices + (\ s a -> s{_vInboundServices = a}) + . _Default + . _Coerce + +-- | Used to specify extra network settings (for VM runtimes only). +vNetwork :: Lens' Version (Maybe (Maybe Network)) +vNetwork = lens _vNetwork (\ s a -> s{_vNetwork = a}) + +-- | Used to specify how many machine resources an app version needs (for VM +-- runtimes only). +vResources :: Lens' Version (Maybe (Maybe Resources)) +vResources + = lens _vResources (\ s a -> s{_vResources = a}) + +-- | The full path to the Version resource in the API. Example: +-- \"apps\/myapp\/modules\/default\/versions\/v1\". \'OutputOnly +vName :: Lens' Version (Maybe Text) +vName = lens _vName (\ s a -> s{_vName = a}) + +-- | If true, multiple requests can be dispatched to the app at once. +vThreadsafe :: Lens' Version (Maybe Bool) +vThreadsafe + = lens _vThreadsafe (\ s a -> s{_vThreadsafe = a}) + +-- | Beta settings supplied to the application via metadata. +vBetaSettings :: Lens' Version (Maybe VersionBetaSettings) +vBetaSettings + = lens _vBetaSettings + (\ s a -> s{_vBetaSettings = a}) + +-- | A module with basic scaling will create an instance when the application +-- receives a request. The instance will be turned down when the app +-- becomes idle. Basic scaling is ideal for work that is intermittent or +-- driven by user activity. +vBasicScaling :: Lens' Version (Maybe (Maybe BasicScaling)) +vBasicScaling + = lens _vBasicScaling + (\ s a -> s{_vBasicScaling = a}) + +-- | A module with manual scaling runs continuously, allowing you to perform +-- complex initialization and rely on the state of its memory over time. +vManualScaling :: Lens' Version (Maybe (Maybe ManualScaling)) +vManualScaling + = lens _vManualScaling + (\ s a -> s{_vManualScaling = a}) + +-- | Serving configuration for Google Cloud Endpoints. Only returned in +-- \`GET\` requests if \`view=FULL\` is set. May only be set on create +-- requests; once created, is immutable. +vApiConfig :: Lens' Version (Maybe (Maybe APIConfigHandler)) +vApiConfig + = lens _vApiConfig (\ s a -> s{_vApiConfig = a}) + +-- | The relative name\/path of the Version within the module. Example: +-- \"v1\". Version specifiers can contain lowercase letters, digits, and +-- hyphens. It cannot begin with the prefix \`ah-\` and the names +-- \`default\` and \`latest\` are reserved and cannot be used. +vId :: Lens' Version (Maybe Text) +vId = lens _vId (\ s a -> s{_vId = a}) + +-- | Environment variables made available to the application. Only returned +-- in \`GET\` requests if \`view=FULL\` is set. May only be set on create +-- requests; once created, is immutable. +vEnvVariables :: Lens' Version (Maybe VersionEnvVariables) +vEnvVariables + = lens _vEnvVariables + (\ s a -> s{_vEnvVariables = a}) + +-- | The current serving status of this version. Only \`SERVING\` versions +-- will have instances created or billed for. If this field is unset when a +-- version is created, \`SERVING\` status will be assumed. It is an error +-- to explicitly set this field to \`SERVING_STATUS_UNSPECIFIED\`. +vServingStatus :: Lens' Version (Maybe Text) +vServingStatus + = lens _vServingStatus + (\ s a -> s{_vServingStatus = a}) + +-- | Configuration for Python runtime third-party libraries required by the +-- application. Only returned in \`GET\` requests if \`view=FULL\` is set. +-- May only be set on create requests; once created, is immutable. +vLibraries :: Lens' Version [Maybe Library] +vLibraries + = lens _vLibraries (\ s a -> s{_vLibraries = a}) . + _Default + . _Coerce + +-- | Code and application artifacts that make up this version. Only returned +-- in \`GET\` requests if \`view=FULL\` is set. May only be set on create +-- requests; once created, is immutable. +vDeployment :: Lens' Version (Maybe (Maybe Deployment)) +vDeployment + = lens _vDeployment (\ s a -> s{_vDeployment = a}) + +instance FromJSON Version where + parseJSON + = withObject "Version" + (\ o -> + Version <$> + (o .:? "creationTime") <*> (o .:? "runtime") <*> + (o .:? "deployer") + <*> (o .:? "nobuildFilesRegex") + <*> (o .:? "instanceClass") + <*> (o .:? "healthCheck") + <*> (o .:? "env") + <*> (o .:? "defaultExpiration") + <*> (o .:? "automaticScaling") + <*> (o .:? "errorHandlers" .!= mempty) + <*> (o .:? "vm") + <*> (o .:? "handlers" .!= mempty) + <*> (o .:? "inboundServices" .!= mempty) + <*> (o .:? "network") + <*> (o .:? "resources") + <*> (o .:? "name") + <*> (o .:? "threadsafe") + <*> (o .:? "betaSettings") + <*> (o .:? "basicScaling") + <*> (o .:? "manualScaling") + <*> (o .:? "apiConfig") + <*> (o .:? "id") + <*> (o .:? "envVariables") + <*> (o .:? "servingStatus") + <*> (o .:? "libraries" .!= mempty) + <*> (o .:? "deployment")) + +instance ToJSON Version where + toJSON Version{..} + = object + (catMaybes + [("creationTime" .=) <$> _vCreationTime, + ("runtime" .=) <$> _vRuntime, + ("deployer" .=) <$> _vDeployer, + ("nobuildFilesRegex" .=) <$> _vNobuildFilesRegex, + ("instanceClass" .=) <$> _vInstanceClass, + ("healthCheck" .=) <$> _vHealthCheck, + ("env" .=) <$> _vEnv, + ("defaultExpiration" .=) <$> _vDefaultExpiration, + ("automaticScaling" .=) <$> _vAutomaticScaling, + ("errorHandlers" .=) <$> _vErrorHandlers, + ("vm" .=) <$> _vVm, ("handlers" .=) <$> _vHandlers, + ("inboundServices" .=) <$> _vInboundServices, + ("network" .=) <$> _vNetwork, + ("resources" .=) <$> _vResources, + ("name" .=) <$> _vName, + ("threadsafe" .=) <$> _vThreadsafe, + ("betaSettings" .=) <$> _vBetaSettings, + ("basicScaling" .=) <$> _vBasicScaling, + ("manualScaling" .=) <$> _vManualScaling, + ("apiConfig" .=) <$> _vApiConfig, ("id" .=) <$> _vId, + ("envVariables" .=) <$> _vEnvVariables, + ("servingStatus" .=) <$> _vServingStatus, + ("libraries" .=) <$> _vLibraries, + ("deployment" .=) <$> _vDeployment]) + +-- | A module is a component of an application that provides a single service +-- or configuration. A module has a collection of versions that define a +-- specific set of code used to implement the functionality of that module. +-- +-- /See:/ 'module'' smart constructor. +data Module = Module + { _mSplit :: !(Maybe (Maybe TrafficSplit)) + , _mName :: !(Maybe Text) + , _mId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Module' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mSplit' +-- +-- * 'mName' +-- +-- * 'mId' +module' + :: Module +module' = + Module + { _mSplit = Nothing + , _mName = Nothing + , _mId = Nothing + } + +-- | A mapping that defines fractional HTTP traffic diversion to different +-- versions within the module. +mSplit :: Lens' Module (Maybe (Maybe TrafficSplit)) +mSplit = lens _mSplit (\ s a -> s{_mSplit = a}) + +-- | The full path to the Module resource in the API. Example: +-- \"apps\/myapp\/modules\/default\" \'OutputOnly +mName :: Lens' Module (Maybe Text) +mName = lens _mName (\ s a -> s{_mName = a}) + +-- | The relative name\/path of the module within the application. Example: +-- \"default\" \'OutputOnly +mId :: Lens' Module (Maybe Text) +mId = lens _mId (\ s a -> s{_mId = a}) + +instance FromJSON Module where + parseJSON + = withObject "Module" + (\ o -> + Module <$> + (o .:? "split") <*> (o .:? "name") <*> (o .:? "id")) + +instance ToJSON Module where + toJSON Module{..} + = object + (catMaybes + [("split" .=) <$> _mSplit, ("name" .=) <$> _mName, + ("id" .=) <$> _mId]) + +-- | Files served directly to the user for a given URL, such as images, CSS +-- stylesheets, or JavaScript source files. Static file handlers describe +-- which files in the application directory are static files, and which +-- URLs serve them. +-- +-- /See:/ 'staticFilesHandler' smart constructor. +data StaticFilesHandler = StaticFilesHandler + { _sfhHttpHeaders :: !(Maybe StaticFilesHandlerHTTPHeaders) + , _sfhPath :: !(Maybe Text) + , _sfhRequireMatchingFile :: !(Maybe Bool) + , _sfhExpiration :: !(Maybe Text) + , _sfhMimeType :: !(Maybe Text) + , _sfhApplicationReadable :: !(Maybe Bool) + , _sfhUploadPathRegex :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StaticFilesHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfhHttpHeaders' +-- +-- * 'sfhPath' +-- +-- * 'sfhRequireMatchingFile' +-- +-- * 'sfhExpiration' +-- +-- * 'sfhMimeType' +-- +-- * 'sfhApplicationReadable' +-- +-- * 'sfhUploadPathRegex' +staticFilesHandler + :: StaticFilesHandler +staticFilesHandler = + StaticFilesHandler + { _sfhHttpHeaders = Nothing + , _sfhPath = Nothing + , _sfhRequireMatchingFile = Nothing + , _sfhExpiration = Nothing + , _sfhMimeType = Nothing + , _sfhApplicationReadable = Nothing + , _sfhUploadPathRegex = Nothing + } + +-- | HTTP headers to use for all responses from these URLs. +sfhHttpHeaders :: Lens' StaticFilesHandler (Maybe StaticFilesHandlerHTTPHeaders) +sfhHttpHeaders + = lens _sfhHttpHeaders + (\ s a -> s{_sfhHttpHeaders = a}) + +-- | The path to the static files matched by the URL pattern, from the +-- application root directory. The path can refer to text matched in +-- groupings in the URL pattern. +sfhPath :: Lens' StaticFilesHandler (Maybe Text) +sfhPath = lens _sfhPath (\ s a -> s{_sfhPath = a}) + +-- | If true, this [UrlMap][google.appengine.v1beta4.UrlMap] entry does not +-- match the request unless the file referenced by the handler also exists. +-- If no such file exists, processing will continue with the next +-- [UrlMap][google.appengine.v1beta4.UrlMap] that matches the requested +-- URL. +sfhRequireMatchingFile :: Lens' StaticFilesHandler (Maybe Bool) +sfhRequireMatchingFile + = lens _sfhRequireMatchingFile + (\ s a -> s{_sfhRequireMatchingFile = a}) + +-- | The length of time a static file served by this handler ought to be +-- cached by web proxies and browsers. +sfhExpiration :: Lens' StaticFilesHandler (Maybe Text) +sfhExpiration + = lens _sfhExpiration + (\ s a -> s{_sfhExpiration = a}) + +-- | If specified, all files served by this handler will be served using the +-- specified MIME type. If not specified, the MIME type for a file will be +-- derived from the file\'s filename extension. +sfhMimeType :: Lens' StaticFilesHandler (Maybe Text) +sfhMimeType + = lens _sfhMimeType (\ s a -> s{_sfhMimeType = a}) + +-- | By default, files declared in static file handlers are uploaded as +-- static data and are only served to end users, they cannot be read by an +-- application. If this field is set to true, the files are also uploaded +-- as code data so your application can read them. Both uploads are charged +-- against your code and static data storage resource quotas. +sfhApplicationReadable :: Lens' StaticFilesHandler (Maybe Bool) +sfhApplicationReadable + = lens _sfhApplicationReadable + (\ s a -> s{_sfhApplicationReadable = a}) + +-- | A regular expression that matches the file paths for all files that will +-- be referenced by this handler. +sfhUploadPathRegex :: Lens' StaticFilesHandler (Maybe Text) +sfhUploadPathRegex + = lens _sfhUploadPathRegex + (\ s a -> s{_sfhUploadPathRegex = a}) + +instance FromJSON StaticFilesHandler where + parseJSON + = withObject "StaticFilesHandler" + (\ o -> + StaticFilesHandler <$> + (o .:? "httpHeaders") <*> (o .:? "path") <*> + (o .:? "requireMatchingFile") + <*> (o .:? "expiration") + <*> (o .:? "mimeType") + <*> (o .:? "applicationReadable") + <*> (o .:? "uploadPathRegex")) + +instance ToJSON StaticFilesHandler where + toJSON StaticFilesHandler{..} + = object + (catMaybes + [("httpHeaders" .=) <$> _sfhHttpHeaders, + ("path" .=) <$> _sfhPath, + ("requireMatchingFile" .=) <$> + _sfhRequireMatchingFile, + ("expiration" .=) <$> _sfhExpiration, + ("mimeType" .=) <$> _sfhMimeType, + ("applicationReadable" .=) <$> + _sfhApplicationReadable, + ("uploadPathRegex" .=) <$> _sfhUploadPathRegex]) + +-- | A custom static error page to be served when an error occurs. +-- +-- /See:/ 'errorHandler' smart constructor. +data ErrorHandler = ErrorHandler + { _ehMimeType :: !(Maybe Text) + , _ehErrorCode :: !(Maybe Text) + , _ehStaticFile :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ErrorHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ehMimeType' +-- +-- * 'ehErrorCode' +-- +-- * 'ehStaticFile' +errorHandler + :: ErrorHandler +errorHandler = + ErrorHandler + { _ehMimeType = Nothing + , _ehErrorCode = Nothing + , _ehStaticFile = Nothing + } + +-- | MIME type of file. If unspecified, \"text\/html\" is assumed. +ehMimeType :: Lens' ErrorHandler (Maybe Text) +ehMimeType + = lens _ehMimeType (\ s a -> s{_ehMimeType = a}) + +-- | The error condition this handler applies to. +ehErrorCode :: Lens' ErrorHandler (Maybe Text) +ehErrorCode + = lens _ehErrorCode (\ s a -> s{_ehErrorCode = a}) + +-- | Static file content to be served for this error. +ehStaticFile :: Lens' ErrorHandler (Maybe Text) +ehStaticFile + = lens _ehStaticFile (\ s a -> s{_ehStaticFile = a}) + +instance FromJSON ErrorHandler where + parseJSON + = withObject "ErrorHandler" + (\ o -> + ErrorHandler <$> + (o .:? "mimeType") <*> (o .:? "errorCode") <*> + (o .:? "staticFile")) + +instance ToJSON ErrorHandler where + toJSON ErrorHandler{..} + = object + (catMaybes + [("mimeType" .=) <$> _ehMimeType, + ("errorCode" .=) <$> _ehErrorCode, + ("staticFile" .=) <$> _ehStaticFile]) + +-- | Metadata for the given +-- [google.longrunning.Operation][google.longrunning.Operation]. +-- +-- /See:/ 'operationMetadata' smart constructor. +data OperationMetadata = OperationMetadata + { _omInsertTime :: !(Maybe Text) + , _omUser :: !(Maybe Text) + , _omMethod :: !(Maybe Text) + , _omEndTime :: !(Maybe Text) + , _omOperationType :: !(Maybe Text) + , _omTarget :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'omInsertTime' +-- +-- * 'omUser' +-- +-- * 'omMethod' +-- +-- * 'omEndTime' +-- +-- * 'omOperationType' +-- +-- * 'omTarget' +operationMetadata + :: OperationMetadata +operationMetadata = + OperationMetadata + { _omInsertTime = Nothing + , _omUser = Nothing + , _omMethod = Nothing + , _omEndTime = Nothing + , _omOperationType = Nothing + , _omTarget = Nothing + } + +-- | Timestamp that this operation was received. \'OutputOnly +omInsertTime :: Lens' OperationMetadata (Maybe Text) +omInsertTime + = lens _omInsertTime (\ s a -> s{_omInsertTime = a}) + +-- | The user who requested this operation. \'OutputOnly +omUser :: Lens' OperationMetadata (Maybe Text) +omUser = lens _omUser (\ s a -> s{_omUser = a}) + +-- | API method name that initiated the operation. Example: +-- \"google.appengine.v1beta4.Version.CreateVersion\". \'OutputOnly +omMethod :: Lens' OperationMetadata (Maybe Text) +omMethod = lens _omMethod (\ s a -> s{_omMethod = a}) + +-- | Timestamp that this operation was completed. (Not present if the +-- operation is still in progress.) \'OutputOnly +omEndTime :: Lens' OperationMetadata (Maybe Text) +omEndTime + = lens _omEndTime (\ s a -> s{_omEndTime = a}) + +-- | The type of the operation (deprecated, use method field instead). +-- Example: \"create_version\". \'OutputOnly +omOperationType :: Lens' OperationMetadata (Maybe Text) +omOperationType + = lens _omOperationType + (\ s a -> s{_omOperationType = a}) + +-- | Resource that this operation is acting on. Example: +-- \"apps\/myapp\/modules\/default\". \'OutputOnly +omTarget :: Lens' OperationMetadata (Maybe Text) +omTarget = lens _omTarget (\ s a -> s{_omTarget = a}) + +instance FromJSON OperationMetadata where + parseJSON + = withObject "OperationMetadata" + (\ o -> + OperationMetadata <$> + (o .:? "insertTime") <*> (o .:? "user") <*> + (o .:? "method") + <*> (o .:? "endTime") + <*> (o .:? "operationType") + <*> (o .:? "target")) + +instance ToJSON OperationMetadata where + toJSON OperationMetadata{..} + = object + (catMaybes + [("insertTime" .=) <$> _omInsertTime, + ("user" .=) <$> _omUser, ("method" .=) <$> _omMethod, + ("endTime" .=) <$> _omEndTime, + ("operationType" .=) <$> _omOperationType, + ("target" .=) <$> _omTarget]) + +-- | A reference to a particular snapshot of the source tree used to build +-- and deploy the application. +-- +-- /See:/ 'sourceReference' smart constructor. +data SourceReference = SourceReference + { _srRepository :: !(Maybe Text) + , _srRevisionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srRepository' +-- +-- * 'srRevisionId' +sourceReference + :: SourceReference +sourceReference = + SourceReference + { _srRepository = Nothing + , _srRevisionId = Nothing + } + +-- | Optional. A URI string identifying the repository. Example: +-- \"https:\/\/source.developers.google.com\/p\/app-123\/r\/default\" +srRepository :: Lens' SourceReference (Maybe Text) +srRepository + = lens _srRepository (\ s a -> s{_srRepository = a}) + +-- | The canonical (and persistent) identifier of the deployed revision, i.e. +-- any kind of aliases including tags or branch names are not allowed. +-- Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\" +srRevisionId :: Lens' SourceReference (Maybe Text) +srRevisionId + = lens _srRevisionId (\ s a -> s{_srRevisionId = a}) + +instance FromJSON SourceReference where + parseJSON + = withObject "SourceReference" + (\ o -> + SourceReference <$> + (o .:? "repository") <*> (o .:? "revisionId")) + +instance ToJSON SourceReference where + toJSON SourceReference{..} + = object + (catMaybes + [("repository" .=) <$> _srRepository, + ("revisionId" .=) <$> _srRevisionId]) + +-- | A Docker (container) image which should be used to start the +-- application. +-- +-- /See:/ 'containerInfo' smart constructor. +newtype ContainerInfo = ContainerInfo + { _ciImage :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContainerInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciImage' +containerInfo + :: ContainerInfo +containerInfo = + ContainerInfo + { _ciImage = Nothing + } + +-- | Reference to a hosted container image. Must be a URI to a resource in a +-- Docker repository. Must be fully qualified, including tag or digest. +-- e.g. gcr.io\/my-project\/image:tag or gcr.io\/my-project\/image\'digest +ciImage :: Lens' ContainerInfo (Maybe Text) +ciImage = lens _ciImage (\ s a -> s{_ciImage = a}) + +instance FromJSON ContainerInfo where + parseJSON + = withObject "ContainerInfo" + (\ o -> ContainerInfo <$> (o .:? "image")) + +instance ToJSON ContainerInfo where + toJSON ContainerInfo{..} + = object (catMaybes [("image" .=) <$> _ciImage]) + +-- | Code and application artifacts used to deploy a version to App Engine. +-- +-- /See:/ 'deployment' smart constructor. +data Deployment = Deployment + { _dContainer :: !(Maybe (Maybe ContainerInfo)) + , _dFiles :: !(Maybe DeploymentFiles) + , _dSourceReferences :: !(Maybe [Maybe SourceReference]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Deployment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dContainer' +-- +-- * 'dFiles' +-- +-- * 'dSourceReferences' +deployment + :: Deployment +deployment = + Deployment + { _dContainer = Nothing + , _dFiles = Nothing + , _dSourceReferences = Nothing + } + +-- | If supplied, a docker (container) image which should be used to start +-- the application. Only applicable to the \'vm\' runtime. +dContainer :: Lens' Deployment (Maybe (Maybe ContainerInfo)) +dContainer + = lens _dContainer (\ s a -> s{_dContainer = a}) + +-- | A manifest of files stored in Google Cloud Storage which should be +-- included as part of this application. All files must be readable using +-- the credentials supplied with this call. +dFiles :: Lens' Deployment (Maybe DeploymentFiles) +dFiles = lens _dFiles (\ s a -> s{_dFiles = a}) + +-- | The origin of the source code for this deployment. There can be more +-- than one source reference per Version if source code is distributed +-- among multiple repositories. +dSourceReferences :: Lens' Deployment [Maybe SourceReference] +dSourceReferences + = lens _dSourceReferences + (\ s a -> s{_dSourceReferences = a}) + . _Default + . _Coerce + +instance FromJSON Deployment where + parseJSON + = withObject "Deployment" + (\ o -> + Deployment <$> + (o .:? "container") <*> (o .:? "files") <*> + (o .:? "sourceReferences" .!= mempty)) + +instance ToJSON Deployment where + toJSON Deployment{..} + = object + (catMaybes + [("container" .=) <$> _dContainer, + ("files" .=) <$> _dFiles, + ("sourceReferences" .=) <$> _dSourceReferences]) + +-- | Files served directly to the user for a given URL, such as images, CSS +-- stylesheets, or JavaScript source files. Static directory handlers make +-- it easy to serve the entire contents of a directory as static files. +-- +-- /See:/ 'staticDirectoryHandler' smart constructor. +data StaticDirectoryHandler = StaticDirectoryHandler + { _sdhHttpHeaders :: !(Maybe StaticDirectoryHandlerHTTPHeaders) + , _sdhRequireMatchingFile :: !(Maybe Bool) + , _sdhExpiration :: !(Maybe Text) + , _sdhMimeType :: !(Maybe Text) + , _sdhApplicationReadable :: !(Maybe Bool) + , _sdhDirectory :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StaticDirectoryHandler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdhHttpHeaders' +-- +-- * 'sdhRequireMatchingFile' +-- +-- * 'sdhExpiration' +-- +-- * 'sdhMimeType' +-- +-- * 'sdhApplicationReadable' +-- +-- * 'sdhDirectory' +staticDirectoryHandler + :: StaticDirectoryHandler +staticDirectoryHandler = + StaticDirectoryHandler + { _sdhHttpHeaders = Nothing + , _sdhRequireMatchingFile = Nothing + , _sdhExpiration = Nothing + , _sdhMimeType = Nothing + , _sdhApplicationReadable = Nothing + , _sdhDirectory = Nothing + } + +-- | HTTP headers to use for all responses from these URLs. +sdhHttpHeaders :: Lens' StaticDirectoryHandler (Maybe StaticDirectoryHandlerHTTPHeaders) +sdhHttpHeaders + = lens _sdhHttpHeaders + (\ s a -> s{_sdhHttpHeaders = a}) + +-- | If true, this UrlMap entry does not match the request unless the file +-- referenced by the handler also exists. If no such file exists, +-- processing will continue with the next UrlMap that matches the requested +-- URL. +sdhRequireMatchingFile :: Lens' StaticDirectoryHandler (Maybe Bool) +sdhRequireMatchingFile + = lens _sdhRequireMatchingFile + (\ s a -> s{_sdhRequireMatchingFile = a}) + +-- | The length of time a static file served by this handler ought to be +-- cached by web proxies and browsers. +sdhExpiration :: Lens' StaticDirectoryHandler (Maybe Text) +sdhExpiration + = lens _sdhExpiration + (\ s a -> s{_sdhExpiration = a}) + +-- | If specified, all files served by this handler will be served using the +-- specified MIME type. If not specified, the MIME type for a file will be +-- derived from the file\'s filename extension. +sdhMimeType :: Lens' StaticDirectoryHandler (Maybe Text) +sdhMimeType + = lens _sdhMimeType (\ s a -> s{_sdhMimeType = a}) + +-- | By default, files declared in static file handlers are uploaded as +-- static data and are only served to end users, they cannot be read by an +-- application. If this field is set to true, the files are also uploaded +-- as code data so your application can read them. Both uploads are charged +-- against your code and static data storage resource quotas. +sdhApplicationReadable :: Lens' StaticDirectoryHandler (Maybe Bool) +sdhApplicationReadable + = lens _sdhApplicationReadable + (\ s a -> s{_sdhApplicationReadable = a}) + +-- | The path to the directory containing the static files, from the +-- application root directory. Everything after the end of the matched url +-- pattern is appended to static_dir to form the full path to the requested +-- file. +sdhDirectory :: Lens' StaticDirectoryHandler (Maybe Text) +sdhDirectory + = lens _sdhDirectory (\ s a -> s{_sdhDirectory = a}) + +instance FromJSON StaticDirectoryHandler where + parseJSON + = withObject "StaticDirectoryHandler" + (\ o -> + StaticDirectoryHandler <$> + (o .:? "httpHeaders") <*> + (o .:? "requireMatchingFile") + <*> (o .:? "expiration") + <*> (o .:? "mimeType") + <*> (o .:? "applicationReadable") + <*> (o .:? "directory")) + +instance ToJSON StaticDirectoryHandler where + toJSON StaticDirectoryHandler{..} + = object + (catMaybes + [("httpHeaders" .=) <$> _sdhHttpHeaders, + ("requireMatchingFile" .=) <$> + _sdhRequireMatchingFile, + ("expiration" .=) <$> _sdhExpiration, + ("mimeType" .=) <$> _sdhMimeType, + ("applicationReadable" .=) <$> + _sdhApplicationReadable, + ("directory" .=) <$> _sdhDirectory]) diff --git a/gogol-appengine/gen/Network/Google/AppEngine/Types/Sum.hs b/gogol-appengine/gen/Network/Google/AppEngine/Types/Sum.hs new file mode 100644 index 000000000..35cffd92b --- /dev/null +++ b/gogol-appengine/gen/Network/Google/AppEngine/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppEngine.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppEngine.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Get.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Get.hs new file mode 100644 index 000000000..40e1dbba7 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Get.hs @@ -0,0 +1,237 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about an application. +-- +-- /See:/ for @AppengineAppsGet@. +module AppEngine.Apps.Get + ( + -- * REST Resource + AppsGetAPI + + -- * Creating a Request + , appsGet + , AppsGet + + -- * Request Lenses + , agXgafv + , agQuotaUser + , agPrettyPrint + , agUploadProtocol + , agPp + , agAccessToken + , agUploadType + , agBearerToken + , agKey + , agAppsId + , agEnsureResourcesExist + , agOauthToken + , agFields + , agCallback + , agAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsGet@ which the +-- 'AppsGet' request conforms to. +type AppsGetAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + QueryParam "ensureResourcesExist" Bool :> + Get '[JSON] Application + +-- | Gets information about an application. +-- +-- /See:/ 'appsGet' smart constructor. +data AppsGet = AppsGet + { _agXgafv :: !(Maybe Text) + , _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUploadProtocol :: !(Maybe Text) + , _agPp :: !Bool + , _agAccessToken :: !(Maybe Text) + , _agUploadType :: !(Maybe Text) + , _agBearerToken :: !(Maybe Text) + , _agKey :: !(Maybe Text) + , _agAppsId :: !Text + , _agEnsureResourcesExist :: !(Maybe Bool) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agCallback :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agXgafv' +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUploadProtocol' +-- +-- * 'agPp' +-- +-- * 'agAccessToken' +-- +-- * 'agUploadType' +-- +-- * 'agBearerToken' +-- +-- * 'agKey' +-- +-- * 'agAppsId' +-- +-- * 'agEnsureResourcesExist' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agCallback' +-- +-- * 'agAlt' +appsGet + :: Text -- ^ 'appsId' + -> AppsGet +appsGet pAgAppsId_ = + AppsGet + { _agXgafv = Nothing + , _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUploadProtocol = Nothing + , _agPp = True + , _agAccessToken = Nothing + , _agUploadType = Nothing + , _agBearerToken = Nothing + , _agKey = Nothing + , _agAppsId = pAgAppsId_ + , _agEnsureResourcesExist = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agCallback = Nothing + , _agAlt = "json" + } + +-- | V1 error format. +agXgafv :: Lens' AppsGet' (Maybe Text) +agXgafv = lens _agXgafv (\ s a -> s{_agXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +agQuotaUser :: Lens' AppsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AppsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +agUploadProtocol :: Lens' AppsGet' (Maybe Text) +agUploadProtocol + = lens _agUploadProtocol + (\ s a -> s{_agUploadProtocol = a}) + +-- | Pretty-print response. +agPp :: Lens' AppsGet' Bool +agPp = lens _agPp (\ s a -> s{_agPp = a}) + +-- | OAuth access token. +agAccessToken :: Lens' AppsGet' (Maybe Text) +agAccessToken + = lens _agAccessToken + (\ s a -> s{_agAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +agUploadType :: Lens' AppsGet' (Maybe Text) +agUploadType + = lens _agUploadType (\ s a -> s{_agUploadType = a}) + +-- | OAuth bearer token. +agBearerToken :: Lens' AppsGet' (Maybe Text) +agBearerToken + = lens _agBearerToken + (\ s a -> s{_agBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AppsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | Part of \`name\`. Name of the application to get. For example: +-- \"apps\/myapp\". +agAppsId :: Lens' AppsGet' Text +agAppsId = lens _agAppsId (\ s a -> s{_agAppsId = a}) + +-- | Certain resources associated with an application are created on-demand. +-- Controls whether these resources should be created when performing the +-- \`GET\` operation. If specified and any resources cloud not be created, +-- the request will fail with an error code. +agEnsureResourcesExist :: Lens' AppsGet' (Maybe Bool) +agEnsureResourcesExist + = lens _agEnsureResourcesExist + (\ s a -> s{_agEnsureResourcesExist = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AppsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AppsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | JSONP +agCallback :: Lens' AppsGet' (Maybe Text) +agCallback + = lens _agCallback (\ s a -> s{_agCallback = a}) + +-- | Data format for response. +agAlt :: Lens' AppsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AppsGet' where + type Rs AppsGet' = Application + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsGet{..} + = go _agXgafv _agQuotaUser _agPrettyPrint + _agUploadProtocol + _agPp + _agAccessToken + _agUploadType + _agBearerToken + _agKey + _agAppsId + _agEnsureResourcesExist + _agOauthToken + _agFields + _agCallback + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AppsGetAPI) r u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Delete.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Delete.hs new file mode 100644 index 000000000..44bcb7334 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Delete.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a module and all enclosed versions. +-- +-- /See:/ for @AppengineAppsModulesDelete@. +module AppEngine.Apps.Modules.Delete + ( + -- * REST Resource + AppsModulesDeleteAPI + + -- * Creating a Request + , appsModulesDelete + , AppsModulesDelete + + -- * Request Lenses + , amdXgafv + , amdQuotaUser + , amdPrettyPrint + , amdUploadProtocol + , amdPp + , amdAccessToken + , amdUploadType + , amdModulesId + , amdBearerToken + , amdKey + , amdAppsId + , amdOauthToken + , amdFields + , amdCallback + , amdAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesDelete@ which the +-- 'AppsModulesDelete' request conforms to. +type AppsModulesDeleteAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> Delete '[JSON] Operation + +-- | Deletes a module and all enclosed versions. +-- +-- /See:/ 'appsModulesDelete' smart constructor. +data AppsModulesDelete = AppsModulesDelete + { _amdXgafv :: !(Maybe Text) + , _amdQuotaUser :: !(Maybe Text) + , _amdPrettyPrint :: !Bool + , _amdUploadProtocol :: !(Maybe Text) + , _amdPp :: !Bool + , _amdAccessToken :: !(Maybe Text) + , _amdUploadType :: !(Maybe Text) + , _amdModulesId :: !Text + , _amdBearerToken :: !(Maybe Text) + , _amdKey :: !(Maybe Text) + , _amdAppsId :: !Text + , _amdOauthToken :: !(Maybe Text) + , _amdFields :: !(Maybe Text) + , _amdCallback :: !(Maybe Text) + , _amdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amdXgafv' +-- +-- * 'amdQuotaUser' +-- +-- * 'amdPrettyPrint' +-- +-- * 'amdUploadProtocol' +-- +-- * 'amdPp' +-- +-- * 'amdAccessToken' +-- +-- * 'amdUploadType' +-- +-- * 'amdModulesId' +-- +-- * 'amdBearerToken' +-- +-- * 'amdKey' +-- +-- * 'amdAppsId' +-- +-- * 'amdOauthToken' +-- +-- * 'amdFields' +-- +-- * 'amdCallback' +-- +-- * 'amdAlt' +appsModulesDelete + :: Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesDelete +appsModulesDelete pAmdModulesId_ pAmdAppsId_ = + AppsModulesDelete + { _amdXgafv = Nothing + , _amdQuotaUser = Nothing + , _amdPrettyPrint = True + , _amdUploadProtocol = Nothing + , _amdPp = True + , _amdAccessToken = Nothing + , _amdUploadType = Nothing + , _amdModulesId = pAmdModulesId_ + , _amdBearerToken = Nothing + , _amdKey = Nothing + , _amdAppsId = pAmdAppsId_ + , _amdOauthToken = Nothing + , _amdFields = Nothing + , _amdCallback = Nothing + , _amdAlt = "json" + } + +-- | V1 error format. +amdXgafv :: Lens' AppsModulesDelete' (Maybe Text) +amdXgafv = lens _amdXgafv (\ s a -> s{_amdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amdQuotaUser :: Lens' AppsModulesDelete' (Maybe Text) +amdQuotaUser + = lens _amdQuotaUser (\ s a -> s{_amdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amdPrettyPrint :: Lens' AppsModulesDelete' Bool +amdPrettyPrint + = lens _amdPrettyPrint + (\ s a -> s{_amdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amdUploadProtocol :: Lens' AppsModulesDelete' (Maybe Text) +amdUploadProtocol + = lens _amdUploadProtocol + (\ s a -> s{_amdUploadProtocol = a}) + +-- | Pretty-print response. +amdPp :: Lens' AppsModulesDelete' Bool +amdPp = lens _amdPp (\ s a -> s{_amdPp = a}) + +-- | OAuth access token. +amdAccessToken :: Lens' AppsModulesDelete' (Maybe Text) +amdAccessToken + = lens _amdAccessToken + (\ s a -> s{_amdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amdUploadType :: Lens' AppsModulesDelete' (Maybe Text) +amdUploadType + = lens _amdUploadType + (\ s a -> s{_amdUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amdModulesId :: Lens' AppsModulesDelete' Text +amdModulesId + = lens _amdModulesId (\ s a -> s{_amdModulesId = a}) + +-- | OAuth bearer token. +amdBearerToken :: Lens' AppsModulesDelete' (Maybe Text) +amdBearerToken + = lens _amdBearerToken + (\ s a -> s{_amdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amdKey :: Lens' AppsModulesDelete' (Maybe Text) +amdKey = lens _amdKey (\ s a -> s{_amdKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\/modules\/default\". +amdAppsId :: Lens' AppsModulesDelete' Text +amdAppsId + = lens _amdAppsId (\ s a -> s{_amdAppsId = a}) + +-- | OAuth 2.0 token for the current user. +amdOauthToken :: Lens' AppsModulesDelete' (Maybe Text) +amdOauthToken + = lens _amdOauthToken + (\ s a -> s{_amdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amdFields :: Lens' AppsModulesDelete' (Maybe Text) +amdFields + = lens _amdFields (\ s a -> s{_amdFields = a}) + +-- | JSONP +amdCallback :: Lens' AppsModulesDelete' (Maybe Text) +amdCallback + = lens _amdCallback (\ s a -> s{_amdCallback = a}) + +-- | Data format for response. +amdAlt :: Lens' AppsModulesDelete' Text +amdAlt = lens _amdAlt (\ s a -> s{_amdAlt = a}) + +instance GoogleRequest AppsModulesDelete' where + type Rs AppsModulesDelete' = Operation + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesDelete{..} + = go _amdXgafv _amdQuotaUser _amdPrettyPrint + _amdUploadProtocol + _amdPp + _amdAccessToken + _amdUploadType + _amdModulesId + _amdBearerToken + _amdKey + _amdAppsId + _amdOauthToken + _amdFields + _amdCallback + _amdAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesDeleteAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Get.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Get.hs new file mode 100644 index 000000000..36fad1d0e --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Get.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the current configuration of the module. +-- +-- /See:/ for @AppengineAppsModulesGet@. +module AppEngine.Apps.Modules.Get + ( + -- * REST Resource + AppsModulesGetAPI + + -- * Creating a Request + , appsModulesGet + , AppsModulesGet + + -- * Request Lenses + , amgXgafv + , amgQuotaUser + , amgPrettyPrint + , amgUploadProtocol + , amgPp + , amgAccessToken + , amgUploadType + , amgModulesId + , amgBearerToken + , amgKey + , amgAppsId + , amgOauthToken + , amgFields + , amgCallback + , amgAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesGet@ which the +-- 'AppsModulesGet' request conforms to. +type AppsModulesGetAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> Get '[JSON] Module + +-- | Gets the current configuration of the module. +-- +-- /See:/ 'appsModulesGet' smart constructor. +data AppsModulesGet = AppsModulesGet + { _amgXgafv :: !(Maybe Text) + , _amgQuotaUser :: !(Maybe Text) + , _amgPrettyPrint :: !Bool + , _amgUploadProtocol :: !(Maybe Text) + , _amgPp :: !Bool + , _amgAccessToken :: !(Maybe Text) + , _amgUploadType :: !(Maybe Text) + , _amgModulesId :: !Text + , _amgBearerToken :: !(Maybe Text) + , _amgKey :: !(Maybe Text) + , _amgAppsId :: !Text + , _amgOauthToken :: !(Maybe Text) + , _amgFields :: !(Maybe Text) + , _amgCallback :: !(Maybe Text) + , _amgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amgXgafv' +-- +-- * 'amgQuotaUser' +-- +-- * 'amgPrettyPrint' +-- +-- * 'amgUploadProtocol' +-- +-- * 'amgPp' +-- +-- * 'amgAccessToken' +-- +-- * 'amgUploadType' +-- +-- * 'amgModulesId' +-- +-- * 'amgBearerToken' +-- +-- * 'amgKey' +-- +-- * 'amgAppsId' +-- +-- * 'amgOauthToken' +-- +-- * 'amgFields' +-- +-- * 'amgCallback' +-- +-- * 'amgAlt' +appsModulesGet + :: Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesGet +appsModulesGet pAmgModulesId_ pAmgAppsId_ = + AppsModulesGet + { _amgXgafv = Nothing + , _amgQuotaUser = Nothing + , _amgPrettyPrint = True + , _amgUploadProtocol = Nothing + , _amgPp = True + , _amgAccessToken = Nothing + , _amgUploadType = Nothing + , _amgModulesId = pAmgModulesId_ + , _amgBearerToken = Nothing + , _amgKey = Nothing + , _amgAppsId = pAmgAppsId_ + , _amgOauthToken = Nothing + , _amgFields = Nothing + , _amgCallback = Nothing + , _amgAlt = "json" + } + +-- | V1 error format. +amgXgafv :: Lens' AppsModulesGet' (Maybe Text) +amgXgafv = lens _amgXgafv (\ s a -> s{_amgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amgQuotaUser :: Lens' AppsModulesGet' (Maybe Text) +amgQuotaUser + = lens _amgQuotaUser (\ s a -> s{_amgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amgPrettyPrint :: Lens' AppsModulesGet' Bool +amgPrettyPrint + = lens _amgPrettyPrint + (\ s a -> s{_amgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amgUploadProtocol :: Lens' AppsModulesGet' (Maybe Text) +amgUploadProtocol + = lens _amgUploadProtocol + (\ s a -> s{_amgUploadProtocol = a}) + +-- | Pretty-print response. +amgPp :: Lens' AppsModulesGet' Bool +amgPp = lens _amgPp (\ s a -> s{_amgPp = a}) + +-- | OAuth access token. +amgAccessToken :: Lens' AppsModulesGet' (Maybe Text) +amgAccessToken + = lens _amgAccessToken + (\ s a -> s{_amgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amgUploadType :: Lens' AppsModulesGet' (Maybe Text) +amgUploadType + = lens _amgUploadType + (\ s a -> s{_amgUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amgModulesId :: Lens' AppsModulesGet' Text +amgModulesId + = lens _amgModulesId (\ s a -> s{_amgModulesId = a}) + +-- | OAuth bearer token. +amgBearerToken :: Lens' AppsModulesGet' (Maybe Text) +amgBearerToken + = lens _amgBearerToken + (\ s a -> s{_amgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amgKey :: Lens' AppsModulesGet' (Maybe Text) +amgKey = lens _amgKey (\ s a -> s{_amgKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\/modules\/default\". +amgAppsId :: Lens' AppsModulesGet' Text +amgAppsId + = lens _amgAppsId (\ s a -> s{_amgAppsId = a}) + +-- | OAuth 2.0 token for the current user. +amgOauthToken :: Lens' AppsModulesGet' (Maybe Text) +amgOauthToken + = lens _amgOauthToken + (\ s a -> s{_amgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amgFields :: Lens' AppsModulesGet' (Maybe Text) +amgFields + = lens _amgFields (\ s a -> s{_amgFields = a}) + +-- | JSONP +amgCallback :: Lens' AppsModulesGet' (Maybe Text) +amgCallback + = lens _amgCallback (\ s a -> s{_amgCallback = a}) + +-- | Data format for response. +amgAlt :: Lens' AppsModulesGet' Text +amgAlt = lens _amgAlt (\ s a -> s{_amgAlt = a}) + +instance GoogleRequest AppsModulesGet' where + type Rs AppsModulesGet' = Module + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesGet{..} + = go _amgXgafv _amgQuotaUser _amgPrettyPrint + _amgUploadProtocol + _amgPp + _amgAccessToken + _amgUploadType + _amgModulesId + _amgBearerToken + _amgKey + _amgAppsId + _amgOauthToken + _amgFields + _amgCallback + _amgAlt + where go + = clientWithRoute (Proxy :: Proxy AppsModulesGetAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/List.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/List.hs new file mode 100644 index 000000000..96643afa3 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/List.hs @@ -0,0 +1,252 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the modules in the application. +-- +-- /See:/ for @AppengineAppsModulesList@. +module AppEngine.Apps.Modules.List + ( + -- * REST Resource + AppsModulesListAPI + + -- * Creating a Request + , appsModulesList + , AppsModulesList + + -- * Request Lenses + , amlXgafv + , amlQuotaUser + , amlPrettyPrint + , amlUploadProtocol + , amlPp + , amlAccessToken + , amlUploadType + , amlBearerToken + , amlKey + , amlAppsId + , amlPageToken + , amlOauthToken + , amlPageSize + , amlFields + , amlCallback + , amlAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesList@ which the +-- 'AppsModulesList' request conforms to. +type AppsModulesListAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListModulesResponse + +-- | Lists all the modules in the application. +-- +-- /See:/ 'appsModulesList' smart constructor. +data AppsModulesList = AppsModulesList + { _amlXgafv :: !(Maybe Text) + , _amlQuotaUser :: !(Maybe Text) + , _amlPrettyPrint :: !Bool + , _amlUploadProtocol :: !(Maybe Text) + , _amlPp :: !Bool + , _amlAccessToken :: !(Maybe Text) + , _amlUploadType :: !(Maybe Text) + , _amlBearerToken :: !(Maybe Text) + , _amlKey :: !(Maybe Text) + , _amlAppsId :: !Text + , _amlPageToken :: !(Maybe Text) + , _amlOauthToken :: !(Maybe Text) + , _amlPageSize :: !(Maybe Int32) + , _amlFields :: !(Maybe Text) + , _amlCallback :: !(Maybe Text) + , _amlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amlXgafv' +-- +-- * 'amlQuotaUser' +-- +-- * 'amlPrettyPrint' +-- +-- * 'amlUploadProtocol' +-- +-- * 'amlPp' +-- +-- * 'amlAccessToken' +-- +-- * 'amlUploadType' +-- +-- * 'amlBearerToken' +-- +-- * 'amlKey' +-- +-- * 'amlAppsId' +-- +-- * 'amlPageToken' +-- +-- * 'amlOauthToken' +-- +-- * 'amlPageSize' +-- +-- * 'amlFields' +-- +-- * 'amlCallback' +-- +-- * 'amlAlt' +appsModulesList + :: Text -- ^ 'appsId' + -> AppsModulesList +appsModulesList pAmlAppsId_ = + AppsModulesList + { _amlXgafv = Nothing + , _amlQuotaUser = Nothing + , _amlPrettyPrint = True + , _amlUploadProtocol = Nothing + , _amlPp = True + , _amlAccessToken = Nothing + , _amlUploadType = Nothing + , _amlBearerToken = Nothing + , _amlKey = Nothing + , _amlAppsId = pAmlAppsId_ + , _amlPageToken = Nothing + , _amlOauthToken = Nothing + , _amlPageSize = Nothing + , _amlFields = Nothing + , _amlCallback = Nothing + , _amlAlt = "json" + } + +-- | V1 error format. +amlXgafv :: Lens' AppsModulesList' (Maybe Text) +amlXgafv = lens _amlXgafv (\ s a -> s{_amlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amlQuotaUser :: Lens' AppsModulesList' (Maybe Text) +amlQuotaUser + = lens _amlQuotaUser (\ s a -> s{_amlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amlPrettyPrint :: Lens' AppsModulesList' Bool +amlPrettyPrint + = lens _amlPrettyPrint + (\ s a -> s{_amlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amlUploadProtocol :: Lens' AppsModulesList' (Maybe Text) +amlUploadProtocol + = lens _amlUploadProtocol + (\ s a -> s{_amlUploadProtocol = a}) + +-- | Pretty-print response. +amlPp :: Lens' AppsModulesList' Bool +amlPp = lens _amlPp (\ s a -> s{_amlPp = a}) + +-- | OAuth access token. +amlAccessToken :: Lens' AppsModulesList' (Maybe Text) +amlAccessToken + = lens _amlAccessToken + (\ s a -> s{_amlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amlUploadType :: Lens' AppsModulesList' (Maybe Text) +amlUploadType + = lens _amlUploadType + (\ s a -> s{_amlUploadType = a}) + +-- | OAuth bearer token. +amlBearerToken :: Lens' AppsModulesList' (Maybe Text) +amlBearerToken + = lens _amlBearerToken + (\ s a -> s{_amlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amlKey :: Lens' AppsModulesList' (Maybe Text) +amlKey = lens _amlKey (\ s a -> s{_amlKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\". +amlAppsId :: Lens' AppsModulesList' Text +amlAppsId + = lens _amlAppsId (\ s a -> s{_amlAppsId = a}) + +-- | Continuation token for fetching the next page of results. +amlPageToken :: Lens' AppsModulesList' (Maybe Text) +amlPageToken + = lens _amlPageToken (\ s a -> s{_amlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +amlOauthToken :: Lens' AppsModulesList' (Maybe Text) +amlOauthToken + = lens _amlOauthToken + (\ s a -> s{_amlOauthToken = a}) + +-- | Maximum results to return per page. +amlPageSize :: Lens' AppsModulesList' (Maybe Int32) +amlPageSize + = lens _amlPageSize (\ s a -> s{_amlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +amlFields :: Lens' AppsModulesList' (Maybe Text) +amlFields + = lens _amlFields (\ s a -> s{_amlFields = a}) + +-- | JSONP +amlCallback :: Lens' AppsModulesList' (Maybe Text) +amlCallback + = lens _amlCallback (\ s a -> s{_amlCallback = a}) + +-- | Data format for response. +amlAlt :: Lens' AppsModulesList' Text +amlAlt = lens _amlAlt (\ s a -> s{_amlAlt = a}) + +instance GoogleRequest AppsModulesList' where + type Rs AppsModulesList' = ListModulesResponse + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesList{..} + = go _amlXgafv _amlQuotaUser _amlPrettyPrint + _amlUploadProtocol + _amlPp + _amlAccessToken + _amlUploadType + _amlBearerToken + _amlKey + _amlAppsId + _amlPageToken + _amlOauthToken + _amlPageSize + _amlFields + _amlCallback + _amlAlt + where go + = clientWithRoute (Proxy :: Proxy AppsModulesListAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Patch.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Patch.hs new file mode 100644 index 000000000..94d7d92a4 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Patch.hs @@ -0,0 +1,266 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the configuration of the specified module. +-- +-- /See:/ for @AppengineAppsModulesPatch@. +module AppEngine.Apps.Modules.Patch + ( + -- * REST Resource + AppsModulesPatchAPI + + -- * Creating a Request + , appsModulesPatch + , AppsModulesPatch + + -- * Request Lenses + , ampXgafv + , ampQuotaUser + , ampPrettyPrint + , ampUploadProtocol + , ampPp + , ampAccessToken + , ampUploadType + , ampModulesId + , ampMigrateTraffic + , ampMask + , ampBearerToken + , ampKey + , ampAppsId + , ampOauthToken + , ampFields + , ampCallback + , ampAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesPatch@ which the +-- 'AppsModulesPatch' request conforms to. +type AppsModulesPatchAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> + QueryParam "migrateTraffic" Bool :> + QueryParam "mask" Text :> Patch '[JSON] Operation + +-- | Updates the configuration of the specified module. +-- +-- /See:/ 'appsModulesPatch' smart constructor. +data AppsModulesPatch = AppsModulesPatch + { _ampXgafv :: !(Maybe Text) + , _ampQuotaUser :: !(Maybe Text) + , _ampPrettyPrint :: !Bool + , _ampUploadProtocol :: !(Maybe Text) + , _ampPp :: !Bool + , _ampAccessToken :: !(Maybe Text) + , _ampUploadType :: !(Maybe Text) + , _ampModulesId :: !Text + , _ampMigrateTraffic :: !(Maybe Bool) + , _ampMask :: !(Maybe Text) + , _ampBearerToken :: !(Maybe Text) + , _ampKey :: !(Maybe Text) + , _ampAppsId :: !Text + , _ampOauthToken :: !(Maybe Text) + , _ampFields :: !(Maybe Text) + , _ampCallback :: !(Maybe Text) + , _ampAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ampXgafv' +-- +-- * 'ampQuotaUser' +-- +-- * 'ampPrettyPrint' +-- +-- * 'ampUploadProtocol' +-- +-- * 'ampPp' +-- +-- * 'ampAccessToken' +-- +-- * 'ampUploadType' +-- +-- * 'ampModulesId' +-- +-- * 'ampMigrateTraffic' +-- +-- * 'ampMask' +-- +-- * 'ampBearerToken' +-- +-- * 'ampKey' +-- +-- * 'ampAppsId' +-- +-- * 'ampOauthToken' +-- +-- * 'ampFields' +-- +-- * 'ampCallback' +-- +-- * 'ampAlt' +appsModulesPatch + :: Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesPatch +appsModulesPatch pAmpModulesId_ pAmpAppsId_ = + AppsModulesPatch + { _ampXgafv = Nothing + , _ampQuotaUser = Nothing + , _ampPrettyPrint = True + , _ampUploadProtocol = Nothing + , _ampPp = True + , _ampAccessToken = Nothing + , _ampUploadType = Nothing + , _ampModulesId = pAmpModulesId_ + , _ampMigrateTraffic = Nothing + , _ampMask = Nothing + , _ampBearerToken = Nothing + , _ampKey = Nothing + , _ampAppsId = pAmpAppsId_ + , _ampOauthToken = Nothing + , _ampFields = Nothing + , _ampCallback = Nothing + , _ampAlt = "json" + } + +-- | V1 error format. +ampXgafv :: Lens' AppsModulesPatch' (Maybe Text) +ampXgafv = lens _ampXgafv (\ s a -> s{_ampXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ampQuotaUser :: Lens' AppsModulesPatch' (Maybe Text) +ampQuotaUser + = lens _ampQuotaUser (\ s a -> s{_ampQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ampPrettyPrint :: Lens' AppsModulesPatch' Bool +ampPrettyPrint + = lens _ampPrettyPrint + (\ s a -> s{_ampPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ampUploadProtocol :: Lens' AppsModulesPatch' (Maybe Text) +ampUploadProtocol + = lens _ampUploadProtocol + (\ s a -> s{_ampUploadProtocol = a}) + +-- | Pretty-print response. +ampPp :: Lens' AppsModulesPatch' Bool +ampPp = lens _ampPp (\ s a -> s{_ampPp = a}) + +-- | OAuth access token. +ampAccessToken :: Lens' AppsModulesPatch' (Maybe Text) +ampAccessToken + = lens _ampAccessToken + (\ s a -> s{_ampAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ampUploadType :: Lens' AppsModulesPatch' (Maybe Text) +ampUploadType + = lens _ampUploadType + (\ s a -> s{_ampUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +ampModulesId :: Lens' AppsModulesPatch' Text +ampModulesId + = lens _ampModulesId (\ s a -> s{_ampModulesId = a}) + +-- | Whether to use Traffic Migration to shift traffic gradually. Traffic can +-- only be migrated from a single version to another single version. +ampMigrateTraffic :: Lens' AppsModulesPatch' (Maybe Bool) +ampMigrateTraffic + = lens _ampMigrateTraffic + (\ s a -> s{_ampMigrateTraffic = a}) + +-- | Standard field mask for the set of fields to be updated. +ampMask :: Lens' AppsModulesPatch' (Maybe Text) +ampMask = lens _ampMask (\ s a -> s{_ampMask = a}) + +-- | OAuth bearer token. +ampBearerToken :: Lens' AppsModulesPatch' (Maybe Text) +ampBearerToken + = lens _ampBearerToken + (\ s a -> s{_ampBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ampKey :: Lens' AppsModulesPatch' (Maybe Text) +ampKey = lens _ampKey (\ s a -> s{_ampKey = a}) + +-- | Part of \`name\`. Name of the resource to update. For example: +-- \"apps\/myapp\/modules\/default\". +ampAppsId :: Lens' AppsModulesPatch' Text +ampAppsId + = lens _ampAppsId (\ s a -> s{_ampAppsId = a}) + +-- | OAuth 2.0 token for the current user. +ampOauthToken :: Lens' AppsModulesPatch' (Maybe Text) +ampOauthToken + = lens _ampOauthToken + (\ s a -> s{_ampOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ampFields :: Lens' AppsModulesPatch' (Maybe Text) +ampFields + = lens _ampFields (\ s a -> s{_ampFields = a}) + +-- | JSONP +ampCallback :: Lens' AppsModulesPatch' (Maybe Text) +ampCallback + = lens _ampCallback (\ s a -> s{_ampCallback = a}) + +-- | Data format for response. +ampAlt :: Lens' AppsModulesPatch' Text +ampAlt = lens _ampAlt (\ s a -> s{_ampAlt = a}) + +instance GoogleRequest AppsModulesPatch' where + type Rs AppsModulesPatch' = Operation + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesPatch{..} + = go _ampXgafv _ampQuotaUser _ampPrettyPrint + _ampUploadProtocol + _ampPp + _ampAccessToken + _ampUploadType + _ampModulesId + _ampMigrateTraffic + _ampMask + _ampBearerToken + _ampKey + _ampAppsId + _ampOauthToken + _ampFields + _ampCallback + _ampAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesPatchAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Create.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Create.hs new file mode 100644 index 000000000..9a87c7a7d --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Create.hs @@ -0,0 +1,246 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Versions.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deploys new code and resource files to a version. +-- +-- /See:/ for @AppengineAppsModulesVersionsCreate@. +module AppEngine.Apps.Modules.Versions.Create + ( + -- * REST Resource + AppsModulesVersionsCreateAPI + + -- * Creating a Request + , appsModulesVersionsCreate + , AppsModulesVersionsCreate + + -- * Request Lenses + , amvcXgafv + , amvcQuotaUser + , amvcPrettyPrint + , amvcUploadProtocol + , amvcPp + , amvcAccessToken + , amvcUploadType + , amvcModulesId + , amvcBearerToken + , amvcKey + , amvcAppsId + , amvcOauthToken + , amvcFields + , amvcCallback + , amvcAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesVersionsCreate@ which the +-- 'AppsModulesVersionsCreate' request conforms to. +type AppsModulesVersionsCreateAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> + "versions" :> Post '[JSON] Operation + +-- | Deploys new code and resource files to a version. +-- +-- /See:/ 'appsModulesVersionsCreate' smart constructor. +data AppsModulesVersionsCreate = AppsModulesVersionsCreate + { _amvcXgafv :: !(Maybe Text) + , _amvcQuotaUser :: !(Maybe Text) + , _amvcPrettyPrint :: !Bool + , _amvcUploadProtocol :: !(Maybe Text) + , _amvcPp :: !Bool + , _amvcAccessToken :: !(Maybe Text) + , _amvcUploadType :: !(Maybe Text) + , _amvcModulesId :: !Text + , _amvcBearerToken :: !(Maybe Text) + , _amvcKey :: !(Maybe Text) + , _amvcAppsId :: !Text + , _amvcOauthToken :: !(Maybe Text) + , _amvcFields :: !(Maybe Text) + , _amvcCallback :: !(Maybe Text) + , _amvcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesVersionsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amvcXgafv' +-- +-- * 'amvcQuotaUser' +-- +-- * 'amvcPrettyPrint' +-- +-- * 'amvcUploadProtocol' +-- +-- * 'amvcPp' +-- +-- * 'amvcAccessToken' +-- +-- * 'amvcUploadType' +-- +-- * 'amvcModulesId' +-- +-- * 'amvcBearerToken' +-- +-- * 'amvcKey' +-- +-- * 'amvcAppsId' +-- +-- * 'amvcOauthToken' +-- +-- * 'amvcFields' +-- +-- * 'amvcCallback' +-- +-- * 'amvcAlt' +appsModulesVersionsCreate + :: Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesVersionsCreate +appsModulesVersionsCreate pAmvcModulesId_ pAmvcAppsId_ = + AppsModulesVersionsCreate + { _amvcXgafv = Nothing + , _amvcQuotaUser = Nothing + , _amvcPrettyPrint = True + , _amvcUploadProtocol = Nothing + , _amvcPp = True + , _amvcAccessToken = Nothing + , _amvcUploadType = Nothing + , _amvcModulesId = pAmvcModulesId_ + , _amvcBearerToken = Nothing + , _amvcKey = Nothing + , _amvcAppsId = pAmvcAppsId_ + , _amvcOauthToken = Nothing + , _amvcFields = Nothing + , _amvcCallback = Nothing + , _amvcAlt = "json" + } + +-- | V1 error format. +amvcXgafv :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcXgafv + = lens _amvcXgafv (\ s a -> s{_amvcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amvcQuotaUser :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcQuotaUser + = lens _amvcQuotaUser + (\ s a -> s{_amvcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amvcPrettyPrint :: Lens' AppsModulesVersionsCreate' Bool +amvcPrettyPrint + = lens _amvcPrettyPrint + (\ s a -> s{_amvcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amvcUploadProtocol :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcUploadProtocol + = lens _amvcUploadProtocol + (\ s a -> s{_amvcUploadProtocol = a}) + +-- | Pretty-print response. +amvcPp :: Lens' AppsModulesVersionsCreate' Bool +amvcPp = lens _amvcPp (\ s a -> s{_amvcPp = a}) + +-- | OAuth access token. +amvcAccessToken :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcAccessToken + = lens _amvcAccessToken + (\ s a -> s{_amvcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amvcUploadType :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcUploadType + = lens _amvcUploadType + (\ s a -> s{_amvcUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvcModulesId :: Lens' AppsModulesVersionsCreate' Text +amvcModulesId + = lens _amvcModulesId + (\ s a -> s{_amvcModulesId = a}) + +-- | OAuth bearer token. +amvcBearerToken :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcBearerToken + = lens _amvcBearerToken + (\ s a -> s{_amvcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amvcKey :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcKey = lens _amvcKey (\ s a -> s{_amvcKey = a}) + +-- | Part of \`name\`. Name of the resource to update. For example: +-- \"apps\/myapp\/modules\/default\". +amvcAppsId :: Lens' AppsModulesVersionsCreate' Text +amvcAppsId + = lens _amvcAppsId (\ s a -> s{_amvcAppsId = a}) + +-- | OAuth 2.0 token for the current user. +amvcOauthToken :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcOauthToken + = lens _amvcOauthToken + (\ s a -> s{_amvcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amvcFields :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcFields + = lens _amvcFields (\ s a -> s{_amvcFields = a}) + +-- | JSONP +amvcCallback :: Lens' AppsModulesVersionsCreate' (Maybe Text) +amvcCallback + = lens _amvcCallback (\ s a -> s{_amvcCallback = a}) + +-- | Data format for response. +amvcAlt :: Lens' AppsModulesVersionsCreate' Text +amvcAlt = lens _amvcAlt (\ s a -> s{_amvcAlt = a}) + +instance GoogleRequest AppsModulesVersionsCreate' + where + type Rs AppsModulesVersionsCreate' = Operation + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesVersionsCreate{..} + = go _amvcXgafv _amvcQuotaUser _amvcPrettyPrint + _amvcUploadProtocol + _amvcPp + _amvcAccessToken + _amvcUploadType + _amvcModulesId + _amvcBearerToken + _amvcKey + _amvcAppsId + _amvcOauthToken + _amvcFields + _amvcCallback + _amvcAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesVersionsCreateAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Delete.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Delete.hs new file mode 100644 index 000000000..e9b9f00a5 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Delete.hs @@ -0,0 +1,260 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Versions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing version. +-- +-- /See:/ for @AppengineAppsModulesVersionsDelete@. +module AppEngine.Apps.Modules.Versions.Delete + ( + -- * REST Resource + AppsModulesVersionsDeleteAPI + + -- * Creating a Request + , appsModulesVersionsDelete + , AppsModulesVersionsDelete + + -- * Request Lenses + , amvdXgafv + , amvdQuotaUser + , amvdPrettyPrint + , amvdUploadProtocol + , amvdPp + , amvdAccessToken + , amvdUploadType + , amvdVersionsId + , amvdModulesId + , amvdBearerToken + , amvdKey + , amvdAppsId + , amvdOauthToken + , amvdFields + , amvdCallback + , amvdAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesVersionsDelete@ which the +-- 'AppsModulesVersionsDelete' request conforms to. +type AppsModulesVersionsDeleteAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> + "versions" :> + Capture "versionsId" Text :> Delete '[JSON] Operation + +-- | Deletes an existing version. +-- +-- /See:/ 'appsModulesVersionsDelete' smart constructor. +data AppsModulesVersionsDelete = AppsModulesVersionsDelete + { _amvdXgafv :: !(Maybe Text) + , _amvdQuotaUser :: !(Maybe Text) + , _amvdPrettyPrint :: !Bool + , _amvdUploadProtocol :: !(Maybe Text) + , _amvdPp :: !Bool + , _amvdAccessToken :: !(Maybe Text) + , _amvdUploadType :: !(Maybe Text) + , _amvdVersionsId :: !Text + , _amvdModulesId :: !Text + , _amvdBearerToken :: !(Maybe Text) + , _amvdKey :: !(Maybe Text) + , _amvdAppsId :: !Text + , _amvdOauthToken :: !(Maybe Text) + , _amvdFields :: !(Maybe Text) + , _amvdCallback :: !(Maybe Text) + , _amvdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesVersionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amvdXgafv' +-- +-- * 'amvdQuotaUser' +-- +-- * 'amvdPrettyPrint' +-- +-- * 'amvdUploadProtocol' +-- +-- * 'amvdPp' +-- +-- * 'amvdAccessToken' +-- +-- * 'amvdUploadType' +-- +-- * 'amvdVersionsId' +-- +-- * 'amvdModulesId' +-- +-- * 'amvdBearerToken' +-- +-- * 'amvdKey' +-- +-- * 'amvdAppsId' +-- +-- * 'amvdOauthToken' +-- +-- * 'amvdFields' +-- +-- * 'amvdCallback' +-- +-- * 'amvdAlt' +appsModulesVersionsDelete + :: Text -- ^ 'versionsId' + -> Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesVersionsDelete +appsModulesVersionsDelete pAmvdVersionsId_ pAmvdModulesId_ pAmvdAppsId_ = + AppsModulesVersionsDelete + { _amvdXgafv = Nothing + , _amvdQuotaUser = Nothing + , _amvdPrettyPrint = True + , _amvdUploadProtocol = Nothing + , _amvdPp = True + , _amvdAccessToken = Nothing + , _amvdUploadType = Nothing + , _amvdVersionsId = pAmvdVersionsId_ + , _amvdModulesId = pAmvdModulesId_ + , _amvdBearerToken = Nothing + , _amvdKey = Nothing + , _amvdAppsId = pAmvdAppsId_ + , _amvdOauthToken = Nothing + , _amvdFields = Nothing + , _amvdCallback = Nothing + , _amvdAlt = "json" + } + +-- | V1 error format. +amvdXgafv :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdXgafv + = lens _amvdXgafv (\ s a -> s{_amvdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amvdQuotaUser :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdQuotaUser + = lens _amvdQuotaUser + (\ s a -> s{_amvdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amvdPrettyPrint :: Lens' AppsModulesVersionsDelete' Bool +amvdPrettyPrint + = lens _amvdPrettyPrint + (\ s a -> s{_amvdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amvdUploadProtocol :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdUploadProtocol + = lens _amvdUploadProtocol + (\ s a -> s{_amvdUploadProtocol = a}) + +-- | Pretty-print response. +amvdPp :: Lens' AppsModulesVersionsDelete' Bool +amvdPp = lens _amvdPp (\ s a -> s{_amvdPp = a}) + +-- | OAuth access token. +amvdAccessToken :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdAccessToken + = lens _amvdAccessToken + (\ s a -> s{_amvdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amvdUploadType :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdUploadType + = lens _amvdUploadType + (\ s a -> s{_amvdUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvdVersionsId :: Lens' AppsModulesVersionsDelete' Text +amvdVersionsId + = lens _amvdVersionsId + (\ s a -> s{_amvdVersionsId = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvdModulesId :: Lens' AppsModulesVersionsDelete' Text +amvdModulesId + = lens _amvdModulesId + (\ s a -> s{_amvdModulesId = a}) + +-- | OAuth bearer token. +amvdBearerToken :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdBearerToken + = lens _amvdBearerToken + (\ s a -> s{_amvdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amvdKey :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdKey = lens _amvdKey (\ s a -> s{_amvdKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\/modules\/default\/versions\/v1\". +amvdAppsId :: Lens' AppsModulesVersionsDelete' Text +amvdAppsId + = lens _amvdAppsId (\ s a -> s{_amvdAppsId = a}) + +-- | OAuth 2.0 token for the current user. +amvdOauthToken :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdOauthToken + = lens _amvdOauthToken + (\ s a -> s{_amvdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amvdFields :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdFields + = lens _amvdFields (\ s a -> s{_amvdFields = a}) + +-- | JSONP +amvdCallback :: Lens' AppsModulesVersionsDelete' (Maybe Text) +amvdCallback + = lens _amvdCallback (\ s a -> s{_amvdCallback = a}) + +-- | Data format for response. +amvdAlt :: Lens' AppsModulesVersionsDelete' Text +amvdAlt = lens _amvdAlt (\ s a -> s{_amvdAlt = a}) + +instance GoogleRequest AppsModulesVersionsDelete' + where + type Rs AppsModulesVersionsDelete' = Operation + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesVersionsDelete{..} + = go _amvdXgafv _amvdQuotaUser _amvdPrettyPrint + _amvdUploadProtocol + _amvdPp + _amvdAccessToken + _amvdUploadType + _amvdVersionsId + _amvdModulesId + _amvdBearerToken + _amvdKey + _amvdAppsId + _amvdOauthToken + _amvdFields + _amvdCallback + _amvdAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesVersionsDeleteAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Get.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Get.hs new file mode 100644 index 000000000..d5bc2ee10 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/Get.hs @@ -0,0 +1,270 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Versions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets application deployment information. +-- +-- /See:/ for @AppengineAppsModulesVersionsGet@. +module AppEngine.Apps.Modules.Versions.Get + ( + -- * REST Resource + AppsModulesVersionsGetAPI + + -- * Creating a Request + , appsModulesVersionsGet + , AppsModulesVersionsGet + + -- * Request Lenses + , amvgXgafv + , amvgQuotaUser + , amvgPrettyPrint + , amvgUploadProtocol + , amvgPp + , amvgAccessToken + , amvgUploadType + , amvgVersionsId + , amvgModulesId + , amvgBearerToken + , amvgKey + , amvgAppsId + , amvgView + , amvgOauthToken + , amvgFields + , amvgCallback + , amvgAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesVersionsGet@ which the +-- 'AppsModulesVersionsGet' request conforms to. +type AppsModulesVersionsGetAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> + "versions" :> + Capture "versionsId" Text :> + QueryParam "view" Text :> Get '[JSON] Version + +-- | Gets application deployment information. +-- +-- /See:/ 'appsModulesVersionsGet' smart constructor. +data AppsModulesVersionsGet = AppsModulesVersionsGet + { _amvgXgafv :: !(Maybe Text) + , _amvgQuotaUser :: !(Maybe Text) + , _amvgPrettyPrint :: !Bool + , _amvgUploadProtocol :: !(Maybe Text) + , _amvgPp :: !Bool + , _amvgAccessToken :: !(Maybe Text) + , _amvgUploadType :: !(Maybe Text) + , _amvgVersionsId :: !Text + , _amvgModulesId :: !Text + , _amvgBearerToken :: !(Maybe Text) + , _amvgKey :: !(Maybe Text) + , _amvgAppsId :: !Text + , _amvgView :: !(Maybe Text) + , _amvgOauthToken :: !(Maybe Text) + , _amvgFields :: !(Maybe Text) + , _amvgCallback :: !(Maybe Text) + , _amvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesVersionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amvgXgafv' +-- +-- * 'amvgQuotaUser' +-- +-- * 'amvgPrettyPrint' +-- +-- * 'amvgUploadProtocol' +-- +-- * 'amvgPp' +-- +-- * 'amvgAccessToken' +-- +-- * 'amvgUploadType' +-- +-- * 'amvgVersionsId' +-- +-- * 'amvgModulesId' +-- +-- * 'amvgBearerToken' +-- +-- * 'amvgKey' +-- +-- * 'amvgAppsId' +-- +-- * 'amvgView' +-- +-- * 'amvgOauthToken' +-- +-- * 'amvgFields' +-- +-- * 'amvgCallback' +-- +-- * 'amvgAlt' +appsModulesVersionsGet + :: Text -- ^ 'versionsId' + -> Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesVersionsGet +appsModulesVersionsGet pAmvgVersionsId_ pAmvgModulesId_ pAmvgAppsId_ = + AppsModulesVersionsGet + { _amvgXgafv = Nothing + , _amvgQuotaUser = Nothing + , _amvgPrettyPrint = True + , _amvgUploadProtocol = Nothing + , _amvgPp = True + , _amvgAccessToken = Nothing + , _amvgUploadType = Nothing + , _amvgVersionsId = pAmvgVersionsId_ + , _amvgModulesId = pAmvgModulesId_ + , _amvgBearerToken = Nothing + , _amvgKey = Nothing + , _amvgAppsId = pAmvgAppsId_ + , _amvgView = Nothing + , _amvgOauthToken = Nothing + , _amvgFields = Nothing + , _amvgCallback = Nothing + , _amvgAlt = "json" + } + +-- | V1 error format. +amvgXgafv :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgXgafv + = lens _amvgXgafv (\ s a -> s{_amvgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amvgQuotaUser :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgQuotaUser + = lens _amvgQuotaUser + (\ s a -> s{_amvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amvgPrettyPrint :: Lens' AppsModulesVersionsGet' Bool +amvgPrettyPrint + = lens _amvgPrettyPrint + (\ s a -> s{_amvgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amvgUploadProtocol :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgUploadProtocol + = lens _amvgUploadProtocol + (\ s a -> s{_amvgUploadProtocol = a}) + +-- | Pretty-print response. +amvgPp :: Lens' AppsModulesVersionsGet' Bool +amvgPp = lens _amvgPp (\ s a -> s{_amvgPp = a}) + +-- | OAuth access token. +amvgAccessToken :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgAccessToken + = lens _amvgAccessToken + (\ s a -> s{_amvgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amvgUploadType :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgUploadType + = lens _amvgUploadType + (\ s a -> s{_amvgUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvgVersionsId :: Lens' AppsModulesVersionsGet' Text +amvgVersionsId + = lens _amvgVersionsId + (\ s a -> s{_amvgVersionsId = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvgModulesId :: Lens' AppsModulesVersionsGet' Text +amvgModulesId + = lens _amvgModulesId + (\ s a -> s{_amvgModulesId = a}) + +-- | OAuth bearer token. +amvgBearerToken :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgBearerToken + = lens _amvgBearerToken + (\ s a -> s{_amvgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amvgKey :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgKey = lens _amvgKey (\ s a -> s{_amvgKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\/modules\/default\/versions\/v1\". +amvgAppsId :: Lens' AppsModulesVersionsGet' Text +amvgAppsId + = lens _amvgAppsId (\ s a -> s{_amvgAppsId = a}) + +-- | Controls the set of fields returned in the \`Get\` response. +amvgView :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgView = lens _amvgView (\ s a -> s{_amvgView = a}) + +-- | OAuth 2.0 token for the current user. +amvgOauthToken :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgOauthToken + = lens _amvgOauthToken + (\ s a -> s{_amvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +amvgFields :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgFields + = lens _amvgFields (\ s a -> s{_amvgFields = a}) + +-- | JSONP +amvgCallback :: Lens' AppsModulesVersionsGet' (Maybe Text) +amvgCallback + = lens _amvgCallback (\ s a -> s{_amvgCallback = a}) + +-- | Data format for response. +amvgAlt :: Lens' AppsModulesVersionsGet' Text +amvgAlt = lens _amvgAlt (\ s a -> s{_amvgAlt = a}) + +instance GoogleRequest AppsModulesVersionsGet' where + type Rs AppsModulesVersionsGet' = Version + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesVersionsGet{..} + = go _amvgXgafv _amvgQuotaUser _amvgPrettyPrint + _amvgUploadProtocol + _amvgPp + _amvgAccessToken + _amvgUploadType + _amvgVersionsId + _amvgModulesId + _amvgBearerToken + _amvgKey + _amvgAppsId + _amvgView + _amvgOauthToken + _amvgFields + _amvgCallback + _amvgAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesVersionsGetAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/List.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/List.hs new file mode 100644 index 000000000..609f2d8bc --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Modules/Versions/List.hs @@ -0,0 +1,283 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Modules.Versions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the versions of a module. +-- +-- /See:/ for @AppengineAppsModulesVersionsList@. +module AppEngine.Apps.Modules.Versions.List + ( + -- * REST Resource + AppsModulesVersionsListAPI + + -- * Creating a Request + , appsModulesVersionsList + , AppsModulesVersionsList + + -- * Request Lenses + , amvlXgafv + , amvlQuotaUser + , amvlPrettyPrint + , amvlUploadProtocol + , amvlPp + , amvlAccessToken + , amvlUploadType + , amvlModulesId + , amvlBearerToken + , amvlKey + , amvlAppsId + , amvlView + , amvlPageToken + , amvlOauthToken + , amvlPageSize + , amvlFields + , amvlCallback + , amvlAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsModulesVersionsList@ which the +-- 'AppsModulesVersionsList' request conforms to. +type AppsModulesVersionsListAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "modules" :> + Capture "modulesId" Text :> + "versions" :> + QueryParam "view" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListVersionsResponse + +-- | Lists the versions of a module. +-- +-- /See:/ 'appsModulesVersionsList' smart constructor. +data AppsModulesVersionsList = AppsModulesVersionsList + { _amvlXgafv :: !(Maybe Text) + , _amvlQuotaUser :: !(Maybe Text) + , _amvlPrettyPrint :: !Bool + , _amvlUploadProtocol :: !(Maybe Text) + , _amvlPp :: !Bool + , _amvlAccessToken :: !(Maybe Text) + , _amvlUploadType :: !(Maybe Text) + , _amvlModulesId :: !Text + , _amvlBearerToken :: !(Maybe Text) + , _amvlKey :: !(Maybe Text) + , _amvlAppsId :: !Text + , _amvlView :: !(Maybe Text) + , _amvlPageToken :: !(Maybe Text) + , _amvlOauthToken :: !(Maybe Text) + , _amvlPageSize :: !(Maybe Int32) + , _amvlFields :: !(Maybe Text) + , _amvlCallback :: !(Maybe Text) + , _amvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsModulesVersionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'amvlXgafv' +-- +-- * 'amvlQuotaUser' +-- +-- * 'amvlPrettyPrint' +-- +-- * 'amvlUploadProtocol' +-- +-- * 'amvlPp' +-- +-- * 'amvlAccessToken' +-- +-- * 'amvlUploadType' +-- +-- * 'amvlModulesId' +-- +-- * 'amvlBearerToken' +-- +-- * 'amvlKey' +-- +-- * 'amvlAppsId' +-- +-- * 'amvlView' +-- +-- * 'amvlPageToken' +-- +-- * 'amvlOauthToken' +-- +-- * 'amvlPageSize' +-- +-- * 'amvlFields' +-- +-- * 'amvlCallback' +-- +-- * 'amvlAlt' +appsModulesVersionsList + :: Text -- ^ 'modulesId' + -> Text -- ^ 'appsId' + -> AppsModulesVersionsList +appsModulesVersionsList pAmvlModulesId_ pAmvlAppsId_ = + AppsModulesVersionsList + { _amvlXgafv = Nothing + , _amvlQuotaUser = Nothing + , _amvlPrettyPrint = True + , _amvlUploadProtocol = Nothing + , _amvlPp = True + , _amvlAccessToken = Nothing + , _amvlUploadType = Nothing + , _amvlModulesId = pAmvlModulesId_ + , _amvlBearerToken = Nothing + , _amvlKey = Nothing + , _amvlAppsId = pAmvlAppsId_ + , _amvlView = Nothing + , _amvlPageToken = Nothing + , _amvlOauthToken = Nothing + , _amvlPageSize = Nothing + , _amvlFields = Nothing + , _amvlCallback = Nothing + , _amvlAlt = "json" + } + +-- | V1 error format. +amvlXgafv :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlXgafv + = lens _amvlXgafv (\ s a -> s{_amvlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +amvlQuotaUser :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlQuotaUser + = lens _amvlQuotaUser + (\ s a -> s{_amvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +amvlPrettyPrint :: Lens' AppsModulesVersionsList' Bool +amvlPrettyPrint + = lens _amvlPrettyPrint + (\ s a -> s{_amvlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +amvlUploadProtocol :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlUploadProtocol + = lens _amvlUploadProtocol + (\ s a -> s{_amvlUploadProtocol = a}) + +-- | Pretty-print response. +amvlPp :: Lens' AppsModulesVersionsList' Bool +amvlPp = lens _amvlPp (\ s a -> s{_amvlPp = a}) + +-- | OAuth access token. +amvlAccessToken :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlAccessToken + = lens _amvlAccessToken + (\ s a -> s{_amvlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +amvlUploadType :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlUploadType + = lens _amvlUploadType + (\ s a -> s{_amvlUploadType = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +amvlModulesId :: Lens' AppsModulesVersionsList' Text +amvlModulesId + = lens _amvlModulesId + (\ s a -> s{_amvlModulesId = a}) + +-- | OAuth bearer token. +amvlBearerToken :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlBearerToken + = lens _amvlBearerToken + (\ s a -> s{_amvlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +amvlKey :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlKey = lens _amvlKey (\ s a -> s{_amvlKey = a}) + +-- | Part of \`name\`. Name of the resource requested. For example: +-- \"apps\/myapp\/modules\/default\". +amvlAppsId :: Lens' AppsModulesVersionsList' Text +amvlAppsId + = lens _amvlAppsId (\ s a -> s{_amvlAppsId = a}) + +-- | Controls the set of fields returned in the \`List\` response. +amvlView :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlView = lens _amvlView (\ s a -> s{_amvlView = a}) + +-- | Continuation token for fetching the next page of results. +amvlPageToken :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlPageToken + = lens _amvlPageToken + (\ s a -> s{_amvlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +amvlOauthToken :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlOauthToken + = lens _amvlOauthToken + (\ s a -> s{_amvlOauthToken = a}) + +-- | Maximum results to return per page. +amvlPageSize :: Lens' AppsModulesVersionsList' (Maybe Int32) +amvlPageSize + = lens _amvlPageSize (\ s a -> s{_amvlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +amvlFields :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlFields + = lens _amvlFields (\ s a -> s{_amvlFields = a}) + +-- | JSONP +amvlCallback :: Lens' AppsModulesVersionsList' (Maybe Text) +amvlCallback + = lens _amvlCallback (\ s a -> s{_amvlCallback = a}) + +-- | Data format for response. +amvlAlt :: Lens' AppsModulesVersionsList' Text +amvlAlt = lens _amvlAlt (\ s a -> s{_amvlAlt = a}) + +instance GoogleRequest AppsModulesVersionsList' where + type Rs AppsModulesVersionsList' = + ListVersionsResponse + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsModulesVersionsList{..} + = go _amvlXgafv _amvlQuotaUser _amvlPrettyPrint + _amvlUploadProtocol + _amvlPp + _amvlAccessToken + _amvlUploadType + _amvlModulesId + _amvlBearerToken + _amvlKey + _amvlAppsId + _amvlView + _amvlPageToken + _amvlOauthToken + _amvlPageSize + _amvlFields + _amvlCallback + _amvlAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsModulesVersionsListAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/Get.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/Get.hs new file mode 100644 index 000000000..66c460fd8 --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/Get.hs @@ -0,0 +1,245 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Operations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the latest state of a long-running operation. Clients can use this +-- method to poll the operation result at intervals as recommended by the +-- API service. +-- +-- /See:/ for @AppengineAppsOperationsGet@. +module AppEngine.Apps.Operations.Get + ( + -- * REST Resource + AppsOperationsGetAPI + + -- * Creating a Request + , appsOperationsGet + , AppsOperationsGet + + -- * Request Lenses + , aogXgafv + , aogQuotaUser + , aogPrettyPrint + , aogUploadProtocol + , aogPp + , aogAccessToken + , aogUploadType + , aogBearerToken + , aogKey + , aogAppsId + , aogOauthToken + , aogOperationsId + , aogFields + , aogCallback + , aogAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsOperationsGet@ which the +-- 'AppsOperationsGet' request conforms to. +type AppsOperationsGetAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "operations" :> + Capture "operationsId" Text :> Get '[JSON] Operation + +-- | Gets the latest state of a long-running operation. Clients can use this +-- method to poll the operation result at intervals as recommended by the +-- API service. +-- +-- /See:/ 'appsOperationsGet' smart constructor. +data AppsOperationsGet = AppsOperationsGet + { _aogXgafv :: !(Maybe Text) + , _aogQuotaUser :: !(Maybe Text) + , _aogPrettyPrint :: !Bool + , _aogUploadProtocol :: !(Maybe Text) + , _aogPp :: !Bool + , _aogAccessToken :: !(Maybe Text) + , _aogUploadType :: !(Maybe Text) + , _aogBearerToken :: !(Maybe Text) + , _aogKey :: !(Maybe Text) + , _aogAppsId :: !Text + , _aogOauthToken :: !(Maybe Text) + , _aogOperationsId :: !Text + , _aogFields :: !(Maybe Text) + , _aogCallback :: !(Maybe Text) + , _aogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aogXgafv' +-- +-- * 'aogQuotaUser' +-- +-- * 'aogPrettyPrint' +-- +-- * 'aogUploadProtocol' +-- +-- * 'aogPp' +-- +-- * 'aogAccessToken' +-- +-- * 'aogUploadType' +-- +-- * 'aogBearerToken' +-- +-- * 'aogKey' +-- +-- * 'aogAppsId' +-- +-- * 'aogOauthToken' +-- +-- * 'aogOperationsId' +-- +-- * 'aogFields' +-- +-- * 'aogCallback' +-- +-- * 'aogAlt' +appsOperationsGet + :: Text -- ^ 'appsId' + -> Text -- ^ 'operationsId' + -> AppsOperationsGet +appsOperationsGet pAogAppsId_ pAogOperationsId_ = + AppsOperationsGet + { _aogXgafv = Nothing + , _aogQuotaUser = Nothing + , _aogPrettyPrint = True + , _aogUploadProtocol = Nothing + , _aogPp = True + , _aogAccessToken = Nothing + , _aogUploadType = Nothing + , _aogBearerToken = Nothing + , _aogKey = Nothing + , _aogAppsId = pAogAppsId_ + , _aogOauthToken = Nothing + , _aogOperationsId = pAogOperationsId_ + , _aogFields = Nothing + , _aogCallback = Nothing + , _aogAlt = "json" + } + +-- | V1 error format. +aogXgafv :: Lens' AppsOperationsGet' (Maybe Text) +aogXgafv = lens _aogXgafv (\ s a -> s{_aogXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aogQuotaUser :: Lens' AppsOperationsGet' (Maybe Text) +aogQuotaUser + = lens _aogQuotaUser (\ s a -> s{_aogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aogPrettyPrint :: Lens' AppsOperationsGet' Bool +aogPrettyPrint + = lens _aogPrettyPrint + (\ s a -> s{_aogPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aogUploadProtocol :: Lens' AppsOperationsGet' (Maybe Text) +aogUploadProtocol + = lens _aogUploadProtocol + (\ s a -> s{_aogUploadProtocol = a}) + +-- | Pretty-print response. +aogPp :: Lens' AppsOperationsGet' Bool +aogPp = lens _aogPp (\ s a -> s{_aogPp = a}) + +-- | OAuth access token. +aogAccessToken :: Lens' AppsOperationsGet' (Maybe Text) +aogAccessToken + = lens _aogAccessToken + (\ s a -> s{_aogAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aogUploadType :: Lens' AppsOperationsGet' (Maybe Text) +aogUploadType + = lens _aogUploadType + (\ s a -> s{_aogUploadType = a}) + +-- | OAuth bearer token. +aogBearerToken :: Lens' AppsOperationsGet' (Maybe Text) +aogBearerToken + = lens _aogBearerToken + (\ s a -> s{_aogBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aogKey :: Lens' AppsOperationsGet' (Maybe Text) +aogKey = lens _aogKey (\ s a -> s{_aogKey = a}) + +-- | Part of \`name\`. The name of the operation resource. +aogAppsId :: Lens' AppsOperationsGet' Text +aogAppsId + = lens _aogAppsId (\ s a -> s{_aogAppsId = a}) + +-- | OAuth 2.0 token for the current user. +aogOauthToken :: Lens' AppsOperationsGet' (Maybe Text) +aogOauthToken + = lens _aogOauthToken + (\ s a -> s{_aogOauthToken = a}) + +-- | Part of \`name\`. See documentation of \`appsId\`. +aogOperationsId :: Lens' AppsOperationsGet' Text +aogOperationsId + = lens _aogOperationsId + (\ s a -> s{_aogOperationsId = a}) + +-- | Selector specifying which fields to include in a partial response. +aogFields :: Lens' AppsOperationsGet' (Maybe Text) +aogFields + = lens _aogFields (\ s a -> s{_aogFields = a}) + +-- | JSONP +aogCallback :: Lens' AppsOperationsGet' (Maybe Text) +aogCallback + = lens _aogCallback (\ s a -> s{_aogCallback = a}) + +-- | Data format for response. +aogAlt :: Lens' AppsOperationsGet' Text +aogAlt = lens _aogAlt (\ s a -> s{_aogAlt = a}) + +instance GoogleRequest AppsOperationsGet' where + type Rs AppsOperationsGet' = Operation + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsOperationsGet{..} + = go _aogXgafv _aogQuotaUser _aogPrettyPrint + _aogUploadProtocol + _aogPp + _aogAccessToken + _aogUploadType + _aogBearerToken + _aogKey + _aogAppsId + _aogOauthToken + _aogOperationsId + _aogFields + _aogCallback + _aogAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsOperationsGetAPI) + r + u diff --git a/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/List.hs b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/List.hs new file mode 100644 index 000000000..ee723b9be --- /dev/null +++ b/gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Operations/List.hs @@ -0,0 +1,272 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppEngine.Apps.Operations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists operations that match the specified filter in the request. If the +-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE: +-- the \`name\` binding below allows API services to override the binding +-- to use different resource name schemes, such as +-- \`users\/*\/operations\`. +-- +-- /See:/ for @AppengineAppsOperationsList@. +module AppEngine.Apps.Operations.List + ( + -- * REST Resource + AppsOperationsListAPI + + -- * Creating a Request + , appsOperationsList + , AppsOperationsList + + -- * Request Lenses + , aolXgafv + , aolQuotaUser + , aolPrettyPrint + , aolUploadProtocol + , aolPp + , aolAccessToken + , aolUploadType + , aolBearerToken + , aolKey + , aolAppsId + , aolFilter + , aolPageToken + , aolOauthToken + , aolPageSize + , aolFields + , aolCallback + , aolAlt + ) where + +import Network.Google.AppEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @AppengineAppsOperationsList@ which the +-- 'AppsOperationsList' request conforms to. +type AppsOperationsListAPI = + "v1beta4" :> + "apps" :> + Capture "appsId" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListOperationsResponse + +-- | Lists operations that match the specified filter in the request. If the +-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE: +-- the \`name\` binding below allows API services to override the binding +-- to use different resource name schemes, such as +-- \`users\/*\/operations\`. +-- +-- /See:/ 'appsOperationsList' smart constructor. +data AppsOperationsList = AppsOperationsList + { _aolXgafv :: !(Maybe Text) + , _aolQuotaUser :: !(Maybe Text) + , _aolPrettyPrint :: !Bool + , _aolUploadProtocol :: !(Maybe Text) + , _aolPp :: !Bool + , _aolAccessToken :: !(Maybe Text) + , _aolUploadType :: !(Maybe Text) + , _aolBearerToken :: !(Maybe Text) + , _aolKey :: !(Maybe Text) + , _aolAppsId :: !Text + , _aolFilter :: !(Maybe Text) + , _aolPageToken :: !(Maybe Text) + , _aolOauthToken :: !(Maybe Text) + , _aolPageSize :: !(Maybe Int32) + , _aolFields :: !(Maybe Text) + , _aolCallback :: !(Maybe Text) + , _aolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aolXgafv' +-- +-- * 'aolQuotaUser' +-- +-- * 'aolPrettyPrint' +-- +-- * 'aolUploadProtocol' +-- +-- * 'aolPp' +-- +-- * 'aolAccessToken' +-- +-- * 'aolUploadType' +-- +-- * 'aolBearerToken' +-- +-- * 'aolKey' +-- +-- * 'aolAppsId' +-- +-- * 'aolFilter' +-- +-- * 'aolPageToken' +-- +-- * 'aolOauthToken' +-- +-- * 'aolPageSize' +-- +-- * 'aolFields' +-- +-- * 'aolCallback' +-- +-- * 'aolAlt' +appsOperationsList + :: Text -- ^ 'appsId' + -> AppsOperationsList +appsOperationsList pAolAppsId_ = + AppsOperationsList + { _aolXgafv = Nothing + , _aolQuotaUser = Nothing + , _aolPrettyPrint = True + , _aolUploadProtocol = Nothing + , _aolPp = True + , _aolAccessToken = Nothing + , _aolUploadType = Nothing + , _aolBearerToken = Nothing + , _aolKey = Nothing + , _aolAppsId = pAolAppsId_ + , _aolFilter = Nothing + , _aolPageToken = Nothing + , _aolOauthToken = Nothing + , _aolPageSize = Nothing + , _aolFields = Nothing + , _aolCallback = Nothing + , _aolAlt = "json" + } + +-- | V1 error format. +aolXgafv :: Lens' AppsOperationsList' (Maybe Text) +aolXgafv = lens _aolXgafv (\ s a -> s{_aolXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aolQuotaUser :: Lens' AppsOperationsList' (Maybe Text) +aolQuotaUser + = lens _aolQuotaUser (\ s a -> s{_aolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aolPrettyPrint :: Lens' AppsOperationsList' Bool +aolPrettyPrint + = lens _aolPrettyPrint + (\ s a -> s{_aolPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aolUploadProtocol :: Lens' AppsOperationsList' (Maybe Text) +aolUploadProtocol + = lens _aolUploadProtocol + (\ s a -> s{_aolUploadProtocol = a}) + +-- | Pretty-print response. +aolPp :: Lens' AppsOperationsList' Bool +aolPp = lens _aolPp (\ s a -> s{_aolPp = a}) + +-- | OAuth access token. +aolAccessToken :: Lens' AppsOperationsList' (Maybe Text) +aolAccessToken + = lens _aolAccessToken + (\ s a -> s{_aolAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aolUploadType :: Lens' AppsOperationsList' (Maybe Text) +aolUploadType + = lens _aolUploadType + (\ s a -> s{_aolUploadType = a}) + +-- | OAuth bearer token. +aolBearerToken :: Lens' AppsOperationsList' (Maybe Text) +aolBearerToken + = lens _aolBearerToken + (\ s a -> s{_aolBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aolKey :: Lens' AppsOperationsList' (Maybe Text) +aolKey = lens _aolKey (\ s a -> s{_aolKey = a}) + +-- | Part of \`name\`. The name of the operation collection. +aolAppsId :: Lens' AppsOperationsList' Text +aolAppsId + = lens _aolAppsId (\ s a -> s{_aolAppsId = a}) + +-- | The standard list filter. +aolFilter :: Lens' AppsOperationsList' (Maybe Text) +aolFilter + = lens _aolFilter (\ s a -> s{_aolFilter = a}) + +-- | The standard list page token. +aolPageToken :: Lens' AppsOperationsList' (Maybe Text) +aolPageToken + = lens _aolPageToken (\ s a -> s{_aolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aolOauthToken :: Lens' AppsOperationsList' (Maybe Text) +aolOauthToken + = lens _aolOauthToken + (\ s a -> s{_aolOauthToken = a}) + +-- | The standard list page size. +aolPageSize :: Lens' AppsOperationsList' (Maybe Int32) +aolPageSize + = lens _aolPageSize (\ s a -> s{_aolPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +aolFields :: Lens' AppsOperationsList' (Maybe Text) +aolFields + = lens _aolFields (\ s a -> s{_aolFields = a}) + +-- | JSONP +aolCallback :: Lens' AppsOperationsList' (Maybe Text) +aolCallback + = lens _aolCallback (\ s a -> s{_aolCallback = a}) + +-- | Data format for response. +aolAlt :: Lens' AppsOperationsList' Text +aolAlt = lens _aolAlt (\ s a -> s{_aolAlt = a}) + +instance GoogleRequest AppsOperationsList' where + type Rs AppsOperationsList' = ListOperationsResponse + request = requestWithRoute defReq appEngineURL + requestWithRoute r u AppsOperationsList{..} + = go _aolXgafv _aolQuotaUser _aolPrettyPrint + _aolUploadProtocol + _aolPp + _aolAccessToken + _aolUploadType + _aolBearerToken + _aolKey + _aolAppsId + _aolFilter + _aolPageToken + _aolOauthToken + _aolPageSize + _aolFields + _aolCallback + _aolAlt + where go + = clientWithRoute + (Proxy :: Proxy AppsOperationsListAPI) + r + u diff --git a/gogol-appengine/gogol-appengine.cabal b/gogol-appengine/gogol-appengine.cabal new file mode 100644 index 000000000..45cc47ce5 --- /dev/null +++ b/gogol-appengine/gogol-appengine.cabal @@ -0,0 +1,54 @@ +name: gogol-appengine +version: 0.0.1 +synopsis: Google App Engine Admin API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google App Engine Admin API enables developers to provision and + manage their App Engine applications. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppEngine + , Network.Google.AppEngine.Types + , Network.Google.Resource.AppEngine.Apps.Get + , Network.Google.Resource.AppEngine.Apps.Modules.Delete + , Network.Google.Resource.AppEngine.Apps.Modules.Get + , Network.Google.Resource.AppEngine.Apps.Modules.List + , Network.Google.Resource.AppEngine.Apps.Modules.Patch + , Network.Google.Resource.AppEngine.Apps.Modules.Versions.Create + , Network.Google.Resource.AppEngine.Apps.Modules.Versions.Delete + , Network.Google.Resource.AppEngine.Apps.Modules.Versions.Get + , Network.Google.Resource.AppEngine.Apps.Modules.Versions.List + , Network.Google.Resource.AppEngine.Apps.Operations.Get + , Network.Google.Resource.AppEngine.Apps.Operations.List + + other-modules: + Network.Google.AppEngine.Types.Product + , Network.Google.AppEngine.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-appengine/src/.gitkeep b/gogol-appengine/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-apps-activity/LICENSE b/gogol-apps-activity/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-apps-activity/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-apps-activity/Makefile b/gogol-apps-activity/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-apps-activity/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-apps-activity/README.md b/gogol-apps-activity/README.md new file mode 100644 index 000000000..716538025 --- /dev/null +++ b/gogol-apps-activity/README.md @@ -0,0 +1,28 @@ +# gogol-apps-activity + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Apps Activity API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-apps-activity` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-apps-activity/Setup.hs b/gogol-apps-activity/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-apps-activity/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-apps-activity/gen/Network/Google/AppsActivity.hs b/gogol-apps-activity/gen/Network/Google/AppsActivity.hs new file mode 100644 index 000000000..dcb2de4d4 --- /dev/null +++ b/gogol-apps-activity/gen/Network/Google/AppsActivity.hs @@ -0,0 +1,124 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppsActivity +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Provides a historical view of activity. +-- +-- /See:/ +module Network.Google.AppsActivity + ( + -- * API + AppsActivityAPI + , appsActivityAPI + , appsActivityURL + + -- * Service Methods + + -- * REST Resources + + -- ** AppsactivityActivitiesList + , module AppsActivity.Activities.List + + -- * Types + + -- ** Parent + , Parent + , parent + , pIsRoot + , pId + , pTitle + + -- ** Photo + , Photo + , photo + , pUrl + + -- ** Event + , Event + , event + , ePrimaryEventType + , eUser + , eEventTimeMillis + , eRename + , eFromUserDeletion + , eAdditionalEventTypes + , ePermissionChanges + , eTarget + , eMove + + -- ** ListActivitiesResponse + , ListActivitiesResponse + , listActivitiesResponse + , larNextPageToken + , larActivities + + -- ** PermissionChange + , PermissionChange + , permissionChange + , pcAddedPermissions + , pcRemovedPermissions + + -- ** User + , User + , user + , uPhoto + , uName + + -- ** Activity + , Activity + , activity + , aSingleEvents + , aCombinedEvent + + -- ** Rename + , Rename + , rename + , rNewTitle + , rOldTitle + + -- ** Permission + , Permission + , permission + , pWithLink + , pUser + , pRole + , pName + , pType + , pPermissionId + + -- ** Move + , Move + , move + , mAddedParents + , mRemovedParents + + -- ** Target + , Target + , target + , tMimeType + , tName + , tId + ) where + +import Network.Google.AppsActivity.Types +import Network.Google.Prelude +import Network.Google.Resource.AppsActivity.Activities.List + +{- $resources +TODO +-} + +type AppsActivityAPI = Activities + +appsActivityAPI :: Proxy AppsActivityAPI +appsActivityAPI = Proxy diff --git a/gogol-apps-activity/gen/Network/Google/AppsActivity/Types.hs b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types.hs new file mode 100644 index 000000000..cc645ffc7 --- /dev/null +++ b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types.hs @@ -0,0 +1,108 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsActivity.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsActivity.Types + ( + -- * Service URL + appsActivityURL + + -- * Parent + , Parent + , parent + , pIsRoot + , pId + , pTitle + + -- * Photo + , Photo + , photo + , pUrl + + -- * Event + , Event + , event + , ePrimaryEventType + , eUser + , eEventTimeMillis + , eRename + , eFromUserDeletion + , eAdditionalEventTypes + , ePermissionChanges + , eTarget + , eMove + + -- * ListActivitiesResponse + , ListActivitiesResponse + , listActivitiesResponse + , larNextPageToken + , larActivities + + -- * PermissionChange + , PermissionChange + , permissionChange + , pcAddedPermissions + , pcRemovedPermissions + + -- * User + , User + , user + , uPhoto + , uName + + -- * Activity + , Activity + , activity + , aSingleEvents + , aCombinedEvent + + -- * Rename + , Rename + , rename + , rNewTitle + , rOldTitle + + -- * Permission + , Permission + , permission + , pWithLink + , pUser + , pRole + , pName + , pType + , pPermissionId + + -- * Move + , Move + , move + , mAddedParents + , mRemovedParents + + -- * Target + , Target + , target + , tMimeType + , tName + , tId + ) where + +import Network.Google.AppsActivity.Types.Product +import Network.Google.AppsActivity.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Apps Activity API. +appsActivityURL :: BaseURL +appsActivityURL + = BaseUrl Https + "https://www.googleapis.com/appsactivity/v1/" + 443 diff --git a/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Product.hs b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Product.hs new file mode 100644 index 000000000..f95b666e0 --- /dev/null +++ b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Product.hs @@ -0,0 +1,692 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsActivity.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsActivity.Types.Product where + +import Network.Google.AppsActivity.Types.Sum +import Network.Google.Prelude + +-- | Contains information about a parent object. For example, a folder in +-- Drive is a parent for all files within it. +-- +-- /See:/ 'parent' smart constructor. +data Parent = Parent + { _pIsRoot :: !(Maybe Bool) + , _pId :: !(Maybe Text) + , _pTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Parent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pIsRoot' +-- +-- * 'pId' +-- +-- * 'pTitle' +parent + :: Parent +parent = + Parent + { _pIsRoot = Nothing + , _pId = Nothing + , _pTitle = Nothing + } + +-- | Whether this is the root folder. +pIsRoot :: Lens' Parent (Maybe Bool) +pIsRoot = lens _pIsRoot (\ s a -> s{_pIsRoot = a}) + +-- | The parent\'s ID. +pId :: Lens' Parent (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | The parent\'s title. +pTitle :: Lens' Parent (Maybe Text) +pTitle = lens _pTitle (\ s a -> s{_pTitle = a}) + +instance FromJSON Parent where + parseJSON + = withObject "Parent" + (\ o -> + Parent <$> + (o .:? "isRoot") <*> (o .:? "id") <*> + (o .:? "title")) + +instance ToJSON Parent where + toJSON Parent{..} + = object + (catMaybes + [("isRoot" .=) <$> _pIsRoot, ("id" .=) <$> _pId, + ("title" .=) <$> _pTitle]) + +-- | Photo information for a user. +-- +-- /See:/ 'photo' smart constructor. +newtype Photo = Photo + { _pUrl :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Photo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pUrl' +photo + :: Photo +photo = + Photo + { _pUrl = Nothing + } + +-- | The URL of the photo. +pUrl :: Lens' Photo (Maybe Text) +pUrl = lens _pUrl (\ s a -> s{_pUrl = a}) + +instance FromJSON Photo where + parseJSON + = withObject "Photo" (\ o -> Photo <$> (o .:? "url")) + +instance ToJSON Photo where + toJSON Photo{..} + = object (catMaybes [("url" .=) <$> _pUrl]) + +-- | Represents the changes associated with an action taken by a user. +-- +-- /See:/ 'event' smart constructor. +data Event = Event + { _ePrimaryEventType :: !(Maybe Text) + , _eUser :: !(Maybe (Maybe User)) + , _eEventTimeMillis :: !(Maybe Word64) + , _eRename :: !(Maybe (Maybe Rename)) + , _eFromUserDeletion :: !(Maybe Bool) + , _eAdditionalEventTypes :: !(Maybe [Text]) + , _ePermissionChanges :: !(Maybe [Maybe PermissionChange]) + , _eTarget :: !(Maybe (Maybe Target)) + , _eMove :: !(Maybe (Maybe Move)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Event' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ePrimaryEventType' +-- +-- * 'eUser' +-- +-- * 'eEventTimeMillis' +-- +-- * 'eRename' +-- +-- * 'eFromUserDeletion' +-- +-- * 'eAdditionalEventTypes' +-- +-- * 'ePermissionChanges' +-- +-- * 'eTarget' +-- +-- * 'eMove' +event + :: Event +event = + Event + { _ePrimaryEventType = Nothing + , _eUser = Nothing + , _eEventTimeMillis = Nothing + , _eRename = Nothing + , _eFromUserDeletion = Nothing + , _eAdditionalEventTypes = Nothing + , _ePermissionChanges = Nothing + , _eTarget = Nothing + , _eMove = Nothing + } + +-- | The main type of event that occurred. +ePrimaryEventType :: Lens' Event (Maybe Text) +ePrimaryEventType + = lens _ePrimaryEventType + (\ s a -> s{_ePrimaryEventType = a}) + +-- | Represents the user responsible for the event. +eUser :: Lens' Event (Maybe (Maybe User)) +eUser = lens _eUser (\ s a -> s{_eUser = a}) + +-- | The time at which the event occurred formatted as Unix time in +-- milliseconds. +eEventTimeMillis :: Lens' Event (Maybe Word64) +eEventTimeMillis + = lens _eEventTimeMillis + (\ s a -> s{_eEventTimeMillis = a}) + +-- | Extra information for rename type events, such as the old and new names. +eRename :: Lens' Event (Maybe (Maybe Rename)) +eRename = lens _eRename (\ s a -> s{_eRename = a}) + +-- | Whether this event is caused by a user being deleted. +eFromUserDeletion :: Lens' Event (Maybe Bool) +eFromUserDeletion + = lens _eFromUserDeletion + (\ s a -> s{_eFromUserDeletion = a}) + +-- | Additional event types. Some events may have multiple types when +-- multiple actions are part of a single event. For example, creating a +-- document, renaming it, and sharing it may be part of a single +-- file-creation event. +eAdditionalEventTypes :: Lens' Event [Text] +eAdditionalEventTypes + = lens _eAdditionalEventTypes + (\ s a -> s{_eAdditionalEventTypes = a}) + . _Default + . _Coerce + +-- | Extra information for permissionChange type events, such as the user or +-- group the new permission applies to. +ePermissionChanges :: Lens' Event [Maybe PermissionChange] +ePermissionChanges + = lens _ePermissionChanges + (\ s a -> s{_ePermissionChanges = a}) + . _Default + . _Coerce + +-- | Information specific to the Target object modified by the event. +eTarget :: Lens' Event (Maybe (Maybe Target)) +eTarget = lens _eTarget (\ s a -> s{_eTarget = a}) + +-- | Extra information for move type events, such as changes in an object\'s +-- parents. +eMove :: Lens' Event (Maybe (Maybe Move)) +eMove = lens _eMove (\ s a -> s{_eMove = a}) + +instance FromJSON Event where + parseJSON + = withObject "Event" + (\ o -> + Event <$> + (o .:? "primaryEventType") <*> (o .:? "user") <*> + (o .:? "eventTimeMillis") + <*> (o .:? "rename") + <*> (o .:? "fromUserDeletion") + <*> (o .:? "additionalEventTypes" .!= mempty) + <*> (o .:? "permissionChanges" .!= mempty) + <*> (o .:? "target") + <*> (o .:? "move")) + +instance ToJSON Event where + toJSON Event{..} + = object + (catMaybes + [("primaryEventType" .=) <$> _ePrimaryEventType, + ("user" .=) <$> _eUser, + ("eventTimeMillis" .=) <$> _eEventTimeMillis, + ("rename" .=) <$> _eRename, + ("fromUserDeletion" .=) <$> _eFromUserDeletion, + ("additionalEventTypes" .=) <$> + _eAdditionalEventTypes, + ("permissionChanges" .=) <$> _ePermissionChanges, + ("target" .=) <$> _eTarget, ("move" .=) <$> _eMove]) + +-- | The response from the list request. Contains a list of activities and a +-- token to retrieve the next page of results. +-- +-- /See:/ 'listActivitiesResponse' smart constructor. +data ListActivitiesResponse = ListActivitiesResponse + { _larNextPageToken :: !(Maybe Text) + , _larActivities :: !(Maybe [Maybe Activity]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListActivitiesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'larNextPageToken' +-- +-- * 'larActivities' +listActivitiesResponse + :: ListActivitiesResponse +listActivitiesResponse = + ListActivitiesResponse + { _larNextPageToken = Nothing + , _larActivities = Nothing + } + +-- | Token for the next page of results. +larNextPageToken :: Lens' ListActivitiesResponse (Maybe Text) +larNextPageToken + = lens _larNextPageToken + (\ s a -> s{_larNextPageToken = a}) + +-- | List of activities. +larActivities :: Lens' ListActivitiesResponse [Maybe Activity] +larActivities + = lens _larActivities + (\ s a -> s{_larActivities = a}) + . _Default + . _Coerce + +instance FromJSON ListActivitiesResponse where + parseJSON + = withObject "ListActivitiesResponse" + (\ o -> + ListActivitiesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "activities" .!= mempty)) + +instance ToJSON ListActivitiesResponse where + toJSON ListActivitiesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _larNextPageToken, + ("activities" .=) <$> _larActivities]) + +-- | Contains information about a Drive object\'s permissions that changed as +-- a result of a permissionChange type event. +-- +-- /See:/ 'permissionChange' smart constructor. +data PermissionChange = PermissionChange + { _pcAddedPermissions :: !(Maybe [Maybe Permission]) + , _pcRemovedPermissions :: !(Maybe [Maybe Permission]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionChange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcAddedPermissions' +-- +-- * 'pcRemovedPermissions' +permissionChange + :: PermissionChange +permissionChange = + PermissionChange + { _pcAddedPermissions = Nothing + , _pcRemovedPermissions = Nothing + } + +-- | Lists all Permission objects added. +pcAddedPermissions :: Lens' PermissionChange [Maybe Permission] +pcAddedPermissions + = lens _pcAddedPermissions + (\ s a -> s{_pcAddedPermissions = a}) + . _Default + . _Coerce + +-- | Lists all Permission objects removed. +pcRemovedPermissions :: Lens' PermissionChange [Maybe Permission] +pcRemovedPermissions + = lens _pcRemovedPermissions + (\ s a -> s{_pcRemovedPermissions = a}) + . _Default + . _Coerce + +instance FromJSON PermissionChange where + parseJSON + = withObject "PermissionChange" + (\ o -> + PermissionChange <$> + (o .:? "addedPermissions" .!= mempty) <*> + (o .:? "removedPermissions" .!= mempty)) + +instance ToJSON PermissionChange where + toJSON PermissionChange{..} + = object + (catMaybes + [("addedPermissions" .=) <$> _pcAddedPermissions, + ("removedPermissions" .=) <$> _pcRemovedPermissions]) + +-- | A representation of a user. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uPhoto :: !(Maybe (Maybe Photo)) + , _uName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uPhoto' +-- +-- * 'uName' +user + :: User +user = + User + { _uPhoto = Nothing + , _uName = Nothing + } + +-- | The profile photo of the user. +uPhoto :: Lens' User (Maybe (Maybe Photo)) +uPhoto = lens _uPhoto (\ s a -> s{_uPhoto = a}) + +-- | The displayable name of the user. +uName :: Lens' User (Maybe Text) +uName = lens _uName (\ s a -> s{_uName = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> User <$> (o .:? "photo") <*> (o .:? "name")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("photo" .=) <$> _uPhoto, ("name" .=) <$> _uName]) + +-- | An Activity resource is a combined view of multiple events. An activity +-- has a list of individual events and a combined view of the common fields +-- among all events. +-- +-- /See:/ 'activity' smart constructor. +data Activity = Activity + { _aSingleEvents :: !(Maybe [Maybe Event]) + , _aCombinedEvent :: !(Maybe (Maybe Event)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aSingleEvents' +-- +-- * 'aCombinedEvent' +activity + :: Activity +activity = + Activity + { _aSingleEvents = Nothing + , _aCombinedEvent = Nothing + } + +-- | A list of all the Events that make up the Activity. +aSingleEvents :: Lens' Activity [Maybe Event] +aSingleEvents + = lens _aSingleEvents + (\ s a -> s{_aSingleEvents = a}) + . _Default + . _Coerce + +-- | The fields common to all of the singleEvents that make up the Activity. +aCombinedEvent :: Lens' Activity (Maybe (Maybe Event)) +aCombinedEvent + = lens _aCombinedEvent + (\ s a -> s{_aCombinedEvent = a}) + +instance FromJSON Activity where + parseJSON + = withObject "Activity" + (\ o -> + Activity <$> + (o .:? "singleEvents" .!= mempty) <*> + (o .:? "combinedEvent")) + +instance ToJSON Activity where + toJSON Activity{..} + = object + (catMaybes + [("singleEvents" .=) <$> _aSingleEvents, + ("combinedEvent" .=) <$> _aCombinedEvent]) + +-- | Contains information about a renametype event. +-- +-- /See:/ 'rename' smart constructor. +data Rename = Rename + { _rNewTitle :: !(Maybe Text) + , _rOldTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Rename' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rNewTitle' +-- +-- * 'rOldTitle' +rename + :: Rename +rename = + Rename + { _rNewTitle = Nothing + , _rOldTitle = Nothing + } + +-- | The new title. +rNewTitle :: Lens' Rename (Maybe Text) +rNewTitle + = lens _rNewTitle (\ s a -> s{_rNewTitle = a}) + +-- | The old title. +rOldTitle :: Lens' Rename (Maybe Text) +rOldTitle + = lens _rOldTitle (\ s a -> s{_rOldTitle = a}) + +instance FromJSON Rename where + parseJSON + = withObject "Rename" + (\ o -> + Rename <$> (o .:? "newTitle") <*> (o .:? "oldTitle")) + +instance ToJSON Rename where + toJSON Rename{..} + = object + (catMaybes + [("newTitle" .=) <$> _rNewTitle, + ("oldTitle" .=) <$> _rOldTitle]) + +-- | Contains information about the permissions and type of access allowed +-- with regards to a Google Drive object. This is a subset of the fields +-- contained in a corresponding Drive Permissions object. +-- +-- /See:/ 'permission' smart constructor. +data Permission = Permission + { _pWithLink :: !(Maybe Bool) + , _pUser :: !(Maybe (Maybe User)) + , _pRole :: !(Maybe Text) + , _pName :: !(Maybe Text) + , _pType :: !(Maybe Text) + , _pPermissionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Permission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pWithLink' +-- +-- * 'pUser' +-- +-- * 'pRole' +-- +-- * 'pName' +-- +-- * 'pType' +-- +-- * 'pPermissionId' +permission + :: Permission +permission = + Permission + { _pWithLink = Nothing + , _pUser = Nothing + , _pRole = Nothing + , _pName = Nothing + , _pType = Nothing + , _pPermissionId = Nothing + } + +-- | Whether the permission requires a link to the file. +pWithLink :: Lens' Permission (Maybe Bool) +pWithLink + = lens _pWithLink (\ s a -> s{_pWithLink = a}) + +-- | The user\'s information if the type is USER. +pUser :: Lens' Permission (Maybe (Maybe User)) +pUser = lens _pUser (\ s a -> s{_pUser = a}) + +-- | Indicates the Google Drive permissions role. The role determines a +-- user\'s ability to read, write, or comment on the file. +pRole :: Lens' Permission (Maybe Text) +pRole = lens _pRole (\ s a -> s{_pRole = a}) + +-- | The name of the user or group the permission applies to. +pName :: Lens' Permission (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | Indicates how widely permissions are granted. +pType :: Lens' Permission (Maybe Text) +pType = lens _pType (\ s a -> s{_pType = a}) + +-- | The ID for this permission. Corresponds to the Drive API\'s permission +-- ID returned as part of the Drive Permissions resource. +pPermissionId :: Lens' Permission (Maybe Text) +pPermissionId + = lens _pPermissionId + (\ s a -> s{_pPermissionId = a}) + +instance FromJSON Permission where + parseJSON + = withObject "Permission" + (\ o -> + Permission <$> + (o .:? "withLink") <*> (o .:? "user") <*> + (o .:? "role") + <*> (o .:? "name") + <*> (o .:? "type") + <*> (o .:? "permissionId")) + +instance ToJSON Permission where + toJSON Permission{..} + = object + (catMaybes + [("withLink" .=) <$> _pWithLink, + ("user" .=) <$> _pUser, ("role" .=) <$> _pRole, + ("name" .=) <$> _pName, ("type" .=) <$> _pType, + ("permissionId" .=) <$> _pPermissionId]) + +-- | Contains information about changes in an object\'s parents as a result +-- of a move type event. +-- +-- /See:/ 'move' smart constructor. +data Move = Move + { _mAddedParents :: !(Maybe [Maybe Parent]) + , _mRemovedParents :: !(Maybe [Maybe Parent]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Move' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mAddedParents' +-- +-- * 'mRemovedParents' +move + :: Move +move = + Move + { _mAddedParents = Nothing + , _mRemovedParents = Nothing + } + +-- | The added parent(s). +mAddedParents :: Lens' Move [Maybe Parent] +mAddedParents + = lens _mAddedParents + (\ s a -> s{_mAddedParents = a}) + . _Default + . _Coerce + +-- | The removed parent(s). +mRemovedParents :: Lens' Move [Maybe Parent] +mRemovedParents + = lens _mRemovedParents + (\ s a -> s{_mRemovedParents = a}) + . _Default + . _Coerce + +instance FromJSON Move where + parseJSON + = withObject "Move" + (\ o -> + Move <$> + (o .:? "addedParents" .!= mempty) <*> + (o .:? "removedParents" .!= mempty)) + +instance ToJSON Move where + toJSON Move{..} + = object + (catMaybes + [("addedParents" .=) <$> _mAddedParents, + ("removedParents" .=) <$> _mRemovedParents]) + +-- | Information about the object modified by the event. +-- +-- /See:/ 'target' smart constructor. +data Target = Target + { _tMimeType :: !(Maybe Text) + , _tName :: !(Maybe Text) + , _tId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Target' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tMimeType' +-- +-- * 'tName' +-- +-- * 'tId' +target + :: Target +target = + Target + { _tMimeType = Nothing + , _tName = Nothing + , _tId = Nothing + } + +-- | The MIME type of the target. +tMimeType :: Lens' Target (Maybe Text) +tMimeType + = lens _tMimeType (\ s a -> s{_tMimeType = a}) + +-- | The name of the target. For example, in Google Drive, this is the title +-- of the file. +tName :: Lens' Target (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +-- | The ID of the target. For example, in Google Drive, this is the file or +-- folder ID. +tId :: Lens' Target (Maybe Text) +tId = lens _tId (\ s a -> s{_tId = a}) + +instance FromJSON Target where + parseJSON + = withObject "Target" + (\ o -> + Target <$> + (o .:? "mimeType") <*> (o .:? "name") <*> + (o .:? "id")) + +instance ToJSON Target where + toJSON Target{..} + = object + (catMaybes + [("mimeType" .=) <$> _tMimeType, + ("name" .=) <$> _tName, ("id" .=) <$> _tId]) diff --git a/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Sum.hs b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Sum.hs new file mode 100644 index 000000000..f6f60681e --- /dev/null +++ b/gogol-apps-activity/gen/Network/Google/AppsActivity/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsActivity.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsActivity.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-apps-activity/gen/Network/Google/Resource/AppsActivity/Activities/List.hs b/gogol-apps-activity/gen/Network/Google/Resource/AppsActivity/Activities/List.hs new file mode 100644 index 000000000..918931769 --- /dev/null +++ b/gogol-apps-activity/gen/Network/Google/Resource/AppsActivity/Activities/List.hs @@ -0,0 +1,242 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.AppsActivity.Activities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of activities visible to the current logged in user. +-- Visible activities are determined by the visiblity settings of the +-- object that was acted on, e.g. Drive files a user can see. An activity +-- is a record of past events. Multiple events may be merged if they are +-- similar. A request is scoped to activities from a given Google service +-- using the source parameter. +-- +-- /See:/ for @AppsactivityActivitiesList@. +module AppsActivity.Activities.List + ( + -- * REST Resource + ActivitiesListAPI + + -- * Creating a Request + , activitiesList + , ActivitiesList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alDriveFileId + , alDriveAncestorId + , alGroupingStrategy + , alUserId + , alKey + , alSource + , alPageToken + , alOauthToken + , alPageSize + , alFields + , alAlt + ) where + +import Network.Google.AppsActivity.Types +import Network.Google.Prelude + +-- | A resource alias for @AppsactivityActivitiesList@ which the +-- 'ActivitiesList' request conforms to. +type ActivitiesListAPI = + "activities" :> + QueryParam "drive.fileId" Text :> + QueryParam "drive.ancestorId" Text :> + QueryParam "groupingStrategy" Text :> + QueryParam "userId" Text :> + QueryParam "source" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListActivitiesResponse + +-- | Returns a list of activities visible to the current logged in user. +-- Visible activities are determined by the visiblity settings of the +-- object that was acted on, e.g. Drive files a user can see. An activity +-- is a record of past events. Multiple events may be merged if they are +-- similar. A request is scoped to activities from a given Google service +-- using the source parameter. +-- +-- /See:/ 'activitiesList' smart constructor. +data ActivitiesList = ActivitiesList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alDriveFileId :: !(Maybe Text) + , _alDriveAncestorId :: !(Maybe Text) + , _alGroupingStrategy :: !Text + , _alUserId :: !Text + , _alKey :: !(Maybe Text) + , _alSource :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alPageSize :: !Int32 + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alDriveFileId' +-- +-- * 'alDriveAncestorId' +-- +-- * 'alGroupingStrategy' +-- +-- * 'alUserId' +-- +-- * 'alKey' +-- +-- * 'alSource' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alPageSize' +-- +-- * 'alFields' +-- +-- * 'alAlt' +activitiesList + :: ActivitiesList +activitiesList = + ActivitiesList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alDriveFileId = Nothing + , _alDriveAncestorId = Nothing + , _alGroupingStrategy = "driveUi" + , _alUserId = "me" + , _alKey = Nothing + , _alSource = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alPageSize = 50 + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ActivitiesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ActivitiesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ActivitiesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Identifies the Drive item to return activities for. +alDriveFileId :: Lens' ActivitiesList' (Maybe Text) +alDriveFileId + = lens _alDriveFileId + (\ s a -> s{_alDriveFileId = a}) + +-- | Identifies the Drive folder containing the items for which to return +-- activities. +alDriveAncestorId :: Lens' ActivitiesList' (Maybe Text) +alDriveAncestorId + = lens _alDriveAncestorId + (\ s a -> s{_alDriveAncestorId = a}) + +-- | Indicates the strategy to use when grouping singleEvents items in the +-- associated combinedEvent object. +alGroupingStrategy :: Lens' ActivitiesList' Text +alGroupingStrategy + = lens _alGroupingStrategy + (\ s a -> s{_alGroupingStrategy = a}) + +-- | Indicates the user to return activity for. Use the special value me to +-- indicate the currently authenticated user. +alUserId :: Lens' ActivitiesList' Text +alUserId = lens _alUserId (\ s a -> s{_alUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ActivitiesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | The Google service from which to return activities. Possible values of +-- source are: - drive.google.com +alSource :: Lens' ActivitiesList' (Maybe Text) +alSource = lens _alSource (\ s a -> s{_alSource = a}) + +-- | A token to retrieve a specific page of results. +alPageToken :: Lens' ActivitiesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ActivitiesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of events to return on a page. The response includes +-- a continuation token if there are more events. +alPageSize :: Lens' ActivitiesList' Int32 +alPageSize + = lens _alPageSize (\ s a -> s{_alPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ActivitiesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ActivitiesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ActivitiesList' where + type Rs ActivitiesList' = ListActivitiesResponse + request = requestWithRoute defReq appsActivityURL + requestWithRoute r u ActivitiesList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alDriveFileId + _alDriveAncestorId + (Just _alGroupingStrategy) + (Just _alUserId) + _alKey + _alSource + _alPageToken + _alOauthToken + (Just _alPageSize) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesListAPI) + r + u diff --git a/gogol-apps-activity/gogol-apps-activity.cabal b/gogol-apps-activity/gogol-apps-activity.cabal new file mode 100644 index 000000000..989557902 --- /dev/null +++ b/gogol-apps-activity/gogol-apps-activity.cabal @@ -0,0 +1,43 @@ +name: gogol-apps-activity +version: 0.0.1 +synopsis: Google Apps Activity API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Provides a historical view of activity. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppsActivity + , Network.Google.AppsActivity.Types + , Network.Google.Resource.AppsActivity.Activities.List + + other-modules: + Network.Google.AppsActivity.Types.Product + , Network.Google.AppsActivity.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-apps-activity/src/.gitkeep b/gogol-apps-activity/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-apps-calendar/LICENSE b/gogol-apps-calendar/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-apps-calendar/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-apps-calendar/Makefile b/gogol-apps-calendar/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-apps-calendar/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-apps-calendar/README.md b/gogol-apps-calendar/README.md new file mode 100644 index 000000000..23947af01 --- /dev/null +++ b/gogol-apps-calendar/README.md @@ -0,0 +1,28 @@ +# gogol-apps-calendar + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Calendar API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-apps-calendar` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-apps-calendar/Setup.hs b/gogol-apps-calendar/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-apps-calendar/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-apps-calendar/gen/Network/Google/AppsCalendar.hs b/gogol-apps-calendar/gen/Network/Google/AppsCalendar.hs new file mode 100644 index 000000000..8ee8357be --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/AppsCalendar.hs @@ -0,0 +1,446 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppsCalendar +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you manipulate events and other calendar data. +-- +-- /See:/ +module Network.Google.AppsCalendar + ( + -- * API + AppsCalendarAPI + , appsCalendarAPI + , appsCalendarURL + + -- * Service Methods + + -- * REST Resources + + -- ** CalendarACLDelete + , module Calendar.ACL.Delete + + -- ** CalendarACLGet + , module Calendar.ACL.Get + + -- ** CalendarACLInsert + , module Calendar.ACL.Insert + + -- ** CalendarACLList + , module Calendar.ACL.List + + -- ** CalendarACLPatch + , module Calendar.ACL.Patch + + -- ** CalendarACLUpdate + , module Calendar.ACL.Update + + -- ** CalendarACLWatch + , module Calendar.ACL.Watch + + -- ** CalendarCalendarListDelete + , module Calendar.CalendarList.Delete + + -- ** CalendarCalendarListGet + , module Calendar.CalendarList.Get + + -- ** CalendarCalendarListInsert + , module Calendar.CalendarList.Insert + + -- ** CalendarCalendarListList + , module Calendar.CalendarList.List + + -- ** CalendarCalendarListPatch + , module Calendar.CalendarList.Patch + + -- ** CalendarCalendarListUpdate + , module Calendar.CalendarList.Update + + -- ** CalendarCalendarListWatch + , module Calendar.CalendarList.Watch + + -- ** CalendarCalendarsClear + , module Calendar.Calendars.Clear + + -- ** CalendarCalendarsDelete + , module Calendar.Calendars.Delete + + -- ** CalendarCalendarsGet + , module Calendar.Calendars.Get + + -- ** CalendarCalendarsInsert + , module Calendar.Calendars.Insert + + -- ** CalendarCalendarsPatch + , module Calendar.Calendars.Patch + + -- ** CalendarCalendarsUpdate + , module Calendar.Calendars.Update + + -- ** CalendarChannelsStop + , module Calendar.Channels.Stop + + -- ** CalendarColorsGet + , module Calendar.Colors.Get + + -- ** CalendarEventsDelete + , module Calendar.Events.Delete + + -- ** CalendarEventsGet + , module Calendar.Events.Get + + -- ** CalendarEventsImport + , module Calendar.Events.Import + + -- ** CalendarEventsInsert + , module Calendar.Events.Insert + + -- ** CalendarEventsInstances + , module Calendar.Events.Instances + + -- ** CalendarEventsList + , module Calendar.Events.List + + -- ** CalendarEventsMove + , module Calendar.Events.Move + + -- ** CalendarEventsPatch + , module Calendar.Events.Patch + + -- ** CalendarEventsQuickAdd + , module Calendar.Events.QuickAdd + + -- ** CalendarEventsUpdate + , module Calendar.Events.Update + + -- ** CalendarEventsWatch + , module Calendar.Events.Watch + + -- ** CalendarFreebusyQuery + , module Calendar.Freebusy.Query + + -- ** CalendarSettingsGet + , module Calendar.Settings.Get + + -- ** CalendarSettingsList + , module Calendar.Settings.List + + -- ** CalendarSettingsWatch + , module Calendar.Settings.Watch + + -- * Types + + -- ** CalendarListEntry + , CalendarListEntry + , calendarListEntry + , cleSummary + , cleEtag + , cleLocation + , cleKind + , cleNotificationSettings + , cleBackgroundColor + , cleForegroundColor + , cleDefaultReminders + , cleSelected + , clePrimary + , cleHidden + , cleId + , cleDeleted + , cleAccessRole + , cleSummaryOverride + , cleColorId + , cleTimeZone + , cleDescription + + -- ** Event + , Event + , event + , eSummary + , eOriginalStartTime + , eCreator + , eStatus + , eGuestsCanModify + , eEtag + , eAttachments + , eLocked + , eLocation + , eAttendees + , eReminders + , eKind + , eCreated + , eTransparency + , eRecurringEventId + , eStart + , ePrivateCopy + , eEndTimeUnspecified + , eExtendedProperties + , eVisibility + , eGuestsCanInviteOthers + , eRecurrence + , eGadget + , eSequence + , eICalUID + , eEnd + , eAttendeesOmitted + , eSource + , eId + , eHtmlLink + , eUpdated + , eColorId + , eAnyoneCanAddSelf + , eGuestsCanSeeOtherGuests + , eHangoutLink + , eDescription + , eOrganizer + + -- ** FreeBusyRequestItem + , FreeBusyRequestItem + , freeBusyRequestItem + , fbriId + + -- ** Settings + , Settings + , settings + , sEtag + , sNextPageToken + , sKind + , sItems + , sNextSyncToken + + -- ** EventAttachment + , EventAttachment + , eventAttachment + , eaFileUrl + , eaIconLink + , eaMimeType + , eaTitle + , eaFileId + + -- ** TimePeriod + , TimePeriod + , timePeriod + , tpStart + , tpEnd + + -- ** ColorDefinition + , ColorDefinition + , colorDefinition + , cdForeground + , cdBackground + + -- ** Error + , Error + , error' + , eDomain + , eReason + + -- ** FreeBusyCalendar + , FreeBusyCalendar + , freeBusyCalendar + , fbcBusy + , fbcErrors + + -- ** Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- ** Setting + , Setting + , setting + , setEtag + , setKind + , setValue + , setId + + -- ** CalendarNotification + , CalendarNotification + , calendarNotification + , cnMethod + , cnType + + -- ** Events + , Events + , events + , eveSummary + , eveEtag + , eveNextPageToken + , eveKind + , eveItems + , eveDefaultReminders + , eveUpdated + , eveAccessRole + , eveTimeZone + , eveNextSyncToken + , eveDescription + + -- ** EventReminder + , EventReminder + , eventReminder + , erMethod + , erMinutes + + -- ** FreeBusyResponse + , FreeBusyResponse + , freeBusyResponse + , fbrGroups + , fbrTimeMin + , fbrKind + , fbrCalendars + , fbrTimeMax + + -- ** Calendar + , Calendar + , calendar + , calSummary + , calEtag + , calLocation + , calKind + , calId + , calTimeZone + , calDescription + + -- ** EventAttendee + , EventAttendee + , eventAttendee + , eaEmail + , eaResponseStatus + , eaSelf + , eaResource + , eaAdditionalGuests + , eaDisplayName + , eaId + , eaComment + , eaOptional + , eaOrganizer + + -- ** EventDateTime + , EventDateTime + , eventDateTime + , edtDate + , edtTimeZone + , edtDateTime + + -- ** CalendarList + , CalendarList + , calendarList + , clEtag + , clNextPageToken + , clKind + , clItems + , clNextSyncToken + + -- ** FreeBusyRequest + , FreeBusyRequest + , freeBusyRequest + , fCalendarExpansionMax + , fTimeMin + , fItems + , fGroupExpansionMax + , fTimeZone + , fTimeMax + + -- ** ACLRule + , ACLRule + , aCLRule + , arEtag + , arKind + , arRole + , arScope + , arId + + -- ** Colors + , Colors + , colors + , colEvent + , colKind + , colCalendar + , colUpdated + + -- ** FreeBusyGroup + , FreeBusyGroup + , freeBusyGroup + , fbgCalendars + , fbgErrors + + -- ** ACL + , ACL + , aCL + , aclEtag + , aclNextPageToken + , aclKind + , aclItems + , aclNextSyncToken + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude +import Network.Google.Resource.Calendar.ACL.Delete +import Network.Google.Resource.Calendar.ACL.Get +import Network.Google.Resource.Calendar.ACL.Insert +import Network.Google.Resource.Calendar.ACL.List +import Network.Google.Resource.Calendar.ACL.Patch +import Network.Google.Resource.Calendar.ACL.Update +import Network.Google.Resource.Calendar.ACL.Watch +import Network.Google.Resource.Calendar.CalendarList.Delete +import Network.Google.Resource.Calendar.CalendarList.Get +import Network.Google.Resource.Calendar.CalendarList.Insert +import Network.Google.Resource.Calendar.CalendarList.List +import Network.Google.Resource.Calendar.CalendarList.Patch +import Network.Google.Resource.Calendar.CalendarList.Update +import Network.Google.Resource.Calendar.CalendarList.Watch +import Network.Google.Resource.Calendar.Calendars.Clear +import Network.Google.Resource.Calendar.Calendars.Delete +import Network.Google.Resource.Calendar.Calendars.Get +import Network.Google.Resource.Calendar.Calendars.Insert +import Network.Google.Resource.Calendar.Calendars.Patch +import Network.Google.Resource.Calendar.Calendars.Update +import Network.Google.Resource.Calendar.Channels.Stop +import Network.Google.Resource.Calendar.Colors.Get +import Network.Google.Resource.Calendar.Events.Delete +import Network.Google.Resource.Calendar.Events.Get +import Network.Google.Resource.Calendar.Events.Import +import Network.Google.Resource.Calendar.Events.Insert +import Network.Google.Resource.Calendar.Events.Instances +import Network.Google.Resource.Calendar.Events.List +import Network.Google.Resource.Calendar.Events.Move +import Network.Google.Resource.Calendar.Events.Patch +import Network.Google.Resource.Calendar.Events.QuickAdd +import Network.Google.Resource.Calendar.Events.Update +import Network.Google.Resource.Calendar.Events.Watch +import Network.Google.Resource.Calendar.Freebusy.Query +import Network.Google.Resource.Calendar.Settings.Get +import Network.Google.Resource.Calendar.Settings.List +import Network.Google.Resource.Calendar.Settings.Watch + +{- $resources +TODO +-} + +type AppsCalendarAPI = + Settings :<|> Channels :<|> Calendars :<|> Events + :<|> CalendarList + :<|> ACL + :<|> Colors + :<|> Freebusy + +appsCalendarAPI :: Proxy AppsCalendarAPI +appsCalendarAPI = Proxy diff --git a/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types.hs b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types.hs new file mode 100644 index 000000000..004d50705 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types.hs @@ -0,0 +1,281 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsCalendar.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsCalendar.Types + ( + -- * Service URL + appsCalendarURL + + -- * CalendarListEntry + , CalendarListEntry + , calendarListEntry + , cleSummary + , cleEtag + , cleLocation + , cleKind + , cleNotificationSettings + , cleBackgroundColor + , cleForegroundColor + , cleDefaultReminders + , cleSelected + , clePrimary + , cleHidden + , cleId + , cleDeleted + , cleAccessRole + , cleSummaryOverride + , cleColorId + , cleTimeZone + , cleDescription + + -- * Event + , Event + , event + , eSummary + , eOriginalStartTime + , eCreator + , eStatus + , eGuestsCanModify + , eEtag + , eAttachments + , eLocked + , eLocation + , eAttendees + , eReminders + , eKind + , eCreated + , eTransparency + , eRecurringEventId + , eStart + , ePrivateCopy + , eEndTimeUnspecified + , eExtendedProperties + , eVisibility + , eGuestsCanInviteOthers + , eRecurrence + , eGadget + , eSequence + , eICalUID + , eEnd + , eAttendeesOmitted + , eSource + , eId + , eHtmlLink + , eUpdated + , eColorId + , eAnyoneCanAddSelf + , eGuestsCanSeeOtherGuests + , eHangoutLink + , eDescription + , eOrganizer + + -- * FreeBusyRequestItem + , FreeBusyRequestItem + , freeBusyRequestItem + , fbriId + + -- * Settings + , Settings + , settings + , sEtag + , sNextPageToken + , sKind + , sItems + , sNextSyncToken + + -- * EventAttachment + , EventAttachment + , eventAttachment + , eaFileUrl + , eaIconLink + , eaMimeType + , eaTitle + , eaFileId + + -- * TimePeriod + , TimePeriod + , timePeriod + , tpStart + , tpEnd + + -- * ColorDefinition + , ColorDefinition + , colorDefinition + , cdForeground + , cdBackground + + -- * Error + , Error + , error' + , eDomain + , eReason + + -- * FreeBusyCalendar + , FreeBusyCalendar + , freeBusyCalendar + , fbcBusy + , fbcErrors + + -- * Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- * Setting + , Setting + , setting + , setEtag + , setKind + , setValue + , setId + + -- * CalendarNotification + , CalendarNotification + , calendarNotification + , cnMethod + , cnType + + -- * Events + , Events + , events + , eveSummary + , eveEtag + , eveNextPageToken + , eveKind + , eveItems + , eveDefaultReminders + , eveUpdated + , eveAccessRole + , eveTimeZone + , eveNextSyncToken + , eveDescription + + -- * EventReminder + , EventReminder + , eventReminder + , erMethod + , erMinutes + + -- * FreeBusyResponse + , FreeBusyResponse + , freeBusyResponse + , fbrGroups + , fbrTimeMin + , fbrKind + , fbrCalendars + , fbrTimeMax + + -- * Calendar + , Calendar + , calendar + , calSummary + , calEtag + , calLocation + , calKind + , calId + , calTimeZone + , calDescription + + -- * EventAttendee + , EventAttendee + , eventAttendee + , eaEmail + , eaResponseStatus + , eaSelf + , eaResource + , eaAdditionalGuests + , eaDisplayName + , eaId + , eaComment + , eaOptional + , eaOrganizer + + -- * EventDateTime + , EventDateTime + , eventDateTime + , edtDate + , edtTimeZone + , edtDateTime + + -- * CalendarList + , CalendarList + , calendarList + , clEtag + , clNextPageToken + , clKind + , clItems + , clNextSyncToken + + -- * FreeBusyRequest + , FreeBusyRequest + , freeBusyRequest + , fCalendarExpansionMax + , fTimeMin + , fItems + , fGroupExpansionMax + , fTimeZone + , fTimeMax + + -- * ACLRule + , ACLRule + , aCLRule + , arEtag + , arKind + , arRole + , arScope + , arId + + -- * Colors + , Colors + , colors + , colEvent + , colKind + , colCalendar + , colUpdated + + -- * FreeBusyGroup + , FreeBusyGroup + , freeBusyGroup + , fbgCalendars + , fbgErrors + + -- * ACL + , ACL + , aCL + , aclEtag + , aclNextPageToken + , aclKind + , aclItems + , aclNextSyncToken + ) where + +import Network.Google.AppsCalendar.Types.Product +import Network.Google.AppsCalendar.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v3' of the Calendar API. +appsCalendarURL :: BaseURL +appsCalendarURL + = BaseUrl Https + "https://www.googleapis.com/calendar/v3/" + 443 diff --git a/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs new file mode 100644 index 000000000..a45db5495 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs @@ -0,0 +1,2466 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsCalendar.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsCalendar.Types.Product where + +import Network.Google.AppsCalendar.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'calendarListEntry' smart constructor. +data CalendarListEntry = CalendarListEntry + { _cleSummary :: !(Maybe Text) + , _cleEtag :: !(Maybe Text) + , _cleLocation :: !(Maybe Text) + , _cleKind :: !Text + , _cleNotificationSettings :: !(Maybe CalendarListEntryNotificationSettings) + , _cleBackgroundColor :: !(Maybe Text) + , _cleForegroundColor :: !(Maybe Text) + , _cleDefaultReminders :: !(Maybe [Maybe EventReminder]) + , _cleSelected :: !Bool + , _clePrimary :: !Bool + , _cleHidden :: !Bool + , _cleId :: !(Maybe Text) + , _cleDeleted :: !Bool + , _cleAccessRole :: !(Maybe Text) + , _cleSummaryOverride :: !(Maybe Text) + , _cleColorId :: !(Maybe Text) + , _cleTimeZone :: !(Maybe Text) + , _cleDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cleSummary' +-- +-- * 'cleEtag' +-- +-- * 'cleLocation' +-- +-- * 'cleKind' +-- +-- * 'cleNotificationSettings' +-- +-- * 'cleBackgroundColor' +-- +-- * 'cleForegroundColor' +-- +-- * 'cleDefaultReminders' +-- +-- * 'cleSelected' +-- +-- * 'clePrimary' +-- +-- * 'cleHidden' +-- +-- * 'cleId' +-- +-- * 'cleDeleted' +-- +-- * 'cleAccessRole' +-- +-- * 'cleSummaryOverride' +-- +-- * 'cleColorId' +-- +-- * 'cleTimeZone' +-- +-- * 'cleDescription' +calendarListEntry + :: CalendarListEntry +calendarListEntry = + CalendarListEntry + { _cleSummary = Nothing + , _cleEtag = Nothing + , _cleLocation = Nothing + , _cleKind = "calendar#calendarListEntry" + , _cleNotificationSettings = Nothing + , _cleBackgroundColor = Nothing + , _cleForegroundColor = Nothing + , _cleDefaultReminders = Nothing + , _cleSelected = False + , _clePrimary = False + , _cleHidden = False + , _cleId = Nothing + , _cleDeleted = False + , _cleAccessRole = Nothing + , _cleSummaryOverride = Nothing + , _cleColorId = Nothing + , _cleTimeZone = Nothing + , _cleDescription = Nothing + } + +-- | Title of the calendar. Read-only. +cleSummary :: Lens' CalendarListEntry (Maybe Text) +cleSummary + = lens _cleSummary (\ s a -> s{_cleSummary = a}) + +-- | ETag of the resource. +cleEtag :: Lens' CalendarListEntry (Maybe Text) +cleEtag = lens _cleEtag (\ s a -> s{_cleEtag = a}) + +-- | Geographic location of the calendar as free-form text. Optional. +-- Read-only. +cleLocation :: Lens' CalendarListEntry (Maybe Text) +cleLocation + = lens _cleLocation (\ s a -> s{_cleLocation = a}) + +-- | Type of the resource (\"calendar#calendarListEntry\"). +cleKind :: Lens' CalendarListEntry Text +cleKind = lens _cleKind (\ s a -> s{_cleKind = a}) + +-- | The notifications that the authenticated user is receiving for this +-- calendar. +cleNotificationSettings :: Lens' CalendarListEntry (Maybe CalendarListEntryNotificationSettings) +cleNotificationSettings + = lens _cleNotificationSettings + (\ s a -> s{_cleNotificationSettings = a}) + +-- | The main color of the calendar in the hexadecimal format \"#0088aa\". +-- This property supersedes the index-based colorId property. To set or +-- change this property, you need to specify colorRgbFormat=true in the +-- parameters of the insert, update and patch methods. Optional. +cleBackgroundColor :: Lens' CalendarListEntry (Maybe Text) +cleBackgroundColor + = lens _cleBackgroundColor + (\ s a -> s{_cleBackgroundColor = a}) + +-- | The foreground color of the calendar in the hexadecimal format +-- \"#ffffff\". This property supersedes the index-based colorId property. +-- To set or change this property, you need to specify colorRgbFormat=true +-- in the parameters of the insert, update and patch methods. Optional. +cleForegroundColor :: Lens' CalendarListEntry (Maybe Text) +cleForegroundColor + = lens _cleForegroundColor + (\ s a -> s{_cleForegroundColor = a}) + +-- | The default reminders that the authenticated user has for this calendar. +cleDefaultReminders :: Lens' CalendarListEntry [Maybe EventReminder] +cleDefaultReminders + = lens _cleDefaultReminders + (\ s a -> s{_cleDefaultReminders = a}) + . _Default + . _Coerce + +-- | Whether the calendar content shows up in the calendar UI. Optional. The +-- default is False. +cleSelected :: Lens' CalendarListEntry Bool +cleSelected + = lens _cleSelected (\ s a -> s{_cleSelected = a}) + +-- | Whether the calendar is the primary calendar of the authenticated user. +-- Read-only. Optional. The default is False. +clePrimary :: Lens' CalendarListEntry Bool +clePrimary + = lens _clePrimary (\ s a -> s{_clePrimary = a}) + +-- | Whether the calendar has been hidden from the list. Optional. The +-- default is False. +cleHidden :: Lens' CalendarListEntry Bool +cleHidden + = lens _cleHidden (\ s a -> s{_cleHidden = a}) + +-- | Identifier of the calendar. +cleId :: Lens' CalendarListEntry (Maybe Text) +cleId = lens _cleId (\ s a -> s{_cleId = a}) + +-- | Whether this calendar list entry has been deleted from the calendar +-- list. Read-only. Optional. The default is False. +cleDeleted :: Lens' CalendarListEntry Bool +cleDeleted + = lens _cleDeleted (\ s a -> s{_cleDeleted = a}) + +-- | The effective access role that the authenticated user has on the +-- calendar. Read-only. Possible values are: - \"freeBusyReader\" - +-- Provides read access to free\/busy information. - \"reader\" - Provides +-- read access to the calendar. Private events will appear to users with +-- reader access, but event details will be hidden. - \"writer\" - Provides +-- read and write access to the calendar. Private events will appear to +-- users with writer access, and event details will be visible. - \"owner\" +-- - Provides ownership of the calendar. This role has all of the +-- permissions of the writer role with the additional ability to see and +-- manipulate ACLs. +cleAccessRole :: Lens' CalendarListEntry (Maybe Text) +cleAccessRole + = lens _cleAccessRole + (\ s a -> s{_cleAccessRole = a}) + +-- | The summary that the authenticated user has set for this calendar. +-- Optional. +cleSummaryOverride :: Lens' CalendarListEntry (Maybe Text) +cleSummaryOverride + = lens _cleSummaryOverride + (\ s a -> s{_cleSummaryOverride = a}) + +-- | The color of the calendar. This is an ID referring to an entry in the +-- calendar section of the colors definition (see the colors endpoint). +-- This property is superseded by the backgroundColor and foregroundColor +-- properties and can be ignored when using these properties. Optional. +cleColorId :: Lens' CalendarListEntry (Maybe Text) +cleColorId + = lens _cleColorId (\ s a -> s{_cleColorId = a}) + +-- | The time zone of the calendar. Optional. Read-only. +cleTimeZone :: Lens' CalendarListEntry (Maybe Text) +cleTimeZone + = lens _cleTimeZone (\ s a -> s{_cleTimeZone = a}) + +-- | Description of the calendar. Optional. Read-only. +cleDescription :: Lens' CalendarListEntry (Maybe Text) +cleDescription + = lens _cleDescription + (\ s a -> s{_cleDescription = a}) + +instance FromJSON CalendarListEntry where + parseJSON + = withObject "CalendarListEntry" + (\ o -> + CalendarListEntry <$> + (o .:? "summary") <*> (o .:? "etag") <*> + (o .:? "location") + <*> (o .:? "kind" .!= "calendar#calendarListEntry") + <*> (o .:? "notificationSettings") + <*> (o .:? "backgroundColor") + <*> (o .:? "foregroundColor") + <*> (o .:? "defaultReminders" .!= mempty) + <*> (o .:? "selected" .!= False) + <*> (o .:? "primary" .!= False) + <*> (o .:? "hidden" .!= False) + <*> (o .:? "id") + <*> (o .:? "deleted" .!= False) + <*> (o .:? "accessRole") + <*> (o .:? "summaryOverride") + <*> (o .:? "colorId") + <*> (o .:? "timeZone") + <*> (o .:? "description")) + +instance ToJSON CalendarListEntry where + toJSON CalendarListEntry{..} + = object + (catMaybes + [("summary" .=) <$> _cleSummary, + ("etag" .=) <$> _cleEtag, + ("location" .=) <$> _cleLocation, + Just ("kind" .= _cleKind), + ("notificationSettings" .=) <$> + _cleNotificationSettings, + ("backgroundColor" .=) <$> _cleBackgroundColor, + ("foregroundColor" .=) <$> _cleForegroundColor, + ("defaultReminders" .=) <$> _cleDefaultReminders, + Just ("selected" .= _cleSelected), + Just ("primary" .= _clePrimary), + Just ("hidden" .= _cleHidden), ("id" .=) <$> _cleId, + Just ("deleted" .= _cleDeleted), + ("accessRole" .=) <$> _cleAccessRole, + ("summaryOverride" .=) <$> _cleSummaryOverride, + ("colorId" .=) <$> _cleColorId, + ("timeZone" .=) <$> _cleTimeZone, + ("description" .=) <$> _cleDescription]) + +-- +-- /See:/ 'event' smart constructor. +data Event = Event + { _eSummary :: !(Maybe Text) + , _eOriginalStartTime :: !(Maybe (Maybe EventDateTime)) + , _eCreator :: !(Maybe EventCreator) + , _eStatus :: !(Maybe Text) + , _eGuestsCanModify :: !Bool + , _eEtag :: !(Maybe Text) + , _eAttachments :: !(Maybe [Maybe EventAttachment]) + , _eLocked :: !Bool + , _eLocation :: !(Maybe Text) + , _eAttendees :: !(Maybe [Maybe EventAttendee]) + , _eReminders :: !(Maybe EventReminders) + , _eKind :: !Text + , _eCreated :: !(Maybe UTCTime) + , _eTransparency :: !Text + , _eRecurringEventId :: !(Maybe Text) + , _eStart :: !(Maybe (Maybe EventDateTime)) + , _ePrivateCopy :: !Bool + , _eEndTimeUnspecified :: !Bool + , _eExtendedProperties :: !(Maybe EventExtendedProperties) + , _eVisibility :: !Text + , _eGuestsCanInviteOthers :: !Bool + , _eRecurrence :: !(Maybe [Text]) + , _eGadget :: !(Maybe EventGadget) + , _eSequence :: !(Maybe Int32) + , _eICalUID :: !(Maybe Text) + , _eEnd :: !(Maybe (Maybe EventDateTime)) + , _eAttendeesOmitted :: !Bool + , _eSource :: !(Maybe EventSource) + , _eId :: !(Maybe Text) + , _eHtmlLink :: !(Maybe Text) + , _eUpdated :: !(Maybe UTCTime) + , _eColorId :: !(Maybe Text) + , _eAnyoneCanAddSelf :: !Bool + , _eGuestsCanSeeOtherGuests :: !Bool + , _eHangoutLink :: !(Maybe Text) + , _eDescription :: !(Maybe Text) + , _eOrganizer :: !(Maybe EventOrganizer) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Event' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eSummary' +-- +-- * 'eOriginalStartTime' +-- +-- * 'eCreator' +-- +-- * 'eStatus' +-- +-- * 'eGuestsCanModify' +-- +-- * 'eEtag' +-- +-- * 'eAttachments' +-- +-- * 'eLocked' +-- +-- * 'eLocation' +-- +-- * 'eAttendees' +-- +-- * 'eReminders' +-- +-- * 'eKind' +-- +-- * 'eCreated' +-- +-- * 'eTransparency' +-- +-- * 'eRecurringEventId' +-- +-- * 'eStart' +-- +-- * 'ePrivateCopy' +-- +-- * 'eEndTimeUnspecified' +-- +-- * 'eExtendedProperties' +-- +-- * 'eVisibility' +-- +-- * 'eGuestsCanInviteOthers' +-- +-- * 'eRecurrence' +-- +-- * 'eGadget' +-- +-- * 'eSequence' +-- +-- * 'eICalUID' +-- +-- * 'eEnd' +-- +-- * 'eAttendeesOmitted' +-- +-- * 'eSource' +-- +-- * 'eId' +-- +-- * 'eHtmlLink' +-- +-- * 'eUpdated' +-- +-- * 'eColorId' +-- +-- * 'eAnyoneCanAddSelf' +-- +-- * 'eGuestsCanSeeOtherGuests' +-- +-- * 'eHangoutLink' +-- +-- * 'eDescription' +-- +-- * 'eOrganizer' +event + :: Event +event = + Event + { _eSummary = Nothing + , _eOriginalStartTime = Nothing + , _eCreator = Nothing + , _eStatus = Nothing + , _eGuestsCanModify = False + , _eEtag = Nothing + , _eAttachments = Nothing + , _eLocked = False + , _eLocation = Nothing + , _eAttendees = Nothing + , _eReminders = Nothing + , _eKind = "calendar#event" + , _eCreated = Nothing + , _eTransparency = "opaque" + , _eRecurringEventId = Nothing + , _eStart = Nothing + , _ePrivateCopy = False + , _eEndTimeUnspecified = False + , _eExtendedProperties = Nothing + , _eVisibility = "default" + , _eGuestsCanInviteOthers = True + , _eRecurrence = Nothing + , _eGadget = Nothing + , _eSequence = Nothing + , _eICalUID = Nothing + , _eEnd = Nothing + , _eAttendeesOmitted = False + , _eSource = Nothing + , _eId = Nothing + , _eHtmlLink = Nothing + , _eUpdated = Nothing + , _eColorId = Nothing + , _eAnyoneCanAddSelf = False + , _eGuestsCanSeeOtherGuests = True + , _eHangoutLink = Nothing + , _eDescription = Nothing + , _eOrganizer = Nothing + } + +-- | Title of the event. +eSummary :: Lens' Event (Maybe Text) +eSummary = lens _eSummary (\ s a -> s{_eSummary = a}) + +-- | For an instance of a recurring event, this is the time at which this +-- event would start according to the recurrence data in the recurring +-- event identified by recurringEventId. Immutable. +eOriginalStartTime :: Lens' Event (Maybe (Maybe EventDateTime)) +eOriginalStartTime + = lens _eOriginalStartTime + (\ s a -> s{_eOriginalStartTime = a}) + +-- | The creator of the event. Read-only. +eCreator :: Lens' Event (Maybe EventCreator) +eCreator = lens _eCreator (\ s a -> s{_eCreator = a}) + +-- | Status of the event. Optional. Possible values are: - \"confirmed\" - +-- The event is confirmed. This is the default status. - \"tentative\" - +-- The event is tentatively confirmed. - \"cancelled\" - The event is +-- cancelled. +eStatus :: Lens' Event (Maybe Text) +eStatus = lens _eStatus (\ s a -> s{_eStatus = a}) + +-- | Whether attendees other than the organizer can modify the event. +-- Optional. The default is False. +eGuestsCanModify :: Lens' Event Bool +eGuestsCanModify + = lens _eGuestsCanModify + (\ s a -> s{_eGuestsCanModify = a}) + +-- | ETag of the resource. +eEtag :: Lens' Event (Maybe Text) +eEtag = lens _eEtag (\ s a -> s{_eEtag = a}) + +-- | File attachments for the event. Currently only Google Drive attachments +-- are supported. In order to modify attachments the supportsAttachments +-- request parameter should be set to true. There can be at most 25 +-- attachments per event, +eAttachments :: Lens' Event [Maybe EventAttachment] +eAttachments + = lens _eAttachments (\ s a -> s{_eAttachments = a}) + . _Default + . _Coerce + +-- | Whether this is a locked event copy where no changes can be made to the +-- main event fields \"summary\", \"description\", \"location\", \"start\", +-- \"end\" or \"recurrence\". The default is False. Read-Only. +eLocked :: Lens' Event Bool +eLocked = lens _eLocked (\ s a -> s{_eLocked = a}) + +-- | Geographic location of the event as free-form text. Optional. +eLocation :: Lens' Event (Maybe Text) +eLocation + = lens _eLocation (\ s a -> s{_eLocation = a}) + +-- | The attendees of the event. See the Events with attendees guide for more +-- information on scheduling events with other calendar users. +eAttendees :: Lens' Event [Maybe EventAttendee] +eAttendees + = lens _eAttendees (\ s a -> s{_eAttendees = a}) . + _Default + . _Coerce + +-- | Information about the event\'s reminders for the authenticated user. +eReminders :: Lens' Event (Maybe EventReminders) +eReminders + = lens _eReminders (\ s a -> s{_eReminders = a}) + +-- | Type of the resource (\"calendar#event\"). +eKind :: Lens' Event Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | Creation time of the event (as a RFC3339 timestamp). Read-only. +eCreated :: Lens' Event (Maybe UTCTime) +eCreated = lens _eCreated (\ s a -> s{_eCreated = a}) + +-- | Whether the event blocks time on the calendar. Optional. Possible values +-- are: - \"opaque\" - The event blocks time on the calendar. This is the +-- default value. - \"transparent\" - The event does not block time on the +-- calendar. +eTransparency :: Lens' Event Text +eTransparency + = lens _eTransparency + (\ s a -> s{_eTransparency = a}) + +-- | For an instance of a recurring event, this is the id of the recurring +-- event to which this instance belongs. Immutable. +eRecurringEventId :: Lens' Event (Maybe Text) +eRecurringEventId + = lens _eRecurringEventId + (\ s a -> s{_eRecurringEventId = a}) + +-- | The (inclusive) start time of the event. For a recurring event, this is +-- the start time of the first instance. +eStart :: Lens' Event (Maybe (Maybe EventDateTime)) +eStart = lens _eStart (\ s a -> s{_eStart = a}) + +-- | Whether this is a private event copy where changes are not shared with +-- other copies on other calendars. Optional. Immutable. The default is +-- False. +ePrivateCopy :: Lens' Event Bool +ePrivateCopy + = lens _ePrivateCopy (\ s a -> s{_ePrivateCopy = a}) + +-- | Whether the end time is actually unspecified. An end time is still +-- provided for compatibility reasons, even if this attribute is set to +-- True. The default is False. +eEndTimeUnspecified :: Lens' Event Bool +eEndTimeUnspecified + = lens _eEndTimeUnspecified + (\ s a -> s{_eEndTimeUnspecified = a}) + +-- | Extended properties of the event. +eExtendedProperties :: Lens' Event (Maybe EventExtendedProperties) +eExtendedProperties + = lens _eExtendedProperties + (\ s a -> s{_eExtendedProperties = a}) + +-- | Visibility of the event. Optional. Possible values are: - \"default\" - +-- Uses the default visibility for events on the calendar. This is the +-- default value. - \"public\" - The event is public and event details are +-- visible to all readers of the calendar. - \"private\" - The event is +-- private and only event attendees may view event details. - +-- \"confidential\" - The event is private. This value is provided for +-- compatibility reasons. +eVisibility :: Lens' Event Text +eVisibility + = lens _eVisibility (\ s a -> s{_eVisibility = a}) + +-- | Whether attendees other than the organizer can invite others to the +-- event. Optional. The default is True. +eGuestsCanInviteOthers :: Lens' Event Bool +eGuestsCanInviteOthers + = lens _eGuestsCanInviteOthers + (\ s a -> s{_eGuestsCanInviteOthers = a}) + +-- | List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as +-- specified in RFC5545. Note that DTSTART and DTEND lines are not allowed +-- in this field; event start and end times are specified in the start and +-- end fields. This field is omitted for single events or instances of +-- recurring events. +eRecurrence :: Lens' Event [Text] +eRecurrence + = lens _eRecurrence (\ s a -> s{_eRecurrence = a}) . + _Default + . _Coerce + +-- | A gadget that extends this event. +eGadget :: Lens' Event (Maybe EventGadget) +eGadget = lens _eGadget (\ s a -> s{_eGadget = a}) + +-- | Sequence number as per iCalendar. +eSequence :: Lens' Event (Maybe Int32) +eSequence + = lens _eSequence (\ s a -> s{_eSequence = a}) + +-- | Event unique identifier as defined in RFC5545. It is used to uniquely +-- identify events accross calendaring systems and must be supplied when +-- importing events via the import method. Note that the icalUID and the id +-- are not identical and only one of them should be supplied at event +-- creation time. One difference in their semantics is that in recurring +-- events, all occurrences of one event have different ids while they all +-- share the same icalUIDs. +eICalUID :: Lens' Event (Maybe Text) +eICalUID = lens _eICalUID (\ s a -> s{_eICalUID = a}) + +-- | The (exclusive) end time of the event. For a recurring event, this is +-- the end time of the first instance. +eEnd :: Lens' Event (Maybe (Maybe EventDateTime)) +eEnd = lens _eEnd (\ s a -> s{_eEnd = a}) + +-- | Whether attendees may have been omitted from the event\'s +-- representation. When retrieving an event, this may be due to a +-- restriction specified by the maxAttendee query parameter. When updating +-- an event, this can be used to only update the participant\'s response. +-- Optional. The default is False. +eAttendeesOmitted :: Lens' Event Bool +eAttendeesOmitted + = lens _eAttendeesOmitted + (\ s a -> s{_eAttendeesOmitted = a}) + +-- | Source from which the event was created. For example, a web page, an +-- email message or any document identifiable by an URL with HTTP or HTTPS +-- scheme. Can only be seen or modified by the creator of the event. +eSource :: Lens' Event (Maybe EventSource) +eSource = lens _eSource (\ s a -> s{_eSource = a}) + +-- | Opaque identifier of the event. When creating new single or recurring +-- events, you can specify their IDs. Provided IDs must follow these rules: +-- - characters allowed in the ID are those used in base32hex encoding, +-- i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 +-- - the length of the ID must be between 5 and 1024 characters - the ID +-- must be unique per calendar Due to the globally distributed nature of +-- the system, we cannot guarantee that ID collisions will be detected at +-- event creation time. To minimize the risk of collisions we recommend +-- using an established UUID algorithm such as one described in RFC4122. If +-- you do not specify an ID, it will be automatically generated by the +-- server. Note that the icalUID and the id are not identical and only one +-- of them should be supplied at event creation time. One difference in +-- their semantics is that in recurring events, all occurrences of one +-- event have different ids while they all share the same icalUIDs. +eId :: Lens' Event (Maybe Text) +eId = lens _eId (\ s a -> s{_eId = a}) + +-- | An absolute link to this event in the Google Calendar Web UI. Read-only. +eHtmlLink :: Lens' Event (Maybe Text) +eHtmlLink + = lens _eHtmlLink (\ s a -> s{_eHtmlLink = a}) + +-- | Last modification time of the event (as a RFC3339 timestamp). Read-only. +eUpdated :: Lens' Event (Maybe UTCTime) +eUpdated = lens _eUpdated (\ s a -> s{_eUpdated = a}) + +-- | The color of the event. This is an ID referring to an entry in the event +-- section of the colors definition (see the colors endpoint). Optional. +eColorId :: Lens' Event (Maybe Text) +eColorId = lens _eColorId (\ s a -> s{_eColorId = a}) + +-- | Whether anyone can invite themselves to the event. Optional. The default +-- is False. +eAnyoneCanAddSelf :: Lens' Event Bool +eAnyoneCanAddSelf + = lens _eAnyoneCanAddSelf + (\ s a -> s{_eAnyoneCanAddSelf = a}) + +-- | Whether attendees other than the organizer can see who the event\'s +-- attendees are. Optional. The default is True. +eGuestsCanSeeOtherGuests :: Lens' Event Bool +eGuestsCanSeeOtherGuests + = lens _eGuestsCanSeeOtherGuests + (\ s a -> s{_eGuestsCanSeeOtherGuests = a}) + +-- | An absolute link to the Google+ hangout associated with this event. +-- Read-only. +eHangoutLink :: Lens' Event (Maybe Text) +eHangoutLink + = lens _eHangoutLink (\ s a -> s{_eHangoutLink = a}) + +-- | Description of the event. Optional. +eDescription :: Lens' Event (Maybe Text) +eDescription + = lens _eDescription (\ s a -> s{_eDescription = a}) + +-- | The organizer of the event. If the organizer is also an attendee, this +-- is indicated with a separate entry in attendees with the organizer field +-- set to True. To change the organizer, use the move operation. Read-only, +-- except when importing an event. +eOrganizer :: Lens' Event (Maybe EventOrganizer) +eOrganizer + = lens _eOrganizer (\ s a -> s{_eOrganizer = a}) + +instance FromJSON Event where + parseJSON + = withObject "Event" + (\ o -> + Event <$> + (o .:? "summary") <*> (o .:? "originalStartTime") <*> + (o .:? "creator") + <*> (o .:? "status") + <*> (o .:? "guestsCanModify" .!= False) + <*> (o .:? "etag") + <*> (o .:? "attachments" .!= mempty) + <*> (o .:? "locked" .!= False) + <*> (o .:? "location") + <*> (o .:? "attendees" .!= mempty) + <*> (o .:? "reminders") + <*> (o .:? "kind" .!= "calendar#event") + <*> (o .:? "created") + <*> (o .:? "transparency" .!= "opaque") + <*> (o .:? "recurringEventId") + <*> (o .:? "start") + <*> (o .:? "privateCopy" .!= False) + <*> (o .:? "endTimeUnspecified" .!= False) + <*> (o .:? "extendedProperties") + <*> (o .:? "visibility" .!= "default") + <*> (o .:? "guestsCanInviteOthers" .!= True) + <*> (o .:? "recurrence" .!= mempty) + <*> (o .:? "gadget") + <*> (o .:? "sequence") + <*> (o .:? "iCalUID") + <*> (o .:? "end") + <*> (o .:? "attendeesOmitted" .!= False) + <*> (o .:? "source") + <*> (o .:? "id") + <*> (o .:? "htmlLink") + <*> (o .:? "updated") + <*> (o .:? "colorId") + <*> (o .:? "anyoneCanAddSelf" .!= False) + <*> (o .:? "guestsCanSeeOtherGuests" .!= True) + <*> (o .:? "hangoutLink") + <*> (o .:? "description") + <*> (o .:? "organizer")) + +instance ToJSON Event where + toJSON Event{..} + = object + (catMaybes + [("summary" .=) <$> _eSummary, + ("originalStartTime" .=) <$> _eOriginalStartTime, + ("creator" .=) <$> _eCreator, + ("status" .=) <$> _eStatus, + Just ("guestsCanModify" .= _eGuestsCanModify), + ("etag" .=) <$> _eEtag, + ("attachments" .=) <$> _eAttachments, + Just ("locked" .= _eLocked), + ("location" .=) <$> _eLocation, + ("attendees" .=) <$> _eAttendees, + ("reminders" .=) <$> _eReminders, + Just ("kind" .= _eKind), + ("created" .=) <$> _eCreated, + Just ("transparency" .= _eTransparency), + ("recurringEventId" .=) <$> _eRecurringEventId, + ("start" .=) <$> _eStart, + Just ("privateCopy" .= _ePrivateCopy), + Just ("endTimeUnspecified" .= _eEndTimeUnspecified), + ("extendedProperties" .=) <$> _eExtendedProperties, + Just ("visibility" .= _eVisibility), + Just + ("guestsCanInviteOthers" .= _eGuestsCanInviteOthers), + ("recurrence" .=) <$> _eRecurrence, + ("gadget" .=) <$> _eGadget, + ("sequence" .=) <$> _eSequence, + ("iCalUID" .=) <$> _eICalUID, ("end" .=) <$> _eEnd, + Just ("attendeesOmitted" .= _eAttendeesOmitted), + ("source" .=) <$> _eSource, ("id" .=) <$> _eId, + ("htmlLink" .=) <$> _eHtmlLink, + ("updated" .=) <$> _eUpdated, + ("colorId" .=) <$> _eColorId, + Just ("anyoneCanAddSelf" .= _eAnyoneCanAddSelf), + Just + ("guestsCanSeeOtherGuests" .= + _eGuestsCanSeeOtherGuests), + ("hangoutLink" .=) <$> _eHangoutLink, + ("description" .=) <$> _eDescription, + ("organizer" .=) <$> _eOrganizer]) + +-- +-- /See:/ 'freeBusyRequestItem' smart constructor. +newtype FreeBusyRequestItem = FreeBusyRequestItem + { _fbriId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBusyRequestItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbriId' +freeBusyRequestItem + :: FreeBusyRequestItem +freeBusyRequestItem = + FreeBusyRequestItem + { _fbriId = Nothing + } + +-- | The identifier of a calendar or a group. +fbriId :: Lens' FreeBusyRequestItem (Maybe Text) +fbriId = lens _fbriId (\ s a -> s{_fbriId = a}) + +instance FromJSON FreeBusyRequestItem where + parseJSON + = withObject "FreeBusyRequestItem" + (\ o -> FreeBusyRequestItem <$> (o .:? "id")) + +instance ToJSON FreeBusyRequestItem where + toJSON FreeBusyRequestItem{..} + = object (catMaybes [("id" .=) <$> _fbriId]) + +-- +-- /See:/ 'settings' smart constructor. +data Settings = Settings + { _sEtag :: !(Maybe Text) + , _sNextPageToken :: !(Maybe Text) + , _sKind :: !Text + , _sItems :: !(Maybe [Maybe Setting]) + , _sNextSyncToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Settings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sEtag' +-- +-- * 'sNextPageToken' +-- +-- * 'sKind' +-- +-- * 'sItems' +-- +-- * 'sNextSyncToken' +settings + :: Settings +settings = + Settings + { _sEtag = Nothing + , _sNextPageToken = Nothing + , _sKind = "calendar#settings" + , _sItems = Nothing + , _sNextSyncToken = Nothing + } + +-- | Etag of the collection. +sEtag :: Lens' Settings (Maybe Text) +sEtag = lens _sEtag (\ s a -> s{_sEtag = a}) + +-- | Token used to access the next page of this result. Omitted if no further +-- results are available, in which case nextSyncToken is provided. +sNextPageToken :: Lens' Settings (Maybe Text) +sNextPageToken + = lens _sNextPageToken + (\ s a -> s{_sNextPageToken = a}) + +-- | Type of the collection (\"calendar#settings\"). +sKind :: Lens' Settings Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | List of user settings. +sItems :: Lens' Settings [Maybe Setting] +sItems + = lens _sItems (\ s a -> s{_sItems = a}) . _Default . + _Coerce + +-- | Token used at a later point in time to retrieve only the entries that +-- have changed since this result was returned. Omitted if further results +-- are available, in which case nextPageToken is provided. +sNextSyncToken :: Lens' Settings (Maybe Text) +sNextSyncToken + = lens _sNextSyncToken + (\ s a -> s{_sNextSyncToken = a}) + +instance FromJSON Settings where + parseJSON + = withObject "Settings" + (\ o -> + Settings <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "calendar#settings") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "nextSyncToken")) + +instance ToJSON Settings where + toJSON Settings{..} + = object + (catMaybes + [("etag" .=) <$> _sEtag, + ("nextPageToken" .=) <$> _sNextPageToken, + Just ("kind" .= _sKind), ("items" .=) <$> _sItems, + ("nextSyncToken" .=) <$> _sNextSyncToken]) + +-- +-- /See:/ 'eventAttachment' smart constructor. +data EventAttachment = EventAttachment + { _eaFileUrl :: !(Maybe Text) + , _eaIconLink :: !(Maybe Text) + , _eaMimeType :: !(Maybe Text) + , _eaTitle :: !(Maybe Text) + , _eaFileId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventAttachment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eaFileUrl' +-- +-- * 'eaIconLink' +-- +-- * 'eaMimeType' +-- +-- * 'eaTitle' +-- +-- * 'eaFileId' +eventAttachment + :: EventAttachment +eventAttachment = + EventAttachment + { _eaFileUrl = Nothing + , _eaIconLink = Nothing + , _eaMimeType = Nothing + , _eaTitle = Nothing + , _eaFileId = Nothing + } + +-- | URL link to the attachment. For adding Google Drive file attachments use +-- the same format as in alternateLink property of the Files resource in +-- the Drive API. +eaFileUrl :: Lens' EventAttachment (Maybe Text) +eaFileUrl + = lens _eaFileUrl (\ s a -> s{_eaFileUrl = a}) + +-- | URL link to the attachment\'s icon. Read-only. +eaIconLink :: Lens' EventAttachment (Maybe Text) +eaIconLink + = lens _eaIconLink (\ s a -> s{_eaIconLink = a}) + +-- | Internet media type (MIME type) of the attachment. +eaMimeType :: Lens' EventAttachment (Maybe Text) +eaMimeType + = lens _eaMimeType (\ s a -> s{_eaMimeType = a}) + +-- | Attachment title. +eaTitle :: Lens' EventAttachment (Maybe Text) +eaTitle = lens _eaTitle (\ s a -> s{_eaTitle = a}) + +-- | ID of the attached file. Read-only. For Google Drive files, this is the +-- ID of the corresponding Files resource entry in the Drive API. +eaFileId :: Lens' EventAttachment (Maybe Text) +eaFileId = lens _eaFileId (\ s a -> s{_eaFileId = a}) + +instance FromJSON EventAttachment where + parseJSON + = withObject "EventAttachment" + (\ o -> + EventAttachment <$> + (o .:? "fileUrl") <*> (o .:? "iconLink") <*> + (o .:? "mimeType") + <*> (o .:? "title") + <*> (o .:? "fileId")) + +instance ToJSON EventAttachment where + toJSON EventAttachment{..} + = object + (catMaybes + [("fileUrl" .=) <$> _eaFileUrl, + ("iconLink" .=) <$> _eaIconLink, + ("mimeType" .=) <$> _eaMimeType, + ("title" .=) <$> _eaTitle, + ("fileId" .=) <$> _eaFileId]) + +-- +-- /See:/ 'timePeriod' smart constructor. +data TimePeriod = TimePeriod + { _tpStart :: !(Maybe UTCTime) + , _tpEnd :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimePeriod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpStart' +-- +-- * 'tpEnd' +timePeriod + :: TimePeriod +timePeriod = + TimePeriod + { _tpStart = Nothing + , _tpEnd = Nothing + } + +-- | The (inclusive) start of the time period. +tpStart :: Lens' TimePeriod (Maybe UTCTime) +tpStart = lens _tpStart (\ s a -> s{_tpStart = a}) + +-- | The (exclusive) end of the time period. +tpEnd :: Lens' TimePeriod (Maybe UTCTime) +tpEnd = lens _tpEnd (\ s a -> s{_tpEnd = a}) + +instance FromJSON TimePeriod where + parseJSON + = withObject "TimePeriod" + (\ o -> + TimePeriod <$> (o .:? "start") <*> (o .:? "end")) + +instance ToJSON TimePeriod where + toJSON TimePeriod{..} + = object + (catMaybes + [("start" .=) <$> _tpStart, ("end" .=) <$> _tpEnd]) + +-- +-- /See:/ 'colorDefinition' smart constructor. +data ColorDefinition = ColorDefinition + { _cdForeground :: !(Maybe Text) + , _cdBackground :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColorDefinition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdForeground' +-- +-- * 'cdBackground' +colorDefinition + :: ColorDefinition +colorDefinition = + ColorDefinition + { _cdForeground = Nothing + , _cdBackground = Nothing + } + +-- | The foreground color that can be used to write on top of a background +-- with \'background\' color. +cdForeground :: Lens' ColorDefinition (Maybe Text) +cdForeground + = lens _cdForeground (\ s a -> s{_cdForeground = a}) + +-- | The background color associated with this color definition. +cdBackground :: Lens' ColorDefinition (Maybe Text) +cdBackground + = lens _cdBackground (\ s a -> s{_cdBackground = a}) + +instance FromJSON ColorDefinition where + parseJSON + = withObject "ColorDefinition" + (\ o -> + ColorDefinition <$> + (o .:? "foreground") <*> (o .:? "background")) + +instance ToJSON ColorDefinition where + toJSON ColorDefinition{..} + = object + (catMaybes + [("foreground" .=) <$> _cdForeground, + ("background" .=) <$> _cdBackground]) + +-- +-- /See:/ 'error'' smart constructor. +data Error = Error + { _eDomain :: !(Maybe Text) + , _eReason :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Error' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eDomain' +-- +-- * 'eReason' +error' + :: Error +error' = + Error + { _eDomain = Nothing + , _eReason = Nothing + } + +-- | Domain, or broad category, of the error. +eDomain :: Lens' Error (Maybe Text) +eDomain = lens _eDomain (\ s a -> s{_eDomain = a}) + +-- | Specific reason for the error. Some of the possible values are: - +-- \"groupTooBig\" - The group of users requested is too large for a single +-- query. - \"tooManyCalendarsRequested\" - The number of calendars +-- requested is too large for a single query. - \"notFound\" - The +-- requested resource was not found. - \"internalError\" - The API service +-- has encountered an internal error. Additional error types may be added +-- in the future, so clients should gracefully handle additional error +-- statuses not included in this list. +eReason :: Lens' Error (Maybe Text) +eReason = lens _eReason (\ s a -> s{_eReason = a}) + +instance FromJSON Error where + parseJSON + = withObject "Error" + (\ o -> + Error <$> (o .:? "domain") <*> (o .:? "reason")) + +instance ToJSON Error where + toJSON Error{..} + = object + (catMaybes + [("domain" .=) <$> _eDomain, + ("reason" .=) <$> _eReason]) + +-- +-- /See:/ 'freeBusyCalendar' smart constructor. +data FreeBusyCalendar = FreeBusyCalendar + { _fbcBusy :: !(Maybe [Maybe TimePeriod]) + , _fbcErrors :: !(Maybe [Maybe Error]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBusyCalendar' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbcBusy' +-- +-- * 'fbcErrors' +freeBusyCalendar + :: FreeBusyCalendar +freeBusyCalendar = + FreeBusyCalendar + { _fbcBusy = Nothing + , _fbcErrors = Nothing + } + +-- | List of time ranges during which this calendar should be regarded as +-- busy. +fbcBusy :: Lens' FreeBusyCalendar [Maybe TimePeriod] +fbcBusy + = lens _fbcBusy (\ s a -> s{_fbcBusy = a}) . _Default + . _Coerce + +-- | Optional error(s) (if computation for the calendar failed). +fbcErrors :: Lens' FreeBusyCalendar [Maybe Error] +fbcErrors + = lens _fbcErrors (\ s a -> s{_fbcErrors = a}) . + _Default + . _Coerce + +instance FromJSON FreeBusyCalendar where + parseJSON + = withObject "FreeBusyCalendar" + (\ o -> + FreeBusyCalendar <$> + (o .:? "busy" .!= mempty) <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON FreeBusyCalendar where + toJSON FreeBusyCalendar{..} + = object + (catMaybes + [("busy" .=) <$> _fbcBusy, + ("errors" .=) <$> _fbcErrors]) + +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cResourceUri :: !(Maybe Text) + , _cResourceId :: !(Maybe Text) + , _cKind :: !Text + , _cExpiration :: !(Maybe Int64) + , _cToken :: !(Maybe Text) + , _cAddress :: !(Maybe Text) + , _cPayload :: !(Maybe Bool) + , _cParams :: !(Maybe ChannelParams) + , _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUri' +-- +-- * 'cResourceId' +-- +-- * 'cKind' +-- +-- * 'cExpiration' +-- +-- * 'cToken' +-- +-- * 'cAddress' +-- +-- * 'cPayload' +-- +-- * 'cParams' +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cResourceUri = Nothing + , _cResourceId = Nothing + , _cKind = "api#channel" + , _cExpiration = Nothing + , _cToken = Nothing + , _cAddress = Nothing + , _cPayload = Nothing + , _cParams = Nothing + , _cId = Nothing + , _cType = Nothing + } + +-- | A version-specific identifier for the watched resource. +cResourceUri :: Lens' Channel (Maybe Text) +cResourceUri + = lens _cResourceUri (\ s a -> s{_cResourceUri = a}) + +-- | An opaque ID that identifies the resource being watched on this channel. +-- Stable across different API versions. +cResourceId :: Lens' Channel (Maybe Text) +cResourceId + = lens _cResourceId (\ s a -> s{_cResourceId = a}) + +-- | Identifies this as a notification channel used to watch for changes to a +-- resource. Value: the fixed string \"api#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Date and time of notification channel expiration, expressed as a Unix +-- timestamp, in milliseconds. Optional. +cExpiration :: Lens' Channel (Maybe Int64) +cExpiration + = lens _cExpiration (\ s a -> s{_cExpiration = a}) + +-- | An arbitrary string delivered to the target address with each +-- notification delivered over this channel. Optional. +cToken :: Lens' Channel (Maybe Text) +cToken = lens _cToken (\ s a -> s{_cToken = a}) + +-- | The address where notifications are delivered for this channel. +cAddress :: Lens' Channel (Maybe Text) +cAddress = lens _cAddress (\ s a -> s{_cAddress = a}) + +-- | A Boolean value to indicate whether payload is wanted. Optional. +cPayload :: Lens' Channel (Maybe Bool) +cPayload = lens _cPayload (\ s a -> s{_cPayload = a}) + +-- | Additional parameters controlling delivery channel behavior. Optional. +cParams :: Lens' Channel (Maybe ChannelParams) +cParams = lens _cParams (\ s a -> s{_cParams = a}) + +-- | A UUID or similar unique string that identifies this channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of delivery mechanism used for this channel. +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "resourceUri") <*> (o .:? "resourceId") <*> + (o .:? "kind" .!= "api#channel") + <*> (o .:? "expiration") + <*> (o .:? "token") + <*> (o .:? "address") + <*> (o .:? "payload") + <*> (o .:? "params") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("resourceUri" .=) <$> _cResourceUri, + ("resourceId" .=) <$> _cResourceId, + Just ("kind" .= _cKind), + ("expiration" .=) <$> _cExpiration, + ("token" .=) <$> _cToken, + ("address" .=) <$> _cAddress, + ("payload" .=) <$> _cPayload, + ("params" .=) <$> _cParams, ("id" .=) <$> _cId, + ("type" .=) <$> _cType]) + +-- +-- /See:/ 'setting' smart constructor. +data Setting = Setting + { _setEtag :: !(Maybe Text) + , _setKind :: !Text + , _setValue :: !(Maybe Text) + , _setId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Setting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'setEtag' +-- +-- * 'setKind' +-- +-- * 'setValue' +-- +-- * 'setId' +setting + :: Setting +setting = + Setting + { _setEtag = Nothing + , _setKind = "calendar#setting" + , _setValue = Nothing + , _setId = Nothing + } + +-- | ETag of the resource. +setEtag :: Lens' Setting (Maybe Text) +setEtag = lens _setEtag (\ s a -> s{_setEtag = a}) + +-- | Type of the resource (\"calendar#setting\"). +setKind :: Lens' Setting Text +setKind = lens _setKind (\ s a -> s{_setKind = a}) + +-- | Value of the user setting. The format of the value depends on the ID of +-- the setting. It must always be a UTF-8 string of length up to 1024 +-- characters. +setValue :: Lens' Setting (Maybe Text) +setValue = lens _setValue (\ s a -> s{_setValue = a}) + +-- | The id of the user setting. +setId :: Lens' Setting (Maybe Text) +setId = lens _setId (\ s a -> s{_setId = a}) + +instance FromJSON Setting where + parseJSON + = withObject "Setting" + (\ o -> + Setting <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "calendar#setting") + <*> (o .:? "value") + <*> (o .:? "id")) + +instance ToJSON Setting where + toJSON Setting{..} + = object + (catMaybes + [("etag" .=) <$> _setEtag, Just ("kind" .= _setKind), + ("value" .=) <$> _setValue, ("id" .=) <$> _setId]) + +-- +-- /See:/ 'calendarNotification' smart constructor. +data CalendarNotification = CalendarNotification + { _cnMethod :: !(Maybe Text) + , _cnType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarNotification' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cnMethod' +-- +-- * 'cnType' +calendarNotification + :: CalendarNotification +calendarNotification = + CalendarNotification + { _cnMethod = Nothing + , _cnType = Nothing + } + +-- | The method used to deliver the notification. Possible values are: - +-- \"email\" - Reminders are sent via email. - \"sms\" - Reminders are sent +-- via SMS. This value is read-only and is ignored on inserts and updates. +-- SMS reminders are only available for Google Apps for Work, Education, +-- and Government customers. +cnMethod :: Lens' CalendarNotification (Maybe Text) +cnMethod = lens _cnMethod (\ s a -> s{_cnMethod = a}) + +-- | The type of notification. Possible values are: - \"eventCreation\" - +-- Notification sent when a new event is put on the calendar. - +-- \"eventChange\" - Notification sent when an event is changed. - +-- \"eventCancellation\" - Notification sent when an event is cancelled. - +-- \"eventResponse\" - Notification sent when an event is changed. - +-- \"agenda\" - An agenda with the events of the day (sent out in the +-- morning). +cnType :: Lens' CalendarNotification (Maybe Text) +cnType = lens _cnType (\ s a -> s{_cnType = a}) + +instance FromJSON CalendarNotification where + parseJSON + = withObject "CalendarNotification" + (\ o -> + CalendarNotification <$> + (o .:? "method") <*> (o .:? "type")) + +instance ToJSON CalendarNotification where + toJSON CalendarNotification{..} + = object + (catMaybes + [("method" .=) <$> _cnMethod, + ("type" .=) <$> _cnType]) + +-- +-- /See:/ 'events' smart constructor. +data Events = Events + { _eveSummary :: !(Maybe Text) + , _eveEtag :: !(Maybe Text) + , _eveNextPageToken :: !(Maybe Text) + , _eveKind :: !Text + , _eveItems :: !(Maybe [Maybe Event]) + , _eveDefaultReminders :: !(Maybe [Maybe EventReminder]) + , _eveUpdated :: !(Maybe UTCTime) + , _eveAccessRole :: !(Maybe Text) + , _eveTimeZone :: !(Maybe Text) + , _eveNextSyncToken :: !(Maybe Text) + , _eveDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Events' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eveSummary' +-- +-- * 'eveEtag' +-- +-- * 'eveNextPageToken' +-- +-- * 'eveKind' +-- +-- * 'eveItems' +-- +-- * 'eveDefaultReminders' +-- +-- * 'eveUpdated' +-- +-- * 'eveAccessRole' +-- +-- * 'eveTimeZone' +-- +-- * 'eveNextSyncToken' +-- +-- * 'eveDescription' +events + :: Events +events = + Events + { _eveSummary = Nothing + , _eveEtag = Nothing + , _eveNextPageToken = Nothing + , _eveKind = "calendar#events" + , _eveItems = Nothing + , _eveDefaultReminders = Nothing + , _eveUpdated = Nothing + , _eveAccessRole = Nothing + , _eveTimeZone = Nothing + , _eveNextSyncToken = Nothing + , _eveDescription = Nothing + } + +-- | Title of the calendar. Read-only. +eveSummary :: Lens' Events (Maybe Text) +eveSummary + = lens _eveSummary (\ s a -> s{_eveSummary = a}) + +-- | ETag of the collection. +eveEtag :: Lens' Events (Maybe Text) +eveEtag = lens _eveEtag (\ s a -> s{_eveEtag = a}) + +-- | Token used to access the next page of this result. Omitted if no further +-- results are available, in which case nextSyncToken is provided. +eveNextPageToken :: Lens' Events (Maybe Text) +eveNextPageToken + = lens _eveNextPageToken + (\ s a -> s{_eveNextPageToken = a}) + +-- | Type of the collection (\"calendar#events\"). +eveKind :: Lens' Events Text +eveKind = lens _eveKind (\ s a -> s{_eveKind = a}) + +-- | List of events on the calendar. +eveItems :: Lens' Events [Maybe Event] +eveItems + = lens _eveItems (\ s a -> s{_eveItems = a}) . + _Default + . _Coerce + +-- | The default reminders on the calendar for the authenticated user. These +-- reminders apply to all events on this calendar that do not explicitly +-- override them (i.e. do not have reminders.useDefault set to True). +eveDefaultReminders :: Lens' Events [Maybe EventReminder] +eveDefaultReminders + = lens _eveDefaultReminders + (\ s a -> s{_eveDefaultReminders = a}) + . _Default + . _Coerce + +-- | Last modification time of the calendar (as a RFC3339 timestamp). +-- Read-only. +eveUpdated :: Lens' Events (Maybe UTCTime) +eveUpdated + = lens _eveUpdated (\ s a -> s{_eveUpdated = a}) + +-- | The user\'s access role for this calendar. Read-only. Possible values +-- are: - \"none\" - The user has no access. - \"freeBusyReader\" - The +-- user has read access to free\/busy information. - \"reader\" - The user +-- has read access to the calendar. Private events will appear to users +-- with reader access, but event details will be hidden. - \"writer\" - The +-- user has read and write access to the calendar. Private events will +-- appear to users with writer access, and event details will be visible. - +-- \"owner\" - The user has ownership of the calendar. This role has all of +-- the permissions of the writer role with the additional ability to see +-- and manipulate ACLs. +eveAccessRole :: Lens' Events (Maybe Text) +eveAccessRole + = lens _eveAccessRole + (\ s a -> s{_eveAccessRole = a}) + +-- | The time zone of the calendar. Read-only. +eveTimeZone :: Lens' Events (Maybe Text) +eveTimeZone + = lens _eveTimeZone (\ s a -> s{_eveTimeZone = a}) + +-- | Token used at a later point in time to retrieve only the entries that +-- have changed since this result was returned. Omitted if further results +-- are available, in which case nextPageToken is provided. +eveNextSyncToken :: Lens' Events (Maybe Text) +eveNextSyncToken + = lens _eveNextSyncToken + (\ s a -> s{_eveNextSyncToken = a}) + +-- | Description of the calendar. Read-only. +eveDescription :: Lens' Events (Maybe Text) +eveDescription + = lens _eveDescription + (\ s a -> s{_eveDescription = a}) + +instance FromJSON Events where + parseJSON + = withObject "Events" + (\ o -> + Events <$> + (o .:? "summary") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "calendar#events") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "defaultReminders" .!= mempty) + <*> (o .:? "updated") + <*> (o .:? "accessRole") + <*> (o .:? "timeZone") + <*> (o .:? "nextSyncToken") + <*> (o .:? "description")) + +instance ToJSON Events where + toJSON Events{..} + = object + (catMaybes + [("summary" .=) <$> _eveSummary, + ("etag" .=) <$> _eveEtag, + ("nextPageToken" .=) <$> _eveNextPageToken, + Just ("kind" .= _eveKind), + ("items" .=) <$> _eveItems, + ("defaultReminders" .=) <$> _eveDefaultReminders, + ("updated" .=) <$> _eveUpdated, + ("accessRole" .=) <$> _eveAccessRole, + ("timeZone" .=) <$> _eveTimeZone, + ("nextSyncToken" .=) <$> _eveNextSyncToken, + ("description" .=) <$> _eveDescription]) + +-- +-- /See:/ 'eventReminder' smart constructor. +data EventReminder = EventReminder + { _erMethod :: !(Maybe Text) + , _erMinutes :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventReminder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erMethod' +-- +-- * 'erMinutes' +eventReminder + :: EventReminder +eventReminder = + EventReminder + { _erMethod = Nothing + , _erMinutes = Nothing + } + +-- | The method used by this reminder. Possible values are: - \"email\" - +-- Reminders are sent via email. - \"sms\" - Reminders are sent via SMS. +-- These are only available for Google Apps for Work, Education, and +-- Government customers. Requests to set SMS reminders for other account +-- types are ignored. - \"popup\" - Reminders are sent via a UI popup. +erMethod :: Lens' EventReminder (Maybe Text) +erMethod = lens _erMethod (\ s a -> s{_erMethod = a}) + +-- | Number of minutes before the start of the event when the reminder should +-- trigger. Valid values are between 0 and 40320 (4 weeks in minutes). +erMinutes :: Lens' EventReminder (Maybe Int32) +erMinutes + = lens _erMinutes (\ s a -> s{_erMinutes = a}) + +instance FromJSON EventReminder where + parseJSON + = withObject "EventReminder" + (\ o -> + EventReminder <$> + (o .:? "method") <*> (o .:? "minutes")) + +instance ToJSON EventReminder where + toJSON EventReminder{..} + = object + (catMaybes + [("method" .=) <$> _erMethod, + ("minutes" .=) <$> _erMinutes]) + +-- +-- /See:/ 'freeBusyResponse' smart constructor. +data FreeBusyResponse = FreeBusyResponse + { _fbrGroups :: !(Maybe FreeBusyResponseGroups) + , _fbrTimeMin :: !(Maybe UTCTime) + , _fbrKind :: !Text + , _fbrCalendars :: !(Maybe FreeBusyResponseCalendars) + , _fbrTimeMax :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBusyResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbrGroups' +-- +-- * 'fbrTimeMin' +-- +-- * 'fbrKind' +-- +-- * 'fbrCalendars' +-- +-- * 'fbrTimeMax' +freeBusyResponse + :: FreeBusyResponse +freeBusyResponse = + FreeBusyResponse + { _fbrGroups = Nothing + , _fbrTimeMin = Nothing + , _fbrKind = "calendar#freeBusy" + , _fbrCalendars = Nothing + , _fbrTimeMax = Nothing + } + +-- | Expansion of groups. +fbrGroups :: Lens' FreeBusyResponse (Maybe FreeBusyResponseGroups) +fbrGroups + = lens _fbrGroups (\ s a -> s{_fbrGroups = a}) + +-- | The start of the interval. +fbrTimeMin :: Lens' FreeBusyResponse (Maybe UTCTime) +fbrTimeMin + = lens _fbrTimeMin (\ s a -> s{_fbrTimeMin = a}) + +-- | Type of the resource (\"calendar#freeBusy\"). +fbrKind :: Lens' FreeBusyResponse Text +fbrKind = lens _fbrKind (\ s a -> s{_fbrKind = a}) + +-- | List of free\/busy information for calendars. +fbrCalendars :: Lens' FreeBusyResponse (Maybe FreeBusyResponseCalendars) +fbrCalendars + = lens _fbrCalendars (\ s a -> s{_fbrCalendars = a}) + +-- | The end of the interval. +fbrTimeMax :: Lens' FreeBusyResponse (Maybe UTCTime) +fbrTimeMax + = lens _fbrTimeMax (\ s a -> s{_fbrTimeMax = a}) + +instance FromJSON FreeBusyResponse where + parseJSON + = withObject "FreeBusyResponse" + (\ o -> + FreeBusyResponse <$> + (o .:? "groups") <*> (o .:? "timeMin") <*> + (o .:? "kind" .!= "calendar#freeBusy") + <*> (o .:? "calendars") + <*> (o .:? "timeMax")) + +instance ToJSON FreeBusyResponse where + toJSON FreeBusyResponse{..} + = object + (catMaybes + [("groups" .=) <$> _fbrGroups, + ("timeMin" .=) <$> _fbrTimeMin, + Just ("kind" .= _fbrKind), + ("calendars" .=) <$> _fbrCalendars, + ("timeMax" .=) <$> _fbrTimeMax]) + +-- +-- /See:/ 'calendar' smart constructor. +data Calendar = Calendar + { _calSummary :: !(Maybe Text) + , _calEtag :: !(Maybe Text) + , _calLocation :: !(Maybe Text) + , _calKind :: !Text + , _calId :: !(Maybe Text) + , _calTimeZone :: !(Maybe Text) + , _calDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Calendar' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'calSummary' +-- +-- * 'calEtag' +-- +-- * 'calLocation' +-- +-- * 'calKind' +-- +-- * 'calId' +-- +-- * 'calTimeZone' +-- +-- * 'calDescription' +calendar + :: Calendar +calendar = + Calendar + { _calSummary = Nothing + , _calEtag = Nothing + , _calLocation = Nothing + , _calKind = "calendar#calendar" + , _calId = Nothing + , _calTimeZone = Nothing + , _calDescription = Nothing + } + +-- | Title of the calendar. +calSummary :: Lens' Calendar (Maybe Text) +calSummary + = lens _calSummary (\ s a -> s{_calSummary = a}) + +-- | ETag of the resource. +calEtag :: Lens' Calendar (Maybe Text) +calEtag = lens _calEtag (\ s a -> s{_calEtag = a}) + +-- | Geographic location of the calendar as free-form text. Optional. +calLocation :: Lens' Calendar (Maybe Text) +calLocation + = lens _calLocation (\ s a -> s{_calLocation = a}) + +-- | Type of the resource (\"calendar#calendar\"). +calKind :: Lens' Calendar Text +calKind = lens _calKind (\ s a -> s{_calKind = a}) + +-- | Identifier of the calendar. To retrieve IDs call the calendarList.list() +-- method. +calId :: Lens' Calendar (Maybe Text) +calId = lens _calId (\ s a -> s{_calId = a}) + +-- | The time zone of the calendar. (Formatted as an IANA Time Zone Database +-- name, e.g. \"Europe\/Zurich\".) Optional. +calTimeZone :: Lens' Calendar (Maybe Text) +calTimeZone + = lens _calTimeZone (\ s a -> s{_calTimeZone = a}) + +-- | Description of the calendar. Optional. +calDescription :: Lens' Calendar (Maybe Text) +calDescription + = lens _calDescription + (\ s a -> s{_calDescription = a}) + +instance FromJSON Calendar where + parseJSON + = withObject "Calendar" + (\ o -> + Calendar <$> + (o .:? "summary") <*> (o .:? "etag") <*> + (o .:? "location") + <*> (o .:? "kind" .!= "calendar#calendar") + <*> (o .:? "id") + <*> (o .:? "timeZone") + <*> (o .:? "description")) + +instance ToJSON Calendar where + toJSON Calendar{..} + = object + (catMaybes + [("summary" .=) <$> _calSummary, + ("etag" .=) <$> _calEtag, + ("location" .=) <$> _calLocation, + Just ("kind" .= _calKind), ("id" .=) <$> _calId, + ("timeZone" .=) <$> _calTimeZone, + ("description" .=) <$> _calDescription]) + +-- +-- /See:/ 'eventAttendee' smart constructor. +data EventAttendee = EventAttendee + { _eaEmail :: !(Maybe Text) + , _eaResponseStatus :: !(Maybe Text) + , _eaSelf :: !Bool + , _eaResource :: !Bool + , _eaAdditionalGuests :: !Int32 + , _eaDisplayName :: !(Maybe Text) + , _eaId :: !(Maybe Text) + , _eaComment :: !(Maybe Text) + , _eaOptional :: !Bool + , _eaOrganizer :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventAttendee' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eaEmail' +-- +-- * 'eaResponseStatus' +-- +-- * 'eaSelf' +-- +-- * 'eaResource' +-- +-- * 'eaAdditionalGuests' +-- +-- * 'eaDisplayName' +-- +-- * 'eaId' +-- +-- * 'eaComment' +-- +-- * 'eaOptional' +-- +-- * 'eaOrganizer' +eventAttendee + :: EventAttendee +eventAttendee = + EventAttendee + { _eaEmail = Nothing + , _eaResponseStatus = Nothing + , _eaSelf = False + , _eaResource = False + , _eaAdditionalGuests = 0 + , _eaDisplayName = Nothing + , _eaId = Nothing + , _eaComment = Nothing + , _eaOptional = False + , _eaOrganizer = Nothing + } + +-- | The attendee\'s email address, if available. This field must be present +-- when adding an attendee. It must be a valid email address as per +-- RFC5322. +eaEmail :: Lens' EventAttendee (Maybe Text) +eaEmail = lens _eaEmail (\ s a -> s{_eaEmail = a}) + +-- | The attendee\'s response status. Possible values are: - \"needsAction\" +-- - The attendee has not responded to the invitation. - \"declined\" - The +-- attendee has declined the invitation. - \"tentative\" - The attendee has +-- tentatively accepted the invitation. - \"accepted\" - The attendee has +-- accepted the invitation. +eaResponseStatus :: Lens' EventAttendee (Maybe Text) +eaResponseStatus + = lens _eaResponseStatus + (\ s a -> s{_eaResponseStatus = a}) + +-- | Whether this entry represents the calendar on which this copy of the +-- event appears. Read-only. The default is False. +eaSelf :: Lens' EventAttendee Bool +eaSelf = lens _eaSelf (\ s a -> s{_eaSelf = a}) + +-- | Whether the attendee is a resource. Read-only. The default is False. +eaResource :: Lens' EventAttendee Bool +eaResource + = lens _eaResource (\ s a -> s{_eaResource = a}) + +-- | Number of additional guests. Optional. The default is 0. +eaAdditionalGuests :: Lens' EventAttendee Int32 +eaAdditionalGuests + = lens _eaAdditionalGuests + (\ s a -> s{_eaAdditionalGuests = a}) + +-- | The attendee\'s name, if available. Optional. +eaDisplayName :: Lens' EventAttendee (Maybe Text) +eaDisplayName + = lens _eaDisplayName + (\ s a -> s{_eaDisplayName = a}) + +-- | The attendee\'s Profile ID, if available. It corresponds to theid field +-- in the People collection of the Google+ API +eaId :: Lens' EventAttendee (Maybe Text) +eaId = lens _eaId (\ s a -> s{_eaId = a}) + +-- | The attendee\'s response comment. Optional. +eaComment :: Lens' EventAttendee (Maybe Text) +eaComment + = lens _eaComment (\ s a -> s{_eaComment = a}) + +-- | Whether this is an optional attendee. Optional. The default is False. +eaOptional :: Lens' EventAttendee Bool +eaOptional + = lens _eaOptional (\ s a -> s{_eaOptional = a}) + +-- | Whether the attendee is the organizer of the event. Read-only. The +-- default is False. +eaOrganizer :: Lens' EventAttendee (Maybe Bool) +eaOrganizer + = lens _eaOrganizer (\ s a -> s{_eaOrganizer = a}) + +instance FromJSON EventAttendee where + parseJSON + = withObject "EventAttendee" + (\ o -> + EventAttendee <$> + (o .:? "email") <*> (o .:? "responseStatus") <*> + (o .:? "self" .!= False) + <*> (o .:? "resource" .!= False) + <*> (o .:? "additionalGuests" .!= 0) + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "comment") + <*> (o .:? "optional" .!= False) + <*> (o .:? "organizer")) + +instance ToJSON EventAttendee where + toJSON EventAttendee{..} + = object + (catMaybes + [("email" .=) <$> _eaEmail, + ("responseStatus" .=) <$> _eaResponseStatus, + Just ("self" .= _eaSelf), + Just ("resource" .= _eaResource), + Just ("additionalGuests" .= _eaAdditionalGuests), + ("displayName" .=) <$> _eaDisplayName, + ("id" .=) <$> _eaId, ("comment" .=) <$> _eaComment, + Just ("optional" .= _eaOptional), + ("organizer" .=) <$> _eaOrganizer]) + +-- +-- /See:/ 'eventDateTime' smart constructor. +data EventDateTime = EventDateTime + { _edtDate :: !(Maybe UTCTime) + , _edtTimeZone :: !(Maybe Text) + , _edtDateTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventDateTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edtDate' +-- +-- * 'edtTimeZone' +-- +-- * 'edtDateTime' +eventDateTime + :: EventDateTime +eventDateTime = + EventDateTime + { _edtDate = Nothing + , _edtTimeZone = Nothing + , _edtDateTime = Nothing + } + +-- | The date, in the format \"yyyy-mm-dd\", if this is an all-day event. +edtDate :: Lens' EventDateTime (Maybe UTCTime) +edtDate = lens _edtDate (\ s a -> s{_edtDate = a}) + +-- | The time zone in which the time is specified. (Formatted as an IANA Time +-- Zone Database name, e.g. \"Europe\/Zurich\".) For recurring events this +-- field is required and specifies the time zone in which the recurrence is +-- expanded. For single events this field is optional and indicates a +-- custom time zone for the event start\/end. +edtTimeZone :: Lens' EventDateTime (Maybe Text) +edtTimeZone + = lens _edtTimeZone (\ s a -> s{_edtTimeZone = a}) + +-- | The time, as a combined date-time value (formatted according to +-- RFC3339). A time zone offset is required unless a time zone is +-- explicitly specified in timeZone. +edtDateTime :: Lens' EventDateTime (Maybe UTCTime) +edtDateTime + = lens _edtDateTime (\ s a -> s{_edtDateTime = a}) + +instance FromJSON EventDateTime where + parseJSON + = withObject "EventDateTime" + (\ o -> + EventDateTime <$> + (o .:? "date") <*> (o .:? "timeZone") <*> + (o .:? "dateTime")) + +instance ToJSON EventDateTime where + toJSON EventDateTime{..} + = object + (catMaybes + [("date" .=) <$> _edtDate, + ("timeZone" .=) <$> _edtTimeZone, + ("dateTime" .=) <$> _edtDateTime]) + +-- +-- /See:/ 'calendarList' smart constructor. +data CalendarList = CalendarList + { _clEtag :: !(Maybe Text) + , _clNextPageToken :: !(Maybe Text) + , _clKind :: !Text + , _clItems :: !(Maybe [Maybe CalendarListEntry]) + , _clNextSyncToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clEtag' +-- +-- * 'clNextPageToken' +-- +-- * 'clKind' +-- +-- * 'clItems' +-- +-- * 'clNextSyncToken' +calendarList + :: CalendarList +calendarList = + CalendarList + { _clEtag = Nothing + , _clNextPageToken = Nothing + , _clKind = "calendar#calendarList" + , _clItems = Nothing + , _clNextSyncToken = Nothing + } + +-- | ETag of the collection. +clEtag :: Lens' CalendarList (Maybe Text) +clEtag = lens _clEtag (\ s a -> s{_clEtag = a}) + +-- | Token used to access the next page of this result. Omitted if no further +-- results are available, in which case nextSyncToken is provided. +clNextPageToken :: Lens' CalendarList (Maybe Text) +clNextPageToken + = lens _clNextPageToken + (\ s a -> s{_clNextPageToken = a}) + +-- | Type of the collection (\"calendar#calendarList\"). +clKind :: Lens' CalendarList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | Calendars that are present on the user\'s calendar list. +clItems :: Lens' CalendarList [Maybe CalendarListEntry] +clItems + = lens _clItems (\ s a -> s{_clItems = a}) . _Default + . _Coerce + +-- | Token used at a later point in time to retrieve only the entries that +-- have changed since this result was returned. Omitted if further results +-- are available, in which case nextPageToken is provided. +clNextSyncToken :: Lens' CalendarList (Maybe Text) +clNextSyncToken + = lens _clNextSyncToken + (\ s a -> s{_clNextSyncToken = a}) + +instance FromJSON CalendarList where + parseJSON + = withObject "CalendarList" + (\ o -> + CalendarList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "calendar#calendarList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "nextSyncToken")) + +instance ToJSON CalendarList where + toJSON CalendarList{..} + = object + (catMaybes + [("etag" .=) <$> _clEtag, + ("nextPageToken" .=) <$> _clNextPageToken, + Just ("kind" .= _clKind), ("items" .=) <$> _clItems, + ("nextSyncToken" .=) <$> _clNextSyncToken]) + +-- +-- /See:/ 'freeBusyRequest' smart constructor. +data FreeBusyRequest = FreeBusyRequest + { _fCalendarExpansionMax :: !(Maybe Int32) + , _fTimeMin :: !(Maybe UTCTime) + , _fItems :: !(Maybe [Maybe FreeBusyRequestItem]) + , _fGroupExpansionMax :: !(Maybe Int32) + , _fTimeZone :: !Text + , _fTimeMax :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBusyRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fCalendarExpansionMax' +-- +-- * 'fTimeMin' +-- +-- * 'fItems' +-- +-- * 'fGroupExpansionMax' +-- +-- * 'fTimeZone' +-- +-- * 'fTimeMax' +freeBusyRequest + :: FreeBusyRequest +freeBusyRequest = + FreeBusyRequest + { _fCalendarExpansionMax = Nothing + , _fTimeMin = Nothing + , _fItems = Nothing + , _fGroupExpansionMax = Nothing + , _fTimeZone = "UTC" + , _fTimeMax = Nothing + } + +-- | Maximal number of calendars for which FreeBusy information is to be +-- provided. Optional. +fCalendarExpansionMax :: Lens' FreeBusyRequest (Maybe Int32) +fCalendarExpansionMax + = lens _fCalendarExpansionMax + (\ s a -> s{_fCalendarExpansionMax = a}) + +-- | The start of the interval for the query. +fTimeMin :: Lens' FreeBusyRequest (Maybe UTCTime) +fTimeMin = lens _fTimeMin (\ s a -> s{_fTimeMin = a}) + +-- | List of calendars and\/or groups to query. +fItems :: Lens' FreeBusyRequest [Maybe FreeBusyRequestItem] +fItems + = lens _fItems (\ s a -> s{_fItems = a}) . _Default . + _Coerce + +-- | Maximal number of calendar identifiers to be provided for a single +-- group. Optional. An error will be returned for a group with more members +-- than this value. +fGroupExpansionMax :: Lens' FreeBusyRequest (Maybe Int32) +fGroupExpansionMax + = lens _fGroupExpansionMax + (\ s a -> s{_fGroupExpansionMax = a}) + +-- | Time zone used in the response. Optional. The default is UTC. +fTimeZone :: Lens' FreeBusyRequest Text +fTimeZone + = lens _fTimeZone (\ s a -> s{_fTimeZone = a}) + +-- | The end of the interval for the query. +fTimeMax :: Lens' FreeBusyRequest (Maybe UTCTime) +fTimeMax = lens _fTimeMax (\ s a -> s{_fTimeMax = a}) + +instance FromJSON FreeBusyRequest where + parseJSON + = withObject "FreeBusyRequest" + (\ o -> + FreeBusyRequest <$> + (o .:? "calendarExpansionMax") <*> (o .:? "timeMin") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "groupExpansionMax") + <*> (o .:? "timeZone" .!= "UTC") + <*> (o .:? "timeMax")) + +instance ToJSON FreeBusyRequest where + toJSON FreeBusyRequest{..} + = object + (catMaybes + [("calendarExpansionMax" .=) <$> + _fCalendarExpansionMax, + ("timeMin" .=) <$> _fTimeMin, + ("items" .=) <$> _fItems, + ("groupExpansionMax" .=) <$> _fGroupExpansionMax, + Just ("timeZone" .= _fTimeZone), + ("timeMax" .=) <$> _fTimeMax]) + +-- +-- /See:/ 'aCLRule' smart constructor. +data ACLRule = ACLRule + { _arEtag :: !(Maybe Text) + , _arKind :: !Text + , _arRole :: !(Maybe Text) + , _arScope :: !(Maybe ACLRuleScope) + , _arId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arEtag' +-- +-- * 'arKind' +-- +-- * 'arRole' +-- +-- * 'arScope' +-- +-- * 'arId' +aCLRule + :: ACLRule +aCLRule = + ACLRule + { _arEtag = Nothing + , _arKind = "calendar#aclRule" + , _arRole = Nothing + , _arScope = Nothing + , _arId = Nothing + } + +-- | ETag of the resource. +arEtag :: Lens' ACLRule (Maybe Text) +arEtag = lens _arEtag (\ s a -> s{_arEtag = a}) + +-- | Type of the resource (\"calendar#aclRule\"). +arKind :: Lens' ACLRule Text +arKind = lens _arKind (\ s a -> s{_arKind = a}) + +-- | The role assigned to the scope. Possible values are: - \"none\" - +-- Provides no access. - \"freeBusyReader\" - Provides read access to +-- free\/busy information. - \"reader\" - Provides read access to the +-- calendar. Private events will appear to users with reader access, but +-- event details will be hidden. - \"writer\" - Provides read and write +-- access to the calendar. Private events will appear to users with writer +-- access, and event details will be visible. - \"owner\" - Provides +-- ownership of the calendar. This role has all of the permissions of the +-- writer role with the additional ability to see and manipulate ACLs. +arRole :: Lens' ACLRule (Maybe Text) +arRole = lens _arRole (\ s a -> s{_arRole = a}) + +-- | The scope of the rule. +arScope :: Lens' ACLRule (Maybe ACLRuleScope) +arScope = lens _arScope (\ s a -> s{_arScope = a}) + +-- | Identifier of the ACL rule. +arId :: Lens' ACLRule (Maybe Text) +arId = lens _arId (\ s a -> s{_arId = a}) + +instance FromJSON ACLRule where + parseJSON + = withObject "ACLRule" + (\ o -> + ACLRule <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "calendar#aclRule") + <*> (o .:? "role") + <*> (o .:? "scope") + <*> (o .:? "id")) + +instance ToJSON ACLRule where + toJSON ACLRule{..} + = object + (catMaybes + [("etag" .=) <$> _arEtag, Just ("kind" .= _arKind), + ("role" .=) <$> _arRole, ("scope" .=) <$> _arScope, + ("id" .=) <$> _arId]) + +-- +-- /See:/ 'colors' smart constructor. +data Colors = Colors + { _colEvent :: !(Maybe ColorsEvent) + , _colKind :: !Text + , _colCalendar :: !(Maybe ColorsCalendar) + , _colUpdated :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Colors' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'colEvent' +-- +-- * 'colKind' +-- +-- * 'colCalendar' +-- +-- * 'colUpdated' +colors + :: Colors +colors = + Colors + { _colEvent = Nothing + , _colKind = "calendar#colors" + , _colCalendar = Nothing + , _colUpdated = Nothing + } + +-- | A global palette of event colors, mapping from the color ID to its +-- definition. An event resource may refer to one of these color IDs in its +-- color field. Read-only. +colEvent :: Lens' Colors (Maybe ColorsEvent) +colEvent = lens _colEvent (\ s a -> s{_colEvent = a}) + +-- | Type of the resource (\"calendar#colors\"). +colKind :: Lens' Colors Text +colKind = lens _colKind (\ s a -> s{_colKind = a}) + +-- | A global palette of calendar colors, mapping from the color ID to its +-- definition. A calendarListEntry resource refers to one of these color +-- IDs in its color field. Read-only. +colCalendar :: Lens' Colors (Maybe ColorsCalendar) +colCalendar + = lens _colCalendar (\ s a -> s{_colCalendar = a}) + +-- | Last modification time of the color palette (as a RFC3339 timestamp). +-- Read-only. +colUpdated :: Lens' Colors (Maybe UTCTime) +colUpdated + = lens _colUpdated (\ s a -> s{_colUpdated = a}) + +instance FromJSON Colors where + parseJSON + = withObject "Colors" + (\ o -> + Colors <$> + (o .:? "event") <*> + (o .:? "kind" .!= "calendar#colors") + <*> (o .:? "calendar") + <*> (o .:? "updated")) + +instance ToJSON Colors where + toJSON Colors{..} + = object + (catMaybes + [("event" .=) <$> _colEvent, + Just ("kind" .= _colKind), + ("calendar" .=) <$> _colCalendar, + ("updated" .=) <$> _colUpdated]) + +-- +-- /See:/ 'freeBusyGroup' smart constructor. +data FreeBusyGroup = FreeBusyGroup + { _fbgCalendars :: !(Maybe [Text]) + , _fbgErrors :: !(Maybe [Maybe Error]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBusyGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbgCalendars' +-- +-- * 'fbgErrors' +freeBusyGroup + :: FreeBusyGroup +freeBusyGroup = + FreeBusyGroup + { _fbgCalendars = Nothing + , _fbgErrors = Nothing + } + +-- | List of calendars\' identifiers within a group. +fbgCalendars :: Lens' FreeBusyGroup [Text] +fbgCalendars + = lens _fbgCalendars (\ s a -> s{_fbgCalendars = a}) + . _Default + . _Coerce + +-- | Optional error(s) (if computation for the group failed). +fbgErrors :: Lens' FreeBusyGroup [Maybe Error] +fbgErrors + = lens _fbgErrors (\ s a -> s{_fbgErrors = a}) . + _Default + . _Coerce + +instance FromJSON FreeBusyGroup where + parseJSON + = withObject "FreeBusyGroup" + (\ o -> + FreeBusyGroup <$> + (o .:? "calendars" .!= mempty) <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON FreeBusyGroup where + toJSON FreeBusyGroup{..} + = object + (catMaybes + [("calendars" .=) <$> _fbgCalendars, + ("errors" .=) <$> _fbgErrors]) + +-- +-- /See:/ 'aCL' smart constructor. +data ACL = ACL + { _aclEtag :: !(Maybe Text) + , _aclNextPageToken :: !(Maybe Text) + , _aclKind :: !Text + , _aclItems :: !(Maybe [Maybe ACLRule]) + , _aclNextSyncToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclEtag' +-- +-- * 'aclNextPageToken' +-- +-- * 'aclKind' +-- +-- * 'aclItems' +-- +-- * 'aclNextSyncToken' +aCL + :: ACL +aCL = + ACL + { _aclEtag = Nothing + , _aclNextPageToken = Nothing + , _aclKind = "calendar#acl" + , _aclItems = Nothing + , _aclNextSyncToken = Nothing + } + +-- | ETag of the collection. +aclEtag :: Lens' ACL (Maybe Text) +aclEtag = lens _aclEtag (\ s a -> s{_aclEtag = a}) + +-- | Token used to access the next page of this result. Omitted if no further +-- results are available, in which case nextSyncToken is provided. +aclNextPageToken :: Lens' ACL (Maybe Text) +aclNextPageToken + = lens _aclNextPageToken + (\ s a -> s{_aclNextPageToken = a}) + +-- | Type of the collection (\"calendar#acl\"). +aclKind :: Lens' ACL Text +aclKind = lens _aclKind (\ s a -> s{_aclKind = a}) + +-- | List of rules on the access control list. +aclItems :: Lens' ACL [Maybe ACLRule] +aclItems + = lens _aclItems (\ s a -> s{_aclItems = a}) . + _Default + . _Coerce + +-- | Token used at a later point in time to retrieve only the entries that +-- have changed since this result was returned. Omitted if further results +-- are available, in which case nextPageToken is provided. +aclNextSyncToken :: Lens' ACL (Maybe Text) +aclNextSyncToken + = lens _aclNextSyncToken + (\ s a -> s{_aclNextSyncToken = a}) + +instance FromJSON ACL where + parseJSON + = withObject "ACL" + (\ o -> + ACL <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "calendar#acl") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "nextSyncToken")) + +instance ToJSON ACL where + toJSON ACL{..} + = object + (catMaybes + [("etag" .=) <$> _aclEtag, + ("nextPageToken" .=) <$> _aclNextPageToken, + Just ("kind" .= _aclKind), + ("items" .=) <$> _aclItems, + ("nextSyncToken" .=) <$> _aclNextSyncToken]) diff --git a/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Sum.hs b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Sum.hs new file mode 100644 index 000000000..e50a5a980 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsCalendar.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsCalendar.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Delete.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Delete.hs new file mode 100644 index 000000000..e0681bfed --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Delete.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an access control rule. +-- +-- /See:/ for @CalendarACLDelete@. +module Calendar.ACL.Delete + ( + -- * REST Resource + AclDeleteAPI + + -- * Creating a Request + , aCLDelete + , ACLDelete + + -- * Request Lenses + , adQuotaUser + , adCalendarId + , adPrettyPrint + , adUserIp + , adRuleId + , adKey + , adOauthToken + , adFields + , adAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLDelete@ which the +-- 'ACLDelete' request conforms to. +type AclDeleteAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> Capture "ruleId" Text :> Delete '[JSON] () + +-- | Deletes an access control rule. +-- +-- /See:/ 'aCLDelete' smart constructor. +data ACLDelete = ACLDelete + { _adQuotaUser :: !(Maybe Text) + , _adCalendarId :: !Text + , _adPrettyPrint :: !Bool + , _adUserIp :: !(Maybe Text) + , _adRuleId :: !Text + , _adKey :: !(Maybe Text) + , _adOauthToken :: !(Maybe Text) + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adCalendarId' +-- +-- * 'adPrettyPrint' +-- +-- * 'adUserIp' +-- +-- * 'adRuleId' +-- +-- * 'adKey' +-- +-- * 'adOauthToken' +-- +-- * 'adFields' +-- +-- * 'adAlt' +aCLDelete + :: Text -- ^ 'calendarId' + -> Text -- ^ 'ruleId' + -> ACLDelete +aCLDelete pAdCalendarId_ pAdRuleId_ = + ACLDelete + { _adQuotaUser = Nothing + , _adCalendarId = pAdCalendarId_ + , _adPrettyPrint = True + , _adUserIp = Nothing + , _adRuleId = pAdRuleId_ + , _adKey = Nothing + , _adOauthToken = Nothing + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' ACLDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +adCalendarId :: Lens' ACLDelete' Text +adCalendarId + = lens _adCalendarId (\ s a -> s{_adCalendarId = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' ACLDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' ACLDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | ACL rule identifier. +adRuleId :: Lens' ACLDelete' Text +adRuleId = lens _adRuleId (\ s a -> s{_adRuleId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' ACLDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' ACLDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' ACLDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' ACLDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest ACLDelete' where + type Rs ACLDelete' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLDelete{..} + = go _adQuotaUser _adCalendarId _adPrettyPrint + _adUserIp + _adRuleId + _adKey + _adOauthToken + _adFields + _adAlt + where go + = clientWithRoute (Proxy :: Proxy AclDeleteAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Get.hs new file mode 100644 index 000000000..0ada3092c --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns an access control rule. +-- +-- /See:/ for @CalendarACLGet@. +module Calendar.ACL.Get + ( + -- * REST Resource + AclGetAPI + + -- * Creating a Request + , aCLGet + , ACLGet + + -- * Request Lenses + , agQuotaUser + , agCalendarId + , agPrettyPrint + , agUserIp + , agRuleId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLGet@ which the +-- 'ACLGet' request conforms to. +type AclGetAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> Capture "ruleId" Text :> Get '[JSON] ACLRule + +-- | Returns an access control rule. +-- +-- /See:/ 'aCLGet' smart constructor. +data ACLGet = ACLGet + { _agQuotaUser :: !(Maybe Text) + , _agCalendarId :: !Text + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agRuleId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agCalendarId' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agRuleId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +aCLGet + :: Text -- ^ 'calendarId' + -> Text -- ^ 'ruleId' + -> ACLGet +aCLGet pAgCalendarId_ pAgRuleId_ = + ACLGet + { _agQuotaUser = Nothing + , _agCalendarId = pAgCalendarId_ + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agRuleId = pAgRuleId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' ACLGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +agCalendarId :: Lens' ACLGet' Text +agCalendarId + = lens _agCalendarId (\ s a -> s{_agCalendarId = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' ACLGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' ACLGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | ACL rule identifier. +agRuleId :: Lens' ACLGet' Text +agRuleId = lens _agRuleId (\ s a -> s{_agRuleId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' ACLGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' ACLGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' ACLGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' ACLGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest ACLGet' where + type Rs ACLGet' = ACLRule + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLGet{..} + = go _agQuotaUser _agCalendarId _agPrettyPrint + _agUserIp + _agRuleId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AclGetAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Insert.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Insert.hs new file mode 100644 index 000000000..abb9ef60c --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an access control rule. +-- +-- /See:/ for @CalendarACLInsert@. +module Calendar.ACL.Insert + ( + -- * REST Resource + AclInsertAPI + + -- * Creating a Request + , aCLInsert + , ACLInsert + + -- * Request Lenses + , aiQuotaUser + , aiCalendarId + , aiPrettyPrint + , aiUserIp + , aiKey + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLInsert@ which the +-- 'ACLInsert' request conforms to. +type AclInsertAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> Post '[JSON] ACLRule + +-- | Creates an access control rule. +-- +-- /See:/ 'aCLInsert' smart constructor. +data ACLInsert = ACLInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiCalendarId :: !Text + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiKey :: !(Maybe Text) + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiCalendarId' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiKey' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +aCLInsert + :: Text -- ^ 'calendarId' + -> ACLInsert +aCLInsert pAiCalendarId_ = + ACLInsert + { _aiQuotaUser = Nothing + , _aiCalendarId = pAiCalendarId_ + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiKey = Nothing + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' ACLInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +aiCalendarId :: Lens' ACLInsert' Text +aiCalendarId + = lens _aiCalendarId (\ s a -> s{_aiCalendarId = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' ACLInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' ACLInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' ACLInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' ACLInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' ACLInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' ACLInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest ACLInsert' where + type Rs ACLInsert' = ACLRule + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLInsert{..} + = go _aiQuotaUser _aiCalendarId _aiPrettyPrint + _aiUserIp + _aiKey + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute (Proxy :: Proxy AclInsertAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/List.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/List.hs new file mode 100644 index 000000000..e763eb8b1 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the rules in the access control list for the calendar. +-- +-- /See:/ for @CalendarACLList@. +module Calendar.ACL.List + ( + -- * REST Resource + AclListAPI + + -- * Creating a Request + , aCLList + , ACLList + + -- * Request Lenses + , alSyncToken + , alQuotaUser + , alCalendarId + , alPrettyPrint + , alUserIp + , alShowDeleted + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLList@ which the +-- 'ACLList' request conforms to. +type AclListAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> + QueryParam "syncToken" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] ACL + +-- | Returns the rules in the access control list for the calendar. +-- +-- /See:/ 'aCLList' smart constructor. +data ACLList = ACLList + { _alSyncToken :: !(Maybe Text) + , _alQuotaUser :: !(Maybe Text) + , _alCalendarId :: !Text + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alShowDeleted :: !(Maybe Bool) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alSyncToken' +-- +-- * 'alQuotaUser' +-- +-- * 'alCalendarId' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alShowDeleted' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +aCLList + :: Text -- ^ 'calendarId' + -> ACLList +aCLList pAlCalendarId_ = + ACLList + { _alSyncToken = Nothing + , _alQuotaUser = Nothing + , _alCalendarId = pAlCalendarId_ + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alShowDeleted = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. All entries +-- deleted since the previous list request will always be in the result set +-- and it is not allowed to set showDeleted to False. If the syncToken +-- expires, the server will respond with a 410 GONE response code and the +-- client should clear its storage and perform a full synchronization +-- without any syncToken. Learn more about incremental synchronization. +-- Optional. The default is to return all entries. +alSyncToken :: Lens' ACLList' (Maybe Text) +alSyncToken + = lens _alSyncToken (\ s a -> s{_alSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ACLList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +alCalendarId :: Lens' ACLList' Text +alCalendarId + = lens _alCalendarId (\ s a -> s{_alCalendarId = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ACLList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ACLList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Whether to include deleted ACLs in the result. Deleted ACLs are +-- represented by role equal to \"none\". Deleted ACLs will always be +-- included if syncToken is provided. Optional. The default is False. +alShowDeleted :: Lens' ACLList' (Maybe Bool) +alShowDeleted + = lens _alShowDeleted + (\ s a -> s{_alShowDeleted = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ACLList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Token specifying which result page to return. Optional. +alPageToken :: Lens' ACLList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ACLList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +alMaxResults :: Lens' ACLList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ACLList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ACLList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ACLList' where + type Rs ACLList' = ACL + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLList{..} + = go _alSyncToken _alQuotaUser _alCalendarId + _alPrettyPrint + _alUserIp + _alShowDeleted + _alKey + _alPageToken + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AclListAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Patch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Patch.hs new file mode 100644 index 000000000..89bfebe31 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an access control rule. This method supports patch semantics. +-- +-- /See:/ for @CalendarACLPatch@. +module Calendar.ACL.Patch + ( + -- * REST Resource + AclPatchAPI + + -- * Creating a Request + , aCLPatch + , ACLPatch + + -- * Request Lenses + , apQuotaUser + , apCalendarId + , apPrettyPrint + , apUserIp + , apRuleId + , apKey + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLPatch@ which the +-- 'ACLPatch' request conforms to. +type AclPatchAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> + Capture "ruleId" Text :> Patch '[JSON] ACLRule + +-- | Updates an access control rule. This method supports patch semantics. +-- +-- /See:/ 'aCLPatch' smart constructor. +data ACLPatch = ACLPatch + { _apQuotaUser :: !(Maybe Text) + , _apCalendarId :: !Text + , _apPrettyPrint :: !Bool + , _apUserIp :: !(Maybe Text) + , _apRuleId :: !Text + , _apKey :: !(Maybe Text) + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apCalendarId' +-- +-- * 'apPrettyPrint' +-- +-- * 'apUserIp' +-- +-- * 'apRuleId' +-- +-- * 'apKey' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +aCLPatch + :: Text -- ^ 'calendarId' + -> Text -- ^ 'ruleId' + -> ACLPatch +aCLPatch pApCalendarId_ pApRuleId_ = + ACLPatch + { _apQuotaUser = Nothing + , _apCalendarId = pApCalendarId_ + , _apPrettyPrint = True + , _apUserIp = Nothing + , _apRuleId = pApRuleId_ + , _apKey = Nothing + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' ACLPatch' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +apCalendarId :: Lens' ACLPatch' Text +apCalendarId + = lens _apCalendarId (\ s a -> s{_apCalendarId = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' ACLPatch' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' ACLPatch' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | ACL rule identifier. +apRuleId :: Lens' ACLPatch' Text +apRuleId = lens _apRuleId (\ s a -> s{_apRuleId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' ACLPatch' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' ACLPatch' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' ACLPatch' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' ACLPatch' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest ACLPatch' where + type Rs ACLPatch' = ACLRule + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLPatch{..} + = go _apQuotaUser _apCalendarId _apPrettyPrint + _apUserIp + _apRuleId + _apKey + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute (Proxy :: Proxy AclPatchAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Update.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Update.hs new file mode 100644 index 000000000..b33f4b029 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Update.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an access control rule. +-- +-- /See:/ for @CalendarACLUpdate@. +module Calendar.ACL.Update + ( + -- * REST Resource + AclUpdateAPI + + -- * Creating a Request + , aCLUpdate + , ACLUpdate + + -- * Request Lenses + , auQuotaUser + , auCalendarId + , auPrettyPrint + , auUserIp + , auRuleId + , auKey + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLUpdate@ which the +-- 'ACLUpdate' request conforms to. +type AclUpdateAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> Capture "ruleId" Text :> Put '[JSON] ACLRule + +-- | Updates an access control rule. +-- +-- /See:/ 'aCLUpdate' smart constructor. +data ACLUpdate = ACLUpdate + { _auQuotaUser :: !(Maybe Text) + , _auCalendarId :: !Text + , _auPrettyPrint :: !Bool + , _auUserIp :: !(Maybe Text) + , _auRuleId :: !Text + , _auKey :: !(Maybe Text) + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auCalendarId' +-- +-- * 'auPrettyPrint' +-- +-- * 'auUserIp' +-- +-- * 'auRuleId' +-- +-- * 'auKey' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +aCLUpdate + :: Text -- ^ 'calendarId' + -> Text -- ^ 'ruleId' + -> ACLUpdate +aCLUpdate pAuCalendarId_ pAuRuleId_ = + ACLUpdate + { _auQuotaUser = Nothing + , _auCalendarId = pAuCalendarId_ + , _auPrettyPrint = True + , _auUserIp = Nothing + , _auRuleId = pAuRuleId_ + , _auKey = Nothing + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' ACLUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +auCalendarId :: Lens' ACLUpdate' Text +auCalendarId + = lens _auCalendarId (\ s a -> s{_auCalendarId = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' ACLUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' ACLUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | ACL rule identifier. +auRuleId :: Lens' ACLUpdate' Text +auRuleId = lens _auRuleId (\ s a -> s{_auRuleId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' ACLUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' ACLUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' ACLUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' ACLUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest ACLUpdate' where + type Rs ACLUpdate' = ACLRule + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLUpdate{..} + = go _auQuotaUser _auCalendarId _auPrettyPrint + _auUserIp + _auRuleId + _auKey + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute (Proxy :: Proxy AclUpdateAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs new file mode 100644 index 000000000..6bd21ea90 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.ACL.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes to ACL resources. +-- +-- /See:/ for @CalendarACLWatch@. +module Calendar.ACL.Watch + ( + -- * REST Resource + AclWatchAPI + + -- * Creating a Request + , aCLWatch + , ACLWatch + + -- * Request Lenses + , awSyncToken + , awQuotaUser + , awCalendarId + , awPrettyPrint + , awUserIp + , awShowDeleted + , awKey + , awPageToken + , awOauthToken + , awMaxResults + , awFields + , awAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarACLWatch@ which the +-- 'ACLWatch' request conforms to. +type AclWatchAPI = + "calendars" :> + Capture "calendarId" Text :> + "acl" :> + "watch" :> + QueryParam "syncToken" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Post '[JSON] Channel + +-- | Watch for changes to ACL resources. +-- +-- /See:/ 'aCLWatch' smart constructor. +data ACLWatch = ACLWatch + { _awSyncToken :: !(Maybe Text) + , _awQuotaUser :: !(Maybe Text) + , _awCalendarId :: !Text + , _awPrettyPrint :: !Bool + , _awUserIp :: !(Maybe Text) + , _awShowDeleted :: !(Maybe Bool) + , _awKey :: !(Maybe Text) + , _awPageToken :: !(Maybe Text) + , _awOauthToken :: !(Maybe Text) + , _awMaxResults :: !(Maybe Int32) + , _awFields :: !(Maybe Text) + , _awAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'awSyncToken' +-- +-- * 'awQuotaUser' +-- +-- * 'awCalendarId' +-- +-- * 'awPrettyPrint' +-- +-- * 'awUserIp' +-- +-- * 'awShowDeleted' +-- +-- * 'awKey' +-- +-- * 'awPageToken' +-- +-- * 'awOauthToken' +-- +-- * 'awMaxResults' +-- +-- * 'awFields' +-- +-- * 'awAlt' +aCLWatch + :: Text -- ^ 'calendarId' + -> ACLWatch +aCLWatch pAwCalendarId_ = + ACLWatch + { _awSyncToken = Nothing + , _awQuotaUser = Nothing + , _awCalendarId = pAwCalendarId_ + , _awPrettyPrint = True + , _awUserIp = Nothing + , _awShowDeleted = Nothing + , _awKey = Nothing + , _awPageToken = Nothing + , _awOauthToken = Nothing + , _awMaxResults = Nothing + , _awFields = Nothing + , _awAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. All entries +-- deleted since the previous list request will always be in the result set +-- and it is not allowed to set showDeleted to False. If the syncToken +-- expires, the server will respond with a 410 GONE response code and the +-- client should clear its storage and perform a full synchronization +-- without any syncToken. Learn more about incremental synchronization. +-- Optional. The default is to return all entries. +awSyncToken :: Lens' ACLWatch' (Maybe Text) +awSyncToken + = lens _awSyncToken (\ s a -> s{_awSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +awQuotaUser :: Lens' ACLWatch' (Maybe Text) +awQuotaUser + = lens _awQuotaUser (\ s a -> s{_awQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +awCalendarId :: Lens' ACLWatch' Text +awCalendarId + = lens _awCalendarId (\ s a -> s{_awCalendarId = a}) + +-- | Returns response with indentations and line breaks. +awPrettyPrint :: Lens' ACLWatch' Bool +awPrettyPrint + = lens _awPrettyPrint + (\ s a -> s{_awPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +awUserIp :: Lens' ACLWatch' (Maybe Text) +awUserIp = lens _awUserIp (\ s a -> s{_awUserIp = a}) + +-- | Whether to include deleted ACLs in the result. Deleted ACLs are +-- represented by role equal to \"none\". Deleted ACLs will always be +-- included if syncToken is provided. Optional. The default is False. +awShowDeleted :: Lens' ACLWatch' (Maybe Bool) +awShowDeleted + = lens _awShowDeleted + (\ s a -> s{_awShowDeleted = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +awKey :: Lens' ACLWatch' (Maybe Text) +awKey = lens _awKey (\ s a -> s{_awKey = a}) + +-- | Token specifying which result page to return. Optional. +awPageToken :: Lens' ACLWatch' (Maybe Text) +awPageToken + = lens _awPageToken (\ s a -> s{_awPageToken = a}) + +-- | OAuth 2.0 token for the current user. +awOauthToken :: Lens' ACLWatch' (Maybe Text) +awOauthToken + = lens _awOauthToken (\ s a -> s{_awOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +awMaxResults :: Lens' ACLWatch' (Maybe Int32) +awMaxResults + = lens _awMaxResults (\ s a -> s{_awMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +awFields :: Lens' ACLWatch' (Maybe Text) +awFields = lens _awFields (\ s a -> s{_awFields = a}) + +-- | Data format for the response. +awAlt :: Lens' ACLWatch' Text +awAlt = lens _awAlt (\ s a -> s{_awAlt = a}) + +instance GoogleRequest ACLWatch' where + type Rs ACLWatch' = Channel + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ACLWatch{..} + = go _awSyncToken _awQuotaUser _awCalendarId + _awPrettyPrint + _awUserIp + _awShowDeleted + _awKey + _awPageToken + _awOauthToken + _awMaxResults + _awFields + _awAlt + where go + = clientWithRoute (Proxy :: Proxy AclWatchAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Delete.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Delete.hs new file mode 100644 index 000000000..026b3128c --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Delete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an entry on the user\'s calendar list. +-- +-- /See:/ for @CalendarCalendarListDelete@. +module Calendar.CalendarList.Delete + ( + -- * REST Resource + CalendarListDeleteAPI + + -- * Creating a Request + , calendarListDelete + , CalendarListDelete + + -- * Request Lenses + , cldQuotaUser + , cldCalendarId + , cldPrettyPrint + , cldUserIp + , cldKey + , cldOauthToken + , cldFields + , cldAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListDelete@ which the +-- 'CalendarListDelete' request conforms to. +type CalendarListDeleteAPI = + "users" :> + "me" :> + "calendarList" :> + Capture "calendarId" Text :> Delete '[JSON] () + +-- | Deletes an entry on the user\'s calendar list. +-- +-- /See:/ 'calendarListDelete' smart constructor. +data CalendarListDelete = CalendarListDelete + { _cldQuotaUser :: !(Maybe Text) + , _cldCalendarId :: !Text + , _cldPrettyPrint :: !Bool + , _cldUserIp :: !(Maybe Text) + , _cldKey :: !(Maybe Text) + , _cldOauthToken :: !(Maybe Text) + , _cldFields :: !(Maybe Text) + , _cldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cldQuotaUser' +-- +-- * 'cldCalendarId' +-- +-- * 'cldPrettyPrint' +-- +-- * 'cldUserIp' +-- +-- * 'cldKey' +-- +-- * 'cldOauthToken' +-- +-- * 'cldFields' +-- +-- * 'cldAlt' +calendarListDelete + :: Text -- ^ 'calendarId' + -> CalendarListDelete +calendarListDelete pCldCalendarId_ = + CalendarListDelete + { _cldQuotaUser = Nothing + , _cldCalendarId = pCldCalendarId_ + , _cldPrettyPrint = True + , _cldUserIp = Nothing + , _cldKey = Nothing + , _cldOauthToken = Nothing + , _cldFields = Nothing + , _cldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cldQuotaUser :: Lens' CalendarListDelete' (Maybe Text) +cldQuotaUser + = lens _cldQuotaUser (\ s a -> s{_cldQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cldCalendarId :: Lens' CalendarListDelete' Text +cldCalendarId + = lens _cldCalendarId + (\ s a -> s{_cldCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cldPrettyPrint :: Lens' CalendarListDelete' Bool +cldPrettyPrint + = lens _cldPrettyPrint + (\ s a -> s{_cldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cldUserIp :: Lens' CalendarListDelete' (Maybe Text) +cldUserIp + = lens _cldUserIp (\ s a -> s{_cldUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cldKey :: Lens' CalendarListDelete' (Maybe Text) +cldKey = lens _cldKey (\ s a -> s{_cldKey = a}) + +-- | OAuth 2.0 token for the current user. +cldOauthToken :: Lens' CalendarListDelete' (Maybe Text) +cldOauthToken + = lens _cldOauthToken + (\ s a -> s{_cldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cldFields :: Lens' CalendarListDelete' (Maybe Text) +cldFields + = lens _cldFields (\ s a -> s{_cldFields = a}) + +-- | Data format for the response. +cldAlt :: Lens' CalendarListDelete' Text +cldAlt = lens _cldAlt (\ s a -> s{_cldAlt = a}) + +instance GoogleRequest CalendarListDelete' where + type Rs CalendarListDelete' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListDelete{..} + = go _cldQuotaUser _cldCalendarId _cldPrettyPrint + _cldUserIp + _cldKey + _cldOauthToken + _cldFields + _cldAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListDeleteAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Get.hs new file mode 100644 index 000000000..5157c6c86 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns an entry on the user\'s calendar list. +-- +-- /See:/ for @CalendarCalendarListGet@. +module Calendar.CalendarList.Get + ( + -- * REST Resource + CalendarListGetAPI + + -- * Creating a Request + , calendarListGet + , CalendarListGet + + -- * Request Lenses + , clgQuotaUser + , clgCalendarId + , clgPrettyPrint + , clgUserIp + , clgKey + , clgOauthToken + , clgFields + , clgAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListGet@ which the +-- 'CalendarListGet' request conforms to. +type CalendarListGetAPI = + "users" :> + "me" :> + "calendarList" :> + Capture "calendarId" Text :> + Get '[JSON] CalendarListEntry + +-- | Returns an entry on the user\'s calendar list. +-- +-- /See:/ 'calendarListGet' smart constructor. +data CalendarListGet = CalendarListGet + { _clgQuotaUser :: !(Maybe Text) + , _clgCalendarId :: !Text + , _clgPrettyPrint :: !Bool + , _clgUserIp :: !(Maybe Text) + , _clgKey :: !(Maybe Text) + , _clgOauthToken :: !(Maybe Text) + , _clgFields :: !(Maybe Text) + , _clgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clgQuotaUser' +-- +-- * 'clgCalendarId' +-- +-- * 'clgPrettyPrint' +-- +-- * 'clgUserIp' +-- +-- * 'clgKey' +-- +-- * 'clgOauthToken' +-- +-- * 'clgFields' +-- +-- * 'clgAlt' +calendarListGet + :: Text -- ^ 'calendarId' + -> CalendarListGet +calendarListGet pClgCalendarId_ = + CalendarListGet + { _clgQuotaUser = Nothing + , _clgCalendarId = pClgCalendarId_ + , _clgPrettyPrint = True + , _clgUserIp = Nothing + , _clgKey = Nothing + , _clgOauthToken = Nothing + , _clgFields = Nothing + , _clgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clgQuotaUser :: Lens' CalendarListGet' (Maybe Text) +clgQuotaUser + = lens _clgQuotaUser (\ s a -> s{_clgQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +clgCalendarId :: Lens' CalendarListGet' Text +clgCalendarId + = lens _clgCalendarId + (\ s a -> s{_clgCalendarId = a}) + +-- | Returns response with indentations and line breaks. +clgPrettyPrint :: Lens' CalendarListGet' Bool +clgPrettyPrint + = lens _clgPrettyPrint + (\ s a -> s{_clgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clgUserIp :: Lens' CalendarListGet' (Maybe Text) +clgUserIp + = lens _clgUserIp (\ s a -> s{_clgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clgKey :: Lens' CalendarListGet' (Maybe Text) +clgKey = lens _clgKey (\ s a -> s{_clgKey = a}) + +-- | OAuth 2.0 token for the current user. +clgOauthToken :: Lens' CalendarListGet' (Maybe Text) +clgOauthToken + = lens _clgOauthToken + (\ s a -> s{_clgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clgFields :: Lens' CalendarListGet' (Maybe Text) +clgFields + = lens _clgFields (\ s a -> s{_clgFields = a}) + +-- | Data format for the response. +clgAlt :: Lens' CalendarListGet' Text +clgAlt = lens _clgAlt (\ s a -> s{_clgAlt = a}) + +instance GoogleRequest CalendarListGet' where + type Rs CalendarListGet' = CalendarListEntry + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListGet{..} + = go _clgQuotaUser _clgCalendarId _clgPrettyPrint + _clgUserIp + _clgKey + _clgOauthToken + _clgFields + _clgAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarListGetAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Insert.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Insert.hs new file mode 100644 index 000000000..5e6e6e4b2 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Insert.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds an entry to the user\'s calendar list. +-- +-- /See:/ for @CalendarCalendarListInsert@. +module Calendar.CalendarList.Insert + ( + -- * REST Resource + CalendarListInsertAPI + + -- * Creating a Request + , calendarListInsert + , CalendarListInsert + + -- * Request Lenses + , cliQuotaUser + , cliPrettyPrint + , cliUserIp + , cliColorRgbFormat + , cliKey + , cliOauthToken + , cliFields + , cliAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListInsert@ which the +-- 'CalendarListInsert' request conforms to. +type CalendarListInsertAPI = + "users" :> + "me" :> + "calendarList" :> + QueryParam "colorRgbFormat" Bool :> + Post '[JSON] CalendarListEntry + +-- | Adds an entry to the user\'s calendar list. +-- +-- /See:/ 'calendarListInsert' smart constructor. +data CalendarListInsert = CalendarListInsert + { _cliQuotaUser :: !(Maybe Text) + , _cliPrettyPrint :: !Bool + , _cliUserIp :: !(Maybe Text) + , _cliColorRgbFormat :: !(Maybe Bool) + , _cliKey :: !(Maybe Text) + , _cliOauthToken :: !(Maybe Text) + , _cliFields :: !(Maybe Text) + , _cliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cliQuotaUser' +-- +-- * 'cliPrettyPrint' +-- +-- * 'cliUserIp' +-- +-- * 'cliColorRgbFormat' +-- +-- * 'cliKey' +-- +-- * 'cliOauthToken' +-- +-- * 'cliFields' +-- +-- * 'cliAlt' +calendarListInsert + :: CalendarListInsert +calendarListInsert = + CalendarListInsert + { _cliQuotaUser = Nothing + , _cliPrettyPrint = True + , _cliUserIp = Nothing + , _cliColorRgbFormat = Nothing + , _cliKey = Nothing + , _cliOauthToken = Nothing + , _cliFields = Nothing + , _cliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cliQuotaUser :: Lens' CalendarListInsert' (Maybe Text) +cliQuotaUser + = lens _cliQuotaUser (\ s a -> s{_cliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cliPrettyPrint :: Lens' CalendarListInsert' Bool +cliPrettyPrint + = lens _cliPrettyPrint + (\ s a -> s{_cliPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cliUserIp :: Lens' CalendarListInsert' (Maybe Text) +cliUserIp + = lens _cliUserIp (\ s a -> s{_cliUserIp = a}) + +-- | Whether to use the foregroundColor and backgroundColor fields to write +-- the calendar colors (RGB). If this feature is used, the index-based +-- colorId field will be set to the best matching option automatically. +-- Optional. The default is False. +cliColorRgbFormat :: Lens' CalendarListInsert' (Maybe Bool) +cliColorRgbFormat + = lens _cliColorRgbFormat + (\ s a -> s{_cliColorRgbFormat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cliKey :: Lens' CalendarListInsert' (Maybe Text) +cliKey = lens _cliKey (\ s a -> s{_cliKey = a}) + +-- | OAuth 2.0 token for the current user. +cliOauthToken :: Lens' CalendarListInsert' (Maybe Text) +cliOauthToken + = lens _cliOauthToken + (\ s a -> s{_cliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cliFields :: Lens' CalendarListInsert' (Maybe Text) +cliFields + = lens _cliFields (\ s a -> s{_cliFields = a}) + +-- | Data format for the response. +cliAlt :: Lens' CalendarListInsert' Text +cliAlt = lens _cliAlt (\ s a -> s{_cliAlt = a}) + +instance GoogleRequest CalendarListInsert' where + type Rs CalendarListInsert' = CalendarListEntry + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListInsert{..} + = go _cliQuotaUser _cliPrettyPrint _cliUserIp + _cliColorRgbFormat + _cliKey + _cliOauthToken + _cliFields + _cliAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListInsertAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/List.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/List.hs new file mode 100644 index 000000000..5ae98c439 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/List.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns entries on the user\'s calendar list. +-- +-- /See:/ for @CalendarCalendarListList@. +module Calendar.CalendarList.List + ( + -- * REST Resource + CalendarListListAPI + + -- * Creating a Request + , calendarListList + , CalendarListList + + -- * Request Lenses + , cllSyncToken + , cllQuotaUser + , cllPrettyPrint + , cllMinAccessRole + , cllUserIp + , cllShowDeleted + , cllShowHidden + , cllKey + , cllPageToken + , cllOauthToken + , cllMaxResults + , cllFields + , cllAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListList@ which the +-- 'CalendarListList' request conforms to. +type CalendarListListAPI = + "users" :> + "me" :> + "calendarList" :> + QueryParam "syncToken" Text :> + QueryParam "minAccessRole" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "showHidden" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CalendarList + +-- | Returns entries on the user\'s calendar list. +-- +-- /See:/ 'calendarListList' smart constructor. +data CalendarListList = CalendarListList + { _cllSyncToken :: !(Maybe Text) + , _cllQuotaUser :: !(Maybe Text) + , _cllPrettyPrint :: !Bool + , _cllMinAccessRole :: !(Maybe Text) + , _cllUserIp :: !(Maybe Text) + , _cllShowDeleted :: !(Maybe Bool) + , _cllShowHidden :: !(Maybe Bool) + , _cllKey :: !(Maybe Text) + , _cllPageToken :: !(Maybe Text) + , _cllOauthToken :: !(Maybe Text) + , _cllMaxResults :: !(Maybe Int32) + , _cllFields :: !(Maybe Text) + , _cllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllSyncToken' +-- +-- * 'cllQuotaUser' +-- +-- * 'cllPrettyPrint' +-- +-- * 'cllMinAccessRole' +-- +-- * 'cllUserIp' +-- +-- * 'cllShowDeleted' +-- +-- * 'cllShowHidden' +-- +-- * 'cllKey' +-- +-- * 'cllPageToken' +-- +-- * 'cllOauthToken' +-- +-- * 'cllMaxResults' +-- +-- * 'cllFields' +-- +-- * 'cllAlt' +calendarListList + :: CalendarListList +calendarListList = + CalendarListList + { _cllSyncToken = Nothing + , _cllQuotaUser = Nothing + , _cllPrettyPrint = True + , _cllMinAccessRole = Nothing + , _cllUserIp = Nothing + , _cllShowDeleted = Nothing + , _cllShowHidden = Nothing + , _cllKey = Nothing + , _cllPageToken = Nothing + , _cllOauthToken = Nothing + , _cllMaxResults = Nothing + , _cllFields = Nothing + , _cllAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. If only +-- read-only fields such as calendar properties or ACLs have changed, the +-- entry won\'t be returned. All entries deleted and hidden since the +-- previous list request will always be in the result set and it is not +-- allowed to set showDeleted neither showHidden to False. To ensure client +-- state consistency minAccessRole query parameter cannot be specified +-- together with nextSyncToken. If the syncToken expires, the server will +-- respond with a 410 GONE response code and the client should clear its +-- storage and perform a full synchronization without any syncToken. Learn +-- more about incremental synchronization. Optional. The default is to +-- return all entries. +cllSyncToken :: Lens' CalendarListList' (Maybe Text) +cllSyncToken + = lens _cllSyncToken (\ s a -> s{_cllSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cllQuotaUser :: Lens' CalendarListList' (Maybe Text) +cllQuotaUser + = lens _cllQuotaUser (\ s a -> s{_cllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cllPrettyPrint :: Lens' CalendarListList' Bool +cllPrettyPrint + = lens _cllPrettyPrint + (\ s a -> s{_cllPrettyPrint = a}) + +-- | The minimum access role for the user in the returned entries. Optional. +-- The default is no restriction. +cllMinAccessRole :: Lens' CalendarListList' (Maybe Text) +cllMinAccessRole + = lens _cllMinAccessRole + (\ s a -> s{_cllMinAccessRole = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cllUserIp :: Lens' CalendarListList' (Maybe Text) +cllUserIp + = lens _cllUserIp (\ s a -> s{_cllUserIp = a}) + +-- | Whether to include deleted calendar list entries in the result. +-- Optional. The default is False. +cllShowDeleted :: Lens' CalendarListList' (Maybe Bool) +cllShowDeleted + = lens _cllShowDeleted + (\ s a -> s{_cllShowDeleted = a}) + +-- | Whether to show hidden entries. Optional. The default is False. +cllShowHidden :: Lens' CalendarListList' (Maybe Bool) +cllShowHidden + = lens _cllShowHidden + (\ s a -> s{_cllShowHidden = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cllKey :: Lens' CalendarListList' (Maybe Text) +cllKey = lens _cllKey (\ s a -> s{_cllKey = a}) + +-- | Token specifying which result page to return. Optional. +cllPageToken :: Lens' CalendarListList' (Maybe Text) +cllPageToken + = lens _cllPageToken (\ s a -> s{_cllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cllOauthToken :: Lens' CalendarListList' (Maybe Text) +cllOauthToken + = lens _cllOauthToken + (\ s a -> s{_cllOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +cllMaxResults :: Lens' CalendarListList' (Maybe Int32) +cllMaxResults + = lens _cllMaxResults + (\ s a -> s{_cllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cllFields :: Lens' CalendarListList' (Maybe Text) +cllFields + = lens _cllFields (\ s a -> s{_cllFields = a}) + +-- | Data format for the response. +cllAlt :: Lens' CalendarListList' Text +cllAlt = lens _cllAlt (\ s a -> s{_cllAlt = a}) + +instance GoogleRequest CalendarListList' where + type Rs CalendarListList' = CalendarList + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListList{..} + = go _cllSyncToken _cllQuotaUser _cllPrettyPrint + _cllMinAccessRole + _cllUserIp + _cllShowDeleted + _cllShowHidden + _cllKey + _cllPageToken + _cllOauthToken + _cllMaxResults + _cllFields + _cllAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListListAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Patch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Patch.hs new file mode 100644 index 000000000..b7519c2db --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Patch.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an entry on the user\'s calendar list. This method supports +-- patch semantics. +-- +-- /See:/ for @CalendarCalendarListPatch@. +module Calendar.CalendarList.Patch + ( + -- * REST Resource + CalendarListPatchAPI + + -- * Creating a Request + , calendarListPatch + , CalendarListPatch + + -- * Request Lenses + , clpQuotaUser + , clpCalendarId + , clpPrettyPrint + , clpUserIp + , clpColorRgbFormat + , clpKey + , clpOauthToken + , clpFields + , clpAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListPatch@ which the +-- 'CalendarListPatch' request conforms to. +type CalendarListPatchAPI = + "users" :> + "me" :> + "calendarList" :> + Capture "calendarId" Text :> + QueryParam "colorRgbFormat" Bool :> + Patch '[JSON] CalendarListEntry + +-- | Updates an entry on the user\'s calendar list. This method supports +-- patch semantics. +-- +-- /See:/ 'calendarListPatch' smart constructor. +data CalendarListPatch = CalendarListPatch + { _clpQuotaUser :: !(Maybe Text) + , _clpCalendarId :: !Text + , _clpPrettyPrint :: !Bool + , _clpUserIp :: !(Maybe Text) + , _clpColorRgbFormat :: !(Maybe Bool) + , _clpKey :: !(Maybe Text) + , _clpOauthToken :: !(Maybe Text) + , _clpFields :: !(Maybe Text) + , _clpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clpQuotaUser' +-- +-- * 'clpCalendarId' +-- +-- * 'clpPrettyPrint' +-- +-- * 'clpUserIp' +-- +-- * 'clpColorRgbFormat' +-- +-- * 'clpKey' +-- +-- * 'clpOauthToken' +-- +-- * 'clpFields' +-- +-- * 'clpAlt' +calendarListPatch + :: Text -- ^ 'calendarId' + -> CalendarListPatch +calendarListPatch pClpCalendarId_ = + CalendarListPatch + { _clpQuotaUser = Nothing + , _clpCalendarId = pClpCalendarId_ + , _clpPrettyPrint = True + , _clpUserIp = Nothing + , _clpColorRgbFormat = Nothing + , _clpKey = Nothing + , _clpOauthToken = Nothing + , _clpFields = Nothing + , _clpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clpQuotaUser :: Lens' CalendarListPatch' (Maybe Text) +clpQuotaUser + = lens _clpQuotaUser (\ s a -> s{_clpQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +clpCalendarId :: Lens' CalendarListPatch' Text +clpCalendarId + = lens _clpCalendarId + (\ s a -> s{_clpCalendarId = a}) + +-- | Returns response with indentations and line breaks. +clpPrettyPrint :: Lens' CalendarListPatch' Bool +clpPrettyPrint + = lens _clpPrettyPrint + (\ s a -> s{_clpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clpUserIp :: Lens' CalendarListPatch' (Maybe Text) +clpUserIp + = lens _clpUserIp (\ s a -> s{_clpUserIp = a}) + +-- | Whether to use the foregroundColor and backgroundColor fields to write +-- the calendar colors (RGB). If this feature is used, the index-based +-- colorId field will be set to the best matching option automatically. +-- Optional. The default is False. +clpColorRgbFormat :: Lens' CalendarListPatch' (Maybe Bool) +clpColorRgbFormat + = lens _clpColorRgbFormat + (\ s a -> s{_clpColorRgbFormat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clpKey :: Lens' CalendarListPatch' (Maybe Text) +clpKey = lens _clpKey (\ s a -> s{_clpKey = a}) + +-- | OAuth 2.0 token for the current user. +clpOauthToken :: Lens' CalendarListPatch' (Maybe Text) +clpOauthToken + = lens _clpOauthToken + (\ s a -> s{_clpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clpFields :: Lens' CalendarListPatch' (Maybe Text) +clpFields + = lens _clpFields (\ s a -> s{_clpFields = a}) + +-- | Data format for the response. +clpAlt :: Lens' CalendarListPatch' Text +clpAlt = lens _clpAlt (\ s a -> s{_clpAlt = a}) + +instance GoogleRequest CalendarListPatch' where + type Rs CalendarListPatch' = CalendarListEntry + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListPatch{..} + = go _clpQuotaUser _clpCalendarId _clpPrettyPrint + _clpUserIp + _clpColorRgbFormat + _clpKey + _clpOauthToken + _clpFields + _clpAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListPatchAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Update.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Update.hs new file mode 100644 index 000000000..cf7a817b5 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Update.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an entry on the user\'s calendar list. +-- +-- /See:/ for @CalendarCalendarListUpdate@. +module Calendar.CalendarList.Update + ( + -- * REST Resource + CalendarListUpdateAPI + + -- * Creating a Request + , calendarListUpdate + , CalendarListUpdate + + -- * Request Lenses + , cluQuotaUser + , cluCalendarId + , cluPrettyPrint + , cluUserIp + , cluColorRgbFormat + , cluKey + , cluOauthToken + , cluFields + , cluAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListUpdate@ which the +-- 'CalendarListUpdate' request conforms to. +type CalendarListUpdateAPI = + "users" :> + "me" :> + "calendarList" :> + Capture "calendarId" Text :> + QueryParam "colorRgbFormat" Bool :> + Put '[JSON] CalendarListEntry + +-- | Updates an entry on the user\'s calendar list. +-- +-- /See:/ 'calendarListUpdate' smart constructor. +data CalendarListUpdate = CalendarListUpdate + { _cluQuotaUser :: !(Maybe Text) + , _cluCalendarId :: !Text + , _cluPrettyPrint :: !Bool + , _cluUserIp :: !(Maybe Text) + , _cluColorRgbFormat :: !(Maybe Bool) + , _cluKey :: !(Maybe Text) + , _cluOauthToken :: !(Maybe Text) + , _cluFields :: !(Maybe Text) + , _cluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cluQuotaUser' +-- +-- * 'cluCalendarId' +-- +-- * 'cluPrettyPrint' +-- +-- * 'cluUserIp' +-- +-- * 'cluColorRgbFormat' +-- +-- * 'cluKey' +-- +-- * 'cluOauthToken' +-- +-- * 'cluFields' +-- +-- * 'cluAlt' +calendarListUpdate + :: Text -- ^ 'calendarId' + -> CalendarListUpdate +calendarListUpdate pCluCalendarId_ = + CalendarListUpdate + { _cluQuotaUser = Nothing + , _cluCalendarId = pCluCalendarId_ + , _cluPrettyPrint = True + , _cluUserIp = Nothing + , _cluColorRgbFormat = Nothing + , _cluKey = Nothing + , _cluOauthToken = Nothing + , _cluFields = Nothing + , _cluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cluQuotaUser :: Lens' CalendarListUpdate' (Maybe Text) +cluQuotaUser + = lens _cluQuotaUser (\ s a -> s{_cluQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cluCalendarId :: Lens' CalendarListUpdate' Text +cluCalendarId + = lens _cluCalendarId + (\ s a -> s{_cluCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cluPrettyPrint :: Lens' CalendarListUpdate' Bool +cluPrettyPrint + = lens _cluPrettyPrint + (\ s a -> s{_cluPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cluUserIp :: Lens' CalendarListUpdate' (Maybe Text) +cluUserIp + = lens _cluUserIp (\ s a -> s{_cluUserIp = a}) + +-- | Whether to use the foregroundColor and backgroundColor fields to write +-- the calendar colors (RGB). If this feature is used, the index-based +-- colorId field will be set to the best matching option automatically. +-- Optional. The default is False. +cluColorRgbFormat :: Lens' CalendarListUpdate' (Maybe Bool) +cluColorRgbFormat + = lens _cluColorRgbFormat + (\ s a -> s{_cluColorRgbFormat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cluKey :: Lens' CalendarListUpdate' (Maybe Text) +cluKey = lens _cluKey (\ s a -> s{_cluKey = a}) + +-- | OAuth 2.0 token for the current user. +cluOauthToken :: Lens' CalendarListUpdate' (Maybe Text) +cluOauthToken + = lens _cluOauthToken + (\ s a -> s{_cluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cluFields :: Lens' CalendarListUpdate' (Maybe Text) +cluFields + = lens _cluFields (\ s a -> s{_cluFields = a}) + +-- | Data format for the response. +cluAlt :: Lens' CalendarListUpdate' Text +cluAlt = lens _cluAlt (\ s a -> s{_cluAlt = a}) + +instance GoogleRequest CalendarListUpdate' where + type Rs CalendarListUpdate' = CalendarListEntry + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListUpdate{..} + = go _cluQuotaUser _cluCalendarId _cluPrettyPrint + _cluUserIp + _cluColorRgbFormat + _cluKey + _cluOauthToken + _cluFields + _cluAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListUpdateAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Watch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Watch.hs new file mode 100644 index 000000000..6888e81be --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Watch.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.CalendarList.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes to CalendarList resources. +-- +-- /See:/ for @CalendarCalendarListWatch@. +module Calendar.CalendarList.Watch + ( + -- * REST Resource + CalendarListWatchAPI + + -- * Creating a Request + , calendarListWatch + , CalendarListWatch + + -- * Request Lenses + , clwSyncToken + , clwQuotaUser + , clwPrettyPrint + , clwMinAccessRole + , clwUserIp + , clwShowDeleted + , clwShowHidden + , clwKey + , clwPageToken + , clwOauthToken + , clwMaxResults + , clwFields + , clwAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarListWatch@ which the +-- 'CalendarListWatch' request conforms to. +type CalendarListWatchAPI = + "users" :> + "me" :> + "calendarList" :> + "watch" :> + QueryParam "syncToken" Text :> + QueryParam "minAccessRole" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "showHidden" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Post '[JSON] Channel + +-- | Watch for changes to CalendarList resources. +-- +-- /See:/ 'calendarListWatch' smart constructor. +data CalendarListWatch = CalendarListWatch + { _clwSyncToken :: !(Maybe Text) + , _clwQuotaUser :: !(Maybe Text) + , _clwPrettyPrint :: !Bool + , _clwMinAccessRole :: !(Maybe Text) + , _clwUserIp :: !(Maybe Text) + , _clwShowDeleted :: !(Maybe Bool) + , _clwShowHidden :: !(Maybe Bool) + , _clwKey :: !(Maybe Text) + , _clwPageToken :: !(Maybe Text) + , _clwOauthToken :: !(Maybe Text) + , _clwMaxResults :: !(Maybe Int32) + , _clwFields :: !(Maybe Text) + , _clwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarListWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clwSyncToken' +-- +-- * 'clwQuotaUser' +-- +-- * 'clwPrettyPrint' +-- +-- * 'clwMinAccessRole' +-- +-- * 'clwUserIp' +-- +-- * 'clwShowDeleted' +-- +-- * 'clwShowHidden' +-- +-- * 'clwKey' +-- +-- * 'clwPageToken' +-- +-- * 'clwOauthToken' +-- +-- * 'clwMaxResults' +-- +-- * 'clwFields' +-- +-- * 'clwAlt' +calendarListWatch + :: CalendarListWatch +calendarListWatch = + CalendarListWatch + { _clwSyncToken = Nothing + , _clwQuotaUser = Nothing + , _clwPrettyPrint = True + , _clwMinAccessRole = Nothing + , _clwUserIp = Nothing + , _clwShowDeleted = Nothing + , _clwShowHidden = Nothing + , _clwKey = Nothing + , _clwPageToken = Nothing + , _clwOauthToken = Nothing + , _clwMaxResults = Nothing + , _clwFields = Nothing + , _clwAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. If only +-- read-only fields such as calendar properties or ACLs have changed, the +-- entry won\'t be returned. All entries deleted and hidden since the +-- previous list request will always be in the result set and it is not +-- allowed to set showDeleted neither showHidden to False. To ensure client +-- state consistency minAccessRole query parameter cannot be specified +-- together with nextSyncToken. If the syncToken expires, the server will +-- respond with a 410 GONE response code and the client should clear its +-- storage and perform a full synchronization without any syncToken. Learn +-- more about incremental synchronization. Optional. The default is to +-- return all entries. +clwSyncToken :: Lens' CalendarListWatch' (Maybe Text) +clwSyncToken + = lens _clwSyncToken (\ s a -> s{_clwSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clwQuotaUser :: Lens' CalendarListWatch' (Maybe Text) +clwQuotaUser + = lens _clwQuotaUser (\ s a -> s{_clwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clwPrettyPrint :: Lens' CalendarListWatch' Bool +clwPrettyPrint + = lens _clwPrettyPrint + (\ s a -> s{_clwPrettyPrint = a}) + +-- | The minimum access role for the user in the returned entries. Optional. +-- The default is no restriction. +clwMinAccessRole :: Lens' CalendarListWatch' (Maybe Text) +clwMinAccessRole + = lens _clwMinAccessRole + (\ s a -> s{_clwMinAccessRole = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clwUserIp :: Lens' CalendarListWatch' (Maybe Text) +clwUserIp + = lens _clwUserIp (\ s a -> s{_clwUserIp = a}) + +-- | Whether to include deleted calendar list entries in the result. +-- Optional. The default is False. +clwShowDeleted :: Lens' CalendarListWatch' (Maybe Bool) +clwShowDeleted + = lens _clwShowDeleted + (\ s a -> s{_clwShowDeleted = a}) + +-- | Whether to show hidden entries. Optional. The default is False. +clwShowHidden :: Lens' CalendarListWatch' (Maybe Bool) +clwShowHidden + = lens _clwShowHidden + (\ s a -> s{_clwShowHidden = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clwKey :: Lens' CalendarListWatch' (Maybe Text) +clwKey = lens _clwKey (\ s a -> s{_clwKey = a}) + +-- | Token specifying which result page to return. Optional. +clwPageToken :: Lens' CalendarListWatch' (Maybe Text) +clwPageToken + = lens _clwPageToken (\ s a -> s{_clwPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clwOauthToken :: Lens' CalendarListWatch' (Maybe Text) +clwOauthToken + = lens _clwOauthToken + (\ s a -> s{_clwOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +clwMaxResults :: Lens' CalendarListWatch' (Maybe Int32) +clwMaxResults + = lens _clwMaxResults + (\ s a -> s{_clwMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clwFields :: Lens' CalendarListWatch' (Maybe Text) +clwFields + = lens _clwFields (\ s a -> s{_clwFields = a}) + +-- | Data format for the response. +clwAlt :: Lens' CalendarListWatch' Text +clwAlt = lens _clwAlt (\ s a -> s{_clwAlt = a}) + +instance GoogleRequest CalendarListWatch' where + type Rs CalendarListWatch' = Channel + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarListWatch{..} + = go _clwSyncToken _clwQuotaUser _clwPrettyPrint + _clwMinAccessRole + _clwUserIp + _clwShowDeleted + _clwShowHidden + _clwKey + _clwPageToken + _clwOauthToken + _clwMaxResults + _clwFields + _clwAlt + where go + = clientWithRoute + (Proxy :: Proxy CalendarListWatchAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Clear.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Clear.hs new file mode 100644 index 000000000..3cd19e135 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Clear.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Clear +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Clears a primary calendar. This operation deletes all events associated +-- with the primary calendar of an account. +-- +-- /See:/ for @CalendarCalendarsClear@. +module Calendar.Calendars.Clear + ( + -- * REST Resource + CalendarsClearAPI + + -- * Creating a Request + , calendarsClear + , CalendarsClear + + -- * Request Lenses + , ccQuotaUser + , ccCalendarId + , ccPrettyPrint + , ccUserIp + , ccKey + , ccOauthToken + , ccFields + , ccAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsClear@ which the +-- 'CalendarsClear' request conforms to. +type CalendarsClearAPI = + "calendars" :> + Capture "calendarId" Text :> + "clear" :> Post '[JSON] () + +-- | Clears a primary calendar. This operation deletes all events associated +-- with the primary calendar of an account. +-- +-- /See:/ 'calendarsClear' smart constructor. +data CalendarsClear = CalendarsClear + { _ccQuotaUser :: !(Maybe Text) + , _ccCalendarId :: !Text + , _ccPrettyPrint :: !Bool + , _ccUserIp :: !(Maybe Text) + , _ccKey :: !(Maybe Text) + , _ccOauthToken :: !(Maybe Text) + , _ccFields :: !(Maybe Text) + , _ccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsClear'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccQuotaUser' +-- +-- * 'ccCalendarId' +-- +-- * 'ccPrettyPrint' +-- +-- * 'ccUserIp' +-- +-- * 'ccKey' +-- +-- * 'ccOauthToken' +-- +-- * 'ccFields' +-- +-- * 'ccAlt' +calendarsClear + :: Text -- ^ 'calendarId' + -> CalendarsClear +calendarsClear pCcCalendarId_ = + CalendarsClear + { _ccQuotaUser = Nothing + , _ccCalendarId = pCcCalendarId_ + , _ccPrettyPrint = True + , _ccUserIp = Nothing + , _ccKey = Nothing + , _ccOauthToken = Nothing + , _ccFields = Nothing + , _ccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccQuotaUser :: Lens' CalendarsClear' (Maybe Text) +ccQuotaUser + = lens _ccQuotaUser (\ s a -> s{_ccQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +ccCalendarId :: Lens' CalendarsClear' Text +ccCalendarId + = lens _ccCalendarId (\ s a -> s{_ccCalendarId = a}) + +-- | Returns response with indentations and line breaks. +ccPrettyPrint :: Lens' CalendarsClear' Bool +ccPrettyPrint + = lens _ccPrettyPrint + (\ s a -> s{_ccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccUserIp :: Lens' CalendarsClear' (Maybe Text) +ccUserIp = lens _ccUserIp (\ s a -> s{_ccUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccKey :: Lens' CalendarsClear' (Maybe Text) +ccKey = lens _ccKey (\ s a -> s{_ccKey = a}) + +-- | OAuth 2.0 token for the current user. +ccOauthToken :: Lens' CalendarsClear' (Maybe Text) +ccOauthToken + = lens _ccOauthToken (\ s a -> s{_ccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccFields :: Lens' CalendarsClear' (Maybe Text) +ccFields = lens _ccFields (\ s a -> s{_ccFields = a}) + +-- | Data format for the response. +ccAlt :: Lens' CalendarsClear' Text +ccAlt = lens _ccAlt (\ s a -> s{_ccAlt = a}) + +instance GoogleRequest CalendarsClear' where + type Rs CalendarsClear' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsClear{..} + = go _ccQuotaUser _ccCalendarId _ccPrettyPrint + _ccUserIp + _ccKey + _ccOauthToken + _ccFields + _ccAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsClearAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Delete.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Delete.hs new file mode 100644 index 000000000..dbaa126c5 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Delete.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a secondary calendar. Use calendars.clear for clearing all +-- events on primary calendars. +-- +-- /See:/ for @CalendarCalendarsDelete@. +module Calendar.Calendars.Delete + ( + -- * REST Resource + CalendarsDeleteAPI + + -- * Creating a Request + , calendarsDelete + , CalendarsDelete + + -- * Request Lenses + , cdQuotaUser + , cdCalendarId + , cdPrettyPrint + , cdUserIp + , cdKey + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsDelete@ which the +-- 'CalendarsDelete' request conforms to. +type CalendarsDeleteAPI = + "calendars" :> + Capture "calendarId" Text :> Delete '[JSON] () + +-- | Deletes a secondary calendar. Use calendars.clear for clearing all +-- events on primary calendars. +-- +-- /See:/ 'calendarsDelete' smart constructor. +data CalendarsDelete = CalendarsDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdCalendarId :: !Text + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdCalendarId' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdKey' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +calendarsDelete + :: Text -- ^ 'calendarId' + -> CalendarsDelete +calendarsDelete pCdCalendarId_ = + CalendarsDelete + { _cdQuotaUser = Nothing + , _cdCalendarId = pCdCalendarId_ + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdKey = Nothing + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CalendarsDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cdCalendarId :: Lens' CalendarsDelete' Text +cdCalendarId + = lens _cdCalendarId (\ s a -> s{_cdCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CalendarsDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CalendarsDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CalendarsDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CalendarsDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CalendarsDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CalendarsDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CalendarsDelete' where + type Rs CalendarsDelete' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsDelete{..} + = go _cdQuotaUser _cdCalendarId _cdPrettyPrint + _cdUserIp + _cdKey + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsDeleteAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Get.hs new file mode 100644 index 000000000..6c6ffe496 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Get.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns metadata for a calendar. +-- +-- /See:/ for @CalendarCalendarsGet@. +module Calendar.Calendars.Get + ( + -- * REST Resource + CalendarsGetAPI + + -- * Creating a Request + , calendarsGet + , CalendarsGet + + -- * Request Lenses + , cgQuotaUser + , cgCalendarId + , cgPrettyPrint + , cgUserIp + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsGet@ which the +-- 'CalendarsGet' request conforms to. +type CalendarsGetAPI = + "calendars" :> + Capture "calendarId" Text :> Get '[JSON] Calendar + +-- | Returns metadata for a calendar. +-- +-- /See:/ 'calendarsGet' smart constructor. +data CalendarsGet = CalendarsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgCalendarId :: !Text + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgCalendarId' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +calendarsGet + :: Text -- ^ 'calendarId' + -> CalendarsGet +calendarsGet pCgCalendarId_ = + CalendarsGet + { _cgQuotaUser = Nothing + , _cgCalendarId = pCgCalendarId_ + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CalendarsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cgCalendarId :: Lens' CalendarsGet' Text +cgCalendarId + = lens _cgCalendarId (\ s a -> s{_cgCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CalendarsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CalendarsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CalendarsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CalendarsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CalendarsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CalendarsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CalendarsGet' where + type Rs CalendarsGet' = Calendar + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsGet{..} + = go _cgQuotaUser _cgCalendarId _cgPrettyPrint + _cgUserIp + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsGetAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Insert.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Insert.hs new file mode 100644 index 000000000..3ec6f881a --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a secondary calendar. +-- +-- /See:/ for @CalendarCalendarsInsert@. +module Calendar.Calendars.Insert + ( + -- * REST Resource + CalendarsInsertAPI + + -- * Creating a Request + , calendarsInsert + , CalendarsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsInsert@ which the +-- 'CalendarsInsert' request conforms to. +type CalendarsInsertAPI = + "calendars" :> Post '[JSON] Calendar + +-- | Creates a secondary calendar. +-- +-- /See:/ 'calendarsInsert' smart constructor. +data CalendarsInsert = CalendarsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +calendarsInsert + :: CalendarsInsert +calendarsInsert = + CalendarsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CalendarsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CalendarsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CalendarsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CalendarsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CalendarsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CalendarsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CalendarsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CalendarsInsert' where + type Rs CalendarsInsert' = Calendar + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsInsertAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Patch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Patch.hs new file mode 100644 index 000000000..a1033233e --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Patch.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates metadata for a calendar. This method supports patch semantics. +-- +-- /See:/ for @CalendarCalendarsPatch@. +module Calendar.Calendars.Patch + ( + -- * REST Resource + CalendarsPatchAPI + + -- * Creating a Request + , calendarsPatch + , CalendarsPatch + + -- * Request Lenses + , cpQuotaUser + , cpCalendarId + , cpPrettyPrint + , cpUserIp + , cpKey + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsPatch@ which the +-- 'CalendarsPatch' request conforms to. +type CalendarsPatchAPI = + "calendars" :> + Capture "calendarId" Text :> Patch '[JSON] Calendar + +-- | Updates metadata for a calendar. This method supports patch semantics. +-- +-- /See:/ 'calendarsPatch' smart constructor. +data CalendarsPatch = CalendarsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpCalendarId :: !Text + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpCalendarId' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +calendarsPatch + :: Text -- ^ 'calendarId' + -> CalendarsPatch +calendarsPatch pCpCalendarId_ = + CalendarsPatch + { _cpQuotaUser = Nothing + , _cpCalendarId = pCpCalendarId_ + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CalendarsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cpCalendarId :: Lens' CalendarsPatch' Text +cpCalendarId + = lens _cpCalendarId (\ s a -> s{_cpCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CalendarsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CalendarsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CalendarsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CalendarsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CalendarsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CalendarsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CalendarsPatch' where + type Rs CalendarsPatch' = Calendar + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsPatch{..} + = go _cpQuotaUser _cpCalendarId _cpPrettyPrint + _cpUserIp + _cpKey + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsPatchAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Update.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Update.hs new file mode 100644 index 000000000..57f95fc8f --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Calendars/Update.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Calendars.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates metadata for a calendar. +-- +-- /See:/ for @CalendarCalendarsUpdate@. +module Calendar.Calendars.Update + ( + -- * REST Resource + CalendarsUpdateAPI + + -- * Creating a Request + , calendarsUpdate + , CalendarsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuCalendarId + , cuPrettyPrint + , cuUserIp + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarCalendarsUpdate@ which the +-- 'CalendarsUpdate' request conforms to. +type CalendarsUpdateAPI = + "calendars" :> + Capture "calendarId" Text :> Put '[JSON] Calendar + +-- | Updates metadata for a calendar. +-- +-- /See:/ 'calendarsUpdate' smart constructor. +data CalendarsUpdate = CalendarsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuCalendarId :: !Text + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CalendarsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuCalendarId' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +calendarsUpdate + :: Text -- ^ 'calendarId' + -> CalendarsUpdate +calendarsUpdate pCuCalendarId_ = + CalendarsUpdate + { _cuQuotaUser = Nothing + , _cuCalendarId = pCuCalendarId_ + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CalendarsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +cuCalendarId :: Lens' CalendarsUpdate' Text +cuCalendarId + = lens _cuCalendarId (\ s a -> s{_cuCalendarId = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CalendarsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CalendarsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CalendarsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CalendarsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CalendarsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CalendarsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CalendarsUpdate' where + type Rs CalendarsUpdate' = Calendar + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u CalendarsUpdate{..} + = go _cuQuotaUser _cuCalendarId _cuPrettyPrint + _cuUserIp + _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CalendarsUpdateAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Channels/Stop.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Channels/Stop.hs new file mode 100644 index 000000000..20be2a89a --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Channels/Stop.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Channels.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop watching resources through this channel +-- +-- /See:/ for @CalendarChannelsStop@. +module Calendar.Channels.Stop + ( + -- * REST Resource + ChannelsStopAPI + + -- * Creating a Request + , channelsStop + , ChannelsStop + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarChannelsStop@ which the +-- 'ChannelsStop' request conforms to. +type ChannelsStopAPI = + "channels" :> "stop" :> Post '[JSON] () + +-- | Stop watching resources through this channel +-- +-- /See:/ 'channelsStop' smart constructor. +data ChannelsStop = ChannelsStop + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +channelsStop + :: ChannelsStop +channelsStop = + ChannelsStop + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' ChannelsStop' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' ChannelsStop' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' ChannelsStop' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' ChannelsStop' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' ChannelsStop' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' ChannelsStop' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' ChannelsStop' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest ChannelsStop' where + type Rs ChannelsStop' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ChannelsStop{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsStopAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Colors/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Colors/Get.hs new file mode 100644 index 000000000..424d60567 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Colors/Get.hs @@ -0,0 +1,136 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Colors.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the color definitions for calendars and events. +-- +-- /See:/ for @CalendarColorsGet@. +module Calendar.Colors.Get + ( + -- * REST Resource + ColorsGetAPI + + -- * Creating a Request + , colorsGet + , ColorsGet + + -- * Request Lenses + , cQuotaUser + , cPrettyPrint + , cUserIp + , cKey + , cOauthToken + , cFields + , cAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarColorsGet@ which the +-- 'ColorsGet' request conforms to. +type ColorsGetAPI = "colors" :> Get '[JSON] Colors + +-- | Returns the color definitions for calendars and events. +-- +-- /See:/ 'colorsGet' smart constructor. +data ColorsGet = ColorsGet + { _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cUserIp :: !(Maybe Text) + , _cKey :: !(Maybe Text) + , _cOauthToken :: !(Maybe Text) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColorsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cUserIp' +-- +-- * 'cKey' +-- +-- * 'cOauthToken' +-- +-- * 'cFields' +-- +-- * 'cAlt' +colorsGet + :: ColorsGet +colorsGet = + ColorsGet + { _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cUserIp = Nothing + , _cKey = Nothing + , _cOauthToken = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' ColorsGet' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' ColorsGet' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' ColorsGet' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' ColorsGet' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' ColorsGet' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' ColorsGet' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' ColorsGet' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest ColorsGet' where + type Rs ColorsGet' = Colors + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u ColorsGet{..} + = go _cQuotaUser _cPrettyPrint _cUserIp _cKey + _cOauthToken + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy ColorsGetAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Delete.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Delete.hs new file mode 100644 index 000000000..6005e2dee --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Delete.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an event. +-- +-- /See:/ for @CalendarEventsDelete@. +module Calendar.Events.Delete + ( + -- * REST Resource + EventsDeleteAPI + + -- * Creating a Request + , eventsDelete + , EventsDelete + + -- * Request Lenses + , edQuotaUser + , edCalendarId + , edPrettyPrint + , edUserIp + , edKey + , edSendNotifications + , edOauthToken + , edEventId + , edFields + , edAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsDelete@ which the +-- 'EventsDelete' request conforms to. +type EventsDeleteAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + QueryParam "sendNotifications" Bool :> + Delete '[JSON] () + +-- | Deletes an event. +-- +-- /See:/ 'eventsDelete' smart constructor. +data EventsDelete = EventsDelete + { _edQuotaUser :: !(Maybe Text) + , _edCalendarId :: !Text + , _edPrettyPrint :: !Bool + , _edUserIp :: !(Maybe Text) + , _edKey :: !(Maybe Text) + , _edSendNotifications :: !(Maybe Bool) + , _edOauthToken :: !(Maybe Text) + , _edEventId :: !Text + , _edFields :: !(Maybe Text) + , _edAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edQuotaUser' +-- +-- * 'edCalendarId' +-- +-- * 'edPrettyPrint' +-- +-- * 'edUserIp' +-- +-- * 'edKey' +-- +-- * 'edSendNotifications' +-- +-- * 'edOauthToken' +-- +-- * 'edEventId' +-- +-- * 'edFields' +-- +-- * 'edAlt' +eventsDelete + :: Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsDelete +eventsDelete pEdCalendarId_ pEdEventId_ = + EventsDelete + { _edQuotaUser = Nothing + , _edCalendarId = pEdCalendarId_ + , _edPrettyPrint = True + , _edUserIp = Nothing + , _edKey = Nothing + , _edSendNotifications = Nothing + , _edOauthToken = Nothing + , _edEventId = pEdEventId_ + , _edFields = Nothing + , _edAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +edQuotaUser :: Lens' EventsDelete' (Maybe Text) +edQuotaUser + = lens _edQuotaUser (\ s a -> s{_edQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +edCalendarId :: Lens' EventsDelete' Text +edCalendarId + = lens _edCalendarId (\ s a -> s{_edCalendarId = a}) + +-- | Returns response with indentations and line breaks. +edPrettyPrint :: Lens' EventsDelete' Bool +edPrettyPrint + = lens _edPrettyPrint + (\ s a -> s{_edPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +edUserIp :: Lens' EventsDelete' (Maybe Text) +edUserIp = lens _edUserIp (\ s a -> s{_edUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +edKey :: Lens' EventsDelete' (Maybe Text) +edKey = lens _edKey (\ s a -> s{_edKey = a}) + +-- | Whether to send notifications about the deletion of the event. Optional. +-- The default is False. +edSendNotifications :: Lens' EventsDelete' (Maybe Bool) +edSendNotifications + = lens _edSendNotifications + (\ s a -> s{_edSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +edOauthToken :: Lens' EventsDelete' (Maybe Text) +edOauthToken + = lens _edOauthToken (\ s a -> s{_edOauthToken = a}) + +-- | Event identifier. +edEventId :: Lens' EventsDelete' Text +edEventId + = lens _edEventId (\ s a -> s{_edEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +edFields :: Lens' EventsDelete' (Maybe Text) +edFields = lens _edFields (\ s a -> s{_edFields = a}) + +-- | Data format for the response. +edAlt :: Lens' EventsDelete' Text +edAlt = lens _edAlt (\ s a -> s{_edAlt = a}) + +instance GoogleRequest EventsDelete' where + type Rs EventsDelete' = () + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsDelete{..} + = go _edQuotaUser _edCalendarId _edPrettyPrint + _edUserIp + _edKey + _edSendNotifications + _edOauthToken + _edEventId + _edFields + _edAlt + where go + = clientWithRoute (Proxy :: Proxy EventsDeleteAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Get.hs new file mode 100644 index 000000000..144eb5c3f --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Get.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns an event. +-- +-- /See:/ for @CalendarEventsGet@. +module Calendar.Events.Get + ( + -- * REST Resource + EventsGetAPI + + -- * Creating a Request + , eventsGet + , EventsGet + + -- * Request Lenses + , egQuotaUser + , egCalendarId + , egPrettyPrint + , egUserIp + , egMaxAttendees + , egKey + , egTimeZone + , egOauthToken + , egAlwaysIncludeEmail + , egEventId + , egFields + , egAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsGet@ which the +-- 'EventsGet' request conforms to. +type EventsGetAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "timeZone" Text :> + QueryParam "alwaysIncludeEmail" Bool :> + Get '[JSON] Event + +-- | Returns an event. +-- +-- /See:/ 'eventsGet' smart constructor. +data EventsGet = EventsGet + { _egQuotaUser :: !(Maybe Text) + , _egCalendarId :: !Text + , _egPrettyPrint :: !Bool + , _egUserIp :: !(Maybe Text) + , _egMaxAttendees :: !(Maybe Int32) + , _egKey :: !(Maybe Text) + , _egTimeZone :: !(Maybe Text) + , _egOauthToken :: !(Maybe Text) + , _egAlwaysIncludeEmail :: !(Maybe Bool) + , _egEventId :: !Text + , _egFields :: !(Maybe Text) + , _egAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'egQuotaUser' +-- +-- * 'egCalendarId' +-- +-- * 'egPrettyPrint' +-- +-- * 'egUserIp' +-- +-- * 'egMaxAttendees' +-- +-- * 'egKey' +-- +-- * 'egTimeZone' +-- +-- * 'egOauthToken' +-- +-- * 'egAlwaysIncludeEmail' +-- +-- * 'egEventId' +-- +-- * 'egFields' +-- +-- * 'egAlt' +eventsGet + :: Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsGet +eventsGet pEgCalendarId_ pEgEventId_ = + EventsGet + { _egQuotaUser = Nothing + , _egCalendarId = pEgCalendarId_ + , _egPrettyPrint = True + , _egUserIp = Nothing + , _egMaxAttendees = Nothing + , _egKey = Nothing + , _egTimeZone = Nothing + , _egOauthToken = Nothing + , _egAlwaysIncludeEmail = Nothing + , _egEventId = pEgEventId_ + , _egFields = Nothing + , _egAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +egQuotaUser :: Lens' EventsGet' (Maybe Text) +egQuotaUser + = lens _egQuotaUser (\ s a -> s{_egQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +egCalendarId :: Lens' EventsGet' Text +egCalendarId + = lens _egCalendarId (\ s a -> s{_egCalendarId = a}) + +-- | Returns response with indentations and line breaks. +egPrettyPrint :: Lens' EventsGet' Bool +egPrettyPrint + = lens _egPrettyPrint + (\ s a -> s{_egPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +egUserIp :: Lens' EventsGet' (Maybe Text) +egUserIp = lens _egUserIp (\ s a -> s{_egUserIp = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +egMaxAttendees :: Lens' EventsGet' (Maybe Int32) +egMaxAttendees + = lens _egMaxAttendees + (\ s a -> s{_egMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +egKey :: Lens' EventsGet' (Maybe Text) +egKey = lens _egKey (\ s a -> s{_egKey = a}) + +-- | Time zone used in the response. Optional. The default is the time zone +-- of the calendar. +egTimeZone :: Lens' EventsGet' (Maybe Text) +egTimeZone + = lens _egTimeZone (\ s a -> s{_egTimeZone = a}) + +-- | OAuth 2.0 token for the current user. +egOauthToken :: Lens' EventsGet' (Maybe Text) +egOauthToken + = lens _egOauthToken (\ s a -> s{_egOauthToken = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +egAlwaysIncludeEmail :: Lens' EventsGet' (Maybe Bool) +egAlwaysIncludeEmail + = lens _egAlwaysIncludeEmail + (\ s a -> s{_egAlwaysIncludeEmail = a}) + +-- | Event identifier. +egEventId :: Lens' EventsGet' Text +egEventId + = lens _egEventId (\ s a -> s{_egEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +egFields :: Lens' EventsGet' (Maybe Text) +egFields = lens _egFields (\ s a -> s{_egFields = a}) + +-- | Data format for the response. +egAlt :: Lens' EventsGet' Text +egAlt = lens _egAlt (\ s a -> s{_egAlt = a}) + +instance GoogleRequest EventsGet' where + type Rs EventsGet' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsGet{..} + = go _egQuotaUser _egCalendarId _egPrettyPrint + _egUserIp + _egMaxAttendees + _egKey + _egTimeZone + _egOauthToken + _egAlwaysIncludeEmail + _egEventId + _egFields + _egAlt + where go + = clientWithRoute (Proxy :: Proxy EventsGetAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Import.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Import.hs new file mode 100644 index 000000000..7a0e0cabe --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Import.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Import +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Imports an event. This operation is used to add a private copy of an +-- existing event to a calendar. +-- +-- /See:/ for @CalendarEventsImport@. +module Calendar.Events.Import + ( + -- * REST Resource + EventsImportAPI + + -- * Creating a Request + , eventsImport + , EventsImport + + -- * Request Lenses + , eveQuotaUser + , eveCalendarId + , evePrettyPrint + , eveUserIp + , eveKey + , eveOauthToken + , eveSupportsAttachments + , eveFields + , eveAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsImport@ which the +-- 'EventsImport' request conforms to. +type EventsImportAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + "import" :> + QueryParam "supportsAttachments" Bool :> + Post '[JSON] Event + +-- | Imports an event. This operation is used to add a private copy of an +-- existing event to a calendar. +-- +-- /See:/ 'eventsImport' smart constructor. +data EventsImport = EventsImport + { _eveQuotaUser :: !(Maybe Text) + , _eveCalendarId :: !Text + , _evePrettyPrint :: !Bool + , _eveUserIp :: !(Maybe Text) + , _eveKey :: !(Maybe Text) + , _eveOauthToken :: !(Maybe Text) + , _eveSupportsAttachments :: !(Maybe Bool) + , _eveFields :: !(Maybe Text) + , _eveAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsImport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eveQuotaUser' +-- +-- * 'eveCalendarId' +-- +-- * 'evePrettyPrint' +-- +-- * 'eveUserIp' +-- +-- * 'eveKey' +-- +-- * 'eveOauthToken' +-- +-- * 'eveSupportsAttachments' +-- +-- * 'eveFields' +-- +-- * 'eveAlt' +eventsImport + :: Text -- ^ 'calendarId' + -> EventsImport +eventsImport pEveCalendarId_ = + EventsImport + { _eveQuotaUser = Nothing + , _eveCalendarId = pEveCalendarId_ + , _evePrettyPrint = True + , _eveUserIp = Nothing + , _eveKey = Nothing + , _eveOauthToken = Nothing + , _eveSupportsAttachments = Nothing + , _eveFields = Nothing + , _eveAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eveQuotaUser :: Lens' EventsImport' (Maybe Text) +eveQuotaUser + = lens _eveQuotaUser (\ s a -> s{_eveQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +eveCalendarId :: Lens' EventsImport' Text +eveCalendarId + = lens _eveCalendarId + (\ s a -> s{_eveCalendarId = a}) + +-- | Returns response with indentations and line breaks. +evePrettyPrint :: Lens' EventsImport' Bool +evePrettyPrint + = lens _evePrettyPrint + (\ s a -> s{_evePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eveUserIp :: Lens' EventsImport' (Maybe Text) +eveUserIp + = lens _eveUserIp (\ s a -> s{_eveUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eveKey :: Lens' EventsImport' (Maybe Text) +eveKey = lens _eveKey (\ s a -> s{_eveKey = a}) + +-- | OAuth 2.0 token for the current user. +eveOauthToken :: Lens' EventsImport' (Maybe Text) +eveOauthToken + = lens _eveOauthToken + (\ s a -> s{_eveOauthToken = a}) + +-- | Whether API client performing operation supports event attachments. +-- Optional. The default is False. +eveSupportsAttachments :: Lens' EventsImport' (Maybe Bool) +eveSupportsAttachments + = lens _eveSupportsAttachments + (\ s a -> s{_eveSupportsAttachments = a}) + +-- | Selector specifying which fields to include in a partial response. +eveFields :: Lens' EventsImport' (Maybe Text) +eveFields + = lens _eveFields (\ s a -> s{_eveFields = a}) + +-- | Data format for the response. +eveAlt :: Lens' EventsImport' Text +eveAlt = lens _eveAlt (\ s a -> s{_eveAlt = a}) + +instance GoogleRequest EventsImport' where + type Rs EventsImport' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsImport{..} + = go _eveQuotaUser _eveCalendarId _evePrettyPrint + _eveUserIp + _eveKey + _eveOauthToken + _eveSupportsAttachments + _eveFields + _eveAlt + where go + = clientWithRoute (Proxy :: Proxy EventsImportAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Insert.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Insert.hs new file mode 100644 index 000000000..b98180064 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Insert.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an event. +-- +-- /See:/ for @CalendarEventsInsert@. +module Calendar.Events.Insert + ( + -- * REST Resource + EventsInsertAPI + + -- * Creating a Request + , eventsInsert + , EventsInsert + + -- * Request Lenses + , eiQuotaUser + , eiCalendarId + , eiPrettyPrint + , eiUserIp + , eiMaxAttendees + , eiKey + , eiSendNotifications + , eiOauthToken + , eiSupportsAttachments + , eiFields + , eiAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsInsert@ which the +-- 'EventsInsert' request conforms to. +type EventsInsertAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + QueryParam "maxAttendees" Int32 :> + QueryParam "sendNotifications" Bool :> + QueryParam "supportsAttachments" Bool :> + Post '[JSON] Event + +-- | Creates an event. +-- +-- /See:/ 'eventsInsert' smart constructor. +data EventsInsert = EventsInsert + { _eiQuotaUser :: !(Maybe Text) + , _eiCalendarId :: !Text + , _eiPrettyPrint :: !Bool + , _eiUserIp :: !(Maybe Text) + , _eiMaxAttendees :: !(Maybe Int32) + , _eiKey :: !(Maybe Text) + , _eiSendNotifications :: !(Maybe Bool) + , _eiOauthToken :: !(Maybe Text) + , _eiSupportsAttachments :: !(Maybe Bool) + , _eiFields :: !(Maybe Text) + , _eiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eiQuotaUser' +-- +-- * 'eiCalendarId' +-- +-- * 'eiPrettyPrint' +-- +-- * 'eiUserIp' +-- +-- * 'eiMaxAttendees' +-- +-- * 'eiKey' +-- +-- * 'eiSendNotifications' +-- +-- * 'eiOauthToken' +-- +-- * 'eiSupportsAttachments' +-- +-- * 'eiFields' +-- +-- * 'eiAlt' +eventsInsert + :: Text -- ^ 'calendarId' + -> EventsInsert +eventsInsert pEiCalendarId_ = + EventsInsert + { _eiQuotaUser = Nothing + , _eiCalendarId = pEiCalendarId_ + , _eiPrettyPrint = True + , _eiUserIp = Nothing + , _eiMaxAttendees = Nothing + , _eiKey = Nothing + , _eiSendNotifications = Nothing + , _eiOauthToken = Nothing + , _eiSupportsAttachments = Nothing + , _eiFields = Nothing + , _eiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eiQuotaUser :: Lens' EventsInsert' (Maybe Text) +eiQuotaUser + = lens _eiQuotaUser (\ s a -> s{_eiQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +eiCalendarId :: Lens' EventsInsert' Text +eiCalendarId + = lens _eiCalendarId (\ s a -> s{_eiCalendarId = a}) + +-- | Returns response with indentations and line breaks. +eiPrettyPrint :: Lens' EventsInsert' Bool +eiPrettyPrint + = lens _eiPrettyPrint + (\ s a -> s{_eiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eiUserIp :: Lens' EventsInsert' (Maybe Text) +eiUserIp = lens _eiUserIp (\ s a -> s{_eiUserIp = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +eiMaxAttendees :: Lens' EventsInsert' (Maybe Int32) +eiMaxAttendees + = lens _eiMaxAttendees + (\ s a -> s{_eiMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eiKey :: Lens' EventsInsert' (Maybe Text) +eiKey = lens _eiKey (\ s a -> s{_eiKey = a}) + +-- | Whether to send notifications about the creation of the new event. +-- Optional. The default is False. +eiSendNotifications :: Lens' EventsInsert' (Maybe Bool) +eiSendNotifications + = lens _eiSendNotifications + (\ s a -> s{_eiSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +eiOauthToken :: Lens' EventsInsert' (Maybe Text) +eiOauthToken + = lens _eiOauthToken (\ s a -> s{_eiOauthToken = a}) + +-- | Whether API client performing operation supports event attachments. +-- Optional. The default is False. +eiSupportsAttachments :: Lens' EventsInsert' (Maybe Bool) +eiSupportsAttachments + = lens _eiSupportsAttachments + (\ s a -> s{_eiSupportsAttachments = a}) + +-- | Selector specifying which fields to include in a partial response. +eiFields :: Lens' EventsInsert' (Maybe Text) +eiFields = lens _eiFields (\ s a -> s{_eiFields = a}) + +-- | Data format for the response. +eiAlt :: Lens' EventsInsert' Text +eiAlt = lens _eiAlt (\ s a -> s{_eiAlt = a}) + +instance GoogleRequest EventsInsert' where + type Rs EventsInsert' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsInsert{..} + = go _eiQuotaUser _eiCalendarId _eiPrettyPrint + _eiUserIp + _eiMaxAttendees + _eiKey + _eiSendNotifications + _eiOauthToken + _eiSupportsAttachments + _eiFields + _eiAlt + where go + = clientWithRoute (Proxy :: Proxy EventsInsertAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Instances.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Instances.hs new file mode 100644 index 000000000..c82074a2c --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Instances.hs @@ -0,0 +1,294 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Instances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns instances of the specified recurring event. +-- +-- /See:/ for @CalendarEventsInstances@. +module Calendar.Events.Instances + ( + -- * REST Resource + EventsInstancesAPI + + -- * Creating a Request + , eventsInstances + , EventsInstances + + -- * Request Lenses + , eQuotaUser + , eCalendarId + , ePrettyPrint + , eTimeMin + , eUserIp + , eShowDeleted + , eOriginalStart + , eMaxAttendees + , eKey + , ePageToken + , eTimeZone + , eOauthToken + , eMaxResults + , eAlwaysIncludeEmail + , eTimeMax + , eEventId + , eFields + , eAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsInstances@ which the +-- 'EventsInstances' request conforms to. +type EventsInstancesAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + "instances" :> + QueryParam "timeMin" UTCTime :> + QueryParam "showDeleted" Bool :> + QueryParam "originalStart" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "timeZone" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "alwaysIncludeEmail" Bool :> + QueryParam "timeMax" UTCTime :> + Get '[JSON] Events + +-- | Returns instances of the specified recurring event. +-- +-- /See:/ 'eventsInstances' smart constructor. +data EventsInstances = EventsInstances + { _eQuotaUser :: !(Maybe Text) + , _eCalendarId :: !Text + , _ePrettyPrint :: !Bool + , _eTimeMin :: !(Maybe UTCTime) + , _eUserIp :: !(Maybe Text) + , _eShowDeleted :: !(Maybe Bool) + , _eOriginalStart :: !(Maybe Text) + , _eMaxAttendees :: !(Maybe Int32) + , _eKey :: !(Maybe Text) + , _ePageToken :: !(Maybe Text) + , _eTimeZone :: !(Maybe Text) + , _eOauthToken :: !(Maybe Text) + , _eMaxResults :: !(Maybe Int32) + , _eAlwaysIncludeEmail :: !(Maybe Bool) + , _eTimeMax :: !(Maybe UTCTime) + , _eEventId :: !Text + , _eFields :: !(Maybe Text) + , _eAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eQuotaUser' +-- +-- * 'eCalendarId' +-- +-- * 'ePrettyPrint' +-- +-- * 'eTimeMin' +-- +-- * 'eUserIp' +-- +-- * 'eShowDeleted' +-- +-- * 'eOriginalStart' +-- +-- * 'eMaxAttendees' +-- +-- * 'eKey' +-- +-- * 'ePageToken' +-- +-- * 'eTimeZone' +-- +-- * 'eOauthToken' +-- +-- * 'eMaxResults' +-- +-- * 'eAlwaysIncludeEmail' +-- +-- * 'eTimeMax' +-- +-- * 'eEventId' +-- +-- * 'eFields' +-- +-- * 'eAlt' +eventsInstances + :: Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsInstances +eventsInstances pECalendarId_ pEEventId_ = + EventsInstances + { _eQuotaUser = Nothing + , _eCalendarId = pECalendarId_ + , _ePrettyPrint = True + , _eTimeMin = Nothing + , _eUserIp = Nothing + , _eShowDeleted = Nothing + , _eOriginalStart = Nothing + , _eMaxAttendees = Nothing + , _eKey = Nothing + , _ePageToken = Nothing + , _eTimeZone = Nothing + , _eOauthToken = Nothing + , _eMaxResults = Nothing + , _eAlwaysIncludeEmail = Nothing + , _eTimeMax = Nothing + , _eEventId = pEEventId_ + , _eFields = Nothing + , _eAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eQuotaUser :: Lens' EventsInstances' (Maybe Text) +eQuotaUser + = lens _eQuotaUser (\ s a -> s{_eQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +eCalendarId :: Lens' EventsInstances' Text +eCalendarId + = lens _eCalendarId (\ s a -> s{_eCalendarId = a}) + +-- | Returns response with indentations and line breaks. +ePrettyPrint :: Lens' EventsInstances' Bool +ePrettyPrint + = lens _ePrettyPrint (\ s a -> s{_ePrettyPrint = a}) + +-- | Lower bound (inclusive) for an event\'s end time to filter by. Optional. +-- The default is not to filter by end time. Must be an RFC3339 timestamp +-- with mandatory time zone offset. +eTimeMin :: Lens' EventsInstances' (Maybe UTCTime) +eTimeMin = lens _eTimeMin (\ s a -> s{_eTimeMin = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eUserIp :: Lens' EventsInstances' (Maybe Text) +eUserIp = lens _eUserIp (\ s a -> s{_eUserIp = a}) + +-- | Whether to include deleted events (with status equals \"cancelled\") in +-- the result. Cancelled instances of recurring events will still be +-- included if singleEvents is False. Optional. The default is False. +eShowDeleted :: Lens' EventsInstances' (Maybe Bool) +eShowDeleted + = lens _eShowDeleted (\ s a -> s{_eShowDeleted = a}) + +-- | The original start time of the instance in the result. Optional. +eOriginalStart :: Lens' EventsInstances' (Maybe Text) +eOriginalStart + = lens _eOriginalStart + (\ s a -> s{_eOriginalStart = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +eMaxAttendees :: Lens' EventsInstances' (Maybe Int32) +eMaxAttendees + = lens _eMaxAttendees + (\ s a -> s{_eMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eKey :: Lens' EventsInstances' (Maybe Text) +eKey = lens _eKey (\ s a -> s{_eKey = a}) + +-- | Token specifying which result page to return. Optional. +ePageToken :: Lens' EventsInstances' (Maybe Text) +ePageToken + = lens _ePageToken (\ s a -> s{_ePageToken = a}) + +-- | Time zone used in the response. Optional. The default is the time zone +-- of the calendar. +eTimeZone :: Lens' EventsInstances' (Maybe Text) +eTimeZone + = lens _eTimeZone (\ s a -> s{_eTimeZone = a}) + +-- | OAuth 2.0 token for the current user. +eOauthToken :: Lens' EventsInstances' (Maybe Text) +eOauthToken + = lens _eOauthToken (\ s a -> s{_eOauthToken = a}) + +-- | Maximum number of events returned on one result page. By default the +-- value is 250 events. The page size can never be larger than 2500 events. +-- Optional. +eMaxResults :: Lens' EventsInstances' (Maybe Int32) +eMaxResults + = lens _eMaxResults (\ s a -> s{_eMaxResults = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +eAlwaysIncludeEmail :: Lens' EventsInstances' (Maybe Bool) +eAlwaysIncludeEmail + = lens _eAlwaysIncludeEmail + (\ s a -> s{_eAlwaysIncludeEmail = a}) + +-- | Upper bound (exclusive) for an event\'s start time to filter by. +-- Optional. The default is not to filter by start time. Must be an RFC3339 +-- timestamp with mandatory time zone offset. +eTimeMax :: Lens' EventsInstances' (Maybe UTCTime) +eTimeMax = lens _eTimeMax (\ s a -> s{_eTimeMax = a}) + +-- | Recurring event identifier. +eEventId :: Lens' EventsInstances' Text +eEventId = lens _eEventId (\ s a -> s{_eEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +eFields :: Lens' EventsInstances' (Maybe Text) +eFields = lens _eFields (\ s a -> s{_eFields = a}) + +-- | Data format for the response. +eAlt :: Lens' EventsInstances' Text +eAlt = lens _eAlt (\ s a -> s{_eAlt = a}) + +instance GoogleRequest EventsInstances' where + type Rs EventsInstances' = Events + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsInstances{..} + = go _eQuotaUser _eCalendarId _ePrettyPrint _eTimeMin + _eUserIp + _eShowDeleted + _eOriginalStart + _eMaxAttendees + _eKey + _ePageToken + _eTimeZone + _eOauthToken + _eMaxResults + _eAlwaysIncludeEmail + _eTimeMax + _eEventId + _eFields + _eAlt + where go + = clientWithRoute (Proxy :: Proxy EventsInstancesAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/List.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/List.hs new file mode 100644 index 000000000..1b19021ee --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/List.hs @@ -0,0 +1,413 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns events on the specified calendar. +-- +-- /See:/ for @CalendarEventsList@. +module Calendar.Events.List + ( + -- * REST Resource + EventsListAPI + + -- * Creating a Request + , eventsList + , EventsList + + -- * Request Lenses + , elSyncToken + , elQuotaUser + , elCalendarId + , elPrettyPrint + , elTimeMin + , elOrderBy + , elSingleEvents + , elPrivateExtendedProperty + , elUserIp + , elShowDeleted + , elQ + , elSharedExtendedProperty + , elMaxAttendees + , elKey + , elICalUID + , elUpdatedMin + , elPageToken + , elTimeZone + , elOauthToken + , elShowHiddenInvitations + , elMaxResults + , elAlwaysIncludeEmail + , elTimeMax + , elFields + , elAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsList@ which the +-- 'EventsList' request conforms to. +type EventsListAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + QueryParam "syncToken" Text :> + QueryParam "timeMin" UTCTime :> + QueryParam "orderBy" Text :> + QueryParam "singleEvents" Bool :> + QueryParams "privateExtendedProperty" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "q" Text :> + QueryParams "sharedExtendedProperty" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "iCalUID" Text :> + QueryParam "updatedMin" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "timeZone" Text :> + QueryParam "showHiddenInvitations" Bool :> + QueryParam "maxResults" Int32 :> + QueryParam "alwaysIncludeEmail" Bool :> + QueryParam "timeMax" UTCTime :> + Get '[JSON] Events + +-- | Returns events on the specified calendar. +-- +-- /See:/ 'eventsList' smart constructor. +data EventsList = EventsList + { _elSyncToken :: !(Maybe Text) + , _elQuotaUser :: !(Maybe Text) + , _elCalendarId :: !Text + , _elPrettyPrint :: !Bool + , _elTimeMin :: !(Maybe UTCTime) + , _elOrderBy :: !(Maybe Text) + , _elSingleEvents :: !(Maybe Bool) + , _elPrivateExtendedProperty :: !(Maybe Text) + , _elUserIp :: !(Maybe Text) + , _elShowDeleted :: !(Maybe Bool) + , _elQ :: !(Maybe Text) + , _elSharedExtendedProperty :: !(Maybe Text) + , _elMaxAttendees :: !(Maybe Int32) + , _elKey :: !(Maybe Text) + , _elICalUID :: !(Maybe Text) + , _elUpdatedMin :: !(Maybe UTCTime) + , _elPageToken :: !(Maybe Text) + , _elTimeZone :: !(Maybe Text) + , _elOauthToken :: !(Maybe Text) + , _elShowHiddenInvitations :: !(Maybe Bool) + , _elMaxResults :: !(Maybe Int32) + , _elAlwaysIncludeEmail :: !(Maybe Bool) + , _elTimeMax :: !(Maybe UTCTime) + , _elFields :: !(Maybe Text) + , _elAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elSyncToken' +-- +-- * 'elQuotaUser' +-- +-- * 'elCalendarId' +-- +-- * 'elPrettyPrint' +-- +-- * 'elTimeMin' +-- +-- * 'elOrderBy' +-- +-- * 'elSingleEvents' +-- +-- * 'elPrivateExtendedProperty' +-- +-- * 'elUserIp' +-- +-- * 'elShowDeleted' +-- +-- * 'elQ' +-- +-- * 'elSharedExtendedProperty' +-- +-- * 'elMaxAttendees' +-- +-- * 'elKey' +-- +-- * 'elICalUID' +-- +-- * 'elUpdatedMin' +-- +-- * 'elPageToken' +-- +-- * 'elTimeZone' +-- +-- * 'elOauthToken' +-- +-- * 'elShowHiddenInvitations' +-- +-- * 'elMaxResults' +-- +-- * 'elAlwaysIncludeEmail' +-- +-- * 'elTimeMax' +-- +-- * 'elFields' +-- +-- * 'elAlt' +eventsList + :: Text -- ^ 'calendarId' + -> EventsList +eventsList pElCalendarId_ = + EventsList + { _elSyncToken = Nothing + , _elQuotaUser = Nothing + , _elCalendarId = pElCalendarId_ + , _elPrettyPrint = True + , _elTimeMin = Nothing + , _elOrderBy = Nothing + , _elSingleEvents = Nothing + , _elPrivateExtendedProperty = Nothing + , _elUserIp = Nothing + , _elShowDeleted = Nothing + , _elQ = Nothing + , _elSharedExtendedProperty = Nothing + , _elMaxAttendees = Nothing + , _elKey = Nothing + , _elICalUID = Nothing + , _elUpdatedMin = Nothing + , _elPageToken = Nothing + , _elTimeZone = Nothing + , _elOauthToken = Nothing + , _elShowHiddenInvitations = Nothing + , _elMaxResults = Nothing + , _elAlwaysIncludeEmail = Nothing + , _elTimeMax = Nothing + , _elFields = Nothing + , _elAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. All events +-- deleted since the previous list request will always be in the result set +-- and it is not allowed to set showDeleted to False. There are several +-- query parameters that cannot be specified together with nextSyncToken to +-- ensure consistency of the client state. These are: - iCalUID - orderBy - +-- privateExtendedProperty - q - sharedExtendedProperty - timeMin - timeMax +-- - updatedMin If the syncToken expires, the server will respond with a +-- 410 GONE response code and the client should clear its storage and +-- perform a full synchronization without any syncToken. Learn more about +-- incremental synchronization. Optional. The default is to return all +-- entries. +elSyncToken :: Lens' EventsList' (Maybe Text) +elSyncToken + = lens _elSyncToken (\ s a -> s{_elSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elQuotaUser :: Lens' EventsList' (Maybe Text) +elQuotaUser + = lens _elQuotaUser (\ s a -> s{_elQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +elCalendarId :: Lens' EventsList' Text +elCalendarId + = lens _elCalendarId (\ s a -> s{_elCalendarId = a}) + +-- | Returns response with indentations and line breaks. +elPrettyPrint :: Lens' EventsList' Bool +elPrettyPrint + = lens _elPrettyPrint + (\ s a -> s{_elPrettyPrint = a}) + +-- | Lower bound (inclusive) for an event\'s end time to filter by. Optional. +-- The default is not to filter by end time. Must be an RFC3339 timestamp +-- with mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, +-- 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. +elTimeMin :: Lens' EventsList' (Maybe UTCTime) +elTimeMin + = lens _elTimeMin (\ s a -> s{_elTimeMin = a}) + +-- | The order of the events returned in the result. Optional. The default is +-- an unspecified, stable order. +elOrderBy :: Lens' EventsList' (Maybe Text) +elOrderBy + = lens _elOrderBy (\ s a -> s{_elOrderBy = a}) + +-- | Whether to expand recurring events into instances and only return single +-- one-off events and instances of recurring events, but not the underlying +-- recurring events themselves. Optional. The default is False. +elSingleEvents :: Lens' EventsList' (Maybe Bool) +elSingleEvents + = lens _elSingleEvents + (\ s a -> s{_elSingleEvents = a}) + +-- | Extended properties constraint specified as propertyName=value. Matches +-- only private properties. This parameter might be repeated multiple times +-- to return events that match all given constraints. +elPrivateExtendedProperty :: Lens' EventsList' (Maybe Text) +elPrivateExtendedProperty + = lens _elPrivateExtendedProperty + (\ s a -> s{_elPrivateExtendedProperty = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elUserIp :: Lens' EventsList' (Maybe Text) +elUserIp = lens _elUserIp (\ s a -> s{_elUserIp = a}) + +-- | Whether to include deleted events (with status equals \"cancelled\") in +-- the result. Cancelled instances of recurring events (but not the +-- underlying recurring event) will still be included if showDeleted and +-- singleEvents are both False. If showDeleted and singleEvents are both +-- True, only single instances of deleted events (but not the underlying +-- recurring events) are returned. Optional. The default is False. +elShowDeleted :: Lens' EventsList' (Maybe Bool) +elShowDeleted + = lens _elShowDeleted + (\ s a -> s{_elShowDeleted = a}) + +-- | Free text search terms to find events that match these terms in any +-- field, except for extended properties. Optional. +elQ :: Lens' EventsList' (Maybe Text) +elQ = lens _elQ (\ s a -> s{_elQ = a}) + +-- | Extended properties constraint specified as propertyName=value. Matches +-- only shared properties. This parameter might be repeated multiple times +-- to return events that match all given constraints. +elSharedExtendedProperty :: Lens' EventsList' (Maybe Text) +elSharedExtendedProperty + = lens _elSharedExtendedProperty + (\ s a -> s{_elSharedExtendedProperty = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +elMaxAttendees :: Lens' EventsList' (Maybe Int32) +elMaxAttendees + = lens _elMaxAttendees + (\ s a -> s{_elMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elKey :: Lens' EventsList' (Maybe Text) +elKey = lens _elKey (\ s a -> s{_elKey = a}) + +-- | Specifies event ID in the iCalendar format to be included in the +-- response. Optional. +elICalUID :: Lens' EventsList' (Maybe Text) +elICalUID + = lens _elICalUID (\ s a -> s{_elICalUID = a}) + +-- | Lower bound for an event\'s last modification time (as a RFC3339 +-- timestamp) to filter by. When specified, entries deleted since this time +-- will always be included regardless of showDeleted. Optional. The default +-- is not to filter by last modification time. +elUpdatedMin :: Lens' EventsList' (Maybe UTCTime) +elUpdatedMin + = lens _elUpdatedMin (\ s a -> s{_elUpdatedMin = a}) + +-- | Token specifying which result page to return. Optional. +elPageToken :: Lens' EventsList' (Maybe Text) +elPageToken + = lens _elPageToken (\ s a -> s{_elPageToken = a}) + +-- | Time zone used in the response. Optional. The default is the time zone +-- of the calendar. +elTimeZone :: Lens' EventsList' (Maybe Text) +elTimeZone + = lens _elTimeZone (\ s a -> s{_elTimeZone = a}) + +-- | OAuth 2.0 token for the current user. +elOauthToken :: Lens' EventsList' (Maybe Text) +elOauthToken + = lens _elOauthToken (\ s a -> s{_elOauthToken = a}) + +-- | Whether to include hidden invitations in the result. Optional. The +-- default is False. +elShowHiddenInvitations :: Lens' EventsList' (Maybe Bool) +elShowHiddenInvitations + = lens _elShowHiddenInvitations + (\ s a -> s{_elShowHiddenInvitations = a}) + +-- | Maximum number of events returned on one result page. By default the +-- value is 250 events. The page size can never be larger than 2500 events. +-- Optional. +elMaxResults :: Lens' EventsList' (Maybe Int32) +elMaxResults + = lens _elMaxResults (\ s a -> s{_elMaxResults = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +elAlwaysIncludeEmail :: Lens' EventsList' (Maybe Bool) +elAlwaysIncludeEmail + = lens _elAlwaysIncludeEmail + (\ s a -> s{_elAlwaysIncludeEmail = a}) + +-- | Upper bound (exclusive) for an event\'s start time to filter by. +-- Optional. The default is not to filter by start time. Must be an RFC3339 +-- timestamp with mandatory time zone offset, e.g., +-- 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be +-- provided but will be ignored. +elTimeMax :: Lens' EventsList' (Maybe UTCTime) +elTimeMax + = lens _elTimeMax (\ s a -> s{_elTimeMax = a}) + +-- | Selector specifying which fields to include in a partial response. +elFields :: Lens' EventsList' (Maybe Text) +elFields = lens _elFields (\ s a -> s{_elFields = a}) + +-- | Data format for the response. +elAlt :: Lens' EventsList' Text +elAlt = lens _elAlt (\ s a -> s{_elAlt = a}) + +instance GoogleRequest EventsList' where + type Rs EventsList' = Events + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsList{..} + = go _elSyncToken _elQuotaUser _elCalendarId + _elPrettyPrint + _elTimeMin + _elOrderBy + _elSingleEvents + _elPrivateExtendedProperty + _elUserIp + _elShowDeleted + _elQ + _elSharedExtendedProperty + _elMaxAttendees + _elKey + _elICalUID + _elUpdatedMin + _elPageToken + _elTimeZone + _elOauthToken + _elShowHiddenInvitations + _elMaxResults + _elAlwaysIncludeEmail + _elTimeMax + _elFields + _elAlt + where go + = clientWithRoute (Proxy :: Proxy EventsListAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Move.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Move.hs new file mode 100644 index 000000000..942091c14 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Move.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Move +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves an event to another calendar, i.e. changes an event\'s organizer. +-- +-- /See:/ for @CalendarEventsMove@. +module Calendar.Events.Move + ( + -- * REST Resource + EventsMoveAPI + + -- * Creating a Request + , eventsMove + , EventsMove + + -- * Request Lenses + , emDestination + , emQuotaUser + , emCalendarId + , emPrettyPrint + , emUserIp + , emKey + , emSendNotifications + , emOauthToken + , emEventId + , emFields + , emAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsMove@ which the +-- 'EventsMove' request conforms to. +type EventsMoveAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + "move" :> + QueryParam "destination" Text :> + QueryParam "sendNotifications" Bool :> + Post '[JSON] Event + +-- | Moves an event to another calendar, i.e. changes an event\'s organizer. +-- +-- /See:/ 'eventsMove' smart constructor. +data EventsMove = EventsMove + { _emDestination :: !Text + , _emQuotaUser :: !(Maybe Text) + , _emCalendarId :: !Text + , _emPrettyPrint :: !Bool + , _emUserIp :: !(Maybe Text) + , _emKey :: !(Maybe Text) + , _emSendNotifications :: !(Maybe Bool) + , _emOauthToken :: !(Maybe Text) + , _emEventId :: !Text + , _emFields :: !(Maybe Text) + , _emAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsMove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'emDestination' +-- +-- * 'emQuotaUser' +-- +-- * 'emCalendarId' +-- +-- * 'emPrettyPrint' +-- +-- * 'emUserIp' +-- +-- * 'emKey' +-- +-- * 'emSendNotifications' +-- +-- * 'emOauthToken' +-- +-- * 'emEventId' +-- +-- * 'emFields' +-- +-- * 'emAlt' +eventsMove + :: Text -- ^ 'destination' + -> Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsMove +eventsMove pEmDestination_ pEmCalendarId_ pEmEventId_ = + EventsMove + { _emDestination = pEmDestination_ + , _emQuotaUser = Nothing + , _emCalendarId = pEmCalendarId_ + , _emPrettyPrint = True + , _emUserIp = Nothing + , _emKey = Nothing + , _emSendNotifications = Nothing + , _emOauthToken = Nothing + , _emEventId = pEmEventId_ + , _emFields = Nothing + , _emAlt = "json" + } + +-- | Calendar identifier of the target calendar where the event is to be +-- moved to. +emDestination :: Lens' EventsMove' Text +emDestination + = lens _emDestination + (\ s a -> s{_emDestination = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +emQuotaUser :: Lens' EventsMove' (Maybe Text) +emQuotaUser + = lens _emQuotaUser (\ s a -> s{_emQuotaUser = a}) + +-- | Calendar identifier of the source calendar where the event currently is +-- on. +emCalendarId :: Lens' EventsMove' Text +emCalendarId + = lens _emCalendarId (\ s a -> s{_emCalendarId = a}) + +-- | Returns response with indentations and line breaks. +emPrettyPrint :: Lens' EventsMove' Bool +emPrettyPrint + = lens _emPrettyPrint + (\ s a -> s{_emPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +emUserIp :: Lens' EventsMove' (Maybe Text) +emUserIp = lens _emUserIp (\ s a -> s{_emUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +emKey :: Lens' EventsMove' (Maybe Text) +emKey = lens _emKey (\ s a -> s{_emKey = a}) + +-- | Whether to send notifications about the change of the event\'s +-- organizer. Optional. The default is False. +emSendNotifications :: Lens' EventsMove' (Maybe Bool) +emSendNotifications + = lens _emSendNotifications + (\ s a -> s{_emSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +emOauthToken :: Lens' EventsMove' (Maybe Text) +emOauthToken + = lens _emOauthToken (\ s a -> s{_emOauthToken = a}) + +-- | Event identifier. +emEventId :: Lens' EventsMove' Text +emEventId + = lens _emEventId (\ s a -> s{_emEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +emFields :: Lens' EventsMove' (Maybe Text) +emFields = lens _emFields (\ s a -> s{_emFields = a}) + +-- | Data format for the response. +emAlt :: Lens' EventsMove' Text +emAlt = lens _emAlt (\ s a -> s{_emAlt = a}) + +instance GoogleRequest EventsMove' where + type Rs EventsMove' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsMove{..} + = go (Just _emDestination) _emQuotaUser _emCalendarId + _emPrettyPrint + _emUserIp + _emKey + _emSendNotifications + _emOauthToken + _emEventId + _emFields + _emAlt + where go + = clientWithRoute (Proxy :: Proxy EventsMoveAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Patch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Patch.hs new file mode 100644 index 000000000..30215c6e9 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Patch.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an event. This method supports patch semantics. +-- +-- /See:/ for @CalendarEventsPatch@. +module Calendar.Events.Patch + ( + -- * REST Resource + EventsPatchAPI + + -- * Creating a Request + , eventsPatch + , EventsPatch + + -- * Request Lenses + , epQuotaUser + , epCalendarId + , epPrettyPrint + , epUserIp + , epMaxAttendees + , epKey + , epSendNotifications + , epOauthToken + , epSupportsAttachments + , epAlwaysIncludeEmail + , epEventId + , epFields + , epAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsPatch@ which the +-- 'EventsPatch' request conforms to. +type EventsPatchAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "sendNotifications" Bool :> + QueryParam "supportsAttachments" Bool :> + QueryParam "alwaysIncludeEmail" Bool :> + Patch '[JSON] Event + +-- | Updates an event. This method supports patch semantics. +-- +-- /See:/ 'eventsPatch' smart constructor. +data EventsPatch = EventsPatch + { _epQuotaUser :: !(Maybe Text) + , _epCalendarId :: !Text + , _epPrettyPrint :: !Bool + , _epUserIp :: !(Maybe Text) + , _epMaxAttendees :: !(Maybe Int32) + , _epKey :: !(Maybe Text) + , _epSendNotifications :: !(Maybe Bool) + , _epOauthToken :: !(Maybe Text) + , _epSupportsAttachments :: !(Maybe Bool) + , _epAlwaysIncludeEmail :: !(Maybe Bool) + , _epEventId :: !Text + , _epFields :: !(Maybe Text) + , _epAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'epQuotaUser' +-- +-- * 'epCalendarId' +-- +-- * 'epPrettyPrint' +-- +-- * 'epUserIp' +-- +-- * 'epMaxAttendees' +-- +-- * 'epKey' +-- +-- * 'epSendNotifications' +-- +-- * 'epOauthToken' +-- +-- * 'epSupportsAttachments' +-- +-- * 'epAlwaysIncludeEmail' +-- +-- * 'epEventId' +-- +-- * 'epFields' +-- +-- * 'epAlt' +eventsPatch + :: Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsPatch +eventsPatch pEpCalendarId_ pEpEventId_ = + EventsPatch + { _epQuotaUser = Nothing + , _epCalendarId = pEpCalendarId_ + , _epPrettyPrint = True + , _epUserIp = Nothing + , _epMaxAttendees = Nothing + , _epKey = Nothing + , _epSendNotifications = Nothing + , _epOauthToken = Nothing + , _epSupportsAttachments = Nothing + , _epAlwaysIncludeEmail = Nothing + , _epEventId = pEpEventId_ + , _epFields = Nothing + , _epAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +epQuotaUser :: Lens' EventsPatch' (Maybe Text) +epQuotaUser + = lens _epQuotaUser (\ s a -> s{_epQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +epCalendarId :: Lens' EventsPatch' Text +epCalendarId + = lens _epCalendarId (\ s a -> s{_epCalendarId = a}) + +-- | Returns response with indentations and line breaks. +epPrettyPrint :: Lens' EventsPatch' Bool +epPrettyPrint + = lens _epPrettyPrint + (\ s a -> s{_epPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +epUserIp :: Lens' EventsPatch' (Maybe Text) +epUserIp = lens _epUserIp (\ s a -> s{_epUserIp = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +epMaxAttendees :: Lens' EventsPatch' (Maybe Int32) +epMaxAttendees + = lens _epMaxAttendees + (\ s a -> s{_epMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +epKey :: Lens' EventsPatch' (Maybe Text) +epKey = lens _epKey (\ s a -> s{_epKey = a}) + +-- | Whether to send notifications about the event update (e.g. attendee\'s +-- responses, title changes, etc.). Optional. The default is False. +epSendNotifications :: Lens' EventsPatch' (Maybe Bool) +epSendNotifications + = lens _epSendNotifications + (\ s a -> s{_epSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +epOauthToken :: Lens' EventsPatch' (Maybe Text) +epOauthToken + = lens _epOauthToken (\ s a -> s{_epOauthToken = a}) + +-- | Whether API client performing operation supports event attachments. +-- Optional. The default is False. +epSupportsAttachments :: Lens' EventsPatch' (Maybe Bool) +epSupportsAttachments + = lens _epSupportsAttachments + (\ s a -> s{_epSupportsAttachments = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +epAlwaysIncludeEmail :: Lens' EventsPatch' (Maybe Bool) +epAlwaysIncludeEmail + = lens _epAlwaysIncludeEmail + (\ s a -> s{_epAlwaysIncludeEmail = a}) + +-- | Event identifier. +epEventId :: Lens' EventsPatch' Text +epEventId + = lens _epEventId (\ s a -> s{_epEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +epFields :: Lens' EventsPatch' (Maybe Text) +epFields = lens _epFields (\ s a -> s{_epFields = a}) + +-- | Data format for the response. +epAlt :: Lens' EventsPatch' Text +epAlt = lens _epAlt (\ s a -> s{_epAlt = a}) + +instance GoogleRequest EventsPatch' where + type Rs EventsPatch' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsPatch{..} + = go _epQuotaUser _epCalendarId _epPrettyPrint + _epUserIp + _epMaxAttendees + _epKey + _epSendNotifications + _epOauthToken + _epSupportsAttachments + _epAlwaysIncludeEmail + _epEventId + _epFields + _epAlt + where go + = clientWithRoute (Proxy :: Proxy EventsPatchAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/QuickAdd.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/QuickAdd.hs new file mode 100644 index 000000000..5a778e8a3 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/QuickAdd.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.QuickAdd +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an event based on a simple text string. +-- +-- /See:/ for @CalendarEventsQuickAdd@. +module Calendar.Events.QuickAdd + ( + -- * REST Resource + EventsQuickAddAPI + + -- * Creating a Request + , eventsQuickAdd + , EventsQuickAdd + + -- * Request Lenses + , eqaQuotaUser + , eqaCalendarId + , eqaPrettyPrint + , eqaText + , eqaUserIp + , eqaKey + , eqaSendNotifications + , eqaOauthToken + , eqaFields + , eqaAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsQuickAdd@ which the +-- 'EventsQuickAdd' request conforms to. +type EventsQuickAddAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + "quickAdd" :> + QueryParam "text" Text :> + QueryParam "sendNotifications" Bool :> + Post '[JSON] Event + +-- | Creates an event based on a simple text string. +-- +-- /See:/ 'eventsQuickAdd' smart constructor. +data EventsQuickAdd = EventsQuickAdd + { _eqaQuotaUser :: !(Maybe Text) + , _eqaCalendarId :: !Text + , _eqaPrettyPrint :: !Bool + , _eqaText :: !Text + , _eqaUserIp :: !(Maybe Text) + , _eqaKey :: !(Maybe Text) + , _eqaSendNotifications :: !(Maybe Bool) + , _eqaOauthToken :: !(Maybe Text) + , _eqaFields :: !(Maybe Text) + , _eqaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsQuickAdd'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eqaQuotaUser' +-- +-- * 'eqaCalendarId' +-- +-- * 'eqaPrettyPrint' +-- +-- * 'eqaText' +-- +-- * 'eqaUserIp' +-- +-- * 'eqaKey' +-- +-- * 'eqaSendNotifications' +-- +-- * 'eqaOauthToken' +-- +-- * 'eqaFields' +-- +-- * 'eqaAlt' +eventsQuickAdd + :: Text -- ^ 'calendarId' + -> Text -- ^ 'text' + -> EventsQuickAdd +eventsQuickAdd pEqaCalendarId_ pEqaText_ = + EventsQuickAdd + { _eqaQuotaUser = Nothing + , _eqaCalendarId = pEqaCalendarId_ + , _eqaPrettyPrint = True + , _eqaText = pEqaText_ + , _eqaUserIp = Nothing + , _eqaKey = Nothing + , _eqaSendNotifications = Nothing + , _eqaOauthToken = Nothing + , _eqaFields = Nothing + , _eqaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eqaQuotaUser :: Lens' EventsQuickAdd' (Maybe Text) +eqaQuotaUser + = lens _eqaQuotaUser (\ s a -> s{_eqaQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +eqaCalendarId :: Lens' EventsQuickAdd' Text +eqaCalendarId + = lens _eqaCalendarId + (\ s a -> s{_eqaCalendarId = a}) + +-- | Returns response with indentations and line breaks. +eqaPrettyPrint :: Lens' EventsQuickAdd' Bool +eqaPrettyPrint + = lens _eqaPrettyPrint + (\ s a -> s{_eqaPrettyPrint = a}) + +-- | The text describing the event to be created. +eqaText :: Lens' EventsQuickAdd' Text +eqaText = lens _eqaText (\ s a -> s{_eqaText = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eqaUserIp :: Lens' EventsQuickAdd' (Maybe Text) +eqaUserIp + = lens _eqaUserIp (\ s a -> s{_eqaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eqaKey :: Lens' EventsQuickAdd' (Maybe Text) +eqaKey = lens _eqaKey (\ s a -> s{_eqaKey = a}) + +-- | Whether to send notifications about the creation of the event. Optional. +-- The default is False. +eqaSendNotifications :: Lens' EventsQuickAdd' (Maybe Bool) +eqaSendNotifications + = lens _eqaSendNotifications + (\ s a -> s{_eqaSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +eqaOauthToken :: Lens' EventsQuickAdd' (Maybe Text) +eqaOauthToken + = lens _eqaOauthToken + (\ s a -> s{_eqaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eqaFields :: Lens' EventsQuickAdd' (Maybe Text) +eqaFields + = lens _eqaFields (\ s a -> s{_eqaFields = a}) + +-- | Data format for the response. +eqaAlt :: Lens' EventsQuickAdd' Text +eqaAlt = lens _eqaAlt (\ s a -> s{_eqaAlt = a}) + +instance GoogleRequest EventsQuickAdd' where + type Rs EventsQuickAdd' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsQuickAdd{..} + = go _eqaQuotaUser _eqaCalendarId _eqaPrettyPrint + (Just _eqaText) + _eqaUserIp + _eqaKey + _eqaSendNotifications + _eqaOauthToken + _eqaFields + _eqaAlt + where go + = clientWithRoute (Proxy :: Proxy EventsQuickAddAPI) + r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Update.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Update.hs new file mode 100644 index 000000000..50783b011 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Update.hs @@ -0,0 +1,231 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an event. +-- +-- /See:/ for @CalendarEventsUpdate@. +module Calendar.Events.Update + ( + -- * REST Resource + EventsUpdateAPI + + -- * Creating a Request + , eventsUpdate + , EventsUpdate + + -- * Request Lenses + , euQuotaUser + , euCalendarId + , euPrettyPrint + , euUserIp + , euMaxAttendees + , euKey + , euSendNotifications + , euOauthToken + , euSupportsAttachments + , euAlwaysIncludeEmail + , euEventId + , euFields + , euAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsUpdate@ which the +-- 'EventsUpdate' request conforms to. +type EventsUpdateAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + Capture "eventId" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "sendNotifications" Bool :> + QueryParam "supportsAttachments" Bool :> + QueryParam "alwaysIncludeEmail" Bool :> + Put '[JSON] Event + +-- | Updates an event. +-- +-- /See:/ 'eventsUpdate' smart constructor. +data EventsUpdate = EventsUpdate + { _euQuotaUser :: !(Maybe Text) + , _euCalendarId :: !Text + , _euPrettyPrint :: !Bool + , _euUserIp :: !(Maybe Text) + , _euMaxAttendees :: !(Maybe Int32) + , _euKey :: !(Maybe Text) + , _euSendNotifications :: !(Maybe Bool) + , _euOauthToken :: !(Maybe Text) + , _euSupportsAttachments :: !(Maybe Bool) + , _euAlwaysIncludeEmail :: !(Maybe Bool) + , _euEventId :: !Text + , _euFields :: !(Maybe Text) + , _euAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'euQuotaUser' +-- +-- * 'euCalendarId' +-- +-- * 'euPrettyPrint' +-- +-- * 'euUserIp' +-- +-- * 'euMaxAttendees' +-- +-- * 'euKey' +-- +-- * 'euSendNotifications' +-- +-- * 'euOauthToken' +-- +-- * 'euSupportsAttachments' +-- +-- * 'euAlwaysIncludeEmail' +-- +-- * 'euEventId' +-- +-- * 'euFields' +-- +-- * 'euAlt' +eventsUpdate + :: Text -- ^ 'calendarId' + -> Text -- ^ 'eventId' + -> EventsUpdate +eventsUpdate pEuCalendarId_ pEuEventId_ = + EventsUpdate + { _euQuotaUser = Nothing + , _euCalendarId = pEuCalendarId_ + , _euPrettyPrint = True + , _euUserIp = Nothing + , _euMaxAttendees = Nothing + , _euKey = Nothing + , _euSendNotifications = Nothing + , _euOauthToken = Nothing + , _euSupportsAttachments = Nothing + , _euAlwaysIncludeEmail = Nothing + , _euEventId = pEuEventId_ + , _euFields = Nothing + , _euAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +euQuotaUser :: Lens' EventsUpdate' (Maybe Text) +euQuotaUser + = lens _euQuotaUser (\ s a -> s{_euQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +euCalendarId :: Lens' EventsUpdate' Text +euCalendarId + = lens _euCalendarId (\ s a -> s{_euCalendarId = a}) + +-- | Returns response with indentations and line breaks. +euPrettyPrint :: Lens' EventsUpdate' Bool +euPrettyPrint + = lens _euPrettyPrint + (\ s a -> s{_euPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +euUserIp :: Lens' EventsUpdate' (Maybe Text) +euUserIp = lens _euUserIp (\ s a -> s{_euUserIp = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +euMaxAttendees :: Lens' EventsUpdate' (Maybe Int32) +euMaxAttendees + = lens _euMaxAttendees + (\ s a -> s{_euMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +euKey :: Lens' EventsUpdate' (Maybe Text) +euKey = lens _euKey (\ s a -> s{_euKey = a}) + +-- | Whether to send notifications about the event update (e.g. attendee\'s +-- responses, title changes, etc.). Optional. The default is False. +euSendNotifications :: Lens' EventsUpdate' (Maybe Bool) +euSendNotifications + = lens _euSendNotifications + (\ s a -> s{_euSendNotifications = a}) + +-- | OAuth 2.0 token for the current user. +euOauthToken :: Lens' EventsUpdate' (Maybe Text) +euOauthToken + = lens _euOauthToken (\ s a -> s{_euOauthToken = a}) + +-- | Whether API client performing operation supports event attachments. +-- Optional. The default is False. +euSupportsAttachments :: Lens' EventsUpdate' (Maybe Bool) +euSupportsAttachments + = lens _euSupportsAttachments + (\ s a -> s{_euSupportsAttachments = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +euAlwaysIncludeEmail :: Lens' EventsUpdate' (Maybe Bool) +euAlwaysIncludeEmail + = lens _euAlwaysIncludeEmail + (\ s a -> s{_euAlwaysIncludeEmail = a}) + +-- | Event identifier. +euEventId :: Lens' EventsUpdate' Text +euEventId + = lens _euEventId (\ s a -> s{_euEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +euFields :: Lens' EventsUpdate' (Maybe Text) +euFields = lens _euFields (\ s a -> s{_euFields = a}) + +-- | Data format for the response. +euAlt :: Lens' EventsUpdate' Text +euAlt = lens _euAlt (\ s a -> s{_euAlt = a}) + +instance GoogleRequest EventsUpdate' where + type Rs EventsUpdate' = Event + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsUpdate{..} + = go _euQuotaUser _euCalendarId _euPrettyPrint + _euUserIp + _euMaxAttendees + _euKey + _euSendNotifications + _euOauthToken + _euSupportsAttachments + _euAlwaysIncludeEmail + _euEventId + _euFields + _euAlt + where go + = clientWithRoute (Proxy :: Proxy EventsUpdateAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Watch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Watch.hs new file mode 100644 index 000000000..ebba43ace --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Events/Watch.hs @@ -0,0 +1,416 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Events.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes to Events resources. +-- +-- /See:/ for @CalendarEventsWatch@. +module Calendar.Events.Watch + ( + -- * REST Resource + EventsWatchAPI + + -- * Creating a Request + , eventsWatch + , EventsWatch + + -- * Request Lenses + , ewSyncToken + , ewQuotaUser + , ewCalendarId + , ewPrettyPrint + , ewTimeMin + , ewOrderBy + , ewSingleEvents + , ewPrivateExtendedProperty + , ewUserIp + , ewShowDeleted + , ewQ + , ewSharedExtendedProperty + , ewMaxAttendees + , ewKey + , ewICalUID + , ewUpdatedMin + , ewPageToken + , ewTimeZone + , ewOauthToken + , ewShowHiddenInvitations + , ewMaxResults + , ewAlwaysIncludeEmail + , ewTimeMax + , ewFields + , ewAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarEventsWatch@ which the +-- 'EventsWatch' request conforms to. +type EventsWatchAPI = + "calendars" :> + Capture "calendarId" Text :> + "events" :> + "watch" :> + QueryParam "syncToken" Text :> + QueryParam "timeMin" UTCTime :> + QueryParam "orderBy" Text :> + QueryParam "singleEvents" Bool :> + QueryParams "privateExtendedProperty" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "q" Text :> + QueryParams "sharedExtendedProperty" Text :> + QueryParam "maxAttendees" Int32 :> + QueryParam "iCalUID" Text :> + QueryParam "updatedMin" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "timeZone" Text :> + QueryParam "showHiddenInvitations" Bool + :> + QueryParam "maxResults" Int32 :> + QueryParam "alwaysIncludeEmail" Bool + :> + QueryParam "timeMax" UTCTime :> + Post '[JSON] Channel + +-- | Watch for changes to Events resources. +-- +-- /See:/ 'eventsWatch' smart constructor. +data EventsWatch = EventsWatch + { _ewSyncToken :: !(Maybe Text) + , _ewQuotaUser :: !(Maybe Text) + , _ewCalendarId :: !Text + , _ewPrettyPrint :: !Bool + , _ewTimeMin :: !(Maybe UTCTime) + , _ewOrderBy :: !(Maybe Text) + , _ewSingleEvents :: !(Maybe Bool) + , _ewPrivateExtendedProperty :: !(Maybe Text) + , _ewUserIp :: !(Maybe Text) + , _ewShowDeleted :: !(Maybe Bool) + , _ewQ :: !(Maybe Text) + , _ewSharedExtendedProperty :: !(Maybe Text) + , _ewMaxAttendees :: !(Maybe Int32) + , _ewKey :: !(Maybe Text) + , _ewICalUID :: !(Maybe Text) + , _ewUpdatedMin :: !(Maybe UTCTime) + , _ewPageToken :: !(Maybe Text) + , _ewTimeZone :: !(Maybe Text) + , _ewOauthToken :: !(Maybe Text) + , _ewShowHiddenInvitations :: !(Maybe Bool) + , _ewMaxResults :: !(Maybe Int32) + , _ewAlwaysIncludeEmail :: !(Maybe Bool) + , _ewTimeMax :: !(Maybe UTCTime) + , _ewFields :: !(Maybe Text) + , _ewAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ewSyncToken' +-- +-- * 'ewQuotaUser' +-- +-- * 'ewCalendarId' +-- +-- * 'ewPrettyPrint' +-- +-- * 'ewTimeMin' +-- +-- * 'ewOrderBy' +-- +-- * 'ewSingleEvents' +-- +-- * 'ewPrivateExtendedProperty' +-- +-- * 'ewUserIp' +-- +-- * 'ewShowDeleted' +-- +-- * 'ewQ' +-- +-- * 'ewSharedExtendedProperty' +-- +-- * 'ewMaxAttendees' +-- +-- * 'ewKey' +-- +-- * 'ewICalUID' +-- +-- * 'ewUpdatedMin' +-- +-- * 'ewPageToken' +-- +-- * 'ewTimeZone' +-- +-- * 'ewOauthToken' +-- +-- * 'ewShowHiddenInvitations' +-- +-- * 'ewMaxResults' +-- +-- * 'ewAlwaysIncludeEmail' +-- +-- * 'ewTimeMax' +-- +-- * 'ewFields' +-- +-- * 'ewAlt' +eventsWatch + :: Text -- ^ 'calendarId' + -> EventsWatch +eventsWatch pEwCalendarId_ = + EventsWatch + { _ewSyncToken = Nothing + , _ewQuotaUser = Nothing + , _ewCalendarId = pEwCalendarId_ + , _ewPrettyPrint = True + , _ewTimeMin = Nothing + , _ewOrderBy = Nothing + , _ewSingleEvents = Nothing + , _ewPrivateExtendedProperty = Nothing + , _ewUserIp = Nothing + , _ewShowDeleted = Nothing + , _ewQ = Nothing + , _ewSharedExtendedProperty = Nothing + , _ewMaxAttendees = Nothing + , _ewKey = Nothing + , _ewICalUID = Nothing + , _ewUpdatedMin = Nothing + , _ewPageToken = Nothing + , _ewTimeZone = Nothing + , _ewOauthToken = Nothing + , _ewShowHiddenInvitations = Nothing + , _ewMaxResults = Nothing + , _ewAlwaysIncludeEmail = Nothing + , _ewTimeMax = Nothing + , _ewFields = Nothing + , _ewAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. All events +-- deleted since the previous list request will always be in the result set +-- and it is not allowed to set showDeleted to False. There are several +-- query parameters that cannot be specified together with nextSyncToken to +-- ensure consistency of the client state. These are: - iCalUID - orderBy - +-- privateExtendedProperty - q - sharedExtendedProperty - timeMin - timeMax +-- - updatedMin If the syncToken expires, the server will respond with a +-- 410 GONE response code and the client should clear its storage and +-- perform a full synchronization without any syncToken. Learn more about +-- incremental synchronization. Optional. The default is to return all +-- entries. +ewSyncToken :: Lens' EventsWatch' (Maybe Text) +ewSyncToken + = lens _ewSyncToken (\ s a -> s{_ewSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ewQuotaUser :: Lens' EventsWatch' (Maybe Text) +ewQuotaUser + = lens _ewQuotaUser (\ s a -> s{_ewQuotaUser = a}) + +-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list +-- method. If you want to access the primary calendar of the currently +-- logged in user, use the \"primary\" keyword. +ewCalendarId :: Lens' EventsWatch' Text +ewCalendarId + = lens _ewCalendarId (\ s a -> s{_ewCalendarId = a}) + +-- | Returns response with indentations and line breaks. +ewPrettyPrint :: Lens' EventsWatch' Bool +ewPrettyPrint + = lens _ewPrettyPrint + (\ s a -> s{_ewPrettyPrint = a}) + +-- | Lower bound (inclusive) for an event\'s end time to filter by. Optional. +-- The default is not to filter by end time. Must be an RFC3339 timestamp +-- with mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, +-- 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. +ewTimeMin :: Lens' EventsWatch' (Maybe UTCTime) +ewTimeMin + = lens _ewTimeMin (\ s a -> s{_ewTimeMin = a}) + +-- | The order of the events returned in the result. Optional. The default is +-- an unspecified, stable order. +ewOrderBy :: Lens' EventsWatch' (Maybe Text) +ewOrderBy + = lens _ewOrderBy (\ s a -> s{_ewOrderBy = a}) + +-- | Whether to expand recurring events into instances and only return single +-- one-off events and instances of recurring events, but not the underlying +-- recurring events themselves. Optional. The default is False. +ewSingleEvents :: Lens' EventsWatch' (Maybe Bool) +ewSingleEvents + = lens _ewSingleEvents + (\ s a -> s{_ewSingleEvents = a}) + +-- | Extended properties constraint specified as propertyName=value. Matches +-- only private properties. This parameter might be repeated multiple times +-- to return events that match all given constraints. +ewPrivateExtendedProperty :: Lens' EventsWatch' (Maybe Text) +ewPrivateExtendedProperty + = lens _ewPrivateExtendedProperty + (\ s a -> s{_ewPrivateExtendedProperty = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ewUserIp :: Lens' EventsWatch' (Maybe Text) +ewUserIp = lens _ewUserIp (\ s a -> s{_ewUserIp = a}) + +-- | Whether to include deleted events (with status equals \"cancelled\") in +-- the result. Cancelled instances of recurring events (but not the +-- underlying recurring event) will still be included if showDeleted and +-- singleEvents are both False. If showDeleted and singleEvents are both +-- True, only single instances of deleted events (but not the underlying +-- recurring events) are returned. Optional. The default is False. +ewShowDeleted :: Lens' EventsWatch' (Maybe Bool) +ewShowDeleted + = lens _ewShowDeleted + (\ s a -> s{_ewShowDeleted = a}) + +-- | Free text search terms to find events that match these terms in any +-- field, except for extended properties. Optional. +ewQ :: Lens' EventsWatch' (Maybe Text) +ewQ = lens _ewQ (\ s a -> s{_ewQ = a}) + +-- | Extended properties constraint specified as propertyName=value. Matches +-- only shared properties. This parameter might be repeated multiple times +-- to return events that match all given constraints. +ewSharedExtendedProperty :: Lens' EventsWatch' (Maybe Text) +ewSharedExtendedProperty + = lens _ewSharedExtendedProperty + (\ s a -> s{_ewSharedExtendedProperty = a}) + +-- | The maximum number of attendees to include in the response. If there are +-- more than the specified number of attendees, only the participant is +-- returned. Optional. +ewMaxAttendees :: Lens' EventsWatch' (Maybe Int32) +ewMaxAttendees + = lens _ewMaxAttendees + (\ s a -> s{_ewMaxAttendees = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ewKey :: Lens' EventsWatch' (Maybe Text) +ewKey = lens _ewKey (\ s a -> s{_ewKey = a}) + +-- | Specifies event ID in the iCalendar format to be included in the +-- response. Optional. +ewICalUID :: Lens' EventsWatch' (Maybe Text) +ewICalUID + = lens _ewICalUID (\ s a -> s{_ewICalUID = a}) + +-- | Lower bound for an event\'s last modification time (as a RFC3339 +-- timestamp) to filter by. When specified, entries deleted since this time +-- will always be included regardless of showDeleted. Optional. The default +-- is not to filter by last modification time. +ewUpdatedMin :: Lens' EventsWatch' (Maybe UTCTime) +ewUpdatedMin + = lens _ewUpdatedMin (\ s a -> s{_ewUpdatedMin = a}) + +-- | Token specifying which result page to return. Optional. +ewPageToken :: Lens' EventsWatch' (Maybe Text) +ewPageToken + = lens _ewPageToken (\ s a -> s{_ewPageToken = a}) + +-- | Time zone used in the response. Optional. The default is the time zone +-- of the calendar. +ewTimeZone :: Lens' EventsWatch' (Maybe Text) +ewTimeZone + = lens _ewTimeZone (\ s a -> s{_ewTimeZone = a}) + +-- | OAuth 2.0 token for the current user. +ewOauthToken :: Lens' EventsWatch' (Maybe Text) +ewOauthToken + = lens _ewOauthToken (\ s a -> s{_ewOauthToken = a}) + +-- | Whether to include hidden invitations in the result. Optional. The +-- default is False. +ewShowHiddenInvitations :: Lens' EventsWatch' (Maybe Bool) +ewShowHiddenInvitations + = lens _ewShowHiddenInvitations + (\ s a -> s{_ewShowHiddenInvitations = a}) + +-- | Maximum number of events returned on one result page. By default the +-- value is 250 events. The page size can never be larger than 2500 events. +-- Optional. +ewMaxResults :: Lens' EventsWatch' (Maybe Int32) +ewMaxResults + = lens _ewMaxResults (\ s a -> s{_ewMaxResults = a}) + +-- | Whether to always include a value in the email field for the organizer, +-- creator and attendees, even if no real email is available (i.e. a +-- generated, non-working value will be provided). The use of this option +-- is discouraged and should only be used by clients which cannot handle +-- the absence of an email address value in the mentioned places. Optional. +-- The default is False. +ewAlwaysIncludeEmail :: Lens' EventsWatch' (Maybe Bool) +ewAlwaysIncludeEmail + = lens _ewAlwaysIncludeEmail + (\ s a -> s{_ewAlwaysIncludeEmail = a}) + +-- | Upper bound (exclusive) for an event\'s start time to filter by. +-- Optional. The default is not to filter by start time. Must be an RFC3339 +-- timestamp with mandatory time zone offset, e.g., +-- 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be +-- provided but will be ignored. +ewTimeMax :: Lens' EventsWatch' (Maybe UTCTime) +ewTimeMax + = lens _ewTimeMax (\ s a -> s{_ewTimeMax = a}) + +-- | Selector specifying which fields to include in a partial response. +ewFields :: Lens' EventsWatch' (Maybe Text) +ewFields = lens _ewFields (\ s a -> s{_ewFields = a}) + +-- | Data format for the response. +ewAlt :: Lens' EventsWatch' Text +ewAlt = lens _ewAlt (\ s a -> s{_ewAlt = a}) + +instance GoogleRequest EventsWatch' where + type Rs EventsWatch' = Channel + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u EventsWatch{..} + = go _ewSyncToken _ewQuotaUser _ewCalendarId + _ewPrettyPrint + _ewTimeMin + _ewOrderBy + _ewSingleEvents + _ewPrivateExtendedProperty + _ewUserIp + _ewShowDeleted + _ewQ + _ewSharedExtendedProperty + _ewMaxAttendees + _ewKey + _ewICalUID + _ewUpdatedMin + _ewPageToken + _ewTimeZone + _ewOauthToken + _ewShowHiddenInvitations + _ewMaxResults + _ewAlwaysIncludeEmail + _ewTimeMax + _ewFields + _ewAlt + where go + = clientWithRoute (Proxy :: Proxy EventsWatchAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Freebusy/Query.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Freebusy/Query.hs new file mode 100644 index 000000000..274fd2c2d --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Freebusy/Query.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Freebusy.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns free\/busy information for a set of calendars. +-- +-- /See:/ for @CalendarFreebusyQuery@. +module Calendar.Freebusy.Query + ( + -- * REST Resource + FreebusyQueryAPI + + -- * Creating a Request + , freebusyQuery + , FreebusyQuery + + -- * Request Lenses + , fqQuotaUser + , fqPrettyPrint + , fqUserIp + , fqKey + , fqOauthToken + , fqFields + , fqAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarFreebusyQuery@ which the +-- 'FreebusyQuery' request conforms to. +type FreebusyQueryAPI = + "freeBusy" :> Post '[JSON] FreeBusyResponse + +-- | Returns free\/busy information for a set of calendars. +-- +-- /See:/ 'freebusyQuery' smart constructor. +data FreebusyQuery = FreebusyQuery + { _fqQuotaUser :: !(Maybe Text) + , _fqPrettyPrint :: !Bool + , _fqUserIp :: !(Maybe Text) + , _fqKey :: !(Maybe Text) + , _fqOauthToken :: !(Maybe Text) + , _fqFields :: !(Maybe Text) + , _fqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreebusyQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fqQuotaUser' +-- +-- * 'fqPrettyPrint' +-- +-- * 'fqUserIp' +-- +-- * 'fqKey' +-- +-- * 'fqOauthToken' +-- +-- * 'fqFields' +-- +-- * 'fqAlt' +freebusyQuery + :: FreebusyQuery +freebusyQuery = + FreebusyQuery + { _fqQuotaUser = Nothing + , _fqPrettyPrint = True + , _fqUserIp = Nothing + , _fqKey = Nothing + , _fqOauthToken = Nothing + , _fqFields = Nothing + , _fqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fqQuotaUser :: Lens' FreebusyQuery' (Maybe Text) +fqQuotaUser + = lens _fqQuotaUser (\ s a -> s{_fqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fqPrettyPrint :: Lens' FreebusyQuery' Bool +fqPrettyPrint + = lens _fqPrettyPrint + (\ s a -> s{_fqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fqUserIp :: Lens' FreebusyQuery' (Maybe Text) +fqUserIp = lens _fqUserIp (\ s a -> s{_fqUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fqKey :: Lens' FreebusyQuery' (Maybe Text) +fqKey = lens _fqKey (\ s a -> s{_fqKey = a}) + +-- | OAuth 2.0 token for the current user. +fqOauthToken :: Lens' FreebusyQuery' (Maybe Text) +fqOauthToken + = lens _fqOauthToken (\ s a -> s{_fqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fqFields :: Lens' FreebusyQuery' (Maybe Text) +fqFields = lens _fqFields (\ s a -> s{_fqFields = a}) + +-- | Data format for the response. +fqAlt :: Lens' FreebusyQuery' Text +fqAlt = lens _fqAlt (\ s a -> s{_fqAlt = a}) + +instance GoogleRequest FreebusyQuery' where + type Rs FreebusyQuery' = FreeBusyResponse + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u FreebusyQuery{..} + = go _fqQuotaUser _fqPrettyPrint _fqUserIp _fqKey + _fqOauthToken + _fqFields + _fqAlt + where go + = clientWithRoute (Proxy :: Proxy FreebusyQueryAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Get.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Get.hs new file mode 100644 index 000000000..035cbb0b0 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Settings.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a single user setting. +-- +-- /See:/ for @CalendarSettingsGet@. +module Calendar.Settings.Get + ( + -- * REST Resource + SettingsGetAPI + + -- * Creating a Request + , settingsGet + , SettingsGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgSetting + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarSettingsGet@ which the +-- 'SettingsGet' request conforms to. +type SettingsGetAPI = + "users" :> + "me" :> + "settings" :> + Capture "setting" Text :> Get '[JSON] Setting + +-- | Returns a single user setting. +-- +-- /See:/ 'settingsGet' smart constructor. +data SettingsGet = SettingsGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgSetting :: !Text + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SettingsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgSetting' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +settingsGet + :: Text -- ^ 'setting' + -> SettingsGet +settingsGet pSgSetting_ = + SettingsGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgSetting = pSgSetting_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SettingsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SettingsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SettingsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | The id of the user setting. +sgSetting :: Lens' SettingsGet' Text +sgSetting + = lens _sgSetting (\ s a -> s{_sgSetting = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SettingsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SettingsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SettingsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SettingsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SettingsGet' where + type Rs SettingsGet' = Setting + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u SettingsGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp _sgSetting + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SettingsGetAPI) r u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/List.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/List.hs new file mode 100644 index 000000000..a217f4554 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Settings.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns all user settings for the authenticated user. +-- +-- /See:/ for @CalendarSettingsList@. +module Calendar.Settings.List + ( + -- * REST Resource + SettingsListAPI + + -- * Creating a Request + , settingsList + , SettingsList + + -- * Request Lenses + , slSyncToken + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slPageToken + , slOauthToken + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarSettingsList@ which the +-- 'SettingsList' request conforms to. +type SettingsListAPI = + "users" :> + "me" :> + "settings" :> + QueryParam "syncToken" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] Settings + +-- | Returns all user settings for the authenticated user. +-- +-- /See:/ 'settingsList' smart constructor. +data SettingsList = SettingsList + { _slSyncToken :: !(Maybe Text) + , _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slMaxResults :: !(Maybe Int32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SettingsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slSyncToken' +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +settingsList + :: SettingsList +settingsList = + SettingsList + { _slSyncToken = Nothing + , _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. If the +-- syncToken expires, the server will respond with a 410 GONE response code +-- and the client should clear its storage and perform a full +-- synchronization without any syncToken. Learn more about incremental +-- synchronization. Optional. The default is to return all entries. +slSyncToken :: Lens' SettingsList' (Maybe Text) +slSyncToken + = lens _slSyncToken (\ s a -> s{_slSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SettingsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SettingsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SettingsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SettingsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | Token specifying which result page to return. Optional. +slPageToken :: Lens' SettingsList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SettingsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +slMaxResults :: Lens' SettingsList' (Maybe Int32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SettingsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SettingsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SettingsList' where + type Rs SettingsList' = Settings + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u SettingsList{..} + = go _slSyncToken _slQuotaUser _slPrettyPrint + _slUserIp + _slKey + _slPageToken + _slOauthToken + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SettingsListAPI) r + u diff --git a/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Watch.hs b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Watch.hs new file mode 100644 index 000000000..b4c7cc442 --- /dev/null +++ b/gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Settings/Watch.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Calendar.Settings.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes to Settings resources. +-- +-- /See:/ for @CalendarSettingsWatch@. +module Calendar.Settings.Watch + ( + -- * REST Resource + SettingsWatchAPI + + -- * Creating a Request + , settingsWatch + , SettingsWatch + + -- * Request Lenses + , swSyncToken + , swQuotaUser + , swPrettyPrint + , swUserIp + , swKey + , swPageToken + , swOauthToken + , swMaxResults + , swFields + , swAlt + ) where + +import Network.Google.AppsCalendar.Types +import Network.Google.Prelude + +-- | A resource alias for @CalendarSettingsWatch@ which the +-- 'SettingsWatch' request conforms to. +type SettingsWatchAPI = + "users" :> + "me" :> + "settings" :> + "watch" :> + QueryParam "syncToken" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Post '[JSON] Channel + +-- | Watch for changes to Settings resources. +-- +-- /See:/ 'settingsWatch' smart constructor. +data SettingsWatch = SettingsWatch + { _swSyncToken :: !(Maybe Text) + , _swQuotaUser :: !(Maybe Text) + , _swPrettyPrint :: !Bool + , _swUserIp :: !(Maybe Text) + , _swKey :: !(Maybe Text) + , _swPageToken :: !(Maybe Text) + , _swOauthToken :: !(Maybe Text) + , _swMaxResults :: !(Maybe Int32) + , _swFields :: !(Maybe Text) + , _swAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SettingsWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'swSyncToken' +-- +-- * 'swQuotaUser' +-- +-- * 'swPrettyPrint' +-- +-- * 'swUserIp' +-- +-- * 'swKey' +-- +-- * 'swPageToken' +-- +-- * 'swOauthToken' +-- +-- * 'swMaxResults' +-- +-- * 'swFields' +-- +-- * 'swAlt' +settingsWatch + :: SettingsWatch +settingsWatch = + SettingsWatch + { _swSyncToken = Nothing + , _swQuotaUser = Nothing + , _swPrettyPrint = True + , _swUserIp = Nothing + , _swKey = Nothing + , _swPageToken = Nothing + , _swOauthToken = Nothing + , _swMaxResults = Nothing + , _swFields = Nothing + , _swAlt = "json" + } + +-- | Token obtained from the nextSyncToken field returned on the last page of +-- results from the previous list request. It makes the result of this list +-- request contain only entries that have changed since then. If the +-- syncToken expires, the server will respond with a 410 GONE response code +-- and the client should clear its storage and perform a full +-- synchronization without any syncToken. Learn more about incremental +-- synchronization. Optional. The default is to return all entries. +swSyncToken :: Lens' SettingsWatch' (Maybe Text) +swSyncToken + = lens _swSyncToken (\ s a -> s{_swSyncToken = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +swQuotaUser :: Lens' SettingsWatch' (Maybe Text) +swQuotaUser + = lens _swQuotaUser (\ s a -> s{_swQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +swPrettyPrint :: Lens' SettingsWatch' Bool +swPrettyPrint + = lens _swPrettyPrint + (\ s a -> s{_swPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +swUserIp :: Lens' SettingsWatch' (Maybe Text) +swUserIp = lens _swUserIp (\ s a -> s{_swUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +swKey :: Lens' SettingsWatch' (Maybe Text) +swKey = lens _swKey (\ s a -> s{_swKey = a}) + +-- | Token specifying which result page to return. Optional. +swPageToken :: Lens' SettingsWatch' (Maybe Text) +swPageToken + = lens _swPageToken (\ s a -> s{_swPageToken = a}) + +-- | OAuth 2.0 token for the current user. +swOauthToken :: Lens' SettingsWatch' (Maybe Text) +swOauthToken + = lens _swOauthToken (\ s a -> s{_swOauthToken = a}) + +-- | Maximum number of entries returned on one result page. By default the +-- value is 100 entries. The page size can never be larger than 250 +-- entries. Optional. +swMaxResults :: Lens' SettingsWatch' (Maybe Int32) +swMaxResults + = lens _swMaxResults (\ s a -> s{_swMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +swFields :: Lens' SettingsWatch' (Maybe Text) +swFields = lens _swFields (\ s a -> s{_swFields = a}) + +-- | Data format for the response. +swAlt :: Lens' SettingsWatch' Text +swAlt = lens _swAlt (\ s a -> s{_swAlt = a}) + +instance GoogleRequest SettingsWatch' where + type Rs SettingsWatch' = Channel + request = requestWithRoute defReq appsCalendarURL + requestWithRoute r u SettingsWatch{..} + = go _swSyncToken _swQuotaUser _swPrettyPrint + _swUserIp + _swKey + _swPageToken + _swOauthToken + _swMaxResults + _swFields + _swAlt + where go + = clientWithRoute (Proxy :: Proxy SettingsWatchAPI) r + u diff --git a/gogol-apps-calendar/gogol-apps-calendar.cabal b/gogol-apps-calendar/gogol-apps-calendar.cabal new file mode 100644 index 000000000..ec2a3db2b --- /dev/null +++ b/gogol-apps-calendar/gogol-apps-calendar.cabal @@ -0,0 +1,79 @@ +name: gogol-apps-calendar +version: 0.0.1 +synopsis: Calendar API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you manipulate events and other calendar data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppsCalendar + , Network.Google.AppsCalendar.Types + , Network.Google.Resource.Calendar.ACL.Delete + , Network.Google.Resource.Calendar.ACL.Get + , Network.Google.Resource.Calendar.ACL.Insert + , Network.Google.Resource.Calendar.ACL.List + , Network.Google.Resource.Calendar.ACL.Patch + , Network.Google.Resource.Calendar.ACL.Update + , Network.Google.Resource.Calendar.ACL.Watch + , Network.Google.Resource.Calendar.CalendarList.Delete + , Network.Google.Resource.Calendar.CalendarList.Get + , Network.Google.Resource.Calendar.CalendarList.Insert + , Network.Google.Resource.Calendar.CalendarList.List + , Network.Google.Resource.Calendar.CalendarList.Patch + , Network.Google.Resource.Calendar.CalendarList.Update + , Network.Google.Resource.Calendar.CalendarList.Watch + , Network.Google.Resource.Calendar.Calendars.Clear + , Network.Google.Resource.Calendar.Calendars.Delete + , Network.Google.Resource.Calendar.Calendars.Get + , Network.Google.Resource.Calendar.Calendars.Insert + , Network.Google.Resource.Calendar.Calendars.Patch + , Network.Google.Resource.Calendar.Calendars.Update + , Network.Google.Resource.Calendar.Channels.Stop + , Network.Google.Resource.Calendar.Colors.Get + , Network.Google.Resource.Calendar.Events.Delete + , Network.Google.Resource.Calendar.Events.Get + , Network.Google.Resource.Calendar.Events.Import + , Network.Google.Resource.Calendar.Events.Insert + , Network.Google.Resource.Calendar.Events.Instances + , Network.Google.Resource.Calendar.Events.List + , Network.Google.Resource.Calendar.Events.Move + , Network.Google.Resource.Calendar.Events.Patch + , Network.Google.Resource.Calendar.Events.QuickAdd + , Network.Google.Resource.Calendar.Events.Update + , Network.Google.Resource.Calendar.Events.Watch + , Network.Google.Resource.Calendar.Freebusy.Query + , Network.Google.Resource.Calendar.Settings.Get + , Network.Google.Resource.Calendar.Settings.List + , Network.Google.Resource.Calendar.Settings.Watch + + other-modules: + Network.Google.AppsCalendar.Types.Product + , Network.Google.AppsCalendar.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-apps-calendar/src/.gitkeep b/gogol-apps-calendar/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-apps-licensing/LICENSE b/gogol-apps-licensing/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-apps-licensing/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-apps-licensing/Makefile b/gogol-apps-licensing/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-apps-licensing/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-apps-licensing/README.md b/gogol-apps-licensing/README.md new file mode 100644 index 000000000..a101da298 --- /dev/null +++ b/gogol-apps-licensing/README.md @@ -0,0 +1,28 @@ +# gogol-apps-licensing + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Enterprise License Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-apps-licensing` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-apps-licensing/Setup.hs b/gogol-apps-licensing/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-apps-licensing/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-apps-licensing/gen/Network/Google/AppsLicensing.hs b/gogol-apps-licensing/gen/Network/Google/AppsLicensing.hs new file mode 100644 index 000000000..4ff9a3e91 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/AppsLicensing.hs @@ -0,0 +1,93 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppsLicensing +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Licensing API to view and manage license for your domain. +-- +-- /See:/ +module Network.Google.AppsLicensing + ( + -- * API + AppsLicensingAPI + , appsLicensingAPI + , appsLicensingURL + + -- * Service Methods + + -- * REST Resources + + -- ** LicensingLicenseAssignmentsDelete + , module Licensing.LicenseAssignments.Delete + + -- ** LicensingLicenseAssignmentsGet + , module Licensing.LicenseAssignments.Get + + -- ** LicensingLicenseAssignmentsInsert + , module Licensing.LicenseAssignments.Insert + + -- ** LicensingLicenseAssignmentsListForProduct + , module Licensing.LicenseAssignments.ListForProduct + + -- ** LicensingLicenseAssignmentsListForProductAndSku + , module Licensing.LicenseAssignments.ListForProductAndSku + + -- ** LicensingLicenseAssignmentsPatch + , module Licensing.LicenseAssignments.Patch + + -- ** LicensingLicenseAssignmentsUpdate + , module Licensing.LicenseAssignments.Update + + -- * Types + + -- ** LicenseAssignmentInsert + , LicenseAssignmentInsert + , licenseAssignmentInsert + , laiUserId + + -- ** LicenseAssignmentList + , LicenseAssignmentList + , licenseAssignmentList + , lalEtag + , lalNextPageToken + , lalKind + , lalItems + + -- ** LicenseAssignment + , LicenseAssignment + , licenseAssignment + , laEtags + , laKind + , laSkuId + , laUserId + , laSelfLink + , laProductId + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude +import Network.Google.Resource.Licensing.LicenseAssignments.Delete +import Network.Google.Resource.Licensing.LicenseAssignments.Get +import Network.Google.Resource.Licensing.LicenseAssignments.Insert +import Network.Google.Resource.Licensing.LicenseAssignments.ListForProduct +import Network.Google.Resource.Licensing.LicenseAssignments.ListForProductAndSku +import Network.Google.Resource.Licensing.LicenseAssignments.Patch +import Network.Google.Resource.Licensing.LicenseAssignments.Update + +{- $resources +TODO +-} + +type AppsLicensingAPI = LicenseAssignments + +appsLicensingAPI :: Proxy AppsLicensingAPI +appsLicensingAPI = Proxy diff --git a/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types.hs b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types.hs new file mode 100644 index 000000000..fdd79f922 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types.hs @@ -0,0 +1,53 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsLicensing.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsLicensing.Types + ( + -- * Service URL + appsLicensingURL + + -- * LicenseAssignmentInsert + , LicenseAssignmentInsert + , licenseAssignmentInsert + , laiUserId + + -- * LicenseAssignmentList + , LicenseAssignmentList + , licenseAssignmentList + , lalEtag + , lalNextPageToken + , lalKind + , lalItems + + -- * LicenseAssignment + , LicenseAssignment + , licenseAssignment + , laEtags + , laKind + , laSkuId + , laUserId + , laSelfLink + , laProductId + ) where + +import Network.Google.AppsLicensing.Types.Product +import Network.Google.AppsLicensing.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Enterprise License Manager API. +appsLicensingURL :: BaseURL +appsLicensingURL + = BaseUrl Https + "https://www.googleapis.com/apps/licensing/v1/product/" + 443 diff --git a/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Product.hs b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Product.hs new file mode 100644 index 000000000..2d054ff69 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Product.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsLicensing.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsLicensing.Types.Product where + +import Network.Google.AppsLicensing.Types.Sum +import Network.Google.Prelude + +-- | Template for LicenseAssignment Insert request +-- +-- /See:/ 'licenseAssignmentInsert' smart constructor. +newtype LicenseAssignmentInsert = LicenseAssignmentInsert + { _laiUserId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentInsert' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laiUserId' +licenseAssignmentInsert + :: LicenseAssignmentInsert +licenseAssignmentInsert = + LicenseAssignmentInsert + { _laiUserId = Nothing + } + +-- | Email id of the user +laiUserId :: Lens' LicenseAssignmentInsert (Maybe Text) +laiUserId + = lens _laiUserId (\ s a -> s{_laiUserId = a}) + +instance FromJSON LicenseAssignmentInsert where + parseJSON + = withObject "LicenseAssignmentInsert" + (\ o -> LicenseAssignmentInsert <$> (o .:? "userId")) + +instance ToJSON LicenseAssignmentInsert where + toJSON LicenseAssignmentInsert{..} + = object (catMaybes [("userId" .=) <$> _laiUserId]) + +-- | LicesnseAssignment List for a given product\/sku for a customer. +-- +-- /See:/ 'licenseAssignmentList' smart constructor. +data LicenseAssignmentList = LicenseAssignmentList + { _lalEtag :: !(Maybe Text) + , _lalNextPageToken :: !(Maybe Text) + , _lalKind :: !Text + , _lalItems :: !(Maybe [Maybe LicenseAssignment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lalEtag' +-- +-- * 'lalNextPageToken' +-- +-- * 'lalKind' +-- +-- * 'lalItems' +licenseAssignmentList + :: LicenseAssignmentList +licenseAssignmentList = + LicenseAssignmentList + { _lalEtag = Nothing + , _lalNextPageToken = Nothing + , _lalKind = "licensing#licenseAssignmentList" + , _lalItems = Nothing + } + +-- | ETag of the resource. +lalEtag :: Lens' LicenseAssignmentList (Maybe Text) +lalEtag = lens _lalEtag (\ s a -> s{_lalEtag = a}) + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +lalNextPageToken :: Lens' LicenseAssignmentList (Maybe Text) +lalNextPageToken + = lens _lalNextPageToken + (\ s a -> s{_lalNextPageToken = a}) + +-- | Identifies the resource as a collection of LicenseAssignments. +lalKind :: Lens' LicenseAssignmentList Text +lalKind = lens _lalKind (\ s a -> s{_lalKind = a}) + +-- | The LicenseAssignments in this page of results. +lalItems :: Lens' LicenseAssignmentList [Maybe LicenseAssignment] +lalItems + = lens _lalItems (\ s a -> s{_lalItems = a}) . + _Default + . _Coerce + +instance FromJSON LicenseAssignmentList where + parseJSON + = withObject "LicenseAssignmentList" + (\ o -> + LicenseAssignmentList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "licensing#licenseAssignmentList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON LicenseAssignmentList where + toJSON LicenseAssignmentList{..} + = object + (catMaybes + [("etag" .=) <$> _lalEtag, + ("nextPageToken" .=) <$> _lalNextPageToken, + Just ("kind" .= _lalKind), + ("items" .=) <$> _lalItems]) + +-- | Template for LiscenseAssignment Resource +-- +-- /See:/ 'licenseAssignment' smart constructor. +data LicenseAssignment = LicenseAssignment + { _laEtags :: !(Maybe Text) + , _laKind :: !Text + , _laSkuId :: !(Maybe Text) + , _laUserId :: !(Maybe Text) + , _laSelfLink :: !(Maybe Text) + , _laProductId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laEtags' +-- +-- * 'laKind' +-- +-- * 'laSkuId' +-- +-- * 'laUserId' +-- +-- * 'laSelfLink' +-- +-- * 'laProductId' +licenseAssignment + :: LicenseAssignment +licenseAssignment = + LicenseAssignment + { _laEtags = Nothing + , _laKind = "licensing#licenseAssignment" + , _laSkuId = Nothing + , _laUserId = Nothing + , _laSelfLink = Nothing + , _laProductId = Nothing + } + +-- | ETag of the resource. +laEtags :: Lens' LicenseAssignment (Maybe Text) +laEtags = lens _laEtags (\ s a -> s{_laEtags = a}) + +-- | Identifies the resource as a LicenseAssignment. +laKind :: Lens' LicenseAssignment Text +laKind = lens _laKind (\ s a -> s{_laKind = a}) + +-- | Name of the sku of the product. +laSkuId :: Lens' LicenseAssignment (Maybe Text) +laSkuId = lens _laSkuId (\ s a -> s{_laSkuId = a}) + +-- | Email id of the user. +laUserId :: Lens' LicenseAssignment (Maybe Text) +laUserId = lens _laUserId (\ s a -> s{_laUserId = a}) + +-- | Link to this page. +laSelfLink :: Lens' LicenseAssignment (Maybe Text) +laSelfLink + = lens _laSelfLink (\ s a -> s{_laSelfLink = a}) + +-- | Name of the product. +laProductId :: Lens' LicenseAssignment (Maybe Text) +laProductId + = lens _laProductId (\ s a -> s{_laProductId = a}) + +instance FromJSON LicenseAssignment where + parseJSON + = withObject "LicenseAssignment" + (\ o -> + LicenseAssignment <$> + (o .:? "etags") <*> + (o .:? "kind" .!= "licensing#licenseAssignment") + <*> (o .:? "skuId") + <*> (o .:? "userId") + <*> (o .:? "selfLink") + <*> (o .:? "productId")) + +instance ToJSON LicenseAssignment where + toJSON LicenseAssignment{..} + = object + (catMaybes + [("etags" .=) <$> _laEtags, Just ("kind" .= _laKind), + ("skuId" .=) <$> _laSkuId, + ("userId" .=) <$> _laUserId, + ("selfLink" .=) <$> _laSelfLink, + ("productId" .=) <$> _laProductId]) diff --git a/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Sum.hs b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Sum.hs new file mode 100644 index 000000000..7313c4e0b --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/AppsLicensing/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsLicensing.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsLicensing.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Delete.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Delete.hs new file mode 100644 index 000000000..06a54301e --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Delete.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Revoke License. +-- +-- /See:/ for @LicensingLicenseAssignmentsDelete@. +module Licensing.LicenseAssignments.Delete + ( + -- * REST Resource + LicenseAssignmentsDeleteAPI + + -- * Creating a Request + , licenseAssignmentsDelete + , LicenseAssignmentsDelete + + -- * Request Lenses + , ladQuotaUser + , ladPrettyPrint + , ladUserIp + , ladSkuId + , ladUserId + , ladKey + , ladOauthToken + , ladProductId + , ladFields + , ladAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsDelete@ which the +-- 'LicenseAssignmentsDelete' request conforms to. +type LicenseAssignmentsDeleteAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "user" :> Capture "userId" Text :> Delete '[JSON] () + +-- | Revoke License. +-- +-- /See:/ 'licenseAssignmentsDelete' smart constructor. +data LicenseAssignmentsDelete = LicenseAssignmentsDelete + { _ladQuotaUser :: !(Maybe Text) + , _ladPrettyPrint :: !Bool + , _ladUserIp :: !(Maybe Text) + , _ladSkuId :: !Text + , _ladUserId :: !Text + , _ladKey :: !(Maybe Text) + , _ladOauthToken :: !(Maybe Text) + , _ladProductId :: !Text + , _ladFields :: !(Maybe Text) + , _ladAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ladQuotaUser' +-- +-- * 'ladPrettyPrint' +-- +-- * 'ladUserIp' +-- +-- * 'ladSkuId' +-- +-- * 'ladUserId' +-- +-- * 'ladKey' +-- +-- * 'ladOauthToken' +-- +-- * 'ladProductId' +-- +-- * 'ladFields' +-- +-- * 'ladAlt' +licenseAssignmentsDelete + :: Text -- ^ 'skuId' + -> Text -- ^ 'userId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsDelete +licenseAssignmentsDelete pLadSkuId_ pLadUserId_ pLadProductId_ = + LicenseAssignmentsDelete + { _ladQuotaUser = Nothing + , _ladPrettyPrint = True + , _ladUserIp = Nothing + , _ladSkuId = pLadSkuId_ + , _ladUserId = pLadUserId_ + , _ladKey = Nothing + , _ladOauthToken = Nothing + , _ladProductId = pLadProductId_ + , _ladFields = Nothing + , _ladAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ladQuotaUser :: Lens' LicenseAssignmentsDelete' (Maybe Text) +ladQuotaUser + = lens _ladQuotaUser (\ s a -> s{_ladQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ladPrettyPrint :: Lens' LicenseAssignmentsDelete' Bool +ladPrettyPrint + = lens _ladPrettyPrint + (\ s a -> s{_ladPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ladUserIp :: Lens' LicenseAssignmentsDelete' (Maybe Text) +ladUserIp + = lens _ladUserIp (\ s a -> s{_ladUserIp = a}) + +-- | Name for sku +ladSkuId :: Lens' LicenseAssignmentsDelete' Text +ladSkuId = lens _ladSkuId (\ s a -> s{_ladSkuId = a}) + +-- | email id or unique Id of the user +ladUserId :: Lens' LicenseAssignmentsDelete' Text +ladUserId + = lens _ladUserId (\ s a -> s{_ladUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ladKey :: Lens' LicenseAssignmentsDelete' (Maybe Text) +ladKey = lens _ladKey (\ s a -> s{_ladKey = a}) + +-- | OAuth 2.0 token for the current user. +ladOauthToken :: Lens' LicenseAssignmentsDelete' (Maybe Text) +ladOauthToken + = lens _ladOauthToken + (\ s a -> s{_ladOauthToken = a}) + +-- | Name for product +ladProductId :: Lens' LicenseAssignmentsDelete' Text +ladProductId + = lens _ladProductId (\ s a -> s{_ladProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +ladFields :: Lens' LicenseAssignmentsDelete' (Maybe Text) +ladFields + = lens _ladFields (\ s a -> s{_ladFields = a}) + +-- | Data format for the response. +ladAlt :: Lens' LicenseAssignmentsDelete' Text +ladAlt = lens _ladAlt (\ s a -> s{_ladAlt = a}) + +instance GoogleRequest LicenseAssignmentsDelete' + where + type Rs LicenseAssignmentsDelete' = () + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u LicenseAssignmentsDelete{..} + = go _ladQuotaUser _ladPrettyPrint _ladUserIp + _ladSkuId + _ladUserId + _ladKey + _ladOauthToken + _ladProductId + _ladFields + _ladAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsDeleteAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Get.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Get.hs new file mode 100644 index 000000000..83d0f407d --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get license assignment of a particular product and sku for a user +-- +-- /See:/ for @LicensingLicenseAssignmentsGet@. +module Licensing.LicenseAssignments.Get + ( + -- * REST Resource + LicenseAssignmentsGetAPI + + -- * Creating a Request + , licenseAssignmentsGet + , LicenseAssignmentsGet + + -- * Request Lenses + , lagQuotaUser + , lagPrettyPrint + , lagUserIp + , lagSkuId + , lagUserId + , lagKey + , lagOauthToken + , lagProductId + , lagFields + , lagAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsGet@ which the +-- 'LicenseAssignmentsGet' request conforms to. +type LicenseAssignmentsGetAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "user" :> + Capture "userId" Text :> + Get '[JSON] LicenseAssignment + +-- | Get license assignment of a particular product and sku for a user +-- +-- /See:/ 'licenseAssignmentsGet' smart constructor. +data LicenseAssignmentsGet = LicenseAssignmentsGet + { _lagQuotaUser :: !(Maybe Text) + , _lagPrettyPrint :: !Bool + , _lagUserIp :: !(Maybe Text) + , _lagSkuId :: !Text + , _lagUserId :: !Text + , _lagKey :: !(Maybe Text) + , _lagOauthToken :: !(Maybe Text) + , _lagProductId :: !Text + , _lagFields :: !(Maybe Text) + , _lagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lagQuotaUser' +-- +-- * 'lagPrettyPrint' +-- +-- * 'lagUserIp' +-- +-- * 'lagSkuId' +-- +-- * 'lagUserId' +-- +-- * 'lagKey' +-- +-- * 'lagOauthToken' +-- +-- * 'lagProductId' +-- +-- * 'lagFields' +-- +-- * 'lagAlt' +licenseAssignmentsGet + :: Text -- ^ 'skuId' + -> Text -- ^ 'userId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsGet +licenseAssignmentsGet pLagSkuId_ pLagUserId_ pLagProductId_ = + LicenseAssignmentsGet + { _lagQuotaUser = Nothing + , _lagPrettyPrint = True + , _lagUserIp = Nothing + , _lagSkuId = pLagSkuId_ + , _lagUserId = pLagUserId_ + , _lagKey = Nothing + , _lagOauthToken = Nothing + , _lagProductId = pLagProductId_ + , _lagFields = Nothing + , _lagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lagQuotaUser :: Lens' LicenseAssignmentsGet' (Maybe Text) +lagQuotaUser + = lens _lagQuotaUser (\ s a -> s{_lagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lagPrettyPrint :: Lens' LicenseAssignmentsGet' Bool +lagPrettyPrint + = lens _lagPrettyPrint + (\ s a -> s{_lagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lagUserIp :: Lens' LicenseAssignmentsGet' (Maybe Text) +lagUserIp + = lens _lagUserIp (\ s a -> s{_lagUserIp = a}) + +-- | Name for sku +lagSkuId :: Lens' LicenseAssignmentsGet' Text +lagSkuId = lens _lagSkuId (\ s a -> s{_lagSkuId = a}) + +-- | email id or unique Id of the user +lagUserId :: Lens' LicenseAssignmentsGet' Text +lagUserId + = lens _lagUserId (\ s a -> s{_lagUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lagKey :: Lens' LicenseAssignmentsGet' (Maybe Text) +lagKey = lens _lagKey (\ s a -> s{_lagKey = a}) + +-- | OAuth 2.0 token for the current user. +lagOauthToken :: Lens' LicenseAssignmentsGet' (Maybe Text) +lagOauthToken + = lens _lagOauthToken + (\ s a -> s{_lagOauthToken = a}) + +-- | Name for product +lagProductId :: Lens' LicenseAssignmentsGet' Text +lagProductId + = lens _lagProductId (\ s a -> s{_lagProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +lagFields :: Lens' LicenseAssignmentsGet' (Maybe Text) +lagFields + = lens _lagFields (\ s a -> s{_lagFields = a}) + +-- | Data format for the response. +lagAlt :: Lens' LicenseAssignmentsGet' Text +lagAlt = lens _lagAlt (\ s a -> s{_lagAlt = a}) + +instance GoogleRequest LicenseAssignmentsGet' where + type Rs LicenseAssignmentsGet' = LicenseAssignment + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u LicenseAssignmentsGet{..} + = go _lagQuotaUser _lagPrettyPrint _lagUserIp + _lagSkuId + _lagUserId + _lagKey + _lagOauthToken + _lagProductId + _lagFields + _lagAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsGetAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Insert.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Insert.hs new file mode 100644 index 000000000..8507542d0 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Insert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Assign License. +-- +-- /See:/ for @LicensingLicenseAssignmentsInsert@. +module Licensing.LicenseAssignments.Insert + ( + -- * REST Resource + LicenseAssignmentsInsertAPI + + -- * Creating a Request + , licenseAssignmentsInsert + , LicenseAssignmentsInsert + + -- * Request Lenses + , laiQuotaUser + , laiPrettyPrint + , laiUserIp + , laiSkuId + , laiKey + , laiOauthToken + , laiProductId + , laiFields + , laiAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsInsert@ which the +-- 'LicenseAssignmentsInsert' request conforms to. +type LicenseAssignmentsInsertAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "user" :> Post '[JSON] LicenseAssignment + +-- | Assign License. +-- +-- /See:/ 'licenseAssignmentsInsert' smart constructor. +data LicenseAssignmentsInsert = LicenseAssignmentsInsert + { _laiQuotaUser :: !(Maybe Text) + , _laiPrettyPrint :: !Bool + , _laiUserIp :: !(Maybe Text) + , _laiSkuId :: !Text + , _laiKey :: !(Maybe Text) + , _laiOauthToken :: !(Maybe Text) + , _laiProductId :: !Text + , _laiFields :: !(Maybe Text) + , _laiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laiQuotaUser' +-- +-- * 'laiPrettyPrint' +-- +-- * 'laiUserIp' +-- +-- * 'laiSkuId' +-- +-- * 'laiKey' +-- +-- * 'laiOauthToken' +-- +-- * 'laiProductId' +-- +-- * 'laiFields' +-- +-- * 'laiAlt' +licenseAssignmentsInsert + :: Text -- ^ 'skuId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsInsert +licenseAssignmentsInsert pLaiSkuId_ pLaiProductId_ = + LicenseAssignmentsInsert + { _laiQuotaUser = Nothing + , _laiPrettyPrint = True + , _laiUserIp = Nothing + , _laiSkuId = pLaiSkuId_ + , _laiKey = Nothing + , _laiOauthToken = Nothing + , _laiProductId = pLaiProductId_ + , _laiFields = Nothing + , _laiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +laiQuotaUser :: Lens' LicenseAssignmentsInsert' (Maybe Text) +laiQuotaUser + = lens _laiQuotaUser (\ s a -> s{_laiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +laiPrettyPrint :: Lens' LicenseAssignmentsInsert' Bool +laiPrettyPrint + = lens _laiPrettyPrint + (\ s a -> s{_laiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +laiUserIp :: Lens' LicenseAssignmentsInsert' (Maybe Text) +laiUserIp + = lens _laiUserIp (\ s a -> s{_laiUserIp = a}) + +-- | Name for sku +laiSkuId :: Lens' LicenseAssignmentsInsert' Text +laiSkuId = lens _laiSkuId (\ s a -> s{_laiSkuId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +laiKey :: Lens' LicenseAssignmentsInsert' (Maybe Text) +laiKey = lens _laiKey (\ s a -> s{_laiKey = a}) + +-- | OAuth 2.0 token for the current user. +laiOauthToken :: Lens' LicenseAssignmentsInsert' (Maybe Text) +laiOauthToken + = lens _laiOauthToken + (\ s a -> s{_laiOauthToken = a}) + +-- | Name for product +laiProductId :: Lens' LicenseAssignmentsInsert' Text +laiProductId + = lens _laiProductId (\ s a -> s{_laiProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +laiFields :: Lens' LicenseAssignmentsInsert' (Maybe Text) +laiFields + = lens _laiFields (\ s a -> s{_laiFields = a}) + +-- | Data format for the response. +laiAlt :: Lens' LicenseAssignmentsInsert' Text +laiAlt = lens _laiAlt (\ s a -> s{_laiAlt = a}) + +instance GoogleRequest LicenseAssignmentsInsert' + where + type Rs LicenseAssignmentsInsert' = LicenseAssignment + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u LicenseAssignmentsInsert{..} + = go _laiQuotaUser _laiPrettyPrint _laiUserIp + _laiSkuId + _laiKey + _laiOauthToken + _laiProductId + _laiFields + _laiAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsInsertAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProduct.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProduct.hs new file mode 100644 index 000000000..5c9c71114 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProduct.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.ListForProduct +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List license assignments for given product of the customer. +-- +-- /See:/ for @LicensingLicenseAssignmentsListForProduct@. +module Licensing.LicenseAssignments.ListForProduct + ( + -- * REST Resource + LicenseAssignmentsListForProductAPI + + -- * Creating a Request + , licenseAssignmentsListForProduct + , LicenseAssignmentsListForProduct + + -- * Request Lenses + , lalfpQuotaUser + , lalfpPrettyPrint + , lalfpUserIp + , lalfpCustomerId + , lalfpKey + , lalfpPageToken + , lalfpOauthToken + , lalfpProductId + , lalfpMaxResults + , lalfpFields + , lalfpAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsListForProduct@ which the +-- 'LicenseAssignmentsListForProduct' request conforms to. +type LicenseAssignmentsListForProductAPI = + Capture "productId" Text :> + "users" :> + QueryParam "customerId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] LicenseAssignmentList + +-- | List license assignments for given product of the customer. +-- +-- /See:/ 'licenseAssignmentsListForProduct' smart constructor. +data LicenseAssignmentsListForProduct = LicenseAssignmentsListForProduct + { _lalfpQuotaUser :: !(Maybe Text) + , _lalfpPrettyPrint :: !Bool + , _lalfpUserIp :: !(Maybe Text) + , _lalfpCustomerId :: !Text + , _lalfpKey :: !(Maybe Text) + , _lalfpPageToken :: !Text + , _lalfpOauthToken :: !(Maybe Text) + , _lalfpProductId :: !Text + , _lalfpMaxResults :: !Word32 + , _lalfpFields :: !(Maybe Text) + , _lalfpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsListForProduct'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lalfpQuotaUser' +-- +-- * 'lalfpPrettyPrint' +-- +-- * 'lalfpUserIp' +-- +-- * 'lalfpCustomerId' +-- +-- * 'lalfpKey' +-- +-- * 'lalfpPageToken' +-- +-- * 'lalfpOauthToken' +-- +-- * 'lalfpProductId' +-- +-- * 'lalfpMaxResults' +-- +-- * 'lalfpFields' +-- +-- * 'lalfpAlt' +licenseAssignmentsListForProduct + :: Text -- ^ 'customerId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsListForProduct +licenseAssignmentsListForProduct pLalfpCustomerId_ pLalfpProductId_ = + LicenseAssignmentsListForProduct + { _lalfpQuotaUser = Nothing + , _lalfpPrettyPrint = True + , _lalfpUserIp = Nothing + , _lalfpCustomerId = pLalfpCustomerId_ + , _lalfpKey = Nothing + , _lalfpPageToken = "" + , _lalfpOauthToken = Nothing + , _lalfpProductId = pLalfpProductId_ + , _lalfpMaxResults = 100 + , _lalfpFields = Nothing + , _lalfpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lalfpQuotaUser :: Lens' LicenseAssignmentsListForProduct' (Maybe Text) +lalfpQuotaUser + = lens _lalfpQuotaUser + (\ s a -> s{_lalfpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lalfpPrettyPrint :: Lens' LicenseAssignmentsListForProduct' Bool +lalfpPrettyPrint + = lens _lalfpPrettyPrint + (\ s a -> s{_lalfpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lalfpUserIp :: Lens' LicenseAssignmentsListForProduct' (Maybe Text) +lalfpUserIp + = lens _lalfpUserIp (\ s a -> s{_lalfpUserIp = a}) + +-- | CustomerId represents the customer for whom licenseassignments are +-- queried +lalfpCustomerId :: Lens' LicenseAssignmentsListForProduct' Text +lalfpCustomerId + = lens _lalfpCustomerId + (\ s a -> s{_lalfpCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lalfpKey :: Lens' LicenseAssignmentsListForProduct' (Maybe Text) +lalfpKey = lens _lalfpKey (\ s a -> s{_lalfpKey = a}) + +-- | Token to fetch the next page.Optional. By default server will return +-- first page +lalfpPageToken :: Lens' LicenseAssignmentsListForProduct' Text +lalfpPageToken + = lens _lalfpPageToken + (\ s a -> s{_lalfpPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lalfpOauthToken :: Lens' LicenseAssignmentsListForProduct' (Maybe Text) +lalfpOauthToken + = lens _lalfpOauthToken + (\ s a -> s{_lalfpOauthToken = a}) + +-- | Name for product +lalfpProductId :: Lens' LicenseAssignmentsListForProduct' Text +lalfpProductId + = lens _lalfpProductId + (\ s a -> s{_lalfpProductId = a}) + +-- | Maximum number of campaigns to return at one time. Must be positive. +-- Optional. Default value is 100. +lalfpMaxResults :: Lens' LicenseAssignmentsListForProduct' Word32 +lalfpMaxResults + = lens _lalfpMaxResults + (\ s a -> s{_lalfpMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lalfpFields :: Lens' LicenseAssignmentsListForProduct' (Maybe Text) +lalfpFields + = lens _lalfpFields (\ s a -> s{_lalfpFields = a}) + +-- | Data format for the response. +lalfpAlt :: Lens' LicenseAssignmentsListForProduct' Text +lalfpAlt = lens _lalfpAlt (\ s a -> s{_lalfpAlt = a}) + +instance GoogleRequest + LicenseAssignmentsListForProduct' where + type Rs LicenseAssignmentsListForProduct' = + LicenseAssignmentList + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u + LicenseAssignmentsListForProduct{..} + = go _lalfpQuotaUser _lalfpPrettyPrint _lalfpUserIp + (Just _lalfpCustomerId) + _lalfpKey + (Just _lalfpPageToken) + _lalfpOauthToken + _lalfpProductId + (Just _lalfpMaxResults) + _lalfpFields + _lalfpAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsListForProductAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProductAndSku.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProductAndSku.hs new file mode 100644 index 000000000..4b58e7945 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/ListForProductAndSku.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.ListForProductAndSku +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List license assignments for given product and sku of the customer. +-- +-- /See:/ for @LicensingLicenseAssignmentsListForProductAndSku@. +module Licensing.LicenseAssignments.ListForProductAndSku + ( + -- * REST Resource + LicenseAssignmentsListForProductAndSkuAPI + + -- * Creating a Request + , licenseAssignmentsListForProductAndSku + , LicenseAssignmentsListForProductAndSku + + -- * Request Lenses + , lalfpasQuotaUser + , lalfpasPrettyPrint + , lalfpasUserIp + , lalfpasSkuId + , lalfpasCustomerId + , lalfpasKey + , lalfpasPageToken + , lalfpasOauthToken + , lalfpasProductId + , lalfpasMaxResults + , lalfpasFields + , lalfpasAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsListForProductAndSku@ which the +-- 'LicenseAssignmentsListForProductAndSku' request conforms to. +type LicenseAssignmentsListForProductAndSkuAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "users" :> + QueryParam "customerId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] LicenseAssignmentList + +-- | List license assignments for given product and sku of the customer. +-- +-- /See:/ 'licenseAssignmentsListForProductAndSku' smart constructor. +data LicenseAssignmentsListForProductAndSku = LicenseAssignmentsListForProductAndSku + { _lalfpasQuotaUser :: !(Maybe Text) + , _lalfpasPrettyPrint :: !Bool + , _lalfpasUserIp :: !(Maybe Text) + , _lalfpasSkuId :: !Text + , _lalfpasCustomerId :: !Text + , _lalfpasKey :: !(Maybe Text) + , _lalfpasPageToken :: !Text + , _lalfpasOauthToken :: !(Maybe Text) + , _lalfpasProductId :: !Text + , _lalfpasMaxResults :: !Word32 + , _lalfpasFields :: !(Maybe Text) + , _lalfpasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsListForProductAndSku'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lalfpasQuotaUser' +-- +-- * 'lalfpasPrettyPrint' +-- +-- * 'lalfpasUserIp' +-- +-- * 'lalfpasSkuId' +-- +-- * 'lalfpasCustomerId' +-- +-- * 'lalfpasKey' +-- +-- * 'lalfpasPageToken' +-- +-- * 'lalfpasOauthToken' +-- +-- * 'lalfpasProductId' +-- +-- * 'lalfpasMaxResults' +-- +-- * 'lalfpasFields' +-- +-- * 'lalfpasAlt' +licenseAssignmentsListForProductAndSku + :: Text -- ^ 'skuId' + -> Text -- ^ 'customerId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsListForProductAndSku +licenseAssignmentsListForProductAndSku pLalfpasSkuId_ pLalfpasCustomerId_ pLalfpasProductId_ = + LicenseAssignmentsListForProductAndSku + { _lalfpasQuotaUser = Nothing + , _lalfpasPrettyPrint = True + , _lalfpasUserIp = Nothing + , _lalfpasSkuId = pLalfpasSkuId_ + , _lalfpasCustomerId = pLalfpasCustomerId_ + , _lalfpasKey = Nothing + , _lalfpasPageToken = "" + , _lalfpasOauthToken = Nothing + , _lalfpasProductId = pLalfpasProductId_ + , _lalfpasMaxResults = 100 + , _lalfpasFields = Nothing + , _lalfpasAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lalfpasQuotaUser :: Lens' LicenseAssignmentsListForProductAndSku' (Maybe Text) +lalfpasQuotaUser + = lens _lalfpasQuotaUser + (\ s a -> s{_lalfpasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lalfpasPrettyPrint :: Lens' LicenseAssignmentsListForProductAndSku' Bool +lalfpasPrettyPrint + = lens _lalfpasPrettyPrint + (\ s a -> s{_lalfpasPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lalfpasUserIp :: Lens' LicenseAssignmentsListForProductAndSku' (Maybe Text) +lalfpasUserIp + = lens _lalfpasUserIp + (\ s a -> s{_lalfpasUserIp = a}) + +-- | Name for sku +lalfpasSkuId :: Lens' LicenseAssignmentsListForProductAndSku' Text +lalfpasSkuId + = lens _lalfpasSkuId (\ s a -> s{_lalfpasSkuId = a}) + +-- | CustomerId represents the customer for whom licenseassignments are +-- queried +lalfpasCustomerId :: Lens' LicenseAssignmentsListForProductAndSku' Text +lalfpasCustomerId + = lens _lalfpasCustomerId + (\ s a -> s{_lalfpasCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lalfpasKey :: Lens' LicenseAssignmentsListForProductAndSku' (Maybe Text) +lalfpasKey + = lens _lalfpasKey (\ s a -> s{_lalfpasKey = a}) + +-- | Token to fetch the next page.Optional. By default server will return +-- first page +lalfpasPageToken :: Lens' LicenseAssignmentsListForProductAndSku' Text +lalfpasPageToken + = lens _lalfpasPageToken + (\ s a -> s{_lalfpasPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lalfpasOauthToken :: Lens' LicenseAssignmentsListForProductAndSku' (Maybe Text) +lalfpasOauthToken + = lens _lalfpasOauthToken + (\ s a -> s{_lalfpasOauthToken = a}) + +-- | Name for product +lalfpasProductId :: Lens' LicenseAssignmentsListForProductAndSku' Text +lalfpasProductId + = lens _lalfpasProductId + (\ s a -> s{_lalfpasProductId = a}) + +-- | Maximum number of campaigns to return at one time. Must be positive. +-- Optional. Default value is 100. +lalfpasMaxResults :: Lens' LicenseAssignmentsListForProductAndSku' Word32 +lalfpasMaxResults + = lens _lalfpasMaxResults + (\ s a -> s{_lalfpasMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lalfpasFields :: Lens' LicenseAssignmentsListForProductAndSku' (Maybe Text) +lalfpasFields + = lens _lalfpasFields + (\ s a -> s{_lalfpasFields = a}) + +-- | Data format for the response. +lalfpasAlt :: Lens' LicenseAssignmentsListForProductAndSku' Text +lalfpasAlt + = lens _lalfpasAlt (\ s a -> s{_lalfpasAlt = a}) + +instance GoogleRequest + LicenseAssignmentsListForProductAndSku' where + type Rs LicenseAssignmentsListForProductAndSku' = + LicenseAssignmentList + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u + LicenseAssignmentsListForProductAndSku{..} + = go _lalfpasQuotaUser _lalfpasPrettyPrint + _lalfpasUserIp + _lalfpasSkuId + (Just _lalfpasCustomerId) + _lalfpasKey + (Just _lalfpasPageToken) + _lalfpasOauthToken + _lalfpasProductId + (Just _lalfpasMaxResults) + _lalfpasFields + _lalfpasAlt + where go + = clientWithRoute + (Proxy :: + Proxy LicenseAssignmentsListForProductAndSkuAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Patch.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Patch.hs new file mode 100644 index 000000000..7039b8622 --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Patch.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Assign License. This method supports patch semantics. +-- +-- /See:/ for @LicensingLicenseAssignmentsPatch@. +module Licensing.LicenseAssignments.Patch + ( + -- * REST Resource + LicenseAssignmentsPatchAPI + + -- * Creating a Request + , licenseAssignmentsPatch + , LicenseAssignmentsPatch + + -- * Request Lenses + , lapQuotaUser + , lapPrettyPrint + , lapUserIp + , lapSkuId + , lapUserId + , lapKey + , lapOauthToken + , lapProductId + , lapFields + , lapAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsPatch@ which the +-- 'LicenseAssignmentsPatch' request conforms to. +type LicenseAssignmentsPatchAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "user" :> + Capture "userId" Text :> + Patch '[JSON] LicenseAssignment + +-- | Assign License. This method supports patch semantics. +-- +-- /See:/ 'licenseAssignmentsPatch' smart constructor. +data LicenseAssignmentsPatch = LicenseAssignmentsPatch + { _lapQuotaUser :: !(Maybe Text) + , _lapPrettyPrint :: !Bool + , _lapUserIp :: !(Maybe Text) + , _lapSkuId :: !Text + , _lapUserId :: !Text + , _lapKey :: !(Maybe Text) + , _lapOauthToken :: !(Maybe Text) + , _lapProductId :: !Text + , _lapFields :: !(Maybe Text) + , _lapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lapQuotaUser' +-- +-- * 'lapPrettyPrint' +-- +-- * 'lapUserIp' +-- +-- * 'lapSkuId' +-- +-- * 'lapUserId' +-- +-- * 'lapKey' +-- +-- * 'lapOauthToken' +-- +-- * 'lapProductId' +-- +-- * 'lapFields' +-- +-- * 'lapAlt' +licenseAssignmentsPatch + :: Text -- ^ 'skuId' + -> Text -- ^ 'userId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsPatch +licenseAssignmentsPatch pLapSkuId_ pLapUserId_ pLapProductId_ = + LicenseAssignmentsPatch + { _lapQuotaUser = Nothing + , _lapPrettyPrint = True + , _lapUserIp = Nothing + , _lapSkuId = pLapSkuId_ + , _lapUserId = pLapUserId_ + , _lapKey = Nothing + , _lapOauthToken = Nothing + , _lapProductId = pLapProductId_ + , _lapFields = Nothing + , _lapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lapQuotaUser :: Lens' LicenseAssignmentsPatch' (Maybe Text) +lapQuotaUser + = lens _lapQuotaUser (\ s a -> s{_lapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lapPrettyPrint :: Lens' LicenseAssignmentsPatch' Bool +lapPrettyPrint + = lens _lapPrettyPrint + (\ s a -> s{_lapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lapUserIp :: Lens' LicenseAssignmentsPatch' (Maybe Text) +lapUserIp + = lens _lapUserIp (\ s a -> s{_lapUserIp = a}) + +-- | Name for sku for which license would be revoked +lapSkuId :: Lens' LicenseAssignmentsPatch' Text +lapSkuId = lens _lapSkuId (\ s a -> s{_lapSkuId = a}) + +-- | email id or unique Id of the user +lapUserId :: Lens' LicenseAssignmentsPatch' Text +lapUserId + = lens _lapUserId (\ s a -> s{_lapUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lapKey :: Lens' LicenseAssignmentsPatch' (Maybe Text) +lapKey = lens _lapKey (\ s a -> s{_lapKey = a}) + +-- | OAuth 2.0 token for the current user. +lapOauthToken :: Lens' LicenseAssignmentsPatch' (Maybe Text) +lapOauthToken + = lens _lapOauthToken + (\ s a -> s{_lapOauthToken = a}) + +-- | Name for product +lapProductId :: Lens' LicenseAssignmentsPatch' Text +lapProductId + = lens _lapProductId (\ s a -> s{_lapProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +lapFields :: Lens' LicenseAssignmentsPatch' (Maybe Text) +lapFields + = lens _lapFields (\ s a -> s{_lapFields = a}) + +-- | Data format for the response. +lapAlt :: Lens' LicenseAssignmentsPatch' Text +lapAlt = lens _lapAlt (\ s a -> s{_lapAlt = a}) + +instance GoogleRequest LicenseAssignmentsPatch' where + type Rs LicenseAssignmentsPatch' = LicenseAssignment + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u LicenseAssignmentsPatch{..} + = go _lapQuotaUser _lapPrettyPrint _lapUserIp + _lapSkuId + _lapUserId + _lapKey + _lapOauthToken + _lapProductId + _lapFields + _lapAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsPatchAPI) + r + u diff --git a/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Update.hs b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Update.hs new file mode 100644 index 000000000..fc4c16b3d --- /dev/null +++ b/gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Update.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Licensing.LicenseAssignments.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Assign License. +-- +-- /See:/ for @LicensingLicenseAssignmentsUpdate@. +module Licensing.LicenseAssignments.Update + ( + -- * REST Resource + LicenseAssignmentsUpdateAPI + + -- * Creating a Request + , licenseAssignmentsUpdate + , LicenseAssignmentsUpdate + + -- * Request Lenses + , lauQuotaUser + , lauPrettyPrint + , lauUserIp + , lauSkuId + , lauUserId + , lauKey + , lauOauthToken + , lauProductId + , lauFields + , lauAlt + ) where + +import Network.Google.AppsLicensing.Types +import Network.Google.Prelude + +-- | A resource alias for @LicensingLicenseAssignmentsUpdate@ which the +-- 'LicenseAssignmentsUpdate' request conforms to. +type LicenseAssignmentsUpdateAPI = + Capture "productId" Text :> + "sku" :> + Capture "skuId" Text :> + "user" :> + Capture "userId" Text :> + Put '[JSON] LicenseAssignment + +-- | Assign License. +-- +-- /See:/ 'licenseAssignmentsUpdate' smart constructor. +data LicenseAssignmentsUpdate = LicenseAssignmentsUpdate + { _lauQuotaUser :: !(Maybe Text) + , _lauPrettyPrint :: !Bool + , _lauUserIp :: !(Maybe Text) + , _lauSkuId :: !Text + , _lauUserId :: !Text + , _lauKey :: !(Maybe Text) + , _lauOauthToken :: !(Maybe Text) + , _lauProductId :: !Text + , _lauFields :: !(Maybe Text) + , _lauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicenseAssignmentsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lauQuotaUser' +-- +-- * 'lauPrettyPrint' +-- +-- * 'lauUserIp' +-- +-- * 'lauSkuId' +-- +-- * 'lauUserId' +-- +-- * 'lauKey' +-- +-- * 'lauOauthToken' +-- +-- * 'lauProductId' +-- +-- * 'lauFields' +-- +-- * 'lauAlt' +licenseAssignmentsUpdate + :: Text -- ^ 'skuId' + -> Text -- ^ 'userId' + -> Text -- ^ 'productId' + -> LicenseAssignmentsUpdate +licenseAssignmentsUpdate pLauSkuId_ pLauUserId_ pLauProductId_ = + LicenseAssignmentsUpdate + { _lauQuotaUser = Nothing + , _lauPrettyPrint = True + , _lauUserIp = Nothing + , _lauSkuId = pLauSkuId_ + , _lauUserId = pLauUserId_ + , _lauKey = Nothing + , _lauOauthToken = Nothing + , _lauProductId = pLauProductId_ + , _lauFields = Nothing + , _lauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lauQuotaUser :: Lens' LicenseAssignmentsUpdate' (Maybe Text) +lauQuotaUser + = lens _lauQuotaUser (\ s a -> s{_lauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lauPrettyPrint :: Lens' LicenseAssignmentsUpdate' Bool +lauPrettyPrint + = lens _lauPrettyPrint + (\ s a -> s{_lauPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lauUserIp :: Lens' LicenseAssignmentsUpdate' (Maybe Text) +lauUserIp + = lens _lauUserIp (\ s a -> s{_lauUserIp = a}) + +-- | Name for sku for which license would be revoked +lauSkuId :: Lens' LicenseAssignmentsUpdate' Text +lauSkuId = lens _lauSkuId (\ s a -> s{_lauSkuId = a}) + +-- | email id or unique Id of the user +lauUserId :: Lens' LicenseAssignmentsUpdate' Text +lauUserId + = lens _lauUserId (\ s a -> s{_lauUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lauKey :: Lens' LicenseAssignmentsUpdate' (Maybe Text) +lauKey = lens _lauKey (\ s a -> s{_lauKey = a}) + +-- | OAuth 2.0 token for the current user. +lauOauthToken :: Lens' LicenseAssignmentsUpdate' (Maybe Text) +lauOauthToken + = lens _lauOauthToken + (\ s a -> s{_lauOauthToken = a}) + +-- | Name for product +lauProductId :: Lens' LicenseAssignmentsUpdate' Text +lauProductId + = lens _lauProductId (\ s a -> s{_lauProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +lauFields :: Lens' LicenseAssignmentsUpdate' (Maybe Text) +lauFields + = lens _lauFields (\ s a -> s{_lauFields = a}) + +-- | Data format for the response. +lauAlt :: Lens' LicenseAssignmentsUpdate' Text +lauAlt = lens _lauAlt (\ s a -> s{_lauAlt = a}) + +instance GoogleRequest LicenseAssignmentsUpdate' + where + type Rs LicenseAssignmentsUpdate' = LicenseAssignment + request = requestWithRoute defReq appsLicensingURL + requestWithRoute r u LicenseAssignmentsUpdate{..} + = go _lauQuotaUser _lauPrettyPrint _lauUserIp + _lauSkuId + _lauUserId + _lauKey + _lauOauthToken + _lauProductId + _lauFields + _lauAlt + where go + = clientWithRoute + (Proxy :: Proxy LicenseAssignmentsUpdateAPI) + r + u diff --git a/gogol-apps-licensing/gogol-apps-licensing.cabal b/gogol-apps-licensing/gogol-apps-licensing.cabal new file mode 100644 index 000000000..46971a9d8 --- /dev/null +++ b/gogol-apps-licensing/gogol-apps-licensing.cabal @@ -0,0 +1,49 @@ +name: gogol-apps-licensing +version: 0.0.1 +synopsis: Enterprise License Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Licensing API to view and manage license for your domain. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppsLicensing + , Network.Google.AppsLicensing.Types + , Network.Google.Resource.Licensing.LicenseAssignments.Delete + , Network.Google.Resource.Licensing.LicenseAssignments.Get + , Network.Google.Resource.Licensing.LicenseAssignments.Insert + , Network.Google.Resource.Licensing.LicenseAssignments.ListForProduct + , Network.Google.Resource.Licensing.LicenseAssignments.ListForProductAndSku + , Network.Google.Resource.Licensing.LicenseAssignments.Patch + , Network.Google.Resource.Licensing.LicenseAssignments.Update + + other-modules: + Network.Google.AppsLicensing.Types.Product + , Network.Google.AppsLicensing.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-apps-licensing/src/.gitkeep b/gogol-apps-licensing/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-apps-reseller/LICENSE b/gogol-apps-reseller/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-apps-reseller/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-apps-reseller/Makefile b/gogol-apps-reseller/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-apps-reseller/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-apps-reseller/README.md b/gogol-apps-reseller/README.md new file mode 100644 index 000000000..2f621b7f4 --- /dev/null +++ b/gogol-apps-reseller/README.md @@ -0,0 +1,28 @@ +# gogol-apps-reseller + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Enterprise Apps Reseller API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-apps-reseller` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-apps-reseller/Setup.hs b/gogol-apps-reseller/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-apps-reseller/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-apps-reseller/gen/Network/Google/AppsReseller.hs b/gogol-apps-reseller/gen/Network/Google/AppsReseller.hs new file mode 100644 index 000000000..a4c41898b --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/AppsReseller.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppsReseller +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you create and manage your customers and their subscriptions. +-- +-- /See:/ +module Network.Google.AppsReseller + ( + -- * API + AppsResellerAPI + , appsResellerAPI + , appsResellerURL + + -- * Service Methods + + -- * REST Resources + + -- ** ResellerCustomersGet + , module Reseller.Customers.Get + + -- ** ResellerCustomersInsert + , module Reseller.Customers.Insert + + -- ** ResellerCustomersPatch + , module Reseller.Customers.Patch + + -- ** ResellerCustomersUpdate + , module Reseller.Customers.Update + + -- ** ResellerSubscriptionsActivate + , module Reseller.Subscriptions.Activate + + -- ** ResellerSubscriptionsChangePlan + , module Reseller.Subscriptions.ChangePlan + + -- ** ResellerSubscriptionsChangeRenewalSettings + , module Reseller.Subscriptions.ChangeRenewalSettings + + -- ** ResellerSubscriptionsChangeSeats + , module Reseller.Subscriptions.ChangeSeats + + -- ** ResellerSubscriptionsDelete + , module Reseller.Subscriptions.Delete + + -- ** ResellerSubscriptionsGet + , module Reseller.Subscriptions.Get + + -- ** ResellerSubscriptionsInsert + , module Reseller.Subscriptions.Insert + + -- ** ResellerSubscriptionsList + , module Reseller.Subscriptions.List + + -- ** ResellerSubscriptionsStartPaidService + , module Reseller.Subscriptions.StartPaidService + + -- ** ResellerSubscriptionsSuspend + , module Reseller.Subscriptions.Suspend + + -- * Types + + -- ** Address + , Address + , address + , aOrganizationName + , aKind + , aPostalCode + , aAddressLine1 + , aLocality + , aContactName + , aAddressLine2 + , aCountryCode + , aRegion + , aAddressLine3 + + -- ** Customer + , Customer + , customer + , cResourceUiUrl + , cKind + , cCustomerId + , cAlternateEmail + , cCustomerDomain + , cPhoneNumber + , cPostalAddress + + -- ** ChangePlanRequest + , ChangePlanRequest + , changePlanRequest + , cprKind + , cprPlanName + , cprPurchaseOrderId + , cprSeats + + -- ** Seats + , Seats + , seats + , sNumberOfSeats + , sMaximumNumberOfSeats + , sLicensedNumberOfSeats + , sKind + + -- ** Subscriptions + , Subscriptions + , subscriptions + , subNextPageToken + , subKind + , subSubscriptions + + -- ** Subscription + , Subscription + , subscription + , ssCreationTime + , ssBillingMethod + , ssStatus + , ssTrialSettings + , ssResourceUiUrl + , ssKind + , ssSkuId + , ssPlan + , ssCustomerId + , ssSuspensionReasons + , ssTransferInfo + , ssPurchaseOrderId + , ssSeats + , ssRenewalSettings + , ssSubscriptionId + + -- ** RenewalSettings + , RenewalSettings + , renewalSettings + , rsKind + , rsRenewalType + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude +import Network.Google.Resource.Reseller.Customers.Get +import Network.Google.Resource.Reseller.Customers.Insert +import Network.Google.Resource.Reseller.Customers.Patch +import Network.Google.Resource.Reseller.Customers.Update +import Network.Google.Resource.Reseller.Subscriptions.Activate +import Network.Google.Resource.Reseller.Subscriptions.ChangePlan +import Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings +import Network.Google.Resource.Reseller.Subscriptions.ChangeSeats +import Network.Google.Resource.Reseller.Subscriptions.Delete +import Network.Google.Resource.Reseller.Subscriptions.Get +import Network.Google.Resource.Reseller.Subscriptions.Insert +import Network.Google.Resource.Reseller.Subscriptions.List +import Network.Google.Resource.Reseller.Subscriptions.StartPaidService +import Network.Google.Resource.Reseller.Subscriptions.Suspend + +{- $resources +TODO +-} + +type AppsResellerAPI = Customers :<|> Subscriptions + +appsResellerAPI :: Proxy AppsResellerAPI +appsResellerAPI = Proxy diff --git a/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs new file mode 100644 index 000000000..cd10dfc4e --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs @@ -0,0 +1,103 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsReseller.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsReseller.Types + ( + -- * Service URL + appsResellerURL + + -- * Address + , Address + , address + , aOrganizationName + , aKind + , aPostalCode + , aAddressLine1 + , aLocality + , aContactName + , aAddressLine2 + , aCountryCode + , aRegion + , aAddressLine3 + + -- * Customer + , Customer + , customer + , cResourceUiUrl + , cKind + , cCustomerId + , cAlternateEmail + , cCustomerDomain + , cPhoneNumber + , cPostalAddress + + -- * ChangePlanRequest + , ChangePlanRequest + , changePlanRequest + , cprKind + , cprPlanName + , cprPurchaseOrderId + , cprSeats + + -- * Seats + , Seats + , seats + , sNumberOfSeats + , sMaximumNumberOfSeats + , sLicensedNumberOfSeats + , sKind + + -- * Subscriptions + , Subscriptions + , subscriptions + , subNextPageToken + , subKind + , subSubscriptions + + -- * Subscription + , Subscription + , subscription + , ssCreationTime + , ssBillingMethod + , ssStatus + , ssTrialSettings + , ssResourceUiUrl + , ssKind + , ssSkuId + , ssPlan + , ssCustomerId + , ssSuspensionReasons + , ssTransferInfo + , ssPurchaseOrderId + , ssSeats + , ssRenewalSettings + , ssSubscriptionId + + -- * RenewalSettings + , RenewalSettings + , renewalSettings + , rsKind + , rsRenewalType + ) where + +import Network.Google.AppsReseller.Types.Product +import Network.Google.AppsReseller.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1sandbox' of the Enterprise Apps Reseller API. +appsResellerURL :: BaseURL +appsResellerURL + = BaseUrl Https + "https://www.googleapis.com/apps/reseller/v1sandbox/" + 443 diff --git a/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs new file mode 100644 index 000000000..10d825866 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs @@ -0,0 +1,720 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsReseller.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsReseller.Types.Product where + +import Network.Google.AppsReseller.Types.Sum +import Network.Google.Prelude + +-- | JSON template for address of a customer. +-- +-- /See:/ 'address' smart constructor. +data Address = Address + { _aOrganizationName :: !(Maybe Text) + , _aKind :: !Text + , _aPostalCode :: !(Maybe Text) + , _aAddressLine1 :: !(Maybe Text) + , _aLocality :: !(Maybe Text) + , _aContactName :: !(Maybe Text) + , _aAddressLine2 :: !(Maybe Text) + , _aCountryCode :: !(Maybe Text) + , _aRegion :: !(Maybe Text) + , _aAddressLine3 :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Address' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aOrganizationName' +-- +-- * 'aKind' +-- +-- * 'aPostalCode' +-- +-- * 'aAddressLine1' +-- +-- * 'aLocality' +-- +-- * 'aContactName' +-- +-- * 'aAddressLine2' +-- +-- * 'aCountryCode' +-- +-- * 'aRegion' +-- +-- * 'aAddressLine3' +address + :: Address +address = + Address + { _aOrganizationName = Nothing + , _aKind = "customers#address" + , _aPostalCode = Nothing + , _aAddressLine1 = Nothing + , _aLocality = Nothing + , _aContactName = Nothing + , _aAddressLine2 = Nothing + , _aCountryCode = Nothing + , _aRegion = Nothing + , _aAddressLine3 = Nothing + } + +-- | Name of the organization. +aOrganizationName :: Lens' Address (Maybe Text) +aOrganizationName + = lens _aOrganizationName + (\ s a -> s{_aOrganizationName = a}) + +-- | Identifies the resource as a customer address. +aKind :: Lens' Address Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The postal code. This is in accordance with - +-- http:\/\/portablecontacts.net\/draft-spec.html#address_element. +aPostalCode :: Lens' Address (Maybe Text) +aPostalCode + = lens _aPostalCode (\ s a -> s{_aPostalCode = a}) + +-- | Address line 1 of the address. +aAddressLine1 :: Lens' Address (Maybe Text) +aAddressLine1 + = lens _aAddressLine1 + (\ s a -> s{_aAddressLine1 = a}) + +-- | Name of the locality. This is in accordance with - +-- http:\/\/portablecontacts.net\/draft-spec.html#address_element. +aLocality :: Lens' Address (Maybe Text) +aLocality + = lens _aLocality (\ s a -> s{_aLocality = a}) + +-- | Name of the contact person. +aContactName :: Lens' Address (Maybe Text) +aContactName + = lens _aContactName (\ s a -> s{_aContactName = a}) + +-- | Address line 2 of the address. +aAddressLine2 :: Lens' Address (Maybe Text) +aAddressLine2 + = lens _aAddressLine2 + (\ s a -> s{_aAddressLine2 = a}) + +-- | ISO 3166 country code. +aCountryCode :: Lens' Address (Maybe Text) +aCountryCode + = lens _aCountryCode (\ s a -> s{_aCountryCode = a}) + +-- | Name of the region. This is in accordance with - +-- http:\/\/portablecontacts.net\/draft-spec.html#address_element. +aRegion :: Lens' Address (Maybe Text) +aRegion = lens _aRegion (\ s a -> s{_aRegion = a}) + +-- | Address line 3 of the address. +aAddressLine3 :: Lens' Address (Maybe Text) +aAddressLine3 + = lens _aAddressLine3 + (\ s a -> s{_aAddressLine3 = a}) + +instance FromJSON Address where + parseJSON + = withObject "Address" + (\ o -> + Address <$> + (o .:? "organizationName") <*> + (o .:? "kind" .!= "customers#address") + <*> (o .:? "postalCode") + <*> (o .:? "addressLine1") + <*> (o .:? "locality") + <*> (o .:? "contactName") + <*> (o .:? "addressLine2") + <*> (o .:? "countryCode") + <*> (o .:? "region") + <*> (o .:? "addressLine3")) + +instance ToJSON Address where + toJSON Address{..} + = object + (catMaybes + [("organizationName" .=) <$> _aOrganizationName, + Just ("kind" .= _aKind), + ("postalCode" .=) <$> _aPostalCode, + ("addressLine1" .=) <$> _aAddressLine1, + ("locality" .=) <$> _aLocality, + ("contactName" .=) <$> _aContactName, + ("addressLine2" .=) <$> _aAddressLine2, + ("countryCode" .=) <$> _aCountryCode, + ("region" .=) <$> _aRegion, + ("addressLine3" .=) <$> _aAddressLine3]) + +-- | JSON template for a customer. +-- +-- /See:/ 'customer' smart constructor. +data Customer = Customer + { _cResourceUiUrl :: !(Maybe Text) + , _cKind :: !Text + , _cCustomerId :: !(Maybe Text) + , _cAlternateEmail :: !(Maybe Text) + , _cCustomerDomain :: !(Maybe Text) + , _cPhoneNumber :: !(Maybe Text) + , _cPostalAddress :: !(Maybe (Maybe Address)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Customer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUiUrl' +-- +-- * 'cKind' +-- +-- * 'cCustomerId' +-- +-- * 'cAlternateEmail' +-- +-- * 'cCustomerDomain' +-- +-- * 'cPhoneNumber' +-- +-- * 'cPostalAddress' +customer + :: Customer +customer = + Customer + { _cResourceUiUrl = Nothing + , _cKind = "reseller#customer" + , _cCustomerId = Nothing + , _cAlternateEmail = Nothing + , _cCustomerDomain = Nothing + , _cPhoneNumber = Nothing + , _cPostalAddress = Nothing + } + +-- | Ui url for customer resource. +cResourceUiUrl :: Lens' Customer (Maybe Text) +cResourceUiUrl + = lens _cResourceUiUrl + (\ s a -> s{_cResourceUiUrl = a}) + +-- | Identifies the resource as a customer. +cKind :: Lens' Customer Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The id of the customer. +cCustomerId :: Lens' Customer (Maybe Text) +cCustomerId + = lens _cCustomerId (\ s a -> s{_cCustomerId = a}) + +-- | The alternate email of the customer. +cAlternateEmail :: Lens' Customer (Maybe Text) +cAlternateEmail + = lens _cAlternateEmail + (\ s a -> s{_cAlternateEmail = a}) + +-- | The domain name of the customer. +cCustomerDomain :: Lens' Customer (Maybe Text) +cCustomerDomain + = lens _cCustomerDomain + (\ s a -> s{_cCustomerDomain = a}) + +-- | The phone number of the customer. +cPhoneNumber :: Lens' Customer (Maybe Text) +cPhoneNumber + = lens _cPhoneNumber (\ s a -> s{_cPhoneNumber = a}) + +-- | The postal address of the customer. +cPostalAddress :: Lens' Customer (Maybe (Maybe Address)) +cPostalAddress + = lens _cPostalAddress + (\ s a -> s{_cPostalAddress = a}) + +instance FromJSON Customer where + parseJSON + = withObject "Customer" + (\ o -> + Customer <$> + (o .:? "resourceUiUrl") <*> + (o .:? "kind" .!= "reseller#customer") + <*> (o .:? "customerId") + <*> (o .:? "alternateEmail") + <*> (o .:? "customerDomain") + <*> (o .:? "phoneNumber") + <*> (o .:? "postalAddress")) + +instance ToJSON Customer where + toJSON Customer{..} + = object + (catMaybes + [("resourceUiUrl" .=) <$> _cResourceUiUrl, + Just ("kind" .= _cKind), + ("customerId" .=) <$> _cCustomerId, + ("alternateEmail" .=) <$> _cAlternateEmail, + ("customerDomain" .=) <$> _cCustomerDomain, + ("phoneNumber" .=) <$> _cPhoneNumber, + ("postalAddress" .=) <$> _cPostalAddress]) + +-- | JSON template for the ChangePlan rpc request. +-- +-- /See:/ 'changePlanRequest' smart constructor. +data ChangePlanRequest = ChangePlanRequest + { _cprKind :: !Text + , _cprPlanName :: !(Maybe Text) + , _cprPurchaseOrderId :: !(Maybe Text) + , _cprSeats :: !(Maybe (Maybe Seats)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangePlanRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cprKind' +-- +-- * 'cprPlanName' +-- +-- * 'cprPurchaseOrderId' +-- +-- * 'cprSeats' +changePlanRequest + :: ChangePlanRequest +changePlanRequest = + ChangePlanRequest + { _cprKind = "subscriptions#changePlanRequest" + , _cprPlanName = Nothing + , _cprPurchaseOrderId = Nothing + , _cprSeats = Nothing + } + +-- | Identifies the resource as a subscription change plan request. +cprKind :: Lens' ChangePlanRequest Text +cprKind = lens _cprKind (\ s a -> s{_cprKind = a}) + +-- | Name of the plan to change to. +cprPlanName :: Lens' ChangePlanRequest (Maybe Text) +cprPlanName + = lens _cprPlanName (\ s a -> s{_cprPlanName = a}) + +-- | Purchase order id for your order tracking purposes. +cprPurchaseOrderId :: Lens' ChangePlanRequest (Maybe Text) +cprPurchaseOrderId + = lens _cprPurchaseOrderId + (\ s a -> s{_cprPurchaseOrderId = a}) + +-- | Number\/Limit of seats in the new plan. +cprSeats :: Lens' ChangePlanRequest (Maybe (Maybe Seats)) +cprSeats = lens _cprSeats (\ s a -> s{_cprSeats = a}) + +instance FromJSON ChangePlanRequest where + parseJSON + = withObject "ChangePlanRequest" + (\ o -> + ChangePlanRequest <$> + (o .:? "kind" .!= "subscriptions#changePlanRequest") + <*> (o .:? "planName") + <*> (o .:? "purchaseOrderId") + <*> (o .:? "seats")) + +instance ToJSON ChangePlanRequest where + toJSON ChangePlanRequest{..} + = object + (catMaybes + [Just ("kind" .= _cprKind), + ("planName" .=) <$> _cprPlanName, + ("purchaseOrderId" .=) <$> _cprPurchaseOrderId, + ("seats" .=) <$> _cprSeats]) + +-- | JSON template for subscription seats. +-- +-- /See:/ 'seats' smart constructor. +data Seats = Seats + { _sNumberOfSeats :: !(Maybe Int32) + , _sMaximumNumberOfSeats :: !(Maybe Int32) + , _sLicensedNumberOfSeats :: !(Maybe Int32) + , _sKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Seats' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sNumberOfSeats' +-- +-- * 'sMaximumNumberOfSeats' +-- +-- * 'sLicensedNumberOfSeats' +-- +-- * 'sKind' +seats + :: Seats +seats = + Seats + { _sNumberOfSeats = Nothing + , _sMaximumNumberOfSeats = Nothing + , _sLicensedNumberOfSeats = Nothing + , _sKind = "subscriptions#seats" + } + +-- | Number of seats to purchase. This is applicable only for a commitment +-- plan. +sNumberOfSeats :: Lens' Seats (Maybe Int32) +sNumberOfSeats + = lens _sNumberOfSeats + (\ s a -> s{_sNumberOfSeats = a}) + +-- | Maximum number of seats that can be purchased. This needs to be provided +-- only for a non-commitment plan. For a commitment plan it is decided by +-- the contract. +sMaximumNumberOfSeats :: Lens' Seats (Maybe Int32) +sMaximumNumberOfSeats + = lens _sMaximumNumberOfSeats + (\ s a -> s{_sMaximumNumberOfSeats = a}) + +-- | Read-only field containing the current number of licensed seats for +-- FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as +-- Google-Vault and Drive-storage. +sLicensedNumberOfSeats :: Lens' Seats (Maybe Int32) +sLicensedNumberOfSeats + = lens _sLicensedNumberOfSeats + (\ s a -> s{_sLicensedNumberOfSeats = a}) + +-- | Identifies the resource as a subscription change plan request. +sKind :: Lens' Seats Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +instance FromJSON Seats where + parseJSON + = withObject "Seats" + (\ o -> + Seats <$> + (o .:? "numberOfSeats") <*> + (o .:? "maximumNumberOfSeats") + <*> (o .:? "licensedNumberOfSeats") + <*> (o .:? "kind" .!= "subscriptions#seats")) + +instance ToJSON Seats where + toJSON Seats{..} + = object + (catMaybes + [("numberOfSeats" .=) <$> _sNumberOfSeats, + ("maximumNumberOfSeats" .=) <$> + _sMaximumNumberOfSeats, + ("licensedNumberOfSeats" .=) <$> + _sLicensedNumberOfSeats, + Just ("kind" .= _sKind)]) + +-- | JSON template for a subscription list. +-- +-- /See:/ 'subscriptions' smart constructor. +data Subscriptions = Subscriptions + { _subNextPageToken :: !(Maybe Text) + , _subKind :: !Text + , _subSubscriptions :: !(Maybe [Maybe Subscription]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subscriptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subNextPageToken' +-- +-- * 'subKind' +-- +-- * 'subSubscriptions' +subscriptions + :: Subscriptions +subscriptions = + Subscriptions + { _subNextPageToken = Nothing + , _subKind = "reseller#subscriptions" + , _subSubscriptions = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +subNextPageToken :: Lens' Subscriptions (Maybe Text) +subNextPageToken + = lens _subNextPageToken + (\ s a -> s{_subNextPageToken = a}) + +-- | Identifies the resource as a collection of subscriptions. +subKind :: Lens' Subscriptions Text +subKind = lens _subKind (\ s a -> s{_subKind = a}) + +-- | The subscriptions in this page of results. +subSubscriptions :: Lens' Subscriptions [Maybe Subscription] +subSubscriptions + = lens _subSubscriptions + (\ s a -> s{_subSubscriptions = a}) + . _Default + . _Coerce + +instance FromJSON Subscriptions where + parseJSON + = withObject "Subscriptions" + (\ o -> + Subscriptions <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "reseller#subscriptions") + <*> (o .:? "subscriptions" .!= mempty)) + +instance ToJSON Subscriptions where + toJSON Subscriptions{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _subNextPageToken, + Just ("kind" .= _subKind), + ("subscriptions" .=) <$> _subSubscriptions]) + +-- | JSON template for a subscription. +-- +-- /See:/ 'subscription' smart constructor. +data Subscription = Subscription + { _ssCreationTime :: !(Maybe Int64) + , _ssBillingMethod :: !(Maybe Text) + , _ssStatus :: !(Maybe Text) + , _ssTrialSettings :: !(Maybe SubscriptionTrialSettings) + , _ssResourceUiUrl :: !(Maybe Text) + , _ssKind :: !Text + , _ssSkuId :: !(Maybe Text) + , _ssPlan :: !(Maybe SubscriptionPlan) + , _ssCustomerId :: !(Maybe Text) + , _ssSuspensionReasons :: !(Maybe [Text]) + , _ssTransferInfo :: !(Maybe SubscriptionTransferInfo) + , _ssPurchaseOrderId :: !(Maybe Text) + , _ssSeats :: !(Maybe (Maybe Seats)) + , _ssRenewalSettings :: !(Maybe (Maybe RenewalSettings)) + , _ssSubscriptionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subscription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssCreationTime' +-- +-- * 'ssBillingMethod' +-- +-- * 'ssStatus' +-- +-- * 'ssTrialSettings' +-- +-- * 'ssResourceUiUrl' +-- +-- * 'ssKind' +-- +-- * 'ssSkuId' +-- +-- * 'ssPlan' +-- +-- * 'ssCustomerId' +-- +-- * 'ssSuspensionReasons' +-- +-- * 'ssTransferInfo' +-- +-- * 'ssPurchaseOrderId' +-- +-- * 'ssSeats' +-- +-- * 'ssRenewalSettings' +-- +-- * 'ssSubscriptionId' +subscription + :: Subscription +subscription = + Subscription + { _ssCreationTime = Nothing + , _ssBillingMethod = Nothing + , _ssStatus = Nothing + , _ssTrialSettings = Nothing + , _ssResourceUiUrl = Nothing + , _ssKind = "reseller#subscription" + , _ssSkuId = Nothing + , _ssPlan = Nothing + , _ssCustomerId = Nothing + , _ssSuspensionReasons = Nothing + , _ssTransferInfo = Nothing + , _ssPurchaseOrderId = Nothing + , _ssSeats = Nothing + , _ssRenewalSettings = Nothing + , _ssSubscriptionId = Nothing + } + +-- | Creation time of this subscription in milliseconds since Unix epoch. +ssCreationTime :: Lens' Subscription (Maybe Int64) +ssCreationTime + = lens _ssCreationTime + (\ s a -> s{_ssCreationTime = a}) + +-- | Billing method of this subscription. +ssBillingMethod :: Lens' Subscription (Maybe Text) +ssBillingMethod + = lens _ssBillingMethod + (\ s a -> s{_ssBillingMethod = a}) + +-- | Status of the subscription. +ssStatus :: Lens' Subscription (Maybe Text) +ssStatus = lens _ssStatus (\ s a -> s{_ssStatus = a}) + +-- | Trial Settings of the subscription. +ssTrialSettings :: Lens' Subscription (Maybe SubscriptionTrialSettings) +ssTrialSettings + = lens _ssTrialSettings + (\ s a -> s{_ssTrialSettings = a}) + +-- | Ui url for subscription resource. +ssResourceUiUrl :: Lens' Subscription (Maybe Text) +ssResourceUiUrl + = lens _ssResourceUiUrl + (\ s a -> s{_ssResourceUiUrl = a}) + +-- | Identifies the resource as a Subscription. +ssKind :: Lens' Subscription Text +ssKind = lens _ssKind (\ s a -> s{_ssKind = a}) + +-- | Name of the sku for which this subscription is purchased. +ssSkuId :: Lens' Subscription (Maybe Text) +ssSkuId = lens _ssSkuId (\ s a -> s{_ssSkuId = a}) + +-- | Plan details of the subscription +ssPlan :: Lens' Subscription (Maybe SubscriptionPlan) +ssPlan = lens _ssPlan (\ s a -> s{_ssPlan = a}) + +-- | The id of the customer to whom the subscription belongs. +ssCustomerId :: Lens' Subscription (Maybe Text) +ssCustomerId + = lens _ssCustomerId (\ s a -> s{_ssCustomerId = a}) + +-- | Suspension Reasons +ssSuspensionReasons :: Lens' Subscription [Text] +ssSuspensionReasons + = lens _ssSuspensionReasons + (\ s a -> s{_ssSuspensionReasons = a}) + . _Default + . _Coerce + +-- | Transfer related information for the subscription. +ssTransferInfo :: Lens' Subscription (Maybe SubscriptionTransferInfo) +ssTransferInfo + = lens _ssTransferInfo + (\ s a -> s{_ssTransferInfo = a}) + +-- | Purchase order id for your order tracking purposes. +ssPurchaseOrderId :: Lens' Subscription (Maybe Text) +ssPurchaseOrderId + = lens _ssPurchaseOrderId + (\ s a -> s{_ssPurchaseOrderId = a}) + +-- | Number\/Limit of seats in the new plan. +ssSeats :: Lens' Subscription (Maybe (Maybe Seats)) +ssSeats = lens _ssSeats (\ s a -> s{_ssSeats = a}) + +-- | Renewal settings of the subscription. +ssRenewalSettings :: Lens' Subscription (Maybe (Maybe RenewalSettings)) +ssRenewalSettings + = lens _ssRenewalSettings + (\ s a -> s{_ssRenewalSettings = a}) + +-- | The id of the subscription. +ssSubscriptionId :: Lens' Subscription (Maybe Text) +ssSubscriptionId + = lens _ssSubscriptionId + (\ s a -> s{_ssSubscriptionId = a}) + +instance FromJSON Subscription where + parseJSON + = withObject "Subscription" + (\ o -> + Subscription <$> + (o .:? "creationTime") <*> (o .:? "billingMethod") + <*> (o .:? "status") + <*> (o .:? "trialSettings") + <*> (o .:? "resourceUiUrl") + <*> (o .:? "kind" .!= "reseller#subscription") + <*> (o .:? "skuId") + <*> (o .:? "plan") + <*> (o .:? "customerId") + <*> (o .:? "suspensionReasons" .!= mempty) + <*> (o .:? "transferInfo") + <*> (o .:? "purchaseOrderId") + <*> (o .:? "seats") + <*> (o .:? "renewalSettings") + <*> (o .:? "subscriptionId")) + +instance ToJSON Subscription where + toJSON Subscription{..} + = object + (catMaybes + [("creationTime" .=) <$> _ssCreationTime, + ("billingMethod" .=) <$> _ssBillingMethod, + ("status" .=) <$> _ssStatus, + ("trialSettings" .=) <$> _ssTrialSettings, + ("resourceUiUrl" .=) <$> _ssResourceUiUrl, + Just ("kind" .= _ssKind), ("skuId" .=) <$> _ssSkuId, + ("plan" .=) <$> _ssPlan, + ("customerId" .=) <$> _ssCustomerId, + ("suspensionReasons" .=) <$> _ssSuspensionReasons, + ("transferInfo" .=) <$> _ssTransferInfo, + ("purchaseOrderId" .=) <$> _ssPurchaseOrderId, + ("seats" .=) <$> _ssSeats, + ("renewalSettings" .=) <$> _ssRenewalSettings, + ("subscriptionId" .=) <$> _ssSubscriptionId]) + +-- | JSON template for a subscription renewal settings. +-- +-- /See:/ 'renewalSettings' smart constructor. +data RenewalSettings = RenewalSettings + { _rsKind :: !Text + , _rsRenewalType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RenewalSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsKind' +-- +-- * 'rsRenewalType' +renewalSettings + :: RenewalSettings +renewalSettings = + RenewalSettings + { _rsKind = "subscriptions#renewalSettings" + , _rsRenewalType = Nothing + } + +-- | Identifies the resource as a subscription renewal setting. +rsKind :: Lens' RenewalSettings Text +rsKind = lens _rsKind (\ s a -> s{_rsKind = a}) + +-- | Subscription renewal type. +rsRenewalType :: Lens' RenewalSettings (Maybe Text) +rsRenewalType + = lens _rsRenewalType + (\ s a -> s{_rsRenewalType = a}) + +instance FromJSON RenewalSettings where + parseJSON + = withObject "RenewalSettings" + (\ o -> + RenewalSettings <$> + (o .:? "kind" .!= "subscriptions#renewalSettings") + <*> (o .:? "renewalType")) + +instance ToJSON RenewalSettings where + toJSON RenewalSettings{..} + = object + (catMaybes + [Just ("kind" .= _rsKind), + ("renewalType" .=) <$> _rsRenewalType]) diff --git a/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Sum.hs b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Sum.hs new file mode 100644 index 000000000..b59245ff3 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsReseller.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsReseller.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Get.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Get.hs new file mode 100644 index 000000000..c07e9172f --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Customers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a customer resource if one exists and is owned by the reseller. +-- +-- /See:/ for @ResellerCustomersGet@. +module Reseller.Customers.Get + ( + -- * REST Resource + CustomersGetAPI + + -- * Creating a Request + , customersGet + , CustomersGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgCustomerId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerCustomersGet@ which the +-- 'CustomersGet' request conforms to. +type CustomersGetAPI = + "customers" :> + Capture "customerId" Text :> Get '[JSON] Customer + +-- | Gets a customer resource if one exists and is owned by the reseller. +-- +-- /See:/ 'customersGet' smart constructor. +data CustomersGet = CustomersGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgCustomerId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgCustomerId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +customersGet + :: Text -- ^ 'customerId' + -> CustomersGet +customersGet pCgCustomerId_ = + CustomersGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgCustomerId = pCgCustomerId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CustomersGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CustomersGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CustomersGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | Id of the Customer +cgCustomerId :: Lens' CustomersGet' Text +cgCustomerId + = lens _cgCustomerId (\ s a -> s{_cgCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CustomersGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CustomersGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CustomersGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CustomersGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CustomersGet' where + type Rs CustomersGet' = Customer + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u CustomersGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp + _cgCustomerId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CustomersGetAPI) r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Insert.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Insert.hs new file mode 100644 index 000000000..94b7b6c16 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Customers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a customer resource if one does not already exist. +-- +-- /See:/ for @ResellerCustomersInsert@. +module Reseller.Customers.Insert + ( + -- * REST Resource + CustomersInsertAPI + + -- * Creating a Request + , customersInsert + , CustomersInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciCustomerAuthToken + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerCustomersInsert@ which the +-- 'CustomersInsert' request conforms to. +type CustomersInsertAPI = + "customers" :> + QueryParam "customerAuthToken" Text :> + Post '[JSON] Customer + +-- | Creates a customer resource if one does not already exist. +-- +-- /See:/ 'customersInsert' smart constructor. +data CustomersInsert = CustomersInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciCustomerAuthToken :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciCustomerAuthToken' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +customersInsert + :: CustomersInsert +customersInsert = + CustomersInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciCustomerAuthToken = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CustomersInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CustomersInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CustomersInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CustomersInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | An auth token needed for inserting a customer for which domain already +-- exists. Can be generated at +-- https:\/\/www.google.com\/a\/cpanel\/\/TransferToken. Optional. +ciCustomerAuthToken :: Lens' CustomersInsert' (Maybe Text) +ciCustomerAuthToken + = lens _ciCustomerAuthToken + (\ s a -> s{_ciCustomerAuthToken = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CustomersInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CustomersInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CustomersInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CustomersInsert' where + type Rs CustomersInsert' = Customer + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u CustomersInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciCustomerAuthToken + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CustomersInsertAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Patch.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Patch.hs new file mode 100644 index 000000000..e812fd735 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Patch.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Customers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a customer resource if one it exists and is owned by the +-- reseller. This method supports patch semantics. +-- +-- /See:/ for @ResellerCustomersPatch@. +module Reseller.Customers.Patch + ( + -- * REST Resource + CustomersPatchAPI + + -- * Creating a Request + , customersPatch + , CustomersPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpCustomerId + , cpKey + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerCustomersPatch@ which the +-- 'CustomersPatch' request conforms to. +type CustomersPatchAPI = + "customers" :> + Capture "customerId" Text :> Patch '[JSON] Customer + +-- | Update a customer resource if one it exists and is owned by the +-- reseller. This method supports patch semantics. +-- +-- /See:/ 'customersPatch' smart constructor. +data CustomersPatch = CustomersPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpCustomerId :: !Text + , _cpKey :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpCustomerId' +-- +-- * 'cpKey' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +customersPatch + :: Text -- ^ 'customerId' + -> CustomersPatch +customersPatch pCpCustomerId_ = + CustomersPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpCustomerId = pCpCustomerId_ + , _cpKey = Nothing + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CustomersPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CustomersPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CustomersPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | Id of the Customer +cpCustomerId :: Lens' CustomersPatch' Text +cpCustomerId + = lens _cpCustomerId (\ s a -> s{_cpCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CustomersPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CustomersPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CustomersPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CustomersPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CustomersPatch' where + type Rs CustomersPatch' = Customer + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u CustomersPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp + _cpCustomerId + _cpKey + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CustomersPatchAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Update.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Update.hs new file mode 100644 index 000000000..1f66f9783 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Customers/Update.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Customers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a customer resource if one it exists and is owned by the +-- reseller. +-- +-- /See:/ for @ResellerCustomersUpdate@. +module Reseller.Customers.Update + ( + -- * REST Resource + CustomersUpdateAPI + + -- * Creating a Request + , customersUpdate + , CustomersUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuCustomerId + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerCustomersUpdate@ which the +-- 'CustomersUpdate' request conforms to. +type CustomersUpdateAPI = + "customers" :> + Capture "customerId" Text :> Put '[JSON] Customer + +-- | Update a customer resource if one it exists and is owned by the +-- reseller. +-- +-- /See:/ 'customersUpdate' smart constructor. +data CustomersUpdate = CustomersUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuCustomerId :: !Text + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuCustomerId' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +customersUpdate + :: Text -- ^ 'customerId' + -> CustomersUpdate +customersUpdate pCuCustomerId_ = + CustomersUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuCustomerId = pCuCustomerId_ + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CustomersUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CustomersUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CustomersUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | Id of the Customer +cuCustomerId :: Lens' CustomersUpdate' Text +cuCustomerId + = lens _cuCustomerId (\ s a -> s{_cuCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CustomersUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CustomersUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CustomersUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CustomersUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CustomersUpdate' where + type Rs CustomersUpdate' = Customer + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u CustomersUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp + _cuCustomerId + _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CustomersUpdateAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs new file mode 100644 index 000000000..4b844cd32 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.Activate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Activates a subscription previously suspended by the reseller +-- +-- /See:/ for @ResellerSubscriptionsActivate@. +module Reseller.Subscriptions.Activate + ( + -- * REST Resource + SubscriptionsActivateAPI + + -- * Creating a Request + , subscriptionsActivate + , SubscriptionsActivate + + -- * Request Lenses + , saQuotaUser + , saPrettyPrint + , saUserIp + , saCustomerId + , saKey + , saOauthToken + , saSubscriptionId + , saFields + , saAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsActivate@ which the +-- 'SubscriptionsActivate' request conforms to. +type SubscriptionsActivateAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "activate" :> Post '[JSON] Subscription + +-- | Activates a subscription previously suspended by the reseller +-- +-- /See:/ 'subscriptionsActivate' smart constructor. +data SubscriptionsActivate = SubscriptionsActivate + { _saQuotaUser :: !(Maybe Text) + , _saPrettyPrint :: !Bool + , _saUserIp :: !(Maybe Text) + , _saCustomerId :: !Text + , _saKey :: !(Maybe Text) + , _saOauthToken :: !(Maybe Text) + , _saSubscriptionId :: !Text + , _saFields :: !(Maybe Text) + , _saAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsActivate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saQuotaUser' +-- +-- * 'saPrettyPrint' +-- +-- * 'saUserIp' +-- +-- * 'saCustomerId' +-- +-- * 'saKey' +-- +-- * 'saOauthToken' +-- +-- * 'saSubscriptionId' +-- +-- * 'saFields' +-- +-- * 'saAlt' +subscriptionsActivate + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsActivate +subscriptionsActivate pSaCustomerId_ pSaSubscriptionId_ = + SubscriptionsActivate + { _saQuotaUser = Nothing + , _saPrettyPrint = True + , _saUserIp = Nothing + , _saCustomerId = pSaCustomerId_ + , _saKey = Nothing + , _saOauthToken = Nothing + , _saSubscriptionId = pSaSubscriptionId_ + , _saFields = Nothing + , _saAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +saQuotaUser :: Lens' SubscriptionsActivate' (Maybe Text) +saQuotaUser + = lens _saQuotaUser (\ s a -> s{_saQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +saPrettyPrint :: Lens' SubscriptionsActivate' Bool +saPrettyPrint + = lens _saPrettyPrint + (\ s a -> s{_saPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +saUserIp :: Lens' SubscriptionsActivate' (Maybe Text) +saUserIp = lens _saUserIp (\ s a -> s{_saUserIp = a}) + +-- | Id of the Customer +saCustomerId :: Lens' SubscriptionsActivate' Text +saCustomerId + = lens _saCustomerId (\ s a -> s{_saCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +saKey :: Lens' SubscriptionsActivate' (Maybe Text) +saKey = lens _saKey (\ s a -> s{_saKey = a}) + +-- | OAuth 2.0 token for the current user. +saOauthToken :: Lens' SubscriptionsActivate' (Maybe Text) +saOauthToken + = lens _saOauthToken (\ s a -> s{_saOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +saSubscriptionId :: Lens' SubscriptionsActivate' Text +saSubscriptionId + = lens _saSubscriptionId + (\ s a -> s{_saSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +saFields :: Lens' SubscriptionsActivate' (Maybe Text) +saFields = lens _saFields (\ s a -> s{_saFields = a}) + +-- | Data format for the response. +saAlt :: Lens' SubscriptionsActivate' Text +saAlt = lens _saAlt (\ s a -> s{_saAlt = a}) + +instance GoogleRequest SubscriptionsActivate' where + type Rs SubscriptionsActivate' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsActivate{..} + = go _saQuotaUser _saPrettyPrint _saUserIp + _saCustomerId + _saKey + _saOauthToken + _saSubscriptionId + _saFields + _saAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsActivateAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs new file mode 100644 index 000000000..a93e12480 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.ChangePlan +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes the plan of a subscription +-- +-- /See:/ for @ResellerSubscriptionsChangePlan@. +module Reseller.Subscriptions.ChangePlan + ( + -- * REST Resource + SubscriptionsChangePlanAPI + + -- * Creating a Request + , subscriptionsChangePlan + , SubscriptionsChangePlan + + -- * Request Lenses + , scpQuotaUser + , scpPrettyPrint + , scpUserIp + , scpCustomerId + , scpKey + , scpOauthToken + , scpSubscriptionId + , scpFields + , scpAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsChangePlan@ which the +-- 'SubscriptionsChangePlan' request conforms to. +type SubscriptionsChangePlanAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "changePlan" :> Post '[JSON] Subscription + +-- | Changes the plan of a subscription +-- +-- /See:/ 'subscriptionsChangePlan' smart constructor. +data SubscriptionsChangePlan = SubscriptionsChangePlan + { _scpQuotaUser :: !(Maybe Text) + , _scpPrettyPrint :: !Bool + , _scpUserIp :: !(Maybe Text) + , _scpCustomerId :: !Text + , _scpKey :: !(Maybe Text) + , _scpOauthToken :: !(Maybe Text) + , _scpSubscriptionId :: !Text + , _scpFields :: !(Maybe Text) + , _scpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsChangePlan'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scpQuotaUser' +-- +-- * 'scpPrettyPrint' +-- +-- * 'scpUserIp' +-- +-- * 'scpCustomerId' +-- +-- * 'scpKey' +-- +-- * 'scpOauthToken' +-- +-- * 'scpSubscriptionId' +-- +-- * 'scpFields' +-- +-- * 'scpAlt' +subscriptionsChangePlan + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsChangePlan +subscriptionsChangePlan pScpCustomerId_ pScpSubscriptionId_ = + SubscriptionsChangePlan + { _scpQuotaUser = Nothing + , _scpPrettyPrint = True + , _scpUserIp = Nothing + , _scpCustomerId = pScpCustomerId_ + , _scpKey = Nothing + , _scpOauthToken = Nothing + , _scpSubscriptionId = pScpSubscriptionId_ + , _scpFields = Nothing + , _scpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scpQuotaUser :: Lens' SubscriptionsChangePlan' (Maybe Text) +scpQuotaUser + = lens _scpQuotaUser (\ s a -> s{_scpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scpPrettyPrint :: Lens' SubscriptionsChangePlan' Bool +scpPrettyPrint + = lens _scpPrettyPrint + (\ s a -> s{_scpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scpUserIp :: Lens' SubscriptionsChangePlan' (Maybe Text) +scpUserIp + = lens _scpUserIp (\ s a -> s{_scpUserIp = a}) + +-- | Id of the Customer +scpCustomerId :: Lens' SubscriptionsChangePlan' Text +scpCustomerId + = lens _scpCustomerId + (\ s a -> s{_scpCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scpKey :: Lens' SubscriptionsChangePlan' (Maybe Text) +scpKey = lens _scpKey (\ s a -> s{_scpKey = a}) + +-- | OAuth 2.0 token for the current user. +scpOauthToken :: Lens' SubscriptionsChangePlan' (Maybe Text) +scpOauthToken + = lens _scpOauthToken + (\ s a -> s{_scpOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +scpSubscriptionId :: Lens' SubscriptionsChangePlan' Text +scpSubscriptionId + = lens _scpSubscriptionId + (\ s a -> s{_scpSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +scpFields :: Lens' SubscriptionsChangePlan' (Maybe Text) +scpFields + = lens _scpFields (\ s a -> s{_scpFields = a}) + +-- | Data format for the response. +scpAlt :: Lens' SubscriptionsChangePlan' Text +scpAlt = lens _scpAlt (\ s a -> s{_scpAlt = a}) + +instance GoogleRequest SubscriptionsChangePlan' where + type Rs SubscriptionsChangePlan' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsChangePlan{..} + = go _scpQuotaUser _scpPrettyPrint _scpUserIp + _scpCustomerId + _scpKey + _scpOauthToken + _scpSubscriptionId + _scpFields + _scpAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsChangePlanAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs new file mode 100644 index 000000000..ebcc8e405 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes the renewal settings of a subscription +-- +-- /See:/ for @ResellerSubscriptionsChangeRenewalSettings@. +module Reseller.Subscriptions.ChangeRenewalSettings + ( + -- * REST Resource + SubscriptionsChangeRenewalSettingsAPI + + -- * Creating a Request + , subscriptionsChangeRenewalSettings + , SubscriptionsChangeRenewalSettings + + -- * Request Lenses + , scrsQuotaUser + , scrsPrettyPrint + , scrsUserIp + , scrsCustomerId + , scrsKey + , scrsOauthToken + , scrsSubscriptionId + , scrsFields + , scrsAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsChangeRenewalSettings@ which the +-- 'SubscriptionsChangeRenewalSettings' request conforms to. +type SubscriptionsChangeRenewalSettingsAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "changeRenewalSettings" :> Post '[JSON] Subscription + +-- | Changes the renewal settings of a subscription +-- +-- /See:/ 'subscriptionsChangeRenewalSettings' smart constructor. +data SubscriptionsChangeRenewalSettings = SubscriptionsChangeRenewalSettings + { _scrsQuotaUser :: !(Maybe Text) + , _scrsPrettyPrint :: !Bool + , _scrsUserIp :: !(Maybe Text) + , _scrsCustomerId :: !Text + , _scrsKey :: !(Maybe Text) + , _scrsOauthToken :: !(Maybe Text) + , _scrsSubscriptionId :: !Text + , _scrsFields :: !(Maybe Text) + , _scrsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsChangeRenewalSettings'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scrsQuotaUser' +-- +-- * 'scrsPrettyPrint' +-- +-- * 'scrsUserIp' +-- +-- * 'scrsCustomerId' +-- +-- * 'scrsKey' +-- +-- * 'scrsOauthToken' +-- +-- * 'scrsSubscriptionId' +-- +-- * 'scrsFields' +-- +-- * 'scrsAlt' +subscriptionsChangeRenewalSettings + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsChangeRenewalSettings +subscriptionsChangeRenewalSettings pScrsCustomerId_ pScrsSubscriptionId_ = + SubscriptionsChangeRenewalSettings + { _scrsQuotaUser = Nothing + , _scrsPrettyPrint = True + , _scrsUserIp = Nothing + , _scrsCustomerId = pScrsCustomerId_ + , _scrsKey = Nothing + , _scrsOauthToken = Nothing + , _scrsSubscriptionId = pScrsSubscriptionId_ + , _scrsFields = Nothing + , _scrsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scrsQuotaUser :: Lens' SubscriptionsChangeRenewalSettings' (Maybe Text) +scrsQuotaUser + = lens _scrsQuotaUser + (\ s a -> s{_scrsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scrsPrettyPrint :: Lens' SubscriptionsChangeRenewalSettings' Bool +scrsPrettyPrint + = lens _scrsPrettyPrint + (\ s a -> s{_scrsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scrsUserIp :: Lens' SubscriptionsChangeRenewalSettings' (Maybe Text) +scrsUserIp + = lens _scrsUserIp (\ s a -> s{_scrsUserIp = a}) + +-- | Id of the Customer +scrsCustomerId :: Lens' SubscriptionsChangeRenewalSettings' Text +scrsCustomerId + = lens _scrsCustomerId + (\ s a -> s{_scrsCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scrsKey :: Lens' SubscriptionsChangeRenewalSettings' (Maybe Text) +scrsKey = lens _scrsKey (\ s a -> s{_scrsKey = a}) + +-- | OAuth 2.0 token for the current user. +scrsOauthToken :: Lens' SubscriptionsChangeRenewalSettings' (Maybe Text) +scrsOauthToken + = lens _scrsOauthToken + (\ s a -> s{_scrsOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +scrsSubscriptionId :: Lens' SubscriptionsChangeRenewalSettings' Text +scrsSubscriptionId + = lens _scrsSubscriptionId + (\ s a -> s{_scrsSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +scrsFields :: Lens' SubscriptionsChangeRenewalSettings' (Maybe Text) +scrsFields + = lens _scrsFields (\ s a -> s{_scrsFields = a}) + +-- | Data format for the response. +scrsAlt :: Lens' SubscriptionsChangeRenewalSettings' Text +scrsAlt = lens _scrsAlt (\ s a -> s{_scrsAlt = a}) + +instance GoogleRequest + SubscriptionsChangeRenewalSettings' where + type Rs SubscriptionsChangeRenewalSettings' = + Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u + SubscriptionsChangeRenewalSettings{..} + = go _scrsQuotaUser _scrsPrettyPrint _scrsUserIp + _scrsCustomerId + _scrsKey + _scrsOauthToken + _scrsSubscriptionId + _scrsFields + _scrsAlt + where go + = clientWithRoute + (Proxy :: + Proxy SubscriptionsChangeRenewalSettingsAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs new file mode 100644 index 000000000..6a34ec33a --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.ChangeSeats +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes the seats configuration of a subscription +-- +-- /See:/ for @ResellerSubscriptionsChangeSeats@. +module Reseller.Subscriptions.ChangeSeats + ( + -- * REST Resource + SubscriptionsChangeSeatsAPI + + -- * Creating a Request + , subscriptionsChangeSeats + , SubscriptionsChangeSeats + + -- * Request Lenses + , scsQuotaUser + , scsPrettyPrint + , scsUserIp + , scsCustomerId + , scsKey + , scsOauthToken + , scsSubscriptionId + , scsFields + , scsAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsChangeSeats@ which the +-- 'SubscriptionsChangeSeats' request conforms to. +type SubscriptionsChangeSeatsAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "changeSeats" :> Post '[JSON] Subscription + +-- | Changes the seats configuration of a subscription +-- +-- /See:/ 'subscriptionsChangeSeats' smart constructor. +data SubscriptionsChangeSeats = SubscriptionsChangeSeats + { _scsQuotaUser :: !(Maybe Text) + , _scsPrettyPrint :: !Bool + , _scsUserIp :: !(Maybe Text) + , _scsCustomerId :: !Text + , _scsKey :: !(Maybe Text) + , _scsOauthToken :: !(Maybe Text) + , _scsSubscriptionId :: !Text + , _scsFields :: !(Maybe Text) + , _scsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsChangeSeats'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scsQuotaUser' +-- +-- * 'scsPrettyPrint' +-- +-- * 'scsUserIp' +-- +-- * 'scsCustomerId' +-- +-- * 'scsKey' +-- +-- * 'scsOauthToken' +-- +-- * 'scsSubscriptionId' +-- +-- * 'scsFields' +-- +-- * 'scsAlt' +subscriptionsChangeSeats + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsChangeSeats +subscriptionsChangeSeats pScsCustomerId_ pScsSubscriptionId_ = + SubscriptionsChangeSeats + { _scsQuotaUser = Nothing + , _scsPrettyPrint = True + , _scsUserIp = Nothing + , _scsCustomerId = pScsCustomerId_ + , _scsKey = Nothing + , _scsOauthToken = Nothing + , _scsSubscriptionId = pScsSubscriptionId_ + , _scsFields = Nothing + , _scsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scsQuotaUser :: Lens' SubscriptionsChangeSeats' (Maybe Text) +scsQuotaUser + = lens _scsQuotaUser (\ s a -> s{_scsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scsPrettyPrint :: Lens' SubscriptionsChangeSeats' Bool +scsPrettyPrint + = lens _scsPrettyPrint + (\ s a -> s{_scsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scsUserIp :: Lens' SubscriptionsChangeSeats' (Maybe Text) +scsUserIp + = lens _scsUserIp (\ s a -> s{_scsUserIp = a}) + +-- | Id of the Customer +scsCustomerId :: Lens' SubscriptionsChangeSeats' Text +scsCustomerId + = lens _scsCustomerId + (\ s a -> s{_scsCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scsKey :: Lens' SubscriptionsChangeSeats' (Maybe Text) +scsKey = lens _scsKey (\ s a -> s{_scsKey = a}) + +-- | OAuth 2.0 token for the current user. +scsOauthToken :: Lens' SubscriptionsChangeSeats' (Maybe Text) +scsOauthToken + = lens _scsOauthToken + (\ s a -> s{_scsOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +scsSubscriptionId :: Lens' SubscriptionsChangeSeats' Text +scsSubscriptionId + = lens _scsSubscriptionId + (\ s a -> s{_scsSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +scsFields :: Lens' SubscriptionsChangeSeats' (Maybe Text) +scsFields + = lens _scsFields (\ s a -> s{_scsFields = a}) + +-- | Data format for the response. +scsAlt :: Lens' SubscriptionsChangeSeats' Text +scsAlt = lens _scsAlt (\ s a -> s{_scsAlt = a}) + +instance GoogleRequest SubscriptionsChangeSeats' + where + type Rs SubscriptionsChangeSeats' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsChangeSeats{..} + = go _scsQuotaUser _scsPrettyPrint _scsUserIp + _scsCustomerId + _scsKey + _scsOauthToken + _scsSubscriptionId + _scsFields + _scsAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsChangeSeatsAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs new file mode 100644 index 000000000..f5e6140eb --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels\/Downgrades a subscription. +-- +-- /See:/ for @ResellerSubscriptionsDelete@. +module Reseller.Subscriptions.Delete + ( + -- * REST Resource + SubscriptionsDeleteAPI + + -- * Creating a Request + , subscriptionsDelete + , SubscriptionsDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdCustomerId + , sdDeletionType + , sdKey + , sdOauthToken + , sdSubscriptionId + , sdFields + , sdAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsDelete@ which the +-- 'SubscriptionsDelete' request conforms to. +type SubscriptionsDeleteAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + QueryParam "deletionType" Text :> Delete '[JSON] () + +-- | Cancels\/Downgrades a subscription. +-- +-- /See:/ 'subscriptionsDelete' smart constructor. +data SubscriptionsDelete = SubscriptionsDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdCustomerId :: !Text + , _sdDeletionType :: !Text + , _sdKey :: !(Maybe Text) + , _sdOauthToken :: !(Maybe Text) + , _sdSubscriptionId :: !Text + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdCustomerId' +-- +-- * 'sdDeletionType' +-- +-- * 'sdKey' +-- +-- * 'sdOauthToken' +-- +-- * 'sdSubscriptionId' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +subscriptionsDelete + :: Text -- ^ 'customerId' + -> Text -- ^ 'deletionType' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsDelete +subscriptionsDelete pSdCustomerId_ pSdDeletionType_ pSdSubscriptionId_ = + SubscriptionsDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdCustomerId = pSdCustomerId_ + , _sdDeletionType = pSdDeletionType_ + , _sdKey = Nothing + , _sdOauthToken = Nothing + , _sdSubscriptionId = pSdSubscriptionId_ + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SubscriptionsDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SubscriptionsDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SubscriptionsDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | Id of the Customer +sdCustomerId :: Lens' SubscriptionsDelete' Text +sdCustomerId + = lens _sdCustomerId (\ s a -> s{_sdCustomerId = a}) + +-- | Whether the subscription is to be fully cancelled or downgraded +sdDeletionType :: Lens' SubscriptionsDelete' Text +sdDeletionType + = lens _sdDeletionType + (\ s a -> s{_sdDeletionType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SubscriptionsDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SubscriptionsDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +sdSubscriptionId :: Lens' SubscriptionsDelete' Text +sdSubscriptionId + = lens _sdSubscriptionId + (\ s a -> s{_sdSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SubscriptionsDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SubscriptionsDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SubscriptionsDelete' where + type Rs SubscriptionsDelete' = () + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp + _sdCustomerId + (Just _sdDeletionType) + _sdKey + _sdOauthToken + _sdSubscriptionId + _sdFields + _sdAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsDeleteAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs new file mode 100644 index 000000000..fbc0fb8ed --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a subscription of the customer. +-- +-- /See:/ for @ResellerSubscriptionsGet@. +module Reseller.Subscriptions.Get + ( + -- * REST Resource + SubscriptionsGetAPI + + -- * Creating a Request + , subscriptionsGet + , SubscriptionsGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgCustomerId + , sgKey + , sgOauthToken + , sgSubscriptionId + , sgFields + , sgAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsGet@ which the +-- 'SubscriptionsGet' request conforms to. +type SubscriptionsGetAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + Get '[JSON] Subscription + +-- | Gets a subscription of the customer. +-- +-- /See:/ 'subscriptionsGet' smart constructor. +data SubscriptionsGet = SubscriptionsGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgCustomerId :: !Text + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgSubscriptionId :: !Text + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgCustomerId' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgSubscriptionId' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +subscriptionsGet + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsGet +subscriptionsGet pSgCustomerId_ pSgSubscriptionId_ = + SubscriptionsGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgCustomerId = pSgCustomerId_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgSubscriptionId = pSgSubscriptionId_ + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SubscriptionsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SubscriptionsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SubscriptionsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | Id of the Customer +sgCustomerId :: Lens' SubscriptionsGet' Text +sgCustomerId + = lens _sgCustomerId (\ s a -> s{_sgCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SubscriptionsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SubscriptionsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +sgSubscriptionId :: Lens' SubscriptionsGet' Text +sgSubscriptionId + = lens _sgSubscriptionId + (\ s a -> s{_sgSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SubscriptionsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SubscriptionsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SubscriptionsGet' where + type Rs SubscriptionsGet' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp + _sgCustomerId + _sgKey + _sgOauthToken + _sgSubscriptionId + _sgFields + _sgAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsGetAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs new file mode 100644 index 000000000..1890aa95d --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates\/Transfers a subscription for the customer. +-- +-- /See:/ for @ResellerSubscriptionsInsert@. +module Reseller.Subscriptions.Insert + ( + -- * REST Resource + SubscriptionsInsertAPI + + -- * Creating a Request + , subscriptionsInsert + , SubscriptionsInsert + + -- * Request Lenses + , siQuotaUser + , siPrettyPrint + , siUserIp + , siCustomerId + , siKey + , siCustomerAuthToken + , siOauthToken + , siFields + , siAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsInsert@ which the +-- 'SubscriptionsInsert' request conforms to. +type SubscriptionsInsertAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + QueryParam "customerAuthToken" Text :> + Post '[JSON] Subscription + +-- | Creates\/Transfers a subscription for the customer. +-- +-- /See:/ 'subscriptionsInsert' smart constructor. +data SubscriptionsInsert = SubscriptionsInsert + { _siQuotaUser :: !(Maybe Text) + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siCustomerId :: !Text + , _siKey :: !(Maybe Text) + , _siCustomerAuthToken :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siCustomerId' +-- +-- * 'siKey' +-- +-- * 'siCustomerAuthToken' +-- +-- * 'siOauthToken' +-- +-- * 'siFields' +-- +-- * 'siAlt' +subscriptionsInsert + :: Text -- ^ 'customerId' + -> SubscriptionsInsert +subscriptionsInsert pSiCustomerId_ = + SubscriptionsInsert + { _siQuotaUser = Nothing + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siCustomerId = pSiCustomerId_ + , _siKey = Nothing + , _siCustomerAuthToken = Nothing + , _siOauthToken = Nothing + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' SubscriptionsInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' SubscriptionsInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' SubscriptionsInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | Id of the Customer +siCustomerId :: Lens' SubscriptionsInsert' Text +siCustomerId + = lens _siCustomerId (\ s a -> s{_siCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' SubscriptionsInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | An auth token needed for transferring a subscription. Can be generated +-- at https:\/\/www.google.com\/a\/cpanel\/customer-domain\/TransferToken. +-- Optional. +siCustomerAuthToken :: Lens' SubscriptionsInsert' (Maybe Text) +siCustomerAuthToken + = lens _siCustomerAuthToken + (\ s a -> s{_siCustomerAuthToken = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' SubscriptionsInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' SubscriptionsInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' SubscriptionsInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest SubscriptionsInsert' where + type Rs SubscriptionsInsert' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsInsert{..} + = go _siQuotaUser _siPrettyPrint _siUserIp + _siCustomerId + _siKey + _siCustomerAuthToken + _siOauthToken + _siFields + _siAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsInsertAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs new file mode 100644 index 000000000..fbe6c3294 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists subscriptions of a reseller, optionally filtered by a customer +-- name prefix. +-- +-- /See:/ for @ResellerSubscriptionsList@. +module Reseller.Subscriptions.List + ( + -- * REST Resource + SubscriptionsListAPI + + -- * Creating a Request + , subscriptionsList + , SubscriptionsList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slCustomerNamePrefix + , slCustomerId + , slKey + , slCustomerAuthToken + , slPageToken + , slOauthToken + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsList@ which the +-- 'SubscriptionsList' request conforms to. +type SubscriptionsListAPI = + "subscriptions" :> + QueryParam "customerNamePrefix" Text :> + QueryParam "customerId" Text :> + QueryParam "customerAuthToken" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Subscriptions + +-- | Lists subscriptions of a reseller, optionally filtered by a customer +-- name prefix. +-- +-- /See:/ 'subscriptionsList' smart constructor. +data SubscriptionsList = SubscriptionsList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slCustomerNamePrefix :: !(Maybe Text) + , _slCustomerId :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slCustomerAuthToken :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slMaxResults :: !(Maybe Word32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slCustomerNamePrefix' +-- +-- * 'slCustomerId' +-- +-- * 'slKey' +-- +-- * 'slCustomerAuthToken' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +subscriptionsList + :: SubscriptionsList +subscriptionsList = + SubscriptionsList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slCustomerNamePrefix = Nothing + , _slCustomerId = Nothing + , _slKey = Nothing + , _slCustomerAuthToken = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SubscriptionsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SubscriptionsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SubscriptionsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | Prefix of the customer\'s domain name by which the subscriptions should +-- be filtered. Optional +slCustomerNamePrefix :: Lens' SubscriptionsList' (Maybe Text) +slCustomerNamePrefix + = lens _slCustomerNamePrefix + (\ s a -> s{_slCustomerNamePrefix = a}) + +-- | Id of the Customer +slCustomerId :: Lens' SubscriptionsList' (Maybe Text) +slCustomerId + = lens _slCustomerId (\ s a -> s{_slCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SubscriptionsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | An auth token needed if the customer is not a resold customer of this +-- reseller. Can be generated at +-- https:\/\/www.google.com\/a\/cpanel\/customer-domain\/TransferToken.Optional. +slCustomerAuthToken :: Lens' SubscriptionsList' (Maybe Text) +slCustomerAuthToken + = lens _slCustomerAuthToken + (\ s a -> s{_slCustomerAuthToken = a}) + +-- | Token to specify next page in the list +slPageToken :: Lens' SubscriptionsList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SubscriptionsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Maximum number of results to return +slMaxResults :: Lens' SubscriptionsList' (Maybe Word32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SubscriptionsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SubscriptionsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SubscriptionsList' where + type Rs SubscriptionsList' = Subscriptions + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp + _slCustomerNamePrefix + _slCustomerId + _slKey + _slCustomerAuthToken + _slPageToken + _slOauthToken + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsListAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs new file mode 100644 index 000000000..c37a92e53 --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.StartPaidService +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Starts paid service of a trial subscription +-- +-- /See:/ for @ResellerSubscriptionsStartPaidService@. +module Reseller.Subscriptions.StartPaidService + ( + -- * REST Resource + SubscriptionsStartPaidServiceAPI + + -- * Creating a Request + , subscriptionsStartPaidService + , SubscriptionsStartPaidService + + -- * Request Lenses + , sspsQuotaUser + , sspsPrettyPrint + , sspsUserIp + , sspsCustomerId + , sspsKey + , sspsOauthToken + , sspsSubscriptionId + , sspsFields + , sspsAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsStartPaidService@ which the +-- 'SubscriptionsStartPaidService' request conforms to. +type SubscriptionsStartPaidServiceAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "startPaidService" :> Post '[JSON] Subscription + +-- | Starts paid service of a trial subscription +-- +-- /See:/ 'subscriptionsStartPaidService' smart constructor. +data SubscriptionsStartPaidService = SubscriptionsStartPaidService + { _sspsQuotaUser :: !(Maybe Text) + , _sspsPrettyPrint :: !Bool + , _sspsUserIp :: !(Maybe Text) + , _sspsCustomerId :: !Text + , _sspsKey :: !(Maybe Text) + , _sspsOauthToken :: !(Maybe Text) + , _sspsSubscriptionId :: !Text + , _sspsFields :: !(Maybe Text) + , _sspsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsStartPaidService'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sspsQuotaUser' +-- +-- * 'sspsPrettyPrint' +-- +-- * 'sspsUserIp' +-- +-- * 'sspsCustomerId' +-- +-- * 'sspsKey' +-- +-- * 'sspsOauthToken' +-- +-- * 'sspsSubscriptionId' +-- +-- * 'sspsFields' +-- +-- * 'sspsAlt' +subscriptionsStartPaidService + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsStartPaidService +subscriptionsStartPaidService pSspsCustomerId_ pSspsSubscriptionId_ = + SubscriptionsStartPaidService + { _sspsQuotaUser = Nothing + , _sspsPrettyPrint = True + , _sspsUserIp = Nothing + , _sspsCustomerId = pSspsCustomerId_ + , _sspsKey = Nothing + , _sspsOauthToken = Nothing + , _sspsSubscriptionId = pSspsSubscriptionId_ + , _sspsFields = Nothing + , _sspsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sspsQuotaUser :: Lens' SubscriptionsStartPaidService' (Maybe Text) +sspsQuotaUser + = lens _sspsQuotaUser + (\ s a -> s{_sspsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sspsPrettyPrint :: Lens' SubscriptionsStartPaidService' Bool +sspsPrettyPrint + = lens _sspsPrettyPrint + (\ s a -> s{_sspsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sspsUserIp :: Lens' SubscriptionsStartPaidService' (Maybe Text) +sspsUserIp + = lens _sspsUserIp (\ s a -> s{_sspsUserIp = a}) + +-- | Id of the Customer +sspsCustomerId :: Lens' SubscriptionsStartPaidService' Text +sspsCustomerId + = lens _sspsCustomerId + (\ s a -> s{_sspsCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sspsKey :: Lens' SubscriptionsStartPaidService' (Maybe Text) +sspsKey = lens _sspsKey (\ s a -> s{_sspsKey = a}) + +-- | OAuth 2.0 token for the current user. +sspsOauthToken :: Lens' SubscriptionsStartPaidService' (Maybe Text) +sspsOauthToken + = lens _sspsOauthToken + (\ s a -> s{_sspsOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +sspsSubscriptionId :: Lens' SubscriptionsStartPaidService' Text +sspsSubscriptionId + = lens _sspsSubscriptionId + (\ s a -> s{_sspsSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +sspsFields :: Lens' SubscriptionsStartPaidService' (Maybe Text) +sspsFields + = lens _sspsFields (\ s a -> s{_sspsFields = a}) + +-- | Data format for the response. +sspsAlt :: Lens' SubscriptionsStartPaidService' Text +sspsAlt = lens _sspsAlt (\ s a -> s{_sspsAlt = a}) + +instance GoogleRequest SubscriptionsStartPaidService' + where + type Rs SubscriptionsStartPaidService' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u + SubscriptionsStartPaidService{..} + = go _sspsQuotaUser _sspsPrettyPrint _sspsUserIp + _sspsCustomerId + _sspsKey + _sspsOauthToken + _sspsSubscriptionId + _sspsFields + _sspsAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsStartPaidServiceAPI) + r + u diff --git a/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs new file mode 100644 index 000000000..3a47f8f8b --- /dev/null +++ b/gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Reseller.Subscriptions.Suspend +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Suspends an active subscription +-- +-- /See:/ for @ResellerSubscriptionsSuspend@. +module Reseller.Subscriptions.Suspend + ( + -- * REST Resource + SubscriptionsSuspendAPI + + -- * Creating a Request + , subscriptionsSuspend + , SubscriptionsSuspend + + -- * Request Lenses + , sQuotaUser + , sPrettyPrint + , sUserIp + , sCustomerId + , sKey + , sOauthToken + , sSubscriptionId + , sFields + , sAlt + ) where + +import Network.Google.AppsReseller.Types +import Network.Google.Prelude + +-- | A resource alias for @ResellerSubscriptionsSuspend@ which the +-- 'SubscriptionsSuspend' request conforms to. +type SubscriptionsSuspendAPI = + "customers" :> + Capture "customerId" Text :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "suspend" :> Post '[JSON] Subscription + +-- | Suspends an active subscription +-- +-- /See:/ 'subscriptionsSuspend' smart constructor. +data SubscriptionsSuspend = SubscriptionsSuspend + { _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sUserIp :: !(Maybe Text) + , _sCustomerId :: !Text + , _sKey :: !(Maybe Text) + , _sOauthToken :: !(Maybe Text) + , _sSubscriptionId :: !Text + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsSuspend'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sUserIp' +-- +-- * 'sCustomerId' +-- +-- * 'sKey' +-- +-- * 'sOauthToken' +-- +-- * 'sSubscriptionId' +-- +-- * 'sFields' +-- +-- * 'sAlt' +subscriptionsSuspend + :: Text -- ^ 'customerId' + -> Text -- ^ 'subscriptionId' + -> SubscriptionsSuspend +subscriptionsSuspend pSCustomerId_ pSSubscriptionId_ = + SubscriptionsSuspend + { _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sUserIp = Nothing + , _sCustomerId = pSCustomerId_ + , _sKey = Nothing + , _sOauthToken = Nothing + , _sSubscriptionId = pSSubscriptionId_ + , _sFields = Nothing + , _sAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' SubscriptionsSuspend' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' SubscriptionsSuspend' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' SubscriptionsSuspend' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | Id of the Customer +sCustomerId :: Lens' SubscriptionsSuspend' Text +sCustomerId + = lens _sCustomerId (\ s a -> s{_sCustomerId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' SubscriptionsSuspend' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' SubscriptionsSuspend' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | Id of the subscription, which is unique for a customer +sSubscriptionId :: Lens' SubscriptionsSuspend' Text +sSubscriptionId + = lens _sSubscriptionId + (\ s a -> s{_sSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' SubscriptionsSuspend' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' SubscriptionsSuspend' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest SubscriptionsSuspend' where + type Rs SubscriptionsSuspend' = Subscription + request = requestWithRoute defReq appsResellerURL + requestWithRoute r u SubscriptionsSuspend{..} + = go _sQuotaUser _sPrettyPrint _sUserIp _sCustomerId + _sKey + _sOauthToken + _sSubscriptionId + _sFields + _sAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsSuspendAPI) + r + u diff --git a/gogol-apps-reseller/gogol-apps-reseller.cabal b/gogol-apps-reseller/gogol-apps-reseller.cabal new file mode 100644 index 000000000..5bd4ad596 --- /dev/null +++ b/gogol-apps-reseller/gogol-apps-reseller.cabal @@ -0,0 +1,56 @@ +name: gogol-apps-reseller +version: 0.0.1 +synopsis: Enterprise Apps Reseller API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you create and manage your customers and their subscriptions. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppsReseller + , Network.Google.AppsReseller.Types + , Network.Google.Resource.Reseller.Customers.Get + , Network.Google.Resource.Reseller.Customers.Insert + , Network.Google.Resource.Reseller.Customers.Patch + , Network.Google.Resource.Reseller.Customers.Update + , Network.Google.Resource.Reseller.Subscriptions.Activate + , Network.Google.Resource.Reseller.Subscriptions.ChangePlan + , Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings + , Network.Google.Resource.Reseller.Subscriptions.ChangeSeats + , Network.Google.Resource.Reseller.Subscriptions.Delete + , Network.Google.Resource.Reseller.Subscriptions.Get + , Network.Google.Resource.Reseller.Subscriptions.Insert + , Network.Google.Resource.Reseller.Subscriptions.List + , Network.Google.Resource.Reseller.Subscriptions.StartPaidService + , Network.Google.Resource.Reseller.Subscriptions.Suspend + + other-modules: + Network.Google.AppsReseller.Types.Product + , Network.Google.AppsReseller.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-apps-reseller/src/.gitkeep b/gogol-apps-reseller/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-apps-tasks/LICENSE b/gogol-apps-tasks/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-apps-tasks/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-apps-tasks/Makefile b/gogol-apps-tasks/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-apps-tasks/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-apps-tasks/README.md b/gogol-apps-tasks/README.md new file mode 100644 index 000000000..0f4ed084d --- /dev/null +++ b/gogol-apps-tasks/README.md @@ -0,0 +1,28 @@ +# gogol-apps-tasks + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Tasks API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-apps-tasks` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-apps-tasks/Setup.hs b/gogol-apps-tasks/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-apps-tasks/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-apps-tasks/gen/Network/Google/AppsTasks.hs b/gogol-apps-tasks/gen/Network/Google/AppsTasks.hs new file mode 100644 index 000000000..5ef0468ac --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/AppsTasks.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.AppsTasks +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you manage your tasks and task lists. +-- +-- /See:/ +module Network.Google.AppsTasks + ( + -- * API + AppsTasksAPI + , appsTasksAPI + , appsTasksURL + + -- * Service Methods + + -- * REST Resources + + -- ** TasksTasklistsDelete + , module Tasks.Tasklists.Delete + + -- ** TasksTasklistsGet + , module Tasks.Tasklists.Get + + -- ** TasksTasklistsInsert + , module Tasks.Tasklists.Insert + + -- ** TasksTasklistsList + , module Tasks.Tasklists.List + + -- ** TasksTasklistsPatch + , module Tasks.Tasklists.Patch + + -- ** TasksTasklistsUpdate + , module Tasks.Tasklists.Update + + -- ** TasksTasksClear + , module Tasks.Tasks.Clear + + -- ** TasksTasksDelete + , module Tasks.Tasks.Delete + + -- ** TasksTasksGet + , module Tasks.Tasks.Get + + -- ** TasksTasksInsert + , module Tasks.Tasks.Insert + + -- ** TasksTasksList + , module Tasks.Tasks.List + + -- ** TasksTasksMove + , module Tasks.Tasks.Move + + -- ** TasksTasksPatch + , module Tasks.Tasks.Patch + + -- ** TasksTasksUpdate + , module Tasks.Tasks.Update + + -- * Types + + -- ** Tasks + , Tasks + , tasks + , tEtag + , tNextPageToken + , tKind + , tItems + + -- ** TaskLists + , TaskLists + , taskLists + , tlEtag + , tlNextPageToken + , tlKind + , tlItems + + -- ** TaskList + , TaskList + , taskList + , tasEtag + , tasKind + , tasSelfLink + , tasId + , tasUpdated + , tasTitle + + -- ** Task + , Task + , task + , ttParent + , ttStatus + , ttDue + , ttEtag + , ttKind + , ttSelfLink + , ttHidden + , ttCompleted + , ttId + , ttDeleted + , ttUpdated + , ttTitle + , ttLinks + , ttNotes + , ttPosition + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude +import Network.Google.Resource.Tasks.Tasklists.Delete +import Network.Google.Resource.Tasks.Tasklists.Get +import Network.Google.Resource.Tasks.Tasklists.Insert +import Network.Google.Resource.Tasks.Tasklists.List +import Network.Google.Resource.Tasks.Tasklists.Patch +import Network.Google.Resource.Tasks.Tasklists.Update +import Network.Google.Resource.Tasks.Tasks.Clear +import Network.Google.Resource.Tasks.Tasks.Delete +import Network.Google.Resource.Tasks.Tasks.Get +import Network.Google.Resource.Tasks.Tasks.Insert +import Network.Google.Resource.Tasks.Tasks.List +import Network.Google.Resource.Tasks.Tasks.Move +import Network.Google.Resource.Tasks.Tasks.Patch +import Network.Google.Resource.Tasks.Tasks.Update + +{- $resources +TODO +-} + +type AppsTasksAPI = Tasks :<|> Tasklists + +appsTasksAPI :: Proxy AppsTasksAPI +appsTasksAPI = Proxy diff --git a/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types.hs b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types.hs new file mode 100644 index 000000000..7a5a1e256 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types.hs @@ -0,0 +1,75 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsTasks.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsTasks.Types + ( + -- * Service URL + appsTasksURL + + -- * Tasks + , Tasks + , tasks + , tEtag + , tNextPageToken + , tKind + , tItems + + -- * TaskLists + , TaskLists + , taskLists + , tlEtag + , tlNextPageToken + , tlKind + , tlItems + + -- * TaskList + , TaskList + , taskList + , tasEtag + , tasKind + , tasSelfLink + , tasId + , tasUpdated + , tasTitle + + -- * Task + , Task + , task + , ttParent + , ttStatus + , ttDue + , ttEtag + , ttKind + , ttSelfLink + , ttHidden + , ttCompleted + , ttId + , ttDeleted + , ttUpdated + , ttTitle + , ttLinks + , ttNotes + , ttPosition + ) where + +import Network.Google.AppsTasks.Types.Product +import Network.Google.AppsTasks.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Tasks API. +appsTasksURL :: BaseURL +appsTasksURL + = BaseUrl Https + "https://www.googleapis.com/tasks/v1/" + 443 diff --git a/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Product.hs b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Product.hs new file mode 100644 index 000000000..bdd2b5555 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Product.hs @@ -0,0 +1,427 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsTasks.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsTasks.Types.Product where + +import Network.Google.AppsTasks.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'tasks' smart constructor. +data Tasks = Tasks + { _tEtag :: !(Maybe Text) + , _tNextPageToken :: !(Maybe Text) + , _tKind :: !Text + , _tItems :: !(Maybe [Maybe Task]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tasks' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tEtag' +-- +-- * 'tNextPageToken' +-- +-- * 'tKind' +-- +-- * 'tItems' +tasks + :: Tasks +tasks = + Tasks + { _tEtag = Nothing + , _tNextPageToken = Nothing + , _tKind = "tasks#tasks" + , _tItems = Nothing + } + +-- | ETag of the resource. +tEtag :: Lens' Tasks (Maybe Text) +tEtag = lens _tEtag (\ s a -> s{_tEtag = a}) + +-- | Token used to access the next page of this result. +tNextPageToken :: Lens' Tasks (Maybe Text) +tNextPageToken + = lens _tNextPageToken + (\ s a -> s{_tNextPageToken = a}) + +-- | Type of the resource. This is always \"tasks#tasks\". +tKind :: Lens' Tasks Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | Collection of tasks. +tItems :: Lens' Tasks [Maybe Task] +tItems + = lens _tItems (\ s a -> s{_tItems = a}) . _Default . + _Coerce + +instance FromJSON Tasks where + parseJSON + = withObject "Tasks" + (\ o -> + Tasks <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "tasks#tasks") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Tasks where + toJSON Tasks{..} + = object + (catMaybes + [("etag" .=) <$> _tEtag, + ("nextPageToken" .=) <$> _tNextPageToken, + Just ("kind" .= _tKind), ("items" .=) <$> _tItems]) + +-- +-- /See:/ 'taskLists' smart constructor. +data TaskLists = TaskLists + { _tlEtag :: !(Maybe Text) + , _tlNextPageToken :: !(Maybe Text) + , _tlKind :: !Text + , _tlItems :: !(Maybe [Maybe TaskList]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskLists' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlEtag' +-- +-- * 'tlNextPageToken' +-- +-- * 'tlKind' +-- +-- * 'tlItems' +taskLists + :: TaskLists +taskLists = + TaskLists + { _tlEtag = Nothing + , _tlNextPageToken = Nothing + , _tlKind = "tasks#taskLists" + , _tlItems = Nothing + } + +-- | ETag of the resource. +tlEtag :: Lens' TaskLists (Maybe Text) +tlEtag = lens _tlEtag (\ s a -> s{_tlEtag = a}) + +-- | Token that can be used to request the next page of this result. +tlNextPageToken :: Lens' TaskLists (Maybe Text) +tlNextPageToken + = lens _tlNextPageToken + (\ s a -> s{_tlNextPageToken = a}) + +-- | Type of the resource. This is always \"tasks#taskLists\". +tlKind :: Lens' TaskLists Text +tlKind = lens _tlKind (\ s a -> s{_tlKind = a}) + +-- | Collection of task lists. +tlItems :: Lens' TaskLists [Maybe TaskList] +tlItems + = lens _tlItems (\ s a -> s{_tlItems = a}) . _Default + . _Coerce + +instance FromJSON TaskLists where + parseJSON + = withObject "TaskLists" + (\ o -> + TaskLists <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "tasks#taskLists") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TaskLists where + toJSON TaskLists{..} + = object + (catMaybes + [("etag" .=) <$> _tlEtag, + ("nextPageToken" .=) <$> _tlNextPageToken, + Just ("kind" .= _tlKind), ("items" .=) <$> _tlItems]) + +-- +-- /See:/ 'taskList' smart constructor. +data TaskList = TaskList + { _tasEtag :: !(Maybe Text) + , _tasKind :: !Text + , _tasSelfLink :: !(Maybe Text) + , _tasId :: !(Maybe Text) + , _tasUpdated :: !(Maybe UTCTime) + , _tasTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tasEtag' +-- +-- * 'tasKind' +-- +-- * 'tasSelfLink' +-- +-- * 'tasId' +-- +-- * 'tasUpdated' +-- +-- * 'tasTitle' +taskList + :: TaskList +taskList = + TaskList + { _tasEtag = Nothing + , _tasKind = "tasks#taskList" + , _tasSelfLink = Nothing + , _tasId = Nothing + , _tasUpdated = Nothing + , _tasTitle = Nothing + } + +-- | ETag of the resource. +tasEtag :: Lens' TaskList (Maybe Text) +tasEtag = lens _tasEtag (\ s a -> s{_tasEtag = a}) + +-- | Type of the resource. This is always \"tasks#taskList\". +tasKind :: Lens' TaskList Text +tasKind = lens _tasKind (\ s a -> s{_tasKind = a}) + +-- | URL pointing to this task list. Used to retrieve, update, or delete this +-- task list. +tasSelfLink :: Lens' TaskList (Maybe Text) +tasSelfLink + = lens _tasSelfLink (\ s a -> s{_tasSelfLink = a}) + +-- | Task list identifier. +tasId :: Lens' TaskList (Maybe Text) +tasId = lens _tasId (\ s a -> s{_tasId = a}) + +-- | Last modification time of the task list (as a RFC 3339 timestamp). +tasUpdated :: Lens' TaskList (Maybe UTCTime) +tasUpdated + = lens _tasUpdated (\ s a -> s{_tasUpdated = a}) + +-- | Title of the task list. +tasTitle :: Lens' TaskList (Maybe Text) +tasTitle = lens _tasTitle (\ s a -> s{_tasTitle = a}) + +instance FromJSON TaskList where + parseJSON + = withObject "TaskList" + (\ o -> + TaskList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "tasks#taskList") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON TaskList where + toJSON TaskList{..} + = object + (catMaybes + [("etag" .=) <$> _tasEtag, Just ("kind" .= _tasKind), + ("selfLink" .=) <$> _tasSelfLink, + ("id" .=) <$> _tasId, ("updated" .=) <$> _tasUpdated, + ("title" .=) <$> _tasTitle]) + +-- +-- /See:/ 'task' smart constructor. +data Task = Task + { _ttParent :: !(Maybe Text) + , _ttStatus :: !(Maybe Text) + , _ttDue :: !(Maybe UTCTime) + , _ttEtag :: !(Maybe Text) + , _ttKind :: !Text + , _ttSelfLink :: !(Maybe Text) + , _ttHidden :: !(Maybe Bool) + , _ttCompleted :: !(Maybe UTCTime) + , _ttId :: !(Maybe Text) + , _ttDeleted :: !(Maybe Bool) + , _ttUpdated :: !(Maybe UTCTime) + , _ttTitle :: !(Maybe Text) + , _ttLinks :: !(Maybe [TaskLinksItem]) + , _ttNotes :: !(Maybe Text) + , _ttPosition :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Task' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ttParent' +-- +-- * 'ttStatus' +-- +-- * 'ttDue' +-- +-- * 'ttEtag' +-- +-- * 'ttKind' +-- +-- * 'ttSelfLink' +-- +-- * 'ttHidden' +-- +-- * 'ttCompleted' +-- +-- * 'ttId' +-- +-- * 'ttDeleted' +-- +-- * 'ttUpdated' +-- +-- * 'ttTitle' +-- +-- * 'ttLinks' +-- +-- * 'ttNotes' +-- +-- * 'ttPosition' +task + :: Task +task = + Task + { _ttParent = Nothing + , _ttStatus = Nothing + , _ttDue = Nothing + , _ttEtag = Nothing + , _ttKind = "tasks#task" + , _ttSelfLink = Nothing + , _ttHidden = Nothing + , _ttCompleted = Nothing + , _ttId = Nothing + , _ttDeleted = Nothing + , _ttUpdated = Nothing + , _ttTitle = Nothing + , _ttLinks = Nothing + , _ttNotes = Nothing + , _ttPosition = Nothing + } + +-- | Parent task identifier. This field is omitted if it is a top-level task. +-- This field is read-only. Use the \"move\" method to move the task under +-- a different parent or to the top level. +ttParent :: Lens' Task (Maybe Text) +ttParent = lens _ttParent (\ s a -> s{_ttParent = a}) + +-- | Status of the task. This is either \"needsAction\" or \"completed\". +ttStatus :: Lens' Task (Maybe Text) +ttStatus = lens _ttStatus (\ s a -> s{_ttStatus = a}) + +-- | Due date of the task (as a RFC 3339 timestamp). Optional. +ttDue :: Lens' Task (Maybe UTCTime) +ttDue = lens _ttDue (\ s a -> s{_ttDue = a}) + +-- | ETag of the resource. +ttEtag :: Lens' Task (Maybe Text) +ttEtag = lens _ttEtag (\ s a -> s{_ttEtag = a}) + +-- | Type of the resource. This is always \"tasks#task\". +ttKind :: Lens' Task Text +ttKind = lens _ttKind (\ s a -> s{_ttKind = a}) + +-- | URL pointing to this task. Used to retrieve, update, or delete this +-- task. +ttSelfLink :: Lens' Task (Maybe Text) +ttSelfLink + = lens _ttSelfLink (\ s a -> s{_ttSelfLink = a}) + +-- | Flag indicating whether the task is hidden. This is the case if the task +-- had been marked completed when the task list was last cleared. The +-- default is False. This field is read-only. +ttHidden :: Lens' Task (Maybe Bool) +ttHidden = lens _ttHidden (\ s a -> s{_ttHidden = a}) + +-- | Completion date of the task (as a RFC 3339 timestamp). This field is +-- omitted if the task has not been completed. +ttCompleted :: Lens' Task (Maybe UTCTime) +ttCompleted + = lens _ttCompleted (\ s a -> s{_ttCompleted = a}) + +-- | Task identifier. +ttId :: Lens' Task (Maybe Text) +ttId = lens _ttId (\ s a -> s{_ttId = a}) + +-- | Flag indicating whether the task has been deleted. The default if False. +ttDeleted :: Lens' Task (Maybe Bool) +ttDeleted + = lens _ttDeleted (\ s a -> s{_ttDeleted = a}) + +-- | Last modification time of the task (as a RFC 3339 timestamp). +ttUpdated :: Lens' Task (Maybe UTCTime) +ttUpdated + = lens _ttUpdated (\ s a -> s{_ttUpdated = a}) + +-- | Title of the task. +ttTitle :: Lens' Task (Maybe Text) +ttTitle = lens _ttTitle (\ s a -> s{_ttTitle = a}) + +-- | Collection of links. This collection is read-only. +ttLinks :: Lens' Task [TaskLinksItem] +ttLinks + = lens _ttLinks (\ s a -> s{_ttLinks = a}) . _Default + . _Coerce + +-- | Notes describing the task. Optional. +ttNotes :: Lens' Task (Maybe Text) +ttNotes = lens _ttNotes (\ s a -> s{_ttNotes = a}) + +-- | String indicating the position of the task among its sibling tasks under +-- the same parent task or at the top level. If this string is greater than +-- another task\'s corresponding position string according to +-- lexicographical ordering, the task is positioned after the other task +-- under the same parent task (or at the top level). This field is +-- read-only. Use the \"move\" method to move the task to another position. +ttPosition :: Lens' Task (Maybe Text) +ttPosition + = lens _ttPosition (\ s a -> s{_ttPosition = a}) + +instance FromJSON Task where + parseJSON + = withObject "Task" + (\ o -> + Task <$> + (o .:? "parent") <*> (o .:? "status") <*> + (o .:? "due") + <*> (o .:? "etag") + <*> (o .:? "kind" .!= "tasks#task") + <*> (o .:? "selfLink") + <*> (o .:? "hidden") + <*> (o .:? "completed") + <*> (o .:? "id") + <*> (o .:? "deleted") + <*> (o .:? "updated") + <*> (o .:? "title") + <*> (o .:? "links" .!= mempty) + <*> (o .:? "notes") + <*> (o .:? "position")) + +instance ToJSON Task where + toJSON Task{..} + = object + (catMaybes + [("parent" .=) <$> _ttParent, + ("status" .=) <$> _ttStatus, ("due" .=) <$> _ttDue, + ("etag" .=) <$> _ttEtag, Just ("kind" .= _ttKind), + ("selfLink" .=) <$> _ttSelfLink, + ("hidden" .=) <$> _ttHidden, + ("completed" .=) <$> _ttCompleted, + ("id" .=) <$> _ttId, ("deleted" .=) <$> _ttDeleted, + ("updated" .=) <$> _ttUpdated, + ("title" .=) <$> _ttTitle, ("links" .=) <$> _ttLinks, + ("notes" .=) <$> _ttNotes, + ("position" .=) <$> _ttPosition]) diff --git a/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Sum.hs b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Sum.hs new file mode 100644 index 000000000..d93097a0f --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.AppsTasks.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.AppsTasks.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Delete.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Delete.hs new file mode 100644 index 000000000..1de28f4d3 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Delete.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the authenticated user\'s specified task list. +-- +-- /See:/ for @TasksTasklistsDelete@. +module Tasks.Tasklists.Delete + ( + -- * REST Resource + TasklistsDeleteAPI + + -- * Creating a Request + , tasklistsDelete + , TasklistsDelete + + -- * Request Lenses + , tddQuotaUser + , tddPrettyPrint + , tddUserIp + , tddKey + , tddTasklist + , tddOauthToken + , tddFields + , tddAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsDelete@ which the +-- 'TasklistsDelete' request conforms to. +type TasklistsDeleteAPI = + "users" :> + "@me" :> + "lists" :> + Capture "tasklist" Text :> Delete '[JSON] () + +-- | Deletes the authenticated user\'s specified task list. +-- +-- /See:/ 'tasklistsDelete' smart constructor. +data TasklistsDelete = TasklistsDelete + { _tddQuotaUser :: !(Maybe Text) + , _tddPrettyPrint :: !Bool + , _tddUserIp :: !(Maybe Text) + , _tddKey :: !(Maybe Text) + , _tddTasklist :: !Text + , _tddOauthToken :: !(Maybe Text) + , _tddFields :: !(Maybe Text) + , _tddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tddQuotaUser' +-- +-- * 'tddPrettyPrint' +-- +-- * 'tddUserIp' +-- +-- * 'tddKey' +-- +-- * 'tddTasklist' +-- +-- * 'tddOauthToken' +-- +-- * 'tddFields' +-- +-- * 'tddAlt' +tasklistsDelete + :: Text -- ^ 'tasklist' + -> TasklistsDelete +tasklistsDelete pTddTasklist_ = + TasklistsDelete + { _tddQuotaUser = Nothing + , _tddPrettyPrint = True + , _tddUserIp = Nothing + , _tddKey = Nothing + , _tddTasklist = pTddTasklist_ + , _tddOauthToken = Nothing + , _tddFields = Nothing + , _tddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tddQuotaUser :: Lens' TasklistsDelete' (Maybe Text) +tddQuotaUser + = lens _tddQuotaUser (\ s a -> s{_tddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tddPrettyPrint :: Lens' TasklistsDelete' Bool +tddPrettyPrint + = lens _tddPrettyPrint + (\ s a -> s{_tddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tddUserIp :: Lens' TasklistsDelete' (Maybe Text) +tddUserIp + = lens _tddUserIp (\ s a -> s{_tddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tddKey :: Lens' TasklistsDelete' (Maybe Text) +tddKey = lens _tddKey (\ s a -> s{_tddKey = a}) + +-- | Task list identifier. +tddTasklist :: Lens' TasklistsDelete' Text +tddTasklist + = lens _tddTasklist (\ s a -> s{_tddTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tddOauthToken :: Lens' TasklistsDelete' (Maybe Text) +tddOauthToken + = lens _tddOauthToken + (\ s a -> s{_tddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tddFields :: Lens' TasklistsDelete' (Maybe Text) +tddFields + = lens _tddFields (\ s a -> s{_tddFields = a}) + +-- | Data format for the response. +tddAlt :: Lens' TasklistsDelete' Text +tddAlt = lens _tddAlt (\ s a -> s{_tddAlt = a}) + +instance GoogleRequest TasklistsDelete' where + type Rs TasklistsDelete' = () + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsDelete{..} + = go _tddQuotaUser _tddPrettyPrint _tddUserIp _tddKey + _tddTasklist + _tddOauthToken + _tddFields + _tddAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsDeleteAPI) + r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Get.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Get.hs new file mode 100644 index 000000000..d3b6caa54 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the authenticated user\'s specified task list. +-- +-- /See:/ for @TasksTasklistsGet@. +module Tasks.Tasklists.Get + ( + -- * REST Resource + TasklistsGetAPI + + -- * Creating a Request + , tasklistsGet + , TasklistsGet + + -- * Request Lenses + , tggQuotaUser + , tggPrettyPrint + , tggUserIp + , tggKey + , tggTasklist + , tggOauthToken + , tggFields + , tggAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsGet@ which the +-- 'TasklistsGet' request conforms to. +type TasklistsGetAPI = + "users" :> + "@me" :> + "lists" :> + Capture "tasklist" Text :> Get '[JSON] TaskList + +-- | Returns the authenticated user\'s specified task list. +-- +-- /See:/ 'tasklistsGet' smart constructor. +data TasklistsGet = TasklistsGet + { _tggQuotaUser :: !(Maybe Text) + , _tggPrettyPrint :: !Bool + , _tggUserIp :: !(Maybe Text) + , _tggKey :: !(Maybe Text) + , _tggTasklist :: !Text + , _tggOauthToken :: !(Maybe Text) + , _tggFields :: !(Maybe Text) + , _tggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tggQuotaUser' +-- +-- * 'tggPrettyPrint' +-- +-- * 'tggUserIp' +-- +-- * 'tggKey' +-- +-- * 'tggTasklist' +-- +-- * 'tggOauthToken' +-- +-- * 'tggFields' +-- +-- * 'tggAlt' +tasklistsGet + :: Text -- ^ 'tasklist' + -> TasklistsGet +tasklistsGet pTggTasklist_ = + TasklistsGet + { _tggQuotaUser = Nothing + , _tggPrettyPrint = True + , _tggUserIp = Nothing + , _tggKey = Nothing + , _tggTasklist = pTggTasklist_ + , _tggOauthToken = Nothing + , _tggFields = Nothing + , _tggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tggQuotaUser :: Lens' TasklistsGet' (Maybe Text) +tggQuotaUser + = lens _tggQuotaUser (\ s a -> s{_tggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tggPrettyPrint :: Lens' TasklistsGet' Bool +tggPrettyPrint + = lens _tggPrettyPrint + (\ s a -> s{_tggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tggUserIp :: Lens' TasklistsGet' (Maybe Text) +tggUserIp + = lens _tggUserIp (\ s a -> s{_tggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tggKey :: Lens' TasklistsGet' (Maybe Text) +tggKey = lens _tggKey (\ s a -> s{_tggKey = a}) + +-- | Task list identifier. +tggTasklist :: Lens' TasklistsGet' Text +tggTasklist + = lens _tggTasklist (\ s a -> s{_tggTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tggOauthToken :: Lens' TasklistsGet' (Maybe Text) +tggOauthToken + = lens _tggOauthToken + (\ s a -> s{_tggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tggFields :: Lens' TasklistsGet' (Maybe Text) +tggFields + = lens _tggFields (\ s a -> s{_tggFields = a}) + +-- | Data format for the response. +tggAlt :: Lens' TasklistsGet' Text +tggAlt = lens _tggAlt (\ s a -> s{_tggAlt = a}) + +instance GoogleRequest TasklistsGet' where + type Rs TasklistsGet' = TaskList + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsGet{..} + = go _tggQuotaUser _tggPrettyPrint _tggUserIp _tggKey + _tggTasklist + _tggOauthToken + _tggFields + _tggAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsGetAPI) r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Insert.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Insert.hs new file mode 100644 index 000000000..d474967a5 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Insert.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new task list and adds it to the authenticated user\'s task +-- lists. +-- +-- /See:/ for @TasksTasklistsInsert@. +module Tasks.Tasklists.Insert + ( + -- * REST Resource + TasklistsInsertAPI + + -- * Creating a Request + , tasklistsInsert + , TasklistsInsert + + -- * Request Lenses + , tQuotaUser + , tPrettyPrint + , tUserIp + , tKey + , tOauthToken + , tFields + , tAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsInsert@ which the +-- 'TasklistsInsert' request conforms to. +type TasklistsInsertAPI = + "users" :> "@me" :> "lists" :> Post '[JSON] TaskList + +-- | Creates a new task list and adds it to the authenticated user\'s task +-- lists. +-- +-- /See:/ 'tasklistsInsert' smart constructor. +data TasklistsInsert = TasklistsInsert + { _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tUserIp :: !(Maybe Text) + , _tKey :: !(Maybe Text) + , _tOauthToken :: !(Maybe Text) + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tUserIp' +-- +-- * 'tKey' +-- +-- * 'tOauthToken' +-- +-- * 'tFields' +-- +-- * 'tAlt' +tasklistsInsert + :: TasklistsInsert +tasklistsInsert = + TasklistsInsert + { _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tUserIp = Nothing + , _tKey = Nothing + , _tOauthToken = Nothing + , _tFields = Nothing + , _tAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TasklistsInsert' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TasklistsInsert' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TasklistsInsert' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TasklistsInsert' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TasklistsInsert' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TasklistsInsert' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TasklistsInsert' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TasklistsInsert' where + type Rs TasklistsInsert' = TaskList + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsInsert{..} + = go _tQuotaUser _tPrettyPrint _tUserIp _tKey + _tOauthToken + _tFields + _tAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsInsertAPI) + r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/List.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/List.hs new file mode 100644 index 000000000..ac3b37f60 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/List.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns all the authenticated user\'s task lists. +-- +-- /See:/ for @TasksTasklistsList@. +module Tasks.Tasklists.List + ( + -- * REST Resource + TasklistsListAPI + + -- * Creating a Request + , tasklistsList + , TasklistsList + + -- * Request Lenses + , tasQuotaUser + , tasPrettyPrint + , tasUserIp + , tasKey + , tasPageToken + , tasOauthToken + , tasMaxResults + , tasFields + , tasAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsList@ which the +-- 'TasklistsList' request conforms to. +type TasklistsListAPI = + "users" :> + "@me" :> + "lists" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int64 :> + Get '[JSON] TaskLists + +-- | Returns all the authenticated user\'s task lists. +-- +-- /See:/ 'tasklistsList' smart constructor. +data TasklistsList = TasklistsList + { _tasQuotaUser :: !(Maybe Text) + , _tasPrettyPrint :: !Bool + , _tasUserIp :: !(Maybe Text) + , _tasKey :: !(Maybe Text) + , _tasPageToken :: !(Maybe Text) + , _tasOauthToken :: !(Maybe Text) + , _tasMaxResults :: !(Maybe Int64) + , _tasFields :: !(Maybe Text) + , _tasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tasQuotaUser' +-- +-- * 'tasPrettyPrint' +-- +-- * 'tasUserIp' +-- +-- * 'tasKey' +-- +-- * 'tasPageToken' +-- +-- * 'tasOauthToken' +-- +-- * 'tasMaxResults' +-- +-- * 'tasFields' +-- +-- * 'tasAlt' +tasklistsList + :: TasklistsList +tasklistsList = + TasklistsList + { _tasQuotaUser = Nothing + , _tasPrettyPrint = True + , _tasUserIp = Nothing + , _tasKey = Nothing + , _tasPageToken = Nothing + , _tasOauthToken = Nothing + , _tasMaxResults = Nothing + , _tasFields = Nothing + , _tasAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tasQuotaUser :: Lens' TasklistsList' (Maybe Text) +tasQuotaUser + = lens _tasQuotaUser (\ s a -> s{_tasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tasPrettyPrint :: Lens' TasklistsList' Bool +tasPrettyPrint + = lens _tasPrettyPrint + (\ s a -> s{_tasPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tasUserIp :: Lens' TasklistsList' (Maybe Text) +tasUserIp + = lens _tasUserIp (\ s a -> s{_tasUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tasKey :: Lens' TasklistsList' (Maybe Text) +tasKey = lens _tasKey (\ s a -> s{_tasKey = a}) + +-- | Token specifying the result page to return. Optional. +tasPageToken :: Lens' TasklistsList' (Maybe Text) +tasPageToken + = lens _tasPageToken (\ s a -> s{_tasPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tasOauthToken :: Lens' TasklistsList' (Maybe Text) +tasOauthToken + = lens _tasOauthToken + (\ s a -> s{_tasOauthToken = a}) + +-- | Maximum number of task lists returned on one page. Optional. The default +-- is 100. +tasMaxResults :: Lens' TasklistsList' (Maybe Int64) +tasMaxResults + = lens _tasMaxResults + (\ s a -> s{_tasMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tasFields :: Lens' TasklistsList' (Maybe Text) +tasFields + = lens _tasFields (\ s a -> s{_tasFields = a}) + +-- | Data format for the response. +tasAlt :: Lens' TasklistsList' Text +tasAlt = lens _tasAlt (\ s a -> s{_tasAlt = a}) + +instance GoogleRequest TasklistsList' where + type Rs TasklistsList' = TaskLists + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsList{..} + = go _tasQuotaUser _tasPrettyPrint _tasUserIp _tasKey + _tasPageToken + _tasOauthToken + _tasMaxResults + _tasFields + _tasAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsListAPI) r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Patch.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Patch.hs new file mode 100644 index 000000000..b3b972b56 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Patch.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the authenticated user\'s specified task list. This method +-- supports patch semantics. +-- +-- /See:/ for @TasksTasklistsPatch@. +module Tasks.Tasklists.Patch + ( + -- * REST Resource + TasklistsPatchAPI + + -- * Creating a Request + , tasklistsPatch + , TasklistsPatch + + -- * Request Lenses + , tppQuotaUser + , tppPrettyPrint + , tppUserIp + , tppKey + , tppTasklist + , tppOauthToken + , tppFields + , tppAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsPatch@ which the +-- 'TasklistsPatch' request conforms to. +type TasklistsPatchAPI = + "users" :> + "@me" :> + "lists" :> + Capture "tasklist" Text :> Patch '[JSON] TaskList + +-- | Updates the authenticated user\'s specified task list. This method +-- supports patch semantics. +-- +-- /See:/ 'tasklistsPatch' smart constructor. +data TasklistsPatch = TasklistsPatch + { _tppQuotaUser :: !(Maybe Text) + , _tppPrettyPrint :: !Bool + , _tppUserIp :: !(Maybe Text) + , _tppKey :: !(Maybe Text) + , _tppTasklist :: !Text + , _tppOauthToken :: !(Maybe Text) + , _tppFields :: !(Maybe Text) + , _tppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tppQuotaUser' +-- +-- * 'tppPrettyPrint' +-- +-- * 'tppUserIp' +-- +-- * 'tppKey' +-- +-- * 'tppTasklist' +-- +-- * 'tppOauthToken' +-- +-- * 'tppFields' +-- +-- * 'tppAlt' +tasklistsPatch + :: Text -- ^ 'tasklist' + -> TasklistsPatch +tasklistsPatch pTppTasklist_ = + TasklistsPatch + { _tppQuotaUser = Nothing + , _tppPrettyPrint = True + , _tppUserIp = Nothing + , _tppKey = Nothing + , _tppTasklist = pTppTasklist_ + , _tppOauthToken = Nothing + , _tppFields = Nothing + , _tppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tppQuotaUser :: Lens' TasklistsPatch' (Maybe Text) +tppQuotaUser + = lens _tppQuotaUser (\ s a -> s{_tppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tppPrettyPrint :: Lens' TasklistsPatch' Bool +tppPrettyPrint + = lens _tppPrettyPrint + (\ s a -> s{_tppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tppUserIp :: Lens' TasklistsPatch' (Maybe Text) +tppUserIp + = lens _tppUserIp (\ s a -> s{_tppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tppKey :: Lens' TasklistsPatch' (Maybe Text) +tppKey = lens _tppKey (\ s a -> s{_tppKey = a}) + +-- | Task list identifier. +tppTasklist :: Lens' TasklistsPatch' Text +tppTasklist + = lens _tppTasklist (\ s a -> s{_tppTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tppOauthToken :: Lens' TasklistsPatch' (Maybe Text) +tppOauthToken + = lens _tppOauthToken + (\ s a -> s{_tppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tppFields :: Lens' TasklistsPatch' (Maybe Text) +tppFields + = lens _tppFields (\ s a -> s{_tppFields = a}) + +-- | Data format for the response. +tppAlt :: Lens' TasklistsPatch' Text +tppAlt = lens _tppAlt (\ s a -> s{_tppAlt = a}) + +instance GoogleRequest TasklistsPatch' where + type Rs TasklistsPatch' = TaskList + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsPatch{..} + = go _tppQuotaUser _tppPrettyPrint _tppUserIp _tppKey + _tppTasklist + _tppOauthToken + _tppFields + _tppAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsPatchAPI) + r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Update.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Update.hs new file mode 100644 index 000000000..f1cb0efae --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasklists/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasklists.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the authenticated user\'s specified task list. +-- +-- /See:/ for @TasksTasklistsUpdate@. +module Tasks.Tasklists.Update + ( + -- * REST Resource + TasklistsUpdateAPI + + -- * Creating a Request + , tasklistsUpdate + , TasklistsUpdate + + -- * Request Lenses + , tuuQuotaUser + , tuuPrettyPrint + , tuuUserIp + , tuuKey + , tuuTasklist + , tuuOauthToken + , tuuFields + , tuuAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasklistsUpdate@ which the +-- 'TasklistsUpdate' request conforms to. +type TasklistsUpdateAPI = + "users" :> + "@me" :> + "lists" :> + Capture "tasklist" Text :> Put '[JSON] TaskList + +-- | Updates the authenticated user\'s specified task list. +-- +-- /See:/ 'tasklistsUpdate' smart constructor. +data TasklistsUpdate = TasklistsUpdate + { _tuuQuotaUser :: !(Maybe Text) + , _tuuPrettyPrint :: !Bool + , _tuuUserIp :: !(Maybe Text) + , _tuuKey :: !(Maybe Text) + , _tuuTasklist :: !Text + , _tuuOauthToken :: !(Maybe Text) + , _tuuFields :: !(Maybe Text) + , _tuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasklistsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuuQuotaUser' +-- +-- * 'tuuPrettyPrint' +-- +-- * 'tuuUserIp' +-- +-- * 'tuuKey' +-- +-- * 'tuuTasklist' +-- +-- * 'tuuOauthToken' +-- +-- * 'tuuFields' +-- +-- * 'tuuAlt' +tasklistsUpdate + :: Text -- ^ 'tasklist' + -> TasklistsUpdate +tasklistsUpdate pTuuTasklist_ = + TasklistsUpdate + { _tuuQuotaUser = Nothing + , _tuuPrettyPrint = True + , _tuuUserIp = Nothing + , _tuuKey = Nothing + , _tuuTasklist = pTuuTasklist_ + , _tuuOauthToken = Nothing + , _tuuFields = Nothing + , _tuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuuQuotaUser :: Lens' TasklistsUpdate' (Maybe Text) +tuuQuotaUser + = lens _tuuQuotaUser (\ s a -> s{_tuuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuuPrettyPrint :: Lens' TasklistsUpdate' Bool +tuuPrettyPrint + = lens _tuuPrettyPrint + (\ s a -> s{_tuuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuuUserIp :: Lens' TasklistsUpdate' (Maybe Text) +tuuUserIp + = lens _tuuUserIp (\ s a -> s{_tuuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuuKey :: Lens' TasklistsUpdate' (Maybe Text) +tuuKey = lens _tuuKey (\ s a -> s{_tuuKey = a}) + +-- | Task list identifier. +tuuTasklist :: Lens' TasklistsUpdate' Text +tuuTasklist + = lens _tuuTasklist (\ s a -> s{_tuuTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tuuOauthToken :: Lens' TasklistsUpdate' (Maybe Text) +tuuOauthToken + = lens _tuuOauthToken + (\ s a -> s{_tuuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tuuFields :: Lens' TasklistsUpdate' (Maybe Text) +tuuFields + = lens _tuuFields (\ s a -> s{_tuuFields = a}) + +-- | Data format for the response. +tuuAlt :: Lens' TasklistsUpdate' Text +tuuAlt = lens _tuuAlt (\ s a -> s{_tuuAlt = a}) + +instance GoogleRequest TasklistsUpdate' where + type Rs TasklistsUpdate' = TaskList + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasklistsUpdate{..} + = go _tuuQuotaUser _tuuPrettyPrint _tuuUserIp _tuuKey + _tuuTasklist + _tuuOauthToken + _tuuFields + _tuuAlt + where go + = clientWithRoute (Proxy :: Proxy TasklistsUpdateAPI) + r + u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Clear.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Clear.hs new file mode 100644 index 000000000..2757522f2 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Clear.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Clear +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Clears all completed tasks from the specified task list. The affected +-- tasks will be marked as \'hidden\' and no longer be returned by default +-- when retrieving all tasks for a task list. +-- +-- /See:/ for @TasksTasksClear@. +module Tasks.Tasks.Clear + ( + -- * REST Resource + TasksClearAPI + + -- * Creating a Request + , tasksClear + , TasksClear + + -- * Request Lenses + , tcQuotaUser + , tcPrettyPrint + , tcUserIp + , tcKey + , tcTasklist + , tcOauthToken + , tcFields + , tcAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksClear@ which the +-- 'TasksClear' request conforms to. +type TasksClearAPI = + "lists" :> + Capture "tasklist" Text :> "clear" :> Post '[JSON] () + +-- | Clears all completed tasks from the specified task list. The affected +-- tasks will be marked as \'hidden\' and no longer be returned by default +-- when retrieving all tasks for a task list. +-- +-- /See:/ 'tasksClear' smart constructor. +data TasksClear = TasksClear + { _tcQuotaUser :: !(Maybe Text) + , _tcPrettyPrint :: !Bool + , _tcUserIp :: !(Maybe Text) + , _tcKey :: !(Maybe Text) + , _tcTasklist :: !Text + , _tcOauthToken :: !(Maybe Text) + , _tcFields :: !(Maybe Text) + , _tcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksClear'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcQuotaUser' +-- +-- * 'tcPrettyPrint' +-- +-- * 'tcUserIp' +-- +-- * 'tcKey' +-- +-- * 'tcTasklist' +-- +-- * 'tcOauthToken' +-- +-- * 'tcFields' +-- +-- * 'tcAlt' +tasksClear + :: Text -- ^ 'tasklist' + -> TasksClear +tasksClear pTcTasklist_ = + TasksClear + { _tcQuotaUser = Nothing + , _tcPrettyPrint = True + , _tcUserIp = Nothing + , _tcKey = Nothing + , _tcTasklist = pTcTasklist_ + , _tcOauthToken = Nothing + , _tcFields = Nothing + , _tcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tcQuotaUser :: Lens' TasksClear' (Maybe Text) +tcQuotaUser + = lens _tcQuotaUser (\ s a -> s{_tcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tcPrettyPrint :: Lens' TasksClear' Bool +tcPrettyPrint + = lens _tcPrettyPrint + (\ s a -> s{_tcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tcUserIp :: Lens' TasksClear' (Maybe Text) +tcUserIp = lens _tcUserIp (\ s a -> s{_tcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tcKey :: Lens' TasksClear' (Maybe Text) +tcKey = lens _tcKey (\ s a -> s{_tcKey = a}) + +-- | Task list identifier. +tcTasklist :: Lens' TasksClear' Text +tcTasklist + = lens _tcTasklist (\ s a -> s{_tcTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tcOauthToken :: Lens' TasksClear' (Maybe Text) +tcOauthToken + = lens _tcOauthToken (\ s a -> s{_tcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tcFields :: Lens' TasksClear' (Maybe Text) +tcFields = lens _tcFields (\ s a -> s{_tcFields = a}) + +-- | Data format for the response. +tcAlt :: Lens' TasksClear' Text +tcAlt = lens _tcAlt (\ s a -> s{_tcAlt = a}) + +instance GoogleRequest TasksClear' where + type Rs TasksClear' = () + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksClear{..} + = go _tcQuotaUser _tcPrettyPrint _tcUserIp _tcKey + _tcTasklist + _tcOauthToken + _tcFields + _tcAlt + where go + = clientWithRoute (Proxy :: Proxy TasksClearAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Delete.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Delete.hs new file mode 100644 index 000000000..781f94973 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Delete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified task from the task list. +-- +-- /See:/ for @TasksTasksDelete@. +module Tasks.Tasks.Delete + ( + -- * REST Resource + TasksDeleteAPI + + -- * Creating a Request + , tasksDelete + , TasksDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdUserIp + , tdKey + , tdTasklist + , tdTask + , tdOauthToken + , tdFields + , tdAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksDelete@ which the +-- 'TasksDelete' request conforms to. +type TasksDeleteAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> Capture "task" Text :> Delete '[JSON] () + +-- | Deletes the specified task from the task list. +-- +-- /See:/ 'tasksDelete' smart constructor. +data TasksDelete = TasksDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdTasklist :: !Text + , _tdTask :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdTasklist' +-- +-- * 'tdTask' +-- +-- * 'tdOauthToken' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +tasksDelete + :: Text -- ^ 'tasklist' + -> Text -- ^ 'task' + -> TasksDelete +tasksDelete pTdTasklist_ pTdTask_ = + TasksDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdTasklist = pTdTasklist_ + , _tdTask = pTdTask_ + , _tdOauthToken = Nothing + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TasksDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TasksDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TasksDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TasksDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | Task list identifier. +tdTasklist :: Lens' TasksDelete' Text +tdTasklist + = lens _tdTasklist (\ s a -> s{_tdTasklist = a}) + +-- | Task identifier. +tdTask :: Lens' TasksDelete' Text +tdTask = lens _tdTask (\ s a -> s{_tdTask = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TasksDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TasksDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TasksDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TasksDelete' where + type Rs TasksDelete' = () + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdUserIp _tdKey + _tdTasklist + _tdTask + _tdOauthToken + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TasksDeleteAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Get.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Get.hs new file mode 100644 index 000000000..9fa8f5007 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified task. +-- +-- /See:/ for @TasksTasksGet@. +module Tasks.Tasks.Get + ( + -- * REST Resource + TasksGetAPI + + -- * Creating a Request + , tasksGet + , TasksGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgTasklist + , tgTask + , tgOauthToken + , tgFields + , tgAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksGet@ which the +-- 'TasksGet' request conforms to. +type TasksGetAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> Capture "task" Text :> Get '[JSON] Task + +-- | Returns the specified task. +-- +-- /See:/ 'tasksGet' smart constructor. +data TasksGet = TasksGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgTasklist :: !Text + , _tgTask :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgTasklist' +-- +-- * 'tgTask' +-- +-- * 'tgOauthToken' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +tasksGet + :: Text -- ^ 'tasklist' + -> Text -- ^ 'task' + -> TasksGet +tasksGet pTgTasklist_ pTgTask_ = + TasksGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgTasklist = pTgTasklist_ + , _tgTask = pTgTask_ + , _tgOauthToken = Nothing + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TasksGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TasksGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TasksGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TasksGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | Task list identifier. +tgTasklist :: Lens' TasksGet' Text +tgTasklist + = lens _tgTasklist (\ s a -> s{_tgTasklist = a}) + +-- | Task identifier. +tgTask :: Lens' TasksGet' Text +tgTask = lens _tgTask (\ s a -> s{_tgTask = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TasksGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TasksGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TasksGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TasksGet' where + type Rs TasksGet' = Task + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgUserIp _tgKey + _tgTasklist + _tgTask + _tgOauthToken + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TasksGetAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Insert.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Insert.hs new file mode 100644 index 000000000..ccea5f12c --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Insert.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new task on the specified task list. +-- +-- /See:/ for @TasksTasksInsert@. +module Tasks.Tasks.Insert + ( + -- * REST Resource + TasksInsertAPI + + -- * Creating a Request + , tasksInsert + , TasksInsert + + -- * Request Lenses + , tiParent + , tiQuotaUser + , tiPrettyPrint + , tiUserIp + , tiKey + , tiTasklist + , tiOauthToken + , tiFields + , tiPrevious + , tiAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksInsert@ which the +-- 'TasksInsert' request conforms to. +type TasksInsertAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> + QueryParam "parent" Text :> + QueryParam "previous" Text :> Post '[JSON] Task + +-- | Creates a new task on the specified task list. +-- +-- /See:/ 'tasksInsert' smart constructor. +data TasksInsert = TasksInsert + { _tiParent :: !(Maybe Text) + , _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiTasklist :: !Text + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiPrevious :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiParent' +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiTasklist' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiPrevious' +-- +-- * 'tiAlt' +tasksInsert + :: Text -- ^ 'tasklist' + -> TasksInsert +tasksInsert pTiTasklist_ = + TasksInsert + { _tiParent = Nothing + , _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiTasklist = pTiTasklist_ + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiPrevious = Nothing + , _tiAlt = "json" + } + +-- | Parent task identifier. If the task is created at the top level, this +-- parameter is omitted. Optional. +tiParent :: Lens' TasksInsert' (Maybe Text) +tiParent = lens _tiParent (\ s a -> s{_tiParent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TasksInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TasksInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TasksInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TasksInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | Task list identifier. +tiTasklist :: Lens' TasksInsert' Text +tiTasklist + = lens _tiTasklist (\ s a -> s{_tiTasklist = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TasksInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TasksInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Previous sibling task identifier. If the task is created at the first +-- position among its siblings, this parameter is omitted. Optional. +tiPrevious :: Lens' TasksInsert' (Maybe Text) +tiPrevious + = lens _tiPrevious (\ s a -> s{_tiPrevious = a}) + +-- | Data format for the response. +tiAlt :: Lens' TasksInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TasksInsert' where + type Rs TasksInsert' = Task + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksInsert{..} + = go _tiParent _tiQuotaUser _tiPrettyPrint _tiUserIp + _tiKey + _tiTasklist + _tiOauthToken + _tiFields + _tiPrevious + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TasksInsertAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/List.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/List.hs new file mode 100644 index 000000000..d8e7cf234 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/List.hs @@ -0,0 +1,284 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns all tasks in the specified task list. +-- +-- /See:/ for @TasksTasksList@. +module Tasks.Tasks.List + ( + -- * REST Resource + TasksListAPI + + -- * Creating a Request + , tasksList + , TasksList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlDueMax + , tlShowDeleted + , tlShowCompleted + , tlDueMin + , tlShowHidden + , tlCompletedMax + , tlKey + , tlUpdatedMin + , tlTasklist + , tlCompletedMin + , tlPageToken + , tlOauthToken + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksList@ which the +-- 'TasksList' request conforms to. +type TasksListAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> + QueryParam "dueMax" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "showCompleted" Bool :> + QueryParam "dueMin" Text :> + QueryParam "showHidden" Bool :> + QueryParam "completedMax" Text :> + QueryParam "updatedMin" Text :> + QueryParam "completedMin" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int64 :> Get '[JSON] Tasks + +-- | Returns all tasks in the specified task list. +-- +-- /See:/ 'tasksList' smart constructor. +data TasksList = TasksList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlDueMax :: !(Maybe Text) + , _tlShowDeleted :: !(Maybe Bool) + , _tlShowCompleted :: !(Maybe Bool) + , _tlDueMin :: !(Maybe Text) + , _tlShowHidden :: !(Maybe Bool) + , _tlCompletedMax :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlUpdatedMin :: !(Maybe Text) + , _tlTasklist :: !Text + , _tlCompletedMin :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Int64) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlDueMax' +-- +-- * 'tlShowDeleted' +-- +-- * 'tlShowCompleted' +-- +-- * 'tlDueMin' +-- +-- * 'tlShowHidden' +-- +-- * 'tlCompletedMax' +-- +-- * 'tlKey' +-- +-- * 'tlUpdatedMin' +-- +-- * 'tlTasklist' +-- +-- * 'tlCompletedMin' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +tasksList + :: Text -- ^ 'tasklist' + -> TasksList +tasksList pTlTasklist_ = + TasksList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlDueMax = Nothing + , _tlShowDeleted = Nothing + , _tlShowCompleted = Nothing + , _tlDueMin = Nothing + , _tlShowHidden = Nothing + , _tlCompletedMax = Nothing + , _tlKey = Nothing + , _tlUpdatedMin = Nothing + , _tlTasklist = pTlTasklist_ + , _tlCompletedMin = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlMaxResults = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TasksList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TasksList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TasksList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | Upper bound for a task\'s due date (as a RFC 3339 timestamp) to filter +-- by. Optional. The default is not to filter by due date. +tlDueMax :: Lens' TasksList' (Maybe Text) +tlDueMax = lens _tlDueMax (\ s a -> s{_tlDueMax = a}) + +-- | Flag indicating whether deleted tasks are returned in the result. +-- Optional. The default is False. +tlShowDeleted :: Lens' TasksList' (Maybe Bool) +tlShowDeleted + = lens _tlShowDeleted + (\ s a -> s{_tlShowDeleted = a}) + +-- | Flag indicating whether completed tasks are returned in the result. +-- Optional. The default is True. +tlShowCompleted :: Lens' TasksList' (Maybe Bool) +tlShowCompleted + = lens _tlShowCompleted + (\ s a -> s{_tlShowCompleted = a}) + +-- | Lower bound for a task\'s due date (as a RFC 3339 timestamp) to filter +-- by. Optional. The default is not to filter by due date. +tlDueMin :: Lens' TasksList' (Maybe Text) +tlDueMin = lens _tlDueMin (\ s a -> s{_tlDueMin = a}) + +-- | Flag indicating whether hidden tasks are returned in the result. +-- Optional. The default is False. +tlShowHidden :: Lens' TasksList' (Maybe Bool) +tlShowHidden + = lens _tlShowHidden (\ s a -> s{_tlShowHidden = a}) + +-- | Upper bound for a task\'s completion date (as a RFC 3339 timestamp) to +-- filter by. Optional. The default is not to filter by completion date. +tlCompletedMax :: Lens' TasksList' (Maybe Text) +tlCompletedMax + = lens _tlCompletedMax + (\ s a -> s{_tlCompletedMax = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TasksList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Lower bound for a task\'s last modification time (as a RFC 3339 +-- timestamp) to filter by. Optional. The default is not to filter by last +-- modification time. +tlUpdatedMin :: Lens' TasksList' (Maybe Text) +tlUpdatedMin + = lens _tlUpdatedMin (\ s a -> s{_tlUpdatedMin = a}) + +-- | Task list identifier. +tlTasklist :: Lens' TasksList' Text +tlTasklist + = lens _tlTasklist (\ s a -> s{_tlTasklist = a}) + +-- | Lower bound for a task\'s completion date (as a RFC 3339 timestamp) to +-- filter by. Optional. The default is not to filter by completion date. +tlCompletedMin :: Lens' TasksList' (Maybe Text) +tlCompletedMin + = lens _tlCompletedMin + (\ s a -> s{_tlCompletedMin = a}) + +-- | Token specifying the result page to return. Optional. +tlPageToken :: Lens' TasksList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TasksList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Maximum number of task lists returned on one page. Optional. The default +-- is 100. +tlMaxResults :: Lens' TasksList' (Maybe Int64) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TasksList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TasksList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TasksList' where + type Rs TasksList' = Tasks + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksList{..} + = go _tlQuotaUser _tlPrettyPrint _tlUserIp _tlDueMax + _tlShowDeleted + _tlShowCompleted + _tlDueMin + _tlShowHidden + _tlCompletedMax + _tlKey + _tlUpdatedMin + _tlTasklist + _tlCompletedMin + _tlPageToken + _tlOauthToken + _tlMaxResults + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TasksListAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Move.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Move.hs new file mode 100644 index 000000000..07b8ad87b --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Move.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Move +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves the specified task to another position in the task list. This can +-- include putting it as a child task under a new parent and\/or move it to +-- a different position among its sibling tasks. +-- +-- /See:/ for @TasksTasksMove@. +module Tasks.Tasks.Move + ( + -- * REST Resource + TasksMoveAPI + + -- * Creating a Request + , tasksMove + , TasksMove + + -- * Request Lenses + , tmParent + , tmQuotaUser + , tmPrettyPrint + , tmUserIp + , tmKey + , tmTasklist + , tmTask + , tmOauthToken + , tmFields + , tmPrevious + , tmAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksMove@ which the +-- 'TasksMove' request conforms to. +type TasksMoveAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> + Capture "task" Text :> + "move" :> + QueryParam "parent" Text :> + QueryParam "previous" Text :> Post '[JSON] Task + +-- | Moves the specified task to another position in the task list. This can +-- include putting it as a child task under a new parent and\/or move it to +-- a different position among its sibling tasks. +-- +-- /See:/ 'tasksMove' smart constructor. +data TasksMove = TasksMove + { _tmParent :: !(Maybe Text) + , _tmQuotaUser :: !(Maybe Text) + , _tmPrettyPrint :: !Bool + , _tmUserIp :: !(Maybe Text) + , _tmKey :: !(Maybe Text) + , _tmTasklist :: !Text + , _tmTask :: !Text + , _tmOauthToken :: !(Maybe Text) + , _tmFields :: !(Maybe Text) + , _tmPrevious :: !(Maybe Text) + , _tmAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksMove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tmParent' +-- +-- * 'tmQuotaUser' +-- +-- * 'tmPrettyPrint' +-- +-- * 'tmUserIp' +-- +-- * 'tmKey' +-- +-- * 'tmTasklist' +-- +-- * 'tmTask' +-- +-- * 'tmOauthToken' +-- +-- * 'tmFields' +-- +-- * 'tmPrevious' +-- +-- * 'tmAlt' +tasksMove + :: Text -- ^ 'tasklist' + -> Text -- ^ 'task' + -> TasksMove +tasksMove pTmTasklist_ pTmTask_ = + TasksMove + { _tmParent = Nothing + , _tmQuotaUser = Nothing + , _tmPrettyPrint = True + , _tmUserIp = Nothing + , _tmKey = Nothing + , _tmTasklist = pTmTasklist_ + , _tmTask = pTmTask_ + , _tmOauthToken = Nothing + , _tmFields = Nothing + , _tmPrevious = Nothing + , _tmAlt = "json" + } + +-- | New parent task identifier. If the task is moved to the top level, this +-- parameter is omitted. Optional. +tmParent :: Lens' TasksMove' (Maybe Text) +tmParent = lens _tmParent (\ s a -> s{_tmParent = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tmQuotaUser :: Lens' TasksMove' (Maybe Text) +tmQuotaUser + = lens _tmQuotaUser (\ s a -> s{_tmQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tmPrettyPrint :: Lens' TasksMove' Bool +tmPrettyPrint + = lens _tmPrettyPrint + (\ s a -> s{_tmPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tmUserIp :: Lens' TasksMove' (Maybe Text) +tmUserIp = lens _tmUserIp (\ s a -> s{_tmUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tmKey :: Lens' TasksMove' (Maybe Text) +tmKey = lens _tmKey (\ s a -> s{_tmKey = a}) + +-- | Task list identifier. +tmTasklist :: Lens' TasksMove' Text +tmTasklist + = lens _tmTasklist (\ s a -> s{_tmTasklist = a}) + +-- | Task identifier. +tmTask :: Lens' TasksMove' Text +tmTask = lens _tmTask (\ s a -> s{_tmTask = a}) + +-- | OAuth 2.0 token for the current user. +tmOauthToken :: Lens' TasksMove' (Maybe Text) +tmOauthToken + = lens _tmOauthToken (\ s a -> s{_tmOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tmFields :: Lens' TasksMove' (Maybe Text) +tmFields = lens _tmFields (\ s a -> s{_tmFields = a}) + +-- | New previous sibling task identifier. If the task is moved to the first +-- position among its siblings, this parameter is omitted. Optional. +tmPrevious :: Lens' TasksMove' (Maybe Text) +tmPrevious + = lens _tmPrevious (\ s a -> s{_tmPrevious = a}) + +-- | Data format for the response. +tmAlt :: Lens' TasksMove' Text +tmAlt = lens _tmAlt (\ s a -> s{_tmAlt = a}) + +instance GoogleRequest TasksMove' where + type Rs TasksMove' = Task + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksMove{..} + = go _tmParent _tmQuotaUser _tmPrettyPrint _tmUserIp + _tmKey + _tmTasklist + _tmTask + _tmOauthToken + _tmFields + _tmPrevious + _tmAlt + where go + = clientWithRoute (Proxy :: Proxy TasksMoveAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Patch.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Patch.hs new file mode 100644 index 000000000..f3f287e6d --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Patch.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified task. This method supports patch semantics. +-- +-- /See:/ for @TasksTasksPatch@. +module Tasks.Tasks.Patch + ( + -- * REST Resource + TasksPatchAPI + + -- * Creating a Request + , tasksPatch + , TasksPatch + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpUserIp + , tpKey + , tpTasklist + , tpTask + , tpOauthToken + , tpFields + , tpAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksPatch@ which the +-- 'TasksPatch' request conforms to. +type TasksPatchAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> Capture "task" Text :> Patch '[JSON] Task + +-- | Updates the specified task. This method supports patch semantics. +-- +-- /See:/ 'tasksPatch' smart constructor. +data TasksPatch = TasksPatch + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpTasklist :: !Text + , _tpTask :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpTasklist' +-- +-- * 'tpTask' +-- +-- * 'tpOauthToken' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +tasksPatch + :: Text -- ^ 'tasklist' + -> Text -- ^ 'task' + -> TasksPatch +tasksPatch pTpTasklist_ pTpTask_ = + TasksPatch + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpTasklist = pTpTasklist_ + , _tpTask = pTpTask_ + , _tpOauthToken = Nothing + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TasksPatch' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TasksPatch' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TasksPatch' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TasksPatch' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | Task list identifier. +tpTasklist :: Lens' TasksPatch' Text +tpTasklist + = lens _tpTasklist (\ s a -> s{_tpTasklist = a}) + +-- | Task identifier. +tpTask :: Lens' TasksPatch' Text +tpTask = lens _tpTask (\ s a -> s{_tpTask = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TasksPatch' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TasksPatch' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TasksPatch' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TasksPatch' where + type Rs TasksPatch' = Task + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksPatch{..} + = go _tpQuotaUser _tpPrettyPrint _tpUserIp _tpKey + _tpTasklist + _tpTask + _tpOauthToken + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TasksPatchAPI) r u diff --git a/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Update.hs b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Update.hs new file mode 100644 index 000000000..98051e514 --- /dev/null +++ b/gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Update.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Tasks.Tasks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified task. +-- +-- /See:/ for @TasksTasksUpdate@. +module Tasks.Tasks.Update + ( + -- * REST Resource + TasksUpdateAPI + + -- * Creating a Request + , tasksUpdate + , TasksUpdate + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuUserIp + , tuKey + , tuTasklist + , tuTask + , tuOauthToken + , tuFields + , tuAlt + ) where + +import Network.Google.AppsTasks.Types +import Network.Google.Prelude + +-- | A resource alias for @TasksTasksUpdate@ which the +-- 'TasksUpdate' request conforms to. +type TasksUpdateAPI = + "lists" :> + Capture "tasklist" Text :> + "tasks" :> Capture "task" Text :> Put '[JSON] Task + +-- | Updates the specified task. +-- +-- /See:/ 'tasksUpdate' smart constructor. +data TasksUpdate = TasksUpdate + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuTasklist :: !Text + , _tuTask :: !Text + , _tuOauthToken :: !(Maybe Text) + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TasksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuTasklist' +-- +-- * 'tuTask' +-- +-- * 'tuOauthToken' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +tasksUpdate + :: Text -- ^ 'tasklist' + -> Text -- ^ 'task' + -> TasksUpdate +tasksUpdate pTuTasklist_ pTuTask_ = + TasksUpdate + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuTasklist = pTuTasklist_ + , _tuTask = pTuTask_ + , _tuOauthToken = Nothing + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TasksUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TasksUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TasksUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TasksUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | Task list identifier. +tuTasklist :: Lens' TasksUpdate' Text +tuTasklist + = lens _tuTasklist (\ s a -> s{_tuTasklist = a}) + +-- | Task identifier. +tuTask :: Lens' TasksUpdate' Text +tuTask = lens _tuTask (\ s a -> s{_tuTask = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TasksUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TasksUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TasksUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TasksUpdate' where + type Rs TasksUpdate' = Task + request = requestWithRoute defReq appsTasksURL + requestWithRoute r u TasksUpdate{..} + = go _tuQuotaUser _tuPrettyPrint _tuUserIp _tuKey + _tuTasklist + _tuTask + _tuOauthToken + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TasksUpdateAPI) r u diff --git a/gogol-apps-tasks/gogol-apps-tasks.cabal b/gogol-apps-tasks/gogol-apps-tasks.cabal new file mode 100644 index 000000000..dd186980c --- /dev/null +++ b/gogol-apps-tasks/gogol-apps-tasks.cabal @@ -0,0 +1,56 @@ +name: gogol-apps-tasks +version: 0.0.1 +synopsis: Tasks API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you manage your tasks and task lists. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.AppsTasks + , Network.Google.AppsTasks.Types + , Network.Google.Resource.Tasks.Tasklists.Delete + , Network.Google.Resource.Tasks.Tasklists.Get + , Network.Google.Resource.Tasks.Tasklists.Insert + , Network.Google.Resource.Tasks.Tasklists.List + , Network.Google.Resource.Tasks.Tasklists.Patch + , Network.Google.Resource.Tasks.Tasklists.Update + , Network.Google.Resource.Tasks.Tasks.Clear + , Network.Google.Resource.Tasks.Tasks.Delete + , Network.Google.Resource.Tasks.Tasks.Get + , Network.Google.Resource.Tasks.Tasks.Insert + , Network.Google.Resource.Tasks.Tasks.List + , Network.Google.Resource.Tasks.Tasks.Move + , Network.Google.Resource.Tasks.Tasks.Patch + , Network.Google.Resource.Tasks.Tasks.Update + + other-modules: + Network.Google.AppsTasks.Types.Product + , Network.Google.AppsTasks.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-apps-tasks/src/.gitkeep b/gogol-apps-tasks/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-bigquery/LICENSE b/gogol-bigquery/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-bigquery/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-bigquery/Makefile b/gogol-bigquery/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-bigquery/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-bigquery/README.md b/gogol-bigquery/README.md new file mode 100644 index 000000000..12571350a --- /dev/null +++ b/gogol-bigquery/README.md @@ -0,0 +1,28 @@ +# gogol-bigquery + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the BigQuery API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-bigquery` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-bigquery/Setup.hs b/gogol-bigquery/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-bigquery/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-bigquery/gen/Network/Google/BigQuery.hs b/gogol-bigquery/gen/Network/Google/BigQuery.hs new file mode 100644 index 000000000..6dba9af5b --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/BigQuery.hs @@ -0,0 +1,496 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.BigQuery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | A data platform for customers to create, manage, share and query data. +-- +-- /See:/ +module Network.Google.BigQuery + ( + -- * API + BigQueryAPI + , bigQueryAPI + , bigQueryURL + + -- * Service Methods + + -- * REST Resources + + -- ** BigqueryDatasetsDelete + , module BigQuery.Datasets.Delete + + -- ** BigqueryDatasetsGet + , module BigQuery.Datasets.Get + + -- ** BigqueryDatasetsInsert + , module BigQuery.Datasets.Insert + + -- ** BigqueryDatasetsList + , module BigQuery.Datasets.List + + -- ** BigqueryDatasetsPatch + , module BigQuery.Datasets.Patch + + -- ** BigqueryDatasetsUpdate + , module BigQuery.Datasets.Update + + -- ** BigqueryJobsCancel + , module BigQuery.Jobs.Cancel + + -- ** BigqueryJobsGet + , module BigQuery.Jobs.Get + + -- ** BigqueryJobsGetQueryResults + , module BigQuery.Jobs.GetQueryResults + + -- ** BigqueryJobsInsert + , module BigQuery.Jobs.Insert + + -- ** BigqueryJobsList + , module BigQuery.Jobs.List + + -- ** BigqueryJobsQuery + , module BigQuery.Jobs.Query + + -- ** BigqueryProjectsList + , module BigQuery.Projects.List + + -- ** BigqueryTabledataInsertAll + , module BigQuery.Tabledata.InsertAll + + -- ** BigqueryTabledataList + , module BigQuery.Tabledata.List + + -- ** BigqueryTablesDelete + , module BigQuery.Tables.Delete + + -- ** BigqueryTablesGet + , module BigQuery.Tables.Get + + -- ** BigqueryTablesInsert + , module BigQuery.Tables.Insert + + -- ** BigqueryTablesList + , module BigQuery.Tables.List + + -- ** BigqueryTablesPatch + , module BigQuery.Tables.Patch + + -- ** BigqueryTablesUpdate + , module BigQuery.Tables.Update + + -- * Types + + -- ** JobReference + , JobReference + , jobReference + , jrJobId + , jrProjectId + + -- ** TableList + , TableList + , tableList + , tlTotalItems + , tlEtag + , tlNextPageToken + , tlKind + , tlTables + + -- ** TableDataList + , TableDataList + , tableDataList + , tdlEtag + , tdlKind + , tdlRows + , tdlPageToken + , tdlTotalRows + + -- ** JobConfigurationTableCopy + , JobConfigurationTableCopy + , jobConfigurationTableCopy + , jctcDestinationTable + , jctcWriteDisposition + , jctcSourceTables + , jctcCreateDisposition + , jctcSourceTable + + -- ** TableSchema + , TableSchema + , tableSchema + , tsFields + + -- ** ProjectList + , ProjectList + , projectList + , plTotalItems + , plEtag + , plNextPageToken + , plKind + , plProjects + + -- ** JobStatistics + , JobStatistics + , jobStatistics + , jsCreationTime + , jsStartTime + , jsLoad + , jsTotalBytesProcessed + , jsEndTime + , jsQuery + , jsExtract + + -- ** Dataset + , Dataset + , dataset + , dCreationTime + , dAccess + , dEtag + , dLocation + , dFriendlyName + , dKind + , dLastModifiedTime + , dDatasetReference + , dSelfLink + , dId + , dDefaultTableExpirationMs + , dDescription + + -- ** TableReference + , TableReference + , tableReference + , trDatasetId + , trProjectId + , trTableId + + -- ** TableFieldSchema + , TableFieldSchema + , tableFieldSchema + , tfsMode + , tfsName + , tfsType + , tfsDescription + , tfsFields + + -- ** ExternalDataConfiguration + , ExternalDataConfiguration + , externalDataConfiguration + , edcIgnoreUnknownValues + , edcCompression + , edcSourceFormat + , edcSchema + , edcMaxBadRecords + , edcSourceUris + , edcCsvOptions + + -- ** GetQueryResultsResponse + , GetQueryResultsResponse + , getQueryResultsResponse + , gqrrJobReference + , gqrrEtag + , gqrrKind + , gqrrSchema + , gqrrTotalBytesProcessed + , gqrrRows + , gqrrPageToken + , gqrrTotalRows + , gqrrErrors + , gqrrJobComplete + , gqrrCacheHit + + -- ** DatasetList + , DatasetList + , datasetList + , dlEtag + , dlNextPageToken + , dlKind + , dlDatasets + + -- ** QueryRequest + , QueryRequest + , queryRequest + , qrUseQueryCache + , qrPreserveNulls + , qrKind + , qrQuery + , qrTimeoutMs + , qrDryRun + , qrMaxResults + , qrDefaultDataset + + -- ** JobStatistics4 + , JobStatistics4 + , jobStatistics4 + , jsDestinationUriFileCounts + + -- ** ProjectReference + , ProjectReference + , projectReference + , prProjectId + + -- ** TableDataInsertAllRequest + , TableDataInsertAllRequest + , tableDataInsertAllRequest + , tdiarKind + , tdiarIgnoreUnknownValues + , tdiarRows + , tdiarSkipInvalidRows + + -- ** JobConfigurationLoad + , JobConfigurationLoad + , jobConfigurationLoad + , jclSkipLeadingRows + , jclProjectionFields + , jclDestinationTable + , jclWriteDisposition + , jclAllowJaggedRows + , jclSchemaInline + , jclIgnoreUnknownValues + , jclCreateDisposition + , jclSchemaInlineFormat + , jclAllowQuotedNewlines + , jclSourceFormat + , jclSchema + , jclQuote + , jclMaxBadRecords + , jclSourceUris + , jclEncoding + , jclFieldDelimiter + + -- ** DatasetReference + , DatasetReference + , datasetReference + , drDatasetId + , drProjectId + + -- ** TableRow + , TableRow + , tableRow + , trF + + -- ** Streamingbuffer + , Streamingbuffer + , streamingbuffer + , sEstimatedBytes + , sOldestEntryTime + , sEstimatedRows + + -- ** Job + , Job + , job + , jobJobReference + , jobStatus + , jobEtag + , jobUserEmail + , jobKind + , jobSelfLink + , jobId + , jobStatistics + , jobConfiguration + + -- ** JobConfigurationLink + , JobConfigurationLink + , jobConfigurationLink + , jDestinationTable + , jWriteDisposition + , jCreateDisposition + , jSourceUri + + -- ** JobConfiguration + , JobConfiguration + , jobConfiguration + , jcCopy + , jcLink + , jcLoad + , jcQuery + , jcExtract + , jcDryRun + + -- ** JobCancelResponse + , JobCancelResponse + , jobCancelResponse + , jcrKind + , jcrJob + + -- ** JobConfigurationExtract + , JobConfigurationExtract + , jobConfigurationExtract + , jceDestinationFormat + , jceSourceTable + , jcePrintHeader + , jceCompression + , jceDestinationUris + , jceDestinationUri + , jceFieldDelimiter + + -- ** JSONObject + , JSONObject + , jSONObject + + -- ** JobConfigurationQuery + , JobConfigurationQuery + , jobConfigurationQuery + , jcqDestinationTable + , jcqWriteDisposition + , jcqPriority + , jcqUseQueryCache + , jcqPreserveNulls + , jcqTableDefinitions + , jcqCreateDisposition + , jcqUserDefinedFunctionResources + , jcqAllowLargeResults + , jcqQuery + , jcqFlattenResults + , jcqDefaultDataset + + -- ** JobList + , JobList + , jobList + , jlEtag + , jlNextPageToken + , jlKind + , jlJobs + + -- ** TableCell + , TableCell + , tableCell + , tcV + + -- ** UserDefinedFunctionResource + , UserDefinedFunctionResource + , userDefinedFunctionResource + , udfrResourceUri + , udfrInlineCode + + -- ** ViewDefinition + , ViewDefinition + , viewDefinition + , vdQuery + + -- ** JobStatistics2 + , JobStatistics2 + , jobStatistics2 + , jTotalBytesProcessed + , jBillingTier + , jCacheHit + , jTotalBytesBilled + + -- ** JobStatus + , JobStatus + , jobStatus + , jsState + , jsErrorResult + , jsErrors + + -- ** TableDataInsertAllResponse + , TableDataInsertAllResponse + , tableDataInsertAllResponse + , tKind + , tInsertErrors + + -- ** Table + , Table + , table + , tabCreationTime + , tabEtag + , tabNumBytes + , tabExternalDataConfiguration + , tabLocation + , tabTableReference + , tabFriendlyName + , tabKind + , tabLastModifiedTime + , tabSchema + , tabStreamingBuffer + , tabSelfLink + , tabNumRows + , tabView + , tabId + , tabType + , tabExpirationTime + , tabDescription + + -- ** ErrorProto + , ErrorProto + , errorProto + , epDebugInfo + , epLocation + , epReason + , epMessage + + -- ** CSVOptions + , CSVOptions + , cSVOptions + , coSkipLeadingRows + , coAllowJaggedRows + , coAllowQuotedNewlines + , coQuote + , coEncoding + , coFieldDelimiter + + -- ** JobStatistics3 + , JobStatistics3 + , jobStatistics3 + , jsInputFiles + , jsOutputRows + , jsOutputBytes + , jsInputFileBytes + + -- ** QueryResponse + , QueryResponse + , queryResponse + , qJobReference + , qKind + , qSchema + , qTotalBytesProcessed + , qRows + , qPageToken + , qTotalRows + , qErrors + , qJobComplete + , qCacheHit + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude +import Network.Google.Resource.BigQuery.Datasets.Delete +import Network.Google.Resource.BigQuery.Datasets.Get +import Network.Google.Resource.BigQuery.Datasets.Insert +import Network.Google.Resource.BigQuery.Datasets.List +import Network.Google.Resource.BigQuery.Datasets.Patch +import Network.Google.Resource.BigQuery.Datasets.Update +import Network.Google.Resource.BigQuery.Jobs.Cancel +import Network.Google.Resource.BigQuery.Jobs.Get +import Network.Google.Resource.BigQuery.Jobs.GetQueryResults +import Network.Google.Resource.BigQuery.Jobs.Insert +import Network.Google.Resource.BigQuery.Jobs.List +import Network.Google.Resource.BigQuery.Jobs.Query +import Network.Google.Resource.BigQuery.Projects.List +import Network.Google.Resource.BigQuery.Tabledata.InsertAll +import Network.Google.Resource.BigQuery.Tabledata.List +import Network.Google.Resource.BigQuery.Tables.Delete +import Network.Google.Resource.BigQuery.Tables.Get +import Network.Google.Resource.BigQuery.Tables.Insert +import Network.Google.Resource.BigQuery.Tables.List +import Network.Google.Resource.BigQuery.Tables.Patch +import Network.Google.Resource.BigQuery.Tables.Update + +{- $resources +TODO +-} + +type BigQueryAPI = + Jobs :<|> Tables :<|> Tabledata :<|> Projects :<|> + Datasets + +bigQueryAPI :: Proxy BigQueryAPI +bigQueryAPI = Proxy diff --git a/gogol-bigquery/gen/Network/Google/BigQuery/Types.hs b/gogol-bigquery/gen/Network/Google/BigQuery/Types.hs new file mode 100644 index 000000000..a02976669 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/BigQuery/Types.hs @@ -0,0 +1,398 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.BigQuery.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.BigQuery.Types + ( + -- * Service URL + bigQueryURL + + -- * JobReference + , JobReference + , jobReference + , jrJobId + , jrProjectId + + -- * TableList + , TableList + , tableList + , tlTotalItems + , tlEtag + , tlNextPageToken + , tlKind + , tlTables + + -- * TableDataList + , TableDataList + , tableDataList + , tdlEtag + , tdlKind + , tdlRows + , tdlPageToken + , tdlTotalRows + + -- * JobConfigurationTableCopy + , JobConfigurationTableCopy + , jobConfigurationTableCopy + , jctcDestinationTable + , jctcWriteDisposition + , jctcSourceTables + , jctcCreateDisposition + , jctcSourceTable + + -- * TableSchema + , TableSchema + , tableSchema + , tsFields + + -- * ProjectList + , ProjectList + , projectList + , plTotalItems + , plEtag + , plNextPageToken + , plKind + , plProjects + + -- * JobStatistics + , JobStatistics + , jobStatistics + , jsCreationTime + , jsStartTime + , jsLoad + , jsTotalBytesProcessed + , jsEndTime + , jsQuery + , jsExtract + + -- * Dataset + , Dataset + , dataset + , dCreationTime + , dAccess + , dEtag + , dLocation + , dFriendlyName + , dKind + , dLastModifiedTime + , dDatasetReference + , dSelfLink + , dId + , dDefaultTableExpirationMs + , dDescription + + -- * TableReference + , TableReference + , tableReference + , trDatasetId + , trProjectId + , trTableId + + -- * TableFieldSchema + , TableFieldSchema + , tableFieldSchema + , tfsMode + , tfsName + , tfsType + , tfsDescription + , tfsFields + + -- * ExternalDataConfiguration + , ExternalDataConfiguration + , externalDataConfiguration + , edcIgnoreUnknownValues + , edcCompression + , edcSourceFormat + , edcSchema + , edcMaxBadRecords + , edcSourceUris + , edcCsvOptions + + -- * GetQueryResultsResponse + , GetQueryResultsResponse + , getQueryResultsResponse + , gqrrJobReference + , gqrrEtag + , gqrrKind + , gqrrSchema + , gqrrTotalBytesProcessed + , gqrrRows + , gqrrPageToken + , gqrrTotalRows + , gqrrErrors + , gqrrJobComplete + , gqrrCacheHit + + -- * DatasetList + , DatasetList + , datasetList + , dlEtag + , dlNextPageToken + , dlKind + , dlDatasets + + -- * QueryRequest + , QueryRequest + , queryRequest + , qrUseQueryCache + , qrPreserveNulls + , qrKind + , qrQuery + , qrTimeoutMs + , qrDryRun + , qrMaxResults + , qrDefaultDataset + + -- * JobStatistics4 + , JobStatistics4 + , jobStatistics4 + , jsDestinationUriFileCounts + + -- * ProjectReference + , ProjectReference + , projectReference + , prProjectId + + -- * TableDataInsertAllRequest + , TableDataInsertAllRequest + , tableDataInsertAllRequest + , tdiarKind + , tdiarIgnoreUnknownValues + , tdiarRows + , tdiarSkipInvalidRows + + -- * JobConfigurationLoad + , JobConfigurationLoad + , jobConfigurationLoad + , jclSkipLeadingRows + , jclProjectionFields + , jclDestinationTable + , jclWriteDisposition + , jclAllowJaggedRows + , jclSchemaInline + , jclIgnoreUnknownValues + , jclCreateDisposition + , jclSchemaInlineFormat + , jclAllowQuotedNewlines + , jclSourceFormat + , jclSchema + , jclQuote + , jclMaxBadRecords + , jclSourceUris + , jclEncoding + , jclFieldDelimiter + + -- * DatasetReference + , DatasetReference + , datasetReference + , drDatasetId + , drProjectId + + -- * TableRow + , TableRow + , tableRow + , trF + + -- * Streamingbuffer + , Streamingbuffer + , streamingbuffer + , sEstimatedBytes + , sOldestEntryTime + , sEstimatedRows + + -- * Job + , Job + , job + , jobJobReference + , jobStatus + , jobEtag + , jobUserEmail + , jobKind + , jobSelfLink + , jobId + , jobStatistics + , jobConfiguration + + -- * JobConfigurationLink + , JobConfigurationLink + , jobConfigurationLink + , jDestinationTable + , jWriteDisposition + , jCreateDisposition + , jSourceUri + + -- * JobConfiguration + , JobConfiguration + , jobConfiguration + , jcCopy + , jcLink + , jcLoad + , jcQuery + , jcExtract + , jcDryRun + + -- * JobCancelResponse + , JobCancelResponse + , jobCancelResponse + , jcrKind + , jcrJob + + -- * JobConfigurationExtract + , JobConfigurationExtract + , jobConfigurationExtract + , jceDestinationFormat + , jceSourceTable + , jcePrintHeader + , jceCompression + , jceDestinationUris + , jceDestinationUri + , jceFieldDelimiter + + -- * JSONObject + , JSONObject + , jSONObject + + -- * JobConfigurationQuery + , JobConfigurationQuery + , jobConfigurationQuery + , jcqDestinationTable + , jcqWriteDisposition + , jcqPriority + , jcqUseQueryCache + , jcqPreserveNulls + , jcqTableDefinitions + , jcqCreateDisposition + , jcqUserDefinedFunctionResources + , jcqAllowLargeResults + , jcqQuery + , jcqFlattenResults + , jcqDefaultDataset + + -- * JobList + , JobList + , jobList + , jlEtag + , jlNextPageToken + , jlKind + , jlJobs + + -- * TableCell + , TableCell + , tableCell + , tcV + + -- * UserDefinedFunctionResource + , UserDefinedFunctionResource + , userDefinedFunctionResource + , udfrResourceUri + , udfrInlineCode + + -- * ViewDefinition + , ViewDefinition + , viewDefinition + , vdQuery + + -- * JobStatistics2 + , JobStatistics2 + , jobStatistics2 + , jTotalBytesProcessed + , jBillingTier + , jCacheHit + , jTotalBytesBilled + + -- * JobStatus + , JobStatus + , jobStatus + , jsState + , jsErrorResult + , jsErrors + + -- * TableDataInsertAllResponse + , TableDataInsertAllResponse + , tableDataInsertAllResponse + , tKind + , tInsertErrors + + -- * Table + , Table + , table + , tabCreationTime + , tabEtag + , tabNumBytes + , tabExternalDataConfiguration + , tabLocation + , tabTableReference + , tabFriendlyName + , tabKind + , tabLastModifiedTime + , tabSchema + , tabStreamingBuffer + , tabSelfLink + , tabNumRows + , tabView + , tabId + , tabType + , tabExpirationTime + , tabDescription + + -- * ErrorProto + , ErrorProto + , errorProto + , epDebugInfo + , epLocation + , epReason + , epMessage + + -- * CSVOptions + , CSVOptions + , cSVOptions + , coSkipLeadingRows + , coAllowJaggedRows + , coAllowQuotedNewlines + , coQuote + , coEncoding + , coFieldDelimiter + + -- * JobStatistics3 + , JobStatistics3 + , jobStatistics3 + , jsInputFiles + , jsOutputRows + , jsOutputBytes + , jsInputFileBytes + + -- * QueryResponse + , QueryResponse + , queryResponse + , qJobReference + , qKind + , qSchema + , qTotalBytesProcessed + , qRows + , qPageToken + , qTotalRows + , qErrors + , qJobComplete + , qCacheHit + ) where + +import Network.Google.BigQuery.Types.Product +import Network.Google.BigQuery.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the BigQuery API. +bigQueryURL :: BaseURL +bigQueryURL + = BaseUrl Https + "https://www.googleapis.com/bigquery/v2/" + 443 diff --git a/gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs b/gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs new file mode 100644 index 000000000..a925e059e --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs @@ -0,0 +1,3643 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.BigQuery.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.BigQuery.Types.Product where + +import Network.Google.BigQuery.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'jobReference' smart constructor. +data JobReference = JobReference + { _jrJobId :: !(Maybe Text) + , _jrProjectId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jrJobId' +-- +-- * 'jrProjectId' +jobReference + :: JobReference +jobReference = + JobReference + { _jrJobId = Nothing + , _jrProjectId = Nothing + } + +-- | [Required] The ID of the job. The ID must contain only letters (a-z, +-- A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length +-- is 1,024 characters. +jrJobId :: Lens' JobReference (Maybe Text) +jrJobId = lens _jrJobId (\ s a -> s{_jrJobId = a}) + +-- | [Required] The ID of the project containing this job. +jrProjectId :: Lens' JobReference (Maybe Text) +jrProjectId + = lens _jrProjectId (\ s a -> s{_jrProjectId = a}) + +instance FromJSON JobReference where + parseJSON + = withObject "JobReference" + (\ o -> + JobReference <$> + (o .:? "jobId") <*> (o .:? "projectId")) + +instance ToJSON JobReference where + toJSON JobReference{..} + = object + (catMaybes + [("jobId" .=) <$> _jrJobId, + ("projectId" .=) <$> _jrProjectId]) + +-- +-- /See:/ 'tableList' smart constructor. +data TableList = TableList + { _tlTotalItems :: !(Maybe Int32) + , _tlEtag :: !(Maybe Text) + , _tlNextPageToken :: !(Maybe Text) + , _tlKind :: !Text + , _tlTables :: !(Maybe [TableListTablesItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlTotalItems' +-- +-- * 'tlEtag' +-- +-- * 'tlNextPageToken' +-- +-- * 'tlKind' +-- +-- * 'tlTables' +tableList + :: TableList +tableList = + TableList + { _tlTotalItems = Nothing + , _tlEtag = Nothing + , _tlNextPageToken = Nothing + , _tlKind = "bigquery#tableList" + , _tlTables = Nothing + } + +-- | The total number of tables in the dataset. +tlTotalItems :: Lens' TableList (Maybe Int32) +tlTotalItems + = lens _tlTotalItems (\ s a -> s{_tlTotalItems = a}) + +-- | A hash of this page of results. +tlEtag :: Lens' TableList (Maybe Text) +tlEtag = lens _tlEtag (\ s a -> s{_tlEtag = a}) + +-- | A token to request the next page of results. +tlNextPageToken :: Lens' TableList (Maybe Text) +tlNextPageToken + = lens _tlNextPageToken + (\ s a -> s{_tlNextPageToken = a}) + +-- | The type of list. +tlKind :: Lens' TableList Text +tlKind = lens _tlKind (\ s a -> s{_tlKind = a}) + +-- | Tables in the requested dataset. +tlTables :: Lens' TableList [TableListTablesItem] +tlTables + = lens _tlTables (\ s a -> s{_tlTables = a}) . + _Default + . _Coerce + +instance FromJSON TableList where + parseJSON + = withObject "TableList" + (\ o -> + TableList <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "bigquery#tableList") + <*> (o .:? "tables" .!= mempty)) + +instance ToJSON TableList where + toJSON TableList{..} + = object + (catMaybes + [("totalItems" .=) <$> _tlTotalItems, + ("etag" .=) <$> _tlEtag, + ("nextPageToken" .=) <$> _tlNextPageToken, + Just ("kind" .= _tlKind), + ("tables" .=) <$> _tlTables]) + +-- +-- /See:/ 'tableDataList' smart constructor. +data TableDataList = TableDataList + { _tdlEtag :: !(Maybe Text) + , _tdlKind :: !Text + , _tdlRows :: !(Maybe [Maybe TableRow]) + , _tdlPageToken :: !(Maybe Text) + , _tdlTotalRows :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableDataList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdlEtag' +-- +-- * 'tdlKind' +-- +-- * 'tdlRows' +-- +-- * 'tdlPageToken' +-- +-- * 'tdlTotalRows' +tableDataList + :: TableDataList +tableDataList = + TableDataList + { _tdlEtag = Nothing + , _tdlKind = "bigquery#tableDataList" + , _tdlRows = Nothing + , _tdlPageToken = Nothing + , _tdlTotalRows = Nothing + } + +-- | A hash of this page of results. +tdlEtag :: Lens' TableDataList (Maybe Text) +tdlEtag = lens _tdlEtag (\ s a -> s{_tdlEtag = a}) + +-- | The resource type of the response. +tdlKind :: Lens' TableDataList Text +tdlKind = lens _tdlKind (\ s a -> s{_tdlKind = a}) + +-- | Rows of results. +tdlRows :: Lens' TableDataList [Maybe TableRow] +tdlRows + = lens _tdlRows (\ s a -> s{_tdlRows = a}) . _Default + . _Coerce + +-- | A token used for paging results. Providing this token instead of the +-- startIndex parameter can help you retrieve stable results when an +-- underlying table is changing. +tdlPageToken :: Lens' TableDataList (Maybe Text) +tdlPageToken + = lens _tdlPageToken (\ s a -> s{_tdlPageToken = a}) + +-- | The total number of rows in the complete table. +tdlTotalRows :: Lens' TableDataList (Maybe Int64) +tdlTotalRows + = lens _tdlTotalRows (\ s a -> s{_tdlTotalRows = a}) + +instance FromJSON TableDataList where + parseJSON + = withObject "TableDataList" + (\ o -> + TableDataList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "bigquery#tableDataList") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "pageToken") + <*> (o .:? "totalRows")) + +instance ToJSON TableDataList where + toJSON TableDataList{..} + = object + (catMaybes + [("etag" .=) <$> _tdlEtag, Just ("kind" .= _tdlKind), + ("rows" .=) <$> _tdlRows, + ("pageToken" .=) <$> _tdlPageToken, + ("totalRows" .=) <$> _tdlTotalRows]) + +-- +-- /See:/ 'jobConfigurationTableCopy' smart constructor. +data JobConfigurationTableCopy = JobConfigurationTableCopy + { _jctcDestinationTable :: !(Maybe (Maybe TableReference)) + , _jctcWriteDisposition :: !(Maybe Text) + , _jctcSourceTables :: !(Maybe [Maybe TableReference]) + , _jctcCreateDisposition :: !(Maybe Text) + , _jctcSourceTable :: !(Maybe (Maybe TableReference)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfigurationTableCopy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jctcDestinationTable' +-- +-- * 'jctcWriteDisposition' +-- +-- * 'jctcSourceTables' +-- +-- * 'jctcCreateDisposition' +-- +-- * 'jctcSourceTable' +jobConfigurationTableCopy + :: JobConfigurationTableCopy +jobConfigurationTableCopy = + JobConfigurationTableCopy + { _jctcDestinationTable = Nothing + , _jctcWriteDisposition = Nothing + , _jctcSourceTables = Nothing + , _jctcCreateDisposition = Nothing + , _jctcSourceTable = Nothing + } + +-- | [Required] The destination table +jctcDestinationTable :: Lens' JobConfigurationTableCopy (Maybe (Maybe TableReference)) +jctcDestinationTable + = lens _jctcDestinationTable + (\ s a -> s{_jctcDestinationTable = a}) + +-- | [Optional] Specifies the action that occurs if the destination table +-- already exists. The following values are supported: WRITE_TRUNCATE: If +-- the table already exists, BigQuery overwrites the table data. +-- WRITE_APPEND: If the table already exists, BigQuery appends the data to +-- the table. WRITE_EMPTY: If the table already exists and contains data, a +-- \'duplicate\' error is returned in the job result. The default value is +-- WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able +-- to complete the job successfully. Creation, truncation and append +-- actions occur as one atomic update upon job completion. +jctcWriteDisposition :: Lens' JobConfigurationTableCopy (Maybe Text) +jctcWriteDisposition + = lens _jctcWriteDisposition + (\ s a -> s{_jctcWriteDisposition = a}) + +-- | [Pick one] Source tables to copy. +jctcSourceTables :: Lens' JobConfigurationTableCopy [Maybe TableReference] +jctcSourceTables + = lens _jctcSourceTables + (\ s a -> s{_jctcSourceTables = a}) + . _Default + . _Coerce + +-- | [Optional] Specifies whether the job is allowed to create new tables. +-- The following values are supported: CREATE_IF_NEEDED: If the table does +-- not exist, BigQuery creates the table. CREATE_NEVER: The table must +-- already exist. If it does not, a \'notFound\' error is returned in the +-- job result. The default value is CREATE_IF_NEEDED. Creation, truncation +-- and append actions occur as one atomic update upon job completion. +jctcCreateDisposition :: Lens' JobConfigurationTableCopy (Maybe Text) +jctcCreateDisposition + = lens _jctcCreateDisposition + (\ s a -> s{_jctcCreateDisposition = a}) + +-- | [Pick one] Source table to copy. +jctcSourceTable :: Lens' JobConfigurationTableCopy (Maybe (Maybe TableReference)) +jctcSourceTable + = lens _jctcSourceTable + (\ s a -> s{_jctcSourceTable = a}) + +instance FromJSON JobConfigurationTableCopy where + parseJSON + = withObject "JobConfigurationTableCopy" + (\ o -> + JobConfigurationTableCopy <$> + (o .:? "destinationTable") <*> + (o .:? "writeDisposition") + <*> (o .:? "sourceTables" .!= mempty) + <*> (o .:? "createDisposition") + <*> (o .:? "sourceTable")) + +instance ToJSON JobConfigurationTableCopy where + toJSON JobConfigurationTableCopy{..} + = object + (catMaybes + [("destinationTable" .=) <$> _jctcDestinationTable, + ("writeDisposition" .=) <$> _jctcWriteDisposition, + ("sourceTables" .=) <$> _jctcSourceTables, + ("createDisposition" .=) <$> _jctcCreateDisposition, + ("sourceTable" .=) <$> _jctcSourceTable]) + +-- +-- /See:/ 'tableSchema' smart constructor. +newtype TableSchema = TableSchema + { _tsFields :: Maybe [Maybe TableFieldSchema] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableSchema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsFields' +tableSchema + :: TableSchema +tableSchema = + TableSchema + { _tsFields = Nothing + } + +-- | Describes the fields in a table. +tsFields :: Lens' TableSchema [Maybe TableFieldSchema] +tsFields + = lens _tsFields (\ s a -> s{_tsFields = a}) . + _Default + . _Coerce + +instance FromJSON TableSchema where + parseJSON + = withObject "TableSchema" + (\ o -> TableSchema <$> (o .:? "fields" .!= mempty)) + +instance ToJSON TableSchema where + toJSON TableSchema{..} + = object (catMaybes [("fields" .=) <$> _tsFields]) + +-- +-- /See:/ 'projectList' smart constructor. +data ProjectList = ProjectList + { _plTotalItems :: !(Maybe Int32) + , _plEtag :: !(Maybe Text) + , _plNextPageToken :: !(Maybe Text) + , _plKind :: !Text + , _plProjects :: !(Maybe [ProjectListProjectsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plTotalItems' +-- +-- * 'plEtag' +-- +-- * 'plNextPageToken' +-- +-- * 'plKind' +-- +-- * 'plProjects' +projectList + :: ProjectList +projectList = + ProjectList + { _plTotalItems = Nothing + , _plEtag = Nothing + , _plNextPageToken = Nothing + , _plKind = "bigquery#projectList" + , _plProjects = Nothing + } + +-- | The total number of projects in the list. +plTotalItems :: Lens' ProjectList (Maybe Int32) +plTotalItems + = lens _plTotalItems (\ s a -> s{_plTotalItems = a}) + +-- | A hash of the page of results +plEtag :: Lens' ProjectList (Maybe Text) +plEtag = lens _plEtag (\ s a -> s{_plEtag = a}) + +-- | A token to request the next page of results. +plNextPageToken :: Lens' ProjectList (Maybe Text) +plNextPageToken + = lens _plNextPageToken + (\ s a -> s{_plNextPageToken = a}) + +-- | The type of list. +plKind :: Lens' ProjectList Text +plKind = lens _plKind (\ s a -> s{_plKind = a}) + +-- | Projects to which you have at least READ access. +plProjects :: Lens' ProjectList [ProjectListProjectsItem] +plProjects + = lens _plProjects (\ s a -> s{_plProjects = a}) . + _Default + . _Coerce + +instance FromJSON ProjectList where + parseJSON + = withObject "ProjectList" + (\ o -> + ProjectList <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "bigquery#projectList") + <*> (o .:? "projects" .!= mempty)) + +instance ToJSON ProjectList where + toJSON ProjectList{..} + = object + (catMaybes + [("totalItems" .=) <$> _plTotalItems, + ("etag" .=) <$> _plEtag, + ("nextPageToken" .=) <$> _plNextPageToken, + Just ("kind" .= _plKind), + ("projects" .=) <$> _plProjects]) + +-- +-- /See:/ 'jobStatistics' smart constructor. +data JobStatistics = JobStatistics + { _jsCreationTime :: !(Maybe Int64) + , _jsStartTime :: !(Maybe Int64) + , _jsLoad :: !(Maybe (Maybe JobStatistics3)) + , _jsTotalBytesProcessed :: !(Maybe Int64) + , _jsEndTime :: !(Maybe Int64) + , _jsQuery :: !(Maybe (Maybe JobStatistics2)) + , _jsExtract :: !(Maybe (Maybe JobStatistics4)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobStatistics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsCreationTime' +-- +-- * 'jsStartTime' +-- +-- * 'jsLoad' +-- +-- * 'jsTotalBytesProcessed' +-- +-- * 'jsEndTime' +-- +-- * 'jsQuery' +-- +-- * 'jsExtract' +jobStatistics + :: JobStatistics +jobStatistics = + JobStatistics + { _jsCreationTime = Nothing + , _jsStartTime = Nothing + , _jsLoad = Nothing + , _jsTotalBytesProcessed = Nothing + , _jsEndTime = Nothing + , _jsQuery = Nothing + , _jsExtract = Nothing + } + +-- | [Output-only] Creation time of this job, in milliseconds since the +-- epoch. This field will be present on all jobs. +jsCreationTime :: Lens' JobStatistics (Maybe Int64) +jsCreationTime + = lens _jsCreationTime + (\ s a -> s{_jsCreationTime = a}) + +-- | [Output-only] Start time of this job, in milliseconds since the epoch. +-- This field will be present when the job transitions from the PENDING +-- state to either RUNNING or DONE. +jsStartTime :: Lens' JobStatistics (Maybe Int64) +jsStartTime + = lens _jsStartTime (\ s a -> s{_jsStartTime = a}) + +-- | [Output-only] Statistics for a load job. +jsLoad :: Lens' JobStatistics (Maybe (Maybe JobStatistics3)) +jsLoad = lens _jsLoad (\ s a -> s{_jsLoad = a}) + +-- | [Output-only] [Deprecated] Use the bytes processed in the query +-- statistics instead. +jsTotalBytesProcessed :: Lens' JobStatistics (Maybe Int64) +jsTotalBytesProcessed + = lens _jsTotalBytesProcessed + (\ s a -> s{_jsTotalBytesProcessed = a}) + +-- | [Output-only] End time of this job, in milliseconds since the epoch. +-- This field will be present whenever a job is in the DONE state. +jsEndTime :: Lens' JobStatistics (Maybe Int64) +jsEndTime + = lens _jsEndTime (\ s a -> s{_jsEndTime = a}) + +-- | [Output-only] Statistics for a query job. +jsQuery :: Lens' JobStatistics (Maybe (Maybe JobStatistics2)) +jsQuery = lens _jsQuery (\ s a -> s{_jsQuery = a}) + +-- | [Output-only] Statistics for an extract job. +jsExtract :: Lens' JobStatistics (Maybe (Maybe JobStatistics4)) +jsExtract + = lens _jsExtract (\ s a -> s{_jsExtract = a}) + +instance FromJSON JobStatistics where + parseJSON + = withObject "JobStatistics" + (\ o -> + JobStatistics <$> + (o .:? "creationTime") <*> (o .:? "startTime") <*> + (o .:? "load") + <*> (o .:? "totalBytesProcessed") + <*> (o .:? "endTime") + <*> (o .:? "query") + <*> (o .:? "extract")) + +instance ToJSON JobStatistics where + toJSON JobStatistics{..} + = object + (catMaybes + [("creationTime" .=) <$> _jsCreationTime, + ("startTime" .=) <$> _jsStartTime, + ("load" .=) <$> _jsLoad, + ("totalBytesProcessed" .=) <$> + _jsTotalBytesProcessed, + ("endTime" .=) <$> _jsEndTime, + ("query" .=) <$> _jsQuery, + ("extract" .=) <$> _jsExtract]) + +-- +-- /See:/ 'dataset' smart constructor. +data Dataset = Dataset + { _dCreationTime :: !(Maybe Int64) + , _dAccess :: !(Maybe [DatasetAccessItem]) + , _dEtag :: !(Maybe Text) + , _dLocation :: !(Maybe Text) + , _dFriendlyName :: !(Maybe Text) + , _dKind :: !Text + , _dLastModifiedTime :: !(Maybe Int64) + , _dDatasetReference :: !(Maybe (Maybe DatasetReference)) + , _dSelfLink :: !(Maybe Text) + , _dId :: !(Maybe Text) + , _dDefaultTableExpirationMs :: !(Maybe Int64) + , _dDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Dataset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dCreationTime' +-- +-- * 'dAccess' +-- +-- * 'dEtag' +-- +-- * 'dLocation' +-- +-- * 'dFriendlyName' +-- +-- * 'dKind' +-- +-- * 'dLastModifiedTime' +-- +-- * 'dDatasetReference' +-- +-- * 'dSelfLink' +-- +-- * 'dId' +-- +-- * 'dDefaultTableExpirationMs' +-- +-- * 'dDescription' +dataset + :: Dataset +dataset = + Dataset + { _dCreationTime = Nothing + , _dAccess = Nothing + , _dEtag = Nothing + , _dLocation = Nothing + , _dFriendlyName = Nothing + , _dKind = "bigquery#dataset" + , _dLastModifiedTime = Nothing + , _dDatasetReference = Nothing + , _dSelfLink = Nothing + , _dId = Nothing + , _dDefaultTableExpirationMs = Nothing + , _dDescription = Nothing + } + +-- | [Output-only] The time when this dataset was created, in milliseconds +-- since the epoch. +dCreationTime :: Lens' Dataset (Maybe Int64) +dCreationTime + = lens _dCreationTime + (\ s a -> s{_dCreationTime = a}) + +-- | [Optional] An array of objects that define dataset access for one or +-- more entities. You can set this property when inserting or updating a +-- dataset in order to control who is allowed to access the data. If +-- unspecified at dataset creation time, BigQuery adds default dataset +-- access for the following entities: access.specialGroup: projectReaders; +-- access.role: READER; access.specialGroup: projectWriters; access.role: +-- WRITER; access.specialGroup: projectOwners; access.role: OWNER; +-- access.userByEmail: [dataset creator email]; access.role: OWNER; +dAccess :: Lens' Dataset [DatasetAccessItem] +dAccess + = lens _dAccess (\ s a -> s{_dAccess = a}) . _Default + . _Coerce + +-- | [Output-only] A hash of the resource. +dEtag :: Lens' Dataset (Maybe Text) +dEtag = lens _dEtag (\ s a -> s{_dEtag = a}) + +-- | [Experimental] The geographic location where the dataset should reside. +-- Possible values include EU and US. The default value is US. +dLocation :: Lens' Dataset (Maybe Text) +dLocation + = lens _dLocation (\ s a -> s{_dLocation = a}) + +-- | [Optional] A descriptive name for the dataset. +dFriendlyName :: Lens' Dataset (Maybe Text) +dFriendlyName + = lens _dFriendlyName + (\ s a -> s{_dFriendlyName = a}) + +-- | [Output-only] The resource type. +dKind :: Lens' Dataset Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | [Output-only] The date when this dataset or any of its tables was last +-- modified, in milliseconds since the epoch. +dLastModifiedTime :: Lens' Dataset (Maybe Int64) +dLastModifiedTime + = lens _dLastModifiedTime + (\ s a -> s{_dLastModifiedTime = a}) + +-- | [Required] A reference that identifies the dataset. +dDatasetReference :: Lens' Dataset (Maybe (Maybe DatasetReference)) +dDatasetReference + = lens _dDatasetReference + (\ s a -> s{_dDatasetReference = a}) + +-- | [Output-only] A URL that can be used to access the resource again. You +-- can use this URL in Get or Update requests to the resource. +dSelfLink :: Lens' Dataset (Maybe Text) +dSelfLink + = lens _dSelfLink (\ s a -> s{_dSelfLink = a}) + +-- | [Output-only] The fully-qualified unique name of the dataset in the +-- format projectId:datasetId. The dataset name without the project name is +-- given in the datasetId field. When creating a new dataset, leave this +-- field blank, and instead specify the datasetId field. +dId :: Lens' Dataset (Maybe Text) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | [Experimental] The default lifetime of all tables in the dataset, in +-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once +-- this property is set, all newly-created tables in the dataset will have +-- an expirationTime property set to the creation time plus the value in +-- this property, and changing the value will only affect new tables, not +-- existing ones. When the expirationTime for a given table is reached, +-- that table will be deleted automatically. If a table\'s expirationTime +-- is modified or removed before the table expires, or if you provide an +-- explicit expirationTime when creating a table, that value takes +-- precedence over the default expiration time indicated by this property. +dDefaultTableExpirationMs :: Lens' Dataset (Maybe Int64) +dDefaultTableExpirationMs + = lens _dDefaultTableExpirationMs + (\ s a -> s{_dDefaultTableExpirationMs = a}) + +-- | [Optional] A user-friendly description of the dataset. +dDescription :: Lens' Dataset (Maybe Text) +dDescription + = lens _dDescription (\ s a -> s{_dDescription = a}) + +instance FromJSON Dataset where + parseJSON + = withObject "Dataset" + (\ o -> + Dataset <$> + (o .:? "creationTime") <*> + (o .:? "access" .!= mempty) + <*> (o .:? "etag") + <*> (o .:? "location") + <*> (o .:? "friendlyName") + <*> (o .:? "kind" .!= "bigquery#dataset") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "datasetReference") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "defaultTableExpirationMs") + <*> (o .:? "description")) + +instance ToJSON Dataset where + toJSON Dataset{..} + = object + (catMaybes + [("creationTime" .=) <$> _dCreationTime, + ("access" .=) <$> _dAccess, ("etag" .=) <$> _dEtag, + ("location" .=) <$> _dLocation, + ("friendlyName" .=) <$> _dFriendlyName, + Just ("kind" .= _dKind), + ("lastModifiedTime" .=) <$> _dLastModifiedTime, + ("datasetReference" .=) <$> _dDatasetReference, + ("selfLink" .=) <$> _dSelfLink, ("id" .=) <$> _dId, + ("defaultTableExpirationMs" .=) <$> + _dDefaultTableExpirationMs, + ("description" .=) <$> _dDescription]) + +-- +-- /See:/ 'tableReference' smart constructor. +data TableReference = TableReference + { _trDatasetId :: !(Maybe Text) + , _trProjectId :: !(Maybe Text) + , _trTableId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trDatasetId' +-- +-- * 'trProjectId' +-- +-- * 'trTableId' +tableReference + :: TableReference +tableReference = + TableReference + { _trDatasetId = Nothing + , _trProjectId = Nothing + , _trTableId = Nothing + } + +-- | [Required] The ID of the dataset containing this table. +trDatasetId :: Lens' TableReference (Maybe Text) +trDatasetId + = lens _trDatasetId (\ s a -> s{_trDatasetId = a}) + +-- | [Required] The ID of the project containing this table. +trProjectId :: Lens' TableReference (Maybe Text) +trProjectId + = lens _trProjectId (\ s a -> s{_trProjectId = a}) + +-- | [Required] The ID of the table. The ID must contain only letters (a-z, +-- A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 +-- characters. +trTableId :: Lens' TableReference (Maybe Text) +trTableId + = lens _trTableId (\ s a -> s{_trTableId = a}) + +instance FromJSON TableReference where + parseJSON + = withObject "TableReference" + (\ o -> + TableReference <$> + (o .:? "datasetId") <*> (o .:? "projectId") <*> + (o .:? "tableId")) + +instance ToJSON TableReference where + toJSON TableReference{..} + = object + (catMaybes + [("datasetId" .=) <$> _trDatasetId, + ("projectId" .=) <$> _trProjectId, + ("tableId" .=) <$> _trTableId]) + +-- +-- /See:/ 'tableFieldSchema' smart constructor. +data TableFieldSchema = TableFieldSchema + { _tfsMode :: !(Maybe Text) + , _tfsName :: !(Maybe Text) + , _tfsType :: !(Maybe Text) + , _tfsDescription :: !(Maybe Text) + , _tfsFields :: !(Maybe [Maybe TableFieldSchema]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableFieldSchema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfsMode' +-- +-- * 'tfsName' +-- +-- * 'tfsType' +-- +-- * 'tfsDescription' +-- +-- * 'tfsFields' +tableFieldSchema + :: TableFieldSchema +tableFieldSchema = + TableFieldSchema + { _tfsMode = Nothing + , _tfsName = Nothing + , _tfsType = Nothing + , _tfsDescription = Nothing + , _tfsFields = Nothing + } + +-- | [Optional] The field mode. Possible values include NULLABLE, REQUIRED +-- and REPEATED. The default value is NULLABLE. +tfsMode :: Lens' TableFieldSchema (Maybe Text) +tfsMode = lens _tfsMode (\ s a -> s{_tfsMode = a}) + +-- | [Required] The field name. The name must contain only letters (a-z, +-- A-Z), numbers (0-9), or underscores (_), and must start with a letter or +-- underscore. The maximum length is 128 characters. +tfsName :: Lens' TableFieldSchema (Maybe Text) +tfsName = lens _tfsName (\ s a -> s{_tfsName = a}) + +-- | [Required] The field data type. Possible values include STRING, INTEGER, +-- FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the +-- field contains a nested schema). +tfsType :: Lens' TableFieldSchema (Maybe Text) +tfsType = lens _tfsType (\ s a -> s{_tfsType = a}) + +-- | [Optional] The field description. The maximum length is 16K characters. +tfsDescription :: Lens' TableFieldSchema (Maybe Text) +tfsDescription + = lens _tfsDescription + (\ s a -> s{_tfsDescription = a}) + +-- | [Optional] Describes the nested schema fields if the type property is +-- set to RECORD. +tfsFields :: Lens' TableFieldSchema [Maybe TableFieldSchema] +tfsFields + = lens _tfsFields (\ s a -> s{_tfsFields = a}) . + _Default + . _Coerce + +instance FromJSON TableFieldSchema where + parseJSON + = withObject "TableFieldSchema" + (\ o -> + TableFieldSchema <$> + (o .:? "mode") <*> (o .:? "name") <*> (o .:? "type") + <*> (o .:? "description") + <*> (o .:? "fields" .!= mempty)) + +instance ToJSON TableFieldSchema where + toJSON TableFieldSchema{..} + = object + (catMaybes + [("mode" .=) <$> _tfsMode, ("name" .=) <$> _tfsName, + ("type" .=) <$> _tfsType, + ("description" .=) <$> _tfsDescription, + ("fields" .=) <$> _tfsFields]) + +-- +-- /See:/ 'externalDataConfiguration' smart constructor. +data ExternalDataConfiguration = ExternalDataConfiguration + { _edcIgnoreUnknownValues :: !(Maybe Bool) + , _edcCompression :: !(Maybe Text) + , _edcSourceFormat :: !(Maybe Text) + , _edcSchema :: !(Maybe (Maybe TableSchema)) + , _edcMaxBadRecords :: !(Maybe Int32) + , _edcSourceUris :: !(Maybe [Text]) + , _edcCsvOptions :: !(Maybe (Maybe CSVOptions)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExternalDataConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edcIgnoreUnknownValues' +-- +-- * 'edcCompression' +-- +-- * 'edcSourceFormat' +-- +-- * 'edcSchema' +-- +-- * 'edcMaxBadRecords' +-- +-- * 'edcSourceUris' +-- +-- * 'edcCsvOptions' +externalDataConfiguration + :: ExternalDataConfiguration +externalDataConfiguration = + ExternalDataConfiguration + { _edcIgnoreUnknownValues = Nothing + , _edcCompression = Nothing + , _edcSourceFormat = Nothing + , _edcSchema = Nothing + , _edcMaxBadRecords = Nothing + , _edcSourceUris = Nothing + , _edcCsvOptions = Nothing + } + +-- | [Optional] Indicates if BigQuery should allow extra values that are not +-- represented in the table schema. If true, the extra values are ignored. +-- If false, records with extra columns are treated as bad records, and if +-- there are too many bad records, an invalid error is returned in the job +-- result. The default value is false. The sourceFormat property determines +-- what BigQuery treats as an extra value: CSV: Trailing columns JSON: +-- Named values that don\'t match any column names +edcIgnoreUnknownValues :: Lens' ExternalDataConfiguration (Maybe Bool) +edcIgnoreUnknownValues + = lens _edcIgnoreUnknownValues + (\ s a -> s{_edcIgnoreUnknownValues = a}) + +-- | [Optional] The compression type of the data source. Possible values +-- include GZIP and NONE. The default value is NONE. +edcCompression :: Lens' ExternalDataConfiguration (Maybe Text) +edcCompression + = lens _edcCompression + (\ s a -> s{_edcCompression = a}) + +-- | [Required] The data format. For CSV files, specify \"CSV\". For +-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". +edcSourceFormat :: Lens' ExternalDataConfiguration (Maybe Text) +edcSourceFormat + = lens _edcSourceFormat + (\ s a -> s{_edcSourceFormat = a}) + +-- | [Required] The schema for the data. +edcSchema :: Lens' ExternalDataConfiguration (Maybe (Maybe TableSchema)) +edcSchema + = lens _edcSchema (\ s a -> s{_edcSchema = a}) + +-- | [Optional] The maximum number of bad records that BigQuery can ignore +-- when reading data. If the number of bad records exceeds this value, an +-- invalid error is returned in the job result. The default value is 0, +-- which requires that all records are valid. +edcMaxBadRecords :: Lens' ExternalDataConfiguration (Maybe Int32) +edcMaxBadRecords + = lens _edcMaxBadRecords + (\ s a -> s{_edcMaxBadRecords = a}) + +-- | [Required] The fully-qualified URIs that point to your data in Google +-- Cloud Storage. Each URI can contain one \'*\' wildcard character and it +-- must come after the \'bucket\' name. Size limits related to load jobs +-- apply to external data sources, plus an additional limit of 10 GB +-- maximum size across all URIs. +edcSourceUris :: Lens' ExternalDataConfiguration [Text] +edcSourceUris + = lens _edcSourceUris + (\ s a -> s{_edcSourceUris = a}) + . _Default + . _Coerce + +-- | Additional properties to set if sourceFormat is set to CSV. +edcCsvOptions :: Lens' ExternalDataConfiguration (Maybe (Maybe CSVOptions)) +edcCsvOptions + = lens _edcCsvOptions + (\ s a -> s{_edcCsvOptions = a}) + +instance FromJSON ExternalDataConfiguration where + parseJSON + = withObject "ExternalDataConfiguration" + (\ o -> + ExternalDataConfiguration <$> + (o .:? "ignoreUnknownValues") <*> + (o .:? "compression") + <*> (o .:? "sourceFormat") + <*> (o .:? "schema") + <*> (o .:? "maxBadRecords") + <*> (o .:? "sourceUris" .!= mempty) + <*> (o .:? "csvOptions")) + +instance ToJSON ExternalDataConfiguration where + toJSON ExternalDataConfiguration{..} + = object + (catMaybes + [("ignoreUnknownValues" .=) <$> + _edcIgnoreUnknownValues, + ("compression" .=) <$> _edcCompression, + ("sourceFormat" .=) <$> _edcSourceFormat, + ("schema" .=) <$> _edcSchema, + ("maxBadRecords" .=) <$> _edcMaxBadRecords, + ("sourceUris" .=) <$> _edcSourceUris, + ("csvOptions" .=) <$> _edcCsvOptions]) + +-- +-- /See:/ 'getQueryResultsResponse' smart constructor. +data GetQueryResultsResponse = GetQueryResultsResponse + { _gqrrJobReference :: !(Maybe (Maybe JobReference)) + , _gqrrEtag :: !(Maybe Text) + , _gqrrKind :: !Text + , _gqrrSchema :: !(Maybe (Maybe TableSchema)) + , _gqrrTotalBytesProcessed :: !(Maybe Int64) + , _gqrrRows :: !(Maybe [Maybe TableRow]) + , _gqrrPageToken :: !(Maybe Text) + , _gqrrTotalRows :: !(Maybe Word64) + , _gqrrErrors :: !(Maybe [Maybe ErrorProto]) + , _gqrrJobComplete :: !(Maybe Bool) + , _gqrrCacheHit :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetQueryResultsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gqrrJobReference' +-- +-- * 'gqrrEtag' +-- +-- * 'gqrrKind' +-- +-- * 'gqrrSchema' +-- +-- * 'gqrrTotalBytesProcessed' +-- +-- * 'gqrrRows' +-- +-- * 'gqrrPageToken' +-- +-- * 'gqrrTotalRows' +-- +-- * 'gqrrErrors' +-- +-- * 'gqrrJobComplete' +-- +-- * 'gqrrCacheHit' +getQueryResultsResponse + :: GetQueryResultsResponse +getQueryResultsResponse = + GetQueryResultsResponse + { _gqrrJobReference = Nothing + , _gqrrEtag = Nothing + , _gqrrKind = "bigquery#getQueryResultsResponse" + , _gqrrSchema = Nothing + , _gqrrTotalBytesProcessed = Nothing + , _gqrrRows = Nothing + , _gqrrPageToken = Nothing + , _gqrrTotalRows = Nothing + , _gqrrErrors = Nothing + , _gqrrJobComplete = Nothing + , _gqrrCacheHit = Nothing + } + +-- | Reference to the BigQuery Job that was created to run the query. This +-- field will be present even if the original request timed out, in which +-- case GetQueryResults can be used to read the results once the query has +-- completed. Since this API only returns the first page of results, +-- subsequent pages can be fetched via the same mechanism +-- (GetQueryResults). +gqrrJobReference :: Lens' GetQueryResultsResponse (Maybe (Maybe JobReference)) +gqrrJobReference + = lens _gqrrJobReference + (\ s a -> s{_gqrrJobReference = a}) + +-- | A hash of this response. +gqrrEtag :: Lens' GetQueryResultsResponse (Maybe Text) +gqrrEtag = lens _gqrrEtag (\ s a -> s{_gqrrEtag = a}) + +-- | The resource type of the response. +gqrrKind :: Lens' GetQueryResultsResponse Text +gqrrKind = lens _gqrrKind (\ s a -> s{_gqrrKind = a}) + +-- | The schema of the results. Present only when the query completes +-- successfully. +gqrrSchema :: Lens' GetQueryResultsResponse (Maybe (Maybe TableSchema)) +gqrrSchema + = lens _gqrrSchema (\ s a -> s{_gqrrSchema = a}) + +-- | The total number of bytes processed for this query. +gqrrTotalBytesProcessed :: Lens' GetQueryResultsResponse (Maybe Int64) +gqrrTotalBytesProcessed + = lens _gqrrTotalBytesProcessed + (\ s a -> s{_gqrrTotalBytesProcessed = a}) + +-- | An object with as many results as can be contained within the maximum +-- permitted reply size. To get any additional rows, you can call +-- GetQueryResults and specify the jobReference returned above. Present +-- only when the query completes successfully. +gqrrRows :: Lens' GetQueryResultsResponse [Maybe TableRow] +gqrrRows + = lens _gqrrRows (\ s a -> s{_gqrrRows = a}) . + _Default + . _Coerce + +-- | A token used for paging results. +gqrrPageToken :: Lens' GetQueryResultsResponse (Maybe Text) +gqrrPageToken + = lens _gqrrPageToken + (\ s a -> s{_gqrrPageToken = a}) + +-- | The total number of rows in the complete query result set, which can be +-- more than the number of rows in this single page of results. Present +-- only when the query completes successfully. +gqrrTotalRows :: Lens' GetQueryResultsResponse (Maybe Word64) +gqrrTotalRows + = lens _gqrrTotalRows + (\ s a -> s{_gqrrTotalRows = a}) + +-- | [Output-only] All errors and warnings encountered during the running of +-- the job. Errors here do not necessarily mean that the job has completed +-- or was unsuccessful. +gqrrErrors :: Lens' GetQueryResultsResponse [Maybe ErrorProto] +gqrrErrors + = lens _gqrrErrors (\ s a -> s{_gqrrErrors = a}) . + _Default + . _Coerce + +-- | Whether the query has completed or not. If rows or totalRows are +-- present, this will always be true. If this is false, totalRows will not +-- be available. +gqrrJobComplete :: Lens' GetQueryResultsResponse (Maybe Bool) +gqrrJobComplete + = lens _gqrrJobComplete + (\ s a -> s{_gqrrJobComplete = a}) + +-- | Whether the query result was fetched from the query cache. +gqrrCacheHit :: Lens' GetQueryResultsResponse (Maybe Bool) +gqrrCacheHit + = lens _gqrrCacheHit (\ s a -> s{_gqrrCacheHit = a}) + +instance FromJSON GetQueryResultsResponse where + parseJSON + = withObject "GetQueryResultsResponse" + (\ o -> + GetQueryResultsResponse <$> + (o .:? "jobReference") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "bigquery#getQueryResultsResponse") + <*> (o .:? "schema") + <*> (o .:? "totalBytesProcessed") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "pageToken") + <*> (o .:? "totalRows") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "jobComplete") + <*> (o .:? "cacheHit")) + +instance ToJSON GetQueryResultsResponse where + toJSON GetQueryResultsResponse{..} + = object + (catMaybes + [("jobReference" .=) <$> _gqrrJobReference, + ("etag" .=) <$> _gqrrEtag, + Just ("kind" .= _gqrrKind), + ("schema" .=) <$> _gqrrSchema, + ("totalBytesProcessed" .=) <$> + _gqrrTotalBytesProcessed, + ("rows" .=) <$> _gqrrRows, + ("pageToken" .=) <$> _gqrrPageToken, + ("totalRows" .=) <$> _gqrrTotalRows, + ("errors" .=) <$> _gqrrErrors, + ("jobComplete" .=) <$> _gqrrJobComplete, + ("cacheHit" .=) <$> _gqrrCacheHit]) + +-- +-- /See:/ 'datasetList' smart constructor. +data DatasetList = DatasetList + { _dlEtag :: !(Maybe Text) + , _dlNextPageToken :: !(Maybe Text) + , _dlKind :: !Text + , _dlDatasets :: !(Maybe [DatasetListDatasetsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlEtag' +-- +-- * 'dlNextPageToken' +-- +-- * 'dlKind' +-- +-- * 'dlDatasets' +datasetList + :: DatasetList +datasetList = + DatasetList + { _dlEtag = Nothing + , _dlNextPageToken = Nothing + , _dlKind = "bigquery#datasetList" + , _dlDatasets = Nothing + } + +-- | A hash value of the results page. You can use this property to determine +-- if the page has changed since the last request. +dlEtag :: Lens' DatasetList (Maybe Text) +dlEtag = lens _dlEtag (\ s a -> s{_dlEtag = a}) + +-- | A token that can be used to request the next results page. This property +-- is omitted on the final results page. +dlNextPageToken :: Lens' DatasetList (Maybe Text) +dlNextPageToken + = lens _dlNextPageToken + (\ s a -> s{_dlNextPageToken = a}) + +-- | The list type. This property always returns the value +-- \"bigquery#datasetList\". +dlKind :: Lens' DatasetList Text +dlKind = lens _dlKind (\ s a -> s{_dlKind = a}) + +-- | An array of the dataset resources in the project. Each resource contains +-- basic information. For full information about a particular dataset +-- resource, use the Datasets: get method. This property is omitted when +-- there are no datasets in the project. +dlDatasets :: Lens' DatasetList [DatasetListDatasetsItem] +dlDatasets + = lens _dlDatasets (\ s a -> s{_dlDatasets = a}) . + _Default + . _Coerce + +instance FromJSON DatasetList where + parseJSON + = withObject "DatasetList" + (\ o -> + DatasetList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "bigquery#datasetList") + <*> (o .:? "datasets" .!= mempty)) + +instance ToJSON DatasetList where + toJSON DatasetList{..} + = object + (catMaybes + [("etag" .=) <$> _dlEtag, + ("nextPageToken" .=) <$> _dlNextPageToken, + Just ("kind" .= _dlKind), + ("datasets" .=) <$> _dlDatasets]) + +-- +-- /See:/ 'queryRequest' smart constructor. +data QueryRequest = QueryRequest + { _qrUseQueryCache :: !Bool + , _qrPreserveNulls :: !(Maybe Bool) + , _qrKind :: !Text + , _qrQuery :: !(Maybe Text) + , _qrTimeoutMs :: !(Maybe Word32) + , _qrDryRun :: !(Maybe Bool) + , _qrMaxResults :: !(Maybe Word32) + , _qrDefaultDataset :: !(Maybe (Maybe DatasetReference)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueryRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrUseQueryCache' +-- +-- * 'qrPreserveNulls' +-- +-- * 'qrKind' +-- +-- * 'qrQuery' +-- +-- * 'qrTimeoutMs' +-- +-- * 'qrDryRun' +-- +-- * 'qrMaxResults' +-- +-- * 'qrDefaultDataset' +queryRequest + :: QueryRequest +queryRequest = + QueryRequest + { _qrUseQueryCache = True + , _qrPreserveNulls = Nothing + , _qrKind = "bigquery#queryRequest" + , _qrQuery = Nothing + , _qrTimeoutMs = Nothing + , _qrDryRun = Nothing + , _qrMaxResults = Nothing + , _qrDefaultDataset = Nothing + } + +-- | [Optional] Whether to look for the result in the query cache. The query +-- cache is a best-effort cache that will be flushed whenever tables in the +-- query are modified. The default value is true. +qrUseQueryCache :: Lens' QueryRequest Bool +qrUseQueryCache + = lens _qrUseQueryCache + (\ s a -> s{_qrUseQueryCache = a}) + +-- | [Deprecated] This property is deprecated. +qrPreserveNulls :: Lens' QueryRequest (Maybe Bool) +qrPreserveNulls + = lens _qrPreserveNulls + (\ s a -> s{_qrPreserveNulls = a}) + +-- | The resource type of the request. +qrKind :: Lens' QueryRequest Text +qrKind = lens _qrKind (\ s a -> s{_qrKind = a}) + +-- | [Required] A query string, following the BigQuery query syntax, of the +-- query to execute. Example: \"SELECT count(f1) FROM +-- [myProjectId:myDatasetId.myTableId]\". +qrQuery :: Lens' QueryRequest (Maybe Text) +qrQuery = lens _qrQuery (\ s a -> s{_qrQuery = a}) + +-- | [Optional] How long to wait for the query to complete, in milliseconds, +-- before the request times out and returns. Note that this is only a +-- timeout for the request, not the query. If the query takes longer to run +-- than the timeout value, the call returns without any results and with +-- the \'jobComplete\' flag set to false. You can call GetQueryResults() to +-- wait for the query to complete and read the results. The default value +-- is 10000 milliseconds (10 seconds). +qrTimeoutMs :: Lens' QueryRequest (Maybe Word32) +qrTimeoutMs + = lens _qrTimeoutMs (\ s a -> s{_qrTimeoutMs = a}) + +-- | [Optional] If set to true, BigQuery doesn\'t run the job. Instead, if +-- the query is valid, BigQuery returns statistics about the job such as +-- how many bytes would be processed. If the query is invalid, an error +-- returns. The default value is false. +qrDryRun :: Lens' QueryRequest (Maybe Bool) +qrDryRun = lens _qrDryRun (\ s a -> s{_qrDryRun = a}) + +-- | [Optional] The maximum number of rows of data to return per page of +-- results. Setting this flag to a small value such as 1000 and then paging +-- through results might improve reliability when the query result set is +-- large. In addition to this limit, responses are also limited to 10 MB. +-- By default, there is no maximum row count, and only the byte limit +-- applies. +qrMaxResults :: Lens' QueryRequest (Maybe Word32) +qrMaxResults + = lens _qrMaxResults (\ s a -> s{_qrMaxResults = a}) + +-- | [Optional] Specifies the default datasetId and projectId to assume for +-- any unqualified table names in the query. If not set, all table names in +-- the query string must be qualified in the format \'datasetId.tableId\'. +qrDefaultDataset :: Lens' QueryRequest (Maybe (Maybe DatasetReference)) +qrDefaultDataset + = lens _qrDefaultDataset + (\ s a -> s{_qrDefaultDataset = a}) + +instance FromJSON QueryRequest where + parseJSON + = withObject "QueryRequest" + (\ o -> + QueryRequest <$> + (o .:? "useQueryCache" .!= True) <*> + (o .:? "preserveNulls") + <*> (o .:? "kind" .!= "bigquery#queryRequest") + <*> (o .:? "query") + <*> (o .:? "timeoutMs") + <*> (o .:? "dryRun") + <*> (o .:? "maxResults") + <*> (o .:? "defaultDataset")) + +instance ToJSON QueryRequest where + toJSON QueryRequest{..} + = object + (catMaybes + [Just ("useQueryCache" .= _qrUseQueryCache), + ("preserveNulls" .=) <$> _qrPreserveNulls, + Just ("kind" .= _qrKind), ("query" .=) <$> _qrQuery, + ("timeoutMs" .=) <$> _qrTimeoutMs, + ("dryRun" .=) <$> _qrDryRun, + ("maxResults" .=) <$> _qrMaxResults, + ("defaultDataset" .=) <$> _qrDefaultDataset]) + +-- +-- /See:/ 'jobStatistics4' smart constructor. +newtype JobStatistics4 = JobStatistics4 + { _jsDestinationUriFileCounts :: Maybe [Int64] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobStatistics4' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsDestinationUriFileCounts' +jobStatistics4 + :: JobStatistics4 +jobStatistics4 = + JobStatistics4 + { _jsDestinationUriFileCounts = Nothing + } + +-- | [Output-only] Number of files per destination URI or URI pattern +-- specified in the extract configuration. These values will be in the same +-- order as the URIs specified in the \'destinationUris\' field. +jsDestinationUriFileCounts :: Lens' JobStatistics4 [Int64] +jsDestinationUriFileCounts + = lens _jsDestinationUriFileCounts + (\ s a -> s{_jsDestinationUriFileCounts = a}) + . _Default + . _Coerce + +instance FromJSON JobStatistics4 where + parseJSON + = withObject "JobStatistics4" + (\ o -> + JobStatistics4 <$> + (o .:? "destinationUriFileCounts" .!= mempty)) + +instance ToJSON JobStatistics4 where + toJSON JobStatistics4{..} + = object + (catMaybes + [("destinationUriFileCounts" .=) <$> + _jsDestinationUriFileCounts]) + +-- +-- /See:/ 'projectReference' smart constructor. +newtype ProjectReference = ProjectReference + { _prProjectId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prProjectId' +projectReference + :: ProjectReference +projectReference = + ProjectReference + { _prProjectId = Nothing + } + +-- | [Required] ID of the project. Can be either the numeric ID or the +-- assigned ID of the project. +prProjectId :: Lens' ProjectReference (Maybe Text) +prProjectId + = lens _prProjectId (\ s a -> s{_prProjectId = a}) + +instance FromJSON ProjectReference where + parseJSON + = withObject "ProjectReference" + (\ o -> ProjectReference <$> (o .:? "projectId")) + +instance ToJSON ProjectReference where + toJSON ProjectReference{..} + = object + (catMaybes [("projectId" .=) <$> _prProjectId]) + +-- +-- /See:/ 'tableDataInsertAllRequest' smart constructor. +data TableDataInsertAllRequest = TableDataInsertAllRequest + { _tdiarKind :: !Text + , _tdiarIgnoreUnknownValues :: !(Maybe Bool) + , _tdiarRows :: !(Maybe [TableDataInsertAllRequestRowsItem]) + , _tdiarSkipInvalidRows :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableDataInsertAllRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdiarKind' +-- +-- * 'tdiarIgnoreUnknownValues' +-- +-- * 'tdiarRows' +-- +-- * 'tdiarSkipInvalidRows' +tableDataInsertAllRequest + :: TableDataInsertAllRequest +tableDataInsertAllRequest = + TableDataInsertAllRequest + { _tdiarKind = "bigquery#tableDataInsertAllRequest" + , _tdiarIgnoreUnknownValues = Nothing + , _tdiarRows = Nothing + , _tdiarSkipInvalidRows = Nothing + } + +-- | The resource type of the response. +tdiarKind :: Lens' TableDataInsertAllRequest Text +tdiarKind + = lens _tdiarKind (\ s a -> s{_tdiarKind = a}) + +-- | [Optional] Accept rows that contain values that do not match the schema. +-- The unknown values are ignored. Default is false, which treats unknown +-- values as errors. +tdiarIgnoreUnknownValues :: Lens' TableDataInsertAllRequest (Maybe Bool) +tdiarIgnoreUnknownValues + = lens _tdiarIgnoreUnknownValues + (\ s a -> s{_tdiarIgnoreUnknownValues = a}) + +-- | The rows to insert. +tdiarRows :: Lens' TableDataInsertAllRequest [TableDataInsertAllRequestRowsItem] +tdiarRows + = lens _tdiarRows (\ s a -> s{_tdiarRows = a}) . + _Default + . _Coerce + +-- | [Optional] Insert all valid rows of a request, even if invalid rows +-- exist. The default value is false, which causes the entire request to +-- fail if any invalid rows exist. +tdiarSkipInvalidRows :: Lens' TableDataInsertAllRequest (Maybe Bool) +tdiarSkipInvalidRows + = lens _tdiarSkipInvalidRows + (\ s a -> s{_tdiarSkipInvalidRows = a}) + +instance FromJSON TableDataInsertAllRequest where + parseJSON + = withObject "TableDataInsertAllRequest" + (\ o -> + TableDataInsertAllRequest <$> + (o .:? "kind" .!= + "bigquery#tableDataInsertAllRequest") + <*> (o .:? "ignoreUnknownValues") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "skipInvalidRows")) + +instance ToJSON TableDataInsertAllRequest where + toJSON TableDataInsertAllRequest{..} + = object + (catMaybes + [Just ("kind" .= _tdiarKind), + ("ignoreUnknownValues" .=) <$> + _tdiarIgnoreUnknownValues, + ("rows" .=) <$> _tdiarRows, + ("skipInvalidRows" .=) <$> _tdiarSkipInvalidRows]) + +-- +-- /See:/ 'jobConfigurationLoad' smart constructor. +data JobConfigurationLoad = JobConfigurationLoad + { _jclSkipLeadingRows :: !(Maybe Int32) + , _jclProjectionFields :: !(Maybe [Text]) + , _jclDestinationTable :: !(Maybe (Maybe TableReference)) + , _jclWriteDisposition :: !(Maybe Text) + , _jclAllowJaggedRows :: !(Maybe Bool) + , _jclSchemaInline :: !(Maybe Text) + , _jclIgnoreUnknownValues :: !(Maybe Bool) + , _jclCreateDisposition :: !(Maybe Text) + , _jclSchemaInlineFormat :: !(Maybe Text) + , _jclAllowQuotedNewlines :: !(Maybe Bool) + , _jclSourceFormat :: !(Maybe Text) + , _jclSchema :: !(Maybe (Maybe TableSchema)) + , _jclQuote :: !Text + , _jclMaxBadRecords :: !(Maybe Int32) + , _jclSourceUris :: !(Maybe [Text]) + , _jclEncoding :: !(Maybe Text) + , _jclFieldDelimiter :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfigurationLoad' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jclSkipLeadingRows' +-- +-- * 'jclProjectionFields' +-- +-- * 'jclDestinationTable' +-- +-- * 'jclWriteDisposition' +-- +-- * 'jclAllowJaggedRows' +-- +-- * 'jclSchemaInline' +-- +-- * 'jclIgnoreUnknownValues' +-- +-- * 'jclCreateDisposition' +-- +-- * 'jclSchemaInlineFormat' +-- +-- * 'jclAllowQuotedNewlines' +-- +-- * 'jclSourceFormat' +-- +-- * 'jclSchema' +-- +-- * 'jclQuote' +-- +-- * 'jclMaxBadRecords' +-- +-- * 'jclSourceUris' +-- +-- * 'jclEncoding' +-- +-- * 'jclFieldDelimiter' +jobConfigurationLoad + :: JobConfigurationLoad +jobConfigurationLoad = + JobConfigurationLoad + { _jclSkipLeadingRows = Nothing + , _jclProjectionFields = Nothing + , _jclDestinationTable = Nothing + , _jclWriteDisposition = Nothing + , _jclAllowJaggedRows = Nothing + , _jclSchemaInline = Nothing + , _jclIgnoreUnknownValues = Nothing + , _jclCreateDisposition = Nothing + , _jclSchemaInlineFormat = Nothing + , _jclAllowQuotedNewlines = Nothing + , _jclSourceFormat = Nothing + , _jclSchema = Nothing + , _jclQuote = "\"" + , _jclMaxBadRecords = Nothing + , _jclSourceUris = Nothing + , _jclEncoding = Nothing + , _jclFieldDelimiter = Nothing + } + +-- | [Optional] The number of rows at the top of a CSV file that BigQuery +-- will skip when loading the data. The default value is 0. This property +-- is useful if you have header rows in the file that should be skipped. +jclSkipLeadingRows :: Lens' JobConfigurationLoad (Maybe Int32) +jclSkipLeadingRows + = lens _jclSkipLeadingRows + (\ s a -> s{_jclSkipLeadingRows = a}) + +-- | [Experimental] If sourceFormat is set to \"DATASTORE_BACKUP\", indicates +-- which entity properties to load into BigQuery from a Cloud Datastore +-- backup. Property names are case sensitive and must be top-level +-- properties. If no properties are specified, BigQuery loads all +-- properties. If any named property isn\'t found in the Cloud Datastore +-- backup, an invalid error is returned in the job result. +jclProjectionFields :: Lens' JobConfigurationLoad [Text] +jclProjectionFields + = lens _jclProjectionFields + (\ s a -> s{_jclProjectionFields = a}) + . _Default + . _Coerce + +-- | [Required] The destination table to load the data into. +jclDestinationTable :: Lens' JobConfigurationLoad (Maybe (Maybe TableReference)) +jclDestinationTable + = lens _jclDestinationTable + (\ s a -> s{_jclDestinationTable = a}) + +-- | [Optional] Specifies the action that occurs if the destination table +-- already exists. The following values are supported: WRITE_TRUNCATE: If +-- the table already exists, BigQuery overwrites the table data. +-- WRITE_APPEND: If the table already exists, BigQuery appends the data to +-- the table. WRITE_EMPTY: If the table already exists and contains data, a +-- \'duplicate\' error is returned in the job result. The default value is +-- WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able +-- to complete the job successfully. Creation, truncation and append +-- actions occur as one atomic update upon job completion. +jclWriteDisposition :: Lens' JobConfigurationLoad (Maybe Text) +jclWriteDisposition + = lens _jclWriteDisposition + (\ s a -> s{_jclWriteDisposition = a}) + +-- | [Optional] Accept rows that are missing trailing optional columns. The +-- missing values are treated as nulls. If false, records with missing +-- trailing columns are treated as bad records, and if there are too many +-- bad records, an invalid error is returned in the job result. The default +-- value is false. Only applicable to CSV, ignored for other formats. +jclAllowJaggedRows :: Lens' JobConfigurationLoad (Maybe Bool) +jclAllowJaggedRows + = lens _jclAllowJaggedRows + (\ s a -> s{_jclAllowJaggedRows = a}) + +-- | [Deprecated] The inline schema. For CSV schemas, specify as +-- \"Field1:Type1[,Field2:Type2]*\". For example, \"foo:STRING, +-- bar:INTEGER, baz:FLOAT\". +jclSchemaInline :: Lens' JobConfigurationLoad (Maybe Text) +jclSchemaInline + = lens _jclSchemaInline + (\ s a -> s{_jclSchemaInline = a}) + +-- | [Optional] Indicates if BigQuery should allow extra values that are not +-- represented in the table schema. If true, the extra values are ignored. +-- If false, records with extra columns are treated as bad records, and if +-- there are too many bad records, an invalid error is returned in the job +-- result. The default value is false. The sourceFormat property determines +-- what BigQuery treats as an extra value: CSV: Trailing columns JSON: +-- Named values that don\'t match any column names +jclIgnoreUnknownValues :: Lens' JobConfigurationLoad (Maybe Bool) +jclIgnoreUnknownValues + = lens _jclIgnoreUnknownValues + (\ s a -> s{_jclIgnoreUnknownValues = a}) + +-- | [Optional] Specifies whether the job is allowed to create new tables. +-- The following values are supported: CREATE_IF_NEEDED: If the table does +-- not exist, BigQuery creates the table. CREATE_NEVER: The table must +-- already exist. If it does not, a \'notFound\' error is returned in the +-- job result. The default value is CREATE_IF_NEEDED. Creation, truncation +-- and append actions occur as one atomic update upon job completion. +jclCreateDisposition :: Lens' JobConfigurationLoad (Maybe Text) +jclCreateDisposition + = lens _jclCreateDisposition + (\ s a -> s{_jclCreateDisposition = a}) + +-- | [Deprecated] The format of the schemaInline property. +jclSchemaInlineFormat :: Lens' JobConfigurationLoad (Maybe Text) +jclSchemaInlineFormat + = lens _jclSchemaInlineFormat + (\ s a -> s{_jclSchemaInlineFormat = a}) + +-- | Indicates if BigQuery should allow quoted data sections that contain +-- newline characters in a CSV file. The default value is false. +jclAllowQuotedNewlines :: Lens' JobConfigurationLoad (Maybe Bool) +jclAllowQuotedNewlines + = lens _jclAllowQuotedNewlines + (\ s a -> s{_jclAllowQuotedNewlines = a}) + +-- | [Optional] The format of the data files. For CSV files, specify \"CSV\". +-- For datastore backups, specify \"DATASTORE_BACKUP\". For +-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". The default +-- value is CSV. +jclSourceFormat :: Lens' JobConfigurationLoad (Maybe Text) +jclSourceFormat + = lens _jclSourceFormat + (\ s a -> s{_jclSourceFormat = a}) + +-- | [Optional] The schema for the destination table. The schema can be +-- omitted if the destination table already exists or if the schema can be +-- inferred from the loaded data. +jclSchema :: Lens' JobConfigurationLoad (Maybe (Maybe TableSchema)) +jclSchema + = lens _jclSchema (\ s a -> s{_jclSchema = a}) + +-- | [Optional] The value that is used to quote data sections in a CSV file. +-- BigQuery converts the string to ISO-8859-1 encoding, and then uses the +-- first byte of the encoded string to split the data in its raw, binary +-- state. The default value is a double-quote (\'\"\'). If your data does +-- not contain quoted sections, set the property value to an empty string. +-- If your data contains quoted newline characters, you must also set the +-- allowQuotedNewlines property to true. +jclQuote :: Lens' JobConfigurationLoad Text +jclQuote = lens _jclQuote (\ s a -> s{_jclQuote = a}) + +-- | [Optional] The maximum number of bad records that BigQuery can ignore +-- when running the job. If the number of bad records exceeds this value, +-- an invalid error is returned in the job result. The default value is 0, +-- which requires that all records are valid. +jclMaxBadRecords :: Lens' JobConfigurationLoad (Maybe Int32) +jclMaxBadRecords + = lens _jclMaxBadRecords + (\ s a -> s{_jclMaxBadRecords = a}) + +-- | [Required] The fully-qualified URIs that point to your data in Google +-- Cloud Storage. Each URI can contain one \'*\' wildcard character and it +-- must come after the \'bucket\' name. +jclSourceUris :: Lens' JobConfigurationLoad [Text] +jclSourceUris + = lens _jclSourceUris + (\ s a -> s{_jclSourceUris = a}) + . _Default + . _Coerce + +-- | [Optional] The character encoding of the data. The supported values are +-- UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the +-- data after the raw, binary data has been split using the values of the +-- quote and fieldDelimiter properties. +jclEncoding :: Lens' JobConfigurationLoad (Maybe Text) +jclEncoding + = lens _jclEncoding (\ s a -> s{_jclEncoding = a}) + +-- | [Optional] The separator for fields in a CSV file. BigQuery converts the +-- string to ISO-8859-1 encoding, and then uses the first byte of the +-- encoded string to split the data in its raw, binary state. BigQuery also +-- supports the escape sequence \"\\t\" to specify a tab separator. The +-- default value is a comma (\',\'). +jclFieldDelimiter :: Lens' JobConfigurationLoad (Maybe Text) +jclFieldDelimiter + = lens _jclFieldDelimiter + (\ s a -> s{_jclFieldDelimiter = a}) + +instance FromJSON JobConfigurationLoad where + parseJSON + = withObject "JobConfigurationLoad" + (\ o -> + JobConfigurationLoad <$> + (o .:? "skipLeadingRows") <*> + (o .:? "projectionFields" .!= mempty) + <*> (o .:? "destinationTable") + <*> (o .:? "writeDisposition") + <*> (o .:? "allowJaggedRows") + <*> (o .:? "schemaInline") + <*> (o .:? "ignoreUnknownValues") + <*> (o .:? "createDisposition") + <*> (o .:? "schemaInlineFormat") + <*> (o .:? "allowQuotedNewlines") + <*> (o .:? "sourceFormat") + <*> (o .:? "schema") + <*> (o .:? "quote" .!= "\"") + <*> (o .:? "maxBadRecords") + <*> (o .:? "sourceUris" .!= mempty) + <*> (o .:? "encoding") + <*> (o .:? "fieldDelimiter")) + +instance ToJSON JobConfigurationLoad where + toJSON JobConfigurationLoad{..} + = object + (catMaybes + [("skipLeadingRows" .=) <$> _jclSkipLeadingRows, + ("projectionFields" .=) <$> _jclProjectionFields, + ("destinationTable" .=) <$> _jclDestinationTable, + ("writeDisposition" .=) <$> _jclWriteDisposition, + ("allowJaggedRows" .=) <$> _jclAllowJaggedRows, + ("schemaInline" .=) <$> _jclSchemaInline, + ("ignoreUnknownValues" .=) <$> + _jclIgnoreUnknownValues, + ("createDisposition" .=) <$> _jclCreateDisposition, + ("schemaInlineFormat" .=) <$> _jclSchemaInlineFormat, + ("allowQuotedNewlines" .=) <$> + _jclAllowQuotedNewlines, + ("sourceFormat" .=) <$> _jclSourceFormat, + ("schema" .=) <$> _jclSchema, + Just ("quote" .= _jclQuote), + ("maxBadRecords" .=) <$> _jclMaxBadRecords, + ("sourceUris" .=) <$> _jclSourceUris, + ("encoding" .=) <$> _jclEncoding, + ("fieldDelimiter" .=) <$> _jclFieldDelimiter]) + +-- +-- /See:/ 'datasetReference' smart constructor. +data DatasetReference = DatasetReference + { _drDatasetId :: !(Maybe Text) + , _drProjectId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drDatasetId' +-- +-- * 'drProjectId' +datasetReference + :: DatasetReference +datasetReference = + DatasetReference + { _drDatasetId = Nothing + , _drProjectId = Nothing + } + +-- | [Required] A unique ID for this dataset, without the project name. The +-- ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores +-- (_). The maximum length is 1,024 characters. +drDatasetId :: Lens' DatasetReference (Maybe Text) +drDatasetId + = lens _drDatasetId (\ s a -> s{_drDatasetId = a}) + +-- | [Optional] The ID of the project containing this dataset. +drProjectId :: Lens' DatasetReference (Maybe Text) +drProjectId + = lens _drProjectId (\ s a -> s{_drProjectId = a}) + +instance FromJSON DatasetReference where + parseJSON + = withObject "DatasetReference" + (\ o -> + DatasetReference <$> + (o .:? "datasetId") <*> (o .:? "projectId")) + +instance ToJSON DatasetReference where + toJSON DatasetReference{..} + = object + (catMaybes + [("datasetId" .=) <$> _drDatasetId, + ("projectId" .=) <$> _drProjectId]) + +-- +-- /See:/ 'tableRow' smart constructor. +newtype TableRow = TableRow + { _trF :: Maybe [Maybe TableCell] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableRow' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trF' +tableRow + :: TableRow +tableRow = + TableRow + { _trF = Nothing + } + +-- | Represents a single row in the result set, consisting of one or more +-- fields. +trF :: Lens' TableRow [Maybe TableCell] +trF + = lens _trF (\ s a -> s{_trF = a}) . _Default . + _Coerce + +instance FromJSON TableRow where + parseJSON + = withObject "TableRow" + (\ o -> TableRow <$> (o .:? "f" .!= mempty)) + +instance ToJSON TableRow where + toJSON TableRow{..} + = object (catMaybes [("f" .=) <$> _trF]) + +-- +-- /See:/ 'streamingbuffer' smart constructor. +data Streamingbuffer = Streamingbuffer + { _sEstimatedBytes :: !(Maybe Word64) + , _sOldestEntryTime :: !(Maybe Word64) + , _sEstimatedRows :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Streamingbuffer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sEstimatedBytes' +-- +-- * 'sOldestEntryTime' +-- +-- * 'sEstimatedRows' +streamingbuffer + :: Streamingbuffer +streamingbuffer = + Streamingbuffer + { _sEstimatedBytes = Nothing + , _sOldestEntryTime = Nothing + , _sEstimatedRows = Nothing + } + +-- | [Output-only] A lower-bound estimate of the number of bytes currently in +-- the streaming buffer. +sEstimatedBytes :: Lens' Streamingbuffer (Maybe Word64) +sEstimatedBytes + = lens _sEstimatedBytes + (\ s a -> s{_sEstimatedBytes = a}) + +-- | [Output-only] Contains the timestamp of the oldest entry in the +-- streaming buffer, in milliseconds since the epoch, if the streaming +-- buffer is available. +sOldestEntryTime :: Lens' Streamingbuffer (Maybe Word64) +sOldestEntryTime + = lens _sOldestEntryTime + (\ s a -> s{_sOldestEntryTime = a}) + +-- | [Output-only] A lower-bound estimate of the number of rows currently in +-- the streaming buffer. +sEstimatedRows :: Lens' Streamingbuffer (Maybe Word64) +sEstimatedRows + = lens _sEstimatedRows + (\ s a -> s{_sEstimatedRows = a}) + +instance FromJSON Streamingbuffer where + parseJSON + = withObject "Streamingbuffer" + (\ o -> + Streamingbuffer <$> + (o .:? "estimatedBytes") <*> + (o .:? "oldestEntryTime") + <*> (o .:? "estimatedRows")) + +instance ToJSON Streamingbuffer where + toJSON Streamingbuffer{..} + = object + (catMaybes + [("estimatedBytes" .=) <$> _sEstimatedBytes, + ("oldestEntryTime" .=) <$> _sOldestEntryTime, + ("estimatedRows" .=) <$> _sEstimatedRows]) + +-- +-- /See:/ 'job' smart constructor. +data Job = Job + { _jobJobReference :: !(Maybe (Maybe JobReference)) + , _jobStatus :: !(Maybe (Maybe JobStatus)) + , _jobEtag :: !(Maybe Text) + , _jobUserEmail :: !(Maybe Text) + , _jobKind :: !Text + , _jobSelfLink :: !(Maybe Text) + , _jobId :: !(Maybe Text) + , _jobStatistics :: !(Maybe (Maybe JobStatistics)) + , _jobConfiguration :: !(Maybe (Maybe JobConfiguration)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Job' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jobJobReference' +-- +-- * 'jobStatus' +-- +-- * 'jobEtag' +-- +-- * 'jobUserEmail' +-- +-- * 'jobKind' +-- +-- * 'jobSelfLink' +-- +-- * 'jobId' +-- +-- * 'jobStatistics' +-- +-- * 'jobConfiguration' +job + :: Job +job = + Job + { _jobJobReference = Nothing + , _jobStatus = Nothing + , _jobEtag = Nothing + , _jobUserEmail = Nothing + , _jobKind = "bigquery#job" + , _jobSelfLink = Nothing + , _jobId = Nothing + , _jobStatistics = Nothing + , _jobConfiguration = Nothing + } + +-- | [Optional] Reference describing the unique-per-user name of the job. +jobJobReference :: Lens' Job (Maybe (Maybe JobReference)) +jobJobReference + = lens _jobJobReference + (\ s a -> s{_jobJobReference = a}) + +-- | [Output-only] The status of this job. Examine this value when polling an +-- asynchronous job to see if the job is complete. +jobStatus :: Lens' Job (Maybe (Maybe JobStatus)) +jobStatus + = lens _jobStatus (\ s a -> s{_jobStatus = a}) + +-- | [Output-only] A hash of this resource. +jobEtag :: Lens' Job (Maybe Text) +jobEtag = lens _jobEtag (\ s a -> s{_jobEtag = a}) + +-- | [Output-only] Email address of the user who ran the job. +jobUserEmail :: Lens' Job (Maybe Text) +jobUserEmail + = lens _jobUserEmail (\ s a -> s{_jobUserEmail = a}) + +-- | [Output-only] The type of the resource. +jobKind :: Lens' Job Text +jobKind = lens _jobKind (\ s a -> s{_jobKind = a}) + +-- | [Output-only] A URL that can be used to access this resource again. +jobSelfLink :: Lens' Job (Maybe Text) +jobSelfLink + = lens _jobSelfLink (\ s a -> s{_jobSelfLink = a}) + +-- | [Output-only] Opaque ID field of the job +jobId :: Lens' Job (Maybe Text) +jobId = lens _jobId (\ s a -> s{_jobId = a}) + +-- | [Output-only] Information about the job, including starting time and +-- ending time of the job. +jobStatistics :: Lens' Job (Maybe (Maybe JobStatistics)) +jobStatistics + = lens _jobStatistics + (\ s a -> s{_jobStatistics = a}) + +-- | [Required] Describes the job configuration. +jobConfiguration :: Lens' Job (Maybe (Maybe JobConfiguration)) +jobConfiguration + = lens _jobConfiguration + (\ s a -> s{_jobConfiguration = a}) + +instance FromJSON Job where + parseJSON + = withObject "Job" + (\ o -> + Job <$> + (o .:? "jobReference") <*> (o .:? "status") <*> + (o .:? "etag") + <*> (o .:? "user_email") + <*> (o .:? "kind" .!= "bigquery#job") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "statistics") + <*> (o .:? "configuration")) + +instance ToJSON Job where + toJSON Job{..} + = object + (catMaybes + [("jobReference" .=) <$> _jobJobReference, + ("status" .=) <$> _jobStatus, + ("etag" .=) <$> _jobEtag, + ("user_email" .=) <$> _jobUserEmail, + Just ("kind" .= _jobKind), + ("selfLink" .=) <$> _jobSelfLink, + ("id" .=) <$> _jobId, + ("statistics" .=) <$> _jobStatistics, + ("configuration" .=) <$> _jobConfiguration]) + +-- +-- /See:/ 'jobConfigurationLink' smart constructor. +data JobConfigurationLink = JobConfigurationLink + { _jDestinationTable :: !(Maybe (Maybe TableReference)) + , _jWriteDisposition :: !(Maybe Text) + , _jCreateDisposition :: !(Maybe Text) + , _jSourceUri :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfigurationLink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jDestinationTable' +-- +-- * 'jWriteDisposition' +-- +-- * 'jCreateDisposition' +-- +-- * 'jSourceUri' +jobConfigurationLink + :: JobConfigurationLink +jobConfigurationLink = + JobConfigurationLink + { _jDestinationTable = Nothing + , _jWriteDisposition = Nothing + , _jCreateDisposition = Nothing + , _jSourceUri = Nothing + } + +-- | [Required] The destination table of the link job. +jDestinationTable :: Lens' JobConfigurationLink (Maybe (Maybe TableReference)) +jDestinationTable + = lens _jDestinationTable + (\ s a -> s{_jDestinationTable = a}) + +-- | [Optional] Specifies the action that occurs if the destination table +-- already exists. The following values are supported: WRITE_TRUNCATE: If +-- the table already exists, BigQuery overwrites the table data. +-- WRITE_APPEND: If the table already exists, BigQuery appends the data to +-- the table. WRITE_EMPTY: If the table already exists and contains data, a +-- \'duplicate\' error is returned in the job result. The default value is +-- WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able +-- to complete the job successfully. Creation, truncation and append +-- actions occur as one atomic update upon job completion. +jWriteDisposition :: Lens' JobConfigurationLink (Maybe Text) +jWriteDisposition + = lens _jWriteDisposition + (\ s a -> s{_jWriteDisposition = a}) + +-- | [Optional] Specifies whether the job is allowed to create new tables. +-- The following values are supported: CREATE_IF_NEEDED: If the table does +-- not exist, BigQuery creates the table. CREATE_NEVER: The table must +-- already exist. If it does not, a \'notFound\' error is returned in the +-- job result. The default value is CREATE_IF_NEEDED. Creation, truncation +-- and append actions occur as one atomic update upon job completion. +jCreateDisposition :: Lens' JobConfigurationLink (Maybe Text) +jCreateDisposition + = lens _jCreateDisposition + (\ s a -> s{_jCreateDisposition = a}) + +-- | [Required] URI of source table to link. +jSourceUri :: Lens' JobConfigurationLink [Text] +jSourceUri + = lens _jSourceUri (\ s a -> s{_jSourceUri = a}) . + _Default + . _Coerce + +instance FromJSON JobConfigurationLink where + parseJSON + = withObject "JobConfigurationLink" + (\ o -> + JobConfigurationLink <$> + (o .:? "destinationTable") <*> + (o .:? "writeDisposition") + <*> (o .:? "createDisposition") + <*> (o .:? "sourceUri" .!= mempty)) + +instance ToJSON JobConfigurationLink where + toJSON JobConfigurationLink{..} + = object + (catMaybes + [("destinationTable" .=) <$> _jDestinationTable, + ("writeDisposition" .=) <$> _jWriteDisposition, + ("createDisposition" .=) <$> _jCreateDisposition, + ("sourceUri" .=) <$> _jSourceUri]) + +-- +-- /See:/ 'jobConfiguration' smart constructor. +data JobConfiguration = JobConfiguration + { _jcCopy :: !(Maybe (Maybe JobConfigurationTableCopy)) + , _jcLink :: !(Maybe (Maybe JobConfigurationLink)) + , _jcLoad :: !(Maybe (Maybe JobConfigurationLoad)) + , _jcQuery :: !(Maybe (Maybe JobConfigurationQuery)) + , _jcExtract :: !(Maybe (Maybe JobConfigurationExtract)) + , _jcDryRun :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcCopy' +-- +-- * 'jcLink' +-- +-- * 'jcLoad' +-- +-- * 'jcQuery' +-- +-- * 'jcExtract' +-- +-- * 'jcDryRun' +jobConfiguration + :: JobConfiguration +jobConfiguration = + JobConfiguration + { _jcCopy = Nothing + , _jcLink = Nothing + , _jcLoad = Nothing + , _jcQuery = Nothing + , _jcExtract = Nothing + , _jcDryRun = Nothing + } + +-- | [Pick one] Copies a table. +jcCopy :: Lens' JobConfiguration (Maybe (Maybe JobConfigurationTableCopy)) +jcCopy = lens _jcCopy (\ s a -> s{_jcCopy = a}) + +-- | [Pick one] Configures a link job. +jcLink :: Lens' JobConfiguration (Maybe (Maybe JobConfigurationLink)) +jcLink = lens _jcLink (\ s a -> s{_jcLink = a}) + +-- | [Pick one] Configures a load job. +jcLoad :: Lens' JobConfiguration (Maybe (Maybe JobConfigurationLoad)) +jcLoad = lens _jcLoad (\ s a -> s{_jcLoad = a}) + +-- | [Pick one] Configures a query job. +jcQuery :: Lens' JobConfiguration (Maybe (Maybe JobConfigurationQuery)) +jcQuery = lens _jcQuery (\ s a -> s{_jcQuery = a}) + +-- | [Pick one] Configures an extract job. +jcExtract :: Lens' JobConfiguration (Maybe (Maybe JobConfigurationExtract)) +jcExtract + = lens _jcExtract (\ s a -> s{_jcExtract = a}) + +-- | [Optional] If set, don\'t actually run this job. A valid query will +-- return a mostly empty response with some processing statistics, while an +-- invalid query will return the same error it would if it wasn\'t a dry +-- run. Behavior of non-query jobs is undefined. +jcDryRun :: Lens' JobConfiguration (Maybe Bool) +jcDryRun = lens _jcDryRun (\ s a -> s{_jcDryRun = a}) + +instance FromJSON JobConfiguration where + parseJSON + = withObject "JobConfiguration" + (\ o -> + JobConfiguration <$> + (o .:? "copy") <*> (o .:? "link") <*> (o .:? "load") + <*> (o .:? "query") + <*> (o .:? "extract") + <*> (o .:? "dryRun")) + +instance ToJSON JobConfiguration where + toJSON JobConfiguration{..} + = object + (catMaybes + [("copy" .=) <$> _jcCopy, ("link" .=) <$> _jcLink, + ("load" .=) <$> _jcLoad, ("query" .=) <$> _jcQuery, + ("extract" .=) <$> _jcExtract, + ("dryRun" .=) <$> _jcDryRun]) + +-- +-- /See:/ 'jobCancelResponse' smart constructor. +data JobCancelResponse = JobCancelResponse + { _jcrKind :: !Text + , _jcrJob :: !(Maybe (Maybe Job)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobCancelResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcrKind' +-- +-- * 'jcrJob' +jobCancelResponse + :: JobCancelResponse +jobCancelResponse = + JobCancelResponse + { _jcrKind = "bigquery#jobCancelResponse" + , _jcrJob = Nothing + } + +-- | The resource type of the response. +jcrKind :: Lens' JobCancelResponse Text +jcrKind = lens _jcrKind (\ s a -> s{_jcrKind = a}) + +-- | The final state of the job. +jcrJob :: Lens' JobCancelResponse (Maybe (Maybe Job)) +jcrJob = lens _jcrJob (\ s a -> s{_jcrJob = a}) + +instance FromJSON JobCancelResponse where + parseJSON + = withObject "JobCancelResponse" + (\ o -> + JobCancelResponse <$> + (o .:? "kind" .!= "bigquery#jobCancelResponse") <*> + (o .:? "job")) + +instance ToJSON JobCancelResponse where + toJSON JobCancelResponse{..} + = object + (catMaybes + [Just ("kind" .= _jcrKind), ("job" .=) <$> _jcrJob]) + +-- +-- /See:/ 'jobConfigurationExtract' smart constructor. +data JobConfigurationExtract = JobConfigurationExtract + { _jceDestinationFormat :: !(Maybe Text) + , _jceSourceTable :: !(Maybe (Maybe TableReference)) + , _jcePrintHeader :: !Bool + , _jceCompression :: !(Maybe Text) + , _jceDestinationUris :: !(Maybe [Text]) + , _jceDestinationUri :: !(Maybe Text) + , _jceFieldDelimiter :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfigurationExtract' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jceDestinationFormat' +-- +-- * 'jceSourceTable' +-- +-- * 'jcePrintHeader' +-- +-- * 'jceCompression' +-- +-- * 'jceDestinationUris' +-- +-- * 'jceDestinationUri' +-- +-- * 'jceFieldDelimiter' +jobConfigurationExtract + :: JobConfigurationExtract +jobConfigurationExtract = + JobConfigurationExtract + { _jceDestinationFormat = Nothing + , _jceSourceTable = Nothing + , _jcePrintHeader = True + , _jceCompression = Nothing + , _jceDestinationUris = Nothing + , _jceDestinationUri = Nothing + , _jceFieldDelimiter = Nothing + } + +-- | [Optional] The exported file format. Possible values include CSV, +-- NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with +-- nested or repeated fields cannot be exported as CSV. +jceDestinationFormat :: Lens' JobConfigurationExtract (Maybe Text) +jceDestinationFormat + = lens _jceDestinationFormat + (\ s a -> s{_jceDestinationFormat = a}) + +-- | [Required] A reference to the table being exported. +jceSourceTable :: Lens' JobConfigurationExtract (Maybe (Maybe TableReference)) +jceSourceTable + = lens _jceSourceTable + (\ s a -> s{_jceSourceTable = a}) + +-- | [Optional] Whether to print out a header row in the results. Default is +-- true. +jcePrintHeader :: Lens' JobConfigurationExtract Bool +jcePrintHeader + = lens _jcePrintHeader + (\ s a -> s{_jcePrintHeader = a}) + +-- | [Optional] The compression type to use for exported files. Possible +-- values include GZIP and NONE. The default value is NONE. +jceCompression :: Lens' JobConfigurationExtract (Maybe Text) +jceCompression + = lens _jceCompression + (\ s a -> s{_jceCompression = a}) + +-- | [Pick one] A list of fully-qualified Google Cloud Storage URIs where the +-- extracted table should be written. +jceDestinationUris :: Lens' JobConfigurationExtract [Text] +jceDestinationUris + = lens _jceDestinationUris + (\ s a -> s{_jceDestinationUris = a}) + . _Default + . _Coerce + +-- | [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI +-- as necessary. The fully-qualified Google Cloud Storage URI where the +-- extracted table should be written. +jceDestinationUri :: Lens' JobConfigurationExtract (Maybe Text) +jceDestinationUri + = lens _jceDestinationUri + (\ s a -> s{_jceDestinationUri = a}) + +-- | [Optional] Delimiter to use between fields in the exported data. Default +-- is \',\' +jceFieldDelimiter :: Lens' JobConfigurationExtract (Maybe Text) +jceFieldDelimiter + = lens _jceFieldDelimiter + (\ s a -> s{_jceFieldDelimiter = a}) + +instance FromJSON JobConfigurationExtract where + parseJSON + = withObject "JobConfigurationExtract" + (\ o -> + JobConfigurationExtract <$> + (o .:? "destinationFormat") <*> (o .:? "sourceTable") + <*> (o .:? "printHeader" .!= True) + <*> (o .:? "compression") + <*> (o .:? "destinationUris" .!= mempty) + <*> (o .:? "destinationUri") + <*> (o .:? "fieldDelimiter")) + +instance ToJSON JobConfigurationExtract where + toJSON JobConfigurationExtract{..} + = object + (catMaybes + [("destinationFormat" .=) <$> _jceDestinationFormat, + ("sourceTable" .=) <$> _jceSourceTable, + Just ("printHeader" .= _jcePrintHeader), + ("compression" .=) <$> _jceCompression, + ("destinationUris" .=) <$> _jceDestinationUris, + ("destinationUri" .=) <$> _jceDestinationUri, + ("fieldDelimiter" .=) <$> _jceFieldDelimiter]) + +-- | Represents a single JSON object. +-- +-- /See:/ 'jSONObject' smart constructor. +data JSONObject = + JSONObject + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JSONObject' with the minimum fields required to make a request. +-- +jSONObject + :: JSONObject +jSONObject = JSONObject + +instance FromJSON JSONObject where + parseJSON + = withObject "JSONObject" (\ o -> pure JSONObject) + +instance ToJSON JSONObject where + toJSON = const (Object mempty) + +-- +-- /See:/ 'jobConfigurationQuery' smart constructor. +data JobConfigurationQuery = JobConfigurationQuery + { _jcqDestinationTable :: !(Maybe (Maybe TableReference)) + , _jcqWriteDisposition :: !(Maybe Text) + , _jcqPriority :: !(Maybe Text) + , _jcqUseQueryCache :: !Bool + , _jcqPreserveNulls :: !(Maybe Bool) + , _jcqTableDefinitions :: !(Maybe JobConfigurationQueryTableDefinitions) + , _jcqCreateDisposition :: !(Maybe Text) + , _jcqUserDefinedFunctionResources :: !(Maybe [Maybe UserDefinedFunctionResource]) + , _jcqAllowLargeResults :: !(Maybe Bool) + , _jcqQuery :: !(Maybe Text) + , _jcqFlattenResults :: !Bool + , _jcqDefaultDataset :: !(Maybe (Maybe DatasetReference)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobConfigurationQuery' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcqDestinationTable' +-- +-- * 'jcqWriteDisposition' +-- +-- * 'jcqPriority' +-- +-- * 'jcqUseQueryCache' +-- +-- * 'jcqPreserveNulls' +-- +-- * 'jcqTableDefinitions' +-- +-- * 'jcqCreateDisposition' +-- +-- * 'jcqUserDefinedFunctionResources' +-- +-- * 'jcqAllowLargeResults' +-- +-- * 'jcqQuery' +-- +-- * 'jcqFlattenResults' +-- +-- * 'jcqDefaultDataset' +jobConfigurationQuery + :: JobConfigurationQuery +jobConfigurationQuery = + JobConfigurationQuery + { _jcqDestinationTable = Nothing + , _jcqWriteDisposition = Nothing + , _jcqPriority = Nothing + , _jcqUseQueryCache = True + , _jcqPreserveNulls = Nothing + , _jcqTableDefinitions = Nothing + , _jcqCreateDisposition = Nothing + , _jcqUserDefinedFunctionResources = Nothing + , _jcqAllowLargeResults = Nothing + , _jcqQuery = Nothing + , _jcqFlattenResults = True + , _jcqDefaultDataset = Nothing + } + +-- | [Optional] Describes the table where the query results should be stored. +-- If not present, a new table will be created to store the results. +jcqDestinationTable :: Lens' JobConfigurationQuery (Maybe (Maybe TableReference)) +jcqDestinationTable + = lens _jcqDestinationTable + (\ s a -> s{_jcqDestinationTable = a}) + +-- | [Optional] Specifies the action that occurs if the destination table +-- already exists. The following values are supported: WRITE_TRUNCATE: If +-- the table already exists, BigQuery overwrites the table data. +-- WRITE_APPEND: If the table already exists, BigQuery appends the data to +-- the table. WRITE_EMPTY: If the table already exists and contains data, a +-- \'duplicate\' error is returned in the job result. The default value is +-- WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able +-- to complete the job successfully. Creation, truncation and append +-- actions occur as one atomic update upon job completion. +jcqWriteDisposition :: Lens' JobConfigurationQuery (Maybe Text) +jcqWriteDisposition + = lens _jcqWriteDisposition + (\ s a -> s{_jcqWriteDisposition = a}) + +-- | [Optional] Specifies a priority for the query. Possible values include +-- INTERACTIVE and BATCH. The default value is INTERACTIVE. +jcqPriority :: Lens' JobConfigurationQuery (Maybe Text) +jcqPriority + = lens _jcqPriority (\ s a -> s{_jcqPriority = a}) + +-- | [Optional] Whether to look for the result in the query cache. The query +-- cache is a best-effort cache that will be flushed whenever tables in the +-- query are modified. Moreover, the query cache is only available when a +-- query does not have a destination table specified. The default value is +-- true. +jcqUseQueryCache :: Lens' JobConfigurationQuery Bool +jcqUseQueryCache + = lens _jcqUseQueryCache + (\ s a -> s{_jcqUseQueryCache = a}) + +-- | [Deprecated] This property is deprecated. +jcqPreserveNulls :: Lens' JobConfigurationQuery (Maybe Bool) +jcqPreserveNulls + = lens _jcqPreserveNulls + (\ s a -> s{_jcqPreserveNulls = a}) + +-- | [Experimental] If querying an external data source outside of BigQuery, +-- describes the data format, location and other properties of the data +-- source. By defining these properties, the data source can then be +-- queried as if it were a standard BigQuery table. +jcqTableDefinitions :: Lens' JobConfigurationQuery (Maybe JobConfigurationQueryTableDefinitions) +jcqTableDefinitions + = lens _jcqTableDefinitions + (\ s a -> s{_jcqTableDefinitions = a}) + +-- | [Optional] Specifies whether the job is allowed to create new tables. +-- The following values are supported: CREATE_IF_NEEDED: If the table does +-- not exist, BigQuery creates the table. CREATE_NEVER: The table must +-- already exist. If it does not, a \'notFound\' error is returned in the +-- job result. The default value is CREATE_IF_NEEDED. Creation, truncation +-- and append actions occur as one atomic update upon job completion. +jcqCreateDisposition :: Lens' JobConfigurationQuery (Maybe Text) +jcqCreateDisposition + = lens _jcqCreateDisposition + (\ s a -> s{_jcqCreateDisposition = a}) + +-- | [Experimental] Describes user-defined function resources used in the +-- query. +jcqUserDefinedFunctionResources :: Lens' JobConfigurationQuery [Maybe UserDefinedFunctionResource] +jcqUserDefinedFunctionResources + = lens _jcqUserDefinedFunctionResources + (\ s a -> s{_jcqUserDefinedFunctionResources = a}) + . _Default + . _Coerce + +-- | If true, allows the query to produce arbitrarily large result tables at +-- a slight cost in performance. Requires destinationTable to be set. +jcqAllowLargeResults :: Lens' JobConfigurationQuery (Maybe Bool) +jcqAllowLargeResults + = lens _jcqAllowLargeResults + (\ s a -> s{_jcqAllowLargeResults = a}) + +-- | [Required] BigQuery SQL query to execute. +jcqQuery :: Lens' JobConfigurationQuery (Maybe Text) +jcqQuery = lens _jcqQuery (\ s a -> s{_jcqQuery = a}) + +-- | [Optional] Flattens all nested and repeated fields in the query results. +-- The default value is true. allowLargeResults must be true if this is set +-- to false. +jcqFlattenResults :: Lens' JobConfigurationQuery Bool +jcqFlattenResults + = lens _jcqFlattenResults + (\ s a -> s{_jcqFlattenResults = a}) + +-- | [Optional] Specifies the default dataset to use for unqualified table +-- names in the query. +jcqDefaultDataset :: Lens' JobConfigurationQuery (Maybe (Maybe DatasetReference)) +jcqDefaultDataset + = lens _jcqDefaultDataset + (\ s a -> s{_jcqDefaultDataset = a}) + +instance FromJSON JobConfigurationQuery where + parseJSON + = withObject "JobConfigurationQuery" + (\ o -> + JobConfigurationQuery <$> + (o .:? "destinationTable") <*> + (o .:? "writeDisposition") + <*> (o .:? "priority") + <*> (o .:? "useQueryCache" .!= True) + <*> (o .:? "preserveNulls") + <*> (o .:? "tableDefinitions") + <*> (o .:? "createDisposition") + <*> (o .:? "userDefinedFunctionResources" .!= mempty) + <*> (o .:? "allowLargeResults") + <*> (o .:? "query") + <*> (o .:? "flattenResults" .!= True) + <*> (o .:? "defaultDataset")) + +instance ToJSON JobConfigurationQuery where + toJSON JobConfigurationQuery{..} + = object + (catMaybes + [("destinationTable" .=) <$> _jcqDestinationTable, + ("writeDisposition" .=) <$> _jcqWriteDisposition, + ("priority" .=) <$> _jcqPriority, + Just ("useQueryCache" .= _jcqUseQueryCache), + ("preserveNulls" .=) <$> _jcqPreserveNulls, + ("tableDefinitions" .=) <$> _jcqTableDefinitions, + ("createDisposition" .=) <$> _jcqCreateDisposition, + ("userDefinedFunctionResources" .=) <$> + _jcqUserDefinedFunctionResources, + ("allowLargeResults" .=) <$> _jcqAllowLargeResults, + ("query" .=) <$> _jcqQuery, + Just ("flattenResults" .= _jcqFlattenResults), + ("defaultDataset" .=) <$> _jcqDefaultDataset]) + +-- +-- /See:/ 'jobList' smart constructor. +data JobList = JobList + { _jlEtag :: !(Maybe Text) + , _jlNextPageToken :: !(Maybe Text) + , _jlKind :: !Text + , _jlJobs :: !(Maybe [JobListJobsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jlEtag' +-- +-- * 'jlNextPageToken' +-- +-- * 'jlKind' +-- +-- * 'jlJobs' +jobList + :: JobList +jobList = + JobList + { _jlEtag = Nothing + , _jlNextPageToken = Nothing + , _jlKind = "bigquery#jobList" + , _jlJobs = Nothing + } + +-- | A hash of this page of results. +jlEtag :: Lens' JobList (Maybe Text) +jlEtag = lens _jlEtag (\ s a -> s{_jlEtag = a}) + +-- | A token to request the next page of results. +jlNextPageToken :: Lens' JobList (Maybe Text) +jlNextPageToken + = lens _jlNextPageToken + (\ s a -> s{_jlNextPageToken = a}) + +-- | The resource type of the response. +jlKind :: Lens' JobList Text +jlKind = lens _jlKind (\ s a -> s{_jlKind = a}) + +-- | List of jobs that were requested. +jlJobs :: Lens' JobList [JobListJobsItem] +jlJobs + = lens _jlJobs (\ s a -> s{_jlJobs = a}) . _Default . + _Coerce + +instance FromJSON JobList where + parseJSON + = withObject "JobList" + (\ o -> + JobList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "bigquery#jobList") + <*> (o .:? "jobs" .!= mempty)) + +instance ToJSON JobList where + toJSON JobList{..} + = object + (catMaybes + [("etag" .=) <$> _jlEtag, + ("nextPageToken" .=) <$> _jlNextPageToken, + Just ("kind" .= _jlKind), ("jobs" .=) <$> _jlJobs]) + +-- +-- /See:/ 'tableCell' smart constructor. +newtype TableCell = TableCell + { _tcV :: Maybe JSON + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableCell' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcV' +tableCell + :: TableCell +tableCell = + TableCell + { _tcV = Nothing + } + +tcV :: Lens' TableCell (Maybe JSON) +tcV = lens _tcV (\ s a -> s{_tcV = a}) + +instance FromJSON TableCell where + parseJSON + = withObject "TableCell" + (\ o -> TableCell <$> (o .:? "v")) + +instance ToJSON TableCell where + toJSON TableCell{..} + = object (catMaybes [("v" .=) <$> _tcV]) + +-- +-- /See:/ 'userDefinedFunctionResource' smart constructor. +data UserDefinedFunctionResource = UserDefinedFunctionResource + { _udfrResourceUri :: !(Maybe Text) + , _udfrInlineCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserDefinedFunctionResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udfrResourceUri' +-- +-- * 'udfrInlineCode' +userDefinedFunctionResource + :: UserDefinedFunctionResource +userDefinedFunctionResource = + UserDefinedFunctionResource + { _udfrResourceUri = Nothing + , _udfrInlineCode = Nothing + } + +-- | [Pick one] A code resource to load from a Google Cloud Storage URI +-- (gs:\/\/bucket\/path). +udfrResourceUri :: Lens' UserDefinedFunctionResource (Maybe Text) +udfrResourceUri + = lens _udfrResourceUri + (\ s a -> s{_udfrResourceUri = a}) + +-- | [Pick one] An inline resource that contains code for a user-defined +-- function (UDF). Providing a inline code resource is equivalent to +-- providing a URI for a file containing the same code. +udfrInlineCode :: Lens' UserDefinedFunctionResource (Maybe Text) +udfrInlineCode + = lens _udfrInlineCode + (\ s a -> s{_udfrInlineCode = a}) + +instance FromJSON UserDefinedFunctionResource where + parseJSON + = withObject "UserDefinedFunctionResource" + (\ o -> + UserDefinedFunctionResource <$> + (o .:? "resourceUri") <*> (o .:? "inlineCode")) + +instance ToJSON UserDefinedFunctionResource where + toJSON UserDefinedFunctionResource{..} + = object + (catMaybes + [("resourceUri" .=) <$> _udfrResourceUri, + ("inlineCode" .=) <$> _udfrInlineCode]) + +-- +-- /See:/ 'viewDefinition' smart constructor. +newtype ViewDefinition = ViewDefinition + { _vdQuery :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ViewDefinition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vdQuery' +viewDefinition + :: ViewDefinition +viewDefinition = + ViewDefinition + { _vdQuery = Nothing + } + +-- | [Required] A query that BigQuery executes when the view is referenced. +vdQuery :: Lens' ViewDefinition (Maybe Text) +vdQuery = lens _vdQuery (\ s a -> s{_vdQuery = a}) + +instance FromJSON ViewDefinition where + parseJSON + = withObject "ViewDefinition" + (\ o -> ViewDefinition <$> (o .:? "query")) + +instance ToJSON ViewDefinition where + toJSON ViewDefinition{..} + = object (catMaybes [("query" .=) <$> _vdQuery]) + +-- +-- /See:/ 'jobStatistics2' smart constructor. +data JobStatistics2 = JobStatistics2 + { _jTotalBytesProcessed :: !(Maybe Int64) + , _jBillingTier :: !(Maybe Int32) + , _jCacheHit :: !(Maybe Bool) + , _jTotalBytesBilled :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobStatistics2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jTotalBytesProcessed' +-- +-- * 'jBillingTier' +-- +-- * 'jCacheHit' +-- +-- * 'jTotalBytesBilled' +jobStatistics2 + :: JobStatistics2 +jobStatistics2 = + JobStatistics2 + { _jTotalBytesProcessed = Nothing + , _jBillingTier = Nothing + , _jCacheHit = Nothing + , _jTotalBytesBilled = Nothing + } + +-- | [Output-only] Total bytes processed for the job. +jTotalBytesProcessed :: Lens' JobStatistics2 (Maybe Int64) +jTotalBytesProcessed + = lens _jTotalBytesProcessed + (\ s a -> s{_jTotalBytesProcessed = a}) + +-- | [Output-only] Billing tier for the job. +jBillingTier :: Lens' JobStatistics2 (Maybe Int32) +jBillingTier + = lens _jBillingTier (\ s a -> s{_jBillingTier = a}) + +-- | [Output-only] Whether the query result was fetched from the query cache. +jCacheHit :: Lens' JobStatistics2 (Maybe Bool) +jCacheHit + = lens _jCacheHit (\ s a -> s{_jCacheHit = a}) + +-- | [Output-only] Total bytes billed for the job. +jTotalBytesBilled :: Lens' JobStatistics2 (Maybe Int64) +jTotalBytesBilled + = lens _jTotalBytesBilled + (\ s a -> s{_jTotalBytesBilled = a}) + +instance FromJSON JobStatistics2 where + parseJSON + = withObject "JobStatistics2" + (\ o -> + JobStatistics2 <$> + (o .:? "totalBytesProcessed") <*> + (o .:? "billingTier") + <*> (o .:? "cacheHit") + <*> (o .:? "totalBytesBilled")) + +instance ToJSON JobStatistics2 where + toJSON JobStatistics2{..} + = object + (catMaybes + [("totalBytesProcessed" .=) <$> + _jTotalBytesProcessed, + ("billingTier" .=) <$> _jBillingTier, + ("cacheHit" .=) <$> _jCacheHit, + ("totalBytesBilled" .=) <$> _jTotalBytesBilled]) + +-- +-- /See:/ 'jobStatus' smart constructor. +data JobStatus = JobStatus + { _jsState :: !(Maybe Text) + , _jsErrorResult :: !(Maybe (Maybe ErrorProto)) + , _jsErrors :: !(Maybe [Maybe ErrorProto]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsState' +-- +-- * 'jsErrorResult' +-- +-- * 'jsErrors' +jobStatus + :: JobStatus +jobStatus = + JobStatus + { _jsState = Nothing + , _jsErrorResult = Nothing + , _jsErrors = Nothing + } + +-- | [Output-only] Running state of the job. +jsState :: Lens' JobStatus (Maybe Text) +jsState = lens _jsState (\ s a -> s{_jsState = a}) + +-- | [Output-only] Final error result of the job. If present, indicates that +-- the job has completed and was unsuccessful. +jsErrorResult :: Lens' JobStatus (Maybe (Maybe ErrorProto)) +jsErrorResult + = lens _jsErrorResult + (\ s a -> s{_jsErrorResult = a}) + +-- | [Output-only] All errors encountered during the running of the job. +-- Errors here do not necessarily mean that the job has completed or was +-- unsuccessful. +jsErrors :: Lens' JobStatus [Maybe ErrorProto] +jsErrors + = lens _jsErrors (\ s a -> s{_jsErrors = a}) . + _Default + . _Coerce + +instance FromJSON JobStatus where + parseJSON + = withObject "JobStatus" + (\ o -> + JobStatus <$> + (o .:? "state") <*> (o .:? "errorResult") <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON JobStatus where + toJSON JobStatus{..} + = object + (catMaybes + [("state" .=) <$> _jsState, + ("errorResult" .=) <$> _jsErrorResult, + ("errors" .=) <$> _jsErrors]) + +-- +-- /See:/ 'tableDataInsertAllResponse' smart constructor. +data TableDataInsertAllResponse = TableDataInsertAllResponse + { _tKind :: !Text + , _tInsertErrors :: !(Maybe [TableDataInsertAllResponseInsertErrorsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableDataInsertAllResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tKind' +-- +-- * 'tInsertErrors' +tableDataInsertAllResponse + :: TableDataInsertAllResponse +tableDataInsertAllResponse = + TableDataInsertAllResponse + { _tKind = "bigquery#tableDataInsertAllResponse" + , _tInsertErrors = Nothing + } + +-- | The resource type of the response. +tKind :: Lens' TableDataInsertAllResponse Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | An array of errors for rows that were not inserted. +tInsertErrors :: Lens' TableDataInsertAllResponse [TableDataInsertAllResponseInsertErrorsItem] +tInsertErrors + = lens _tInsertErrors + (\ s a -> s{_tInsertErrors = a}) + . _Default + . _Coerce + +instance FromJSON TableDataInsertAllResponse where + parseJSON + = withObject "TableDataInsertAllResponse" + (\ o -> + TableDataInsertAllResponse <$> + (o .:? "kind" .!= + "bigquery#tableDataInsertAllResponse") + <*> (o .:? "insertErrors" .!= mempty)) + +instance ToJSON TableDataInsertAllResponse where + toJSON TableDataInsertAllResponse{..} + = object + (catMaybes + [Just ("kind" .= _tKind), + ("insertErrors" .=) <$> _tInsertErrors]) + +-- +-- /See:/ 'table' smart constructor. +data Table = Table + { _tabCreationTime :: !(Maybe Int64) + , _tabEtag :: !(Maybe Text) + , _tabNumBytes :: !(Maybe Int64) + , _tabExternalDataConfiguration :: !(Maybe (Maybe ExternalDataConfiguration)) + , _tabLocation :: !(Maybe Text) + , _tabTableReference :: !(Maybe (Maybe TableReference)) + , _tabFriendlyName :: !(Maybe Text) + , _tabKind :: !Text + , _tabLastModifiedTime :: !(Maybe Word64) + , _tabSchema :: !(Maybe (Maybe TableSchema)) + , _tabStreamingBuffer :: !(Maybe (Maybe Streamingbuffer)) + , _tabSelfLink :: !(Maybe Text) + , _tabNumRows :: !(Maybe Word64) + , _tabView :: !(Maybe (Maybe ViewDefinition)) + , _tabId :: !(Maybe Text) + , _tabType :: !(Maybe Text) + , _tabExpirationTime :: !(Maybe Int64) + , _tabDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Table' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tabCreationTime' +-- +-- * 'tabEtag' +-- +-- * 'tabNumBytes' +-- +-- * 'tabExternalDataConfiguration' +-- +-- * 'tabLocation' +-- +-- * 'tabTableReference' +-- +-- * 'tabFriendlyName' +-- +-- * 'tabKind' +-- +-- * 'tabLastModifiedTime' +-- +-- * 'tabSchema' +-- +-- * 'tabStreamingBuffer' +-- +-- * 'tabSelfLink' +-- +-- * 'tabNumRows' +-- +-- * 'tabView' +-- +-- * 'tabId' +-- +-- * 'tabType' +-- +-- * 'tabExpirationTime' +-- +-- * 'tabDescription' +table + :: Table +table = + Table + { _tabCreationTime = Nothing + , _tabEtag = Nothing + , _tabNumBytes = Nothing + , _tabExternalDataConfiguration = Nothing + , _tabLocation = Nothing + , _tabTableReference = Nothing + , _tabFriendlyName = Nothing + , _tabKind = "bigquery#table" + , _tabLastModifiedTime = Nothing + , _tabSchema = Nothing + , _tabStreamingBuffer = Nothing + , _tabSelfLink = Nothing + , _tabNumRows = Nothing + , _tabView = Nothing + , _tabId = Nothing + , _tabType = Nothing + , _tabExpirationTime = Nothing + , _tabDescription = Nothing + } + +-- | [Output-only] The time when this table was created, in milliseconds +-- since the epoch. +tabCreationTime :: Lens' Table (Maybe Int64) +tabCreationTime + = lens _tabCreationTime + (\ s a -> s{_tabCreationTime = a}) + +-- | [Output-only] A hash of this resource. +tabEtag :: Lens' Table (Maybe Text) +tabEtag = lens _tabEtag (\ s a -> s{_tabEtag = a}) + +-- | [Output-only] The size of this table in bytes, excluding any data in the +-- streaming buffer. +tabNumBytes :: Lens' Table (Maybe Int64) +tabNumBytes + = lens _tabNumBytes (\ s a -> s{_tabNumBytes = a}) + +-- | [Experimental] Describes the data format, location, and other properties +-- of a table stored outside of BigQuery. By defining these properties, the +-- data source can then be queried as if it were a standard BigQuery table. +tabExternalDataConfiguration :: Lens' Table (Maybe (Maybe ExternalDataConfiguration)) +tabExternalDataConfiguration + = lens _tabExternalDataConfiguration + (\ s a -> s{_tabExternalDataConfiguration = a}) + +-- | [Output-only] The geographic location where the table resides. This +-- value is inherited from the dataset. +tabLocation :: Lens' Table (Maybe Text) +tabLocation + = lens _tabLocation (\ s a -> s{_tabLocation = a}) + +-- | [Required] Reference describing the ID of this table. +tabTableReference :: Lens' Table (Maybe (Maybe TableReference)) +tabTableReference + = lens _tabTableReference + (\ s a -> s{_tabTableReference = a}) + +-- | [Optional] A descriptive name for this table. +tabFriendlyName :: Lens' Table (Maybe Text) +tabFriendlyName + = lens _tabFriendlyName + (\ s a -> s{_tabFriendlyName = a}) + +-- | [Output-only] The type of the resource. +tabKind :: Lens' Table Text +tabKind = lens _tabKind (\ s a -> s{_tabKind = a}) + +-- | [Output-only] The time when this table was last modified, in +-- milliseconds since the epoch. +tabLastModifiedTime :: Lens' Table (Maybe Word64) +tabLastModifiedTime + = lens _tabLastModifiedTime + (\ s a -> s{_tabLastModifiedTime = a}) + +-- | [Optional] Describes the schema of this table. +tabSchema :: Lens' Table (Maybe (Maybe TableSchema)) +tabSchema + = lens _tabSchema (\ s a -> s{_tabSchema = a}) + +-- | [Output-only] Contains information regarding this table\'s streaming +-- buffer, if one is present. This field will be absent if the table is not +-- being streamed to or if there is no data in the streaming buffer. +tabStreamingBuffer :: Lens' Table (Maybe (Maybe Streamingbuffer)) +tabStreamingBuffer + = lens _tabStreamingBuffer + (\ s a -> s{_tabStreamingBuffer = a}) + +-- | [Output-only] A URL that can be used to access this resource again. +tabSelfLink :: Lens' Table (Maybe Text) +tabSelfLink + = lens _tabSelfLink (\ s a -> s{_tabSelfLink = a}) + +-- | [Output-only] The number of rows of data in this table, excluding any +-- data in the streaming buffer. +tabNumRows :: Lens' Table (Maybe Word64) +tabNumRows + = lens _tabNumRows (\ s a -> s{_tabNumRows = a}) + +-- | [Optional] The view definition. +tabView :: Lens' Table (Maybe (Maybe ViewDefinition)) +tabView = lens _tabView (\ s a -> s{_tabView = a}) + +-- | [Output-only] An opaque ID uniquely identifying the table. +tabId :: Lens' Table (Maybe Text) +tabId = lens _tabId (\ s a -> s{_tabId = a}) + +-- | [Output-only] Describes the table type. The following values are +-- supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined +-- by a SQL query. The default value is TABLE. +tabType :: Lens' Table (Maybe Text) +tabType = lens _tabType (\ s a -> s{_tabType = a}) + +-- | [Optional] The time when this table expires, in milliseconds since the +-- epoch. If not present, the table will persist indefinitely. Expired +-- tables will be deleted and their storage reclaimed. +tabExpirationTime :: Lens' Table (Maybe Int64) +tabExpirationTime + = lens _tabExpirationTime + (\ s a -> s{_tabExpirationTime = a}) + +-- | [Optional] A user-friendly description of this table. +tabDescription :: Lens' Table (Maybe Text) +tabDescription + = lens _tabDescription + (\ s a -> s{_tabDescription = a}) + +instance FromJSON Table where + parseJSON + = withObject "Table" + (\ o -> + Table <$> + (o .:? "creationTime") <*> (o .:? "etag") <*> + (o .:? "numBytes") + <*> (o .:? "externalDataConfiguration") + <*> (o .:? "location") + <*> (o .:? "tableReference") + <*> (o .:? "friendlyName") + <*> (o .:? "kind" .!= "bigquery#table") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "schema") + <*> (o .:? "streamingBuffer") + <*> (o .:? "selfLink") + <*> (o .:? "numRows") + <*> (o .:? "view") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "expirationTime") + <*> (o .:? "description")) + +instance ToJSON Table where + toJSON Table{..} + = object + (catMaybes + [("creationTime" .=) <$> _tabCreationTime, + ("etag" .=) <$> _tabEtag, + ("numBytes" .=) <$> _tabNumBytes, + ("externalDataConfiguration" .=) <$> + _tabExternalDataConfiguration, + ("location" .=) <$> _tabLocation, + ("tableReference" .=) <$> _tabTableReference, + ("friendlyName" .=) <$> _tabFriendlyName, + Just ("kind" .= _tabKind), + ("lastModifiedTime" .=) <$> _tabLastModifiedTime, + ("schema" .=) <$> _tabSchema, + ("streamingBuffer" .=) <$> _tabStreamingBuffer, + ("selfLink" .=) <$> _tabSelfLink, + ("numRows" .=) <$> _tabNumRows, + ("view" .=) <$> _tabView, ("id" .=) <$> _tabId, + ("type" .=) <$> _tabType, + ("expirationTime" .=) <$> _tabExpirationTime, + ("description" .=) <$> _tabDescription]) + +-- +-- /See:/ 'errorProto' smart constructor. +data ErrorProto = ErrorProto + { _epDebugInfo :: !(Maybe Text) + , _epLocation :: !(Maybe Text) + , _epReason :: !(Maybe Text) + , _epMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ErrorProto' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'epDebugInfo' +-- +-- * 'epLocation' +-- +-- * 'epReason' +-- +-- * 'epMessage' +errorProto + :: ErrorProto +errorProto = + ErrorProto + { _epDebugInfo = Nothing + , _epLocation = Nothing + , _epReason = Nothing + , _epMessage = Nothing + } + +-- | Debugging information. This property is internal to Google and should +-- not be used. +epDebugInfo :: Lens' ErrorProto (Maybe Text) +epDebugInfo + = lens _epDebugInfo (\ s a -> s{_epDebugInfo = a}) + +-- | Specifies where the error occurred, if present. +epLocation :: Lens' ErrorProto (Maybe Text) +epLocation + = lens _epLocation (\ s a -> s{_epLocation = a}) + +-- | A short error code that summarizes the error. +epReason :: Lens' ErrorProto (Maybe Text) +epReason = lens _epReason (\ s a -> s{_epReason = a}) + +-- | A human-readable description of the error. +epMessage :: Lens' ErrorProto (Maybe Text) +epMessage + = lens _epMessage (\ s a -> s{_epMessage = a}) + +instance FromJSON ErrorProto where + parseJSON + = withObject "ErrorProto" + (\ o -> + ErrorProto <$> + (o .:? "debugInfo") <*> (o .:? "location") <*> + (o .:? "reason") + <*> (o .:? "message")) + +instance ToJSON ErrorProto where + toJSON ErrorProto{..} + = object + (catMaybes + [("debugInfo" .=) <$> _epDebugInfo, + ("location" .=) <$> _epLocation, + ("reason" .=) <$> _epReason, + ("message" .=) <$> _epMessage]) + +-- +-- /See:/ 'cSVOptions' smart constructor. +data CSVOptions = CSVOptions + { _coSkipLeadingRows :: !(Maybe Int32) + , _coAllowJaggedRows :: !(Maybe Bool) + , _coAllowQuotedNewlines :: !(Maybe Bool) + , _coQuote :: !Text + , _coEncoding :: !(Maybe Text) + , _coFieldDelimiter :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CSVOptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'coSkipLeadingRows' +-- +-- * 'coAllowJaggedRows' +-- +-- * 'coAllowQuotedNewlines' +-- +-- * 'coQuote' +-- +-- * 'coEncoding' +-- +-- * 'coFieldDelimiter' +cSVOptions + :: CSVOptions +cSVOptions = + CSVOptions + { _coSkipLeadingRows = Nothing + , _coAllowJaggedRows = Nothing + , _coAllowQuotedNewlines = Nothing + , _coQuote = "\"" + , _coEncoding = Nothing + , _coFieldDelimiter = Nothing + } + +-- | [Optional] The number of rows at the top of a CSV file that BigQuery +-- will skip when reading the data. The default value is 0. This property +-- is useful if you have header rows in the file that should be skipped. +coSkipLeadingRows :: Lens' CSVOptions (Maybe Int32) +coSkipLeadingRows + = lens _coSkipLeadingRows + (\ s a -> s{_coSkipLeadingRows = a}) + +-- | [Optional] Indicates if BigQuery should accept rows that are missing +-- trailing optional columns. If true, BigQuery treats missing trailing +-- columns as null values. If false, records with missing trailing columns +-- are treated as bad records, and if there are too many bad records, an +-- invalid error is returned in the job result. The default value is false. +coAllowJaggedRows :: Lens' CSVOptions (Maybe Bool) +coAllowJaggedRows + = lens _coAllowJaggedRows + (\ s a -> s{_coAllowJaggedRows = a}) + +-- | [Optional] Indicates if BigQuery should allow quoted data sections that +-- contain newline characters in a CSV file. The default value is false. +coAllowQuotedNewlines :: Lens' CSVOptions (Maybe Bool) +coAllowQuotedNewlines + = lens _coAllowQuotedNewlines + (\ s a -> s{_coAllowQuotedNewlines = a}) + +-- | [Optional] The value that is used to quote data sections in a CSV file. +-- BigQuery converts the string to ISO-8859-1 encoding, and then uses the +-- first byte of the encoded string to split the data in its raw, binary +-- state. The default value is a double-quote (\'\"\'). If your data does +-- not contain quoted sections, set the property value to an empty string. +-- If your data contains quoted newline characters, you must also set the +-- allowQuotedNewlines property to true. +coQuote :: Lens' CSVOptions Text +coQuote = lens _coQuote (\ s a -> s{_coQuote = a}) + +-- | [Optional] The character encoding of the data. The supported values are +-- UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the +-- data after the raw, binary data has been split using the values of the +-- quote and fieldDelimiter properties. +coEncoding :: Lens' CSVOptions (Maybe Text) +coEncoding + = lens _coEncoding (\ s a -> s{_coEncoding = a}) + +-- | [Optional] The separator for fields in a CSV file. BigQuery converts the +-- string to ISO-8859-1 encoding, and then uses the first byte of the +-- encoded string to split the data in its raw, binary state. BigQuery also +-- supports the escape sequence \"\\t\" to specify a tab separator. The +-- default value is a comma (\',\'). +coFieldDelimiter :: Lens' CSVOptions (Maybe Text) +coFieldDelimiter + = lens _coFieldDelimiter + (\ s a -> s{_coFieldDelimiter = a}) + +instance FromJSON CSVOptions where + parseJSON + = withObject "CSVOptions" + (\ o -> + CSVOptions <$> + (o .:? "skipLeadingRows") <*> + (o .:? "allowJaggedRows") + <*> (o .:? "allowQuotedNewlines") + <*> (o .:? "quote" .!= "\"") + <*> (o .:? "encoding") + <*> (o .:? "fieldDelimiter")) + +instance ToJSON CSVOptions where + toJSON CSVOptions{..} + = object + (catMaybes + [("skipLeadingRows" .=) <$> _coSkipLeadingRows, + ("allowJaggedRows" .=) <$> _coAllowJaggedRows, + ("allowQuotedNewlines" .=) <$> + _coAllowQuotedNewlines, + Just ("quote" .= _coQuote), + ("encoding" .=) <$> _coEncoding, + ("fieldDelimiter" .=) <$> _coFieldDelimiter]) + +-- +-- /See:/ 'jobStatistics3' smart constructor. +data JobStatistics3 = JobStatistics3 + { _jsInputFiles :: !(Maybe Int64) + , _jsOutputRows :: !(Maybe Int64) + , _jsOutputBytes :: !(Maybe Int64) + , _jsInputFileBytes :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobStatistics3' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsInputFiles' +-- +-- * 'jsOutputRows' +-- +-- * 'jsOutputBytes' +-- +-- * 'jsInputFileBytes' +jobStatistics3 + :: JobStatistics3 +jobStatistics3 = + JobStatistics3 + { _jsInputFiles = Nothing + , _jsOutputRows = Nothing + , _jsOutputBytes = Nothing + , _jsInputFileBytes = Nothing + } + +-- | [Output-only] Number of source files in a load job. +jsInputFiles :: Lens' JobStatistics3 (Maybe Int64) +jsInputFiles + = lens _jsInputFiles (\ s a -> s{_jsInputFiles = a}) + +-- | [Output-only] Number of rows imported in a load job. Note that while an +-- import job is in the running state, this value may change. +jsOutputRows :: Lens' JobStatistics3 (Maybe Int64) +jsOutputRows + = lens _jsOutputRows (\ s a -> s{_jsOutputRows = a}) + +-- | [Output-only] Size of the loaded data in bytes. Note that while a load +-- job is in the running state, this value may change. +jsOutputBytes :: Lens' JobStatistics3 (Maybe Int64) +jsOutputBytes + = lens _jsOutputBytes + (\ s a -> s{_jsOutputBytes = a}) + +-- | [Output-only] Number of bytes of source data in a load job. +jsInputFileBytes :: Lens' JobStatistics3 (Maybe Int64) +jsInputFileBytes + = lens _jsInputFileBytes + (\ s a -> s{_jsInputFileBytes = a}) + +instance FromJSON JobStatistics3 where + parseJSON + = withObject "JobStatistics3" + (\ o -> + JobStatistics3 <$> + (o .:? "inputFiles") <*> (o .:? "outputRows") <*> + (o .:? "outputBytes") + <*> (o .:? "inputFileBytes")) + +instance ToJSON JobStatistics3 where + toJSON JobStatistics3{..} + = object + (catMaybes + [("inputFiles" .=) <$> _jsInputFiles, + ("outputRows" .=) <$> _jsOutputRows, + ("outputBytes" .=) <$> _jsOutputBytes, + ("inputFileBytes" .=) <$> _jsInputFileBytes]) + +-- +-- /See:/ 'queryResponse' smart constructor. +data QueryResponse = QueryResponse + { _qJobReference :: !(Maybe (Maybe JobReference)) + , _qKind :: !Text + , _qSchema :: !(Maybe (Maybe TableSchema)) + , _qTotalBytesProcessed :: !(Maybe Int64) + , _qRows :: !(Maybe [Maybe TableRow]) + , _qPageToken :: !(Maybe Text) + , _qTotalRows :: !(Maybe Word64) + , _qErrors :: !(Maybe [Maybe ErrorProto]) + , _qJobComplete :: !(Maybe Bool) + , _qCacheHit :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qJobReference' +-- +-- * 'qKind' +-- +-- * 'qSchema' +-- +-- * 'qTotalBytesProcessed' +-- +-- * 'qRows' +-- +-- * 'qPageToken' +-- +-- * 'qTotalRows' +-- +-- * 'qErrors' +-- +-- * 'qJobComplete' +-- +-- * 'qCacheHit' +queryResponse + :: QueryResponse +queryResponse = + QueryResponse + { _qJobReference = Nothing + , _qKind = "bigquery#queryResponse" + , _qSchema = Nothing + , _qTotalBytesProcessed = Nothing + , _qRows = Nothing + , _qPageToken = Nothing + , _qTotalRows = Nothing + , _qErrors = Nothing + , _qJobComplete = Nothing + , _qCacheHit = Nothing + } + +-- | Reference to the Job that was created to run the query. This field will +-- be present even if the original request timed out, in which case +-- GetQueryResults can be used to read the results once the query has +-- completed. Since this API only returns the first page of results, +-- subsequent pages can be fetched via the same mechanism +-- (GetQueryResults). +qJobReference :: Lens' QueryResponse (Maybe (Maybe JobReference)) +qJobReference + = lens _qJobReference + (\ s a -> s{_qJobReference = a}) + +-- | The resource type. +qKind :: Lens' QueryResponse Text +qKind = lens _qKind (\ s a -> s{_qKind = a}) + +-- | The schema of the results. Present only when the query completes +-- successfully. +qSchema :: Lens' QueryResponse (Maybe (Maybe TableSchema)) +qSchema = lens _qSchema (\ s a -> s{_qSchema = a}) + +-- | The total number of bytes processed for this query. If this query was a +-- dry run, this is the number of bytes that would be processed if the +-- query were run. +qTotalBytesProcessed :: Lens' QueryResponse (Maybe Int64) +qTotalBytesProcessed + = lens _qTotalBytesProcessed + (\ s a -> s{_qTotalBytesProcessed = a}) + +-- | An object with as many results as can be contained within the maximum +-- permitted reply size. To get any additional rows, you can call +-- GetQueryResults and specify the jobReference returned above. +qRows :: Lens' QueryResponse [Maybe TableRow] +qRows + = lens _qRows (\ s a -> s{_qRows = a}) . _Default . + _Coerce + +-- | A token used for paging results. +qPageToken :: Lens' QueryResponse (Maybe Text) +qPageToken + = lens _qPageToken (\ s a -> s{_qPageToken = a}) + +-- | The total number of rows in the complete query result set, which can be +-- more than the number of rows in this single page of results. +qTotalRows :: Lens' QueryResponse (Maybe Word64) +qTotalRows + = lens _qTotalRows (\ s a -> s{_qTotalRows = a}) + +-- | [Output-only] All errors and warnings encountered during the running of +-- the job. Errors here do not necessarily mean that the job has completed +-- or was unsuccessful. +qErrors :: Lens' QueryResponse [Maybe ErrorProto] +qErrors + = lens _qErrors (\ s a -> s{_qErrors = a}) . _Default + . _Coerce + +-- | Whether the query has completed or not. If rows or totalRows are +-- present, this will always be true. If this is false, totalRows will not +-- be available. +qJobComplete :: Lens' QueryResponse (Maybe Bool) +qJobComplete + = lens _qJobComplete (\ s a -> s{_qJobComplete = a}) + +-- | Whether the query result was fetched from the query cache. +qCacheHit :: Lens' QueryResponse (Maybe Bool) +qCacheHit + = lens _qCacheHit (\ s a -> s{_qCacheHit = a}) + +instance FromJSON QueryResponse where + parseJSON + = withObject "QueryResponse" + (\ o -> + QueryResponse <$> + (o .:? "jobReference") <*> + (o .:? "kind" .!= "bigquery#queryResponse") + <*> (o .:? "schema") + <*> (o .:? "totalBytesProcessed") + <*> (o .:? "rows" .!= mempty) + <*> (o .:? "pageToken") + <*> (o .:? "totalRows") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "jobComplete") + <*> (o .:? "cacheHit")) + +instance ToJSON QueryResponse where + toJSON QueryResponse{..} + = object + (catMaybes + [("jobReference" .=) <$> _qJobReference, + Just ("kind" .= _qKind), ("schema" .=) <$> _qSchema, + ("totalBytesProcessed" .=) <$> _qTotalBytesProcessed, + ("rows" .=) <$> _qRows, + ("pageToken" .=) <$> _qPageToken, + ("totalRows" .=) <$> _qTotalRows, + ("errors" .=) <$> _qErrors, + ("jobComplete" .=) <$> _qJobComplete, + ("cacheHit" .=) <$> _qCacheHit]) diff --git a/gogol-bigquery/gen/Network/Google/BigQuery/Types/Sum.hs b/gogol-bigquery/gen/Network/Google/BigQuery/Types/Sum.hs new file mode 100644 index 000000000..9817cb54c --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/BigQuery/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.BigQuery.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.BigQuery.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Delete.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Delete.hs new file mode 100644 index 000000000..5a2b53f22 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Delete.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the dataset specified by the datasetId value. Before you can +-- delete a dataset, you must delete all its tables, either manually or by +-- specifying deleteContents. Immediately after deletion, you can create +-- another dataset with the same name. +-- +-- /See:/ for @BigqueryDatasetsDelete@. +module BigQuery.Datasets.Delete + ( + -- * REST Resource + DatasetsDeleteAPI + + -- * Creating a Request + , datasetsDelete + , DatasetsDelete + + -- * Request Lenses + , ddQuotaUser + , ddPrettyPrint + , ddUserIp + , ddKey + , ddDatasetId + , ddProjectId + , ddOauthToken + , ddDeleteContents + , ddFields + , ddAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsDelete@ which the +-- 'DatasetsDelete' request conforms to. +type DatasetsDeleteAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + QueryParam "deleteContents" Bool :> Delete '[JSON] () + +-- | Deletes the dataset specified by the datasetId value. Before you can +-- delete a dataset, you must delete all its tables, either manually or by +-- specifying deleteContents. Immediately after deletion, you can create +-- another dataset with the same name. +-- +-- /See:/ 'datasetsDelete' smart constructor. +data DatasetsDelete = DatasetsDelete + { _ddQuotaUser :: !(Maybe Text) + , _ddPrettyPrint :: !Bool + , _ddUserIp :: !(Maybe Text) + , _ddKey :: !(Maybe Text) + , _ddDatasetId :: !Text + , _ddProjectId :: !Text + , _ddOauthToken :: !(Maybe Text) + , _ddDeleteContents :: !(Maybe Bool) + , _ddFields :: !(Maybe Text) + , _ddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddQuotaUser' +-- +-- * 'ddPrettyPrint' +-- +-- * 'ddUserIp' +-- +-- * 'ddKey' +-- +-- * 'ddDatasetId' +-- +-- * 'ddProjectId' +-- +-- * 'ddOauthToken' +-- +-- * 'ddDeleteContents' +-- +-- * 'ddFields' +-- +-- * 'ddAlt' +datasetsDelete + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> DatasetsDelete +datasetsDelete pDdDatasetId_ pDdProjectId_ = + DatasetsDelete + { _ddQuotaUser = Nothing + , _ddPrettyPrint = True + , _ddUserIp = Nothing + , _ddKey = Nothing + , _ddDatasetId = pDdDatasetId_ + , _ddProjectId = pDdProjectId_ + , _ddOauthToken = Nothing + , _ddDeleteContents = Nothing + , _ddFields = Nothing + , _ddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ddQuotaUser :: Lens' DatasetsDelete' (Maybe Text) +ddQuotaUser + = lens _ddQuotaUser (\ s a -> s{_ddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddPrettyPrint :: Lens' DatasetsDelete' Bool +ddPrettyPrint + = lens _ddPrettyPrint + (\ s a -> s{_ddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ddUserIp :: Lens' DatasetsDelete' (Maybe Text) +ddUserIp = lens _ddUserIp (\ s a -> s{_ddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddKey :: Lens' DatasetsDelete' (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | Dataset ID of dataset being deleted +ddDatasetId :: Lens' DatasetsDelete' Text +ddDatasetId + = lens _ddDatasetId (\ s a -> s{_ddDatasetId = a}) + +-- | Project ID of the dataset being deleted +ddProjectId :: Lens' DatasetsDelete' Text +ddProjectId + = lens _ddProjectId (\ s a -> s{_ddProjectId = a}) + +-- | OAuth 2.0 token for the current user. +ddOauthToken :: Lens' DatasetsDelete' (Maybe Text) +ddOauthToken + = lens _ddOauthToken (\ s a -> s{_ddOauthToken = a}) + +-- | If True, delete all the tables in the dataset. If False and the dataset +-- contains tables, the request will fail. Default is False +ddDeleteContents :: Lens' DatasetsDelete' (Maybe Bool) +ddDeleteContents + = lens _ddDeleteContents + (\ s a -> s{_ddDeleteContents = a}) + +-- | Selector specifying which fields to include in a partial response. +ddFields :: Lens' DatasetsDelete' (Maybe Text) +ddFields = lens _ddFields (\ s a -> s{_ddFields = a}) + +-- | Data format for the response. +ddAlt :: Lens' DatasetsDelete' Text +ddAlt = lens _ddAlt (\ s a -> s{_ddAlt = a}) + +instance GoogleRequest DatasetsDelete' where + type Rs DatasetsDelete' = () + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsDelete{..} + = go _ddQuotaUser _ddPrettyPrint _ddUserIp _ddKey + _ddDatasetId + _ddProjectId + _ddOauthToken + _ddDeleteContents + _ddFields + _ddAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsDeleteAPI) + r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Get.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Get.hs new file mode 100644 index 000000000..3a3161b49 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the dataset specified by datasetID. +-- +-- /See:/ for @BigqueryDatasetsGet@. +module BigQuery.Datasets.Get + ( + -- * REST Resource + DatasetsGetAPI + + -- * Creating a Request + , datasetsGet + , DatasetsGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgUserIp + , dgKey + , dgDatasetId + , dgProjectId + , dgOauthToken + , dgFields + , dgAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsGet@ which the +-- 'DatasetsGet' request conforms to. +type DatasetsGetAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> Get '[JSON] Dataset + +-- | Returns the dataset specified by datasetID. +-- +-- /See:/ 'datasetsGet' smart constructor. +data DatasetsGet = DatasetsGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgUserIp :: !(Maybe Text) + , _dgKey :: !(Maybe Text) + , _dgDatasetId :: !Text + , _dgProjectId :: !Text + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgUserIp' +-- +-- * 'dgKey' +-- +-- * 'dgDatasetId' +-- +-- * 'dgProjectId' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +datasetsGet + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> DatasetsGet +datasetsGet pDgDatasetId_ pDgProjectId_ = + DatasetsGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgUserIp = Nothing + , _dgKey = Nothing + , _dgDatasetId = pDgDatasetId_ + , _dgProjectId = pDgProjectId_ + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DatasetsGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DatasetsGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DatasetsGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DatasetsGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | Dataset ID of the requested dataset +dgDatasetId :: Lens' DatasetsGet' Text +dgDatasetId + = lens _dgDatasetId (\ s a -> s{_dgDatasetId = a}) + +-- | Project ID of the requested dataset +dgProjectId :: Lens' DatasetsGet' Text +dgProjectId + = lens _dgProjectId (\ s a -> s{_dgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DatasetsGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DatasetsGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DatasetsGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +instance GoogleRequest DatasetsGet' where + type Rs DatasetsGet' = Dataset + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgUserIp _dgKey + _dgDatasetId + _dgProjectId + _dgOauthToken + _dgFields + _dgAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsGetAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Insert.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Insert.hs new file mode 100644 index 000000000..975ec892e --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new empty dataset. +-- +-- /See:/ for @BigqueryDatasetsInsert@. +module BigQuery.Datasets.Insert + ( + -- * REST Resource + DatasetsInsertAPI + + -- * Creating a Request + , datasetsInsert + , DatasetsInsert + + -- * Request Lenses + , diQuotaUser + , diPrettyPrint + , diUserIp + , diKey + , diProjectId + , diOauthToken + , diFields + , diAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsInsert@ which the +-- 'DatasetsInsert' request conforms to. +type DatasetsInsertAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> Post '[JSON] Dataset + +-- | Creates a new empty dataset. +-- +-- /See:/ 'datasetsInsert' smart constructor. +data DatasetsInsert = DatasetsInsert + { _diQuotaUser :: !(Maybe Text) + , _diPrettyPrint :: !Bool + , _diUserIp :: !(Maybe Text) + , _diKey :: !(Maybe Text) + , _diProjectId :: !Text + , _diOauthToken :: !(Maybe Text) + , _diFields :: !(Maybe Text) + , _diAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diQuotaUser' +-- +-- * 'diPrettyPrint' +-- +-- * 'diUserIp' +-- +-- * 'diKey' +-- +-- * 'diProjectId' +-- +-- * 'diOauthToken' +-- +-- * 'diFields' +-- +-- * 'diAlt' +datasetsInsert + :: Text -- ^ 'projectId' + -> DatasetsInsert +datasetsInsert pDiProjectId_ = + DatasetsInsert + { _diQuotaUser = Nothing + , _diPrettyPrint = True + , _diUserIp = Nothing + , _diKey = Nothing + , _diProjectId = pDiProjectId_ + , _diOauthToken = Nothing + , _diFields = Nothing + , _diAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +diQuotaUser :: Lens' DatasetsInsert' (Maybe Text) +diQuotaUser + = lens _diQuotaUser (\ s a -> s{_diQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +diPrettyPrint :: Lens' DatasetsInsert' Bool +diPrettyPrint + = lens _diPrettyPrint + (\ s a -> s{_diPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +diUserIp :: Lens' DatasetsInsert' (Maybe Text) +diUserIp = lens _diUserIp (\ s a -> s{_diUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +diKey :: Lens' DatasetsInsert' (Maybe Text) +diKey = lens _diKey (\ s a -> s{_diKey = a}) + +-- | Project ID of the new dataset +diProjectId :: Lens' DatasetsInsert' Text +diProjectId + = lens _diProjectId (\ s a -> s{_diProjectId = a}) + +-- | OAuth 2.0 token for the current user. +diOauthToken :: Lens' DatasetsInsert' (Maybe Text) +diOauthToken + = lens _diOauthToken (\ s a -> s{_diOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +diFields :: Lens' DatasetsInsert' (Maybe Text) +diFields = lens _diFields (\ s a -> s{_diFields = a}) + +-- | Data format for the response. +diAlt :: Lens' DatasetsInsert' Text +diAlt = lens _diAlt (\ s a -> s{_diAlt = a}) + +instance GoogleRequest DatasetsInsert' where + type Rs DatasetsInsert' = Dataset + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsInsert{..} + = go _diQuotaUser _diPrettyPrint _diUserIp _diKey + _diProjectId + _diOauthToken + _diFields + _diAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsInsertAPI) + r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/List.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/List.hs new file mode 100644 index 000000000..00567ad77 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/List.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all datasets in the specified project to which you have been +-- granted the READER dataset role. +-- +-- /See:/ for @BigqueryDatasetsList@. +module BigQuery.Datasets.List + ( + -- * REST Resource + DatasetsListAPI + + -- * Creating a Request + , datasetsList + , DatasetsList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlUserIp + , dlAll + , dlKey + , dlPageToken + , dlProjectId + , dlOauthToken + , dlMaxResults + , dlFields + , dlAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsList@ which the +-- 'DatasetsList' request conforms to. +type DatasetsListAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + QueryParam "all" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DatasetList + +-- | Lists all datasets in the specified project to which you have been +-- granted the READER dataset role. +-- +-- /See:/ 'datasetsList' smart constructor. +data DatasetsList = DatasetsList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlUserIp :: !(Maybe Text) + , _dlAll :: !(Maybe Bool) + , _dlKey :: !(Maybe Text) + , _dlPageToken :: !(Maybe Text) + , _dlProjectId :: !Text + , _dlOauthToken :: !(Maybe Text) + , _dlMaxResults :: !(Maybe Word32) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlUserIp' +-- +-- * 'dlAll' +-- +-- * 'dlKey' +-- +-- * 'dlPageToken' +-- +-- * 'dlProjectId' +-- +-- * 'dlOauthToken' +-- +-- * 'dlMaxResults' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +datasetsList + :: Text -- ^ 'projectId' + -> DatasetsList +datasetsList pDlProjectId_ = + DatasetsList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlUserIp = Nothing + , _dlAll = Nothing + , _dlKey = Nothing + , _dlPageToken = Nothing + , _dlProjectId = pDlProjectId_ + , _dlOauthToken = Nothing + , _dlMaxResults = Nothing + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DatasetsList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DatasetsList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DatasetsList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | Whether to list all datasets, including hidden ones +dlAll :: Lens' DatasetsList' (Maybe Bool) +dlAll = lens _dlAll (\ s a -> s{_dlAll = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DatasetsList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | Page token, returned by a previous call, to request the next page of +-- results +dlPageToken :: Lens' DatasetsList' (Maybe Text) +dlPageToken + = lens _dlPageToken (\ s a -> s{_dlPageToken = a}) + +-- | Project ID of the datasets to be listed +dlProjectId :: Lens' DatasetsList' Text +dlProjectId + = lens _dlProjectId (\ s a -> s{_dlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DatasetsList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | The maximum number of results to return +dlMaxResults :: Lens' DatasetsList' (Maybe Word32) +dlMaxResults + = lens _dlMaxResults (\ s a -> s{_dlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DatasetsList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DatasetsList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DatasetsList' where + type Rs DatasetsList' = DatasetList + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsList{..} + = go _dlQuotaUser _dlPrettyPrint _dlUserIp _dlAll + _dlKey + _dlPageToken + _dlProjectId + _dlOauthToken + _dlMaxResults + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsListAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Patch.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Patch.hs new file mode 100644 index 000000000..61f84b7c6 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Patch.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates information in an existing dataset. The update method replaces +-- the entire dataset resource, whereas the patch method only replaces +-- fields that are provided in the submitted dataset resource. This method +-- supports patch semantics. +-- +-- /See:/ for @BigqueryDatasetsPatch@. +module BigQuery.Datasets.Patch + ( + -- * REST Resource + DatasetsPatchAPI + + -- * Creating a Request + , datasetsPatch + , DatasetsPatch + + -- * Request Lenses + , dpQuotaUser + , dpPrettyPrint + , dpUserIp + , dpKey + , dpDatasetId + , dpProjectId + , dpOauthToken + , dpFields + , dpAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsPatch@ which the +-- 'DatasetsPatch' request conforms to. +type DatasetsPatchAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> Patch '[JSON] Dataset + +-- | Updates information in an existing dataset. The update method replaces +-- the entire dataset resource, whereas the patch method only replaces +-- fields that are provided in the submitted dataset resource. This method +-- supports patch semantics. +-- +-- /See:/ 'datasetsPatch' smart constructor. +data DatasetsPatch = DatasetsPatch + { _dpQuotaUser :: !(Maybe Text) + , _dpPrettyPrint :: !Bool + , _dpUserIp :: !(Maybe Text) + , _dpKey :: !(Maybe Text) + , _dpDatasetId :: !Text + , _dpProjectId :: !Text + , _dpOauthToken :: !(Maybe Text) + , _dpFields :: !(Maybe Text) + , _dpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpQuotaUser' +-- +-- * 'dpPrettyPrint' +-- +-- * 'dpUserIp' +-- +-- * 'dpKey' +-- +-- * 'dpDatasetId' +-- +-- * 'dpProjectId' +-- +-- * 'dpOauthToken' +-- +-- * 'dpFields' +-- +-- * 'dpAlt' +datasetsPatch + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> DatasetsPatch +datasetsPatch pDpDatasetId_ pDpProjectId_ = + DatasetsPatch + { _dpQuotaUser = Nothing + , _dpPrettyPrint = True + , _dpUserIp = Nothing + , _dpKey = Nothing + , _dpDatasetId = pDpDatasetId_ + , _dpProjectId = pDpProjectId_ + , _dpOauthToken = Nothing + , _dpFields = Nothing + , _dpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dpQuotaUser :: Lens' DatasetsPatch' (Maybe Text) +dpQuotaUser + = lens _dpQuotaUser (\ s a -> s{_dpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dpPrettyPrint :: Lens' DatasetsPatch' Bool +dpPrettyPrint + = lens _dpPrettyPrint + (\ s a -> s{_dpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dpUserIp :: Lens' DatasetsPatch' (Maybe Text) +dpUserIp = lens _dpUserIp (\ s a -> s{_dpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dpKey :: Lens' DatasetsPatch' (Maybe Text) +dpKey = lens _dpKey (\ s a -> s{_dpKey = a}) + +-- | Dataset ID of the dataset being updated +dpDatasetId :: Lens' DatasetsPatch' Text +dpDatasetId + = lens _dpDatasetId (\ s a -> s{_dpDatasetId = a}) + +-- | Project ID of the dataset being updated +dpProjectId :: Lens' DatasetsPatch' Text +dpProjectId + = lens _dpProjectId (\ s a -> s{_dpProjectId = a}) + +-- | OAuth 2.0 token for the current user. +dpOauthToken :: Lens' DatasetsPatch' (Maybe Text) +dpOauthToken + = lens _dpOauthToken (\ s a -> s{_dpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dpFields :: Lens' DatasetsPatch' (Maybe Text) +dpFields = lens _dpFields (\ s a -> s{_dpFields = a}) + +-- | Data format for the response. +dpAlt :: Lens' DatasetsPatch' Text +dpAlt = lens _dpAlt (\ s a -> s{_dpAlt = a}) + +instance GoogleRequest DatasetsPatch' where + type Rs DatasetsPatch' = Dataset + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsPatch{..} + = go _dpQuotaUser _dpPrettyPrint _dpUserIp _dpKey + _dpDatasetId + _dpProjectId + _dpOauthToken + _dpFields + _dpAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsPatchAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Update.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Update.hs new file mode 100644 index 000000000..d6bc85e25 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Datasets/Update.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Datasets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates information in an existing dataset. The update method replaces +-- the entire dataset resource, whereas the patch method only replaces +-- fields that are provided in the submitted dataset resource. +-- +-- /See:/ for @BigqueryDatasetsUpdate@. +module BigQuery.Datasets.Update + ( + -- * REST Resource + DatasetsUpdateAPI + + -- * Creating a Request + , datasetsUpdate + , DatasetsUpdate + + -- * Request Lenses + , duQuotaUser + , duPrettyPrint + , duUserIp + , duKey + , duDatasetId + , duProjectId + , duOauthToken + , duFields + , duAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryDatasetsUpdate@ which the +-- 'DatasetsUpdate' request conforms to. +type DatasetsUpdateAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> Put '[JSON] Dataset + +-- | Updates information in an existing dataset. The update method replaces +-- the entire dataset resource, whereas the patch method only replaces +-- fields that are provided in the submitted dataset resource. +-- +-- /See:/ 'datasetsUpdate' smart constructor. +data DatasetsUpdate = DatasetsUpdate + { _duQuotaUser :: !(Maybe Text) + , _duPrettyPrint :: !Bool + , _duUserIp :: !(Maybe Text) + , _duKey :: !(Maybe Text) + , _duDatasetId :: !Text + , _duProjectId :: !Text + , _duOauthToken :: !(Maybe Text) + , _duFields :: !(Maybe Text) + , _duAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'duQuotaUser' +-- +-- * 'duPrettyPrint' +-- +-- * 'duUserIp' +-- +-- * 'duKey' +-- +-- * 'duDatasetId' +-- +-- * 'duProjectId' +-- +-- * 'duOauthToken' +-- +-- * 'duFields' +-- +-- * 'duAlt' +datasetsUpdate + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> DatasetsUpdate +datasetsUpdate pDuDatasetId_ pDuProjectId_ = + DatasetsUpdate + { _duQuotaUser = Nothing + , _duPrettyPrint = True + , _duUserIp = Nothing + , _duKey = Nothing + , _duDatasetId = pDuDatasetId_ + , _duProjectId = pDuProjectId_ + , _duOauthToken = Nothing + , _duFields = Nothing + , _duAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +duQuotaUser :: Lens' DatasetsUpdate' (Maybe Text) +duQuotaUser + = lens _duQuotaUser (\ s a -> s{_duQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +duPrettyPrint :: Lens' DatasetsUpdate' Bool +duPrettyPrint + = lens _duPrettyPrint + (\ s a -> s{_duPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +duUserIp :: Lens' DatasetsUpdate' (Maybe Text) +duUserIp = lens _duUserIp (\ s a -> s{_duUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +duKey :: Lens' DatasetsUpdate' (Maybe Text) +duKey = lens _duKey (\ s a -> s{_duKey = a}) + +-- | Dataset ID of the dataset being updated +duDatasetId :: Lens' DatasetsUpdate' Text +duDatasetId + = lens _duDatasetId (\ s a -> s{_duDatasetId = a}) + +-- | Project ID of the dataset being updated +duProjectId :: Lens' DatasetsUpdate' Text +duProjectId + = lens _duProjectId (\ s a -> s{_duProjectId = a}) + +-- | OAuth 2.0 token for the current user. +duOauthToken :: Lens' DatasetsUpdate' (Maybe Text) +duOauthToken + = lens _duOauthToken (\ s a -> s{_duOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +duFields :: Lens' DatasetsUpdate' (Maybe Text) +duFields = lens _duFields (\ s a -> s{_duFields = a}) + +-- | Data format for the response. +duAlt :: Lens' DatasetsUpdate' Text +duAlt = lens _duAlt (\ s a -> s{_duAlt = a}) + +instance GoogleRequest DatasetsUpdate' where + type Rs DatasetsUpdate' = Dataset + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u DatasetsUpdate{..} + = go _duQuotaUser _duPrettyPrint _duUserIp _duKey + _duDatasetId + _duProjectId + _duOauthToken + _duFields + _duAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsUpdateAPI) + r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs new file mode 100644 index 000000000..0a240baaf --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Requests that a job be cancelled. This call will return immediately, and +-- the client will need to poll for the job status to see if the cancel +-- completed successfully. Cancelled jobs may still incur costs. +-- +-- /See:/ for @BigqueryJobsCancel@. +module BigQuery.Jobs.Cancel + ( + -- * REST Resource + JobsCancelAPI + + -- * Creating a Request + , jobsCancel + , JobsCancel + + -- * Request Lenses + , jcQuotaUser + , jcPrettyPrint + , jcJobId + , jcUserIp + , jcKey + , jcProjectId + , jcOauthToken + , jcFields + , jcAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsCancel@ which the +-- 'JobsCancel' request conforms to. +type JobsCancelAPI = + "project" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + "cancel" :> Post '[JSON] JobCancelResponse + +-- | Requests that a job be cancelled. This call will return immediately, and +-- the client will need to poll for the job status to see if the cancel +-- completed successfully. Cancelled jobs may still incur costs. +-- +-- /See:/ 'jobsCancel' smart constructor. +data JobsCancel = JobsCancel + { _jcQuotaUser :: !(Maybe Text) + , _jcPrettyPrint :: !Bool + , _jcJobId :: !Text + , _jcUserIp :: !(Maybe Text) + , _jcKey :: !(Maybe Text) + , _jcProjectId :: !Text + , _jcOauthToken :: !(Maybe Text) + , _jcFields :: !(Maybe Text) + , _jcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcQuotaUser' +-- +-- * 'jcPrettyPrint' +-- +-- * 'jcJobId' +-- +-- * 'jcUserIp' +-- +-- * 'jcKey' +-- +-- * 'jcProjectId' +-- +-- * 'jcOauthToken' +-- +-- * 'jcFields' +-- +-- * 'jcAlt' +jobsCancel + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> JobsCancel +jobsCancel pJcJobId_ pJcProjectId_ = + JobsCancel + { _jcQuotaUser = Nothing + , _jcPrettyPrint = True + , _jcJobId = pJcJobId_ + , _jcUserIp = Nothing + , _jcKey = Nothing + , _jcProjectId = pJcProjectId_ + , _jcOauthToken = Nothing + , _jcFields = Nothing + , _jcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jcQuotaUser :: Lens' JobsCancel' (Maybe Text) +jcQuotaUser + = lens _jcQuotaUser (\ s a -> s{_jcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jcPrettyPrint :: Lens' JobsCancel' Bool +jcPrettyPrint + = lens _jcPrettyPrint + (\ s a -> s{_jcPrettyPrint = a}) + +-- | Job ID of the job to cancel +jcJobId :: Lens' JobsCancel' Text +jcJobId = lens _jcJobId (\ s a -> s{_jcJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jcUserIp :: Lens' JobsCancel' (Maybe Text) +jcUserIp = lens _jcUserIp (\ s a -> s{_jcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jcKey :: Lens' JobsCancel' (Maybe Text) +jcKey = lens _jcKey (\ s a -> s{_jcKey = a}) + +-- | Project ID of the job to cancel +jcProjectId :: Lens' JobsCancel' Text +jcProjectId + = lens _jcProjectId (\ s a -> s{_jcProjectId = a}) + +-- | OAuth 2.0 token for the current user. +jcOauthToken :: Lens' JobsCancel' (Maybe Text) +jcOauthToken + = lens _jcOauthToken (\ s a -> s{_jcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jcFields :: Lens' JobsCancel' (Maybe Text) +jcFields = lens _jcFields (\ s a -> s{_jcFields = a}) + +-- | Data format for the response. +jcAlt :: Lens' JobsCancel' Text +jcAlt = lens _jcAlt (\ s a -> s{_jcAlt = a}) + +instance GoogleRequest JobsCancel' where + type Rs JobsCancel' = JobCancelResponse + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsCancel{..} + = go _jcQuotaUser _jcPrettyPrint _jcJobId _jcUserIp + _jcKey + _jcProjectId + _jcOauthToken + _jcFields + _jcAlt + where go + = clientWithRoute (Proxy :: Proxy JobsCancelAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Get.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Get.hs new file mode 100644 index 000000000..581fcbcc7 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns information about a specific job. Job information is available +-- for a six month period after creation. Requires that you\'re the person +-- who ran the job, or have the Is Owner project role. +-- +-- /See:/ for @BigqueryJobsGet@. +module BigQuery.Jobs.Get + ( + -- * REST Resource + JobsGetAPI + + -- * Creating a Request + , jobsGet + , JobsGet + + -- * Request Lenses + , jgQuotaUser + , jgPrettyPrint + , jgJobId + , jgUserIp + , jgKey + , jgProjectId + , jgOauthToken + , jgFields + , jgAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsGet@ which the +-- 'JobsGet' request conforms to. +type JobsGetAPI = + "projects" :> + Capture "projectId" Text :> + "jobs" :> Capture "jobId" Text :> Get '[JSON] Job + +-- | Returns information about a specific job. Job information is available +-- for a six month period after creation. Requires that you\'re the person +-- who ran the job, or have the Is Owner project role. +-- +-- /See:/ 'jobsGet' smart constructor. +data JobsGet = JobsGet + { _jgQuotaUser :: !(Maybe Text) + , _jgPrettyPrint :: !Bool + , _jgJobId :: !Text + , _jgUserIp :: !(Maybe Text) + , _jgKey :: !(Maybe Text) + , _jgProjectId :: !Text + , _jgOauthToken :: !(Maybe Text) + , _jgFields :: !(Maybe Text) + , _jgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jgQuotaUser' +-- +-- * 'jgPrettyPrint' +-- +-- * 'jgJobId' +-- +-- * 'jgUserIp' +-- +-- * 'jgKey' +-- +-- * 'jgProjectId' +-- +-- * 'jgOauthToken' +-- +-- * 'jgFields' +-- +-- * 'jgAlt' +jobsGet + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> JobsGet +jobsGet pJgJobId_ pJgProjectId_ = + JobsGet + { _jgQuotaUser = Nothing + , _jgPrettyPrint = True + , _jgJobId = pJgJobId_ + , _jgUserIp = Nothing + , _jgKey = Nothing + , _jgProjectId = pJgProjectId_ + , _jgOauthToken = Nothing + , _jgFields = Nothing + , _jgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jgQuotaUser :: Lens' JobsGet' (Maybe Text) +jgQuotaUser + = lens _jgQuotaUser (\ s a -> s{_jgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jgPrettyPrint :: Lens' JobsGet' Bool +jgPrettyPrint + = lens _jgPrettyPrint + (\ s a -> s{_jgPrettyPrint = a}) + +-- | Job ID of the requested job +jgJobId :: Lens' JobsGet' Text +jgJobId = lens _jgJobId (\ s a -> s{_jgJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jgUserIp :: Lens' JobsGet' (Maybe Text) +jgUserIp = lens _jgUserIp (\ s a -> s{_jgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jgKey :: Lens' JobsGet' (Maybe Text) +jgKey = lens _jgKey (\ s a -> s{_jgKey = a}) + +-- | Project ID of the requested job +jgProjectId :: Lens' JobsGet' Text +jgProjectId + = lens _jgProjectId (\ s a -> s{_jgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +jgOauthToken :: Lens' JobsGet' (Maybe Text) +jgOauthToken + = lens _jgOauthToken (\ s a -> s{_jgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jgFields :: Lens' JobsGet' (Maybe Text) +jgFields = lens _jgFields (\ s a -> s{_jgFields = a}) + +-- | Data format for the response. +jgAlt :: Lens' JobsGet' Text +jgAlt = lens _jgAlt (\ s a -> s{_jgAlt = a}) + +instance GoogleRequest JobsGet' where + type Rs JobsGet' = Job + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsGet{..} + = go _jgQuotaUser _jgPrettyPrint _jgJobId _jgUserIp + _jgKey + _jgProjectId + _jgOauthToken + _jgFields + _jgAlt + where go + = clientWithRoute (Proxy :: Proxy JobsGetAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/GetQueryResults.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/GetQueryResults.hs new file mode 100644 index 000000000..82d23312a --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/GetQueryResults.hs @@ -0,0 +1,231 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.GetQueryResults +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the results of a query job. +-- +-- /See:/ for @BigqueryJobsGetQueryResults@. +module BigQuery.Jobs.GetQueryResults + ( + -- * REST Resource + JobsGetQueryResultsAPI + + -- * Creating a Request + , jobsGetQueryResults + , JobsGetQueryResults + + -- * Request Lenses + , jgqrQuotaUser + , jgqrPrettyPrint + , jgqrJobId + , jgqrUserIp + , jgqrKey + , jgqrTimeoutMs + , jgqrPageToken + , jgqrProjectId + , jgqrOauthToken + , jgqrStartIndex + , jgqrMaxResults + , jgqrFields + , jgqrAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsGetQueryResults@ which the +-- 'JobsGetQueryResults' request conforms to. +type JobsGetQueryResultsAPI = + "projects" :> + Capture "projectId" Text :> + "queries" :> + Capture "jobId" Text :> + QueryParam "timeoutMs" Word32 :> + QueryParam "pageToken" Text :> + QueryParam "startIndex" Word64 :> + QueryParam "maxResults" Word32 :> + Get '[JSON] GetQueryResultsResponse + +-- | Retrieves the results of a query job. +-- +-- /See:/ 'jobsGetQueryResults' smart constructor. +data JobsGetQueryResults = JobsGetQueryResults + { _jgqrQuotaUser :: !(Maybe Text) + , _jgqrPrettyPrint :: !Bool + , _jgqrJobId :: !Text + , _jgqrUserIp :: !(Maybe Text) + , _jgqrKey :: !(Maybe Text) + , _jgqrTimeoutMs :: !(Maybe Word32) + , _jgqrPageToken :: !(Maybe Text) + , _jgqrProjectId :: !Text + , _jgqrOauthToken :: !(Maybe Text) + , _jgqrStartIndex :: !(Maybe Word64) + , _jgqrMaxResults :: !(Maybe Word32) + , _jgqrFields :: !(Maybe Text) + , _jgqrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsGetQueryResults'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jgqrQuotaUser' +-- +-- * 'jgqrPrettyPrint' +-- +-- * 'jgqrJobId' +-- +-- * 'jgqrUserIp' +-- +-- * 'jgqrKey' +-- +-- * 'jgqrTimeoutMs' +-- +-- * 'jgqrPageToken' +-- +-- * 'jgqrProjectId' +-- +-- * 'jgqrOauthToken' +-- +-- * 'jgqrStartIndex' +-- +-- * 'jgqrMaxResults' +-- +-- * 'jgqrFields' +-- +-- * 'jgqrAlt' +jobsGetQueryResults + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> JobsGetQueryResults +jobsGetQueryResults pJgqrJobId_ pJgqrProjectId_ = + JobsGetQueryResults + { _jgqrQuotaUser = Nothing + , _jgqrPrettyPrint = True + , _jgqrJobId = pJgqrJobId_ + , _jgqrUserIp = Nothing + , _jgqrKey = Nothing + , _jgqrTimeoutMs = Nothing + , _jgqrPageToken = Nothing + , _jgqrProjectId = pJgqrProjectId_ + , _jgqrOauthToken = Nothing + , _jgqrStartIndex = Nothing + , _jgqrMaxResults = Nothing + , _jgqrFields = Nothing + , _jgqrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jgqrQuotaUser :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrQuotaUser + = lens _jgqrQuotaUser + (\ s a -> s{_jgqrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jgqrPrettyPrint :: Lens' JobsGetQueryResults' Bool +jgqrPrettyPrint + = lens _jgqrPrettyPrint + (\ s a -> s{_jgqrPrettyPrint = a}) + +-- | Job ID of the query job +jgqrJobId :: Lens' JobsGetQueryResults' Text +jgqrJobId + = lens _jgqrJobId (\ s a -> s{_jgqrJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jgqrUserIp :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrUserIp + = lens _jgqrUserIp (\ s a -> s{_jgqrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jgqrKey :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrKey = lens _jgqrKey (\ s a -> s{_jgqrKey = a}) + +-- | How long to wait for the query to complete, in milliseconds, before +-- returning. Default is 10 seconds. If the timeout passes before the job +-- completes, the \'jobComplete\' field in the response will be false +jgqrTimeoutMs :: Lens' JobsGetQueryResults' (Maybe Word32) +jgqrTimeoutMs + = lens _jgqrTimeoutMs + (\ s a -> s{_jgqrTimeoutMs = a}) + +-- | Page token, returned by a previous call, to request the next page of +-- results +jgqrPageToken :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrPageToken + = lens _jgqrPageToken + (\ s a -> s{_jgqrPageToken = a}) + +-- | Project ID of the query job +jgqrProjectId :: Lens' JobsGetQueryResults' Text +jgqrProjectId + = lens _jgqrProjectId + (\ s a -> s{_jgqrProjectId = a}) + +-- | OAuth 2.0 token for the current user. +jgqrOauthToken :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrOauthToken + = lens _jgqrOauthToken + (\ s a -> s{_jgqrOauthToken = a}) + +-- | Zero-based index of the starting row +jgqrStartIndex :: Lens' JobsGetQueryResults' (Maybe Word64) +jgqrStartIndex + = lens _jgqrStartIndex + (\ s a -> s{_jgqrStartIndex = a}) + +-- | Maximum number of results to read +jgqrMaxResults :: Lens' JobsGetQueryResults' (Maybe Word32) +jgqrMaxResults + = lens _jgqrMaxResults + (\ s a -> s{_jgqrMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +jgqrFields :: Lens' JobsGetQueryResults' (Maybe Text) +jgqrFields + = lens _jgqrFields (\ s a -> s{_jgqrFields = a}) + +-- | Data format for the response. +jgqrAlt :: Lens' JobsGetQueryResults' Text +jgqrAlt = lens _jgqrAlt (\ s a -> s{_jgqrAlt = a}) + +instance GoogleRequest JobsGetQueryResults' where + type Rs JobsGetQueryResults' = + GetQueryResultsResponse + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsGetQueryResults{..} + = go _jgqrQuotaUser _jgqrPrettyPrint _jgqrJobId + _jgqrUserIp + _jgqrKey + _jgqrTimeoutMs + _jgqrPageToken + _jgqrProjectId + _jgqrOauthToken + _jgqrStartIndex + _jgqrMaxResults + _jgqrFields + _jgqrAlt + where go + = clientWithRoute + (Proxy :: Proxy JobsGetQueryResultsAPI) + r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Insert.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Insert.hs new file mode 100644 index 000000000..cb7043588 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Insert.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Starts a new asynchronous job. Requires the Can View project role. +-- +-- /See:/ for @BigqueryJobsInsert@. +module BigQuery.Jobs.Insert + ( + -- * REST Resource + JobsInsertAPI + + -- * Creating a Request + , jobsInsert + , JobsInsert + + -- * Request Lenses + , jiQuotaUser + , jiPrettyPrint + , jiUserIp + , jiKey + , jiProjectId + , jiOauthToken + , jiFields + , jiAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsInsert@ which the +-- 'JobsInsert' request conforms to. +type JobsInsertAPI = + "projects" :> + Capture "projectId" Text :> + "jobs" :> Post '[JSON] Job + +-- | Starts a new asynchronous job. Requires the Can View project role. +-- +-- /See:/ 'jobsInsert' smart constructor. +data JobsInsert = JobsInsert + { _jiQuotaUser :: !(Maybe Text) + , _jiPrettyPrint :: !Bool + , _jiUserIp :: !(Maybe Text) + , _jiKey :: !(Maybe Text) + , _jiProjectId :: !Text + , _jiOauthToken :: !(Maybe Text) + , _jiFields :: !(Maybe Text) + , _jiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jiQuotaUser' +-- +-- * 'jiPrettyPrint' +-- +-- * 'jiUserIp' +-- +-- * 'jiKey' +-- +-- * 'jiProjectId' +-- +-- * 'jiOauthToken' +-- +-- * 'jiFields' +-- +-- * 'jiAlt' +jobsInsert + :: Text -- ^ 'projectId' + -> JobsInsert +jobsInsert pJiProjectId_ = + JobsInsert + { _jiQuotaUser = Nothing + , _jiPrettyPrint = True + , _jiUserIp = Nothing + , _jiKey = Nothing + , _jiProjectId = pJiProjectId_ + , _jiOauthToken = Nothing + , _jiFields = Nothing + , _jiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jiQuotaUser :: Lens' JobsInsert' (Maybe Text) +jiQuotaUser + = lens _jiQuotaUser (\ s a -> s{_jiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jiPrettyPrint :: Lens' JobsInsert' Bool +jiPrettyPrint + = lens _jiPrettyPrint + (\ s a -> s{_jiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jiUserIp :: Lens' JobsInsert' (Maybe Text) +jiUserIp = lens _jiUserIp (\ s a -> s{_jiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jiKey :: Lens' JobsInsert' (Maybe Text) +jiKey = lens _jiKey (\ s a -> s{_jiKey = a}) + +-- | Project ID of the project that will be billed for the job +jiProjectId :: Lens' JobsInsert' Text +jiProjectId + = lens _jiProjectId (\ s a -> s{_jiProjectId = a}) + +-- | OAuth 2.0 token for the current user. +jiOauthToken :: Lens' JobsInsert' (Maybe Text) +jiOauthToken + = lens _jiOauthToken (\ s a -> s{_jiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jiFields :: Lens' JobsInsert' (Maybe Text) +jiFields = lens _jiFields (\ s a -> s{_jiFields = a}) + +-- | Data format for the response. +jiAlt :: Lens' JobsInsert' Text +jiAlt = lens _jiAlt (\ s a -> s{_jiAlt = a}) + +instance GoogleRequest JobsInsert' where + type Rs JobsInsert' = Job + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsInsert{..} + = go _jiQuotaUser _jiPrettyPrint _jiUserIp _jiKey + _jiProjectId + _jiOauthToken + _jiFields + _jiAlt + where go + = clientWithRoute (Proxy :: Proxy JobsInsertAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/List.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/List.hs new file mode 100644 index 000000000..252623f51 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/List.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all jobs that you started in the specified project. Job +-- information is available for a six month period after creation. The job +-- list is sorted in reverse chronological order, by job creation time. +-- Requires the Can View project role, or the Is Owner project role if you +-- set the allUsers property. +-- +-- /See:/ for @BigqueryJobsList@. +module BigQuery.Jobs.List + ( + -- * REST Resource + JobsListAPI + + -- * Creating a Request + , jobsList + , JobsList + + -- * Request Lenses + , jlQuotaUser + , jlPrettyPrint + , jlUserIp + , jlKey + , jlStateFilter + , jlProjection + , jlPageToken + , jlProjectId + , jlAllUsers + , jlOauthToken + , jlMaxResults + , jlFields + , jlAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsList@ which the +-- 'JobsList' request conforms to. +type JobsListAPI = + "projects" :> + Capture "projectId" Text :> + "jobs" :> + QueryParams "stateFilter" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "allUsers" Bool :> + QueryParam "maxResults" Word32 :> Get '[JSON] JobList + +-- | Lists all jobs that you started in the specified project. Job +-- information is available for a six month period after creation. The job +-- list is sorted in reverse chronological order, by job creation time. +-- Requires the Can View project role, or the Is Owner project role if you +-- set the allUsers property. +-- +-- /See:/ 'jobsList' smart constructor. +data JobsList = JobsList + { _jlQuotaUser :: !(Maybe Text) + , _jlPrettyPrint :: !Bool + , _jlUserIp :: !(Maybe Text) + , _jlKey :: !(Maybe Text) + , _jlStateFilter :: !(Maybe Text) + , _jlProjection :: !(Maybe Text) + , _jlPageToken :: !(Maybe Text) + , _jlProjectId :: !Text + , _jlAllUsers :: !(Maybe Bool) + , _jlOauthToken :: !(Maybe Text) + , _jlMaxResults :: !(Maybe Word32) + , _jlFields :: !(Maybe Text) + , _jlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jlQuotaUser' +-- +-- * 'jlPrettyPrint' +-- +-- * 'jlUserIp' +-- +-- * 'jlKey' +-- +-- * 'jlStateFilter' +-- +-- * 'jlProjection' +-- +-- * 'jlPageToken' +-- +-- * 'jlProjectId' +-- +-- * 'jlAllUsers' +-- +-- * 'jlOauthToken' +-- +-- * 'jlMaxResults' +-- +-- * 'jlFields' +-- +-- * 'jlAlt' +jobsList + :: Text -- ^ 'projectId' + -> JobsList +jobsList pJlProjectId_ = + JobsList + { _jlQuotaUser = Nothing + , _jlPrettyPrint = True + , _jlUserIp = Nothing + , _jlKey = Nothing + , _jlStateFilter = Nothing + , _jlProjection = Nothing + , _jlPageToken = Nothing + , _jlProjectId = pJlProjectId_ + , _jlAllUsers = Nothing + , _jlOauthToken = Nothing + , _jlMaxResults = Nothing + , _jlFields = Nothing + , _jlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jlQuotaUser :: Lens' JobsList' (Maybe Text) +jlQuotaUser + = lens _jlQuotaUser (\ s a -> s{_jlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jlPrettyPrint :: Lens' JobsList' Bool +jlPrettyPrint + = lens _jlPrettyPrint + (\ s a -> s{_jlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jlUserIp :: Lens' JobsList' (Maybe Text) +jlUserIp = lens _jlUserIp (\ s a -> s{_jlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jlKey :: Lens' JobsList' (Maybe Text) +jlKey = lens _jlKey (\ s a -> s{_jlKey = a}) + +-- | Filter for job state +jlStateFilter :: Lens' JobsList' (Maybe Text) +jlStateFilter + = lens _jlStateFilter + (\ s a -> s{_jlStateFilter = a}) + +-- | Restrict information returned to a set of selected fields +jlProjection :: Lens' JobsList' (Maybe Text) +jlProjection + = lens _jlProjection (\ s a -> s{_jlProjection = a}) + +-- | Page token, returned by a previous call, to request the next page of +-- results +jlPageToken :: Lens' JobsList' (Maybe Text) +jlPageToken + = lens _jlPageToken (\ s a -> s{_jlPageToken = a}) + +-- | Project ID of the jobs to list +jlProjectId :: Lens' JobsList' Text +jlProjectId + = lens _jlProjectId (\ s a -> s{_jlProjectId = a}) + +-- | Whether to display jobs owned by all users in the project. Default false +jlAllUsers :: Lens' JobsList' (Maybe Bool) +jlAllUsers + = lens _jlAllUsers (\ s a -> s{_jlAllUsers = a}) + +-- | OAuth 2.0 token for the current user. +jlOauthToken :: Lens' JobsList' (Maybe Text) +jlOauthToken + = lens _jlOauthToken (\ s a -> s{_jlOauthToken = a}) + +-- | Maximum number of results to return +jlMaxResults :: Lens' JobsList' (Maybe Word32) +jlMaxResults + = lens _jlMaxResults (\ s a -> s{_jlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +jlFields :: Lens' JobsList' (Maybe Text) +jlFields = lens _jlFields (\ s a -> s{_jlFields = a}) + +-- | Data format for the response. +jlAlt :: Lens' JobsList' Text +jlAlt = lens _jlAlt (\ s a -> s{_jlAlt = a}) + +instance GoogleRequest JobsList' where + type Rs JobsList' = JobList + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsList{..} + = go _jlQuotaUser _jlPrettyPrint _jlUserIp _jlKey + _jlStateFilter + _jlProjection + _jlPageToken + _jlProjectId + _jlAllUsers + _jlOauthToken + _jlMaxResults + _jlFields + _jlAlt + where go + = clientWithRoute (Proxy :: Proxy JobsListAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Query.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Query.hs new file mode 100644 index 000000000..aa0ed8f7a --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Query.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Jobs.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Runs a BigQuery SQL query synchronously and returns query results if the +-- query completes within a specified timeout. +-- +-- /See:/ for @BigqueryJobsQuery@. +module BigQuery.Jobs.Query + ( + -- * REST Resource + JobsQueryAPI + + -- * Creating a Request + , jobsQuery + , JobsQuery + + -- * Request Lenses + , jqQuotaUser + , jqPrettyPrint + , jqUserIp + , jqKey + , jqProjectId + , jqOauthToken + , jqFields + , jqAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryJobsQuery@ which the +-- 'JobsQuery' request conforms to. +type JobsQueryAPI = + "projects" :> + Capture "projectId" Text :> + "queries" :> Post '[JSON] QueryResponse + +-- | Runs a BigQuery SQL query synchronously and returns query results if the +-- query completes within a specified timeout. +-- +-- /See:/ 'jobsQuery' smart constructor. +data JobsQuery = JobsQuery + { _jqQuotaUser :: !(Maybe Text) + , _jqPrettyPrint :: !Bool + , _jqUserIp :: !(Maybe Text) + , _jqKey :: !(Maybe Text) + , _jqProjectId :: !Text + , _jqOauthToken :: !(Maybe Text) + , _jqFields :: !(Maybe Text) + , _jqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jqQuotaUser' +-- +-- * 'jqPrettyPrint' +-- +-- * 'jqUserIp' +-- +-- * 'jqKey' +-- +-- * 'jqProjectId' +-- +-- * 'jqOauthToken' +-- +-- * 'jqFields' +-- +-- * 'jqAlt' +jobsQuery + :: Text -- ^ 'projectId' + -> JobsQuery +jobsQuery pJqProjectId_ = + JobsQuery + { _jqQuotaUser = Nothing + , _jqPrettyPrint = True + , _jqUserIp = Nothing + , _jqKey = Nothing + , _jqProjectId = pJqProjectId_ + , _jqOauthToken = Nothing + , _jqFields = Nothing + , _jqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jqQuotaUser :: Lens' JobsQuery' (Maybe Text) +jqQuotaUser + = lens _jqQuotaUser (\ s a -> s{_jqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jqPrettyPrint :: Lens' JobsQuery' Bool +jqPrettyPrint + = lens _jqPrettyPrint + (\ s a -> s{_jqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jqUserIp :: Lens' JobsQuery' (Maybe Text) +jqUserIp = lens _jqUserIp (\ s a -> s{_jqUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jqKey :: Lens' JobsQuery' (Maybe Text) +jqKey = lens _jqKey (\ s a -> s{_jqKey = a}) + +-- | Project ID of the project billed for the query +jqProjectId :: Lens' JobsQuery' Text +jqProjectId + = lens _jqProjectId (\ s a -> s{_jqProjectId = a}) + +-- | OAuth 2.0 token for the current user. +jqOauthToken :: Lens' JobsQuery' (Maybe Text) +jqOauthToken + = lens _jqOauthToken (\ s a -> s{_jqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jqFields :: Lens' JobsQuery' (Maybe Text) +jqFields = lens _jqFields (\ s a -> s{_jqFields = a}) + +-- | Data format for the response. +jqAlt :: Lens' JobsQuery' Text +jqAlt = lens _jqAlt (\ s a -> s{_jqAlt = a}) + +instance GoogleRequest JobsQuery' where + type Rs JobsQuery' = QueryResponse + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u JobsQuery{..} + = go _jqQuotaUser _jqPrettyPrint _jqUserIp _jqKey + _jqProjectId + _jqOauthToken + _jqFields + _jqAlt + where go + = clientWithRoute (Proxy :: Proxy JobsQueryAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Projects/List.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Projects/List.hs new file mode 100644 index 000000000..5a2de23dd --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Projects/List.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Projects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all projects to which you have been granted any project role. +-- +-- /See:/ for @BigqueryProjectsList@. +module BigQuery.Projects.List + ( + -- * REST Resource + ProjectsListAPI + + -- * Creating a Request + , projectsList + , ProjectsList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plKey + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryProjectsList@ which the +-- 'ProjectsList' request conforms to. +type ProjectsListAPI = + "projects" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ProjectList + +-- | Lists all projects to which you have been granted any project role. +-- +-- /See:/ 'projectsList' smart constructor. +data ProjectsList = ProjectsList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !(Maybe Word32) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plKey' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +projectsList + :: ProjectsList +projectsList = + ProjectsList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plKey = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' ProjectsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' ProjectsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' ProjectsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' ProjectsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | Page token, returned by a previous call, to request the next page of +-- results +plPageToken :: Lens' ProjectsList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' ProjectsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Maximum number of results to return +plMaxResults :: Lens' ProjectsList' (Maybe Word32) +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' ProjectsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' ProjectsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest ProjectsList' where + type Rs ProjectsList' = ProjectList + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u ProjectsList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp _plKey + _plPageToken + _plOauthToken + _plMaxResults + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsListAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/InsertAll.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/InsertAll.hs new file mode 100644 index 000000000..757b85f49 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/InsertAll.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tabledata.InsertAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Streams data into BigQuery one record at a time without needing to run a +-- load job. Requires the WRITER dataset role. +-- +-- /See:/ for @BigqueryTabledataInsertAll@. +module BigQuery.Tabledata.InsertAll + ( + -- * REST Resource + TabledataInsertAllAPI + + -- * Creating a Request + , tabledataInsertAll + , TabledataInsertAll + + -- * Request Lenses + , tiaQuotaUser + , tiaPrettyPrint + , tiaUserIp + , tiaKey + , tiaDatasetId + , tiaProjectId + , tiaOauthToken + , tiaTableId + , tiaFields + , tiaAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTabledataInsertAll@ which the +-- 'TabledataInsertAll' request conforms to. +type TabledataInsertAllAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> + "insertAll" :> + Post '[JSON] TableDataInsertAllResponse + +-- | Streams data into BigQuery one record at a time without needing to run a +-- load job. Requires the WRITER dataset role. +-- +-- /See:/ 'tabledataInsertAll' smart constructor. +data TabledataInsertAll = TabledataInsertAll + { _tiaQuotaUser :: !(Maybe Text) + , _tiaPrettyPrint :: !Bool + , _tiaUserIp :: !(Maybe Text) + , _tiaKey :: !(Maybe Text) + , _tiaDatasetId :: !Text + , _tiaProjectId :: !Text + , _tiaOauthToken :: !(Maybe Text) + , _tiaTableId :: !Text + , _tiaFields :: !(Maybe Text) + , _tiaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TabledataInsertAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiaQuotaUser' +-- +-- * 'tiaPrettyPrint' +-- +-- * 'tiaUserIp' +-- +-- * 'tiaKey' +-- +-- * 'tiaDatasetId' +-- +-- * 'tiaProjectId' +-- +-- * 'tiaOauthToken' +-- +-- * 'tiaTableId' +-- +-- * 'tiaFields' +-- +-- * 'tiaAlt' +tabledataInsertAll + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TabledataInsertAll +tabledataInsertAll pTiaDatasetId_ pTiaProjectId_ pTiaTableId_ = + TabledataInsertAll + { _tiaQuotaUser = Nothing + , _tiaPrettyPrint = True + , _tiaUserIp = Nothing + , _tiaKey = Nothing + , _tiaDatasetId = pTiaDatasetId_ + , _tiaProjectId = pTiaProjectId_ + , _tiaOauthToken = Nothing + , _tiaTableId = pTiaTableId_ + , _tiaFields = Nothing + , _tiaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiaQuotaUser :: Lens' TabledataInsertAll' (Maybe Text) +tiaQuotaUser + = lens _tiaQuotaUser (\ s a -> s{_tiaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiaPrettyPrint :: Lens' TabledataInsertAll' Bool +tiaPrettyPrint + = lens _tiaPrettyPrint + (\ s a -> s{_tiaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiaUserIp :: Lens' TabledataInsertAll' (Maybe Text) +tiaUserIp + = lens _tiaUserIp (\ s a -> s{_tiaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiaKey :: Lens' TabledataInsertAll' (Maybe Text) +tiaKey = lens _tiaKey (\ s a -> s{_tiaKey = a}) + +-- | Dataset ID of the destination table. +tiaDatasetId :: Lens' TabledataInsertAll' Text +tiaDatasetId + = lens _tiaDatasetId (\ s a -> s{_tiaDatasetId = a}) + +-- | Project ID of the destination table. +tiaProjectId :: Lens' TabledataInsertAll' Text +tiaProjectId + = lens _tiaProjectId (\ s a -> s{_tiaProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tiaOauthToken :: Lens' TabledataInsertAll' (Maybe Text) +tiaOauthToken + = lens _tiaOauthToken + (\ s a -> s{_tiaOauthToken = a}) + +-- | Table ID of the destination table. +tiaTableId :: Lens' TabledataInsertAll' Text +tiaTableId + = lens _tiaTableId (\ s a -> s{_tiaTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tiaFields :: Lens' TabledataInsertAll' (Maybe Text) +tiaFields + = lens _tiaFields (\ s a -> s{_tiaFields = a}) + +-- | Data format for the response. +tiaAlt :: Lens' TabledataInsertAll' Text +tiaAlt = lens _tiaAlt (\ s a -> s{_tiaAlt = a}) + +instance GoogleRequest TabledataInsertAll' where + type Rs TabledataInsertAll' = + TableDataInsertAllResponse + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TabledataInsertAll{..} + = go _tiaQuotaUser _tiaPrettyPrint _tiaUserIp _tiaKey + _tiaDatasetId + _tiaProjectId + _tiaOauthToken + _tiaTableId + _tiaFields + _tiaAlt + where go + = clientWithRoute + (Proxy :: Proxy TabledataInsertAllAPI) + r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/List.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/List.hs new file mode 100644 index 000000000..1ba6a8c3b --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tabledata/List.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tabledata.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves table data from a specified set of rows. Requires the READER +-- dataset role. +-- +-- /See:/ for @BigqueryTabledataList@. +module BigQuery.Tabledata.List + ( + -- * REST Resource + TabledataListAPI + + -- * Creating a Request + , tabledataList + , TabledataList + + -- * Request Lenses + , tQuotaUser + , tPrettyPrint + , tUserIp + , tKey + , tDatasetId + , tPageToken + , tProjectId + , tOauthToken + , tTableId + , tStartIndex + , tMaxResults + , tFields + , tAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTabledataList@ which the +-- 'TabledataList' request conforms to. +type TabledataListAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> + "data" :> + QueryParam "pageToken" Text :> + QueryParam "startIndex" Word64 :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TableDataList + +-- | Retrieves table data from a specified set of rows. Requires the READER +-- dataset role. +-- +-- /See:/ 'tabledataList' smart constructor. +data TabledataList = TabledataList + { _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tUserIp :: !(Maybe Text) + , _tKey :: !(Maybe Text) + , _tDatasetId :: !Text + , _tPageToken :: !(Maybe Text) + , _tProjectId :: !Text + , _tOauthToken :: !(Maybe Text) + , _tTableId :: !Text + , _tStartIndex :: !(Maybe Word64) + , _tMaxResults :: !(Maybe Word32) + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TabledataList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tUserIp' +-- +-- * 'tKey' +-- +-- * 'tDatasetId' +-- +-- * 'tPageToken' +-- +-- * 'tProjectId' +-- +-- * 'tOauthToken' +-- +-- * 'tTableId' +-- +-- * 'tStartIndex' +-- +-- * 'tMaxResults' +-- +-- * 'tFields' +-- +-- * 'tAlt' +tabledataList + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TabledataList +tabledataList pTDatasetId_ pTProjectId_ pTTableId_ = + TabledataList + { _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tUserIp = Nothing + , _tKey = Nothing + , _tDatasetId = pTDatasetId_ + , _tPageToken = Nothing + , _tProjectId = pTProjectId_ + , _tOauthToken = Nothing + , _tTableId = pTTableId_ + , _tStartIndex = Nothing + , _tMaxResults = Nothing + , _tFields = Nothing + , _tAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TabledataList' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TabledataList' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TabledataList' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TabledataList' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | Dataset ID of the table to read +tDatasetId :: Lens' TabledataList' Text +tDatasetId + = lens _tDatasetId (\ s a -> s{_tDatasetId = a}) + +-- | Page token, returned by a previous call, identifying the result set +tPageToken :: Lens' TabledataList' (Maybe Text) +tPageToken + = lens _tPageToken (\ s a -> s{_tPageToken = a}) + +-- | Project ID of the table to read +tProjectId :: Lens' TabledataList' Text +tProjectId + = lens _tProjectId (\ s a -> s{_tProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TabledataList' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | Table ID of the table to read +tTableId :: Lens' TabledataList' Text +tTableId = lens _tTableId (\ s a -> s{_tTableId = a}) + +-- | Zero-based index of the starting row to read +tStartIndex :: Lens' TabledataList' (Maybe Word64) +tStartIndex + = lens _tStartIndex (\ s a -> s{_tStartIndex = a}) + +-- | Maximum number of results to return +tMaxResults :: Lens' TabledataList' (Maybe Word32) +tMaxResults + = lens _tMaxResults (\ s a -> s{_tMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TabledataList' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TabledataList' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TabledataList' where + type Rs TabledataList' = TableDataList + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TabledataList{..} + = go _tQuotaUser _tPrettyPrint _tUserIp _tKey + _tDatasetId + _tPageToken + _tProjectId + _tOauthToken + _tTableId + _tStartIndex + _tMaxResults + _tFields + _tAlt + where go + = clientWithRoute (Proxy :: Proxy TabledataListAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Delete.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Delete.hs new file mode 100644 index 000000000..29b755b90 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Delete.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the table specified by tableId from the dataset. If the table +-- contains data, all the data will be deleted. +-- +-- /See:/ for @BigqueryTablesDelete@. +module BigQuery.Tables.Delete + ( + -- * REST Resource + TablesDeleteAPI + + -- * Creating a Request + , tablesDelete + , TablesDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdUserIp + , tdKey + , tdDatasetId + , tdProjectId + , tdOauthToken + , tdTableId + , tdFields + , tdAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesDelete@ which the +-- 'TablesDelete' request conforms to. +type TablesDeleteAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> Delete '[JSON] () + +-- | Deletes the table specified by tableId from the dataset. If the table +-- contains data, all the data will be deleted. +-- +-- /See:/ 'tablesDelete' smart constructor. +data TablesDelete = TablesDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdDatasetId :: !Text + , _tdProjectId :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdTableId :: !Text + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdDatasetId' +-- +-- * 'tdProjectId' +-- +-- * 'tdOauthToken' +-- +-- * 'tdTableId' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +tablesDelete + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TablesDelete +tablesDelete pTdDatasetId_ pTdProjectId_ pTdTableId_ = + TablesDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdDatasetId = pTdDatasetId_ + , _tdProjectId = pTdProjectId_ + , _tdOauthToken = Nothing + , _tdTableId = pTdTableId_ + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TablesDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TablesDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TablesDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TablesDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | Dataset ID of the table to delete +tdDatasetId :: Lens' TablesDelete' Text +tdDatasetId + = lens _tdDatasetId (\ s a -> s{_tdDatasetId = a}) + +-- | Project ID of the table to delete +tdProjectId :: Lens' TablesDelete' Text +tdProjectId + = lens _tdProjectId (\ s a -> s{_tdProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TablesDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Table ID of the table to delete +tdTableId :: Lens' TablesDelete' Text +tdTableId + = lens _tdTableId (\ s a -> s{_tdTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TablesDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TablesDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TablesDelete' where + type Rs TablesDelete' = () + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdUserIp _tdKey + _tdDatasetId + _tdProjectId + _tdOauthToken + _tdTableId + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TablesDeleteAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Get.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Get.hs new file mode 100644 index 000000000..eeb66bdb4 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified table resource by table ID. This method does not +-- return the data in the table, it only returns the table resource, which +-- describes the structure of this table. +-- +-- /See:/ for @BigqueryTablesGet@. +module BigQuery.Tables.Get + ( + -- * REST Resource + TablesGetAPI + + -- * Creating a Request + , tablesGet + , TablesGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgDatasetId + , tgProjectId + , tgOauthToken + , tgTableId + , tgFields + , tgAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesGet@ which the +-- 'TablesGet' request conforms to. +type TablesGetAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> Get '[JSON] Table + +-- | Gets the specified table resource by table ID. This method does not +-- return the data in the table, it only returns the table resource, which +-- describes the structure of this table. +-- +-- /See:/ 'tablesGet' smart constructor. +data TablesGet = TablesGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgDatasetId :: !Text + , _tgProjectId :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgTableId :: !Text + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgDatasetId' +-- +-- * 'tgProjectId' +-- +-- * 'tgOauthToken' +-- +-- * 'tgTableId' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +tablesGet + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TablesGet +tablesGet pTgDatasetId_ pTgProjectId_ pTgTableId_ = + TablesGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgDatasetId = pTgDatasetId_ + , _tgProjectId = pTgProjectId_ + , _tgOauthToken = Nothing + , _tgTableId = pTgTableId_ + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TablesGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TablesGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TablesGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TablesGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | Dataset ID of the requested table +tgDatasetId :: Lens' TablesGet' Text +tgDatasetId + = lens _tgDatasetId (\ s a -> s{_tgDatasetId = a}) + +-- | Project ID of the requested table +tgProjectId :: Lens' TablesGet' Text +tgProjectId + = lens _tgProjectId (\ s a -> s{_tgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TablesGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Table ID of the requested table +tgTableId :: Lens' TablesGet' Text +tgTableId + = lens _tgTableId (\ s a -> s{_tgTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TablesGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TablesGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TablesGet' where + type Rs TablesGet' = Table + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgUserIp _tgKey + _tgDatasetId + _tgProjectId + _tgOauthToken + _tgTableId + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TablesGetAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Insert.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Insert.hs new file mode 100644 index 000000000..fa225b26f --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Insert.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new, empty table in the dataset. +-- +-- /See:/ for @BigqueryTablesInsert@. +module BigQuery.Tables.Insert + ( + -- * REST Resource + TablesInsertAPI + + -- * Creating a Request + , tablesInsert + , TablesInsert + + -- * Request Lenses + , tiQuotaUser + , tiPrettyPrint + , tiUserIp + , tiKey + , tiDatasetId + , tiProjectId + , tiOauthToken + , tiFields + , tiAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesInsert@ which the +-- 'TablesInsert' request conforms to. +type TablesInsertAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> Post '[JSON] Table + +-- | Creates a new, empty table in the dataset. +-- +-- /See:/ 'tablesInsert' smart constructor. +data TablesInsert = TablesInsert + { _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiDatasetId :: !Text + , _tiProjectId :: !Text + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiDatasetId' +-- +-- * 'tiProjectId' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +tablesInsert + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> TablesInsert +tablesInsert pTiDatasetId_ pTiProjectId_ = + TablesInsert + { _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiDatasetId = pTiDatasetId_ + , _tiProjectId = pTiProjectId_ + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TablesInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TablesInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TablesInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TablesInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | Dataset ID of the new table +tiDatasetId :: Lens' TablesInsert' Text +tiDatasetId + = lens _tiDatasetId (\ s a -> s{_tiDatasetId = a}) + +-- | Project ID of the new table +tiProjectId :: Lens' TablesInsert' Text +tiProjectId + = lens _tiProjectId (\ s a -> s{_tiProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TablesInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TablesInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TablesInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TablesInsert' where + type Rs TablesInsert' = Table + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesInsert{..} + = go _tiQuotaUser _tiPrettyPrint _tiUserIp _tiKey + _tiDatasetId + _tiProjectId + _tiOauthToken + _tiFields + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TablesInsertAPI) r + u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/List.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/List.hs new file mode 100644 index 000000000..8b479c25b --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/List.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all tables in the specified dataset. Requires the READER dataset +-- role. +-- +-- /See:/ for @BigqueryTablesList@. +module BigQuery.Tables.List + ( + -- * REST Resource + TablesListAPI + + -- * Creating a Request + , tablesList + , TablesList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlKey + , tlDatasetId + , tlPageToken + , tlProjectId + , tlOauthToken + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesList@ which the +-- 'TablesList' request conforms to. +type TablesListAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TableList + +-- | Lists all tables in the specified dataset. Requires the READER dataset +-- role. +-- +-- /See:/ 'tablesList' smart constructor. +data TablesList = TablesList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlDatasetId :: !Text + , _tlPageToken :: !(Maybe Text) + , _tlProjectId :: !Text + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Word32) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlDatasetId' +-- +-- * 'tlPageToken' +-- +-- * 'tlProjectId' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +tablesList + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> TablesList +tablesList pTlDatasetId_ pTlProjectId_ = + TablesList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlDatasetId = pTlDatasetId_ + , _tlPageToken = Nothing + , _tlProjectId = pTlProjectId_ + , _tlOauthToken = Nothing + , _tlMaxResults = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TablesList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TablesList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TablesList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TablesList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Dataset ID of the tables to list +tlDatasetId :: Lens' TablesList' Text +tlDatasetId + = lens _tlDatasetId (\ s a -> s{_tlDatasetId = a}) + +-- | Page token, returned by a previous call, to request the next page of +-- results +tlPageToken :: Lens' TablesList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | Project ID of the tables to list +tlProjectId :: Lens' TablesList' Text +tlProjectId + = lens _tlProjectId (\ s a -> s{_tlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TablesList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Maximum number of results to return +tlMaxResults :: Lens' TablesList' (Maybe Word32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TablesList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TablesList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TablesList' where + type Rs TablesList' = TableList + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesList{..} + = go _tlQuotaUser _tlPrettyPrint _tlUserIp _tlKey + _tlDatasetId + _tlPageToken + _tlProjectId + _tlOauthToken + _tlMaxResults + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TablesListAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Patch.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Patch.hs new file mode 100644 index 000000000..109a37874 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Patch.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates information in an existing table. The update method replaces the +-- entire table resource, whereas the patch method only replaces fields +-- that are provided in the submitted table resource. This method supports +-- patch semantics. +-- +-- /See:/ for @BigqueryTablesPatch@. +module BigQuery.Tables.Patch + ( + -- * REST Resource + TablesPatchAPI + + -- * Creating a Request + , tablesPatch + , TablesPatch + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpUserIp + , tpKey + , tpDatasetId + , tpProjectId + , tpOauthToken + , tpTableId + , tpFields + , tpAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesPatch@ which the +-- 'TablesPatch' request conforms to. +type TablesPatchAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> Patch '[JSON] Table + +-- | Updates information in an existing table. The update method replaces the +-- entire table resource, whereas the patch method only replaces fields +-- that are provided in the submitted table resource. This method supports +-- patch semantics. +-- +-- /See:/ 'tablesPatch' smart constructor. +data TablesPatch = TablesPatch + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpDatasetId :: !Text + , _tpProjectId :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpTableId :: !Text + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpDatasetId' +-- +-- * 'tpProjectId' +-- +-- * 'tpOauthToken' +-- +-- * 'tpTableId' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +tablesPatch + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TablesPatch +tablesPatch pTpDatasetId_ pTpProjectId_ pTpTableId_ = + TablesPatch + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpDatasetId = pTpDatasetId_ + , _tpProjectId = pTpProjectId_ + , _tpOauthToken = Nothing + , _tpTableId = pTpTableId_ + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TablesPatch' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TablesPatch' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TablesPatch' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TablesPatch' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | Dataset ID of the table to update +tpDatasetId :: Lens' TablesPatch' Text +tpDatasetId + = lens _tpDatasetId (\ s a -> s{_tpDatasetId = a}) + +-- | Project ID of the table to update +tpProjectId :: Lens' TablesPatch' Text +tpProjectId + = lens _tpProjectId (\ s a -> s{_tpProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TablesPatch' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Table ID of the table to update +tpTableId :: Lens' TablesPatch' Text +tpTableId + = lens _tpTableId (\ s a -> s{_tpTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TablesPatch' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TablesPatch' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TablesPatch' where + type Rs TablesPatch' = Table + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesPatch{..} + = go _tpQuotaUser _tpPrettyPrint _tpUserIp _tpKey + _tpDatasetId + _tpProjectId + _tpOauthToken + _tpTableId + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TablesPatchAPI) r u diff --git a/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Update.hs b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Update.hs new file mode 100644 index 000000000..0e04ed695 --- /dev/null +++ b/gogol-bigquery/gen/Network/Google/Resource/BigQuery/Tables/Update.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.BigQuery.Tables.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates information in an existing table. The update method replaces the +-- entire table resource, whereas the patch method only replaces fields +-- that are provided in the submitted table resource. +-- +-- /See:/ for @BigqueryTablesUpdate@. +module BigQuery.Tables.Update + ( + -- * REST Resource + TablesUpdateAPI + + -- * Creating a Request + , tablesUpdate + , TablesUpdate + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuUserIp + , tuKey + , tuDatasetId + , tuProjectId + , tuOauthToken + , tuTableId + , tuFields + , tuAlt + ) where + +import Network.Google.BigQuery.Types +import Network.Google.Prelude + +-- | A resource alias for @BigqueryTablesUpdate@ which the +-- 'TablesUpdate' request conforms to. +type TablesUpdateAPI = + "projects" :> + Capture "projectId" Text :> + "datasets" :> + Capture "datasetId" Text :> + "tables" :> + Capture "tableId" Text :> Put '[JSON] Table + +-- | Updates information in an existing table. The update method replaces the +-- entire table resource, whereas the patch method only replaces fields +-- that are provided in the submitted table resource. +-- +-- /See:/ 'tablesUpdate' smart constructor. +data TablesUpdate = TablesUpdate + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuDatasetId :: !Text + , _tuProjectId :: !Text + , _tuOauthToken :: !(Maybe Text) + , _tuTableId :: !Text + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuDatasetId' +-- +-- * 'tuProjectId' +-- +-- * 'tuOauthToken' +-- +-- * 'tuTableId' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +tablesUpdate + :: Text -- ^ 'datasetId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'tableId' + -> TablesUpdate +tablesUpdate pTuDatasetId_ pTuProjectId_ pTuTableId_ = + TablesUpdate + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuDatasetId = pTuDatasetId_ + , _tuProjectId = pTuProjectId_ + , _tuOauthToken = Nothing + , _tuTableId = pTuTableId_ + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TablesUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TablesUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TablesUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TablesUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | Dataset ID of the table to update +tuDatasetId :: Lens' TablesUpdate' Text +tuDatasetId + = lens _tuDatasetId (\ s a -> s{_tuDatasetId = a}) + +-- | Project ID of the table to update +tuProjectId :: Lens' TablesUpdate' Text +tuProjectId + = lens _tuProjectId (\ s a -> s{_tuProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TablesUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Table ID of the table to update +tuTableId :: Lens' TablesUpdate' Text +tuTableId + = lens _tuTableId (\ s a -> s{_tuTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TablesUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TablesUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TablesUpdate' where + type Rs TablesUpdate' = Table + request = requestWithRoute defReq bigQueryURL + requestWithRoute r u TablesUpdate{..} + = go _tuQuotaUser _tuPrettyPrint _tuUserIp _tuKey + _tuDatasetId + _tuProjectId + _tuOauthToken + _tuTableId + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TablesUpdateAPI) r + u diff --git a/gogol-bigquery/gogol-bigquery.cabal b/gogol-bigquery/gogol-bigquery.cabal new file mode 100644 index 000000000..18b8f3fc2 --- /dev/null +++ b/gogol-bigquery/gogol-bigquery.cabal @@ -0,0 +1,63 @@ +name: gogol-bigquery +version: 0.0.1 +synopsis: BigQuery API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + A data platform for customers to create, manage, share and query data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.BigQuery + , Network.Google.BigQuery.Types + , Network.Google.Resource.BigQuery.Datasets.Delete + , Network.Google.Resource.BigQuery.Datasets.Get + , Network.Google.Resource.BigQuery.Datasets.Insert + , Network.Google.Resource.BigQuery.Datasets.List + , Network.Google.Resource.BigQuery.Datasets.Patch + , Network.Google.Resource.BigQuery.Datasets.Update + , Network.Google.Resource.BigQuery.Jobs.Cancel + , Network.Google.Resource.BigQuery.Jobs.Get + , Network.Google.Resource.BigQuery.Jobs.GetQueryResults + , Network.Google.Resource.BigQuery.Jobs.Insert + , Network.Google.Resource.BigQuery.Jobs.List + , Network.Google.Resource.BigQuery.Jobs.Query + , Network.Google.Resource.BigQuery.Projects.List + , Network.Google.Resource.BigQuery.Tabledata.InsertAll + , Network.Google.Resource.BigQuery.Tabledata.List + , Network.Google.Resource.BigQuery.Tables.Delete + , Network.Google.Resource.BigQuery.Tables.Get + , Network.Google.Resource.BigQuery.Tables.Insert + , Network.Google.Resource.BigQuery.Tables.List + , Network.Google.Resource.BigQuery.Tables.Patch + , Network.Google.Resource.BigQuery.Tables.Update + + other-modules: + Network.Google.BigQuery.Types.Product + , Network.Google.BigQuery.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-bigquery/src/.gitkeep b/gogol-bigquery/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-billing/LICENSE b/gogol-billing/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-billing/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-billing/Makefile b/gogol-billing/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-billing/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-billing/README.md b/gogol-billing/README.md new file mode 100644 index 000000000..1b458f226 --- /dev/null +++ b/gogol-billing/README.md @@ -0,0 +1,28 @@ +# gogol-billing + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Billing API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-billing` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-billing/Setup.hs b/gogol-billing/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-billing/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-billing/gen/Network/Google/Billing.hs b/gogol-billing/gen/Network/Google/Billing.hs new file mode 100644 index 000000000..20abd35bc --- /dev/null +++ b/gogol-billing/gen/Network/Google/Billing.hs @@ -0,0 +1,90 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Billing +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Retrieves Google Developers Console billing accounts and associates them +-- with projects. +-- +-- /See:/ +module Network.Google.Billing + ( + -- * API + BillingAPI + , billingAPI + , billingURL + + -- * Service Methods + + -- * REST Resources + + -- ** CloudbillingBillingAccountsGet + , module Cloudbilling.BillingAccounts.Get + + -- ** CloudbillingBillingAccountsList + , module Cloudbilling.BillingAccounts.List + + -- ** CloudbillingBillingAccountsProjectsList + , module Cloudbilling.BillingAccounts.Projects.List + + -- ** CloudbillingProjectsGetBillingInfo + , module Cloudbilling.Projects.GetBillingInfo + + -- ** CloudbillingProjectsUpdateBillingInfo + , module Cloudbilling.Projects.UpdateBillingInfo + + -- * Types + + -- ** BillingAccount + , BillingAccount + , billingAccount + , baOpen + , baName + , baDisplayName + + -- ** ProjectBillingInfo + , ProjectBillingInfo + , projectBillingInfo + , pbiName + , pbiBillingAccountName + , pbiProjectId + , pbiBillingEnabled + + -- ** ListProjectBillingInfoResponse + , ListProjectBillingInfoResponse + , listProjectBillingInfoResponse + , lpbirNextPageToken + , lpbirProjectBillingInfo + + -- ** ListBillingAccountsResponse + , ListBillingAccountsResponse + , listBillingAccountsResponse + , lbarNextPageToken + , lbarBillingAccounts + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude +import Network.Google.Resource.Cloudbilling.BillingAccounts.Get +import Network.Google.Resource.Cloudbilling.BillingAccounts.List +import Network.Google.Resource.Cloudbilling.BillingAccounts.Projects.List +import Network.Google.Resource.Cloudbilling.Projects.GetBillingInfo +import Network.Google.Resource.Cloudbilling.Projects.UpdateBillingInfo + +{- $resources +TODO +-} + +type BillingAPI = Projects :<|> BillingAccounts + +billingAPI :: Proxy BillingAPI +billingAPI = Proxy diff --git a/gogol-billing/gen/Network/Google/Billing/Types.hs b/gogol-billing/gen/Network/Google/Billing/Types.hs new file mode 100644 index 000000000..6a9f7d2a8 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Billing/Types.hs @@ -0,0 +1,57 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Billing.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Billing.Types + ( + -- * Service URL + billingURL + + -- * BillingAccount + , BillingAccount + , billingAccount + , baOpen + , baName + , baDisplayName + + -- * ProjectBillingInfo + , ProjectBillingInfo + , projectBillingInfo + , pbiName + , pbiBillingAccountName + , pbiProjectId + , pbiBillingEnabled + + -- * ListProjectBillingInfoResponse + , ListProjectBillingInfoResponse + , listProjectBillingInfoResponse + , lpbirNextPageToken + , lpbirProjectBillingInfo + + -- * ListBillingAccountsResponse + , ListBillingAccountsResponse + , listBillingAccountsResponse + , lbarNextPageToken + , lbarBillingAccounts + ) where + +import Network.Google.Billing.Types.Product +import Network.Google.Billing.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Cloud Billing API. +billingURL :: BaseURL +billingURL + = BaseUrl Https + "https://cloudbilling.googleapis.com/" + 443 diff --git a/gogol-billing/gen/Network/Google/Billing/Types/Product.hs b/gogol-billing/gen/Network/Google/Billing/Types/Product.hs new file mode 100644 index 000000000..b3467a171 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Billing/Types/Product.hs @@ -0,0 +1,279 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Billing.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Billing.Types.Product where + +import Network.Google.Billing.Types.Sum +import Network.Google.Prelude + +-- | A billing account in [Google Developers +-- Console](https:\/\/console.developers.google.com\/). You can assign a +-- billing account to one or more projects. +-- +-- /See:/ 'billingAccount' smart constructor. +data BillingAccount = BillingAccount + { _baOpen :: !(Maybe Bool) + , _baName :: !(Maybe Text) + , _baDisplayName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baOpen' +-- +-- * 'baName' +-- +-- * 'baDisplayName' +billingAccount + :: BillingAccount +billingAccount = + BillingAccount + { _baOpen = Nothing + , _baName = Nothing + , _baDisplayName = Nothing + } + +-- | True if the billing account is open, and will therefore be charged for +-- any usage on associated projects. False if the billing account is +-- closed, and therefore projects associated with it will be unable to use +-- paid services. +baOpen :: Lens' BillingAccount (Maybe Bool) +baOpen = lens _baOpen (\ s a -> s{_baOpen = a}) + +-- | The resource name of the billing account. The resource name has the form +-- \`billingAccounts\/{billing_account_id}\`. For example, +-- \`billingAccounts\/012345-567890-ABCDEF\` would be the resource name for +-- billing account \`012345-567890-ABCDEF\`. +baName :: Lens' BillingAccount (Maybe Text) +baName = lens _baName (\ s a -> s{_baName = a}) + +-- | The display name given to the billing account, such as \`My Billing +-- Account\`. This name is displayed in the Google Developers Console. +baDisplayName :: Lens' BillingAccount (Maybe Text) +baDisplayName + = lens _baDisplayName + (\ s a -> s{_baDisplayName = a}) + +instance FromJSON BillingAccount where + parseJSON + = withObject "BillingAccount" + (\ o -> + BillingAccount <$> + (o .:? "open") <*> (o .:? "name") <*> + (o .:? "displayName")) + +instance ToJSON BillingAccount where + toJSON BillingAccount{..} + = object + (catMaybes + [("open" .=) <$> _baOpen, ("name" .=) <$> _baName, + ("displayName" .=) <$> _baDisplayName]) + +-- | Encapsulation of billing information for a Developers Console project. A +-- project has at most one associated billing account at a time (but a +-- billing account can be assigned to multiple projects). +-- +-- /See:/ 'projectBillingInfo' smart constructor. +data ProjectBillingInfo = ProjectBillingInfo + { _pbiName :: !(Maybe Text) + , _pbiBillingAccountName :: !(Maybe Text) + , _pbiProjectId :: !(Maybe Text) + , _pbiBillingEnabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectBillingInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pbiName' +-- +-- * 'pbiBillingAccountName' +-- +-- * 'pbiProjectId' +-- +-- * 'pbiBillingEnabled' +projectBillingInfo + :: ProjectBillingInfo +projectBillingInfo = + ProjectBillingInfo + { _pbiName = Nothing + , _pbiBillingAccountName = Nothing + , _pbiProjectId = Nothing + , _pbiBillingEnabled = Nothing + } + +-- | The resource name for the \`ProjectBillingInfo\`; has the form +-- \`projects\/{project_id}\/billingInfo\`. For example, the resource name +-- for the billing information for project \`tokyo-rain-123\` would be +-- \`projects\/tokyo-rain-123\/billingInfo\`. This field is read-only. +pbiName :: Lens' ProjectBillingInfo (Maybe Text) +pbiName = lens _pbiName (\ s a -> s{_pbiName = a}) + +-- | The resource name of the billing account associated with the project, if +-- any. For example, \`billingAccounts\/012345-567890-ABCDEF\`. +pbiBillingAccountName :: Lens' ProjectBillingInfo (Maybe Text) +pbiBillingAccountName + = lens _pbiBillingAccountName + (\ s a -> s{_pbiBillingAccountName = a}) + +-- | The ID of the project that this \`ProjectBillingInfo\` represents, such +-- as \`tokyo-rain-123\`. This is a convenience field so that you don\'t +-- need to parse the \`name\` field to obtain a project ID. This field is +-- read-only. +pbiProjectId :: Lens' ProjectBillingInfo (Maybe Text) +pbiProjectId + = lens _pbiProjectId (\ s a -> s{_pbiProjectId = a}) + +-- | True if the project is associated with an open billing account, to which +-- usage on the project is charged. False if the project is associated with +-- a closed billing account, or no billing account at all, and therefore +-- cannot use paid services. This field is read-only. +pbiBillingEnabled :: Lens' ProjectBillingInfo (Maybe Bool) +pbiBillingEnabled + = lens _pbiBillingEnabled + (\ s a -> s{_pbiBillingEnabled = a}) + +instance FromJSON ProjectBillingInfo where + parseJSON + = withObject "ProjectBillingInfo" + (\ o -> + ProjectBillingInfo <$> + (o .:? "name") <*> (o .:? "billingAccountName") <*> + (o .:? "projectId") + <*> (o .:? "billingEnabled")) + +instance ToJSON ProjectBillingInfo where + toJSON ProjectBillingInfo{..} + = object + (catMaybes + [("name" .=) <$> _pbiName, + ("billingAccountName" .=) <$> _pbiBillingAccountName, + ("projectId" .=) <$> _pbiProjectId, + ("billingEnabled" .=) <$> _pbiBillingEnabled]) + +-- | Request message for \`ListProjectBillingInfoResponse\`. +-- +-- /See:/ 'listProjectBillingInfoResponse' smart constructor. +data ListProjectBillingInfoResponse = ListProjectBillingInfoResponse + { _lpbirNextPageToken :: !(Maybe Text) + , _lpbirProjectBillingInfo :: !(Maybe [Maybe ProjectBillingInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListProjectBillingInfoResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpbirNextPageToken' +-- +-- * 'lpbirProjectBillingInfo' +listProjectBillingInfoResponse + :: ListProjectBillingInfoResponse +listProjectBillingInfoResponse = + ListProjectBillingInfoResponse + { _lpbirNextPageToken = Nothing + , _lpbirProjectBillingInfo = Nothing + } + +-- | A token to retrieve the next page of results. To retrieve the next page, +-- call \`ListProjectBillingInfo\` again with the \`page_token\` field set +-- to this value. This field is empty if there are no more results to +-- retrieve. +lpbirNextPageToken :: Lens' ListProjectBillingInfoResponse (Maybe Text) +lpbirNextPageToken + = lens _lpbirNextPageToken + (\ s a -> s{_lpbirNextPageToken = a}) + +-- | A list of \`ProjectBillingInfo\` resources representing the projects +-- associated with the billing account. +lpbirProjectBillingInfo :: Lens' ListProjectBillingInfoResponse [Maybe ProjectBillingInfo] +lpbirProjectBillingInfo + = lens _lpbirProjectBillingInfo + (\ s a -> s{_lpbirProjectBillingInfo = a}) + . _Default + . _Coerce + +instance FromJSON ListProjectBillingInfoResponse + where + parseJSON + = withObject "ListProjectBillingInfoResponse" + (\ o -> + ListProjectBillingInfoResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "projectBillingInfo" .!= mempty)) + +instance ToJSON ListProjectBillingInfoResponse where + toJSON ListProjectBillingInfoResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lpbirNextPageToken, + ("projectBillingInfo" .=) <$> + _lpbirProjectBillingInfo]) + +-- | Response message for \`ListBillingAccounts\`. +-- +-- /See:/ 'listBillingAccountsResponse' smart constructor. +data ListBillingAccountsResponse = ListBillingAccountsResponse + { _lbarNextPageToken :: !(Maybe Text) + , _lbarBillingAccounts :: !(Maybe [Maybe BillingAccount]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListBillingAccountsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbarNextPageToken' +-- +-- * 'lbarBillingAccounts' +listBillingAccountsResponse + :: ListBillingAccountsResponse +listBillingAccountsResponse = + ListBillingAccountsResponse + { _lbarNextPageToken = Nothing + , _lbarBillingAccounts = Nothing + } + +-- | A token to retrieve the next page of results. To retrieve the next page, +-- call \`ListBillingAccounts\` again with the \`page_token\` field set to +-- this value. This field is empty if there are no more results to +-- retrieve. +lbarNextPageToken :: Lens' ListBillingAccountsResponse (Maybe Text) +lbarNextPageToken + = lens _lbarNextPageToken + (\ s a -> s{_lbarNextPageToken = a}) + +-- | A list of billing accounts. +lbarBillingAccounts :: Lens' ListBillingAccountsResponse [Maybe BillingAccount] +lbarBillingAccounts + = lens _lbarBillingAccounts + (\ s a -> s{_lbarBillingAccounts = a}) + . _Default + . _Coerce + +instance FromJSON ListBillingAccountsResponse where + parseJSON + = withObject "ListBillingAccountsResponse" + (\ o -> + ListBillingAccountsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "billingAccounts" .!= mempty)) + +instance ToJSON ListBillingAccountsResponse where + toJSON ListBillingAccountsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lbarNextPageToken, + ("billingAccounts" .=) <$> _lbarBillingAccounts]) diff --git a/gogol-billing/gen/Network/Google/Billing/Types/Sum.hs b/gogol-billing/gen/Network/Google/Billing/Types/Sum.hs new file mode 100644 index 000000000..99069cb16 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Billing/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Billing.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Billing.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Get.hs b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Get.hs new file mode 100644 index 000000000..5fd66ef55 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Get.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudbilling.BillingAccounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about a billing account. The current authenticated user +-- must be an [owner of the billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ for @CloudbillingBillingAccountsGet@. +module Cloudbilling.BillingAccounts.Get + ( + -- * REST Resource + BillingAccountsGetAPI + + -- * Creating a Request + , billingAccountsGet + , BillingAccountsGet + + -- * Request Lenses + , bagXgafv + , bagQuotaUser + , bagPrettyPrint + , bagUploadProtocol + , bagPp + , bagAccessToken + , bagUploadType + , bagBearerToken + , bagKey + , bagName + , bagOauthToken + , bagFields + , bagCallback + , bagAlt + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudbillingBillingAccountsGet@ which the +-- 'BillingAccountsGet' request conforms to. +type BillingAccountsGetAPI = + "v1" :> "{+name}" :> Get '[JSON] BillingAccount + +-- | Gets information about a billing account. The current authenticated user +-- must be an [owner of the billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ 'billingAccountsGet' smart constructor. +data BillingAccountsGet = BillingAccountsGet + { _bagXgafv :: !(Maybe Text) + , _bagQuotaUser :: !(Maybe Text) + , _bagPrettyPrint :: !Bool + , _bagUploadProtocol :: !(Maybe Text) + , _bagPp :: !Bool + , _bagAccessToken :: !(Maybe Text) + , _bagUploadType :: !(Maybe Text) + , _bagBearerToken :: !(Maybe Text) + , _bagKey :: !(Maybe Text) + , _bagName :: !Text + , _bagOauthToken :: !(Maybe Text) + , _bagFields :: !(Maybe Text) + , _bagCallback :: !(Maybe Text) + , _bagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingAccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bagXgafv' +-- +-- * 'bagQuotaUser' +-- +-- * 'bagPrettyPrint' +-- +-- * 'bagUploadProtocol' +-- +-- * 'bagPp' +-- +-- * 'bagAccessToken' +-- +-- * 'bagUploadType' +-- +-- * 'bagBearerToken' +-- +-- * 'bagKey' +-- +-- * 'bagName' +-- +-- * 'bagOauthToken' +-- +-- * 'bagFields' +-- +-- * 'bagCallback' +-- +-- * 'bagAlt' +billingAccountsGet + :: Text -- ^ 'name' + -> BillingAccountsGet +billingAccountsGet pBagName_ = + BillingAccountsGet + { _bagXgafv = Nothing + , _bagQuotaUser = Nothing + , _bagPrettyPrint = True + , _bagUploadProtocol = Nothing + , _bagPp = True + , _bagAccessToken = Nothing + , _bagUploadType = Nothing + , _bagBearerToken = Nothing + , _bagKey = Nothing + , _bagName = pBagName_ + , _bagOauthToken = Nothing + , _bagFields = Nothing + , _bagCallback = Nothing + , _bagAlt = "json" + } + +-- | V1 error format. +bagXgafv :: Lens' BillingAccountsGet' (Maybe Text) +bagXgafv = lens _bagXgafv (\ s a -> s{_bagXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bagQuotaUser :: Lens' BillingAccountsGet' (Maybe Text) +bagQuotaUser + = lens _bagQuotaUser (\ s a -> s{_bagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bagPrettyPrint :: Lens' BillingAccountsGet' Bool +bagPrettyPrint + = lens _bagPrettyPrint + (\ s a -> s{_bagPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bagUploadProtocol :: Lens' BillingAccountsGet' (Maybe Text) +bagUploadProtocol + = lens _bagUploadProtocol + (\ s a -> s{_bagUploadProtocol = a}) + +-- | Pretty-print response. +bagPp :: Lens' BillingAccountsGet' Bool +bagPp = lens _bagPp (\ s a -> s{_bagPp = a}) + +-- | OAuth access token. +bagAccessToken :: Lens' BillingAccountsGet' (Maybe Text) +bagAccessToken + = lens _bagAccessToken + (\ s a -> s{_bagAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bagUploadType :: Lens' BillingAccountsGet' (Maybe Text) +bagUploadType + = lens _bagUploadType + (\ s a -> s{_bagUploadType = a}) + +-- | OAuth bearer token. +bagBearerToken :: Lens' BillingAccountsGet' (Maybe Text) +bagBearerToken + = lens _bagBearerToken + (\ s a -> s{_bagBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bagKey :: Lens' BillingAccountsGet' (Maybe Text) +bagKey = lens _bagKey (\ s a -> s{_bagKey = a}) + +-- | The resource name of the billing account to retrieve. For example, +-- \`billingAccounts\/012345-567890-ABCDEF\`. +bagName :: Lens' BillingAccountsGet' Text +bagName = lens _bagName (\ s a -> s{_bagName = a}) + +-- | OAuth 2.0 token for the current user. +bagOauthToken :: Lens' BillingAccountsGet' (Maybe Text) +bagOauthToken + = lens _bagOauthToken + (\ s a -> s{_bagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bagFields :: Lens' BillingAccountsGet' (Maybe Text) +bagFields + = lens _bagFields (\ s a -> s{_bagFields = a}) + +-- | JSONP +bagCallback :: Lens' BillingAccountsGet' (Maybe Text) +bagCallback + = lens _bagCallback (\ s a -> s{_bagCallback = a}) + +-- | Data format for response. +bagAlt :: Lens' BillingAccountsGet' Text +bagAlt = lens _bagAlt (\ s a -> s{_bagAlt = a}) + +instance GoogleRequest BillingAccountsGet' where + type Rs BillingAccountsGet' = BillingAccount + request = requestWithRoute defReq billingURL + requestWithRoute r u BillingAccountsGet{..} + = go _bagXgafv _bagQuotaUser _bagPrettyPrint + _bagUploadProtocol + _bagPp + _bagAccessToken + _bagUploadType + _bagBearerToken + _bagKey + _bagName + _bagOauthToken + _bagFields + _bagCallback + _bagAlt + where go + = clientWithRoute + (Proxy :: Proxy BillingAccountsGetAPI) + r + u diff --git a/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/List.hs b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/List.hs new file mode 100644 index 000000000..a240e1afd --- /dev/null +++ b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/List.hs @@ -0,0 +1,245 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudbilling.BillingAccounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the billing accounts that the current authenticated user +-- [owns](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ for @CloudbillingBillingAccountsList@. +module Cloudbilling.BillingAccounts.List + ( + -- * REST Resource + BillingAccountsListAPI + + -- * Creating a Request + , billingAccountsList + , BillingAccountsList + + -- * Request Lenses + , balXgafv + , balQuotaUser + , balPrettyPrint + , balUploadProtocol + , balPp + , balAccessToken + , balUploadType + , balBearerToken + , balKey + , balPageToken + , balOauthToken + , balPageSize + , balFields + , balCallback + , balAlt + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudbillingBillingAccountsList@ which the +-- 'BillingAccountsList' request conforms to. +type BillingAccountsListAPI = + "v1" :> + "billingAccounts" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListBillingAccountsResponse + +-- | Lists the billing accounts that the current authenticated user +-- [owns](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ 'billingAccountsList' smart constructor. +data BillingAccountsList = BillingAccountsList + { _balXgafv :: !(Maybe Text) + , _balQuotaUser :: !(Maybe Text) + , _balPrettyPrint :: !Bool + , _balUploadProtocol :: !(Maybe Text) + , _balPp :: !Bool + , _balAccessToken :: !(Maybe Text) + , _balUploadType :: !(Maybe Text) + , _balBearerToken :: !(Maybe Text) + , _balKey :: !(Maybe Text) + , _balPageToken :: !(Maybe Text) + , _balOauthToken :: !(Maybe Text) + , _balPageSize :: !(Maybe Int32) + , _balFields :: !(Maybe Text) + , _balCallback :: !(Maybe Text) + , _balAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingAccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'balXgafv' +-- +-- * 'balQuotaUser' +-- +-- * 'balPrettyPrint' +-- +-- * 'balUploadProtocol' +-- +-- * 'balPp' +-- +-- * 'balAccessToken' +-- +-- * 'balUploadType' +-- +-- * 'balBearerToken' +-- +-- * 'balKey' +-- +-- * 'balPageToken' +-- +-- * 'balOauthToken' +-- +-- * 'balPageSize' +-- +-- * 'balFields' +-- +-- * 'balCallback' +-- +-- * 'balAlt' +billingAccountsList + :: BillingAccountsList +billingAccountsList = + BillingAccountsList + { _balXgafv = Nothing + , _balQuotaUser = Nothing + , _balPrettyPrint = True + , _balUploadProtocol = Nothing + , _balPp = True + , _balAccessToken = Nothing + , _balUploadType = Nothing + , _balBearerToken = Nothing + , _balKey = Nothing + , _balPageToken = Nothing + , _balOauthToken = Nothing + , _balPageSize = Nothing + , _balFields = Nothing + , _balCallback = Nothing + , _balAlt = "json" + } + +-- | V1 error format. +balXgafv :: Lens' BillingAccountsList' (Maybe Text) +balXgafv = lens _balXgafv (\ s a -> s{_balXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +balQuotaUser :: Lens' BillingAccountsList' (Maybe Text) +balQuotaUser + = lens _balQuotaUser (\ s a -> s{_balQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +balPrettyPrint :: Lens' BillingAccountsList' Bool +balPrettyPrint + = lens _balPrettyPrint + (\ s a -> s{_balPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +balUploadProtocol :: Lens' BillingAccountsList' (Maybe Text) +balUploadProtocol + = lens _balUploadProtocol + (\ s a -> s{_balUploadProtocol = a}) + +-- | Pretty-print response. +balPp :: Lens' BillingAccountsList' Bool +balPp = lens _balPp (\ s a -> s{_balPp = a}) + +-- | OAuth access token. +balAccessToken :: Lens' BillingAccountsList' (Maybe Text) +balAccessToken + = lens _balAccessToken + (\ s a -> s{_balAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +balUploadType :: Lens' BillingAccountsList' (Maybe Text) +balUploadType + = lens _balUploadType + (\ s a -> s{_balUploadType = a}) + +-- | OAuth bearer token. +balBearerToken :: Lens' BillingAccountsList' (Maybe Text) +balBearerToken + = lens _balBearerToken + (\ s a -> s{_balBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +balKey :: Lens' BillingAccountsList' (Maybe Text) +balKey = lens _balKey (\ s a -> s{_balKey = a}) + +-- | A token identifying a page of results to return. This should be a +-- \`next_page_token\` value returned from a previous +-- \`ListBillingAccounts\` call. If unspecified, the first page of results +-- is returned. +balPageToken :: Lens' BillingAccountsList' (Maybe Text) +balPageToken + = lens _balPageToken (\ s a -> s{_balPageToken = a}) + +-- | OAuth 2.0 token for the current user. +balOauthToken :: Lens' BillingAccountsList' (Maybe Text) +balOauthToken + = lens _balOauthToken + (\ s a -> s{_balOauthToken = a}) + +-- | Requested page size. The maximum page size is 100; this is also the +-- default. +balPageSize :: Lens' BillingAccountsList' (Maybe Int32) +balPageSize + = lens _balPageSize (\ s a -> s{_balPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +balFields :: Lens' BillingAccountsList' (Maybe Text) +balFields + = lens _balFields (\ s a -> s{_balFields = a}) + +-- | JSONP +balCallback :: Lens' BillingAccountsList' (Maybe Text) +balCallback + = lens _balCallback (\ s a -> s{_balCallback = a}) + +-- | Data format for response. +balAlt :: Lens' BillingAccountsList' Text +balAlt = lens _balAlt (\ s a -> s{_balAlt = a}) + +instance GoogleRequest BillingAccountsList' where + type Rs BillingAccountsList' = + ListBillingAccountsResponse + request = requestWithRoute defReq billingURL + requestWithRoute r u BillingAccountsList{..} + = go _balXgafv _balQuotaUser _balPrettyPrint + _balUploadProtocol + _balPp + _balAccessToken + _balUploadType + _balBearerToken + _balKey + _balPageToken + _balOauthToken + _balPageSize + _balFields + _balCallback + _balAlt + where go + = clientWithRoute + (Proxy :: Proxy BillingAccountsListAPI) + r + u diff --git a/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Projects/List.hs b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Projects/List.hs new file mode 100644 index 000000000..326e03b02 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/BillingAccounts/Projects/List.hs @@ -0,0 +1,265 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudbilling.BillingAccounts.Projects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the projects associated with a billing account. The current +-- authenticated user must be an [owner of the billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ for @CloudbillingBillingAccountsProjectsList@. +module Cloudbilling.BillingAccounts.Projects.List + ( + -- * REST Resource + BillingAccountsProjectsListAPI + + -- * Creating a Request + , billingAccountsProjectsList + , BillingAccountsProjectsList + + -- * Request Lenses + , baplXgafv + , baplQuotaUser + , baplPrettyPrint + , baplUploadProtocol + , baplPp + , baplAccessToken + , baplUploadType + , baplBearerToken + , baplKey + , baplName + , baplPageToken + , baplOauthToken + , baplPageSize + , baplFields + , baplCallback + , baplAlt + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudbillingBillingAccountsProjectsList@ which the +-- 'BillingAccountsProjectsList' request conforms to. +type BillingAccountsProjectsListAPI = + "v1" :> + "{+name}" :> + "projects" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListProjectBillingInfoResponse + +-- | Lists the projects associated with a billing account. The current +-- authenticated user must be an [owner of the billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). +-- +-- /See:/ 'billingAccountsProjectsList' smart constructor. +data BillingAccountsProjectsList = BillingAccountsProjectsList + { _baplXgafv :: !(Maybe Text) + , _baplQuotaUser :: !(Maybe Text) + , _baplPrettyPrint :: !Bool + , _baplUploadProtocol :: !(Maybe Text) + , _baplPp :: !Bool + , _baplAccessToken :: !(Maybe Text) + , _baplUploadType :: !(Maybe Text) + , _baplBearerToken :: !(Maybe Text) + , _baplKey :: !(Maybe Text) + , _baplName :: !Text + , _baplPageToken :: !(Maybe Text) + , _baplOauthToken :: !(Maybe Text) + , _baplPageSize :: !(Maybe Int32) + , _baplFields :: !(Maybe Text) + , _baplCallback :: !(Maybe Text) + , _baplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BillingAccountsProjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baplXgafv' +-- +-- * 'baplQuotaUser' +-- +-- * 'baplPrettyPrint' +-- +-- * 'baplUploadProtocol' +-- +-- * 'baplPp' +-- +-- * 'baplAccessToken' +-- +-- * 'baplUploadType' +-- +-- * 'baplBearerToken' +-- +-- * 'baplKey' +-- +-- * 'baplName' +-- +-- * 'baplPageToken' +-- +-- * 'baplOauthToken' +-- +-- * 'baplPageSize' +-- +-- * 'baplFields' +-- +-- * 'baplCallback' +-- +-- * 'baplAlt' +billingAccountsProjectsList + :: Text -- ^ 'name' + -> BillingAccountsProjectsList +billingAccountsProjectsList pBaplName_ = + BillingAccountsProjectsList + { _baplXgafv = Nothing + , _baplQuotaUser = Nothing + , _baplPrettyPrint = True + , _baplUploadProtocol = Nothing + , _baplPp = True + , _baplAccessToken = Nothing + , _baplUploadType = Nothing + , _baplBearerToken = Nothing + , _baplKey = Nothing + , _baplName = pBaplName_ + , _baplPageToken = Nothing + , _baplOauthToken = Nothing + , _baplPageSize = Nothing + , _baplFields = Nothing + , _baplCallback = Nothing + , _baplAlt = "json" + } + +-- | V1 error format. +baplXgafv :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplXgafv + = lens _baplXgafv (\ s a -> s{_baplXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +baplQuotaUser :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplQuotaUser + = lens _baplQuotaUser + (\ s a -> s{_baplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +baplPrettyPrint :: Lens' BillingAccountsProjectsList' Bool +baplPrettyPrint + = lens _baplPrettyPrint + (\ s a -> s{_baplPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +baplUploadProtocol :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplUploadProtocol + = lens _baplUploadProtocol + (\ s a -> s{_baplUploadProtocol = a}) + +-- | Pretty-print response. +baplPp :: Lens' BillingAccountsProjectsList' Bool +baplPp = lens _baplPp (\ s a -> s{_baplPp = a}) + +-- | OAuth access token. +baplAccessToken :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplAccessToken + = lens _baplAccessToken + (\ s a -> s{_baplAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +baplUploadType :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplUploadType + = lens _baplUploadType + (\ s a -> s{_baplUploadType = a}) + +-- | OAuth bearer token. +baplBearerToken :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplBearerToken + = lens _baplBearerToken + (\ s a -> s{_baplBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +baplKey :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplKey = lens _baplKey (\ s a -> s{_baplKey = a}) + +-- | The resource name of the billing account associated with the projects +-- that you want to list. For example, +-- \`billingAccounts\/012345-567890-ABCDEF\`. +baplName :: Lens' BillingAccountsProjectsList' Text +baplName = lens _baplName (\ s a -> s{_baplName = a}) + +-- | A token identifying a page of results to be returned. This should be a +-- \`next_page_token\` value returned from a previous +-- \`ListProjectBillingInfo\` call. If unspecified, the first page of +-- results is returned. +baplPageToken :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplPageToken + = lens _baplPageToken + (\ s a -> s{_baplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +baplOauthToken :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplOauthToken + = lens _baplOauthToken + (\ s a -> s{_baplOauthToken = a}) + +-- | Requested page size. The maximum page size is 100; this is also the +-- default. +baplPageSize :: Lens' BillingAccountsProjectsList' (Maybe Int32) +baplPageSize + = lens _baplPageSize (\ s a -> s{_baplPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +baplFields :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplFields + = lens _baplFields (\ s a -> s{_baplFields = a}) + +-- | JSONP +baplCallback :: Lens' BillingAccountsProjectsList' (Maybe Text) +baplCallback + = lens _baplCallback (\ s a -> s{_baplCallback = a}) + +-- | Data format for response. +baplAlt :: Lens' BillingAccountsProjectsList' Text +baplAlt = lens _baplAlt (\ s a -> s{_baplAlt = a}) + +instance GoogleRequest BillingAccountsProjectsList' + where + type Rs BillingAccountsProjectsList' = + ListProjectBillingInfoResponse + request = requestWithRoute defReq billingURL + requestWithRoute r u BillingAccountsProjectsList{..} + = go _baplXgafv _baplQuotaUser _baplPrettyPrint + _baplUploadProtocol + _baplPp + _baplAccessToken + _baplUploadType + _baplBearerToken + _baplKey + _baplName + _baplPageToken + _baplOauthToken + _baplPageSize + _baplFields + _baplCallback + _baplAlt + where go + = clientWithRoute + (Proxy :: Proxy BillingAccountsProjectsListAPI) + r + u diff --git a/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/GetBillingInfo.hs b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/GetBillingInfo.hs new file mode 100644 index 000000000..c41a20e8f --- /dev/null +++ b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/GetBillingInfo.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudbilling.Projects.GetBillingInfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the billing information for a project. The current authenticated +-- user must have [permission to view the +-- project](https:\/\/cloud.google.com\/docs\/permissions-overview#h.bgs0oxofvnoo +-- ). +-- +-- /See:/ for @CloudbillingProjectsGetBillingInfo@. +module Cloudbilling.Projects.GetBillingInfo + ( + -- * REST Resource + ProjectsGetBillingInfoAPI + + -- * Creating a Request + , projectsGetBillingInfo + , ProjectsGetBillingInfo + + -- * Request Lenses + , pgbiXgafv + , pgbiQuotaUser + , pgbiPrettyPrint + , pgbiUploadProtocol + , pgbiPp + , pgbiAccessToken + , pgbiUploadType + , pgbiBearerToken + , pgbiKey + , pgbiName + , pgbiOauthToken + , pgbiFields + , pgbiCallback + , pgbiAlt + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudbillingProjectsGetBillingInfo@ which the +-- 'ProjectsGetBillingInfo' request conforms to. +type ProjectsGetBillingInfoAPI = + "v1" :> + "{+name}" :> + "billingInfo" :> Get '[JSON] ProjectBillingInfo + +-- | Gets the billing information for a project. The current authenticated +-- user must have [permission to view the +-- project](https:\/\/cloud.google.com\/docs\/permissions-overview#h.bgs0oxofvnoo +-- ). +-- +-- /See:/ 'projectsGetBillingInfo' smart constructor. +data ProjectsGetBillingInfo = ProjectsGetBillingInfo + { _pgbiXgafv :: !(Maybe Text) + , _pgbiQuotaUser :: !(Maybe Text) + , _pgbiPrettyPrint :: !Bool + , _pgbiUploadProtocol :: !(Maybe Text) + , _pgbiPp :: !Bool + , _pgbiAccessToken :: !(Maybe Text) + , _pgbiUploadType :: !(Maybe Text) + , _pgbiBearerToken :: !(Maybe Text) + , _pgbiKey :: !(Maybe Text) + , _pgbiName :: !Text + , _pgbiOauthToken :: !(Maybe Text) + , _pgbiFields :: !(Maybe Text) + , _pgbiCallback :: !(Maybe Text) + , _pgbiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGetBillingInfo'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgbiXgafv' +-- +-- * 'pgbiQuotaUser' +-- +-- * 'pgbiPrettyPrint' +-- +-- * 'pgbiUploadProtocol' +-- +-- * 'pgbiPp' +-- +-- * 'pgbiAccessToken' +-- +-- * 'pgbiUploadType' +-- +-- * 'pgbiBearerToken' +-- +-- * 'pgbiKey' +-- +-- * 'pgbiName' +-- +-- * 'pgbiOauthToken' +-- +-- * 'pgbiFields' +-- +-- * 'pgbiCallback' +-- +-- * 'pgbiAlt' +projectsGetBillingInfo + :: Text -- ^ 'name' + -> ProjectsGetBillingInfo +projectsGetBillingInfo pPgbiName_ = + ProjectsGetBillingInfo + { _pgbiXgafv = Nothing + , _pgbiQuotaUser = Nothing + , _pgbiPrettyPrint = True + , _pgbiUploadProtocol = Nothing + , _pgbiPp = True + , _pgbiAccessToken = Nothing + , _pgbiUploadType = Nothing + , _pgbiBearerToken = Nothing + , _pgbiKey = Nothing + , _pgbiName = pPgbiName_ + , _pgbiOauthToken = Nothing + , _pgbiFields = Nothing + , _pgbiCallback = Nothing + , _pgbiAlt = "json" + } + +-- | V1 error format. +pgbiXgafv :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiXgafv + = lens _pgbiXgafv (\ s a -> s{_pgbiXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pgbiQuotaUser :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiQuotaUser + = lens _pgbiQuotaUser + (\ s a -> s{_pgbiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgbiPrettyPrint :: Lens' ProjectsGetBillingInfo' Bool +pgbiPrettyPrint + = lens _pgbiPrettyPrint + (\ s a -> s{_pgbiPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pgbiUploadProtocol :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiUploadProtocol + = lens _pgbiUploadProtocol + (\ s a -> s{_pgbiUploadProtocol = a}) + +-- | Pretty-print response. +pgbiPp :: Lens' ProjectsGetBillingInfo' Bool +pgbiPp = lens _pgbiPp (\ s a -> s{_pgbiPp = a}) + +-- | OAuth access token. +pgbiAccessToken :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiAccessToken + = lens _pgbiAccessToken + (\ s a -> s{_pgbiAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pgbiUploadType :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiUploadType + = lens _pgbiUploadType + (\ s a -> s{_pgbiUploadType = a}) + +-- | OAuth bearer token. +pgbiBearerToken :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiBearerToken + = lens _pgbiBearerToken + (\ s a -> s{_pgbiBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgbiKey :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiKey = lens _pgbiKey (\ s a -> s{_pgbiKey = a}) + +-- | The resource name of the project for which billing information is +-- retrieved. For example, \`projects\/tokyo-rain-123\`. +pgbiName :: Lens' ProjectsGetBillingInfo' Text +pgbiName = lens _pgbiName (\ s a -> s{_pgbiName = a}) + +-- | OAuth 2.0 token for the current user. +pgbiOauthToken :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiOauthToken + = lens _pgbiOauthToken + (\ s a -> s{_pgbiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgbiFields :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiFields + = lens _pgbiFields (\ s a -> s{_pgbiFields = a}) + +-- | JSONP +pgbiCallback :: Lens' ProjectsGetBillingInfo' (Maybe Text) +pgbiCallback + = lens _pgbiCallback (\ s a -> s{_pgbiCallback = a}) + +-- | Data format for response. +pgbiAlt :: Lens' ProjectsGetBillingInfo' Text +pgbiAlt = lens _pgbiAlt (\ s a -> s{_pgbiAlt = a}) + +instance GoogleRequest ProjectsGetBillingInfo' where + type Rs ProjectsGetBillingInfo' = ProjectBillingInfo + request = requestWithRoute defReq billingURL + requestWithRoute r u ProjectsGetBillingInfo{..} + = go _pgbiXgafv _pgbiQuotaUser _pgbiPrettyPrint + _pgbiUploadProtocol + _pgbiPp + _pgbiAccessToken + _pgbiUploadType + _pgbiBearerToken + _pgbiKey + _pgbiName + _pgbiOauthToken + _pgbiFields + _pgbiCallback + _pgbiAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsGetBillingInfoAPI) + r + u diff --git a/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/UpdateBillingInfo.hs b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/UpdateBillingInfo.hs new file mode 100644 index 000000000..6825ccae6 --- /dev/null +++ b/gogol-billing/gen/Network/Google/Resource/Cloudbilling/Projects/UpdateBillingInfo.hs @@ -0,0 +1,282 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudbilling.Projects.UpdateBillingInfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets or updates the billing account associated with a project. You +-- specify the new billing account by setting the \`billing_account_name\` +-- in the \`ProjectBillingInfo\` resource to the resource name of a billing +-- account. Associating a project with an open billing account enables +-- billing on the project and allows charges for resource usage. If the +-- project already had a billing account, this method changes the billing +-- account used for resource usage charges. *Note:* Incurred charges that +-- have not yet been reported in the transaction history of the Google +-- Developers Console may be billed to the new billing account, even if the +-- charge occurred before the new billing account was assigned to the +-- project. The current authenticated user must have ownership privileges +-- for both the +-- [project](https:\/\/cloud.google.com\/docs\/permissions-overview#h.bgs0oxofvnoo +-- ) and the [billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). You can +-- disable billing on the project by setting the \`billing_account_name\` +-- field to empty. This action disassociates the current billing account +-- from the project. Any billable activity of your in-use services will +-- stop, and your application could stop functioning as expected. Any +-- unbilled charges to date will be billed to the previously associated +-- account. The current authenticated user must be either an owner of the +-- project or an owner of the billing account for the project. Note that +-- associating a project with a *closed* billing account will have much the +-- same effect as disabling billing on the project: any paid resources used +-- by the project will be shut down. Thus, unless you wish to disable +-- billing, you should always call this method with the name of an *open* +-- billing account. +-- +-- /See:/ for @CloudbillingProjectsUpdateBillingInfo@. +module Cloudbilling.Projects.UpdateBillingInfo + ( + -- * REST Resource + ProjectsUpdateBillingInfoAPI + + -- * Creating a Request + , projectsUpdateBillingInfo + , ProjectsUpdateBillingInfo + + -- * Request Lenses + , pubiXgafv + , pubiQuotaUser + , pubiPrettyPrint + , pubiUploadProtocol + , pubiPp + , pubiAccessToken + , pubiUploadType + , pubiBearerToken + , pubiKey + , pubiName + , pubiOauthToken + , pubiFields + , pubiCallback + , pubiAlt + ) where + +import Network.Google.Billing.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudbillingProjectsUpdateBillingInfo@ which the +-- 'ProjectsUpdateBillingInfo' request conforms to. +type ProjectsUpdateBillingInfoAPI = + "v1" :> + "{+name}" :> + "billingInfo" :> Put '[JSON] ProjectBillingInfo + +-- | Sets or updates the billing account associated with a project. You +-- specify the new billing account by setting the \`billing_account_name\` +-- in the \`ProjectBillingInfo\` resource to the resource name of a billing +-- account. Associating a project with an open billing account enables +-- billing on the project and allows charges for resource usage. If the +-- project already had a billing account, this method changes the billing +-- account used for resource usage charges. *Note:* Incurred charges that +-- have not yet been reported in the transaction history of the Google +-- Developers Console may be billed to the new billing account, even if the +-- charge occurred before the new billing account was assigned to the +-- project. The current authenticated user must have ownership privileges +-- for both the +-- [project](https:\/\/cloud.google.com\/docs\/permissions-overview#h.bgs0oxofvnoo +-- ) and the [billing +-- account](https:\/\/support.google.com\/cloud\/answer\/4430947). You can +-- disable billing on the project by setting the \`billing_account_name\` +-- field to empty. This action disassociates the current billing account +-- from the project. Any billable activity of your in-use services will +-- stop, and your application could stop functioning as expected. Any +-- unbilled charges to date will be billed to the previously associated +-- account. The current authenticated user must be either an owner of the +-- project or an owner of the billing account for the project. Note that +-- associating a project with a *closed* billing account will have much the +-- same effect as disabling billing on the project: any paid resources used +-- by the project will be shut down. Thus, unless you wish to disable +-- billing, you should always call this method with the name of an *open* +-- billing account. +-- +-- /See:/ 'projectsUpdateBillingInfo' smart constructor. +data ProjectsUpdateBillingInfo = ProjectsUpdateBillingInfo + { _pubiXgafv :: !(Maybe Text) + , _pubiQuotaUser :: !(Maybe Text) + , _pubiPrettyPrint :: !Bool + , _pubiUploadProtocol :: !(Maybe Text) + , _pubiPp :: !Bool + , _pubiAccessToken :: !(Maybe Text) + , _pubiUploadType :: !(Maybe Text) + , _pubiBearerToken :: !(Maybe Text) + , _pubiKey :: !(Maybe Text) + , _pubiName :: !Text + , _pubiOauthToken :: !(Maybe Text) + , _pubiFields :: !(Maybe Text) + , _pubiCallback :: !(Maybe Text) + , _pubiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsUpdateBillingInfo'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pubiXgafv' +-- +-- * 'pubiQuotaUser' +-- +-- * 'pubiPrettyPrint' +-- +-- * 'pubiUploadProtocol' +-- +-- * 'pubiPp' +-- +-- * 'pubiAccessToken' +-- +-- * 'pubiUploadType' +-- +-- * 'pubiBearerToken' +-- +-- * 'pubiKey' +-- +-- * 'pubiName' +-- +-- * 'pubiOauthToken' +-- +-- * 'pubiFields' +-- +-- * 'pubiCallback' +-- +-- * 'pubiAlt' +projectsUpdateBillingInfo + :: Text -- ^ 'name' + -> ProjectsUpdateBillingInfo +projectsUpdateBillingInfo pPubiName_ = + ProjectsUpdateBillingInfo + { _pubiXgafv = Nothing + , _pubiQuotaUser = Nothing + , _pubiPrettyPrint = True + , _pubiUploadProtocol = Nothing + , _pubiPp = True + , _pubiAccessToken = Nothing + , _pubiUploadType = Nothing + , _pubiBearerToken = Nothing + , _pubiKey = Nothing + , _pubiName = pPubiName_ + , _pubiOauthToken = Nothing + , _pubiFields = Nothing + , _pubiCallback = Nothing + , _pubiAlt = "json" + } + +-- | V1 error format. +pubiXgafv :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiXgafv + = lens _pubiXgafv (\ s a -> s{_pubiXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pubiQuotaUser :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiQuotaUser + = lens _pubiQuotaUser + (\ s a -> s{_pubiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pubiPrettyPrint :: Lens' ProjectsUpdateBillingInfo' Bool +pubiPrettyPrint + = lens _pubiPrettyPrint + (\ s a -> s{_pubiPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pubiUploadProtocol :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiUploadProtocol + = lens _pubiUploadProtocol + (\ s a -> s{_pubiUploadProtocol = a}) + +-- | Pretty-print response. +pubiPp :: Lens' ProjectsUpdateBillingInfo' Bool +pubiPp = lens _pubiPp (\ s a -> s{_pubiPp = a}) + +-- | OAuth access token. +pubiAccessToken :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiAccessToken + = lens _pubiAccessToken + (\ s a -> s{_pubiAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pubiUploadType :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiUploadType + = lens _pubiUploadType + (\ s a -> s{_pubiUploadType = a}) + +-- | OAuth bearer token. +pubiBearerToken :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiBearerToken + = lens _pubiBearerToken + (\ s a -> s{_pubiBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pubiKey :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiKey = lens _pubiKey (\ s a -> s{_pubiKey = a}) + +-- | The resource name of the project associated with the billing information +-- that you want to update. For example, \`projects\/tokyo-rain-123\`. +pubiName :: Lens' ProjectsUpdateBillingInfo' Text +pubiName = lens _pubiName (\ s a -> s{_pubiName = a}) + +-- | OAuth 2.0 token for the current user. +pubiOauthToken :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiOauthToken + = lens _pubiOauthToken + (\ s a -> s{_pubiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pubiFields :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiFields + = lens _pubiFields (\ s a -> s{_pubiFields = a}) + +-- | JSONP +pubiCallback :: Lens' ProjectsUpdateBillingInfo' (Maybe Text) +pubiCallback + = lens _pubiCallback (\ s a -> s{_pubiCallback = a}) + +-- | Data format for response. +pubiAlt :: Lens' ProjectsUpdateBillingInfo' Text +pubiAlt = lens _pubiAlt (\ s a -> s{_pubiAlt = a}) + +instance GoogleRequest ProjectsUpdateBillingInfo' + where + type Rs ProjectsUpdateBillingInfo' = + ProjectBillingInfo + request = requestWithRoute defReq billingURL + requestWithRoute r u ProjectsUpdateBillingInfo{..} + = go _pubiXgafv _pubiQuotaUser _pubiPrettyPrint + _pubiUploadProtocol + _pubiPp + _pubiAccessToken + _pubiUploadType + _pubiBearerToken + _pubiKey + _pubiName + _pubiOauthToken + _pubiFields + _pubiCallback + _pubiAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsUpdateBillingInfoAPI) + r + u diff --git a/gogol-billing/gogol-billing.cabal b/gogol-billing/gogol-billing.cabal new file mode 100644 index 000000000..295c545a5 --- /dev/null +++ b/gogol-billing/gogol-billing.cabal @@ -0,0 +1,48 @@ +name: gogol-billing +version: 0.0.1 +synopsis: Google Cloud Billing API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Retrieves Google Developers Console billing accounts and associates them + with projects. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Billing + , Network.Google.Billing.Types + , Network.Google.Resource.Cloudbilling.BillingAccounts.Get + , Network.Google.Resource.Cloudbilling.BillingAccounts.List + , Network.Google.Resource.Cloudbilling.BillingAccounts.Projects.List + , Network.Google.Resource.Cloudbilling.Projects.GetBillingInfo + , Network.Google.Resource.Cloudbilling.Projects.UpdateBillingInfo + + other-modules: + Network.Google.Billing.Types.Product + , Network.Google.Billing.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-billing/src/.gitkeep b/gogol-billing/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-blogger/LICENSE b/gogol-blogger/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-blogger/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-blogger/Makefile b/gogol-blogger/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-blogger/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-blogger/README.md b/gogol-blogger/README.md new file mode 100644 index 000000000..1edd39b86 --- /dev/null +++ b/gogol-blogger/README.md @@ -0,0 +1,28 @@ +# gogol-blogger + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Blogger API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-blogger` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-blogger/Setup.hs b/gogol-blogger/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-blogger/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-blogger/gen/Network/Google/Blogger.hs b/gogol-blogger/gen/Network/Google/Blogger.hs new file mode 100644 index 000000000..0e6af9f62 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Blogger.hs @@ -0,0 +1,342 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Blogger +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for access to the data within Blogger. +-- +-- /See:/ +module Network.Google.Blogger + ( + -- * API + BloggerAPI + , bloggerAPI + , bloggerURL + + -- * Service Methods + + -- * REST Resources + + -- ** BloggerBlogUserInfosGet + , module Blogger.BlogUserInfos.Get + + -- ** BloggerBlogsGet + , module Blogger.Blogs.Get + + -- ** BloggerBlogsGetByURL + , module Blogger.Blogs.GetByURL + + -- ** BloggerBlogsListByUser + , module Blogger.Blogs.ListByUser + + -- ** BloggerCommentsApprove + , module Blogger.Comments.Approve + + -- ** BloggerCommentsDelete + , module Blogger.Comments.Delete + + -- ** BloggerCommentsGet + , module Blogger.Comments.Get + + -- ** BloggerCommentsList + , module Blogger.Comments.List + + -- ** BloggerCommentsListByBlog + , module Blogger.Comments.ListByBlog + + -- ** BloggerCommentsMarkAsSpam + , module Blogger.Comments.MarkAsSpam + + -- ** BloggerCommentsRemoveContent + , module Blogger.Comments.RemoveContent + + -- ** BloggerPageViewsGet + , module Blogger.PageViews.Get + + -- ** BloggerPagesDelete + , module Blogger.Pages.Delete + + -- ** BloggerPagesGet + , module Blogger.Pages.Get + + -- ** BloggerPagesInsert + , module Blogger.Pages.Insert + + -- ** BloggerPagesList + , module Blogger.Pages.List + + -- ** BloggerPagesPatch + , module Blogger.Pages.Patch + + -- ** BloggerPagesPublish + , module Blogger.Pages.Publish + + -- ** BloggerPagesRevert + , module Blogger.Pages.Revert + + -- ** BloggerPagesUpdate + , module Blogger.Pages.Update + + -- ** BloggerPostUserInfosGet + , module Blogger.PostUserInfos.Get + + -- ** BloggerPostUserInfosList + , module Blogger.PostUserInfos.List + + -- ** BloggerPostsDelete + , module Blogger.Posts.Delete + + -- ** BloggerPostsGet + , module Blogger.Posts.Get + + -- ** BloggerPostsGetByPath + , module Blogger.Posts.GetByPath + + -- ** BloggerPostsInsert + , module Blogger.Posts.Insert + + -- ** BloggerPostsList + , module Blogger.Posts.List + + -- ** BloggerPostsPatch + , module Blogger.Posts.Patch + + -- ** BloggerPostsPublish + , module Blogger.Posts.Publish + + -- ** BloggerPostsRevert + , module Blogger.Posts.Revert + + -- ** BloggerPostsSearch + , module Blogger.Posts.Search + + -- ** BloggerPostsUpdate + , module Blogger.Posts.Update + + -- ** BloggerUsersGet + , module Blogger.Users.Get + + -- * Types + + -- ** PostUserInfo + , PostUserInfo + , postUserInfo + , puiPostUserInfo + , puiPost + , puiKind + + -- ** PostList + , PostList + , postList + , plEtag + , plNextPageToken + , plKind + , plItems + + -- ** Pageviews + , Pageviews + , pageviews + , pKind + , pCounts + , pBlogId + + -- ** Post + , Post + , post + , posImages + , posStatus + , posEtag + , posReaderComments + , posLocation + , posKind + , posPublished + , posUrl + , posBlog + , posCustomMetaData + , posContent + , posReplies + , posSelfLink + , posAuthor + , posId + , posLabels + , posUpdated + , posTitleLink + , posTitle + + -- ** Page + , Page + , page + , pagStatus + , pagEtag + , pagKind + , pagPublished + , pagUrl + , pagBlog + , pagContent + , pagSelfLink + , pagAuthor + , pagId + , pagUpdated + , pagTitle + + -- ** Blog + , Blog + , blog + , bStatus + , bKind + , bPages + , bLocale + , bPublished + , bUrl + , bCustomMetaData + , bSelfLink + , bName + , bId + , bUpdated + , bPosts + , bDescription + + -- ** PageList + , PageList + , pageList + , pllEtag + , pllNextPageToken + , pllKind + , pllItems + + -- ** User + , User + , user + , uBlogs + , uKind + , uCreated + , uLocale + , uUrl + , uSelfLink + , uAbout + , uDisplayName + , uId + + -- ** BlogList + , BlogList + , blogList + , blKind + , blItems + , blBlogUserInfos + + -- ** PostPerUserInfo + , PostPerUserInfo + , postPerUserInfo + , ppuiKind + , ppuiBlogId + , ppuiUserId + , ppuiHasEditAccess + , ppuiPostId + + -- ** Comment + , Comment + , comment + , cStatus + , cPost + , cKind + , cPublished + , cBlog + , cContent + , cSelfLink + , cAuthor + , cId + , cUpdated + , cInReplyTo + + -- ** PostUserInfosList + , PostUserInfosList + , postUserInfosList + , puilNextPageToken + , puilKind + , puilItems + + -- ** BlogPerUserInfo + , BlogPerUserInfo + , blogPerUserInfo + , bpuiPhotosAlbumKey + , bpuiKind + , bpuiBlogId + , bpuiUserId + , bpuiRole + , bpuiHasAdminAccess + + -- ** CommentList + , CommentList + , commentList + , clEtag + , clNextPageToken + , clKind + , clItems + , clPrevPageToken + + -- ** BlogUserInfo + , BlogUserInfo + , blogUserInfo + , buiKind + , buiBlog + , buiBlogUserInfo + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude +import Network.Google.Resource.Blogger.Blogs.Get +import Network.Google.Resource.Blogger.Blogs.GetByURL +import Network.Google.Resource.Blogger.Blogs.ListByUser +import Network.Google.Resource.Blogger.BlogUserInfos.Get +import Network.Google.Resource.Blogger.Comments.Approve +import Network.Google.Resource.Blogger.Comments.Delete +import Network.Google.Resource.Blogger.Comments.Get +import Network.Google.Resource.Blogger.Comments.List +import Network.Google.Resource.Blogger.Comments.ListByBlog +import Network.Google.Resource.Blogger.Comments.MarkAsSpam +import Network.Google.Resource.Blogger.Comments.RemoveContent +import Network.Google.Resource.Blogger.Pages.Delete +import Network.Google.Resource.Blogger.Pages.Get +import Network.Google.Resource.Blogger.Pages.Insert +import Network.Google.Resource.Blogger.Pages.List +import Network.Google.Resource.Blogger.Pages.Patch +import Network.Google.Resource.Blogger.Pages.Publish +import Network.Google.Resource.Blogger.Pages.Revert +import Network.Google.Resource.Blogger.Pages.Update +import Network.Google.Resource.Blogger.PageViews.Get +import Network.Google.Resource.Blogger.Posts.Delete +import Network.Google.Resource.Blogger.Posts.Get +import Network.Google.Resource.Blogger.Posts.GetByPath +import Network.Google.Resource.Blogger.Posts.Insert +import Network.Google.Resource.Blogger.Posts.List +import Network.Google.Resource.Blogger.Posts.Patch +import Network.Google.Resource.Blogger.Posts.Publish +import Network.Google.Resource.Blogger.Posts.Revert +import Network.Google.Resource.Blogger.Posts.Search +import Network.Google.Resource.Blogger.Posts.Update +import Network.Google.Resource.Blogger.PostUserInfos.Get +import Network.Google.Resource.Blogger.PostUserInfos.List +import Network.Google.Resource.Blogger.Users.Get + +{- $resources +TODO +-} + +type BloggerAPI = + PostUserInfos :<|> Users :<|> PageViews :<|> Blogs + :<|> Pages + :<|> BlogUserInfos + :<|> Comments + :<|> Posts + +bloggerAPI :: Proxy BloggerAPI +bloggerAPI = Proxy diff --git a/gogol-blogger/gen/Network/Google/Blogger/Types.hs b/gogol-blogger/gen/Network/Google/Blogger/Types.hs new file mode 100644 index 000000000..23828678e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Blogger/Types.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Blogger.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Blogger.Types + ( + -- * Service URL + bloggerURL + + -- * PostUserInfo + , PostUserInfo + , postUserInfo + , puiPostUserInfo + , puiPost + , puiKind + + -- * PostList + , PostList + , postList + , plEtag + , plNextPageToken + , plKind + , plItems + + -- * Pageviews + , Pageviews + , pageviews + , pKind + , pCounts + , pBlogId + + -- * Post + , Post + , post + , posImages + , posStatus + , posEtag + , posReaderComments + , posLocation + , posKind + , posPublished + , posUrl + , posBlog + , posCustomMetaData + , posContent + , posReplies + , posSelfLink + , posAuthor + , posId + , posLabels + , posUpdated + , posTitleLink + , posTitle + + -- * Page + , Page + , page + , pagStatus + , pagEtag + , pagKind + , pagPublished + , pagUrl + , pagBlog + , pagContent + , pagSelfLink + , pagAuthor + , pagId + , pagUpdated + , pagTitle + + -- * Blog + , Blog + , blog + , bStatus + , bKind + , bPages + , bLocale + , bPublished + , bUrl + , bCustomMetaData + , bSelfLink + , bName + , bId + , bUpdated + , bPosts + , bDescription + + -- * PageList + , PageList + , pageList + , pllEtag + , pllNextPageToken + , pllKind + , pllItems + + -- * User + , User + , user + , uBlogs + , uKind + , uCreated + , uLocale + , uUrl + , uSelfLink + , uAbout + , uDisplayName + , uId + + -- * BlogList + , BlogList + , blogList + , blKind + , blItems + , blBlogUserInfos + + -- * PostPerUserInfo + , PostPerUserInfo + , postPerUserInfo + , ppuiKind + , ppuiBlogId + , ppuiUserId + , ppuiHasEditAccess + , ppuiPostId + + -- * Comment + , Comment + , comment + , cStatus + , cPost + , cKind + , cPublished + , cBlog + , cContent + , cSelfLink + , cAuthor + , cId + , cUpdated + , cInReplyTo + + -- * PostUserInfosList + , PostUserInfosList + , postUserInfosList + , puilNextPageToken + , puilKind + , puilItems + + -- * BlogPerUserInfo + , BlogPerUserInfo + , blogPerUserInfo + , bpuiPhotosAlbumKey + , bpuiKind + , bpuiBlogId + , bpuiUserId + , bpuiRole + , bpuiHasAdminAccess + + -- * CommentList + , CommentList + , commentList + , clEtag + , clNextPageToken + , clKind + , clItems + , clPrevPageToken + + -- * BlogUserInfo + , BlogUserInfo + , blogUserInfo + , buiKind + , buiBlog + , buiBlogUserInfo + ) where + +import Network.Google.Blogger.Types.Product +import Network.Google.Blogger.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v3' of the Blogger API. +bloggerURL :: BaseURL +bloggerURL + = BaseUrl Https + "https://www.googleapis.com/blogger/v3/" + 443 diff --git a/gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs b/gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs new file mode 100644 index 000000000..29773aa80 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs @@ -0,0 +1,1477 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Blogger.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Blogger.Types.Product where + +import Network.Google.Blogger.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'postUserInfo' smart constructor. +data PostUserInfo = PostUserInfo + { _puiPostUserInfo :: !(Maybe (Maybe PostPerUserInfo)) + , _puiPost :: !(Maybe (Maybe Post)) + , _puiKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostUserInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puiPostUserInfo' +-- +-- * 'puiPost' +-- +-- * 'puiKind' +postUserInfo + :: PostUserInfo +postUserInfo = + PostUserInfo + { _puiPostUserInfo = Nothing + , _puiPost = Nothing + , _puiKind = "blogger#postUserInfo" + } + +-- | Information about a User for the Post. +puiPostUserInfo :: Lens' PostUserInfo (Maybe (Maybe PostPerUserInfo)) +puiPostUserInfo + = lens _puiPostUserInfo + (\ s a -> s{_puiPostUserInfo = a}) + +-- | The Post resource. +puiPost :: Lens' PostUserInfo (Maybe (Maybe Post)) +puiPost = lens _puiPost (\ s a -> s{_puiPost = a}) + +-- | The kind of this entity. Always blogger#postUserInfo +puiKind :: Lens' PostUserInfo Text +puiKind = lens _puiKind (\ s a -> s{_puiKind = a}) + +instance FromJSON PostUserInfo where + parseJSON + = withObject "PostUserInfo" + (\ o -> + PostUserInfo <$> + (o .:? "post_user_info") <*> (o .:? "post") <*> + (o .:? "kind" .!= "blogger#postUserInfo")) + +instance ToJSON PostUserInfo where + toJSON PostUserInfo{..} + = object + (catMaybes + [("post_user_info" .=) <$> _puiPostUserInfo, + ("post" .=) <$> _puiPost, Just ("kind" .= _puiKind)]) + +-- +-- /See:/ 'postList' smart constructor. +data PostList = PostList + { _plEtag :: !(Maybe Text) + , _plNextPageToken :: !(Maybe Text) + , _plKind :: !Text + , _plItems :: !(Maybe [Maybe Post]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plEtag' +-- +-- * 'plNextPageToken' +-- +-- * 'plKind' +-- +-- * 'plItems' +postList + :: PostList +postList = + PostList + { _plEtag = Nothing + , _plNextPageToken = Nothing + , _plKind = "blogger#postList" + , _plItems = Nothing + } + +-- | Etag of the response. +plEtag :: Lens' PostList (Maybe Text) +plEtag = lens _plEtag (\ s a -> s{_plEtag = a}) + +-- | Pagination token to fetch the next page, if one exists. +plNextPageToken :: Lens' PostList (Maybe Text) +plNextPageToken + = lens _plNextPageToken + (\ s a -> s{_plNextPageToken = a}) + +-- | The kind of this entity. Always blogger#postList +plKind :: Lens' PostList Text +plKind = lens _plKind (\ s a -> s{_plKind = a}) + +-- | The list of Posts for this Blog. +plItems :: Lens' PostList [Maybe Post] +plItems + = lens _plItems (\ s a -> s{_plItems = a}) . _Default + . _Coerce + +instance FromJSON PostList where + parseJSON + = withObject "PostList" + (\ o -> + PostList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "blogger#postList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PostList where + toJSON PostList{..} + = object + (catMaybes + [("etag" .=) <$> _plEtag, + ("nextPageToken" .=) <$> _plNextPageToken, + Just ("kind" .= _plKind), ("items" .=) <$> _plItems]) + +-- +-- /See:/ 'pageviews' smart constructor. +data Pageviews = Pageviews + { _pKind :: !Text + , _pCounts :: !(Maybe [PageviewsCountsItem]) + , _pBlogId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Pageviews' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKind' +-- +-- * 'pCounts' +-- +-- * 'pBlogId' +pageviews + :: Pageviews +pageviews = + Pageviews + { _pKind = "blogger#page_views" + , _pCounts = Nothing + , _pBlogId = Nothing + } + +-- | The kind of this entry. Always blogger#page_views +pKind :: Lens' Pageviews Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The container of posts in this blog. +pCounts :: Lens' Pageviews [PageviewsCountsItem] +pCounts + = lens _pCounts (\ s a -> s{_pCounts = a}) . _Default + . _Coerce + +-- | Blog Id +pBlogId :: Lens' Pageviews (Maybe Text) +pBlogId = lens _pBlogId (\ s a -> s{_pBlogId = a}) + +instance FromJSON Pageviews where + parseJSON + = withObject "Pageviews" + (\ o -> + Pageviews <$> + (o .:? "kind" .!= "blogger#page_views") <*> + (o .:? "counts" .!= mempty) + <*> (o .:? "blogId")) + +instance ToJSON Pageviews where + toJSON Pageviews{..} + = object + (catMaybes + [Just ("kind" .= _pKind), ("counts" .=) <$> _pCounts, + ("blogId" .=) <$> _pBlogId]) + +-- +-- /See:/ 'post' smart constructor. +data Post = Post + { _posImages :: !(Maybe [PostImagesItem]) + , _posStatus :: !(Maybe Text) + , _posEtag :: !(Maybe Text) + , _posReaderComments :: !(Maybe Text) + , _posLocation :: !(Maybe PostLocation) + , _posKind :: !Text + , _posPublished :: !(Maybe UTCTime) + , _posUrl :: !(Maybe Text) + , _posBlog :: !(Maybe PostBlog) + , _posCustomMetaData :: !(Maybe Text) + , _posContent :: !(Maybe Text) + , _posReplies :: !(Maybe PostReplies) + , _posSelfLink :: !(Maybe Text) + , _posAuthor :: !(Maybe PostAuthor) + , _posId :: !(Maybe Text) + , _posLabels :: !(Maybe [Text]) + , _posUpdated :: !(Maybe UTCTime) + , _posTitleLink :: !(Maybe Text) + , _posTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Post' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'posImages' +-- +-- * 'posStatus' +-- +-- * 'posEtag' +-- +-- * 'posReaderComments' +-- +-- * 'posLocation' +-- +-- * 'posKind' +-- +-- * 'posPublished' +-- +-- * 'posUrl' +-- +-- * 'posBlog' +-- +-- * 'posCustomMetaData' +-- +-- * 'posContent' +-- +-- * 'posReplies' +-- +-- * 'posSelfLink' +-- +-- * 'posAuthor' +-- +-- * 'posId' +-- +-- * 'posLabels' +-- +-- * 'posUpdated' +-- +-- * 'posTitleLink' +-- +-- * 'posTitle' +post + :: Post +post = + Post + { _posImages = Nothing + , _posStatus = Nothing + , _posEtag = Nothing + , _posReaderComments = Nothing + , _posLocation = Nothing + , _posKind = "blogger#post" + , _posPublished = Nothing + , _posUrl = Nothing + , _posBlog = Nothing + , _posCustomMetaData = Nothing + , _posContent = Nothing + , _posReplies = Nothing + , _posSelfLink = Nothing + , _posAuthor = Nothing + , _posId = Nothing + , _posLabels = Nothing + , _posUpdated = Nothing + , _posTitleLink = Nothing + , _posTitle = Nothing + } + +-- | Display image for the Post. +posImages :: Lens' Post [PostImagesItem] +posImages + = lens _posImages (\ s a -> s{_posImages = a}) . + _Default + . _Coerce + +-- | Status of the post. Only set for admin-level requests +posStatus :: Lens' Post (Maybe Text) +posStatus + = lens _posStatus (\ s a -> s{_posStatus = a}) + +-- | Etag of the resource. +posEtag :: Lens' Post (Maybe Text) +posEtag = lens _posEtag (\ s a -> s{_posEtag = a}) + +-- | Comment control and display setting for readers of this post. +posReaderComments :: Lens' Post (Maybe Text) +posReaderComments + = lens _posReaderComments + (\ s a -> s{_posReaderComments = a}) + +-- | The location for geotagged posts. +posLocation :: Lens' Post (Maybe PostLocation) +posLocation + = lens _posLocation (\ s a -> s{_posLocation = a}) + +-- | The kind of this entity. Always blogger#post +posKind :: Lens' Post Text +posKind = lens _posKind (\ s a -> s{_posKind = a}) + +-- | RFC 3339 date-time when this Post was published. +posPublished :: Lens' Post (Maybe UTCTime) +posPublished + = lens _posPublished (\ s a -> s{_posPublished = a}) + +-- | The URL where this Post is displayed. +posUrl :: Lens' Post (Maybe Text) +posUrl = lens _posUrl (\ s a -> s{_posUrl = a}) + +-- | Data about the blog containing this Post. +posBlog :: Lens' Post (Maybe PostBlog) +posBlog = lens _posBlog (\ s a -> s{_posBlog = a}) + +-- | The JSON meta-data for the Post. +posCustomMetaData :: Lens' Post (Maybe Text) +posCustomMetaData + = lens _posCustomMetaData + (\ s a -> s{_posCustomMetaData = a}) + +-- | The content of the Post. May contain HTML markup. +posContent :: Lens' Post (Maybe Text) +posContent + = lens _posContent (\ s a -> s{_posContent = a}) + +-- | The container of comments on this Post. +posReplies :: Lens' Post (Maybe PostReplies) +posReplies + = lens _posReplies (\ s a -> s{_posReplies = a}) + +-- | The API REST URL to fetch this resource from. +posSelfLink :: Lens' Post (Maybe Text) +posSelfLink + = lens _posSelfLink (\ s a -> s{_posSelfLink = a}) + +-- | The author of this Post. +posAuthor :: Lens' Post (Maybe PostAuthor) +posAuthor + = lens _posAuthor (\ s a -> s{_posAuthor = a}) + +-- | The identifier of this Post. +posId :: Lens' Post (Maybe Text) +posId = lens _posId (\ s a -> s{_posId = a}) + +-- | The list of labels this Post was tagged with. +posLabels :: Lens' Post [Text] +posLabels + = lens _posLabels (\ s a -> s{_posLabels = a}) . + _Default + . _Coerce + +-- | RFC 3339 date-time when this Post was last updated. +posUpdated :: Lens' Post (Maybe UTCTime) +posUpdated + = lens _posUpdated (\ s a -> s{_posUpdated = a}) + +-- | The title link URL, similar to atom\'s related link. +posTitleLink :: Lens' Post (Maybe Text) +posTitleLink + = lens _posTitleLink (\ s a -> s{_posTitleLink = a}) + +-- | The title of the Post. +posTitle :: Lens' Post (Maybe Text) +posTitle = lens _posTitle (\ s a -> s{_posTitle = a}) + +instance FromJSON Post where + parseJSON + = withObject "Post" + (\ o -> + Post <$> + (o .:? "images" .!= mempty) <*> (o .:? "status") <*> + (o .:? "etag") + <*> (o .:? "readerComments") + <*> (o .:? "location") + <*> (o .:? "kind" .!= "blogger#post") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "blog") + <*> (o .:? "customMetaData") + <*> (o .:? "content") + <*> (o .:? "replies") + <*> (o .:? "selfLink") + <*> (o .:? "author") + <*> (o .:? "id") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "updated") + <*> (o .:? "titleLink") + <*> (o .:? "title")) + +instance ToJSON Post where + toJSON Post{..} + = object + (catMaybes + [("images" .=) <$> _posImages, + ("status" .=) <$> _posStatus, + ("etag" .=) <$> _posEtag, + ("readerComments" .=) <$> _posReaderComments, + ("location" .=) <$> _posLocation, + Just ("kind" .= _posKind), + ("published" .=) <$> _posPublished, + ("url" .=) <$> _posUrl, ("blog" .=) <$> _posBlog, + ("customMetaData" .=) <$> _posCustomMetaData, + ("content" .=) <$> _posContent, + ("replies" .=) <$> _posReplies, + ("selfLink" .=) <$> _posSelfLink, + ("author" .=) <$> _posAuthor, ("id" .=) <$> _posId, + ("labels" .=) <$> _posLabels, + ("updated" .=) <$> _posUpdated, + ("titleLink" .=) <$> _posTitleLink, + ("title" .=) <$> _posTitle]) + +-- +-- /See:/ 'page' smart constructor. +data Page = Page + { _pagStatus :: !(Maybe Text) + , _pagEtag :: !(Maybe Text) + , _pagKind :: !Text + , _pagPublished :: !(Maybe UTCTime) + , _pagUrl :: !(Maybe Text) + , _pagBlog :: !(Maybe PageBlog) + , _pagContent :: !(Maybe Text) + , _pagSelfLink :: !(Maybe Text) + , _pagAuthor :: !(Maybe PageAuthor) + , _pagId :: !(Maybe Text) + , _pagUpdated :: !(Maybe UTCTime) + , _pagTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Page' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pagStatus' +-- +-- * 'pagEtag' +-- +-- * 'pagKind' +-- +-- * 'pagPublished' +-- +-- * 'pagUrl' +-- +-- * 'pagBlog' +-- +-- * 'pagContent' +-- +-- * 'pagSelfLink' +-- +-- * 'pagAuthor' +-- +-- * 'pagId' +-- +-- * 'pagUpdated' +-- +-- * 'pagTitle' +page + :: Page +page = + Page + { _pagStatus = Nothing + , _pagEtag = Nothing + , _pagKind = "blogger#page" + , _pagPublished = Nothing + , _pagUrl = Nothing + , _pagBlog = Nothing + , _pagContent = Nothing + , _pagSelfLink = Nothing + , _pagAuthor = Nothing + , _pagId = Nothing + , _pagUpdated = Nothing + , _pagTitle = Nothing + } + +-- | The status of the page for admin resources (either LIVE or DRAFT). +pagStatus :: Lens' Page (Maybe Text) +pagStatus + = lens _pagStatus (\ s a -> s{_pagStatus = a}) + +-- | Etag of the resource. +pagEtag :: Lens' Page (Maybe Text) +pagEtag = lens _pagEtag (\ s a -> s{_pagEtag = a}) + +-- | The kind of this entity. Always blogger#page +pagKind :: Lens' Page Text +pagKind = lens _pagKind (\ s a -> s{_pagKind = a}) + +-- | RFC 3339 date-time when this Page was published. +pagPublished :: Lens' Page (Maybe UTCTime) +pagPublished + = lens _pagPublished (\ s a -> s{_pagPublished = a}) + +-- | The URL that this Page is displayed at. +pagUrl :: Lens' Page (Maybe Text) +pagUrl = lens _pagUrl (\ s a -> s{_pagUrl = a}) + +-- | Data about the blog containing this Page. +pagBlog :: Lens' Page (Maybe PageBlog) +pagBlog = lens _pagBlog (\ s a -> s{_pagBlog = a}) + +-- | The body content of this Page, in HTML. +pagContent :: Lens' Page (Maybe Text) +pagContent + = lens _pagContent (\ s a -> s{_pagContent = a}) + +-- | The API REST URL to fetch this resource from. +pagSelfLink :: Lens' Page (Maybe Text) +pagSelfLink + = lens _pagSelfLink (\ s a -> s{_pagSelfLink = a}) + +-- | The author of this Page. +pagAuthor :: Lens' Page (Maybe PageAuthor) +pagAuthor + = lens _pagAuthor (\ s a -> s{_pagAuthor = a}) + +-- | The identifier for this resource. +pagId :: Lens' Page (Maybe Text) +pagId = lens _pagId (\ s a -> s{_pagId = a}) + +-- | RFC 3339 date-time when this Page was last updated. +pagUpdated :: Lens' Page (Maybe UTCTime) +pagUpdated + = lens _pagUpdated (\ s a -> s{_pagUpdated = a}) + +-- | The title of this entity. This is the name displayed in the Admin user +-- interface. +pagTitle :: Lens' Page (Maybe Text) +pagTitle = lens _pagTitle (\ s a -> s{_pagTitle = a}) + +instance FromJSON Page where + parseJSON + = withObject "Page" + (\ o -> + Page <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "blogger#page") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "blog") + <*> (o .:? "content") + <*> (o .:? "selfLink") + <*> (o .:? "author") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON Page where + toJSON Page{..} + = object + (catMaybes + [("status" .=) <$> _pagStatus, + ("etag" .=) <$> _pagEtag, Just ("kind" .= _pagKind), + ("published" .=) <$> _pagPublished, + ("url" .=) <$> _pagUrl, ("blog" .=) <$> _pagBlog, + ("content" .=) <$> _pagContent, + ("selfLink" .=) <$> _pagSelfLink, + ("author" .=) <$> _pagAuthor, ("id" .=) <$> _pagId, + ("updated" .=) <$> _pagUpdated, + ("title" .=) <$> _pagTitle]) + +-- +-- /See:/ 'blog' smart constructor. +data Blog = Blog + { _bStatus :: !(Maybe Text) + , _bKind :: !Text + , _bPages :: !(Maybe BlogPages) + , _bLocale :: !(Maybe BlogLocale) + , _bPublished :: !(Maybe UTCTime) + , _bUrl :: !(Maybe Text) + , _bCustomMetaData :: !(Maybe Text) + , _bSelfLink :: !(Maybe Text) + , _bName :: !(Maybe Text) + , _bId :: !(Maybe Text) + , _bUpdated :: !(Maybe UTCTime) + , _bPosts :: !(Maybe BlogPosts) + , _bDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Blog' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bStatus' +-- +-- * 'bKind' +-- +-- * 'bPages' +-- +-- * 'bLocale' +-- +-- * 'bPublished' +-- +-- * 'bUrl' +-- +-- * 'bCustomMetaData' +-- +-- * 'bSelfLink' +-- +-- * 'bName' +-- +-- * 'bId' +-- +-- * 'bUpdated' +-- +-- * 'bPosts' +-- +-- * 'bDescription' +blog + :: Blog +blog = + Blog + { _bStatus = Nothing + , _bKind = "blogger#blog" + , _bPages = Nothing + , _bLocale = Nothing + , _bPublished = Nothing + , _bUrl = Nothing + , _bCustomMetaData = Nothing + , _bSelfLink = Nothing + , _bName = Nothing + , _bId = Nothing + , _bUpdated = Nothing + , _bPosts = Nothing + , _bDescription = Nothing + } + +-- | The status of the blog. +bStatus :: Lens' Blog (Maybe Text) +bStatus = lens _bStatus (\ s a -> s{_bStatus = a}) + +-- | The kind of this entry. Always blogger#blog +bKind :: Lens' Blog Text +bKind = lens _bKind (\ s a -> s{_bKind = a}) + +-- | The container of pages in this blog. +bPages :: Lens' Blog (Maybe BlogPages) +bPages = lens _bPages (\ s a -> s{_bPages = a}) + +-- | The locale this Blog is set to. +bLocale :: Lens' Blog (Maybe BlogLocale) +bLocale = lens _bLocale (\ s a -> s{_bLocale = a}) + +-- | RFC 3339 date-time when this blog was published. +bPublished :: Lens' Blog (Maybe UTCTime) +bPublished + = lens _bPublished (\ s a -> s{_bPublished = a}) + +-- | The URL where this blog is published. +bUrl :: Lens' Blog (Maybe Text) +bUrl = lens _bUrl (\ s a -> s{_bUrl = a}) + +-- | The JSON custom meta-data for the Blog +bCustomMetaData :: Lens' Blog (Maybe Text) +bCustomMetaData + = lens _bCustomMetaData + (\ s a -> s{_bCustomMetaData = a}) + +-- | The API REST URL to fetch this resource from. +bSelfLink :: Lens' Blog (Maybe Text) +bSelfLink + = lens _bSelfLink (\ s a -> s{_bSelfLink = a}) + +-- | The name of this blog. This is displayed as the title. +bName :: Lens' Blog (Maybe Text) +bName = lens _bName (\ s a -> s{_bName = a}) + +-- | The identifier for this resource. +bId :: Lens' Blog (Maybe Text) +bId = lens _bId (\ s a -> s{_bId = a}) + +-- | RFC 3339 date-time when this blog was last updated. +bUpdated :: Lens' Blog (Maybe UTCTime) +bUpdated = lens _bUpdated (\ s a -> s{_bUpdated = a}) + +-- | The container of posts in this blog. +bPosts :: Lens' Blog (Maybe BlogPosts) +bPosts = lens _bPosts (\ s a -> s{_bPosts = a}) + +-- | The description of this blog. This is displayed underneath the title. +bDescription :: Lens' Blog (Maybe Text) +bDescription + = lens _bDescription (\ s a -> s{_bDescription = a}) + +instance FromJSON Blog where + parseJSON + = withObject "Blog" + (\ o -> + Blog <$> + (o .:? "status") <*> + (o .:? "kind" .!= "blogger#blog") + <*> (o .:? "pages") + <*> (o .:? "locale") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "customMetaData") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "posts") + <*> (o .:? "description")) + +instance ToJSON Blog where + toJSON Blog{..} + = object + (catMaybes + [("status" .=) <$> _bStatus, Just ("kind" .= _bKind), + ("pages" .=) <$> _bPages, ("locale" .=) <$> _bLocale, + ("published" .=) <$> _bPublished, + ("url" .=) <$> _bUrl, + ("customMetaData" .=) <$> _bCustomMetaData, + ("selfLink" .=) <$> _bSelfLink, + ("name" .=) <$> _bName, ("id" .=) <$> _bId, + ("updated" .=) <$> _bUpdated, + ("posts" .=) <$> _bPosts, + ("description" .=) <$> _bDescription]) + +-- +-- /See:/ 'pageList' smart constructor. +data PageList = PageList + { _pllEtag :: !(Maybe Text) + , _pllNextPageToken :: !(Maybe Text) + , _pllKind :: !Text + , _pllItems :: !(Maybe [Maybe Page]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PageList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllEtag' +-- +-- * 'pllNextPageToken' +-- +-- * 'pllKind' +-- +-- * 'pllItems' +pageList + :: PageList +pageList = + PageList + { _pllEtag = Nothing + , _pllNextPageToken = Nothing + , _pllKind = "blogger#pageList" + , _pllItems = Nothing + } + +-- | Etag of the response. +pllEtag :: Lens' PageList (Maybe Text) +pllEtag = lens _pllEtag (\ s a -> s{_pllEtag = a}) + +-- | Pagination token to fetch the next page, if one exists. +pllNextPageToken :: Lens' PageList (Maybe Text) +pllNextPageToken + = lens _pllNextPageToken + (\ s a -> s{_pllNextPageToken = a}) + +-- | The kind of this entity. Always blogger#pageList +pllKind :: Lens' PageList Text +pllKind = lens _pllKind (\ s a -> s{_pllKind = a}) + +-- | The list of Pages for a Blog. +pllItems :: Lens' PageList [Maybe Page] +pllItems + = lens _pllItems (\ s a -> s{_pllItems = a}) . + _Default + . _Coerce + +instance FromJSON PageList where + parseJSON + = withObject "PageList" + (\ o -> + PageList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "blogger#pageList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PageList where + toJSON PageList{..} + = object + (catMaybes + [("etag" .=) <$> _pllEtag, + ("nextPageToken" .=) <$> _pllNextPageToken, + Just ("kind" .= _pllKind), + ("items" .=) <$> _pllItems]) + +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uBlogs :: !(Maybe UserBlogs) + , _uKind :: !Text + , _uCreated :: !(Maybe UTCTime) + , _uLocale :: !(Maybe UserLocale) + , _uUrl :: !(Maybe Text) + , _uSelfLink :: !(Maybe Text) + , _uAbout :: !(Maybe Text) + , _uDisplayName :: !(Maybe Text) + , _uId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uBlogs' +-- +-- * 'uKind' +-- +-- * 'uCreated' +-- +-- * 'uLocale' +-- +-- * 'uUrl' +-- +-- * 'uSelfLink' +-- +-- * 'uAbout' +-- +-- * 'uDisplayName' +-- +-- * 'uId' +user + :: User +user = + User + { _uBlogs = Nothing + , _uKind = "blogger#user" + , _uCreated = Nothing + , _uLocale = Nothing + , _uUrl = Nothing + , _uSelfLink = Nothing + , _uAbout = Nothing + , _uDisplayName = Nothing + , _uId = Nothing + } + +-- | The container of blogs for this user. +uBlogs :: Lens' User (Maybe UserBlogs) +uBlogs = lens _uBlogs (\ s a -> s{_uBlogs = a}) + +-- | The kind of this entity. Always blogger#user +uKind :: Lens' User Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | The timestamp of when this profile was created, in seconds since epoch. +uCreated :: Lens' User (Maybe UTCTime) +uCreated = lens _uCreated (\ s a -> s{_uCreated = a}) + +-- | This user\'s locale +uLocale :: Lens' User (Maybe UserLocale) +uLocale = lens _uLocale (\ s a -> s{_uLocale = a}) + +-- | The user\'s profile page. +uUrl :: Lens' User (Maybe Text) +uUrl = lens _uUrl (\ s a -> s{_uUrl = a}) + +-- | The API REST URL to fetch this resource from. +uSelfLink :: Lens' User (Maybe Text) +uSelfLink + = lens _uSelfLink (\ s a -> s{_uSelfLink = a}) + +-- | Profile summary information. +uAbout :: Lens' User (Maybe Text) +uAbout = lens _uAbout (\ s a -> s{_uAbout = a}) + +-- | The display name. +uDisplayName :: Lens' User (Maybe Text) +uDisplayName + = lens _uDisplayName (\ s a -> s{_uDisplayName = a}) + +-- | The identifier for this User. +uId :: Lens' User (Maybe Text) +uId = lens _uId (\ s a -> s{_uId = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "blogs") <*> (o .:? "kind" .!= "blogger#user") + <*> (o .:? "created") + <*> (o .:? "locale") + <*> (o .:? "url") + <*> (o .:? "selfLink") + <*> (o .:? "about") + <*> (o .:? "displayName") + <*> (o .:? "id")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("blogs" .=) <$> _uBlogs, Just ("kind" .= _uKind), + ("created" .=) <$> _uCreated, + ("locale" .=) <$> _uLocale, ("url" .=) <$> _uUrl, + ("selfLink" .=) <$> _uSelfLink, + ("about" .=) <$> _uAbout, + ("displayName" .=) <$> _uDisplayName, + ("id" .=) <$> _uId]) + +-- +-- /See:/ 'blogList' smart constructor. +data BlogList = BlogList + { _blKind :: !Text + , _blItems :: !(Maybe [Maybe Blog]) + , _blBlogUserInfos :: !(Maybe [Maybe BlogUserInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blKind' +-- +-- * 'blItems' +-- +-- * 'blBlogUserInfos' +blogList + :: BlogList +blogList = + BlogList + { _blKind = "blogger#blogList" + , _blItems = Nothing + , _blBlogUserInfos = Nothing + } + +-- | The kind of this entity. Always blogger#blogList +blKind :: Lens' BlogList Text +blKind = lens _blKind (\ s a -> s{_blKind = a}) + +-- | The list of Blogs this user has Authorship or Admin rights over. +blItems :: Lens' BlogList [Maybe Blog] +blItems + = lens _blItems (\ s a -> s{_blItems = a}) . _Default + . _Coerce + +-- | Admin level list of blog per-user information +blBlogUserInfos :: Lens' BlogList [Maybe BlogUserInfo] +blBlogUserInfos + = lens _blBlogUserInfos + (\ s a -> s{_blBlogUserInfos = a}) + . _Default + . _Coerce + +instance FromJSON BlogList where + parseJSON + = withObject "BlogList" + (\ o -> + BlogList <$> + (o .:? "kind" .!= "blogger#blogList") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "blogUserInfos" .!= mempty)) + +instance ToJSON BlogList where + toJSON BlogList{..} + = object + (catMaybes + [Just ("kind" .= _blKind), ("items" .=) <$> _blItems, + ("blogUserInfos" .=) <$> _blBlogUserInfos]) + +-- +-- /See:/ 'postPerUserInfo' smart constructor. +data PostPerUserInfo = PostPerUserInfo + { _ppuiKind :: !Text + , _ppuiBlogId :: !(Maybe Text) + , _ppuiUserId :: !(Maybe Text) + , _ppuiHasEditAccess :: !(Maybe Bool) + , _ppuiPostId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostPerUserInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppuiKind' +-- +-- * 'ppuiBlogId' +-- +-- * 'ppuiUserId' +-- +-- * 'ppuiHasEditAccess' +-- +-- * 'ppuiPostId' +postPerUserInfo + :: PostPerUserInfo +postPerUserInfo = + PostPerUserInfo + { _ppuiKind = "blogger#postPerUserInfo" + , _ppuiBlogId = Nothing + , _ppuiUserId = Nothing + , _ppuiHasEditAccess = Nothing + , _ppuiPostId = Nothing + } + +-- | The kind of this entity. Always blogger#postPerUserInfo +ppuiKind :: Lens' PostPerUserInfo Text +ppuiKind = lens _ppuiKind (\ s a -> s{_ppuiKind = a}) + +-- | ID of the Blog that the post resource belongs to. +ppuiBlogId :: Lens' PostPerUserInfo (Maybe Text) +ppuiBlogId + = lens _ppuiBlogId (\ s a -> s{_ppuiBlogId = a}) + +-- | ID of the User. +ppuiUserId :: Lens' PostPerUserInfo (Maybe Text) +ppuiUserId + = lens _ppuiUserId (\ s a -> s{_ppuiUserId = a}) + +-- | True if the user has Author level access to the post. +ppuiHasEditAccess :: Lens' PostPerUserInfo (Maybe Bool) +ppuiHasEditAccess + = lens _ppuiHasEditAccess + (\ s a -> s{_ppuiHasEditAccess = a}) + +-- | ID of the Post resource. +ppuiPostId :: Lens' PostPerUserInfo (Maybe Text) +ppuiPostId + = lens _ppuiPostId (\ s a -> s{_ppuiPostId = a}) + +instance FromJSON PostPerUserInfo where + parseJSON + = withObject "PostPerUserInfo" + (\ o -> + PostPerUserInfo <$> + (o .:? "kind" .!= "blogger#postPerUserInfo") <*> + (o .:? "blogId") + <*> (o .:? "userId") + <*> (o .:? "hasEditAccess") + <*> (o .:? "postId")) + +instance ToJSON PostPerUserInfo where + toJSON PostPerUserInfo{..} + = object + (catMaybes + [Just ("kind" .= _ppuiKind), + ("blogId" .=) <$> _ppuiBlogId, + ("userId" .=) <$> _ppuiUserId, + ("hasEditAccess" .=) <$> _ppuiHasEditAccess, + ("postId" .=) <$> _ppuiPostId]) + +-- +-- /See:/ 'comment' smart constructor. +data Comment = Comment + { _cStatus :: !(Maybe Text) + , _cPost :: !(Maybe CommentPost) + , _cKind :: !Text + , _cPublished :: !(Maybe UTCTime) + , _cBlog :: !(Maybe CommentBlog) + , _cContent :: !(Maybe Text) + , _cSelfLink :: !(Maybe Text) + , _cAuthor :: !(Maybe CommentAuthor) + , _cId :: !(Maybe Text) + , _cUpdated :: !(Maybe UTCTime) + , _cInReplyTo :: !(Maybe CommentInReplyTo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Comment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cStatus' +-- +-- * 'cPost' +-- +-- * 'cKind' +-- +-- * 'cPublished' +-- +-- * 'cBlog' +-- +-- * 'cContent' +-- +-- * 'cSelfLink' +-- +-- * 'cAuthor' +-- +-- * 'cId' +-- +-- * 'cUpdated' +-- +-- * 'cInReplyTo' +comment + :: Comment +comment = + Comment + { _cStatus = Nothing + , _cPost = Nothing + , _cKind = "blogger#comment" + , _cPublished = Nothing + , _cBlog = Nothing + , _cContent = Nothing + , _cSelfLink = Nothing + , _cAuthor = Nothing + , _cId = Nothing + , _cUpdated = Nothing + , _cInReplyTo = Nothing + } + +-- | The status of the comment (only populated for admin users) +cStatus :: Lens' Comment (Maybe Text) +cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) + +-- | Data about the post containing this comment. +cPost :: Lens' Comment (Maybe CommentPost) +cPost = lens _cPost (\ s a -> s{_cPost = a}) + +-- | The kind of this entry. Always blogger#comment +cKind :: Lens' Comment Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | RFC 3339 date-time when this comment was published. +cPublished :: Lens' Comment (Maybe UTCTime) +cPublished + = lens _cPublished (\ s a -> s{_cPublished = a}) + +-- | Data about the blog containing this comment. +cBlog :: Lens' Comment (Maybe CommentBlog) +cBlog = lens _cBlog (\ s a -> s{_cBlog = a}) + +-- | The actual content of the comment. May include HTML markup. +cContent :: Lens' Comment (Maybe Text) +cContent = lens _cContent (\ s a -> s{_cContent = a}) + +-- | The API REST URL to fetch this resource from. +cSelfLink :: Lens' Comment (Maybe Text) +cSelfLink + = lens _cSelfLink (\ s a -> s{_cSelfLink = a}) + +-- | The author of this Comment. +cAuthor :: Lens' Comment (Maybe CommentAuthor) +cAuthor = lens _cAuthor (\ s a -> s{_cAuthor = a}) + +-- | The identifier for this resource. +cId :: Lens' Comment (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | RFC 3339 date-time when this comment was last updated. +cUpdated :: Lens' Comment (Maybe UTCTime) +cUpdated = lens _cUpdated (\ s a -> s{_cUpdated = a}) + +-- | Data about the comment this is in reply to. +cInReplyTo :: Lens' Comment (Maybe CommentInReplyTo) +cInReplyTo + = lens _cInReplyTo (\ s a -> s{_cInReplyTo = a}) + +instance FromJSON Comment where + parseJSON + = withObject "Comment" + (\ o -> + Comment <$> + (o .:? "status") <*> (o .:? "post") <*> + (o .:? "kind" .!= "blogger#comment") + <*> (o .:? "published") + <*> (o .:? "blog") + <*> (o .:? "content") + <*> (o .:? "selfLink") + <*> (o .:? "author") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "inReplyTo")) + +instance ToJSON Comment where + toJSON Comment{..} + = object + (catMaybes + [("status" .=) <$> _cStatus, ("post" .=) <$> _cPost, + Just ("kind" .= _cKind), + ("published" .=) <$> _cPublished, + ("blog" .=) <$> _cBlog, ("content" .=) <$> _cContent, + ("selfLink" .=) <$> _cSelfLink, + ("author" .=) <$> _cAuthor, ("id" .=) <$> _cId, + ("updated" .=) <$> _cUpdated, + ("inReplyTo" .=) <$> _cInReplyTo]) + +-- +-- /See:/ 'postUserInfosList' smart constructor. +data PostUserInfosList = PostUserInfosList + { _puilNextPageToken :: !(Maybe Text) + , _puilKind :: !Text + , _puilItems :: !(Maybe [Maybe PostUserInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostUserInfosList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puilNextPageToken' +-- +-- * 'puilKind' +-- +-- * 'puilItems' +postUserInfosList + :: PostUserInfosList +postUserInfosList = + PostUserInfosList + { _puilNextPageToken = Nothing + , _puilKind = "blogger#postUserInfosList" + , _puilItems = Nothing + } + +-- | Pagination token to fetch the next page, if one exists. +puilNextPageToken :: Lens' PostUserInfosList (Maybe Text) +puilNextPageToken + = lens _puilNextPageToken + (\ s a -> s{_puilNextPageToken = a}) + +-- | The kind of this entity. Always blogger#postList +puilKind :: Lens' PostUserInfosList Text +puilKind = lens _puilKind (\ s a -> s{_puilKind = a}) + +-- | The list of Posts with User information for the post, for this Blog. +puilItems :: Lens' PostUserInfosList [Maybe PostUserInfo] +puilItems + = lens _puilItems (\ s a -> s{_puilItems = a}) . + _Default + . _Coerce + +instance FromJSON PostUserInfosList where + parseJSON + = withObject "PostUserInfosList" + (\ o -> + PostUserInfosList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "blogger#postUserInfosList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PostUserInfosList where + toJSON PostUserInfosList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _puilNextPageToken, + Just ("kind" .= _puilKind), + ("items" .=) <$> _puilItems]) + +-- +-- /See:/ 'blogPerUserInfo' smart constructor. +data BlogPerUserInfo = BlogPerUserInfo + { _bpuiPhotosAlbumKey :: !(Maybe Text) + , _bpuiKind :: !Text + , _bpuiBlogId :: !(Maybe Text) + , _bpuiUserId :: !(Maybe Text) + , _bpuiRole :: !(Maybe Text) + , _bpuiHasAdminAccess :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogPerUserInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bpuiPhotosAlbumKey' +-- +-- * 'bpuiKind' +-- +-- * 'bpuiBlogId' +-- +-- * 'bpuiUserId' +-- +-- * 'bpuiRole' +-- +-- * 'bpuiHasAdminAccess' +blogPerUserInfo + :: BlogPerUserInfo +blogPerUserInfo = + BlogPerUserInfo + { _bpuiPhotosAlbumKey = Nothing + , _bpuiKind = "blogger#blogPerUserInfo" + , _bpuiBlogId = Nothing + , _bpuiUserId = Nothing + , _bpuiRole = Nothing + , _bpuiHasAdminAccess = Nothing + } + +-- | The Photo Album Key for the user when adding photos to the blog +bpuiPhotosAlbumKey :: Lens' BlogPerUserInfo (Maybe Text) +bpuiPhotosAlbumKey + = lens _bpuiPhotosAlbumKey + (\ s a -> s{_bpuiPhotosAlbumKey = a}) + +-- | The kind of this entity. Always blogger#blogPerUserInfo +bpuiKind :: Lens' BlogPerUserInfo Text +bpuiKind = lens _bpuiKind (\ s a -> s{_bpuiKind = a}) + +-- | ID of the Blog resource +bpuiBlogId :: Lens' BlogPerUserInfo (Maybe Text) +bpuiBlogId + = lens _bpuiBlogId (\ s a -> s{_bpuiBlogId = a}) + +-- | ID of the User +bpuiUserId :: Lens' BlogPerUserInfo (Maybe Text) +bpuiUserId + = lens _bpuiUserId (\ s a -> s{_bpuiUserId = a}) + +-- | Access permissions that the user has for the blog (ADMIN, AUTHOR, or +-- READER). +bpuiRole :: Lens' BlogPerUserInfo (Maybe Text) +bpuiRole = lens _bpuiRole (\ s a -> s{_bpuiRole = a}) + +-- | True if the user has Admin level access to the blog. +bpuiHasAdminAccess :: Lens' BlogPerUserInfo (Maybe Bool) +bpuiHasAdminAccess + = lens _bpuiHasAdminAccess + (\ s a -> s{_bpuiHasAdminAccess = a}) + +instance FromJSON BlogPerUserInfo where + parseJSON + = withObject "BlogPerUserInfo" + (\ o -> + BlogPerUserInfo <$> + (o .:? "photosAlbumKey") <*> + (o .:? "kind" .!= "blogger#blogPerUserInfo") + <*> (o .:? "blogId") + <*> (o .:? "userId") + <*> (o .:? "role") + <*> (o .:? "hasAdminAccess")) + +instance ToJSON BlogPerUserInfo where + toJSON BlogPerUserInfo{..} + = object + (catMaybes + [("photosAlbumKey" .=) <$> _bpuiPhotosAlbumKey, + Just ("kind" .= _bpuiKind), + ("blogId" .=) <$> _bpuiBlogId, + ("userId" .=) <$> _bpuiUserId, + ("role" .=) <$> _bpuiRole, + ("hasAdminAccess" .=) <$> _bpuiHasAdminAccess]) + +-- +-- /See:/ 'commentList' smart constructor. +data CommentList = CommentList + { _clEtag :: !(Maybe Text) + , _clNextPageToken :: !(Maybe Text) + , _clKind :: !Text + , _clItems :: !(Maybe [Maybe Comment]) + , _clPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clEtag' +-- +-- * 'clNextPageToken' +-- +-- * 'clKind' +-- +-- * 'clItems' +-- +-- * 'clPrevPageToken' +commentList + :: CommentList +commentList = + CommentList + { _clEtag = Nothing + , _clNextPageToken = Nothing + , _clKind = "blogger#commentList" + , _clItems = Nothing + , _clPrevPageToken = Nothing + } + +-- | Etag of the response. +clEtag :: Lens' CommentList (Maybe Text) +clEtag = lens _clEtag (\ s a -> s{_clEtag = a}) + +-- | Pagination token to fetch the next page, if one exists. +clNextPageToken :: Lens' CommentList (Maybe Text) +clNextPageToken + = lens _clNextPageToken + (\ s a -> s{_clNextPageToken = a}) + +-- | The kind of this entry. Always blogger#commentList +clKind :: Lens' CommentList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | The List of Comments for a Post. +clItems :: Lens' CommentList [Maybe Comment] +clItems + = lens _clItems (\ s a -> s{_clItems = a}) . _Default + . _Coerce + +-- | Pagination token to fetch the previous page, if one exists. +clPrevPageToken :: Lens' CommentList (Maybe Text) +clPrevPageToken + = lens _clPrevPageToken + (\ s a -> s{_clPrevPageToken = a}) + +instance FromJSON CommentList where + parseJSON + = withObject "CommentList" + (\ o -> + CommentList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "blogger#commentList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "prevPageToken")) + +instance ToJSON CommentList where + toJSON CommentList{..} + = object + (catMaybes + [("etag" .=) <$> _clEtag, + ("nextPageToken" .=) <$> _clNextPageToken, + Just ("kind" .= _clKind), ("items" .=) <$> _clItems, + ("prevPageToken" .=) <$> _clPrevPageToken]) + +-- +-- /See:/ 'blogUserInfo' smart constructor. +data BlogUserInfo = BlogUserInfo + { _buiKind :: !Text + , _buiBlog :: !(Maybe (Maybe Blog)) + , _buiBlogUserInfo :: !(Maybe (Maybe BlogPerUserInfo)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogUserInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buiKind' +-- +-- * 'buiBlog' +-- +-- * 'buiBlogUserInfo' +blogUserInfo + :: BlogUserInfo +blogUserInfo = + BlogUserInfo + { _buiKind = "blogger#blogUserInfo" + , _buiBlog = Nothing + , _buiBlogUserInfo = Nothing + } + +-- | The kind of this entity. Always blogger#blogUserInfo +buiKind :: Lens' BlogUserInfo Text +buiKind = lens _buiKind (\ s a -> s{_buiKind = a}) + +-- | The Blog resource. +buiBlog :: Lens' BlogUserInfo (Maybe (Maybe Blog)) +buiBlog = lens _buiBlog (\ s a -> s{_buiBlog = a}) + +-- | Information about a User for the Blog. +buiBlogUserInfo :: Lens' BlogUserInfo (Maybe (Maybe BlogPerUserInfo)) +buiBlogUserInfo + = lens _buiBlogUserInfo + (\ s a -> s{_buiBlogUserInfo = a}) + +instance FromJSON BlogUserInfo where + parseJSON + = withObject "BlogUserInfo" + (\ o -> + BlogUserInfo <$> + (o .:? "kind" .!= "blogger#blogUserInfo") <*> + (o .:? "blog") + <*> (o .:? "blog_user_info")) + +instance ToJSON BlogUserInfo where + toJSON BlogUserInfo{..} + = object + (catMaybes + [Just ("kind" .= _buiKind), ("blog" .=) <$> _buiBlog, + ("blog_user_info" .=) <$> _buiBlogUserInfo]) diff --git a/gogol-blogger/gen/Network/Google/Blogger/Types/Sum.hs b/gogol-blogger/gen/Network/Google/Blogger/Types/Sum.hs new file mode 100644 index 000000000..0404de678 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Blogger/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Blogger.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Blogger.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs new file mode 100644 index 000000000..693129aeb --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.BlogUserInfos.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one blog and user info pair by blogId and userId. +-- +-- /See:/ for @BloggerBlogUserInfosGet@. +module Blogger.BlogUserInfos.Get + ( + -- * REST Resource + BlogUserInfosGetAPI + + -- * Creating a Request + , blogUserInfosGet + , BlogUserInfosGet + + -- * Request Lenses + , buigQuotaUser + , buigPrettyPrint + , buigUserIp + , buigBlogId + , buigUserId + , buigKey + , buigMaxPosts + , buigOauthToken + , buigFields + , buigAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerBlogUserInfosGet@ which the +-- 'BlogUserInfosGet' request conforms to. +type BlogUserInfosGetAPI = + "users" :> + Capture "userId" Text :> + "blogs" :> + Capture "blogId" Text :> + QueryParam "maxPosts" Word32 :> + Get '[JSON] BlogUserInfo + +-- | Gets one blog and user info pair by blogId and userId. +-- +-- /See:/ 'blogUserInfosGet' smart constructor. +data BlogUserInfosGet = BlogUserInfosGet + { _buigQuotaUser :: !(Maybe Text) + , _buigPrettyPrint :: !Bool + , _buigUserIp :: !(Maybe Text) + , _buigBlogId :: !Text + , _buigUserId :: !Text + , _buigKey :: !(Maybe Text) + , _buigMaxPosts :: !(Maybe Word32) + , _buigOauthToken :: !(Maybe Text) + , _buigFields :: !(Maybe Text) + , _buigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogUserInfosGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buigQuotaUser' +-- +-- * 'buigPrettyPrint' +-- +-- * 'buigUserIp' +-- +-- * 'buigBlogId' +-- +-- * 'buigUserId' +-- +-- * 'buigKey' +-- +-- * 'buigMaxPosts' +-- +-- * 'buigOauthToken' +-- +-- * 'buigFields' +-- +-- * 'buigAlt' +blogUserInfosGet + :: Text -- ^ 'blogId' + -> Text -- ^ 'userId' + -> BlogUserInfosGet +blogUserInfosGet pBuigBlogId_ pBuigUserId_ = + BlogUserInfosGet + { _buigQuotaUser = Nothing + , _buigPrettyPrint = True + , _buigUserIp = Nothing + , _buigBlogId = pBuigBlogId_ + , _buigUserId = pBuigUserId_ + , _buigKey = Nothing + , _buigMaxPosts = Nothing + , _buigOauthToken = Nothing + , _buigFields = Nothing + , _buigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +buigQuotaUser :: Lens' BlogUserInfosGet' (Maybe Text) +buigQuotaUser + = lens _buigQuotaUser + (\ s a -> s{_buigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +buigPrettyPrint :: Lens' BlogUserInfosGet' Bool +buigPrettyPrint + = lens _buigPrettyPrint + (\ s a -> s{_buigPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +buigUserIp :: Lens' BlogUserInfosGet' (Maybe Text) +buigUserIp + = lens _buigUserIp (\ s a -> s{_buigUserIp = a}) + +-- | The ID of the blog to get. +buigBlogId :: Lens' BlogUserInfosGet' Text +buigBlogId + = lens _buigBlogId (\ s a -> s{_buigBlogId = a}) + +-- | ID of the user whose blogs are to be fetched. Either the word \'self\' +-- (sans quote marks) or the user\'s profile identifier. +buigUserId :: Lens' BlogUserInfosGet' Text +buigUserId + = lens _buigUserId (\ s a -> s{_buigUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +buigKey :: Lens' BlogUserInfosGet' (Maybe Text) +buigKey = lens _buigKey (\ s a -> s{_buigKey = a}) + +-- | Maximum number of posts to pull back with the blog. +buigMaxPosts :: Lens' BlogUserInfosGet' (Maybe Word32) +buigMaxPosts + = lens _buigMaxPosts (\ s a -> s{_buigMaxPosts = a}) + +-- | OAuth 2.0 token for the current user. +buigOauthToken :: Lens' BlogUserInfosGet' (Maybe Text) +buigOauthToken + = lens _buigOauthToken + (\ s a -> s{_buigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +buigFields :: Lens' BlogUserInfosGet' (Maybe Text) +buigFields + = lens _buigFields (\ s a -> s{_buigFields = a}) + +-- | Data format for the response. +buigAlt :: Lens' BlogUserInfosGet' Text +buigAlt = lens _buigAlt (\ s a -> s{_buigAlt = a}) + +instance GoogleRequest BlogUserInfosGet' where + type Rs BlogUserInfosGet' = BlogUserInfo + request = requestWithRoute defReq bloggerURL + requestWithRoute r u BlogUserInfosGet{..} + = go _buigQuotaUser _buigPrettyPrint _buigUserIp + _buigBlogId + _buigUserId + _buigKey + _buigMaxPosts + _buigOauthToken + _buigFields + _buigAlt + where go + = clientWithRoute + (Proxy :: Proxy BlogUserInfosGetAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/Get.hs new file mode 100644 index 000000000..d3b6355a3 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/Get.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Blogs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one blog by ID. +-- +-- /See:/ for @BloggerBlogsGet@. +module Blogger.Blogs.Get + ( + -- * REST Resource + BlogsGetAPI + + -- * Creating a Request + , blogsGet + , BlogsGet + + -- * Request Lenses + , bgQuotaUser + , bgPrettyPrint + , bgUserIp + , bgBlogId + , bgKey + , bgMaxPosts + , bgView + , bgOauthToken + , bgFields + , bgAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerBlogsGet@ which the +-- 'BlogsGet' request conforms to. +type BlogsGetAPI = + "blogs" :> + Capture "blogId" Text :> + QueryParam "maxPosts" Word32 :> + QueryParam "view" Text :> Get '[JSON] Blog + +-- | Gets one blog by ID. +-- +-- /See:/ 'blogsGet' smart constructor. +data BlogsGet = BlogsGet + { _bgQuotaUser :: !(Maybe Text) + , _bgPrettyPrint :: !Bool + , _bgUserIp :: !(Maybe Text) + , _bgBlogId :: !Text + , _bgKey :: !(Maybe Text) + , _bgMaxPosts :: !(Maybe Word32) + , _bgView :: !(Maybe Text) + , _bgOauthToken :: !(Maybe Text) + , _bgFields :: !(Maybe Text) + , _bgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgQuotaUser' +-- +-- * 'bgPrettyPrint' +-- +-- * 'bgUserIp' +-- +-- * 'bgBlogId' +-- +-- * 'bgKey' +-- +-- * 'bgMaxPosts' +-- +-- * 'bgView' +-- +-- * 'bgOauthToken' +-- +-- * 'bgFields' +-- +-- * 'bgAlt' +blogsGet + :: Text -- ^ 'blogId' + -> BlogsGet +blogsGet pBgBlogId_ = + BlogsGet + { _bgQuotaUser = Nothing + , _bgPrettyPrint = True + , _bgUserIp = Nothing + , _bgBlogId = pBgBlogId_ + , _bgKey = Nothing + , _bgMaxPosts = Nothing + , _bgView = Nothing + , _bgOauthToken = Nothing + , _bgFields = Nothing + , _bgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bgQuotaUser :: Lens' BlogsGet' (Maybe Text) +bgQuotaUser + = lens _bgQuotaUser (\ s a -> s{_bgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bgPrettyPrint :: Lens' BlogsGet' Bool +bgPrettyPrint + = lens _bgPrettyPrint + (\ s a -> s{_bgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bgUserIp :: Lens' BlogsGet' (Maybe Text) +bgUserIp = lens _bgUserIp (\ s a -> s{_bgUserIp = a}) + +-- | The ID of the blog to get. +bgBlogId :: Lens' BlogsGet' Text +bgBlogId = lens _bgBlogId (\ s a -> s{_bgBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgKey :: Lens' BlogsGet' (Maybe Text) +bgKey = lens _bgKey (\ s a -> s{_bgKey = a}) + +-- | Maximum number of posts to pull back with the blog. +bgMaxPosts :: Lens' BlogsGet' (Maybe Word32) +bgMaxPosts + = lens _bgMaxPosts (\ s a -> s{_bgMaxPosts = a}) + +-- | Access level with which to view the blog. Note that some fields require +-- elevated access. +bgView :: Lens' BlogsGet' (Maybe Text) +bgView = lens _bgView (\ s a -> s{_bgView = a}) + +-- | OAuth 2.0 token for the current user. +bgOauthToken :: Lens' BlogsGet' (Maybe Text) +bgOauthToken + = lens _bgOauthToken (\ s a -> s{_bgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bgFields :: Lens' BlogsGet' (Maybe Text) +bgFields = lens _bgFields (\ s a -> s{_bgFields = a}) + +-- | Data format for the response. +bgAlt :: Lens' BlogsGet' Text +bgAlt = lens _bgAlt (\ s a -> s{_bgAlt = a}) + +instance GoogleRequest BlogsGet' where + type Rs BlogsGet' = Blog + request = requestWithRoute defReq bloggerURL + requestWithRoute r u BlogsGet{..} + = go _bgQuotaUser _bgPrettyPrint _bgUserIp _bgBlogId + _bgKey + _bgMaxPosts + _bgView + _bgOauthToken + _bgFields + _bgAlt + where go + = clientWithRoute (Proxy :: Proxy BlogsGetAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/GetByURL.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/GetByURL.hs new file mode 100644 index 000000000..421885722 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/GetByURL.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Blogs.GetByURL +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve a Blog by URL. +-- +-- /See:/ for @BloggerBlogsGetByURL@. +module Blogger.Blogs.GetByURL + ( + -- * REST Resource + BlogsGetByURLAPI + + -- * Creating a Request + , blogsGetByURL + , BlogsGetByURL + + -- * Request Lenses + , bgbuQuotaUser + , bgbuPrettyPrint + , bgbuUserIp + , bgbuUrl + , bgbuKey + , bgbuView + , bgbuOauthToken + , bgbuFields + , bgbuAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerBlogsGetByURL@ which the +-- 'BlogsGetByURL' request conforms to. +type BlogsGetByURLAPI = + "blogs" :> + "byurl" :> + QueryParam "url" Text :> + QueryParam "view" Text :> Get '[JSON] Blog + +-- | Retrieve a Blog by URL. +-- +-- /See:/ 'blogsGetByURL' smart constructor. +data BlogsGetByURL = BlogsGetByURL + { _bgbuQuotaUser :: !(Maybe Text) + , _bgbuPrettyPrint :: !Bool + , _bgbuUserIp :: !(Maybe Text) + , _bgbuUrl :: !Text + , _bgbuKey :: !(Maybe Text) + , _bgbuView :: !(Maybe Text) + , _bgbuOauthToken :: !(Maybe Text) + , _bgbuFields :: !(Maybe Text) + , _bgbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogsGetByURL'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgbuQuotaUser' +-- +-- * 'bgbuPrettyPrint' +-- +-- * 'bgbuUserIp' +-- +-- * 'bgbuUrl' +-- +-- * 'bgbuKey' +-- +-- * 'bgbuView' +-- +-- * 'bgbuOauthToken' +-- +-- * 'bgbuFields' +-- +-- * 'bgbuAlt' +blogsGetByURL + :: Text -- ^ 'url' + -> BlogsGetByURL +blogsGetByURL pBgbuUrl_ = + BlogsGetByURL + { _bgbuQuotaUser = Nothing + , _bgbuPrettyPrint = True + , _bgbuUserIp = Nothing + , _bgbuUrl = pBgbuUrl_ + , _bgbuKey = Nothing + , _bgbuView = Nothing + , _bgbuOauthToken = Nothing + , _bgbuFields = Nothing + , _bgbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bgbuQuotaUser :: Lens' BlogsGetByURL' (Maybe Text) +bgbuQuotaUser + = lens _bgbuQuotaUser + (\ s a -> s{_bgbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bgbuPrettyPrint :: Lens' BlogsGetByURL' Bool +bgbuPrettyPrint + = lens _bgbuPrettyPrint + (\ s a -> s{_bgbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bgbuUserIp :: Lens' BlogsGetByURL' (Maybe Text) +bgbuUserIp + = lens _bgbuUserIp (\ s a -> s{_bgbuUserIp = a}) + +-- | The URL of the blog to retrieve. +bgbuUrl :: Lens' BlogsGetByURL' Text +bgbuUrl = lens _bgbuUrl (\ s a -> s{_bgbuUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgbuKey :: Lens' BlogsGetByURL' (Maybe Text) +bgbuKey = lens _bgbuKey (\ s a -> s{_bgbuKey = a}) + +-- | Access level with which to view the blog. Note that some fields require +-- elevated access. +bgbuView :: Lens' BlogsGetByURL' (Maybe Text) +bgbuView = lens _bgbuView (\ s a -> s{_bgbuView = a}) + +-- | OAuth 2.0 token for the current user. +bgbuOauthToken :: Lens' BlogsGetByURL' (Maybe Text) +bgbuOauthToken + = lens _bgbuOauthToken + (\ s a -> s{_bgbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bgbuFields :: Lens' BlogsGetByURL' (Maybe Text) +bgbuFields + = lens _bgbuFields (\ s a -> s{_bgbuFields = a}) + +-- | Data format for the response. +bgbuAlt :: Lens' BlogsGetByURL' Text +bgbuAlt = lens _bgbuAlt (\ s a -> s{_bgbuAlt = a}) + +instance GoogleRequest BlogsGetByURL' where + type Rs BlogsGetByURL' = Blog + request = requestWithRoute defReq bloggerURL + requestWithRoute r u BlogsGetByURL{..} + = go _bgbuQuotaUser _bgbuPrettyPrint _bgbuUserIp + (Just _bgbuUrl) + _bgbuKey + _bgbuView + _bgbuOauthToken + _bgbuFields + _bgbuAlt + where go + = clientWithRoute (Proxy :: Proxy BlogsGetByURLAPI) r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs new file mode 100644 index 000000000..3a75bad80 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Blogs.ListByUser +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of blogs, possibly filtered. +-- +-- /See:/ for @BloggerBlogsListByUser@. +module Blogger.Blogs.ListByUser + ( + -- * REST Resource + BlogsListByUserAPI + + -- * Creating a Request + , blogsListByUser + , BlogsListByUser + + -- * Request Lenses + , blbuStatus + , blbuQuotaUser + , blbuPrettyPrint + , blbuUserIp + , blbuFetchUserInfo + , blbuUserId + , blbuRole + , blbuKey + , blbuView + , blbuOauthToken + , blbuFields + , blbuAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerBlogsListByUser@ which the +-- 'BlogsListByUser' request conforms to. +type BlogsListByUserAPI = + "users" :> + Capture "userId" Text :> + "blogs" :> + QueryParams "status" Text :> + QueryParam "fetchUserInfo" Bool :> + QueryParams "role" Text :> + QueryParam "view" Text :> Get '[JSON] BlogList + +-- | Retrieves a list of blogs, possibly filtered. +-- +-- /See:/ 'blogsListByUser' smart constructor. +data BlogsListByUser = BlogsListByUser + { _blbuStatus :: !Text + , _blbuQuotaUser :: !(Maybe Text) + , _blbuPrettyPrint :: !Bool + , _blbuUserIp :: !(Maybe Text) + , _blbuFetchUserInfo :: !(Maybe Bool) + , _blbuUserId :: !Text + , _blbuRole :: !(Maybe Text) + , _blbuKey :: !(Maybe Text) + , _blbuView :: !(Maybe Text) + , _blbuOauthToken :: !(Maybe Text) + , _blbuFields :: !(Maybe Text) + , _blbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BlogsListByUser'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blbuStatus' +-- +-- * 'blbuQuotaUser' +-- +-- * 'blbuPrettyPrint' +-- +-- * 'blbuUserIp' +-- +-- * 'blbuFetchUserInfo' +-- +-- * 'blbuUserId' +-- +-- * 'blbuRole' +-- +-- * 'blbuKey' +-- +-- * 'blbuView' +-- +-- * 'blbuOauthToken' +-- +-- * 'blbuFields' +-- +-- * 'blbuAlt' +blogsListByUser + :: Text -- ^ 'userId' + -> BlogsListByUser +blogsListByUser pBlbuUserId_ = + BlogsListByUser + { _blbuStatus = "LIVE" + , _blbuQuotaUser = Nothing + , _blbuPrettyPrint = True + , _blbuUserIp = Nothing + , _blbuFetchUserInfo = Nothing + , _blbuUserId = pBlbuUserId_ + , _blbuRole = Nothing + , _blbuKey = Nothing + , _blbuView = Nothing + , _blbuOauthToken = Nothing + , _blbuFields = Nothing + , _blbuAlt = "json" + } + +-- | Blog statuses to include in the result (default: Live blogs only). Note +-- that ADMIN access is required to view deleted blogs. +blbuStatus :: Lens' BlogsListByUser' Text +blbuStatus + = lens _blbuStatus (\ s a -> s{_blbuStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +blbuQuotaUser :: Lens' BlogsListByUser' (Maybe Text) +blbuQuotaUser + = lens _blbuQuotaUser + (\ s a -> s{_blbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +blbuPrettyPrint :: Lens' BlogsListByUser' Bool +blbuPrettyPrint + = lens _blbuPrettyPrint + (\ s a -> s{_blbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +blbuUserIp :: Lens' BlogsListByUser' (Maybe Text) +blbuUserIp + = lens _blbuUserIp (\ s a -> s{_blbuUserIp = a}) + +-- | Whether the response is a list of blogs with per-user information +-- instead of just blogs. +blbuFetchUserInfo :: Lens' BlogsListByUser' (Maybe Bool) +blbuFetchUserInfo + = lens _blbuFetchUserInfo + (\ s a -> s{_blbuFetchUserInfo = a}) + +-- | ID of the user whose blogs are to be fetched. Either the word \'self\' +-- (sans quote marks) or the user\'s profile identifier. +blbuUserId :: Lens' BlogsListByUser' Text +blbuUserId + = lens _blbuUserId (\ s a -> s{_blbuUserId = a}) + +-- | User access types for blogs to include in the results, e.g. AUTHOR will +-- return blogs where the user has author level access. If no roles are +-- specified, defaults to ADMIN and AUTHOR roles. +blbuRole :: Lens' BlogsListByUser' (Maybe Text) +blbuRole = lens _blbuRole (\ s a -> s{_blbuRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +blbuKey :: Lens' BlogsListByUser' (Maybe Text) +blbuKey = lens _blbuKey (\ s a -> s{_blbuKey = a}) + +-- | Access level with which to view the blogs. Note that some fields require +-- elevated access. +blbuView :: Lens' BlogsListByUser' (Maybe Text) +blbuView = lens _blbuView (\ s a -> s{_blbuView = a}) + +-- | OAuth 2.0 token for the current user. +blbuOauthToken :: Lens' BlogsListByUser' (Maybe Text) +blbuOauthToken + = lens _blbuOauthToken + (\ s a -> s{_blbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +blbuFields :: Lens' BlogsListByUser' (Maybe Text) +blbuFields + = lens _blbuFields (\ s a -> s{_blbuFields = a}) + +-- | Data format for the response. +blbuAlt :: Lens' BlogsListByUser' Text +blbuAlt = lens _blbuAlt (\ s a -> s{_blbuAlt = a}) + +instance GoogleRequest BlogsListByUser' where + type Rs BlogsListByUser' = BlogList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u BlogsListByUser{..} + = go (Just _blbuStatus) _blbuQuotaUser + _blbuPrettyPrint + _blbuUserIp + _blbuFetchUserInfo + _blbuUserId + _blbuRole + _blbuKey + _blbuView + _blbuOauthToken + _blbuFields + _blbuAlt + where go + = clientWithRoute (Proxy :: Proxy BlogsListByUserAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Approve.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Approve.hs new file mode 100644 index 000000000..47bd73197 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Approve.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.Approve +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks a comment as not spam. +-- +-- /See:/ for @BloggerCommentsApprove@. +module Blogger.Comments.Approve + ( + -- * REST Resource + CommentsApproveAPI + + -- * Creating a Request + , commentsApprove + , CommentsApprove + + -- * Request Lenses + , caQuotaUser + , caPrettyPrint + , caUserIp + , caBlogId + , caKey + , caPostId + , caOauthToken + , caCommentId + , caFields + , caAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsApprove@ which the +-- 'CommentsApprove' request conforms to. +type CommentsApproveAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + Capture "commentId" Text :> + "approve" :> Post '[JSON] Comment + +-- | Marks a comment as not spam. +-- +-- /See:/ 'commentsApprove' smart constructor. +data CommentsApprove = CommentsApprove + { _caQuotaUser :: !(Maybe Text) + , _caPrettyPrint :: !Bool + , _caUserIp :: !(Maybe Text) + , _caBlogId :: !Text + , _caKey :: !(Maybe Text) + , _caPostId :: !Text + , _caOauthToken :: !(Maybe Text) + , _caCommentId :: !Text + , _caFields :: !(Maybe Text) + , _caAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsApprove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caQuotaUser' +-- +-- * 'caPrettyPrint' +-- +-- * 'caUserIp' +-- +-- * 'caBlogId' +-- +-- * 'caKey' +-- +-- * 'caPostId' +-- +-- * 'caOauthToken' +-- +-- * 'caCommentId' +-- +-- * 'caFields' +-- +-- * 'caAlt' +commentsApprove + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> Text -- ^ 'commentId' + -> CommentsApprove +commentsApprove pCaBlogId_ pCaPostId_ pCaCommentId_ = + CommentsApprove + { _caQuotaUser = Nothing + , _caPrettyPrint = True + , _caUserIp = Nothing + , _caBlogId = pCaBlogId_ + , _caKey = Nothing + , _caPostId = pCaPostId_ + , _caOauthToken = Nothing + , _caCommentId = pCaCommentId_ + , _caFields = Nothing + , _caAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +caQuotaUser :: Lens' CommentsApprove' (Maybe Text) +caQuotaUser + = lens _caQuotaUser (\ s a -> s{_caQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +caPrettyPrint :: Lens' CommentsApprove' Bool +caPrettyPrint + = lens _caPrettyPrint + (\ s a -> s{_caPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +caUserIp :: Lens' CommentsApprove' (Maybe Text) +caUserIp = lens _caUserIp (\ s a -> s{_caUserIp = a}) + +-- | The ID of the Blog. +caBlogId :: Lens' CommentsApprove' Text +caBlogId = lens _caBlogId (\ s a -> s{_caBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +caKey :: Lens' CommentsApprove' (Maybe Text) +caKey = lens _caKey (\ s a -> s{_caKey = a}) + +-- | The ID of the Post. +caPostId :: Lens' CommentsApprove' Text +caPostId = lens _caPostId (\ s a -> s{_caPostId = a}) + +-- | OAuth 2.0 token for the current user. +caOauthToken :: Lens' CommentsApprove' (Maybe Text) +caOauthToken + = lens _caOauthToken (\ s a -> s{_caOauthToken = a}) + +-- | The ID of the comment to mark as not spam. +caCommentId :: Lens' CommentsApprove' Text +caCommentId + = lens _caCommentId (\ s a -> s{_caCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +caFields :: Lens' CommentsApprove' (Maybe Text) +caFields = lens _caFields (\ s a -> s{_caFields = a}) + +-- | Data format for the response. +caAlt :: Lens' CommentsApprove' Text +caAlt = lens _caAlt (\ s a -> s{_caAlt = a}) + +instance GoogleRequest CommentsApprove' where + type Rs CommentsApprove' = Comment + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsApprove{..} + = go _caQuotaUser _caPrettyPrint _caUserIp _caBlogId + _caKey + _caPostId + _caOauthToken + _caCommentId + _caFields + _caAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsApproveAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Delete.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Delete.hs new file mode 100644 index 000000000..be7583c9e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Delete.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a comment by ID. +-- +-- /See:/ for @BloggerCommentsDelete@. +module Blogger.Comments.Delete + ( + -- * REST Resource + CommentsDeleteAPI + + -- * Creating a Request + , commentsDelete + , CommentsDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdBlogId + , cdKey + , cdPostId + , cdOauthToken + , cdCommentId + , cdFields + , cdAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsDelete@ which the +-- 'CommentsDelete' request conforms to. +type CommentsDeleteAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + Capture "commentId" Text :> Delete '[JSON] () + +-- | Delete a comment by ID. +-- +-- /See:/ 'commentsDelete' smart constructor. +data CommentsDelete = CommentsDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdBlogId :: !Text + , _cdKey :: !(Maybe Text) + , _cdPostId :: !Text + , _cdOauthToken :: !(Maybe Text) + , _cdCommentId :: !Text + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdBlogId' +-- +-- * 'cdKey' +-- +-- * 'cdPostId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdCommentId' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +commentsDelete + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> Text -- ^ 'commentId' + -> CommentsDelete +commentsDelete pCdBlogId_ pCdPostId_ pCdCommentId_ = + CommentsDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdBlogId = pCdBlogId_ + , _cdKey = Nothing + , _cdPostId = pCdPostId_ + , _cdOauthToken = Nothing + , _cdCommentId = pCdCommentId_ + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CommentsDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CommentsDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CommentsDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | The ID of the Blog. +cdBlogId :: Lens' CommentsDelete' Text +cdBlogId = lens _cdBlogId (\ s a -> s{_cdBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CommentsDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | The ID of the Post. +cdPostId :: Lens' CommentsDelete' Text +cdPostId = lens _cdPostId (\ s a -> s{_cdPostId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CommentsDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | The ID of the comment to delete. +cdCommentId :: Lens' CommentsDelete' Text +cdCommentId + = lens _cdCommentId (\ s a -> s{_cdCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CommentsDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CommentsDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CommentsDelete' where + type Rs CommentsDelete' = () + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp _cdBlogId + _cdKey + _cdPostId + _cdOauthToken + _cdCommentId + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsDeleteAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Get.hs new file mode 100644 index 000000000..c80bfc542 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/Get.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one comment by ID. +-- +-- /See:/ for @BloggerCommentsGet@. +module Blogger.Comments.Get + ( + -- * REST Resource + CommentsGetAPI + + -- * Creating a Request + , commentsGet + , CommentsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgBlogId + , cgKey + , cgView + , cgPostId + , cgOauthToken + , cgCommentId + , cgFields + , cgAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsGet@ which the +-- 'CommentsGet' request conforms to. +type CommentsGetAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + Capture "commentId" Text :> + QueryParam "view" Text :> Get '[JSON] Comment + +-- | Gets one comment by ID. +-- +-- /See:/ 'commentsGet' smart constructor. +data CommentsGet = CommentsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgBlogId :: !Text + , _cgKey :: !(Maybe Text) + , _cgView :: !(Maybe Text) + , _cgPostId :: !Text + , _cgOauthToken :: !(Maybe Text) + , _cgCommentId :: !Text + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgBlogId' +-- +-- * 'cgKey' +-- +-- * 'cgView' +-- +-- * 'cgPostId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgCommentId' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +commentsGet + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> Text -- ^ 'commentId' + -> CommentsGet +commentsGet pCgBlogId_ pCgPostId_ pCgCommentId_ = + CommentsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgBlogId = pCgBlogId_ + , _cgKey = Nothing + , _cgView = Nothing + , _cgPostId = pCgPostId_ + , _cgOauthToken = Nothing + , _cgCommentId = pCgCommentId_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CommentsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CommentsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CommentsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | ID of the blog to containing the comment. +cgBlogId :: Lens' CommentsGet' Text +cgBlogId = lens _cgBlogId (\ s a -> s{_cgBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CommentsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | Access level for the requested comment (default: READER). Note that some +-- comments will require elevated permissions, for example comments where +-- the parent posts which is in a draft state, or comments that are pending +-- moderation. +cgView :: Lens' CommentsGet' (Maybe Text) +cgView = lens _cgView (\ s a -> s{_cgView = a}) + +-- | ID of the post to fetch posts from. +cgPostId :: Lens' CommentsGet' Text +cgPostId = lens _cgPostId (\ s a -> s{_cgPostId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CommentsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | The ID of the comment to get. +cgCommentId :: Lens' CommentsGet' Text +cgCommentId + = lens _cgCommentId (\ s a -> s{_cgCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CommentsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CommentsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CommentsGet' where + type Rs CommentsGet' = Comment + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgBlogId + _cgKey + _cgView + _cgPostId + _cgOauthToken + _cgCommentId + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsGetAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/List.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/List.hs new file mode 100644 index 000000000..f0d195cc5 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/List.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the comments for a post, possibly filtered. +-- +-- /See:/ for @BloggerCommentsList@. +module Blogger.Comments.List + ( + -- * REST Resource + CommentsListAPI + + -- * Creating a Request + , commentsList + , CommentsList + + -- * Request Lenses + , clStatus + , clQuotaUser + , clPrettyPrint + , clUserIp + , clEndDate + , clBlogId + , clStartDate + , clKey + , clFetchBodies + , clView + , clPostId + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsList@ which the +-- 'CommentsList' request conforms to. +type CommentsListAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + QueryParams "status" Text :> + QueryParam "endDate" UTCTime :> + QueryParam "startDate" UTCTime :> + QueryParam "fetchBodies" Bool :> + QueryParam "view" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CommentList + +-- | Retrieves the comments for a post, possibly filtered. +-- +-- /See:/ 'commentsList' smart constructor. +data CommentsList = CommentsList + { _clStatus :: !(Maybe Text) + , _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clEndDate :: !(Maybe UTCTime) + , _clBlogId :: !Text + , _clStartDate :: !(Maybe UTCTime) + , _clKey :: !(Maybe Text) + , _clFetchBodies :: !(Maybe Bool) + , _clView :: !(Maybe Text) + , _clPostId :: !Text + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !(Maybe Word32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clStatus' +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clEndDate' +-- +-- * 'clBlogId' +-- +-- * 'clStartDate' +-- +-- * 'clKey' +-- +-- * 'clFetchBodies' +-- +-- * 'clView' +-- +-- * 'clPostId' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +commentsList + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> CommentsList +commentsList pClBlogId_ pClPostId_ = + CommentsList + { _clStatus = Nothing + , _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clEndDate = Nothing + , _clBlogId = pClBlogId_ + , _clStartDate = Nothing + , _clKey = Nothing + , _clFetchBodies = Nothing + , _clView = Nothing + , _clPostId = pClPostId_ + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +clStatus :: Lens' CommentsList' (Maybe Text) +clStatus = lens _clStatus (\ s a -> s{_clStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CommentsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CommentsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CommentsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Latest date of comment to fetch, a date-time with RFC 3339 formatting. +clEndDate :: Lens' CommentsList' (Maybe UTCTime) +clEndDate + = lens _clEndDate (\ s a -> s{_clEndDate = a}) + +-- | ID of the blog to fetch comments from. +clBlogId :: Lens' CommentsList' Text +clBlogId = lens _clBlogId (\ s a -> s{_clBlogId = a}) + +-- | Earliest date of comment to fetch, a date-time with RFC 3339 formatting. +clStartDate :: Lens' CommentsList' (Maybe UTCTime) +clStartDate + = lens _clStartDate (\ s a -> s{_clStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CommentsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Whether the body content of the comments is included. +clFetchBodies :: Lens' CommentsList' (Maybe Bool) +clFetchBodies + = lens _clFetchBodies + (\ s a -> s{_clFetchBodies = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require elevated access. +clView :: Lens' CommentsList' (Maybe Text) +clView = lens _clView (\ s a -> s{_clView = a}) + +-- | ID of the post to fetch posts from. +clPostId :: Lens' CommentsList' Text +clPostId = lens _clPostId (\ s a -> s{_clPostId = a}) + +-- | Continuation token if request is paged. +clPageToken :: Lens' CommentsList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CommentsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Maximum number of comments to include in the result. +clMaxResults :: Lens' CommentsList' (Maybe Word32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CommentsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CommentsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CommentsList' where + type Rs CommentsList' = CommentList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsList{..} + = go _clStatus _clQuotaUser _clPrettyPrint _clUserIp + _clEndDate + _clBlogId + _clStartDate + _clKey + _clFetchBodies + _clView + _clPostId + _clPageToken + _clOauthToken + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsListAPI) r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/ListByBlog.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/ListByBlog.hs new file mode 100644 index 000000000..927350fb7 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/ListByBlog.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.ListByBlog +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the comments for a blog, across all posts, possibly filtered. +-- +-- /See:/ for @BloggerCommentsListByBlog@. +module Blogger.Comments.ListByBlog + ( + -- * REST Resource + CommentsListByBlogAPI + + -- * Creating a Request + , commentsListByBlog + , CommentsListByBlog + + -- * Request Lenses + , clbbStatus + , clbbQuotaUser + , clbbPrettyPrint + , clbbUserIp + , clbbEndDate + , clbbBlogId + , clbbStartDate + , clbbKey + , clbbFetchBodies + , clbbPageToken + , clbbOauthToken + , clbbMaxResults + , clbbFields + , clbbAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsListByBlog@ which the +-- 'CommentsListByBlog' request conforms to. +type CommentsListByBlogAPI = + "blogs" :> + Capture "blogId" Text :> + "comments" :> + QueryParams "status" Text :> + QueryParam "endDate" UTCTime :> + QueryParam "startDate" UTCTime :> + QueryParam "fetchBodies" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CommentList + +-- | Retrieves the comments for a blog, across all posts, possibly filtered. +-- +-- /See:/ 'commentsListByBlog' smart constructor. +data CommentsListByBlog = CommentsListByBlog + { _clbbStatus :: !(Maybe Text) + , _clbbQuotaUser :: !(Maybe Text) + , _clbbPrettyPrint :: !Bool + , _clbbUserIp :: !(Maybe Text) + , _clbbEndDate :: !(Maybe UTCTime) + , _clbbBlogId :: !Text + , _clbbStartDate :: !(Maybe UTCTime) + , _clbbKey :: !(Maybe Text) + , _clbbFetchBodies :: !(Maybe Bool) + , _clbbPageToken :: !(Maybe Text) + , _clbbOauthToken :: !(Maybe Text) + , _clbbMaxResults :: !(Maybe Word32) + , _clbbFields :: !(Maybe Text) + , _clbbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsListByBlog'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clbbStatus' +-- +-- * 'clbbQuotaUser' +-- +-- * 'clbbPrettyPrint' +-- +-- * 'clbbUserIp' +-- +-- * 'clbbEndDate' +-- +-- * 'clbbBlogId' +-- +-- * 'clbbStartDate' +-- +-- * 'clbbKey' +-- +-- * 'clbbFetchBodies' +-- +-- * 'clbbPageToken' +-- +-- * 'clbbOauthToken' +-- +-- * 'clbbMaxResults' +-- +-- * 'clbbFields' +-- +-- * 'clbbAlt' +commentsListByBlog + :: Text -- ^ 'blogId' + -> CommentsListByBlog +commentsListByBlog pClbbBlogId_ = + CommentsListByBlog + { _clbbStatus = Nothing + , _clbbQuotaUser = Nothing + , _clbbPrettyPrint = True + , _clbbUserIp = Nothing + , _clbbEndDate = Nothing + , _clbbBlogId = pClbbBlogId_ + , _clbbStartDate = Nothing + , _clbbKey = Nothing + , _clbbFetchBodies = Nothing + , _clbbPageToken = Nothing + , _clbbOauthToken = Nothing + , _clbbMaxResults = Nothing + , _clbbFields = Nothing + , _clbbAlt = "json" + } + +clbbStatus :: Lens' CommentsListByBlog' (Maybe Text) +clbbStatus + = lens _clbbStatus (\ s a -> s{_clbbStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clbbQuotaUser :: Lens' CommentsListByBlog' (Maybe Text) +clbbQuotaUser + = lens _clbbQuotaUser + (\ s a -> s{_clbbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clbbPrettyPrint :: Lens' CommentsListByBlog' Bool +clbbPrettyPrint + = lens _clbbPrettyPrint + (\ s a -> s{_clbbPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clbbUserIp :: Lens' CommentsListByBlog' (Maybe Text) +clbbUserIp + = lens _clbbUserIp (\ s a -> s{_clbbUserIp = a}) + +-- | Latest date of comment to fetch, a date-time with RFC 3339 formatting. +clbbEndDate :: Lens' CommentsListByBlog' (Maybe UTCTime) +clbbEndDate + = lens _clbbEndDate (\ s a -> s{_clbbEndDate = a}) + +-- | ID of the blog to fetch comments from. +clbbBlogId :: Lens' CommentsListByBlog' Text +clbbBlogId + = lens _clbbBlogId (\ s a -> s{_clbbBlogId = a}) + +-- | Earliest date of comment to fetch, a date-time with RFC 3339 formatting. +clbbStartDate :: Lens' CommentsListByBlog' (Maybe UTCTime) +clbbStartDate + = lens _clbbStartDate + (\ s a -> s{_clbbStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clbbKey :: Lens' CommentsListByBlog' (Maybe Text) +clbbKey = lens _clbbKey (\ s a -> s{_clbbKey = a}) + +-- | Whether the body content of the comments is included. +clbbFetchBodies :: Lens' CommentsListByBlog' (Maybe Bool) +clbbFetchBodies + = lens _clbbFetchBodies + (\ s a -> s{_clbbFetchBodies = a}) + +-- | Continuation token if request is paged. +clbbPageToken :: Lens' CommentsListByBlog' (Maybe Text) +clbbPageToken + = lens _clbbPageToken + (\ s a -> s{_clbbPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clbbOauthToken :: Lens' CommentsListByBlog' (Maybe Text) +clbbOauthToken + = lens _clbbOauthToken + (\ s a -> s{_clbbOauthToken = a}) + +-- | Maximum number of comments to include in the result. +clbbMaxResults :: Lens' CommentsListByBlog' (Maybe Word32) +clbbMaxResults + = lens _clbbMaxResults + (\ s a -> s{_clbbMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clbbFields :: Lens' CommentsListByBlog' (Maybe Text) +clbbFields + = lens _clbbFields (\ s a -> s{_clbbFields = a}) + +-- | Data format for the response. +clbbAlt :: Lens' CommentsListByBlog' Text +clbbAlt = lens _clbbAlt (\ s a -> s{_clbbAlt = a}) + +instance GoogleRequest CommentsListByBlog' where + type Rs CommentsListByBlog' = CommentList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsListByBlog{..} + = go _clbbStatus _clbbQuotaUser _clbbPrettyPrint + _clbbUserIp + _clbbEndDate + _clbbBlogId + _clbbStartDate + _clbbKey + _clbbFetchBodies + _clbbPageToken + _clbbOauthToken + _clbbMaxResults + _clbbFields + _clbbAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentsListByBlogAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/MarkAsSpam.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/MarkAsSpam.hs new file mode 100644 index 000000000..eb084a35f --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/MarkAsSpam.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.MarkAsSpam +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks a comment as spam. +-- +-- /See:/ for @BloggerCommentsMarkAsSpam@. +module Blogger.Comments.MarkAsSpam + ( + -- * REST Resource + CommentsMarkAsSpamAPI + + -- * Creating a Request + , commentsMarkAsSpam + , CommentsMarkAsSpam + + -- * Request Lenses + , cmasQuotaUser + , cmasPrettyPrint + , cmasUserIp + , cmasBlogId + , cmasKey + , cmasPostId + , cmasOauthToken + , cmasCommentId + , cmasFields + , cmasAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsMarkAsSpam@ which the +-- 'CommentsMarkAsSpam' request conforms to. +type CommentsMarkAsSpamAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + Capture "commentId" Text :> + "spam" :> Post '[JSON] Comment + +-- | Marks a comment as spam. +-- +-- /See:/ 'commentsMarkAsSpam' smart constructor. +data CommentsMarkAsSpam = CommentsMarkAsSpam + { _cmasQuotaUser :: !(Maybe Text) + , _cmasPrettyPrint :: !Bool + , _cmasUserIp :: !(Maybe Text) + , _cmasBlogId :: !Text + , _cmasKey :: !(Maybe Text) + , _cmasPostId :: !Text + , _cmasOauthToken :: !(Maybe Text) + , _cmasCommentId :: !Text + , _cmasFields :: !(Maybe Text) + , _cmasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsMarkAsSpam'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cmasQuotaUser' +-- +-- * 'cmasPrettyPrint' +-- +-- * 'cmasUserIp' +-- +-- * 'cmasBlogId' +-- +-- * 'cmasKey' +-- +-- * 'cmasPostId' +-- +-- * 'cmasOauthToken' +-- +-- * 'cmasCommentId' +-- +-- * 'cmasFields' +-- +-- * 'cmasAlt' +commentsMarkAsSpam + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> Text -- ^ 'commentId' + -> CommentsMarkAsSpam +commentsMarkAsSpam pCmasBlogId_ pCmasPostId_ pCmasCommentId_ = + CommentsMarkAsSpam + { _cmasQuotaUser = Nothing + , _cmasPrettyPrint = True + , _cmasUserIp = Nothing + , _cmasBlogId = pCmasBlogId_ + , _cmasKey = Nothing + , _cmasPostId = pCmasPostId_ + , _cmasOauthToken = Nothing + , _cmasCommentId = pCmasCommentId_ + , _cmasFields = Nothing + , _cmasAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cmasQuotaUser :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasQuotaUser + = lens _cmasQuotaUser + (\ s a -> s{_cmasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cmasPrettyPrint :: Lens' CommentsMarkAsSpam' Bool +cmasPrettyPrint + = lens _cmasPrettyPrint + (\ s a -> s{_cmasPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cmasUserIp :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasUserIp + = lens _cmasUserIp (\ s a -> s{_cmasUserIp = a}) + +-- | The ID of the Blog. +cmasBlogId :: Lens' CommentsMarkAsSpam' Text +cmasBlogId + = lens _cmasBlogId (\ s a -> s{_cmasBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cmasKey :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasKey = lens _cmasKey (\ s a -> s{_cmasKey = a}) + +-- | The ID of the Post. +cmasPostId :: Lens' CommentsMarkAsSpam' Text +cmasPostId + = lens _cmasPostId (\ s a -> s{_cmasPostId = a}) + +-- | OAuth 2.0 token for the current user. +cmasOauthToken :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasOauthToken + = lens _cmasOauthToken + (\ s a -> s{_cmasOauthToken = a}) + +-- | The ID of the comment to mark as spam. +cmasCommentId :: Lens' CommentsMarkAsSpam' Text +cmasCommentId + = lens _cmasCommentId + (\ s a -> s{_cmasCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cmasFields :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasFields + = lens _cmasFields (\ s a -> s{_cmasFields = a}) + +-- | Data format for the response. +cmasAlt :: Lens' CommentsMarkAsSpam' Text +cmasAlt = lens _cmasAlt (\ s a -> s{_cmasAlt = a}) + +instance GoogleRequest CommentsMarkAsSpam' where + type Rs CommentsMarkAsSpam' = Comment + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsMarkAsSpam{..} + = go _cmasQuotaUser _cmasPrettyPrint _cmasUserIp + _cmasBlogId + _cmasKey + _cmasPostId + _cmasOauthToken + _cmasCommentId + _cmasFields + _cmasAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentsMarkAsSpamAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/RemoveContent.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/RemoveContent.hs new file mode 100644 index 000000000..6d73bf14e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Comments/RemoveContent.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Comments.RemoveContent +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the content of a comment. +-- +-- /See:/ for @BloggerCommentsRemoveContent@. +module Blogger.Comments.RemoveContent + ( + -- * REST Resource + CommentsRemoveContentAPI + + -- * Creating a Request + , commentsRemoveContent + , CommentsRemoveContent + + -- * Request Lenses + , crcQuotaUser + , crcPrettyPrint + , crcUserIp + , crcBlogId + , crcKey + , crcPostId + , crcOauthToken + , crcCommentId + , crcFields + , crcAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerCommentsRemoveContent@ which the +-- 'CommentsRemoveContent' request conforms to. +type CommentsRemoveContentAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "comments" :> + Capture "commentId" Text :> + "removecontent" :> Post '[JSON] Comment + +-- | Removes the content of a comment. +-- +-- /See:/ 'commentsRemoveContent' smart constructor. +data CommentsRemoveContent = CommentsRemoveContent + { _crcQuotaUser :: !(Maybe Text) + , _crcPrettyPrint :: !Bool + , _crcUserIp :: !(Maybe Text) + , _crcBlogId :: !Text + , _crcKey :: !(Maybe Text) + , _crcPostId :: !Text + , _crcOauthToken :: !(Maybe Text) + , _crcCommentId :: !Text + , _crcFields :: !(Maybe Text) + , _crcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsRemoveContent'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crcQuotaUser' +-- +-- * 'crcPrettyPrint' +-- +-- * 'crcUserIp' +-- +-- * 'crcBlogId' +-- +-- * 'crcKey' +-- +-- * 'crcPostId' +-- +-- * 'crcOauthToken' +-- +-- * 'crcCommentId' +-- +-- * 'crcFields' +-- +-- * 'crcAlt' +commentsRemoveContent + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> Text -- ^ 'commentId' + -> CommentsRemoveContent +commentsRemoveContent pCrcBlogId_ pCrcPostId_ pCrcCommentId_ = + CommentsRemoveContent + { _crcQuotaUser = Nothing + , _crcPrettyPrint = True + , _crcUserIp = Nothing + , _crcBlogId = pCrcBlogId_ + , _crcKey = Nothing + , _crcPostId = pCrcPostId_ + , _crcOauthToken = Nothing + , _crcCommentId = pCrcCommentId_ + , _crcFields = Nothing + , _crcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +crcQuotaUser :: Lens' CommentsRemoveContent' (Maybe Text) +crcQuotaUser + = lens _crcQuotaUser (\ s a -> s{_crcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +crcPrettyPrint :: Lens' CommentsRemoveContent' Bool +crcPrettyPrint + = lens _crcPrettyPrint + (\ s a -> s{_crcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +crcUserIp :: Lens' CommentsRemoveContent' (Maybe Text) +crcUserIp + = lens _crcUserIp (\ s a -> s{_crcUserIp = a}) + +-- | The ID of the Blog. +crcBlogId :: Lens' CommentsRemoveContent' Text +crcBlogId + = lens _crcBlogId (\ s a -> s{_crcBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +crcKey :: Lens' CommentsRemoveContent' (Maybe Text) +crcKey = lens _crcKey (\ s a -> s{_crcKey = a}) + +-- | The ID of the Post. +crcPostId :: Lens' CommentsRemoveContent' Text +crcPostId + = lens _crcPostId (\ s a -> s{_crcPostId = a}) + +-- | OAuth 2.0 token for the current user. +crcOauthToken :: Lens' CommentsRemoveContent' (Maybe Text) +crcOauthToken + = lens _crcOauthToken + (\ s a -> s{_crcOauthToken = a}) + +-- | The ID of the comment to delete content from. +crcCommentId :: Lens' CommentsRemoveContent' Text +crcCommentId + = lens _crcCommentId (\ s a -> s{_crcCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +crcFields :: Lens' CommentsRemoveContent' (Maybe Text) +crcFields + = lens _crcFields (\ s a -> s{_crcFields = a}) + +-- | Data format for the response. +crcAlt :: Lens' CommentsRemoveContent' Text +crcAlt = lens _crcAlt (\ s a -> s{_crcAlt = a}) + +instance GoogleRequest CommentsRemoveContent' where + type Rs CommentsRemoveContent' = Comment + request = requestWithRoute defReq bloggerURL + requestWithRoute r u CommentsRemoveContent{..} + = go _crcQuotaUser _crcPrettyPrint _crcUserIp + _crcBlogId + _crcKey + _crcPostId + _crcOauthToken + _crcCommentId + _crcFields + _crcAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentsRemoveContentAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/PageViews/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/PageViews/Get.hs new file mode 100644 index 000000000..6bf32fccf --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/PageViews/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.PageViews.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve pageview stats for a Blog. +-- +-- /See:/ for @BloggerPageViewsGet@. +module Blogger.PageViews.Get + ( + -- * REST Resource + PageViewsGetAPI + + -- * Creating a Request + , pageViewsGet + , PageViewsGet + + -- * Request Lenses + , pvgQuotaUser + , pvgPrettyPrint + , pvgUserIp + , pvgBlogId + , pvgKey + , pvgRange + , pvgOauthToken + , pvgFields + , pvgAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPageViewsGet@ which the +-- 'PageViewsGet' request conforms to. +type PageViewsGetAPI = + "blogs" :> + Capture "blogId" Text :> + "pageviews" :> + QueryParams "range" Text :> Get '[JSON] Pageviews + +-- | Retrieve pageview stats for a Blog. +-- +-- /See:/ 'pageViewsGet' smart constructor. +data PageViewsGet = PageViewsGet + { _pvgQuotaUser :: !(Maybe Text) + , _pvgPrettyPrint :: !Bool + , _pvgUserIp :: !(Maybe Text) + , _pvgBlogId :: !Text + , _pvgKey :: !(Maybe Text) + , _pvgRange :: !(Maybe Text) + , _pvgOauthToken :: !(Maybe Text) + , _pvgFields :: !(Maybe Text) + , _pvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PageViewsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pvgQuotaUser' +-- +-- * 'pvgPrettyPrint' +-- +-- * 'pvgUserIp' +-- +-- * 'pvgBlogId' +-- +-- * 'pvgKey' +-- +-- * 'pvgRange' +-- +-- * 'pvgOauthToken' +-- +-- * 'pvgFields' +-- +-- * 'pvgAlt' +pageViewsGet + :: Text -- ^ 'blogId' + -> PageViewsGet +pageViewsGet pPvgBlogId_ = + PageViewsGet + { _pvgQuotaUser = Nothing + , _pvgPrettyPrint = True + , _pvgUserIp = Nothing + , _pvgBlogId = pPvgBlogId_ + , _pvgKey = Nothing + , _pvgRange = Nothing + , _pvgOauthToken = Nothing + , _pvgFields = Nothing + , _pvgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pvgQuotaUser :: Lens' PageViewsGet' (Maybe Text) +pvgQuotaUser + = lens _pvgQuotaUser (\ s a -> s{_pvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pvgPrettyPrint :: Lens' PageViewsGet' Bool +pvgPrettyPrint + = lens _pvgPrettyPrint + (\ s a -> s{_pvgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pvgUserIp :: Lens' PageViewsGet' (Maybe Text) +pvgUserIp + = lens _pvgUserIp (\ s a -> s{_pvgUserIp = a}) + +-- | The ID of the blog to get. +pvgBlogId :: Lens' PageViewsGet' Text +pvgBlogId + = lens _pvgBlogId (\ s a -> s{_pvgBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pvgKey :: Lens' PageViewsGet' (Maybe Text) +pvgKey = lens _pvgKey (\ s a -> s{_pvgKey = a}) + +pvgRange :: Lens' PageViewsGet' (Maybe Text) +pvgRange = lens _pvgRange (\ s a -> s{_pvgRange = a}) + +-- | OAuth 2.0 token for the current user. +pvgOauthToken :: Lens' PageViewsGet' (Maybe Text) +pvgOauthToken + = lens _pvgOauthToken + (\ s a -> s{_pvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pvgFields :: Lens' PageViewsGet' (Maybe Text) +pvgFields + = lens _pvgFields (\ s a -> s{_pvgFields = a}) + +-- | Data format for the response. +pvgAlt :: Lens' PageViewsGet' Text +pvgAlt = lens _pvgAlt (\ s a -> s{_pvgAlt = a}) + +instance GoogleRequest PageViewsGet' where + type Rs PageViewsGet' = Pageviews + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PageViewsGet{..} + = go _pvgQuotaUser _pvgPrettyPrint _pvgUserIp + _pvgBlogId + _pvgKey + _pvgRange + _pvgOauthToken + _pvgFields + _pvgAlt + where go + = clientWithRoute (Proxy :: Proxy PageViewsGetAPI) r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Delete.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Delete.hs new file mode 100644 index 000000000..d391f602e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Delete.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a page by ID. +-- +-- /See:/ for @BloggerPagesDelete@. +module Blogger.Pages.Delete + ( + -- * REST Resource + PagesDeleteAPI + + -- * Creating a Request + , pagesDelete + , PagesDelete + + -- * Request Lenses + , pdQuotaUser + , pdPrettyPrint + , pdUserIp + , pdBlogId + , pdPageId + , pdKey + , pdOauthToken + , pdFields + , pdAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesDelete@ which the +-- 'PagesDelete' request conforms to. +type PagesDeleteAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> Capture "pageId" Text :> Delete '[JSON] () + +-- | Delete a page by ID. +-- +-- /See:/ 'pagesDelete' smart constructor. +data PagesDelete = PagesDelete + { _pdQuotaUser :: !(Maybe Text) + , _pdPrettyPrint :: !Bool + , _pdUserIp :: !(Maybe Text) + , _pdBlogId :: !Text + , _pdPageId :: !Text + , _pdKey :: !(Maybe Text) + , _pdOauthToken :: !(Maybe Text) + , _pdFields :: !(Maybe Text) + , _pdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdQuotaUser' +-- +-- * 'pdPrettyPrint' +-- +-- * 'pdUserIp' +-- +-- * 'pdBlogId' +-- +-- * 'pdPageId' +-- +-- * 'pdKey' +-- +-- * 'pdOauthToken' +-- +-- * 'pdFields' +-- +-- * 'pdAlt' +pagesDelete + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesDelete +pagesDelete pPdBlogId_ pPdPageId_ = + PagesDelete + { _pdQuotaUser = Nothing + , _pdPrettyPrint = True + , _pdUserIp = Nothing + , _pdBlogId = pPdBlogId_ + , _pdPageId = pPdPageId_ + , _pdKey = Nothing + , _pdOauthToken = Nothing + , _pdFields = Nothing + , _pdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pdQuotaUser :: Lens' PagesDelete' (Maybe Text) +pdQuotaUser + = lens _pdQuotaUser (\ s a -> s{_pdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pdPrettyPrint :: Lens' PagesDelete' Bool +pdPrettyPrint + = lens _pdPrettyPrint + (\ s a -> s{_pdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pdUserIp :: Lens' PagesDelete' (Maybe Text) +pdUserIp = lens _pdUserIp (\ s a -> s{_pdUserIp = a}) + +-- | The ID of the Blog. +pdBlogId :: Lens' PagesDelete' Text +pdBlogId = lens _pdBlogId (\ s a -> s{_pdBlogId = a}) + +-- | The ID of the Page. +pdPageId :: Lens' PagesDelete' Text +pdPageId = lens _pdPageId (\ s a -> s{_pdPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pdKey :: Lens' PagesDelete' (Maybe Text) +pdKey = lens _pdKey (\ s a -> s{_pdKey = a}) + +-- | OAuth 2.0 token for the current user. +pdOauthToken :: Lens' PagesDelete' (Maybe Text) +pdOauthToken + = lens _pdOauthToken (\ s a -> s{_pdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pdFields :: Lens' PagesDelete' (Maybe Text) +pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) + +-- | Data format for the response. +pdAlt :: Lens' PagesDelete' Text +pdAlt = lens _pdAlt (\ s a -> s{_pdAlt = a}) + +instance GoogleRequest PagesDelete' where + type Rs PagesDelete' = () + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesDelete{..} + = go _pdQuotaUser _pdPrettyPrint _pdUserIp _pdBlogId + _pdPageId + _pdKey + _pdOauthToken + _pdFields + _pdAlt + where go + = clientWithRoute (Proxy :: Proxy PagesDeleteAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Get.hs new file mode 100644 index 000000000..6e0b5fcb3 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one blog page by ID. +-- +-- /See:/ for @BloggerPagesGet@. +module Blogger.Pages.Get + ( + -- * REST Resource + PagesGetAPI + + -- * Creating a Request + , pagesGet + , PagesGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgBlogId + , pgPageId + , pgKey + , pgView + , pgOauthToken + , pgFields + , pgAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesGet@ which the +-- 'PagesGet' request conforms to. +type PagesGetAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + Capture "pageId" Text :> + QueryParam "view" Text :> Get '[JSON] Page + +-- | Gets one blog page by ID. +-- +-- /See:/ 'pagesGet' smart constructor. +data PagesGet = PagesGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgBlogId :: !Text + , _pgPageId :: !Text + , _pgKey :: !(Maybe Text) + , _pgView :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgBlogId' +-- +-- * 'pgPageId' +-- +-- * 'pgKey' +-- +-- * 'pgView' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +pagesGet + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesGet +pagesGet pPgBlogId_ pPgPageId_ = + PagesGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgBlogId = pPgBlogId_ + , _pgPageId = pPgPageId_ + , _pgKey = Nothing + , _pgView = Nothing + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PagesGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PagesGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PagesGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | ID of the blog containing the page. +pgBlogId :: Lens' PagesGet' Text +pgBlogId = lens _pgBlogId (\ s a -> s{_pgBlogId = a}) + +-- | The ID of the page to get. +pgPageId :: Lens' PagesGet' Text +pgPageId = lens _pgPageId (\ s a -> s{_pgPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PagesGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +pgView :: Lens' PagesGet' (Maybe Text) +pgView = lens _pgView (\ s a -> s{_pgView = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PagesGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PagesGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PagesGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PagesGet' where + type Rs PagesGet' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgBlogId + _pgPageId + _pgKey + _pgView + _pgOauthToken + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PagesGetAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Insert.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Insert.hs new file mode 100644 index 000000000..58b60e840 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Insert.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a page. +-- +-- /See:/ for @BloggerPagesInsert@. +module Blogger.Pages.Insert + ( + -- * REST Resource + PagesInsertAPI + + -- * Creating a Request + , pagesInsert + , PagesInsert + + -- * Request Lenses + , piQuotaUser + , piPrettyPrint + , piIsDraft + , piUserIp + , piBlogId + , piKey + , piOauthToken + , piFields + , piAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesInsert@ which the +-- 'PagesInsert' request conforms to. +type PagesInsertAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + QueryParam "isDraft" Bool :> Post '[JSON] Page + +-- | Add a page. +-- +-- /See:/ 'pagesInsert' smart constructor. +data PagesInsert = PagesInsert + { _piQuotaUser :: !(Maybe Text) + , _piPrettyPrint :: !Bool + , _piIsDraft :: !(Maybe Bool) + , _piUserIp :: !(Maybe Text) + , _piBlogId :: !Text + , _piKey :: !(Maybe Text) + , _piOauthToken :: !(Maybe Text) + , _piFields :: !(Maybe Text) + , _piAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piQuotaUser' +-- +-- * 'piPrettyPrint' +-- +-- * 'piIsDraft' +-- +-- * 'piUserIp' +-- +-- * 'piBlogId' +-- +-- * 'piKey' +-- +-- * 'piOauthToken' +-- +-- * 'piFields' +-- +-- * 'piAlt' +pagesInsert + :: Text -- ^ 'blogId' + -> PagesInsert +pagesInsert pPiBlogId_ = + PagesInsert + { _piQuotaUser = Nothing + , _piPrettyPrint = True + , _piIsDraft = Nothing + , _piUserIp = Nothing + , _piBlogId = pPiBlogId_ + , _piKey = Nothing + , _piOauthToken = Nothing + , _piFields = Nothing + , _piAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piQuotaUser :: Lens' PagesInsert' (Maybe Text) +piQuotaUser + = lens _piQuotaUser (\ s a -> s{_piQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +piPrettyPrint :: Lens' PagesInsert' Bool +piPrettyPrint + = lens _piPrettyPrint + (\ s a -> s{_piPrettyPrint = a}) + +-- | Whether to create the page as a draft (default: false). +piIsDraft :: Lens' PagesInsert' (Maybe Bool) +piIsDraft + = lens _piIsDraft (\ s a -> s{_piIsDraft = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piUserIp :: Lens' PagesInsert' (Maybe Text) +piUserIp = lens _piUserIp (\ s a -> s{_piUserIp = a}) + +-- | ID of the blog to add the page to. +piBlogId :: Lens' PagesInsert' Text +piBlogId = lens _piBlogId (\ s a -> s{_piBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piKey :: Lens' PagesInsert' (Maybe Text) +piKey = lens _piKey (\ s a -> s{_piKey = a}) + +-- | OAuth 2.0 token for the current user. +piOauthToken :: Lens' PagesInsert' (Maybe Text) +piOauthToken + = lens _piOauthToken (\ s a -> s{_piOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piFields :: Lens' PagesInsert' (Maybe Text) +piFields = lens _piFields (\ s a -> s{_piFields = a}) + +-- | Data format for the response. +piAlt :: Lens' PagesInsert' Text +piAlt = lens _piAlt (\ s a -> s{_piAlt = a}) + +instance GoogleRequest PagesInsert' where + type Rs PagesInsert' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesInsert{..} + = go _piQuotaUser _piPrettyPrint _piIsDraft _piUserIp + _piBlogId + _piKey + _piOauthToken + _piFields + _piAlt + where go + = clientWithRoute (Proxy :: Proxy PagesInsertAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/List.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/List.hs new file mode 100644 index 000000000..b8dd7752a --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/List.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the pages for a blog, optionally including non-LIVE statuses. +-- +-- /See:/ for @BloggerPagesList@. +module Blogger.Pages.List + ( + -- * REST Resource + PagesListAPI + + -- * Creating a Request + , pagesList + , PagesList + + -- * Request Lenses + , plStatus + , plQuotaUser + , plPrettyPrint + , plUserIp + , plBlogId + , plKey + , plFetchBodies + , plView + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesList@ which the +-- 'PagesList' request conforms to. +type PagesListAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + QueryParams "status" Text :> + QueryParam "fetchBodies" Bool :> + QueryParam "view" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PageList + +-- | Retrieves the pages for a blog, optionally including non-LIVE statuses. +-- +-- /See:/ 'pagesList' smart constructor. +data PagesList = PagesList + { _plStatus :: !(Maybe Text) + , _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plBlogId :: !Text + , _plKey :: !(Maybe Text) + , _plFetchBodies :: !(Maybe Bool) + , _plView :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !(Maybe Word32) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plStatus' +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plBlogId' +-- +-- * 'plKey' +-- +-- * 'plFetchBodies' +-- +-- * 'plView' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +pagesList + :: Text -- ^ 'blogId' + -> PagesList +pagesList pPlBlogId_ = + PagesList + { _plStatus = Nothing + , _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plBlogId = pPlBlogId_ + , _plKey = Nothing + , _plFetchBodies = Nothing + , _plView = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +plStatus :: Lens' PagesList' (Maybe Text) +plStatus = lens _plStatus (\ s a -> s{_plStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PagesList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PagesList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PagesList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | ID of the blog to fetch Pages from. +plBlogId :: Lens' PagesList' Text +plBlogId = lens _plBlogId (\ s a -> s{_plBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PagesList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | Whether to retrieve the Page bodies. +plFetchBodies :: Lens' PagesList' (Maybe Bool) +plFetchBodies + = lens _plFetchBodies + (\ s a -> s{_plFetchBodies = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require elevated access. +plView :: Lens' PagesList' (Maybe Text) +plView = lens _plView (\ s a -> s{_plView = a}) + +-- | Continuation token if the request is paged. +plPageToken :: Lens' PagesList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PagesList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Maximum number of Pages to fetch. +plMaxResults :: Lens' PagesList' (Maybe Word32) +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PagesList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PagesList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PagesList' where + type Rs PagesList' = PageList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesList{..} + = go _plStatus _plQuotaUser _plPrettyPrint _plUserIp + _plBlogId + _plKey + _plFetchBodies + _plView + _plPageToken + _plOauthToken + _plMaxResults + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PagesListAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Patch.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Patch.hs new file mode 100644 index 000000000..79af8ae3e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Patch.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a page. This method supports patch semantics. +-- +-- /See:/ for @BloggerPagesPatch@. +module Blogger.Pages.Patch + ( + -- * REST Resource + PagesPatchAPI + + -- * Creating a Request + , pagesPatch + , PagesPatch + + -- * Request Lenses + , ppQuotaUser + , ppPrettyPrint + , ppUserIp + , ppBlogId + , ppPageId + , ppKey + , ppRevert + , ppOauthToken + , ppPublish + , ppFields + , ppAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesPatch@ which the +-- 'PagesPatch' request conforms to. +type PagesPatchAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + Capture "pageId" Text :> + QueryParam "revert" Bool :> + QueryParam "publish" Bool :> Patch '[JSON] Page + +-- | Update a page. This method supports patch semantics. +-- +-- /See:/ 'pagesPatch' smart constructor. +data PagesPatch = PagesPatch + { _ppQuotaUser :: !(Maybe Text) + , _ppPrettyPrint :: !Bool + , _ppUserIp :: !(Maybe Text) + , _ppBlogId :: !Text + , _ppPageId :: !Text + , _ppKey :: !(Maybe Text) + , _ppRevert :: !(Maybe Bool) + , _ppOauthToken :: !(Maybe Text) + , _ppPublish :: !(Maybe Bool) + , _ppFields :: !(Maybe Text) + , _ppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppQuotaUser' +-- +-- * 'ppPrettyPrint' +-- +-- * 'ppUserIp' +-- +-- * 'ppBlogId' +-- +-- * 'ppPageId' +-- +-- * 'ppKey' +-- +-- * 'ppRevert' +-- +-- * 'ppOauthToken' +-- +-- * 'ppPublish' +-- +-- * 'ppFields' +-- +-- * 'ppAlt' +pagesPatch + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesPatch +pagesPatch pPpBlogId_ pPpPageId_ = + PagesPatch + { _ppQuotaUser = Nothing + , _ppPrettyPrint = True + , _ppUserIp = Nothing + , _ppBlogId = pPpBlogId_ + , _ppPageId = pPpPageId_ + , _ppKey = Nothing + , _ppRevert = Nothing + , _ppOauthToken = Nothing + , _ppPublish = Nothing + , _ppFields = Nothing + , _ppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ppQuotaUser :: Lens' PagesPatch' (Maybe Text) +ppQuotaUser + = lens _ppQuotaUser (\ s a -> s{_ppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ppPrettyPrint :: Lens' PagesPatch' Bool +ppPrettyPrint + = lens _ppPrettyPrint + (\ s a -> s{_ppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ppUserIp :: Lens' PagesPatch' (Maybe Text) +ppUserIp = lens _ppUserIp (\ s a -> s{_ppUserIp = a}) + +-- | The ID of the Blog. +ppBlogId :: Lens' PagesPatch' Text +ppBlogId = lens _ppBlogId (\ s a -> s{_ppBlogId = a}) + +-- | The ID of the Page. +ppPageId :: Lens' PagesPatch' Text +ppPageId = lens _ppPageId (\ s a -> s{_ppPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ppKey :: Lens' PagesPatch' (Maybe Text) +ppKey = lens _ppKey (\ s a -> s{_ppKey = a}) + +-- | Whether a revert action should be performed when the page is updated +-- (default: false). +ppRevert :: Lens' PagesPatch' (Maybe Bool) +ppRevert = lens _ppRevert (\ s a -> s{_ppRevert = a}) + +-- | OAuth 2.0 token for the current user. +ppOauthToken :: Lens' PagesPatch' (Maybe Text) +ppOauthToken + = lens _ppOauthToken (\ s a -> s{_ppOauthToken = a}) + +-- | Whether a publish action should be performed when the page is updated +-- (default: false). +ppPublish :: Lens' PagesPatch' (Maybe Bool) +ppPublish + = lens _ppPublish (\ s a -> s{_ppPublish = a}) + +-- | Selector specifying which fields to include in a partial response. +ppFields :: Lens' PagesPatch' (Maybe Text) +ppFields = lens _ppFields (\ s a -> s{_ppFields = a}) + +-- | Data format for the response. +ppAlt :: Lens' PagesPatch' Text +ppAlt = lens _ppAlt (\ s a -> s{_ppAlt = a}) + +instance GoogleRequest PagesPatch' where + type Rs PagesPatch' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesPatch{..} + = go _ppQuotaUser _ppPrettyPrint _ppUserIp _ppBlogId + _ppPageId + _ppKey + _ppRevert + _ppOauthToken + _ppPublish + _ppFields + _ppAlt + where go + = clientWithRoute (Proxy :: Proxy PagesPatchAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Publish.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Publish.hs new file mode 100644 index 000000000..3334a941e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Publish.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Publishes a draft page. +-- +-- /See:/ for @BloggerPagesPublish@. +module Blogger.Pages.Publish + ( + -- * REST Resource + PagesPublishAPI + + -- * Creating a Request + , pagesPublish + , PagesPublish + + -- * Request Lenses + , pagQuotaUser + , pagPrettyPrint + , pagUserIp + , pagBlogId + , pagPageId + , pagKey + , pagOauthToken + , pagFields + , pagAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesPublish@ which the +-- 'PagesPublish' request conforms to. +type PagesPublishAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + Capture "pageId" Text :> + "publish" :> Post '[JSON] Page + +-- | Publishes a draft page. +-- +-- /See:/ 'pagesPublish' smart constructor. +data PagesPublish = PagesPublish + { _pagQuotaUser :: !(Maybe Text) + , _pagPrettyPrint :: !Bool + , _pagUserIp :: !(Maybe Text) + , _pagBlogId :: !Text + , _pagPageId :: !Text + , _pagKey :: !(Maybe Text) + , _pagOauthToken :: !(Maybe Text) + , _pagFields :: !(Maybe Text) + , _pagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pagQuotaUser' +-- +-- * 'pagPrettyPrint' +-- +-- * 'pagUserIp' +-- +-- * 'pagBlogId' +-- +-- * 'pagPageId' +-- +-- * 'pagKey' +-- +-- * 'pagOauthToken' +-- +-- * 'pagFields' +-- +-- * 'pagAlt' +pagesPublish + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesPublish +pagesPublish pPagBlogId_ pPagPageId_ = + PagesPublish + { _pagQuotaUser = Nothing + , _pagPrettyPrint = True + , _pagUserIp = Nothing + , _pagBlogId = pPagBlogId_ + , _pagPageId = pPagPageId_ + , _pagKey = Nothing + , _pagOauthToken = Nothing + , _pagFields = Nothing + , _pagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pagQuotaUser :: Lens' PagesPublish' (Maybe Text) +pagQuotaUser + = lens _pagQuotaUser (\ s a -> s{_pagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pagPrettyPrint :: Lens' PagesPublish' Bool +pagPrettyPrint + = lens _pagPrettyPrint + (\ s a -> s{_pagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pagUserIp :: Lens' PagesPublish' (Maybe Text) +pagUserIp + = lens _pagUserIp (\ s a -> s{_pagUserIp = a}) + +-- | The ID of the blog. +pagBlogId :: Lens' PagesPublish' Text +pagBlogId + = lens _pagBlogId (\ s a -> s{_pagBlogId = a}) + +-- | The ID of the page. +pagPageId :: Lens' PagesPublish' Text +pagPageId + = lens _pagPageId (\ s a -> s{_pagPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pagKey :: Lens' PagesPublish' (Maybe Text) +pagKey = lens _pagKey (\ s a -> s{_pagKey = a}) + +-- | OAuth 2.0 token for the current user. +pagOauthToken :: Lens' PagesPublish' (Maybe Text) +pagOauthToken + = lens _pagOauthToken + (\ s a -> s{_pagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pagFields :: Lens' PagesPublish' (Maybe Text) +pagFields + = lens _pagFields (\ s a -> s{_pagFields = a}) + +-- | Data format for the response. +pagAlt :: Lens' PagesPublish' Text +pagAlt = lens _pagAlt (\ s a -> s{_pagAlt = a}) + +instance GoogleRequest PagesPublish' where + type Rs PagesPublish' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesPublish{..} + = go _pagQuotaUser _pagPrettyPrint _pagUserIp + _pagBlogId + _pagPageId + _pagKey + _pagOauthToken + _pagFields + _pagAlt + where go + = clientWithRoute (Proxy :: Proxy PagesPublishAPI) r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Revert.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Revert.hs new file mode 100644 index 000000000..1a4eee970 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Revert.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Revert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Revert a published or scheduled page to draft state. +-- +-- /See:/ for @BloggerPagesRevert@. +module Blogger.Pages.Revert + ( + -- * REST Resource + PagesRevertAPI + + -- * Creating a Request + , pagesRevert + , PagesRevert + + -- * Request Lenses + , prQuotaUser + , prPrettyPrint + , prUserIp + , prBlogId + , prPageId + , prKey + , prOauthToken + , prFields + , prAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesRevert@ which the +-- 'PagesRevert' request conforms to. +type PagesRevertAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + Capture "pageId" Text :> + "revert" :> Post '[JSON] Page + +-- | Revert a published or scheduled page to draft state. +-- +-- /See:/ 'pagesRevert' smart constructor. +data PagesRevert = PagesRevert + { _prQuotaUser :: !(Maybe Text) + , _prPrettyPrint :: !Bool + , _prUserIp :: !(Maybe Text) + , _prBlogId :: !Text + , _prPageId :: !Text + , _prKey :: !(Maybe Text) + , _prOauthToken :: !(Maybe Text) + , _prFields :: !(Maybe Text) + , _prAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesRevert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prQuotaUser' +-- +-- * 'prPrettyPrint' +-- +-- * 'prUserIp' +-- +-- * 'prBlogId' +-- +-- * 'prPageId' +-- +-- * 'prKey' +-- +-- * 'prOauthToken' +-- +-- * 'prFields' +-- +-- * 'prAlt' +pagesRevert + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesRevert +pagesRevert pPrBlogId_ pPrPageId_ = + PagesRevert + { _prQuotaUser = Nothing + , _prPrettyPrint = True + , _prUserIp = Nothing + , _prBlogId = pPrBlogId_ + , _prPageId = pPrPageId_ + , _prKey = Nothing + , _prOauthToken = Nothing + , _prFields = Nothing + , _prAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prQuotaUser :: Lens' PagesRevert' (Maybe Text) +prQuotaUser + = lens _prQuotaUser (\ s a -> s{_prQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prPrettyPrint :: Lens' PagesRevert' Bool +prPrettyPrint + = lens _prPrettyPrint + (\ s a -> s{_prPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prUserIp :: Lens' PagesRevert' (Maybe Text) +prUserIp = lens _prUserIp (\ s a -> s{_prUserIp = a}) + +-- | The ID of the blog. +prBlogId :: Lens' PagesRevert' Text +prBlogId = lens _prBlogId (\ s a -> s{_prBlogId = a}) + +-- | The ID of the page. +prPageId :: Lens' PagesRevert' Text +prPageId = lens _prPageId (\ s a -> s{_prPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prKey :: Lens' PagesRevert' (Maybe Text) +prKey = lens _prKey (\ s a -> s{_prKey = a}) + +-- | OAuth 2.0 token for the current user. +prOauthToken :: Lens' PagesRevert' (Maybe Text) +prOauthToken + = lens _prOauthToken (\ s a -> s{_prOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prFields :: Lens' PagesRevert' (Maybe Text) +prFields = lens _prFields (\ s a -> s{_prFields = a}) + +-- | Data format for the response. +prAlt :: Lens' PagesRevert' Text +prAlt = lens _prAlt (\ s a -> s{_prAlt = a}) + +instance GoogleRequest PagesRevert' where + type Rs PagesRevert' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesRevert{..} + = go _prQuotaUser _prPrettyPrint _prUserIp _prBlogId + _prPageId + _prKey + _prOauthToken + _prFields + _prAlt + where go + = clientWithRoute (Proxy :: Proxy PagesRevertAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Update.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Update.hs new file mode 100644 index 000000000..18c1722d2 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Update.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Pages.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a page. +-- +-- /See:/ for @BloggerPagesUpdate@. +module Blogger.Pages.Update + ( + -- * REST Resource + PagesUpdateAPI + + -- * Creating a Request + , pagesUpdate + , PagesUpdate + + -- * Request Lenses + , puQuotaUser + , puPrettyPrint + , puUserIp + , puBlogId + , puPageId + , puKey + , puRevert + , puOauthToken + , puPublish + , puFields + , puAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPagesUpdate@ which the +-- 'PagesUpdate' request conforms to. +type PagesUpdateAPI = + "blogs" :> + Capture "blogId" Text :> + "pages" :> + Capture "pageId" Text :> + QueryParam "revert" Bool :> + QueryParam "publish" Bool :> Put '[JSON] Page + +-- | Update a page. +-- +-- /See:/ 'pagesUpdate' smart constructor. +data PagesUpdate = PagesUpdate + { _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puBlogId :: !Text + , _puPageId :: !Text + , _puKey :: !(Maybe Text) + , _puRevert :: !(Maybe Bool) + , _puOauthToken :: !(Maybe Text) + , _puPublish :: !(Maybe Bool) + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puBlogId' +-- +-- * 'puPageId' +-- +-- * 'puKey' +-- +-- * 'puRevert' +-- +-- * 'puOauthToken' +-- +-- * 'puPublish' +-- +-- * 'puFields' +-- +-- * 'puAlt' +pagesUpdate + :: Text -- ^ 'blogId' + -> Text -- ^ 'pageId' + -> PagesUpdate +pagesUpdate pPuBlogId_ pPuPageId_ = + PagesUpdate + { _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puBlogId = pPuBlogId_ + , _puPageId = pPuPageId_ + , _puKey = Nothing + , _puRevert = Nothing + , _puOauthToken = Nothing + , _puPublish = Nothing + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PagesUpdate' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PagesUpdate' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PagesUpdate' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | The ID of the Blog. +puBlogId :: Lens' PagesUpdate' Text +puBlogId = lens _puBlogId (\ s a -> s{_puBlogId = a}) + +-- | The ID of the Page. +puPageId :: Lens' PagesUpdate' Text +puPageId = lens _puPageId (\ s a -> s{_puPageId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PagesUpdate' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | Whether a revert action should be performed when the page is updated +-- (default: false). +puRevert :: Lens' PagesUpdate' (Maybe Bool) +puRevert = lens _puRevert (\ s a -> s{_puRevert = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PagesUpdate' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | Whether a publish action should be performed when the page is updated +-- (default: false). +puPublish :: Lens' PagesUpdate' (Maybe Bool) +puPublish + = lens _puPublish (\ s a -> s{_puPublish = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PagesUpdate' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PagesUpdate' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PagesUpdate' where + type Rs PagesUpdate' = Page + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PagesUpdate{..} + = go _puQuotaUser _puPrettyPrint _puUserIp _puBlogId + _puPageId + _puKey + _puRevert + _puOauthToken + _puPublish + _puFields + _puAlt + where go + = clientWithRoute (Proxy :: Proxy PagesUpdateAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/Get.hs new file mode 100644 index 000000000..7518d9767 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/Get.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.PostUserInfos.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one post and user info pair, by post ID and user ID. The post user +-- info contains per-user information about the post, such as access +-- rights, specific to the user. +-- +-- /See:/ for @BloggerPostUserInfosGet@. +module Blogger.PostUserInfos.Get + ( + -- * REST Resource + PostUserInfosGetAPI + + -- * Creating a Request + , postUserInfosGet + , PostUserInfosGet + + -- * Request Lenses + , puigQuotaUser + , puigPrettyPrint + , puigUserIp + , puigBlogId + , puigMaxComments + , puigUserId + , puigKey + , puigPostId + , puigOauthToken + , puigFields + , puigAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostUserInfosGet@ which the +-- 'PostUserInfosGet' request conforms to. +type PostUserInfosGetAPI = + "users" :> + Capture "userId" Text :> + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + QueryParam "maxComments" Word32 :> + Get '[JSON] PostUserInfo + +-- | Gets one post and user info pair, by post ID and user ID. The post user +-- info contains per-user information about the post, such as access +-- rights, specific to the user. +-- +-- /See:/ 'postUserInfosGet' smart constructor. +data PostUserInfosGet = PostUserInfosGet + { _puigQuotaUser :: !(Maybe Text) + , _puigPrettyPrint :: !Bool + , _puigUserIp :: !(Maybe Text) + , _puigBlogId :: !Text + , _puigMaxComments :: !(Maybe Word32) + , _puigUserId :: !Text + , _puigKey :: !(Maybe Text) + , _puigPostId :: !Text + , _puigOauthToken :: !(Maybe Text) + , _puigFields :: !(Maybe Text) + , _puigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostUserInfosGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puigQuotaUser' +-- +-- * 'puigPrettyPrint' +-- +-- * 'puigUserIp' +-- +-- * 'puigBlogId' +-- +-- * 'puigMaxComments' +-- +-- * 'puigUserId' +-- +-- * 'puigKey' +-- +-- * 'puigPostId' +-- +-- * 'puigOauthToken' +-- +-- * 'puigFields' +-- +-- * 'puigAlt' +postUserInfosGet + :: Text -- ^ 'blogId' + -> Text -- ^ 'userId' + -> Text -- ^ 'postId' + -> PostUserInfosGet +postUserInfosGet pPuigBlogId_ pPuigUserId_ pPuigPostId_ = + PostUserInfosGet + { _puigQuotaUser = Nothing + , _puigPrettyPrint = True + , _puigUserIp = Nothing + , _puigBlogId = pPuigBlogId_ + , _puigMaxComments = Nothing + , _puigUserId = pPuigUserId_ + , _puigKey = Nothing + , _puigPostId = pPuigPostId_ + , _puigOauthToken = Nothing + , _puigFields = Nothing + , _puigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puigQuotaUser :: Lens' PostUserInfosGet' (Maybe Text) +puigQuotaUser + = lens _puigQuotaUser + (\ s a -> s{_puigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puigPrettyPrint :: Lens' PostUserInfosGet' Bool +puigPrettyPrint + = lens _puigPrettyPrint + (\ s a -> s{_puigPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puigUserIp :: Lens' PostUserInfosGet' (Maybe Text) +puigUserIp + = lens _puigUserIp (\ s a -> s{_puigUserIp = a}) + +-- | The ID of the blog. +puigBlogId :: Lens' PostUserInfosGet' Text +puigBlogId + = lens _puigBlogId (\ s a -> s{_puigBlogId = a}) + +-- | Maximum number of comments to pull back on a post. +puigMaxComments :: Lens' PostUserInfosGet' (Maybe Word32) +puigMaxComments + = lens _puigMaxComments + (\ s a -> s{_puigMaxComments = a}) + +-- | ID of the user for the per-user information to be fetched. Either the +-- word \'self\' (sans quote marks) or the user\'s profile identifier. +puigUserId :: Lens' PostUserInfosGet' Text +puigUserId + = lens _puigUserId (\ s a -> s{_puigUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puigKey :: Lens' PostUserInfosGet' (Maybe Text) +puigKey = lens _puigKey (\ s a -> s{_puigKey = a}) + +-- | The ID of the post to get. +puigPostId :: Lens' PostUserInfosGet' Text +puigPostId + = lens _puigPostId (\ s a -> s{_puigPostId = a}) + +-- | OAuth 2.0 token for the current user. +puigOauthToken :: Lens' PostUserInfosGet' (Maybe Text) +puigOauthToken + = lens _puigOauthToken + (\ s a -> s{_puigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puigFields :: Lens' PostUserInfosGet' (Maybe Text) +puigFields + = lens _puigFields (\ s a -> s{_puigFields = a}) + +-- | Data format for the response. +puigAlt :: Lens' PostUserInfosGet' Text +puigAlt = lens _puigAlt (\ s a -> s{_puigAlt = a}) + +instance GoogleRequest PostUserInfosGet' where + type Rs PostUserInfosGet' = PostUserInfo + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostUserInfosGet{..} + = go _puigQuotaUser _puigPrettyPrint _puigUserIp + _puigBlogId + _puigMaxComments + _puigUserId + _puigKey + _puigPostId + _puigOauthToken + _puigFields + _puigAlt + where go + = clientWithRoute + (Proxy :: Proxy PostUserInfosGetAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/List.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/List.hs new file mode 100644 index 000000000..adf9d8bb8 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/PostUserInfos/List.hs @@ -0,0 +1,291 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.PostUserInfos.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of post and post user info pairs, possibly filtered. +-- The post user info contains per-user information about the post, such as +-- access rights, specific to the user. +-- +-- /See:/ for @BloggerPostUserInfosList@. +module Blogger.PostUserInfos.List + ( + -- * REST Resource + PostUserInfosListAPI + + -- * Creating a Request + , postUserInfosList + , PostUserInfosList + + -- * Request Lenses + , puilStatus + , puilQuotaUser + , puilPrettyPrint + , puilOrderBy + , puilUserIp + , puilEndDate + , puilBlogId + , puilUserId + , puilStartDate + , puilKey + , puilFetchBodies + , puilView + , puilLabels + , puilPageToken + , puilOauthToken + , puilMaxResults + , puilFields + , puilAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostUserInfosList@ which the +-- 'PostUserInfosList' request conforms to. +type PostUserInfosListAPI = + "users" :> + Capture "userId" Text :> + "blogs" :> + Capture "blogId" Text :> + "posts" :> + QueryParams "status" Text :> + QueryParam "orderBy" Text :> + QueryParam "endDate" UTCTime :> + QueryParam "startDate" UTCTime :> + QueryParam "fetchBodies" Bool :> + QueryParam "view" Text :> + QueryParam "labels" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PostUserInfosList + +-- | Retrieves a list of post and post user info pairs, possibly filtered. +-- The post user info contains per-user information about the post, such as +-- access rights, specific to the user. +-- +-- /See:/ 'postUserInfosList' smart constructor. +data PostUserInfosList = PostUserInfosList + { _puilStatus :: !(Maybe Text) + , _puilQuotaUser :: !(Maybe Text) + , _puilPrettyPrint :: !Bool + , _puilOrderBy :: !Text + , _puilUserIp :: !(Maybe Text) + , _puilEndDate :: !(Maybe UTCTime) + , _puilBlogId :: !Text + , _puilUserId :: !Text + , _puilStartDate :: !(Maybe UTCTime) + , _puilKey :: !(Maybe Text) + , _puilFetchBodies :: !Bool + , _puilView :: !(Maybe Text) + , _puilLabels :: !(Maybe Text) + , _puilPageToken :: !(Maybe Text) + , _puilOauthToken :: !(Maybe Text) + , _puilMaxResults :: !(Maybe Word32) + , _puilFields :: !(Maybe Text) + , _puilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostUserInfosList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puilStatus' +-- +-- * 'puilQuotaUser' +-- +-- * 'puilPrettyPrint' +-- +-- * 'puilOrderBy' +-- +-- * 'puilUserIp' +-- +-- * 'puilEndDate' +-- +-- * 'puilBlogId' +-- +-- * 'puilUserId' +-- +-- * 'puilStartDate' +-- +-- * 'puilKey' +-- +-- * 'puilFetchBodies' +-- +-- * 'puilView' +-- +-- * 'puilLabels' +-- +-- * 'puilPageToken' +-- +-- * 'puilOauthToken' +-- +-- * 'puilMaxResults' +-- +-- * 'puilFields' +-- +-- * 'puilAlt' +postUserInfosList + :: Text -- ^ 'blogId' + -> Text -- ^ 'userId' + -> PostUserInfosList +postUserInfosList pPuilBlogId_ pPuilUserId_ = + PostUserInfosList + { _puilStatus = Nothing + , _puilQuotaUser = Nothing + , _puilPrettyPrint = True + , _puilOrderBy = "PUBLISHED" + , _puilUserIp = Nothing + , _puilEndDate = Nothing + , _puilBlogId = pPuilBlogId_ + , _puilUserId = pPuilUserId_ + , _puilStartDate = Nothing + , _puilKey = Nothing + , _puilFetchBodies = False + , _puilView = Nothing + , _puilLabels = Nothing + , _puilPageToken = Nothing + , _puilOauthToken = Nothing + , _puilMaxResults = Nothing + , _puilFields = Nothing + , _puilAlt = "json" + } + +puilStatus :: Lens' PostUserInfosList' (Maybe Text) +puilStatus + = lens _puilStatus (\ s a -> s{_puilStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puilQuotaUser :: Lens' PostUserInfosList' (Maybe Text) +puilQuotaUser + = lens _puilQuotaUser + (\ s a -> s{_puilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puilPrettyPrint :: Lens' PostUserInfosList' Bool +puilPrettyPrint + = lens _puilPrettyPrint + (\ s a -> s{_puilPrettyPrint = a}) + +-- | Sort order applied to search results. Default is published. +puilOrderBy :: Lens' PostUserInfosList' Text +puilOrderBy + = lens _puilOrderBy (\ s a -> s{_puilOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puilUserIp :: Lens' PostUserInfosList' (Maybe Text) +puilUserIp + = lens _puilUserIp (\ s a -> s{_puilUserIp = a}) + +-- | Latest post date to fetch, a date-time with RFC 3339 formatting. +puilEndDate :: Lens' PostUserInfosList' (Maybe UTCTime) +puilEndDate + = lens _puilEndDate (\ s a -> s{_puilEndDate = a}) + +-- | ID of the blog to fetch posts from. +puilBlogId :: Lens' PostUserInfosList' Text +puilBlogId + = lens _puilBlogId (\ s a -> s{_puilBlogId = a}) + +-- | ID of the user for the per-user information to be fetched. Either the +-- word \'self\' (sans quote marks) or the user\'s profile identifier. +puilUserId :: Lens' PostUserInfosList' Text +puilUserId + = lens _puilUserId (\ s a -> s{_puilUserId = a}) + +-- | Earliest post date to fetch, a date-time with RFC 3339 formatting. +puilStartDate :: Lens' PostUserInfosList' (Maybe UTCTime) +puilStartDate + = lens _puilStartDate + (\ s a -> s{_puilStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puilKey :: Lens' PostUserInfosList' (Maybe Text) +puilKey = lens _puilKey (\ s a -> s{_puilKey = a}) + +-- | Whether the body content of posts is included. Default is false. +puilFetchBodies :: Lens' PostUserInfosList' Bool +puilFetchBodies + = lens _puilFetchBodies + (\ s a -> s{_puilFetchBodies = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require elevated access. +puilView :: Lens' PostUserInfosList' (Maybe Text) +puilView = lens _puilView (\ s a -> s{_puilView = a}) + +-- | Comma-separated list of labels to search for. +puilLabels :: Lens' PostUserInfosList' (Maybe Text) +puilLabels + = lens _puilLabels (\ s a -> s{_puilLabels = a}) + +-- | Continuation token if the request is paged. +puilPageToken :: Lens' PostUserInfosList' (Maybe Text) +puilPageToken + = lens _puilPageToken + (\ s a -> s{_puilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +puilOauthToken :: Lens' PostUserInfosList' (Maybe Text) +puilOauthToken + = lens _puilOauthToken + (\ s a -> s{_puilOauthToken = a}) + +-- | Maximum number of posts to fetch. +puilMaxResults :: Lens' PostUserInfosList' (Maybe Word32) +puilMaxResults + = lens _puilMaxResults + (\ s a -> s{_puilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +puilFields :: Lens' PostUserInfosList' (Maybe Text) +puilFields + = lens _puilFields (\ s a -> s{_puilFields = a}) + +-- | Data format for the response. +puilAlt :: Lens' PostUserInfosList' Text +puilAlt = lens _puilAlt (\ s a -> s{_puilAlt = a}) + +instance GoogleRequest PostUserInfosList' where + type Rs PostUserInfosList' = PostUserInfosList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostUserInfosList{..} + = go _puilStatus _puilQuotaUser _puilPrettyPrint + (Just _puilOrderBy) + _puilUserIp + _puilEndDate + _puilBlogId + _puilUserId + _puilStartDate + _puilKey + (Just _puilFetchBodies) + _puilView + _puilLabels + _puilPageToken + _puilOauthToken + _puilMaxResults + _puilFields + _puilAlt + where go + = clientWithRoute + (Proxy :: Proxy PostUserInfosListAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Delete.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Delete.hs new file mode 100644 index 000000000..06874d5ae --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Delete.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a post by ID. +-- +-- /See:/ for @BloggerPostsDelete@. +module Blogger.Posts.Delete + ( + -- * REST Resource + PostsDeleteAPI + + -- * Creating a Request + , postsDelete + , PostsDelete + + -- * Request Lenses + , pddQuotaUser + , pddPrettyPrint + , pddUserIp + , pddBlogId + , pddKey + , pddPostId + , pddOauthToken + , pddFields + , pddAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsDelete@ which the +-- 'PostsDelete' request conforms to. +type PostsDeleteAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> Capture "postId" Text :> Delete '[JSON] () + +-- | Delete a post by ID. +-- +-- /See:/ 'postsDelete' smart constructor. +data PostsDelete = PostsDelete + { _pddQuotaUser :: !(Maybe Text) + , _pddPrettyPrint :: !Bool + , _pddUserIp :: !(Maybe Text) + , _pddBlogId :: !Text + , _pddKey :: !(Maybe Text) + , _pddPostId :: !Text + , _pddOauthToken :: !(Maybe Text) + , _pddFields :: !(Maybe Text) + , _pddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pddQuotaUser' +-- +-- * 'pddPrettyPrint' +-- +-- * 'pddUserIp' +-- +-- * 'pddBlogId' +-- +-- * 'pddKey' +-- +-- * 'pddPostId' +-- +-- * 'pddOauthToken' +-- +-- * 'pddFields' +-- +-- * 'pddAlt' +postsDelete + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsDelete +postsDelete pPddBlogId_ pPddPostId_ = + PostsDelete + { _pddQuotaUser = Nothing + , _pddPrettyPrint = True + , _pddUserIp = Nothing + , _pddBlogId = pPddBlogId_ + , _pddKey = Nothing + , _pddPostId = pPddPostId_ + , _pddOauthToken = Nothing + , _pddFields = Nothing + , _pddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pddQuotaUser :: Lens' PostsDelete' (Maybe Text) +pddQuotaUser + = lens _pddQuotaUser (\ s a -> s{_pddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pddPrettyPrint :: Lens' PostsDelete' Bool +pddPrettyPrint + = lens _pddPrettyPrint + (\ s a -> s{_pddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pddUserIp :: Lens' PostsDelete' (Maybe Text) +pddUserIp + = lens _pddUserIp (\ s a -> s{_pddUserIp = a}) + +-- | The ID of the Blog. +pddBlogId :: Lens' PostsDelete' Text +pddBlogId + = lens _pddBlogId (\ s a -> s{_pddBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pddKey :: Lens' PostsDelete' (Maybe Text) +pddKey = lens _pddKey (\ s a -> s{_pddKey = a}) + +-- | The ID of the Post. +pddPostId :: Lens' PostsDelete' Text +pddPostId + = lens _pddPostId (\ s a -> s{_pddPostId = a}) + +-- | OAuth 2.0 token for the current user. +pddOauthToken :: Lens' PostsDelete' (Maybe Text) +pddOauthToken + = lens _pddOauthToken + (\ s a -> s{_pddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pddFields :: Lens' PostsDelete' (Maybe Text) +pddFields + = lens _pddFields (\ s a -> s{_pddFields = a}) + +-- | Data format for the response. +pddAlt :: Lens' PostsDelete' Text +pddAlt = lens _pddAlt (\ s a -> s{_pddAlt = a}) + +instance GoogleRequest PostsDelete' where + type Rs PostsDelete' = () + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsDelete{..} + = go _pddQuotaUser _pddPrettyPrint _pddUserIp + _pddBlogId + _pddKey + _pddPostId + _pddOauthToken + _pddFields + _pddAlt + where go + = clientWithRoute (Proxy :: Proxy PostsDeleteAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Get.hs new file mode 100644 index 000000000..b427f336e --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Get.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a post by ID. +-- +-- /See:/ for @BloggerPostsGet@. +module Blogger.Posts.Get + ( + -- * REST Resource + PostsGetAPI + + -- * Creating a Request + , postsGet + , PostsGet + + -- * Request Lenses + , pggFetchBody + , pggQuotaUser + , pggPrettyPrint + , pggUserIp + , pggFetchImages + , pggBlogId + , pggMaxComments + , pggKey + , pggView + , pggPostId + , pggOauthToken + , pggFields + , pggAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsGet@ which the +-- 'PostsGet' request conforms to. +type PostsGetAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + QueryParam "fetchBody" Bool :> + QueryParam "fetchImages" Bool :> + QueryParam "maxComments" Word32 :> + QueryParam "view" Text :> Get '[JSON] Post + +-- | Get a post by ID. +-- +-- /See:/ 'postsGet' smart constructor. +data PostsGet = PostsGet + { _pggFetchBody :: !Bool + , _pggQuotaUser :: !(Maybe Text) + , _pggPrettyPrint :: !Bool + , _pggUserIp :: !(Maybe Text) + , _pggFetchImages :: !(Maybe Bool) + , _pggBlogId :: !Text + , _pggMaxComments :: !(Maybe Word32) + , _pggKey :: !(Maybe Text) + , _pggView :: !(Maybe Text) + , _pggPostId :: !Text + , _pggOauthToken :: !(Maybe Text) + , _pggFields :: !(Maybe Text) + , _pggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pggFetchBody' +-- +-- * 'pggQuotaUser' +-- +-- * 'pggPrettyPrint' +-- +-- * 'pggUserIp' +-- +-- * 'pggFetchImages' +-- +-- * 'pggBlogId' +-- +-- * 'pggMaxComments' +-- +-- * 'pggKey' +-- +-- * 'pggView' +-- +-- * 'pggPostId' +-- +-- * 'pggOauthToken' +-- +-- * 'pggFields' +-- +-- * 'pggAlt' +postsGet + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsGet +postsGet pPggBlogId_ pPggPostId_ = + PostsGet + { _pggFetchBody = True + , _pggQuotaUser = Nothing + , _pggPrettyPrint = True + , _pggUserIp = Nothing + , _pggFetchImages = Nothing + , _pggBlogId = pPggBlogId_ + , _pggMaxComments = Nothing + , _pggKey = Nothing + , _pggView = Nothing + , _pggPostId = pPggPostId_ + , _pggOauthToken = Nothing + , _pggFields = Nothing + , _pggAlt = "json" + } + +-- | Whether the body content of the post is included (default: true). This +-- should be set to false when the post bodies are not required, to help +-- minimize traffic. +pggFetchBody :: Lens' PostsGet' Bool +pggFetchBody + = lens _pggFetchBody (\ s a -> s{_pggFetchBody = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pggQuotaUser :: Lens' PostsGet' (Maybe Text) +pggQuotaUser + = lens _pggQuotaUser (\ s a -> s{_pggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pggPrettyPrint :: Lens' PostsGet' Bool +pggPrettyPrint + = lens _pggPrettyPrint + (\ s a -> s{_pggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pggUserIp :: Lens' PostsGet' (Maybe Text) +pggUserIp + = lens _pggUserIp (\ s a -> s{_pggUserIp = a}) + +-- | Whether image URL metadata for each post is included (default: false). +pggFetchImages :: Lens' PostsGet' (Maybe Bool) +pggFetchImages + = lens _pggFetchImages + (\ s a -> s{_pggFetchImages = a}) + +-- | ID of the blog to fetch the post from. +pggBlogId :: Lens' PostsGet' Text +pggBlogId + = lens _pggBlogId (\ s a -> s{_pggBlogId = a}) + +-- | Maximum number of comments to pull back on a post. +pggMaxComments :: Lens' PostsGet' (Maybe Word32) +pggMaxComments + = lens _pggMaxComments + (\ s a -> s{_pggMaxComments = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pggKey :: Lens' PostsGet' (Maybe Text) +pggKey = lens _pggKey (\ s a -> s{_pggKey = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require elevated access. +pggView :: Lens' PostsGet' (Maybe Text) +pggView = lens _pggView (\ s a -> s{_pggView = a}) + +-- | The ID of the post +pggPostId :: Lens' PostsGet' Text +pggPostId + = lens _pggPostId (\ s a -> s{_pggPostId = a}) + +-- | OAuth 2.0 token for the current user. +pggOauthToken :: Lens' PostsGet' (Maybe Text) +pggOauthToken + = lens _pggOauthToken + (\ s a -> s{_pggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pggFields :: Lens' PostsGet' (Maybe Text) +pggFields + = lens _pggFields (\ s a -> s{_pggFields = a}) + +-- | Data format for the response. +pggAlt :: Lens' PostsGet' Text +pggAlt = lens _pggAlt (\ s a -> s{_pggAlt = a}) + +instance GoogleRequest PostsGet' where + type Rs PostsGet' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsGet{..} + = go (Just _pggFetchBody) _pggQuotaUser + _pggPrettyPrint + _pggUserIp + _pggFetchImages + _pggBlogId + _pggMaxComments + _pggKey + _pggView + _pggPostId + _pggOauthToken + _pggFields + _pggAlt + where go + = clientWithRoute (Proxy :: Proxy PostsGetAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/GetByPath.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/GetByPath.hs new file mode 100644 index 000000000..31a534923 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/GetByPath.hs @@ -0,0 +1,197 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.GetByPath +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve a Post by Path. +-- +-- /See:/ for @BloggerPostsGetByPath@. +module Blogger.Posts.GetByPath + ( + -- * REST Resource + PostsGetByPathAPI + + -- * Creating a Request + , postsGetByPath + , PostsGetByPath + + -- * Request Lenses + , pgbpQuotaUser + , pgbpPrettyPrint + , pgbpPath + , pgbpUserIp + , pgbpBlogId + , pgbpMaxComments + , pgbpKey + , pgbpView + , pgbpOauthToken + , pgbpFields + , pgbpAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsGetByPath@ which the +-- 'PostsGetByPath' request conforms to. +type PostsGetByPathAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + "bypath" :> + QueryParam "path" Text :> + QueryParam "maxComments" Word32 :> + QueryParam "view" Text :> Get '[JSON] Post + +-- | Retrieve a Post by Path. +-- +-- /See:/ 'postsGetByPath' smart constructor. +data PostsGetByPath = PostsGetByPath + { _pgbpQuotaUser :: !(Maybe Text) + , _pgbpPrettyPrint :: !Bool + , _pgbpPath :: !Text + , _pgbpUserIp :: !(Maybe Text) + , _pgbpBlogId :: !Text + , _pgbpMaxComments :: !(Maybe Word32) + , _pgbpKey :: !(Maybe Text) + , _pgbpView :: !(Maybe Text) + , _pgbpOauthToken :: !(Maybe Text) + , _pgbpFields :: !(Maybe Text) + , _pgbpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsGetByPath'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgbpQuotaUser' +-- +-- * 'pgbpPrettyPrint' +-- +-- * 'pgbpPath' +-- +-- * 'pgbpUserIp' +-- +-- * 'pgbpBlogId' +-- +-- * 'pgbpMaxComments' +-- +-- * 'pgbpKey' +-- +-- * 'pgbpView' +-- +-- * 'pgbpOauthToken' +-- +-- * 'pgbpFields' +-- +-- * 'pgbpAlt' +postsGetByPath + :: Text -- ^ 'path' + -> Text -- ^ 'blogId' + -> PostsGetByPath +postsGetByPath pPgbpPath_ pPgbpBlogId_ = + PostsGetByPath + { _pgbpQuotaUser = Nothing + , _pgbpPrettyPrint = True + , _pgbpPath = pPgbpPath_ + , _pgbpUserIp = Nothing + , _pgbpBlogId = pPgbpBlogId_ + , _pgbpMaxComments = Nothing + , _pgbpKey = Nothing + , _pgbpView = Nothing + , _pgbpOauthToken = Nothing + , _pgbpFields = Nothing + , _pgbpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgbpQuotaUser :: Lens' PostsGetByPath' (Maybe Text) +pgbpQuotaUser + = lens _pgbpQuotaUser + (\ s a -> s{_pgbpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgbpPrettyPrint :: Lens' PostsGetByPath' Bool +pgbpPrettyPrint + = lens _pgbpPrettyPrint + (\ s a -> s{_pgbpPrettyPrint = a}) + +-- | Path of the Post to retrieve. +pgbpPath :: Lens' PostsGetByPath' Text +pgbpPath = lens _pgbpPath (\ s a -> s{_pgbpPath = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgbpUserIp :: Lens' PostsGetByPath' (Maybe Text) +pgbpUserIp + = lens _pgbpUserIp (\ s a -> s{_pgbpUserIp = a}) + +-- | ID of the blog to fetch the post from. +pgbpBlogId :: Lens' PostsGetByPath' Text +pgbpBlogId + = lens _pgbpBlogId (\ s a -> s{_pgbpBlogId = a}) + +-- | Maximum number of comments to pull back on a post. +pgbpMaxComments :: Lens' PostsGetByPath' (Maybe Word32) +pgbpMaxComments + = lens _pgbpMaxComments + (\ s a -> s{_pgbpMaxComments = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgbpKey :: Lens' PostsGetByPath' (Maybe Text) +pgbpKey = lens _pgbpKey (\ s a -> s{_pgbpKey = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require elevated access. +pgbpView :: Lens' PostsGetByPath' (Maybe Text) +pgbpView = lens _pgbpView (\ s a -> s{_pgbpView = a}) + +-- | OAuth 2.0 token for the current user. +pgbpOauthToken :: Lens' PostsGetByPath' (Maybe Text) +pgbpOauthToken + = lens _pgbpOauthToken + (\ s a -> s{_pgbpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgbpFields :: Lens' PostsGetByPath' (Maybe Text) +pgbpFields + = lens _pgbpFields (\ s a -> s{_pgbpFields = a}) + +-- | Data format for the response. +pgbpAlt :: Lens' PostsGetByPath' Text +pgbpAlt = lens _pgbpAlt (\ s a -> s{_pgbpAlt = a}) + +instance GoogleRequest PostsGetByPath' where + type Rs PostsGetByPath' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsGetByPath{..} + = go _pgbpQuotaUser _pgbpPrettyPrint (Just _pgbpPath) + _pgbpUserIp + _pgbpBlogId + _pgbpMaxComments + _pgbpKey + _pgbpView + _pgbpOauthToken + _pgbpFields + _pgbpAlt + where go + = clientWithRoute (Proxy :: Proxy PostsGetByPathAPI) + r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Insert.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Insert.hs new file mode 100644 index 000000000..d370154cb --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Insert.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a post. +-- +-- /See:/ for @BloggerPostsInsert@. +module Blogger.Posts.Insert + ( + -- * REST Resource + PostsInsertAPI + + -- * Creating a Request + , postsInsert + , PostsInsert + + -- * Request Lenses + , posFetchBody + , posQuotaUser + , posPrettyPrint + , posIsDraft + , posUserIp + , posFetchImages + , posBlogId + , posKey + , posOauthToken + , posFields + , posAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsInsert@ which the +-- 'PostsInsert' request conforms to. +type PostsInsertAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + QueryParam "fetchBody" Bool :> + QueryParam "isDraft" Bool :> + QueryParam "fetchImages" Bool :> Post '[JSON] Post + +-- | Add a post. +-- +-- /See:/ 'postsInsert' smart constructor. +data PostsInsert = PostsInsert + { _posFetchBody :: !Bool + , _posQuotaUser :: !(Maybe Text) + , _posPrettyPrint :: !Bool + , _posIsDraft :: !(Maybe Bool) + , _posUserIp :: !(Maybe Text) + , _posFetchImages :: !(Maybe Bool) + , _posBlogId :: !Text + , _posKey :: !(Maybe Text) + , _posOauthToken :: !(Maybe Text) + , _posFields :: !(Maybe Text) + , _posAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'posFetchBody' +-- +-- * 'posQuotaUser' +-- +-- * 'posPrettyPrint' +-- +-- * 'posIsDraft' +-- +-- * 'posUserIp' +-- +-- * 'posFetchImages' +-- +-- * 'posBlogId' +-- +-- * 'posKey' +-- +-- * 'posOauthToken' +-- +-- * 'posFields' +-- +-- * 'posAlt' +postsInsert + :: Text -- ^ 'blogId' + -> PostsInsert +postsInsert pPosBlogId_ = + PostsInsert + { _posFetchBody = True + , _posQuotaUser = Nothing + , _posPrettyPrint = True + , _posIsDraft = Nothing + , _posUserIp = Nothing + , _posFetchImages = Nothing + , _posBlogId = pPosBlogId_ + , _posKey = Nothing + , _posOauthToken = Nothing + , _posFields = Nothing + , _posAlt = "json" + } + +-- | Whether the body content of the post is included with the result +-- (default: true). +posFetchBody :: Lens' PostsInsert' Bool +posFetchBody + = lens _posFetchBody (\ s a -> s{_posFetchBody = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +posQuotaUser :: Lens' PostsInsert' (Maybe Text) +posQuotaUser + = lens _posQuotaUser (\ s a -> s{_posQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +posPrettyPrint :: Lens' PostsInsert' Bool +posPrettyPrint + = lens _posPrettyPrint + (\ s a -> s{_posPrettyPrint = a}) + +-- | Whether to create the post as a draft (default: false). +posIsDraft :: Lens' PostsInsert' (Maybe Bool) +posIsDraft + = lens _posIsDraft (\ s a -> s{_posIsDraft = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +posUserIp :: Lens' PostsInsert' (Maybe Text) +posUserIp + = lens _posUserIp (\ s a -> s{_posUserIp = a}) + +-- | Whether image URL metadata for each post is included in the returned +-- result (default: false). +posFetchImages :: Lens' PostsInsert' (Maybe Bool) +posFetchImages + = lens _posFetchImages + (\ s a -> s{_posFetchImages = a}) + +-- | ID of the blog to add the post to. +posBlogId :: Lens' PostsInsert' Text +posBlogId + = lens _posBlogId (\ s a -> s{_posBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +posKey :: Lens' PostsInsert' (Maybe Text) +posKey = lens _posKey (\ s a -> s{_posKey = a}) + +-- | OAuth 2.0 token for the current user. +posOauthToken :: Lens' PostsInsert' (Maybe Text) +posOauthToken + = lens _posOauthToken + (\ s a -> s{_posOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +posFields :: Lens' PostsInsert' (Maybe Text) +posFields + = lens _posFields (\ s a -> s{_posFields = a}) + +-- | Data format for the response. +posAlt :: Lens' PostsInsert' Text +posAlt = lens _posAlt (\ s a -> s{_posAlt = a}) + +instance GoogleRequest PostsInsert' where + type Rs PostsInsert' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsInsert{..} + = go (Just _posFetchBody) _posQuotaUser + _posPrettyPrint + _posIsDraft + _posUserIp + _posFetchImages + _posBlogId + _posKey + _posOauthToken + _posFields + _posAlt + where go + = clientWithRoute (Proxy :: Proxy PostsInsertAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/List.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/List.hs new file mode 100644 index 000000000..14e5a284d --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/List.hs @@ -0,0 +1,282 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of posts, possibly filtered. +-- +-- /See:/ for @BloggerPostsList@. +module Blogger.Posts.List + ( + -- * REST Resource + PostsListAPI + + -- * Creating a Request + , postsList + , PostsList + + -- * Request Lenses + , pllStatus + , pllQuotaUser + , pllPrettyPrint + , pllOrderBy + , pllUserIp + , pllFetchImages + , pllEndDate + , pllBlogId + , pllStartDate + , pllKey + , pllFetchBodies + , pllView + , pllLabels + , pllPageToken + , pllOauthToken + , pllMaxResults + , pllFields + , pllAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsList@ which the +-- 'PostsList' request conforms to. +type PostsListAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + QueryParams "status" Text :> + QueryParam "orderBy" Text :> + QueryParam "fetchImages" Bool :> + QueryParam "endDate" UTCTime :> + QueryParam "startDate" UTCTime :> + QueryParam "fetchBodies" Bool :> + QueryParam "view" Text :> + QueryParam "labels" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PostList + +-- | Retrieves a list of posts, possibly filtered. +-- +-- /See:/ 'postsList' smart constructor. +data PostsList = PostsList + { _pllStatus :: !(Maybe Text) + , _pllQuotaUser :: !(Maybe Text) + , _pllPrettyPrint :: !Bool + , _pllOrderBy :: !Text + , _pllUserIp :: !(Maybe Text) + , _pllFetchImages :: !(Maybe Bool) + , _pllEndDate :: !(Maybe UTCTime) + , _pllBlogId :: !Text + , _pllStartDate :: !(Maybe UTCTime) + , _pllKey :: !(Maybe Text) + , _pllFetchBodies :: !Bool + , _pllView :: !(Maybe Text) + , _pllLabels :: !(Maybe Text) + , _pllPageToken :: !(Maybe Text) + , _pllOauthToken :: !(Maybe Text) + , _pllMaxResults :: !(Maybe Word32) + , _pllFields :: !(Maybe Text) + , _pllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllStatus' +-- +-- * 'pllQuotaUser' +-- +-- * 'pllPrettyPrint' +-- +-- * 'pllOrderBy' +-- +-- * 'pllUserIp' +-- +-- * 'pllFetchImages' +-- +-- * 'pllEndDate' +-- +-- * 'pllBlogId' +-- +-- * 'pllStartDate' +-- +-- * 'pllKey' +-- +-- * 'pllFetchBodies' +-- +-- * 'pllView' +-- +-- * 'pllLabels' +-- +-- * 'pllPageToken' +-- +-- * 'pllOauthToken' +-- +-- * 'pllMaxResults' +-- +-- * 'pllFields' +-- +-- * 'pllAlt' +postsList + :: Text -- ^ 'blogId' + -> PostsList +postsList pPllBlogId_ = + PostsList + { _pllStatus = Nothing + , _pllQuotaUser = Nothing + , _pllPrettyPrint = True + , _pllOrderBy = "PUBLISHED" + , _pllUserIp = Nothing + , _pllFetchImages = Nothing + , _pllEndDate = Nothing + , _pllBlogId = pPllBlogId_ + , _pllStartDate = Nothing + , _pllKey = Nothing + , _pllFetchBodies = True + , _pllView = Nothing + , _pllLabels = Nothing + , _pllPageToken = Nothing + , _pllOauthToken = Nothing + , _pllMaxResults = Nothing + , _pllFields = Nothing + , _pllAlt = "json" + } + +-- | Statuses to include in the results. +pllStatus :: Lens' PostsList' (Maybe Text) +pllStatus + = lens _pllStatus (\ s a -> s{_pllStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pllQuotaUser :: Lens' PostsList' (Maybe Text) +pllQuotaUser + = lens _pllQuotaUser (\ s a -> s{_pllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pllPrettyPrint :: Lens' PostsList' Bool +pllPrettyPrint + = lens _pllPrettyPrint + (\ s a -> s{_pllPrettyPrint = a}) + +-- | Sort search results +pllOrderBy :: Lens' PostsList' Text +pllOrderBy + = lens _pllOrderBy (\ s a -> s{_pllOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pllUserIp :: Lens' PostsList' (Maybe Text) +pllUserIp + = lens _pllUserIp (\ s a -> s{_pllUserIp = a}) + +-- | Whether image URL metadata for each post is included. +pllFetchImages :: Lens' PostsList' (Maybe Bool) +pllFetchImages + = lens _pllFetchImages + (\ s a -> s{_pllFetchImages = a}) + +-- | Latest post date to fetch, a date-time with RFC 3339 formatting. +pllEndDate :: Lens' PostsList' (Maybe UTCTime) +pllEndDate + = lens _pllEndDate (\ s a -> s{_pllEndDate = a}) + +-- | ID of the blog to fetch posts from. +pllBlogId :: Lens' PostsList' Text +pllBlogId + = lens _pllBlogId (\ s a -> s{_pllBlogId = a}) + +-- | Earliest post date to fetch, a date-time with RFC 3339 formatting. +pllStartDate :: Lens' PostsList' (Maybe UTCTime) +pllStartDate + = lens _pllStartDate (\ s a -> s{_pllStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pllKey :: Lens' PostsList' (Maybe Text) +pllKey = lens _pllKey (\ s a -> s{_pllKey = a}) + +-- | Whether the body content of posts is included (default: true). This +-- should be set to false when the post bodies are not required, to help +-- minimize traffic. +pllFetchBodies :: Lens' PostsList' Bool +pllFetchBodies + = lens _pllFetchBodies + (\ s a -> s{_pllFetchBodies = a}) + +-- | Access level with which to view the returned result. Note that some +-- fields require escalated access. +pllView :: Lens' PostsList' (Maybe Text) +pllView = lens _pllView (\ s a -> s{_pllView = a}) + +-- | Comma-separated list of labels to search for. +pllLabels :: Lens' PostsList' (Maybe Text) +pllLabels + = lens _pllLabels (\ s a -> s{_pllLabels = a}) + +-- | Continuation token if the request is paged. +pllPageToken :: Lens' PostsList' (Maybe Text) +pllPageToken + = lens _pllPageToken (\ s a -> s{_pllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +pllOauthToken :: Lens' PostsList' (Maybe Text) +pllOauthToken + = lens _pllOauthToken + (\ s a -> s{_pllOauthToken = a}) + +-- | Maximum number of posts to fetch. +pllMaxResults :: Lens' PostsList' (Maybe Word32) +pllMaxResults + = lens _pllMaxResults + (\ s a -> s{_pllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +pllFields :: Lens' PostsList' (Maybe Text) +pllFields + = lens _pllFields (\ s a -> s{_pllFields = a}) + +-- | Data format for the response. +pllAlt :: Lens' PostsList' Text +pllAlt = lens _pllAlt (\ s a -> s{_pllAlt = a}) + +instance GoogleRequest PostsList' where + type Rs PostsList' = PostList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsList{..} + = go _pllStatus _pllQuotaUser _pllPrettyPrint + (Just _pllOrderBy) + _pllUserIp + _pllFetchImages + _pllEndDate + _pllBlogId + _pllStartDate + _pllKey + (Just _pllFetchBodies) + _pllView + _pllLabels + _pllPageToken + _pllOauthToken + _pllMaxResults + _pllFields + _pllAlt + where go + = clientWithRoute (Proxy :: Proxy PostsListAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Patch.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Patch.hs new file mode 100644 index 000000000..504413adb --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Patch.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a post. This method supports patch semantics. +-- +-- /See:/ for @BloggerPostsPatch@. +module Blogger.Posts.Patch + ( + -- * REST Resource + PostsPatchAPI + + -- * Creating a Request + , postsPatch + , PostsPatch + + -- * Request Lenses + , pppFetchBody + , pppQuotaUser + , pppPrettyPrint + , pppUserIp + , pppFetchImages + , pppBlogId + , pppMaxComments + , pppKey + , pppRevert + , pppPostId + , pppOauthToken + , pppPublish + , pppFields + , pppAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsPatch@ which the +-- 'PostsPatch' request conforms to. +type PostsPatchAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + QueryParam "fetchBody" Bool :> + QueryParam "fetchImages" Bool :> + QueryParam "maxComments" Word32 :> + QueryParam "revert" Bool :> + QueryParam "publish" Bool :> Patch '[JSON] Post + +-- | Update a post. This method supports patch semantics. +-- +-- /See:/ 'postsPatch' smart constructor. +data PostsPatch = PostsPatch + { _pppFetchBody :: !Bool + , _pppQuotaUser :: !(Maybe Text) + , _pppPrettyPrint :: !Bool + , _pppUserIp :: !(Maybe Text) + , _pppFetchImages :: !(Maybe Bool) + , _pppBlogId :: !Text + , _pppMaxComments :: !(Maybe Word32) + , _pppKey :: !(Maybe Text) + , _pppRevert :: !(Maybe Bool) + , _pppPostId :: !Text + , _pppOauthToken :: !(Maybe Text) + , _pppPublish :: !(Maybe Bool) + , _pppFields :: !(Maybe Text) + , _pppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pppFetchBody' +-- +-- * 'pppQuotaUser' +-- +-- * 'pppPrettyPrint' +-- +-- * 'pppUserIp' +-- +-- * 'pppFetchImages' +-- +-- * 'pppBlogId' +-- +-- * 'pppMaxComments' +-- +-- * 'pppKey' +-- +-- * 'pppRevert' +-- +-- * 'pppPostId' +-- +-- * 'pppOauthToken' +-- +-- * 'pppPublish' +-- +-- * 'pppFields' +-- +-- * 'pppAlt' +postsPatch + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsPatch +postsPatch pPppBlogId_ pPppPostId_ = + PostsPatch + { _pppFetchBody = True + , _pppQuotaUser = Nothing + , _pppPrettyPrint = True + , _pppUserIp = Nothing + , _pppFetchImages = Nothing + , _pppBlogId = pPppBlogId_ + , _pppMaxComments = Nothing + , _pppKey = Nothing + , _pppRevert = Nothing + , _pppPostId = pPppPostId_ + , _pppOauthToken = Nothing + , _pppPublish = Nothing + , _pppFields = Nothing + , _pppAlt = "json" + } + +-- | Whether the body content of the post is included with the result +-- (default: true). +pppFetchBody :: Lens' PostsPatch' Bool +pppFetchBody + = lens _pppFetchBody (\ s a -> s{_pppFetchBody = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pppQuotaUser :: Lens' PostsPatch' (Maybe Text) +pppQuotaUser + = lens _pppQuotaUser (\ s a -> s{_pppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pppPrettyPrint :: Lens' PostsPatch' Bool +pppPrettyPrint + = lens _pppPrettyPrint + (\ s a -> s{_pppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pppUserIp :: Lens' PostsPatch' (Maybe Text) +pppUserIp + = lens _pppUserIp (\ s a -> s{_pppUserIp = a}) + +-- | Whether image URL metadata for each post is included in the returned +-- result (default: false). +pppFetchImages :: Lens' PostsPatch' (Maybe Bool) +pppFetchImages + = lens _pppFetchImages + (\ s a -> s{_pppFetchImages = a}) + +-- | The ID of the Blog. +pppBlogId :: Lens' PostsPatch' Text +pppBlogId + = lens _pppBlogId (\ s a -> s{_pppBlogId = a}) + +-- | Maximum number of comments to retrieve with the returned post. +pppMaxComments :: Lens' PostsPatch' (Maybe Word32) +pppMaxComments + = lens _pppMaxComments + (\ s a -> s{_pppMaxComments = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pppKey :: Lens' PostsPatch' (Maybe Text) +pppKey = lens _pppKey (\ s a -> s{_pppKey = a}) + +-- | Whether a revert action should be performed when the post is updated +-- (default: false). +pppRevert :: Lens' PostsPatch' (Maybe Bool) +pppRevert + = lens _pppRevert (\ s a -> s{_pppRevert = a}) + +-- | The ID of the Post. +pppPostId :: Lens' PostsPatch' Text +pppPostId + = lens _pppPostId (\ s a -> s{_pppPostId = a}) + +-- | OAuth 2.0 token for the current user. +pppOauthToken :: Lens' PostsPatch' (Maybe Text) +pppOauthToken + = lens _pppOauthToken + (\ s a -> s{_pppOauthToken = a}) + +-- | Whether a publish action should be performed when the post is updated +-- (default: false). +pppPublish :: Lens' PostsPatch' (Maybe Bool) +pppPublish + = lens _pppPublish (\ s a -> s{_pppPublish = a}) + +-- | Selector specifying which fields to include in a partial response. +pppFields :: Lens' PostsPatch' (Maybe Text) +pppFields + = lens _pppFields (\ s a -> s{_pppFields = a}) + +-- | Data format for the response. +pppAlt :: Lens' PostsPatch' Text +pppAlt = lens _pppAlt (\ s a -> s{_pppAlt = a}) + +instance GoogleRequest PostsPatch' where + type Rs PostsPatch' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsPatch{..} + = go (Just _pppFetchBody) _pppQuotaUser + _pppPrettyPrint + _pppUserIp + _pppFetchImages + _pppBlogId + _pppMaxComments + _pppKey + _pppRevert + _pppPostId + _pppOauthToken + _pppPublish + _pppFields + _pppAlt + where go + = clientWithRoute (Proxy :: Proxy PostsPatchAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Publish.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Publish.hs new file mode 100644 index 000000000..1f4b9fabc --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Publish.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Publishes a draft post, optionally at the specific time of the given +-- publishDate parameter. +-- +-- /See:/ for @BloggerPostsPublish@. +module Blogger.Posts.Publish + ( + -- * REST Resource + PostsPublishAPI + + -- * Creating a Request + , postsPublish + , PostsPublish + + -- * Request Lenses + , posoQuotaUser + , posoPrettyPrint + , posoPublishDate + , posoUserIp + , posoBlogId + , posoKey + , posoPostId + , posoOauthToken + , posoFields + , posoAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsPublish@ which the +-- 'PostsPublish' request conforms to. +type PostsPublishAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "publish" :> + QueryParam "publishDate" UTCTime :> Post '[JSON] Post + +-- | Publishes a draft post, optionally at the specific time of the given +-- publishDate parameter. +-- +-- /See:/ 'postsPublish' smart constructor. +data PostsPublish = PostsPublish + { _posoQuotaUser :: !(Maybe Text) + , _posoPrettyPrint :: !Bool + , _posoPublishDate :: !(Maybe UTCTime) + , _posoUserIp :: !(Maybe Text) + , _posoBlogId :: !Text + , _posoKey :: !(Maybe Text) + , _posoPostId :: !Text + , _posoOauthToken :: !(Maybe Text) + , _posoFields :: !(Maybe Text) + , _posoAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'posoQuotaUser' +-- +-- * 'posoPrettyPrint' +-- +-- * 'posoPublishDate' +-- +-- * 'posoUserIp' +-- +-- * 'posoBlogId' +-- +-- * 'posoKey' +-- +-- * 'posoPostId' +-- +-- * 'posoOauthToken' +-- +-- * 'posoFields' +-- +-- * 'posoAlt' +postsPublish + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsPublish +postsPublish pPosoBlogId_ pPosoPostId_ = + PostsPublish + { _posoQuotaUser = Nothing + , _posoPrettyPrint = True + , _posoPublishDate = Nothing + , _posoUserIp = Nothing + , _posoBlogId = pPosoBlogId_ + , _posoKey = Nothing + , _posoPostId = pPosoPostId_ + , _posoOauthToken = Nothing + , _posoFields = Nothing + , _posoAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +posoQuotaUser :: Lens' PostsPublish' (Maybe Text) +posoQuotaUser + = lens _posoQuotaUser + (\ s a -> s{_posoQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +posoPrettyPrint :: Lens' PostsPublish' Bool +posoPrettyPrint + = lens _posoPrettyPrint + (\ s a -> s{_posoPrettyPrint = a}) + +-- | Optional date and time to schedule the publishing of the Blog. If no +-- publishDate parameter is given, the post is either published at the a +-- previously saved schedule date (if present), or the current time. If a +-- future date is given, the post will be scheduled to be published. +posoPublishDate :: Lens' PostsPublish' (Maybe UTCTime) +posoPublishDate + = lens _posoPublishDate + (\ s a -> s{_posoPublishDate = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +posoUserIp :: Lens' PostsPublish' (Maybe Text) +posoUserIp + = lens _posoUserIp (\ s a -> s{_posoUserIp = a}) + +-- | The ID of the Blog. +posoBlogId :: Lens' PostsPublish' Text +posoBlogId + = lens _posoBlogId (\ s a -> s{_posoBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +posoKey :: Lens' PostsPublish' (Maybe Text) +posoKey = lens _posoKey (\ s a -> s{_posoKey = a}) + +-- | The ID of the Post. +posoPostId :: Lens' PostsPublish' Text +posoPostId + = lens _posoPostId (\ s a -> s{_posoPostId = a}) + +-- | OAuth 2.0 token for the current user. +posoOauthToken :: Lens' PostsPublish' (Maybe Text) +posoOauthToken + = lens _posoOauthToken + (\ s a -> s{_posoOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +posoFields :: Lens' PostsPublish' (Maybe Text) +posoFields + = lens _posoFields (\ s a -> s{_posoFields = a}) + +-- | Data format for the response. +posoAlt :: Lens' PostsPublish' Text +posoAlt = lens _posoAlt (\ s a -> s{_posoAlt = a}) + +instance GoogleRequest PostsPublish' where + type Rs PostsPublish' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsPublish{..} + = go _posoQuotaUser _posoPrettyPrint _posoPublishDate + _posoUserIp + _posoBlogId + _posoKey + _posoPostId + _posoOauthToken + _posoFields + _posoAlt + where go + = clientWithRoute (Proxy :: Proxy PostsPublishAPI) r + u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Revert.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Revert.hs new file mode 100644 index 000000000..b4427aa62 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Revert.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Revert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Revert a published or scheduled post to draft state. +-- +-- /See:/ for @BloggerPostsRevert@. +module Blogger.Posts.Revert + ( + -- * REST Resource + PostsRevertAPI + + -- * Creating a Request + , postsRevert + , PostsRevert + + -- * Request Lenses + , prrQuotaUser + , prrPrettyPrint + , prrUserIp + , prrBlogId + , prrKey + , prrPostId + , prrOauthToken + , prrFields + , prrAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsRevert@ which the +-- 'PostsRevert' request conforms to. +type PostsRevertAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + "revert" :> Post '[JSON] Post + +-- | Revert a published or scheduled post to draft state. +-- +-- /See:/ 'postsRevert' smart constructor. +data PostsRevert = PostsRevert + { _prrQuotaUser :: !(Maybe Text) + , _prrPrettyPrint :: !Bool + , _prrUserIp :: !(Maybe Text) + , _prrBlogId :: !Text + , _prrKey :: !(Maybe Text) + , _prrPostId :: !Text + , _prrOauthToken :: !(Maybe Text) + , _prrFields :: !(Maybe Text) + , _prrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsRevert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prrQuotaUser' +-- +-- * 'prrPrettyPrint' +-- +-- * 'prrUserIp' +-- +-- * 'prrBlogId' +-- +-- * 'prrKey' +-- +-- * 'prrPostId' +-- +-- * 'prrOauthToken' +-- +-- * 'prrFields' +-- +-- * 'prrAlt' +postsRevert + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsRevert +postsRevert pPrrBlogId_ pPrrPostId_ = + PostsRevert + { _prrQuotaUser = Nothing + , _prrPrettyPrint = True + , _prrUserIp = Nothing + , _prrBlogId = pPrrBlogId_ + , _prrKey = Nothing + , _prrPostId = pPrrPostId_ + , _prrOauthToken = Nothing + , _prrFields = Nothing + , _prrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prrQuotaUser :: Lens' PostsRevert' (Maybe Text) +prrQuotaUser + = lens _prrQuotaUser (\ s a -> s{_prrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prrPrettyPrint :: Lens' PostsRevert' Bool +prrPrettyPrint + = lens _prrPrettyPrint + (\ s a -> s{_prrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prrUserIp :: Lens' PostsRevert' (Maybe Text) +prrUserIp + = lens _prrUserIp (\ s a -> s{_prrUserIp = a}) + +-- | The ID of the Blog. +prrBlogId :: Lens' PostsRevert' Text +prrBlogId + = lens _prrBlogId (\ s a -> s{_prrBlogId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prrKey :: Lens' PostsRevert' (Maybe Text) +prrKey = lens _prrKey (\ s a -> s{_prrKey = a}) + +-- | The ID of the Post. +prrPostId :: Lens' PostsRevert' Text +prrPostId + = lens _prrPostId (\ s a -> s{_prrPostId = a}) + +-- | OAuth 2.0 token for the current user. +prrOauthToken :: Lens' PostsRevert' (Maybe Text) +prrOauthToken + = lens _prrOauthToken + (\ s a -> s{_prrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prrFields :: Lens' PostsRevert' (Maybe Text) +prrFields + = lens _prrFields (\ s a -> s{_prrFields = a}) + +-- | Data format for the response. +prrAlt :: Lens' PostsRevert' Text +prrAlt = lens _prrAlt (\ s a -> s{_prrAlt = a}) + +instance GoogleRequest PostsRevert' where + type Rs PostsRevert' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsRevert{..} + = go _prrQuotaUser _prrPrettyPrint _prrUserIp + _prrBlogId + _prrKey + _prrPostId + _prrOauthToken + _prrFields + _prrAlt + where go + = clientWithRoute (Proxy :: Proxy PostsRevertAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Search.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Search.hs new file mode 100644 index 000000000..632574e68 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Search.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Search for a post. +-- +-- /See:/ for @BloggerPostsSearch@. +module Blogger.Posts.Search + ( + -- * REST Resource + PostsSearchAPI + + -- * Creating a Request + , postsSearch + , PostsSearch + + -- * Request Lenses + , psQuotaUser + , psPrettyPrint + , psOrderBy + , psUserIp + , psBlogId + , psQ + , psKey + , psFetchBodies + , psOauthToken + , psFields + , psAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsSearch@ which the +-- 'PostsSearch' request conforms to. +type PostsSearchAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + "search" :> + QueryParam "orderBy" Text :> + QueryParam "q" Text :> + QueryParam "fetchBodies" Bool :> Get '[JSON] PostList + +-- | Search for a post. +-- +-- /See:/ 'postsSearch' smart constructor. +data PostsSearch = PostsSearch + { _psQuotaUser :: !(Maybe Text) + , _psPrettyPrint :: !Bool + , _psOrderBy :: !Text + , _psUserIp :: !(Maybe Text) + , _psBlogId :: !Text + , _psQ :: !Text + , _psKey :: !(Maybe Text) + , _psFetchBodies :: !Bool + , _psOauthToken :: !(Maybe Text) + , _psFields :: !(Maybe Text) + , _psAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psQuotaUser' +-- +-- * 'psPrettyPrint' +-- +-- * 'psOrderBy' +-- +-- * 'psUserIp' +-- +-- * 'psBlogId' +-- +-- * 'psQ' +-- +-- * 'psKey' +-- +-- * 'psFetchBodies' +-- +-- * 'psOauthToken' +-- +-- * 'psFields' +-- +-- * 'psAlt' +postsSearch + :: Text -- ^ 'blogId' + -> Text -- ^ 'q' + -> PostsSearch +postsSearch pPsBlogId_ pPsQ_ = + PostsSearch + { _psQuotaUser = Nothing + , _psPrettyPrint = True + , _psOrderBy = "PUBLISHED" + , _psUserIp = Nothing + , _psBlogId = pPsBlogId_ + , _psQ = pPsQ_ + , _psKey = Nothing + , _psFetchBodies = True + , _psOauthToken = Nothing + , _psFields = Nothing + , _psAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psQuotaUser :: Lens' PostsSearch' (Maybe Text) +psQuotaUser + = lens _psQuotaUser (\ s a -> s{_psQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psPrettyPrint :: Lens' PostsSearch' Bool +psPrettyPrint + = lens _psPrettyPrint + (\ s a -> s{_psPrettyPrint = a}) + +-- | Sort search results +psOrderBy :: Lens' PostsSearch' Text +psOrderBy + = lens _psOrderBy (\ s a -> s{_psOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psUserIp :: Lens' PostsSearch' (Maybe Text) +psUserIp = lens _psUserIp (\ s a -> s{_psUserIp = a}) + +-- | ID of the blog to fetch the post from. +psBlogId :: Lens' PostsSearch' Text +psBlogId = lens _psBlogId (\ s a -> s{_psBlogId = a}) + +-- | Query terms to search this blog for matching posts. +psQ :: Lens' PostsSearch' Text +psQ = lens _psQ (\ s a -> s{_psQ = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psKey :: Lens' PostsSearch' (Maybe Text) +psKey = lens _psKey (\ s a -> s{_psKey = a}) + +-- | Whether the body content of posts is included (default: true). This +-- should be set to false when the post bodies are not required, to help +-- minimize traffic. +psFetchBodies :: Lens' PostsSearch' Bool +psFetchBodies + = lens _psFetchBodies + (\ s a -> s{_psFetchBodies = a}) + +-- | OAuth 2.0 token for the current user. +psOauthToken :: Lens' PostsSearch' (Maybe Text) +psOauthToken + = lens _psOauthToken (\ s a -> s{_psOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psFields :: Lens' PostsSearch' (Maybe Text) +psFields = lens _psFields (\ s a -> s{_psFields = a}) + +-- | Data format for the response. +psAlt :: Lens' PostsSearch' Text +psAlt = lens _psAlt (\ s a -> s{_psAlt = a}) + +instance GoogleRequest PostsSearch' where + type Rs PostsSearch' = PostList + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsSearch{..} + = go _psQuotaUser _psPrettyPrint (Just _psOrderBy) + _psUserIp + _psBlogId + (Just _psQ) + _psKey + (Just _psFetchBodies) + _psOauthToken + _psFields + _psAlt + where go + = clientWithRoute (Proxy :: Proxy PostsSearchAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Update.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Update.hs new file mode 100644 index 000000000..f0f7c70b4 --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Update.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Posts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a post. +-- +-- /See:/ for @BloggerPostsUpdate@. +module Blogger.Posts.Update + ( + -- * REST Resource + PostsUpdateAPI + + -- * Creating a Request + , postsUpdate + , PostsUpdate + + -- * Request Lenses + , puuFetchBody + , puuQuotaUser + , puuPrettyPrint + , puuUserIp + , puuFetchImages + , puuBlogId + , puuMaxComments + , puuKey + , puuRevert + , puuPostId + , puuOauthToken + , puuPublish + , puuFields + , puuAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerPostsUpdate@ which the +-- 'PostsUpdate' request conforms to. +type PostsUpdateAPI = + "blogs" :> + Capture "blogId" Text :> + "posts" :> + Capture "postId" Text :> + QueryParam "fetchBody" Bool :> + QueryParam "fetchImages" Bool :> + QueryParam "maxComments" Word32 :> + QueryParam "revert" Bool :> + QueryParam "publish" Bool :> Put '[JSON] Post + +-- | Update a post. +-- +-- /See:/ 'postsUpdate' smart constructor. +data PostsUpdate = PostsUpdate + { _puuFetchBody :: !Bool + , _puuQuotaUser :: !(Maybe Text) + , _puuPrettyPrint :: !Bool + , _puuUserIp :: !(Maybe Text) + , _puuFetchImages :: !(Maybe Bool) + , _puuBlogId :: !Text + , _puuMaxComments :: !(Maybe Word32) + , _puuKey :: !(Maybe Text) + , _puuRevert :: !(Maybe Bool) + , _puuPostId :: !Text + , _puuOauthToken :: !(Maybe Text) + , _puuPublish :: !(Maybe Bool) + , _puuFields :: !(Maybe Text) + , _puuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puuFetchBody' +-- +-- * 'puuQuotaUser' +-- +-- * 'puuPrettyPrint' +-- +-- * 'puuUserIp' +-- +-- * 'puuFetchImages' +-- +-- * 'puuBlogId' +-- +-- * 'puuMaxComments' +-- +-- * 'puuKey' +-- +-- * 'puuRevert' +-- +-- * 'puuPostId' +-- +-- * 'puuOauthToken' +-- +-- * 'puuPublish' +-- +-- * 'puuFields' +-- +-- * 'puuAlt' +postsUpdate + :: Text -- ^ 'blogId' + -> Text -- ^ 'postId' + -> PostsUpdate +postsUpdate pPuuBlogId_ pPuuPostId_ = + PostsUpdate + { _puuFetchBody = True + , _puuQuotaUser = Nothing + , _puuPrettyPrint = True + , _puuUserIp = Nothing + , _puuFetchImages = Nothing + , _puuBlogId = pPuuBlogId_ + , _puuMaxComments = Nothing + , _puuKey = Nothing + , _puuRevert = Nothing + , _puuPostId = pPuuPostId_ + , _puuOauthToken = Nothing + , _puuPublish = Nothing + , _puuFields = Nothing + , _puuAlt = "json" + } + +-- | Whether the body content of the post is included with the result +-- (default: true). +puuFetchBody :: Lens' PostsUpdate' Bool +puuFetchBody + = lens _puuFetchBody (\ s a -> s{_puuFetchBody = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puuQuotaUser :: Lens' PostsUpdate' (Maybe Text) +puuQuotaUser + = lens _puuQuotaUser (\ s a -> s{_puuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puuPrettyPrint :: Lens' PostsUpdate' Bool +puuPrettyPrint + = lens _puuPrettyPrint + (\ s a -> s{_puuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puuUserIp :: Lens' PostsUpdate' (Maybe Text) +puuUserIp + = lens _puuUserIp (\ s a -> s{_puuUserIp = a}) + +-- | Whether image URL metadata for each post is included in the returned +-- result (default: false). +puuFetchImages :: Lens' PostsUpdate' (Maybe Bool) +puuFetchImages + = lens _puuFetchImages + (\ s a -> s{_puuFetchImages = a}) + +-- | The ID of the Blog. +puuBlogId :: Lens' PostsUpdate' Text +puuBlogId + = lens _puuBlogId (\ s a -> s{_puuBlogId = a}) + +-- | Maximum number of comments to retrieve with the returned post. +puuMaxComments :: Lens' PostsUpdate' (Maybe Word32) +puuMaxComments + = lens _puuMaxComments + (\ s a -> s{_puuMaxComments = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puuKey :: Lens' PostsUpdate' (Maybe Text) +puuKey = lens _puuKey (\ s a -> s{_puuKey = a}) + +-- | Whether a revert action should be performed when the post is updated +-- (default: false). +puuRevert :: Lens' PostsUpdate' (Maybe Bool) +puuRevert + = lens _puuRevert (\ s a -> s{_puuRevert = a}) + +-- | The ID of the Post. +puuPostId :: Lens' PostsUpdate' Text +puuPostId + = lens _puuPostId (\ s a -> s{_puuPostId = a}) + +-- | OAuth 2.0 token for the current user. +puuOauthToken :: Lens' PostsUpdate' (Maybe Text) +puuOauthToken + = lens _puuOauthToken + (\ s a -> s{_puuOauthToken = a}) + +-- | Whether a publish action should be performed when the post is updated +-- (default: false). +puuPublish :: Lens' PostsUpdate' (Maybe Bool) +puuPublish + = lens _puuPublish (\ s a -> s{_puuPublish = a}) + +-- | Selector specifying which fields to include in a partial response. +puuFields :: Lens' PostsUpdate' (Maybe Text) +puuFields + = lens _puuFields (\ s a -> s{_puuFields = a}) + +-- | Data format for the response. +puuAlt :: Lens' PostsUpdate' Text +puuAlt = lens _puuAlt (\ s a -> s{_puuAlt = a}) + +instance GoogleRequest PostsUpdate' where + type Rs PostsUpdate' = Post + request = requestWithRoute defReq bloggerURL + requestWithRoute r u PostsUpdate{..} + = go (Just _puuFetchBody) _puuQuotaUser + _puuPrettyPrint + _puuUserIp + _puuFetchImages + _puuBlogId + _puuMaxComments + _puuKey + _puuRevert + _puuPostId + _puuOauthToken + _puuPublish + _puuFields + _puuAlt + where go + = clientWithRoute (Proxy :: Proxy PostsUpdateAPI) r u diff --git a/gogol-blogger/gen/Network/Google/Resource/Blogger/Users/Get.hs b/gogol-blogger/gen/Network/Google/Resource/Blogger/Users/Get.hs new file mode 100644 index 000000000..7a4f3d8ab --- /dev/null +++ b/gogol-blogger/gen/Network/Google/Resource/Blogger/Users/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Blogger.Users.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one user by ID. +-- +-- /See:/ for @BloggerUsersGet@. +module Blogger.Users.Get + ( + -- * REST Resource + UsersGetAPI + + -- * Creating a Request + , usersGet + , UsersGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugUserIp + , ugUserId + , ugKey + , ugOauthToken + , ugFields + , ugAlt + ) where + +import Network.Google.Blogger.Types +import Network.Google.Prelude + +-- | A resource alias for @BloggerUsersGet@ which the +-- 'UsersGet' request conforms to. +type UsersGetAPI = + "users" :> Capture "userId" Text :> Get '[JSON] User + +-- | Gets one user by ID. +-- +-- /See:/ 'usersGet' smart constructor. +data UsersGet = UsersGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugUserIp :: !(Maybe Text) + , _ugUserId :: !Text + , _ugKey :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugUserIp' +-- +-- * 'ugUserId' +-- +-- * 'ugKey' +-- +-- * 'ugOauthToken' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +usersGet + :: Text -- ^ 'userId' + -> UsersGet +usersGet pUgUserId_ = + UsersGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugUserIp = Nothing + , _ugUserId = pUgUserId_ + , _ugKey = Nothing + , _ugOauthToken = Nothing + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' UsersGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' UsersGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' UsersGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | The ID of the user to get. +ugUserId :: Lens' UsersGet' Text +ugUserId = lens _ugUserId (\ s a -> s{_ugUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' UsersGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' UsersGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' UsersGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' UsersGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest UsersGet' where + type Rs UsersGet' = User + request = requestWithRoute defReq bloggerURL + requestWithRoute r u UsersGet{..} + = go _ugQuotaUser _ugPrettyPrint _ugUserIp _ugUserId + _ugKey + _ugOauthToken + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UsersGetAPI) r u diff --git a/gogol-blogger/gogol-blogger.cabal b/gogol-blogger/gogol-blogger.cabal new file mode 100644 index 000000000..29b8983e1 --- /dev/null +++ b/gogol-blogger/gogol-blogger.cabal @@ -0,0 +1,75 @@ +name: gogol-blogger +version: 0.0.1 +synopsis: Blogger API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for access to the data within Blogger. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Blogger + , Network.Google.Blogger.Types + , Network.Google.Resource.Blogger.BlogUserInfos.Get + , Network.Google.Resource.Blogger.Blogs.Get + , Network.Google.Resource.Blogger.Blogs.GetByURL + , Network.Google.Resource.Blogger.Blogs.ListByUser + , Network.Google.Resource.Blogger.Comments.Approve + , Network.Google.Resource.Blogger.Comments.Delete + , Network.Google.Resource.Blogger.Comments.Get + , Network.Google.Resource.Blogger.Comments.List + , Network.Google.Resource.Blogger.Comments.ListByBlog + , Network.Google.Resource.Blogger.Comments.MarkAsSpam + , Network.Google.Resource.Blogger.Comments.RemoveContent + , Network.Google.Resource.Blogger.PageViews.Get + , Network.Google.Resource.Blogger.Pages.Delete + , Network.Google.Resource.Blogger.Pages.Get + , Network.Google.Resource.Blogger.Pages.Insert + , Network.Google.Resource.Blogger.Pages.List + , Network.Google.Resource.Blogger.Pages.Patch + , Network.Google.Resource.Blogger.Pages.Publish + , Network.Google.Resource.Blogger.Pages.Revert + , Network.Google.Resource.Blogger.Pages.Update + , Network.Google.Resource.Blogger.PostUserInfos.Get + , Network.Google.Resource.Blogger.PostUserInfos.List + , Network.Google.Resource.Blogger.Posts.Delete + , Network.Google.Resource.Blogger.Posts.Get + , Network.Google.Resource.Blogger.Posts.GetByPath + , Network.Google.Resource.Blogger.Posts.Insert + , Network.Google.Resource.Blogger.Posts.List + , Network.Google.Resource.Blogger.Posts.Patch + , Network.Google.Resource.Blogger.Posts.Publish + , Network.Google.Resource.Blogger.Posts.Revert + , Network.Google.Resource.Blogger.Posts.Search + , Network.Google.Resource.Blogger.Posts.Update + , Network.Google.Resource.Blogger.Users.Get + + other-modules: + Network.Google.Blogger.Types.Product + , Network.Google.Blogger.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-blogger/src/.gitkeep b/gogol-blogger/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-books/LICENSE b/gogol-books/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-books/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-books/Makefile b/gogol-books/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-books/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-books/README.md b/gogol-books/README.md new file mode 100644 index 000000000..e2c46c352 --- /dev/null +++ b/gogol-books/README.md @@ -0,0 +1,28 @@ +# gogol-books + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Books API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-books` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-books/Setup.hs b/gogol-books/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-books/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-books/gen/Network/Google/Books.hs b/gogol-books/gen/Network/Google/Books.hs new file mode 100644 index 000000000..72c6fffda --- /dev/null +++ b/gogol-books/gen/Network/Google/Books.hs @@ -0,0 +1,509 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Books +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you search for books and manage your Google Books library. +-- +-- /See:/ +module Network.Google.Books + ( + -- * API + BooksAPI + , booksAPI + , booksURL + + -- * Service Methods + + -- * REST Resources + + -- ** BooksBookshelvesGet + , module Books.Bookshelves.Get + + -- ** BooksBookshelvesList + , module Books.Bookshelves.List + + -- ** BooksBookshelvesVolumesList + , module Books.Bookshelves.Volumes.List + + -- ** BooksCloudloadingAddBook + , module Books.Cloudloading.AddBook + + -- ** BooksCloudloadingDeleteBook + , module Books.Cloudloading.DeleteBook + + -- ** BooksCloudloadingUpdateBook + , module Books.Cloudloading.UpdateBook + + -- ** BooksDictionaryListOfflineMetadata + , module Books.Dictionary.ListOfflineMetadata + + -- ** BooksLayersAnnotationDataGet + , module Books.Layers.AnnotationData.Get + + -- ** BooksLayersAnnotationDataList + , module Books.Layers.AnnotationData.List + + -- ** BooksLayersGet + , module Books.Layers.Get + + -- ** BooksLayersList + , module Books.Layers.List + + -- ** BooksLayersVolumeAnnotationsGet + , module Books.Layers.VolumeAnnotations.Get + + -- ** BooksLayersVolumeAnnotationsList + , module Books.Layers.VolumeAnnotations.List + + -- ** BooksMyconfigGetUserSettings + , module Books.Myconfig.GetUserSettings + + -- ** BooksMyconfigReleaseDownloadAccess + , module Books.Myconfig.ReleaseDownloadAccess + + -- ** BooksMyconfigRequestAccess + , module Books.Myconfig.RequestAccess + + -- ** BooksMyconfigSyncVolumeLicenses + , module Books.Myconfig.SyncVolumeLicenses + + -- ** BooksMyconfigUpdateUserSettings + , module Books.Myconfig.UpdateUserSettings + + -- ** BooksMylibraryAnnotationsDelete + , module Books.Mylibrary.Annotations.Delete + + -- ** BooksMylibraryAnnotationsInsert + , module Books.Mylibrary.Annotations.Insert + + -- ** BooksMylibraryAnnotationsList + , module Books.Mylibrary.Annotations.List + + -- ** BooksMylibraryAnnotationsSummary + , module Books.Mylibrary.Annotations.Summary + + -- ** BooksMylibraryAnnotationsUpdate + , module Books.Mylibrary.Annotations.Update + + -- ** BooksMylibraryBookshelvesAddVolume + , module Books.Mylibrary.Bookshelves.AddVolume + + -- ** BooksMylibraryBookshelvesClearVolumes + , module Books.Mylibrary.Bookshelves.ClearVolumes + + -- ** BooksMylibraryBookshelvesGet + , module Books.Mylibrary.Bookshelves.Get + + -- ** BooksMylibraryBookshelvesList + , module Books.Mylibrary.Bookshelves.List + + -- ** BooksMylibraryBookshelvesMoveVolume + , module Books.Mylibrary.Bookshelves.MoveVolume + + -- ** BooksMylibraryBookshelvesRemoveVolume + , module Books.Mylibrary.Bookshelves.RemoveVolume + + -- ** BooksMylibraryBookshelvesVolumesList + , module Books.Mylibrary.Bookshelves.Volumes.List + + -- ** BooksMylibraryReadingpositionsGet + , module Books.Mylibrary.Readingpositions.Get + + -- ** BooksMylibraryReadingpositionsSetPosition + , module Books.Mylibrary.Readingpositions.SetPosition + + -- ** BooksOnboardingListCategories + , module Books.Onboarding.ListCategories + + -- ** BooksOnboardingListCategoryVolumes + , module Books.Onboarding.ListCategoryVolumes + + -- ** BooksPromoofferAccept + , module Books.Promooffer.Accept + + -- ** BooksPromoofferDismiss + , module Books.Promooffer.Dismiss + + -- ** BooksPromoofferGet + , module Books.Promooffer.Get + + -- ** BooksVolumesAssociatedList + , module Books.Volumes.Associated.List + + -- ** BooksVolumesGet + , module Books.Volumes.Get + + -- ** BooksVolumesList + , module Books.Volumes.List + + -- ** BooksVolumesMybooksList + , module Books.Volumes.Mybooks.List + + -- ** BooksVolumesRecommendedList + , module Books.Volumes.Recommended.List + + -- ** BooksVolumesRecommendedRate + , module Books.Volumes.Recommended.Rate + + -- ** BooksVolumesUseruploadedList + , module Books.Volumes.Useruploaded.List + + -- * Types + + -- ** Volumeannotations + , Volumeannotations + , volumeannotations + , vTotalItems + , vNextPageToken + , vKind + , vItems + , vVersion + + -- ** Annotations + , Annotations + , annotations + , aTotalItems + , aNextPageToken + , aKind + , aItems + + -- ** Usersettings + , Usersettings + , usersettings + , uKind + , uNotesExport + + -- ** Annotationsdata + , Annotationsdata + , annotationsdata + , annTotalItems + , annNextPageToken + , annKind + , annItems + + -- ** Annotation + , Annotation + , annotation + , aaSelectedText + , aaLayerSummary + , aaHighlightStyle + , aaClientVersionRanges + , aaPageIds + , aaKind + , aaData + , aaCreated + , aaAfterSelectedText + , aaSelfLink + , aaCurrentVersionRanges + , aaVolumeId + , aaBeforeSelectedText + , aaId + , aaDeleted + , aaUpdated + , aaLayerId + + -- ** BooksCloudloadingResource + , BooksCloudloadingResource + , booksCloudloadingResource + , bcrProcessingState + , bcrVolumeId + , bcrAuthor + , bcrTitle + + -- ** Layersummary + , Layersummary + , layersummary + , lAnnotationsDataLink + , lAnnotationsLink + , lKind + , lDataCount + , lContentVersion + , lVolumeAnnotationsVersion + , lAnnotationCount + , lAnnotationTypes + , lSelfLink + , lVolumeId + , lId + , lUpdated + , lLayerId + + -- ** Annotationdata + , Annotationdata + , annotationdata + , annnEncodedData + , annnKind + , annnData + , annnSelfLink + , annnAnnotationType + , annnVolumeId + , annnId + , annnUpdated + , annnLayerId + + -- ** Volumeannotation + , Volumeannotation + , volumeannotation + , volSelectedText + , volAnnotationDataLink + , volPageIds + , volKind + , volData + , volSelfLink + , volAnnotationType + , volAnnotationDataId + , volContentRanges + , volVolumeId + , volId + , volDeleted + , volUpdated + , volLayerId + + -- ** BooksVolumesRecommendedRateResponse + , BooksVolumesRecommendedRateResponse + , booksVolumesRecommendedRateResponse + , bvrrrConsistencyToken + + -- ** Bookshelf + , Bookshelf + , bookshelf + , bAccess + , bVolumesLastUpdated + , bKind + , bCreated + , bVolumeCount + , bSelfLink + , bId + , bUpdated + , bTitle + , bDescription + + -- ** Category + , Category + , category + , cKind + , cItems + + -- ** AnnotationsSummary + , AnnotationsSummary + , annotationsSummary + , asKind + , asLayers + + -- ** Volume + , Volume + , volume + , vvUserInfo + , vvEtag + , vvAccessInfo + , vvKind + , vvSearchInfo + , vvSelfLink + , vvLayerInfo + , vvSaleInfo + , vvId + , vvRecommendedInfo + , vvVolumeInfo + + -- ** Geolayerdata + , Geolayerdata + , geolayerdata + , gKind + , gGeo + , gCommon + + -- ** Dictlayerdata + , Dictlayerdata + , dictlayerdata + , dKind + , dDict + , dCommon + + -- ** DownloadAccessRestriction + , DownloadAccessRestriction + , downloadAccessRestriction + , darJustAcquired + , darSignature + , darKind + , darMaxDownloadDevices + , darDownloadsAcquired + , darReasonCode + , darVolumeId + , darRestricted + , darSource + , darDeviceAllowed + , darMessage + , darNonce + + -- ** Review + , Review + , review + , rRating + , rKind + , rContent + , rDate + , rVolumeId + , rAuthor + , rSource + , rFullTextUrl + , rTitle + , rType + + -- ** Volume2 + , Volume2 + , volume2 + , voloNextPageToken + , voloKind + , voloItems + + -- ** RequestAccess + , RequestAccess + , requestAccess + , raConcurrentAccess + , raKind + , raDownloadAccess + + -- ** Metadata + , Metadata + , metadata + , mKind + , mItems + + -- ** ReadingPosition + , ReadingPosition + , readingPosition + , rpEpubCfiPosition + , rpKind + , rpGbImagePosition + , rpPdfPosition + , rpVolumeId + , rpUpdated + , rpGbTextPosition + + -- ** Offers + , Offers + , offers + , oKind + , oItems + + -- ** Volumes + , Volumes + , volumes + , v1TotalItems + , v1Kind + , v1Items + + -- ** Bookshelves + , Bookshelves + , bookshelves + , booKind + , booItems + + -- ** ConcurrentAccessRestriction + , ConcurrentAccessRestriction + , concurrentAccessRestriction + , carMaxConcurrentDevices + , carSignature + , carTimeWindowSeconds + , carKind + , carReasonCode + , carVolumeId + , carRestricted + , carSource + , carDeviceAllowed + , carMessage + , carNonce + + -- ** DownloadAccesses + , DownloadAccesses + , downloadAccesses + , daKind + , daDownloadAccessList + + -- ** Layersummaries + , Layersummaries + , layersummaries + , layTotalItems + , layKind + , layItems + + -- ** BooksAnnotationsRange + , BooksAnnotationsRange + , booksAnnotationsRange + , barStartOffset + , barEndOffset + , barEndPosition + , barStartPosition + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude +import Network.Google.Resource.Books.Bookshelves.Get +import Network.Google.Resource.Books.Bookshelves.List +import Network.Google.Resource.Books.Bookshelves.Volumes.List +import Network.Google.Resource.Books.Cloudloading.AddBook +import Network.Google.Resource.Books.Cloudloading.DeleteBook +import Network.Google.Resource.Books.Cloudloading.UpdateBook +import Network.Google.Resource.Books.Dictionary.ListOfflineMetadata +import Network.Google.Resource.Books.Layers.AnnotationData.Get +import Network.Google.Resource.Books.Layers.AnnotationData.List +import Network.Google.Resource.Books.Layers.Get +import Network.Google.Resource.Books.Layers.List +import Network.Google.Resource.Books.Layers.VolumeAnnotations.Get +import Network.Google.Resource.Books.Layers.VolumeAnnotations.List +import Network.Google.Resource.Books.Myconfig.GetUserSettings +import Network.Google.Resource.Books.Myconfig.ReleaseDownloadAccess +import Network.Google.Resource.Books.Myconfig.RequestAccess +import Network.Google.Resource.Books.Myconfig.SyncVolumeLicenses +import Network.Google.Resource.Books.Myconfig.UpdateUserSettings +import Network.Google.Resource.Books.Mylibrary.Annotations.Delete +import Network.Google.Resource.Books.Mylibrary.Annotations.Insert +import Network.Google.Resource.Books.Mylibrary.Annotations.List +import Network.Google.Resource.Books.Mylibrary.Annotations.Summary +import Network.Google.Resource.Books.Mylibrary.Annotations.Update +import Network.Google.Resource.Books.Mylibrary.Bookshelves.AddVolume +import Network.Google.Resource.Books.Mylibrary.Bookshelves.ClearVolumes +import Network.Google.Resource.Books.Mylibrary.Bookshelves.Get +import Network.Google.Resource.Books.Mylibrary.Bookshelves.List +import Network.Google.Resource.Books.Mylibrary.Bookshelves.MoveVolume +import Network.Google.Resource.Books.Mylibrary.Bookshelves.RemoveVolume +import Network.Google.Resource.Books.Mylibrary.Bookshelves.Volumes.List +import Network.Google.Resource.Books.Mylibrary.Readingpositions.Get +import Network.Google.Resource.Books.Mylibrary.Readingpositions.SetPosition +import Network.Google.Resource.Books.Onboarding.ListCategories +import Network.Google.Resource.Books.Onboarding.ListCategoryVolumes +import Network.Google.Resource.Books.Promooffer.Accept +import Network.Google.Resource.Books.Promooffer.Dismiss +import Network.Google.Resource.Books.Promooffer.Get +import Network.Google.Resource.Books.Volumes.Associated.List +import Network.Google.Resource.Books.Volumes.Get +import Network.Google.Resource.Books.Volumes.List +import Network.Google.Resource.Books.Volumes.Mybooks.List +import Network.Google.Resource.Books.Volumes.Recommended.List +import Network.Google.Resource.Books.Volumes.Recommended.Rate +import Network.Google.Resource.Books.Volumes.Useruploaded.List + +{- $resources +TODO +-} + +type BooksAPI = + Onboarding :<|> Mylibrary :<|> Promooffer :<|> + Cloudloading + :<|> Layers + :<|> Dictionary + :<|> Volumes + :<|> Bookshelves + :<|> Myconfig + +booksAPI :: Proxy BooksAPI +booksAPI = Proxy diff --git a/gogol-books/gen/Network/Google/Books/Types.hs b/gogol-books/gen/Network/Google/Books/Types.hs new file mode 100644 index 000000000..2e76cd412 --- /dev/null +++ b/gogol-books/gen/Network/Google/Books/Types.hs @@ -0,0 +1,314 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Books.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Books.Types + ( + -- * Service URL + booksURL + + -- * Volumeannotations + , Volumeannotations + , volumeannotations + , vTotalItems + , vNextPageToken + , vKind + , vItems + , vVersion + + -- * Annotations + , Annotations + , annotations + , aTotalItems + , aNextPageToken + , aKind + , aItems + + -- * Usersettings + , Usersettings + , usersettings + , uKind + , uNotesExport + + -- * Annotationsdata + , Annotationsdata + , annotationsdata + , annTotalItems + , annNextPageToken + , annKind + , annItems + + -- * Annotation + , Annotation + , annotation + , aaSelectedText + , aaLayerSummary + , aaHighlightStyle + , aaClientVersionRanges + , aaPageIds + , aaKind + , aaData + , aaCreated + , aaAfterSelectedText + , aaSelfLink + , aaCurrentVersionRanges + , aaVolumeId + , aaBeforeSelectedText + , aaId + , aaDeleted + , aaUpdated + , aaLayerId + + -- * BooksCloudloadingResource + , BooksCloudloadingResource + , booksCloudloadingResource + , bcrProcessingState + , bcrVolumeId + , bcrAuthor + , bcrTitle + + -- * Layersummary + , Layersummary + , layersummary + , lAnnotationsDataLink + , lAnnotationsLink + , lKind + , lDataCount + , lContentVersion + , lVolumeAnnotationsVersion + , lAnnotationCount + , lAnnotationTypes + , lSelfLink + , lVolumeId + , lId + , lUpdated + , lLayerId + + -- * Annotationdata + , Annotationdata + , annotationdata + , annnEncodedData + , annnKind + , annnData + , annnSelfLink + , annnAnnotationType + , annnVolumeId + , annnId + , annnUpdated + , annnLayerId + + -- * Volumeannotation + , Volumeannotation + , volumeannotation + , volSelectedText + , volAnnotationDataLink + , volPageIds + , volKind + , volData + , volSelfLink + , volAnnotationType + , volAnnotationDataId + , volContentRanges + , volVolumeId + , volId + , volDeleted + , volUpdated + , volLayerId + + -- * BooksVolumesRecommendedRateResponse + , BooksVolumesRecommendedRateResponse + , booksVolumesRecommendedRateResponse + , bvrrrConsistencyToken + + -- * Bookshelf + , Bookshelf + , bookshelf + , bAccess + , bVolumesLastUpdated + , bKind + , bCreated + , bVolumeCount + , bSelfLink + , bId + , bUpdated + , bTitle + , bDescription + + -- * Category + , Category + , category + , cKind + , cItems + + -- * AnnotationsSummary + , AnnotationsSummary + , annotationsSummary + , asKind + , asLayers + + -- * Volume + , Volume + , volume + , vvUserInfo + , vvEtag + , vvAccessInfo + , vvKind + , vvSearchInfo + , vvSelfLink + , vvLayerInfo + , vvSaleInfo + , vvId + , vvRecommendedInfo + , vvVolumeInfo + + -- * Geolayerdata + , Geolayerdata + , geolayerdata + , gKind + , gGeo + , gCommon + + -- * Dictlayerdata + , Dictlayerdata + , dictlayerdata + , dKind + , dDict + , dCommon + + -- * DownloadAccessRestriction + , DownloadAccessRestriction + , downloadAccessRestriction + , darJustAcquired + , darSignature + , darKind + , darMaxDownloadDevices + , darDownloadsAcquired + , darReasonCode + , darVolumeId + , darRestricted + , darSource + , darDeviceAllowed + , darMessage + , darNonce + + -- * Review + , Review + , review + , rRating + , rKind + , rContent + , rDate + , rVolumeId + , rAuthor + , rSource + , rFullTextUrl + , rTitle + , rType + + -- * Volume2 + , Volume2 + , volume2 + , voloNextPageToken + , voloKind + , voloItems + + -- * RequestAccess + , RequestAccess + , requestAccess + , raConcurrentAccess + , raKind + , raDownloadAccess + + -- * Metadata + , Metadata + , metadata + , mKind + , mItems + + -- * ReadingPosition + , ReadingPosition + , readingPosition + , rpEpubCfiPosition + , rpKind + , rpGbImagePosition + , rpPdfPosition + , rpVolumeId + , rpUpdated + , rpGbTextPosition + + -- * Offers + , Offers + , offers + , oKind + , oItems + + -- * Volumes + , Volumes + , volumes + , v1TotalItems + , v1Kind + , v1Items + + -- * Bookshelves + , Bookshelves + , bookshelves + , booKind + , booItems + + -- * ConcurrentAccessRestriction + , ConcurrentAccessRestriction + , concurrentAccessRestriction + , carMaxConcurrentDevices + , carSignature + , carTimeWindowSeconds + , carKind + , carReasonCode + , carVolumeId + , carRestricted + , carSource + , carDeviceAllowed + , carMessage + , carNonce + + -- * DownloadAccesses + , DownloadAccesses + , downloadAccesses + , daKind + , daDownloadAccessList + + -- * Layersummaries + , Layersummaries + , layersummaries + , layTotalItems + , layKind + , layItems + + -- * BooksAnnotationsRange + , BooksAnnotationsRange + , booksAnnotationsRange + , barStartOffset + , barEndOffset + , barEndPosition + , barStartPosition + ) where + +import Network.Google.Books.Types.Product +import Network.Google.Books.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Books API. +booksURL :: BaseURL +booksURL + = BaseUrl Https + "https://www.googleapis.com/books/v1/" + 443 diff --git a/gogol-books/gen/Network/Google/Books/Types/Product.hs b/gogol-books/gen/Network/Google/Books/Types/Product.hs new file mode 100644 index 000000000..88f473085 --- /dev/null +++ b/gogol-books/gen/Network/Google/Books/Types/Product.hs @@ -0,0 +1,2615 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Books.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Books.Types.Product where + +import Network.Google.Books.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'volumeannotations' smart constructor. +data Volumeannotations = Volumeannotations + { _vTotalItems :: !(Maybe Int32) + , _vNextPageToken :: !(Maybe Text) + , _vKind :: !Text + , _vItems :: !(Maybe [Maybe Volumeannotation]) + , _vVersion :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Volumeannotations' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vTotalItems' +-- +-- * 'vNextPageToken' +-- +-- * 'vKind' +-- +-- * 'vItems' +-- +-- * 'vVersion' +volumeannotations + :: Volumeannotations +volumeannotations = + Volumeannotations + { _vTotalItems = Nothing + , _vNextPageToken = Nothing + , _vKind = "books#volumeannotations" + , _vItems = Nothing + , _vVersion = Nothing + } + +-- | The total number of volume annotations found. +vTotalItems :: Lens' Volumeannotations (Maybe Int32) +vTotalItems + = lens _vTotalItems (\ s a -> s{_vTotalItems = a}) + +-- | Token to pass in for pagination for the next page. This will not be +-- present if this request does not have more results. +vNextPageToken :: Lens' Volumeannotations (Maybe Text) +vNextPageToken + = lens _vNextPageToken + (\ s a -> s{_vNextPageToken = a}) + +-- | Resource type +vKind :: Lens' Volumeannotations Text +vKind = lens _vKind (\ s a -> s{_vKind = a}) + +-- | A list of volume annotations. +vItems :: Lens' Volumeannotations [Maybe Volumeannotation] +vItems + = lens _vItems (\ s a -> s{_vItems = a}) . _Default . + _Coerce + +-- | The version string for all of the volume annotations in this layer (not +-- just the ones in this response). Note: the version string doesn\'t apply +-- to the annotation data, just the information in this response (e.g. the +-- location of annotations in the book). +vVersion :: Lens' Volumeannotations (Maybe Text) +vVersion = lens _vVersion (\ s a -> s{_vVersion = a}) + +instance FromJSON Volumeannotations where + parseJSON + = withObject "Volumeannotations" + (\ o -> + Volumeannotations <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "books#volumeannotations") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "version")) + +instance ToJSON Volumeannotations where + toJSON Volumeannotations{..} + = object + (catMaybes + [("totalItems" .=) <$> _vTotalItems, + ("nextPageToken" .=) <$> _vNextPageToken, + Just ("kind" .= _vKind), ("items" .=) <$> _vItems, + ("version" .=) <$> _vVersion]) + +-- +-- /See:/ 'annotations' smart constructor. +data Annotations = Annotations + { _aTotalItems :: !(Maybe Int32) + , _aNextPageToken :: !(Maybe Text) + , _aKind :: !Text + , _aItems :: !(Maybe [Maybe Annotation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Annotations' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aTotalItems' +-- +-- * 'aNextPageToken' +-- +-- * 'aKind' +-- +-- * 'aItems' +annotations + :: Annotations +annotations = + Annotations + { _aTotalItems = Nothing + , _aNextPageToken = Nothing + , _aKind = "books#annotations" + , _aItems = Nothing + } + +-- | Total number of annotations found. This may be greater than the number +-- of notes returned in this response if results have been paginated. +aTotalItems :: Lens' Annotations (Maybe Int32) +aTotalItems + = lens _aTotalItems (\ s a -> s{_aTotalItems = a}) + +-- | Token to pass in for pagination for the next page. This will not be +-- present if this request does not have more results. +aNextPageToken :: Lens' Annotations (Maybe Text) +aNextPageToken + = lens _aNextPageToken + (\ s a -> s{_aNextPageToken = a}) + +-- | Resource type. +aKind :: Lens' Annotations Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | A list of annotations. +aItems :: Lens' Annotations [Maybe Annotation] +aItems + = lens _aItems (\ s a -> s{_aItems = a}) . _Default . + _Coerce + +instance FromJSON Annotations where + parseJSON + = withObject "Annotations" + (\ o -> + Annotations <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "books#annotations") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Annotations where + toJSON Annotations{..} + = object + (catMaybes + [("totalItems" .=) <$> _aTotalItems, + ("nextPageToken" .=) <$> _aNextPageToken, + Just ("kind" .= _aKind), ("items" .=) <$> _aItems]) + +-- +-- /See:/ 'usersettings' smart constructor. +data Usersettings = Usersettings + { _uKind :: !Text + , _uNotesExport :: !(Maybe UsersettingsNotesExport) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Usersettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uKind' +-- +-- * 'uNotesExport' +usersettings + :: Usersettings +usersettings = + Usersettings + { _uKind = "books#usersettings" + , _uNotesExport = Nothing + } + +-- | Resource type. +uKind :: Lens' Usersettings Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | User settings in sub-objects, each for different purposes. +uNotesExport :: Lens' Usersettings (Maybe UsersettingsNotesExport) +uNotesExport + = lens _uNotesExport (\ s a -> s{_uNotesExport = a}) + +instance FromJSON Usersettings where + parseJSON + = withObject "Usersettings" + (\ o -> + Usersettings <$> + (o .:? "kind" .!= "books#usersettings") <*> + (o .:? "notesExport")) + +instance ToJSON Usersettings where + toJSON Usersettings{..} + = object + (catMaybes + [Just ("kind" .= _uKind), + ("notesExport" .=) <$> _uNotesExport]) + +-- +-- /See:/ 'annotationsdata' smart constructor. +data Annotationsdata = Annotationsdata + { _annTotalItems :: !(Maybe Int32) + , _annNextPageToken :: !(Maybe Text) + , _annKind :: !Text + , _annItems :: !(Maybe [Maybe Annotationdata]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Annotationsdata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'annTotalItems' +-- +-- * 'annNextPageToken' +-- +-- * 'annKind' +-- +-- * 'annItems' +annotationsdata + :: Annotationsdata +annotationsdata = + Annotationsdata + { _annTotalItems = Nothing + , _annNextPageToken = Nothing + , _annKind = "books#annotationsdata" + , _annItems = Nothing + } + +-- | The total number of volume annotations found. +annTotalItems :: Lens' Annotationsdata (Maybe Int32) +annTotalItems + = lens _annTotalItems + (\ s a -> s{_annTotalItems = a}) + +-- | Token to pass in for pagination for the next page. This will not be +-- present if this request does not have more results. +annNextPageToken :: Lens' Annotationsdata (Maybe Text) +annNextPageToken + = lens _annNextPageToken + (\ s a -> s{_annNextPageToken = a}) + +-- | Resource type +annKind :: Lens' Annotationsdata Text +annKind = lens _annKind (\ s a -> s{_annKind = a}) + +-- | A list of Annotation Data. +annItems :: Lens' Annotationsdata [Maybe Annotationdata] +annItems + = lens _annItems (\ s a -> s{_annItems = a}) . + _Default + . _Coerce + +instance FromJSON Annotationsdata where + parseJSON + = withObject "Annotationsdata" + (\ o -> + Annotationsdata <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "books#annotationsdata") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Annotationsdata where + toJSON Annotationsdata{..} + = object + (catMaybes + [("totalItems" .=) <$> _annTotalItems, + ("nextPageToken" .=) <$> _annNextPageToken, + Just ("kind" .= _annKind), + ("items" .=) <$> _annItems]) + +-- +-- /See:/ 'annotation' smart constructor. +data Annotation = Annotation + { _aaSelectedText :: !(Maybe Text) + , _aaLayerSummary :: !(Maybe AnnotationLayerSummary) + , _aaHighlightStyle :: !(Maybe Text) + , _aaClientVersionRanges :: !(Maybe AnnotationClientVersionRanges) + , _aaPageIds :: !(Maybe [Text]) + , _aaKind :: !Text + , _aaData :: !(Maybe Text) + , _aaCreated :: !(Maybe UTCTime) + , _aaAfterSelectedText :: !(Maybe Text) + , _aaSelfLink :: !(Maybe Text) + , _aaCurrentVersionRanges :: !(Maybe AnnotationCurrentVersionRanges) + , _aaVolumeId :: !(Maybe Text) + , _aaBeforeSelectedText :: !(Maybe Text) + , _aaId :: !(Maybe Text) + , _aaDeleted :: !(Maybe Bool) + , _aaUpdated :: !(Maybe UTCTime) + , _aaLayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Annotation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaSelectedText' +-- +-- * 'aaLayerSummary' +-- +-- * 'aaHighlightStyle' +-- +-- * 'aaClientVersionRanges' +-- +-- * 'aaPageIds' +-- +-- * 'aaKind' +-- +-- * 'aaData' +-- +-- * 'aaCreated' +-- +-- * 'aaAfterSelectedText' +-- +-- * 'aaSelfLink' +-- +-- * 'aaCurrentVersionRanges' +-- +-- * 'aaVolumeId' +-- +-- * 'aaBeforeSelectedText' +-- +-- * 'aaId' +-- +-- * 'aaDeleted' +-- +-- * 'aaUpdated' +-- +-- * 'aaLayerId' +annotation + :: Annotation +annotation = + Annotation + { _aaSelectedText = Nothing + , _aaLayerSummary = Nothing + , _aaHighlightStyle = Nothing + , _aaClientVersionRanges = Nothing + , _aaPageIds = Nothing + , _aaKind = "books#annotation" + , _aaData = Nothing + , _aaCreated = Nothing + , _aaAfterSelectedText = Nothing + , _aaSelfLink = Nothing + , _aaCurrentVersionRanges = Nothing + , _aaVolumeId = Nothing + , _aaBeforeSelectedText = Nothing + , _aaId = Nothing + , _aaDeleted = Nothing + , _aaUpdated = Nothing + , _aaLayerId = Nothing + } + +-- | Excerpt from the volume. +aaSelectedText :: Lens' Annotation (Maybe Text) +aaSelectedText + = lens _aaSelectedText + (\ s a -> s{_aaSelectedText = a}) + +aaLayerSummary :: Lens' Annotation (Maybe AnnotationLayerSummary) +aaLayerSummary + = lens _aaLayerSummary + (\ s a -> s{_aaLayerSummary = a}) + +-- | The highlight style for this annotation. +aaHighlightStyle :: Lens' Annotation (Maybe Text) +aaHighlightStyle + = lens _aaHighlightStyle + (\ s a -> s{_aaHighlightStyle = a}) + +-- | Selection ranges sent from the client. +aaClientVersionRanges :: Lens' Annotation (Maybe AnnotationClientVersionRanges) +aaClientVersionRanges + = lens _aaClientVersionRanges + (\ s a -> s{_aaClientVersionRanges = a}) + +-- | Pages that this annotation spans. +aaPageIds :: Lens' Annotation [Text] +aaPageIds + = lens _aaPageIds (\ s a -> s{_aaPageIds = a}) . + _Default + . _Coerce + +-- | Resource type. +aaKind :: Lens' Annotation Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | User-created data for this annotation. +aaData :: Lens' Annotation (Maybe Text) +aaData = lens _aaData (\ s a -> s{_aaData = a}) + +-- | Timestamp for the created time of this annotation. +aaCreated :: Lens' Annotation (Maybe UTCTime) +aaCreated + = lens _aaCreated (\ s a -> s{_aaCreated = a}) + +-- | Anchor text after excerpt. For requests, if the user bookmarked a screen +-- that has no flowing text on it, then this field should be empty. +aaAfterSelectedText :: Lens' Annotation (Maybe Text) +aaAfterSelectedText + = lens _aaAfterSelectedText + (\ s a -> s{_aaAfterSelectedText = a}) + +-- | URL to this resource. +aaSelfLink :: Lens' Annotation (Maybe Text) +aaSelfLink + = lens _aaSelfLink (\ s a -> s{_aaSelfLink = a}) + +-- | Selection ranges for the most recent content version. +aaCurrentVersionRanges :: Lens' Annotation (Maybe AnnotationCurrentVersionRanges) +aaCurrentVersionRanges + = lens _aaCurrentVersionRanges + (\ s a -> s{_aaCurrentVersionRanges = a}) + +-- | The volume that this annotation belongs to. +aaVolumeId :: Lens' Annotation (Maybe Text) +aaVolumeId + = lens _aaVolumeId (\ s a -> s{_aaVolumeId = a}) + +-- | Anchor text before excerpt. For requests, if the user bookmarked a +-- screen that has no flowing text on it, then this field should be empty. +aaBeforeSelectedText :: Lens' Annotation (Maybe Text) +aaBeforeSelectedText + = lens _aaBeforeSelectedText + (\ s a -> s{_aaBeforeSelectedText = a}) + +-- | Id of this annotation, in the form of a GUID. +aaId :: Lens' Annotation (Maybe Text) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | Indicates that this annotation is deleted. +aaDeleted :: Lens' Annotation (Maybe Bool) +aaDeleted + = lens _aaDeleted (\ s a -> s{_aaDeleted = a}) + +-- | Timestamp for the last time this annotation was modified. +aaUpdated :: Lens' Annotation (Maybe UTCTime) +aaUpdated + = lens _aaUpdated (\ s a -> s{_aaUpdated = a}) + +-- | The layer this annotation is for. +aaLayerId :: Lens' Annotation (Maybe Text) +aaLayerId + = lens _aaLayerId (\ s a -> s{_aaLayerId = a}) + +instance FromJSON Annotation where + parseJSON + = withObject "Annotation" + (\ o -> + Annotation <$> + (o .:? "selectedText") <*> (o .:? "layerSummary") <*> + (o .:? "highlightStyle") + <*> (o .:? "clientVersionRanges") + <*> (o .:? "pageIds" .!= mempty) + <*> (o .:? "kind" .!= "books#annotation") + <*> (o .:? "data") + <*> (o .:? "created") + <*> (o .:? "afterSelectedText") + <*> (o .:? "selfLink") + <*> (o .:? "currentVersionRanges") + <*> (o .:? "volumeId") + <*> (o .:? "beforeSelectedText") + <*> (o .:? "id") + <*> (o .:? "deleted") + <*> (o .:? "updated") + <*> (o .:? "layerId")) + +instance ToJSON Annotation where + toJSON Annotation{..} + = object + (catMaybes + [("selectedText" .=) <$> _aaSelectedText, + ("layerSummary" .=) <$> _aaLayerSummary, + ("highlightStyle" .=) <$> _aaHighlightStyle, + ("clientVersionRanges" .=) <$> + _aaClientVersionRanges, + ("pageIds" .=) <$> _aaPageIds, + Just ("kind" .= _aaKind), ("data" .=) <$> _aaData, + ("created" .=) <$> _aaCreated, + ("afterSelectedText" .=) <$> _aaAfterSelectedText, + ("selfLink" .=) <$> _aaSelfLink, + ("currentVersionRanges" .=) <$> + _aaCurrentVersionRanges, + ("volumeId" .=) <$> _aaVolumeId, + ("beforeSelectedText" .=) <$> _aaBeforeSelectedText, + ("id" .=) <$> _aaId, ("deleted" .=) <$> _aaDeleted, + ("updated" .=) <$> _aaUpdated, + ("layerId" .=) <$> _aaLayerId]) + +-- +-- /See:/ 'booksCloudloadingResource' smart constructor. +data BooksCloudloadingResource = BooksCloudloadingResource + { _bcrProcessingState :: !(Maybe Text) + , _bcrVolumeId :: !(Maybe Text) + , _bcrAuthor :: !(Maybe Text) + , _bcrTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BooksCloudloadingResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bcrProcessingState' +-- +-- * 'bcrVolumeId' +-- +-- * 'bcrAuthor' +-- +-- * 'bcrTitle' +booksCloudloadingResource + :: BooksCloudloadingResource +booksCloudloadingResource = + BooksCloudloadingResource + { _bcrProcessingState = Nothing + , _bcrVolumeId = Nothing + , _bcrAuthor = Nothing + , _bcrTitle = Nothing + } + +bcrProcessingState :: Lens' BooksCloudloadingResource (Maybe Text) +bcrProcessingState + = lens _bcrProcessingState + (\ s a -> s{_bcrProcessingState = a}) + +bcrVolumeId :: Lens' BooksCloudloadingResource (Maybe Text) +bcrVolumeId + = lens _bcrVolumeId (\ s a -> s{_bcrVolumeId = a}) + +bcrAuthor :: Lens' BooksCloudloadingResource (Maybe Text) +bcrAuthor + = lens _bcrAuthor (\ s a -> s{_bcrAuthor = a}) + +bcrTitle :: Lens' BooksCloudloadingResource (Maybe Text) +bcrTitle = lens _bcrTitle (\ s a -> s{_bcrTitle = a}) + +instance FromJSON BooksCloudloadingResource where + parseJSON + = withObject "BooksCloudloadingResource" + (\ o -> + BooksCloudloadingResource <$> + (o .:? "processingState") <*> (o .:? "volumeId") <*> + (o .:? "author") + <*> (o .:? "title")) + +instance ToJSON BooksCloudloadingResource where + toJSON BooksCloudloadingResource{..} + = object + (catMaybes + [("processingState" .=) <$> _bcrProcessingState, + ("volumeId" .=) <$> _bcrVolumeId, + ("author" .=) <$> _bcrAuthor, + ("title" .=) <$> _bcrTitle]) + +-- +-- /See:/ 'layersummary' smart constructor. +data Layersummary = Layersummary + { _lAnnotationsDataLink :: !(Maybe Text) + , _lAnnotationsLink :: !(Maybe Text) + , _lKind :: !Text + , _lDataCount :: !(Maybe Int32) + , _lContentVersion :: !(Maybe Text) + , _lVolumeAnnotationsVersion :: !(Maybe Text) + , _lAnnotationCount :: !(Maybe Int32) + , _lAnnotationTypes :: !(Maybe [Text]) + , _lSelfLink :: !(Maybe Text) + , _lVolumeId :: !(Maybe Text) + , _lId :: !(Maybe Text) + , _lUpdated :: !(Maybe UTCTime) + , _lLayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Layersummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lAnnotationsDataLink' +-- +-- * 'lAnnotationsLink' +-- +-- * 'lKind' +-- +-- * 'lDataCount' +-- +-- * 'lContentVersion' +-- +-- * 'lVolumeAnnotationsVersion' +-- +-- * 'lAnnotationCount' +-- +-- * 'lAnnotationTypes' +-- +-- * 'lSelfLink' +-- +-- * 'lVolumeId' +-- +-- * 'lId' +-- +-- * 'lUpdated' +-- +-- * 'lLayerId' +layersummary + :: Layersummary +layersummary = + Layersummary + { _lAnnotationsDataLink = Nothing + , _lAnnotationsLink = Nothing + , _lKind = "books#layersummary" + , _lDataCount = Nothing + , _lContentVersion = Nothing + , _lVolumeAnnotationsVersion = Nothing + , _lAnnotationCount = Nothing + , _lAnnotationTypes = Nothing + , _lSelfLink = Nothing + , _lVolumeId = Nothing + , _lId = Nothing + , _lUpdated = Nothing + , _lLayerId = Nothing + } + +-- | Link to get data for this annotation. +lAnnotationsDataLink :: Lens' Layersummary (Maybe Text) +lAnnotationsDataLink + = lens _lAnnotationsDataLink + (\ s a -> s{_lAnnotationsDataLink = a}) + +-- | The link to get the annotations for this layer. +lAnnotationsLink :: Lens' Layersummary (Maybe Text) +lAnnotationsLink + = lens _lAnnotationsLink + (\ s a -> s{_lAnnotationsLink = a}) + +-- | Resource Type +lKind :: Lens' Layersummary Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | The number of data items for this layer. +lDataCount :: Lens' Layersummary (Maybe Int32) +lDataCount + = lens _lDataCount (\ s a -> s{_lDataCount = a}) + +-- | The content version this resource is for. +lContentVersion :: Lens' Layersummary (Maybe Text) +lContentVersion + = lens _lContentVersion + (\ s a -> s{_lContentVersion = a}) + +-- | The current version of this layer\'s volume annotations. Note that this +-- version applies only to the data in the books.layers.volumeAnnotations.* +-- responses. The actual annotation data is versioned separately. +lVolumeAnnotationsVersion :: Lens' Layersummary (Maybe Text) +lVolumeAnnotationsVersion + = lens _lVolumeAnnotationsVersion + (\ s a -> s{_lVolumeAnnotationsVersion = a}) + +-- | The number of annotations for this layer. +lAnnotationCount :: Lens' Layersummary (Maybe Int32) +lAnnotationCount + = lens _lAnnotationCount + (\ s a -> s{_lAnnotationCount = a}) + +-- | The list of annotation types contained for this layer. +lAnnotationTypes :: Lens' Layersummary [Text] +lAnnotationTypes + = lens _lAnnotationTypes + (\ s a -> s{_lAnnotationTypes = a}) + . _Default + . _Coerce + +-- | URL to this resource. +lSelfLink :: Lens' Layersummary (Maybe Text) +lSelfLink + = lens _lSelfLink (\ s a -> s{_lSelfLink = a}) + +-- | The volume id this resource is for. +lVolumeId :: Lens' Layersummary (Maybe Text) +lVolumeId + = lens _lVolumeId (\ s a -> s{_lVolumeId = a}) + +-- | Unique id of this layer summary. +lId :: Lens' Layersummary (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | Timestamp for the last time an item in this layer was updated. (RFC 3339 +-- UTC date-time format). +lUpdated :: Lens' Layersummary (Maybe UTCTime) +lUpdated = lens _lUpdated (\ s a -> s{_lUpdated = a}) + +-- | The layer id for this summary. +lLayerId :: Lens' Layersummary (Maybe Text) +lLayerId = lens _lLayerId (\ s a -> s{_lLayerId = a}) + +instance FromJSON Layersummary where + parseJSON + = withObject "Layersummary" + (\ o -> + Layersummary <$> + (o .:? "annotationsDataLink") <*> + (o .:? "annotationsLink") + <*> (o .:? "kind" .!= "books#layersummary") + <*> (o .:? "dataCount") + <*> (o .:? "contentVersion") + <*> (o .:? "volumeAnnotationsVersion") + <*> (o .:? "annotationCount") + <*> (o .:? "annotationTypes" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "volumeId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "layerId")) + +instance ToJSON Layersummary where + toJSON Layersummary{..} + = object + (catMaybes + [("annotationsDataLink" .=) <$> + _lAnnotationsDataLink, + ("annotationsLink" .=) <$> _lAnnotationsLink, + Just ("kind" .= _lKind), + ("dataCount" .=) <$> _lDataCount, + ("contentVersion" .=) <$> _lContentVersion, + ("volumeAnnotationsVersion" .=) <$> + _lVolumeAnnotationsVersion, + ("annotationCount" .=) <$> _lAnnotationCount, + ("annotationTypes" .=) <$> _lAnnotationTypes, + ("selfLink" .=) <$> _lSelfLink, + ("volumeId" .=) <$> _lVolumeId, ("id" .=) <$> _lId, + ("updated" .=) <$> _lUpdated, + ("layerId" .=) <$> _lLayerId]) + +-- +-- /See:/ 'annotationdata' smart constructor. +data Annotationdata = Annotationdata + { _annnEncodedData :: !(Maybe Word8) + , _annnKind :: !Text + , _annnData :: !(Maybe JSON) + , _annnSelfLink :: !(Maybe Text) + , _annnAnnotationType :: !(Maybe Text) + , _annnVolumeId :: !(Maybe Text) + , _annnId :: !(Maybe Text) + , _annnUpdated :: !(Maybe UTCTime) + , _annnLayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Annotationdata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'annnEncodedData' +-- +-- * 'annnKind' +-- +-- * 'annnData' +-- +-- * 'annnSelfLink' +-- +-- * 'annnAnnotationType' +-- +-- * 'annnVolumeId' +-- +-- * 'annnId' +-- +-- * 'annnUpdated' +-- +-- * 'annnLayerId' +annotationdata + :: Annotationdata +annotationdata = + Annotationdata + { _annnEncodedData = Nothing + , _annnKind = "books#annotationdata" + , _annnData = Nothing + , _annnSelfLink = Nothing + , _annnAnnotationType = Nothing + , _annnVolumeId = Nothing + , _annnId = Nothing + , _annnUpdated = Nothing + , _annnLayerId = Nothing + } + +-- | Base64 encoded data for this annotation data. +annnEncodedData :: Lens' Annotationdata (Maybe Word8) +annnEncodedData + = lens _annnEncodedData + (\ s a -> s{_annnEncodedData = a}) + +-- | Resource Type +annnKind :: Lens' Annotationdata Text +annnKind = lens _annnKind (\ s a -> s{_annnKind = a}) + +annnData :: Lens' Annotationdata (Maybe JSON) +annnData = lens _annnData (\ s a -> s{_annnData = a}) + +-- | URL for this resource. * +annnSelfLink :: Lens' Annotationdata (Maybe Text) +annnSelfLink + = lens _annnSelfLink (\ s a -> s{_annnSelfLink = a}) + +-- | The type of annotation this data is for. +annnAnnotationType :: Lens' Annotationdata (Maybe Text) +annnAnnotationType + = lens _annnAnnotationType + (\ s a -> s{_annnAnnotationType = a}) + +-- | The volume id for this data. * +annnVolumeId :: Lens' Annotationdata (Maybe Text) +annnVolumeId + = lens _annnVolumeId (\ s a -> s{_annnVolumeId = a}) + +-- | Unique id for this annotation data. +annnId :: Lens' Annotationdata (Maybe Text) +annnId = lens _annnId (\ s a -> s{_annnId = a}) + +-- | Timestamp for the last time this data was updated. (RFC 3339 UTC +-- date-time format). +annnUpdated :: Lens' Annotationdata (Maybe UTCTime) +annnUpdated + = lens _annnUpdated (\ s a -> s{_annnUpdated = a}) + +-- | The Layer id for this data. * +annnLayerId :: Lens' Annotationdata (Maybe Text) +annnLayerId + = lens _annnLayerId (\ s a -> s{_annnLayerId = a}) + +instance FromJSON Annotationdata where + parseJSON + = withObject "Annotationdata" + (\ o -> + Annotationdata <$> + (o .:? "encoded_data") <*> + (o .:? "kind" .!= "books#annotationdata") + <*> (o .:? "data") + <*> (o .:? "selfLink") + <*> (o .:? "annotationType") + <*> (o .:? "volumeId") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "layerId")) + +instance ToJSON Annotationdata where + toJSON Annotationdata{..} + = object + (catMaybes + [("encoded_data" .=) <$> _annnEncodedData, + Just ("kind" .= _annnKind), + ("data" .=) <$> _annnData, + ("selfLink" .=) <$> _annnSelfLink, + ("annotationType" .=) <$> _annnAnnotationType, + ("volumeId" .=) <$> _annnVolumeId, + ("id" .=) <$> _annnId, + ("updated" .=) <$> _annnUpdated, + ("layerId" .=) <$> _annnLayerId]) + +-- +-- /See:/ 'volumeannotation' smart constructor. +data Volumeannotation = Volumeannotation + { _volSelectedText :: !(Maybe Text) + , _volAnnotationDataLink :: !(Maybe Text) + , _volPageIds :: !(Maybe [Text]) + , _volKind :: !Text + , _volData :: !(Maybe Text) + , _volSelfLink :: !(Maybe Text) + , _volAnnotationType :: !(Maybe Text) + , _volAnnotationDataId :: !(Maybe Text) + , _volContentRanges :: !(Maybe VolumeannotationContentRanges) + , _volVolumeId :: !(Maybe Text) + , _volId :: !(Maybe Text) + , _volDeleted :: !(Maybe Bool) + , _volUpdated :: !(Maybe UTCTime) + , _volLayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Volumeannotation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'volSelectedText' +-- +-- * 'volAnnotationDataLink' +-- +-- * 'volPageIds' +-- +-- * 'volKind' +-- +-- * 'volData' +-- +-- * 'volSelfLink' +-- +-- * 'volAnnotationType' +-- +-- * 'volAnnotationDataId' +-- +-- * 'volContentRanges' +-- +-- * 'volVolumeId' +-- +-- * 'volId' +-- +-- * 'volDeleted' +-- +-- * 'volUpdated' +-- +-- * 'volLayerId' +volumeannotation + :: Volumeannotation +volumeannotation = + Volumeannotation + { _volSelectedText = Nothing + , _volAnnotationDataLink = Nothing + , _volPageIds = Nothing + , _volKind = "books#volumeannotation" + , _volData = Nothing + , _volSelfLink = Nothing + , _volAnnotationType = Nothing + , _volAnnotationDataId = Nothing + , _volContentRanges = Nothing + , _volVolumeId = Nothing + , _volId = Nothing + , _volDeleted = Nothing + , _volUpdated = Nothing + , _volLayerId = Nothing + } + +-- | Excerpt from the volume. +volSelectedText :: Lens' Volumeannotation (Maybe Text) +volSelectedText + = lens _volSelectedText + (\ s a -> s{_volSelectedText = a}) + +-- | Link to get data for this annotation. +volAnnotationDataLink :: Lens' Volumeannotation (Maybe Text) +volAnnotationDataLink + = lens _volAnnotationDataLink + (\ s a -> s{_volAnnotationDataLink = a}) + +-- | Pages the annotation spans. +volPageIds :: Lens' Volumeannotation [Text] +volPageIds + = lens _volPageIds (\ s a -> s{_volPageIds = a}) . + _Default + . _Coerce + +-- | Resource Type +volKind :: Lens' Volumeannotation Text +volKind = lens _volKind (\ s a -> s{_volKind = a}) + +-- | Data for this annotation. +volData :: Lens' Volumeannotation (Maybe Text) +volData = lens _volData (\ s a -> s{_volData = a}) + +-- | URL to this resource. +volSelfLink :: Lens' Volumeannotation (Maybe Text) +volSelfLink + = lens _volSelfLink (\ s a -> s{_volSelfLink = a}) + +-- | The type of annotation this is. +volAnnotationType :: Lens' Volumeannotation (Maybe Text) +volAnnotationType + = lens _volAnnotationType + (\ s a -> s{_volAnnotationType = a}) + +-- | The annotation data id for this volume annotation. +volAnnotationDataId :: Lens' Volumeannotation (Maybe Text) +volAnnotationDataId + = lens _volAnnotationDataId + (\ s a -> s{_volAnnotationDataId = a}) + +-- | The content ranges to identify the selected text. +volContentRanges :: Lens' Volumeannotation (Maybe VolumeannotationContentRanges) +volContentRanges + = lens _volContentRanges + (\ s a -> s{_volContentRanges = a}) + +-- | The Volume this annotation is for. +volVolumeId :: Lens' Volumeannotation (Maybe Text) +volVolumeId + = lens _volVolumeId (\ s a -> s{_volVolumeId = a}) + +-- | Unique id of this volume annotation. +volId :: Lens' Volumeannotation (Maybe Text) +volId = lens _volId (\ s a -> s{_volId = a}) + +-- | Indicates that this annotation is deleted. +volDeleted :: Lens' Volumeannotation (Maybe Bool) +volDeleted + = lens _volDeleted (\ s a -> s{_volDeleted = a}) + +-- | Timestamp for the last time this anntoation was updated. (RFC 3339 UTC +-- date-time format). +volUpdated :: Lens' Volumeannotation (Maybe UTCTime) +volUpdated + = lens _volUpdated (\ s a -> s{_volUpdated = a}) + +-- | The Layer this annotation is for. +volLayerId :: Lens' Volumeannotation (Maybe Text) +volLayerId + = lens _volLayerId (\ s a -> s{_volLayerId = a}) + +instance FromJSON Volumeannotation where + parseJSON + = withObject "Volumeannotation" + (\ o -> + Volumeannotation <$> + (o .:? "selectedText") <*> + (o .:? "annotationDataLink") + <*> (o .:? "pageIds" .!= mempty) + <*> (o .:? "kind" .!= "books#volumeannotation") + <*> (o .:? "data") + <*> (o .:? "selfLink") + <*> (o .:? "annotationType") + <*> (o .:? "annotationDataId") + <*> (o .:? "contentRanges") + <*> (o .:? "volumeId") + <*> (o .:? "id") + <*> (o .:? "deleted") + <*> (o .:? "updated") + <*> (o .:? "layerId")) + +instance ToJSON Volumeannotation where + toJSON Volumeannotation{..} + = object + (catMaybes + [("selectedText" .=) <$> _volSelectedText, + ("annotationDataLink" .=) <$> _volAnnotationDataLink, + ("pageIds" .=) <$> _volPageIds, + Just ("kind" .= _volKind), ("data" .=) <$> _volData, + ("selfLink" .=) <$> _volSelfLink, + ("annotationType" .=) <$> _volAnnotationType, + ("annotationDataId" .=) <$> _volAnnotationDataId, + ("contentRanges" .=) <$> _volContentRanges, + ("volumeId" .=) <$> _volVolumeId, + ("id" .=) <$> _volId, ("deleted" .=) <$> _volDeleted, + ("updated" .=) <$> _volUpdated, + ("layerId" .=) <$> _volLayerId]) + +-- +-- /See:/ 'booksVolumesRecommendedRateResponse' smart constructor. +newtype BooksVolumesRecommendedRateResponse = BooksVolumesRecommendedRateResponse + { _bvrrrConsistencyToken :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BooksVolumesRecommendedRateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bvrrrConsistencyToken' +booksVolumesRecommendedRateResponse + :: BooksVolumesRecommendedRateResponse +booksVolumesRecommendedRateResponse = + BooksVolumesRecommendedRateResponse + { _bvrrrConsistencyToken = Nothing + } + +bvrrrConsistencyToken :: Lens' BooksVolumesRecommendedRateResponse (Maybe Text) +bvrrrConsistencyToken + = lens _bvrrrConsistencyToken + (\ s a -> s{_bvrrrConsistencyToken = a}) + +instance FromJSON BooksVolumesRecommendedRateResponse + where + parseJSON + = withObject "BooksVolumesRecommendedRateResponse" + (\ o -> + BooksVolumesRecommendedRateResponse <$> + (o .:? "consistency_token")) + +instance ToJSON BooksVolumesRecommendedRateResponse + where + toJSON BooksVolumesRecommendedRateResponse{..} + = object + (catMaybes + [("consistency_token" .=) <$> + _bvrrrConsistencyToken]) + +-- +-- /See:/ 'bookshelf' smart constructor. +data Bookshelf = Bookshelf + { _bAccess :: !(Maybe Text) + , _bVolumesLastUpdated :: !(Maybe UTCTime) + , _bKind :: !Text + , _bCreated :: !(Maybe UTCTime) + , _bVolumeCount :: !(Maybe Int32) + , _bSelfLink :: !(Maybe Text) + , _bId :: !(Maybe Int32) + , _bUpdated :: !(Maybe UTCTime) + , _bTitle :: !(Maybe Text) + , _bDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Bookshelf' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bAccess' +-- +-- * 'bVolumesLastUpdated' +-- +-- * 'bKind' +-- +-- * 'bCreated' +-- +-- * 'bVolumeCount' +-- +-- * 'bSelfLink' +-- +-- * 'bId' +-- +-- * 'bUpdated' +-- +-- * 'bTitle' +-- +-- * 'bDescription' +bookshelf + :: Bookshelf +bookshelf = + Bookshelf + { _bAccess = Nothing + , _bVolumesLastUpdated = Nothing + , _bKind = "books#bookshelf" + , _bCreated = Nothing + , _bVolumeCount = Nothing + , _bSelfLink = Nothing + , _bId = Nothing + , _bUpdated = Nothing + , _bTitle = Nothing + , _bDescription = Nothing + } + +-- | Whether this bookshelf is PUBLIC or PRIVATE. +bAccess :: Lens' Bookshelf (Maybe Text) +bAccess = lens _bAccess (\ s a -> s{_bAccess = a}) + +-- | Last time a volume was added or removed from this bookshelf (formatted +-- UTC timestamp with millisecond resolution). +bVolumesLastUpdated :: Lens' Bookshelf (Maybe UTCTime) +bVolumesLastUpdated + = lens _bVolumesLastUpdated + (\ s a -> s{_bVolumesLastUpdated = a}) + +-- | Resource type for bookshelf metadata. +bKind :: Lens' Bookshelf Text +bKind = lens _bKind (\ s a -> s{_bKind = a}) + +-- | Created time for this bookshelf (formatted UTC timestamp with +-- millisecond resolution). +bCreated :: Lens' Bookshelf (Maybe UTCTime) +bCreated = lens _bCreated (\ s a -> s{_bCreated = a}) + +-- | Number of volumes in this bookshelf. +bVolumeCount :: Lens' Bookshelf (Maybe Int32) +bVolumeCount + = lens _bVolumeCount (\ s a -> s{_bVolumeCount = a}) + +-- | URL to this resource. +bSelfLink :: Lens' Bookshelf (Maybe Text) +bSelfLink + = lens _bSelfLink (\ s a -> s{_bSelfLink = a}) + +-- | Id of this bookshelf, only unique by user. +bId :: Lens' Bookshelf (Maybe Int32) +bId = lens _bId (\ s a -> s{_bId = a}) + +-- | Last modified time of this bookshelf (formatted UTC timestamp with +-- millisecond resolution). +bUpdated :: Lens' Bookshelf (Maybe UTCTime) +bUpdated = lens _bUpdated (\ s a -> s{_bUpdated = a}) + +-- | Title of this bookshelf. +bTitle :: Lens' Bookshelf (Maybe Text) +bTitle = lens _bTitle (\ s a -> s{_bTitle = a}) + +-- | Description of this bookshelf. +bDescription :: Lens' Bookshelf (Maybe Text) +bDescription + = lens _bDescription (\ s a -> s{_bDescription = a}) + +instance FromJSON Bookshelf where + parseJSON + = withObject "Bookshelf" + (\ o -> + Bookshelf <$> + (o .:? "access") <*> (o .:? "volumesLastUpdated") <*> + (o .:? "kind" .!= "books#bookshelf") + <*> (o .:? "created") + <*> (o .:? "volumeCount") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title") + <*> (o .:? "description")) + +instance ToJSON Bookshelf where + toJSON Bookshelf{..} + = object + (catMaybes + [("access" .=) <$> _bAccess, + ("volumesLastUpdated" .=) <$> _bVolumesLastUpdated, + Just ("kind" .= _bKind), + ("created" .=) <$> _bCreated, + ("volumeCount" .=) <$> _bVolumeCount, + ("selfLink" .=) <$> _bSelfLink, ("id" .=) <$> _bId, + ("updated" .=) <$> _bUpdated, + ("title" .=) <$> _bTitle, + ("description" .=) <$> _bDescription]) + +-- +-- /See:/ 'category' smart constructor. +data Category = Category + { _cKind :: !Text + , _cItems :: !(Maybe [CategoryItemsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Category' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cKind' +-- +-- * 'cItems' +category + :: Category +category = + Category + { _cKind = "onboarding#category" + , _cItems = Nothing + } + +-- | Resource type. +cKind :: Lens' Category Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | A list of onboarding categories. +cItems :: Lens' Category [CategoryItemsItem] +cItems + = lens _cItems (\ s a -> s{_cItems = a}) . _Default . + _Coerce + +instance FromJSON Category where + parseJSON + = withObject "Category" + (\ o -> + Category <$> + (o .:? "kind" .!= "onboarding#category") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Category where + toJSON Category{..} + = object + (catMaybes + [Just ("kind" .= _cKind), ("items" .=) <$> _cItems]) + +-- +-- /See:/ 'annotationsSummary' smart constructor. +data AnnotationsSummary = AnnotationsSummary + { _asKind :: !Text + , _asLayers :: !(Maybe [AnnotationsSummaryLayersItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asKind' +-- +-- * 'asLayers' +annotationsSummary + :: AnnotationsSummary +annotationsSummary = + AnnotationsSummary + { _asKind = "books#annotationsSummary" + , _asLayers = Nothing + } + +asKind :: Lens' AnnotationsSummary Text +asKind = lens _asKind (\ s a -> s{_asKind = a}) + +asLayers :: Lens' AnnotationsSummary [AnnotationsSummaryLayersItem] +asLayers + = lens _asLayers (\ s a -> s{_asLayers = a}) . + _Default + . _Coerce + +instance FromJSON AnnotationsSummary where + parseJSON + = withObject "AnnotationsSummary" + (\ o -> + AnnotationsSummary <$> + (o .:? "kind" .!= "books#annotationsSummary") <*> + (o .:? "layers" .!= mempty)) + +instance ToJSON AnnotationsSummary where + toJSON AnnotationsSummary{..} + = object + (catMaybes + [Just ("kind" .= _asKind), + ("layers" .=) <$> _asLayers]) + +-- +-- /See:/ 'volume' smart constructor. +data Volume = Volume + { _vvUserInfo :: !(Maybe VolumeUserInfo) + , _vvEtag :: !(Maybe Text) + , _vvAccessInfo :: !(Maybe VolumeAccessInfo) + , _vvKind :: !Text + , _vvSearchInfo :: !(Maybe VolumeSearchInfo) + , _vvSelfLink :: !(Maybe Text) + , _vvLayerInfo :: !(Maybe VolumeLayerInfo) + , _vvSaleInfo :: !(Maybe VolumeSaleInfo) + , _vvId :: !(Maybe Text) + , _vvRecommendedInfo :: !(Maybe VolumeRecommendedInfo) + , _vvVolumeInfo :: !(Maybe VolumeVolumeInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Volume' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vvUserInfo' +-- +-- * 'vvEtag' +-- +-- * 'vvAccessInfo' +-- +-- * 'vvKind' +-- +-- * 'vvSearchInfo' +-- +-- * 'vvSelfLink' +-- +-- * 'vvLayerInfo' +-- +-- * 'vvSaleInfo' +-- +-- * 'vvId' +-- +-- * 'vvRecommendedInfo' +-- +-- * 'vvVolumeInfo' +volume + :: Volume +volume = + Volume + { _vvUserInfo = Nothing + , _vvEtag = Nothing + , _vvAccessInfo = Nothing + , _vvKind = "books#volume" + , _vvSearchInfo = Nothing + , _vvSelfLink = Nothing + , _vvLayerInfo = Nothing + , _vvSaleInfo = Nothing + , _vvId = Nothing + , _vvRecommendedInfo = Nothing + , _vvVolumeInfo = Nothing + } + +-- | User specific information related to this volume. (e.g. page this user +-- last read or whether they purchased this book) +vvUserInfo :: Lens' Volume (Maybe VolumeUserInfo) +vvUserInfo + = lens _vvUserInfo (\ s a -> s{_vvUserInfo = a}) + +-- | Opaque identifier for a specific version of a volume resource. (In LITE +-- projection) +vvEtag :: Lens' Volume (Maybe Text) +vvEtag = lens _vvEtag (\ s a -> s{_vvEtag = a}) + +-- | Any information about a volume related to reading or obtaining that +-- volume text. This information can depend on country (books may be public +-- domain in one country but not in another, e.g.). +vvAccessInfo :: Lens' Volume (Maybe VolumeAccessInfo) +vvAccessInfo + = lens _vvAccessInfo (\ s a -> s{_vvAccessInfo = a}) + +-- | Resource type for a volume. (In LITE projection.) +vvKind :: Lens' Volume Text +vvKind = lens _vvKind (\ s a -> s{_vvKind = a}) + +-- | Search result information related to this volume. +vvSearchInfo :: Lens' Volume (Maybe VolumeSearchInfo) +vvSearchInfo + = lens _vvSearchInfo (\ s a -> s{_vvSearchInfo = a}) + +-- | URL to this resource. (In LITE projection.) +vvSelfLink :: Lens' Volume (Maybe Text) +vvSelfLink + = lens _vvSelfLink (\ s a -> s{_vvSelfLink = a}) + +-- | What layers exist in this volume and high level information about them. +vvLayerInfo :: Lens' Volume (Maybe VolumeLayerInfo) +vvLayerInfo + = lens _vvLayerInfo (\ s a -> s{_vvLayerInfo = a}) + +-- | Any information about a volume related to the eBookstore and\/or +-- purchaseability. This information can depend on the country where the +-- request originates from (i.e. books may not be for sale in certain +-- countries). +vvSaleInfo :: Lens' Volume (Maybe VolumeSaleInfo) +vvSaleInfo + = lens _vvSaleInfo (\ s a -> s{_vvSaleInfo = a}) + +-- | Unique identifier for a volume. (In LITE projection.) +vvId :: Lens' Volume (Maybe Text) +vvId = lens _vvId (\ s a -> s{_vvId = a}) + +-- | Recommendation related information for this volume. +vvRecommendedInfo :: Lens' Volume (Maybe VolumeRecommendedInfo) +vvRecommendedInfo + = lens _vvRecommendedInfo + (\ s a -> s{_vvRecommendedInfo = a}) + +-- | General volume information. +vvVolumeInfo :: Lens' Volume (Maybe VolumeVolumeInfo) +vvVolumeInfo + = lens _vvVolumeInfo (\ s a -> s{_vvVolumeInfo = a}) + +instance FromJSON Volume where + parseJSON + = withObject "Volume" + (\ o -> + Volume <$> + (o .:? "userInfo") <*> (o .:? "etag") <*> + (o .:? "accessInfo") + <*> (o .:? "kind" .!= "books#volume") + <*> (o .:? "searchInfo") + <*> (o .:? "selfLink") + <*> (o .:? "layerInfo") + <*> (o .:? "saleInfo") + <*> (o .:? "id") + <*> (o .:? "recommendedInfo") + <*> (o .:? "volumeInfo")) + +instance ToJSON Volume where + toJSON Volume{..} + = object + (catMaybes + [("userInfo" .=) <$> _vvUserInfo, + ("etag" .=) <$> _vvEtag, + ("accessInfo" .=) <$> _vvAccessInfo, + Just ("kind" .= _vvKind), + ("searchInfo" .=) <$> _vvSearchInfo, + ("selfLink" .=) <$> _vvSelfLink, + ("layerInfo" .=) <$> _vvLayerInfo, + ("saleInfo" .=) <$> _vvSaleInfo, ("id" .=) <$> _vvId, + ("recommendedInfo" .=) <$> _vvRecommendedInfo, + ("volumeInfo" .=) <$> _vvVolumeInfo]) + +-- +-- /See:/ 'geolayerdata' smart constructor. +data Geolayerdata = Geolayerdata + { _gKind :: !Text + , _gGeo :: !(Maybe GeolayerdataGeo) + , _gCommon :: !(Maybe GeolayerdataCommon) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Geolayerdata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gKind' +-- +-- * 'gGeo' +-- +-- * 'gCommon' +geolayerdata + :: Geolayerdata +geolayerdata = + Geolayerdata + { _gKind = "books#geolayerdata" + , _gGeo = Nothing + , _gCommon = Nothing + } + +gKind :: Lens' Geolayerdata Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +gGeo :: Lens' Geolayerdata (Maybe GeolayerdataGeo) +gGeo = lens _gGeo (\ s a -> s{_gGeo = a}) + +gCommon :: Lens' Geolayerdata (Maybe GeolayerdataCommon) +gCommon = lens _gCommon (\ s a -> s{_gCommon = a}) + +instance FromJSON Geolayerdata where + parseJSON + = withObject "Geolayerdata" + (\ o -> + Geolayerdata <$> + (o .:? "kind" .!= "books#geolayerdata") <*> + (o .:? "geo") + <*> (o .:? "common")) + +instance ToJSON Geolayerdata where + toJSON Geolayerdata{..} + = object + (catMaybes + [Just ("kind" .= _gKind), ("geo" .=) <$> _gGeo, + ("common" .=) <$> _gCommon]) + +-- +-- /See:/ 'dictlayerdata' smart constructor. +data Dictlayerdata = Dictlayerdata + { _dKind :: !Text + , _dDict :: !(Maybe DictlayerdataDict) + , _dCommon :: !(Maybe DictlayerdataCommon) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Dictlayerdata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dKind' +-- +-- * 'dDict' +-- +-- * 'dCommon' +dictlayerdata + :: Dictlayerdata +dictlayerdata = + Dictlayerdata + { _dKind = "books#dictlayerdata" + , _dDict = Nothing + , _dCommon = Nothing + } + +dKind :: Lens' Dictlayerdata Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +dDict :: Lens' Dictlayerdata (Maybe DictlayerdataDict) +dDict = lens _dDict (\ s a -> s{_dDict = a}) + +dCommon :: Lens' Dictlayerdata (Maybe DictlayerdataCommon) +dCommon = lens _dCommon (\ s a -> s{_dCommon = a}) + +instance FromJSON Dictlayerdata where + parseJSON + = withObject "Dictlayerdata" + (\ o -> + Dictlayerdata <$> + (o .:? "kind" .!= "books#dictlayerdata") <*> + (o .:? "dict") + <*> (o .:? "common")) + +instance ToJSON Dictlayerdata where + toJSON Dictlayerdata{..} + = object + (catMaybes + [Just ("kind" .= _dKind), ("dict" .=) <$> _dDict, + ("common" .=) <$> _dCommon]) + +-- +-- /See:/ 'downloadAccessRestriction' smart constructor. +data DownloadAccessRestriction = DownloadAccessRestriction + { _darJustAcquired :: !(Maybe Bool) + , _darSignature :: !(Maybe Text) + , _darKind :: !Text + , _darMaxDownloadDevices :: !(Maybe Int32) + , _darDownloadsAcquired :: !(Maybe Int32) + , _darReasonCode :: !(Maybe Text) + , _darVolumeId :: !(Maybe Text) + , _darRestricted :: !(Maybe Bool) + , _darSource :: !(Maybe Text) + , _darDeviceAllowed :: !(Maybe Bool) + , _darMessage :: !(Maybe Text) + , _darNonce :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DownloadAccessRestriction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'darJustAcquired' +-- +-- * 'darSignature' +-- +-- * 'darKind' +-- +-- * 'darMaxDownloadDevices' +-- +-- * 'darDownloadsAcquired' +-- +-- * 'darReasonCode' +-- +-- * 'darVolumeId' +-- +-- * 'darRestricted' +-- +-- * 'darSource' +-- +-- * 'darDeviceAllowed' +-- +-- * 'darMessage' +-- +-- * 'darNonce' +downloadAccessRestriction + :: DownloadAccessRestriction +downloadAccessRestriction = + DownloadAccessRestriction + { _darJustAcquired = Nothing + , _darSignature = Nothing + , _darKind = "books#downloadAccessRestriction" + , _darMaxDownloadDevices = Nothing + , _darDownloadsAcquired = Nothing + , _darReasonCode = Nothing + , _darVolumeId = Nothing + , _darRestricted = Nothing + , _darSource = Nothing + , _darDeviceAllowed = Nothing + , _darMessage = Nothing + , _darNonce = Nothing + } + +-- | If deviceAllowed, whether access was just acquired with this request. +darJustAcquired :: Lens' DownloadAccessRestriction (Maybe Bool) +darJustAcquired + = lens _darJustAcquired + (\ s a -> s{_darJustAcquired = a}) + +-- | Response signature. +darSignature :: Lens' DownloadAccessRestriction (Maybe Text) +darSignature + = lens _darSignature (\ s a -> s{_darSignature = a}) + +-- | Resource type. +darKind :: Lens' DownloadAccessRestriction Text +darKind = lens _darKind (\ s a -> s{_darKind = a}) + +-- | If restricted, the maximum number of content download licenses for this +-- volume. +darMaxDownloadDevices :: Lens' DownloadAccessRestriction (Maybe Int32) +darMaxDownloadDevices + = lens _darMaxDownloadDevices + (\ s a -> s{_darMaxDownloadDevices = a}) + +-- | If restricted, the number of content download licenses already acquired +-- (including the requesting client, if licensed). +darDownloadsAcquired :: Lens' DownloadAccessRestriction (Maybe Int32) +darDownloadsAcquired + = lens _darDownloadsAcquired + (\ s a -> s{_darDownloadsAcquired = a}) + +-- | Error\/warning reason code. Additional codes may be added in the future. +-- 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 +-- WARNING_USED_LAST_ACCESS +darReasonCode :: Lens' DownloadAccessRestriction (Maybe Text) +darReasonCode + = lens _darReasonCode + (\ s a -> s{_darReasonCode = a}) + +-- | Identifies the volume for which this entry applies. +darVolumeId :: Lens' DownloadAccessRestriction (Maybe Text) +darVolumeId + = lens _darVolumeId (\ s a -> s{_darVolumeId = a}) + +-- | Whether this volume has any download access restrictions. +darRestricted :: Lens' DownloadAccessRestriction (Maybe Bool) +darRestricted + = lens _darRestricted + (\ s a -> s{_darRestricted = a}) + +-- | Client app identifier for verification. Download access and +-- client-validation only. +darSource :: Lens' DownloadAccessRestriction (Maybe Text) +darSource + = lens _darSource (\ s a -> s{_darSource = a}) + +-- | If restricted, whether access is granted for this (user, device, +-- volume). +darDeviceAllowed :: Lens' DownloadAccessRestriction (Maybe Bool) +darDeviceAllowed + = lens _darDeviceAllowed + (\ s a -> s{_darDeviceAllowed = a}) + +-- | Error\/warning message. +darMessage :: Lens' DownloadAccessRestriction (Maybe Text) +darMessage + = lens _darMessage (\ s a -> s{_darMessage = a}) + +-- | Client nonce for verification. Download access and client-validation +-- only. +darNonce :: Lens' DownloadAccessRestriction (Maybe Text) +darNonce = lens _darNonce (\ s a -> s{_darNonce = a}) + +instance FromJSON DownloadAccessRestriction where + parseJSON + = withObject "DownloadAccessRestriction" + (\ o -> + DownloadAccessRestriction <$> + (o .:? "justAcquired") <*> (o .:? "signature") <*> + (o .:? "kind" .!= "books#downloadAccessRestriction") + <*> (o .:? "maxDownloadDevices") + <*> (o .:? "downloadsAcquired") + <*> (o .:? "reasonCode") + <*> (o .:? "volumeId") + <*> (o .:? "restricted") + <*> (o .:? "source") + <*> (o .:? "deviceAllowed") + <*> (o .:? "message") + <*> (o .:? "nonce")) + +instance ToJSON DownloadAccessRestriction where + toJSON DownloadAccessRestriction{..} + = object + (catMaybes + [("justAcquired" .=) <$> _darJustAcquired, + ("signature" .=) <$> _darSignature, + Just ("kind" .= _darKind), + ("maxDownloadDevices" .=) <$> _darMaxDownloadDevices, + ("downloadsAcquired" .=) <$> _darDownloadsAcquired, + ("reasonCode" .=) <$> _darReasonCode, + ("volumeId" .=) <$> _darVolumeId, + ("restricted" .=) <$> _darRestricted, + ("source" .=) <$> _darSource, + ("deviceAllowed" .=) <$> _darDeviceAllowed, + ("message" .=) <$> _darMessage, + ("nonce" .=) <$> _darNonce]) + +-- +-- /See:/ 'review' smart constructor. +data Review = Review + { _rRating :: !(Maybe Text) + , _rKind :: !Text + , _rContent :: !(Maybe Text) + , _rDate :: !(Maybe Text) + , _rVolumeId :: !(Maybe Text) + , _rAuthor :: !(Maybe ReviewAuthor) + , _rSource :: !(Maybe ReviewSource) + , _rFullTextUrl :: !(Maybe Text) + , _rTitle :: !(Maybe Text) + , _rType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Review' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rRating' +-- +-- * 'rKind' +-- +-- * 'rContent' +-- +-- * 'rDate' +-- +-- * 'rVolumeId' +-- +-- * 'rAuthor' +-- +-- * 'rSource' +-- +-- * 'rFullTextUrl' +-- +-- * 'rTitle' +-- +-- * 'rType' +review + :: Review +review = + Review + { _rRating = Nothing + , _rKind = "books#review" + , _rContent = Nothing + , _rDate = Nothing + , _rVolumeId = Nothing + , _rAuthor = Nothing + , _rSource = Nothing + , _rFullTextUrl = Nothing + , _rTitle = Nothing + , _rType = Nothing + } + +-- | Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, +-- FIVE or NOT_RATED. +rRating :: Lens' Review (Maybe Text) +rRating = lens _rRating (\ s a -> s{_rRating = a}) + +-- | Resource type for a review. +rKind :: Lens' Review Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | Review text. +rContent :: Lens' Review (Maybe Text) +rContent = lens _rContent (\ s a -> s{_rContent = a}) + +-- | Date of this review. +rDate :: Lens' Review (Maybe Text) +rDate = lens _rDate (\ s a -> s{_rDate = a}) + +-- | Volume that this review is for. +rVolumeId :: Lens' Review (Maybe Text) +rVolumeId + = lens _rVolumeId (\ s a -> s{_rVolumeId = a}) + +-- | Author of this review. +rAuthor :: Lens' Review (Maybe ReviewAuthor) +rAuthor = lens _rAuthor (\ s a -> s{_rAuthor = a}) + +-- | Information regarding the source of this review, when the review is not +-- from a Google Books user. +rSource :: Lens' Review (Maybe ReviewSource) +rSource = lens _rSource (\ s a -> s{_rSource = a}) + +-- | URL for the full review text, for reviews gathered from the web. +rFullTextUrl :: Lens' Review (Maybe Text) +rFullTextUrl + = lens _rFullTextUrl (\ s a -> s{_rFullTextUrl = a}) + +-- | Title for this review. +rTitle :: Lens' Review (Maybe Text) +rTitle = lens _rTitle (\ s a -> s{_rTitle = a}) + +-- | Source type for this review. Possible values are EDITORIAL, WEB_USER or +-- GOOGLE_USER. +rType :: Lens' Review (Maybe Text) +rType = lens _rType (\ s a -> s{_rType = a}) + +instance FromJSON Review where + parseJSON + = withObject "Review" + (\ o -> + Review <$> + (o .:? "rating") <*> + (o .:? "kind" .!= "books#review") + <*> (o .:? "content") + <*> (o .:? "date") + <*> (o .:? "volumeId") + <*> (o .:? "author") + <*> (o .:? "source") + <*> (o .:? "fullTextUrl") + <*> (o .:? "title") + <*> (o .:? "type")) + +instance ToJSON Review where + toJSON Review{..} + = object + (catMaybes + [("rating" .=) <$> _rRating, Just ("kind" .= _rKind), + ("content" .=) <$> _rContent, ("date" .=) <$> _rDate, + ("volumeId" .=) <$> _rVolumeId, + ("author" .=) <$> _rAuthor, + ("source" .=) <$> _rSource, + ("fullTextUrl" .=) <$> _rFullTextUrl, + ("title" .=) <$> _rTitle, ("type" .=) <$> _rType]) + +-- +-- /See:/ 'volume2' smart constructor. +data Volume2 = Volume2 + { _voloNextPageToken :: !(Maybe Text) + , _voloKind :: !Text + , _voloItems :: !(Maybe [Maybe Volume]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Volume2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'voloNextPageToken' +-- +-- * 'voloKind' +-- +-- * 'voloItems' +volume2 + :: Volume2 +volume2 = + Volume2 + { _voloNextPageToken = Nothing + , _voloKind = "onboarding#volume" + , _voloItems = Nothing + } + +voloNextPageToken :: Lens' Volume2 (Maybe Text) +voloNextPageToken + = lens _voloNextPageToken + (\ s a -> s{_voloNextPageToken = a}) + +-- | Resource type. +voloKind :: Lens' Volume2 Text +voloKind = lens _voloKind (\ s a -> s{_voloKind = a}) + +-- | A list of volumes. +voloItems :: Lens' Volume2 [Maybe Volume] +voloItems + = lens _voloItems (\ s a -> s{_voloItems = a}) . + _Default + . _Coerce + +instance FromJSON Volume2 where + parseJSON + = withObject "Volume2" + (\ o -> + Volume2 <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "onboarding#volume") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Volume2 where + toJSON Volume2{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _voloNextPageToken, + Just ("kind" .= _voloKind), + ("items" .=) <$> _voloItems]) + +-- +-- /See:/ 'requestAccess' smart constructor. +data RequestAccess = RequestAccess + { _raConcurrentAccess :: !(Maybe (Maybe ConcurrentAccessRestriction)) + , _raKind :: !Text + , _raDownloadAccess :: !(Maybe (Maybe DownloadAccessRestriction)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RequestAccess' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'raConcurrentAccess' +-- +-- * 'raKind' +-- +-- * 'raDownloadAccess' +requestAccess + :: RequestAccess +requestAccess = + RequestAccess + { _raConcurrentAccess = Nothing + , _raKind = "books#requestAccess" + , _raDownloadAccess = Nothing + } + +-- | A concurrent access response. +raConcurrentAccess :: Lens' RequestAccess (Maybe (Maybe ConcurrentAccessRestriction)) +raConcurrentAccess + = lens _raConcurrentAccess + (\ s a -> s{_raConcurrentAccess = a}) + +-- | Resource type. +raKind :: Lens' RequestAccess Text +raKind = lens _raKind (\ s a -> s{_raKind = a}) + +-- | A download access response. +raDownloadAccess :: Lens' RequestAccess (Maybe (Maybe DownloadAccessRestriction)) +raDownloadAccess + = lens _raDownloadAccess + (\ s a -> s{_raDownloadAccess = a}) + +instance FromJSON RequestAccess where + parseJSON + = withObject "RequestAccess" + (\ o -> + RequestAccess <$> + (o .:? "concurrentAccess") <*> + (o .:? "kind" .!= "books#requestAccess") + <*> (o .:? "downloadAccess")) + +instance ToJSON RequestAccess where + toJSON RequestAccess{..} + = object + (catMaybes + [("concurrentAccess" .=) <$> _raConcurrentAccess, + Just ("kind" .= _raKind), + ("downloadAccess" .=) <$> _raDownloadAccess]) + +-- +-- /See:/ 'metadata' smart constructor. +data Metadata = Metadata + { _mKind :: !Text + , _mItems :: !(Maybe [MetadataItemsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mItems' +metadata + :: Metadata +metadata = + Metadata + { _mKind = "dictionary#metadata" + , _mItems = Nothing + } + +-- | Resource type. +mKind :: Lens' Metadata Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | A list of offline dictionary metadata. +mItems :: Lens' Metadata [MetadataItemsItem] +mItems + = lens _mItems (\ s a -> s{_mItems = a}) . _Default . + _Coerce + +instance FromJSON Metadata where + parseJSON + = withObject "Metadata" + (\ o -> + Metadata <$> + (o .:? "kind" .!= "dictionary#metadata") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Metadata where + toJSON Metadata{..} + = object + (catMaybes + [Just ("kind" .= _mKind), ("items" .=) <$> _mItems]) + +-- +-- /See:/ 'readingPosition' smart constructor. +data ReadingPosition = ReadingPosition + { _rpEpubCfiPosition :: !(Maybe Text) + , _rpKind :: !Text + , _rpGbImagePosition :: !(Maybe Text) + , _rpPdfPosition :: !(Maybe Text) + , _rpVolumeId :: !(Maybe Text) + , _rpUpdated :: !(Maybe UTCTime) + , _rpGbTextPosition :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadingPosition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpEpubCfiPosition' +-- +-- * 'rpKind' +-- +-- * 'rpGbImagePosition' +-- +-- * 'rpPdfPosition' +-- +-- * 'rpVolumeId' +-- +-- * 'rpUpdated' +-- +-- * 'rpGbTextPosition' +readingPosition + :: ReadingPosition +readingPosition = + ReadingPosition + { _rpEpubCfiPosition = Nothing + , _rpKind = "books#readingPosition" + , _rpGbImagePosition = Nothing + , _rpPdfPosition = Nothing + , _rpVolumeId = Nothing + , _rpUpdated = Nothing + , _rpGbTextPosition = Nothing + } + +-- | Position in an EPUB as a CFI. +rpEpubCfiPosition :: Lens' ReadingPosition (Maybe Text) +rpEpubCfiPosition + = lens _rpEpubCfiPosition + (\ s a -> s{_rpEpubCfiPosition = a}) + +-- | Resource type for a reading position. +rpKind :: Lens' ReadingPosition Text +rpKind = lens _rpKind (\ s a -> s{_rpKind = a}) + +-- | Position in a volume for image-based content. +rpGbImagePosition :: Lens' ReadingPosition (Maybe Text) +rpGbImagePosition + = lens _rpGbImagePosition + (\ s a -> s{_rpGbImagePosition = a}) + +-- | Position in a PDF file. +rpPdfPosition :: Lens' ReadingPosition (Maybe Text) +rpPdfPosition + = lens _rpPdfPosition + (\ s a -> s{_rpPdfPosition = a}) + +-- | Volume id associated with this reading position. +rpVolumeId :: Lens' ReadingPosition (Maybe Text) +rpVolumeId + = lens _rpVolumeId (\ s a -> s{_rpVolumeId = a}) + +-- | Timestamp when this reading position was last updated (formatted UTC +-- timestamp with millisecond resolution). +rpUpdated :: Lens' ReadingPosition (Maybe UTCTime) +rpUpdated + = lens _rpUpdated (\ s a -> s{_rpUpdated = a}) + +-- | Position in a volume for text-based content. +rpGbTextPosition :: Lens' ReadingPosition (Maybe Text) +rpGbTextPosition + = lens _rpGbTextPosition + (\ s a -> s{_rpGbTextPosition = a}) + +instance FromJSON ReadingPosition where + parseJSON + = withObject "ReadingPosition" + (\ o -> + ReadingPosition <$> + (o .:? "epubCfiPosition") <*> + (o .:? "kind" .!= "books#readingPosition") + <*> (o .:? "gbImagePosition") + <*> (o .:? "pdfPosition") + <*> (o .:? "volumeId") + <*> (o .:? "updated") + <*> (o .:? "gbTextPosition")) + +instance ToJSON ReadingPosition where + toJSON ReadingPosition{..} + = object + (catMaybes + [("epubCfiPosition" .=) <$> _rpEpubCfiPosition, + Just ("kind" .= _rpKind), + ("gbImagePosition" .=) <$> _rpGbImagePosition, + ("pdfPosition" .=) <$> _rpPdfPosition, + ("volumeId" .=) <$> _rpVolumeId, + ("updated" .=) <$> _rpUpdated, + ("gbTextPosition" .=) <$> _rpGbTextPosition]) + +-- +-- /See:/ 'offers' smart constructor. +data Offers = Offers + { _oKind :: !Text + , _oItems :: !(Maybe [OffersItemsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Offers' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oKind' +-- +-- * 'oItems' +offers + :: Offers +offers = + Offers + { _oKind = "promooffer#offers" + , _oItems = Nothing + } + +-- | Resource type. +oKind :: Lens' Offers Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | A list of offers. +oItems :: Lens' Offers [OffersItemsItem] +oItems + = lens _oItems (\ s a -> s{_oItems = a}) . _Default . + _Coerce + +instance FromJSON Offers where + parseJSON + = withObject "Offers" + (\ o -> + Offers <$> + (o .:? "kind" .!= "promooffer#offers") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Offers where + toJSON Offers{..} + = object + (catMaybes + [Just ("kind" .= _oKind), ("items" .=) <$> _oItems]) + +-- +-- /See:/ 'volumes' smart constructor. +data Volumes = Volumes + { _v1TotalItems :: !(Maybe Int32) + , _v1Kind :: !Text + , _v1Items :: !(Maybe [Maybe Volume]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Volumes' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'v1TotalItems' +-- +-- * 'v1Kind' +-- +-- * 'v1Items' +volumes + :: Volumes +volumes = + Volumes + { _v1TotalItems = Nothing + , _v1Kind = "books#volumes" + , _v1Items = Nothing + } + +-- | Total number of volumes found. This might be greater than the number of +-- volumes returned in this response if results have been paginated. +v1TotalItems :: Lens' Volumes (Maybe Int32) +v1TotalItems + = lens _v1TotalItems (\ s a -> s{_v1TotalItems = a}) + +-- | Resource type. +v1Kind :: Lens' Volumes Text +v1Kind = lens _v1Kind (\ s a -> s{_v1Kind = a}) + +-- | A list of volumes. +v1Items :: Lens' Volumes [Maybe Volume] +v1Items + = lens _v1Items (\ s a -> s{_v1Items = a}) . _Default + . _Coerce + +instance FromJSON Volumes where + parseJSON + = withObject "Volumes" + (\ o -> + Volumes <$> + (o .:? "totalItems") <*> + (o .:? "kind" .!= "books#volumes") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Volumes where + toJSON Volumes{..} + = object + (catMaybes + [("totalItems" .=) <$> _v1TotalItems, + Just ("kind" .= _v1Kind), ("items" .=) <$> _v1Items]) + +-- +-- /See:/ 'bookshelves' smart constructor. +data Bookshelves = Bookshelves + { _booKind :: !Text + , _booItems :: !(Maybe [Maybe Bookshelf]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Bookshelves' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'booKind' +-- +-- * 'booItems' +bookshelves + :: Bookshelves +bookshelves = + Bookshelves + { _booKind = "books#bookshelves" + , _booItems = Nothing + } + +-- | Resource type. +booKind :: Lens' Bookshelves Text +booKind = lens _booKind (\ s a -> s{_booKind = a}) + +-- | A list of bookshelves. +booItems :: Lens' Bookshelves [Maybe Bookshelf] +booItems + = lens _booItems (\ s a -> s{_booItems = a}) . + _Default + . _Coerce + +instance FromJSON Bookshelves where + parseJSON + = withObject "Bookshelves" + (\ o -> + Bookshelves <$> + (o .:? "kind" .!= "books#bookshelves") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON Bookshelves where + toJSON Bookshelves{..} + = object + (catMaybes + [Just ("kind" .= _booKind), + ("items" .=) <$> _booItems]) + +-- +-- /See:/ 'concurrentAccessRestriction' smart constructor. +data ConcurrentAccessRestriction = ConcurrentAccessRestriction + { _carMaxConcurrentDevices :: !(Maybe Int32) + , _carSignature :: !(Maybe Text) + , _carTimeWindowSeconds :: !(Maybe Int32) + , _carKind :: !Text + , _carReasonCode :: !(Maybe Text) + , _carVolumeId :: !(Maybe Text) + , _carRestricted :: !(Maybe Bool) + , _carSource :: !(Maybe Text) + , _carDeviceAllowed :: !(Maybe Bool) + , _carMessage :: !(Maybe Text) + , _carNonce :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConcurrentAccessRestriction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'carMaxConcurrentDevices' +-- +-- * 'carSignature' +-- +-- * 'carTimeWindowSeconds' +-- +-- * 'carKind' +-- +-- * 'carReasonCode' +-- +-- * 'carVolumeId' +-- +-- * 'carRestricted' +-- +-- * 'carSource' +-- +-- * 'carDeviceAllowed' +-- +-- * 'carMessage' +-- +-- * 'carNonce' +concurrentAccessRestriction + :: ConcurrentAccessRestriction +concurrentAccessRestriction = + ConcurrentAccessRestriction + { _carMaxConcurrentDevices = Nothing + , _carSignature = Nothing + , _carTimeWindowSeconds = Nothing + , _carKind = "books#concurrentAccessRestriction" + , _carReasonCode = Nothing + , _carVolumeId = Nothing + , _carRestricted = Nothing + , _carSource = Nothing + , _carDeviceAllowed = Nothing + , _carMessage = Nothing + , _carNonce = Nothing + } + +-- | The maximum number of concurrent access licenses for this volume. +carMaxConcurrentDevices :: Lens' ConcurrentAccessRestriction (Maybe Int32) +carMaxConcurrentDevices + = lens _carMaxConcurrentDevices + (\ s a -> s{_carMaxConcurrentDevices = a}) + +-- | Response signature. +carSignature :: Lens' ConcurrentAccessRestriction (Maybe Text) +carSignature + = lens _carSignature (\ s a -> s{_carSignature = a}) + +-- | Time in seconds for license auto-expiration. +carTimeWindowSeconds :: Lens' ConcurrentAccessRestriction (Maybe Int32) +carTimeWindowSeconds + = lens _carTimeWindowSeconds + (\ s a -> s{_carTimeWindowSeconds = a}) + +-- | Resource type. +carKind :: Lens' ConcurrentAccessRestriction Text +carKind = lens _carKind (\ s a -> s{_carKind = a}) + +-- | Error\/warning reason code. +carReasonCode :: Lens' ConcurrentAccessRestriction (Maybe Text) +carReasonCode + = lens _carReasonCode + (\ s a -> s{_carReasonCode = a}) + +-- | Identifies the volume for which this entry applies. +carVolumeId :: Lens' ConcurrentAccessRestriction (Maybe Text) +carVolumeId + = lens _carVolumeId (\ s a -> s{_carVolumeId = a}) + +-- | Whether this volume has any concurrent access restrictions. +carRestricted :: Lens' ConcurrentAccessRestriction (Maybe Bool) +carRestricted + = lens _carRestricted + (\ s a -> s{_carRestricted = a}) + +-- | Client app identifier for verification. Download access and +-- client-validation only. +carSource :: Lens' ConcurrentAccessRestriction (Maybe Text) +carSource + = lens _carSource (\ s a -> s{_carSource = a}) + +-- | Whether access is granted for this (user, device, volume). +carDeviceAllowed :: Lens' ConcurrentAccessRestriction (Maybe Bool) +carDeviceAllowed + = lens _carDeviceAllowed + (\ s a -> s{_carDeviceAllowed = a}) + +-- | Error\/warning message. +carMessage :: Lens' ConcurrentAccessRestriction (Maybe Text) +carMessage + = lens _carMessage (\ s a -> s{_carMessage = a}) + +-- | Client nonce for verification. Download access and client-validation +-- only. +carNonce :: Lens' ConcurrentAccessRestriction (Maybe Text) +carNonce = lens _carNonce (\ s a -> s{_carNonce = a}) + +instance FromJSON ConcurrentAccessRestriction where + parseJSON + = withObject "ConcurrentAccessRestriction" + (\ o -> + ConcurrentAccessRestriction <$> + (o .:? "maxConcurrentDevices") <*> + (o .:? "signature") + <*> (o .:? "timeWindowSeconds") + <*> + (o .:? "kind" .!= + "books#concurrentAccessRestriction") + <*> (o .:? "reasonCode") + <*> (o .:? "volumeId") + <*> (o .:? "restricted") + <*> (o .:? "source") + <*> (o .:? "deviceAllowed") + <*> (o .:? "message") + <*> (o .:? "nonce")) + +instance ToJSON ConcurrentAccessRestriction where + toJSON ConcurrentAccessRestriction{..} + = object + (catMaybes + [("maxConcurrentDevices" .=) <$> + _carMaxConcurrentDevices, + ("signature" .=) <$> _carSignature, + ("timeWindowSeconds" .=) <$> _carTimeWindowSeconds, + Just ("kind" .= _carKind), + ("reasonCode" .=) <$> _carReasonCode, + ("volumeId" .=) <$> _carVolumeId, + ("restricted" .=) <$> _carRestricted, + ("source" .=) <$> _carSource, + ("deviceAllowed" .=) <$> _carDeviceAllowed, + ("message" .=) <$> _carMessage, + ("nonce" .=) <$> _carNonce]) + +-- +-- /See:/ 'downloadAccesses' smart constructor. +data DownloadAccesses = DownloadAccesses + { _daKind :: !Text + , _daDownloadAccessList :: !(Maybe [Maybe DownloadAccessRestriction]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DownloadAccesses' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'daKind' +-- +-- * 'daDownloadAccessList' +downloadAccesses + :: DownloadAccesses +downloadAccesses = + DownloadAccesses + { _daKind = "books#downloadAccesses" + , _daDownloadAccessList = Nothing + } + +-- | Resource type. +daKind :: Lens' DownloadAccesses Text +daKind = lens _daKind (\ s a -> s{_daKind = a}) + +-- | A list of download access responses. +daDownloadAccessList :: Lens' DownloadAccesses [Maybe DownloadAccessRestriction] +daDownloadAccessList + = lens _daDownloadAccessList + (\ s a -> s{_daDownloadAccessList = a}) + . _Default + . _Coerce + +instance FromJSON DownloadAccesses where + parseJSON + = withObject "DownloadAccesses" + (\ o -> + DownloadAccesses <$> + (o .:? "kind" .!= "books#downloadAccesses") <*> + (o .:? "downloadAccessList" .!= mempty)) + +instance ToJSON DownloadAccesses where + toJSON DownloadAccesses{..} + = object + (catMaybes + [Just ("kind" .= _daKind), + ("downloadAccessList" .=) <$> _daDownloadAccessList]) + +-- +-- /See:/ 'layersummaries' smart constructor. +data Layersummaries = Layersummaries + { _layTotalItems :: !(Maybe Int32) + , _layKind :: !Text + , _layItems :: !(Maybe [Maybe Layersummary]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Layersummaries' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'layTotalItems' +-- +-- * 'layKind' +-- +-- * 'layItems' +layersummaries + :: Layersummaries +layersummaries = + Layersummaries + { _layTotalItems = Nothing + , _layKind = "books#layersummaries" + , _layItems = Nothing + } + +-- | The total number of layer summaries found. +layTotalItems :: Lens' Layersummaries (Maybe Int32) +layTotalItems + = lens _layTotalItems + (\ s a -> s{_layTotalItems = a}) + +-- | Resource type. +layKind :: Lens' Layersummaries Text +layKind = lens _layKind (\ s a -> s{_layKind = a}) + +-- | A list of layer summary items. +layItems :: Lens' Layersummaries [Maybe Layersummary] +layItems + = lens _layItems (\ s a -> s{_layItems = a}) . + _Default + . _Coerce + +instance FromJSON Layersummaries where + parseJSON + = withObject "Layersummaries" + (\ o -> + Layersummaries <$> + (o .:? "totalItems") <*> + (o .:? "kind" .!= "books#layersummaries") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Layersummaries where + toJSON Layersummaries{..} + = object + (catMaybes + [("totalItems" .=) <$> _layTotalItems, + Just ("kind" .= _layKind), + ("items" .=) <$> _layItems]) + +-- +-- /See:/ 'booksAnnotationsRange' smart constructor. +data BooksAnnotationsRange = BooksAnnotationsRange + { _barStartOffset :: !(Maybe Text) + , _barEndOffset :: !(Maybe Text) + , _barEndPosition :: !(Maybe Text) + , _barStartPosition :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BooksAnnotationsRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'barStartOffset' +-- +-- * 'barEndOffset' +-- +-- * 'barEndPosition' +-- +-- * 'barStartPosition' +booksAnnotationsRange + :: BooksAnnotationsRange +booksAnnotationsRange = + BooksAnnotationsRange + { _barStartOffset = Nothing + , _barEndOffset = Nothing + , _barEndPosition = Nothing + , _barStartPosition = Nothing + } + +-- | The offset from the starting position. +barStartOffset :: Lens' BooksAnnotationsRange (Maybe Text) +barStartOffset + = lens _barStartOffset + (\ s a -> s{_barStartOffset = a}) + +-- | The offset from the ending position. +barEndOffset :: Lens' BooksAnnotationsRange (Maybe Text) +barEndOffset + = lens _barEndOffset (\ s a -> s{_barEndOffset = a}) + +-- | The ending position for the range. +barEndPosition :: Lens' BooksAnnotationsRange (Maybe Text) +barEndPosition + = lens _barEndPosition + (\ s a -> s{_barEndPosition = a}) + +-- | The starting position for the range. +barStartPosition :: Lens' BooksAnnotationsRange (Maybe Text) +barStartPosition + = lens _barStartPosition + (\ s a -> s{_barStartPosition = a}) + +instance FromJSON BooksAnnotationsRange where + parseJSON + = withObject "BooksAnnotationsRange" + (\ o -> + BooksAnnotationsRange <$> + (o .:? "startOffset") <*> (o .:? "endOffset") <*> + (o .:? "endPosition") + <*> (o .:? "startPosition")) + +instance ToJSON BooksAnnotationsRange where + toJSON BooksAnnotationsRange{..} + = object + (catMaybes + [("startOffset" .=) <$> _barStartOffset, + ("endOffset" .=) <$> _barEndOffset, + ("endPosition" .=) <$> _barEndPosition, + ("startPosition" .=) <$> _barStartPosition]) diff --git a/gogol-books/gen/Network/Google/Books/Types/Sum.hs b/gogol-books/gen/Network/Google/Books/Types/Sum.hs new file mode 100644 index 000000000..4ef1417e3 --- /dev/null +++ b/gogol-books/gen/Network/Google/Books/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Books.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Books.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Get.hs new file mode 100644 index 000000000..c18ac673f --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Bookshelves.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves metadata for a specific bookshelf for the specified user. +-- +-- /See:/ for @BooksBookshelvesGet@. +module Books.Bookshelves.Get + ( + -- * REST Resource + BookshelvesGetAPI + + -- * Creating a Request + , bookshelvesGet + , BookshelvesGet + + -- * Request Lenses + , bgQuotaUser + , bgPrettyPrint + , bgUserIp + , bgUserId + , bgShelf + , bgKey + , bgSource + , bgOauthToken + , bgFields + , bgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksBookshelvesGet@ which the +-- 'BookshelvesGet' request conforms to. +type BookshelvesGetAPI = + "users" :> + Capture "userId" Text :> + "bookshelves" :> + Capture "shelf" Text :> + QueryParam "source" Text :> Get '[JSON] Bookshelf + +-- | Retrieves metadata for a specific bookshelf for the specified user. +-- +-- /See:/ 'bookshelvesGet' smart constructor. +data BookshelvesGet = BookshelvesGet + { _bgQuotaUser :: !(Maybe Text) + , _bgPrettyPrint :: !Bool + , _bgUserIp :: !(Maybe Text) + , _bgUserId :: !Text + , _bgShelf :: !Text + , _bgKey :: !(Maybe Text) + , _bgSource :: !(Maybe Text) + , _bgOauthToken :: !(Maybe Text) + , _bgFields :: !(Maybe Text) + , _bgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BookshelvesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgQuotaUser' +-- +-- * 'bgPrettyPrint' +-- +-- * 'bgUserIp' +-- +-- * 'bgUserId' +-- +-- * 'bgShelf' +-- +-- * 'bgKey' +-- +-- * 'bgSource' +-- +-- * 'bgOauthToken' +-- +-- * 'bgFields' +-- +-- * 'bgAlt' +bookshelvesGet + :: Text -- ^ 'userId' + -> Text -- ^ 'shelf' + -> BookshelvesGet +bookshelvesGet pBgUserId_ pBgShelf_ = + BookshelvesGet + { _bgQuotaUser = Nothing + , _bgPrettyPrint = True + , _bgUserIp = Nothing + , _bgUserId = pBgUserId_ + , _bgShelf = pBgShelf_ + , _bgKey = Nothing + , _bgSource = Nothing + , _bgOauthToken = Nothing + , _bgFields = Nothing + , _bgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bgQuotaUser :: Lens' BookshelvesGet' (Maybe Text) +bgQuotaUser + = lens _bgQuotaUser (\ s a -> s{_bgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bgPrettyPrint :: Lens' BookshelvesGet' Bool +bgPrettyPrint + = lens _bgPrettyPrint + (\ s a -> s{_bgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bgUserIp :: Lens' BookshelvesGet' (Maybe Text) +bgUserIp = lens _bgUserIp (\ s a -> s{_bgUserIp = a}) + +-- | ID of user for whom to retrieve bookshelves. +bgUserId :: Lens' BookshelvesGet' Text +bgUserId = lens _bgUserId (\ s a -> s{_bgUserId = a}) + +-- | ID of bookshelf to retrieve. +bgShelf :: Lens' BookshelvesGet' Text +bgShelf = lens _bgShelf (\ s a -> s{_bgShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgKey :: Lens' BookshelvesGet' (Maybe Text) +bgKey = lens _bgKey (\ s a -> s{_bgKey = a}) + +-- | String to identify the originator of this request. +bgSource :: Lens' BookshelvesGet' (Maybe Text) +bgSource = lens _bgSource (\ s a -> s{_bgSource = a}) + +-- | OAuth 2.0 token for the current user. +bgOauthToken :: Lens' BookshelvesGet' (Maybe Text) +bgOauthToken + = lens _bgOauthToken (\ s a -> s{_bgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bgFields :: Lens' BookshelvesGet' (Maybe Text) +bgFields = lens _bgFields (\ s a -> s{_bgFields = a}) + +-- | Data format for the response. +bgAlt :: Lens' BookshelvesGet' Text +bgAlt = lens _bgAlt (\ s a -> s{_bgAlt = a}) + +instance GoogleRequest BookshelvesGet' where + type Rs BookshelvesGet' = Bookshelf + request = requestWithRoute defReq booksURL + requestWithRoute r u BookshelvesGet{..} + = go _bgQuotaUser _bgPrettyPrint _bgUserIp _bgUserId + _bgShelf + _bgKey + _bgSource + _bgOauthToken + _bgFields + _bgAlt + where go + = clientWithRoute (Proxy :: Proxy BookshelvesGetAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/List.hs new file mode 100644 index 000000000..0e0ff076a --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/List.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Bookshelves.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of public bookshelves for the specified user. +-- +-- /See:/ for @BooksBookshelvesList@. +module Books.Bookshelves.List + ( + -- * REST Resource + BookshelvesListAPI + + -- * Creating a Request + , bookshelvesList + , BookshelvesList + + -- * Request Lenses + , blQuotaUser + , blPrettyPrint + , blUserIp + , blUserId + , blKey + , blSource + , blOauthToken + , blFields + , blAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksBookshelvesList@ which the +-- 'BookshelvesList' request conforms to. +type BookshelvesListAPI = + "users" :> + Capture "userId" Text :> + "bookshelves" :> + QueryParam "source" Text :> Get '[JSON] Bookshelves + +-- | Retrieves a list of public bookshelves for the specified user. +-- +-- /See:/ 'bookshelvesList' smart constructor. +data BookshelvesList = BookshelvesList + { _blQuotaUser :: !(Maybe Text) + , _blPrettyPrint :: !Bool + , _blUserIp :: !(Maybe Text) + , _blUserId :: !Text + , _blKey :: !(Maybe Text) + , _blSource :: !(Maybe Text) + , _blOauthToken :: !(Maybe Text) + , _blFields :: !(Maybe Text) + , _blAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BookshelvesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blQuotaUser' +-- +-- * 'blPrettyPrint' +-- +-- * 'blUserIp' +-- +-- * 'blUserId' +-- +-- * 'blKey' +-- +-- * 'blSource' +-- +-- * 'blOauthToken' +-- +-- * 'blFields' +-- +-- * 'blAlt' +bookshelvesList + :: Text -- ^ 'userId' + -> BookshelvesList +bookshelvesList pBlUserId_ = + BookshelvesList + { _blQuotaUser = Nothing + , _blPrettyPrint = True + , _blUserIp = Nothing + , _blUserId = pBlUserId_ + , _blKey = Nothing + , _blSource = Nothing + , _blOauthToken = Nothing + , _blFields = Nothing + , _blAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +blQuotaUser :: Lens' BookshelvesList' (Maybe Text) +blQuotaUser + = lens _blQuotaUser (\ s a -> s{_blQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +blPrettyPrint :: Lens' BookshelvesList' Bool +blPrettyPrint + = lens _blPrettyPrint + (\ s a -> s{_blPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +blUserIp :: Lens' BookshelvesList' (Maybe Text) +blUserIp = lens _blUserIp (\ s a -> s{_blUserIp = a}) + +-- | ID of user for whom to retrieve bookshelves. +blUserId :: Lens' BookshelvesList' Text +blUserId = lens _blUserId (\ s a -> s{_blUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +blKey :: Lens' BookshelvesList' (Maybe Text) +blKey = lens _blKey (\ s a -> s{_blKey = a}) + +-- | String to identify the originator of this request. +blSource :: Lens' BookshelvesList' (Maybe Text) +blSource = lens _blSource (\ s a -> s{_blSource = a}) + +-- | OAuth 2.0 token for the current user. +blOauthToken :: Lens' BookshelvesList' (Maybe Text) +blOauthToken + = lens _blOauthToken (\ s a -> s{_blOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +blFields :: Lens' BookshelvesList' (Maybe Text) +blFields = lens _blFields (\ s a -> s{_blFields = a}) + +-- | Data format for the response. +blAlt :: Lens' BookshelvesList' Text +blAlt = lens _blAlt (\ s a -> s{_blAlt = a}) + +instance GoogleRequest BookshelvesList' where + type Rs BookshelvesList' = Bookshelves + request = requestWithRoute defReq booksURL + requestWithRoute r u BookshelvesList{..} + = go _blQuotaUser _blPrettyPrint _blUserIp _blUserId + _blKey + _blSource + _blOauthToken + _blFields + _blAlt + where go + = clientWithRoute (Proxy :: Proxy BookshelvesListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Volumes/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Volumes/List.hs new file mode 100644 index 000000000..a5ce2f165 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Bookshelves/Volumes/List.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Bookshelves.Volumes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves volumes in a specific bookshelf for the specified user. +-- +-- /See:/ for @BooksBookshelvesVolumesList@. +module Books.Bookshelves.Volumes.List + ( + -- * REST Resource + BookshelvesVolumesListAPI + + -- * Creating a Request + , bookshelvesVolumesList + , BookshelvesVolumesList + + -- * Request Lenses + , bvlQuotaUser + , bvlPrettyPrint + , bvlUserIp + , bvlUserId + , bvlShelf + , bvlKey + , bvlSource + , bvlOauthToken + , bvlStartIndex + , bvlMaxResults + , bvlShowPreorders + , bvlFields + , bvlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksBookshelvesVolumesList@ which the +-- 'BookshelvesVolumesList' request conforms to. +type BookshelvesVolumesListAPI = + "users" :> + Capture "userId" Text :> + "bookshelves" :> + Capture "shelf" Text :> + "volumes" :> + QueryParam "source" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + QueryParam "showPreorders" Bool :> + Get '[JSON] Volumes + +-- | Retrieves volumes in a specific bookshelf for the specified user. +-- +-- /See:/ 'bookshelvesVolumesList' smart constructor. +data BookshelvesVolumesList = BookshelvesVolumesList + { _bvlQuotaUser :: !(Maybe Text) + , _bvlPrettyPrint :: !Bool + , _bvlUserIp :: !(Maybe Text) + , _bvlUserId :: !Text + , _bvlShelf :: !Text + , _bvlKey :: !(Maybe Text) + , _bvlSource :: !(Maybe Text) + , _bvlOauthToken :: !(Maybe Text) + , _bvlStartIndex :: !(Maybe Word32) + , _bvlMaxResults :: !(Maybe Word32) + , _bvlShowPreorders :: !(Maybe Bool) + , _bvlFields :: !(Maybe Text) + , _bvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BookshelvesVolumesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bvlQuotaUser' +-- +-- * 'bvlPrettyPrint' +-- +-- * 'bvlUserIp' +-- +-- * 'bvlUserId' +-- +-- * 'bvlShelf' +-- +-- * 'bvlKey' +-- +-- * 'bvlSource' +-- +-- * 'bvlOauthToken' +-- +-- * 'bvlStartIndex' +-- +-- * 'bvlMaxResults' +-- +-- * 'bvlShowPreorders' +-- +-- * 'bvlFields' +-- +-- * 'bvlAlt' +bookshelvesVolumesList + :: Text -- ^ 'userId' + -> Text -- ^ 'shelf' + -> BookshelvesVolumesList +bookshelvesVolumesList pBvlUserId_ pBvlShelf_ = + BookshelvesVolumesList + { _bvlQuotaUser = Nothing + , _bvlPrettyPrint = True + , _bvlUserIp = Nothing + , _bvlUserId = pBvlUserId_ + , _bvlShelf = pBvlShelf_ + , _bvlKey = Nothing + , _bvlSource = Nothing + , _bvlOauthToken = Nothing + , _bvlStartIndex = Nothing + , _bvlMaxResults = Nothing + , _bvlShowPreorders = Nothing + , _bvlFields = Nothing + , _bvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bvlQuotaUser :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlQuotaUser + = lens _bvlQuotaUser (\ s a -> s{_bvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bvlPrettyPrint :: Lens' BookshelvesVolumesList' Bool +bvlPrettyPrint + = lens _bvlPrettyPrint + (\ s a -> s{_bvlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bvlUserIp :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlUserIp + = lens _bvlUserIp (\ s a -> s{_bvlUserIp = a}) + +-- | ID of user for whom to retrieve bookshelf volumes. +bvlUserId :: Lens' BookshelvesVolumesList' Text +bvlUserId + = lens _bvlUserId (\ s a -> s{_bvlUserId = a}) + +-- | ID of bookshelf to retrieve volumes. +bvlShelf :: Lens' BookshelvesVolumesList' Text +bvlShelf = lens _bvlShelf (\ s a -> s{_bvlShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bvlKey :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlKey = lens _bvlKey (\ s a -> s{_bvlKey = a}) + +-- | String to identify the originator of this request. +bvlSource :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlSource + = lens _bvlSource (\ s a -> s{_bvlSource = a}) + +-- | OAuth 2.0 token for the current user. +bvlOauthToken :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlOauthToken + = lens _bvlOauthToken + (\ s a -> s{_bvlOauthToken = a}) + +-- | Index of the first element to return (starts at 0) +bvlStartIndex :: Lens' BookshelvesVolumesList' (Maybe Word32) +bvlStartIndex + = lens _bvlStartIndex + (\ s a -> s{_bvlStartIndex = a}) + +-- | Maximum number of results to return +bvlMaxResults :: Lens' BookshelvesVolumesList' (Maybe Word32) +bvlMaxResults + = lens _bvlMaxResults + (\ s a -> s{_bvlMaxResults = a}) + +-- | Set to true to show pre-ordered books. Defaults to false. +bvlShowPreorders :: Lens' BookshelvesVolumesList' (Maybe Bool) +bvlShowPreorders + = lens _bvlShowPreorders + (\ s a -> s{_bvlShowPreorders = a}) + +-- | Selector specifying which fields to include in a partial response. +bvlFields :: Lens' BookshelvesVolumesList' (Maybe Text) +bvlFields + = lens _bvlFields (\ s a -> s{_bvlFields = a}) + +-- | Data format for the response. +bvlAlt :: Lens' BookshelvesVolumesList' Text +bvlAlt = lens _bvlAlt (\ s a -> s{_bvlAlt = a}) + +instance GoogleRequest BookshelvesVolumesList' where + type Rs BookshelvesVolumesList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u BookshelvesVolumesList{..} + = go _bvlQuotaUser _bvlPrettyPrint _bvlUserIp + _bvlUserId + _bvlShelf + _bvlKey + _bvlSource + _bvlOauthToken + _bvlStartIndex + _bvlMaxResults + _bvlShowPreorders + _bvlFields + _bvlAlt + where go + = clientWithRoute + (Proxy :: Proxy BookshelvesVolumesListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/AddBook.hs b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/AddBook.hs new file mode 100644 index 000000000..a438d42ee --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/AddBook.hs @@ -0,0 +1,197 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Cloudloading.AddBook +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | +-- +-- /See:/ for @BooksCloudloadingAddBook@. +module Books.Cloudloading.AddBook + ( + -- * REST Resource + CloudloadingAddBookAPI + + -- * Creating a Request + , cloudloadingAddBook + , CloudloadingAddBook + + -- * Request Lenses + , cabQuotaUser + , cabPrettyPrint + , cabUserIp + , cabMimeType + , cabUploadClientToken + , cabKey + , cabName + , cabOauthToken + , cabDriveDocumentId + , cabFields + , cabAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksCloudloadingAddBook@ which the +-- 'CloudloadingAddBook' request conforms to. +type CloudloadingAddBookAPI = + "cloudloading" :> + "addBook" :> + QueryParam "mime_type" Text :> + QueryParam "upload_client_token" Text :> + QueryParam "name" Text :> + QueryParam "drive_document_id" Text :> + Post '[JSON] BooksCloudloadingResource + +-- | +-- +-- /See:/ 'cloudloadingAddBook' smart constructor. +data CloudloadingAddBook = CloudloadingAddBook + { _cabQuotaUser :: !(Maybe Text) + , _cabPrettyPrint :: !Bool + , _cabUserIp :: !(Maybe Text) + , _cabMimeType :: !(Maybe Text) + , _cabUploadClientToken :: !(Maybe Text) + , _cabKey :: !(Maybe Text) + , _cabName :: !(Maybe Text) + , _cabOauthToken :: !(Maybe Text) + , _cabDriveDocumentId :: !(Maybe Text) + , _cabFields :: !(Maybe Text) + , _cabAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudloadingAddBook'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cabQuotaUser' +-- +-- * 'cabPrettyPrint' +-- +-- * 'cabUserIp' +-- +-- * 'cabMimeType' +-- +-- * 'cabUploadClientToken' +-- +-- * 'cabKey' +-- +-- * 'cabName' +-- +-- * 'cabOauthToken' +-- +-- * 'cabDriveDocumentId' +-- +-- * 'cabFields' +-- +-- * 'cabAlt' +cloudloadingAddBook + :: CloudloadingAddBook +cloudloadingAddBook = + CloudloadingAddBook + { _cabQuotaUser = Nothing + , _cabPrettyPrint = True + , _cabUserIp = Nothing + , _cabMimeType = Nothing + , _cabUploadClientToken = Nothing + , _cabKey = Nothing + , _cabName = Nothing + , _cabOauthToken = Nothing + , _cabDriveDocumentId = Nothing + , _cabFields = Nothing + , _cabAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cabQuotaUser :: Lens' CloudloadingAddBook' (Maybe Text) +cabQuotaUser + = lens _cabQuotaUser (\ s a -> s{_cabQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cabPrettyPrint :: Lens' CloudloadingAddBook' Bool +cabPrettyPrint + = lens _cabPrettyPrint + (\ s a -> s{_cabPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cabUserIp :: Lens' CloudloadingAddBook' (Maybe Text) +cabUserIp + = lens _cabUserIp (\ s a -> s{_cabUserIp = a}) + +-- | The document MIME type. It can be set only if the drive_document_id is +-- set. +cabMimeType :: Lens' CloudloadingAddBook' (Maybe Text) +cabMimeType + = lens _cabMimeType (\ s a -> s{_cabMimeType = a}) + +cabUploadClientToken :: Lens' CloudloadingAddBook' (Maybe Text) +cabUploadClientToken + = lens _cabUploadClientToken + (\ s a -> s{_cabUploadClientToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cabKey :: Lens' CloudloadingAddBook' (Maybe Text) +cabKey = lens _cabKey (\ s a -> s{_cabKey = a}) + +-- | The document name. It can be set only if the drive_document_id is set. +cabName :: Lens' CloudloadingAddBook' (Maybe Text) +cabName = lens _cabName (\ s a -> s{_cabName = a}) + +-- | OAuth 2.0 token for the current user. +cabOauthToken :: Lens' CloudloadingAddBook' (Maybe Text) +cabOauthToken + = lens _cabOauthToken + (\ s a -> s{_cabOauthToken = a}) + +-- | A drive document id. The upload_client_token must not be set. +cabDriveDocumentId :: Lens' CloudloadingAddBook' (Maybe Text) +cabDriveDocumentId + = lens _cabDriveDocumentId + (\ s a -> s{_cabDriveDocumentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cabFields :: Lens' CloudloadingAddBook' (Maybe Text) +cabFields + = lens _cabFields (\ s a -> s{_cabFields = a}) + +-- | Data format for the response. +cabAlt :: Lens' CloudloadingAddBook' Text +cabAlt = lens _cabAlt (\ s a -> s{_cabAlt = a}) + +instance GoogleRequest CloudloadingAddBook' where + type Rs CloudloadingAddBook' = + BooksCloudloadingResource + request = requestWithRoute defReq booksURL + requestWithRoute r u CloudloadingAddBook{..} + = go _cabQuotaUser _cabPrettyPrint _cabUserIp + _cabMimeType + _cabUploadClientToken + _cabKey + _cabName + _cabOauthToken + _cabDriveDocumentId + _cabFields + _cabAlt + where go + = clientWithRoute + (Proxy :: Proxy CloudloadingAddBookAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/DeleteBook.hs b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/DeleteBook.hs new file mode 100644 index 000000000..52102ce3a --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/DeleteBook.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Cloudloading.DeleteBook +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove the book and its contents +-- +-- /See:/ for @BooksCloudloadingDeleteBook@. +module Books.Cloudloading.DeleteBook + ( + -- * REST Resource + CloudloadingDeleteBookAPI + + -- * Creating a Request + , cloudloadingDeleteBook + , CloudloadingDeleteBook + + -- * Request Lenses + , cdbQuotaUser + , cdbPrettyPrint + , cdbUserIp + , cdbKey + , cdbVolumeId + , cdbOauthToken + , cdbFields + , cdbAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksCloudloadingDeleteBook@ which the +-- 'CloudloadingDeleteBook' request conforms to. +type CloudloadingDeleteBookAPI = + "cloudloading" :> + "deleteBook" :> + QueryParam "volumeId" Text :> Post '[JSON] () + +-- | Remove the book and its contents +-- +-- /See:/ 'cloudloadingDeleteBook' smart constructor. +data CloudloadingDeleteBook = CloudloadingDeleteBook + { _cdbQuotaUser :: !(Maybe Text) + , _cdbPrettyPrint :: !Bool + , _cdbUserIp :: !(Maybe Text) + , _cdbKey :: !(Maybe Text) + , _cdbVolumeId :: !Text + , _cdbOauthToken :: !(Maybe Text) + , _cdbFields :: !(Maybe Text) + , _cdbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudloadingDeleteBook'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdbQuotaUser' +-- +-- * 'cdbPrettyPrint' +-- +-- * 'cdbUserIp' +-- +-- * 'cdbKey' +-- +-- * 'cdbVolumeId' +-- +-- * 'cdbOauthToken' +-- +-- * 'cdbFields' +-- +-- * 'cdbAlt' +cloudloadingDeleteBook + :: Text -- ^ 'volumeId' + -> CloudloadingDeleteBook +cloudloadingDeleteBook pCdbVolumeId_ = + CloudloadingDeleteBook + { _cdbQuotaUser = Nothing + , _cdbPrettyPrint = True + , _cdbUserIp = Nothing + , _cdbKey = Nothing + , _cdbVolumeId = pCdbVolumeId_ + , _cdbOauthToken = Nothing + , _cdbFields = Nothing + , _cdbAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdbQuotaUser :: Lens' CloudloadingDeleteBook' (Maybe Text) +cdbQuotaUser + = lens _cdbQuotaUser (\ s a -> s{_cdbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdbPrettyPrint :: Lens' CloudloadingDeleteBook' Bool +cdbPrettyPrint + = lens _cdbPrettyPrint + (\ s a -> s{_cdbPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdbUserIp :: Lens' CloudloadingDeleteBook' (Maybe Text) +cdbUserIp + = lens _cdbUserIp (\ s a -> s{_cdbUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdbKey :: Lens' CloudloadingDeleteBook' (Maybe Text) +cdbKey = lens _cdbKey (\ s a -> s{_cdbKey = a}) + +-- | The id of the book to be removed. +cdbVolumeId :: Lens' CloudloadingDeleteBook' Text +cdbVolumeId + = lens _cdbVolumeId (\ s a -> s{_cdbVolumeId = a}) + +-- | OAuth 2.0 token for the current user. +cdbOauthToken :: Lens' CloudloadingDeleteBook' (Maybe Text) +cdbOauthToken + = lens _cdbOauthToken + (\ s a -> s{_cdbOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdbFields :: Lens' CloudloadingDeleteBook' (Maybe Text) +cdbFields + = lens _cdbFields (\ s a -> s{_cdbFields = a}) + +-- | Data format for the response. +cdbAlt :: Lens' CloudloadingDeleteBook' Text +cdbAlt = lens _cdbAlt (\ s a -> s{_cdbAlt = a}) + +instance GoogleRequest CloudloadingDeleteBook' where + type Rs CloudloadingDeleteBook' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u CloudloadingDeleteBook{..} + = go _cdbQuotaUser _cdbPrettyPrint _cdbUserIp _cdbKey + (Just _cdbVolumeId) + _cdbOauthToken + _cdbFields + _cdbAlt + where go + = clientWithRoute + (Proxy :: Proxy CloudloadingDeleteBookAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/UpdateBook.hs b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/UpdateBook.hs new file mode 100644 index 000000000..05a72e5d4 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Cloudloading/UpdateBook.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Cloudloading.UpdateBook +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | +-- +-- /See:/ for @BooksCloudloadingUpdateBook@. +module Books.Cloudloading.UpdateBook + ( + -- * REST Resource + CloudloadingUpdateBookAPI + + -- * Creating a Request + , cloudloadingUpdateBook + , CloudloadingUpdateBook + + -- * Request Lenses + , cubQuotaUser + , cubPrettyPrint + , cubUserIp + , cubKey + , cubOauthToken + , cubFields + , cubAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksCloudloadingUpdateBook@ which the +-- 'CloudloadingUpdateBook' request conforms to. +type CloudloadingUpdateBookAPI = + "cloudloading" :> + "updateBook" :> + Post '[JSON] BooksCloudloadingResource + +-- | +-- +-- /See:/ 'cloudloadingUpdateBook' smart constructor. +data CloudloadingUpdateBook = CloudloadingUpdateBook + { _cubQuotaUser :: !(Maybe Text) + , _cubPrettyPrint :: !Bool + , _cubUserIp :: !(Maybe Text) + , _cubKey :: !(Maybe Text) + , _cubOauthToken :: !(Maybe Text) + , _cubFields :: !(Maybe Text) + , _cubAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudloadingUpdateBook'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cubQuotaUser' +-- +-- * 'cubPrettyPrint' +-- +-- * 'cubUserIp' +-- +-- * 'cubKey' +-- +-- * 'cubOauthToken' +-- +-- * 'cubFields' +-- +-- * 'cubAlt' +cloudloadingUpdateBook + :: CloudloadingUpdateBook +cloudloadingUpdateBook = + CloudloadingUpdateBook + { _cubQuotaUser = Nothing + , _cubPrettyPrint = True + , _cubUserIp = Nothing + , _cubKey = Nothing + , _cubOauthToken = Nothing + , _cubFields = Nothing + , _cubAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cubQuotaUser :: Lens' CloudloadingUpdateBook' (Maybe Text) +cubQuotaUser + = lens _cubQuotaUser (\ s a -> s{_cubQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cubPrettyPrint :: Lens' CloudloadingUpdateBook' Bool +cubPrettyPrint + = lens _cubPrettyPrint + (\ s a -> s{_cubPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cubUserIp :: Lens' CloudloadingUpdateBook' (Maybe Text) +cubUserIp + = lens _cubUserIp (\ s a -> s{_cubUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cubKey :: Lens' CloudloadingUpdateBook' (Maybe Text) +cubKey = lens _cubKey (\ s a -> s{_cubKey = a}) + +-- | OAuth 2.0 token for the current user. +cubOauthToken :: Lens' CloudloadingUpdateBook' (Maybe Text) +cubOauthToken + = lens _cubOauthToken + (\ s a -> s{_cubOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cubFields :: Lens' CloudloadingUpdateBook' (Maybe Text) +cubFields + = lens _cubFields (\ s a -> s{_cubFields = a}) + +-- | Data format for the response. +cubAlt :: Lens' CloudloadingUpdateBook' Text +cubAlt = lens _cubAlt (\ s a -> s{_cubAlt = a}) + +instance GoogleRequest CloudloadingUpdateBook' where + type Rs CloudloadingUpdateBook' = + BooksCloudloadingResource + request = requestWithRoute defReq booksURL + requestWithRoute r u CloudloadingUpdateBook{..} + = go _cubQuotaUser _cubPrettyPrint _cubUserIp _cubKey + _cubOauthToken + _cubFields + _cubAlt + where go + = clientWithRoute + (Proxy :: Proxy CloudloadingUpdateBookAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Dictionary/ListOfflineMetadata.hs b/gogol-books/gen/Network/Google/Resource/Books/Dictionary/ListOfflineMetadata.hs new file mode 100644 index 000000000..08b56ed6f --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Dictionary/ListOfflineMetadata.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Dictionary.ListOfflineMetadata +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of offline dictionary meatadata available +-- +-- /See:/ for @BooksDictionaryListOfflineMetadata@. +module Books.Dictionary.ListOfflineMetadata + ( + -- * REST Resource + DictionaryListOfflineMetadataAPI + + -- * Creating a Request + , dictionaryListOfflineMetadata + , DictionaryListOfflineMetadata + + -- * Request Lenses + , dlomQuotaUser + , dlomPrettyPrint + , dlomCpksver + , dlomUserIp + , dlomKey + , dlomOauthToken + , dlomFields + , dlomAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksDictionaryListOfflineMetadata@ which the +-- 'DictionaryListOfflineMetadata' request conforms to. +type DictionaryListOfflineMetadataAPI = + "dictionary" :> + "listOfflineMetadata" :> + QueryParam "cpksver" Text :> Get '[JSON] Metadata + +-- | Returns a list of offline dictionary meatadata available +-- +-- /See:/ 'dictionaryListOfflineMetadata' smart constructor. +data DictionaryListOfflineMetadata = DictionaryListOfflineMetadata + { _dlomQuotaUser :: !(Maybe Text) + , _dlomPrettyPrint :: !Bool + , _dlomCpksver :: !Text + , _dlomUserIp :: !(Maybe Text) + , _dlomKey :: !(Maybe Text) + , _dlomOauthToken :: !(Maybe Text) + , _dlomFields :: !(Maybe Text) + , _dlomAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DictionaryListOfflineMetadata'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlomQuotaUser' +-- +-- * 'dlomPrettyPrint' +-- +-- * 'dlomCpksver' +-- +-- * 'dlomUserIp' +-- +-- * 'dlomKey' +-- +-- * 'dlomOauthToken' +-- +-- * 'dlomFields' +-- +-- * 'dlomAlt' +dictionaryListOfflineMetadata + :: Text -- ^ 'cpksver' + -> DictionaryListOfflineMetadata +dictionaryListOfflineMetadata pDlomCpksver_ = + DictionaryListOfflineMetadata + { _dlomQuotaUser = Nothing + , _dlomPrettyPrint = True + , _dlomCpksver = pDlomCpksver_ + , _dlomUserIp = Nothing + , _dlomKey = Nothing + , _dlomOauthToken = Nothing + , _dlomFields = Nothing + , _dlomAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlomQuotaUser :: Lens' DictionaryListOfflineMetadata' (Maybe Text) +dlomQuotaUser + = lens _dlomQuotaUser + (\ s a -> s{_dlomQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlomPrettyPrint :: Lens' DictionaryListOfflineMetadata' Bool +dlomPrettyPrint + = lens _dlomPrettyPrint + (\ s a -> s{_dlomPrettyPrint = a}) + +-- | The device\/version ID from which to request the data. +dlomCpksver :: Lens' DictionaryListOfflineMetadata' Text +dlomCpksver + = lens _dlomCpksver (\ s a -> s{_dlomCpksver = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlomUserIp :: Lens' DictionaryListOfflineMetadata' (Maybe Text) +dlomUserIp + = lens _dlomUserIp (\ s a -> s{_dlomUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlomKey :: Lens' DictionaryListOfflineMetadata' (Maybe Text) +dlomKey = lens _dlomKey (\ s a -> s{_dlomKey = a}) + +-- | OAuth 2.0 token for the current user. +dlomOauthToken :: Lens' DictionaryListOfflineMetadata' (Maybe Text) +dlomOauthToken + = lens _dlomOauthToken + (\ s a -> s{_dlomOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dlomFields :: Lens' DictionaryListOfflineMetadata' (Maybe Text) +dlomFields + = lens _dlomFields (\ s a -> s{_dlomFields = a}) + +-- | Data format for the response. +dlomAlt :: Lens' DictionaryListOfflineMetadata' Text +dlomAlt = lens _dlomAlt (\ s a -> s{_dlomAlt = a}) + +instance GoogleRequest DictionaryListOfflineMetadata' + where + type Rs DictionaryListOfflineMetadata' = Metadata + request = requestWithRoute defReq booksURL + requestWithRoute r u + DictionaryListOfflineMetadata{..} + = go _dlomQuotaUser _dlomPrettyPrint + (Just _dlomCpksver) + _dlomUserIp + _dlomKey + _dlomOauthToken + _dlomFields + _dlomAlt + where go + = clientWithRoute + (Proxy :: Proxy DictionaryListOfflineMetadataAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/Get.hs new file mode 100644 index 000000000..e58b2efa1 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/Get.hs @@ -0,0 +1,276 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.AnnotationData.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the annotation data. +-- +-- /See:/ for @BooksLayersAnnotationDataGet@. +module Books.Layers.AnnotationData.Get + ( + -- * REST Resource + LayersAnnotationDataGetAPI + + -- * Creating a Request + , layersAnnotationDataGet + , LayersAnnotationDataGet + + -- * Request Lenses + , ladgQuotaUser + , ladgW + , ladgPrettyPrint + , ladgScale + , ladgUserIp + , ladgLocale + , ladgContentVersion + , ladgKey + , ladgAllowWebDefinitions + , ladgAnnotationDataId + , ladgVolumeId + , ladgSource + , ladgH + , ladgOauthToken + , ladgLayerId + , ladgFields + , ladgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersAnnotationDataGet@ which the +-- 'LayersAnnotationDataGet' request conforms to. +type LayersAnnotationDataGetAPI = + "volumes" :> + Capture "volumeId" Text :> + "layers" :> + Capture "layerId" Text :> + "data" :> + Capture "annotationDataId" Text :> + QueryParam "w" Int32 :> + QueryParam "scale" Int32 :> + QueryParam "locale" Text :> + QueryParam "contentVersion" Text :> + QueryParam "allowWebDefinitions" Bool :> + QueryParam "source" Text :> + QueryParam "h" Int32 :> Get '[JSON] Annotationdata + +-- | Gets the annotation data. +-- +-- /See:/ 'layersAnnotationDataGet' smart constructor. +data LayersAnnotationDataGet = LayersAnnotationDataGet + { _ladgQuotaUser :: !(Maybe Text) + , _ladgW :: !(Maybe Int32) + , _ladgPrettyPrint :: !Bool + , _ladgScale :: !(Maybe Int32) + , _ladgUserIp :: !(Maybe Text) + , _ladgLocale :: !(Maybe Text) + , _ladgContentVersion :: !Text + , _ladgKey :: !(Maybe Text) + , _ladgAllowWebDefinitions :: !(Maybe Bool) + , _ladgAnnotationDataId :: !Text + , _ladgVolumeId :: !Text + , _ladgSource :: !(Maybe Text) + , _ladgH :: !(Maybe Int32) + , _ladgOauthToken :: !(Maybe Text) + , _ladgLayerId :: !Text + , _ladgFields :: !(Maybe Text) + , _ladgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersAnnotationDataGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ladgQuotaUser' +-- +-- * 'ladgW' +-- +-- * 'ladgPrettyPrint' +-- +-- * 'ladgScale' +-- +-- * 'ladgUserIp' +-- +-- * 'ladgLocale' +-- +-- * 'ladgContentVersion' +-- +-- * 'ladgKey' +-- +-- * 'ladgAllowWebDefinitions' +-- +-- * 'ladgAnnotationDataId' +-- +-- * 'ladgVolumeId' +-- +-- * 'ladgSource' +-- +-- * 'ladgH' +-- +-- * 'ladgOauthToken' +-- +-- * 'ladgLayerId' +-- +-- * 'ladgFields' +-- +-- * 'ladgAlt' +layersAnnotationDataGet + :: Text -- ^ 'contentVersion' + -> Text -- ^ 'annotationDataId' + -> Text -- ^ 'volumeId' + -> Text -- ^ 'layerId' + -> LayersAnnotationDataGet +layersAnnotationDataGet pLadgContentVersion_ pLadgAnnotationDataId_ pLadgVolumeId_ pLadgLayerId_ = + LayersAnnotationDataGet + { _ladgQuotaUser = Nothing + , _ladgW = Nothing + , _ladgPrettyPrint = True + , _ladgScale = Nothing + , _ladgUserIp = Nothing + , _ladgLocale = Nothing + , _ladgContentVersion = pLadgContentVersion_ + , _ladgKey = Nothing + , _ladgAllowWebDefinitions = Nothing + , _ladgAnnotationDataId = pLadgAnnotationDataId_ + , _ladgVolumeId = pLadgVolumeId_ + , _ladgSource = Nothing + , _ladgH = Nothing + , _ladgOauthToken = Nothing + , _ladgLayerId = pLadgLayerId_ + , _ladgFields = Nothing + , _ladgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ladgQuotaUser :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgQuotaUser + = lens _ladgQuotaUser + (\ s a -> s{_ladgQuotaUser = a}) + +-- | The requested pixel width for any images. If width is provided height +-- must also be provided. +ladgW :: Lens' LayersAnnotationDataGet' (Maybe Int32) +ladgW = lens _ladgW (\ s a -> s{_ladgW = a}) + +-- | Returns response with indentations and line breaks. +ladgPrettyPrint :: Lens' LayersAnnotationDataGet' Bool +ladgPrettyPrint + = lens _ladgPrettyPrint + (\ s a -> s{_ladgPrettyPrint = a}) + +-- | The requested scale for the image. +ladgScale :: Lens' LayersAnnotationDataGet' (Maybe Int32) +ladgScale + = lens _ladgScale (\ s a -> s{_ladgScale = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ladgUserIp :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgUserIp + = lens _ladgUserIp (\ s a -> s{_ladgUserIp = a}) + +-- | The locale information for the data. ISO-639-1 language and ISO-3166-1 +-- country code. Ex: \'en_US\'. +ladgLocale :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgLocale + = lens _ladgLocale (\ s a -> s{_ladgLocale = a}) + +-- | The content version for the volume you are trying to retrieve. +ladgContentVersion :: Lens' LayersAnnotationDataGet' Text +ladgContentVersion + = lens _ladgContentVersion + (\ s a -> s{_ladgContentVersion = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ladgKey :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgKey = lens _ladgKey (\ s a -> s{_ladgKey = a}) + +-- | For the dictionary layer. Whether or not to allow web definitions. +ladgAllowWebDefinitions :: Lens' LayersAnnotationDataGet' (Maybe Bool) +ladgAllowWebDefinitions + = lens _ladgAllowWebDefinitions + (\ s a -> s{_ladgAllowWebDefinitions = a}) + +-- | The ID of the annotation data to retrieve. +ladgAnnotationDataId :: Lens' LayersAnnotationDataGet' Text +ladgAnnotationDataId + = lens _ladgAnnotationDataId + (\ s a -> s{_ladgAnnotationDataId = a}) + +-- | The volume to retrieve annotations for. +ladgVolumeId :: Lens' LayersAnnotationDataGet' Text +ladgVolumeId + = lens _ladgVolumeId (\ s a -> s{_ladgVolumeId = a}) + +-- | String to identify the originator of this request. +ladgSource :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgSource + = lens _ladgSource (\ s a -> s{_ladgSource = a}) + +-- | The requested pixel height for any images. If height is provided width +-- must also be provided. +ladgH :: Lens' LayersAnnotationDataGet' (Maybe Int32) +ladgH = lens _ladgH (\ s a -> s{_ladgH = a}) + +-- | OAuth 2.0 token for the current user. +ladgOauthToken :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgOauthToken + = lens _ladgOauthToken + (\ s a -> s{_ladgOauthToken = a}) + +-- | The ID for the layer to get the annotations. +ladgLayerId :: Lens' LayersAnnotationDataGet' Text +ladgLayerId + = lens _ladgLayerId (\ s a -> s{_ladgLayerId = a}) + +-- | Selector specifying which fields to include in a partial response. +ladgFields :: Lens' LayersAnnotationDataGet' (Maybe Text) +ladgFields + = lens _ladgFields (\ s a -> s{_ladgFields = a}) + +-- | Data format for the response. +ladgAlt :: Lens' LayersAnnotationDataGet' Text +ladgAlt = lens _ladgAlt (\ s a -> s{_ladgAlt = a}) + +instance GoogleRequest LayersAnnotationDataGet' where + type Rs LayersAnnotationDataGet' = Annotationdata + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersAnnotationDataGet{..} + = go _ladgQuotaUser _ladgW _ladgPrettyPrint + _ladgScale + _ladgUserIp + _ladgLocale + (Just _ladgContentVersion) + _ladgKey + _ladgAllowWebDefinitions + _ladgAnnotationDataId + _ladgVolumeId + _ladgSource + _ladgH + _ladgOauthToken + _ladgLayerId + _ladgFields + _ladgAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersAnnotationDataGetAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/List.hs new file mode 100644 index 000000000..4c61a84c5 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/List.hs @@ -0,0 +1,319 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.AnnotationData.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the annotation data for a volume and layer. +-- +-- /See:/ for @BooksLayersAnnotationDataList@. +module Books.Layers.AnnotationData.List + ( + -- * REST Resource + LayersAnnotationDataListAPI + + -- * Creating a Request + , layersAnnotationDataList + , LayersAnnotationDataList + + -- * Request Lenses + , ladlQuotaUser + , ladlW + , ladlPrettyPrint + , ladlScale + , ladlUserIp + , ladlLocale + , ladlContentVersion + , ladlUpdatedMax + , ladlKey + , ladlUpdatedMin + , ladlAnnotationDataId + , ladlVolumeId + , ladlSource + , ladlH + , ladlPageToken + , ladlOauthToken + , ladlLayerId + , ladlMaxResults + , ladlFields + , ladlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersAnnotationDataList@ which the +-- 'LayersAnnotationDataList' request conforms to. +type LayersAnnotationDataListAPI = + "volumes" :> + Capture "volumeId" Text :> + "layers" :> + Capture "layerId" Text :> + "data" :> + QueryParam "w" Int32 :> + QueryParam "scale" Int32 :> + QueryParam "locale" Text :> + QueryParam "contentVersion" Text :> + QueryParam "updatedMax" Text :> + QueryParam "updatedMin" Text :> + QueryParams "annotationDataId" Text :> + QueryParam "source" Text :> + QueryParam "h" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Annotationsdata + +-- | Gets the annotation data for a volume and layer. +-- +-- /See:/ 'layersAnnotationDataList' smart constructor. +data LayersAnnotationDataList = LayersAnnotationDataList + { _ladlQuotaUser :: !(Maybe Text) + , _ladlW :: !(Maybe Int32) + , _ladlPrettyPrint :: !Bool + , _ladlScale :: !(Maybe Int32) + , _ladlUserIp :: !(Maybe Text) + , _ladlLocale :: !(Maybe Text) + , _ladlContentVersion :: !Text + , _ladlUpdatedMax :: !(Maybe Text) + , _ladlKey :: !(Maybe Text) + , _ladlUpdatedMin :: !(Maybe Text) + , _ladlAnnotationDataId :: !(Maybe Text) + , _ladlVolumeId :: !Text + , _ladlSource :: !(Maybe Text) + , _ladlH :: !(Maybe Int32) + , _ladlPageToken :: !(Maybe Text) + , _ladlOauthToken :: !(Maybe Text) + , _ladlLayerId :: !Text + , _ladlMaxResults :: !(Maybe Word32) + , _ladlFields :: !(Maybe Text) + , _ladlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersAnnotationDataList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ladlQuotaUser' +-- +-- * 'ladlW' +-- +-- * 'ladlPrettyPrint' +-- +-- * 'ladlScale' +-- +-- * 'ladlUserIp' +-- +-- * 'ladlLocale' +-- +-- * 'ladlContentVersion' +-- +-- * 'ladlUpdatedMax' +-- +-- * 'ladlKey' +-- +-- * 'ladlUpdatedMin' +-- +-- * 'ladlAnnotationDataId' +-- +-- * 'ladlVolumeId' +-- +-- * 'ladlSource' +-- +-- * 'ladlH' +-- +-- * 'ladlPageToken' +-- +-- * 'ladlOauthToken' +-- +-- * 'ladlLayerId' +-- +-- * 'ladlMaxResults' +-- +-- * 'ladlFields' +-- +-- * 'ladlAlt' +layersAnnotationDataList + :: Text -- ^ 'contentVersion' + -> Text -- ^ 'volumeId' + -> Text -- ^ 'layerId' + -> LayersAnnotationDataList +layersAnnotationDataList pLadlContentVersion_ pLadlVolumeId_ pLadlLayerId_ = + LayersAnnotationDataList + { _ladlQuotaUser = Nothing + , _ladlW = Nothing + , _ladlPrettyPrint = True + , _ladlScale = Nothing + , _ladlUserIp = Nothing + , _ladlLocale = Nothing + , _ladlContentVersion = pLadlContentVersion_ + , _ladlUpdatedMax = Nothing + , _ladlKey = Nothing + , _ladlUpdatedMin = Nothing + , _ladlAnnotationDataId = Nothing + , _ladlVolumeId = pLadlVolumeId_ + , _ladlSource = Nothing + , _ladlH = Nothing + , _ladlPageToken = Nothing + , _ladlOauthToken = Nothing + , _ladlLayerId = pLadlLayerId_ + , _ladlMaxResults = Nothing + , _ladlFields = Nothing + , _ladlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ladlQuotaUser :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlQuotaUser + = lens _ladlQuotaUser + (\ s a -> s{_ladlQuotaUser = a}) + +-- | The requested pixel width for any images. If width is provided height +-- must also be provided. +ladlW :: Lens' LayersAnnotationDataList' (Maybe Int32) +ladlW = lens _ladlW (\ s a -> s{_ladlW = a}) + +-- | Returns response with indentations and line breaks. +ladlPrettyPrint :: Lens' LayersAnnotationDataList' Bool +ladlPrettyPrint + = lens _ladlPrettyPrint + (\ s a -> s{_ladlPrettyPrint = a}) + +-- | The requested scale for the image. +ladlScale :: Lens' LayersAnnotationDataList' (Maybe Int32) +ladlScale + = lens _ladlScale (\ s a -> s{_ladlScale = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ladlUserIp :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlUserIp + = lens _ladlUserIp (\ s a -> s{_ladlUserIp = a}) + +-- | The locale information for the data. ISO-639-1 language and ISO-3166-1 +-- country code. Ex: \'en_US\'. +ladlLocale :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlLocale + = lens _ladlLocale (\ s a -> s{_ladlLocale = a}) + +-- | The content version for the requested volume. +ladlContentVersion :: Lens' LayersAnnotationDataList' Text +ladlContentVersion + = lens _ladlContentVersion + (\ s a -> s{_ladlContentVersion = a}) + +-- | RFC 3339 timestamp to restrict to items updated prior to this timestamp +-- (exclusive). +ladlUpdatedMax :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlUpdatedMax + = lens _ladlUpdatedMax + (\ s a -> s{_ladlUpdatedMax = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ladlKey :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlKey = lens _ladlKey (\ s a -> s{_ladlKey = a}) + +-- | RFC 3339 timestamp to restrict to items updated since this timestamp +-- (inclusive). +ladlUpdatedMin :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlUpdatedMin + = lens _ladlUpdatedMin + (\ s a -> s{_ladlUpdatedMin = a}) + +-- | The list of Annotation Data Ids to retrieve. Pagination is ignored if +-- this is set. +ladlAnnotationDataId :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlAnnotationDataId + = lens _ladlAnnotationDataId + (\ s a -> s{_ladlAnnotationDataId = a}) + +-- | The volume to retrieve annotation data for. +ladlVolumeId :: Lens' LayersAnnotationDataList' Text +ladlVolumeId + = lens _ladlVolumeId (\ s a -> s{_ladlVolumeId = a}) + +-- | String to identify the originator of this request. +ladlSource :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlSource + = lens _ladlSource (\ s a -> s{_ladlSource = a}) + +-- | The requested pixel height for any images. If height is provided width +-- must also be provided. +ladlH :: Lens' LayersAnnotationDataList' (Maybe Int32) +ladlH = lens _ladlH (\ s a -> s{_ladlH = a}) + +-- | The value of the nextToken from the previous page. +ladlPageToken :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlPageToken + = lens _ladlPageToken + (\ s a -> s{_ladlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ladlOauthToken :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlOauthToken + = lens _ladlOauthToken + (\ s a -> s{_ladlOauthToken = a}) + +-- | The ID for the layer to get the annotation data. +ladlLayerId :: Lens' LayersAnnotationDataList' Text +ladlLayerId + = lens _ladlLayerId (\ s a -> s{_ladlLayerId = a}) + +-- | Maximum number of results to return +ladlMaxResults :: Lens' LayersAnnotationDataList' (Maybe Word32) +ladlMaxResults + = lens _ladlMaxResults + (\ s a -> s{_ladlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ladlFields :: Lens' LayersAnnotationDataList' (Maybe Text) +ladlFields + = lens _ladlFields (\ s a -> s{_ladlFields = a}) + +-- | Data format for the response. +ladlAlt :: Lens' LayersAnnotationDataList' Text +ladlAlt = lens _ladlAlt (\ s a -> s{_ladlAlt = a}) + +instance GoogleRequest LayersAnnotationDataList' + where + type Rs LayersAnnotationDataList' = Annotationsdata + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersAnnotationDataList{..} + = go _ladlQuotaUser _ladlW _ladlPrettyPrint + _ladlScale + _ladlUserIp + _ladlLocale + (Just _ladlContentVersion) + _ladlUpdatedMax + _ladlKey + _ladlUpdatedMin + _ladlAnnotationDataId + _ladlVolumeId + _ladlSource + _ladlH + _ladlPageToken + _ladlOauthToken + _ladlLayerId + _ladlMaxResults + _ladlFields + _ladlAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersAnnotationDataListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/Get.hs new file mode 100644 index 000000000..7169d2a64 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/Get.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the layer summary for a volume. +-- +-- /See:/ for @BooksLayersGet@. +module Books.Layers.Get + ( + -- * REST Resource + LayersGetAPI + + -- * Creating a Request + , layersGet + , LayersGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgUserIp + , lgContentVersion + , lgKey + , lgVolumeId + , lgSource + , lgOauthToken + , lgFields + , lgSummaryId + , lgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersGet@ which the +-- 'LayersGet' request conforms to. +type LayersGetAPI = + "volumes" :> + Capture "volumeId" Text :> + "layersummary" :> + Capture "summaryId" Text :> + QueryParam "contentVersion" Text :> + QueryParam "source" Text :> Get '[JSON] Layersummary + +-- | Gets the layer summary for a volume. +-- +-- /See:/ 'layersGet' smart constructor. +data LayersGet = LayersGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgUserIp :: !(Maybe Text) + , _lgContentVersion :: !(Maybe Text) + , _lgKey :: !(Maybe Text) + , _lgVolumeId :: !Text + , _lgSource :: !(Maybe Text) + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgSummaryId :: !Text + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgUserIp' +-- +-- * 'lgContentVersion' +-- +-- * 'lgKey' +-- +-- * 'lgVolumeId' +-- +-- * 'lgSource' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgSummaryId' +-- +-- * 'lgAlt' +layersGet + :: Text -- ^ 'volumeId' + -> Text -- ^ 'summaryId' + -> LayersGet +layersGet pLgVolumeId_ pLgSummaryId_ = + LayersGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgUserIp = Nothing + , _lgContentVersion = Nothing + , _lgKey = Nothing + , _lgVolumeId = pLgVolumeId_ + , _lgSource = Nothing + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgSummaryId = pLgSummaryId_ + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LayersGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LayersGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LayersGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | The content version for the requested volume. +lgContentVersion :: Lens' LayersGet' (Maybe Text) +lgContentVersion + = lens _lgContentVersion + (\ s a -> s{_lgContentVersion = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LayersGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | The volume to retrieve layers for. +lgVolumeId :: Lens' LayersGet' Text +lgVolumeId + = lens _lgVolumeId (\ s a -> s{_lgVolumeId = a}) + +-- | String to identify the originator of this request. +lgSource :: Lens' LayersGet' (Maybe Text) +lgSource = lens _lgSource (\ s a -> s{_lgSource = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LayersGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LayersGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | The ID for the layer to get the summary for. +lgSummaryId :: Lens' LayersGet' Text +lgSummaryId + = lens _lgSummaryId (\ s a -> s{_lgSummaryId = a}) + +-- | Data format for the response. +lgAlt :: Lens' LayersGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LayersGet' where + type Rs LayersGet' = Layersummary + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgUserIp + _lgContentVersion + _lgKey + _lgVolumeId + _lgSource + _lgOauthToken + _lgFields + _lgSummaryId + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LayersGetAPI) r u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/List.hs new file mode 100644 index 000000000..2b119b84c --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/List.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the layer summaries for a volume. +-- +-- /See:/ for @BooksLayersList@. +module Books.Layers.List + ( + -- * REST Resource + LayersListAPI + + -- * Creating a Request + , layersList + , LayersList + + -- * Request Lenses + , llQuotaUser + , llPrettyPrint + , llUserIp + , llContentVersion + , llKey + , llVolumeId + , llSource + , llPageToken + , llOauthToken + , llMaxResults + , llFields + , llAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersList@ which the +-- 'LayersList' request conforms to. +type LayersListAPI = + "volumes" :> + Capture "volumeId" Text :> + "layersummary" :> + QueryParam "contentVersion" Text :> + QueryParam "source" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Layersummaries + +-- | List the layer summaries for a volume. +-- +-- /See:/ 'layersList' smart constructor. +data LayersList = LayersList + { _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llUserIp :: !(Maybe Text) + , _llContentVersion :: !(Maybe Text) + , _llKey :: !(Maybe Text) + , _llVolumeId :: !Text + , _llSource :: !(Maybe Text) + , _llPageToken :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llMaxResults :: !(Maybe Word32) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llUserIp' +-- +-- * 'llContentVersion' +-- +-- * 'llKey' +-- +-- * 'llVolumeId' +-- +-- * 'llSource' +-- +-- * 'llPageToken' +-- +-- * 'llOauthToken' +-- +-- * 'llMaxResults' +-- +-- * 'llFields' +-- +-- * 'llAlt' +layersList + :: Text -- ^ 'volumeId' + -> LayersList +layersList pLlVolumeId_ = + LayersList + { _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llUserIp = Nothing + , _llContentVersion = Nothing + , _llKey = Nothing + , _llVolumeId = pLlVolumeId_ + , _llSource = Nothing + , _llPageToken = Nothing + , _llOauthToken = Nothing + , _llMaxResults = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LayersList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LayersList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LayersList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | The content version for the requested volume. +llContentVersion :: Lens' LayersList' (Maybe Text) +llContentVersion + = lens _llContentVersion + (\ s a -> s{_llContentVersion = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LayersList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | The volume to retrieve layers for. +llVolumeId :: Lens' LayersList' Text +llVolumeId + = lens _llVolumeId (\ s a -> s{_llVolumeId = a}) + +-- | String to identify the originator of this request. +llSource :: Lens' LayersList' (Maybe Text) +llSource = lens _llSource (\ s a -> s{_llSource = a}) + +-- | The value of the nextToken from the previous page. +llPageToken :: Lens' LayersList' (Maybe Text) +llPageToken + = lens _llPageToken (\ s a -> s{_llPageToken = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LayersList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | Maximum number of results to return +llMaxResults :: Lens' LayersList' (Maybe Word32) +llMaxResults + = lens _llMaxResults (\ s a -> s{_llMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LayersList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LayersList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LayersList' where + type Rs LayersList' = Layersummaries + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersList{..} + = go _llQuotaUser _llPrettyPrint _llUserIp + _llContentVersion + _llKey + _llVolumeId + _llSource + _llPageToken + _llOauthToken + _llMaxResults + _llFields + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LayersListAPI) r u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/Get.hs new file mode 100644 index 000000000..da7eae72e --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/Get.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.VolumeAnnotations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the volume annotation. +-- +-- /See:/ for @BooksLayersVolumeAnnotationsGet@. +module Books.Layers.VolumeAnnotations.Get + ( + -- * REST Resource + LayersVolumeAnnotationsGetAPI + + -- * Creating a Request + , layersVolumeAnnotationsGet + , LayersVolumeAnnotationsGet + + -- * Request Lenses + , lvagQuotaUser + , lvagPrettyPrint + , lvagUserIp + , lvagLocale + , lvagKey + , lvagAnnotationId + , lvagVolumeId + , lvagSource + , lvagOauthToken + , lvagLayerId + , lvagFields + , lvagAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersVolumeAnnotationsGet@ which the +-- 'LayersVolumeAnnotationsGet' request conforms to. +type LayersVolumeAnnotationsGetAPI = + "volumes" :> + Capture "volumeId" Text :> + "layers" :> + Capture "layerId" Text :> + "annotations" :> + Capture "annotationId" Text :> + QueryParam "locale" Text :> + QueryParam "source" Text :> + Get '[JSON] Volumeannotation + +-- | Gets the volume annotation. +-- +-- /See:/ 'layersVolumeAnnotationsGet' smart constructor. +data LayersVolumeAnnotationsGet = LayersVolumeAnnotationsGet + { _lvagQuotaUser :: !(Maybe Text) + , _lvagPrettyPrint :: !Bool + , _lvagUserIp :: !(Maybe Text) + , _lvagLocale :: !(Maybe Text) + , _lvagKey :: !(Maybe Text) + , _lvagAnnotationId :: !Text + , _lvagVolumeId :: !Text + , _lvagSource :: !(Maybe Text) + , _lvagOauthToken :: !(Maybe Text) + , _lvagLayerId :: !Text + , _lvagFields :: !(Maybe Text) + , _lvagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersVolumeAnnotationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lvagQuotaUser' +-- +-- * 'lvagPrettyPrint' +-- +-- * 'lvagUserIp' +-- +-- * 'lvagLocale' +-- +-- * 'lvagKey' +-- +-- * 'lvagAnnotationId' +-- +-- * 'lvagVolumeId' +-- +-- * 'lvagSource' +-- +-- * 'lvagOauthToken' +-- +-- * 'lvagLayerId' +-- +-- * 'lvagFields' +-- +-- * 'lvagAlt' +layersVolumeAnnotationsGet + :: Text -- ^ 'annotationId' + -> Text -- ^ 'volumeId' + -> Text -- ^ 'layerId' + -> LayersVolumeAnnotationsGet +layersVolumeAnnotationsGet pLvagAnnotationId_ pLvagVolumeId_ pLvagLayerId_ = + LayersVolumeAnnotationsGet + { _lvagQuotaUser = Nothing + , _lvagPrettyPrint = True + , _lvagUserIp = Nothing + , _lvagLocale = Nothing + , _lvagKey = Nothing + , _lvagAnnotationId = pLvagAnnotationId_ + , _lvagVolumeId = pLvagVolumeId_ + , _lvagSource = Nothing + , _lvagOauthToken = Nothing + , _lvagLayerId = pLvagLayerId_ + , _lvagFields = Nothing + , _lvagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lvagQuotaUser :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagQuotaUser + = lens _lvagQuotaUser + (\ s a -> s{_lvagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lvagPrettyPrint :: Lens' LayersVolumeAnnotationsGet' Bool +lvagPrettyPrint + = lens _lvagPrettyPrint + (\ s a -> s{_lvagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lvagUserIp :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagUserIp + = lens _lvagUserIp (\ s a -> s{_lvagUserIp = a}) + +-- | The locale information for the data. ISO-639-1 language and ISO-3166-1 +-- country code. Ex: \'en_US\'. +lvagLocale :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagLocale + = lens _lvagLocale (\ s a -> s{_lvagLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lvagKey :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagKey = lens _lvagKey (\ s a -> s{_lvagKey = a}) + +-- | The ID of the volume annotation to retrieve. +lvagAnnotationId :: Lens' LayersVolumeAnnotationsGet' Text +lvagAnnotationId + = lens _lvagAnnotationId + (\ s a -> s{_lvagAnnotationId = a}) + +-- | The volume to retrieve annotations for. +lvagVolumeId :: Lens' LayersVolumeAnnotationsGet' Text +lvagVolumeId + = lens _lvagVolumeId (\ s a -> s{_lvagVolumeId = a}) + +-- | String to identify the originator of this request. +lvagSource :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagSource + = lens _lvagSource (\ s a -> s{_lvagSource = a}) + +-- | OAuth 2.0 token for the current user. +lvagOauthToken :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagOauthToken + = lens _lvagOauthToken + (\ s a -> s{_lvagOauthToken = a}) + +-- | The ID for the layer to get the annotations. +lvagLayerId :: Lens' LayersVolumeAnnotationsGet' Text +lvagLayerId + = lens _lvagLayerId (\ s a -> s{_lvagLayerId = a}) + +-- | Selector specifying which fields to include in a partial response. +lvagFields :: Lens' LayersVolumeAnnotationsGet' (Maybe Text) +lvagFields + = lens _lvagFields (\ s a -> s{_lvagFields = a}) + +-- | Data format for the response. +lvagAlt :: Lens' LayersVolumeAnnotationsGet' Text +lvagAlt = lens _lvagAlt (\ s a -> s{_lvagAlt = a}) + +instance GoogleRequest LayersVolumeAnnotationsGet' + where + type Rs LayersVolumeAnnotationsGet' = + Volumeannotation + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersVolumeAnnotationsGet{..} + = go _lvagQuotaUser _lvagPrettyPrint _lvagUserIp + _lvagLocale + _lvagKey + _lvagAnnotationId + _lvagVolumeId + _lvagSource + _lvagOauthToken + _lvagLayerId + _lvagFields + _lvagAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersVolumeAnnotationsGetAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/List.hs new file mode 100644 index 000000000..1e658b915 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Layers/VolumeAnnotations/List.hs @@ -0,0 +1,348 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Layers.VolumeAnnotations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the volume annotations for a volume and layer. +-- +-- /See:/ for @BooksLayersVolumeAnnotationsList@. +module Books.Layers.VolumeAnnotations.List + ( + -- * REST Resource + LayersVolumeAnnotationsListAPI + + -- * Creating a Request + , layersVolumeAnnotationsList + , LayersVolumeAnnotationsList + + -- * Request Lenses + , lvalQuotaUser + , lvalPrettyPrint + , lvalStartOffset + , lvalUserIp + , lvalLocale + , lvalContentVersion + , lvalShowDeleted + , lvalVolumeAnnotationsVersion + , lvalUpdatedMax + , lvalKey + , lvalUpdatedMin + , lvalEndOffset + , lvalVolumeId + , lvalSource + , lvalPageToken + , lvalOauthToken + , lvalEndPosition + , lvalLayerId + , lvalMaxResults + , lvalStartPosition + , lvalFields + , lvalAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksLayersVolumeAnnotationsList@ which the +-- 'LayersVolumeAnnotationsList' request conforms to. +type LayersVolumeAnnotationsListAPI = + "volumes" :> + Capture "volumeId" Text :> + "layers" :> + Capture "layerId" Text :> + QueryParam "startOffset" Text :> + QueryParam "locale" Text :> + QueryParam "contentVersion" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "volumeAnnotationsVersion" Text :> + QueryParam "updatedMax" Text :> + QueryParam "updatedMin" Text :> + QueryParam "endOffset" Text :> + QueryParam "source" Text :> + QueryParam "pageToken" Text :> + QueryParam "endPosition" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "startPosition" Text :> + Get '[JSON] Volumeannotations + +-- | Gets the volume annotations for a volume and layer. +-- +-- /See:/ 'layersVolumeAnnotationsList' smart constructor. +data LayersVolumeAnnotationsList = LayersVolumeAnnotationsList + { _lvalQuotaUser :: !(Maybe Text) + , _lvalPrettyPrint :: !Bool + , _lvalStartOffset :: !(Maybe Text) + , _lvalUserIp :: !(Maybe Text) + , _lvalLocale :: !(Maybe Text) + , _lvalContentVersion :: !Text + , _lvalShowDeleted :: !(Maybe Bool) + , _lvalVolumeAnnotationsVersion :: !(Maybe Text) + , _lvalUpdatedMax :: !(Maybe Text) + , _lvalKey :: !(Maybe Text) + , _lvalUpdatedMin :: !(Maybe Text) + , _lvalEndOffset :: !(Maybe Text) + , _lvalVolumeId :: !Text + , _lvalSource :: !(Maybe Text) + , _lvalPageToken :: !(Maybe Text) + , _lvalOauthToken :: !(Maybe Text) + , _lvalEndPosition :: !(Maybe Text) + , _lvalLayerId :: !Text + , _lvalMaxResults :: !(Maybe Word32) + , _lvalStartPosition :: !(Maybe Text) + , _lvalFields :: !(Maybe Text) + , _lvalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersVolumeAnnotationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lvalQuotaUser' +-- +-- * 'lvalPrettyPrint' +-- +-- * 'lvalStartOffset' +-- +-- * 'lvalUserIp' +-- +-- * 'lvalLocale' +-- +-- * 'lvalContentVersion' +-- +-- * 'lvalShowDeleted' +-- +-- * 'lvalVolumeAnnotationsVersion' +-- +-- * 'lvalUpdatedMax' +-- +-- * 'lvalKey' +-- +-- * 'lvalUpdatedMin' +-- +-- * 'lvalEndOffset' +-- +-- * 'lvalVolumeId' +-- +-- * 'lvalSource' +-- +-- * 'lvalPageToken' +-- +-- * 'lvalOauthToken' +-- +-- * 'lvalEndPosition' +-- +-- * 'lvalLayerId' +-- +-- * 'lvalMaxResults' +-- +-- * 'lvalStartPosition' +-- +-- * 'lvalFields' +-- +-- * 'lvalAlt' +layersVolumeAnnotationsList + :: Text -- ^ 'contentVersion' + -> Text -- ^ 'volumeId' + -> Text -- ^ 'layerId' + -> LayersVolumeAnnotationsList +layersVolumeAnnotationsList pLvalContentVersion_ pLvalVolumeId_ pLvalLayerId_ = + LayersVolumeAnnotationsList + { _lvalQuotaUser = Nothing + , _lvalPrettyPrint = True + , _lvalStartOffset = Nothing + , _lvalUserIp = Nothing + , _lvalLocale = Nothing + , _lvalContentVersion = pLvalContentVersion_ + , _lvalShowDeleted = Nothing + , _lvalVolumeAnnotationsVersion = Nothing + , _lvalUpdatedMax = Nothing + , _lvalKey = Nothing + , _lvalUpdatedMin = Nothing + , _lvalEndOffset = Nothing + , _lvalVolumeId = pLvalVolumeId_ + , _lvalSource = Nothing + , _lvalPageToken = Nothing + , _lvalOauthToken = Nothing + , _lvalEndPosition = Nothing + , _lvalLayerId = pLvalLayerId_ + , _lvalMaxResults = Nothing + , _lvalStartPosition = Nothing + , _lvalFields = Nothing + , _lvalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lvalQuotaUser :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalQuotaUser + = lens _lvalQuotaUser + (\ s a -> s{_lvalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lvalPrettyPrint :: Lens' LayersVolumeAnnotationsList' Bool +lvalPrettyPrint + = lens _lvalPrettyPrint + (\ s a -> s{_lvalPrettyPrint = a}) + +-- | The start offset to start retrieving data from. +lvalStartOffset :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalStartOffset + = lens _lvalStartOffset + (\ s a -> s{_lvalStartOffset = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lvalUserIp :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalUserIp + = lens _lvalUserIp (\ s a -> s{_lvalUserIp = a}) + +-- | The locale information for the data. ISO-639-1 language and ISO-3166-1 +-- country code. Ex: \'en_US\'. +lvalLocale :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalLocale + = lens _lvalLocale (\ s a -> s{_lvalLocale = a}) + +-- | The content version for the requested volume. +lvalContentVersion :: Lens' LayersVolumeAnnotationsList' Text +lvalContentVersion + = lens _lvalContentVersion + (\ s a -> s{_lvalContentVersion = a}) + +-- | Set to true to return deleted annotations. updatedMin must be in the +-- request to use this. Defaults to false. +lvalShowDeleted :: Lens' LayersVolumeAnnotationsList' (Maybe Bool) +lvalShowDeleted + = lens _lvalShowDeleted + (\ s a -> s{_lvalShowDeleted = a}) + +-- | The version of the volume annotations that you are requesting. +lvalVolumeAnnotationsVersion :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalVolumeAnnotationsVersion + = lens _lvalVolumeAnnotationsVersion + (\ s a -> s{_lvalVolumeAnnotationsVersion = a}) + +-- | RFC 3339 timestamp to restrict to items updated prior to this timestamp +-- (exclusive). +lvalUpdatedMax :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalUpdatedMax + = lens _lvalUpdatedMax + (\ s a -> s{_lvalUpdatedMax = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lvalKey :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalKey = lens _lvalKey (\ s a -> s{_lvalKey = a}) + +-- | RFC 3339 timestamp to restrict to items updated since this timestamp +-- (inclusive). +lvalUpdatedMin :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalUpdatedMin + = lens _lvalUpdatedMin + (\ s a -> s{_lvalUpdatedMin = a}) + +-- | The end offset to end retrieving data from. +lvalEndOffset :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalEndOffset + = lens _lvalEndOffset + (\ s a -> s{_lvalEndOffset = a}) + +-- | The volume to retrieve annotations for. +lvalVolumeId :: Lens' LayersVolumeAnnotationsList' Text +lvalVolumeId + = lens _lvalVolumeId (\ s a -> s{_lvalVolumeId = a}) + +-- | String to identify the originator of this request. +lvalSource :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalSource + = lens _lvalSource (\ s a -> s{_lvalSource = a}) + +-- | The value of the nextToken from the previous page. +lvalPageToken :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalPageToken + = lens _lvalPageToken + (\ s a -> s{_lvalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lvalOauthToken :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalOauthToken + = lens _lvalOauthToken + (\ s a -> s{_lvalOauthToken = a}) + +-- | The end position to end retrieving data from. +lvalEndPosition :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalEndPosition + = lens _lvalEndPosition + (\ s a -> s{_lvalEndPosition = a}) + +-- | The ID for the layer to get the annotations. +lvalLayerId :: Lens' LayersVolumeAnnotationsList' Text +lvalLayerId + = lens _lvalLayerId (\ s a -> s{_lvalLayerId = a}) + +-- | Maximum number of results to return +lvalMaxResults :: Lens' LayersVolumeAnnotationsList' (Maybe Word32) +lvalMaxResults + = lens _lvalMaxResults + (\ s a -> s{_lvalMaxResults = a}) + +-- | The start position to start retrieving data from. +lvalStartPosition :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalStartPosition + = lens _lvalStartPosition + (\ s a -> s{_lvalStartPosition = a}) + +-- | Selector specifying which fields to include in a partial response. +lvalFields :: Lens' LayersVolumeAnnotationsList' (Maybe Text) +lvalFields + = lens _lvalFields (\ s a -> s{_lvalFields = a}) + +-- | Data format for the response. +lvalAlt :: Lens' LayersVolumeAnnotationsList' Text +lvalAlt = lens _lvalAlt (\ s a -> s{_lvalAlt = a}) + +instance GoogleRequest LayersVolumeAnnotationsList' + where + type Rs LayersVolumeAnnotationsList' = + Volumeannotations + request = requestWithRoute defReq booksURL + requestWithRoute r u LayersVolumeAnnotationsList{..} + = go _lvalQuotaUser _lvalPrettyPrint _lvalStartOffset + _lvalUserIp + _lvalLocale + (Just _lvalContentVersion) + _lvalShowDeleted + _lvalVolumeAnnotationsVersion + _lvalUpdatedMax + _lvalKey + _lvalUpdatedMin + _lvalEndOffset + _lvalVolumeId + _lvalSource + _lvalPageToken + _lvalOauthToken + _lvalEndPosition + _lvalLayerId + _lvalMaxResults + _lvalStartPosition + _lvalFields + _lvalAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersVolumeAnnotationsListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Myconfig/GetUserSettings.hs b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/GetUserSettings.hs new file mode 100644 index 000000000..f24942be4 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/GetUserSettings.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Myconfig.GetUserSettings +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the current settings for the user. +-- +-- /See:/ for @BooksMyconfigGetUserSettings@. +module Books.Myconfig.GetUserSettings + ( + -- * REST Resource + MyconfigGetUserSettingsAPI + + -- * Creating a Request + , myconfigGetUserSettings + , MyconfigGetUserSettings + + -- * Request Lenses + , mgusQuotaUser + , mgusPrettyPrint + , mgusUserIp + , mgusKey + , mgusOauthToken + , mgusFields + , mgusAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMyconfigGetUserSettings@ which the +-- 'MyconfigGetUserSettings' request conforms to. +type MyconfigGetUserSettingsAPI = + "myconfig" :> + "getUserSettings" :> Get '[JSON] Usersettings + +-- | Gets the current settings for the user. +-- +-- /See:/ 'myconfigGetUserSettings' smart constructor. +data MyconfigGetUserSettings = MyconfigGetUserSettings + { _mgusQuotaUser :: !(Maybe Text) + , _mgusPrettyPrint :: !Bool + , _mgusUserIp :: !(Maybe Text) + , _mgusKey :: !(Maybe Text) + , _mgusOauthToken :: !(Maybe Text) + , _mgusFields :: !(Maybe Text) + , _mgusAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MyconfigGetUserSettings'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgusQuotaUser' +-- +-- * 'mgusPrettyPrint' +-- +-- * 'mgusUserIp' +-- +-- * 'mgusKey' +-- +-- * 'mgusOauthToken' +-- +-- * 'mgusFields' +-- +-- * 'mgusAlt' +myconfigGetUserSettings + :: MyconfigGetUserSettings +myconfigGetUserSettings = + MyconfigGetUserSettings + { _mgusQuotaUser = Nothing + , _mgusPrettyPrint = True + , _mgusUserIp = Nothing + , _mgusKey = Nothing + , _mgusOauthToken = Nothing + , _mgusFields = Nothing + , _mgusAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgusQuotaUser :: Lens' MyconfigGetUserSettings' (Maybe Text) +mgusQuotaUser + = lens _mgusQuotaUser + (\ s a -> s{_mgusQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgusPrettyPrint :: Lens' MyconfigGetUserSettings' Bool +mgusPrettyPrint + = lens _mgusPrettyPrint + (\ s a -> s{_mgusPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgusUserIp :: Lens' MyconfigGetUserSettings' (Maybe Text) +mgusUserIp + = lens _mgusUserIp (\ s a -> s{_mgusUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgusKey :: Lens' MyconfigGetUserSettings' (Maybe Text) +mgusKey = lens _mgusKey (\ s a -> s{_mgusKey = a}) + +-- | OAuth 2.0 token for the current user. +mgusOauthToken :: Lens' MyconfigGetUserSettings' (Maybe Text) +mgusOauthToken + = lens _mgusOauthToken + (\ s a -> s{_mgusOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgusFields :: Lens' MyconfigGetUserSettings' (Maybe Text) +mgusFields + = lens _mgusFields (\ s a -> s{_mgusFields = a}) + +-- | Data format for the response. +mgusAlt :: Lens' MyconfigGetUserSettings' Text +mgusAlt = lens _mgusAlt (\ s a -> s{_mgusAlt = a}) + +instance GoogleRequest MyconfigGetUserSettings' where + type Rs MyconfigGetUserSettings' = Usersettings + request = requestWithRoute defReq booksURL + requestWithRoute r u MyconfigGetUserSettings{..} + = go _mgusQuotaUser _mgusPrettyPrint _mgusUserIp + _mgusKey + _mgusOauthToken + _mgusFields + _mgusAlt + where go + = clientWithRoute + (Proxy :: Proxy MyconfigGetUserSettingsAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Myconfig/ReleaseDownloadAccess.hs b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/ReleaseDownloadAccess.hs new file mode 100644 index 000000000..f13c33bfd --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/ReleaseDownloadAccess.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Myconfig.ReleaseDownloadAccess +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Release downloaded content access restriction. +-- +-- /See:/ for @BooksMyconfigReleaseDownloadAccess@. +module Books.Myconfig.ReleaseDownloadAccess + ( + -- * REST Resource + MyconfigReleaseDownloadAccessAPI + + -- * Creating a Request + , myconfigReleaseDownloadAccess + , MyconfigReleaseDownloadAccess + + -- * Request Lenses + , mrdaQuotaUser + , mrdaPrettyPrint + , mrdaCpksver + , mrdaUserIp + , mrdaLocale + , mrdaVolumeIds + , mrdaKey + , mrdaSource + , mrdaOauthToken + , mrdaFields + , mrdaAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMyconfigReleaseDownloadAccess@ which the +-- 'MyconfigReleaseDownloadAccess' request conforms to. +type MyconfigReleaseDownloadAccessAPI = + "myconfig" :> + "releaseDownloadAccess" :> + QueryParam "cpksver" Text :> + QueryParam "locale" Text :> + QueryParams "volumeIds" Text :> + QueryParam "source" Text :> + Post '[JSON] DownloadAccesses + +-- | Release downloaded content access restriction. +-- +-- /See:/ 'myconfigReleaseDownloadAccess' smart constructor. +data MyconfigReleaseDownloadAccess = MyconfigReleaseDownloadAccess + { _mrdaQuotaUser :: !(Maybe Text) + , _mrdaPrettyPrint :: !Bool + , _mrdaCpksver :: !Text + , _mrdaUserIp :: !(Maybe Text) + , _mrdaLocale :: !(Maybe Text) + , _mrdaVolumeIds :: !Text + , _mrdaKey :: !(Maybe Text) + , _mrdaSource :: !(Maybe Text) + , _mrdaOauthToken :: !(Maybe Text) + , _mrdaFields :: !(Maybe Text) + , _mrdaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MyconfigReleaseDownloadAccess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mrdaQuotaUser' +-- +-- * 'mrdaPrettyPrint' +-- +-- * 'mrdaCpksver' +-- +-- * 'mrdaUserIp' +-- +-- * 'mrdaLocale' +-- +-- * 'mrdaVolumeIds' +-- +-- * 'mrdaKey' +-- +-- * 'mrdaSource' +-- +-- * 'mrdaOauthToken' +-- +-- * 'mrdaFields' +-- +-- * 'mrdaAlt' +myconfigReleaseDownloadAccess + :: Text -- ^ 'cpksver' + -> Text -- ^ 'volumeIds' + -> MyconfigReleaseDownloadAccess +myconfigReleaseDownloadAccess pMrdaCpksver_ pMrdaVolumeIds_ = + MyconfigReleaseDownloadAccess + { _mrdaQuotaUser = Nothing + , _mrdaPrettyPrint = True + , _mrdaCpksver = pMrdaCpksver_ + , _mrdaUserIp = Nothing + , _mrdaLocale = Nothing + , _mrdaVolumeIds = pMrdaVolumeIds_ + , _mrdaKey = Nothing + , _mrdaSource = Nothing + , _mrdaOauthToken = Nothing + , _mrdaFields = Nothing + , _mrdaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mrdaQuotaUser :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaQuotaUser + = lens _mrdaQuotaUser + (\ s a -> s{_mrdaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mrdaPrettyPrint :: Lens' MyconfigReleaseDownloadAccess' Bool +mrdaPrettyPrint + = lens _mrdaPrettyPrint + (\ s a -> s{_mrdaPrettyPrint = a}) + +-- | The device\/version ID from which to release the restriction. +mrdaCpksver :: Lens' MyconfigReleaseDownloadAccess' Text +mrdaCpksver + = lens _mrdaCpksver (\ s a -> s{_mrdaCpksver = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mrdaUserIp :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaUserIp + = lens _mrdaUserIp (\ s a -> s{_mrdaUserIp = a}) + +-- | ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +mrdaLocale :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaLocale + = lens _mrdaLocale (\ s a -> s{_mrdaLocale = a}) + +-- | The volume(s) to release restrictions for. +mrdaVolumeIds :: Lens' MyconfigReleaseDownloadAccess' Text +mrdaVolumeIds + = lens _mrdaVolumeIds + (\ s a -> s{_mrdaVolumeIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mrdaKey :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaKey = lens _mrdaKey (\ s a -> s{_mrdaKey = a}) + +-- | String to identify the originator of this request. +mrdaSource :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaSource + = lens _mrdaSource (\ s a -> s{_mrdaSource = a}) + +-- | OAuth 2.0 token for the current user. +mrdaOauthToken :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaOauthToken + = lens _mrdaOauthToken + (\ s a -> s{_mrdaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mrdaFields :: Lens' MyconfigReleaseDownloadAccess' (Maybe Text) +mrdaFields + = lens _mrdaFields (\ s a -> s{_mrdaFields = a}) + +-- | Data format for the response. +mrdaAlt :: Lens' MyconfigReleaseDownloadAccess' Text +mrdaAlt = lens _mrdaAlt (\ s a -> s{_mrdaAlt = a}) + +instance GoogleRequest MyconfigReleaseDownloadAccess' + where + type Rs MyconfigReleaseDownloadAccess' = + DownloadAccesses + request = requestWithRoute defReq booksURL + requestWithRoute r u + MyconfigReleaseDownloadAccess{..} + = go _mrdaQuotaUser _mrdaPrettyPrint + (Just _mrdaCpksver) + _mrdaUserIp + _mrdaLocale + (Just _mrdaVolumeIds) + _mrdaKey + _mrdaSource + _mrdaOauthToken + _mrdaFields + _mrdaAlt + where go + = clientWithRoute + (Proxy :: Proxy MyconfigReleaseDownloadAccessAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Myconfig/RequestAccess.hs b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/RequestAccess.hs new file mode 100644 index 000000000..9433295dd --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/RequestAccess.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Myconfig.RequestAccess +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Request concurrent and download access restrictions. +-- +-- /See:/ for @BooksMyconfigRequestAccess@. +module Books.Myconfig.RequestAccess + ( + -- * REST Resource + MyconfigRequestAccessAPI + + -- * Creating a Request + , myconfigRequestAccess + , MyconfigRequestAccess + + -- * Request Lenses + , mraQuotaUser + , mraPrettyPrint + , mraCpksver + , mraUserIp + , mraLocale + , mraLicenseTypes + , mraKey + , mraVolumeId + , mraSource + , mraOauthToken + , mraFields + , mraNonce + , mraAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMyconfigRequestAccess@ which the +-- 'MyconfigRequestAccess' request conforms to. +type MyconfigRequestAccessAPI = + "myconfig" :> + "requestAccess" :> + QueryParam "cpksver" Text :> + QueryParam "locale" Text :> + QueryParam "licenseTypes" Text :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> + QueryParam "nonce" Text :> Post '[JSON] RequestAccess + +-- | Request concurrent and download access restrictions. +-- +-- /See:/ 'myconfigRequestAccess' smart constructor. +data MyconfigRequestAccess = MyconfigRequestAccess + { _mraQuotaUser :: !(Maybe Text) + , _mraPrettyPrint :: !Bool + , _mraCpksver :: !Text + , _mraUserIp :: !(Maybe Text) + , _mraLocale :: !(Maybe Text) + , _mraLicenseTypes :: !(Maybe Text) + , _mraKey :: !(Maybe Text) + , _mraVolumeId :: !Text + , _mraSource :: !Text + , _mraOauthToken :: !(Maybe Text) + , _mraFields :: !(Maybe Text) + , _mraNonce :: !Text + , _mraAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MyconfigRequestAccess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mraQuotaUser' +-- +-- * 'mraPrettyPrint' +-- +-- * 'mraCpksver' +-- +-- * 'mraUserIp' +-- +-- * 'mraLocale' +-- +-- * 'mraLicenseTypes' +-- +-- * 'mraKey' +-- +-- * 'mraVolumeId' +-- +-- * 'mraSource' +-- +-- * 'mraOauthToken' +-- +-- * 'mraFields' +-- +-- * 'mraNonce' +-- +-- * 'mraAlt' +myconfigRequestAccess + :: Text -- ^ 'cpksver' + -> Text -- ^ 'volumeId' + -> Text -- ^ 'source' + -> Text -- ^ 'nonce' + -> MyconfigRequestAccess +myconfigRequestAccess pMraCpksver_ pMraVolumeId_ pMraSource_ pMraNonce_ = + MyconfigRequestAccess + { _mraQuotaUser = Nothing + , _mraPrettyPrint = True + , _mraCpksver = pMraCpksver_ + , _mraUserIp = Nothing + , _mraLocale = Nothing + , _mraLicenseTypes = Nothing + , _mraKey = Nothing + , _mraVolumeId = pMraVolumeId_ + , _mraSource = pMraSource_ + , _mraOauthToken = Nothing + , _mraFields = Nothing + , _mraNonce = pMraNonce_ + , _mraAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mraQuotaUser :: Lens' MyconfigRequestAccess' (Maybe Text) +mraQuotaUser + = lens _mraQuotaUser (\ s a -> s{_mraQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mraPrettyPrint :: Lens' MyconfigRequestAccess' Bool +mraPrettyPrint + = lens _mraPrettyPrint + (\ s a -> s{_mraPrettyPrint = a}) + +-- | The device\/version ID from which to request the restrictions. +mraCpksver :: Lens' MyconfigRequestAccess' Text +mraCpksver + = lens _mraCpksver (\ s a -> s{_mraCpksver = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mraUserIp :: Lens' MyconfigRequestAccess' (Maybe Text) +mraUserIp + = lens _mraUserIp (\ s a -> s{_mraUserIp = a}) + +-- | ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +mraLocale :: Lens' MyconfigRequestAccess' (Maybe Text) +mraLocale + = lens _mraLocale (\ s a -> s{_mraLocale = a}) + +-- | The type of access license to request. If not specified, the default is +-- BOTH. +mraLicenseTypes :: Lens' MyconfigRequestAccess' (Maybe Text) +mraLicenseTypes + = lens _mraLicenseTypes + (\ s a -> s{_mraLicenseTypes = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mraKey :: Lens' MyconfigRequestAccess' (Maybe Text) +mraKey = lens _mraKey (\ s a -> s{_mraKey = a}) + +-- | The volume to request concurrent\/download restrictions for. +mraVolumeId :: Lens' MyconfigRequestAccess' Text +mraVolumeId + = lens _mraVolumeId (\ s a -> s{_mraVolumeId = a}) + +-- | String to identify the originator of this request. +mraSource :: Lens' MyconfigRequestAccess' Text +mraSource + = lens _mraSource (\ s a -> s{_mraSource = a}) + +-- | OAuth 2.0 token for the current user. +mraOauthToken :: Lens' MyconfigRequestAccess' (Maybe Text) +mraOauthToken + = lens _mraOauthToken + (\ s a -> s{_mraOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mraFields :: Lens' MyconfigRequestAccess' (Maybe Text) +mraFields + = lens _mraFields (\ s a -> s{_mraFields = a}) + +-- | The client nonce value. +mraNonce :: Lens' MyconfigRequestAccess' Text +mraNonce = lens _mraNonce (\ s a -> s{_mraNonce = a}) + +-- | Data format for the response. +mraAlt :: Lens' MyconfigRequestAccess' Text +mraAlt = lens _mraAlt (\ s a -> s{_mraAlt = a}) + +instance GoogleRequest MyconfigRequestAccess' where + type Rs MyconfigRequestAccess' = RequestAccess + request = requestWithRoute defReq booksURL + requestWithRoute r u MyconfigRequestAccess{..} + = go _mraQuotaUser _mraPrettyPrint (Just _mraCpksver) + _mraUserIp + _mraLocale + _mraLicenseTypes + _mraKey + (Just _mraVolumeId) + (Just _mraSource) + _mraOauthToken + _mraFields + (Just _mraNonce) + _mraAlt + where go + = clientWithRoute + (Proxy :: Proxy MyconfigRequestAccessAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Myconfig/SyncVolumeLicenses.hs b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/SyncVolumeLicenses.hs new file mode 100644 index 000000000..400dbf97d --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/SyncVolumeLicenses.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Myconfig.SyncVolumeLicenses +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Request downloaded content access for specified volumes on the My eBooks +-- shelf. +-- +-- /See:/ for @BooksMyconfigSyncVolumeLicenses@. +module Books.Myconfig.SyncVolumeLicenses + ( + -- * REST Resource + MyconfigSyncVolumeLicensesAPI + + -- * Creating a Request + , myconfigSyncVolumeLicenses + , MyconfigSyncVolumeLicenses + + -- * Request Lenses + , msvlQuotaUser + , msvlPrettyPrint + , msvlCpksver + , msvlUserIp + , msvlLocale + , msvlVolumeIds + , msvlKey + , msvlFeatures + , msvlSource + , msvlOauthToken + , msvlShowPreorders + , msvlFields + , msvlNonce + , msvlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMyconfigSyncVolumeLicenses@ which the +-- 'MyconfigSyncVolumeLicenses' request conforms to. +type MyconfigSyncVolumeLicensesAPI = + "myconfig" :> + "syncVolumeLicenses" :> + QueryParam "cpksver" Text :> + QueryParam "locale" Text :> + QueryParams "volumeIds" Text :> + QueryParams "features" Text :> + QueryParam "source" Text :> + QueryParam "showPreorders" Bool :> + QueryParam "nonce" Text :> Post '[JSON] Volumes + +-- | Request downloaded content access for specified volumes on the My eBooks +-- shelf. +-- +-- /See:/ 'myconfigSyncVolumeLicenses' smart constructor. +data MyconfigSyncVolumeLicenses = MyconfigSyncVolumeLicenses + { _msvlQuotaUser :: !(Maybe Text) + , _msvlPrettyPrint :: !Bool + , _msvlCpksver :: !Text + , _msvlUserIp :: !(Maybe Text) + , _msvlLocale :: !(Maybe Text) + , _msvlVolumeIds :: !(Maybe Text) + , _msvlKey :: !(Maybe Text) + , _msvlFeatures :: !(Maybe Text) + , _msvlSource :: !Text + , _msvlOauthToken :: !(Maybe Text) + , _msvlShowPreorders :: !(Maybe Bool) + , _msvlFields :: !(Maybe Text) + , _msvlNonce :: !Text + , _msvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MyconfigSyncVolumeLicenses'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msvlQuotaUser' +-- +-- * 'msvlPrettyPrint' +-- +-- * 'msvlCpksver' +-- +-- * 'msvlUserIp' +-- +-- * 'msvlLocale' +-- +-- * 'msvlVolumeIds' +-- +-- * 'msvlKey' +-- +-- * 'msvlFeatures' +-- +-- * 'msvlSource' +-- +-- * 'msvlOauthToken' +-- +-- * 'msvlShowPreorders' +-- +-- * 'msvlFields' +-- +-- * 'msvlNonce' +-- +-- * 'msvlAlt' +myconfigSyncVolumeLicenses + :: Text -- ^ 'cpksver' + -> Text -- ^ 'source' + -> Text -- ^ 'nonce' + -> MyconfigSyncVolumeLicenses +myconfigSyncVolumeLicenses pMsvlCpksver_ pMsvlSource_ pMsvlNonce_ = + MyconfigSyncVolumeLicenses + { _msvlQuotaUser = Nothing + , _msvlPrettyPrint = True + , _msvlCpksver = pMsvlCpksver_ + , _msvlUserIp = Nothing + , _msvlLocale = Nothing + , _msvlVolumeIds = Nothing + , _msvlKey = Nothing + , _msvlFeatures = Nothing + , _msvlSource = pMsvlSource_ + , _msvlOauthToken = Nothing + , _msvlShowPreorders = Nothing + , _msvlFields = Nothing + , _msvlNonce = pMsvlNonce_ + , _msvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +msvlQuotaUser :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlQuotaUser + = lens _msvlQuotaUser + (\ s a -> s{_msvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +msvlPrettyPrint :: Lens' MyconfigSyncVolumeLicenses' Bool +msvlPrettyPrint + = lens _msvlPrettyPrint + (\ s a -> s{_msvlPrettyPrint = a}) + +-- | The device\/version ID from which to release the restriction. +msvlCpksver :: Lens' MyconfigSyncVolumeLicenses' Text +msvlCpksver + = lens _msvlCpksver (\ s a -> s{_msvlCpksver = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +msvlUserIp :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlUserIp + = lens _msvlUserIp (\ s a -> s{_msvlUserIp = a}) + +-- | ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. +msvlLocale :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlLocale + = lens _msvlLocale (\ s a -> s{_msvlLocale = a}) + +-- | The volume(s) to request download restrictions for. +msvlVolumeIds :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlVolumeIds + = lens _msvlVolumeIds + (\ s a -> s{_msvlVolumeIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +msvlKey :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlKey = lens _msvlKey (\ s a -> s{_msvlKey = a}) + +-- | List of features supported by the client, i.e., \'RENTALS\' +msvlFeatures :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlFeatures + = lens _msvlFeatures (\ s a -> s{_msvlFeatures = a}) + +-- | String to identify the originator of this request. +msvlSource :: Lens' MyconfigSyncVolumeLicenses' Text +msvlSource + = lens _msvlSource (\ s a -> s{_msvlSource = a}) + +-- | OAuth 2.0 token for the current user. +msvlOauthToken :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlOauthToken + = lens _msvlOauthToken + (\ s a -> s{_msvlOauthToken = a}) + +-- | Set to true to show pre-ordered books. Defaults to false. +msvlShowPreorders :: Lens' MyconfigSyncVolumeLicenses' (Maybe Bool) +msvlShowPreorders + = lens _msvlShowPreorders + (\ s a -> s{_msvlShowPreorders = a}) + +-- | Selector specifying which fields to include in a partial response. +msvlFields :: Lens' MyconfigSyncVolumeLicenses' (Maybe Text) +msvlFields + = lens _msvlFields (\ s a -> s{_msvlFields = a}) + +-- | The client nonce value. +msvlNonce :: Lens' MyconfigSyncVolumeLicenses' Text +msvlNonce + = lens _msvlNonce (\ s a -> s{_msvlNonce = a}) + +-- | Data format for the response. +msvlAlt :: Lens' MyconfigSyncVolumeLicenses' Text +msvlAlt = lens _msvlAlt (\ s a -> s{_msvlAlt = a}) + +instance GoogleRequest MyconfigSyncVolumeLicenses' + where + type Rs MyconfigSyncVolumeLicenses' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u MyconfigSyncVolumeLicenses{..} + = go _msvlQuotaUser _msvlPrettyPrint + (Just _msvlCpksver) + _msvlUserIp + _msvlLocale + _msvlVolumeIds + _msvlKey + _msvlFeatures + (Just _msvlSource) + _msvlOauthToken + _msvlShowPreorders + _msvlFields + (Just _msvlNonce) + _msvlAlt + where go + = clientWithRoute + (Proxy :: Proxy MyconfigSyncVolumeLicensesAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Myconfig/UpdateUserSettings.hs b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/UpdateUserSettings.hs new file mode 100644 index 000000000..70f390f8b --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Myconfig/UpdateUserSettings.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Myconfig.UpdateUserSettings +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the settings for the user. If a sub-object is specified, it will +-- overwrite the existing sub-object stored in the server. Unspecified +-- sub-objects will retain the existing value. +-- +-- /See:/ for @BooksMyconfigUpdateUserSettings@. +module Books.Myconfig.UpdateUserSettings + ( + -- * REST Resource + MyconfigUpdateUserSettingsAPI + + -- * Creating a Request + , myconfigUpdateUserSettings + , MyconfigUpdateUserSettings + + -- * Request Lenses + , muusQuotaUser + , muusPrettyPrint + , muusUserIp + , muusKey + , muusOauthToken + , muusFields + , muusAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMyconfigUpdateUserSettings@ which the +-- 'MyconfigUpdateUserSettings' request conforms to. +type MyconfigUpdateUserSettingsAPI = + "myconfig" :> + "updateUserSettings" :> Post '[JSON] Usersettings + +-- | Sets the settings for the user. If a sub-object is specified, it will +-- overwrite the existing sub-object stored in the server. Unspecified +-- sub-objects will retain the existing value. +-- +-- /See:/ 'myconfigUpdateUserSettings' smart constructor. +data MyconfigUpdateUserSettings = MyconfigUpdateUserSettings + { _muusQuotaUser :: !(Maybe Text) + , _muusPrettyPrint :: !Bool + , _muusUserIp :: !(Maybe Text) + , _muusKey :: !(Maybe Text) + , _muusOauthToken :: !(Maybe Text) + , _muusFields :: !(Maybe Text) + , _muusAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MyconfigUpdateUserSettings'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muusQuotaUser' +-- +-- * 'muusPrettyPrint' +-- +-- * 'muusUserIp' +-- +-- * 'muusKey' +-- +-- * 'muusOauthToken' +-- +-- * 'muusFields' +-- +-- * 'muusAlt' +myconfigUpdateUserSettings + :: MyconfigUpdateUserSettings +myconfigUpdateUserSettings = + MyconfigUpdateUserSettings + { _muusQuotaUser = Nothing + , _muusPrettyPrint = True + , _muusUserIp = Nothing + , _muusKey = Nothing + , _muusOauthToken = Nothing + , _muusFields = Nothing + , _muusAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muusQuotaUser :: Lens' MyconfigUpdateUserSettings' (Maybe Text) +muusQuotaUser + = lens _muusQuotaUser + (\ s a -> s{_muusQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +muusPrettyPrint :: Lens' MyconfigUpdateUserSettings' Bool +muusPrettyPrint + = lens _muusPrettyPrint + (\ s a -> s{_muusPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muusUserIp :: Lens' MyconfigUpdateUserSettings' (Maybe Text) +muusUserIp + = lens _muusUserIp (\ s a -> s{_muusUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muusKey :: Lens' MyconfigUpdateUserSettings' (Maybe Text) +muusKey = lens _muusKey (\ s a -> s{_muusKey = a}) + +-- | OAuth 2.0 token for the current user. +muusOauthToken :: Lens' MyconfigUpdateUserSettings' (Maybe Text) +muusOauthToken + = lens _muusOauthToken + (\ s a -> s{_muusOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +muusFields :: Lens' MyconfigUpdateUserSettings' (Maybe Text) +muusFields + = lens _muusFields (\ s a -> s{_muusFields = a}) + +-- | Data format for the response. +muusAlt :: Lens' MyconfigUpdateUserSettings' Text +muusAlt = lens _muusAlt (\ s a -> s{_muusAlt = a}) + +instance GoogleRequest MyconfigUpdateUserSettings' + where + type Rs MyconfigUpdateUserSettings' = Usersettings + request = requestWithRoute defReq booksURL + requestWithRoute r u MyconfigUpdateUserSettings{..} + = go _muusQuotaUser _muusPrettyPrint _muusUserIp + _muusKey + _muusOauthToken + _muusFields + _muusAlt + where go + = clientWithRoute + (Proxy :: Proxy MyconfigUpdateUserSettingsAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Delete.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Delete.hs new file mode 100644 index 000000000..95e6623f0 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Annotations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an annotation. +-- +-- /See:/ for @BooksMylibraryAnnotationsDelete@. +module Books.Mylibrary.Annotations.Delete + ( + -- * REST Resource + MylibraryAnnotationsDeleteAPI + + -- * Creating a Request + , mylibraryAnnotationsDelete + , MylibraryAnnotationsDelete + + -- * Request Lenses + , madQuotaUser + , madPrettyPrint + , madUserIp + , madKey + , madAnnotationId + , madSource + , madOauthToken + , madFields + , madAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryAnnotationsDelete@ which the +-- 'MylibraryAnnotationsDelete' request conforms to. +type MylibraryAnnotationsDeleteAPI = + "mylibrary" :> + "annotations" :> + Capture "annotationId" Text :> + QueryParam "source" Text :> Delete '[JSON] () + +-- | Deletes an annotation. +-- +-- /See:/ 'mylibraryAnnotationsDelete' smart constructor. +data MylibraryAnnotationsDelete = MylibraryAnnotationsDelete + { _madQuotaUser :: !(Maybe Text) + , _madPrettyPrint :: !Bool + , _madUserIp :: !(Maybe Text) + , _madKey :: !(Maybe Text) + , _madAnnotationId :: !Text + , _madSource :: !(Maybe Text) + , _madOauthToken :: !(Maybe Text) + , _madFields :: !(Maybe Text) + , _madAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryAnnotationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'madQuotaUser' +-- +-- * 'madPrettyPrint' +-- +-- * 'madUserIp' +-- +-- * 'madKey' +-- +-- * 'madAnnotationId' +-- +-- * 'madSource' +-- +-- * 'madOauthToken' +-- +-- * 'madFields' +-- +-- * 'madAlt' +mylibraryAnnotationsDelete + :: Text -- ^ 'annotationId' + -> MylibraryAnnotationsDelete +mylibraryAnnotationsDelete pMadAnnotationId_ = + MylibraryAnnotationsDelete + { _madQuotaUser = Nothing + , _madPrettyPrint = True + , _madUserIp = Nothing + , _madKey = Nothing + , _madAnnotationId = pMadAnnotationId_ + , _madSource = Nothing + , _madOauthToken = Nothing + , _madFields = Nothing + , _madAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +madQuotaUser :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madQuotaUser + = lens _madQuotaUser (\ s a -> s{_madQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +madPrettyPrint :: Lens' MylibraryAnnotationsDelete' Bool +madPrettyPrint + = lens _madPrettyPrint + (\ s a -> s{_madPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +madUserIp :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madUserIp + = lens _madUserIp (\ s a -> s{_madUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +madKey :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madKey = lens _madKey (\ s a -> s{_madKey = a}) + +-- | The ID for the annotation to delete. +madAnnotationId :: Lens' MylibraryAnnotationsDelete' Text +madAnnotationId + = lens _madAnnotationId + (\ s a -> s{_madAnnotationId = a}) + +-- | String to identify the originator of this request. +madSource :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madSource + = lens _madSource (\ s a -> s{_madSource = a}) + +-- | OAuth 2.0 token for the current user. +madOauthToken :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madOauthToken + = lens _madOauthToken + (\ s a -> s{_madOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +madFields :: Lens' MylibraryAnnotationsDelete' (Maybe Text) +madFields + = lens _madFields (\ s a -> s{_madFields = a}) + +-- | Data format for the response. +madAlt :: Lens' MylibraryAnnotationsDelete' Text +madAlt = lens _madAlt (\ s a -> s{_madAlt = a}) + +instance GoogleRequest MylibraryAnnotationsDelete' + where + type Rs MylibraryAnnotationsDelete' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryAnnotationsDelete{..} + = go _madQuotaUser _madPrettyPrint _madUserIp _madKey + _madAnnotationId + _madSource + _madOauthToken + _madFields + _madAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryAnnotationsDeleteAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Insert.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Insert.hs new file mode 100644 index 000000000..6f968634c --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Insert.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Annotations.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new annotation. +-- +-- /See:/ for @BooksMylibraryAnnotationsInsert@. +module Books.Mylibrary.Annotations.Insert + ( + -- * REST Resource + MylibraryAnnotationsInsertAPI + + -- * Creating a Request + , mylibraryAnnotationsInsert + , MylibraryAnnotationsInsert + + -- * Request Lenses + , maiQuotaUser + , maiPrettyPrint + , maiCountry + , maiUserIp + , maiKey + , maiShowOnlySummaryInResponse + , maiSource + , maiOauthToken + , maiFields + , maiAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryAnnotationsInsert@ which the +-- 'MylibraryAnnotationsInsert' request conforms to. +type MylibraryAnnotationsInsertAPI = + "mylibrary" :> + "annotations" :> + QueryParam "country" Text :> + QueryParam "showOnlySummaryInResponse" Bool :> + QueryParam "source" Text :> Post '[JSON] Annotation + +-- | Inserts a new annotation. +-- +-- /See:/ 'mylibraryAnnotationsInsert' smart constructor. +data MylibraryAnnotationsInsert = MylibraryAnnotationsInsert + { _maiQuotaUser :: !(Maybe Text) + , _maiPrettyPrint :: !Bool + , _maiCountry :: !(Maybe Text) + , _maiUserIp :: !(Maybe Text) + , _maiKey :: !(Maybe Text) + , _maiShowOnlySummaryInResponse :: !(Maybe Bool) + , _maiSource :: !(Maybe Text) + , _maiOauthToken :: !(Maybe Text) + , _maiFields :: !(Maybe Text) + , _maiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryAnnotationsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'maiQuotaUser' +-- +-- * 'maiPrettyPrint' +-- +-- * 'maiCountry' +-- +-- * 'maiUserIp' +-- +-- * 'maiKey' +-- +-- * 'maiShowOnlySummaryInResponse' +-- +-- * 'maiSource' +-- +-- * 'maiOauthToken' +-- +-- * 'maiFields' +-- +-- * 'maiAlt' +mylibraryAnnotationsInsert + :: MylibraryAnnotationsInsert +mylibraryAnnotationsInsert = + MylibraryAnnotationsInsert + { _maiQuotaUser = Nothing + , _maiPrettyPrint = True + , _maiCountry = Nothing + , _maiUserIp = Nothing + , _maiKey = Nothing + , _maiShowOnlySummaryInResponse = Nothing + , _maiSource = Nothing + , _maiOauthToken = Nothing + , _maiFields = Nothing + , _maiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +maiQuotaUser :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiQuotaUser + = lens _maiQuotaUser (\ s a -> s{_maiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +maiPrettyPrint :: Lens' MylibraryAnnotationsInsert' Bool +maiPrettyPrint + = lens _maiPrettyPrint + (\ s a -> s{_maiPrettyPrint = a}) + +-- | ISO-3166-1 code to override the IP-based location. +maiCountry :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiCountry + = lens _maiCountry (\ s a -> s{_maiCountry = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +maiUserIp :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiUserIp + = lens _maiUserIp (\ s a -> s{_maiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +maiKey :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiKey = lens _maiKey (\ s a -> s{_maiKey = a}) + +-- | Requests that only the summary of the specified layer be provided in the +-- response. +maiShowOnlySummaryInResponse :: Lens' MylibraryAnnotationsInsert' (Maybe Bool) +maiShowOnlySummaryInResponse + = lens _maiShowOnlySummaryInResponse + (\ s a -> s{_maiShowOnlySummaryInResponse = a}) + +-- | String to identify the originator of this request. +maiSource :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiSource + = lens _maiSource (\ s a -> s{_maiSource = a}) + +-- | OAuth 2.0 token for the current user. +maiOauthToken :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiOauthToken + = lens _maiOauthToken + (\ s a -> s{_maiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +maiFields :: Lens' MylibraryAnnotationsInsert' (Maybe Text) +maiFields + = lens _maiFields (\ s a -> s{_maiFields = a}) + +-- | Data format for the response. +maiAlt :: Lens' MylibraryAnnotationsInsert' Text +maiAlt = lens _maiAlt (\ s a -> s{_maiAlt = a}) + +instance GoogleRequest MylibraryAnnotationsInsert' + where + type Rs MylibraryAnnotationsInsert' = Annotation + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryAnnotationsInsert{..} + = go _maiQuotaUser _maiPrettyPrint _maiCountry + _maiUserIp + _maiKey + _maiShowOnlySummaryInResponse + _maiSource + _maiOauthToken + _maiFields + _maiAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryAnnotationsInsertAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/List.hs new file mode 100644 index 000000000..dd8bd6962 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/List.hs @@ -0,0 +1,276 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Annotations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of annotations, possibly filtered. +-- +-- /See:/ for @BooksMylibraryAnnotationsList@. +module Books.Mylibrary.Annotations.List + ( + -- * REST Resource + MylibraryAnnotationsListAPI + + -- * Creating a Request + , mylibraryAnnotationsList + , MylibraryAnnotationsList + + -- * Request Lenses + , malQuotaUser + , malPrettyPrint + , malUserIp + , malContentVersion + , malShowDeleted + , malUpdatedMax + , malKey + , malUpdatedMin + , malLayerIds + , malVolumeId + , malSource + , malPageToken + , malOauthToken + , malLayerId + , malMaxResults + , malFields + , malAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryAnnotationsList@ which the +-- 'MylibraryAnnotationsList' request conforms to. +type MylibraryAnnotationsListAPI = + "mylibrary" :> + "annotations" :> + QueryParam "contentVersion" Text :> + QueryParam "showDeleted" Bool :> + QueryParam "updatedMax" Text :> + QueryParam "updatedMin" Text :> + QueryParams "layerIds" Text :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> + QueryParam "pageToken" Text :> + QueryParam "layerId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] Annotations + +-- | Retrieves a list of annotations, possibly filtered. +-- +-- /See:/ 'mylibraryAnnotationsList' smart constructor. +data MylibraryAnnotationsList = MylibraryAnnotationsList + { _malQuotaUser :: !(Maybe Text) + , _malPrettyPrint :: !Bool + , _malUserIp :: !(Maybe Text) + , _malContentVersion :: !(Maybe Text) + , _malShowDeleted :: !(Maybe Bool) + , _malUpdatedMax :: !(Maybe Text) + , _malKey :: !(Maybe Text) + , _malUpdatedMin :: !(Maybe Text) + , _malLayerIds :: !(Maybe Text) + , _malVolumeId :: !(Maybe Text) + , _malSource :: !(Maybe Text) + , _malPageToken :: !(Maybe Text) + , _malOauthToken :: !(Maybe Text) + , _malLayerId :: !(Maybe Text) + , _malMaxResults :: !(Maybe Word32) + , _malFields :: !(Maybe Text) + , _malAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryAnnotationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'malQuotaUser' +-- +-- * 'malPrettyPrint' +-- +-- * 'malUserIp' +-- +-- * 'malContentVersion' +-- +-- * 'malShowDeleted' +-- +-- * 'malUpdatedMax' +-- +-- * 'malKey' +-- +-- * 'malUpdatedMin' +-- +-- * 'malLayerIds' +-- +-- * 'malVolumeId' +-- +-- * 'malSource' +-- +-- * 'malPageToken' +-- +-- * 'malOauthToken' +-- +-- * 'malLayerId' +-- +-- * 'malMaxResults' +-- +-- * 'malFields' +-- +-- * 'malAlt' +mylibraryAnnotationsList + :: MylibraryAnnotationsList +mylibraryAnnotationsList = + MylibraryAnnotationsList + { _malQuotaUser = Nothing + , _malPrettyPrint = True + , _malUserIp = Nothing + , _malContentVersion = Nothing + , _malShowDeleted = Nothing + , _malUpdatedMax = Nothing + , _malKey = Nothing + , _malUpdatedMin = Nothing + , _malLayerIds = Nothing + , _malVolumeId = Nothing + , _malSource = Nothing + , _malPageToken = Nothing + , _malOauthToken = Nothing + , _malLayerId = Nothing + , _malMaxResults = Nothing + , _malFields = Nothing + , _malAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +malQuotaUser :: Lens' MylibraryAnnotationsList' (Maybe Text) +malQuotaUser + = lens _malQuotaUser (\ s a -> s{_malQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +malPrettyPrint :: Lens' MylibraryAnnotationsList' Bool +malPrettyPrint + = lens _malPrettyPrint + (\ s a -> s{_malPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +malUserIp :: Lens' MylibraryAnnotationsList' (Maybe Text) +malUserIp + = lens _malUserIp (\ s a -> s{_malUserIp = a}) + +-- | The content version for the requested volume. +malContentVersion :: Lens' MylibraryAnnotationsList' (Maybe Text) +malContentVersion + = lens _malContentVersion + (\ s a -> s{_malContentVersion = a}) + +-- | Set to true to return deleted annotations. updatedMin must be in the +-- request to use this. Defaults to false. +malShowDeleted :: Lens' MylibraryAnnotationsList' (Maybe Bool) +malShowDeleted + = lens _malShowDeleted + (\ s a -> s{_malShowDeleted = a}) + +-- | RFC 3339 timestamp to restrict to items updated prior to this timestamp +-- (exclusive). +malUpdatedMax :: Lens' MylibraryAnnotationsList' (Maybe Text) +malUpdatedMax + = lens _malUpdatedMax + (\ s a -> s{_malUpdatedMax = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +malKey :: Lens' MylibraryAnnotationsList' (Maybe Text) +malKey = lens _malKey (\ s a -> s{_malKey = a}) + +-- | RFC 3339 timestamp to restrict to items updated since this timestamp +-- (inclusive). +malUpdatedMin :: Lens' MylibraryAnnotationsList' (Maybe Text) +malUpdatedMin + = lens _malUpdatedMin + (\ s a -> s{_malUpdatedMin = a}) + +-- | The layer ID(s) to limit annotation by. +malLayerIds :: Lens' MylibraryAnnotationsList' (Maybe Text) +malLayerIds + = lens _malLayerIds (\ s a -> s{_malLayerIds = a}) + +-- | The volume to restrict annotations to. +malVolumeId :: Lens' MylibraryAnnotationsList' (Maybe Text) +malVolumeId + = lens _malVolumeId (\ s a -> s{_malVolumeId = a}) + +-- | String to identify the originator of this request. +malSource :: Lens' MylibraryAnnotationsList' (Maybe Text) +malSource + = lens _malSource (\ s a -> s{_malSource = a}) + +-- | The value of the nextToken from the previous page. +malPageToken :: Lens' MylibraryAnnotationsList' (Maybe Text) +malPageToken + = lens _malPageToken (\ s a -> s{_malPageToken = a}) + +-- | OAuth 2.0 token for the current user. +malOauthToken :: Lens' MylibraryAnnotationsList' (Maybe Text) +malOauthToken + = lens _malOauthToken + (\ s a -> s{_malOauthToken = a}) + +-- | The layer ID to limit annotation by. +malLayerId :: Lens' MylibraryAnnotationsList' (Maybe Text) +malLayerId + = lens _malLayerId (\ s a -> s{_malLayerId = a}) + +-- | Maximum number of results to return +malMaxResults :: Lens' MylibraryAnnotationsList' (Maybe Word32) +malMaxResults + = lens _malMaxResults + (\ s a -> s{_malMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +malFields :: Lens' MylibraryAnnotationsList' (Maybe Text) +malFields + = lens _malFields (\ s a -> s{_malFields = a}) + +-- | Data format for the response. +malAlt :: Lens' MylibraryAnnotationsList' Text +malAlt = lens _malAlt (\ s a -> s{_malAlt = a}) + +instance GoogleRequest MylibraryAnnotationsList' + where + type Rs MylibraryAnnotationsList' = Annotations + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryAnnotationsList{..} + = go _malQuotaUser _malPrettyPrint _malUserIp + _malContentVersion + _malShowDeleted + _malUpdatedMax + _malKey + _malUpdatedMin + _malLayerIds + _malVolumeId + _malSource + _malPageToken + _malOauthToken + _malLayerId + _malMaxResults + _malFields + _malAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryAnnotationsListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Summary.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Summary.hs new file mode 100644 index 000000000..8ffcb0a8f --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Summary.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Annotations.Summary +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the summary of specified layers. +-- +-- /See:/ for @BooksMylibraryAnnotationsSummary@. +module Books.Mylibrary.Annotations.Summary + ( + -- * REST Resource + MylibraryAnnotationsSummaryAPI + + -- * Creating a Request + , mylibraryAnnotationsSummary + , MylibraryAnnotationsSummary + + -- * Request Lenses + , masQuotaUser + , masPrettyPrint + , masUserIp + , masKey + , masLayerIds + , masVolumeId + , masOauthToken + , masFields + , masAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryAnnotationsSummary@ which the +-- 'MylibraryAnnotationsSummary' request conforms to. +type MylibraryAnnotationsSummaryAPI = + "mylibrary" :> + "annotations" :> + "summary" :> + QueryParams "layerIds" Text :> + QueryParam "volumeId" Text :> + Post '[JSON] AnnotationsSummary + +-- | Gets the summary of specified layers. +-- +-- /See:/ 'mylibraryAnnotationsSummary' smart constructor. +data MylibraryAnnotationsSummary = MylibraryAnnotationsSummary + { _masQuotaUser :: !(Maybe Text) + , _masPrettyPrint :: !Bool + , _masUserIp :: !(Maybe Text) + , _masKey :: !(Maybe Text) + , _masLayerIds :: !Text + , _masVolumeId :: !Text + , _masOauthToken :: !(Maybe Text) + , _masFields :: !(Maybe Text) + , _masAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryAnnotationsSummary'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'masQuotaUser' +-- +-- * 'masPrettyPrint' +-- +-- * 'masUserIp' +-- +-- * 'masKey' +-- +-- * 'masLayerIds' +-- +-- * 'masVolumeId' +-- +-- * 'masOauthToken' +-- +-- * 'masFields' +-- +-- * 'masAlt' +mylibraryAnnotationsSummary + :: Text -- ^ 'layerIds' + -> Text -- ^ 'volumeId' + -> MylibraryAnnotationsSummary +mylibraryAnnotationsSummary pMasLayerIds_ pMasVolumeId_ = + MylibraryAnnotationsSummary + { _masQuotaUser = Nothing + , _masPrettyPrint = True + , _masUserIp = Nothing + , _masKey = Nothing + , _masLayerIds = pMasLayerIds_ + , _masVolumeId = pMasVolumeId_ + , _masOauthToken = Nothing + , _masFields = Nothing + , _masAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +masQuotaUser :: Lens' MylibraryAnnotationsSummary' (Maybe Text) +masQuotaUser + = lens _masQuotaUser (\ s a -> s{_masQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +masPrettyPrint :: Lens' MylibraryAnnotationsSummary' Bool +masPrettyPrint + = lens _masPrettyPrint + (\ s a -> s{_masPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +masUserIp :: Lens' MylibraryAnnotationsSummary' (Maybe Text) +masUserIp + = lens _masUserIp (\ s a -> s{_masUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +masKey :: Lens' MylibraryAnnotationsSummary' (Maybe Text) +masKey = lens _masKey (\ s a -> s{_masKey = a}) + +-- | Array of layer IDs to get the summary for. +masLayerIds :: Lens' MylibraryAnnotationsSummary' Text +masLayerIds + = lens _masLayerIds (\ s a -> s{_masLayerIds = a}) + +-- | Volume id to get the summary for. +masVolumeId :: Lens' MylibraryAnnotationsSummary' Text +masVolumeId + = lens _masVolumeId (\ s a -> s{_masVolumeId = a}) + +-- | OAuth 2.0 token for the current user. +masOauthToken :: Lens' MylibraryAnnotationsSummary' (Maybe Text) +masOauthToken + = lens _masOauthToken + (\ s a -> s{_masOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +masFields :: Lens' MylibraryAnnotationsSummary' (Maybe Text) +masFields + = lens _masFields (\ s a -> s{_masFields = a}) + +-- | Data format for the response. +masAlt :: Lens' MylibraryAnnotationsSummary' Text +masAlt = lens _masAlt (\ s a -> s{_masAlt = a}) + +instance GoogleRequest MylibraryAnnotationsSummary' + where + type Rs MylibraryAnnotationsSummary' = + AnnotationsSummary + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryAnnotationsSummary{..} + = go _masQuotaUser _masPrettyPrint _masUserIp _masKey + (Just _masLayerIds) + (Just _masVolumeId) + _masOauthToken + _masFields + _masAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryAnnotationsSummaryAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Update.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Update.hs new file mode 100644 index 000000000..b7755f875 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Annotations/Update.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Annotations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing annotation. +-- +-- /See:/ for @BooksMylibraryAnnotationsUpdate@. +module Books.Mylibrary.Annotations.Update + ( + -- * REST Resource + MylibraryAnnotationsUpdateAPI + + -- * Creating a Request + , mylibraryAnnotationsUpdate + , MylibraryAnnotationsUpdate + + -- * Request Lenses + , mauQuotaUser + , mauPrettyPrint + , mauUserIp + , mauKey + , mauAnnotationId + , mauSource + , mauOauthToken + , mauFields + , mauAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryAnnotationsUpdate@ which the +-- 'MylibraryAnnotationsUpdate' request conforms to. +type MylibraryAnnotationsUpdateAPI = + "mylibrary" :> + "annotations" :> + Capture "annotationId" Text :> + QueryParam "source" Text :> Put '[JSON] Annotation + +-- | Updates an existing annotation. +-- +-- /See:/ 'mylibraryAnnotationsUpdate' smart constructor. +data MylibraryAnnotationsUpdate = MylibraryAnnotationsUpdate + { _mauQuotaUser :: !(Maybe Text) + , _mauPrettyPrint :: !Bool + , _mauUserIp :: !(Maybe Text) + , _mauKey :: !(Maybe Text) + , _mauAnnotationId :: !Text + , _mauSource :: !(Maybe Text) + , _mauOauthToken :: !(Maybe Text) + , _mauFields :: !(Maybe Text) + , _mauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryAnnotationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mauQuotaUser' +-- +-- * 'mauPrettyPrint' +-- +-- * 'mauUserIp' +-- +-- * 'mauKey' +-- +-- * 'mauAnnotationId' +-- +-- * 'mauSource' +-- +-- * 'mauOauthToken' +-- +-- * 'mauFields' +-- +-- * 'mauAlt' +mylibraryAnnotationsUpdate + :: Text -- ^ 'annotationId' + -> MylibraryAnnotationsUpdate +mylibraryAnnotationsUpdate pMauAnnotationId_ = + MylibraryAnnotationsUpdate + { _mauQuotaUser = Nothing + , _mauPrettyPrint = True + , _mauUserIp = Nothing + , _mauKey = Nothing + , _mauAnnotationId = pMauAnnotationId_ + , _mauSource = Nothing + , _mauOauthToken = Nothing + , _mauFields = Nothing + , _mauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mauQuotaUser :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauQuotaUser + = lens _mauQuotaUser (\ s a -> s{_mauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mauPrettyPrint :: Lens' MylibraryAnnotationsUpdate' Bool +mauPrettyPrint + = lens _mauPrettyPrint + (\ s a -> s{_mauPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mauUserIp :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauUserIp + = lens _mauUserIp (\ s a -> s{_mauUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mauKey :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauKey = lens _mauKey (\ s a -> s{_mauKey = a}) + +-- | The ID for the annotation to update. +mauAnnotationId :: Lens' MylibraryAnnotationsUpdate' Text +mauAnnotationId + = lens _mauAnnotationId + (\ s a -> s{_mauAnnotationId = a}) + +-- | String to identify the originator of this request. +mauSource :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauSource + = lens _mauSource (\ s a -> s{_mauSource = a}) + +-- | OAuth 2.0 token for the current user. +mauOauthToken :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauOauthToken + = lens _mauOauthToken + (\ s a -> s{_mauOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mauFields :: Lens' MylibraryAnnotationsUpdate' (Maybe Text) +mauFields + = lens _mauFields (\ s a -> s{_mauFields = a}) + +-- | Data format for the response. +mauAlt :: Lens' MylibraryAnnotationsUpdate' Text +mauAlt = lens _mauAlt (\ s a -> s{_mauAlt = a}) + +instance GoogleRequest MylibraryAnnotationsUpdate' + where + type Rs MylibraryAnnotationsUpdate' = Annotation + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryAnnotationsUpdate{..} + = go _mauQuotaUser _mauPrettyPrint _mauUserIp _mauKey + _mauAnnotationId + _mauSource + _mauOauthToken + _mauFields + _mauAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryAnnotationsUpdateAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/AddVolume.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/AddVolume.hs new file mode 100644 index 000000000..3a72bd00e --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/AddVolume.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.AddVolume +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a volume to a bookshelf. +-- +-- /See:/ for @BooksMylibraryBookshelvesAddVolume@. +module Books.Mylibrary.Bookshelves.AddVolume + ( + -- * REST Resource + MylibraryBookshelvesAddVolumeAPI + + -- * Creating a Request + , mylibraryBookshelvesAddVolume + , MylibraryBookshelvesAddVolume + + -- * Request Lenses + , mbavQuotaUser + , mbavPrettyPrint + , mbavUserIp + , mbavReason + , mbavShelf + , mbavKey + , mbavVolumeId + , mbavSource + , mbavOauthToken + , mbavFields + , mbavAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesAddVolume@ which the +-- 'MylibraryBookshelvesAddVolume' request conforms to. +type MylibraryBookshelvesAddVolumeAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + "addVolume" :> + QueryParam "reason" Text :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> Post '[JSON] () + +-- | Adds a volume to a bookshelf. +-- +-- /See:/ 'mylibraryBookshelvesAddVolume' smart constructor. +data MylibraryBookshelvesAddVolume = MylibraryBookshelvesAddVolume + { _mbavQuotaUser :: !(Maybe Text) + , _mbavPrettyPrint :: !Bool + , _mbavUserIp :: !(Maybe Text) + , _mbavReason :: !(Maybe Text) + , _mbavShelf :: !Text + , _mbavKey :: !(Maybe Text) + , _mbavVolumeId :: !Text + , _mbavSource :: !(Maybe Text) + , _mbavOauthToken :: !(Maybe Text) + , _mbavFields :: !(Maybe Text) + , _mbavAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesAddVolume'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbavQuotaUser' +-- +-- * 'mbavPrettyPrint' +-- +-- * 'mbavUserIp' +-- +-- * 'mbavReason' +-- +-- * 'mbavShelf' +-- +-- * 'mbavKey' +-- +-- * 'mbavVolumeId' +-- +-- * 'mbavSource' +-- +-- * 'mbavOauthToken' +-- +-- * 'mbavFields' +-- +-- * 'mbavAlt' +mylibraryBookshelvesAddVolume + :: Text -- ^ 'shelf' + -> Text -- ^ 'volumeId' + -> MylibraryBookshelvesAddVolume +mylibraryBookshelvesAddVolume pMbavShelf_ pMbavVolumeId_ = + MylibraryBookshelvesAddVolume + { _mbavQuotaUser = Nothing + , _mbavPrettyPrint = True + , _mbavUserIp = Nothing + , _mbavReason = Nothing + , _mbavShelf = pMbavShelf_ + , _mbavKey = Nothing + , _mbavVolumeId = pMbavVolumeId_ + , _mbavSource = Nothing + , _mbavOauthToken = Nothing + , _mbavFields = Nothing + , _mbavAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbavQuotaUser :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavQuotaUser + = lens _mbavQuotaUser + (\ s a -> s{_mbavQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbavPrettyPrint :: Lens' MylibraryBookshelvesAddVolume' Bool +mbavPrettyPrint + = lens _mbavPrettyPrint + (\ s a -> s{_mbavPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbavUserIp :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavUserIp + = lens _mbavUserIp (\ s a -> s{_mbavUserIp = a}) + +-- | The reason for which the book is added to the library. +mbavReason :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavReason + = lens _mbavReason (\ s a -> s{_mbavReason = a}) + +-- | ID of bookshelf to which to add a volume. +mbavShelf :: Lens' MylibraryBookshelvesAddVolume' Text +mbavShelf + = lens _mbavShelf (\ s a -> s{_mbavShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbavKey :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavKey = lens _mbavKey (\ s a -> s{_mbavKey = a}) + +-- | ID of volume to add. +mbavVolumeId :: Lens' MylibraryBookshelvesAddVolume' Text +mbavVolumeId + = lens _mbavVolumeId (\ s a -> s{_mbavVolumeId = a}) + +-- | String to identify the originator of this request. +mbavSource :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavSource + = lens _mbavSource (\ s a -> s{_mbavSource = a}) + +-- | OAuth 2.0 token for the current user. +mbavOauthToken :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavOauthToken + = lens _mbavOauthToken + (\ s a -> s{_mbavOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mbavFields :: Lens' MylibraryBookshelvesAddVolume' (Maybe Text) +mbavFields + = lens _mbavFields (\ s a -> s{_mbavFields = a}) + +-- | Data format for the response. +mbavAlt :: Lens' MylibraryBookshelvesAddVolume' Text +mbavAlt = lens _mbavAlt (\ s a -> s{_mbavAlt = a}) + +instance GoogleRequest MylibraryBookshelvesAddVolume' + where + type Rs MylibraryBookshelvesAddVolume' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryBookshelvesAddVolume{..} + = go _mbavQuotaUser _mbavPrettyPrint _mbavUserIp + _mbavReason + _mbavShelf + _mbavKey + (Just _mbavVolumeId) + _mbavSource + _mbavOauthToken + _mbavFields + _mbavAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesAddVolumeAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/ClearVolumes.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/ClearVolumes.hs new file mode 100644 index 000000000..2dee4889a --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/ClearVolumes.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.ClearVolumes +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Clears all volumes from a bookshelf. +-- +-- /See:/ for @BooksMylibraryBookshelvesClearVolumes@. +module Books.Mylibrary.Bookshelves.ClearVolumes + ( + -- * REST Resource + MylibraryBookshelvesClearVolumesAPI + + -- * Creating a Request + , mylibraryBookshelvesClearVolumes + , MylibraryBookshelvesClearVolumes + + -- * Request Lenses + , mbcvQuotaUser + , mbcvPrettyPrint + , mbcvUserIp + , mbcvShelf + , mbcvKey + , mbcvSource + , mbcvOauthToken + , mbcvFields + , mbcvAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesClearVolumes@ which the +-- 'MylibraryBookshelvesClearVolumes' request conforms to. +type MylibraryBookshelvesClearVolumesAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + "clearVolumes" :> + QueryParam "source" Text :> Post '[JSON] () + +-- | Clears all volumes from a bookshelf. +-- +-- /See:/ 'mylibraryBookshelvesClearVolumes' smart constructor. +data MylibraryBookshelvesClearVolumes = MylibraryBookshelvesClearVolumes + { _mbcvQuotaUser :: !(Maybe Text) + , _mbcvPrettyPrint :: !Bool + , _mbcvUserIp :: !(Maybe Text) + , _mbcvShelf :: !Text + , _mbcvKey :: !(Maybe Text) + , _mbcvSource :: !(Maybe Text) + , _mbcvOauthToken :: !(Maybe Text) + , _mbcvFields :: !(Maybe Text) + , _mbcvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesClearVolumes'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbcvQuotaUser' +-- +-- * 'mbcvPrettyPrint' +-- +-- * 'mbcvUserIp' +-- +-- * 'mbcvShelf' +-- +-- * 'mbcvKey' +-- +-- * 'mbcvSource' +-- +-- * 'mbcvOauthToken' +-- +-- * 'mbcvFields' +-- +-- * 'mbcvAlt' +mylibraryBookshelvesClearVolumes + :: Text -- ^ 'shelf' + -> MylibraryBookshelvesClearVolumes +mylibraryBookshelvesClearVolumes pMbcvShelf_ = + MylibraryBookshelvesClearVolumes + { _mbcvQuotaUser = Nothing + , _mbcvPrettyPrint = True + , _mbcvUserIp = Nothing + , _mbcvShelf = pMbcvShelf_ + , _mbcvKey = Nothing + , _mbcvSource = Nothing + , _mbcvOauthToken = Nothing + , _mbcvFields = Nothing + , _mbcvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbcvQuotaUser :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvQuotaUser + = lens _mbcvQuotaUser + (\ s a -> s{_mbcvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbcvPrettyPrint :: Lens' MylibraryBookshelvesClearVolumes' Bool +mbcvPrettyPrint + = lens _mbcvPrettyPrint + (\ s a -> s{_mbcvPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbcvUserIp :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvUserIp + = lens _mbcvUserIp (\ s a -> s{_mbcvUserIp = a}) + +-- | ID of bookshelf from which to remove a volume. +mbcvShelf :: Lens' MylibraryBookshelvesClearVolumes' Text +mbcvShelf + = lens _mbcvShelf (\ s a -> s{_mbcvShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbcvKey :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvKey = lens _mbcvKey (\ s a -> s{_mbcvKey = a}) + +-- | String to identify the originator of this request. +mbcvSource :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvSource + = lens _mbcvSource (\ s a -> s{_mbcvSource = a}) + +-- | OAuth 2.0 token for the current user. +mbcvOauthToken :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvOauthToken + = lens _mbcvOauthToken + (\ s a -> s{_mbcvOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mbcvFields :: Lens' MylibraryBookshelvesClearVolumes' (Maybe Text) +mbcvFields + = lens _mbcvFields (\ s a -> s{_mbcvFields = a}) + +-- | Data format for the response. +mbcvAlt :: Lens' MylibraryBookshelvesClearVolumes' Text +mbcvAlt = lens _mbcvAlt (\ s a -> s{_mbcvAlt = a}) + +instance GoogleRequest + MylibraryBookshelvesClearVolumes' where + type Rs MylibraryBookshelvesClearVolumes' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryBookshelvesClearVolumes{..} + = go _mbcvQuotaUser _mbcvPrettyPrint _mbcvUserIp + _mbcvShelf + _mbcvKey + _mbcvSource + _mbcvOauthToken + _mbcvFields + _mbcvAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesClearVolumesAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Get.hs new file mode 100644 index 000000000..958552ba7 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves metadata for a specific bookshelf belonging to the +-- authenticated user. +-- +-- /See:/ for @BooksMylibraryBookshelvesGet@. +module Books.Mylibrary.Bookshelves.Get + ( + -- * REST Resource + MylibraryBookshelvesGetAPI + + -- * Creating a Request + , mylibraryBookshelvesGet + , MylibraryBookshelvesGet + + -- * Request Lenses + , mbgQuotaUser + , mbgPrettyPrint + , mbgUserIp + , mbgShelf + , mbgKey + , mbgSource + , mbgOauthToken + , mbgFields + , mbgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesGet@ which the +-- 'MylibraryBookshelvesGet' request conforms to. +type MylibraryBookshelvesGetAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + QueryParam "source" Text :> Get '[JSON] Bookshelf + +-- | Retrieves metadata for a specific bookshelf belonging to the +-- authenticated user. +-- +-- /See:/ 'mylibraryBookshelvesGet' smart constructor. +data MylibraryBookshelvesGet = MylibraryBookshelvesGet + { _mbgQuotaUser :: !(Maybe Text) + , _mbgPrettyPrint :: !Bool + , _mbgUserIp :: !(Maybe Text) + , _mbgShelf :: !Text + , _mbgKey :: !(Maybe Text) + , _mbgSource :: !(Maybe Text) + , _mbgOauthToken :: !(Maybe Text) + , _mbgFields :: !(Maybe Text) + , _mbgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbgQuotaUser' +-- +-- * 'mbgPrettyPrint' +-- +-- * 'mbgUserIp' +-- +-- * 'mbgShelf' +-- +-- * 'mbgKey' +-- +-- * 'mbgSource' +-- +-- * 'mbgOauthToken' +-- +-- * 'mbgFields' +-- +-- * 'mbgAlt' +mylibraryBookshelvesGet + :: Text -- ^ 'shelf' + -> MylibraryBookshelvesGet +mylibraryBookshelvesGet pMbgShelf_ = + MylibraryBookshelvesGet + { _mbgQuotaUser = Nothing + , _mbgPrettyPrint = True + , _mbgUserIp = Nothing + , _mbgShelf = pMbgShelf_ + , _mbgKey = Nothing + , _mbgSource = Nothing + , _mbgOauthToken = Nothing + , _mbgFields = Nothing + , _mbgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbgQuotaUser :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgQuotaUser + = lens _mbgQuotaUser (\ s a -> s{_mbgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbgPrettyPrint :: Lens' MylibraryBookshelvesGet' Bool +mbgPrettyPrint + = lens _mbgPrettyPrint + (\ s a -> s{_mbgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbgUserIp :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgUserIp + = lens _mbgUserIp (\ s a -> s{_mbgUserIp = a}) + +-- | ID of bookshelf to retrieve. +mbgShelf :: Lens' MylibraryBookshelvesGet' Text +mbgShelf = lens _mbgShelf (\ s a -> s{_mbgShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbgKey :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgKey = lens _mbgKey (\ s a -> s{_mbgKey = a}) + +-- | String to identify the originator of this request. +mbgSource :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgSource + = lens _mbgSource (\ s a -> s{_mbgSource = a}) + +-- | OAuth 2.0 token for the current user. +mbgOauthToken :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgOauthToken + = lens _mbgOauthToken + (\ s a -> s{_mbgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mbgFields :: Lens' MylibraryBookshelvesGet' (Maybe Text) +mbgFields + = lens _mbgFields (\ s a -> s{_mbgFields = a}) + +-- | Data format for the response. +mbgAlt :: Lens' MylibraryBookshelvesGet' Text +mbgAlt = lens _mbgAlt (\ s a -> s{_mbgAlt = a}) + +instance GoogleRequest MylibraryBookshelvesGet' where + type Rs MylibraryBookshelvesGet' = Bookshelf + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryBookshelvesGet{..} + = go _mbgQuotaUser _mbgPrettyPrint _mbgUserIp + _mbgShelf + _mbgKey + _mbgSource + _mbgOauthToken + _mbgFields + _mbgAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesGetAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/List.hs new file mode 100644 index 000000000..1dffab00d --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of bookshelves belonging to the authenticated user. +-- +-- /See:/ for @BooksMylibraryBookshelvesList@. +module Books.Mylibrary.Bookshelves.List + ( + -- * REST Resource + MylibraryBookshelvesListAPI + + -- * Creating a Request + , mylibraryBookshelvesList + , MylibraryBookshelvesList + + -- * Request Lenses + , mblQuotaUser + , mblPrettyPrint + , mblUserIp + , mblKey + , mblSource + , mblOauthToken + , mblFields + , mblAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesList@ which the +-- 'MylibraryBookshelvesList' request conforms to. +type MylibraryBookshelvesListAPI = + "mylibrary" :> + "bookshelves" :> + QueryParam "source" Text :> Get '[JSON] Bookshelves + +-- | Retrieves a list of bookshelves belonging to the authenticated user. +-- +-- /See:/ 'mylibraryBookshelvesList' smart constructor. +data MylibraryBookshelvesList = MylibraryBookshelvesList + { _mblQuotaUser :: !(Maybe Text) + , _mblPrettyPrint :: !Bool + , _mblUserIp :: !(Maybe Text) + , _mblKey :: !(Maybe Text) + , _mblSource :: !(Maybe Text) + , _mblOauthToken :: !(Maybe Text) + , _mblFields :: !(Maybe Text) + , _mblAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mblQuotaUser' +-- +-- * 'mblPrettyPrint' +-- +-- * 'mblUserIp' +-- +-- * 'mblKey' +-- +-- * 'mblSource' +-- +-- * 'mblOauthToken' +-- +-- * 'mblFields' +-- +-- * 'mblAlt' +mylibraryBookshelvesList + :: MylibraryBookshelvesList +mylibraryBookshelvesList = + MylibraryBookshelvesList + { _mblQuotaUser = Nothing + , _mblPrettyPrint = True + , _mblUserIp = Nothing + , _mblKey = Nothing + , _mblSource = Nothing + , _mblOauthToken = Nothing + , _mblFields = Nothing + , _mblAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mblQuotaUser :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblQuotaUser + = lens _mblQuotaUser (\ s a -> s{_mblQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mblPrettyPrint :: Lens' MylibraryBookshelvesList' Bool +mblPrettyPrint + = lens _mblPrettyPrint + (\ s a -> s{_mblPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mblUserIp :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblUserIp + = lens _mblUserIp (\ s a -> s{_mblUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mblKey :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblKey = lens _mblKey (\ s a -> s{_mblKey = a}) + +-- | String to identify the originator of this request. +mblSource :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblSource + = lens _mblSource (\ s a -> s{_mblSource = a}) + +-- | OAuth 2.0 token for the current user. +mblOauthToken :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblOauthToken + = lens _mblOauthToken + (\ s a -> s{_mblOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mblFields :: Lens' MylibraryBookshelvesList' (Maybe Text) +mblFields + = lens _mblFields (\ s a -> s{_mblFields = a}) + +-- | Data format for the response. +mblAlt :: Lens' MylibraryBookshelvesList' Text +mblAlt = lens _mblAlt (\ s a -> s{_mblAlt = a}) + +instance GoogleRequest MylibraryBookshelvesList' + where + type Rs MylibraryBookshelvesList' = Bookshelves + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryBookshelvesList{..} + = go _mblQuotaUser _mblPrettyPrint _mblUserIp _mblKey + _mblSource + _mblOauthToken + _mblFields + _mblAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/MoveVolume.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/MoveVolume.hs new file mode 100644 index 000000000..304e60abf --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/MoveVolume.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.MoveVolume +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves a volume within a bookshelf. +-- +-- /See:/ for @BooksMylibraryBookshelvesMoveVolume@. +module Books.Mylibrary.Bookshelves.MoveVolume + ( + -- * REST Resource + MylibraryBookshelvesMoveVolumeAPI + + -- * Creating a Request + , mylibraryBookshelvesMoveVolume + , MylibraryBookshelvesMoveVolume + + -- * Request Lenses + , mbmvQuotaUser + , mbmvPrettyPrint + , mbmvUserIp + , mbmvShelf + , mbmvKey + , mbmvVolumeId + , mbmvSource + , mbmvOauthToken + , mbmvVolumePosition + , mbmvFields + , mbmvAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesMoveVolume@ which the +-- 'MylibraryBookshelvesMoveVolume' request conforms to. +type MylibraryBookshelvesMoveVolumeAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + "moveVolume" :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> + QueryParam "volumePosition" Int32 :> Post '[JSON] () + +-- | Moves a volume within a bookshelf. +-- +-- /See:/ 'mylibraryBookshelvesMoveVolume' smart constructor. +data MylibraryBookshelvesMoveVolume = MylibraryBookshelvesMoveVolume + { _mbmvQuotaUser :: !(Maybe Text) + , _mbmvPrettyPrint :: !Bool + , _mbmvUserIp :: !(Maybe Text) + , _mbmvShelf :: !Text + , _mbmvKey :: !(Maybe Text) + , _mbmvVolumeId :: !Text + , _mbmvSource :: !(Maybe Text) + , _mbmvOauthToken :: !(Maybe Text) + , _mbmvVolumePosition :: !Int32 + , _mbmvFields :: !(Maybe Text) + , _mbmvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesMoveVolume'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbmvQuotaUser' +-- +-- * 'mbmvPrettyPrint' +-- +-- * 'mbmvUserIp' +-- +-- * 'mbmvShelf' +-- +-- * 'mbmvKey' +-- +-- * 'mbmvVolumeId' +-- +-- * 'mbmvSource' +-- +-- * 'mbmvOauthToken' +-- +-- * 'mbmvVolumePosition' +-- +-- * 'mbmvFields' +-- +-- * 'mbmvAlt' +mylibraryBookshelvesMoveVolume + :: Text -- ^ 'shelf' + -> Text -- ^ 'volumeId' + -> Int32 -- ^ 'volumePosition' + -> MylibraryBookshelvesMoveVolume +mylibraryBookshelvesMoveVolume pMbmvShelf_ pMbmvVolumeId_ pMbmvVolumePosition_ = + MylibraryBookshelvesMoveVolume + { _mbmvQuotaUser = Nothing + , _mbmvPrettyPrint = True + , _mbmvUserIp = Nothing + , _mbmvShelf = pMbmvShelf_ + , _mbmvKey = Nothing + , _mbmvVolumeId = pMbmvVolumeId_ + , _mbmvSource = Nothing + , _mbmvOauthToken = Nothing + , _mbmvVolumePosition = pMbmvVolumePosition_ + , _mbmvFields = Nothing + , _mbmvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbmvQuotaUser :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvQuotaUser + = lens _mbmvQuotaUser + (\ s a -> s{_mbmvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbmvPrettyPrint :: Lens' MylibraryBookshelvesMoveVolume' Bool +mbmvPrettyPrint + = lens _mbmvPrettyPrint + (\ s a -> s{_mbmvPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbmvUserIp :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvUserIp + = lens _mbmvUserIp (\ s a -> s{_mbmvUserIp = a}) + +-- | ID of bookshelf with the volume. +mbmvShelf :: Lens' MylibraryBookshelvesMoveVolume' Text +mbmvShelf + = lens _mbmvShelf (\ s a -> s{_mbmvShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbmvKey :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvKey = lens _mbmvKey (\ s a -> s{_mbmvKey = a}) + +-- | ID of volume to move. +mbmvVolumeId :: Lens' MylibraryBookshelvesMoveVolume' Text +mbmvVolumeId + = lens _mbmvVolumeId (\ s a -> s{_mbmvVolumeId = a}) + +-- | String to identify the originator of this request. +mbmvSource :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvSource + = lens _mbmvSource (\ s a -> s{_mbmvSource = a}) + +-- | OAuth 2.0 token for the current user. +mbmvOauthToken :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvOauthToken + = lens _mbmvOauthToken + (\ s a -> s{_mbmvOauthToken = a}) + +-- | Position on shelf to move the item (0 puts the item before the current +-- first item, 1 puts it between the first and the second and so on.) +mbmvVolumePosition :: Lens' MylibraryBookshelvesMoveVolume' Int32 +mbmvVolumePosition + = lens _mbmvVolumePosition + (\ s a -> s{_mbmvVolumePosition = a}) + +-- | Selector specifying which fields to include in a partial response. +mbmvFields :: Lens' MylibraryBookshelvesMoveVolume' (Maybe Text) +mbmvFields + = lens _mbmvFields (\ s a -> s{_mbmvFields = a}) + +-- | Data format for the response. +mbmvAlt :: Lens' MylibraryBookshelvesMoveVolume' Text +mbmvAlt = lens _mbmvAlt (\ s a -> s{_mbmvAlt = a}) + +instance GoogleRequest + MylibraryBookshelvesMoveVolume' where + type Rs MylibraryBookshelvesMoveVolume' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryBookshelvesMoveVolume{..} + = go _mbmvQuotaUser _mbmvPrettyPrint _mbmvUserIp + _mbmvShelf + _mbmvKey + (Just _mbmvVolumeId) + _mbmvSource + _mbmvOauthToken + (Just _mbmvVolumePosition) + _mbmvFields + _mbmvAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesMoveVolumeAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/RemoveVolume.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/RemoveVolume.hs new file mode 100644 index 000000000..f11c48ce4 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/RemoveVolume.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.RemoveVolume +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a volume from a bookshelf. +-- +-- /See:/ for @BooksMylibraryBookshelvesRemoveVolume@. +module Books.Mylibrary.Bookshelves.RemoveVolume + ( + -- * REST Resource + MylibraryBookshelvesRemoveVolumeAPI + + -- * Creating a Request + , mylibraryBookshelvesRemoveVolume + , MylibraryBookshelvesRemoveVolume + + -- * Request Lenses + , mbrvQuotaUser + , mbrvPrettyPrint + , mbrvUserIp + , mbrvReason + , mbrvShelf + , mbrvKey + , mbrvVolumeId + , mbrvSource + , mbrvOauthToken + , mbrvFields + , mbrvAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesRemoveVolume@ which the +-- 'MylibraryBookshelvesRemoveVolume' request conforms to. +type MylibraryBookshelvesRemoveVolumeAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + "removeVolume" :> + QueryParam "reason" Text :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> Post '[JSON] () + +-- | Removes a volume from a bookshelf. +-- +-- /See:/ 'mylibraryBookshelvesRemoveVolume' smart constructor. +data MylibraryBookshelvesRemoveVolume = MylibraryBookshelvesRemoveVolume + { _mbrvQuotaUser :: !(Maybe Text) + , _mbrvPrettyPrint :: !Bool + , _mbrvUserIp :: !(Maybe Text) + , _mbrvReason :: !(Maybe Text) + , _mbrvShelf :: !Text + , _mbrvKey :: !(Maybe Text) + , _mbrvVolumeId :: !Text + , _mbrvSource :: !(Maybe Text) + , _mbrvOauthToken :: !(Maybe Text) + , _mbrvFields :: !(Maybe Text) + , _mbrvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesRemoveVolume'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbrvQuotaUser' +-- +-- * 'mbrvPrettyPrint' +-- +-- * 'mbrvUserIp' +-- +-- * 'mbrvReason' +-- +-- * 'mbrvShelf' +-- +-- * 'mbrvKey' +-- +-- * 'mbrvVolumeId' +-- +-- * 'mbrvSource' +-- +-- * 'mbrvOauthToken' +-- +-- * 'mbrvFields' +-- +-- * 'mbrvAlt' +mylibraryBookshelvesRemoveVolume + :: Text -- ^ 'shelf' + -> Text -- ^ 'volumeId' + -> MylibraryBookshelvesRemoveVolume +mylibraryBookshelvesRemoveVolume pMbrvShelf_ pMbrvVolumeId_ = + MylibraryBookshelvesRemoveVolume + { _mbrvQuotaUser = Nothing + , _mbrvPrettyPrint = True + , _mbrvUserIp = Nothing + , _mbrvReason = Nothing + , _mbrvShelf = pMbrvShelf_ + , _mbrvKey = Nothing + , _mbrvVolumeId = pMbrvVolumeId_ + , _mbrvSource = Nothing + , _mbrvOauthToken = Nothing + , _mbrvFields = Nothing + , _mbrvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbrvQuotaUser :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvQuotaUser + = lens _mbrvQuotaUser + (\ s a -> s{_mbrvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbrvPrettyPrint :: Lens' MylibraryBookshelvesRemoveVolume' Bool +mbrvPrettyPrint + = lens _mbrvPrettyPrint + (\ s a -> s{_mbrvPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbrvUserIp :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvUserIp + = lens _mbrvUserIp (\ s a -> s{_mbrvUserIp = a}) + +-- | The reason for which the book is removed from the library. +mbrvReason :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvReason + = lens _mbrvReason (\ s a -> s{_mbrvReason = a}) + +-- | ID of bookshelf from which to remove a volume. +mbrvShelf :: Lens' MylibraryBookshelvesRemoveVolume' Text +mbrvShelf + = lens _mbrvShelf (\ s a -> s{_mbrvShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbrvKey :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvKey = lens _mbrvKey (\ s a -> s{_mbrvKey = a}) + +-- | ID of volume to remove. +mbrvVolumeId :: Lens' MylibraryBookshelvesRemoveVolume' Text +mbrvVolumeId + = lens _mbrvVolumeId (\ s a -> s{_mbrvVolumeId = a}) + +-- | String to identify the originator of this request. +mbrvSource :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvSource + = lens _mbrvSource (\ s a -> s{_mbrvSource = a}) + +-- | OAuth 2.0 token for the current user. +mbrvOauthToken :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvOauthToken + = lens _mbrvOauthToken + (\ s a -> s{_mbrvOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mbrvFields :: Lens' MylibraryBookshelvesRemoveVolume' (Maybe Text) +mbrvFields + = lens _mbrvFields (\ s a -> s{_mbrvFields = a}) + +-- | Data format for the response. +mbrvAlt :: Lens' MylibraryBookshelvesRemoveVolume' Text +mbrvAlt = lens _mbrvAlt (\ s a -> s{_mbrvAlt = a}) + +instance GoogleRequest + MylibraryBookshelvesRemoveVolume' where + type Rs MylibraryBookshelvesRemoveVolume' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryBookshelvesRemoveVolume{..} + = go _mbrvQuotaUser _mbrvPrettyPrint _mbrvUserIp + _mbrvReason + _mbrvShelf + _mbrvKey + (Just _mbrvVolumeId) + _mbrvSource + _mbrvOauthToken + _mbrvFields + _mbrvAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesRemoveVolumeAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Volumes/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Volumes/List.hs new file mode 100644 index 000000000..339a0ac89 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Bookshelves/Volumes/List.hs @@ -0,0 +1,251 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Bookshelves.Volumes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets volume information for volumes on a bookshelf. +-- +-- /See:/ for @BooksMylibraryBookshelvesVolumesList@. +module Books.Mylibrary.Bookshelves.Volumes.List + ( + -- * REST Resource + MylibraryBookshelvesVolumesListAPI + + -- * Creating a Request + , mylibraryBookshelvesVolumesList + , MylibraryBookshelvesVolumesList + + -- * Request Lenses + , mbvlQuotaUser + , mbvlPrettyPrint + , mbvlCountry + , mbvlUserIp + , mbvlQ + , mbvlShelf + , mbvlKey + , mbvlSource + , mbvlProjection + , mbvlOauthToken + , mbvlStartIndex + , mbvlMaxResults + , mbvlShowPreorders + , mbvlFields + , mbvlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryBookshelvesVolumesList@ which the +-- 'MylibraryBookshelvesVolumesList' request conforms to. +type MylibraryBookshelvesVolumesListAPI = + "mylibrary" :> + "bookshelves" :> + Capture "shelf" Text :> + "volumes" :> + QueryParam "country" Text :> + QueryParam "q" Text :> + QueryParam "source" Text :> + QueryParam "projection" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + QueryParam "showPreorders" Bool :> + Get '[JSON] Volumes + +-- | Gets volume information for volumes on a bookshelf. +-- +-- /See:/ 'mylibraryBookshelvesVolumesList' smart constructor. +data MylibraryBookshelvesVolumesList = MylibraryBookshelvesVolumesList + { _mbvlQuotaUser :: !(Maybe Text) + , _mbvlPrettyPrint :: !Bool + , _mbvlCountry :: !(Maybe Text) + , _mbvlUserIp :: !(Maybe Text) + , _mbvlQ :: !(Maybe Text) + , _mbvlShelf :: !Text + , _mbvlKey :: !(Maybe Text) + , _mbvlSource :: !(Maybe Text) + , _mbvlProjection :: !(Maybe Text) + , _mbvlOauthToken :: !(Maybe Text) + , _mbvlStartIndex :: !(Maybe Word32) + , _mbvlMaxResults :: !(Maybe Word32) + , _mbvlShowPreorders :: !(Maybe Bool) + , _mbvlFields :: !(Maybe Text) + , _mbvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryBookshelvesVolumesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mbvlQuotaUser' +-- +-- * 'mbvlPrettyPrint' +-- +-- * 'mbvlCountry' +-- +-- * 'mbvlUserIp' +-- +-- * 'mbvlQ' +-- +-- * 'mbvlShelf' +-- +-- * 'mbvlKey' +-- +-- * 'mbvlSource' +-- +-- * 'mbvlProjection' +-- +-- * 'mbvlOauthToken' +-- +-- * 'mbvlStartIndex' +-- +-- * 'mbvlMaxResults' +-- +-- * 'mbvlShowPreorders' +-- +-- * 'mbvlFields' +-- +-- * 'mbvlAlt' +mylibraryBookshelvesVolumesList + :: Text -- ^ 'shelf' + -> MylibraryBookshelvesVolumesList +mylibraryBookshelvesVolumesList pMbvlShelf_ = + MylibraryBookshelvesVolumesList + { _mbvlQuotaUser = Nothing + , _mbvlPrettyPrint = True + , _mbvlCountry = Nothing + , _mbvlUserIp = Nothing + , _mbvlQ = Nothing + , _mbvlShelf = pMbvlShelf_ + , _mbvlKey = Nothing + , _mbvlSource = Nothing + , _mbvlProjection = Nothing + , _mbvlOauthToken = Nothing + , _mbvlStartIndex = Nothing + , _mbvlMaxResults = Nothing + , _mbvlShowPreorders = Nothing + , _mbvlFields = Nothing + , _mbvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mbvlQuotaUser :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlQuotaUser + = lens _mbvlQuotaUser + (\ s a -> s{_mbvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mbvlPrettyPrint :: Lens' MylibraryBookshelvesVolumesList' Bool +mbvlPrettyPrint + = lens _mbvlPrettyPrint + (\ s a -> s{_mbvlPrettyPrint = a}) + +-- | ISO-3166-1 code to override the IP-based location. +mbvlCountry :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlCountry + = lens _mbvlCountry (\ s a -> s{_mbvlCountry = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mbvlUserIp :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlUserIp + = lens _mbvlUserIp (\ s a -> s{_mbvlUserIp = a}) + +-- | Full-text search query string in this bookshelf. +mbvlQ :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlQ = lens _mbvlQ (\ s a -> s{_mbvlQ = a}) + +-- | The bookshelf ID or name retrieve volumes for. +mbvlShelf :: Lens' MylibraryBookshelvesVolumesList' Text +mbvlShelf + = lens _mbvlShelf (\ s a -> s{_mbvlShelf = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mbvlKey :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlKey = lens _mbvlKey (\ s a -> s{_mbvlKey = a}) + +-- | String to identify the originator of this request. +mbvlSource :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlSource + = lens _mbvlSource (\ s a -> s{_mbvlSource = a}) + +-- | Restrict information returned to a set of selected fields. +mbvlProjection :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlProjection + = lens _mbvlProjection + (\ s a -> s{_mbvlProjection = a}) + +-- | OAuth 2.0 token for the current user. +mbvlOauthToken :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlOauthToken + = lens _mbvlOauthToken + (\ s a -> s{_mbvlOauthToken = a}) + +-- | Index of the first element to return (starts at 0) +mbvlStartIndex :: Lens' MylibraryBookshelvesVolumesList' (Maybe Word32) +mbvlStartIndex + = lens _mbvlStartIndex + (\ s a -> s{_mbvlStartIndex = a}) + +-- | Maximum number of results to return +mbvlMaxResults :: Lens' MylibraryBookshelvesVolumesList' (Maybe Word32) +mbvlMaxResults + = lens _mbvlMaxResults + (\ s a -> s{_mbvlMaxResults = a}) + +-- | Set to true to show pre-ordered books. Defaults to false. +mbvlShowPreorders :: Lens' MylibraryBookshelvesVolumesList' (Maybe Bool) +mbvlShowPreorders + = lens _mbvlShowPreorders + (\ s a -> s{_mbvlShowPreorders = a}) + +-- | Selector specifying which fields to include in a partial response. +mbvlFields :: Lens' MylibraryBookshelvesVolumesList' (Maybe Text) +mbvlFields + = lens _mbvlFields (\ s a -> s{_mbvlFields = a}) + +-- | Data format for the response. +mbvlAlt :: Lens' MylibraryBookshelvesVolumesList' Text +mbvlAlt = lens _mbvlAlt (\ s a -> s{_mbvlAlt = a}) + +instance GoogleRequest + MylibraryBookshelvesVolumesList' where + type Rs MylibraryBookshelvesVolumesList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryBookshelvesVolumesList{..} + = go _mbvlQuotaUser _mbvlPrettyPrint _mbvlCountry + _mbvlUserIp + _mbvlQ + _mbvlShelf + _mbvlKey + _mbvlSource + _mbvlProjection + _mbvlOauthToken + _mbvlStartIndex + _mbvlMaxResults + _mbvlShowPreorders + _mbvlFields + _mbvlAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryBookshelvesVolumesListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/Get.hs new file mode 100644 index 000000000..d5baa0102 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Readingpositions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves my reading position information for a volume. +-- +-- /See:/ for @BooksMylibraryReadingpositionsGet@. +module Books.Mylibrary.Readingpositions.Get + ( + -- * REST Resource + MylibraryReadingpositionsGetAPI + + -- * Creating a Request + , mylibraryReadingpositionsGet + , MylibraryReadingpositionsGet + + -- * Request Lenses + , mrgQuotaUser + , mrgPrettyPrint + , mrgUserIp + , mrgContentVersion + , mrgKey + , mrgVolumeId + , mrgSource + , mrgOauthToken + , mrgFields + , mrgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryReadingpositionsGet@ which the +-- 'MylibraryReadingpositionsGet' request conforms to. +type MylibraryReadingpositionsGetAPI = + "mylibrary" :> + "readingpositions" :> + Capture "volumeId" Text :> + QueryParam "contentVersion" Text :> + QueryParam "source" Text :> + Get '[JSON] ReadingPosition + +-- | Retrieves my reading position information for a volume. +-- +-- /See:/ 'mylibraryReadingpositionsGet' smart constructor. +data MylibraryReadingpositionsGet = MylibraryReadingpositionsGet + { _mrgQuotaUser :: !(Maybe Text) + , _mrgPrettyPrint :: !Bool + , _mrgUserIp :: !(Maybe Text) + , _mrgContentVersion :: !(Maybe Text) + , _mrgKey :: !(Maybe Text) + , _mrgVolumeId :: !Text + , _mrgSource :: !(Maybe Text) + , _mrgOauthToken :: !(Maybe Text) + , _mrgFields :: !(Maybe Text) + , _mrgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryReadingpositionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mrgQuotaUser' +-- +-- * 'mrgPrettyPrint' +-- +-- * 'mrgUserIp' +-- +-- * 'mrgContentVersion' +-- +-- * 'mrgKey' +-- +-- * 'mrgVolumeId' +-- +-- * 'mrgSource' +-- +-- * 'mrgOauthToken' +-- +-- * 'mrgFields' +-- +-- * 'mrgAlt' +mylibraryReadingpositionsGet + :: Text -- ^ 'volumeId' + -> MylibraryReadingpositionsGet +mylibraryReadingpositionsGet pMrgVolumeId_ = + MylibraryReadingpositionsGet + { _mrgQuotaUser = Nothing + , _mrgPrettyPrint = True + , _mrgUserIp = Nothing + , _mrgContentVersion = Nothing + , _mrgKey = Nothing + , _mrgVolumeId = pMrgVolumeId_ + , _mrgSource = Nothing + , _mrgOauthToken = Nothing + , _mrgFields = Nothing + , _mrgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mrgQuotaUser :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgQuotaUser + = lens _mrgQuotaUser (\ s a -> s{_mrgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mrgPrettyPrint :: Lens' MylibraryReadingpositionsGet' Bool +mrgPrettyPrint + = lens _mrgPrettyPrint + (\ s a -> s{_mrgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mrgUserIp :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgUserIp + = lens _mrgUserIp (\ s a -> s{_mrgUserIp = a}) + +-- | Volume content version for which this reading position is requested. +mrgContentVersion :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgContentVersion + = lens _mrgContentVersion + (\ s a -> s{_mrgContentVersion = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mrgKey :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgKey = lens _mrgKey (\ s a -> s{_mrgKey = a}) + +-- | ID of volume for which to retrieve a reading position. +mrgVolumeId :: Lens' MylibraryReadingpositionsGet' Text +mrgVolumeId + = lens _mrgVolumeId (\ s a -> s{_mrgVolumeId = a}) + +-- | String to identify the originator of this request. +mrgSource :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgSource + = lens _mrgSource (\ s a -> s{_mrgSource = a}) + +-- | OAuth 2.0 token for the current user. +mrgOauthToken :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgOauthToken + = lens _mrgOauthToken + (\ s a -> s{_mrgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mrgFields :: Lens' MylibraryReadingpositionsGet' (Maybe Text) +mrgFields + = lens _mrgFields (\ s a -> s{_mrgFields = a}) + +-- | Data format for the response. +mrgAlt :: Lens' MylibraryReadingpositionsGet' Text +mrgAlt = lens _mrgAlt (\ s a -> s{_mrgAlt = a}) + +instance GoogleRequest MylibraryReadingpositionsGet' + where + type Rs MylibraryReadingpositionsGet' = + ReadingPosition + request = requestWithRoute defReq booksURL + requestWithRoute r u MylibraryReadingpositionsGet{..} + = go _mrgQuotaUser _mrgPrettyPrint _mrgUserIp + _mrgContentVersion + _mrgKey + _mrgVolumeId + _mrgSource + _mrgOauthToken + _mrgFields + _mrgAlt + where go + = clientWithRoute + (Proxy :: Proxy MylibraryReadingpositionsGetAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/SetPosition.hs b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/SetPosition.hs new file mode 100644 index 000000000..54b0eb023 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Mylibrary/Readingpositions/SetPosition.hs @@ -0,0 +1,242 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Mylibrary.Readingpositions.SetPosition +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets my reading position information for a volume. +-- +-- /See:/ for @BooksMylibraryReadingpositionsSetPosition@. +module Books.Mylibrary.Readingpositions.SetPosition + ( + -- * REST Resource + MylibraryReadingpositionsSetPositionAPI + + -- * Creating a Request + , mylibraryReadingpositionsSetPosition + , MylibraryReadingpositionsSetPosition + + -- * Request Lenses + , mrspDeviceCookie + , mrspQuotaUser + , mrspPrettyPrint + , mrspUserIp + , mrspContentVersion + , mrspAction + , mrspKey + , mrspVolumeId + , mrspSource + , mrspOauthToken + , mrspTimestamp + , mrspFields + , mrspAlt + , mrspPosition + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksMylibraryReadingpositionsSetPosition@ which the +-- 'MylibraryReadingpositionsSetPosition' request conforms to. +type MylibraryReadingpositionsSetPositionAPI = + "mylibrary" :> + "readingpositions" :> + Capture "volumeId" Text :> + "setPosition" :> + QueryParam "deviceCookie" Text :> + QueryParam "contentVersion" Text :> + QueryParam "action" Text :> + QueryParam "source" Text :> + QueryParam "timestamp" Text :> + QueryParam "position" Text :> Post '[JSON] () + +-- | Sets my reading position information for a volume. +-- +-- /See:/ 'mylibraryReadingpositionsSetPosition' smart constructor. +data MylibraryReadingpositionsSetPosition = MylibraryReadingpositionsSetPosition + { _mrspDeviceCookie :: !(Maybe Text) + , _mrspQuotaUser :: !(Maybe Text) + , _mrspPrettyPrint :: !Bool + , _mrspUserIp :: !(Maybe Text) + , _mrspContentVersion :: !(Maybe Text) + , _mrspAction :: !(Maybe Text) + , _mrspKey :: !(Maybe Text) + , _mrspVolumeId :: !Text + , _mrspSource :: !(Maybe Text) + , _mrspOauthToken :: !(Maybe Text) + , _mrspTimestamp :: !Text + , _mrspFields :: !(Maybe Text) + , _mrspAlt :: !Text + , _mrspPosition :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MylibraryReadingpositionsSetPosition'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mrspDeviceCookie' +-- +-- * 'mrspQuotaUser' +-- +-- * 'mrspPrettyPrint' +-- +-- * 'mrspUserIp' +-- +-- * 'mrspContentVersion' +-- +-- * 'mrspAction' +-- +-- * 'mrspKey' +-- +-- * 'mrspVolumeId' +-- +-- * 'mrspSource' +-- +-- * 'mrspOauthToken' +-- +-- * 'mrspTimestamp' +-- +-- * 'mrspFields' +-- +-- * 'mrspAlt' +-- +-- * 'mrspPosition' +mylibraryReadingpositionsSetPosition + :: Text -- ^ 'volumeId' + -> Text -- ^ 'timestamp' + -> Text -- ^ 'position' + -> MylibraryReadingpositionsSetPosition +mylibraryReadingpositionsSetPosition pMrspVolumeId_ pMrspTimestamp_ pMrspPosition_ = + MylibraryReadingpositionsSetPosition + { _mrspDeviceCookie = Nothing + , _mrspQuotaUser = Nothing + , _mrspPrettyPrint = True + , _mrspUserIp = Nothing + , _mrspContentVersion = Nothing + , _mrspAction = Nothing + , _mrspKey = Nothing + , _mrspVolumeId = pMrspVolumeId_ + , _mrspSource = Nothing + , _mrspOauthToken = Nothing + , _mrspTimestamp = pMrspTimestamp_ + , _mrspFields = Nothing + , _mrspAlt = "json" + , _mrspPosition = pMrspPosition_ + } + +-- | Random persistent device cookie optional on set position. +mrspDeviceCookie :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspDeviceCookie + = lens _mrspDeviceCookie + (\ s a -> s{_mrspDeviceCookie = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mrspQuotaUser :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspQuotaUser + = lens _mrspQuotaUser + (\ s a -> s{_mrspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mrspPrettyPrint :: Lens' MylibraryReadingpositionsSetPosition' Bool +mrspPrettyPrint + = lens _mrspPrettyPrint + (\ s a -> s{_mrspPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mrspUserIp :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspUserIp + = lens _mrspUserIp (\ s a -> s{_mrspUserIp = a}) + +-- | Volume content version for which this reading position applies. +mrspContentVersion :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspContentVersion + = lens _mrspContentVersion + (\ s a -> s{_mrspContentVersion = a}) + +-- | Action that caused this reading position to be set. +mrspAction :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspAction + = lens _mrspAction (\ s a -> s{_mrspAction = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mrspKey :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspKey = lens _mrspKey (\ s a -> s{_mrspKey = a}) + +-- | ID of volume for which to update the reading position. +mrspVolumeId :: Lens' MylibraryReadingpositionsSetPosition' Text +mrspVolumeId + = lens _mrspVolumeId (\ s a -> s{_mrspVolumeId = a}) + +-- | String to identify the originator of this request. +mrspSource :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspSource + = lens _mrspSource (\ s a -> s{_mrspSource = a}) + +-- | OAuth 2.0 token for the current user. +mrspOauthToken :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspOauthToken + = lens _mrspOauthToken + (\ s a -> s{_mrspOauthToken = a}) + +-- | RFC 3339 UTC format timestamp associated with this reading position. +mrspTimestamp :: Lens' MylibraryReadingpositionsSetPosition' Text +mrspTimestamp + = lens _mrspTimestamp + (\ s a -> s{_mrspTimestamp = a}) + +-- | Selector specifying which fields to include in a partial response. +mrspFields :: Lens' MylibraryReadingpositionsSetPosition' (Maybe Text) +mrspFields + = lens _mrspFields (\ s a -> s{_mrspFields = a}) + +-- | Data format for the response. +mrspAlt :: Lens' MylibraryReadingpositionsSetPosition' Text +mrspAlt = lens _mrspAlt (\ s a -> s{_mrspAlt = a}) + +-- | Position string for the new volume reading position. +mrspPosition :: Lens' MylibraryReadingpositionsSetPosition' Text +mrspPosition + = lens _mrspPosition (\ s a -> s{_mrspPosition = a}) + +instance GoogleRequest + MylibraryReadingpositionsSetPosition' where + type Rs MylibraryReadingpositionsSetPosition' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u + MylibraryReadingpositionsSetPosition{..} + = go _mrspDeviceCookie _mrspQuotaUser + _mrspPrettyPrint + _mrspUserIp + _mrspContentVersion + _mrspAction + _mrspKey + _mrspVolumeId + _mrspSource + _mrspOauthToken + (Just _mrspTimestamp) + _mrspFields + _mrspAlt + (Just _mrspPosition) + where go + = clientWithRoute + (Proxy :: + Proxy MylibraryReadingpositionsSetPositionAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategories.hs b/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategories.hs new file mode 100644 index 000000000..bb8b269e0 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategories.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Onboarding.ListCategories +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List categories for onboarding experience. +-- +-- /See:/ for @BooksOnboardingListCategories@. +module Books.Onboarding.ListCategories + ( + -- * REST Resource + OnboardingListCategoriesAPI + + -- * Creating a Request + , onboardingListCategories + , OnboardingListCategories + + -- * Request Lenses + , olcQuotaUser + , olcPrettyPrint + , olcUserIp + , olcLocale + , olcKey + , olcOauthToken + , olcFields + , olcAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksOnboardingListCategories@ which the +-- 'OnboardingListCategories' request conforms to. +type OnboardingListCategoriesAPI = + "onboarding" :> + "listCategories" :> + QueryParam "locale" Text :> Get '[JSON] Category + +-- | List categories for onboarding experience. +-- +-- /See:/ 'onboardingListCategories' smart constructor. +data OnboardingListCategories = OnboardingListCategories + { _olcQuotaUser :: !(Maybe Text) + , _olcPrettyPrint :: !Bool + , _olcUserIp :: !(Maybe Text) + , _olcLocale :: !(Maybe Text) + , _olcKey :: !(Maybe Text) + , _olcOauthToken :: !(Maybe Text) + , _olcFields :: !(Maybe Text) + , _olcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OnboardingListCategories'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olcQuotaUser' +-- +-- * 'olcPrettyPrint' +-- +-- * 'olcUserIp' +-- +-- * 'olcLocale' +-- +-- * 'olcKey' +-- +-- * 'olcOauthToken' +-- +-- * 'olcFields' +-- +-- * 'olcAlt' +onboardingListCategories + :: OnboardingListCategories +onboardingListCategories = + OnboardingListCategories + { _olcQuotaUser = Nothing + , _olcPrettyPrint = True + , _olcUserIp = Nothing + , _olcLocale = Nothing + , _olcKey = Nothing + , _olcOauthToken = Nothing + , _olcFields = Nothing + , _olcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olcQuotaUser :: Lens' OnboardingListCategories' (Maybe Text) +olcQuotaUser + = lens _olcQuotaUser (\ s a -> s{_olcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olcPrettyPrint :: Lens' OnboardingListCategories' Bool +olcPrettyPrint + = lens _olcPrettyPrint + (\ s a -> s{_olcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olcUserIp :: Lens' OnboardingListCategories' (Maybe Text) +olcUserIp + = lens _olcUserIp (\ s a -> s{_olcUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Default is en-US if +-- unset. +olcLocale :: Lens' OnboardingListCategories' (Maybe Text) +olcLocale + = lens _olcLocale (\ s a -> s{_olcLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olcKey :: Lens' OnboardingListCategories' (Maybe Text) +olcKey = lens _olcKey (\ s a -> s{_olcKey = a}) + +-- | OAuth 2.0 token for the current user. +olcOauthToken :: Lens' OnboardingListCategories' (Maybe Text) +olcOauthToken + = lens _olcOauthToken + (\ s a -> s{_olcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +olcFields :: Lens' OnboardingListCategories' (Maybe Text) +olcFields + = lens _olcFields (\ s a -> s{_olcFields = a}) + +-- | Data format for the response. +olcAlt :: Lens' OnboardingListCategories' Text +olcAlt = lens _olcAlt (\ s a -> s{_olcAlt = a}) + +instance GoogleRequest OnboardingListCategories' + where + type Rs OnboardingListCategories' = Category + request = requestWithRoute defReq booksURL + requestWithRoute r u OnboardingListCategories{..} + = go _olcQuotaUser _olcPrettyPrint _olcUserIp + _olcLocale + _olcKey + _olcOauthToken + _olcFields + _olcAlt + where go + = clientWithRoute + (Proxy :: Proxy OnboardingListCategoriesAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategoryVolumes.hs b/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategoryVolumes.hs new file mode 100644 index 000000000..f3ea7d5b1 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Onboarding/ListCategoryVolumes.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Onboarding.ListCategoryVolumes +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List available volumes under categories for onboarding experience. +-- +-- /See:/ for @BooksOnboardingListCategoryVolumes@. +module Books.Onboarding.ListCategoryVolumes + ( + -- * REST Resource + OnboardingListCategoryVolumesAPI + + -- * Creating a Request + , onboardingListCategoryVolumes + , OnboardingListCategoryVolumes + + -- * Request Lenses + , olcvQuotaUser + , olcvPrettyPrint + , olcvUserIp + , olcvLocale + , olcvMaxAllowedMaturityRating + , olcvKey + , olcvCategoryId + , olcvPageToken + , olcvOauthToken + , olcvPageSize + , olcvFields + , olcvAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksOnboardingListCategoryVolumes@ which the +-- 'OnboardingListCategoryVolumes' request conforms to. +type OnboardingListCategoryVolumesAPI = + "onboarding" :> + "listCategoryVolumes" :> + QueryParam "locale" Text :> + QueryParam "maxAllowedMaturityRating" Text :> + QueryParams "categoryId" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Word32 :> Get '[JSON] Volume2 + +-- | List available volumes under categories for onboarding experience. +-- +-- /See:/ 'onboardingListCategoryVolumes' smart constructor. +data OnboardingListCategoryVolumes = OnboardingListCategoryVolumes + { _olcvQuotaUser :: !(Maybe Text) + , _olcvPrettyPrint :: !Bool + , _olcvUserIp :: !(Maybe Text) + , _olcvLocale :: !(Maybe Text) + , _olcvMaxAllowedMaturityRating :: !(Maybe Text) + , _olcvKey :: !(Maybe Text) + , _olcvCategoryId :: !(Maybe Text) + , _olcvPageToken :: !(Maybe Text) + , _olcvOauthToken :: !(Maybe Text) + , _olcvPageSize :: !(Maybe Word32) + , _olcvFields :: !(Maybe Text) + , _olcvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OnboardingListCategoryVolumes'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olcvQuotaUser' +-- +-- * 'olcvPrettyPrint' +-- +-- * 'olcvUserIp' +-- +-- * 'olcvLocale' +-- +-- * 'olcvMaxAllowedMaturityRating' +-- +-- * 'olcvKey' +-- +-- * 'olcvCategoryId' +-- +-- * 'olcvPageToken' +-- +-- * 'olcvOauthToken' +-- +-- * 'olcvPageSize' +-- +-- * 'olcvFields' +-- +-- * 'olcvAlt' +onboardingListCategoryVolumes + :: OnboardingListCategoryVolumes +onboardingListCategoryVolumes = + OnboardingListCategoryVolumes + { _olcvQuotaUser = Nothing + , _olcvPrettyPrint = True + , _olcvUserIp = Nothing + , _olcvLocale = Nothing + , _olcvMaxAllowedMaturityRating = Nothing + , _olcvKey = Nothing + , _olcvCategoryId = Nothing + , _olcvPageToken = Nothing + , _olcvOauthToken = Nothing + , _olcvPageSize = Nothing + , _olcvFields = Nothing + , _olcvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olcvQuotaUser :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvQuotaUser + = lens _olcvQuotaUser + (\ s a -> s{_olcvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olcvPrettyPrint :: Lens' OnboardingListCategoryVolumes' Bool +olcvPrettyPrint + = lens _olcvPrettyPrint + (\ s a -> s{_olcvPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olcvUserIp :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvUserIp + = lens _olcvUserIp (\ s a -> s{_olcvUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Default is en-US if +-- unset. +olcvLocale :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvLocale + = lens _olcvLocale (\ s a -> s{_olcvLocale = a}) + +-- | The maximum allowed maturity rating of returned volumes. Books with a +-- higher maturity rating are filtered out. +olcvMaxAllowedMaturityRating :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvMaxAllowedMaturityRating + = lens _olcvMaxAllowedMaturityRating + (\ s a -> s{_olcvMaxAllowedMaturityRating = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olcvKey :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvKey = lens _olcvKey (\ s a -> s{_olcvKey = a}) + +-- | List of category ids requested. +olcvCategoryId :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvCategoryId + = lens _olcvCategoryId + (\ s a -> s{_olcvCategoryId = a}) + +-- | The value of the nextToken from the previous page. +olcvPageToken :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvPageToken + = lens _olcvPageToken + (\ s a -> s{_olcvPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olcvOauthToken :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvOauthToken + = lens _olcvOauthToken + (\ s a -> s{_olcvOauthToken = a}) + +-- | Number of maximum results per page to be included in the response. +olcvPageSize :: Lens' OnboardingListCategoryVolumes' (Maybe Word32) +olcvPageSize + = lens _olcvPageSize (\ s a -> s{_olcvPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +olcvFields :: Lens' OnboardingListCategoryVolumes' (Maybe Text) +olcvFields + = lens _olcvFields (\ s a -> s{_olcvFields = a}) + +-- | Data format for the response. +olcvAlt :: Lens' OnboardingListCategoryVolumes' Text +olcvAlt = lens _olcvAlt (\ s a -> s{_olcvAlt = a}) + +instance GoogleRequest OnboardingListCategoryVolumes' + where + type Rs OnboardingListCategoryVolumes' = Volume2 + request = requestWithRoute defReq booksURL + requestWithRoute r u + OnboardingListCategoryVolumes{..} + = go _olcvQuotaUser _olcvPrettyPrint _olcvUserIp + _olcvLocale + _olcvMaxAllowedMaturityRating + _olcvKey + _olcvCategoryId + _olcvPageToken + _olcvOauthToken + _olcvPageSize + _olcvFields + _olcvAlt + where go + = clientWithRoute + (Proxy :: Proxy OnboardingListCategoryVolumesAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Accept.hs b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Accept.hs new file mode 100644 index 000000000..ccec00bf1 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Accept.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Promooffer.Accept +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | +-- +-- /See:/ for @BooksPromoofferAccept@. +module Books.Promooffer.Accept + ( + -- * REST Resource + PromoofferAcceptAPI + + -- * Creating a Request + , promoofferAccept + , PromoofferAccept + + -- * Request Lenses + , paQuotaUser + , paPrettyPrint + , paManufacturer + , paUserIp + , paSerial + , paDevice + , paKey + , paModel + , paVolumeId + , paOfferId + , paProduct + , paOauthToken + , paAndroidId + , paFields + , paAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksPromoofferAccept@ which the +-- 'PromoofferAccept' request conforms to. +type PromoofferAcceptAPI = + "promooffer" :> + "accept" :> + QueryParam "manufacturer" Text :> + QueryParam "serial" Text :> + QueryParam "device" Text :> + QueryParam "model" Text :> + QueryParam "volumeId" Text :> + QueryParam "offerId" Text :> + QueryParam "product" Text :> + QueryParam "androidId" Text :> Post '[JSON] () + +-- | +-- +-- /See:/ 'promoofferAccept' smart constructor. +data PromoofferAccept = PromoofferAccept + { _paQuotaUser :: !(Maybe Text) + , _paPrettyPrint :: !Bool + , _paManufacturer :: !(Maybe Text) + , _paUserIp :: !(Maybe Text) + , _paSerial :: !(Maybe Text) + , _paDevice :: !(Maybe Text) + , _paKey :: !(Maybe Text) + , _paModel :: !(Maybe Text) + , _paVolumeId :: !(Maybe Text) + , _paOfferId :: !(Maybe Text) + , _paProduct :: !(Maybe Text) + , _paOauthToken :: !(Maybe Text) + , _paAndroidId :: !(Maybe Text) + , _paFields :: !(Maybe Text) + , _paAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PromoofferAccept'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'paQuotaUser' +-- +-- * 'paPrettyPrint' +-- +-- * 'paManufacturer' +-- +-- * 'paUserIp' +-- +-- * 'paSerial' +-- +-- * 'paDevice' +-- +-- * 'paKey' +-- +-- * 'paModel' +-- +-- * 'paVolumeId' +-- +-- * 'paOfferId' +-- +-- * 'paProduct' +-- +-- * 'paOauthToken' +-- +-- * 'paAndroidId' +-- +-- * 'paFields' +-- +-- * 'paAlt' +promoofferAccept + :: PromoofferAccept +promoofferAccept = + PromoofferAccept + { _paQuotaUser = Nothing + , _paPrettyPrint = True + , _paManufacturer = Nothing + , _paUserIp = Nothing + , _paSerial = Nothing + , _paDevice = Nothing + , _paKey = Nothing + , _paModel = Nothing + , _paVolumeId = Nothing + , _paOfferId = Nothing + , _paProduct = Nothing + , _paOauthToken = Nothing + , _paAndroidId = Nothing + , _paFields = Nothing + , _paAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +paQuotaUser :: Lens' PromoofferAccept' (Maybe Text) +paQuotaUser + = lens _paQuotaUser (\ s a -> s{_paQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +paPrettyPrint :: Lens' PromoofferAccept' Bool +paPrettyPrint + = lens _paPrettyPrint + (\ s a -> s{_paPrettyPrint = a}) + +-- | device manufacturer +paManufacturer :: Lens' PromoofferAccept' (Maybe Text) +paManufacturer + = lens _paManufacturer + (\ s a -> s{_paManufacturer = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +paUserIp :: Lens' PromoofferAccept' (Maybe Text) +paUserIp = lens _paUserIp (\ s a -> s{_paUserIp = a}) + +-- | device serial +paSerial :: Lens' PromoofferAccept' (Maybe Text) +paSerial = lens _paSerial (\ s a -> s{_paSerial = a}) + +-- | device device +paDevice :: Lens' PromoofferAccept' (Maybe Text) +paDevice = lens _paDevice (\ s a -> s{_paDevice = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +paKey :: Lens' PromoofferAccept' (Maybe Text) +paKey = lens _paKey (\ s a -> s{_paKey = a}) + +-- | device model +paModel :: Lens' PromoofferAccept' (Maybe Text) +paModel = lens _paModel (\ s a -> s{_paModel = a}) + +-- | Volume id to exercise the offer +paVolumeId :: Lens' PromoofferAccept' (Maybe Text) +paVolumeId + = lens _paVolumeId (\ s a -> s{_paVolumeId = a}) + +paOfferId :: Lens' PromoofferAccept' (Maybe Text) +paOfferId + = lens _paOfferId (\ s a -> s{_paOfferId = a}) + +-- | device product +paProduct :: Lens' PromoofferAccept' (Maybe Text) +paProduct + = lens _paProduct (\ s a -> s{_paProduct = a}) + +-- | OAuth 2.0 token for the current user. +paOauthToken :: Lens' PromoofferAccept' (Maybe Text) +paOauthToken + = lens _paOauthToken (\ s a -> s{_paOauthToken = a}) + +-- | device android_id +paAndroidId :: Lens' PromoofferAccept' (Maybe Text) +paAndroidId + = lens _paAndroidId (\ s a -> s{_paAndroidId = a}) + +-- | Selector specifying which fields to include in a partial response. +paFields :: Lens' PromoofferAccept' (Maybe Text) +paFields = lens _paFields (\ s a -> s{_paFields = a}) + +-- | Data format for the response. +paAlt :: Lens' PromoofferAccept' Text +paAlt = lens _paAlt (\ s a -> s{_paAlt = a}) + +instance GoogleRequest PromoofferAccept' where + type Rs PromoofferAccept' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u PromoofferAccept{..} + = go _paQuotaUser _paPrettyPrint _paManufacturer + _paUserIp + _paSerial + _paDevice + _paKey + _paModel + _paVolumeId + _paOfferId + _paProduct + _paOauthToken + _paAndroidId + _paFields + _paAlt + where go + = clientWithRoute + (Proxy :: Proxy PromoofferAcceptAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Dismiss.hs b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Dismiss.hs new file mode 100644 index 000000000..e678756d6 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Dismiss.hs @@ -0,0 +1,225 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Promooffer.Dismiss +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | +-- +-- /See:/ for @BooksPromoofferDismiss@. +module Books.Promooffer.Dismiss + ( + -- * REST Resource + PromoofferDismissAPI + + -- * Creating a Request + , promoofferDismiss + , PromoofferDismiss + + -- * Request Lenses + , pdQuotaUser + , pdPrettyPrint + , pdManufacturer + , pdUserIp + , pdSerial + , pdDevice + , pdKey + , pdModel + , pdOfferId + , pdProduct + , pdOauthToken + , pdAndroidId + , pdFields + , pdAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksPromoofferDismiss@ which the +-- 'PromoofferDismiss' request conforms to. +type PromoofferDismissAPI = + "promooffer" :> + "dismiss" :> + QueryParam "manufacturer" Text :> + QueryParam "serial" Text :> + QueryParam "device" Text :> + QueryParam "model" Text :> + QueryParam "offerId" Text :> + QueryParam "product" Text :> + QueryParam "androidId" Text :> Post '[JSON] () + +-- | +-- +-- /See:/ 'promoofferDismiss' smart constructor. +data PromoofferDismiss = PromoofferDismiss + { _pdQuotaUser :: !(Maybe Text) + , _pdPrettyPrint :: !Bool + , _pdManufacturer :: !(Maybe Text) + , _pdUserIp :: !(Maybe Text) + , _pdSerial :: !(Maybe Text) + , _pdDevice :: !(Maybe Text) + , _pdKey :: !(Maybe Text) + , _pdModel :: !(Maybe Text) + , _pdOfferId :: !(Maybe Text) + , _pdProduct :: !(Maybe Text) + , _pdOauthToken :: !(Maybe Text) + , _pdAndroidId :: !(Maybe Text) + , _pdFields :: !(Maybe Text) + , _pdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PromoofferDismiss'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdQuotaUser' +-- +-- * 'pdPrettyPrint' +-- +-- * 'pdManufacturer' +-- +-- * 'pdUserIp' +-- +-- * 'pdSerial' +-- +-- * 'pdDevice' +-- +-- * 'pdKey' +-- +-- * 'pdModel' +-- +-- * 'pdOfferId' +-- +-- * 'pdProduct' +-- +-- * 'pdOauthToken' +-- +-- * 'pdAndroidId' +-- +-- * 'pdFields' +-- +-- * 'pdAlt' +promoofferDismiss + :: PromoofferDismiss +promoofferDismiss = + PromoofferDismiss + { _pdQuotaUser = Nothing + , _pdPrettyPrint = True + , _pdManufacturer = Nothing + , _pdUserIp = Nothing + , _pdSerial = Nothing + , _pdDevice = Nothing + , _pdKey = Nothing + , _pdModel = Nothing + , _pdOfferId = Nothing + , _pdProduct = Nothing + , _pdOauthToken = Nothing + , _pdAndroidId = Nothing + , _pdFields = Nothing + , _pdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pdQuotaUser :: Lens' PromoofferDismiss' (Maybe Text) +pdQuotaUser + = lens _pdQuotaUser (\ s a -> s{_pdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pdPrettyPrint :: Lens' PromoofferDismiss' Bool +pdPrettyPrint + = lens _pdPrettyPrint + (\ s a -> s{_pdPrettyPrint = a}) + +-- | device manufacturer +pdManufacturer :: Lens' PromoofferDismiss' (Maybe Text) +pdManufacturer + = lens _pdManufacturer + (\ s a -> s{_pdManufacturer = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pdUserIp :: Lens' PromoofferDismiss' (Maybe Text) +pdUserIp = lens _pdUserIp (\ s a -> s{_pdUserIp = a}) + +-- | device serial +pdSerial :: Lens' PromoofferDismiss' (Maybe Text) +pdSerial = lens _pdSerial (\ s a -> s{_pdSerial = a}) + +-- | device device +pdDevice :: Lens' PromoofferDismiss' (Maybe Text) +pdDevice = lens _pdDevice (\ s a -> s{_pdDevice = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pdKey :: Lens' PromoofferDismiss' (Maybe Text) +pdKey = lens _pdKey (\ s a -> s{_pdKey = a}) + +-- | device model +pdModel :: Lens' PromoofferDismiss' (Maybe Text) +pdModel = lens _pdModel (\ s a -> s{_pdModel = a}) + +-- | Offer to dimiss +pdOfferId :: Lens' PromoofferDismiss' (Maybe Text) +pdOfferId + = lens _pdOfferId (\ s a -> s{_pdOfferId = a}) + +-- | device product +pdProduct :: Lens' PromoofferDismiss' (Maybe Text) +pdProduct + = lens _pdProduct (\ s a -> s{_pdProduct = a}) + +-- | OAuth 2.0 token for the current user. +pdOauthToken :: Lens' PromoofferDismiss' (Maybe Text) +pdOauthToken + = lens _pdOauthToken (\ s a -> s{_pdOauthToken = a}) + +-- | device android_id +pdAndroidId :: Lens' PromoofferDismiss' (Maybe Text) +pdAndroidId + = lens _pdAndroidId (\ s a -> s{_pdAndroidId = a}) + +-- | Selector specifying which fields to include in a partial response. +pdFields :: Lens' PromoofferDismiss' (Maybe Text) +pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) + +-- | Data format for the response. +pdAlt :: Lens' PromoofferDismiss' Text +pdAlt = lens _pdAlt (\ s a -> s{_pdAlt = a}) + +instance GoogleRequest PromoofferDismiss' where + type Rs PromoofferDismiss' = () + request = requestWithRoute defReq booksURL + requestWithRoute r u PromoofferDismiss{..} + = go _pdQuotaUser _pdPrettyPrint _pdManufacturer + _pdUserIp + _pdSerial + _pdDevice + _pdKey + _pdModel + _pdOfferId + _pdProduct + _pdOauthToken + _pdAndroidId + _pdFields + _pdAlt + where go + = clientWithRoute + (Proxy :: Proxy PromoofferDismissAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Get.hs new file mode 100644 index 000000000..944e31023 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Promooffer/Get.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Promooffer.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of promo offers available to the user +-- +-- /See:/ for @BooksPromoofferGet@. +module Books.Promooffer.Get + ( + -- * REST Resource + PromoofferGetAPI + + -- * Creating a Request + , promoofferGet + , PromoofferGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgManufacturer + , pgUserIp + , pgSerial + , pgDevice + , pgKey + , pgModel + , pgProduct + , pgOauthToken + , pgAndroidId + , pgFields + , pgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksPromoofferGet@ which the +-- 'PromoofferGet' request conforms to. +type PromoofferGetAPI = + "promooffer" :> + "get" :> + QueryParam "manufacturer" Text :> + QueryParam "serial" Text :> + QueryParam "device" Text :> + QueryParam "model" Text :> + QueryParam "product" Text :> + QueryParam "androidId" Text :> Get '[JSON] Offers + +-- | Returns a list of promo offers available to the user +-- +-- /See:/ 'promoofferGet' smart constructor. +data PromoofferGet = PromoofferGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgManufacturer :: !(Maybe Text) + , _pgUserIp :: !(Maybe Text) + , _pgSerial :: !(Maybe Text) + , _pgDevice :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgModel :: !(Maybe Text) + , _pgProduct :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgAndroidId :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PromoofferGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgManufacturer' +-- +-- * 'pgUserIp' +-- +-- * 'pgSerial' +-- +-- * 'pgDevice' +-- +-- * 'pgKey' +-- +-- * 'pgModel' +-- +-- * 'pgProduct' +-- +-- * 'pgOauthToken' +-- +-- * 'pgAndroidId' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +promoofferGet + :: PromoofferGet +promoofferGet = + PromoofferGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgManufacturer = Nothing + , _pgUserIp = Nothing + , _pgSerial = Nothing + , _pgDevice = Nothing + , _pgKey = Nothing + , _pgModel = Nothing + , _pgProduct = Nothing + , _pgOauthToken = Nothing + , _pgAndroidId = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PromoofferGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PromoofferGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | device manufacturer +pgManufacturer :: Lens' PromoofferGet' (Maybe Text) +pgManufacturer + = lens _pgManufacturer + (\ s a -> s{_pgManufacturer = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PromoofferGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | device serial +pgSerial :: Lens' PromoofferGet' (Maybe Text) +pgSerial = lens _pgSerial (\ s a -> s{_pgSerial = a}) + +-- | device device +pgDevice :: Lens' PromoofferGet' (Maybe Text) +pgDevice = lens _pgDevice (\ s a -> s{_pgDevice = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PromoofferGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | device model +pgModel :: Lens' PromoofferGet' (Maybe Text) +pgModel = lens _pgModel (\ s a -> s{_pgModel = a}) + +-- | device product +pgProduct :: Lens' PromoofferGet' (Maybe Text) +pgProduct + = lens _pgProduct (\ s a -> s{_pgProduct = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PromoofferGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | device android_id +pgAndroidId :: Lens' PromoofferGet' (Maybe Text) +pgAndroidId + = lens _pgAndroidId (\ s a -> s{_pgAndroidId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PromoofferGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PromoofferGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PromoofferGet' where + type Rs PromoofferGet' = Offers + request = requestWithRoute defReq booksURL + requestWithRoute r u PromoofferGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgManufacturer + _pgUserIp + _pgSerial + _pgDevice + _pgKey + _pgModel + _pgProduct + _pgOauthToken + _pgAndroidId + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PromoofferGetAPI) r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Associated/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Associated/List.hs new file mode 100644 index 000000000..9b0dd9af0 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Associated/List.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Associated.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return a list of associated books. +-- +-- /See:/ for @BooksVolumesAssociatedList@. +module Books.Volumes.Associated.List + ( + -- * REST Resource + VolumesAssociatedListAPI + + -- * Creating a Request + , volumesAssociatedList + , VolumesAssociatedList + + -- * Request Lenses + , valQuotaUser + , valPrettyPrint + , valUserIp + , valLocale + , valMaxAllowedMaturityRating + , valKey + , valVolumeId + , valSource + , valOauthToken + , valFields + , valAlt + , valAssociation + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesAssociatedList@ which the +-- 'VolumesAssociatedList' request conforms to. +type VolumesAssociatedListAPI = + "volumes" :> + Capture "volumeId" Text :> + "associated" :> + QueryParam "locale" Text :> + QueryParam "maxAllowedMaturityRating" Text :> + QueryParam "source" Text :> + QueryParam "association" Text :> Get '[JSON] Volumes + +-- | Return a list of associated books. +-- +-- /See:/ 'volumesAssociatedList' smart constructor. +data VolumesAssociatedList = VolumesAssociatedList + { _valQuotaUser :: !(Maybe Text) + , _valPrettyPrint :: !Bool + , _valUserIp :: !(Maybe Text) + , _valLocale :: !(Maybe Text) + , _valMaxAllowedMaturityRating :: !(Maybe Text) + , _valKey :: !(Maybe Text) + , _valVolumeId :: !Text + , _valSource :: !(Maybe Text) + , _valOauthToken :: !(Maybe Text) + , _valFields :: !(Maybe Text) + , _valAlt :: !Text + , _valAssociation :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesAssociatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'valQuotaUser' +-- +-- * 'valPrettyPrint' +-- +-- * 'valUserIp' +-- +-- * 'valLocale' +-- +-- * 'valMaxAllowedMaturityRating' +-- +-- * 'valKey' +-- +-- * 'valVolumeId' +-- +-- * 'valSource' +-- +-- * 'valOauthToken' +-- +-- * 'valFields' +-- +-- * 'valAlt' +-- +-- * 'valAssociation' +volumesAssociatedList + :: Text -- ^ 'volumeId' + -> VolumesAssociatedList +volumesAssociatedList pValVolumeId_ = + VolumesAssociatedList + { _valQuotaUser = Nothing + , _valPrettyPrint = True + , _valUserIp = Nothing + , _valLocale = Nothing + , _valMaxAllowedMaturityRating = Nothing + , _valKey = Nothing + , _valVolumeId = pValVolumeId_ + , _valSource = Nothing + , _valOauthToken = Nothing + , _valFields = Nothing + , _valAlt = "json" + , _valAssociation = Nothing + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +valQuotaUser :: Lens' VolumesAssociatedList' (Maybe Text) +valQuotaUser + = lens _valQuotaUser (\ s a -> s{_valQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +valPrettyPrint :: Lens' VolumesAssociatedList' Bool +valPrettyPrint + = lens _valPrettyPrint + (\ s a -> s{_valPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +valUserIp :: Lens' VolumesAssociatedList' (Maybe Text) +valUserIp + = lens _valUserIp (\ s a -> s{_valUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Ex: \'en_US\'. Used for +-- generating recommendations. +valLocale :: Lens' VolumesAssociatedList' (Maybe Text) +valLocale + = lens _valLocale (\ s a -> s{_valLocale = a}) + +-- | The maximum allowed maturity rating of returned recommendations. Books +-- with a higher maturity rating are filtered out. +valMaxAllowedMaturityRating :: Lens' VolumesAssociatedList' (Maybe Text) +valMaxAllowedMaturityRating + = lens _valMaxAllowedMaturityRating + (\ s a -> s{_valMaxAllowedMaturityRating = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +valKey :: Lens' VolumesAssociatedList' (Maybe Text) +valKey = lens _valKey (\ s a -> s{_valKey = a}) + +-- | ID of the source volume. +valVolumeId :: Lens' VolumesAssociatedList' Text +valVolumeId + = lens _valVolumeId (\ s a -> s{_valVolumeId = a}) + +-- | String to identify the originator of this request. +valSource :: Lens' VolumesAssociatedList' (Maybe Text) +valSource + = lens _valSource (\ s a -> s{_valSource = a}) + +-- | OAuth 2.0 token for the current user. +valOauthToken :: Lens' VolumesAssociatedList' (Maybe Text) +valOauthToken + = lens _valOauthToken + (\ s a -> s{_valOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +valFields :: Lens' VolumesAssociatedList' (Maybe Text) +valFields + = lens _valFields (\ s a -> s{_valFields = a}) + +-- | Data format for the response. +valAlt :: Lens' VolumesAssociatedList' Text +valAlt = lens _valAlt (\ s a -> s{_valAlt = a}) + +-- | Association type. +valAssociation :: Lens' VolumesAssociatedList' (Maybe Text) +valAssociation + = lens _valAssociation + (\ s a -> s{_valAssociation = a}) + +instance GoogleRequest VolumesAssociatedList' where + type Rs VolumesAssociatedList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesAssociatedList{..} + = go _valQuotaUser _valPrettyPrint _valUserIp + _valLocale + _valMaxAllowedMaturityRating + _valKey + _valVolumeId + _valSource + _valOauthToken + _valFields + _valAlt + _valAssociation + where go + = clientWithRoute + (Proxy :: Proxy VolumesAssociatedListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Get.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Get.hs new file mode 100644 index 000000000..83fe00e16 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Get.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets volume information for a single volume. +-- +-- /See:/ for @BooksVolumesGet@. +module Books.Volumes.Get + ( + -- * REST Resource + VolumesGetAPI + + -- * Creating a Request + , volumesGet + , VolumesGet + + -- * Request Lenses + , vgQuotaUser + , vgPrettyPrint + , vgCountry + , vgUserIp + , vgPartner + , vgKey + , vgVolumeId + , vgSource + , vgProjection + , vgOauthToken + , vgUserLibraryConsistentRead + , vgFields + , vgAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesGet@ which the +-- 'VolumesGet' request conforms to. +type VolumesGetAPI = + "volumes" :> + Capture "volumeId" Text :> + QueryParam "country" Text :> + QueryParam "partner" Text :> + QueryParam "source" Text :> + QueryParam "projection" Text :> + QueryParam "user_library_consistent_read" Bool :> + Get '[JSON] Volume + +-- | Gets volume information for a single volume. +-- +-- /See:/ 'volumesGet' smart constructor. +data VolumesGet = VolumesGet + { _vgQuotaUser :: !(Maybe Text) + , _vgPrettyPrint :: !Bool + , _vgCountry :: !(Maybe Text) + , _vgUserIp :: !(Maybe Text) + , _vgPartner :: !(Maybe Text) + , _vgKey :: !(Maybe Text) + , _vgVolumeId :: !Text + , _vgSource :: !(Maybe Text) + , _vgProjection :: !(Maybe Text) + , _vgOauthToken :: !(Maybe Text) + , _vgUserLibraryConsistentRead :: !(Maybe Bool) + , _vgFields :: !(Maybe Text) + , _vgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vgQuotaUser' +-- +-- * 'vgPrettyPrint' +-- +-- * 'vgCountry' +-- +-- * 'vgUserIp' +-- +-- * 'vgPartner' +-- +-- * 'vgKey' +-- +-- * 'vgVolumeId' +-- +-- * 'vgSource' +-- +-- * 'vgProjection' +-- +-- * 'vgOauthToken' +-- +-- * 'vgUserLibraryConsistentRead' +-- +-- * 'vgFields' +-- +-- * 'vgAlt' +volumesGet + :: Text -- ^ 'volumeId' + -> VolumesGet +volumesGet pVgVolumeId_ = + VolumesGet + { _vgQuotaUser = Nothing + , _vgPrettyPrint = True + , _vgCountry = Nothing + , _vgUserIp = Nothing + , _vgPartner = Nothing + , _vgKey = Nothing + , _vgVolumeId = pVgVolumeId_ + , _vgSource = Nothing + , _vgProjection = Nothing + , _vgOauthToken = Nothing + , _vgUserLibraryConsistentRead = Nothing + , _vgFields = Nothing + , _vgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vgQuotaUser :: Lens' VolumesGet' (Maybe Text) +vgQuotaUser + = lens _vgQuotaUser (\ s a -> s{_vgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vgPrettyPrint :: Lens' VolumesGet' Bool +vgPrettyPrint + = lens _vgPrettyPrint + (\ s a -> s{_vgPrettyPrint = a}) + +-- | ISO-3166-1 code to override the IP-based location. +vgCountry :: Lens' VolumesGet' (Maybe Text) +vgCountry + = lens _vgCountry (\ s a -> s{_vgCountry = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vgUserIp :: Lens' VolumesGet' (Maybe Text) +vgUserIp = lens _vgUserIp (\ s a -> s{_vgUserIp = a}) + +-- | Brand results for partner ID. +vgPartner :: Lens' VolumesGet' (Maybe Text) +vgPartner + = lens _vgPartner (\ s a -> s{_vgPartner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vgKey :: Lens' VolumesGet' (Maybe Text) +vgKey = lens _vgKey (\ s a -> s{_vgKey = a}) + +-- | ID of volume to retrieve. +vgVolumeId :: Lens' VolumesGet' Text +vgVolumeId + = lens _vgVolumeId (\ s a -> s{_vgVolumeId = a}) + +-- | String to identify the originator of this request. +vgSource :: Lens' VolumesGet' (Maybe Text) +vgSource = lens _vgSource (\ s a -> s{_vgSource = a}) + +-- | Restrict information returned to a set of selected fields. +vgProjection :: Lens' VolumesGet' (Maybe Text) +vgProjection + = lens _vgProjection (\ s a -> s{_vgProjection = a}) + +-- | OAuth 2.0 token for the current user. +vgOauthToken :: Lens' VolumesGet' (Maybe Text) +vgOauthToken + = lens _vgOauthToken (\ s a -> s{_vgOauthToken = a}) + +vgUserLibraryConsistentRead :: Lens' VolumesGet' (Maybe Bool) +vgUserLibraryConsistentRead + = lens _vgUserLibraryConsistentRead + (\ s a -> s{_vgUserLibraryConsistentRead = a}) + +-- | Selector specifying which fields to include in a partial response. +vgFields :: Lens' VolumesGet' (Maybe Text) +vgFields = lens _vgFields (\ s a -> s{_vgFields = a}) + +-- | Data format for the response. +vgAlt :: Lens' VolumesGet' Text +vgAlt = lens _vgAlt (\ s a -> s{_vgAlt = a}) + +instance GoogleRequest VolumesGet' where + type Rs VolumesGet' = Volume + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesGet{..} + = go _vgQuotaUser _vgPrettyPrint _vgCountry _vgUserIp + _vgPartner + _vgKey + _vgVolumeId + _vgSource + _vgProjection + _vgOauthToken + _vgUserLibraryConsistentRead + _vgFields + _vgAlt + where go + = clientWithRoute (Proxy :: Proxy VolumesGetAPI) r u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs new file mode 100644 index 000000000..4175b77c0 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs @@ -0,0 +1,296 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Performs a book search. +-- +-- /See:/ for @BooksVolumesList@. +module Books.Volumes.List + ( + -- * REST Resource + VolumesListAPI + + -- * Creating a Request + , volumesList + , VolumesList + + -- * Request Lenses + , vlQuotaUser + , vlPrettyPrint + , vlOrderBy + , vlUserIp + , vlLibraryRestrict + , vlPartner + , vlQ + , vlDownload + , vlKey + , vlSource + , vlProjection + , vlFilter + , vlLangRestrict + , vlOauthToken + , vlStartIndex + , vlMaxResults + , vlShowPreorders + , vlPrintType + , vlFields + , vlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesList@ which the +-- 'VolumesList' request conforms to. +type VolumesListAPI = + "volumes" :> + QueryParam "orderBy" Text :> + QueryParam "libraryRestrict" Text :> + QueryParam "partner" Text :> + QueryParam "q" Text :> + QueryParam "download" Text :> + QueryParam "source" Text :> + QueryParam "projection" Text :> + QueryParam "filter" Text :> + QueryParam "langRestrict" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + QueryParam "showPreorders" Bool :> + QueryParam "printType" Text :> + Get '[JSON] Volumes + +-- | Performs a book search. +-- +-- /See:/ 'volumesList' smart constructor. +data VolumesList = VolumesList + { _vlQuotaUser :: !(Maybe Text) + , _vlPrettyPrint :: !Bool + , _vlOrderBy :: !(Maybe Text) + , _vlUserIp :: !(Maybe Text) + , _vlLibraryRestrict :: !(Maybe Text) + , _vlPartner :: !(Maybe Text) + , _vlQ :: !Text + , _vlDownload :: !(Maybe Text) + , _vlKey :: !(Maybe Text) + , _vlSource :: !(Maybe Text) + , _vlProjection :: !(Maybe Text) + , _vlFilter :: !(Maybe Text) + , _vlLangRestrict :: !(Maybe Text) + , _vlOauthToken :: !(Maybe Text) + , _vlStartIndex :: !(Maybe Word32) + , _vlMaxResults :: !(Maybe Word32) + , _vlShowPreorders :: !(Maybe Bool) + , _vlPrintType :: !(Maybe Text) + , _vlFields :: !(Maybe Text) + , _vlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vlQuotaUser' +-- +-- * 'vlPrettyPrint' +-- +-- * 'vlOrderBy' +-- +-- * 'vlUserIp' +-- +-- * 'vlLibraryRestrict' +-- +-- * 'vlPartner' +-- +-- * 'vlQ' +-- +-- * 'vlDownload' +-- +-- * 'vlKey' +-- +-- * 'vlSource' +-- +-- * 'vlProjection' +-- +-- * 'vlFilter' +-- +-- * 'vlLangRestrict' +-- +-- * 'vlOauthToken' +-- +-- * 'vlStartIndex' +-- +-- * 'vlMaxResults' +-- +-- * 'vlShowPreorders' +-- +-- * 'vlPrintType' +-- +-- * 'vlFields' +-- +-- * 'vlAlt' +volumesList + :: Text -- ^ 'q' + -> VolumesList +volumesList pVlQ_ = + VolumesList + { _vlQuotaUser = Nothing + , _vlPrettyPrint = True + , _vlOrderBy = Nothing + , _vlUserIp = Nothing + , _vlLibraryRestrict = Nothing + , _vlPartner = Nothing + , _vlQ = pVlQ_ + , _vlDownload = Nothing + , _vlKey = Nothing + , _vlSource = Nothing + , _vlProjection = Nothing + , _vlFilter = Nothing + , _vlLangRestrict = Nothing + , _vlOauthToken = Nothing + , _vlStartIndex = Nothing + , _vlMaxResults = Nothing + , _vlShowPreorders = Nothing + , _vlPrintType = Nothing + , _vlFields = Nothing + , _vlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vlQuotaUser :: Lens' VolumesList' (Maybe Text) +vlQuotaUser + = lens _vlQuotaUser (\ s a -> s{_vlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vlPrettyPrint :: Lens' VolumesList' Bool +vlPrettyPrint + = lens _vlPrettyPrint + (\ s a -> s{_vlPrettyPrint = a}) + +-- | Sort search results. +vlOrderBy :: Lens' VolumesList' (Maybe Text) +vlOrderBy + = lens _vlOrderBy (\ s a -> s{_vlOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vlUserIp :: Lens' VolumesList' (Maybe Text) +vlUserIp = lens _vlUserIp (\ s a -> s{_vlUserIp = a}) + +-- | Restrict search to this user\'s library. +vlLibraryRestrict :: Lens' VolumesList' (Maybe Text) +vlLibraryRestrict + = lens _vlLibraryRestrict + (\ s a -> s{_vlLibraryRestrict = a}) + +-- | Restrict and brand results for partner ID. +vlPartner :: Lens' VolumesList' (Maybe Text) +vlPartner + = lens _vlPartner (\ s a -> s{_vlPartner = a}) + +-- | Full-text search query string. +vlQ :: Lens' VolumesList' Text +vlQ = lens _vlQ (\ s a -> s{_vlQ = a}) + +-- | Restrict to volumes by download availability. +vlDownload :: Lens' VolumesList' (Maybe Text) +vlDownload + = lens _vlDownload (\ s a -> s{_vlDownload = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vlKey :: Lens' VolumesList' (Maybe Text) +vlKey = lens _vlKey (\ s a -> s{_vlKey = a}) + +-- | String to identify the originator of this request. +vlSource :: Lens' VolumesList' (Maybe Text) +vlSource = lens _vlSource (\ s a -> s{_vlSource = a}) + +-- | Restrict information returned to a set of selected fields. +vlProjection :: Lens' VolumesList' (Maybe Text) +vlProjection + = lens _vlProjection (\ s a -> s{_vlProjection = a}) + +-- | Filter search results. +vlFilter :: Lens' VolumesList' (Maybe Text) +vlFilter = lens _vlFilter (\ s a -> s{_vlFilter = a}) + +-- | Restrict results to books with this language code. +vlLangRestrict :: Lens' VolumesList' (Maybe Text) +vlLangRestrict + = lens _vlLangRestrict + (\ s a -> s{_vlLangRestrict = a}) + +-- | OAuth 2.0 token for the current user. +vlOauthToken :: Lens' VolumesList' (Maybe Text) +vlOauthToken + = lens _vlOauthToken (\ s a -> s{_vlOauthToken = a}) + +-- | Index of the first result to return (starts at 0) +vlStartIndex :: Lens' VolumesList' (Maybe Word32) +vlStartIndex + = lens _vlStartIndex (\ s a -> s{_vlStartIndex = a}) + +-- | Maximum number of results to return. +vlMaxResults :: Lens' VolumesList' (Maybe Word32) +vlMaxResults + = lens _vlMaxResults (\ s a -> s{_vlMaxResults = a}) + +-- | Set to true to show books available for preorder. Defaults to false. +vlShowPreorders :: Lens' VolumesList' (Maybe Bool) +vlShowPreorders + = lens _vlShowPreorders + (\ s a -> s{_vlShowPreorders = a}) + +-- | Restrict to books or magazines. +vlPrintType :: Lens' VolumesList' (Maybe Text) +vlPrintType + = lens _vlPrintType (\ s a -> s{_vlPrintType = a}) + +-- | Selector specifying which fields to include in a partial response. +vlFields :: Lens' VolumesList' (Maybe Text) +vlFields = lens _vlFields (\ s a -> s{_vlFields = a}) + +-- | Data format for the response. +vlAlt :: Lens' VolumesList' Text +vlAlt = lens _vlAlt (\ s a -> s{_vlAlt = a}) + +instance GoogleRequest VolumesList' where + type Rs VolumesList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesList{..} + = go _vlQuotaUser _vlPrettyPrint _vlOrderBy _vlUserIp + _vlLibraryRestrict + _vlPartner + (Just _vlQ) + _vlDownload + _vlKey + _vlSource + _vlProjection + _vlFilter + _vlLangRestrict + _vlOauthToken + _vlStartIndex + _vlMaxResults + _vlShowPreorders + _vlPrintType + _vlFields + _vlAlt + where go + = clientWithRoute (Proxy :: Proxy VolumesListAPI) r u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs new file mode 100644 index 000000000..08fe40690 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs @@ -0,0 +1,225 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Mybooks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return a list of books in My Library. +-- +-- /See:/ for @BooksVolumesMybooksList@. +module Books.Volumes.Mybooks.List + ( + -- * REST Resource + VolumesMybooksListAPI + + -- * Creating a Request + , volumesMybooksList + , VolumesMybooksList + + -- * Request Lenses + , vmlProcessingState + , vmlQuotaUser + , vmlAcquireMethod + , vmlPrettyPrint + , vmlUserIp + , vmlLocale + , vmlKey + , vmlSource + , vmlOauthToken + , vmlStartIndex + , vmlMaxResults + , vmlFields + , vmlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesMybooksList@ which the +-- 'VolumesMybooksList' request conforms to. +type VolumesMybooksListAPI = + "volumes" :> + "mybooks" :> + QueryParams "processingState" Text :> + QueryParams "acquireMethod" Text :> + QueryParam "locale" Text :> + QueryParam "source" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> Get '[JSON] Volumes + +-- | Return a list of books in My Library. +-- +-- /See:/ 'volumesMybooksList' smart constructor. +data VolumesMybooksList = VolumesMybooksList + { _vmlProcessingState :: !(Maybe Text) + , _vmlQuotaUser :: !(Maybe Text) + , _vmlAcquireMethod :: !(Maybe Text) + , _vmlPrettyPrint :: !Bool + , _vmlUserIp :: !(Maybe Text) + , _vmlLocale :: !(Maybe Text) + , _vmlKey :: !(Maybe Text) + , _vmlSource :: !(Maybe Text) + , _vmlOauthToken :: !(Maybe Text) + , _vmlStartIndex :: !(Maybe Word32) + , _vmlMaxResults :: !(Maybe Word32) + , _vmlFields :: !(Maybe Text) + , _vmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesMybooksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vmlProcessingState' +-- +-- * 'vmlQuotaUser' +-- +-- * 'vmlAcquireMethod' +-- +-- * 'vmlPrettyPrint' +-- +-- * 'vmlUserIp' +-- +-- * 'vmlLocale' +-- +-- * 'vmlKey' +-- +-- * 'vmlSource' +-- +-- * 'vmlOauthToken' +-- +-- * 'vmlStartIndex' +-- +-- * 'vmlMaxResults' +-- +-- * 'vmlFields' +-- +-- * 'vmlAlt' +volumesMybooksList + :: VolumesMybooksList +volumesMybooksList = + VolumesMybooksList + { _vmlProcessingState = Nothing + , _vmlQuotaUser = Nothing + , _vmlAcquireMethod = Nothing + , _vmlPrettyPrint = True + , _vmlUserIp = Nothing + , _vmlLocale = Nothing + , _vmlKey = Nothing + , _vmlSource = Nothing + , _vmlOauthToken = Nothing + , _vmlStartIndex = Nothing + , _vmlMaxResults = Nothing + , _vmlFields = Nothing + , _vmlAlt = "json" + } + +-- | The processing state of the user uploaded volumes to be returned. +-- Applicable only if the UPLOADED is specified in the acquireMethod. +vmlProcessingState :: Lens' VolumesMybooksList' (Maybe Text) +vmlProcessingState + = lens _vmlProcessingState + (\ s a -> s{_vmlProcessingState = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vmlQuotaUser :: Lens' VolumesMybooksList' (Maybe Text) +vmlQuotaUser + = lens _vmlQuotaUser (\ s a -> s{_vmlQuotaUser = a}) + +-- | How the book was aquired +vmlAcquireMethod :: Lens' VolumesMybooksList' (Maybe Text) +vmlAcquireMethod + = lens _vmlAcquireMethod + (\ s a -> s{_vmlAcquireMethod = a}) + +-- | Returns response with indentations and line breaks. +vmlPrettyPrint :: Lens' VolumesMybooksList' Bool +vmlPrettyPrint + = lens _vmlPrettyPrint + (\ s a -> s{_vmlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vmlUserIp :: Lens' VolumesMybooksList' (Maybe Text) +vmlUserIp + = lens _vmlUserIp (\ s a -> s{_vmlUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Ex:\'en_US\'. Used for +-- generating recommendations. +vmlLocale :: Lens' VolumesMybooksList' (Maybe Text) +vmlLocale + = lens _vmlLocale (\ s a -> s{_vmlLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vmlKey :: Lens' VolumesMybooksList' (Maybe Text) +vmlKey = lens _vmlKey (\ s a -> s{_vmlKey = a}) + +-- | String to identify the originator of this request. +vmlSource :: Lens' VolumesMybooksList' (Maybe Text) +vmlSource + = lens _vmlSource (\ s a -> s{_vmlSource = a}) + +-- | OAuth 2.0 token for the current user. +vmlOauthToken :: Lens' VolumesMybooksList' (Maybe Text) +vmlOauthToken + = lens _vmlOauthToken + (\ s a -> s{_vmlOauthToken = a}) + +-- | Index of the first result to return (starts at 0) +vmlStartIndex :: Lens' VolumesMybooksList' (Maybe Word32) +vmlStartIndex + = lens _vmlStartIndex + (\ s a -> s{_vmlStartIndex = a}) + +-- | Maximum number of results to return. +vmlMaxResults :: Lens' VolumesMybooksList' (Maybe Word32) +vmlMaxResults + = lens _vmlMaxResults + (\ s a -> s{_vmlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +vmlFields :: Lens' VolumesMybooksList' (Maybe Text) +vmlFields + = lens _vmlFields (\ s a -> s{_vmlFields = a}) + +-- | Data format for the response. +vmlAlt :: Lens' VolumesMybooksList' Text +vmlAlt = lens _vmlAlt (\ s a -> s{_vmlAlt = a}) + +instance GoogleRequest VolumesMybooksList' where + type Rs VolumesMybooksList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesMybooksList{..} + = go _vmlProcessingState _vmlQuotaUser + _vmlAcquireMethod + _vmlPrettyPrint + _vmlUserIp + _vmlLocale + _vmlKey + _vmlSource + _vmlOauthToken + _vmlStartIndex + _vmlMaxResults + _vmlFields + _vmlAlt + where go + = clientWithRoute + (Proxy :: Proxy VolumesMybooksListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/List.hs new file mode 100644 index 000000000..da81b51f5 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/List.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Recommended.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return a list of recommended books for the current user. +-- +-- /See:/ for @BooksVolumesRecommendedList@. +module Books.Volumes.Recommended.List + ( + -- * REST Resource + VolumesRecommendedListAPI + + -- * Creating a Request + , volumesRecommendedList + , VolumesRecommendedList + + -- * Request Lenses + , vrlQuotaUser + , vrlPrettyPrint + , vrlUserIp + , vrlLocale + , vrlMaxAllowedMaturityRating + , vrlKey + , vrlSource + , vrlOauthToken + , vrlFields + , vrlAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesRecommendedList@ which the +-- 'VolumesRecommendedList' request conforms to. +type VolumesRecommendedListAPI = + "volumes" :> + "recommended" :> + QueryParam "locale" Text :> + QueryParam "maxAllowedMaturityRating" Text :> + QueryParam "source" Text :> Get '[JSON] Volumes + +-- | Return a list of recommended books for the current user. +-- +-- /See:/ 'volumesRecommendedList' smart constructor. +data VolumesRecommendedList = VolumesRecommendedList + { _vrlQuotaUser :: !(Maybe Text) + , _vrlPrettyPrint :: !Bool + , _vrlUserIp :: !(Maybe Text) + , _vrlLocale :: !(Maybe Text) + , _vrlMaxAllowedMaturityRating :: !(Maybe Text) + , _vrlKey :: !(Maybe Text) + , _vrlSource :: !(Maybe Text) + , _vrlOauthToken :: !(Maybe Text) + , _vrlFields :: !(Maybe Text) + , _vrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesRecommendedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vrlQuotaUser' +-- +-- * 'vrlPrettyPrint' +-- +-- * 'vrlUserIp' +-- +-- * 'vrlLocale' +-- +-- * 'vrlMaxAllowedMaturityRating' +-- +-- * 'vrlKey' +-- +-- * 'vrlSource' +-- +-- * 'vrlOauthToken' +-- +-- * 'vrlFields' +-- +-- * 'vrlAlt' +volumesRecommendedList + :: VolumesRecommendedList +volumesRecommendedList = + VolumesRecommendedList + { _vrlQuotaUser = Nothing + , _vrlPrettyPrint = True + , _vrlUserIp = Nothing + , _vrlLocale = Nothing + , _vrlMaxAllowedMaturityRating = Nothing + , _vrlKey = Nothing + , _vrlSource = Nothing + , _vrlOauthToken = Nothing + , _vrlFields = Nothing + , _vrlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vrlQuotaUser :: Lens' VolumesRecommendedList' (Maybe Text) +vrlQuotaUser + = lens _vrlQuotaUser (\ s a -> s{_vrlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vrlPrettyPrint :: Lens' VolumesRecommendedList' Bool +vrlPrettyPrint + = lens _vrlPrettyPrint + (\ s a -> s{_vrlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vrlUserIp :: Lens' VolumesRecommendedList' (Maybe Text) +vrlUserIp + = lens _vrlUserIp (\ s a -> s{_vrlUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Ex: \'en_US\'. Used for +-- generating recommendations. +vrlLocale :: Lens' VolumesRecommendedList' (Maybe Text) +vrlLocale + = lens _vrlLocale (\ s a -> s{_vrlLocale = a}) + +-- | The maximum allowed maturity rating of returned recommendations. Books +-- with a higher maturity rating are filtered out. +vrlMaxAllowedMaturityRating :: Lens' VolumesRecommendedList' (Maybe Text) +vrlMaxAllowedMaturityRating + = lens _vrlMaxAllowedMaturityRating + (\ s a -> s{_vrlMaxAllowedMaturityRating = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vrlKey :: Lens' VolumesRecommendedList' (Maybe Text) +vrlKey = lens _vrlKey (\ s a -> s{_vrlKey = a}) + +-- | String to identify the originator of this request. +vrlSource :: Lens' VolumesRecommendedList' (Maybe Text) +vrlSource + = lens _vrlSource (\ s a -> s{_vrlSource = a}) + +-- | OAuth 2.0 token for the current user. +vrlOauthToken :: Lens' VolumesRecommendedList' (Maybe Text) +vrlOauthToken + = lens _vrlOauthToken + (\ s a -> s{_vrlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vrlFields :: Lens' VolumesRecommendedList' (Maybe Text) +vrlFields + = lens _vrlFields (\ s a -> s{_vrlFields = a}) + +-- | Data format for the response. +vrlAlt :: Lens' VolumesRecommendedList' Text +vrlAlt = lens _vrlAlt (\ s a -> s{_vrlAlt = a}) + +instance GoogleRequest VolumesRecommendedList' where + type Rs VolumesRecommendedList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesRecommendedList{..} + = go _vrlQuotaUser _vrlPrettyPrint _vrlUserIp + _vrlLocale + _vrlMaxAllowedMaturityRating + _vrlKey + _vrlSource + _vrlOauthToken + _vrlFields + _vrlAlt + where go + = clientWithRoute + (Proxy :: Proxy VolumesRecommendedListAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/Rate.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/Rate.hs new file mode 100644 index 000000000..70a2e8e79 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Recommended/Rate.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Recommended.Rate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Rate a recommended book for the current user. +-- +-- /See:/ for @BooksVolumesRecommendedRate@. +module Books.Volumes.Recommended.Rate + ( + -- * REST Resource + VolumesRecommendedRateAPI + + -- * Creating a Request + , volumesRecommendedRate + , VolumesRecommendedRate + + -- * Request Lenses + , vrrQuotaUser + , vrrRating + , vrrPrettyPrint + , vrrUserIp + , vrrLocale + , vrrKey + , vrrVolumeId + , vrrSource + , vrrOauthToken + , vrrFields + , vrrAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesRecommendedRate@ which the +-- 'VolumesRecommendedRate' request conforms to. +type VolumesRecommendedRateAPI = + "volumes" :> + "recommended" :> + "rate" :> + QueryParam "rating" Text :> + QueryParam "locale" Text :> + QueryParam "volumeId" Text :> + QueryParam "source" Text :> + Post '[JSON] BooksVolumesRecommendedRateResponse + +-- | Rate a recommended book for the current user. +-- +-- /See:/ 'volumesRecommendedRate' smart constructor. +data VolumesRecommendedRate = VolumesRecommendedRate + { _vrrQuotaUser :: !(Maybe Text) + , _vrrRating :: !Text + , _vrrPrettyPrint :: !Bool + , _vrrUserIp :: !(Maybe Text) + , _vrrLocale :: !(Maybe Text) + , _vrrKey :: !(Maybe Text) + , _vrrVolumeId :: !Text + , _vrrSource :: !(Maybe Text) + , _vrrOauthToken :: !(Maybe Text) + , _vrrFields :: !(Maybe Text) + , _vrrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesRecommendedRate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vrrQuotaUser' +-- +-- * 'vrrRating' +-- +-- * 'vrrPrettyPrint' +-- +-- * 'vrrUserIp' +-- +-- * 'vrrLocale' +-- +-- * 'vrrKey' +-- +-- * 'vrrVolumeId' +-- +-- * 'vrrSource' +-- +-- * 'vrrOauthToken' +-- +-- * 'vrrFields' +-- +-- * 'vrrAlt' +volumesRecommendedRate + :: Text -- ^ 'rating' + -> Text -- ^ 'volumeId' + -> VolumesRecommendedRate +volumesRecommendedRate pVrrRating_ pVrrVolumeId_ = + VolumesRecommendedRate + { _vrrQuotaUser = Nothing + , _vrrRating = pVrrRating_ + , _vrrPrettyPrint = True + , _vrrUserIp = Nothing + , _vrrLocale = Nothing + , _vrrKey = Nothing + , _vrrVolumeId = pVrrVolumeId_ + , _vrrSource = Nothing + , _vrrOauthToken = Nothing + , _vrrFields = Nothing + , _vrrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vrrQuotaUser :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrQuotaUser + = lens _vrrQuotaUser (\ s a -> s{_vrrQuotaUser = a}) + +-- | Rating to be given to the volume. +vrrRating :: Lens' VolumesRecommendedRate' Text +vrrRating + = lens _vrrRating (\ s a -> s{_vrrRating = a}) + +-- | Returns response with indentations and line breaks. +vrrPrettyPrint :: Lens' VolumesRecommendedRate' Bool +vrrPrettyPrint + = lens _vrrPrettyPrint + (\ s a -> s{_vrrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vrrUserIp :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrUserIp + = lens _vrrUserIp (\ s a -> s{_vrrUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Ex: \'en_US\'. Used for +-- generating recommendations. +vrrLocale :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrLocale + = lens _vrrLocale (\ s a -> s{_vrrLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vrrKey :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrKey = lens _vrrKey (\ s a -> s{_vrrKey = a}) + +-- | ID of the source volume. +vrrVolumeId :: Lens' VolumesRecommendedRate' Text +vrrVolumeId + = lens _vrrVolumeId (\ s a -> s{_vrrVolumeId = a}) + +-- | String to identify the originator of this request. +vrrSource :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrSource + = lens _vrrSource (\ s a -> s{_vrrSource = a}) + +-- | OAuth 2.0 token for the current user. +vrrOauthToken :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrOauthToken + = lens _vrrOauthToken + (\ s a -> s{_vrrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vrrFields :: Lens' VolumesRecommendedRate' (Maybe Text) +vrrFields + = lens _vrrFields (\ s a -> s{_vrrFields = a}) + +-- | Data format for the response. +vrrAlt :: Lens' VolumesRecommendedRate' Text +vrrAlt = lens _vrrAlt (\ s a -> s{_vrrAlt = a}) + +instance GoogleRequest VolumesRecommendedRate' where + type Rs VolumesRecommendedRate' = + BooksVolumesRecommendedRateResponse + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesRecommendedRate{..} + = go _vrrQuotaUser (Just _vrrRating) _vrrPrettyPrint + _vrrUserIp + _vrrLocale + _vrrKey + (Just _vrrVolumeId) + _vrrSource + _vrrOauthToken + _vrrFields + _vrrAlt + where go + = clientWithRoute + (Proxy :: Proxy VolumesRecommendedRateAPI) + r + u diff --git a/gogol-books/gen/Network/Google/Resource/Books/Volumes/Useruploaded/List.hs b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Useruploaded/List.hs new file mode 100644 index 000000000..d5cb9c1e2 --- /dev/null +++ b/gogol-books/gen/Network/Google/Resource/Books/Volumes/Useruploaded/List.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Books.Volumes.Useruploaded.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return a list of books uploaded by the current user. +-- +-- /See:/ for @BooksVolumesUseruploadedList@. +module Books.Volumes.Useruploaded.List + ( + -- * REST Resource + VolumesUseruploadedListAPI + + -- * Creating a Request + , volumesUseruploadedList + , VolumesUseruploadedList + + -- * Request Lenses + , vulProcessingState + , vulQuotaUser + , vulPrettyPrint + , vulUserIp + , vulLocale + , vulKey + , vulVolumeId + , vulSource + , vulOauthToken + , vulStartIndex + , vulMaxResults + , vulFields + , vulAlt + ) where + +import Network.Google.Books.Types +import Network.Google.Prelude + +-- | A resource alias for @BooksVolumesUseruploadedList@ which the +-- 'VolumesUseruploadedList' request conforms to. +type VolumesUseruploadedListAPI = + "volumes" :> + "useruploaded" :> + QueryParams "processingState" Text :> + QueryParam "locale" Text :> + QueryParams "volumeId" Text :> + QueryParam "source" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> Get '[JSON] Volumes + +-- | Return a list of books uploaded by the current user. +-- +-- /See:/ 'volumesUseruploadedList' smart constructor. +data VolumesUseruploadedList = VolumesUseruploadedList + { _vulProcessingState :: !(Maybe Text) + , _vulQuotaUser :: !(Maybe Text) + , _vulPrettyPrint :: !Bool + , _vulUserIp :: !(Maybe Text) + , _vulLocale :: !(Maybe Text) + , _vulKey :: !(Maybe Text) + , _vulVolumeId :: !(Maybe Text) + , _vulSource :: !(Maybe Text) + , _vulOauthToken :: !(Maybe Text) + , _vulStartIndex :: !(Maybe Word32) + , _vulMaxResults :: !(Maybe Word32) + , _vulFields :: !(Maybe Text) + , _vulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VolumesUseruploadedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vulProcessingState' +-- +-- * 'vulQuotaUser' +-- +-- * 'vulPrettyPrint' +-- +-- * 'vulUserIp' +-- +-- * 'vulLocale' +-- +-- * 'vulKey' +-- +-- * 'vulVolumeId' +-- +-- * 'vulSource' +-- +-- * 'vulOauthToken' +-- +-- * 'vulStartIndex' +-- +-- * 'vulMaxResults' +-- +-- * 'vulFields' +-- +-- * 'vulAlt' +volumesUseruploadedList + :: VolumesUseruploadedList +volumesUseruploadedList = + VolumesUseruploadedList + { _vulProcessingState = Nothing + , _vulQuotaUser = Nothing + , _vulPrettyPrint = True + , _vulUserIp = Nothing + , _vulLocale = Nothing + , _vulKey = Nothing + , _vulVolumeId = Nothing + , _vulSource = Nothing + , _vulOauthToken = Nothing + , _vulStartIndex = Nothing + , _vulMaxResults = Nothing + , _vulFields = Nothing + , _vulAlt = "json" + } + +-- | The processing state of the user uploaded volumes to be returned. +vulProcessingState :: Lens' VolumesUseruploadedList' (Maybe Text) +vulProcessingState + = lens _vulProcessingState + (\ s a -> s{_vulProcessingState = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vulQuotaUser :: Lens' VolumesUseruploadedList' (Maybe Text) +vulQuotaUser + = lens _vulQuotaUser (\ s a -> s{_vulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vulPrettyPrint :: Lens' VolumesUseruploadedList' Bool +vulPrettyPrint + = lens _vulPrettyPrint + (\ s a -> s{_vulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vulUserIp :: Lens' VolumesUseruploadedList' (Maybe Text) +vulUserIp + = lens _vulUserIp (\ s a -> s{_vulUserIp = a}) + +-- | ISO-639-1 language and ISO-3166-1 country code. Ex: \'en_US\'. Used for +-- generating recommendations. +vulLocale :: Lens' VolumesUseruploadedList' (Maybe Text) +vulLocale + = lens _vulLocale (\ s a -> s{_vulLocale = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vulKey :: Lens' VolumesUseruploadedList' (Maybe Text) +vulKey = lens _vulKey (\ s a -> s{_vulKey = a}) + +-- | The ids of the volumes to be returned. If not specified all that match +-- the processingState are returned. +vulVolumeId :: Lens' VolumesUseruploadedList' (Maybe Text) +vulVolumeId + = lens _vulVolumeId (\ s a -> s{_vulVolumeId = a}) + +-- | String to identify the originator of this request. +vulSource :: Lens' VolumesUseruploadedList' (Maybe Text) +vulSource + = lens _vulSource (\ s a -> s{_vulSource = a}) + +-- | OAuth 2.0 token for the current user. +vulOauthToken :: Lens' VolumesUseruploadedList' (Maybe Text) +vulOauthToken + = lens _vulOauthToken + (\ s a -> s{_vulOauthToken = a}) + +-- | Index of the first result to return (starts at 0) +vulStartIndex :: Lens' VolumesUseruploadedList' (Maybe Word32) +vulStartIndex + = lens _vulStartIndex + (\ s a -> s{_vulStartIndex = a}) + +-- | Maximum number of results to return. +vulMaxResults :: Lens' VolumesUseruploadedList' (Maybe Word32) +vulMaxResults + = lens _vulMaxResults + (\ s a -> s{_vulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +vulFields :: Lens' VolumesUseruploadedList' (Maybe Text) +vulFields + = lens _vulFields (\ s a -> s{_vulFields = a}) + +-- | Data format for the response. +vulAlt :: Lens' VolumesUseruploadedList' Text +vulAlt = lens _vulAlt (\ s a -> s{_vulAlt = a}) + +instance GoogleRequest VolumesUseruploadedList' where + type Rs VolumesUseruploadedList' = Volumes + request = requestWithRoute defReq booksURL + requestWithRoute r u VolumesUseruploadedList{..} + = go _vulProcessingState _vulQuotaUser + _vulPrettyPrint + _vulUserIp + _vulLocale + _vulKey + _vulVolumeId + _vulSource + _vulOauthToken + _vulStartIndex + _vulMaxResults + _vulFields + _vulAlt + where go + = clientWithRoute + (Proxy :: Proxy VolumesUseruploadedListAPI) + r + u diff --git a/gogol-books/gogol-books.cabal b/gogol-books/gogol-books.cabal new file mode 100644 index 000000000..7c83f4d48 --- /dev/null +++ b/gogol-books/gogol-books.cabal @@ -0,0 +1,86 @@ +name: gogol-books +version: 0.0.1 +synopsis: Books API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you search for books and manage your Google Books library. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Books + , Network.Google.Books.Types + , Network.Google.Resource.Books.Bookshelves.Get + , Network.Google.Resource.Books.Bookshelves.List + , Network.Google.Resource.Books.Bookshelves.Volumes.List + , Network.Google.Resource.Books.Cloudloading.AddBook + , Network.Google.Resource.Books.Cloudloading.DeleteBook + , Network.Google.Resource.Books.Cloudloading.UpdateBook + , Network.Google.Resource.Books.Dictionary.ListOfflineMetadata + , Network.Google.Resource.Books.Layers.AnnotationData.Get + , Network.Google.Resource.Books.Layers.AnnotationData.List + , Network.Google.Resource.Books.Layers.Get + , Network.Google.Resource.Books.Layers.List + , Network.Google.Resource.Books.Layers.VolumeAnnotations.Get + , Network.Google.Resource.Books.Layers.VolumeAnnotations.List + , Network.Google.Resource.Books.Myconfig.GetUserSettings + , Network.Google.Resource.Books.Myconfig.ReleaseDownloadAccess + , Network.Google.Resource.Books.Myconfig.RequestAccess + , Network.Google.Resource.Books.Myconfig.SyncVolumeLicenses + , Network.Google.Resource.Books.Myconfig.UpdateUserSettings + , Network.Google.Resource.Books.Mylibrary.Annotations.Delete + , Network.Google.Resource.Books.Mylibrary.Annotations.Insert + , Network.Google.Resource.Books.Mylibrary.Annotations.List + , Network.Google.Resource.Books.Mylibrary.Annotations.Summary + , Network.Google.Resource.Books.Mylibrary.Annotations.Update + , Network.Google.Resource.Books.Mylibrary.Bookshelves.AddVolume + , Network.Google.Resource.Books.Mylibrary.Bookshelves.ClearVolumes + , Network.Google.Resource.Books.Mylibrary.Bookshelves.Get + , Network.Google.Resource.Books.Mylibrary.Bookshelves.List + , Network.Google.Resource.Books.Mylibrary.Bookshelves.MoveVolume + , Network.Google.Resource.Books.Mylibrary.Bookshelves.RemoveVolume + , Network.Google.Resource.Books.Mylibrary.Bookshelves.Volumes.List + , Network.Google.Resource.Books.Mylibrary.Readingpositions.Get + , Network.Google.Resource.Books.Mylibrary.Readingpositions.SetPosition + , Network.Google.Resource.Books.Onboarding.ListCategories + , Network.Google.Resource.Books.Onboarding.ListCategoryVolumes + , Network.Google.Resource.Books.Promooffer.Accept + , Network.Google.Resource.Books.Promooffer.Dismiss + , Network.Google.Resource.Books.Promooffer.Get + , Network.Google.Resource.Books.Volumes.Associated.List + , Network.Google.Resource.Books.Volumes.Get + , Network.Google.Resource.Books.Volumes.List + , Network.Google.Resource.Books.Volumes.Mybooks.List + , Network.Google.Resource.Books.Volumes.Recommended.List + , Network.Google.Resource.Books.Volumes.Recommended.Rate + , Network.Google.Resource.Books.Volumes.Useruploaded.List + + other-modules: + Network.Google.Books.Types.Product + , Network.Google.Books.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-books/src/.gitkeep b/gogol-books/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-civicinfo/LICENSE b/gogol-civicinfo/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-civicinfo/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-civicinfo/Makefile b/gogol-civicinfo/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-civicinfo/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-civicinfo/README.md b/gogol-civicinfo/README.md new file mode 100644 index 000000000..4f5380c13 --- /dev/null +++ b/gogol-civicinfo/README.md @@ -0,0 +1,28 @@ +# gogol-civicinfo + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Civic Information API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-civicinfo` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-civicinfo/Setup.hs b/gogol-civicinfo/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-civicinfo/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-civicinfo/gen/Network/Google/CivicInfo.hs b/gogol-civicinfo/gen/Network/Google/CivicInfo.hs new file mode 100644 index 000000000..385d07a6e --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/CivicInfo.hs @@ -0,0 +1,268 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.CivicInfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | An API for accessing civic information. +-- +-- /See:/ +module Network.Google.CivicInfo + ( + -- * API + CivicInfoAPI + , civicInfoAPI + , civicInfoURL + + -- * Service Methods + + -- * REST Resources + + -- ** CivicinfoDivisionsSearch + , module CivicInfo.Divisions.Search + + -- ** CivicinfoElectionsElectionQuery + , module CivicInfo.Elections.ElectionQuery + + -- ** CivicinfoElectionsVoterInfoQuery + , module CivicInfo.Elections.VoterInfoQuery + + -- ** CivicinfoRepresentativesRepresentativeInfoByAddress + , module CivicInfo.Representatives.RepresentativeInfoByAddress + + -- ** CivicinfoRepresentativesRepresentativeInfoByDivision + , module CivicInfo.Representatives.RepresentativeInfoByDivision + + -- * Types + + -- ** VoterInfoResponse + , VoterInfoResponse + , voterInfoResponse + , virOtherElections + , virContests + , virState + , virKind + , virDropOffLocations + , virElection + , virNormalizedInput + , virMailOnly + , virEarlyVoteSites + , virPollingLocations + , virPrecinctId + + -- ** PollingLocation + , PollingLocation + , pollingLocation + , plVoterServices + , plEndDate + , plSources + , plAddress + , plStartDate + , plPollingHours + , plName + , plId + , plNotes + + -- ** GeographicDivision + , GeographicDivision + , geographicDivision + , gdName + , gdOfficeIndices + , gdAlsoKnownAs + + -- ** Candidate + , Candidate + , candidate + , cEmail + , cPhone + , cPhotoUrl + , cChannels + , cCandidateUrl + , cOrderOnBallot + , cName + , cParty + + -- ** Office + , Office + , office + , oDivisionId + , oRoles + , oOfficialIndices + , oSources + , oName + , oLevels + + -- ** Election + , Election + , election + , eOcdDivisionId + , eElectionDay + , eName + , eId + + -- ** Channel + , Channel + , channel + , cId + , cType + + -- ** RepresentativeInfoResponse + , RepresentativeInfoResponse + , representativeInfoResponse + , rirKind + , rirNormalizedInput + , rirOfficials + , rirDivisions + , rirOffices + + -- ** DivisionSearchResult + , DivisionSearchResult + , divisionSearchResult + , dsrAliases + , dsrName + , dsrOcdId + + -- ** AdministrativeBody + , AdministrativeBody + , administrativeBody + , abCorrespondenceAddress + , abAbsenteeVotingInfoUrl + , abHoursOfOperation + , abBallotInfoUrl + , abPhysicalAddress + , abElectionRegistrationConfirmationUrl + , abElectionInfoUrl + , abVotingLocationFinderUrl + , abElectionOfficials + , abName + , abElectionRulesUrl + , abVoterServices + , abElectionRegistrationUrl + + -- ** Contest + , Contest + , contest + , conReferendumPassageThreshold + , conRoles + , conReferendumUrl + , conReferendumEffectOfAbstain + , conReferendumSubtitle + , conNumberVotingFor + , conOffice + , conReferendumConStatement + , conSources + , conReferendumProStatement + , conReferendumBallotResponses + , conNumberElected + , conSpecial + , conReferendumText + , conPrimaryParty + , conId + , conType + , conElectorateSpecifications + , conReferendumBrief + , conDistrict + , conLevel + , conCandidates + , conReferendumTitle + , conBallotPlacement + + -- ** DivisionSearchResponse + , DivisionSearchResponse + , divisionSearchResponse + , dsrResults + , dsrKind + + -- ** ElectionOfficial + , ElectionOfficial + , electionOfficial + , eoFaxNumber + , eoName + , eoOfficePhoneNumber + , eoEmailAddress + , eoTitle + + -- ** RepresentativeInfoData + , RepresentativeInfoData + , representativeInfoData + , ridOfficials + , ridDivisions + , ridOffices + + -- ** Source + , Source + , source + , sName + , sOfficial + + -- ** ElectoralDistrict + , ElectoralDistrict + , electoralDistrict + , edName + , edScope + , edId + + -- ** SimpleAddressType + , SimpleAddressType + , simpleAddressType + , satLine2 + , satState + , satLine3 + , satZip + , satCity + , satLine1 + , satLocationName + + -- ** AdministrationRegion + , AdministrationRegion + , administrationRegion + , arLocalJurisdiction + , arSources + , arName + , arElectionAdministrationBody + , arId + + -- ** ElectionsQueryResponse + , ElectionsQueryResponse + , electionsQueryResponse + , eqrKind + , eqrElections + + -- ** Official + , Official + , official + , offPhotoUrl + , offUrls + , offChannels + , offAddress + , offPhones + , offName + , offEmails + , offParty + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude +import Network.Google.Resource.CivicInfo.Divisions.Search +import Network.Google.Resource.CivicInfo.Elections.ElectionQuery +import Network.Google.Resource.CivicInfo.Elections.VoterInfoQuery +import Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByAddress +import Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByDivision + +{- $resources +TODO +-} + +type CivicInfoAPI = + Elections :<|> Divisions :<|> Representatives + +civicInfoAPI :: Proxy CivicInfoAPI +civicInfoAPI = Proxy diff --git a/gogol-civicinfo/gen/Network/Google/CivicInfo/Types.hs b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types.hs new file mode 100644 index 000000000..24a9c742b --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CivicInfo.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CivicInfo.Types + ( + -- * Service URL + civicInfoURL + + -- * VoterInfoResponse + , VoterInfoResponse + , voterInfoResponse + , virOtherElections + , virContests + , virState + , virKind + , virDropOffLocations + , virElection + , virNormalizedInput + , virMailOnly + , virEarlyVoteSites + , virPollingLocations + , virPrecinctId + + -- * PollingLocation + , PollingLocation + , pollingLocation + , plVoterServices + , plEndDate + , plSources + , plAddress + , plStartDate + , plPollingHours + , plName + , plId + , plNotes + + -- * GeographicDivision + , GeographicDivision + , geographicDivision + , gdName + , gdOfficeIndices + , gdAlsoKnownAs + + -- * Candidate + , Candidate + , candidate + , cEmail + , cPhone + , cPhotoUrl + , cChannels + , cCandidateUrl + , cOrderOnBallot + , cName + , cParty + + -- * Office + , Office + , office + , oDivisionId + , oRoles + , oOfficialIndices + , oSources + , oName + , oLevels + + -- * Election + , Election + , election + , eOcdDivisionId + , eElectionDay + , eName + , eId + + -- * Channel + , Channel + , channel + , cId + , cType + + -- * RepresentativeInfoResponse + , RepresentativeInfoResponse + , representativeInfoResponse + , rirKind + , rirNormalizedInput + , rirOfficials + , rirDivisions + , rirOffices + + -- * DivisionSearchResult + , DivisionSearchResult + , divisionSearchResult + , dsrAliases + , dsrName + , dsrOcdId + + -- * AdministrativeBody + , AdministrativeBody + , administrativeBody + , abCorrespondenceAddress + , abAbsenteeVotingInfoUrl + , abHoursOfOperation + , abBallotInfoUrl + , abPhysicalAddress + , abElectionRegistrationConfirmationUrl + , abElectionInfoUrl + , abVotingLocationFinderUrl + , abElectionOfficials + , abName + , abElectionRulesUrl + , abVoterServices + , abElectionRegistrationUrl + + -- * Contest + , Contest + , contest + , conReferendumPassageThreshold + , conRoles + , conReferendumUrl + , conReferendumEffectOfAbstain + , conReferendumSubtitle + , conNumberVotingFor + , conOffice + , conReferendumConStatement + , conSources + , conReferendumProStatement + , conReferendumBallotResponses + , conNumberElected + , conSpecial + , conReferendumText + , conPrimaryParty + , conId + , conType + , conElectorateSpecifications + , conReferendumBrief + , conDistrict + , conLevel + , conCandidates + , conReferendumTitle + , conBallotPlacement + + -- * DivisionSearchResponse + , DivisionSearchResponse + , divisionSearchResponse + , dsrResults + , dsrKind + + -- * ElectionOfficial + , ElectionOfficial + , electionOfficial + , eoFaxNumber + , eoName + , eoOfficePhoneNumber + , eoEmailAddress + , eoTitle + + -- * RepresentativeInfoData + , RepresentativeInfoData + , representativeInfoData + , ridOfficials + , ridDivisions + , ridOffices + + -- * Source + , Source + , source + , sName + , sOfficial + + -- * ElectoralDistrict + , ElectoralDistrict + , electoralDistrict + , edName + , edScope + , edId + + -- * SimpleAddressType + , SimpleAddressType + , simpleAddressType + , satLine2 + , satState + , satLine3 + , satZip + , satCity + , satLine1 + , satLocationName + + -- * AdministrationRegion + , AdministrationRegion + , administrationRegion + , arLocalJurisdiction + , arSources + , arName + , arElectionAdministrationBody + , arId + + -- * ElectionsQueryResponse + , ElectionsQueryResponse + , electionsQueryResponse + , eqrKind + , eqrElections + + -- * Official + , Official + , official + , offPhotoUrl + , offUrls + , offChannels + , offAddress + , offPhones + , offName + , offEmails + , offParty + ) where + +import Network.Google.CivicInfo.Types.Product +import Network.Google.CivicInfo.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google Civic Information API. +civicInfoURL :: BaseURL +civicInfoURL + = BaseUrl Https + "https://www.googleapis.com/civicinfo/v2/" + 443 diff --git a/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs new file mode 100644 index 000000000..a95db1323 --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs @@ -0,0 +1,2078 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CivicInfo.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CivicInfo.Types.Product where + +import Network.Google.CivicInfo.Types.Sum +import Network.Google.Prelude + +-- | The result of a voter info lookup query. +-- +-- /See:/ 'voterInfoResponse' smart constructor. +data VoterInfoResponse = VoterInfoResponse + { _virOtherElections :: !(Maybe [Maybe Election]) + , _virContests :: !(Maybe [Maybe Contest]) + , _virState :: !(Maybe [Maybe AdministrationRegion]) + , _virKind :: !Text + , _virDropOffLocations :: !(Maybe [Maybe PollingLocation]) + , _virElection :: !(Maybe (Maybe Election)) + , _virNormalizedInput :: !(Maybe (Maybe SimpleAddressType)) + , _virMailOnly :: !(Maybe Bool) + , _virEarlyVoteSites :: !(Maybe [Maybe PollingLocation]) + , _virPollingLocations :: !(Maybe [Maybe PollingLocation]) + , _virPrecinctId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VoterInfoResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'virOtherElections' +-- +-- * 'virContests' +-- +-- * 'virState' +-- +-- * 'virKind' +-- +-- * 'virDropOffLocations' +-- +-- * 'virElection' +-- +-- * 'virNormalizedInput' +-- +-- * 'virMailOnly' +-- +-- * 'virEarlyVoteSites' +-- +-- * 'virPollingLocations' +-- +-- * 'virPrecinctId' +voterInfoResponse + :: VoterInfoResponse +voterInfoResponse = + VoterInfoResponse + { _virOtherElections = Nothing + , _virContests = Nothing + , _virState = Nothing + , _virKind = "civicinfo#voterInfoResponse" + , _virDropOffLocations = Nothing + , _virElection = Nothing + , _virNormalizedInput = Nothing + , _virMailOnly = Nothing + , _virEarlyVoteSites = Nothing + , _virPollingLocations = Nothing + , _virPrecinctId = Nothing + } + +-- | If no election ID was specified in the query, and there was more than +-- one election with data for the given voter, this will contain +-- information about the other elections that could apply. +virOtherElections :: Lens' VoterInfoResponse [Maybe Election] +virOtherElections + = lens _virOtherElections + (\ s a -> s{_virOtherElections = a}) + . _Default + . _Coerce + +-- | Contests that will appear on the voter\'s ballot. +virContests :: Lens' VoterInfoResponse [Maybe Contest] +virContests + = lens _virContests (\ s a -> s{_virContests = a}) . + _Default + . _Coerce + +-- | Local Election Information for the state that the voter votes in. For +-- the US, there will only be one element in this array. +virState :: Lens' VoterInfoResponse [Maybe AdministrationRegion] +virState + = lens _virState (\ s a -> s{_virState = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"civicinfo#voterInfoResponse\". +virKind :: Lens' VoterInfoResponse Text +virKind = lens _virKind (\ s a -> s{_virKind = a}) + +-- | Locations where a voter is eligible to drop off a completed ballot. The +-- voter must have received and completed a ballot prior to arriving at the +-- location. The location may not have ballots available on the premises. +-- These locations could be open on or before election day as indicated in +-- the pollingHours field. +virDropOffLocations :: Lens' VoterInfoResponse [Maybe PollingLocation] +virDropOffLocations + = lens _virDropOffLocations + (\ s a -> s{_virDropOffLocations = a}) + . _Default + . _Coerce + +-- | The election that was queried. +virElection :: Lens' VoterInfoResponse (Maybe (Maybe Election)) +virElection + = lens _virElection (\ s a -> s{_virElection = a}) + +-- | The normalized version of the requested address +virNormalizedInput :: Lens' VoterInfoResponse (Maybe (Maybe SimpleAddressType)) +virNormalizedInput + = lens _virNormalizedInput + (\ s a -> s{_virNormalizedInput = a}) + +-- | Specifies whether voters in the precinct vote only by mailing their +-- ballots (with the possible option of dropping off their ballots as +-- well). +virMailOnly :: Lens' VoterInfoResponse (Maybe Bool) +virMailOnly + = lens _virMailOnly (\ s a -> s{_virMailOnly = a}) + +-- | Locations where the voter is eligible to vote early, prior to election +-- day. +virEarlyVoteSites :: Lens' VoterInfoResponse [Maybe PollingLocation] +virEarlyVoteSites + = lens _virEarlyVoteSites + (\ s a -> s{_virEarlyVoteSites = a}) + . _Default + . _Coerce + +-- | Locations where the voter is eligible to vote on election day. +virPollingLocations :: Lens' VoterInfoResponse [Maybe PollingLocation] +virPollingLocations + = lens _virPollingLocations + (\ s a -> s{_virPollingLocations = a}) + . _Default + . _Coerce + +virPrecinctId :: Lens' VoterInfoResponse (Maybe Text) +virPrecinctId + = lens _virPrecinctId + (\ s a -> s{_virPrecinctId = a}) + +instance FromJSON VoterInfoResponse where + parseJSON + = withObject "VoterInfoResponse" + (\ o -> + VoterInfoResponse <$> + (o .:? "otherElections" .!= mempty) <*> + (o .:? "contests" .!= mempty) + <*> (o .:? "state" .!= mempty) + <*> (o .:? "kind" .!= "civicinfo#voterInfoResponse") + <*> (o .:? "dropOffLocations" .!= mempty) + <*> (o .:? "election") + <*> (o .:? "normalizedInput") + <*> (o .:? "mailOnly") + <*> (o .:? "earlyVoteSites" .!= mempty) + <*> (o .:? "pollingLocations" .!= mempty) + <*> (o .:? "precinctId")) + +instance ToJSON VoterInfoResponse where + toJSON VoterInfoResponse{..} + = object + (catMaybes + [("otherElections" .=) <$> _virOtherElections, + ("contests" .=) <$> _virContests, + ("state" .=) <$> _virState, + Just ("kind" .= _virKind), + ("dropOffLocations" .=) <$> _virDropOffLocations, + ("election" .=) <$> _virElection, + ("normalizedInput" .=) <$> _virNormalizedInput, + ("mailOnly" .=) <$> _virMailOnly, + ("earlyVoteSites" .=) <$> _virEarlyVoteSites, + ("pollingLocations" .=) <$> _virPollingLocations, + ("precinctId" .=) <$> _virPrecinctId]) + +-- | A location where a voter can vote. This may be an early vote site, an +-- election day voting location, or a drop off location for a completed +-- ballot. +-- +-- /See:/ 'pollingLocation' smart constructor. +data PollingLocation = PollingLocation + { _plVoterServices :: !(Maybe Text) + , _plEndDate :: !(Maybe Text) + , _plSources :: !(Maybe [Maybe Source]) + , _plAddress :: !(Maybe (Maybe SimpleAddressType)) + , _plStartDate :: !(Maybe Text) + , _plPollingHours :: !(Maybe Text) + , _plName :: !(Maybe Text) + , _plId :: !(Maybe Text) + , _plNotes :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PollingLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plVoterServices' +-- +-- * 'plEndDate' +-- +-- * 'plSources' +-- +-- * 'plAddress' +-- +-- * 'plStartDate' +-- +-- * 'plPollingHours' +-- +-- * 'plName' +-- +-- * 'plId' +-- +-- * 'plNotes' +pollingLocation + :: PollingLocation +pollingLocation = + PollingLocation + { _plVoterServices = Nothing + , _plEndDate = Nothing + , _plSources = Nothing + , _plAddress = Nothing + , _plStartDate = Nothing + , _plPollingHours = Nothing + , _plName = Nothing + , _plId = Nothing + , _plNotes = Nothing + } + +-- | The services provided by this early vote site or drop off location. This +-- field is not populated for polling locations. +plVoterServices :: Lens' PollingLocation (Maybe Text) +plVoterServices + = lens _plVoterServices + (\ s a -> s{_plVoterServices = a}) + +-- | The last date that this early vote site or drop off location may be +-- used. This field is not populated for polling locations. +plEndDate :: Lens' PollingLocation (Maybe Text) +plEndDate + = lens _plEndDate (\ s a -> s{_plEndDate = a}) + +-- | A list of sources for this location. If multiple sources are listed the +-- data has been aggregated from those sources. +plSources :: Lens' PollingLocation [Maybe Source] +plSources + = lens _plSources (\ s a -> s{_plSources = a}) . + _Default + . _Coerce + +-- | The address of the location. +plAddress :: Lens' PollingLocation (Maybe (Maybe SimpleAddressType)) +plAddress + = lens _plAddress (\ s a -> s{_plAddress = a}) + +-- | The first date that this early vote site or drop off location may be +-- used. This field is not populated for polling locations. +plStartDate :: Lens' PollingLocation (Maybe Text) +plStartDate + = lens _plStartDate (\ s a -> s{_plStartDate = a}) + +-- | A description of when this location is open. +plPollingHours :: Lens' PollingLocation (Maybe Text) +plPollingHours + = lens _plPollingHours + (\ s a -> s{_plPollingHours = a}) + +-- | The name of the early vote site or drop off location. This field is not +-- populated for polling locations. +plName :: Lens' PollingLocation (Maybe Text) +plName = lens _plName (\ s a -> s{_plName = a}) + +-- | An ID for this object. IDs may change in future requests and should not +-- be cached. Access to this field requires special access that can be +-- requested from the Request more link on the Quotas page. +plId :: Lens' PollingLocation (Maybe Text) +plId = lens _plId (\ s a -> s{_plId = a}) + +-- | Notes about this location (e.g. accessibility ramp or entrance to use). +plNotes :: Lens' PollingLocation (Maybe Text) +plNotes = lens _plNotes (\ s a -> s{_plNotes = a}) + +instance FromJSON PollingLocation where + parseJSON + = withObject "PollingLocation" + (\ o -> + PollingLocation <$> + (o .:? "voterServices") <*> (o .:? "endDate") <*> + (o .:? "sources" .!= mempty) + <*> (o .:? "address") + <*> (o .:? "startDate") + <*> (o .:? "pollingHours") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "notes")) + +instance ToJSON PollingLocation where + toJSON PollingLocation{..} + = object + (catMaybes + [("voterServices" .=) <$> _plVoterServices, + ("endDate" .=) <$> _plEndDate, + ("sources" .=) <$> _plSources, + ("address" .=) <$> _plAddress, + ("startDate" .=) <$> _plStartDate, + ("pollingHours" .=) <$> _plPollingHours, + ("name" .=) <$> _plName, ("id" .=) <$> _plId, + ("notes" .=) <$> _plNotes]) + +-- | Describes a political geography. +-- +-- /See:/ 'geographicDivision' smart constructor. +data GeographicDivision = GeographicDivision + { _gdName :: !(Maybe Text) + , _gdOfficeIndices :: !(Maybe [Word32]) + , _gdAlsoKnownAs :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeographicDivision' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdName' +-- +-- * 'gdOfficeIndices' +-- +-- * 'gdAlsoKnownAs' +geographicDivision + :: GeographicDivision +geographicDivision = + GeographicDivision + { _gdName = Nothing + , _gdOfficeIndices = Nothing + , _gdAlsoKnownAs = Nothing + } + +-- | The name of the division. +gdName :: Lens' GeographicDivision (Maybe Text) +gdName = lens _gdName (\ s a -> s{_gdName = a}) + +-- | List of indices in the offices array, one for each office elected from +-- this division. Will only be present if includeOffices was true (or +-- absent) in the request. +gdOfficeIndices :: Lens' GeographicDivision [Word32] +gdOfficeIndices + = lens _gdOfficeIndices + (\ s a -> s{_gdOfficeIndices = a}) + . _Default + . _Coerce + +-- | Any other valid OCD IDs that refer to the same division. Because OCD IDs +-- are meant to be human-readable and at least somewhat predictable, there +-- are occasionally several identifiers for a single division. These +-- identifiers are defined to be equivalent to one another, and one is +-- always indicated as the primary identifier. The primary identifier will +-- be returned in ocd_id above, and any other equivalent valid identifiers +-- will be returned in this list. For example, if this division\'s OCD ID +-- is ocd-division\/country:us\/district:dc, this will contain +-- ocd-division\/country:us\/state:dc. +gdAlsoKnownAs :: Lens' GeographicDivision [Text] +gdAlsoKnownAs + = lens _gdAlsoKnownAs + (\ s a -> s{_gdAlsoKnownAs = a}) + . _Default + . _Coerce + +instance FromJSON GeographicDivision where + parseJSON + = withObject "GeographicDivision" + (\ o -> + GeographicDivision <$> + (o .:? "name") <*> (o .:? "officeIndices" .!= mempty) + <*> (o .:? "alsoKnownAs" .!= mempty)) + +instance ToJSON GeographicDivision where + toJSON GeographicDivision{..} + = object + (catMaybes + [("name" .=) <$> _gdName, + ("officeIndices" .=) <$> _gdOfficeIndices, + ("alsoKnownAs" .=) <$> _gdAlsoKnownAs]) + +-- | Information about a candidate running for elected office. +-- +-- /See:/ 'candidate' smart constructor. +data Candidate = Candidate + { _cEmail :: !(Maybe Text) + , _cPhone :: !(Maybe Text) + , _cPhotoUrl :: !(Maybe Text) + , _cChannels :: !(Maybe [Maybe Channel]) + , _cCandidateUrl :: !(Maybe Text) + , _cOrderOnBallot :: !(Maybe Int64) + , _cName :: !(Maybe Text) + , _cParty :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Candidate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cEmail' +-- +-- * 'cPhone' +-- +-- * 'cPhotoUrl' +-- +-- * 'cChannels' +-- +-- * 'cCandidateUrl' +-- +-- * 'cOrderOnBallot' +-- +-- * 'cName' +-- +-- * 'cParty' +candidate + :: Candidate +candidate = + Candidate + { _cEmail = Nothing + , _cPhone = Nothing + , _cPhotoUrl = Nothing + , _cChannels = Nothing + , _cCandidateUrl = Nothing + , _cOrderOnBallot = Nothing + , _cName = Nothing + , _cParty = Nothing + } + +-- | The email address for the candidate\'s campaign. +cEmail :: Lens' Candidate (Maybe Text) +cEmail = lens _cEmail (\ s a -> s{_cEmail = a}) + +-- | The voice phone number for the candidate\'s campaign office. +cPhone :: Lens' Candidate (Maybe Text) +cPhone = lens _cPhone (\ s a -> s{_cPhone = a}) + +-- | A URL for a photo of the candidate. +cPhotoUrl :: Lens' Candidate (Maybe Text) +cPhotoUrl + = lens _cPhotoUrl (\ s a -> s{_cPhotoUrl = a}) + +-- | A list of known (social) media channels for this candidate. +cChannels :: Lens' Candidate [Maybe Channel] +cChannels + = lens _cChannels (\ s a -> s{_cChannels = a}) . + _Default + . _Coerce + +-- | The URL for the candidate\'s campaign web site. +cCandidateUrl :: Lens' Candidate (Maybe Text) +cCandidateUrl + = lens _cCandidateUrl + (\ s a -> s{_cCandidateUrl = a}) + +-- | The order the candidate appears on the ballot for this contest. +cOrderOnBallot :: Lens' Candidate (Maybe Int64) +cOrderOnBallot + = lens _cOrderOnBallot + (\ s a -> s{_cOrderOnBallot = a}) + +-- | The candidate\'s name. +cName :: Lens' Candidate (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | The full name of the party the candidate is a member of. +cParty :: Lens' Candidate (Maybe Text) +cParty = lens _cParty (\ s a -> s{_cParty = a}) + +instance FromJSON Candidate where + parseJSON + = withObject "Candidate" + (\ o -> + Candidate <$> + (o .:? "email") <*> (o .:? "phone") <*> + (o .:? "photoUrl") + <*> (o .:? "channels" .!= mempty) + <*> (o .:? "candidateUrl") + <*> (o .:? "orderOnBallot") + <*> (o .:? "name") + <*> (o .:? "party")) + +instance ToJSON Candidate where + toJSON Candidate{..} + = object + (catMaybes + [("email" .=) <$> _cEmail, ("phone" .=) <$> _cPhone, + ("photoUrl" .=) <$> _cPhotoUrl, + ("channels" .=) <$> _cChannels, + ("candidateUrl" .=) <$> _cCandidateUrl, + ("orderOnBallot" .=) <$> _cOrderOnBallot, + ("name" .=) <$> _cName, ("party" .=) <$> _cParty]) + +-- | Information about an Office held by one or more Officials. +-- +-- /See:/ 'office' smart constructor. +data Office = Office + { _oDivisionId :: !(Maybe Text) + , _oRoles :: !(Maybe [Text]) + , _oOfficialIndices :: !(Maybe [Word32]) + , _oSources :: !(Maybe [Maybe Source]) + , _oName :: !(Maybe Text) + , _oLevels :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Office' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oDivisionId' +-- +-- * 'oRoles' +-- +-- * 'oOfficialIndices' +-- +-- * 'oSources' +-- +-- * 'oName' +-- +-- * 'oLevels' +office + :: Office +office = + Office + { _oDivisionId = Nothing + , _oRoles = Nothing + , _oOfficialIndices = Nothing + , _oSources = Nothing + , _oName = Nothing + , _oLevels = Nothing + } + +-- | The OCD ID of the division with which this office is associated. +oDivisionId :: Lens' Office (Maybe Text) +oDivisionId + = lens _oDivisionId (\ s a -> s{_oDivisionId = a}) + +-- | The roles which this office fulfills. Roles are not meant to be +-- exhaustive, or to exactly specify the entire set of responsibilities of +-- a given office, but are meant to be rough categories that are useful for +-- general selection from or sorting of a list of offices. +oRoles :: Lens' Office [Text] +oRoles + = lens _oRoles (\ s a -> s{_oRoles = a}) . _Default . + _Coerce + +-- | List of indices in the officials array of people who presently hold this +-- office. +oOfficialIndices :: Lens' Office [Word32] +oOfficialIndices + = lens _oOfficialIndices + (\ s a -> s{_oOfficialIndices = a}) + . _Default + . _Coerce + +-- | A list of sources for this office. If multiple sources are listed, the +-- data has been aggregated from those sources. +oSources :: Lens' Office [Maybe Source] +oSources + = lens _oSources (\ s a -> s{_oSources = a}) . + _Default + . _Coerce + +-- | The human-readable name of the office. +oName :: Lens' Office (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | The levels of government of which this office is part. There may be more +-- than one in cases where a jurisdiction effectively acts at two different +-- levels of government; for example, the mayor of the District of Columbia +-- acts at \"locality\" level, but also effectively at both +-- \"administrative-area-2\" and \"administrative-area-1\". +oLevels :: Lens' Office [Text] +oLevels + = lens _oLevels (\ s a -> s{_oLevels = a}) . _Default + . _Coerce + +instance FromJSON Office where + parseJSON + = withObject "Office" + (\ o -> + Office <$> + (o .:? "divisionId") <*> (o .:? "roles" .!= mempty) + <*> (o .:? "officialIndices" .!= mempty) + <*> (o .:? "sources" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "levels" .!= mempty)) + +instance ToJSON Office where + toJSON Office{..} + = object + (catMaybes + [("divisionId" .=) <$> _oDivisionId, + ("roles" .=) <$> _oRoles, + ("officialIndices" .=) <$> _oOfficialIndices, + ("sources" .=) <$> _oSources, ("name" .=) <$> _oName, + ("levels" .=) <$> _oLevels]) + +-- | Information about the election that was queried. +-- +-- /See:/ 'election' smart constructor. +data Election = Election + { _eOcdDivisionId :: !(Maybe Text) + , _eElectionDay :: !(Maybe Text) + , _eName :: !(Maybe Text) + , _eId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Election' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eOcdDivisionId' +-- +-- * 'eElectionDay' +-- +-- * 'eName' +-- +-- * 'eId' +election + :: Election +election = + Election + { _eOcdDivisionId = Nothing + , _eElectionDay = Nothing + , _eName = Nothing + , _eId = Nothing + } + +-- | The political division of the election. Represented as an OCD Division +-- ID. Voters within these political jurisdictions are covered by this +-- election. This is typically a state such as +-- ocd-division\/country:us\/state:ca or for the midterms or general +-- election the entire US (i.e. ocd-division\/country:us). +eOcdDivisionId :: Lens' Election (Maybe Text) +eOcdDivisionId + = lens _eOcdDivisionId + (\ s a -> s{_eOcdDivisionId = a}) + +-- | Day of the election in YYYY-MM-DD format. +eElectionDay :: Lens' Election (Maybe Text) +eElectionDay + = lens _eElectionDay (\ s a -> s{_eElectionDay = a}) + +-- | A displayable name for the election. +eName :: Lens' Election (Maybe Text) +eName = lens _eName (\ s a -> s{_eName = a}) + +-- | The unique ID of this election. +eId :: Lens' Election (Maybe Int64) +eId = lens _eId (\ s a -> s{_eId = a}) + +instance FromJSON Election where + parseJSON + = withObject "Election" + (\ o -> + Election <$> + (o .:? "ocdDivisionId") <*> (o .:? "electionDay") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Election where + toJSON Election{..} + = object + (catMaybes + [("ocdDivisionId" .=) <$> _eOcdDivisionId, + ("electionDay" .=) <$> _eElectionDay, + ("name" .=) <$> _eName, ("id" .=) <$> _eId]) + +-- | A social media or web channel for a candidate. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cId = Nothing + , _cType = Nothing + } + +-- | The unique public identifier for the candidate\'s channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of channel. The following is a list of types of channels, but +-- is not exhaustive. More channel types may be added at a later time. One +-- of: GooglePlus, YouTube, Facebook, Twitter +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> Channel <$> (o .:? "id") <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("id" .=) <$> _cId, ("type" .=) <$> _cType]) + +-- | The result of a representative info lookup query. +-- +-- /See:/ 'representativeInfoResponse' smart constructor. +data RepresentativeInfoResponse = RepresentativeInfoResponse + { _rirKind :: !Text + , _rirNormalizedInput :: !(Maybe (Maybe SimpleAddressType)) + , _rirOfficials :: !(Maybe [Maybe Official]) + , _rirDivisions :: !(Maybe RepresentativeInfoResponseDivisions) + , _rirOffices :: !(Maybe [Maybe Office]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepresentativeInfoResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rirKind' +-- +-- * 'rirNormalizedInput' +-- +-- * 'rirOfficials' +-- +-- * 'rirDivisions' +-- +-- * 'rirOffices' +representativeInfoResponse + :: RepresentativeInfoResponse +representativeInfoResponse = + RepresentativeInfoResponse + { _rirKind = "civicinfo#representativeInfoResponse" + , _rirNormalizedInput = Nothing + , _rirOfficials = Nothing + , _rirDivisions = Nothing + , _rirOffices = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"civicinfo#representativeInfoResponse\". +rirKind :: Lens' RepresentativeInfoResponse Text +rirKind = lens _rirKind (\ s a -> s{_rirKind = a}) + +-- | The normalized version of the requested address +rirNormalizedInput :: Lens' RepresentativeInfoResponse (Maybe (Maybe SimpleAddressType)) +rirNormalizedInput + = lens _rirNormalizedInput + (\ s a -> s{_rirNormalizedInput = a}) + +-- | Officials holding the offices listed above. Will only be present if +-- includeOffices was true in the request. +rirOfficials :: Lens' RepresentativeInfoResponse [Maybe Official] +rirOfficials + = lens _rirOfficials (\ s a -> s{_rirOfficials = a}) + . _Default + . _Coerce + +-- | Political geographic divisions that contain the requested address. +rirDivisions :: Lens' RepresentativeInfoResponse (Maybe RepresentativeInfoResponseDivisions) +rirDivisions + = lens _rirDivisions (\ s a -> s{_rirDivisions = a}) + +-- | Elected offices referenced by the divisions listed above. Will only be +-- present if includeOffices was true in the request. +rirOffices :: Lens' RepresentativeInfoResponse [Maybe Office] +rirOffices + = lens _rirOffices (\ s a -> s{_rirOffices = a}) . + _Default + . _Coerce + +instance FromJSON RepresentativeInfoResponse where + parseJSON + = withObject "RepresentativeInfoResponse" + (\ o -> + RepresentativeInfoResponse <$> + (o .:? "kind" .!= + "civicinfo#representativeInfoResponse") + <*> (o .:? "normalizedInput") + <*> (o .:? "officials" .!= mempty) + <*> (o .:? "divisions") + <*> (o .:? "offices" .!= mempty)) + +instance ToJSON RepresentativeInfoResponse where + toJSON RepresentativeInfoResponse{..} + = object + (catMaybes + [Just ("kind" .= _rirKind), + ("normalizedInput" .=) <$> _rirNormalizedInput, + ("officials" .=) <$> _rirOfficials, + ("divisions" .=) <$> _rirDivisions, + ("offices" .=) <$> _rirOffices]) + +-- | Represents a political geographic division that matches the requested +-- query. +-- +-- /See:/ 'divisionSearchResult' smart constructor. +data DivisionSearchResult = DivisionSearchResult + { _dsrAliases :: !(Maybe [Text]) + , _dsrName :: !(Maybe Text) + , _dsrOcdId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DivisionSearchResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsrAliases' +-- +-- * 'dsrName' +-- +-- * 'dsrOcdId' +divisionSearchResult + :: DivisionSearchResult +divisionSearchResult = + DivisionSearchResult + { _dsrAliases = Nothing + , _dsrName = Nothing + , _dsrOcdId = Nothing + } + +-- | Other Open Civic Data identifiers that refer to the same division -- for +-- example, those that refer to other political divisions whose boundaries +-- are defined to be coterminous with this one. For example, +-- ocd-division\/country:us\/state:wy will include an alias of +-- ocd-division\/country:us\/state:wy\/cd:1, since Wyoming has only one +-- Congressional district. +dsrAliases :: Lens' DivisionSearchResult [Text] +dsrAliases + = lens _dsrAliases (\ s a -> s{_dsrAliases = a}) . + _Default + . _Coerce + +-- | The name of the division. +dsrName :: Lens' DivisionSearchResult (Maybe Text) +dsrName = lens _dsrName (\ s a -> s{_dsrName = a}) + +-- | The unique Open Civic Data identifier for this division. +dsrOcdId :: Lens' DivisionSearchResult (Maybe Text) +dsrOcdId = lens _dsrOcdId (\ s a -> s{_dsrOcdId = a}) + +instance FromJSON DivisionSearchResult where + parseJSON + = withObject "DivisionSearchResult" + (\ o -> + DivisionSearchResult <$> + (o .:? "aliases" .!= mempty) <*> (o .:? "name") <*> + (o .:? "ocdId")) + +instance ToJSON DivisionSearchResult where + toJSON DivisionSearchResult{..} + = object + (catMaybes + [("aliases" .=) <$> _dsrAliases, + ("name" .=) <$> _dsrName, + ("ocdId" .=) <$> _dsrOcdId]) + +-- | Information about an election administrative body (e.g. County Board of +-- Elections). +-- +-- /See:/ 'administrativeBody' smart constructor. +data AdministrativeBody = AdministrativeBody + { _abCorrespondenceAddress :: !(Maybe (Maybe SimpleAddressType)) + , _abAbsenteeVotingInfoUrl :: !(Maybe Text) + , _abHoursOfOperation :: !(Maybe Text) + , _abBallotInfoUrl :: !(Maybe Text) + , _abPhysicalAddress :: !(Maybe (Maybe SimpleAddressType)) + , _abElectionRegistrationConfirmationUrl :: !(Maybe Text) + , _abElectionInfoUrl :: !(Maybe Text) + , _abVotingLocationFinderUrl :: !(Maybe Text) + , _abElectionOfficials :: !(Maybe [Maybe ElectionOfficial]) + , _abName :: !(Maybe Text) + , _abElectionRulesUrl :: !(Maybe Text) + , _abVoterServices :: !(Maybe [Text]) + , _abElectionRegistrationUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdministrativeBody' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'abCorrespondenceAddress' +-- +-- * 'abAbsenteeVotingInfoUrl' +-- +-- * 'abHoursOfOperation' +-- +-- * 'abBallotInfoUrl' +-- +-- * 'abPhysicalAddress' +-- +-- * 'abElectionRegistrationConfirmationUrl' +-- +-- * 'abElectionInfoUrl' +-- +-- * 'abVotingLocationFinderUrl' +-- +-- * 'abElectionOfficials' +-- +-- * 'abName' +-- +-- * 'abElectionRulesUrl' +-- +-- * 'abVoterServices' +-- +-- * 'abElectionRegistrationUrl' +administrativeBody + :: AdministrativeBody +administrativeBody = + AdministrativeBody + { _abCorrespondenceAddress = Nothing + , _abAbsenteeVotingInfoUrl = Nothing + , _abHoursOfOperation = Nothing + , _abBallotInfoUrl = Nothing + , _abPhysicalAddress = Nothing + , _abElectionRegistrationConfirmationUrl = Nothing + , _abElectionInfoUrl = Nothing + , _abVotingLocationFinderUrl = Nothing + , _abElectionOfficials = Nothing + , _abName = Nothing + , _abElectionRulesUrl = Nothing + , _abVoterServices = Nothing + , _abElectionRegistrationUrl = Nothing + } + +-- | The mailing address of this administrative body. +abCorrespondenceAddress :: Lens' AdministrativeBody (Maybe (Maybe SimpleAddressType)) +abCorrespondenceAddress + = lens _abCorrespondenceAddress + (\ s a -> s{_abCorrespondenceAddress = a}) + +-- | A URL provided by this administrative body for information on absentee +-- voting. +abAbsenteeVotingInfoUrl :: Lens' AdministrativeBody (Maybe Text) +abAbsenteeVotingInfoUrl + = lens _abAbsenteeVotingInfoUrl + (\ s a -> s{_abAbsenteeVotingInfoUrl = a}) + +-- | A description of the hours of operation for this administrative body. +abHoursOfOperation :: Lens' AdministrativeBody (Maybe Text) +abHoursOfOperation + = lens _abHoursOfOperation + (\ s a -> s{_abHoursOfOperation = a}) + +-- | A URL provided by this administrative body to give contest information +-- to the voter. +abBallotInfoUrl :: Lens' AdministrativeBody (Maybe Text) +abBallotInfoUrl + = lens _abBallotInfoUrl + (\ s a -> s{_abBallotInfoUrl = a}) + +-- | The physical address of this administrative body. +abPhysicalAddress :: Lens' AdministrativeBody (Maybe (Maybe SimpleAddressType)) +abPhysicalAddress + = lens _abPhysicalAddress + (\ s a -> s{_abPhysicalAddress = a}) + +-- | A URL provided by this administrative body for confirming that the voter +-- is registered to vote. +abElectionRegistrationConfirmationUrl :: Lens' AdministrativeBody (Maybe Text) +abElectionRegistrationConfirmationUrl + = lens _abElectionRegistrationConfirmationUrl + (\ s a -> + s{_abElectionRegistrationConfirmationUrl = a}) + +-- | A URL provided by this administrative body for looking up general +-- election information. +abElectionInfoUrl :: Lens' AdministrativeBody (Maybe Text) +abElectionInfoUrl + = lens _abElectionInfoUrl + (\ s a -> s{_abElectionInfoUrl = a}) + +-- | A URL provided by this administrative body for looking up where to vote. +abVotingLocationFinderUrl :: Lens' AdministrativeBody (Maybe Text) +abVotingLocationFinderUrl + = lens _abVotingLocationFinderUrl + (\ s a -> s{_abVotingLocationFinderUrl = a}) + +-- | The election officials for this election administrative body. +abElectionOfficials :: Lens' AdministrativeBody [Maybe ElectionOfficial] +abElectionOfficials + = lens _abElectionOfficials + (\ s a -> s{_abElectionOfficials = a}) + . _Default + . _Coerce + +-- | The name of this election administrative body. +abName :: Lens' AdministrativeBody (Maybe Text) +abName = lens _abName (\ s a -> s{_abName = a}) + +-- | A URL provided by this administrative body describing election rules to +-- the voter. +abElectionRulesUrl :: Lens' AdministrativeBody (Maybe Text) +abElectionRulesUrl + = lens _abElectionRulesUrl + (\ s a -> s{_abElectionRulesUrl = a}) + +-- | A description of the services this administrative body may provide. +abVoterServices :: Lens' AdministrativeBody [Text] +abVoterServices + = lens _abVoterServices + (\ s a -> s{_abVoterServices = a}) + . _Default + . _Coerce + +-- | A URL provided by this administrative body for looking up how to +-- register to vote. +abElectionRegistrationUrl :: Lens' AdministrativeBody (Maybe Text) +abElectionRegistrationUrl + = lens _abElectionRegistrationUrl + (\ s a -> s{_abElectionRegistrationUrl = a}) + +instance FromJSON AdministrativeBody where + parseJSON + = withObject "AdministrativeBody" + (\ o -> + AdministrativeBody <$> + (o .:? "correspondenceAddress") <*> + (o .:? "absenteeVotingInfoUrl") + <*> (o .:? "hoursOfOperation") + <*> (o .:? "ballotInfoUrl") + <*> (o .:? "physicalAddress") + <*> (o .:? "electionRegistrationConfirmationUrl") + <*> (o .:? "electionInfoUrl") + <*> (o .:? "votingLocationFinderUrl") + <*> (o .:? "electionOfficials" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "electionRulesUrl") + <*> (o .:? "voter_services" .!= mempty) + <*> (o .:? "electionRegistrationUrl")) + +instance ToJSON AdministrativeBody where + toJSON AdministrativeBody{..} + = object + (catMaybes + [("correspondenceAddress" .=) <$> + _abCorrespondenceAddress, + ("absenteeVotingInfoUrl" .=) <$> + _abAbsenteeVotingInfoUrl, + ("hoursOfOperation" .=) <$> _abHoursOfOperation, + ("ballotInfoUrl" .=) <$> _abBallotInfoUrl, + ("physicalAddress" .=) <$> _abPhysicalAddress, + ("electionRegistrationConfirmationUrl" .=) <$> + _abElectionRegistrationConfirmationUrl, + ("electionInfoUrl" .=) <$> _abElectionInfoUrl, + ("votingLocationFinderUrl" .=) <$> + _abVotingLocationFinderUrl, + ("electionOfficials" .=) <$> _abElectionOfficials, + ("name" .=) <$> _abName, + ("electionRulesUrl" .=) <$> _abElectionRulesUrl, + ("voter_services" .=) <$> _abVoterServices, + ("electionRegistrationUrl" .=) <$> + _abElectionRegistrationUrl]) + +-- | Information about a contest that appears on a voter\'s ballot. +-- +-- /See:/ 'contest' smart constructor. +data Contest = Contest + { _conReferendumPassageThreshold :: !(Maybe Text) + , _conRoles :: !(Maybe [Text]) + , _conReferendumUrl :: !(Maybe Text) + , _conReferendumEffectOfAbstain :: !(Maybe Text) + , _conReferendumSubtitle :: !(Maybe Text) + , _conNumberVotingFor :: !(Maybe Int64) + , _conOffice :: !(Maybe Text) + , _conReferendumConStatement :: !(Maybe Text) + , _conSources :: !(Maybe [Maybe Source]) + , _conReferendumProStatement :: !(Maybe Text) + , _conReferendumBallotResponses :: !(Maybe [Text]) + , _conNumberElected :: !(Maybe Int64) + , _conSpecial :: !(Maybe Text) + , _conReferendumText :: !(Maybe Text) + , _conPrimaryParty :: !(Maybe Text) + , _conId :: !(Maybe Text) + , _conType :: !(Maybe Text) + , _conElectorateSpecifications :: !(Maybe Text) + , _conReferendumBrief :: !(Maybe Text) + , _conDistrict :: !(Maybe (Maybe ElectoralDistrict)) + , _conLevel :: !(Maybe [Text]) + , _conCandidates :: !(Maybe [Maybe Candidate]) + , _conReferendumTitle :: !(Maybe Text) + , _conBallotPlacement :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Contest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'conReferendumPassageThreshold' +-- +-- * 'conRoles' +-- +-- * 'conReferendumUrl' +-- +-- * 'conReferendumEffectOfAbstain' +-- +-- * 'conReferendumSubtitle' +-- +-- * 'conNumberVotingFor' +-- +-- * 'conOffice' +-- +-- * 'conReferendumConStatement' +-- +-- * 'conSources' +-- +-- * 'conReferendumProStatement' +-- +-- * 'conReferendumBallotResponses' +-- +-- * 'conNumberElected' +-- +-- * 'conSpecial' +-- +-- * 'conReferendumText' +-- +-- * 'conPrimaryParty' +-- +-- * 'conId' +-- +-- * 'conType' +-- +-- * 'conElectorateSpecifications' +-- +-- * 'conReferendumBrief' +-- +-- * 'conDistrict' +-- +-- * 'conLevel' +-- +-- * 'conCandidates' +-- +-- * 'conReferendumTitle' +-- +-- * 'conBallotPlacement' +contest + :: Contest +contest = + Contest + { _conReferendumPassageThreshold = Nothing + , _conRoles = Nothing + , _conReferendumUrl = Nothing + , _conReferendumEffectOfAbstain = Nothing + , _conReferendumSubtitle = Nothing + , _conNumberVotingFor = Nothing + , _conOffice = Nothing + , _conReferendumConStatement = Nothing + , _conSources = Nothing + , _conReferendumProStatement = Nothing + , _conReferendumBallotResponses = Nothing + , _conNumberElected = Nothing + , _conSpecial = Nothing + , _conReferendumText = Nothing + , _conPrimaryParty = Nothing + , _conId = Nothing + , _conType = Nothing + , _conElectorateSpecifications = Nothing + , _conReferendumBrief = Nothing + , _conDistrict = Nothing + , _conLevel = Nothing + , _conCandidates = Nothing + , _conReferendumTitle = Nothing + , _conBallotPlacement = Nothing + } + +-- | The threshold of votes that the referendum needs in order to pass, e.g. +-- \"two-thirds\". This field is only populated for contests of type +-- \'Referendum\'. +conReferendumPassageThreshold :: Lens' Contest (Maybe Text) +conReferendumPassageThreshold + = lens _conReferendumPassageThreshold + (\ s a -> s{_conReferendumPassageThreshold = a}) + +-- | The roles which this office fulfills. +conRoles :: Lens' Contest [Text] +conRoles + = lens _conRoles (\ s a -> s{_conRoles = a}) . + _Default + . _Coerce + +-- | A link to the referendum. This field is only populated for contests of +-- type \'Referendum\'. +conReferendumUrl :: Lens' Contest (Maybe Text) +conReferendumUrl + = lens _conReferendumUrl + (\ s a -> s{_conReferendumUrl = a}) + +-- | Specifies what effect abstaining (not voting) on the proposition will +-- have (i.e. whether abstaining is considered a vote against it). This +-- field is only populated for contests of type \'Referendum\'. +conReferendumEffectOfAbstain :: Lens' Contest (Maybe Text) +conReferendumEffectOfAbstain + = lens _conReferendumEffectOfAbstain + (\ s a -> s{_conReferendumEffectOfAbstain = a}) + +-- | A brief description of the referendum. This field is only populated for +-- contests of type \'Referendum\'. +conReferendumSubtitle :: Lens' Contest (Maybe Text) +conReferendumSubtitle + = lens _conReferendumSubtitle + (\ s a -> s{_conReferendumSubtitle = a}) + +-- | The number of candidates that a voter may vote for in this contest. +conNumberVotingFor :: Lens' Contest (Maybe Int64) +conNumberVotingFor + = lens _conNumberVotingFor + (\ s a -> s{_conNumberVotingFor = a}) + +-- | The name of the office for this contest. +conOffice :: Lens' Contest (Maybe Text) +conOffice + = lens _conOffice (\ s a -> s{_conOffice = a}) + +-- | A statement in opposition to the referendum. It does not necessarily +-- appear on the ballot. This field is only populated for contests of type +-- \'Referendum\'. +conReferendumConStatement :: Lens' Contest (Maybe Text) +conReferendumConStatement + = lens _conReferendumConStatement + (\ s a -> s{_conReferendumConStatement = a}) + +-- | A list of sources for this contest. If multiple sources are listed, the +-- data has been aggregated from those sources. +conSources :: Lens' Contest [Maybe Source] +conSources + = lens _conSources (\ s a -> s{_conSources = a}) . + _Default + . _Coerce + +-- | A statement in favor of the referendum. It does not necessarily appear +-- on the ballot. This field is only populated for contests of type +-- \'Referendum\'. +conReferendumProStatement :: Lens' Contest (Maybe Text) +conReferendumProStatement + = lens _conReferendumProStatement + (\ s a -> s{_conReferendumProStatement = a}) + +-- | The set of ballot responses for the referendum. A ballot response +-- represents a line on the ballot. Common examples might include \"yes\" +-- or \"no\" for referenda, or a judge\'s name for a retention contest. +-- This field is only populated for contests of type \'Referendum\'. +conReferendumBallotResponses :: Lens' Contest [Text] +conReferendumBallotResponses + = lens _conReferendumBallotResponses + (\ s a -> s{_conReferendumBallotResponses = a}) + . _Default + . _Coerce + +-- | The number of candidates that will be elected to office in this contest. +conNumberElected :: Lens' Contest (Maybe Int64) +conNumberElected + = lens _conNumberElected + (\ s a -> s{_conNumberElected = a}) + +-- | \"Yes\" or \"No\" depending on whether this a contest being held outside +-- the normal election cycle. +conSpecial :: Lens' Contest (Maybe Text) +conSpecial + = lens _conSpecial (\ s a -> s{_conSpecial = a}) + +-- | The full text of the referendum. This field is only populated for +-- contests of type \'Referendum\'. +conReferendumText :: Lens' Contest (Maybe Text) +conReferendumText + = lens _conReferendumText + (\ s a -> s{_conReferendumText = a}) + +-- | If this is a partisan election, the name of the party it is for. +conPrimaryParty :: Lens' Contest (Maybe Text) +conPrimaryParty + = lens _conPrimaryParty + (\ s a -> s{_conPrimaryParty = a}) + +-- | An ID for this object. IDs may change in future requests and should not +-- be cached. Access to this field requires special access that can be +-- requested from the Request more link on the Quotas page. +conId :: Lens' Contest (Maybe Text) +conId = lens _conId (\ s a -> s{_conId = a}) + +-- | The type of contest. Usually this will be \'General\', \'Primary\', or +-- \'Run-off\' for contests with candidates. For referenda this will be +-- \'Referendum\'. +conType :: Lens' Contest (Maybe Text) +conType = lens _conType (\ s a -> s{_conType = a}) + +-- | A description of any additional eligibility requirements for voting in +-- this contest. +conElectorateSpecifications :: Lens' Contest (Maybe Text) +conElectorateSpecifications + = lens _conElectorateSpecifications + (\ s a -> s{_conElectorateSpecifications = a}) + +-- | Specifies a short summary of the referendum that is typically on the +-- ballot below the title but above the text. This field is only populated +-- for contests of type \'Referendum\'. +conReferendumBrief :: Lens' Contest (Maybe Text) +conReferendumBrief + = lens _conReferendumBrief + (\ s a -> s{_conReferendumBrief = a}) + +-- | Information about the electoral district that this contest is in. +conDistrict :: Lens' Contest (Maybe (Maybe ElectoralDistrict)) +conDistrict + = lens _conDistrict (\ s a -> s{_conDistrict = a}) + +-- | The levels of government of the office for this contest. There may be +-- more than one in cases where a jurisdiction effectively acts at two +-- different levels of government; for example, the mayor of the District +-- of Columbia acts at \"locality\" level, but also effectively at both +-- \"administrative-area-2\" and \"administrative-area-1\". +conLevel :: Lens' Contest [Text] +conLevel + = lens _conLevel (\ s a -> s{_conLevel = a}) . + _Default + . _Coerce + +-- | The candidate choices for this contest. +conCandidates :: Lens' Contest [Maybe Candidate] +conCandidates + = lens _conCandidates + (\ s a -> s{_conCandidates = a}) + . _Default + . _Coerce + +-- | The title of the referendum (e.g. \'Proposition 42\'). This field is +-- only populated for contests of type \'Referendum\'. +conReferendumTitle :: Lens' Contest (Maybe Text) +conReferendumTitle + = lens _conReferendumTitle + (\ s a -> s{_conReferendumTitle = a}) + +-- | A number specifying the position of this contest on the voter\'s ballot. +conBallotPlacement :: Lens' Contest (Maybe Int64) +conBallotPlacement + = lens _conBallotPlacement + (\ s a -> s{_conBallotPlacement = a}) + +instance FromJSON Contest where + parseJSON + = withObject "Contest" + (\ o -> + Contest <$> + (o .:? "referendumPassageThreshold") <*> + (o .:? "roles" .!= mempty) + <*> (o .:? "referendumUrl") + <*> (o .:? "referendumEffectOfAbstain") + <*> (o .:? "referendumSubtitle") + <*> (o .:? "numberVotingFor") + <*> (o .:? "office") + <*> (o .:? "referendumConStatement") + <*> (o .:? "sources" .!= mempty) + <*> (o .:? "referendumProStatement") + <*> (o .:? "referendumBallotResponses" .!= mempty) + <*> (o .:? "numberElected") + <*> (o .:? "special") + <*> (o .:? "referendumText") + <*> (o .:? "primaryParty") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "electorateSpecifications") + <*> (o .:? "referendumBrief") + <*> (o .:? "district") + <*> (o .:? "level" .!= mempty) + <*> (o .:? "candidates" .!= mempty) + <*> (o .:? "referendumTitle") + <*> (o .:? "ballotPlacement")) + +instance ToJSON Contest where + toJSON Contest{..} + = object + (catMaybes + [("referendumPassageThreshold" .=) <$> + _conReferendumPassageThreshold, + ("roles" .=) <$> _conRoles, + ("referendumUrl" .=) <$> _conReferendumUrl, + ("referendumEffectOfAbstain" .=) <$> + _conReferendumEffectOfAbstain, + ("referendumSubtitle" .=) <$> _conReferendumSubtitle, + ("numberVotingFor" .=) <$> _conNumberVotingFor, + ("office" .=) <$> _conOffice, + ("referendumConStatement" .=) <$> + _conReferendumConStatement, + ("sources" .=) <$> _conSources, + ("referendumProStatement" .=) <$> + _conReferendumProStatement, + ("referendumBallotResponses" .=) <$> + _conReferendumBallotResponses, + ("numberElected" .=) <$> _conNumberElected, + ("special" .=) <$> _conSpecial, + ("referendumText" .=) <$> _conReferendumText, + ("primaryParty" .=) <$> _conPrimaryParty, + ("id" .=) <$> _conId, ("type" .=) <$> _conType, + ("electorateSpecifications" .=) <$> + _conElectorateSpecifications, + ("referendumBrief" .=) <$> _conReferendumBrief, + ("district" .=) <$> _conDistrict, + ("level" .=) <$> _conLevel, + ("candidates" .=) <$> _conCandidates, + ("referendumTitle" .=) <$> _conReferendumTitle, + ("ballotPlacement" .=) <$> _conBallotPlacement]) + +-- | The result of a division search query. +-- +-- /See:/ 'divisionSearchResponse' smart constructor. +data DivisionSearchResponse = DivisionSearchResponse + { _dsrResults :: !(Maybe [Maybe DivisionSearchResult]) + , _dsrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DivisionSearchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsrResults' +-- +-- * 'dsrKind' +divisionSearchResponse + :: DivisionSearchResponse +divisionSearchResponse = + DivisionSearchResponse + { _dsrResults = Nothing + , _dsrKind = "civicinfo#divisionSearchResponse" + } + +dsrResults :: Lens' DivisionSearchResponse [Maybe DivisionSearchResult] +dsrResults + = lens _dsrResults (\ s a -> s{_dsrResults = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"civicinfo#divisionSearchResponse\". +dsrKind :: Lens' DivisionSearchResponse Text +dsrKind = lens _dsrKind (\ s a -> s{_dsrKind = a}) + +instance FromJSON DivisionSearchResponse where + parseJSON + = withObject "DivisionSearchResponse" + (\ o -> + DivisionSearchResponse <$> + (o .:? "results" .!= mempty) <*> + (o .:? "kind" .!= + "civicinfo#divisionSearchResponse")) + +instance ToJSON DivisionSearchResponse where + toJSON DivisionSearchResponse{..} + = object + (catMaybes + [("results" .=) <$> _dsrResults, + Just ("kind" .= _dsrKind)]) + +-- | Information about individual election officials. +-- +-- /See:/ 'electionOfficial' smart constructor. +data ElectionOfficial = ElectionOfficial + { _eoFaxNumber :: !(Maybe Text) + , _eoName :: !(Maybe Text) + , _eoOfficePhoneNumber :: !(Maybe Text) + , _eoEmailAddress :: !(Maybe Text) + , _eoTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ElectionOfficial' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eoFaxNumber' +-- +-- * 'eoName' +-- +-- * 'eoOfficePhoneNumber' +-- +-- * 'eoEmailAddress' +-- +-- * 'eoTitle' +electionOfficial + :: ElectionOfficial +electionOfficial = + ElectionOfficial + { _eoFaxNumber = Nothing + , _eoName = Nothing + , _eoOfficePhoneNumber = Nothing + , _eoEmailAddress = Nothing + , _eoTitle = Nothing + } + +-- | The fax number of the election official. +eoFaxNumber :: Lens' ElectionOfficial (Maybe Text) +eoFaxNumber + = lens _eoFaxNumber (\ s a -> s{_eoFaxNumber = a}) + +-- | The full name of the election official. +eoName :: Lens' ElectionOfficial (Maybe Text) +eoName = lens _eoName (\ s a -> s{_eoName = a}) + +-- | The office phone number of the election official. +eoOfficePhoneNumber :: Lens' ElectionOfficial (Maybe Text) +eoOfficePhoneNumber + = lens _eoOfficePhoneNumber + (\ s a -> s{_eoOfficePhoneNumber = a}) + +-- | The email address of the election official. +eoEmailAddress :: Lens' ElectionOfficial (Maybe Text) +eoEmailAddress + = lens _eoEmailAddress + (\ s a -> s{_eoEmailAddress = a}) + +-- | The title of the election official. +eoTitle :: Lens' ElectionOfficial (Maybe Text) +eoTitle = lens _eoTitle (\ s a -> s{_eoTitle = a}) + +instance FromJSON ElectionOfficial where + parseJSON + = withObject "ElectionOfficial" + (\ o -> + ElectionOfficial <$> + (o .:? "faxNumber") <*> (o .:? "name") <*> + (o .:? "officePhoneNumber") + <*> (o .:? "emailAddress") + <*> (o .:? "title")) + +instance ToJSON ElectionOfficial where + toJSON ElectionOfficial{..} + = object + (catMaybes + [("faxNumber" .=) <$> _eoFaxNumber, + ("name" .=) <$> _eoName, + ("officePhoneNumber" .=) <$> _eoOfficePhoneNumber, + ("emailAddress" .=) <$> _eoEmailAddress, + ("title" .=) <$> _eoTitle]) + +-- +-- /See:/ 'representativeInfoData' smart constructor. +data RepresentativeInfoData = RepresentativeInfoData + { _ridOfficials :: !(Maybe [Maybe Official]) + , _ridDivisions :: !(Maybe RepresentativeInfoDataDivisions) + , _ridOffices :: !(Maybe [Maybe Office]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepresentativeInfoData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ridOfficials' +-- +-- * 'ridDivisions' +-- +-- * 'ridOffices' +representativeInfoData + :: RepresentativeInfoData +representativeInfoData = + RepresentativeInfoData + { _ridOfficials = Nothing + , _ridDivisions = Nothing + , _ridOffices = Nothing + } + +-- | Officials holding the offices listed above. Will only be present if +-- includeOffices was true in the request. +ridOfficials :: Lens' RepresentativeInfoData [Maybe Official] +ridOfficials + = lens _ridOfficials (\ s a -> s{_ridOfficials = a}) + . _Default + . _Coerce + +-- | Political geographic divisions that contain the requested address. +ridDivisions :: Lens' RepresentativeInfoData (Maybe RepresentativeInfoDataDivisions) +ridDivisions + = lens _ridDivisions (\ s a -> s{_ridDivisions = a}) + +-- | Elected offices referenced by the divisions listed above. Will only be +-- present if includeOffices was true in the request. +ridOffices :: Lens' RepresentativeInfoData [Maybe Office] +ridOffices + = lens _ridOffices (\ s a -> s{_ridOffices = a}) . + _Default + . _Coerce + +instance FromJSON RepresentativeInfoData where + parseJSON + = withObject "RepresentativeInfoData" + (\ o -> + RepresentativeInfoData <$> + (o .:? "officials" .!= mempty) <*> + (o .:? "divisions") + <*> (o .:? "offices" .!= mempty)) + +instance ToJSON RepresentativeInfoData where + toJSON RepresentativeInfoData{..} + = object + (catMaybes + [("officials" .=) <$> _ridOfficials, + ("divisions" .=) <$> _ridDivisions, + ("offices" .=) <$> _ridOffices]) + +-- | Contains information about the data source for the element containing +-- it. +-- +-- /See:/ 'source' smart constructor. +data Source = Source + { _sName :: !(Maybe Text) + , _sOfficial :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Source' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sName' +-- +-- * 'sOfficial' +source + :: Source +source = + Source + { _sName = Nothing + , _sOfficial = Nothing + } + +-- | The name of the data source. +sName :: Lens' Source (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | Whether this data comes from an official government source. +sOfficial :: Lens' Source (Maybe Bool) +sOfficial + = lens _sOfficial (\ s a -> s{_sOfficial = a}) + +instance FromJSON Source where + parseJSON + = withObject "Source" + (\ o -> + Source <$> (o .:? "name") <*> (o .:? "official")) + +instance ToJSON Source where + toJSON Source{..} + = object + (catMaybes + [("name" .=) <$> _sName, + ("official" .=) <$> _sOfficial]) + +-- | Describes the geographic scope of a contest. +-- +-- /See:/ 'electoralDistrict' smart constructor. +data ElectoralDistrict = ElectoralDistrict + { _edName :: !(Maybe Text) + , _edScope :: !(Maybe Text) + , _edId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ElectoralDistrict' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edName' +-- +-- * 'edScope' +-- +-- * 'edId' +electoralDistrict + :: ElectoralDistrict +electoralDistrict = + ElectoralDistrict + { _edName = Nothing + , _edScope = Nothing + , _edId = Nothing + } + +-- | The name of the district. +edName :: Lens' ElectoralDistrict (Maybe Text) +edName = lens _edName (\ s a -> s{_edName = a}) + +-- | The geographic scope of this district. If unspecified the district\'s +-- geography is not known. One of: national, statewide, congressional, +-- stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, +-- township, countyCouncil, cityCouncil, ward, special +edScope :: Lens' ElectoralDistrict (Maybe Text) +edScope = lens _edScope (\ s a -> s{_edScope = a}) + +-- | An identifier for this district, relative to its scope. For example, the +-- 34th State Senate district would have id \"34\" and a scope of +-- stateUpper. +edId :: Lens' ElectoralDistrict (Maybe Text) +edId = lens _edId (\ s a -> s{_edId = a}) + +instance FromJSON ElectoralDistrict where + parseJSON + = withObject "ElectoralDistrict" + (\ o -> + ElectoralDistrict <$> + (o .:? "name") <*> (o .:? "scope") <*> (o .:? "id")) + +instance ToJSON ElectoralDistrict where + toJSON ElectoralDistrict{..} + = object + (catMaybes + [("name" .=) <$> _edName, ("scope" .=) <$> _edScope, + ("id" .=) <$> _edId]) + +-- | A simple representation of an address. +-- +-- /See:/ 'simpleAddressType' smart constructor. +data SimpleAddressType = SimpleAddressType + { _satLine2 :: !(Maybe Text) + , _satState :: !(Maybe Text) + , _satLine3 :: !(Maybe Text) + , _satZip :: !(Maybe Text) + , _satCity :: !(Maybe Text) + , _satLine1 :: !(Maybe Text) + , _satLocationName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SimpleAddressType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'satLine2' +-- +-- * 'satState' +-- +-- * 'satLine3' +-- +-- * 'satZip' +-- +-- * 'satCity' +-- +-- * 'satLine1' +-- +-- * 'satLocationName' +simpleAddressType + :: SimpleAddressType +simpleAddressType = + SimpleAddressType + { _satLine2 = Nothing + , _satState = Nothing + , _satLine3 = Nothing + , _satZip = Nothing + , _satCity = Nothing + , _satLine1 = Nothing + , _satLocationName = Nothing + } + +-- | The second line the address, if needed. +satLine2 :: Lens' SimpleAddressType (Maybe Text) +satLine2 = lens _satLine2 (\ s a -> s{_satLine2 = a}) + +-- | The US two letter state abbreviation of the address. +satState :: Lens' SimpleAddressType (Maybe Text) +satState = lens _satState (\ s a -> s{_satState = a}) + +-- | The third line of the address, if needed. +satLine3 :: Lens' SimpleAddressType (Maybe Text) +satLine3 = lens _satLine3 (\ s a -> s{_satLine3 = a}) + +-- | The US Postal Zip Code of the address. +satZip :: Lens' SimpleAddressType (Maybe Text) +satZip = lens _satZip (\ s a -> s{_satZip = a}) + +-- | The city or town for the address. +satCity :: Lens' SimpleAddressType (Maybe Text) +satCity = lens _satCity (\ s a -> s{_satCity = a}) + +-- | The street name and number of this address. +satLine1 :: Lens' SimpleAddressType (Maybe Text) +satLine1 = lens _satLine1 (\ s a -> s{_satLine1 = a}) + +-- | The name of the location. +satLocationName :: Lens' SimpleAddressType (Maybe Text) +satLocationName + = lens _satLocationName + (\ s a -> s{_satLocationName = a}) + +instance FromJSON SimpleAddressType where + parseJSON + = withObject "SimpleAddressType" + (\ o -> + SimpleAddressType <$> + (o .:? "line2") <*> (o .:? "state") <*> + (o .:? "line3") + <*> (o .:? "zip") + <*> (o .:? "city") + <*> (o .:? "line1") + <*> (o .:? "locationName")) + +instance ToJSON SimpleAddressType where + toJSON SimpleAddressType{..} + = object + (catMaybes + [("line2" .=) <$> _satLine2, + ("state" .=) <$> _satState, + ("line3" .=) <$> _satLine3, ("zip" .=) <$> _satZip, + ("city" .=) <$> _satCity, ("line1" .=) <$> _satLine1, + ("locationName" .=) <$> _satLocationName]) + +-- | Describes information about a regional election administrative area. +-- +-- /See:/ 'administrationRegion' smart constructor. +data AdministrationRegion = AdministrationRegion + { _arLocalJurisdiction :: !(Maybe (Maybe AdministrationRegion)) + , _arSources :: !(Maybe [Maybe Source]) + , _arName :: !(Maybe Text) + , _arElectionAdministrationBody :: !(Maybe (Maybe AdministrativeBody)) + , _arId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdministrationRegion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arLocalJurisdiction' +-- +-- * 'arSources' +-- +-- * 'arName' +-- +-- * 'arElectionAdministrationBody' +-- +-- * 'arId' +administrationRegion + :: AdministrationRegion +administrationRegion = + AdministrationRegion + { _arLocalJurisdiction = Nothing + , _arSources = Nothing + , _arName = Nothing + , _arElectionAdministrationBody = Nothing + , _arId = Nothing + } + +-- | The city or county that provides election information for this voter. +-- This object can have the same elements as state. +arLocalJurisdiction :: Lens' AdministrationRegion (Maybe (Maybe AdministrationRegion)) +arLocalJurisdiction + = lens _arLocalJurisdiction + (\ s a -> s{_arLocalJurisdiction = a}) + +-- | A list of sources for this area. If multiple sources are listed the data +-- has been aggregated from those sources. +arSources :: Lens' AdministrationRegion [Maybe Source] +arSources + = lens _arSources (\ s a -> s{_arSources = a}) . + _Default + . _Coerce + +-- | The name of the jurisdiction. +arName :: Lens' AdministrationRegion (Maybe Text) +arName = lens _arName (\ s a -> s{_arName = a}) + +-- | The election administration body for this area. +arElectionAdministrationBody :: Lens' AdministrationRegion (Maybe (Maybe AdministrativeBody)) +arElectionAdministrationBody + = lens _arElectionAdministrationBody + (\ s a -> s{_arElectionAdministrationBody = a}) + +-- | An ID for this object. IDs may change in future requests and should not +-- be cached. Access to this field requires special access that can be +-- requested from the Request more link on the Quotas page. +arId :: Lens' AdministrationRegion (Maybe Text) +arId = lens _arId (\ s a -> s{_arId = a}) + +instance FromJSON AdministrationRegion where + parseJSON + = withObject "AdministrationRegion" + (\ o -> + AdministrationRegion <$> + (o .:? "local_jurisdiction") <*> + (o .:? "sources" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "electionAdministrationBody") + <*> (o .:? "id")) + +instance ToJSON AdministrationRegion where + toJSON AdministrationRegion{..} + = object + (catMaybes + [("local_jurisdiction" .=) <$> _arLocalJurisdiction, + ("sources" .=) <$> _arSources, + ("name" .=) <$> _arName, + ("electionAdministrationBody" .=) <$> + _arElectionAdministrationBody, + ("id" .=) <$> _arId]) + +-- | The list of elections available for this version of the API. +-- +-- /See:/ 'electionsQueryResponse' smart constructor. +data ElectionsQueryResponse = ElectionsQueryResponse + { _eqrKind :: !Text + , _eqrElections :: !(Maybe [Maybe Election]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ElectionsQueryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eqrKind' +-- +-- * 'eqrElections' +electionsQueryResponse + :: ElectionsQueryResponse +electionsQueryResponse = + ElectionsQueryResponse + { _eqrKind = "civicinfo#electionsQueryResponse" + , _eqrElections = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"civicinfo#electionsQueryResponse\". +eqrKind :: Lens' ElectionsQueryResponse Text +eqrKind = lens _eqrKind (\ s a -> s{_eqrKind = a}) + +-- | A list of available elections +eqrElections :: Lens' ElectionsQueryResponse [Maybe Election] +eqrElections + = lens _eqrElections (\ s a -> s{_eqrElections = a}) + . _Default + . _Coerce + +instance FromJSON ElectionsQueryResponse where + parseJSON + = withObject "ElectionsQueryResponse" + (\ o -> + ElectionsQueryResponse <$> + (o .:? "kind" .!= "civicinfo#electionsQueryResponse") + <*> (o .:? "elections" .!= mempty)) + +instance ToJSON ElectionsQueryResponse where + toJSON ElectionsQueryResponse{..} + = object + (catMaybes + [Just ("kind" .= _eqrKind), + ("elections" .=) <$> _eqrElections]) + +-- | Information about a person holding an elected office. +-- +-- /See:/ 'official' smart constructor. +data Official = Official + { _offPhotoUrl :: !(Maybe Text) + , _offUrls :: !(Maybe [Text]) + , _offChannels :: !(Maybe [Maybe Channel]) + , _offAddress :: !(Maybe [Maybe SimpleAddressType]) + , _offPhones :: !(Maybe [Text]) + , _offName :: !(Maybe Text) + , _offEmails :: !(Maybe [Text]) + , _offParty :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Official' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'offPhotoUrl' +-- +-- * 'offUrls' +-- +-- * 'offChannels' +-- +-- * 'offAddress' +-- +-- * 'offPhones' +-- +-- * 'offName' +-- +-- * 'offEmails' +-- +-- * 'offParty' +official + :: Official +official = + Official + { _offPhotoUrl = Nothing + , _offUrls = Nothing + , _offChannels = Nothing + , _offAddress = Nothing + , _offPhones = Nothing + , _offName = Nothing + , _offEmails = Nothing + , _offParty = Nothing + } + +-- | A URL for a photo of the official. +offPhotoUrl :: Lens' Official (Maybe Text) +offPhotoUrl + = lens _offPhotoUrl (\ s a -> s{_offPhotoUrl = a}) + +-- | The official\'s public website URLs. +offUrls :: Lens' Official [Text] +offUrls + = lens _offUrls (\ s a -> s{_offUrls = a}) . _Default + . _Coerce + +-- | A list of known (social) media channels for this official. +offChannels :: Lens' Official [Maybe Channel] +offChannels + = lens _offChannels (\ s a -> s{_offChannels = a}) . + _Default + . _Coerce + +-- | Addresses at which to contact the official. +offAddress :: Lens' Official [Maybe SimpleAddressType] +offAddress + = lens _offAddress (\ s a -> s{_offAddress = a}) . + _Default + . _Coerce + +-- | The official\'s public contact phone numbers. +offPhones :: Lens' Official [Text] +offPhones + = lens _offPhones (\ s a -> s{_offPhones = a}) . + _Default + . _Coerce + +-- | The official\'s name. +offName :: Lens' Official (Maybe Text) +offName = lens _offName (\ s a -> s{_offName = a}) + +-- | The direct email addresses for the official. +offEmails :: Lens' Official [Text] +offEmails + = lens _offEmails (\ s a -> s{_offEmails = a}) . + _Default + . _Coerce + +-- | The full name of the party the official belongs to. +offParty :: Lens' Official (Maybe Text) +offParty = lens _offParty (\ s a -> s{_offParty = a}) + +instance FromJSON Official where + parseJSON + = withObject "Official" + (\ o -> + Official <$> + (o .:? "photoUrl") <*> (o .:? "urls" .!= mempty) <*> + (o .:? "channels" .!= mempty) + <*> (o .:? "address" .!= mempty) + <*> (o .:? "phones" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "emails" .!= mempty) + <*> (o .:? "party")) + +instance ToJSON Official where + toJSON Official{..} + = object + (catMaybes + [("photoUrl" .=) <$> _offPhotoUrl, + ("urls" .=) <$> _offUrls, + ("channels" .=) <$> _offChannels, + ("address" .=) <$> _offAddress, + ("phones" .=) <$> _offPhones, + ("name" .=) <$> _offName, + ("emails" .=) <$> _offEmails, + ("party" .=) <$> _offParty]) diff --git a/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Sum.hs b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Sum.hs new file mode 100644 index 000000000..f2390aedc --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CivicInfo.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CivicInfo.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Divisions/Search.hs b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Divisions/Search.hs new file mode 100644 index 000000000..e33b7a551 --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Divisions/Search.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.CivicInfo.Divisions.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for political divisions by their natural name or OCD ID. +-- +-- /See:/ for @CivicinfoDivisionsSearch@. +module CivicInfo.Divisions.Search + ( + -- * REST Resource + DivisionsSearchAPI + + -- * Creating a Request + , divisionsSearch + , DivisionsSearch + + -- * Request Lenses + , dsQuotaUser + , dsPrettyPrint + , dsUserIp + , dsKey + , dsQuery + , dsOauthToken + , dsFields + , dsAlt + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude + +-- | A resource alias for @CivicinfoDivisionsSearch@ which the +-- 'DivisionsSearch' request conforms to. +type DivisionsSearchAPI = + "divisions" :> + QueryParam "query" Text :> + Get '[JSON] DivisionSearchResponse + +-- | Searches for political divisions by their natural name or OCD ID. +-- +-- /See:/ 'divisionsSearch' smart constructor. +data DivisionsSearch = DivisionsSearch + { _dsQuotaUser :: !(Maybe Text) + , _dsPrettyPrint :: !Bool + , _dsUserIp :: !(Maybe Text) + , _dsKey :: !(Maybe Text) + , _dsQuery :: !(Maybe Text) + , _dsOauthToken :: !(Maybe Text) + , _dsFields :: !(Maybe Text) + , _dsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DivisionsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsQuotaUser' +-- +-- * 'dsPrettyPrint' +-- +-- * 'dsUserIp' +-- +-- * 'dsKey' +-- +-- * 'dsQuery' +-- +-- * 'dsOauthToken' +-- +-- * 'dsFields' +-- +-- * 'dsAlt' +divisionsSearch + :: DivisionsSearch +divisionsSearch = + DivisionsSearch + { _dsQuotaUser = Nothing + , _dsPrettyPrint = True + , _dsUserIp = Nothing + , _dsKey = Nothing + , _dsQuery = Nothing + , _dsOauthToken = Nothing + , _dsFields = Nothing + , _dsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dsQuotaUser :: Lens' DivisionsSearch' (Maybe Text) +dsQuotaUser + = lens _dsQuotaUser (\ s a -> s{_dsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dsPrettyPrint :: Lens' DivisionsSearch' Bool +dsPrettyPrint + = lens _dsPrettyPrint + (\ s a -> s{_dsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dsUserIp :: Lens' DivisionsSearch' (Maybe Text) +dsUserIp = lens _dsUserIp (\ s a -> s{_dsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dsKey :: Lens' DivisionsSearch' (Maybe Text) +dsKey = lens _dsKey (\ s a -> s{_dsKey = a}) + +-- | The search query. Queries can cover any parts of a OCD ID or a human +-- readable division name. All words given in the query are treated as +-- required patterns. In addition to that, most query operators of the +-- Apache Lucene library are supported. See +-- http:\/\/lucene.apache.org\/core\/2_9_4\/queryparsersyntax.html +dsQuery :: Lens' DivisionsSearch' (Maybe Text) +dsQuery = lens _dsQuery (\ s a -> s{_dsQuery = a}) + +-- | OAuth 2.0 token for the current user. +dsOauthToken :: Lens' DivisionsSearch' (Maybe Text) +dsOauthToken + = lens _dsOauthToken (\ s a -> s{_dsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dsFields :: Lens' DivisionsSearch' (Maybe Text) +dsFields = lens _dsFields (\ s a -> s{_dsFields = a}) + +-- | Data format for the response. +dsAlt :: Lens' DivisionsSearch' Text +dsAlt = lens _dsAlt (\ s a -> s{_dsAlt = a}) + +instance GoogleRequest DivisionsSearch' where + type Rs DivisionsSearch' = DivisionSearchResponse + request = requestWithRoute defReq civicInfoURL + requestWithRoute r u DivisionsSearch{..} + = go _dsQuotaUser _dsPrettyPrint _dsUserIp _dsKey + _dsQuery + _dsOauthToken + _dsFields + _dsAlt + where go + = clientWithRoute (Proxy :: Proxy DivisionsSearchAPI) + r + u diff --git a/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/ElectionQuery.hs b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/ElectionQuery.hs new file mode 100644 index 000000000..10eb0792f --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/ElectionQuery.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.CivicInfo.Elections.ElectionQuery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List of available elections to query. +-- +-- /See:/ for @CivicinfoElectionsElectionQuery@. +module CivicInfo.Elections.ElectionQuery + ( + -- * REST Resource + ElectionsElectionQueryAPI + + -- * Creating a Request + , electionsElectionQuery + , ElectionsElectionQuery + + -- * Request Lenses + , eeqQuotaUser + , eeqPrettyPrint + , eeqUserIp + , eeqKey + , eeqOauthToken + , eeqFields + , eeqAlt + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude + +-- | A resource alias for @CivicinfoElectionsElectionQuery@ which the +-- 'ElectionsElectionQuery' request conforms to. +type ElectionsElectionQueryAPI = + "elections" :> Get '[JSON] ElectionsQueryResponse + +-- | List of available elections to query. +-- +-- /See:/ 'electionsElectionQuery' smart constructor. +data ElectionsElectionQuery = ElectionsElectionQuery + { _eeqQuotaUser :: !(Maybe Text) + , _eeqPrettyPrint :: !Bool + , _eeqUserIp :: !(Maybe Text) + , _eeqKey :: !(Maybe Text) + , _eeqOauthToken :: !(Maybe Text) + , _eeqFields :: !(Maybe Text) + , _eeqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ElectionsElectionQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eeqQuotaUser' +-- +-- * 'eeqPrettyPrint' +-- +-- * 'eeqUserIp' +-- +-- * 'eeqKey' +-- +-- * 'eeqOauthToken' +-- +-- * 'eeqFields' +-- +-- * 'eeqAlt' +electionsElectionQuery + :: ElectionsElectionQuery +electionsElectionQuery = + ElectionsElectionQuery + { _eeqQuotaUser = Nothing + , _eeqPrettyPrint = True + , _eeqUserIp = Nothing + , _eeqKey = Nothing + , _eeqOauthToken = Nothing + , _eeqFields = Nothing + , _eeqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eeqQuotaUser :: Lens' ElectionsElectionQuery' (Maybe Text) +eeqQuotaUser + = lens _eeqQuotaUser (\ s a -> s{_eeqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eeqPrettyPrint :: Lens' ElectionsElectionQuery' Bool +eeqPrettyPrint + = lens _eeqPrettyPrint + (\ s a -> s{_eeqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eeqUserIp :: Lens' ElectionsElectionQuery' (Maybe Text) +eeqUserIp + = lens _eeqUserIp (\ s a -> s{_eeqUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eeqKey :: Lens' ElectionsElectionQuery' (Maybe Text) +eeqKey = lens _eeqKey (\ s a -> s{_eeqKey = a}) + +-- | OAuth 2.0 token for the current user. +eeqOauthToken :: Lens' ElectionsElectionQuery' (Maybe Text) +eeqOauthToken + = lens _eeqOauthToken + (\ s a -> s{_eeqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eeqFields :: Lens' ElectionsElectionQuery' (Maybe Text) +eeqFields + = lens _eeqFields (\ s a -> s{_eeqFields = a}) + +-- | Data format for the response. +eeqAlt :: Lens' ElectionsElectionQuery' Text +eeqAlt = lens _eeqAlt (\ s a -> s{_eeqAlt = a}) + +instance GoogleRequest ElectionsElectionQuery' where + type Rs ElectionsElectionQuery' = + ElectionsQueryResponse + request = requestWithRoute defReq civicInfoURL + requestWithRoute r u ElectionsElectionQuery{..} + = go _eeqQuotaUser _eeqPrettyPrint _eeqUserIp _eeqKey + _eeqOauthToken + _eeqFields + _eeqAlt + where go + = clientWithRoute + (Proxy :: Proxy ElectionsElectionQueryAPI) + r + u diff --git a/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/VoterInfoQuery.hs b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/VoterInfoQuery.hs new file mode 100644 index 000000000..706fe6549 --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Elections/VoterInfoQuery.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.CivicInfo.Elections.VoterInfoQuery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Looks up information relevant to a voter based on the voter\'s +-- registered address. +-- +-- /See:/ for @CivicinfoElectionsVoterInfoQuery@. +module CivicInfo.Elections.VoterInfoQuery + ( + -- * REST Resource + ElectionsVoterInfoQueryAPI + + -- * Creating a Request + , electionsVoterInfoQuery + , ElectionsVoterInfoQuery + + -- * Request Lenses + , eviqQuotaUser + , eviqPrettyPrint + , eviqUserIp + , eviqElectionId + , eviqAddress + , eviqKey + , eviqOfficialOnly + , eviqOauthToken + , eviqFields + , eviqAlt + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude + +-- | A resource alias for @CivicinfoElectionsVoterInfoQuery@ which the +-- 'ElectionsVoterInfoQuery' request conforms to. +type ElectionsVoterInfoQueryAPI = + "voterinfo" :> + QueryParam "electionId" Int64 :> + QueryParam "address" Text :> + QueryParam "officialOnly" Bool :> + Get '[JSON] VoterInfoResponse + +-- | Looks up information relevant to a voter based on the voter\'s +-- registered address. +-- +-- /See:/ 'electionsVoterInfoQuery' smart constructor. +data ElectionsVoterInfoQuery = ElectionsVoterInfoQuery + { _eviqQuotaUser :: !(Maybe Text) + , _eviqPrettyPrint :: !Bool + , _eviqUserIp :: !(Maybe Text) + , _eviqElectionId :: !Int64 + , _eviqAddress :: !Text + , _eviqKey :: !(Maybe Text) + , _eviqOfficialOnly :: !Bool + , _eviqOauthToken :: !(Maybe Text) + , _eviqFields :: !(Maybe Text) + , _eviqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ElectionsVoterInfoQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eviqQuotaUser' +-- +-- * 'eviqPrettyPrint' +-- +-- * 'eviqUserIp' +-- +-- * 'eviqElectionId' +-- +-- * 'eviqAddress' +-- +-- * 'eviqKey' +-- +-- * 'eviqOfficialOnly' +-- +-- * 'eviqOauthToken' +-- +-- * 'eviqFields' +-- +-- * 'eviqAlt' +electionsVoterInfoQuery + :: Text -- ^ 'address' + -> ElectionsVoterInfoQuery +electionsVoterInfoQuery pEviqAddress_ = + ElectionsVoterInfoQuery + { _eviqQuotaUser = Nothing + , _eviqPrettyPrint = True + , _eviqUserIp = Nothing + , _eviqElectionId = 0 + , _eviqAddress = pEviqAddress_ + , _eviqKey = Nothing + , _eviqOfficialOnly = False + , _eviqOauthToken = Nothing + , _eviqFields = Nothing + , _eviqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eviqQuotaUser :: Lens' ElectionsVoterInfoQuery' (Maybe Text) +eviqQuotaUser + = lens _eviqQuotaUser + (\ s a -> s{_eviqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eviqPrettyPrint :: Lens' ElectionsVoterInfoQuery' Bool +eviqPrettyPrint + = lens _eviqPrettyPrint + (\ s a -> s{_eviqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eviqUserIp :: Lens' ElectionsVoterInfoQuery' (Maybe Text) +eviqUserIp + = lens _eviqUserIp (\ s a -> s{_eviqUserIp = a}) + +-- | The unique ID of the election to look up. A list of election IDs can be +-- obtained at +-- https:\/\/www.googleapis.com\/civicinfo\/{version}\/elections +eviqElectionId :: Lens' ElectionsVoterInfoQuery' Int64 +eviqElectionId + = lens _eviqElectionId + (\ s a -> s{_eviqElectionId = a}) + +-- | The registered address of the voter to look up. +eviqAddress :: Lens' ElectionsVoterInfoQuery' Text +eviqAddress + = lens _eviqAddress (\ s a -> s{_eviqAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eviqKey :: Lens' ElectionsVoterInfoQuery' (Maybe Text) +eviqKey = lens _eviqKey (\ s a -> s{_eviqKey = a}) + +-- | If set to true, only data from official state sources will be returned. +eviqOfficialOnly :: Lens' ElectionsVoterInfoQuery' Bool +eviqOfficialOnly + = lens _eviqOfficialOnly + (\ s a -> s{_eviqOfficialOnly = a}) + +-- | OAuth 2.0 token for the current user. +eviqOauthToken :: Lens' ElectionsVoterInfoQuery' (Maybe Text) +eviqOauthToken + = lens _eviqOauthToken + (\ s a -> s{_eviqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eviqFields :: Lens' ElectionsVoterInfoQuery' (Maybe Text) +eviqFields + = lens _eviqFields (\ s a -> s{_eviqFields = a}) + +-- | Data format for the response. +eviqAlt :: Lens' ElectionsVoterInfoQuery' Text +eviqAlt = lens _eviqAlt (\ s a -> s{_eviqAlt = a}) + +instance GoogleRequest ElectionsVoterInfoQuery' where + type Rs ElectionsVoterInfoQuery' = VoterInfoResponse + request = requestWithRoute defReq civicInfoURL + requestWithRoute r u ElectionsVoterInfoQuery{..} + = go _eviqQuotaUser _eviqPrettyPrint _eviqUserIp + (Just _eviqElectionId) + (Just _eviqAddress) + _eviqKey + (Just _eviqOfficialOnly) + _eviqOauthToken + _eviqFields + _eviqAlt + where go + = clientWithRoute + (Proxy :: Proxy ElectionsVoterInfoQueryAPI) + r + u diff --git a/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByAddress.hs b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByAddress.hs new file mode 100644 index 000000000..8bf747d58 --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByAddress.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByAddress +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Looks up political geography and representative information for a single +-- address. +-- +-- /See:/ for @CivicinfoRepresentativesRepresentativeInfoByAddress@. +module CivicInfo.Representatives.RepresentativeInfoByAddress + ( + -- * REST Resource + RepresentativesRepresentativeInfoByAddressAPI + + -- * Creating a Request + , representativesRepresentativeInfoByAddress + , RepresentativesRepresentativeInfoByAddress + + -- * Request Lenses + , rribaQuotaUser + , rribaRoles + , rribaPrettyPrint + , rribaUserIp + , rribaAddress + , rribaKey + , rribaIncludeOffices + , rribaLevels + , rribaOauthToken + , rribaFields + , rribaAlt + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude + +-- | A resource alias for @CivicinfoRepresentativesRepresentativeInfoByAddress@ which the +-- 'RepresentativesRepresentativeInfoByAddress' request conforms to. +type RepresentativesRepresentativeInfoByAddressAPI = + "representatives" :> + QueryParams "roles" Text :> + QueryParam "address" Text :> + QueryParam "includeOffices" Bool :> + QueryParams "levels" Text :> + Get '[JSON] RepresentativeInfoResponse + +-- | Looks up political geography and representative information for a single +-- address. +-- +-- /See:/ 'representativesRepresentativeInfoByAddress' smart constructor. +data RepresentativesRepresentativeInfoByAddress = RepresentativesRepresentativeInfoByAddress + { _rribaQuotaUser :: !(Maybe Text) + , _rribaRoles :: !(Maybe Text) + , _rribaPrettyPrint :: !Bool + , _rribaUserIp :: !(Maybe Text) + , _rribaAddress :: !(Maybe Text) + , _rribaKey :: !(Maybe Text) + , _rribaIncludeOffices :: !Bool + , _rribaLevels :: !(Maybe Text) + , _rribaOauthToken :: !(Maybe Text) + , _rribaFields :: !(Maybe Text) + , _rribaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepresentativesRepresentativeInfoByAddress'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rribaQuotaUser' +-- +-- * 'rribaRoles' +-- +-- * 'rribaPrettyPrint' +-- +-- * 'rribaUserIp' +-- +-- * 'rribaAddress' +-- +-- * 'rribaKey' +-- +-- * 'rribaIncludeOffices' +-- +-- * 'rribaLevels' +-- +-- * 'rribaOauthToken' +-- +-- * 'rribaFields' +-- +-- * 'rribaAlt' +representativesRepresentativeInfoByAddress + :: RepresentativesRepresentativeInfoByAddress +representativesRepresentativeInfoByAddress = + RepresentativesRepresentativeInfoByAddress + { _rribaQuotaUser = Nothing + , _rribaRoles = Nothing + , _rribaPrettyPrint = True + , _rribaUserIp = Nothing + , _rribaAddress = Nothing + , _rribaKey = Nothing + , _rribaIncludeOffices = True + , _rribaLevels = Nothing + , _rribaOauthToken = Nothing + , _rribaFields = Nothing + , _rribaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rribaQuotaUser :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaQuotaUser + = lens _rribaQuotaUser + (\ s a -> s{_rribaQuotaUser = a}) + +-- | A list of office roles to filter by. Only offices fulfilling one of +-- these roles will be returned. Divisions that don\'t contain a matching +-- office will not be returned. +rribaRoles :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaRoles + = lens _rribaRoles (\ s a -> s{_rribaRoles = a}) + +-- | Returns response with indentations and line breaks. +rribaPrettyPrint :: Lens' RepresentativesRepresentativeInfoByAddress' Bool +rribaPrettyPrint + = lens _rribaPrettyPrint + (\ s a -> s{_rribaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rribaUserIp :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaUserIp + = lens _rribaUserIp (\ s a -> s{_rribaUserIp = a}) + +-- | The address to look up. May only be specified if the field ocdId is not +-- given in the URL. +rribaAddress :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaAddress + = lens _rribaAddress (\ s a -> s{_rribaAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rribaKey :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaKey = lens _rribaKey (\ s a -> s{_rribaKey = a}) + +-- | Whether to return information about offices and officials. If false, +-- only the top-level district information will be returned. +rribaIncludeOffices :: Lens' RepresentativesRepresentativeInfoByAddress' Bool +rribaIncludeOffices + = lens _rribaIncludeOffices + (\ s a -> s{_rribaIncludeOffices = a}) + +-- | A list of office levels to filter by. Only offices that serve at least +-- one of these levels will be returned. Divisions that don\'t contain a +-- matching office will not be returned. +rribaLevels :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaLevels + = lens _rribaLevels (\ s a -> s{_rribaLevels = a}) + +-- | OAuth 2.0 token for the current user. +rribaOauthToken :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaOauthToken + = lens _rribaOauthToken + (\ s a -> s{_rribaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rribaFields :: Lens' RepresentativesRepresentativeInfoByAddress' (Maybe Text) +rribaFields + = lens _rribaFields (\ s a -> s{_rribaFields = a}) + +-- | Data format for the response. +rribaAlt :: Lens' RepresentativesRepresentativeInfoByAddress' Text +rribaAlt = lens _rribaAlt (\ s a -> s{_rribaAlt = a}) + +instance GoogleRequest + RepresentativesRepresentativeInfoByAddress' where + type Rs RepresentativesRepresentativeInfoByAddress' = + RepresentativeInfoResponse + request = requestWithRoute defReq civicInfoURL + requestWithRoute r u + RepresentativesRepresentativeInfoByAddress{..} + = go _rribaQuotaUser _rribaRoles _rribaPrettyPrint + _rribaUserIp + _rribaAddress + _rribaKey + (Just _rribaIncludeOffices) + _rribaLevels + _rribaOauthToken + _rribaFields + _rribaAlt + where go + = clientWithRoute + (Proxy :: + Proxy RepresentativesRepresentativeInfoByAddressAPI) + r + u diff --git a/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByDivision.hs b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByDivision.hs new file mode 100644 index 000000000..a0043b9ce --- /dev/null +++ b/gogol-civicinfo/gen/Network/Google/Resource/CivicInfo/Representatives/RepresentativeInfoByDivision.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByDivision +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Looks up representative information for a single geographic division. +-- +-- /See:/ for @CivicinfoRepresentativesRepresentativeInfoByDivision@. +module CivicInfo.Representatives.RepresentativeInfoByDivision + ( + -- * REST Resource + RepresentativesRepresentativeInfoByDivisionAPI + + -- * Creating a Request + , representativesRepresentativeInfoByDivision + , RepresentativesRepresentativeInfoByDivision + + -- * Request Lenses + , rribdQuotaUser + , rribdRoles + , rribdPrettyPrint + , rribdUserIp + , rribdKey + , rribdRecursive + , rribdOcdId + , rribdLevels + , rribdOauthToken + , rribdFields + , rribdAlt + ) where + +import Network.Google.CivicInfo.Types +import Network.Google.Prelude + +-- | A resource alias for @CivicinfoRepresentativesRepresentativeInfoByDivision@ which the +-- 'RepresentativesRepresentativeInfoByDivision' request conforms to. +type RepresentativesRepresentativeInfoByDivisionAPI = + "representatives" :> + Capture "ocdId" Text :> + QueryParams "roles" Text :> + QueryParam "recursive" Bool :> + QueryParams "levels" Text :> + Get '[JSON] RepresentativeInfoData + +-- | Looks up representative information for a single geographic division. +-- +-- /See:/ 'representativesRepresentativeInfoByDivision' smart constructor. +data RepresentativesRepresentativeInfoByDivision = RepresentativesRepresentativeInfoByDivision + { _rribdQuotaUser :: !(Maybe Text) + , _rribdRoles :: !(Maybe Text) + , _rribdPrettyPrint :: !Bool + , _rribdUserIp :: !(Maybe Text) + , _rribdKey :: !(Maybe Text) + , _rribdRecursive :: !(Maybe Bool) + , _rribdOcdId :: !Text + , _rribdLevels :: !(Maybe Text) + , _rribdOauthToken :: !(Maybe Text) + , _rribdFields :: !(Maybe Text) + , _rribdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepresentativesRepresentativeInfoByDivision'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rribdQuotaUser' +-- +-- * 'rribdRoles' +-- +-- * 'rribdPrettyPrint' +-- +-- * 'rribdUserIp' +-- +-- * 'rribdKey' +-- +-- * 'rribdRecursive' +-- +-- * 'rribdOcdId' +-- +-- * 'rribdLevels' +-- +-- * 'rribdOauthToken' +-- +-- * 'rribdFields' +-- +-- * 'rribdAlt' +representativesRepresentativeInfoByDivision + :: Text -- ^ 'ocdId' + -> RepresentativesRepresentativeInfoByDivision +representativesRepresentativeInfoByDivision pRribdOcdId_ = + RepresentativesRepresentativeInfoByDivision + { _rribdQuotaUser = Nothing + , _rribdRoles = Nothing + , _rribdPrettyPrint = True + , _rribdUserIp = Nothing + , _rribdKey = Nothing + , _rribdRecursive = Nothing + , _rribdOcdId = pRribdOcdId_ + , _rribdLevels = Nothing + , _rribdOauthToken = Nothing + , _rribdFields = Nothing + , _rribdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rribdQuotaUser :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdQuotaUser + = lens _rribdQuotaUser + (\ s a -> s{_rribdQuotaUser = a}) + +-- | A list of office roles to filter by. Only offices fulfilling one of +-- these roles will be returned. Divisions that don\'t contain a matching +-- office will not be returned. +rribdRoles :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdRoles + = lens _rribdRoles (\ s a -> s{_rribdRoles = a}) + +-- | Returns response with indentations and line breaks. +rribdPrettyPrint :: Lens' RepresentativesRepresentativeInfoByDivision' Bool +rribdPrettyPrint + = lens _rribdPrettyPrint + (\ s a -> s{_rribdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rribdUserIp :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdUserIp + = lens _rribdUserIp (\ s a -> s{_rribdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rribdKey :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdKey = lens _rribdKey (\ s a -> s{_rribdKey = a}) + +-- | If true, information about all divisions contained in the division +-- requested will be included as well. For example, if querying +-- ocd-division\/country:us\/district:dc, this would also return all DC\'s +-- wards and ANCs. +rribdRecursive :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Bool) +rribdRecursive + = lens _rribdRecursive + (\ s a -> s{_rribdRecursive = a}) + +-- | The Open Civic Data division identifier of the division to look up. +rribdOcdId :: Lens' RepresentativesRepresentativeInfoByDivision' Text +rribdOcdId + = lens _rribdOcdId (\ s a -> s{_rribdOcdId = a}) + +-- | A list of office levels to filter by. Only offices that serve at least +-- one of these levels will be returned. Divisions that don\'t contain a +-- matching office will not be returned. +rribdLevels :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdLevels + = lens _rribdLevels (\ s a -> s{_rribdLevels = a}) + +-- | OAuth 2.0 token for the current user. +rribdOauthToken :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdOauthToken + = lens _rribdOauthToken + (\ s a -> s{_rribdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rribdFields :: Lens' RepresentativesRepresentativeInfoByDivision' (Maybe Text) +rribdFields + = lens _rribdFields (\ s a -> s{_rribdFields = a}) + +-- | Data format for the response. +rribdAlt :: Lens' RepresentativesRepresentativeInfoByDivision' Text +rribdAlt = lens _rribdAlt (\ s a -> s{_rribdAlt = a}) + +instance GoogleRequest + RepresentativesRepresentativeInfoByDivision' where + type Rs RepresentativesRepresentativeInfoByDivision' + = RepresentativeInfoData + request = requestWithRoute defReq civicInfoURL + requestWithRoute r u + RepresentativesRepresentativeInfoByDivision{..} + = go _rribdQuotaUser _rribdRoles _rribdPrettyPrint + _rribdUserIp + _rribdKey + _rribdRecursive + _rribdOcdId + _rribdLevels + _rribdOauthToken + _rribdFields + _rribdAlt + where go + = clientWithRoute + (Proxy :: + Proxy RepresentativesRepresentativeInfoByDivisionAPI) + r + u diff --git a/gogol-civicinfo/gogol-civicinfo.cabal b/gogol-civicinfo/gogol-civicinfo.cabal new file mode 100644 index 000000000..9741635d4 --- /dev/null +++ b/gogol-civicinfo/gogol-civicinfo.cabal @@ -0,0 +1,47 @@ +name: gogol-civicinfo +version: 0.0.1 +synopsis: Google Civic Information API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + An API for accessing civic information. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.CivicInfo + , Network.Google.CivicInfo.Types + , Network.Google.Resource.CivicInfo.Divisions.Search + , Network.Google.Resource.CivicInfo.Elections.ElectionQuery + , Network.Google.Resource.CivicInfo.Elections.VoterInfoQuery + , Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByAddress + , Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByDivision + + other-modules: + Network.Google.CivicInfo.Types.Product + , Network.Google.CivicInfo.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-civicinfo/src/.gitkeep b/gogol-civicinfo/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-classroom/LICENSE b/gogol-classroom/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-classroom/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-classroom/Makefile b/gogol-classroom/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-classroom/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-classroom/README.md b/gogol-classroom/README.md new file mode 100644 index 000000000..938274bef --- /dev/null +++ b/gogol-classroom/README.md @@ -0,0 +1,28 @@ +# gogol-classroom + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Classroom API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-classroom` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-classroom/Setup.hs b/gogol-classroom/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-classroom/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-classroom/gen/Network/Google/Classroom.hs b/gogol-classroom/gen/Network/Google/Classroom.hs new file mode 100644 index 000000000..4aae94616 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Classroom.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Classroom +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Google Classroom API +-- +-- /See:/ +module Network.Google.Classroom + ( + -- * API + ClassroomAPI + , classroomAPI + , classroomURL + + -- * Service Methods + + -- * REST Resources + + -- ** ClassroomCoursesAliasesCreate + , module Classroom.Courses.Aliases.Create + + -- ** ClassroomCoursesAliasesDelete + , module Classroom.Courses.Aliases.Delete + + -- ** ClassroomCoursesAliasesList + , module Classroom.Courses.Aliases.List + + -- ** ClassroomCoursesCreate + , module Classroom.Courses.Create + + -- ** ClassroomCoursesDelete + , module Classroom.Courses.Delete + + -- ** ClassroomCoursesGet + , module Classroom.Courses.Get + + -- ** ClassroomCoursesList + , module Classroom.Courses.List + + -- ** ClassroomCoursesPatch + , module Classroom.Courses.Patch + + -- ** ClassroomCoursesStudentsCreate + , module Classroom.Courses.Students.Create + + -- ** ClassroomCoursesStudentsDelete + , module Classroom.Courses.Students.Delete + + -- ** ClassroomCoursesStudentsGet + , module Classroom.Courses.Students.Get + + -- ** ClassroomCoursesStudentsList + , module Classroom.Courses.Students.List + + -- ** ClassroomCoursesTeachersCreate + , module Classroom.Courses.Teachers.Create + + -- ** ClassroomCoursesTeachersDelete + , module Classroom.Courses.Teachers.Delete + + -- ** ClassroomCoursesTeachersGet + , module Classroom.Courses.Teachers.Get + + -- ** ClassroomCoursesTeachersList + , module Classroom.Courses.Teachers.List + + -- ** ClassroomCoursesUpdate + , module Classroom.Courses.Update + + -- ** ClassroomInvitationsAccept + , module Classroom.Invitations.Accept + + -- ** ClassroomInvitationsCreate + , module Classroom.Invitations.Create + + -- ** ClassroomInvitationsDelete + , module Classroom.Invitations.Delete + + -- ** ClassroomInvitationsGet + , module Classroom.Invitations.Get + + -- ** ClassroomInvitationsList + , module Classroom.Invitations.List + + -- ** ClassroomUserProfilesGet + , module Classroom.UserProfiles.Get + + -- * Types + + -- ** ListCourseAliasesResponse + , ListCourseAliasesResponse + , listCourseAliasesResponse + , lcarNextPageToken + , lcarAliases + + -- ** Empty + , Empty + , empty + + -- ** GlobalPermission + , GlobalPermission + , globalPermission + , gpPermission + + -- ** ListInvitationsResponse + , ListInvitationsResponse + , listInvitationsResponse + , lirNextPageToken + , lirInvitations + + -- ** Invitation + , Invitation + , invitation + , iCourseId + , iUserId + , iRole + , iId + + -- ** Teacher + , Teacher + , teacher + , tCourseId + , tProfile + , tUserId + + -- ** ListCoursesResponse + , ListCoursesResponse + , listCoursesResponse + , lcrNextPageToken + , lcrCourses + + -- ** Name + , Name + , name + , nGivenName + , nFullName + , nFamilyName + + -- ** UserProfile + , UserProfile + , userProfile + , upPhotoUrl + , upName + , upEmailAddress + , upId + , upPermissions + + -- ** Course + , Course + , course + , cCreationTime + , cRoom + , cCourseState + , cEnrollmentCode + , cUpdateTime + , cOwnerId + , cName + , cId + , cAlternateLink + , cDescription + , cDescriptionHeading + , cSection + + -- ** ListStudentsResponse + , ListStudentsResponse + , listStudentsResponse + , lsrNextPageToken + , lsrStudents + + -- ** CourseAlias + , CourseAlias + , courseAlias + , caAlias + + -- ** ListTeachersResponse + , ListTeachersResponse + , listTeachersResponse + , ltrNextPageToken + , ltrTeachers + + -- ** Student + , Student + , student + , sCourseId + , sProfile + , sUserId + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude +import Network.Google.Resource.Classroom.Courses.Aliases.Create +import Network.Google.Resource.Classroom.Courses.Aliases.Delete +import Network.Google.Resource.Classroom.Courses.Aliases.List +import Network.Google.Resource.Classroom.Courses.Create +import Network.Google.Resource.Classroom.Courses.Delete +import Network.Google.Resource.Classroom.Courses.Get +import Network.Google.Resource.Classroom.Courses.List +import Network.Google.Resource.Classroom.Courses.Patch +import Network.Google.Resource.Classroom.Courses.Students.Create +import Network.Google.Resource.Classroom.Courses.Students.Delete +import Network.Google.Resource.Classroom.Courses.Students.Get +import Network.Google.Resource.Classroom.Courses.Students.List +import Network.Google.Resource.Classroom.Courses.Teachers.Create +import Network.Google.Resource.Classroom.Courses.Teachers.Delete +import Network.Google.Resource.Classroom.Courses.Teachers.Get +import Network.Google.Resource.Classroom.Courses.Teachers.List +import Network.Google.Resource.Classroom.Courses.Update +import Network.Google.Resource.Classroom.Invitations.Accept +import Network.Google.Resource.Classroom.Invitations.Create +import Network.Google.Resource.Classroom.Invitations.Delete +import Network.Google.Resource.Classroom.Invitations.Get +import Network.Google.Resource.Classroom.Invitations.List +import Network.Google.Resource.Classroom.UserProfiles.Get + +{- $resources +TODO +-} + +type ClassroomAPI = + Invitations :<|> Courses :<|> UserProfiles + +classroomAPI :: Proxy ClassroomAPI +classroomAPI = Proxy diff --git a/gogol-classroom/gen/Network/Google/Classroom/Types.hs b/gogol-classroom/gen/Network/Google/Classroom/Types.hs new file mode 100644 index 000000000..9a5333165 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Classroom/Types.hs @@ -0,0 +1,127 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Classroom.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Classroom.Types + ( + -- * Service URL + classroomURL + + -- * ListCourseAliasesResponse + , ListCourseAliasesResponse + , listCourseAliasesResponse + , lcarNextPageToken + , lcarAliases + + -- * Empty + , Empty + , empty + + -- * GlobalPermission + , GlobalPermission + , globalPermission + , gpPermission + + -- * ListInvitationsResponse + , ListInvitationsResponse + , listInvitationsResponse + , lirNextPageToken + , lirInvitations + + -- * Invitation + , Invitation + , invitation + , iCourseId + , iUserId + , iRole + , iId + + -- * Teacher + , Teacher + , teacher + , tCourseId + , tProfile + , tUserId + + -- * ListCoursesResponse + , ListCoursesResponse + , listCoursesResponse + , lcrNextPageToken + , lcrCourses + + -- * Name + , Name + , name + , nGivenName + , nFullName + , nFamilyName + + -- * UserProfile + , UserProfile + , userProfile + , upPhotoUrl + , upName + , upEmailAddress + , upId + , upPermissions + + -- * Course + , Course + , course + , cCreationTime + , cRoom + , cCourseState + , cEnrollmentCode + , cUpdateTime + , cOwnerId + , cName + , cId + , cAlternateLink + , cDescription + , cDescriptionHeading + , cSection + + -- * ListStudentsResponse + , ListStudentsResponse + , listStudentsResponse + , lsrNextPageToken + , lsrStudents + + -- * CourseAlias + , CourseAlias + , courseAlias + , caAlias + + -- * ListTeachersResponse + , ListTeachersResponse + , listTeachersResponse + , ltrNextPageToken + , ltrTeachers + + -- * Student + , Student + , student + , sCourseId + , sProfile + , sUserId + ) where + +import Network.Google.Classroom.Types.Product +import Network.Google.Classroom.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Classroom API. +classroomURL :: BaseURL +classroomURL + = BaseUrl Https "https://classroom.googleapis.com/" + 443 diff --git a/gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs b/gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs new file mode 100644 index 000000000..c6b0f0b79 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs @@ -0,0 +1,891 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Classroom.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Classroom.Types.Product where + +import Network.Google.Classroom.Types.Sum +import Network.Google.Prelude + +-- | Response when listing course aliases. +-- +-- /See:/ 'listCourseAliasesResponse' smart constructor. +data ListCourseAliasesResponse = ListCourseAliasesResponse + { _lcarNextPageToken :: !(Maybe Text) + , _lcarAliases :: !(Maybe [Maybe CourseAlias]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListCourseAliasesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcarNextPageToken' +-- +-- * 'lcarAliases' +listCourseAliasesResponse + :: ListCourseAliasesResponse +listCourseAliasesResponse = + ListCourseAliasesResponse + { _lcarNextPageToken = Nothing + , _lcarAliases = Nothing + } + +-- | Token identifying the next page of results to return. If empty, no +-- further results are available. +lcarNextPageToken :: Lens' ListCourseAliasesResponse (Maybe Text) +lcarNextPageToken + = lens _lcarNextPageToken + (\ s a -> s{_lcarNextPageToken = a}) + +-- | The course aliases. +lcarAliases :: Lens' ListCourseAliasesResponse [Maybe CourseAlias] +lcarAliases + = lens _lcarAliases (\ s a -> s{_lcarAliases = a}) . + _Default + . _Coerce + +instance FromJSON ListCourseAliasesResponse where + parseJSON + = withObject "ListCourseAliasesResponse" + (\ o -> + ListCourseAliasesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "aliases" .!= mempty)) + +instance ToJSON ListCourseAliasesResponse where + toJSON ListCourseAliasesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lcarNextPageToken, + ("aliases" .=) <$> _lcarAliases]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Global user permission description. +-- +-- /See:/ 'globalPermission' smart constructor. +newtype GlobalPermission = GlobalPermission + { _gpPermission :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalPermission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gpPermission' +globalPermission + :: GlobalPermission +globalPermission = + GlobalPermission + { _gpPermission = Nothing + } + +-- | Permission value. +gpPermission :: Lens' GlobalPermission (Maybe Text) +gpPermission + = lens _gpPermission (\ s a -> s{_gpPermission = a}) + +instance FromJSON GlobalPermission where + parseJSON + = withObject "GlobalPermission" + (\ o -> GlobalPermission <$> (o .:? "permission")) + +instance ToJSON GlobalPermission where + toJSON GlobalPermission{..} + = object + (catMaybes [("permission" .=) <$> _gpPermission]) + +-- | Response when listing invitations. +-- +-- /See:/ 'listInvitationsResponse' smart constructor. +data ListInvitationsResponse = ListInvitationsResponse + { _lirNextPageToken :: !(Maybe Text) + , _lirInvitations :: !(Maybe [Maybe Invitation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListInvitationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lirNextPageToken' +-- +-- * 'lirInvitations' +listInvitationsResponse + :: ListInvitationsResponse +listInvitationsResponse = + ListInvitationsResponse + { _lirNextPageToken = Nothing + , _lirInvitations = Nothing + } + +-- | Token identifying the next page of results to return. If empty, no +-- further results are available. +lirNextPageToken :: Lens' ListInvitationsResponse (Maybe Text) +lirNextPageToken + = lens _lirNextPageToken + (\ s a -> s{_lirNextPageToken = a}) + +-- | Invitations that match the list request. +lirInvitations :: Lens' ListInvitationsResponse [Maybe Invitation] +lirInvitations + = lens _lirInvitations + (\ s a -> s{_lirInvitations = a}) + . _Default + . _Coerce + +instance FromJSON ListInvitationsResponse where + parseJSON + = withObject "ListInvitationsResponse" + (\ o -> + ListInvitationsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "invitations" .!= mempty)) + +instance ToJSON ListInvitationsResponse where + toJSON ListInvitationsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lirNextPageToken, + ("invitations" .=) <$> _lirInvitations]) + +-- | An invitation to join a course. +-- +-- /See:/ 'invitation' smart constructor. +data Invitation = Invitation + { _iCourseId :: !(Maybe Text) + , _iUserId :: !(Maybe Text) + , _iRole :: !(Maybe Text) + , _iId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Invitation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iCourseId' +-- +-- * 'iUserId' +-- +-- * 'iRole' +-- +-- * 'iId' +invitation + :: Invitation +invitation = + Invitation + { _iCourseId = Nothing + , _iUserId = Nothing + , _iRole = Nothing + , _iId = Nothing + } + +-- | Identifier of the course to invite the user to. +iCourseId :: Lens' Invitation (Maybe Text) +iCourseId + = lens _iCourseId (\ s a -> s{_iCourseId = a}) + +-- | Identifier of the invited user. When specified as a parameter of a +-- request, this identifier can be set to one of the following: * the +-- numeric identifier for the user * the email address of the user * the +-- string literal \`\"me\"\`, indicating the requesting user +iUserId :: Lens' Invitation (Maybe Text) +iUserId = lens _iUserId (\ s a -> s{_iUserId = a}) + +-- | Role to invite the user to have. Must not be +-- \`COURSE_ROLE_UNSPECIFIED\`. +iRole :: Lens' Invitation (Maybe Text) +iRole = lens _iRole (\ s a -> s{_iRole = a}) + +-- | Identifier assigned by Classroom. Read-only. +iId :: Lens' Invitation (Maybe Text) +iId = lens _iId (\ s a -> s{_iId = a}) + +instance FromJSON Invitation where + parseJSON + = withObject "Invitation" + (\ o -> + Invitation <$> + (o .:? "courseId") <*> (o .:? "userId") <*> + (o .:? "role") + <*> (o .:? "id")) + +instance ToJSON Invitation where + toJSON Invitation{..} + = object + (catMaybes + [("courseId" .=) <$> _iCourseId, + ("userId" .=) <$> _iUserId, ("role" .=) <$> _iRole, + ("id" .=) <$> _iId]) + +-- | Teacher of a course. +-- +-- /See:/ 'teacher' smart constructor. +data Teacher = Teacher + { _tCourseId :: !(Maybe Text) + , _tProfile :: !(Maybe (Maybe UserProfile)) + , _tUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Teacher' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tCourseId' +-- +-- * 'tProfile' +-- +-- * 'tUserId' +teacher + :: Teacher +teacher = + Teacher + { _tCourseId = Nothing + , _tProfile = Nothing + , _tUserId = Nothing + } + +-- | Identifier of the course. Read-only. +tCourseId :: Lens' Teacher (Maybe Text) +tCourseId + = lens _tCourseId (\ s a -> s{_tCourseId = a}) + +-- | Global user information for the teacher. Read-only. +tProfile :: Lens' Teacher (Maybe (Maybe UserProfile)) +tProfile = lens _tProfile (\ s a -> s{_tProfile = a}) + +-- | Identifier of the user. When specified as a parameter of a request, this +-- identifier can be one of the following: * the numeric identifier for the +-- user * the email address of the user * the string literal \`\"me\"\`, +-- indicating the requesting user +tUserId :: Lens' Teacher (Maybe Text) +tUserId = lens _tUserId (\ s a -> s{_tUserId = a}) + +instance FromJSON Teacher where + parseJSON + = withObject "Teacher" + (\ o -> + Teacher <$> + (o .:? "courseId") <*> (o .:? "profile") <*> + (o .:? "userId")) + +instance ToJSON Teacher where + toJSON Teacher{..} + = object + (catMaybes + [("courseId" .=) <$> _tCourseId, + ("profile" .=) <$> _tProfile, + ("userId" .=) <$> _tUserId]) + +-- | Response when listing courses. +-- +-- /See:/ 'listCoursesResponse' smart constructor. +data ListCoursesResponse = ListCoursesResponse + { _lcrNextPageToken :: !(Maybe Text) + , _lcrCourses :: !(Maybe [Maybe Course]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListCoursesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcrNextPageToken' +-- +-- * 'lcrCourses' +listCoursesResponse + :: ListCoursesResponse +listCoursesResponse = + ListCoursesResponse + { _lcrNextPageToken = Nothing + , _lcrCourses = Nothing + } + +-- | Token identifying the next page of results to return. If empty, no +-- further results are available. +lcrNextPageToken :: Lens' ListCoursesResponse (Maybe Text) +lcrNextPageToken + = lens _lcrNextPageToken + (\ s a -> s{_lcrNextPageToken = a}) + +-- | Courses that match the list request. +lcrCourses :: Lens' ListCoursesResponse [Maybe Course] +lcrCourses + = lens _lcrCourses (\ s a -> s{_lcrCourses = a}) . + _Default + . _Coerce + +instance FromJSON ListCoursesResponse where + parseJSON + = withObject "ListCoursesResponse" + (\ o -> + ListCoursesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "courses" .!= mempty)) + +instance ToJSON ListCoursesResponse where + toJSON ListCoursesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lcrNextPageToken, + ("courses" .=) <$> _lcrCourses]) + +-- | Details of the user\'s name. +-- +-- /See:/ 'name' smart constructor. +data Name = Name + { _nGivenName :: !(Maybe Text) + , _nFullName :: !(Maybe Text) + , _nFamilyName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Name' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nGivenName' +-- +-- * 'nFullName' +-- +-- * 'nFamilyName' +name + :: Name +name = + Name + { _nGivenName = Nothing + , _nFullName = Nothing + , _nFamilyName = Nothing + } + +-- | The user\'s first name. Read-only. +nGivenName :: Lens' Name (Maybe Text) +nGivenName + = lens _nGivenName (\ s a -> s{_nGivenName = a}) + +-- | The user\'s full name formed by concatenating the first and last name +-- values. Read-only. +nFullName :: Lens' Name (Maybe Text) +nFullName + = lens _nFullName (\ s a -> s{_nFullName = a}) + +-- | The user\'s last name. Read-only. +nFamilyName :: Lens' Name (Maybe Text) +nFamilyName + = lens _nFamilyName (\ s a -> s{_nFamilyName = a}) + +instance FromJSON Name where + parseJSON + = withObject "Name" + (\ o -> + Name <$> + (o .:? "givenName") <*> (o .:? "fullName") <*> + (o .:? "familyName")) + +instance ToJSON Name where + toJSON Name{..} + = object + (catMaybes + [("givenName" .=) <$> _nGivenName, + ("fullName" .=) <$> _nFullName, + ("familyName" .=) <$> _nFamilyName]) + +-- | Global information for a user. +-- +-- /See:/ 'userProfile' smart constructor. +data UserProfile = UserProfile + { _upPhotoUrl :: !(Maybe Text) + , _upName :: !(Maybe (Maybe Name)) + , _upEmailAddress :: !(Maybe Text) + , _upId :: !(Maybe Text) + , _upPermissions :: !(Maybe [Maybe GlobalPermission]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upPhotoUrl' +-- +-- * 'upName' +-- +-- * 'upEmailAddress' +-- +-- * 'upId' +-- +-- * 'upPermissions' +userProfile + :: UserProfile +userProfile = + UserProfile + { _upPhotoUrl = Nothing + , _upName = Nothing + , _upEmailAddress = Nothing + , _upId = Nothing + , _upPermissions = Nothing + } + +-- | URL of user\'s profile photo. Read-only. +upPhotoUrl :: Lens' UserProfile (Maybe Text) +upPhotoUrl + = lens _upPhotoUrl (\ s a -> s{_upPhotoUrl = a}) + +-- | Name of the user. Read-only. +upName :: Lens' UserProfile (Maybe (Maybe Name)) +upName = lens _upName (\ s a -> s{_upName = a}) + +-- | Email address of the user. Read-only. +upEmailAddress :: Lens' UserProfile (Maybe Text) +upEmailAddress + = lens _upEmailAddress + (\ s a -> s{_upEmailAddress = a}) + +-- | Identifier of the user. Read-only. +upId :: Lens' UserProfile (Maybe Text) +upId = lens _upId (\ s a -> s{_upId = a}) + +-- | Global permissions of the user. Read-only. +upPermissions :: Lens' UserProfile [Maybe GlobalPermission] +upPermissions + = lens _upPermissions + (\ s a -> s{_upPermissions = a}) + . _Default + . _Coerce + +instance FromJSON UserProfile where + parseJSON + = withObject "UserProfile" + (\ o -> + UserProfile <$> + (o .:? "photoUrl") <*> (o .:? "name") <*> + (o .:? "emailAddress") + <*> (o .:? "id") + <*> (o .:? "permissions" .!= mempty)) + +instance ToJSON UserProfile where + toJSON UserProfile{..} + = object + (catMaybes + [("photoUrl" .=) <$> _upPhotoUrl, + ("name" .=) <$> _upName, + ("emailAddress" .=) <$> _upEmailAddress, + ("id" .=) <$> _upId, + ("permissions" .=) <$> _upPermissions]) + +-- | A Course in Classroom. +-- +-- /See:/ 'course' smart constructor. +data Course = Course + { _cCreationTime :: !(Maybe Text) + , _cRoom :: !(Maybe Text) + , _cCourseState :: !(Maybe Text) + , _cEnrollmentCode :: !(Maybe Text) + , _cUpdateTime :: !(Maybe Text) + , _cOwnerId :: !(Maybe Text) + , _cName :: !(Maybe Text) + , _cId :: !(Maybe Text) + , _cAlternateLink :: !(Maybe Text) + , _cDescription :: !(Maybe Text) + , _cDescriptionHeading :: !(Maybe Text) + , _cSection :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Course' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cCreationTime' +-- +-- * 'cRoom' +-- +-- * 'cCourseState' +-- +-- * 'cEnrollmentCode' +-- +-- * 'cUpdateTime' +-- +-- * 'cOwnerId' +-- +-- * 'cName' +-- +-- * 'cId' +-- +-- * 'cAlternateLink' +-- +-- * 'cDescription' +-- +-- * 'cDescriptionHeading' +-- +-- * 'cSection' +course + :: Course +course = + Course + { _cCreationTime = Nothing + , _cRoom = Nothing + , _cCourseState = Nothing + , _cEnrollmentCode = Nothing + , _cUpdateTime = Nothing + , _cOwnerId = Nothing + , _cName = Nothing + , _cId = Nothing + , _cAlternateLink = Nothing + , _cDescription = Nothing + , _cDescriptionHeading = Nothing + , _cSection = Nothing + } + +-- | Creation time of the course. Specifying this field in a course update +-- mask will result in an error. Read-only. +cCreationTime :: Lens' Course (Maybe Text) +cCreationTime + = lens _cCreationTime + (\ s a -> s{_cCreationTime = a}) + +-- | Optional room location. For example, \"301\". If set, this field must be +-- a valid UTF-8 string and no longer than 650 characters. +cRoom :: Lens' Course (Maybe Text) +cRoom = lens _cRoom (\ s a -> s{_cRoom = a}) + +-- | State of the course. If unspecified, the default state is +-- \`PROVISIONED\`. +cCourseState :: Lens' Course (Maybe Text) +cCourseState + = lens _cCourseState (\ s a -> s{_cCourseState = a}) + +-- | Enrollment code to use when joining this course. Specifying this field +-- in a course update mask will result in an error. Read-only. +cEnrollmentCode :: Lens' Course (Maybe Text) +cEnrollmentCode + = lens _cEnrollmentCode + (\ s a -> s{_cEnrollmentCode = a}) + +-- | Time of the most recent update to this course. Specifying this field in +-- a course update mask will result in an error. Read-only. +cUpdateTime :: Lens' Course (Maybe Text) +cUpdateTime + = lens _cUpdateTime (\ s a -> s{_cUpdateTime = a}) + +-- | The identifier of the owner of a course. When specified as a parameter +-- of a [create course request][google.classroom.v1.Courses.CreateCourse], +-- this field is required. The identifier can be one of the following: * +-- the numeric identifier for the user * the email address of the user * +-- the string literal \`\"me\"\`, indicating the requesting user This must +-- be set in a create request. Specifying this field in a course update +-- mask will result in an \`INVALID_ARGUMENT\` error. +cOwnerId :: Lens' Course (Maybe Text) +cOwnerId = lens _cOwnerId (\ s a -> s{_cOwnerId = a}) + +-- | Name of the course. For example, \"10th Grade Biology\". The name is +-- required. It must be between 1 and 750 characters and a valid UTF-8 +-- string. +cName :: Lens' Course (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Identifier for this course assigned by Classroom. When [creating a +-- course][google.classroom.v1.Courses.CreateCourse], you may optionally +-- set this identifier to an [alias +-- string][google.classroom.v1.CourseAlias] in the request to create a +-- corresponding alias. The \`id\` is still assigned by Classroom and +-- cannot be updated after the course is created. Specifying this field in +-- a course update mask will result in an error. +cId :: Lens' Course (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | Absolute link to this course in the Classroom web UI. Read-only. +cAlternateLink :: Lens' Course (Maybe Text) +cAlternateLink + = lens _cAlternateLink + (\ s a -> s{_cAlternateLink = a}) + +-- | Optional description. For example, \"We\'ll be learning about the +-- structure of living creatures from a combination of textbooks, guest +-- lectures, and lab work. Expect to be excited!\" If set, this field must +-- be a valid UTF-8 string and no longer than 30,000 characters. +cDescription :: Lens' Course (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +-- | Optional heading for the description. For example, \"Welcome to 10th +-- Grade Biology.\" If set, this field must be a valid UTF-8 string and no +-- longer than 3600 characters. +cDescriptionHeading :: Lens' Course (Maybe Text) +cDescriptionHeading + = lens _cDescriptionHeading + (\ s a -> s{_cDescriptionHeading = a}) + +-- | Section of the course. For example, \"Period 2\". If set, this field +-- must be a valid UTF-8 string and no longer than 2800 characters. +cSection :: Lens' Course (Maybe Text) +cSection = lens _cSection (\ s a -> s{_cSection = a}) + +instance FromJSON Course where + parseJSON + = withObject "Course" + (\ o -> + Course <$> + (o .:? "creationTime") <*> (o .:? "room") <*> + (o .:? "courseState") + <*> (o .:? "enrollmentCode") + <*> (o .:? "updateTime") + <*> (o .:? "ownerId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "alternateLink") + <*> (o .:? "description") + <*> (o .:? "descriptionHeading") + <*> (o .:? "section")) + +instance ToJSON Course where + toJSON Course{..} + = object + (catMaybes + [("creationTime" .=) <$> _cCreationTime, + ("room" .=) <$> _cRoom, + ("courseState" .=) <$> _cCourseState, + ("enrollmentCode" .=) <$> _cEnrollmentCode, + ("updateTime" .=) <$> _cUpdateTime, + ("ownerId" .=) <$> _cOwnerId, ("name" .=) <$> _cName, + ("id" .=) <$> _cId, + ("alternateLink" .=) <$> _cAlternateLink, + ("description" .=) <$> _cDescription, + ("descriptionHeading" .=) <$> _cDescriptionHeading, + ("section" .=) <$> _cSection]) + +-- | Response when listing students. +-- +-- /See:/ 'listStudentsResponse' smart constructor. +data ListStudentsResponse = ListStudentsResponse + { _lsrNextPageToken :: !(Maybe Text) + , _lsrStudents :: !(Maybe [Maybe Student]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListStudentsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsrNextPageToken' +-- +-- * 'lsrStudents' +listStudentsResponse + :: ListStudentsResponse +listStudentsResponse = + ListStudentsResponse + { _lsrNextPageToken = Nothing + , _lsrStudents = Nothing + } + +-- | Token identifying the next page of results to return. If empty, no +-- further results are available. +lsrNextPageToken :: Lens' ListStudentsResponse (Maybe Text) +lsrNextPageToken + = lens _lsrNextPageToken + (\ s a -> s{_lsrNextPageToken = a}) + +-- | Students who match the list request. +lsrStudents :: Lens' ListStudentsResponse [Maybe Student] +lsrStudents + = lens _lsrStudents (\ s a -> s{_lsrStudents = a}) . + _Default + . _Coerce + +instance FromJSON ListStudentsResponse where + parseJSON + = withObject "ListStudentsResponse" + (\ o -> + ListStudentsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "students" .!= mempty)) + +instance ToJSON ListStudentsResponse where + toJSON ListStudentsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lsrNextPageToken, + ("students" .=) <$> _lsrStudents]) + +-- | Alternative identifier for a course. An alias uniquely identifies a +-- course. It must be unique within one of the following scopes: * domain: +-- A domain-scoped alias is visible to all users within the alias +-- creator\'s domain and can be created only by a domain admin. A +-- domain-scoped alias is often used when a course has an identifier +-- external to Classroom. * project: A project-scoped alias is visible to +-- any request from an application using the Developer Console project ID +-- that created the alias and can be created by any project. A +-- project-scoped alias is often used when an application has alternative +-- identifiers. A random value can also be used to avoid duplicate courses +-- in the event of transmission failures, as retrying a request will return +-- \`ALREADY_EXISTS\` if a previous one has succeeded. +-- +-- /See:/ 'courseAlias' smart constructor. +newtype CourseAlias = CourseAlias + { _caAlias :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CourseAlias' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caAlias' +courseAlias + :: CourseAlias +courseAlias = + CourseAlias + { _caAlias = Nothing + } + +-- | Alias string. The format of the string indicates the desired alias +-- scoping. * \`d:\` indicates a domain-scoped alias. Example: +-- \`d:math_101\` * \`p:\` indicates a project-scoped alias. Example: +-- \`p:abc123\` This field has a maximum length of 256 characters. +caAlias :: Lens' CourseAlias (Maybe Text) +caAlias = lens _caAlias (\ s a -> s{_caAlias = a}) + +instance FromJSON CourseAlias where + parseJSON + = withObject "CourseAlias" + (\ o -> CourseAlias <$> (o .:? "alias")) + +instance ToJSON CourseAlias where + toJSON CourseAlias{..} + = object (catMaybes [("alias" .=) <$> _caAlias]) + +-- | Response when listing teachers. +-- +-- /See:/ 'listTeachersResponse' smart constructor. +data ListTeachersResponse = ListTeachersResponse + { _ltrNextPageToken :: !(Maybe Text) + , _ltrTeachers :: !(Maybe [Maybe Teacher]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTeachersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrNextPageToken' +-- +-- * 'ltrTeachers' +listTeachersResponse + :: ListTeachersResponse +listTeachersResponse = + ListTeachersResponse + { _ltrNextPageToken = Nothing + , _ltrTeachers = Nothing + } + +-- | Token identifying the next page of results to return. If empty, no +-- further results are available. +ltrNextPageToken :: Lens' ListTeachersResponse (Maybe Text) +ltrNextPageToken + = lens _ltrNextPageToken + (\ s a -> s{_ltrNextPageToken = a}) + +-- | Teachers who match the list request. +ltrTeachers :: Lens' ListTeachersResponse [Maybe Teacher] +ltrTeachers + = lens _ltrTeachers (\ s a -> s{_ltrTeachers = a}) . + _Default + . _Coerce + +instance FromJSON ListTeachersResponse where + parseJSON + = withObject "ListTeachersResponse" + (\ o -> + ListTeachersResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "teachers" .!= mempty)) + +instance ToJSON ListTeachersResponse where + toJSON ListTeachersResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltrNextPageToken, + ("teachers" .=) <$> _ltrTeachers]) + +-- | Student in a course. +-- +-- /See:/ 'student' smart constructor. +data Student = Student + { _sCourseId :: !(Maybe Text) + , _sProfile :: !(Maybe (Maybe UserProfile)) + , _sUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Student' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sCourseId' +-- +-- * 'sProfile' +-- +-- * 'sUserId' +student + :: Student +student = + Student + { _sCourseId = Nothing + , _sProfile = Nothing + , _sUserId = Nothing + } + +-- | Identifier of the course. Read-only. +sCourseId :: Lens' Student (Maybe Text) +sCourseId + = lens _sCourseId (\ s a -> s{_sCourseId = a}) + +-- | Global user information for the student. Read-only. +sProfile :: Lens' Student (Maybe (Maybe UserProfile)) +sProfile = lens _sProfile (\ s a -> s{_sProfile = a}) + +-- | Identifier of the user. When specified as a parameter of a request, this +-- identifier can be one of the following: * the numeric identifier for the +-- user * the email address of the user * the string literal \`\"me\"\`, +-- indicating the requesting user +sUserId :: Lens' Student (Maybe Text) +sUserId = lens _sUserId (\ s a -> s{_sUserId = a}) + +instance FromJSON Student where + parseJSON + = withObject "Student" + (\ o -> + Student <$> + (o .:? "courseId") <*> (o .:? "profile") <*> + (o .:? "userId")) + +instance ToJSON Student where + toJSON Student{..} + = object + (catMaybes + [("courseId" .=) <$> _sCourseId, + ("profile" .=) <$> _sProfile, + ("userId" .=) <$> _sUserId]) diff --git a/gogol-classroom/gen/Network/Google/Classroom/Types/Sum.hs b/gogol-classroom/gen/Network/Google/Classroom/Types/Sum.hs new file mode 100644 index 000000000..ebbc69313 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Classroom/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Classroom.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Classroom.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Create.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Create.hs new file mode 100644 index 000000000..c4870ad81 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Create.hs @@ -0,0 +1,237 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Aliases.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an alias for a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to create the alias or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the course does not exist. * +-- \`ALREADY_EXISTS\` if the alias already exists. +-- +-- /See:/ for @ClassroomCoursesAliasesCreate@. +module Classroom.Courses.Aliases.Create + ( + -- * REST Resource + CoursesAliasesCreateAPI + + -- * Creating a Request + , coursesAliasesCreate + , CoursesAliasesCreate + + -- * Request Lenses + , cacXgafv + , cacQuotaUser + , cacPrettyPrint + , cacUploadProtocol + , cacPp + , cacCourseId + , cacAccessToken + , cacUploadType + , cacBearerToken + , cacKey + , cacOauthToken + , cacFields + , cacCallback + , cacAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesAliasesCreate@ which the +-- 'CoursesAliasesCreate' request conforms to. +type CoursesAliasesCreateAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "aliases" :> Post '[JSON] CourseAlias + +-- | Creates an alias for a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to create the alias or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the course does not exist. * +-- \`ALREADY_EXISTS\` if the alias already exists. +-- +-- /See:/ 'coursesAliasesCreate' smart constructor. +data CoursesAliasesCreate = CoursesAliasesCreate + { _cacXgafv :: !(Maybe Text) + , _cacQuotaUser :: !(Maybe Text) + , _cacPrettyPrint :: !Bool + , _cacUploadProtocol :: !(Maybe Text) + , _cacPp :: !Bool + , _cacCourseId :: !Text + , _cacAccessToken :: !(Maybe Text) + , _cacUploadType :: !(Maybe Text) + , _cacBearerToken :: !(Maybe Text) + , _cacKey :: !(Maybe Text) + , _cacOauthToken :: !(Maybe Text) + , _cacFields :: !(Maybe Text) + , _cacCallback :: !(Maybe Text) + , _cacAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesAliasesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cacXgafv' +-- +-- * 'cacQuotaUser' +-- +-- * 'cacPrettyPrint' +-- +-- * 'cacUploadProtocol' +-- +-- * 'cacPp' +-- +-- * 'cacCourseId' +-- +-- * 'cacAccessToken' +-- +-- * 'cacUploadType' +-- +-- * 'cacBearerToken' +-- +-- * 'cacKey' +-- +-- * 'cacOauthToken' +-- +-- * 'cacFields' +-- +-- * 'cacCallback' +-- +-- * 'cacAlt' +coursesAliasesCreate + :: Text -- ^ 'courseId' + -> CoursesAliasesCreate +coursesAliasesCreate pCacCourseId_ = + CoursesAliasesCreate + { _cacXgafv = Nothing + , _cacQuotaUser = Nothing + , _cacPrettyPrint = True + , _cacUploadProtocol = Nothing + , _cacPp = True + , _cacCourseId = pCacCourseId_ + , _cacAccessToken = Nothing + , _cacUploadType = Nothing + , _cacBearerToken = Nothing + , _cacKey = Nothing + , _cacOauthToken = Nothing + , _cacFields = Nothing + , _cacCallback = Nothing + , _cacAlt = "json" + } + +-- | V1 error format. +cacXgafv :: Lens' CoursesAliasesCreate' (Maybe Text) +cacXgafv = lens _cacXgafv (\ s a -> s{_cacXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cacQuotaUser :: Lens' CoursesAliasesCreate' (Maybe Text) +cacQuotaUser + = lens _cacQuotaUser (\ s a -> s{_cacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cacPrettyPrint :: Lens' CoursesAliasesCreate' Bool +cacPrettyPrint + = lens _cacPrettyPrint + (\ s a -> s{_cacPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cacUploadProtocol :: Lens' CoursesAliasesCreate' (Maybe Text) +cacUploadProtocol + = lens _cacUploadProtocol + (\ s a -> s{_cacUploadProtocol = a}) + +-- | Pretty-print response. +cacPp :: Lens' CoursesAliasesCreate' Bool +cacPp = lens _cacPp (\ s a -> s{_cacPp = a}) + +-- | Identifier of the course to alias. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cacCourseId :: Lens' CoursesAliasesCreate' Text +cacCourseId + = lens _cacCourseId (\ s a -> s{_cacCourseId = a}) + +-- | OAuth access token. +cacAccessToken :: Lens' CoursesAliasesCreate' (Maybe Text) +cacAccessToken + = lens _cacAccessToken + (\ s a -> s{_cacAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cacUploadType :: Lens' CoursesAliasesCreate' (Maybe Text) +cacUploadType + = lens _cacUploadType + (\ s a -> s{_cacUploadType = a}) + +-- | OAuth bearer token. +cacBearerToken :: Lens' CoursesAliasesCreate' (Maybe Text) +cacBearerToken + = lens _cacBearerToken + (\ s a -> s{_cacBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cacKey :: Lens' CoursesAliasesCreate' (Maybe Text) +cacKey = lens _cacKey (\ s a -> s{_cacKey = a}) + +-- | OAuth 2.0 token for the current user. +cacOauthToken :: Lens' CoursesAliasesCreate' (Maybe Text) +cacOauthToken + = lens _cacOauthToken + (\ s a -> s{_cacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cacFields :: Lens' CoursesAliasesCreate' (Maybe Text) +cacFields + = lens _cacFields (\ s a -> s{_cacFields = a}) + +-- | JSONP +cacCallback :: Lens' CoursesAliasesCreate' (Maybe Text) +cacCallback + = lens _cacCallback (\ s a -> s{_cacCallback = a}) + +-- | Data format for response. +cacAlt :: Lens' CoursesAliasesCreate' Text +cacAlt = lens _cacAlt (\ s a -> s{_cacAlt = a}) + +instance GoogleRequest CoursesAliasesCreate' where + type Rs CoursesAliasesCreate' = CourseAlias + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesAliasesCreate{..} + = go _cacXgafv _cacQuotaUser _cacPrettyPrint + _cacUploadProtocol + _cacPp + _cacCourseId + _cacAccessToken + _cacUploadType + _cacBearerToken + _cacKey + _cacOauthToken + _cacFields + _cacCallback + _cacAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesAliasesCreateAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs new file mode 100644 index 000000000..928796516 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs @@ -0,0 +1,247 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Aliases.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an alias of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to remove the alias or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the alias does not exist. +-- +-- /See:/ for @ClassroomCoursesAliasesDelete@. +module Classroom.Courses.Aliases.Delete + ( + -- * REST Resource + CoursesAliasesDeleteAPI + + -- * Creating a Request + , coursesAliasesDelete + , CoursesAliasesDelete + + -- * Request Lenses + , cadXgafv + , cadQuotaUser + , cadPrettyPrint + , cadUploadProtocol + , cadPp + , cadCourseId + , cadAccessToken + , cadUploadType + , cadAlias + , cadBearerToken + , cadKey + , cadOauthToken + , cadFields + , cadCallback + , cadAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesAliasesDelete@ which the +-- 'CoursesAliasesDelete' request conforms to. +type CoursesAliasesDeleteAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "aliases" :> + Capture "alias" Text :> Delete '[JSON] Empty + +-- | Deletes an alias of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to remove the alias or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the alias does not exist. +-- +-- /See:/ 'coursesAliasesDelete' smart constructor. +data CoursesAliasesDelete = CoursesAliasesDelete + { _cadXgafv :: !(Maybe Text) + , _cadQuotaUser :: !(Maybe Text) + , _cadPrettyPrint :: !Bool + , _cadUploadProtocol :: !(Maybe Text) + , _cadPp :: !Bool + , _cadCourseId :: !Text + , _cadAccessToken :: !(Maybe Text) + , _cadUploadType :: !(Maybe Text) + , _cadAlias :: !Text + , _cadBearerToken :: !(Maybe Text) + , _cadKey :: !(Maybe Text) + , _cadOauthToken :: !(Maybe Text) + , _cadFields :: !(Maybe Text) + , _cadCallback :: !(Maybe Text) + , _cadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesAliasesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cadXgafv' +-- +-- * 'cadQuotaUser' +-- +-- * 'cadPrettyPrint' +-- +-- * 'cadUploadProtocol' +-- +-- * 'cadPp' +-- +-- * 'cadCourseId' +-- +-- * 'cadAccessToken' +-- +-- * 'cadUploadType' +-- +-- * 'cadAlias' +-- +-- * 'cadBearerToken' +-- +-- * 'cadKey' +-- +-- * 'cadOauthToken' +-- +-- * 'cadFields' +-- +-- * 'cadCallback' +-- +-- * 'cadAlt' +coursesAliasesDelete + :: Text -- ^ 'courseId' + -> Text -- ^ 'alias' + -> CoursesAliasesDelete +coursesAliasesDelete pCadCourseId_ pCadAlias_ = + CoursesAliasesDelete + { _cadXgafv = Nothing + , _cadQuotaUser = Nothing + , _cadPrettyPrint = True + , _cadUploadProtocol = Nothing + , _cadPp = True + , _cadCourseId = pCadCourseId_ + , _cadAccessToken = Nothing + , _cadUploadType = Nothing + , _cadAlias = pCadAlias_ + , _cadBearerToken = Nothing + , _cadKey = Nothing + , _cadOauthToken = Nothing + , _cadFields = Nothing + , _cadCallback = Nothing + , _cadAlt = "json" + } + +-- | V1 error format. +cadXgafv :: Lens' CoursesAliasesDelete' (Maybe Text) +cadXgafv = lens _cadXgafv (\ s a -> s{_cadXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cadQuotaUser :: Lens' CoursesAliasesDelete' (Maybe Text) +cadQuotaUser + = lens _cadQuotaUser (\ s a -> s{_cadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cadPrettyPrint :: Lens' CoursesAliasesDelete' Bool +cadPrettyPrint + = lens _cadPrettyPrint + (\ s a -> s{_cadPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cadUploadProtocol :: Lens' CoursesAliasesDelete' (Maybe Text) +cadUploadProtocol + = lens _cadUploadProtocol + (\ s a -> s{_cadUploadProtocol = a}) + +-- | Pretty-print response. +cadPp :: Lens' CoursesAliasesDelete' Bool +cadPp = lens _cadPp (\ s a -> s{_cadPp = a}) + +-- | Identifier of the course whose alias should be deleted. This identifier +-- can be either the Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cadCourseId :: Lens' CoursesAliasesDelete' Text +cadCourseId + = lens _cadCourseId (\ s a -> s{_cadCourseId = a}) + +-- | OAuth access token. +cadAccessToken :: Lens' CoursesAliasesDelete' (Maybe Text) +cadAccessToken + = lens _cadAccessToken + (\ s a -> s{_cadAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cadUploadType :: Lens' CoursesAliasesDelete' (Maybe Text) +cadUploadType + = lens _cadUploadType + (\ s a -> s{_cadUploadType = a}) + +-- | Alias to delete. This may not be the Classroom-assigned identifier. +cadAlias :: Lens' CoursesAliasesDelete' Text +cadAlias = lens _cadAlias (\ s a -> s{_cadAlias = a}) + +-- | OAuth bearer token. +cadBearerToken :: Lens' CoursesAliasesDelete' (Maybe Text) +cadBearerToken + = lens _cadBearerToken + (\ s a -> s{_cadBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cadKey :: Lens' CoursesAliasesDelete' (Maybe Text) +cadKey = lens _cadKey (\ s a -> s{_cadKey = a}) + +-- | OAuth 2.0 token for the current user. +cadOauthToken :: Lens' CoursesAliasesDelete' (Maybe Text) +cadOauthToken + = lens _cadOauthToken + (\ s a -> s{_cadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cadFields :: Lens' CoursesAliasesDelete' (Maybe Text) +cadFields + = lens _cadFields (\ s a -> s{_cadFields = a}) + +-- | JSONP +cadCallback :: Lens' CoursesAliasesDelete' (Maybe Text) +cadCallback + = lens _cadCallback (\ s a -> s{_cadCallback = a}) + +-- | Data format for response. +cadAlt :: Lens' CoursesAliasesDelete' Text +cadAlt = lens _cadAlt (\ s a -> s{_cadAlt = a}) + +instance GoogleRequest CoursesAliasesDelete' where + type Rs CoursesAliasesDelete' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesAliasesDelete{..} + = go _cadXgafv _cadQuotaUser _cadPrettyPrint + _cadUploadProtocol + _cadPp + _cadCourseId + _cadAccessToken + _cadUploadType + _cadAlias + _cadBearerToken + _cadKey + _cadOauthToken + _cadFields + _cadCallback + _cadAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesAliasesDeleteAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/List.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/List.hs new file mode 100644 index 000000000..22d7332e1 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/List.hs @@ -0,0 +1,270 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Aliases.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of aliases for a course. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` if the requesting user is +-- not permitted to access the course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if the course does not +-- exist. +-- +-- /See:/ for @ClassroomCoursesAliasesList@. +module Classroom.Courses.Aliases.List + ( + -- * REST Resource + CoursesAliasesListAPI + + -- * Creating a Request + , coursesAliasesList + , CoursesAliasesList + + -- * Request Lenses + , calXgafv + , calQuotaUser + , calPrettyPrint + , calUploadProtocol + , calPp + , calCourseId + , calAccessToken + , calUploadType + , calBearerToken + , calKey + , calPageToken + , calOauthToken + , calPageSize + , calFields + , calCallback + , calAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesAliasesList@ which the +-- 'CoursesAliasesList' request conforms to. +type CoursesAliasesListAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "aliases" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListCourseAliasesResponse + +-- | Returns a list of aliases for a course. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` if the requesting user is +-- not permitted to access the course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if the course does not +-- exist. +-- +-- /See:/ 'coursesAliasesList' smart constructor. +data CoursesAliasesList = CoursesAliasesList + { _calXgafv :: !(Maybe Text) + , _calQuotaUser :: !(Maybe Text) + , _calPrettyPrint :: !Bool + , _calUploadProtocol :: !(Maybe Text) + , _calPp :: !Bool + , _calCourseId :: !Text + , _calAccessToken :: !(Maybe Text) + , _calUploadType :: !(Maybe Text) + , _calBearerToken :: !(Maybe Text) + , _calKey :: !(Maybe Text) + , _calPageToken :: !(Maybe Text) + , _calOauthToken :: !(Maybe Text) + , _calPageSize :: !(Maybe Int32) + , _calFields :: !(Maybe Text) + , _calCallback :: !(Maybe Text) + , _calAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesAliasesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'calXgafv' +-- +-- * 'calQuotaUser' +-- +-- * 'calPrettyPrint' +-- +-- * 'calUploadProtocol' +-- +-- * 'calPp' +-- +-- * 'calCourseId' +-- +-- * 'calAccessToken' +-- +-- * 'calUploadType' +-- +-- * 'calBearerToken' +-- +-- * 'calKey' +-- +-- * 'calPageToken' +-- +-- * 'calOauthToken' +-- +-- * 'calPageSize' +-- +-- * 'calFields' +-- +-- * 'calCallback' +-- +-- * 'calAlt' +coursesAliasesList + :: Text -- ^ 'courseId' + -> CoursesAliasesList +coursesAliasesList pCalCourseId_ = + CoursesAliasesList + { _calXgafv = Nothing + , _calQuotaUser = Nothing + , _calPrettyPrint = True + , _calUploadProtocol = Nothing + , _calPp = True + , _calCourseId = pCalCourseId_ + , _calAccessToken = Nothing + , _calUploadType = Nothing + , _calBearerToken = Nothing + , _calKey = Nothing + , _calPageToken = Nothing + , _calOauthToken = Nothing + , _calPageSize = Nothing + , _calFields = Nothing + , _calCallback = Nothing + , _calAlt = "json" + } + +-- | V1 error format. +calXgafv :: Lens' CoursesAliasesList' (Maybe Text) +calXgafv = lens _calXgafv (\ s a -> s{_calXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +calQuotaUser :: Lens' CoursesAliasesList' (Maybe Text) +calQuotaUser + = lens _calQuotaUser (\ s a -> s{_calQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +calPrettyPrint :: Lens' CoursesAliasesList' Bool +calPrettyPrint + = lens _calPrettyPrint + (\ s a -> s{_calPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +calUploadProtocol :: Lens' CoursesAliasesList' (Maybe Text) +calUploadProtocol + = lens _calUploadProtocol + (\ s a -> s{_calUploadProtocol = a}) + +-- | Pretty-print response. +calPp :: Lens' CoursesAliasesList' Bool +calPp = lens _calPp (\ s a -> s{_calPp = a}) + +-- | The identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +calCourseId :: Lens' CoursesAliasesList' Text +calCourseId + = lens _calCourseId (\ s a -> s{_calCourseId = a}) + +-- | OAuth access token. +calAccessToken :: Lens' CoursesAliasesList' (Maybe Text) +calAccessToken + = lens _calAccessToken + (\ s a -> s{_calAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +calUploadType :: Lens' CoursesAliasesList' (Maybe Text) +calUploadType + = lens _calUploadType + (\ s a -> s{_calUploadType = a}) + +-- | OAuth bearer token. +calBearerToken :: Lens' CoursesAliasesList' (Maybe Text) +calBearerToken + = lens _calBearerToken + (\ s a -> s{_calBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +calKey :: Lens' CoursesAliasesList' (Maybe Text) +calKey = lens _calKey (\ s a -> s{_calKey = a}) + +-- | [nextPageToken][google.classroom.v1.ListCourseAliasesResponse.next_page_token] +-- value returned from a previous +-- [list][google.classroom.v1.Courses.ListCourseAliases] call, indicating +-- that the subsequent page of results should be returned. The +-- [list][google.classroom.v1.Courses.ListCourseAliases] request must be +-- otherwise identical to the one that resulted in this token. +calPageToken :: Lens' CoursesAliasesList' (Maybe Text) +calPageToken + = lens _calPageToken (\ s a -> s{_calPageToken = a}) + +-- | OAuth 2.0 token for the current user. +calOauthToken :: Lens' CoursesAliasesList' (Maybe Text) +calOauthToken + = lens _calOauthToken + (\ s a -> s{_calOauthToken = a}) + +-- | Maximum number of items to return. Zero or unspecified indicates that +-- the server may assign a maximum. The server may return fewer than the +-- specified number of results. +calPageSize :: Lens' CoursesAliasesList' (Maybe Int32) +calPageSize + = lens _calPageSize (\ s a -> s{_calPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +calFields :: Lens' CoursesAliasesList' (Maybe Text) +calFields + = lens _calFields (\ s a -> s{_calFields = a}) + +-- | JSONP +calCallback :: Lens' CoursesAliasesList' (Maybe Text) +calCallback + = lens _calCallback (\ s a -> s{_calCallback = a}) + +-- | Data format for response. +calAlt :: Lens' CoursesAliasesList' Text +calAlt = lens _calAlt (\ s a -> s{_calAlt = a}) + +instance GoogleRequest CoursesAliasesList' where + type Rs CoursesAliasesList' = + ListCourseAliasesResponse + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesAliasesList{..} + = go _calXgafv _calQuotaUser _calPrettyPrint + _calUploadProtocol + _calPp + _calCourseId + _calAccessToken + _calUploadType + _calBearerToken + _calKey + _calPageToken + _calOauthToken + _calPageSize + _calFields + _calCallback + _calAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesAliasesListAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Create.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Create.hs new file mode 100644 index 000000000..5a8663fbc --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Create.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a course. The user specified in \`ownerId\` is the owner of the +-- created course and added as a teacher. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to create courses or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the primary teacher is not a +-- valid user. * \`FAILED_PRECONDITION\` if the course owner\'s account is +-- disabled. * \`ALREADY_EXISTS\` if an alias was specified in the \`id\` +-- and already exists. +-- +-- /See:/ for @ClassroomCoursesCreate@. +module Classroom.Courses.Create + ( + -- * REST Resource + CoursesCreateAPI + + -- * Creating a Request + , coursesCreate + , CoursesCreate + + -- * Request Lenses + , ccXgafv + , ccQuotaUser + , ccPrettyPrint + , ccUploadProtocol + , ccPp + , ccAccessToken + , ccUploadType + , ccBearerToken + , ccKey + , ccOauthToken + , ccFields + , ccCallback + , ccAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesCreate@ which the +-- 'CoursesCreate' request conforms to. +type CoursesCreateAPI = + "v1" :> "courses" :> Post '[JSON] Course + +-- | Creates a course. The user specified in \`ownerId\` is the owner of the +-- created course and added as a teacher. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to create courses or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if the primary teacher is not a +-- valid user. * \`FAILED_PRECONDITION\` if the course owner\'s account is +-- disabled. * \`ALREADY_EXISTS\` if an alias was specified in the \`id\` +-- and already exists. +-- +-- /See:/ 'coursesCreate' smart constructor. +data CoursesCreate = CoursesCreate + { _ccXgafv :: !(Maybe Text) + , _ccQuotaUser :: !(Maybe Text) + , _ccPrettyPrint :: !Bool + , _ccUploadProtocol :: !(Maybe Text) + , _ccPp :: !Bool + , _ccAccessToken :: !(Maybe Text) + , _ccUploadType :: !(Maybe Text) + , _ccBearerToken :: !(Maybe Text) + , _ccKey :: !(Maybe Text) + , _ccOauthToken :: !(Maybe Text) + , _ccFields :: !(Maybe Text) + , _ccCallback :: !(Maybe Text) + , _ccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccXgafv' +-- +-- * 'ccQuotaUser' +-- +-- * 'ccPrettyPrint' +-- +-- * 'ccUploadProtocol' +-- +-- * 'ccPp' +-- +-- * 'ccAccessToken' +-- +-- * 'ccUploadType' +-- +-- * 'ccBearerToken' +-- +-- * 'ccKey' +-- +-- * 'ccOauthToken' +-- +-- * 'ccFields' +-- +-- * 'ccCallback' +-- +-- * 'ccAlt' +coursesCreate + :: CoursesCreate +coursesCreate = + CoursesCreate + { _ccXgafv = Nothing + , _ccQuotaUser = Nothing + , _ccPrettyPrint = True + , _ccUploadProtocol = Nothing + , _ccPp = True + , _ccAccessToken = Nothing + , _ccUploadType = Nothing + , _ccBearerToken = Nothing + , _ccKey = Nothing + , _ccOauthToken = Nothing + , _ccFields = Nothing + , _ccCallback = Nothing + , _ccAlt = "json" + } + +-- | V1 error format. +ccXgafv :: Lens' CoursesCreate' (Maybe Text) +ccXgafv = lens _ccXgafv (\ s a -> s{_ccXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ccQuotaUser :: Lens' CoursesCreate' (Maybe Text) +ccQuotaUser + = lens _ccQuotaUser (\ s a -> s{_ccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccPrettyPrint :: Lens' CoursesCreate' Bool +ccPrettyPrint + = lens _ccPrettyPrint + (\ s a -> s{_ccPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ccUploadProtocol :: Lens' CoursesCreate' (Maybe Text) +ccUploadProtocol + = lens _ccUploadProtocol + (\ s a -> s{_ccUploadProtocol = a}) + +-- | Pretty-print response. +ccPp :: Lens' CoursesCreate' Bool +ccPp = lens _ccPp (\ s a -> s{_ccPp = a}) + +-- | OAuth access token. +ccAccessToken :: Lens' CoursesCreate' (Maybe Text) +ccAccessToken + = lens _ccAccessToken + (\ s a -> s{_ccAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ccUploadType :: Lens' CoursesCreate' (Maybe Text) +ccUploadType + = lens _ccUploadType (\ s a -> s{_ccUploadType = a}) + +-- | OAuth bearer token. +ccBearerToken :: Lens' CoursesCreate' (Maybe Text) +ccBearerToken + = lens _ccBearerToken + (\ s a -> s{_ccBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccKey :: Lens' CoursesCreate' (Maybe Text) +ccKey = lens _ccKey (\ s a -> s{_ccKey = a}) + +-- | OAuth 2.0 token for the current user. +ccOauthToken :: Lens' CoursesCreate' (Maybe Text) +ccOauthToken + = lens _ccOauthToken (\ s a -> s{_ccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccFields :: Lens' CoursesCreate' (Maybe Text) +ccFields = lens _ccFields (\ s a -> s{_ccFields = a}) + +-- | JSONP +ccCallback :: Lens' CoursesCreate' (Maybe Text) +ccCallback + = lens _ccCallback (\ s a -> s{_ccCallback = a}) + +-- | Data format for response. +ccAlt :: Lens' CoursesCreate' Text +ccAlt = lens _ccAlt (\ s a -> s{_ccAlt = a}) + +instance GoogleRequest CoursesCreate' where + type Rs CoursesCreate' = Course + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesCreate{..} + = go _ccXgafv _ccQuotaUser _ccPrettyPrint + _ccUploadProtocol + _ccPp + _ccAccessToken + _ccUploadType + _ccBearerToken + _ccKey + _ccOauthToken + _ccFields + _ccCallback + _ccAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesCreateAPI) r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Delete.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Delete.hs new file mode 100644 index 000000000..48264b5ef --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Delete.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to delete +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ for @ClassroomCoursesDelete@. +module Classroom.Courses.Delete + ( + -- * REST Resource + CoursesDeleteAPI + + -- * Creating a Request + , coursesDelete + , CoursesDelete + + -- * Request Lenses + , cdXgafv + , cdQuotaUser + , cdPrettyPrint + , cdUploadProtocol + , cdPp + , cdAccessToken + , cdUploadType + , cdBearerToken + , cdKey + , cdId + , cdOauthToken + , cdFields + , cdCallback + , cdAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesDelete@ which the +-- 'CoursesDelete' request conforms to. +type CoursesDeleteAPI = + "v1" :> + "courses" :> + Capture "id" Text :> Delete '[JSON] Empty + +-- | Deletes a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to delete +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ 'coursesDelete' smart constructor. +data CoursesDelete = CoursesDelete + { _cdXgafv :: !(Maybe Text) + , _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUploadProtocol :: !(Maybe Text) + , _cdPp :: !Bool + , _cdAccessToken :: !(Maybe Text) + , _cdUploadType :: !(Maybe Text) + , _cdBearerToken :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdId :: !Text + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdCallback :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdXgafv' +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUploadProtocol' +-- +-- * 'cdPp' +-- +-- * 'cdAccessToken' +-- +-- * 'cdUploadType' +-- +-- * 'cdBearerToken' +-- +-- * 'cdKey' +-- +-- * 'cdId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdCallback' +-- +-- * 'cdAlt' +coursesDelete + :: Text -- ^ 'id' + -> CoursesDelete +coursesDelete pCdId_ = + CoursesDelete + { _cdXgafv = Nothing + , _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUploadProtocol = Nothing + , _cdPp = True + , _cdAccessToken = Nothing + , _cdUploadType = Nothing + , _cdBearerToken = Nothing + , _cdKey = Nothing + , _cdId = pCdId_ + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdCallback = Nothing + , _cdAlt = "json" + } + +-- | V1 error format. +cdXgafv :: Lens' CoursesDelete' (Maybe Text) +cdXgafv = lens _cdXgafv (\ s a -> s{_cdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cdQuotaUser :: Lens' CoursesDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CoursesDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cdUploadProtocol :: Lens' CoursesDelete' (Maybe Text) +cdUploadProtocol + = lens _cdUploadProtocol + (\ s a -> s{_cdUploadProtocol = a}) + +-- | Pretty-print response. +cdPp :: Lens' CoursesDelete' Bool +cdPp = lens _cdPp (\ s a -> s{_cdPp = a}) + +-- | OAuth access token. +cdAccessToken :: Lens' CoursesDelete' (Maybe Text) +cdAccessToken + = lens _cdAccessToken + (\ s a -> s{_cdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cdUploadType :: Lens' CoursesDelete' (Maybe Text) +cdUploadType + = lens _cdUploadType (\ s a -> s{_cdUploadType = a}) + +-- | OAuth bearer token. +cdBearerToken :: Lens' CoursesDelete' (Maybe Text) +cdBearerToken + = lens _cdBearerToken + (\ s a -> s{_cdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CoursesDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | Identifier of the course to delete. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cdId :: Lens' CoursesDelete' Text +cdId = lens _cdId (\ s a -> s{_cdId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CoursesDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CoursesDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | JSONP +cdCallback :: Lens' CoursesDelete' (Maybe Text) +cdCallback + = lens _cdCallback (\ s a -> s{_cdCallback = a}) + +-- | Data format for response. +cdAlt :: Lens' CoursesDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CoursesDelete' where + type Rs CoursesDelete' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesDelete{..} + = go _cdXgafv _cdQuotaUser _cdPrettyPrint + _cdUploadProtocol + _cdPp + _cdAccessToken + _cdUploadType + _cdBearerToken + _cdKey + _cdId + _cdOauthToken + _cdFields + _cdCallback + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesDeleteAPI) r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Get.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Get.hs new file mode 100644 index 000000000..0a9bcec59 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Get.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ for @ClassroomCoursesGet@. +module Classroom.Courses.Get + ( + -- * REST Resource + CoursesGetAPI + + -- * Creating a Request + , coursesGet + , CoursesGet + + -- * Request Lenses + , cgXgafv + , cgQuotaUser + , cgPrettyPrint + , cgUploadProtocol + , cgPp + , cgAccessToken + , cgUploadType + , cgBearerToken + , cgKey + , cgId + , cgOauthToken + , cgFields + , cgCallback + , cgAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesGet@ which the +-- 'CoursesGet' request conforms to. +type CoursesGetAPI = + "v1" :> + "courses" :> Capture "id" Text :> Get '[JSON] Course + +-- | Returns a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ 'coursesGet' smart constructor. +data CoursesGet = CoursesGet + { _cgXgafv :: !(Maybe Text) + , _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUploadProtocol :: !(Maybe Text) + , _cgPp :: !Bool + , _cgAccessToken :: !(Maybe Text) + , _cgUploadType :: !(Maybe Text) + , _cgBearerToken :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgId :: !Text + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgCallback :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgXgafv' +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUploadProtocol' +-- +-- * 'cgPp' +-- +-- * 'cgAccessToken' +-- +-- * 'cgUploadType' +-- +-- * 'cgBearerToken' +-- +-- * 'cgKey' +-- +-- * 'cgId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgCallback' +-- +-- * 'cgAlt' +coursesGet + :: Text -- ^ 'id' + -> CoursesGet +coursesGet pCgId_ = + CoursesGet + { _cgXgafv = Nothing + , _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUploadProtocol = Nothing + , _cgPp = True + , _cgAccessToken = Nothing + , _cgUploadType = Nothing + , _cgBearerToken = Nothing + , _cgKey = Nothing + , _cgId = pCgId_ + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgCallback = Nothing + , _cgAlt = "json" + } + +-- | V1 error format. +cgXgafv :: Lens' CoursesGet' (Maybe Text) +cgXgafv = lens _cgXgafv (\ s a -> s{_cgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cgQuotaUser :: Lens' CoursesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CoursesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cgUploadProtocol :: Lens' CoursesGet' (Maybe Text) +cgUploadProtocol + = lens _cgUploadProtocol + (\ s a -> s{_cgUploadProtocol = a}) + +-- | Pretty-print response. +cgPp :: Lens' CoursesGet' Bool +cgPp = lens _cgPp (\ s a -> s{_cgPp = a}) + +-- | OAuth access token. +cgAccessToken :: Lens' CoursesGet' (Maybe Text) +cgAccessToken + = lens _cgAccessToken + (\ s a -> s{_cgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cgUploadType :: Lens' CoursesGet' (Maybe Text) +cgUploadType + = lens _cgUploadType (\ s a -> s{_cgUploadType = a}) + +-- | OAuth bearer token. +cgBearerToken :: Lens' CoursesGet' (Maybe Text) +cgBearerToken + = lens _cgBearerToken + (\ s a -> s{_cgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CoursesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | Identifier of the course to return. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cgId :: Lens' CoursesGet' Text +cgId = lens _cgId (\ s a -> s{_cgId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CoursesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CoursesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | JSONP +cgCallback :: Lens' CoursesGet' (Maybe Text) +cgCallback + = lens _cgCallback (\ s a -> s{_cgCallback = a}) + +-- | Data format for response. +cgAlt :: Lens' CoursesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CoursesGet' where + type Rs CoursesGet' = Course + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesGet{..} + = go _cgXgafv _cgQuotaUser _cgPrettyPrint + _cgUploadProtocol + _cgPp + _cgAccessToken + _cgUploadType + _cgBearerToken + _cgKey + _cgId + _cgOauthToken + _cgFields + _cgCallback + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesGetAPI) r u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/List.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/List.hs new file mode 100644 index 000000000..325500314 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/List.hs @@ -0,0 +1,279 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of courses that the requesting user is permitted to view, +-- restricted to those that match the request. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` for [general user +-- permission errors][User Permission Errors]. * \`INVALID_ARGUMENT\` if +-- the query argument is malformed. * \`NOT_FOUND\` if any users specified +-- in the query arguments do not exist. +-- +-- /See:/ for @ClassroomCoursesList@. +module Classroom.Courses.List + ( + -- * REST Resource + CoursesListAPI + + -- * Creating a Request + , coursesList + , CoursesList + + -- * Request Lenses + , clStudentId + , clXgafv + , clQuotaUser + , clPrettyPrint + , clUploadProtocol + , clPp + , clAccessToken + , clUploadType + , clTeacherId + , clBearerToken + , clKey + , clPageToken + , clOauthToken + , clPageSize + , clFields + , clCallback + , clAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesList@ which the +-- 'CoursesList' request conforms to. +type CoursesListAPI = + "v1" :> + "courses" :> + QueryParam "studentId" Text :> + QueryParam "teacherId" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListCoursesResponse + +-- | Returns a list of courses that the requesting user is permitted to view, +-- restricted to those that match the request. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` for [general user +-- permission errors][User Permission Errors]. * \`INVALID_ARGUMENT\` if +-- the query argument is malformed. * \`NOT_FOUND\` if any users specified +-- in the query arguments do not exist. +-- +-- /See:/ 'coursesList' smart constructor. +data CoursesList = CoursesList + { _clStudentId :: !(Maybe Text) + , _clXgafv :: !(Maybe Text) + , _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUploadProtocol :: !(Maybe Text) + , _clPp :: !Bool + , _clAccessToken :: !(Maybe Text) + , _clUploadType :: !(Maybe Text) + , _clTeacherId :: !(Maybe Text) + , _clBearerToken :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clPageSize :: !(Maybe Int32) + , _clFields :: !(Maybe Text) + , _clCallback :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clStudentId' +-- +-- * 'clXgafv' +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUploadProtocol' +-- +-- * 'clPp' +-- +-- * 'clAccessToken' +-- +-- * 'clUploadType' +-- +-- * 'clTeacherId' +-- +-- * 'clBearerToken' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clPageSize' +-- +-- * 'clFields' +-- +-- * 'clCallback' +-- +-- * 'clAlt' +coursesList + :: CoursesList +coursesList = + CoursesList + { _clStudentId = Nothing + , _clXgafv = Nothing + , _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUploadProtocol = Nothing + , _clPp = True + , _clAccessToken = Nothing + , _clUploadType = Nothing + , _clTeacherId = Nothing + , _clBearerToken = Nothing + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clPageSize = Nothing + , _clFields = Nothing + , _clCallback = Nothing + , _clAlt = "json" + } + +-- | Restricts returned courses to those having a student with the specified +-- identifier. The identifier can be one of the following: * the numeric +-- identifier for the user * the email address of the user * the string +-- literal \`\"me\"\`, indicating the requesting user +clStudentId :: Lens' CoursesList' (Maybe Text) +clStudentId + = lens _clStudentId (\ s a -> s{_clStudentId = a}) + +-- | V1 error format. +clXgafv :: Lens' CoursesList' (Maybe Text) +clXgafv = lens _clXgafv (\ s a -> s{_clXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +clQuotaUser :: Lens' CoursesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CoursesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +clUploadProtocol :: Lens' CoursesList' (Maybe Text) +clUploadProtocol + = lens _clUploadProtocol + (\ s a -> s{_clUploadProtocol = a}) + +-- | Pretty-print response. +clPp :: Lens' CoursesList' Bool +clPp = lens _clPp (\ s a -> s{_clPp = a}) + +-- | OAuth access token. +clAccessToken :: Lens' CoursesList' (Maybe Text) +clAccessToken + = lens _clAccessToken + (\ s a -> s{_clAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +clUploadType :: Lens' CoursesList' (Maybe Text) +clUploadType + = lens _clUploadType (\ s a -> s{_clUploadType = a}) + +-- | Restricts returned courses to those having a teacher with the specified +-- identifier. The identifier can be one of the following: * the numeric +-- identifier for the user * the email address of the user * the string +-- literal \`\"me\"\`, indicating the requesting user +clTeacherId :: Lens' CoursesList' (Maybe Text) +clTeacherId + = lens _clTeacherId (\ s a -> s{_clTeacherId = a}) + +-- | OAuth bearer token. +clBearerToken :: Lens' CoursesList' (Maybe Text) +clBearerToken + = lens _clBearerToken + (\ s a -> s{_clBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CoursesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | [nextPageToken][google.classroom.v1.ListCoursesResponse.next_page_token] +-- value returned from a previous +-- [list][google.classroom.v1.Courses.ListCourses] call, indicating that +-- the subsequent page of results should be returned. The +-- [list][google.classroom.v1.Courses.ListCourses] request must be +-- otherwise identical to the one that resulted in this token. +clPageToken :: Lens' CoursesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CoursesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Maximum number of items to return. Zero or unspecified indicates that +-- the server may assign a maximum. The server may return fewer than the +-- specified number of results. +clPageSize :: Lens' CoursesList' (Maybe Int32) +clPageSize + = lens _clPageSize (\ s a -> s{_clPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CoursesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | JSONP +clCallback :: Lens' CoursesList' (Maybe Text) +clCallback + = lens _clCallback (\ s a -> s{_clCallback = a}) + +-- | Data format for response. +clAlt :: Lens' CoursesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CoursesList' where + type Rs CoursesList' = ListCoursesResponse + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesList{..} + = go _clStudentId _clXgafv _clQuotaUser + _clPrettyPrint + _clUploadProtocol + _clPp + _clAccessToken + _clUploadType + _clTeacherId + _clBearerToken + _clKey + _clPageToken + _clOauthToken + _clPageSize + _clFields + _clCallback + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesListAPI) r u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Patch.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Patch.hs new file mode 100644 index 000000000..706cb03c6 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Patch.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates one or more fields in a course. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` if the requesting user is +-- not permitted to modify the requested course or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if no course +-- exists with the requested ID. * \`INVALID_ARGUMENT\` if invalid fields +-- are specified in the update mask or if no update mask is supplied. +-- +-- /See:/ for @ClassroomCoursesPatch@. +module Classroom.Courses.Patch + ( + -- * REST Resource + CoursesPatchAPI + + -- * Creating a Request + , coursesPatch + , CoursesPatch + + -- * Request Lenses + , cpXgafv + , cpQuotaUser + , cpPrettyPrint + , cpUploadProtocol + , cpUpdateMask + , cpPp + , cpAccessToken + , cpUploadType + , cpBearerToken + , cpKey + , cpId + , cpOauthToken + , cpFields + , cpCallback + , cpAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesPatch@ which the +-- 'CoursesPatch' request conforms to. +type CoursesPatchAPI = + "v1" :> + "courses" :> + Capture "id" Text :> + QueryParam "updateMask" Text :> Patch '[JSON] Course + +-- | Updates one or more fields in a course. This method returns the +-- following error codes: * \`PERMISSION_DENIED\` if the requesting user is +-- not permitted to modify the requested course or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if no course +-- exists with the requested ID. * \`INVALID_ARGUMENT\` if invalid fields +-- are specified in the update mask or if no update mask is supplied. +-- +-- /See:/ 'coursesPatch' smart constructor. +data CoursesPatch = CoursesPatch + { _cpXgafv :: !(Maybe Text) + , _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUploadProtocol :: !(Maybe Text) + , _cpUpdateMask :: !(Maybe Text) + , _cpPp :: !Bool + , _cpAccessToken :: !(Maybe Text) + , _cpUploadType :: !(Maybe Text) + , _cpBearerToken :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpId :: !Text + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpCallback :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpXgafv' +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUploadProtocol' +-- +-- * 'cpUpdateMask' +-- +-- * 'cpPp' +-- +-- * 'cpAccessToken' +-- +-- * 'cpUploadType' +-- +-- * 'cpBearerToken' +-- +-- * 'cpKey' +-- +-- * 'cpId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpCallback' +-- +-- * 'cpAlt' +coursesPatch + :: Text -- ^ 'id' + -> CoursesPatch +coursesPatch pCpId_ = + CoursesPatch + { _cpXgafv = Nothing + , _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUploadProtocol = Nothing + , _cpUpdateMask = Nothing + , _cpPp = True + , _cpAccessToken = Nothing + , _cpUploadType = Nothing + , _cpBearerToken = Nothing + , _cpKey = Nothing + , _cpId = pCpId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpCallback = Nothing + , _cpAlt = "json" + } + +-- | V1 error format. +cpXgafv :: Lens' CoursesPatch' (Maybe Text) +cpXgafv = lens _cpXgafv (\ s a -> s{_cpXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cpQuotaUser :: Lens' CoursesPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CoursesPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cpUploadProtocol :: Lens' CoursesPatch' (Maybe Text) +cpUploadProtocol + = lens _cpUploadProtocol + (\ s a -> s{_cpUploadProtocol = a}) + +-- | Mask that identifies which fields on the course to update. This field is +-- required to do an update. The update will fail if invalid fields are +-- specified. The following fields are valid: * \`name\` * \`section\` * +-- \`descriptionHeading\` * \`description\` * \`room\` * \`courseState\` +-- When set in a query parameter, this field should be specified as +-- \`updateMask=,,...\` +cpUpdateMask :: Lens' CoursesPatch' (Maybe Text) +cpUpdateMask + = lens _cpUpdateMask (\ s a -> s{_cpUpdateMask = a}) + +-- | Pretty-print response. +cpPp :: Lens' CoursesPatch' Bool +cpPp = lens _cpPp (\ s a -> s{_cpPp = a}) + +-- | OAuth access token. +cpAccessToken :: Lens' CoursesPatch' (Maybe Text) +cpAccessToken + = lens _cpAccessToken + (\ s a -> s{_cpAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cpUploadType :: Lens' CoursesPatch' (Maybe Text) +cpUploadType + = lens _cpUploadType (\ s a -> s{_cpUploadType = a}) + +-- | OAuth bearer token. +cpBearerToken :: Lens' CoursesPatch' (Maybe Text) +cpBearerToken + = lens _cpBearerToken + (\ s a -> s{_cpBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CoursesPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | Identifier of the course to update. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cpId :: Lens' CoursesPatch' Text +cpId = lens _cpId (\ s a -> s{_cpId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CoursesPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CoursesPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | JSONP +cpCallback :: Lens' CoursesPatch' (Maybe Text) +cpCallback + = lens _cpCallback (\ s a -> s{_cpCallback = a}) + +-- | Data format for response. +cpAlt :: Lens' CoursesPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CoursesPatch' where + type Rs CoursesPatch' = Course + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesPatch{..} + = go _cpXgafv _cpQuotaUser _cpPrettyPrint + _cpUploadProtocol + _cpUpdateMask + _cpPp + _cpAccessToken + _cpUploadType + _cpBearerToken + _cpKey + _cpId + _cpOauthToken + _cpFields + _cpCallback + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesPatchAPI) r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Create.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Create.hs new file mode 100644 index 000000000..9ff9a372e --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Create.hs @@ -0,0 +1,258 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Students.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a user as a student of a course. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to create students in this course or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if the +-- requested course ID does not exist. * \`FAILED_PRECONDITION\` if the +-- requested user\'s account is disabled. * \`ALREADY_EXISTS\` if the user +-- is already a student or teacher in the course. +-- +-- /See:/ for @ClassroomCoursesStudentsCreate@. +module Classroom.Courses.Students.Create + ( + -- * REST Resource + CoursesStudentsCreateAPI + + -- * Creating a Request + , coursesStudentsCreate + , CoursesStudentsCreate + + -- * Request Lenses + , cscXgafv + , cscQuotaUser + , cscPrettyPrint + , cscUploadProtocol + , cscPp + , cscCourseId + , cscAccessToken + , cscUploadType + , cscEnrollmentCode + , cscBearerToken + , cscKey + , cscOauthToken + , cscFields + , cscCallback + , cscAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesStudentsCreate@ which the +-- 'CoursesStudentsCreate' request conforms to. +type CoursesStudentsCreateAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "students" :> + QueryParam "enrollmentCode" Text :> + Post '[JSON] Student + +-- | Adds a user as a student of a course. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to create students in this course or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if the +-- requested course ID does not exist. * \`FAILED_PRECONDITION\` if the +-- requested user\'s account is disabled. * \`ALREADY_EXISTS\` if the user +-- is already a student or teacher in the course. +-- +-- /See:/ 'coursesStudentsCreate' smart constructor. +data CoursesStudentsCreate = CoursesStudentsCreate + { _cscXgafv :: !(Maybe Text) + , _cscQuotaUser :: !(Maybe Text) + , _cscPrettyPrint :: !Bool + , _cscUploadProtocol :: !(Maybe Text) + , _cscPp :: !Bool + , _cscCourseId :: !Text + , _cscAccessToken :: !(Maybe Text) + , _cscUploadType :: !(Maybe Text) + , _cscEnrollmentCode :: !(Maybe Text) + , _cscBearerToken :: !(Maybe Text) + , _cscKey :: !(Maybe Text) + , _cscOauthToken :: !(Maybe Text) + , _cscFields :: !(Maybe Text) + , _cscCallback :: !(Maybe Text) + , _cscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesStudentsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cscXgafv' +-- +-- * 'cscQuotaUser' +-- +-- * 'cscPrettyPrint' +-- +-- * 'cscUploadProtocol' +-- +-- * 'cscPp' +-- +-- * 'cscCourseId' +-- +-- * 'cscAccessToken' +-- +-- * 'cscUploadType' +-- +-- * 'cscEnrollmentCode' +-- +-- * 'cscBearerToken' +-- +-- * 'cscKey' +-- +-- * 'cscOauthToken' +-- +-- * 'cscFields' +-- +-- * 'cscCallback' +-- +-- * 'cscAlt' +coursesStudentsCreate + :: Text -- ^ 'courseId' + -> CoursesStudentsCreate +coursesStudentsCreate pCscCourseId_ = + CoursesStudentsCreate + { _cscXgafv = Nothing + , _cscQuotaUser = Nothing + , _cscPrettyPrint = True + , _cscUploadProtocol = Nothing + , _cscPp = True + , _cscCourseId = pCscCourseId_ + , _cscAccessToken = Nothing + , _cscUploadType = Nothing + , _cscEnrollmentCode = Nothing + , _cscBearerToken = Nothing + , _cscKey = Nothing + , _cscOauthToken = Nothing + , _cscFields = Nothing + , _cscCallback = Nothing + , _cscAlt = "json" + } + +-- | V1 error format. +cscXgafv :: Lens' CoursesStudentsCreate' (Maybe Text) +cscXgafv = lens _cscXgafv (\ s a -> s{_cscXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cscQuotaUser :: Lens' CoursesStudentsCreate' (Maybe Text) +cscQuotaUser + = lens _cscQuotaUser (\ s a -> s{_cscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cscPrettyPrint :: Lens' CoursesStudentsCreate' Bool +cscPrettyPrint + = lens _cscPrettyPrint + (\ s a -> s{_cscPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cscUploadProtocol :: Lens' CoursesStudentsCreate' (Maybe Text) +cscUploadProtocol + = lens _cscUploadProtocol + (\ s a -> s{_cscUploadProtocol = a}) + +-- | Pretty-print response. +cscPp :: Lens' CoursesStudentsCreate' Bool +cscPp = lens _cscPp (\ s a -> s{_cscPp = a}) + +-- | Identifier of the course to create the student in. This identifier can +-- be either the Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cscCourseId :: Lens' CoursesStudentsCreate' Text +cscCourseId + = lens _cscCourseId (\ s a -> s{_cscCourseId = a}) + +-- | OAuth access token. +cscAccessToken :: Lens' CoursesStudentsCreate' (Maybe Text) +cscAccessToken + = lens _cscAccessToken + (\ s a -> s{_cscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cscUploadType :: Lens' CoursesStudentsCreate' (Maybe Text) +cscUploadType + = lens _cscUploadType + (\ s a -> s{_cscUploadType = a}) + +-- | Enrollment code of the course to create the student in. This code is +-- required if [userId][google.classroom.v1.Student.user_id] corresponds to +-- the requesting user; it may be omitted if the requesting user has +-- administrative permissions to create students for any user. +cscEnrollmentCode :: Lens' CoursesStudentsCreate' (Maybe Text) +cscEnrollmentCode + = lens _cscEnrollmentCode + (\ s a -> s{_cscEnrollmentCode = a}) + +-- | OAuth bearer token. +cscBearerToken :: Lens' CoursesStudentsCreate' (Maybe Text) +cscBearerToken + = lens _cscBearerToken + (\ s a -> s{_cscBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cscKey :: Lens' CoursesStudentsCreate' (Maybe Text) +cscKey = lens _cscKey (\ s a -> s{_cscKey = a}) + +-- | OAuth 2.0 token for the current user. +cscOauthToken :: Lens' CoursesStudentsCreate' (Maybe Text) +cscOauthToken + = lens _cscOauthToken + (\ s a -> s{_cscOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cscFields :: Lens' CoursesStudentsCreate' (Maybe Text) +cscFields + = lens _cscFields (\ s a -> s{_cscFields = a}) + +-- | JSONP +cscCallback :: Lens' CoursesStudentsCreate' (Maybe Text) +cscCallback + = lens _cscCallback (\ s a -> s{_cscCallback = a}) + +-- | Data format for response. +cscAlt :: Lens' CoursesStudentsCreate' Text +cscAlt = lens _cscAlt (\ s a -> s{_cscAlt = a}) + +instance GoogleRequest CoursesStudentsCreate' where + type Rs CoursesStudentsCreate' = Student + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesStudentsCreate{..} + = go _cscXgafv _cscQuotaUser _cscPrettyPrint + _cscUploadProtocol + _cscPp + _cscCourseId + _cscAccessToken + _cscUploadType + _cscEnrollmentCode + _cscBearerToken + _cscKey + _cscOauthToken + _cscFields + _cscCallback + _cscAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesStudentsCreateAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Delete.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Delete.hs new file mode 100644 index 000000000..6ac304156 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Delete.hs @@ -0,0 +1,252 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Students.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a student of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to delete students of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no student of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ for @ClassroomCoursesStudentsDelete@. +module Classroom.Courses.Students.Delete + ( + -- * REST Resource + CoursesStudentsDeleteAPI + + -- * Creating a Request + , coursesStudentsDelete + , CoursesStudentsDelete + + -- * Request Lenses + , csdXgafv + , csdQuotaUser + , csdPrettyPrint + , csdUploadProtocol + , csdPp + , csdCourseId + , csdAccessToken + , csdUploadType + , csdUserId + , csdBearerToken + , csdKey + , csdOauthToken + , csdFields + , csdCallback + , csdAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesStudentsDelete@ which the +-- 'CoursesStudentsDelete' request conforms to. +type CoursesStudentsDeleteAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "students" :> + Capture "userId" Text :> Delete '[JSON] Empty + +-- | Deletes a student of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to delete students of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no student of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ 'coursesStudentsDelete' smart constructor. +data CoursesStudentsDelete = CoursesStudentsDelete + { _csdXgafv :: !(Maybe Text) + , _csdQuotaUser :: !(Maybe Text) + , _csdPrettyPrint :: !Bool + , _csdUploadProtocol :: !(Maybe Text) + , _csdPp :: !Bool + , _csdCourseId :: !Text + , _csdAccessToken :: !(Maybe Text) + , _csdUploadType :: !(Maybe Text) + , _csdUserId :: !Text + , _csdBearerToken :: !(Maybe Text) + , _csdKey :: !(Maybe Text) + , _csdOauthToken :: !(Maybe Text) + , _csdFields :: !(Maybe Text) + , _csdCallback :: !(Maybe Text) + , _csdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesStudentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csdXgafv' +-- +-- * 'csdQuotaUser' +-- +-- * 'csdPrettyPrint' +-- +-- * 'csdUploadProtocol' +-- +-- * 'csdPp' +-- +-- * 'csdCourseId' +-- +-- * 'csdAccessToken' +-- +-- * 'csdUploadType' +-- +-- * 'csdUserId' +-- +-- * 'csdBearerToken' +-- +-- * 'csdKey' +-- +-- * 'csdOauthToken' +-- +-- * 'csdFields' +-- +-- * 'csdCallback' +-- +-- * 'csdAlt' +coursesStudentsDelete + :: Text -- ^ 'courseId' + -> Text -- ^ 'userId' + -> CoursesStudentsDelete +coursesStudentsDelete pCsdCourseId_ pCsdUserId_ = + CoursesStudentsDelete + { _csdXgafv = Nothing + , _csdQuotaUser = Nothing + , _csdPrettyPrint = True + , _csdUploadProtocol = Nothing + , _csdPp = True + , _csdCourseId = pCsdCourseId_ + , _csdAccessToken = Nothing + , _csdUploadType = Nothing + , _csdUserId = pCsdUserId_ + , _csdBearerToken = Nothing + , _csdKey = Nothing + , _csdOauthToken = Nothing + , _csdFields = Nothing + , _csdCallback = Nothing + , _csdAlt = "json" + } + +-- | V1 error format. +csdXgafv :: Lens' CoursesStudentsDelete' (Maybe Text) +csdXgafv = lens _csdXgafv (\ s a -> s{_csdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +csdQuotaUser :: Lens' CoursesStudentsDelete' (Maybe Text) +csdQuotaUser + = lens _csdQuotaUser (\ s a -> s{_csdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csdPrettyPrint :: Lens' CoursesStudentsDelete' Bool +csdPrettyPrint + = lens _csdPrettyPrint + (\ s a -> s{_csdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +csdUploadProtocol :: Lens' CoursesStudentsDelete' (Maybe Text) +csdUploadProtocol + = lens _csdUploadProtocol + (\ s a -> s{_csdUploadProtocol = a}) + +-- | Pretty-print response. +csdPp :: Lens' CoursesStudentsDelete' Bool +csdPp = lens _csdPp (\ s a -> s{_csdPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +csdCourseId :: Lens' CoursesStudentsDelete' Text +csdCourseId + = lens _csdCourseId (\ s a -> s{_csdCourseId = a}) + +-- | OAuth access token. +csdAccessToken :: Lens' CoursesStudentsDelete' (Maybe Text) +csdAccessToken + = lens _csdAccessToken + (\ s a -> s{_csdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +csdUploadType :: Lens' CoursesStudentsDelete' (Maybe Text) +csdUploadType + = lens _csdUploadType + (\ s a -> s{_csdUploadType = a}) + +-- | Identifier of the student to delete. The identifier can be one of the +-- following: * the numeric identifier for the user * the email address of +-- the user * the string literal \`\"me\"\`, indicating the requesting user +csdUserId :: Lens' CoursesStudentsDelete' Text +csdUserId + = lens _csdUserId (\ s a -> s{_csdUserId = a}) + +-- | OAuth bearer token. +csdBearerToken :: Lens' CoursesStudentsDelete' (Maybe Text) +csdBearerToken + = lens _csdBearerToken + (\ s a -> s{_csdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csdKey :: Lens' CoursesStudentsDelete' (Maybe Text) +csdKey = lens _csdKey (\ s a -> s{_csdKey = a}) + +-- | OAuth 2.0 token for the current user. +csdOauthToken :: Lens' CoursesStudentsDelete' (Maybe Text) +csdOauthToken + = lens _csdOauthToken + (\ s a -> s{_csdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csdFields :: Lens' CoursesStudentsDelete' (Maybe Text) +csdFields + = lens _csdFields (\ s a -> s{_csdFields = a}) + +-- | JSONP +csdCallback :: Lens' CoursesStudentsDelete' (Maybe Text) +csdCallback + = lens _csdCallback (\ s a -> s{_csdCallback = a}) + +-- | Data format for response. +csdAlt :: Lens' CoursesStudentsDelete' Text +csdAlt = lens _csdAlt (\ s a -> s{_csdAlt = a}) + +instance GoogleRequest CoursesStudentsDelete' where + type Rs CoursesStudentsDelete' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesStudentsDelete{..} + = go _csdXgafv _csdQuotaUser _csdPrettyPrint + _csdUploadProtocol + _csdPp + _csdCourseId + _csdAccessToken + _csdUploadType + _csdUserId + _csdBearerToken + _csdKey + _csdOauthToken + _csdFields + _csdCallback + _csdAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesStudentsDeleteAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Get.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Get.hs new file mode 100644 index 000000000..6c7aacd53 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Get.hs @@ -0,0 +1,252 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Students.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a student of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to view students of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no student of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ for @ClassroomCoursesStudentsGet@. +module Classroom.Courses.Students.Get + ( + -- * REST Resource + CoursesStudentsGetAPI + + -- * Creating a Request + , coursesStudentsGet + , CoursesStudentsGet + + -- * Request Lenses + , csgXgafv + , csgQuotaUser + , csgPrettyPrint + , csgUploadProtocol + , csgPp + , csgCourseId + , csgAccessToken + , csgUploadType + , csgUserId + , csgBearerToken + , csgKey + , csgOauthToken + , csgFields + , csgCallback + , csgAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesStudentsGet@ which the +-- 'CoursesStudentsGet' request conforms to. +type CoursesStudentsGetAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "students" :> + Capture "userId" Text :> Get '[JSON] Student + +-- | Returns a student of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to view students of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no student of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ 'coursesStudentsGet' smart constructor. +data CoursesStudentsGet = CoursesStudentsGet + { _csgXgafv :: !(Maybe Text) + , _csgQuotaUser :: !(Maybe Text) + , _csgPrettyPrint :: !Bool + , _csgUploadProtocol :: !(Maybe Text) + , _csgPp :: !Bool + , _csgCourseId :: !Text + , _csgAccessToken :: !(Maybe Text) + , _csgUploadType :: !(Maybe Text) + , _csgUserId :: !Text + , _csgBearerToken :: !(Maybe Text) + , _csgKey :: !(Maybe Text) + , _csgOauthToken :: !(Maybe Text) + , _csgFields :: !(Maybe Text) + , _csgCallback :: !(Maybe Text) + , _csgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesStudentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csgXgafv' +-- +-- * 'csgQuotaUser' +-- +-- * 'csgPrettyPrint' +-- +-- * 'csgUploadProtocol' +-- +-- * 'csgPp' +-- +-- * 'csgCourseId' +-- +-- * 'csgAccessToken' +-- +-- * 'csgUploadType' +-- +-- * 'csgUserId' +-- +-- * 'csgBearerToken' +-- +-- * 'csgKey' +-- +-- * 'csgOauthToken' +-- +-- * 'csgFields' +-- +-- * 'csgCallback' +-- +-- * 'csgAlt' +coursesStudentsGet + :: Text -- ^ 'courseId' + -> Text -- ^ 'userId' + -> CoursesStudentsGet +coursesStudentsGet pCsgCourseId_ pCsgUserId_ = + CoursesStudentsGet + { _csgXgafv = Nothing + , _csgQuotaUser = Nothing + , _csgPrettyPrint = True + , _csgUploadProtocol = Nothing + , _csgPp = True + , _csgCourseId = pCsgCourseId_ + , _csgAccessToken = Nothing + , _csgUploadType = Nothing + , _csgUserId = pCsgUserId_ + , _csgBearerToken = Nothing + , _csgKey = Nothing + , _csgOauthToken = Nothing + , _csgFields = Nothing + , _csgCallback = Nothing + , _csgAlt = "json" + } + +-- | V1 error format. +csgXgafv :: Lens' CoursesStudentsGet' (Maybe Text) +csgXgafv = lens _csgXgafv (\ s a -> s{_csgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +csgQuotaUser :: Lens' CoursesStudentsGet' (Maybe Text) +csgQuotaUser + = lens _csgQuotaUser (\ s a -> s{_csgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csgPrettyPrint :: Lens' CoursesStudentsGet' Bool +csgPrettyPrint + = lens _csgPrettyPrint + (\ s a -> s{_csgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +csgUploadProtocol :: Lens' CoursesStudentsGet' (Maybe Text) +csgUploadProtocol + = lens _csgUploadProtocol + (\ s a -> s{_csgUploadProtocol = a}) + +-- | Pretty-print response. +csgPp :: Lens' CoursesStudentsGet' Bool +csgPp = lens _csgPp (\ s a -> s{_csgPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +csgCourseId :: Lens' CoursesStudentsGet' Text +csgCourseId + = lens _csgCourseId (\ s a -> s{_csgCourseId = a}) + +-- | OAuth access token. +csgAccessToken :: Lens' CoursesStudentsGet' (Maybe Text) +csgAccessToken + = lens _csgAccessToken + (\ s a -> s{_csgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +csgUploadType :: Lens' CoursesStudentsGet' (Maybe Text) +csgUploadType + = lens _csgUploadType + (\ s a -> s{_csgUploadType = a}) + +-- | Identifier of the student to return. The identifier can be one of the +-- following: * the numeric identifier for the user * the email address of +-- the user * the string literal \`\"me\"\`, indicating the requesting user +csgUserId :: Lens' CoursesStudentsGet' Text +csgUserId + = lens _csgUserId (\ s a -> s{_csgUserId = a}) + +-- | OAuth bearer token. +csgBearerToken :: Lens' CoursesStudentsGet' (Maybe Text) +csgBearerToken + = lens _csgBearerToken + (\ s a -> s{_csgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csgKey :: Lens' CoursesStudentsGet' (Maybe Text) +csgKey = lens _csgKey (\ s a -> s{_csgKey = a}) + +-- | OAuth 2.0 token for the current user. +csgOauthToken :: Lens' CoursesStudentsGet' (Maybe Text) +csgOauthToken + = lens _csgOauthToken + (\ s a -> s{_csgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csgFields :: Lens' CoursesStudentsGet' (Maybe Text) +csgFields + = lens _csgFields (\ s a -> s{_csgFields = a}) + +-- | JSONP +csgCallback :: Lens' CoursesStudentsGet' (Maybe Text) +csgCallback + = lens _csgCallback (\ s a -> s{_csgCallback = a}) + +-- | Data format for response. +csgAlt :: Lens' CoursesStudentsGet' Text +csgAlt = lens _csgAlt (\ s a -> s{_csgAlt = a}) + +instance GoogleRequest CoursesStudentsGet' where + type Rs CoursesStudentsGet' = Student + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesStudentsGet{..} + = go _csgXgafv _csgQuotaUser _csgPrettyPrint + _csgUploadProtocol + _csgPp + _csgCourseId + _csgAccessToken + _csgUploadType + _csgUserId + _csgBearerToken + _csgKey + _csgOauthToken + _csgFields + _csgCallback + _csgAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesStudentsGetAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/List.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/List.hs new file mode 100644 index 000000000..41af9b201 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/List.hs @@ -0,0 +1,266 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Students.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of students of this course that the requester is +-- permitted to view. This method returns the following error codes: * +-- \`NOT_FOUND\` if the course does not exist. * \`PERMISSION_DENIED\` for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ for @ClassroomCoursesStudentsList@. +module Classroom.Courses.Students.List + ( + -- * REST Resource + CoursesStudentsListAPI + + -- * Creating a Request + , coursesStudentsList + , CoursesStudentsList + + -- * Request Lenses + , cslXgafv + , cslQuotaUser + , cslPrettyPrint + , cslUploadProtocol + , cslPp + , cslCourseId + , cslAccessToken + , cslUploadType + , cslBearerToken + , cslKey + , cslPageToken + , cslOauthToken + , cslPageSize + , cslFields + , cslCallback + , cslAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesStudentsList@ which the +-- 'CoursesStudentsList' request conforms to. +type CoursesStudentsListAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "students" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListStudentsResponse + +-- | Returns a list of students of this course that the requester is +-- permitted to view. This method returns the following error codes: * +-- \`NOT_FOUND\` if the course does not exist. * \`PERMISSION_DENIED\` for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ 'coursesStudentsList' smart constructor. +data CoursesStudentsList = CoursesStudentsList + { _cslXgafv :: !(Maybe Text) + , _cslQuotaUser :: !(Maybe Text) + , _cslPrettyPrint :: !Bool + , _cslUploadProtocol :: !(Maybe Text) + , _cslPp :: !Bool + , _cslCourseId :: !Text + , _cslAccessToken :: !(Maybe Text) + , _cslUploadType :: !(Maybe Text) + , _cslBearerToken :: !(Maybe Text) + , _cslKey :: !(Maybe Text) + , _cslPageToken :: !(Maybe Text) + , _cslOauthToken :: !(Maybe Text) + , _cslPageSize :: !(Maybe Int32) + , _cslFields :: !(Maybe Text) + , _cslCallback :: !(Maybe Text) + , _cslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesStudentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cslXgafv' +-- +-- * 'cslQuotaUser' +-- +-- * 'cslPrettyPrint' +-- +-- * 'cslUploadProtocol' +-- +-- * 'cslPp' +-- +-- * 'cslCourseId' +-- +-- * 'cslAccessToken' +-- +-- * 'cslUploadType' +-- +-- * 'cslBearerToken' +-- +-- * 'cslKey' +-- +-- * 'cslPageToken' +-- +-- * 'cslOauthToken' +-- +-- * 'cslPageSize' +-- +-- * 'cslFields' +-- +-- * 'cslCallback' +-- +-- * 'cslAlt' +coursesStudentsList + :: Text -- ^ 'courseId' + -> CoursesStudentsList +coursesStudentsList pCslCourseId_ = + CoursesStudentsList + { _cslXgafv = Nothing + , _cslQuotaUser = Nothing + , _cslPrettyPrint = True + , _cslUploadProtocol = Nothing + , _cslPp = True + , _cslCourseId = pCslCourseId_ + , _cslAccessToken = Nothing + , _cslUploadType = Nothing + , _cslBearerToken = Nothing + , _cslKey = Nothing + , _cslPageToken = Nothing + , _cslOauthToken = Nothing + , _cslPageSize = Nothing + , _cslFields = Nothing + , _cslCallback = Nothing + , _cslAlt = "json" + } + +-- | V1 error format. +cslXgafv :: Lens' CoursesStudentsList' (Maybe Text) +cslXgafv = lens _cslXgafv (\ s a -> s{_cslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cslQuotaUser :: Lens' CoursesStudentsList' (Maybe Text) +cslQuotaUser + = lens _cslQuotaUser (\ s a -> s{_cslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cslPrettyPrint :: Lens' CoursesStudentsList' Bool +cslPrettyPrint + = lens _cslPrettyPrint + (\ s a -> s{_cslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cslUploadProtocol :: Lens' CoursesStudentsList' (Maybe Text) +cslUploadProtocol + = lens _cslUploadProtocol + (\ s a -> s{_cslUploadProtocol = a}) + +-- | Pretty-print response. +cslPp :: Lens' CoursesStudentsList' Bool +cslPp = lens _cslPp (\ s a -> s{_cslPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cslCourseId :: Lens' CoursesStudentsList' Text +cslCourseId + = lens _cslCourseId (\ s a -> s{_cslCourseId = a}) + +-- | OAuth access token. +cslAccessToken :: Lens' CoursesStudentsList' (Maybe Text) +cslAccessToken + = lens _cslAccessToken + (\ s a -> s{_cslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cslUploadType :: Lens' CoursesStudentsList' (Maybe Text) +cslUploadType + = lens _cslUploadType + (\ s a -> s{_cslUploadType = a}) + +-- | OAuth bearer token. +cslBearerToken :: Lens' CoursesStudentsList' (Maybe Text) +cslBearerToken + = lens _cslBearerToken + (\ s a -> s{_cslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cslKey :: Lens' CoursesStudentsList' (Maybe Text) +cslKey = lens _cslKey (\ s a -> s{_cslKey = a}) + +-- | [nextPageToken][google.classroom.v1.ListStudentsResponse.next_page_token] +-- value returned from a previous +-- [list][google.classroom.v1.Users.ListStudents] call, indicating that the +-- subsequent page of results should be returned. The +-- [list][google.classroom.v1.Users.ListStudents] request must be otherwise +-- identical to the one that resulted in this token. +cslPageToken :: Lens' CoursesStudentsList' (Maybe Text) +cslPageToken + = lens _cslPageToken (\ s a -> s{_cslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cslOauthToken :: Lens' CoursesStudentsList' (Maybe Text) +cslOauthToken + = lens _cslOauthToken + (\ s a -> s{_cslOauthToken = a}) + +-- | Maximum number of items to return. Zero means no maximum. The server may +-- return fewer than the specified number of results. +cslPageSize :: Lens' CoursesStudentsList' (Maybe Int32) +cslPageSize + = lens _cslPageSize (\ s a -> s{_cslPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +cslFields :: Lens' CoursesStudentsList' (Maybe Text) +cslFields + = lens _cslFields (\ s a -> s{_cslFields = a}) + +-- | JSONP +cslCallback :: Lens' CoursesStudentsList' (Maybe Text) +cslCallback + = lens _cslCallback (\ s a -> s{_cslCallback = a}) + +-- | Data format for response. +cslAlt :: Lens' CoursesStudentsList' Text +cslAlt = lens _cslAlt (\ s a -> s{_cslAlt = a}) + +instance GoogleRequest CoursesStudentsList' where + type Rs CoursesStudentsList' = ListStudentsResponse + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesStudentsList{..} + = go _cslXgafv _cslQuotaUser _cslPrettyPrint + _cslUploadProtocol + _cslPp + _cslCourseId + _cslAccessToken + _cslUploadType + _cslBearerToken + _cslKey + _cslPageToken + _cslOauthToken + _cslPageSize + _cslFields + _cslCallback + _cslAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesStudentsListAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Create.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Create.hs new file mode 100644 index 000000000..7df16cb4b --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Create.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Teachers.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to create teachers in this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if the requested course +-- ID does not exist. * \`FAILED_PRECONDITION\` if the requested user\'s +-- account is disabled. * \`ALREADY_EXISTS\` if the user is already a +-- teacher or student in the course. +-- +-- /See:/ for @ClassroomCoursesTeachersCreate@. +module Classroom.Courses.Teachers.Create + ( + -- * REST Resource + CoursesTeachersCreateAPI + + -- * Creating a Request + , coursesTeachersCreate + , CoursesTeachersCreate + + -- * Request Lenses + , ctcXgafv + , ctcQuotaUser + , ctcPrettyPrint + , ctcUploadProtocol + , ctcPp + , ctcCourseId + , ctcAccessToken + , ctcUploadType + , ctcBearerToken + , ctcKey + , ctcOauthToken + , ctcFields + , ctcCallback + , ctcAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesTeachersCreate@ which the +-- 'CoursesTeachersCreate' request conforms to. +type CoursesTeachersCreateAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "teachers" :> Post '[JSON] Teacher + +-- | Creates a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to create teachers in this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if the requested course +-- ID does not exist. * \`FAILED_PRECONDITION\` if the requested user\'s +-- account is disabled. * \`ALREADY_EXISTS\` if the user is already a +-- teacher or student in the course. +-- +-- /See:/ 'coursesTeachersCreate' smart constructor. +data CoursesTeachersCreate = CoursesTeachersCreate + { _ctcXgafv :: !(Maybe Text) + , _ctcQuotaUser :: !(Maybe Text) + , _ctcPrettyPrint :: !Bool + , _ctcUploadProtocol :: !(Maybe Text) + , _ctcPp :: !Bool + , _ctcCourseId :: !Text + , _ctcAccessToken :: !(Maybe Text) + , _ctcUploadType :: !(Maybe Text) + , _ctcBearerToken :: !(Maybe Text) + , _ctcKey :: !(Maybe Text) + , _ctcOauthToken :: !(Maybe Text) + , _ctcFields :: !(Maybe Text) + , _ctcCallback :: !(Maybe Text) + , _ctcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesTeachersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctcXgafv' +-- +-- * 'ctcQuotaUser' +-- +-- * 'ctcPrettyPrint' +-- +-- * 'ctcUploadProtocol' +-- +-- * 'ctcPp' +-- +-- * 'ctcCourseId' +-- +-- * 'ctcAccessToken' +-- +-- * 'ctcUploadType' +-- +-- * 'ctcBearerToken' +-- +-- * 'ctcKey' +-- +-- * 'ctcOauthToken' +-- +-- * 'ctcFields' +-- +-- * 'ctcCallback' +-- +-- * 'ctcAlt' +coursesTeachersCreate + :: Text -- ^ 'courseId' + -> CoursesTeachersCreate +coursesTeachersCreate pCtcCourseId_ = + CoursesTeachersCreate + { _ctcXgafv = Nothing + , _ctcQuotaUser = Nothing + , _ctcPrettyPrint = True + , _ctcUploadProtocol = Nothing + , _ctcPp = True + , _ctcCourseId = pCtcCourseId_ + , _ctcAccessToken = Nothing + , _ctcUploadType = Nothing + , _ctcBearerToken = Nothing + , _ctcKey = Nothing + , _ctcOauthToken = Nothing + , _ctcFields = Nothing + , _ctcCallback = Nothing + , _ctcAlt = "json" + } + +-- | V1 error format. +ctcXgafv :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcXgafv = lens _ctcXgafv (\ s a -> s{_ctcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ctcQuotaUser :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcQuotaUser + = lens _ctcQuotaUser (\ s a -> s{_ctcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctcPrettyPrint :: Lens' CoursesTeachersCreate' Bool +ctcPrettyPrint + = lens _ctcPrettyPrint + (\ s a -> s{_ctcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ctcUploadProtocol :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcUploadProtocol + = lens _ctcUploadProtocol + (\ s a -> s{_ctcUploadProtocol = a}) + +-- | Pretty-print response. +ctcPp :: Lens' CoursesTeachersCreate' Bool +ctcPp = lens _ctcPp (\ s a -> s{_ctcPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +ctcCourseId :: Lens' CoursesTeachersCreate' Text +ctcCourseId + = lens _ctcCourseId (\ s a -> s{_ctcCourseId = a}) + +-- | OAuth access token. +ctcAccessToken :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcAccessToken + = lens _ctcAccessToken + (\ s a -> s{_ctcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ctcUploadType :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcUploadType + = lens _ctcUploadType + (\ s a -> s{_ctcUploadType = a}) + +-- | OAuth bearer token. +ctcBearerToken :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcBearerToken + = lens _ctcBearerToken + (\ s a -> s{_ctcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctcKey :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcKey = lens _ctcKey (\ s a -> s{_ctcKey = a}) + +-- | OAuth 2.0 token for the current user. +ctcOauthToken :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcOauthToken + = lens _ctcOauthToken + (\ s a -> s{_ctcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctcFields :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcFields + = lens _ctcFields (\ s a -> s{_ctcFields = a}) + +-- | JSONP +ctcCallback :: Lens' CoursesTeachersCreate' (Maybe Text) +ctcCallback + = lens _ctcCallback (\ s a -> s{_ctcCallback = a}) + +-- | Data format for response. +ctcAlt :: Lens' CoursesTeachersCreate' Text +ctcAlt = lens _ctcAlt (\ s a -> s{_ctcAlt = a}) + +instance GoogleRequest CoursesTeachersCreate' where + type Rs CoursesTeachersCreate' = Teacher + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesTeachersCreate{..} + = go _ctcXgafv _ctcQuotaUser _ctcPrettyPrint + _ctcUploadProtocol + _ctcPp + _ctcCourseId + _ctcAccessToken + _ctcUploadType + _ctcBearerToken + _ctcKey + _ctcOauthToken + _ctcFields + _ctcCallback + _ctcAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesTeachersCreateAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Delete.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Delete.hs new file mode 100644 index 000000000..c57c530b6 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Delete.hs @@ -0,0 +1,256 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Teachers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to delete teachers of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no teacher of this +-- course has the requested ID or if the course does not exist. * +-- \`FAILED_PRECONDITION\` if the requested ID belongs to the primary +-- teacher of this course. +-- +-- /See:/ for @ClassroomCoursesTeachersDelete@. +module Classroom.Courses.Teachers.Delete + ( + -- * REST Resource + CoursesTeachersDeleteAPI + + -- * Creating a Request + , coursesTeachersDelete + , CoursesTeachersDelete + + -- * Request Lenses + , ctdXgafv + , ctdQuotaUser + , ctdPrettyPrint + , ctdUploadProtocol + , ctdPp + , ctdCourseId + , ctdAccessToken + , ctdUploadType + , ctdUserId + , ctdBearerToken + , ctdKey + , ctdOauthToken + , ctdFields + , ctdCallback + , ctdAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesTeachersDelete@ which the +-- 'CoursesTeachersDelete' request conforms to. +type CoursesTeachersDeleteAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "teachers" :> + Capture "userId" Text :> Delete '[JSON] Empty + +-- | Deletes a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to delete teachers of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no teacher of this +-- course has the requested ID or if the course does not exist. * +-- \`FAILED_PRECONDITION\` if the requested ID belongs to the primary +-- teacher of this course. +-- +-- /See:/ 'coursesTeachersDelete' smart constructor. +data CoursesTeachersDelete = CoursesTeachersDelete + { _ctdXgafv :: !(Maybe Text) + , _ctdQuotaUser :: !(Maybe Text) + , _ctdPrettyPrint :: !Bool + , _ctdUploadProtocol :: !(Maybe Text) + , _ctdPp :: !Bool + , _ctdCourseId :: !Text + , _ctdAccessToken :: !(Maybe Text) + , _ctdUploadType :: !(Maybe Text) + , _ctdUserId :: !Text + , _ctdBearerToken :: !(Maybe Text) + , _ctdKey :: !(Maybe Text) + , _ctdOauthToken :: !(Maybe Text) + , _ctdFields :: !(Maybe Text) + , _ctdCallback :: !(Maybe Text) + , _ctdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesTeachersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctdXgafv' +-- +-- * 'ctdQuotaUser' +-- +-- * 'ctdPrettyPrint' +-- +-- * 'ctdUploadProtocol' +-- +-- * 'ctdPp' +-- +-- * 'ctdCourseId' +-- +-- * 'ctdAccessToken' +-- +-- * 'ctdUploadType' +-- +-- * 'ctdUserId' +-- +-- * 'ctdBearerToken' +-- +-- * 'ctdKey' +-- +-- * 'ctdOauthToken' +-- +-- * 'ctdFields' +-- +-- * 'ctdCallback' +-- +-- * 'ctdAlt' +coursesTeachersDelete + :: Text -- ^ 'courseId' + -> Text -- ^ 'userId' + -> CoursesTeachersDelete +coursesTeachersDelete pCtdCourseId_ pCtdUserId_ = + CoursesTeachersDelete + { _ctdXgafv = Nothing + , _ctdQuotaUser = Nothing + , _ctdPrettyPrint = True + , _ctdUploadProtocol = Nothing + , _ctdPp = True + , _ctdCourseId = pCtdCourseId_ + , _ctdAccessToken = Nothing + , _ctdUploadType = Nothing + , _ctdUserId = pCtdUserId_ + , _ctdBearerToken = Nothing + , _ctdKey = Nothing + , _ctdOauthToken = Nothing + , _ctdFields = Nothing + , _ctdCallback = Nothing + , _ctdAlt = "json" + } + +-- | V1 error format. +ctdXgafv :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdXgafv = lens _ctdXgafv (\ s a -> s{_ctdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ctdQuotaUser :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdQuotaUser + = lens _ctdQuotaUser (\ s a -> s{_ctdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctdPrettyPrint :: Lens' CoursesTeachersDelete' Bool +ctdPrettyPrint + = lens _ctdPrettyPrint + (\ s a -> s{_ctdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ctdUploadProtocol :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdUploadProtocol + = lens _ctdUploadProtocol + (\ s a -> s{_ctdUploadProtocol = a}) + +-- | Pretty-print response. +ctdPp :: Lens' CoursesTeachersDelete' Bool +ctdPp = lens _ctdPp (\ s a -> s{_ctdPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +ctdCourseId :: Lens' CoursesTeachersDelete' Text +ctdCourseId + = lens _ctdCourseId (\ s a -> s{_ctdCourseId = a}) + +-- | OAuth access token. +ctdAccessToken :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdAccessToken + = lens _ctdAccessToken + (\ s a -> s{_ctdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ctdUploadType :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdUploadType + = lens _ctdUploadType + (\ s a -> s{_ctdUploadType = a}) + +-- | Identifier of the teacher to delete. The identifier can be one of the +-- following: * the numeric identifier for the user * the email address of +-- the user * the string literal \`\"me\"\`, indicating the requesting user +ctdUserId :: Lens' CoursesTeachersDelete' Text +ctdUserId + = lens _ctdUserId (\ s a -> s{_ctdUserId = a}) + +-- | OAuth bearer token. +ctdBearerToken :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdBearerToken + = lens _ctdBearerToken + (\ s a -> s{_ctdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctdKey :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdKey = lens _ctdKey (\ s a -> s{_ctdKey = a}) + +-- | OAuth 2.0 token for the current user. +ctdOauthToken :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdOauthToken + = lens _ctdOauthToken + (\ s a -> s{_ctdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctdFields :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdFields + = lens _ctdFields (\ s a -> s{_ctdFields = a}) + +-- | JSONP +ctdCallback :: Lens' CoursesTeachersDelete' (Maybe Text) +ctdCallback + = lens _ctdCallback (\ s a -> s{_ctdCallback = a}) + +-- | Data format for response. +ctdAlt :: Lens' CoursesTeachersDelete' Text +ctdAlt = lens _ctdAlt (\ s a -> s{_ctdAlt = a}) + +instance GoogleRequest CoursesTeachersDelete' where + type Rs CoursesTeachersDelete' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesTeachersDelete{..} + = go _ctdXgafv _ctdQuotaUser _ctdPrettyPrint + _ctdUploadProtocol + _ctdPp + _ctdCourseId + _ctdAccessToken + _ctdUploadType + _ctdUserId + _ctdBearerToken + _ctdKey + _ctdOauthToken + _ctdFields + _ctdCallback + _ctdAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesTeachersDeleteAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Get.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Get.hs new file mode 100644 index 000000000..da7789802 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Get.hs @@ -0,0 +1,252 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Teachers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to view teachers of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no teacher of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ for @ClassroomCoursesTeachersGet@. +module Classroom.Courses.Teachers.Get + ( + -- * REST Resource + CoursesTeachersGetAPI + + -- * Creating a Request + , coursesTeachersGet + , CoursesTeachersGet + + -- * Request Lenses + , ctgXgafv + , ctgQuotaUser + , ctgPrettyPrint + , ctgUploadProtocol + , ctgPp + , ctgCourseId + , ctgAccessToken + , ctgUploadType + , ctgUserId + , ctgBearerToken + , ctgKey + , ctgOauthToken + , ctgFields + , ctgCallback + , ctgAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesTeachersGet@ which the +-- 'CoursesTeachersGet' request conforms to. +type CoursesTeachersGetAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "teachers" :> + Capture "userId" Text :> Get '[JSON] Teacher + +-- | Returns a teacher of a course. This method returns the following error +-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted +-- to view teachers of this course or for [general user permission +-- errors][User Permission Errors]. * \`NOT_FOUND\` if no teacher of this +-- course has the requested ID or if the course does not exist. +-- +-- /See:/ 'coursesTeachersGet' smart constructor. +data CoursesTeachersGet = CoursesTeachersGet + { _ctgXgafv :: !(Maybe Text) + , _ctgQuotaUser :: !(Maybe Text) + , _ctgPrettyPrint :: !Bool + , _ctgUploadProtocol :: !(Maybe Text) + , _ctgPp :: !Bool + , _ctgCourseId :: !Text + , _ctgAccessToken :: !(Maybe Text) + , _ctgUploadType :: !(Maybe Text) + , _ctgUserId :: !Text + , _ctgBearerToken :: !(Maybe Text) + , _ctgKey :: !(Maybe Text) + , _ctgOauthToken :: !(Maybe Text) + , _ctgFields :: !(Maybe Text) + , _ctgCallback :: !(Maybe Text) + , _ctgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesTeachersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctgXgafv' +-- +-- * 'ctgQuotaUser' +-- +-- * 'ctgPrettyPrint' +-- +-- * 'ctgUploadProtocol' +-- +-- * 'ctgPp' +-- +-- * 'ctgCourseId' +-- +-- * 'ctgAccessToken' +-- +-- * 'ctgUploadType' +-- +-- * 'ctgUserId' +-- +-- * 'ctgBearerToken' +-- +-- * 'ctgKey' +-- +-- * 'ctgOauthToken' +-- +-- * 'ctgFields' +-- +-- * 'ctgCallback' +-- +-- * 'ctgAlt' +coursesTeachersGet + :: Text -- ^ 'courseId' + -> Text -- ^ 'userId' + -> CoursesTeachersGet +coursesTeachersGet pCtgCourseId_ pCtgUserId_ = + CoursesTeachersGet + { _ctgXgafv = Nothing + , _ctgQuotaUser = Nothing + , _ctgPrettyPrint = True + , _ctgUploadProtocol = Nothing + , _ctgPp = True + , _ctgCourseId = pCtgCourseId_ + , _ctgAccessToken = Nothing + , _ctgUploadType = Nothing + , _ctgUserId = pCtgUserId_ + , _ctgBearerToken = Nothing + , _ctgKey = Nothing + , _ctgOauthToken = Nothing + , _ctgFields = Nothing + , _ctgCallback = Nothing + , _ctgAlt = "json" + } + +-- | V1 error format. +ctgXgafv :: Lens' CoursesTeachersGet' (Maybe Text) +ctgXgafv = lens _ctgXgafv (\ s a -> s{_ctgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ctgQuotaUser :: Lens' CoursesTeachersGet' (Maybe Text) +ctgQuotaUser + = lens _ctgQuotaUser (\ s a -> s{_ctgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctgPrettyPrint :: Lens' CoursesTeachersGet' Bool +ctgPrettyPrint + = lens _ctgPrettyPrint + (\ s a -> s{_ctgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ctgUploadProtocol :: Lens' CoursesTeachersGet' (Maybe Text) +ctgUploadProtocol + = lens _ctgUploadProtocol + (\ s a -> s{_ctgUploadProtocol = a}) + +-- | Pretty-print response. +ctgPp :: Lens' CoursesTeachersGet' Bool +ctgPp = lens _ctgPp (\ s a -> s{_ctgPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +ctgCourseId :: Lens' CoursesTeachersGet' Text +ctgCourseId + = lens _ctgCourseId (\ s a -> s{_ctgCourseId = a}) + +-- | OAuth access token. +ctgAccessToken :: Lens' CoursesTeachersGet' (Maybe Text) +ctgAccessToken + = lens _ctgAccessToken + (\ s a -> s{_ctgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ctgUploadType :: Lens' CoursesTeachersGet' (Maybe Text) +ctgUploadType + = lens _ctgUploadType + (\ s a -> s{_ctgUploadType = a}) + +-- | Identifier of the teacher to return. The identifier can be one of the +-- following: * the numeric identifier for the user * the email address of +-- the user * the string literal \`\"me\"\`, indicating the requesting user +ctgUserId :: Lens' CoursesTeachersGet' Text +ctgUserId + = lens _ctgUserId (\ s a -> s{_ctgUserId = a}) + +-- | OAuth bearer token. +ctgBearerToken :: Lens' CoursesTeachersGet' (Maybe Text) +ctgBearerToken + = lens _ctgBearerToken + (\ s a -> s{_ctgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctgKey :: Lens' CoursesTeachersGet' (Maybe Text) +ctgKey = lens _ctgKey (\ s a -> s{_ctgKey = a}) + +-- | OAuth 2.0 token for the current user. +ctgOauthToken :: Lens' CoursesTeachersGet' (Maybe Text) +ctgOauthToken + = lens _ctgOauthToken + (\ s a -> s{_ctgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctgFields :: Lens' CoursesTeachersGet' (Maybe Text) +ctgFields + = lens _ctgFields (\ s a -> s{_ctgFields = a}) + +-- | JSONP +ctgCallback :: Lens' CoursesTeachersGet' (Maybe Text) +ctgCallback + = lens _ctgCallback (\ s a -> s{_ctgCallback = a}) + +-- | Data format for response. +ctgAlt :: Lens' CoursesTeachersGet' Text +ctgAlt = lens _ctgAlt (\ s a -> s{_ctgAlt = a}) + +instance GoogleRequest CoursesTeachersGet' where + type Rs CoursesTeachersGet' = Teacher + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesTeachersGet{..} + = go _ctgXgafv _ctgQuotaUser _ctgPrettyPrint + _ctgUploadProtocol + _ctgPp + _ctgCourseId + _ctgAccessToken + _ctgUploadType + _ctgUserId + _ctgBearerToken + _ctgKey + _ctgOauthToken + _ctgFields + _ctgCallback + _ctgAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesTeachersGetAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/List.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/List.hs new file mode 100644 index 000000000..d2d554725 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/List.hs @@ -0,0 +1,266 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Teachers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of teachers of this course that the requester is +-- permitted to view. This method returns the following error codes: * +-- \`NOT_FOUND\` if the course does not exist. * \`PERMISSION_DENIED\` for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ for @ClassroomCoursesTeachersList@. +module Classroom.Courses.Teachers.List + ( + -- * REST Resource + CoursesTeachersListAPI + + -- * Creating a Request + , coursesTeachersList + , CoursesTeachersList + + -- * Request Lenses + , ctlXgafv + , ctlQuotaUser + , ctlPrettyPrint + , ctlUploadProtocol + , ctlPp + , ctlCourseId + , ctlAccessToken + , ctlUploadType + , ctlBearerToken + , ctlKey + , ctlPageToken + , ctlOauthToken + , ctlPageSize + , ctlFields + , ctlCallback + , ctlAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesTeachersList@ which the +-- 'CoursesTeachersList' request conforms to. +type CoursesTeachersListAPI = + "v1" :> + "courses" :> + Capture "courseId" Text :> + "teachers" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListTeachersResponse + +-- | Returns a list of teachers of this course that the requester is +-- permitted to view. This method returns the following error codes: * +-- \`NOT_FOUND\` if the course does not exist. * \`PERMISSION_DENIED\` for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ 'coursesTeachersList' smart constructor. +data CoursesTeachersList = CoursesTeachersList + { _ctlXgafv :: !(Maybe Text) + , _ctlQuotaUser :: !(Maybe Text) + , _ctlPrettyPrint :: !Bool + , _ctlUploadProtocol :: !(Maybe Text) + , _ctlPp :: !Bool + , _ctlCourseId :: !Text + , _ctlAccessToken :: !(Maybe Text) + , _ctlUploadType :: !(Maybe Text) + , _ctlBearerToken :: !(Maybe Text) + , _ctlKey :: !(Maybe Text) + , _ctlPageToken :: !(Maybe Text) + , _ctlOauthToken :: !(Maybe Text) + , _ctlPageSize :: !(Maybe Int32) + , _ctlFields :: !(Maybe Text) + , _ctlCallback :: !(Maybe Text) + , _ctlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesTeachersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctlXgafv' +-- +-- * 'ctlQuotaUser' +-- +-- * 'ctlPrettyPrint' +-- +-- * 'ctlUploadProtocol' +-- +-- * 'ctlPp' +-- +-- * 'ctlCourseId' +-- +-- * 'ctlAccessToken' +-- +-- * 'ctlUploadType' +-- +-- * 'ctlBearerToken' +-- +-- * 'ctlKey' +-- +-- * 'ctlPageToken' +-- +-- * 'ctlOauthToken' +-- +-- * 'ctlPageSize' +-- +-- * 'ctlFields' +-- +-- * 'ctlCallback' +-- +-- * 'ctlAlt' +coursesTeachersList + :: Text -- ^ 'courseId' + -> CoursesTeachersList +coursesTeachersList pCtlCourseId_ = + CoursesTeachersList + { _ctlXgafv = Nothing + , _ctlQuotaUser = Nothing + , _ctlPrettyPrint = True + , _ctlUploadProtocol = Nothing + , _ctlPp = True + , _ctlCourseId = pCtlCourseId_ + , _ctlAccessToken = Nothing + , _ctlUploadType = Nothing + , _ctlBearerToken = Nothing + , _ctlKey = Nothing + , _ctlPageToken = Nothing + , _ctlOauthToken = Nothing + , _ctlPageSize = Nothing + , _ctlFields = Nothing + , _ctlCallback = Nothing + , _ctlAlt = "json" + } + +-- | V1 error format. +ctlXgafv :: Lens' CoursesTeachersList' (Maybe Text) +ctlXgafv = lens _ctlXgafv (\ s a -> s{_ctlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ctlQuotaUser :: Lens' CoursesTeachersList' (Maybe Text) +ctlQuotaUser + = lens _ctlQuotaUser (\ s a -> s{_ctlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctlPrettyPrint :: Lens' CoursesTeachersList' Bool +ctlPrettyPrint + = lens _ctlPrettyPrint + (\ s a -> s{_ctlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ctlUploadProtocol :: Lens' CoursesTeachersList' (Maybe Text) +ctlUploadProtocol + = lens _ctlUploadProtocol + (\ s a -> s{_ctlUploadProtocol = a}) + +-- | Pretty-print response. +ctlPp :: Lens' CoursesTeachersList' Bool +ctlPp = lens _ctlPp (\ s a -> s{_ctlPp = a}) + +-- | Identifier of the course. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +ctlCourseId :: Lens' CoursesTeachersList' Text +ctlCourseId + = lens _ctlCourseId (\ s a -> s{_ctlCourseId = a}) + +-- | OAuth access token. +ctlAccessToken :: Lens' CoursesTeachersList' (Maybe Text) +ctlAccessToken + = lens _ctlAccessToken + (\ s a -> s{_ctlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ctlUploadType :: Lens' CoursesTeachersList' (Maybe Text) +ctlUploadType + = lens _ctlUploadType + (\ s a -> s{_ctlUploadType = a}) + +-- | OAuth bearer token. +ctlBearerToken :: Lens' CoursesTeachersList' (Maybe Text) +ctlBearerToken + = lens _ctlBearerToken + (\ s a -> s{_ctlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctlKey :: Lens' CoursesTeachersList' (Maybe Text) +ctlKey = lens _ctlKey (\ s a -> s{_ctlKey = a}) + +-- | [nextPageToken][google.classroom.v1.ListTeachersResponse.next_page_token] +-- value returned from a previous +-- [list][google.classroom.v1.Users.ListTeachers] call, indicating that the +-- subsequent page of results should be returned. The +-- [list][google.classroom.v1.Users.ListTeachers] request must be otherwise +-- identical to the one that resulted in this token. +ctlPageToken :: Lens' CoursesTeachersList' (Maybe Text) +ctlPageToken + = lens _ctlPageToken (\ s a -> s{_ctlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ctlOauthToken :: Lens' CoursesTeachersList' (Maybe Text) +ctlOauthToken + = lens _ctlOauthToken + (\ s a -> s{_ctlOauthToken = a}) + +-- | Maximum number of items to return. Zero means no maximum. The server may +-- return fewer than the specified number of results. +ctlPageSize :: Lens' CoursesTeachersList' (Maybe Int32) +ctlPageSize + = lens _ctlPageSize (\ s a -> s{_ctlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +ctlFields :: Lens' CoursesTeachersList' (Maybe Text) +ctlFields + = lens _ctlFields (\ s a -> s{_ctlFields = a}) + +-- | JSONP +ctlCallback :: Lens' CoursesTeachersList' (Maybe Text) +ctlCallback + = lens _ctlCallback (\ s a -> s{_ctlCallback = a}) + +-- | Data format for response. +ctlAlt :: Lens' CoursesTeachersList' Text +ctlAlt = lens _ctlAlt (\ s a -> s{_ctlAlt = a}) + +instance GoogleRequest CoursesTeachersList' where + type Rs CoursesTeachersList' = ListTeachersResponse + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesTeachersList{..} + = go _ctlXgafv _ctlQuotaUser _ctlPrettyPrint + _ctlUploadProtocol + _ctlPp + _ctlCourseId + _ctlAccessToken + _ctlUploadType + _ctlBearerToken + _ctlKey + _ctlPageToken + _ctlOauthToken + _ctlPageSize + _ctlFields + _ctlCallback + _ctlAlt + where go + = clientWithRoute + (Proxy :: Proxy CoursesTeachersListAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Update.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Update.hs new file mode 100644 index 000000000..6b4a4ffcf --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Update.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Courses.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to modify +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ for @ClassroomCoursesUpdate@. +module Classroom.Courses.Update + ( + -- * REST Resource + CoursesUpdateAPI + + -- * Creating a Request + , coursesUpdate + , CoursesUpdate + + -- * Request Lenses + , cuXgafv + , cuQuotaUser + , cuPrettyPrint + , cuUploadProtocol + , cuPp + , cuAccessToken + , cuUploadType + , cuBearerToken + , cuKey + , cuId + , cuOauthToken + , cuFields + , cuCallback + , cuAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomCoursesUpdate@ which the +-- 'CoursesUpdate' request conforms to. +type CoursesUpdateAPI = + "v1" :> + "courses" :> Capture "id" Text :> Put '[JSON] Course + +-- | Updates a course. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to modify +-- the requested course or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no course exists with the +-- requested ID. +-- +-- /See:/ 'coursesUpdate' smart constructor. +data CoursesUpdate = CoursesUpdate + { _cuXgafv :: !(Maybe Text) + , _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUploadProtocol :: !(Maybe Text) + , _cuPp :: !Bool + , _cuAccessToken :: !(Maybe Text) + , _cuUploadType :: !(Maybe Text) + , _cuBearerToken :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuId :: !Text + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuCallback :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoursesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuXgafv' +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUploadProtocol' +-- +-- * 'cuPp' +-- +-- * 'cuAccessToken' +-- +-- * 'cuUploadType' +-- +-- * 'cuBearerToken' +-- +-- * 'cuKey' +-- +-- * 'cuId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuCallback' +-- +-- * 'cuAlt' +coursesUpdate + :: Text -- ^ 'id' + -> CoursesUpdate +coursesUpdate pCuId_ = + CoursesUpdate + { _cuXgafv = Nothing + , _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUploadProtocol = Nothing + , _cuPp = True + , _cuAccessToken = Nothing + , _cuUploadType = Nothing + , _cuBearerToken = Nothing + , _cuKey = Nothing + , _cuId = pCuId_ + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuCallback = Nothing + , _cuAlt = "json" + } + +-- | V1 error format. +cuXgafv :: Lens' CoursesUpdate' (Maybe Text) +cuXgafv = lens _cuXgafv (\ s a -> s{_cuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cuQuotaUser :: Lens' CoursesUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CoursesUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cuUploadProtocol :: Lens' CoursesUpdate' (Maybe Text) +cuUploadProtocol + = lens _cuUploadProtocol + (\ s a -> s{_cuUploadProtocol = a}) + +-- | Pretty-print response. +cuPp :: Lens' CoursesUpdate' Bool +cuPp = lens _cuPp (\ s a -> s{_cuPp = a}) + +-- | OAuth access token. +cuAccessToken :: Lens' CoursesUpdate' (Maybe Text) +cuAccessToken + = lens _cuAccessToken + (\ s a -> s{_cuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cuUploadType :: Lens' CoursesUpdate' (Maybe Text) +cuUploadType + = lens _cuUploadType (\ s a -> s{_cuUploadType = a}) + +-- | OAuth bearer token. +cuBearerToken :: Lens' CoursesUpdate' (Maybe Text) +cuBearerToken + = lens _cuBearerToken + (\ s a -> s{_cuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CoursesUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | Identifier of the course to update. This identifier can be either the +-- Classroom-assigned identifier or an +-- [alias][google.classroom.v1.CourseAlias]. +cuId :: Lens' CoursesUpdate' Text +cuId = lens _cuId (\ s a -> s{_cuId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CoursesUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CoursesUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | JSONP +cuCallback :: Lens' CoursesUpdate' (Maybe Text) +cuCallback + = lens _cuCallback (\ s a -> s{_cuCallback = a}) + +-- | Data format for response. +cuAlt :: Lens' CoursesUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CoursesUpdate' where + type Rs CoursesUpdate' = Course + request = requestWithRoute defReq classroomURL + requestWithRoute r u CoursesUpdate{..} + = go _cuXgafv _cuQuotaUser _cuPrettyPrint + _cuUploadProtocol + _cuPp + _cuAccessToken + _cuUploadType + _cuBearerToken + _cuKey + _cuId + _cuOauthToken + _cuFields + _cuCallback + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CoursesUpdateAPI) r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Accept.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Accept.hs new file mode 100644 index 000000000..8eba9132e --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Accept.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Invitations.Accept +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Accepts an invitation, removing it and adding the invited user to the +-- teachers or students (as appropriate) of the specified course. Only the +-- invited user may accept an invitation. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to accept the requested invitation or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if no +-- invitation exists with the requested ID. +-- +-- /See:/ for @ClassroomInvitationsAccept@. +module Classroom.Invitations.Accept + ( + -- * REST Resource + InvitationsAcceptAPI + + -- * Creating a Request + , invitationsAccept + , InvitationsAccept + + -- * Request Lenses + , iaXgafv + , iaQuotaUser + , iaPrettyPrint + , iaUploadProtocol + , iaPp + , iaAccessToken + , iaUploadType + , iaBearerToken + , iaKey + , iaId + , iaOauthToken + , iaFields + , iaCallback + , iaAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomInvitationsAccept@ which the +-- 'InvitationsAccept' request conforms to. +type InvitationsAcceptAPI = + "v1" :> + "invitations" :> "{id}:accept" :> Post '[JSON] Empty + +-- | Accepts an invitation, removing it and adding the invited user to the +-- teachers or students (as appropriate) of the specified course. Only the +-- invited user may accept an invitation. This method returns the following +-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not +-- permitted to accept the requested invitation or for [general user +-- permission errors][User Permission Errors]. * \`NOT_FOUND\` if no +-- invitation exists with the requested ID. +-- +-- /See:/ 'invitationsAccept' smart constructor. +data InvitationsAccept = InvitationsAccept + { _iaXgafv :: !(Maybe Text) + , _iaQuotaUser :: !(Maybe Text) + , _iaPrettyPrint :: !Bool + , _iaUploadProtocol :: !(Maybe Text) + , _iaPp :: !Bool + , _iaAccessToken :: !(Maybe Text) + , _iaUploadType :: !(Maybe Text) + , _iaBearerToken :: !(Maybe Text) + , _iaKey :: !(Maybe Text) + , _iaId :: !Text + , _iaOauthToken :: !(Maybe Text) + , _iaFields :: !(Maybe Text) + , _iaCallback :: !(Maybe Text) + , _iaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvitationsAccept'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iaXgafv' +-- +-- * 'iaQuotaUser' +-- +-- * 'iaPrettyPrint' +-- +-- * 'iaUploadProtocol' +-- +-- * 'iaPp' +-- +-- * 'iaAccessToken' +-- +-- * 'iaUploadType' +-- +-- * 'iaBearerToken' +-- +-- * 'iaKey' +-- +-- * 'iaId' +-- +-- * 'iaOauthToken' +-- +-- * 'iaFields' +-- +-- * 'iaCallback' +-- +-- * 'iaAlt' +invitationsAccept + :: Text -- ^ 'id' + -> InvitationsAccept +invitationsAccept pIaId_ = + InvitationsAccept + { _iaXgafv = Nothing + , _iaQuotaUser = Nothing + , _iaPrettyPrint = True + , _iaUploadProtocol = Nothing + , _iaPp = True + , _iaAccessToken = Nothing + , _iaUploadType = Nothing + , _iaBearerToken = Nothing + , _iaKey = Nothing + , _iaId = pIaId_ + , _iaOauthToken = Nothing + , _iaFields = Nothing + , _iaCallback = Nothing + , _iaAlt = "json" + } + +-- | V1 error format. +iaXgafv :: Lens' InvitationsAccept' (Maybe Text) +iaXgafv = lens _iaXgafv (\ s a -> s{_iaXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +iaQuotaUser :: Lens' InvitationsAccept' (Maybe Text) +iaQuotaUser + = lens _iaQuotaUser (\ s a -> s{_iaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iaPrettyPrint :: Lens' InvitationsAccept' Bool +iaPrettyPrint + = lens _iaPrettyPrint + (\ s a -> s{_iaPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +iaUploadProtocol :: Lens' InvitationsAccept' (Maybe Text) +iaUploadProtocol + = lens _iaUploadProtocol + (\ s a -> s{_iaUploadProtocol = a}) + +-- | Pretty-print response. +iaPp :: Lens' InvitationsAccept' Bool +iaPp = lens _iaPp (\ s a -> s{_iaPp = a}) + +-- | OAuth access token. +iaAccessToken :: Lens' InvitationsAccept' (Maybe Text) +iaAccessToken + = lens _iaAccessToken + (\ s a -> s{_iaAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +iaUploadType :: Lens' InvitationsAccept' (Maybe Text) +iaUploadType + = lens _iaUploadType (\ s a -> s{_iaUploadType = a}) + +-- | OAuth bearer token. +iaBearerToken :: Lens' InvitationsAccept' (Maybe Text) +iaBearerToken + = lens _iaBearerToken + (\ s a -> s{_iaBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iaKey :: Lens' InvitationsAccept' (Maybe Text) +iaKey = lens _iaKey (\ s a -> s{_iaKey = a}) + +-- | Identifier of the invitation to accept. +iaId :: Lens' InvitationsAccept' Text +iaId = lens _iaId (\ s a -> s{_iaId = a}) + +-- | OAuth 2.0 token for the current user. +iaOauthToken :: Lens' InvitationsAccept' (Maybe Text) +iaOauthToken + = lens _iaOauthToken (\ s a -> s{_iaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iaFields :: Lens' InvitationsAccept' (Maybe Text) +iaFields = lens _iaFields (\ s a -> s{_iaFields = a}) + +-- | JSONP +iaCallback :: Lens' InvitationsAccept' (Maybe Text) +iaCallback + = lens _iaCallback (\ s a -> s{_iaCallback = a}) + +-- | Data format for response. +iaAlt :: Lens' InvitationsAccept' Text +iaAlt = lens _iaAlt (\ s a -> s{_iaAlt = a}) + +instance GoogleRequest InvitationsAccept' where + type Rs InvitationsAccept' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u InvitationsAccept{..} + = go _iaXgafv _iaQuotaUser _iaPrettyPrint + _iaUploadProtocol + _iaPp + _iaAccessToken + _iaUploadType + _iaBearerToken + _iaKey + _iaId + _iaOauthToken + _iaFields + _iaCallback + _iaAlt + where go + = clientWithRoute + (Proxy :: Proxy InvitationsAcceptAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Create.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Create.hs new file mode 100644 index 000000000..e7ef18849 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Create.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Invitations.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an invitation. Only one invitation for a user and course may +-- exist at a time. Delete and re-create an invitation to make changes. +-- This method returns the following error codes: * \`PERMISSION_DENIED\` +-- if the requesting user is not permitted to create invitations for this +-- course or for [general user permission errors][User Permission Errors]. +-- * \`NOT_FOUND\` if the course or the user does not exist. * +-- \`FAILED_PRECONDITION\` if the requested user\'s account is disabled or +-- if the user already has this role or a role with greater permissions. * +-- \`ALREADY_EXISTS\` if an invitation for the specified user and course +-- already exists. +-- +-- /See:/ for @ClassroomInvitationsCreate@. +module Classroom.Invitations.Create + ( + -- * REST Resource + InvitationsCreateAPI + + -- * Creating a Request + , invitationsCreate + , InvitationsCreate + + -- * Request Lenses + , icXgafv + , icQuotaUser + , icPrettyPrint + , icUploadProtocol + , icPp + , icAccessToken + , icUploadType + , icBearerToken + , icKey + , icOauthToken + , icFields + , icCallback + , icAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomInvitationsCreate@ which the +-- 'InvitationsCreate' request conforms to. +type InvitationsCreateAPI = + "v1" :> "invitations" :> Post '[JSON] Invitation + +-- | Creates an invitation. Only one invitation for a user and course may +-- exist at a time. Delete and re-create an invitation to make changes. +-- This method returns the following error codes: * \`PERMISSION_DENIED\` +-- if the requesting user is not permitted to create invitations for this +-- course or for [general user permission errors][User Permission Errors]. +-- * \`NOT_FOUND\` if the course or the user does not exist. * +-- \`FAILED_PRECONDITION\` if the requested user\'s account is disabled or +-- if the user already has this role or a role with greater permissions. * +-- \`ALREADY_EXISTS\` if an invitation for the specified user and course +-- already exists. +-- +-- /See:/ 'invitationsCreate' smart constructor. +data InvitationsCreate = InvitationsCreate + { _icXgafv :: !(Maybe Text) + , _icQuotaUser :: !(Maybe Text) + , _icPrettyPrint :: !Bool + , _icUploadProtocol :: !(Maybe Text) + , _icPp :: !Bool + , _icAccessToken :: !(Maybe Text) + , _icUploadType :: !(Maybe Text) + , _icBearerToken :: !(Maybe Text) + , _icKey :: !(Maybe Text) + , _icOauthToken :: !(Maybe Text) + , _icFields :: !(Maybe Text) + , _icCallback :: !(Maybe Text) + , _icAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvitationsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icXgafv' +-- +-- * 'icQuotaUser' +-- +-- * 'icPrettyPrint' +-- +-- * 'icUploadProtocol' +-- +-- * 'icPp' +-- +-- * 'icAccessToken' +-- +-- * 'icUploadType' +-- +-- * 'icBearerToken' +-- +-- * 'icKey' +-- +-- * 'icOauthToken' +-- +-- * 'icFields' +-- +-- * 'icCallback' +-- +-- * 'icAlt' +invitationsCreate + :: InvitationsCreate +invitationsCreate = + InvitationsCreate + { _icXgafv = Nothing + , _icQuotaUser = Nothing + , _icPrettyPrint = True + , _icUploadProtocol = Nothing + , _icPp = True + , _icAccessToken = Nothing + , _icUploadType = Nothing + , _icBearerToken = Nothing + , _icKey = Nothing + , _icOauthToken = Nothing + , _icFields = Nothing + , _icCallback = Nothing + , _icAlt = "json" + } + +-- | V1 error format. +icXgafv :: Lens' InvitationsCreate' (Maybe Text) +icXgafv = lens _icXgafv (\ s a -> s{_icXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +icQuotaUser :: Lens' InvitationsCreate' (Maybe Text) +icQuotaUser + = lens _icQuotaUser (\ s a -> s{_icQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +icPrettyPrint :: Lens' InvitationsCreate' Bool +icPrettyPrint + = lens _icPrettyPrint + (\ s a -> s{_icPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +icUploadProtocol :: Lens' InvitationsCreate' (Maybe Text) +icUploadProtocol + = lens _icUploadProtocol + (\ s a -> s{_icUploadProtocol = a}) + +-- | Pretty-print response. +icPp :: Lens' InvitationsCreate' Bool +icPp = lens _icPp (\ s a -> s{_icPp = a}) + +-- | OAuth access token. +icAccessToken :: Lens' InvitationsCreate' (Maybe Text) +icAccessToken + = lens _icAccessToken + (\ s a -> s{_icAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +icUploadType :: Lens' InvitationsCreate' (Maybe Text) +icUploadType + = lens _icUploadType (\ s a -> s{_icUploadType = a}) + +-- | OAuth bearer token. +icBearerToken :: Lens' InvitationsCreate' (Maybe Text) +icBearerToken + = lens _icBearerToken + (\ s a -> s{_icBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +icKey :: Lens' InvitationsCreate' (Maybe Text) +icKey = lens _icKey (\ s a -> s{_icKey = a}) + +-- | OAuth 2.0 token for the current user. +icOauthToken :: Lens' InvitationsCreate' (Maybe Text) +icOauthToken + = lens _icOauthToken (\ s a -> s{_icOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +icFields :: Lens' InvitationsCreate' (Maybe Text) +icFields = lens _icFields (\ s a -> s{_icFields = a}) + +-- | JSONP +icCallback :: Lens' InvitationsCreate' (Maybe Text) +icCallback + = lens _icCallback (\ s a -> s{_icCallback = a}) + +-- | Data format for response. +icAlt :: Lens' InvitationsCreate' Text +icAlt = lens _icAlt (\ s a -> s{_icAlt = a}) + +instance GoogleRequest InvitationsCreate' where + type Rs InvitationsCreate' = Invitation + request = requestWithRoute defReq classroomURL + requestWithRoute r u InvitationsCreate{..} + = go _icXgafv _icQuotaUser _icPrettyPrint + _icUploadProtocol + _icPp + _icAccessToken + _icUploadType + _icBearerToken + _icKey + _icOauthToken + _icFields + _icCallback + _icAlt + where go + = clientWithRoute + (Proxy :: Proxy InvitationsCreateAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Delete.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Delete.hs new file mode 100644 index 000000000..5c8f86879 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Delete.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Invitations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an invitation. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to delete +-- the requested invitation or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no invitation exists with the +-- requested ID. +-- +-- /See:/ for @ClassroomInvitationsDelete@. +module Classroom.Invitations.Delete + ( + -- * REST Resource + InvitationsDeleteAPI + + -- * Creating a Request + , invitationsDelete + , InvitationsDelete + + -- * Request Lenses + , idXgafv + , idQuotaUser + , idPrettyPrint + , idUploadProtocol + , idPp + , idAccessToken + , idUploadType + , idBearerToken + , idKey + , idId + , idOauthToken + , idFields + , idCallback + , idAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomInvitationsDelete@ which the +-- 'InvitationsDelete' request conforms to. +type InvitationsDeleteAPI = + "v1" :> + "invitations" :> + Capture "id" Text :> Delete '[JSON] Empty + +-- | Deletes an invitation. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to delete +-- the requested invitation or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no invitation exists with the +-- requested ID. +-- +-- /See:/ 'invitationsDelete' smart constructor. +data InvitationsDelete = InvitationsDelete + { _idXgafv :: !(Maybe Text) + , _idQuotaUser :: !(Maybe Text) + , _idPrettyPrint :: !Bool + , _idUploadProtocol :: !(Maybe Text) + , _idPp :: !Bool + , _idAccessToken :: !(Maybe Text) + , _idUploadType :: !(Maybe Text) + , _idBearerToken :: !(Maybe Text) + , _idKey :: !(Maybe Text) + , _idId :: !Text + , _idOauthToken :: !(Maybe Text) + , _idFields :: !(Maybe Text) + , _idCallback :: !(Maybe Text) + , _idAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvitationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idXgafv' +-- +-- * 'idQuotaUser' +-- +-- * 'idPrettyPrint' +-- +-- * 'idUploadProtocol' +-- +-- * 'idPp' +-- +-- * 'idAccessToken' +-- +-- * 'idUploadType' +-- +-- * 'idBearerToken' +-- +-- * 'idKey' +-- +-- * 'idId' +-- +-- * 'idOauthToken' +-- +-- * 'idFields' +-- +-- * 'idCallback' +-- +-- * 'idAlt' +invitationsDelete + :: Text -- ^ 'id' + -> InvitationsDelete +invitationsDelete pIdId_ = + InvitationsDelete + { _idXgafv = Nothing + , _idQuotaUser = Nothing + , _idPrettyPrint = True + , _idUploadProtocol = Nothing + , _idPp = True + , _idAccessToken = Nothing + , _idUploadType = Nothing + , _idBearerToken = Nothing + , _idKey = Nothing + , _idId = pIdId_ + , _idOauthToken = Nothing + , _idFields = Nothing + , _idCallback = Nothing + , _idAlt = "json" + } + +-- | V1 error format. +idXgafv :: Lens' InvitationsDelete' (Maybe Text) +idXgafv = lens _idXgafv (\ s a -> s{_idXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +idQuotaUser :: Lens' InvitationsDelete' (Maybe Text) +idQuotaUser + = lens _idQuotaUser (\ s a -> s{_idQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +idPrettyPrint :: Lens' InvitationsDelete' Bool +idPrettyPrint + = lens _idPrettyPrint + (\ s a -> s{_idPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +idUploadProtocol :: Lens' InvitationsDelete' (Maybe Text) +idUploadProtocol + = lens _idUploadProtocol + (\ s a -> s{_idUploadProtocol = a}) + +-- | Pretty-print response. +idPp :: Lens' InvitationsDelete' Bool +idPp = lens _idPp (\ s a -> s{_idPp = a}) + +-- | OAuth access token. +idAccessToken :: Lens' InvitationsDelete' (Maybe Text) +idAccessToken + = lens _idAccessToken + (\ s a -> s{_idAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +idUploadType :: Lens' InvitationsDelete' (Maybe Text) +idUploadType + = lens _idUploadType (\ s a -> s{_idUploadType = a}) + +-- | OAuth bearer token. +idBearerToken :: Lens' InvitationsDelete' (Maybe Text) +idBearerToken + = lens _idBearerToken + (\ s a -> s{_idBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idKey :: Lens' InvitationsDelete' (Maybe Text) +idKey = lens _idKey (\ s a -> s{_idKey = a}) + +-- | Identifier of the invitation to delete. +idId :: Lens' InvitationsDelete' Text +idId = lens _idId (\ s a -> s{_idId = a}) + +-- | OAuth 2.0 token for the current user. +idOauthToken :: Lens' InvitationsDelete' (Maybe Text) +idOauthToken + = lens _idOauthToken (\ s a -> s{_idOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +idFields :: Lens' InvitationsDelete' (Maybe Text) +idFields = lens _idFields (\ s a -> s{_idFields = a}) + +-- | JSONP +idCallback :: Lens' InvitationsDelete' (Maybe Text) +idCallback + = lens _idCallback (\ s a -> s{_idCallback = a}) + +-- | Data format for response. +idAlt :: Lens' InvitationsDelete' Text +idAlt = lens _idAlt (\ s a -> s{_idAlt = a}) + +instance GoogleRequest InvitationsDelete' where + type Rs InvitationsDelete' = Empty + request = requestWithRoute defReq classroomURL + requestWithRoute r u InvitationsDelete{..} + = go _idXgafv _idQuotaUser _idPrettyPrint + _idUploadProtocol + _idPp + _idAccessToken + _idUploadType + _idBearerToken + _idKey + _idId + _idOauthToken + _idFields + _idCallback + _idAlt + where go + = clientWithRoute + (Proxy :: Proxy InvitationsDeleteAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Get.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Get.hs new file mode 100644 index 000000000..4b316fbbf --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Get.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Invitations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns an invitation. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to view +-- the requested invitation or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no invitation exists with the +-- requested ID. +-- +-- /See:/ for @ClassroomInvitationsGet@. +module Classroom.Invitations.Get + ( + -- * REST Resource + InvitationsGetAPI + + -- * Creating a Request + , invitationsGet + , InvitationsGet + + -- * Request Lenses + , igXgafv + , igQuotaUser + , igPrettyPrint + , igUploadProtocol + , igPp + , igAccessToken + , igUploadType + , igBearerToken + , igKey + , igId + , igOauthToken + , igFields + , igCallback + , igAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomInvitationsGet@ which the +-- 'InvitationsGet' request conforms to. +type InvitationsGetAPI = + "v1" :> + "invitations" :> + Capture "id" Text :> Get '[JSON] Invitation + +-- | Returns an invitation. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to view +-- the requested invitation or for [general user permission errors][User +-- Permission Errors]. * \`NOT_FOUND\` if no invitation exists with the +-- requested ID. +-- +-- /See:/ 'invitationsGet' smart constructor. +data InvitationsGet = InvitationsGet + { _igXgafv :: !(Maybe Text) + , _igQuotaUser :: !(Maybe Text) + , _igPrettyPrint :: !Bool + , _igUploadProtocol :: !(Maybe Text) + , _igPp :: !Bool + , _igAccessToken :: !(Maybe Text) + , _igUploadType :: !(Maybe Text) + , _igBearerToken :: !(Maybe Text) + , _igKey :: !(Maybe Text) + , _igId :: !Text + , _igOauthToken :: !(Maybe Text) + , _igFields :: !(Maybe Text) + , _igCallback :: !(Maybe Text) + , _igAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvitationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igXgafv' +-- +-- * 'igQuotaUser' +-- +-- * 'igPrettyPrint' +-- +-- * 'igUploadProtocol' +-- +-- * 'igPp' +-- +-- * 'igAccessToken' +-- +-- * 'igUploadType' +-- +-- * 'igBearerToken' +-- +-- * 'igKey' +-- +-- * 'igId' +-- +-- * 'igOauthToken' +-- +-- * 'igFields' +-- +-- * 'igCallback' +-- +-- * 'igAlt' +invitationsGet + :: Text -- ^ 'id' + -> InvitationsGet +invitationsGet pIgId_ = + InvitationsGet + { _igXgafv = Nothing + , _igQuotaUser = Nothing + , _igPrettyPrint = True + , _igUploadProtocol = Nothing + , _igPp = True + , _igAccessToken = Nothing + , _igUploadType = Nothing + , _igBearerToken = Nothing + , _igKey = Nothing + , _igId = pIgId_ + , _igOauthToken = Nothing + , _igFields = Nothing + , _igCallback = Nothing + , _igAlt = "json" + } + +-- | V1 error format. +igXgafv :: Lens' InvitationsGet' (Maybe Text) +igXgafv = lens _igXgafv (\ s a -> s{_igXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +igQuotaUser :: Lens' InvitationsGet' (Maybe Text) +igQuotaUser + = lens _igQuotaUser (\ s a -> s{_igQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igPrettyPrint :: Lens' InvitationsGet' Bool +igPrettyPrint + = lens _igPrettyPrint + (\ s a -> s{_igPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +igUploadProtocol :: Lens' InvitationsGet' (Maybe Text) +igUploadProtocol + = lens _igUploadProtocol + (\ s a -> s{_igUploadProtocol = a}) + +-- | Pretty-print response. +igPp :: Lens' InvitationsGet' Bool +igPp = lens _igPp (\ s a -> s{_igPp = a}) + +-- | OAuth access token. +igAccessToken :: Lens' InvitationsGet' (Maybe Text) +igAccessToken + = lens _igAccessToken + (\ s a -> s{_igAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +igUploadType :: Lens' InvitationsGet' (Maybe Text) +igUploadType + = lens _igUploadType (\ s a -> s{_igUploadType = a}) + +-- | OAuth bearer token. +igBearerToken :: Lens' InvitationsGet' (Maybe Text) +igBearerToken + = lens _igBearerToken + (\ s a -> s{_igBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igKey :: Lens' InvitationsGet' (Maybe Text) +igKey = lens _igKey (\ s a -> s{_igKey = a}) + +-- | Identifier of the invitation to return. +igId :: Lens' InvitationsGet' Text +igId = lens _igId (\ s a -> s{_igId = a}) + +-- | OAuth 2.0 token for the current user. +igOauthToken :: Lens' InvitationsGet' (Maybe Text) +igOauthToken + = lens _igOauthToken (\ s a -> s{_igOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igFields :: Lens' InvitationsGet' (Maybe Text) +igFields = lens _igFields (\ s a -> s{_igFields = a}) + +-- | JSONP +igCallback :: Lens' InvitationsGet' (Maybe Text) +igCallback + = lens _igCallback (\ s a -> s{_igCallback = a}) + +-- | Data format for response. +igAlt :: Lens' InvitationsGet' Text +igAlt = lens _igAlt (\ s a -> s{_igAlt = a}) + +instance GoogleRequest InvitationsGet' where + type Rs InvitationsGet' = Invitation + request = requestWithRoute defReq classroomURL + requestWithRoute r u InvitationsGet{..} + = go _igXgafv _igQuotaUser _igPrettyPrint + _igUploadProtocol + _igPp + _igAccessToken + _igUploadType + _igBearerToken + _igKey + _igId + _igOauthToken + _igFields + _igCallback + _igAlt + where go + = clientWithRoute (Proxy :: Proxy InvitationsGetAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/List.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/List.hs new file mode 100644 index 000000000..41a6e06db --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/List.hs @@ -0,0 +1,277 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.Invitations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of invitations that the requesting user is permitted to +-- view, restricted to those that match the list request. *Note:* At least +-- one of \`user_id\` or \`course_id\` must be supplied. Both fields can be +-- supplied. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` for [general user permission errors][User +-- Permission Errors]. +-- +-- /See:/ for @ClassroomInvitationsList@. +module Classroom.Invitations.List + ( + -- * REST Resource + InvitationsListAPI + + -- * Creating a Request + , invitationsList + , InvitationsList + + -- * Request Lenses + , ilXgafv + , ilQuotaUser + , ilPrettyPrint + , ilUploadProtocol + , ilPp + , ilCourseId + , ilAccessToken + , ilUploadType + , ilUserId + , ilBearerToken + , ilKey + , ilPageToken + , ilOauthToken + , ilPageSize + , ilFields + , ilCallback + , ilAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomInvitationsList@ which the +-- 'InvitationsList' request conforms to. +type InvitationsListAPI = + "v1" :> + "invitations" :> + QueryParam "courseId" Text :> + QueryParam "userId" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListInvitationsResponse + +-- | Returns a list of invitations that the requesting user is permitted to +-- view, restricted to those that match the list request. *Note:* At least +-- one of \`user_id\` or \`course_id\` must be supplied. Both fields can be +-- supplied. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` for [general user permission errors][User +-- Permission Errors]. +-- +-- /See:/ 'invitationsList' smart constructor. +data InvitationsList = InvitationsList + { _ilXgafv :: !(Maybe Text) + , _ilQuotaUser :: !(Maybe Text) + , _ilPrettyPrint :: !Bool + , _ilUploadProtocol :: !(Maybe Text) + , _ilPp :: !Bool + , _ilCourseId :: !(Maybe Text) + , _ilAccessToken :: !(Maybe Text) + , _ilUploadType :: !(Maybe Text) + , _ilUserId :: !(Maybe Text) + , _ilBearerToken :: !(Maybe Text) + , _ilKey :: !(Maybe Text) + , _ilPageToken :: !(Maybe Text) + , _ilOauthToken :: !(Maybe Text) + , _ilPageSize :: !(Maybe Int32) + , _ilFields :: !(Maybe Text) + , _ilCallback :: !(Maybe Text) + , _ilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvitationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilXgafv' +-- +-- * 'ilQuotaUser' +-- +-- * 'ilPrettyPrint' +-- +-- * 'ilUploadProtocol' +-- +-- * 'ilPp' +-- +-- * 'ilCourseId' +-- +-- * 'ilAccessToken' +-- +-- * 'ilUploadType' +-- +-- * 'ilUserId' +-- +-- * 'ilBearerToken' +-- +-- * 'ilKey' +-- +-- * 'ilPageToken' +-- +-- * 'ilOauthToken' +-- +-- * 'ilPageSize' +-- +-- * 'ilFields' +-- +-- * 'ilCallback' +-- +-- * 'ilAlt' +invitationsList + :: InvitationsList +invitationsList = + InvitationsList + { _ilXgafv = Nothing + , _ilQuotaUser = Nothing + , _ilPrettyPrint = True + , _ilUploadProtocol = Nothing + , _ilPp = True + , _ilCourseId = Nothing + , _ilAccessToken = Nothing + , _ilUploadType = Nothing + , _ilUserId = Nothing + , _ilBearerToken = Nothing + , _ilKey = Nothing + , _ilPageToken = Nothing + , _ilOauthToken = Nothing + , _ilPageSize = Nothing + , _ilFields = Nothing + , _ilCallback = Nothing + , _ilAlt = "json" + } + +-- | V1 error format. +ilXgafv :: Lens' InvitationsList' (Maybe Text) +ilXgafv = lens _ilXgafv (\ s a -> s{_ilXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ilQuotaUser :: Lens' InvitationsList' (Maybe Text) +ilQuotaUser + = lens _ilQuotaUser (\ s a -> s{_ilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ilPrettyPrint :: Lens' InvitationsList' Bool +ilPrettyPrint + = lens _ilPrettyPrint + (\ s a -> s{_ilPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ilUploadProtocol :: Lens' InvitationsList' (Maybe Text) +ilUploadProtocol + = lens _ilUploadProtocol + (\ s a -> s{_ilUploadProtocol = a}) + +-- | Pretty-print response. +ilPp :: Lens' InvitationsList' Bool +ilPp = lens _ilPp (\ s a -> s{_ilPp = a}) + +-- | Restricts returned invitations to those for a course with the specified +-- identifier. +ilCourseId :: Lens' InvitationsList' (Maybe Text) +ilCourseId + = lens _ilCourseId (\ s a -> s{_ilCourseId = a}) + +-- | OAuth access token. +ilAccessToken :: Lens' InvitationsList' (Maybe Text) +ilAccessToken + = lens _ilAccessToken + (\ s a -> s{_ilAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ilUploadType :: Lens' InvitationsList' (Maybe Text) +ilUploadType + = lens _ilUploadType (\ s a -> s{_ilUploadType = a}) + +-- | Restricts returned invitations to those for a specific user. The +-- identifier can be one of the following: * the numeric identifier for the +-- user * the email address of the user * the string literal \`\"me\"\`, +-- indicating the requesting user +ilUserId :: Lens' InvitationsList' (Maybe Text) +ilUserId = lens _ilUserId (\ s a -> s{_ilUserId = a}) + +-- | OAuth bearer token. +ilBearerToken :: Lens' InvitationsList' (Maybe Text) +ilBearerToken + = lens _ilBearerToken + (\ s a -> s{_ilBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ilKey :: Lens' InvitationsList' (Maybe Text) +ilKey = lens _ilKey (\ s a -> s{_ilKey = a}) + +-- | [nextPageToken][google.classroom.v1.ListInvitationsResponse.next_page_token] +-- value returned from a previous +-- [list][google.classroom.v1.Invitations.ListInvitations] call, indicating +-- that the subsequent page of results should be returned. The +-- [list][google.classroom.v1.Invitations.ListInvitations] request must be +-- otherwise identical to the one that resulted in this token. +ilPageToken :: Lens' InvitationsList' (Maybe Text) +ilPageToken + = lens _ilPageToken (\ s a -> s{_ilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ilOauthToken :: Lens' InvitationsList' (Maybe Text) +ilOauthToken + = lens _ilOauthToken (\ s a -> s{_ilOauthToken = a}) + +-- | Maximum number of items to return. Zero means no maximum. The server may +-- return fewer than the specified number of results. +ilPageSize :: Lens' InvitationsList' (Maybe Int32) +ilPageSize + = lens _ilPageSize (\ s a -> s{_ilPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +ilFields :: Lens' InvitationsList' (Maybe Text) +ilFields = lens _ilFields (\ s a -> s{_ilFields = a}) + +-- | JSONP +ilCallback :: Lens' InvitationsList' (Maybe Text) +ilCallback + = lens _ilCallback (\ s a -> s{_ilCallback = a}) + +-- | Data format for response. +ilAlt :: Lens' InvitationsList' Text +ilAlt = lens _ilAlt (\ s a -> s{_ilAlt = a}) + +instance GoogleRequest InvitationsList' where + type Rs InvitationsList' = ListInvitationsResponse + request = requestWithRoute defReq classroomURL + requestWithRoute r u InvitationsList{..} + = go _ilXgafv _ilQuotaUser _ilPrettyPrint + _ilUploadProtocol + _ilPp + _ilCourseId + _ilAccessToken + _ilUploadType + _ilUserId + _ilBearerToken + _ilKey + _ilPageToken + _ilOauthToken + _ilPageSize + _ilFields + _ilCallback + _ilAlt + where go + = clientWithRoute (Proxy :: Proxy InvitationsListAPI) + r + u diff --git a/gogol-classroom/gen/Network/Google/Resource/Classroom/UserProfiles/Get.hs b/gogol-classroom/gen/Network/Google/Resource/Classroom/UserProfiles/Get.hs new file mode 100644 index 000000000..3f53c9d88 --- /dev/null +++ b/gogol-classroom/gen/Network/Google/Resource/Classroom/UserProfiles/Get.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Classroom.UserProfiles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a user profile. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access +-- this user profile or if no profile exists with the requested ID or for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ for @ClassroomUserProfilesGet@. +module Classroom.UserProfiles.Get + ( + -- * REST Resource + UserProfilesGetAPI + + -- * Creating a Request + , userProfilesGet + , UserProfilesGet + + -- * Request Lenses + , upgXgafv + , upgQuotaUser + , upgPrettyPrint + , upgUploadProtocol + , upgPp + , upgAccessToken + , upgUploadType + , upgUserId + , upgBearerToken + , upgKey + , upgOauthToken + , upgFields + , upgCallback + , upgAlt + ) where + +import Network.Google.Classroom.Types +import Network.Google.Prelude + +-- | A resource alias for @ClassroomUserProfilesGet@ which the +-- 'UserProfilesGet' request conforms to. +type UserProfilesGetAPI = + "v1" :> + "userProfiles" :> + Capture "userId" Text :> Get '[JSON] UserProfile + +-- | Returns a user profile. This method returns the following error codes: * +-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access +-- this user profile or if no profile exists with the requested ID or for +-- [general user permission errors][User Permission Errors]. +-- +-- /See:/ 'userProfilesGet' smart constructor. +data UserProfilesGet = UserProfilesGet + { _upgXgafv :: !(Maybe Text) + , _upgQuotaUser :: !(Maybe Text) + , _upgPrettyPrint :: !Bool + , _upgUploadProtocol :: !(Maybe Text) + , _upgPp :: !Bool + , _upgAccessToken :: !(Maybe Text) + , _upgUploadType :: !(Maybe Text) + , _upgUserId :: !Text + , _upgBearerToken :: !(Maybe Text) + , _upgKey :: !(Maybe Text) + , _upgOauthToken :: !(Maybe Text) + , _upgFields :: !(Maybe Text) + , _upgCallback :: !(Maybe Text) + , _upgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upgXgafv' +-- +-- * 'upgQuotaUser' +-- +-- * 'upgPrettyPrint' +-- +-- * 'upgUploadProtocol' +-- +-- * 'upgPp' +-- +-- * 'upgAccessToken' +-- +-- * 'upgUploadType' +-- +-- * 'upgUserId' +-- +-- * 'upgBearerToken' +-- +-- * 'upgKey' +-- +-- * 'upgOauthToken' +-- +-- * 'upgFields' +-- +-- * 'upgCallback' +-- +-- * 'upgAlt' +userProfilesGet + :: Text -- ^ 'userId' + -> UserProfilesGet +userProfilesGet pUpgUserId_ = + UserProfilesGet + { _upgXgafv = Nothing + , _upgQuotaUser = Nothing + , _upgPrettyPrint = True + , _upgUploadProtocol = Nothing + , _upgPp = True + , _upgAccessToken = Nothing + , _upgUploadType = Nothing + , _upgUserId = pUpgUserId_ + , _upgBearerToken = Nothing + , _upgKey = Nothing + , _upgOauthToken = Nothing + , _upgFields = Nothing + , _upgCallback = Nothing + , _upgAlt = "json" + } + +-- | V1 error format. +upgXgafv :: Lens' UserProfilesGet' (Maybe Text) +upgXgafv = lens _upgXgafv (\ s a -> s{_upgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +upgQuotaUser :: Lens' UserProfilesGet' (Maybe Text) +upgQuotaUser + = lens _upgQuotaUser (\ s a -> s{_upgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +upgPrettyPrint :: Lens' UserProfilesGet' Bool +upgPrettyPrint + = lens _upgPrettyPrint + (\ s a -> s{_upgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +upgUploadProtocol :: Lens' UserProfilesGet' (Maybe Text) +upgUploadProtocol + = lens _upgUploadProtocol + (\ s a -> s{_upgUploadProtocol = a}) + +-- | Pretty-print response. +upgPp :: Lens' UserProfilesGet' Bool +upgPp = lens _upgPp (\ s a -> s{_upgPp = a}) + +-- | OAuth access token. +upgAccessToken :: Lens' UserProfilesGet' (Maybe Text) +upgAccessToken + = lens _upgAccessToken + (\ s a -> s{_upgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +upgUploadType :: Lens' UserProfilesGet' (Maybe Text) +upgUploadType + = lens _upgUploadType + (\ s a -> s{_upgUploadType = a}) + +-- | Identifier of the profile to return. The identifier can be one of the +-- following: * the numeric identifier for the user * the email address of +-- the user * the string literal \`\"me\"\`, indicating the requesting user +upgUserId :: Lens' UserProfilesGet' Text +upgUserId + = lens _upgUserId (\ s a -> s{_upgUserId = a}) + +-- | OAuth bearer token. +upgBearerToken :: Lens' UserProfilesGet' (Maybe Text) +upgBearerToken + = lens _upgBearerToken + (\ s a -> s{_upgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +upgKey :: Lens' UserProfilesGet' (Maybe Text) +upgKey = lens _upgKey (\ s a -> s{_upgKey = a}) + +-- | OAuth 2.0 token for the current user. +upgOauthToken :: Lens' UserProfilesGet' (Maybe Text) +upgOauthToken + = lens _upgOauthToken + (\ s a -> s{_upgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +upgFields :: Lens' UserProfilesGet' (Maybe Text) +upgFields + = lens _upgFields (\ s a -> s{_upgFields = a}) + +-- | JSONP +upgCallback :: Lens' UserProfilesGet' (Maybe Text) +upgCallback + = lens _upgCallback (\ s a -> s{_upgCallback = a}) + +-- | Data format for response. +upgAlt :: Lens' UserProfilesGet' Text +upgAlt = lens _upgAlt (\ s a -> s{_upgAlt = a}) + +instance GoogleRequest UserProfilesGet' where + type Rs UserProfilesGet' = UserProfile + request = requestWithRoute defReq classroomURL + requestWithRoute r u UserProfilesGet{..} + = go _upgXgafv _upgQuotaUser _upgPrettyPrint + _upgUploadProtocol + _upgPp + _upgAccessToken + _upgUploadType + _upgUserId + _upgBearerToken + _upgKey + _upgOauthToken + _upgFields + _upgCallback + _upgAlt + where go + = clientWithRoute (Proxy :: Proxy UserProfilesGetAPI) + r + u diff --git a/gogol-classroom/gogol-classroom.cabal b/gogol-classroom/gogol-classroom.cabal new file mode 100644 index 000000000..7671eda8a --- /dev/null +++ b/gogol-classroom/gogol-classroom.cabal @@ -0,0 +1,65 @@ +name: gogol-classroom +version: 0.0.1 +synopsis: Google Classroom API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Google Classroom API + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Classroom + , Network.Google.Classroom.Types + , Network.Google.Resource.Classroom.Courses.Aliases.Create + , Network.Google.Resource.Classroom.Courses.Aliases.Delete + , Network.Google.Resource.Classroom.Courses.Aliases.List + , Network.Google.Resource.Classroom.Courses.Create + , Network.Google.Resource.Classroom.Courses.Delete + , Network.Google.Resource.Classroom.Courses.Get + , Network.Google.Resource.Classroom.Courses.List + , Network.Google.Resource.Classroom.Courses.Patch + , Network.Google.Resource.Classroom.Courses.Students.Create + , Network.Google.Resource.Classroom.Courses.Students.Delete + , Network.Google.Resource.Classroom.Courses.Students.Get + , Network.Google.Resource.Classroom.Courses.Students.List + , Network.Google.Resource.Classroom.Courses.Teachers.Create + , Network.Google.Resource.Classroom.Courses.Teachers.Delete + , Network.Google.Resource.Classroom.Courses.Teachers.Get + , Network.Google.Resource.Classroom.Courses.Teachers.List + , Network.Google.Resource.Classroom.Courses.Update + , Network.Google.Resource.Classroom.Invitations.Accept + , Network.Google.Resource.Classroom.Invitations.Create + , Network.Google.Resource.Classroom.Invitations.Delete + , Network.Google.Resource.Classroom.Invitations.Get + , Network.Google.Resource.Classroom.Invitations.List + , Network.Google.Resource.Classroom.UserProfiles.Get + + other-modules: + Network.Google.Classroom.Types.Product + , Network.Google.Classroom.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-classroom/src/.gitkeep b/gogol-classroom/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-compute-autoscaler/LICENSE b/gogol-compute-autoscaler/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-compute-autoscaler/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-compute-autoscaler/Makefile b/gogol-compute-autoscaler/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-compute-autoscaler/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-compute-autoscaler/README.md b/gogol-compute-autoscaler/README.md new file mode 100644 index 000000000..95ea7e1c6 --- /dev/null +++ b/gogol-compute-autoscaler/README.md @@ -0,0 +1,28 @@ +# gogol-compute-autoscaler + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Compute Engine Autoscaler API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-compute-autoscaler` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-compute-autoscaler/Setup.hs b/gogol-compute-autoscaler/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-compute-autoscaler/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler.hs b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler.hs new file mode 100644 index 000000000..0ed65330e --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler.hs @@ -0,0 +1,197 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.ComputeAutoscaler +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Compute Engine Autoscaler API provides autoscaling for groups +-- of Cloud VMs. +-- +-- /See:/ +module Network.Google.ComputeAutoscaler + ( + -- * API + ComputeAutoscalerAPI + , computeAutoscalerAPI + , computeAutoscalerURL + + -- * Service Methods + + -- * REST Resources + + -- ** AutoscalerAutoscalersDelete + , module Autoscaler.Autoscalers.Delete + + -- ** AutoscalerAutoscalersGet + , module Autoscaler.Autoscalers.Get + + -- ** AutoscalerAutoscalersInsert + , module Autoscaler.Autoscalers.Insert + + -- ** AutoscalerAutoscalersList + , module Autoscaler.Autoscalers.List + + -- ** AutoscalerAutoscalersPatch + , module Autoscaler.Autoscalers.Patch + + -- ** AutoscalerAutoscalersUpdate + , module Autoscaler.Autoscalers.Update + + -- ** AutoscalerZoneOperationsDelete + , module Autoscaler.ZoneOperations.Delete + + -- ** AutoscalerZoneOperationsGet + , module Autoscaler.ZoneOperations.Get + + -- ** AutoscalerZoneOperationsList + , module Autoscaler.ZoneOperations.List + + -- ** AutoscalerZonesList + , module Autoscaler.Zones.List + + -- * Types + + -- ** DeprecationStatus + , DeprecationStatus + , deprecationStatus + , dsState + , dsDeleted + , dsReplacement + , dsObsolete + , dsDeprecated + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** AutoscalingPolicyCustomMetricUtilization + , AutoscalingPolicyCustomMetricUtilization + , autoscalingPolicyCustomMetricUtilization + , apcmuUtilizationTarget + , apcmuMetric + , apcmuUtilizationTargetType + + -- ** AutoscalingPolicyLoadBalancingUtilization + , AutoscalingPolicyLoadBalancingUtilization + , autoscalingPolicyLoadBalancingUtilization + , aplbuUtilizationTarget + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** Zone + , Zone + , zone + , zStatus + , zMaintenanceWindows + , zKind + , zSelfLink + , zName + , zCreationTimestamp + , zId + , zRegion + , zDescription + , zDeprecated + + -- ** AutoscalerListResponse + , AutoscalerListResponse + , autoscalerListResponse + , alrNextPageToken + , alrKind + , alrItems + + -- ** ZoneList + , ZoneList + , zoneList + , zlNextPageToken + , zlKind + , zlItems + , zlSelfLink + , zlId + + -- ** AutoscalingPolicy + , AutoscalingPolicy + , autoscalingPolicy + , apCustomMetricUtilizations + , apMaxNumReplicas + , apCpuUtilization + , apLoadBalancingUtilization + , apMinNumReplicas + , apCoolDownPeriodSec + + -- ** Autoscaler + , Autoscaler + , autoscaler + , aKind + , aSelfLink + , aName + , aCreationTimestamp + , aAutoscalingPolicy + , aId + , aDescription + , aTarget + + -- ** AutoscalingPolicyCPUUtilization + , AutoscalingPolicyCPUUtilization + , autoscalingPolicyCPUUtilization + , apcuUtilizationTarget + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude +import Network.Google.Resource.Autoscaler.Autoscalers.Delete +import Network.Google.Resource.Autoscaler.Autoscalers.Get +import Network.Google.Resource.Autoscaler.Autoscalers.Insert +import Network.Google.Resource.Autoscaler.Autoscalers.List +import Network.Google.Resource.Autoscaler.Autoscalers.Patch +import Network.Google.Resource.Autoscaler.Autoscalers.Update +import Network.Google.Resource.Autoscaler.ZoneOperations.Delete +import Network.Google.Resource.Autoscaler.ZoneOperations.Get +import Network.Google.Resource.Autoscaler.ZoneOperations.List +import Network.Google.Resource.Autoscaler.Zones.List + +{- $resources +TODO +-} + +type ComputeAutoscalerAPI = + Zones :<|> Autoscalers :<|> ZoneOperations + +computeAutoscalerAPI :: Proxy ComputeAutoscalerAPI +computeAutoscalerAPI = Proxy diff --git a/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types.hs b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types.hs new file mode 100644 index 000000000..620e88059 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeAutoscaler.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeAutoscaler.Types + ( + -- * Service URL + computeAutoscalerURL + + -- * DeprecationStatus + , DeprecationStatus + , deprecationStatus + , dsState + , dsDeleted + , dsReplacement + , dsObsolete + , dsDeprecated + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * AutoscalingPolicyCustomMetricUtilization + , AutoscalingPolicyCustomMetricUtilization + , autoscalingPolicyCustomMetricUtilization + , apcmuUtilizationTarget + , apcmuMetric + , apcmuUtilizationTargetType + + -- * AutoscalingPolicyLoadBalancingUtilization + , AutoscalingPolicyLoadBalancingUtilization + , autoscalingPolicyLoadBalancingUtilization + , aplbuUtilizationTarget + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * Zone + , Zone + , zone + , zStatus + , zMaintenanceWindows + , zKind + , zSelfLink + , zName + , zCreationTimestamp + , zId + , zRegion + , zDescription + , zDeprecated + + -- * AutoscalerListResponse + , AutoscalerListResponse + , autoscalerListResponse + , alrNextPageToken + , alrKind + , alrItems + + -- * ZoneList + , ZoneList + , zoneList + , zlNextPageToken + , zlKind + , zlItems + , zlSelfLink + , zlId + + -- * AutoscalingPolicy + , AutoscalingPolicy + , autoscalingPolicy + , apCustomMetricUtilizations + , apMaxNumReplicas + , apCpuUtilization + , apLoadBalancingUtilization + , apMinNumReplicas + , apCoolDownPeriodSec + + -- * Autoscaler + , Autoscaler + , autoscaler + , aKind + , aSelfLink + , aName + , aCreationTimestamp + , aAutoscalingPolicy + , aId + , aDescription + , aTarget + + -- * AutoscalingPolicyCPUUtilization + , AutoscalingPolicyCPUUtilization + , autoscalingPolicyCPUUtilization + , apcuUtilizationTarget + ) where + +import Network.Google.ComputeAutoscaler.Types.Product +import Network.Google.ComputeAutoscaler.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the Google Compute Engine Autoscaler API. +computeAutoscalerURL :: BaseURL +computeAutoscalerURL + = BaseUrl Https + "https://www.googleapis.com/autoscaler/v1beta2/" + 443 diff --git a/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Product.hs b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Product.hs new file mode 100644 index 000000000..589ac54c3 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Product.hs @@ -0,0 +1,1054 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeAutoscaler.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeAutoscaler.Types.Product where + +import Network.Google.ComputeAutoscaler.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'deprecationStatus' smart constructor. +data DeprecationStatus = DeprecationStatus + { _dsState :: !(Maybe Text) + , _dsDeleted :: !(Maybe Text) + , _dsReplacement :: !(Maybe Text) + , _dsObsolete :: !(Maybe Text) + , _dsDeprecated :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeprecationStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsState' +-- +-- * 'dsDeleted' +-- +-- * 'dsReplacement' +-- +-- * 'dsObsolete' +-- +-- * 'dsDeprecated' +deprecationStatus + :: DeprecationStatus +deprecationStatus = + DeprecationStatus + { _dsState = Nothing + , _dsDeleted = Nothing + , _dsReplacement = Nothing + , _dsObsolete = Nothing + , _dsDeprecated = Nothing + } + +dsState :: Lens' DeprecationStatus (Maybe Text) +dsState = lens _dsState (\ s a -> s{_dsState = a}) + +dsDeleted :: Lens' DeprecationStatus (Maybe Text) +dsDeleted + = lens _dsDeleted (\ s a -> s{_dsDeleted = a}) + +dsReplacement :: Lens' DeprecationStatus (Maybe Text) +dsReplacement + = lens _dsReplacement + (\ s a -> s{_dsReplacement = a}) + +dsObsolete :: Lens' DeprecationStatus (Maybe Text) +dsObsolete + = lens _dsObsolete (\ s a -> s{_dsObsolete = a}) + +dsDeprecated :: Lens' DeprecationStatus (Maybe Text) +dsDeprecated + = lens _dsDeprecated (\ s a -> s{_dsDeprecated = a}) + +instance FromJSON DeprecationStatus where + parseJSON + = withObject "DeprecationStatus" + (\ o -> + DeprecationStatus <$> + (o .:? "state") <*> (o .:? "deleted") <*> + (o .:? "replacement") + <*> (o .:? "obsolete") + <*> (o .:? "deprecated")) + +instance ToJSON DeprecationStatus where + toJSON DeprecationStatus{..} + = object + (catMaybes + [("state" .=) <$> _dsState, + ("deleted" .=) <$> _dsDeleted, + ("replacement" .=) <$> _dsReplacement, + ("obsolete" .=) <$> _dsObsolete, + ("deprecated" .=) <$> _dsDeprecated]) + +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "autoscaler#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#operations for Operations +-- resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "autoscaler#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- | Custom utilization metric policy. +-- +-- /See:/ 'autoscalingPolicyCustomMetricUtilization' smart constructor. +data AutoscalingPolicyCustomMetricUtilization = AutoscalingPolicyCustomMetricUtilization + { _apcmuUtilizationTarget :: !(Maybe Double) + , _apcmuMetric :: !(Maybe Text) + , _apcmuUtilizationTargetType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyCustomMetricUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apcmuUtilizationTarget' +-- +-- * 'apcmuMetric' +-- +-- * 'apcmuUtilizationTargetType' +autoscalingPolicyCustomMetricUtilization + :: AutoscalingPolicyCustomMetricUtilization +autoscalingPolicyCustomMetricUtilization = + AutoscalingPolicyCustomMetricUtilization + { _apcmuUtilizationTarget = Nothing + , _apcmuMetric = Nothing + , _apcmuUtilizationTargetType = Nothing + } + +-- | Target value of the metric which Autoscaler should maintain. Must be a +-- positive value. +apcmuUtilizationTarget :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Double) +apcmuUtilizationTarget + = lens _apcmuUtilizationTarget + (\ s a -> s{_apcmuUtilizationTarget = a}) + +-- | Identifier of the metric. It should be a Cloud Monitoring metric. The +-- metric can not have negative values. The metric should be an utilization +-- metric (increasing number of VMs handling requests x times should reduce +-- average value of the metric roughly x times). For example you could use: +-- compute.googleapis.com\/instance\/network\/received_bytes_count. +apcmuMetric :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Text) +apcmuMetric + = lens _apcmuMetric (\ s a -> s{_apcmuMetric = a}) + +-- | Defines type in which utilization_target is expressed. +apcmuUtilizationTargetType :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Text) +apcmuUtilizationTargetType + = lens _apcmuUtilizationTargetType + (\ s a -> s{_apcmuUtilizationTargetType = a}) + +instance FromJSON + AutoscalingPolicyCustomMetricUtilization where + parseJSON + = withObject + "AutoscalingPolicyCustomMetricUtilization" + (\ o -> + AutoscalingPolicyCustomMetricUtilization <$> + (o .:? "utilizationTarget") <*> (o .:? "metric") <*> + (o .:? "utilizationTargetType")) + +instance ToJSON + AutoscalingPolicyCustomMetricUtilization where + toJSON AutoscalingPolicyCustomMetricUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _apcmuUtilizationTarget, + ("metric" .=) <$> _apcmuMetric, + ("utilizationTargetType" .=) <$> + _apcmuUtilizationTargetType]) + +-- | Load balancing utilization policy. +-- +-- /See:/ 'autoscalingPolicyLoadBalancingUtilization' smart constructor. +newtype AutoscalingPolicyLoadBalancingUtilization = AutoscalingPolicyLoadBalancingUtilization + { _aplbuUtilizationTarget :: Maybe Double + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyLoadBalancingUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplbuUtilizationTarget' +autoscalingPolicyLoadBalancingUtilization + :: AutoscalingPolicyLoadBalancingUtilization +autoscalingPolicyLoadBalancingUtilization = + AutoscalingPolicyLoadBalancingUtilization + { _aplbuUtilizationTarget = Nothing + } + +-- | Fraction of backend capacity utilization (set in HTTP load balancing +-- configuration) that Autoscaler should maintain. Must be a positive float +-- value. If not defined, the default is 0.8. For example if your +-- maxRatePerInstance capacity (in HTTP Load Balancing configuration) is +-- set at 10 and you would like to keep number of instances such that each +-- instance receives 7 QPS on average, set this to 0.7. +aplbuUtilizationTarget :: Lens' AutoscalingPolicyLoadBalancingUtilization (Maybe Double) +aplbuUtilizationTarget + = lens _aplbuUtilizationTarget + (\ s a -> s{_aplbuUtilizationTarget = a}) + +instance FromJSON + AutoscalingPolicyLoadBalancingUtilization where + parseJSON + = withObject + "AutoscalingPolicyLoadBalancingUtilization" + (\ o -> + AutoscalingPolicyLoadBalancingUtilization <$> + (o .:? "utilizationTarget")) + +instance ToJSON + AutoscalingPolicyLoadBalancingUtilization where + toJSON AutoscalingPolicyLoadBalancingUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _aplbuUtilizationTarget]) + +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "autoscaler#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output Only] Type of the resource. Always compute#Operation for +-- Operation resources. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "autoscaler#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- +-- /See:/ 'zone' smart constructor. +data Zone = Zone + { _zStatus :: !(Maybe Text) + , _zMaintenanceWindows :: !(Maybe [ZoneMaintenanceWindowsItem]) + , _zKind :: !Text + , _zSelfLink :: !(Maybe Text) + , _zName :: !(Maybe Text) + , _zCreationTimestamp :: !(Maybe Text) + , _zId :: !(Maybe Word64) + , _zRegion :: !(Maybe Text) + , _zDescription :: !(Maybe Text) + , _zDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Zone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zStatus' +-- +-- * 'zMaintenanceWindows' +-- +-- * 'zKind' +-- +-- * 'zSelfLink' +-- +-- * 'zName' +-- +-- * 'zCreationTimestamp' +-- +-- * 'zId' +-- +-- * 'zRegion' +-- +-- * 'zDescription' +-- +-- * 'zDeprecated' +zone + :: Zone +zone = + Zone + { _zStatus = Nothing + , _zMaintenanceWindows = Nothing + , _zKind = "autoscaler#zone" + , _zSelfLink = Nothing + , _zName = Nothing + , _zCreationTimestamp = Nothing + , _zId = Nothing + , _zRegion = Nothing + , _zDescription = Nothing + , _zDeprecated = Nothing + } + +zStatus :: Lens' Zone (Maybe Text) +zStatus = lens _zStatus (\ s a -> s{_zStatus = a}) + +zMaintenanceWindows :: Lens' Zone [ZoneMaintenanceWindowsItem] +zMaintenanceWindows + = lens _zMaintenanceWindows + (\ s a -> s{_zMaintenanceWindows = a}) + . _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always kind#zone for zones. +zKind :: Lens' Zone Text +zKind = lens _zKind (\ s a -> s{_zKind = a}) + +-- | [Output Only] Server defined URL for the resource. +zSelfLink :: Lens' Zone (Maybe Text) +zSelfLink + = lens _zSelfLink (\ s a -> s{_zSelfLink = a}) + +zName :: Lens' Zone (Maybe Text) +zName = lens _zName (\ s a -> s{_zName = a}) + +zCreationTimestamp :: Lens' Zone (Maybe Text) +zCreationTimestamp + = lens _zCreationTimestamp + (\ s a -> s{_zCreationTimestamp = a}) + +zId :: Lens' Zone (Maybe Word64) +zId = lens _zId (\ s a -> s{_zId = a}) + +zRegion :: Lens' Zone (Maybe Text) +zRegion = lens _zRegion (\ s a -> s{_zRegion = a}) + +zDescription :: Lens' Zone (Maybe Text) +zDescription + = lens _zDescription (\ s a -> s{_zDescription = a}) + +zDeprecated :: Lens' Zone (Maybe (Maybe DeprecationStatus)) +zDeprecated + = lens _zDeprecated (\ s a -> s{_zDeprecated = a}) + +instance FromJSON Zone where + parseJSON + = withObject "Zone" + (\ o -> + Zone <$> + (o .:? "status") <*> + (o .:? "maintenanceWindows" .!= mempty) + <*> (o .:? "kind" .!= "autoscaler#zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "region") + <*> (o .:? "description") + <*> (o .:? "deprecated")) + +instance ToJSON Zone where + toJSON Zone{..} + = object + (catMaybes + [("status" .=) <$> _zStatus, + ("maintenanceWindows" .=) <$> _zMaintenanceWindows, + Just ("kind" .= _zKind), + ("selfLink" .=) <$> _zSelfLink, + ("name" .=) <$> _zName, + ("creationTimestamp" .=) <$> _zCreationTimestamp, + ("id" .=) <$> _zId, ("region" .=) <$> _zRegion, + ("description" .=) <$> _zDescription, + ("deprecated" .=) <$> _zDeprecated]) + +-- +-- /See:/ 'autoscalerListResponse' smart constructor. +data AutoscalerListResponse = AutoscalerListResponse + { _alrNextPageToken :: !(Maybe Text) + , _alrKind :: !Text + , _alrItems :: !(Maybe [Maybe Autoscaler]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalerListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrNextPageToken' +-- +-- * 'alrKind' +-- +-- * 'alrItems' +autoscalerListResponse + :: AutoscalerListResponse +autoscalerListResponse = + AutoscalerListResponse + { _alrNextPageToken = Nothing + , _alrKind = "compute#autoscalerList" + , _alrItems = Nothing + } + +-- | [Output only] A token used to continue a truncated list request. +alrNextPageToken :: Lens' AutoscalerListResponse (Maybe Text) +alrNextPageToken + = lens _alrNextPageToken + (\ s a -> s{_alrNextPageToken = a}) + +-- | Type of resource. +alrKind :: Lens' AutoscalerListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +-- | Autoscaler resources. +alrItems :: Lens' AutoscalerListResponse [Maybe Autoscaler] +alrItems + = lens _alrItems (\ s a -> s{_alrItems = a}) . + _Default + . _Coerce + +instance FromJSON AutoscalerListResponse where + parseJSON + = withObject "AutoscalerListResponse" + (\ o -> + AutoscalerListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#autoscalerList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AutoscalerListResponse where + toJSON AutoscalerListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _alrNextPageToken, + Just ("kind" .= _alrKind), + ("items" .=) <$> _alrItems]) + +-- +-- /See:/ 'zoneList' smart constructor. +data ZoneList = ZoneList + { _zlNextPageToken :: !(Maybe Text) + , _zlKind :: !Text + , _zlItems :: !(Maybe [Maybe Zone]) + , _zlSelfLink :: !(Maybe Text) + , _zlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zlNextPageToken' +-- +-- * 'zlKind' +-- +-- * 'zlItems' +-- +-- * 'zlSelfLink' +-- +-- * 'zlId' +zoneList + :: ZoneList +zoneList = + ZoneList + { _zlNextPageToken = Nothing + , _zlKind = "autoscaler#zoneList" + , _zlItems = Nothing + , _zlSelfLink = Nothing + , _zlId = Nothing + } + +zlNextPageToken :: Lens' ZoneList (Maybe Text) +zlNextPageToken + = lens _zlNextPageToken + (\ s a -> s{_zlNextPageToken = a}) + +-- | Type of resource. +zlKind :: Lens' ZoneList Text +zlKind = lens _zlKind (\ s a -> s{_zlKind = a}) + +zlItems :: Lens' ZoneList [Maybe Zone] +zlItems + = lens _zlItems (\ s a -> s{_zlItems = a}) . _Default + . _Coerce + +-- | Server defined URL for this resource (output only). +zlSelfLink :: Lens' ZoneList (Maybe Text) +zlSelfLink + = lens _zlSelfLink (\ s a -> s{_zlSelfLink = a}) + +zlId :: Lens' ZoneList (Maybe Text) +zlId = lens _zlId (\ s a -> s{_zlId = a}) + +instance FromJSON ZoneList where + parseJSON + = withObject "ZoneList" + (\ o -> + ZoneList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "autoscaler#zoneList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ZoneList where + toJSON ZoneList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _zlNextPageToken, + Just ("kind" .= _zlKind), ("items" .=) <$> _zlItems, + ("selfLink" .=) <$> _zlSelfLink, + ("id" .=) <$> _zlId]) + +-- | Cloud Autoscaler policy. +-- +-- /See:/ 'autoscalingPolicy' smart constructor. +data AutoscalingPolicy = AutoscalingPolicy + { _apCustomMetricUtilizations :: !(Maybe [Maybe AutoscalingPolicyCustomMetricUtilization]) + , _apMaxNumReplicas :: !(Maybe Int32) + , _apCpuUtilization :: !(Maybe (Maybe AutoscalingPolicyCPUUtilization)) + , _apLoadBalancingUtilization :: !(Maybe (Maybe AutoscalingPolicyLoadBalancingUtilization)) + , _apMinNumReplicas :: !(Maybe Int32) + , _apCoolDownPeriodSec :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apCustomMetricUtilizations' +-- +-- * 'apMaxNumReplicas' +-- +-- * 'apCpuUtilization' +-- +-- * 'apLoadBalancingUtilization' +-- +-- * 'apMinNumReplicas' +-- +-- * 'apCoolDownPeriodSec' +autoscalingPolicy + :: AutoscalingPolicy +autoscalingPolicy = + AutoscalingPolicy + { _apCustomMetricUtilizations = Nothing + , _apMaxNumReplicas = Nothing + , _apCpuUtilization = Nothing + , _apLoadBalancingUtilization = Nothing + , _apMinNumReplicas = Nothing + , _apCoolDownPeriodSec = Nothing + } + +-- | Configuration parameters of autoscaling based on custom metric. +apCustomMetricUtilizations :: Lens' AutoscalingPolicy [Maybe AutoscalingPolicyCustomMetricUtilization] +apCustomMetricUtilizations + = lens _apCustomMetricUtilizations + (\ s a -> s{_apCustomMetricUtilizations = a}) + . _Default + . _Coerce + +-- | The maximum number of replicas that the Autoscaler can scale up to. +apMaxNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32) +apMaxNumReplicas + = lens _apMaxNumReplicas + (\ s a -> s{_apMaxNumReplicas = a}) + +-- | Exactly one utilization policy should be provided. Configuration +-- parameters of CPU based autoscaling policy. +apCpuUtilization :: Lens' AutoscalingPolicy (Maybe (Maybe AutoscalingPolicyCPUUtilization)) +apCpuUtilization + = lens _apCpuUtilization + (\ s a -> s{_apCpuUtilization = a}) + +-- | Configuration parameters of autoscaling based on load balancer. +apLoadBalancingUtilization :: Lens' AutoscalingPolicy (Maybe (Maybe AutoscalingPolicyLoadBalancingUtilization)) +apLoadBalancingUtilization + = lens _apLoadBalancingUtilization + (\ s a -> s{_apLoadBalancingUtilization = a}) + +-- | The minimum number of replicas that the Autoscaler can scale down to. +apMinNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32) +apMinNumReplicas + = lens _apMinNumReplicas + (\ s a -> s{_apMinNumReplicas = a}) + +-- | The number of seconds that the Autoscaler should wait between two +-- succeeding changes to the number of virtual machines. You should define +-- an interval that is at least as long as the initialization time of a +-- virtual machine and the time it may take for replica pool to create the +-- virtual machine. The default is 60 seconds. +apCoolDownPeriodSec :: Lens' AutoscalingPolicy (Maybe Int32) +apCoolDownPeriodSec + = lens _apCoolDownPeriodSec + (\ s a -> s{_apCoolDownPeriodSec = a}) + +instance FromJSON AutoscalingPolicy where + parseJSON + = withObject "AutoscalingPolicy" + (\ o -> + AutoscalingPolicy <$> + (o .:? "customMetricUtilizations" .!= mempty) <*> + (o .:? "maxNumReplicas") + <*> (o .:? "cpuUtilization") + <*> (o .:? "loadBalancingUtilization") + <*> (o .:? "minNumReplicas") + <*> (o .:? "coolDownPeriodSec")) + +instance ToJSON AutoscalingPolicy where + toJSON AutoscalingPolicy{..} + = object + (catMaybes + [("customMetricUtilizations" .=) <$> + _apCustomMetricUtilizations, + ("maxNumReplicas" .=) <$> _apMaxNumReplicas, + ("cpuUtilization" .=) <$> _apCpuUtilization, + ("loadBalancingUtilization" .=) <$> + _apLoadBalancingUtilization, + ("minNumReplicas" .=) <$> _apMinNumReplicas, + ("coolDownPeriodSec" .=) <$> _apCoolDownPeriodSec]) + +-- | Cloud Autoscaler resource. +-- +-- /See:/ 'autoscaler' smart constructor. +data Autoscaler = Autoscaler + { _aKind :: !Text + , _aSelfLink :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aCreationTimestamp :: !(Maybe Text) + , _aAutoscalingPolicy :: !(Maybe (Maybe AutoscalingPolicy)) + , _aId :: !(Maybe Word64) + , _aDescription :: !(Maybe Text) + , _aTarget :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Autoscaler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aKind' +-- +-- * 'aSelfLink' +-- +-- * 'aName' +-- +-- * 'aCreationTimestamp' +-- +-- * 'aAutoscalingPolicy' +-- +-- * 'aId' +-- +-- * 'aDescription' +-- +-- * 'aTarget' +autoscaler + :: Autoscaler +autoscaler = + Autoscaler + { _aKind = "compute#autoscaler" + , _aSelfLink = Nothing + , _aName = Nothing + , _aCreationTimestamp = Nothing + , _aAutoscalingPolicy = Nothing + , _aId = Nothing + , _aDescription = Nothing + , _aTarget = Nothing + } + +-- | Type of resource. +aKind :: Lens' Autoscaler Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | [Output Only] A self-link to the Autoscaler configuration resource. +aSelfLink :: Lens' Autoscaler (Maybe Text) +aSelfLink + = lens _aSelfLink (\ s a -> s{_aSelfLink = a}) + +-- | Name of the Autoscaler resource. Must be unique per project and zone. +aName :: Lens' Autoscaler (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +aCreationTimestamp :: Lens' Autoscaler (Maybe Text) +aCreationTimestamp + = lens _aCreationTimestamp + (\ s a -> s{_aCreationTimestamp = a}) + +-- | Configuration parameters for autoscaling algorithm. +aAutoscalingPolicy :: Lens' Autoscaler (Maybe (Maybe AutoscalingPolicy)) +aAutoscalingPolicy + = lens _aAutoscalingPolicy + (\ s a -> s{_aAutoscalingPolicy = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +aId :: Lens' Autoscaler (Maybe Word64) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | An optional textual description of the resource provided by the client. +aDescription :: Lens' Autoscaler (Maybe Text) +aDescription + = lens _aDescription (\ s a -> s{_aDescription = a}) + +-- | URL to the entity which will be autoscaled. Currently the only supported +-- value is ReplicaPool?s URL. Note: it is illegal to specify multiple +-- Autoscalers for the same target. +aTarget :: Lens' Autoscaler (Maybe Text) +aTarget = lens _aTarget (\ s a -> s{_aTarget = a}) + +instance FromJSON Autoscaler where + parseJSON + = withObject "Autoscaler" + (\ o -> + Autoscaler <$> + (o .:? "kind" .!= "compute#autoscaler") <*> + (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "autoscalingPolicy") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "target")) + +instance ToJSON Autoscaler where + toJSON Autoscaler{..} + = object + (catMaybes + [Just ("kind" .= _aKind), + ("selfLink" .=) <$> _aSelfLink, + ("name" .=) <$> _aName, + ("creationTimestamp" .=) <$> _aCreationTimestamp, + ("autoscalingPolicy" .=) <$> _aAutoscalingPolicy, + ("id" .=) <$> _aId, + ("description" .=) <$> _aDescription, + ("target" .=) <$> _aTarget]) + +-- | CPU utilization policy. +-- +-- /See:/ 'autoscalingPolicyCPUUtilization' smart constructor. +newtype AutoscalingPolicyCPUUtilization = AutoscalingPolicyCPUUtilization + { _apcuUtilizationTarget :: Maybe Double + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyCPUUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apcuUtilizationTarget' +autoscalingPolicyCPUUtilization + :: AutoscalingPolicyCPUUtilization +autoscalingPolicyCPUUtilization = + AutoscalingPolicyCPUUtilization + { _apcuUtilizationTarget = Nothing + } + +-- | The target utilization that the Autoscaler should maintain. It is +-- represented as a fraction of used cores. For example: 6 cores used in +-- 8-core VM are represented here as 0.75. Must be a float value between +-- (0, 1]. If not defined, the default is 0.8. +apcuUtilizationTarget :: Lens' AutoscalingPolicyCPUUtilization (Maybe Double) +apcuUtilizationTarget + = lens _apcuUtilizationTarget + (\ s a -> s{_apcuUtilizationTarget = a}) + +instance FromJSON AutoscalingPolicyCPUUtilization + where + parseJSON + = withObject "AutoscalingPolicyCPUUtilization" + (\ o -> + AutoscalingPolicyCPUUtilization <$> + (o .:? "utilizationTarget")) + +instance ToJSON AutoscalingPolicyCPUUtilization where + toJSON AutoscalingPolicyCPUUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _apcuUtilizationTarget]) diff --git a/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Sum.hs b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Sum.hs new file mode 100644 index 000000000..a0286e875 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/ComputeAutoscaler/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeAutoscaler.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeAutoscaler.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Delete.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Delete.hs new file mode 100644 index 000000000..750f539cb --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Delete.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified Autoscaler resource. +-- +-- /See:/ for @AutoscalerAutoscalersDelete@. +module Autoscaler.Autoscalers.Delete + ( + -- * REST Resource + AutoscalersDeleteAPI + + -- * Creating a Request + , autoscalersDelete + , AutoscalersDelete + + -- * Request Lenses + , adQuotaUser + , adPrettyPrint + , adProject + , adUserIp + , adZone + , adKey + , adAutoscaler + , adOauthToken + , adFields + , adAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersDelete@ which the +-- 'AutoscalersDelete' request conforms to. +type AutoscalersDeleteAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Delete '[JSON] Operation + +-- | Deletes the specified Autoscaler resource. +-- +-- /See:/ 'autoscalersDelete' smart constructor. +data AutoscalersDelete = AutoscalersDelete + { _adQuotaUser :: !(Maybe Text) + , _adPrettyPrint :: !Bool + , _adProject :: !Text + , _adUserIp :: !(Maybe Text) + , _adZone :: !Text + , _adKey :: !(Maybe Text) + , _adAutoscaler :: !Text + , _adOauthToken :: !(Maybe Text) + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adPrettyPrint' +-- +-- * 'adProject' +-- +-- * 'adUserIp' +-- +-- * 'adZone' +-- +-- * 'adKey' +-- +-- * 'adAutoscaler' +-- +-- * 'adOauthToken' +-- +-- * 'adFields' +-- +-- * 'adAlt' +autoscalersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersDelete +autoscalersDelete pAdProject_ pAdZone_ pAdAutoscaler_ = + AutoscalersDelete + { _adQuotaUser = Nothing + , _adPrettyPrint = True + , _adProject = pAdProject_ + , _adUserIp = Nothing + , _adZone = pAdZone_ + , _adKey = Nothing + , _adAutoscaler = pAdAutoscaler_ + , _adOauthToken = Nothing + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' AutoscalersDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' AutoscalersDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +adProject :: Lens' AutoscalersDelete' Text +adProject + = lens _adProject (\ s a -> s{_adProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' AutoscalersDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | Zone name of Autoscaler resource. +adZone :: Lens' AutoscalersDelete' Text +adZone = lens _adZone (\ s a -> s{_adZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' AutoscalersDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | Name of the Autoscaler resource. +adAutoscaler :: Lens' AutoscalersDelete' Text +adAutoscaler + = lens _adAutoscaler (\ s a -> s{_adAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' AutoscalersDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' AutoscalersDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' AutoscalersDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest AutoscalersDelete' where + type Rs AutoscalersDelete' = Operation + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersDelete{..} + = go _adQuotaUser _adPrettyPrint _adProject _adUserIp + _adZone + _adKey + _adAutoscaler + _adOauthToken + _adFields + _adAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersDeleteAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Get.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Get.hs new file mode 100644 index 000000000..87ff9c518 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified Autoscaler resource. +-- +-- /See:/ for @AutoscalerAutoscalersGet@. +module Autoscaler.Autoscalers.Get + ( + -- * REST Resource + AutoscalersGetAPI + + -- * Creating a Request + , autoscalersGet + , AutoscalersGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agProject + , agUserIp + , agZone + , agKey + , agAutoscaler + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersGet@ which the +-- 'AutoscalersGet' request conforms to. +type AutoscalersGetAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Get '[JSON] Autoscaler + +-- | Gets the specified Autoscaler resource. +-- +-- /See:/ 'autoscalersGet' smart constructor. +data AutoscalersGet = AutoscalersGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agProject :: !Text + , _agUserIp :: !(Maybe Text) + , _agZone :: !Text + , _agKey :: !(Maybe Text) + , _agAutoscaler :: !Text + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agProject' +-- +-- * 'agUserIp' +-- +-- * 'agZone' +-- +-- * 'agKey' +-- +-- * 'agAutoscaler' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +autoscalersGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersGet +autoscalersGet pAgProject_ pAgZone_ pAgAutoscaler_ = + AutoscalersGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agProject = pAgProject_ + , _agUserIp = Nothing + , _agZone = pAgZone_ + , _agKey = Nothing + , _agAutoscaler = pAgAutoscaler_ + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AutoscalersGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AutoscalersGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +agProject :: Lens' AutoscalersGet' Text +agProject + = lens _agProject (\ s a -> s{_agProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AutoscalersGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | Zone name of Autoscaler resource. +agZone :: Lens' AutoscalersGet' Text +agZone = lens _agZone (\ s a -> s{_agZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AutoscalersGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | Name of the Autoscaler resource. +agAutoscaler :: Lens' AutoscalersGet' Text +agAutoscaler + = lens _agAutoscaler (\ s a -> s{_agAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AutoscalersGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AutoscalersGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AutoscalersGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AutoscalersGet' where + type Rs AutoscalersGet' = Autoscaler + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersGet{..} + = go _agQuotaUser _agPrettyPrint _agProject _agUserIp + _agZone + _agKey + _agAutoscaler + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AutoscalersGetAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Insert.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Insert.hs new file mode 100644 index 000000000..31ba5f2f3 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Insert.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds new Autoscaler resource. +-- +-- /See:/ for @AutoscalerAutoscalersInsert@. +module Autoscaler.Autoscalers.Insert + ( + -- * REST Resource + AutoscalersInsertAPI + + -- * Creating a Request + , autoscalersInsert + , AutoscalersInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiProject + , aiUserIp + , aiZone + , aiKey + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersInsert@ which the +-- 'AutoscalersInsert' request conforms to. +type AutoscalersInsertAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> Post '[JSON] Operation + +-- | Adds new Autoscaler resource. +-- +-- /See:/ 'autoscalersInsert' smart constructor. +data AutoscalersInsert = AutoscalersInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiProject :: !Text + , _aiUserIp :: !(Maybe Text) + , _aiZone :: !Text + , _aiKey :: !(Maybe Text) + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiProject' +-- +-- * 'aiUserIp' +-- +-- * 'aiZone' +-- +-- * 'aiKey' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +autoscalersInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> AutoscalersInsert +autoscalersInsert pAiProject_ pAiZone_ = + AutoscalersInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiProject = pAiProject_ + , _aiUserIp = Nothing + , _aiZone = pAiZone_ + , _aiKey = Nothing + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' AutoscalersInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' AutoscalersInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +aiProject :: Lens' AutoscalersInsert' Text +aiProject + = lens _aiProject (\ s a -> s{_aiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' AutoscalersInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | Zone name of Autoscaler resource. +aiZone :: Lens' AutoscalersInsert' Text +aiZone = lens _aiZone (\ s a -> s{_aiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' AutoscalersInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' AutoscalersInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' AutoscalersInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' AutoscalersInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest AutoscalersInsert' where + type Rs AutoscalersInsert' = Operation + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiProject _aiUserIp + _aiZone + _aiKey + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersInsertAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/List.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/List.hs new file mode 100644 index 000000000..28c29ea99 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/List.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all Autoscaler resources in this zone. +-- +-- /See:/ for @AutoscalerAutoscalersList@. +module Autoscaler.Autoscalers.List + ( + -- * REST Resource + AutoscalersListAPI + + -- * Creating a Request + , autoscalersList + , AutoscalersList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alProject + , alUserIp + , alZone + , alKey + , alFilter + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersList@ which the +-- 'AutoscalersList' request conforms to. +type AutoscalersListAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AutoscalerListResponse + +-- | Lists all Autoscaler resources in this zone. +-- +-- /See:/ 'autoscalersList' smart constructor. +data AutoscalersList = AutoscalersList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alProject :: !Text + , _alUserIp :: !(Maybe Text) + , _alZone :: !Text + , _alKey :: !(Maybe Text) + , _alFilter :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !Word32 + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alProject' +-- +-- * 'alUserIp' +-- +-- * 'alZone' +-- +-- * 'alKey' +-- +-- * 'alFilter' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +autoscalersList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> AutoscalersList +autoscalersList pAlProject_ pAlZone_ = + AutoscalersList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alProject = pAlProject_ + , _alUserIp = Nothing + , _alZone = pAlZone_ + , _alKey = Nothing + , _alFilter = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = 500 + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AutoscalersList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AutoscalersList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +alProject :: Lens' AutoscalersList' Text +alProject + = lens _alProject (\ s a -> s{_alProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AutoscalersList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Zone name of Autoscaler resource. +alZone :: Lens' AutoscalersList' Text +alZone = lens _alZone (\ s a -> s{_alZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AutoscalersList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +alFilter :: Lens' AutoscalersList' (Maybe Text) +alFilter = lens _alFilter (\ s a -> s{_alFilter = a}) + +alPageToken :: Lens' AutoscalersList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AutoscalersList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +alMaxResults :: Lens' AutoscalersList' Word32 +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AutoscalersList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AutoscalersList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AutoscalersList' where + type Rs AutoscalersList' = AutoscalerListResponse + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersList{..} + = go _alQuotaUser _alPrettyPrint _alProject _alUserIp + _alZone + _alKey + _alFilter + _alPageToken + _alOauthToken + (Just _alMaxResults) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AutoscalersListAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Patch.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Patch.hs new file mode 100644 index 000000000..a62d4594d --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Patch.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the Autoscaler resource. This method +-- supports patch semantics. +-- +-- /See:/ for @AutoscalerAutoscalersPatch@. +module Autoscaler.Autoscalers.Patch + ( + -- * REST Resource + AutoscalersPatchAPI + + -- * Creating a Request + , autoscalersPatch + , AutoscalersPatch + + -- * Request Lenses + , apQuotaUser + , apPrettyPrint + , apProject + , apUserIp + , apZone + , apKey + , apAutoscaler + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersPatch@ which the +-- 'AutoscalersPatch' request conforms to. +type AutoscalersPatchAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Patch '[JSON] Operation + +-- | Update the entire content of the Autoscaler resource. This method +-- supports patch semantics. +-- +-- /See:/ 'autoscalersPatch' smart constructor. +data AutoscalersPatch = AutoscalersPatch + { _apQuotaUser :: !(Maybe Text) + , _apPrettyPrint :: !Bool + , _apProject :: !Text + , _apUserIp :: !(Maybe Text) + , _apZone :: !Text + , _apKey :: !(Maybe Text) + , _apAutoscaler :: !Text + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apPrettyPrint' +-- +-- * 'apProject' +-- +-- * 'apUserIp' +-- +-- * 'apZone' +-- +-- * 'apKey' +-- +-- * 'apAutoscaler' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +autoscalersPatch + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersPatch +autoscalersPatch pApProject_ pApZone_ pApAutoscaler_ = + AutoscalersPatch + { _apQuotaUser = Nothing + , _apPrettyPrint = True + , _apProject = pApProject_ + , _apUserIp = Nothing + , _apZone = pApZone_ + , _apKey = Nothing + , _apAutoscaler = pApAutoscaler_ + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' AutoscalersPatch' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' AutoscalersPatch' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +apProject :: Lens' AutoscalersPatch' Text +apProject + = lens _apProject (\ s a -> s{_apProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' AutoscalersPatch' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | Zone name of Autoscaler resource. +apZone :: Lens' AutoscalersPatch' Text +apZone = lens _apZone (\ s a -> s{_apZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' AutoscalersPatch' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | Name of the Autoscaler resource. +apAutoscaler :: Lens' AutoscalersPatch' Text +apAutoscaler + = lens _apAutoscaler (\ s a -> s{_apAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' AutoscalersPatch' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' AutoscalersPatch' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' AutoscalersPatch' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest AutoscalersPatch' where + type Rs AutoscalersPatch' = Operation + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersPatch{..} + = go _apQuotaUser _apPrettyPrint _apProject _apUserIp + _apZone + _apKey + _apAutoscaler + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersPatchAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Update.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Update.hs new file mode 100644 index 000000000..04253b6a5 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Update.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Autoscalers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the Autoscaler resource. +-- +-- /See:/ for @AutoscalerAutoscalersUpdate@. +module Autoscaler.Autoscalers.Update + ( + -- * REST Resource + AutoscalersUpdateAPI + + -- * Creating a Request + , autoscalersUpdate + , AutoscalersUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auProject + , auUserIp + , auZone + , auKey + , auAutoscaler + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerAutoscalersUpdate@ which the +-- 'AutoscalersUpdate' request conforms to. +type AutoscalersUpdateAPI = + "projects" :> + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Put '[JSON] Operation + +-- | Update the entire content of the Autoscaler resource. +-- +-- /See:/ 'autoscalersUpdate' smart constructor. +data AutoscalersUpdate = AutoscalersUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auProject :: !Text + , _auUserIp :: !(Maybe Text) + , _auZone :: !Text + , _auKey :: !(Maybe Text) + , _auAutoscaler :: !Text + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auProject' +-- +-- * 'auUserIp' +-- +-- * 'auZone' +-- +-- * 'auKey' +-- +-- * 'auAutoscaler' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +autoscalersUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersUpdate +autoscalersUpdate pAuProject_ pAuZone_ pAuAutoscaler_ = + AutoscalersUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auProject = pAuProject_ + , _auUserIp = Nothing + , _auZone = pAuZone_ + , _auKey = Nothing + , _auAutoscaler = pAuAutoscaler_ + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AutoscalersUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AutoscalersUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | Project ID of Autoscaler resource. +auProject :: Lens' AutoscalersUpdate' Text +auProject + = lens _auProject (\ s a -> s{_auProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AutoscalersUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | Zone name of Autoscaler resource. +auZone :: Lens' AutoscalersUpdate' Text +auZone = lens _auZone (\ s a -> s{_auZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AutoscalersUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | Name of the Autoscaler resource. +auAutoscaler :: Lens' AutoscalersUpdate' Text +auAutoscaler + = lens _auAutoscaler (\ s a -> s{_auAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AutoscalersUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AutoscalersUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AutoscalersUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AutoscalersUpdate' where + type Rs AutoscalersUpdate' = Operation + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u AutoscalersUpdate{..} + = go _auQuotaUser _auPrettyPrint _auProject _auUserIp + _auZone + _auKey + _auAutoscaler + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersUpdateAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Delete.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Delete.hs new file mode 100644 index 000000000..907b76b99 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Delete.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.ZoneOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified zone-specific operation resource. +-- +-- /See:/ for @AutoscalerZoneOperationsDelete@. +module Autoscaler.ZoneOperations.Delete + ( + -- * REST Resource + ZoneOperationsDeleteAPI + + -- * Creating a Request + , zoneOperationsDelete + , ZoneOperationsDelete + + -- * Request Lenses + , zodQuotaUser + , zodPrettyPrint + , zodProject + , zodOperation + , zodUserIp + , zodZone + , zodKey + , zodOauthToken + , zodFields + , zodAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerZoneOperationsDelete@ which the +-- 'ZoneOperationsDelete' request conforms to. +type ZoneOperationsDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Delete '[JSON] () + +-- | Deletes the specified zone-specific operation resource. +-- +-- /See:/ 'zoneOperationsDelete' smart constructor. +data ZoneOperationsDelete = ZoneOperationsDelete + { _zodQuotaUser :: !(Maybe Text) + , _zodPrettyPrint :: !Bool + , _zodProject :: !Text + , _zodOperation :: !Text + , _zodUserIp :: !(Maybe Text) + , _zodZone :: !Text + , _zodKey :: !(Maybe Text) + , _zodOauthToken :: !(Maybe Text) + , _zodFields :: !(Maybe Text) + , _zodAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zodQuotaUser' +-- +-- * 'zodPrettyPrint' +-- +-- * 'zodProject' +-- +-- * 'zodOperation' +-- +-- * 'zodUserIp' +-- +-- * 'zodZone' +-- +-- * 'zodKey' +-- +-- * 'zodOauthToken' +-- +-- * 'zodFields' +-- +-- * 'zodAlt' +zoneOperationsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsDelete +zoneOperationsDelete pZodProject_ pZodOperation_ pZodZone_ = + ZoneOperationsDelete + { _zodQuotaUser = Nothing + , _zodPrettyPrint = True + , _zodProject = pZodProject_ + , _zodOperation = pZodOperation_ + , _zodUserIp = Nothing + , _zodZone = pZodZone_ + , _zodKey = Nothing + , _zodOauthToken = Nothing + , _zodFields = Nothing + , _zodAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zodQuotaUser :: Lens' ZoneOperationsDelete' (Maybe Text) +zodQuotaUser + = lens _zodQuotaUser (\ s a -> s{_zodQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zodPrettyPrint :: Lens' ZoneOperationsDelete' Bool +zodPrettyPrint + = lens _zodPrettyPrint + (\ s a -> s{_zodPrettyPrint = a}) + +zodProject :: Lens' ZoneOperationsDelete' Text +zodProject + = lens _zodProject (\ s a -> s{_zodProject = a}) + +zodOperation :: Lens' ZoneOperationsDelete' Text +zodOperation + = lens _zodOperation (\ s a -> s{_zodOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zodUserIp :: Lens' ZoneOperationsDelete' (Maybe Text) +zodUserIp + = lens _zodUserIp (\ s a -> s{_zodUserIp = a}) + +zodZone :: Lens' ZoneOperationsDelete' Text +zodZone = lens _zodZone (\ s a -> s{_zodZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zodKey :: Lens' ZoneOperationsDelete' (Maybe Text) +zodKey = lens _zodKey (\ s a -> s{_zodKey = a}) + +-- | OAuth 2.0 token for the current user. +zodOauthToken :: Lens' ZoneOperationsDelete' (Maybe Text) +zodOauthToken + = lens _zodOauthToken + (\ s a -> s{_zodOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zodFields :: Lens' ZoneOperationsDelete' (Maybe Text) +zodFields + = lens _zodFields (\ s a -> s{_zodFields = a}) + +-- | Data format for the response. +zodAlt :: Lens' ZoneOperationsDelete' Text +zodAlt = lens _zodAlt (\ s a -> s{_zodAlt = a}) + +instance GoogleRequest ZoneOperationsDelete' where + type Rs ZoneOperationsDelete' = () + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u ZoneOperationsDelete{..} + = go _zodQuotaUser _zodPrettyPrint _zodProject + _zodOperation + _zodUserIp + _zodZone + _zodKey + _zodOauthToken + _zodFields + _zodAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsDeleteAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Get.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Get.hs new file mode 100644 index 000000000..cb23c6c1e --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/Get.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.ZoneOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ for @AutoscalerZoneOperationsGet@. +module Autoscaler.ZoneOperations.Get + ( + -- * REST Resource + ZoneOperationsGetAPI + + -- * Creating a Request + , zoneOperationsGet + , ZoneOperationsGet + + -- * Request Lenses + , zogQuotaUser + , zogPrettyPrint + , zogProject + , zogOperation + , zogUserIp + , zogZone + , zogKey + , zogOauthToken + , zogFields + , zogAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerZoneOperationsGet@ which the +-- 'ZoneOperationsGet' request conforms to. +type ZoneOperationsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ 'zoneOperationsGet' smart constructor. +data ZoneOperationsGet = ZoneOperationsGet + { _zogQuotaUser :: !(Maybe Text) + , _zogPrettyPrint :: !Bool + , _zogProject :: !Text + , _zogOperation :: !Text + , _zogUserIp :: !(Maybe Text) + , _zogZone :: !Text + , _zogKey :: !(Maybe Text) + , _zogOauthToken :: !(Maybe Text) + , _zogFields :: !(Maybe Text) + , _zogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zogQuotaUser' +-- +-- * 'zogPrettyPrint' +-- +-- * 'zogProject' +-- +-- * 'zogOperation' +-- +-- * 'zogUserIp' +-- +-- * 'zogZone' +-- +-- * 'zogKey' +-- +-- * 'zogOauthToken' +-- +-- * 'zogFields' +-- +-- * 'zogAlt' +zoneOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsGet +zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ = + ZoneOperationsGet + { _zogQuotaUser = Nothing + , _zogPrettyPrint = True + , _zogProject = pZogProject_ + , _zogOperation = pZogOperation_ + , _zogUserIp = Nothing + , _zogZone = pZogZone_ + , _zogKey = Nothing + , _zogOauthToken = Nothing + , _zogFields = Nothing + , _zogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zogQuotaUser :: Lens' ZoneOperationsGet' (Maybe Text) +zogQuotaUser + = lens _zogQuotaUser (\ s a -> s{_zogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zogPrettyPrint :: Lens' ZoneOperationsGet' Bool +zogPrettyPrint + = lens _zogPrettyPrint + (\ s a -> s{_zogPrettyPrint = a}) + +zogProject :: Lens' ZoneOperationsGet' Text +zogProject + = lens _zogProject (\ s a -> s{_zogProject = a}) + +zogOperation :: Lens' ZoneOperationsGet' Text +zogOperation + = lens _zogOperation (\ s a -> s{_zogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zogUserIp :: Lens' ZoneOperationsGet' (Maybe Text) +zogUserIp + = lens _zogUserIp (\ s a -> s{_zogUserIp = a}) + +zogZone :: Lens' ZoneOperationsGet' Text +zogZone = lens _zogZone (\ s a -> s{_zogZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zogKey :: Lens' ZoneOperationsGet' (Maybe Text) +zogKey = lens _zogKey (\ s a -> s{_zogKey = a}) + +-- | OAuth 2.0 token for the current user. +zogOauthToken :: Lens' ZoneOperationsGet' (Maybe Text) +zogOauthToken + = lens _zogOauthToken + (\ s a -> s{_zogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zogFields :: Lens' ZoneOperationsGet' (Maybe Text) +zogFields + = lens _zogFields (\ s a -> s{_zogFields = a}) + +-- | Data format for the response. +zogAlt :: Lens' ZoneOperationsGet' Text +zogAlt = lens _zogAlt (\ s a -> s{_zogAlt = a}) + +instance GoogleRequest ZoneOperationsGet' where + type Rs ZoneOperationsGet' = Operation + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u ZoneOperationsGet{..} + = go _zogQuotaUser _zogPrettyPrint _zogProject + _zogOperation + _zogUserIp + _zogZone + _zogKey + _zogOauthToken + _zogFields + _zogAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsGetAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/List.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/List.hs new file mode 100644 index 000000000..4e95032bc --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/ZoneOperations/List.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.ZoneOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ for @AutoscalerZoneOperationsList@. +module Autoscaler.ZoneOperations.List + ( + -- * REST Resource + ZoneOperationsListAPI + + -- * Creating a Request + , zoneOperationsList + , ZoneOperationsList + + -- * Request Lenses + , zolQuotaUser + , zolPrettyPrint + , zolProject + , zolUserIp + , zolZone + , zolKey + , zolFilter + , zolPageToken + , zolOauthToken + , zolMaxResults + , zolFields + , zolAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerZoneOperationsList@ which the +-- 'ZoneOperationsList' request conforms to. +type ZoneOperationsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ 'zoneOperationsList' smart constructor. +data ZoneOperationsList = ZoneOperationsList + { _zolQuotaUser :: !(Maybe Text) + , _zolPrettyPrint :: !Bool + , _zolProject :: !Text + , _zolUserIp :: !(Maybe Text) + , _zolZone :: !Text + , _zolKey :: !(Maybe Text) + , _zolFilter :: !(Maybe Text) + , _zolPageToken :: !(Maybe Text) + , _zolOauthToken :: !(Maybe Text) + , _zolMaxResults :: !Word32 + , _zolFields :: !(Maybe Text) + , _zolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zolQuotaUser' +-- +-- * 'zolPrettyPrint' +-- +-- * 'zolProject' +-- +-- * 'zolUserIp' +-- +-- * 'zolZone' +-- +-- * 'zolKey' +-- +-- * 'zolFilter' +-- +-- * 'zolPageToken' +-- +-- * 'zolOauthToken' +-- +-- * 'zolMaxResults' +-- +-- * 'zolFields' +-- +-- * 'zolAlt' +zoneOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneOperationsList +zoneOperationsList pZolProject_ pZolZone_ = + ZoneOperationsList + { _zolQuotaUser = Nothing + , _zolPrettyPrint = True + , _zolProject = pZolProject_ + , _zolUserIp = Nothing + , _zolZone = pZolZone_ + , _zolKey = Nothing + , _zolFilter = Nothing + , _zolPageToken = Nothing + , _zolOauthToken = Nothing + , _zolMaxResults = 500 + , _zolFields = Nothing + , _zolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zolQuotaUser :: Lens' ZoneOperationsList' (Maybe Text) +zolQuotaUser + = lens _zolQuotaUser (\ s a -> s{_zolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zolPrettyPrint :: Lens' ZoneOperationsList' Bool +zolPrettyPrint + = lens _zolPrettyPrint + (\ s a -> s{_zolPrettyPrint = a}) + +zolProject :: Lens' ZoneOperationsList' Text +zolProject + = lens _zolProject (\ s a -> s{_zolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zolUserIp :: Lens' ZoneOperationsList' (Maybe Text) +zolUserIp + = lens _zolUserIp (\ s a -> s{_zolUserIp = a}) + +zolZone :: Lens' ZoneOperationsList' Text +zolZone = lens _zolZone (\ s a -> s{_zolZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zolKey :: Lens' ZoneOperationsList' (Maybe Text) +zolKey = lens _zolKey (\ s a -> s{_zolKey = a}) + +zolFilter :: Lens' ZoneOperationsList' (Maybe Text) +zolFilter + = lens _zolFilter (\ s a -> s{_zolFilter = a}) + +zolPageToken :: Lens' ZoneOperationsList' (Maybe Text) +zolPageToken + = lens _zolPageToken (\ s a -> s{_zolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zolOauthToken :: Lens' ZoneOperationsList' (Maybe Text) +zolOauthToken + = lens _zolOauthToken + (\ s a -> s{_zolOauthToken = a}) + +zolMaxResults :: Lens' ZoneOperationsList' Word32 +zolMaxResults + = lens _zolMaxResults + (\ s a -> s{_zolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zolFields :: Lens' ZoneOperationsList' (Maybe Text) +zolFields + = lens _zolFields (\ s a -> s{_zolFields = a}) + +-- | Data format for the response. +zolAlt :: Lens' ZoneOperationsList' Text +zolAlt = lens _zolAlt (\ s a -> s{_zolAlt = a}) + +instance GoogleRequest ZoneOperationsList' where + type Rs ZoneOperationsList' = OperationList + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u ZoneOperationsList{..} + = go _zolQuotaUser _zolPrettyPrint _zolProject + _zolUserIp + _zolZone + _zolKey + _zolFilter + _zolPageToken + _zolOauthToken + (Just _zolMaxResults) + _zolFields + _zolAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsListAPI) + r + u diff --git a/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs new file mode 100644 index 000000000..e3201b786 --- /dev/null +++ b/gogol-compute-autoscaler/gen/Network/Google/Resource/Autoscaler/Zones/List.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Autoscaler.Zones.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | +-- +-- /See:/ for @AutoscalerZonesList@. +module Autoscaler.Zones.List + ( + -- * REST Resource + ZonesListAPI + + -- * Creating a Request + , zonesList + , ZonesList + + -- * Request Lenses + , zlQuotaUser + , zlPrettyPrint + , zlProject + , zlUserIp + , zlKey + , zlFilter + , zlPageToken + , zlOauthToken + , zlMaxResults + , zlFields + , zlAlt + ) where + +import Network.Google.ComputeAutoscaler.Types +import Network.Google.Prelude + +-- | A resource alias for @AutoscalerZonesList@ which the +-- 'ZonesList' request conforms to. +type ZonesListAPI = + Capture "project" Text :> + "zones" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ZoneList + +-- | +-- +-- /See:/ 'zonesList' smart constructor. +data ZonesList = ZonesList + { _zlQuotaUser :: !(Maybe Text) + , _zlPrettyPrint :: !Bool + , _zlProject :: !Text + , _zlUserIp :: !(Maybe Text) + , _zlKey :: !(Maybe Text) + , _zlFilter :: !(Maybe Text) + , _zlPageToken :: !(Maybe Text) + , _zlOauthToken :: !(Maybe Text) + , _zlMaxResults :: !Word32 + , _zlFields :: !(Maybe Text) + , _zlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZonesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zlQuotaUser' +-- +-- * 'zlPrettyPrint' +-- +-- * 'zlProject' +-- +-- * 'zlUserIp' +-- +-- * 'zlKey' +-- +-- * 'zlFilter' +-- +-- * 'zlPageToken' +-- +-- * 'zlOauthToken' +-- +-- * 'zlMaxResults' +-- +-- * 'zlFields' +-- +-- * 'zlAlt' +zonesList + :: Text -- ^ 'project' + -> ZonesList +zonesList pZlProject_ = + ZonesList + { _zlQuotaUser = Nothing + , _zlPrettyPrint = True + , _zlProject = pZlProject_ + , _zlUserIp = Nothing + , _zlKey = Nothing + , _zlFilter = Nothing + , _zlPageToken = Nothing + , _zlOauthToken = Nothing + , _zlMaxResults = 500 + , _zlFields = Nothing + , _zlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zlQuotaUser :: Lens' ZonesList' (Maybe Text) +zlQuotaUser + = lens _zlQuotaUser (\ s a -> s{_zlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zlPrettyPrint :: Lens' ZonesList' Bool +zlPrettyPrint + = lens _zlPrettyPrint + (\ s a -> s{_zlPrettyPrint = a}) + +zlProject :: Lens' ZonesList' Text +zlProject + = lens _zlProject (\ s a -> s{_zlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zlUserIp :: Lens' ZonesList' (Maybe Text) +zlUserIp = lens _zlUserIp (\ s a -> s{_zlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zlKey :: Lens' ZonesList' (Maybe Text) +zlKey = lens _zlKey (\ s a -> s{_zlKey = a}) + +zlFilter :: Lens' ZonesList' (Maybe Text) +zlFilter = lens _zlFilter (\ s a -> s{_zlFilter = a}) + +zlPageToken :: Lens' ZonesList' (Maybe Text) +zlPageToken + = lens _zlPageToken (\ s a -> s{_zlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zlOauthToken :: Lens' ZonesList' (Maybe Text) +zlOauthToken + = lens _zlOauthToken (\ s a -> s{_zlOauthToken = a}) + +zlMaxResults :: Lens' ZonesList' Word32 +zlMaxResults + = lens _zlMaxResults (\ s a -> s{_zlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zlFields :: Lens' ZonesList' (Maybe Text) +zlFields = lens _zlFields (\ s a -> s{_zlFields = a}) + +-- | Data format for the response. +zlAlt :: Lens' ZonesList' Text +zlAlt = lens _zlAlt (\ s a -> s{_zlAlt = a}) + +instance GoogleRequest ZonesList' where + type Rs ZonesList' = ZoneList + request + = requestWithRoute defReq computeAutoscalerURL + requestWithRoute r u ZonesList{..} + = go _zlQuotaUser _zlPrettyPrint _zlProject _zlUserIp + _zlKey + _zlFilter + _zlPageToken + _zlOauthToken + (Just _zlMaxResults) + _zlFields + _zlAlt + where go + = clientWithRoute (Proxy :: Proxy ZonesListAPI) r u diff --git a/gogol-compute-autoscaler/gogol-compute-autoscaler.cabal b/gogol-compute-autoscaler/gogol-compute-autoscaler.cabal new file mode 100644 index 000000000..b3857bf86 --- /dev/null +++ b/gogol-compute-autoscaler/gogol-compute-autoscaler.cabal @@ -0,0 +1,53 @@ +name: gogol-compute-autoscaler +version: 0.0.1 +synopsis: Google Compute Engine Autoscaler API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Compute Engine Autoscaler API provides autoscaling for groups + of Cloud VMs. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.ComputeAutoscaler + , Network.Google.ComputeAutoscaler.Types + , Network.Google.Resource.Autoscaler.Autoscalers.Delete + , Network.Google.Resource.Autoscaler.Autoscalers.Get + , Network.Google.Resource.Autoscaler.Autoscalers.Insert + , Network.Google.Resource.Autoscaler.Autoscalers.List + , Network.Google.Resource.Autoscaler.Autoscalers.Patch + , Network.Google.Resource.Autoscaler.Autoscalers.Update + , Network.Google.Resource.Autoscaler.ZoneOperations.Delete + , Network.Google.Resource.Autoscaler.ZoneOperations.Get + , Network.Google.Resource.Autoscaler.ZoneOperations.List + , Network.Google.Resource.Autoscaler.Zones.List + + other-modules: + Network.Google.ComputeAutoscaler.Types.Product + , Network.Google.ComputeAutoscaler.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-compute-autoscaler/src/.gitkeep b/gogol-compute-autoscaler/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-compute-useraccounts/LICENSE b/gogol-compute-useraccounts/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-compute-useraccounts/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-compute-useraccounts/Makefile b/gogol-compute-useraccounts/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-compute-useraccounts/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-compute-useraccounts/README.md b/gogol-compute-useraccounts/README.md new file mode 100644 index 000000000..bd8f7ffe1 --- /dev/null +++ b/gogol-compute-useraccounts/README.md @@ -0,0 +1,28 @@ +# gogol-compute-useraccounts + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Cloud User Accounts API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-compute-useraccounts` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-compute-useraccounts/Setup.hs b/gogol-compute-useraccounts/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-compute-useraccounts/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts.hs b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts.hs new file mode 100644 index 000000000..4426b1545 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts.hs @@ -0,0 +1,248 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.ComputeUserAccounts +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for the Google Cloud User Accounts service. +-- +-- /See:/ +module Network.Google.ComputeUserAccounts + ( + -- * API + ComputeUserAccountsAPI + , computeUserAccountsAPI + , computeUserAccountsURL + + -- * Service Methods + + -- * REST Resources + + -- ** ClouduseraccountsGlobalAccountsOperationsDelete + , module Clouduseraccounts.GlobalAccountsOperations.Delete + + -- ** ClouduseraccountsGlobalAccountsOperationsGet + , module Clouduseraccounts.GlobalAccountsOperations.Get + + -- ** ClouduseraccountsGlobalAccountsOperationsList + , module Clouduseraccounts.GlobalAccountsOperations.List + + -- ** ClouduseraccountsGroupsAddMember + , module Clouduseraccounts.Groups.AddMember + + -- ** ClouduseraccountsGroupsDelete + , module Clouduseraccounts.Groups.Delete + + -- ** ClouduseraccountsGroupsGet + , module Clouduseraccounts.Groups.Get + + -- ** ClouduseraccountsGroupsInsert + , module Clouduseraccounts.Groups.Insert + + -- ** ClouduseraccountsGroupsList + , module Clouduseraccounts.Groups.List + + -- ** ClouduseraccountsGroupsRemoveMember + , module Clouduseraccounts.Groups.RemoveMember + + -- ** ClouduseraccountsLinuxGetAuthorizedKeysView + , module Clouduseraccounts.Linux.GetAuthorizedKeysView + + -- ** ClouduseraccountsLinuxGetLinuxAccountViews + , module Clouduseraccounts.Linux.GetLinuxAccountViews + + -- ** ClouduseraccountsUsersAddPublicKey + , module Clouduseraccounts.Users.AddPublicKey + + -- ** ClouduseraccountsUsersDelete + , module Clouduseraccounts.Users.Delete + + -- ** ClouduseraccountsUsersGet + , module Clouduseraccounts.Users.Get + + -- ** ClouduseraccountsUsersInsert + , module Clouduseraccounts.Users.Insert + + -- ** ClouduseraccountsUsersList + , module Clouduseraccounts.Users.List + + -- ** ClouduseraccountsUsersRemovePublicKey + , module Clouduseraccounts.Users.RemovePublicKey + + -- * Types + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** Group + , Group + , group' + , gKind + , gMembers + , gSelfLink + , gName + , gCreationTimestamp + , gId + , gDescription + + -- ** GroupList + , GroupList + , groupList + , glNextPageToken + , glKind + , glItems + , glSelfLink + , glId + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** UserList + , UserList + , userList + , ulNextPageToken + , ulKind + , ulItems + , ulSelfLink + , ulId + + -- ** PublicKey + , PublicKey + , publicKey + , pkFingerprint + , pkKey + , pkCreationTimestamp + , pkExpirationTimestamp + , pkDescription + + -- ** User + , User + , user + , uGroups + , uPublicKeys + , uKind + , uOwner + , uSelfLink + , uName + , uCreationTimestamp + , uId + , uDescription + + -- ** LinuxAccountViews + , LinuxAccountViews + , linuxAccountViews + , lavUserViews + , lavKind + , lavGroupViews + + -- ** LinuxGroupView + , LinuxGroupView + , linuxGroupView + , lgvMembers + , lgvGid + , lgvGroupName + + -- ** GroupsAddMemberRequest + , GroupsAddMemberRequest + , groupsAddMemberRequest + , gamrUsers + + -- ** LinuxGetLinuxAccountViewsResponse + , LinuxGetLinuxAccountViewsResponse + , linuxGetLinuxAccountViewsResponse + , lglavrResource + + -- ** LinuxUserView + , LinuxUserView + , linuxUserView + , luvGecos + , luvUid + , luvUsername + , luvShell + , luvGid + , luvHomeDirectory + + -- ** LinuxGetAuthorizedKeysViewResponse + , LinuxGetAuthorizedKeysViewResponse + , linuxGetAuthorizedKeysViewResponse + , lgakvrResource + + -- ** GroupsRemoveMemberRequest + , GroupsRemoveMemberRequest + , groupsRemoveMemberRequest + , grmrUsers + + -- ** AuthorizedKeysView + , AuthorizedKeysView + , authorizedKeysView + , akvSudoer + , akvKeys + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude +import Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Delete +import Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Get +import Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.List +import Network.Google.Resource.Clouduseraccounts.Groups.AddMember +import Network.Google.Resource.Clouduseraccounts.Groups.Delete +import Network.Google.Resource.Clouduseraccounts.Groups.Get +import Network.Google.Resource.Clouduseraccounts.Groups.Insert +import Network.Google.Resource.Clouduseraccounts.Groups.List +import Network.Google.Resource.Clouduseraccounts.Groups.RemoveMember +import Network.Google.Resource.Clouduseraccounts.Linux.GetAuthorizedKeysView +import Network.Google.Resource.Clouduseraccounts.Linux.GetLinuxAccountViews +import Network.Google.Resource.Clouduseraccounts.Users.AddPublicKey +import Network.Google.Resource.Clouduseraccounts.Users.Delete +import Network.Google.Resource.Clouduseraccounts.Users.Get +import Network.Google.Resource.Clouduseraccounts.Users.Insert +import Network.Google.Resource.Clouduseraccounts.Users.List +import Network.Google.Resource.Clouduseraccounts.Users.RemovePublicKey + +{- $resources +TODO +-} + +type ComputeUserAccountsAPI = + Groups :<|> Users :<|> GlobalAccountsOperations :<|> + Linux + +computeUserAccountsAPI :: Proxy ComputeUserAccountsAPI +computeUserAccountsAPI = Proxy diff --git a/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types.hs b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types.hs new file mode 100644 index 000000000..68554f06c --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeUserAccounts.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeUserAccounts.Types + ( + -- * Service URL + computeUserAccountsURL + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * Group + , Group + , group' + , gKind + , gMembers + , gSelfLink + , gName + , gCreationTimestamp + , gId + , gDescription + + -- * GroupList + , GroupList + , groupList + , glNextPageToken + , glKind + , glItems + , glSelfLink + , glId + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * UserList + , UserList + , userList + , ulNextPageToken + , ulKind + , ulItems + , ulSelfLink + , ulId + + -- * PublicKey + , PublicKey + , publicKey + , pkFingerprint + , pkKey + , pkCreationTimestamp + , pkExpirationTimestamp + , pkDescription + + -- * User + , User + , user + , uGroups + , uPublicKeys + , uKind + , uOwner + , uSelfLink + , uName + , uCreationTimestamp + , uId + , uDescription + + -- * LinuxAccountViews + , LinuxAccountViews + , linuxAccountViews + , lavUserViews + , lavKind + , lavGroupViews + + -- * LinuxGroupView + , LinuxGroupView + , linuxGroupView + , lgvMembers + , lgvGid + , lgvGroupName + + -- * GroupsAddMemberRequest + , GroupsAddMemberRequest + , groupsAddMemberRequest + , gamrUsers + + -- * LinuxGetLinuxAccountViewsResponse + , LinuxGetLinuxAccountViewsResponse + , linuxGetLinuxAccountViewsResponse + , lglavrResource + + -- * LinuxUserView + , LinuxUserView + , linuxUserView + , luvGecos + , luvUid + , luvUsername + , luvShell + , luvGid + , luvHomeDirectory + + -- * LinuxGetAuthorizedKeysViewResponse + , LinuxGetAuthorizedKeysViewResponse + , linuxGetAuthorizedKeysViewResponse + , lgakvrResource + + -- * GroupsRemoveMemberRequest + , GroupsRemoveMemberRequest + , groupsRemoveMemberRequest + , grmrUsers + + -- * AuthorizedKeysView + , AuthorizedKeysView + , authorizedKeysView + , akvSudoer + , akvKeys + ) where + +import Network.Google.ComputeUserAccounts.Types.Product +import Network.Google.ComputeUserAccounts.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'vm_beta' of the Cloud User Accounts API. +computeUserAccountsURL :: BaseURL +computeUserAccountsURL + = BaseUrl Https + "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/" + 443 diff --git a/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Product.hs b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Product.hs new file mode 100644 index 000000000..0f6360ee1 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Product.hs @@ -0,0 +1,1278 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeUserAccounts.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeUserAccounts.Types.Product where + +import Network.Google.ComputeUserAccounts.Types.Sum +import Network.Google.Prelude + +-- | Contains a list of Operation resources. +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "clouduseraccounts#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +-- | [Output Only] A token used to continue a truncate. +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#operations for Operations +-- resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +-- | [Output Only] The Operation resources. +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "clouduseraccounts#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- | A Group resource. +-- +-- /See:/ 'group'' smart constructor. +data Group = Group + { _gKind :: !Text + , _gMembers :: !(Maybe [Text]) + , _gSelfLink :: !(Maybe Text) + , _gName :: !(Maybe Text) + , _gCreationTimestamp :: !(Maybe Text) + , _gId :: !(Maybe Word64) + , _gDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Group' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gKind' +-- +-- * 'gMembers' +-- +-- * 'gSelfLink' +-- +-- * 'gName' +-- +-- * 'gCreationTimestamp' +-- +-- * 'gId' +-- +-- * 'gDescription' +group' + :: Group +group' = + Group + { _gKind = "clouduseraccounts#group" + , _gMembers = Nothing + , _gSelfLink = Nothing + , _gName = Nothing + , _gCreationTimestamp = Nothing + , _gId = Nothing + , _gDescription = Nothing + } + +-- | [Output Only] Type of the resource. Always clouduseraccounts#group for +-- groups. +gKind :: Lens' Group Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +-- | [Output Only] A list of URLs to User resources who belong to the group. +-- Users may only be members of groups in the same project. +gMembers :: Lens' Group [Text] +gMembers + = lens _gMembers (\ s a -> s{_gMembers = a}) . + _Default + . _Coerce + +-- | [Output Only] Server defined URL for the resource. +gSelfLink :: Lens' Group (Maybe Text) +gSelfLink + = lens _gSelfLink (\ s a -> s{_gSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. +gName :: Lens' Group (Maybe Text) +gName = lens _gName (\ s a -> s{_gName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +gCreationTimestamp :: Lens' Group (Maybe Text) +gCreationTimestamp + = lens _gCreationTimestamp + (\ s a -> s{_gCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +gId :: Lens' Group (Maybe Word64) +gId = lens _gId (\ s a -> s{_gId = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +gDescription :: Lens' Group (Maybe Text) +gDescription + = lens _gDescription (\ s a -> s{_gDescription = a}) + +instance FromJSON Group where + parseJSON + = withObject "Group" + (\ o -> + Group <$> + (o .:? "kind" .!= "clouduseraccounts#group") <*> + (o .:? "members" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON Group where + toJSON Group{..} + = object + (catMaybes + [Just ("kind" .= _gKind), + ("members" .=) <$> _gMembers, + ("selfLink" .=) <$> _gSelfLink, + ("name" .=) <$> _gName, + ("creationTimestamp" .=) <$> _gCreationTimestamp, + ("id" .=) <$> _gId, + ("description" .=) <$> _gDescription]) + +-- +-- /See:/ 'groupList' smart constructor. +data GroupList = GroupList + { _glNextPageToken :: !(Maybe Text) + , _glKind :: !Text + , _glItems :: !(Maybe [Maybe Group]) + , _glSelfLink :: !(Maybe Text) + , _glId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glNextPageToken' +-- +-- * 'glKind' +-- +-- * 'glItems' +-- +-- * 'glSelfLink' +-- +-- * 'glId' +groupList + :: GroupList +groupList = + GroupList + { _glNextPageToken = Nothing + , _glKind = "clouduseraccounts#groupList" + , _glItems = Nothing + , _glSelfLink = Nothing + , _glId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +glNextPageToken :: Lens' GroupList (Maybe Text) +glNextPageToken + = lens _glNextPageToken + (\ s a -> s{_glNextPageToken = a}) + +-- | [Output Only] Type of resource. Always clouduseraccounts#groupList for +-- lists of groups. +glKind :: Lens' GroupList Text +glKind = lens _glKind (\ s a -> s{_glKind = a}) + +-- | [Output Only] A list of Group resources. +glItems :: Lens' GroupList [Maybe Group] +glItems + = lens _glItems (\ s a -> s{_glItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server defined URL for this resource. +glSelfLink :: Lens' GroupList (Maybe Text) +glSelfLink + = lens _glSelfLink (\ s a -> s{_glSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +glId :: Lens' GroupList (Maybe Text) +glId = lens _glId (\ s a -> s{_glId = a}) + +instance FromJSON GroupList where + parseJSON + = withObject "GroupList" + (\ o -> + GroupList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "clouduseraccounts#groupList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON GroupList where + toJSON GroupList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _glNextPageToken, + Just ("kind" .= _glKind), ("items" .=) <$> _glItems, + ("selfLink" .=) <$> _glSelfLink, + ("id" .=) <$> _glId]) + +-- | An Operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "clouduseraccounts#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target ID which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. Can be one of the following: +-- PENDING, RUNNING, or DONE. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested. This is in +-- RFC3339 text format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | [Output Only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the operation +-- will be complete. This number should monotonically increase as the +-- operation progresses. +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server. +-- This is in RFC3339 text format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output Only] Type of the resource. Always compute#operation for +-- Operation resources. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors are generated during processing of the +-- operation, this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as NOT FOUND. +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | [Output Only] If warning messages are generated during processing of the +-- operation, this field will be populated. +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as 404. +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +-- | [Output Only] User who requested the operation, for example: +-- user\'example.com. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server-defined URL for the resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +-- | [Output Only] The time that this operation was completed. This is in +-- RFC3339 text format. +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | [Output Only] Type of the operation, such as insert, +-- compute.instanceGroups.update, or compute.instanceGroups.delete. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. Only +-- applicable for regional resources. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output Only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Output Only] An optional identifier specified by the client when the +-- mutation was initiated. Must be unique for all Operation resources in +-- the project. +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "clouduseraccounts#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- +-- /See:/ 'userList' smart constructor. +data UserList = UserList + { _ulNextPageToken :: !(Maybe Text) + , _ulKind :: !Text + , _ulItems :: !(Maybe [Maybe User]) + , _ulSelfLink :: !(Maybe Text) + , _ulId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulNextPageToken' +-- +-- * 'ulKind' +-- +-- * 'ulItems' +-- +-- * 'ulSelfLink' +-- +-- * 'ulId' +userList + :: UserList +userList = + UserList + { _ulNextPageToken = Nothing + , _ulKind = "clouduseraccounts#userList" + , _ulItems = Nothing + , _ulSelfLink = Nothing + , _ulId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +ulNextPageToken :: Lens' UserList (Maybe Text) +ulNextPageToken + = lens _ulNextPageToken + (\ s a -> s{_ulNextPageToken = a}) + +-- | [Output Only] Type of resource. Always clouduseraccounts#userList for +-- lists of users. +ulKind :: Lens' UserList Text +ulKind = lens _ulKind (\ s a -> s{_ulKind = a}) + +-- | [Output Only] A list of User resources. +ulItems :: Lens' UserList [Maybe User] +ulItems + = lens _ulItems (\ s a -> s{_ulItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server defined URL for this resource. +ulSelfLink :: Lens' UserList (Maybe Text) +ulSelfLink + = lens _ulSelfLink (\ s a -> s{_ulSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +ulId :: Lens' UserList (Maybe Text) +ulId = lens _ulId (\ s a -> s{_ulId = a}) + +instance FromJSON UserList where + parseJSON + = withObject "UserList" + (\ o -> + UserList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "clouduseraccounts#userList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON UserList where + toJSON UserList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ulNextPageToken, + Just ("kind" .= _ulKind), ("items" .=) <$> _ulItems, + ("selfLink" .=) <$> _ulSelfLink, + ("id" .=) <$> _ulId]) + +-- | A public key for authenticating to guests. +-- +-- /See:/ 'publicKey' smart constructor. +data PublicKey = PublicKey + { _pkFingerprint :: !(Maybe Text) + , _pkKey :: !(Maybe Text) + , _pkCreationTimestamp :: !(Maybe Text) + , _pkExpirationTimestamp :: !(Maybe Text) + , _pkDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublicKey' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pkFingerprint' +-- +-- * 'pkKey' +-- +-- * 'pkCreationTimestamp' +-- +-- * 'pkExpirationTimestamp' +-- +-- * 'pkDescription' +publicKey + :: PublicKey +publicKey = + PublicKey + { _pkFingerprint = Nothing + , _pkKey = Nothing + , _pkCreationTimestamp = Nothing + , _pkExpirationTimestamp = Nothing + , _pkDescription = Nothing + } + +-- | [Output Only] The fingerprint of the key is defined by RFC4716 to be the +-- MD5 digest of the public key. +pkFingerprint :: Lens' PublicKey (Maybe Text) +pkFingerprint + = lens _pkFingerprint + (\ s a -> s{_pkFingerprint = a}) + +-- | Public key text in SSH format, defined by RFC4253 section 6.6. +pkKey :: Lens' PublicKey (Maybe Text) +pkKey = lens _pkKey (\ s a -> s{_pkKey = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +pkCreationTimestamp :: Lens' PublicKey (Maybe Text) +pkCreationTimestamp + = lens _pkCreationTimestamp + (\ s a -> s{_pkCreationTimestamp = a}) + +-- | Optional expiration timestamp. If provided, the timestamp must be in +-- RFC3339 text format. If not provided, the public key never expires. +pkExpirationTimestamp :: Lens' PublicKey (Maybe Text) +pkExpirationTimestamp + = lens _pkExpirationTimestamp + (\ s a -> s{_pkExpirationTimestamp = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +pkDescription :: Lens' PublicKey (Maybe Text) +pkDescription + = lens _pkDescription + (\ s a -> s{_pkDescription = a}) + +instance FromJSON PublicKey where + parseJSON + = withObject "PublicKey" + (\ o -> + PublicKey <$> + (o .:? "fingerprint") <*> (o .:? "key") <*> + (o .:? "creationTimestamp") + <*> (o .:? "expirationTimestamp") + <*> (o .:? "description")) + +instance ToJSON PublicKey where + toJSON PublicKey{..} + = object + (catMaybes + [("fingerprint" .=) <$> _pkFingerprint, + ("key" .=) <$> _pkKey, + ("creationTimestamp" .=) <$> _pkCreationTimestamp, + ("expirationTimestamp" .=) <$> + _pkExpirationTimestamp, + ("description" .=) <$> _pkDescription]) + +-- | A User resource. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uGroups :: !(Maybe [Text]) + , _uPublicKeys :: !(Maybe [Maybe PublicKey]) + , _uKind :: !Text + , _uOwner :: !(Maybe Text) + , _uSelfLink :: !(Maybe Text) + , _uName :: !(Maybe Text) + , _uCreationTimestamp :: !(Maybe Text) + , _uId :: !(Maybe Word64) + , _uDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uGroups' +-- +-- * 'uPublicKeys' +-- +-- * 'uKind' +-- +-- * 'uOwner' +-- +-- * 'uSelfLink' +-- +-- * 'uName' +-- +-- * 'uCreationTimestamp' +-- +-- * 'uId' +-- +-- * 'uDescription' +user + :: User +user = + User + { _uGroups = Nothing + , _uPublicKeys = Nothing + , _uKind = "clouduseraccounts#user" + , _uOwner = Nothing + , _uSelfLink = Nothing + , _uName = Nothing + , _uCreationTimestamp = Nothing + , _uId = Nothing + , _uDescription = Nothing + } + +-- | [Output Only] A list of URLs to Group resources who contain the user. +-- Users are only members of groups in the same project. +uGroups :: Lens' User [Text] +uGroups + = lens _uGroups (\ s a -> s{_uGroups = a}) . _Default + . _Coerce + +-- | [Output Only] Public keys that this user may use to login. +uPublicKeys :: Lens' User [Maybe PublicKey] +uPublicKeys + = lens _uPublicKeys (\ s a -> s{_uPublicKeys = a}) . + _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always clouduseraccounts#user for +-- users. +uKind :: Lens' User Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | Email address of account\'s owner. This account will be validated to +-- make sure it exists. The email can belong to any domain, but it must be +-- tied to a Google account. +uOwner :: Lens' User (Maybe Text) +uOwner = lens _uOwner (\ s a -> s{_uOwner = a}) + +-- | [Output Only] Server defined URL for the resource. +uSelfLink :: Lens' User (Maybe Text) +uSelfLink + = lens _uSelfLink (\ s a -> s{_uSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. +uName :: Lens' User (Maybe Text) +uName = lens _uName (\ s a -> s{_uName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +uCreationTimestamp :: Lens' User (Maybe Text) +uCreationTimestamp + = lens _uCreationTimestamp + (\ s a -> s{_uCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +uId :: Lens' User (Maybe Word64) +uId = lens _uId (\ s a -> s{_uId = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +uDescription :: Lens' User (Maybe Text) +uDescription + = lens _uDescription (\ s a -> s{_uDescription = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "groups" .!= mempty) <*> + (o .:? "publicKeys" .!= mempty) + <*> (o .:? "kind" .!= "clouduseraccounts#user") + <*> (o .:? "owner") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("groups" .=) <$> _uGroups, + ("publicKeys" .=) <$> _uPublicKeys, + Just ("kind" .= _uKind), ("owner" .=) <$> _uOwner, + ("selfLink" .=) <$> _uSelfLink, + ("name" .=) <$> _uName, + ("creationTimestamp" .=) <$> _uCreationTimestamp, + ("id" .=) <$> _uId, + ("description" .=) <$> _uDescription]) + +-- | A list of all Linux accounts for this project. This API is only used by +-- Compute Engine virtual machines to get information about user accounts +-- for a project or instance. Linux resources are read-only views into +-- users and groups managed by the Compute Engine Accounts API. +-- +-- /See:/ 'linuxAccountViews' smart constructor. +data LinuxAccountViews = LinuxAccountViews + { _lavUserViews :: !(Maybe [Maybe LinuxUserView]) + , _lavKind :: !Text + , _lavGroupViews :: !(Maybe [Maybe LinuxGroupView]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxAccountViews' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lavUserViews' +-- +-- * 'lavKind' +-- +-- * 'lavGroupViews' +linuxAccountViews + :: LinuxAccountViews +linuxAccountViews = + LinuxAccountViews + { _lavUserViews = Nothing + , _lavKind = "clouduseraccounts#linuxAccountViews" + , _lavGroupViews = Nothing + } + +-- | [Output Only] A list of all users within a project. +lavUserViews :: Lens' LinuxAccountViews [Maybe LinuxUserView] +lavUserViews + = lens _lavUserViews (\ s a -> s{_lavUserViews = a}) + . _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always +-- clouduseraccounts#linuxAccountViews for Linux resources. +lavKind :: Lens' LinuxAccountViews Text +lavKind = lens _lavKind (\ s a -> s{_lavKind = a}) + +-- | [Output Only] A list of all groups within a project. +lavGroupViews :: Lens' LinuxAccountViews [Maybe LinuxGroupView] +lavGroupViews + = lens _lavGroupViews + (\ s a -> s{_lavGroupViews = a}) + . _Default + . _Coerce + +instance FromJSON LinuxAccountViews where + parseJSON + = withObject "LinuxAccountViews" + (\ o -> + LinuxAccountViews <$> + (o .:? "userViews" .!= mempty) <*> + (o .:? "kind" .!= + "clouduseraccounts#linuxAccountViews") + <*> (o .:? "groupViews" .!= mempty)) + +instance ToJSON LinuxAccountViews where + toJSON LinuxAccountViews{..} + = object + (catMaybes + [("userViews" .=) <$> _lavUserViews, + Just ("kind" .= _lavKind), + ("groupViews" .=) <$> _lavGroupViews]) + +-- | A detailed view of a Linux group. +-- +-- /See:/ 'linuxGroupView' smart constructor. +data LinuxGroupView = LinuxGroupView + { _lgvMembers :: !(Maybe [Text]) + , _lgvGid :: !(Maybe Word32) + , _lgvGroupName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxGroupView' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgvMembers' +-- +-- * 'lgvGid' +-- +-- * 'lgvGroupName' +linuxGroupView + :: LinuxGroupView +linuxGroupView = + LinuxGroupView + { _lgvMembers = Nothing + , _lgvGid = Nothing + , _lgvGroupName = Nothing + } + +-- | [Output Only] List of user accounts that belong to the group. +lgvMembers :: Lens' LinuxGroupView [Text] +lgvMembers + = lens _lgvMembers (\ s a -> s{_lgvMembers = a}) . + _Default + . _Coerce + +-- | [Output Only] The Group ID. +lgvGid :: Lens' LinuxGroupView (Maybe Word32) +lgvGid = lens _lgvGid (\ s a -> s{_lgvGid = a}) + +-- | [Output Only] Group name. +lgvGroupName :: Lens' LinuxGroupView (Maybe Text) +lgvGroupName + = lens _lgvGroupName (\ s a -> s{_lgvGroupName = a}) + +instance FromJSON LinuxGroupView where + parseJSON + = withObject "LinuxGroupView" + (\ o -> + LinuxGroupView <$> + (o .:? "members" .!= mempty) <*> (o .:? "gid") <*> + (o .:? "groupName")) + +instance ToJSON LinuxGroupView where + toJSON LinuxGroupView{..} + = object + (catMaybes + [("members" .=) <$> _lgvMembers, + ("gid" .=) <$> _lgvGid, + ("groupName" .=) <$> _lgvGroupName]) + +-- +-- /See:/ 'groupsAddMemberRequest' smart constructor. +newtype GroupsAddMemberRequest = GroupsAddMemberRequest + { _gamrUsers :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsAddMemberRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gamrUsers' +groupsAddMemberRequest + :: GroupsAddMemberRequest +groupsAddMemberRequest = + GroupsAddMemberRequest + { _gamrUsers = Nothing + } + +-- | Fully-qualified URLs of the User resources to add. +gamrUsers :: Lens' GroupsAddMemberRequest [Text] +gamrUsers + = lens _gamrUsers (\ s a -> s{_gamrUsers = a}) . + _Default + . _Coerce + +instance FromJSON GroupsAddMemberRequest where + parseJSON + = withObject "GroupsAddMemberRequest" + (\ o -> + GroupsAddMemberRequest <$> + (o .:? "users" .!= mempty)) + +instance ToJSON GroupsAddMemberRequest where + toJSON GroupsAddMemberRequest{..} + = object (catMaybes [("users" .=) <$> _gamrUsers]) + +-- +-- /See:/ 'linuxGetLinuxAccountViewsResponse' smart constructor. +newtype LinuxGetLinuxAccountViewsResponse = LinuxGetLinuxAccountViewsResponse + { _lglavrResource :: Maybe (Maybe LinuxAccountViews) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxGetLinuxAccountViewsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lglavrResource' +linuxGetLinuxAccountViewsResponse + :: LinuxGetLinuxAccountViewsResponse +linuxGetLinuxAccountViewsResponse = + LinuxGetLinuxAccountViewsResponse + { _lglavrResource = Nothing + } + +-- | [Output Only] A list of authorized user accounts and groups. +lglavrResource :: Lens' LinuxGetLinuxAccountViewsResponse (Maybe (Maybe LinuxAccountViews)) +lglavrResource + = lens _lglavrResource + (\ s a -> s{_lglavrResource = a}) + +instance FromJSON LinuxGetLinuxAccountViewsResponse + where + parseJSON + = withObject "LinuxGetLinuxAccountViewsResponse" + (\ o -> + LinuxGetLinuxAccountViewsResponse <$> + (o .:? "resource")) + +instance ToJSON LinuxGetLinuxAccountViewsResponse + where + toJSON LinuxGetLinuxAccountViewsResponse{..} + = object + (catMaybes [("resource" .=) <$> _lglavrResource]) + +-- | A detailed view of a Linux user account. +-- +-- /See:/ 'linuxUserView' smart constructor. +data LinuxUserView = LinuxUserView + { _luvGecos :: !(Maybe Text) + , _luvUid :: !(Maybe Word32) + , _luvUsername :: !(Maybe Text) + , _luvShell :: !(Maybe Text) + , _luvGid :: !(Maybe Word32) + , _luvHomeDirectory :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxUserView' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'luvGecos' +-- +-- * 'luvUid' +-- +-- * 'luvUsername' +-- +-- * 'luvShell' +-- +-- * 'luvGid' +-- +-- * 'luvHomeDirectory' +linuxUserView + :: LinuxUserView +linuxUserView = + LinuxUserView + { _luvGecos = Nothing + , _luvUid = Nothing + , _luvUsername = Nothing + , _luvShell = Nothing + , _luvGid = Nothing + , _luvHomeDirectory = Nothing + } + +-- | [Output Only] The GECOS (user information) entry for this account. +luvGecos :: Lens' LinuxUserView (Maybe Text) +luvGecos = lens _luvGecos (\ s a -> s{_luvGecos = a}) + +-- | [Output Only] User ID. +luvUid :: Lens' LinuxUserView (Maybe Word32) +luvUid = lens _luvUid (\ s a -> s{_luvUid = a}) + +-- | [Output Only] The username of the account. +luvUsername :: Lens' LinuxUserView (Maybe Text) +luvUsername + = lens _luvUsername (\ s a -> s{_luvUsername = a}) + +-- | [Output Only] The path to the login shell for this account. +luvShell :: Lens' LinuxUserView (Maybe Text) +luvShell = lens _luvShell (\ s a -> s{_luvShell = a}) + +-- | [Output Only] User\'s default group ID. +luvGid :: Lens' LinuxUserView (Maybe Word32) +luvGid = lens _luvGid (\ s a -> s{_luvGid = a}) + +-- | [Output Only] The path to the home directory for this account. +luvHomeDirectory :: Lens' LinuxUserView (Maybe Text) +luvHomeDirectory + = lens _luvHomeDirectory + (\ s a -> s{_luvHomeDirectory = a}) + +instance FromJSON LinuxUserView where + parseJSON + = withObject "LinuxUserView" + (\ o -> + LinuxUserView <$> + (o .:? "gecos") <*> (o .:? "uid") <*> + (o .:? "username") + <*> (o .:? "shell") + <*> (o .:? "gid") + <*> (o .:? "homeDirectory")) + +instance ToJSON LinuxUserView where + toJSON LinuxUserView{..} + = object + (catMaybes + [("gecos" .=) <$> _luvGecos, ("uid" .=) <$> _luvUid, + ("username" .=) <$> _luvUsername, + ("shell" .=) <$> _luvShell, ("gid" .=) <$> _luvGid, + ("homeDirectory" .=) <$> _luvHomeDirectory]) + +-- +-- /See:/ 'linuxGetAuthorizedKeysViewResponse' smart constructor. +newtype LinuxGetAuthorizedKeysViewResponse = LinuxGetAuthorizedKeysViewResponse + { _lgakvrResource :: Maybe (Maybe AuthorizedKeysView) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxGetAuthorizedKeysViewResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgakvrResource' +linuxGetAuthorizedKeysViewResponse + :: LinuxGetAuthorizedKeysViewResponse +linuxGetAuthorizedKeysViewResponse = + LinuxGetAuthorizedKeysViewResponse + { _lgakvrResource = Nothing + } + +-- | [Output Only] A list of authorized public keys for a user. +lgakvrResource :: Lens' LinuxGetAuthorizedKeysViewResponse (Maybe (Maybe AuthorizedKeysView)) +lgakvrResource + = lens _lgakvrResource + (\ s a -> s{_lgakvrResource = a}) + +instance FromJSON LinuxGetAuthorizedKeysViewResponse + where + parseJSON + = withObject "LinuxGetAuthorizedKeysViewResponse" + (\ o -> + LinuxGetAuthorizedKeysViewResponse <$> + (o .:? "resource")) + +instance ToJSON LinuxGetAuthorizedKeysViewResponse + where + toJSON LinuxGetAuthorizedKeysViewResponse{..} + = object + (catMaybes [("resource" .=) <$> _lgakvrResource]) + +-- +-- /See:/ 'groupsRemoveMemberRequest' smart constructor. +newtype GroupsRemoveMemberRequest = GroupsRemoveMemberRequest + { _grmrUsers :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsRemoveMemberRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'grmrUsers' +groupsRemoveMemberRequest + :: GroupsRemoveMemberRequest +groupsRemoveMemberRequest = + GroupsRemoveMemberRequest + { _grmrUsers = Nothing + } + +-- | Fully-qualified URLs of the User resources to remove. +grmrUsers :: Lens' GroupsRemoveMemberRequest [Text] +grmrUsers + = lens _grmrUsers (\ s a -> s{_grmrUsers = a}) . + _Default + . _Coerce + +instance FromJSON GroupsRemoveMemberRequest where + parseJSON + = withObject "GroupsRemoveMemberRequest" + (\ o -> + GroupsRemoveMemberRequest <$> + (o .:? "users" .!= mempty)) + +instance ToJSON GroupsRemoveMemberRequest where + toJSON GroupsRemoveMemberRequest{..} + = object (catMaybes [("users" .=) <$> _grmrUsers]) + +-- | A list of authorized public keys for a user account. +-- +-- /See:/ 'authorizedKeysView' smart constructor. +data AuthorizedKeysView = AuthorizedKeysView + { _akvSudoer :: !(Maybe Bool) + , _akvKeys :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AuthorizedKeysView' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'akvSudoer' +-- +-- * 'akvKeys' +authorizedKeysView + :: AuthorizedKeysView +authorizedKeysView = + AuthorizedKeysView + { _akvSudoer = Nothing + , _akvKeys = Nothing + } + +-- | [Output Only] Whether the user has the ability to elevate on the +-- instance that requested the authorized keys. +akvSudoer :: Lens' AuthorizedKeysView (Maybe Bool) +akvSudoer + = lens _akvSudoer (\ s a -> s{_akvSudoer = a}) + +-- | [Output Only] The list of authorized public keys in SSH format. +akvKeys :: Lens' AuthorizedKeysView [Text] +akvKeys + = lens _akvKeys (\ s a -> s{_akvKeys = a}) . _Default + . _Coerce + +instance FromJSON AuthorizedKeysView where + parseJSON + = withObject "AuthorizedKeysView" + (\ o -> + AuthorizedKeysView <$> + (o .:? "sudoer") <*> (o .:? "keys" .!= mempty)) + +instance ToJSON AuthorizedKeysView where + toJSON AuthorizedKeysView{..} + = object + (catMaybes + [("sudoer" .=) <$> _akvSudoer, + ("keys" .=) <$> _akvKeys]) diff --git a/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Sum.hs b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Sum.hs new file mode 100644 index 000000000..2e19def18 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/ComputeUserAccounts/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ComputeUserAccounts.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ComputeUserAccounts.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Delete.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Delete.hs new file mode 100644 index 000000000..e7b915035 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Delete.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified operation resource. +-- +-- /See:/ for @ClouduseraccountsGlobalAccountsOperationsDelete@. +module Clouduseraccounts.GlobalAccountsOperations.Delete + ( + -- * REST Resource + GlobalAccountsOperationsDeleteAPI + + -- * Creating a Request + , globalAccountsOperationsDelete + , GlobalAccountsOperationsDelete + + -- * Request Lenses + , gaodQuotaUser + , gaodPrettyPrint + , gaodProject + , gaodOperation + , gaodUserIp + , gaodKey + , gaodOauthToken + , gaodFields + , gaodAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGlobalAccountsOperationsDelete@ which the +-- 'GlobalAccountsOperationsDelete' request conforms to. +type GlobalAccountsOperationsDeleteAPI = + Capture "project" Text :> + "global" :> + "operations" :> + Capture "operation" Text :> Delete '[JSON] () + +-- | Deletes the specified operation resource. +-- +-- /See:/ 'globalAccountsOperationsDelete' smart constructor. +data GlobalAccountsOperationsDelete = GlobalAccountsOperationsDelete + { _gaodQuotaUser :: !(Maybe Text) + , _gaodPrettyPrint :: !Bool + , _gaodProject :: !Text + , _gaodOperation :: !Text + , _gaodUserIp :: !(Maybe Text) + , _gaodKey :: !(Maybe Text) + , _gaodOauthToken :: !(Maybe Text) + , _gaodFields :: !(Maybe Text) + , _gaodAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAccountsOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaodQuotaUser' +-- +-- * 'gaodPrettyPrint' +-- +-- * 'gaodProject' +-- +-- * 'gaodOperation' +-- +-- * 'gaodUserIp' +-- +-- * 'gaodKey' +-- +-- * 'gaodOauthToken' +-- +-- * 'gaodFields' +-- +-- * 'gaodAlt' +globalAccountsOperationsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> GlobalAccountsOperationsDelete +globalAccountsOperationsDelete pGaodProject_ pGaodOperation_ = + GlobalAccountsOperationsDelete + { _gaodQuotaUser = Nothing + , _gaodPrettyPrint = True + , _gaodProject = pGaodProject_ + , _gaodOperation = pGaodOperation_ + , _gaodUserIp = Nothing + , _gaodKey = Nothing + , _gaodOauthToken = Nothing + , _gaodFields = Nothing + , _gaodAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gaodQuotaUser :: Lens' GlobalAccountsOperationsDelete' (Maybe Text) +gaodQuotaUser + = lens _gaodQuotaUser + (\ s a -> s{_gaodQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gaodPrettyPrint :: Lens' GlobalAccountsOperationsDelete' Bool +gaodPrettyPrint + = lens _gaodPrettyPrint + (\ s a -> s{_gaodPrettyPrint = a}) + +-- | Project ID for this request. +gaodProject :: Lens' GlobalAccountsOperationsDelete' Text +gaodProject + = lens _gaodProject (\ s a -> s{_gaodProject = a}) + +-- | Name of the Operations resource to delete. +gaodOperation :: Lens' GlobalAccountsOperationsDelete' Text +gaodOperation + = lens _gaodOperation + (\ s a -> s{_gaodOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gaodUserIp :: Lens' GlobalAccountsOperationsDelete' (Maybe Text) +gaodUserIp + = lens _gaodUserIp (\ s a -> s{_gaodUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gaodKey :: Lens' GlobalAccountsOperationsDelete' (Maybe Text) +gaodKey = lens _gaodKey (\ s a -> s{_gaodKey = a}) + +-- | OAuth 2.0 token for the current user. +gaodOauthToken :: Lens' GlobalAccountsOperationsDelete' (Maybe Text) +gaodOauthToken + = lens _gaodOauthToken + (\ s a -> s{_gaodOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gaodFields :: Lens' GlobalAccountsOperationsDelete' (Maybe Text) +gaodFields + = lens _gaodFields (\ s a -> s{_gaodFields = a}) + +-- | Data format for the response. +gaodAlt :: Lens' GlobalAccountsOperationsDelete' Text +gaodAlt = lens _gaodAlt (\ s a -> s{_gaodAlt = a}) + +instance GoogleRequest + GlobalAccountsOperationsDelete' where + type Rs GlobalAccountsOperationsDelete' = () + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u + GlobalAccountsOperationsDelete{..} + = go _gaodQuotaUser _gaodPrettyPrint _gaodProject + _gaodOperation + _gaodUserIp + _gaodKey + _gaodOauthToken + _gaodFields + _gaodAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAccountsOperationsDeleteAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Get.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Get.hs new file mode 100644 index 000000000..3fdf63696 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified operation resource. +-- +-- /See:/ for @ClouduseraccountsGlobalAccountsOperationsGet@. +module Clouduseraccounts.GlobalAccountsOperations.Get + ( + -- * REST Resource + GlobalAccountsOperationsGetAPI + + -- * Creating a Request + , globalAccountsOperationsGet + , GlobalAccountsOperationsGet + + -- * Request Lenses + , gaogQuotaUser + , gaogPrettyPrint + , gaogProject + , gaogOperation + , gaogUserIp + , gaogKey + , gaogOauthToken + , gaogFields + , gaogAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGlobalAccountsOperationsGet@ which the +-- 'GlobalAccountsOperationsGet' request conforms to. +type GlobalAccountsOperationsGetAPI = + Capture "project" Text :> + "global" :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified operation resource. +-- +-- /See:/ 'globalAccountsOperationsGet' smart constructor. +data GlobalAccountsOperationsGet = GlobalAccountsOperationsGet + { _gaogQuotaUser :: !(Maybe Text) + , _gaogPrettyPrint :: !Bool + , _gaogProject :: !Text + , _gaogOperation :: !Text + , _gaogUserIp :: !(Maybe Text) + , _gaogKey :: !(Maybe Text) + , _gaogOauthToken :: !(Maybe Text) + , _gaogFields :: !(Maybe Text) + , _gaogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAccountsOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaogQuotaUser' +-- +-- * 'gaogPrettyPrint' +-- +-- * 'gaogProject' +-- +-- * 'gaogOperation' +-- +-- * 'gaogUserIp' +-- +-- * 'gaogKey' +-- +-- * 'gaogOauthToken' +-- +-- * 'gaogFields' +-- +-- * 'gaogAlt' +globalAccountsOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> GlobalAccountsOperationsGet +globalAccountsOperationsGet pGaogProject_ pGaogOperation_ = + GlobalAccountsOperationsGet + { _gaogQuotaUser = Nothing + , _gaogPrettyPrint = True + , _gaogProject = pGaogProject_ + , _gaogOperation = pGaogOperation_ + , _gaogUserIp = Nothing + , _gaogKey = Nothing + , _gaogOauthToken = Nothing + , _gaogFields = Nothing + , _gaogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gaogQuotaUser :: Lens' GlobalAccountsOperationsGet' (Maybe Text) +gaogQuotaUser + = lens _gaogQuotaUser + (\ s a -> s{_gaogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gaogPrettyPrint :: Lens' GlobalAccountsOperationsGet' Bool +gaogPrettyPrint + = lens _gaogPrettyPrint + (\ s a -> s{_gaogPrettyPrint = a}) + +-- | Project ID for this request. +gaogProject :: Lens' GlobalAccountsOperationsGet' Text +gaogProject + = lens _gaogProject (\ s a -> s{_gaogProject = a}) + +-- | Name of the Operations resource to return. +gaogOperation :: Lens' GlobalAccountsOperationsGet' Text +gaogOperation + = lens _gaogOperation + (\ s a -> s{_gaogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gaogUserIp :: Lens' GlobalAccountsOperationsGet' (Maybe Text) +gaogUserIp + = lens _gaogUserIp (\ s a -> s{_gaogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gaogKey :: Lens' GlobalAccountsOperationsGet' (Maybe Text) +gaogKey = lens _gaogKey (\ s a -> s{_gaogKey = a}) + +-- | OAuth 2.0 token for the current user. +gaogOauthToken :: Lens' GlobalAccountsOperationsGet' (Maybe Text) +gaogOauthToken + = lens _gaogOauthToken + (\ s a -> s{_gaogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gaogFields :: Lens' GlobalAccountsOperationsGet' (Maybe Text) +gaogFields + = lens _gaogFields (\ s a -> s{_gaogFields = a}) + +-- | Data format for the response. +gaogAlt :: Lens' GlobalAccountsOperationsGet' Text +gaogAlt = lens _gaogAlt (\ s a -> s{_gaogAlt = a}) + +instance GoogleRequest GlobalAccountsOperationsGet' + where + type Rs GlobalAccountsOperationsGet' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GlobalAccountsOperationsGet{..} + = go _gaogQuotaUser _gaogPrettyPrint _gaogProject + _gaogOperation + _gaogUserIp + _gaogKey + _gaogOauthToken + _gaogFields + _gaogAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAccountsOperationsGetAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/List.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/List.hs new file mode 100644 index 000000000..e8b7bd37e --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/GlobalAccountsOperations/List.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of operation resources contained within the specified +-- project. +-- +-- /See:/ for @ClouduseraccountsGlobalAccountsOperationsList@. +module Clouduseraccounts.GlobalAccountsOperations.List + ( + -- * REST Resource + GlobalAccountsOperationsListAPI + + -- * Creating a Request + , globalAccountsOperationsList + , GlobalAccountsOperationsList + + -- * Request Lenses + , gaolQuotaUser + , gaolPrettyPrint + , gaolOrderBy + , gaolProject + , gaolUserIp + , gaolKey + , gaolFilter + , gaolPageToken + , gaolOauthToken + , gaolMaxResults + , gaolFields + , gaolAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGlobalAccountsOperationsList@ which the +-- 'GlobalAccountsOperationsList' request conforms to. +type GlobalAccountsOperationsListAPI = + Capture "project" Text :> + "global" :> + "operations" :> + QueryParam "orderBy" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of operation resources contained within the specified +-- project. +-- +-- /See:/ 'globalAccountsOperationsList' smart constructor. +data GlobalAccountsOperationsList = GlobalAccountsOperationsList + { _gaolQuotaUser :: !(Maybe Text) + , _gaolPrettyPrint :: !Bool + , _gaolOrderBy :: !(Maybe Text) + , _gaolProject :: !Text + , _gaolUserIp :: !(Maybe Text) + , _gaolKey :: !(Maybe Text) + , _gaolFilter :: !(Maybe Text) + , _gaolPageToken :: !(Maybe Text) + , _gaolOauthToken :: !(Maybe Text) + , _gaolMaxResults :: !Word32 + , _gaolFields :: !(Maybe Text) + , _gaolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAccountsOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaolQuotaUser' +-- +-- * 'gaolPrettyPrint' +-- +-- * 'gaolOrderBy' +-- +-- * 'gaolProject' +-- +-- * 'gaolUserIp' +-- +-- * 'gaolKey' +-- +-- * 'gaolFilter' +-- +-- * 'gaolPageToken' +-- +-- * 'gaolOauthToken' +-- +-- * 'gaolMaxResults' +-- +-- * 'gaolFields' +-- +-- * 'gaolAlt' +globalAccountsOperationsList + :: Text -- ^ 'project' + -> GlobalAccountsOperationsList +globalAccountsOperationsList pGaolProject_ = + GlobalAccountsOperationsList + { _gaolQuotaUser = Nothing + , _gaolPrettyPrint = True + , _gaolOrderBy = Nothing + , _gaolProject = pGaolProject_ + , _gaolUserIp = Nothing + , _gaolKey = Nothing + , _gaolFilter = Nothing + , _gaolPageToken = Nothing + , _gaolOauthToken = Nothing + , _gaolMaxResults = 500 + , _gaolFields = Nothing + , _gaolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gaolQuotaUser :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolQuotaUser + = lens _gaolQuotaUser + (\ s a -> s{_gaolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gaolPrettyPrint :: Lens' GlobalAccountsOperationsList' Bool +gaolPrettyPrint + = lens _gaolPrettyPrint + (\ s a -> s{_gaolPrettyPrint = a}) + +-- | Sorts list results by a certain order. By default, results are returned +-- in alphanumerical order based on the resource name. You can also sort +-- results in descending order based on the creation timestamp using +-- orderBy=\"creationTimestamp desc\". This sorts results based on the +-- creationTimestamp field in reverse chronological order (newest result +-- first). Use this to sort resources like operations so that the newest +-- operation is returned first. Currently, only sorting by name or +-- creationTimestamp desc is supported. +gaolOrderBy :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolOrderBy + = lens _gaolOrderBy (\ s a -> s{_gaolOrderBy = a}) + +-- | Project ID for this request. +gaolProject :: Lens' GlobalAccountsOperationsList' Text +gaolProject + = lens _gaolProject (\ s a -> s{_gaolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gaolUserIp :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolUserIp + = lens _gaolUserIp (\ s a -> s{_gaolUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gaolKey :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolKey = lens _gaolKey (\ s a -> s{_gaolKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +gaolFilter :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolFilter + = lens _gaolFilter (\ s a -> s{_gaolFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +gaolPageToken :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolPageToken + = lens _gaolPageToken + (\ s a -> s{_gaolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +gaolOauthToken :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolOauthToken + = lens _gaolOauthToken + (\ s a -> s{_gaolOauthToken = a}) + +-- | Maximum count of results to be returned. +gaolMaxResults :: Lens' GlobalAccountsOperationsList' Word32 +gaolMaxResults + = lens _gaolMaxResults + (\ s a -> s{_gaolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +gaolFields :: Lens' GlobalAccountsOperationsList' (Maybe Text) +gaolFields + = lens _gaolFields (\ s a -> s{_gaolFields = a}) + +-- | Data format for the response. +gaolAlt :: Lens' GlobalAccountsOperationsList' Text +gaolAlt = lens _gaolAlt (\ s a -> s{_gaolAlt = a}) + +instance GoogleRequest GlobalAccountsOperationsList' + where + type Rs GlobalAccountsOperationsList' = OperationList + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GlobalAccountsOperationsList{..} + = go _gaolQuotaUser _gaolPrettyPrint _gaolOrderBy + _gaolProject + _gaolUserIp + _gaolKey + _gaolFilter + _gaolPageToken + _gaolOauthToken + (Just _gaolMaxResults) + _gaolFields + _gaolAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAccountsOperationsListAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/AddMember.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/AddMember.hs new file mode 100644 index 000000000..b459e199d --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/AddMember.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.AddMember +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds users to the specified group. +-- +-- /See:/ for @ClouduseraccountsGroupsAddMember@. +module Clouduseraccounts.Groups.AddMember + ( + -- * REST Resource + GroupsAddMemberAPI + + -- * Creating a Request + , groupsAddMember + , GroupsAddMember + + -- * Request Lenses + , gamQuotaUser + , gamPrettyPrint + , gamProject + , gamUserIp + , gamKey + , gamGroupName + , gamOauthToken + , gamFields + , gamAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsAddMember@ which the +-- 'GroupsAddMember' request conforms to. +type GroupsAddMemberAPI = + Capture "project" Text :> + "global" :> + "groups" :> + Capture "groupName" Text :> + "addMember" :> Post '[JSON] Operation + +-- | Adds users to the specified group. +-- +-- /See:/ 'groupsAddMember' smart constructor. +data GroupsAddMember = GroupsAddMember + { _gamQuotaUser :: !(Maybe Text) + , _gamPrettyPrint :: !Bool + , _gamProject :: !Text + , _gamUserIp :: !(Maybe Text) + , _gamKey :: !(Maybe Text) + , _gamGroupName :: !Text + , _gamOauthToken :: !(Maybe Text) + , _gamFields :: !(Maybe Text) + , _gamAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsAddMember'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gamQuotaUser' +-- +-- * 'gamPrettyPrint' +-- +-- * 'gamProject' +-- +-- * 'gamUserIp' +-- +-- * 'gamKey' +-- +-- * 'gamGroupName' +-- +-- * 'gamOauthToken' +-- +-- * 'gamFields' +-- +-- * 'gamAlt' +groupsAddMember + :: Text -- ^ 'project' + -> Text -- ^ 'groupName' + -> GroupsAddMember +groupsAddMember pGamProject_ pGamGroupName_ = + GroupsAddMember + { _gamQuotaUser = Nothing + , _gamPrettyPrint = True + , _gamProject = pGamProject_ + , _gamUserIp = Nothing + , _gamKey = Nothing + , _gamGroupName = pGamGroupName_ + , _gamOauthToken = Nothing + , _gamFields = Nothing + , _gamAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gamQuotaUser :: Lens' GroupsAddMember' (Maybe Text) +gamQuotaUser + = lens _gamQuotaUser (\ s a -> s{_gamQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gamPrettyPrint :: Lens' GroupsAddMember' Bool +gamPrettyPrint + = lens _gamPrettyPrint + (\ s a -> s{_gamPrettyPrint = a}) + +-- | Project ID for this request. +gamProject :: Lens' GroupsAddMember' Text +gamProject + = lens _gamProject (\ s a -> s{_gamProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gamUserIp :: Lens' GroupsAddMember' (Maybe Text) +gamUserIp + = lens _gamUserIp (\ s a -> s{_gamUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gamKey :: Lens' GroupsAddMember' (Maybe Text) +gamKey = lens _gamKey (\ s a -> s{_gamKey = a}) + +-- | Name of the group for this request. +gamGroupName :: Lens' GroupsAddMember' Text +gamGroupName + = lens _gamGroupName (\ s a -> s{_gamGroupName = a}) + +-- | OAuth 2.0 token for the current user. +gamOauthToken :: Lens' GroupsAddMember' (Maybe Text) +gamOauthToken + = lens _gamOauthToken + (\ s a -> s{_gamOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gamFields :: Lens' GroupsAddMember' (Maybe Text) +gamFields + = lens _gamFields (\ s a -> s{_gamFields = a}) + +-- | Data format for the response. +gamAlt :: Lens' GroupsAddMember' Text +gamAlt = lens _gamAlt (\ s a -> s{_gamAlt = a}) + +instance GoogleRequest GroupsAddMember' where + type Rs GroupsAddMember' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsAddMember{..} + = go _gamQuotaUser _gamPrettyPrint _gamProject + _gamUserIp + _gamKey + _gamGroupName + _gamOauthToken + _gamFields + _gamAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsAddMemberAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Delete.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Delete.hs new file mode 100644 index 000000000..d4bf532a3 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified Group resource. +-- +-- /See:/ for @ClouduseraccountsGroupsDelete@. +module Clouduseraccounts.Groups.Delete + ( + -- * REST Resource + GroupsDeleteAPI + + -- * Creating a Request + , groupsDelete + , GroupsDelete + + -- * Request Lenses + , gdQuotaUser + , gdPrettyPrint + , gdProject + , gdUserIp + , gdKey + , gdGroupName + , gdOauthToken + , gdFields + , gdAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsDelete@ which the +-- 'GroupsDelete' request conforms to. +type GroupsDeleteAPI = + Capture "project" Text :> + "global" :> + "groups" :> + Capture "groupName" Text :> Delete '[JSON] Operation + +-- | Deletes the specified Group resource. +-- +-- /See:/ 'groupsDelete' smart constructor. +data GroupsDelete = GroupsDelete + { _gdQuotaUser :: !(Maybe Text) + , _gdPrettyPrint :: !Bool + , _gdProject :: !Text + , _gdUserIp :: !(Maybe Text) + , _gdKey :: !(Maybe Text) + , _gdGroupName :: !Text + , _gdOauthToken :: !(Maybe Text) + , _gdFields :: !(Maybe Text) + , _gdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdQuotaUser' +-- +-- * 'gdPrettyPrint' +-- +-- * 'gdProject' +-- +-- * 'gdUserIp' +-- +-- * 'gdKey' +-- +-- * 'gdGroupName' +-- +-- * 'gdOauthToken' +-- +-- * 'gdFields' +-- +-- * 'gdAlt' +groupsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'groupName' + -> GroupsDelete +groupsDelete pGdProject_ pGdGroupName_ = + GroupsDelete + { _gdQuotaUser = Nothing + , _gdPrettyPrint = True + , _gdProject = pGdProject_ + , _gdUserIp = Nothing + , _gdKey = Nothing + , _gdGroupName = pGdGroupName_ + , _gdOauthToken = Nothing + , _gdFields = Nothing + , _gdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gdQuotaUser :: Lens' GroupsDelete' (Maybe Text) +gdQuotaUser + = lens _gdQuotaUser (\ s a -> s{_gdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gdPrettyPrint :: Lens' GroupsDelete' Bool +gdPrettyPrint + = lens _gdPrettyPrint + (\ s a -> s{_gdPrettyPrint = a}) + +-- | Project ID for this request. +gdProject :: Lens' GroupsDelete' Text +gdProject + = lens _gdProject (\ s a -> s{_gdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gdUserIp :: Lens' GroupsDelete' (Maybe Text) +gdUserIp = lens _gdUserIp (\ s a -> s{_gdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gdKey :: Lens' GroupsDelete' (Maybe Text) +gdKey = lens _gdKey (\ s a -> s{_gdKey = a}) + +-- | Name of the Group resource to delete. +gdGroupName :: Lens' GroupsDelete' Text +gdGroupName + = lens _gdGroupName (\ s a -> s{_gdGroupName = a}) + +-- | OAuth 2.0 token for the current user. +gdOauthToken :: Lens' GroupsDelete' (Maybe Text) +gdOauthToken + = lens _gdOauthToken (\ s a -> s{_gdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gdFields :: Lens' GroupsDelete' (Maybe Text) +gdFields = lens _gdFields (\ s a -> s{_gdFields = a}) + +-- | Data format for the response. +gdAlt :: Lens' GroupsDelete' Text +gdAlt = lens _gdAlt (\ s a -> s{_gdAlt = a}) + +instance GoogleRequest GroupsDelete' where + type Rs GroupsDelete' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsDelete{..} + = go _gdQuotaUser _gdPrettyPrint _gdProject _gdUserIp + _gdKey + _gdGroupName + _gdOauthToken + _gdFields + _gdAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsDeleteAPI) r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Get.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Get.hs new file mode 100644 index 000000000..6085fa913 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified Group resource. +-- +-- /See:/ for @ClouduseraccountsGroupsGet@. +module Clouduseraccounts.Groups.Get + ( + -- * REST Resource + GroupsGetAPI + + -- * Creating a Request + , groupsGet + , GroupsGet + + -- * Request Lenses + , ggQuotaUser + , ggPrettyPrint + , ggProject + , ggUserIp + , ggKey + , ggGroupName + , ggOauthToken + , ggFields + , ggAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsGet@ which the +-- 'GroupsGet' request conforms to. +type GroupsGetAPI = + Capture "project" Text :> + "global" :> + "groups" :> + Capture "groupName" Text :> Get '[JSON] Group + +-- | Returns the specified Group resource. +-- +-- /See:/ 'groupsGet' smart constructor. +data GroupsGet = GroupsGet + { _ggQuotaUser :: !(Maybe Text) + , _ggPrettyPrint :: !Bool + , _ggProject :: !Text + , _ggUserIp :: !(Maybe Text) + , _ggKey :: !(Maybe Text) + , _ggGroupName :: !Text + , _ggOauthToken :: !(Maybe Text) + , _ggFields :: !(Maybe Text) + , _ggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ggQuotaUser' +-- +-- * 'ggPrettyPrint' +-- +-- * 'ggProject' +-- +-- * 'ggUserIp' +-- +-- * 'ggKey' +-- +-- * 'ggGroupName' +-- +-- * 'ggOauthToken' +-- +-- * 'ggFields' +-- +-- * 'ggAlt' +groupsGet + :: Text -- ^ 'project' + -> Text -- ^ 'groupName' + -> GroupsGet +groupsGet pGgProject_ pGgGroupName_ = + GroupsGet + { _ggQuotaUser = Nothing + , _ggPrettyPrint = True + , _ggProject = pGgProject_ + , _ggUserIp = Nothing + , _ggKey = Nothing + , _ggGroupName = pGgGroupName_ + , _ggOauthToken = Nothing + , _ggFields = Nothing + , _ggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ggQuotaUser :: Lens' GroupsGet' (Maybe Text) +ggQuotaUser + = lens _ggQuotaUser (\ s a -> s{_ggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ggPrettyPrint :: Lens' GroupsGet' Bool +ggPrettyPrint + = lens _ggPrettyPrint + (\ s a -> s{_ggPrettyPrint = a}) + +-- | Project ID for this request. +ggProject :: Lens' GroupsGet' Text +ggProject + = lens _ggProject (\ s a -> s{_ggProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ggUserIp :: Lens' GroupsGet' (Maybe Text) +ggUserIp = lens _ggUserIp (\ s a -> s{_ggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ggKey :: Lens' GroupsGet' (Maybe Text) +ggKey = lens _ggKey (\ s a -> s{_ggKey = a}) + +-- | Name of the Group resource to return. +ggGroupName :: Lens' GroupsGet' Text +ggGroupName + = lens _ggGroupName (\ s a -> s{_ggGroupName = a}) + +-- | OAuth 2.0 token for the current user. +ggOauthToken :: Lens' GroupsGet' (Maybe Text) +ggOauthToken + = lens _ggOauthToken (\ s a -> s{_ggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ggFields :: Lens' GroupsGet' (Maybe Text) +ggFields = lens _ggFields (\ s a -> s{_ggFields = a}) + +-- | Data format for the response. +ggAlt :: Lens' GroupsGet' Text +ggAlt = lens _ggAlt (\ s a -> s{_ggAlt = a}) + +instance GoogleRequest GroupsGet' where + type Rs GroupsGet' = Group + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsGet{..} + = go _ggQuotaUser _ggPrettyPrint _ggProject _ggUserIp + _ggKey + _ggGroupName + _ggOauthToken + _ggFields + _ggAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsGetAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Insert.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Insert.hs new file mode 100644 index 000000000..624a4f792 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a Group resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ClouduseraccountsGroupsInsert@. +module Clouduseraccounts.Groups.Insert + ( + -- * REST Resource + GroupsInsertAPI + + -- * Creating a Request + , groupsInsert + , GroupsInsert + + -- * Request Lenses + , giQuotaUser + , giPrettyPrint + , giProject + , giUserIp + , giKey + , giOauthToken + , giFields + , giAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsInsert@ which the +-- 'GroupsInsert' request conforms to. +type GroupsInsertAPI = + Capture "project" Text :> + "global" :> "groups" :> Post '[JSON] Operation + +-- | Creates a Group resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'groupsInsert' smart constructor. +data GroupsInsert = GroupsInsert + { _giQuotaUser :: !(Maybe Text) + , _giPrettyPrint :: !Bool + , _giProject :: !Text + , _giUserIp :: !(Maybe Text) + , _giKey :: !(Maybe Text) + , _giOauthToken :: !(Maybe Text) + , _giFields :: !(Maybe Text) + , _giAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giQuotaUser' +-- +-- * 'giPrettyPrint' +-- +-- * 'giProject' +-- +-- * 'giUserIp' +-- +-- * 'giKey' +-- +-- * 'giOauthToken' +-- +-- * 'giFields' +-- +-- * 'giAlt' +groupsInsert + :: Text -- ^ 'project' + -> GroupsInsert +groupsInsert pGiProject_ = + GroupsInsert + { _giQuotaUser = Nothing + , _giPrettyPrint = True + , _giProject = pGiProject_ + , _giUserIp = Nothing + , _giKey = Nothing + , _giOauthToken = Nothing + , _giFields = Nothing + , _giAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +giQuotaUser :: Lens' GroupsInsert' (Maybe Text) +giQuotaUser + = lens _giQuotaUser (\ s a -> s{_giQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +giPrettyPrint :: Lens' GroupsInsert' Bool +giPrettyPrint + = lens _giPrettyPrint + (\ s a -> s{_giPrettyPrint = a}) + +-- | Project ID for this request. +giProject :: Lens' GroupsInsert' Text +giProject + = lens _giProject (\ s a -> s{_giProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +giUserIp :: Lens' GroupsInsert' (Maybe Text) +giUserIp = lens _giUserIp (\ s a -> s{_giUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +giKey :: Lens' GroupsInsert' (Maybe Text) +giKey = lens _giKey (\ s a -> s{_giKey = a}) + +-- | OAuth 2.0 token for the current user. +giOauthToken :: Lens' GroupsInsert' (Maybe Text) +giOauthToken + = lens _giOauthToken (\ s a -> s{_giOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +giFields :: Lens' GroupsInsert' (Maybe Text) +giFields = lens _giFields (\ s a -> s{_giFields = a}) + +-- | Data format for the response. +giAlt :: Lens' GroupsInsert' Text +giAlt = lens _giAlt (\ s a -> s{_giAlt = a}) + +instance GoogleRequest GroupsInsert' where + type Rs GroupsInsert' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsInsert{..} + = go _giQuotaUser _giPrettyPrint _giProject _giUserIp + _giKey + _giOauthToken + _giFields + _giAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsInsertAPI) r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/List.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/List.hs new file mode 100644 index 000000000..d0ad8b3de --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of groups contained within the specified project. +-- +-- /See:/ for @ClouduseraccountsGroupsList@. +module Clouduseraccounts.Groups.List + ( + -- * REST Resource + GroupsListAPI + + -- * Creating a Request + , groupsList + , GroupsList + + -- * Request Lenses + , glQuotaUser + , glPrettyPrint + , glOrderBy + , glProject + , glUserIp + , glKey + , glFilter + , glPageToken + , glOauthToken + , glMaxResults + , glFields + , glAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsList@ which the +-- 'GroupsList' request conforms to. +type GroupsListAPI = + Capture "project" Text :> + "global" :> + "groups" :> + QueryParam "orderBy" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] GroupList + +-- | Retrieves the list of groups contained within the specified project. +-- +-- /See:/ 'groupsList' smart constructor. +data GroupsList = GroupsList + { _glQuotaUser :: !(Maybe Text) + , _glPrettyPrint :: !Bool + , _glOrderBy :: !(Maybe Text) + , _glProject :: !Text + , _glUserIp :: !(Maybe Text) + , _glKey :: !(Maybe Text) + , _glFilter :: !(Maybe Text) + , _glPageToken :: !(Maybe Text) + , _glOauthToken :: !(Maybe Text) + , _glMaxResults :: !Word32 + , _glFields :: !(Maybe Text) + , _glAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glQuotaUser' +-- +-- * 'glPrettyPrint' +-- +-- * 'glOrderBy' +-- +-- * 'glProject' +-- +-- * 'glUserIp' +-- +-- * 'glKey' +-- +-- * 'glFilter' +-- +-- * 'glPageToken' +-- +-- * 'glOauthToken' +-- +-- * 'glMaxResults' +-- +-- * 'glFields' +-- +-- * 'glAlt' +groupsList + :: Text -- ^ 'project' + -> GroupsList +groupsList pGlProject_ = + GroupsList + { _glQuotaUser = Nothing + , _glPrettyPrint = True + , _glOrderBy = Nothing + , _glProject = pGlProject_ + , _glUserIp = Nothing + , _glKey = Nothing + , _glFilter = Nothing + , _glPageToken = Nothing + , _glOauthToken = Nothing + , _glMaxResults = 500 + , _glFields = Nothing + , _glAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +glQuotaUser :: Lens' GroupsList' (Maybe Text) +glQuotaUser + = lens _glQuotaUser (\ s a -> s{_glQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +glPrettyPrint :: Lens' GroupsList' Bool +glPrettyPrint + = lens _glPrettyPrint + (\ s a -> s{_glPrettyPrint = a}) + +-- | Sorts list results by a certain order. By default, results are returned +-- in alphanumerical order based on the resource name. You can also sort +-- results in descending order based on the creation timestamp using +-- orderBy=\"creationTimestamp desc\". This sorts results based on the +-- creationTimestamp field in reverse chronological order (newest result +-- first). Use this to sort resources like operations so that the newest +-- operation is returned first. Currently, only sorting by name or +-- creationTimestamp desc is supported. +glOrderBy :: Lens' GroupsList' (Maybe Text) +glOrderBy + = lens _glOrderBy (\ s a -> s{_glOrderBy = a}) + +-- | Project ID for this request. +glProject :: Lens' GroupsList' Text +glProject + = lens _glProject (\ s a -> s{_glProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +glUserIp :: Lens' GroupsList' (Maybe Text) +glUserIp = lens _glUserIp (\ s a -> s{_glUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +glKey :: Lens' GroupsList' (Maybe Text) +glKey = lens _glKey (\ s a -> s{_glKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +glFilter :: Lens' GroupsList' (Maybe Text) +glFilter = lens _glFilter (\ s a -> s{_glFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +glPageToken :: Lens' GroupsList' (Maybe Text) +glPageToken + = lens _glPageToken (\ s a -> s{_glPageToken = a}) + +-- | OAuth 2.0 token for the current user. +glOauthToken :: Lens' GroupsList' (Maybe Text) +glOauthToken + = lens _glOauthToken (\ s a -> s{_glOauthToken = a}) + +-- | Maximum count of results to be returned. +glMaxResults :: Lens' GroupsList' Word32 +glMaxResults + = lens _glMaxResults (\ s a -> s{_glMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +glFields :: Lens' GroupsList' (Maybe Text) +glFields = lens _glFields (\ s a -> s{_glFields = a}) + +-- | Data format for the response. +glAlt :: Lens' GroupsList' Text +glAlt = lens _glAlt (\ s a -> s{_glAlt = a}) + +instance GoogleRequest GroupsList' where + type Rs GroupsList' = GroupList + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsList{..} + = go _glQuotaUser _glPrettyPrint _glOrderBy + _glProject + _glUserIp + _glKey + _glFilter + _glPageToken + _glOauthToken + (Just _glMaxResults) + _glFields + _glAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsListAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/RemoveMember.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/RemoveMember.hs new file mode 100644 index 000000000..9a6dfd209 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Groups/RemoveMember.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Groups.RemoveMember +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes users from the specified group. +-- +-- /See:/ for @ClouduseraccountsGroupsRemoveMember@. +module Clouduseraccounts.Groups.RemoveMember + ( + -- * REST Resource + GroupsRemoveMemberAPI + + -- * Creating a Request + , groupsRemoveMember + , GroupsRemoveMember + + -- * Request Lenses + , grmQuotaUser + , grmPrettyPrint + , grmProject + , grmUserIp + , grmKey + , grmGroupName + , grmOauthToken + , grmFields + , grmAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsGroupsRemoveMember@ which the +-- 'GroupsRemoveMember' request conforms to. +type GroupsRemoveMemberAPI = + Capture "project" Text :> + "global" :> + "groups" :> + Capture "groupName" Text :> + "removeMember" :> Post '[JSON] Operation + +-- | Removes users from the specified group. +-- +-- /See:/ 'groupsRemoveMember' smart constructor. +data GroupsRemoveMember = GroupsRemoveMember + { _grmQuotaUser :: !(Maybe Text) + , _grmPrettyPrint :: !Bool + , _grmProject :: !Text + , _grmUserIp :: !(Maybe Text) + , _grmKey :: !(Maybe Text) + , _grmGroupName :: !Text + , _grmOauthToken :: !(Maybe Text) + , _grmFields :: !(Maybe Text) + , _grmAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsRemoveMember'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'grmQuotaUser' +-- +-- * 'grmPrettyPrint' +-- +-- * 'grmProject' +-- +-- * 'grmUserIp' +-- +-- * 'grmKey' +-- +-- * 'grmGroupName' +-- +-- * 'grmOauthToken' +-- +-- * 'grmFields' +-- +-- * 'grmAlt' +groupsRemoveMember + :: Text -- ^ 'project' + -> Text -- ^ 'groupName' + -> GroupsRemoveMember +groupsRemoveMember pGrmProject_ pGrmGroupName_ = + GroupsRemoveMember + { _grmQuotaUser = Nothing + , _grmPrettyPrint = True + , _grmProject = pGrmProject_ + , _grmUserIp = Nothing + , _grmKey = Nothing + , _grmGroupName = pGrmGroupName_ + , _grmOauthToken = Nothing + , _grmFields = Nothing + , _grmAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +grmQuotaUser :: Lens' GroupsRemoveMember' (Maybe Text) +grmQuotaUser + = lens _grmQuotaUser (\ s a -> s{_grmQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +grmPrettyPrint :: Lens' GroupsRemoveMember' Bool +grmPrettyPrint + = lens _grmPrettyPrint + (\ s a -> s{_grmPrettyPrint = a}) + +-- | Project ID for this request. +grmProject :: Lens' GroupsRemoveMember' Text +grmProject + = lens _grmProject (\ s a -> s{_grmProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +grmUserIp :: Lens' GroupsRemoveMember' (Maybe Text) +grmUserIp + = lens _grmUserIp (\ s a -> s{_grmUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +grmKey :: Lens' GroupsRemoveMember' (Maybe Text) +grmKey = lens _grmKey (\ s a -> s{_grmKey = a}) + +-- | Name of the group for this request. +grmGroupName :: Lens' GroupsRemoveMember' Text +grmGroupName + = lens _grmGroupName (\ s a -> s{_grmGroupName = a}) + +-- | OAuth 2.0 token for the current user. +grmOauthToken :: Lens' GroupsRemoveMember' (Maybe Text) +grmOauthToken + = lens _grmOauthToken + (\ s a -> s{_grmOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +grmFields :: Lens' GroupsRemoveMember' (Maybe Text) +grmFields + = lens _grmFields (\ s a -> s{_grmFields = a}) + +-- | Data format for the response. +grmAlt :: Lens' GroupsRemoveMember' Text +grmAlt = lens _grmAlt (\ s a -> s{_grmAlt = a}) + +instance GoogleRequest GroupsRemoveMember' where + type Rs GroupsRemoveMember' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u GroupsRemoveMember{..} + = go _grmQuotaUser _grmPrettyPrint _grmProject + _grmUserIp + _grmKey + _grmGroupName + _grmOauthToken + _grmFields + _grmAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupsRemoveMemberAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetAuthorizedKeysView.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetAuthorizedKeysView.hs new file mode 100644 index 000000000..39cd6ac5d --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetAuthorizedKeysView.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Linux.GetAuthorizedKeysView +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of authorized public keys for a specific user account. +-- +-- /See:/ for @ClouduseraccountsLinuxGetAuthorizedKeysView@. +module Clouduseraccounts.Linux.GetAuthorizedKeysView + ( + -- * REST Resource + LinuxGetAuthorizedKeysViewAPI + + -- * Creating a Request + , linuxGetAuthorizedKeysView + , LinuxGetAuthorizedKeysView + + -- * Request Lenses + , lgakvQuotaUser + , lgakvPrettyPrint + , lgakvProject + , lgakvUserIp + , lgakvZone + , lgakvUser + , lgakvKey + , lgakvOauthToken + , lgakvLogin + , lgakvFields + , lgakvAlt + , lgakvInstance + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsLinuxGetAuthorizedKeysView@ which the +-- 'LinuxGetAuthorizedKeysView' request conforms to. +type LinuxGetAuthorizedKeysViewAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "authorizedKeysView" :> + Capture "user" Text :> + QueryParam "login" Bool :> + QueryParam "instance" Text :> + Post '[JSON] LinuxGetAuthorizedKeysViewResponse + +-- | Returns a list of authorized public keys for a specific user account. +-- +-- /See:/ 'linuxGetAuthorizedKeysView' smart constructor. +data LinuxGetAuthorizedKeysView = LinuxGetAuthorizedKeysView + { _lgakvQuotaUser :: !(Maybe Text) + , _lgakvPrettyPrint :: !Bool + , _lgakvProject :: !Text + , _lgakvUserIp :: !(Maybe Text) + , _lgakvZone :: !Text + , _lgakvUser :: !Text + , _lgakvKey :: !(Maybe Text) + , _lgakvOauthToken :: !(Maybe Text) + , _lgakvLogin :: !(Maybe Bool) + , _lgakvFields :: !(Maybe Text) + , _lgakvAlt :: !Text + , _lgakvInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxGetAuthorizedKeysView'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgakvQuotaUser' +-- +-- * 'lgakvPrettyPrint' +-- +-- * 'lgakvProject' +-- +-- * 'lgakvUserIp' +-- +-- * 'lgakvZone' +-- +-- * 'lgakvUser' +-- +-- * 'lgakvKey' +-- +-- * 'lgakvOauthToken' +-- +-- * 'lgakvLogin' +-- +-- * 'lgakvFields' +-- +-- * 'lgakvAlt' +-- +-- * 'lgakvInstance' +linuxGetAuthorizedKeysView + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'user' + -> Text -- ^ 'instance' + -> LinuxGetAuthorizedKeysView +linuxGetAuthorizedKeysView pLgakvProject_ pLgakvZone_ pLgakvUser_ pLgakvInstance_ = + LinuxGetAuthorizedKeysView + { _lgakvQuotaUser = Nothing + , _lgakvPrettyPrint = True + , _lgakvProject = pLgakvProject_ + , _lgakvUserIp = Nothing + , _lgakvZone = pLgakvZone_ + , _lgakvUser = pLgakvUser_ + , _lgakvKey = Nothing + , _lgakvOauthToken = Nothing + , _lgakvLogin = Nothing + , _lgakvFields = Nothing + , _lgakvAlt = "json" + , _lgakvInstance = pLgakvInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgakvQuotaUser :: Lens' LinuxGetAuthorizedKeysView' (Maybe Text) +lgakvQuotaUser + = lens _lgakvQuotaUser + (\ s a -> s{_lgakvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgakvPrettyPrint :: Lens' LinuxGetAuthorizedKeysView' Bool +lgakvPrettyPrint + = lens _lgakvPrettyPrint + (\ s a -> s{_lgakvPrettyPrint = a}) + +-- | Project ID for this request. +lgakvProject :: Lens' LinuxGetAuthorizedKeysView' Text +lgakvProject + = lens _lgakvProject (\ s a -> s{_lgakvProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgakvUserIp :: Lens' LinuxGetAuthorizedKeysView' (Maybe Text) +lgakvUserIp + = lens _lgakvUserIp (\ s a -> s{_lgakvUserIp = a}) + +-- | Name of the zone for this request. +lgakvZone :: Lens' LinuxGetAuthorizedKeysView' Text +lgakvZone + = lens _lgakvZone (\ s a -> s{_lgakvZone = a}) + +-- | The user account for which you want to get a list of authorized public +-- keys. +lgakvUser :: Lens' LinuxGetAuthorizedKeysView' Text +lgakvUser + = lens _lgakvUser (\ s a -> s{_lgakvUser = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgakvKey :: Lens' LinuxGetAuthorizedKeysView' (Maybe Text) +lgakvKey = lens _lgakvKey (\ s a -> s{_lgakvKey = a}) + +-- | OAuth 2.0 token for the current user. +lgakvOauthToken :: Lens' LinuxGetAuthorizedKeysView' (Maybe Text) +lgakvOauthToken + = lens _lgakvOauthToken + (\ s a -> s{_lgakvOauthToken = a}) + +-- | Whether the view was requested as part of a user-initiated login. +lgakvLogin :: Lens' LinuxGetAuthorizedKeysView' (Maybe Bool) +lgakvLogin + = lens _lgakvLogin (\ s a -> s{_lgakvLogin = a}) + +-- | Selector specifying which fields to include in a partial response. +lgakvFields :: Lens' LinuxGetAuthorizedKeysView' (Maybe Text) +lgakvFields + = lens _lgakvFields (\ s a -> s{_lgakvFields = a}) + +-- | Data format for the response. +lgakvAlt :: Lens' LinuxGetAuthorizedKeysView' Text +lgakvAlt = lens _lgakvAlt (\ s a -> s{_lgakvAlt = a}) + +-- | The fully-qualified URL of the virtual machine requesting the view. +lgakvInstance :: Lens' LinuxGetAuthorizedKeysView' Text +lgakvInstance + = lens _lgakvInstance + (\ s a -> s{_lgakvInstance = a}) + +instance GoogleRequest LinuxGetAuthorizedKeysView' + where + type Rs LinuxGetAuthorizedKeysView' = + LinuxGetAuthorizedKeysViewResponse + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u LinuxGetAuthorizedKeysView{..} + = go _lgakvQuotaUser _lgakvPrettyPrint _lgakvProject + _lgakvUserIp + _lgakvZone + _lgakvUser + _lgakvKey + _lgakvOauthToken + _lgakvLogin + _lgakvFields + _lgakvAlt + (Just _lgakvInstance) + where go + = clientWithRoute + (Proxy :: Proxy LinuxGetAuthorizedKeysViewAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetLinuxAccountViews.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetLinuxAccountViews.hs new file mode 100644 index 000000000..5e2bf71d6 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Linux/GetLinuxAccountViews.hs @@ -0,0 +1,262 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Linux.GetLinuxAccountViews +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of user accounts for an instance within a specific +-- project. +-- +-- /See:/ for @ClouduseraccountsLinuxGetLinuxAccountViews@. +module Clouduseraccounts.Linux.GetLinuxAccountViews + ( + -- * REST Resource + LinuxGetLinuxAccountViewsAPI + + -- * Creating a Request + , linuxGetLinuxAccountViews + , LinuxGetLinuxAccountViews + + -- * Request Lenses + , lglavQuotaUser + , lglavPrettyPrint + , lglavOrderBy + , lglavProject + , lglavUserIp + , lglavZone + , lglavKey + , lglavFilter + , lglavPageToken + , lglavOauthToken + , lglavMaxResults + , lglavFields + , lglavAlt + , lglavInstance + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsLinuxGetLinuxAccountViews@ which the +-- 'LinuxGetLinuxAccountViews' request conforms to. +type LinuxGetLinuxAccountViewsAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "linuxAccountViews" :> + QueryParam "orderBy" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "instance" Text :> + Post '[JSON] LinuxGetLinuxAccountViewsResponse + +-- | Retrieves a list of user accounts for an instance within a specific +-- project. +-- +-- /See:/ 'linuxGetLinuxAccountViews' smart constructor. +data LinuxGetLinuxAccountViews = LinuxGetLinuxAccountViews + { _lglavQuotaUser :: !(Maybe Text) + , _lglavPrettyPrint :: !Bool + , _lglavOrderBy :: !(Maybe Text) + , _lglavProject :: !Text + , _lglavUserIp :: !(Maybe Text) + , _lglavZone :: !Text + , _lglavKey :: !(Maybe Text) + , _lglavFilter :: !(Maybe Text) + , _lglavPageToken :: !(Maybe Text) + , _lglavOauthToken :: !(Maybe Text) + , _lglavMaxResults :: !Word32 + , _lglavFields :: !(Maybe Text) + , _lglavAlt :: !Text + , _lglavInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinuxGetLinuxAccountViews'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lglavQuotaUser' +-- +-- * 'lglavPrettyPrint' +-- +-- * 'lglavOrderBy' +-- +-- * 'lglavProject' +-- +-- * 'lglavUserIp' +-- +-- * 'lglavZone' +-- +-- * 'lglavKey' +-- +-- * 'lglavFilter' +-- +-- * 'lglavPageToken' +-- +-- * 'lglavOauthToken' +-- +-- * 'lglavMaxResults' +-- +-- * 'lglavFields' +-- +-- * 'lglavAlt' +-- +-- * 'lglavInstance' +linuxGetLinuxAccountViews + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> LinuxGetLinuxAccountViews +linuxGetLinuxAccountViews pLglavProject_ pLglavZone_ pLglavInstance_ = + LinuxGetLinuxAccountViews + { _lglavQuotaUser = Nothing + , _lglavPrettyPrint = True + , _lglavOrderBy = Nothing + , _lglavProject = pLglavProject_ + , _lglavUserIp = Nothing + , _lglavZone = pLglavZone_ + , _lglavKey = Nothing + , _lglavFilter = Nothing + , _lglavPageToken = Nothing + , _lglavOauthToken = Nothing + , _lglavMaxResults = 500 + , _lglavFields = Nothing + , _lglavAlt = "json" + , _lglavInstance = pLglavInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lglavQuotaUser :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavQuotaUser + = lens _lglavQuotaUser + (\ s a -> s{_lglavQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lglavPrettyPrint :: Lens' LinuxGetLinuxAccountViews' Bool +lglavPrettyPrint + = lens _lglavPrettyPrint + (\ s a -> s{_lglavPrettyPrint = a}) + +-- | Sorts list results by a certain order. By default, results are returned +-- in alphanumerical order based on the resource name. You can also sort +-- results in descending order based on the creation timestamp using +-- orderBy=\"creationTimestamp desc\". This sorts results based on the +-- creationTimestamp field in reverse chronological order (newest result +-- first). Use this to sort resources like operations so that the newest +-- operation is returned first. Currently, only sorting by name or +-- creationTimestamp desc is supported. +lglavOrderBy :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavOrderBy + = lens _lglavOrderBy (\ s a -> s{_lglavOrderBy = a}) + +-- | Project ID for this request. +lglavProject :: Lens' LinuxGetLinuxAccountViews' Text +lglavProject + = lens _lglavProject (\ s a -> s{_lglavProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lglavUserIp :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavUserIp + = lens _lglavUserIp (\ s a -> s{_lglavUserIp = a}) + +-- | Name of the zone for this request. +lglavZone :: Lens' LinuxGetLinuxAccountViews' Text +lglavZone + = lens _lglavZone (\ s a -> s{_lglavZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lglavKey :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavKey = lens _lglavKey (\ s a -> s{_lglavKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +lglavFilter :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavFilter + = lens _lglavFilter (\ s a -> s{_lglavFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +lglavPageToken :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavPageToken + = lens _lglavPageToken + (\ s a -> s{_lglavPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lglavOauthToken :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavOauthToken + = lens _lglavOauthToken + (\ s a -> s{_lglavOauthToken = a}) + +-- | Maximum count of results to be returned. +lglavMaxResults :: Lens' LinuxGetLinuxAccountViews' Word32 +lglavMaxResults + = lens _lglavMaxResults + (\ s a -> s{_lglavMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lglavFields :: Lens' LinuxGetLinuxAccountViews' (Maybe Text) +lglavFields + = lens _lglavFields (\ s a -> s{_lglavFields = a}) + +-- | Data format for the response. +lglavAlt :: Lens' LinuxGetLinuxAccountViews' Text +lglavAlt = lens _lglavAlt (\ s a -> s{_lglavAlt = a}) + +-- | The fully-qualified URL of the virtual machine requesting the views. +lglavInstance :: Lens' LinuxGetLinuxAccountViews' Text +lglavInstance + = lens _lglavInstance + (\ s a -> s{_lglavInstance = a}) + +instance GoogleRequest LinuxGetLinuxAccountViews' + where + type Rs LinuxGetLinuxAccountViews' = + LinuxGetLinuxAccountViewsResponse + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u LinuxGetLinuxAccountViews{..} + = go _lglavQuotaUser _lglavPrettyPrint _lglavOrderBy + _lglavProject + _lglavUserIp + _lglavZone + _lglavKey + _lglavFilter + _lglavPageToken + _lglavOauthToken + (Just _lglavMaxResults) + _lglavFields + _lglavAlt + (Just _lglavInstance) + where go + = clientWithRoute + (Proxy :: Proxy LinuxGetLinuxAccountViewsAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/AddPublicKey.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/AddPublicKey.hs new file mode 100644 index 000000000..34bfaaab4 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/AddPublicKey.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.AddPublicKey +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a public key to the specified User resource with the data included +-- in the request. +-- +-- /See:/ for @ClouduseraccountsUsersAddPublicKey@. +module Clouduseraccounts.Users.AddPublicKey + ( + -- * REST Resource + UsersAddPublicKeyAPI + + -- * Creating a Request + , usersAddPublicKey + , UsersAddPublicKey + + -- * Request Lenses + , uapkQuotaUser + , uapkPrettyPrint + , uapkProject + , uapkUserIp + , uapkUser + , uapkKey + , uapkOauthToken + , uapkFields + , uapkAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersAddPublicKey@ which the +-- 'UsersAddPublicKey' request conforms to. +type UsersAddPublicKeyAPI = + Capture "project" Text :> + "global" :> + "users" :> + Capture "user" Text :> + "addPublicKey" :> Post '[JSON] Operation + +-- | Adds a public key to the specified User resource with the data included +-- in the request. +-- +-- /See:/ 'usersAddPublicKey' smart constructor. +data UsersAddPublicKey = UsersAddPublicKey + { _uapkQuotaUser :: !(Maybe Text) + , _uapkPrettyPrint :: !Bool + , _uapkProject :: !Text + , _uapkUserIp :: !(Maybe Text) + , _uapkUser :: !Text + , _uapkKey :: !(Maybe Text) + , _uapkOauthToken :: !(Maybe Text) + , _uapkFields :: !(Maybe Text) + , _uapkAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersAddPublicKey'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uapkQuotaUser' +-- +-- * 'uapkPrettyPrint' +-- +-- * 'uapkProject' +-- +-- * 'uapkUserIp' +-- +-- * 'uapkUser' +-- +-- * 'uapkKey' +-- +-- * 'uapkOauthToken' +-- +-- * 'uapkFields' +-- +-- * 'uapkAlt' +usersAddPublicKey + :: Text -- ^ 'project' + -> Text -- ^ 'user' + -> UsersAddPublicKey +usersAddPublicKey pUapkProject_ pUapkUser_ = + UsersAddPublicKey + { _uapkQuotaUser = Nothing + , _uapkPrettyPrint = True + , _uapkProject = pUapkProject_ + , _uapkUserIp = Nothing + , _uapkUser = pUapkUser_ + , _uapkKey = Nothing + , _uapkOauthToken = Nothing + , _uapkFields = Nothing + , _uapkAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uapkQuotaUser :: Lens' UsersAddPublicKey' (Maybe Text) +uapkQuotaUser + = lens _uapkQuotaUser + (\ s a -> s{_uapkQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uapkPrettyPrint :: Lens' UsersAddPublicKey' Bool +uapkPrettyPrint + = lens _uapkPrettyPrint + (\ s a -> s{_uapkPrettyPrint = a}) + +-- | Project ID for this request. +uapkProject :: Lens' UsersAddPublicKey' Text +uapkProject + = lens _uapkProject (\ s a -> s{_uapkProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uapkUserIp :: Lens' UsersAddPublicKey' (Maybe Text) +uapkUserIp + = lens _uapkUserIp (\ s a -> s{_uapkUserIp = a}) + +-- | Name of the user for this request. +uapkUser :: Lens' UsersAddPublicKey' Text +uapkUser = lens _uapkUser (\ s a -> s{_uapkUser = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uapkKey :: Lens' UsersAddPublicKey' (Maybe Text) +uapkKey = lens _uapkKey (\ s a -> s{_uapkKey = a}) + +-- | OAuth 2.0 token for the current user. +uapkOauthToken :: Lens' UsersAddPublicKey' (Maybe Text) +uapkOauthToken + = lens _uapkOauthToken + (\ s a -> s{_uapkOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uapkFields :: Lens' UsersAddPublicKey' (Maybe Text) +uapkFields + = lens _uapkFields (\ s a -> s{_uapkFields = a}) + +-- | Data format for the response. +uapkAlt :: Lens' UsersAddPublicKey' Text +uapkAlt = lens _uapkAlt (\ s a -> s{_uapkAlt = a}) + +instance GoogleRequest UsersAddPublicKey' where + type Rs UsersAddPublicKey' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersAddPublicKey{..} + = go _uapkQuotaUser _uapkPrettyPrint _uapkProject + _uapkUserIp + _uapkUser + _uapkKey + _uapkOauthToken + _uapkFields + _uapkAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersAddPublicKeyAPI) + r + u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Delete.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Delete.hs new file mode 100644 index 000000000..2b28e9484 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Delete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified User resource. +-- +-- /See:/ for @ClouduseraccountsUsersDelete@. +module Clouduseraccounts.Users.Delete + ( + -- * REST Resource + UsersDeleteAPI + + -- * Creating a Request + , usersDelete + , UsersDelete + + -- * Request Lenses + , udQuotaUser + , udPrettyPrint + , udProject + , udUserIp + , udUser + , udKey + , udOauthToken + , udFields + , udAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersDelete@ which the +-- 'UsersDelete' request conforms to. +type UsersDeleteAPI = + Capture "project" Text :> + "global" :> + "users" :> + Capture "user" Text :> Delete '[JSON] Operation + +-- | Deletes the specified User resource. +-- +-- /See:/ 'usersDelete' smart constructor. +data UsersDelete = UsersDelete + { _udQuotaUser :: !(Maybe Text) + , _udPrettyPrint :: !Bool + , _udProject :: !Text + , _udUserIp :: !(Maybe Text) + , _udUser :: !Text + , _udKey :: !(Maybe Text) + , _udOauthToken :: !(Maybe Text) + , _udFields :: !(Maybe Text) + , _udAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udQuotaUser' +-- +-- * 'udPrettyPrint' +-- +-- * 'udProject' +-- +-- * 'udUserIp' +-- +-- * 'udUser' +-- +-- * 'udKey' +-- +-- * 'udOauthToken' +-- +-- * 'udFields' +-- +-- * 'udAlt' +usersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'user' + -> UsersDelete +usersDelete pUdProject_ pUdUser_ = + UsersDelete + { _udQuotaUser = Nothing + , _udPrettyPrint = True + , _udProject = pUdProject_ + , _udUserIp = Nothing + , _udUser = pUdUser_ + , _udKey = Nothing + , _udOauthToken = Nothing + , _udFields = Nothing + , _udAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udQuotaUser :: Lens' UsersDelete' (Maybe Text) +udQuotaUser + = lens _udQuotaUser (\ s a -> s{_udQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udPrettyPrint :: Lens' UsersDelete' Bool +udPrettyPrint + = lens _udPrettyPrint + (\ s a -> s{_udPrettyPrint = a}) + +-- | Project ID for this request. +udProject :: Lens' UsersDelete' Text +udProject + = lens _udProject (\ s a -> s{_udProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udUserIp :: Lens' UsersDelete' (Maybe Text) +udUserIp = lens _udUserIp (\ s a -> s{_udUserIp = a}) + +-- | Name of the user resource to delete. +udUser :: Lens' UsersDelete' Text +udUser = lens _udUser (\ s a -> s{_udUser = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udKey :: Lens' UsersDelete' (Maybe Text) +udKey = lens _udKey (\ s a -> s{_udKey = a}) + +-- | OAuth 2.0 token for the current user. +udOauthToken :: Lens' UsersDelete' (Maybe Text) +udOauthToken + = lens _udOauthToken (\ s a -> s{_udOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udFields :: Lens' UsersDelete' (Maybe Text) +udFields = lens _udFields (\ s a -> s{_udFields = a}) + +-- | Data format for the response. +udAlt :: Lens' UsersDelete' Text +udAlt = lens _udAlt (\ s a -> s{_udAlt = a}) + +instance GoogleRequest UsersDelete' where + type Rs UsersDelete' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersDelete{..} + = go _udQuotaUser _udPrettyPrint _udProject _udUserIp + _udUser + _udKey + _udOauthToken + _udFields + _udAlt + where go + = clientWithRoute (Proxy :: Proxy UsersDeleteAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Get.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Get.hs new file mode 100644 index 000000000..30c42601d --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified User resource. +-- +-- /See:/ for @ClouduseraccountsUsersGet@. +module Clouduseraccounts.Users.Get + ( + -- * REST Resource + UsersGetAPI + + -- * Creating a Request + , usersGet + , UsersGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugProject + , ugUserIp + , ugUser + , ugKey + , ugOauthToken + , ugFields + , ugAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersGet@ which the +-- 'UsersGet' request conforms to. +type UsersGetAPI = + Capture "project" Text :> + "global" :> + "users" :> Capture "user" Text :> Get '[JSON] User + +-- | Returns the specified User resource. +-- +-- /See:/ 'usersGet' smart constructor. +data UsersGet = UsersGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugProject :: !Text + , _ugUserIp :: !(Maybe Text) + , _ugUser :: !Text + , _ugKey :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugProject' +-- +-- * 'ugUserIp' +-- +-- * 'ugUser' +-- +-- * 'ugKey' +-- +-- * 'ugOauthToken' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +usersGet + :: Text -- ^ 'project' + -> Text -- ^ 'user' + -> UsersGet +usersGet pUgProject_ pUgUser_ = + UsersGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugProject = pUgProject_ + , _ugUserIp = Nothing + , _ugUser = pUgUser_ + , _ugKey = Nothing + , _ugOauthToken = Nothing + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' UsersGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' UsersGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | Project ID for this request. +ugProject :: Lens' UsersGet' Text +ugProject + = lens _ugProject (\ s a -> s{_ugProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' UsersGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | Name of the user resource to return. +ugUser :: Lens' UsersGet' Text +ugUser = lens _ugUser (\ s a -> s{_ugUser = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' UsersGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' UsersGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' UsersGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' UsersGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest UsersGet' where + type Rs UsersGet' = User + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersGet{..} + = go _ugQuotaUser _ugPrettyPrint _ugProject _ugUserIp + _ugUser + _ugKey + _ugOauthToken + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UsersGetAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Insert.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Insert.hs new file mode 100644 index 000000000..ca45cb5b5 --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a User resource in the specified project using the data included +-- in the request. +-- +-- /See:/ for @ClouduseraccountsUsersInsert@. +module Clouduseraccounts.Users.Insert + ( + -- * REST Resource + UsersInsertAPI + + -- * Creating a Request + , usersInsert + , UsersInsert + + -- * Request Lenses + , uiQuotaUser + , uiPrettyPrint + , uiProject + , uiUserIp + , uiKey + , uiOauthToken + , uiFields + , uiAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersInsert@ which the +-- 'UsersInsert' request conforms to. +type UsersInsertAPI = + Capture "project" Text :> + "global" :> "users" :> Post '[JSON] Operation + +-- | Creates a User resource in the specified project using the data included +-- in the request. +-- +-- /See:/ 'usersInsert' smart constructor. +data UsersInsert = UsersInsert + { _uiQuotaUser :: !(Maybe Text) + , _uiPrettyPrint :: !Bool + , _uiProject :: !Text + , _uiUserIp :: !(Maybe Text) + , _uiKey :: !(Maybe Text) + , _uiOauthToken :: !(Maybe Text) + , _uiFields :: !(Maybe Text) + , _uiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiQuotaUser' +-- +-- * 'uiPrettyPrint' +-- +-- * 'uiProject' +-- +-- * 'uiUserIp' +-- +-- * 'uiKey' +-- +-- * 'uiOauthToken' +-- +-- * 'uiFields' +-- +-- * 'uiAlt' +usersInsert + :: Text -- ^ 'project' + -> UsersInsert +usersInsert pUiProject_ = + UsersInsert + { _uiQuotaUser = Nothing + , _uiPrettyPrint = True + , _uiProject = pUiProject_ + , _uiUserIp = Nothing + , _uiKey = Nothing + , _uiOauthToken = Nothing + , _uiFields = Nothing + , _uiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uiQuotaUser :: Lens' UsersInsert' (Maybe Text) +uiQuotaUser + = lens _uiQuotaUser (\ s a -> s{_uiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uiPrettyPrint :: Lens' UsersInsert' Bool +uiPrettyPrint + = lens _uiPrettyPrint + (\ s a -> s{_uiPrettyPrint = a}) + +-- | Project ID for this request. +uiProject :: Lens' UsersInsert' Text +uiProject + = lens _uiProject (\ s a -> s{_uiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uiUserIp :: Lens' UsersInsert' (Maybe Text) +uiUserIp = lens _uiUserIp (\ s a -> s{_uiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uiKey :: Lens' UsersInsert' (Maybe Text) +uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) + +-- | OAuth 2.0 token for the current user. +uiOauthToken :: Lens' UsersInsert' (Maybe Text) +uiOauthToken + = lens _uiOauthToken (\ s a -> s{_uiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uiFields :: Lens' UsersInsert' (Maybe Text) +uiFields = lens _uiFields (\ s a -> s{_uiFields = a}) + +-- | Data format for the response. +uiAlt :: Lens' UsersInsert' Text +uiAlt = lens _uiAlt (\ s a -> s{_uiAlt = a}) + +instance GoogleRequest UsersInsert' where + type Rs UsersInsert' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersInsert{..} + = go _uiQuotaUser _uiPrettyPrint _uiProject _uiUserIp + _uiKey + _uiOauthToken + _uiFields + _uiAlt + where go + = clientWithRoute (Proxy :: Proxy UsersInsertAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/List.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/List.hs new file mode 100644 index 000000000..7b99a2eaa --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of users contained within the specified project. +-- +-- /See:/ for @ClouduseraccountsUsersList@. +module Clouduseraccounts.Users.List + ( + -- * REST Resource + UsersListAPI + + -- * Creating a Request + , usersList + , UsersList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulOrderBy + , ulProject + , ulUserIp + , ulKey + , ulFilter + , ulPageToken + , ulOauthToken + , ulMaxResults + , ulFields + , ulAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersList@ which the +-- 'UsersList' request conforms to. +type UsersListAPI = + Capture "project" Text :> + "global" :> + "users" :> + QueryParam "orderBy" Text :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] UserList + +-- | Retrieves a list of users contained within the specified project. +-- +-- /See:/ 'usersList' smart constructor. +data UsersList = UsersList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulOrderBy :: !(Maybe Text) + , _ulProject :: !Text + , _ulUserIp :: !(Maybe Text) + , _ulKey :: !(Maybe Text) + , _ulFilter :: !(Maybe Text) + , _ulPageToken :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulMaxResults :: !Word32 + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulOrderBy' +-- +-- * 'ulProject' +-- +-- * 'ulUserIp' +-- +-- * 'ulKey' +-- +-- * 'ulFilter' +-- +-- * 'ulPageToken' +-- +-- * 'ulOauthToken' +-- +-- * 'ulMaxResults' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +usersList + :: Text -- ^ 'project' + -> UsersList +usersList pUlProject_ = + UsersList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulOrderBy = Nothing + , _ulProject = pUlProject_ + , _ulUserIp = Nothing + , _ulKey = Nothing + , _ulFilter = Nothing + , _ulPageToken = Nothing + , _ulOauthToken = Nothing + , _ulMaxResults = 500 + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' UsersList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' UsersList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | Sorts list results by a certain order. By default, results are returned +-- in alphanumerical order based on the resource name. You can also sort +-- results in descending order based on the creation timestamp using +-- orderBy=\"creationTimestamp desc\". This sorts results based on the +-- creationTimestamp field in reverse chronological order (newest result +-- first). Use this to sort resources like operations so that the newest +-- operation is returned first. Currently, only sorting by name or +-- creationTimestamp desc is supported. +ulOrderBy :: Lens' UsersList' (Maybe Text) +ulOrderBy + = lens _ulOrderBy (\ s a -> s{_ulOrderBy = a}) + +-- | Project ID for this request. +ulProject :: Lens' UsersList' Text +ulProject + = lens _ulProject (\ s a -> s{_ulProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' UsersList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' UsersList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +ulFilter :: Lens' UsersList' (Maybe Text) +ulFilter = lens _ulFilter (\ s a -> s{_ulFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +ulPageToken :: Lens' UsersList' (Maybe Text) +ulPageToken + = lens _ulPageToken (\ s a -> s{_ulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' UsersList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Maximum count of results to be returned. +ulMaxResults :: Lens' UsersList' Word32 +ulMaxResults + = lens _ulMaxResults (\ s a -> s{_ulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' UsersList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' UsersList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest UsersList' where + type Rs UsersList' = UserList + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersList{..} + = go _ulQuotaUser _ulPrettyPrint _ulOrderBy + _ulProject + _ulUserIp + _ulKey + _ulFilter + _ulPageToken + _ulOauthToken + (Just _ulMaxResults) + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UsersListAPI) r u diff --git a/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/RemovePublicKey.hs b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/RemovePublicKey.hs new file mode 100644 index 000000000..bd8d9b6fb --- /dev/null +++ b/gogol-compute-useraccounts/gen/Network/Google/Resource/Clouduseraccounts/Users/RemovePublicKey.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouduseraccounts.Users.RemovePublicKey +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the specified public key from the user. +-- +-- /See:/ for @ClouduseraccountsUsersRemovePublicKey@. +module Clouduseraccounts.Users.RemovePublicKey + ( + -- * REST Resource + UsersRemovePublicKeyAPI + + -- * Creating a Request + , usersRemovePublicKey + , UsersRemovePublicKey + + -- * Request Lenses + , urpkQuotaUser + , urpkPrettyPrint + , urpkProject + , urpkUserIp + , urpkFingerprint + , urpkUser + , urpkKey + , urpkOauthToken + , urpkFields + , urpkAlt + ) where + +import Network.Google.ComputeUserAccounts.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouduseraccountsUsersRemovePublicKey@ which the +-- 'UsersRemovePublicKey' request conforms to. +type UsersRemovePublicKeyAPI = + Capture "project" Text :> + "global" :> + "users" :> + Capture "user" Text :> + "removePublicKey" :> + QueryParam "fingerprint" Text :> + Post '[JSON] Operation + +-- | Removes the specified public key from the user. +-- +-- /See:/ 'usersRemovePublicKey' smart constructor. +data UsersRemovePublicKey = UsersRemovePublicKey + { _urpkQuotaUser :: !(Maybe Text) + , _urpkPrettyPrint :: !Bool + , _urpkProject :: !Text + , _urpkUserIp :: !(Maybe Text) + , _urpkFingerprint :: !Text + , _urpkUser :: !Text + , _urpkKey :: !(Maybe Text) + , _urpkOauthToken :: !(Maybe Text) + , _urpkFields :: !(Maybe Text) + , _urpkAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersRemovePublicKey'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpkQuotaUser' +-- +-- * 'urpkPrettyPrint' +-- +-- * 'urpkProject' +-- +-- * 'urpkUserIp' +-- +-- * 'urpkFingerprint' +-- +-- * 'urpkUser' +-- +-- * 'urpkKey' +-- +-- * 'urpkOauthToken' +-- +-- * 'urpkFields' +-- +-- * 'urpkAlt' +usersRemovePublicKey + :: Text -- ^ 'project' + -> Text -- ^ 'fingerprint' + -> Text -- ^ 'user' + -> UsersRemovePublicKey +usersRemovePublicKey pUrpkProject_ pUrpkFingerprint_ pUrpkUser_ = + UsersRemovePublicKey + { _urpkQuotaUser = Nothing + , _urpkPrettyPrint = True + , _urpkProject = pUrpkProject_ + , _urpkUserIp = Nothing + , _urpkFingerprint = pUrpkFingerprint_ + , _urpkUser = pUrpkUser_ + , _urpkKey = Nothing + , _urpkOauthToken = Nothing + , _urpkFields = Nothing + , _urpkAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urpkQuotaUser :: Lens' UsersRemovePublicKey' (Maybe Text) +urpkQuotaUser + = lens _urpkQuotaUser + (\ s a -> s{_urpkQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urpkPrettyPrint :: Lens' UsersRemovePublicKey' Bool +urpkPrettyPrint + = lens _urpkPrettyPrint + (\ s a -> s{_urpkPrettyPrint = a}) + +-- | Project ID for this request. +urpkProject :: Lens' UsersRemovePublicKey' Text +urpkProject + = lens _urpkProject (\ s a -> s{_urpkProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urpkUserIp :: Lens' UsersRemovePublicKey' (Maybe Text) +urpkUserIp + = lens _urpkUserIp (\ s a -> s{_urpkUserIp = a}) + +-- | The fingerprint of the public key to delete. Public keys are identified +-- by their fingerprint, which is defined by RFC4716 to be the MD5 digest +-- of the public key. +urpkFingerprint :: Lens' UsersRemovePublicKey' Text +urpkFingerprint + = lens _urpkFingerprint + (\ s a -> s{_urpkFingerprint = a}) + +-- | Name of the user for this request. +urpkUser :: Lens' UsersRemovePublicKey' Text +urpkUser = lens _urpkUser (\ s a -> s{_urpkUser = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urpkKey :: Lens' UsersRemovePublicKey' (Maybe Text) +urpkKey = lens _urpkKey (\ s a -> s{_urpkKey = a}) + +-- | OAuth 2.0 token for the current user. +urpkOauthToken :: Lens' UsersRemovePublicKey' (Maybe Text) +urpkOauthToken + = lens _urpkOauthToken + (\ s a -> s{_urpkOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urpkFields :: Lens' UsersRemovePublicKey' (Maybe Text) +urpkFields + = lens _urpkFields (\ s a -> s{_urpkFields = a}) + +-- | Data format for the response. +urpkAlt :: Lens' UsersRemovePublicKey' Text +urpkAlt = lens _urpkAlt (\ s a -> s{_urpkAlt = a}) + +instance GoogleRequest UsersRemovePublicKey' where + type Rs UsersRemovePublicKey' = Operation + request + = requestWithRoute defReq computeUserAccountsURL + requestWithRoute r u UsersRemovePublicKey{..} + = go _urpkQuotaUser _urpkPrettyPrint _urpkProject + _urpkUserIp + (Just _urpkFingerprint) + _urpkUser + _urpkKey + _urpkOauthToken + _urpkFields + _urpkAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersRemovePublicKeyAPI) + r + u diff --git a/gogol-compute-useraccounts/gogol-compute-useraccounts.cabal b/gogol-compute-useraccounts/gogol-compute-useraccounts.cabal new file mode 100644 index 000000000..b6d597598 --- /dev/null +++ b/gogol-compute-useraccounts/gogol-compute-useraccounts.cabal @@ -0,0 +1,59 @@ +name: gogol-compute-useraccounts +version: 0.0.1 +synopsis: Cloud User Accounts API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for the Google Cloud User Accounts service. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.ComputeUserAccounts + , Network.Google.ComputeUserAccounts.Types + , Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Delete + , Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.Get + , Network.Google.Resource.Clouduseraccounts.GlobalAccountsOperations.List + , Network.Google.Resource.Clouduseraccounts.Groups.AddMember + , Network.Google.Resource.Clouduseraccounts.Groups.Delete + , Network.Google.Resource.Clouduseraccounts.Groups.Get + , Network.Google.Resource.Clouduseraccounts.Groups.Insert + , Network.Google.Resource.Clouduseraccounts.Groups.List + , Network.Google.Resource.Clouduseraccounts.Groups.RemoveMember + , Network.Google.Resource.Clouduseraccounts.Linux.GetAuthorizedKeysView + , Network.Google.Resource.Clouduseraccounts.Linux.GetLinuxAccountViews + , Network.Google.Resource.Clouduseraccounts.Users.AddPublicKey + , Network.Google.Resource.Clouduseraccounts.Users.Delete + , Network.Google.Resource.Clouduseraccounts.Users.Get + , Network.Google.Resource.Clouduseraccounts.Users.Insert + , Network.Google.Resource.Clouduseraccounts.Users.List + , Network.Google.Resource.Clouduseraccounts.Users.RemovePublicKey + + other-modules: + Network.Google.ComputeUserAccounts.Types.Product + , Network.Google.ComputeUserAccounts.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-compute-useraccounts/src/.gitkeep b/gogol-compute-useraccounts/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-compute/LICENSE b/gogol-compute/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-compute/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-compute/Makefile b/gogol-compute/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-compute/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-compute/README.md b/gogol-compute/README.md new file mode 100644 index 000000000..d42339897 --- /dev/null +++ b/gogol-compute/README.md @@ -0,0 +1,28 @@ +# gogol-compute + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Compute Engine API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-compute` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-compute/Setup.hs b/gogol-compute/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-compute/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-compute/gen/Network/Google/Compute.hs b/gogol-compute/gen/Network/Google/Compute.hs new file mode 100644 index 000000000..7927717c0 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Compute.hs @@ -0,0 +1,2032 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Compute +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for the Google Compute Engine service. +-- +-- /See:/ +module Network.Google.Compute + ( + -- * API + ComputeAPI + , computeAPI + , computeURL + + -- * Service Methods + + -- * REST Resources + + -- ** ComputeAddressesAggregatedList + , module Compute.Addresses.AggregatedList + + -- ** ComputeAddressesDelete + , module Compute.Addresses.Delete + + -- ** ComputeAddressesGet + , module Compute.Addresses.Get + + -- ** ComputeAddressesInsert + , module Compute.Addresses.Insert + + -- ** ComputeAddressesList + , module Compute.Addresses.List + + -- ** ComputeAutoscalersAggregatedList + , module Compute.Autoscalers.AggregatedList + + -- ** ComputeAutoscalersDelete + , module Compute.Autoscalers.Delete + + -- ** ComputeAutoscalersGet + , module Compute.Autoscalers.Get + + -- ** ComputeAutoscalersInsert + , module Compute.Autoscalers.Insert + + -- ** ComputeAutoscalersList + , module Compute.Autoscalers.List + + -- ** ComputeAutoscalersPatch + , module Compute.Autoscalers.Patch + + -- ** ComputeAutoscalersUpdate + , module Compute.Autoscalers.Update + + -- ** ComputeBackendServicesDelete + , module Compute.BackendServices.Delete + + -- ** ComputeBackendServicesGet + , module Compute.BackendServices.Get + + -- ** ComputeBackendServicesGetHealth + , module Compute.BackendServices.GetHealth + + -- ** ComputeBackendServicesInsert + , module Compute.BackendServices.Insert + + -- ** ComputeBackendServicesList + , module Compute.BackendServices.List + + -- ** ComputeBackendServicesPatch + , module Compute.BackendServices.Patch + + -- ** ComputeBackendServicesUpdate + , module Compute.BackendServices.Update + + -- ** ComputeDiskTypesAggregatedList + , module Compute.DiskTypes.AggregatedList + + -- ** ComputeDiskTypesGet + , module Compute.DiskTypes.Get + + -- ** ComputeDiskTypesList + , module Compute.DiskTypes.List + + -- ** ComputeDisksAggregatedList + , module Compute.Disks.AggregatedList + + -- ** ComputeDisksCreateSnapshot + , module Compute.Disks.CreateSnapshot + + -- ** ComputeDisksDelete + , module Compute.Disks.Delete + + -- ** ComputeDisksGet + , module Compute.Disks.Get + + -- ** ComputeDisksInsert + , module Compute.Disks.Insert + + -- ** ComputeDisksList + , module Compute.Disks.List + + -- ** ComputeFirewallsDelete + , module Compute.Firewalls.Delete + + -- ** ComputeFirewallsGet + , module Compute.Firewalls.Get + + -- ** ComputeFirewallsInsert + , module Compute.Firewalls.Insert + + -- ** ComputeFirewallsList + , module Compute.Firewalls.List + + -- ** ComputeFirewallsPatch + , module Compute.Firewalls.Patch + + -- ** ComputeFirewallsUpdate + , module Compute.Firewalls.Update + + -- ** ComputeForwardingRulesAggregatedList + , module Compute.ForwardingRules.AggregatedList + + -- ** ComputeForwardingRulesDelete + , module Compute.ForwardingRules.Delete + + -- ** ComputeForwardingRulesGet + , module Compute.ForwardingRules.Get + + -- ** ComputeForwardingRulesInsert + , module Compute.ForwardingRules.Insert + + -- ** ComputeForwardingRulesList + , module Compute.ForwardingRules.List + + -- ** ComputeForwardingRulesSetTarget + , module Compute.ForwardingRules.SetTarget + + -- ** ComputeGlobalAddressesDelete + , module Compute.GlobalAddresses.Delete + + -- ** ComputeGlobalAddressesGet + , module Compute.GlobalAddresses.Get + + -- ** ComputeGlobalAddressesInsert + , module Compute.GlobalAddresses.Insert + + -- ** ComputeGlobalAddressesList + , module Compute.GlobalAddresses.List + + -- ** ComputeGlobalForwardingRulesDelete + , module Compute.GlobalForwardingRules.Delete + + -- ** ComputeGlobalForwardingRulesGet + , module Compute.GlobalForwardingRules.Get + + -- ** ComputeGlobalForwardingRulesInsert + , module Compute.GlobalForwardingRules.Insert + + -- ** ComputeGlobalForwardingRulesList + , module Compute.GlobalForwardingRules.List + + -- ** ComputeGlobalForwardingRulesSetTarget + , module Compute.GlobalForwardingRules.SetTarget + + -- ** ComputeGlobalOperationsAggregatedList + , module Compute.GlobalOperations.AggregatedList + + -- ** ComputeGlobalOperationsDelete + , module Compute.GlobalOperations.Delete + + -- ** ComputeGlobalOperationsGet + , module Compute.GlobalOperations.Get + + -- ** ComputeGlobalOperationsList + , module Compute.GlobalOperations.List + + -- ** ComputeHTTPHealthChecksDelete + , module Compute.HTTPHealthChecks.Delete + + -- ** ComputeHTTPHealthChecksGet + , module Compute.HTTPHealthChecks.Get + + -- ** ComputeHTTPHealthChecksInsert + , module Compute.HTTPHealthChecks.Insert + + -- ** ComputeHTTPHealthChecksList + , module Compute.HTTPHealthChecks.List + + -- ** ComputeHTTPHealthChecksPatch + , module Compute.HTTPHealthChecks.Patch + + -- ** ComputeHTTPHealthChecksUpdate + , module Compute.HTTPHealthChecks.Update + + -- ** ComputeImagesDelete + , module Compute.Images.Delete + + -- ** ComputeImagesDeprecate + , module Compute.Images.Deprecate + + -- ** ComputeImagesGet + , module Compute.Images.Get + + -- ** ComputeImagesInsert + , module Compute.Images.Insert + + -- ** ComputeImagesList + , module Compute.Images.List + + -- ** ComputeInstanceGroupManagersAbandonInstances + , module Compute.InstanceGroupManagers.AbandonInstances + + -- ** ComputeInstanceGroupManagersAggregatedList + , module Compute.InstanceGroupManagers.AggregatedList + + -- ** ComputeInstanceGroupManagersDelete + , module Compute.InstanceGroupManagers.Delete + + -- ** ComputeInstanceGroupManagersDeleteInstances + , module Compute.InstanceGroupManagers.DeleteInstances + + -- ** ComputeInstanceGroupManagersGet + , module Compute.InstanceGroupManagers.Get + + -- ** ComputeInstanceGroupManagersInsert + , module Compute.InstanceGroupManagers.Insert + + -- ** ComputeInstanceGroupManagersList + , module Compute.InstanceGroupManagers.List + + -- ** ComputeInstanceGroupManagersListManagedInstances + , module Compute.InstanceGroupManagers.ListManagedInstances + + -- ** ComputeInstanceGroupManagersRecreateInstances + , module Compute.InstanceGroupManagers.RecreateInstances + + -- ** ComputeInstanceGroupManagersResize + , module Compute.InstanceGroupManagers.Resize + + -- ** ComputeInstanceGroupManagersSetInstanceTemplate + , module Compute.InstanceGroupManagers.SetInstanceTemplate + + -- ** ComputeInstanceGroupManagersSetTargetPools + , module Compute.InstanceGroupManagers.SetTargetPools + + -- ** ComputeInstanceGroupsAddInstances + , module Compute.InstanceGroups.AddInstances + + -- ** ComputeInstanceGroupsAggregatedList + , module Compute.InstanceGroups.AggregatedList + + -- ** ComputeInstanceGroupsDelete + , module Compute.InstanceGroups.Delete + + -- ** ComputeInstanceGroupsGet + , module Compute.InstanceGroups.Get + + -- ** ComputeInstanceGroupsInsert + , module Compute.InstanceGroups.Insert + + -- ** ComputeInstanceGroupsList + , module Compute.InstanceGroups.List + + -- ** ComputeInstanceGroupsListInstances + , module Compute.InstanceGroups.ListInstances + + -- ** ComputeInstanceGroupsRemoveInstances + , module Compute.InstanceGroups.RemoveInstances + + -- ** ComputeInstanceGroupsSetNamedPorts + , module Compute.InstanceGroups.SetNamedPorts + + -- ** ComputeInstanceTemplatesDelete + , module Compute.InstanceTemplates.Delete + + -- ** ComputeInstanceTemplatesGet + , module Compute.InstanceTemplates.Get + + -- ** ComputeInstanceTemplatesInsert + , module Compute.InstanceTemplates.Insert + + -- ** ComputeInstanceTemplatesList + , module Compute.InstanceTemplates.List + + -- ** ComputeInstancesAddAccessConfig + , module Compute.Instances.AddAccessConfig + + -- ** ComputeInstancesAggregatedList + , module Compute.Instances.AggregatedList + + -- ** ComputeInstancesAttachDisk + , module Compute.Instances.AttachDisk + + -- ** ComputeInstancesDelete + , module Compute.Instances.Delete + + -- ** ComputeInstancesDeleteAccessConfig + , module Compute.Instances.DeleteAccessConfig + + -- ** ComputeInstancesDetachDisk + , module Compute.Instances.DetachDisk + + -- ** ComputeInstancesGet + , module Compute.Instances.Get + + -- ** ComputeInstancesGetSerialPortOutput + , module Compute.Instances.GetSerialPortOutput + + -- ** ComputeInstancesInsert + , module Compute.Instances.Insert + + -- ** ComputeInstancesList + , module Compute.Instances.List + + -- ** ComputeInstancesReset + , module Compute.Instances.Reset + + -- ** ComputeInstancesSetDiskAutoDelete + , module Compute.Instances.SetDiskAutoDelete + + -- ** ComputeInstancesSetMetadata + , module Compute.Instances.SetMetadata + + -- ** ComputeInstancesSetScheduling + , module Compute.Instances.SetScheduling + + -- ** ComputeInstancesSetTags + , module Compute.Instances.SetTags + + -- ** ComputeInstancesStart + , module Compute.Instances.Start + + -- ** ComputeInstancesStop + , module Compute.Instances.Stop + + -- ** ComputeLicensesGet + , module Compute.Licenses.Get + + -- ** ComputeMachineTypesAggregatedList + , module Compute.MachineTypes.AggregatedList + + -- ** ComputeMachineTypesGet + , module Compute.MachineTypes.Get + + -- ** ComputeMachineTypesList + , module Compute.MachineTypes.List + + -- ** ComputeNetworksDelete + , module Compute.Networks.Delete + + -- ** ComputeNetworksGet + , module Compute.Networks.Get + + -- ** ComputeNetworksInsert + , module Compute.Networks.Insert + + -- ** ComputeNetworksList + , module Compute.Networks.List + + -- ** ComputeProjectsGet + , module Compute.Projects.Get + + -- ** ComputeProjectsMoveDisk + , module Compute.Projects.MoveDisk + + -- ** ComputeProjectsMoveInstance + , module Compute.Projects.MoveInstance + + -- ** ComputeProjectsSetCommonInstanceMetadata + , module Compute.Projects.SetCommonInstanceMetadata + + -- ** ComputeProjectsSetUsageExportBucket + , module Compute.Projects.SetUsageExportBucket + + -- ** ComputeRegionOperationsDelete + , module Compute.RegionOperations.Delete + + -- ** ComputeRegionOperationsGet + , module Compute.RegionOperations.Get + + -- ** ComputeRegionOperationsList + , module Compute.RegionOperations.List + + -- ** ComputeRegionsGet + , module Compute.Regions.Get + + -- ** ComputeRegionsList + , module Compute.Regions.List + + -- ** ComputeRoutesDelete + , module Compute.Routes.Delete + + -- ** ComputeRoutesGet + , module Compute.Routes.Get + + -- ** ComputeRoutesInsert + , module Compute.Routes.Insert + + -- ** ComputeRoutesList + , module Compute.Routes.List + + -- ** ComputeSnapshotsDelete + , module Compute.Snapshots.Delete + + -- ** ComputeSnapshotsGet + , module Compute.Snapshots.Get + + -- ** ComputeSnapshotsList + , module Compute.Snapshots.List + + -- ** ComputeTargetHTTPProxiesDelete + , module Compute.TargetHTTPProxies.Delete + + -- ** ComputeTargetHTTPProxiesGet + , module Compute.TargetHTTPProxies.Get + + -- ** ComputeTargetHTTPProxiesInsert + , module Compute.TargetHTTPProxies.Insert + + -- ** ComputeTargetHTTPProxiesList + , module Compute.TargetHTTPProxies.List + + -- ** ComputeTargetHTTPProxiesSetURLMap + , module Compute.TargetHTTPProxies.SetURLMap + + -- ** ComputeTargetInstancesAggregatedList + , module Compute.TargetInstances.AggregatedList + + -- ** ComputeTargetInstancesDelete + , module Compute.TargetInstances.Delete + + -- ** ComputeTargetInstancesGet + , module Compute.TargetInstances.Get + + -- ** ComputeTargetInstancesInsert + , module Compute.TargetInstances.Insert + + -- ** ComputeTargetInstancesList + , module Compute.TargetInstances.List + + -- ** ComputeTargetPoolsAddHealthCheck + , module Compute.TargetPools.AddHealthCheck + + -- ** ComputeTargetPoolsAddInstance + , module Compute.TargetPools.AddInstance + + -- ** ComputeTargetPoolsAggregatedList + , module Compute.TargetPools.AggregatedList + + -- ** ComputeTargetPoolsDelete + , module Compute.TargetPools.Delete + + -- ** ComputeTargetPoolsGet + , module Compute.TargetPools.Get + + -- ** ComputeTargetPoolsGetHealth + , module Compute.TargetPools.GetHealth + + -- ** ComputeTargetPoolsInsert + , module Compute.TargetPools.Insert + + -- ** ComputeTargetPoolsList + , module Compute.TargetPools.List + + -- ** ComputeTargetPoolsRemoveHealthCheck + , module Compute.TargetPools.RemoveHealthCheck + + -- ** ComputeTargetPoolsRemoveInstance + , module Compute.TargetPools.RemoveInstance + + -- ** ComputeTargetPoolsSetBackup + , module Compute.TargetPools.SetBackup + + -- ** ComputeTargetVPNGatewaysAggregatedList + , module Compute.TargetVPNGateways.AggregatedList + + -- ** ComputeTargetVPNGatewaysDelete + , module Compute.TargetVPNGateways.Delete + + -- ** ComputeTargetVPNGatewaysGet + , module Compute.TargetVPNGateways.Get + + -- ** ComputeTargetVPNGatewaysInsert + , module Compute.TargetVPNGateways.Insert + + -- ** ComputeTargetVPNGatewaysList + , module Compute.TargetVPNGateways.List + + -- ** ComputeURLMapsDelete + , module Compute.URLMaps.Delete + + -- ** ComputeURLMapsGet + , module Compute.URLMaps.Get + + -- ** ComputeURLMapsInsert + , module Compute.URLMaps.Insert + + -- ** ComputeURLMapsList + , module Compute.URLMaps.List + + -- ** ComputeURLMapsPatch + , module Compute.URLMaps.Patch + + -- ** ComputeURLMapsUpdate + , module Compute.URLMaps.Update + + -- ** ComputeURLMapsValidate + , module Compute.URLMaps.Validate + + -- ** ComputeVPNTunnelsAggregatedList + , module Compute.VPNTunnels.AggregatedList + + -- ** ComputeVPNTunnelsDelete + , module Compute.VPNTunnels.Delete + + -- ** ComputeVPNTunnelsGet + , module Compute.VPNTunnels.Get + + -- ** ComputeVPNTunnelsInsert + , module Compute.VPNTunnels.Insert + + -- ** ComputeVPNTunnelsList + , module Compute.VPNTunnels.List + + -- ** ComputeZoneOperationsDelete + , module Compute.ZoneOperations.Delete + + -- ** ComputeZoneOperationsGet + , module Compute.ZoneOperations.Get + + -- ** ComputeZoneOperationsList + , module Compute.ZoneOperations.List + + -- ** ComputeZonesGet + , module Compute.Zones.Get + + -- ** ComputeZonesList + , module Compute.Zones.List + + -- * Types + + -- ** InstanceGroupList + , InstanceGroupList + , instanceGroupList + , iglNextPageToken + , iglKind + , iglItems + , iglSelfLink + , iglId + + -- ** InstanceGroupManagersSetInstanceTemplateRequest + , InstanceGroupManagersSetInstanceTemplateRequest + , instanceGroupManagersSetInstanceTemplateRequest + , igmsitrInstanceTemplate + + -- ** InstanceGroupManagersAbandonInstancesRequest + , InstanceGroupManagersAbandonInstancesRequest + , instanceGroupManagersAbandonInstancesRequest + , igmairInstances + + -- ** AddressesScopedList + , AddressesScopedList + , addressesScopedList + , aslAddresses + , aslWarning + + -- ** Snapshot + , Snapshot + , snapshot + , sStorageBytesStatus + , sStatus + , sDiskSizeGb + , sSourceDiskId + , sKind + , sStorageBytes + , sSelfLink + , sName + , sCreationTimestamp + , sId + , sLicenses + , sSourceDisk + , sDescription + + -- ** FirewallList + , FirewallList + , firewallList + , flNextPageToken + , flKind + , flItems + , flSelfLink + , flId + + -- ** DeprecationStatus + , DeprecationStatus + , deprecationStatus + , dsState + , dsDeleted + , dsReplacement + , dsObsolete + , dsDeprecated + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** VPNTunnelsScopedList + , VPNTunnelsScopedList + , vPNTunnelsScopedList + , vtslVpnTunnels + , vtslWarning + + -- ** InstanceGroupsAddInstancesRequest + , InstanceGroupsAddInstancesRequest + , instanceGroupsAddInstancesRequest + , igairInstances + + -- ** TargetPoolList + , TargetPoolList + , targetPoolList + , tplNextPageToken + , tplKind + , tplItems + , tplSelfLink + , tplId + + -- ** DiskList + , DiskList + , diskList + , dlNextPageToken + , dlKind + , dlItems + , dlSelfLink + , dlId + + -- ** TargetPoolsAddInstanceRequest + , TargetPoolsAddInstanceRequest + , targetPoolsAddInstanceRequest + , tpairInstances + + -- ** ForwardingRuleList + , ForwardingRuleList + , forwardingRuleList + , frlNextPageToken + , frlKind + , frlItems + , frlSelfLink + , frlId + + -- ** URLMap + , URLMap + , uRLMap + , umTests + , umKind + , umFingerprint + , umDefaultService + , umSelfLink + , umName + , umCreationTimestamp + , umPathMatchers + , umId + , umHostRules + , umDescription + + -- ** InstanceGroupManagerList + , InstanceGroupManagerList + , instanceGroupManagerList + , igmlNextPageToken + , igmlKind + , igmlItems + , igmlSelfLink + , igmlId + + -- ** InstanceGroupsSetNamedPortsRequest + , InstanceGroupsSetNamedPortsRequest + , instanceGroupsSetNamedPortsRequest + , igsnprFingerprint + , igsnprNamedPorts + + -- ** AutoscalingPolicyCustomMetricUtilization + , AutoscalingPolicyCustomMetricUtilization + , autoscalingPolicyCustomMetricUtilization + , apcmuUtilizationTarget + , apcmuMetric + , apcmuUtilizationTargetType + + -- ** Image + , Image + , image + , iStatus + , iDiskSizeGb + , iSourceType + , iSourceDiskId + , iKind + , iArchiveSizeBytes + , iRawDisk + , iSelfLink + , iName + , iCreationTimestamp + , iId + , iLicenses + , iSourceDisk + , iDescription + , iDeprecated + + -- ** TargetInstanceAggregatedList + , TargetInstanceAggregatedList + , targetInstanceAggregatedList + , tialNextPageToken + , tialKind + , tialItems + , tialSelfLink + , tialId + + -- ** ForwardingRulesScopedList + , ForwardingRulesScopedList + , forwardingRulesScopedList + , frslWarning + , frslForwardingRules + + -- ** DiskAggregatedList + , DiskAggregatedList + , diskAggregatedList + , dalNextPageToken + , dalKind + , dalItems + , dalSelfLink + , dalId + + -- ** InstanceReference + , InstanceReference + , instanceReference + , irInstance + + -- ** InstanceWithNamedPorts + , InstanceWithNamedPorts + , instanceWithNamedPorts + , iwnpStatus + , iwnpNamedPorts + , iwnpInstance + + -- ** InstanceGroupManagersScopedList + , InstanceGroupManagersScopedList + , instanceGroupManagersScopedList + , igmslWarning + , igmslInstanceGroupManagers + + -- ** InstanceGroupManagerAggregatedList + , InstanceGroupManagerAggregatedList + , instanceGroupManagerAggregatedList + , igmalNextPageToken + , igmalKind + , igmalItems + , igmalSelfLink + , igmalId + + -- ** DisksScopedList + , DisksScopedList + , disksScopedList + , dslWarning + , dslDisks + + -- ** NamedPort + , NamedPort + , namedPort + , npName + , npPort + + -- ** TargetPoolsScopedList + , TargetPoolsScopedList + , targetPoolsScopedList + , tpslWarning + , tpslTargetPools + + -- ** OperationsScopedList + , OperationsScopedList + , operationsScopedList + , oslWarning + , oslOperations + + -- ** OperationAggregatedList + , OperationAggregatedList + , operationAggregatedList + , oalNextPageToken + , oalKind + , oalItems + , oalSelfLink + , oalId + + -- ** ForwardingRuleAggregatedList + , ForwardingRuleAggregatedList + , forwardingRuleAggregatedList + , fralNextPageToken + , fralKind + , fralItems + , fralSelfLink + , fralId + + -- ** TargetInstanceList + , TargetInstanceList + , targetInstanceList + , tilNextPageToken + , tilKind + , tilItems + , tilSelfLink + , tilId + + -- ** TargetReference + , TargetReference + , targetReference + , trTarget + + -- ** TargetPoolAggregatedList + , TargetPoolAggregatedList + , targetPoolAggregatedList + , tpalNextPageToken + , tpalKind + , tpalItems + , tpalSelfLink + , tpalId + + -- ** ImageList + , ImageList + , imageList + , ilNextPageToken + , ilKind + , ilItems + , ilSelfLink + , ilId + + -- ** TargetPool + , TargetPool + , targetPool + , tpSessionAffinity + , tpBackupPool + , tpKind + , tpSelfLink + , tpName + , tpCreationTimestamp + , tpInstances + , tpId + , tpFailoverRatio + , tpRegion + , tpDescription + , tpHealthChecks + + -- ** Disk + , Disk + , disk + , dStatus + , dSourceSnapshotId + , dLastAttachTimestamp + , dUsers + , dSourceImage + , dSizeGb + , dKind + , dLastDetachTimestamp + , dZone + , dSelfLink + , dName + , dSourceImageId + , dCreationTimestamp + , dId + , dLicenses + , dOptions + , dType + , dDescription + , dSourceSnapshot + + -- ** AutoscalingPolicyLoadBalancingUtilization + , AutoscalingPolicyLoadBalancingUtilization + , autoscalingPolicyLoadBalancingUtilization + , aplbuUtilizationTarget + + -- ** InstanceGroupManager + , InstanceGroupManager + , instanceGroupManager + , igmKind + , igmFingerprint + , igmBaseInstanceName + , igmZone + , igmInstanceTemplate + , igmTargetSize + , igmSelfLink + , igmCurrentActions + , igmName + , igmCreationTimestamp + , igmId + , igmTargetPools + , igmDescription + , igmInstanceGroup + + -- ** ForwardingRule + , ForwardingRule + , forwardingRule + , frIPAddress + , frKind + , frPortRange + , frSelfLink + , frName + , frIPProtocol + , frCreationTimestamp + , frId + , frRegion + , frDescription + , frTarget + + -- ** DiskMoveRequest + , DiskMoveRequest + , diskMoveRequest + , dmrTargetDisk + , dmrDestinationZone + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** Project + , Project + , project + , pKind + , pUsageExportLocation + , pSelfLink + , pName + , pCreationTimestamp + , pEnabledFeatures + , pQuotas + , pId + , pDescription + , pCommonInstanceMetadata + + -- ** URLMapList + , URLMapList + , uRLMapList + , umlNextPageToken + , umlKind + , umlItems + , umlSelfLink + , umlId + + -- ** TargetPoolsRemoveInstanceRequest + , TargetPoolsRemoveInstanceRequest + , targetPoolsRemoveInstanceRequest + , tprirInstances + + -- ** InstanceProperties + , InstanceProperties + , instanceProperties + , ipServiceAccounts + , ipNetworkInterfaces + , ipMachineType + , ipMetadata + , ipScheduling + , ipDisks + , ipCanIpForward + , ipDescription + , ipTags + + -- ** TargetPoolInstanceHealth + , TargetPoolInstanceHealth + , targetPoolInstanceHealth + , tpihKind + , tpihHealthStatus + + -- ** TargetInstance + , TargetInstance + , targetInstance + , tiKind + , tiNatPolicy + , tiZone + , tiSelfLink + , tiName + , tiCreationTimestamp + , tiId + , tiDescription + , tiInstance + + -- ** InstanceGroupManagersListManagedInstancesResponse + , InstanceGroupManagersListManagedInstancesResponse + , instanceGroupManagersListManagedInstancesResponse + , igmlmirManagedInstances + + -- ** InstanceGroupsRemoveInstancesRequest + , InstanceGroupsRemoveInstancesRequest + , instanceGroupsRemoveInstancesRequest + , igrirInstances + + -- ** AttachedDiskInitializeParams + , AttachedDiskInitializeParams + , attachedDiskInitializeParams + , adipSourceImage + , adipDiskSizeGb + , adipDiskName + , adipDiskType + + -- ** NetworkInterface + , NetworkInterface + , networkInterface + , niNetwork + , niName + , niNetworkIP + , niAccessConfigs + + -- ** InstanceTemplateList + , InstanceTemplateList + , instanceTemplateList + , itlNextPageToken + , itlKind + , itlItems + , itlSelfLink + , itlId + + -- ** TargetPoolsRemoveHealthCheckRequest + , TargetPoolsRemoveHealthCheckRequest + , targetPoolsRemoveHealthCheckRequest + , tprhcrHealthChecks + + -- ** RouteList + , RouteList + , routeList + , rlNextPageToken + , rlKind + , rlItems + , rlSelfLink + , rlId + + -- ** TargetVPNGatewayList + , TargetVPNGatewayList + , targetVPNGatewayList + , tvglNextPageToken + , tvglKind + , tvglItems + , tvglSelfLink + , tvglId + + -- ** Address + , Address + , address + , aStatus + , aUsers + , aKind + , aAddress + , aSelfLink + , aName + , aCreationTimestamp + , aId + , aRegion + , aDescription + + -- ** InstanceAggregatedList + , InstanceAggregatedList + , instanceAggregatedList + , ialNextPageToken + , ialKind + , ialItems + , ialSelfLink + , ialId + + -- ** InstancesScopedList + , InstancesScopedList + , instancesScopedList + , islWarning + , islInstances + + -- ** Zone + , Zone + , zone + , zStatus + , zMaintenanceWindows + , zKind + , zSelfLink + , zName + , zCreationTimestamp + , zId + , zRegion + , zDescription + , zDeprecated + + -- ** InstanceGroupManagersRecreateInstancesRequest + , InstanceGroupManagersRecreateInstancesRequest + , instanceGroupManagersRecreateInstancesRequest + , igmrirInstances + + -- ** Network + , Network + , network + , nKind + , nIPv4Range + , nSelfLink + , nName + , nCreationTimestamp + , nId + , nGatewayIPv4 + , nDescription + + -- ** Route + , Route + , route + , rPriority + , rKind + , rNextHopGateway + , rNextHopNetwork + , rNetwork + , rWarnings + , rNextHopIp + , rDestRange + , rSelfLink + , rName + , rCreationTimestamp + , rId + , rNextHopVpnTunnel + , rDescription + , rTags + , rNextHopInstance + + -- ** InstanceTemplate + , InstanceTemplate + , instanceTemplate + , itKind + , itSelfLink + , itName + , itCreationTimestamp + , itId + , itDescription + , itProperties + + -- ** HealthCheckReference + , HealthCheckReference + , healthCheckReference + , hcrHealthCheck + + -- ** URLMapsValidateResponse + , URLMapsValidateResponse + , uRLMapsValidateResponse + , umvrResult + + -- ** InstanceGroupAggregatedList + , InstanceGroupAggregatedList + , instanceGroupAggregatedList + , igalNextPageToken + , igalKind + , igalItems + , igalSelfLink + , igalId + + -- ** TargetVPNGateway + , TargetVPNGateway + , targetVPNGateway + , tvgStatus + , tvgKind + , tvgNetwork + , tvgSelfLink + , tvgName + , tvgCreationTimestamp + , tvgId + , tvgRegion + , tvgTunnels + , tvgDescription + , tvgForwardingRules + + -- ** UsageExportLocation + , UsageExportLocation + , usageExportLocation + , uelReportNamePrefix + , uelBucketName + + -- ** InstanceGroupManagersDeleteInstancesRequest + , InstanceGroupManagersDeleteInstancesRequest + , instanceGroupManagersDeleteInstancesRequest + , igmdirInstances + + -- ** ManagedInstance + , ManagedInstance + , managedInstance + , miLastAttempt + , miCurrentAction + , miId + , miInstanceStatus + , miInstance + + -- ** InstanceGroupsListInstancesRequest + , InstanceGroupsListInstancesRequest + , instanceGroupsListInstancesRequest + , iglirInstanceState + + -- ** AddressList + , AddressList + , addressList + , alNextPageToken + , alKind + , alItems + , alSelfLink + , alId + + -- ** ZoneList + , ZoneList + , zoneList + , zlNextPageToken + , zlKind + , zlItems + , zlSelfLink + , zlId + + -- ** InstanceGroupManagerActionsSummary + , InstanceGroupManagerActionsSummary + , instanceGroupManagerActionsSummary + , igmasDeleting + , igmasRestarting + , igmasNone + , igmasCreating + , igmasRefreshing + , igmasRecreating + , igmasAbandoning + + -- ** URLMapReference + , URLMapReference + , uRLMapReference + , umrUrlMap + + -- ** TargetPoolsAddHealthCheckRequest + , TargetPoolsAddHealthCheckRequest + , targetPoolsAddHealthCheckRequest + , tpahcrHealthChecks + + -- ** NetworkList + , NetworkList + , networkList + , nlNextPageToken + , nlKind + , nlItems + , nlSelfLink + , nlId + + -- ** ServiceAccount + , ServiceAccount + , serviceAccount + , saEmail + , saScopes + + -- ** Backend + , Backend + , backend + , bGroup + , bBalancingMode + , bMaxUtilization + , bMaxRate + , bMaxRatePerInstance + , bDescription + , bCapacityScaler + + -- ** TargetInstancesScopedList + , TargetInstancesScopedList + , targetInstancesScopedList + , tislWarning + , tislTargetInstances + + -- ** MachineTypeList + , MachineTypeList + , machineTypeList + , mtlNextPageToken + , mtlKind + , mtlItems + , mtlSelfLink + , mtlId + + -- ** DiskTypeList + , DiskTypeList + , diskTypeList + , dtlNextPageToken + , dtlKind + , dtlItems + , dtlSelfLink + , dtlId + + -- ** VPNTunnelAggregatedList + , VPNTunnelAggregatedList + , vPNTunnelAggregatedList + , vtalNextPageToken + , vtalKind + , vtalItems + , vtalSelfLink + , vtalId + + -- ** AutoscalerList + , AutoscalerList + , autoscalerList + , autNextPageToken + , autKind + , autItems + , autSelfLink + , autId + + -- ** AttachedDisk + , AttachedDisk + , attachedDisk + , adKind + , adMode + , adBoot + , adAutoDelete + , adInitializeParams + , adDeviceName + , adInterface + , adSource + , adLicenses + , adType + , adIndex + + -- ** TargetHTTPProxyList + , TargetHTTPProxyList + , targetHTTPProxyList + , thttpplNextPageToken + , thttpplKind + , thttpplItems + , thttpplSelfLink + , thttpplId + + -- ** MachineTypesScopedList + , MachineTypesScopedList + , machineTypesScopedList + , mtslMachineTypes + , mtslWarning + + -- ** VPNTunnelList + , VPNTunnelList + , vPNTunnelList + , vtlNextPageToken + , vtlKind + , vtlItems + , vtlSelfLink + , vtlId + + -- ** BackendServiceGroupHealth + , BackendServiceGroupHealth + , backendServiceGroupHealth + , bsghKind + , bsghHealthStatus + + -- ** DiskTypeAggregatedList + , DiskTypeAggregatedList + , diskTypeAggregatedList + , dtalNextPageToken + , dtalKind + , dtalItems + , dtalSelfLink + , dtalId + + -- ** HTTPHealthCheck + , HTTPHealthCheck + , hTTPHealthCheck + , httphcHealthyThreshold + , httphcKind + , httphcRequestPath + , httphcSelfLink + , httphcCheckIntervalSec + , httphcName + , httphcCreationTimestamp + , httphcId + , httphcHost + , httphcTimeoutSec + , httphcDescription + , httphcUnhealthyThreshold + , httphcPort + + -- ** AutoscalingPolicy + , AutoscalingPolicy + , autoscalingPolicy + , apCustomMetricUtilizations + , apMaxNumReplicas + , apCpuUtilization + , apLoadBalancingUtilization + , apMinNumReplicas + , apCoolDownPeriodSec + + -- ** AutoscalersScopedList + , AutoscalersScopedList + , autoscalersScopedList + , aAutoscalers + , aWarning + + -- ** DiskTypesScopedList + , DiskTypesScopedList + , diskTypesScopedList + , dtslDiskTypes + , dtslWarning + + -- ** AutoscalerAggregatedList + , AutoscalerAggregatedList + , autoscalerAggregatedList + , aalNextPageToken + , aalKind + , aalItems + , aalSelfLink + , aalId + + -- ** MachineTypeAggregatedList + , MachineTypeAggregatedList + , machineTypeAggregatedList + , mtalNextPageToken + , mtalKind + , mtalItems + , mtalSelfLink + , mtalId + + -- ** RegionList + , RegionList + , regionList + , regNextPageToken + , regKind + , regItems + , regSelfLink + , regId + + -- ** MachineType + , MachineType + , machineType + , mtKind + , mtImageSpaceGb + , mtZone + , mtSelfLink + , mtName + , mtCreationTimestamp + , mtScratchDisks + , mtId + , mtGuestCpus + , mtMaximumPersistentDisksSizeGb + , mtMaximumPersistentDisks + , mtMemoryMb + , mtDescription + , mtDeprecated + + -- ** DiskType + , DiskType + , diskType + , dtKind + , dtZone + , dtSelfLink + , dtName + , dtCreationTimestamp + , dtId + , dtValidDiskSize + , dtDescription + , dtDefaultDiskSizeGb + , dtDeprecated + + -- ** URLMapValidationResult + , URLMapValidationResult + , uRLMapValidationResult + , umvrLoadErrors + , umvrLoadSucceeded + , umvrTestPassed + , umvrTestFailures + + -- ** Autoscaler + , Autoscaler + , autoscaler + , aaKind + , aaZone + , aaSelfLink + , aaName + , aaCreationTimestamp + , aaAutoscalingPolicy + , aaId + , aaDescription + , aaTarget + + -- ** InstanceGroupsListInstances + , InstanceGroupsListInstances + , instanceGroupsListInstances + , igliNextPageToken + , igliKind + , igliItems + , igliSelfLink + , igliId + + -- ** Metadata + , Metadata + , metadata + , mKind + , mFingerprint + , mItems + + -- ** TargetHTTPProxy + , TargetHTTPProxy + , targetHTTPProxy + , thttppUrlMap + , thttppKind + , thttppSelfLink + , thttppName + , thttppCreationTimestamp + , thttppId + , thttppDescription + + -- ** Region + , Region + , region + , rrStatus + , rrZones + , rrKind + , rrSelfLink + , rrName + , rrCreationTimestamp + , rrQuotas + , rrId + , rrDescription + , rrDeprecated + + -- ** VPNTunnel + , VPNTunnel + , vPNTunnel + , vtDetailedStatus + , vtStatus + , vtKind + , vtPeerIp + , vtTargetVpnGateway + , vtSelfLink + , vtSharedSecret + , vtName + , vtCreationTimestamp + , vtSharedSecretHash + , vtId + , vtIkeVersion + , vtRegion + , vtDescription + + -- ** Scheduling + , Scheduling + , scheduling + , sAutomaticRestart + , sOnHostMaintenance + , sPreemptible + + -- ** HealthStatus + , HealthStatus + , healthStatus + , hsIpAddress + , hsHealthState + , hsPort + , hsInstance + + -- ** HTTPHealthCheckList + , HTTPHealthCheckList + , hTTPHealthCheckList + , httphclNextPageToken + , httphclKind + , httphclItems + , httphclSelfLink + , httphclId + + -- ** URLMapsValidateRequest + , URLMapsValidateRequest + , uRLMapsValidateRequest + , umvrResource + + -- ** PathRule + , PathRule + , pathRule + , prService + , prPaths + + -- ** BackendServiceList + , BackendServiceList + , backendServiceList + , bslNextPageToken + , bslKind + , bslItems + , bslSelfLink + , bslId + + -- ** License + , License + , license + , lChargesUseFee + , lKind + , lSelfLink + , lName + + -- ** InstanceList + , InstanceList + , instanceList + , insNextPageToken + , insKind + , insItems + , insSelfLink + , insId + + -- ** ManagedInstanceLastAttempt + , ManagedInstanceLastAttempt + , managedInstanceLastAttempt + , milaErrors + + -- ** InstanceGroupManagersSetTargetPoolsRequest + , InstanceGroupManagersSetTargetPoolsRequest + , instanceGroupManagersSetTargetPoolsRequest + , igmstprFingerprint + , igmstprTargetPools + + -- ** TargetVPNGatewayAggregatedList + , TargetVPNGatewayAggregatedList + , targetVPNGatewayAggregatedList + , tvgalNextPageToken + , tvgalKind + , tvgalItems + , tvgalSelfLink + , tvgalId + + -- ** InstanceGroup + , InstanceGroup + , instanceGroup + , igSize + , igKind + , igFingerprint + , igNetwork + , igZone + , igSelfLink + , igName + , igCreationTimestamp + , igId + , igDescription + , igNamedPorts + + -- ** HostRule + , HostRule + , hostRule + , hrHosts + , hrDescription + , hrPathMatcher + + -- ** SerialPortOutput + , SerialPortOutput + , serialPortOutput + , spoContents + , spoKind + , spoSelfLink + + -- ** TestFailure + , TestFailure + , testFailure + , tfPath + , tfExpectedService + , tfHost + , tfActualService + + -- ** TargetVPNGatewaysScopedList + , TargetVPNGatewaysScopedList + , targetVPNGatewaysScopedList + , tvgslTargetVpnGateways + , tvgslWarning + + -- ** Quota + , Quota + , quota + , qMetric + , qLimit + , qUsage + + -- ** SnapshotList + , SnapshotList + , snapshotList + , slNextPageToken + , slKind + , slItems + , slSelfLink + , slId + + -- ** AutoscalingPolicyCPUUtilization + , AutoscalingPolicyCPUUtilization + , autoscalingPolicyCPUUtilization + , apcuUtilizationTarget + + -- ** AccessConfig + , AccessConfig + , accessConfig + , acKind + , acName + , acNatIP + , acType + + -- ** ResourceGroupReference + , ResourceGroupReference + , resourceGroupReference + , rgrGroup + + -- ** Firewall + , Firewall + , firewall + , fSourceTags + , fKind + , fTargetTags + , fNetwork + , fSourceRanges + , fSelfLink + , fName + , fCreationTimestamp + , fId + , fAllowed + , fDescription + + -- ** AddressAggregatedList + , AddressAggregatedList + , addressAggregatedList + , addNextPageToken + , addKind + , addItems + , addSelfLink + , addId + + -- ** Tags + , Tags + , tags + , tFingerprint + , tItems + + -- ** BackendService + , BackendService + , backendService + , bsBackends + , bsKind + , bsFingerprint + , bsProtocol + , bsSelfLink + , bsName + , bsCreationTimestamp + , bsId + , bsTimeoutSec + , bsDescription + , bsPortName + , bsHealthChecks + , bsPort + + -- ** URLMapTest + , URLMapTest + , uRLMapTest + , umtPath + , umtService + , umtHost + , umtDescription + + -- ** InstanceMoveRequest + , InstanceMoveRequest + , instanceMoveRequest + , imrTargetInstance + , imrDestinationZone + + -- ** Instance + , Instance + , instance' + , iiStatus + , iiServiceAccounts + , iiNetworkInterfaces + , iiKind + , iiZone + , iiCpuPlatform + , iiSelfLink + , iiName + , iiStatusMessage + , iiCreationTimestamp + , iiMachineType + , iiMetadata + , iiId + , iiScheduling + , iiDisks + , iiCanIpForward + , iiDescription + , iiTags + + -- ** PathMatcher + , PathMatcher + , pathMatcher + , pmDefaultService + , pmName + , pmPathRules + , pmDescription + + -- ** InstanceGroupsScopedList + , InstanceGroupsScopedList + , instanceGroupsScopedList + , igslWarning + , igslInstanceGroups + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude +import Network.Google.Resource.Compute.Addresses.AggregatedList +import Network.Google.Resource.Compute.Addresses.Delete +import Network.Google.Resource.Compute.Addresses.Get +import Network.Google.Resource.Compute.Addresses.Insert +import Network.Google.Resource.Compute.Addresses.List +import Network.Google.Resource.Compute.Autoscalers.AggregatedList +import Network.Google.Resource.Compute.Autoscalers.Delete +import Network.Google.Resource.Compute.Autoscalers.Get +import Network.Google.Resource.Compute.Autoscalers.Insert +import Network.Google.Resource.Compute.Autoscalers.List +import Network.Google.Resource.Compute.Autoscalers.Patch +import Network.Google.Resource.Compute.Autoscalers.Update +import Network.Google.Resource.Compute.BackendServices.Delete +import Network.Google.Resource.Compute.BackendServices.Get +import Network.Google.Resource.Compute.BackendServices.GetHealth +import Network.Google.Resource.Compute.BackendServices.Insert +import Network.Google.Resource.Compute.BackendServices.List +import Network.Google.Resource.Compute.BackendServices.Patch +import Network.Google.Resource.Compute.BackendServices.Update +import Network.Google.Resource.Compute.Disks.AggregatedList +import Network.Google.Resource.Compute.Disks.CreateSnapshot +import Network.Google.Resource.Compute.Disks.Delete +import Network.Google.Resource.Compute.Disks.Get +import Network.Google.Resource.Compute.Disks.Insert +import Network.Google.Resource.Compute.Disks.List +import Network.Google.Resource.Compute.DiskTypes.AggregatedList +import Network.Google.Resource.Compute.DiskTypes.Get +import Network.Google.Resource.Compute.DiskTypes.List +import Network.Google.Resource.Compute.Firewalls.Delete +import Network.Google.Resource.Compute.Firewalls.Get +import Network.Google.Resource.Compute.Firewalls.Insert +import Network.Google.Resource.Compute.Firewalls.List +import Network.Google.Resource.Compute.Firewalls.Patch +import Network.Google.Resource.Compute.Firewalls.Update +import Network.Google.Resource.Compute.ForwardingRules.AggregatedList +import Network.Google.Resource.Compute.ForwardingRules.Delete +import Network.Google.Resource.Compute.ForwardingRules.Get +import Network.Google.Resource.Compute.ForwardingRules.Insert +import Network.Google.Resource.Compute.ForwardingRules.List +import Network.Google.Resource.Compute.ForwardingRules.SetTarget +import Network.Google.Resource.Compute.GlobalAddresses.Delete +import Network.Google.Resource.Compute.GlobalAddresses.Get +import Network.Google.Resource.Compute.GlobalAddresses.Insert +import Network.Google.Resource.Compute.GlobalAddresses.List +import Network.Google.Resource.Compute.GlobalForwardingRules.Delete +import Network.Google.Resource.Compute.GlobalForwardingRules.Get +import Network.Google.Resource.Compute.GlobalForwardingRules.Insert +import Network.Google.Resource.Compute.GlobalForwardingRules.List +import Network.Google.Resource.Compute.GlobalForwardingRules.SetTarget +import Network.Google.Resource.Compute.GlobalOperations.AggregatedList +import Network.Google.Resource.Compute.GlobalOperations.Delete +import Network.Google.Resource.Compute.GlobalOperations.Get +import Network.Google.Resource.Compute.GlobalOperations.List +import Network.Google.Resource.Compute.HTTPHealthChecks.Delete +import Network.Google.Resource.Compute.HTTPHealthChecks.Get +import Network.Google.Resource.Compute.HTTPHealthChecks.Insert +import Network.Google.Resource.Compute.HTTPHealthChecks.List +import Network.Google.Resource.Compute.HTTPHealthChecks.Patch +import Network.Google.Resource.Compute.HTTPHealthChecks.Update +import Network.Google.Resource.Compute.Images.Delete +import Network.Google.Resource.Compute.Images.Deprecate +import Network.Google.Resource.Compute.Images.Get +import Network.Google.Resource.Compute.Images.Insert +import Network.Google.Resource.Compute.Images.List +import Network.Google.Resource.Compute.InstanceGroupManagers.AbandonInstances +import Network.Google.Resource.Compute.InstanceGroupManagers.AggregatedList +import Network.Google.Resource.Compute.InstanceGroupManagers.Delete +import Network.Google.Resource.Compute.InstanceGroupManagers.DeleteInstances +import Network.Google.Resource.Compute.InstanceGroupManagers.Get +import Network.Google.Resource.Compute.InstanceGroupManagers.Insert +import Network.Google.Resource.Compute.InstanceGroupManagers.List +import Network.Google.Resource.Compute.InstanceGroupManagers.ListManagedInstances +import Network.Google.Resource.Compute.InstanceGroupManagers.RecreateInstances +import Network.Google.Resource.Compute.InstanceGroupManagers.Resize +import Network.Google.Resource.Compute.InstanceGroupManagers.SetInstanceTemplate +import Network.Google.Resource.Compute.InstanceGroupManagers.SetTargetPools +import Network.Google.Resource.Compute.InstanceGroups.AddInstances +import Network.Google.Resource.Compute.InstanceGroups.AggregatedList +import Network.Google.Resource.Compute.InstanceGroups.Delete +import Network.Google.Resource.Compute.InstanceGroups.Get +import Network.Google.Resource.Compute.InstanceGroups.Insert +import Network.Google.Resource.Compute.InstanceGroups.List +import Network.Google.Resource.Compute.InstanceGroups.ListInstances +import Network.Google.Resource.Compute.InstanceGroups.RemoveInstances +import Network.Google.Resource.Compute.InstanceGroups.SetNamedPorts +import Network.Google.Resource.Compute.Instances.AddAccessConfig +import Network.Google.Resource.Compute.Instances.AggregatedList +import Network.Google.Resource.Compute.Instances.AttachDisk +import Network.Google.Resource.Compute.Instances.Delete +import Network.Google.Resource.Compute.Instances.DeleteAccessConfig +import Network.Google.Resource.Compute.Instances.DetachDisk +import Network.Google.Resource.Compute.Instances.Get +import Network.Google.Resource.Compute.Instances.GetSerialPortOutput +import Network.Google.Resource.Compute.Instances.Insert +import Network.Google.Resource.Compute.Instances.List +import Network.Google.Resource.Compute.Instances.Reset +import Network.Google.Resource.Compute.Instances.SetDiskAutoDelete +import Network.Google.Resource.Compute.Instances.SetMetadata +import Network.Google.Resource.Compute.Instances.SetScheduling +import Network.Google.Resource.Compute.Instances.SetTags +import Network.Google.Resource.Compute.Instances.Start +import Network.Google.Resource.Compute.Instances.Stop +import Network.Google.Resource.Compute.InstanceTemplates.Delete +import Network.Google.Resource.Compute.InstanceTemplates.Get +import Network.Google.Resource.Compute.InstanceTemplates.Insert +import Network.Google.Resource.Compute.InstanceTemplates.List +import Network.Google.Resource.Compute.Licenses.Get +import Network.Google.Resource.Compute.MachineTypes.AggregatedList +import Network.Google.Resource.Compute.MachineTypes.Get +import Network.Google.Resource.Compute.MachineTypes.List +import Network.Google.Resource.Compute.Networks.Delete +import Network.Google.Resource.Compute.Networks.Get +import Network.Google.Resource.Compute.Networks.Insert +import Network.Google.Resource.Compute.Networks.List +import Network.Google.Resource.Compute.Projects.Get +import Network.Google.Resource.Compute.Projects.MoveDisk +import Network.Google.Resource.Compute.Projects.MoveInstance +import Network.Google.Resource.Compute.Projects.SetCommonInstanceMetadata +import Network.Google.Resource.Compute.Projects.SetUsageExportBucket +import Network.Google.Resource.Compute.RegionOperations.Delete +import Network.Google.Resource.Compute.RegionOperations.Get +import Network.Google.Resource.Compute.RegionOperations.List +import Network.Google.Resource.Compute.Regions.Get +import Network.Google.Resource.Compute.Regions.List +import Network.Google.Resource.Compute.Routes.Delete +import Network.Google.Resource.Compute.Routes.Get +import Network.Google.Resource.Compute.Routes.Insert +import Network.Google.Resource.Compute.Routes.List +import Network.Google.Resource.Compute.Snapshots.Delete +import Network.Google.Resource.Compute.Snapshots.Get +import Network.Google.Resource.Compute.Snapshots.List +import Network.Google.Resource.Compute.TargetHTTPProxies.Delete +import Network.Google.Resource.Compute.TargetHTTPProxies.Get +import Network.Google.Resource.Compute.TargetHTTPProxies.Insert +import Network.Google.Resource.Compute.TargetHTTPProxies.List +import Network.Google.Resource.Compute.TargetHTTPProxies.SetURLMap +import Network.Google.Resource.Compute.TargetInstances.AggregatedList +import Network.Google.Resource.Compute.TargetInstances.Delete +import Network.Google.Resource.Compute.TargetInstances.Get +import Network.Google.Resource.Compute.TargetInstances.Insert +import Network.Google.Resource.Compute.TargetInstances.List +import Network.Google.Resource.Compute.TargetPools.AddHealthCheck +import Network.Google.Resource.Compute.TargetPools.AddInstance +import Network.Google.Resource.Compute.TargetPools.AggregatedList +import Network.Google.Resource.Compute.TargetPools.Delete +import Network.Google.Resource.Compute.TargetPools.Get +import Network.Google.Resource.Compute.TargetPools.GetHealth +import Network.Google.Resource.Compute.TargetPools.Insert +import Network.Google.Resource.Compute.TargetPools.List +import Network.Google.Resource.Compute.TargetPools.RemoveHealthCheck +import Network.Google.Resource.Compute.TargetPools.RemoveInstance +import Network.Google.Resource.Compute.TargetPools.SetBackup +import Network.Google.Resource.Compute.TargetVPNGateways.AggregatedList +import Network.Google.Resource.Compute.TargetVPNGateways.Delete +import Network.Google.Resource.Compute.TargetVPNGateways.Get +import Network.Google.Resource.Compute.TargetVPNGateways.Insert +import Network.Google.Resource.Compute.TargetVPNGateways.List +import Network.Google.Resource.Compute.URLMaps.Delete +import Network.Google.Resource.Compute.URLMaps.Get +import Network.Google.Resource.Compute.URLMaps.Insert +import Network.Google.Resource.Compute.URLMaps.List +import Network.Google.Resource.Compute.URLMaps.Patch +import Network.Google.Resource.Compute.URLMaps.Update +import Network.Google.Resource.Compute.URLMaps.Validate +import Network.Google.Resource.Compute.VPNTunnels.AggregatedList +import Network.Google.Resource.Compute.VPNTunnels.Delete +import Network.Google.Resource.Compute.VPNTunnels.Get +import Network.Google.Resource.Compute.VPNTunnels.Insert +import Network.Google.Resource.Compute.VPNTunnels.List +import Network.Google.Resource.Compute.ZoneOperations.Delete +import Network.Google.Resource.Compute.ZoneOperations.Get +import Network.Google.Resource.Compute.ZoneOperations.List +import Network.Google.Resource.Compute.Zones.Get +import Network.Google.Resource.Compute.Zones.List + +{- $resources +TODO +-} + +type ComputeAPI = + Images :<|> URLMaps :<|> InstanceTemplates :<|> + Routes + :<|> TargetVPNGateways + :<|> Zones + :<|> GlobalForwardingRules + :<|> Networks + :<|> Addresses + :<|> VPNTunnels + :<|> Regions + :<|> GlobalAddresses + :<|> TargetHTTPProxies + :<|> Autoscalers + :<|> DiskTypes + :<|> RegionOperations + :<|> MachineTypes + :<|> HTTPHealthChecks + :<|> Snapshots + :<|> Instances + :<|> BackendServices + :<|> InstanceGroups + :<|> GlobalOperations + :<|> Firewalls + :<|> Licenses + :<|> ZoneOperations + :<|> TargetInstances + :<|> Disks + :<|> TargetPools + :<|> InstanceGroupManagers + :<|> Projects + :<|> ForwardingRules + +computeAPI :: Proxy ComputeAPI +computeAPI = Proxy diff --git a/gogol-compute/gen/Network/Google/Compute/Types.hs b/gogol-compute/gen/Network/Google/Compute/Types.hs new file mode 100644 index 000000000..175efa822 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Compute/Types.hs @@ -0,0 +1,1294 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Compute.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Compute.Types + ( + -- * Service URL + computeURL + + -- * InstanceGroupList + , InstanceGroupList + , instanceGroupList + , iglNextPageToken + , iglKind + , iglItems + , iglSelfLink + , iglId + + -- * InstanceGroupManagersSetInstanceTemplateRequest + , InstanceGroupManagersSetInstanceTemplateRequest + , instanceGroupManagersSetInstanceTemplateRequest + , igmsitrInstanceTemplate + + -- * InstanceGroupManagersAbandonInstancesRequest + , InstanceGroupManagersAbandonInstancesRequest + , instanceGroupManagersAbandonInstancesRequest + , igmairInstances + + -- * AddressesScopedList + , AddressesScopedList + , addressesScopedList + , aslAddresses + , aslWarning + + -- * Snapshot + , Snapshot + , snapshot + , sStorageBytesStatus + , sStatus + , sDiskSizeGb + , sSourceDiskId + , sKind + , sStorageBytes + , sSelfLink + , sName + , sCreationTimestamp + , sId + , sLicenses + , sSourceDisk + , sDescription + + -- * FirewallList + , FirewallList + , firewallList + , flNextPageToken + , flKind + , flItems + , flSelfLink + , flId + + -- * DeprecationStatus + , DeprecationStatus + , deprecationStatus + , dsState + , dsDeleted + , dsReplacement + , dsObsolete + , dsDeprecated + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * VPNTunnelsScopedList + , VPNTunnelsScopedList + , vPNTunnelsScopedList + , vtslVpnTunnels + , vtslWarning + + -- * InstanceGroupsAddInstancesRequest + , InstanceGroupsAddInstancesRequest + , instanceGroupsAddInstancesRequest + , igairInstances + + -- * TargetPoolList + , TargetPoolList + , targetPoolList + , tplNextPageToken + , tplKind + , tplItems + , tplSelfLink + , tplId + + -- * DiskList + , DiskList + , diskList + , dlNextPageToken + , dlKind + , dlItems + , dlSelfLink + , dlId + + -- * TargetPoolsAddInstanceRequest + , TargetPoolsAddInstanceRequest + , targetPoolsAddInstanceRequest + , tpairInstances + + -- * ForwardingRuleList + , ForwardingRuleList + , forwardingRuleList + , frlNextPageToken + , frlKind + , frlItems + , frlSelfLink + , frlId + + -- * URLMap + , URLMap + , uRLMap + , umTests + , umKind + , umFingerprint + , umDefaultService + , umSelfLink + , umName + , umCreationTimestamp + , umPathMatchers + , umId + , umHostRules + , umDescription + + -- * InstanceGroupManagerList + , InstanceGroupManagerList + , instanceGroupManagerList + , igmlNextPageToken + , igmlKind + , igmlItems + , igmlSelfLink + , igmlId + + -- * InstanceGroupsSetNamedPortsRequest + , InstanceGroupsSetNamedPortsRequest + , instanceGroupsSetNamedPortsRequest + , igsnprFingerprint + , igsnprNamedPorts + + -- * AutoscalingPolicyCustomMetricUtilization + , AutoscalingPolicyCustomMetricUtilization + , autoscalingPolicyCustomMetricUtilization + , apcmuUtilizationTarget + , apcmuMetric + , apcmuUtilizationTargetType + + -- * Image + , Image + , image + , iStatus + , iDiskSizeGb + , iSourceType + , iSourceDiskId + , iKind + , iArchiveSizeBytes + , iRawDisk + , iSelfLink + , iName + , iCreationTimestamp + , iId + , iLicenses + , iSourceDisk + , iDescription + , iDeprecated + + -- * TargetInstanceAggregatedList + , TargetInstanceAggregatedList + , targetInstanceAggregatedList + , tialNextPageToken + , tialKind + , tialItems + , tialSelfLink + , tialId + + -- * ForwardingRulesScopedList + , ForwardingRulesScopedList + , forwardingRulesScopedList + , frslWarning + , frslForwardingRules + + -- * DiskAggregatedList + , DiskAggregatedList + , diskAggregatedList + , dalNextPageToken + , dalKind + , dalItems + , dalSelfLink + , dalId + + -- * InstanceReference + , InstanceReference + , instanceReference + , irInstance + + -- * InstanceWithNamedPorts + , InstanceWithNamedPorts + , instanceWithNamedPorts + , iwnpStatus + , iwnpNamedPorts + , iwnpInstance + + -- * InstanceGroupManagersScopedList + , InstanceGroupManagersScopedList + , instanceGroupManagersScopedList + , igmslWarning + , igmslInstanceGroupManagers + + -- * InstanceGroupManagerAggregatedList + , InstanceGroupManagerAggregatedList + , instanceGroupManagerAggregatedList + , igmalNextPageToken + , igmalKind + , igmalItems + , igmalSelfLink + , igmalId + + -- * DisksScopedList + , DisksScopedList + , disksScopedList + , dslWarning + , dslDisks + + -- * NamedPort + , NamedPort + , namedPort + , npName + , npPort + + -- * TargetPoolsScopedList + , TargetPoolsScopedList + , targetPoolsScopedList + , tpslWarning + , tpslTargetPools + + -- * OperationsScopedList + , OperationsScopedList + , operationsScopedList + , oslWarning + , oslOperations + + -- * OperationAggregatedList + , OperationAggregatedList + , operationAggregatedList + , oalNextPageToken + , oalKind + , oalItems + , oalSelfLink + , oalId + + -- * ForwardingRuleAggregatedList + , ForwardingRuleAggregatedList + , forwardingRuleAggregatedList + , fralNextPageToken + , fralKind + , fralItems + , fralSelfLink + , fralId + + -- * TargetInstanceList + , TargetInstanceList + , targetInstanceList + , tilNextPageToken + , tilKind + , tilItems + , tilSelfLink + , tilId + + -- * TargetReference + , TargetReference + , targetReference + , trTarget + + -- * TargetPoolAggregatedList + , TargetPoolAggregatedList + , targetPoolAggregatedList + , tpalNextPageToken + , tpalKind + , tpalItems + , tpalSelfLink + , tpalId + + -- * ImageList + , ImageList + , imageList + , ilNextPageToken + , ilKind + , ilItems + , ilSelfLink + , ilId + + -- * TargetPool + , TargetPool + , targetPool + , tpSessionAffinity + , tpBackupPool + , tpKind + , tpSelfLink + , tpName + , tpCreationTimestamp + , tpInstances + , tpId + , tpFailoverRatio + , tpRegion + , tpDescription + , tpHealthChecks + + -- * Disk + , Disk + , disk + , dStatus + , dSourceSnapshotId + , dLastAttachTimestamp + , dUsers + , dSourceImage + , dSizeGb + , dKind + , dLastDetachTimestamp + , dZone + , dSelfLink + , dName + , dSourceImageId + , dCreationTimestamp + , dId + , dLicenses + , dOptions + , dType + , dDescription + , dSourceSnapshot + + -- * AutoscalingPolicyLoadBalancingUtilization + , AutoscalingPolicyLoadBalancingUtilization + , autoscalingPolicyLoadBalancingUtilization + , aplbuUtilizationTarget + + -- * InstanceGroupManager + , InstanceGroupManager + , instanceGroupManager + , igmKind + , igmFingerprint + , igmBaseInstanceName + , igmZone + , igmInstanceTemplate + , igmTargetSize + , igmSelfLink + , igmCurrentActions + , igmName + , igmCreationTimestamp + , igmId + , igmTargetPools + , igmDescription + , igmInstanceGroup + + -- * ForwardingRule + , ForwardingRule + , forwardingRule + , frIPAddress + , frKind + , frPortRange + , frSelfLink + , frName + , frIPProtocol + , frCreationTimestamp + , frId + , frRegion + , frDescription + , frTarget + + -- * DiskMoveRequest + , DiskMoveRequest + , diskMoveRequest + , dmrTargetDisk + , dmrDestinationZone + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * Project + , Project + , project + , pKind + , pUsageExportLocation + , pSelfLink + , pName + , pCreationTimestamp + , pEnabledFeatures + , pQuotas + , pId + , pDescription + , pCommonInstanceMetadata + + -- * URLMapList + , URLMapList + , uRLMapList + , umlNextPageToken + , umlKind + , umlItems + , umlSelfLink + , umlId + + -- * TargetPoolsRemoveInstanceRequest + , TargetPoolsRemoveInstanceRequest + , targetPoolsRemoveInstanceRequest + , tprirInstances + + -- * InstanceProperties + , InstanceProperties + , instanceProperties + , ipServiceAccounts + , ipNetworkInterfaces + , ipMachineType + , ipMetadata + , ipScheduling + , ipDisks + , ipCanIpForward + , ipDescription + , ipTags + + -- * TargetPoolInstanceHealth + , TargetPoolInstanceHealth + , targetPoolInstanceHealth + , tpihKind + , tpihHealthStatus + + -- * TargetInstance + , TargetInstance + , targetInstance + , tiKind + , tiNatPolicy + , tiZone + , tiSelfLink + , tiName + , tiCreationTimestamp + , tiId + , tiDescription + , tiInstance + + -- * InstanceGroupManagersListManagedInstancesResponse + , InstanceGroupManagersListManagedInstancesResponse + , instanceGroupManagersListManagedInstancesResponse + , igmlmirManagedInstances + + -- * InstanceGroupsRemoveInstancesRequest + , InstanceGroupsRemoveInstancesRequest + , instanceGroupsRemoveInstancesRequest + , igrirInstances + + -- * AttachedDiskInitializeParams + , AttachedDiskInitializeParams + , attachedDiskInitializeParams + , adipSourceImage + , adipDiskSizeGb + , adipDiskName + , adipDiskType + + -- * NetworkInterface + , NetworkInterface + , networkInterface + , niNetwork + , niName + , niNetworkIP + , niAccessConfigs + + -- * InstanceTemplateList + , InstanceTemplateList + , instanceTemplateList + , itlNextPageToken + , itlKind + , itlItems + , itlSelfLink + , itlId + + -- * TargetPoolsRemoveHealthCheckRequest + , TargetPoolsRemoveHealthCheckRequest + , targetPoolsRemoveHealthCheckRequest + , tprhcrHealthChecks + + -- * RouteList + , RouteList + , routeList + , rlNextPageToken + , rlKind + , rlItems + , rlSelfLink + , rlId + + -- * TargetVPNGatewayList + , TargetVPNGatewayList + , targetVPNGatewayList + , tvglNextPageToken + , tvglKind + , tvglItems + , tvglSelfLink + , tvglId + + -- * Address + , Address + , address + , aStatus + , aUsers + , aKind + , aAddress + , aSelfLink + , aName + , aCreationTimestamp + , aId + , aRegion + , aDescription + + -- * InstanceAggregatedList + , InstanceAggregatedList + , instanceAggregatedList + , ialNextPageToken + , ialKind + , ialItems + , ialSelfLink + , ialId + + -- * InstancesScopedList + , InstancesScopedList + , instancesScopedList + , islWarning + , islInstances + + -- * Zone + , Zone + , zone + , zStatus + , zMaintenanceWindows + , zKind + , zSelfLink + , zName + , zCreationTimestamp + , zId + , zRegion + , zDescription + , zDeprecated + + -- * InstanceGroupManagersRecreateInstancesRequest + , InstanceGroupManagersRecreateInstancesRequest + , instanceGroupManagersRecreateInstancesRequest + , igmrirInstances + + -- * Network + , Network + , network + , nKind + , nIPv4Range + , nSelfLink + , nName + , nCreationTimestamp + , nId + , nGatewayIPv4 + , nDescription + + -- * Route + , Route + , route + , rPriority + , rKind + , rNextHopGateway + , rNextHopNetwork + , rNetwork + , rWarnings + , rNextHopIp + , rDestRange + , rSelfLink + , rName + , rCreationTimestamp + , rId + , rNextHopVpnTunnel + , rDescription + , rTags + , rNextHopInstance + + -- * InstanceTemplate + , InstanceTemplate + , instanceTemplate + , itKind + , itSelfLink + , itName + , itCreationTimestamp + , itId + , itDescription + , itProperties + + -- * HealthCheckReference + , HealthCheckReference + , healthCheckReference + , hcrHealthCheck + + -- * URLMapsValidateResponse + , URLMapsValidateResponse + , uRLMapsValidateResponse + , umvrResult + + -- * InstanceGroupAggregatedList + , InstanceGroupAggregatedList + , instanceGroupAggregatedList + , igalNextPageToken + , igalKind + , igalItems + , igalSelfLink + , igalId + + -- * TargetVPNGateway + , TargetVPNGateway + , targetVPNGateway + , tvgStatus + , tvgKind + , tvgNetwork + , tvgSelfLink + , tvgName + , tvgCreationTimestamp + , tvgId + , tvgRegion + , tvgTunnels + , tvgDescription + , tvgForwardingRules + + -- * UsageExportLocation + , UsageExportLocation + , usageExportLocation + , uelReportNamePrefix + , uelBucketName + + -- * InstanceGroupManagersDeleteInstancesRequest + , InstanceGroupManagersDeleteInstancesRequest + , instanceGroupManagersDeleteInstancesRequest + , igmdirInstances + + -- * ManagedInstance + , ManagedInstance + , managedInstance + , miLastAttempt + , miCurrentAction + , miId + , miInstanceStatus + , miInstance + + -- * InstanceGroupsListInstancesRequest + , InstanceGroupsListInstancesRequest + , instanceGroupsListInstancesRequest + , iglirInstanceState + + -- * AddressList + , AddressList + , addressList + , alNextPageToken + , alKind + , alItems + , alSelfLink + , alId + + -- * ZoneList + , ZoneList + , zoneList + , zlNextPageToken + , zlKind + , zlItems + , zlSelfLink + , zlId + + -- * InstanceGroupManagerActionsSummary + , InstanceGroupManagerActionsSummary + , instanceGroupManagerActionsSummary + , igmasDeleting + , igmasRestarting + , igmasNone + , igmasCreating + , igmasRefreshing + , igmasRecreating + , igmasAbandoning + + -- * URLMapReference + , URLMapReference + , uRLMapReference + , umrUrlMap + + -- * TargetPoolsAddHealthCheckRequest + , TargetPoolsAddHealthCheckRequest + , targetPoolsAddHealthCheckRequest + , tpahcrHealthChecks + + -- * NetworkList + , NetworkList + , networkList + , nlNextPageToken + , nlKind + , nlItems + , nlSelfLink + , nlId + + -- * ServiceAccount + , ServiceAccount + , serviceAccount + , saEmail + , saScopes + + -- * Backend + , Backend + , backend + , bGroup + , bBalancingMode + , bMaxUtilization + , bMaxRate + , bMaxRatePerInstance + , bDescription + , bCapacityScaler + + -- * TargetInstancesScopedList + , TargetInstancesScopedList + , targetInstancesScopedList + , tislWarning + , tislTargetInstances + + -- * MachineTypeList + , MachineTypeList + , machineTypeList + , mtlNextPageToken + , mtlKind + , mtlItems + , mtlSelfLink + , mtlId + + -- * DiskTypeList + , DiskTypeList + , diskTypeList + , dtlNextPageToken + , dtlKind + , dtlItems + , dtlSelfLink + , dtlId + + -- * VPNTunnelAggregatedList + , VPNTunnelAggregatedList + , vPNTunnelAggregatedList + , vtalNextPageToken + , vtalKind + , vtalItems + , vtalSelfLink + , vtalId + + -- * AutoscalerList + , AutoscalerList + , autoscalerList + , autNextPageToken + , autKind + , autItems + , autSelfLink + , autId + + -- * AttachedDisk + , AttachedDisk + , attachedDisk + , adKind + , adMode + , adBoot + , adAutoDelete + , adInitializeParams + , adDeviceName + , adInterface + , adSource + , adLicenses + , adType + , adIndex + + -- * TargetHTTPProxyList + , TargetHTTPProxyList + , targetHTTPProxyList + , thttpplNextPageToken + , thttpplKind + , thttpplItems + , thttpplSelfLink + , thttpplId + + -- * MachineTypesScopedList + , MachineTypesScopedList + , machineTypesScopedList + , mtslMachineTypes + , mtslWarning + + -- * VPNTunnelList + , VPNTunnelList + , vPNTunnelList + , vtlNextPageToken + , vtlKind + , vtlItems + , vtlSelfLink + , vtlId + + -- * BackendServiceGroupHealth + , BackendServiceGroupHealth + , backendServiceGroupHealth + , bsghKind + , bsghHealthStatus + + -- * DiskTypeAggregatedList + , DiskTypeAggregatedList + , diskTypeAggregatedList + , dtalNextPageToken + , dtalKind + , dtalItems + , dtalSelfLink + , dtalId + + -- * HTTPHealthCheck + , HTTPHealthCheck + , hTTPHealthCheck + , httphcHealthyThreshold + , httphcKind + , httphcRequestPath + , httphcSelfLink + , httphcCheckIntervalSec + , httphcName + , httphcCreationTimestamp + , httphcId + , httphcHost + , httphcTimeoutSec + , httphcDescription + , httphcUnhealthyThreshold + , httphcPort + + -- * AutoscalingPolicy + , AutoscalingPolicy + , autoscalingPolicy + , apCustomMetricUtilizations + , apMaxNumReplicas + , apCpuUtilization + , apLoadBalancingUtilization + , apMinNumReplicas + , apCoolDownPeriodSec + + -- * AutoscalersScopedList + , AutoscalersScopedList + , autoscalersScopedList + , aAutoscalers + , aWarning + + -- * DiskTypesScopedList + , DiskTypesScopedList + , diskTypesScopedList + , dtslDiskTypes + , dtslWarning + + -- * AutoscalerAggregatedList + , AutoscalerAggregatedList + , autoscalerAggregatedList + , aalNextPageToken + , aalKind + , aalItems + , aalSelfLink + , aalId + + -- * MachineTypeAggregatedList + , MachineTypeAggregatedList + , machineTypeAggregatedList + , mtalNextPageToken + , mtalKind + , mtalItems + , mtalSelfLink + , mtalId + + -- * RegionList + , RegionList + , regionList + , regNextPageToken + , regKind + , regItems + , regSelfLink + , regId + + -- * MachineType + , MachineType + , machineType + , mtKind + , mtImageSpaceGb + , mtZone + , mtSelfLink + , mtName + , mtCreationTimestamp + , mtScratchDisks + , mtId + , mtGuestCpus + , mtMaximumPersistentDisksSizeGb + , mtMaximumPersistentDisks + , mtMemoryMb + , mtDescription + , mtDeprecated + + -- * DiskType + , DiskType + , diskType + , dtKind + , dtZone + , dtSelfLink + , dtName + , dtCreationTimestamp + , dtId + , dtValidDiskSize + , dtDescription + , dtDefaultDiskSizeGb + , dtDeprecated + + -- * URLMapValidationResult + , URLMapValidationResult + , uRLMapValidationResult + , umvrLoadErrors + , umvrLoadSucceeded + , umvrTestPassed + , umvrTestFailures + + -- * Autoscaler + , Autoscaler + , autoscaler + , aaKind + , aaZone + , aaSelfLink + , aaName + , aaCreationTimestamp + , aaAutoscalingPolicy + , aaId + , aaDescription + , aaTarget + + -- * InstanceGroupsListInstances + , InstanceGroupsListInstances + , instanceGroupsListInstances + , igliNextPageToken + , igliKind + , igliItems + , igliSelfLink + , igliId + + -- * Metadata + , Metadata + , metadata + , mKind + , mFingerprint + , mItems + + -- * TargetHTTPProxy + , TargetHTTPProxy + , targetHTTPProxy + , thttppUrlMap + , thttppKind + , thttppSelfLink + , thttppName + , thttppCreationTimestamp + , thttppId + , thttppDescription + + -- * Region + , Region + , region + , rrStatus + , rrZones + , rrKind + , rrSelfLink + , rrName + , rrCreationTimestamp + , rrQuotas + , rrId + , rrDescription + , rrDeprecated + + -- * VPNTunnel + , VPNTunnel + , vPNTunnel + , vtDetailedStatus + , vtStatus + , vtKind + , vtPeerIp + , vtTargetVpnGateway + , vtSelfLink + , vtSharedSecret + , vtName + , vtCreationTimestamp + , vtSharedSecretHash + , vtId + , vtIkeVersion + , vtRegion + , vtDescription + + -- * Scheduling + , Scheduling + , scheduling + , sAutomaticRestart + , sOnHostMaintenance + , sPreemptible + + -- * HealthStatus + , HealthStatus + , healthStatus + , hsIpAddress + , hsHealthState + , hsPort + , hsInstance + + -- * HTTPHealthCheckList + , HTTPHealthCheckList + , hTTPHealthCheckList + , httphclNextPageToken + , httphclKind + , httphclItems + , httphclSelfLink + , httphclId + + -- * URLMapsValidateRequest + , URLMapsValidateRequest + , uRLMapsValidateRequest + , umvrResource + + -- * PathRule + , PathRule + , pathRule + , prService + , prPaths + + -- * BackendServiceList + , BackendServiceList + , backendServiceList + , bslNextPageToken + , bslKind + , bslItems + , bslSelfLink + , bslId + + -- * License + , License + , license + , lChargesUseFee + , lKind + , lSelfLink + , lName + + -- * InstanceList + , InstanceList + , instanceList + , insNextPageToken + , insKind + , insItems + , insSelfLink + , insId + + -- * ManagedInstanceLastAttempt + , ManagedInstanceLastAttempt + , managedInstanceLastAttempt + , milaErrors + + -- * InstanceGroupManagersSetTargetPoolsRequest + , InstanceGroupManagersSetTargetPoolsRequest + , instanceGroupManagersSetTargetPoolsRequest + , igmstprFingerprint + , igmstprTargetPools + + -- * TargetVPNGatewayAggregatedList + , TargetVPNGatewayAggregatedList + , targetVPNGatewayAggregatedList + , tvgalNextPageToken + , tvgalKind + , tvgalItems + , tvgalSelfLink + , tvgalId + + -- * InstanceGroup + , InstanceGroup + , instanceGroup + , igSize + , igKind + , igFingerprint + , igNetwork + , igZone + , igSelfLink + , igName + , igCreationTimestamp + , igId + , igDescription + , igNamedPorts + + -- * HostRule + , HostRule + , hostRule + , hrHosts + , hrDescription + , hrPathMatcher + + -- * SerialPortOutput + , SerialPortOutput + , serialPortOutput + , spoContents + , spoKind + , spoSelfLink + + -- * TestFailure + , TestFailure + , testFailure + , tfPath + , tfExpectedService + , tfHost + , tfActualService + + -- * TargetVPNGatewaysScopedList + , TargetVPNGatewaysScopedList + , targetVPNGatewaysScopedList + , tvgslTargetVpnGateways + , tvgslWarning + + -- * Quota + , Quota + , quota + , qMetric + , qLimit + , qUsage + + -- * SnapshotList + , SnapshotList + , snapshotList + , slNextPageToken + , slKind + , slItems + , slSelfLink + , slId + + -- * AutoscalingPolicyCPUUtilization + , AutoscalingPolicyCPUUtilization + , autoscalingPolicyCPUUtilization + , apcuUtilizationTarget + + -- * AccessConfig + , AccessConfig + , accessConfig + , acKind + , acName + , acNatIP + , acType + + -- * ResourceGroupReference + , ResourceGroupReference + , resourceGroupReference + , rgrGroup + + -- * Firewall + , Firewall + , firewall + , fSourceTags + , fKind + , fTargetTags + , fNetwork + , fSourceRanges + , fSelfLink + , fName + , fCreationTimestamp + , fId + , fAllowed + , fDescription + + -- * AddressAggregatedList + , AddressAggregatedList + , addressAggregatedList + , addNextPageToken + , addKind + , addItems + , addSelfLink + , addId + + -- * Tags + , Tags + , tags + , tFingerprint + , tItems + + -- * BackendService + , BackendService + , backendService + , bsBackends + , bsKind + , bsFingerprint + , bsProtocol + , bsSelfLink + , bsName + , bsCreationTimestamp + , bsId + , bsTimeoutSec + , bsDescription + , bsPortName + , bsHealthChecks + , bsPort + + -- * URLMapTest + , URLMapTest + , uRLMapTest + , umtPath + , umtService + , umtHost + , umtDescription + + -- * InstanceMoveRequest + , InstanceMoveRequest + , instanceMoveRequest + , imrTargetInstance + , imrDestinationZone + + -- * Instance + , Instance + , instance' + , iiStatus + , iiServiceAccounts + , iiNetworkInterfaces + , iiKind + , iiZone + , iiCpuPlatform + , iiSelfLink + , iiName + , iiStatusMessage + , iiCreationTimestamp + , iiMachineType + , iiMetadata + , iiId + , iiScheduling + , iiDisks + , iiCanIpForward + , iiDescription + , iiTags + + -- * PathMatcher + , PathMatcher + , pathMatcher + , pmDefaultService + , pmName + , pmPathRules + , pmDescription + + -- * InstanceGroupsScopedList + , InstanceGroupsScopedList + , instanceGroupsScopedList + , igslWarning + , igslInstanceGroups + ) where + +import Network.Google.Compute.Types.Product +import Network.Google.Compute.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Compute Engine API. +computeURL :: BaseURL +computeURL + = BaseUrl Https + "https://www.googleapis.com/compute/v1/projects/" + 443 diff --git a/gogol-compute/gen/Network/Google/Compute/Types/Product.hs b/gogol-compute/gen/Network/Google/Compute/Types/Product.hs new file mode 100644 index 000000000..35c45480d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Compute/Types/Product.hs @@ -0,0 +1,12196 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Compute.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Compute.Types.Product where + +import Network.Google.Compute.Types.Sum +import Network.Google.Prelude + +-- | A list of InstanceGroup resources. +-- +-- /See:/ 'instanceGroupList' smart constructor. +data InstanceGroupList = InstanceGroupList + { _iglNextPageToken :: !(Maybe Text) + , _iglKind :: !Text + , _iglItems :: !(Maybe [Maybe InstanceGroup]) + , _iglSelfLink :: !(Maybe Text) + , _iglId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iglNextPageToken' +-- +-- * 'iglKind' +-- +-- * 'iglItems' +-- +-- * 'iglSelfLink' +-- +-- * 'iglId' +instanceGroupList + :: InstanceGroupList +instanceGroupList = + InstanceGroupList + { _iglNextPageToken = Nothing + , _iglKind = "compute#instanceGroupList" + , _iglItems = Nothing + , _iglSelfLink = Nothing + , _iglId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +iglNextPageToken :: Lens' InstanceGroupList (Maybe Text) +iglNextPageToken + = lens _iglNextPageToken + (\ s a -> s{_iglNextPageToken = a}) + +-- | [Output Only] The resource type, which is always +-- compute#instanceGroupList for instance group lists. +iglKind :: Lens' InstanceGroupList Text +iglKind = lens _iglKind (\ s a -> s{_iglKind = a}) + +-- | A list of InstanceGroup resources. +iglItems :: Lens' InstanceGroupList [Maybe InstanceGroup] +iglItems + = lens _iglItems (\ s a -> s{_iglItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The URL for this instance group. The server defines this +-- URL. +iglSelfLink :: Lens' InstanceGroupList (Maybe Text) +iglSelfLink + = lens _iglSelfLink (\ s a -> s{_iglSelfLink = a}) + +-- | [Output Only] A unique identifier for this list of instance groups. The +-- server defines this identifier. +iglId :: Lens' InstanceGroupList (Maybe Text) +iglId = lens _iglId (\ s a -> s{_iglId = a}) + +instance FromJSON InstanceGroupList where + parseJSON + = withObject "InstanceGroupList" + (\ o -> + InstanceGroupList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#instanceGroupList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupList where + toJSON InstanceGroupList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _iglNextPageToken, + Just ("kind" .= _iglKind), + ("items" .=) <$> _iglItems, + ("selfLink" .=) <$> _iglSelfLink, + ("id" .=) <$> _iglId]) + +-- +-- /See:/ 'instanceGroupManagersSetInstanceTemplateRequest' smart constructor. +newtype InstanceGroupManagersSetInstanceTemplateRequest = InstanceGroupManagersSetInstanceTemplateRequest + { _igmsitrInstanceTemplate :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmsitrInstanceTemplate' +instanceGroupManagersSetInstanceTemplateRequest + :: InstanceGroupManagersSetInstanceTemplateRequest +instanceGroupManagersSetInstanceTemplateRequest = + InstanceGroupManagersSetInstanceTemplateRequest + { _igmsitrInstanceTemplate = Nothing + } + +-- | The URL of the instance template that is specified for this managed +-- instance group. The group uses this template to create all new instances +-- in the managed instance group. +igmsitrInstanceTemplate :: Lens' InstanceGroupManagersSetInstanceTemplateRequest (Maybe Text) +igmsitrInstanceTemplate + = lens _igmsitrInstanceTemplate + (\ s a -> s{_igmsitrInstanceTemplate = a}) + +instance FromJSON + InstanceGroupManagersSetInstanceTemplateRequest where + parseJSON + = withObject + "InstanceGroupManagersSetInstanceTemplateRequest" + (\ o -> + InstanceGroupManagersSetInstanceTemplateRequest <$> + (o .:? "instanceTemplate")) + +instance ToJSON + InstanceGroupManagersSetInstanceTemplateRequest where + toJSON + InstanceGroupManagersSetInstanceTemplateRequest{..} + = object + (catMaybes + [("instanceTemplate" .=) <$> + _igmsitrInstanceTemplate]) + +-- +-- /See:/ 'instanceGroupManagersAbandonInstancesRequest' smart constructor. +newtype InstanceGroupManagersAbandonInstancesRequest = InstanceGroupManagersAbandonInstancesRequest + { _igmairInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersAbandonInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmairInstances' +instanceGroupManagersAbandonInstancesRequest + :: InstanceGroupManagersAbandonInstancesRequest +instanceGroupManagersAbandonInstancesRequest = + InstanceGroupManagersAbandonInstancesRequest + { _igmairInstances = Nothing + } + +-- | The names of instances to abandon from the managed instance group. +igmairInstances :: Lens' InstanceGroupManagersAbandonInstancesRequest [Text] +igmairInstances + = lens _igmairInstances + (\ s a -> s{_igmairInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersAbandonInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersAbandonInstancesRequest" + (\ o -> + InstanceGroupManagersAbandonInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersAbandonInstancesRequest where + toJSON + InstanceGroupManagersAbandonInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmairInstances]) + +-- +-- /See:/ 'addressesScopedList' smart constructor. +data AddressesScopedList = AddressesScopedList + { _aslAddresses :: !(Maybe [Maybe Address]) + , _aslWarning :: !(Maybe AddressesScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aslAddresses' +-- +-- * 'aslWarning' +addressesScopedList + :: AddressesScopedList +addressesScopedList = + AddressesScopedList + { _aslAddresses = Nothing + , _aslWarning = Nothing + } + +-- | [Output Only] List of addresses contained in this scope. +aslAddresses :: Lens' AddressesScopedList [Maybe Address] +aslAddresses + = lens _aslAddresses (\ s a -> s{_aslAddresses = a}) + . _Default + . _Coerce + +-- | [Output Only] Informational warning which replaces the list of addresses +-- when the list is empty. +aslWarning :: Lens' AddressesScopedList (Maybe AddressesScopedListWarning) +aslWarning + = lens _aslWarning (\ s a -> s{_aslWarning = a}) + +instance FromJSON AddressesScopedList where + parseJSON + = withObject "AddressesScopedList" + (\ o -> + AddressesScopedList <$> + (o .:? "addresses" .!= mempty) <*> (o .:? "warning")) + +instance ToJSON AddressesScopedList where + toJSON AddressesScopedList{..} + = object + (catMaybes + [("addresses" .=) <$> _aslAddresses, + ("warning" .=) <$> _aslWarning]) + +-- | A persistent disk snapshot resource. +-- +-- /See:/ 'snapshot' smart constructor. +data Snapshot = Snapshot + { _sStorageBytesStatus :: !(Maybe Text) + , _sStatus :: !(Maybe Text) + , _sDiskSizeGb :: !(Maybe Int64) + , _sSourceDiskId :: !(Maybe Text) + , _sKind :: !Text + , _sStorageBytes :: !(Maybe Int64) + , _sSelfLink :: !(Maybe Text) + , _sName :: !(Maybe Text) + , _sCreationTimestamp :: !(Maybe Text) + , _sId :: !(Maybe Word64) + , _sLicenses :: !(Maybe [Text]) + , _sSourceDisk :: !(Maybe Text) + , _sDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Snapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sStorageBytesStatus' +-- +-- * 'sStatus' +-- +-- * 'sDiskSizeGb' +-- +-- * 'sSourceDiskId' +-- +-- * 'sKind' +-- +-- * 'sStorageBytes' +-- +-- * 'sSelfLink' +-- +-- * 'sName' +-- +-- * 'sCreationTimestamp' +-- +-- * 'sId' +-- +-- * 'sLicenses' +-- +-- * 'sSourceDisk' +-- +-- * 'sDescription' +snapshot + :: Snapshot +snapshot = + Snapshot + { _sStorageBytesStatus = Nothing + , _sStatus = Nothing + , _sDiskSizeGb = Nothing + , _sSourceDiskId = Nothing + , _sKind = "compute#snapshot" + , _sStorageBytes = Nothing + , _sSelfLink = Nothing + , _sName = Nothing + , _sCreationTimestamp = Nothing + , _sId = Nothing + , _sLicenses = Nothing + , _sSourceDisk = Nothing + , _sDescription = Nothing + } + +-- | [Output Only] An indicator whether storageBytes is in a stable state or +-- it is being adjusted as a result of shared storage reallocation. +sStorageBytesStatus :: Lens' Snapshot (Maybe Text) +sStorageBytesStatus + = lens _sStorageBytesStatus + (\ s a -> s{_sStorageBytesStatus = a}) + +-- | [Output Only] The status of the snapshot. +sStatus :: Lens' Snapshot (Maybe Text) +sStatus = lens _sStatus (\ s a -> s{_sStatus = a}) + +-- | [Output Only] Size of the snapshot, specified in GB. +sDiskSizeGb :: Lens' Snapshot (Maybe Int64) +sDiskSizeGb + = lens _sDiskSizeGb (\ s a -> s{_sDiskSizeGb = a}) + +-- | [Output Only] The ID value of the disk used to create this snapshot. +-- This value may be used to determine whether the snapshot was taken from +-- the current or a previous instance of a given disk name. +sSourceDiskId :: Lens' Snapshot (Maybe Text) +sSourceDiskId + = lens _sSourceDiskId + (\ s a -> s{_sSourceDiskId = a}) + +-- | [Output Only] Type of the resource. Always compute#snapshot for Snapshot +-- resources. +sKind :: Lens' Snapshot Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | [Output Only] A size of the the storage used by the snapshot. As +-- snapshots share storage, this number is expected to change with snapshot +-- creation\/deletion. +sStorageBytes :: Lens' Snapshot (Maybe Int64) +sStorageBytes + = lens _sStorageBytes + (\ s a -> s{_sStorageBytes = a}) + +-- | [Output Only] Server-defined URL for the resource. +sSelfLink :: Lens' Snapshot (Maybe Text) +sSelfLink + = lens _sSelfLink (\ s a -> s{_sSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +sName :: Lens' Snapshot (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +sCreationTimestamp :: Lens' Snapshot (Maybe Text) +sCreationTimestamp + = lens _sCreationTimestamp + (\ s a -> s{_sCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +sId :: Lens' Snapshot (Maybe Word64) +sId = lens _sId (\ s a -> s{_sId = a}) + +-- | Public visible licenses. +sLicenses :: Lens' Snapshot [Text] +sLicenses + = lens _sLicenses (\ s a -> s{_sLicenses = a}) . + _Default + . _Coerce + +-- | The source disk used to create this snapshot. +sSourceDisk :: Lens' Snapshot (Maybe Text) +sSourceDisk + = lens _sSourceDisk (\ s a -> s{_sSourceDisk = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +sDescription :: Lens' Snapshot (Maybe Text) +sDescription + = lens _sDescription (\ s a -> s{_sDescription = a}) + +instance FromJSON Snapshot where + parseJSON + = withObject "Snapshot" + (\ o -> + Snapshot <$> + (o .:? "storageBytesStatus") <*> (o .:? "status") <*> + (o .:? "diskSizeGb") + <*> (o .:? "sourceDiskId") + <*> (o .:? "kind" .!= "compute#snapshot") + <*> (o .:? "storageBytes") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "licenses" .!= mempty) + <*> (o .:? "sourceDisk") + <*> (o .:? "description")) + +instance ToJSON Snapshot where + toJSON Snapshot{..} + = object + (catMaybes + [("storageBytesStatus" .=) <$> _sStorageBytesStatus, + ("status" .=) <$> _sStatus, + ("diskSizeGb" .=) <$> _sDiskSizeGb, + ("sourceDiskId" .=) <$> _sSourceDiskId, + Just ("kind" .= _sKind), + ("storageBytes" .=) <$> _sStorageBytes, + ("selfLink" .=) <$> _sSelfLink, + ("name" .=) <$> _sName, + ("creationTimestamp" .=) <$> _sCreationTimestamp, + ("id" .=) <$> _sId, ("licenses" .=) <$> _sLicenses, + ("sourceDisk" .=) <$> _sSourceDisk, + ("description" .=) <$> _sDescription]) + +-- | Contains a list of Firewall resources. +-- +-- /See:/ 'firewallList' smart constructor. +data FirewallList = FirewallList + { _flNextPageToken :: !(Maybe Text) + , _flKind :: !Text + , _flItems :: !(Maybe [Maybe Firewall]) + , _flSelfLink :: !(Maybe Text) + , _flId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flNextPageToken' +-- +-- * 'flKind' +-- +-- * 'flItems' +-- +-- * 'flSelfLink' +-- +-- * 'flId' +firewallList + :: FirewallList +firewallList = + FirewallList + { _flNextPageToken = Nothing + , _flKind = "compute#firewallList" + , _flItems = Nothing + , _flSelfLink = Nothing + , _flId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +flNextPageToken :: Lens' FirewallList (Maybe Text) +flNextPageToken + = lens _flNextPageToken + (\ s a -> s{_flNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#firewallList for lists of +-- firewalls. +flKind :: Lens' FirewallList Text +flKind = lens _flKind (\ s a -> s{_flKind = a}) + +-- | [Output Only] A list of Firewall resources. +flItems :: Lens' FirewallList [Maybe Firewall] +flItems + = lens _flItems (\ s a -> s{_flItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +flSelfLink :: Lens' FirewallList (Maybe Text) +flSelfLink + = lens _flSelfLink (\ s a -> s{_flSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +flId :: Lens' FirewallList (Maybe Text) +flId = lens _flId (\ s a -> s{_flId = a}) + +instance FromJSON FirewallList where + parseJSON + = withObject "FirewallList" + (\ o -> + FirewallList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#firewallList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON FirewallList where + toJSON FirewallList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _flNextPageToken, + Just ("kind" .= _flKind), ("items" .=) <$> _flItems, + ("selfLink" .=) <$> _flSelfLink, + ("id" .=) <$> _flId]) + +-- | Deprecation status for a public resource. +-- +-- /See:/ 'deprecationStatus' smart constructor. +data DeprecationStatus = DeprecationStatus + { _dsState :: !(Maybe Text) + , _dsDeleted :: !(Maybe Text) + , _dsReplacement :: !(Maybe Text) + , _dsObsolete :: !(Maybe Text) + , _dsDeprecated :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeprecationStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsState' +-- +-- * 'dsDeleted' +-- +-- * 'dsReplacement' +-- +-- * 'dsObsolete' +-- +-- * 'dsDeprecated' +deprecationStatus + :: DeprecationStatus +deprecationStatus = + DeprecationStatus + { _dsState = Nothing + , _dsDeleted = Nothing + , _dsReplacement = Nothing + , _dsObsolete = Nothing + , _dsDeprecated = Nothing + } + +-- | The deprecation state of this resource. This can be DEPRECATED, +-- OBSOLETE, or DELETED. Operations which create a new resource using a +-- DEPRECATED resource will return successfully, but with a warning +-- indicating the deprecated resource and recommending its replacement. +-- Operations which use OBSOLETE or DELETED resources will be rejected and +-- result in an error. +dsState :: Lens' DeprecationStatus (Maybe Text) +dsState = lens _dsState (\ s a -> s{_dsState = a}) + +-- | An optional RFC3339 timestamp on or after which the deprecation state of +-- this resource will be changed to DELETED. +dsDeleted :: Lens' DeprecationStatus (Maybe Text) +dsDeleted + = lens _dsDeleted (\ s a -> s{_dsDeleted = a}) + +-- | The URL of the suggested replacement for a deprecated resource. The +-- suggested replacement resource must be the same kind of resource as the +-- deprecated resource. +dsReplacement :: Lens' DeprecationStatus (Maybe Text) +dsReplacement + = lens _dsReplacement + (\ s a -> s{_dsReplacement = a}) + +-- | An optional RFC3339 timestamp on or after which the deprecation state of +-- this resource will be changed to OBSOLETE. +dsObsolete :: Lens' DeprecationStatus (Maybe Text) +dsObsolete + = lens _dsObsolete (\ s a -> s{_dsObsolete = a}) + +-- | An optional RFC3339 timestamp on or after which the deprecation state of +-- this resource will be changed to DEPRECATED. +dsDeprecated :: Lens' DeprecationStatus (Maybe Text) +dsDeprecated + = lens _dsDeprecated (\ s a -> s{_dsDeprecated = a}) + +instance FromJSON DeprecationStatus where + parseJSON + = withObject "DeprecationStatus" + (\ o -> + DeprecationStatus <$> + (o .:? "state") <*> (o .:? "deleted") <*> + (o .:? "replacement") + <*> (o .:? "obsolete") + <*> (o .:? "deprecated")) + +instance ToJSON DeprecationStatus where + toJSON DeprecationStatus{..} + = object + (catMaybes + [("state" .=) <$> _dsState, + ("deleted" .=) <$> _dsDeleted, + ("replacement" .=) <$> _dsReplacement, + ("obsolete" .=) <$> _dsObsolete, + ("deprecated" .=) <$> _dsDeprecated]) + +-- | Contains a list of Operation resources. +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "compute#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +-- | [Output Only] A token used to continue a truncate. +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#operations for Operations +-- resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +-- | [Output Only] The Operation resources. +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- +-- /See:/ 'vPNTunnelsScopedList' smart constructor. +data VPNTunnelsScopedList = VPNTunnelsScopedList + { _vtslVpnTunnels :: !(Maybe [Maybe VPNTunnel]) + , _vtslWarning :: !(Maybe VPNTunnelsScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtslVpnTunnels' +-- +-- * 'vtslWarning' +vPNTunnelsScopedList + :: VPNTunnelsScopedList +vPNTunnelsScopedList = + VPNTunnelsScopedList + { _vtslVpnTunnels = Nothing + , _vtslWarning = Nothing + } + +-- | List of vpn tunnels contained in this scope. +vtslVpnTunnels :: Lens' VPNTunnelsScopedList [Maybe VPNTunnel] +vtslVpnTunnels + = lens _vtslVpnTunnels + (\ s a -> s{_vtslVpnTunnels = a}) + . _Default + . _Coerce + +-- | Informational warning which replaces the list of addresses when the list +-- is empty. +vtslWarning :: Lens' VPNTunnelsScopedList (Maybe VPNTunnelsScopedListWarning) +vtslWarning + = lens _vtslWarning (\ s a -> s{_vtslWarning = a}) + +instance FromJSON VPNTunnelsScopedList where + parseJSON + = withObject "VPNTunnelsScopedList" + (\ o -> + VPNTunnelsScopedList <$> + (o .:? "vpnTunnels" .!= mempty) <*> + (o .:? "warning")) + +instance ToJSON VPNTunnelsScopedList where + toJSON VPNTunnelsScopedList{..} + = object + (catMaybes + [("vpnTunnels" .=) <$> _vtslVpnTunnels, + ("warning" .=) <$> _vtslWarning]) + +-- +-- /See:/ 'instanceGroupsAddInstancesRequest' smart constructor. +newtype InstanceGroupsAddInstancesRequest = InstanceGroupsAddInstancesRequest + { _igairInstances :: Maybe [Maybe InstanceReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsAddInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igairInstances' +instanceGroupsAddInstancesRequest + :: InstanceGroupsAddInstancesRequest +instanceGroupsAddInstancesRequest = + InstanceGroupsAddInstancesRequest + { _igairInstances = Nothing + } + +-- | The instances to add to the instance group. +igairInstances :: Lens' InstanceGroupsAddInstancesRequest [Maybe InstanceReference] +igairInstances + = lens _igairInstances + (\ s a -> s{_igairInstances = a}) + . _Default + . _Coerce + +instance FromJSON InstanceGroupsAddInstancesRequest + where + parseJSON + = withObject "InstanceGroupsAddInstancesRequest" + (\ o -> + InstanceGroupsAddInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON InstanceGroupsAddInstancesRequest + where + toJSON InstanceGroupsAddInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igairInstances]) + +-- | Contains a list of TargetPool resources. +-- +-- /See:/ 'targetPoolList' smart constructor. +data TargetPoolList = TargetPoolList + { _tplNextPageToken :: !(Maybe Text) + , _tplKind :: !Text + , _tplItems :: !(Maybe [Maybe TargetPool]) + , _tplSelfLink :: !(Maybe Text) + , _tplId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tplNextPageToken' +-- +-- * 'tplKind' +-- +-- * 'tplItems' +-- +-- * 'tplSelfLink' +-- +-- * 'tplId' +targetPoolList + :: TargetPoolList +targetPoolList = + TargetPoolList + { _tplNextPageToken = Nothing + , _tplKind = "compute#targetPoolList" + , _tplItems = Nothing + , _tplSelfLink = Nothing + , _tplId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tplNextPageToken :: Lens' TargetPoolList (Maybe Text) +tplNextPageToken + = lens _tplNextPageToken + (\ s a -> s{_tplNextPageToken = a}) + +-- | Type of resource. +tplKind :: Lens' TargetPoolList Text +tplKind = lens _tplKind (\ s a -> s{_tplKind = a}) + +-- | A list of TargetPool resources. +tplItems :: Lens' TargetPoolList [Maybe TargetPool] +tplItems + = lens _tplItems (\ s a -> s{_tplItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +tplSelfLink :: Lens' TargetPoolList (Maybe Text) +tplSelfLink + = lens _tplSelfLink (\ s a -> s{_tplSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +tplId :: Lens' TargetPoolList (Maybe Text) +tplId = lens _tplId (\ s a -> s{_tplId = a}) + +instance FromJSON TargetPoolList where + parseJSON + = withObject "TargetPoolList" + (\ o -> + TargetPoolList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#targetPoolList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetPoolList where + toJSON TargetPoolList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tplNextPageToken, + Just ("kind" .= _tplKind), + ("items" .=) <$> _tplItems, + ("selfLink" .=) <$> _tplSelfLink, + ("id" .=) <$> _tplId]) + +-- | A list of Disk resources. +-- +-- /See:/ 'diskList' smart constructor. +data DiskList = DiskList + { _dlNextPageToken :: !(Maybe Text) + , _dlKind :: !Text + , _dlItems :: !(Maybe [Maybe Disk]) + , _dlSelfLink :: !(Maybe Text) + , _dlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlNextPageToken' +-- +-- * 'dlKind' +-- +-- * 'dlItems' +-- +-- * 'dlSelfLink' +-- +-- * 'dlId' +diskList + :: DiskList +diskList = + DiskList + { _dlNextPageToken = Nothing + , _dlKind = "compute#diskList" + , _dlItems = Nothing + , _dlSelfLink = Nothing + , _dlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +dlNextPageToken :: Lens' DiskList (Maybe Text) +dlNextPageToken + = lens _dlNextPageToken + (\ s a -> s{_dlNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#diskList for lists of +-- disks. +dlKind :: Lens' DiskList Text +dlKind = lens _dlKind (\ s a -> s{_dlKind = a}) + +-- | [Output Only] A list of persistent disks. +dlItems :: Lens' DiskList [Maybe Disk] +dlItems + = lens _dlItems (\ s a -> s{_dlItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +dlSelfLink :: Lens' DiskList (Maybe Text) +dlSelfLink + = lens _dlSelfLink (\ s a -> s{_dlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dlId :: Lens' DiskList (Maybe Text) +dlId = lens _dlId (\ s a -> s{_dlId = a}) + +instance FromJSON DiskList where + parseJSON + = withObject "DiskList" + (\ o -> + DiskList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#diskList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON DiskList where + toJSON DiskList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dlNextPageToken, + Just ("kind" .= _dlKind), ("items" .=) <$> _dlItems, + ("selfLink" .=) <$> _dlSelfLink, + ("id" .=) <$> _dlId]) + +-- +-- /See:/ 'targetPoolsAddInstanceRequest' smart constructor. +newtype TargetPoolsAddInstanceRequest = TargetPoolsAddInstanceRequest + { _tpairInstances :: Maybe [Maybe InstanceReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsAddInstanceRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpairInstances' +targetPoolsAddInstanceRequest + :: TargetPoolsAddInstanceRequest +targetPoolsAddInstanceRequest = + TargetPoolsAddInstanceRequest + { _tpairInstances = Nothing + } + +-- | URLs of the instances to be added to targetPool. +tpairInstances :: Lens' TargetPoolsAddInstanceRequest [Maybe InstanceReference] +tpairInstances + = lens _tpairInstances + (\ s a -> s{_tpairInstances = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolsAddInstanceRequest where + parseJSON + = withObject "TargetPoolsAddInstanceRequest" + (\ o -> + TargetPoolsAddInstanceRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON TargetPoolsAddInstanceRequest where + toJSON TargetPoolsAddInstanceRequest{..} + = object + (catMaybes [("instances" .=) <$> _tpairInstances]) + +-- | Contains a list of ForwardingRule resources. +-- +-- /See:/ 'forwardingRuleList' smart constructor. +data ForwardingRuleList = ForwardingRuleList + { _frlNextPageToken :: !(Maybe Text) + , _frlKind :: !Text + , _frlItems :: !(Maybe [Maybe ForwardingRule]) + , _frlSelfLink :: !(Maybe Text) + , _frlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRuleList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frlNextPageToken' +-- +-- * 'frlKind' +-- +-- * 'frlItems' +-- +-- * 'frlSelfLink' +-- +-- * 'frlId' +forwardingRuleList + :: ForwardingRuleList +forwardingRuleList = + ForwardingRuleList + { _frlNextPageToken = Nothing + , _frlKind = "compute#forwardingRuleList" + , _frlItems = Nothing + , _frlSelfLink = Nothing + , _frlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +frlNextPageToken :: Lens' ForwardingRuleList (Maybe Text) +frlNextPageToken + = lens _frlNextPageToken + (\ s a -> s{_frlNextPageToken = a}) + +-- | Type of resource. +frlKind :: Lens' ForwardingRuleList Text +frlKind = lens _frlKind (\ s a -> s{_frlKind = a}) + +-- | A list of ForwardingRule resources. +frlItems :: Lens' ForwardingRuleList [Maybe ForwardingRule] +frlItems + = lens _frlItems (\ s a -> s{_frlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +frlSelfLink :: Lens' ForwardingRuleList (Maybe Text) +frlSelfLink + = lens _frlSelfLink (\ s a -> s{_frlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Set by the server. +frlId :: Lens' ForwardingRuleList (Maybe Text) +frlId = lens _frlId (\ s a -> s{_frlId = a}) + +instance FromJSON ForwardingRuleList where + parseJSON + = withObject "ForwardingRuleList" + (\ o -> + ForwardingRuleList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#forwardingRuleList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ForwardingRuleList where + toJSON ForwardingRuleList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _frlNextPageToken, + Just ("kind" .= _frlKind), + ("items" .=) <$> _frlItems, + ("selfLink" .=) <$> _frlSelfLink, + ("id" .=) <$> _frlId]) + +-- | A UrlMap resource. This resource defines the mapping from URL to the +-- BackendService resource, based on the \"longest-match\" of the URL\'s +-- host and path. +-- +-- /See:/ 'uRLMap' smart constructor. +data URLMap = URLMap + { _umTests :: !(Maybe [Maybe URLMapTest]) + , _umKind :: !Text + , _umFingerprint :: !(Maybe Word8) + , _umDefaultService :: !(Maybe Text) + , _umSelfLink :: !(Maybe Text) + , _umName :: !(Maybe Text) + , _umCreationTimestamp :: !(Maybe Text) + , _umPathMatchers :: !(Maybe [Maybe PathMatcher]) + , _umId :: !(Maybe Word64) + , _umHostRules :: !(Maybe [Maybe HostRule]) + , _umDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umTests' +-- +-- * 'umKind' +-- +-- * 'umFingerprint' +-- +-- * 'umDefaultService' +-- +-- * 'umSelfLink' +-- +-- * 'umName' +-- +-- * 'umCreationTimestamp' +-- +-- * 'umPathMatchers' +-- +-- * 'umId' +-- +-- * 'umHostRules' +-- +-- * 'umDescription' +uRLMap + :: URLMap +uRLMap = + URLMap + { _umTests = Nothing + , _umKind = "compute#urlMap" + , _umFingerprint = Nothing + , _umDefaultService = Nothing + , _umSelfLink = Nothing + , _umName = Nothing + , _umCreationTimestamp = Nothing + , _umPathMatchers = Nothing + , _umId = Nothing + , _umHostRules = Nothing + , _umDescription = Nothing + } + +-- | The list of expected URL mappings. Request to update this UrlMap will +-- succeed only all of the test cases pass. +umTests :: Lens' URLMap [Maybe URLMapTest] +umTests + = lens _umTests (\ s a -> s{_umTests = a}) . _Default + . _Coerce + +-- | Type of the resource. +umKind :: Lens' URLMap Text +umKind = lens _umKind (\ s a -> s{_umKind = a}) + +-- | Fingerprint of this resource. A hash of the contents stored in this +-- object. This field is used in optimistic locking. This field will be +-- ignored when inserting a UrlMap. An up-to-date fingerprint must be +-- provided in order to update the UrlMap. +umFingerprint :: Lens' URLMap (Maybe Word8) +umFingerprint + = lens _umFingerprint + (\ s a -> s{_umFingerprint = a}) + +-- | The URL of the BackendService resource if none of the hostRules match. +umDefaultService :: Lens' URLMap (Maybe Text) +umDefaultService + = lens _umDefaultService + (\ s a -> s{_umDefaultService = a}) + +-- | [Output Only] Server-defined URL for the resource. +umSelfLink :: Lens' URLMap (Maybe Text) +umSelfLink + = lens _umSelfLink (\ s a -> s{_umSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +umName :: Lens' URLMap (Maybe Text) +umName = lens _umName (\ s a -> s{_umName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +umCreationTimestamp :: Lens' URLMap (Maybe Text) +umCreationTimestamp + = lens _umCreationTimestamp + (\ s a -> s{_umCreationTimestamp = a}) + +-- | The list of named PathMatchers to use against the URL. +umPathMatchers :: Lens' URLMap [Maybe PathMatcher] +umPathMatchers + = lens _umPathMatchers + (\ s a -> s{_umPathMatchers = a}) + . _Default + . _Coerce + +-- | [Output Only] Unique identifier for the resource. Set by the server. +umId :: Lens' URLMap (Maybe Word64) +umId = lens _umId (\ s a -> s{_umId = a}) + +-- | The list of HostRules to use against the URL. +umHostRules :: Lens' URLMap [Maybe HostRule] +umHostRules + = lens _umHostRules (\ s a -> s{_umHostRules = a}) . + _Default + . _Coerce + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +umDescription :: Lens' URLMap (Maybe Text) +umDescription + = lens _umDescription + (\ s a -> s{_umDescription = a}) + +instance FromJSON URLMap where + parseJSON + = withObject "URLMap" + (\ o -> + URLMap <$> + (o .:? "tests" .!= mempty) <*> + (o .:? "kind" .!= "compute#urlMap") + <*> (o .:? "fingerprint") + <*> (o .:? "defaultService") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "pathMatchers" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "hostRules" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON URLMap where + toJSON URLMap{..} + = object + (catMaybes + [("tests" .=) <$> _umTests, Just ("kind" .= _umKind), + ("fingerprint" .=) <$> _umFingerprint, + ("defaultService" .=) <$> _umDefaultService, + ("selfLink" .=) <$> _umSelfLink, + ("name" .=) <$> _umName, + ("creationTimestamp" .=) <$> _umCreationTimestamp, + ("pathMatchers" .=) <$> _umPathMatchers, + ("id" .=) <$> _umId, + ("hostRules" .=) <$> _umHostRules, + ("description" .=) <$> _umDescription]) + +-- | [Output Only] A list of InstanceGroupManager resources. +-- +-- /See:/ 'instanceGroupManagerList' smart constructor. +data InstanceGroupManagerList = InstanceGroupManagerList + { _igmlNextPageToken :: !(Maybe Text) + , _igmlKind :: !Text + , _igmlItems :: !(Maybe [Maybe InstanceGroupManager]) + , _igmlSelfLink :: !(Maybe Text) + , _igmlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagerList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlNextPageToken' +-- +-- * 'igmlKind' +-- +-- * 'igmlItems' +-- +-- * 'igmlSelfLink' +-- +-- * 'igmlId' +instanceGroupManagerList + :: InstanceGroupManagerList +instanceGroupManagerList = + InstanceGroupManagerList + { _igmlNextPageToken = Nothing + , _igmlKind = "compute#instanceGroupManagerList" + , _igmlItems = Nothing + , _igmlSelfLink = Nothing + , _igmlId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +igmlNextPageToken :: Lens' InstanceGroupManagerList (Maybe Text) +igmlNextPageToken + = lens _igmlNextPageToken + (\ s a -> s{_igmlNextPageToken = a}) + +-- | [Output Only] Type of the resource. Always +-- compute#instanceGroupManagerList for a list of managed instance group +-- resources. +igmlKind :: Lens' InstanceGroupManagerList Text +igmlKind = lens _igmlKind (\ s a -> s{_igmlKind = a}) + +-- | [Output Only] A list of managed instance group resources. +igmlItems :: Lens' InstanceGroupManagerList [Maybe InstanceGroupManager] +igmlItems + = lens _igmlItems (\ s a -> s{_igmlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The URL for this managed instance group. The server +-- defines this URL. +igmlSelfLink :: Lens' InstanceGroupManagerList (Maybe Text) +igmlSelfLink + = lens _igmlSelfLink (\ s a -> s{_igmlSelfLink = a}) + +-- | [Output Only] A unique identifier for this managed instance group. The +-- server defines this identifier. +igmlId :: Lens' InstanceGroupManagerList (Maybe Text) +igmlId = lens _igmlId (\ s a -> s{_igmlId = a}) + +instance FromJSON InstanceGroupManagerList where + parseJSON + = withObject "InstanceGroupManagerList" + (\ o -> + InstanceGroupManagerList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#instanceGroupManagerList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupManagerList where + toJSON InstanceGroupManagerList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _igmlNextPageToken, + Just ("kind" .= _igmlKind), + ("items" .=) <$> _igmlItems, + ("selfLink" .=) <$> _igmlSelfLink, + ("id" .=) <$> _igmlId]) + +-- +-- /See:/ 'instanceGroupsSetNamedPortsRequest' smart constructor. +data InstanceGroupsSetNamedPortsRequest = InstanceGroupsSetNamedPortsRequest + { _igsnprFingerprint :: !(Maybe Word8) + , _igsnprNamedPorts :: !(Maybe [Maybe NamedPort]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsSetNamedPortsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igsnprFingerprint' +-- +-- * 'igsnprNamedPorts' +instanceGroupsSetNamedPortsRequest + :: InstanceGroupsSetNamedPortsRequest +instanceGroupsSetNamedPortsRequest = + InstanceGroupsSetNamedPortsRequest + { _igsnprFingerprint = Nothing + , _igsnprNamedPorts = Nothing + } + +-- | The fingerprint of the named ports information, which is a hash of the +-- contents. Use this field for optimistic locking when you update the +-- named ports entries. +igsnprFingerprint :: Lens' InstanceGroupsSetNamedPortsRequest (Maybe Word8) +igsnprFingerprint + = lens _igsnprFingerprint + (\ s a -> s{_igsnprFingerprint = a}) + +-- | The list of named ports to set for this instance group. +igsnprNamedPorts :: Lens' InstanceGroupsSetNamedPortsRequest [Maybe NamedPort] +igsnprNamedPorts + = lens _igsnprNamedPorts + (\ s a -> s{_igsnprNamedPorts = a}) + . _Default + . _Coerce + +instance FromJSON InstanceGroupsSetNamedPortsRequest + where + parseJSON + = withObject "InstanceGroupsSetNamedPortsRequest" + (\ o -> + InstanceGroupsSetNamedPortsRequest <$> + (o .:? "fingerprint") <*> + (o .:? "namedPorts" .!= mempty)) + +instance ToJSON InstanceGroupsSetNamedPortsRequest + where + toJSON InstanceGroupsSetNamedPortsRequest{..} + = object + (catMaybes + [("fingerprint" .=) <$> _igsnprFingerprint, + ("namedPorts" .=) <$> _igsnprNamedPorts]) + +-- | Custom utilization metric policy. +-- +-- /See:/ 'autoscalingPolicyCustomMetricUtilization' smart constructor. +data AutoscalingPolicyCustomMetricUtilization = AutoscalingPolicyCustomMetricUtilization + { _apcmuUtilizationTarget :: !(Maybe Double) + , _apcmuMetric :: !(Maybe Text) + , _apcmuUtilizationTargetType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyCustomMetricUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apcmuUtilizationTarget' +-- +-- * 'apcmuMetric' +-- +-- * 'apcmuUtilizationTargetType' +autoscalingPolicyCustomMetricUtilization + :: AutoscalingPolicyCustomMetricUtilization +autoscalingPolicyCustomMetricUtilization = + AutoscalingPolicyCustomMetricUtilization + { _apcmuUtilizationTarget = Nothing + , _apcmuMetric = Nothing + , _apcmuUtilizationTargetType = Nothing + } + +-- | Target value of the metric which Autoscaler should maintain. Must be a +-- positive value. +apcmuUtilizationTarget :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Double) +apcmuUtilizationTarget + = lens _apcmuUtilizationTarget + (\ s a -> s{_apcmuUtilizationTarget = a}) + +-- | Identifier of the metric. It should be a Cloud Monitoring metric. The +-- metric can not have negative values. The metric should be an utilization +-- metric (increasing number of VMs handling requests x times should reduce +-- average value of the metric roughly x times). For example you could use: +-- compute.googleapis.com\/instance\/network\/received_bytes_count. +apcmuMetric :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Text) +apcmuMetric + = lens _apcmuMetric (\ s a -> s{_apcmuMetric = a}) + +-- | Defines type in which utilization_target is expressed. +apcmuUtilizationTargetType :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Text) +apcmuUtilizationTargetType + = lens _apcmuUtilizationTargetType + (\ s a -> s{_apcmuUtilizationTargetType = a}) + +instance FromJSON + AutoscalingPolicyCustomMetricUtilization where + parseJSON + = withObject + "AutoscalingPolicyCustomMetricUtilization" + (\ o -> + AutoscalingPolicyCustomMetricUtilization <$> + (o .:? "utilizationTarget") <*> (o .:? "metric") <*> + (o .:? "utilizationTargetType")) + +instance ToJSON + AutoscalingPolicyCustomMetricUtilization where + toJSON AutoscalingPolicyCustomMetricUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _apcmuUtilizationTarget, + ("metric" .=) <$> _apcmuMetric, + ("utilizationTargetType" .=) <$> + _apcmuUtilizationTargetType]) + +-- | An Image resource. +-- +-- /See:/ 'image' smart constructor. +data Image = Image + { _iStatus :: !(Maybe Text) + , _iDiskSizeGb :: !(Maybe Int64) + , _iSourceType :: !Text + , _iSourceDiskId :: !(Maybe Text) + , _iKind :: !Text + , _iArchiveSizeBytes :: !(Maybe Int64) + , _iRawDisk :: !(Maybe ImageRawDisk) + , _iSelfLink :: !(Maybe Text) + , _iName :: !(Maybe Text) + , _iCreationTimestamp :: !(Maybe Text) + , _iId :: !(Maybe Word64) + , _iLicenses :: !(Maybe [Text]) + , _iSourceDisk :: !(Maybe Text) + , _iDescription :: !(Maybe Text) + , _iDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Image' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iStatus' +-- +-- * 'iDiskSizeGb' +-- +-- * 'iSourceType' +-- +-- * 'iSourceDiskId' +-- +-- * 'iKind' +-- +-- * 'iArchiveSizeBytes' +-- +-- * 'iRawDisk' +-- +-- * 'iSelfLink' +-- +-- * 'iName' +-- +-- * 'iCreationTimestamp' +-- +-- * 'iId' +-- +-- * 'iLicenses' +-- +-- * 'iSourceDisk' +-- +-- * 'iDescription' +-- +-- * 'iDeprecated' +image + :: Image +image = + Image + { _iStatus = Nothing + , _iDiskSizeGb = Nothing + , _iSourceType = "RAW" + , _iSourceDiskId = Nothing + , _iKind = "compute#image" + , _iArchiveSizeBytes = Nothing + , _iRawDisk = Nothing + , _iSelfLink = Nothing + , _iName = Nothing + , _iCreationTimestamp = Nothing + , _iId = Nothing + , _iLicenses = Nothing + , _iSourceDisk = Nothing + , _iDescription = Nothing + , _iDeprecated = Nothing + } + +-- | [Output Only] The status of the image. An image can be used to create +-- other resources, such as instances, only after the image has been +-- successfully created and the status is set to READY. Possible values are +-- FAILED, PENDING, or READY. +iStatus :: Lens' Image (Maybe Text) +iStatus = lens _iStatus (\ s a -> s{_iStatus = a}) + +-- | Size of the image when restored onto a persistent disk (in GB). +iDiskSizeGb :: Lens' Image (Maybe Int64) +iDiskSizeGb + = lens _iDiskSizeGb (\ s a -> s{_iDiskSizeGb = a}) + +-- | The type of the image used to create this disk. The default and only +-- value is RAW +iSourceType :: Lens' Image Text +iSourceType + = lens _iSourceType (\ s a -> s{_iSourceType = a}) + +-- | The ID value of the disk used to create this image. This value may be +-- used to determine whether the image was taken from the current or a +-- previous instance of a given disk name. +iSourceDiskId :: Lens' Image (Maybe Text) +iSourceDiskId + = lens _iSourceDiskId + (\ s a -> s{_iSourceDiskId = a}) + +-- | [Output Only] Type of the resource. Always compute#image for images. +iKind :: Lens' Image Text +iKind = lens _iKind (\ s a -> s{_iKind = a}) + +-- | Size of the image tar.gz archive stored in Google Cloud Storage (in +-- bytes). +iArchiveSizeBytes :: Lens' Image (Maybe Int64) +iArchiveSizeBytes + = lens _iArchiveSizeBytes + (\ s a -> s{_iArchiveSizeBytes = a}) + +-- | The parameters of the raw disk image. +iRawDisk :: Lens' Image (Maybe ImageRawDisk) +iRawDisk = lens _iRawDisk (\ s a -> s{_iRawDisk = a}) + +-- | [Output Only] Server-defined URL for the resource. +iSelfLink :: Lens' Image (Maybe Text) +iSelfLink + = lens _iSelfLink (\ s a -> s{_iSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +iName :: Lens' Image (Maybe Text) +iName = lens _iName (\ s a -> s{_iName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +iCreationTimestamp :: Lens' Image (Maybe Text) +iCreationTimestamp + = lens _iCreationTimestamp + (\ s a -> s{_iCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +iId :: Lens' Image (Maybe Word64) +iId = lens _iId (\ s a -> s{_iId = a}) + +-- | Any applicable publicly visible licenses. +iLicenses :: Lens' Image [Text] +iLicenses + = lens _iLicenses (\ s a -> s{_iLicenses = a}) . + _Default + . _Coerce + +-- | URL of the The source disk used to create this image. This can be a full +-- or valid partial URL. You must provide either this property or the +-- rawDisk.source property but not both to create an image. For example, +-- the following are valid values: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/disk\/disk +-- - projects\/project\/zones\/zone\/disk\/disk - zones\/zone\/disks\/disk +iSourceDisk :: Lens' Image (Maybe Text) +iSourceDisk + = lens _iSourceDisk (\ s a -> s{_iSourceDisk = a}) + +-- | Textual description of the resource; provided by the client when the +-- resource is created. +iDescription :: Lens' Image (Maybe Text) +iDescription + = lens _iDescription (\ s a -> s{_iDescription = a}) + +-- | The deprecation status associated with this image. +iDeprecated :: Lens' Image (Maybe (Maybe DeprecationStatus)) +iDeprecated + = lens _iDeprecated (\ s a -> s{_iDeprecated = a}) + +instance FromJSON Image where + parseJSON + = withObject "Image" + (\ o -> + Image <$> + (o .:? "status") <*> (o .:? "diskSizeGb") <*> + (o .:? "sourceType" .!= "RAW") + <*> (o .:? "sourceDiskId") + <*> (o .:? "kind" .!= "compute#image") + <*> (o .:? "archiveSizeBytes") + <*> (o .:? "rawDisk") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "licenses" .!= mempty) + <*> (o .:? "sourceDisk") + <*> (o .:? "description") + <*> (o .:? "deprecated")) + +instance ToJSON Image where + toJSON Image{..} + = object + (catMaybes + [("status" .=) <$> _iStatus, + ("diskSizeGb" .=) <$> _iDiskSizeGb, + Just ("sourceType" .= _iSourceType), + ("sourceDiskId" .=) <$> _iSourceDiskId, + Just ("kind" .= _iKind), + ("archiveSizeBytes" .=) <$> _iArchiveSizeBytes, + ("rawDisk" .=) <$> _iRawDisk, + ("selfLink" .=) <$> _iSelfLink, + ("name" .=) <$> _iName, + ("creationTimestamp" .=) <$> _iCreationTimestamp, + ("id" .=) <$> _iId, ("licenses" .=) <$> _iLicenses, + ("sourceDisk" .=) <$> _iSourceDisk, + ("description" .=) <$> _iDescription, + ("deprecated" .=) <$> _iDeprecated]) + +-- +-- /See:/ 'targetInstanceAggregatedList' smart constructor. +data TargetInstanceAggregatedList = TargetInstanceAggregatedList + { _tialNextPageToken :: !(Maybe Text) + , _tialKind :: !Text + , _tialItems :: !(Maybe TargetInstanceAggregatedListItems) + , _tialSelfLink :: !(Maybe Text) + , _tialId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstanceAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tialNextPageToken' +-- +-- * 'tialKind' +-- +-- * 'tialItems' +-- +-- * 'tialSelfLink' +-- +-- * 'tialId' +targetInstanceAggregatedList + :: TargetInstanceAggregatedList +targetInstanceAggregatedList = + TargetInstanceAggregatedList + { _tialNextPageToken = Nothing + , _tialKind = "compute#targetInstanceAggregatedList" + , _tialItems = Nothing + , _tialSelfLink = Nothing + , _tialId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tialNextPageToken :: Lens' TargetInstanceAggregatedList (Maybe Text) +tialNextPageToken + = lens _tialNextPageToken + (\ s a -> s{_tialNextPageToken = a}) + +-- | Type of resource. +tialKind :: Lens' TargetInstanceAggregatedList Text +tialKind = lens _tialKind (\ s a -> s{_tialKind = a}) + +-- | A map of scoped target instance lists. +tialItems :: Lens' TargetInstanceAggregatedList (Maybe TargetInstanceAggregatedListItems) +tialItems + = lens _tialItems (\ s a -> s{_tialItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +tialSelfLink :: Lens' TargetInstanceAggregatedList (Maybe Text) +tialSelfLink + = lens _tialSelfLink (\ s a -> s{_tialSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +tialId :: Lens' TargetInstanceAggregatedList (Maybe Text) +tialId = lens _tialId (\ s a -> s{_tialId = a}) + +instance FromJSON TargetInstanceAggregatedList where + parseJSON + = withObject "TargetInstanceAggregatedList" + (\ o -> + TargetInstanceAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#targetInstanceAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetInstanceAggregatedList where + toJSON TargetInstanceAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tialNextPageToken, + Just ("kind" .= _tialKind), + ("items" .=) <$> _tialItems, + ("selfLink" .=) <$> _tialSelfLink, + ("id" .=) <$> _tialId]) + +-- +-- /See:/ 'forwardingRulesScopedList' smart constructor. +data ForwardingRulesScopedList = ForwardingRulesScopedList + { _frslWarning :: !(Maybe ForwardingRulesScopedListWarning) + , _frslForwardingRules :: !(Maybe [Maybe ForwardingRule]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frslWarning' +-- +-- * 'frslForwardingRules' +forwardingRulesScopedList + :: ForwardingRulesScopedList +forwardingRulesScopedList = + ForwardingRulesScopedList + { _frslWarning = Nothing + , _frslForwardingRules = Nothing + } + +-- | Informational warning which replaces the list of forwarding rules when +-- the list is empty. +frslWarning :: Lens' ForwardingRulesScopedList (Maybe ForwardingRulesScopedListWarning) +frslWarning + = lens _frslWarning (\ s a -> s{_frslWarning = a}) + +-- | List of forwarding rules contained in this scope. +frslForwardingRules :: Lens' ForwardingRulesScopedList [Maybe ForwardingRule] +frslForwardingRules + = lens _frslForwardingRules + (\ s a -> s{_frslForwardingRules = a}) + . _Default + . _Coerce + +instance FromJSON ForwardingRulesScopedList where + parseJSON + = withObject "ForwardingRulesScopedList" + (\ o -> + ForwardingRulesScopedList <$> + (o .:? "warning") <*> + (o .:? "forwardingRules" .!= mempty)) + +instance ToJSON ForwardingRulesScopedList where + toJSON ForwardingRulesScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _frslWarning, + ("forwardingRules" .=) <$> _frslForwardingRules]) + +-- +-- /See:/ 'diskAggregatedList' smart constructor. +data DiskAggregatedList = DiskAggregatedList + { _dalNextPageToken :: !(Maybe Text) + , _dalKind :: !Text + , _dalItems :: !(Maybe DiskAggregatedListItems) + , _dalSelfLink :: !(Maybe Text) + , _dalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dalNextPageToken' +-- +-- * 'dalKind' +-- +-- * 'dalItems' +-- +-- * 'dalSelfLink' +-- +-- * 'dalId' +diskAggregatedList + :: DiskAggregatedList +diskAggregatedList = + DiskAggregatedList + { _dalNextPageToken = Nothing + , _dalKind = "compute#diskAggregatedList" + , _dalItems = Nothing + , _dalSelfLink = Nothing + , _dalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +dalNextPageToken :: Lens' DiskAggregatedList (Maybe Text) +dalNextPageToken + = lens _dalNextPageToken + (\ s a -> s{_dalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#diskAggregatedList for +-- aggregated lists of persistent disks. +dalKind :: Lens' DiskAggregatedList Text +dalKind = lens _dalKind (\ s a -> s{_dalKind = a}) + +-- | [Output Only] A map of scoped disk lists. +dalItems :: Lens' DiskAggregatedList (Maybe DiskAggregatedListItems) +dalItems = lens _dalItems (\ s a -> s{_dalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +dalSelfLink :: Lens' DiskAggregatedList (Maybe Text) +dalSelfLink + = lens _dalSelfLink (\ s a -> s{_dalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dalId :: Lens' DiskAggregatedList (Maybe Text) +dalId = lens _dalId (\ s a -> s{_dalId = a}) + +instance FromJSON DiskAggregatedList where + parseJSON + = withObject "DiskAggregatedList" + (\ o -> + DiskAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#diskAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON DiskAggregatedList where + toJSON DiskAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dalNextPageToken, + Just ("kind" .= _dalKind), + ("items" .=) <$> _dalItems, + ("selfLink" .=) <$> _dalSelfLink, + ("id" .=) <$> _dalId]) + +-- +-- /See:/ 'instanceReference' smart constructor. +newtype InstanceReference = InstanceReference + { _irInstance :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irInstance' +instanceReference + :: InstanceReference +instanceReference = + InstanceReference + { _irInstance = Nothing + } + +irInstance :: Lens' InstanceReference (Maybe Text) +irInstance + = lens _irInstance (\ s a -> s{_irInstance = a}) + +instance FromJSON InstanceReference where + parseJSON + = withObject "InstanceReference" + (\ o -> InstanceReference <$> (o .:? "instance")) + +instance ToJSON InstanceReference where + toJSON InstanceReference{..} + = object + (catMaybes [("instance" .=) <$> _irInstance]) + +-- +-- /See:/ 'instanceWithNamedPorts' smart constructor. +data InstanceWithNamedPorts = InstanceWithNamedPorts + { _iwnpStatus :: !(Maybe Text) + , _iwnpNamedPorts :: !(Maybe [Maybe NamedPort]) + , _iwnpInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceWithNamedPorts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iwnpStatus' +-- +-- * 'iwnpNamedPorts' +-- +-- * 'iwnpInstance' +instanceWithNamedPorts + :: InstanceWithNamedPorts +instanceWithNamedPorts = + InstanceWithNamedPorts + { _iwnpStatus = Nothing + , _iwnpNamedPorts = Nothing + , _iwnpInstance = Nothing + } + +-- | The status of the instance. +iwnpStatus :: Lens' InstanceWithNamedPorts (Maybe Text) +iwnpStatus + = lens _iwnpStatus (\ s a -> s{_iwnpStatus = a}) + +-- | The named ports that belong to this instance group. +iwnpNamedPorts :: Lens' InstanceWithNamedPorts [Maybe NamedPort] +iwnpNamedPorts + = lens _iwnpNamedPorts + (\ s a -> s{_iwnpNamedPorts = a}) + . _Default + . _Coerce + +-- | The URL of the instance. +iwnpInstance :: Lens' InstanceWithNamedPorts (Maybe Text) +iwnpInstance + = lens _iwnpInstance (\ s a -> s{_iwnpInstance = a}) + +instance FromJSON InstanceWithNamedPorts where + parseJSON + = withObject "InstanceWithNamedPorts" + (\ o -> + InstanceWithNamedPorts <$> + (o .:? "status") <*> (o .:? "namedPorts" .!= mempty) + <*> (o .:? "instance")) + +instance ToJSON InstanceWithNamedPorts where + toJSON InstanceWithNamedPorts{..} + = object + (catMaybes + [("status" .=) <$> _iwnpStatus, + ("namedPorts" .=) <$> _iwnpNamedPorts, + ("instance" .=) <$> _iwnpInstance]) + +-- +-- /See:/ 'instanceGroupManagersScopedList' smart constructor. +data InstanceGroupManagersScopedList = InstanceGroupManagersScopedList + { _igmslWarning :: !(Maybe InstanceGroupManagersScopedListWarning) + , _igmslInstanceGroupManagers :: !(Maybe [Maybe InstanceGroupManager]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmslWarning' +-- +-- * 'igmslInstanceGroupManagers' +instanceGroupManagersScopedList + :: InstanceGroupManagersScopedList +instanceGroupManagersScopedList = + InstanceGroupManagersScopedList + { _igmslWarning = Nothing + , _igmslInstanceGroupManagers = Nothing + } + +-- | [Output Only] The warning that replaces the list of managed instance +-- groups when the list is empty. +igmslWarning :: Lens' InstanceGroupManagersScopedList (Maybe InstanceGroupManagersScopedListWarning) +igmslWarning + = lens _igmslWarning (\ s a -> s{_igmslWarning = a}) + +-- | [Output Only] The list of managed instance groups that are contained in +-- the specified project and zone. +igmslInstanceGroupManagers :: Lens' InstanceGroupManagersScopedList [Maybe InstanceGroupManager] +igmslInstanceGroupManagers + = lens _igmslInstanceGroupManagers + (\ s a -> s{_igmslInstanceGroupManagers = a}) + . _Default + . _Coerce + +instance FromJSON InstanceGroupManagersScopedList + where + parseJSON + = withObject "InstanceGroupManagersScopedList" + (\ o -> + InstanceGroupManagersScopedList <$> + (o .:? "warning") <*> + (o .:? "instanceGroupManagers" .!= mempty)) + +instance ToJSON InstanceGroupManagersScopedList where + toJSON InstanceGroupManagersScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _igmslWarning, + ("instanceGroupManagers" .=) <$> + _igmslInstanceGroupManagers]) + +-- +-- /See:/ 'instanceGroupManagerAggregatedList' smart constructor. +data InstanceGroupManagerAggregatedList = InstanceGroupManagerAggregatedList + { _igmalNextPageToken :: !(Maybe Text) + , _igmalKind :: !Text + , _igmalItems :: !(Maybe InstanceGroupManagerAggregatedListItems) + , _igmalSelfLink :: !(Maybe Text) + , _igmalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagerAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmalNextPageToken' +-- +-- * 'igmalKind' +-- +-- * 'igmalItems' +-- +-- * 'igmalSelfLink' +-- +-- * 'igmalId' +instanceGroupManagerAggregatedList + :: InstanceGroupManagerAggregatedList +instanceGroupManagerAggregatedList = + InstanceGroupManagerAggregatedList + { _igmalNextPageToken = Nothing + , _igmalKind = "compute#instanceGroupManagerAggregatedList" + , _igmalItems = Nothing + , _igmalSelfLink = Nothing + , _igmalId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +igmalNextPageToken :: Lens' InstanceGroupManagerAggregatedList (Maybe Text) +igmalNextPageToken + = lens _igmalNextPageToken + (\ s a -> s{_igmalNextPageToken = a}) + +-- | [Output Only] Type of the resource. Always +-- compute#instanceGroupManagerAggregatedList for an aggregated list of +-- managed instance groups. +igmalKind :: Lens' InstanceGroupManagerAggregatedList Text +igmalKind + = lens _igmalKind (\ s a -> s{_igmalKind = a}) + +-- | A map of filtered managed instance group lists. +igmalItems :: Lens' InstanceGroupManagerAggregatedList (Maybe InstanceGroupManagerAggregatedListItems) +igmalItems + = lens _igmalItems (\ s a -> s{_igmalItems = a}) + +-- | [Output Only] The URL for this aggregated list of managed instance +-- groups. The server defines this URL. +igmalSelfLink :: Lens' InstanceGroupManagerAggregatedList (Maybe Text) +igmalSelfLink + = lens _igmalSelfLink + (\ s a -> s{_igmalSelfLink = a}) + +-- | [Output Only] A unique identifier for this aggregated list of managed +-- instance groups. The server defines this identifier. +igmalId :: Lens' InstanceGroupManagerAggregatedList (Maybe Text) +igmalId = lens _igmalId (\ s a -> s{_igmalId = a}) + +instance FromJSON InstanceGroupManagerAggregatedList + where + parseJSON + = withObject "InstanceGroupManagerAggregatedList" + (\ o -> + InstanceGroupManagerAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#instanceGroupManagerAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupManagerAggregatedList + where + toJSON InstanceGroupManagerAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _igmalNextPageToken, + Just ("kind" .= _igmalKind), + ("items" .=) <$> _igmalItems, + ("selfLink" .=) <$> _igmalSelfLink, + ("id" .=) <$> _igmalId]) + +-- +-- /See:/ 'disksScopedList' smart constructor. +data DisksScopedList = DisksScopedList + { _dslWarning :: !(Maybe DisksScopedListWarning) + , _dslDisks :: !(Maybe [Maybe Disk]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dslWarning' +-- +-- * 'dslDisks' +disksScopedList + :: DisksScopedList +disksScopedList = + DisksScopedList + { _dslWarning = Nothing + , _dslDisks = Nothing + } + +-- | [Output Only] Informational warning which replaces the list of disks +-- when the list is empty. +dslWarning :: Lens' DisksScopedList (Maybe DisksScopedListWarning) +dslWarning + = lens _dslWarning (\ s a -> s{_dslWarning = a}) + +-- | [Output Only] List of disks contained in this scope. +dslDisks :: Lens' DisksScopedList [Maybe Disk] +dslDisks + = lens _dslDisks (\ s a -> s{_dslDisks = a}) . + _Default + . _Coerce + +instance FromJSON DisksScopedList where + parseJSON + = withObject "DisksScopedList" + (\ o -> + DisksScopedList <$> + (o .:? "warning") <*> (o .:? "disks" .!= mempty)) + +instance ToJSON DisksScopedList where + toJSON DisksScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _dslWarning, + ("disks" .=) <$> _dslDisks]) + +-- | The named port information. For example: . +-- +-- /See:/ 'namedPort' smart constructor. +data NamedPort = NamedPort + { _npName :: !(Maybe Text) + , _npPort :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NamedPort' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'npName' +-- +-- * 'npPort' +namedPort + :: NamedPort +namedPort = + NamedPort + { _npName = Nothing + , _npPort = Nothing + } + +-- | The name for this NamedPort. +npName :: Lens' NamedPort (Maybe Text) +npName = lens _npName (\ s a -> s{_npName = a}) + +-- | The port number, which can be a value between 1 and 65535. +npPort :: Lens' NamedPort (Maybe Int32) +npPort = lens _npPort (\ s a -> s{_npPort = a}) + +instance FromJSON NamedPort where + parseJSON + = withObject "NamedPort" + (\ o -> + NamedPort <$> (o .:? "name") <*> (o .:? "port")) + +instance ToJSON NamedPort where + toJSON NamedPort{..} + = object + (catMaybes + [("name" .=) <$> _npName, ("port" .=) <$> _npPort]) + +-- +-- /See:/ 'targetPoolsScopedList' smart constructor. +data TargetPoolsScopedList = TargetPoolsScopedList + { _tpslWarning :: !(Maybe TargetPoolsScopedListWarning) + , _tpslTargetPools :: !(Maybe [Maybe TargetPool]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpslWarning' +-- +-- * 'tpslTargetPools' +targetPoolsScopedList + :: TargetPoolsScopedList +targetPoolsScopedList = + TargetPoolsScopedList + { _tpslWarning = Nothing + , _tpslTargetPools = Nothing + } + +-- | Informational warning which replaces the list of addresses when the list +-- is empty. +tpslWarning :: Lens' TargetPoolsScopedList (Maybe TargetPoolsScopedListWarning) +tpslWarning + = lens _tpslWarning (\ s a -> s{_tpslWarning = a}) + +-- | List of target pools contained in this scope. +tpslTargetPools :: Lens' TargetPoolsScopedList [Maybe TargetPool] +tpslTargetPools + = lens _tpslTargetPools + (\ s a -> s{_tpslTargetPools = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolsScopedList where + parseJSON + = withObject "TargetPoolsScopedList" + (\ o -> + TargetPoolsScopedList <$> + (o .:? "warning") <*> + (o .:? "targetPools" .!= mempty)) + +instance ToJSON TargetPoolsScopedList where + toJSON TargetPoolsScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _tpslWarning, + ("targetPools" .=) <$> _tpslTargetPools]) + +-- +-- /See:/ 'operationsScopedList' smart constructor. +data OperationsScopedList = OperationsScopedList + { _oslWarning :: !(Maybe OperationsScopedListWarning) + , _oslOperations :: !(Maybe [Maybe Operation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslWarning' +-- +-- * 'oslOperations' +operationsScopedList + :: OperationsScopedList +operationsScopedList = + OperationsScopedList + { _oslWarning = Nothing + , _oslOperations = Nothing + } + +-- | [Output Only] Informational warning which replaces the list of +-- operations when the list is empty. +oslWarning :: Lens' OperationsScopedList (Maybe OperationsScopedListWarning) +oslWarning + = lens _oslWarning (\ s a -> s{_oslWarning = a}) + +-- | [Output Only] List of operations contained in this scope. +oslOperations :: Lens' OperationsScopedList [Maybe Operation] +oslOperations + = lens _oslOperations + (\ s a -> s{_oslOperations = a}) + . _Default + . _Coerce + +instance FromJSON OperationsScopedList where + parseJSON + = withObject "OperationsScopedList" + (\ o -> + OperationsScopedList <$> + (o .:? "warning") <*> + (o .:? "operations" .!= mempty)) + +instance ToJSON OperationsScopedList where + toJSON OperationsScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _oslWarning, + ("operations" .=) <$> _oslOperations]) + +-- +-- /See:/ 'operationAggregatedList' smart constructor. +data OperationAggregatedList = OperationAggregatedList + { _oalNextPageToken :: !(Maybe Text) + , _oalKind :: !Text + , _oalItems :: !(Maybe OperationAggregatedListItems) + , _oalSelfLink :: !(Maybe Text) + , _oalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oalNextPageToken' +-- +-- * 'oalKind' +-- +-- * 'oalItems' +-- +-- * 'oalSelfLink' +-- +-- * 'oalId' +operationAggregatedList + :: OperationAggregatedList +operationAggregatedList = + OperationAggregatedList + { _oalNextPageToken = Nothing + , _oalKind = "compute#operationAggregatedList" + , _oalItems = Nothing + , _oalSelfLink = Nothing + , _oalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +oalNextPageToken :: Lens' OperationAggregatedList (Maybe Text) +oalNextPageToken + = lens _oalNextPageToken + (\ s a -> s{_oalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#operationAggregatedList +-- for aggregated lists of operations. +oalKind :: Lens' OperationAggregatedList Text +oalKind = lens _oalKind (\ s a -> s{_oalKind = a}) + +-- | [Output Only] A map of scoped operation lists. +oalItems :: Lens' OperationAggregatedList (Maybe OperationAggregatedListItems) +oalItems = lens _oalItems (\ s a -> s{_oalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +oalSelfLink :: Lens' OperationAggregatedList (Maybe Text) +oalSelfLink + = lens _oalSelfLink (\ s a -> s{_oalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +oalId :: Lens' OperationAggregatedList (Maybe Text) +oalId = lens _oalId (\ s a -> s{_oalId = a}) + +instance FromJSON OperationAggregatedList where + parseJSON + = withObject "OperationAggregatedList" + (\ o -> + OperationAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#operationAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationAggregatedList where + toJSON OperationAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _oalNextPageToken, + Just ("kind" .= _oalKind), + ("items" .=) <$> _oalItems, + ("selfLink" .=) <$> _oalSelfLink, + ("id" .=) <$> _oalId]) + +-- +-- /See:/ 'forwardingRuleAggregatedList' smart constructor. +data ForwardingRuleAggregatedList = ForwardingRuleAggregatedList + { _fralNextPageToken :: !(Maybe Text) + , _fralKind :: !Text + , _fralItems :: !(Maybe ForwardingRuleAggregatedListItems) + , _fralSelfLink :: !(Maybe Text) + , _fralId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRuleAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fralNextPageToken' +-- +-- * 'fralKind' +-- +-- * 'fralItems' +-- +-- * 'fralSelfLink' +-- +-- * 'fralId' +forwardingRuleAggregatedList + :: ForwardingRuleAggregatedList +forwardingRuleAggregatedList = + ForwardingRuleAggregatedList + { _fralNextPageToken = Nothing + , _fralKind = "compute#forwardingRuleAggregatedList" + , _fralItems = Nothing + , _fralSelfLink = Nothing + , _fralId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +fralNextPageToken :: Lens' ForwardingRuleAggregatedList (Maybe Text) +fralNextPageToken + = lens _fralNextPageToken + (\ s a -> s{_fralNextPageToken = a}) + +-- | Type of resource. +fralKind :: Lens' ForwardingRuleAggregatedList Text +fralKind = lens _fralKind (\ s a -> s{_fralKind = a}) + +-- | A map of scoped forwarding rule lists. +fralItems :: Lens' ForwardingRuleAggregatedList (Maybe ForwardingRuleAggregatedListItems) +fralItems + = lens _fralItems (\ s a -> s{_fralItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +fralSelfLink :: Lens' ForwardingRuleAggregatedList (Maybe Text) +fralSelfLink + = lens _fralSelfLink (\ s a -> s{_fralSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +fralId :: Lens' ForwardingRuleAggregatedList (Maybe Text) +fralId = lens _fralId (\ s a -> s{_fralId = a}) + +instance FromJSON ForwardingRuleAggregatedList where + parseJSON + = withObject "ForwardingRuleAggregatedList" + (\ o -> + ForwardingRuleAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#forwardingRuleAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ForwardingRuleAggregatedList where + toJSON ForwardingRuleAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _fralNextPageToken, + Just ("kind" .= _fralKind), + ("items" .=) <$> _fralItems, + ("selfLink" .=) <$> _fralSelfLink, + ("id" .=) <$> _fralId]) + +-- | Contains a list of TargetInstance resources. +-- +-- /See:/ 'targetInstanceList' smart constructor. +data TargetInstanceList = TargetInstanceList + { _tilNextPageToken :: !(Maybe Text) + , _tilKind :: !Text + , _tilItems :: !(Maybe [Maybe TargetInstance]) + , _tilSelfLink :: !(Maybe Text) + , _tilId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstanceList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tilNextPageToken' +-- +-- * 'tilKind' +-- +-- * 'tilItems' +-- +-- * 'tilSelfLink' +-- +-- * 'tilId' +targetInstanceList + :: TargetInstanceList +targetInstanceList = + TargetInstanceList + { _tilNextPageToken = Nothing + , _tilKind = "compute#targetInstanceList" + , _tilItems = Nothing + , _tilSelfLink = Nothing + , _tilId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tilNextPageToken :: Lens' TargetInstanceList (Maybe Text) +tilNextPageToken + = lens _tilNextPageToken + (\ s a -> s{_tilNextPageToken = a}) + +-- | Type of resource. +tilKind :: Lens' TargetInstanceList Text +tilKind = lens _tilKind (\ s a -> s{_tilKind = a}) + +-- | A list of TargetInstance resources. +tilItems :: Lens' TargetInstanceList [Maybe TargetInstance] +tilItems + = lens _tilItems (\ s a -> s{_tilItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +tilSelfLink :: Lens' TargetInstanceList (Maybe Text) +tilSelfLink + = lens _tilSelfLink (\ s a -> s{_tilSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +tilId :: Lens' TargetInstanceList (Maybe Text) +tilId = lens _tilId (\ s a -> s{_tilId = a}) + +instance FromJSON TargetInstanceList where + parseJSON + = withObject "TargetInstanceList" + (\ o -> + TargetInstanceList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#targetInstanceList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetInstanceList where + toJSON TargetInstanceList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tilNextPageToken, + Just ("kind" .= _tilKind), + ("items" .=) <$> _tilItems, + ("selfLink" .=) <$> _tilSelfLink, + ("id" .=) <$> _tilId]) + +-- +-- /See:/ 'targetReference' smart constructor. +newtype TargetReference = TargetReference + { _trTarget :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trTarget' +targetReference + :: TargetReference +targetReference = + TargetReference + { _trTarget = Nothing + } + +trTarget :: Lens' TargetReference (Maybe Text) +trTarget = lens _trTarget (\ s a -> s{_trTarget = a}) + +instance FromJSON TargetReference where + parseJSON + = withObject "TargetReference" + (\ o -> TargetReference <$> (o .:? "target")) + +instance ToJSON TargetReference where + toJSON TargetReference{..} + = object (catMaybes [("target" .=) <$> _trTarget]) + +-- +-- /See:/ 'targetPoolAggregatedList' smart constructor. +data TargetPoolAggregatedList = TargetPoolAggregatedList + { _tpalNextPageToken :: !(Maybe Text) + , _tpalKind :: !Text + , _tpalItems :: !(Maybe TargetPoolAggregatedListItems) + , _tpalSelfLink :: !(Maybe Text) + , _tpalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpalNextPageToken' +-- +-- * 'tpalKind' +-- +-- * 'tpalItems' +-- +-- * 'tpalSelfLink' +-- +-- * 'tpalId' +targetPoolAggregatedList + :: TargetPoolAggregatedList +targetPoolAggregatedList = + TargetPoolAggregatedList + { _tpalNextPageToken = Nothing + , _tpalKind = "compute#targetPoolAggregatedList" + , _tpalItems = Nothing + , _tpalSelfLink = Nothing + , _tpalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tpalNextPageToken :: Lens' TargetPoolAggregatedList (Maybe Text) +tpalNextPageToken + = lens _tpalNextPageToken + (\ s a -> s{_tpalNextPageToken = a}) + +-- | Type of resource. +tpalKind :: Lens' TargetPoolAggregatedList Text +tpalKind = lens _tpalKind (\ s a -> s{_tpalKind = a}) + +-- | A map of scoped target pool lists. +tpalItems :: Lens' TargetPoolAggregatedList (Maybe TargetPoolAggregatedListItems) +tpalItems + = lens _tpalItems (\ s a -> s{_tpalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +tpalSelfLink :: Lens' TargetPoolAggregatedList (Maybe Text) +tpalSelfLink + = lens _tpalSelfLink (\ s a -> s{_tpalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +tpalId :: Lens' TargetPoolAggregatedList (Maybe Text) +tpalId = lens _tpalId (\ s a -> s{_tpalId = a}) + +instance FromJSON TargetPoolAggregatedList where + parseJSON + = withObject "TargetPoolAggregatedList" + (\ o -> + TargetPoolAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#targetPoolAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetPoolAggregatedList where + toJSON TargetPoolAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tpalNextPageToken, + Just ("kind" .= _tpalKind), + ("items" .=) <$> _tpalItems, + ("selfLink" .=) <$> _tpalSelfLink, + ("id" .=) <$> _tpalId]) + +-- | Contains a list of Image resources. +-- +-- /See:/ 'imageList' smart constructor. +data ImageList = ImageList + { _ilNextPageToken :: !(Maybe Text) + , _ilKind :: !Text + , _ilItems :: !(Maybe [Maybe Image]) + , _ilSelfLink :: !(Maybe Text) + , _ilId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImageList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilNextPageToken' +-- +-- * 'ilKind' +-- +-- * 'ilItems' +-- +-- * 'ilSelfLink' +-- +-- * 'ilId' +imageList + :: ImageList +imageList = + ImageList + { _ilNextPageToken = Nothing + , _ilKind = "compute#imageList" + , _ilItems = Nothing + , _ilSelfLink = Nothing + , _ilId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +ilNextPageToken :: Lens' ImageList (Maybe Text) +ilNextPageToken + = lens _ilNextPageToken + (\ s a -> s{_ilNextPageToken = a}) + +-- | Type of resource. +ilKind :: Lens' ImageList Text +ilKind = lens _ilKind (\ s a -> s{_ilKind = a}) + +-- | A list of Image resources. +ilItems :: Lens' ImageList [Maybe Image] +ilItems + = lens _ilItems (\ s a -> s{_ilItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +ilSelfLink :: Lens' ImageList (Maybe Text) +ilSelfLink + = lens _ilSelfLink (\ s a -> s{_ilSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +ilId :: Lens' ImageList (Maybe Text) +ilId = lens _ilId (\ s a -> s{_ilId = a}) + +instance FromJSON ImageList where + parseJSON + = withObject "ImageList" + (\ o -> + ImageList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#imageList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ImageList where + toJSON ImageList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ilNextPageToken, + Just ("kind" .= _ilKind), ("items" .=) <$> _ilItems, + ("selfLink" .=) <$> _ilSelfLink, + ("id" .=) <$> _ilId]) + +-- | A TargetPool resource. This resource defines a pool of instances, +-- associated HttpHealthCheck resources, and the fallback TargetPool. +-- +-- /See:/ 'targetPool' smart constructor. +data TargetPool = TargetPool + { _tpSessionAffinity :: !(Maybe Text) + , _tpBackupPool :: !(Maybe Text) + , _tpKind :: !Text + , _tpSelfLink :: !(Maybe Text) + , _tpName :: !(Maybe Text) + , _tpCreationTimestamp :: !(Maybe Text) + , _tpInstances :: !(Maybe [Text]) + , _tpId :: !(Maybe Word64) + , _tpFailoverRatio :: !(Maybe Float) + , _tpRegion :: !(Maybe Text) + , _tpDescription :: !(Maybe Text) + , _tpHealthChecks :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPool' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpSessionAffinity' +-- +-- * 'tpBackupPool' +-- +-- * 'tpKind' +-- +-- * 'tpSelfLink' +-- +-- * 'tpName' +-- +-- * 'tpCreationTimestamp' +-- +-- * 'tpInstances' +-- +-- * 'tpId' +-- +-- * 'tpFailoverRatio' +-- +-- * 'tpRegion' +-- +-- * 'tpDescription' +-- +-- * 'tpHealthChecks' +targetPool + :: TargetPool +targetPool = + TargetPool + { _tpSessionAffinity = Nothing + , _tpBackupPool = Nothing + , _tpKind = "compute#targetPool" + , _tpSelfLink = Nothing + , _tpName = Nothing + , _tpCreationTimestamp = Nothing + , _tpInstances = Nothing + , _tpId = Nothing + , _tpFailoverRatio = Nothing + , _tpRegion = Nothing + , _tpDescription = Nothing + , _tpHealthChecks = Nothing + } + +-- | Sesssion affinity option, must be one of the following values: NONE: +-- Connections from the same client IP may go to any instance in the pool; +-- CLIENT_IP: Connections from the same client IP will go to the same +-- instance in the pool while that instance remains healthy. +-- CLIENT_IP_PROTO: Connections from the same client IP with the same IP +-- protocol will go to the same instance in the pool while that instance +-- remains healthy. +tpSessionAffinity :: Lens' TargetPool (Maybe Text) +tpSessionAffinity + = lens _tpSessionAffinity + (\ s a -> s{_tpSessionAffinity = a}) + +-- | This field is applicable only when the containing target pool is serving +-- a forwarding rule as the primary pool, and its failoverRatio field is +-- properly set to a value between [0, 1]. backupPool and failoverRatio +-- together define the fallback behavior of the primary target pool: if the +-- ratio of the healthy instances in the primary pool is at or below +-- failoverRatio, traffic arriving at the load-balanced IP will be directed +-- to the backup pool. In case where failoverRatio and backupPool are not +-- set, or all the instances in the backup pool are unhealthy, the traffic +-- will be directed back to the primary pool in the \"force\" mode, where +-- traffic will be spread to the healthy instances with the best effort, or +-- to all instances when no instance is healthy. +tpBackupPool :: Lens' TargetPool (Maybe Text) +tpBackupPool + = lens _tpBackupPool (\ s a -> s{_tpBackupPool = a}) + +-- | Type of the resource. +tpKind :: Lens' TargetPool Text +tpKind = lens _tpKind (\ s a -> s{_tpKind = a}) + +-- | [Output Only] Server-defined URL for the resource. +tpSelfLink :: Lens' TargetPool (Maybe Text) +tpSelfLink + = lens _tpSelfLink (\ s a -> s{_tpSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +tpName :: Lens' TargetPool (Maybe Text) +tpName = lens _tpName (\ s a -> s{_tpName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +tpCreationTimestamp :: Lens' TargetPool (Maybe Text) +tpCreationTimestamp + = lens _tpCreationTimestamp + (\ s a -> s{_tpCreationTimestamp = a}) + +-- | A list of resource URLs to the member virtual machines serving this +-- pool. They must live in zones contained in the same region as this pool. +tpInstances :: Lens' TargetPool [Text] +tpInstances + = lens _tpInstances (\ s a -> s{_tpInstances = a}) . + _Default + . _Coerce + +-- | [Output Only] Unique identifier for the resource; defined by the server. +tpId :: Lens' TargetPool (Maybe Word64) +tpId = lens _tpId (\ s a -> s{_tpId = a}) + +-- | This field is applicable only when the containing target pool is serving +-- a forwarding rule as the primary pool (i.e., not as a backup pool to +-- some other target pool). The value of the field must be in [0, 1]. If +-- set, backupPool must also be set. They together define the fallback +-- behavior of the primary target pool: if the ratio of the healthy +-- instances in the primary pool is at or below this number, traffic +-- arriving at the load-balanced IP will be directed to the backup pool. In +-- case where failoverRatio is not set or all the instances in the backup +-- pool are unhealthy, the traffic will be directed back to the primary +-- pool in the \"force\" mode, where traffic will be spread to the healthy +-- instances with the best effort, or to all instances when no instance is +-- healthy. +tpFailoverRatio :: Lens' TargetPool (Maybe Float) +tpFailoverRatio + = lens _tpFailoverRatio + (\ s a -> s{_tpFailoverRatio = a}) + +-- | [Output Only] URL of the region where the target pool resides. +tpRegion :: Lens' TargetPool (Maybe Text) +tpRegion = lens _tpRegion (\ s a -> s{_tpRegion = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +tpDescription :: Lens' TargetPool (Maybe Text) +tpDescription + = lens _tpDescription + (\ s a -> s{_tpDescription = a}) + +-- | A list of URLs to the HttpHealthCheck resource. A member instance in +-- this pool is considered healthy if and only if all specified health +-- checks pass. An empty list means all member instances will be considered +-- healthy at all times. +tpHealthChecks :: Lens' TargetPool [Text] +tpHealthChecks + = lens _tpHealthChecks + (\ s a -> s{_tpHealthChecks = a}) + . _Default + . _Coerce + +instance FromJSON TargetPool where + parseJSON + = withObject "TargetPool" + (\ o -> + TargetPool <$> + (o .:? "sessionAffinity") <*> (o .:? "backupPool") + <*> (o .:? "kind" .!= "compute#targetPool") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "instances" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "failoverRatio") + <*> (o .:? "region") + <*> (o .:? "description") + <*> (o .:? "healthChecks" .!= mempty)) + +instance ToJSON TargetPool where + toJSON TargetPool{..} + = object + (catMaybes + [("sessionAffinity" .=) <$> _tpSessionAffinity, + ("backupPool" .=) <$> _tpBackupPool, + Just ("kind" .= _tpKind), + ("selfLink" .=) <$> _tpSelfLink, + ("name" .=) <$> _tpName, + ("creationTimestamp" .=) <$> _tpCreationTimestamp, + ("instances" .=) <$> _tpInstances, + ("id" .=) <$> _tpId, + ("failoverRatio" .=) <$> _tpFailoverRatio, + ("region" .=) <$> _tpRegion, + ("description" .=) <$> _tpDescription, + ("healthChecks" .=) <$> _tpHealthChecks]) + +-- | A Disk resource. +-- +-- /See:/ 'disk' smart constructor. +data Disk = Disk + { _dStatus :: !(Maybe Text) + , _dSourceSnapshotId :: !(Maybe Text) + , _dLastAttachTimestamp :: !(Maybe Text) + , _dUsers :: !(Maybe [Text]) + , _dSourceImage :: !(Maybe Text) + , _dSizeGb :: !(Maybe Int64) + , _dKind :: !Text + , _dLastDetachTimestamp :: !(Maybe Text) + , _dZone :: !(Maybe Text) + , _dSelfLink :: !(Maybe Text) + , _dName :: !(Maybe Text) + , _dSourceImageId :: !(Maybe Text) + , _dCreationTimestamp :: !(Maybe Text) + , _dId :: !(Maybe Word64) + , _dLicenses :: !(Maybe [Text]) + , _dOptions :: !(Maybe Text) + , _dType :: !(Maybe Text) + , _dDescription :: !(Maybe Text) + , _dSourceSnapshot :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Disk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dStatus' +-- +-- * 'dSourceSnapshotId' +-- +-- * 'dLastAttachTimestamp' +-- +-- * 'dUsers' +-- +-- * 'dSourceImage' +-- +-- * 'dSizeGb' +-- +-- * 'dKind' +-- +-- * 'dLastDetachTimestamp' +-- +-- * 'dZone' +-- +-- * 'dSelfLink' +-- +-- * 'dName' +-- +-- * 'dSourceImageId' +-- +-- * 'dCreationTimestamp' +-- +-- * 'dId' +-- +-- * 'dLicenses' +-- +-- * 'dOptions' +-- +-- * 'dType' +-- +-- * 'dDescription' +-- +-- * 'dSourceSnapshot' +disk + :: Disk +disk = + Disk + { _dStatus = Nothing + , _dSourceSnapshotId = Nothing + , _dLastAttachTimestamp = Nothing + , _dUsers = Nothing + , _dSourceImage = Nothing + , _dSizeGb = Nothing + , _dKind = "compute#disk" + , _dLastDetachTimestamp = Nothing + , _dZone = Nothing + , _dSelfLink = Nothing + , _dName = Nothing + , _dSourceImageId = Nothing + , _dCreationTimestamp = Nothing + , _dId = Nothing + , _dLicenses = Nothing + , _dOptions = Nothing + , _dType = Nothing + , _dDescription = Nothing + , _dSourceSnapshot = Nothing + } + +-- | [Output Only] The status of disk creation. Applicable statuses includes: +-- CREATING, FAILED, READY, RESTORING. +dStatus :: Lens' Disk (Maybe Text) +dStatus = lens _dStatus (\ s a -> s{_dStatus = a}) + +-- | [Output Only] The unique ID of the snapshot used to create this disk. +-- This value identifies the exact snapshot that was used to create this +-- persistent disk. For example, if you created the persistent disk from a +-- snapshot that was later deleted and recreated under the same name, the +-- source snapshot ID would identify the exact version of the snapshot that +-- was used. +dSourceSnapshotId :: Lens' Disk (Maybe Text) +dSourceSnapshotId + = lens _dSourceSnapshotId + (\ s a -> s{_dSourceSnapshotId = a}) + +-- | [Output Only] Last attach timestamp in RFC3339 text format. +dLastAttachTimestamp :: Lens' Disk (Maybe Text) +dLastAttachTimestamp + = lens _dLastAttachTimestamp + (\ s a -> s{_dLastAttachTimestamp = a}) + +-- | Links to the users of the disk (attached instances) in form: +-- project\/zones\/zone\/instances\/instance +dUsers :: Lens' Disk [Text] +dUsers + = lens _dUsers (\ s a -> s{_dUsers = a}) . _Default . + _Coerce + +-- | The source image used to create this disk. If the source image is +-- deleted from the system, this field will not be set, even if an image +-- with the same name has been re-created. When creating a disk, you can +-- provide a private (custom) image using the following input, and Compute +-- Engine will use the corresponding image from your project. For example: +-- global\/images\/my-private-image Or you can provide an image from a +-- publicly-available project. For example, to use a Debian image from the +-- debian-cloud project, make sure to include the project in the URL: +-- projects\/debian-cloud\/global\/images\/debian-7-wheezy-vYYYYMMDD where +-- vYYYYMMDD is the image version. The fully-qualified URL will also work +-- in both cases. +dSourceImage :: Lens' Disk (Maybe Text) +dSourceImage + = lens _dSourceImage (\ s a -> s{_dSourceImage = a}) + +-- | Size of the persistent disk, specified in GB. You can specify this field +-- when creating a persistent disk using the sourceImage or sourceSnapshot +-- parameter, or specify it alone to create an empty persistent disk. If +-- you specify this field along with sourceImage or sourceSnapshot, the +-- value of sizeGb must not be less than the size of the sourceImage or the +-- size of the snapshot. +dSizeGb :: Lens' Disk (Maybe Int64) +dSizeGb = lens _dSizeGb (\ s a -> s{_dSizeGb = a}) + +-- | [Output Only] Type of the resource. Always compute#disk for disks. +dKind :: Lens' Disk Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | [Output Only] Last detach timestamp in RFC3339 text format. +dLastDetachTimestamp :: Lens' Disk (Maybe Text) +dLastDetachTimestamp + = lens _dLastDetachTimestamp + (\ s a -> s{_dLastDetachTimestamp = a}) + +-- | [Output Only] URL of the zone where the disk resides. +dZone :: Lens' Disk (Maybe Text) +dZone = lens _dZone (\ s a -> s{_dZone = a}) + +-- | [Output Only] Server-defined fully-qualified URL for this resource. +dSelfLink :: Lens' Disk (Maybe Text) +dSelfLink + = lens _dSelfLink (\ s a -> s{_dSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +dName :: Lens' Disk (Maybe Text) +dName = lens _dName (\ s a -> s{_dName = a}) + +-- | The ID value of the image used to create this disk. This value +-- identifies the exact image that was used to create this persistent disk. +-- For example, if you created the persistent disk from an image that was +-- later deleted and recreated under the same name, the source image ID +-- would identify the exact version of the image that was used. +dSourceImageId :: Lens' Disk (Maybe Text) +dSourceImageId + = lens _dSourceImageId + (\ s a -> s{_dSourceImageId = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +dCreationTimestamp :: Lens' Disk (Maybe Text) +dCreationTimestamp + = lens _dCreationTimestamp + (\ s a -> s{_dCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dId :: Lens' Disk (Maybe Word64) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | Any applicable publicly visible licenses. +dLicenses :: Lens' Disk [Text] +dLicenses + = lens _dLicenses (\ s a -> s{_dLicenses = a}) . + _Default + . _Coerce + +-- | Internal use only. +dOptions :: Lens' Disk (Maybe Text) +dOptions = lens _dOptions (\ s a -> s{_dOptions = a}) + +-- | URL of the disk type resource describing which disk type to use to +-- create the disk; provided by the client when the disk is created. +dType :: Lens' Disk (Maybe Text) +dType = lens _dType (\ s a -> s{_dType = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +dDescription :: Lens' Disk (Maybe Text) +dDescription + = lens _dDescription (\ s a -> s{_dDescription = a}) + +-- | The source snapshot used to create this disk. You can provide this as a +-- partial or full URL to the resource. For example, the following are +-- valid values: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/global\/snapshots\/snapshot +-- - projects\/project\/global\/snapshots\/snapshot - +-- global\/snapshots\/snapshot +dSourceSnapshot :: Lens' Disk (Maybe Text) +dSourceSnapshot + = lens _dSourceSnapshot + (\ s a -> s{_dSourceSnapshot = a}) + +instance FromJSON Disk where + parseJSON + = withObject "Disk" + (\ o -> + Disk <$> + (o .:? "status") <*> (o .:? "sourceSnapshotId") <*> + (o .:? "lastAttachTimestamp") + <*> (o .:? "users" .!= mempty) + <*> (o .:? "sourceImage") + <*> (o .:? "sizeGb") + <*> (o .:? "kind" .!= "compute#disk") + <*> (o .:? "lastDetachTimestamp") + <*> (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "sourceImageId") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "licenses" .!= mempty) + <*> (o .:? "options") + <*> (o .:? "type") + <*> (o .:? "description") + <*> (o .:? "sourceSnapshot")) + +instance ToJSON Disk where + toJSON Disk{..} + = object + (catMaybes + [("status" .=) <$> _dStatus, + ("sourceSnapshotId" .=) <$> _dSourceSnapshotId, + ("lastAttachTimestamp" .=) <$> _dLastAttachTimestamp, + ("users" .=) <$> _dUsers, + ("sourceImage" .=) <$> _dSourceImage, + ("sizeGb" .=) <$> _dSizeGb, Just ("kind" .= _dKind), + ("lastDetachTimestamp" .=) <$> _dLastDetachTimestamp, + ("zone" .=) <$> _dZone, + ("selfLink" .=) <$> _dSelfLink, + ("name" .=) <$> _dName, + ("sourceImageId" .=) <$> _dSourceImageId, + ("creationTimestamp" .=) <$> _dCreationTimestamp, + ("id" .=) <$> _dId, ("licenses" .=) <$> _dLicenses, + ("options" .=) <$> _dOptions, ("type" .=) <$> _dType, + ("description" .=) <$> _dDescription, + ("sourceSnapshot" .=) <$> _dSourceSnapshot]) + +-- | Load balancing utilization policy. +-- +-- /See:/ 'autoscalingPolicyLoadBalancingUtilization' smart constructor. +newtype AutoscalingPolicyLoadBalancingUtilization = AutoscalingPolicyLoadBalancingUtilization + { _aplbuUtilizationTarget :: Maybe Double + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyLoadBalancingUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplbuUtilizationTarget' +autoscalingPolicyLoadBalancingUtilization + :: AutoscalingPolicyLoadBalancingUtilization +autoscalingPolicyLoadBalancingUtilization = + AutoscalingPolicyLoadBalancingUtilization + { _aplbuUtilizationTarget = Nothing + } + +-- | Fraction of backend capacity utilization (set in HTTP load balancing +-- configuration) that Autoscaler should maintain. Must be a positive float +-- value. If not defined, the default is 0.8. For example if your +-- maxRatePerInstance capacity (in HTTP Load Balancing configuration) is +-- set at 10 and you would like to keep number of instances such that each +-- instance receives 7 QPS on average, set this to 0.7. +aplbuUtilizationTarget :: Lens' AutoscalingPolicyLoadBalancingUtilization (Maybe Double) +aplbuUtilizationTarget + = lens _aplbuUtilizationTarget + (\ s a -> s{_aplbuUtilizationTarget = a}) + +instance FromJSON + AutoscalingPolicyLoadBalancingUtilization where + parseJSON + = withObject + "AutoscalingPolicyLoadBalancingUtilization" + (\ o -> + AutoscalingPolicyLoadBalancingUtilization <$> + (o .:? "utilizationTarget")) + +instance ToJSON + AutoscalingPolicyLoadBalancingUtilization where + toJSON AutoscalingPolicyLoadBalancingUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _aplbuUtilizationTarget]) + +-- | InstanceGroupManagers Next available tag: 19 +-- +-- /See:/ 'instanceGroupManager' smart constructor. +data InstanceGroupManager = InstanceGroupManager + { _igmKind :: !Text + , _igmFingerprint :: !(Maybe Word8) + , _igmBaseInstanceName :: !(Maybe Text) + , _igmZone :: !(Maybe Text) + , _igmInstanceTemplate :: !(Maybe Text) + , _igmTargetSize :: !(Maybe Int32) + , _igmSelfLink :: !(Maybe Text) + , _igmCurrentActions :: !(Maybe (Maybe InstanceGroupManagerActionsSummary)) + , _igmName :: !(Maybe Text) + , _igmCreationTimestamp :: !(Maybe Text) + , _igmId :: !(Maybe Word64) + , _igmTargetPools :: !(Maybe [Text]) + , _igmDescription :: !(Maybe Text) + , _igmInstanceGroup :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManager' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmKind' +-- +-- * 'igmFingerprint' +-- +-- * 'igmBaseInstanceName' +-- +-- * 'igmZone' +-- +-- * 'igmInstanceTemplate' +-- +-- * 'igmTargetSize' +-- +-- * 'igmSelfLink' +-- +-- * 'igmCurrentActions' +-- +-- * 'igmName' +-- +-- * 'igmCreationTimestamp' +-- +-- * 'igmId' +-- +-- * 'igmTargetPools' +-- +-- * 'igmDescription' +-- +-- * 'igmInstanceGroup' +instanceGroupManager + :: InstanceGroupManager +instanceGroupManager = + InstanceGroupManager + { _igmKind = "compute#instanceGroupManager" + , _igmFingerprint = Nothing + , _igmBaseInstanceName = Nothing + , _igmZone = Nothing + , _igmInstanceTemplate = Nothing + , _igmTargetSize = Nothing + , _igmSelfLink = Nothing + , _igmCurrentActions = Nothing + , _igmName = Nothing + , _igmCreationTimestamp = Nothing + , _igmId = Nothing + , _igmTargetPools = Nothing + , _igmDescription = Nothing + , _igmInstanceGroup = Nothing + } + +-- | [Output Only] The resource type, which is always +-- compute#instanceGroupManager for managed instance groups. +igmKind :: Lens' InstanceGroupManager Text +igmKind = lens _igmKind (\ s a -> s{_igmKind = a}) + +-- | [Output Only] The fingerprint of the target pools information, which is +-- a hash of the contents. This field is used for optimistic locking when +-- updating the target pool entries. +igmFingerprint :: Lens' InstanceGroupManager (Maybe Word8) +igmFingerprint + = lens _igmFingerprint + (\ s a -> s{_igmFingerprint = a}) + +-- | The base instance name to use for instances in this group. The value +-- must be 1-58 characters long. Instances are named by appending a hyphen +-- and a random four-character string to the base instance name. The base +-- instance name must comply with RFC1035. +igmBaseInstanceName :: Lens' InstanceGroupManager (Maybe Text) +igmBaseInstanceName + = lens _igmBaseInstanceName + (\ s a -> s{_igmBaseInstanceName = a}) + +-- | The URL of the zone where the managed instance group is located. +igmZone :: Lens' InstanceGroupManager (Maybe Text) +igmZone = lens _igmZone (\ s a -> s{_igmZone = a}) + +-- | The URL of the instance template that is specified for this managed +-- instance group. The group uses this template to create all new instances +-- in the managed instance group. +igmInstanceTemplate :: Lens' InstanceGroupManager (Maybe Text) +igmInstanceTemplate + = lens _igmInstanceTemplate + (\ s a -> s{_igmInstanceTemplate = a}) + +-- | The target number of running instances for this managed instance group. +-- Deleting or abandoning instances reduces this number. Resizing the group +-- changes this number. +igmTargetSize :: Lens' InstanceGroupManager (Maybe Int32) +igmTargetSize + = lens _igmTargetSize + (\ s a -> s{_igmTargetSize = a}) + +-- | [Output Only] Server-defined URL for this managed instance group. +igmSelfLink :: Lens' InstanceGroupManager (Maybe Text) +igmSelfLink + = lens _igmSelfLink (\ s a -> s{_igmSelfLink = a}) + +-- | [Output Only] The list of instance actions and the number of instances +-- in this managed instance group that are scheduled for those actions. +igmCurrentActions :: Lens' InstanceGroupManager (Maybe (Maybe InstanceGroupManagerActionsSummary)) +igmCurrentActions + = lens _igmCurrentActions + (\ s a -> s{_igmCurrentActions = a}) + +-- | The name of the managed instance group. The name must be 1-63 characters +-- long, and comply with RFC1035. +igmName :: Lens' InstanceGroupManager (Maybe Text) +igmName = lens _igmName (\ s a -> s{_igmName = a}) + +-- | [Output Only] The creation timestamp for this managed instance group in +-- RFC3339 text format. +igmCreationTimestamp :: Lens' InstanceGroupManager (Maybe Text) +igmCreationTimestamp + = lens _igmCreationTimestamp + (\ s a -> s{_igmCreationTimestamp = a}) + +-- | [Output Only] A unique identifier for this managed instance group. The +-- server defines this identifier. +igmId :: Lens' InstanceGroupManager (Maybe Word64) +igmId = lens _igmId (\ s a -> s{_igmId = a}) + +-- | The URLs of all TargetPool resources to which new instances in the +-- instanceGroup field are added. Updating the target pool values does not +-- affect existing instances. +igmTargetPools :: Lens' InstanceGroupManager [Text] +igmTargetPools + = lens _igmTargetPools + (\ s a -> s{_igmTargetPools = a}) + . _Default + . _Coerce + +-- | An optional text description for the managed instance group. +igmDescription :: Lens' InstanceGroupManager (Maybe Text) +igmDescription + = lens _igmDescription + (\ s a -> s{_igmDescription = a}) + +-- | [Output Only] The URL of the InstanceGroup resource. +igmInstanceGroup :: Lens' InstanceGroupManager (Maybe Text) +igmInstanceGroup + = lens _igmInstanceGroup + (\ s a -> s{_igmInstanceGroup = a}) + +instance FromJSON InstanceGroupManager where + parseJSON + = withObject "InstanceGroupManager" + (\ o -> + InstanceGroupManager <$> + (o .:? "kind" .!= "compute#instanceGroupManager") <*> + (o .:? "fingerprint") + <*> (o .:? "baseInstanceName") + <*> (o .:? "zone") + <*> (o .:? "instanceTemplate") + <*> (o .:? "targetSize") + <*> (o .:? "selfLink") + <*> (o .:? "currentActions") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "targetPools" .!= mempty) + <*> (o .:? "description") + <*> (o .:? "instanceGroup")) + +instance ToJSON InstanceGroupManager where + toJSON InstanceGroupManager{..} + = object + (catMaybes + [Just ("kind" .= _igmKind), + ("fingerprint" .=) <$> _igmFingerprint, + ("baseInstanceName" .=) <$> _igmBaseInstanceName, + ("zone" .=) <$> _igmZone, + ("instanceTemplate" .=) <$> _igmInstanceTemplate, + ("targetSize" .=) <$> _igmTargetSize, + ("selfLink" .=) <$> _igmSelfLink, + ("currentActions" .=) <$> _igmCurrentActions, + ("name" .=) <$> _igmName, + ("creationTimestamp" .=) <$> _igmCreationTimestamp, + ("id" .=) <$> _igmId, + ("targetPools" .=) <$> _igmTargetPools, + ("description" .=) <$> _igmDescription, + ("instanceGroup" .=) <$> _igmInstanceGroup]) + +-- | A ForwardingRule resource. A ForwardingRule resource specifies which +-- pool of target virtual machines to forward a packet to if it matches the +-- given [IPAddress, IPProtocol, portRange] tuple. +-- +-- /See:/ 'forwardingRule' smart constructor. +data ForwardingRule = ForwardingRule + { _frIPAddress :: !(Maybe Text) + , _frKind :: !Text + , _frPortRange :: !(Maybe Text) + , _frSelfLink :: !(Maybe Text) + , _frName :: !(Maybe Text) + , _frIPProtocol :: !(Maybe Text) + , _frCreationTimestamp :: !(Maybe Text) + , _frId :: !(Maybe Word64) + , _frRegion :: !(Maybe Text) + , _frDescription :: !(Maybe Text) + , _frTarget :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frIPAddress' +-- +-- * 'frKind' +-- +-- * 'frPortRange' +-- +-- * 'frSelfLink' +-- +-- * 'frName' +-- +-- * 'frIPProtocol' +-- +-- * 'frCreationTimestamp' +-- +-- * 'frId' +-- +-- * 'frRegion' +-- +-- * 'frDescription' +-- +-- * 'frTarget' +forwardingRule + :: ForwardingRule +forwardingRule = + ForwardingRule + { _frIPAddress = Nothing + , _frKind = "compute#forwardingRule" + , _frPortRange = Nothing + , _frSelfLink = Nothing + , _frName = Nothing + , _frIPProtocol = Nothing + , _frCreationTimestamp = Nothing + , _frId = Nothing + , _frRegion = Nothing + , _frDescription = Nothing + , _frTarget = Nothing + } + +-- | Value of the reserved IP address that this forwarding rule is serving on +-- behalf of. For global forwarding rules, the address must be a global IP; +-- for regional forwarding rules, the address must live in the same region +-- as the forwarding rule. If left empty (default value), an ephemeral IP +-- from the same scope (global or regional) will be assigned. +frIPAddress :: Lens' ForwardingRule (Maybe Text) +frIPAddress + = lens _frIPAddress (\ s a -> s{_frIPAddress = a}) + +-- | Type of the resource. +frKind :: Lens' ForwardingRule Text +frKind = lens _frKind (\ s a -> s{_frKind = a}) + +-- | Applicable only when \`IPProtocol\` is TCP, UDP, or SCTP, only packets +-- addressed to ports in the specified range will be forwarded to target. +-- If portRange is left empty (default value), all ports are forwarded. +-- Forwarding rules with the same \`[IPAddress, IPProtocol]\` pair must +-- have disjoint port ranges. +frPortRange :: Lens' ForwardingRule (Maybe Text) +frPortRange + = lens _frPortRange (\ s a -> s{_frPortRange = a}) + +-- | [Output Only] Server-defined URL for the resource. +frSelfLink :: Lens' ForwardingRule (Maybe Text) +frSelfLink + = lens _frSelfLink (\ s a -> s{_frSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +frName :: Lens' ForwardingRule (Maybe Text) +frName = lens _frName (\ s a -> s{_frName = a}) + +-- | The IP protocol to which this rule applies. Valid options are TCP, UDP, +-- ESP, AH or SCTP. +frIPProtocol :: Lens' ForwardingRule (Maybe Text) +frIPProtocol + = lens _frIPProtocol (\ s a -> s{_frIPProtocol = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +frCreationTimestamp :: Lens' ForwardingRule (Maybe Text) +frCreationTimestamp + = lens _frCreationTimestamp + (\ s a -> s{_frCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +frId :: Lens' ForwardingRule (Maybe Word64) +frId = lens _frId (\ s a -> s{_frId = a}) + +-- | [Output Only] URL of the region where the regional forwarding rule +-- resides. This field is not applicable to global forwarding rules. +frRegion :: Lens' ForwardingRule (Maybe Text) +frRegion = lens _frRegion (\ s a -> s{_frRegion = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +frDescription :: Lens' ForwardingRule (Maybe Text) +frDescription + = lens _frDescription + (\ s a -> s{_frDescription = a}) + +-- | The URL of the target resource to receive the matched traffic. For +-- regional forwarding rules, this target must live in the same region as +-- the forwarding rule. For global forwarding rules, this target must be a +-- global TargetHttpProxy or TargetHttpsProxy resource. +frTarget :: Lens' ForwardingRule (Maybe Text) +frTarget = lens _frTarget (\ s a -> s{_frTarget = a}) + +instance FromJSON ForwardingRule where + parseJSON + = withObject "ForwardingRule" + (\ o -> + ForwardingRule <$> + (o .:? "IPAddress") <*> + (o .:? "kind" .!= "compute#forwardingRule") + <*> (o .:? "portRange") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "IPProtocol") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "region") + <*> (o .:? "description") + <*> (o .:? "target")) + +instance ToJSON ForwardingRule where + toJSON ForwardingRule{..} + = object + (catMaybes + [("IPAddress" .=) <$> _frIPAddress, + Just ("kind" .= _frKind), + ("portRange" .=) <$> _frPortRange, + ("selfLink" .=) <$> _frSelfLink, + ("name" .=) <$> _frName, + ("IPProtocol" .=) <$> _frIPProtocol, + ("creationTimestamp" .=) <$> _frCreationTimestamp, + ("id" .=) <$> _frId, ("region" .=) <$> _frRegion, + ("description" .=) <$> _frDescription, + ("target" .=) <$> _frTarget]) + +-- +-- /See:/ 'diskMoveRequest' smart constructor. +data DiskMoveRequest = DiskMoveRequest + { _dmrTargetDisk :: !(Maybe Text) + , _dmrDestinationZone :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskMoveRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dmrTargetDisk' +-- +-- * 'dmrDestinationZone' +diskMoveRequest + :: DiskMoveRequest +diskMoveRequest = + DiskMoveRequest + { _dmrTargetDisk = Nothing + , _dmrDestinationZone = Nothing + } + +-- | The URL of the target disk to move. This can be a full or partial URL. +-- For example, the following are all valid URLs to a disk: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/disks\/disk +-- - projects\/project\/zones\/zone\/disks\/disk - zones\/zone\/disks\/disk +dmrTargetDisk :: Lens' DiskMoveRequest (Maybe Text) +dmrTargetDisk + = lens _dmrTargetDisk + (\ s a -> s{_dmrTargetDisk = a}) + +-- | The URL of the destination zone to move the disk to. This can be a full +-- or partial URL. For example, the following are all valid URLs to a zone: +-- - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone +-- - projects\/project\/zones\/zone - zones\/zone +dmrDestinationZone :: Lens' DiskMoveRequest (Maybe Text) +dmrDestinationZone + = lens _dmrDestinationZone + (\ s a -> s{_dmrDestinationZone = a}) + +instance FromJSON DiskMoveRequest where + parseJSON + = withObject "DiskMoveRequest" + (\ o -> + DiskMoveRequest <$> + (o .:? "targetDisk") <*> (o .:? "destinationZone")) + +instance ToJSON DiskMoveRequest where + toJSON DiskMoveRequest{..} + = object + (catMaybes + [("targetDisk" .=) <$> _dmrTargetDisk, + ("destinationZone" .=) <$> _dmrDestinationZone]) + +-- | An Operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "compute#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target ID which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. Can be one of the following: +-- PENDING, RUNNING, or DONE. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested. This is in +-- RFC3339 text format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | [Output Only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the operation +-- will be complete. This number should monotonically increase as the +-- operation progresses. +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server. +-- This is in RFC3339 text format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output Only] Type of the resource. Always compute#Operation for +-- Operation resources. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors are generated during processing of the +-- operation, this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as NOT FOUND. +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | [Output Only] If warning messages are generated during processing of the +-- operation, this field will be populated. +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as 404. +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +-- | [Output Only] User who requested the operation, for example: +-- user\'example.com. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server-defined URL for the resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +-- | [Output Only] The time that this operation was completed. This is in +-- RFC3339 text format. +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | [Output Only] Type of the operation, such as insert, update, and delete. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. Only +-- applicable for regional resources. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output Only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Output Only] An optional identifier specified by the client when the +-- mutation was initiated. Must be unique for all Operation resources in +-- the project. +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "compute#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- | A Project resource. Projects can only be created in the Google +-- Developers Console. Unless marked otherwise, values can only be modified +-- in the console. +-- +-- /See:/ 'project' smart constructor. +data Project = Project + { _pKind :: !Text + , _pUsageExportLocation :: !(Maybe (Maybe UsageExportLocation)) + , _pSelfLink :: !(Maybe Text) + , _pName :: !(Maybe Text) + , _pCreationTimestamp :: !(Maybe Text) + , _pEnabledFeatures :: !(Maybe [Text]) + , _pQuotas :: !(Maybe [Maybe Quota]) + , _pId :: !(Maybe Word64) + , _pDescription :: !(Maybe Text) + , _pCommonInstanceMetadata :: !(Maybe (Maybe Metadata)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Project' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKind' +-- +-- * 'pUsageExportLocation' +-- +-- * 'pSelfLink' +-- +-- * 'pName' +-- +-- * 'pCreationTimestamp' +-- +-- * 'pEnabledFeatures' +-- +-- * 'pQuotas' +-- +-- * 'pId' +-- +-- * 'pDescription' +-- +-- * 'pCommonInstanceMetadata' +project + :: Project +project = + Project + { _pKind = "compute#project" + , _pUsageExportLocation = Nothing + , _pSelfLink = Nothing + , _pName = Nothing + , _pCreationTimestamp = Nothing + , _pEnabledFeatures = Nothing + , _pQuotas = Nothing + , _pId = Nothing + , _pDescription = Nothing + , _pCommonInstanceMetadata = Nothing + } + +-- | [Output Only] Type of the resource. Always compute#project for projects. +pKind :: Lens' Project Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The location in Cloud Storage and naming method of the daily usage +-- report. +pUsageExportLocation :: Lens' Project (Maybe (Maybe UsageExportLocation)) +pUsageExportLocation + = lens _pUsageExportLocation + (\ s a -> s{_pUsageExportLocation = a}) + +-- | [Output Only] Server-defined URL for the resource. +pSelfLink :: Lens' Project (Maybe Text) +pSelfLink + = lens _pSelfLink (\ s a -> s{_pSelfLink = a}) + +-- | Name of the resource. +pName :: Lens' Project (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +pCreationTimestamp :: Lens' Project (Maybe Text) +pCreationTimestamp + = lens _pCreationTimestamp + (\ s a -> s{_pCreationTimestamp = a}) + +-- | Restricted features enabled for use on this project. +pEnabledFeatures :: Lens' Project [Text] +pEnabledFeatures + = lens _pEnabledFeatures + (\ s a -> s{_pEnabledFeatures = a}) + . _Default + . _Coerce + +-- | [Output Only] Quotas assigned to this project. +pQuotas :: Lens' Project [Maybe Quota] +pQuotas + = lens _pQuotas (\ s a -> s{_pQuotas = a}) . _Default + . _Coerce + +-- | [Output Only] Unique identifier for the resource; defined by the server. +pId :: Lens' Project (Maybe Word64) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | An optional textual description of the resource. +pDescription :: Lens' Project (Maybe Text) +pDescription + = lens _pDescription (\ s a -> s{_pDescription = a}) + +-- | Metadata key\/value pairs available to all instances contained in this +-- project. See Custom metadata for more information. +pCommonInstanceMetadata :: Lens' Project (Maybe (Maybe Metadata)) +pCommonInstanceMetadata + = lens _pCommonInstanceMetadata + (\ s a -> s{_pCommonInstanceMetadata = a}) + +instance FromJSON Project where + parseJSON + = withObject "Project" + (\ o -> + Project <$> + (o .:? "kind" .!= "compute#project") <*> + (o .:? "usageExportLocation") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "enabledFeatures" .!= mempty) + <*> (o .:? "quotas" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "commonInstanceMetadata")) + +instance ToJSON Project where + toJSON Project{..} + = object + (catMaybes + [Just ("kind" .= _pKind), + ("usageExportLocation" .=) <$> _pUsageExportLocation, + ("selfLink" .=) <$> _pSelfLink, + ("name" .=) <$> _pName, + ("creationTimestamp" .=) <$> _pCreationTimestamp, + ("enabledFeatures" .=) <$> _pEnabledFeatures, + ("quotas" .=) <$> _pQuotas, ("id" .=) <$> _pId, + ("description" .=) <$> _pDescription, + ("commonInstanceMetadata" .=) <$> + _pCommonInstanceMetadata]) + +-- | Contains a list of UrlMap resources. +-- +-- /See:/ 'uRLMapList' smart constructor. +data URLMapList = URLMapList + { _umlNextPageToken :: !(Maybe Text) + , _umlKind :: !Text + , _umlItems :: !(Maybe [Maybe URLMap]) + , _umlSelfLink :: !(Maybe Text) + , _umlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umlNextPageToken' +-- +-- * 'umlKind' +-- +-- * 'umlItems' +-- +-- * 'umlSelfLink' +-- +-- * 'umlId' +uRLMapList + :: URLMapList +uRLMapList = + URLMapList + { _umlNextPageToken = Nothing + , _umlKind = "compute#urlMapList" + , _umlItems = Nothing + , _umlSelfLink = Nothing + , _umlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +umlNextPageToken :: Lens' URLMapList (Maybe Text) +umlNextPageToken + = lens _umlNextPageToken + (\ s a -> s{_umlNextPageToken = a}) + +-- | Type of resource. +umlKind :: Lens' URLMapList Text +umlKind = lens _umlKind (\ s a -> s{_umlKind = a}) + +-- | A list of UrlMap resources. +umlItems :: Lens' URLMapList [Maybe URLMap] +umlItems + = lens _umlItems (\ s a -> s{_umlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +umlSelfLink :: Lens' URLMapList (Maybe Text) +umlSelfLink + = lens _umlSelfLink (\ s a -> s{_umlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Set by the server. +umlId :: Lens' URLMapList (Maybe Text) +umlId = lens _umlId (\ s a -> s{_umlId = a}) + +instance FromJSON URLMapList where + parseJSON + = withObject "URLMapList" + (\ o -> + URLMapList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#urlMapList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON URLMapList where + toJSON URLMapList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _umlNextPageToken, + Just ("kind" .= _umlKind), + ("items" .=) <$> _umlItems, + ("selfLink" .=) <$> _umlSelfLink, + ("id" .=) <$> _umlId]) + +-- +-- /See:/ 'targetPoolsRemoveInstanceRequest' smart constructor. +newtype TargetPoolsRemoveInstanceRequest = TargetPoolsRemoveInstanceRequest + { _tprirInstances :: Maybe [Maybe InstanceReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsRemoveInstanceRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tprirInstances' +targetPoolsRemoveInstanceRequest + :: TargetPoolsRemoveInstanceRequest +targetPoolsRemoveInstanceRequest = + TargetPoolsRemoveInstanceRequest + { _tprirInstances = Nothing + } + +-- | URLs of the instances to be removed from targetPool. +tprirInstances :: Lens' TargetPoolsRemoveInstanceRequest [Maybe InstanceReference] +tprirInstances + = lens _tprirInstances + (\ s a -> s{_tprirInstances = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolsRemoveInstanceRequest + where + parseJSON + = withObject "TargetPoolsRemoveInstanceRequest" + (\ o -> + TargetPoolsRemoveInstanceRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON TargetPoolsRemoveInstanceRequest + where + toJSON TargetPoolsRemoveInstanceRequest{..} + = object + (catMaybes [("instances" .=) <$> _tprirInstances]) + +-- | +-- +-- /See:/ 'instanceProperties' smart constructor. +data InstanceProperties = InstanceProperties + { _ipServiceAccounts :: !(Maybe [Maybe ServiceAccount]) + , _ipNetworkInterfaces :: !(Maybe [Maybe NetworkInterface]) + , _ipMachineType :: !(Maybe Text) + , _ipMetadata :: !(Maybe (Maybe Metadata)) + , _ipScheduling :: !(Maybe (Maybe Scheduling)) + , _ipDisks :: !(Maybe [Maybe AttachedDisk]) + , _ipCanIpForward :: !(Maybe Bool) + , _ipDescription :: !(Maybe Text) + , _ipTags :: !(Maybe (Maybe Tags)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceProperties' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipServiceAccounts' +-- +-- * 'ipNetworkInterfaces' +-- +-- * 'ipMachineType' +-- +-- * 'ipMetadata' +-- +-- * 'ipScheduling' +-- +-- * 'ipDisks' +-- +-- * 'ipCanIpForward' +-- +-- * 'ipDescription' +-- +-- * 'ipTags' +instanceProperties + :: InstanceProperties +instanceProperties = + InstanceProperties + { _ipServiceAccounts = Nothing + , _ipNetworkInterfaces = Nothing + , _ipMachineType = Nothing + , _ipMetadata = Nothing + , _ipScheduling = Nothing + , _ipDisks = Nothing + , _ipCanIpForward = Nothing + , _ipDescription = Nothing + , _ipTags = Nothing + } + +-- | A list of service accounts with specified scopes. Access tokens for +-- these service accounts are available to the instances that are created +-- from this template. Use metadata queries to obtain the access tokens for +-- these instances. +ipServiceAccounts :: Lens' InstanceProperties [Maybe ServiceAccount] +ipServiceAccounts + = lens _ipServiceAccounts + (\ s a -> s{_ipServiceAccounts = a}) + . _Default + . _Coerce + +-- | An array of network access configurations for this interface. This +-- specifies how this interface is configured to interact with other +-- network services, such as connecting to the internet. Currently, +-- ONE_TO_ONE_NAT is the only supported access configuration. If you do not +-- specify any access configurations, the instances that are created from +-- this template will have no external internet access. +ipNetworkInterfaces :: Lens' InstanceProperties [Maybe NetworkInterface] +ipNetworkInterfaces + = lens _ipNetworkInterfaces + (\ s a -> s{_ipNetworkInterfaces = a}) + . _Default + . _Coerce + +-- | The machine type to use for instances that are created from this +-- template. +ipMachineType :: Lens' InstanceProperties (Maybe Text) +ipMachineType + = lens _ipMachineType + (\ s a -> s{_ipMachineType = a}) + +-- | The metadata key\/value pairs to assign to instances that are created +-- from this template. These pairs can consist of custom metadata or +-- predefined keys. See Project and instance metadata for more information. +ipMetadata :: Lens' InstanceProperties (Maybe (Maybe Metadata)) +ipMetadata + = lens _ipMetadata (\ s a -> s{_ipMetadata = a}) + +-- | A list of scheduling options for the instances that are created from +-- this template. +ipScheduling :: Lens' InstanceProperties (Maybe (Maybe Scheduling)) +ipScheduling + = lens _ipScheduling (\ s a -> s{_ipScheduling = a}) + +-- | An array of disks that are associated with the instances that are +-- created from this template. +ipDisks :: Lens' InstanceProperties [Maybe AttachedDisk] +ipDisks + = lens _ipDisks (\ s a -> s{_ipDisks = a}) . _Default + . _Coerce + +-- | A boolean that specifies if instances created from this template can +-- send packets with source IP addresses other than their own or receive +-- packets with destination IP addresses other than their own. If you use +-- these instances as an IP gateway or as the next-hop in a Route resource, +-- specify true. Otherwise, specify false. +ipCanIpForward :: Lens' InstanceProperties (Maybe Bool) +ipCanIpForward + = lens _ipCanIpForward + (\ s a -> s{_ipCanIpForward = a}) + +-- | An optional text description for the instances that are created from +-- this instance template. +ipDescription :: Lens' InstanceProperties (Maybe Text) +ipDescription + = lens _ipDescription + (\ s a -> s{_ipDescription = a}) + +-- | A list of tags to apply to the instances that are created from this +-- template. The tags identify valid sources or targets for network +-- firewalls. The setTags method can modify this list of tags. Each tag +-- within the list must comply with RFC1035. +ipTags :: Lens' InstanceProperties (Maybe (Maybe Tags)) +ipTags = lens _ipTags (\ s a -> s{_ipTags = a}) + +instance FromJSON InstanceProperties where + parseJSON + = withObject "InstanceProperties" + (\ o -> + InstanceProperties <$> + (o .:? "serviceAccounts" .!= mempty) <*> + (o .:? "networkInterfaces" .!= mempty) + <*> (o .:? "machineType") + <*> (o .:? "metadata") + <*> (o .:? "scheduling") + <*> (o .:? "disks" .!= mempty) + <*> (o .:? "canIpForward") + <*> (o .:? "description") + <*> (o .:? "tags")) + +instance ToJSON InstanceProperties where + toJSON InstanceProperties{..} + = object + (catMaybes + [("serviceAccounts" .=) <$> _ipServiceAccounts, + ("networkInterfaces" .=) <$> _ipNetworkInterfaces, + ("machineType" .=) <$> _ipMachineType, + ("metadata" .=) <$> _ipMetadata, + ("scheduling" .=) <$> _ipScheduling, + ("disks" .=) <$> _ipDisks, + ("canIpForward" .=) <$> _ipCanIpForward, + ("description" .=) <$> _ipDescription, + ("tags" .=) <$> _ipTags]) + +-- +-- /See:/ 'targetPoolInstanceHealth' smart constructor. +data TargetPoolInstanceHealth = TargetPoolInstanceHealth + { _tpihKind :: !Text + , _tpihHealthStatus :: !(Maybe [Maybe HealthStatus]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolInstanceHealth' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpihKind' +-- +-- * 'tpihHealthStatus' +targetPoolInstanceHealth + :: TargetPoolInstanceHealth +targetPoolInstanceHealth = + TargetPoolInstanceHealth + { _tpihKind = "compute#targetPoolInstanceHealth" + , _tpihHealthStatus = Nothing + } + +-- | Type of resource. +tpihKind :: Lens' TargetPoolInstanceHealth Text +tpihKind = lens _tpihKind (\ s a -> s{_tpihKind = a}) + +tpihHealthStatus :: Lens' TargetPoolInstanceHealth [Maybe HealthStatus] +tpihHealthStatus + = lens _tpihHealthStatus + (\ s a -> s{_tpihHealthStatus = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolInstanceHealth where + parseJSON + = withObject "TargetPoolInstanceHealth" + (\ o -> + TargetPoolInstanceHealth <$> + (o .:? "kind" .!= "compute#targetPoolInstanceHealth") + <*> (o .:? "healthStatus" .!= mempty)) + +instance ToJSON TargetPoolInstanceHealth where + toJSON TargetPoolInstanceHealth{..} + = object + (catMaybes + [Just ("kind" .= _tpihKind), + ("healthStatus" .=) <$> _tpihHealthStatus]) + +-- | A TargetInstance resource. This resource defines an endpoint instance +-- that terminates traffic of certain protocols. +-- +-- /See:/ 'targetInstance' smart constructor. +data TargetInstance = TargetInstance + { _tiKind :: !Text + , _tiNatPolicy :: !(Maybe Text) + , _tiZone :: !(Maybe Text) + , _tiSelfLink :: !(Maybe Text) + , _tiName :: !(Maybe Text) + , _tiCreationTimestamp :: !(Maybe Text) + , _tiId :: !(Maybe Word64) + , _tiDescription :: !(Maybe Text) + , _tiInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiKind' +-- +-- * 'tiNatPolicy' +-- +-- * 'tiZone' +-- +-- * 'tiSelfLink' +-- +-- * 'tiName' +-- +-- * 'tiCreationTimestamp' +-- +-- * 'tiId' +-- +-- * 'tiDescription' +-- +-- * 'tiInstance' +targetInstance + :: TargetInstance +targetInstance = + TargetInstance + { _tiKind = "compute#targetInstance" + , _tiNatPolicy = Nothing + , _tiZone = Nothing + , _tiSelfLink = Nothing + , _tiName = Nothing + , _tiCreationTimestamp = Nothing + , _tiId = Nothing + , _tiDescription = Nothing + , _tiInstance = Nothing + } + +-- | Type of the resource. +tiKind :: Lens' TargetInstance Text +tiKind = lens _tiKind (\ s a -> s{_tiKind = a}) + +-- | NAT option controlling how IPs are NAT\'ed to the instance. Currently +-- only NO_NAT (default value) is supported. +tiNatPolicy :: Lens' TargetInstance (Maybe Text) +tiNatPolicy + = lens _tiNatPolicy (\ s a -> s{_tiNatPolicy = a}) + +-- | [Output Only] URL of the zone where the target instance resides. +tiZone :: Lens' TargetInstance (Maybe Text) +tiZone = lens _tiZone (\ s a -> s{_tiZone = a}) + +-- | [Output Only] Server-defined URL for the resource. +tiSelfLink :: Lens' TargetInstance (Maybe Text) +tiSelfLink + = lens _tiSelfLink (\ s a -> s{_tiSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +tiName :: Lens' TargetInstance (Maybe Text) +tiName = lens _tiName (\ s a -> s{_tiName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +tiCreationTimestamp :: Lens' TargetInstance (Maybe Text) +tiCreationTimestamp + = lens _tiCreationTimestamp + (\ s a -> s{_tiCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +tiId :: Lens' TargetInstance (Maybe Word64) +tiId = lens _tiId (\ s a -> s{_tiId = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +tiDescription :: Lens' TargetInstance (Maybe Text) +tiDescription + = lens _tiDescription + (\ s a -> s{_tiDescription = a}) + +-- | The URL to the instance that terminates the relevant traffic. +tiInstance :: Lens' TargetInstance (Maybe Text) +tiInstance + = lens _tiInstance (\ s a -> s{_tiInstance = a}) + +instance FromJSON TargetInstance where + parseJSON + = withObject "TargetInstance" + (\ o -> + TargetInstance <$> + (o .:? "kind" .!= "compute#targetInstance") <*> + (o .:? "natPolicy") + <*> (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "instance")) + +instance ToJSON TargetInstance where + toJSON TargetInstance{..} + = object + (catMaybes + [Just ("kind" .= _tiKind), + ("natPolicy" .=) <$> _tiNatPolicy, + ("zone" .=) <$> _tiZone, + ("selfLink" .=) <$> _tiSelfLink, + ("name" .=) <$> _tiName, + ("creationTimestamp" .=) <$> _tiCreationTimestamp, + ("id" .=) <$> _tiId, + ("description" .=) <$> _tiDescription, + ("instance" .=) <$> _tiInstance]) + +-- +-- /See:/ 'instanceGroupManagersListManagedInstancesResponse' smart constructor. +newtype InstanceGroupManagersListManagedInstancesResponse = InstanceGroupManagersListManagedInstancesResponse + { _igmlmirManagedInstances :: Maybe [Maybe ManagedInstance] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersListManagedInstancesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlmirManagedInstances' +instanceGroupManagersListManagedInstancesResponse + :: InstanceGroupManagersListManagedInstancesResponse +instanceGroupManagersListManagedInstancesResponse = + InstanceGroupManagersListManagedInstancesResponse + { _igmlmirManagedInstances = Nothing + } + +-- | List of managed instances. If empty - all instances are listed. +igmlmirManagedInstances :: Lens' InstanceGroupManagersListManagedInstancesResponse [Maybe ManagedInstance] +igmlmirManagedInstances + = lens _igmlmirManagedInstances + (\ s a -> s{_igmlmirManagedInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersListManagedInstancesResponse + where + parseJSON + = withObject + "InstanceGroupManagersListManagedInstancesResponse" + (\ o -> + InstanceGroupManagersListManagedInstancesResponse <$> + (o .:? "managedInstances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersListManagedInstancesResponse + where + toJSON + InstanceGroupManagersListManagedInstancesResponse{..} + = object + (catMaybes + [("managedInstances" .=) <$> + _igmlmirManagedInstances]) + +-- +-- /See:/ 'instanceGroupsRemoveInstancesRequest' smart constructor. +newtype InstanceGroupsRemoveInstancesRequest = InstanceGroupsRemoveInstancesRequest + { _igrirInstances :: Maybe [Maybe InstanceReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsRemoveInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igrirInstances' +instanceGroupsRemoveInstancesRequest + :: InstanceGroupsRemoveInstancesRequest +instanceGroupsRemoveInstancesRequest = + InstanceGroupsRemoveInstancesRequest + { _igrirInstances = Nothing + } + +-- | The instances to remove from the instance group. +igrirInstances :: Lens' InstanceGroupsRemoveInstancesRequest [Maybe InstanceReference] +igrirInstances + = lens _igrirInstances + (\ s a -> s{_igrirInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupsRemoveInstancesRequest where + parseJSON + = withObject "InstanceGroupsRemoveInstancesRequest" + (\ o -> + InstanceGroupsRemoveInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON InstanceGroupsRemoveInstancesRequest + where + toJSON InstanceGroupsRemoveInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igrirInstances]) + +-- | [Input Only] Specifies the parameters for a new disk that will be +-- created alongside the new instance. Use initialization parameters to +-- create boot disks or local SSDs attached to the new instance. This +-- property is mutually exclusive with the source property; you can only +-- define one or the other, but not both. +-- +-- /See:/ 'attachedDiskInitializeParams' smart constructor. +data AttachedDiskInitializeParams = AttachedDiskInitializeParams + { _adipSourceImage :: !(Maybe Text) + , _adipDiskSizeGb :: !(Maybe Int64) + , _adipDiskName :: !(Maybe Text) + , _adipDiskType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AttachedDiskInitializeParams' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adipSourceImage' +-- +-- * 'adipDiskSizeGb' +-- +-- * 'adipDiskName' +-- +-- * 'adipDiskType' +attachedDiskInitializeParams + :: AttachedDiskInitializeParams +attachedDiskInitializeParams = + AttachedDiskInitializeParams + { _adipSourceImage = Nothing + , _adipDiskSizeGb = Nothing + , _adipDiskName = Nothing + , _adipDiskType = Nothing + } + +-- | A source image used to create the disk. You can provide a private +-- (custom) image, and Compute Engine will use the corresponding image from +-- your project. For example: global\/images\/my-private-image Or you can +-- provide an image from a publicly-available project. For example, to use +-- a Debian image from the debian-cloud project, make sure to include the +-- project in the URL: +-- projects\/debian-cloud\/global\/images\/debian-7-wheezy-vYYYYMMDD where +-- vYYYYMMDD is the image version. The fully-qualified URL will also work +-- in both cases. +adipSourceImage :: Lens' AttachedDiskInitializeParams (Maybe Text) +adipSourceImage + = lens _adipSourceImage + (\ s a -> s{_adipSourceImage = a}) + +-- | Specifies the size of the disk in base-2 GB. +adipDiskSizeGb :: Lens' AttachedDiskInitializeParams (Maybe Int64) +adipDiskSizeGb + = lens _adipDiskSizeGb + (\ s a -> s{_adipDiskSizeGb = a}) + +-- | Specifies the disk name. If not specified, the default is to use the +-- name of the instance. +adipDiskName :: Lens' AttachedDiskInitializeParams (Maybe Text) +adipDiskName + = lens _adipDiskName (\ s a -> s{_adipDiskName = a}) + +-- | Specifies the disk type to use to create the instance. If not specified, +-- the default is pd-standard, specified using the full URL. For example: +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/diskTypes\/pd-standard +-- Other values include pd-ssd and local-ssd. If you define this field, you +-- can provide either the full or partial URL. For example, the following +-- are valid values: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/diskTypes\/diskType +-- - projects\/project\/zones\/zone\/diskTypes\/diskType - +-- zones\/zone\/diskTypes\/diskType +adipDiskType :: Lens' AttachedDiskInitializeParams (Maybe Text) +adipDiskType + = lens _adipDiskType (\ s a -> s{_adipDiskType = a}) + +instance FromJSON AttachedDiskInitializeParams where + parseJSON + = withObject "AttachedDiskInitializeParams" + (\ o -> + AttachedDiskInitializeParams <$> + (o .:? "sourceImage") <*> (o .:? "diskSizeGb") <*> + (o .:? "diskName") + <*> (o .:? "diskType")) + +instance ToJSON AttachedDiskInitializeParams where + toJSON AttachedDiskInitializeParams{..} + = object + (catMaybes + [("sourceImage" .=) <$> _adipSourceImage, + ("diskSizeGb" .=) <$> _adipDiskSizeGb, + ("diskName" .=) <$> _adipDiskName, + ("diskType" .=) <$> _adipDiskType]) + +-- | A network interface resource attached to an instance. +-- +-- /See:/ 'networkInterface' smart constructor. +data NetworkInterface = NetworkInterface + { _niNetwork :: !(Maybe Text) + , _niName :: !(Maybe Text) + , _niNetworkIP :: !(Maybe Text) + , _niAccessConfigs :: !(Maybe [Maybe AccessConfig]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworkInterface' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'niNetwork' +-- +-- * 'niName' +-- +-- * 'niNetworkIP' +-- +-- * 'niAccessConfigs' +networkInterface + :: NetworkInterface +networkInterface = + NetworkInterface + { _niNetwork = Nothing + , _niName = Nothing + , _niNetworkIP = Nothing + , _niAccessConfigs = Nothing + } + +-- | URL of the network resource for this instance. This is required for +-- creating an instance but optional when creating a firewall rule. If not +-- specified when creating a firewall rule, the default network is used: +-- global\/networks\/default If you specify this property, you can specify +-- the network as a full or partial URL. For example, the following are all +-- valid URLs: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/global\/networks\/network +-- - projects\/project\/global\/networks\/network - +-- global\/networks\/default +niNetwork :: Lens' NetworkInterface (Maybe Text) +niNetwork + = lens _niNetwork (\ s a -> s{_niNetwork = a}) + +-- | [Output Only] The name of the network interface, generated by the +-- server. For network devices, these are eth0, eth1, etc. +niName :: Lens' NetworkInterface (Maybe Text) +niName = lens _niName (\ s a -> s{_niName = a}) + +-- | [Output Only] An optional IPV4 internal network address assigned to the +-- instance for this network interface. +niNetworkIP :: Lens' NetworkInterface (Maybe Text) +niNetworkIP + = lens _niNetworkIP (\ s a -> s{_niNetworkIP = a}) + +-- | An array of configurations for this interface. Currently, ONE_TO_ONE_NAT +-- is the only access config supported. If there are no accessConfigs +-- specified, then this instance will have no external internet access. +niAccessConfigs :: Lens' NetworkInterface [Maybe AccessConfig] +niAccessConfigs + = lens _niAccessConfigs + (\ s a -> s{_niAccessConfigs = a}) + . _Default + . _Coerce + +instance FromJSON NetworkInterface where + parseJSON + = withObject "NetworkInterface" + (\ o -> + NetworkInterface <$> + (o .:? "network") <*> (o .:? "name") <*> + (o .:? "networkIP") + <*> (o .:? "accessConfigs" .!= mempty)) + +instance ToJSON NetworkInterface where + toJSON NetworkInterface{..} + = object + (catMaybes + [("network" .=) <$> _niNetwork, + ("name" .=) <$> _niName, + ("networkIP" .=) <$> _niNetworkIP, + ("accessConfigs" .=) <$> _niAccessConfigs]) + +-- | A list of instance templates. +-- +-- /See:/ 'instanceTemplateList' smart constructor. +data InstanceTemplateList = InstanceTemplateList + { _itlNextPageToken :: !(Maybe Text) + , _itlKind :: !Text + , _itlItems :: !(Maybe [Maybe InstanceTemplate]) + , _itlSelfLink :: !(Maybe Text) + , _itlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplateList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itlNextPageToken' +-- +-- * 'itlKind' +-- +-- * 'itlItems' +-- +-- * 'itlSelfLink' +-- +-- * 'itlId' +instanceTemplateList + :: InstanceTemplateList +instanceTemplateList = + InstanceTemplateList + { _itlNextPageToken = Nothing + , _itlKind = "compute#instanceTemplateList" + , _itlItems = Nothing + , _itlSelfLink = Nothing + , _itlId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +itlNextPageToken :: Lens' InstanceTemplateList (Maybe Text) +itlNextPageToken + = lens _itlNextPageToken + (\ s a -> s{_itlNextPageToken = a}) + +-- | [Output Only] The resource type, which is always +-- compute#instanceTemplatesListResponse for instance template lists. +itlKind :: Lens' InstanceTemplateList Text +itlKind = lens _itlKind (\ s a -> s{_itlKind = a}) + +-- | A list of InstanceTemplate resources. +itlItems :: Lens' InstanceTemplateList [Maybe InstanceTemplate] +itlItems + = lens _itlItems (\ s a -> s{_itlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The URL for this instance template list. The server +-- defines this URL. +itlSelfLink :: Lens' InstanceTemplateList (Maybe Text) +itlSelfLink + = lens _itlSelfLink (\ s a -> s{_itlSelfLink = a}) + +-- | [Output Only] A unique identifier for this instance template. The server +-- defines this identifier. +itlId :: Lens' InstanceTemplateList (Maybe Text) +itlId = lens _itlId (\ s a -> s{_itlId = a}) + +instance FromJSON InstanceTemplateList where + parseJSON + = withObject "InstanceTemplateList" + (\ o -> + InstanceTemplateList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#instanceTemplateList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceTemplateList where + toJSON InstanceTemplateList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _itlNextPageToken, + Just ("kind" .= _itlKind), + ("items" .=) <$> _itlItems, + ("selfLink" .=) <$> _itlSelfLink, + ("id" .=) <$> _itlId]) + +-- +-- /See:/ 'targetPoolsRemoveHealthCheckRequest' smart constructor. +newtype TargetPoolsRemoveHealthCheckRequest = TargetPoolsRemoveHealthCheckRequest + { _tprhcrHealthChecks :: Maybe [Maybe HealthCheckReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsRemoveHealthCheckRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tprhcrHealthChecks' +targetPoolsRemoveHealthCheckRequest + :: TargetPoolsRemoveHealthCheckRequest +targetPoolsRemoveHealthCheckRequest = + TargetPoolsRemoveHealthCheckRequest + { _tprhcrHealthChecks = Nothing + } + +-- | Health check URLs to be removed from targetPool. +tprhcrHealthChecks :: Lens' TargetPoolsRemoveHealthCheckRequest [Maybe HealthCheckReference] +tprhcrHealthChecks + = lens _tprhcrHealthChecks + (\ s a -> s{_tprhcrHealthChecks = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolsRemoveHealthCheckRequest + where + parseJSON + = withObject "TargetPoolsRemoveHealthCheckRequest" + (\ o -> + TargetPoolsRemoveHealthCheckRequest <$> + (o .:? "healthChecks" .!= mempty)) + +instance ToJSON TargetPoolsRemoveHealthCheckRequest + where + toJSON TargetPoolsRemoveHealthCheckRequest{..} + = object + (catMaybes + [("healthChecks" .=) <$> _tprhcrHealthChecks]) + +-- | Contains a list of route resources. +-- +-- /See:/ 'routeList' smart constructor. +data RouteList = RouteList + { _rlNextPageToken :: !(Maybe Text) + , _rlKind :: !Text + , _rlItems :: !(Maybe [Maybe Route]) + , _rlSelfLink :: !(Maybe Text) + , _rlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RouteList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlNextPageToken' +-- +-- * 'rlKind' +-- +-- * 'rlItems' +-- +-- * 'rlSelfLink' +-- +-- * 'rlId' +routeList + :: RouteList +routeList = + RouteList + { _rlNextPageToken = Nothing + , _rlKind = "compute#routeList" + , _rlItems = Nothing + , _rlSelfLink = Nothing + , _rlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +rlNextPageToken :: Lens' RouteList (Maybe Text) +rlNextPageToken + = lens _rlNextPageToken + (\ s a -> s{_rlNextPageToken = a}) + +-- | Type of resource. +rlKind :: Lens' RouteList Text +rlKind = lens _rlKind (\ s a -> s{_rlKind = a}) + +-- | A list of Route resources. +rlItems :: Lens' RouteList [Maybe Route] +rlItems + = lens _rlItems (\ s a -> s{_rlItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +rlSelfLink :: Lens' RouteList (Maybe Text) +rlSelfLink + = lens _rlSelfLink (\ s a -> s{_rlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +rlId :: Lens' RouteList (Maybe Text) +rlId = lens _rlId (\ s a -> s{_rlId = a}) + +instance FromJSON RouteList where + parseJSON + = withObject "RouteList" + (\ o -> + RouteList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#routeList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON RouteList where + toJSON RouteList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rlNextPageToken, + Just ("kind" .= _rlKind), ("items" .=) <$> _rlItems, + ("selfLink" .=) <$> _rlSelfLink, + ("id" .=) <$> _rlId]) + +-- | Contains a list of TargetVpnGateway resources. +-- +-- /See:/ 'targetVPNGatewayList' smart constructor. +data TargetVPNGatewayList = TargetVPNGatewayList + { _tvglNextPageToken :: !(Maybe Text) + , _tvglKind :: !Text + , _tvglItems :: !(Maybe [Maybe TargetVPNGateway]) + , _tvglSelfLink :: !(Maybe Text) + , _tvglId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewayList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvglNextPageToken' +-- +-- * 'tvglKind' +-- +-- * 'tvglItems' +-- +-- * 'tvglSelfLink' +-- +-- * 'tvglId' +targetVPNGatewayList + :: TargetVPNGatewayList +targetVPNGatewayList = + TargetVPNGatewayList + { _tvglNextPageToken = Nothing + , _tvglKind = "compute#targetVpnGatewayList" + , _tvglItems = Nothing + , _tvglSelfLink = Nothing + , _tvglId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tvglNextPageToken :: Lens' TargetVPNGatewayList (Maybe Text) +tvglNextPageToken + = lens _tvglNextPageToken + (\ s a -> s{_tvglNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#targetVpnGateway for +-- target VPN gateways. +tvglKind :: Lens' TargetVPNGatewayList Text +tvglKind = lens _tvglKind (\ s a -> s{_tvglKind = a}) + +-- | [Output Only] A list of TargetVpnGateway resources. +tvglItems :: Lens' TargetVPNGatewayList [Maybe TargetVPNGateway] +tvglItems + = lens _tvglItems (\ s a -> s{_tvglItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for the resource. +tvglSelfLink :: Lens' TargetVPNGatewayList (Maybe Text) +tvglSelfLink + = lens _tvglSelfLink (\ s a -> s{_tvglSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +tvglId :: Lens' TargetVPNGatewayList (Maybe Text) +tvglId = lens _tvglId (\ s a -> s{_tvglId = a}) + +instance FromJSON TargetVPNGatewayList where + parseJSON + = withObject "TargetVPNGatewayList" + (\ o -> + TargetVPNGatewayList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#targetVpnGatewayList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetVPNGatewayList where + toJSON TargetVPNGatewayList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tvglNextPageToken, + Just ("kind" .= _tvglKind), + ("items" .=) <$> _tvglItems, + ("selfLink" .=) <$> _tvglSelfLink, + ("id" .=) <$> _tvglId]) + +-- | A reserved address resource. +-- +-- /See:/ 'address' smart constructor. +data Address = Address + { _aStatus :: !(Maybe Text) + , _aUsers :: !(Maybe [Text]) + , _aKind :: !Text + , _aAddress :: !(Maybe Text) + , _aSelfLink :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aCreationTimestamp :: !(Maybe Text) + , _aId :: !(Maybe Word64) + , _aRegion :: !(Maybe Text) + , _aDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Address' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aStatus' +-- +-- * 'aUsers' +-- +-- * 'aKind' +-- +-- * 'aAddress' +-- +-- * 'aSelfLink' +-- +-- * 'aName' +-- +-- * 'aCreationTimestamp' +-- +-- * 'aId' +-- +-- * 'aRegion' +-- +-- * 'aDescription' +address + :: Address +address = + Address + { _aStatus = Nothing + , _aUsers = Nothing + , _aKind = "compute#address" + , _aAddress = Nothing + , _aSelfLink = Nothing + , _aName = Nothing + , _aCreationTimestamp = Nothing + , _aId = Nothing + , _aRegion = Nothing + , _aDescription = Nothing + } + +-- | [Output Only] The status of the address, which can be either IN_USE or +-- RESERVED. An address that is RESERVED is currently reserved and +-- available to use. An IN_USE address is currently being used by another +-- resource and is not available. +aStatus :: Lens' Address (Maybe Text) +aStatus = lens _aStatus (\ s a -> s{_aStatus = a}) + +-- | [Output Only] The URLs of the resources that are using this address. +aUsers :: Lens' Address [Text] +aUsers + = lens _aUsers (\ s a -> s{_aUsers = a}) . _Default . + _Coerce + +-- | [Output Only] Type of the resource. Always compute#address for +-- addresses. +aKind :: Lens' Address Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The static external IP address represented by this resource. +aAddress :: Lens' Address (Maybe Text) +aAddress = lens _aAddress (\ s a -> s{_aAddress = a}) + +-- | [Output Only] Server-defined URL for the resource. +aSelfLink :: Lens' Address (Maybe Text) +aSelfLink + = lens _aSelfLink (\ s a -> s{_aSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +aName :: Lens' Address (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +aCreationTimestamp :: Lens' Address (Maybe Text) +aCreationTimestamp + = lens _aCreationTimestamp + (\ s a -> s{_aCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +aId :: Lens' Address (Maybe Word64) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | [Output Only] URL of the region where the regional address resides. This +-- field is not applicable to global addresses. +aRegion :: Lens' Address (Maybe Text) +aRegion = lens _aRegion (\ s a -> s{_aRegion = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +aDescription :: Lens' Address (Maybe Text) +aDescription + = lens _aDescription (\ s a -> s{_aDescription = a}) + +instance FromJSON Address where + parseJSON + = withObject "Address" + (\ o -> + Address <$> + (o .:? "status") <*> (o .:? "users" .!= mempty) <*> + (o .:? "kind" .!= "compute#address") + <*> (o .:? "address") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "region") + <*> (o .:? "description")) + +instance ToJSON Address where + toJSON Address{..} + = object + (catMaybes + [("status" .=) <$> _aStatus, + ("users" .=) <$> _aUsers, Just ("kind" .= _aKind), + ("address" .=) <$> _aAddress, + ("selfLink" .=) <$> _aSelfLink, + ("name" .=) <$> _aName, + ("creationTimestamp" .=) <$> _aCreationTimestamp, + ("id" .=) <$> _aId, ("region" .=) <$> _aRegion, + ("description" .=) <$> _aDescription]) + +-- +-- /See:/ 'instanceAggregatedList' smart constructor. +data InstanceAggregatedList = InstanceAggregatedList + { _ialNextPageToken :: !(Maybe Text) + , _ialKind :: !Text + , _ialItems :: !(Maybe InstanceAggregatedListItems) + , _ialSelfLink :: !(Maybe Text) + , _ialId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ialNextPageToken' +-- +-- * 'ialKind' +-- +-- * 'ialItems' +-- +-- * 'ialSelfLink' +-- +-- * 'ialId' +instanceAggregatedList + :: InstanceAggregatedList +instanceAggregatedList = + InstanceAggregatedList + { _ialNextPageToken = Nothing + , _ialKind = "compute#instanceAggregatedList" + , _ialItems = Nothing + , _ialSelfLink = Nothing + , _ialId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +ialNextPageToken :: Lens' InstanceAggregatedList (Maybe Text) +ialNextPageToken + = lens _ialNextPageToken + (\ s a -> s{_ialNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#instanceAggregatedList +-- for aggregated lists of Instance resources. +ialKind :: Lens' InstanceAggregatedList Text +ialKind = lens _ialKind (\ s a -> s{_ialKind = a}) + +-- | [Output Only] A map of scoped instance lists. +ialItems :: Lens' InstanceAggregatedList (Maybe InstanceAggregatedListItems) +ialItems = lens _ialItems (\ s a -> s{_ialItems = a}) + +-- | [Output Only] Server defined URL for this resource. +ialSelfLink :: Lens' InstanceAggregatedList (Maybe Text) +ialSelfLink + = lens _ialSelfLink (\ s a -> s{_ialSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +ialId :: Lens' InstanceAggregatedList (Maybe Text) +ialId = lens _ialId (\ s a -> s{_ialId = a}) + +instance FromJSON InstanceAggregatedList where + parseJSON + = withObject "InstanceAggregatedList" + (\ o -> + InstanceAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#instanceAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceAggregatedList where + toJSON InstanceAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ialNextPageToken, + Just ("kind" .= _ialKind), + ("items" .=) <$> _ialItems, + ("selfLink" .=) <$> _ialSelfLink, + ("id" .=) <$> _ialId]) + +-- +-- /See:/ 'instancesScopedList' smart constructor. +data InstancesScopedList = InstancesScopedList + { _islWarning :: !(Maybe InstancesScopedListWarning) + , _islInstances :: !(Maybe [Maybe Instance]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'islWarning' +-- +-- * 'islInstances' +instancesScopedList + :: InstancesScopedList +instancesScopedList = + InstancesScopedList + { _islWarning = Nothing + , _islInstances = Nothing + } + +-- | [Output Only] Informational warning which replaces the list of instances +-- when the list is empty. +islWarning :: Lens' InstancesScopedList (Maybe InstancesScopedListWarning) +islWarning + = lens _islWarning (\ s a -> s{_islWarning = a}) + +-- | [Output Only] List of instances contained in this scope. +islInstances :: Lens' InstancesScopedList [Maybe Instance] +islInstances + = lens _islInstances (\ s a -> s{_islInstances = a}) + . _Default + . _Coerce + +instance FromJSON InstancesScopedList where + parseJSON + = withObject "InstancesScopedList" + (\ o -> + InstancesScopedList <$> + (o .:? "warning") <*> (o .:? "instances" .!= mempty)) + +instance ToJSON InstancesScopedList where + toJSON InstancesScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _islWarning, + ("instances" .=) <$> _islInstances]) + +-- | A Zone resource. +-- +-- /See:/ 'zone' smart constructor. +data Zone = Zone + { _zStatus :: !(Maybe Text) + , _zMaintenanceWindows :: !(Maybe [ZoneMaintenanceWindowsItem]) + , _zKind :: !Text + , _zSelfLink :: !(Maybe Text) + , _zName :: !(Maybe Text) + , _zCreationTimestamp :: !(Maybe Text) + , _zId :: !(Maybe Word64) + , _zRegion :: !(Maybe Text) + , _zDescription :: !(Maybe Text) + , _zDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Zone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zStatus' +-- +-- * 'zMaintenanceWindows' +-- +-- * 'zKind' +-- +-- * 'zSelfLink' +-- +-- * 'zName' +-- +-- * 'zCreationTimestamp' +-- +-- * 'zId' +-- +-- * 'zRegion' +-- +-- * 'zDescription' +-- +-- * 'zDeprecated' +zone + :: Zone +zone = + Zone + { _zStatus = Nothing + , _zMaintenanceWindows = Nothing + , _zKind = "compute#zone" + , _zSelfLink = Nothing + , _zName = Nothing + , _zCreationTimestamp = Nothing + , _zId = Nothing + , _zRegion = Nothing + , _zDescription = Nothing + , _zDeprecated = Nothing + } + +-- | [Output Only] Status of the zone, either UP or DOWN. +zStatus :: Lens' Zone (Maybe Text) +zStatus = lens _zStatus (\ s a -> s{_zStatus = a}) + +-- | [Output Only] Any scheduled maintenance windows for this zone. When the +-- zone is in a maintenance window, all resources which reside in the zone +-- will be unavailable. For more information, see Maintenance Windows +zMaintenanceWindows :: Lens' Zone [ZoneMaintenanceWindowsItem] +zMaintenanceWindows + = lens _zMaintenanceWindows + (\ s a -> s{_zMaintenanceWindows = a}) + . _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always kind#zone for zones. +zKind :: Lens' Zone Text +zKind = lens _zKind (\ s a -> s{_zKind = a}) + +-- | [Output Only] Server-defined URL for the resource. +zSelfLink :: Lens' Zone (Maybe Text) +zSelfLink + = lens _zSelfLink (\ s a -> s{_zSelfLink = a}) + +-- | [Output Only] Name of the resource. +zName :: Lens' Zone (Maybe Text) +zName = lens _zName (\ s a -> s{_zName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +zCreationTimestamp :: Lens' Zone (Maybe Text) +zCreationTimestamp + = lens _zCreationTimestamp + (\ s a -> s{_zCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +zId :: Lens' Zone (Maybe Word64) +zId = lens _zId (\ s a -> s{_zId = a}) + +-- | [Output Only] Full URL reference to the region which hosts the zone. +zRegion :: Lens' Zone (Maybe Text) +zRegion = lens _zRegion (\ s a -> s{_zRegion = a}) + +-- | [Output Only] Textual description of the resource. +zDescription :: Lens' Zone (Maybe Text) +zDescription + = lens _zDescription (\ s a -> s{_zDescription = a}) + +-- | [Output Only] The deprecation status associated with this zone. +zDeprecated :: Lens' Zone (Maybe (Maybe DeprecationStatus)) +zDeprecated + = lens _zDeprecated (\ s a -> s{_zDeprecated = a}) + +instance FromJSON Zone where + parseJSON + = withObject "Zone" + (\ o -> + Zone <$> + (o .:? "status") <*> + (o .:? "maintenanceWindows" .!= mempty) + <*> (o .:? "kind" .!= "compute#zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "region") + <*> (o .:? "description") + <*> (o .:? "deprecated")) + +instance ToJSON Zone where + toJSON Zone{..} + = object + (catMaybes + [("status" .=) <$> _zStatus, + ("maintenanceWindows" .=) <$> _zMaintenanceWindows, + Just ("kind" .= _zKind), + ("selfLink" .=) <$> _zSelfLink, + ("name" .=) <$> _zName, + ("creationTimestamp" .=) <$> _zCreationTimestamp, + ("id" .=) <$> _zId, ("region" .=) <$> _zRegion, + ("description" .=) <$> _zDescription, + ("deprecated" .=) <$> _zDeprecated]) + +-- +-- /See:/ 'instanceGroupManagersRecreateInstancesRequest' smart constructor. +newtype InstanceGroupManagersRecreateInstancesRequest = InstanceGroupManagersRecreateInstancesRequest + { _igmrirInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersRecreateInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmrirInstances' +instanceGroupManagersRecreateInstancesRequest + :: InstanceGroupManagersRecreateInstancesRequest +instanceGroupManagersRecreateInstancesRequest = + InstanceGroupManagersRecreateInstancesRequest + { _igmrirInstances = Nothing + } + +-- | The names of one or more instances to recreate. +igmrirInstances :: Lens' InstanceGroupManagersRecreateInstancesRequest [Text] +igmrirInstances + = lens _igmrirInstances + (\ s a -> s{_igmrirInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersRecreateInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersRecreateInstancesRequest" + (\ o -> + InstanceGroupManagersRecreateInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersRecreateInstancesRequest where + toJSON + InstanceGroupManagersRecreateInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmrirInstances]) + +-- | A network resource. +-- +-- /See:/ 'network' smart constructor. +data Network = Network + { _nKind :: !Text + , _nIPv4Range :: !(Maybe Text) + , _nSelfLink :: !(Maybe Text) + , _nName :: !(Maybe Text) + , _nCreationTimestamp :: !(Maybe Text) + , _nId :: !(Maybe Word64) + , _nGatewayIPv4 :: !(Maybe Text) + , _nDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Network' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nKind' +-- +-- * 'nIPv4Range' +-- +-- * 'nSelfLink' +-- +-- * 'nName' +-- +-- * 'nCreationTimestamp' +-- +-- * 'nId' +-- +-- * 'nGatewayIPv4' +-- +-- * 'nDescription' +network + :: Network +network = + Network + { _nKind = "compute#network" + , _nIPv4Range = Nothing + , _nSelfLink = Nothing + , _nName = Nothing + , _nCreationTimestamp = Nothing + , _nId = Nothing + , _nGatewayIPv4 = Nothing + , _nDescription = Nothing + } + +-- | [Output Only] Type of the resource. Always compute#network for networks. +nKind :: Lens' Network Text +nKind = lens _nKind (\ s a -> s{_nKind = a}) + +-- | The range of internal addresses that are legal on this network. This +-- range is a CIDR specification, for example: 192.168.0.0\/16. Provided by +-- the client when the network is created. +nIPv4Range :: Lens' Network (Maybe Text) +nIPv4Range + = lens _nIPv4Range (\ s a -> s{_nIPv4Range = a}) + +-- | [Output Only] Server-defined URL for the resource. +nSelfLink :: Lens' Network (Maybe Text) +nSelfLink + = lens _nSelfLink (\ s a -> s{_nSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +nName :: Lens' Network (Maybe Text) +nName = lens _nName (\ s a -> s{_nName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +nCreationTimestamp :: Lens' Network (Maybe Text) +nCreationTimestamp + = lens _nCreationTimestamp + (\ s a -> s{_nCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +nId :: Lens' Network (Maybe Word64) +nId = lens _nId (\ s a -> s{_nId = a}) + +-- | A gateway address for default routing to other networks. This value is +-- read only and is selected by the Google Compute Engine, typically as the +-- first usable address in the IPv4Range. +nGatewayIPv4 :: Lens' Network (Maybe Text) +nGatewayIPv4 + = lens _nGatewayIPv4 (\ s a -> s{_nGatewayIPv4 = a}) + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +nDescription :: Lens' Network (Maybe Text) +nDescription + = lens _nDescription (\ s a -> s{_nDescription = a}) + +instance FromJSON Network where + parseJSON + = withObject "Network" + (\ o -> + Network <$> + (o .:? "kind" .!= "compute#network") <*> + (o .:? "IPv4Range") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "gatewayIPv4") + <*> (o .:? "description")) + +instance ToJSON Network where + toJSON Network{..} + = object + (catMaybes + [Just ("kind" .= _nKind), + ("IPv4Range" .=) <$> _nIPv4Range, + ("selfLink" .=) <$> _nSelfLink, + ("name" .=) <$> _nName, + ("creationTimestamp" .=) <$> _nCreationTimestamp, + ("id" .=) <$> _nId, + ("gatewayIPv4" .=) <$> _nGatewayIPv4, + ("description" .=) <$> _nDescription]) + +-- | The route resource. A Route is a rule that specifies how certain packets +-- should be handled by the virtual network. Routes are associated with +-- instances by tag and the set of Routes for a particular instance is +-- called its routing table. For each packet leaving a instance, the system +-- searches that instance\'s routing table for a single best matching +-- Route. Routes match packets by destination IP address, preferring +-- smaller or more specific ranges over larger ones. If there is a tie, the +-- system selects the Route with the smallest priority value. If there is +-- still a tie, it uses the layer three and four packet headers to select +-- just one of the remaining matching Routes. The packet is then forwarded +-- as specified by the nextHop field of the winning Route -- either to +-- another instance destination, a instance gateway or a Google Compute +-- Engien-operated gateway. Packets that do not match any Route in the +-- sending instance\'s routing table are dropped. +-- +-- /See:/ 'route' smart constructor. +data Route = Route + { _rPriority :: !(Maybe Word32) + , _rKind :: !Text + , _rNextHopGateway :: !(Maybe Text) + , _rNextHopNetwork :: !(Maybe Text) + , _rNetwork :: !(Maybe Text) + , _rWarnings :: !(Maybe [RouteWarningsItem]) + , _rNextHopIp :: !(Maybe Text) + , _rDestRange :: !(Maybe Text) + , _rSelfLink :: !(Maybe Text) + , _rName :: !(Maybe Text) + , _rCreationTimestamp :: !(Maybe Text) + , _rId :: !(Maybe Word64) + , _rNextHopVpnTunnel :: !(Maybe Text) + , _rDescription :: !(Maybe Text) + , _rTags :: !(Maybe [Text]) + , _rNextHopInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Route' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rPriority' +-- +-- * 'rKind' +-- +-- * 'rNextHopGateway' +-- +-- * 'rNextHopNetwork' +-- +-- * 'rNetwork' +-- +-- * 'rWarnings' +-- +-- * 'rNextHopIp' +-- +-- * 'rDestRange' +-- +-- * 'rSelfLink' +-- +-- * 'rName' +-- +-- * 'rCreationTimestamp' +-- +-- * 'rId' +-- +-- * 'rNextHopVpnTunnel' +-- +-- * 'rDescription' +-- +-- * 'rTags' +-- +-- * 'rNextHopInstance' +route + :: Route +route = + Route + { _rPriority = Nothing + , _rKind = "compute#route" + , _rNextHopGateway = Nothing + , _rNextHopNetwork = Nothing + , _rNetwork = Nothing + , _rWarnings = Nothing + , _rNextHopIp = Nothing + , _rDestRange = Nothing + , _rSelfLink = Nothing + , _rName = Nothing + , _rCreationTimestamp = Nothing + , _rId = Nothing + , _rNextHopVpnTunnel = Nothing + , _rDescription = Nothing + , _rTags = Nothing + , _rNextHopInstance = Nothing + } + +-- | Breaks ties between Routes of equal specificity. Routes with smaller +-- values win when tied with routes with larger values. Default value is +-- 1000. A valid range is between 0 and 65535. +rPriority :: Lens' Route (Maybe Word32) +rPriority + = lens _rPriority (\ s a -> s{_rPriority = a}) + +-- | [Output Only] Type of this resource. Always compute#routes for Route +-- resources. +rKind :: Lens' Route Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The URL to a gateway that should handle matching packets. Currently, +-- this is only the internet gateway: +-- projects\/\/global\/gateways\/default-internet-gateway +rNextHopGateway :: Lens' Route (Maybe Text) +rNextHopGateway + = lens _rNextHopGateway + (\ s a -> s{_rNextHopGateway = a}) + +-- | The URL of the local network if it should handle matching packets. +rNextHopNetwork :: Lens' Route (Maybe Text) +rNextHopNetwork + = lens _rNextHopNetwork + (\ s a -> s{_rNextHopNetwork = a}) + +-- | Fully-qualified URL of the network that this route applies to. +rNetwork :: Lens' Route (Maybe Text) +rNetwork = lens _rNetwork (\ s a -> s{_rNetwork = a}) + +-- | [Output Only] If potential misconfigurations are detected for this +-- route, this field will be populated with warning messages. +rWarnings :: Lens' Route [RouteWarningsItem] +rWarnings + = lens _rWarnings (\ s a -> s{_rWarnings = a}) . + _Default + . _Coerce + +-- | The network IP address of an instance that should handle matching +-- packets. +rNextHopIp :: Lens' Route (Maybe Text) +rNextHopIp + = lens _rNextHopIp (\ s a -> s{_rNextHopIp = a}) + +-- | The destination range of outgoing packets that this route applies to. +rDestRange :: Lens' Route (Maybe Text) +rDestRange + = lens _rDestRange (\ s a -> s{_rDestRange = a}) + +-- | [Output Only] Server-defined fully-qualified URL for this resource. +rSelfLink :: Lens' Route (Maybe Text) +rSelfLink + = lens _rSelfLink (\ s a -> s{_rSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +rName :: Lens' Route (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +rCreationTimestamp :: Lens' Route (Maybe Text) +rCreationTimestamp + = lens _rCreationTimestamp + (\ s a -> s{_rCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +rId :: Lens' Route (Maybe Word64) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | The URL to a VpnTunnel that should handle matching packets. +rNextHopVpnTunnel :: Lens' Route (Maybe Text) +rNextHopVpnTunnel + = lens _rNextHopVpnTunnel + (\ s a -> s{_rNextHopVpnTunnel = a}) + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +rDescription :: Lens' Route (Maybe Text) +rDescription + = lens _rDescription (\ s a -> s{_rDescription = a}) + +-- | A list of instance tags to which this route applies. +rTags :: Lens' Route [Text] +rTags + = lens _rTags (\ s a -> s{_rTags = a}) . _Default . + _Coerce + +-- | The fully-qualified URL to an instance that should handle matching +-- packets. For example: +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/ +rNextHopInstance :: Lens' Route (Maybe Text) +rNextHopInstance + = lens _rNextHopInstance + (\ s a -> s{_rNextHopInstance = a}) + +instance FromJSON Route where + parseJSON + = withObject "Route" + (\ o -> + Route <$> + (o .:? "priority") <*> + (o .:? "kind" .!= "compute#route") + <*> (o .:? "nextHopGateway") + <*> (o .:? "nextHopNetwork") + <*> (o .:? "network") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "nextHopIp") + <*> (o .:? "destRange") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "nextHopVpnTunnel") + <*> (o .:? "description") + <*> (o .:? "tags" .!= mempty) + <*> (o .:? "nextHopInstance")) + +instance ToJSON Route where + toJSON Route{..} + = object + (catMaybes + [("priority" .=) <$> _rPriority, + Just ("kind" .= _rKind), + ("nextHopGateway" .=) <$> _rNextHopGateway, + ("nextHopNetwork" .=) <$> _rNextHopNetwork, + ("network" .=) <$> _rNetwork, + ("warnings" .=) <$> _rWarnings, + ("nextHopIp" .=) <$> _rNextHopIp, + ("destRange" .=) <$> _rDestRange, + ("selfLink" .=) <$> _rSelfLink, + ("name" .=) <$> _rName, + ("creationTimestamp" .=) <$> _rCreationTimestamp, + ("id" .=) <$> _rId, + ("nextHopVpnTunnel" .=) <$> _rNextHopVpnTunnel, + ("description" .=) <$> _rDescription, + ("tags" .=) <$> _rTags, + ("nextHopInstance" .=) <$> _rNextHopInstance]) + +-- | An Instance Template resource. +-- +-- /See:/ 'instanceTemplate' smart constructor. +data InstanceTemplate = InstanceTemplate + { _itKind :: !Text + , _itSelfLink :: !(Maybe Text) + , _itName :: !(Maybe Text) + , _itCreationTimestamp :: !(Maybe Text) + , _itId :: !(Maybe Word64) + , _itDescription :: !(Maybe Text) + , _itProperties :: !(Maybe (Maybe InstanceProperties)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itKind' +-- +-- * 'itSelfLink' +-- +-- * 'itName' +-- +-- * 'itCreationTimestamp' +-- +-- * 'itId' +-- +-- * 'itDescription' +-- +-- * 'itProperties' +instanceTemplate + :: InstanceTemplate +instanceTemplate = + InstanceTemplate + { _itKind = "compute#instanceTemplate" + , _itSelfLink = Nothing + , _itName = Nothing + , _itCreationTimestamp = Nothing + , _itId = Nothing + , _itDescription = Nothing + , _itProperties = Nothing + } + +-- | [Output Only] The resource type, which is always +-- compute#instanceTemplate for instance templates. +itKind :: Lens' InstanceTemplate Text +itKind = lens _itKind (\ s a -> s{_itKind = a}) + +-- | [Output Only] The URL for this instance template. The server defines +-- this URL. +itSelfLink :: Lens' InstanceTemplate (Maybe Text) +itSelfLink + = lens _itSelfLink (\ s a -> s{_itSelfLink = a}) + +-- | The name of the instance template. The name must be 1-63 characters +-- long, and comply with RFC1035. +itName :: Lens' InstanceTemplate (Maybe Text) +itName = lens _itName (\ s a -> s{_itName = a}) + +-- | [Output Only] The creation timestamp for this instance template in +-- RFC3339 text format. +itCreationTimestamp :: Lens' InstanceTemplate (Maybe Text) +itCreationTimestamp + = lens _itCreationTimestamp + (\ s a -> s{_itCreationTimestamp = a}) + +-- | [Output Only] A unique identifier for this instance template. The server +-- defines this identifier. +itId :: Lens' InstanceTemplate (Maybe Word64) +itId = lens _itId (\ s a -> s{_itId = a}) + +-- | An optional text description for the instance template. +itDescription :: Lens' InstanceTemplate (Maybe Text) +itDescription + = lens _itDescription + (\ s a -> s{_itDescription = a}) + +-- | The instance properties for the instance template resource. +itProperties :: Lens' InstanceTemplate (Maybe (Maybe InstanceProperties)) +itProperties + = lens _itProperties (\ s a -> s{_itProperties = a}) + +instance FromJSON InstanceTemplate where + parseJSON + = withObject "InstanceTemplate" + (\ o -> + InstanceTemplate <$> + (o .:? "kind" .!= "compute#instanceTemplate") <*> + (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "properties")) + +instance ToJSON InstanceTemplate where + toJSON InstanceTemplate{..} + = object + (catMaybes + [Just ("kind" .= _itKind), + ("selfLink" .=) <$> _itSelfLink, + ("name" .=) <$> _itName, + ("creationTimestamp" .=) <$> _itCreationTimestamp, + ("id" .=) <$> _itId, + ("description" .=) <$> _itDescription, + ("properties" .=) <$> _itProperties]) + +-- +-- /See:/ 'healthCheckReference' smart constructor. +newtype HealthCheckReference = HealthCheckReference + { _hcrHealthCheck :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HealthCheckReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hcrHealthCheck' +healthCheckReference + :: HealthCheckReference +healthCheckReference = + HealthCheckReference + { _hcrHealthCheck = Nothing + } + +hcrHealthCheck :: Lens' HealthCheckReference (Maybe Text) +hcrHealthCheck + = lens _hcrHealthCheck + (\ s a -> s{_hcrHealthCheck = a}) + +instance FromJSON HealthCheckReference where + parseJSON + = withObject "HealthCheckReference" + (\ o -> + HealthCheckReference <$> (o .:? "healthCheck")) + +instance ToJSON HealthCheckReference where + toJSON HealthCheckReference{..} + = object + (catMaybes [("healthCheck" .=) <$> _hcrHealthCheck]) + +-- +-- /See:/ 'uRLMapsValidateResponse' smart constructor. +newtype URLMapsValidateResponse = URLMapsValidateResponse + { _umvrResult :: Maybe (Maybe URLMapValidationResult) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsValidateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umvrResult' +uRLMapsValidateResponse + :: URLMapsValidateResponse +uRLMapsValidateResponse = + URLMapsValidateResponse + { _umvrResult = Nothing + } + +umvrResult :: Lens' URLMapsValidateResponse (Maybe (Maybe URLMapValidationResult)) +umvrResult + = lens _umvrResult (\ s a -> s{_umvrResult = a}) + +instance FromJSON URLMapsValidateResponse where + parseJSON + = withObject "URLMapsValidateResponse" + (\ o -> URLMapsValidateResponse <$> (o .:? "result")) + +instance ToJSON URLMapsValidateResponse where + toJSON URLMapsValidateResponse{..} + = object (catMaybes [("result" .=) <$> _umvrResult]) + +-- +-- /See:/ 'instanceGroupAggregatedList' smart constructor. +data InstanceGroupAggregatedList = InstanceGroupAggregatedList + { _igalNextPageToken :: !(Maybe Text) + , _igalKind :: !Text + , _igalItems :: !(Maybe InstanceGroupAggregatedListItems) + , _igalSelfLink :: !(Maybe Text) + , _igalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igalNextPageToken' +-- +-- * 'igalKind' +-- +-- * 'igalItems' +-- +-- * 'igalSelfLink' +-- +-- * 'igalId' +instanceGroupAggregatedList + :: InstanceGroupAggregatedList +instanceGroupAggregatedList = + InstanceGroupAggregatedList + { _igalNextPageToken = Nothing + , _igalKind = "compute#instanceGroupAggregatedList" + , _igalItems = Nothing + , _igalSelfLink = Nothing + , _igalId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +igalNextPageToken :: Lens' InstanceGroupAggregatedList (Maybe Text) +igalNextPageToken + = lens _igalNextPageToken + (\ s a -> s{_igalNextPageToken = a}) + +-- | [Output Only] The resource type, which is always +-- compute#instanceGroupAggregatedList for aggregated lists of instance +-- groups. +igalKind :: Lens' InstanceGroupAggregatedList Text +igalKind = lens _igalKind (\ s a -> s{_igalKind = a}) + +-- | A map of scoped instance group lists. +igalItems :: Lens' InstanceGroupAggregatedList (Maybe InstanceGroupAggregatedListItems) +igalItems + = lens _igalItems (\ s a -> s{_igalItems = a}) + +-- | [Output Only] A unique identifier for this aggregated list of instance +-- groups. The server defines this identifier. +igalSelfLink :: Lens' InstanceGroupAggregatedList (Maybe Text) +igalSelfLink + = lens _igalSelfLink (\ s a -> s{_igalSelfLink = a}) + +-- | [Output Only] A unique identifier for this aggregated list of instance +-- groups. The server defines this identifier. +igalId :: Lens' InstanceGroupAggregatedList (Maybe Text) +igalId = lens _igalId (\ s a -> s{_igalId = a}) + +instance FromJSON InstanceGroupAggregatedList where + parseJSON + = withObject "InstanceGroupAggregatedList" + (\ o -> + InstanceGroupAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#instanceGroupAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupAggregatedList where + toJSON InstanceGroupAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _igalNextPageToken, + Just ("kind" .= _igalKind), + ("items" .=) <$> _igalItems, + ("selfLink" .=) <$> _igalSelfLink, + ("id" .=) <$> _igalId]) + +-- +-- /See:/ 'targetVPNGateway' smart constructor. +data TargetVPNGateway = TargetVPNGateway + { _tvgStatus :: !(Maybe Text) + , _tvgKind :: !Text + , _tvgNetwork :: !(Maybe Text) + , _tvgSelfLink :: !(Maybe Text) + , _tvgName :: !(Maybe Text) + , _tvgCreationTimestamp :: !(Maybe Text) + , _tvgId :: !(Maybe Word64) + , _tvgRegion :: !(Maybe Text) + , _tvgTunnels :: !(Maybe [Text]) + , _tvgDescription :: !(Maybe Text) + , _tvgForwardingRules :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGateway' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgStatus' +-- +-- * 'tvgKind' +-- +-- * 'tvgNetwork' +-- +-- * 'tvgSelfLink' +-- +-- * 'tvgName' +-- +-- * 'tvgCreationTimestamp' +-- +-- * 'tvgId' +-- +-- * 'tvgRegion' +-- +-- * 'tvgTunnels' +-- +-- * 'tvgDescription' +-- +-- * 'tvgForwardingRules' +targetVPNGateway + :: TargetVPNGateway +targetVPNGateway = + TargetVPNGateway + { _tvgStatus = Nothing + , _tvgKind = "compute#targetVpnGateway" + , _tvgNetwork = Nothing + , _tvgSelfLink = Nothing + , _tvgName = Nothing + , _tvgCreationTimestamp = Nothing + , _tvgId = Nothing + , _tvgRegion = Nothing + , _tvgTunnels = Nothing + , _tvgDescription = Nothing + , _tvgForwardingRules = Nothing + } + +-- | [Output Only] The status of the VPN gateway. +tvgStatus :: Lens' TargetVPNGateway (Maybe Text) +tvgStatus + = lens _tvgStatus (\ s a -> s{_tvgStatus = a}) + +-- | [Output Only] Type of resource. Always compute#targetVpnGateway for +-- target VPN gateways. +tvgKind :: Lens' TargetVPNGateway Text +tvgKind = lens _tvgKind (\ s a -> s{_tvgKind = a}) + +-- | URL of the network to which this VPN gateway is attached. Provided by +-- the client when the VPN gateway is created. +tvgNetwork :: Lens' TargetVPNGateway (Maybe Text) +tvgNetwork + = lens _tvgNetwork (\ s a -> s{_tvgNetwork = a}) + +-- | [Output Only] Server-defined URL for the resource. +tvgSelfLink :: Lens' TargetVPNGateway (Maybe Text) +tvgSelfLink + = lens _tvgSelfLink (\ s a -> s{_tvgSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +tvgName :: Lens' TargetVPNGateway (Maybe Text) +tvgName = lens _tvgName (\ s a -> s{_tvgName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +tvgCreationTimestamp :: Lens' TargetVPNGateway (Maybe Text) +tvgCreationTimestamp + = lens _tvgCreationTimestamp + (\ s a -> s{_tvgCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +tvgId :: Lens' TargetVPNGateway (Maybe Word64) +tvgId = lens _tvgId (\ s a -> s{_tvgId = a}) + +-- | [Output Only] URL of the region where the target VPN gateway resides. +tvgRegion :: Lens' TargetVPNGateway (Maybe Text) +tvgRegion + = lens _tvgRegion (\ s a -> s{_tvgRegion = a}) + +-- | [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are +-- created using compute.vpntunnels.insert and associated to a VPN gateway. +tvgTunnels :: Lens' TargetVPNGateway [Text] +tvgTunnels + = lens _tvgTunnels (\ s a -> s{_tvgTunnels = a}) . + _Default + . _Coerce + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +tvgDescription :: Lens' TargetVPNGateway (Maybe Text) +tvgDescription + = lens _tvgDescription + (\ s a -> s{_tvgDescription = a}) + +-- | [Output Only] A list of URLs to the ForwardingRule resources. +-- ForwardingRules are created using compute.forwardingRules.insert and +-- associated to a VPN gateway. +tvgForwardingRules :: Lens' TargetVPNGateway [Text] +tvgForwardingRules + = lens _tvgForwardingRules + (\ s a -> s{_tvgForwardingRules = a}) + . _Default + . _Coerce + +instance FromJSON TargetVPNGateway where + parseJSON + = withObject "TargetVPNGateway" + (\ o -> + TargetVPNGateway <$> + (o .:? "status") <*> + (o .:? "kind" .!= "compute#targetVpnGateway") + <*> (o .:? "network") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "region") + <*> (o .:? "tunnels" .!= mempty) + <*> (o .:? "description") + <*> (o .:? "forwardingRules" .!= mempty)) + +instance ToJSON TargetVPNGateway where + toJSON TargetVPNGateway{..} + = object + (catMaybes + [("status" .=) <$> _tvgStatus, + Just ("kind" .= _tvgKind), + ("network" .=) <$> _tvgNetwork, + ("selfLink" .=) <$> _tvgSelfLink, + ("name" .=) <$> _tvgName, + ("creationTimestamp" .=) <$> _tvgCreationTimestamp, + ("id" .=) <$> _tvgId, ("region" .=) <$> _tvgRegion, + ("tunnels" .=) <$> _tvgTunnels, + ("description" .=) <$> _tvgDescription, + ("forwardingRules" .=) <$> _tvgForwardingRules]) + +-- | The location in Cloud Storage and naming method of the daily usage +-- report. Contains bucket_name and report_name prefix. +-- +-- /See:/ 'usageExportLocation' smart constructor. +data UsageExportLocation = UsageExportLocation + { _uelReportNamePrefix :: !(Maybe Text) + , _uelBucketName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsageExportLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uelReportNamePrefix' +-- +-- * 'uelBucketName' +usageExportLocation + :: UsageExportLocation +usageExportLocation = + UsageExportLocation + { _uelReportNamePrefix = Nothing + , _uelBucketName = Nothing + } + +-- | An optional prefix for the name of the usage report object stored in +-- bucketName. If not supplied, defaults to usage. The report is stored as +-- a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is +-- the day of the usage according to Pacific Time. If you supply a prefix, +-- it should conform to Cloud Storage object naming conventions. +uelReportNamePrefix :: Lens' UsageExportLocation (Maybe Text) +uelReportNamePrefix + = lens _uelReportNamePrefix + (\ s a -> s{_uelReportNamePrefix = a}) + +-- | The name of an existing bucket in Cloud Storage where the usage report +-- object is stored. The Google Service Account is granted write access to +-- this bucket. This is just the bucket name, with no gs:\/\/ or +-- https:\/\/storage.googleapis.com\/ in front of it. +uelBucketName :: Lens' UsageExportLocation (Maybe Text) +uelBucketName + = lens _uelBucketName + (\ s a -> s{_uelBucketName = a}) + +instance FromJSON UsageExportLocation where + parseJSON + = withObject "UsageExportLocation" + (\ o -> + UsageExportLocation <$> + (o .:? "reportNamePrefix") <*> (o .:? "bucketName")) + +instance ToJSON UsageExportLocation where + toJSON UsageExportLocation{..} + = object + (catMaybes + [("reportNamePrefix" .=) <$> _uelReportNamePrefix, + ("bucketName" .=) <$> _uelBucketName]) + +-- +-- /See:/ 'instanceGroupManagersDeleteInstancesRequest' smart constructor. +newtype InstanceGroupManagersDeleteInstancesRequest = InstanceGroupManagersDeleteInstancesRequest + { _igmdirInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDeleteInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdirInstances' +instanceGroupManagersDeleteInstancesRequest + :: InstanceGroupManagersDeleteInstancesRequest +instanceGroupManagersDeleteInstancesRequest = + InstanceGroupManagersDeleteInstancesRequest + { _igmdirInstances = Nothing + } + +-- | The names of one or more instances to delete. +igmdirInstances :: Lens' InstanceGroupManagersDeleteInstancesRequest [Text] +igmdirInstances + = lens _igmdirInstances + (\ s a -> s{_igmdirInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersDeleteInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersDeleteInstancesRequest" + (\ o -> + InstanceGroupManagersDeleteInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersDeleteInstancesRequest where + toJSON + InstanceGroupManagersDeleteInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmdirInstances]) + +-- +-- /See:/ 'managedInstance' smart constructor. +data ManagedInstance = ManagedInstance + { _miLastAttempt :: !(Maybe (Maybe ManagedInstanceLastAttempt)) + , _miCurrentAction :: !(Maybe Text) + , _miId :: !(Maybe Word64) + , _miInstanceStatus :: !(Maybe Text) + , _miInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedInstance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miLastAttempt' +-- +-- * 'miCurrentAction' +-- +-- * 'miId' +-- +-- * 'miInstanceStatus' +-- +-- * 'miInstance' +managedInstance + :: ManagedInstance +managedInstance = + ManagedInstance + { _miLastAttempt = Nothing + , _miCurrentAction = Nothing + , _miId = Nothing + , _miInstanceStatus = Nothing + , _miInstance = Nothing + } + +-- | Information about the last attempt to create or delete the instance. +miLastAttempt :: Lens' ManagedInstance (Maybe (Maybe ManagedInstanceLastAttempt)) +miLastAttempt + = lens _miLastAttempt + (\ s a -> s{_miLastAttempt = a}) + +-- | The current action that the managed instance group has scheduled for the +-- instance. +miCurrentAction :: Lens' ManagedInstance (Maybe Text) +miCurrentAction + = lens _miCurrentAction + (\ s a -> s{_miCurrentAction = a}) + +-- | The unique identifier for this resource (empty when instance does not +-- exist). +miId :: Lens' ManagedInstance (Maybe Word64) +miId = lens _miId (\ s a -> s{_miId = a}) + +-- | The status of the instance (empty when instance does not exist). +miInstanceStatus :: Lens' ManagedInstance (Maybe Text) +miInstanceStatus + = lens _miInstanceStatus + (\ s a -> s{_miInstanceStatus = a}) + +-- | The URL of the instance (set even though instance does not exist yet). +miInstance :: Lens' ManagedInstance (Maybe Text) +miInstance + = lens _miInstance (\ s a -> s{_miInstance = a}) + +instance FromJSON ManagedInstance where + parseJSON + = withObject "ManagedInstance" + (\ o -> + ManagedInstance <$> + (o .:? "lastAttempt") <*> (o .:? "currentAction") <*> + (o .:? "id") + <*> (o .:? "instanceStatus") + <*> (o .:? "instance")) + +instance ToJSON ManagedInstance where + toJSON ManagedInstance{..} + = object + (catMaybes + [("lastAttempt" .=) <$> _miLastAttempt, + ("currentAction" .=) <$> _miCurrentAction, + ("id" .=) <$> _miId, + ("instanceStatus" .=) <$> _miInstanceStatus, + ("instance" .=) <$> _miInstance]) + +-- +-- /See:/ 'instanceGroupsListInstancesRequest' smart constructor. +newtype InstanceGroupsListInstancesRequest = InstanceGroupsListInstancesRequest + { _iglirInstanceState :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsListInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iglirInstanceState' +instanceGroupsListInstancesRequest + :: InstanceGroupsListInstancesRequest +instanceGroupsListInstancesRequest = + InstanceGroupsListInstancesRequest + { _iglirInstanceState = Nothing + } + +-- | A filter for the state of the instances in the instance group. Valid +-- options are ALL or RUNNING. If you do not specify this parameter the +-- list includes all instances regardless of their state. +iglirInstanceState :: Lens' InstanceGroupsListInstancesRequest (Maybe Text) +iglirInstanceState + = lens _iglirInstanceState + (\ s a -> s{_iglirInstanceState = a}) + +instance FromJSON InstanceGroupsListInstancesRequest + where + parseJSON + = withObject "InstanceGroupsListInstancesRequest" + (\ o -> + InstanceGroupsListInstancesRequest <$> + (o .:? "instanceState")) + +instance ToJSON InstanceGroupsListInstancesRequest + where + toJSON InstanceGroupsListInstancesRequest{..} + = object + (catMaybes + [("instanceState" .=) <$> _iglirInstanceState]) + +-- | Contains a list of address resources. +-- +-- /See:/ 'addressList' smart constructor. +data AddressList = AddressList + { _alNextPageToken :: !(Maybe Text) + , _alKind :: !Text + , _alItems :: !(Maybe [Maybe Address]) + , _alSelfLink :: !(Maybe Text) + , _alId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alNextPageToken' +-- +-- * 'alKind' +-- +-- * 'alItems' +-- +-- * 'alSelfLink' +-- +-- * 'alId' +addressList + :: AddressList +addressList = + AddressList + { _alNextPageToken = Nothing + , _alKind = "compute#addressList" + , _alItems = Nothing + , _alSelfLink = Nothing + , _alId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +alNextPageToken :: Lens' AddressList (Maybe Text) +alNextPageToken + = lens _alNextPageToken + (\ s a -> s{_alNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#addressList for lists of +-- addresses. +alKind :: Lens' AddressList Text +alKind = lens _alKind (\ s a -> s{_alKind = a}) + +-- | [Output Only] A list of Address resources. +alItems :: Lens' AddressList [Maybe Address] +alItems + = lens _alItems (\ s a -> s{_alItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for the resource. +alSelfLink :: Lens' AddressList (Maybe Text) +alSelfLink + = lens _alSelfLink (\ s a -> s{_alSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +alId :: Lens' AddressList (Maybe Text) +alId = lens _alId (\ s a -> s{_alId = a}) + +instance FromJSON AddressList where + parseJSON + = withObject "AddressList" + (\ o -> + AddressList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#addressList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON AddressList where + toJSON AddressList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _alNextPageToken, + Just ("kind" .= _alKind), ("items" .=) <$> _alItems, + ("selfLink" .=) <$> _alSelfLink, + ("id" .=) <$> _alId]) + +-- | Contains a list of zone resources. +-- +-- /See:/ 'zoneList' smart constructor. +data ZoneList = ZoneList + { _zlNextPageToken :: !(Maybe Text) + , _zlKind :: !Text + , _zlItems :: !(Maybe [Maybe Zone]) + , _zlSelfLink :: !(Maybe Text) + , _zlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zlNextPageToken' +-- +-- * 'zlKind' +-- +-- * 'zlItems' +-- +-- * 'zlSelfLink' +-- +-- * 'zlId' +zoneList + :: ZoneList +zoneList = + ZoneList + { _zlNextPageToken = Nothing + , _zlKind = "compute#zoneList" + , _zlItems = Nothing + , _zlSelfLink = Nothing + , _zlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +zlNextPageToken :: Lens' ZoneList (Maybe Text) +zlNextPageToken + = lens _zlNextPageToken + (\ s a -> s{_zlNextPageToken = a}) + +-- | Type of resource. +zlKind :: Lens' ZoneList Text +zlKind = lens _zlKind (\ s a -> s{_zlKind = a}) + +-- | [Output Only] A list of Zone resources. +zlItems :: Lens' ZoneList [Maybe Zone] +zlItems + = lens _zlItems (\ s a -> s{_zlItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +zlSelfLink :: Lens' ZoneList (Maybe Text) +zlSelfLink + = lens _zlSelfLink (\ s a -> s{_zlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +zlId :: Lens' ZoneList (Maybe Text) +zlId = lens _zlId (\ s a -> s{_zlId = a}) + +instance FromJSON ZoneList where + parseJSON + = withObject "ZoneList" + (\ o -> + ZoneList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#zoneList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ZoneList where + toJSON ZoneList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _zlNextPageToken, + Just ("kind" .= _zlKind), ("items" .=) <$> _zlItems, + ("selfLink" .=) <$> _zlSelfLink, + ("id" .=) <$> _zlId]) + +-- +-- /See:/ 'instanceGroupManagerActionsSummary' smart constructor. +data InstanceGroupManagerActionsSummary = InstanceGroupManagerActionsSummary + { _igmasDeleting :: !(Maybe Int32) + , _igmasRestarting :: !(Maybe Int32) + , _igmasNone :: !(Maybe Int32) + , _igmasCreating :: !(Maybe Int32) + , _igmasRefreshing :: !(Maybe Int32) + , _igmasRecreating :: !(Maybe Int32) + , _igmasAbandoning :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagerActionsSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmasDeleting' +-- +-- * 'igmasRestarting' +-- +-- * 'igmasNone' +-- +-- * 'igmasCreating' +-- +-- * 'igmasRefreshing' +-- +-- * 'igmasRecreating' +-- +-- * 'igmasAbandoning' +instanceGroupManagerActionsSummary + :: InstanceGroupManagerActionsSummary +instanceGroupManagerActionsSummary = + InstanceGroupManagerActionsSummary + { _igmasDeleting = Nothing + , _igmasRestarting = Nothing + , _igmasNone = Nothing + , _igmasCreating = Nothing + , _igmasRefreshing = Nothing + , _igmasRecreating = Nothing + , _igmasAbandoning = Nothing + } + +-- | [Output Only] The number of instances in the managed instance group that +-- are scheduled to be deleted or are currently being deleted. +igmasDeleting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasDeleting + = lens _igmasDeleting + (\ s a -> s{_igmasDeleting = a}) + +-- | [Output Only] The number of instances in the managed instance group that +-- are scheduled to be restarted or are currently being restarted. +igmasRestarting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasRestarting + = lens _igmasRestarting + (\ s a -> s{_igmasRestarting = a}) + +-- | [Output Only] The number of instances in the managed instance group that +-- currently have no scheduled actions. +igmasNone :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasNone + = lens _igmasNone (\ s a -> s{_igmasNone = a}) + +-- | [Output Only] The number of instances in the managed instance group that +-- are scheduled to be created or are currently being created. +igmasCreating :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasCreating + = lens _igmasCreating + (\ s a -> s{_igmasCreating = a}) + +-- | [Output Only] The number of instances in the managed instance group that +-- are being reconfigured with properties that do not require a restart or +-- a recreate action. For example, setting or removing target pools for the +-- instance. +igmasRefreshing :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasRefreshing + = lens _igmasRefreshing + (\ s a -> s{_igmasRefreshing = a}) + +-- | [Output Only] The number of instances in the managed instance group that +-- are scheduled to be recreated or are currently being being recreated. +-- Recreating an instance deletes the existing root persistent disk and +-- creates a new disk from the image that is defined in the instance +-- template. +igmasRecreating :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasRecreating + = lens _igmasRecreating + (\ s a -> s{_igmasRecreating = a}) + +-- | [Output Only] Total number of instances in the managed instance group +-- that are scheduled to be abandoned. Abandoning an instance removes it +-- from the managed instance group without deleting it. +igmasAbandoning :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32) +igmasAbandoning + = lens _igmasAbandoning + (\ s a -> s{_igmasAbandoning = a}) + +instance FromJSON InstanceGroupManagerActionsSummary + where + parseJSON + = withObject "InstanceGroupManagerActionsSummary" + (\ o -> + InstanceGroupManagerActionsSummary <$> + (o .:? "deleting") <*> (o .:? "restarting") <*> + (o .:? "none") + <*> (o .:? "creating") + <*> (o .:? "refreshing") + <*> (o .:? "recreating") + <*> (o .:? "abandoning")) + +instance ToJSON InstanceGroupManagerActionsSummary + where + toJSON InstanceGroupManagerActionsSummary{..} + = object + (catMaybes + [("deleting" .=) <$> _igmasDeleting, + ("restarting" .=) <$> _igmasRestarting, + ("none" .=) <$> _igmasNone, + ("creating" .=) <$> _igmasCreating, + ("refreshing" .=) <$> _igmasRefreshing, + ("recreating" .=) <$> _igmasRecreating, + ("abandoning" .=) <$> _igmasAbandoning]) + +-- +-- /See:/ 'uRLMapReference' smart constructor. +newtype URLMapReference = URLMapReference + { _umrUrlMap :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umrUrlMap' +uRLMapReference + :: URLMapReference +uRLMapReference = + URLMapReference + { _umrUrlMap = Nothing + } + +umrUrlMap :: Lens' URLMapReference (Maybe Text) +umrUrlMap + = lens _umrUrlMap (\ s a -> s{_umrUrlMap = a}) + +instance FromJSON URLMapReference where + parseJSON + = withObject "URLMapReference" + (\ o -> URLMapReference <$> (o .:? "urlMap")) + +instance ToJSON URLMapReference where + toJSON URLMapReference{..} + = object (catMaybes [("urlMap" .=) <$> _umrUrlMap]) + +-- +-- /See:/ 'targetPoolsAddHealthCheckRequest' smart constructor. +newtype TargetPoolsAddHealthCheckRequest = TargetPoolsAddHealthCheckRequest + { _tpahcrHealthChecks :: Maybe [Maybe HealthCheckReference] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsAddHealthCheckRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpahcrHealthChecks' +targetPoolsAddHealthCheckRequest + :: TargetPoolsAddHealthCheckRequest +targetPoolsAddHealthCheckRequest = + TargetPoolsAddHealthCheckRequest + { _tpahcrHealthChecks = Nothing + } + +-- | Health check URLs to be added to targetPool. +tpahcrHealthChecks :: Lens' TargetPoolsAddHealthCheckRequest [Maybe HealthCheckReference] +tpahcrHealthChecks + = lens _tpahcrHealthChecks + (\ s a -> s{_tpahcrHealthChecks = a}) + . _Default + . _Coerce + +instance FromJSON TargetPoolsAddHealthCheckRequest + where + parseJSON + = withObject "TargetPoolsAddHealthCheckRequest" + (\ o -> + TargetPoolsAddHealthCheckRequest <$> + (o .:? "healthChecks" .!= mempty)) + +instance ToJSON TargetPoolsAddHealthCheckRequest + where + toJSON TargetPoolsAddHealthCheckRequest{..} + = object + (catMaybes + [("healthChecks" .=) <$> _tpahcrHealthChecks]) + +-- | Contains a list of Network resources. +-- +-- /See:/ 'networkList' smart constructor. +data NetworkList = NetworkList + { _nlNextPageToken :: !(Maybe Text) + , _nlKind :: !Text + , _nlItems :: !(Maybe [Maybe Network]) + , _nlSelfLink :: !(Maybe Text) + , _nlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworkList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nlNextPageToken' +-- +-- * 'nlKind' +-- +-- * 'nlItems' +-- +-- * 'nlSelfLink' +-- +-- * 'nlId' +networkList + :: NetworkList +networkList = + NetworkList + { _nlNextPageToken = Nothing + , _nlKind = "compute#networkList" + , _nlItems = Nothing + , _nlSelfLink = Nothing + , _nlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +nlNextPageToken :: Lens' NetworkList (Maybe Text) +nlNextPageToken + = lens _nlNextPageToken + (\ s a -> s{_nlNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#networkList for lists of +-- networks. +nlKind :: Lens' NetworkList Text +nlKind = lens _nlKind (\ s a -> s{_nlKind = a}) + +-- | [Output Only] A list of Network resources. +nlItems :: Lens' NetworkList [Maybe Network] +nlItems + = lens _nlItems (\ s a -> s{_nlItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource . +nlSelfLink :: Lens' NetworkList (Maybe Text) +nlSelfLink + = lens _nlSelfLink (\ s a -> s{_nlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +nlId :: Lens' NetworkList (Maybe Text) +nlId = lens _nlId (\ s a -> s{_nlId = a}) + +instance FromJSON NetworkList where + parseJSON + = withObject "NetworkList" + (\ o -> + NetworkList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#networkList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON NetworkList where + toJSON NetworkList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _nlNextPageToken, + Just ("kind" .= _nlKind), ("items" .=) <$> _nlItems, + ("selfLink" .=) <$> _nlSelfLink, + ("id" .=) <$> _nlId]) + +-- | A service account. +-- +-- /See:/ 'serviceAccount' smart constructor. +data ServiceAccount = ServiceAccount + { _saEmail :: !(Maybe Text) + , _saScopes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saEmail' +-- +-- * 'saScopes' +serviceAccount + :: ServiceAccount +serviceAccount = + ServiceAccount + { _saEmail = Nothing + , _saScopes = Nothing + } + +-- | Email address of the service account. +saEmail :: Lens' ServiceAccount (Maybe Text) +saEmail = lens _saEmail (\ s a -> s{_saEmail = a}) + +-- | The list of scopes to be made available for this service account. +saScopes :: Lens' ServiceAccount [Text] +saScopes + = lens _saScopes (\ s a -> s{_saScopes = a}) . + _Default + . _Coerce + +instance FromJSON ServiceAccount where + parseJSON + = withObject "ServiceAccount" + (\ o -> + ServiceAccount <$> + (o .:? "email") <*> (o .:? "scopes" .!= mempty)) + +instance ToJSON ServiceAccount where + toJSON ServiceAccount{..} + = object + (catMaybes + [("email" .=) <$> _saEmail, + ("scopes" .=) <$> _saScopes]) + +-- | Message containing information of one individual backend. +-- +-- /See:/ 'backend' smart constructor. +data Backend = Backend + { _bGroup :: !(Maybe Text) + , _bBalancingMode :: !(Maybe Text) + , _bMaxUtilization :: !(Maybe Float) + , _bMaxRate :: !(Maybe Int32) + , _bMaxRatePerInstance :: !(Maybe Float) + , _bDescription :: !(Maybe Text) + , _bCapacityScaler :: !(Maybe Float) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Backend' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bGroup' +-- +-- * 'bBalancingMode' +-- +-- * 'bMaxUtilization' +-- +-- * 'bMaxRate' +-- +-- * 'bMaxRatePerInstance' +-- +-- * 'bDescription' +-- +-- * 'bCapacityScaler' +backend + :: Backend +backend = + Backend + { _bGroup = Nothing + , _bBalancingMode = Nothing + , _bMaxUtilization = Nothing + , _bMaxRate = Nothing + , _bMaxRatePerInstance = Nothing + , _bDescription = Nothing + , _bCapacityScaler = Nothing + } + +-- | The fully-qualified URL of a zonal Instance Group resource. This +-- instance group defines the list of instances that serve traffic. Member +-- virtual machine instances from each instance group must live in the same +-- zone as the instance group itself. No two backends in a backend service +-- are allowed to use same Instance Group resource. Note that you must +-- specify an Instance Group resource using the fully-qualified URL, rather +-- than a partial URL. +bGroup :: Lens' Backend (Maybe Text) +bGroup = lens _bGroup (\ s a -> s{_bGroup = a}) + +-- | Specifies the balancing mode for this backend. The default is +-- UTILIZATION but available values are UTILIZATION and RATE. +bBalancingMode :: Lens' Backend (Maybe Text) +bBalancingMode + = lens _bBalancingMode + (\ s a -> s{_bBalancingMode = a}) + +-- | Used when balancingMode is UTILIZATION. This ratio defines the CPU +-- utilization target for the group. The default is 0.8. Valid range is +-- [0.0, 1.0]. +bMaxUtilization :: Lens' Backend (Maybe Float) +bMaxUtilization + = lens _bMaxUtilization + (\ s a -> s{_bMaxUtilization = a}) + +-- | The max RPS of the group. Can be used with either balancing mode, but +-- required if RATE mode. For RATE mode, either maxRate or +-- maxRatePerInstance must be set. +bMaxRate :: Lens' Backend (Maybe Int32) +bMaxRate = lens _bMaxRate (\ s a -> s{_bMaxRate = a}) + +-- | The max RPS that a single backed instance can handle. This is used to +-- calculate the capacity of the group. Can be used in either balancing +-- mode. For RATE mode, either maxRate or maxRatePerInstance must be set. +bMaxRatePerInstance :: Lens' Backend (Maybe Float) +bMaxRatePerInstance + = lens _bMaxRatePerInstance + (\ s a -> s{_bMaxRatePerInstance = a}) + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +bDescription :: Lens' Backend (Maybe Text) +bDescription + = lens _bDescription (\ s a -> s{_bDescription = a}) + +-- | A multiplier applied to the group\'s maximum servicing capacity (either +-- UTILIZATION or RATE). Default value is 1, which means the group will +-- serve up to 100% of its configured CPU or RPS (depending on +-- balancingMode). A setting of 0 means the group is completely drained, +-- offering 0% of its available CPU or RPS. Valid range is [0.0,1.0]. +bCapacityScaler :: Lens' Backend (Maybe Float) +bCapacityScaler + = lens _bCapacityScaler + (\ s a -> s{_bCapacityScaler = a}) + +instance FromJSON Backend where + parseJSON + = withObject "Backend" + (\ o -> + Backend <$> + (o .:? "group") <*> (o .:? "balancingMode") <*> + (o .:? "maxUtilization") + <*> (o .:? "maxRate") + <*> (o .:? "maxRatePerInstance") + <*> (o .:? "description") + <*> (o .:? "capacityScaler")) + +instance ToJSON Backend where + toJSON Backend{..} + = object + (catMaybes + [("group" .=) <$> _bGroup, + ("balancingMode" .=) <$> _bBalancingMode, + ("maxUtilization" .=) <$> _bMaxUtilization, + ("maxRate" .=) <$> _bMaxRate, + ("maxRatePerInstance" .=) <$> _bMaxRatePerInstance, + ("description" .=) <$> _bDescription, + ("capacityScaler" .=) <$> _bCapacityScaler]) + +-- +-- /See:/ 'targetInstancesScopedList' smart constructor. +data TargetInstancesScopedList = TargetInstancesScopedList + { _tislWarning :: !(Maybe TargetInstancesScopedListWarning) + , _tislTargetInstances :: !(Maybe [Maybe TargetInstance]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tislWarning' +-- +-- * 'tislTargetInstances' +targetInstancesScopedList + :: TargetInstancesScopedList +targetInstancesScopedList = + TargetInstancesScopedList + { _tislWarning = Nothing + , _tislTargetInstances = Nothing + } + +-- | Informational warning which replaces the list of addresses when the list +-- is empty. +tislWarning :: Lens' TargetInstancesScopedList (Maybe TargetInstancesScopedListWarning) +tislWarning + = lens _tislWarning (\ s a -> s{_tislWarning = a}) + +-- | List of target instances contained in this scope. +tislTargetInstances :: Lens' TargetInstancesScopedList [Maybe TargetInstance] +tislTargetInstances + = lens _tislTargetInstances + (\ s a -> s{_tislTargetInstances = a}) + . _Default + . _Coerce + +instance FromJSON TargetInstancesScopedList where + parseJSON + = withObject "TargetInstancesScopedList" + (\ o -> + TargetInstancesScopedList <$> + (o .:? "warning") <*> + (o .:? "targetInstances" .!= mempty)) + +instance ToJSON TargetInstancesScopedList where + toJSON TargetInstancesScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _tislWarning, + ("targetInstances" .=) <$> _tislTargetInstances]) + +-- | Contains a list of Machine Type resources. +-- +-- /See:/ 'machineTypeList' smart constructor. +data MachineTypeList = MachineTypeList + { _mtlNextPageToken :: !(Maybe Text) + , _mtlKind :: !Text + , _mtlItems :: !(Maybe [Maybe MachineType]) + , _mtlSelfLink :: !(Maybe Text) + , _mtlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypeList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtlNextPageToken' +-- +-- * 'mtlKind' +-- +-- * 'mtlItems' +-- +-- * 'mtlSelfLink' +-- +-- * 'mtlId' +machineTypeList + :: MachineTypeList +machineTypeList = + MachineTypeList + { _mtlNextPageToken = Nothing + , _mtlKind = "compute#machineTypeList" + , _mtlItems = Nothing + , _mtlSelfLink = Nothing + , _mtlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +mtlNextPageToken :: Lens' MachineTypeList (Maybe Text) +mtlNextPageToken + = lens _mtlNextPageToken + (\ s a -> s{_mtlNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#machineTypeList for lists +-- of machine types. +mtlKind :: Lens' MachineTypeList Text +mtlKind = lens _mtlKind (\ s a -> s{_mtlKind = a}) + +-- | [Output Only] A list of Machine Type resources. +mtlItems :: Lens' MachineTypeList [Maybe MachineType] +mtlItems + = lens _mtlItems (\ s a -> s{_mtlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +mtlSelfLink :: Lens' MachineTypeList (Maybe Text) +mtlSelfLink + = lens _mtlSelfLink (\ s a -> s{_mtlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +mtlId :: Lens' MachineTypeList (Maybe Text) +mtlId = lens _mtlId (\ s a -> s{_mtlId = a}) + +instance FromJSON MachineTypeList where + parseJSON + = withObject "MachineTypeList" + (\ o -> + MachineTypeList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#machineTypeList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON MachineTypeList where + toJSON MachineTypeList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _mtlNextPageToken, + Just ("kind" .= _mtlKind), + ("items" .=) <$> _mtlItems, + ("selfLink" .=) <$> _mtlSelfLink, + ("id" .=) <$> _mtlId]) + +-- | Contains a list of disk type resources. +-- +-- /See:/ 'diskTypeList' smart constructor. +data DiskTypeList = DiskTypeList + { _dtlNextPageToken :: !(Maybe Text) + , _dtlKind :: !Text + , _dtlItems :: !(Maybe [Maybe DiskType]) + , _dtlSelfLink :: !(Maybe Text) + , _dtlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypeList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtlNextPageToken' +-- +-- * 'dtlKind' +-- +-- * 'dtlItems' +-- +-- * 'dtlSelfLink' +-- +-- * 'dtlId' +diskTypeList + :: DiskTypeList +diskTypeList = + DiskTypeList + { _dtlNextPageToken = Nothing + , _dtlKind = "compute#diskTypeList" + , _dtlItems = Nothing + , _dtlSelfLink = Nothing + , _dtlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +dtlNextPageToken :: Lens' DiskTypeList (Maybe Text) +dtlNextPageToken + = lens _dtlNextPageToken + (\ s a -> s{_dtlNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#diskTypeList for disk +-- types. +dtlKind :: Lens' DiskTypeList Text +dtlKind = lens _dtlKind (\ s a -> s{_dtlKind = a}) + +-- | [Output Only] A list of Disk Type resources. +dtlItems :: Lens' DiskTypeList [Maybe DiskType] +dtlItems + = lens _dtlItems (\ s a -> s{_dtlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +dtlSelfLink :: Lens' DiskTypeList (Maybe Text) +dtlSelfLink + = lens _dtlSelfLink (\ s a -> s{_dtlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dtlId :: Lens' DiskTypeList (Maybe Text) +dtlId = lens _dtlId (\ s a -> s{_dtlId = a}) + +instance FromJSON DiskTypeList where + parseJSON + = withObject "DiskTypeList" + (\ o -> + DiskTypeList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#diskTypeList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON DiskTypeList where + toJSON DiskTypeList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dtlNextPageToken, + Just ("kind" .= _dtlKind), + ("items" .=) <$> _dtlItems, + ("selfLink" .=) <$> _dtlSelfLink, + ("id" .=) <$> _dtlId]) + +-- +-- /See:/ 'vPNTunnelAggregatedList' smart constructor. +data VPNTunnelAggregatedList = VPNTunnelAggregatedList + { _vtalNextPageToken :: !(Maybe Text) + , _vtalKind :: !Text + , _vtalItems :: !(Maybe VPNTunnelAggregatedListItems) + , _vtalSelfLink :: !(Maybe Text) + , _vtalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtalNextPageToken' +-- +-- * 'vtalKind' +-- +-- * 'vtalItems' +-- +-- * 'vtalSelfLink' +-- +-- * 'vtalId' +vPNTunnelAggregatedList + :: VPNTunnelAggregatedList +vPNTunnelAggregatedList = + VPNTunnelAggregatedList + { _vtalNextPageToken = Nothing + , _vtalKind = "compute#vpnTunnelAggregatedList" + , _vtalItems = Nothing + , _vtalSelfLink = Nothing + , _vtalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +vtalNextPageToken :: Lens' VPNTunnelAggregatedList (Maybe Text) +vtalNextPageToken + = lens _vtalNextPageToken + (\ s a -> s{_vtalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN +-- tunnels. +vtalKind :: Lens' VPNTunnelAggregatedList Text +vtalKind = lens _vtalKind (\ s a -> s{_vtalKind = a}) + +-- | [Output Only] A map of scoped vpn tunnel lists. +vtalItems :: Lens' VPNTunnelAggregatedList (Maybe VPNTunnelAggregatedListItems) +vtalItems + = lens _vtalItems (\ s a -> s{_vtalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +vtalSelfLink :: Lens' VPNTunnelAggregatedList (Maybe Text) +vtalSelfLink + = lens _vtalSelfLink (\ s a -> s{_vtalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +vtalId :: Lens' VPNTunnelAggregatedList (Maybe Text) +vtalId = lens _vtalId (\ s a -> s{_vtalId = a}) + +instance FromJSON VPNTunnelAggregatedList where + parseJSON + = withObject "VPNTunnelAggregatedList" + (\ o -> + VPNTunnelAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#vpnTunnelAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON VPNTunnelAggregatedList where + toJSON VPNTunnelAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _vtalNextPageToken, + Just ("kind" .= _vtalKind), + ("items" .=) <$> _vtalItems, + ("selfLink" .=) <$> _vtalSelfLink, + ("id" .=) <$> _vtalId]) + +-- | Contains a list of persistent autoscaler resources. +-- +-- /See:/ 'autoscalerList' smart constructor. +data AutoscalerList = AutoscalerList + { _autNextPageToken :: !(Maybe Text) + , _autKind :: !Text + , _autItems :: !(Maybe [Maybe Autoscaler]) + , _autSelfLink :: !(Maybe Text) + , _autId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalerList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'autNextPageToken' +-- +-- * 'autKind' +-- +-- * 'autItems' +-- +-- * 'autSelfLink' +-- +-- * 'autId' +autoscalerList + :: AutoscalerList +autoscalerList = + AutoscalerList + { _autNextPageToken = Nothing + , _autKind = "compute#autoscalerList" + , _autItems = Nothing + , _autSelfLink = Nothing + , _autId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +autNextPageToken :: Lens' AutoscalerList (Maybe Text) +autNextPageToken + = lens _autNextPageToken + (\ s a -> s{_autNextPageToken = a}) + +-- | Type of resource. +autKind :: Lens' AutoscalerList Text +autKind = lens _autKind (\ s a -> s{_autKind = a}) + +-- | A list of Autoscaler resources. +autItems :: Lens' AutoscalerList [Maybe Autoscaler] +autItems + = lens _autItems (\ s a -> s{_autItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +autSelfLink :: Lens' AutoscalerList (Maybe Text) +autSelfLink + = lens _autSelfLink (\ s a -> s{_autSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +autId :: Lens' AutoscalerList (Maybe Text) +autId = lens _autId (\ s a -> s{_autId = a}) + +instance FromJSON AutoscalerList where + parseJSON + = withObject "AutoscalerList" + (\ o -> + AutoscalerList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#autoscalerList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON AutoscalerList where + toJSON AutoscalerList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _autNextPageToken, + Just ("kind" .= _autKind), + ("items" .=) <$> _autItems, + ("selfLink" .=) <$> _autSelfLink, + ("id" .=) <$> _autId]) + +-- | An instance-attached disk resource. +-- +-- /See:/ 'attachedDisk' smart constructor. +data AttachedDisk = AttachedDisk + { _adKind :: !Text + , _adMode :: !(Maybe Text) + , _adBoot :: !(Maybe Bool) + , _adAutoDelete :: !(Maybe Bool) + , _adInitializeParams :: !(Maybe (Maybe AttachedDiskInitializeParams)) + , _adDeviceName :: !(Maybe Text) + , _adInterface :: !(Maybe Text) + , _adSource :: !(Maybe Text) + , _adLicenses :: !(Maybe [Text]) + , _adType :: !(Maybe Text) + , _adIndex :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AttachedDisk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adKind' +-- +-- * 'adMode' +-- +-- * 'adBoot' +-- +-- * 'adAutoDelete' +-- +-- * 'adInitializeParams' +-- +-- * 'adDeviceName' +-- +-- * 'adInterface' +-- +-- * 'adSource' +-- +-- * 'adLicenses' +-- +-- * 'adType' +-- +-- * 'adIndex' +attachedDisk + :: AttachedDisk +attachedDisk = + AttachedDisk + { _adKind = "compute#attachedDisk" + , _adMode = Nothing + , _adBoot = Nothing + , _adAutoDelete = Nothing + , _adInitializeParams = Nothing + , _adDeviceName = Nothing + , _adInterface = Nothing + , _adSource = Nothing + , _adLicenses = Nothing + , _adType = Nothing + , _adIndex = Nothing + } + +-- | [Output Only] Type of the resource. Always compute#attachedDisk for +-- attached disks. +adKind :: Lens' AttachedDisk Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | The mode in which to attach this disk, either READ_WRITE or READ_ONLY. +-- If not specified, the default is to attach the disk in READ_WRITE mode. +adMode :: Lens' AttachedDisk (Maybe Text) +adMode = lens _adMode (\ s a -> s{_adMode = a}) + +-- | Indicates that this is a boot disk. The virtual machine will use the +-- first partition of the disk for its root filesystem. +adBoot :: Lens' AttachedDisk (Maybe Bool) +adBoot = lens _adBoot (\ s a -> s{_adBoot = a}) + +-- | Specifies whether the disk will be auto-deleted when the instance is +-- deleted (but not when the disk is detached from the instance). +adAutoDelete :: Lens' AttachedDisk (Maybe Bool) +adAutoDelete + = lens _adAutoDelete (\ s a -> s{_adAutoDelete = a}) + +-- | [Input Only] Specifies the parameters for a new disk that will be +-- created alongside the new instance. Use initialization parameters to +-- create boot disks or local SSDs attached to the new instance. This +-- property is mutually exclusive with the source property; you can only +-- define one or the other, but not both. +adInitializeParams :: Lens' AttachedDisk (Maybe (Maybe AttachedDiskInitializeParams)) +adInitializeParams + = lens _adInitializeParams + (\ s a -> s{_adInitializeParams = a}) + +-- | Specifies a unique device name of your choice that is reflected into the +-- \/dev\/disk\/by-id\/google-* tree of a Linux operating system running +-- within the instance. This name can be used to reference the device for +-- mounting, resizing, and so on, from within the instance. If not +-- specified, the server chooses a default device name to apply to this +-- disk, in the form persistent-disks-x, where x is a number assigned by +-- Google Compute Engine. This field is only applicable for persistent +-- disks. +adDeviceName :: Lens' AttachedDisk (Maybe Text) +adDeviceName + = lens _adDeviceName (\ s a -> s{_adDeviceName = a}) + +adInterface :: Lens' AttachedDisk (Maybe Text) +adInterface + = lens _adInterface (\ s a -> s{_adInterface = a}) + +-- | Specifies a valid partial or full URL to an existing Persistent Disk +-- resource. This field is only applicable for persistent disks. +adSource :: Lens' AttachedDisk (Maybe Text) +adSource = lens _adSource (\ s a -> s{_adSource = a}) + +-- | [Output Only] Any valid publicly visible licenses. +adLicenses :: Lens' AttachedDisk [Text] +adLicenses + = lens _adLicenses (\ s a -> s{_adLicenses = a}) . + _Default + . _Coerce + +-- | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not +-- specified, the default is PERSISTENT. +adType :: Lens' AttachedDisk (Maybe Text) +adType = lens _adType (\ s a -> s{_adType = a}) + +-- | Assigns a zero-based index to this disk, where 0 is reserved for the +-- boot disk. For example, if you have many disks attached to an instance, +-- each disk would have a unique index number. If not specified, the server +-- will choose an appropriate value. +adIndex :: Lens' AttachedDisk (Maybe Int32) +adIndex = lens _adIndex (\ s a -> s{_adIndex = a}) + +instance FromJSON AttachedDisk where + parseJSON + = withObject "AttachedDisk" + (\ o -> + AttachedDisk <$> + (o .:? "kind" .!= "compute#attachedDisk") <*> + (o .:? "mode") + <*> (o .:? "boot") + <*> (o .:? "autoDelete") + <*> (o .:? "initializeParams") + <*> (o .:? "deviceName") + <*> (o .:? "interface") + <*> (o .:? "source") + <*> (o .:? "licenses" .!= mempty) + <*> (o .:? "type") + <*> (o .:? "index")) + +instance ToJSON AttachedDisk where + toJSON AttachedDisk{..} + = object + (catMaybes + [Just ("kind" .= _adKind), ("mode" .=) <$> _adMode, + ("boot" .=) <$> _adBoot, + ("autoDelete" .=) <$> _adAutoDelete, + ("initializeParams" .=) <$> _adInitializeParams, + ("deviceName" .=) <$> _adDeviceName, + ("interface" .=) <$> _adInterface, + ("source" .=) <$> _adSource, + ("licenses" .=) <$> _adLicenses, + ("type" .=) <$> _adType, ("index" .=) <$> _adIndex]) + +-- | A list of TargetHttpProxy resources. +-- +-- /See:/ 'targetHTTPProxyList' smart constructor. +data TargetHTTPProxyList = TargetHTTPProxyList + { _thttpplNextPageToken :: !(Maybe Text) + , _thttpplKind :: !Text + , _thttpplItems :: !(Maybe [Maybe TargetHTTPProxy]) + , _thttpplSelfLink :: !(Maybe Text) + , _thttpplId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxyList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttpplNextPageToken' +-- +-- * 'thttpplKind' +-- +-- * 'thttpplItems' +-- +-- * 'thttpplSelfLink' +-- +-- * 'thttpplId' +targetHTTPProxyList + :: TargetHTTPProxyList +targetHTTPProxyList = + TargetHTTPProxyList + { _thttpplNextPageToken = Nothing + , _thttpplKind = "compute#targetHttpProxyList" + , _thttpplItems = Nothing + , _thttpplSelfLink = Nothing + , _thttpplId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +thttpplNextPageToken :: Lens' TargetHTTPProxyList (Maybe Text) +thttpplNextPageToken + = lens _thttpplNextPageToken + (\ s a -> s{_thttpplNextPageToken = a}) + +-- | Type of resource. Always compute#targetHttpProxyList for lists of Target +-- HTTP proxies. +thttpplKind :: Lens' TargetHTTPProxyList Text +thttpplKind + = lens _thttpplKind (\ s a -> s{_thttpplKind = a}) + +-- | A list of TargetHttpProxy resources. +thttpplItems :: Lens' TargetHTTPProxyList [Maybe TargetHTTPProxy] +thttpplItems + = lens _thttpplItems (\ s a -> s{_thttpplItems = a}) + . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +thttpplSelfLink :: Lens' TargetHTTPProxyList (Maybe Text) +thttpplSelfLink + = lens _thttpplSelfLink + (\ s a -> s{_thttpplSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +thttpplId :: Lens' TargetHTTPProxyList (Maybe Text) +thttpplId + = lens _thttpplId (\ s a -> s{_thttpplId = a}) + +instance FromJSON TargetHTTPProxyList where + parseJSON + = withObject "TargetHTTPProxyList" + (\ o -> + TargetHTTPProxyList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#targetHttpProxyList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetHTTPProxyList where + toJSON TargetHTTPProxyList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _thttpplNextPageToken, + Just ("kind" .= _thttpplKind), + ("items" .=) <$> _thttpplItems, + ("selfLink" .=) <$> _thttpplSelfLink, + ("id" .=) <$> _thttpplId]) + +-- +-- /See:/ 'machineTypesScopedList' smart constructor. +data MachineTypesScopedList = MachineTypesScopedList + { _mtslMachineTypes :: !(Maybe [Maybe MachineType]) + , _mtslWarning :: !(Maybe MachineTypesScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtslMachineTypes' +-- +-- * 'mtslWarning' +machineTypesScopedList + :: MachineTypesScopedList +machineTypesScopedList = + MachineTypesScopedList + { _mtslMachineTypes = Nothing + , _mtslWarning = Nothing + } + +-- | [Output Only] List of machine types contained in this scope. +mtslMachineTypes :: Lens' MachineTypesScopedList [Maybe MachineType] +mtslMachineTypes + = lens _mtslMachineTypes + (\ s a -> s{_mtslMachineTypes = a}) + . _Default + . _Coerce + +-- | [Output Only] An informational warning that appears when the machine +-- types list is empty. +mtslWarning :: Lens' MachineTypesScopedList (Maybe MachineTypesScopedListWarning) +mtslWarning + = lens _mtslWarning (\ s a -> s{_mtslWarning = a}) + +instance FromJSON MachineTypesScopedList where + parseJSON + = withObject "MachineTypesScopedList" + (\ o -> + MachineTypesScopedList <$> + (o .:? "machineTypes" .!= mempty) <*> + (o .:? "warning")) + +instance ToJSON MachineTypesScopedList where + toJSON MachineTypesScopedList{..} + = object + (catMaybes + [("machineTypes" .=) <$> _mtslMachineTypes, + ("warning" .=) <$> _mtslWarning]) + +-- | Contains a list of VpnTunnel resources. +-- +-- /See:/ 'vPNTunnelList' smart constructor. +data VPNTunnelList = VPNTunnelList + { _vtlNextPageToken :: !(Maybe Text) + , _vtlKind :: !Text + , _vtlItems :: !(Maybe [Maybe VPNTunnel]) + , _vtlSelfLink :: !(Maybe Text) + , _vtlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtlNextPageToken' +-- +-- * 'vtlKind' +-- +-- * 'vtlItems' +-- +-- * 'vtlSelfLink' +-- +-- * 'vtlId' +vPNTunnelList + :: VPNTunnelList +vPNTunnelList = + VPNTunnelList + { _vtlNextPageToken = Nothing + , _vtlKind = "compute#vpnTunnelList" + , _vtlItems = Nothing + , _vtlSelfLink = Nothing + , _vtlId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +vtlNextPageToken :: Lens' VPNTunnelList (Maybe Text) +vtlNextPageToken + = lens _vtlNextPageToken + (\ s a -> s{_vtlNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN +-- tunnels. +vtlKind :: Lens' VPNTunnelList Text +vtlKind = lens _vtlKind (\ s a -> s{_vtlKind = a}) + +-- | [Output Only] A list of VpnTunnel resources. +vtlItems :: Lens' VPNTunnelList [Maybe VPNTunnel] +vtlItems + = lens _vtlItems (\ s a -> s{_vtlItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for the resource. +vtlSelfLink :: Lens' VPNTunnelList (Maybe Text) +vtlSelfLink + = lens _vtlSelfLink (\ s a -> s{_vtlSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +vtlId :: Lens' VPNTunnelList (Maybe Text) +vtlId = lens _vtlId (\ s a -> s{_vtlId = a}) + +instance FromJSON VPNTunnelList where + parseJSON + = withObject "VPNTunnelList" + (\ o -> + VPNTunnelList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#vpnTunnelList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON VPNTunnelList where + toJSON VPNTunnelList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _vtlNextPageToken, + Just ("kind" .= _vtlKind), + ("items" .=) <$> _vtlItems, + ("selfLink" .=) <$> _vtlSelfLink, + ("id" .=) <$> _vtlId]) + +-- +-- /See:/ 'backendServiceGroupHealth' smart constructor. +data BackendServiceGroupHealth = BackendServiceGroupHealth + { _bsghKind :: !Text + , _bsghHealthStatus :: !(Maybe [Maybe HealthStatus]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServiceGroupHealth' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsghKind' +-- +-- * 'bsghHealthStatus' +backendServiceGroupHealth + :: BackendServiceGroupHealth +backendServiceGroupHealth = + BackendServiceGroupHealth + { _bsghKind = "compute#backendServiceGroupHealth" + , _bsghHealthStatus = Nothing + } + +-- | [Output Only] Type of resource. Always compute#backendServiceGroupHealth +-- for the health of backend services. +bsghKind :: Lens' BackendServiceGroupHealth Text +bsghKind = lens _bsghKind (\ s a -> s{_bsghKind = a}) + +bsghHealthStatus :: Lens' BackendServiceGroupHealth [Maybe HealthStatus] +bsghHealthStatus + = lens _bsghHealthStatus + (\ s a -> s{_bsghHealthStatus = a}) + . _Default + . _Coerce + +instance FromJSON BackendServiceGroupHealth where + parseJSON + = withObject "BackendServiceGroupHealth" + (\ o -> + BackendServiceGroupHealth <$> + (o .:? "kind" .!= + "compute#backendServiceGroupHealth") + <*> (o .:? "healthStatus" .!= mempty)) + +instance ToJSON BackendServiceGroupHealth where + toJSON BackendServiceGroupHealth{..} + = object + (catMaybes + [Just ("kind" .= _bsghKind), + ("healthStatus" .=) <$> _bsghHealthStatus]) + +-- +-- /See:/ 'diskTypeAggregatedList' smart constructor. +data DiskTypeAggregatedList = DiskTypeAggregatedList + { _dtalNextPageToken :: !(Maybe Text) + , _dtalKind :: !Text + , _dtalItems :: !(Maybe DiskTypeAggregatedListItems) + , _dtalSelfLink :: !(Maybe Text) + , _dtalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypeAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtalNextPageToken' +-- +-- * 'dtalKind' +-- +-- * 'dtalItems' +-- +-- * 'dtalSelfLink' +-- +-- * 'dtalId' +diskTypeAggregatedList + :: DiskTypeAggregatedList +diskTypeAggregatedList = + DiskTypeAggregatedList + { _dtalNextPageToken = Nothing + , _dtalKind = "compute#diskTypeAggregatedList" + , _dtalItems = Nothing + , _dtalSelfLink = Nothing + , _dtalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +dtalNextPageToken :: Lens' DiskTypeAggregatedList (Maybe Text) +dtalNextPageToken + = lens _dtalNextPageToken + (\ s a -> s{_dtalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#diskTypeAggregatedList. +dtalKind :: Lens' DiskTypeAggregatedList Text +dtalKind = lens _dtalKind (\ s a -> s{_dtalKind = a}) + +-- | [Output Only] A map of scoped disk type lists. +dtalItems :: Lens' DiskTypeAggregatedList (Maybe DiskTypeAggregatedListItems) +dtalItems + = lens _dtalItems (\ s a -> s{_dtalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +dtalSelfLink :: Lens' DiskTypeAggregatedList (Maybe Text) +dtalSelfLink + = lens _dtalSelfLink (\ s a -> s{_dtalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dtalId :: Lens' DiskTypeAggregatedList (Maybe Text) +dtalId = lens _dtalId (\ s a -> s{_dtalId = a}) + +instance FromJSON DiskTypeAggregatedList where + parseJSON + = withObject "DiskTypeAggregatedList" + (\ o -> + DiskTypeAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#diskTypeAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON DiskTypeAggregatedList where + toJSON DiskTypeAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dtalNextPageToken, + Just ("kind" .= _dtalKind), + ("items" .=) <$> _dtalItems, + ("selfLink" .=) <$> _dtalSelfLink, + ("id" .=) <$> _dtalId]) + +-- | An HttpHealthCheck resource. This resource defines a template for how +-- individual instances should be checked for health, via HTTP. +-- +-- /See:/ 'hTTPHealthCheck' smart constructor. +data HTTPHealthCheck = HTTPHealthCheck + { _httphcHealthyThreshold :: !(Maybe Int32) + , _httphcKind :: !Text + , _httphcRequestPath :: !(Maybe Text) + , _httphcSelfLink :: !(Maybe Text) + , _httphcCheckIntervalSec :: !(Maybe Int32) + , _httphcName :: !(Maybe Text) + , _httphcCreationTimestamp :: !(Maybe Text) + , _httphcId :: !(Maybe Word64) + , _httphcHost :: !(Maybe Text) + , _httphcTimeoutSec :: !(Maybe Int32) + , _httphcDescription :: !(Maybe Text) + , _httphcUnhealthyThreshold :: !(Maybe Int32) + , _httphcPort :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthCheck' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphcHealthyThreshold' +-- +-- * 'httphcKind' +-- +-- * 'httphcRequestPath' +-- +-- * 'httphcSelfLink' +-- +-- * 'httphcCheckIntervalSec' +-- +-- * 'httphcName' +-- +-- * 'httphcCreationTimestamp' +-- +-- * 'httphcId' +-- +-- * 'httphcHost' +-- +-- * 'httphcTimeoutSec' +-- +-- * 'httphcDescription' +-- +-- * 'httphcUnhealthyThreshold' +-- +-- * 'httphcPort' +hTTPHealthCheck + :: HTTPHealthCheck +hTTPHealthCheck = + HTTPHealthCheck + { _httphcHealthyThreshold = Nothing + , _httphcKind = "compute#httpHealthCheck" + , _httphcRequestPath = Nothing + , _httphcSelfLink = Nothing + , _httphcCheckIntervalSec = Nothing + , _httphcName = Nothing + , _httphcCreationTimestamp = Nothing + , _httphcId = Nothing + , _httphcHost = Nothing + , _httphcTimeoutSec = Nothing + , _httphcDescription = Nothing + , _httphcUnhealthyThreshold = Nothing + , _httphcPort = Nothing + } + +-- | A so-far unhealthy instance will be marked healthy after this many +-- consecutive successes. The default value is 2. +httphcHealthyThreshold :: Lens' HTTPHealthCheck (Maybe Int32) +httphcHealthyThreshold + = lens _httphcHealthyThreshold + (\ s a -> s{_httphcHealthyThreshold = a}) + +-- | Type of the resource. +httphcKind :: Lens' HTTPHealthCheck Text +httphcKind + = lens _httphcKind (\ s a -> s{_httphcKind = a}) + +-- | The request path of the HTTP health check request. The default value is +-- \"\/\". +httphcRequestPath :: Lens' HTTPHealthCheck (Maybe Text) +httphcRequestPath + = lens _httphcRequestPath + (\ s a -> s{_httphcRequestPath = a}) + +-- | [Output Only] Server-defined URL for the resource. +httphcSelfLink :: Lens' HTTPHealthCheck (Maybe Text) +httphcSelfLink + = lens _httphcSelfLink + (\ s a -> s{_httphcSelfLink = a}) + +-- | How often (in seconds) to send a health check. The default value is 5 +-- seconds. +httphcCheckIntervalSec :: Lens' HTTPHealthCheck (Maybe Int32) +httphcCheckIntervalSec + = lens _httphcCheckIntervalSec + (\ s a -> s{_httphcCheckIntervalSec = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +httphcName :: Lens' HTTPHealthCheck (Maybe Text) +httphcName + = lens _httphcName (\ s a -> s{_httphcName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +httphcCreationTimestamp :: Lens' HTTPHealthCheck (Maybe Text) +httphcCreationTimestamp + = lens _httphcCreationTimestamp + (\ s a -> s{_httphcCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +httphcId :: Lens' HTTPHealthCheck (Maybe Word64) +httphcId = lens _httphcId (\ s a -> s{_httphcId = a}) + +-- | The value of the host header in the HTTP health check request. If left +-- empty (default value), the public IP on behalf of which this health +-- check is performed will be used. +httphcHost :: Lens' HTTPHealthCheck (Maybe Text) +httphcHost + = lens _httphcHost (\ s a -> s{_httphcHost = a}) + +-- | How long (in seconds) to wait before claiming failure. The default value +-- is 5 seconds. It is invalid for timeoutSec to have greater value than +-- checkIntervalSec. +httphcTimeoutSec :: Lens' HTTPHealthCheck (Maybe Int32) +httphcTimeoutSec + = lens _httphcTimeoutSec + (\ s a -> s{_httphcTimeoutSec = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +httphcDescription :: Lens' HTTPHealthCheck (Maybe Text) +httphcDescription + = lens _httphcDescription + (\ s a -> s{_httphcDescription = a}) + +-- | A so-far healthy instance will be marked unhealthy after this many +-- consecutive failures. The default value is 2. +httphcUnhealthyThreshold :: Lens' HTTPHealthCheck (Maybe Int32) +httphcUnhealthyThreshold + = lens _httphcUnhealthyThreshold + (\ s a -> s{_httphcUnhealthyThreshold = a}) + +-- | The TCP port number for the HTTP health check request. The default value +-- is 80. +httphcPort :: Lens' HTTPHealthCheck (Maybe Int32) +httphcPort + = lens _httphcPort (\ s a -> s{_httphcPort = a}) + +instance FromJSON HTTPHealthCheck where + parseJSON + = withObject "HTTPHealthCheck" + (\ o -> + HTTPHealthCheck <$> + (o .:? "healthyThreshold") <*> + (o .:? "kind" .!= "compute#httpHealthCheck") + <*> (o .:? "requestPath") + <*> (o .:? "selfLink") + <*> (o .:? "checkIntervalSec") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "host") + <*> (o .:? "timeoutSec") + <*> (o .:? "description") + <*> (o .:? "unhealthyThreshold") + <*> (o .:? "port")) + +instance ToJSON HTTPHealthCheck where + toJSON HTTPHealthCheck{..} + = object + (catMaybes + [("healthyThreshold" .=) <$> _httphcHealthyThreshold, + Just ("kind" .= _httphcKind), + ("requestPath" .=) <$> _httphcRequestPath, + ("selfLink" .=) <$> _httphcSelfLink, + ("checkIntervalSec" .=) <$> _httphcCheckIntervalSec, + ("name" .=) <$> _httphcName, + ("creationTimestamp" .=) <$> + _httphcCreationTimestamp, + ("id" .=) <$> _httphcId, ("host" .=) <$> _httphcHost, + ("timeoutSec" .=) <$> _httphcTimeoutSec, + ("description" .=) <$> _httphcDescription, + ("unhealthyThreshold" .=) <$> + _httphcUnhealthyThreshold, + ("port" .=) <$> _httphcPort]) + +-- | Cloud Autoscaler policy. +-- +-- /See:/ 'autoscalingPolicy' smart constructor. +data AutoscalingPolicy = AutoscalingPolicy + { _apCustomMetricUtilizations :: !(Maybe [Maybe AutoscalingPolicyCustomMetricUtilization]) + , _apMaxNumReplicas :: !(Maybe Int32) + , _apCpuUtilization :: !(Maybe (Maybe AutoscalingPolicyCPUUtilization)) + , _apLoadBalancingUtilization :: !(Maybe (Maybe AutoscalingPolicyLoadBalancingUtilization)) + , _apMinNumReplicas :: !(Maybe Int32) + , _apCoolDownPeriodSec :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apCustomMetricUtilizations' +-- +-- * 'apMaxNumReplicas' +-- +-- * 'apCpuUtilization' +-- +-- * 'apLoadBalancingUtilization' +-- +-- * 'apMinNumReplicas' +-- +-- * 'apCoolDownPeriodSec' +autoscalingPolicy + :: AutoscalingPolicy +autoscalingPolicy = + AutoscalingPolicy + { _apCustomMetricUtilizations = Nothing + , _apMaxNumReplicas = Nothing + , _apCpuUtilization = Nothing + , _apLoadBalancingUtilization = Nothing + , _apMinNumReplicas = Nothing + , _apCoolDownPeriodSec = Nothing + } + +-- | Configuration parameters of autoscaling based on custom metric. +apCustomMetricUtilizations :: Lens' AutoscalingPolicy [Maybe AutoscalingPolicyCustomMetricUtilization] +apCustomMetricUtilizations + = lens _apCustomMetricUtilizations + (\ s a -> s{_apCustomMetricUtilizations = a}) + . _Default + . _Coerce + +-- | The maximum number of replicas that the Autoscaler can scale up to. This +-- field is required for config to be effective. Maximum number of replicas +-- should be not lower than minimal number of replicas. Absolute limit for +-- this value is defined in Autoscaler backend. +apMaxNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32) +apMaxNumReplicas + = lens _apMaxNumReplicas + (\ s a -> s{_apMaxNumReplicas = a}) + +-- | TODO(jbartosik): Add support for scaling based on muliple utilization +-- metrics (take max recommendation). Exactly one utilization policy should +-- be provided. Configuration parameters of CPU based autoscaling policy. +apCpuUtilization :: Lens' AutoscalingPolicy (Maybe (Maybe AutoscalingPolicyCPUUtilization)) +apCpuUtilization + = lens _apCpuUtilization + (\ s a -> s{_apCpuUtilization = a}) + +-- | Configuration parameters of autoscaling based on load balancer. +apLoadBalancingUtilization :: Lens' AutoscalingPolicy (Maybe (Maybe AutoscalingPolicyLoadBalancingUtilization)) +apLoadBalancingUtilization + = lens _apLoadBalancingUtilization + (\ s a -> s{_apLoadBalancingUtilization = a}) + +-- | The minimum number of replicas that the Autoscaler can scale down to. +-- Can\'t be less than 0. If not provided Autoscaler will choose default +-- value depending on maximal number of replicas. +apMinNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32) +apMinNumReplicas + = lens _apMinNumReplicas + (\ s a -> s{_apMinNumReplicas = a}) + +-- | The number of seconds that the Autoscaler should wait between two +-- succeeding changes to the number of virtual machines. You should define +-- an interval that is at least as long as the initialization time of a +-- virtual machine and the time it may take for replica pool to create the +-- virtual machine. The default is 60 seconds. +apCoolDownPeriodSec :: Lens' AutoscalingPolicy (Maybe Int32) +apCoolDownPeriodSec + = lens _apCoolDownPeriodSec + (\ s a -> s{_apCoolDownPeriodSec = a}) + +instance FromJSON AutoscalingPolicy where + parseJSON + = withObject "AutoscalingPolicy" + (\ o -> + AutoscalingPolicy <$> + (o .:? "customMetricUtilizations" .!= mempty) <*> + (o .:? "maxNumReplicas") + <*> (o .:? "cpuUtilization") + <*> (o .:? "loadBalancingUtilization") + <*> (o .:? "minNumReplicas") + <*> (o .:? "coolDownPeriodSec")) + +instance ToJSON AutoscalingPolicy where + toJSON AutoscalingPolicy{..} + = object + (catMaybes + [("customMetricUtilizations" .=) <$> + _apCustomMetricUtilizations, + ("maxNumReplicas" .=) <$> _apMaxNumReplicas, + ("cpuUtilization" .=) <$> _apCpuUtilization, + ("loadBalancingUtilization" .=) <$> + _apLoadBalancingUtilization, + ("minNumReplicas" .=) <$> _apMinNumReplicas, + ("coolDownPeriodSec" .=) <$> _apCoolDownPeriodSec]) + +-- +-- /See:/ 'autoscalersScopedList' smart constructor. +data AutoscalersScopedList = AutoscalersScopedList + { _aAutoscalers :: !(Maybe [Maybe Autoscaler]) + , _aWarning :: !(Maybe AutoscalersScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aAutoscalers' +-- +-- * 'aWarning' +autoscalersScopedList + :: AutoscalersScopedList +autoscalersScopedList = + AutoscalersScopedList + { _aAutoscalers = Nothing + , _aWarning = Nothing + } + +-- | List of autoscalers contained in this scope. +aAutoscalers :: Lens' AutoscalersScopedList [Maybe Autoscaler] +aAutoscalers + = lens _aAutoscalers (\ s a -> s{_aAutoscalers = a}) + . _Default + . _Coerce + +-- | Informational warning which replaces the list of autoscalers when the +-- list is empty. +aWarning :: Lens' AutoscalersScopedList (Maybe AutoscalersScopedListWarning) +aWarning = lens _aWarning (\ s a -> s{_aWarning = a}) + +instance FromJSON AutoscalersScopedList where + parseJSON + = withObject "AutoscalersScopedList" + (\ o -> + AutoscalersScopedList <$> + (o .:? "autoscalers" .!= mempty) <*> + (o .:? "warning")) + +instance ToJSON AutoscalersScopedList where + toJSON AutoscalersScopedList{..} + = object + (catMaybes + [("autoscalers" .=) <$> _aAutoscalers, + ("warning" .=) <$> _aWarning]) + +-- +-- /See:/ 'diskTypesScopedList' smart constructor. +data DiskTypesScopedList = DiskTypesScopedList + { _dtslDiskTypes :: !(Maybe [Maybe DiskType]) + , _dtslWarning :: !(Maybe DiskTypesScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypesScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtslDiskTypes' +-- +-- * 'dtslWarning' +diskTypesScopedList + :: DiskTypesScopedList +diskTypesScopedList = + DiskTypesScopedList + { _dtslDiskTypes = Nothing + , _dtslWarning = Nothing + } + +-- | [Output Only] List of disk types contained in this scope. +dtslDiskTypes :: Lens' DiskTypesScopedList [Maybe DiskType] +dtslDiskTypes + = lens _dtslDiskTypes + (\ s a -> s{_dtslDiskTypes = a}) + . _Default + . _Coerce + +-- | [Output Only] Informational warning which replaces the list of disk +-- types when the list is empty. +dtslWarning :: Lens' DiskTypesScopedList (Maybe DiskTypesScopedListWarning) +dtslWarning + = lens _dtslWarning (\ s a -> s{_dtslWarning = a}) + +instance FromJSON DiskTypesScopedList where + parseJSON + = withObject "DiskTypesScopedList" + (\ o -> + DiskTypesScopedList <$> + (o .:? "diskTypes" .!= mempty) <*> (o .:? "warning")) + +instance ToJSON DiskTypesScopedList where + toJSON DiskTypesScopedList{..} + = object + (catMaybes + [("diskTypes" .=) <$> _dtslDiskTypes, + ("warning" .=) <$> _dtslWarning]) + +-- +-- /See:/ 'autoscalerAggregatedList' smart constructor. +data AutoscalerAggregatedList = AutoscalerAggregatedList + { _aalNextPageToken :: !(Maybe Text) + , _aalKind :: !Text + , _aalItems :: !(Maybe AutoscalerAggregatedListItems) + , _aalSelfLink :: !(Maybe Text) + , _aalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalerAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalNextPageToken' +-- +-- * 'aalKind' +-- +-- * 'aalItems' +-- +-- * 'aalSelfLink' +-- +-- * 'aalId' +autoscalerAggregatedList + :: AutoscalerAggregatedList +autoscalerAggregatedList = + AutoscalerAggregatedList + { _aalNextPageToken = Nothing + , _aalKind = "compute#autoscalerAggregatedList" + , _aalItems = Nothing + , _aalSelfLink = Nothing + , _aalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +aalNextPageToken :: Lens' AutoscalerAggregatedList (Maybe Text) +aalNextPageToken + = lens _aalNextPageToken + (\ s a -> s{_aalNextPageToken = a}) + +-- | Type of resource. +aalKind :: Lens' AutoscalerAggregatedList Text +aalKind = lens _aalKind (\ s a -> s{_aalKind = a}) + +-- | A map of scoped autoscaler lists. +aalItems :: Lens' AutoscalerAggregatedList (Maybe AutoscalerAggregatedListItems) +aalItems = lens _aalItems (\ s a -> s{_aalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +aalSelfLink :: Lens' AutoscalerAggregatedList (Maybe Text) +aalSelfLink + = lens _aalSelfLink (\ s a -> s{_aalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +aalId :: Lens' AutoscalerAggregatedList (Maybe Text) +aalId = lens _aalId (\ s a -> s{_aalId = a}) + +instance FromJSON AutoscalerAggregatedList where + parseJSON + = withObject "AutoscalerAggregatedList" + (\ o -> + AutoscalerAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#autoscalerAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON AutoscalerAggregatedList where + toJSON AutoscalerAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _aalNextPageToken, + Just ("kind" .= _aalKind), + ("items" .=) <$> _aalItems, + ("selfLink" .=) <$> _aalSelfLink, + ("id" .=) <$> _aalId]) + +-- +-- /See:/ 'machineTypeAggregatedList' smart constructor. +data MachineTypeAggregatedList = MachineTypeAggregatedList + { _mtalNextPageToken :: !(Maybe Text) + , _mtalKind :: !Text + , _mtalItems :: !(Maybe MachineTypeAggregatedListItems) + , _mtalSelfLink :: !(Maybe Text) + , _mtalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypeAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtalNextPageToken' +-- +-- * 'mtalKind' +-- +-- * 'mtalItems' +-- +-- * 'mtalSelfLink' +-- +-- * 'mtalId' +machineTypeAggregatedList + :: MachineTypeAggregatedList +machineTypeAggregatedList = + MachineTypeAggregatedList + { _mtalNextPageToken = Nothing + , _mtalKind = "compute#machineTypeAggregatedList" + , _mtalItems = Nothing + , _mtalSelfLink = Nothing + , _mtalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +mtalNextPageToken :: Lens' MachineTypeAggregatedList (Maybe Text) +mtalNextPageToken + = lens _mtalNextPageToken + (\ s a -> s{_mtalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#machineTypeAggregatedList +-- for aggregated lists of machine types. +mtalKind :: Lens' MachineTypeAggregatedList Text +mtalKind = lens _mtalKind (\ s a -> s{_mtalKind = a}) + +-- | [Output Only] A map of scoped machine type lists. +mtalItems :: Lens' MachineTypeAggregatedList (Maybe MachineTypeAggregatedListItems) +mtalItems + = lens _mtalItems (\ s a -> s{_mtalItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +mtalSelfLink :: Lens' MachineTypeAggregatedList (Maybe Text) +mtalSelfLink + = lens _mtalSelfLink (\ s a -> s{_mtalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +mtalId :: Lens' MachineTypeAggregatedList (Maybe Text) +mtalId = lens _mtalId (\ s a -> s{_mtalId = a}) + +instance FromJSON MachineTypeAggregatedList where + parseJSON + = withObject "MachineTypeAggregatedList" + (\ o -> + MachineTypeAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#machineTypeAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON MachineTypeAggregatedList where + toJSON MachineTypeAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _mtalNextPageToken, + Just ("kind" .= _mtalKind), + ("items" .=) <$> _mtalItems, + ("selfLink" .=) <$> _mtalSelfLink, + ("id" .=) <$> _mtalId]) + +-- | Contains a list of region resources. +-- +-- /See:/ 'regionList' smart constructor. +data RegionList = RegionList + { _regNextPageToken :: !(Maybe Text) + , _regKind :: !Text + , _regItems :: !(Maybe [Maybe Region]) + , _regSelfLink :: !(Maybe Text) + , _regId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'regNextPageToken' +-- +-- * 'regKind' +-- +-- * 'regItems' +-- +-- * 'regSelfLink' +-- +-- * 'regId' +regionList + :: RegionList +regionList = + RegionList + { _regNextPageToken = Nothing + , _regKind = "compute#regionList" + , _regItems = Nothing + , _regSelfLink = Nothing + , _regId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +regNextPageToken :: Lens' RegionList (Maybe Text) +regNextPageToken + = lens _regNextPageToken + (\ s a -> s{_regNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#regionList for lists of +-- regions. +regKind :: Lens' RegionList Text +regKind = lens _regKind (\ s a -> s{_regKind = a}) + +-- | [Output Only] A list of Region resources. +regItems :: Lens' RegionList [Maybe Region] +regItems + = lens _regItems (\ s a -> s{_regItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +regSelfLink :: Lens' RegionList (Maybe Text) +regSelfLink + = lens _regSelfLink (\ s a -> s{_regSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +regId :: Lens' RegionList (Maybe Text) +regId = lens _regId (\ s a -> s{_regId = a}) + +instance FromJSON RegionList where + parseJSON + = withObject "RegionList" + (\ o -> + RegionList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#regionList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON RegionList where + toJSON RegionList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _regNextPageToken, + Just ("kind" .= _regKind), + ("items" .=) <$> _regItems, + ("selfLink" .=) <$> _regSelfLink, + ("id" .=) <$> _regId]) + +-- | A Machine Type resource. +-- +-- /See:/ 'machineType' smart constructor. +data MachineType = MachineType + { _mtKind :: !Text + , _mtImageSpaceGb :: !(Maybe Int32) + , _mtZone :: !(Maybe Text) + , _mtSelfLink :: !(Maybe Text) + , _mtName :: !(Maybe Text) + , _mtCreationTimestamp :: !(Maybe Text) + , _mtScratchDisks :: !(Maybe [MachineTypeScratchDisksItem]) + , _mtId :: !(Maybe Word64) + , _mtGuestCpus :: !(Maybe Int32) + , _mtMaximumPersistentDisksSizeGb :: !(Maybe Int64) + , _mtMaximumPersistentDisks :: !(Maybe Int32) + , _mtMemoryMb :: !(Maybe Int32) + , _mtDescription :: !(Maybe Text) + , _mtDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtKind' +-- +-- * 'mtImageSpaceGb' +-- +-- * 'mtZone' +-- +-- * 'mtSelfLink' +-- +-- * 'mtName' +-- +-- * 'mtCreationTimestamp' +-- +-- * 'mtScratchDisks' +-- +-- * 'mtId' +-- +-- * 'mtGuestCpus' +-- +-- * 'mtMaximumPersistentDisksSizeGb' +-- +-- * 'mtMaximumPersistentDisks' +-- +-- * 'mtMemoryMb' +-- +-- * 'mtDescription' +-- +-- * 'mtDeprecated' +machineType + :: MachineType +machineType = + MachineType + { _mtKind = "compute#machineType" + , _mtImageSpaceGb = Nothing + , _mtZone = Nothing + , _mtSelfLink = Nothing + , _mtName = Nothing + , _mtCreationTimestamp = Nothing + , _mtScratchDisks = Nothing + , _mtId = Nothing + , _mtGuestCpus = Nothing + , _mtMaximumPersistentDisksSizeGb = Nothing + , _mtMaximumPersistentDisks = Nothing + , _mtMemoryMb = Nothing + , _mtDescription = Nothing + , _mtDeprecated = Nothing + } + +-- | Type of the resource. +mtKind :: Lens' MachineType Text +mtKind = lens _mtKind (\ s a -> s{_mtKind = a}) + +-- | [Deprecated] This property is deprecated and will never be populated +-- with any relevant values. +mtImageSpaceGb :: Lens' MachineType (Maybe Int32) +mtImageSpaceGb + = lens _mtImageSpaceGb + (\ s a -> s{_mtImageSpaceGb = a}) + +-- | [Output Only] The name of the zone where the machine type resides, such +-- as us-central1-a. +mtZone :: Lens' MachineType (Maybe Text) +mtZone = lens _mtZone (\ s a -> s{_mtZone = a}) + +-- | [Output Only] Server-defined URL for the resource. +mtSelfLink :: Lens' MachineType (Maybe Text) +mtSelfLink + = lens _mtSelfLink (\ s a -> s{_mtSelfLink = a}) + +-- | [Output Only] Name of the resource. +mtName :: Lens' MachineType (Maybe Text) +mtName = lens _mtName (\ s a -> s{_mtName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +mtCreationTimestamp :: Lens' MachineType (Maybe Text) +mtCreationTimestamp + = lens _mtCreationTimestamp + (\ s a -> s{_mtCreationTimestamp = a}) + +-- | [Output Only] List of extended scratch disks assigned to the instance. +mtScratchDisks :: Lens' MachineType [MachineTypeScratchDisksItem] +mtScratchDisks + = lens _mtScratchDisks + (\ s a -> s{_mtScratchDisks = a}) + . _Default + . _Coerce + +-- | [Output Only] Unique identifier for the resource; defined by the server. +mtId :: Lens' MachineType (Maybe Word64) +mtId = lens _mtId (\ s a -> s{_mtId = a}) + +-- | [Output Only] The tumber of CPUs exposed to the instance. +mtGuestCpus :: Lens' MachineType (Maybe Int32) +mtGuestCpus + = lens _mtGuestCpus (\ s a -> s{_mtGuestCpus = a}) + +-- | [Output Only] Maximum total persistent disks size (GB) allowed. +mtMaximumPersistentDisksSizeGb :: Lens' MachineType (Maybe Int64) +mtMaximumPersistentDisksSizeGb + = lens _mtMaximumPersistentDisksSizeGb + (\ s a -> s{_mtMaximumPersistentDisksSizeGb = a}) + +-- | [Output Only] Maximum persistent disks allowed. +mtMaximumPersistentDisks :: Lens' MachineType (Maybe Int32) +mtMaximumPersistentDisks + = lens _mtMaximumPersistentDisks + (\ s a -> s{_mtMaximumPersistentDisks = a}) + +-- | [Output Only] The amount of physical memory available to the instance, +-- defined in MB. +mtMemoryMb :: Lens' MachineType (Maybe Int32) +mtMemoryMb + = lens _mtMemoryMb (\ s a -> s{_mtMemoryMb = a}) + +-- | [Output Only] An optional textual description of the resource. +mtDescription :: Lens' MachineType (Maybe Text) +mtDescription + = lens _mtDescription + (\ s a -> s{_mtDescription = a}) + +-- | [Output Only] The deprecation status associated with this machine type. +mtDeprecated :: Lens' MachineType (Maybe (Maybe DeprecationStatus)) +mtDeprecated + = lens _mtDeprecated (\ s a -> s{_mtDeprecated = a}) + +instance FromJSON MachineType where + parseJSON + = withObject "MachineType" + (\ o -> + MachineType <$> + (o .:? "kind" .!= "compute#machineType") <*> + (o .:? "imageSpaceGb") + <*> (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "scratchDisks" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "guestCpus") + <*> (o .:? "maximumPersistentDisksSizeGb") + <*> (o .:? "maximumPersistentDisks") + <*> (o .:? "memoryMb") + <*> (o .:? "description") + <*> (o .:? "deprecated")) + +instance ToJSON MachineType where + toJSON MachineType{..} + = object + (catMaybes + [Just ("kind" .= _mtKind), + ("imageSpaceGb" .=) <$> _mtImageSpaceGb, + ("zone" .=) <$> _mtZone, + ("selfLink" .=) <$> _mtSelfLink, + ("name" .=) <$> _mtName, + ("creationTimestamp" .=) <$> _mtCreationTimestamp, + ("scratchDisks" .=) <$> _mtScratchDisks, + ("id" .=) <$> _mtId, + ("guestCpus" .=) <$> _mtGuestCpus, + ("maximumPersistentDisksSizeGb" .=) <$> + _mtMaximumPersistentDisksSizeGb, + ("maximumPersistentDisks" .=) <$> + _mtMaximumPersistentDisks, + ("memoryMb" .=) <$> _mtMemoryMb, + ("description" .=) <$> _mtDescription, + ("deprecated" .=) <$> _mtDeprecated]) + +-- | A disk type resource. +-- +-- /See:/ 'diskType' smart constructor. +data DiskType = DiskType + { _dtKind :: !Text + , _dtZone :: !(Maybe Text) + , _dtSelfLink :: !(Maybe Text) + , _dtName :: !(Maybe Text) + , _dtCreationTimestamp :: !(Maybe Text) + , _dtId :: !(Maybe Word64) + , _dtValidDiskSize :: !(Maybe Text) + , _dtDescription :: !(Maybe Text) + , _dtDefaultDiskSizeGb :: !(Maybe Int64) + , _dtDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtKind' +-- +-- * 'dtZone' +-- +-- * 'dtSelfLink' +-- +-- * 'dtName' +-- +-- * 'dtCreationTimestamp' +-- +-- * 'dtId' +-- +-- * 'dtValidDiskSize' +-- +-- * 'dtDescription' +-- +-- * 'dtDefaultDiskSizeGb' +-- +-- * 'dtDeprecated' +diskType + :: DiskType +diskType = + DiskType + { _dtKind = "compute#diskType" + , _dtZone = Nothing + , _dtSelfLink = Nothing + , _dtName = Nothing + , _dtCreationTimestamp = Nothing + , _dtId = Nothing + , _dtValidDiskSize = Nothing + , _dtDescription = Nothing + , _dtDefaultDiskSizeGb = Nothing + , _dtDeprecated = Nothing + } + +-- | [Output Only] Type of the resource. Always compute#diskType for disk +-- types. +dtKind :: Lens' DiskType Text +dtKind = lens _dtKind (\ s a -> s{_dtKind = a}) + +-- | [Output Only] URL of the zone where the disk type resides. +dtZone :: Lens' DiskType (Maybe Text) +dtZone = lens _dtZone (\ s a -> s{_dtZone = a}) + +-- | [Output Only] Server-defined URL for the resource. +dtSelfLink :: Lens' DiskType (Maybe Text) +dtSelfLink + = lens _dtSelfLink (\ s a -> s{_dtSelfLink = a}) + +-- | [Output Only] Name of the resource. +dtName :: Lens' DiskType (Maybe Text) +dtName = lens _dtName (\ s a -> s{_dtName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +dtCreationTimestamp :: Lens' DiskType (Maybe Text) +dtCreationTimestamp + = lens _dtCreationTimestamp + (\ s a -> s{_dtCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dtId :: Lens' DiskType (Maybe Word64) +dtId = lens _dtId (\ s a -> s{_dtId = a}) + +-- | [Output Only] An optional textual description of the valid disk size, +-- such as \"10GB-10TB\". +dtValidDiskSize :: Lens' DiskType (Maybe Text) +dtValidDiskSize + = lens _dtValidDiskSize + (\ s a -> s{_dtValidDiskSize = a}) + +-- | [Output Only] An optional textual description of the resource. +dtDescription :: Lens' DiskType (Maybe Text) +dtDescription + = lens _dtDescription + (\ s a -> s{_dtDescription = a}) + +-- | [Output Only] Server-defined default disk size in GB. +dtDefaultDiskSizeGb :: Lens' DiskType (Maybe Int64) +dtDefaultDiskSizeGb + = lens _dtDefaultDiskSizeGb + (\ s a -> s{_dtDefaultDiskSizeGb = a}) + +-- | [Output Only] The deprecation status associated with this disk type. +dtDeprecated :: Lens' DiskType (Maybe (Maybe DeprecationStatus)) +dtDeprecated + = lens _dtDeprecated (\ s a -> s{_dtDeprecated = a}) + +instance FromJSON DiskType where + parseJSON + = withObject "DiskType" + (\ o -> + DiskType <$> + (o .:? "kind" .!= "compute#diskType") <*> + (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "validDiskSize") + <*> (o .:? "description") + <*> (o .:? "defaultDiskSizeGb") + <*> (o .:? "deprecated")) + +instance ToJSON DiskType where + toJSON DiskType{..} + = object + (catMaybes + [Just ("kind" .= _dtKind), ("zone" .=) <$> _dtZone, + ("selfLink" .=) <$> _dtSelfLink, + ("name" .=) <$> _dtName, + ("creationTimestamp" .=) <$> _dtCreationTimestamp, + ("id" .=) <$> _dtId, + ("validDiskSize" .=) <$> _dtValidDiskSize, + ("description" .=) <$> _dtDescription, + ("defaultDiskSizeGb" .=) <$> _dtDefaultDiskSizeGb, + ("deprecated" .=) <$> _dtDeprecated]) + +-- | Message representing the validation result for a UrlMap. +-- +-- /See:/ 'uRLMapValidationResult' smart constructor. +data URLMapValidationResult = URLMapValidationResult + { _umvrLoadErrors :: !(Maybe [Text]) + , _umvrLoadSucceeded :: !(Maybe Bool) + , _umvrTestPassed :: !(Maybe Bool) + , _umvrTestFailures :: !(Maybe [Maybe TestFailure]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapValidationResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umvrLoadErrors' +-- +-- * 'umvrLoadSucceeded' +-- +-- * 'umvrTestPassed' +-- +-- * 'umvrTestFailures' +uRLMapValidationResult + :: URLMapValidationResult +uRLMapValidationResult = + URLMapValidationResult + { _umvrLoadErrors = Nothing + , _umvrLoadSucceeded = Nothing + , _umvrTestPassed = Nothing + , _umvrTestFailures = Nothing + } + +umvrLoadErrors :: Lens' URLMapValidationResult [Text] +umvrLoadErrors + = lens _umvrLoadErrors + (\ s a -> s{_umvrLoadErrors = a}) + . _Default + . _Coerce + +-- | Whether the given UrlMap can be successfully loaded. If false, +-- \'loadErrors\' indicates the reasons. +umvrLoadSucceeded :: Lens' URLMapValidationResult (Maybe Bool) +umvrLoadSucceeded + = lens _umvrLoadSucceeded + (\ s a -> s{_umvrLoadSucceeded = a}) + +-- | If successfully loaded, this field indicates whether the test passed. If +-- false, \'testFailures\'s indicate the reason of failure. +umvrTestPassed :: Lens' URLMapValidationResult (Maybe Bool) +umvrTestPassed + = lens _umvrTestPassed + (\ s a -> s{_umvrTestPassed = a}) + +umvrTestFailures :: Lens' URLMapValidationResult [Maybe TestFailure] +umvrTestFailures + = lens _umvrTestFailures + (\ s a -> s{_umvrTestFailures = a}) + . _Default + . _Coerce + +instance FromJSON URLMapValidationResult where + parseJSON + = withObject "URLMapValidationResult" + (\ o -> + URLMapValidationResult <$> + (o .:? "loadErrors" .!= mempty) <*> + (o .:? "loadSucceeded") + <*> (o .:? "testPassed") + <*> (o .:? "testFailures" .!= mempty)) + +instance ToJSON URLMapValidationResult where + toJSON URLMapValidationResult{..} + = object + (catMaybes + [("loadErrors" .=) <$> _umvrLoadErrors, + ("loadSucceeded" .=) <$> _umvrLoadSucceeded, + ("testPassed" .=) <$> _umvrTestPassed, + ("testFailures" .=) <$> _umvrTestFailures]) + +-- +-- /See:/ 'autoscaler' smart constructor. +data Autoscaler = Autoscaler + { _aaKind :: !Text + , _aaZone :: !(Maybe Text) + , _aaSelfLink :: !(Maybe Text) + , _aaName :: !(Maybe Text) + , _aaCreationTimestamp :: !(Maybe Text) + , _aaAutoscalingPolicy :: !(Maybe (Maybe AutoscalingPolicy)) + , _aaId :: !(Maybe Word64) + , _aaDescription :: !(Maybe Text) + , _aaTarget :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Autoscaler' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaKind' +-- +-- * 'aaZone' +-- +-- * 'aaSelfLink' +-- +-- * 'aaName' +-- +-- * 'aaCreationTimestamp' +-- +-- * 'aaAutoscalingPolicy' +-- +-- * 'aaId' +-- +-- * 'aaDescription' +-- +-- * 'aaTarget' +autoscaler + :: Autoscaler +autoscaler = + Autoscaler + { _aaKind = "compute#autoscaler" + , _aaZone = Nothing + , _aaSelfLink = Nothing + , _aaName = Nothing + , _aaCreationTimestamp = Nothing + , _aaAutoscalingPolicy = Nothing + , _aaId = Nothing + , _aaDescription = Nothing + , _aaTarget = Nothing + } + +-- | Type of the resource. +aaKind :: Lens' Autoscaler Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | [Output Only] URL of the zone where the instance group resides. +aaZone :: Lens' Autoscaler (Maybe Text) +aaZone = lens _aaZone (\ s a -> s{_aaZone = a}) + +-- | [Output Only] Server-defined URL for the resource. +aaSelfLink :: Lens' Autoscaler (Maybe Text) +aaSelfLink + = lens _aaSelfLink (\ s a -> s{_aaSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +aaName :: Lens' Autoscaler (Maybe Text) +aaName = lens _aaName (\ s a -> s{_aaName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +aaCreationTimestamp :: Lens' Autoscaler (Maybe Text) +aaCreationTimestamp + = lens _aaCreationTimestamp + (\ s a -> s{_aaCreationTimestamp = a}) + +-- | Autoscaling configuration. +aaAutoscalingPolicy :: Lens' Autoscaler (Maybe (Maybe AutoscalingPolicy)) +aaAutoscalingPolicy + = lens _aaAutoscalingPolicy + (\ s a -> s{_aaAutoscalingPolicy = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +aaId :: Lens' Autoscaler (Maybe Word64) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +aaDescription :: Lens' Autoscaler (Maybe Text) +aaDescription + = lens _aaDescription + (\ s a -> s{_aaDescription = a}) + +-- | URL of Instance Group Manager or Replica Pool which will be controlled +-- by Autoscaler. +aaTarget :: Lens' Autoscaler (Maybe Text) +aaTarget = lens _aaTarget (\ s a -> s{_aaTarget = a}) + +instance FromJSON Autoscaler where + parseJSON + = withObject "Autoscaler" + (\ o -> + Autoscaler <$> + (o .:? "kind" .!= "compute#autoscaler") <*> + (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "autoscalingPolicy") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "target")) + +instance ToJSON Autoscaler where + toJSON Autoscaler{..} + = object + (catMaybes + [Just ("kind" .= _aaKind), ("zone" .=) <$> _aaZone, + ("selfLink" .=) <$> _aaSelfLink, + ("name" .=) <$> _aaName, + ("creationTimestamp" .=) <$> _aaCreationTimestamp, + ("autoscalingPolicy" .=) <$> _aaAutoscalingPolicy, + ("id" .=) <$> _aaId, + ("description" .=) <$> _aaDescription, + ("target" .=) <$> _aaTarget]) + +-- +-- /See:/ 'instanceGroupsListInstances' smart constructor. +data InstanceGroupsListInstances = InstanceGroupsListInstances + { _igliNextPageToken :: !(Maybe Text) + , _igliKind :: !Text + , _igliItems :: !(Maybe [Maybe InstanceWithNamedPorts]) + , _igliSelfLink :: !(Maybe Text) + , _igliId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsListInstances' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igliNextPageToken' +-- +-- * 'igliKind' +-- +-- * 'igliItems' +-- +-- * 'igliSelfLink' +-- +-- * 'igliId' +instanceGroupsListInstances + :: InstanceGroupsListInstances +instanceGroupsListInstances = + InstanceGroupsListInstances + { _igliNextPageToken = Nothing + , _igliKind = "compute#instanceGroupsListInstances" + , _igliItems = Nothing + , _igliSelfLink = Nothing + , _igliId = Nothing + } + +-- | [Output Only] A token that is used to continue a truncated list request. +igliNextPageToken :: Lens' InstanceGroupsListInstances (Maybe Text) +igliNextPageToken + = lens _igliNextPageToken + (\ s a -> s{_igliNextPageToken = a}) + +-- | [Output Only] The resource type, which is always +-- compute#instanceGroupsListInstances for lists of instance groups. +igliKind :: Lens' InstanceGroupsListInstances Text +igliKind = lens _igliKind (\ s a -> s{_igliKind = a}) + +-- | A list of InstanceWithNamedPorts resources, which contains all named +-- ports for the given instance. +igliItems :: Lens' InstanceGroupsListInstances [Maybe InstanceWithNamedPorts] +igliItems + = lens _igliItems (\ s a -> s{_igliItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The URL for this list of instance groups. The server +-- defines this URL. +igliSelfLink :: Lens' InstanceGroupsListInstances (Maybe Text) +igliSelfLink + = lens _igliSelfLink (\ s a -> s{_igliSelfLink = a}) + +-- | [Output Only] A unique identifier for this list of instance groups. The +-- server defines this identifier. +igliId :: Lens' InstanceGroupsListInstances (Maybe Text) +igliId = lens _igliId (\ s a -> s{_igliId = a}) + +instance FromJSON InstanceGroupsListInstances where + parseJSON + = withObject "InstanceGroupsListInstances" + (\ o -> + InstanceGroupsListInstances <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#instanceGroupsListInstances") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupsListInstances where + toJSON InstanceGroupsListInstances{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _igliNextPageToken, + Just ("kind" .= _igliKind), + ("items" .=) <$> _igliItems, + ("selfLink" .=) <$> _igliSelfLink, + ("id" .=) <$> _igliId]) + +-- | A metadata key\/value entry. +-- +-- /See:/ 'metadata' smart constructor. +data Metadata = Metadata + { _mKind :: !Text + , _mFingerprint :: !(Maybe Word8) + , _mItems :: !(Maybe [MetadataItemsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mFingerprint' +-- +-- * 'mItems' +metadata + :: Metadata +metadata = + Metadata + { _mKind = "compute#metadata" + , _mFingerprint = Nothing + , _mItems = Nothing + } + +-- | [Output Only] Type of the resource. Always compute#metadata for +-- metadata. +mKind :: Lens' Metadata Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | Specifies a fingerprint for this request, which is essentially a hash of +-- the metadata\'s contents and used for optimistic locking. The +-- fingerprint is initially generated by Compute Engine and changes after +-- every request to modify or update metadata. You must always provide an +-- up-to-date fingerprint hash in order to update or change metadata. +mFingerprint :: Lens' Metadata (Maybe Word8) +mFingerprint + = lens _mFingerprint (\ s a -> s{_mFingerprint = a}) + +-- | Array of key\/value pairs. The total size of all keys and values must be +-- less than 512 KB. +mItems :: Lens' Metadata [MetadataItemsItem] +mItems + = lens _mItems (\ s a -> s{_mItems = a}) . _Default . + _Coerce + +instance FromJSON Metadata where + parseJSON + = withObject "Metadata" + (\ o -> + Metadata <$> + (o .:? "kind" .!= "compute#metadata") <*> + (o .:? "fingerprint") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Metadata where + toJSON Metadata{..} + = object + (catMaybes + [Just ("kind" .= _mKind), + ("fingerprint" .=) <$> _mFingerprint, + ("items" .=) <$> _mItems]) + +-- | A TargetHttpProxy resource. This resource defines an HTTP proxy. +-- +-- /See:/ 'targetHTTPProxy' smart constructor. +data TargetHTTPProxy = TargetHTTPProxy + { _thttppUrlMap :: !(Maybe Text) + , _thttppKind :: !Text + , _thttppSelfLink :: !(Maybe Text) + , _thttppName :: !(Maybe Text) + , _thttppCreationTimestamp :: !(Maybe Text) + , _thttppId :: !(Maybe Word64) + , _thttppDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttppUrlMap' +-- +-- * 'thttppKind' +-- +-- * 'thttppSelfLink' +-- +-- * 'thttppName' +-- +-- * 'thttppCreationTimestamp' +-- +-- * 'thttppId' +-- +-- * 'thttppDescription' +targetHTTPProxy + :: TargetHTTPProxy +targetHTTPProxy = + TargetHTTPProxy + { _thttppUrlMap = Nothing + , _thttppKind = "compute#targetHttpProxy" + , _thttppSelfLink = Nothing + , _thttppName = Nothing + , _thttppCreationTimestamp = Nothing + , _thttppId = Nothing + , _thttppDescription = Nothing + } + +-- | URL to the UrlMap resource that defines the mapping from URL to the +-- BackendService. +thttppUrlMap :: Lens' TargetHTTPProxy (Maybe Text) +thttppUrlMap + = lens _thttppUrlMap (\ s a -> s{_thttppUrlMap = a}) + +-- | [Output Only] Type of resource. Always compute#Operation for Operation +-- resources. +thttppKind :: Lens' TargetHTTPProxy Text +thttppKind + = lens _thttppKind (\ s a -> s{_thttppKind = a}) + +-- | [Output Only] Server-defined URL for the resource. +thttppSelfLink :: Lens' TargetHTTPProxy (Maybe Text) +thttppSelfLink + = lens _thttppSelfLink + (\ s a -> s{_thttppSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +thttppName :: Lens' TargetHTTPProxy (Maybe Text) +thttppName + = lens _thttppName (\ s a -> s{_thttppName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +thttppCreationTimestamp :: Lens' TargetHTTPProxy (Maybe Text) +thttppCreationTimestamp + = lens _thttppCreationTimestamp + (\ s a -> s{_thttppCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +thttppId :: Lens' TargetHTTPProxy (Maybe Word64) +thttppId = lens _thttppId (\ s a -> s{_thttppId = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +thttppDescription :: Lens' TargetHTTPProxy (Maybe Text) +thttppDescription + = lens _thttppDescription + (\ s a -> s{_thttppDescription = a}) + +instance FromJSON TargetHTTPProxy where + parseJSON + = withObject "TargetHTTPProxy" + (\ o -> + TargetHTTPProxy <$> + (o .:? "urlMap") <*> + (o .:? "kind" .!= "compute#targetHttpProxy") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON TargetHTTPProxy where + toJSON TargetHTTPProxy{..} + = object + (catMaybes + [("urlMap" .=) <$> _thttppUrlMap, + Just ("kind" .= _thttppKind), + ("selfLink" .=) <$> _thttppSelfLink, + ("name" .=) <$> _thttppName, + ("creationTimestamp" .=) <$> + _thttppCreationTimestamp, + ("id" .=) <$> _thttppId, + ("description" .=) <$> _thttppDescription]) + +-- | Region resource. +-- +-- /See:/ 'region' smart constructor. +data Region = Region + { _rrStatus :: !(Maybe Text) + , _rrZones :: !(Maybe [Text]) + , _rrKind :: !Text + , _rrSelfLink :: !(Maybe Text) + , _rrName :: !(Maybe Text) + , _rrCreationTimestamp :: !(Maybe Text) + , _rrQuotas :: !(Maybe [Maybe Quota]) + , _rrId :: !(Maybe Word64) + , _rrDescription :: !(Maybe Text) + , _rrDeprecated :: !(Maybe (Maybe DeprecationStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Region' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrStatus' +-- +-- * 'rrZones' +-- +-- * 'rrKind' +-- +-- * 'rrSelfLink' +-- +-- * 'rrName' +-- +-- * 'rrCreationTimestamp' +-- +-- * 'rrQuotas' +-- +-- * 'rrId' +-- +-- * 'rrDescription' +-- +-- * 'rrDeprecated' +region + :: Region +region = + Region + { _rrStatus = Nothing + , _rrZones = Nothing + , _rrKind = "compute#region" + , _rrSelfLink = Nothing + , _rrName = Nothing + , _rrCreationTimestamp = Nothing + , _rrQuotas = Nothing + , _rrId = Nothing + , _rrDescription = Nothing + , _rrDeprecated = Nothing + } + +-- | [Output Only] Status of the region, either UP or DOWN. +rrStatus :: Lens' Region (Maybe Text) +rrStatus = lens _rrStatus (\ s a -> s{_rrStatus = a}) + +-- | [Output Only] A list of zones available in this region, in the form of +-- resource URLs. +rrZones :: Lens' Region [Text] +rrZones + = lens _rrZones (\ s a -> s{_rrZones = a}) . _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always compute#region for regions. +rrKind :: Lens' Region Text +rrKind = lens _rrKind (\ s a -> s{_rrKind = a}) + +-- | [Output Only] Server-defined URL for the resource. +rrSelfLink :: Lens' Region (Maybe Text) +rrSelfLink + = lens _rrSelfLink (\ s a -> s{_rrSelfLink = a}) + +-- | [Output Only] Name of the resource. +rrName :: Lens' Region (Maybe Text) +rrName = lens _rrName (\ s a -> s{_rrName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +rrCreationTimestamp :: Lens' Region (Maybe Text) +rrCreationTimestamp + = lens _rrCreationTimestamp + (\ s a -> s{_rrCreationTimestamp = a}) + +-- | [Output Only] Quotas assigned to this region. +rrQuotas :: Lens' Region [Maybe Quota] +rrQuotas + = lens _rrQuotas (\ s a -> s{_rrQuotas = a}) . + _Default + . _Coerce + +-- | [Output Only] Unique identifier for the resource; defined by the server +-- . +rrId :: Lens' Region (Maybe Word64) +rrId = lens _rrId (\ s a -> s{_rrId = a}) + +-- | [Output Only] Textual description of the resource. +rrDescription :: Lens' Region (Maybe Text) +rrDescription + = lens _rrDescription + (\ s a -> s{_rrDescription = a}) + +-- | [Output Only] The deprecation status associated with this region. +rrDeprecated :: Lens' Region (Maybe (Maybe DeprecationStatus)) +rrDeprecated + = lens _rrDeprecated (\ s a -> s{_rrDeprecated = a}) + +instance FromJSON Region where + parseJSON + = withObject "Region" + (\ o -> + Region <$> + (o .:? "status") <*> (o .:? "zones" .!= mempty) <*> + (o .:? "kind" .!= "compute#region") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "quotas" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "deprecated")) + +instance ToJSON Region where + toJSON Region{..} + = object + (catMaybes + [("status" .=) <$> _rrStatus, + ("zones" .=) <$> _rrZones, Just ("kind" .= _rrKind), + ("selfLink" .=) <$> _rrSelfLink, + ("name" .=) <$> _rrName, + ("creationTimestamp" .=) <$> _rrCreationTimestamp, + ("quotas" .=) <$> _rrQuotas, ("id" .=) <$> _rrId, + ("description" .=) <$> _rrDescription, + ("deprecated" .=) <$> _rrDeprecated]) + +-- +-- /See:/ 'vPNTunnel' smart constructor. +data VPNTunnel = VPNTunnel + { _vtDetailedStatus :: !(Maybe Text) + , _vtStatus :: !(Maybe Text) + , _vtKind :: !Text + , _vtPeerIp :: !(Maybe Text) + , _vtTargetVpnGateway :: !(Maybe Text) + , _vtSelfLink :: !(Maybe Text) + , _vtSharedSecret :: !(Maybe Text) + , _vtName :: !(Maybe Text) + , _vtCreationTimestamp :: !(Maybe Text) + , _vtSharedSecretHash :: !(Maybe Text) + , _vtId :: !(Maybe Word64) + , _vtIkeVersion :: !(Maybe Int32) + , _vtRegion :: !(Maybe Text) + , _vtDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtDetailedStatus' +-- +-- * 'vtStatus' +-- +-- * 'vtKind' +-- +-- * 'vtPeerIp' +-- +-- * 'vtTargetVpnGateway' +-- +-- * 'vtSelfLink' +-- +-- * 'vtSharedSecret' +-- +-- * 'vtName' +-- +-- * 'vtCreationTimestamp' +-- +-- * 'vtSharedSecretHash' +-- +-- * 'vtId' +-- +-- * 'vtIkeVersion' +-- +-- * 'vtRegion' +-- +-- * 'vtDescription' +vPNTunnel + :: VPNTunnel +vPNTunnel = + VPNTunnel + { _vtDetailedStatus = Nothing + , _vtStatus = Nothing + , _vtKind = "compute#vpnTunnel" + , _vtPeerIp = Nothing + , _vtTargetVpnGateway = Nothing + , _vtSelfLink = Nothing + , _vtSharedSecret = Nothing + , _vtName = Nothing + , _vtCreationTimestamp = Nothing + , _vtSharedSecretHash = Nothing + , _vtId = Nothing + , _vtIkeVersion = Nothing + , _vtRegion = Nothing + , _vtDescription = Nothing + } + +-- | [Output Only] Detailed status message for the VPN tunnel. +vtDetailedStatus :: Lens' VPNTunnel (Maybe Text) +vtDetailedStatus + = lens _vtDetailedStatus + (\ s a -> s{_vtDetailedStatus = a}) + +-- | [Output Only] The status of the VPN tunnel. +vtStatus :: Lens' VPNTunnel (Maybe Text) +vtStatus = lens _vtStatus (\ s a -> s{_vtStatus = a}) + +-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN +-- tunnels. +vtKind :: Lens' VPNTunnel Text +vtKind = lens _vtKind (\ s a -> s{_vtKind = a}) + +-- | IP address of the peer VPN gateway. +vtPeerIp :: Lens' VPNTunnel (Maybe Text) +vtPeerIp = lens _vtPeerIp (\ s a -> s{_vtPeerIp = a}) + +-- | URL of the VPN gateway to which this VPN tunnel is associated. Provided +-- by the client when the VPN tunnel is created. +vtTargetVpnGateway :: Lens' VPNTunnel (Maybe Text) +vtTargetVpnGateway + = lens _vtTargetVpnGateway + (\ s a -> s{_vtTargetVpnGateway = a}) + +-- | [Output Only] Server-defined URL for the resource. +vtSelfLink :: Lens' VPNTunnel (Maybe Text) +vtSelfLink + = lens _vtSelfLink (\ s a -> s{_vtSelfLink = a}) + +-- | Shared secret used to set the secure session between the GCE VPN gateway +-- and the peer VPN gateway. +vtSharedSecret :: Lens' VPNTunnel (Maybe Text) +vtSharedSecret + = lens _vtSharedSecret + (\ s a -> s{_vtSharedSecret = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +vtName :: Lens' VPNTunnel (Maybe Text) +vtName = lens _vtName (\ s a -> s{_vtName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +vtCreationTimestamp :: Lens' VPNTunnel (Maybe Text) +vtCreationTimestamp + = lens _vtCreationTimestamp + (\ s a -> s{_vtCreationTimestamp = a}) + +-- | Hash of the shared secret. +vtSharedSecretHash :: Lens' VPNTunnel (Maybe Text) +vtSharedSecretHash + = lens _vtSharedSecretHash + (\ s a -> s{_vtSharedSecretHash = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +vtId :: Lens' VPNTunnel (Maybe Word64) +vtId = lens _vtId (\ s a -> s{_vtId = a}) + +-- | IKE protocol version to use when establishing the VPN tunnel with peer +-- VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. +vtIkeVersion :: Lens' VPNTunnel (Maybe Int32) +vtIkeVersion + = lens _vtIkeVersion (\ s a -> s{_vtIkeVersion = a}) + +-- | [Output Only] URL of the region where the VPN tunnel resides. +vtRegion :: Lens' VPNTunnel (Maybe Text) +vtRegion = lens _vtRegion (\ s a -> s{_vtRegion = a}) + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +vtDescription :: Lens' VPNTunnel (Maybe Text) +vtDescription + = lens _vtDescription + (\ s a -> s{_vtDescription = a}) + +instance FromJSON VPNTunnel where + parseJSON + = withObject "VPNTunnel" + (\ o -> + VPNTunnel <$> + (o .:? "detailedStatus") <*> (o .:? "status") <*> + (o .:? "kind" .!= "compute#vpnTunnel") + <*> (o .:? "peerIp") + <*> (o .:? "targetVpnGateway") + <*> (o .:? "selfLink") + <*> (o .:? "sharedSecret") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "sharedSecretHash") + <*> (o .:? "id") + <*> (o .:? "ikeVersion") + <*> (o .:? "region") + <*> (o .:? "description")) + +instance ToJSON VPNTunnel where + toJSON VPNTunnel{..} + = object + (catMaybes + [("detailedStatus" .=) <$> _vtDetailedStatus, + ("status" .=) <$> _vtStatus, + Just ("kind" .= _vtKind), + ("peerIp" .=) <$> _vtPeerIp, + ("targetVpnGateway" .=) <$> _vtTargetVpnGateway, + ("selfLink" .=) <$> _vtSelfLink, + ("sharedSecret" .=) <$> _vtSharedSecret, + ("name" .=) <$> _vtName, + ("creationTimestamp" .=) <$> _vtCreationTimestamp, + ("sharedSecretHash" .=) <$> _vtSharedSecretHash, + ("id" .=) <$> _vtId, + ("ikeVersion" .=) <$> _vtIkeVersion, + ("region" .=) <$> _vtRegion, + ("description" .=) <$> _vtDescription]) + +-- | Sets the scheduling options for an Instance. +-- +-- /See:/ 'scheduling' smart constructor. +data Scheduling = Scheduling + { _sAutomaticRestart :: !(Maybe Bool) + , _sOnHostMaintenance :: !(Maybe Text) + , _sPreemptible :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Scheduling' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sAutomaticRestart' +-- +-- * 'sOnHostMaintenance' +-- +-- * 'sPreemptible' +scheduling + :: Scheduling +scheduling = + Scheduling + { _sAutomaticRestart = Nothing + , _sOnHostMaintenance = Nothing + , _sPreemptible = Nothing + } + +-- | Specifies whether the instance should be automatically restarted if it +-- is terminated by Compute Engine (not terminated by a user). You can only +-- set the automatic restart option for standard instances. Preemptible +-- instances cannot be automatically restarted. +sAutomaticRestart :: Lens' Scheduling (Maybe Bool) +sAutomaticRestart + = lens _sAutomaticRestart + (\ s a -> s{_sAutomaticRestart = a}) + +-- | Defines the maintenance behavior for this instance. For standard +-- instances, the default behavior is MIGRATE. For preemptible instances, +-- the default and only possible behavior is TERMINATE. For more +-- information, see Setting maintenance behavior. +sOnHostMaintenance :: Lens' Scheduling (Maybe Text) +sOnHostMaintenance + = lens _sOnHostMaintenance + (\ s a -> s{_sOnHostMaintenance = a}) + +-- | Whether the instance is preemptible. +sPreemptible :: Lens' Scheduling (Maybe Bool) +sPreemptible + = lens _sPreemptible (\ s a -> s{_sPreemptible = a}) + +instance FromJSON Scheduling where + parseJSON + = withObject "Scheduling" + (\ o -> + Scheduling <$> + (o .:? "automaticRestart") <*> + (o .:? "onHostMaintenance") + <*> (o .:? "preemptible")) + +instance ToJSON Scheduling where + toJSON Scheduling{..} + = object + (catMaybes + [("automaticRestart" .=) <$> _sAutomaticRestart, + ("onHostMaintenance" .=) <$> _sOnHostMaintenance, + ("preemptible" .=) <$> _sPreemptible]) + +-- +-- /See:/ 'healthStatus' smart constructor. +data HealthStatus = HealthStatus + { _hsIpAddress :: !(Maybe Text) + , _hsHealthState :: !(Maybe Text) + , _hsPort :: !(Maybe Int32) + , _hsInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HealthStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hsIpAddress' +-- +-- * 'hsHealthState' +-- +-- * 'hsPort' +-- +-- * 'hsInstance' +healthStatus + :: HealthStatus +healthStatus = + HealthStatus + { _hsIpAddress = Nothing + , _hsHealthState = Nothing + , _hsPort = Nothing + , _hsInstance = Nothing + } + +-- | The IP address represented by this resource. +hsIpAddress :: Lens' HealthStatus (Maybe Text) +hsIpAddress + = lens _hsIpAddress (\ s a -> s{_hsIpAddress = a}) + +-- | Health state of the instance. +hsHealthState :: Lens' HealthStatus (Maybe Text) +hsHealthState + = lens _hsHealthState + (\ s a -> s{_hsHealthState = a}) + +-- | The port on the instance. +hsPort :: Lens' HealthStatus (Maybe Int32) +hsPort = lens _hsPort (\ s a -> s{_hsPort = a}) + +-- | URL of the instance resource. +hsInstance :: Lens' HealthStatus (Maybe Text) +hsInstance + = lens _hsInstance (\ s a -> s{_hsInstance = a}) + +instance FromJSON HealthStatus where + parseJSON + = withObject "HealthStatus" + (\ o -> + HealthStatus <$> + (o .:? "ipAddress") <*> (o .:? "healthState") <*> + (o .:? "port") + <*> (o .:? "instance")) + +instance ToJSON HealthStatus where + toJSON HealthStatus{..} + = object + (catMaybes + [("ipAddress" .=) <$> _hsIpAddress, + ("healthState" .=) <$> _hsHealthState, + ("port" .=) <$> _hsPort, + ("instance" .=) <$> _hsInstance]) + +-- | Contains a list of HttpHealthCheck resources. +-- +-- /See:/ 'hTTPHealthCheckList' smart constructor. +data HTTPHealthCheckList = HTTPHealthCheckList + { _httphclNextPageToken :: !(Maybe Text) + , _httphclKind :: !Text + , _httphclItems :: !(Maybe [Maybe HTTPHealthCheck]) + , _httphclSelfLink :: !(Maybe Text) + , _httphclId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthCheckList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphclNextPageToken' +-- +-- * 'httphclKind' +-- +-- * 'httphclItems' +-- +-- * 'httphclSelfLink' +-- +-- * 'httphclId' +hTTPHealthCheckList + :: HTTPHealthCheckList +hTTPHealthCheckList = + HTTPHealthCheckList + { _httphclNextPageToken = Nothing + , _httphclKind = "compute#httpHealthCheckList" + , _httphclItems = Nothing + , _httphclSelfLink = Nothing + , _httphclId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +httphclNextPageToken :: Lens' HTTPHealthCheckList (Maybe Text) +httphclNextPageToken + = lens _httphclNextPageToken + (\ s a -> s{_httphclNextPageToken = a}) + +-- | Type of resource. +httphclKind :: Lens' HTTPHealthCheckList Text +httphclKind + = lens _httphclKind (\ s a -> s{_httphclKind = a}) + +-- | A list of HttpHealthCheck resources. +httphclItems :: Lens' HTTPHealthCheckList [Maybe HTTPHealthCheck] +httphclItems + = lens _httphclItems (\ s a -> s{_httphclItems = a}) + . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +httphclSelfLink :: Lens' HTTPHealthCheckList (Maybe Text) +httphclSelfLink + = lens _httphclSelfLink + (\ s a -> s{_httphclSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +httphclId :: Lens' HTTPHealthCheckList (Maybe Text) +httphclId + = lens _httphclId (\ s a -> s{_httphclId = a}) + +instance FromJSON HTTPHealthCheckList where + parseJSON + = withObject "HTTPHealthCheckList" + (\ o -> + HTTPHealthCheckList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#httpHealthCheckList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON HTTPHealthCheckList where + toJSON HTTPHealthCheckList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _httphclNextPageToken, + Just ("kind" .= _httphclKind), + ("items" .=) <$> _httphclItems, + ("selfLink" .=) <$> _httphclSelfLink, + ("id" .=) <$> _httphclId]) + +-- +-- /See:/ 'uRLMapsValidateRequest' smart constructor. +newtype URLMapsValidateRequest = URLMapsValidateRequest + { _umvrResource :: Maybe (Maybe URLMap) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsValidateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umvrResource' +uRLMapsValidateRequest + :: URLMapsValidateRequest +uRLMapsValidateRequest = + URLMapsValidateRequest + { _umvrResource = Nothing + } + +-- | Content of the UrlMap to be validated. +umvrResource :: Lens' URLMapsValidateRequest (Maybe (Maybe URLMap)) +umvrResource + = lens _umvrResource (\ s a -> s{_umvrResource = a}) + +instance FromJSON URLMapsValidateRequest where + parseJSON + = withObject "URLMapsValidateRequest" + (\ o -> + URLMapsValidateRequest <$> (o .:? "resource")) + +instance ToJSON URLMapsValidateRequest where + toJSON URLMapsValidateRequest{..} + = object + (catMaybes [("resource" .=) <$> _umvrResource]) + +-- | A path-matching rule for a URL. If matched, will use the specified +-- BackendService to handle the traffic arriving at this URL. +-- +-- /See:/ 'pathRule' smart constructor. +data PathRule = PathRule + { _prService :: !(Maybe Text) + , _prPaths :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PathRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prService' +-- +-- * 'prPaths' +pathRule + :: PathRule +pathRule = + PathRule + { _prService = Nothing + , _prPaths = Nothing + } + +-- | The URL of the BackendService resource if this rule is matched. +prService :: Lens' PathRule (Maybe Text) +prService + = lens _prService (\ s a -> s{_prService = a}) + +-- | The list of path patterns to match. Each must start with \/ and the only +-- place a * is allowed is at the end following a \/. The string fed to the +-- path matcher does not include any text after the first ? or #, and those +-- chars are not allowed here. +prPaths :: Lens' PathRule [Text] +prPaths + = lens _prPaths (\ s a -> s{_prPaths = a}) . _Default + . _Coerce + +instance FromJSON PathRule where + parseJSON + = withObject "PathRule" + (\ o -> + PathRule <$> + (o .:? "service") <*> (o .:? "paths" .!= mempty)) + +instance ToJSON PathRule where + toJSON PathRule{..} + = object + (catMaybes + [("service" .=) <$> _prService, + ("paths" .=) <$> _prPaths]) + +-- | Contains a list of BackendService resources. +-- +-- /See:/ 'backendServiceList' smart constructor. +data BackendServiceList = BackendServiceList + { _bslNextPageToken :: !(Maybe Text) + , _bslKind :: !Text + , _bslItems :: !(Maybe [Maybe BackendService]) + , _bslSelfLink :: !(Maybe Text) + , _bslId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServiceList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bslNextPageToken' +-- +-- * 'bslKind' +-- +-- * 'bslItems' +-- +-- * 'bslSelfLink' +-- +-- * 'bslId' +backendServiceList + :: BackendServiceList +backendServiceList = + BackendServiceList + { _bslNextPageToken = Nothing + , _bslKind = "compute#backendServiceList" + , _bslItems = Nothing + , _bslSelfLink = Nothing + , _bslId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +bslNextPageToken :: Lens' BackendServiceList (Maybe Text) +bslNextPageToken + = lens _bslNextPageToken + (\ s a -> s{_bslNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#backendServiceList for +-- lists of backend services. +bslKind :: Lens' BackendServiceList Text +bslKind = lens _bslKind (\ s a -> s{_bslKind = a}) + +-- | A list of BackendService resources. +bslItems :: Lens' BackendServiceList [Maybe BackendService] +bslItems + = lens _bslItems (\ s a -> s{_bslItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +bslSelfLink :: Lens' BackendServiceList (Maybe Text) +bslSelfLink + = lens _bslSelfLink (\ s a -> s{_bslSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +bslId :: Lens' BackendServiceList (Maybe Text) +bslId = lens _bslId (\ s a -> s{_bslId = a}) + +instance FromJSON BackendServiceList where + parseJSON + = withObject "BackendServiceList" + (\ o -> + BackendServiceList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#backendServiceList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON BackendServiceList where + toJSON BackendServiceList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _bslNextPageToken, + Just ("kind" .= _bslKind), + ("items" .=) <$> _bslItems, + ("selfLink" .=) <$> _bslSelfLink, + ("id" .=) <$> _bslId]) + +-- | A license resource. +-- +-- /See:/ 'license' smart constructor. +data License = License + { _lChargesUseFee :: !(Maybe Bool) + , _lKind :: !Text + , _lSelfLink :: !(Maybe Text) + , _lName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'License' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lChargesUseFee' +-- +-- * 'lKind' +-- +-- * 'lSelfLink' +-- +-- * 'lName' +license + :: License +license = + License + { _lChargesUseFee = Nothing + , _lKind = "compute#license" + , _lSelfLink = Nothing + , _lName = Nothing + } + +-- | If true, the customer will be charged license fee for running software +-- that contains this license on an instance. +lChargesUseFee :: Lens' License (Maybe Bool) +lChargesUseFee + = lens _lChargesUseFee + (\ s a -> s{_lChargesUseFee = a}) + +-- | [Output Only] Type of resource. Always compute#license for licenses. +lKind :: Lens' License Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | [Output Only] Server-defined URL for the resource. +lSelfLink :: Lens' License (Maybe Text) +lSelfLink + = lens _lSelfLink (\ s a -> s{_lSelfLink = a}) + +-- | [Output Only] Name of the resource. The name is 1-63 characters long and +-- complies with RFC1035. +lName :: Lens' License (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +instance FromJSON License where + parseJSON + = withObject "License" + (\ o -> + License <$> + (o .:? "chargesUseFee") <*> + (o .:? "kind" .!= "compute#license") + <*> (o .:? "selfLink") + <*> (o .:? "name")) + +instance ToJSON License where + toJSON License{..} + = object + (catMaybes + [("chargesUseFee" .=) <$> _lChargesUseFee, + Just ("kind" .= _lKind), + ("selfLink" .=) <$> _lSelfLink, + ("name" .=) <$> _lName]) + +-- | Contains a list of instance resources. +-- +-- /See:/ 'instanceList' smart constructor. +data InstanceList = InstanceList + { _insNextPageToken :: !(Maybe Text) + , _insKind :: !Text + , _insItems :: !(Maybe [Maybe Instance]) + , _insSelfLink :: !(Maybe Text) + , _insId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'insNextPageToken' +-- +-- * 'insKind' +-- +-- * 'insItems' +-- +-- * 'insSelfLink' +-- +-- * 'insId' +instanceList + :: InstanceList +instanceList = + InstanceList + { _insNextPageToken = Nothing + , _insKind = "compute#instanceList" + , _insItems = Nothing + , _insSelfLink = Nothing + , _insId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +insNextPageToken :: Lens' InstanceList (Maybe Text) +insNextPageToken + = lens _insNextPageToken + (\ s a -> s{_insNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#instanceList for lists of +-- Instance resources. +insKind :: Lens' InstanceList Text +insKind = lens _insKind (\ s a -> s{_insKind = a}) + +-- | [Output Only] A list of Instance resources. +insItems :: Lens' InstanceList [Maybe Instance] +insItems + = lens _insItems (\ s a -> s{_insItems = a}) . + _Default + . _Coerce + +-- | [Output Only] Server defined URL for this resource. +insSelfLink :: Lens' InstanceList (Maybe Text) +insSelfLink + = lens _insSelfLink (\ s a -> s{_insSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +insId :: Lens' InstanceList (Maybe Text) +insId = lens _insId (\ s a -> s{_insId = a}) + +instance FromJSON InstanceList where + parseJSON + = withObject "InstanceList" + (\ o -> + InstanceList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#instanceList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceList where + toJSON InstanceList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _insNextPageToken, + Just ("kind" .= _insKind), + ("items" .=) <$> _insItems, + ("selfLink" .=) <$> _insSelfLink, + ("id" .=) <$> _insId]) + +-- +-- /See:/ 'managedInstanceLastAttempt' smart constructor. +newtype ManagedInstanceLastAttempt = ManagedInstanceLastAttempt + { _milaErrors :: Maybe ManagedInstanceLastAttemptErrors + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedInstanceLastAttempt' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'milaErrors' +managedInstanceLastAttempt + :: ManagedInstanceLastAttempt +managedInstanceLastAttempt = + ManagedInstanceLastAttempt + { _milaErrors = Nothing + } + +-- | Encountered errors during the last attempt to create or delete the +-- instance. +milaErrors :: Lens' ManagedInstanceLastAttempt (Maybe ManagedInstanceLastAttemptErrors) +milaErrors + = lens _milaErrors (\ s a -> s{_milaErrors = a}) + +instance FromJSON ManagedInstanceLastAttempt where + parseJSON + = withObject "ManagedInstanceLastAttempt" + (\ o -> + ManagedInstanceLastAttempt <$> (o .:? "errors")) + +instance ToJSON ManagedInstanceLastAttempt where + toJSON ManagedInstanceLastAttempt{..} + = object (catMaybes [("errors" .=) <$> _milaErrors]) + +-- +-- /See:/ 'instanceGroupManagersSetTargetPoolsRequest' smart constructor. +data InstanceGroupManagersSetTargetPoolsRequest = InstanceGroupManagersSetTargetPoolsRequest + { _igmstprFingerprint :: !(Maybe Word8) + , _igmstprTargetPools :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetTargetPoolsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmstprFingerprint' +-- +-- * 'igmstprTargetPools' +instanceGroupManagersSetTargetPoolsRequest + :: InstanceGroupManagersSetTargetPoolsRequest +instanceGroupManagersSetTargetPoolsRequest = + InstanceGroupManagersSetTargetPoolsRequest + { _igmstprFingerprint = Nothing + , _igmstprTargetPools = Nothing + } + +-- | The fingerprint of the target pools information, which is a hash of the +-- contents. This field is used for optimistic locking when updating the +-- target pool entries. +igmstprFingerprint :: Lens' InstanceGroupManagersSetTargetPoolsRequest (Maybe Word8) +igmstprFingerprint + = lens _igmstprFingerprint + (\ s a -> s{_igmstprFingerprint = a}) + +-- | The list of target pool URLs that instances in this managed instance +-- group belong to. When the managed instance group creates new instances, +-- the group automatically adds those instances to the target pools that +-- are specified in this parameter. Changing the value of this parameter +-- does not change the target pools of existing instances in this managed +-- instance group. +igmstprTargetPools :: Lens' InstanceGroupManagersSetTargetPoolsRequest [Text] +igmstprTargetPools + = lens _igmstprTargetPools + (\ s a -> s{_igmstprTargetPools = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersSetTargetPoolsRequest where + parseJSON + = withObject + "InstanceGroupManagersSetTargetPoolsRequest" + (\ o -> + InstanceGroupManagersSetTargetPoolsRequest <$> + (o .:? "fingerprint") <*> + (o .:? "targetPools" .!= mempty)) + +instance ToJSON + InstanceGroupManagersSetTargetPoolsRequest where + toJSON InstanceGroupManagersSetTargetPoolsRequest{..} + = object + (catMaybes + [("fingerprint" .=) <$> _igmstprFingerprint, + ("targetPools" .=) <$> _igmstprTargetPools]) + +-- +-- /See:/ 'targetVPNGatewayAggregatedList' smart constructor. +data TargetVPNGatewayAggregatedList = TargetVPNGatewayAggregatedList + { _tvgalNextPageToken :: !(Maybe Text) + , _tvgalKind :: !Text + , _tvgalItems :: !(Maybe TargetVPNGatewayAggregatedListItems) + , _tvgalSelfLink :: !(Maybe Text) + , _tvgalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewayAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgalNextPageToken' +-- +-- * 'tvgalKind' +-- +-- * 'tvgalItems' +-- +-- * 'tvgalSelfLink' +-- +-- * 'tvgalId' +targetVPNGatewayAggregatedList + :: TargetVPNGatewayAggregatedList +targetVPNGatewayAggregatedList = + TargetVPNGatewayAggregatedList + { _tvgalNextPageToken = Nothing + , _tvgalKind = "compute#targetVpnGatewayAggregatedList" + , _tvgalItems = Nothing + , _tvgalSelfLink = Nothing + , _tvgalId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +tvgalNextPageToken :: Lens' TargetVPNGatewayAggregatedList (Maybe Text) +tvgalNextPageToken + = lens _tvgalNextPageToken + (\ s a -> s{_tvgalNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#targetVpnGateway for +-- target VPN gateways. +tvgalKind :: Lens' TargetVPNGatewayAggregatedList Text +tvgalKind + = lens _tvgalKind (\ s a -> s{_tvgalKind = a}) + +-- | A map of scoped target vpn gateway lists. +tvgalItems :: Lens' TargetVPNGatewayAggregatedList (Maybe TargetVPNGatewayAggregatedListItems) +tvgalItems + = lens _tvgalItems (\ s a -> s{_tvgalItems = a}) + +-- | [Output Only] Server-defined URL for the resource. +tvgalSelfLink :: Lens' TargetVPNGatewayAggregatedList (Maybe Text) +tvgalSelfLink + = lens _tvgalSelfLink + (\ s a -> s{_tvgalSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +tvgalId :: Lens' TargetVPNGatewayAggregatedList (Maybe Text) +tvgalId = lens _tvgalId (\ s a -> s{_tvgalId = a}) + +instance FromJSON TargetVPNGatewayAggregatedList + where + parseJSON + = withObject "TargetVPNGatewayAggregatedList" + (\ o -> + TargetVPNGatewayAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "compute#targetVpnGatewayAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON TargetVPNGatewayAggregatedList where + toJSON TargetVPNGatewayAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tvgalNextPageToken, + Just ("kind" .= _tvgalKind), + ("items" .=) <$> _tvgalItems, + ("selfLink" .=) <$> _tvgalSelfLink, + ("id" .=) <$> _tvgalId]) + +-- +-- /See:/ 'instanceGroup' smart constructor. +data InstanceGroup = InstanceGroup + { _igSize :: !(Maybe Int32) + , _igKind :: !Text + , _igFingerprint :: !(Maybe Word8) + , _igNetwork :: !(Maybe Text) + , _igZone :: !(Maybe Text) + , _igSelfLink :: !(Maybe Text) + , _igName :: !(Maybe Text) + , _igCreationTimestamp :: !(Maybe Text) + , _igId :: !(Maybe Word64) + , _igDescription :: !(Maybe Text) + , _igNamedPorts :: !(Maybe [Maybe NamedPort]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igSize' +-- +-- * 'igKind' +-- +-- * 'igFingerprint' +-- +-- * 'igNetwork' +-- +-- * 'igZone' +-- +-- * 'igSelfLink' +-- +-- * 'igName' +-- +-- * 'igCreationTimestamp' +-- +-- * 'igId' +-- +-- * 'igDescription' +-- +-- * 'igNamedPorts' +instanceGroup + :: InstanceGroup +instanceGroup = + InstanceGroup + { _igSize = Nothing + , _igKind = "compute#instanceGroup" + , _igFingerprint = Nothing + , _igNetwork = Nothing + , _igZone = Nothing + , _igSelfLink = Nothing + , _igName = Nothing + , _igCreationTimestamp = Nothing + , _igId = Nothing + , _igDescription = Nothing + , _igNamedPorts = Nothing + } + +-- | [Output Only] The total number of instances in the instance group. +igSize :: Lens' InstanceGroup (Maybe Int32) +igSize = lens _igSize (\ s a -> s{_igSize = a}) + +-- | [Output Only] The resource type, which is always compute#instanceGroup +-- for instance groups. +igKind :: Lens' InstanceGroup Text +igKind = lens _igKind (\ s a -> s{_igKind = a}) + +-- | [Output Only] The fingerprint of the named ports information. The system +-- uses this fingerprint to detect conflicts when multiple users change the +-- named ports information concurrently. +igFingerprint :: Lens' InstanceGroup (Maybe Word8) +igFingerprint + = lens _igFingerprint + (\ s a -> s{_igFingerprint = a}) + +-- | The URL of the network to which all instances in the instance group +-- belong. +igNetwork :: Lens' InstanceGroup (Maybe Text) +igNetwork + = lens _igNetwork (\ s a -> s{_igNetwork = a}) + +-- | The URL of the zone where the instance group is located. +igZone :: Lens' InstanceGroup (Maybe Text) +igZone = lens _igZone (\ s a -> s{_igZone = a}) + +-- | [Output Only] The URL for this instance group. The server defines this +-- URL. +igSelfLink :: Lens' InstanceGroup (Maybe Text) +igSelfLink + = lens _igSelfLink (\ s a -> s{_igSelfLink = a}) + +-- | The name of the instance group. The name must be 1-63 characters long, +-- and comply with RFC1035. +igName :: Lens' InstanceGroup (Maybe Text) +igName = lens _igName (\ s a -> s{_igName = a}) + +-- | [Output Only] The creation timestamp for this instance group in RFC3339 +-- text format. +igCreationTimestamp :: Lens' InstanceGroup (Maybe Text) +igCreationTimestamp + = lens _igCreationTimestamp + (\ s a -> s{_igCreationTimestamp = a}) + +-- | [Output Only] A unique identifier for this instance group. The server +-- defines this identifier. +igId :: Lens' InstanceGroup (Maybe Word64) +igId = lens _igId (\ s a -> s{_igId = a}) + +-- | An optional text description for the instance group. +igDescription :: Lens' InstanceGroup (Maybe Text) +igDescription + = lens _igDescription + (\ s a -> s{_igDescription = a}) + +-- | Assigns a name to a port number. For example: {name: ?http?, port: 80} +-- This allows the system to reference ports by the assigned name instead +-- of a port number. Named ports can also contain multiple ports. For +-- example: [{name: ?http?, port: 80},{name: \"http\", port: 8080}] Named +-- ports apply to all instances in this instance group. +igNamedPorts :: Lens' InstanceGroup [Maybe NamedPort] +igNamedPorts + = lens _igNamedPorts (\ s a -> s{_igNamedPorts = a}) + . _Default + . _Coerce + +instance FromJSON InstanceGroup where + parseJSON + = withObject "InstanceGroup" + (\ o -> + InstanceGroup <$> + (o .:? "size") <*> + (o .:? "kind" .!= "compute#instanceGroup") + <*> (o .:? "fingerprint") + <*> (o .:? "network") + <*> (o .:? "zone") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "namedPorts" .!= mempty)) + +instance ToJSON InstanceGroup where + toJSON InstanceGroup{..} + = object + (catMaybes + [("size" .=) <$> _igSize, Just ("kind" .= _igKind), + ("fingerprint" .=) <$> _igFingerprint, + ("network" .=) <$> _igNetwork, + ("zone" .=) <$> _igZone, + ("selfLink" .=) <$> _igSelfLink, + ("name" .=) <$> _igName, + ("creationTimestamp" .=) <$> _igCreationTimestamp, + ("id" .=) <$> _igId, + ("description" .=) <$> _igDescription, + ("namedPorts" .=) <$> _igNamedPorts]) + +-- | UrlMaps A host-matching rule for a URL. If matched, will use the named +-- PathMatcher to select the BackendService. +-- +-- /See:/ 'hostRule' smart constructor. +data HostRule = HostRule + { _hrHosts :: !(Maybe [Text]) + , _hrDescription :: !(Maybe Text) + , _hrPathMatcher :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HostRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hrHosts' +-- +-- * 'hrDescription' +-- +-- * 'hrPathMatcher' +hostRule + :: HostRule +hostRule = + HostRule + { _hrHosts = Nothing + , _hrDescription = Nothing + , _hrPathMatcher = Nothing + } + +-- | The list of host patterns to match. They must be valid hostnames except +-- that they may start with *. or *-. The * acts like a glob and will match +-- any string of atoms (separated by .s and -s) to the left. +hrHosts :: Lens' HostRule [Text] +hrHosts + = lens _hrHosts (\ s a -> s{_hrHosts = a}) . _Default + . _Coerce + +-- | An optional textual description. +hrDescription :: Lens' HostRule (Maybe Text) +hrDescription + = lens _hrDescription + (\ s a -> s{_hrDescription = a}) + +-- | The name of the PathMatcher to match the path portion of the URL, if the +-- this hostRule matches the URL\'s host portion. +hrPathMatcher :: Lens' HostRule (Maybe Text) +hrPathMatcher + = lens _hrPathMatcher + (\ s a -> s{_hrPathMatcher = a}) + +instance FromJSON HostRule where + parseJSON + = withObject "HostRule" + (\ o -> + HostRule <$> + (o .:? "hosts" .!= mempty) <*> (o .:? "description") + <*> (o .:? "pathMatcher")) + +instance ToJSON HostRule where + toJSON HostRule{..} + = object + (catMaybes + [("hosts" .=) <$> _hrHosts, + ("description" .=) <$> _hrDescription, + ("pathMatcher" .=) <$> _hrPathMatcher]) + +-- | An instance\'s serial console output. +-- +-- /See:/ 'serialPortOutput' smart constructor. +data SerialPortOutput = SerialPortOutput + { _spoContents :: !(Maybe Text) + , _spoKind :: !Text + , _spoSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SerialPortOutput' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spoContents' +-- +-- * 'spoKind' +-- +-- * 'spoSelfLink' +serialPortOutput + :: SerialPortOutput +serialPortOutput = + SerialPortOutput + { _spoContents = Nothing + , _spoKind = "compute#serialPortOutput" + , _spoSelfLink = Nothing + } + +-- | [Output Only] The contents of the console output. +spoContents :: Lens' SerialPortOutput (Maybe Text) +spoContents + = lens _spoContents (\ s a -> s{_spoContents = a}) + +-- | [Output Only] Type of the resource. Always compute#serialPortOutput for +-- serial port output. +spoKind :: Lens' SerialPortOutput Text +spoKind = lens _spoKind (\ s a -> s{_spoKind = a}) + +-- | [Output Only] Server defined URL for the resource. +spoSelfLink :: Lens' SerialPortOutput (Maybe Text) +spoSelfLink + = lens _spoSelfLink (\ s a -> s{_spoSelfLink = a}) + +instance FromJSON SerialPortOutput where + parseJSON + = withObject "SerialPortOutput" + (\ o -> + SerialPortOutput <$> + (o .:? "contents") <*> + (o .:? "kind" .!= "compute#serialPortOutput") + <*> (o .:? "selfLink")) + +instance ToJSON SerialPortOutput where + toJSON SerialPortOutput{..} + = object + (catMaybes + [("contents" .=) <$> _spoContents, + Just ("kind" .= _spoKind), + ("selfLink" .=) <$> _spoSelfLink]) + +-- +-- /See:/ 'testFailure' smart constructor. +data TestFailure = TestFailure + { _tfPath :: !(Maybe Text) + , _tfExpectedService :: !(Maybe Text) + , _tfHost :: !(Maybe Text) + , _tfActualService :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestFailure' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfPath' +-- +-- * 'tfExpectedService' +-- +-- * 'tfHost' +-- +-- * 'tfActualService' +testFailure + :: TestFailure +testFailure = + TestFailure + { _tfPath = Nothing + , _tfExpectedService = Nothing + , _tfHost = Nothing + , _tfActualService = Nothing + } + +tfPath :: Lens' TestFailure (Maybe Text) +tfPath = lens _tfPath (\ s a -> s{_tfPath = a}) + +tfExpectedService :: Lens' TestFailure (Maybe Text) +tfExpectedService + = lens _tfExpectedService + (\ s a -> s{_tfExpectedService = a}) + +tfHost :: Lens' TestFailure (Maybe Text) +tfHost = lens _tfHost (\ s a -> s{_tfHost = a}) + +tfActualService :: Lens' TestFailure (Maybe Text) +tfActualService + = lens _tfActualService + (\ s a -> s{_tfActualService = a}) + +instance FromJSON TestFailure where + parseJSON + = withObject "TestFailure" + (\ o -> + TestFailure <$> + (o .:? "path") <*> (o .:? "expectedService") <*> + (o .:? "host") + <*> (o .:? "actualService")) + +instance ToJSON TestFailure where + toJSON TestFailure{..} + = object + (catMaybes + [("path" .=) <$> _tfPath, + ("expectedService" .=) <$> _tfExpectedService, + ("host" .=) <$> _tfHost, + ("actualService" .=) <$> _tfActualService]) + +-- +-- /See:/ 'targetVPNGatewaysScopedList' smart constructor. +data TargetVPNGatewaysScopedList = TargetVPNGatewaysScopedList + { _tvgslTargetVpnGateways :: !(Maybe [Maybe TargetVPNGateway]) + , _tvgslWarning :: !(Maybe TargetVPNGatewaysScopedListWarning) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgslTargetVpnGateways' +-- +-- * 'tvgslWarning' +targetVPNGatewaysScopedList + :: TargetVPNGatewaysScopedList +targetVPNGatewaysScopedList = + TargetVPNGatewaysScopedList + { _tvgslTargetVpnGateways = Nothing + , _tvgslWarning = Nothing + } + +-- | [Output Only] List of target vpn gateways contained in this scope. +tvgslTargetVpnGateways :: Lens' TargetVPNGatewaysScopedList [Maybe TargetVPNGateway] +tvgslTargetVpnGateways + = lens _tvgslTargetVpnGateways + (\ s a -> s{_tvgslTargetVpnGateways = a}) + . _Default + . _Coerce + +-- | [Output Only] Informational warning which replaces the list of addresses +-- when the list is empty. +tvgslWarning :: Lens' TargetVPNGatewaysScopedList (Maybe TargetVPNGatewaysScopedListWarning) +tvgslWarning + = lens _tvgslWarning (\ s a -> s{_tvgslWarning = a}) + +instance FromJSON TargetVPNGatewaysScopedList where + parseJSON + = withObject "TargetVPNGatewaysScopedList" + (\ o -> + TargetVPNGatewaysScopedList <$> + (o .:? "targetVpnGateways" .!= mempty) <*> + (o .:? "warning")) + +instance ToJSON TargetVPNGatewaysScopedList where + toJSON TargetVPNGatewaysScopedList{..} + = object + (catMaybes + [("targetVpnGateways" .=) <$> + _tvgslTargetVpnGateways, + ("warning" .=) <$> _tvgslWarning]) + +-- | A quotas entry. +-- +-- /See:/ 'quota' smart constructor. +data Quota = Quota + { _qMetric :: !(Maybe Text) + , _qLimit :: !(Maybe Double) + , _qUsage :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Quota' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qMetric' +-- +-- * 'qLimit' +-- +-- * 'qUsage' +quota + :: Quota +quota = + Quota + { _qMetric = Nothing + , _qLimit = Nothing + , _qUsage = Nothing + } + +-- | [Output Only] Name of the quota metric. +qMetric :: Lens' Quota (Maybe Text) +qMetric = lens _qMetric (\ s a -> s{_qMetric = a}) + +-- | [Output Only] Quota limit for this metric. +qLimit :: Lens' Quota (Maybe Double) +qLimit = lens _qLimit (\ s a -> s{_qLimit = a}) + +-- | [Output Only] Current usage of this metric. +qUsage :: Lens' Quota (Maybe Double) +qUsage = lens _qUsage (\ s a -> s{_qUsage = a}) + +instance FromJSON Quota where + parseJSON + = withObject "Quota" + (\ o -> + Quota <$> + (o .:? "metric") <*> (o .:? "limit") <*> + (o .:? "usage")) + +instance ToJSON Quota where + toJSON Quota{..} + = object + (catMaybes + [("metric" .=) <$> _qMetric, + ("limit" .=) <$> _qLimit, ("usage" .=) <$> _qUsage]) + +-- | Contains a list of Snapshot resources. +-- +-- /See:/ 'snapshotList' smart constructor. +data SnapshotList = SnapshotList + { _slNextPageToken :: !(Maybe Text) + , _slKind :: !Text + , _slItems :: !(Maybe [Maybe Snapshot]) + , _slSelfLink :: !(Maybe Text) + , _slId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slNextPageToken' +-- +-- * 'slKind' +-- +-- * 'slItems' +-- +-- * 'slSelfLink' +-- +-- * 'slId' +snapshotList + :: SnapshotList +snapshotList = + SnapshotList + { _slNextPageToken = Nothing + , _slKind = "compute#snapshotList" + , _slItems = Nothing + , _slSelfLink = Nothing + , _slId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +slNextPageToken :: Lens' SnapshotList (Maybe Text) +slNextPageToken + = lens _slNextPageToken + (\ s a -> s{_slNextPageToken = a}) + +-- | Type of resource. +slKind :: Lens' SnapshotList Text +slKind = lens _slKind (\ s a -> s{_slKind = a}) + +-- | A list of Snapshot resources. +slItems :: Lens' SnapshotList [Maybe Snapshot] +slItems + = lens _slItems (\ s a -> s{_slItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +slSelfLink :: Lens' SnapshotList (Maybe Text) +slSelfLink + = lens _slSelfLink (\ s a -> s{_slSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource. Defined by the server. +slId :: Lens' SnapshotList (Maybe Text) +slId = lens _slId (\ s a -> s{_slId = a}) + +instance FromJSON SnapshotList where + parseJSON + = withObject "SnapshotList" + (\ o -> + SnapshotList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#snapshotList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON SnapshotList where + toJSON SnapshotList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _slNextPageToken, + Just ("kind" .= _slKind), ("items" .=) <$> _slItems, + ("selfLink" .=) <$> _slSelfLink, + ("id" .=) <$> _slId]) + +-- | CPU utilization policy. +-- +-- /See:/ 'autoscalingPolicyCPUUtilization' smart constructor. +newtype AutoscalingPolicyCPUUtilization = AutoscalingPolicyCPUUtilization + { _apcuUtilizationTarget :: Maybe Double + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingPolicyCPUUtilization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apcuUtilizationTarget' +autoscalingPolicyCPUUtilization + :: AutoscalingPolicyCPUUtilization +autoscalingPolicyCPUUtilization = + AutoscalingPolicyCPUUtilization + { _apcuUtilizationTarget = Nothing + } + +-- | The target utilization that the Autoscaler should maintain. It is +-- represented as a fraction of used cores. For example: 6 cores used in +-- 8-core VM are represented here as 0.75. Must be a float value between +-- (0, 1]. If not defined, the default is 0.8. +apcuUtilizationTarget :: Lens' AutoscalingPolicyCPUUtilization (Maybe Double) +apcuUtilizationTarget + = lens _apcuUtilizationTarget + (\ s a -> s{_apcuUtilizationTarget = a}) + +instance FromJSON AutoscalingPolicyCPUUtilization + where + parseJSON + = withObject "AutoscalingPolicyCPUUtilization" + (\ o -> + AutoscalingPolicyCPUUtilization <$> + (o .:? "utilizationTarget")) + +instance ToJSON AutoscalingPolicyCPUUtilization where + toJSON AutoscalingPolicyCPUUtilization{..} + = object + (catMaybes + [("utilizationTarget" .=) <$> + _apcuUtilizationTarget]) + +-- | An access configuration attached to an instance\'s network interface. +-- +-- /See:/ 'accessConfig' smart constructor. +data AccessConfig = AccessConfig + { _acKind :: !Text + , _acName :: !(Maybe Text) + , _acNatIP :: !(Maybe Text) + , _acType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccessConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acKind' +-- +-- * 'acName' +-- +-- * 'acNatIP' +-- +-- * 'acType' +accessConfig + :: AccessConfig +accessConfig = + AccessConfig + { _acKind = "compute#accessConfig" + , _acName = Nothing + , _acNatIP = Nothing + , _acType = "ONE_TO_ONE_NAT" + } + +-- | [Output Only] Type of the resource. Always compute#accessConfig for +-- access configs. +acKind :: Lens' AccessConfig Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | Name of this access configuration. +acName :: Lens' AccessConfig (Maybe Text) +acName = lens _acName (\ s a -> s{_acName = a}) + +-- | An external IP address associated with this instance. Specify an unused +-- static external IP address available to the project or leave this field +-- undefined to use an IP from a shared ephemeral IP address pool. If you +-- specify a static external IP address, it must live in the same region as +-- the zone of the instance. +acNatIP :: Lens' AccessConfig (Maybe Text) +acNatIP = lens _acNatIP (\ s a -> s{_acNatIP = a}) + +-- | The type of configuration. The default and only option is +-- ONE_TO_ONE_NAT. +acType :: Lens' AccessConfig Text +acType = lens _acType (\ s a -> s{_acType = a}) + +instance FromJSON AccessConfig where + parseJSON + = withObject "AccessConfig" + (\ o -> + AccessConfig <$> + (o .:? "kind" .!= "compute#accessConfig") <*> + (o .:? "name") + <*> (o .:? "natIP") + <*> (o .:? "type" .!= "ONE_TO_ONE_NAT")) + +instance ToJSON AccessConfig where + toJSON AccessConfig{..} + = object + (catMaybes + [Just ("kind" .= _acKind), ("name" .=) <$> _acName, + ("natIP" .=) <$> _acNatIP, Just ("type" .= _acType)]) + +-- +-- /See:/ 'resourceGroupReference' smart constructor. +newtype ResourceGroupReference = ResourceGroupReference + { _rgrGroup :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceGroupReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgrGroup' +resourceGroupReference + :: ResourceGroupReference +resourceGroupReference = + ResourceGroupReference + { _rgrGroup = Nothing + } + +-- | A URI referencing one of the resource views listed in the backend +-- service. +rgrGroup :: Lens' ResourceGroupReference (Maybe Text) +rgrGroup = lens _rgrGroup (\ s a -> s{_rgrGroup = a}) + +instance FromJSON ResourceGroupReference where + parseJSON + = withObject "ResourceGroupReference" + (\ o -> ResourceGroupReference <$> (o .:? "group")) + +instance ToJSON ResourceGroupReference where + toJSON ResourceGroupReference{..} + = object (catMaybes [("group" .=) <$> _rgrGroup]) + +-- | A Firewall resource. +-- +-- /See:/ 'firewall' smart constructor. +data Firewall = Firewall + { _fSourceTags :: !(Maybe [Text]) + , _fKind :: !Text + , _fTargetTags :: !(Maybe [Text]) + , _fNetwork :: !(Maybe Text) + , _fSourceRanges :: !(Maybe [Text]) + , _fSelfLink :: !(Maybe Text) + , _fName :: !(Maybe Text) + , _fCreationTimestamp :: !(Maybe Text) + , _fId :: !(Maybe Word64) + , _fAllowed :: !(Maybe [FirewallAllowedItem]) + , _fDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Firewall' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fSourceTags' +-- +-- * 'fKind' +-- +-- * 'fTargetTags' +-- +-- * 'fNetwork' +-- +-- * 'fSourceRanges' +-- +-- * 'fSelfLink' +-- +-- * 'fName' +-- +-- * 'fCreationTimestamp' +-- +-- * 'fId' +-- +-- * 'fAllowed' +-- +-- * 'fDescription' +firewall + :: Firewall +firewall = + Firewall + { _fSourceTags = Nothing + , _fKind = "compute#firewall" + , _fTargetTags = Nothing + , _fNetwork = Nothing + , _fSourceRanges = Nothing + , _fSelfLink = Nothing + , _fName = Nothing + , _fCreationTimestamp = Nothing + , _fId = Nothing + , _fAllowed = Nothing + , _fDescription = Nothing + } + +-- | A list of instance tags which this rule applies to. One or both of +-- sourceRanges and sourceTags may be set. If both properties are set, an +-- inbound connection is allowed if the range matches the sourceRanges OR +-- the tag of the source matches the sourceTags property. The connection +-- does not need to match both properties. +fSourceTags :: Lens' Firewall [Text] +fSourceTags + = lens _fSourceTags (\ s a -> s{_fSourceTags = a}) . + _Default + . _Coerce + +-- | [Output Ony] Type of the resource. Always compute#firewall for firewall +-- rules. +fKind :: Lens' Firewall Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +-- | A list of instance tags indicating sets of instances located in the +-- network that may make network connections as specified in allowed[]. If +-- no targetTags are specified, the firewall rule applies to all instances +-- on the specified network. +fTargetTags :: Lens' Firewall [Text] +fTargetTags + = lens _fTargetTags (\ s a -> s{_fTargetTags = a}) . + _Default + . _Coerce + +-- | URL of the network resource for this firewall rule. This field is +-- required for creating an instance but optional when creating a firewall +-- rule. If not specified when creating a firewall rule, the default +-- network is used: global\/networks\/default If you choose to specify this +-- property, you can specify the network as a full or partial URL. For +-- example, the following are all valid URLs: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/myproject\/global\/networks\/my-network +-- - projects\/myproject\/global\/networks\/my-network - +-- global\/networks\/default +fNetwork :: Lens' Firewall (Maybe Text) +fNetwork = lens _fNetwork (\ s a -> s{_fNetwork = a}) + +-- | The IP address blocks that this rule applies to, expressed in CIDR +-- format. One or both of sourceRanges and sourceTags may be set. If both +-- properties are set, an inbound connection is allowed if the range +-- matches the sourceRanges OR the tag of the source matches the sourceTags +-- property. The connection does not need to match both properties. +fSourceRanges :: Lens' Firewall [Text] +fSourceRanges + = lens _fSourceRanges + (\ s a -> s{_fSourceRanges = a}) + . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for the resource. +fSelfLink :: Lens' Firewall (Maybe Text) +fSelfLink + = lens _fSelfLink (\ s a -> s{_fSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +fName :: Lens' Firewall (Maybe Text) +fName = lens _fName (\ s a -> s{_fName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +fCreationTimestamp :: Lens' Firewall (Maybe Text) +fCreationTimestamp + = lens _fCreationTimestamp + (\ s a -> s{_fCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +fId :: Lens' Firewall (Maybe Word64) +fId = lens _fId (\ s a -> s{_fId = a}) + +-- | The list of rules specified by this firewall. Each rule specifies a +-- protocol and port-range tuple that describes a permitted connection. +fAllowed :: Lens' Firewall [FirewallAllowedItem] +fAllowed + = lens _fAllowed (\ s a -> s{_fAllowed = a}) . + _Default + . _Coerce + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +fDescription :: Lens' Firewall (Maybe Text) +fDescription + = lens _fDescription (\ s a -> s{_fDescription = a}) + +instance FromJSON Firewall where + parseJSON + = withObject "Firewall" + (\ o -> + Firewall <$> + (o .:? "sourceTags" .!= mempty) <*> + (o .:? "kind" .!= "compute#firewall") + <*> (o .:? "targetTags" .!= mempty) + <*> (o .:? "network") + <*> (o .:? "sourceRanges" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "allowed" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON Firewall where + toJSON Firewall{..} + = object + (catMaybes + [("sourceTags" .=) <$> _fSourceTags, + Just ("kind" .= _fKind), + ("targetTags" .=) <$> _fTargetTags, + ("network" .=) <$> _fNetwork, + ("sourceRanges" .=) <$> _fSourceRanges, + ("selfLink" .=) <$> _fSelfLink, + ("name" .=) <$> _fName, + ("creationTimestamp" .=) <$> _fCreationTimestamp, + ("id" .=) <$> _fId, ("allowed" .=) <$> _fAllowed, + ("description" .=) <$> _fDescription]) + +-- +-- /See:/ 'addressAggregatedList' smart constructor. +data AddressAggregatedList = AddressAggregatedList + { _addNextPageToken :: !(Maybe Text) + , _addKind :: !Text + , _addItems :: !(Maybe AddressAggregatedListItems) + , _addSelfLink :: !(Maybe Text) + , _addId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressAggregatedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'addNextPageToken' +-- +-- * 'addKind' +-- +-- * 'addItems' +-- +-- * 'addSelfLink' +-- +-- * 'addId' +addressAggregatedList + :: AddressAggregatedList +addressAggregatedList = + AddressAggregatedList + { _addNextPageToken = Nothing + , _addKind = "compute#addressAggregatedList" + , _addItems = Nothing + , _addSelfLink = Nothing + , _addId = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +addNextPageToken :: Lens' AddressAggregatedList (Maybe Text) +addNextPageToken + = lens _addNextPageToken + (\ s a -> s{_addNextPageToken = a}) + +-- | [Output Only] Type of resource. Always compute#addressAggregatedList for +-- aggregated lists of addresses. +addKind :: Lens' AddressAggregatedList Text +addKind = lens _addKind (\ s a -> s{_addKind = a}) + +-- | [Output Only] A map of scoped address lists. +addItems :: Lens' AddressAggregatedList (Maybe AddressAggregatedListItems) +addItems = lens _addItems (\ s a -> s{_addItems = a}) + +-- | [Output Only] Server-defined URL for this resource. +addSelfLink :: Lens' AddressAggregatedList (Maybe Text) +addSelfLink + = lens _addSelfLink (\ s a -> s{_addSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +addId :: Lens' AddressAggregatedList (Maybe Text) +addId = lens _addId (\ s a -> s{_addId = a}) + +instance FromJSON AddressAggregatedList where + parseJSON + = withObject "AddressAggregatedList" + (\ o -> + AddressAggregatedList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "compute#addressAggregatedList") + <*> (o .:? "items") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON AddressAggregatedList where + toJSON AddressAggregatedList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _addNextPageToken, + Just ("kind" .= _addKind), + ("items" .=) <$> _addItems, + ("selfLink" .=) <$> _addSelfLink, + ("id" .=) <$> _addId]) + +-- | A set of instance tags. +-- +-- /See:/ 'tags' smart constructor. +data Tags = Tags + { _tFingerprint :: !(Maybe Word8) + , _tItems :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tags' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tFingerprint' +-- +-- * 'tItems' +tags + :: Tags +tags = + Tags + { _tFingerprint = Nothing + , _tItems = Nothing + } + +-- | Specifies a fingerprint for this request, which is essentially a hash of +-- the metadata\'s contents and used for optimistic locking. The +-- fingerprint is initially generated by Compute Engine and changes after +-- every request to modify or update metadata. You must always provide an +-- up-to-date fingerprint hash in order to update or change metadata. To +-- see the latest fingerprint, make get() request to the instance. +tFingerprint :: Lens' Tags (Maybe Word8) +tFingerprint + = lens _tFingerprint (\ s a -> s{_tFingerprint = a}) + +-- | An array of tags. Each tag must be 1-63 characters long, and comply with +-- RFC1035. +tItems :: Lens' Tags [Text] +tItems + = lens _tItems (\ s a -> s{_tItems = a}) . _Default . + _Coerce + +instance FromJSON Tags where + parseJSON + = withObject "Tags" + (\ o -> + Tags <$> + (o .:? "fingerprint") <*> (o .:? "items" .!= mempty)) + +instance ToJSON Tags where + toJSON Tags{..} + = object + (catMaybes + [("fingerprint" .=) <$> _tFingerprint, + ("items" .=) <$> _tItems]) + +-- | A BackendService resource. This resource defines a group of backend +-- virtual machines together with their serving capacity. +-- +-- /See:/ 'backendService' smart constructor. +data BackendService = BackendService + { _bsBackends :: !(Maybe [Maybe Backend]) + , _bsKind :: !Text + , _bsFingerprint :: !(Maybe Word8) + , _bsProtocol :: !(Maybe Text) + , _bsSelfLink :: !(Maybe Text) + , _bsName :: !(Maybe Text) + , _bsCreationTimestamp :: !(Maybe Text) + , _bsId :: !(Maybe Word64) + , _bsTimeoutSec :: !(Maybe Int32) + , _bsDescription :: !(Maybe Text) + , _bsPortName :: !(Maybe Text) + , _bsHealthChecks :: !(Maybe [Text]) + , _bsPort :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendService' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsBackends' +-- +-- * 'bsKind' +-- +-- * 'bsFingerprint' +-- +-- * 'bsProtocol' +-- +-- * 'bsSelfLink' +-- +-- * 'bsName' +-- +-- * 'bsCreationTimestamp' +-- +-- * 'bsId' +-- +-- * 'bsTimeoutSec' +-- +-- * 'bsDescription' +-- +-- * 'bsPortName' +-- +-- * 'bsHealthChecks' +-- +-- * 'bsPort' +backendService + :: BackendService +backendService = + BackendService + { _bsBackends = Nothing + , _bsKind = "compute#backendService" + , _bsFingerprint = Nothing + , _bsProtocol = Nothing + , _bsSelfLink = Nothing + , _bsName = Nothing + , _bsCreationTimestamp = Nothing + , _bsId = Nothing + , _bsTimeoutSec = Nothing + , _bsDescription = Nothing + , _bsPortName = Nothing + , _bsHealthChecks = Nothing + , _bsPort = Nothing + } + +-- | The list of backends that serve this BackendService. +bsBackends :: Lens' BackendService [Maybe Backend] +bsBackends + = lens _bsBackends (\ s a -> s{_bsBackends = a}) . + _Default + . _Coerce + +-- | [Output Only] Type of resource. Always compute#backendService for +-- backend services. +bsKind :: Lens' BackendService Text +bsKind = lens _bsKind (\ s a -> s{_bsKind = a}) + +-- | Fingerprint of this resource. A hash of the contents stored in this +-- object. This field is used in optimistic locking. This field will be +-- ignored when inserting a BackendService. An up-to-date fingerprint must +-- be provided in order to update the BackendService. +bsFingerprint :: Lens' BackendService (Maybe Word8) +bsFingerprint + = lens _bsFingerprint + (\ s a -> s{_bsFingerprint = a}) + +bsProtocol :: Lens' BackendService (Maybe Text) +bsProtocol + = lens _bsProtocol (\ s a -> s{_bsProtocol = a}) + +-- | [Output Only] Server-defined URL for the resource. +bsSelfLink :: Lens' BackendService (Maybe Text) +bsSelfLink + = lens _bsSelfLink (\ s a -> s{_bsSelfLink = a}) + +-- | Name of the resource. Provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +bsName :: Lens' BackendService (Maybe Text) +bsName = lens _bsName (\ s a -> s{_bsName = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +bsCreationTimestamp :: Lens' BackendService (Maybe Text) +bsCreationTimestamp + = lens _bsCreationTimestamp + (\ s a -> s{_bsCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +bsId :: Lens' BackendService (Maybe Word64) +bsId = lens _bsId (\ s a -> s{_bsId = a}) + +-- | How many seconds to wait for the backend before considering it a failed +-- request. Default is 30 seconds. +bsTimeoutSec :: Lens' BackendService (Maybe Int32) +bsTimeoutSec + = lens _bsTimeoutSec (\ s a -> s{_bsTimeoutSec = a}) + +-- | An optional textual description of the resource. Provided by the client +-- when the resource is created. +bsDescription :: Lens' BackendService (Maybe Text) +bsDescription + = lens _bsDescription + (\ s a -> s{_bsDescription = a}) + +-- | Name of backend port. The same name should appear in the resource views +-- referenced by this service. Required. +bsPortName :: Lens' BackendService (Maybe Text) +bsPortName + = lens _bsPortName (\ s a -> s{_bsPortName = a}) + +-- | The list of URLs to the HttpHealthCheck resource for health checking +-- this BackendService. Currently at most one health check can be +-- specified, and a health check is required. +bsHealthChecks :: Lens' BackendService [Text] +bsHealthChecks + = lens _bsHealthChecks + (\ s a -> s{_bsHealthChecks = a}) + . _Default + . _Coerce + +-- | Deprecated in favor of port name. The TCP port to connect on the +-- backend. The default value is 80. +bsPort :: Lens' BackendService (Maybe Int32) +bsPort = lens _bsPort (\ s a -> s{_bsPort = a}) + +instance FromJSON BackendService where + parseJSON + = withObject "BackendService" + (\ o -> + BackendService <$> + (o .:? "backends" .!= mempty) <*> + (o .:? "kind" .!= "compute#backendService") + <*> (o .:? "fingerprint") + <*> (o .:? "protocol") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "timeoutSec") + <*> (o .:? "description") + <*> (o .:? "portName") + <*> (o .:? "healthChecks" .!= mempty) + <*> (o .:? "port")) + +instance ToJSON BackendService where + toJSON BackendService{..} + = object + (catMaybes + [("backends" .=) <$> _bsBackends, + Just ("kind" .= _bsKind), + ("fingerprint" .=) <$> _bsFingerprint, + ("protocol" .=) <$> _bsProtocol, + ("selfLink" .=) <$> _bsSelfLink, + ("name" .=) <$> _bsName, + ("creationTimestamp" .=) <$> _bsCreationTimestamp, + ("id" .=) <$> _bsId, + ("timeoutSec" .=) <$> _bsTimeoutSec, + ("description" .=) <$> _bsDescription, + ("portName" .=) <$> _bsPortName, + ("healthChecks" .=) <$> _bsHealthChecks, + ("port" .=) <$> _bsPort]) + +-- | Message for the expected URL mappings. +-- +-- /See:/ 'uRLMapTest' smart constructor. +data URLMapTest = URLMapTest + { _umtPath :: !(Maybe Text) + , _umtService :: !(Maybe Text) + , _umtHost :: !(Maybe Text) + , _umtDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapTest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umtPath' +-- +-- * 'umtService' +-- +-- * 'umtHost' +-- +-- * 'umtDescription' +uRLMapTest + :: URLMapTest +uRLMapTest = + URLMapTest + { _umtPath = Nothing + , _umtService = Nothing + , _umtHost = Nothing + , _umtDescription = Nothing + } + +-- | Path portion of the URL. +umtPath :: Lens' URLMapTest (Maybe Text) +umtPath = lens _umtPath (\ s a -> s{_umtPath = a}) + +-- | Expected BackendService resource the given URL should be mapped to. +umtService :: Lens' URLMapTest (Maybe Text) +umtService + = lens _umtService (\ s a -> s{_umtService = a}) + +-- | Host portion of the URL. +umtHost :: Lens' URLMapTest (Maybe Text) +umtHost = lens _umtHost (\ s a -> s{_umtHost = a}) + +-- | Description of this test case. +umtDescription :: Lens' URLMapTest (Maybe Text) +umtDescription + = lens _umtDescription + (\ s a -> s{_umtDescription = a}) + +instance FromJSON URLMapTest where + parseJSON + = withObject "URLMapTest" + (\ o -> + URLMapTest <$> + (o .:? "path") <*> (o .:? "service") <*> + (o .:? "host") + <*> (o .:? "description")) + +instance ToJSON URLMapTest where + toJSON URLMapTest{..} + = object + (catMaybes + [("path" .=) <$> _umtPath, + ("service" .=) <$> _umtService, + ("host" .=) <$> _umtHost, + ("description" .=) <$> _umtDescription]) + +-- +-- /See:/ 'instanceMoveRequest' smart constructor. +data InstanceMoveRequest = InstanceMoveRequest + { _imrTargetInstance :: !(Maybe Text) + , _imrDestinationZone :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceMoveRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'imrTargetInstance' +-- +-- * 'imrDestinationZone' +instanceMoveRequest + :: InstanceMoveRequest +instanceMoveRequest = + InstanceMoveRequest + { _imrTargetInstance = Nothing + , _imrDestinationZone = Nothing + } + +-- | The URL of the target instance to move. This can be a full or partial +-- URL. For example, the following are all valid URLs to an instance: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/instance +-- - projects\/project\/zones\/zone\/instances\/instance - +-- zones\/zone\/instances\/instance +imrTargetInstance :: Lens' InstanceMoveRequest (Maybe Text) +imrTargetInstance + = lens _imrTargetInstance + (\ s a -> s{_imrTargetInstance = a}) + +-- | The URL of the destination zone to move the instance to. This can be a +-- full or partial URL. For example, the following are all valid URLs to a +-- zone: - +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone +-- - projects\/project\/zones\/zone - zones\/zone +imrDestinationZone :: Lens' InstanceMoveRequest (Maybe Text) +imrDestinationZone + = lens _imrDestinationZone + (\ s a -> s{_imrDestinationZone = a}) + +instance FromJSON InstanceMoveRequest where + parseJSON + = withObject "InstanceMoveRequest" + (\ o -> + InstanceMoveRequest <$> + (o .:? "targetInstance") <*> + (o .:? "destinationZone")) + +instance ToJSON InstanceMoveRequest where + toJSON InstanceMoveRequest{..} + = object + (catMaybes + [("targetInstance" .=) <$> _imrTargetInstance, + ("destinationZone" .=) <$> _imrDestinationZone]) + +-- | An Instance resource. +-- +-- /See:/ 'instance'' smart constructor. +data Instance = Instance + { _iiStatus :: !(Maybe Text) + , _iiServiceAccounts :: !(Maybe [Maybe ServiceAccount]) + , _iiNetworkInterfaces :: !(Maybe [Maybe NetworkInterface]) + , _iiKind :: !Text + , _iiZone :: !(Maybe Text) + , _iiCpuPlatform :: !(Maybe Text) + , _iiSelfLink :: !(Maybe Text) + , _iiName :: !(Maybe Text) + , _iiStatusMessage :: !(Maybe Text) + , _iiCreationTimestamp :: !(Maybe Text) + , _iiMachineType :: !(Maybe Text) + , _iiMetadata :: !(Maybe (Maybe Metadata)) + , _iiId :: !(Maybe Word64) + , _iiScheduling :: !(Maybe (Maybe Scheduling)) + , _iiDisks :: !(Maybe [Maybe AttachedDisk]) + , _iiCanIpForward :: !(Maybe Bool) + , _iiDescription :: !(Maybe Text) + , _iiTags :: !(Maybe (Maybe Tags)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Instance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiStatus' +-- +-- * 'iiServiceAccounts' +-- +-- * 'iiNetworkInterfaces' +-- +-- * 'iiKind' +-- +-- * 'iiZone' +-- +-- * 'iiCpuPlatform' +-- +-- * 'iiSelfLink' +-- +-- * 'iiName' +-- +-- * 'iiStatusMessage' +-- +-- * 'iiCreationTimestamp' +-- +-- * 'iiMachineType' +-- +-- * 'iiMetadata' +-- +-- * 'iiId' +-- +-- * 'iiScheduling' +-- +-- * 'iiDisks' +-- +-- * 'iiCanIpForward' +-- +-- * 'iiDescription' +-- +-- * 'iiTags' +instance' + :: Instance +instance' = + Instance + { _iiStatus = Nothing + , _iiServiceAccounts = Nothing + , _iiNetworkInterfaces = Nothing + , _iiKind = "compute#instance" + , _iiZone = Nothing + , _iiCpuPlatform = Nothing + , _iiSelfLink = Nothing + , _iiName = Nothing + , _iiStatusMessage = Nothing + , _iiCreationTimestamp = Nothing + , _iiMachineType = Nothing + , _iiMetadata = Nothing + , _iiId = Nothing + , _iiScheduling = Nothing + , _iiDisks = Nothing + , _iiCanIpForward = Nothing + , _iiDescription = Nothing + , _iiTags = Nothing + } + +-- | [Output Only] The status of the instance. One of the following values: +-- PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED. +iiStatus :: Lens' Instance (Maybe Text) +iiStatus = lens _iiStatus (\ s a -> s{_iiStatus = a}) + +-- | A list of service accounts, with their specified scopes, authorized for +-- this instance. Service accounts generate access tokens that can be +-- accessed through the metadata server and used to authenticate +-- applications on the instance. See Authenticating from Google Compute +-- Engine for more information. +iiServiceAccounts :: Lens' Instance [Maybe ServiceAccount] +iiServiceAccounts + = lens _iiServiceAccounts + (\ s a -> s{_iiServiceAccounts = a}) + . _Default + . _Coerce + +-- | An array of configurations for this interface. This specifies how this +-- interface is configured to interact with other network services, such as +-- connecting to the internet. +iiNetworkInterfaces :: Lens' Instance [Maybe NetworkInterface] +iiNetworkInterfaces + = lens _iiNetworkInterfaces + (\ s a -> s{_iiNetworkInterfaces = a}) + . _Default + . _Coerce + +-- | [Output Only] Type of the resource. Always compute#instance for +-- instances. +iiKind :: Lens' Instance Text +iiKind = lens _iiKind (\ s a -> s{_iiKind = a}) + +-- | [Output Only] URL of the zone where the instance resides. +iiZone :: Lens' Instance (Maybe Text) +iiZone = lens _iiZone (\ s a -> s{_iiZone = a}) + +-- | [Output Only] The CPU platform used by this instance. +iiCpuPlatform :: Lens' Instance (Maybe Text) +iiCpuPlatform + = lens _iiCpuPlatform + (\ s a -> s{_iiCpuPlatform = a}) + +-- | [Output Only] Server defined URL for this resource. +iiSelfLink :: Lens' Instance (Maybe Text) +iiSelfLink + = lens _iiSelfLink (\ s a -> s{_iiSelfLink = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +iiName :: Lens' Instance (Maybe Text) +iiName = lens _iiName (\ s a -> s{_iiName = a}) + +-- | [Output Only] An optional, human-readable explanation of the status. +iiStatusMessage :: Lens' Instance (Maybe Text) +iiStatusMessage + = lens _iiStatusMessage + (\ s a -> s{_iiStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +iiCreationTimestamp :: Lens' Instance (Maybe Text) +iiCreationTimestamp + = lens _iiCreationTimestamp + (\ s a -> s{_iiCreationTimestamp = a}) + +-- | Full or partial URL of the machine type resource to use for this +-- instance. This is provided by the client when the instance is created. +-- For example, the following is a valid partial url: +-- zones\/zone\/machineTypes\/machine-type +iiMachineType :: Lens' Instance (Maybe Text) +iiMachineType + = lens _iiMachineType + (\ s a -> s{_iiMachineType = a}) + +-- | The metadata key\/value pairs assigned to this instance. This includes +-- custom metadata and predefined keys. +iiMetadata :: Lens' Instance (Maybe (Maybe Metadata)) +iiMetadata + = lens _iiMetadata (\ s a -> s{_iiMetadata = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +iiId :: Lens' Instance (Maybe Word64) +iiId = lens _iiId (\ s a -> s{_iiId = a}) + +-- | Scheduling options for this instance. +iiScheduling :: Lens' Instance (Maybe (Maybe Scheduling)) +iiScheduling + = lens _iiScheduling (\ s a -> s{_iiScheduling = a}) + +-- | Array of disks associated with this instance. Persistent disks must be +-- created before you can assign them. +iiDisks :: Lens' Instance [Maybe AttachedDisk] +iiDisks + = lens _iiDisks (\ s a -> s{_iiDisks = a}) . _Default + . _Coerce + +-- | Allows this instance to send and receive packets with non-matching +-- destination or source IPs. This is required if you plan to use this +-- instance to forward routes. For more information, see Enabling IP +-- Forwarding. +iiCanIpForward :: Lens' Instance (Maybe Bool) +iiCanIpForward + = lens _iiCanIpForward + (\ s a -> s{_iiCanIpForward = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +iiDescription :: Lens' Instance (Maybe Text) +iiDescription + = lens _iiDescription + (\ s a -> s{_iiDescription = a}) + +-- | A list of tags to appy to this instance. Tags are used to identify valid +-- sources or targets for network firewalls and are specified by the client +-- during instance creation. The tags can be later modified by the setTags +-- method. Each tag within the list must comply with RFC1035. +iiTags :: Lens' Instance (Maybe (Maybe Tags)) +iiTags = lens _iiTags (\ s a -> s{_iiTags = a}) + +instance FromJSON Instance where + parseJSON + = withObject "Instance" + (\ o -> + Instance <$> + (o .:? "status") <*> + (o .:? "serviceAccounts" .!= mempty) + <*> (o .:? "networkInterfaces" .!= mempty) + <*> (o .:? "kind" .!= "compute#instance") + <*> (o .:? "zone") + <*> (o .:? "cpuPlatform") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "machineType") + <*> (o .:? "metadata") + <*> (o .:? "id") + <*> (o .:? "scheduling") + <*> (o .:? "disks" .!= mempty) + <*> (o .:? "canIpForward") + <*> (o .:? "description") + <*> (o .:? "tags")) + +instance ToJSON Instance where + toJSON Instance{..} + = object + (catMaybes + [("status" .=) <$> _iiStatus, + ("serviceAccounts" .=) <$> _iiServiceAccounts, + ("networkInterfaces" .=) <$> _iiNetworkInterfaces, + Just ("kind" .= _iiKind), ("zone" .=) <$> _iiZone, + ("cpuPlatform" .=) <$> _iiCpuPlatform, + ("selfLink" .=) <$> _iiSelfLink, + ("name" .=) <$> _iiName, + ("statusMessage" .=) <$> _iiStatusMessage, + ("creationTimestamp" .=) <$> _iiCreationTimestamp, + ("machineType" .=) <$> _iiMachineType, + ("metadata" .=) <$> _iiMetadata, ("id" .=) <$> _iiId, + ("scheduling" .=) <$> _iiScheduling, + ("disks" .=) <$> _iiDisks, + ("canIpForward" .=) <$> _iiCanIpForward, + ("description" .=) <$> _iiDescription, + ("tags" .=) <$> _iiTags]) + +-- | A matcher for the path portion of the URL. The BackendService from the +-- longest-matched rule will serve the URL. If no rule was matched, the +-- default_service will be used. +-- +-- /See:/ 'pathMatcher' smart constructor. +data PathMatcher = PathMatcher + { _pmDefaultService :: !(Maybe Text) + , _pmName :: !(Maybe Text) + , _pmPathRules :: !(Maybe [Maybe PathRule]) + , _pmDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PathMatcher' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmDefaultService' +-- +-- * 'pmName' +-- +-- * 'pmPathRules' +-- +-- * 'pmDescription' +pathMatcher + :: PathMatcher +pathMatcher = + PathMatcher + { _pmDefaultService = Nothing + , _pmName = Nothing + , _pmPathRules = Nothing + , _pmDescription = Nothing + } + +-- | The URL to the BackendService resource. This will be used if none of the +-- \'pathRules\' defined by this PathMatcher is met by the URL\'s path +-- portion. +pmDefaultService :: Lens' PathMatcher (Maybe Text) +pmDefaultService + = lens _pmDefaultService + (\ s a -> s{_pmDefaultService = a}) + +-- | The name to which this PathMatcher is referred by the HostRule. +pmName :: Lens' PathMatcher (Maybe Text) +pmName = lens _pmName (\ s a -> s{_pmName = a}) + +-- | The list of path rules. +pmPathRules :: Lens' PathMatcher [Maybe PathRule] +pmPathRules + = lens _pmPathRules (\ s a -> s{_pmPathRules = a}) . + _Default + . _Coerce + +-- | An optional textual description of the resource. +pmDescription :: Lens' PathMatcher (Maybe Text) +pmDescription + = lens _pmDescription + (\ s a -> s{_pmDescription = a}) + +instance FromJSON PathMatcher where + parseJSON + = withObject "PathMatcher" + (\ o -> + PathMatcher <$> + (o .:? "defaultService") <*> (o .:? "name") <*> + (o .:? "pathRules" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON PathMatcher where + toJSON PathMatcher{..} + = object + (catMaybes + [("defaultService" .=) <$> _pmDefaultService, + ("name" .=) <$> _pmName, + ("pathRules" .=) <$> _pmPathRules, + ("description" .=) <$> _pmDescription]) + +-- +-- /See:/ 'instanceGroupsScopedList' smart constructor. +data InstanceGroupsScopedList = InstanceGroupsScopedList + { _igslWarning :: !(Maybe InstanceGroupsScopedListWarning) + , _igslInstanceGroups :: !(Maybe [Maybe InstanceGroup]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsScopedList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igslWarning' +-- +-- * 'igslInstanceGroups' +instanceGroupsScopedList + :: InstanceGroupsScopedList +instanceGroupsScopedList = + InstanceGroupsScopedList + { _igslWarning = Nothing + , _igslInstanceGroups = Nothing + } + +-- | [Output Only] An informational warning that replaces the list of +-- instance groups when the list is empty. +igslWarning :: Lens' InstanceGroupsScopedList (Maybe InstanceGroupsScopedListWarning) +igslWarning + = lens _igslWarning (\ s a -> s{_igslWarning = a}) + +-- | [Output Only] The list of instance groups that are contained in this +-- scope. +igslInstanceGroups :: Lens' InstanceGroupsScopedList [Maybe InstanceGroup] +igslInstanceGroups + = lens _igslInstanceGroups + (\ s a -> s{_igslInstanceGroups = a}) + . _Default + . _Coerce + +instance FromJSON InstanceGroupsScopedList where + parseJSON + = withObject "InstanceGroupsScopedList" + (\ o -> + InstanceGroupsScopedList <$> + (o .:? "warning") <*> + (o .:? "instanceGroups" .!= mempty)) + +instance ToJSON InstanceGroupsScopedList where + toJSON InstanceGroupsScopedList{..} + = object + (catMaybes + [("warning" .=) <$> _igslWarning, + ("instanceGroups" .=) <$> _igslInstanceGroups]) diff --git a/gogol-compute/gen/Network/Google/Compute/Types/Sum.hs b/gogol-compute/gen/Network/Google/Compute/Types/Sum.hs new file mode 100644 index 000000000..fdd084aac --- /dev/null +++ b/gogol-compute/gen/Network/Google/Compute/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Compute.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Compute.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/AggregatedList.hs new file mode 100644 index 000000000..395c17d88 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/AggregatedList.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Addresses.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of addresses grouped by scope. +-- +-- /See:/ for @ComputeAddressesAggregatedList@. +module Compute.Addresses.AggregatedList + ( + -- * REST Resource + AddressesAggregatedListAPI + + -- * Creating a Request + , addressesAggregatedList + , AddressesAggregatedList + + -- * Request Lenses + , aalQuotaUser + , aalPrettyPrint + , aalProject + , aalUserIp + , aalKey + , aalFilter + , aalPageToken + , aalOauthToken + , aalMaxResults + , aalFields + , aalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAddressesAggregatedList@ which the +-- 'AddressesAggregatedList' request conforms to. +type AddressesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "addresses" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AddressAggregatedList + +-- | Retrieves the list of addresses grouped by scope. +-- +-- /See:/ 'addressesAggregatedList' smart constructor. +data AddressesAggregatedList = AddressesAggregatedList + { _aalQuotaUser :: !(Maybe Text) + , _aalPrettyPrint :: !Bool + , _aalProject :: !Text + , _aalUserIp :: !(Maybe Text) + , _aalKey :: !(Maybe Text) + , _aalFilter :: !(Maybe Text) + , _aalPageToken :: !(Maybe Text) + , _aalOauthToken :: !(Maybe Text) + , _aalMaxResults :: !Word32 + , _aalFields :: !(Maybe Text) + , _aalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalQuotaUser' +-- +-- * 'aalPrettyPrint' +-- +-- * 'aalProject' +-- +-- * 'aalUserIp' +-- +-- * 'aalKey' +-- +-- * 'aalFilter' +-- +-- * 'aalPageToken' +-- +-- * 'aalOauthToken' +-- +-- * 'aalMaxResults' +-- +-- * 'aalFields' +-- +-- * 'aalAlt' +addressesAggregatedList + :: Text -- ^ 'project' + -> AddressesAggregatedList +addressesAggregatedList pAalProject_ = + AddressesAggregatedList + { _aalQuotaUser = Nothing + , _aalPrettyPrint = True + , _aalProject = pAalProject_ + , _aalUserIp = Nothing + , _aalKey = Nothing + , _aalFilter = Nothing + , _aalPageToken = Nothing + , _aalOauthToken = Nothing + , _aalMaxResults = 500 + , _aalFields = Nothing + , _aalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aalQuotaUser :: Lens' AddressesAggregatedList' (Maybe Text) +aalQuotaUser + = lens _aalQuotaUser (\ s a -> s{_aalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aalPrettyPrint :: Lens' AddressesAggregatedList' Bool +aalPrettyPrint + = lens _aalPrettyPrint + (\ s a -> s{_aalPrettyPrint = a}) + +-- | Project ID for this request. +aalProject :: Lens' AddressesAggregatedList' Text +aalProject + = lens _aalProject (\ s a -> s{_aalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aalUserIp :: Lens' AddressesAggregatedList' (Maybe Text) +aalUserIp + = lens _aalUserIp (\ s a -> s{_aalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aalKey :: Lens' AddressesAggregatedList' (Maybe Text) +aalKey = lens _aalKey (\ s a -> s{_aalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +aalFilter :: Lens' AddressesAggregatedList' (Maybe Text) +aalFilter + = lens _aalFilter (\ s a -> s{_aalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +aalPageToken :: Lens' AddressesAggregatedList' (Maybe Text) +aalPageToken + = lens _aalPageToken (\ s a -> s{_aalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aalOauthToken :: Lens' AddressesAggregatedList' (Maybe Text) +aalOauthToken + = lens _aalOauthToken + (\ s a -> s{_aalOauthToken = a}) + +-- | Maximum count of results to be returned. +aalMaxResults :: Lens' AddressesAggregatedList' Word32 +aalMaxResults + = lens _aalMaxResults + (\ s a -> s{_aalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aalFields :: Lens' AddressesAggregatedList' (Maybe Text) +aalFields + = lens _aalFields (\ s a -> s{_aalFields = a}) + +-- | Data format for the response. +aalAlt :: Lens' AddressesAggregatedList' Text +aalAlt = lens _aalAlt (\ s a -> s{_aalAlt = a}) + +instance GoogleRequest AddressesAggregatedList' where + type Rs AddressesAggregatedList' = + AddressAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u AddressesAggregatedList{..} + = go _aalQuotaUser _aalPrettyPrint _aalProject + _aalUserIp + _aalKey + _aalFilter + _aalPageToken + _aalOauthToken + (Just _aalMaxResults) + _aalFields + _aalAlt + where go + = clientWithRoute + (Proxy :: Proxy AddressesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Delete.hs new file mode 100644 index 000000000..574370432 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Delete.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Addresses.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified address resource. +-- +-- /See:/ for @ComputeAddressesDelete@. +module Compute.Addresses.Delete + ( + -- * REST Resource + AddressesDeleteAPI + + -- * Creating a Request + , addressesDelete + , AddressesDelete + + -- * Request Lenses + , adQuotaUser + , adPrettyPrint + , adProject + , adUserIp + , adAddress + , adKey + , adRegion + , adOauthToken + , adFields + , adAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAddressesDelete@ which the +-- 'AddressesDelete' request conforms to. +type AddressesDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "addresses" :> + Capture "address" Text :> Delete '[JSON] Operation + +-- | Deletes the specified address resource. +-- +-- /See:/ 'addressesDelete' smart constructor. +data AddressesDelete = AddressesDelete + { _adQuotaUser :: !(Maybe Text) + , _adPrettyPrint :: !Bool + , _adProject :: !Text + , _adUserIp :: !(Maybe Text) + , _adAddress :: !Text + , _adKey :: !(Maybe Text) + , _adRegion :: !Text + , _adOauthToken :: !(Maybe Text) + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adPrettyPrint' +-- +-- * 'adProject' +-- +-- * 'adUserIp' +-- +-- * 'adAddress' +-- +-- * 'adKey' +-- +-- * 'adRegion' +-- +-- * 'adOauthToken' +-- +-- * 'adFields' +-- +-- * 'adAlt' +addressesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'address' + -> Text -- ^ 'region' + -> AddressesDelete +addressesDelete pAdProject_ pAdAddress_ pAdRegion_ = + AddressesDelete + { _adQuotaUser = Nothing + , _adPrettyPrint = True + , _adProject = pAdProject_ + , _adUserIp = Nothing + , _adAddress = pAdAddress_ + , _adKey = Nothing + , _adRegion = pAdRegion_ + , _adOauthToken = Nothing + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' AddressesDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' AddressesDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | Project ID for this request. +adProject :: Lens' AddressesDelete' Text +adProject + = lens _adProject (\ s a -> s{_adProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' AddressesDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | Name of the address resource to delete. +adAddress :: Lens' AddressesDelete' Text +adAddress + = lens _adAddress (\ s a -> s{_adAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' AddressesDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | The name of the region for this request. +adRegion :: Lens' AddressesDelete' Text +adRegion = lens _adRegion (\ s a -> s{_adRegion = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' AddressesDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' AddressesDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' AddressesDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest AddressesDelete' where + type Rs AddressesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AddressesDelete{..} + = go _adQuotaUser _adPrettyPrint _adProject _adUserIp + _adAddress + _adKey + _adRegion + _adOauthToken + _adFields + _adAlt + where go + = clientWithRoute (Proxy :: Proxy AddressesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Get.hs new file mode 100644 index 000000000..9e281a015 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Get.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Addresses.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified address resource. +-- +-- /See:/ for @ComputeAddressesGet@. +module Compute.Addresses.Get + ( + -- * REST Resource + AddressesGetAPI + + -- * Creating a Request + , addressesGet + , AddressesGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agProject + , agUserIp + , agAddress + , agKey + , agRegion + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAddressesGet@ which the +-- 'AddressesGet' request conforms to. +type AddressesGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "addresses" :> + Capture "address" Text :> Get '[JSON] Address + +-- | Returns the specified address resource. +-- +-- /See:/ 'addressesGet' smart constructor. +data AddressesGet = AddressesGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agProject :: !Text + , _agUserIp :: !(Maybe Text) + , _agAddress :: !Text + , _agKey :: !(Maybe Text) + , _agRegion :: !Text + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agProject' +-- +-- * 'agUserIp' +-- +-- * 'agAddress' +-- +-- * 'agKey' +-- +-- * 'agRegion' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +addressesGet + :: Text -- ^ 'project' + -> Text -- ^ 'address' + -> Text -- ^ 'region' + -> AddressesGet +addressesGet pAgProject_ pAgAddress_ pAgRegion_ = + AddressesGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agProject = pAgProject_ + , _agUserIp = Nothing + , _agAddress = pAgAddress_ + , _agKey = Nothing + , _agRegion = pAgRegion_ + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AddressesGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AddressesGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | Project ID for this request. +agProject :: Lens' AddressesGet' Text +agProject + = lens _agProject (\ s a -> s{_agProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AddressesGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | Name of the address resource to return. +agAddress :: Lens' AddressesGet' Text +agAddress + = lens _agAddress (\ s a -> s{_agAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AddressesGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | The name of the region for this request. +agRegion :: Lens' AddressesGet' Text +agRegion = lens _agRegion (\ s a -> s{_agRegion = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AddressesGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AddressesGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AddressesGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AddressesGet' where + type Rs AddressesGet' = Address + request = requestWithRoute defReq computeURL + requestWithRoute r u AddressesGet{..} + = go _agQuotaUser _agPrettyPrint _agProject _agUserIp + _agAddress + _agKey + _agRegion + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AddressesGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Insert.hs new file mode 100644 index 000000000..60cab0807 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Insert.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Addresses.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an address resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeAddressesInsert@. +module Compute.Addresses.Insert + ( + -- * REST Resource + AddressesInsertAPI + + -- * Creating a Request + , addressesInsert + , AddressesInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiProject + , aiUserIp + , aiKey + , aiRegion + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAddressesInsert@ which the +-- 'AddressesInsert' request conforms to. +type AddressesInsertAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "addresses" :> Post '[JSON] Operation + +-- | Creates an address resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'addressesInsert' smart constructor. +data AddressesInsert = AddressesInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiProject :: !Text + , _aiUserIp :: !(Maybe Text) + , _aiKey :: !(Maybe Text) + , _aiRegion :: !Text + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiProject' +-- +-- * 'aiUserIp' +-- +-- * 'aiKey' +-- +-- * 'aiRegion' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +addressesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> AddressesInsert +addressesInsert pAiProject_ pAiRegion_ = + AddressesInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiProject = pAiProject_ + , _aiUserIp = Nothing + , _aiKey = Nothing + , _aiRegion = pAiRegion_ + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' AddressesInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' AddressesInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | Project ID for this request. +aiProject :: Lens' AddressesInsert' Text +aiProject + = lens _aiProject (\ s a -> s{_aiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' AddressesInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' AddressesInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | The name of the region for this request. +aiRegion :: Lens' AddressesInsert' Text +aiRegion = lens _aiRegion (\ s a -> s{_aiRegion = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' AddressesInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' AddressesInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' AddressesInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest AddressesInsert' where + type Rs AddressesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AddressesInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiProject _aiUserIp + _aiKey + _aiRegion + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute (Proxy :: Proxy AddressesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/List.hs new file mode 100644 index 000000000..5cf18f325 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Addresses/List.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Addresses.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of address resources contained within the specified +-- region. +-- +-- /See:/ for @ComputeAddressesList@. +module Compute.Addresses.List + ( + -- * REST Resource + AddressesListAPI + + -- * Creating a Request + , addressesList + , AddressesList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alProject + , alUserIp + , alKey + , alFilter + , alRegion + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAddressesList@ which the +-- 'AddressesList' request conforms to. +type AddressesListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "addresses" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AddressList + +-- | Retrieves the list of address resources contained within the specified +-- region. +-- +-- /See:/ 'addressesList' smart constructor. +data AddressesList = AddressesList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alProject :: !Text + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alFilter :: !(Maybe Text) + , _alRegion :: !Text + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !Word32 + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AddressesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alProject' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alFilter' +-- +-- * 'alRegion' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +addressesList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> AddressesList +addressesList pAlProject_ pAlRegion_ = + AddressesList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alProject = pAlProject_ + , _alUserIp = Nothing + , _alKey = Nothing + , _alFilter = Nothing + , _alRegion = pAlRegion_ + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = 500 + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AddressesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AddressesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Project ID for this request. +alProject :: Lens' AddressesList' Text +alProject + = lens _alProject (\ s a -> s{_alProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AddressesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AddressesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +alFilter :: Lens' AddressesList' (Maybe Text) +alFilter = lens _alFilter (\ s a -> s{_alFilter = a}) + +-- | The name of the region for this request. +alRegion :: Lens' AddressesList' Text +alRegion = lens _alRegion (\ s a -> s{_alRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +alPageToken :: Lens' AddressesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AddressesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Maximum count of results to be returned. +alMaxResults :: Lens' AddressesList' Word32 +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AddressesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AddressesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AddressesList' where + type Rs AddressesList' = AddressList + request = requestWithRoute defReq computeURL + requestWithRoute r u AddressesList{..} + = go _alQuotaUser _alPrettyPrint _alProject _alUserIp + _alKey + _alFilter + _alRegion + _alPageToken + _alOauthToken + (Just _alMaxResults) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AddressesListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/AggregatedList.hs new file mode 100644 index 000000000..270d20536 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/AggregatedList.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of autoscalers grouped by scope. +-- +-- /See:/ for @ComputeAutoscalersAggregatedList@. +module Compute.Autoscalers.AggregatedList + ( + -- * REST Resource + AutoscalersAggregatedListAPI + + -- * Creating a Request + , autoscalersAggregatedList + , AutoscalersAggregatedList + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aProject + , aUserIp + , aKey + , aFilter + , aPageToken + , aOauthToken + , aMaxResults + , aFields + , aAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersAggregatedList@ which the +-- 'AutoscalersAggregatedList' request conforms to. +type AutoscalersAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "autoscalers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AutoscalerAggregatedList + +-- | Retrieves the list of autoscalers grouped by scope. +-- +-- /See:/ 'autoscalersAggregatedList' smart constructor. +data AutoscalersAggregatedList = AutoscalersAggregatedList + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aProject :: !Text + , _aUserIp :: !(Maybe Text) + , _aKey :: !(Maybe Text) + , _aFilter :: !(Maybe Text) + , _aPageToken :: !(Maybe Text) + , _aOauthToken :: !(Maybe Text) + , _aMaxResults :: !Word32 + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aProject' +-- +-- * 'aUserIp' +-- +-- * 'aKey' +-- +-- * 'aFilter' +-- +-- * 'aPageToken' +-- +-- * 'aOauthToken' +-- +-- * 'aMaxResults' +-- +-- * 'aFields' +-- +-- * 'aAlt' +autoscalersAggregatedList + :: Text -- ^ 'project' + -> AutoscalersAggregatedList +autoscalersAggregatedList pAProject_ = + AutoscalersAggregatedList + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aProject = pAProject_ + , _aUserIp = Nothing + , _aKey = Nothing + , _aFilter = Nothing + , _aPageToken = Nothing + , _aOauthToken = Nothing + , _aMaxResults = 500 + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AutoscalersAggregatedList' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AutoscalersAggregatedList' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | Name of the project scoping this request. +aProject :: Lens' AutoscalersAggregatedList' Text +aProject = lens _aProject (\ s a -> s{_aProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AutoscalersAggregatedList' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AutoscalersAggregatedList' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +aFilter :: Lens' AutoscalersAggregatedList' (Maybe Text) +aFilter = lens _aFilter (\ s a -> s{_aFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +aPageToken :: Lens' AutoscalersAggregatedList' (Maybe Text) +aPageToken + = lens _aPageToken (\ s a -> s{_aPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AutoscalersAggregatedList' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Maximum count of results to be returned. +aMaxResults :: Lens' AutoscalersAggregatedList' Word32 +aMaxResults + = lens _aMaxResults (\ s a -> s{_aMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AutoscalersAggregatedList' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AutoscalersAggregatedList' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AutoscalersAggregatedList' + where + type Rs AutoscalersAggregatedList' = + AutoscalerAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersAggregatedList{..} + = go _aQuotaUser _aPrettyPrint _aProject _aUserIp + _aKey + _aFilter + _aPageToken + _aOauthToken + (Just _aMaxResults) + _aFields + _aAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Delete.hs new file mode 100644 index 000000000..148723a07 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified autoscaler resource. +-- +-- /See:/ for @ComputeAutoscalersDelete@. +module Compute.Autoscalers.Delete + ( + -- * REST Resource + AutoscalersDeleteAPI + + -- * Creating a Request + , autoscalersDelete + , AutoscalersDelete + + -- * Request Lenses + , addQuotaUser + , addPrettyPrint + , addProject + , addUserIp + , addZone + , addKey + , addAutoscaler + , addOauthToken + , addFields + , addAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersDelete@ which the +-- 'AutoscalersDelete' request conforms to. +type AutoscalersDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Delete '[JSON] Operation + +-- | Deletes the specified autoscaler resource. +-- +-- /See:/ 'autoscalersDelete' smart constructor. +data AutoscalersDelete = AutoscalersDelete + { _addQuotaUser :: !(Maybe Text) + , _addPrettyPrint :: !Bool + , _addProject :: !Text + , _addUserIp :: !(Maybe Text) + , _addZone :: !Text + , _addKey :: !(Maybe Text) + , _addAutoscaler :: !Text + , _addOauthToken :: !(Maybe Text) + , _addFields :: !(Maybe Text) + , _addAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'addQuotaUser' +-- +-- * 'addPrettyPrint' +-- +-- * 'addProject' +-- +-- * 'addUserIp' +-- +-- * 'addZone' +-- +-- * 'addKey' +-- +-- * 'addAutoscaler' +-- +-- * 'addOauthToken' +-- +-- * 'addFields' +-- +-- * 'addAlt' +autoscalersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersDelete +autoscalersDelete pAddProject_ pAddZone_ pAddAutoscaler_ = + AutoscalersDelete + { _addQuotaUser = Nothing + , _addPrettyPrint = True + , _addProject = pAddProject_ + , _addUserIp = Nothing + , _addZone = pAddZone_ + , _addKey = Nothing + , _addAutoscaler = pAddAutoscaler_ + , _addOauthToken = Nothing + , _addFields = Nothing + , _addAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +addQuotaUser :: Lens' AutoscalersDelete' (Maybe Text) +addQuotaUser + = lens _addQuotaUser (\ s a -> s{_addQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +addPrettyPrint :: Lens' AutoscalersDelete' Bool +addPrettyPrint + = lens _addPrettyPrint + (\ s a -> s{_addPrettyPrint = a}) + +-- | Name of the project scoping this request. +addProject :: Lens' AutoscalersDelete' Text +addProject + = lens _addProject (\ s a -> s{_addProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +addUserIp :: Lens' AutoscalersDelete' (Maybe Text) +addUserIp + = lens _addUserIp (\ s a -> s{_addUserIp = a}) + +-- | Name of the zone scoping this request. +addZone :: Lens' AutoscalersDelete' Text +addZone = lens _addZone (\ s a -> s{_addZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +addKey :: Lens' AutoscalersDelete' (Maybe Text) +addKey = lens _addKey (\ s a -> s{_addKey = a}) + +-- | Name of the persistent autoscaler resource to delete. +addAutoscaler :: Lens' AutoscalersDelete' Text +addAutoscaler + = lens _addAutoscaler + (\ s a -> s{_addAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +addOauthToken :: Lens' AutoscalersDelete' (Maybe Text) +addOauthToken + = lens _addOauthToken + (\ s a -> s{_addOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +addFields :: Lens' AutoscalersDelete' (Maybe Text) +addFields + = lens _addFields (\ s a -> s{_addFields = a}) + +-- | Data format for the response. +addAlt :: Lens' AutoscalersDelete' Text +addAlt = lens _addAlt (\ s a -> s{_addAlt = a}) + +instance GoogleRequest AutoscalersDelete' where + type Rs AutoscalersDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersDelete{..} + = go _addQuotaUser _addPrettyPrint _addProject + _addUserIp + _addZone + _addKey + _addAutoscaler + _addOauthToken + _addFields + _addAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Get.hs new file mode 100644 index 000000000..565fd0c12 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified autoscaler resource. +-- +-- /See:/ for @ComputeAutoscalersGet@. +module Compute.Autoscalers.Get + ( + -- * REST Resource + AutoscalersGetAPI + + -- * Creating a Request + , autoscalersGet + , AutoscalersGet + + -- * Request Lenses + , aggQuotaUser + , aggPrettyPrint + , aggProject + , aggUserIp + , aggZone + , aggKey + , aggAutoscaler + , aggOauthToken + , aggFields + , aggAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersGet@ which the +-- 'AutoscalersGet' request conforms to. +type AutoscalersGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + Capture "autoscaler" Text :> Get '[JSON] Autoscaler + +-- | Returns the specified autoscaler resource. +-- +-- /See:/ 'autoscalersGet' smart constructor. +data AutoscalersGet = AutoscalersGet + { _aggQuotaUser :: !(Maybe Text) + , _aggPrettyPrint :: !Bool + , _aggProject :: !Text + , _aggUserIp :: !(Maybe Text) + , _aggZone :: !Text + , _aggKey :: !(Maybe Text) + , _aggAutoscaler :: !Text + , _aggOauthToken :: !(Maybe Text) + , _aggFields :: !(Maybe Text) + , _aggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aggQuotaUser' +-- +-- * 'aggPrettyPrint' +-- +-- * 'aggProject' +-- +-- * 'aggUserIp' +-- +-- * 'aggZone' +-- +-- * 'aggKey' +-- +-- * 'aggAutoscaler' +-- +-- * 'aggOauthToken' +-- +-- * 'aggFields' +-- +-- * 'aggAlt' +autoscalersGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersGet +autoscalersGet pAggProject_ pAggZone_ pAggAutoscaler_ = + AutoscalersGet + { _aggQuotaUser = Nothing + , _aggPrettyPrint = True + , _aggProject = pAggProject_ + , _aggUserIp = Nothing + , _aggZone = pAggZone_ + , _aggKey = Nothing + , _aggAutoscaler = pAggAutoscaler_ + , _aggOauthToken = Nothing + , _aggFields = Nothing + , _aggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aggQuotaUser :: Lens' AutoscalersGet' (Maybe Text) +aggQuotaUser + = lens _aggQuotaUser (\ s a -> s{_aggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aggPrettyPrint :: Lens' AutoscalersGet' Bool +aggPrettyPrint + = lens _aggPrettyPrint + (\ s a -> s{_aggPrettyPrint = a}) + +-- | Name of the project scoping this request. +aggProject :: Lens' AutoscalersGet' Text +aggProject + = lens _aggProject (\ s a -> s{_aggProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aggUserIp :: Lens' AutoscalersGet' (Maybe Text) +aggUserIp + = lens _aggUserIp (\ s a -> s{_aggUserIp = a}) + +-- | Name of the zone scoping this request. +aggZone :: Lens' AutoscalersGet' Text +aggZone = lens _aggZone (\ s a -> s{_aggZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aggKey :: Lens' AutoscalersGet' (Maybe Text) +aggKey = lens _aggKey (\ s a -> s{_aggKey = a}) + +-- | Name of the persistent autoscaler resource to return. +aggAutoscaler :: Lens' AutoscalersGet' Text +aggAutoscaler + = lens _aggAutoscaler + (\ s a -> s{_aggAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +aggOauthToken :: Lens' AutoscalersGet' (Maybe Text) +aggOauthToken + = lens _aggOauthToken + (\ s a -> s{_aggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aggFields :: Lens' AutoscalersGet' (Maybe Text) +aggFields + = lens _aggFields (\ s a -> s{_aggFields = a}) + +-- | Data format for the response. +aggAlt :: Lens' AutoscalersGet' Text +aggAlt = lens _aggAlt (\ s a -> s{_aggAlt = a}) + +instance GoogleRequest AutoscalersGet' where + type Rs AutoscalersGet' = Autoscaler + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersGet{..} + = go _aggQuotaUser _aggPrettyPrint _aggProject + _aggUserIp + _aggZone + _aggKey + _aggAutoscaler + _aggOauthToken + _aggFields + _aggAlt + where go + = clientWithRoute (Proxy :: Proxy AutoscalersGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Insert.hs new file mode 100644 index 000000000..1debb33c0 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Insert.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an autoscaler resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeAutoscalersInsert@. +module Compute.Autoscalers.Insert + ( + -- * REST Resource + AutoscalersInsertAPI + + -- * Creating a Request + , autoscalersInsert + , AutoscalersInsert + + -- * Request Lenses + , autQuotaUser + , autPrettyPrint + , autProject + , autUserIp + , autZone + , autKey + , autOauthToken + , autFields + , autAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersInsert@ which the +-- 'AutoscalersInsert' request conforms to. +type AutoscalersInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> Post '[JSON] Operation + +-- | Creates an autoscaler resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'autoscalersInsert' smart constructor. +data AutoscalersInsert = AutoscalersInsert + { _autQuotaUser :: !(Maybe Text) + , _autPrettyPrint :: !Bool + , _autProject :: !Text + , _autUserIp :: !(Maybe Text) + , _autZone :: !Text + , _autKey :: !(Maybe Text) + , _autOauthToken :: !(Maybe Text) + , _autFields :: !(Maybe Text) + , _autAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'autQuotaUser' +-- +-- * 'autPrettyPrint' +-- +-- * 'autProject' +-- +-- * 'autUserIp' +-- +-- * 'autZone' +-- +-- * 'autKey' +-- +-- * 'autOauthToken' +-- +-- * 'autFields' +-- +-- * 'autAlt' +autoscalersInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> AutoscalersInsert +autoscalersInsert pAutProject_ pAutZone_ = + AutoscalersInsert + { _autQuotaUser = Nothing + , _autPrettyPrint = True + , _autProject = pAutProject_ + , _autUserIp = Nothing + , _autZone = pAutZone_ + , _autKey = Nothing + , _autOauthToken = Nothing + , _autFields = Nothing + , _autAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +autQuotaUser :: Lens' AutoscalersInsert' (Maybe Text) +autQuotaUser + = lens _autQuotaUser (\ s a -> s{_autQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +autPrettyPrint :: Lens' AutoscalersInsert' Bool +autPrettyPrint + = lens _autPrettyPrint + (\ s a -> s{_autPrettyPrint = a}) + +-- | Name of the project scoping this request. +autProject :: Lens' AutoscalersInsert' Text +autProject + = lens _autProject (\ s a -> s{_autProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +autUserIp :: Lens' AutoscalersInsert' (Maybe Text) +autUserIp + = lens _autUserIp (\ s a -> s{_autUserIp = a}) + +-- | Name of the zone scoping this request. +autZone :: Lens' AutoscalersInsert' Text +autZone = lens _autZone (\ s a -> s{_autZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +autKey :: Lens' AutoscalersInsert' (Maybe Text) +autKey = lens _autKey (\ s a -> s{_autKey = a}) + +-- | OAuth 2.0 token for the current user. +autOauthToken :: Lens' AutoscalersInsert' (Maybe Text) +autOauthToken + = lens _autOauthToken + (\ s a -> s{_autOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +autFields :: Lens' AutoscalersInsert' (Maybe Text) +autFields + = lens _autFields (\ s a -> s{_autFields = a}) + +-- | Data format for the response. +autAlt :: Lens' AutoscalersInsert' Text +autAlt = lens _autAlt (\ s a -> s{_autAlt = a}) + +instance GoogleRequest AutoscalersInsert' where + type Rs AutoscalersInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersInsert{..} + = go _autQuotaUser _autPrettyPrint _autProject + _autUserIp + _autZone + _autKey + _autOauthToken + _autFields + _autAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/List.hs new file mode 100644 index 000000000..f73b4e601 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/List.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of autoscaler resources contained within the +-- specified zone. +-- +-- /See:/ for @ComputeAutoscalersList@. +module Compute.Autoscalers.List + ( + -- * REST Resource + AutoscalersListAPI + + -- * Creating a Request + , autoscalersList + , AutoscalersList + + -- * Request Lenses + , allQuotaUser + , allPrettyPrint + , allProject + , allUserIp + , allZone + , allKey + , allFilter + , allPageToken + , allOauthToken + , allMaxResults + , allFields + , allAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersList@ which the +-- 'AutoscalersList' request conforms to. +type AutoscalersListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AutoscalerList + +-- | Retrieves the list of autoscaler resources contained within the +-- specified zone. +-- +-- /See:/ 'autoscalersList' smart constructor. +data AutoscalersList = AutoscalersList + { _allQuotaUser :: !(Maybe Text) + , _allPrettyPrint :: !Bool + , _allProject :: !Text + , _allUserIp :: !(Maybe Text) + , _allZone :: !Text + , _allKey :: !(Maybe Text) + , _allFilter :: !(Maybe Text) + , _allPageToken :: !(Maybe Text) + , _allOauthToken :: !(Maybe Text) + , _allMaxResults :: !Word32 + , _allFields :: !(Maybe Text) + , _allAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'allQuotaUser' +-- +-- * 'allPrettyPrint' +-- +-- * 'allProject' +-- +-- * 'allUserIp' +-- +-- * 'allZone' +-- +-- * 'allKey' +-- +-- * 'allFilter' +-- +-- * 'allPageToken' +-- +-- * 'allOauthToken' +-- +-- * 'allMaxResults' +-- +-- * 'allFields' +-- +-- * 'allAlt' +autoscalersList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> AutoscalersList +autoscalersList pAllProject_ pAllZone_ = + AutoscalersList + { _allQuotaUser = Nothing + , _allPrettyPrint = True + , _allProject = pAllProject_ + , _allUserIp = Nothing + , _allZone = pAllZone_ + , _allKey = Nothing + , _allFilter = Nothing + , _allPageToken = Nothing + , _allOauthToken = Nothing + , _allMaxResults = 500 + , _allFields = Nothing + , _allAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +allQuotaUser :: Lens' AutoscalersList' (Maybe Text) +allQuotaUser + = lens _allQuotaUser (\ s a -> s{_allQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +allPrettyPrint :: Lens' AutoscalersList' Bool +allPrettyPrint + = lens _allPrettyPrint + (\ s a -> s{_allPrettyPrint = a}) + +-- | Name of the project scoping this request. +allProject :: Lens' AutoscalersList' Text +allProject + = lens _allProject (\ s a -> s{_allProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +allUserIp :: Lens' AutoscalersList' (Maybe Text) +allUserIp + = lens _allUserIp (\ s a -> s{_allUserIp = a}) + +-- | Name of the zone scoping this request. +allZone :: Lens' AutoscalersList' Text +allZone = lens _allZone (\ s a -> s{_allZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +allKey :: Lens' AutoscalersList' (Maybe Text) +allKey = lens _allKey (\ s a -> s{_allKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +allFilter :: Lens' AutoscalersList' (Maybe Text) +allFilter + = lens _allFilter (\ s a -> s{_allFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +allPageToken :: Lens' AutoscalersList' (Maybe Text) +allPageToken + = lens _allPageToken (\ s a -> s{_allPageToken = a}) + +-- | OAuth 2.0 token for the current user. +allOauthToken :: Lens' AutoscalersList' (Maybe Text) +allOauthToken + = lens _allOauthToken + (\ s a -> s{_allOauthToken = a}) + +-- | Maximum count of results to be returned. +allMaxResults :: Lens' AutoscalersList' Word32 +allMaxResults + = lens _allMaxResults + (\ s a -> s{_allMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +allFields :: Lens' AutoscalersList' (Maybe Text) +allFields + = lens _allFields (\ s a -> s{_allFields = a}) + +-- | Data format for the response. +allAlt :: Lens' AutoscalersList' Text +allAlt = lens _allAlt (\ s a -> s{_allAlt = a}) + +instance GoogleRequest AutoscalersList' where + type Rs AutoscalersList' = AutoscalerList + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersList{..} + = go _allQuotaUser _allPrettyPrint _allProject + _allUserIp + _allZone + _allKey + _allFilter + _allPageToken + _allOauthToken + (Just _allMaxResults) + _allFields + _allAlt + where go + = clientWithRoute (Proxy :: Proxy AutoscalersListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Patch.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Patch.hs new file mode 100644 index 000000000..9241e904a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Patch.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an autoscaler resource in the specified project using the data +-- included in the request. This method supports patch semantics. +-- +-- /See:/ for @ComputeAutoscalersPatch@. +module Compute.Autoscalers.Patch + ( + -- * REST Resource + AutoscalersPatchAPI + + -- * Creating a Request + , autoscalersPatch + , AutoscalersPatch + + -- * Request Lenses + , apQuotaUser + , apPrettyPrint + , apProject + , apUserIp + , apZone + , apKey + , apAutoscaler + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersPatch@ which the +-- 'AutoscalersPatch' request conforms to. +type AutoscalersPatchAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + QueryParam "autoscaler" Text :> + Patch '[JSON] Operation + +-- | Updates an autoscaler resource in the specified project using the data +-- included in the request. This method supports patch semantics. +-- +-- /See:/ 'autoscalersPatch' smart constructor. +data AutoscalersPatch = AutoscalersPatch + { _apQuotaUser :: !(Maybe Text) + , _apPrettyPrint :: !Bool + , _apProject :: !Text + , _apUserIp :: !(Maybe Text) + , _apZone :: !Text + , _apKey :: !(Maybe Text) + , _apAutoscaler :: !Text + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apPrettyPrint' +-- +-- * 'apProject' +-- +-- * 'apUserIp' +-- +-- * 'apZone' +-- +-- * 'apKey' +-- +-- * 'apAutoscaler' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +autoscalersPatch + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'autoscaler' + -> AutoscalersPatch +autoscalersPatch pApProject_ pApZone_ pApAutoscaler_ = + AutoscalersPatch + { _apQuotaUser = Nothing + , _apPrettyPrint = True + , _apProject = pApProject_ + , _apUserIp = Nothing + , _apZone = pApZone_ + , _apKey = Nothing + , _apAutoscaler = pApAutoscaler_ + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' AutoscalersPatch' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' AutoscalersPatch' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | Name of the project scoping this request. +apProject :: Lens' AutoscalersPatch' Text +apProject + = lens _apProject (\ s a -> s{_apProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' AutoscalersPatch' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | Name of the zone scoping this request. +apZone :: Lens' AutoscalersPatch' Text +apZone = lens _apZone (\ s a -> s{_apZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' AutoscalersPatch' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | Name of the autoscaler resource to update. +apAutoscaler :: Lens' AutoscalersPatch' Text +apAutoscaler + = lens _apAutoscaler (\ s a -> s{_apAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' AutoscalersPatch' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' AutoscalersPatch' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' AutoscalersPatch' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest AutoscalersPatch' where + type Rs AutoscalersPatch' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersPatch{..} + = go _apQuotaUser _apPrettyPrint _apProject _apUserIp + _apZone + _apKey + (Just _apAutoscaler) + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersPatchAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Update.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Update.hs new file mode 100644 index 000000000..4791c493a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Update.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Autoscalers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an autoscaler resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeAutoscalersUpdate@. +module Compute.Autoscalers.Update + ( + -- * REST Resource + AutoscalersUpdateAPI + + -- * Creating a Request + , autoscalersUpdate + , AutoscalersUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auProject + , auUserIp + , auZone + , auKey + , auAutoscaler + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeAutoscalersUpdate@ which the +-- 'AutoscalersUpdate' request conforms to. +type AutoscalersUpdateAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "autoscalers" :> + QueryParam "autoscaler" Text :> Put '[JSON] Operation + +-- | Updates an autoscaler resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'autoscalersUpdate' smart constructor. +data AutoscalersUpdate = AutoscalersUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auProject :: !Text + , _auUserIp :: !(Maybe Text) + , _auZone :: !Text + , _auKey :: !(Maybe Text) + , _auAutoscaler :: !(Maybe Text) + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auProject' +-- +-- * 'auUserIp' +-- +-- * 'auZone' +-- +-- * 'auKey' +-- +-- * 'auAutoscaler' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +autoscalersUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> AutoscalersUpdate +autoscalersUpdate pAuProject_ pAuZone_ = + AutoscalersUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auProject = pAuProject_ + , _auUserIp = Nothing + , _auZone = pAuZone_ + , _auKey = Nothing + , _auAutoscaler = Nothing + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AutoscalersUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AutoscalersUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | Name of the project scoping this request. +auProject :: Lens' AutoscalersUpdate' Text +auProject + = lens _auProject (\ s a -> s{_auProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AutoscalersUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | Name of the zone scoping this request. +auZone :: Lens' AutoscalersUpdate' Text +auZone = lens _auZone (\ s a -> s{_auZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AutoscalersUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | Name of the autoscaler resource to update. +auAutoscaler :: Lens' AutoscalersUpdate' (Maybe Text) +auAutoscaler + = lens _auAutoscaler (\ s a -> s{_auAutoscaler = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AutoscalersUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AutoscalersUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AutoscalersUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AutoscalersUpdate' where + type Rs AutoscalersUpdate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u AutoscalersUpdate{..} + = go _auQuotaUser _auPrettyPrint _auProject _auUserIp + _auZone + _auKey + _auAutoscaler + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute + (Proxy :: Proxy AutoscalersUpdateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Delete.hs new file mode 100644 index 000000000..ccf32b53b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified BackendService resource. +-- +-- /See:/ for @ComputeBackendServicesDelete@. +module Compute.BackendServices.Delete + ( + -- * REST Resource + BackendServicesDeleteAPI + + -- * Creating a Request + , backendServicesDelete + , BackendServicesDelete + + -- * Request Lenses + , bsdQuotaUser + , bsdPrettyPrint + , bsdProject + , bsdUserIp + , bsdKey + , bsdOauthToken + , bsdFields + , bsdAlt + , bsdBackendService + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesDelete@ which the +-- 'BackendServicesDelete' request conforms to. +type BackendServicesDeleteAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + Capture "backendService" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified BackendService resource. +-- +-- /See:/ 'backendServicesDelete' smart constructor. +data BackendServicesDelete = BackendServicesDelete + { _bsdQuotaUser :: !(Maybe Text) + , _bsdPrettyPrint :: !Bool + , _bsdProject :: !Text + , _bsdUserIp :: !(Maybe Text) + , _bsdKey :: !(Maybe Text) + , _bsdOauthToken :: !(Maybe Text) + , _bsdFields :: !(Maybe Text) + , _bsdAlt :: !Text + , _bsdBackendService :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsdQuotaUser' +-- +-- * 'bsdPrettyPrint' +-- +-- * 'bsdProject' +-- +-- * 'bsdUserIp' +-- +-- * 'bsdKey' +-- +-- * 'bsdOauthToken' +-- +-- * 'bsdFields' +-- +-- * 'bsdAlt' +-- +-- * 'bsdBackendService' +backendServicesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'backendService' + -> BackendServicesDelete +backendServicesDelete pBsdProject_ pBsdBackendService_ = + BackendServicesDelete + { _bsdQuotaUser = Nothing + , _bsdPrettyPrint = True + , _bsdProject = pBsdProject_ + , _bsdUserIp = Nothing + , _bsdKey = Nothing + , _bsdOauthToken = Nothing + , _bsdFields = Nothing + , _bsdAlt = "json" + , _bsdBackendService = pBsdBackendService_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bsdQuotaUser :: Lens' BackendServicesDelete' (Maybe Text) +bsdQuotaUser + = lens _bsdQuotaUser (\ s a -> s{_bsdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bsdPrettyPrint :: Lens' BackendServicesDelete' Bool +bsdPrettyPrint + = lens _bsdPrettyPrint + (\ s a -> s{_bsdPrettyPrint = a}) + +-- | Name of the project scoping this request. +bsdProject :: Lens' BackendServicesDelete' Text +bsdProject + = lens _bsdProject (\ s a -> s{_bsdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bsdUserIp :: Lens' BackendServicesDelete' (Maybe Text) +bsdUserIp + = lens _bsdUserIp (\ s a -> s{_bsdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bsdKey :: Lens' BackendServicesDelete' (Maybe Text) +bsdKey = lens _bsdKey (\ s a -> s{_bsdKey = a}) + +-- | OAuth 2.0 token for the current user. +bsdOauthToken :: Lens' BackendServicesDelete' (Maybe Text) +bsdOauthToken + = lens _bsdOauthToken + (\ s a -> s{_bsdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bsdFields :: Lens' BackendServicesDelete' (Maybe Text) +bsdFields + = lens _bsdFields (\ s a -> s{_bsdFields = a}) + +-- | Data format for the response. +bsdAlt :: Lens' BackendServicesDelete' Text +bsdAlt = lens _bsdAlt (\ s a -> s{_bsdAlt = a}) + +-- | Name of the BackendService resource to delete. +bsdBackendService :: Lens' BackendServicesDelete' Text +bsdBackendService + = lens _bsdBackendService + (\ s a -> s{_bsdBackendService = a}) + +instance GoogleRequest BackendServicesDelete' where + type Rs BackendServicesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesDelete{..} + = go _bsdQuotaUser _bsdPrettyPrint _bsdProject + _bsdUserIp + _bsdKey + _bsdOauthToken + _bsdFields + _bsdAlt + _bsdBackendService + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Get.hs new file mode 100644 index 000000000..cb7c5172f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Get.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified BackendService resource. +-- +-- /See:/ for @ComputeBackendServicesGet@. +module Compute.BackendServices.Get + ( + -- * REST Resource + BackendServicesGetAPI + + -- * Creating a Request + , backendServicesGet + , BackendServicesGet + + -- * Request Lenses + , bsgQuotaUser + , bsgPrettyPrint + , bsgProject + , bsgUserIp + , bsgKey + , bsgOauthToken + , bsgFields + , bsgAlt + , bsgBackendService + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesGet@ which the +-- 'BackendServicesGet' request conforms to. +type BackendServicesGetAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + Capture "backendService" Text :> + Get '[JSON] BackendService + +-- | Returns the specified BackendService resource. +-- +-- /See:/ 'backendServicesGet' smart constructor. +data BackendServicesGet = BackendServicesGet + { _bsgQuotaUser :: !(Maybe Text) + , _bsgPrettyPrint :: !Bool + , _bsgProject :: !Text + , _bsgUserIp :: !(Maybe Text) + , _bsgKey :: !(Maybe Text) + , _bsgOauthToken :: !(Maybe Text) + , _bsgFields :: !(Maybe Text) + , _bsgAlt :: !Text + , _bsgBackendService :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsgQuotaUser' +-- +-- * 'bsgPrettyPrint' +-- +-- * 'bsgProject' +-- +-- * 'bsgUserIp' +-- +-- * 'bsgKey' +-- +-- * 'bsgOauthToken' +-- +-- * 'bsgFields' +-- +-- * 'bsgAlt' +-- +-- * 'bsgBackendService' +backendServicesGet + :: Text -- ^ 'project' + -> Text -- ^ 'backendService' + -> BackendServicesGet +backendServicesGet pBsgProject_ pBsgBackendService_ = + BackendServicesGet + { _bsgQuotaUser = Nothing + , _bsgPrettyPrint = True + , _bsgProject = pBsgProject_ + , _bsgUserIp = Nothing + , _bsgKey = Nothing + , _bsgOauthToken = Nothing + , _bsgFields = Nothing + , _bsgAlt = "json" + , _bsgBackendService = pBsgBackendService_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bsgQuotaUser :: Lens' BackendServicesGet' (Maybe Text) +bsgQuotaUser + = lens _bsgQuotaUser (\ s a -> s{_bsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bsgPrettyPrint :: Lens' BackendServicesGet' Bool +bsgPrettyPrint + = lens _bsgPrettyPrint + (\ s a -> s{_bsgPrettyPrint = a}) + +-- | Name of the project scoping this request. +bsgProject :: Lens' BackendServicesGet' Text +bsgProject + = lens _bsgProject (\ s a -> s{_bsgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bsgUserIp :: Lens' BackendServicesGet' (Maybe Text) +bsgUserIp + = lens _bsgUserIp (\ s a -> s{_bsgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bsgKey :: Lens' BackendServicesGet' (Maybe Text) +bsgKey = lens _bsgKey (\ s a -> s{_bsgKey = a}) + +-- | OAuth 2.0 token for the current user. +bsgOauthToken :: Lens' BackendServicesGet' (Maybe Text) +bsgOauthToken + = lens _bsgOauthToken + (\ s a -> s{_bsgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bsgFields :: Lens' BackendServicesGet' (Maybe Text) +bsgFields + = lens _bsgFields (\ s a -> s{_bsgFields = a}) + +-- | Data format for the response. +bsgAlt :: Lens' BackendServicesGet' Text +bsgAlt = lens _bsgAlt (\ s a -> s{_bsgAlt = a}) + +-- | Name of the BackendService resource to return. +bsgBackendService :: Lens' BackendServicesGet' Text +bsgBackendService + = lens _bsgBackendService + (\ s a -> s{_bsgBackendService = a}) + +instance GoogleRequest BackendServicesGet' where + type Rs BackendServicesGet' = BackendService + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesGet{..} + = go _bsgQuotaUser _bsgPrettyPrint _bsgProject + _bsgUserIp + _bsgKey + _bsgOauthToken + _bsgFields + _bsgAlt + _bsgBackendService + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/GetHealth.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/GetHealth.hs new file mode 100644 index 000000000..670c99bcb --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/GetHealth.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.GetHealth +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the most recent health check results for this BackendService. +-- +-- /See:/ for @ComputeBackendServicesGetHealth@. +module Compute.BackendServices.GetHealth + ( + -- * REST Resource + BackendServicesGetHealthAPI + + -- * Creating a Request + , backendServicesGetHealth + , BackendServicesGetHealth + + -- * Request Lenses + , bsghQuotaUser + , bsghPrettyPrint + , bsghProject + , bsghUserIp + , bsghKey + , bsghOauthToken + , bsghFields + , bsghAlt + , bsghBackendService + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesGetHealth@ which the +-- 'BackendServicesGetHealth' request conforms to. +type BackendServicesGetHealthAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + Capture "backendService" Text :> + "getHealth" :> Post '[JSON] BackendServiceGroupHealth + +-- | Gets the most recent health check results for this BackendService. +-- +-- /See:/ 'backendServicesGetHealth' smart constructor. +data BackendServicesGetHealth = BackendServicesGetHealth + { _bsghQuotaUser :: !(Maybe Text) + , _bsghPrettyPrint :: !Bool + , _bsghProject :: !Text + , _bsghUserIp :: !(Maybe Text) + , _bsghKey :: !(Maybe Text) + , _bsghOauthToken :: !(Maybe Text) + , _bsghFields :: !(Maybe Text) + , _bsghAlt :: !Text + , _bsghBackendService :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesGetHealth'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsghQuotaUser' +-- +-- * 'bsghPrettyPrint' +-- +-- * 'bsghProject' +-- +-- * 'bsghUserIp' +-- +-- * 'bsghKey' +-- +-- * 'bsghOauthToken' +-- +-- * 'bsghFields' +-- +-- * 'bsghAlt' +-- +-- * 'bsghBackendService' +backendServicesGetHealth + :: Text -- ^ 'project' + -> Text -- ^ 'backendService' + -> BackendServicesGetHealth +backendServicesGetHealth pBsghProject_ pBsghBackendService_ = + BackendServicesGetHealth + { _bsghQuotaUser = Nothing + , _bsghPrettyPrint = True + , _bsghProject = pBsghProject_ + , _bsghUserIp = Nothing + , _bsghKey = Nothing + , _bsghOauthToken = Nothing + , _bsghFields = Nothing + , _bsghAlt = "json" + , _bsghBackendService = pBsghBackendService_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bsghQuotaUser :: Lens' BackendServicesGetHealth' (Maybe Text) +bsghQuotaUser + = lens _bsghQuotaUser + (\ s a -> s{_bsghQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bsghPrettyPrint :: Lens' BackendServicesGetHealth' Bool +bsghPrettyPrint + = lens _bsghPrettyPrint + (\ s a -> s{_bsghPrettyPrint = a}) + +bsghProject :: Lens' BackendServicesGetHealth' Text +bsghProject + = lens _bsghProject (\ s a -> s{_bsghProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bsghUserIp :: Lens' BackendServicesGetHealth' (Maybe Text) +bsghUserIp + = lens _bsghUserIp (\ s a -> s{_bsghUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bsghKey :: Lens' BackendServicesGetHealth' (Maybe Text) +bsghKey = lens _bsghKey (\ s a -> s{_bsghKey = a}) + +-- | OAuth 2.0 token for the current user. +bsghOauthToken :: Lens' BackendServicesGetHealth' (Maybe Text) +bsghOauthToken + = lens _bsghOauthToken + (\ s a -> s{_bsghOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bsghFields :: Lens' BackendServicesGetHealth' (Maybe Text) +bsghFields + = lens _bsghFields (\ s a -> s{_bsghFields = a}) + +-- | Data format for the response. +bsghAlt :: Lens' BackendServicesGetHealth' Text +bsghAlt = lens _bsghAlt (\ s a -> s{_bsghAlt = a}) + +-- | Name of the BackendService resource to which the queried instance +-- belongs. +bsghBackendService :: Lens' BackendServicesGetHealth' Text +bsghBackendService + = lens _bsghBackendService + (\ s a -> s{_bsghBackendService = a}) + +instance GoogleRequest BackendServicesGetHealth' + where + type Rs BackendServicesGetHealth' = + BackendServiceGroupHealth + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesGetHealth{..} + = go _bsghQuotaUser _bsghPrettyPrint _bsghProject + _bsghUserIp + _bsghKey + _bsghOauthToken + _bsghFields + _bsghAlt + _bsghBackendService + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesGetHealthAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Insert.hs new file mode 100644 index 000000000..5154864df --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Insert.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a BackendService resource in the specified project using the +-- data included in the request. +-- +-- /See:/ for @ComputeBackendServicesInsert@. +module Compute.BackendServices.Insert + ( + -- * REST Resource + BackendServicesInsertAPI + + -- * Creating a Request + , backendServicesInsert + , BackendServicesInsert + + -- * Request Lenses + , bsiQuotaUser + , bsiPrettyPrint + , bsiProject + , bsiUserIp + , bsiKey + , bsiOauthToken + , bsiFields + , bsiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesInsert@ which the +-- 'BackendServicesInsert' request conforms to. +type BackendServicesInsertAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> Post '[JSON] Operation + +-- | Creates a BackendService resource in the specified project using the +-- data included in the request. +-- +-- /See:/ 'backendServicesInsert' smart constructor. +data BackendServicesInsert = BackendServicesInsert + { _bsiQuotaUser :: !(Maybe Text) + , _bsiPrettyPrint :: !Bool + , _bsiProject :: !Text + , _bsiUserIp :: !(Maybe Text) + , _bsiKey :: !(Maybe Text) + , _bsiOauthToken :: !(Maybe Text) + , _bsiFields :: !(Maybe Text) + , _bsiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsiQuotaUser' +-- +-- * 'bsiPrettyPrint' +-- +-- * 'bsiProject' +-- +-- * 'bsiUserIp' +-- +-- * 'bsiKey' +-- +-- * 'bsiOauthToken' +-- +-- * 'bsiFields' +-- +-- * 'bsiAlt' +backendServicesInsert + :: Text -- ^ 'project' + -> BackendServicesInsert +backendServicesInsert pBsiProject_ = + BackendServicesInsert + { _bsiQuotaUser = Nothing + , _bsiPrettyPrint = True + , _bsiProject = pBsiProject_ + , _bsiUserIp = Nothing + , _bsiKey = Nothing + , _bsiOauthToken = Nothing + , _bsiFields = Nothing + , _bsiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bsiQuotaUser :: Lens' BackendServicesInsert' (Maybe Text) +bsiQuotaUser + = lens _bsiQuotaUser (\ s a -> s{_bsiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bsiPrettyPrint :: Lens' BackendServicesInsert' Bool +bsiPrettyPrint + = lens _bsiPrettyPrint + (\ s a -> s{_bsiPrettyPrint = a}) + +-- | Name of the project scoping this request. +bsiProject :: Lens' BackendServicesInsert' Text +bsiProject + = lens _bsiProject (\ s a -> s{_bsiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bsiUserIp :: Lens' BackendServicesInsert' (Maybe Text) +bsiUserIp + = lens _bsiUserIp (\ s a -> s{_bsiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bsiKey :: Lens' BackendServicesInsert' (Maybe Text) +bsiKey = lens _bsiKey (\ s a -> s{_bsiKey = a}) + +-- | OAuth 2.0 token for the current user. +bsiOauthToken :: Lens' BackendServicesInsert' (Maybe Text) +bsiOauthToken + = lens _bsiOauthToken + (\ s a -> s{_bsiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bsiFields :: Lens' BackendServicesInsert' (Maybe Text) +bsiFields + = lens _bsiFields (\ s a -> s{_bsiFields = a}) + +-- | Data format for the response. +bsiAlt :: Lens' BackendServicesInsert' Text +bsiAlt = lens _bsiAlt (\ s a -> s{_bsiAlt = a}) + +instance GoogleRequest BackendServicesInsert' where + type Rs BackendServicesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesInsert{..} + = go _bsiQuotaUser _bsiPrettyPrint _bsiProject + _bsiUserIp + _bsiKey + _bsiOauthToken + _bsiFields + _bsiAlt + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/List.hs new file mode 100644 index 000000000..6ffcd9d76 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/List.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of BackendService resources available to the +-- specified project. +-- +-- /See:/ for @ComputeBackendServicesList@. +module Compute.BackendServices.List + ( + -- * REST Resource + BackendServicesListAPI + + -- * Creating a Request + , backendServicesList + , BackendServicesList + + -- * Request Lenses + , bslQuotaUser + , bslPrettyPrint + , bslProject + , bslUserIp + , bslKey + , bslFilter + , bslPageToken + , bslOauthToken + , bslMaxResults + , bslFields + , bslAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesList@ which the +-- 'BackendServicesList' request conforms to. +type BackendServicesListAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] BackendServiceList + +-- | Retrieves the list of BackendService resources available to the +-- specified project. +-- +-- /See:/ 'backendServicesList' smart constructor. +data BackendServicesList = BackendServicesList + { _bslQuotaUser :: !(Maybe Text) + , _bslPrettyPrint :: !Bool + , _bslProject :: !Text + , _bslUserIp :: !(Maybe Text) + , _bslKey :: !(Maybe Text) + , _bslFilter :: !(Maybe Text) + , _bslPageToken :: !(Maybe Text) + , _bslOauthToken :: !(Maybe Text) + , _bslMaxResults :: !Word32 + , _bslFields :: !(Maybe Text) + , _bslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bslQuotaUser' +-- +-- * 'bslPrettyPrint' +-- +-- * 'bslProject' +-- +-- * 'bslUserIp' +-- +-- * 'bslKey' +-- +-- * 'bslFilter' +-- +-- * 'bslPageToken' +-- +-- * 'bslOauthToken' +-- +-- * 'bslMaxResults' +-- +-- * 'bslFields' +-- +-- * 'bslAlt' +backendServicesList + :: Text -- ^ 'project' + -> BackendServicesList +backendServicesList pBslProject_ = + BackendServicesList + { _bslQuotaUser = Nothing + , _bslPrettyPrint = True + , _bslProject = pBslProject_ + , _bslUserIp = Nothing + , _bslKey = Nothing + , _bslFilter = Nothing + , _bslPageToken = Nothing + , _bslOauthToken = Nothing + , _bslMaxResults = 500 + , _bslFields = Nothing + , _bslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bslQuotaUser :: Lens' BackendServicesList' (Maybe Text) +bslQuotaUser + = lens _bslQuotaUser (\ s a -> s{_bslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bslPrettyPrint :: Lens' BackendServicesList' Bool +bslPrettyPrint + = lens _bslPrettyPrint + (\ s a -> s{_bslPrettyPrint = a}) + +-- | Name of the project scoping this request. +bslProject :: Lens' BackendServicesList' Text +bslProject + = lens _bslProject (\ s a -> s{_bslProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bslUserIp :: Lens' BackendServicesList' (Maybe Text) +bslUserIp + = lens _bslUserIp (\ s a -> s{_bslUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bslKey :: Lens' BackendServicesList' (Maybe Text) +bslKey = lens _bslKey (\ s a -> s{_bslKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +bslFilter :: Lens' BackendServicesList' (Maybe Text) +bslFilter + = lens _bslFilter (\ s a -> s{_bslFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +bslPageToken :: Lens' BackendServicesList' (Maybe Text) +bslPageToken + = lens _bslPageToken (\ s a -> s{_bslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +bslOauthToken :: Lens' BackendServicesList' (Maybe Text) +bslOauthToken + = lens _bslOauthToken + (\ s a -> s{_bslOauthToken = a}) + +-- | Maximum count of results to be returned. +bslMaxResults :: Lens' BackendServicesList' Word32 +bslMaxResults + = lens _bslMaxResults + (\ s a -> s{_bslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +bslFields :: Lens' BackendServicesList' (Maybe Text) +bslFields + = lens _bslFields (\ s a -> s{_bslFields = a}) + +-- | Data format for the response. +bslAlt :: Lens' BackendServicesList' Text +bslAlt = lens _bslAlt (\ s a -> s{_bslAlt = a}) + +instance GoogleRequest BackendServicesList' where + type Rs BackendServicesList' = BackendServiceList + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesList{..} + = go _bslQuotaUser _bslPrettyPrint _bslProject + _bslUserIp + _bslKey + _bslFilter + _bslPageToken + _bslOauthToken + (Just _bslMaxResults) + _bslFields + _bslAlt + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Patch.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Patch.hs new file mode 100644 index 000000000..f4c3dd376 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Patch.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the BackendService resource. This method +-- supports patch semantics. +-- +-- /See:/ for @ComputeBackendServicesPatch@. +module Compute.BackendServices.Patch + ( + -- * REST Resource + BackendServicesPatchAPI + + -- * Creating a Request + , backendServicesPatch + , BackendServicesPatch + + -- * Request Lenses + , bspQuotaUser + , bspPrettyPrint + , bspProject + , bspUserIp + , bspKey + , bspOauthToken + , bspFields + , bspAlt + , bspBackendService + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesPatch@ which the +-- 'BackendServicesPatch' request conforms to. +type BackendServicesPatchAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + Capture "backendService" Text :> + Patch '[JSON] Operation + +-- | Update the entire content of the BackendService resource. This method +-- supports patch semantics. +-- +-- /See:/ 'backendServicesPatch' smart constructor. +data BackendServicesPatch = BackendServicesPatch + { _bspQuotaUser :: !(Maybe Text) + , _bspPrettyPrint :: !Bool + , _bspProject :: !Text + , _bspUserIp :: !(Maybe Text) + , _bspKey :: !(Maybe Text) + , _bspOauthToken :: !(Maybe Text) + , _bspFields :: !(Maybe Text) + , _bspAlt :: !Text + , _bspBackendService :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bspQuotaUser' +-- +-- * 'bspPrettyPrint' +-- +-- * 'bspProject' +-- +-- * 'bspUserIp' +-- +-- * 'bspKey' +-- +-- * 'bspOauthToken' +-- +-- * 'bspFields' +-- +-- * 'bspAlt' +-- +-- * 'bspBackendService' +backendServicesPatch + :: Text -- ^ 'project' + -> Text -- ^ 'backendService' + -> BackendServicesPatch +backendServicesPatch pBspProject_ pBspBackendService_ = + BackendServicesPatch + { _bspQuotaUser = Nothing + , _bspPrettyPrint = True + , _bspProject = pBspProject_ + , _bspUserIp = Nothing + , _bspKey = Nothing + , _bspOauthToken = Nothing + , _bspFields = Nothing + , _bspAlt = "json" + , _bspBackendService = pBspBackendService_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bspQuotaUser :: Lens' BackendServicesPatch' (Maybe Text) +bspQuotaUser + = lens _bspQuotaUser (\ s a -> s{_bspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bspPrettyPrint :: Lens' BackendServicesPatch' Bool +bspPrettyPrint + = lens _bspPrettyPrint + (\ s a -> s{_bspPrettyPrint = a}) + +-- | Name of the project scoping this request. +bspProject :: Lens' BackendServicesPatch' Text +bspProject + = lens _bspProject (\ s a -> s{_bspProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bspUserIp :: Lens' BackendServicesPatch' (Maybe Text) +bspUserIp + = lens _bspUserIp (\ s a -> s{_bspUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bspKey :: Lens' BackendServicesPatch' (Maybe Text) +bspKey = lens _bspKey (\ s a -> s{_bspKey = a}) + +-- | OAuth 2.0 token for the current user. +bspOauthToken :: Lens' BackendServicesPatch' (Maybe Text) +bspOauthToken + = lens _bspOauthToken + (\ s a -> s{_bspOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bspFields :: Lens' BackendServicesPatch' (Maybe Text) +bspFields + = lens _bspFields (\ s a -> s{_bspFields = a}) + +-- | Data format for the response. +bspAlt :: Lens' BackendServicesPatch' Text +bspAlt = lens _bspAlt (\ s a -> s{_bspAlt = a}) + +-- | Name of the BackendService resource to update. +bspBackendService :: Lens' BackendServicesPatch' Text +bspBackendService + = lens _bspBackendService + (\ s a -> s{_bspBackendService = a}) + +instance GoogleRequest BackendServicesPatch' where + type Rs BackendServicesPatch' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesPatch{..} + = go _bspQuotaUser _bspPrettyPrint _bspProject + _bspUserIp + _bspKey + _bspOauthToken + _bspFields + _bspAlt + _bspBackendService + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesPatchAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Update.hs b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Update.hs new file mode 100644 index 000000000..83be7899e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.BackendServices.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the BackendService resource. +-- +-- /See:/ for @ComputeBackendServicesUpdate@. +module Compute.BackendServices.Update + ( + -- * REST Resource + BackendServicesUpdateAPI + + -- * Creating a Request + , backendServicesUpdate + , BackendServicesUpdate + + -- * Request Lenses + , bsuQuotaUser + , bsuPrettyPrint + , bsuProject + , bsuUserIp + , bsuKey + , bsuOauthToken + , bsuFields + , bsuAlt + , bsuBackendService + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeBackendServicesUpdate@ which the +-- 'BackendServicesUpdate' request conforms to. +type BackendServicesUpdateAPI = + Capture "project" Text :> + "global" :> + "backendServices" :> + Capture "backendService" Text :> + Put '[JSON] Operation + +-- | Update the entire content of the BackendService resource. +-- +-- /See:/ 'backendServicesUpdate' smart constructor. +data BackendServicesUpdate = BackendServicesUpdate + { _bsuQuotaUser :: !(Maybe Text) + , _bsuPrettyPrint :: !Bool + , _bsuProject :: !Text + , _bsuUserIp :: !(Maybe Text) + , _bsuKey :: !(Maybe Text) + , _bsuOauthToken :: !(Maybe Text) + , _bsuFields :: !(Maybe Text) + , _bsuAlt :: !Text + , _bsuBackendService :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackendServicesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bsuQuotaUser' +-- +-- * 'bsuPrettyPrint' +-- +-- * 'bsuProject' +-- +-- * 'bsuUserIp' +-- +-- * 'bsuKey' +-- +-- * 'bsuOauthToken' +-- +-- * 'bsuFields' +-- +-- * 'bsuAlt' +-- +-- * 'bsuBackendService' +backendServicesUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'backendService' + -> BackendServicesUpdate +backendServicesUpdate pBsuProject_ pBsuBackendService_ = + BackendServicesUpdate + { _bsuQuotaUser = Nothing + , _bsuPrettyPrint = True + , _bsuProject = pBsuProject_ + , _bsuUserIp = Nothing + , _bsuKey = Nothing + , _bsuOauthToken = Nothing + , _bsuFields = Nothing + , _bsuAlt = "json" + , _bsuBackendService = pBsuBackendService_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bsuQuotaUser :: Lens' BackendServicesUpdate' (Maybe Text) +bsuQuotaUser + = lens _bsuQuotaUser (\ s a -> s{_bsuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bsuPrettyPrint :: Lens' BackendServicesUpdate' Bool +bsuPrettyPrint + = lens _bsuPrettyPrint + (\ s a -> s{_bsuPrettyPrint = a}) + +-- | Name of the project scoping this request. +bsuProject :: Lens' BackendServicesUpdate' Text +bsuProject + = lens _bsuProject (\ s a -> s{_bsuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bsuUserIp :: Lens' BackendServicesUpdate' (Maybe Text) +bsuUserIp + = lens _bsuUserIp (\ s a -> s{_bsuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bsuKey :: Lens' BackendServicesUpdate' (Maybe Text) +bsuKey = lens _bsuKey (\ s a -> s{_bsuKey = a}) + +-- | OAuth 2.0 token for the current user. +bsuOauthToken :: Lens' BackendServicesUpdate' (Maybe Text) +bsuOauthToken + = lens _bsuOauthToken + (\ s a -> s{_bsuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bsuFields :: Lens' BackendServicesUpdate' (Maybe Text) +bsuFields + = lens _bsuFields (\ s a -> s{_bsuFields = a}) + +-- | Data format for the response. +bsuAlt :: Lens' BackendServicesUpdate' Text +bsuAlt = lens _bsuAlt (\ s a -> s{_bsuAlt = a}) + +-- | Name of the BackendService resource to update. +bsuBackendService :: Lens' BackendServicesUpdate' Text +bsuBackendService + = lens _bsuBackendService + (\ s a -> s{_bsuBackendService = a}) + +instance GoogleRequest BackendServicesUpdate' where + type Rs BackendServicesUpdate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u BackendServicesUpdate{..} + = go _bsuQuotaUser _bsuPrettyPrint _bsuProject + _bsuUserIp + _bsuKey + _bsuOauthToken + _bsuFields + _bsuAlt + _bsuBackendService + where go + = clientWithRoute + (Proxy :: Proxy BackendServicesUpdateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs new file mode 100644 index 000000000..8a859e259 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.DiskTypes.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of disk type resources grouped by scope. +-- +-- /See:/ for @ComputeDiskTypesAggregatedList@. +module Compute.DiskTypes.AggregatedList + ( + -- * REST Resource + DiskTypesAggregatedListAPI + + -- * Creating a Request + , diskTypesAggregatedList + , DiskTypesAggregatedList + + -- * Request Lenses + , dtalQuotaUser + , dtalPrettyPrint + , dtalProject + , dtalUserIp + , dtalKey + , dtalFilter + , dtalPageToken + , dtalOauthToken + , dtalMaxResults + , dtalFields + , dtalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDiskTypesAggregatedList@ which the +-- 'DiskTypesAggregatedList' request conforms to. +type DiskTypesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "diskTypes" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DiskTypeAggregatedList + +-- | Retrieves the list of disk type resources grouped by scope. +-- +-- /See:/ 'diskTypesAggregatedList' smart constructor. +data DiskTypesAggregatedList = DiskTypesAggregatedList + { _dtalQuotaUser :: !(Maybe Text) + , _dtalPrettyPrint :: !Bool + , _dtalProject :: !Text + , _dtalUserIp :: !(Maybe Text) + , _dtalKey :: !(Maybe Text) + , _dtalFilter :: !(Maybe Text) + , _dtalPageToken :: !(Maybe Text) + , _dtalOauthToken :: !(Maybe Text) + , _dtalMaxResults :: !Word32 + , _dtalFields :: !(Maybe Text) + , _dtalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtalQuotaUser' +-- +-- * 'dtalPrettyPrint' +-- +-- * 'dtalProject' +-- +-- * 'dtalUserIp' +-- +-- * 'dtalKey' +-- +-- * 'dtalFilter' +-- +-- * 'dtalPageToken' +-- +-- * 'dtalOauthToken' +-- +-- * 'dtalMaxResults' +-- +-- * 'dtalFields' +-- +-- * 'dtalAlt' +diskTypesAggregatedList + :: Text -- ^ 'project' + -> DiskTypesAggregatedList +diskTypesAggregatedList pDtalProject_ = + DiskTypesAggregatedList + { _dtalQuotaUser = Nothing + , _dtalPrettyPrint = True + , _dtalProject = pDtalProject_ + , _dtalUserIp = Nothing + , _dtalKey = Nothing + , _dtalFilter = Nothing + , _dtalPageToken = Nothing + , _dtalOauthToken = Nothing + , _dtalMaxResults = 500 + , _dtalFields = Nothing + , _dtalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dtalQuotaUser :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalQuotaUser + = lens _dtalQuotaUser + (\ s a -> s{_dtalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dtalPrettyPrint :: Lens' DiskTypesAggregatedList' Bool +dtalPrettyPrint + = lens _dtalPrettyPrint + (\ s a -> s{_dtalPrettyPrint = a}) + +-- | Project ID for this request. +dtalProject :: Lens' DiskTypesAggregatedList' Text +dtalProject + = lens _dtalProject (\ s a -> s{_dtalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dtalUserIp :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalUserIp + = lens _dtalUserIp (\ s a -> s{_dtalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dtalKey :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalKey = lens _dtalKey (\ s a -> s{_dtalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +dtalFilter :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalFilter + = lens _dtalFilter (\ s a -> s{_dtalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +dtalPageToken :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalPageToken + = lens _dtalPageToken + (\ s a -> s{_dtalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dtalOauthToken :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalOauthToken + = lens _dtalOauthToken + (\ s a -> s{_dtalOauthToken = a}) + +-- | Maximum count of results to be returned. +dtalMaxResults :: Lens' DiskTypesAggregatedList' Word32 +dtalMaxResults + = lens _dtalMaxResults + (\ s a -> s{_dtalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dtalFields :: Lens' DiskTypesAggregatedList' (Maybe Text) +dtalFields + = lens _dtalFields (\ s a -> s{_dtalFields = a}) + +-- | Data format for the response. +dtalAlt :: Lens' DiskTypesAggregatedList' Text +dtalAlt = lens _dtalAlt (\ s a -> s{_dtalAlt = a}) + +instance GoogleRequest DiskTypesAggregatedList' where + type Rs DiskTypesAggregatedList' = + DiskTypeAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u DiskTypesAggregatedList{..} + = go _dtalQuotaUser _dtalPrettyPrint _dtalProject + _dtalUserIp + _dtalKey + _dtalFilter + _dtalPageToken + _dtalOauthToken + (Just _dtalMaxResults) + _dtalFields + _dtalAlt + where go + = clientWithRoute + (Proxy :: Proxy DiskTypesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/Get.hs new file mode 100644 index 000000000..ffdb27d95 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/Get.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.DiskTypes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified disk type resource. +-- +-- /See:/ for @ComputeDiskTypesGet@. +module Compute.DiskTypes.Get + ( + -- * REST Resource + DiskTypesGetAPI + + -- * Creating a Request + , diskTypesGet + , DiskTypesGet + + -- * Request Lenses + , dtgQuotaUser + , dtgPrettyPrint + , dtgProject + , dtgUserIp + , dtgZone + , dtgKey + , dtgDiskType + , dtgOauthToken + , dtgFields + , dtgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDiskTypesGet@ which the +-- 'DiskTypesGet' request conforms to. +type DiskTypesGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "diskTypes" :> + Capture "diskType" Text :> Get '[JSON] DiskType + +-- | Returns the specified disk type resource. +-- +-- /See:/ 'diskTypesGet' smart constructor. +data DiskTypesGet = DiskTypesGet + { _dtgQuotaUser :: !(Maybe Text) + , _dtgPrettyPrint :: !Bool + , _dtgProject :: !Text + , _dtgUserIp :: !(Maybe Text) + , _dtgZone :: !Text + , _dtgKey :: !(Maybe Text) + , _dtgDiskType :: !Text + , _dtgOauthToken :: !(Maybe Text) + , _dtgFields :: !(Maybe Text) + , _dtgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtgQuotaUser' +-- +-- * 'dtgPrettyPrint' +-- +-- * 'dtgProject' +-- +-- * 'dtgUserIp' +-- +-- * 'dtgZone' +-- +-- * 'dtgKey' +-- +-- * 'dtgDiskType' +-- +-- * 'dtgOauthToken' +-- +-- * 'dtgFields' +-- +-- * 'dtgAlt' +diskTypesGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'diskType' + -> DiskTypesGet +diskTypesGet pDtgProject_ pDtgZone_ pDtgDiskType_ = + DiskTypesGet + { _dtgQuotaUser = Nothing + , _dtgPrettyPrint = True + , _dtgProject = pDtgProject_ + , _dtgUserIp = Nothing + , _dtgZone = pDtgZone_ + , _dtgKey = Nothing + , _dtgDiskType = pDtgDiskType_ + , _dtgOauthToken = Nothing + , _dtgFields = Nothing + , _dtgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dtgQuotaUser :: Lens' DiskTypesGet' (Maybe Text) +dtgQuotaUser + = lens _dtgQuotaUser (\ s a -> s{_dtgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dtgPrettyPrint :: Lens' DiskTypesGet' Bool +dtgPrettyPrint + = lens _dtgPrettyPrint + (\ s a -> s{_dtgPrettyPrint = a}) + +-- | Project ID for this request. +dtgProject :: Lens' DiskTypesGet' Text +dtgProject + = lens _dtgProject (\ s a -> s{_dtgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dtgUserIp :: Lens' DiskTypesGet' (Maybe Text) +dtgUserIp + = lens _dtgUserIp (\ s a -> s{_dtgUserIp = a}) + +-- | The name of the zone for this request. +dtgZone :: Lens' DiskTypesGet' Text +dtgZone = lens _dtgZone (\ s a -> s{_dtgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dtgKey :: Lens' DiskTypesGet' (Maybe Text) +dtgKey = lens _dtgKey (\ s a -> s{_dtgKey = a}) + +-- | Name of the disk type resource to return. +dtgDiskType :: Lens' DiskTypesGet' Text +dtgDiskType + = lens _dtgDiskType (\ s a -> s{_dtgDiskType = a}) + +-- | OAuth 2.0 token for the current user. +dtgOauthToken :: Lens' DiskTypesGet' (Maybe Text) +dtgOauthToken + = lens _dtgOauthToken + (\ s a -> s{_dtgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dtgFields :: Lens' DiskTypesGet' (Maybe Text) +dtgFields + = lens _dtgFields (\ s a -> s{_dtgFields = a}) + +-- | Data format for the response. +dtgAlt :: Lens' DiskTypesGet' Text +dtgAlt = lens _dtgAlt (\ s a -> s{_dtgAlt = a}) + +instance GoogleRequest DiskTypesGet' where + type Rs DiskTypesGet' = DiskType + request = requestWithRoute defReq computeURL + requestWithRoute r u DiskTypesGet{..} + = go _dtgQuotaUser _dtgPrettyPrint _dtgProject + _dtgUserIp + _dtgZone + _dtgKey + _dtgDiskType + _dtgOauthToken + _dtgFields + _dtgAlt + where go + = clientWithRoute (Proxy :: Proxy DiskTypesGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/List.hs new file mode 100644 index 000000000..d39e1633d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.DiskTypes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of disk type resources available to the specified +-- project. +-- +-- /See:/ for @ComputeDiskTypesList@. +module Compute.DiskTypes.List + ( + -- * REST Resource + DiskTypesListAPI + + -- * Creating a Request + , diskTypesList + , DiskTypesList + + -- * Request Lenses + , dtlQuotaUser + , dtlPrettyPrint + , dtlProject + , dtlUserIp + , dtlZone + , dtlKey + , dtlFilter + , dtlPageToken + , dtlOauthToken + , dtlMaxResults + , dtlFields + , dtlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDiskTypesList@ which the +-- 'DiskTypesList' request conforms to. +type DiskTypesListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "diskTypes" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DiskTypeList + +-- | Retrieves the list of disk type resources available to the specified +-- project. +-- +-- /See:/ 'diskTypesList' smart constructor. +data DiskTypesList = DiskTypesList + { _dtlQuotaUser :: !(Maybe Text) + , _dtlPrettyPrint :: !Bool + , _dtlProject :: !Text + , _dtlUserIp :: !(Maybe Text) + , _dtlZone :: !Text + , _dtlKey :: !(Maybe Text) + , _dtlFilter :: !(Maybe Text) + , _dtlPageToken :: !(Maybe Text) + , _dtlOauthToken :: !(Maybe Text) + , _dtlMaxResults :: !Word32 + , _dtlFields :: !(Maybe Text) + , _dtlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DiskTypesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtlQuotaUser' +-- +-- * 'dtlPrettyPrint' +-- +-- * 'dtlProject' +-- +-- * 'dtlUserIp' +-- +-- * 'dtlZone' +-- +-- * 'dtlKey' +-- +-- * 'dtlFilter' +-- +-- * 'dtlPageToken' +-- +-- * 'dtlOauthToken' +-- +-- * 'dtlMaxResults' +-- +-- * 'dtlFields' +-- +-- * 'dtlAlt' +diskTypesList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> DiskTypesList +diskTypesList pDtlProject_ pDtlZone_ = + DiskTypesList + { _dtlQuotaUser = Nothing + , _dtlPrettyPrint = True + , _dtlProject = pDtlProject_ + , _dtlUserIp = Nothing + , _dtlZone = pDtlZone_ + , _dtlKey = Nothing + , _dtlFilter = Nothing + , _dtlPageToken = Nothing + , _dtlOauthToken = Nothing + , _dtlMaxResults = 500 + , _dtlFields = Nothing + , _dtlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dtlQuotaUser :: Lens' DiskTypesList' (Maybe Text) +dtlQuotaUser + = lens _dtlQuotaUser (\ s a -> s{_dtlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dtlPrettyPrint :: Lens' DiskTypesList' Bool +dtlPrettyPrint + = lens _dtlPrettyPrint + (\ s a -> s{_dtlPrettyPrint = a}) + +-- | Project ID for this request. +dtlProject :: Lens' DiskTypesList' Text +dtlProject + = lens _dtlProject (\ s a -> s{_dtlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dtlUserIp :: Lens' DiskTypesList' (Maybe Text) +dtlUserIp + = lens _dtlUserIp (\ s a -> s{_dtlUserIp = a}) + +-- | The name of the zone for this request. +dtlZone :: Lens' DiskTypesList' Text +dtlZone = lens _dtlZone (\ s a -> s{_dtlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dtlKey :: Lens' DiskTypesList' (Maybe Text) +dtlKey = lens _dtlKey (\ s a -> s{_dtlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +dtlFilter :: Lens' DiskTypesList' (Maybe Text) +dtlFilter + = lens _dtlFilter (\ s a -> s{_dtlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +dtlPageToken :: Lens' DiskTypesList' (Maybe Text) +dtlPageToken + = lens _dtlPageToken (\ s a -> s{_dtlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dtlOauthToken :: Lens' DiskTypesList' (Maybe Text) +dtlOauthToken + = lens _dtlOauthToken + (\ s a -> s{_dtlOauthToken = a}) + +-- | Maximum count of results to be returned. +dtlMaxResults :: Lens' DiskTypesList' Word32 +dtlMaxResults + = lens _dtlMaxResults + (\ s a -> s{_dtlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dtlFields :: Lens' DiskTypesList' (Maybe Text) +dtlFields + = lens _dtlFields (\ s a -> s{_dtlFields = a}) + +-- | Data format for the response. +dtlAlt :: Lens' DiskTypesList' Text +dtlAlt = lens _dtlAlt (\ s a -> s{_dtlAlt = a}) + +instance GoogleRequest DiskTypesList' where + type Rs DiskTypesList' = DiskTypeList + request = requestWithRoute defReq computeURL + requestWithRoute r u DiskTypesList{..} + = go _dtlQuotaUser _dtlPrettyPrint _dtlProject + _dtlUserIp + _dtlZone + _dtlKey + _dtlFilter + _dtlPageToken + _dtlOauthToken + (Just _dtlMaxResults) + _dtlFields + _dtlAlt + where go + = clientWithRoute (Proxy :: Proxy DiskTypesListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/AggregatedList.hs new file mode 100644 index 000000000..a09a45075 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/AggregatedList.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of disks grouped by scope. +-- +-- /See:/ for @ComputeDisksAggregatedList@. +module Compute.Disks.AggregatedList + ( + -- * REST Resource + DisksAggregatedListAPI + + -- * Creating a Request + , disksAggregatedList + , DisksAggregatedList + + -- * Request Lenses + , dalQuotaUser + , dalPrettyPrint + , dalProject + , dalUserIp + , dalKey + , dalFilter + , dalPageToken + , dalOauthToken + , dalMaxResults + , dalFields + , dalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksAggregatedList@ which the +-- 'DisksAggregatedList' request conforms to. +type DisksAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "disks" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DiskAggregatedList + +-- | Retrieves the list of disks grouped by scope. +-- +-- /See:/ 'disksAggregatedList' smart constructor. +data DisksAggregatedList = DisksAggregatedList + { _dalQuotaUser :: !(Maybe Text) + , _dalPrettyPrint :: !Bool + , _dalProject :: !Text + , _dalUserIp :: !(Maybe Text) + , _dalKey :: !(Maybe Text) + , _dalFilter :: !(Maybe Text) + , _dalPageToken :: !(Maybe Text) + , _dalOauthToken :: !(Maybe Text) + , _dalMaxResults :: !Word32 + , _dalFields :: !(Maybe Text) + , _dalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dalQuotaUser' +-- +-- * 'dalPrettyPrint' +-- +-- * 'dalProject' +-- +-- * 'dalUserIp' +-- +-- * 'dalKey' +-- +-- * 'dalFilter' +-- +-- * 'dalPageToken' +-- +-- * 'dalOauthToken' +-- +-- * 'dalMaxResults' +-- +-- * 'dalFields' +-- +-- * 'dalAlt' +disksAggregatedList + :: Text -- ^ 'project' + -> DisksAggregatedList +disksAggregatedList pDalProject_ = + DisksAggregatedList + { _dalQuotaUser = Nothing + , _dalPrettyPrint = True + , _dalProject = pDalProject_ + , _dalUserIp = Nothing + , _dalKey = Nothing + , _dalFilter = Nothing + , _dalPageToken = Nothing + , _dalOauthToken = Nothing + , _dalMaxResults = 500 + , _dalFields = Nothing + , _dalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dalQuotaUser :: Lens' DisksAggregatedList' (Maybe Text) +dalQuotaUser + = lens _dalQuotaUser (\ s a -> s{_dalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dalPrettyPrint :: Lens' DisksAggregatedList' Bool +dalPrettyPrint + = lens _dalPrettyPrint + (\ s a -> s{_dalPrettyPrint = a}) + +-- | Project ID for this request. +dalProject :: Lens' DisksAggregatedList' Text +dalProject + = lens _dalProject (\ s a -> s{_dalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dalUserIp :: Lens' DisksAggregatedList' (Maybe Text) +dalUserIp + = lens _dalUserIp (\ s a -> s{_dalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dalKey :: Lens' DisksAggregatedList' (Maybe Text) +dalKey = lens _dalKey (\ s a -> s{_dalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +dalFilter :: Lens' DisksAggregatedList' (Maybe Text) +dalFilter + = lens _dalFilter (\ s a -> s{_dalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +dalPageToken :: Lens' DisksAggregatedList' (Maybe Text) +dalPageToken + = lens _dalPageToken (\ s a -> s{_dalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dalOauthToken :: Lens' DisksAggregatedList' (Maybe Text) +dalOauthToken + = lens _dalOauthToken + (\ s a -> s{_dalOauthToken = a}) + +-- | Maximum count of results to be returned. +dalMaxResults :: Lens' DisksAggregatedList' Word32 +dalMaxResults + = lens _dalMaxResults + (\ s a -> s{_dalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dalFields :: Lens' DisksAggregatedList' (Maybe Text) +dalFields + = lens _dalFields (\ s a -> s{_dalFields = a}) + +-- | Data format for the response. +dalAlt :: Lens' DisksAggregatedList' Text +dalAlt = lens _dalAlt (\ s a -> s{_dalAlt = a}) + +instance GoogleRequest DisksAggregatedList' where + type Rs DisksAggregatedList' = DiskAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksAggregatedList{..} + = go _dalQuotaUser _dalPrettyPrint _dalProject + _dalUserIp + _dalKey + _dalFilter + _dalPageToken + _dalOauthToken + (Just _dalMaxResults) + _dalFields + _dalAlt + where go + = clientWithRoute + (Proxy :: Proxy DisksAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/CreateSnapshot.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/CreateSnapshot.hs new file mode 100644 index 000000000..a5260f50a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/CreateSnapshot.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.CreateSnapshot +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a snapshot of this disk. +-- +-- /See:/ for @ComputeDisksCreateSnapshot@. +module Compute.Disks.CreateSnapshot + ( + -- * REST Resource + DisksCreateSnapshotAPI + + -- * Creating a Request + , disksCreateSnapshot + , DisksCreateSnapshot + + -- * Request Lenses + , dcsQuotaUser + , dcsPrettyPrint + , dcsProject + , dcsDisk + , dcsUserIp + , dcsZone + , dcsKey + , dcsOauthToken + , dcsFields + , dcsAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksCreateSnapshot@ which the +-- 'DisksCreateSnapshot' request conforms to. +type DisksCreateSnapshotAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "disks" :> + Capture "disk" Text :> + "createSnapshot" :> Post '[JSON] Operation + +-- | Creates a snapshot of this disk. +-- +-- /See:/ 'disksCreateSnapshot' smart constructor. +data DisksCreateSnapshot = DisksCreateSnapshot + { _dcsQuotaUser :: !(Maybe Text) + , _dcsPrettyPrint :: !Bool + , _dcsProject :: !Text + , _dcsDisk :: !Text + , _dcsUserIp :: !(Maybe Text) + , _dcsZone :: !Text + , _dcsKey :: !(Maybe Text) + , _dcsOauthToken :: !(Maybe Text) + , _dcsFields :: !(Maybe Text) + , _dcsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksCreateSnapshot'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcsQuotaUser' +-- +-- * 'dcsPrettyPrint' +-- +-- * 'dcsProject' +-- +-- * 'dcsDisk' +-- +-- * 'dcsUserIp' +-- +-- * 'dcsZone' +-- +-- * 'dcsKey' +-- +-- * 'dcsOauthToken' +-- +-- * 'dcsFields' +-- +-- * 'dcsAlt' +disksCreateSnapshot + :: Text -- ^ 'project' + -> Text -- ^ 'disk' + -> Text -- ^ 'zone' + -> DisksCreateSnapshot +disksCreateSnapshot pDcsProject_ pDcsDisk_ pDcsZone_ = + DisksCreateSnapshot + { _dcsQuotaUser = Nothing + , _dcsPrettyPrint = True + , _dcsProject = pDcsProject_ + , _dcsDisk = pDcsDisk_ + , _dcsUserIp = Nothing + , _dcsZone = pDcsZone_ + , _dcsKey = Nothing + , _dcsOauthToken = Nothing + , _dcsFields = Nothing + , _dcsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dcsQuotaUser :: Lens' DisksCreateSnapshot' (Maybe Text) +dcsQuotaUser + = lens _dcsQuotaUser (\ s a -> s{_dcsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dcsPrettyPrint :: Lens' DisksCreateSnapshot' Bool +dcsPrettyPrint + = lens _dcsPrettyPrint + (\ s a -> s{_dcsPrettyPrint = a}) + +-- | Project ID for this request. +dcsProject :: Lens' DisksCreateSnapshot' Text +dcsProject + = lens _dcsProject (\ s a -> s{_dcsProject = a}) + +-- | Name of the persistent disk to snapshot. +dcsDisk :: Lens' DisksCreateSnapshot' Text +dcsDisk = lens _dcsDisk (\ s a -> s{_dcsDisk = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dcsUserIp :: Lens' DisksCreateSnapshot' (Maybe Text) +dcsUserIp + = lens _dcsUserIp (\ s a -> s{_dcsUserIp = a}) + +-- | The name of the zone for this request. +dcsZone :: Lens' DisksCreateSnapshot' Text +dcsZone = lens _dcsZone (\ s a -> s{_dcsZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dcsKey :: Lens' DisksCreateSnapshot' (Maybe Text) +dcsKey = lens _dcsKey (\ s a -> s{_dcsKey = a}) + +-- | OAuth 2.0 token for the current user. +dcsOauthToken :: Lens' DisksCreateSnapshot' (Maybe Text) +dcsOauthToken + = lens _dcsOauthToken + (\ s a -> s{_dcsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dcsFields :: Lens' DisksCreateSnapshot' (Maybe Text) +dcsFields + = lens _dcsFields (\ s a -> s{_dcsFields = a}) + +-- | Data format for the response. +dcsAlt :: Lens' DisksCreateSnapshot' Text +dcsAlt = lens _dcsAlt (\ s a -> s{_dcsAlt = a}) + +instance GoogleRequest DisksCreateSnapshot' where + type Rs DisksCreateSnapshot' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksCreateSnapshot{..} + = go _dcsQuotaUser _dcsPrettyPrint _dcsProject + _dcsDisk + _dcsUserIp + _dcsZone + _dcsKey + _dcsOauthToken + _dcsFields + _dcsAlt + where go + = clientWithRoute + (Proxy :: Proxy DisksCreateSnapshotAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs new file mode 100644 index 000000000..60adf766e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified persistent disk. Deleting a disk removes its data +-- permanently and is irreversible. However, deleting a disk does not +-- delete any snapshots previously made from the disk. You must separately +-- delete snapshots. +-- +-- /See:/ for @ComputeDisksDelete@. +module Compute.Disks.Delete + ( + -- * REST Resource + DisksDeleteAPI + + -- * Creating a Request + , disksDelete + , DisksDelete + + -- * Request Lenses + , ddQuotaUser + , ddPrettyPrint + , ddProject + , ddDisk + , ddUserIp + , ddZone + , ddKey + , ddOauthToken + , ddFields + , ddAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksDelete@ which the +-- 'DisksDelete' request conforms to. +type DisksDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "disks" :> + Capture "disk" Text :> Delete '[JSON] Operation + +-- | Deletes the specified persistent disk. Deleting a disk removes its data +-- permanently and is irreversible. However, deleting a disk does not +-- delete any snapshots previously made from the disk. You must separately +-- delete snapshots. +-- +-- /See:/ 'disksDelete' smart constructor. +data DisksDelete = DisksDelete + { _ddQuotaUser :: !(Maybe Text) + , _ddPrettyPrint :: !Bool + , _ddProject :: !Text + , _ddDisk :: !Text + , _ddUserIp :: !(Maybe Text) + , _ddZone :: !Text + , _ddKey :: !(Maybe Text) + , _ddOauthToken :: !(Maybe Text) + , _ddFields :: !(Maybe Text) + , _ddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddQuotaUser' +-- +-- * 'ddPrettyPrint' +-- +-- * 'ddProject' +-- +-- * 'ddDisk' +-- +-- * 'ddUserIp' +-- +-- * 'ddZone' +-- +-- * 'ddKey' +-- +-- * 'ddOauthToken' +-- +-- * 'ddFields' +-- +-- * 'ddAlt' +disksDelete + :: Text -- ^ 'project' + -> Text -- ^ 'disk' + -> Text -- ^ 'zone' + -> DisksDelete +disksDelete pDdProject_ pDdDisk_ pDdZone_ = + DisksDelete + { _ddQuotaUser = Nothing + , _ddPrettyPrint = True + , _ddProject = pDdProject_ + , _ddDisk = pDdDisk_ + , _ddUserIp = Nothing + , _ddZone = pDdZone_ + , _ddKey = Nothing + , _ddOauthToken = Nothing + , _ddFields = Nothing + , _ddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ddQuotaUser :: Lens' DisksDelete' (Maybe Text) +ddQuotaUser + = lens _ddQuotaUser (\ s a -> s{_ddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddPrettyPrint :: Lens' DisksDelete' Bool +ddPrettyPrint + = lens _ddPrettyPrint + (\ s a -> s{_ddPrettyPrint = a}) + +-- | Project ID for this request. +ddProject :: Lens' DisksDelete' Text +ddProject + = lens _ddProject (\ s a -> s{_ddProject = a}) + +-- | Name of the persistent disk to delete. +ddDisk :: Lens' DisksDelete' Text +ddDisk = lens _ddDisk (\ s a -> s{_ddDisk = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ddUserIp :: Lens' DisksDelete' (Maybe Text) +ddUserIp = lens _ddUserIp (\ s a -> s{_ddUserIp = a}) + +-- | The name of the zone for this request. +ddZone :: Lens' DisksDelete' Text +ddZone = lens _ddZone (\ s a -> s{_ddZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddKey :: Lens' DisksDelete' (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | OAuth 2.0 token for the current user. +ddOauthToken :: Lens' DisksDelete' (Maybe Text) +ddOauthToken + = lens _ddOauthToken (\ s a -> s{_ddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddFields :: Lens' DisksDelete' (Maybe Text) +ddFields = lens _ddFields (\ s a -> s{_ddFields = a}) + +-- | Data format for the response. +ddAlt :: Lens' DisksDelete' Text +ddAlt = lens _ddAlt (\ s a -> s{_ddAlt = a}) + +instance GoogleRequest DisksDelete' where + type Rs DisksDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksDelete{..} + = go _ddQuotaUser _ddPrettyPrint _ddProject _ddDisk + _ddUserIp + _ddZone + _ddKey + _ddOauthToken + _ddFields + _ddAlt + where go + = clientWithRoute (Proxy :: Proxy DisksDeleteAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Get.hs new file mode 100644 index 000000000..44e0f95ee --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Get.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a specified persistent disk. +-- +-- /See:/ for @ComputeDisksGet@. +module Compute.Disks.Get + ( + -- * REST Resource + DisksGetAPI + + -- * Creating a Request + , disksGet + , DisksGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgProject + , dgDisk + , dgUserIp + , dgZone + , dgKey + , dgOauthToken + , dgFields + , dgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksGet@ which the +-- 'DisksGet' request conforms to. +type DisksGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "disks" :> Capture "disk" Text :> Get '[JSON] Disk + +-- | Returns a specified persistent disk. +-- +-- /See:/ 'disksGet' smart constructor. +data DisksGet = DisksGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgProject :: !Text + , _dgDisk :: !Text + , _dgUserIp :: !(Maybe Text) + , _dgZone :: !Text + , _dgKey :: !(Maybe Text) + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgProject' +-- +-- * 'dgDisk' +-- +-- * 'dgUserIp' +-- +-- * 'dgZone' +-- +-- * 'dgKey' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +disksGet + :: Text -- ^ 'project' + -> Text -- ^ 'disk' + -> Text -- ^ 'zone' + -> DisksGet +disksGet pDgProject_ pDgDisk_ pDgZone_ = + DisksGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgProject = pDgProject_ + , _dgDisk = pDgDisk_ + , _dgUserIp = Nothing + , _dgZone = pDgZone_ + , _dgKey = Nothing + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DisksGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DisksGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | Project ID for this request. +dgProject :: Lens' DisksGet' Text +dgProject + = lens _dgProject (\ s a -> s{_dgProject = a}) + +-- | Name of the persistent disk to return. +dgDisk :: Lens' DisksGet' Text +dgDisk = lens _dgDisk (\ s a -> s{_dgDisk = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DisksGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | The name of the zone for this request. +dgZone :: Lens' DisksGet' Text +dgZone = lens _dgZone (\ s a -> s{_dgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DisksGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DisksGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DisksGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DisksGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +instance GoogleRequest DisksGet' where + type Rs DisksGet' = Disk + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgProject _dgDisk + _dgUserIp + _dgZone + _dgKey + _dgOauthToken + _dgFields + _dgAlt + where go + = clientWithRoute (Proxy :: Proxy DisksGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Insert.hs new file mode 100644 index 000000000..5a4105a2a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/Insert.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a persistent disk in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeDisksInsert@. +module Compute.Disks.Insert + ( + -- * REST Resource + DisksInsertAPI + + -- * Creating a Request + , disksInsert + , DisksInsert + + -- * Request Lenses + , diQuotaUser + , diPrettyPrint + , diSourceImage + , diProject + , diUserIp + , diZone + , diKey + , diOauthToken + , diFields + , diAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksInsert@ which the +-- 'DisksInsert' request conforms to. +type DisksInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "disks" :> + QueryParam "sourceImage" Text :> + Post '[JSON] Operation + +-- | Creates a persistent disk in the specified project using the data +-- included in the request. +-- +-- /See:/ 'disksInsert' smart constructor. +data DisksInsert = DisksInsert + { _diQuotaUser :: !(Maybe Text) + , _diPrettyPrint :: !Bool + , _diSourceImage :: !(Maybe Text) + , _diProject :: !Text + , _diUserIp :: !(Maybe Text) + , _diZone :: !Text + , _diKey :: !(Maybe Text) + , _diOauthToken :: !(Maybe Text) + , _diFields :: !(Maybe Text) + , _diAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diQuotaUser' +-- +-- * 'diPrettyPrint' +-- +-- * 'diSourceImage' +-- +-- * 'diProject' +-- +-- * 'diUserIp' +-- +-- * 'diZone' +-- +-- * 'diKey' +-- +-- * 'diOauthToken' +-- +-- * 'diFields' +-- +-- * 'diAlt' +disksInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> DisksInsert +disksInsert pDiProject_ pDiZone_ = + DisksInsert + { _diQuotaUser = Nothing + , _diPrettyPrint = True + , _diSourceImage = Nothing + , _diProject = pDiProject_ + , _diUserIp = Nothing + , _diZone = pDiZone_ + , _diKey = Nothing + , _diOauthToken = Nothing + , _diFields = Nothing + , _diAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +diQuotaUser :: Lens' DisksInsert' (Maybe Text) +diQuotaUser + = lens _diQuotaUser (\ s a -> s{_diQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +diPrettyPrint :: Lens' DisksInsert' Bool +diPrettyPrint + = lens _diPrettyPrint + (\ s a -> s{_diPrettyPrint = a}) + +-- | Optional. Source image to restore onto a disk. +diSourceImage :: Lens' DisksInsert' (Maybe Text) +diSourceImage + = lens _diSourceImage + (\ s a -> s{_diSourceImage = a}) + +-- | Project ID for this request. +diProject :: Lens' DisksInsert' Text +diProject + = lens _diProject (\ s a -> s{_diProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +diUserIp :: Lens' DisksInsert' (Maybe Text) +diUserIp = lens _diUserIp (\ s a -> s{_diUserIp = a}) + +-- | The name of the zone for this request. +diZone :: Lens' DisksInsert' Text +diZone = lens _diZone (\ s a -> s{_diZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +diKey :: Lens' DisksInsert' (Maybe Text) +diKey = lens _diKey (\ s a -> s{_diKey = a}) + +-- | OAuth 2.0 token for the current user. +diOauthToken :: Lens' DisksInsert' (Maybe Text) +diOauthToken + = lens _diOauthToken (\ s a -> s{_diOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +diFields :: Lens' DisksInsert' (Maybe Text) +diFields = lens _diFields (\ s a -> s{_diFields = a}) + +-- | Data format for the response. +diAlt :: Lens' DisksInsert' Text +diAlt = lens _diAlt (\ s a -> s{_diAlt = a}) + +instance GoogleRequest DisksInsert' where + type Rs DisksInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksInsert{..} + = go _diQuotaUser _diPrettyPrint _diSourceImage + _diProject + _diUserIp + _diZone + _diKey + _diOauthToken + _diFields + _diAlt + where go + = clientWithRoute (Proxy :: Proxy DisksInsertAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Disks/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/List.hs new file mode 100644 index 000000000..aa291a765 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Disks/List.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Disks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of persistent disks contained within the specified +-- zone. +-- +-- /See:/ for @ComputeDisksList@. +module Compute.Disks.List + ( + -- * REST Resource + DisksListAPI + + -- * Creating a Request + , disksList + , DisksList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlProject + , dlUserIp + , dlZone + , dlKey + , dlFilter + , dlPageToken + , dlOauthToken + , dlMaxResults + , dlFields + , dlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeDisksList@ which the +-- 'DisksList' request conforms to. +type DisksListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "disks" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DiskList + +-- | Retrieves the list of persistent disks contained within the specified +-- zone. +-- +-- /See:/ 'disksList' smart constructor. +data DisksList = DisksList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlProject :: !Text + , _dlUserIp :: !(Maybe Text) + , _dlZone :: !Text + , _dlKey :: !(Maybe Text) + , _dlFilter :: !(Maybe Text) + , _dlPageToken :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlMaxResults :: !Word32 + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlProject' +-- +-- * 'dlUserIp' +-- +-- * 'dlZone' +-- +-- * 'dlKey' +-- +-- * 'dlFilter' +-- +-- * 'dlPageToken' +-- +-- * 'dlOauthToken' +-- +-- * 'dlMaxResults' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +disksList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> DisksList +disksList pDlProject_ pDlZone_ = + DisksList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlProject = pDlProject_ + , _dlUserIp = Nothing + , _dlZone = pDlZone_ + , _dlKey = Nothing + , _dlFilter = Nothing + , _dlPageToken = Nothing + , _dlOauthToken = Nothing + , _dlMaxResults = 500 + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DisksList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DisksList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | Project ID for this request. +dlProject :: Lens' DisksList' Text +dlProject + = lens _dlProject (\ s a -> s{_dlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DisksList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | The name of the zone for this request. +dlZone :: Lens' DisksList' Text +dlZone = lens _dlZone (\ s a -> s{_dlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DisksList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +dlFilter :: Lens' DisksList' (Maybe Text) +dlFilter = lens _dlFilter (\ s a -> s{_dlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +dlPageToken :: Lens' DisksList' (Maybe Text) +dlPageToken + = lens _dlPageToken (\ s a -> s{_dlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DisksList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Maximum count of results to be returned. +dlMaxResults :: Lens' DisksList' Word32 +dlMaxResults + = lens _dlMaxResults (\ s a -> s{_dlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DisksList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DisksList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DisksList' where + type Rs DisksList' = DiskList + request = requestWithRoute defReq computeURL + requestWithRoute r u DisksList{..} + = go _dlQuotaUser _dlPrettyPrint _dlProject _dlUserIp + _dlZone + _dlKey + _dlFilter + _dlPageToken + _dlOauthToken + (Just _dlMaxResults) + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DisksListAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Delete.hs new file mode 100644 index 000000000..e704cc36a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified firewall resource. +-- +-- /See:/ for @ComputeFirewallsDelete@. +module Compute.Firewalls.Delete + ( + -- * REST Resource + FirewallsDeleteAPI + + -- * Creating a Request + , firewallsDelete + , FirewallsDelete + + -- * Request Lenses + , fdQuotaUser + , fdPrettyPrint + , fdProject + , fdUserIp + , fdKey + , fdOauthToken + , fdFirewall + , fdFields + , fdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsDelete@ which the +-- 'FirewallsDelete' request conforms to. +type FirewallsDeleteAPI = + Capture "project" Text :> + "global" :> + "firewalls" :> + Capture "firewall" Text :> Delete '[JSON] Operation + +-- | Deletes the specified firewall resource. +-- +-- /See:/ 'firewallsDelete' smart constructor. +data FirewallsDelete = FirewallsDelete + { _fdQuotaUser :: !(Maybe Text) + , _fdPrettyPrint :: !Bool + , _fdProject :: !Text + , _fdUserIp :: !(Maybe Text) + , _fdKey :: !(Maybe Text) + , _fdOauthToken :: !(Maybe Text) + , _fdFirewall :: !Text + , _fdFields :: !(Maybe Text) + , _fdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fdQuotaUser' +-- +-- * 'fdPrettyPrint' +-- +-- * 'fdProject' +-- +-- * 'fdUserIp' +-- +-- * 'fdKey' +-- +-- * 'fdOauthToken' +-- +-- * 'fdFirewall' +-- +-- * 'fdFields' +-- +-- * 'fdAlt' +firewallsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'firewall' + -> FirewallsDelete +firewallsDelete pFdProject_ pFdFirewall_ = + FirewallsDelete + { _fdQuotaUser = Nothing + , _fdPrettyPrint = True + , _fdProject = pFdProject_ + , _fdUserIp = Nothing + , _fdKey = Nothing + , _fdOauthToken = Nothing + , _fdFirewall = pFdFirewall_ + , _fdFields = Nothing + , _fdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fdQuotaUser :: Lens' FirewallsDelete' (Maybe Text) +fdQuotaUser + = lens _fdQuotaUser (\ s a -> s{_fdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fdPrettyPrint :: Lens' FirewallsDelete' Bool +fdPrettyPrint + = lens _fdPrettyPrint + (\ s a -> s{_fdPrettyPrint = a}) + +-- | Project ID for this request. +fdProject :: Lens' FirewallsDelete' Text +fdProject + = lens _fdProject (\ s a -> s{_fdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fdUserIp :: Lens' FirewallsDelete' (Maybe Text) +fdUserIp = lens _fdUserIp (\ s a -> s{_fdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fdKey :: Lens' FirewallsDelete' (Maybe Text) +fdKey = lens _fdKey (\ s a -> s{_fdKey = a}) + +-- | OAuth 2.0 token for the current user. +fdOauthToken :: Lens' FirewallsDelete' (Maybe Text) +fdOauthToken + = lens _fdOauthToken (\ s a -> s{_fdOauthToken = a}) + +-- | Name of the firewall resource to delete. +fdFirewall :: Lens' FirewallsDelete' Text +fdFirewall + = lens _fdFirewall (\ s a -> s{_fdFirewall = a}) + +-- | Selector specifying which fields to include in a partial response. +fdFields :: Lens' FirewallsDelete' (Maybe Text) +fdFields = lens _fdFields (\ s a -> s{_fdFields = a}) + +-- | Data format for the response. +fdAlt :: Lens' FirewallsDelete' Text +fdAlt = lens _fdAlt (\ s a -> s{_fdAlt = a}) + +instance GoogleRequest FirewallsDelete' where + type Rs FirewallsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsDelete{..} + = go _fdQuotaUser _fdPrettyPrint _fdProject _fdUserIp + _fdKey + _fdOauthToken + _fdFirewall + _fdFields + _fdAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Get.hs new file mode 100644 index 000000000..9c0a2b23c --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified firewall resource. +-- +-- /See:/ for @ComputeFirewallsGet@. +module Compute.Firewalls.Get + ( + -- * REST Resource + FirewallsGetAPI + + -- * Creating a Request + , firewallsGet + , FirewallsGet + + -- * Request Lenses + , fgQuotaUser + , fgPrettyPrint + , fgProject + , fgUserIp + , fgKey + , fgOauthToken + , fgFirewall + , fgFields + , fgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsGet@ which the +-- 'FirewallsGet' request conforms to. +type FirewallsGetAPI = + Capture "project" Text :> + "global" :> + "firewalls" :> + Capture "firewall" Text :> Get '[JSON] Firewall + +-- | Returns the specified firewall resource. +-- +-- /See:/ 'firewallsGet' smart constructor. +data FirewallsGet = FirewallsGet + { _fgQuotaUser :: !(Maybe Text) + , _fgPrettyPrint :: !Bool + , _fgProject :: !Text + , _fgUserIp :: !(Maybe Text) + , _fgKey :: !(Maybe Text) + , _fgOauthToken :: !(Maybe Text) + , _fgFirewall :: !Text + , _fgFields :: !(Maybe Text) + , _fgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fgQuotaUser' +-- +-- * 'fgPrettyPrint' +-- +-- * 'fgProject' +-- +-- * 'fgUserIp' +-- +-- * 'fgKey' +-- +-- * 'fgOauthToken' +-- +-- * 'fgFirewall' +-- +-- * 'fgFields' +-- +-- * 'fgAlt' +firewallsGet + :: Text -- ^ 'project' + -> Text -- ^ 'firewall' + -> FirewallsGet +firewallsGet pFgProject_ pFgFirewall_ = + FirewallsGet + { _fgQuotaUser = Nothing + , _fgPrettyPrint = True + , _fgProject = pFgProject_ + , _fgUserIp = Nothing + , _fgKey = Nothing + , _fgOauthToken = Nothing + , _fgFirewall = pFgFirewall_ + , _fgFields = Nothing + , _fgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fgQuotaUser :: Lens' FirewallsGet' (Maybe Text) +fgQuotaUser + = lens _fgQuotaUser (\ s a -> s{_fgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fgPrettyPrint :: Lens' FirewallsGet' Bool +fgPrettyPrint + = lens _fgPrettyPrint + (\ s a -> s{_fgPrettyPrint = a}) + +-- | Project ID for this request. +fgProject :: Lens' FirewallsGet' Text +fgProject + = lens _fgProject (\ s a -> s{_fgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fgUserIp :: Lens' FirewallsGet' (Maybe Text) +fgUserIp = lens _fgUserIp (\ s a -> s{_fgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fgKey :: Lens' FirewallsGet' (Maybe Text) +fgKey = lens _fgKey (\ s a -> s{_fgKey = a}) + +-- | OAuth 2.0 token for the current user. +fgOauthToken :: Lens' FirewallsGet' (Maybe Text) +fgOauthToken + = lens _fgOauthToken (\ s a -> s{_fgOauthToken = a}) + +-- | Name of the firewall resource to return. +fgFirewall :: Lens' FirewallsGet' Text +fgFirewall + = lens _fgFirewall (\ s a -> s{_fgFirewall = a}) + +-- | Selector specifying which fields to include in a partial response. +fgFields :: Lens' FirewallsGet' (Maybe Text) +fgFields = lens _fgFields (\ s a -> s{_fgFields = a}) + +-- | Data format for the response. +fgAlt :: Lens' FirewallsGet' Text +fgAlt = lens _fgAlt (\ s a -> s{_fgAlt = a}) + +instance GoogleRequest FirewallsGet' where + type Rs FirewallsGet' = Firewall + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsGet{..} + = go _fgQuotaUser _fgPrettyPrint _fgProject _fgUserIp + _fgKey + _fgOauthToken + _fgFirewall + _fgFields + _fgAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Insert.hs new file mode 100644 index 000000000..0f9f20918 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a firewall resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeFirewallsInsert@. +module Compute.Firewalls.Insert + ( + -- * REST Resource + FirewallsInsertAPI + + -- * Creating a Request + , firewallsInsert + , FirewallsInsert + + -- * Request Lenses + , fiQuotaUser + , fiPrettyPrint + , fiProject + , fiUserIp + , fiKey + , fiOauthToken + , fiFields + , fiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsInsert@ which the +-- 'FirewallsInsert' request conforms to. +type FirewallsInsertAPI = + Capture "project" Text :> + "global" :> "firewalls" :> Post '[JSON] Operation + +-- | Creates a firewall resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'firewallsInsert' smart constructor. +data FirewallsInsert = FirewallsInsert + { _fiQuotaUser :: !(Maybe Text) + , _fiPrettyPrint :: !Bool + , _fiProject :: !Text + , _fiUserIp :: !(Maybe Text) + , _fiKey :: !(Maybe Text) + , _fiOauthToken :: !(Maybe Text) + , _fiFields :: !(Maybe Text) + , _fiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiQuotaUser' +-- +-- * 'fiPrettyPrint' +-- +-- * 'fiProject' +-- +-- * 'fiUserIp' +-- +-- * 'fiKey' +-- +-- * 'fiOauthToken' +-- +-- * 'fiFields' +-- +-- * 'fiAlt' +firewallsInsert + :: Text -- ^ 'project' + -> FirewallsInsert +firewallsInsert pFiProject_ = + FirewallsInsert + { _fiQuotaUser = Nothing + , _fiPrettyPrint = True + , _fiProject = pFiProject_ + , _fiUserIp = Nothing + , _fiKey = Nothing + , _fiOauthToken = Nothing + , _fiFields = Nothing + , _fiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fiQuotaUser :: Lens' FirewallsInsert' (Maybe Text) +fiQuotaUser + = lens _fiQuotaUser (\ s a -> s{_fiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fiPrettyPrint :: Lens' FirewallsInsert' Bool +fiPrettyPrint + = lens _fiPrettyPrint + (\ s a -> s{_fiPrettyPrint = a}) + +-- | Project ID for this request. +fiProject :: Lens' FirewallsInsert' Text +fiProject + = lens _fiProject (\ s a -> s{_fiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fiUserIp :: Lens' FirewallsInsert' (Maybe Text) +fiUserIp = lens _fiUserIp (\ s a -> s{_fiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fiKey :: Lens' FirewallsInsert' (Maybe Text) +fiKey = lens _fiKey (\ s a -> s{_fiKey = a}) + +-- | OAuth 2.0 token for the current user. +fiOauthToken :: Lens' FirewallsInsert' (Maybe Text) +fiOauthToken + = lens _fiOauthToken (\ s a -> s{_fiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fiFields :: Lens' FirewallsInsert' (Maybe Text) +fiFields = lens _fiFields (\ s a -> s{_fiFields = a}) + +-- | Data format for the response. +fiAlt :: Lens' FirewallsInsert' Text +fiAlt = lens _fiAlt (\ s a -> s{_fiAlt = a}) + +instance GoogleRequest FirewallsInsert' where + type Rs FirewallsInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsInsert{..} + = go _fiQuotaUser _fiPrettyPrint _fiProject _fiUserIp + _fiKey + _fiOauthToken + _fiFields + _fiAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/List.hs new file mode 100644 index 000000000..90aa2d31d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of firewall resources available to the specified +-- project. +-- +-- /See:/ for @ComputeFirewallsList@. +module Compute.Firewalls.List + ( + -- * REST Resource + FirewallsListAPI + + -- * Creating a Request + , firewallsList + , FirewallsList + + -- * Request Lenses + , flQuotaUser + , flPrettyPrint + , flProject + , flUserIp + , flKey + , flFilter + , flPageToken + , flOauthToken + , flMaxResults + , flFields + , flAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsList@ which the +-- 'FirewallsList' request conforms to. +type FirewallsListAPI = + Capture "project" Text :> + "global" :> + "firewalls" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] FirewallList + +-- | Retrieves the list of firewall resources available to the specified +-- project. +-- +-- /See:/ 'firewallsList' smart constructor. +data FirewallsList = FirewallsList + { _flQuotaUser :: !(Maybe Text) + , _flPrettyPrint :: !Bool + , _flProject :: !Text + , _flUserIp :: !(Maybe Text) + , _flKey :: !(Maybe Text) + , _flFilter :: !(Maybe Text) + , _flPageToken :: !(Maybe Text) + , _flOauthToken :: !(Maybe Text) + , _flMaxResults :: !Word32 + , _flFields :: !(Maybe Text) + , _flAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flQuotaUser' +-- +-- * 'flPrettyPrint' +-- +-- * 'flProject' +-- +-- * 'flUserIp' +-- +-- * 'flKey' +-- +-- * 'flFilter' +-- +-- * 'flPageToken' +-- +-- * 'flOauthToken' +-- +-- * 'flMaxResults' +-- +-- * 'flFields' +-- +-- * 'flAlt' +firewallsList + :: Text -- ^ 'project' + -> FirewallsList +firewallsList pFlProject_ = + FirewallsList + { _flQuotaUser = Nothing + , _flPrettyPrint = True + , _flProject = pFlProject_ + , _flUserIp = Nothing + , _flKey = Nothing + , _flFilter = Nothing + , _flPageToken = Nothing + , _flOauthToken = Nothing + , _flMaxResults = 500 + , _flFields = Nothing + , _flAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +flQuotaUser :: Lens' FirewallsList' (Maybe Text) +flQuotaUser + = lens _flQuotaUser (\ s a -> s{_flQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +flPrettyPrint :: Lens' FirewallsList' Bool +flPrettyPrint + = lens _flPrettyPrint + (\ s a -> s{_flPrettyPrint = a}) + +-- | Project ID for this request. +flProject :: Lens' FirewallsList' Text +flProject + = lens _flProject (\ s a -> s{_flProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +flUserIp :: Lens' FirewallsList' (Maybe Text) +flUserIp = lens _flUserIp (\ s a -> s{_flUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +flKey :: Lens' FirewallsList' (Maybe Text) +flKey = lens _flKey (\ s a -> s{_flKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +flFilter :: Lens' FirewallsList' (Maybe Text) +flFilter = lens _flFilter (\ s a -> s{_flFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +flPageToken :: Lens' FirewallsList' (Maybe Text) +flPageToken + = lens _flPageToken (\ s a -> s{_flPageToken = a}) + +-- | OAuth 2.0 token for the current user. +flOauthToken :: Lens' FirewallsList' (Maybe Text) +flOauthToken + = lens _flOauthToken (\ s a -> s{_flOauthToken = a}) + +-- | Maximum count of results to be returned. +flMaxResults :: Lens' FirewallsList' Word32 +flMaxResults + = lens _flMaxResults (\ s a -> s{_flMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +flFields :: Lens' FirewallsList' (Maybe Text) +flFields = lens _flFields (\ s a -> s{_flFields = a}) + +-- | Data format for the response. +flAlt :: Lens' FirewallsList' Text +flAlt = lens _flAlt (\ s a -> s{_flAlt = a}) + +instance GoogleRequest FirewallsList' where + type Rs FirewallsList' = FirewallList + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsList{..} + = go _flQuotaUser _flPrettyPrint _flProject _flUserIp + _flKey + _flFilter + _flPageToken + _flOauthToken + (Just _flMaxResults) + _flFields + _flAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Patch.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Patch.hs new file mode 100644 index 000000000..56c8569c8 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Patch.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified firewall resource with the data included in the +-- request. This method supports patch semantics. +-- +-- /See:/ for @ComputeFirewallsPatch@. +module Compute.Firewalls.Patch + ( + -- * REST Resource + FirewallsPatchAPI + + -- * Creating a Request + , firewallsPatch + , FirewallsPatch + + -- * Request Lenses + , fpQuotaUser + , fpPrettyPrint + , fpProject + , fpUserIp + , fpKey + , fpOauthToken + , fpFirewall + , fpFields + , fpAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsPatch@ which the +-- 'FirewallsPatch' request conforms to. +type FirewallsPatchAPI = + Capture "project" Text :> + "global" :> + "firewalls" :> + Capture "firewall" Text :> Patch '[JSON] Operation + +-- | Updates the specified firewall resource with the data included in the +-- request. This method supports patch semantics. +-- +-- /See:/ 'firewallsPatch' smart constructor. +data FirewallsPatch = FirewallsPatch + { _fpQuotaUser :: !(Maybe Text) + , _fpPrettyPrint :: !Bool + , _fpProject :: !Text + , _fpUserIp :: !(Maybe Text) + , _fpKey :: !(Maybe Text) + , _fpOauthToken :: !(Maybe Text) + , _fpFirewall :: !Text + , _fpFields :: !(Maybe Text) + , _fpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fpQuotaUser' +-- +-- * 'fpPrettyPrint' +-- +-- * 'fpProject' +-- +-- * 'fpUserIp' +-- +-- * 'fpKey' +-- +-- * 'fpOauthToken' +-- +-- * 'fpFirewall' +-- +-- * 'fpFields' +-- +-- * 'fpAlt' +firewallsPatch + :: Text -- ^ 'project' + -> Text -- ^ 'firewall' + -> FirewallsPatch +firewallsPatch pFpProject_ pFpFirewall_ = + FirewallsPatch + { _fpQuotaUser = Nothing + , _fpPrettyPrint = True + , _fpProject = pFpProject_ + , _fpUserIp = Nothing + , _fpKey = Nothing + , _fpOauthToken = Nothing + , _fpFirewall = pFpFirewall_ + , _fpFields = Nothing + , _fpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fpQuotaUser :: Lens' FirewallsPatch' (Maybe Text) +fpQuotaUser + = lens _fpQuotaUser (\ s a -> s{_fpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fpPrettyPrint :: Lens' FirewallsPatch' Bool +fpPrettyPrint + = lens _fpPrettyPrint + (\ s a -> s{_fpPrettyPrint = a}) + +-- | Project ID for this request. +fpProject :: Lens' FirewallsPatch' Text +fpProject + = lens _fpProject (\ s a -> s{_fpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fpUserIp :: Lens' FirewallsPatch' (Maybe Text) +fpUserIp = lens _fpUserIp (\ s a -> s{_fpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fpKey :: Lens' FirewallsPatch' (Maybe Text) +fpKey = lens _fpKey (\ s a -> s{_fpKey = a}) + +-- | OAuth 2.0 token for the current user. +fpOauthToken :: Lens' FirewallsPatch' (Maybe Text) +fpOauthToken + = lens _fpOauthToken (\ s a -> s{_fpOauthToken = a}) + +-- | Name of the firewall resource to update. +fpFirewall :: Lens' FirewallsPatch' Text +fpFirewall + = lens _fpFirewall (\ s a -> s{_fpFirewall = a}) + +-- | Selector specifying which fields to include in a partial response. +fpFields :: Lens' FirewallsPatch' (Maybe Text) +fpFields = lens _fpFields (\ s a -> s{_fpFields = a}) + +-- | Data format for the response. +fpAlt :: Lens' FirewallsPatch' Text +fpAlt = lens _fpAlt (\ s a -> s{_fpAlt = a}) + +instance GoogleRequest FirewallsPatch' where + type Rs FirewallsPatch' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsPatch{..} + = go _fpQuotaUser _fpPrettyPrint _fpProject _fpUserIp + _fpKey + _fpOauthToken + _fpFirewall + _fpFields + _fpAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsPatchAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Update.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Update.hs new file mode 100644 index 000000000..11a0343aa --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Update.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Firewalls.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified firewall resource with the data included in the +-- request. +-- +-- /See:/ for @ComputeFirewallsUpdate@. +module Compute.Firewalls.Update + ( + -- * REST Resource + FirewallsUpdateAPI + + -- * Creating a Request + , firewallsUpdate + , FirewallsUpdate + + -- * Request Lenses + , fuQuotaUser + , fuPrettyPrint + , fuProject + , fuUserIp + , fuKey + , fuOauthToken + , fuFirewall + , fuFields + , fuAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeFirewallsUpdate@ which the +-- 'FirewallsUpdate' request conforms to. +type FirewallsUpdateAPI = + Capture "project" Text :> + "global" :> + "firewalls" :> + Capture "firewall" Text :> Put '[JSON] Operation + +-- | Updates the specified firewall resource with the data included in the +-- request. +-- +-- /See:/ 'firewallsUpdate' smart constructor. +data FirewallsUpdate = FirewallsUpdate + { _fuQuotaUser :: !(Maybe Text) + , _fuPrettyPrint :: !Bool + , _fuProject :: !Text + , _fuUserIp :: !(Maybe Text) + , _fuKey :: !(Maybe Text) + , _fuOauthToken :: !(Maybe Text) + , _fuFirewall :: !Text + , _fuFields :: !(Maybe Text) + , _fuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FirewallsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fuQuotaUser' +-- +-- * 'fuPrettyPrint' +-- +-- * 'fuProject' +-- +-- * 'fuUserIp' +-- +-- * 'fuKey' +-- +-- * 'fuOauthToken' +-- +-- * 'fuFirewall' +-- +-- * 'fuFields' +-- +-- * 'fuAlt' +firewallsUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'firewall' + -> FirewallsUpdate +firewallsUpdate pFuProject_ pFuFirewall_ = + FirewallsUpdate + { _fuQuotaUser = Nothing + , _fuPrettyPrint = True + , _fuProject = pFuProject_ + , _fuUserIp = Nothing + , _fuKey = Nothing + , _fuOauthToken = Nothing + , _fuFirewall = pFuFirewall_ + , _fuFields = Nothing + , _fuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fuQuotaUser :: Lens' FirewallsUpdate' (Maybe Text) +fuQuotaUser + = lens _fuQuotaUser (\ s a -> s{_fuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fuPrettyPrint :: Lens' FirewallsUpdate' Bool +fuPrettyPrint + = lens _fuPrettyPrint + (\ s a -> s{_fuPrettyPrint = a}) + +-- | Project ID for this request. +fuProject :: Lens' FirewallsUpdate' Text +fuProject + = lens _fuProject (\ s a -> s{_fuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fuUserIp :: Lens' FirewallsUpdate' (Maybe Text) +fuUserIp = lens _fuUserIp (\ s a -> s{_fuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fuKey :: Lens' FirewallsUpdate' (Maybe Text) +fuKey = lens _fuKey (\ s a -> s{_fuKey = a}) + +-- | OAuth 2.0 token for the current user. +fuOauthToken :: Lens' FirewallsUpdate' (Maybe Text) +fuOauthToken + = lens _fuOauthToken (\ s a -> s{_fuOauthToken = a}) + +-- | Name of the firewall resource to update. +fuFirewall :: Lens' FirewallsUpdate' Text +fuFirewall + = lens _fuFirewall (\ s a -> s{_fuFirewall = a}) + +-- | Selector specifying which fields to include in a partial response. +fuFields :: Lens' FirewallsUpdate' (Maybe Text) +fuFields = lens _fuFields (\ s a -> s{_fuFields = a}) + +-- | Data format for the response. +fuAlt :: Lens' FirewallsUpdate' Text +fuAlt = lens _fuAlt (\ s a -> s{_fuAlt = a}) + +instance GoogleRequest FirewallsUpdate' where + type Rs FirewallsUpdate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u FirewallsUpdate{..} + = go _fuQuotaUser _fuPrettyPrint _fuProject _fuUserIp + _fuKey + _fuOauthToken + _fuFirewall + _fuFields + _fuAlt + where go + = clientWithRoute (Proxy :: Proxy FirewallsUpdateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/AggregatedList.hs new file mode 100644 index 000000000..316ac1da3 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/AggregatedList.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of forwarding rules grouped by scope. +-- +-- /See:/ for @ComputeForwardingRulesAggregatedList@. +module Compute.ForwardingRules.AggregatedList + ( + -- * REST Resource + ForwardingRulesAggregatedListAPI + + -- * Creating a Request + , forwardingRulesAggregatedList + , ForwardingRulesAggregatedList + + -- * Request Lenses + , fralQuotaUser + , fralPrettyPrint + , fralProject + , fralUserIp + , fralKey + , fralFilter + , fralPageToken + , fralOauthToken + , fralMaxResults + , fralFields + , fralAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesAggregatedList@ which the +-- 'ForwardingRulesAggregatedList' request conforms to. +type ForwardingRulesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "forwardingRules" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ForwardingRuleAggregatedList + +-- | Retrieves the list of forwarding rules grouped by scope. +-- +-- /See:/ 'forwardingRulesAggregatedList' smart constructor. +data ForwardingRulesAggregatedList = ForwardingRulesAggregatedList + { _fralQuotaUser :: !(Maybe Text) + , _fralPrettyPrint :: !Bool + , _fralProject :: !Text + , _fralUserIp :: !(Maybe Text) + , _fralKey :: !(Maybe Text) + , _fralFilter :: !(Maybe Text) + , _fralPageToken :: !(Maybe Text) + , _fralOauthToken :: !(Maybe Text) + , _fralMaxResults :: !Word32 + , _fralFields :: !(Maybe Text) + , _fralAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fralQuotaUser' +-- +-- * 'fralPrettyPrint' +-- +-- * 'fralProject' +-- +-- * 'fralUserIp' +-- +-- * 'fralKey' +-- +-- * 'fralFilter' +-- +-- * 'fralPageToken' +-- +-- * 'fralOauthToken' +-- +-- * 'fralMaxResults' +-- +-- * 'fralFields' +-- +-- * 'fralAlt' +forwardingRulesAggregatedList + :: Text -- ^ 'project' + -> ForwardingRulesAggregatedList +forwardingRulesAggregatedList pFralProject_ = + ForwardingRulesAggregatedList + { _fralQuotaUser = Nothing + , _fralPrettyPrint = True + , _fralProject = pFralProject_ + , _fralUserIp = Nothing + , _fralKey = Nothing + , _fralFilter = Nothing + , _fralPageToken = Nothing + , _fralOauthToken = Nothing + , _fralMaxResults = 500 + , _fralFields = Nothing + , _fralAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fralQuotaUser :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralQuotaUser + = lens _fralQuotaUser + (\ s a -> s{_fralQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fralPrettyPrint :: Lens' ForwardingRulesAggregatedList' Bool +fralPrettyPrint + = lens _fralPrettyPrint + (\ s a -> s{_fralPrettyPrint = a}) + +-- | Name of the project scoping this request. +fralProject :: Lens' ForwardingRulesAggregatedList' Text +fralProject + = lens _fralProject (\ s a -> s{_fralProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fralUserIp :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralUserIp + = lens _fralUserIp (\ s a -> s{_fralUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fralKey :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralKey = lens _fralKey (\ s a -> s{_fralKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +fralFilter :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralFilter + = lens _fralFilter (\ s a -> s{_fralFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +fralPageToken :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralPageToken + = lens _fralPageToken + (\ s a -> s{_fralPageToken = a}) + +-- | OAuth 2.0 token for the current user. +fralOauthToken :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralOauthToken + = lens _fralOauthToken + (\ s a -> s{_fralOauthToken = a}) + +-- | Maximum count of results to be returned. +fralMaxResults :: Lens' ForwardingRulesAggregatedList' Word32 +fralMaxResults + = lens _fralMaxResults + (\ s a -> s{_fralMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +fralFields :: Lens' ForwardingRulesAggregatedList' (Maybe Text) +fralFields + = lens _fralFields (\ s a -> s{_fralFields = a}) + +-- | Data format for the response. +fralAlt :: Lens' ForwardingRulesAggregatedList' Text +fralAlt = lens _fralAlt (\ s a -> s{_fralAlt = a}) + +instance GoogleRequest ForwardingRulesAggregatedList' + where + type Rs ForwardingRulesAggregatedList' = + ForwardingRuleAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u + ForwardingRulesAggregatedList{..} + = go _fralQuotaUser _fralPrettyPrint _fralProject + _fralUserIp + _fralKey + _fralFilter + _fralPageToken + _fralOauthToken + (Just _fralMaxResults) + _fralFields + _fralAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Delete.hs new file mode 100644 index 000000000..e5f4a668b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Delete.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified ForwardingRule resource. +-- +-- /See:/ for @ComputeForwardingRulesDelete@. +module Compute.ForwardingRules.Delete + ( + -- * REST Resource + ForwardingRulesDeleteAPI + + -- * Creating a Request + , forwardingRulesDelete + , ForwardingRulesDelete + + -- * Request Lenses + , frdQuotaUser + , frdPrettyPrint + , frdProject + , frdForwardingRule + , frdUserIp + , frdKey + , frdRegion + , frdOauthToken + , frdFields + , frdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesDelete@ which the +-- 'ForwardingRulesDelete' request conforms to. +type ForwardingRulesDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified ForwardingRule resource. +-- +-- /See:/ 'forwardingRulesDelete' smart constructor. +data ForwardingRulesDelete = ForwardingRulesDelete + { _frdQuotaUser :: !(Maybe Text) + , _frdPrettyPrint :: !Bool + , _frdProject :: !Text + , _frdForwardingRule :: !Text + , _frdUserIp :: !(Maybe Text) + , _frdKey :: !(Maybe Text) + , _frdRegion :: !Text + , _frdOauthToken :: !(Maybe Text) + , _frdFields :: !(Maybe Text) + , _frdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frdQuotaUser' +-- +-- * 'frdPrettyPrint' +-- +-- * 'frdProject' +-- +-- * 'frdForwardingRule' +-- +-- * 'frdUserIp' +-- +-- * 'frdKey' +-- +-- * 'frdRegion' +-- +-- * 'frdOauthToken' +-- +-- * 'frdFields' +-- +-- * 'frdAlt' +forwardingRulesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> Text -- ^ 'region' + -> ForwardingRulesDelete +forwardingRulesDelete pFrdProject_ pFrdForwardingRule_ pFrdRegion_ = + ForwardingRulesDelete + { _frdQuotaUser = Nothing + , _frdPrettyPrint = True + , _frdProject = pFrdProject_ + , _frdForwardingRule = pFrdForwardingRule_ + , _frdUserIp = Nothing + , _frdKey = Nothing + , _frdRegion = pFrdRegion_ + , _frdOauthToken = Nothing + , _frdFields = Nothing + , _frdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +frdQuotaUser :: Lens' ForwardingRulesDelete' (Maybe Text) +frdQuotaUser + = lens _frdQuotaUser (\ s a -> s{_frdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +frdPrettyPrint :: Lens' ForwardingRulesDelete' Bool +frdPrettyPrint + = lens _frdPrettyPrint + (\ s a -> s{_frdPrettyPrint = a}) + +-- | Name of the project scoping this request. +frdProject :: Lens' ForwardingRulesDelete' Text +frdProject + = lens _frdProject (\ s a -> s{_frdProject = a}) + +-- | Name of the ForwardingRule resource to delete. +frdForwardingRule :: Lens' ForwardingRulesDelete' Text +frdForwardingRule + = lens _frdForwardingRule + (\ s a -> s{_frdForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +frdUserIp :: Lens' ForwardingRulesDelete' (Maybe Text) +frdUserIp + = lens _frdUserIp (\ s a -> s{_frdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +frdKey :: Lens' ForwardingRulesDelete' (Maybe Text) +frdKey = lens _frdKey (\ s a -> s{_frdKey = a}) + +-- | Name of the region scoping this request. +frdRegion :: Lens' ForwardingRulesDelete' Text +frdRegion + = lens _frdRegion (\ s a -> s{_frdRegion = a}) + +-- | OAuth 2.0 token for the current user. +frdOauthToken :: Lens' ForwardingRulesDelete' (Maybe Text) +frdOauthToken + = lens _frdOauthToken + (\ s a -> s{_frdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +frdFields :: Lens' ForwardingRulesDelete' (Maybe Text) +frdFields + = lens _frdFields (\ s a -> s{_frdFields = a}) + +-- | Data format for the response. +frdAlt :: Lens' ForwardingRulesDelete' Text +frdAlt = lens _frdAlt (\ s a -> s{_frdAlt = a}) + +instance GoogleRequest ForwardingRulesDelete' where + type Rs ForwardingRulesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ForwardingRulesDelete{..} + = go _frdQuotaUser _frdPrettyPrint _frdProject + _frdForwardingRule + _frdUserIp + _frdKey + _frdRegion + _frdOauthToken + _frdFields + _frdAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Get.hs new file mode 100644 index 000000000..e1e25d129 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified ForwardingRule resource. +-- +-- /See:/ for @ComputeForwardingRulesGet@. +module Compute.ForwardingRules.Get + ( + -- * REST Resource + ForwardingRulesGetAPI + + -- * Creating a Request + , forwardingRulesGet + , ForwardingRulesGet + + -- * Request Lenses + , frgQuotaUser + , frgPrettyPrint + , frgProject + , frgForwardingRule + , frgUserIp + , frgKey + , frgRegion + , frgOauthToken + , frgFields + , frgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesGet@ which the +-- 'ForwardingRulesGet' request conforms to. +type ForwardingRulesGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + Get '[JSON] ForwardingRule + +-- | Returns the specified ForwardingRule resource. +-- +-- /See:/ 'forwardingRulesGet' smart constructor. +data ForwardingRulesGet = ForwardingRulesGet + { _frgQuotaUser :: !(Maybe Text) + , _frgPrettyPrint :: !Bool + , _frgProject :: !Text + , _frgForwardingRule :: !Text + , _frgUserIp :: !(Maybe Text) + , _frgKey :: !(Maybe Text) + , _frgRegion :: !Text + , _frgOauthToken :: !(Maybe Text) + , _frgFields :: !(Maybe Text) + , _frgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frgQuotaUser' +-- +-- * 'frgPrettyPrint' +-- +-- * 'frgProject' +-- +-- * 'frgForwardingRule' +-- +-- * 'frgUserIp' +-- +-- * 'frgKey' +-- +-- * 'frgRegion' +-- +-- * 'frgOauthToken' +-- +-- * 'frgFields' +-- +-- * 'frgAlt' +forwardingRulesGet + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> Text -- ^ 'region' + -> ForwardingRulesGet +forwardingRulesGet pFrgProject_ pFrgForwardingRule_ pFrgRegion_ = + ForwardingRulesGet + { _frgQuotaUser = Nothing + , _frgPrettyPrint = True + , _frgProject = pFrgProject_ + , _frgForwardingRule = pFrgForwardingRule_ + , _frgUserIp = Nothing + , _frgKey = Nothing + , _frgRegion = pFrgRegion_ + , _frgOauthToken = Nothing + , _frgFields = Nothing + , _frgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +frgQuotaUser :: Lens' ForwardingRulesGet' (Maybe Text) +frgQuotaUser + = lens _frgQuotaUser (\ s a -> s{_frgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +frgPrettyPrint :: Lens' ForwardingRulesGet' Bool +frgPrettyPrint + = lens _frgPrettyPrint + (\ s a -> s{_frgPrettyPrint = a}) + +-- | Name of the project scoping this request. +frgProject :: Lens' ForwardingRulesGet' Text +frgProject + = lens _frgProject (\ s a -> s{_frgProject = a}) + +-- | Name of the ForwardingRule resource to return. +frgForwardingRule :: Lens' ForwardingRulesGet' Text +frgForwardingRule + = lens _frgForwardingRule + (\ s a -> s{_frgForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +frgUserIp :: Lens' ForwardingRulesGet' (Maybe Text) +frgUserIp + = lens _frgUserIp (\ s a -> s{_frgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +frgKey :: Lens' ForwardingRulesGet' (Maybe Text) +frgKey = lens _frgKey (\ s a -> s{_frgKey = a}) + +-- | Name of the region scoping this request. +frgRegion :: Lens' ForwardingRulesGet' Text +frgRegion + = lens _frgRegion (\ s a -> s{_frgRegion = a}) + +-- | OAuth 2.0 token for the current user. +frgOauthToken :: Lens' ForwardingRulesGet' (Maybe Text) +frgOauthToken + = lens _frgOauthToken + (\ s a -> s{_frgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +frgFields :: Lens' ForwardingRulesGet' (Maybe Text) +frgFields + = lens _frgFields (\ s a -> s{_frgFields = a}) + +-- | Data format for the response. +frgAlt :: Lens' ForwardingRulesGet' Text +frgAlt = lens _frgAlt (\ s a -> s{_frgAlt = a}) + +instance GoogleRequest ForwardingRulesGet' where + type Rs ForwardingRulesGet' = ForwardingRule + request = requestWithRoute defReq computeURL + requestWithRoute r u ForwardingRulesGet{..} + = go _frgQuotaUser _frgPrettyPrint _frgProject + _frgForwardingRule + _frgUserIp + _frgKey + _frgRegion + _frgOauthToken + _frgFields + _frgAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Insert.hs new file mode 100644 index 000000000..384350c4f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a ForwardingRule resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ for @ComputeForwardingRulesInsert@. +module Compute.ForwardingRules.Insert + ( + -- * REST Resource + ForwardingRulesInsertAPI + + -- * Creating a Request + , forwardingRulesInsert + , ForwardingRulesInsert + + -- * Request Lenses + , friQuotaUser + , friPrettyPrint + , friProject + , friUserIp + , friKey + , friRegion + , friOauthToken + , friFields + , friAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesInsert@ which the +-- 'ForwardingRulesInsert' request conforms to. +type ForwardingRulesInsertAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "forwardingRules" :> Post '[JSON] Operation + +-- | Creates a ForwardingRule resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ 'forwardingRulesInsert' smart constructor. +data ForwardingRulesInsert = ForwardingRulesInsert + { _friQuotaUser :: !(Maybe Text) + , _friPrettyPrint :: !Bool + , _friProject :: !Text + , _friUserIp :: !(Maybe Text) + , _friKey :: !(Maybe Text) + , _friRegion :: !Text + , _friOauthToken :: !(Maybe Text) + , _friFields :: !(Maybe Text) + , _friAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'friQuotaUser' +-- +-- * 'friPrettyPrint' +-- +-- * 'friProject' +-- +-- * 'friUserIp' +-- +-- * 'friKey' +-- +-- * 'friRegion' +-- +-- * 'friOauthToken' +-- +-- * 'friFields' +-- +-- * 'friAlt' +forwardingRulesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> ForwardingRulesInsert +forwardingRulesInsert pFriProject_ pFriRegion_ = + ForwardingRulesInsert + { _friQuotaUser = Nothing + , _friPrettyPrint = True + , _friProject = pFriProject_ + , _friUserIp = Nothing + , _friKey = Nothing + , _friRegion = pFriRegion_ + , _friOauthToken = Nothing + , _friFields = Nothing + , _friAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +friQuotaUser :: Lens' ForwardingRulesInsert' (Maybe Text) +friQuotaUser + = lens _friQuotaUser (\ s a -> s{_friQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +friPrettyPrint :: Lens' ForwardingRulesInsert' Bool +friPrettyPrint + = lens _friPrettyPrint + (\ s a -> s{_friPrettyPrint = a}) + +-- | Name of the project scoping this request. +friProject :: Lens' ForwardingRulesInsert' Text +friProject + = lens _friProject (\ s a -> s{_friProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +friUserIp :: Lens' ForwardingRulesInsert' (Maybe Text) +friUserIp + = lens _friUserIp (\ s a -> s{_friUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +friKey :: Lens' ForwardingRulesInsert' (Maybe Text) +friKey = lens _friKey (\ s a -> s{_friKey = a}) + +-- | Name of the region scoping this request. +friRegion :: Lens' ForwardingRulesInsert' Text +friRegion + = lens _friRegion (\ s a -> s{_friRegion = a}) + +-- | OAuth 2.0 token for the current user. +friOauthToken :: Lens' ForwardingRulesInsert' (Maybe Text) +friOauthToken + = lens _friOauthToken + (\ s a -> s{_friOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +friFields :: Lens' ForwardingRulesInsert' (Maybe Text) +friFields + = lens _friFields (\ s a -> s{_friFields = a}) + +-- | Data format for the response. +friAlt :: Lens' ForwardingRulesInsert' Text +friAlt = lens _friAlt (\ s a -> s{_friAlt = a}) + +instance GoogleRequest ForwardingRulesInsert' where + type Rs ForwardingRulesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ForwardingRulesInsert{..} + = go _friQuotaUser _friPrettyPrint _friProject + _friUserIp + _friKey + _friRegion + _friOauthToken + _friFields + _friAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/List.hs new file mode 100644 index 000000000..e24462689 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/List.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of ForwardingRule resources available to the +-- specified project and region. +-- +-- /See:/ for @ComputeForwardingRulesList@. +module Compute.ForwardingRules.List + ( + -- * REST Resource + ForwardingRulesListAPI + + -- * Creating a Request + , forwardingRulesList + , ForwardingRulesList + + -- * Request Lenses + , frlQuotaUser + , frlPrettyPrint + , frlProject + , frlUserIp + , frlKey + , frlFilter + , frlRegion + , frlPageToken + , frlOauthToken + , frlMaxResults + , frlFields + , frlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesList@ which the +-- 'ForwardingRulesList' request conforms to. +type ForwardingRulesListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "forwardingRules" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ForwardingRuleList + +-- | Retrieves the list of ForwardingRule resources available to the +-- specified project and region. +-- +-- /See:/ 'forwardingRulesList' smart constructor. +data ForwardingRulesList = ForwardingRulesList + { _frlQuotaUser :: !(Maybe Text) + , _frlPrettyPrint :: !Bool + , _frlProject :: !Text + , _frlUserIp :: !(Maybe Text) + , _frlKey :: !(Maybe Text) + , _frlFilter :: !(Maybe Text) + , _frlRegion :: !Text + , _frlPageToken :: !(Maybe Text) + , _frlOauthToken :: !(Maybe Text) + , _frlMaxResults :: !Word32 + , _frlFields :: !(Maybe Text) + , _frlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frlQuotaUser' +-- +-- * 'frlPrettyPrint' +-- +-- * 'frlProject' +-- +-- * 'frlUserIp' +-- +-- * 'frlKey' +-- +-- * 'frlFilter' +-- +-- * 'frlRegion' +-- +-- * 'frlPageToken' +-- +-- * 'frlOauthToken' +-- +-- * 'frlMaxResults' +-- +-- * 'frlFields' +-- +-- * 'frlAlt' +forwardingRulesList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> ForwardingRulesList +forwardingRulesList pFrlProject_ pFrlRegion_ = + ForwardingRulesList + { _frlQuotaUser = Nothing + , _frlPrettyPrint = True + , _frlProject = pFrlProject_ + , _frlUserIp = Nothing + , _frlKey = Nothing + , _frlFilter = Nothing + , _frlRegion = pFrlRegion_ + , _frlPageToken = Nothing + , _frlOauthToken = Nothing + , _frlMaxResults = 500 + , _frlFields = Nothing + , _frlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +frlQuotaUser :: Lens' ForwardingRulesList' (Maybe Text) +frlQuotaUser + = lens _frlQuotaUser (\ s a -> s{_frlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +frlPrettyPrint :: Lens' ForwardingRulesList' Bool +frlPrettyPrint + = lens _frlPrettyPrint + (\ s a -> s{_frlPrettyPrint = a}) + +-- | Name of the project scoping this request. +frlProject :: Lens' ForwardingRulesList' Text +frlProject + = lens _frlProject (\ s a -> s{_frlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +frlUserIp :: Lens' ForwardingRulesList' (Maybe Text) +frlUserIp + = lens _frlUserIp (\ s a -> s{_frlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +frlKey :: Lens' ForwardingRulesList' (Maybe Text) +frlKey = lens _frlKey (\ s a -> s{_frlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +frlFilter :: Lens' ForwardingRulesList' (Maybe Text) +frlFilter + = lens _frlFilter (\ s a -> s{_frlFilter = a}) + +-- | Name of the region scoping this request. +frlRegion :: Lens' ForwardingRulesList' Text +frlRegion + = lens _frlRegion (\ s a -> s{_frlRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +frlPageToken :: Lens' ForwardingRulesList' (Maybe Text) +frlPageToken + = lens _frlPageToken (\ s a -> s{_frlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +frlOauthToken :: Lens' ForwardingRulesList' (Maybe Text) +frlOauthToken + = lens _frlOauthToken + (\ s a -> s{_frlOauthToken = a}) + +-- | Maximum count of results to be returned. +frlMaxResults :: Lens' ForwardingRulesList' Word32 +frlMaxResults + = lens _frlMaxResults + (\ s a -> s{_frlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +frlFields :: Lens' ForwardingRulesList' (Maybe Text) +frlFields + = lens _frlFields (\ s a -> s{_frlFields = a}) + +-- | Data format for the response. +frlAlt :: Lens' ForwardingRulesList' Text +frlAlt = lens _frlAlt (\ s a -> s{_frlAlt = a}) + +instance GoogleRequest ForwardingRulesList' where + type Rs ForwardingRulesList' = ForwardingRuleList + request = requestWithRoute defReq computeURL + requestWithRoute r u ForwardingRulesList{..} + = go _frlQuotaUser _frlPrettyPrint _frlProject + _frlUserIp + _frlKey + _frlFilter + _frlRegion + _frlPageToken + _frlOauthToken + (Just _frlMaxResults) + _frlFields + _frlAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/SetTarget.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/SetTarget.hs new file mode 100644 index 000000000..15398dcb3 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/SetTarget.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ForwardingRules.SetTarget +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes target url for forwarding rule. +-- +-- /See:/ for @ComputeForwardingRulesSetTarget@. +module Compute.ForwardingRules.SetTarget + ( + -- * REST Resource + ForwardingRulesSetTargetAPI + + -- * Creating a Request + , forwardingRulesSetTarget + , ForwardingRulesSetTarget + + -- * Request Lenses + , frstQuotaUser + , frstPrettyPrint + , frstProject + , frstForwardingRule + , frstUserIp + , frstKey + , frstRegion + , frstOauthToken + , frstFields + , frstAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeForwardingRulesSetTarget@ which the +-- 'ForwardingRulesSetTarget' request conforms to. +type ForwardingRulesSetTargetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + "setTarget" :> Post '[JSON] Operation + +-- | Changes target url for forwarding rule. +-- +-- /See:/ 'forwardingRulesSetTarget' smart constructor. +data ForwardingRulesSetTarget = ForwardingRulesSetTarget + { _frstQuotaUser :: !(Maybe Text) + , _frstPrettyPrint :: !Bool + , _frstProject :: !Text + , _frstForwardingRule :: !Text + , _frstUserIp :: !(Maybe Text) + , _frstKey :: !(Maybe Text) + , _frstRegion :: !Text + , _frstOauthToken :: !(Maybe Text) + , _frstFields :: !(Maybe Text) + , _frstAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ForwardingRulesSetTarget'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frstQuotaUser' +-- +-- * 'frstPrettyPrint' +-- +-- * 'frstProject' +-- +-- * 'frstForwardingRule' +-- +-- * 'frstUserIp' +-- +-- * 'frstKey' +-- +-- * 'frstRegion' +-- +-- * 'frstOauthToken' +-- +-- * 'frstFields' +-- +-- * 'frstAlt' +forwardingRulesSetTarget + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> Text -- ^ 'region' + -> ForwardingRulesSetTarget +forwardingRulesSetTarget pFrstProject_ pFrstForwardingRule_ pFrstRegion_ = + ForwardingRulesSetTarget + { _frstQuotaUser = Nothing + , _frstPrettyPrint = True + , _frstProject = pFrstProject_ + , _frstForwardingRule = pFrstForwardingRule_ + , _frstUserIp = Nothing + , _frstKey = Nothing + , _frstRegion = pFrstRegion_ + , _frstOauthToken = Nothing + , _frstFields = Nothing + , _frstAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +frstQuotaUser :: Lens' ForwardingRulesSetTarget' (Maybe Text) +frstQuotaUser + = lens _frstQuotaUser + (\ s a -> s{_frstQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +frstPrettyPrint :: Lens' ForwardingRulesSetTarget' Bool +frstPrettyPrint + = lens _frstPrettyPrint + (\ s a -> s{_frstPrettyPrint = a}) + +-- | Name of the project scoping this request. +frstProject :: Lens' ForwardingRulesSetTarget' Text +frstProject + = lens _frstProject (\ s a -> s{_frstProject = a}) + +-- | Name of the ForwardingRule resource in which target is to be set. +frstForwardingRule :: Lens' ForwardingRulesSetTarget' Text +frstForwardingRule + = lens _frstForwardingRule + (\ s a -> s{_frstForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +frstUserIp :: Lens' ForwardingRulesSetTarget' (Maybe Text) +frstUserIp + = lens _frstUserIp (\ s a -> s{_frstUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +frstKey :: Lens' ForwardingRulesSetTarget' (Maybe Text) +frstKey = lens _frstKey (\ s a -> s{_frstKey = a}) + +-- | Name of the region scoping this request. +frstRegion :: Lens' ForwardingRulesSetTarget' Text +frstRegion + = lens _frstRegion (\ s a -> s{_frstRegion = a}) + +-- | OAuth 2.0 token for the current user. +frstOauthToken :: Lens' ForwardingRulesSetTarget' (Maybe Text) +frstOauthToken + = lens _frstOauthToken + (\ s a -> s{_frstOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +frstFields :: Lens' ForwardingRulesSetTarget' (Maybe Text) +frstFields + = lens _frstFields (\ s a -> s{_frstFields = a}) + +-- | Data format for the response. +frstAlt :: Lens' ForwardingRulesSetTarget' Text +frstAlt = lens _frstAlt (\ s a -> s{_frstAlt = a}) + +instance GoogleRequest ForwardingRulesSetTarget' + where + type Rs ForwardingRulesSetTarget' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ForwardingRulesSetTarget{..} + = go _frstQuotaUser _frstPrettyPrint _frstProject + _frstForwardingRule + _frstUserIp + _frstKey + _frstRegion + _frstOauthToken + _frstFields + _frstAlt + where go + = clientWithRoute + (Proxy :: Proxy ForwardingRulesSetTargetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Delete.hs new file mode 100644 index 000000000..563ee2dcf --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalAddresses.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified address resource. +-- +-- /See:/ for @ComputeGlobalAddressesDelete@. +module Compute.GlobalAddresses.Delete + ( + -- * REST Resource + GlobalAddressesDeleteAPI + + -- * Creating a Request + , globalAddressesDelete + , GlobalAddressesDelete + + -- * Request Lenses + , gadQuotaUser + , gadPrettyPrint + , gadProject + , gadUserIp + , gadAddress + , gadKey + , gadOauthToken + , gadFields + , gadAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalAddressesDelete@ which the +-- 'GlobalAddressesDelete' request conforms to. +type GlobalAddressesDeleteAPI = + Capture "project" Text :> + "global" :> + "addresses" :> + Capture "address" Text :> Delete '[JSON] Operation + +-- | Deletes the specified address resource. +-- +-- /See:/ 'globalAddressesDelete' smart constructor. +data GlobalAddressesDelete = GlobalAddressesDelete + { _gadQuotaUser :: !(Maybe Text) + , _gadPrettyPrint :: !Bool + , _gadProject :: !Text + , _gadUserIp :: !(Maybe Text) + , _gadAddress :: !Text + , _gadKey :: !(Maybe Text) + , _gadOauthToken :: !(Maybe Text) + , _gadFields :: !(Maybe Text) + , _gadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAddressesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gadQuotaUser' +-- +-- * 'gadPrettyPrint' +-- +-- * 'gadProject' +-- +-- * 'gadUserIp' +-- +-- * 'gadAddress' +-- +-- * 'gadKey' +-- +-- * 'gadOauthToken' +-- +-- * 'gadFields' +-- +-- * 'gadAlt' +globalAddressesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'address' + -> GlobalAddressesDelete +globalAddressesDelete pGadProject_ pGadAddress_ = + GlobalAddressesDelete + { _gadQuotaUser = Nothing + , _gadPrettyPrint = True + , _gadProject = pGadProject_ + , _gadUserIp = Nothing + , _gadAddress = pGadAddress_ + , _gadKey = Nothing + , _gadOauthToken = Nothing + , _gadFields = Nothing + , _gadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gadQuotaUser :: Lens' GlobalAddressesDelete' (Maybe Text) +gadQuotaUser + = lens _gadQuotaUser (\ s a -> s{_gadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gadPrettyPrint :: Lens' GlobalAddressesDelete' Bool +gadPrettyPrint + = lens _gadPrettyPrint + (\ s a -> s{_gadPrettyPrint = a}) + +-- | Project ID for this request. +gadProject :: Lens' GlobalAddressesDelete' Text +gadProject + = lens _gadProject (\ s a -> s{_gadProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gadUserIp :: Lens' GlobalAddressesDelete' (Maybe Text) +gadUserIp + = lens _gadUserIp (\ s a -> s{_gadUserIp = a}) + +-- | Name of the address resource to delete. +gadAddress :: Lens' GlobalAddressesDelete' Text +gadAddress + = lens _gadAddress (\ s a -> s{_gadAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gadKey :: Lens' GlobalAddressesDelete' (Maybe Text) +gadKey = lens _gadKey (\ s a -> s{_gadKey = a}) + +-- | OAuth 2.0 token for the current user. +gadOauthToken :: Lens' GlobalAddressesDelete' (Maybe Text) +gadOauthToken + = lens _gadOauthToken + (\ s a -> s{_gadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gadFields :: Lens' GlobalAddressesDelete' (Maybe Text) +gadFields + = lens _gadFields (\ s a -> s{_gadFields = a}) + +-- | Data format for the response. +gadAlt :: Lens' GlobalAddressesDelete' Text +gadAlt = lens _gadAlt (\ s a -> s{_gadAlt = a}) + +instance GoogleRequest GlobalAddressesDelete' where + type Rs GlobalAddressesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalAddressesDelete{..} + = go _gadQuotaUser _gadPrettyPrint _gadProject + _gadUserIp + _gadAddress + _gadKey + _gadOauthToken + _gadFields + _gadAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAddressesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Get.hs new file mode 100644 index 000000000..85bc85af4 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalAddresses.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified address resource. +-- +-- /See:/ for @ComputeGlobalAddressesGet@. +module Compute.GlobalAddresses.Get + ( + -- * REST Resource + GlobalAddressesGetAPI + + -- * Creating a Request + , globalAddressesGet + , GlobalAddressesGet + + -- * Request Lenses + , gagQuotaUser + , gagPrettyPrint + , gagProject + , gagUserIp + , gagAddress + , gagKey + , gagOauthToken + , gagFields + , gagAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalAddressesGet@ which the +-- 'GlobalAddressesGet' request conforms to. +type GlobalAddressesGetAPI = + Capture "project" Text :> + "global" :> + "addresses" :> + Capture "address" Text :> Get '[JSON] Address + +-- | Returns the specified address resource. +-- +-- /See:/ 'globalAddressesGet' smart constructor. +data GlobalAddressesGet = GlobalAddressesGet + { _gagQuotaUser :: !(Maybe Text) + , _gagPrettyPrint :: !Bool + , _gagProject :: !Text + , _gagUserIp :: !(Maybe Text) + , _gagAddress :: !Text + , _gagKey :: !(Maybe Text) + , _gagOauthToken :: !(Maybe Text) + , _gagFields :: !(Maybe Text) + , _gagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAddressesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gagQuotaUser' +-- +-- * 'gagPrettyPrint' +-- +-- * 'gagProject' +-- +-- * 'gagUserIp' +-- +-- * 'gagAddress' +-- +-- * 'gagKey' +-- +-- * 'gagOauthToken' +-- +-- * 'gagFields' +-- +-- * 'gagAlt' +globalAddressesGet + :: Text -- ^ 'project' + -> Text -- ^ 'address' + -> GlobalAddressesGet +globalAddressesGet pGagProject_ pGagAddress_ = + GlobalAddressesGet + { _gagQuotaUser = Nothing + , _gagPrettyPrint = True + , _gagProject = pGagProject_ + , _gagUserIp = Nothing + , _gagAddress = pGagAddress_ + , _gagKey = Nothing + , _gagOauthToken = Nothing + , _gagFields = Nothing + , _gagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gagQuotaUser :: Lens' GlobalAddressesGet' (Maybe Text) +gagQuotaUser + = lens _gagQuotaUser (\ s a -> s{_gagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gagPrettyPrint :: Lens' GlobalAddressesGet' Bool +gagPrettyPrint + = lens _gagPrettyPrint + (\ s a -> s{_gagPrettyPrint = a}) + +-- | Project ID for this request. +gagProject :: Lens' GlobalAddressesGet' Text +gagProject + = lens _gagProject (\ s a -> s{_gagProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gagUserIp :: Lens' GlobalAddressesGet' (Maybe Text) +gagUserIp + = lens _gagUserIp (\ s a -> s{_gagUserIp = a}) + +-- | Name of the address resource to return. +gagAddress :: Lens' GlobalAddressesGet' Text +gagAddress + = lens _gagAddress (\ s a -> s{_gagAddress = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gagKey :: Lens' GlobalAddressesGet' (Maybe Text) +gagKey = lens _gagKey (\ s a -> s{_gagKey = a}) + +-- | OAuth 2.0 token for the current user. +gagOauthToken :: Lens' GlobalAddressesGet' (Maybe Text) +gagOauthToken + = lens _gagOauthToken + (\ s a -> s{_gagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gagFields :: Lens' GlobalAddressesGet' (Maybe Text) +gagFields + = lens _gagFields (\ s a -> s{_gagFields = a}) + +-- | Data format for the response. +gagAlt :: Lens' GlobalAddressesGet' Text +gagAlt = lens _gagAlt (\ s a -> s{_gagAlt = a}) + +instance GoogleRequest GlobalAddressesGet' where + type Rs GlobalAddressesGet' = Address + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalAddressesGet{..} + = go _gagQuotaUser _gagPrettyPrint _gagProject + _gagUserIp + _gagAddress + _gagKey + _gagOauthToken + _gagFields + _gagAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAddressesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Insert.hs new file mode 100644 index 000000000..2a6fed531 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalAddresses.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an address resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeGlobalAddressesInsert@. +module Compute.GlobalAddresses.Insert + ( + -- * REST Resource + GlobalAddressesInsertAPI + + -- * Creating a Request + , globalAddressesInsert + , GlobalAddressesInsert + + -- * Request Lenses + , gaiQuotaUser + , gaiPrettyPrint + , gaiProject + , gaiUserIp + , gaiKey + , gaiOauthToken + , gaiFields + , gaiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalAddressesInsert@ which the +-- 'GlobalAddressesInsert' request conforms to. +type GlobalAddressesInsertAPI = + Capture "project" Text :> + "global" :> "addresses" :> Post '[JSON] Operation + +-- | Creates an address resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'globalAddressesInsert' smart constructor. +data GlobalAddressesInsert = GlobalAddressesInsert + { _gaiQuotaUser :: !(Maybe Text) + , _gaiPrettyPrint :: !Bool + , _gaiProject :: !Text + , _gaiUserIp :: !(Maybe Text) + , _gaiKey :: !(Maybe Text) + , _gaiOauthToken :: !(Maybe Text) + , _gaiFields :: !(Maybe Text) + , _gaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAddressesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaiQuotaUser' +-- +-- * 'gaiPrettyPrint' +-- +-- * 'gaiProject' +-- +-- * 'gaiUserIp' +-- +-- * 'gaiKey' +-- +-- * 'gaiOauthToken' +-- +-- * 'gaiFields' +-- +-- * 'gaiAlt' +globalAddressesInsert + :: Text -- ^ 'project' + -> GlobalAddressesInsert +globalAddressesInsert pGaiProject_ = + GlobalAddressesInsert + { _gaiQuotaUser = Nothing + , _gaiPrettyPrint = True + , _gaiProject = pGaiProject_ + , _gaiUserIp = Nothing + , _gaiKey = Nothing + , _gaiOauthToken = Nothing + , _gaiFields = Nothing + , _gaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gaiQuotaUser :: Lens' GlobalAddressesInsert' (Maybe Text) +gaiQuotaUser + = lens _gaiQuotaUser (\ s a -> s{_gaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gaiPrettyPrint :: Lens' GlobalAddressesInsert' Bool +gaiPrettyPrint + = lens _gaiPrettyPrint + (\ s a -> s{_gaiPrettyPrint = a}) + +-- | Project ID for this request. +gaiProject :: Lens' GlobalAddressesInsert' Text +gaiProject + = lens _gaiProject (\ s a -> s{_gaiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gaiUserIp :: Lens' GlobalAddressesInsert' (Maybe Text) +gaiUserIp + = lens _gaiUserIp (\ s a -> s{_gaiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gaiKey :: Lens' GlobalAddressesInsert' (Maybe Text) +gaiKey = lens _gaiKey (\ s a -> s{_gaiKey = a}) + +-- | OAuth 2.0 token for the current user. +gaiOauthToken :: Lens' GlobalAddressesInsert' (Maybe Text) +gaiOauthToken + = lens _gaiOauthToken + (\ s a -> s{_gaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gaiFields :: Lens' GlobalAddressesInsert' (Maybe Text) +gaiFields + = lens _gaiFields (\ s a -> s{_gaiFields = a}) + +-- | Data format for the response. +gaiAlt :: Lens' GlobalAddressesInsert' Text +gaiAlt = lens _gaiAlt (\ s a -> s{_gaiAlt = a}) + +instance GoogleRequest GlobalAddressesInsert' where + type Rs GlobalAddressesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalAddressesInsert{..} + = go _gaiQuotaUser _gaiPrettyPrint _gaiProject + _gaiUserIp + _gaiKey + _gaiOauthToken + _gaiFields + _gaiAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAddressesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/List.hs new file mode 100644 index 000000000..e22031af5 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/List.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalAddresses.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of global address resources. +-- +-- /See:/ for @ComputeGlobalAddressesList@. +module Compute.GlobalAddresses.List + ( + -- * REST Resource + GlobalAddressesListAPI + + -- * Creating a Request + , globalAddressesList + , GlobalAddressesList + + -- * Request Lenses + , galQuotaUser + , galPrettyPrint + , galProject + , galUserIp + , galKey + , galFilter + , galPageToken + , galOauthToken + , galMaxResults + , galFields + , galAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalAddressesList@ which the +-- 'GlobalAddressesList' request conforms to. +type GlobalAddressesListAPI = + Capture "project" Text :> + "global" :> + "addresses" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AddressList + +-- | Retrieves the list of global address resources. +-- +-- /See:/ 'globalAddressesList' smart constructor. +data GlobalAddressesList = GlobalAddressesList + { _galQuotaUser :: !(Maybe Text) + , _galPrettyPrint :: !Bool + , _galProject :: !Text + , _galUserIp :: !(Maybe Text) + , _galKey :: !(Maybe Text) + , _galFilter :: !(Maybe Text) + , _galPageToken :: !(Maybe Text) + , _galOauthToken :: !(Maybe Text) + , _galMaxResults :: !Word32 + , _galFields :: !(Maybe Text) + , _galAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalAddressesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'galQuotaUser' +-- +-- * 'galPrettyPrint' +-- +-- * 'galProject' +-- +-- * 'galUserIp' +-- +-- * 'galKey' +-- +-- * 'galFilter' +-- +-- * 'galPageToken' +-- +-- * 'galOauthToken' +-- +-- * 'galMaxResults' +-- +-- * 'galFields' +-- +-- * 'galAlt' +globalAddressesList + :: Text -- ^ 'project' + -> GlobalAddressesList +globalAddressesList pGalProject_ = + GlobalAddressesList + { _galQuotaUser = Nothing + , _galPrettyPrint = True + , _galProject = pGalProject_ + , _galUserIp = Nothing + , _galKey = Nothing + , _galFilter = Nothing + , _galPageToken = Nothing + , _galOauthToken = Nothing + , _galMaxResults = 500 + , _galFields = Nothing + , _galAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +galQuotaUser :: Lens' GlobalAddressesList' (Maybe Text) +galQuotaUser + = lens _galQuotaUser (\ s a -> s{_galQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +galPrettyPrint :: Lens' GlobalAddressesList' Bool +galPrettyPrint + = lens _galPrettyPrint + (\ s a -> s{_galPrettyPrint = a}) + +-- | Project ID for this request. +galProject :: Lens' GlobalAddressesList' Text +galProject + = lens _galProject (\ s a -> s{_galProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +galUserIp :: Lens' GlobalAddressesList' (Maybe Text) +galUserIp + = lens _galUserIp (\ s a -> s{_galUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +galKey :: Lens' GlobalAddressesList' (Maybe Text) +galKey = lens _galKey (\ s a -> s{_galKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +galFilter :: Lens' GlobalAddressesList' (Maybe Text) +galFilter + = lens _galFilter (\ s a -> s{_galFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +galPageToken :: Lens' GlobalAddressesList' (Maybe Text) +galPageToken + = lens _galPageToken (\ s a -> s{_galPageToken = a}) + +-- | OAuth 2.0 token for the current user. +galOauthToken :: Lens' GlobalAddressesList' (Maybe Text) +galOauthToken + = lens _galOauthToken + (\ s a -> s{_galOauthToken = a}) + +-- | Maximum count of results to be returned. +galMaxResults :: Lens' GlobalAddressesList' Word32 +galMaxResults + = lens _galMaxResults + (\ s a -> s{_galMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +galFields :: Lens' GlobalAddressesList' (Maybe Text) +galFields + = lens _galFields (\ s a -> s{_galFields = a}) + +-- | Data format for the response. +galAlt :: Lens' GlobalAddressesList' Text +galAlt = lens _galAlt (\ s a -> s{_galAlt = a}) + +instance GoogleRequest GlobalAddressesList' where + type Rs GlobalAddressesList' = AddressList + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalAddressesList{..} + = go _galQuotaUser _galPrettyPrint _galProject + _galUserIp + _galKey + _galFilter + _galPageToken + _galOauthToken + (Just _galMaxResults) + _galFields + _galAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalAddressesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Delete.hs new file mode 100644 index 000000000..358afcfea --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Delete.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalForwardingRules.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified ForwardingRule resource. +-- +-- /See:/ for @ComputeGlobalForwardingRulesDelete@. +module Compute.GlobalForwardingRules.Delete + ( + -- * REST Resource + GlobalForwardingRulesDeleteAPI + + -- * Creating a Request + , globalForwardingRulesDelete + , GlobalForwardingRulesDelete + + -- * Request Lenses + , gfrdQuotaUser + , gfrdPrettyPrint + , gfrdProject + , gfrdForwardingRule + , gfrdUserIp + , gfrdKey + , gfrdOauthToken + , gfrdFields + , gfrdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalForwardingRulesDelete@ which the +-- 'GlobalForwardingRulesDelete' request conforms to. +type GlobalForwardingRulesDeleteAPI = + Capture "project" Text :> + "global" :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified ForwardingRule resource. +-- +-- /See:/ 'globalForwardingRulesDelete' smart constructor. +data GlobalForwardingRulesDelete = GlobalForwardingRulesDelete + { _gfrdQuotaUser :: !(Maybe Text) + , _gfrdPrettyPrint :: !Bool + , _gfrdProject :: !Text + , _gfrdForwardingRule :: !Text + , _gfrdUserIp :: !(Maybe Text) + , _gfrdKey :: !(Maybe Text) + , _gfrdOauthToken :: !(Maybe Text) + , _gfrdFields :: !(Maybe Text) + , _gfrdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalForwardingRulesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfrdQuotaUser' +-- +-- * 'gfrdPrettyPrint' +-- +-- * 'gfrdProject' +-- +-- * 'gfrdForwardingRule' +-- +-- * 'gfrdUserIp' +-- +-- * 'gfrdKey' +-- +-- * 'gfrdOauthToken' +-- +-- * 'gfrdFields' +-- +-- * 'gfrdAlt' +globalForwardingRulesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> GlobalForwardingRulesDelete +globalForwardingRulesDelete pGfrdProject_ pGfrdForwardingRule_ = + GlobalForwardingRulesDelete + { _gfrdQuotaUser = Nothing + , _gfrdPrettyPrint = True + , _gfrdProject = pGfrdProject_ + , _gfrdForwardingRule = pGfrdForwardingRule_ + , _gfrdUserIp = Nothing + , _gfrdKey = Nothing + , _gfrdOauthToken = Nothing + , _gfrdFields = Nothing + , _gfrdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gfrdQuotaUser :: Lens' GlobalForwardingRulesDelete' (Maybe Text) +gfrdQuotaUser + = lens _gfrdQuotaUser + (\ s a -> s{_gfrdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gfrdPrettyPrint :: Lens' GlobalForwardingRulesDelete' Bool +gfrdPrettyPrint + = lens _gfrdPrettyPrint + (\ s a -> s{_gfrdPrettyPrint = a}) + +-- | Name of the project scoping this request. +gfrdProject :: Lens' GlobalForwardingRulesDelete' Text +gfrdProject + = lens _gfrdProject (\ s a -> s{_gfrdProject = a}) + +-- | Name of the ForwardingRule resource to delete. +gfrdForwardingRule :: Lens' GlobalForwardingRulesDelete' Text +gfrdForwardingRule + = lens _gfrdForwardingRule + (\ s a -> s{_gfrdForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gfrdUserIp :: Lens' GlobalForwardingRulesDelete' (Maybe Text) +gfrdUserIp + = lens _gfrdUserIp (\ s a -> s{_gfrdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gfrdKey :: Lens' GlobalForwardingRulesDelete' (Maybe Text) +gfrdKey = lens _gfrdKey (\ s a -> s{_gfrdKey = a}) + +-- | OAuth 2.0 token for the current user. +gfrdOauthToken :: Lens' GlobalForwardingRulesDelete' (Maybe Text) +gfrdOauthToken + = lens _gfrdOauthToken + (\ s a -> s{_gfrdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gfrdFields :: Lens' GlobalForwardingRulesDelete' (Maybe Text) +gfrdFields + = lens _gfrdFields (\ s a -> s{_gfrdFields = a}) + +-- | Data format for the response. +gfrdAlt :: Lens' GlobalForwardingRulesDelete' Text +gfrdAlt = lens _gfrdAlt (\ s a -> s{_gfrdAlt = a}) + +instance GoogleRequest GlobalForwardingRulesDelete' + where + type Rs GlobalForwardingRulesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalForwardingRulesDelete{..} + = go _gfrdQuotaUser _gfrdPrettyPrint _gfrdProject + _gfrdForwardingRule + _gfrdUserIp + _gfrdKey + _gfrdOauthToken + _gfrdFields + _gfrdAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalForwardingRulesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Get.hs new file mode 100644 index 000000000..dbecc97c9 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalForwardingRules.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified ForwardingRule resource. +-- +-- /See:/ for @ComputeGlobalForwardingRulesGet@. +module Compute.GlobalForwardingRules.Get + ( + -- * REST Resource + GlobalForwardingRulesGetAPI + + -- * Creating a Request + , globalForwardingRulesGet + , GlobalForwardingRulesGet + + -- * Request Lenses + , gfrgQuotaUser + , gfrgPrettyPrint + , gfrgProject + , gfrgForwardingRule + , gfrgUserIp + , gfrgKey + , gfrgOauthToken + , gfrgFields + , gfrgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalForwardingRulesGet@ which the +-- 'GlobalForwardingRulesGet' request conforms to. +type GlobalForwardingRulesGetAPI = + Capture "project" Text :> + "global" :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + Get '[JSON] ForwardingRule + +-- | Returns the specified ForwardingRule resource. +-- +-- /See:/ 'globalForwardingRulesGet' smart constructor. +data GlobalForwardingRulesGet = GlobalForwardingRulesGet + { _gfrgQuotaUser :: !(Maybe Text) + , _gfrgPrettyPrint :: !Bool + , _gfrgProject :: !Text + , _gfrgForwardingRule :: !Text + , _gfrgUserIp :: !(Maybe Text) + , _gfrgKey :: !(Maybe Text) + , _gfrgOauthToken :: !(Maybe Text) + , _gfrgFields :: !(Maybe Text) + , _gfrgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalForwardingRulesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfrgQuotaUser' +-- +-- * 'gfrgPrettyPrint' +-- +-- * 'gfrgProject' +-- +-- * 'gfrgForwardingRule' +-- +-- * 'gfrgUserIp' +-- +-- * 'gfrgKey' +-- +-- * 'gfrgOauthToken' +-- +-- * 'gfrgFields' +-- +-- * 'gfrgAlt' +globalForwardingRulesGet + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> GlobalForwardingRulesGet +globalForwardingRulesGet pGfrgProject_ pGfrgForwardingRule_ = + GlobalForwardingRulesGet + { _gfrgQuotaUser = Nothing + , _gfrgPrettyPrint = True + , _gfrgProject = pGfrgProject_ + , _gfrgForwardingRule = pGfrgForwardingRule_ + , _gfrgUserIp = Nothing + , _gfrgKey = Nothing + , _gfrgOauthToken = Nothing + , _gfrgFields = Nothing + , _gfrgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gfrgQuotaUser :: Lens' GlobalForwardingRulesGet' (Maybe Text) +gfrgQuotaUser + = lens _gfrgQuotaUser + (\ s a -> s{_gfrgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gfrgPrettyPrint :: Lens' GlobalForwardingRulesGet' Bool +gfrgPrettyPrint + = lens _gfrgPrettyPrint + (\ s a -> s{_gfrgPrettyPrint = a}) + +-- | Name of the project scoping this request. +gfrgProject :: Lens' GlobalForwardingRulesGet' Text +gfrgProject + = lens _gfrgProject (\ s a -> s{_gfrgProject = a}) + +-- | Name of the ForwardingRule resource to return. +gfrgForwardingRule :: Lens' GlobalForwardingRulesGet' Text +gfrgForwardingRule + = lens _gfrgForwardingRule + (\ s a -> s{_gfrgForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gfrgUserIp :: Lens' GlobalForwardingRulesGet' (Maybe Text) +gfrgUserIp + = lens _gfrgUserIp (\ s a -> s{_gfrgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gfrgKey :: Lens' GlobalForwardingRulesGet' (Maybe Text) +gfrgKey = lens _gfrgKey (\ s a -> s{_gfrgKey = a}) + +-- | OAuth 2.0 token for the current user. +gfrgOauthToken :: Lens' GlobalForwardingRulesGet' (Maybe Text) +gfrgOauthToken + = lens _gfrgOauthToken + (\ s a -> s{_gfrgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gfrgFields :: Lens' GlobalForwardingRulesGet' (Maybe Text) +gfrgFields + = lens _gfrgFields (\ s a -> s{_gfrgFields = a}) + +-- | Data format for the response. +gfrgAlt :: Lens' GlobalForwardingRulesGet' Text +gfrgAlt = lens _gfrgAlt (\ s a -> s{_gfrgAlt = a}) + +instance GoogleRequest GlobalForwardingRulesGet' + where + type Rs GlobalForwardingRulesGet' = ForwardingRule + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalForwardingRulesGet{..} + = go _gfrgQuotaUser _gfrgPrettyPrint _gfrgProject + _gfrgForwardingRule + _gfrgUserIp + _gfrgKey + _gfrgOauthToken + _gfrgFields + _gfrgAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalForwardingRulesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Insert.hs new file mode 100644 index 000000000..1735bbf9f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/Insert.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalForwardingRules.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a ForwardingRule resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ for @ComputeGlobalForwardingRulesInsert@. +module Compute.GlobalForwardingRules.Insert + ( + -- * REST Resource + GlobalForwardingRulesInsertAPI + + -- * Creating a Request + , globalForwardingRulesInsert + , GlobalForwardingRulesInsert + + -- * Request Lenses + , gfriQuotaUser + , gfriPrettyPrint + , gfriProject + , gfriUserIp + , gfriKey + , gfriOauthToken + , gfriFields + , gfriAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalForwardingRulesInsert@ which the +-- 'GlobalForwardingRulesInsert' request conforms to. +type GlobalForwardingRulesInsertAPI = + Capture "project" Text :> + "global" :> + "forwardingRules" :> Post '[JSON] Operation + +-- | Creates a ForwardingRule resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ 'globalForwardingRulesInsert' smart constructor. +data GlobalForwardingRulesInsert = GlobalForwardingRulesInsert + { _gfriQuotaUser :: !(Maybe Text) + , _gfriPrettyPrint :: !Bool + , _gfriProject :: !Text + , _gfriUserIp :: !(Maybe Text) + , _gfriKey :: !(Maybe Text) + , _gfriOauthToken :: !(Maybe Text) + , _gfriFields :: !(Maybe Text) + , _gfriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalForwardingRulesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfriQuotaUser' +-- +-- * 'gfriPrettyPrint' +-- +-- * 'gfriProject' +-- +-- * 'gfriUserIp' +-- +-- * 'gfriKey' +-- +-- * 'gfriOauthToken' +-- +-- * 'gfriFields' +-- +-- * 'gfriAlt' +globalForwardingRulesInsert + :: Text -- ^ 'project' + -> GlobalForwardingRulesInsert +globalForwardingRulesInsert pGfriProject_ = + GlobalForwardingRulesInsert + { _gfriQuotaUser = Nothing + , _gfriPrettyPrint = True + , _gfriProject = pGfriProject_ + , _gfriUserIp = Nothing + , _gfriKey = Nothing + , _gfriOauthToken = Nothing + , _gfriFields = Nothing + , _gfriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gfriQuotaUser :: Lens' GlobalForwardingRulesInsert' (Maybe Text) +gfriQuotaUser + = lens _gfriQuotaUser + (\ s a -> s{_gfriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gfriPrettyPrint :: Lens' GlobalForwardingRulesInsert' Bool +gfriPrettyPrint + = lens _gfriPrettyPrint + (\ s a -> s{_gfriPrettyPrint = a}) + +-- | Name of the project scoping this request. +gfriProject :: Lens' GlobalForwardingRulesInsert' Text +gfriProject + = lens _gfriProject (\ s a -> s{_gfriProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gfriUserIp :: Lens' GlobalForwardingRulesInsert' (Maybe Text) +gfriUserIp + = lens _gfriUserIp (\ s a -> s{_gfriUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gfriKey :: Lens' GlobalForwardingRulesInsert' (Maybe Text) +gfriKey = lens _gfriKey (\ s a -> s{_gfriKey = a}) + +-- | OAuth 2.0 token for the current user. +gfriOauthToken :: Lens' GlobalForwardingRulesInsert' (Maybe Text) +gfriOauthToken + = lens _gfriOauthToken + (\ s a -> s{_gfriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gfriFields :: Lens' GlobalForwardingRulesInsert' (Maybe Text) +gfriFields + = lens _gfriFields (\ s a -> s{_gfriFields = a}) + +-- | Data format for the response. +gfriAlt :: Lens' GlobalForwardingRulesInsert' Text +gfriAlt = lens _gfriAlt (\ s a -> s{_gfriAlt = a}) + +instance GoogleRequest GlobalForwardingRulesInsert' + where + type Rs GlobalForwardingRulesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalForwardingRulesInsert{..} + = go _gfriQuotaUser _gfriPrettyPrint _gfriProject + _gfriUserIp + _gfriKey + _gfriOauthToken + _gfriFields + _gfriAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalForwardingRulesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/List.hs new file mode 100644 index 000000000..d1d5421ff --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/List.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalForwardingRules.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of ForwardingRule resources available to the +-- specified project. +-- +-- /See:/ for @ComputeGlobalForwardingRulesList@. +module Compute.GlobalForwardingRules.List + ( + -- * REST Resource + GlobalForwardingRulesListAPI + + -- * Creating a Request + , globalForwardingRulesList + , GlobalForwardingRulesList + + -- * Request Lenses + , gfrlQuotaUser + , gfrlPrettyPrint + , gfrlProject + , gfrlUserIp + , gfrlKey + , gfrlFilter + , gfrlPageToken + , gfrlOauthToken + , gfrlMaxResults + , gfrlFields + , gfrlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalForwardingRulesList@ which the +-- 'GlobalForwardingRulesList' request conforms to. +type GlobalForwardingRulesListAPI = + Capture "project" Text :> + "global" :> + "forwardingRules" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ForwardingRuleList + +-- | Retrieves the list of ForwardingRule resources available to the +-- specified project. +-- +-- /See:/ 'globalForwardingRulesList' smart constructor. +data GlobalForwardingRulesList = GlobalForwardingRulesList + { _gfrlQuotaUser :: !(Maybe Text) + , _gfrlPrettyPrint :: !Bool + , _gfrlProject :: !Text + , _gfrlUserIp :: !(Maybe Text) + , _gfrlKey :: !(Maybe Text) + , _gfrlFilter :: !(Maybe Text) + , _gfrlPageToken :: !(Maybe Text) + , _gfrlOauthToken :: !(Maybe Text) + , _gfrlMaxResults :: !Word32 + , _gfrlFields :: !(Maybe Text) + , _gfrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalForwardingRulesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfrlQuotaUser' +-- +-- * 'gfrlPrettyPrint' +-- +-- * 'gfrlProject' +-- +-- * 'gfrlUserIp' +-- +-- * 'gfrlKey' +-- +-- * 'gfrlFilter' +-- +-- * 'gfrlPageToken' +-- +-- * 'gfrlOauthToken' +-- +-- * 'gfrlMaxResults' +-- +-- * 'gfrlFields' +-- +-- * 'gfrlAlt' +globalForwardingRulesList + :: Text -- ^ 'project' + -> GlobalForwardingRulesList +globalForwardingRulesList pGfrlProject_ = + GlobalForwardingRulesList + { _gfrlQuotaUser = Nothing + , _gfrlPrettyPrint = True + , _gfrlProject = pGfrlProject_ + , _gfrlUserIp = Nothing + , _gfrlKey = Nothing + , _gfrlFilter = Nothing + , _gfrlPageToken = Nothing + , _gfrlOauthToken = Nothing + , _gfrlMaxResults = 500 + , _gfrlFields = Nothing + , _gfrlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gfrlQuotaUser :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlQuotaUser + = lens _gfrlQuotaUser + (\ s a -> s{_gfrlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gfrlPrettyPrint :: Lens' GlobalForwardingRulesList' Bool +gfrlPrettyPrint + = lens _gfrlPrettyPrint + (\ s a -> s{_gfrlPrettyPrint = a}) + +-- | Name of the project scoping this request. +gfrlProject :: Lens' GlobalForwardingRulesList' Text +gfrlProject + = lens _gfrlProject (\ s a -> s{_gfrlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gfrlUserIp :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlUserIp + = lens _gfrlUserIp (\ s a -> s{_gfrlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gfrlKey :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlKey = lens _gfrlKey (\ s a -> s{_gfrlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +gfrlFilter :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlFilter + = lens _gfrlFilter (\ s a -> s{_gfrlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +gfrlPageToken :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlPageToken + = lens _gfrlPageToken + (\ s a -> s{_gfrlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +gfrlOauthToken :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlOauthToken + = lens _gfrlOauthToken + (\ s a -> s{_gfrlOauthToken = a}) + +-- | Maximum count of results to be returned. +gfrlMaxResults :: Lens' GlobalForwardingRulesList' Word32 +gfrlMaxResults + = lens _gfrlMaxResults + (\ s a -> s{_gfrlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +gfrlFields :: Lens' GlobalForwardingRulesList' (Maybe Text) +gfrlFields + = lens _gfrlFields (\ s a -> s{_gfrlFields = a}) + +-- | Data format for the response. +gfrlAlt :: Lens' GlobalForwardingRulesList' Text +gfrlAlt = lens _gfrlAlt (\ s a -> s{_gfrlAlt = a}) + +instance GoogleRequest GlobalForwardingRulesList' + where + type Rs GlobalForwardingRulesList' = + ForwardingRuleList + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalForwardingRulesList{..} + = go _gfrlQuotaUser _gfrlPrettyPrint _gfrlProject + _gfrlUserIp + _gfrlKey + _gfrlFilter + _gfrlPageToken + _gfrlOauthToken + (Just _gfrlMaxResults) + _gfrlFields + _gfrlAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalForwardingRulesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/SetTarget.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/SetTarget.hs new file mode 100644 index 000000000..9e985638e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalForwardingRules/SetTarget.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalForwardingRules.SetTarget +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes target url for forwarding rule. +-- +-- /See:/ for @ComputeGlobalForwardingRulesSetTarget@. +module Compute.GlobalForwardingRules.SetTarget + ( + -- * REST Resource + GlobalForwardingRulesSetTargetAPI + + -- * Creating a Request + , globalForwardingRulesSetTarget + , GlobalForwardingRulesSetTarget + + -- * Request Lenses + , gfrstQuotaUser + , gfrstPrettyPrint + , gfrstProject + , gfrstForwardingRule + , gfrstUserIp + , gfrstKey + , gfrstOauthToken + , gfrstFields + , gfrstAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalForwardingRulesSetTarget@ which the +-- 'GlobalForwardingRulesSetTarget' request conforms to. +type GlobalForwardingRulesSetTargetAPI = + Capture "project" Text :> + "global" :> + "forwardingRules" :> + Capture "forwardingRule" Text :> + "setTarget" :> Post '[JSON] Operation + +-- | Changes target url for forwarding rule. +-- +-- /See:/ 'globalForwardingRulesSetTarget' smart constructor. +data GlobalForwardingRulesSetTarget = GlobalForwardingRulesSetTarget + { _gfrstQuotaUser :: !(Maybe Text) + , _gfrstPrettyPrint :: !Bool + , _gfrstProject :: !Text + , _gfrstForwardingRule :: !Text + , _gfrstUserIp :: !(Maybe Text) + , _gfrstKey :: !(Maybe Text) + , _gfrstOauthToken :: !(Maybe Text) + , _gfrstFields :: !(Maybe Text) + , _gfrstAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalForwardingRulesSetTarget'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gfrstQuotaUser' +-- +-- * 'gfrstPrettyPrint' +-- +-- * 'gfrstProject' +-- +-- * 'gfrstForwardingRule' +-- +-- * 'gfrstUserIp' +-- +-- * 'gfrstKey' +-- +-- * 'gfrstOauthToken' +-- +-- * 'gfrstFields' +-- +-- * 'gfrstAlt' +globalForwardingRulesSetTarget + :: Text -- ^ 'project' + -> Text -- ^ 'forwardingRule' + -> GlobalForwardingRulesSetTarget +globalForwardingRulesSetTarget pGfrstProject_ pGfrstForwardingRule_ = + GlobalForwardingRulesSetTarget + { _gfrstQuotaUser = Nothing + , _gfrstPrettyPrint = True + , _gfrstProject = pGfrstProject_ + , _gfrstForwardingRule = pGfrstForwardingRule_ + , _gfrstUserIp = Nothing + , _gfrstKey = Nothing + , _gfrstOauthToken = Nothing + , _gfrstFields = Nothing + , _gfrstAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gfrstQuotaUser :: Lens' GlobalForwardingRulesSetTarget' (Maybe Text) +gfrstQuotaUser + = lens _gfrstQuotaUser + (\ s a -> s{_gfrstQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gfrstPrettyPrint :: Lens' GlobalForwardingRulesSetTarget' Bool +gfrstPrettyPrint + = lens _gfrstPrettyPrint + (\ s a -> s{_gfrstPrettyPrint = a}) + +-- | Name of the project scoping this request. +gfrstProject :: Lens' GlobalForwardingRulesSetTarget' Text +gfrstProject + = lens _gfrstProject (\ s a -> s{_gfrstProject = a}) + +-- | Name of the ForwardingRule resource in which target is to be set. +gfrstForwardingRule :: Lens' GlobalForwardingRulesSetTarget' Text +gfrstForwardingRule + = lens _gfrstForwardingRule + (\ s a -> s{_gfrstForwardingRule = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gfrstUserIp :: Lens' GlobalForwardingRulesSetTarget' (Maybe Text) +gfrstUserIp + = lens _gfrstUserIp (\ s a -> s{_gfrstUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gfrstKey :: Lens' GlobalForwardingRulesSetTarget' (Maybe Text) +gfrstKey = lens _gfrstKey (\ s a -> s{_gfrstKey = a}) + +-- | OAuth 2.0 token for the current user. +gfrstOauthToken :: Lens' GlobalForwardingRulesSetTarget' (Maybe Text) +gfrstOauthToken + = lens _gfrstOauthToken + (\ s a -> s{_gfrstOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gfrstFields :: Lens' GlobalForwardingRulesSetTarget' (Maybe Text) +gfrstFields + = lens _gfrstFields (\ s a -> s{_gfrstFields = a}) + +-- | Data format for the response. +gfrstAlt :: Lens' GlobalForwardingRulesSetTarget' Text +gfrstAlt = lens _gfrstAlt (\ s a -> s{_gfrstAlt = a}) + +instance GoogleRequest + GlobalForwardingRulesSetTarget' where + type Rs GlobalForwardingRulesSetTarget' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + GlobalForwardingRulesSetTarget{..} + = go _gfrstQuotaUser _gfrstPrettyPrint _gfrstProject + _gfrstForwardingRule + _gfrstUserIp + _gfrstKey + _gfrstOauthToken + _gfrstFields + _gfrstAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalForwardingRulesSetTargetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/AggregatedList.hs new file mode 100644 index 000000000..a43848326 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/AggregatedList.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalOperations.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of all operations grouped by scope. +-- +-- /See:/ for @ComputeGlobalOperationsAggregatedList@. +module Compute.GlobalOperations.AggregatedList + ( + -- * REST Resource + GlobalOperationsAggregatedListAPI + + -- * Creating a Request + , globalOperationsAggregatedList + , GlobalOperationsAggregatedList + + -- * Request Lenses + , goalQuotaUser + , goalPrettyPrint + , goalProject + , goalUserIp + , goalKey + , goalFilter + , goalPageToken + , goalOauthToken + , goalMaxResults + , goalFields + , goalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalOperationsAggregatedList@ which the +-- 'GlobalOperationsAggregatedList' request conforms to. +type GlobalOperationsAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationAggregatedList + +-- | Retrieves the list of all operations grouped by scope. +-- +-- /See:/ 'globalOperationsAggregatedList' smart constructor. +data GlobalOperationsAggregatedList = GlobalOperationsAggregatedList + { _goalQuotaUser :: !(Maybe Text) + , _goalPrettyPrint :: !Bool + , _goalProject :: !Text + , _goalUserIp :: !(Maybe Text) + , _goalKey :: !(Maybe Text) + , _goalFilter :: !(Maybe Text) + , _goalPageToken :: !(Maybe Text) + , _goalOauthToken :: !(Maybe Text) + , _goalMaxResults :: !Word32 + , _goalFields :: !(Maybe Text) + , _goalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalOperationsAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'goalQuotaUser' +-- +-- * 'goalPrettyPrint' +-- +-- * 'goalProject' +-- +-- * 'goalUserIp' +-- +-- * 'goalKey' +-- +-- * 'goalFilter' +-- +-- * 'goalPageToken' +-- +-- * 'goalOauthToken' +-- +-- * 'goalMaxResults' +-- +-- * 'goalFields' +-- +-- * 'goalAlt' +globalOperationsAggregatedList + :: Text -- ^ 'project' + -> GlobalOperationsAggregatedList +globalOperationsAggregatedList pGoalProject_ = + GlobalOperationsAggregatedList + { _goalQuotaUser = Nothing + , _goalPrettyPrint = True + , _goalProject = pGoalProject_ + , _goalUserIp = Nothing + , _goalKey = Nothing + , _goalFilter = Nothing + , _goalPageToken = Nothing + , _goalOauthToken = Nothing + , _goalMaxResults = 500 + , _goalFields = Nothing + , _goalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +goalQuotaUser :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalQuotaUser + = lens _goalQuotaUser + (\ s a -> s{_goalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +goalPrettyPrint :: Lens' GlobalOperationsAggregatedList' Bool +goalPrettyPrint + = lens _goalPrettyPrint + (\ s a -> s{_goalPrettyPrint = a}) + +-- | Project ID for this request. +goalProject :: Lens' GlobalOperationsAggregatedList' Text +goalProject + = lens _goalProject (\ s a -> s{_goalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +goalUserIp :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalUserIp + = lens _goalUserIp (\ s a -> s{_goalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +goalKey :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalKey = lens _goalKey (\ s a -> s{_goalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +goalFilter :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalFilter + = lens _goalFilter (\ s a -> s{_goalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +goalPageToken :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalPageToken + = lens _goalPageToken + (\ s a -> s{_goalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +goalOauthToken :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalOauthToken + = lens _goalOauthToken + (\ s a -> s{_goalOauthToken = a}) + +-- | Maximum count of results to be returned. +goalMaxResults :: Lens' GlobalOperationsAggregatedList' Word32 +goalMaxResults + = lens _goalMaxResults + (\ s a -> s{_goalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +goalFields :: Lens' GlobalOperationsAggregatedList' (Maybe Text) +goalFields + = lens _goalFields (\ s a -> s{_goalFields = a}) + +-- | Data format for the response. +goalAlt :: Lens' GlobalOperationsAggregatedList' Text +goalAlt = lens _goalAlt (\ s a -> s{_goalAlt = a}) + +instance GoogleRequest + GlobalOperationsAggregatedList' where + type Rs GlobalOperationsAggregatedList' = + OperationAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u + GlobalOperationsAggregatedList{..} + = go _goalQuotaUser _goalPrettyPrint _goalProject + _goalUserIp + _goalKey + _goalFilter + _goalPageToken + _goalOauthToken + (Just _goalMaxResults) + _goalFields + _goalAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalOperationsAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Delete.hs new file mode 100644 index 000000000..36bcfe6c6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified Operations resource. +-- +-- /See:/ for @ComputeGlobalOperationsDelete@. +module Compute.GlobalOperations.Delete + ( + -- * REST Resource + GlobalOperationsDeleteAPI + + -- * Creating a Request + , globalOperationsDelete + , GlobalOperationsDelete + + -- * Request Lenses + , godQuotaUser + , godPrettyPrint + , godProject + , godOperation + , godUserIp + , godKey + , godOauthToken + , godFields + , godAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalOperationsDelete@ which the +-- 'GlobalOperationsDelete' request conforms to. +type GlobalOperationsDeleteAPI = + Capture "project" Text :> + "global" :> + "operations" :> + Capture "operation" Text :> Delete '[JSON] () + +-- | Deletes the specified Operations resource. +-- +-- /See:/ 'globalOperationsDelete' smart constructor. +data GlobalOperationsDelete = GlobalOperationsDelete + { _godQuotaUser :: !(Maybe Text) + , _godPrettyPrint :: !Bool + , _godProject :: !Text + , _godOperation :: !Text + , _godUserIp :: !(Maybe Text) + , _godKey :: !(Maybe Text) + , _godOauthToken :: !(Maybe Text) + , _godFields :: !(Maybe Text) + , _godAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'godQuotaUser' +-- +-- * 'godPrettyPrint' +-- +-- * 'godProject' +-- +-- * 'godOperation' +-- +-- * 'godUserIp' +-- +-- * 'godKey' +-- +-- * 'godOauthToken' +-- +-- * 'godFields' +-- +-- * 'godAlt' +globalOperationsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> GlobalOperationsDelete +globalOperationsDelete pGodProject_ pGodOperation_ = + GlobalOperationsDelete + { _godQuotaUser = Nothing + , _godPrettyPrint = True + , _godProject = pGodProject_ + , _godOperation = pGodOperation_ + , _godUserIp = Nothing + , _godKey = Nothing + , _godOauthToken = Nothing + , _godFields = Nothing + , _godAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +godQuotaUser :: Lens' GlobalOperationsDelete' (Maybe Text) +godQuotaUser + = lens _godQuotaUser (\ s a -> s{_godQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +godPrettyPrint :: Lens' GlobalOperationsDelete' Bool +godPrettyPrint + = lens _godPrettyPrint + (\ s a -> s{_godPrettyPrint = a}) + +-- | Project ID for this request. +godProject :: Lens' GlobalOperationsDelete' Text +godProject + = lens _godProject (\ s a -> s{_godProject = a}) + +-- | Name of the Operations resource to delete. +godOperation :: Lens' GlobalOperationsDelete' Text +godOperation + = lens _godOperation (\ s a -> s{_godOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +godUserIp :: Lens' GlobalOperationsDelete' (Maybe Text) +godUserIp + = lens _godUserIp (\ s a -> s{_godUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +godKey :: Lens' GlobalOperationsDelete' (Maybe Text) +godKey = lens _godKey (\ s a -> s{_godKey = a}) + +-- | OAuth 2.0 token for the current user. +godOauthToken :: Lens' GlobalOperationsDelete' (Maybe Text) +godOauthToken + = lens _godOauthToken + (\ s a -> s{_godOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +godFields :: Lens' GlobalOperationsDelete' (Maybe Text) +godFields + = lens _godFields (\ s a -> s{_godFields = a}) + +-- | Data format for the response. +godAlt :: Lens' GlobalOperationsDelete' Text +godAlt = lens _godAlt (\ s a -> s{_godAlt = a}) + +instance GoogleRequest GlobalOperationsDelete' where + type Rs GlobalOperationsDelete' = () + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalOperationsDelete{..} + = go _godQuotaUser _godPrettyPrint _godProject + _godOperation + _godUserIp + _godKey + _godOauthToken + _godFields + _godAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalOperationsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Get.hs new file mode 100644 index 000000000..c0233350d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified Operations resource. +-- +-- /See:/ for @ComputeGlobalOperationsGet@. +module Compute.GlobalOperations.Get + ( + -- * REST Resource + GlobalOperationsGetAPI + + -- * Creating a Request + , globalOperationsGet + , GlobalOperationsGet + + -- * Request Lenses + , gogQuotaUser + , gogPrettyPrint + , gogProject + , gogOperation + , gogUserIp + , gogKey + , gogOauthToken + , gogFields + , gogAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalOperationsGet@ which the +-- 'GlobalOperationsGet' request conforms to. +type GlobalOperationsGetAPI = + Capture "project" Text :> + "global" :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified Operations resource. +-- +-- /See:/ 'globalOperationsGet' smart constructor. +data GlobalOperationsGet = GlobalOperationsGet + { _gogQuotaUser :: !(Maybe Text) + , _gogPrettyPrint :: !Bool + , _gogProject :: !Text + , _gogOperation :: !Text + , _gogUserIp :: !(Maybe Text) + , _gogKey :: !(Maybe Text) + , _gogOauthToken :: !(Maybe Text) + , _gogFields :: !(Maybe Text) + , _gogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gogQuotaUser' +-- +-- * 'gogPrettyPrint' +-- +-- * 'gogProject' +-- +-- * 'gogOperation' +-- +-- * 'gogUserIp' +-- +-- * 'gogKey' +-- +-- * 'gogOauthToken' +-- +-- * 'gogFields' +-- +-- * 'gogAlt' +globalOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> GlobalOperationsGet +globalOperationsGet pGogProject_ pGogOperation_ = + GlobalOperationsGet + { _gogQuotaUser = Nothing + , _gogPrettyPrint = True + , _gogProject = pGogProject_ + , _gogOperation = pGogOperation_ + , _gogUserIp = Nothing + , _gogKey = Nothing + , _gogOauthToken = Nothing + , _gogFields = Nothing + , _gogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gogQuotaUser :: Lens' GlobalOperationsGet' (Maybe Text) +gogQuotaUser + = lens _gogQuotaUser (\ s a -> s{_gogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gogPrettyPrint :: Lens' GlobalOperationsGet' Bool +gogPrettyPrint + = lens _gogPrettyPrint + (\ s a -> s{_gogPrettyPrint = a}) + +-- | Project ID for this request. +gogProject :: Lens' GlobalOperationsGet' Text +gogProject + = lens _gogProject (\ s a -> s{_gogProject = a}) + +-- | Name of the Operations resource to return. +gogOperation :: Lens' GlobalOperationsGet' Text +gogOperation + = lens _gogOperation (\ s a -> s{_gogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gogUserIp :: Lens' GlobalOperationsGet' (Maybe Text) +gogUserIp + = lens _gogUserIp (\ s a -> s{_gogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gogKey :: Lens' GlobalOperationsGet' (Maybe Text) +gogKey = lens _gogKey (\ s a -> s{_gogKey = a}) + +-- | OAuth 2.0 token for the current user. +gogOauthToken :: Lens' GlobalOperationsGet' (Maybe Text) +gogOauthToken + = lens _gogOauthToken + (\ s a -> s{_gogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gogFields :: Lens' GlobalOperationsGet' (Maybe Text) +gogFields + = lens _gogFields (\ s a -> s{_gogFields = a}) + +-- | Data format for the response. +gogAlt :: Lens' GlobalOperationsGet' Text +gogAlt = lens _gogAlt (\ s a -> s{_gogAlt = a}) + +instance GoogleRequest GlobalOperationsGet' where + type Rs GlobalOperationsGet' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalOperationsGet{..} + = go _gogQuotaUser _gogPrettyPrint _gogProject + _gogOperation + _gogUserIp + _gogKey + _gogOauthToken + _gogFields + _gogAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalOperationsGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/List.hs new file mode 100644 index 000000000..ffd89cabc --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/List.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.GlobalOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Operation resources contained within the specified +-- project. +-- +-- /See:/ for @ComputeGlobalOperationsList@. +module Compute.GlobalOperations.List + ( + -- * REST Resource + GlobalOperationsListAPI + + -- * Creating a Request + , globalOperationsList + , GlobalOperationsList + + -- * Request Lenses + , golQuotaUser + , golPrettyPrint + , golProject + , golUserIp + , golKey + , golFilter + , golPageToken + , golOauthToken + , golMaxResults + , golFields + , golAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeGlobalOperationsList@ which the +-- 'GlobalOperationsList' request conforms to. +type GlobalOperationsListAPI = + Capture "project" Text :> + "global" :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of Operation resources contained within the specified +-- project. +-- +-- /See:/ 'globalOperationsList' smart constructor. +data GlobalOperationsList = GlobalOperationsList + { _golQuotaUser :: !(Maybe Text) + , _golPrettyPrint :: !Bool + , _golProject :: !Text + , _golUserIp :: !(Maybe Text) + , _golKey :: !(Maybe Text) + , _golFilter :: !(Maybe Text) + , _golPageToken :: !(Maybe Text) + , _golOauthToken :: !(Maybe Text) + , _golMaxResults :: !Word32 + , _golFields :: !(Maybe Text) + , _golAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GlobalOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'golQuotaUser' +-- +-- * 'golPrettyPrint' +-- +-- * 'golProject' +-- +-- * 'golUserIp' +-- +-- * 'golKey' +-- +-- * 'golFilter' +-- +-- * 'golPageToken' +-- +-- * 'golOauthToken' +-- +-- * 'golMaxResults' +-- +-- * 'golFields' +-- +-- * 'golAlt' +globalOperationsList + :: Text -- ^ 'project' + -> GlobalOperationsList +globalOperationsList pGolProject_ = + GlobalOperationsList + { _golQuotaUser = Nothing + , _golPrettyPrint = True + , _golProject = pGolProject_ + , _golUserIp = Nothing + , _golKey = Nothing + , _golFilter = Nothing + , _golPageToken = Nothing + , _golOauthToken = Nothing + , _golMaxResults = 500 + , _golFields = Nothing + , _golAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +golQuotaUser :: Lens' GlobalOperationsList' (Maybe Text) +golQuotaUser + = lens _golQuotaUser (\ s a -> s{_golQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +golPrettyPrint :: Lens' GlobalOperationsList' Bool +golPrettyPrint + = lens _golPrettyPrint + (\ s a -> s{_golPrettyPrint = a}) + +-- | Project ID for this request. +golProject :: Lens' GlobalOperationsList' Text +golProject + = lens _golProject (\ s a -> s{_golProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +golUserIp :: Lens' GlobalOperationsList' (Maybe Text) +golUserIp + = lens _golUserIp (\ s a -> s{_golUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +golKey :: Lens' GlobalOperationsList' (Maybe Text) +golKey = lens _golKey (\ s a -> s{_golKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +golFilter :: Lens' GlobalOperationsList' (Maybe Text) +golFilter + = lens _golFilter (\ s a -> s{_golFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +golPageToken :: Lens' GlobalOperationsList' (Maybe Text) +golPageToken + = lens _golPageToken (\ s a -> s{_golPageToken = a}) + +-- | OAuth 2.0 token for the current user. +golOauthToken :: Lens' GlobalOperationsList' (Maybe Text) +golOauthToken + = lens _golOauthToken + (\ s a -> s{_golOauthToken = a}) + +-- | Maximum count of results to be returned. +golMaxResults :: Lens' GlobalOperationsList' Word32 +golMaxResults + = lens _golMaxResults + (\ s a -> s{_golMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +golFields :: Lens' GlobalOperationsList' (Maybe Text) +golFields + = lens _golFields (\ s a -> s{_golFields = a}) + +-- | Data format for the response. +golAlt :: Lens' GlobalOperationsList' Text +golAlt = lens _golAlt (\ s a -> s{_golAlt = a}) + +instance GoogleRequest GlobalOperationsList' where + type Rs GlobalOperationsList' = OperationList + request = requestWithRoute defReq computeURL + requestWithRoute r u GlobalOperationsList{..} + = go _golQuotaUser _golPrettyPrint _golProject + _golUserIp + _golKey + _golFilter + _golPageToken + _golOauthToken + (Just _golMaxResults) + _golFields + _golAlt + where go + = clientWithRoute + (Proxy :: Proxy GlobalOperationsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Delete.hs new file mode 100644 index 000000000..8598a67a6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Delete.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified HttpHealthCheck resource. +-- +-- /See:/ for @ComputeHTTPHealthChecksDelete@. +module Compute.HTTPHealthChecks.Delete + ( + -- * REST Resource + HttpHealthChecksDeleteAPI + + -- * Creating a Request + , hTTPHealthChecksDelete + , HTTPHealthChecksDelete + + -- * Request Lenses + , httphcdQuotaUser + , httphcdPrettyPrint + , httphcdProject + , httphcdUserIp + , httphcdKey + , httphcdHttpHealthCheck + , httphcdOauthToken + , httphcdFields + , httphcdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksDelete@ which the +-- 'HTTPHealthChecksDelete' request conforms to. +type HttpHealthChecksDeleteAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> + Capture "httpHealthCheck" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified HttpHealthCheck resource. +-- +-- /See:/ 'hTTPHealthChecksDelete' smart constructor. +data HTTPHealthChecksDelete = HTTPHealthChecksDelete + { _httphcdQuotaUser :: !(Maybe Text) + , _httphcdPrettyPrint :: !Bool + , _httphcdProject :: !Text + , _httphcdUserIp :: !(Maybe Text) + , _httphcdKey :: !(Maybe Text) + , _httphcdHttpHealthCheck :: !Text + , _httphcdOauthToken :: !(Maybe Text) + , _httphcdFields :: !(Maybe Text) + , _httphcdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphcdQuotaUser' +-- +-- * 'httphcdPrettyPrint' +-- +-- * 'httphcdProject' +-- +-- * 'httphcdUserIp' +-- +-- * 'httphcdKey' +-- +-- * 'httphcdHttpHealthCheck' +-- +-- * 'httphcdOauthToken' +-- +-- * 'httphcdFields' +-- +-- * 'httphcdAlt' +hTTPHealthChecksDelete + :: Text -- ^ 'project' + -> Text -- ^ 'httpHealthCheck' + -> HTTPHealthChecksDelete +hTTPHealthChecksDelete pHttphcdProject_ pHttphcdHttpHealthCheck_ = + HTTPHealthChecksDelete + { _httphcdQuotaUser = Nothing + , _httphcdPrettyPrint = True + , _httphcdProject = pHttphcdProject_ + , _httphcdUserIp = Nothing + , _httphcdKey = Nothing + , _httphcdHttpHealthCheck = pHttphcdHttpHealthCheck_ + , _httphcdOauthToken = Nothing + , _httphcdFields = Nothing + , _httphcdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphcdQuotaUser :: Lens' HTTPHealthChecksDelete' (Maybe Text) +httphcdQuotaUser + = lens _httphcdQuotaUser + (\ s a -> s{_httphcdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphcdPrettyPrint :: Lens' HTTPHealthChecksDelete' Bool +httphcdPrettyPrint + = lens _httphcdPrettyPrint + (\ s a -> s{_httphcdPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphcdProject :: Lens' HTTPHealthChecksDelete' Text +httphcdProject + = lens _httphcdProject + (\ s a -> s{_httphcdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphcdUserIp :: Lens' HTTPHealthChecksDelete' (Maybe Text) +httphcdUserIp + = lens _httphcdUserIp + (\ s a -> s{_httphcdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphcdKey :: Lens' HTTPHealthChecksDelete' (Maybe Text) +httphcdKey + = lens _httphcdKey (\ s a -> s{_httphcdKey = a}) + +-- | Name of the HttpHealthCheck resource to delete. +httphcdHttpHealthCheck :: Lens' HTTPHealthChecksDelete' Text +httphcdHttpHealthCheck + = lens _httphcdHttpHealthCheck + (\ s a -> s{_httphcdHttpHealthCheck = a}) + +-- | OAuth 2.0 token for the current user. +httphcdOauthToken :: Lens' HTTPHealthChecksDelete' (Maybe Text) +httphcdOauthToken + = lens _httphcdOauthToken + (\ s a -> s{_httphcdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +httphcdFields :: Lens' HTTPHealthChecksDelete' (Maybe Text) +httphcdFields + = lens _httphcdFields + (\ s a -> s{_httphcdFields = a}) + +-- | Data format for the response. +httphcdAlt :: Lens' HTTPHealthChecksDelete' Text +httphcdAlt + = lens _httphcdAlt (\ s a -> s{_httphcdAlt = a}) + +instance GoogleRequest HTTPHealthChecksDelete' where + type Rs HTTPHealthChecksDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksDelete{..} + = go _httphcdQuotaUser _httphcdPrettyPrint + _httphcdProject + _httphcdUserIp + _httphcdKey + _httphcdHttpHealthCheck + _httphcdOauthToken + _httphcdFields + _httphcdAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Get.hs new file mode 100644 index 000000000..f3c19da2e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified HttpHealthCheck resource. +-- +-- /See:/ for @ComputeHTTPHealthChecksGet@. +module Compute.HTTPHealthChecks.Get + ( + -- * REST Resource + HttpHealthChecksGetAPI + + -- * Creating a Request + , hTTPHealthChecksGet + , HTTPHealthChecksGet + + -- * Request Lenses + , httphcgQuotaUser + , httphcgPrettyPrint + , httphcgProject + , httphcgUserIp + , httphcgKey + , httphcgHttpHealthCheck + , httphcgOauthToken + , httphcgFields + , httphcgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksGet@ which the +-- 'HTTPHealthChecksGet' request conforms to. +type HttpHealthChecksGetAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> + Capture "httpHealthCheck" Text :> + Get '[JSON] HTTPHealthCheck + +-- | Returns the specified HttpHealthCheck resource. +-- +-- /See:/ 'hTTPHealthChecksGet' smart constructor. +data HTTPHealthChecksGet = HTTPHealthChecksGet + { _httphcgQuotaUser :: !(Maybe Text) + , _httphcgPrettyPrint :: !Bool + , _httphcgProject :: !Text + , _httphcgUserIp :: !(Maybe Text) + , _httphcgKey :: !(Maybe Text) + , _httphcgHttpHealthCheck :: !Text + , _httphcgOauthToken :: !(Maybe Text) + , _httphcgFields :: !(Maybe Text) + , _httphcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphcgQuotaUser' +-- +-- * 'httphcgPrettyPrint' +-- +-- * 'httphcgProject' +-- +-- * 'httphcgUserIp' +-- +-- * 'httphcgKey' +-- +-- * 'httphcgHttpHealthCheck' +-- +-- * 'httphcgOauthToken' +-- +-- * 'httphcgFields' +-- +-- * 'httphcgAlt' +hTTPHealthChecksGet + :: Text -- ^ 'project' + -> Text -- ^ 'httpHealthCheck' + -> HTTPHealthChecksGet +hTTPHealthChecksGet pHttphcgProject_ pHttphcgHttpHealthCheck_ = + HTTPHealthChecksGet + { _httphcgQuotaUser = Nothing + , _httphcgPrettyPrint = True + , _httphcgProject = pHttphcgProject_ + , _httphcgUserIp = Nothing + , _httphcgKey = Nothing + , _httphcgHttpHealthCheck = pHttphcgHttpHealthCheck_ + , _httphcgOauthToken = Nothing + , _httphcgFields = Nothing + , _httphcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphcgQuotaUser :: Lens' HTTPHealthChecksGet' (Maybe Text) +httphcgQuotaUser + = lens _httphcgQuotaUser + (\ s a -> s{_httphcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphcgPrettyPrint :: Lens' HTTPHealthChecksGet' Bool +httphcgPrettyPrint + = lens _httphcgPrettyPrint + (\ s a -> s{_httphcgPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphcgProject :: Lens' HTTPHealthChecksGet' Text +httphcgProject + = lens _httphcgProject + (\ s a -> s{_httphcgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphcgUserIp :: Lens' HTTPHealthChecksGet' (Maybe Text) +httphcgUserIp + = lens _httphcgUserIp + (\ s a -> s{_httphcgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphcgKey :: Lens' HTTPHealthChecksGet' (Maybe Text) +httphcgKey + = lens _httphcgKey (\ s a -> s{_httphcgKey = a}) + +-- | Name of the HttpHealthCheck resource to return. +httphcgHttpHealthCheck :: Lens' HTTPHealthChecksGet' Text +httphcgHttpHealthCheck + = lens _httphcgHttpHealthCheck + (\ s a -> s{_httphcgHttpHealthCheck = a}) + +-- | OAuth 2.0 token for the current user. +httphcgOauthToken :: Lens' HTTPHealthChecksGet' (Maybe Text) +httphcgOauthToken + = lens _httphcgOauthToken + (\ s a -> s{_httphcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +httphcgFields :: Lens' HTTPHealthChecksGet' (Maybe Text) +httphcgFields + = lens _httphcgFields + (\ s a -> s{_httphcgFields = a}) + +-- | Data format for the response. +httphcgAlt :: Lens' HTTPHealthChecksGet' Text +httphcgAlt + = lens _httphcgAlt (\ s a -> s{_httphcgAlt = a}) + +instance GoogleRequest HTTPHealthChecksGet' where + type Rs HTTPHealthChecksGet' = HTTPHealthCheck + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksGet{..} + = go _httphcgQuotaUser _httphcgPrettyPrint + _httphcgProject + _httphcgUserIp + _httphcgKey + _httphcgHttpHealthCheck + _httphcgOauthToken + _httphcgFields + _httphcgAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Insert.hs new file mode 100644 index 000000000..533a6df64 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Insert.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a HttpHealthCheck resource in the specified project using the +-- data included in the request. +-- +-- /See:/ for @ComputeHTTPHealthChecksInsert@. +module Compute.HTTPHealthChecks.Insert + ( + -- * REST Resource + HttpHealthChecksInsertAPI + + -- * Creating a Request + , hTTPHealthChecksInsert + , HTTPHealthChecksInsert + + -- * Request Lenses + , httphciQuotaUser + , httphciPrettyPrint + , httphciProject + , httphciUserIp + , httphciKey + , httphciOauthToken + , httphciFields + , httphciAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksInsert@ which the +-- 'HTTPHealthChecksInsert' request conforms to. +type HttpHealthChecksInsertAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> Post '[JSON] Operation + +-- | Creates a HttpHealthCheck resource in the specified project using the +-- data included in the request. +-- +-- /See:/ 'hTTPHealthChecksInsert' smart constructor. +data HTTPHealthChecksInsert = HTTPHealthChecksInsert + { _httphciQuotaUser :: !(Maybe Text) + , _httphciPrettyPrint :: !Bool + , _httphciProject :: !Text + , _httphciUserIp :: !(Maybe Text) + , _httphciKey :: !(Maybe Text) + , _httphciOauthToken :: !(Maybe Text) + , _httphciFields :: !(Maybe Text) + , _httphciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphciQuotaUser' +-- +-- * 'httphciPrettyPrint' +-- +-- * 'httphciProject' +-- +-- * 'httphciUserIp' +-- +-- * 'httphciKey' +-- +-- * 'httphciOauthToken' +-- +-- * 'httphciFields' +-- +-- * 'httphciAlt' +hTTPHealthChecksInsert + :: Text -- ^ 'project' + -> HTTPHealthChecksInsert +hTTPHealthChecksInsert pHttphciProject_ = + HTTPHealthChecksInsert + { _httphciQuotaUser = Nothing + , _httphciPrettyPrint = True + , _httphciProject = pHttphciProject_ + , _httphciUserIp = Nothing + , _httphciKey = Nothing + , _httphciOauthToken = Nothing + , _httphciFields = Nothing + , _httphciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphciQuotaUser :: Lens' HTTPHealthChecksInsert' (Maybe Text) +httphciQuotaUser + = lens _httphciQuotaUser + (\ s a -> s{_httphciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphciPrettyPrint :: Lens' HTTPHealthChecksInsert' Bool +httphciPrettyPrint + = lens _httphciPrettyPrint + (\ s a -> s{_httphciPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphciProject :: Lens' HTTPHealthChecksInsert' Text +httphciProject + = lens _httphciProject + (\ s a -> s{_httphciProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphciUserIp :: Lens' HTTPHealthChecksInsert' (Maybe Text) +httphciUserIp + = lens _httphciUserIp + (\ s a -> s{_httphciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphciKey :: Lens' HTTPHealthChecksInsert' (Maybe Text) +httphciKey + = lens _httphciKey (\ s a -> s{_httphciKey = a}) + +-- | OAuth 2.0 token for the current user. +httphciOauthToken :: Lens' HTTPHealthChecksInsert' (Maybe Text) +httphciOauthToken + = lens _httphciOauthToken + (\ s a -> s{_httphciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +httphciFields :: Lens' HTTPHealthChecksInsert' (Maybe Text) +httphciFields + = lens _httphciFields + (\ s a -> s{_httphciFields = a}) + +-- | Data format for the response. +httphciAlt :: Lens' HTTPHealthChecksInsert' Text +httphciAlt + = lens _httphciAlt (\ s a -> s{_httphciAlt = a}) + +instance GoogleRequest HTTPHealthChecksInsert' where + type Rs HTTPHealthChecksInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksInsert{..} + = go _httphciQuotaUser _httphciPrettyPrint + _httphciProject + _httphciUserIp + _httphciKey + _httphciOauthToken + _httphciFields + _httphciAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/List.hs new file mode 100644 index 000000000..6b235d858 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/List.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of HttpHealthCheck resources available to the +-- specified project. +-- +-- /See:/ for @ComputeHTTPHealthChecksList@. +module Compute.HTTPHealthChecks.List + ( + -- * REST Resource + HttpHealthChecksListAPI + + -- * Creating a Request + , hTTPHealthChecksList + , HTTPHealthChecksList + + -- * Request Lenses + , httphclQuotaUser + , httphclPrettyPrint + , httphclProject + , httphclUserIp + , httphclKey + , httphclFilter + , httphclPageToken + , httphclOauthToken + , httphclMaxResults + , httphclFields + , httphclAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksList@ which the +-- 'HTTPHealthChecksList' request conforms to. +type HttpHealthChecksListAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] HTTPHealthCheckList + +-- | Retrieves the list of HttpHealthCheck resources available to the +-- specified project. +-- +-- /See:/ 'hTTPHealthChecksList' smart constructor. +data HTTPHealthChecksList = HTTPHealthChecksList + { _httphclQuotaUser :: !(Maybe Text) + , _httphclPrettyPrint :: !Bool + , _httphclProject :: !Text + , _httphclUserIp :: !(Maybe Text) + , _httphclKey :: !(Maybe Text) + , _httphclFilter :: !(Maybe Text) + , _httphclPageToken :: !(Maybe Text) + , _httphclOauthToken :: !(Maybe Text) + , _httphclMaxResults :: !Word32 + , _httphclFields :: !(Maybe Text) + , _httphclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphclQuotaUser' +-- +-- * 'httphclPrettyPrint' +-- +-- * 'httphclProject' +-- +-- * 'httphclUserIp' +-- +-- * 'httphclKey' +-- +-- * 'httphclFilter' +-- +-- * 'httphclPageToken' +-- +-- * 'httphclOauthToken' +-- +-- * 'httphclMaxResults' +-- +-- * 'httphclFields' +-- +-- * 'httphclAlt' +hTTPHealthChecksList + :: Text -- ^ 'project' + -> HTTPHealthChecksList +hTTPHealthChecksList pHttphclProject_ = + HTTPHealthChecksList + { _httphclQuotaUser = Nothing + , _httphclPrettyPrint = True + , _httphclProject = pHttphclProject_ + , _httphclUserIp = Nothing + , _httphclKey = Nothing + , _httphclFilter = Nothing + , _httphclPageToken = Nothing + , _httphclOauthToken = Nothing + , _httphclMaxResults = 500 + , _httphclFields = Nothing + , _httphclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphclQuotaUser :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclQuotaUser + = lens _httphclQuotaUser + (\ s a -> s{_httphclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphclPrettyPrint :: Lens' HTTPHealthChecksList' Bool +httphclPrettyPrint + = lens _httphclPrettyPrint + (\ s a -> s{_httphclPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphclProject :: Lens' HTTPHealthChecksList' Text +httphclProject + = lens _httphclProject + (\ s a -> s{_httphclProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphclUserIp :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclUserIp + = lens _httphclUserIp + (\ s a -> s{_httphclUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphclKey :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclKey + = lens _httphclKey (\ s a -> s{_httphclKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +httphclFilter :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclFilter + = lens _httphclFilter + (\ s a -> s{_httphclFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +httphclPageToken :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclPageToken + = lens _httphclPageToken + (\ s a -> s{_httphclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +httphclOauthToken :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclOauthToken + = lens _httphclOauthToken + (\ s a -> s{_httphclOauthToken = a}) + +-- | Maximum count of results to be returned. +httphclMaxResults :: Lens' HTTPHealthChecksList' Word32 +httphclMaxResults + = lens _httphclMaxResults + (\ s a -> s{_httphclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +httphclFields :: Lens' HTTPHealthChecksList' (Maybe Text) +httphclFields + = lens _httphclFields + (\ s a -> s{_httphclFields = a}) + +-- | Data format for the response. +httphclAlt :: Lens' HTTPHealthChecksList' Text +httphclAlt + = lens _httphclAlt (\ s a -> s{_httphclAlt = a}) + +instance GoogleRequest HTTPHealthChecksList' where + type Rs HTTPHealthChecksList' = HTTPHealthCheckList + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksList{..} + = go _httphclQuotaUser _httphclPrettyPrint + _httphclProject + _httphclUserIp + _httphclKey + _httphclFilter + _httphclPageToken + _httphclOauthToken + (Just _httphclMaxResults) + _httphclFields + _httphclAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Patch.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Patch.hs new file mode 100644 index 000000000..491e190a2 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Patch.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a HttpHealthCheck resource in the specified project using the +-- data included in the request. This method supports patch semantics. +-- +-- /See:/ for @ComputeHTTPHealthChecksPatch@. +module Compute.HTTPHealthChecks.Patch + ( + -- * REST Resource + HttpHealthChecksPatchAPI + + -- * Creating a Request + , hTTPHealthChecksPatch + , HTTPHealthChecksPatch + + -- * Request Lenses + , httphcpQuotaUser + , httphcpPrettyPrint + , httphcpProject + , httphcpUserIp + , httphcpKey + , httphcpHttpHealthCheck + , httphcpOauthToken + , httphcpFields + , httphcpAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksPatch@ which the +-- 'HTTPHealthChecksPatch' request conforms to. +type HttpHealthChecksPatchAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> + Capture "httpHealthCheck" Text :> + Patch '[JSON] Operation + +-- | Updates a HttpHealthCheck resource in the specified project using the +-- data included in the request. This method supports patch semantics. +-- +-- /See:/ 'hTTPHealthChecksPatch' smart constructor. +data HTTPHealthChecksPatch = HTTPHealthChecksPatch + { _httphcpQuotaUser :: !(Maybe Text) + , _httphcpPrettyPrint :: !Bool + , _httphcpProject :: !Text + , _httphcpUserIp :: !(Maybe Text) + , _httphcpKey :: !(Maybe Text) + , _httphcpHttpHealthCheck :: !Text + , _httphcpOauthToken :: !(Maybe Text) + , _httphcpFields :: !(Maybe Text) + , _httphcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphcpQuotaUser' +-- +-- * 'httphcpPrettyPrint' +-- +-- * 'httphcpProject' +-- +-- * 'httphcpUserIp' +-- +-- * 'httphcpKey' +-- +-- * 'httphcpHttpHealthCheck' +-- +-- * 'httphcpOauthToken' +-- +-- * 'httphcpFields' +-- +-- * 'httphcpAlt' +hTTPHealthChecksPatch + :: Text -- ^ 'project' + -> Text -- ^ 'httpHealthCheck' + -> HTTPHealthChecksPatch +hTTPHealthChecksPatch pHttphcpProject_ pHttphcpHttpHealthCheck_ = + HTTPHealthChecksPatch + { _httphcpQuotaUser = Nothing + , _httphcpPrettyPrint = True + , _httphcpProject = pHttphcpProject_ + , _httphcpUserIp = Nothing + , _httphcpKey = Nothing + , _httphcpHttpHealthCheck = pHttphcpHttpHealthCheck_ + , _httphcpOauthToken = Nothing + , _httphcpFields = Nothing + , _httphcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphcpQuotaUser :: Lens' HTTPHealthChecksPatch' (Maybe Text) +httphcpQuotaUser + = lens _httphcpQuotaUser + (\ s a -> s{_httphcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphcpPrettyPrint :: Lens' HTTPHealthChecksPatch' Bool +httphcpPrettyPrint + = lens _httphcpPrettyPrint + (\ s a -> s{_httphcpPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphcpProject :: Lens' HTTPHealthChecksPatch' Text +httphcpProject + = lens _httphcpProject + (\ s a -> s{_httphcpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphcpUserIp :: Lens' HTTPHealthChecksPatch' (Maybe Text) +httphcpUserIp + = lens _httphcpUserIp + (\ s a -> s{_httphcpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphcpKey :: Lens' HTTPHealthChecksPatch' (Maybe Text) +httphcpKey + = lens _httphcpKey (\ s a -> s{_httphcpKey = a}) + +-- | Name of the HttpHealthCheck resource to update. +httphcpHttpHealthCheck :: Lens' HTTPHealthChecksPatch' Text +httphcpHttpHealthCheck + = lens _httphcpHttpHealthCheck + (\ s a -> s{_httphcpHttpHealthCheck = a}) + +-- | OAuth 2.0 token for the current user. +httphcpOauthToken :: Lens' HTTPHealthChecksPatch' (Maybe Text) +httphcpOauthToken + = lens _httphcpOauthToken + (\ s a -> s{_httphcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +httphcpFields :: Lens' HTTPHealthChecksPatch' (Maybe Text) +httphcpFields + = lens _httphcpFields + (\ s a -> s{_httphcpFields = a}) + +-- | Data format for the response. +httphcpAlt :: Lens' HTTPHealthChecksPatch' Text +httphcpAlt + = lens _httphcpAlt (\ s a -> s{_httphcpAlt = a}) + +instance GoogleRequest HTTPHealthChecksPatch' where + type Rs HTTPHealthChecksPatch' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksPatch{..} + = go _httphcpQuotaUser _httphcpPrettyPrint + _httphcpProject + _httphcpUserIp + _httphcpKey + _httphcpHttpHealthCheck + _httphcpOauthToken + _httphcpFields + _httphcpAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksPatchAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Update.hs b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Update.hs new file mode 100644 index 000000000..e02a44f04 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/Update.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.HTTPHealthChecks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a HttpHealthCheck resource in the specified project using the +-- data included in the request. +-- +-- /See:/ for @ComputeHTTPHealthChecksUpdate@. +module Compute.HTTPHealthChecks.Update + ( + -- * REST Resource + HttpHealthChecksUpdateAPI + + -- * Creating a Request + , hTTPHealthChecksUpdate + , HTTPHealthChecksUpdate + + -- * Request Lenses + , httphcuQuotaUser + , httphcuPrettyPrint + , httphcuProject + , httphcuUserIp + , httphcuKey + , httphcuHttpHealthCheck + , httphcuOauthToken + , httphcuFields + , httphcuAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeHTTPHealthChecksUpdate@ which the +-- 'HTTPHealthChecksUpdate' request conforms to. +type HttpHealthChecksUpdateAPI = + Capture "project" Text :> + "global" :> + "httpHealthChecks" :> + Capture "httpHealthCheck" Text :> + Put '[JSON] Operation + +-- | Updates a HttpHealthCheck resource in the specified project using the +-- data included in the request. +-- +-- /See:/ 'hTTPHealthChecksUpdate' smart constructor. +data HTTPHealthChecksUpdate = HTTPHealthChecksUpdate + { _httphcuQuotaUser :: !(Maybe Text) + , _httphcuPrettyPrint :: !Bool + , _httphcuProject :: !Text + , _httphcuUserIp :: !(Maybe Text) + , _httphcuKey :: !(Maybe Text) + , _httphcuHttpHealthCheck :: !Text + , _httphcuOauthToken :: !(Maybe Text) + , _httphcuFields :: !(Maybe Text) + , _httphcuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPHealthChecksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httphcuQuotaUser' +-- +-- * 'httphcuPrettyPrint' +-- +-- * 'httphcuProject' +-- +-- * 'httphcuUserIp' +-- +-- * 'httphcuKey' +-- +-- * 'httphcuHttpHealthCheck' +-- +-- * 'httphcuOauthToken' +-- +-- * 'httphcuFields' +-- +-- * 'httphcuAlt' +hTTPHealthChecksUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'httpHealthCheck' + -> HTTPHealthChecksUpdate +hTTPHealthChecksUpdate pHttphcuProject_ pHttphcuHttpHealthCheck_ = + HTTPHealthChecksUpdate + { _httphcuQuotaUser = Nothing + , _httphcuPrettyPrint = True + , _httphcuProject = pHttphcuProject_ + , _httphcuUserIp = Nothing + , _httphcuKey = Nothing + , _httphcuHttpHealthCheck = pHttphcuHttpHealthCheck_ + , _httphcuOauthToken = Nothing + , _httphcuFields = Nothing + , _httphcuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +httphcuQuotaUser :: Lens' HTTPHealthChecksUpdate' (Maybe Text) +httphcuQuotaUser + = lens _httphcuQuotaUser + (\ s a -> s{_httphcuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +httphcuPrettyPrint :: Lens' HTTPHealthChecksUpdate' Bool +httphcuPrettyPrint + = lens _httphcuPrettyPrint + (\ s a -> s{_httphcuPrettyPrint = a}) + +-- | Name of the project scoping this request. +httphcuProject :: Lens' HTTPHealthChecksUpdate' Text +httphcuProject + = lens _httphcuProject + (\ s a -> s{_httphcuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +httphcuUserIp :: Lens' HTTPHealthChecksUpdate' (Maybe Text) +httphcuUserIp + = lens _httphcuUserIp + (\ s a -> s{_httphcuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +httphcuKey :: Lens' HTTPHealthChecksUpdate' (Maybe Text) +httphcuKey + = lens _httphcuKey (\ s a -> s{_httphcuKey = a}) + +-- | Name of the HttpHealthCheck resource to update. +httphcuHttpHealthCheck :: Lens' HTTPHealthChecksUpdate' Text +httphcuHttpHealthCheck + = lens _httphcuHttpHealthCheck + (\ s a -> s{_httphcuHttpHealthCheck = a}) + +-- | OAuth 2.0 token for the current user. +httphcuOauthToken :: Lens' HTTPHealthChecksUpdate' (Maybe Text) +httphcuOauthToken + = lens _httphcuOauthToken + (\ s a -> s{_httphcuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +httphcuFields :: Lens' HTTPHealthChecksUpdate' (Maybe Text) +httphcuFields + = lens _httphcuFields + (\ s a -> s{_httphcuFields = a}) + +-- | Data format for the response. +httphcuAlt :: Lens' HTTPHealthChecksUpdate' Text +httphcuAlt + = lens _httphcuAlt (\ s a -> s{_httphcuAlt = a}) + +instance GoogleRequest HTTPHealthChecksUpdate' where + type Rs HTTPHealthChecksUpdate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u HTTPHealthChecksUpdate{..} + = go _httphcuQuotaUser _httphcuPrettyPrint + _httphcuProject + _httphcuUserIp + _httphcuKey + _httphcuHttpHealthCheck + _httphcuOauthToken + _httphcuFields + _httphcuAlt + where go + = clientWithRoute + (Proxy :: Proxy HttpHealthChecksUpdateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Images/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Delete.hs new file mode 100644 index 000000000..d9a43a7ee --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Delete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Images.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified image resource. +-- +-- /See:/ for @ComputeImagesDelete@. +module Compute.Images.Delete + ( + -- * REST Resource + ImagesDeleteAPI + + -- * Creating a Request + , imagesDelete + , ImagesDelete + + -- * Request Lenses + , iQuotaUser + , iImage + , iPrettyPrint + , iProject + , iUserIp + , iKey + , iOauthToken + , iFields + , iAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeImagesDelete@ which the +-- 'ImagesDelete' request conforms to. +type ImagesDeleteAPI = + Capture "project" Text :> + "global" :> + "images" :> + Capture "image" Text :> Delete '[JSON] Operation + +-- | Deletes the specified image resource. +-- +-- /See:/ 'imagesDelete' smart constructor. +data ImagesDelete = ImagesDelete + { _iQuotaUser :: !(Maybe Text) + , _iImage :: !Text + , _iPrettyPrint :: !Bool + , _iProject :: !Text + , _iUserIp :: !(Maybe Text) + , _iKey :: !(Maybe Text) + , _iOauthToken :: !(Maybe Text) + , _iFields :: !(Maybe Text) + , _iAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iQuotaUser' +-- +-- * 'iImage' +-- +-- * 'iPrettyPrint' +-- +-- * 'iProject' +-- +-- * 'iUserIp' +-- +-- * 'iKey' +-- +-- * 'iOauthToken' +-- +-- * 'iFields' +-- +-- * 'iAlt' +imagesDelete + :: Text -- ^ 'image' + -> Text -- ^ 'project' + -> ImagesDelete +imagesDelete pIImage_ pIProject_ = + ImagesDelete + { _iQuotaUser = Nothing + , _iImage = pIImage_ + , _iPrettyPrint = True + , _iProject = pIProject_ + , _iUserIp = Nothing + , _iKey = Nothing + , _iOauthToken = Nothing + , _iFields = Nothing + , _iAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iQuotaUser :: Lens' ImagesDelete' (Maybe Text) +iQuotaUser + = lens _iQuotaUser (\ s a -> s{_iQuotaUser = a}) + +-- | Name of the image resource to delete. +iImage :: Lens' ImagesDelete' Text +iImage = lens _iImage (\ s a -> s{_iImage = a}) + +-- | Returns response with indentations and line breaks. +iPrettyPrint :: Lens' ImagesDelete' Bool +iPrettyPrint + = lens _iPrettyPrint (\ s a -> s{_iPrettyPrint = a}) + +-- | Project ID for this request. +iProject :: Lens' ImagesDelete' Text +iProject = lens _iProject (\ s a -> s{_iProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iUserIp :: Lens' ImagesDelete' (Maybe Text) +iUserIp = lens _iUserIp (\ s a -> s{_iUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iKey :: Lens' ImagesDelete' (Maybe Text) +iKey = lens _iKey (\ s a -> s{_iKey = a}) + +-- | OAuth 2.0 token for the current user. +iOauthToken :: Lens' ImagesDelete' (Maybe Text) +iOauthToken + = lens _iOauthToken (\ s a -> s{_iOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iFields :: Lens' ImagesDelete' (Maybe Text) +iFields = lens _iFields (\ s a -> s{_iFields = a}) + +-- | Data format for the response. +iAlt :: Lens' ImagesDelete' Text +iAlt = lens _iAlt (\ s a -> s{_iAlt = a}) + +instance GoogleRequest ImagesDelete' where + type Rs ImagesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ImagesDelete{..} + = go _iQuotaUser _iImage _iPrettyPrint _iProject + _iUserIp + _iKey + _iOauthToken + _iFields + _iAlt + where go + = clientWithRoute (Proxy :: Proxy ImagesDeleteAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Images/Deprecate.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Deprecate.hs new file mode 100644 index 000000000..e561125ae --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Deprecate.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Images.Deprecate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the deprecation status of an image. If an empty request body is +-- given, clears the deprecation status instead. +-- +-- /See:/ for @ComputeImagesDeprecate@. +module Compute.Images.Deprecate + ( + -- * REST Resource + ImagesDeprecateAPI + + -- * Creating a Request + , imagesDeprecate + , ImagesDeprecate + + -- * Request Lenses + , idQuotaUser + , idImage + , idPrettyPrint + , idProject + , idUserIp + , idKey + , idOauthToken + , idFields + , idAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeImagesDeprecate@ which the +-- 'ImagesDeprecate' request conforms to. +type ImagesDeprecateAPI = + Capture "project" Text :> + "global" :> + "images" :> + Capture "image" Text :> + "deprecate" :> Post '[JSON] Operation + +-- | Sets the deprecation status of an image. If an empty request body is +-- given, clears the deprecation status instead. +-- +-- /See:/ 'imagesDeprecate' smart constructor. +data ImagesDeprecate = ImagesDeprecate + { _idQuotaUser :: !(Maybe Text) + , _idImage :: !Text + , _idPrettyPrint :: !Bool + , _idProject :: !Text + , _idUserIp :: !(Maybe Text) + , _idKey :: !(Maybe Text) + , _idOauthToken :: !(Maybe Text) + , _idFields :: !(Maybe Text) + , _idAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesDeprecate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idQuotaUser' +-- +-- * 'idImage' +-- +-- * 'idPrettyPrint' +-- +-- * 'idProject' +-- +-- * 'idUserIp' +-- +-- * 'idKey' +-- +-- * 'idOauthToken' +-- +-- * 'idFields' +-- +-- * 'idAlt' +imagesDeprecate + :: Text -- ^ 'image' + -> Text -- ^ 'project' + -> ImagesDeprecate +imagesDeprecate pIdImage_ pIdProject_ = + ImagesDeprecate + { _idQuotaUser = Nothing + , _idImage = pIdImage_ + , _idPrettyPrint = True + , _idProject = pIdProject_ + , _idUserIp = Nothing + , _idKey = Nothing + , _idOauthToken = Nothing + , _idFields = Nothing + , _idAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +idQuotaUser :: Lens' ImagesDeprecate' (Maybe Text) +idQuotaUser + = lens _idQuotaUser (\ s a -> s{_idQuotaUser = a}) + +-- | Image name. +idImage :: Lens' ImagesDeprecate' Text +idImage = lens _idImage (\ s a -> s{_idImage = a}) + +-- | Returns response with indentations and line breaks. +idPrettyPrint :: Lens' ImagesDeprecate' Bool +idPrettyPrint + = lens _idPrettyPrint + (\ s a -> s{_idPrettyPrint = a}) + +-- | Project ID for this request. +idProject :: Lens' ImagesDeprecate' Text +idProject + = lens _idProject (\ s a -> s{_idProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +idUserIp :: Lens' ImagesDeprecate' (Maybe Text) +idUserIp = lens _idUserIp (\ s a -> s{_idUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idKey :: Lens' ImagesDeprecate' (Maybe Text) +idKey = lens _idKey (\ s a -> s{_idKey = a}) + +-- | OAuth 2.0 token for the current user. +idOauthToken :: Lens' ImagesDeprecate' (Maybe Text) +idOauthToken + = lens _idOauthToken (\ s a -> s{_idOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +idFields :: Lens' ImagesDeprecate' (Maybe Text) +idFields = lens _idFields (\ s a -> s{_idFields = a}) + +-- | Data format for the response. +idAlt :: Lens' ImagesDeprecate' Text +idAlt = lens _idAlt (\ s a -> s{_idAlt = a}) + +instance GoogleRequest ImagesDeprecate' where + type Rs ImagesDeprecate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ImagesDeprecate{..} + = go _idQuotaUser _idImage _idPrettyPrint _idProject + _idUserIp + _idKey + _idOauthToken + _idFields + _idAlt + where go + = clientWithRoute (Proxy :: Proxy ImagesDeprecateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Images/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Get.hs new file mode 100644 index 000000000..6873d0619 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Images.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified image resource. +-- +-- /See:/ for @ComputeImagesGet@. +module Compute.Images.Get + ( + -- * REST Resource + ImagesGetAPI + + -- * Creating a Request + , imagesGet + , ImagesGet + + -- * Request Lenses + , igQuotaUser + , igImage + , igPrettyPrint + , igProject + , igUserIp + , igKey + , igOauthToken + , igFields + , igAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeImagesGet@ which the +-- 'ImagesGet' request conforms to. +type ImagesGetAPI = + Capture "project" Text :> + "global" :> + "images" :> Capture "image" Text :> Get '[JSON] Image + +-- | Returns the specified image resource. +-- +-- /See:/ 'imagesGet' smart constructor. +data ImagesGet = ImagesGet + { _igQuotaUser :: !(Maybe Text) + , _igImage :: !Text + , _igPrettyPrint :: !Bool + , _igProject :: !Text + , _igUserIp :: !(Maybe Text) + , _igKey :: !(Maybe Text) + , _igOauthToken :: !(Maybe Text) + , _igFields :: !(Maybe Text) + , _igAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igQuotaUser' +-- +-- * 'igImage' +-- +-- * 'igPrettyPrint' +-- +-- * 'igProject' +-- +-- * 'igUserIp' +-- +-- * 'igKey' +-- +-- * 'igOauthToken' +-- +-- * 'igFields' +-- +-- * 'igAlt' +imagesGet + :: Text -- ^ 'image' + -> Text -- ^ 'project' + -> ImagesGet +imagesGet pIgImage_ pIgProject_ = + ImagesGet + { _igQuotaUser = Nothing + , _igImage = pIgImage_ + , _igPrettyPrint = True + , _igProject = pIgProject_ + , _igUserIp = Nothing + , _igKey = Nothing + , _igOauthToken = Nothing + , _igFields = Nothing + , _igAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igQuotaUser :: Lens' ImagesGet' (Maybe Text) +igQuotaUser + = lens _igQuotaUser (\ s a -> s{_igQuotaUser = a}) + +-- | Name of the image resource to return. +igImage :: Lens' ImagesGet' Text +igImage = lens _igImage (\ s a -> s{_igImage = a}) + +-- | Returns response with indentations and line breaks. +igPrettyPrint :: Lens' ImagesGet' Bool +igPrettyPrint + = lens _igPrettyPrint + (\ s a -> s{_igPrettyPrint = a}) + +-- | Project ID for this request. +igProject :: Lens' ImagesGet' Text +igProject + = lens _igProject (\ s a -> s{_igProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igUserIp :: Lens' ImagesGet' (Maybe Text) +igUserIp = lens _igUserIp (\ s a -> s{_igUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igKey :: Lens' ImagesGet' (Maybe Text) +igKey = lens _igKey (\ s a -> s{_igKey = a}) + +-- | OAuth 2.0 token for the current user. +igOauthToken :: Lens' ImagesGet' (Maybe Text) +igOauthToken + = lens _igOauthToken (\ s a -> s{_igOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igFields :: Lens' ImagesGet' (Maybe Text) +igFields = lens _igFields (\ s a -> s{_igFields = a}) + +-- | Data format for the response. +igAlt :: Lens' ImagesGet' Text +igAlt = lens _igAlt (\ s a -> s{_igAlt = a}) + +instance GoogleRequest ImagesGet' where + type Rs ImagesGet' = Image + request = requestWithRoute defReq computeURL + requestWithRoute r u ImagesGet{..} + = go _igQuotaUser _igImage _igPrettyPrint _igProject + _igUserIp + _igKey + _igOauthToken + _igFields + _igAlt + where go + = clientWithRoute (Proxy :: Proxy ImagesGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Images/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Insert.hs new file mode 100644 index 000000000..62a596710 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Images/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Images.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an image resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeImagesInsert@. +module Compute.Images.Insert + ( + -- * REST Resource + ImagesInsertAPI + + -- * Creating a Request + , imagesInsert + , ImagesInsert + + -- * Request Lenses + , iiQuotaUser + , iiPrettyPrint + , iiProject + , iiUserIp + , iiKey + , iiOauthToken + , iiFields + , iiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeImagesInsert@ which the +-- 'ImagesInsert' request conforms to. +type ImagesInsertAPI = + Capture "project" Text :> + "global" :> "images" :> Post '[JSON] Operation + +-- | Creates an image resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'imagesInsert' smart constructor. +data ImagesInsert = ImagesInsert + { _iiQuotaUser :: !(Maybe Text) + , _iiPrettyPrint :: !Bool + , _iiProject :: !Text + , _iiUserIp :: !(Maybe Text) + , _iiKey :: !(Maybe Text) + , _iiOauthToken :: !(Maybe Text) + , _iiFields :: !(Maybe Text) + , _iiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiQuotaUser' +-- +-- * 'iiPrettyPrint' +-- +-- * 'iiProject' +-- +-- * 'iiUserIp' +-- +-- * 'iiKey' +-- +-- * 'iiOauthToken' +-- +-- * 'iiFields' +-- +-- * 'iiAlt' +imagesInsert + :: Text -- ^ 'project' + -> ImagesInsert +imagesInsert pIiProject_ = + ImagesInsert + { _iiQuotaUser = Nothing + , _iiPrettyPrint = True + , _iiProject = pIiProject_ + , _iiUserIp = Nothing + , _iiKey = Nothing + , _iiOauthToken = Nothing + , _iiFields = Nothing + , _iiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iiQuotaUser :: Lens' ImagesInsert' (Maybe Text) +iiQuotaUser + = lens _iiQuotaUser (\ s a -> s{_iiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iiPrettyPrint :: Lens' ImagesInsert' Bool +iiPrettyPrint + = lens _iiPrettyPrint + (\ s a -> s{_iiPrettyPrint = a}) + +-- | Project ID for this request. +iiProject :: Lens' ImagesInsert' Text +iiProject + = lens _iiProject (\ s a -> s{_iiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iiUserIp :: Lens' ImagesInsert' (Maybe Text) +iiUserIp = lens _iiUserIp (\ s a -> s{_iiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iiKey :: Lens' ImagesInsert' (Maybe Text) +iiKey = lens _iiKey (\ s a -> s{_iiKey = a}) + +-- | OAuth 2.0 token for the current user. +iiOauthToken :: Lens' ImagesInsert' (Maybe Text) +iiOauthToken + = lens _iiOauthToken (\ s a -> s{_iiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iiFields :: Lens' ImagesInsert' (Maybe Text) +iiFields = lens _iiFields (\ s a -> s{_iiFields = a}) + +-- | Data format for the response. +iiAlt :: Lens' ImagesInsert' Text +iiAlt = lens _iiAlt (\ s a -> s{_iiAlt = a}) + +instance GoogleRequest ImagesInsert' where + type Rs ImagesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ImagesInsert{..} + = go _iiQuotaUser _iiPrettyPrint _iiProject _iiUserIp + _iiKey + _iiOauthToken + _iiFields + _iiAlt + where go + = clientWithRoute (Proxy :: Proxy ImagesInsertAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Images/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Images/List.hs new file mode 100644 index 000000000..ff426b247 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Images/List.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Images.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of image resources available to the specified +-- project. +-- +-- /See:/ for @ComputeImagesList@. +module Compute.Images.List + ( + -- * REST Resource + ImagesListAPI + + -- * Creating a Request + , imagesList + , ImagesList + + -- * Request Lenses + , ilQuotaUser + , ilPrettyPrint + , ilProject + , ilUserIp + , ilKey + , ilFilter + , ilPageToken + , ilOauthToken + , ilMaxResults + , ilFields + , ilAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeImagesList@ which the +-- 'ImagesList' request conforms to. +type ImagesListAPI = + Capture "project" Text :> + "global" :> + "images" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ImageList + +-- | Retrieves the list of image resources available to the specified +-- project. +-- +-- /See:/ 'imagesList' smart constructor. +data ImagesList = ImagesList + { _ilQuotaUser :: !(Maybe Text) + , _ilPrettyPrint :: !Bool + , _ilProject :: !Text + , _ilUserIp :: !(Maybe Text) + , _ilKey :: !(Maybe Text) + , _ilFilter :: !(Maybe Text) + , _ilPageToken :: !(Maybe Text) + , _ilOauthToken :: !(Maybe Text) + , _ilMaxResults :: !Word32 + , _ilFields :: !(Maybe Text) + , _ilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilQuotaUser' +-- +-- * 'ilPrettyPrint' +-- +-- * 'ilProject' +-- +-- * 'ilUserIp' +-- +-- * 'ilKey' +-- +-- * 'ilFilter' +-- +-- * 'ilPageToken' +-- +-- * 'ilOauthToken' +-- +-- * 'ilMaxResults' +-- +-- * 'ilFields' +-- +-- * 'ilAlt' +imagesList + :: Text -- ^ 'project' + -> ImagesList +imagesList pIlProject_ = + ImagesList + { _ilQuotaUser = Nothing + , _ilPrettyPrint = True + , _ilProject = pIlProject_ + , _ilUserIp = Nothing + , _ilKey = Nothing + , _ilFilter = Nothing + , _ilPageToken = Nothing + , _ilOauthToken = Nothing + , _ilMaxResults = 500 + , _ilFields = Nothing + , _ilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ilQuotaUser :: Lens' ImagesList' (Maybe Text) +ilQuotaUser + = lens _ilQuotaUser (\ s a -> s{_ilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ilPrettyPrint :: Lens' ImagesList' Bool +ilPrettyPrint + = lens _ilPrettyPrint + (\ s a -> s{_ilPrettyPrint = a}) + +-- | Project ID for this request. +ilProject :: Lens' ImagesList' Text +ilProject + = lens _ilProject (\ s a -> s{_ilProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ilUserIp :: Lens' ImagesList' (Maybe Text) +ilUserIp = lens _ilUserIp (\ s a -> s{_ilUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ilKey :: Lens' ImagesList' (Maybe Text) +ilKey = lens _ilKey (\ s a -> s{_ilKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +ilFilter :: Lens' ImagesList' (Maybe Text) +ilFilter = lens _ilFilter (\ s a -> s{_ilFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +ilPageToken :: Lens' ImagesList' (Maybe Text) +ilPageToken + = lens _ilPageToken (\ s a -> s{_ilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ilOauthToken :: Lens' ImagesList' (Maybe Text) +ilOauthToken + = lens _ilOauthToken (\ s a -> s{_ilOauthToken = a}) + +-- | Maximum count of results to be returned. +ilMaxResults :: Lens' ImagesList' Word32 +ilMaxResults + = lens _ilMaxResults (\ s a -> s{_ilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ilFields :: Lens' ImagesList' (Maybe Text) +ilFields = lens _ilFields (\ s a -> s{_ilFields = a}) + +-- | Data format for the response. +ilAlt :: Lens' ImagesList' Text +ilAlt = lens _ilAlt (\ s a -> s{_ilAlt = a}) + +instance GoogleRequest ImagesList' where + type Rs ImagesList' = ImageList + request = requestWithRoute defReq computeURL + requestWithRoute r u ImagesList{..} + = go _ilQuotaUser _ilPrettyPrint _ilProject _ilUserIp + _ilKey + _ilFilter + _ilPageToken + _ilOauthToken + (Just _ilMaxResults) + _ilFields + _ilAlt + where go + = clientWithRoute (Proxy :: Proxy ImagesListAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AbandonInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AbandonInstances.hs new file mode 100644 index 000000000..13797523d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AbandonInstances.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.AbandonInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the specified instances from the managed instance group, and +-- from any target pools where they are a member. The instances are not +-- deleted. The managed instance group automatically reduces its targetSize +-- value by the number of instances that you abandon from the group. +-- +-- /See:/ for @ComputeInstanceGroupManagersAbandonInstances@. +module Compute.InstanceGroupManagers.AbandonInstances + ( + -- * REST Resource + InstanceGroupManagersAbandonInstancesAPI + + -- * Creating a Request + , instanceGroupManagersAbandonInstances + , InstanceGroupManagersAbandonInstances + + -- * Request Lenses + , igmaiQuotaUser + , igmaiPrettyPrint + , igmaiProject + , igmaiInstanceGroupManager + , igmaiUserIp + , igmaiZone + , igmaiKey + , igmaiOauthToken + , igmaiFields + , igmaiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersAbandonInstances@ which the +-- 'InstanceGroupManagersAbandonInstances' request conforms to. +type InstanceGroupManagersAbandonInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "abandonInstances" :> Post '[JSON] Operation + +-- | Removes the specified instances from the managed instance group, and +-- from any target pools where they are a member. The instances are not +-- deleted. The managed instance group automatically reduces its targetSize +-- value by the number of instances that you abandon from the group. +-- +-- /See:/ 'instanceGroupManagersAbandonInstances' smart constructor. +data InstanceGroupManagersAbandonInstances = InstanceGroupManagersAbandonInstances + { _igmaiQuotaUser :: !(Maybe Text) + , _igmaiPrettyPrint :: !Bool + , _igmaiProject :: !Text + , _igmaiInstanceGroupManager :: !Text + , _igmaiUserIp :: !(Maybe Text) + , _igmaiZone :: !Text + , _igmaiKey :: !(Maybe Text) + , _igmaiOauthToken :: !(Maybe Text) + , _igmaiFields :: !(Maybe Text) + , _igmaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersAbandonInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmaiQuotaUser' +-- +-- * 'igmaiPrettyPrint' +-- +-- * 'igmaiProject' +-- +-- * 'igmaiInstanceGroupManager' +-- +-- * 'igmaiUserIp' +-- +-- * 'igmaiZone' +-- +-- * 'igmaiKey' +-- +-- * 'igmaiOauthToken' +-- +-- * 'igmaiFields' +-- +-- * 'igmaiAlt' +instanceGroupManagersAbandonInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersAbandonInstances +instanceGroupManagersAbandonInstances pIgmaiProject_ pIgmaiInstanceGroupManager_ pIgmaiZone_ = + InstanceGroupManagersAbandonInstances + { _igmaiQuotaUser = Nothing + , _igmaiPrettyPrint = True + , _igmaiProject = pIgmaiProject_ + , _igmaiInstanceGroupManager = pIgmaiInstanceGroupManager_ + , _igmaiUserIp = Nothing + , _igmaiZone = pIgmaiZone_ + , _igmaiKey = Nothing + , _igmaiOauthToken = Nothing + , _igmaiFields = Nothing + , _igmaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmaiQuotaUser :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiQuotaUser + = lens _igmaiQuotaUser + (\ s a -> s{_igmaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmaiPrettyPrint :: Lens' InstanceGroupManagersAbandonInstances' Bool +igmaiPrettyPrint + = lens _igmaiPrettyPrint + (\ s a -> s{_igmaiPrettyPrint = a}) + +-- | The project ID for this request. +igmaiProject :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiProject + = lens _igmaiProject (\ s a -> s{_igmaiProject = a}) + +-- | The name of the instance group manager. +igmaiInstanceGroupManager :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiInstanceGroupManager + = lens _igmaiInstanceGroupManager + (\ s a -> s{_igmaiInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmaiUserIp :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiUserIp + = lens _igmaiUserIp (\ s a -> s{_igmaiUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmaiZone :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiZone + = lens _igmaiZone (\ s a -> s{_igmaiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmaiKey :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiKey = lens _igmaiKey (\ s a -> s{_igmaiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmaiOauthToken :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiOauthToken + = lens _igmaiOauthToken + (\ s a -> s{_igmaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmaiFields :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiFields + = lens _igmaiFields (\ s a -> s{_igmaiFields = a}) + +-- | Data format for the response. +igmaiAlt :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiAlt = lens _igmaiAlt (\ s a -> s{_igmaiAlt = a}) + +instance GoogleRequest + InstanceGroupManagersAbandonInstances' where + type Rs InstanceGroupManagersAbandonInstances' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersAbandonInstances{..} + = go _igmaiQuotaUser _igmaiPrettyPrint _igmaiProject + _igmaiInstanceGroupManager + _igmaiUserIp + _igmaiZone + _igmaiKey + _igmaiOauthToken + _igmaiFields + _igmaiAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersAbandonInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AggregatedList.hs new file mode 100644 index 000000000..35c213b5c --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/AggregatedList.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of managed instance groups, and groups them by +-- project and zone. +-- +-- /See:/ for @ComputeInstanceGroupManagersAggregatedList@. +module Compute.InstanceGroupManagers.AggregatedList + ( + -- * REST Resource + InstanceGroupManagersAggregatedListAPI + + -- * Creating a Request + , instanceGroupManagersAggregatedList + , InstanceGroupManagersAggregatedList + + -- * Request Lenses + , igmalQuotaUser + , igmalPrettyPrint + , igmalProject + , igmalUserIp + , igmalKey + , igmalFilter + , igmalPageToken + , igmalOauthToken + , igmalMaxResults + , igmalFields + , igmalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersAggregatedList@ which the +-- 'InstanceGroupManagersAggregatedList' request conforms to. +type InstanceGroupManagersAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "instanceGroupManagers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceGroupManagerAggregatedList + +-- | Retrieves the list of managed instance groups, and groups them by +-- project and zone. +-- +-- /See:/ 'instanceGroupManagersAggregatedList' smart constructor. +data InstanceGroupManagersAggregatedList = InstanceGroupManagersAggregatedList + { _igmalQuotaUser :: !(Maybe Text) + , _igmalPrettyPrint :: !Bool + , _igmalProject :: !Text + , _igmalUserIp :: !(Maybe Text) + , _igmalKey :: !(Maybe Text) + , _igmalFilter :: !(Maybe Text) + , _igmalPageToken :: !(Maybe Text) + , _igmalOauthToken :: !(Maybe Text) + , _igmalMaxResults :: !Word32 + , _igmalFields :: !(Maybe Text) + , _igmalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmalQuotaUser' +-- +-- * 'igmalPrettyPrint' +-- +-- * 'igmalProject' +-- +-- * 'igmalUserIp' +-- +-- * 'igmalKey' +-- +-- * 'igmalFilter' +-- +-- * 'igmalPageToken' +-- +-- * 'igmalOauthToken' +-- +-- * 'igmalMaxResults' +-- +-- * 'igmalFields' +-- +-- * 'igmalAlt' +instanceGroupManagersAggregatedList + :: Text -- ^ 'project' + -> InstanceGroupManagersAggregatedList +instanceGroupManagersAggregatedList pIgmalProject_ = + InstanceGroupManagersAggregatedList + { _igmalQuotaUser = Nothing + , _igmalPrettyPrint = True + , _igmalProject = pIgmalProject_ + , _igmalUserIp = Nothing + , _igmalKey = Nothing + , _igmalFilter = Nothing + , _igmalPageToken = Nothing + , _igmalOauthToken = Nothing + , _igmalMaxResults = 500 + , _igmalFields = Nothing + , _igmalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmalQuotaUser :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalQuotaUser + = lens _igmalQuotaUser + (\ s a -> s{_igmalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmalPrettyPrint :: Lens' InstanceGroupManagersAggregatedList' Bool +igmalPrettyPrint + = lens _igmalPrettyPrint + (\ s a -> s{_igmalPrettyPrint = a}) + +-- | The project ID for this request. +igmalProject :: Lens' InstanceGroupManagersAggregatedList' Text +igmalProject + = lens _igmalProject (\ s a -> s{_igmalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmalUserIp :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalUserIp + = lens _igmalUserIp (\ s a -> s{_igmalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmalKey :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalKey = lens _igmalKey (\ s a -> s{_igmalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +igmalFilter :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalFilter + = lens _igmalFilter (\ s a -> s{_igmalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +igmalPageToken :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalPageToken + = lens _igmalPageToken + (\ s a -> s{_igmalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +igmalOauthToken :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalOauthToken + = lens _igmalOauthToken + (\ s a -> s{_igmalOauthToken = a}) + +-- | Maximum count of results to be returned. +igmalMaxResults :: Lens' InstanceGroupManagersAggregatedList' Word32 +igmalMaxResults + = lens _igmalMaxResults + (\ s a -> s{_igmalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +igmalFields :: Lens' InstanceGroupManagersAggregatedList' (Maybe Text) +igmalFields + = lens _igmalFields (\ s a -> s{_igmalFields = a}) + +-- | Data format for the response. +igmalAlt :: Lens' InstanceGroupManagersAggregatedList' Text +igmalAlt = lens _igmalAlt (\ s a -> s{_igmalAlt = a}) + +instance GoogleRequest + InstanceGroupManagersAggregatedList' where + type Rs InstanceGroupManagersAggregatedList' = + InstanceGroupManagerAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersAggregatedList{..} + = go _igmalQuotaUser _igmalPrettyPrint _igmalProject + _igmalUserIp + _igmalKey + _igmalFilter + _igmalPageToken + _igmalOauthToken + (Just _igmalMaxResults) + _igmalFields + _igmalAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Delete.hs new file mode 100644 index 000000000..b56143249 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Delete.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified managed instance group resource. +-- +-- /See:/ for @ComputeInstanceGroupManagersDelete@. +module Compute.InstanceGroupManagers.Delete + ( + -- * REST Resource + InstanceGroupManagersDeleteAPI + + -- * Creating a Request + , instanceGroupManagersDelete + , InstanceGroupManagersDelete + + -- * Request Lenses + , igmdQuotaUser + , igmdPrettyPrint + , igmdProject + , igmdInstanceGroupManager + , igmdUserIp + , igmdZone + , igmdKey + , igmdOauthToken + , igmdFields + , igmdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersDelete@ which the +-- 'InstanceGroupManagersDelete' request conforms to. +type InstanceGroupManagersDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified managed instance group resource. +-- +-- /See:/ 'instanceGroupManagersDelete' smart constructor. +data InstanceGroupManagersDelete = InstanceGroupManagersDelete + { _igmdQuotaUser :: !(Maybe Text) + , _igmdPrettyPrint :: !Bool + , _igmdProject :: !Text + , _igmdInstanceGroupManager :: !Text + , _igmdUserIp :: !(Maybe Text) + , _igmdZone :: !Text + , _igmdKey :: !(Maybe Text) + , _igmdOauthToken :: !(Maybe Text) + , _igmdFields :: !(Maybe Text) + , _igmdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdQuotaUser' +-- +-- * 'igmdPrettyPrint' +-- +-- * 'igmdProject' +-- +-- * 'igmdInstanceGroupManager' +-- +-- * 'igmdUserIp' +-- +-- * 'igmdZone' +-- +-- * 'igmdKey' +-- +-- * 'igmdOauthToken' +-- +-- * 'igmdFields' +-- +-- * 'igmdAlt' +instanceGroupManagersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersDelete +instanceGroupManagersDelete pIgmdProject_ pIgmdInstanceGroupManager_ pIgmdZone_ = + InstanceGroupManagersDelete + { _igmdQuotaUser = Nothing + , _igmdPrettyPrint = True + , _igmdProject = pIgmdProject_ + , _igmdInstanceGroupManager = pIgmdInstanceGroupManager_ + , _igmdUserIp = Nothing + , _igmdZone = pIgmdZone_ + , _igmdKey = Nothing + , _igmdOauthToken = Nothing + , _igmdFields = Nothing + , _igmdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmdQuotaUser :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdQuotaUser + = lens _igmdQuotaUser + (\ s a -> s{_igmdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmdPrettyPrint :: Lens' InstanceGroupManagersDelete' Bool +igmdPrettyPrint + = lens _igmdPrettyPrint + (\ s a -> s{_igmdPrettyPrint = a}) + +-- | The project ID for this request. +igmdProject :: Lens' InstanceGroupManagersDelete' Text +igmdProject + = lens _igmdProject (\ s a -> s{_igmdProject = a}) + +-- | The name of the instance group manager to delete. +igmdInstanceGroupManager :: Lens' InstanceGroupManagersDelete' Text +igmdInstanceGroupManager + = lens _igmdInstanceGroupManager + (\ s a -> s{_igmdInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmdUserIp :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdUserIp + = lens _igmdUserIp (\ s a -> s{_igmdUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmdZone :: Lens' InstanceGroupManagersDelete' Text +igmdZone = lens _igmdZone (\ s a -> s{_igmdZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmdKey :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdKey = lens _igmdKey (\ s a -> s{_igmdKey = a}) + +-- | OAuth 2.0 token for the current user. +igmdOauthToken :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdOauthToken + = lens _igmdOauthToken + (\ s a -> s{_igmdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmdFields :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdFields + = lens _igmdFields (\ s a -> s{_igmdFields = a}) + +-- | Data format for the response. +igmdAlt :: Lens' InstanceGroupManagersDelete' Text +igmdAlt = lens _igmdAlt (\ s a -> s{_igmdAlt = a}) + +instance GoogleRequest InstanceGroupManagersDelete' + where + type Rs InstanceGroupManagersDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupManagersDelete{..} + = go _igmdQuotaUser _igmdPrettyPrint _igmdProject + _igmdInstanceGroupManager + _igmdUserIp + _igmdZone + _igmdKey + _igmdOauthToken + _igmdFields + _igmdAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/DeleteInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/DeleteInstances.hs new file mode 100644 index 000000000..45cce0043 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/DeleteInstances.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.DeleteInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified instances. The instances are deleted and removed +-- from the instance group and any target pools where they are a member. +-- The managed instance group automatically reduces its targetSize value by +-- the number of instances that you delete. +-- +-- /See:/ for @ComputeInstanceGroupManagersDeleteInstances@. +module Compute.InstanceGroupManagers.DeleteInstances + ( + -- * REST Resource + InstanceGroupManagersDeleteInstancesAPI + + -- * Creating a Request + , instanceGroupManagersDeleteInstances + , InstanceGroupManagersDeleteInstances + + -- * Request Lenses + , igmdiQuotaUser + , igmdiPrettyPrint + , igmdiProject + , igmdiInstanceGroupManager + , igmdiUserIp + , igmdiZone + , igmdiKey + , igmdiOauthToken + , igmdiFields + , igmdiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersDeleteInstances@ which the +-- 'InstanceGroupManagersDeleteInstances' request conforms to. +type InstanceGroupManagersDeleteInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "deleteInstances" :> Post '[JSON] Operation + +-- | Deletes the specified instances. The instances are deleted and removed +-- from the instance group and any target pools where they are a member. +-- The managed instance group automatically reduces its targetSize value by +-- the number of instances that you delete. +-- +-- /See:/ 'instanceGroupManagersDeleteInstances' smart constructor. +data InstanceGroupManagersDeleteInstances = InstanceGroupManagersDeleteInstances + { _igmdiQuotaUser :: !(Maybe Text) + , _igmdiPrettyPrint :: !Bool + , _igmdiProject :: !Text + , _igmdiInstanceGroupManager :: !Text + , _igmdiUserIp :: !(Maybe Text) + , _igmdiZone :: !Text + , _igmdiKey :: !(Maybe Text) + , _igmdiOauthToken :: !(Maybe Text) + , _igmdiFields :: !(Maybe Text) + , _igmdiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDeleteInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdiQuotaUser' +-- +-- * 'igmdiPrettyPrint' +-- +-- * 'igmdiProject' +-- +-- * 'igmdiInstanceGroupManager' +-- +-- * 'igmdiUserIp' +-- +-- * 'igmdiZone' +-- +-- * 'igmdiKey' +-- +-- * 'igmdiOauthToken' +-- +-- * 'igmdiFields' +-- +-- * 'igmdiAlt' +instanceGroupManagersDeleteInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersDeleteInstances +instanceGroupManagersDeleteInstances pIgmdiProject_ pIgmdiInstanceGroupManager_ pIgmdiZone_ = + InstanceGroupManagersDeleteInstances + { _igmdiQuotaUser = Nothing + , _igmdiPrettyPrint = True + , _igmdiProject = pIgmdiProject_ + , _igmdiInstanceGroupManager = pIgmdiInstanceGroupManager_ + , _igmdiUserIp = Nothing + , _igmdiZone = pIgmdiZone_ + , _igmdiKey = Nothing + , _igmdiOauthToken = Nothing + , _igmdiFields = Nothing + , _igmdiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmdiQuotaUser :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiQuotaUser + = lens _igmdiQuotaUser + (\ s a -> s{_igmdiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmdiPrettyPrint :: Lens' InstanceGroupManagersDeleteInstances' Bool +igmdiPrettyPrint + = lens _igmdiPrettyPrint + (\ s a -> s{_igmdiPrettyPrint = a}) + +-- | The project ID for this request. +igmdiProject :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiProject + = lens _igmdiProject (\ s a -> s{_igmdiProject = a}) + +-- | The name of the instance group manager. +igmdiInstanceGroupManager :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiInstanceGroupManager + = lens _igmdiInstanceGroupManager + (\ s a -> s{_igmdiInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmdiUserIp :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiUserIp + = lens _igmdiUserIp (\ s a -> s{_igmdiUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmdiZone :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiZone + = lens _igmdiZone (\ s a -> s{_igmdiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmdiKey :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiKey = lens _igmdiKey (\ s a -> s{_igmdiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmdiOauthToken :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiOauthToken + = lens _igmdiOauthToken + (\ s a -> s{_igmdiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmdiFields :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiFields + = lens _igmdiFields (\ s a -> s{_igmdiFields = a}) + +-- | Data format for the response. +igmdiAlt :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiAlt = lens _igmdiAlt (\ s a -> s{_igmdiAlt = a}) + +instance GoogleRequest + InstanceGroupManagersDeleteInstances' where + type Rs InstanceGroupManagersDeleteInstances' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersDeleteInstances{..} + = go _igmdiQuotaUser _igmdiPrettyPrint _igmdiProject + _igmdiInstanceGroupManager + _igmdiUserIp + _igmdiZone + _igmdiKey + _igmdiOauthToken + _igmdiFields + _igmdiAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersDeleteInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Get.hs new file mode 100644 index 000000000..f28fea1c8 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified managed instance group resource. +-- +-- /See:/ for @ComputeInstanceGroupManagersGet@. +module Compute.InstanceGroupManagers.Get + ( + -- * REST Resource + InstanceGroupManagersGetAPI + + -- * Creating a Request + , instanceGroupManagersGet + , InstanceGroupManagersGet + + -- * Request Lenses + , igmgQuotaUser + , igmgPrettyPrint + , igmgProject + , igmgInstanceGroupManager + , igmgUserIp + , igmgZone + , igmgKey + , igmgOauthToken + , igmgFields + , igmgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersGet@ which the +-- 'InstanceGroupManagersGet' request conforms to. +type InstanceGroupManagersGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + Get '[JSON] InstanceGroupManager + +-- | Returns the specified managed instance group resource. +-- +-- /See:/ 'instanceGroupManagersGet' smart constructor. +data InstanceGroupManagersGet = InstanceGroupManagersGet + { _igmgQuotaUser :: !(Maybe Text) + , _igmgPrettyPrint :: !Bool + , _igmgProject :: !Text + , _igmgInstanceGroupManager :: !Text + , _igmgUserIp :: !(Maybe Text) + , _igmgZone :: !Text + , _igmgKey :: !(Maybe Text) + , _igmgOauthToken :: !(Maybe Text) + , _igmgFields :: !(Maybe Text) + , _igmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmgQuotaUser' +-- +-- * 'igmgPrettyPrint' +-- +-- * 'igmgProject' +-- +-- * 'igmgInstanceGroupManager' +-- +-- * 'igmgUserIp' +-- +-- * 'igmgZone' +-- +-- * 'igmgKey' +-- +-- * 'igmgOauthToken' +-- +-- * 'igmgFields' +-- +-- * 'igmgAlt' +instanceGroupManagersGet + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersGet +instanceGroupManagersGet pIgmgProject_ pIgmgInstanceGroupManager_ pIgmgZone_ = + InstanceGroupManagersGet + { _igmgQuotaUser = Nothing + , _igmgPrettyPrint = True + , _igmgProject = pIgmgProject_ + , _igmgInstanceGroupManager = pIgmgInstanceGroupManager_ + , _igmgUserIp = Nothing + , _igmgZone = pIgmgZone_ + , _igmgKey = Nothing + , _igmgOauthToken = Nothing + , _igmgFields = Nothing + , _igmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmgQuotaUser :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgQuotaUser + = lens _igmgQuotaUser + (\ s a -> s{_igmgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmgPrettyPrint :: Lens' InstanceGroupManagersGet' Bool +igmgPrettyPrint + = lens _igmgPrettyPrint + (\ s a -> s{_igmgPrettyPrint = a}) + +-- | The project ID for this request. +igmgProject :: Lens' InstanceGroupManagersGet' Text +igmgProject + = lens _igmgProject (\ s a -> s{_igmgProject = a}) + +-- | The name of the instance group manager resource. +igmgInstanceGroupManager :: Lens' InstanceGroupManagersGet' Text +igmgInstanceGroupManager + = lens _igmgInstanceGroupManager + (\ s a -> s{_igmgInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmgUserIp :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgUserIp + = lens _igmgUserIp (\ s a -> s{_igmgUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmgZone :: Lens' InstanceGroupManagersGet' Text +igmgZone = lens _igmgZone (\ s a -> s{_igmgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmgKey :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgKey = lens _igmgKey (\ s a -> s{_igmgKey = a}) + +-- | OAuth 2.0 token for the current user. +igmgOauthToken :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgOauthToken + = lens _igmgOauthToken + (\ s a -> s{_igmgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmgFields :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgFields + = lens _igmgFields (\ s a -> s{_igmgFields = a}) + +-- | Data format for the response. +igmgAlt :: Lens' InstanceGroupManagersGet' Text +igmgAlt = lens _igmgAlt (\ s a -> s{_igmgAlt = a}) + +instance GoogleRequest InstanceGroupManagersGet' + where + type Rs InstanceGroupManagersGet' = + InstanceGroupManager + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupManagersGet{..} + = go _igmgQuotaUser _igmgPrettyPrint _igmgProject + _igmgInstanceGroupManager + _igmgUserIp + _igmgZone + _igmgKey + _igmgOauthToken + _igmgFields + _igmgAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Insert.hs new file mode 100644 index 000000000..70a6dd814 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Insert.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a managed instance group resource in the specified project using +-- the data that is included in the request. +-- +-- /See:/ for @ComputeInstanceGroupManagersInsert@. +module Compute.InstanceGroupManagers.Insert + ( + -- * REST Resource + InstanceGroupManagersInsertAPI + + -- * Creating a Request + , instanceGroupManagersInsert + , InstanceGroupManagersInsert + + -- * Request Lenses + , igmiQuotaUser + , igmiPrettyPrint + , igmiProject + , igmiUserIp + , igmiZone + , igmiKey + , igmiOauthToken + , igmiFields + , igmiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersInsert@ which the +-- 'InstanceGroupManagersInsert' request conforms to. +type InstanceGroupManagersInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> Post '[JSON] Operation + +-- | Creates a managed instance group resource in the specified project using +-- the data that is included in the request. +-- +-- /See:/ 'instanceGroupManagersInsert' smart constructor. +data InstanceGroupManagersInsert = InstanceGroupManagersInsert + { _igmiQuotaUser :: !(Maybe Text) + , _igmiPrettyPrint :: !Bool + , _igmiProject :: !Text + , _igmiUserIp :: !(Maybe Text) + , _igmiZone :: !Text + , _igmiKey :: !(Maybe Text) + , _igmiOauthToken :: !(Maybe Text) + , _igmiFields :: !(Maybe Text) + , _igmiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmiQuotaUser' +-- +-- * 'igmiPrettyPrint' +-- +-- * 'igmiProject' +-- +-- * 'igmiUserIp' +-- +-- * 'igmiZone' +-- +-- * 'igmiKey' +-- +-- * 'igmiOauthToken' +-- +-- * 'igmiFields' +-- +-- * 'igmiAlt' +instanceGroupManagersInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstanceGroupManagersInsert +instanceGroupManagersInsert pIgmiProject_ pIgmiZone_ = + InstanceGroupManagersInsert + { _igmiQuotaUser = Nothing + , _igmiPrettyPrint = True + , _igmiProject = pIgmiProject_ + , _igmiUserIp = Nothing + , _igmiZone = pIgmiZone_ + , _igmiKey = Nothing + , _igmiOauthToken = Nothing + , _igmiFields = Nothing + , _igmiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmiQuotaUser :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiQuotaUser + = lens _igmiQuotaUser + (\ s a -> s{_igmiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmiPrettyPrint :: Lens' InstanceGroupManagersInsert' Bool +igmiPrettyPrint + = lens _igmiPrettyPrint + (\ s a -> s{_igmiPrettyPrint = a}) + +-- | The project ID for this request. +igmiProject :: Lens' InstanceGroupManagersInsert' Text +igmiProject + = lens _igmiProject (\ s a -> s{_igmiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmiUserIp :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiUserIp + = lens _igmiUserIp (\ s a -> s{_igmiUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmiZone :: Lens' InstanceGroupManagersInsert' Text +igmiZone = lens _igmiZone (\ s a -> s{_igmiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmiKey :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiKey = lens _igmiKey (\ s a -> s{_igmiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmiOauthToken :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiOauthToken + = lens _igmiOauthToken + (\ s a -> s{_igmiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmiFields :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiFields + = lens _igmiFields (\ s a -> s{_igmiFields = a}) + +-- | Data format for the response. +igmiAlt :: Lens' InstanceGroupManagersInsert' Text +igmiAlt = lens _igmiAlt (\ s a -> s{_igmiAlt = a}) + +instance GoogleRequest InstanceGroupManagersInsert' + where + type Rs InstanceGroupManagersInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupManagersInsert{..} + = go _igmiQuotaUser _igmiPrettyPrint _igmiProject + _igmiUserIp + _igmiZone + _igmiKey + _igmiOauthToken + _igmiFields + _igmiAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/List.hs new file mode 100644 index 000000000..4c9ef1f87 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/List.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of managed instance groups that are contained within +-- the specified project and zone. +-- +-- /See:/ for @ComputeInstanceGroupManagersList@. +module Compute.InstanceGroupManagers.List + ( + -- * REST Resource + InstanceGroupManagersListAPI + + -- * Creating a Request + , instanceGroupManagersList + , InstanceGroupManagersList + + -- * Request Lenses + , igmlQuotaUser + , igmlPrettyPrint + , igmlProject + , igmlUserIp + , igmlZone + , igmlKey + , igmlFilter + , igmlPageToken + , igmlOauthToken + , igmlMaxResults + , igmlFields + , igmlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersList@ which the +-- 'InstanceGroupManagersList' request conforms to. +type InstanceGroupManagersListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceGroupManagerList + +-- | Retrieves a list of managed instance groups that are contained within +-- the specified project and zone. +-- +-- /See:/ 'instanceGroupManagersList' smart constructor. +data InstanceGroupManagersList = InstanceGroupManagersList + { _igmlQuotaUser :: !(Maybe Text) + , _igmlPrettyPrint :: !Bool + , _igmlProject :: !Text + , _igmlUserIp :: !(Maybe Text) + , _igmlZone :: !Text + , _igmlKey :: !(Maybe Text) + , _igmlFilter :: !(Maybe Text) + , _igmlPageToken :: !(Maybe Text) + , _igmlOauthToken :: !(Maybe Text) + , _igmlMaxResults :: !Word32 + , _igmlFields :: !(Maybe Text) + , _igmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlQuotaUser' +-- +-- * 'igmlPrettyPrint' +-- +-- * 'igmlProject' +-- +-- * 'igmlUserIp' +-- +-- * 'igmlZone' +-- +-- * 'igmlKey' +-- +-- * 'igmlFilter' +-- +-- * 'igmlPageToken' +-- +-- * 'igmlOauthToken' +-- +-- * 'igmlMaxResults' +-- +-- * 'igmlFields' +-- +-- * 'igmlAlt' +instanceGroupManagersList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstanceGroupManagersList +instanceGroupManagersList pIgmlProject_ pIgmlZone_ = + InstanceGroupManagersList + { _igmlQuotaUser = Nothing + , _igmlPrettyPrint = True + , _igmlProject = pIgmlProject_ + , _igmlUserIp = Nothing + , _igmlZone = pIgmlZone_ + , _igmlKey = Nothing + , _igmlFilter = Nothing + , _igmlPageToken = Nothing + , _igmlOauthToken = Nothing + , _igmlMaxResults = 500 + , _igmlFields = Nothing + , _igmlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmlQuotaUser :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlQuotaUser + = lens _igmlQuotaUser + (\ s a -> s{_igmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmlPrettyPrint :: Lens' InstanceGroupManagersList' Bool +igmlPrettyPrint + = lens _igmlPrettyPrint + (\ s a -> s{_igmlPrettyPrint = a}) + +-- | The project ID for this request. +igmlProject :: Lens' InstanceGroupManagersList' Text +igmlProject + = lens _igmlProject (\ s a -> s{_igmlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmlUserIp :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlUserIp + = lens _igmlUserIp (\ s a -> s{_igmlUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmlZone :: Lens' InstanceGroupManagersList' Text +igmlZone = lens _igmlZone (\ s a -> s{_igmlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmlKey :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlKey = lens _igmlKey (\ s a -> s{_igmlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +igmlFilter :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlFilter + = lens _igmlFilter (\ s a -> s{_igmlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +igmlPageToken :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlPageToken + = lens _igmlPageToken + (\ s a -> s{_igmlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +igmlOauthToken :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlOauthToken + = lens _igmlOauthToken + (\ s a -> s{_igmlOauthToken = a}) + +-- | Maximum count of results to be returned. +igmlMaxResults :: Lens' InstanceGroupManagersList' Word32 +igmlMaxResults + = lens _igmlMaxResults + (\ s a -> s{_igmlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +igmlFields :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlFields + = lens _igmlFields (\ s a -> s{_igmlFields = a}) + +-- | Data format for the response. +igmlAlt :: Lens' InstanceGroupManagersList' Text +igmlAlt = lens _igmlAlt (\ s a -> s{_igmlAlt = a}) + +instance GoogleRequest InstanceGroupManagersList' + where + type Rs InstanceGroupManagersList' = + InstanceGroupManagerList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupManagersList{..} + = go _igmlQuotaUser _igmlPrettyPrint _igmlProject + _igmlUserIp + _igmlZone + _igmlKey + _igmlFilter + _igmlPageToken + _igmlOauthToken + (Just _igmlMaxResults) + _igmlFields + _igmlAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/ListManagedInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/ListManagedInstances.hs new file mode 100644 index 000000000..7591d4364 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/ListManagedInstances.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.ListManagedInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists managed instances. +-- +-- /See:/ for @ComputeInstanceGroupManagersListManagedInstances@. +module Compute.InstanceGroupManagers.ListManagedInstances + ( + -- * REST Resource + InstanceGroupManagersListManagedInstancesAPI + + -- * Creating a Request + , instanceGroupManagersListManagedInstances + , InstanceGroupManagersListManagedInstances + + -- * Request Lenses + , igmlmiQuotaUser + , igmlmiPrettyPrint + , igmlmiProject + , igmlmiInstanceGroupManager + , igmlmiUserIp + , igmlmiZone + , igmlmiKey + , igmlmiOauthToken + , igmlmiFields + , igmlmiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersListManagedInstances@ which the +-- 'InstanceGroupManagersListManagedInstances' request conforms to. +type InstanceGroupManagersListManagedInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "listManagedInstances" :> + Post '[JSON] + InstanceGroupManagersListManagedInstancesResponse + +-- | Lists managed instances. +-- +-- /See:/ 'instanceGroupManagersListManagedInstances' smart constructor. +data InstanceGroupManagersListManagedInstances = InstanceGroupManagersListManagedInstances + { _igmlmiQuotaUser :: !(Maybe Text) + , _igmlmiPrettyPrint :: !Bool + , _igmlmiProject :: !Text + , _igmlmiInstanceGroupManager :: !Text + , _igmlmiUserIp :: !(Maybe Text) + , _igmlmiZone :: !Text + , _igmlmiKey :: !(Maybe Text) + , _igmlmiOauthToken :: !(Maybe Text) + , _igmlmiFields :: !(Maybe Text) + , _igmlmiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersListManagedInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlmiQuotaUser' +-- +-- * 'igmlmiPrettyPrint' +-- +-- * 'igmlmiProject' +-- +-- * 'igmlmiInstanceGroupManager' +-- +-- * 'igmlmiUserIp' +-- +-- * 'igmlmiZone' +-- +-- * 'igmlmiKey' +-- +-- * 'igmlmiOauthToken' +-- +-- * 'igmlmiFields' +-- +-- * 'igmlmiAlt' +instanceGroupManagersListManagedInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersListManagedInstances +instanceGroupManagersListManagedInstances pIgmlmiProject_ pIgmlmiInstanceGroupManager_ pIgmlmiZone_ = + InstanceGroupManagersListManagedInstances + { _igmlmiQuotaUser = Nothing + , _igmlmiPrettyPrint = True + , _igmlmiProject = pIgmlmiProject_ + , _igmlmiInstanceGroupManager = pIgmlmiInstanceGroupManager_ + , _igmlmiUserIp = Nothing + , _igmlmiZone = pIgmlmiZone_ + , _igmlmiKey = Nothing + , _igmlmiOauthToken = Nothing + , _igmlmiFields = Nothing + , _igmlmiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmlmiQuotaUser :: Lens' InstanceGroupManagersListManagedInstances' (Maybe Text) +igmlmiQuotaUser + = lens _igmlmiQuotaUser + (\ s a -> s{_igmlmiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmlmiPrettyPrint :: Lens' InstanceGroupManagersListManagedInstances' Bool +igmlmiPrettyPrint + = lens _igmlmiPrettyPrint + (\ s a -> s{_igmlmiPrettyPrint = a}) + +-- | The project ID for this request. +igmlmiProject :: Lens' InstanceGroupManagersListManagedInstances' Text +igmlmiProject + = lens _igmlmiProject + (\ s a -> s{_igmlmiProject = a}) + +-- | The name of the managed instance group. +igmlmiInstanceGroupManager :: Lens' InstanceGroupManagersListManagedInstances' Text +igmlmiInstanceGroupManager + = lens _igmlmiInstanceGroupManager + (\ s a -> s{_igmlmiInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmlmiUserIp :: Lens' InstanceGroupManagersListManagedInstances' (Maybe Text) +igmlmiUserIp + = lens _igmlmiUserIp (\ s a -> s{_igmlmiUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmlmiZone :: Lens' InstanceGroupManagersListManagedInstances' Text +igmlmiZone + = lens _igmlmiZone (\ s a -> s{_igmlmiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmlmiKey :: Lens' InstanceGroupManagersListManagedInstances' (Maybe Text) +igmlmiKey + = lens _igmlmiKey (\ s a -> s{_igmlmiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmlmiOauthToken :: Lens' InstanceGroupManagersListManagedInstances' (Maybe Text) +igmlmiOauthToken + = lens _igmlmiOauthToken + (\ s a -> s{_igmlmiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmlmiFields :: Lens' InstanceGroupManagersListManagedInstances' (Maybe Text) +igmlmiFields + = lens _igmlmiFields (\ s a -> s{_igmlmiFields = a}) + +-- | Data format for the response. +igmlmiAlt :: Lens' InstanceGroupManagersListManagedInstances' Text +igmlmiAlt + = lens _igmlmiAlt (\ s a -> s{_igmlmiAlt = a}) + +instance GoogleRequest + InstanceGroupManagersListManagedInstances' where + type Rs InstanceGroupManagersListManagedInstances' = + InstanceGroupManagersListManagedInstancesResponse + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersListManagedInstances{..} + = go _igmlmiQuotaUser _igmlmiPrettyPrint + _igmlmiProject + _igmlmiInstanceGroupManager + _igmlmiUserIp + _igmlmiZone + _igmlmiKey + _igmlmiOauthToken + _igmlmiFields + _igmlmiAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersListManagedInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/RecreateInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/RecreateInstances.hs new file mode 100644 index 000000000..a7b0b8d63 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/RecreateInstances.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.RecreateInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Recreates the specified instances. The instances are deleted, then +-- recreated using the managed instance group\'s current instance template. +-- +-- /See:/ for @ComputeInstanceGroupManagersRecreateInstances@. +module Compute.InstanceGroupManagers.RecreateInstances + ( + -- * REST Resource + InstanceGroupManagersRecreateInstancesAPI + + -- * Creating a Request + , instanceGroupManagersRecreateInstances + , InstanceGroupManagersRecreateInstances + + -- * Request Lenses + , igmriQuotaUser + , igmriPrettyPrint + , igmriProject + , igmriInstanceGroupManager + , igmriUserIp + , igmriZone + , igmriKey + , igmriOauthToken + , igmriFields + , igmriAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersRecreateInstances@ which the +-- 'InstanceGroupManagersRecreateInstances' request conforms to. +type InstanceGroupManagersRecreateInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "recreateInstances" :> Post '[JSON] Operation + +-- | Recreates the specified instances. The instances are deleted, then +-- recreated using the managed instance group\'s current instance template. +-- +-- /See:/ 'instanceGroupManagersRecreateInstances' smart constructor. +data InstanceGroupManagersRecreateInstances = InstanceGroupManagersRecreateInstances + { _igmriQuotaUser :: !(Maybe Text) + , _igmriPrettyPrint :: !Bool + , _igmriProject :: !Text + , _igmriInstanceGroupManager :: !Text + , _igmriUserIp :: !(Maybe Text) + , _igmriZone :: !Text + , _igmriKey :: !(Maybe Text) + , _igmriOauthToken :: !(Maybe Text) + , _igmriFields :: !(Maybe Text) + , _igmriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersRecreateInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmriQuotaUser' +-- +-- * 'igmriPrettyPrint' +-- +-- * 'igmriProject' +-- +-- * 'igmriInstanceGroupManager' +-- +-- * 'igmriUserIp' +-- +-- * 'igmriZone' +-- +-- * 'igmriKey' +-- +-- * 'igmriOauthToken' +-- +-- * 'igmriFields' +-- +-- * 'igmriAlt' +instanceGroupManagersRecreateInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersRecreateInstances +instanceGroupManagersRecreateInstances pIgmriProject_ pIgmriInstanceGroupManager_ pIgmriZone_ = + InstanceGroupManagersRecreateInstances + { _igmriQuotaUser = Nothing + , _igmriPrettyPrint = True + , _igmriProject = pIgmriProject_ + , _igmriInstanceGroupManager = pIgmriInstanceGroupManager_ + , _igmriUserIp = Nothing + , _igmriZone = pIgmriZone_ + , _igmriKey = Nothing + , _igmriOauthToken = Nothing + , _igmriFields = Nothing + , _igmriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmriQuotaUser :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriQuotaUser + = lens _igmriQuotaUser + (\ s a -> s{_igmriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmriPrettyPrint :: Lens' InstanceGroupManagersRecreateInstances' Bool +igmriPrettyPrint + = lens _igmriPrettyPrint + (\ s a -> s{_igmriPrettyPrint = a}) + +-- | The project ID for this request. +igmriProject :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriProject + = lens _igmriProject (\ s a -> s{_igmriProject = a}) + +-- | The name of the instance group manager. +igmriInstanceGroupManager :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriInstanceGroupManager + = lens _igmriInstanceGroupManager + (\ s a -> s{_igmriInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmriUserIp :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriUserIp + = lens _igmriUserIp (\ s a -> s{_igmriUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmriZone :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriZone + = lens _igmriZone (\ s a -> s{_igmriZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmriKey :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriKey = lens _igmriKey (\ s a -> s{_igmriKey = a}) + +-- | OAuth 2.0 token for the current user. +igmriOauthToken :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriOauthToken + = lens _igmriOauthToken + (\ s a -> s{_igmriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmriFields :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriFields + = lens _igmriFields (\ s a -> s{_igmriFields = a}) + +-- | Data format for the response. +igmriAlt :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriAlt = lens _igmriAlt (\ s a -> s{_igmriAlt = a}) + +instance GoogleRequest + InstanceGroupManagersRecreateInstances' where + type Rs InstanceGroupManagersRecreateInstances' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersRecreateInstances{..} + = go _igmriQuotaUser _igmriPrettyPrint _igmriProject + _igmriInstanceGroupManager + _igmriUserIp + _igmriZone + _igmriKey + _igmriOauthToken + _igmriFields + _igmriAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersRecreateInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Resize.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Resize.hs new file mode 100644 index 000000000..e6f7c151b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/Resize.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.Resize +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resizes the managed instance group. If you increase the size, the group +-- creates new instances using the current instance template. If you +-- decrease the size, the group removes instances in the order that is +-- outlined in Resizing a managed instance group. +-- +-- /See:/ for @ComputeInstanceGroupManagersResize@. +module Compute.InstanceGroupManagers.Resize + ( + -- * REST Resource + InstanceGroupManagersResizeAPI + + -- * Creating a Request + , instanceGroupManagersResize + , InstanceGroupManagersResize + + -- * Request Lenses + , igmrQuotaUser + , igmrPrettyPrint + , igmrProject + , igmrSize + , igmrInstanceGroupManager + , igmrUserIp + , igmrZone + , igmrKey + , igmrOauthToken + , igmrFields + , igmrAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersResize@ which the +-- 'InstanceGroupManagersResize' request conforms to. +type InstanceGroupManagersResizeAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "resize" :> + QueryParam "size" Int32 :> Post '[JSON] Operation + +-- | Resizes the managed instance group. If you increase the size, the group +-- creates new instances using the current instance template. If you +-- decrease the size, the group removes instances in the order that is +-- outlined in Resizing a managed instance group. +-- +-- /See:/ 'instanceGroupManagersResize' smart constructor. +data InstanceGroupManagersResize = InstanceGroupManagersResize + { _igmrQuotaUser :: !(Maybe Text) + , _igmrPrettyPrint :: !Bool + , _igmrProject :: !Text + , _igmrSize :: !Int32 + , _igmrInstanceGroupManager :: !Text + , _igmrUserIp :: !(Maybe Text) + , _igmrZone :: !Text + , _igmrKey :: !(Maybe Text) + , _igmrOauthToken :: !(Maybe Text) + , _igmrFields :: !(Maybe Text) + , _igmrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersResize'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmrQuotaUser' +-- +-- * 'igmrPrettyPrint' +-- +-- * 'igmrProject' +-- +-- * 'igmrSize' +-- +-- * 'igmrInstanceGroupManager' +-- +-- * 'igmrUserIp' +-- +-- * 'igmrZone' +-- +-- * 'igmrKey' +-- +-- * 'igmrOauthToken' +-- +-- * 'igmrFields' +-- +-- * 'igmrAlt' +instanceGroupManagersResize + :: Text -- ^ 'project' + -> Int32 -- ^ 'size' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersResize +instanceGroupManagersResize pIgmrProject_ pIgmrSize_ pIgmrInstanceGroupManager_ pIgmrZone_ = + InstanceGroupManagersResize + { _igmrQuotaUser = Nothing + , _igmrPrettyPrint = True + , _igmrProject = pIgmrProject_ + , _igmrSize = pIgmrSize_ + , _igmrInstanceGroupManager = pIgmrInstanceGroupManager_ + , _igmrUserIp = Nothing + , _igmrZone = pIgmrZone_ + , _igmrKey = Nothing + , _igmrOauthToken = Nothing + , _igmrFields = Nothing + , _igmrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmrQuotaUser :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrQuotaUser + = lens _igmrQuotaUser + (\ s a -> s{_igmrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmrPrettyPrint :: Lens' InstanceGroupManagersResize' Bool +igmrPrettyPrint + = lens _igmrPrettyPrint + (\ s a -> s{_igmrPrettyPrint = a}) + +-- | The project ID for this request. +igmrProject :: Lens' InstanceGroupManagersResize' Text +igmrProject + = lens _igmrProject (\ s a -> s{_igmrProject = a}) + +-- | The number of running instances that the managed instance group should +-- maintain at any given time. The group automatically adds or removes +-- instances to maintain the number of instances specified by this +-- parameter. +igmrSize :: Lens' InstanceGroupManagersResize' Int32 +igmrSize = lens _igmrSize (\ s a -> s{_igmrSize = a}) + +-- | The name of the instance group manager. +igmrInstanceGroupManager :: Lens' InstanceGroupManagersResize' Text +igmrInstanceGroupManager + = lens _igmrInstanceGroupManager + (\ s a -> s{_igmrInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmrUserIp :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrUserIp + = lens _igmrUserIp (\ s a -> s{_igmrUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmrZone :: Lens' InstanceGroupManagersResize' Text +igmrZone = lens _igmrZone (\ s a -> s{_igmrZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmrKey :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrKey = lens _igmrKey (\ s a -> s{_igmrKey = a}) + +-- | OAuth 2.0 token for the current user. +igmrOauthToken :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrOauthToken + = lens _igmrOauthToken + (\ s a -> s{_igmrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmrFields :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrFields + = lens _igmrFields (\ s a -> s{_igmrFields = a}) + +-- | Data format for the response. +igmrAlt :: Lens' InstanceGroupManagersResize' Text +igmrAlt = lens _igmrAlt (\ s a -> s{_igmrAlt = a}) + +instance GoogleRequest InstanceGroupManagersResize' + where + type Rs InstanceGroupManagersResize' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupManagersResize{..} + = go _igmrQuotaUser _igmrPrettyPrint _igmrProject + (Just _igmrSize) + _igmrInstanceGroupManager + _igmrUserIp + _igmrZone + _igmrKey + _igmrOauthToken + _igmrFields + _igmrAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersResizeAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetInstanceTemplate.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetInstanceTemplate.hs new file mode 100644 index 000000000..8e34ddab6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetInstanceTemplate.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.SetInstanceTemplate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Specifies the instance template to use when creating new instances in +-- this group. The templates for existing instances in the group do not +-- change unless you recreate them. +-- +-- /See:/ for @ComputeInstanceGroupManagersSetInstanceTemplate@. +module Compute.InstanceGroupManagers.SetInstanceTemplate + ( + -- * REST Resource + InstanceGroupManagersSetInstanceTemplateAPI + + -- * Creating a Request + , instanceGroupManagersSetInstanceTemplate + , InstanceGroupManagersSetInstanceTemplate + + -- * Request Lenses + , igmsitQuotaUser + , igmsitPrettyPrint + , igmsitProject + , igmsitInstanceGroupManager + , igmsitUserIp + , igmsitZone + , igmsitKey + , igmsitOauthToken + , igmsitFields + , igmsitAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersSetInstanceTemplate@ which the +-- 'InstanceGroupManagersSetInstanceTemplate' request conforms to. +type InstanceGroupManagersSetInstanceTemplateAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "setInstanceTemplate" :> Post '[JSON] Operation + +-- | Specifies the instance template to use when creating new instances in +-- this group. The templates for existing instances in the group do not +-- change unless you recreate them. +-- +-- /See:/ 'instanceGroupManagersSetInstanceTemplate' smart constructor. +data InstanceGroupManagersSetInstanceTemplate = InstanceGroupManagersSetInstanceTemplate + { _igmsitQuotaUser :: !(Maybe Text) + , _igmsitPrettyPrint :: !Bool + , _igmsitProject :: !Text + , _igmsitInstanceGroupManager :: !Text + , _igmsitUserIp :: !(Maybe Text) + , _igmsitZone :: !Text + , _igmsitKey :: !(Maybe Text) + , _igmsitOauthToken :: !(Maybe Text) + , _igmsitFields :: !(Maybe Text) + , _igmsitAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmsitQuotaUser' +-- +-- * 'igmsitPrettyPrint' +-- +-- * 'igmsitProject' +-- +-- * 'igmsitInstanceGroupManager' +-- +-- * 'igmsitUserIp' +-- +-- * 'igmsitZone' +-- +-- * 'igmsitKey' +-- +-- * 'igmsitOauthToken' +-- +-- * 'igmsitFields' +-- +-- * 'igmsitAlt' +instanceGroupManagersSetInstanceTemplate + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersSetInstanceTemplate +instanceGroupManagersSetInstanceTemplate pIgmsitProject_ pIgmsitInstanceGroupManager_ pIgmsitZone_ = + InstanceGroupManagersSetInstanceTemplate + { _igmsitQuotaUser = Nothing + , _igmsitPrettyPrint = True + , _igmsitProject = pIgmsitProject_ + , _igmsitInstanceGroupManager = pIgmsitInstanceGroupManager_ + , _igmsitUserIp = Nothing + , _igmsitZone = pIgmsitZone_ + , _igmsitKey = Nothing + , _igmsitOauthToken = Nothing + , _igmsitFields = Nothing + , _igmsitAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmsitQuotaUser :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitQuotaUser + = lens _igmsitQuotaUser + (\ s a -> s{_igmsitQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmsitPrettyPrint :: Lens' InstanceGroupManagersSetInstanceTemplate' Bool +igmsitPrettyPrint + = lens _igmsitPrettyPrint + (\ s a -> s{_igmsitPrettyPrint = a}) + +-- | The project ID for this request. +igmsitProject :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitProject + = lens _igmsitProject + (\ s a -> s{_igmsitProject = a}) + +-- | The name of the instance group manager. +igmsitInstanceGroupManager :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitInstanceGroupManager + = lens _igmsitInstanceGroupManager + (\ s a -> s{_igmsitInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmsitUserIp :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitUserIp + = lens _igmsitUserIp (\ s a -> s{_igmsitUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmsitZone :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitZone + = lens _igmsitZone (\ s a -> s{_igmsitZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmsitKey :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitKey + = lens _igmsitKey (\ s a -> s{_igmsitKey = a}) + +-- | OAuth 2.0 token for the current user. +igmsitOauthToken :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitOauthToken + = lens _igmsitOauthToken + (\ s a -> s{_igmsitOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmsitFields :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitFields + = lens _igmsitFields (\ s a -> s{_igmsitFields = a}) + +-- | Data format for the response. +igmsitAlt :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitAlt + = lens _igmsitAlt (\ s a -> s{_igmsitAlt = a}) + +instance GoogleRequest + InstanceGroupManagersSetInstanceTemplate' where + type Rs InstanceGroupManagersSetInstanceTemplate' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersSetInstanceTemplate{..} + = go _igmsitQuotaUser _igmsitPrettyPrint + _igmsitProject + _igmsitInstanceGroupManager + _igmsitUserIp + _igmsitZone + _igmsitKey + _igmsitOauthToken + _igmsitFields + _igmsitAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersSetInstanceTemplateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetTargetPools.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetTargetPools.hs new file mode 100644 index 000000000..d58a4a198 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/SetTargetPools.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroupManagers.SetTargetPools +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the target pools to which all new instances in this group are +-- assigned. The target pools for existing instances in the group do not +-- change unless you recreate them. +-- +-- /See:/ for @ComputeInstanceGroupManagersSetTargetPools@. +module Compute.InstanceGroupManagers.SetTargetPools + ( + -- * REST Resource + InstanceGroupManagersSetTargetPoolsAPI + + -- * Creating a Request + , instanceGroupManagersSetTargetPools + , InstanceGroupManagersSetTargetPools + + -- * Request Lenses + , igmstpQuotaUser + , igmstpPrettyPrint + , igmstpProject + , igmstpInstanceGroupManager + , igmstpUserIp + , igmstpZone + , igmstpKey + , igmstpOauthToken + , igmstpFields + , igmstpAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupManagersSetTargetPools@ which the +-- 'InstanceGroupManagersSetTargetPools' request conforms to. +type InstanceGroupManagersSetTargetPoolsAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "setTargetPools" :> Post '[JSON] Operation + +-- | Modifies the target pools to which all new instances in this group are +-- assigned. The target pools for existing instances in the group do not +-- change unless you recreate them. +-- +-- /See:/ 'instanceGroupManagersSetTargetPools' smart constructor. +data InstanceGroupManagersSetTargetPools = InstanceGroupManagersSetTargetPools + { _igmstpQuotaUser :: !(Maybe Text) + , _igmstpPrettyPrint :: !Bool + , _igmstpProject :: !Text + , _igmstpInstanceGroupManager :: !Text + , _igmstpUserIp :: !(Maybe Text) + , _igmstpZone :: !Text + , _igmstpKey :: !(Maybe Text) + , _igmstpOauthToken :: !(Maybe Text) + , _igmstpFields :: !(Maybe Text) + , _igmstpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetTargetPools'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmstpQuotaUser' +-- +-- * 'igmstpPrettyPrint' +-- +-- * 'igmstpProject' +-- +-- * 'igmstpInstanceGroupManager' +-- +-- * 'igmstpUserIp' +-- +-- * 'igmstpZone' +-- +-- * 'igmstpKey' +-- +-- * 'igmstpOauthToken' +-- +-- * 'igmstpFields' +-- +-- * 'igmstpAlt' +instanceGroupManagersSetTargetPools + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersSetTargetPools +instanceGroupManagersSetTargetPools pIgmstpProject_ pIgmstpInstanceGroupManager_ pIgmstpZone_ = + InstanceGroupManagersSetTargetPools + { _igmstpQuotaUser = Nothing + , _igmstpPrettyPrint = True + , _igmstpProject = pIgmstpProject_ + , _igmstpInstanceGroupManager = pIgmstpInstanceGroupManager_ + , _igmstpUserIp = Nothing + , _igmstpZone = pIgmstpZone_ + , _igmstpKey = Nothing + , _igmstpOauthToken = Nothing + , _igmstpFields = Nothing + , _igmstpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmstpQuotaUser :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpQuotaUser + = lens _igmstpQuotaUser + (\ s a -> s{_igmstpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmstpPrettyPrint :: Lens' InstanceGroupManagersSetTargetPools' Bool +igmstpPrettyPrint + = lens _igmstpPrettyPrint + (\ s a -> s{_igmstpPrettyPrint = a}) + +-- | The project ID for this request. +igmstpProject :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpProject + = lens _igmstpProject + (\ s a -> s{_igmstpProject = a}) + +-- | The name of the instance group manager. +igmstpInstanceGroupManager :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpInstanceGroupManager + = lens _igmstpInstanceGroupManager + (\ s a -> s{_igmstpInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmstpUserIp :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpUserIp + = lens _igmstpUserIp (\ s a -> s{_igmstpUserIp = a}) + +-- | The URL of the zone where the managed instance group is located. +igmstpZone :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpZone + = lens _igmstpZone (\ s a -> s{_igmstpZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmstpKey :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpKey + = lens _igmstpKey (\ s a -> s{_igmstpKey = a}) + +-- | OAuth 2.0 token for the current user. +igmstpOauthToken :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpOauthToken + = lens _igmstpOauthToken + (\ s a -> s{_igmstpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmstpFields :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpFields + = lens _igmstpFields (\ s a -> s{_igmstpFields = a}) + +-- | Data format for the response. +igmstpAlt :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpAlt + = lens _igmstpAlt (\ s a -> s{_igmstpAlt = a}) + +instance GoogleRequest + InstanceGroupManagersSetTargetPools' where + type Rs InstanceGroupManagersSetTargetPools' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupManagersSetTargetPools{..} + = go _igmstpQuotaUser _igmstpPrettyPrint + _igmstpProject + _igmstpInstanceGroupManager + _igmstpUserIp + _igmstpZone + _igmstpKey + _igmstpOauthToken + _igmstpFields + _igmstpAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersSetTargetPoolsAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AddInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AddInstances.hs new file mode 100644 index 000000000..ea63ed9e2 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AddInstances.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.AddInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a list of instances to an instance group. All of the instances in +-- the instance group must be in the same network. +-- +-- /See:/ for @ComputeInstanceGroupsAddInstances@. +module Compute.InstanceGroups.AddInstances + ( + -- * REST Resource + InstanceGroupsAddInstancesAPI + + -- * Creating a Request + , instanceGroupsAddInstances + , InstanceGroupsAddInstances + + -- * Request Lenses + , igaiQuotaUser + , igaiPrettyPrint + , igaiProject + , igaiUserIp + , igaiZone + , igaiKey + , igaiOauthToken + , igaiInstanceGroup + , igaiFields + , igaiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsAddInstances@ which the +-- 'InstanceGroupsAddInstances' request conforms to. +type InstanceGroupsAddInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + "addInstances" :> Post '[JSON] Operation + +-- | Adds a list of instances to an instance group. All of the instances in +-- the instance group must be in the same network. +-- +-- /See:/ 'instanceGroupsAddInstances' smart constructor. +data InstanceGroupsAddInstances = InstanceGroupsAddInstances + { _igaiQuotaUser :: !(Maybe Text) + , _igaiPrettyPrint :: !Bool + , _igaiProject :: !Text + , _igaiUserIp :: !(Maybe Text) + , _igaiZone :: !Text + , _igaiKey :: !(Maybe Text) + , _igaiOauthToken :: !(Maybe Text) + , _igaiInstanceGroup :: !Text + , _igaiFields :: !(Maybe Text) + , _igaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsAddInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igaiQuotaUser' +-- +-- * 'igaiPrettyPrint' +-- +-- * 'igaiProject' +-- +-- * 'igaiUserIp' +-- +-- * 'igaiZone' +-- +-- * 'igaiKey' +-- +-- * 'igaiOauthToken' +-- +-- * 'igaiInstanceGroup' +-- +-- * 'igaiFields' +-- +-- * 'igaiAlt' +instanceGroupsAddInstances + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsAddInstances +instanceGroupsAddInstances pIgaiProject_ pIgaiZone_ pIgaiInstanceGroup_ = + InstanceGroupsAddInstances + { _igaiQuotaUser = Nothing + , _igaiPrettyPrint = True + , _igaiProject = pIgaiProject_ + , _igaiUserIp = Nothing + , _igaiZone = pIgaiZone_ + , _igaiKey = Nothing + , _igaiOauthToken = Nothing + , _igaiInstanceGroup = pIgaiInstanceGroup_ + , _igaiFields = Nothing + , _igaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igaiQuotaUser :: Lens' InstanceGroupsAddInstances' (Maybe Text) +igaiQuotaUser + = lens _igaiQuotaUser + (\ s a -> s{_igaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igaiPrettyPrint :: Lens' InstanceGroupsAddInstances' Bool +igaiPrettyPrint + = lens _igaiPrettyPrint + (\ s a -> s{_igaiPrettyPrint = a}) + +-- | The project ID for this request. +igaiProject :: Lens' InstanceGroupsAddInstances' Text +igaiProject + = lens _igaiProject (\ s a -> s{_igaiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igaiUserIp :: Lens' InstanceGroupsAddInstances' (Maybe Text) +igaiUserIp + = lens _igaiUserIp (\ s a -> s{_igaiUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igaiZone :: Lens' InstanceGroupsAddInstances' Text +igaiZone = lens _igaiZone (\ s a -> s{_igaiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igaiKey :: Lens' InstanceGroupsAddInstances' (Maybe Text) +igaiKey = lens _igaiKey (\ s a -> s{_igaiKey = a}) + +-- | OAuth 2.0 token for the current user. +igaiOauthToken :: Lens' InstanceGroupsAddInstances' (Maybe Text) +igaiOauthToken + = lens _igaiOauthToken + (\ s a -> s{_igaiOauthToken = a}) + +-- | The name of the instance group where you are adding instances. +igaiInstanceGroup :: Lens' InstanceGroupsAddInstances' Text +igaiInstanceGroup + = lens _igaiInstanceGroup + (\ s a -> s{_igaiInstanceGroup = a}) + +-- | Selector specifying which fields to include in a partial response. +igaiFields :: Lens' InstanceGroupsAddInstances' (Maybe Text) +igaiFields + = lens _igaiFields (\ s a -> s{_igaiFields = a}) + +-- | Data format for the response. +igaiAlt :: Lens' InstanceGroupsAddInstances' Text +igaiAlt = lens _igaiAlt (\ s a -> s{_igaiAlt = a}) + +instance GoogleRequest InstanceGroupsAddInstances' + where + type Rs InstanceGroupsAddInstances' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsAddInstances{..} + = go _igaiQuotaUser _igaiPrettyPrint _igaiProject + _igaiUserIp + _igaiZone + _igaiKey + _igaiOauthToken + _igaiInstanceGroup + _igaiFields + _igaiAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsAddInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AggregatedList.hs new file mode 100644 index 000000000..3e300d9f5 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/AggregatedList.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of instance groups, and sorts them by zone. +-- +-- /See:/ for @ComputeInstanceGroupsAggregatedList@. +module Compute.InstanceGroups.AggregatedList + ( + -- * REST Resource + InstanceGroupsAggregatedListAPI + + -- * Creating a Request + , instanceGroupsAggregatedList + , InstanceGroupsAggregatedList + + -- * Request Lenses + , igalQuotaUser + , igalPrettyPrint + , igalProject + , igalUserIp + , igalKey + , igalFilter + , igalPageToken + , igalOauthToken + , igalMaxResults + , igalFields + , igalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsAggregatedList@ which the +-- 'InstanceGroupsAggregatedList' request conforms to. +type InstanceGroupsAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "instanceGroups" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceGroupAggregatedList + +-- | Retrieves the list of instance groups, and sorts them by zone. +-- +-- /See:/ 'instanceGroupsAggregatedList' smart constructor. +data InstanceGroupsAggregatedList = InstanceGroupsAggregatedList + { _igalQuotaUser :: !(Maybe Text) + , _igalPrettyPrint :: !Bool + , _igalProject :: !Text + , _igalUserIp :: !(Maybe Text) + , _igalKey :: !(Maybe Text) + , _igalFilter :: !(Maybe Text) + , _igalPageToken :: !(Maybe Text) + , _igalOauthToken :: !(Maybe Text) + , _igalMaxResults :: !Word32 + , _igalFields :: !(Maybe Text) + , _igalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igalQuotaUser' +-- +-- * 'igalPrettyPrint' +-- +-- * 'igalProject' +-- +-- * 'igalUserIp' +-- +-- * 'igalKey' +-- +-- * 'igalFilter' +-- +-- * 'igalPageToken' +-- +-- * 'igalOauthToken' +-- +-- * 'igalMaxResults' +-- +-- * 'igalFields' +-- +-- * 'igalAlt' +instanceGroupsAggregatedList + :: Text -- ^ 'project' + -> InstanceGroupsAggregatedList +instanceGroupsAggregatedList pIgalProject_ = + InstanceGroupsAggregatedList + { _igalQuotaUser = Nothing + , _igalPrettyPrint = True + , _igalProject = pIgalProject_ + , _igalUserIp = Nothing + , _igalKey = Nothing + , _igalFilter = Nothing + , _igalPageToken = Nothing + , _igalOauthToken = Nothing + , _igalMaxResults = 500 + , _igalFields = Nothing + , _igalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igalQuotaUser :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalQuotaUser + = lens _igalQuotaUser + (\ s a -> s{_igalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igalPrettyPrint :: Lens' InstanceGroupsAggregatedList' Bool +igalPrettyPrint + = lens _igalPrettyPrint + (\ s a -> s{_igalPrettyPrint = a}) + +-- | The project ID for this request. +igalProject :: Lens' InstanceGroupsAggregatedList' Text +igalProject + = lens _igalProject (\ s a -> s{_igalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igalUserIp :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalUserIp + = lens _igalUserIp (\ s a -> s{_igalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igalKey :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalKey = lens _igalKey (\ s a -> s{_igalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +igalFilter :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalFilter + = lens _igalFilter (\ s a -> s{_igalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +igalPageToken :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalPageToken + = lens _igalPageToken + (\ s a -> s{_igalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +igalOauthToken :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalOauthToken + = lens _igalOauthToken + (\ s a -> s{_igalOauthToken = a}) + +-- | Maximum count of results to be returned. +igalMaxResults :: Lens' InstanceGroupsAggregatedList' Word32 +igalMaxResults + = lens _igalMaxResults + (\ s a -> s{_igalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +igalFields :: Lens' InstanceGroupsAggregatedList' (Maybe Text) +igalFields + = lens _igalFields (\ s a -> s{_igalFields = a}) + +-- | Data format for the response. +igalAlt :: Lens' InstanceGroupsAggregatedList' Text +igalAlt = lens _igalAlt (\ s a -> s{_igalAlt = a}) + +instance GoogleRequest InstanceGroupsAggregatedList' + where + type Rs InstanceGroupsAggregatedList' = + InstanceGroupAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsAggregatedList{..} + = go _igalQuotaUser _igalPrettyPrint _igalProject + _igalUserIp + _igalKey + _igalFilter + _igalPageToken + _igalOauthToken + (Just _igalMaxResults) + _igalFields + _igalAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Delete.hs new file mode 100644 index 000000000..353993b33 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified instance group. +-- +-- /See:/ for @ComputeInstanceGroupsDelete@. +module Compute.InstanceGroups.Delete + ( + -- * REST Resource + InstanceGroupsDeleteAPI + + -- * Creating a Request + , instanceGroupsDelete + , InstanceGroupsDelete + + -- * Request Lenses + , igdQuotaUser + , igdPrettyPrint + , igdProject + , igdUserIp + , igdZone + , igdKey + , igdOauthToken + , igdInstanceGroup + , igdFields + , igdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsDelete@ which the +-- 'InstanceGroupsDelete' request conforms to. +type InstanceGroupsDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified instance group. +-- +-- /See:/ 'instanceGroupsDelete' smart constructor. +data InstanceGroupsDelete = InstanceGroupsDelete + { _igdQuotaUser :: !(Maybe Text) + , _igdPrettyPrint :: !Bool + , _igdProject :: !Text + , _igdUserIp :: !(Maybe Text) + , _igdZone :: !Text + , _igdKey :: !(Maybe Text) + , _igdOauthToken :: !(Maybe Text) + , _igdInstanceGroup :: !Text + , _igdFields :: !(Maybe Text) + , _igdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igdQuotaUser' +-- +-- * 'igdPrettyPrint' +-- +-- * 'igdProject' +-- +-- * 'igdUserIp' +-- +-- * 'igdZone' +-- +-- * 'igdKey' +-- +-- * 'igdOauthToken' +-- +-- * 'igdInstanceGroup' +-- +-- * 'igdFields' +-- +-- * 'igdAlt' +instanceGroupsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsDelete +instanceGroupsDelete pIgdProject_ pIgdZone_ pIgdInstanceGroup_ = + InstanceGroupsDelete + { _igdQuotaUser = Nothing + , _igdPrettyPrint = True + , _igdProject = pIgdProject_ + , _igdUserIp = Nothing + , _igdZone = pIgdZone_ + , _igdKey = Nothing + , _igdOauthToken = Nothing + , _igdInstanceGroup = pIgdInstanceGroup_ + , _igdFields = Nothing + , _igdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igdQuotaUser :: Lens' InstanceGroupsDelete' (Maybe Text) +igdQuotaUser + = lens _igdQuotaUser (\ s a -> s{_igdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igdPrettyPrint :: Lens' InstanceGroupsDelete' Bool +igdPrettyPrint + = lens _igdPrettyPrint + (\ s a -> s{_igdPrettyPrint = a}) + +-- | The project ID for this request. +igdProject :: Lens' InstanceGroupsDelete' Text +igdProject + = lens _igdProject (\ s a -> s{_igdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igdUserIp :: Lens' InstanceGroupsDelete' (Maybe Text) +igdUserIp + = lens _igdUserIp (\ s a -> s{_igdUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igdZone :: Lens' InstanceGroupsDelete' Text +igdZone = lens _igdZone (\ s a -> s{_igdZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igdKey :: Lens' InstanceGroupsDelete' (Maybe Text) +igdKey = lens _igdKey (\ s a -> s{_igdKey = a}) + +-- | OAuth 2.0 token for the current user. +igdOauthToken :: Lens' InstanceGroupsDelete' (Maybe Text) +igdOauthToken + = lens _igdOauthToken + (\ s a -> s{_igdOauthToken = a}) + +-- | The name of the instance group to delete. +igdInstanceGroup :: Lens' InstanceGroupsDelete' Text +igdInstanceGroup + = lens _igdInstanceGroup + (\ s a -> s{_igdInstanceGroup = a}) + +-- | Selector specifying which fields to include in a partial response. +igdFields :: Lens' InstanceGroupsDelete' (Maybe Text) +igdFields + = lens _igdFields (\ s a -> s{_igdFields = a}) + +-- | Data format for the response. +igdAlt :: Lens' InstanceGroupsDelete' Text +igdAlt = lens _igdAlt (\ s a -> s{_igdAlt = a}) + +instance GoogleRequest InstanceGroupsDelete' where + type Rs InstanceGroupsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsDelete{..} + = go _igdQuotaUser _igdPrettyPrint _igdProject + _igdUserIp + _igdZone + _igdKey + _igdOauthToken + _igdInstanceGroup + _igdFields + _igdAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Get.hs new file mode 100644 index 000000000..e48fce367 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified instance group resource. +-- +-- /See:/ for @ComputeInstanceGroupsGet@. +module Compute.InstanceGroups.Get + ( + -- * REST Resource + InstanceGroupsGetAPI + + -- * Creating a Request + , instanceGroupsGet + , InstanceGroupsGet + + -- * Request Lenses + , igggQuotaUser + , igggPrettyPrint + , igggProject + , igggUserIp + , igggZone + , igggKey + , igggOauthToken + , igggInstanceGroup + , igggFields + , igggAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsGet@ which the +-- 'InstanceGroupsGet' request conforms to. +type InstanceGroupsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + Get '[JSON] InstanceGroup + +-- | Returns the specified instance group resource. +-- +-- /See:/ 'instanceGroupsGet' smart constructor. +data InstanceGroupsGet = InstanceGroupsGet + { _igggQuotaUser :: !(Maybe Text) + , _igggPrettyPrint :: !Bool + , _igggProject :: !Text + , _igggUserIp :: !(Maybe Text) + , _igggZone :: !Text + , _igggKey :: !(Maybe Text) + , _igggOauthToken :: !(Maybe Text) + , _igggInstanceGroup :: !Text + , _igggFields :: !(Maybe Text) + , _igggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igggQuotaUser' +-- +-- * 'igggPrettyPrint' +-- +-- * 'igggProject' +-- +-- * 'igggUserIp' +-- +-- * 'igggZone' +-- +-- * 'igggKey' +-- +-- * 'igggOauthToken' +-- +-- * 'igggInstanceGroup' +-- +-- * 'igggFields' +-- +-- * 'igggAlt' +instanceGroupsGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsGet +instanceGroupsGet pIgggProject_ pIgggZone_ pIgggInstanceGroup_ = + InstanceGroupsGet + { _igggQuotaUser = Nothing + , _igggPrettyPrint = True + , _igggProject = pIgggProject_ + , _igggUserIp = Nothing + , _igggZone = pIgggZone_ + , _igggKey = Nothing + , _igggOauthToken = Nothing + , _igggInstanceGroup = pIgggInstanceGroup_ + , _igggFields = Nothing + , _igggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igggQuotaUser :: Lens' InstanceGroupsGet' (Maybe Text) +igggQuotaUser + = lens _igggQuotaUser + (\ s a -> s{_igggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igggPrettyPrint :: Lens' InstanceGroupsGet' Bool +igggPrettyPrint + = lens _igggPrettyPrint + (\ s a -> s{_igggPrettyPrint = a}) + +-- | The project ID for this request. +igggProject :: Lens' InstanceGroupsGet' Text +igggProject + = lens _igggProject (\ s a -> s{_igggProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igggUserIp :: Lens' InstanceGroupsGet' (Maybe Text) +igggUserIp + = lens _igggUserIp (\ s a -> s{_igggUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igggZone :: Lens' InstanceGroupsGet' Text +igggZone = lens _igggZone (\ s a -> s{_igggZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igggKey :: Lens' InstanceGroupsGet' (Maybe Text) +igggKey = lens _igggKey (\ s a -> s{_igggKey = a}) + +-- | OAuth 2.0 token for the current user. +igggOauthToken :: Lens' InstanceGroupsGet' (Maybe Text) +igggOauthToken + = lens _igggOauthToken + (\ s a -> s{_igggOauthToken = a}) + +-- | The name of the instance group. +igggInstanceGroup :: Lens' InstanceGroupsGet' Text +igggInstanceGroup + = lens _igggInstanceGroup + (\ s a -> s{_igggInstanceGroup = a}) + +-- | Selector specifying which fields to include in a partial response. +igggFields :: Lens' InstanceGroupsGet' (Maybe Text) +igggFields + = lens _igggFields (\ s a -> s{_igggFields = a}) + +-- | Data format for the response. +igggAlt :: Lens' InstanceGroupsGet' Text +igggAlt = lens _igggAlt (\ s a -> s{_igggAlt = a}) + +instance GoogleRequest InstanceGroupsGet' where + type Rs InstanceGroupsGet' = InstanceGroup + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsGet{..} + = go _igggQuotaUser _igggPrettyPrint _igggProject + _igggUserIp + _igggZone + _igggKey + _igggOauthToken + _igggInstanceGroup + _igggFields + _igggAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs new file mode 100644 index 000000000..f2e72434e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an instance group in the specified project using the parameters +-- that are included in the request. +-- +-- /See:/ for @ComputeInstanceGroupsInsert@. +module Compute.InstanceGroups.Insert + ( + -- * REST Resource + InstanceGroupsInsertAPI + + -- * Creating a Request + , instanceGroupsInsert + , InstanceGroupsInsert + + -- * Request Lenses + , igiQuotaUser + , igiPrettyPrint + , igiProject + , igiUserIp + , igiZone + , igiKey + , igiOauthToken + , igiFields + , igiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsInsert@ which the +-- 'InstanceGroupsInsert' request conforms to. +type InstanceGroupsInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> Post '[JSON] Operation + +-- | Creates an instance group in the specified project using the parameters +-- that are included in the request. +-- +-- /See:/ 'instanceGroupsInsert' smart constructor. +data InstanceGroupsInsert = InstanceGroupsInsert + { _igiQuotaUser :: !(Maybe Text) + , _igiPrettyPrint :: !Bool + , _igiProject :: !Text + , _igiUserIp :: !(Maybe Text) + , _igiZone :: !Text + , _igiKey :: !(Maybe Text) + , _igiOauthToken :: !(Maybe Text) + , _igiFields :: !(Maybe Text) + , _igiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igiQuotaUser' +-- +-- * 'igiPrettyPrint' +-- +-- * 'igiProject' +-- +-- * 'igiUserIp' +-- +-- * 'igiZone' +-- +-- * 'igiKey' +-- +-- * 'igiOauthToken' +-- +-- * 'igiFields' +-- +-- * 'igiAlt' +instanceGroupsInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstanceGroupsInsert +instanceGroupsInsert pIgiProject_ pIgiZone_ = + InstanceGroupsInsert + { _igiQuotaUser = Nothing + , _igiPrettyPrint = True + , _igiProject = pIgiProject_ + , _igiUserIp = Nothing + , _igiZone = pIgiZone_ + , _igiKey = Nothing + , _igiOauthToken = Nothing + , _igiFields = Nothing + , _igiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igiQuotaUser :: Lens' InstanceGroupsInsert' (Maybe Text) +igiQuotaUser + = lens _igiQuotaUser (\ s a -> s{_igiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igiPrettyPrint :: Lens' InstanceGroupsInsert' Bool +igiPrettyPrint + = lens _igiPrettyPrint + (\ s a -> s{_igiPrettyPrint = a}) + +-- | The project ID for this request. +igiProject :: Lens' InstanceGroupsInsert' Text +igiProject + = lens _igiProject (\ s a -> s{_igiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igiUserIp :: Lens' InstanceGroupsInsert' (Maybe Text) +igiUserIp + = lens _igiUserIp (\ s a -> s{_igiUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igiZone :: Lens' InstanceGroupsInsert' Text +igiZone = lens _igiZone (\ s a -> s{_igiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igiKey :: Lens' InstanceGroupsInsert' (Maybe Text) +igiKey = lens _igiKey (\ s a -> s{_igiKey = a}) + +-- | OAuth 2.0 token for the current user. +igiOauthToken :: Lens' InstanceGroupsInsert' (Maybe Text) +igiOauthToken + = lens _igiOauthToken + (\ s a -> s{_igiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igiFields :: Lens' InstanceGroupsInsert' (Maybe Text) +igiFields + = lens _igiFields (\ s a -> s{_igiFields = a}) + +-- | Data format for the response. +igiAlt :: Lens' InstanceGroupsInsert' Text +igiAlt = lens _igiAlt (\ s a -> s{_igiAlt = a}) + +instance GoogleRequest InstanceGroupsInsert' where + type Rs InstanceGroupsInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsInsert{..} + = go _igiQuotaUser _igiPrettyPrint _igiProject + _igiUserIp + _igiZone + _igiKey + _igiOauthToken + _igiFields + _igiAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/List.hs new file mode 100644 index 000000000..a27d1ea8f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of instance groups that are located in the specified +-- project and zone. +-- +-- /See:/ for @ComputeInstanceGroupsList@. +module Compute.InstanceGroups.List + ( + -- * REST Resource + InstanceGroupsListAPI + + -- * Creating a Request + , instanceGroupsList + , InstanceGroupsList + + -- * Request Lenses + , iglQuotaUser + , iglPrettyPrint + , iglProject + , iglUserIp + , iglZone + , iglKey + , iglFilter + , iglPageToken + , iglOauthToken + , iglMaxResults + , iglFields + , iglAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsList@ which the +-- 'InstanceGroupsList' request conforms to. +type InstanceGroupsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceGroupList + +-- | Retrieves the list of instance groups that are located in the specified +-- project and zone. +-- +-- /See:/ 'instanceGroupsList' smart constructor. +data InstanceGroupsList = InstanceGroupsList + { _iglQuotaUser :: !(Maybe Text) + , _iglPrettyPrint :: !Bool + , _iglProject :: !Text + , _iglUserIp :: !(Maybe Text) + , _iglZone :: !Text + , _iglKey :: !(Maybe Text) + , _iglFilter :: !(Maybe Text) + , _iglPageToken :: !(Maybe Text) + , _iglOauthToken :: !(Maybe Text) + , _iglMaxResults :: !Word32 + , _iglFields :: !(Maybe Text) + , _iglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iglQuotaUser' +-- +-- * 'iglPrettyPrint' +-- +-- * 'iglProject' +-- +-- * 'iglUserIp' +-- +-- * 'iglZone' +-- +-- * 'iglKey' +-- +-- * 'iglFilter' +-- +-- * 'iglPageToken' +-- +-- * 'iglOauthToken' +-- +-- * 'iglMaxResults' +-- +-- * 'iglFields' +-- +-- * 'iglAlt' +instanceGroupsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstanceGroupsList +instanceGroupsList pIglProject_ pIglZone_ = + InstanceGroupsList + { _iglQuotaUser = Nothing + , _iglPrettyPrint = True + , _iglProject = pIglProject_ + , _iglUserIp = Nothing + , _iglZone = pIglZone_ + , _iglKey = Nothing + , _iglFilter = Nothing + , _iglPageToken = Nothing + , _iglOauthToken = Nothing + , _iglMaxResults = 500 + , _iglFields = Nothing + , _iglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iglQuotaUser :: Lens' InstanceGroupsList' (Maybe Text) +iglQuotaUser + = lens _iglQuotaUser (\ s a -> s{_iglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iglPrettyPrint :: Lens' InstanceGroupsList' Bool +iglPrettyPrint + = lens _iglPrettyPrint + (\ s a -> s{_iglPrettyPrint = a}) + +-- | The project ID for this request. +iglProject :: Lens' InstanceGroupsList' Text +iglProject + = lens _iglProject (\ s a -> s{_iglProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iglUserIp :: Lens' InstanceGroupsList' (Maybe Text) +iglUserIp + = lens _iglUserIp (\ s a -> s{_iglUserIp = a}) + +-- | The URL of the zone where the instance group is located. +iglZone :: Lens' InstanceGroupsList' Text +iglZone = lens _iglZone (\ s a -> s{_iglZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iglKey :: Lens' InstanceGroupsList' (Maybe Text) +iglKey = lens _iglKey (\ s a -> s{_iglKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +iglFilter :: Lens' InstanceGroupsList' (Maybe Text) +iglFilter + = lens _iglFilter (\ s a -> s{_iglFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +iglPageToken :: Lens' InstanceGroupsList' (Maybe Text) +iglPageToken + = lens _iglPageToken (\ s a -> s{_iglPageToken = a}) + +-- | OAuth 2.0 token for the current user. +iglOauthToken :: Lens' InstanceGroupsList' (Maybe Text) +iglOauthToken + = lens _iglOauthToken + (\ s a -> s{_iglOauthToken = a}) + +-- | Maximum count of results to be returned. +iglMaxResults :: Lens' InstanceGroupsList' Word32 +iglMaxResults + = lens _iglMaxResults + (\ s a -> s{_iglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +iglFields :: Lens' InstanceGroupsList' (Maybe Text) +iglFields + = lens _iglFields (\ s a -> s{_iglFields = a}) + +-- | Data format for the response. +iglAlt :: Lens' InstanceGroupsList' Text +iglAlt = lens _iglAlt (\ s a -> s{_iglAlt = a}) + +instance GoogleRequest InstanceGroupsList' where + type Rs InstanceGroupsList' = InstanceGroupList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsList{..} + = go _iglQuotaUser _iglPrettyPrint _iglProject + _iglUserIp + _iglZone + _iglKey + _iglFilter + _iglPageToken + _iglOauthToken + (Just _iglMaxResults) + _iglFields + _iglAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/ListInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/ListInstances.hs new file mode 100644 index 000000000..fa87e2f40 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/ListInstances.hs @@ -0,0 +1,245 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.ListInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists instances in an instance group. The parameters for this method +-- specify whether the list filters instances by state and named ports +-- information. +-- +-- /See:/ for @ComputeInstanceGroupsListInstances@. +module Compute.InstanceGroups.ListInstances + ( + -- * REST Resource + InstanceGroupsListInstancesAPI + + -- * Creating a Request + , instanceGroupsListInstances + , InstanceGroupsListInstances + + -- * Request Lenses + , igliQuotaUser + , igliPrettyPrint + , igliProject + , igliUserIp + , igliZone + , igliKey + , igliFilter + , igliPageToken + , igliOauthToken + , igliInstanceGroup + , igliMaxResults + , igliFields + , igliAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsListInstances@ which the +-- 'InstanceGroupsListInstances' request conforms to. +type InstanceGroupsListInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + "listInstances" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Post '[JSON] InstanceGroupsListInstances + +-- | Lists instances in an instance group. The parameters for this method +-- specify whether the list filters instances by state and named ports +-- information. +-- +-- /See:/ 'instanceGroupsListInstances' smart constructor. +data InstanceGroupsListInstances = InstanceGroupsListInstances + { _igliQuotaUser :: !(Maybe Text) + , _igliPrettyPrint :: !Bool + , _igliProject :: !Text + , _igliUserIp :: !(Maybe Text) + , _igliZone :: !Text + , _igliKey :: !(Maybe Text) + , _igliFilter :: !(Maybe Text) + , _igliPageToken :: !(Maybe Text) + , _igliOauthToken :: !(Maybe Text) + , _igliInstanceGroup :: !Text + , _igliMaxResults :: !Word32 + , _igliFields :: !(Maybe Text) + , _igliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsListInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igliQuotaUser' +-- +-- * 'igliPrettyPrint' +-- +-- * 'igliProject' +-- +-- * 'igliUserIp' +-- +-- * 'igliZone' +-- +-- * 'igliKey' +-- +-- * 'igliFilter' +-- +-- * 'igliPageToken' +-- +-- * 'igliOauthToken' +-- +-- * 'igliInstanceGroup' +-- +-- * 'igliMaxResults' +-- +-- * 'igliFields' +-- +-- * 'igliAlt' +instanceGroupsListInstances + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsListInstances +instanceGroupsListInstances pIgliProject_ pIgliZone_ pIgliInstanceGroup_ = + InstanceGroupsListInstances + { _igliQuotaUser = Nothing + , _igliPrettyPrint = True + , _igliProject = pIgliProject_ + , _igliUserIp = Nothing + , _igliZone = pIgliZone_ + , _igliKey = Nothing + , _igliFilter = Nothing + , _igliPageToken = Nothing + , _igliOauthToken = Nothing + , _igliInstanceGroup = pIgliInstanceGroup_ + , _igliMaxResults = 500 + , _igliFields = Nothing + , _igliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igliQuotaUser :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliQuotaUser + = lens _igliQuotaUser + (\ s a -> s{_igliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igliPrettyPrint :: Lens' InstanceGroupsListInstances' Bool +igliPrettyPrint + = lens _igliPrettyPrint + (\ s a -> s{_igliPrettyPrint = a}) + +-- | The project ID for this request. +igliProject :: Lens' InstanceGroupsListInstances' Text +igliProject + = lens _igliProject (\ s a -> s{_igliProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igliUserIp :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliUserIp + = lens _igliUserIp (\ s a -> s{_igliUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igliZone :: Lens' InstanceGroupsListInstances' Text +igliZone = lens _igliZone (\ s a -> s{_igliZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igliKey :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliKey = lens _igliKey (\ s a -> s{_igliKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +igliFilter :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliFilter + = lens _igliFilter (\ s a -> s{_igliFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +igliPageToken :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliPageToken + = lens _igliPageToken + (\ s a -> s{_igliPageToken = a}) + +-- | OAuth 2.0 token for the current user. +igliOauthToken :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliOauthToken + = lens _igliOauthToken + (\ s a -> s{_igliOauthToken = a}) + +-- | The name of the instance group from which you want to generate a list of +-- included instances. +igliInstanceGroup :: Lens' InstanceGroupsListInstances' Text +igliInstanceGroup + = lens _igliInstanceGroup + (\ s a -> s{_igliInstanceGroup = a}) + +-- | Maximum count of results to be returned. +igliMaxResults :: Lens' InstanceGroupsListInstances' Word32 +igliMaxResults + = lens _igliMaxResults + (\ s a -> s{_igliMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +igliFields :: Lens' InstanceGroupsListInstances' (Maybe Text) +igliFields + = lens _igliFields (\ s a -> s{_igliFields = a}) + +-- | Data format for the response. +igliAlt :: Lens' InstanceGroupsListInstances' Text +igliAlt = lens _igliAlt (\ s a -> s{_igliAlt = a}) + +instance GoogleRequest InstanceGroupsListInstances' + where + type Rs InstanceGroupsListInstances' = + InstanceGroupsListInstances + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsListInstances{..} + = go _igliQuotaUser _igliPrettyPrint _igliProject + _igliUserIp + _igliZone + _igliKey + _igliFilter + _igliPageToken + _igliOauthToken + _igliInstanceGroup + (Just _igliMaxResults) + _igliFields + _igliAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsListInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/RemoveInstances.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/RemoveInstances.hs new file mode 100644 index 000000000..096d6e694 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/RemoveInstances.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.RemoveInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a list of instances from an instance group. +-- +-- /See:/ for @ComputeInstanceGroupsRemoveInstances@. +module Compute.InstanceGroups.RemoveInstances + ( + -- * REST Resource + InstanceGroupsRemoveInstancesAPI + + -- * Creating a Request + , instanceGroupsRemoveInstances + , InstanceGroupsRemoveInstances + + -- * Request Lenses + , igriQuotaUser + , igriPrettyPrint + , igriProject + , igriUserIp + , igriZone + , igriKey + , igriOauthToken + , igriInstanceGroup + , igriFields + , igriAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsRemoveInstances@ which the +-- 'InstanceGroupsRemoveInstances' request conforms to. +type InstanceGroupsRemoveInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + "removeInstances" :> Post '[JSON] Operation + +-- | Removes a list of instances from an instance group. +-- +-- /See:/ 'instanceGroupsRemoveInstances' smart constructor. +data InstanceGroupsRemoveInstances = InstanceGroupsRemoveInstances + { _igriQuotaUser :: !(Maybe Text) + , _igriPrettyPrint :: !Bool + , _igriProject :: !Text + , _igriUserIp :: !(Maybe Text) + , _igriZone :: !Text + , _igriKey :: !(Maybe Text) + , _igriOauthToken :: !(Maybe Text) + , _igriInstanceGroup :: !Text + , _igriFields :: !(Maybe Text) + , _igriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsRemoveInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igriQuotaUser' +-- +-- * 'igriPrettyPrint' +-- +-- * 'igriProject' +-- +-- * 'igriUserIp' +-- +-- * 'igriZone' +-- +-- * 'igriKey' +-- +-- * 'igriOauthToken' +-- +-- * 'igriInstanceGroup' +-- +-- * 'igriFields' +-- +-- * 'igriAlt' +instanceGroupsRemoveInstances + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsRemoveInstances +instanceGroupsRemoveInstances pIgriProject_ pIgriZone_ pIgriInstanceGroup_ = + InstanceGroupsRemoveInstances + { _igriQuotaUser = Nothing + , _igriPrettyPrint = True + , _igriProject = pIgriProject_ + , _igriUserIp = Nothing + , _igriZone = pIgriZone_ + , _igriKey = Nothing + , _igriOauthToken = Nothing + , _igriInstanceGroup = pIgriInstanceGroup_ + , _igriFields = Nothing + , _igriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igriQuotaUser :: Lens' InstanceGroupsRemoveInstances' (Maybe Text) +igriQuotaUser + = lens _igriQuotaUser + (\ s a -> s{_igriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igriPrettyPrint :: Lens' InstanceGroupsRemoveInstances' Bool +igriPrettyPrint + = lens _igriPrettyPrint + (\ s a -> s{_igriPrettyPrint = a}) + +-- | The project ID for this request. +igriProject :: Lens' InstanceGroupsRemoveInstances' Text +igriProject + = lens _igriProject (\ s a -> s{_igriProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igriUserIp :: Lens' InstanceGroupsRemoveInstances' (Maybe Text) +igriUserIp + = lens _igriUserIp (\ s a -> s{_igriUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igriZone :: Lens' InstanceGroupsRemoveInstances' Text +igriZone = lens _igriZone (\ s a -> s{_igriZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igriKey :: Lens' InstanceGroupsRemoveInstances' (Maybe Text) +igriKey = lens _igriKey (\ s a -> s{_igriKey = a}) + +-- | OAuth 2.0 token for the current user. +igriOauthToken :: Lens' InstanceGroupsRemoveInstances' (Maybe Text) +igriOauthToken + = lens _igriOauthToken + (\ s a -> s{_igriOauthToken = a}) + +-- | The name of the instance group where the specified instances will be +-- removed. +igriInstanceGroup :: Lens' InstanceGroupsRemoveInstances' Text +igriInstanceGroup + = lens _igriInstanceGroup + (\ s a -> s{_igriInstanceGroup = a}) + +-- | Selector specifying which fields to include in a partial response. +igriFields :: Lens' InstanceGroupsRemoveInstances' (Maybe Text) +igriFields + = lens _igriFields (\ s a -> s{_igriFields = a}) + +-- | Data format for the response. +igriAlt :: Lens' InstanceGroupsRemoveInstances' Text +igriAlt = lens _igriAlt (\ s a -> s{_igriAlt = a}) + +instance GoogleRequest InstanceGroupsRemoveInstances' + where + type Rs InstanceGroupsRemoveInstances' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + InstanceGroupsRemoveInstances{..} + = go _igriQuotaUser _igriPrettyPrint _igriProject + _igriUserIp + _igriZone + _igriKey + _igriOauthToken + _igriInstanceGroup + _igriFields + _igriAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsRemoveInstancesAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/SetNamedPorts.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/SetNamedPorts.hs new file mode 100644 index 000000000..db9915d1c --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/SetNamedPorts.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceGroups.SetNamedPorts +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the named ports in an instance group. +-- +-- /See:/ for @ComputeInstanceGroupsSetNamedPorts@. +module Compute.InstanceGroups.SetNamedPorts + ( + -- * REST Resource + InstanceGroupsSetNamedPortsAPI + + -- * Creating a Request + , instanceGroupsSetNamedPorts + , InstanceGroupsSetNamedPorts + + -- * Request Lenses + , igsnpQuotaUser + , igsnpPrettyPrint + , igsnpProject + , igsnpUserIp + , igsnpZone + , igsnpKey + , igsnpOauthToken + , igsnpInstanceGroup + , igsnpFields + , igsnpAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceGroupsSetNamedPorts@ which the +-- 'InstanceGroupsSetNamedPorts' request conforms to. +type InstanceGroupsSetNamedPortsAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroups" :> + Capture "instanceGroup" Text :> + "setNamedPorts" :> Post '[JSON] Operation + +-- | Sets the named ports in an instance group. +-- +-- /See:/ 'instanceGroupsSetNamedPorts' smart constructor. +data InstanceGroupsSetNamedPorts = InstanceGroupsSetNamedPorts + { _igsnpQuotaUser :: !(Maybe Text) + , _igsnpPrettyPrint :: !Bool + , _igsnpProject :: !Text + , _igsnpUserIp :: !(Maybe Text) + , _igsnpZone :: !Text + , _igsnpKey :: !(Maybe Text) + , _igsnpOauthToken :: !(Maybe Text) + , _igsnpInstanceGroup :: !Text + , _igsnpFields :: !(Maybe Text) + , _igsnpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupsSetNamedPorts'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igsnpQuotaUser' +-- +-- * 'igsnpPrettyPrint' +-- +-- * 'igsnpProject' +-- +-- * 'igsnpUserIp' +-- +-- * 'igsnpZone' +-- +-- * 'igsnpKey' +-- +-- * 'igsnpOauthToken' +-- +-- * 'igsnpInstanceGroup' +-- +-- * 'igsnpFields' +-- +-- * 'igsnpAlt' +instanceGroupsSetNamedPorts + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instanceGroup' + -> InstanceGroupsSetNamedPorts +instanceGroupsSetNamedPorts pIgsnpProject_ pIgsnpZone_ pIgsnpInstanceGroup_ = + InstanceGroupsSetNamedPorts + { _igsnpQuotaUser = Nothing + , _igsnpPrettyPrint = True + , _igsnpProject = pIgsnpProject_ + , _igsnpUserIp = Nothing + , _igsnpZone = pIgsnpZone_ + , _igsnpKey = Nothing + , _igsnpOauthToken = Nothing + , _igsnpInstanceGroup = pIgsnpInstanceGroup_ + , _igsnpFields = Nothing + , _igsnpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igsnpQuotaUser :: Lens' InstanceGroupsSetNamedPorts' (Maybe Text) +igsnpQuotaUser + = lens _igsnpQuotaUser + (\ s a -> s{_igsnpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igsnpPrettyPrint :: Lens' InstanceGroupsSetNamedPorts' Bool +igsnpPrettyPrint + = lens _igsnpPrettyPrint + (\ s a -> s{_igsnpPrettyPrint = a}) + +-- | The project ID for this request. +igsnpProject :: Lens' InstanceGroupsSetNamedPorts' Text +igsnpProject + = lens _igsnpProject (\ s a -> s{_igsnpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igsnpUserIp :: Lens' InstanceGroupsSetNamedPorts' (Maybe Text) +igsnpUserIp + = lens _igsnpUserIp (\ s a -> s{_igsnpUserIp = a}) + +-- | The URL of the zone where the instance group is located. +igsnpZone :: Lens' InstanceGroupsSetNamedPorts' Text +igsnpZone + = lens _igsnpZone (\ s a -> s{_igsnpZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igsnpKey :: Lens' InstanceGroupsSetNamedPorts' (Maybe Text) +igsnpKey = lens _igsnpKey (\ s a -> s{_igsnpKey = a}) + +-- | OAuth 2.0 token for the current user. +igsnpOauthToken :: Lens' InstanceGroupsSetNamedPorts' (Maybe Text) +igsnpOauthToken + = lens _igsnpOauthToken + (\ s a -> s{_igsnpOauthToken = a}) + +-- | The name of the instance group where the named ports are updated. +igsnpInstanceGroup :: Lens' InstanceGroupsSetNamedPorts' Text +igsnpInstanceGroup + = lens _igsnpInstanceGroup + (\ s a -> s{_igsnpInstanceGroup = a}) + +-- | Selector specifying which fields to include in a partial response. +igsnpFields :: Lens' InstanceGroupsSetNamedPorts' (Maybe Text) +igsnpFields + = lens _igsnpFields (\ s a -> s{_igsnpFields = a}) + +-- | Data format for the response. +igsnpAlt :: Lens' InstanceGroupsSetNamedPorts' Text +igsnpAlt = lens _igsnpAlt (\ s a -> s{_igsnpAlt = a}) + +instance GoogleRequest InstanceGroupsSetNamedPorts' + where + type Rs InstanceGroupsSetNamedPorts' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceGroupsSetNamedPorts{..} + = go _igsnpQuotaUser _igsnpPrettyPrint _igsnpProject + _igsnpUserIp + _igsnpZone + _igsnpKey + _igsnpOauthToken + _igsnpInstanceGroup + _igsnpFields + _igsnpAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupsSetNamedPortsAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Delete.hs new file mode 100644 index 000000000..9590b33c2 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceTemplates.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified instance template. +-- +-- /See:/ for @ComputeInstanceTemplatesDelete@. +module Compute.InstanceTemplates.Delete + ( + -- * REST Resource + InstanceTemplatesDeleteAPI + + -- * Creating a Request + , instanceTemplatesDelete + , InstanceTemplatesDelete + + -- * Request Lenses + , itdQuotaUser + , itdPrettyPrint + , itdProject + , itdUserIp + , itdInstanceTemplate + , itdKey + , itdOauthToken + , itdFields + , itdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceTemplatesDelete@ which the +-- 'InstanceTemplatesDelete' request conforms to. +type InstanceTemplatesDeleteAPI = + Capture "project" Text :> + "global" :> + "instanceTemplates" :> + Capture "instanceTemplate" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified instance template. +-- +-- /See:/ 'instanceTemplatesDelete' smart constructor. +data InstanceTemplatesDelete = InstanceTemplatesDelete + { _itdQuotaUser :: !(Maybe Text) + , _itdPrettyPrint :: !Bool + , _itdProject :: !Text + , _itdUserIp :: !(Maybe Text) + , _itdInstanceTemplate :: !Text + , _itdKey :: !(Maybe Text) + , _itdOauthToken :: !(Maybe Text) + , _itdFields :: !(Maybe Text) + , _itdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplatesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itdQuotaUser' +-- +-- * 'itdPrettyPrint' +-- +-- * 'itdProject' +-- +-- * 'itdUserIp' +-- +-- * 'itdInstanceTemplate' +-- +-- * 'itdKey' +-- +-- * 'itdOauthToken' +-- +-- * 'itdFields' +-- +-- * 'itdAlt' +instanceTemplatesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'instanceTemplate' + -> InstanceTemplatesDelete +instanceTemplatesDelete pItdProject_ pItdInstanceTemplate_ = + InstanceTemplatesDelete + { _itdQuotaUser = Nothing + , _itdPrettyPrint = True + , _itdProject = pItdProject_ + , _itdUserIp = Nothing + , _itdInstanceTemplate = pItdInstanceTemplate_ + , _itdKey = Nothing + , _itdOauthToken = Nothing + , _itdFields = Nothing + , _itdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +itdQuotaUser :: Lens' InstanceTemplatesDelete' (Maybe Text) +itdQuotaUser + = lens _itdQuotaUser (\ s a -> s{_itdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +itdPrettyPrint :: Lens' InstanceTemplatesDelete' Bool +itdPrettyPrint + = lens _itdPrettyPrint + (\ s a -> s{_itdPrettyPrint = a}) + +-- | The project ID for this request. +itdProject :: Lens' InstanceTemplatesDelete' Text +itdProject + = lens _itdProject (\ s a -> s{_itdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +itdUserIp :: Lens' InstanceTemplatesDelete' (Maybe Text) +itdUserIp + = lens _itdUserIp (\ s a -> s{_itdUserIp = a}) + +-- | The name of the instance template to delete. +itdInstanceTemplate :: Lens' InstanceTemplatesDelete' Text +itdInstanceTemplate + = lens _itdInstanceTemplate + (\ s a -> s{_itdInstanceTemplate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +itdKey :: Lens' InstanceTemplatesDelete' (Maybe Text) +itdKey = lens _itdKey (\ s a -> s{_itdKey = a}) + +-- | OAuth 2.0 token for the current user. +itdOauthToken :: Lens' InstanceTemplatesDelete' (Maybe Text) +itdOauthToken + = lens _itdOauthToken + (\ s a -> s{_itdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +itdFields :: Lens' InstanceTemplatesDelete' (Maybe Text) +itdFields + = lens _itdFields (\ s a -> s{_itdFields = a}) + +-- | Data format for the response. +itdAlt :: Lens' InstanceTemplatesDelete' Text +itdAlt = lens _itdAlt (\ s a -> s{_itdAlt = a}) + +instance GoogleRequest InstanceTemplatesDelete' where + type Rs InstanceTemplatesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceTemplatesDelete{..} + = go _itdQuotaUser _itdPrettyPrint _itdProject + _itdUserIp + _itdInstanceTemplate + _itdKey + _itdOauthToken + _itdFields + _itdAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceTemplatesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Get.hs new file mode 100644 index 000000000..a260b2aad --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Get.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceTemplates.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified instance template resource. +-- +-- /See:/ for @ComputeInstanceTemplatesGet@. +module Compute.InstanceTemplates.Get + ( + -- * REST Resource + InstanceTemplatesGetAPI + + -- * Creating a Request + , instanceTemplatesGet + , InstanceTemplatesGet + + -- * Request Lenses + , itgQuotaUser + , itgPrettyPrint + , itgProject + , itgUserIp + , itgInstanceTemplate + , itgKey + , itgOauthToken + , itgFields + , itgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceTemplatesGet@ which the +-- 'InstanceTemplatesGet' request conforms to. +type InstanceTemplatesGetAPI = + Capture "project" Text :> + "global" :> + "instanceTemplates" :> + Capture "instanceTemplate" Text :> + Get '[JSON] InstanceTemplate + +-- | Returns the specified instance template resource. +-- +-- /See:/ 'instanceTemplatesGet' smart constructor. +data InstanceTemplatesGet = InstanceTemplatesGet + { _itgQuotaUser :: !(Maybe Text) + , _itgPrettyPrint :: !Bool + , _itgProject :: !Text + , _itgUserIp :: !(Maybe Text) + , _itgInstanceTemplate :: !Text + , _itgKey :: !(Maybe Text) + , _itgOauthToken :: !(Maybe Text) + , _itgFields :: !(Maybe Text) + , _itgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplatesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itgQuotaUser' +-- +-- * 'itgPrettyPrint' +-- +-- * 'itgProject' +-- +-- * 'itgUserIp' +-- +-- * 'itgInstanceTemplate' +-- +-- * 'itgKey' +-- +-- * 'itgOauthToken' +-- +-- * 'itgFields' +-- +-- * 'itgAlt' +instanceTemplatesGet + :: Text -- ^ 'project' + -> Text -- ^ 'instanceTemplate' + -> InstanceTemplatesGet +instanceTemplatesGet pItgProject_ pItgInstanceTemplate_ = + InstanceTemplatesGet + { _itgQuotaUser = Nothing + , _itgPrettyPrint = True + , _itgProject = pItgProject_ + , _itgUserIp = Nothing + , _itgInstanceTemplate = pItgInstanceTemplate_ + , _itgKey = Nothing + , _itgOauthToken = Nothing + , _itgFields = Nothing + , _itgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +itgQuotaUser :: Lens' InstanceTemplatesGet' (Maybe Text) +itgQuotaUser + = lens _itgQuotaUser (\ s a -> s{_itgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +itgPrettyPrint :: Lens' InstanceTemplatesGet' Bool +itgPrettyPrint + = lens _itgPrettyPrint + (\ s a -> s{_itgPrettyPrint = a}) + +-- | The project ID for this request. +itgProject :: Lens' InstanceTemplatesGet' Text +itgProject + = lens _itgProject (\ s a -> s{_itgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +itgUserIp :: Lens' InstanceTemplatesGet' (Maybe Text) +itgUserIp + = lens _itgUserIp (\ s a -> s{_itgUserIp = a}) + +-- | The name of the instance template. +itgInstanceTemplate :: Lens' InstanceTemplatesGet' Text +itgInstanceTemplate + = lens _itgInstanceTemplate + (\ s a -> s{_itgInstanceTemplate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +itgKey :: Lens' InstanceTemplatesGet' (Maybe Text) +itgKey = lens _itgKey (\ s a -> s{_itgKey = a}) + +-- | OAuth 2.0 token for the current user. +itgOauthToken :: Lens' InstanceTemplatesGet' (Maybe Text) +itgOauthToken + = lens _itgOauthToken + (\ s a -> s{_itgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +itgFields :: Lens' InstanceTemplatesGet' (Maybe Text) +itgFields + = lens _itgFields (\ s a -> s{_itgFields = a}) + +-- | Data format for the response. +itgAlt :: Lens' InstanceTemplatesGet' Text +itgAlt = lens _itgAlt (\ s a -> s{_itgAlt = a}) + +instance GoogleRequest InstanceTemplatesGet' where + type Rs InstanceTemplatesGet' = InstanceTemplate + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceTemplatesGet{..} + = go _itgQuotaUser _itgPrettyPrint _itgProject + _itgUserIp + _itgInstanceTemplate + _itgKey + _itgOauthToken + _itgFields + _itgAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceTemplatesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Insert.hs new file mode 100644 index 000000000..55f9801f6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/Insert.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceTemplates.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an instance template in the specified project using the data +-- that is included in the request. +-- +-- /See:/ for @ComputeInstanceTemplatesInsert@. +module Compute.InstanceTemplates.Insert + ( + -- * REST Resource + InstanceTemplatesInsertAPI + + -- * Creating a Request + , instanceTemplatesInsert + , InstanceTemplatesInsert + + -- * Request Lenses + , itiQuotaUser + , itiPrettyPrint + , itiProject + , itiUserIp + , itiKey + , itiOauthToken + , itiFields + , itiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceTemplatesInsert@ which the +-- 'InstanceTemplatesInsert' request conforms to. +type InstanceTemplatesInsertAPI = + Capture "project" Text :> + "global" :> + "instanceTemplates" :> Post '[JSON] Operation + +-- | Creates an instance template in the specified project using the data +-- that is included in the request. +-- +-- /See:/ 'instanceTemplatesInsert' smart constructor. +data InstanceTemplatesInsert = InstanceTemplatesInsert + { _itiQuotaUser :: !(Maybe Text) + , _itiPrettyPrint :: !Bool + , _itiProject :: !Text + , _itiUserIp :: !(Maybe Text) + , _itiKey :: !(Maybe Text) + , _itiOauthToken :: !(Maybe Text) + , _itiFields :: !(Maybe Text) + , _itiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplatesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itiQuotaUser' +-- +-- * 'itiPrettyPrint' +-- +-- * 'itiProject' +-- +-- * 'itiUserIp' +-- +-- * 'itiKey' +-- +-- * 'itiOauthToken' +-- +-- * 'itiFields' +-- +-- * 'itiAlt' +instanceTemplatesInsert + :: Text -- ^ 'project' + -> InstanceTemplatesInsert +instanceTemplatesInsert pItiProject_ = + InstanceTemplatesInsert + { _itiQuotaUser = Nothing + , _itiPrettyPrint = True + , _itiProject = pItiProject_ + , _itiUserIp = Nothing + , _itiKey = Nothing + , _itiOauthToken = Nothing + , _itiFields = Nothing + , _itiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +itiQuotaUser :: Lens' InstanceTemplatesInsert' (Maybe Text) +itiQuotaUser + = lens _itiQuotaUser (\ s a -> s{_itiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +itiPrettyPrint :: Lens' InstanceTemplatesInsert' Bool +itiPrettyPrint + = lens _itiPrettyPrint + (\ s a -> s{_itiPrettyPrint = a}) + +-- | The project ID for this request. +itiProject :: Lens' InstanceTemplatesInsert' Text +itiProject + = lens _itiProject (\ s a -> s{_itiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +itiUserIp :: Lens' InstanceTemplatesInsert' (Maybe Text) +itiUserIp + = lens _itiUserIp (\ s a -> s{_itiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +itiKey :: Lens' InstanceTemplatesInsert' (Maybe Text) +itiKey = lens _itiKey (\ s a -> s{_itiKey = a}) + +-- | OAuth 2.0 token for the current user. +itiOauthToken :: Lens' InstanceTemplatesInsert' (Maybe Text) +itiOauthToken + = lens _itiOauthToken + (\ s a -> s{_itiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +itiFields :: Lens' InstanceTemplatesInsert' (Maybe Text) +itiFields + = lens _itiFields (\ s a -> s{_itiFields = a}) + +-- | Data format for the response. +itiAlt :: Lens' InstanceTemplatesInsert' Text +itiAlt = lens _itiAlt (\ s a -> s{_itiAlt = a}) + +instance GoogleRequest InstanceTemplatesInsert' where + type Rs InstanceTemplatesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceTemplatesInsert{..} + = go _itiQuotaUser _itiPrettyPrint _itiProject + _itiUserIp + _itiKey + _itiOauthToken + _itiFields + _itiAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceTemplatesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/List.hs new file mode 100644 index 000000000..1d58a5712 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/InstanceTemplates/List.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.InstanceTemplates.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of instance templates that are contained within the +-- specified project and zone. +-- +-- /See:/ for @ComputeInstanceTemplatesList@. +module Compute.InstanceTemplates.List + ( + -- * REST Resource + InstanceTemplatesListAPI + + -- * Creating a Request + , instanceTemplatesList + , InstanceTemplatesList + + -- * Request Lenses + , itlQuotaUser + , itlPrettyPrint + , itlProject + , itlUserIp + , itlKey + , itlFilter + , itlPageToken + , itlOauthToken + , itlMaxResults + , itlFields + , itlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstanceTemplatesList@ which the +-- 'InstanceTemplatesList' request conforms to. +type InstanceTemplatesListAPI = + Capture "project" Text :> + "global" :> + "instanceTemplates" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceTemplateList + +-- | Retrieves a list of instance templates that are contained within the +-- specified project and zone. +-- +-- /See:/ 'instanceTemplatesList' smart constructor. +data InstanceTemplatesList = InstanceTemplatesList + { _itlQuotaUser :: !(Maybe Text) + , _itlPrettyPrint :: !Bool + , _itlProject :: !Text + , _itlUserIp :: !(Maybe Text) + , _itlKey :: !(Maybe Text) + , _itlFilter :: !(Maybe Text) + , _itlPageToken :: !(Maybe Text) + , _itlOauthToken :: !(Maybe Text) + , _itlMaxResults :: !Word32 + , _itlFields :: !(Maybe Text) + , _itlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceTemplatesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itlQuotaUser' +-- +-- * 'itlPrettyPrint' +-- +-- * 'itlProject' +-- +-- * 'itlUserIp' +-- +-- * 'itlKey' +-- +-- * 'itlFilter' +-- +-- * 'itlPageToken' +-- +-- * 'itlOauthToken' +-- +-- * 'itlMaxResults' +-- +-- * 'itlFields' +-- +-- * 'itlAlt' +instanceTemplatesList + :: Text -- ^ 'project' + -> InstanceTemplatesList +instanceTemplatesList pItlProject_ = + InstanceTemplatesList + { _itlQuotaUser = Nothing + , _itlPrettyPrint = True + , _itlProject = pItlProject_ + , _itlUserIp = Nothing + , _itlKey = Nothing + , _itlFilter = Nothing + , _itlPageToken = Nothing + , _itlOauthToken = Nothing + , _itlMaxResults = 500 + , _itlFields = Nothing + , _itlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +itlQuotaUser :: Lens' InstanceTemplatesList' (Maybe Text) +itlQuotaUser + = lens _itlQuotaUser (\ s a -> s{_itlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +itlPrettyPrint :: Lens' InstanceTemplatesList' Bool +itlPrettyPrint + = lens _itlPrettyPrint + (\ s a -> s{_itlPrettyPrint = a}) + +-- | The project ID for this request. +itlProject :: Lens' InstanceTemplatesList' Text +itlProject + = lens _itlProject (\ s a -> s{_itlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +itlUserIp :: Lens' InstanceTemplatesList' (Maybe Text) +itlUserIp + = lens _itlUserIp (\ s a -> s{_itlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +itlKey :: Lens' InstanceTemplatesList' (Maybe Text) +itlKey = lens _itlKey (\ s a -> s{_itlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +itlFilter :: Lens' InstanceTemplatesList' (Maybe Text) +itlFilter + = lens _itlFilter (\ s a -> s{_itlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +itlPageToken :: Lens' InstanceTemplatesList' (Maybe Text) +itlPageToken + = lens _itlPageToken (\ s a -> s{_itlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +itlOauthToken :: Lens' InstanceTemplatesList' (Maybe Text) +itlOauthToken + = lens _itlOauthToken + (\ s a -> s{_itlOauthToken = a}) + +-- | Maximum count of results to be returned. +itlMaxResults :: Lens' InstanceTemplatesList' Word32 +itlMaxResults + = lens _itlMaxResults + (\ s a -> s{_itlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +itlFields :: Lens' InstanceTemplatesList' (Maybe Text) +itlFields + = lens _itlFields (\ s a -> s{_itlFields = a}) + +-- | Data format for the response. +itlAlt :: Lens' InstanceTemplatesList' Text +itlAlt = lens _itlAlt (\ s a -> s{_itlAlt = a}) + +instance GoogleRequest InstanceTemplatesList' where + type Rs InstanceTemplatesList' = InstanceTemplateList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstanceTemplatesList{..} + = go _itlQuotaUser _itlPrettyPrint _itlProject + _itlUserIp + _itlKey + _itlFilter + _itlPageToken + _itlOauthToken + (Just _itlMaxResults) + _itlFields + _itlAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceTemplatesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AddAccessConfig.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AddAccessConfig.hs new file mode 100644 index 000000000..1712d52c7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AddAccessConfig.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.AddAccessConfig +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds an access config to an instance\'s network interface. +-- +-- /See:/ for @ComputeInstancesAddAccessConfig@. +module Compute.Instances.AddAccessConfig + ( + -- * REST Resource + InstancesAddAccessConfigAPI + + -- * Creating a Request + , instancesAddAccessConfig + , InstancesAddAccessConfig + + -- * Request Lenses + , iaacQuotaUser + , iaacPrettyPrint + , iaacProject + , iaacUserIp + , iaacNetworkInterface + , iaacZone + , iaacKey + , iaacOauthToken + , iaacFields + , iaacAlt + , iaacInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesAddAccessConfig@ which the +-- 'InstancesAddAccessConfig' request conforms to. +type InstancesAddAccessConfigAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "addAccessConfig" :> + QueryParam "networkInterface" Text :> + Post '[JSON] Operation + +-- | Adds an access config to an instance\'s network interface. +-- +-- /See:/ 'instancesAddAccessConfig' smart constructor. +data InstancesAddAccessConfig = InstancesAddAccessConfig + { _iaacQuotaUser :: !(Maybe Text) + , _iaacPrettyPrint :: !Bool + , _iaacProject :: !Text + , _iaacUserIp :: !(Maybe Text) + , _iaacNetworkInterface :: !Text + , _iaacZone :: !Text + , _iaacKey :: !(Maybe Text) + , _iaacOauthToken :: !(Maybe Text) + , _iaacFields :: !(Maybe Text) + , _iaacAlt :: !Text + , _iaacInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesAddAccessConfig'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iaacQuotaUser' +-- +-- * 'iaacPrettyPrint' +-- +-- * 'iaacProject' +-- +-- * 'iaacUserIp' +-- +-- * 'iaacNetworkInterface' +-- +-- * 'iaacZone' +-- +-- * 'iaacKey' +-- +-- * 'iaacOauthToken' +-- +-- * 'iaacFields' +-- +-- * 'iaacAlt' +-- +-- * 'iaacInstance' +instancesAddAccessConfig + :: Text -- ^ 'project' + -> Text -- ^ 'networkInterface' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesAddAccessConfig +instancesAddAccessConfig pIaacProject_ pIaacNetworkInterface_ pIaacZone_ pIaacInstance_ = + InstancesAddAccessConfig + { _iaacQuotaUser = Nothing + , _iaacPrettyPrint = True + , _iaacProject = pIaacProject_ + , _iaacUserIp = Nothing + , _iaacNetworkInterface = pIaacNetworkInterface_ + , _iaacZone = pIaacZone_ + , _iaacKey = Nothing + , _iaacOauthToken = Nothing + , _iaacFields = Nothing + , _iaacAlt = "json" + , _iaacInstance = pIaacInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iaacQuotaUser :: Lens' InstancesAddAccessConfig' (Maybe Text) +iaacQuotaUser + = lens _iaacQuotaUser + (\ s a -> s{_iaacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iaacPrettyPrint :: Lens' InstancesAddAccessConfig' Bool +iaacPrettyPrint + = lens _iaacPrettyPrint + (\ s a -> s{_iaacPrettyPrint = a}) + +-- | Project ID for this request. +iaacProject :: Lens' InstancesAddAccessConfig' Text +iaacProject + = lens _iaacProject (\ s a -> s{_iaacProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iaacUserIp :: Lens' InstancesAddAccessConfig' (Maybe Text) +iaacUserIp + = lens _iaacUserIp (\ s a -> s{_iaacUserIp = a}) + +-- | The name of the network interface to add to this instance. +iaacNetworkInterface :: Lens' InstancesAddAccessConfig' Text +iaacNetworkInterface + = lens _iaacNetworkInterface + (\ s a -> s{_iaacNetworkInterface = a}) + +-- | The name of the zone for this request. +iaacZone :: Lens' InstancesAddAccessConfig' Text +iaacZone = lens _iaacZone (\ s a -> s{_iaacZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iaacKey :: Lens' InstancesAddAccessConfig' (Maybe Text) +iaacKey = lens _iaacKey (\ s a -> s{_iaacKey = a}) + +-- | OAuth 2.0 token for the current user. +iaacOauthToken :: Lens' InstancesAddAccessConfig' (Maybe Text) +iaacOauthToken + = lens _iaacOauthToken + (\ s a -> s{_iaacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iaacFields :: Lens' InstancesAddAccessConfig' (Maybe Text) +iaacFields + = lens _iaacFields (\ s a -> s{_iaacFields = a}) + +-- | Data format for the response. +iaacAlt :: Lens' InstancesAddAccessConfig' Text +iaacAlt = lens _iaacAlt (\ s a -> s{_iaacAlt = a}) + +-- | The instance name for this request. +iaacInstance :: Lens' InstancesAddAccessConfig' Text +iaacInstance + = lens _iaacInstance (\ s a -> s{_iaacInstance = a}) + +instance GoogleRequest InstancesAddAccessConfig' + where + type Rs InstancesAddAccessConfig' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesAddAccessConfig{..} + = go _iaacQuotaUser _iaacPrettyPrint _iaacProject + _iaacUserIp + (Just _iaacNetworkInterface) + _iaacZone + _iaacKey + _iaacOauthToken + _iaacFields + _iaacAlt + _iaacInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesAddAccessConfigAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AggregatedList.hs new file mode 100644 index 000000000..ec87e59da --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AggregatedList.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @ComputeInstancesAggregatedList@. +module Compute.Instances.AggregatedList + ( + -- * REST Resource + InstancesAggregatedListAPI + + -- * Creating a Request + , instancesAggregatedList + , InstancesAggregatedList + + -- * Request Lenses + , ialQuotaUser + , ialPrettyPrint + , ialProject + , ialUserIp + , ialKey + , ialFilter + , ialPageToken + , ialOauthToken + , ialMaxResults + , ialFields + , ialAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesAggregatedList@ which the +-- 'InstancesAggregatedList' request conforms to. +type InstancesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "instances" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceAggregatedList + +-- +-- /See:/ 'instancesAggregatedList' smart constructor. +data InstancesAggregatedList = InstancesAggregatedList + { _ialQuotaUser :: !(Maybe Text) + , _ialPrettyPrint :: !Bool + , _ialProject :: !Text + , _ialUserIp :: !(Maybe Text) + , _ialKey :: !(Maybe Text) + , _ialFilter :: !(Maybe Text) + , _ialPageToken :: !(Maybe Text) + , _ialOauthToken :: !(Maybe Text) + , _ialMaxResults :: !Word32 + , _ialFields :: !(Maybe Text) + , _ialAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ialQuotaUser' +-- +-- * 'ialPrettyPrint' +-- +-- * 'ialProject' +-- +-- * 'ialUserIp' +-- +-- * 'ialKey' +-- +-- * 'ialFilter' +-- +-- * 'ialPageToken' +-- +-- * 'ialOauthToken' +-- +-- * 'ialMaxResults' +-- +-- * 'ialFields' +-- +-- * 'ialAlt' +instancesAggregatedList + :: Text -- ^ 'project' + -> InstancesAggregatedList +instancesAggregatedList pIalProject_ = + InstancesAggregatedList + { _ialQuotaUser = Nothing + , _ialPrettyPrint = True + , _ialProject = pIalProject_ + , _ialUserIp = Nothing + , _ialKey = Nothing + , _ialFilter = Nothing + , _ialPageToken = Nothing + , _ialOauthToken = Nothing + , _ialMaxResults = 500 + , _ialFields = Nothing + , _ialAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ialQuotaUser :: Lens' InstancesAggregatedList' (Maybe Text) +ialQuotaUser + = lens _ialQuotaUser (\ s a -> s{_ialQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ialPrettyPrint :: Lens' InstancesAggregatedList' Bool +ialPrettyPrint + = lens _ialPrettyPrint + (\ s a -> s{_ialPrettyPrint = a}) + +-- | Project ID for this request. +ialProject :: Lens' InstancesAggregatedList' Text +ialProject + = lens _ialProject (\ s a -> s{_ialProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ialUserIp :: Lens' InstancesAggregatedList' (Maybe Text) +ialUserIp + = lens _ialUserIp (\ s a -> s{_ialUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ialKey :: Lens' InstancesAggregatedList' (Maybe Text) +ialKey = lens _ialKey (\ s a -> s{_ialKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +ialFilter :: Lens' InstancesAggregatedList' (Maybe Text) +ialFilter + = lens _ialFilter (\ s a -> s{_ialFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +ialPageToken :: Lens' InstancesAggregatedList' (Maybe Text) +ialPageToken + = lens _ialPageToken (\ s a -> s{_ialPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ialOauthToken :: Lens' InstancesAggregatedList' (Maybe Text) +ialOauthToken + = lens _ialOauthToken + (\ s a -> s{_ialOauthToken = a}) + +-- | Maximum count of results to be returned. +ialMaxResults :: Lens' InstancesAggregatedList' Word32 +ialMaxResults + = lens _ialMaxResults + (\ s a -> s{_ialMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ialFields :: Lens' InstancesAggregatedList' (Maybe Text) +ialFields + = lens _ialFields (\ s a -> s{_ialFields = a}) + +-- | Data format for the response. +ialAlt :: Lens' InstancesAggregatedList' Text +ialAlt = lens _ialAlt (\ s a -> s{_ialAlt = a}) + +instance GoogleRequest InstancesAggregatedList' where + type Rs InstancesAggregatedList' = + InstanceAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesAggregatedList{..} + = go _ialQuotaUser _ialPrettyPrint _ialProject + _ialUserIp + _ialKey + _ialFilter + _ialPageToken + _ialOauthToken + (Just _ialMaxResults) + _ialFields + _ialAlt + where go + = clientWithRoute + (Proxy :: Proxy InstancesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AttachDisk.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AttachDisk.hs new file mode 100644 index 000000000..85bbc7657 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/AttachDisk.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.AttachDisk +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Attaches a Disk resource to an instance. +-- +-- /See:/ for @ComputeInstancesAttachDisk@. +module Compute.Instances.AttachDisk + ( + -- * REST Resource + InstancesAttachDiskAPI + + -- * Creating a Request + , instancesAttachDisk + , InstancesAttachDisk + + -- * Request Lenses + , iadQuotaUser + , iadPrettyPrint + , iadProject + , iadUserIp + , iadZone + , iadKey + , iadOauthToken + , iadFields + , iadAlt + , iadInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesAttachDisk@ which the +-- 'InstancesAttachDisk' request conforms to. +type InstancesAttachDiskAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "attachDisk" :> Post '[JSON] Operation + +-- | Attaches a Disk resource to an instance. +-- +-- /See:/ 'instancesAttachDisk' smart constructor. +data InstancesAttachDisk = InstancesAttachDisk + { _iadQuotaUser :: !(Maybe Text) + , _iadPrettyPrint :: !Bool + , _iadProject :: !Text + , _iadUserIp :: !(Maybe Text) + , _iadZone :: !Text + , _iadKey :: !(Maybe Text) + , _iadOauthToken :: !(Maybe Text) + , _iadFields :: !(Maybe Text) + , _iadAlt :: !Text + , _iadInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesAttachDisk'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iadQuotaUser' +-- +-- * 'iadPrettyPrint' +-- +-- * 'iadProject' +-- +-- * 'iadUserIp' +-- +-- * 'iadZone' +-- +-- * 'iadKey' +-- +-- * 'iadOauthToken' +-- +-- * 'iadFields' +-- +-- * 'iadAlt' +-- +-- * 'iadInstance' +instancesAttachDisk + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesAttachDisk +instancesAttachDisk pIadProject_ pIadZone_ pIadInstance_ = + InstancesAttachDisk + { _iadQuotaUser = Nothing + , _iadPrettyPrint = True + , _iadProject = pIadProject_ + , _iadUserIp = Nothing + , _iadZone = pIadZone_ + , _iadKey = Nothing + , _iadOauthToken = Nothing + , _iadFields = Nothing + , _iadAlt = "json" + , _iadInstance = pIadInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iadQuotaUser :: Lens' InstancesAttachDisk' (Maybe Text) +iadQuotaUser + = lens _iadQuotaUser (\ s a -> s{_iadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iadPrettyPrint :: Lens' InstancesAttachDisk' Bool +iadPrettyPrint + = lens _iadPrettyPrint + (\ s a -> s{_iadPrettyPrint = a}) + +-- | Project ID for this request. +iadProject :: Lens' InstancesAttachDisk' Text +iadProject + = lens _iadProject (\ s a -> s{_iadProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iadUserIp :: Lens' InstancesAttachDisk' (Maybe Text) +iadUserIp + = lens _iadUserIp (\ s a -> s{_iadUserIp = a}) + +-- | The name of the zone for this request. +iadZone :: Lens' InstancesAttachDisk' Text +iadZone = lens _iadZone (\ s a -> s{_iadZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iadKey :: Lens' InstancesAttachDisk' (Maybe Text) +iadKey = lens _iadKey (\ s a -> s{_iadKey = a}) + +-- | OAuth 2.0 token for the current user. +iadOauthToken :: Lens' InstancesAttachDisk' (Maybe Text) +iadOauthToken + = lens _iadOauthToken + (\ s a -> s{_iadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iadFields :: Lens' InstancesAttachDisk' (Maybe Text) +iadFields + = lens _iadFields (\ s a -> s{_iadFields = a}) + +-- | Data format for the response. +iadAlt :: Lens' InstancesAttachDisk' Text +iadAlt = lens _iadAlt (\ s a -> s{_iadAlt = a}) + +-- | Instance name. +iadInstance :: Lens' InstancesAttachDisk' Text +iadInstance + = lens _iadInstance (\ s a -> s{_iadInstance = a}) + +instance GoogleRequest InstancesAttachDisk' where + type Rs InstancesAttachDisk' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesAttachDisk{..} + = go _iadQuotaUser _iadPrettyPrint _iadProject + _iadUserIp + _iadZone + _iadKey + _iadOauthToken + _iadFields + _iadAlt + _iadInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesAttachDiskAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Delete.hs new file mode 100644 index 000000000..1284fd884 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified Instance resource. For more information, see +-- Shutting down an instance. +-- +-- /See:/ for @ComputeInstancesDelete@. +module Compute.Instances.Delete + ( + -- * REST Resource + InstancesDeleteAPI + + -- * Creating a Request + , instancesDelete + , InstancesDelete + + -- * Request Lenses + , id1QuotaUser + , id1PrettyPrint + , id1Project + , id1UserIp + , id1Zone + , id1Key + , id1OauthToken + , id1Fields + , id1Alt + , id1Instance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesDelete@ which the +-- 'InstancesDelete' request conforms to. +type InstancesDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> Delete '[JSON] Operation + +-- | Deletes the specified Instance resource. For more information, see +-- Shutting down an instance. +-- +-- /See:/ 'instancesDelete' smart constructor. +data InstancesDelete = InstancesDelete + { _id1QuotaUser :: !(Maybe Text) + , _id1PrettyPrint :: !Bool + , _id1Project :: !Text + , _id1UserIp :: !(Maybe Text) + , _id1Zone :: !Text + , _id1Key :: !(Maybe Text) + , _id1OauthToken :: !(Maybe Text) + , _id1Fields :: !(Maybe Text) + , _id1Alt :: !Text + , _id1Instance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'id1QuotaUser' +-- +-- * 'id1PrettyPrint' +-- +-- * 'id1Project' +-- +-- * 'id1UserIp' +-- +-- * 'id1Zone' +-- +-- * 'id1Key' +-- +-- * 'id1OauthToken' +-- +-- * 'id1Fields' +-- +-- * 'id1Alt' +-- +-- * 'id1Instance' +instancesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesDelete +instancesDelete pId1Project_ pId1Zone_ pId1Instance_ = + InstancesDelete + { _id1QuotaUser = Nothing + , _id1PrettyPrint = True + , _id1Project = pId1Project_ + , _id1UserIp = Nothing + , _id1Zone = pId1Zone_ + , _id1Key = Nothing + , _id1OauthToken = Nothing + , _id1Fields = Nothing + , _id1Alt = "json" + , _id1Instance = pId1Instance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +id1QuotaUser :: Lens' InstancesDelete' (Maybe Text) +id1QuotaUser + = lens _id1QuotaUser (\ s a -> s{_id1QuotaUser = a}) + +-- | Returns response with indentations and line breaks. +id1PrettyPrint :: Lens' InstancesDelete' Bool +id1PrettyPrint + = lens _id1PrettyPrint + (\ s a -> s{_id1PrettyPrint = a}) + +-- | Project ID for this request. +id1Project :: Lens' InstancesDelete' Text +id1Project + = lens _id1Project (\ s a -> s{_id1Project = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +id1UserIp :: Lens' InstancesDelete' (Maybe Text) +id1UserIp + = lens _id1UserIp (\ s a -> s{_id1UserIp = a}) + +-- | The name of the zone for this request. +id1Zone :: Lens' InstancesDelete' Text +id1Zone = lens _id1Zone (\ s a -> s{_id1Zone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +id1Key :: Lens' InstancesDelete' (Maybe Text) +id1Key = lens _id1Key (\ s a -> s{_id1Key = a}) + +-- | OAuth 2.0 token for the current user. +id1OauthToken :: Lens' InstancesDelete' (Maybe Text) +id1OauthToken + = lens _id1OauthToken + (\ s a -> s{_id1OauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +id1Fields :: Lens' InstancesDelete' (Maybe Text) +id1Fields + = lens _id1Fields (\ s a -> s{_id1Fields = a}) + +-- | Data format for the response. +id1Alt :: Lens' InstancesDelete' Text +id1Alt = lens _id1Alt (\ s a -> s{_id1Alt = a}) + +-- | Name of the instance resource to delete. +id1Instance :: Lens' InstancesDelete' Text +id1Instance + = lens _id1Instance (\ s a -> s{_id1Instance = a}) + +instance GoogleRequest InstancesDelete' where + type Rs InstancesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesDelete{..} + = go _id1QuotaUser _id1PrettyPrint _id1Project + _id1UserIp + _id1Zone + _id1Key + _id1OauthToken + _id1Fields + _id1Alt + _id1Instance + where go + = clientWithRoute (Proxy :: Proxy InstancesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DeleteAccessConfig.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DeleteAccessConfig.hs new file mode 100644 index 000000000..2731877f7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DeleteAccessConfig.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.DeleteAccessConfig +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an access config from an instance\'s network interface. +-- +-- /See:/ for @ComputeInstancesDeleteAccessConfig@. +module Compute.Instances.DeleteAccessConfig + ( + -- * REST Resource + InstancesDeleteAccessConfigAPI + + -- * Creating a Request + , instancesDeleteAccessConfig + , InstancesDeleteAccessConfig + + -- * Request Lenses + , idacQuotaUser + , idacPrettyPrint + , idacProject + , idacUserIp + , idacNetworkInterface + , idacZone + , idacKey + , idacOauthToken + , idacAccessConfig + , idacFields + , idacAlt + , idacInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesDeleteAccessConfig@ which the +-- 'InstancesDeleteAccessConfig' request conforms to. +type InstancesDeleteAccessConfigAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "deleteAccessConfig" :> + QueryParam "networkInterface" Text :> + QueryParam "accessConfig" Text :> + Post '[JSON] Operation + +-- | Deletes an access config from an instance\'s network interface. +-- +-- /See:/ 'instancesDeleteAccessConfig' smart constructor. +data InstancesDeleteAccessConfig = InstancesDeleteAccessConfig + { _idacQuotaUser :: !(Maybe Text) + , _idacPrettyPrint :: !Bool + , _idacProject :: !Text + , _idacUserIp :: !(Maybe Text) + , _idacNetworkInterface :: !Text + , _idacZone :: !Text + , _idacKey :: !(Maybe Text) + , _idacOauthToken :: !(Maybe Text) + , _idacAccessConfig :: !Text + , _idacFields :: !(Maybe Text) + , _idacAlt :: !Text + , _idacInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesDeleteAccessConfig'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idacQuotaUser' +-- +-- * 'idacPrettyPrint' +-- +-- * 'idacProject' +-- +-- * 'idacUserIp' +-- +-- * 'idacNetworkInterface' +-- +-- * 'idacZone' +-- +-- * 'idacKey' +-- +-- * 'idacOauthToken' +-- +-- * 'idacAccessConfig' +-- +-- * 'idacFields' +-- +-- * 'idacAlt' +-- +-- * 'idacInstance' +instancesDeleteAccessConfig + :: Text -- ^ 'project' + -> Text -- ^ 'networkInterface' + -> Text -- ^ 'zone' + -> Text -- ^ 'accessConfig' + -> Text -- ^ 'instance' + -> InstancesDeleteAccessConfig +instancesDeleteAccessConfig pIdacProject_ pIdacNetworkInterface_ pIdacZone_ pIdacAccessConfig_ pIdacInstance_ = + InstancesDeleteAccessConfig + { _idacQuotaUser = Nothing + , _idacPrettyPrint = True + , _idacProject = pIdacProject_ + , _idacUserIp = Nothing + , _idacNetworkInterface = pIdacNetworkInterface_ + , _idacZone = pIdacZone_ + , _idacKey = Nothing + , _idacOauthToken = Nothing + , _idacAccessConfig = pIdacAccessConfig_ + , _idacFields = Nothing + , _idacAlt = "json" + , _idacInstance = pIdacInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +idacQuotaUser :: Lens' InstancesDeleteAccessConfig' (Maybe Text) +idacQuotaUser + = lens _idacQuotaUser + (\ s a -> s{_idacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +idacPrettyPrint :: Lens' InstancesDeleteAccessConfig' Bool +idacPrettyPrint + = lens _idacPrettyPrint + (\ s a -> s{_idacPrettyPrint = a}) + +-- | Project ID for this request. +idacProject :: Lens' InstancesDeleteAccessConfig' Text +idacProject + = lens _idacProject (\ s a -> s{_idacProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +idacUserIp :: Lens' InstancesDeleteAccessConfig' (Maybe Text) +idacUserIp + = lens _idacUserIp (\ s a -> s{_idacUserIp = a}) + +-- | The name of the network interface. +idacNetworkInterface :: Lens' InstancesDeleteAccessConfig' Text +idacNetworkInterface + = lens _idacNetworkInterface + (\ s a -> s{_idacNetworkInterface = a}) + +-- | The name of the zone for this request. +idacZone :: Lens' InstancesDeleteAccessConfig' Text +idacZone = lens _idacZone (\ s a -> s{_idacZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idacKey :: Lens' InstancesDeleteAccessConfig' (Maybe Text) +idacKey = lens _idacKey (\ s a -> s{_idacKey = a}) + +-- | OAuth 2.0 token for the current user. +idacOauthToken :: Lens' InstancesDeleteAccessConfig' (Maybe Text) +idacOauthToken + = lens _idacOauthToken + (\ s a -> s{_idacOauthToken = a}) + +-- | The name of the access config to delete. +idacAccessConfig :: Lens' InstancesDeleteAccessConfig' Text +idacAccessConfig + = lens _idacAccessConfig + (\ s a -> s{_idacAccessConfig = a}) + +-- | Selector specifying which fields to include in a partial response. +idacFields :: Lens' InstancesDeleteAccessConfig' (Maybe Text) +idacFields + = lens _idacFields (\ s a -> s{_idacFields = a}) + +-- | Data format for the response. +idacAlt :: Lens' InstancesDeleteAccessConfig' Text +idacAlt = lens _idacAlt (\ s a -> s{_idacAlt = a}) + +-- | The instance name for this request. +idacInstance :: Lens' InstancesDeleteAccessConfig' Text +idacInstance + = lens _idacInstance (\ s a -> s{_idacInstance = a}) + +instance GoogleRequest InstancesDeleteAccessConfig' + where + type Rs InstancesDeleteAccessConfig' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesDeleteAccessConfig{..} + = go _idacQuotaUser _idacPrettyPrint _idacProject + _idacUserIp + (Just _idacNetworkInterface) + _idacZone + _idacKey + _idacOauthToken + (Just _idacAccessConfig) + _idacFields + _idacAlt + _idacInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesDeleteAccessConfigAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DetachDisk.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DetachDisk.hs new file mode 100644 index 000000000..a6b1a9b6d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/DetachDisk.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.DetachDisk +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Detaches a disk from an instance. +-- +-- /See:/ for @ComputeInstancesDetachDisk@. +module Compute.Instances.DetachDisk + ( + -- * REST Resource + InstancesDetachDiskAPI + + -- * Creating a Request + , instancesDetachDisk + , InstancesDetachDisk + + -- * Request Lenses + , iddQuotaUser + , iddPrettyPrint + , iddProject + , iddUserIp + , iddZone + , iddDeviceName + , iddKey + , iddOauthToken + , iddFields + , iddAlt + , iddInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesDetachDisk@ which the +-- 'InstancesDetachDisk' request conforms to. +type InstancesDetachDiskAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "detachDisk" :> + QueryParam "deviceName" Text :> + Post '[JSON] Operation + +-- | Detaches a disk from an instance. +-- +-- /See:/ 'instancesDetachDisk' smart constructor. +data InstancesDetachDisk = InstancesDetachDisk + { _iddQuotaUser :: !(Maybe Text) + , _iddPrettyPrint :: !Bool + , _iddProject :: !Text + , _iddUserIp :: !(Maybe Text) + , _iddZone :: !Text + , _iddDeviceName :: !Text + , _iddKey :: !(Maybe Text) + , _iddOauthToken :: !(Maybe Text) + , _iddFields :: !(Maybe Text) + , _iddAlt :: !Text + , _iddInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesDetachDisk'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iddQuotaUser' +-- +-- * 'iddPrettyPrint' +-- +-- * 'iddProject' +-- +-- * 'iddUserIp' +-- +-- * 'iddZone' +-- +-- * 'iddDeviceName' +-- +-- * 'iddKey' +-- +-- * 'iddOauthToken' +-- +-- * 'iddFields' +-- +-- * 'iddAlt' +-- +-- * 'iddInstance' +instancesDetachDisk + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'deviceName' + -> Text -- ^ 'instance' + -> InstancesDetachDisk +instancesDetachDisk pIddProject_ pIddZone_ pIddDeviceName_ pIddInstance_ = + InstancesDetachDisk + { _iddQuotaUser = Nothing + , _iddPrettyPrint = True + , _iddProject = pIddProject_ + , _iddUserIp = Nothing + , _iddZone = pIddZone_ + , _iddDeviceName = pIddDeviceName_ + , _iddKey = Nothing + , _iddOauthToken = Nothing + , _iddFields = Nothing + , _iddAlt = "json" + , _iddInstance = pIddInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iddQuotaUser :: Lens' InstancesDetachDisk' (Maybe Text) +iddQuotaUser + = lens _iddQuotaUser (\ s a -> s{_iddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iddPrettyPrint :: Lens' InstancesDetachDisk' Bool +iddPrettyPrint + = lens _iddPrettyPrint + (\ s a -> s{_iddPrettyPrint = a}) + +-- | Project ID for this request. +iddProject :: Lens' InstancesDetachDisk' Text +iddProject + = lens _iddProject (\ s a -> s{_iddProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iddUserIp :: Lens' InstancesDetachDisk' (Maybe Text) +iddUserIp + = lens _iddUserIp (\ s a -> s{_iddUserIp = a}) + +-- | The name of the zone for this request. +iddZone :: Lens' InstancesDetachDisk' Text +iddZone = lens _iddZone (\ s a -> s{_iddZone = a}) + +-- | Disk device name to detach. +iddDeviceName :: Lens' InstancesDetachDisk' Text +iddDeviceName + = lens _iddDeviceName + (\ s a -> s{_iddDeviceName = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iddKey :: Lens' InstancesDetachDisk' (Maybe Text) +iddKey = lens _iddKey (\ s a -> s{_iddKey = a}) + +-- | OAuth 2.0 token for the current user. +iddOauthToken :: Lens' InstancesDetachDisk' (Maybe Text) +iddOauthToken + = lens _iddOauthToken + (\ s a -> s{_iddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iddFields :: Lens' InstancesDetachDisk' (Maybe Text) +iddFields + = lens _iddFields (\ s a -> s{_iddFields = a}) + +-- | Data format for the response. +iddAlt :: Lens' InstancesDetachDisk' Text +iddAlt = lens _iddAlt (\ s a -> s{_iddAlt = a}) + +-- | Instance name. +iddInstance :: Lens' InstancesDetachDisk' Text +iddInstance + = lens _iddInstance (\ s a -> s{_iddInstance = a}) + +instance GoogleRequest InstancesDetachDisk' where + type Rs InstancesDetachDisk' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesDetachDisk{..} + = go _iddQuotaUser _iddPrettyPrint _iddProject + _iddUserIp + _iddZone + (Just _iddDeviceName) + _iddKey + _iddOauthToken + _iddFields + _iddAlt + _iddInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesDetachDiskAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Get.hs new file mode 100644 index 000000000..9d194af7b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Get.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified instance resource. +-- +-- /See:/ for @ComputeInstancesGet@. +module Compute.Instances.Get + ( + -- * REST Resource + InstancesGetAPI + + -- * Creating a Request + , instancesGet + , InstancesGet + + -- * Request Lenses + , iggQuotaUser + , iggPrettyPrint + , iggProject + , iggUserIp + , iggZone + , iggKey + , iggOauthToken + , iggFields + , iggAlt + , iggInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesGet@ which the +-- 'InstancesGet' request conforms to. +type InstancesGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> Get '[JSON] Instance + +-- | Returns the specified instance resource. +-- +-- /See:/ 'instancesGet' smart constructor. +data InstancesGet = InstancesGet + { _iggQuotaUser :: !(Maybe Text) + , _iggPrettyPrint :: !Bool + , _iggProject :: !Text + , _iggUserIp :: !(Maybe Text) + , _iggZone :: !Text + , _iggKey :: !(Maybe Text) + , _iggOauthToken :: !(Maybe Text) + , _iggFields :: !(Maybe Text) + , _iggAlt :: !Text + , _iggInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iggQuotaUser' +-- +-- * 'iggPrettyPrint' +-- +-- * 'iggProject' +-- +-- * 'iggUserIp' +-- +-- * 'iggZone' +-- +-- * 'iggKey' +-- +-- * 'iggOauthToken' +-- +-- * 'iggFields' +-- +-- * 'iggAlt' +-- +-- * 'iggInstance' +instancesGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesGet +instancesGet pIggProject_ pIggZone_ pIggInstance_ = + InstancesGet + { _iggQuotaUser = Nothing + , _iggPrettyPrint = True + , _iggProject = pIggProject_ + , _iggUserIp = Nothing + , _iggZone = pIggZone_ + , _iggKey = Nothing + , _iggOauthToken = Nothing + , _iggFields = Nothing + , _iggAlt = "json" + , _iggInstance = pIggInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iggQuotaUser :: Lens' InstancesGet' (Maybe Text) +iggQuotaUser + = lens _iggQuotaUser (\ s a -> s{_iggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iggPrettyPrint :: Lens' InstancesGet' Bool +iggPrettyPrint + = lens _iggPrettyPrint + (\ s a -> s{_iggPrettyPrint = a}) + +-- | Project ID for this request. +iggProject :: Lens' InstancesGet' Text +iggProject + = lens _iggProject (\ s a -> s{_iggProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iggUserIp :: Lens' InstancesGet' (Maybe Text) +iggUserIp + = lens _iggUserIp (\ s a -> s{_iggUserIp = a}) + +-- | The name of the zone for this request. +iggZone :: Lens' InstancesGet' Text +iggZone = lens _iggZone (\ s a -> s{_iggZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iggKey :: Lens' InstancesGet' (Maybe Text) +iggKey = lens _iggKey (\ s a -> s{_iggKey = a}) + +-- | OAuth 2.0 token for the current user. +iggOauthToken :: Lens' InstancesGet' (Maybe Text) +iggOauthToken + = lens _iggOauthToken + (\ s a -> s{_iggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iggFields :: Lens' InstancesGet' (Maybe Text) +iggFields + = lens _iggFields (\ s a -> s{_iggFields = a}) + +-- | Data format for the response. +iggAlt :: Lens' InstancesGet' Text +iggAlt = lens _iggAlt (\ s a -> s{_iggAlt = a}) + +-- | Name of the instance resource to return. +iggInstance :: Lens' InstancesGet' Text +iggInstance + = lens _iggInstance (\ s a -> s{_iggInstance = a}) + +instance GoogleRequest InstancesGet' where + type Rs InstancesGet' = Instance + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesGet{..} + = go _iggQuotaUser _iggPrettyPrint _iggProject + _iggUserIp + _iggZone + _iggKey + _iggOauthToken + _iggFields + _iggAlt + _iggInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetSerialPortOutput.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetSerialPortOutput.hs new file mode 100644 index 000000000..1ac24fc2a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetSerialPortOutput.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.GetSerialPortOutput +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified instance\'s serial port output. +-- +-- /See:/ for @ComputeInstancesGetSerialPortOutput@. +module Compute.Instances.GetSerialPortOutput + ( + -- * REST Resource + InstancesGetSerialPortOutputAPI + + -- * Creating a Request + , instancesGetSerialPortOutput + , InstancesGetSerialPortOutput + + -- * Request Lenses + , igspoQuotaUser + , igspoPrettyPrint + , igspoProject + , igspoUserIp + , igspoZone + , igspoKey + , igspoOauthToken + , igspoFields + , igspoAlt + , igspoPort + , igspoInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesGetSerialPortOutput@ which the +-- 'InstancesGetSerialPortOutput' request conforms to. +type InstancesGetSerialPortOutputAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "serialPort" :> + QueryParam "port" Int32 :> + Get '[JSON] SerialPortOutput + +-- | Returns the specified instance\'s serial port output. +-- +-- /See:/ 'instancesGetSerialPortOutput' smart constructor. +data InstancesGetSerialPortOutput = InstancesGetSerialPortOutput + { _igspoQuotaUser :: !(Maybe Text) + , _igspoPrettyPrint :: !Bool + , _igspoProject :: !Text + , _igspoUserIp :: !(Maybe Text) + , _igspoZone :: !Text + , _igspoKey :: !(Maybe Text) + , _igspoOauthToken :: !(Maybe Text) + , _igspoFields :: !(Maybe Text) + , _igspoAlt :: !Text + , _igspoPort :: !Int32 + , _igspoInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesGetSerialPortOutput'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igspoQuotaUser' +-- +-- * 'igspoPrettyPrint' +-- +-- * 'igspoProject' +-- +-- * 'igspoUserIp' +-- +-- * 'igspoZone' +-- +-- * 'igspoKey' +-- +-- * 'igspoOauthToken' +-- +-- * 'igspoFields' +-- +-- * 'igspoAlt' +-- +-- * 'igspoPort' +-- +-- * 'igspoInstance' +instancesGetSerialPortOutput + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesGetSerialPortOutput +instancesGetSerialPortOutput pIgspoProject_ pIgspoZone_ pIgspoInstance_ = + InstancesGetSerialPortOutput + { _igspoQuotaUser = Nothing + , _igspoPrettyPrint = True + , _igspoProject = pIgspoProject_ + , _igspoUserIp = Nothing + , _igspoZone = pIgspoZone_ + , _igspoKey = Nothing + , _igspoOauthToken = Nothing + , _igspoFields = Nothing + , _igspoAlt = "json" + , _igspoPort = 1 + , _igspoInstance = pIgspoInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igspoQuotaUser :: Lens' InstancesGetSerialPortOutput' (Maybe Text) +igspoQuotaUser + = lens _igspoQuotaUser + (\ s a -> s{_igspoQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igspoPrettyPrint :: Lens' InstancesGetSerialPortOutput' Bool +igspoPrettyPrint + = lens _igspoPrettyPrint + (\ s a -> s{_igspoPrettyPrint = a}) + +-- | Project ID for this request. +igspoProject :: Lens' InstancesGetSerialPortOutput' Text +igspoProject + = lens _igspoProject (\ s a -> s{_igspoProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igspoUserIp :: Lens' InstancesGetSerialPortOutput' (Maybe Text) +igspoUserIp + = lens _igspoUserIp (\ s a -> s{_igspoUserIp = a}) + +-- | The name of the zone for this request. +igspoZone :: Lens' InstancesGetSerialPortOutput' Text +igspoZone + = lens _igspoZone (\ s a -> s{_igspoZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igspoKey :: Lens' InstancesGetSerialPortOutput' (Maybe Text) +igspoKey = lens _igspoKey (\ s a -> s{_igspoKey = a}) + +-- | OAuth 2.0 token for the current user. +igspoOauthToken :: Lens' InstancesGetSerialPortOutput' (Maybe Text) +igspoOauthToken + = lens _igspoOauthToken + (\ s a -> s{_igspoOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igspoFields :: Lens' InstancesGetSerialPortOutput' (Maybe Text) +igspoFields + = lens _igspoFields (\ s a -> s{_igspoFields = a}) + +-- | Data format for the response. +igspoAlt :: Lens' InstancesGetSerialPortOutput' Text +igspoAlt = lens _igspoAlt (\ s a -> s{_igspoAlt = a}) + +-- | Specifies which COM or serial port to retrieve data from. +igspoPort :: Lens' InstancesGetSerialPortOutput' Int32 +igspoPort + = lens _igspoPort (\ s a -> s{_igspoPort = a}) + +-- | Name of the instance scoping this request. +igspoInstance :: Lens' InstancesGetSerialPortOutput' Text +igspoInstance + = lens _igspoInstance + (\ s a -> s{_igspoInstance = a}) + +instance GoogleRequest InstancesGetSerialPortOutput' + where + type Rs InstancesGetSerialPortOutput' = + SerialPortOutput + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesGetSerialPortOutput{..} + = go _igspoQuotaUser _igspoPrettyPrint _igspoProject + _igspoUserIp + _igspoZone + _igspoKey + _igspoOauthToken + _igspoFields + _igspoAlt + (Just _igspoPort) + _igspoInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesGetSerialPortOutputAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Insert.hs new file mode 100644 index 000000000..07796473e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Insert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an instance resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeInstancesInsert@. +module Compute.Instances.Insert + ( + -- * REST Resource + InstancesInsertAPI + + -- * Creating a Request + , instancesInsert + , InstancesInsert + + -- * Request Lenses + , insQuotaUser + , insPrettyPrint + , insProject + , insUserIp + , insZone + , insKey + , insOauthToken + , insFields + , insAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesInsert@ which the +-- 'InstancesInsert' request conforms to. +type InstancesInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> Post '[JSON] Operation + +-- | Creates an instance resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'instancesInsert' smart constructor. +data InstancesInsert = InstancesInsert + { _insQuotaUser :: !(Maybe Text) + , _insPrettyPrint :: !Bool + , _insProject :: !Text + , _insUserIp :: !(Maybe Text) + , _insZone :: !Text + , _insKey :: !(Maybe Text) + , _insOauthToken :: !(Maybe Text) + , _insFields :: !(Maybe Text) + , _insAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'insQuotaUser' +-- +-- * 'insPrettyPrint' +-- +-- * 'insProject' +-- +-- * 'insUserIp' +-- +-- * 'insZone' +-- +-- * 'insKey' +-- +-- * 'insOauthToken' +-- +-- * 'insFields' +-- +-- * 'insAlt' +instancesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstancesInsert +instancesInsert pInsProject_ pInsZone_ = + InstancesInsert + { _insQuotaUser = Nothing + , _insPrettyPrint = True + , _insProject = pInsProject_ + , _insUserIp = Nothing + , _insZone = pInsZone_ + , _insKey = Nothing + , _insOauthToken = Nothing + , _insFields = Nothing + , _insAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +insQuotaUser :: Lens' InstancesInsert' (Maybe Text) +insQuotaUser + = lens _insQuotaUser (\ s a -> s{_insQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +insPrettyPrint :: Lens' InstancesInsert' Bool +insPrettyPrint + = lens _insPrettyPrint + (\ s a -> s{_insPrettyPrint = a}) + +-- | Project ID for this request. +insProject :: Lens' InstancesInsert' Text +insProject + = lens _insProject (\ s a -> s{_insProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +insUserIp :: Lens' InstancesInsert' (Maybe Text) +insUserIp + = lens _insUserIp (\ s a -> s{_insUserIp = a}) + +-- | The name of the zone for this request. +insZone :: Lens' InstancesInsert' Text +insZone = lens _insZone (\ s a -> s{_insZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +insKey :: Lens' InstancesInsert' (Maybe Text) +insKey = lens _insKey (\ s a -> s{_insKey = a}) + +-- | OAuth 2.0 token for the current user. +insOauthToken :: Lens' InstancesInsert' (Maybe Text) +insOauthToken + = lens _insOauthToken + (\ s a -> s{_insOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +insFields :: Lens' InstancesInsert' (Maybe Text) +insFields + = lens _insFields (\ s a -> s{_insFields = a}) + +-- | Data format for the response. +insAlt :: Lens' InstancesInsert' Text +insAlt = lens _insAlt (\ s a -> s{_insAlt = a}) + +instance GoogleRequest InstancesInsert' where + type Rs InstancesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesInsert{..} + = go _insQuotaUser _insPrettyPrint _insProject + _insUserIp + _insZone + _insKey + _insOauthToken + _insFields + _insAlt + where go + = clientWithRoute (Proxy :: Proxy InstancesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/List.hs new file mode 100644 index 000000000..8fc043ae1 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of instance resources contained within the specified +-- zone. +-- +-- /See:/ for @ComputeInstancesList@. +module Compute.Instances.List + ( + -- * REST Resource + InstancesListAPI + + -- * Creating a Request + , instancesList + , InstancesList + + -- * Request Lenses + , illQuotaUser + , illPrettyPrint + , illProject + , illUserIp + , illZone + , illKey + , illFilter + , illPageToken + , illOauthToken + , illMaxResults + , illFields + , illAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesList@ which the +-- 'InstancesList' request conforms to. +type InstancesListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceList + +-- | Retrieves the list of instance resources contained within the specified +-- zone. +-- +-- /See:/ 'instancesList' smart constructor. +data InstancesList = InstancesList + { _illQuotaUser :: !(Maybe Text) + , _illPrettyPrint :: !Bool + , _illProject :: !Text + , _illUserIp :: !(Maybe Text) + , _illZone :: !Text + , _illKey :: !(Maybe Text) + , _illFilter :: !(Maybe Text) + , _illPageToken :: !(Maybe Text) + , _illOauthToken :: !(Maybe Text) + , _illMaxResults :: !Word32 + , _illFields :: !(Maybe Text) + , _illAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'illQuotaUser' +-- +-- * 'illPrettyPrint' +-- +-- * 'illProject' +-- +-- * 'illUserIp' +-- +-- * 'illZone' +-- +-- * 'illKey' +-- +-- * 'illFilter' +-- +-- * 'illPageToken' +-- +-- * 'illOauthToken' +-- +-- * 'illMaxResults' +-- +-- * 'illFields' +-- +-- * 'illAlt' +instancesList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstancesList +instancesList pIllProject_ pIllZone_ = + InstancesList + { _illQuotaUser = Nothing + , _illPrettyPrint = True + , _illProject = pIllProject_ + , _illUserIp = Nothing + , _illZone = pIllZone_ + , _illKey = Nothing + , _illFilter = Nothing + , _illPageToken = Nothing + , _illOauthToken = Nothing + , _illMaxResults = 500 + , _illFields = Nothing + , _illAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +illQuotaUser :: Lens' InstancesList' (Maybe Text) +illQuotaUser + = lens _illQuotaUser (\ s a -> s{_illQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +illPrettyPrint :: Lens' InstancesList' Bool +illPrettyPrint + = lens _illPrettyPrint + (\ s a -> s{_illPrettyPrint = a}) + +-- | Project ID for this request. +illProject :: Lens' InstancesList' Text +illProject + = lens _illProject (\ s a -> s{_illProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +illUserIp :: Lens' InstancesList' (Maybe Text) +illUserIp + = lens _illUserIp (\ s a -> s{_illUserIp = a}) + +-- | The name of the zone for this request. +illZone :: Lens' InstancesList' Text +illZone = lens _illZone (\ s a -> s{_illZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +illKey :: Lens' InstancesList' (Maybe Text) +illKey = lens _illKey (\ s a -> s{_illKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +illFilter :: Lens' InstancesList' (Maybe Text) +illFilter + = lens _illFilter (\ s a -> s{_illFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +illPageToken :: Lens' InstancesList' (Maybe Text) +illPageToken + = lens _illPageToken (\ s a -> s{_illPageToken = a}) + +-- | OAuth 2.0 token for the current user. +illOauthToken :: Lens' InstancesList' (Maybe Text) +illOauthToken + = lens _illOauthToken + (\ s a -> s{_illOauthToken = a}) + +-- | Maximum count of results to be returned. +illMaxResults :: Lens' InstancesList' Word32 +illMaxResults + = lens _illMaxResults + (\ s a -> s{_illMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +illFields :: Lens' InstancesList' (Maybe Text) +illFields + = lens _illFields (\ s a -> s{_illFields = a}) + +-- | Data format for the response. +illAlt :: Lens' InstancesList' Text +illAlt = lens _illAlt (\ s a -> s{_illAlt = a}) + +instance GoogleRequest InstancesList' where + type Rs InstancesList' = InstanceList + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesList{..} + = go _illQuotaUser _illPrettyPrint _illProject + _illUserIp + _illZone + _illKey + _illFilter + _illPageToken + _illOauthToken + (Just _illMaxResults) + _illFields + _illAlt + where go + = clientWithRoute (Proxy :: Proxy InstancesListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs new file mode 100644 index 000000000..20c649d71 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Performs a hard reset on the instance. +-- +-- /See:/ for @ComputeInstancesReset@. +module Compute.Instances.Reset + ( + -- * REST Resource + InstancesResetAPI + + -- * Creating a Request + , instancesReset + , InstancesReset + + -- * Request Lenses + , irrQuotaUser + , irrPrettyPrint + , irrProject + , irrUserIp + , irrZone + , irrKey + , irrOauthToken + , irrFields + , irrAlt + , irrInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesReset@ which the +-- 'InstancesReset' request conforms to. +type InstancesResetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "reset" :> Post '[JSON] Operation + +-- | Performs a hard reset on the instance. +-- +-- /See:/ 'instancesReset' smart constructor. +data InstancesReset = InstancesReset + { _irrQuotaUser :: !(Maybe Text) + , _irrPrettyPrint :: !Bool + , _irrProject :: !Text + , _irrUserIp :: !(Maybe Text) + , _irrZone :: !Text + , _irrKey :: !(Maybe Text) + , _irrOauthToken :: !(Maybe Text) + , _irrFields :: !(Maybe Text) + , _irrAlt :: !Text + , _irrInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irrQuotaUser' +-- +-- * 'irrPrettyPrint' +-- +-- * 'irrProject' +-- +-- * 'irrUserIp' +-- +-- * 'irrZone' +-- +-- * 'irrKey' +-- +-- * 'irrOauthToken' +-- +-- * 'irrFields' +-- +-- * 'irrAlt' +-- +-- * 'irrInstance' +instancesReset + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesReset +instancesReset pIrrProject_ pIrrZone_ pIrrInstance_ = + InstancesReset + { _irrQuotaUser = Nothing + , _irrPrettyPrint = True + , _irrProject = pIrrProject_ + , _irrUserIp = Nothing + , _irrZone = pIrrZone_ + , _irrKey = Nothing + , _irrOauthToken = Nothing + , _irrFields = Nothing + , _irrAlt = "json" + , _irrInstance = pIrrInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +irrQuotaUser :: Lens' InstancesReset' (Maybe Text) +irrQuotaUser + = lens _irrQuotaUser (\ s a -> s{_irrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +irrPrettyPrint :: Lens' InstancesReset' Bool +irrPrettyPrint + = lens _irrPrettyPrint + (\ s a -> s{_irrPrettyPrint = a}) + +-- | Project ID for this request. +irrProject :: Lens' InstancesReset' Text +irrProject + = lens _irrProject (\ s a -> s{_irrProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +irrUserIp :: Lens' InstancesReset' (Maybe Text) +irrUserIp + = lens _irrUserIp (\ s a -> s{_irrUserIp = a}) + +-- | The name of the zone for this request. +irrZone :: Lens' InstancesReset' Text +irrZone = lens _irrZone (\ s a -> s{_irrZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +irrKey :: Lens' InstancesReset' (Maybe Text) +irrKey = lens _irrKey (\ s a -> s{_irrKey = a}) + +-- | OAuth 2.0 token for the current user. +irrOauthToken :: Lens' InstancesReset' (Maybe Text) +irrOauthToken + = lens _irrOauthToken + (\ s a -> s{_irrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +irrFields :: Lens' InstancesReset' (Maybe Text) +irrFields + = lens _irrFields (\ s a -> s{_irrFields = a}) + +-- | Data format for the response. +irrAlt :: Lens' InstancesReset' Text +irrAlt = lens _irrAlt (\ s a -> s{_irrAlt = a}) + +-- | Name of the instance scoping this request. +irrInstance :: Lens' InstancesReset' Text +irrInstance + = lens _irrInstance (\ s a -> s{_irrInstance = a}) + +instance GoogleRequest InstancesReset' where + type Rs InstancesReset' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesReset{..} + = go _irrQuotaUser _irrPrettyPrint _irrProject + _irrUserIp + _irrZone + _irrKey + _irrOauthToken + _irrFields + _irrAlt + _irrInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesResetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDiskAutoDelete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDiskAutoDelete.hs new file mode 100644 index 000000000..7e3781824 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDiskAutoDelete.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.SetDiskAutoDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the auto-delete flag for a disk attached to an instance. +-- +-- /See:/ for @ComputeInstancesSetDiskAutoDelete@. +module Compute.Instances.SetDiskAutoDelete + ( + -- * REST Resource + InstancesSetDiskAutoDeleteAPI + + -- * Creating a Request + , instancesSetDiskAutoDelete + , InstancesSetDiskAutoDelete + + -- * Request Lenses + , isdadQuotaUser + , isdadPrettyPrint + , isdadProject + , isdadUserIp + , isdadAutoDelete + , isdadZone + , isdadDeviceName + , isdadKey + , isdadOauthToken + , isdadFields + , isdadAlt + , isdadInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesSetDiskAutoDelete@ which the +-- 'InstancesSetDiskAutoDelete' request conforms to. +type InstancesSetDiskAutoDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "setDiskAutoDelete" :> + QueryParam "autoDelete" Bool :> + QueryParam "deviceName" Text :> + Post '[JSON] Operation + +-- | Sets the auto-delete flag for a disk attached to an instance. +-- +-- /See:/ 'instancesSetDiskAutoDelete' smart constructor. +data InstancesSetDiskAutoDelete = InstancesSetDiskAutoDelete + { _isdadQuotaUser :: !(Maybe Text) + , _isdadPrettyPrint :: !Bool + , _isdadProject :: !Text + , _isdadUserIp :: !(Maybe Text) + , _isdadAutoDelete :: !Bool + , _isdadZone :: !Text + , _isdadDeviceName :: !Text + , _isdadKey :: !(Maybe Text) + , _isdadOauthToken :: !(Maybe Text) + , _isdadFields :: !(Maybe Text) + , _isdadAlt :: !Text + , _isdadInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesSetDiskAutoDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isdadQuotaUser' +-- +-- * 'isdadPrettyPrint' +-- +-- * 'isdadProject' +-- +-- * 'isdadUserIp' +-- +-- * 'isdadAutoDelete' +-- +-- * 'isdadZone' +-- +-- * 'isdadDeviceName' +-- +-- * 'isdadKey' +-- +-- * 'isdadOauthToken' +-- +-- * 'isdadFields' +-- +-- * 'isdadAlt' +-- +-- * 'isdadInstance' +instancesSetDiskAutoDelete + :: Text -- ^ 'project' + -> Bool -- ^ 'autoDelete' + -> Text -- ^ 'zone' + -> Text -- ^ 'deviceName' + -> Text -- ^ 'instance' + -> InstancesSetDiskAutoDelete +instancesSetDiskAutoDelete pIsdadProject_ pIsdadAutoDelete_ pIsdadZone_ pIsdadDeviceName_ pIsdadInstance_ = + InstancesSetDiskAutoDelete + { _isdadQuotaUser = Nothing + , _isdadPrettyPrint = True + , _isdadProject = pIsdadProject_ + , _isdadUserIp = Nothing + , _isdadAutoDelete = pIsdadAutoDelete_ + , _isdadZone = pIsdadZone_ + , _isdadDeviceName = pIsdadDeviceName_ + , _isdadKey = Nothing + , _isdadOauthToken = Nothing + , _isdadFields = Nothing + , _isdadAlt = "json" + , _isdadInstance = pIsdadInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +isdadQuotaUser :: Lens' InstancesSetDiskAutoDelete' (Maybe Text) +isdadQuotaUser + = lens _isdadQuotaUser + (\ s a -> s{_isdadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +isdadPrettyPrint :: Lens' InstancesSetDiskAutoDelete' Bool +isdadPrettyPrint + = lens _isdadPrettyPrint + (\ s a -> s{_isdadPrettyPrint = a}) + +-- | Project ID for this request. +isdadProject :: Lens' InstancesSetDiskAutoDelete' Text +isdadProject + = lens _isdadProject (\ s a -> s{_isdadProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +isdadUserIp :: Lens' InstancesSetDiskAutoDelete' (Maybe Text) +isdadUserIp + = lens _isdadUserIp (\ s a -> s{_isdadUserIp = a}) + +-- | Whether to auto-delete the disk when the instance is deleted. +isdadAutoDelete :: Lens' InstancesSetDiskAutoDelete' Bool +isdadAutoDelete + = lens _isdadAutoDelete + (\ s a -> s{_isdadAutoDelete = a}) + +-- | The name of the zone for this request. +isdadZone :: Lens' InstancesSetDiskAutoDelete' Text +isdadZone + = lens _isdadZone (\ s a -> s{_isdadZone = a}) + +-- | The device name of the disk to modify. +isdadDeviceName :: Lens' InstancesSetDiskAutoDelete' Text +isdadDeviceName + = lens _isdadDeviceName + (\ s a -> s{_isdadDeviceName = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +isdadKey :: Lens' InstancesSetDiskAutoDelete' (Maybe Text) +isdadKey = lens _isdadKey (\ s a -> s{_isdadKey = a}) + +-- | OAuth 2.0 token for the current user. +isdadOauthToken :: Lens' InstancesSetDiskAutoDelete' (Maybe Text) +isdadOauthToken + = lens _isdadOauthToken + (\ s a -> s{_isdadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +isdadFields :: Lens' InstancesSetDiskAutoDelete' (Maybe Text) +isdadFields + = lens _isdadFields (\ s a -> s{_isdadFields = a}) + +-- | Data format for the response. +isdadAlt :: Lens' InstancesSetDiskAutoDelete' Text +isdadAlt = lens _isdadAlt (\ s a -> s{_isdadAlt = a}) + +-- | The instance name. +isdadInstance :: Lens' InstancesSetDiskAutoDelete' Text +isdadInstance + = lens _isdadInstance + (\ s a -> s{_isdadInstance = a}) + +instance GoogleRequest InstancesSetDiskAutoDelete' + where + type Rs InstancesSetDiskAutoDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesSetDiskAutoDelete{..} + = go _isdadQuotaUser _isdadPrettyPrint _isdadProject + _isdadUserIp + (Just _isdadAutoDelete) + _isdadZone + (Just _isdadDeviceName) + _isdadKey + _isdadOauthToken + _isdadFields + _isdadAlt + _isdadInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesSetDiskAutoDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs new file mode 100644 index 000000000..102cd3748 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.SetMetadata +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets metadata for the specified instance to the data included in the +-- request. +-- +-- /See:/ for @ComputeInstancesSetMetadata@. +module Compute.Instances.SetMetadata + ( + -- * REST Resource + InstancesSetMetadataAPI + + -- * Creating a Request + , instancesSetMetadata + , InstancesSetMetadata + + -- * Request Lenses + , ismQuotaUser + , ismPrettyPrint + , ismProject + , ismUserIp + , ismZone + , ismKey + , ismOauthToken + , ismFields + , ismAlt + , ismInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesSetMetadata@ which the +-- 'InstancesSetMetadata' request conforms to. +type InstancesSetMetadataAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "setMetadata" :> Post '[JSON] Operation + +-- | Sets metadata for the specified instance to the data included in the +-- request. +-- +-- /See:/ 'instancesSetMetadata' smart constructor. +data InstancesSetMetadata = InstancesSetMetadata + { _ismQuotaUser :: !(Maybe Text) + , _ismPrettyPrint :: !Bool + , _ismProject :: !Text + , _ismUserIp :: !(Maybe Text) + , _ismZone :: !Text + , _ismKey :: !(Maybe Text) + , _ismOauthToken :: !(Maybe Text) + , _ismFields :: !(Maybe Text) + , _ismAlt :: !Text + , _ismInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesSetMetadata'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ismQuotaUser' +-- +-- * 'ismPrettyPrint' +-- +-- * 'ismProject' +-- +-- * 'ismUserIp' +-- +-- * 'ismZone' +-- +-- * 'ismKey' +-- +-- * 'ismOauthToken' +-- +-- * 'ismFields' +-- +-- * 'ismAlt' +-- +-- * 'ismInstance' +instancesSetMetadata + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesSetMetadata +instancesSetMetadata pIsmProject_ pIsmZone_ pIsmInstance_ = + InstancesSetMetadata + { _ismQuotaUser = Nothing + , _ismPrettyPrint = True + , _ismProject = pIsmProject_ + , _ismUserIp = Nothing + , _ismZone = pIsmZone_ + , _ismKey = Nothing + , _ismOauthToken = Nothing + , _ismFields = Nothing + , _ismAlt = "json" + , _ismInstance = pIsmInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ismQuotaUser :: Lens' InstancesSetMetadata' (Maybe Text) +ismQuotaUser + = lens _ismQuotaUser (\ s a -> s{_ismQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ismPrettyPrint :: Lens' InstancesSetMetadata' Bool +ismPrettyPrint + = lens _ismPrettyPrint + (\ s a -> s{_ismPrettyPrint = a}) + +-- | Project ID for this request. +ismProject :: Lens' InstancesSetMetadata' Text +ismProject + = lens _ismProject (\ s a -> s{_ismProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ismUserIp :: Lens' InstancesSetMetadata' (Maybe Text) +ismUserIp + = lens _ismUserIp (\ s a -> s{_ismUserIp = a}) + +-- | The name of the zone for this request. +ismZone :: Lens' InstancesSetMetadata' Text +ismZone = lens _ismZone (\ s a -> s{_ismZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ismKey :: Lens' InstancesSetMetadata' (Maybe Text) +ismKey = lens _ismKey (\ s a -> s{_ismKey = a}) + +-- | OAuth 2.0 token for the current user. +ismOauthToken :: Lens' InstancesSetMetadata' (Maybe Text) +ismOauthToken + = lens _ismOauthToken + (\ s a -> s{_ismOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ismFields :: Lens' InstancesSetMetadata' (Maybe Text) +ismFields + = lens _ismFields (\ s a -> s{_ismFields = a}) + +-- | Data format for the response. +ismAlt :: Lens' InstancesSetMetadata' Text +ismAlt = lens _ismAlt (\ s a -> s{_ismAlt = a}) + +-- | Name of the instance scoping this request. +ismInstance :: Lens' InstancesSetMetadata' Text +ismInstance + = lens _ismInstance (\ s a -> s{_ismInstance = a}) + +instance GoogleRequest InstancesSetMetadata' where + type Rs InstancesSetMetadata' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesSetMetadata{..} + = go _ismQuotaUser _ismPrettyPrint _ismProject + _ismUserIp + _ismZone + _ismKey + _ismOauthToken + _ismFields + _ismAlt + _ismInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesSetMetadataAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetScheduling.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetScheduling.hs new file mode 100644 index 000000000..aa4556ed0 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetScheduling.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.SetScheduling +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets an instance\'s scheduling options. +-- +-- /See:/ for @ComputeInstancesSetScheduling@. +module Compute.Instances.SetScheduling + ( + -- * REST Resource + InstancesSetSchedulingAPI + + -- * Creating a Request + , instancesSetScheduling + , InstancesSetScheduling + + -- * Request Lenses + , issQuotaUser + , issPrettyPrint + , issProject + , issUserIp + , issZone + , issKey + , issOauthToken + , issFields + , issAlt + , issInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesSetScheduling@ which the +-- 'InstancesSetScheduling' request conforms to. +type InstancesSetSchedulingAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "setScheduling" :> Post '[JSON] Operation + +-- | Sets an instance\'s scheduling options. +-- +-- /See:/ 'instancesSetScheduling' smart constructor. +data InstancesSetScheduling = InstancesSetScheduling + { _issQuotaUser :: !(Maybe Text) + , _issPrettyPrint :: !Bool + , _issProject :: !Text + , _issUserIp :: !(Maybe Text) + , _issZone :: !Text + , _issKey :: !(Maybe Text) + , _issOauthToken :: !(Maybe Text) + , _issFields :: !(Maybe Text) + , _issAlt :: !Text + , _issInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesSetScheduling'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'issQuotaUser' +-- +-- * 'issPrettyPrint' +-- +-- * 'issProject' +-- +-- * 'issUserIp' +-- +-- * 'issZone' +-- +-- * 'issKey' +-- +-- * 'issOauthToken' +-- +-- * 'issFields' +-- +-- * 'issAlt' +-- +-- * 'issInstance' +instancesSetScheduling + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesSetScheduling +instancesSetScheduling pIssProject_ pIssZone_ pIssInstance_ = + InstancesSetScheduling + { _issQuotaUser = Nothing + , _issPrettyPrint = True + , _issProject = pIssProject_ + , _issUserIp = Nothing + , _issZone = pIssZone_ + , _issKey = Nothing + , _issOauthToken = Nothing + , _issFields = Nothing + , _issAlt = "json" + , _issInstance = pIssInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +issQuotaUser :: Lens' InstancesSetScheduling' (Maybe Text) +issQuotaUser + = lens _issQuotaUser (\ s a -> s{_issQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +issPrettyPrint :: Lens' InstancesSetScheduling' Bool +issPrettyPrint + = lens _issPrettyPrint + (\ s a -> s{_issPrettyPrint = a}) + +-- | Project ID for this request. +issProject :: Lens' InstancesSetScheduling' Text +issProject + = lens _issProject (\ s a -> s{_issProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +issUserIp :: Lens' InstancesSetScheduling' (Maybe Text) +issUserIp + = lens _issUserIp (\ s a -> s{_issUserIp = a}) + +-- | The name of the zone for this request. +issZone :: Lens' InstancesSetScheduling' Text +issZone = lens _issZone (\ s a -> s{_issZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +issKey :: Lens' InstancesSetScheduling' (Maybe Text) +issKey = lens _issKey (\ s a -> s{_issKey = a}) + +-- | OAuth 2.0 token for the current user. +issOauthToken :: Lens' InstancesSetScheduling' (Maybe Text) +issOauthToken + = lens _issOauthToken + (\ s a -> s{_issOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +issFields :: Lens' InstancesSetScheduling' (Maybe Text) +issFields + = lens _issFields (\ s a -> s{_issFields = a}) + +-- | Data format for the response. +issAlt :: Lens' InstancesSetScheduling' Text +issAlt = lens _issAlt (\ s a -> s{_issAlt = a}) + +-- | Instance name. +issInstance :: Lens' InstancesSetScheduling' Text +issInstance + = lens _issInstance (\ s a -> s{_issInstance = a}) + +instance GoogleRequest InstancesSetScheduling' where + type Rs InstancesSetScheduling' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesSetScheduling{..} + = go _issQuotaUser _issPrettyPrint _issProject + _issUserIp + _issZone + _issKey + _issOauthToken + _issFields + _issAlt + _issInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesSetSchedulingAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetTags.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetTags.hs new file mode 100644 index 000000000..5a5108113 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetTags.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.SetTags +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets tags for the specified instance to the data included in the +-- request. +-- +-- /See:/ for @ComputeInstancesSetTags@. +module Compute.Instances.SetTags + ( + -- * REST Resource + InstancesSetTagsAPI + + -- * Creating a Request + , instancesSetTags + , InstancesSetTags + + -- * Request Lenses + , istQuotaUser + , istPrettyPrint + , istProject + , istUserIp + , istZone + , istKey + , istOauthToken + , istFields + , istAlt + , istInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesSetTags@ which the +-- 'InstancesSetTags' request conforms to. +type InstancesSetTagsAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "setTags" :> Post '[JSON] Operation + +-- | Sets tags for the specified instance to the data included in the +-- request. +-- +-- /See:/ 'instancesSetTags' smart constructor. +data InstancesSetTags = InstancesSetTags + { _istQuotaUser :: !(Maybe Text) + , _istPrettyPrint :: !Bool + , _istProject :: !Text + , _istUserIp :: !(Maybe Text) + , _istZone :: !Text + , _istKey :: !(Maybe Text) + , _istOauthToken :: !(Maybe Text) + , _istFields :: !(Maybe Text) + , _istAlt :: !Text + , _istInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesSetTags'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'istQuotaUser' +-- +-- * 'istPrettyPrint' +-- +-- * 'istProject' +-- +-- * 'istUserIp' +-- +-- * 'istZone' +-- +-- * 'istKey' +-- +-- * 'istOauthToken' +-- +-- * 'istFields' +-- +-- * 'istAlt' +-- +-- * 'istInstance' +instancesSetTags + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesSetTags +instancesSetTags pIstProject_ pIstZone_ pIstInstance_ = + InstancesSetTags + { _istQuotaUser = Nothing + , _istPrettyPrint = True + , _istProject = pIstProject_ + , _istUserIp = Nothing + , _istZone = pIstZone_ + , _istKey = Nothing + , _istOauthToken = Nothing + , _istFields = Nothing + , _istAlt = "json" + , _istInstance = pIstInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +istQuotaUser :: Lens' InstancesSetTags' (Maybe Text) +istQuotaUser + = lens _istQuotaUser (\ s a -> s{_istQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +istPrettyPrint :: Lens' InstancesSetTags' Bool +istPrettyPrint + = lens _istPrettyPrint + (\ s a -> s{_istPrettyPrint = a}) + +-- | Project ID for this request. +istProject :: Lens' InstancesSetTags' Text +istProject + = lens _istProject (\ s a -> s{_istProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +istUserIp :: Lens' InstancesSetTags' (Maybe Text) +istUserIp + = lens _istUserIp (\ s a -> s{_istUserIp = a}) + +-- | The name of the zone for this request. +istZone :: Lens' InstancesSetTags' Text +istZone = lens _istZone (\ s a -> s{_istZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +istKey :: Lens' InstancesSetTags' (Maybe Text) +istKey = lens _istKey (\ s a -> s{_istKey = a}) + +-- | OAuth 2.0 token for the current user. +istOauthToken :: Lens' InstancesSetTags' (Maybe Text) +istOauthToken + = lens _istOauthToken + (\ s a -> s{_istOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +istFields :: Lens' InstancesSetTags' (Maybe Text) +istFields + = lens _istFields (\ s a -> s{_istFields = a}) + +-- | Data format for the response. +istAlt :: Lens' InstancesSetTags' Text +istAlt = lens _istAlt (\ s a -> s{_istAlt = a}) + +-- | Name of the instance scoping this request. +istInstance :: Lens' InstancesSetTags' Text +istInstance + = lens _istInstance (\ s a -> s{_istInstance = a}) + +instance GoogleRequest InstancesSetTags' where + type Rs InstancesSetTags' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesSetTags{..} + = go _istQuotaUser _istPrettyPrint _istProject + _istUserIp + _istZone + _istKey + _istOauthToken + _istFields + _istAlt + _istInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesSetTagsAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Start.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Start.hs new file mode 100644 index 000000000..5f0302b3f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Start.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Start +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | This method starts an instance that was stopped using the using the +-- instances().stop method. For more information, see Restart an instance. +-- +-- /See:/ for @ComputeInstancesStart@. +module Compute.Instances.Start + ( + -- * REST Resource + InstancesStartAPI + + -- * Creating a Request + , instancesStart + , InstancesStart + + -- * Request Lenses + , isQuotaUser + , isPrettyPrint + , isProject + , isUserIp + , isZone + , isKey + , isOauthToken + , isFields + , isAlt + , isInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesStart@ which the +-- 'InstancesStart' request conforms to. +type InstancesStartAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "start" :> Post '[JSON] Operation + +-- | This method starts an instance that was stopped using the using the +-- instances().stop method. For more information, see Restart an instance. +-- +-- /See:/ 'instancesStart' smart constructor. +data InstancesStart = InstancesStart + { _isQuotaUser :: !(Maybe Text) + , _isPrettyPrint :: !Bool + , _isProject :: !Text + , _isUserIp :: !(Maybe Text) + , _isZone :: !Text + , _isKey :: !(Maybe Text) + , _isOauthToken :: !(Maybe Text) + , _isFields :: !(Maybe Text) + , _isAlt :: !Text + , _isInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesStart'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isQuotaUser' +-- +-- * 'isPrettyPrint' +-- +-- * 'isProject' +-- +-- * 'isUserIp' +-- +-- * 'isZone' +-- +-- * 'isKey' +-- +-- * 'isOauthToken' +-- +-- * 'isFields' +-- +-- * 'isAlt' +-- +-- * 'isInstance' +instancesStart + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesStart +instancesStart pIsProject_ pIsZone_ pIsInstance_ = + InstancesStart + { _isQuotaUser = Nothing + , _isPrettyPrint = True + , _isProject = pIsProject_ + , _isUserIp = Nothing + , _isZone = pIsZone_ + , _isKey = Nothing + , _isOauthToken = Nothing + , _isFields = Nothing + , _isAlt = "json" + , _isInstance = pIsInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +isQuotaUser :: Lens' InstancesStart' (Maybe Text) +isQuotaUser + = lens _isQuotaUser (\ s a -> s{_isQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +isPrettyPrint :: Lens' InstancesStart' Bool +isPrettyPrint + = lens _isPrettyPrint + (\ s a -> s{_isPrettyPrint = a}) + +-- | Project ID for this request. +isProject :: Lens' InstancesStart' Text +isProject + = lens _isProject (\ s a -> s{_isProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +isUserIp :: Lens' InstancesStart' (Maybe Text) +isUserIp = lens _isUserIp (\ s a -> s{_isUserIp = a}) + +-- | The name of the zone for this request. +isZone :: Lens' InstancesStart' Text +isZone = lens _isZone (\ s a -> s{_isZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +isKey :: Lens' InstancesStart' (Maybe Text) +isKey = lens _isKey (\ s a -> s{_isKey = a}) + +-- | OAuth 2.0 token for the current user. +isOauthToken :: Lens' InstancesStart' (Maybe Text) +isOauthToken + = lens _isOauthToken (\ s a -> s{_isOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +isFields :: Lens' InstancesStart' (Maybe Text) +isFields = lens _isFields (\ s a -> s{_isFields = a}) + +-- | Data format for the response. +isAlt :: Lens' InstancesStart' Text +isAlt = lens _isAlt (\ s a -> s{_isAlt = a}) + +-- | Name of the instance resource to start. +isInstance :: Lens' InstancesStart' Text +isInstance + = lens _isInstance (\ s a -> s{_isInstance = a}) + +instance GoogleRequest InstancesStart' where + type Rs InstancesStart' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesStart{..} + = go _isQuotaUser _isPrettyPrint _isProject _isUserIp + _isZone + _isKey + _isOauthToken + _isFields + _isAlt + _isInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesStartAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Stop.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Stop.hs new file mode 100644 index 000000000..d5434abe9 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Instances/Stop.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Instances.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | This method stops a running instance, shutting it down cleanly, and +-- allows you to restart the instance at a later time. Stopped instances do +-- not incur per-minute, virtual machine usage charges while they are +-- stopped, but any resources that the virtual machine is using, such as +-- persistent disks and static IP addresses,will continue to be charged +-- until they are deleted. For more information, see Stopping an instance. +-- +-- /See:/ for @ComputeInstancesStop@. +module Compute.Instances.Stop + ( + -- * REST Resource + InstancesStopAPI + + -- * Creating a Request + , instancesStop + , InstancesStop + + -- * Request Lenses + , insnQuotaUser + , insnPrettyPrint + , insnProject + , insnUserIp + , insnZone + , insnKey + , insnOauthToken + , insnFields + , insnAlt + , insnInstance + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeInstancesStop@ which the +-- 'InstancesStop' request conforms to. +type InstancesStopAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instances" :> + Capture "instance" Text :> + "stop" :> Post '[JSON] Operation + +-- | This method stops a running instance, shutting it down cleanly, and +-- allows you to restart the instance at a later time. Stopped instances do +-- not incur per-minute, virtual machine usage charges while they are +-- stopped, but any resources that the virtual machine is using, such as +-- persistent disks and static IP addresses,will continue to be charged +-- until they are deleted. For more information, see Stopping an instance. +-- +-- /See:/ 'instancesStop' smart constructor. +data InstancesStop = InstancesStop + { _insnQuotaUser :: !(Maybe Text) + , _insnPrettyPrint :: !Bool + , _insnProject :: !Text + , _insnUserIp :: !(Maybe Text) + , _insnZone :: !Text + , _insnKey :: !(Maybe Text) + , _insnOauthToken :: !(Maybe Text) + , _insnFields :: !(Maybe Text) + , _insnAlt :: !Text + , _insnInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'insnQuotaUser' +-- +-- * 'insnPrettyPrint' +-- +-- * 'insnProject' +-- +-- * 'insnUserIp' +-- +-- * 'insnZone' +-- +-- * 'insnKey' +-- +-- * 'insnOauthToken' +-- +-- * 'insnFields' +-- +-- * 'insnAlt' +-- +-- * 'insnInstance' +instancesStop + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'instance' + -> InstancesStop +instancesStop pInsnProject_ pInsnZone_ pInsnInstance_ = + InstancesStop + { _insnQuotaUser = Nothing + , _insnPrettyPrint = True + , _insnProject = pInsnProject_ + , _insnUserIp = Nothing + , _insnZone = pInsnZone_ + , _insnKey = Nothing + , _insnOauthToken = Nothing + , _insnFields = Nothing + , _insnAlt = "json" + , _insnInstance = pInsnInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +insnQuotaUser :: Lens' InstancesStop' (Maybe Text) +insnQuotaUser + = lens _insnQuotaUser + (\ s a -> s{_insnQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +insnPrettyPrint :: Lens' InstancesStop' Bool +insnPrettyPrint + = lens _insnPrettyPrint + (\ s a -> s{_insnPrettyPrint = a}) + +-- | Project ID for this request. +insnProject :: Lens' InstancesStop' Text +insnProject + = lens _insnProject (\ s a -> s{_insnProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +insnUserIp :: Lens' InstancesStop' (Maybe Text) +insnUserIp + = lens _insnUserIp (\ s a -> s{_insnUserIp = a}) + +-- | The name of the zone for this request. +insnZone :: Lens' InstancesStop' Text +insnZone = lens _insnZone (\ s a -> s{_insnZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +insnKey :: Lens' InstancesStop' (Maybe Text) +insnKey = lens _insnKey (\ s a -> s{_insnKey = a}) + +-- | OAuth 2.0 token for the current user. +insnOauthToken :: Lens' InstancesStop' (Maybe Text) +insnOauthToken + = lens _insnOauthToken + (\ s a -> s{_insnOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +insnFields :: Lens' InstancesStop' (Maybe Text) +insnFields + = lens _insnFields (\ s a -> s{_insnFields = a}) + +-- | Data format for the response. +insnAlt :: Lens' InstancesStop' Text +insnAlt = lens _insnAlt (\ s a -> s{_insnAlt = a}) + +-- | Name of the instance resource to stop. +insnInstance :: Lens' InstancesStop' Text +insnInstance + = lens _insnInstance (\ s a -> s{_insnInstance = a}) + +instance GoogleRequest InstancesStop' where + type Rs InstancesStop' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u InstancesStop{..} + = go _insnQuotaUser _insnPrettyPrint _insnProject + _insnUserIp + _insnZone + _insnKey + _insnOauthToken + _insnFields + _insnAlt + _insnInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesStopAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Licenses/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Licenses/Get.hs new file mode 100644 index 000000000..4be7d2949 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Licenses/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Licenses.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified license resource. +-- +-- /See:/ for @ComputeLicensesGet@. +module Compute.Licenses.Get + ( + -- * REST Resource + LicensesGetAPI + + -- * Creating a Request + , licensesGet + , LicensesGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgProject + , lgUserIp + , lgKey + , lgLicense + , lgOauthToken + , lgFields + , lgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeLicensesGet@ which the +-- 'LicensesGet' request conforms to. +type LicensesGetAPI = + Capture "project" Text :> + "global" :> + "licenses" :> + Capture "license" Text :> Get '[JSON] License + +-- | Returns the specified license resource. +-- +-- /See:/ 'licensesGet' smart constructor. +data LicensesGet = LicensesGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgProject :: !Text + , _lgUserIp :: !(Maybe Text) + , _lgKey :: !(Maybe Text) + , _lgLicense :: !Text + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LicensesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgProject' +-- +-- * 'lgUserIp' +-- +-- * 'lgKey' +-- +-- * 'lgLicense' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgAlt' +licensesGet + :: Text -- ^ 'project' + -> Text -- ^ 'license' + -> LicensesGet +licensesGet pLgProject_ pLgLicense_ = + LicensesGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgProject = pLgProject_ + , _lgUserIp = Nothing + , _lgKey = Nothing + , _lgLicense = pLgLicense_ + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LicensesGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LicensesGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | Project ID for this request. +lgProject :: Lens' LicensesGet' Text +lgProject + = lens _lgProject (\ s a -> s{_lgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LicensesGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LicensesGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | Name of the license resource to return. +lgLicense :: Lens' LicensesGet' Text +lgLicense + = lens _lgLicense (\ s a -> s{_lgLicense = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LicensesGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LicensesGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | Data format for the response. +lgAlt :: Lens' LicensesGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LicensesGet' where + type Rs LicensesGet' = License + request = requestWithRoute defReq computeURL + requestWithRoute r u LicensesGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgProject _lgUserIp + _lgKey + _lgLicense + _lgOauthToken + _lgFields + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LicensesGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/AggregatedList.hs new file mode 100644 index 000000000..8d0ea0185 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/AggregatedList.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.MachineTypes.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of machine type resources grouped by scope. +-- +-- /See:/ for @ComputeMachineTypesAggregatedList@. +module Compute.MachineTypes.AggregatedList + ( + -- * REST Resource + MachineTypesAggregatedListAPI + + -- * Creating a Request + , machineTypesAggregatedList + , MachineTypesAggregatedList + + -- * Request Lenses + , mtalQuotaUser + , mtalPrettyPrint + , mtalProject + , mtalUserIp + , mtalKey + , mtalFilter + , mtalPageToken + , mtalOauthToken + , mtalMaxResults + , mtalFields + , mtalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeMachineTypesAggregatedList@ which the +-- 'MachineTypesAggregatedList' request conforms to. +type MachineTypesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "machineTypes" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] MachineTypeAggregatedList + +-- | Retrieves the list of machine type resources grouped by scope. +-- +-- /See:/ 'machineTypesAggregatedList' smart constructor. +data MachineTypesAggregatedList = MachineTypesAggregatedList + { _mtalQuotaUser :: !(Maybe Text) + , _mtalPrettyPrint :: !Bool + , _mtalProject :: !Text + , _mtalUserIp :: !(Maybe Text) + , _mtalKey :: !(Maybe Text) + , _mtalFilter :: !(Maybe Text) + , _mtalPageToken :: !(Maybe Text) + , _mtalOauthToken :: !(Maybe Text) + , _mtalMaxResults :: !Word32 + , _mtalFields :: !(Maybe Text) + , _mtalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtalQuotaUser' +-- +-- * 'mtalPrettyPrint' +-- +-- * 'mtalProject' +-- +-- * 'mtalUserIp' +-- +-- * 'mtalKey' +-- +-- * 'mtalFilter' +-- +-- * 'mtalPageToken' +-- +-- * 'mtalOauthToken' +-- +-- * 'mtalMaxResults' +-- +-- * 'mtalFields' +-- +-- * 'mtalAlt' +machineTypesAggregatedList + :: Text -- ^ 'project' + -> MachineTypesAggregatedList +machineTypesAggregatedList pMtalProject_ = + MachineTypesAggregatedList + { _mtalQuotaUser = Nothing + , _mtalPrettyPrint = True + , _mtalProject = pMtalProject_ + , _mtalUserIp = Nothing + , _mtalKey = Nothing + , _mtalFilter = Nothing + , _mtalPageToken = Nothing + , _mtalOauthToken = Nothing + , _mtalMaxResults = 500 + , _mtalFields = Nothing + , _mtalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mtalQuotaUser :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalQuotaUser + = lens _mtalQuotaUser + (\ s a -> s{_mtalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mtalPrettyPrint :: Lens' MachineTypesAggregatedList' Bool +mtalPrettyPrint + = lens _mtalPrettyPrint + (\ s a -> s{_mtalPrettyPrint = a}) + +-- | Project ID for this request. +mtalProject :: Lens' MachineTypesAggregatedList' Text +mtalProject + = lens _mtalProject (\ s a -> s{_mtalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mtalUserIp :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalUserIp + = lens _mtalUserIp (\ s a -> s{_mtalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mtalKey :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalKey = lens _mtalKey (\ s a -> s{_mtalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +mtalFilter :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalFilter + = lens _mtalFilter (\ s a -> s{_mtalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +mtalPageToken :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalPageToken + = lens _mtalPageToken + (\ s a -> s{_mtalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mtalOauthToken :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalOauthToken + = lens _mtalOauthToken + (\ s a -> s{_mtalOauthToken = a}) + +-- | Maximum count of results to be returned. +mtalMaxResults :: Lens' MachineTypesAggregatedList' Word32 +mtalMaxResults + = lens _mtalMaxResults + (\ s a -> s{_mtalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mtalFields :: Lens' MachineTypesAggregatedList' (Maybe Text) +mtalFields + = lens _mtalFields (\ s a -> s{_mtalFields = a}) + +-- | Data format for the response. +mtalAlt :: Lens' MachineTypesAggregatedList' Text +mtalAlt = lens _mtalAlt (\ s a -> s{_mtalAlt = a}) + +instance GoogleRequest MachineTypesAggregatedList' + where + type Rs MachineTypesAggregatedList' = + MachineTypeAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u MachineTypesAggregatedList{..} + = go _mtalQuotaUser _mtalPrettyPrint _mtalProject + _mtalUserIp + _mtalKey + _mtalFilter + _mtalPageToken + _mtalOauthToken + (Just _mtalMaxResults) + _mtalFields + _mtalAlt + where go + = clientWithRoute + (Proxy :: Proxy MachineTypesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/Get.hs new file mode 100644 index 000000000..9b584c40b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.MachineTypes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified machine type resource. +-- +-- /See:/ for @ComputeMachineTypesGet@. +module Compute.MachineTypes.Get + ( + -- * REST Resource + MachineTypesGetAPI + + -- * Creating a Request + , machineTypesGet + , MachineTypesGet + + -- * Request Lenses + , mtgQuotaUser + , mtgPrettyPrint + , mtgProject + , mtgUserIp + , mtgZone + , mtgKey + , mtgMachineType + , mtgOauthToken + , mtgFields + , mtgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeMachineTypesGet@ which the +-- 'MachineTypesGet' request conforms to. +type MachineTypesGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "machineTypes" :> + Capture "machineType" Text :> Get '[JSON] MachineType + +-- | Returns the specified machine type resource. +-- +-- /See:/ 'machineTypesGet' smart constructor. +data MachineTypesGet = MachineTypesGet + { _mtgQuotaUser :: !(Maybe Text) + , _mtgPrettyPrint :: !Bool + , _mtgProject :: !Text + , _mtgUserIp :: !(Maybe Text) + , _mtgZone :: !Text + , _mtgKey :: !(Maybe Text) + , _mtgMachineType :: !Text + , _mtgOauthToken :: !(Maybe Text) + , _mtgFields :: !(Maybe Text) + , _mtgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtgQuotaUser' +-- +-- * 'mtgPrettyPrint' +-- +-- * 'mtgProject' +-- +-- * 'mtgUserIp' +-- +-- * 'mtgZone' +-- +-- * 'mtgKey' +-- +-- * 'mtgMachineType' +-- +-- * 'mtgOauthToken' +-- +-- * 'mtgFields' +-- +-- * 'mtgAlt' +machineTypesGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> Text -- ^ 'machineType' + -> MachineTypesGet +machineTypesGet pMtgProject_ pMtgZone_ pMtgMachineType_ = + MachineTypesGet + { _mtgQuotaUser = Nothing + , _mtgPrettyPrint = True + , _mtgProject = pMtgProject_ + , _mtgUserIp = Nothing + , _mtgZone = pMtgZone_ + , _mtgKey = Nothing + , _mtgMachineType = pMtgMachineType_ + , _mtgOauthToken = Nothing + , _mtgFields = Nothing + , _mtgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mtgQuotaUser :: Lens' MachineTypesGet' (Maybe Text) +mtgQuotaUser + = lens _mtgQuotaUser (\ s a -> s{_mtgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mtgPrettyPrint :: Lens' MachineTypesGet' Bool +mtgPrettyPrint + = lens _mtgPrettyPrint + (\ s a -> s{_mtgPrettyPrint = a}) + +-- | Project ID for this request. +mtgProject :: Lens' MachineTypesGet' Text +mtgProject + = lens _mtgProject (\ s a -> s{_mtgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mtgUserIp :: Lens' MachineTypesGet' (Maybe Text) +mtgUserIp + = lens _mtgUserIp (\ s a -> s{_mtgUserIp = a}) + +-- | The name of the zone for this request. +mtgZone :: Lens' MachineTypesGet' Text +mtgZone = lens _mtgZone (\ s a -> s{_mtgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mtgKey :: Lens' MachineTypesGet' (Maybe Text) +mtgKey = lens _mtgKey (\ s a -> s{_mtgKey = a}) + +-- | Name of the machine type resource to return. +mtgMachineType :: Lens' MachineTypesGet' Text +mtgMachineType + = lens _mtgMachineType + (\ s a -> s{_mtgMachineType = a}) + +-- | OAuth 2.0 token for the current user. +mtgOauthToken :: Lens' MachineTypesGet' (Maybe Text) +mtgOauthToken + = lens _mtgOauthToken + (\ s a -> s{_mtgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mtgFields :: Lens' MachineTypesGet' (Maybe Text) +mtgFields + = lens _mtgFields (\ s a -> s{_mtgFields = a}) + +-- | Data format for the response. +mtgAlt :: Lens' MachineTypesGet' Text +mtgAlt = lens _mtgAlt (\ s a -> s{_mtgAlt = a}) + +instance GoogleRequest MachineTypesGet' where + type Rs MachineTypesGet' = MachineType + request = requestWithRoute defReq computeURL + requestWithRoute r u MachineTypesGet{..} + = go _mtgQuotaUser _mtgPrettyPrint _mtgProject + _mtgUserIp + _mtgZone + _mtgKey + _mtgMachineType + _mtgOauthToken + _mtgFields + _mtgAlt + where go + = clientWithRoute (Proxy :: Proxy MachineTypesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/List.hs new file mode 100644 index 000000000..04ed225a5 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.MachineTypes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of machine type resources available to the specified +-- project. +-- +-- /See:/ for @ComputeMachineTypesList@. +module Compute.MachineTypes.List + ( + -- * REST Resource + MachineTypesListAPI + + -- * Creating a Request + , machineTypesList + , MachineTypesList + + -- * Request Lenses + , mtlQuotaUser + , mtlPrettyPrint + , mtlProject + , mtlUserIp + , mtlZone + , mtlKey + , mtlFilter + , mtlPageToken + , mtlOauthToken + , mtlMaxResults + , mtlFields + , mtlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeMachineTypesList@ which the +-- 'MachineTypesList' request conforms to. +type MachineTypesListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "machineTypes" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] MachineTypeList + +-- | Retrieves the list of machine type resources available to the specified +-- project. +-- +-- /See:/ 'machineTypesList' smart constructor. +data MachineTypesList = MachineTypesList + { _mtlQuotaUser :: !(Maybe Text) + , _mtlPrettyPrint :: !Bool + , _mtlProject :: !Text + , _mtlUserIp :: !(Maybe Text) + , _mtlZone :: !Text + , _mtlKey :: !(Maybe Text) + , _mtlFilter :: !(Maybe Text) + , _mtlPageToken :: !(Maybe Text) + , _mtlOauthToken :: !(Maybe Text) + , _mtlMaxResults :: !Word32 + , _mtlFields :: !(Maybe Text) + , _mtlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MachineTypesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtlQuotaUser' +-- +-- * 'mtlPrettyPrint' +-- +-- * 'mtlProject' +-- +-- * 'mtlUserIp' +-- +-- * 'mtlZone' +-- +-- * 'mtlKey' +-- +-- * 'mtlFilter' +-- +-- * 'mtlPageToken' +-- +-- * 'mtlOauthToken' +-- +-- * 'mtlMaxResults' +-- +-- * 'mtlFields' +-- +-- * 'mtlAlt' +machineTypesList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> MachineTypesList +machineTypesList pMtlProject_ pMtlZone_ = + MachineTypesList + { _mtlQuotaUser = Nothing + , _mtlPrettyPrint = True + , _mtlProject = pMtlProject_ + , _mtlUserIp = Nothing + , _mtlZone = pMtlZone_ + , _mtlKey = Nothing + , _mtlFilter = Nothing + , _mtlPageToken = Nothing + , _mtlOauthToken = Nothing + , _mtlMaxResults = 500 + , _mtlFields = Nothing + , _mtlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mtlQuotaUser :: Lens' MachineTypesList' (Maybe Text) +mtlQuotaUser + = lens _mtlQuotaUser (\ s a -> s{_mtlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mtlPrettyPrint :: Lens' MachineTypesList' Bool +mtlPrettyPrint + = lens _mtlPrettyPrint + (\ s a -> s{_mtlPrettyPrint = a}) + +-- | Project ID for this request. +mtlProject :: Lens' MachineTypesList' Text +mtlProject + = lens _mtlProject (\ s a -> s{_mtlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mtlUserIp :: Lens' MachineTypesList' (Maybe Text) +mtlUserIp + = lens _mtlUserIp (\ s a -> s{_mtlUserIp = a}) + +-- | The name of the zone for this request. +mtlZone :: Lens' MachineTypesList' Text +mtlZone = lens _mtlZone (\ s a -> s{_mtlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mtlKey :: Lens' MachineTypesList' (Maybe Text) +mtlKey = lens _mtlKey (\ s a -> s{_mtlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +mtlFilter :: Lens' MachineTypesList' (Maybe Text) +mtlFilter + = lens _mtlFilter (\ s a -> s{_mtlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +mtlPageToken :: Lens' MachineTypesList' (Maybe Text) +mtlPageToken + = lens _mtlPageToken (\ s a -> s{_mtlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mtlOauthToken :: Lens' MachineTypesList' (Maybe Text) +mtlOauthToken + = lens _mtlOauthToken + (\ s a -> s{_mtlOauthToken = a}) + +-- | Maximum count of results to be returned. +mtlMaxResults :: Lens' MachineTypesList' Word32 +mtlMaxResults + = lens _mtlMaxResults + (\ s a -> s{_mtlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mtlFields :: Lens' MachineTypesList' (Maybe Text) +mtlFields + = lens _mtlFields (\ s a -> s{_mtlFields = a}) + +-- | Data format for the response. +mtlAlt :: Lens' MachineTypesList' Text +mtlAlt = lens _mtlAlt (\ s a -> s{_mtlAlt = a}) + +instance GoogleRequest MachineTypesList' where + type Rs MachineTypesList' = MachineTypeList + request = requestWithRoute defReq computeURL + requestWithRoute r u MachineTypesList{..} + = go _mtlQuotaUser _mtlPrettyPrint _mtlProject + _mtlUserIp + _mtlZone + _mtlKey + _mtlFilter + _mtlPageToken + _mtlOauthToken + (Just _mtlMaxResults) + _mtlFields + _mtlAlt + where go + = clientWithRoute + (Proxy :: Proxy MachineTypesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Delete.hs new file mode 100644 index 000000000..eea822806 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Networks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified network resource. +-- +-- /See:/ for @ComputeNetworksDelete@. +module Compute.Networks.Delete + ( + -- * REST Resource + NetworksDeleteAPI + + -- * Creating a Request + , networksDelete + , NetworksDelete + + -- * Request Lenses + , ndQuotaUser + , ndPrettyPrint + , ndProject + , ndUserIp + , ndNetwork + , ndKey + , ndOauthToken + , ndFields + , ndAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeNetworksDelete@ which the +-- 'NetworksDelete' request conforms to. +type NetworksDeleteAPI = + Capture "project" Text :> + "global" :> + "networks" :> + Capture "network" Text :> Delete '[JSON] Operation + +-- | Deletes the specified network resource. +-- +-- /See:/ 'networksDelete' smart constructor. +data NetworksDelete = NetworksDelete + { _ndQuotaUser :: !(Maybe Text) + , _ndPrettyPrint :: !Bool + , _ndProject :: !Text + , _ndUserIp :: !(Maybe Text) + , _ndNetwork :: !Text + , _ndKey :: !(Maybe Text) + , _ndOauthToken :: !(Maybe Text) + , _ndFields :: !(Maybe Text) + , _ndAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ndQuotaUser' +-- +-- * 'ndPrettyPrint' +-- +-- * 'ndProject' +-- +-- * 'ndUserIp' +-- +-- * 'ndNetwork' +-- +-- * 'ndKey' +-- +-- * 'ndOauthToken' +-- +-- * 'ndFields' +-- +-- * 'ndAlt' +networksDelete + :: Text -- ^ 'project' + -> Text -- ^ 'network' + -> NetworksDelete +networksDelete pNdProject_ pNdNetwork_ = + NetworksDelete + { _ndQuotaUser = Nothing + , _ndPrettyPrint = True + , _ndProject = pNdProject_ + , _ndUserIp = Nothing + , _ndNetwork = pNdNetwork_ + , _ndKey = Nothing + , _ndOauthToken = Nothing + , _ndFields = Nothing + , _ndAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ndQuotaUser :: Lens' NetworksDelete' (Maybe Text) +ndQuotaUser + = lens _ndQuotaUser (\ s a -> s{_ndQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ndPrettyPrint :: Lens' NetworksDelete' Bool +ndPrettyPrint + = lens _ndPrettyPrint + (\ s a -> s{_ndPrettyPrint = a}) + +-- | Project ID for this request. +ndProject :: Lens' NetworksDelete' Text +ndProject + = lens _ndProject (\ s a -> s{_ndProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ndUserIp :: Lens' NetworksDelete' (Maybe Text) +ndUserIp = lens _ndUserIp (\ s a -> s{_ndUserIp = a}) + +-- | Name of the network resource to delete. +ndNetwork :: Lens' NetworksDelete' Text +ndNetwork + = lens _ndNetwork (\ s a -> s{_ndNetwork = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ndKey :: Lens' NetworksDelete' (Maybe Text) +ndKey = lens _ndKey (\ s a -> s{_ndKey = a}) + +-- | OAuth 2.0 token for the current user. +ndOauthToken :: Lens' NetworksDelete' (Maybe Text) +ndOauthToken + = lens _ndOauthToken (\ s a -> s{_ndOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ndFields :: Lens' NetworksDelete' (Maybe Text) +ndFields = lens _ndFields (\ s a -> s{_ndFields = a}) + +-- | Data format for the response. +ndAlt :: Lens' NetworksDelete' Text +ndAlt = lens _ndAlt (\ s a -> s{_ndAlt = a}) + +instance GoogleRequest NetworksDelete' where + type Rs NetworksDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u NetworksDelete{..} + = go _ndQuotaUser _ndPrettyPrint _ndProject _ndUserIp + _ndNetwork + _ndKey + _ndOauthToken + _ndFields + _ndAlt + where go + = clientWithRoute (Proxy :: Proxy NetworksDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Get.hs new file mode 100644 index 000000000..8d84b662f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Networks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified network resource. +-- +-- /See:/ for @ComputeNetworksGet@. +module Compute.Networks.Get + ( + -- * REST Resource + NetworksGetAPI + + -- * Creating a Request + , networksGet + , NetworksGet + + -- * Request Lenses + , ngQuotaUser + , ngPrettyPrint + , ngProject + , ngUserIp + , ngNetwork + , ngKey + , ngOauthToken + , ngFields + , ngAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeNetworksGet@ which the +-- 'NetworksGet' request conforms to. +type NetworksGetAPI = + Capture "project" Text :> + "global" :> + "networks" :> + Capture "network" Text :> Get '[JSON] Network + +-- | Returns the specified network resource. +-- +-- /See:/ 'networksGet' smart constructor. +data NetworksGet = NetworksGet + { _ngQuotaUser :: !(Maybe Text) + , _ngPrettyPrint :: !Bool + , _ngProject :: !Text + , _ngUserIp :: !(Maybe Text) + , _ngNetwork :: !Text + , _ngKey :: !(Maybe Text) + , _ngOauthToken :: !(Maybe Text) + , _ngFields :: !(Maybe Text) + , _ngAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ngQuotaUser' +-- +-- * 'ngPrettyPrint' +-- +-- * 'ngProject' +-- +-- * 'ngUserIp' +-- +-- * 'ngNetwork' +-- +-- * 'ngKey' +-- +-- * 'ngOauthToken' +-- +-- * 'ngFields' +-- +-- * 'ngAlt' +networksGet + :: Text -- ^ 'project' + -> Text -- ^ 'network' + -> NetworksGet +networksGet pNgProject_ pNgNetwork_ = + NetworksGet + { _ngQuotaUser = Nothing + , _ngPrettyPrint = True + , _ngProject = pNgProject_ + , _ngUserIp = Nothing + , _ngNetwork = pNgNetwork_ + , _ngKey = Nothing + , _ngOauthToken = Nothing + , _ngFields = Nothing + , _ngAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ngQuotaUser :: Lens' NetworksGet' (Maybe Text) +ngQuotaUser + = lens _ngQuotaUser (\ s a -> s{_ngQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ngPrettyPrint :: Lens' NetworksGet' Bool +ngPrettyPrint + = lens _ngPrettyPrint + (\ s a -> s{_ngPrettyPrint = a}) + +-- | Project ID for this request. +ngProject :: Lens' NetworksGet' Text +ngProject + = lens _ngProject (\ s a -> s{_ngProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ngUserIp :: Lens' NetworksGet' (Maybe Text) +ngUserIp = lens _ngUserIp (\ s a -> s{_ngUserIp = a}) + +-- | Name of the network resource to return. +ngNetwork :: Lens' NetworksGet' Text +ngNetwork + = lens _ngNetwork (\ s a -> s{_ngNetwork = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ngKey :: Lens' NetworksGet' (Maybe Text) +ngKey = lens _ngKey (\ s a -> s{_ngKey = a}) + +-- | OAuth 2.0 token for the current user. +ngOauthToken :: Lens' NetworksGet' (Maybe Text) +ngOauthToken + = lens _ngOauthToken (\ s a -> s{_ngOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ngFields :: Lens' NetworksGet' (Maybe Text) +ngFields = lens _ngFields (\ s a -> s{_ngFields = a}) + +-- | Data format for the response. +ngAlt :: Lens' NetworksGet' Text +ngAlt = lens _ngAlt (\ s a -> s{_ngAlt = a}) + +instance GoogleRequest NetworksGet' where + type Rs NetworksGet' = Network + request = requestWithRoute defReq computeURL + requestWithRoute r u NetworksGet{..} + = go _ngQuotaUser _ngPrettyPrint _ngProject _ngUserIp + _ngNetwork + _ngKey + _ngOauthToken + _ngFields + _ngAlt + where go + = clientWithRoute (Proxy :: Proxy NetworksGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Insert.hs new file mode 100644 index 000000000..71e13b454 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Networks.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a network resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeNetworksInsert@. +module Compute.Networks.Insert + ( + -- * REST Resource + NetworksInsertAPI + + -- * Creating a Request + , networksInsert + , NetworksInsert + + -- * Request Lenses + , niQuotaUser + , niPrettyPrint + , niProject + , niUserIp + , niKey + , niOauthToken + , niFields + , niAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeNetworksInsert@ which the +-- 'NetworksInsert' request conforms to. +type NetworksInsertAPI = + Capture "project" Text :> + "global" :> "networks" :> Post '[JSON] Operation + +-- | Creates a network resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'networksInsert' smart constructor. +data NetworksInsert = NetworksInsert + { _niQuotaUser :: !(Maybe Text) + , _niPrettyPrint :: !Bool + , _niProject :: !Text + , _niUserIp :: !(Maybe Text) + , _niKey :: !(Maybe Text) + , _niOauthToken :: !(Maybe Text) + , _niFields :: !(Maybe Text) + , _niAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworksInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'niQuotaUser' +-- +-- * 'niPrettyPrint' +-- +-- * 'niProject' +-- +-- * 'niUserIp' +-- +-- * 'niKey' +-- +-- * 'niOauthToken' +-- +-- * 'niFields' +-- +-- * 'niAlt' +networksInsert + :: Text -- ^ 'project' + -> NetworksInsert +networksInsert pNiProject_ = + NetworksInsert + { _niQuotaUser = Nothing + , _niPrettyPrint = True + , _niProject = pNiProject_ + , _niUserIp = Nothing + , _niKey = Nothing + , _niOauthToken = Nothing + , _niFields = Nothing + , _niAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +niQuotaUser :: Lens' NetworksInsert' (Maybe Text) +niQuotaUser + = lens _niQuotaUser (\ s a -> s{_niQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +niPrettyPrint :: Lens' NetworksInsert' Bool +niPrettyPrint + = lens _niPrettyPrint + (\ s a -> s{_niPrettyPrint = a}) + +-- | Project ID for this request. +niProject :: Lens' NetworksInsert' Text +niProject + = lens _niProject (\ s a -> s{_niProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +niUserIp :: Lens' NetworksInsert' (Maybe Text) +niUserIp = lens _niUserIp (\ s a -> s{_niUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +niKey :: Lens' NetworksInsert' (Maybe Text) +niKey = lens _niKey (\ s a -> s{_niKey = a}) + +-- | OAuth 2.0 token for the current user. +niOauthToken :: Lens' NetworksInsert' (Maybe Text) +niOauthToken + = lens _niOauthToken (\ s a -> s{_niOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +niFields :: Lens' NetworksInsert' (Maybe Text) +niFields = lens _niFields (\ s a -> s{_niFields = a}) + +-- | Data format for the response. +niAlt :: Lens' NetworksInsert' Text +niAlt = lens _niAlt (\ s a -> s{_niAlt = a}) + +instance GoogleRequest NetworksInsert' where + type Rs NetworksInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u NetworksInsert{..} + = go _niQuotaUser _niPrettyPrint _niProject _niUserIp + _niKey + _niOauthToken + _niFields + _niAlt + where go + = clientWithRoute (Proxy :: Proxy NetworksInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Networks/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/List.hs new file mode 100644 index 000000000..78f3ed8e8 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Networks/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Networks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of network resources available to the specified +-- project. +-- +-- /See:/ for @ComputeNetworksList@. +module Compute.Networks.List + ( + -- * REST Resource + NetworksListAPI + + -- * Creating a Request + , networksList + , NetworksList + + -- * Request Lenses + , nlQuotaUser + , nlPrettyPrint + , nlProject + , nlUserIp + , nlKey + , nlFilter + , nlPageToken + , nlOauthToken + , nlMaxResults + , nlFields + , nlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeNetworksList@ which the +-- 'NetworksList' request conforms to. +type NetworksListAPI = + Capture "project" Text :> + "global" :> + "networks" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] NetworkList + +-- | Retrieves the list of network resources available to the specified +-- project. +-- +-- /See:/ 'networksList' smart constructor. +data NetworksList = NetworksList + { _nlQuotaUser :: !(Maybe Text) + , _nlPrettyPrint :: !Bool + , _nlProject :: !Text + , _nlUserIp :: !(Maybe Text) + , _nlKey :: !(Maybe Text) + , _nlFilter :: !(Maybe Text) + , _nlPageToken :: !(Maybe Text) + , _nlOauthToken :: !(Maybe Text) + , _nlMaxResults :: !Word32 + , _nlFields :: !(Maybe Text) + , _nlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nlQuotaUser' +-- +-- * 'nlPrettyPrint' +-- +-- * 'nlProject' +-- +-- * 'nlUserIp' +-- +-- * 'nlKey' +-- +-- * 'nlFilter' +-- +-- * 'nlPageToken' +-- +-- * 'nlOauthToken' +-- +-- * 'nlMaxResults' +-- +-- * 'nlFields' +-- +-- * 'nlAlt' +networksList + :: Text -- ^ 'project' + -> NetworksList +networksList pNlProject_ = + NetworksList + { _nlQuotaUser = Nothing + , _nlPrettyPrint = True + , _nlProject = pNlProject_ + , _nlUserIp = Nothing + , _nlKey = Nothing + , _nlFilter = Nothing + , _nlPageToken = Nothing + , _nlOauthToken = Nothing + , _nlMaxResults = 500 + , _nlFields = Nothing + , _nlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +nlQuotaUser :: Lens' NetworksList' (Maybe Text) +nlQuotaUser + = lens _nlQuotaUser (\ s a -> s{_nlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nlPrettyPrint :: Lens' NetworksList' Bool +nlPrettyPrint + = lens _nlPrettyPrint + (\ s a -> s{_nlPrettyPrint = a}) + +-- | Project ID for this request. +nlProject :: Lens' NetworksList' Text +nlProject + = lens _nlProject (\ s a -> s{_nlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +nlUserIp :: Lens' NetworksList' (Maybe Text) +nlUserIp = lens _nlUserIp (\ s a -> s{_nlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nlKey :: Lens' NetworksList' (Maybe Text) +nlKey = lens _nlKey (\ s a -> s{_nlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +nlFilter :: Lens' NetworksList' (Maybe Text) +nlFilter = lens _nlFilter (\ s a -> s{_nlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +nlPageToken :: Lens' NetworksList' (Maybe Text) +nlPageToken + = lens _nlPageToken (\ s a -> s{_nlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +nlOauthToken :: Lens' NetworksList' (Maybe Text) +nlOauthToken + = lens _nlOauthToken (\ s a -> s{_nlOauthToken = a}) + +-- | Maximum count of results to be returned. +nlMaxResults :: Lens' NetworksList' Word32 +nlMaxResults + = lens _nlMaxResults (\ s a -> s{_nlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +nlFields :: Lens' NetworksList' (Maybe Text) +nlFields = lens _nlFields (\ s a -> s{_nlFields = a}) + +-- | Data format for the response. +nlAlt :: Lens' NetworksList' Text +nlAlt = lens _nlAlt (\ s a -> s{_nlAlt = a}) + +instance GoogleRequest NetworksList' where + type Rs NetworksList' = NetworkList + request = requestWithRoute defReq computeURL + requestWithRoute r u NetworksList{..} + = go _nlQuotaUser _nlPrettyPrint _nlProject _nlUserIp + _nlKey + _nlFilter + _nlPageToken + _nlOauthToken + (Just _nlMaxResults) + _nlFields + _nlAlt + where go + = clientWithRoute (Proxy :: Proxy NetworksListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Projects/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/Get.hs new file mode 100644 index 000000000..ffc36bada --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Projects.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified project resource. +-- +-- /See:/ for @ComputeProjectsGet@. +module Compute.Projects.Get + ( + -- * REST Resource + ProjectsGetAPI + + -- * Creating a Request + , projectsGet + , ProjectsGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgProject + , pgUserIp + , pgKey + , pgOauthToken + , pgFields + , pgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeProjectsGet@ which the +-- 'ProjectsGet' request conforms to. +type ProjectsGetAPI = + Capture "project" Text :> Get '[JSON] Project + +-- | Returns the specified project resource. +-- +-- /See:/ 'projectsGet' smart constructor. +data ProjectsGet = ProjectsGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgProject :: !Text + , _pgUserIp :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgProject' +-- +-- * 'pgUserIp' +-- +-- * 'pgKey' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +projectsGet + :: Text -- ^ 'project' + -> ProjectsGet +projectsGet pPgProject_ = + ProjectsGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgProject = pPgProject_ + , _pgUserIp = Nothing + , _pgKey = Nothing + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' ProjectsGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' ProjectsGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | Project ID for this request. +pgProject :: Lens' ProjectsGet' Text +pgProject + = lens _pgProject (\ s a -> s{_pgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' ProjectsGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' ProjectsGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' ProjectsGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' ProjectsGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' ProjectsGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest ProjectsGet' where + type Rs ProjectsGet' = Project + request = requestWithRoute defReq computeURL + requestWithRoute r u ProjectsGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgProject _pgUserIp + _pgKey + _pgOauthToken + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveDisk.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveDisk.hs new file mode 100644 index 000000000..dae122cb4 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveDisk.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Projects.MoveDisk +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves a persistent disk from one zone to another. +-- +-- /See:/ for @ComputeProjectsMoveDisk@. +module Compute.Projects.MoveDisk + ( + -- * REST Resource + ProjectsMoveDiskAPI + + -- * Creating a Request + , projectsMoveDisk + , ProjectsMoveDisk + + -- * Request Lenses + , pmdQuotaUser + , pmdPrettyPrint + , pmdProject + , pmdUserIp + , pmdKey + , pmdOauthToken + , pmdFields + , pmdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeProjectsMoveDisk@ which the +-- 'ProjectsMoveDisk' request conforms to. +type ProjectsMoveDiskAPI = + Capture "project" Text :> + "moveDisk" :> Post '[JSON] Operation + +-- | Moves a persistent disk from one zone to another. +-- +-- /See:/ 'projectsMoveDisk' smart constructor. +data ProjectsMoveDisk = ProjectsMoveDisk + { _pmdQuotaUser :: !(Maybe Text) + , _pmdPrettyPrint :: !Bool + , _pmdProject :: !Text + , _pmdUserIp :: !(Maybe Text) + , _pmdKey :: !(Maybe Text) + , _pmdOauthToken :: !(Maybe Text) + , _pmdFields :: !(Maybe Text) + , _pmdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsMoveDisk'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmdQuotaUser' +-- +-- * 'pmdPrettyPrint' +-- +-- * 'pmdProject' +-- +-- * 'pmdUserIp' +-- +-- * 'pmdKey' +-- +-- * 'pmdOauthToken' +-- +-- * 'pmdFields' +-- +-- * 'pmdAlt' +projectsMoveDisk + :: Text -- ^ 'project' + -> ProjectsMoveDisk +projectsMoveDisk pPmdProject_ = + ProjectsMoveDisk + { _pmdQuotaUser = Nothing + , _pmdPrettyPrint = True + , _pmdProject = pPmdProject_ + , _pmdUserIp = Nothing + , _pmdKey = Nothing + , _pmdOauthToken = Nothing + , _pmdFields = Nothing + , _pmdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pmdQuotaUser :: Lens' ProjectsMoveDisk' (Maybe Text) +pmdQuotaUser + = lens _pmdQuotaUser (\ s a -> s{_pmdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pmdPrettyPrint :: Lens' ProjectsMoveDisk' Bool +pmdPrettyPrint + = lens _pmdPrettyPrint + (\ s a -> s{_pmdPrettyPrint = a}) + +-- | Project ID for this request. +pmdProject :: Lens' ProjectsMoveDisk' Text +pmdProject + = lens _pmdProject (\ s a -> s{_pmdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pmdUserIp :: Lens' ProjectsMoveDisk' (Maybe Text) +pmdUserIp + = lens _pmdUserIp (\ s a -> s{_pmdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pmdKey :: Lens' ProjectsMoveDisk' (Maybe Text) +pmdKey = lens _pmdKey (\ s a -> s{_pmdKey = a}) + +-- | OAuth 2.0 token for the current user. +pmdOauthToken :: Lens' ProjectsMoveDisk' (Maybe Text) +pmdOauthToken + = lens _pmdOauthToken + (\ s a -> s{_pmdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pmdFields :: Lens' ProjectsMoveDisk' (Maybe Text) +pmdFields + = lens _pmdFields (\ s a -> s{_pmdFields = a}) + +-- | Data format for the response. +pmdAlt :: Lens' ProjectsMoveDisk' Text +pmdAlt = lens _pmdAlt (\ s a -> s{_pmdAlt = a}) + +instance GoogleRequest ProjectsMoveDisk' where + type Rs ProjectsMoveDisk' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ProjectsMoveDisk{..} + = go _pmdQuotaUser _pmdPrettyPrint _pmdProject + _pmdUserIp + _pmdKey + _pmdOauthToken + _pmdFields + _pmdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsMoveDiskAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveInstance.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveInstance.hs new file mode 100644 index 000000000..eab91c67d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/MoveInstance.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Projects.MoveInstance +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves an instance and its attached persistent disks from one zone to +-- another. +-- +-- /See:/ for @ComputeProjectsMoveInstance@. +module Compute.Projects.MoveInstance + ( + -- * REST Resource + ProjectsMoveInstanceAPI + + -- * Creating a Request + , projectsMoveInstance + , ProjectsMoveInstance + + -- * Request Lenses + , pmiQuotaUser + , pmiPrettyPrint + , pmiProject + , pmiUserIp + , pmiKey + , pmiOauthToken + , pmiFields + , pmiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeProjectsMoveInstance@ which the +-- 'ProjectsMoveInstance' request conforms to. +type ProjectsMoveInstanceAPI = + Capture "project" Text :> + "moveInstance" :> Post '[JSON] Operation + +-- | Moves an instance and its attached persistent disks from one zone to +-- another. +-- +-- /See:/ 'projectsMoveInstance' smart constructor. +data ProjectsMoveInstance = ProjectsMoveInstance + { _pmiQuotaUser :: !(Maybe Text) + , _pmiPrettyPrint :: !Bool + , _pmiProject :: !Text + , _pmiUserIp :: !(Maybe Text) + , _pmiKey :: !(Maybe Text) + , _pmiOauthToken :: !(Maybe Text) + , _pmiFields :: !(Maybe Text) + , _pmiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsMoveInstance'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmiQuotaUser' +-- +-- * 'pmiPrettyPrint' +-- +-- * 'pmiProject' +-- +-- * 'pmiUserIp' +-- +-- * 'pmiKey' +-- +-- * 'pmiOauthToken' +-- +-- * 'pmiFields' +-- +-- * 'pmiAlt' +projectsMoveInstance + :: Text -- ^ 'project' + -> ProjectsMoveInstance +projectsMoveInstance pPmiProject_ = + ProjectsMoveInstance + { _pmiQuotaUser = Nothing + , _pmiPrettyPrint = True + , _pmiProject = pPmiProject_ + , _pmiUserIp = Nothing + , _pmiKey = Nothing + , _pmiOauthToken = Nothing + , _pmiFields = Nothing + , _pmiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pmiQuotaUser :: Lens' ProjectsMoveInstance' (Maybe Text) +pmiQuotaUser + = lens _pmiQuotaUser (\ s a -> s{_pmiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pmiPrettyPrint :: Lens' ProjectsMoveInstance' Bool +pmiPrettyPrint + = lens _pmiPrettyPrint + (\ s a -> s{_pmiPrettyPrint = a}) + +-- | Project ID for this request. +pmiProject :: Lens' ProjectsMoveInstance' Text +pmiProject + = lens _pmiProject (\ s a -> s{_pmiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pmiUserIp :: Lens' ProjectsMoveInstance' (Maybe Text) +pmiUserIp + = lens _pmiUserIp (\ s a -> s{_pmiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pmiKey :: Lens' ProjectsMoveInstance' (Maybe Text) +pmiKey = lens _pmiKey (\ s a -> s{_pmiKey = a}) + +-- | OAuth 2.0 token for the current user. +pmiOauthToken :: Lens' ProjectsMoveInstance' (Maybe Text) +pmiOauthToken + = lens _pmiOauthToken + (\ s a -> s{_pmiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pmiFields :: Lens' ProjectsMoveInstance' (Maybe Text) +pmiFields + = lens _pmiFields (\ s a -> s{_pmiFields = a}) + +-- | Data format for the response. +pmiAlt :: Lens' ProjectsMoveInstance' Text +pmiAlt = lens _pmiAlt (\ s a -> s{_pmiAlt = a}) + +instance GoogleRequest ProjectsMoveInstance' where + type Rs ProjectsMoveInstance' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ProjectsMoveInstance{..} + = go _pmiQuotaUser _pmiPrettyPrint _pmiProject + _pmiUserIp + _pmiKey + _pmiOauthToken + _pmiFields + _pmiAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsMoveInstanceAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetCommonInstanceMetadata.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetCommonInstanceMetadata.hs new file mode 100644 index 000000000..6f2b3a4bb --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetCommonInstanceMetadata.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Projects.SetCommonInstanceMetadata +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets metadata common to all instances within the specified project using +-- the data included in the request. +-- +-- /See:/ for @ComputeProjectsSetCommonInstanceMetadata@. +module Compute.Projects.SetCommonInstanceMetadata + ( + -- * REST Resource + ProjectsSetCommonInstanceMetadataAPI + + -- * Creating a Request + , projectsSetCommonInstanceMetadata + , ProjectsSetCommonInstanceMetadata + + -- * Request Lenses + , pscimQuotaUser + , pscimPrettyPrint + , pscimProject + , pscimUserIp + , pscimKey + , pscimOauthToken + , pscimFields + , pscimAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeProjectsSetCommonInstanceMetadata@ which the +-- 'ProjectsSetCommonInstanceMetadata' request conforms to. +type ProjectsSetCommonInstanceMetadataAPI = + Capture "project" Text :> + "setCommonInstanceMetadata" :> Post '[JSON] Operation + +-- | Sets metadata common to all instances within the specified project using +-- the data included in the request. +-- +-- /See:/ 'projectsSetCommonInstanceMetadata' smart constructor. +data ProjectsSetCommonInstanceMetadata = ProjectsSetCommonInstanceMetadata + { _pscimQuotaUser :: !(Maybe Text) + , _pscimPrettyPrint :: !Bool + , _pscimProject :: !Text + , _pscimUserIp :: !(Maybe Text) + , _pscimKey :: !(Maybe Text) + , _pscimOauthToken :: !(Maybe Text) + , _pscimFields :: !(Maybe Text) + , _pscimAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSetCommonInstanceMetadata'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pscimQuotaUser' +-- +-- * 'pscimPrettyPrint' +-- +-- * 'pscimProject' +-- +-- * 'pscimUserIp' +-- +-- * 'pscimKey' +-- +-- * 'pscimOauthToken' +-- +-- * 'pscimFields' +-- +-- * 'pscimAlt' +projectsSetCommonInstanceMetadata + :: Text -- ^ 'project' + -> ProjectsSetCommonInstanceMetadata +projectsSetCommonInstanceMetadata pPscimProject_ = + ProjectsSetCommonInstanceMetadata + { _pscimQuotaUser = Nothing + , _pscimPrettyPrint = True + , _pscimProject = pPscimProject_ + , _pscimUserIp = Nothing + , _pscimKey = Nothing + , _pscimOauthToken = Nothing + , _pscimFields = Nothing + , _pscimAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pscimQuotaUser :: Lens' ProjectsSetCommonInstanceMetadata' (Maybe Text) +pscimQuotaUser + = lens _pscimQuotaUser + (\ s a -> s{_pscimQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pscimPrettyPrint :: Lens' ProjectsSetCommonInstanceMetadata' Bool +pscimPrettyPrint + = lens _pscimPrettyPrint + (\ s a -> s{_pscimPrettyPrint = a}) + +-- | Project ID for this request. +pscimProject :: Lens' ProjectsSetCommonInstanceMetadata' Text +pscimProject + = lens _pscimProject (\ s a -> s{_pscimProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pscimUserIp :: Lens' ProjectsSetCommonInstanceMetadata' (Maybe Text) +pscimUserIp + = lens _pscimUserIp (\ s a -> s{_pscimUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pscimKey :: Lens' ProjectsSetCommonInstanceMetadata' (Maybe Text) +pscimKey = lens _pscimKey (\ s a -> s{_pscimKey = a}) + +-- | OAuth 2.0 token for the current user. +pscimOauthToken :: Lens' ProjectsSetCommonInstanceMetadata' (Maybe Text) +pscimOauthToken + = lens _pscimOauthToken + (\ s a -> s{_pscimOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pscimFields :: Lens' ProjectsSetCommonInstanceMetadata' (Maybe Text) +pscimFields + = lens _pscimFields (\ s a -> s{_pscimFields = a}) + +-- | Data format for the response. +pscimAlt :: Lens' ProjectsSetCommonInstanceMetadata' Text +pscimAlt = lens _pscimAlt (\ s a -> s{_pscimAlt = a}) + +instance GoogleRequest + ProjectsSetCommonInstanceMetadata' where + type Rs ProjectsSetCommonInstanceMetadata' = + Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u + ProjectsSetCommonInstanceMetadata{..} + = go _pscimQuotaUser _pscimPrettyPrint _pscimProject + _pscimUserIp + _pscimKey + _pscimOauthToken + _pscimFields + _pscimAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSetCommonInstanceMetadataAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetUsageExportBucket.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetUsageExportBucket.hs new file mode 100644 index 000000000..46d728fb3 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetUsageExportBucket.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Projects.SetUsageExportBucket +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Enables the usage export feature and sets the usage export bucket where +-- reports are stored. If you provide an empty request body using this +-- method, the usage export feature will be disabled. +-- +-- /See:/ for @ComputeProjectsSetUsageExportBucket@. +module Compute.Projects.SetUsageExportBucket + ( + -- * REST Resource + ProjectsSetUsageExportBucketAPI + + -- * Creating a Request + , projectsSetUsageExportBucket + , ProjectsSetUsageExportBucket + + -- * Request Lenses + , psuebQuotaUser + , psuebPrettyPrint + , psuebProject + , psuebUserIp + , psuebKey + , psuebOauthToken + , psuebFields + , psuebAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeProjectsSetUsageExportBucket@ which the +-- 'ProjectsSetUsageExportBucket' request conforms to. +type ProjectsSetUsageExportBucketAPI = + Capture "project" Text :> + "setUsageExportBucket" :> Post '[JSON] Operation + +-- | Enables the usage export feature and sets the usage export bucket where +-- reports are stored. If you provide an empty request body using this +-- method, the usage export feature will be disabled. +-- +-- /See:/ 'projectsSetUsageExportBucket' smart constructor. +data ProjectsSetUsageExportBucket = ProjectsSetUsageExportBucket + { _psuebQuotaUser :: !(Maybe Text) + , _psuebPrettyPrint :: !Bool + , _psuebProject :: !Text + , _psuebUserIp :: !(Maybe Text) + , _psuebKey :: !(Maybe Text) + , _psuebOauthToken :: !(Maybe Text) + , _psuebFields :: !(Maybe Text) + , _psuebAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSetUsageExportBucket'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psuebQuotaUser' +-- +-- * 'psuebPrettyPrint' +-- +-- * 'psuebProject' +-- +-- * 'psuebUserIp' +-- +-- * 'psuebKey' +-- +-- * 'psuebOauthToken' +-- +-- * 'psuebFields' +-- +-- * 'psuebAlt' +projectsSetUsageExportBucket + :: Text -- ^ 'project' + -> ProjectsSetUsageExportBucket +projectsSetUsageExportBucket pPsuebProject_ = + ProjectsSetUsageExportBucket + { _psuebQuotaUser = Nothing + , _psuebPrettyPrint = True + , _psuebProject = pPsuebProject_ + , _psuebUserIp = Nothing + , _psuebKey = Nothing + , _psuebOauthToken = Nothing + , _psuebFields = Nothing + , _psuebAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psuebQuotaUser :: Lens' ProjectsSetUsageExportBucket' (Maybe Text) +psuebQuotaUser + = lens _psuebQuotaUser + (\ s a -> s{_psuebQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psuebPrettyPrint :: Lens' ProjectsSetUsageExportBucket' Bool +psuebPrettyPrint + = lens _psuebPrettyPrint + (\ s a -> s{_psuebPrettyPrint = a}) + +-- | Project ID for this request. +psuebProject :: Lens' ProjectsSetUsageExportBucket' Text +psuebProject + = lens _psuebProject (\ s a -> s{_psuebProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psuebUserIp :: Lens' ProjectsSetUsageExportBucket' (Maybe Text) +psuebUserIp + = lens _psuebUserIp (\ s a -> s{_psuebUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psuebKey :: Lens' ProjectsSetUsageExportBucket' (Maybe Text) +psuebKey = lens _psuebKey (\ s a -> s{_psuebKey = a}) + +-- | OAuth 2.0 token for the current user. +psuebOauthToken :: Lens' ProjectsSetUsageExportBucket' (Maybe Text) +psuebOauthToken + = lens _psuebOauthToken + (\ s a -> s{_psuebOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psuebFields :: Lens' ProjectsSetUsageExportBucket' (Maybe Text) +psuebFields + = lens _psuebFields (\ s a -> s{_psuebFields = a}) + +-- | Data format for the response. +psuebAlt :: Lens' ProjectsSetUsageExportBucket' Text +psuebAlt = lens _psuebAlt (\ s a -> s{_psuebAlt = a}) + +instance GoogleRequest ProjectsSetUsageExportBucket' + where + type Rs ProjectsSetUsageExportBucket' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ProjectsSetUsageExportBucket{..} + = go _psuebQuotaUser _psuebPrettyPrint _psuebProject + _psuebUserIp + _psuebKey + _psuebOauthToken + _psuebFields + _psuebAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSetUsageExportBucketAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Delete.hs new file mode 100644 index 000000000..71f9c502c --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.RegionOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified region-specific Operations resource. +-- +-- /See:/ for @ComputeRegionOperationsDelete@. +module Compute.RegionOperations.Delete + ( + -- * REST Resource + RegionOperationsDeleteAPI + + -- * Creating a Request + , regionOperationsDelete + , RegionOperationsDelete + + -- * Request Lenses + , rodQuotaUser + , rodPrettyPrint + , rodProject + , rodOperation + , rodUserIp + , rodKey + , rodRegion + , rodOauthToken + , rodFields + , rodAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRegionOperationsDelete@ which the +-- 'RegionOperationsDelete' request conforms to. +type RegionOperationsDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "operations" :> + Capture "operation" Text :> Delete '[JSON] () + +-- | Deletes the specified region-specific Operations resource. +-- +-- /See:/ 'regionOperationsDelete' smart constructor. +data RegionOperationsDelete = RegionOperationsDelete + { _rodQuotaUser :: !(Maybe Text) + , _rodPrettyPrint :: !Bool + , _rodProject :: !Text + , _rodOperation :: !Text + , _rodUserIp :: !(Maybe Text) + , _rodKey :: !(Maybe Text) + , _rodRegion :: !Text + , _rodOauthToken :: !(Maybe Text) + , _rodFields :: !(Maybe Text) + , _rodAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rodQuotaUser' +-- +-- * 'rodPrettyPrint' +-- +-- * 'rodProject' +-- +-- * 'rodOperation' +-- +-- * 'rodUserIp' +-- +-- * 'rodKey' +-- +-- * 'rodRegion' +-- +-- * 'rodOauthToken' +-- +-- * 'rodFields' +-- +-- * 'rodAlt' +regionOperationsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'region' + -> RegionOperationsDelete +regionOperationsDelete pRodProject_ pRodOperation_ pRodRegion_ = + RegionOperationsDelete + { _rodQuotaUser = Nothing + , _rodPrettyPrint = True + , _rodProject = pRodProject_ + , _rodOperation = pRodOperation_ + , _rodUserIp = Nothing + , _rodKey = Nothing + , _rodRegion = pRodRegion_ + , _rodOauthToken = Nothing + , _rodFields = Nothing + , _rodAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rodQuotaUser :: Lens' RegionOperationsDelete' (Maybe Text) +rodQuotaUser + = lens _rodQuotaUser (\ s a -> s{_rodQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rodPrettyPrint :: Lens' RegionOperationsDelete' Bool +rodPrettyPrint + = lens _rodPrettyPrint + (\ s a -> s{_rodPrettyPrint = a}) + +-- | Project ID for this request. +rodProject :: Lens' RegionOperationsDelete' Text +rodProject + = lens _rodProject (\ s a -> s{_rodProject = a}) + +-- | Name of the Operations resource to delete. +rodOperation :: Lens' RegionOperationsDelete' Text +rodOperation + = lens _rodOperation (\ s a -> s{_rodOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rodUserIp :: Lens' RegionOperationsDelete' (Maybe Text) +rodUserIp + = lens _rodUserIp (\ s a -> s{_rodUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rodKey :: Lens' RegionOperationsDelete' (Maybe Text) +rodKey = lens _rodKey (\ s a -> s{_rodKey = a}) + +-- | Name of the region scoping this request. +rodRegion :: Lens' RegionOperationsDelete' Text +rodRegion + = lens _rodRegion (\ s a -> s{_rodRegion = a}) + +-- | OAuth 2.0 token for the current user. +rodOauthToken :: Lens' RegionOperationsDelete' (Maybe Text) +rodOauthToken + = lens _rodOauthToken + (\ s a -> s{_rodOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rodFields :: Lens' RegionOperationsDelete' (Maybe Text) +rodFields + = lens _rodFields (\ s a -> s{_rodFields = a}) + +-- | Data format for the response. +rodAlt :: Lens' RegionOperationsDelete' Text +rodAlt = lens _rodAlt (\ s a -> s{_rodAlt = a}) + +instance GoogleRequest RegionOperationsDelete' where + type Rs RegionOperationsDelete' = () + request = requestWithRoute defReq computeURL + requestWithRoute r u RegionOperationsDelete{..} + = go _rodQuotaUser _rodPrettyPrint _rodProject + _rodOperation + _rodUserIp + _rodKey + _rodRegion + _rodOauthToken + _rodFields + _rodAlt + where go + = clientWithRoute + (Proxy :: Proxy RegionOperationsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Get.hs new file mode 100644 index 000000000..292504d33 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.RegionOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified region-specific Operations resource. +-- +-- /See:/ for @ComputeRegionOperationsGet@. +module Compute.RegionOperations.Get + ( + -- * REST Resource + RegionOperationsGetAPI + + -- * Creating a Request + , regionOperationsGet + , RegionOperationsGet + + -- * Request Lenses + , rogQuotaUser + , rogPrettyPrint + , rogProject + , rogOperation + , rogUserIp + , rogKey + , rogRegion + , rogOauthToken + , rogFields + , rogAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRegionOperationsGet@ which the +-- 'RegionOperationsGet' request conforms to. +type RegionOperationsGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified region-specific Operations resource. +-- +-- /See:/ 'regionOperationsGet' smart constructor. +data RegionOperationsGet = RegionOperationsGet + { _rogQuotaUser :: !(Maybe Text) + , _rogPrettyPrint :: !Bool + , _rogProject :: !Text + , _rogOperation :: !Text + , _rogUserIp :: !(Maybe Text) + , _rogKey :: !(Maybe Text) + , _rogRegion :: !Text + , _rogOauthToken :: !(Maybe Text) + , _rogFields :: !(Maybe Text) + , _rogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rogQuotaUser' +-- +-- * 'rogPrettyPrint' +-- +-- * 'rogProject' +-- +-- * 'rogOperation' +-- +-- * 'rogUserIp' +-- +-- * 'rogKey' +-- +-- * 'rogRegion' +-- +-- * 'rogOauthToken' +-- +-- * 'rogFields' +-- +-- * 'rogAlt' +regionOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'region' + -> RegionOperationsGet +regionOperationsGet pRogProject_ pRogOperation_ pRogRegion_ = + RegionOperationsGet + { _rogQuotaUser = Nothing + , _rogPrettyPrint = True + , _rogProject = pRogProject_ + , _rogOperation = pRogOperation_ + , _rogUserIp = Nothing + , _rogKey = Nothing + , _rogRegion = pRogRegion_ + , _rogOauthToken = Nothing + , _rogFields = Nothing + , _rogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rogQuotaUser :: Lens' RegionOperationsGet' (Maybe Text) +rogQuotaUser + = lens _rogQuotaUser (\ s a -> s{_rogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rogPrettyPrint :: Lens' RegionOperationsGet' Bool +rogPrettyPrint + = lens _rogPrettyPrint + (\ s a -> s{_rogPrettyPrint = a}) + +-- | Project ID for this request. +rogProject :: Lens' RegionOperationsGet' Text +rogProject + = lens _rogProject (\ s a -> s{_rogProject = a}) + +-- | Name of the Operations resource to return. +rogOperation :: Lens' RegionOperationsGet' Text +rogOperation + = lens _rogOperation (\ s a -> s{_rogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rogUserIp :: Lens' RegionOperationsGet' (Maybe Text) +rogUserIp + = lens _rogUserIp (\ s a -> s{_rogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rogKey :: Lens' RegionOperationsGet' (Maybe Text) +rogKey = lens _rogKey (\ s a -> s{_rogKey = a}) + +-- | Name of the zone scoping this request. +rogRegion :: Lens' RegionOperationsGet' Text +rogRegion + = lens _rogRegion (\ s a -> s{_rogRegion = a}) + +-- | OAuth 2.0 token for the current user. +rogOauthToken :: Lens' RegionOperationsGet' (Maybe Text) +rogOauthToken + = lens _rogOauthToken + (\ s a -> s{_rogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rogFields :: Lens' RegionOperationsGet' (Maybe Text) +rogFields + = lens _rogFields (\ s a -> s{_rogFields = a}) + +-- | Data format for the response. +rogAlt :: Lens' RegionOperationsGet' Text +rogAlt = lens _rogAlt (\ s a -> s{_rogAlt = a}) + +instance GoogleRequest RegionOperationsGet' where + type Rs RegionOperationsGet' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u RegionOperationsGet{..} + = go _rogQuotaUser _rogPrettyPrint _rogProject + _rogOperation + _rogUserIp + _rogKey + _rogRegion + _rogOauthToken + _rogFields + _rogAlt + where go + = clientWithRoute + (Proxy :: Proxy RegionOperationsGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/List.hs new file mode 100644 index 000000000..78bd1cc35 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/List.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.RegionOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Operation resources contained within the specified +-- region. +-- +-- /See:/ for @ComputeRegionOperationsList@. +module Compute.RegionOperations.List + ( + -- * REST Resource + RegionOperationsListAPI + + -- * Creating a Request + , regionOperationsList + , RegionOperationsList + + -- * Request Lenses + , rolQuotaUser + , rolPrettyPrint + , rolProject + , rolUserIp + , rolKey + , rolFilter + , rolRegion + , rolPageToken + , rolOauthToken + , rolMaxResults + , rolFields + , rolAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRegionOperationsList@ which the +-- 'RegionOperationsList' request conforms to. +type RegionOperationsListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of Operation resources contained within the specified +-- region. +-- +-- /See:/ 'regionOperationsList' smart constructor. +data RegionOperationsList = RegionOperationsList + { _rolQuotaUser :: !(Maybe Text) + , _rolPrettyPrint :: !Bool + , _rolProject :: !Text + , _rolUserIp :: !(Maybe Text) + , _rolKey :: !(Maybe Text) + , _rolFilter :: !(Maybe Text) + , _rolRegion :: !Text + , _rolPageToken :: !(Maybe Text) + , _rolOauthToken :: !(Maybe Text) + , _rolMaxResults :: !Word32 + , _rolFields :: !(Maybe Text) + , _rolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rolQuotaUser' +-- +-- * 'rolPrettyPrint' +-- +-- * 'rolProject' +-- +-- * 'rolUserIp' +-- +-- * 'rolKey' +-- +-- * 'rolFilter' +-- +-- * 'rolRegion' +-- +-- * 'rolPageToken' +-- +-- * 'rolOauthToken' +-- +-- * 'rolMaxResults' +-- +-- * 'rolFields' +-- +-- * 'rolAlt' +regionOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> RegionOperationsList +regionOperationsList pRolProject_ pRolRegion_ = + RegionOperationsList + { _rolQuotaUser = Nothing + , _rolPrettyPrint = True + , _rolProject = pRolProject_ + , _rolUserIp = Nothing + , _rolKey = Nothing + , _rolFilter = Nothing + , _rolRegion = pRolRegion_ + , _rolPageToken = Nothing + , _rolOauthToken = Nothing + , _rolMaxResults = 500 + , _rolFields = Nothing + , _rolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rolQuotaUser :: Lens' RegionOperationsList' (Maybe Text) +rolQuotaUser + = lens _rolQuotaUser (\ s a -> s{_rolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rolPrettyPrint :: Lens' RegionOperationsList' Bool +rolPrettyPrint + = lens _rolPrettyPrint + (\ s a -> s{_rolPrettyPrint = a}) + +-- | Project ID for this request. +rolProject :: Lens' RegionOperationsList' Text +rolProject + = lens _rolProject (\ s a -> s{_rolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rolUserIp :: Lens' RegionOperationsList' (Maybe Text) +rolUserIp + = lens _rolUserIp (\ s a -> s{_rolUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rolKey :: Lens' RegionOperationsList' (Maybe Text) +rolKey = lens _rolKey (\ s a -> s{_rolKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +rolFilter :: Lens' RegionOperationsList' (Maybe Text) +rolFilter + = lens _rolFilter (\ s a -> s{_rolFilter = a}) + +-- | Name of the region scoping this request. +rolRegion :: Lens' RegionOperationsList' Text +rolRegion + = lens _rolRegion (\ s a -> s{_rolRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +rolPageToken :: Lens' RegionOperationsList' (Maybe Text) +rolPageToken + = lens _rolPageToken (\ s a -> s{_rolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rolOauthToken :: Lens' RegionOperationsList' (Maybe Text) +rolOauthToken + = lens _rolOauthToken + (\ s a -> s{_rolOauthToken = a}) + +-- | Maximum count of results to be returned. +rolMaxResults :: Lens' RegionOperationsList' Word32 +rolMaxResults + = lens _rolMaxResults + (\ s a -> s{_rolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rolFields :: Lens' RegionOperationsList' (Maybe Text) +rolFields + = lens _rolFields (\ s a -> s{_rolFields = a}) + +-- | Data format for the response. +rolAlt :: Lens' RegionOperationsList' Text +rolAlt = lens _rolAlt (\ s a -> s{_rolAlt = a}) + +instance GoogleRequest RegionOperationsList' where + type Rs RegionOperationsList' = OperationList + request = requestWithRoute defReq computeURL + requestWithRoute r u RegionOperationsList{..} + = go _rolQuotaUser _rolPrettyPrint _rolProject + _rolUserIp + _rolKey + _rolFilter + _rolRegion + _rolPageToken + _rolOauthToken + (Just _rolMaxResults) + _rolFields + _rolAlt + where go + = clientWithRoute + (Proxy :: Proxy RegionOperationsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Regions/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Regions/Get.hs new file mode 100644 index 000000000..56b8558a9 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Regions/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Regions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified region resource. +-- +-- /See:/ for @ComputeRegionsGet@. +module Compute.Regions.Get + ( + -- * REST Resource + RegionsGetAPI + + -- * Creating a Request + , regionsGet + , RegionsGet + + -- * Request Lenses + , regQuotaUser + , regPrettyPrint + , regProject + , regUserIp + , regKey + , regRegion + , regOauthToken + , regFields + , regAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRegionsGet@ which the +-- 'RegionsGet' request conforms to. +type RegionsGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> Get '[JSON] Region + +-- | Returns the specified region resource. +-- +-- /See:/ 'regionsGet' smart constructor. +data RegionsGet = RegionsGet + { _regQuotaUser :: !(Maybe Text) + , _regPrettyPrint :: !Bool + , _regProject :: !Text + , _regUserIp :: !(Maybe Text) + , _regKey :: !(Maybe Text) + , _regRegion :: !Text + , _regOauthToken :: !(Maybe Text) + , _regFields :: !(Maybe Text) + , _regAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'regQuotaUser' +-- +-- * 'regPrettyPrint' +-- +-- * 'regProject' +-- +-- * 'regUserIp' +-- +-- * 'regKey' +-- +-- * 'regRegion' +-- +-- * 'regOauthToken' +-- +-- * 'regFields' +-- +-- * 'regAlt' +regionsGet + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> RegionsGet +regionsGet pRegProject_ pRegRegion_ = + RegionsGet + { _regQuotaUser = Nothing + , _regPrettyPrint = True + , _regProject = pRegProject_ + , _regUserIp = Nothing + , _regKey = Nothing + , _regRegion = pRegRegion_ + , _regOauthToken = Nothing + , _regFields = Nothing + , _regAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +regQuotaUser :: Lens' RegionsGet' (Maybe Text) +regQuotaUser + = lens _regQuotaUser (\ s a -> s{_regQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +regPrettyPrint :: Lens' RegionsGet' Bool +regPrettyPrint + = lens _regPrettyPrint + (\ s a -> s{_regPrettyPrint = a}) + +-- | Project ID for this request. +regProject :: Lens' RegionsGet' Text +regProject + = lens _regProject (\ s a -> s{_regProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +regUserIp :: Lens' RegionsGet' (Maybe Text) +regUserIp + = lens _regUserIp (\ s a -> s{_regUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +regKey :: Lens' RegionsGet' (Maybe Text) +regKey = lens _regKey (\ s a -> s{_regKey = a}) + +-- | Name of the region resource to return. +regRegion :: Lens' RegionsGet' Text +regRegion + = lens _regRegion (\ s a -> s{_regRegion = a}) + +-- | OAuth 2.0 token for the current user. +regOauthToken :: Lens' RegionsGet' (Maybe Text) +regOauthToken + = lens _regOauthToken + (\ s a -> s{_regOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +regFields :: Lens' RegionsGet' (Maybe Text) +regFields + = lens _regFields (\ s a -> s{_regFields = a}) + +-- | Data format for the response. +regAlt :: Lens' RegionsGet' Text +regAlt = lens _regAlt (\ s a -> s{_regAlt = a}) + +instance GoogleRequest RegionsGet' where + type Rs RegionsGet' = Region + request = requestWithRoute defReq computeURL + requestWithRoute r u RegionsGet{..} + = go _regQuotaUser _regPrettyPrint _regProject + _regUserIp + _regKey + _regRegion + _regOauthToken + _regFields + _regAlt + where go + = clientWithRoute (Proxy :: Proxy RegionsGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Regions/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Regions/List.hs new file mode 100644 index 000000000..a8d3ffca9 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Regions/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Regions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of region resources available to the specified +-- project. +-- +-- /See:/ for @ComputeRegionsList@. +module Compute.Regions.List + ( + -- * REST Resource + RegionsListAPI + + -- * Creating a Request + , regionsList + , RegionsList + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rProject + , rUserIp + , rKey + , rFilter + , rPageToken + , rOauthToken + , rMaxResults + , rFields + , rAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRegionsList@ which the +-- 'RegionsList' request conforms to. +type RegionsListAPI = + Capture "project" Text :> + "regions" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] RegionList + +-- | Retrieves the list of region resources available to the specified +-- project. +-- +-- /See:/ 'regionsList' smart constructor. +data RegionsList = RegionsList + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rProject :: !Text + , _rUserIp :: !(Maybe Text) + , _rKey :: !(Maybe Text) + , _rFilter :: !(Maybe Text) + , _rPageToken :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rMaxResults :: !Word32 + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rProject' +-- +-- * 'rUserIp' +-- +-- * 'rKey' +-- +-- * 'rFilter' +-- +-- * 'rPageToken' +-- +-- * 'rOauthToken' +-- +-- * 'rMaxResults' +-- +-- * 'rFields' +-- +-- * 'rAlt' +regionsList + :: Text -- ^ 'project' + -> RegionsList +regionsList pRProject_ = + RegionsList + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rProject = pRProject_ + , _rUserIp = Nothing + , _rKey = Nothing + , _rFilter = Nothing + , _rPageToken = Nothing + , _rOauthToken = Nothing + , _rMaxResults = 500 + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' RegionsList' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' RegionsList' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | Project ID for this request. +rProject :: Lens' RegionsList' Text +rProject = lens _rProject (\ s a -> s{_rProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' RegionsList' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' RegionsList' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +rFilter :: Lens' RegionsList' (Maybe Text) +rFilter = lens _rFilter (\ s a -> s{_rFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +rPageToken :: Lens' RegionsList' (Maybe Text) +rPageToken + = lens _rPageToken (\ s a -> s{_rPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' RegionsList' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Maximum count of results to be returned. +rMaxResults :: Lens' RegionsList' Word32 +rMaxResults + = lens _rMaxResults (\ s a -> s{_rMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' RegionsList' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' RegionsList' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest RegionsList' where + type Rs RegionsList' = RegionList + request = requestWithRoute defReq computeURL + requestWithRoute r u RegionsList{..} + = go _rQuotaUser _rPrettyPrint _rProject _rUserIp + _rKey + _rFilter + _rPageToken + _rOauthToken + (Just _rMaxResults) + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy RegionsListAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Delete.hs new file mode 100644 index 000000000..bddae22f7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Delete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Routes.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified route resource. +-- +-- /See:/ for @ComputeRoutesDelete@. +module Compute.Routes.Delete + ( + -- * REST Resource + RoutesDeleteAPI + + -- * Creating a Request + , routesDelete + , RoutesDelete + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdProject + , rdUserIp + , rdRoute + , rdKey + , rdOauthToken + , rdFields + , rdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRoutesDelete@ which the +-- 'RoutesDelete' request conforms to. +type RoutesDeleteAPI = + Capture "project" Text :> + "global" :> + "routes" :> + Capture "route" Text :> Delete '[JSON] Operation + +-- | Deletes the specified route resource. +-- +-- /See:/ 'routesDelete' smart constructor. +data RoutesDelete = RoutesDelete + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdProject :: !Text + , _rdUserIp :: !(Maybe Text) + , _rdRoute :: !Text + , _rdKey :: !(Maybe Text) + , _rdOauthToken :: !(Maybe Text) + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoutesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdProject' +-- +-- * 'rdUserIp' +-- +-- * 'rdRoute' +-- +-- * 'rdKey' +-- +-- * 'rdOauthToken' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +routesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'route' + -> RoutesDelete +routesDelete pRdProject_ pRdRoute_ = + RoutesDelete + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdProject = pRdProject_ + , _rdUserIp = Nothing + , _rdRoute = pRdRoute_ + , _rdKey = Nothing + , _rdOauthToken = Nothing + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' RoutesDelete' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' RoutesDelete' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | Name of the project scoping this request. +rdProject :: Lens' RoutesDelete' Text +rdProject + = lens _rdProject (\ s a -> s{_rdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' RoutesDelete' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | Name of the route resource to delete. +rdRoute :: Lens' RoutesDelete' Text +rdRoute = lens _rdRoute (\ s a -> s{_rdRoute = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' RoutesDelete' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' RoutesDelete' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' RoutesDelete' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' RoutesDelete' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest RoutesDelete' where + type Rs RoutesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u RoutesDelete{..} + = go _rdQuotaUser _rdPrettyPrint _rdProject _rdUserIp + _rdRoute + _rdKey + _rdOauthToken + _rdFields + _rdAlt + where go + = clientWithRoute (Proxy :: Proxy RoutesDeleteAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Get.hs new file mode 100644 index 000000000..0d92a7c36 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Routes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified route resource. +-- +-- /See:/ for @ComputeRoutesGet@. +module Compute.Routes.Get + ( + -- * REST Resource + RoutesGetAPI + + -- * Creating a Request + , routesGet + , RoutesGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgProject + , rgUserIp + , rgRoute + , rgKey + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRoutesGet@ which the +-- 'RoutesGet' request conforms to. +type RoutesGetAPI = + Capture "project" Text :> + "global" :> + "routes" :> Capture "route" Text :> Get '[JSON] Route + +-- | Returns the specified route resource. +-- +-- /See:/ 'routesGet' smart constructor. +data RoutesGet = RoutesGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgProject :: !Text + , _rgUserIp :: !(Maybe Text) + , _rgRoute :: !Text + , _rgKey :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoutesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgProject' +-- +-- * 'rgUserIp' +-- +-- * 'rgRoute' +-- +-- * 'rgKey' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +routesGet + :: Text -- ^ 'project' + -> Text -- ^ 'route' + -> RoutesGet +routesGet pRgProject_ pRgRoute_ = + RoutesGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgProject = pRgProject_ + , _rgUserIp = Nothing + , _rgRoute = pRgRoute_ + , _rgKey = Nothing + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' RoutesGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' RoutesGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | Name of the project scoping this request. +rgProject :: Lens' RoutesGet' Text +rgProject + = lens _rgProject (\ s a -> s{_rgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' RoutesGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | Name of the route resource to return. +rgRoute :: Lens' RoutesGet' Text +rgRoute = lens _rgRoute (\ s a -> s{_rgRoute = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' RoutesGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' RoutesGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' RoutesGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' RoutesGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest RoutesGet' where + type Rs RoutesGet' = Route + request = requestWithRoute defReq computeURL + requestWithRoute r u RoutesGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgProject _rgUserIp + _rgRoute + _rgKey + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy RoutesGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Insert.hs new file mode 100644 index 000000000..293ae05ee --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Routes.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a route resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeRoutesInsert@. +module Compute.Routes.Insert + ( + -- * REST Resource + RoutesInsertAPI + + -- * Creating a Request + , routesInsert + , RoutesInsert + + -- * Request Lenses + , riQuotaUser + , riPrettyPrint + , riProject + , riUserIp + , riKey + , riOauthToken + , riFields + , riAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRoutesInsert@ which the +-- 'RoutesInsert' request conforms to. +type RoutesInsertAPI = + Capture "project" Text :> + "global" :> "routes" :> Post '[JSON] Operation + +-- | Creates a route resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'routesInsert' smart constructor. +data RoutesInsert = RoutesInsert + { _riQuotaUser :: !(Maybe Text) + , _riPrettyPrint :: !Bool + , _riProject :: !Text + , _riUserIp :: !(Maybe Text) + , _riKey :: !(Maybe Text) + , _riOauthToken :: !(Maybe Text) + , _riFields :: !(Maybe Text) + , _riAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoutesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riQuotaUser' +-- +-- * 'riPrettyPrint' +-- +-- * 'riProject' +-- +-- * 'riUserIp' +-- +-- * 'riKey' +-- +-- * 'riOauthToken' +-- +-- * 'riFields' +-- +-- * 'riAlt' +routesInsert + :: Text -- ^ 'project' + -> RoutesInsert +routesInsert pRiProject_ = + RoutesInsert + { _riQuotaUser = Nothing + , _riPrettyPrint = True + , _riProject = pRiProject_ + , _riUserIp = Nothing + , _riKey = Nothing + , _riOauthToken = Nothing + , _riFields = Nothing + , _riAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +riQuotaUser :: Lens' RoutesInsert' (Maybe Text) +riQuotaUser + = lens _riQuotaUser (\ s a -> s{_riQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +riPrettyPrint :: Lens' RoutesInsert' Bool +riPrettyPrint + = lens _riPrettyPrint + (\ s a -> s{_riPrettyPrint = a}) + +-- | Name of the project scoping this request. +riProject :: Lens' RoutesInsert' Text +riProject + = lens _riProject (\ s a -> s{_riProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +riUserIp :: Lens' RoutesInsert' (Maybe Text) +riUserIp = lens _riUserIp (\ s a -> s{_riUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +riKey :: Lens' RoutesInsert' (Maybe Text) +riKey = lens _riKey (\ s a -> s{_riKey = a}) + +-- | OAuth 2.0 token for the current user. +riOauthToken :: Lens' RoutesInsert' (Maybe Text) +riOauthToken + = lens _riOauthToken (\ s a -> s{_riOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +riFields :: Lens' RoutesInsert' (Maybe Text) +riFields = lens _riFields (\ s a -> s{_riFields = a}) + +-- | Data format for the response. +riAlt :: Lens' RoutesInsert' Text +riAlt = lens _riAlt (\ s a -> s{_riAlt = a}) + +instance GoogleRequest RoutesInsert' where + type Rs RoutesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u RoutesInsert{..} + = go _riQuotaUser _riPrettyPrint _riProject _riUserIp + _riKey + _riOauthToken + _riFields + _riAlt + where go + = clientWithRoute (Proxy :: Proxy RoutesInsertAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Routes/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/List.hs new file mode 100644 index 000000000..32dd7fece --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Routes/List.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Routes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of route resources available to the specified +-- project. +-- +-- /See:/ for @ComputeRoutesList@. +module Compute.Routes.List + ( + -- * REST Resource + RoutesListAPI + + -- * Creating a Request + , routesList + , RoutesList + + -- * Request Lenses + , rlQuotaUser + , rlPrettyPrint + , rlProject + , rlUserIp + , rlKey + , rlFilter + , rlPageToken + , rlOauthToken + , rlMaxResults + , rlFields + , rlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeRoutesList@ which the +-- 'RoutesList' request conforms to. +type RoutesListAPI = + Capture "project" Text :> + "global" :> + "routes" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] RouteList + +-- | Retrieves the list of route resources available to the specified +-- project. +-- +-- /See:/ 'routesList' smart constructor. +data RoutesList = RoutesList + { _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlProject :: !Text + , _rlUserIp :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlFilter :: !(Maybe Text) + , _rlPageToken :: !(Maybe Text) + , _rlOauthToken :: !(Maybe Text) + , _rlMaxResults :: !Word32 + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoutesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlProject' +-- +-- * 'rlUserIp' +-- +-- * 'rlKey' +-- +-- * 'rlFilter' +-- +-- * 'rlPageToken' +-- +-- * 'rlOauthToken' +-- +-- * 'rlMaxResults' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +routesList + :: Text -- ^ 'project' + -> RoutesList +routesList pRlProject_ = + RoutesList + { _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlProject = pRlProject_ + , _rlUserIp = Nothing + , _rlKey = Nothing + , _rlFilter = Nothing + , _rlPageToken = Nothing + , _rlOauthToken = Nothing + , _rlMaxResults = 500 + , _rlFields = Nothing + , _rlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' RoutesList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' RoutesList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | Name of the project scoping this request. +rlProject :: Lens' RoutesList' Text +rlProject + = lens _rlProject (\ s a -> s{_rlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' RoutesList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' RoutesList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +rlFilter :: Lens' RoutesList' (Maybe Text) +rlFilter = lens _rlFilter (\ s a -> s{_rlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +rlPageToken :: Lens' RoutesList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' RoutesList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | Maximum count of results to be returned. +rlMaxResults :: Lens' RoutesList' Word32 +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' RoutesList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' RoutesList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest RoutesList' where + type Rs RoutesList' = RouteList + request = requestWithRoute defReq computeURL + requestWithRoute r u RoutesList{..} + = go _rlQuotaUser _rlPrettyPrint _rlProject _rlUserIp + _rlKey + _rlFilter + _rlPageToken + _rlOauthToken + (Just _rlMaxResults) + _rlFields + _rlAlt + where go + = clientWithRoute (Proxy :: Proxy RoutesListAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Delete.hs new file mode 100644 index 000000000..90f4ee951 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Delete.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Snapshots.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified Snapshot resource. Keep in mind that deleting a +-- single snapshot might not necessarily delete all the data on that +-- snapshot. If any data on the snapshot that is marked for deletion is +-- needed for subsequent snapshots, the data will be moved to the next +-- corresponding snapshot. For more information, see Deleting snaphots. +-- +-- /See:/ for @ComputeSnapshotsDelete@. +module Compute.Snapshots.Delete + ( + -- * REST Resource + SnapshotsDeleteAPI + + -- * Creating a Request + , snapshotsDelete + , SnapshotsDelete + + -- * Request Lenses + , sdSnapshot + , sdQuotaUser + , sdPrettyPrint + , sdProject + , sdUserIp + , sdKey + , sdOauthToken + , sdFields + , sdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeSnapshotsDelete@ which the +-- 'SnapshotsDelete' request conforms to. +type SnapshotsDeleteAPI = + Capture "project" Text :> + "global" :> + "snapshots" :> + Capture "snapshot" Text :> Delete '[JSON] Operation + +-- | Deletes the specified Snapshot resource. Keep in mind that deleting a +-- single snapshot might not necessarily delete all the data on that +-- snapshot. If any data on the snapshot that is marked for deletion is +-- needed for subsequent snapshots, the data will be moved to the next +-- corresponding snapshot. For more information, see Deleting snaphots. +-- +-- /See:/ 'snapshotsDelete' smart constructor. +data SnapshotsDelete = SnapshotsDelete + { _sdSnapshot :: !Text + , _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdProject :: !Text + , _sdUserIp :: !(Maybe Text) + , _sdKey :: !(Maybe Text) + , _sdOauthToken :: !(Maybe Text) + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdSnapshot' +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdProject' +-- +-- * 'sdUserIp' +-- +-- * 'sdKey' +-- +-- * 'sdOauthToken' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +snapshotsDelete + :: Text -- ^ 'snapshot' + -> Text -- ^ 'project' + -> SnapshotsDelete +snapshotsDelete pSdSnapshot_ pSdProject_ = + SnapshotsDelete + { _sdSnapshot = pSdSnapshot_ + , _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdProject = pSdProject_ + , _sdUserIp = Nothing + , _sdKey = Nothing + , _sdOauthToken = Nothing + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Name of the Snapshot resource to delete. +sdSnapshot :: Lens' SnapshotsDelete' Text +sdSnapshot + = lens _sdSnapshot (\ s a -> s{_sdSnapshot = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SnapshotsDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SnapshotsDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | Name of the project scoping this request. +sdProject :: Lens' SnapshotsDelete' Text +sdProject + = lens _sdProject (\ s a -> s{_sdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SnapshotsDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SnapshotsDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SnapshotsDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SnapshotsDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SnapshotsDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SnapshotsDelete' where + type Rs SnapshotsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u SnapshotsDelete{..} + = go _sdSnapshot _sdQuotaUser _sdPrettyPrint + _sdProject + _sdUserIp + _sdKey + _sdOauthToken + _sdFields + _sdAlt + where go + = clientWithRoute (Proxy :: Proxy SnapshotsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Get.hs new file mode 100644 index 000000000..05f87fc30 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Snapshots.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified Snapshot resource. +-- +-- /See:/ for @ComputeSnapshotsGet@. +module Compute.Snapshots.Get + ( + -- * REST Resource + SnapshotsGetAPI + + -- * Creating a Request + , snapshotsGet + , SnapshotsGet + + -- * Request Lenses + , sgSnapshot + , sgQuotaUser + , sgPrettyPrint + , sgProject + , sgUserIp + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeSnapshotsGet@ which the +-- 'SnapshotsGet' request conforms to. +type SnapshotsGetAPI = + Capture "project" Text :> + "global" :> + "snapshots" :> + Capture "snapshot" Text :> Get '[JSON] Snapshot + +-- | Returns the specified Snapshot resource. +-- +-- /See:/ 'snapshotsGet' smart constructor. +data SnapshotsGet = SnapshotsGet + { _sgSnapshot :: !Text + , _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgProject :: !Text + , _sgUserIp :: !(Maybe Text) + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgSnapshot' +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgProject' +-- +-- * 'sgUserIp' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +snapshotsGet + :: Text -- ^ 'snapshot' + -> Text -- ^ 'project' + -> SnapshotsGet +snapshotsGet pSgSnapshot_ pSgProject_ = + SnapshotsGet + { _sgSnapshot = pSgSnapshot_ + , _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgProject = pSgProject_ + , _sgUserIp = Nothing + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Name of the Snapshot resource to return. +sgSnapshot :: Lens' SnapshotsGet' Text +sgSnapshot + = lens _sgSnapshot (\ s a -> s{_sgSnapshot = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SnapshotsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SnapshotsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | Name of the project scoping this request. +sgProject :: Lens' SnapshotsGet' Text +sgProject + = lens _sgProject (\ s a -> s{_sgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SnapshotsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SnapshotsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SnapshotsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SnapshotsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SnapshotsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SnapshotsGet' where + type Rs SnapshotsGet' = Snapshot + request = requestWithRoute defReq computeURL + requestWithRoute r u SnapshotsGet{..} + = go _sgSnapshot _sgQuotaUser _sgPrettyPrint + _sgProject + _sgUserIp + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SnapshotsGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/List.hs new file mode 100644 index 000000000..62bc18055 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Snapshots/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Snapshots.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Snapshot resources contained within the specified +-- project. +-- +-- /See:/ for @ComputeSnapshotsList@. +module Compute.Snapshots.List + ( + -- * REST Resource + SnapshotsListAPI + + -- * Creating a Request + , snapshotsList + , SnapshotsList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slProject + , slUserIp + , slKey + , slFilter + , slPageToken + , slOauthToken + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeSnapshotsList@ which the +-- 'SnapshotsList' request conforms to. +type SnapshotsListAPI = + Capture "project" Text :> + "global" :> + "snapshots" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] SnapshotList + +-- | Retrieves the list of Snapshot resources contained within the specified +-- project. +-- +-- /See:/ 'snapshotsList' smart constructor. +data SnapshotsList = SnapshotsList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slProject :: !Text + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slFilter :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slMaxResults :: !Word32 + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slProject' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slFilter' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +snapshotsList + :: Text -- ^ 'project' + -> SnapshotsList +snapshotsList pSlProject_ = + SnapshotsList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slProject = pSlProject_ + , _slUserIp = Nothing + , _slKey = Nothing + , _slFilter = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slMaxResults = 500 + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SnapshotsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SnapshotsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | Name of the project scoping this request. +slProject :: Lens' SnapshotsList' Text +slProject + = lens _slProject (\ s a -> s{_slProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SnapshotsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SnapshotsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +slFilter :: Lens' SnapshotsList' (Maybe Text) +slFilter = lens _slFilter (\ s a -> s{_slFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +slPageToken :: Lens' SnapshotsList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SnapshotsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Maximum count of results to be returned. +slMaxResults :: Lens' SnapshotsList' Word32 +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SnapshotsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SnapshotsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SnapshotsList' where + type Rs SnapshotsList' = SnapshotList + request = requestWithRoute defReq computeURL + requestWithRoute r u SnapshotsList{..} + = go _slQuotaUser _slPrettyPrint _slProject _slUserIp + _slKey + _slFilter + _slPageToken + _slOauthToken + (Just _slMaxResults) + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SnapshotsListAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Delete.hs new file mode 100644 index 000000000..71e0477ef --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Delete.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetHTTPProxies.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified TargetHttpProxy resource. +-- +-- /See:/ for @ComputeTargetHTTPProxiesDelete@. +module Compute.TargetHTTPProxies.Delete + ( + -- * REST Resource + TargetHTTPProxiesDeleteAPI + + -- * Creating a Request + , targetHTTPProxiesDelete + , TargetHTTPProxiesDelete + + -- * Request Lenses + , thttppdQuotaUser + , thttppdPrettyPrint + , thttppdProject + , thttppdUserIp + , thttppdKey + , thttppdTargetHttpProxy + , thttppdOauthToken + , thttppdFields + , thttppdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetHTTPProxiesDelete@ which the +-- 'TargetHTTPProxiesDelete' request conforms to. +type TargetHTTPProxiesDeleteAPI = + Capture "project" Text :> + "global" :> + "targetHttpProxies" :> + Capture "targetHttpProxy" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified TargetHttpProxy resource. +-- +-- /See:/ 'targetHTTPProxiesDelete' smart constructor. +data TargetHTTPProxiesDelete = TargetHTTPProxiesDelete + { _thttppdQuotaUser :: !(Maybe Text) + , _thttppdPrettyPrint :: !Bool + , _thttppdProject :: !Text + , _thttppdUserIp :: !(Maybe Text) + , _thttppdKey :: !(Maybe Text) + , _thttppdTargetHttpProxy :: !Text + , _thttppdOauthToken :: !(Maybe Text) + , _thttppdFields :: !(Maybe Text) + , _thttppdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxiesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttppdQuotaUser' +-- +-- * 'thttppdPrettyPrint' +-- +-- * 'thttppdProject' +-- +-- * 'thttppdUserIp' +-- +-- * 'thttppdKey' +-- +-- * 'thttppdTargetHttpProxy' +-- +-- * 'thttppdOauthToken' +-- +-- * 'thttppdFields' +-- +-- * 'thttppdAlt' +targetHTTPProxiesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'targetHttpProxy' + -> TargetHTTPProxiesDelete +targetHTTPProxiesDelete pThttppdProject_ pThttppdTargetHttpProxy_ = + TargetHTTPProxiesDelete + { _thttppdQuotaUser = Nothing + , _thttppdPrettyPrint = True + , _thttppdProject = pThttppdProject_ + , _thttppdUserIp = Nothing + , _thttppdKey = Nothing + , _thttppdTargetHttpProxy = pThttppdTargetHttpProxy_ + , _thttppdOauthToken = Nothing + , _thttppdFields = Nothing + , _thttppdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +thttppdQuotaUser :: Lens' TargetHTTPProxiesDelete' (Maybe Text) +thttppdQuotaUser + = lens _thttppdQuotaUser + (\ s a -> s{_thttppdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +thttppdPrettyPrint :: Lens' TargetHTTPProxiesDelete' Bool +thttppdPrettyPrint + = lens _thttppdPrettyPrint + (\ s a -> s{_thttppdPrettyPrint = a}) + +-- | Name of the project scoping this request. +thttppdProject :: Lens' TargetHTTPProxiesDelete' Text +thttppdProject + = lens _thttppdProject + (\ s a -> s{_thttppdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +thttppdUserIp :: Lens' TargetHTTPProxiesDelete' (Maybe Text) +thttppdUserIp + = lens _thttppdUserIp + (\ s a -> s{_thttppdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +thttppdKey :: Lens' TargetHTTPProxiesDelete' (Maybe Text) +thttppdKey + = lens _thttppdKey (\ s a -> s{_thttppdKey = a}) + +-- | Name of the TargetHttpProxy resource to delete. +thttppdTargetHttpProxy :: Lens' TargetHTTPProxiesDelete' Text +thttppdTargetHttpProxy + = lens _thttppdTargetHttpProxy + (\ s a -> s{_thttppdTargetHttpProxy = a}) + +-- | OAuth 2.0 token for the current user. +thttppdOauthToken :: Lens' TargetHTTPProxiesDelete' (Maybe Text) +thttppdOauthToken + = lens _thttppdOauthToken + (\ s a -> s{_thttppdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +thttppdFields :: Lens' TargetHTTPProxiesDelete' (Maybe Text) +thttppdFields + = lens _thttppdFields + (\ s a -> s{_thttppdFields = a}) + +-- | Data format for the response. +thttppdAlt :: Lens' TargetHTTPProxiesDelete' Text +thttppdAlt + = lens _thttppdAlt (\ s a -> s{_thttppdAlt = a}) + +instance GoogleRequest TargetHTTPProxiesDelete' where + type Rs TargetHTTPProxiesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetHTTPProxiesDelete{..} + = go _thttppdQuotaUser _thttppdPrettyPrint + _thttppdProject + _thttppdUserIp + _thttppdKey + _thttppdTargetHttpProxy + _thttppdOauthToken + _thttppdFields + _thttppdAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetHTTPProxiesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Get.hs new file mode 100644 index 000000000..7370255f5 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetHTTPProxies.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified TargetHttpProxy resource. +-- +-- /See:/ for @ComputeTargetHTTPProxiesGet@. +module Compute.TargetHTTPProxies.Get + ( + -- * REST Resource + TargetHTTPProxiesGetAPI + + -- * Creating a Request + , targetHTTPProxiesGet + , TargetHTTPProxiesGet + + -- * Request Lenses + , thttppgQuotaUser + , thttppgPrettyPrint + , thttppgProject + , thttppgUserIp + , thttppgKey + , thttppgTargetHttpProxy + , thttppgOauthToken + , thttppgFields + , thttppgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetHTTPProxiesGet@ which the +-- 'TargetHTTPProxiesGet' request conforms to. +type TargetHTTPProxiesGetAPI = + Capture "project" Text :> + "global" :> + "targetHttpProxies" :> + Capture "targetHttpProxy" Text :> + Get '[JSON] TargetHTTPProxy + +-- | Returns the specified TargetHttpProxy resource. +-- +-- /See:/ 'targetHTTPProxiesGet' smart constructor. +data TargetHTTPProxiesGet = TargetHTTPProxiesGet + { _thttppgQuotaUser :: !(Maybe Text) + , _thttppgPrettyPrint :: !Bool + , _thttppgProject :: !Text + , _thttppgUserIp :: !(Maybe Text) + , _thttppgKey :: !(Maybe Text) + , _thttppgTargetHttpProxy :: !Text + , _thttppgOauthToken :: !(Maybe Text) + , _thttppgFields :: !(Maybe Text) + , _thttppgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttppgQuotaUser' +-- +-- * 'thttppgPrettyPrint' +-- +-- * 'thttppgProject' +-- +-- * 'thttppgUserIp' +-- +-- * 'thttppgKey' +-- +-- * 'thttppgTargetHttpProxy' +-- +-- * 'thttppgOauthToken' +-- +-- * 'thttppgFields' +-- +-- * 'thttppgAlt' +targetHTTPProxiesGet + :: Text -- ^ 'project' + -> Text -- ^ 'targetHttpProxy' + -> TargetHTTPProxiesGet +targetHTTPProxiesGet pThttppgProject_ pThttppgTargetHttpProxy_ = + TargetHTTPProxiesGet + { _thttppgQuotaUser = Nothing + , _thttppgPrettyPrint = True + , _thttppgProject = pThttppgProject_ + , _thttppgUserIp = Nothing + , _thttppgKey = Nothing + , _thttppgTargetHttpProxy = pThttppgTargetHttpProxy_ + , _thttppgOauthToken = Nothing + , _thttppgFields = Nothing + , _thttppgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +thttppgQuotaUser :: Lens' TargetHTTPProxiesGet' (Maybe Text) +thttppgQuotaUser + = lens _thttppgQuotaUser + (\ s a -> s{_thttppgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +thttppgPrettyPrint :: Lens' TargetHTTPProxiesGet' Bool +thttppgPrettyPrint + = lens _thttppgPrettyPrint + (\ s a -> s{_thttppgPrettyPrint = a}) + +-- | Name of the project scoping this request. +thttppgProject :: Lens' TargetHTTPProxiesGet' Text +thttppgProject + = lens _thttppgProject + (\ s a -> s{_thttppgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +thttppgUserIp :: Lens' TargetHTTPProxiesGet' (Maybe Text) +thttppgUserIp + = lens _thttppgUserIp + (\ s a -> s{_thttppgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +thttppgKey :: Lens' TargetHTTPProxiesGet' (Maybe Text) +thttppgKey + = lens _thttppgKey (\ s a -> s{_thttppgKey = a}) + +-- | Name of the TargetHttpProxy resource to return. +thttppgTargetHttpProxy :: Lens' TargetHTTPProxiesGet' Text +thttppgTargetHttpProxy + = lens _thttppgTargetHttpProxy + (\ s a -> s{_thttppgTargetHttpProxy = a}) + +-- | OAuth 2.0 token for the current user. +thttppgOauthToken :: Lens' TargetHTTPProxiesGet' (Maybe Text) +thttppgOauthToken + = lens _thttppgOauthToken + (\ s a -> s{_thttppgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +thttppgFields :: Lens' TargetHTTPProxiesGet' (Maybe Text) +thttppgFields + = lens _thttppgFields + (\ s a -> s{_thttppgFields = a}) + +-- | Data format for the response. +thttppgAlt :: Lens' TargetHTTPProxiesGet' Text +thttppgAlt + = lens _thttppgAlt (\ s a -> s{_thttppgAlt = a}) + +instance GoogleRequest TargetHTTPProxiesGet' where + type Rs TargetHTTPProxiesGet' = TargetHTTPProxy + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetHTTPProxiesGet{..} + = go _thttppgQuotaUser _thttppgPrettyPrint + _thttppgProject + _thttppgUserIp + _thttppgKey + _thttppgTargetHttpProxy + _thttppgOauthToken + _thttppgFields + _thttppgAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetHTTPProxiesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Insert.hs new file mode 100644 index 000000000..5d2e53c0b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/Insert.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetHTTPProxies.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a TargetHttpProxy resource in the specified project using the +-- data included in the request. +-- +-- /See:/ for @ComputeTargetHTTPProxiesInsert@. +module Compute.TargetHTTPProxies.Insert + ( + -- * REST Resource + TargetHTTPProxiesInsertAPI + + -- * Creating a Request + , targetHTTPProxiesInsert + , TargetHTTPProxiesInsert + + -- * Request Lenses + , thttppiQuotaUser + , thttppiPrettyPrint + , thttppiProject + , thttppiUserIp + , thttppiKey + , thttppiOauthToken + , thttppiFields + , thttppiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetHTTPProxiesInsert@ which the +-- 'TargetHTTPProxiesInsert' request conforms to. +type TargetHTTPProxiesInsertAPI = + Capture "project" Text :> + "global" :> + "targetHttpProxies" :> Post '[JSON] Operation + +-- | Creates a TargetHttpProxy resource in the specified project using the +-- data included in the request. +-- +-- /See:/ 'targetHTTPProxiesInsert' smart constructor. +data TargetHTTPProxiesInsert = TargetHTTPProxiesInsert + { _thttppiQuotaUser :: !(Maybe Text) + , _thttppiPrettyPrint :: !Bool + , _thttppiProject :: !Text + , _thttppiUserIp :: !(Maybe Text) + , _thttppiKey :: !(Maybe Text) + , _thttppiOauthToken :: !(Maybe Text) + , _thttppiFields :: !(Maybe Text) + , _thttppiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttppiQuotaUser' +-- +-- * 'thttppiPrettyPrint' +-- +-- * 'thttppiProject' +-- +-- * 'thttppiUserIp' +-- +-- * 'thttppiKey' +-- +-- * 'thttppiOauthToken' +-- +-- * 'thttppiFields' +-- +-- * 'thttppiAlt' +targetHTTPProxiesInsert + :: Text -- ^ 'project' + -> TargetHTTPProxiesInsert +targetHTTPProxiesInsert pThttppiProject_ = + TargetHTTPProxiesInsert + { _thttppiQuotaUser = Nothing + , _thttppiPrettyPrint = True + , _thttppiProject = pThttppiProject_ + , _thttppiUserIp = Nothing + , _thttppiKey = Nothing + , _thttppiOauthToken = Nothing + , _thttppiFields = Nothing + , _thttppiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +thttppiQuotaUser :: Lens' TargetHTTPProxiesInsert' (Maybe Text) +thttppiQuotaUser + = lens _thttppiQuotaUser + (\ s a -> s{_thttppiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +thttppiPrettyPrint :: Lens' TargetHTTPProxiesInsert' Bool +thttppiPrettyPrint + = lens _thttppiPrettyPrint + (\ s a -> s{_thttppiPrettyPrint = a}) + +-- | Name of the project scoping this request. +thttppiProject :: Lens' TargetHTTPProxiesInsert' Text +thttppiProject + = lens _thttppiProject + (\ s a -> s{_thttppiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +thttppiUserIp :: Lens' TargetHTTPProxiesInsert' (Maybe Text) +thttppiUserIp + = lens _thttppiUserIp + (\ s a -> s{_thttppiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +thttppiKey :: Lens' TargetHTTPProxiesInsert' (Maybe Text) +thttppiKey + = lens _thttppiKey (\ s a -> s{_thttppiKey = a}) + +-- | OAuth 2.0 token for the current user. +thttppiOauthToken :: Lens' TargetHTTPProxiesInsert' (Maybe Text) +thttppiOauthToken + = lens _thttppiOauthToken + (\ s a -> s{_thttppiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +thttppiFields :: Lens' TargetHTTPProxiesInsert' (Maybe Text) +thttppiFields + = lens _thttppiFields + (\ s a -> s{_thttppiFields = a}) + +-- | Data format for the response. +thttppiAlt :: Lens' TargetHTTPProxiesInsert' Text +thttppiAlt + = lens _thttppiAlt (\ s a -> s{_thttppiAlt = a}) + +instance GoogleRequest TargetHTTPProxiesInsert' where + type Rs TargetHTTPProxiesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetHTTPProxiesInsert{..} + = go _thttppiQuotaUser _thttppiPrettyPrint + _thttppiProject + _thttppiUserIp + _thttppiKey + _thttppiOauthToken + _thttppiFields + _thttppiAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetHTTPProxiesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/List.hs new file mode 100644 index 000000000..8f659afa6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/List.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetHTTPProxies.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of TargetHttpProxy resources available to the +-- specified project. +-- +-- /See:/ for @ComputeTargetHTTPProxiesList@. +module Compute.TargetHTTPProxies.List + ( + -- * REST Resource + TargetHTTPProxiesListAPI + + -- * Creating a Request + , targetHTTPProxiesList + , TargetHTTPProxiesList + + -- * Request Lenses + , thttpplQuotaUser + , thttpplPrettyPrint + , thttpplProject + , thttpplUserIp + , thttpplKey + , thttpplFilter + , thttpplPageToken + , thttpplOauthToken + , thttpplMaxResults + , thttpplFields + , thttpplAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetHTTPProxiesList@ which the +-- 'TargetHTTPProxiesList' request conforms to. +type TargetHTTPProxiesListAPI = + Capture "project" Text :> + "global" :> + "targetHttpProxies" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetHTTPProxyList + +-- | Retrieves the list of TargetHttpProxy resources available to the +-- specified project. +-- +-- /See:/ 'targetHTTPProxiesList' smart constructor. +data TargetHTTPProxiesList = TargetHTTPProxiesList + { _thttpplQuotaUser :: !(Maybe Text) + , _thttpplPrettyPrint :: !Bool + , _thttpplProject :: !Text + , _thttpplUserIp :: !(Maybe Text) + , _thttpplKey :: !(Maybe Text) + , _thttpplFilter :: !(Maybe Text) + , _thttpplPageToken :: !(Maybe Text) + , _thttpplOauthToken :: !(Maybe Text) + , _thttpplMaxResults :: !Word32 + , _thttpplFields :: !(Maybe Text) + , _thttpplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttpplQuotaUser' +-- +-- * 'thttpplPrettyPrint' +-- +-- * 'thttpplProject' +-- +-- * 'thttpplUserIp' +-- +-- * 'thttpplKey' +-- +-- * 'thttpplFilter' +-- +-- * 'thttpplPageToken' +-- +-- * 'thttpplOauthToken' +-- +-- * 'thttpplMaxResults' +-- +-- * 'thttpplFields' +-- +-- * 'thttpplAlt' +targetHTTPProxiesList + :: Text -- ^ 'project' + -> TargetHTTPProxiesList +targetHTTPProxiesList pThttpplProject_ = + TargetHTTPProxiesList + { _thttpplQuotaUser = Nothing + , _thttpplPrettyPrint = True + , _thttpplProject = pThttpplProject_ + , _thttpplUserIp = Nothing + , _thttpplKey = Nothing + , _thttpplFilter = Nothing + , _thttpplPageToken = Nothing + , _thttpplOauthToken = Nothing + , _thttpplMaxResults = 500 + , _thttpplFields = Nothing + , _thttpplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +thttpplQuotaUser :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplQuotaUser + = lens _thttpplQuotaUser + (\ s a -> s{_thttpplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +thttpplPrettyPrint :: Lens' TargetHTTPProxiesList' Bool +thttpplPrettyPrint + = lens _thttpplPrettyPrint + (\ s a -> s{_thttpplPrettyPrint = a}) + +-- | Name of the project scoping this request. +thttpplProject :: Lens' TargetHTTPProxiesList' Text +thttpplProject + = lens _thttpplProject + (\ s a -> s{_thttpplProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +thttpplUserIp :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplUserIp + = lens _thttpplUserIp + (\ s a -> s{_thttpplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +thttpplKey :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplKey + = lens _thttpplKey (\ s a -> s{_thttpplKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +thttpplFilter :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplFilter + = lens _thttpplFilter + (\ s a -> s{_thttpplFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +thttpplPageToken :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplPageToken + = lens _thttpplPageToken + (\ s a -> s{_thttpplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +thttpplOauthToken :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplOauthToken + = lens _thttpplOauthToken + (\ s a -> s{_thttpplOauthToken = a}) + +-- | Maximum count of results to be returned. +thttpplMaxResults :: Lens' TargetHTTPProxiesList' Word32 +thttpplMaxResults + = lens _thttpplMaxResults + (\ s a -> s{_thttpplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +thttpplFields :: Lens' TargetHTTPProxiesList' (Maybe Text) +thttpplFields + = lens _thttpplFields + (\ s a -> s{_thttpplFields = a}) + +-- | Data format for the response. +thttpplAlt :: Lens' TargetHTTPProxiesList' Text +thttpplAlt + = lens _thttpplAlt (\ s a -> s{_thttpplAlt = a}) + +instance GoogleRequest TargetHTTPProxiesList' where + type Rs TargetHTTPProxiesList' = TargetHTTPProxyList + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetHTTPProxiesList{..} + = go _thttpplQuotaUser _thttpplPrettyPrint + _thttpplProject + _thttpplUserIp + _thttpplKey + _thttpplFilter + _thttpplPageToken + _thttpplOauthToken + (Just _thttpplMaxResults) + _thttpplFields + _thttpplAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetHTTPProxiesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/SetURLMap.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/SetURLMap.hs new file mode 100644 index 000000000..e4077c8e7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPProxies/SetURLMap.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetHTTPProxies.SetURLMap +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes the URL map for TargetHttpProxy. +-- +-- /See:/ for @ComputeTargetHTTPProxiesSetURLMap@. +module Compute.TargetHTTPProxies.SetURLMap + ( + -- * REST Resource + TargetHTTPProxiesSetURLMapAPI + + -- * Creating a Request + , targetHTTPProxiesSetURLMap + , TargetHTTPProxiesSetURLMap + + -- * Request Lenses + , thttppsumQuotaUser + , thttppsumPrettyPrint + , thttppsumProject + , thttppsumUserIp + , thttppsumKey + , thttppsumTargetHttpProxy + , thttppsumOauthToken + , thttppsumFields + , thttppsumAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetHTTPProxiesSetURLMap@ which the +-- 'TargetHTTPProxiesSetURLMap' request conforms to. +type TargetHTTPProxiesSetURLMapAPI = + Capture "project" Text :> + "targetHttpProxies" :> + Capture "targetHttpProxy" Text :> + "setUrlMap" :> Post '[JSON] Operation + +-- | Changes the URL map for TargetHttpProxy. +-- +-- /See:/ 'targetHTTPProxiesSetURLMap' smart constructor. +data TargetHTTPProxiesSetURLMap = TargetHTTPProxiesSetURLMap + { _thttppsumQuotaUser :: !(Maybe Text) + , _thttppsumPrettyPrint :: !Bool + , _thttppsumProject :: !Text + , _thttppsumUserIp :: !(Maybe Text) + , _thttppsumKey :: !(Maybe Text) + , _thttppsumTargetHttpProxy :: !Text + , _thttppsumOauthToken :: !(Maybe Text) + , _thttppsumFields :: !(Maybe Text) + , _thttppsumAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetHTTPProxiesSetURLMap'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'thttppsumQuotaUser' +-- +-- * 'thttppsumPrettyPrint' +-- +-- * 'thttppsumProject' +-- +-- * 'thttppsumUserIp' +-- +-- * 'thttppsumKey' +-- +-- * 'thttppsumTargetHttpProxy' +-- +-- * 'thttppsumOauthToken' +-- +-- * 'thttppsumFields' +-- +-- * 'thttppsumAlt' +targetHTTPProxiesSetURLMap + :: Text -- ^ 'project' + -> Text -- ^ 'targetHttpProxy' + -> TargetHTTPProxiesSetURLMap +targetHTTPProxiesSetURLMap pThttppsumProject_ pThttppsumTargetHttpProxy_ = + TargetHTTPProxiesSetURLMap + { _thttppsumQuotaUser = Nothing + , _thttppsumPrettyPrint = True + , _thttppsumProject = pThttppsumProject_ + , _thttppsumUserIp = Nothing + , _thttppsumKey = Nothing + , _thttppsumTargetHttpProxy = pThttppsumTargetHttpProxy_ + , _thttppsumOauthToken = Nothing + , _thttppsumFields = Nothing + , _thttppsumAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +thttppsumQuotaUser :: Lens' TargetHTTPProxiesSetURLMap' (Maybe Text) +thttppsumQuotaUser + = lens _thttppsumQuotaUser + (\ s a -> s{_thttppsumQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +thttppsumPrettyPrint :: Lens' TargetHTTPProxiesSetURLMap' Bool +thttppsumPrettyPrint + = lens _thttppsumPrettyPrint + (\ s a -> s{_thttppsumPrettyPrint = a}) + +-- | Name of the project scoping this request. +thttppsumProject :: Lens' TargetHTTPProxiesSetURLMap' Text +thttppsumProject + = lens _thttppsumProject + (\ s a -> s{_thttppsumProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +thttppsumUserIp :: Lens' TargetHTTPProxiesSetURLMap' (Maybe Text) +thttppsumUserIp + = lens _thttppsumUserIp + (\ s a -> s{_thttppsumUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +thttppsumKey :: Lens' TargetHTTPProxiesSetURLMap' (Maybe Text) +thttppsumKey + = lens _thttppsumKey (\ s a -> s{_thttppsumKey = a}) + +-- | Name of the TargetHttpProxy resource whose URL map is to be set. +thttppsumTargetHttpProxy :: Lens' TargetHTTPProxiesSetURLMap' Text +thttppsumTargetHttpProxy + = lens _thttppsumTargetHttpProxy + (\ s a -> s{_thttppsumTargetHttpProxy = a}) + +-- | OAuth 2.0 token for the current user. +thttppsumOauthToken :: Lens' TargetHTTPProxiesSetURLMap' (Maybe Text) +thttppsumOauthToken + = lens _thttppsumOauthToken + (\ s a -> s{_thttppsumOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +thttppsumFields :: Lens' TargetHTTPProxiesSetURLMap' (Maybe Text) +thttppsumFields + = lens _thttppsumFields + (\ s a -> s{_thttppsumFields = a}) + +-- | Data format for the response. +thttppsumAlt :: Lens' TargetHTTPProxiesSetURLMap' Text +thttppsumAlt + = lens _thttppsumAlt (\ s a -> s{_thttppsumAlt = a}) + +instance GoogleRequest TargetHTTPProxiesSetURLMap' + where + type Rs TargetHTTPProxiesSetURLMap' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetHTTPProxiesSetURLMap{..} + = go _thttppsumQuotaUser _thttppsumPrettyPrint + _thttppsumProject + _thttppsumUserIp + _thttppsumKey + _thttppsumTargetHttpProxy + _thttppsumOauthToken + _thttppsumFields + _thttppsumAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetHTTPProxiesSetURLMapAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/AggregatedList.hs new file mode 100644 index 000000000..fc228611f --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/AggregatedList.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetInstances.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of target instances grouped by scope. +-- +-- /See:/ for @ComputeTargetInstancesAggregatedList@. +module Compute.TargetInstances.AggregatedList + ( + -- * REST Resource + TargetInstancesAggregatedListAPI + + -- * Creating a Request + , targetInstancesAggregatedList + , TargetInstancesAggregatedList + + -- * Request Lenses + , tialQuotaUser + , tialPrettyPrint + , tialProject + , tialUserIp + , tialKey + , tialFilter + , tialPageToken + , tialOauthToken + , tialMaxResults + , tialFields + , tialAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetInstancesAggregatedList@ which the +-- 'TargetInstancesAggregatedList' request conforms to. +type TargetInstancesAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "targetInstances" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetInstanceAggregatedList + +-- | Retrieves the list of target instances grouped by scope. +-- +-- /See:/ 'targetInstancesAggregatedList' smart constructor. +data TargetInstancesAggregatedList = TargetInstancesAggregatedList + { _tialQuotaUser :: !(Maybe Text) + , _tialPrettyPrint :: !Bool + , _tialProject :: !Text + , _tialUserIp :: !(Maybe Text) + , _tialKey :: !(Maybe Text) + , _tialFilter :: !(Maybe Text) + , _tialPageToken :: !(Maybe Text) + , _tialOauthToken :: !(Maybe Text) + , _tialMaxResults :: !Word32 + , _tialFields :: !(Maybe Text) + , _tialAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tialQuotaUser' +-- +-- * 'tialPrettyPrint' +-- +-- * 'tialProject' +-- +-- * 'tialUserIp' +-- +-- * 'tialKey' +-- +-- * 'tialFilter' +-- +-- * 'tialPageToken' +-- +-- * 'tialOauthToken' +-- +-- * 'tialMaxResults' +-- +-- * 'tialFields' +-- +-- * 'tialAlt' +targetInstancesAggregatedList + :: Text -- ^ 'project' + -> TargetInstancesAggregatedList +targetInstancesAggregatedList pTialProject_ = + TargetInstancesAggregatedList + { _tialQuotaUser = Nothing + , _tialPrettyPrint = True + , _tialProject = pTialProject_ + , _tialUserIp = Nothing + , _tialKey = Nothing + , _tialFilter = Nothing + , _tialPageToken = Nothing + , _tialOauthToken = Nothing + , _tialMaxResults = 500 + , _tialFields = Nothing + , _tialAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tialQuotaUser :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialQuotaUser + = lens _tialQuotaUser + (\ s a -> s{_tialQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tialPrettyPrint :: Lens' TargetInstancesAggregatedList' Bool +tialPrettyPrint + = lens _tialPrettyPrint + (\ s a -> s{_tialPrettyPrint = a}) + +-- | Name of the project scoping this request. +tialProject :: Lens' TargetInstancesAggregatedList' Text +tialProject + = lens _tialProject (\ s a -> s{_tialProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tialUserIp :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialUserIp + = lens _tialUserIp (\ s a -> s{_tialUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tialKey :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialKey = lens _tialKey (\ s a -> s{_tialKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tialFilter :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialFilter + = lens _tialFilter (\ s a -> s{_tialFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tialPageToken :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialPageToken + = lens _tialPageToken + (\ s a -> s{_tialPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tialOauthToken :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialOauthToken + = lens _tialOauthToken + (\ s a -> s{_tialOauthToken = a}) + +-- | Maximum count of results to be returned. +tialMaxResults :: Lens' TargetInstancesAggregatedList' Word32 +tialMaxResults + = lens _tialMaxResults + (\ s a -> s{_tialMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tialFields :: Lens' TargetInstancesAggregatedList' (Maybe Text) +tialFields + = lens _tialFields (\ s a -> s{_tialFields = a}) + +-- | Data format for the response. +tialAlt :: Lens' TargetInstancesAggregatedList' Text +tialAlt = lens _tialAlt (\ s a -> s{_tialAlt = a}) + +instance GoogleRequest TargetInstancesAggregatedList' + where + type Rs TargetInstancesAggregatedList' = + TargetInstanceAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u + TargetInstancesAggregatedList{..} + = go _tialQuotaUser _tialPrettyPrint _tialProject + _tialUserIp + _tialKey + _tialFilter + _tialPageToken + _tialOauthToken + (Just _tialMaxResults) + _tialFields + _tialAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetInstancesAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Delete.hs new file mode 100644 index 000000000..69100fc3b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetInstances.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified TargetInstance resource. +-- +-- /See:/ for @ComputeTargetInstancesDelete@. +module Compute.TargetInstances.Delete + ( + -- * REST Resource + TargetInstancesDeleteAPI + + -- * Creating a Request + , targetInstancesDelete + , TargetInstancesDelete + + -- * Request Lenses + , tidQuotaUser + , tidPrettyPrint + , tidProject + , tidTargetInstance + , tidUserIp + , tidZone + , tidKey + , tidOauthToken + , tidFields + , tidAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetInstancesDelete@ which the +-- 'TargetInstancesDelete' request conforms to. +type TargetInstancesDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "targetInstances" :> + Capture "targetInstance" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified TargetInstance resource. +-- +-- /See:/ 'targetInstancesDelete' smart constructor. +data TargetInstancesDelete = TargetInstancesDelete + { _tidQuotaUser :: !(Maybe Text) + , _tidPrettyPrint :: !Bool + , _tidProject :: !Text + , _tidTargetInstance :: !Text + , _tidUserIp :: !(Maybe Text) + , _tidZone :: !Text + , _tidKey :: !(Maybe Text) + , _tidOauthToken :: !(Maybe Text) + , _tidFields :: !(Maybe Text) + , _tidAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tidQuotaUser' +-- +-- * 'tidPrettyPrint' +-- +-- * 'tidProject' +-- +-- * 'tidTargetInstance' +-- +-- * 'tidUserIp' +-- +-- * 'tidZone' +-- +-- * 'tidKey' +-- +-- * 'tidOauthToken' +-- +-- * 'tidFields' +-- +-- * 'tidAlt' +targetInstancesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'targetInstance' + -> Text -- ^ 'zone' + -> TargetInstancesDelete +targetInstancesDelete pTidProject_ pTidTargetInstance_ pTidZone_ = + TargetInstancesDelete + { _tidQuotaUser = Nothing + , _tidPrettyPrint = True + , _tidProject = pTidProject_ + , _tidTargetInstance = pTidTargetInstance_ + , _tidUserIp = Nothing + , _tidZone = pTidZone_ + , _tidKey = Nothing + , _tidOauthToken = Nothing + , _tidFields = Nothing + , _tidAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tidQuotaUser :: Lens' TargetInstancesDelete' (Maybe Text) +tidQuotaUser + = lens _tidQuotaUser (\ s a -> s{_tidQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tidPrettyPrint :: Lens' TargetInstancesDelete' Bool +tidPrettyPrint + = lens _tidPrettyPrint + (\ s a -> s{_tidPrettyPrint = a}) + +-- | Name of the project scoping this request. +tidProject :: Lens' TargetInstancesDelete' Text +tidProject + = lens _tidProject (\ s a -> s{_tidProject = a}) + +-- | Name of the TargetInstance resource to delete. +tidTargetInstance :: Lens' TargetInstancesDelete' Text +tidTargetInstance + = lens _tidTargetInstance + (\ s a -> s{_tidTargetInstance = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tidUserIp :: Lens' TargetInstancesDelete' (Maybe Text) +tidUserIp + = lens _tidUserIp (\ s a -> s{_tidUserIp = a}) + +-- | Name of the zone scoping this request. +tidZone :: Lens' TargetInstancesDelete' Text +tidZone = lens _tidZone (\ s a -> s{_tidZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tidKey :: Lens' TargetInstancesDelete' (Maybe Text) +tidKey = lens _tidKey (\ s a -> s{_tidKey = a}) + +-- | OAuth 2.0 token for the current user. +tidOauthToken :: Lens' TargetInstancesDelete' (Maybe Text) +tidOauthToken + = lens _tidOauthToken + (\ s a -> s{_tidOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tidFields :: Lens' TargetInstancesDelete' (Maybe Text) +tidFields + = lens _tidFields (\ s a -> s{_tidFields = a}) + +-- | Data format for the response. +tidAlt :: Lens' TargetInstancesDelete' Text +tidAlt = lens _tidAlt (\ s a -> s{_tidAlt = a}) + +instance GoogleRequest TargetInstancesDelete' where + type Rs TargetInstancesDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetInstancesDelete{..} + = go _tidQuotaUser _tidPrettyPrint _tidProject + _tidTargetInstance + _tidUserIp + _tidZone + _tidKey + _tidOauthToken + _tidFields + _tidAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetInstancesDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Get.hs new file mode 100644 index 000000000..9dc498a8a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Get.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetInstances.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified TargetInstance resource. +-- +-- /See:/ for @ComputeTargetInstancesGet@. +module Compute.TargetInstances.Get + ( + -- * REST Resource + TargetInstancesGetAPI + + -- * Creating a Request + , targetInstancesGet + , TargetInstancesGet + + -- * Request Lenses + , tigQuotaUser + , tigPrettyPrint + , tigProject + , tigTargetInstance + , tigUserIp + , tigZone + , tigKey + , tigOauthToken + , tigFields + , tigAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetInstancesGet@ which the +-- 'TargetInstancesGet' request conforms to. +type TargetInstancesGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "targetInstances" :> + Capture "targetInstance" Text :> + Get '[JSON] TargetInstance + +-- | Returns the specified TargetInstance resource. +-- +-- /See:/ 'targetInstancesGet' smart constructor. +data TargetInstancesGet = TargetInstancesGet + { _tigQuotaUser :: !(Maybe Text) + , _tigPrettyPrint :: !Bool + , _tigProject :: !Text + , _tigTargetInstance :: !Text + , _tigUserIp :: !(Maybe Text) + , _tigZone :: !Text + , _tigKey :: !(Maybe Text) + , _tigOauthToken :: !(Maybe Text) + , _tigFields :: !(Maybe Text) + , _tigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tigQuotaUser' +-- +-- * 'tigPrettyPrint' +-- +-- * 'tigProject' +-- +-- * 'tigTargetInstance' +-- +-- * 'tigUserIp' +-- +-- * 'tigZone' +-- +-- * 'tigKey' +-- +-- * 'tigOauthToken' +-- +-- * 'tigFields' +-- +-- * 'tigAlt' +targetInstancesGet + :: Text -- ^ 'project' + -> Text -- ^ 'targetInstance' + -> Text -- ^ 'zone' + -> TargetInstancesGet +targetInstancesGet pTigProject_ pTigTargetInstance_ pTigZone_ = + TargetInstancesGet + { _tigQuotaUser = Nothing + , _tigPrettyPrint = True + , _tigProject = pTigProject_ + , _tigTargetInstance = pTigTargetInstance_ + , _tigUserIp = Nothing + , _tigZone = pTigZone_ + , _tigKey = Nothing + , _tigOauthToken = Nothing + , _tigFields = Nothing + , _tigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tigQuotaUser :: Lens' TargetInstancesGet' (Maybe Text) +tigQuotaUser + = lens _tigQuotaUser (\ s a -> s{_tigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tigPrettyPrint :: Lens' TargetInstancesGet' Bool +tigPrettyPrint + = lens _tigPrettyPrint + (\ s a -> s{_tigPrettyPrint = a}) + +-- | Name of the project scoping this request. +tigProject :: Lens' TargetInstancesGet' Text +tigProject + = lens _tigProject (\ s a -> s{_tigProject = a}) + +-- | Name of the TargetInstance resource to return. +tigTargetInstance :: Lens' TargetInstancesGet' Text +tigTargetInstance + = lens _tigTargetInstance + (\ s a -> s{_tigTargetInstance = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tigUserIp :: Lens' TargetInstancesGet' (Maybe Text) +tigUserIp + = lens _tigUserIp (\ s a -> s{_tigUserIp = a}) + +-- | Name of the zone scoping this request. +tigZone :: Lens' TargetInstancesGet' Text +tigZone = lens _tigZone (\ s a -> s{_tigZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tigKey :: Lens' TargetInstancesGet' (Maybe Text) +tigKey = lens _tigKey (\ s a -> s{_tigKey = a}) + +-- | OAuth 2.0 token for the current user. +tigOauthToken :: Lens' TargetInstancesGet' (Maybe Text) +tigOauthToken + = lens _tigOauthToken + (\ s a -> s{_tigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tigFields :: Lens' TargetInstancesGet' (Maybe Text) +tigFields + = lens _tigFields (\ s a -> s{_tigFields = a}) + +-- | Data format for the response. +tigAlt :: Lens' TargetInstancesGet' Text +tigAlt = lens _tigAlt (\ s a -> s{_tigAlt = a}) + +instance GoogleRequest TargetInstancesGet' where + type Rs TargetInstancesGet' = TargetInstance + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetInstancesGet{..} + = go _tigQuotaUser _tigPrettyPrint _tigProject + _tigTargetInstance + _tigUserIp + _tigZone + _tigKey + _tigOauthToken + _tigFields + _tigAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetInstancesGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Insert.hs new file mode 100644 index 000000000..c55ec282a --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/Insert.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetInstances.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a TargetInstance resource in the specified project and zone +-- using the data included in the request. +-- +-- /See:/ for @ComputeTargetInstancesInsert@. +module Compute.TargetInstances.Insert + ( + -- * REST Resource + TargetInstancesInsertAPI + + -- * Creating a Request + , targetInstancesInsert + , TargetInstancesInsert + + -- * Request Lenses + , tiiQuotaUser + , tiiPrettyPrint + , tiiProject + , tiiUserIp + , tiiZone + , tiiKey + , tiiOauthToken + , tiiFields + , tiiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetInstancesInsert@ which the +-- 'TargetInstancesInsert' request conforms to. +type TargetInstancesInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "targetInstances" :> Post '[JSON] Operation + +-- | Creates a TargetInstance resource in the specified project and zone +-- using the data included in the request. +-- +-- /See:/ 'targetInstancesInsert' smart constructor. +data TargetInstancesInsert = TargetInstancesInsert + { _tiiQuotaUser :: !(Maybe Text) + , _tiiPrettyPrint :: !Bool + , _tiiProject :: !Text + , _tiiUserIp :: !(Maybe Text) + , _tiiZone :: !Text + , _tiiKey :: !(Maybe Text) + , _tiiOauthToken :: !(Maybe Text) + , _tiiFields :: !(Maybe Text) + , _tiiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiiQuotaUser' +-- +-- * 'tiiPrettyPrint' +-- +-- * 'tiiProject' +-- +-- * 'tiiUserIp' +-- +-- * 'tiiZone' +-- +-- * 'tiiKey' +-- +-- * 'tiiOauthToken' +-- +-- * 'tiiFields' +-- +-- * 'tiiAlt' +targetInstancesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> TargetInstancesInsert +targetInstancesInsert pTiiProject_ pTiiZone_ = + TargetInstancesInsert + { _tiiQuotaUser = Nothing + , _tiiPrettyPrint = True + , _tiiProject = pTiiProject_ + , _tiiUserIp = Nothing + , _tiiZone = pTiiZone_ + , _tiiKey = Nothing + , _tiiOauthToken = Nothing + , _tiiFields = Nothing + , _tiiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiiQuotaUser :: Lens' TargetInstancesInsert' (Maybe Text) +tiiQuotaUser + = lens _tiiQuotaUser (\ s a -> s{_tiiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiiPrettyPrint :: Lens' TargetInstancesInsert' Bool +tiiPrettyPrint + = lens _tiiPrettyPrint + (\ s a -> s{_tiiPrettyPrint = a}) + +-- | Name of the project scoping this request. +tiiProject :: Lens' TargetInstancesInsert' Text +tiiProject + = lens _tiiProject (\ s a -> s{_tiiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiiUserIp :: Lens' TargetInstancesInsert' (Maybe Text) +tiiUserIp + = lens _tiiUserIp (\ s a -> s{_tiiUserIp = a}) + +-- | Name of the zone scoping this request. +tiiZone :: Lens' TargetInstancesInsert' Text +tiiZone = lens _tiiZone (\ s a -> s{_tiiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiiKey :: Lens' TargetInstancesInsert' (Maybe Text) +tiiKey = lens _tiiKey (\ s a -> s{_tiiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiiOauthToken :: Lens' TargetInstancesInsert' (Maybe Text) +tiiOauthToken + = lens _tiiOauthToken + (\ s a -> s{_tiiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiiFields :: Lens' TargetInstancesInsert' (Maybe Text) +tiiFields + = lens _tiiFields (\ s a -> s{_tiiFields = a}) + +-- | Data format for the response. +tiiAlt :: Lens' TargetInstancesInsert' Text +tiiAlt = lens _tiiAlt (\ s a -> s{_tiiAlt = a}) + +instance GoogleRequest TargetInstancesInsert' where + type Rs TargetInstancesInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetInstancesInsert{..} + = go _tiiQuotaUser _tiiPrettyPrint _tiiProject + _tiiUserIp + _tiiZone + _tiiKey + _tiiOauthToken + _tiiFields + _tiiAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetInstancesInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/List.hs new file mode 100644 index 000000000..7f785016b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetInstances/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetInstances.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of TargetInstance resources available to the +-- specified project and zone. +-- +-- /See:/ for @ComputeTargetInstancesList@. +module Compute.TargetInstances.List + ( + -- * REST Resource + TargetInstancesListAPI + + -- * Creating a Request + , targetInstancesList + , TargetInstancesList + + -- * Request Lenses + , tilQuotaUser + , tilPrettyPrint + , tilProject + , tilUserIp + , tilZone + , tilKey + , tilFilter + , tilPageToken + , tilOauthToken + , tilMaxResults + , tilFields + , tilAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetInstancesList@ which the +-- 'TargetInstancesList' request conforms to. +type TargetInstancesListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "targetInstances" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetInstanceList + +-- | Retrieves the list of TargetInstance resources available to the +-- specified project and zone. +-- +-- /See:/ 'targetInstancesList' smart constructor. +data TargetInstancesList = TargetInstancesList + { _tilQuotaUser :: !(Maybe Text) + , _tilPrettyPrint :: !Bool + , _tilProject :: !Text + , _tilUserIp :: !(Maybe Text) + , _tilZone :: !Text + , _tilKey :: !(Maybe Text) + , _tilFilter :: !(Maybe Text) + , _tilPageToken :: !(Maybe Text) + , _tilOauthToken :: !(Maybe Text) + , _tilMaxResults :: !Word32 + , _tilFields :: !(Maybe Text) + , _tilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetInstancesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tilQuotaUser' +-- +-- * 'tilPrettyPrint' +-- +-- * 'tilProject' +-- +-- * 'tilUserIp' +-- +-- * 'tilZone' +-- +-- * 'tilKey' +-- +-- * 'tilFilter' +-- +-- * 'tilPageToken' +-- +-- * 'tilOauthToken' +-- +-- * 'tilMaxResults' +-- +-- * 'tilFields' +-- +-- * 'tilAlt' +targetInstancesList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> TargetInstancesList +targetInstancesList pTilProject_ pTilZone_ = + TargetInstancesList + { _tilQuotaUser = Nothing + , _tilPrettyPrint = True + , _tilProject = pTilProject_ + , _tilUserIp = Nothing + , _tilZone = pTilZone_ + , _tilKey = Nothing + , _tilFilter = Nothing + , _tilPageToken = Nothing + , _tilOauthToken = Nothing + , _tilMaxResults = 500 + , _tilFields = Nothing + , _tilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tilQuotaUser :: Lens' TargetInstancesList' (Maybe Text) +tilQuotaUser + = lens _tilQuotaUser (\ s a -> s{_tilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tilPrettyPrint :: Lens' TargetInstancesList' Bool +tilPrettyPrint + = lens _tilPrettyPrint + (\ s a -> s{_tilPrettyPrint = a}) + +-- | Name of the project scoping this request. +tilProject :: Lens' TargetInstancesList' Text +tilProject + = lens _tilProject (\ s a -> s{_tilProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tilUserIp :: Lens' TargetInstancesList' (Maybe Text) +tilUserIp + = lens _tilUserIp (\ s a -> s{_tilUserIp = a}) + +-- | Name of the zone scoping this request. +tilZone :: Lens' TargetInstancesList' Text +tilZone = lens _tilZone (\ s a -> s{_tilZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tilKey :: Lens' TargetInstancesList' (Maybe Text) +tilKey = lens _tilKey (\ s a -> s{_tilKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tilFilter :: Lens' TargetInstancesList' (Maybe Text) +tilFilter + = lens _tilFilter (\ s a -> s{_tilFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tilPageToken :: Lens' TargetInstancesList' (Maybe Text) +tilPageToken + = lens _tilPageToken (\ s a -> s{_tilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tilOauthToken :: Lens' TargetInstancesList' (Maybe Text) +tilOauthToken + = lens _tilOauthToken + (\ s a -> s{_tilOauthToken = a}) + +-- | Maximum count of results to be returned. +tilMaxResults :: Lens' TargetInstancesList' Word32 +tilMaxResults + = lens _tilMaxResults + (\ s a -> s{_tilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tilFields :: Lens' TargetInstancesList' (Maybe Text) +tilFields + = lens _tilFields (\ s a -> s{_tilFields = a}) + +-- | Data format for the response. +tilAlt :: Lens' TargetInstancesList' Text +tilAlt = lens _tilAlt (\ s a -> s{_tilAlt = a}) + +instance GoogleRequest TargetInstancesList' where + type Rs TargetInstancesList' = TargetInstanceList + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetInstancesList{..} + = go _tilQuotaUser _tilPrettyPrint _tilProject + _tilUserIp + _tilZone + _tilKey + _tilFilter + _tilPageToken + _tilOauthToken + (Just _tilMaxResults) + _tilFields + _tilAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetInstancesListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddHealthCheck.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddHealthCheck.hs new file mode 100644 index 000000000..324504a1d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddHealthCheck.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.AddHealthCheck +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds health check URL to targetPool. +-- +-- /See:/ for @ComputeTargetPoolsAddHealthCheck@. +module Compute.TargetPools.AddHealthCheck + ( + -- * REST Resource + TargetPoolsAddHealthCheckAPI + + -- * Creating a Request + , targetPoolsAddHealthCheck + , TargetPoolsAddHealthCheck + + -- * Request Lenses + , tpahcQuotaUser + , tpahcPrettyPrint + , tpahcProject + , tpahcTargetPool + , tpahcUserIp + , tpahcKey + , tpahcRegion + , tpahcOauthToken + , tpahcFields + , tpahcAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsAddHealthCheck@ which the +-- 'TargetPoolsAddHealthCheck' request conforms to. +type TargetPoolsAddHealthCheckAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "addHealthCheck" :> Post '[JSON] Operation + +-- | Adds health check URL to targetPool. +-- +-- /See:/ 'targetPoolsAddHealthCheck' smart constructor. +data TargetPoolsAddHealthCheck = TargetPoolsAddHealthCheck + { _tpahcQuotaUser :: !(Maybe Text) + , _tpahcPrettyPrint :: !Bool + , _tpahcProject :: !Text + , _tpahcTargetPool :: !Text + , _tpahcUserIp :: !(Maybe Text) + , _tpahcKey :: !(Maybe Text) + , _tpahcRegion :: !Text + , _tpahcOauthToken :: !(Maybe Text) + , _tpahcFields :: !(Maybe Text) + , _tpahcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsAddHealthCheck'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpahcQuotaUser' +-- +-- * 'tpahcPrettyPrint' +-- +-- * 'tpahcProject' +-- +-- * 'tpahcTargetPool' +-- +-- * 'tpahcUserIp' +-- +-- * 'tpahcKey' +-- +-- * 'tpahcRegion' +-- +-- * 'tpahcOauthToken' +-- +-- * 'tpahcFields' +-- +-- * 'tpahcAlt' +targetPoolsAddHealthCheck + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsAddHealthCheck +targetPoolsAddHealthCheck pTpahcProject_ pTpahcTargetPool_ pTpahcRegion_ = + TargetPoolsAddHealthCheck + { _tpahcQuotaUser = Nothing + , _tpahcPrettyPrint = True + , _tpahcProject = pTpahcProject_ + , _tpahcTargetPool = pTpahcTargetPool_ + , _tpahcUserIp = Nothing + , _tpahcKey = Nothing + , _tpahcRegion = pTpahcRegion_ + , _tpahcOauthToken = Nothing + , _tpahcFields = Nothing + , _tpahcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpahcQuotaUser :: Lens' TargetPoolsAddHealthCheck' (Maybe Text) +tpahcQuotaUser + = lens _tpahcQuotaUser + (\ s a -> s{_tpahcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpahcPrettyPrint :: Lens' TargetPoolsAddHealthCheck' Bool +tpahcPrettyPrint + = lens _tpahcPrettyPrint + (\ s a -> s{_tpahcPrettyPrint = a}) + +tpahcProject :: Lens' TargetPoolsAddHealthCheck' Text +tpahcProject + = lens _tpahcProject (\ s a -> s{_tpahcProject = a}) + +-- | Name of the TargetPool resource to which health_check_url is to be +-- added. +tpahcTargetPool :: Lens' TargetPoolsAddHealthCheck' Text +tpahcTargetPool + = lens _tpahcTargetPool + (\ s a -> s{_tpahcTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpahcUserIp :: Lens' TargetPoolsAddHealthCheck' (Maybe Text) +tpahcUserIp + = lens _tpahcUserIp (\ s a -> s{_tpahcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpahcKey :: Lens' TargetPoolsAddHealthCheck' (Maybe Text) +tpahcKey = lens _tpahcKey (\ s a -> s{_tpahcKey = a}) + +-- | Name of the region scoping this request. +tpahcRegion :: Lens' TargetPoolsAddHealthCheck' Text +tpahcRegion + = lens _tpahcRegion (\ s a -> s{_tpahcRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpahcOauthToken :: Lens' TargetPoolsAddHealthCheck' (Maybe Text) +tpahcOauthToken + = lens _tpahcOauthToken + (\ s a -> s{_tpahcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpahcFields :: Lens' TargetPoolsAddHealthCheck' (Maybe Text) +tpahcFields + = lens _tpahcFields (\ s a -> s{_tpahcFields = a}) + +-- | Data format for the response. +tpahcAlt :: Lens' TargetPoolsAddHealthCheck' Text +tpahcAlt = lens _tpahcAlt (\ s a -> s{_tpahcAlt = a}) + +instance GoogleRequest TargetPoolsAddHealthCheck' + where + type Rs TargetPoolsAddHealthCheck' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsAddHealthCheck{..} + = go _tpahcQuotaUser _tpahcPrettyPrint _tpahcProject + _tpahcTargetPool + _tpahcUserIp + _tpahcKey + _tpahcRegion + _tpahcOauthToken + _tpahcFields + _tpahcAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsAddHealthCheckAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddInstance.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddInstance.hs new file mode 100644 index 000000000..e696e0bd6 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AddInstance.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.AddInstance +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds instance url to targetPool. +-- +-- /See:/ for @ComputeTargetPoolsAddInstance@. +module Compute.TargetPools.AddInstance + ( + -- * REST Resource + TargetPoolsAddInstanceAPI + + -- * Creating a Request + , targetPoolsAddInstance + , TargetPoolsAddInstance + + -- * Request Lenses + , tpaiQuotaUser + , tpaiPrettyPrint + , tpaiProject + , tpaiTargetPool + , tpaiUserIp + , tpaiKey + , tpaiRegion + , tpaiOauthToken + , tpaiFields + , tpaiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsAddInstance@ which the +-- 'TargetPoolsAddInstance' request conforms to. +type TargetPoolsAddInstanceAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "addInstance" :> Post '[JSON] Operation + +-- | Adds instance url to targetPool. +-- +-- /See:/ 'targetPoolsAddInstance' smart constructor. +data TargetPoolsAddInstance = TargetPoolsAddInstance + { _tpaiQuotaUser :: !(Maybe Text) + , _tpaiPrettyPrint :: !Bool + , _tpaiProject :: !Text + , _tpaiTargetPool :: !Text + , _tpaiUserIp :: !(Maybe Text) + , _tpaiKey :: !(Maybe Text) + , _tpaiRegion :: !Text + , _tpaiOauthToken :: !(Maybe Text) + , _tpaiFields :: !(Maybe Text) + , _tpaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsAddInstance'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpaiQuotaUser' +-- +-- * 'tpaiPrettyPrint' +-- +-- * 'tpaiProject' +-- +-- * 'tpaiTargetPool' +-- +-- * 'tpaiUserIp' +-- +-- * 'tpaiKey' +-- +-- * 'tpaiRegion' +-- +-- * 'tpaiOauthToken' +-- +-- * 'tpaiFields' +-- +-- * 'tpaiAlt' +targetPoolsAddInstance + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsAddInstance +targetPoolsAddInstance pTpaiProject_ pTpaiTargetPool_ pTpaiRegion_ = + TargetPoolsAddInstance + { _tpaiQuotaUser = Nothing + , _tpaiPrettyPrint = True + , _tpaiProject = pTpaiProject_ + , _tpaiTargetPool = pTpaiTargetPool_ + , _tpaiUserIp = Nothing + , _tpaiKey = Nothing + , _tpaiRegion = pTpaiRegion_ + , _tpaiOauthToken = Nothing + , _tpaiFields = Nothing + , _tpaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpaiQuotaUser :: Lens' TargetPoolsAddInstance' (Maybe Text) +tpaiQuotaUser + = lens _tpaiQuotaUser + (\ s a -> s{_tpaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpaiPrettyPrint :: Lens' TargetPoolsAddInstance' Bool +tpaiPrettyPrint + = lens _tpaiPrettyPrint + (\ s a -> s{_tpaiPrettyPrint = a}) + +tpaiProject :: Lens' TargetPoolsAddInstance' Text +tpaiProject + = lens _tpaiProject (\ s a -> s{_tpaiProject = a}) + +-- | Name of the TargetPool resource to which instance_url is to be added. +tpaiTargetPool :: Lens' TargetPoolsAddInstance' Text +tpaiTargetPool + = lens _tpaiTargetPool + (\ s a -> s{_tpaiTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpaiUserIp :: Lens' TargetPoolsAddInstance' (Maybe Text) +tpaiUserIp + = lens _tpaiUserIp (\ s a -> s{_tpaiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpaiKey :: Lens' TargetPoolsAddInstance' (Maybe Text) +tpaiKey = lens _tpaiKey (\ s a -> s{_tpaiKey = a}) + +-- | Name of the region scoping this request. +tpaiRegion :: Lens' TargetPoolsAddInstance' Text +tpaiRegion + = lens _tpaiRegion (\ s a -> s{_tpaiRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpaiOauthToken :: Lens' TargetPoolsAddInstance' (Maybe Text) +tpaiOauthToken + = lens _tpaiOauthToken + (\ s a -> s{_tpaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpaiFields :: Lens' TargetPoolsAddInstance' (Maybe Text) +tpaiFields + = lens _tpaiFields (\ s a -> s{_tpaiFields = a}) + +-- | Data format for the response. +tpaiAlt :: Lens' TargetPoolsAddInstance' Text +tpaiAlt = lens _tpaiAlt (\ s a -> s{_tpaiAlt = a}) + +instance GoogleRequest TargetPoolsAddInstance' where + type Rs TargetPoolsAddInstance' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsAddInstance{..} + = go _tpaiQuotaUser _tpaiPrettyPrint _tpaiProject + _tpaiTargetPool + _tpaiUserIp + _tpaiKey + _tpaiRegion + _tpaiOauthToken + _tpaiFields + _tpaiAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsAddInstanceAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AggregatedList.hs new file mode 100644 index 000000000..46135b607 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/AggregatedList.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of target pools grouped by scope. +-- +-- /See:/ for @ComputeTargetPoolsAggregatedList@. +module Compute.TargetPools.AggregatedList + ( + -- * REST Resource + TargetPoolsAggregatedListAPI + + -- * Creating a Request + , targetPoolsAggregatedList + , TargetPoolsAggregatedList + + -- * Request Lenses + , tpalQuotaUser + , tpalPrettyPrint + , tpalProject + , tpalUserIp + , tpalKey + , tpalFilter + , tpalPageToken + , tpalOauthToken + , tpalMaxResults + , tpalFields + , tpalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsAggregatedList@ which the +-- 'TargetPoolsAggregatedList' request conforms to. +type TargetPoolsAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "targetPools" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetPoolAggregatedList + +-- | Retrieves the list of target pools grouped by scope. +-- +-- /See:/ 'targetPoolsAggregatedList' smart constructor. +data TargetPoolsAggregatedList = TargetPoolsAggregatedList + { _tpalQuotaUser :: !(Maybe Text) + , _tpalPrettyPrint :: !Bool + , _tpalProject :: !Text + , _tpalUserIp :: !(Maybe Text) + , _tpalKey :: !(Maybe Text) + , _tpalFilter :: !(Maybe Text) + , _tpalPageToken :: !(Maybe Text) + , _tpalOauthToken :: !(Maybe Text) + , _tpalMaxResults :: !Word32 + , _tpalFields :: !(Maybe Text) + , _tpalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpalQuotaUser' +-- +-- * 'tpalPrettyPrint' +-- +-- * 'tpalProject' +-- +-- * 'tpalUserIp' +-- +-- * 'tpalKey' +-- +-- * 'tpalFilter' +-- +-- * 'tpalPageToken' +-- +-- * 'tpalOauthToken' +-- +-- * 'tpalMaxResults' +-- +-- * 'tpalFields' +-- +-- * 'tpalAlt' +targetPoolsAggregatedList + :: Text -- ^ 'project' + -> TargetPoolsAggregatedList +targetPoolsAggregatedList pTpalProject_ = + TargetPoolsAggregatedList + { _tpalQuotaUser = Nothing + , _tpalPrettyPrint = True + , _tpalProject = pTpalProject_ + , _tpalUserIp = Nothing + , _tpalKey = Nothing + , _tpalFilter = Nothing + , _tpalPageToken = Nothing + , _tpalOauthToken = Nothing + , _tpalMaxResults = 500 + , _tpalFields = Nothing + , _tpalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpalQuotaUser :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalQuotaUser + = lens _tpalQuotaUser + (\ s a -> s{_tpalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpalPrettyPrint :: Lens' TargetPoolsAggregatedList' Bool +tpalPrettyPrint + = lens _tpalPrettyPrint + (\ s a -> s{_tpalPrettyPrint = a}) + +-- | Name of the project scoping this request. +tpalProject :: Lens' TargetPoolsAggregatedList' Text +tpalProject + = lens _tpalProject (\ s a -> s{_tpalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpalUserIp :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalUserIp + = lens _tpalUserIp (\ s a -> s{_tpalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpalKey :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalKey = lens _tpalKey (\ s a -> s{_tpalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tpalFilter :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalFilter + = lens _tpalFilter (\ s a -> s{_tpalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tpalPageToken :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalPageToken + = lens _tpalPageToken + (\ s a -> s{_tpalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tpalOauthToken :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalOauthToken + = lens _tpalOauthToken + (\ s a -> s{_tpalOauthToken = a}) + +-- | Maximum count of results to be returned. +tpalMaxResults :: Lens' TargetPoolsAggregatedList' Word32 +tpalMaxResults + = lens _tpalMaxResults + (\ s a -> s{_tpalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tpalFields :: Lens' TargetPoolsAggregatedList' (Maybe Text) +tpalFields + = lens _tpalFields (\ s a -> s{_tpalFields = a}) + +-- | Data format for the response. +tpalAlt :: Lens' TargetPoolsAggregatedList' Text +tpalAlt = lens _tpalAlt (\ s a -> s{_tpalAlt = a}) + +instance GoogleRequest TargetPoolsAggregatedList' + where + type Rs TargetPoolsAggregatedList' = + TargetPoolAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsAggregatedList{..} + = go _tpalQuotaUser _tpalPrettyPrint _tpalProject + _tpalUserIp + _tpalKey + _tpalFilter + _tpalPageToken + _tpalOauthToken + (Just _tpalMaxResults) + _tpalFields + _tpalAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Delete.hs new file mode 100644 index 000000000..758a478f0 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified TargetPool resource. +-- +-- /See:/ for @ComputeTargetPoolsDelete@. +module Compute.TargetPools.Delete + ( + -- * REST Resource + TargetPoolsDeleteAPI + + -- * Creating a Request + , targetPoolsDelete + , TargetPoolsDelete + + -- * Request Lenses + , tpdQuotaUser + , tpdPrettyPrint + , tpdProject + , tpdTargetPool + , tpdUserIp + , tpdKey + , tpdRegion + , tpdOauthToken + , tpdFields + , tpdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsDelete@ which the +-- 'TargetPoolsDelete' request conforms to. +type TargetPoolsDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> Delete '[JSON] Operation + +-- | Deletes the specified TargetPool resource. +-- +-- /See:/ 'targetPoolsDelete' smart constructor. +data TargetPoolsDelete = TargetPoolsDelete + { _tpdQuotaUser :: !(Maybe Text) + , _tpdPrettyPrint :: !Bool + , _tpdProject :: !Text + , _tpdTargetPool :: !Text + , _tpdUserIp :: !(Maybe Text) + , _tpdKey :: !(Maybe Text) + , _tpdRegion :: !Text + , _tpdOauthToken :: !(Maybe Text) + , _tpdFields :: !(Maybe Text) + , _tpdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpdQuotaUser' +-- +-- * 'tpdPrettyPrint' +-- +-- * 'tpdProject' +-- +-- * 'tpdTargetPool' +-- +-- * 'tpdUserIp' +-- +-- * 'tpdKey' +-- +-- * 'tpdRegion' +-- +-- * 'tpdOauthToken' +-- +-- * 'tpdFields' +-- +-- * 'tpdAlt' +targetPoolsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsDelete +targetPoolsDelete pTpdProject_ pTpdTargetPool_ pTpdRegion_ = + TargetPoolsDelete + { _tpdQuotaUser = Nothing + , _tpdPrettyPrint = True + , _tpdProject = pTpdProject_ + , _tpdTargetPool = pTpdTargetPool_ + , _tpdUserIp = Nothing + , _tpdKey = Nothing + , _tpdRegion = pTpdRegion_ + , _tpdOauthToken = Nothing + , _tpdFields = Nothing + , _tpdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpdQuotaUser :: Lens' TargetPoolsDelete' (Maybe Text) +tpdQuotaUser + = lens _tpdQuotaUser (\ s a -> s{_tpdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpdPrettyPrint :: Lens' TargetPoolsDelete' Bool +tpdPrettyPrint + = lens _tpdPrettyPrint + (\ s a -> s{_tpdPrettyPrint = a}) + +-- | Name of the project scoping this request. +tpdProject :: Lens' TargetPoolsDelete' Text +tpdProject + = lens _tpdProject (\ s a -> s{_tpdProject = a}) + +-- | Name of the TargetPool resource to delete. +tpdTargetPool :: Lens' TargetPoolsDelete' Text +tpdTargetPool + = lens _tpdTargetPool + (\ s a -> s{_tpdTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpdUserIp :: Lens' TargetPoolsDelete' (Maybe Text) +tpdUserIp + = lens _tpdUserIp (\ s a -> s{_tpdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpdKey :: Lens' TargetPoolsDelete' (Maybe Text) +tpdKey = lens _tpdKey (\ s a -> s{_tpdKey = a}) + +-- | Name of the region scoping this request. +tpdRegion :: Lens' TargetPoolsDelete' Text +tpdRegion + = lens _tpdRegion (\ s a -> s{_tpdRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpdOauthToken :: Lens' TargetPoolsDelete' (Maybe Text) +tpdOauthToken + = lens _tpdOauthToken + (\ s a -> s{_tpdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpdFields :: Lens' TargetPoolsDelete' (Maybe Text) +tpdFields + = lens _tpdFields (\ s a -> s{_tpdFields = a}) + +-- | Data format for the response. +tpdAlt :: Lens' TargetPoolsDelete' Text +tpdAlt = lens _tpdAlt (\ s a -> s{_tpdAlt = a}) + +instance GoogleRequest TargetPoolsDelete' where + type Rs TargetPoolsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsDelete{..} + = go _tpdQuotaUser _tpdPrettyPrint _tpdProject + _tpdTargetPool + _tpdUserIp + _tpdKey + _tpdRegion + _tpdOauthToken + _tpdFields + _tpdAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Get.hs new file mode 100644 index 000000000..66d74ff04 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified TargetPool resource. +-- +-- /See:/ for @ComputeTargetPoolsGet@. +module Compute.TargetPools.Get + ( + -- * REST Resource + TargetPoolsGetAPI + + -- * Creating a Request + , targetPoolsGet + , TargetPoolsGet + + -- * Request Lenses + , tpgQuotaUser + , tpgPrettyPrint + , tpgProject + , tpgTargetPool + , tpgUserIp + , tpgKey + , tpgRegion + , tpgOauthToken + , tpgFields + , tpgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsGet@ which the +-- 'TargetPoolsGet' request conforms to. +type TargetPoolsGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> Get '[JSON] TargetPool + +-- | Returns the specified TargetPool resource. +-- +-- /See:/ 'targetPoolsGet' smart constructor. +data TargetPoolsGet = TargetPoolsGet + { _tpgQuotaUser :: !(Maybe Text) + , _tpgPrettyPrint :: !Bool + , _tpgProject :: !Text + , _tpgTargetPool :: !Text + , _tpgUserIp :: !(Maybe Text) + , _tpgKey :: !(Maybe Text) + , _tpgRegion :: !Text + , _tpgOauthToken :: !(Maybe Text) + , _tpgFields :: !(Maybe Text) + , _tpgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpgQuotaUser' +-- +-- * 'tpgPrettyPrint' +-- +-- * 'tpgProject' +-- +-- * 'tpgTargetPool' +-- +-- * 'tpgUserIp' +-- +-- * 'tpgKey' +-- +-- * 'tpgRegion' +-- +-- * 'tpgOauthToken' +-- +-- * 'tpgFields' +-- +-- * 'tpgAlt' +targetPoolsGet + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsGet +targetPoolsGet pTpgProject_ pTpgTargetPool_ pTpgRegion_ = + TargetPoolsGet + { _tpgQuotaUser = Nothing + , _tpgPrettyPrint = True + , _tpgProject = pTpgProject_ + , _tpgTargetPool = pTpgTargetPool_ + , _tpgUserIp = Nothing + , _tpgKey = Nothing + , _tpgRegion = pTpgRegion_ + , _tpgOauthToken = Nothing + , _tpgFields = Nothing + , _tpgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpgQuotaUser :: Lens' TargetPoolsGet' (Maybe Text) +tpgQuotaUser + = lens _tpgQuotaUser (\ s a -> s{_tpgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpgPrettyPrint :: Lens' TargetPoolsGet' Bool +tpgPrettyPrint + = lens _tpgPrettyPrint + (\ s a -> s{_tpgPrettyPrint = a}) + +-- | Name of the project scoping this request. +tpgProject :: Lens' TargetPoolsGet' Text +tpgProject + = lens _tpgProject (\ s a -> s{_tpgProject = a}) + +-- | Name of the TargetPool resource to return. +tpgTargetPool :: Lens' TargetPoolsGet' Text +tpgTargetPool + = lens _tpgTargetPool + (\ s a -> s{_tpgTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpgUserIp :: Lens' TargetPoolsGet' (Maybe Text) +tpgUserIp + = lens _tpgUserIp (\ s a -> s{_tpgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpgKey :: Lens' TargetPoolsGet' (Maybe Text) +tpgKey = lens _tpgKey (\ s a -> s{_tpgKey = a}) + +-- | Name of the region scoping this request. +tpgRegion :: Lens' TargetPoolsGet' Text +tpgRegion + = lens _tpgRegion (\ s a -> s{_tpgRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpgOauthToken :: Lens' TargetPoolsGet' (Maybe Text) +tpgOauthToken + = lens _tpgOauthToken + (\ s a -> s{_tpgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpgFields :: Lens' TargetPoolsGet' (Maybe Text) +tpgFields + = lens _tpgFields (\ s a -> s{_tpgFields = a}) + +-- | Data format for the response. +tpgAlt :: Lens' TargetPoolsGet' Text +tpgAlt = lens _tpgAlt (\ s a -> s{_tpgAlt = a}) + +instance GoogleRequest TargetPoolsGet' where + type Rs TargetPoolsGet' = TargetPool + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsGet{..} + = go _tpgQuotaUser _tpgPrettyPrint _tpgProject + _tpgTargetPool + _tpgUserIp + _tpgKey + _tpgRegion + _tpgOauthToken + _tpgFields + _tpgAlt + where go + = clientWithRoute (Proxy :: Proxy TargetPoolsGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/GetHealth.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/GetHealth.hs new file mode 100644 index 000000000..f44538308 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/GetHealth.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.GetHealth +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the most recent health check results for each IP for the given +-- instance that is referenced by given TargetPool. +-- +-- /See:/ for @ComputeTargetPoolsGetHealth@. +module Compute.TargetPools.GetHealth + ( + -- * REST Resource + TargetPoolsGetHealthAPI + + -- * Creating a Request + , targetPoolsGetHealth + , TargetPoolsGetHealth + + -- * Request Lenses + , tpghQuotaUser + , tpghPrettyPrint + , tpghProject + , tpghTargetPool + , tpghUserIp + , tpghKey + , tpghRegion + , tpghOauthToken + , tpghFields + , tpghAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsGetHealth@ which the +-- 'TargetPoolsGetHealth' request conforms to. +type TargetPoolsGetHealthAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "getHealth" :> Post '[JSON] TargetPoolInstanceHealth + +-- | Gets the most recent health check results for each IP for the given +-- instance that is referenced by given TargetPool. +-- +-- /See:/ 'targetPoolsGetHealth' smart constructor. +data TargetPoolsGetHealth = TargetPoolsGetHealth + { _tpghQuotaUser :: !(Maybe Text) + , _tpghPrettyPrint :: !Bool + , _tpghProject :: !Text + , _tpghTargetPool :: !Text + , _tpghUserIp :: !(Maybe Text) + , _tpghKey :: !(Maybe Text) + , _tpghRegion :: !Text + , _tpghOauthToken :: !(Maybe Text) + , _tpghFields :: !(Maybe Text) + , _tpghAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsGetHealth'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpghQuotaUser' +-- +-- * 'tpghPrettyPrint' +-- +-- * 'tpghProject' +-- +-- * 'tpghTargetPool' +-- +-- * 'tpghUserIp' +-- +-- * 'tpghKey' +-- +-- * 'tpghRegion' +-- +-- * 'tpghOauthToken' +-- +-- * 'tpghFields' +-- +-- * 'tpghAlt' +targetPoolsGetHealth + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsGetHealth +targetPoolsGetHealth pTpghProject_ pTpghTargetPool_ pTpghRegion_ = + TargetPoolsGetHealth + { _tpghQuotaUser = Nothing + , _tpghPrettyPrint = True + , _tpghProject = pTpghProject_ + , _tpghTargetPool = pTpghTargetPool_ + , _tpghUserIp = Nothing + , _tpghKey = Nothing + , _tpghRegion = pTpghRegion_ + , _tpghOauthToken = Nothing + , _tpghFields = Nothing + , _tpghAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpghQuotaUser :: Lens' TargetPoolsGetHealth' (Maybe Text) +tpghQuotaUser + = lens _tpghQuotaUser + (\ s a -> s{_tpghQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpghPrettyPrint :: Lens' TargetPoolsGetHealth' Bool +tpghPrettyPrint + = lens _tpghPrettyPrint + (\ s a -> s{_tpghPrettyPrint = a}) + +tpghProject :: Lens' TargetPoolsGetHealth' Text +tpghProject + = lens _tpghProject (\ s a -> s{_tpghProject = a}) + +-- | Name of the TargetPool resource to which the queried instance belongs. +tpghTargetPool :: Lens' TargetPoolsGetHealth' Text +tpghTargetPool + = lens _tpghTargetPool + (\ s a -> s{_tpghTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpghUserIp :: Lens' TargetPoolsGetHealth' (Maybe Text) +tpghUserIp + = lens _tpghUserIp (\ s a -> s{_tpghUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpghKey :: Lens' TargetPoolsGetHealth' (Maybe Text) +tpghKey = lens _tpghKey (\ s a -> s{_tpghKey = a}) + +-- | Name of the region scoping this request. +tpghRegion :: Lens' TargetPoolsGetHealth' Text +tpghRegion + = lens _tpghRegion (\ s a -> s{_tpghRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpghOauthToken :: Lens' TargetPoolsGetHealth' (Maybe Text) +tpghOauthToken + = lens _tpghOauthToken + (\ s a -> s{_tpghOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpghFields :: Lens' TargetPoolsGetHealth' (Maybe Text) +tpghFields + = lens _tpghFields (\ s a -> s{_tpghFields = a}) + +-- | Data format for the response. +tpghAlt :: Lens' TargetPoolsGetHealth' Text +tpghAlt = lens _tpghAlt (\ s a -> s{_tpghAlt = a}) + +instance GoogleRequest TargetPoolsGetHealth' where + type Rs TargetPoolsGetHealth' = + TargetPoolInstanceHealth + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsGetHealth{..} + = go _tpghQuotaUser _tpghPrettyPrint _tpghProject + _tpghTargetPool + _tpghUserIp + _tpghKey + _tpghRegion + _tpghOauthToken + _tpghFields + _tpghAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsGetHealthAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Insert.hs new file mode 100644 index 000000000..12572efcc --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a TargetPool resource in the specified project and region using +-- the data included in the request. +-- +-- /See:/ for @ComputeTargetPoolsInsert@. +module Compute.TargetPools.Insert + ( + -- * REST Resource + TargetPoolsInsertAPI + + -- * Creating a Request + , targetPoolsInsert + , TargetPoolsInsert + + -- * Request Lenses + , tpiQuotaUser + , tpiPrettyPrint + , tpiProject + , tpiUserIp + , tpiKey + , tpiRegion + , tpiOauthToken + , tpiFields + , tpiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsInsert@ which the +-- 'TargetPoolsInsert' request conforms to. +type TargetPoolsInsertAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> Post '[JSON] Operation + +-- | Creates a TargetPool resource in the specified project and region using +-- the data included in the request. +-- +-- /See:/ 'targetPoolsInsert' smart constructor. +data TargetPoolsInsert = TargetPoolsInsert + { _tpiQuotaUser :: !(Maybe Text) + , _tpiPrettyPrint :: !Bool + , _tpiProject :: !Text + , _tpiUserIp :: !(Maybe Text) + , _tpiKey :: !(Maybe Text) + , _tpiRegion :: !Text + , _tpiOauthToken :: !(Maybe Text) + , _tpiFields :: !(Maybe Text) + , _tpiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpiQuotaUser' +-- +-- * 'tpiPrettyPrint' +-- +-- * 'tpiProject' +-- +-- * 'tpiUserIp' +-- +-- * 'tpiKey' +-- +-- * 'tpiRegion' +-- +-- * 'tpiOauthToken' +-- +-- * 'tpiFields' +-- +-- * 'tpiAlt' +targetPoolsInsert + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> TargetPoolsInsert +targetPoolsInsert pTpiProject_ pTpiRegion_ = + TargetPoolsInsert + { _tpiQuotaUser = Nothing + , _tpiPrettyPrint = True + , _tpiProject = pTpiProject_ + , _tpiUserIp = Nothing + , _tpiKey = Nothing + , _tpiRegion = pTpiRegion_ + , _tpiOauthToken = Nothing + , _tpiFields = Nothing + , _tpiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpiQuotaUser :: Lens' TargetPoolsInsert' (Maybe Text) +tpiQuotaUser + = lens _tpiQuotaUser (\ s a -> s{_tpiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpiPrettyPrint :: Lens' TargetPoolsInsert' Bool +tpiPrettyPrint + = lens _tpiPrettyPrint + (\ s a -> s{_tpiPrettyPrint = a}) + +-- | Name of the project scoping this request. +tpiProject :: Lens' TargetPoolsInsert' Text +tpiProject + = lens _tpiProject (\ s a -> s{_tpiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpiUserIp :: Lens' TargetPoolsInsert' (Maybe Text) +tpiUserIp + = lens _tpiUserIp (\ s a -> s{_tpiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpiKey :: Lens' TargetPoolsInsert' (Maybe Text) +tpiKey = lens _tpiKey (\ s a -> s{_tpiKey = a}) + +-- | Name of the region scoping this request. +tpiRegion :: Lens' TargetPoolsInsert' Text +tpiRegion + = lens _tpiRegion (\ s a -> s{_tpiRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpiOauthToken :: Lens' TargetPoolsInsert' (Maybe Text) +tpiOauthToken + = lens _tpiOauthToken + (\ s a -> s{_tpiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpiFields :: Lens' TargetPoolsInsert' (Maybe Text) +tpiFields + = lens _tpiFields (\ s a -> s{_tpiFields = a}) + +-- | Data format for the response. +tpiAlt :: Lens' TargetPoolsInsert' Text +tpiAlt = lens _tpiAlt (\ s a -> s{_tpiAlt = a}) + +instance GoogleRequest TargetPoolsInsert' where + type Rs TargetPoolsInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsInsert{..} + = go _tpiQuotaUser _tpiPrettyPrint _tpiProject + _tpiUserIp + _tpiKey + _tpiRegion + _tpiOauthToken + _tpiFields + _tpiAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/List.hs new file mode 100644 index 000000000..71f1e2788 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of TargetPool resources available to the specified +-- project and region. +-- +-- /See:/ for @ComputeTargetPoolsList@. +module Compute.TargetPools.List + ( + -- * REST Resource + TargetPoolsListAPI + + -- * Creating a Request + , targetPoolsList + , TargetPoolsList + + -- * Request Lenses + , tplQuotaUser + , tplPrettyPrint + , tplProject + , tplUserIp + , tplKey + , tplFilter + , tplRegion + , tplPageToken + , tplOauthToken + , tplMaxResults + , tplFields + , tplAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsList@ which the +-- 'TargetPoolsList' request conforms to. +type TargetPoolsListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetPoolList + +-- | Retrieves the list of TargetPool resources available to the specified +-- project and region. +-- +-- /See:/ 'targetPoolsList' smart constructor. +data TargetPoolsList = TargetPoolsList + { _tplQuotaUser :: !(Maybe Text) + , _tplPrettyPrint :: !Bool + , _tplProject :: !Text + , _tplUserIp :: !(Maybe Text) + , _tplKey :: !(Maybe Text) + , _tplFilter :: !(Maybe Text) + , _tplRegion :: !Text + , _tplPageToken :: !(Maybe Text) + , _tplOauthToken :: !(Maybe Text) + , _tplMaxResults :: !Word32 + , _tplFields :: !(Maybe Text) + , _tplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tplQuotaUser' +-- +-- * 'tplPrettyPrint' +-- +-- * 'tplProject' +-- +-- * 'tplUserIp' +-- +-- * 'tplKey' +-- +-- * 'tplFilter' +-- +-- * 'tplRegion' +-- +-- * 'tplPageToken' +-- +-- * 'tplOauthToken' +-- +-- * 'tplMaxResults' +-- +-- * 'tplFields' +-- +-- * 'tplAlt' +targetPoolsList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> TargetPoolsList +targetPoolsList pTplProject_ pTplRegion_ = + TargetPoolsList + { _tplQuotaUser = Nothing + , _tplPrettyPrint = True + , _tplProject = pTplProject_ + , _tplUserIp = Nothing + , _tplKey = Nothing + , _tplFilter = Nothing + , _tplRegion = pTplRegion_ + , _tplPageToken = Nothing + , _tplOauthToken = Nothing + , _tplMaxResults = 500 + , _tplFields = Nothing + , _tplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tplQuotaUser :: Lens' TargetPoolsList' (Maybe Text) +tplQuotaUser + = lens _tplQuotaUser (\ s a -> s{_tplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tplPrettyPrint :: Lens' TargetPoolsList' Bool +tplPrettyPrint + = lens _tplPrettyPrint + (\ s a -> s{_tplPrettyPrint = a}) + +-- | Name of the project scoping this request. +tplProject :: Lens' TargetPoolsList' Text +tplProject + = lens _tplProject (\ s a -> s{_tplProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tplUserIp :: Lens' TargetPoolsList' (Maybe Text) +tplUserIp + = lens _tplUserIp (\ s a -> s{_tplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tplKey :: Lens' TargetPoolsList' (Maybe Text) +tplKey = lens _tplKey (\ s a -> s{_tplKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tplFilter :: Lens' TargetPoolsList' (Maybe Text) +tplFilter + = lens _tplFilter (\ s a -> s{_tplFilter = a}) + +-- | Name of the region scoping this request. +tplRegion :: Lens' TargetPoolsList' Text +tplRegion + = lens _tplRegion (\ s a -> s{_tplRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tplPageToken :: Lens' TargetPoolsList' (Maybe Text) +tplPageToken + = lens _tplPageToken (\ s a -> s{_tplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tplOauthToken :: Lens' TargetPoolsList' (Maybe Text) +tplOauthToken + = lens _tplOauthToken + (\ s a -> s{_tplOauthToken = a}) + +-- | Maximum count of results to be returned. +tplMaxResults :: Lens' TargetPoolsList' Word32 +tplMaxResults + = lens _tplMaxResults + (\ s a -> s{_tplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tplFields :: Lens' TargetPoolsList' (Maybe Text) +tplFields + = lens _tplFields (\ s a -> s{_tplFields = a}) + +-- | Data format for the response. +tplAlt :: Lens' TargetPoolsList' Text +tplAlt = lens _tplAlt (\ s a -> s{_tplAlt = a}) + +instance GoogleRequest TargetPoolsList' where + type Rs TargetPoolsList' = TargetPoolList + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsList{..} + = go _tplQuotaUser _tplPrettyPrint _tplProject + _tplUserIp + _tplKey + _tplFilter + _tplRegion + _tplPageToken + _tplOauthToken + (Just _tplMaxResults) + _tplFields + _tplAlt + where go + = clientWithRoute (Proxy :: Proxy TargetPoolsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveHealthCheck.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveHealthCheck.hs new file mode 100644 index 000000000..8873c815d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveHealthCheck.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.RemoveHealthCheck +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes health check URL from targetPool. +-- +-- /See:/ for @ComputeTargetPoolsRemoveHealthCheck@. +module Compute.TargetPools.RemoveHealthCheck + ( + -- * REST Resource + TargetPoolsRemoveHealthCheckAPI + + -- * Creating a Request + , targetPoolsRemoveHealthCheck + , TargetPoolsRemoveHealthCheck + + -- * Request Lenses + , tprhcQuotaUser + , tprhcPrettyPrint + , tprhcProject + , tprhcTargetPool + , tprhcUserIp + , tprhcKey + , tprhcRegion + , tprhcOauthToken + , tprhcFields + , tprhcAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsRemoveHealthCheck@ which the +-- 'TargetPoolsRemoveHealthCheck' request conforms to. +type TargetPoolsRemoveHealthCheckAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "removeHealthCheck" :> Post '[JSON] Operation + +-- | Removes health check URL from targetPool. +-- +-- /See:/ 'targetPoolsRemoveHealthCheck' smart constructor. +data TargetPoolsRemoveHealthCheck = TargetPoolsRemoveHealthCheck + { _tprhcQuotaUser :: !(Maybe Text) + , _tprhcPrettyPrint :: !Bool + , _tprhcProject :: !Text + , _tprhcTargetPool :: !Text + , _tprhcUserIp :: !(Maybe Text) + , _tprhcKey :: !(Maybe Text) + , _tprhcRegion :: !Text + , _tprhcOauthToken :: !(Maybe Text) + , _tprhcFields :: !(Maybe Text) + , _tprhcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsRemoveHealthCheck'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tprhcQuotaUser' +-- +-- * 'tprhcPrettyPrint' +-- +-- * 'tprhcProject' +-- +-- * 'tprhcTargetPool' +-- +-- * 'tprhcUserIp' +-- +-- * 'tprhcKey' +-- +-- * 'tprhcRegion' +-- +-- * 'tprhcOauthToken' +-- +-- * 'tprhcFields' +-- +-- * 'tprhcAlt' +targetPoolsRemoveHealthCheck + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsRemoveHealthCheck +targetPoolsRemoveHealthCheck pTprhcProject_ pTprhcTargetPool_ pTprhcRegion_ = + TargetPoolsRemoveHealthCheck + { _tprhcQuotaUser = Nothing + , _tprhcPrettyPrint = True + , _tprhcProject = pTprhcProject_ + , _tprhcTargetPool = pTprhcTargetPool_ + , _tprhcUserIp = Nothing + , _tprhcKey = Nothing + , _tprhcRegion = pTprhcRegion_ + , _tprhcOauthToken = Nothing + , _tprhcFields = Nothing + , _tprhcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tprhcQuotaUser :: Lens' TargetPoolsRemoveHealthCheck' (Maybe Text) +tprhcQuotaUser + = lens _tprhcQuotaUser + (\ s a -> s{_tprhcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tprhcPrettyPrint :: Lens' TargetPoolsRemoveHealthCheck' Bool +tprhcPrettyPrint + = lens _tprhcPrettyPrint + (\ s a -> s{_tprhcPrettyPrint = a}) + +tprhcProject :: Lens' TargetPoolsRemoveHealthCheck' Text +tprhcProject + = lens _tprhcProject (\ s a -> s{_tprhcProject = a}) + +-- | Name of the TargetPool resource to which health_check_url is to be +-- removed. +tprhcTargetPool :: Lens' TargetPoolsRemoveHealthCheck' Text +tprhcTargetPool + = lens _tprhcTargetPool + (\ s a -> s{_tprhcTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tprhcUserIp :: Lens' TargetPoolsRemoveHealthCheck' (Maybe Text) +tprhcUserIp + = lens _tprhcUserIp (\ s a -> s{_tprhcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tprhcKey :: Lens' TargetPoolsRemoveHealthCheck' (Maybe Text) +tprhcKey = lens _tprhcKey (\ s a -> s{_tprhcKey = a}) + +-- | Name of the region scoping this request. +tprhcRegion :: Lens' TargetPoolsRemoveHealthCheck' Text +tprhcRegion + = lens _tprhcRegion (\ s a -> s{_tprhcRegion = a}) + +-- | OAuth 2.0 token for the current user. +tprhcOauthToken :: Lens' TargetPoolsRemoveHealthCheck' (Maybe Text) +tprhcOauthToken + = lens _tprhcOauthToken + (\ s a -> s{_tprhcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tprhcFields :: Lens' TargetPoolsRemoveHealthCheck' (Maybe Text) +tprhcFields + = lens _tprhcFields (\ s a -> s{_tprhcFields = a}) + +-- | Data format for the response. +tprhcAlt :: Lens' TargetPoolsRemoveHealthCheck' Text +tprhcAlt = lens _tprhcAlt (\ s a -> s{_tprhcAlt = a}) + +instance GoogleRequest TargetPoolsRemoveHealthCheck' + where + type Rs TargetPoolsRemoveHealthCheck' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsRemoveHealthCheck{..} + = go _tprhcQuotaUser _tprhcPrettyPrint _tprhcProject + _tprhcTargetPool + _tprhcUserIp + _tprhcKey + _tprhcRegion + _tprhcOauthToken + _tprhcFields + _tprhcAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsRemoveHealthCheckAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveInstance.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveInstance.hs new file mode 100644 index 000000000..6a61ddcd7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveInstance.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.RemoveInstance +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes instance URL from targetPool. +-- +-- /See:/ for @ComputeTargetPoolsRemoveInstance@. +module Compute.TargetPools.RemoveInstance + ( + -- * REST Resource + TargetPoolsRemoveInstanceAPI + + -- * Creating a Request + , targetPoolsRemoveInstance + , TargetPoolsRemoveInstance + + -- * Request Lenses + , tpriQuotaUser + , tpriPrettyPrint + , tpriProject + , tpriTargetPool + , tpriUserIp + , tpriKey + , tpriRegion + , tpriOauthToken + , tpriFields + , tpriAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsRemoveInstance@ which the +-- 'TargetPoolsRemoveInstance' request conforms to. +type TargetPoolsRemoveInstanceAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "removeInstance" :> Post '[JSON] Operation + +-- | Removes instance URL from targetPool. +-- +-- /See:/ 'targetPoolsRemoveInstance' smart constructor. +data TargetPoolsRemoveInstance = TargetPoolsRemoveInstance + { _tpriQuotaUser :: !(Maybe Text) + , _tpriPrettyPrint :: !Bool + , _tpriProject :: !Text + , _tpriTargetPool :: !Text + , _tpriUserIp :: !(Maybe Text) + , _tpriKey :: !(Maybe Text) + , _tpriRegion :: !Text + , _tpriOauthToken :: !(Maybe Text) + , _tpriFields :: !(Maybe Text) + , _tpriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsRemoveInstance'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpriQuotaUser' +-- +-- * 'tpriPrettyPrint' +-- +-- * 'tpriProject' +-- +-- * 'tpriTargetPool' +-- +-- * 'tpriUserIp' +-- +-- * 'tpriKey' +-- +-- * 'tpriRegion' +-- +-- * 'tpriOauthToken' +-- +-- * 'tpriFields' +-- +-- * 'tpriAlt' +targetPoolsRemoveInstance + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsRemoveInstance +targetPoolsRemoveInstance pTpriProject_ pTpriTargetPool_ pTpriRegion_ = + TargetPoolsRemoveInstance + { _tpriQuotaUser = Nothing + , _tpriPrettyPrint = True + , _tpriProject = pTpriProject_ + , _tpriTargetPool = pTpriTargetPool_ + , _tpriUserIp = Nothing + , _tpriKey = Nothing + , _tpriRegion = pTpriRegion_ + , _tpriOauthToken = Nothing + , _tpriFields = Nothing + , _tpriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpriQuotaUser :: Lens' TargetPoolsRemoveInstance' (Maybe Text) +tpriQuotaUser + = lens _tpriQuotaUser + (\ s a -> s{_tpriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpriPrettyPrint :: Lens' TargetPoolsRemoveInstance' Bool +tpriPrettyPrint + = lens _tpriPrettyPrint + (\ s a -> s{_tpriPrettyPrint = a}) + +tpriProject :: Lens' TargetPoolsRemoveInstance' Text +tpriProject + = lens _tpriProject (\ s a -> s{_tpriProject = a}) + +-- | Name of the TargetPool resource to which instance_url is to be removed. +tpriTargetPool :: Lens' TargetPoolsRemoveInstance' Text +tpriTargetPool + = lens _tpriTargetPool + (\ s a -> s{_tpriTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpriUserIp :: Lens' TargetPoolsRemoveInstance' (Maybe Text) +tpriUserIp + = lens _tpriUserIp (\ s a -> s{_tpriUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpriKey :: Lens' TargetPoolsRemoveInstance' (Maybe Text) +tpriKey = lens _tpriKey (\ s a -> s{_tpriKey = a}) + +-- | Name of the region scoping this request. +tpriRegion :: Lens' TargetPoolsRemoveInstance' Text +tpriRegion + = lens _tpriRegion (\ s a -> s{_tpriRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpriOauthToken :: Lens' TargetPoolsRemoveInstance' (Maybe Text) +tpriOauthToken + = lens _tpriOauthToken + (\ s a -> s{_tpriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpriFields :: Lens' TargetPoolsRemoveInstance' (Maybe Text) +tpriFields + = lens _tpriFields (\ s a -> s{_tpriFields = a}) + +-- | Data format for the response. +tpriAlt :: Lens' TargetPoolsRemoveInstance' Text +tpriAlt = lens _tpriAlt (\ s a -> s{_tpriAlt = a}) + +instance GoogleRequest TargetPoolsRemoveInstance' + where + type Rs TargetPoolsRemoveInstance' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsRemoveInstance{..} + = go _tpriQuotaUser _tpriPrettyPrint _tpriProject + _tpriTargetPool + _tpriUserIp + _tpriKey + _tpriRegion + _tpriOauthToken + _tpriFields + _tpriAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsRemoveInstanceAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/SetBackup.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/SetBackup.hs new file mode 100644 index 000000000..def18d43e --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/SetBackup.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetPools.SetBackup +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes backup pool configurations. +-- +-- /See:/ for @ComputeTargetPoolsSetBackup@. +module Compute.TargetPools.SetBackup + ( + -- * REST Resource + TargetPoolsSetBackupAPI + + -- * Creating a Request + , targetPoolsSetBackup + , TargetPoolsSetBackup + + -- * Request Lenses + , tpsbQuotaUser + , tpsbPrettyPrint + , tpsbProject + , tpsbTargetPool + , tpsbUserIp + , tpsbKey + , tpsbFailoverRatio + , tpsbRegion + , tpsbOauthToken + , tpsbFields + , tpsbAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetPoolsSetBackup@ which the +-- 'TargetPoolsSetBackup' request conforms to. +type TargetPoolsSetBackupAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetPools" :> + Capture "targetPool" Text :> + "setBackup" :> + QueryParam "failoverRatio" Float :> + Post '[JSON] Operation + +-- | Changes backup pool configurations. +-- +-- /See:/ 'targetPoolsSetBackup' smart constructor. +data TargetPoolsSetBackup = TargetPoolsSetBackup + { _tpsbQuotaUser :: !(Maybe Text) + , _tpsbPrettyPrint :: !Bool + , _tpsbProject :: !Text + , _tpsbTargetPool :: !Text + , _tpsbUserIp :: !(Maybe Text) + , _tpsbKey :: !(Maybe Text) + , _tpsbFailoverRatio :: !(Maybe Float) + , _tpsbRegion :: !Text + , _tpsbOauthToken :: !(Maybe Text) + , _tpsbFields :: !(Maybe Text) + , _tpsbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetPoolsSetBackup'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpsbQuotaUser' +-- +-- * 'tpsbPrettyPrint' +-- +-- * 'tpsbProject' +-- +-- * 'tpsbTargetPool' +-- +-- * 'tpsbUserIp' +-- +-- * 'tpsbKey' +-- +-- * 'tpsbFailoverRatio' +-- +-- * 'tpsbRegion' +-- +-- * 'tpsbOauthToken' +-- +-- * 'tpsbFields' +-- +-- * 'tpsbAlt' +targetPoolsSetBackup + :: Text -- ^ 'project' + -> Text -- ^ 'targetPool' + -> Text -- ^ 'region' + -> TargetPoolsSetBackup +targetPoolsSetBackup pTpsbProject_ pTpsbTargetPool_ pTpsbRegion_ = + TargetPoolsSetBackup + { _tpsbQuotaUser = Nothing + , _tpsbPrettyPrint = True + , _tpsbProject = pTpsbProject_ + , _tpsbTargetPool = pTpsbTargetPool_ + , _tpsbUserIp = Nothing + , _tpsbKey = Nothing + , _tpsbFailoverRatio = Nothing + , _tpsbRegion = pTpsbRegion_ + , _tpsbOauthToken = Nothing + , _tpsbFields = Nothing + , _tpsbAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpsbQuotaUser :: Lens' TargetPoolsSetBackup' (Maybe Text) +tpsbQuotaUser + = lens _tpsbQuotaUser + (\ s a -> s{_tpsbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpsbPrettyPrint :: Lens' TargetPoolsSetBackup' Bool +tpsbPrettyPrint + = lens _tpsbPrettyPrint + (\ s a -> s{_tpsbPrettyPrint = a}) + +-- | Name of the project scoping this request. +tpsbProject :: Lens' TargetPoolsSetBackup' Text +tpsbProject + = lens _tpsbProject (\ s a -> s{_tpsbProject = a}) + +-- | Name of the TargetPool resource for which the backup is to be set. +tpsbTargetPool :: Lens' TargetPoolsSetBackup' Text +tpsbTargetPool + = lens _tpsbTargetPool + (\ s a -> s{_tpsbTargetPool = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpsbUserIp :: Lens' TargetPoolsSetBackup' (Maybe Text) +tpsbUserIp + = lens _tpsbUserIp (\ s a -> s{_tpsbUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpsbKey :: Lens' TargetPoolsSetBackup' (Maybe Text) +tpsbKey = lens _tpsbKey (\ s a -> s{_tpsbKey = a}) + +-- | New failoverRatio value for the containing target pool. +tpsbFailoverRatio :: Lens' TargetPoolsSetBackup' (Maybe Float) +tpsbFailoverRatio + = lens _tpsbFailoverRatio + (\ s a -> s{_tpsbFailoverRatio = a}) + +-- | Name of the region scoping this request. +tpsbRegion :: Lens' TargetPoolsSetBackup' Text +tpsbRegion + = lens _tpsbRegion (\ s a -> s{_tpsbRegion = a}) + +-- | OAuth 2.0 token for the current user. +tpsbOauthToken :: Lens' TargetPoolsSetBackup' (Maybe Text) +tpsbOauthToken + = lens _tpsbOauthToken + (\ s a -> s{_tpsbOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpsbFields :: Lens' TargetPoolsSetBackup' (Maybe Text) +tpsbFields + = lens _tpsbFields (\ s a -> s{_tpsbFields = a}) + +-- | Data format for the response. +tpsbAlt :: Lens' TargetPoolsSetBackup' Text +tpsbAlt = lens _tpsbAlt (\ s a -> s{_tpsbAlt = a}) + +instance GoogleRequest TargetPoolsSetBackup' where + type Rs TargetPoolsSetBackup' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetPoolsSetBackup{..} + = go _tpsbQuotaUser _tpsbPrettyPrint _tpsbProject + _tpsbTargetPool + _tpsbUserIp + _tpsbKey + _tpsbFailoverRatio + _tpsbRegion + _tpsbOauthToken + _tpsbFields + _tpsbAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetPoolsSetBackupAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/AggregatedList.hs new file mode 100644 index 000000000..5b9e7d3c8 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/AggregatedList.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetVPNGateways.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of target VPN gateways grouped by scope. +-- +-- /See:/ for @ComputeTargetVPNGatewaysAggregatedList@. +module Compute.TargetVPNGateways.AggregatedList + ( + -- * REST Resource + TargetVPNGatewaysAggregatedListAPI + + -- * Creating a Request + , targetVPNGatewaysAggregatedList + , TargetVPNGatewaysAggregatedList + + -- * Request Lenses + , tvgalQuotaUser + , tvgalPrettyPrint + , tvgalProject + , tvgalUserIp + , tvgalKey + , tvgalFilter + , tvgalPageToken + , tvgalOauthToken + , tvgalMaxResults + , tvgalFields + , tvgalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetVPNGatewaysAggregatedList@ which the +-- 'TargetVPNGatewaysAggregatedList' request conforms to. +type TargetVPNGatewaysAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "targetVpnGateways" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetVPNGatewayAggregatedList + +-- | Retrieves the list of target VPN gateways grouped by scope. +-- +-- /See:/ 'targetVPNGatewaysAggregatedList' smart constructor. +data TargetVPNGatewaysAggregatedList = TargetVPNGatewaysAggregatedList + { _tvgalQuotaUser :: !(Maybe Text) + , _tvgalPrettyPrint :: !Bool + , _tvgalProject :: !Text + , _tvgalUserIp :: !(Maybe Text) + , _tvgalKey :: !(Maybe Text) + , _tvgalFilter :: !(Maybe Text) + , _tvgalPageToken :: !(Maybe Text) + , _tvgalOauthToken :: !(Maybe Text) + , _tvgalMaxResults :: !Word32 + , _tvgalFields :: !(Maybe Text) + , _tvgalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgalQuotaUser' +-- +-- * 'tvgalPrettyPrint' +-- +-- * 'tvgalProject' +-- +-- * 'tvgalUserIp' +-- +-- * 'tvgalKey' +-- +-- * 'tvgalFilter' +-- +-- * 'tvgalPageToken' +-- +-- * 'tvgalOauthToken' +-- +-- * 'tvgalMaxResults' +-- +-- * 'tvgalFields' +-- +-- * 'tvgalAlt' +targetVPNGatewaysAggregatedList + :: Text -- ^ 'project' + -> TargetVPNGatewaysAggregatedList +targetVPNGatewaysAggregatedList pTvgalProject_ = + TargetVPNGatewaysAggregatedList + { _tvgalQuotaUser = Nothing + , _tvgalPrettyPrint = True + , _tvgalProject = pTvgalProject_ + , _tvgalUserIp = Nothing + , _tvgalKey = Nothing + , _tvgalFilter = Nothing + , _tvgalPageToken = Nothing + , _tvgalOauthToken = Nothing + , _tvgalMaxResults = 500 + , _tvgalFields = Nothing + , _tvgalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tvgalQuotaUser :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalQuotaUser + = lens _tvgalQuotaUser + (\ s a -> s{_tvgalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tvgalPrettyPrint :: Lens' TargetVPNGatewaysAggregatedList' Bool +tvgalPrettyPrint + = lens _tvgalPrettyPrint + (\ s a -> s{_tvgalPrettyPrint = a}) + +-- | Project ID for this request. +tvgalProject :: Lens' TargetVPNGatewaysAggregatedList' Text +tvgalProject + = lens _tvgalProject (\ s a -> s{_tvgalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tvgalUserIp :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalUserIp + = lens _tvgalUserIp (\ s a -> s{_tvgalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tvgalKey :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalKey = lens _tvgalKey (\ s a -> s{_tvgalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tvgalFilter :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalFilter + = lens _tvgalFilter (\ s a -> s{_tvgalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tvgalPageToken :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalPageToken + = lens _tvgalPageToken + (\ s a -> s{_tvgalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tvgalOauthToken :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalOauthToken + = lens _tvgalOauthToken + (\ s a -> s{_tvgalOauthToken = a}) + +-- | Maximum count of results to be returned. +tvgalMaxResults :: Lens' TargetVPNGatewaysAggregatedList' Word32 +tvgalMaxResults + = lens _tvgalMaxResults + (\ s a -> s{_tvgalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tvgalFields :: Lens' TargetVPNGatewaysAggregatedList' (Maybe Text) +tvgalFields + = lens _tvgalFields (\ s a -> s{_tvgalFields = a}) + +-- | Data format for the response. +tvgalAlt :: Lens' TargetVPNGatewaysAggregatedList' Text +tvgalAlt = lens _tvgalAlt (\ s a -> s{_tvgalAlt = a}) + +instance GoogleRequest + TargetVPNGatewaysAggregatedList' where + type Rs TargetVPNGatewaysAggregatedList' = + TargetVPNGatewayAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u + TargetVPNGatewaysAggregatedList{..} + = go _tvgalQuotaUser _tvgalPrettyPrint _tvgalProject + _tvgalUserIp + _tvgalKey + _tvgalFilter + _tvgalPageToken + _tvgalOauthToken + (Just _tvgalMaxResults) + _tvgalFields + _tvgalAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetVPNGatewaysAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Delete.hs new file mode 100644 index 000000000..a153e7f28 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Delete.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetVPNGateways.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified TargetVpnGateway resource. +-- +-- /See:/ for @ComputeTargetVPNGatewaysDelete@. +module Compute.TargetVPNGateways.Delete + ( + -- * REST Resource + TargetVPNGatewaysDeleteAPI + + -- * Creating a Request + , targetVPNGatewaysDelete + , TargetVPNGatewaysDelete + + -- * Request Lenses + , tvgdQuotaUser + , tvgdPrettyPrint + , tvgdProject + , tvgdUserIp + , tvgdTargetVpnGateway + , tvgdKey + , tvgdRegion + , tvgdOauthToken + , tvgdFields + , tvgdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetVPNGatewaysDelete@ which the +-- 'TargetVPNGatewaysDelete' request conforms to. +type TargetVPNGatewaysDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetVpnGateways" :> + Capture "targetVpnGateway" Text :> + Delete '[JSON] Operation + +-- | Deletes the specified TargetVpnGateway resource. +-- +-- /See:/ 'targetVPNGatewaysDelete' smart constructor. +data TargetVPNGatewaysDelete = TargetVPNGatewaysDelete + { _tvgdQuotaUser :: !(Maybe Text) + , _tvgdPrettyPrint :: !Bool + , _tvgdProject :: !Text + , _tvgdUserIp :: !(Maybe Text) + , _tvgdTargetVpnGateway :: !Text + , _tvgdKey :: !(Maybe Text) + , _tvgdRegion :: !Text + , _tvgdOauthToken :: !(Maybe Text) + , _tvgdFields :: !(Maybe Text) + , _tvgdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgdQuotaUser' +-- +-- * 'tvgdPrettyPrint' +-- +-- * 'tvgdProject' +-- +-- * 'tvgdUserIp' +-- +-- * 'tvgdTargetVpnGateway' +-- +-- * 'tvgdKey' +-- +-- * 'tvgdRegion' +-- +-- * 'tvgdOauthToken' +-- +-- * 'tvgdFields' +-- +-- * 'tvgdAlt' +targetVPNGatewaysDelete + :: Text -- ^ 'project' + -> Text -- ^ 'targetVpnGateway' + -> Text -- ^ 'region' + -> TargetVPNGatewaysDelete +targetVPNGatewaysDelete pTvgdProject_ pTvgdTargetVpnGateway_ pTvgdRegion_ = + TargetVPNGatewaysDelete + { _tvgdQuotaUser = Nothing + , _tvgdPrettyPrint = True + , _tvgdProject = pTvgdProject_ + , _tvgdUserIp = Nothing + , _tvgdTargetVpnGateway = pTvgdTargetVpnGateway_ + , _tvgdKey = Nothing + , _tvgdRegion = pTvgdRegion_ + , _tvgdOauthToken = Nothing + , _tvgdFields = Nothing + , _tvgdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tvgdQuotaUser :: Lens' TargetVPNGatewaysDelete' (Maybe Text) +tvgdQuotaUser + = lens _tvgdQuotaUser + (\ s a -> s{_tvgdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tvgdPrettyPrint :: Lens' TargetVPNGatewaysDelete' Bool +tvgdPrettyPrint + = lens _tvgdPrettyPrint + (\ s a -> s{_tvgdPrettyPrint = a}) + +-- | Project ID for this request. +tvgdProject :: Lens' TargetVPNGatewaysDelete' Text +tvgdProject + = lens _tvgdProject (\ s a -> s{_tvgdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tvgdUserIp :: Lens' TargetVPNGatewaysDelete' (Maybe Text) +tvgdUserIp + = lens _tvgdUserIp (\ s a -> s{_tvgdUserIp = a}) + +-- | Name of the TargetVpnGateway resource to delete. +tvgdTargetVpnGateway :: Lens' TargetVPNGatewaysDelete' Text +tvgdTargetVpnGateway + = lens _tvgdTargetVpnGateway + (\ s a -> s{_tvgdTargetVpnGateway = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tvgdKey :: Lens' TargetVPNGatewaysDelete' (Maybe Text) +tvgdKey = lens _tvgdKey (\ s a -> s{_tvgdKey = a}) + +-- | The name of the region for this request. +tvgdRegion :: Lens' TargetVPNGatewaysDelete' Text +tvgdRegion + = lens _tvgdRegion (\ s a -> s{_tvgdRegion = a}) + +-- | OAuth 2.0 token for the current user. +tvgdOauthToken :: Lens' TargetVPNGatewaysDelete' (Maybe Text) +tvgdOauthToken + = lens _tvgdOauthToken + (\ s a -> s{_tvgdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tvgdFields :: Lens' TargetVPNGatewaysDelete' (Maybe Text) +tvgdFields + = lens _tvgdFields (\ s a -> s{_tvgdFields = a}) + +-- | Data format for the response. +tvgdAlt :: Lens' TargetVPNGatewaysDelete' Text +tvgdAlt = lens _tvgdAlt (\ s a -> s{_tvgdAlt = a}) + +instance GoogleRequest TargetVPNGatewaysDelete' where + type Rs TargetVPNGatewaysDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetVPNGatewaysDelete{..} + = go _tvgdQuotaUser _tvgdPrettyPrint _tvgdProject + _tvgdUserIp + _tvgdTargetVpnGateway + _tvgdKey + _tvgdRegion + _tvgdOauthToken + _tvgdFields + _tvgdAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetVPNGatewaysDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Get.hs new file mode 100644 index 000000000..8ba20747c --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetVPNGateways.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified TargetVpnGateway resource. +-- +-- /See:/ for @ComputeTargetVPNGatewaysGet@. +module Compute.TargetVPNGateways.Get + ( + -- * REST Resource + TargetVPNGatewaysGetAPI + + -- * Creating a Request + , targetVPNGatewaysGet + , TargetVPNGatewaysGet + + -- * Request Lenses + , tvggQuotaUser + , tvggPrettyPrint + , tvggProject + , tvggUserIp + , tvggTargetVpnGateway + , tvggKey + , tvggRegion + , tvggOauthToken + , tvggFields + , tvggAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetVPNGatewaysGet@ which the +-- 'TargetVPNGatewaysGet' request conforms to. +type TargetVPNGatewaysGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetVpnGateways" :> + Capture "targetVpnGateway" Text :> + Get '[JSON] TargetVPNGateway + +-- | Returns the specified TargetVpnGateway resource. +-- +-- /See:/ 'targetVPNGatewaysGet' smart constructor. +data TargetVPNGatewaysGet = TargetVPNGatewaysGet + { _tvggQuotaUser :: !(Maybe Text) + , _tvggPrettyPrint :: !Bool + , _tvggProject :: !Text + , _tvggUserIp :: !(Maybe Text) + , _tvggTargetVpnGateway :: !Text + , _tvggKey :: !(Maybe Text) + , _tvggRegion :: !Text + , _tvggOauthToken :: !(Maybe Text) + , _tvggFields :: !(Maybe Text) + , _tvggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvggQuotaUser' +-- +-- * 'tvggPrettyPrint' +-- +-- * 'tvggProject' +-- +-- * 'tvggUserIp' +-- +-- * 'tvggTargetVpnGateway' +-- +-- * 'tvggKey' +-- +-- * 'tvggRegion' +-- +-- * 'tvggOauthToken' +-- +-- * 'tvggFields' +-- +-- * 'tvggAlt' +targetVPNGatewaysGet + :: Text -- ^ 'project' + -> Text -- ^ 'targetVpnGateway' + -> Text -- ^ 'region' + -> TargetVPNGatewaysGet +targetVPNGatewaysGet pTvggProject_ pTvggTargetVpnGateway_ pTvggRegion_ = + TargetVPNGatewaysGet + { _tvggQuotaUser = Nothing + , _tvggPrettyPrint = True + , _tvggProject = pTvggProject_ + , _tvggUserIp = Nothing + , _tvggTargetVpnGateway = pTvggTargetVpnGateway_ + , _tvggKey = Nothing + , _tvggRegion = pTvggRegion_ + , _tvggOauthToken = Nothing + , _tvggFields = Nothing + , _tvggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tvggQuotaUser :: Lens' TargetVPNGatewaysGet' (Maybe Text) +tvggQuotaUser + = lens _tvggQuotaUser + (\ s a -> s{_tvggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tvggPrettyPrint :: Lens' TargetVPNGatewaysGet' Bool +tvggPrettyPrint + = lens _tvggPrettyPrint + (\ s a -> s{_tvggPrettyPrint = a}) + +-- | Project ID for this request. +tvggProject :: Lens' TargetVPNGatewaysGet' Text +tvggProject + = lens _tvggProject (\ s a -> s{_tvggProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tvggUserIp :: Lens' TargetVPNGatewaysGet' (Maybe Text) +tvggUserIp + = lens _tvggUserIp (\ s a -> s{_tvggUserIp = a}) + +-- | Name of the TargetVpnGateway resource to return. +tvggTargetVpnGateway :: Lens' TargetVPNGatewaysGet' Text +tvggTargetVpnGateway + = lens _tvggTargetVpnGateway + (\ s a -> s{_tvggTargetVpnGateway = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tvggKey :: Lens' TargetVPNGatewaysGet' (Maybe Text) +tvggKey = lens _tvggKey (\ s a -> s{_tvggKey = a}) + +-- | The name of the region for this request. +tvggRegion :: Lens' TargetVPNGatewaysGet' Text +tvggRegion + = lens _tvggRegion (\ s a -> s{_tvggRegion = a}) + +-- | OAuth 2.0 token for the current user. +tvggOauthToken :: Lens' TargetVPNGatewaysGet' (Maybe Text) +tvggOauthToken + = lens _tvggOauthToken + (\ s a -> s{_tvggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tvggFields :: Lens' TargetVPNGatewaysGet' (Maybe Text) +tvggFields + = lens _tvggFields (\ s a -> s{_tvggFields = a}) + +-- | Data format for the response. +tvggAlt :: Lens' TargetVPNGatewaysGet' Text +tvggAlt = lens _tvggAlt (\ s a -> s{_tvggAlt = a}) + +instance GoogleRequest TargetVPNGatewaysGet' where + type Rs TargetVPNGatewaysGet' = TargetVPNGateway + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetVPNGatewaysGet{..} + = go _tvggQuotaUser _tvggPrettyPrint _tvggProject + _tvggUserIp + _tvggTargetVpnGateway + _tvggKey + _tvggRegion + _tvggOauthToken + _tvggFields + _tvggAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetVPNGatewaysGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Insert.hs new file mode 100644 index 000000000..852d7bb91 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Insert.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetVPNGateways.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a TargetVpnGateway resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ for @ComputeTargetVPNGatewaysInsert@. +module Compute.TargetVPNGateways.Insert + ( + -- * REST Resource + TargetVPNGatewaysInsertAPI + + -- * Creating a Request + , targetVPNGatewaysInsert + , TargetVPNGatewaysInsert + + -- * Request Lenses + , tvgiQuotaUser + , tvgiPrettyPrint + , tvgiProject + , tvgiUserIp + , tvgiKey + , tvgiRegion + , tvgiOauthToken + , tvgiFields + , tvgiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetVPNGatewaysInsert@ which the +-- 'TargetVPNGatewaysInsert' request conforms to. +type TargetVPNGatewaysInsertAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetVpnGateways" :> Post '[JSON] Operation + +-- | Creates a TargetVpnGateway resource in the specified project and region +-- using the data included in the request. +-- +-- /See:/ 'targetVPNGatewaysInsert' smart constructor. +data TargetVPNGatewaysInsert = TargetVPNGatewaysInsert + { _tvgiQuotaUser :: !(Maybe Text) + , _tvgiPrettyPrint :: !Bool + , _tvgiProject :: !Text + , _tvgiUserIp :: !(Maybe Text) + , _tvgiKey :: !(Maybe Text) + , _tvgiRegion :: !Text + , _tvgiOauthToken :: !(Maybe Text) + , _tvgiFields :: !(Maybe Text) + , _tvgiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvgiQuotaUser' +-- +-- * 'tvgiPrettyPrint' +-- +-- * 'tvgiProject' +-- +-- * 'tvgiUserIp' +-- +-- * 'tvgiKey' +-- +-- * 'tvgiRegion' +-- +-- * 'tvgiOauthToken' +-- +-- * 'tvgiFields' +-- +-- * 'tvgiAlt' +targetVPNGatewaysInsert + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> TargetVPNGatewaysInsert +targetVPNGatewaysInsert pTvgiProject_ pTvgiRegion_ = + TargetVPNGatewaysInsert + { _tvgiQuotaUser = Nothing + , _tvgiPrettyPrint = True + , _tvgiProject = pTvgiProject_ + , _tvgiUserIp = Nothing + , _tvgiKey = Nothing + , _tvgiRegion = pTvgiRegion_ + , _tvgiOauthToken = Nothing + , _tvgiFields = Nothing + , _tvgiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tvgiQuotaUser :: Lens' TargetVPNGatewaysInsert' (Maybe Text) +tvgiQuotaUser + = lens _tvgiQuotaUser + (\ s a -> s{_tvgiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tvgiPrettyPrint :: Lens' TargetVPNGatewaysInsert' Bool +tvgiPrettyPrint + = lens _tvgiPrettyPrint + (\ s a -> s{_tvgiPrettyPrint = a}) + +-- | Project ID for this request. +tvgiProject :: Lens' TargetVPNGatewaysInsert' Text +tvgiProject + = lens _tvgiProject (\ s a -> s{_tvgiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tvgiUserIp :: Lens' TargetVPNGatewaysInsert' (Maybe Text) +tvgiUserIp + = lens _tvgiUserIp (\ s a -> s{_tvgiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tvgiKey :: Lens' TargetVPNGatewaysInsert' (Maybe Text) +tvgiKey = lens _tvgiKey (\ s a -> s{_tvgiKey = a}) + +-- | The name of the region for this request. +tvgiRegion :: Lens' TargetVPNGatewaysInsert' Text +tvgiRegion + = lens _tvgiRegion (\ s a -> s{_tvgiRegion = a}) + +-- | OAuth 2.0 token for the current user. +tvgiOauthToken :: Lens' TargetVPNGatewaysInsert' (Maybe Text) +tvgiOauthToken + = lens _tvgiOauthToken + (\ s a -> s{_tvgiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tvgiFields :: Lens' TargetVPNGatewaysInsert' (Maybe Text) +tvgiFields + = lens _tvgiFields (\ s a -> s{_tvgiFields = a}) + +-- | Data format for the response. +tvgiAlt :: Lens' TargetVPNGatewaysInsert' Text +tvgiAlt = lens _tvgiAlt (\ s a -> s{_tvgiAlt = a}) + +instance GoogleRequest TargetVPNGatewaysInsert' where + type Rs TargetVPNGatewaysInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetVPNGatewaysInsert{..} + = go _tvgiQuotaUser _tvgiPrettyPrint _tvgiProject + _tvgiUserIp + _tvgiKey + _tvgiRegion + _tvgiOauthToken + _tvgiFields + _tvgiAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetVPNGatewaysInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/List.hs new file mode 100644 index 000000000..46e2d2751 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/List.hs @@ -0,0 +1,226 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.TargetVPNGateways.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of TargetVpnGateway resources available to the +-- specified project and region. +-- +-- /See:/ for @ComputeTargetVPNGatewaysList@. +module Compute.TargetVPNGateways.List + ( + -- * REST Resource + TargetVPNGatewaysListAPI + + -- * Creating a Request + , targetVPNGatewaysList + , TargetVPNGatewaysList + + -- * Request Lenses + , tvglQuotaUser + , tvglPrettyPrint + , tvglProject + , tvglUserIp + , tvglKey + , tvglFilter + , tvglRegion + , tvglPageToken + , tvglOauthToken + , tvglMaxResults + , tvglFields + , tvglAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeTargetVPNGatewaysList@ which the +-- 'TargetVPNGatewaysList' request conforms to. +type TargetVPNGatewaysListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "targetVpnGateways" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TargetVPNGatewayList + +-- | Retrieves the list of TargetVpnGateway resources available to the +-- specified project and region. +-- +-- /See:/ 'targetVPNGatewaysList' smart constructor. +data TargetVPNGatewaysList = TargetVPNGatewaysList + { _tvglQuotaUser :: !(Maybe Text) + , _tvglPrettyPrint :: !Bool + , _tvglProject :: !Text + , _tvglUserIp :: !(Maybe Text) + , _tvglKey :: !(Maybe Text) + , _tvglFilter :: !(Maybe Text) + , _tvglRegion :: !Text + , _tvglPageToken :: !(Maybe Text) + , _tvglOauthToken :: !(Maybe Text) + , _tvglMaxResults :: !Word32 + , _tvglFields :: !(Maybe Text) + , _tvglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetVPNGatewaysList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tvglQuotaUser' +-- +-- * 'tvglPrettyPrint' +-- +-- * 'tvglProject' +-- +-- * 'tvglUserIp' +-- +-- * 'tvglKey' +-- +-- * 'tvglFilter' +-- +-- * 'tvglRegion' +-- +-- * 'tvglPageToken' +-- +-- * 'tvglOauthToken' +-- +-- * 'tvglMaxResults' +-- +-- * 'tvglFields' +-- +-- * 'tvglAlt' +targetVPNGatewaysList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> TargetVPNGatewaysList +targetVPNGatewaysList pTvglProject_ pTvglRegion_ = + TargetVPNGatewaysList + { _tvglQuotaUser = Nothing + , _tvglPrettyPrint = True + , _tvglProject = pTvglProject_ + , _tvglUserIp = Nothing + , _tvglKey = Nothing + , _tvglFilter = Nothing + , _tvglRegion = pTvglRegion_ + , _tvglPageToken = Nothing + , _tvglOauthToken = Nothing + , _tvglMaxResults = 500 + , _tvglFields = Nothing + , _tvglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tvglQuotaUser :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglQuotaUser + = lens _tvglQuotaUser + (\ s a -> s{_tvglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tvglPrettyPrint :: Lens' TargetVPNGatewaysList' Bool +tvglPrettyPrint + = lens _tvglPrettyPrint + (\ s a -> s{_tvglPrettyPrint = a}) + +-- | Project ID for this request. +tvglProject :: Lens' TargetVPNGatewaysList' Text +tvglProject + = lens _tvglProject (\ s a -> s{_tvglProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tvglUserIp :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglUserIp + = lens _tvglUserIp (\ s a -> s{_tvglUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tvglKey :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglKey = lens _tvglKey (\ s a -> s{_tvglKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tvglFilter :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglFilter + = lens _tvglFilter (\ s a -> s{_tvglFilter = a}) + +-- | The name of the region for this request. +tvglRegion :: Lens' TargetVPNGatewaysList' Text +tvglRegion + = lens _tvglRegion (\ s a -> s{_tvglRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tvglPageToken :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglPageToken + = lens _tvglPageToken + (\ s a -> s{_tvglPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tvglOauthToken :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglOauthToken + = lens _tvglOauthToken + (\ s a -> s{_tvglOauthToken = a}) + +-- | Maximum count of results to be returned. +tvglMaxResults :: Lens' TargetVPNGatewaysList' Word32 +tvglMaxResults + = lens _tvglMaxResults + (\ s a -> s{_tvglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tvglFields :: Lens' TargetVPNGatewaysList' (Maybe Text) +tvglFields + = lens _tvglFields (\ s a -> s{_tvglFields = a}) + +-- | Data format for the response. +tvglAlt :: Lens' TargetVPNGatewaysList' Text +tvglAlt = lens _tvglAlt (\ s a -> s{_tvglAlt = a}) + +instance GoogleRequest TargetVPNGatewaysList' where + type Rs TargetVPNGatewaysList' = TargetVPNGatewayList + request = requestWithRoute defReq computeURL + requestWithRoute r u TargetVPNGatewaysList{..} + = go _tvglQuotaUser _tvglPrettyPrint _tvglProject + _tvglUserIp + _tvglKey + _tvglFilter + _tvglRegion + _tvglPageToken + _tvglOauthToken + (Just _tvglMaxResults) + _tvglFields + _tvglAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetVPNGatewaysListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Delete.hs new file mode 100644 index 000000000..81c613df1 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Delete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified UrlMap resource. +-- +-- /See:/ for @ComputeURLMapsDelete@. +module Compute.URLMaps.Delete + ( + -- * REST Resource + UrlMapsDeleteAPI + + -- * Creating a Request + , uRLMapsDelete + , URLMapsDelete + + -- * Request Lenses + , umdQuotaUser + , umdUrlMap + , umdPrettyPrint + , umdProject + , umdUserIp + , umdKey + , umdOauthToken + , umdFields + , umdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsDelete@ which the +-- 'URLMapsDelete' request conforms to. +type UrlMapsDeleteAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + Capture "urlMap" Text :> Delete '[JSON] Operation + +-- | Deletes the specified UrlMap resource. +-- +-- /See:/ 'uRLMapsDelete' smart constructor. +data URLMapsDelete = URLMapsDelete + { _umdQuotaUser :: !(Maybe Text) + , _umdUrlMap :: !Text + , _umdPrettyPrint :: !Bool + , _umdProject :: !Text + , _umdUserIp :: !(Maybe Text) + , _umdKey :: !(Maybe Text) + , _umdOauthToken :: !(Maybe Text) + , _umdFields :: !(Maybe Text) + , _umdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umdQuotaUser' +-- +-- * 'umdUrlMap' +-- +-- * 'umdPrettyPrint' +-- +-- * 'umdProject' +-- +-- * 'umdUserIp' +-- +-- * 'umdKey' +-- +-- * 'umdOauthToken' +-- +-- * 'umdFields' +-- +-- * 'umdAlt' +uRLMapsDelete + :: Text -- ^ 'urlMap' + -> Text -- ^ 'project' + -> URLMapsDelete +uRLMapsDelete pUmdUrlMap_ pUmdProject_ = + URLMapsDelete + { _umdQuotaUser = Nothing + , _umdUrlMap = pUmdUrlMap_ + , _umdPrettyPrint = True + , _umdProject = pUmdProject_ + , _umdUserIp = Nothing + , _umdKey = Nothing + , _umdOauthToken = Nothing + , _umdFields = Nothing + , _umdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umdQuotaUser :: Lens' URLMapsDelete' (Maybe Text) +umdQuotaUser + = lens _umdQuotaUser (\ s a -> s{_umdQuotaUser = a}) + +-- | Name of the UrlMap resource to delete. +umdUrlMap :: Lens' URLMapsDelete' Text +umdUrlMap + = lens _umdUrlMap (\ s a -> s{_umdUrlMap = a}) + +-- | Returns response with indentations and line breaks. +umdPrettyPrint :: Lens' URLMapsDelete' Bool +umdPrettyPrint + = lens _umdPrettyPrint + (\ s a -> s{_umdPrettyPrint = a}) + +-- | Name of the project scoping this request. +umdProject :: Lens' URLMapsDelete' Text +umdProject + = lens _umdProject (\ s a -> s{_umdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umdUserIp :: Lens' URLMapsDelete' (Maybe Text) +umdUserIp + = lens _umdUserIp (\ s a -> s{_umdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umdKey :: Lens' URLMapsDelete' (Maybe Text) +umdKey = lens _umdKey (\ s a -> s{_umdKey = a}) + +-- | OAuth 2.0 token for the current user. +umdOauthToken :: Lens' URLMapsDelete' (Maybe Text) +umdOauthToken + = lens _umdOauthToken + (\ s a -> s{_umdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umdFields :: Lens' URLMapsDelete' (Maybe Text) +umdFields + = lens _umdFields (\ s a -> s{_umdFields = a}) + +-- | Data format for the response. +umdAlt :: Lens' URLMapsDelete' Text +umdAlt = lens _umdAlt (\ s a -> s{_umdAlt = a}) + +instance GoogleRequest URLMapsDelete' where + type Rs URLMapsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsDelete{..} + = go _umdQuotaUser _umdUrlMap _umdPrettyPrint + _umdProject + _umdUserIp + _umdKey + _umdOauthToken + _umdFields + _umdAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsDeleteAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Get.hs new file mode 100644 index 000000000..7bd6b1145 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified UrlMap resource. +-- +-- /See:/ for @ComputeURLMapsGet@. +module Compute.URLMaps.Get + ( + -- * REST Resource + UrlMapsGetAPI + + -- * Creating a Request + , uRLMapsGet + , URLMapsGet + + -- * Request Lenses + , umgQuotaUser + , umgUrlMap + , umgPrettyPrint + , umgProject + , umgUserIp + , umgKey + , umgOauthToken + , umgFields + , umgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsGet@ which the +-- 'URLMapsGet' request conforms to. +type UrlMapsGetAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + Capture "urlMap" Text :> Get '[JSON] URLMap + +-- | Returns the specified UrlMap resource. +-- +-- /See:/ 'uRLMapsGet' smart constructor. +data URLMapsGet = URLMapsGet + { _umgQuotaUser :: !(Maybe Text) + , _umgUrlMap :: !Text + , _umgPrettyPrint :: !Bool + , _umgProject :: !Text + , _umgUserIp :: !(Maybe Text) + , _umgKey :: !(Maybe Text) + , _umgOauthToken :: !(Maybe Text) + , _umgFields :: !(Maybe Text) + , _umgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umgQuotaUser' +-- +-- * 'umgUrlMap' +-- +-- * 'umgPrettyPrint' +-- +-- * 'umgProject' +-- +-- * 'umgUserIp' +-- +-- * 'umgKey' +-- +-- * 'umgOauthToken' +-- +-- * 'umgFields' +-- +-- * 'umgAlt' +uRLMapsGet + :: Text -- ^ 'urlMap' + -> Text -- ^ 'project' + -> URLMapsGet +uRLMapsGet pUmgUrlMap_ pUmgProject_ = + URLMapsGet + { _umgQuotaUser = Nothing + , _umgUrlMap = pUmgUrlMap_ + , _umgPrettyPrint = True + , _umgProject = pUmgProject_ + , _umgUserIp = Nothing + , _umgKey = Nothing + , _umgOauthToken = Nothing + , _umgFields = Nothing + , _umgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umgQuotaUser :: Lens' URLMapsGet' (Maybe Text) +umgQuotaUser + = lens _umgQuotaUser (\ s a -> s{_umgQuotaUser = a}) + +-- | Name of the UrlMap resource to return. +umgUrlMap :: Lens' URLMapsGet' Text +umgUrlMap + = lens _umgUrlMap (\ s a -> s{_umgUrlMap = a}) + +-- | Returns response with indentations and line breaks. +umgPrettyPrint :: Lens' URLMapsGet' Bool +umgPrettyPrint + = lens _umgPrettyPrint + (\ s a -> s{_umgPrettyPrint = a}) + +-- | Name of the project scoping this request. +umgProject :: Lens' URLMapsGet' Text +umgProject + = lens _umgProject (\ s a -> s{_umgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umgUserIp :: Lens' URLMapsGet' (Maybe Text) +umgUserIp + = lens _umgUserIp (\ s a -> s{_umgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umgKey :: Lens' URLMapsGet' (Maybe Text) +umgKey = lens _umgKey (\ s a -> s{_umgKey = a}) + +-- | OAuth 2.0 token for the current user. +umgOauthToken :: Lens' URLMapsGet' (Maybe Text) +umgOauthToken + = lens _umgOauthToken + (\ s a -> s{_umgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umgFields :: Lens' URLMapsGet' (Maybe Text) +umgFields + = lens _umgFields (\ s a -> s{_umgFields = a}) + +-- | Data format for the response. +umgAlt :: Lens' URLMapsGet' Text +umgAlt = lens _umgAlt (\ s a -> s{_umgAlt = a}) + +instance GoogleRequest URLMapsGet' where + type Rs URLMapsGet' = URLMap + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsGet{..} + = go _umgQuotaUser _umgUrlMap _umgPrettyPrint + _umgProject + _umgUserIp + _umgKey + _umgOauthToken + _umgFields + _umgAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Insert.hs new file mode 100644 index 000000000..0821aec37 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a UrlMap resource in the specified project using the data +-- included in the request. +-- +-- /See:/ for @ComputeURLMapsInsert@. +module Compute.URLMaps.Insert + ( + -- * REST Resource + UrlMapsInsertAPI + + -- * Creating a Request + , uRLMapsInsert + , URLMapsInsert + + -- * Request Lenses + , umiQuotaUser + , umiPrettyPrint + , umiProject + , umiUserIp + , umiKey + , umiOauthToken + , umiFields + , umiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsInsert@ which the +-- 'URLMapsInsert' request conforms to. +type UrlMapsInsertAPI = + Capture "project" Text :> + "global" :> "urlMaps" :> Post '[JSON] Operation + +-- | Creates a UrlMap resource in the specified project using the data +-- included in the request. +-- +-- /See:/ 'uRLMapsInsert' smart constructor. +data URLMapsInsert = URLMapsInsert + { _umiQuotaUser :: !(Maybe Text) + , _umiPrettyPrint :: !Bool + , _umiProject :: !Text + , _umiUserIp :: !(Maybe Text) + , _umiKey :: !(Maybe Text) + , _umiOauthToken :: !(Maybe Text) + , _umiFields :: !(Maybe Text) + , _umiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umiQuotaUser' +-- +-- * 'umiPrettyPrint' +-- +-- * 'umiProject' +-- +-- * 'umiUserIp' +-- +-- * 'umiKey' +-- +-- * 'umiOauthToken' +-- +-- * 'umiFields' +-- +-- * 'umiAlt' +uRLMapsInsert + :: Text -- ^ 'project' + -> URLMapsInsert +uRLMapsInsert pUmiProject_ = + URLMapsInsert + { _umiQuotaUser = Nothing + , _umiPrettyPrint = True + , _umiProject = pUmiProject_ + , _umiUserIp = Nothing + , _umiKey = Nothing + , _umiOauthToken = Nothing + , _umiFields = Nothing + , _umiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umiQuotaUser :: Lens' URLMapsInsert' (Maybe Text) +umiQuotaUser + = lens _umiQuotaUser (\ s a -> s{_umiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umiPrettyPrint :: Lens' URLMapsInsert' Bool +umiPrettyPrint + = lens _umiPrettyPrint + (\ s a -> s{_umiPrettyPrint = a}) + +-- | Name of the project scoping this request. +umiProject :: Lens' URLMapsInsert' Text +umiProject + = lens _umiProject (\ s a -> s{_umiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umiUserIp :: Lens' URLMapsInsert' (Maybe Text) +umiUserIp + = lens _umiUserIp (\ s a -> s{_umiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umiKey :: Lens' URLMapsInsert' (Maybe Text) +umiKey = lens _umiKey (\ s a -> s{_umiKey = a}) + +-- | OAuth 2.0 token for the current user. +umiOauthToken :: Lens' URLMapsInsert' (Maybe Text) +umiOauthToken + = lens _umiOauthToken + (\ s a -> s{_umiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umiFields :: Lens' URLMapsInsert' (Maybe Text) +umiFields + = lens _umiFields (\ s a -> s{_umiFields = a}) + +-- | Data format for the response. +umiAlt :: Lens' URLMapsInsert' Text +umiAlt = lens _umiAlt (\ s a -> s{_umiAlt = a}) + +instance GoogleRequest URLMapsInsert' where + type Rs URLMapsInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsInsert{..} + = go _umiQuotaUser _umiPrettyPrint _umiProject + _umiUserIp + _umiKey + _umiOauthToken + _umiFields + _umiAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsInsertAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/List.hs new file mode 100644 index 000000000..cb15abb36 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/List.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of UrlMap resources available to the specified +-- project. +-- +-- /See:/ for @ComputeURLMapsList@. +module Compute.URLMaps.List + ( + -- * REST Resource + UrlMapsListAPI + + -- * Creating a Request + , uRLMapsList + , URLMapsList + + -- * Request Lenses + , umlQuotaUser + , umlPrettyPrint + , umlProject + , umlUserIp + , umlKey + , umlFilter + , umlPageToken + , umlOauthToken + , umlMaxResults + , umlFields + , umlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsList@ which the +-- 'URLMapsList' request conforms to. +type UrlMapsListAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] URLMapList + +-- | Retrieves the list of UrlMap resources available to the specified +-- project. +-- +-- /See:/ 'uRLMapsList' smart constructor. +data URLMapsList = URLMapsList + { _umlQuotaUser :: !(Maybe Text) + , _umlPrettyPrint :: !Bool + , _umlProject :: !Text + , _umlUserIp :: !(Maybe Text) + , _umlKey :: !(Maybe Text) + , _umlFilter :: !(Maybe Text) + , _umlPageToken :: !(Maybe Text) + , _umlOauthToken :: !(Maybe Text) + , _umlMaxResults :: !Word32 + , _umlFields :: !(Maybe Text) + , _umlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umlQuotaUser' +-- +-- * 'umlPrettyPrint' +-- +-- * 'umlProject' +-- +-- * 'umlUserIp' +-- +-- * 'umlKey' +-- +-- * 'umlFilter' +-- +-- * 'umlPageToken' +-- +-- * 'umlOauthToken' +-- +-- * 'umlMaxResults' +-- +-- * 'umlFields' +-- +-- * 'umlAlt' +uRLMapsList + :: Text -- ^ 'project' + -> URLMapsList +uRLMapsList pUmlProject_ = + URLMapsList + { _umlQuotaUser = Nothing + , _umlPrettyPrint = True + , _umlProject = pUmlProject_ + , _umlUserIp = Nothing + , _umlKey = Nothing + , _umlFilter = Nothing + , _umlPageToken = Nothing + , _umlOauthToken = Nothing + , _umlMaxResults = 500 + , _umlFields = Nothing + , _umlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umlQuotaUser :: Lens' URLMapsList' (Maybe Text) +umlQuotaUser + = lens _umlQuotaUser (\ s a -> s{_umlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umlPrettyPrint :: Lens' URLMapsList' Bool +umlPrettyPrint + = lens _umlPrettyPrint + (\ s a -> s{_umlPrettyPrint = a}) + +-- | Name of the project scoping this request. +umlProject :: Lens' URLMapsList' Text +umlProject + = lens _umlProject (\ s a -> s{_umlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umlUserIp :: Lens' URLMapsList' (Maybe Text) +umlUserIp + = lens _umlUserIp (\ s a -> s{_umlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umlKey :: Lens' URLMapsList' (Maybe Text) +umlKey = lens _umlKey (\ s a -> s{_umlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +umlFilter :: Lens' URLMapsList' (Maybe Text) +umlFilter + = lens _umlFilter (\ s a -> s{_umlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +umlPageToken :: Lens' URLMapsList' (Maybe Text) +umlPageToken + = lens _umlPageToken (\ s a -> s{_umlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +umlOauthToken :: Lens' URLMapsList' (Maybe Text) +umlOauthToken + = lens _umlOauthToken + (\ s a -> s{_umlOauthToken = a}) + +-- | Maximum count of results to be returned. +umlMaxResults :: Lens' URLMapsList' Word32 +umlMaxResults + = lens _umlMaxResults + (\ s a -> s{_umlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +umlFields :: Lens' URLMapsList' (Maybe Text) +umlFields + = lens _umlFields (\ s a -> s{_umlFields = a}) + +-- | Data format for the response. +umlAlt :: Lens' URLMapsList' Text +umlAlt = lens _umlAlt (\ s a -> s{_umlAlt = a}) + +instance GoogleRequest URLMapsList' where + type Rs URLMapsList' = URLMapList + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsList{..} + = go _umlQuotaUser _umlPrettyPrint _umlProject + _umlUserIp + _umlKey + _umlFilter + _umlPageToken + _umlOauthToken + (Just _umlMaxResults) + _umlFields + _umlAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsListAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Patch.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Patch.hs new file mode 100644 index 000000000..bb61366e7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Patch.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the UrlMap resource. This method supports +-- patch semantics. +-- +-- /See:/ for @ComputeURLMapsPatch@. +module Compute.URLMaps.Patch + ( + -- * REST Resource + UrlMapsPatchAPI + + -- * Creating a Request + , uRLMapsPatch + , URLMapsPatch + + -- * Request Lenses + , umpQuotaUser + , umpUrlMap + , umpPrettyPrint + , umpProject + , umpUserIp + , umpKey + , umpOauthToken + , umpFields + , umpAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsPatch@ which the +-- 'URLMapsPatch' request conforms to. +type UrlMapsPatchAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + Capture "urlMap" Text :> Patch '[JSON] Operation + +-- | Update the entire content of the UrlMap resource. This method supports +-- patch semantics. +-- +-- /See:/ 'uRLMapsPatch' smart constructor. +data URLMapsPatch = URLMapsPatch + { _umpQuotaUser :: !(Maybe Text) + , _umpUrlMap :: !Text + , _umpPrettyPrint :: !Bool + , _umpProject :: !Text + , _umpUserIp :: !(Maybe Text) + , _umpKey :: !(Maybe Text) + , _umpOauthToken :: !(Maybe Text) + , _umpFields :: !(Maybe Text) + , _umpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umpQuotaUser' +-- +-- * 'umpUrlMap' +-- +-- * 'umpPrettyPrint' +-- +-- * 'umpProject' +-- +-- * 'umpUserIp' +-- +-- * 'umpKey' +-- +-- * 'umpOauthToken' +-- +-- * 'umpFields' +-- +-- * 'umpAlt' +uRLMapsPatch + :: Text -- ^ 'urlMap' + -> Text -- ^ 'project' + -> URLMapsPatch +uRLMapsPatch pUmpUrlMap_ pUmpProject_ = + URLMapsPatch + { _umpQuotaUser = Nothing + , _umpUrlMap = pUmpUrlMap_ + , _umpPrettyPrint = True + , _umpProject = pUmpProject_ + , _umpUserIp = Nothing + , _umpKey = Nothing + , _umpOauthToken = Nothing + , _umpFields = Nothing + , _umpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umpQuotaUser :: Lens' URLMapsPatch' (Maybe Text) +umpQuotaUser + = lens _umpQuotaUser (\ s a -> s{_umpQuotaUser = a}) + +-- | Name of the UrlMap resource to update. +umpUrlMap :: Lens' URLMapsPatch' Text +umpUrlMap + = lens _umpUrlMap (\ s a -> s{_umpUrlMap = a}) + +-- | Returns response with indentations and line breaks. +umpPrettyPrint :: Lens' URLMapsPatch' Bool +umpPrettyPrint + = lens _umpPrettyPrint + (\ s a -> s{_umpPrettyPrint = a}) + +-- | Name of the project scoping this request. +umpProject :: Lens' URLMapsPatch' Text +umpProject + = lens _umpProject (\ s a -> s{_umpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umpUserIp :: Lens' URLMapsPatch' (Maybe Text) +umpUserIp + = lens _umpUserIp (\ s a -> s{_umpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umpKey :: Lens' URLMapsPatch' (Maybe Text) +umpKey = lens _umpKey (\ s a -> s{_umpKey = a}) + +-- | OAuth 2.0 token for the current user. +umpOauthToken :: Lens' URLMapsPatch' (Maybe Text) +umpOauthToken + = lens _umpOauthToken + (\ s a -> s{_umpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umpFields :: Lens' URLMapsPatch' (Maybe Text) +umpFields + = lens _umpFields (\ s a -> s{_umpFields = a}) + +-- | Data format for the response. +umpAlt :: Lens' URLMapsPatch' Text +umpAlt = lens _umpAlt (\ s a -> s{_umpAlt = a}) + +instance GoogleRequest URLMapsPatch' where + type Rs URLMapsPatch' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsPatch{..} + = go _umpQuotaUser _umpUrlMap _umpPrettyPrint + _umpProject + _umpUserIp + _umpKey + _umpOauthToken + _umpFields + _umpAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsPatchAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Update.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Update.hs new file mode 100644 index 000000000..55b05d032 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Update.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the entire content of the UrlMap resource. +-- +-- /See:/ for @ComputeURLMapsUpdate@. +module Compute.URLMaps.Update + ( + -- * REST Resource + UrlMapsUpdateAPI + + -- * Creating a Request + , uRLMapsUpdate + , URLMapsUpdate + + -- * Request Lenses + , umuQuotaUser + , umuUrlMap + , umuPrettyPrint + , umuProject + , umuUserIp + , umuKey + , umuOauthToken + , umuFields + , umuAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsUpdate@ which the +-- 'URLMapsUpdate' request conforms to. +type UrlMapsUpdateAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + Capture "urlMap" Text :> Put '[JSON] Operation + +-- | Update the entire content of the UrlMap resource. +-- +-- /See:/ 'uRLMapsUpdate' smart constructor. +data URLMapsUpdate = URLMapsUpdate + { _umuQuotaUser :: !(Maybe Text) + , _umuUrlMap :: !Text + , _umuPrettyPrint :: !Bool + , _umuProject :: !Text + , _umuUserIp :: !(Maybe Text) + , _umuKey :: !(Maybe Text) + , _umuOauthToken :: !(Maybe Text) + , _umuFields :: !(Maybe Text) + , _umuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umuQuotaUser' +-- +-- * 'umuUrlMap' +-- +-- * 'umuPrettyPrint' +-- +-- * 'umuProject' +-- +-- * 'umuUserIp' +-- +-- * 'umuKey' +-- +-- * 'umuOauthToken' +-- +-- * 'umuFields' +-- +-- * 'umuAlt' +uRLMapsUpdate + :: Text -- ^ 'urlMap' + -> Text -- ^ 'project' + -> URLMapsUpdate +uRLMapsUpdate pUmuUrlMap_ pUmuProject_ = + URLMapsUpdate + { _umuQuotaUser = Nothing + , _umuUrlMap = pUmuUrlMap_ + , _umuPrettyPrint = True + , _umuProject = pUmuProject_ + , _umuUserIp = Nothing + , _umuKey = Nothing + , _umuOauthToken = Nothing + , _umuFields = Nothing + , _umuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umuQuotaUser :: Lens' URLMapsUpdate' (Maybe Text) +umuQuotaUser + = lens _umuQuotaUser (\ s a -> s{_umuQuotaUser = a}) + +-- | Name of the UrlMap resource to update. +umuUrlMap :: Lens' URLMapsUpdate' Text +umuUrlMap + = lens _umuUrlMap (\ s a -> s{_umuUrlMap = a}) + +-- | Returns response with indentations and line breaks. +umuPrettyPrint :: Lens' URLMapsUpdate' Bool +umuPrettyPrint + = lens _umuPrettyPrint + (\ s a -> s{_umuPrettyPrint = a}) + +-- | Name of the project scoping this request. +umuProject :: Lens' URLMapsUpdate' Text +umuProject + = lens _umuProject (\ s a -> s{_umuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umuUserIp :: Lens' URLMapsUpdate' (Maybe Text) +umuUserIp + = lens _umuUserIp (\ s a -> s{_umuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umuKey :: Lens' URLMapsUpdate' (Maybe Text) +umuKey = lens _umuKey (\ s a -> s{_umuKey = a}) + +-- | OAuth 2.0 token for the current user. +umuOauthToken :: Lens' URLMapsUpdate' (Maybe Text) +umuOauthToken + = lens _umuOauthToken + (\ s a -> s{_umuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umuFields :: Lens' URLMapsUpdate' (Maybe Text) +umuFields + = lens _umuFields (\ s a -> s{_umuFields = a}) + +-- | Data format for the response. +umuAlt :: Lens' URLMapsUpdate' Text +umuAlt = lens _umuAlt (\ s a -> s{_umuAlt = a}) + +instance GoogleRequest URLMapsUpdate' where + type Rs URLMapsUpdate' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsUpdate{..} + = go _umuQuotaUser _umuUrlMap _umuPrettyPrint + _umuProject + _umuUserIp + _umuKey + _umuOauthToken + _umuFields + _umuAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsUpdateAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Validate.hs b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Validate.hs new file mode 100644 index 000000000..853dd24ef --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Validate.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.URLMaps.Validate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Run static validation for the UrlMap. In particular, the tests of the +-- provided UrlMap will be run. Calling this method does NOT create the +-- UrlMap. +-- +-- /See:/ for @ComputeURLMapsValidate@. +module Compute.URLMaps.Validate + ( + -- * REST Resource + UrlMapsValidateAPI + + -- * Creating a Request + , uRLMapsValidate + , URLMapsValidate + + -- * Request Lenses + , umvQuotaUser + , umvUrlMap + , umvPrettyPrint + , umvProject + , umvUserIp + , umvKey + , umvOauthToken + , umvFields + , umvAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeURLMapsValidate@ which the +-- 'URLMapsValidate' request conforms to. +type UrlMapsValidateAPI = + Capture "project" Text :> + "global" :> + "urlMaps" :> + Capture "urlMap" Text :> + "validate" :> Post '[JSON] URLMapsValidateResponse + +-- | Run static validation for the UrlMap. In particular, the tests of the +-- provided UrlMap will be run. Calling this method does NOT create the +-- UrlMap. +-- +-- /See:/ 'uRLMapsValidate' smart constructor. +data URLMapsValidate = URLMapsValidate + { _umvQuotaUser :: !(Maybe Text) + , _umvUrlMap :: !Text + , _umvPrettyPrint :: !Bool + , _umvProject :: !Text + , _umvUserIp :: !(Maybe Text) + , _umvKey :: !(Maybe Text) + , _umvOauthToken :: !(Maybe Text) + , _umvFields :: !(Maybe Text) + , _umvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLMapsValidate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umvQuotaUser' +-- +-- * 'umvUrlMap' +-- +-- * 'umvPrettyPrint' +-- +-- * 'umvProject' +-- +-- * 'umvUserIp' +-- +-- * 'umvKey' +-- +-- * 'umvOauthToken' +-- +-- * 'umvFields' +-- +-- * 'umvAlt' +uRLMapsValidate + :: Text -- ^ 'urlMap' + -> Text -- ^ 'project' + -> URLMapsValidate +uRLMapsValidate pUmvUrlMap_ pUmvProject_ = + URLMapsValidate + { _umvQuotaUser = Nothing + , _umvUrlMap = pUmvUrlMap_ + , _umvPrettyPrint = True + , _umvProject = pUmvProject_ + , _umvUserIp = Nothing + , _umvKey = Nothing + , _umvOauthToken = Nothing + , _umvFields = Nothing + , _umvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umvQuotaUser :: Lens' URLMapsValidate' (Maybe Text) +umvQuotaUser + = lens _umvQuotaUser (\ s a -> s{_umvQuotaUser = a}) + +-- | Name of the UrlMap resource to be validated as. +umvUrlMap :: Lens' URLMapsValidate' Text +umvUrlMap + = lens _umvUrlMap (\ s a -> s{_umvUrlMap = a}) + +-- | Returns response with indentations and line breaks. +umvPrettyPrint :: Lens' URLMapsValidate' Bool +umvPrettyPrint + = lens _umvPrettyPrint + (\ s a -> s{_umvPrettyPrint = a}) + +-- | Name of the project scoping this request. +umvProject :: Lens' URLMapsValidate' Text +umvProject + = lens _umvProject (\ s a -> s{_umvProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umvUserIp :: Lens' URLMapsValidate' (Maybe Text) +umvUserIp + = lens _umvUserIp (\ s a -> s{_umvUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umvKey :: Lens' URLMapsValidate' (Maybe Text) +umvKey = lens _umvKey (\ s a -> s{_umvKey = a}) + +-- | OAuth 2.0 token for the current user. +umvOauthToken :: Lens' URLMapsValidate' (Maybe Text) +umvOauthToken + = lens _umvOauthToken + (\ s a -> s{_umvOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umvFields :: Lens' URLMapsValidate' (Maybe Text) +umvFields + = lens _umvFields (\ s a -> s{_umvFields = a}) + +-- | Data format for the response. +umvAlt :: Lens' URLMapsValidate' Text +umvAlt = lens _umvAlt (\ s a -> s{_umvAlt = a}) + +instance GoogleRequest URLMapsValidate' where + type Rs URLMapsValidate' = URLMapsValidateResponse + request = requestWithRoute defReq computeURL + requestWithRoute r u URLMapsValidate{..} + = go _umvQuotaUser _umvUrlMap _umvPrettyPrint + _umvProject + _umvUserIp + _umvKey + _umvOauthToken + _umvFields + _umvAlt + where go + = clientWithRoute (Proxy :: Proxy UrlMapsValidateAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/AggregatedList.hs b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/AggregatedList.hs new file mode 100644 index 000000000..f4032abec --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/AggregatedList.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.VPNTunnels.AggregatedList +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of VPN tunnels grouped by scope. +-- +-- /See:/ for @ComputeVPNTunnelsAggregatedList@. +module Compute.VPNTunnels.AggregatedList + ( + -- * REST Resource + VpnTunnelsAggregatedListAPI + + -- * Creating a Request + , vPNTunnelsAggregatedList + , VPNTunnelsAggregatedList + + -- * Request Lenses + , vtalQuotaUser + , vtalPrettyPrint + , vtalProject + , vtalUserIp + , vtalKey + , vtalFilter + , vtalPageToken + , vtalOauthToken + , vtalMaxResults + , vtalFields + , vtalAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeVPNTunnelsAggregatedList@ which the +-- 'VPNTunnelsAggregatedList' request conforms to. +type VpnTunnelsAggregatedListAPI = + Capture "project" Text :> + "aggregated" :> + "vpnTunnels" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] VPNTunnelAggregatedList + +-- | Retrieves the list of VPN tunnels grouped by scope. +-- +-- /See:/ 'vPNTunnelsAggregatedList' smart constructor. +data VPNTunnelsAggregatedList = VPNTunnelsAggregatedList + { _vtalQuotaUser :: !(Maybe Text) + , _vtalPrettyPrint :: !Bool + , _vtalProject :: !Text + , _vtalUserIp :: !(Maybe Text) + , _vtalKey :: !(Maybe Text) + , _vtalFilter :: !(Maybe Text) + , _vtalPageToken :: !(Maybe Text) + , _vtalOauthToken :: !(Maybe Text) + , _vtalMaxResults :: !Word32 + , _vtalFields :: !(Maybe Text) + , _vtalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsAggregatedList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtalQuotaUser' +-- +-- * 'vtalPrettyPrint' +-- +-- * 'vtalProject' +-- +-- * 'vtalUserIp' +-- +-- * 'vtalKey' +-- +-- * 'vtalFilter' +-- +-- * 'vtalPageToken' +-- +-- * 'vtalOauthToken' +-- +-- * 'vtalMaxResults' +-- +-- * 'vtalFields' +-- +-- * 'vtalAlt' +vPNTunnelsAggregatedList + :: Text -- ^ 'project' + -> VPNTunnelsAggregatedList +vPNTunnelsAggregatedList pVtalProject_ = + VPNTunnelsAggregatedList + { _vtalQuotaUser = Nothing + , _vtalPrettyPrint = True + , _vtalProject = pVtalProject_ + , _vtalUserIp = Nothing + , _vtalKey = Nothing + , _vtalFilter = Nothing + , _vtalPageToken = Nothing + , _vtalOauthToken = Nothing + , _vtalMaxResults = 500 + , _vtalFields = Nothing + , _vtalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vtalQuotaUser :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalQuotaUser + = lens _vtalQuotaUser + (\ s a -> s{_vtalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vtalPrettyPrint :: Lens' VPNTunnelsAggregatedList' Bool +vtalPrettyPrint + = lens _vtalPrettyPrint + (\ s a -> s{_vtalPrettyPrint = a}) + +-- | Project ID for this request. +vtalProject :: Lens' VPNTunnelsAggregatedList' Text +vtalProject + = lens _vtalProject (\ s a -> s{_vtalProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vtalUserIp :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalUserIp + = lens _vtalUserIp (\ s a -> s{_vtalUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vtalKey :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalKey = lens _vtalKey (\ s a -> s{_vtalKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +vtalFilter :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalFilter + = lens _vtalFilter (\ s a -> s{_vtalFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +vtalPageToken :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalPageToken + = lens _vtalPageToken + (\ s a -> s{_vtalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +vtalOauthToken :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalOauthToken + = lens _vtalOauthToken + (\ s a -> s{_vtalOauthToken = a}) + +-- | Maximum count of results to be returned. +vtalMaxResults :: Lens' VPNTunnelsAggregatedList' Word32 +vtalMaxResults + = lens _vtalMaxResults + (\ s a -> s{_vtalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +vtalFields :: Lens' VPNTunnelsAggregatedList' (Maybe Text) +vtalFields + = lens _vtalFields (\ s a -> s{_vtalFields = a}) + +-- | Data format for the response. +vtalAlt :: Lens' VPNTunnelsAggregatedList' Text +vtalAlt = lens _vtalAlt (\ s a -> s{_vtalAlt = a}) + +instance GoogleRequest VPNTunnelsAggregatedList' + where + type Rs VPNTunnelsAggregatedList' = + VPNTunnelAggregatedList + request = requestWithRoute defReq computeURL + requestWithRoute r u VPNTunnelsAggregatedList{..} + = go _vtalQuotaUser _vtalPrettyPrint _vtalProject + _vtalUserIp + _vtalKey + _vtalFilter + _vtalPageToken + _vtalOauthToken + (Just _vtalMaxResults) + _vtalFields + _vtalAlt + where go + = clientWithRoute + (Proxy :: Proxy VpnTunnelsAggregatedListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Delete.hs new file mode 100644 index 000000000..033d5e5d8 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.VPNTunnels.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified VpnTunnel resource. +-- +-- /See:/ for @ComputeVPNTunnelsDelete@. +module Compute.VPNTunnels.Delete + ( + -- * REST Resource + VpnTunnelsDeleteAPI + + -- * Creating a Request + , vPNTunnelsDelete + , VPNTunnelsDelete + + -- * Request Lenses + , vtdQuotaUser + , vtdPrettyPrint + , vtdProject + , vtdUserIp + , vtdKey + , vtdVpnTunnel + , vtdRegion + , vtdOauthToken + , vtdFields + , vtdAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeVPNTunnelsDelete@ which the +-- 'VPNTunnelsDelete' request conforms to. +type VpnTunnelsDeleteAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "vpnTunnels" :> + Capture "vpnTunnel" Text :> Delete '[JSON] Operation + +-- | Deletes the specified VpnTunnel resource. +-- +-- /See:/ 'vPNTunnelsDelete' smart constructor. +data VPNTunnelsDelete = VPNTunnelsDelete + { _vtdQuotaUser :: !(Maybe Text) + , _vtdPrettyPrint :: !Bool + , _vtdProject :: !Text + , _vtdUserIp :: !(Maybe Text) + , _vtdKey :: !(Maybe Text) + , _vtdVpnTunnel :: !Text + , _vtdRegion :: !Text + , _vtdOauthToken :: !(Maybe Text) + , _vtdFields :: !(Maybe Text) + , _vtdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtdQuotaUser' +-- +-- * 'vtdPrettyPrint' +-- +-- * 'vtdProject' +-- +-- * 'vtdUserIp' +-- +-- * 'vtdKey' +-- +-- * 'vtdVpnTunnel' +-- +-- * 'vtdRegion' +-- +-- * 'vtdOauthToken' +-- +-- * 'vtdFields' +-- +-- * 'vtdAlt' +vPNTunnelsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'vpnTunnel' + -> Text -- ^ 'region' + -> VPNTunnelsDelete +vPNTunnelsDelete pVtdProject_ pVtdVpnTunnel_ pVtdRegion_ = + VPNTunnelsDelete + { _vtdQuotaUser = Nothing + , _vtdPrettyPrint = True + , _vtdProject = pVtdProject_ + , _vtdUserIp = Nothing + , _vtdKey = Nothing + , _vtdVpnTunnel = pVtdVpnTunnel_ + , _vtdRegion = pVtdRegion_ + , _vtdOauthToken = Nothing + , _vtdFields = Nothing + , _vtdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vtdQuotaUser :: Lens' VPNTunnelsDelete' (Maybe Text) +vtdQuotaUser + = lens _vtdQuotaUser (\ s a -> s{_vtdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vtdPrettyPrint :: Lens' VPNTunnelsDelete' Bool +vtdPrettyPrint + = lens _vtdPrettyPrint + (\ s a -> s{_vtdPrettyPrint = a}) + +-- | Project ID for this request. +vtdProject :: Lens' VPNTunnelsDelete' Text +vtdProject + = lens _vtdProject (\ s a -> s{_vtdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vtdUserIp :: Lens' VPNTunnelsDelete' (Maybe Text) +vtdUserIp + = lens _vtdUserIp (\ s a -> s{_vtdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vtdKey :: Lens' VPNTunnelsDelete' (Maybe Text) +vtdKey = lens _vtdKey (\ s a -> s{_vtdKey = a}) + +-- | Name of the VpnTunnel resource to delete. +vtdVpnTunnel :: Lens' VPNTunnelsDelete' Text +vtdVpnTunnel + = lens _vtdVpnTunnel (\ s a -> s{_vtdVpnTunnel = a}) + +-- | The name of the region for this request. +vtdRegion :: Lens' VPNTunnelsDelete' Text +vtdRegion + = lens _vtdRegion (\ s a -> s{_vtdRegion = a}) + +-- | OAuth 2.0 token for the current user. +vtdOauthToken :: Lens' VPNTunnelsDelete' (Maybe Text) +vtdOauthToken + = lens _vtdOauthToken + (\ s a -> s{_vtdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vtdFields :: Lens' VPNTunnelsDelete' (Maybe Text) +vtdFields + = lens _vtdFields (\ s a -> s{_vtdFields = a}) + +-- | Data format for the response. +vtdAlt :: Lens' VPNTunnelsDelete' Text +vtdAlt = lens _vtdAlt (\ s a -> s{_vtdAlt = a}) + +instance GoogleRequest VPNTunnelsDelete' where + type Rs VPNTunnelsDelete' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u VPNTunnelsDelete{..} + = go _vtdQuotaUser _vtdPrettyPrint _vtdProject + _vtdUserIp + _vtdKey + _vtdVpnTunnel + _vtdRegion + _vtdOauthToken + _vtdFields + _vtdAlt + where go + = clientWithRoute + (Proxy :: Proxy VpnTunnelsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Get.hs new file mode 100644 index 000000000..ececd9931 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.VPNTunnels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified VpnTunnel resource. +-- +-- /See:/ for @ComputeVPNTunnelsGet@. +module Compute.VPNTunnels.Get + ( + -- * REST Resource + VpnTunnelsGetAPI + + -- * Creating a Request + , vPNTunnelsGet + , VPNTunnelsGet + + -- * Request Lenses + , vtgQuotaUser + , vtgPrettyPrint + , vtgProject + , vtgUserIp + , vtgKey + , vtgVpnTunnel + , vtgRegion + , vtgOauthToken + , vtgFields + , vtgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeVPNTunnelsGet@ which the +-- 'VPNTunnelsGet' request conforms to. +type VpnTunnelsGetAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "vpnTunnels" :> + Capture "vpnTunnel" Text :> Get '[JSON] VPNTunnel + +-- | Returns the specified VpnTunnel resource. +-- +-- /See:/ 'vPNTunnelsGet' smart constructor. +data VPNTunnelsGet = VPNTunnelsGet + { _vtgQuotaUser :: !(Maybe Text) + , _vtgPrettyPrint :: !Bool + , _vtgProject :: !Text + , _vtgUserIp :: !(Maybe Text) + , _vtgKey :: !(Maybe Text) + , _vtgVpnTunnel :: !Text + , _vtgRegion :: !Text + , _vtgOauthToken :: !(Maybe Text) + , _vtgFields :: !(Maybe Text) + , _vtgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtgQuotaUser' +-- +-- * 'vtgPrettyPrint' +-- +-- * 'vtgProject' +-- +-- * 'vtgUserIp' +-- +-- * 'vtgKey' +-- +-- * 'vtgVpnTunnel' +-- +-- * 'vtgRegion' +-- +-- * 'vtgOauthToken' +-- +-- * 'vtgFields' +-- +-- * 'vtgAlt' +vPNTunnelsGet + :: Text -- ^ 'project' + -> Text -- ^ 'vpnTunnel' + -> Text -- ^ 'region' + -> VPNTunnelsGet +vPNTunnelsGet pVtgProject_ pVtgVpnTunnel_ pVtgRegion_ = + VPNTunnelsGet + { _vtgQuotaUser = Nothing + , _vtgPrettyPrint = True + , _vtgProject = pVtgProject_ + , _vtgUserIp = Nothing + , _vtgKey = Nothing + , _vtgVpnTunnel = pVtgVpnTunnel_ + , _vtgRegion = pVtgRegion_ + , _vtgOauthToken = Nothing + , _vtgFields = Nothing + , _vtgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vtgQuotaUser :: Lens' VPNTunnelsGet' (Maybe Text) +vtgQuotaUser + = lens _vtgQuotaUser (\ s a -> s{_vtgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vtgPrettyPrint :: Lens' VPNTunnelsGet' Bool +vtgPrettyPrint + = lens _vtgPrettyPrint + (\ s a -> s{_vtgPrettyPrint = a}) + +-- | Project ID for this request. +vtgProject :: Lens' VPNTunnelsGet' Text +vtgProject + = lens _vtgProject (\ s a -> s{_vtgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vtgUserIp :: Lens' VPNTunnelsGet' (Maybe Text) +vtgUserIp + = lens _vtgUserIp (\ s a -> s{_vtgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vtgKey :: Lens' VPNTunnelsGet' (Maybe Text) +vtgKey = lens _vtgKey (\ s a -> s{_vtgKey = a}) + +-- | Name of the VpnTunnel resource to return. +vtgVpnTunnel :: Lens' VPNTunnelsGet' Text +vtgVpnTunnel + = lens _vtgVpnTunnel (\ s a -> s{_vtgVpnTunnel = a}) + +-- | The name of the region for this request. +vtgRegion :: Lens' VPNTunnelsGet' Text +vtgRegion + = lens _vtgRegion (\ s a -> s{_vtgRegion = a}) + +-- | OAuth 2.0 token for the current user. +vtgOauthToken :: Lens' VPNTunnelsGet' (Maybe Text) +vtgOauthToken + = lens _vtgOauthToken + (\ s a -> s{_vtgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vtgFields :: Lens' VPNTunnelsGet' (Maybe Text) +vtgFields + = lens _vtgFields (\ s a -> s{_vtgFields = a}) + +-- | Data format for the response. +vtgAlt :: Lens' VPNTunnelsGet' Text +vtgAlt = lens _vtgAlt (\ s a -> s{_vtgAlt = a}) + +instance GoogleRequest VPNTunnelsGet' where + type Rs VPNTunnelsGet' = VPNTunnel + request = requestWithRoute defReq computeURL + requestWithRoute r u VPNTunnelsGet{..} + = go _vtgQuotaUser _vtgPrettyPrint _vtgProject + _vtgUserIp + _vtgKey + _vtgVpnTunnel + _vtgRegion + _vtgOauthToken + _vtgFields + _vtgAlt + where go + = clientWithRoute (Proxy :: Proxy VpnTunnelsGetAPI) r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Insert.hs b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Insert.hs new file mode 100644 index 000000000..2bd81095d --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.VPNTunnels.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a VpnTunnel resource in the specified project and region using +-- the data included in the request. +-- +-- /See:/ for @ComputeVPNTunnelsInsert@. +module Compute.VPNTunnels.Insert + ( + -- * REST Resource + VpnTunnelsInsertAPI + + -- * Creating a Request + , vPNTunnelsInsert + , VPNTunnelsInsert + + -- * Request Lenses + , vtiQuotaUser + , vtiPrettyPrint + , vtiProject + , vtiUserIp + , vtiKey + , vtiRegion + , vtiOauthToken + , vtiFields + , vtiAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeVPNTunnelsInsert@ which the +-- 'VPNTunnelsInsert' request conforms to. +type VpnTunnelsInsertAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "vpnTunnels" :> Post '[JSON] Operation + +-- | Creates a VpnTunnel resource in the specified project and region using +-- the data included in the request. +-- +-- /See:/ 'vPNTunnelsInsert' smart constructor. +data VPNTunnelsInsert = VPNTunnelsInsert + { _vtiQuotaUser :: !(Maybe Text) + , _vtiPrettyPrint :: !Bool + , _vtiProject :: !Text + , _vtiUserIp :: !(Maybe Text) + , _vtiKey :: !(Maybe Text) + , _vtiRegion :: !Text + , _vtiOauthToken :: !(Maybe Text) + , _vtiFields :: !(Maybe Text) + , _vtiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtiQuotaUser' +-- +-- * 'vtiPrettyPrint' +-- +-- * 'vtiProject' +-- +-- * 'vtiUserIp' +-- +-- * 'vtiKey' +-- +-- * 'vtiRegion' +-- +-- * 'vtiOauthToken' +-- +-- * 'vtiFields' +-- +-- * 'vtiAlt' +vPNTunnelsInsert + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> VPNTunnelsInsert +vPNTunnelsInsert pVtiProject_ pVtiRegion_ = + VPNTunnelsInsert + { _vtiQuotaUser = Nothing + , _vtiPrettyPrint = True + , _vtiProject = pVtiProject_ + , _vtiUserIp = Nothing + , _vtiKey = Nothing + , _vtiRegion = pVtiRegion_ + , _vtiOauthToken = Nothing + , _vtiFields = Nothing + , _vtiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vtiQuotaUser :: Lens' VPNTunnelsInsert' (Maybe Text) +vtiQuotaUser + = lens _vtiQuotaUser (\ s a -> s{_vtiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vtiPrettyPrint :: Lens' VPNTunnelsInsert' Bool +vtiPrettyPrint + = lens _vtiPrettyPrint + (\ s a -> s{_vtiPrettyPrint = a}) + +-- | Project ID for this request. +vtiProject :: Lens' VPNTunnelsInsert' Text +vtiProject + = lens _vtiProject (\ s a -> s{_vtiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vtiUserIp :: Lens' VPNTunnelsInsert' (Maybe Text) +vtiUserIp + = lens _vtiUserIp (\ s a -> s{_vtiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vtiKey :: Lens' VPNTunnelsInsert' (Maybe Text) +vtiKey = lens _vtiKey (\ s a -> s{_vtiKey = a}) + +-- | The name of the region for this request. +vtiRegion :: Lens' VPNTunnelsInsert' Text +vtiRegion + = lens _vtiRegion (\ s a -> s{_vtiRegion = a}) + +-- | OAuth 2.0 token for the current user. +vtiOauthToken :: Lens' VPNTunnelsInsert' (Maybe Text) +vtiOauthToken + = lens _vtiOauthToken + (\ s a -> s{_vtiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vtiFields :: Lens' VPNTunnelsInsert' (Maybe Text) +vtiFields + = lens _vtiFields (\ s a -> s{_vtiFields = a}) + +-- | Data format for the response. +vtiAlt :: Lens' VPNTunnelsInsert' Text +vtiAlt = lens _vtiAlt (\ s a -> s{_vtiAlt = a}) + +instance GoogleRequest VPNTunnelsInsert' where + type Rs VPNTunnelsInsert' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u VPNTunnelsInsert{..} + = go _vtiQuotaUser _vtiPrettyPrint _vtiProject + _vtiUserIp + _vtiKey + _vtiRegion + _vtiOauthToken + _vtiFields + _vtiAlt + where go + = clientWithRoute + (Proxy :: Proxy VpnTunnelsInsertAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/List.hs new file mode 100644 index 000000000..046fcee7b --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/VPNTunnels/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.VPNTunnels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of VpnTunnel resources contained in the specified +-- project and region. +-- +-- /See:/ for @ComputeVPNTunnelsList@. +module Compute.VPNTunnels.List + ( + -- * REST Resource + VpnTunnelsListAPI + + -- * Creating a Request + , vPNTunnelsList + , VPNTunnelsList + + -- * Request Lenses + , vtlQuotaUser + , vtlPrettyPrint + , vtlProject + , vtlUserIp + , vtlKey + , vtlFilter + , vtlRegion + , vtlPageToken + , vtlOauthToken + , vtlMaxResults + , vtlFields + , vtlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeVPNTunnelsList@ which the +-- 'VPNTunnelsList' request conforms to. +type VpnTunnelsListAPI = + Capture "project" Text :> + "regions" :> + Capture "region" Text :> + "vpnTunnels" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] VPNTunnelList + +-- | Retrieves the list of VpnTunnel resources contained in the specified +-- project and region. +-- +-- /See:/ 'vPNTunnelsList' smart constructor. +data VPNTunnelsList = VPNTunnelsList + { _vtlQuotaUser :: !(Maybe Text) + , _vtlPrettyPrint :: !Bool + , _vtlProject :: !Text + , _vtlUserIp :: !(Maybe Text) + , _vtlKey :: !(Maybe Text) + , _vtlFilter :: !(Maybe Text) + , _vtlRegion :: !Text + , _vtlPageToken :: !(Maybe Text) + , _vtlOauthToken :: !(Maybe Text) + , _vtlMaxResults :: !Word32 + , _vtlFields :: !(Maybe Text) + , _vtlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VPNTunnelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtlQuotaUser' +-- +-- * 'vtlPrettyPrint' +-- +-- * 'vtlProject' +-- +-- * 'vtlUserIp' +-- +-- * 'vtlKey' +-- +-- * 'vtlFilter' +-- +-- * 'vtlRegion' +-- +-- * 'vtlPageToken' +-- +-- * 'vtlOauthToken' +-- +-- * 'vtlMaxResults' +-- +-- * 'vtlFields' +-- +-- * 'vtlAlt' +vPNTunnelsList + :: Text -- ^ 'project' + -> Text -- ^ 'region' + -> VPNTunnelsList +vPNTunnelsList pVtlProject_ pVtlRegion_ = + VPNTunnelsList + { _vtlQuotaUser = Nothing + , _vtlPrettyPrint = True + , _vtlProject = pVtlProject_ + , _vtlUserIp = Nothing + , _vtlKey = Nothing + , _vtlFilter = Nothing + , _vtlRegion = pVtlRegion_ + , _vtlPageToken = Nothing + , _vtlOauthToken = Nothing + , _vtlMaxResults = 500 + , _vtlFields = Nothing + , _vtlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vtlQuotaUser :: Lens' VPNTunnelsList' (Maybe Text) +vtlQuotaUser + = lens _vtlQuotaUser (\ s a -> s{_vtlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vtlPrettyPrint :: Lens' VPNTunnelsList' Bool +vtlPrettyPrint + = lens _vtlPrettyPrint + (\ s a -> s{_vtlPrettyPrint = a}) + +-- | Project ID for this request. +vtlProject :: Lens' VPNTunnelsList' Text +vtlProject + = lens _vtlProject (\ s a -> s{_vtlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vtlUserIp :: Lens' VPNTunnelsList' (Maybe Text) +vtlUserIp + = lens _vtlUserIp (\ s a -> s{_vtlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vtlKey :: Lens' VPNTunnelsList' (Maybe Text) +vtlKey = lens _vtlKey (\ s a -> s{_vtlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +vtlFilter :: Lens' VPNTunnelsList' (Maybe Text) +vtlFilter + = lens _vtlFilter (\ s a -> s{_vtlFilter = a}) + +-- | The name of the region for this request. +vtlRegion :: Lens' VPNTunnelsList' Text +vtlRegion + = lens _vtlRegion (\ s a -> s{_vtlRegion = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +vtlPageToken :: Lens' VPNTunnelsList' (Maybe Text) +vtlPageToken + = lens _vtlPageToken (\ s a -> s{_vtlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +vtlOauthToken :: Lens' VPNTunnelsList' (Maybe Text) +vtlOauthToken + = lens _vtlOauthToken + (\ s a -> s{_vtlOauthToken = a}) + +-- | Maximum count of results to be returned. +vtlMaxResults :: Lens' VPNTunnelsList' Word32 +vtlMaxResults + = lens _vtlMaxResults + (\ s a -> s{_vtlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +vtlFields :: Lens' VPNTunnelsList' (Maybe Text) +vtlFields + = lens _vtlFields (\ s a -> s{_vtlFields = a}) + +-- | Data format for the response. +vtlAlt :: Lens' VPNTunnelsList' Text +vtlAlt = lens _vtlAlt (\ s a -> s{_vtlAlt = a}) + +instance GoogleRequest VPNTunnelsList' where + type Rs VPNTunnelsList' = VPNTunnelList + request = requestWithRoute defReq computeURL + requestWithRoute r u VPNTunnelsList{..} + = go _vtlQuotaUser _vtlPrettyPrint _vtlProject + _vtlUserIp + _vtlKey + _vtlFilter + _vtlRegion + _vtlPageToken + _vtlOauthToken + (Just _vtlMaxResults) + _vtlFields + _vtlAlt + where go + = clientWithRoute (Proxy :: Proxy VpnTunnelsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Delete.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Delete.hs new file mode 100644 index 000000000..aad2b7df3 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Delete.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ZoneOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified zone-specific Operations resource. +-- +-- /See:/ for @ComputeZoneOperationsDelete@. +module Compute.ZoneOperations.Delete + ( + -- * REST Resource + ZoneOperationsDeleteAPI + + -- * Creating a Request + , zoneOperationsDelete + , ZoneOperationsDelete + + -- * Request Lenses + , zodQuotaUser + , zodPrettyPrint + , zodProject + , zodOperation + , zodUserIp + , zodZone + , zodKey + , zodOauthToken + , zodFields + , zodAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeZoneOperationsDelete@ which the +-- 'ZoneOperationsDelete' request conforms to. +type ZoneOperationsDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Delete '[JSON] () + +-- | Deletes the specified zone-specific Operations resource. +-- +-- /See:/ 'zoneOperationsDelete' smart constructor. +data ZoneOperationsDelete = ZoneOperationsDelete + { _zodQuotaUser :: !(Maybe Text) + , _zodPrettyPrint :: !Bool + , _zodProject :: !Text + , _zodOperation :: !Text + , _zodUserIp :: !(Maybe Text) + , _zodZone :: !Text + , _zodKey :: !(Maybe Text) + , _zodOauthToken :: !(Maybe Text) + , _zodFields :: !(Maybe Text) + , _zodAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zodQuotaUser' +-- +-- * 'zodPrettyPrint' +-- +-- * 'zodProject' +-- +-- * 'zodOperation' +-- +-- * 'zodUserIp' +-- +-- * 'zodZone' +-- +-- * 'zodKey' +-- +-- * 'zodOauthToken' +-- +-- * 'zodFields' +-- +-- * 'zodAlt' +zoneOperationsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsDelete +zoneOperationsDelete pZodProject_ pZodOperation_ pZodZone_ = + ZoneOperationsDelete + { _zodQuotaUser = Nothing + , _zodPrettyPrint = True + , _zodProject = pZodProject_ + , _zodOperation = pZodOperation_ + , _zodUserIp = Nothing + , _zodZone = pZodZone_ + , _zodKey = Nothing + , _zodOauthToken = Nothing + , _zodFields = Nothing + , _zodAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zodQuotaUser :: Lens' ZoneOperationsDelete' (Maybe Text) +zodQuotaUser + = lens _zodQuotaUser (\ s a -> s{_zodQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zodPrettyPrint :: Lens' ZoneOperationsDelete' Bool +zodPrettyPrint + = lens _zodPrettyPrint + (\ s a -> s{_zodPrettyPrint = a}) + +-- | Project ID for this request. +zodProject :: Lens' ZoneOperationsDelete' Text +zodProject + = lens _zodProject (\ s a -> s{_zodProject = a}) + +-- | Name of the Operations resource to delete. +zodOperation :: Lens' ZoneOperationsDelete' Text +zodOperation + = lens _zodOperation (\ s a -> s{_zodOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zodUserIp :: Lens' ZoneOperationsDelete' (Maybe Text) +zodUserIp + = lens _zodUserIp (\ s a -> s{_zodUserIp = a}) + +-- | Name of the zone scoping this request. +zodZone :: Lens' ZoneOperationsDelete' Text +zodZone = lens _zodZone (\ s a -> s{_zodZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zodKey :: Lens' ZoneOperationsDelete' (Maybe Text) +zodKey = lens _zodKey (\ s a -> s{_zodKey = a}) + +-- | OAuth 2.0 token for the current user. +zodOauthToken :: Lens' ZoneOperationsDelete' (Maybe Text) +zodOauthToken + = lens _zodOauthToken + (\ s a -> s{_zodOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zodFields :: Lens' ZoneOperationsDelete' (Maybe Text) +zodFields + = lens _zodFields (\ s a -> s{_zodFields = a}) + +-- | Data format for the response. +zodAlt :: Lens' ZoneOperationsDelete' Text +zodAlt = lens _zodAlt (\ s a -> s{_zodAlt = a}) + +instance GoogleRequest ZoneOperationsDelete' where + type Rs ZoneOperationsDelete' = () + request = requestWithRoute defReq computeURL + requestWithRoute r u ZoneOperationsDelete{..} + = go _zodQuotaUser _zodPrettyPrint _zodProject + _zodOperation + _zodUserIp + _zodZone + _zodKey + _zodOauthToken + _zodFields + _zodAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsDeleteAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Get.hs new file mode 100644 index 000000000..07657d7b9 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ZoneOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified zone-specific Operations resource. +-- +-- /See:/ for @ComputeZoneOperationsGet@. +module Compute.ZoneOperations.Get + ( + -- * REST Resource + ZoneOperationsGetAPI + + -- * Creating a Request + , zoneOperationsGet + , ZoneOperationsGet + + -- * Request Lenses + , zogQuotaUser + , zogPrettyPrint + , zogProject + , zogOperation + , zogUserIp + , zogZone + , zogKey + , zogOauthToken + , zogFields + , zogAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeZoneOperationsGet@ which the +-- 'ZoneOperationsGet' request conforms to. +type ZoneOperationsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified zone-specific Operations resource. +-- +-- /See:/ 'zoneOperationsGet' smart constructor. +data ZoneOperationsGet = ZoneOperationsGet + { _zogQuotaUser :: !(Maybe Text) + , _zogPrettyPrint :: !Bool + , _zogProject :: !Text + , _zogOperation :: !Text + , _zogUserIp :: !(Maybe Text) + , _zogZone :: !Text + , _zogKey :: !(Maybe Text) + , _zogOauthToken :: !(Maybe Text) + , _zogFields :: !(Maybe Text) + , _zogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zogQuotaUser' +-- +-- * 'zogPrettyPrint' +-- +-- * 'zogProject' +-- +-- * 'zogOperation' +-- +-- * 'zogUserIp' +-- +-- * 'zogZone' +-- +-- * 'zogKey' +-- +-- * 'zogOauthToken' +-- +-- * 'zogFields' +-- +-- * 'zogAlt' +zoneOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsGet +zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ = + ZoneOperationsGet + { _zogQuotaUser = Nothing + , _zogPrettyPrint = True + , _zogProject = pZogProject_ + , _zogOperation = pZogOperation_ + , _zogUserIp = Nothing + , _zogZone = pZogZone_ + , _zogKey = Nothing + , _zogOauthToken = Nothing + , _zogFields = Nothing + , _zogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zogQuotaUser :: Lens' ZoneOperationsGet' (Maybe Text) +zogQuotaUser + = lens _zogQuotaUser (\ s a -> s{_zogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zogPrettyPrint :: Lens' ZoneOperationsGet' Bool +zogPrettyPrint + = lens _zogPrettyPrint + (\ s a -> s{_zogPrettyPrint = a}) + +-- | Project ID for this request. +zogProject :: Lens' ZoneOperationsGet' Text +zogProject + = lens _zogProject (\ s a -> s{_zogProject = a}) + +-- | Name of the Operations resource to return. +zogOperation :: Lens' ZoneOperationsGet' Text +zogOperation + = lens _zogOperation (\ s a -> s{_zogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zogUserIp :: Lens' ZoneOperationsGet' (Maybe Text) +zogUserIp + = lens _zogUserIp (\ s a -> s{_zogUserIp = a}) + +-- | Name of the zone scoping this request. +zogZone :: Lens' ZoneOperationsGet' Text +zogZone = lens _zogZone (\ s a -> s{_zogZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zogKey :: Lens' ZoneOperationsGet' (Maybe Text) +zogKey = lens _zogKey (\ s a -> s{_zogKey = a}) + +-- | OAuth 2.0 token for the current user. +zogOauthToken :: Lens' ZoneOperationsGet' (Maybe Text) +zogOauthToken + = lens _zogOauthToken + (\ s a -> s{_zogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zogFields :: Lens' ZoneOperationsGet' (Maybe Text) +zogFields + = lens _zogFields (\ s a -> s{_zogFields = a}) + +-- | Data format for the response. +zogAlt :: Lens' ZoneOperationsGet' Text +zogAlt = lens _zogAlt (\ s a -> s{_zogAlt = a}) + +instance GoogleRequest ZoneOperationsGet' where + type Rs ZoneOperationsGet' = Operation + request = requestWithRoute defReq computeURL + requestWithRoute r u ZoneOperationsGet{..} + = go _zogQuotaUser _zogPrettyPrint _zogProject + _zogOperation + _zogUserIp + _zogZone + _zogKey + _zogOauthToken + _zogFields + _zogAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsGetAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/List.hs new file mode 100644 index 000000000..1687f5f16 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/ZoneOperations/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.ZoneOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Operation resources contained within the specified +-- zone. +-- +-- /See:/ for @ComputeZoneOperationsList@. +module Compute.ZoneOperations.List + ( + -- * REST Resource + ZoneOperationsListAPI + + -- * Creating a Request + , zoneOperationsList + , ZoneOperationsList + + -- * Request Lenses + , zolQuotaUser + , zolPrettyPrint + , zolProject + , zolUserIp + , zolZone + , zolKey + , zolFilter + , zolPageToken + , zolOauthToken + , zolMaxResults + , zolFields + , zolAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeZoneOperationsList@ which the +-- 'ZoneOperationsList' request conforms to. +type ZoneOperationsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of Operation resources contained within the specified +-- zone. +-- +-- /See:/ 'zoneOperationsList' smart constructor. +data ZoneOperationsList = ZoneOperationsList + { _zolQuotaUser :: !(Maybe Text) + , _zolPrettyPrint :: !Bool + , _zolProject :: !Text + , _zolUserIp :: !(Maybe Text) + , _zolZone :: !Text + , _zolKey :: !(Maybe Text) + , _zolFilter :: !(Maybe Text) + , _zolPageToken :: !(Maybe Text) + , _zolOauthToken :: !(Maybe Text) + , _zolMaxResults :: !Word32 + , _zolFields :: !(Maybe Text) + , _zolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zolQuotaUser' +-- +-- * 'zolPrettyPrint' +-- +-- * 'zolProject' +-- +-- * 'zolUserIp' +-- +-- * 'zolZone' +-- +-- * 'zolKey' +-- +-- * 'zolFilter' +-- +-- * 'zolPageToken' +-- +-- * 'zolOauthToken' +-- +-- * 'zolMaxResults' +-- +-- * 'zolFields' +-- +-- * 'zolAlt' +zoneOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneOperationsList +zoneOperationsList pZolProject_ pZolZone_ = + ZoneOperationsList + { _zolQuotaUser = Nothing + , _zolPrettyPrint = True + , _zolProject = pZolProject_ + , _zolUserIp = Nothing + , _zolZone = pZolZone_ + , _zolKey = Nothing + , _zolFilter = Nothing + , _zolPageToken = Nothing + , _zolOauthToken = Nothing + , _zolMaxResults = 500 + , _zolFields = Nothing + , _zolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zolQuotaUser :: Lens' ZoneOperationsList' (Maybe Text) +zolQuotaUser + = lens _zolQuotaUser (\ s a -> s{_zolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zolPrettyPrint :: Lens' ZoneOperationsList' Bool +zolPrettyPrint + = lens _zolPrettyPrint + (\ s a -> s{_zolPrettyPrint = a}) + +-- | Project ID for this request. +zolProject :: Lens' ZoneOperationsList' Text +zolProject + = lens _zolProject (\ s a -> s{_zolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zolUserIp :: Lens' ZoneOperationsList' (Maybe Text) +zolUserIp + = lens _zolUserIp (\ s a -> s{_zolUserIp = a}) + +-- | Name of the zone scoping this request. +zolZone :: Lens' ZoneOperationsList' Text +zolZone = lens _zolZone (\ s a -> s{_zolZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zolKey :: Lens' ZoneOperationsList' (Maybe Text) +zolKey = lens _zolKey (\ s a -> s{_zolKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +zolFilter :: Lens' ZoneOperationsList' (Maybe Text) +zolFilter + = lens _zolFilter (\ s a -> s{_zolFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +zolPageToken :: Lens' ZoneOperationsList' (Maybe Text) +zolPageToken + = lens _zolPageToken (\ s a -> s{_zolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zolOauthToken :: Lens' ZoneOperationsList' (Maybe Text) +zolOauthToken + = lens _zolOauthToken + (\ s a -> s{_zolOauthToken = a}) + +-- | Maximum count of results to be returned. +zolMaxResults :: Lens' ZoneOperationsList' Word32 +zolMaxResults + = lens _zolMaxResults + (\ s a -> s{_zolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zolFields :: Lens' ZoneOperationsList' (Maybe Text) +zolFields + = lens _zolFields (\ s a -> s{_zolFields = a}) + +-- | Data format for the response. +zolAlt :: Lens' ZoneOperationsList' Text +zolAlt = lens _zolAlt (\ s a -> s{_zolAlt = a}) + +instance GoogleRequest ZoneOperationsList' where + type Rs ZoneOperationsList' = OperationList + request = requestWithRoute defReq computeURL + requestWithRoute r u ZoneOperationsList{..} + = go _zolQuotaUser _zolPrettyPrint _zolProject + _zolUserIp + _zolZone + _zolKey + _zolFilter + _zolPageToken + _zolOauthToken + (Just _zolMaxResults) + _zolFields + _zolAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsListAPI) + r + u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Zones/Get.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Zones/Get.hs new file mode 100644 index 000000000..cfd5bea60 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Zones/Get.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Zones.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified zone resource. +-- +-- /See:/ for @ComputeZonesGet@. +module Compute.Zones.Get + ( + -- * REST Resource + ZonesGetAPI + + -- * Creating a Request + , zonesGet + , ZonesGet + + -- * Request Lenses + , zgQuotaUser + , zgPrettyPrint + , zgProject + , zgUserIp + , zgZone + , zgKey + , zgOauthToken + , zgFields + , zgAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeZonesGet@ which the +-- 'ZonesGet' request conforms to. +type ZonesGetAPI = + Capture "project" Text :> + "zones" :> Capture "zone" Text :> Get '[JSON] Zone + +-- | Returns the specified zone resource. +-- +-- /See:/ 'zonesGet' smart constructor. +data ZonesGet = ZonesGet + { _zgQuotaUser :: !(Maybe Text) + , _zgPrettyPrint :: !Bool + , _zgProject :: !Text + , _zgUserIp :: !(Maybe Text) + , _zgZone :: !Text + , _zgKey :: !(Maybe Text) + , _zgOauthToken :: !(Maybe Text) + , _zgFields :: !(Maybe Text) + , _zgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZonesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zgQuotaUser' +-- +-- * 'zgPrettyPrint' +-- +-- * 'zgProject' +-- +-- * 'zgUserIp' +-- +-- * 'zgZone' +-- +-- * 'zgKey' +-- +-- * 'zgOauthToken' +-- +-- * 'zgFields' +-- +-- * 'zgAlt' +zonesGet + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZonesGet +zonesGet pZgProject_ pZgZone_ = + ZonesGet + { _zgQuotaUser = Nothing + , _zgPrettyPrint = True + , _zgProject = pZgProject_ + , _zgUserIp = Nothing + , _zgZone = pZgZone_ + , _zgKey = Nothing + , _zgOauthToken = Nothing + , _zgFields = Nothing + , _zgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zgQuotaUser :: Lens' ZonesGet' (Maybe Text) +zgQuotaUser + = lens _zgQuotaUser (\ s a -> s{_zgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zgPrettyPrint :: Lens' ZonesGet' Bool +zgPrettyPrint + = lens _zgPrettyPrint + (\ s a -> s{_zgPrettyPrint = a}) + +-- | Project ID for this request. +zgProject :: Lens' ZonesGet' Text +zgProject + = lens _zgProject (\ s a -> s{_zgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zgUserIp :: Lens' ZonesGet' (Maybe Text) +zgUserIp = lens _zgUserIp (\ s a -> s{_zgUserIp = a}) + +-- | Name of the zone resource to return. +zgZone :: Lens' ZonesGet' Text +zgZone = lens _zgZone (\ s a -> s{_zgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zgKey :: Lens' ZonesGet' (Maybe Text) +zgKey = lens _zgKey (\ s a -> s{_zgKey = a}) + +-- | OAuth 2.0 token for the current user. +zgOauthToken :: Lens' ZonesGet' (Maybe Text) +zgOauthToken + = lens _zgOauthToken (\ s a -> s{_zgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zgFields :: Lens' ZonesGet' (Maybe Text) +zgFields = lens _zgFields (\ s a -> s{_zgFields = a}) + +-- | Data format for the response. +zgAlt :: Lens' ZonesGet' Text +zgAlt = lens _zgAlt (\ s a -> s{_zgAlt = a}) + +instance GoogleRequest ZonesGet' where + type Rs ZonesGet' = Zone + request = requestWithRoute defReq computeURL + requestWithRoute r u ZonesGet{..} + = go _zgQuotaUser _zgPrettyPrint _zgProject _zgUserIp + _zgZone + _zgKey + _zgOauthToken + _zgFields + _zgAlt + where go + = clientWithRoute (Proxy :: Proxy ZonesGetAPI) r u diff --git a/gogol-compute/gen/Network/Google/Resource/Compute/Zones/List.hs b/gogol-compute/gen/Network/Google/Resource/Compute/Zones/List.hs new file mode 100644 index 000000000..12ab75cc7 --- /dev/null +++ b/gogol-compute/gen/Network/Google/Resource/Compute/Zones/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Compute.Zones.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of zone resources available to the specified project. +-- +-- /See:/ for @ComputeZonesList@. +module Compute.Zones.List + ( + -- * REST Resource + ZonesListAPI + + -- * Creating a Request + , zonesList + , ZonesList + + -- * Request Lenses + , zlQuotaUser + , zlPrettyPrint + , zlProject + , zlUserIp + , zlKey + , zlFilter + , zlPageToken + , zlOauthToken + , zlMaxResults + , zlFields + , zlAlt + ) where + +import Network.Google.Compute.Types +import Network.Google.Prelude + +-- | A resource alias for @ComputeZonesList@ which the +-- 'ZonesList' request conforms to. +type ZonesListAPI = + Capture "project" Text :> + "zones" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ZoneList + +-- | Retrieves the list of zone resources available to the specified project. +-- +-- /See:/ 'zonesList' smart constructor. +data ZonesList = ZonesList + { _zlQuotaUser :: !(Maybe Text) + , _zlPrettyPrint :: !Bool + , _zlProject :: !Text + , _zlUserIp :: !(Maybe Text) + , _zlKey :: !(Maybe Text) + , _zlFilter :: !(Maybe Text) + , _zlPageToken :: !(Maybe Text) + , _zlOauthToken :: !(Maybe Text) + , _zlMaxResults :: !Word32 + , _zlFields :: !(Maybe Text) + , _zlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZonesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zlQuotaUser' +-- +-- * 'zlPrettyPrint' +-- +-- * 'zlProject' +-- +-- * 'zlUserIp' +-- +-- * 'zlKey' +-- +-- * 'zlFilter' +-- +-- * 'zlPageToken' +-- +-- * 'zlOauthToken' +-- +-- * 'zlMaxResults' +-- +-- * 'zlFields' +-- +-- * 'zlAlt' +zonesList + :: Text -- ^ 'project' + -> ZonesList +zonesList pZlProject_ = + ZonesList + { _zlQuotaUser = Nothing + , _zlPrettyPrint = True + , _zlProject = pZlProject_ + , _zlUserIp = Nothing + , _zlKey = Nothing + , _zlFilter = Nothing + , _zlPageToken = Nothing + , _zlOauthToken = Nothing + , _zlMaxResults = 500 + , _zlFields = Nothing + , _zlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zlQuotaUser :: Lens' ZonesList' (Maybe Text) +zlQuotaUser + = lens _zlQuotaUser (\ s a -> s{_zlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zlPrettyPrint :: Lens' ZonesList' Bool +zlPrettyPrint + = lens _zlPrettyPrint + (\ s a -> s{_zlPrettyPrint = a}) + +-- | Project ID for this request. +zlProject :: Lens' ZonesList' Text +zlProject + = lens _zlProject (\ s a -> s{_zlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zlUserIp :: Lens' ZonesList' (Maybe Text) +zlUserIp = lens _zlUserIp (\ s a -> s{_zlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zlKey :: Lens' ZonesList' (Maybe Text) +zlKey = lens _zlKey (\ s a -> s{_zlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +zlFilter :: Lens' ZonesList' (Maybe Text) +zlFilter = lens _zlFilter (\ s a -> s{_zlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +zlPageToken :: Lens' ZonesList' (Maybe Text) +zlPageToken + = lens _zlPageToken (\ s a -> s{_zlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zlOauthToken :: Lens' ZonesList' (Maybe Text) +zlOauthToken + = lens _zlOauthToken (\ s a -> s{_zlOauthToken = a}) + +-- | Maximum count of results to be returned. +zlMaxResults :: Lens' ZonesList' Word32 +zlMaxResults + = lens _zlMaxResults (\ s a -> s{_zlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zlFields :: Lens' ZonesList' (Maybe Text) +zlFields = lens _zlFields (\ s a -> s{_zlFields = a}) + +-- | Data format for the response. +zlAlt :: Lens' ZonesList' Text +zlAlt = lens _zlAlt (\ s a -> s{_zlAlt = a}) + +instance GoogleRequest ZonesList' where + type Rs ZonesList' = ZoneList + request = requestWithRoute defReq computeURL + requestWithRoute r u ZonesList{..} + = go _zlQuotaUser _zlPrettyPrint _zlProject _zlUserIp + _zlKey + _zlFilter + _zlPageToken + _zlOauthToken + (Just _zlMaxResults) + _zlFields + _zlAlt + where go + = clientWithRoute (Proxy :: Proxy ZonesListAPI) r u diff --git a/gogol-compute/gogol-compute.cabal b/gogol-compute/gogol-compute.cabal new file mode 100644 index 000000000..492a2d5bd --- /dev/null +++ b/gogol-compute/gogol-compute.cabal @@ -0,0 +1,216 @@ +name: gogol-compute +version: 0.0.1 +synopsis: Compute Engine API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for the Google Compute Engine service. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Compute + , Network.Google.Compute.Types + , Network.Google.Resource.Compute.Addresses.AggregatedList + , Network.Google.Resource.Compute.Addresses.Delete + , Network.Google.Resource.Compute.Addresses.Get + , Network.Google.Resource.Compute.Addresses.Insert + , Network.Google.Resource.Compute.Addresses.List + , Network.Google.Resource.Compute.Autoscalers.AggregatedList + , Network.Google.Resource.Compute.Autoscalers.Delete + , Network.Google.Resource.Compute.Autoscalers.Get + , Network.Google.Resource.Compute.Autoscalers.Insert + , Network.Google.Resource.Compute.Autoscalers.List + , Network.Google.Resource.Compute.Autoscalers.Patch + , Network.Google.Resource.Compute.Autoscalers.Update + , Network.Google.Resource.Compute.BackendServices.Delete + , Network.Google.Resource.Compute.BackendServices.Get + , Network.Google.Resource.Compute.BackendServices.GetHealth + , Network.Google.Resource.Compute.BackendServices.Insert + , Network.Google.Resource.Compute.BackendServices.List + , Network.Google.Resource.Compute.BackendServices.Patch + , Network.Google.Resource.Compute.BackendServices.Update + , Network.Google.Resource.Compute.DiskTypes.AggregatedList + , Network.Google.Resource.Compute.DiskTypes.Get + , Network.Google.Resource.Compute.DiskTypes.List + , Network.Google.Resource.Compute.Disks.AggregatedList + , Network.Google.Resource.Compute.Disks.CreateSnapshot + , Network.Google.Resource.Compute.Disks.Delete + , Network.Google.Resource.Compute.Disks.Get + , Network.Google.Resource.Compute.Disks.Insert + , Network.Google.Resource.Compute.Disks.List + , Network.Google.Resource.Compute.Firewalls.Delete + , Network.Google.Resource.Compute.Firewalls.Get + , Network.Google.Resource.Compute.Firewalls.Insert + , Network.Google.Resource.Compute.Firewalls.List + , Network.Google.Resource.Compute.Firewalls.Patch + , Network.Google.Resource.Compute.Firewalls.Update + , Network.Google.Resource.Compute.ForwardingRules.AggregatedList + , Network.Google.Resource.Compute.ForwardingRules.Delete + , Network.Google.Resource.Compute.ForwardingRules.Get + , Network.Google.Resource.Compute.ForwardingRules.Insert + , Network.Google.Resource.Compute.ForwardingRules.List + , Network.Google.Resource.Compute.ForwardingRules.SetTarget + , Network.Google.Resource.Compute.GlobalAddresses.Delete + , Network.Google.Resource.Compute.GlobalAddresses.Get + , Network.Google.Resource.Compute.GlobalAddresses.Insert + , Network.Google.Resource.Compute.GlobalAddresses.List + , Network.Google.Resource.Compute.GlobalForwardingRules.Delete + , Network.Google.Resource.Compute.GlobalForwardingRules.Get + , Network.Google.Resource.Compute.GlobalForwardingRules.Insert + , Network.Google.Resource.Compute.GlobalForwardingRules.List + , Network.Google.Resource.Compute.GlobalForwardingRules.SetTarget + , Network.Google.Resource.Compute.GlobalOperations.AggregatedList + , Network.Google.Resource.Compute.GlobalOperations.Delete + , Network.Google.Resource.Compute.GlobalOperations.Get + , Network.Google.Resource.Compute.GlobalOperations.List + , Network.Google.Resource.Compute.HTTPHealthChecks.Delete + , Network.Google.Resource.Compute.HTTPHealthChecks.Get + , Network.Google.Resource.Compute.HTTPHealthChecks.Insert + , Network.Google.Resource.Compute.HTTPHealthChecks.List + , Network.Google.Resource.Compute.HTTPHealthChecks.Patch + , Network.Google.Resource.Compute.HTTPHealthChecks.Update + , Network.Google.Resource.Compute.Images.Delete + , Network.Google.Resource.Compute.Images.Deprecate + , Network.Google.Resource.Compute.Images.Get + , Network.Google.Resource.Compute.Images.Insert + , Network.Google.Resource.Compute.Images.List + , Network.Google.Resource.Compute.InstanceGroupManagers.AbandonInstances + , Network.Google.Resource.Compute.InstanceGroupManagers.AggregatedList + , Network.Google.Resource.Compute.InstanceGroupManagers.Delete + , Network.Google.Resource.Compute.InstanceGroupManagers.DeleteInstances + , Network.Google.Resource.Compute.InstanceGroupManagers.Get + , Network.Google.Resource.Compute.InstanceGroupManagers.Insert + , Network.Google.Resource.Compute.InstanceGroupManagers.List + , Network.Google.Resource.Compute.InstanceGroupManagers.ListManagedInstances + , Network.Google.Resource.Compute.InstanceGroupManagers.RecreateInstances + , Network.Google.Resource.Compute.InstanceGroupManagers.Resize + , Network.Google.Resource.Compute.InstanceGroupManagers.SetInstanceTemplate + , Network.Google.Resource.Compute.InstanceGroupManagers.SetTargetPools + , Network.Google.Resource.Compute.InstanceGroups.AddInstances + , Network.Google.Resource.Compute.InstanceGroups.AggregatedList + , Network.Google.Resource.Compute.InstanceGroups.Delete + , Network.Google.Resource.Compute.InstanceGroups.Get + , Network.Google.Resource.Compute.InstanceGroups.Insert + , Network.Google.Resource.Compute.InstanceGroups.List + , Network.Google.Resource.Compute.InstanceGroups.ListInstances + , Network.Google.Resource.Compute.InstanceGroups.RemoveInstances + , Network.Google.Resource.Compute.InstanceGroups.SetNamedPorts + , Network.Google.Resource.Compute.InstanceTemplates.Delete + , Network.Google.Resource.Compute.InstanceTemplates.Get + , Network.Google.Resource.Compute.InstanceTemplates.Insert + , Network.Google.Resource.Compute.InstanceTemplates.List + , Network.Google.Resource.Compute.Instances.AddAccessConfig + , Network.Google.Resource.Compute.Instances.AggregatedList + , Network.Google.Resource.Compute.Instances.AttachDisk + , Network.Google.Resource.Compute.Instances.Delete + , Network.Google.Resource.Compute.Instances.DeleteAccessConfig + , Network.Google.Resource.Compute.Instances.DetachDisk + , Network.Google.Resource.Compute.Instances.Get + , Network.Google.Resource.Compute.Instances.GetSerialPortOutput + , Network.Google.Resource.Compute.Instances.Insert + , Network.Google.Resource.Compute.Instances.List + , Network.Google.Resource.Compute.Instances.Reset + , Network.Google.Resource.Compute.Instances.SetDiskAutoDelete + , Network.Google.Resource.Compute.Instances.SetMetadata + , Network.Google.Resource.Compute.Instances.SetScheduling + , Network.Google.Resource.Compute.Instances.SetTags + , Network.Google.Resource.Compute.Instances.Start + , Network.Google.Resource.Compute.Instances.Stop + , Network.Google.Resource.Compute.Licenses.Get + , Network.Google.Resource.Compute.MachineTypes.AggregatedList + , Network.Google.Resource.Compute.MachineTypes.Get + , Network.Google.Resource.Compute.MachineTypes.List + , Network.Google.Resource.Compute.Networks.Delete + , Network.Google.Resource.Compute.Networks.Get + , Network.Google.Resource.Compute.Networks.Insert + , Network.Google.Resource.Compute.Networks.List + , Network.Google.Resource.Compute.Projects.Get + , Network.Google.Resource.Compute.Projects.MoveDisk + , Network.Google.Resource.Compute.Projects.MoveInstance + , Network.Google.Resource.Compute.Projects.SetCommonInstanceMetadata + , Network.Google.Resource.Compute.Projects.SetUsageExportBucket + , Network.Google.Resource.Compute.RegionOperations.Delete + , Network.Google.Resource.Compute.RegionOperations.Get + , Network.Google.Resource.Compute.RegionOperations.List + , Network.Google.Resource.Compute.Regions.Get + , Network.Google.Resource.Compute.Regions.List + , Network.Google.Resource.Compute.Routes.Delete + , Network.Google.Resource.Compute.Routes.Get + , Network.Google.Resource.Compute.Routes.Insert + , Network.Google.Resource.Compute.Routes.List + , Network.Google.Resource.Compute.Snapshots.Delete + , Network.Google.Resource.Compute.Snapshots.Get + , Network.Google.Resource.Compute.Snapshots.List + , Network.Google.Resource.Compute.TargetHTTPProxies.Delete + , Network.Google.Resource.Compute.TargetHTTPProxies.Get + , Network.Google.Resource.Compute.TargetHTTPProxies.Insert + , Network.Google.Resource.Compute.TargetHTTPProxies.List + , Network.Google.Resource.Compute.TargetHTTPProxies.SetURLMap + , Network.Google.Resource.Compute.TargetInstances.AggregatedList + , Network.Google.Resource.Compute.TargetInstances.Delete + , Network.Google.Resource.Compute.TargetInstances.Get + , Network.Google.Resource.Compute.TargetInstances.Insert + , Network.Google.Resource.Compute.TargetInstances.List + , Network.Google.Resource.Compute.TargetPools.AddHealthCheck + , Network.Google.Resource.Compute.TargetPools.AddInstance + , Network.Google.Resource.Compute.TargetPools.AggregatedList + , Network.Google.Resource.Compute.TargetPools.Delete + , Network.Google.Resource.Compute.TargetPools.Get + , Network.Google.Resource.Compute.TargetPools.GetHealth + , Network.Google.Resource.Compute.TargetPools.Insert + , Network.Google.Resource.Compute.TargetPools.List + , Network.Google.Resource.Compute.TargetPools.RemoveHealthCheck + , Network.Google.Resource.Compute.TargetPools.RemoveInstance + , Network.Google.Resource.Compute.TargetPools.SetBackup + , Network.Google.Resource.Compute.TargetVPNGateways.AggregatedList + , Network.Google.Resource.Compute.TargetVPNGateways.Delete + , Network.Google.Resource.Compute.TargetVPNGateways.Get + , Network.Google.Resource.Compute.TargetVPNGateways.Insert + , Network.Google.Resource.Compute.TargetVPNGateways.List + , Network.Google.Resource.Compute.URLMaps.Delete + , Network.Google.Resource.Compute.URLMaps.Get + , Network.Google.Resource.Compute.URLMaps.Insert + , Network.Google.Resource.Compute.URLMaps.List + , Network.Google.Resource.Compute.URLMaps.Patch + , Network.Google.Resource.Compute.URLMaps.Update + , Network.Google.Resource.Compute.URLMaps.Validate + , Network.Google.Resource.Compute.VPNTunnels.AggregatedList + , Network.Google.Resource.Compute.VPNTunnels.Delete + , Network.Google.Resource.Compute.VPNTunnels.Get + , Network.Google.Resource.Compute.VPNTunnels.Insert + , Network.Google.Resource.Compute.VPNTunnels.List + , Network.Google.Resource.Compute.ZoneOperations.Delete + , Network.Google.Resource.Compute.ZoneOperations.Get + , Network.Google.Resource.Compute.ZoneOperations.List + , Network.Google.Resource.Compute.Zones.Get + , Network.Google.Resource.Compute.Zones.List + + other-modules: + Network.Google.Compute.Types.Product + , Network.Google.Compute.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-compute/src/.gitkeep b/gogol-compute/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-container/LICENSE b/gogol-container/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-container/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-container/Makefile b/gogol-container/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-container/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-container/README.md b/gogol-container/README.md new file mode 100644 index 000000000..df9475ce7 --- /dev/null +++ b/gogol-container/README.md @@ -0,0 +1,28 @@ +# gogol-container + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Container Engine API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-container` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-container/Setup.hs b/gogol-container/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-container/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-container/gen/Network/Google/Container.hs b/gogol-container/gen/Network/Google/Container.hs new file mode 100644 index 000000000..c3dbc0a69 --- /dev/null +++ b/gogol-container/gen/Network/Google/Container.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Container +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Container Engine API is used for building and managing +-- container based applications, powered by the open source Kubernetes +-- technology. +-- +-- /See:/ +module Network.Google.Container + ( + -- * API + ContainerAPI + , containerAPI + , containerURL + + -- * Service Methods + + -- * REST Resources + + -- ** ContainerProjectsClustersList + , module Container.Projects.Clusters.List + + -- ** ContainerProjectsOperationsList + , module Container.Projects.Operations.List + + -- ** ContainerProjectsZonesClustersCreate + , module Container.Projects.Zones.Clusters.Create + + -- ** ContainerProjectsZonesClustersDelete + , module Container.Projects.Zones.Clusters.Delete + + -- ** ContainerProjectsZonesClustersGet + , module Container.Projects.Zones.Clusters.Get + + -- ** ContainerProjectsZonesClustersList + , module Container.Projects.Zones.Clusters.List + + -- ** ContainerProjectsZonesOperationsGet + , module Container.Projects.Zones.Operations.Get + + -- ** ContainerProjectsZonesOperationsList + , module Container.Projects.Zones.Operations.List + + -- * Types + + -- ** ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorOperations + + -- ** CreateClusterRequest + , CreateClusterRequest + , createClusterRequest + , ccrCluster + + -- ** Cluster + , Cluster + , cluster + , cStatus + , cNodeConfig + , cNumNodes + , cClusterApiVersion + , cNetwork + , cZone + , cServicesIpv4Cidr + , cMasterAuth + , cSelfLink + , cEnableCloudMonitoring + , cName + , cStatusMessage + , cCreationTimestamp + , cContainerIpv4Cidr + , cEndpoint + , cEnableCloudLogging + , cDescription + , cInstanceGroupUrls + , cNodeRoutingPrefixSize + + -- ** ListAggregatedOperationsResponse + , ListAggregatedOperationsResponse + , listAggregatedOperationsResponse + , laorOperations + + -- ** NodeConfig + , NodeConfig + , nodeConfig + , ncServiceAccounts + , ncSourceImage + , ncMachineType + + -- ** Operation + , Operation + , operation + , oStatus + , oZone + , oSelfLink + , oName + , oOperationType + , oErrorMessage + , oTargetLink + , oTarget + + -- ** ServiceAccount + , ServiceAccount + , serviceAccount + , saEmail + , saScopes + + -- ** MasterAuth + , MasterAuth + , masterAuth + , maBearerToken + , maClientKey + , maUser + , maClientCertificate + , maPassword + , maClusterCaCertificate + + -- ** ListAggregatedClustersResponse + , ListAggregatedClustersResponse + , listAggregatedClustersResponse + , lacrClusters + + -- ** ListClustersResponse + , ListClustersResponse + , listClustersResponse + , lcrClusters + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude +import Network.Google.Resource.Container.Projects.Clusters.List +import Network.Google.Resource.Container.Projects.Operations.List +import Network.Google.Resource.Container.Projects.Zones.Clusters.Create +import Network.Google.Resource.Container.Projects.Zones.Clusters.Delete +import Network.Google.Resource.Container.Projects.Zones.Clusters.Get +import Network.Google.Resource.Container.Projects.Zones.Clusters.List +import Network.Google.Resource.Container.Projects.Zones.Operations.Get +import Network.Google.Resource.Container.Projects.Zones.Operations.List + +{- $resources +TODO +-} + +type ContainerAPI = Projects + +containerAPI :: Proxy ContainerAPI +containerAPI = Proxy diff --git a/gogol-container/gen/Network/Google/Container/Types.hs b/gogol-container/gen/Network/Google/Container/Types.hs new file mode 100644 index 000000000..af3a851ce --- /dev/null +++ b/gogol-container/gen/Network/Google/Container/Types.hs @@ -0,0 +1,113 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Container.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Container.Types + ( + -- * Service URL + containerURL + + -- * ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorOperations + + -- * CreateClusterRequest + , CreateClusterRequest + , createClusterRequest + , ccrCluster + + -- * Cluster + , Cluster + , cluster + , cStatus + , cNodeConfig + , cNumNodes + , cClusterApiVersion + , cNetwork + , cZone + , cServicesIpv4Cidr + , cMasterAuth + , cSelfLink + , cEnableCloudMonitoring + , cName + , cStatusMessage + , cCreationTimestamp + , cContainerIpv4Cidr + , cEndpoint + , cEnableCloudLogging + , cDescription + , cInstanceGroupUrls + , cNodeRoutingPrefixSize + + -- * ListAggregatedOperationsResponse + , ListAggregatedOperationsResponse + , listAggregatedOperationsResponse + , laorOperations + + -- * NodeConfig + , NodeConfig + , nodeConfig + , ncServiceAccounts + , ncSourceImage + , ncMachineType + + -- * Operation + , Operation + , operation + , oStatus + , oZone + , oSelfLink + , oName + , oOperationType + , oErrorMessage + , oTargetLink + , oTarget + + -- * ServiceAccount + , ServiceAccount + , serviceAccount + , saEmail + , saScopes + + -- * MasterAuth + , MasterAuth + , masterAuth + , maBearerToken + , maClientKey + , maUser + , maClientCertificate + , maPassword + , maClusterCaCertificate + + -- * ListAggregatedClustersResponse + , ListAggregatedClustersResponse + , listAggregatedClustersResponse + , lacrClusters + + -- * ListClustersResponse + , ListClustersResponse + , listClustersResponse + , lcrClusters + ) where + +import Network.Google.Container.Types.Product +import Network.Google.Container.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta1' of the Google Container Engine API. +containerURL :: BaseURL +containerURL + = BaseUrl Https + "https://www.googleapis.com/container/v1beta1/projects/" + 443 diff --git a/gogol-container/gen/Network/Google/Container/Types/Product.hs b/gogol-container/gen/Network/Google/Container/Types/Product.hs new file mode 100644 index 000000000..5063527b0 --- /dev/null +++ b/gogol-container/gen/Network/Google/Container/Types/Product.hs @@ -0,0 +1,812 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Container.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Container.Types.Product where + +import Network.Google.Container.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'listOperationsResponse' smart constructor. +newtype ListOperationsResponse = ListOperationsResponse + { _lorOperations :: Maybe [Maybe Operation] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorOperations' +listOperationsResponse + :: ListOperationsResponse +listOperationsResponse = + ListOperationsResponse + { _lorOperations = Nothing + } + +-- | A list of operations in the project in the specified zone. +lorOperations :: Lens' ListOperationsResponse [Maybe Operation] +lorOperations + = lens _lorOperations + (\ s a -> s{_lorOperations = a}) + . _Default + . _Coerce + +instance FromJSON ListOperationsResponse where + parseJSON + = withObject "ListOperationsResponse" + (\ o -> + ListOperationsResponse <$> + (o .:? "operations" .!= mempty)) + +instance ToJSON ListOperationsResponse where + toJSON ListOperationsResponse{..} + = object + (catMaybes [("operations" .=) <$> _lorOperations]) + +-- +-- /See:/ 'createClusterRequest' smart constructor. +newtype CreateClusterRequest = CreateClusterRequest + { _ccrCluster :: Maybe (Maybe Cluster) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateClusterRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccrCluster' +createClusterRequest + :: CreateClusterRequest +createClusterRequest = + CreateClusterRequest + { _ccrCluster = Nothing + } + +-- | A cluster resource. +ccrCluster :: Lens' CreateClusterRequest (Maybe (Maybe Cluster)) +ccrCluster + = lens _ccrCluster (\ s a -> s{_ccrCluster = a}) + +instance FromJSON CreateClusterRequest where + parseJSON + = withObject "CreateClusterRequest" + (\ o -> CreateClusterRequest <$> (o .:? "cluster")) + +instance ToJSON CreateClusterRequest where + toJSON CreateClusterRequest{..} + = object (catMaybes [("cluster" .=) <$> _ccrCluster]) + +-- +-- /See:/ 'cluster' smart constructor. +data Cluster = Cluster + { _cStatus :: !(Maybe Text) + , _cNodeConfig :: !(Maybe (Maybe NodeConfig)) + , _cNumNodes :: !(Maybe Int32) + , _cClusterApiVersion :: !(Maybe Text) + , _cNetwork :: !(Maybe Text) + , _cZone :: !(Maybe Text) + , _cServicesIpv4Cidr :: !(Maybe Text) + , _cMasterAuth :: !(Maybe (Maybe MasterAuth)) + , _cSelfLink :: !(Maybe Text) + , _cEnableCloudMonitoring :: !(Maybe Bool) + , _cName :: !(Maybe Text) + , _cStatusMessage :: !(Maybe Text) + , _cCreationTimestamp :: !(Maybe Text) + , _cContainerIpv4Cidr :: !(Maybe Text) + , _cEndpoint :: !(Maybe Text) + , _cEnableCloudLogging :: !(Maybe Bool) + , _cDescription :: !(Maybe Text) + , _cInstanceGroupUrls :: !(Maybe [Text]) + , _cNodeRoutingPrefixSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Cluster' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cStatus' +-- +-- * 'cNodeConfig' +-- +-- * 'cNumNodes' +-- +-- * 'cClusterApiVersion' +-- +-- * 'cNetwork' +-- +-- * 'cZone' +-- +-- * 'cServicesIpv4Cidr' +-- +-- * 'cMasterAuth' +-- +-- * 'cSelfLink' +-- +-- * 'cEnableCloudMonitoring' +-- +-- * 'cName' +-- +-- * 'cStatusMessage' +-- +-- * 'cCreationTimestamp' +-- +-- * 'cContainerIpv4Cidr' +-- +-- * 'cEndpoint' +-- +-- * 'cEnableCloudLogging' +-- +-- * 'cDescription' +-- +-- * 'cInstanceGroupUrls' +-- +-- * 'cNodeRoutingPrefixSize' +cluster + :: Cluster +cluster = + Cluster + { _cStatus = Nothing + , _cNodeConfig = Nothing + , _cNumNodes = Nothing + , _cClusterApiVersion = Nothing + , _cNetwork = Nothing + , _cZone = Nothing + , _cServicesIpv4Cidr = Nothing + , _cMasterAuth = Nothing + , _cSelfLink = Nothing + , _cEnableCloudMonitoring = Nothing + , _cName = Nothing + , _cStatusMessage = Nothing + , _cCreationTimestamp = Nothing + , _cContainerIpv4Cidr = Nothing + , _cEndpoint = Nothing + , _cEnableCloudLogging = Nothing + , _cDescription = Nothing + , _cInstanceGroupUrls = Nothing + , _cNodeRoutingPrefixSize = Nothing + } + +-- | [Output only] The current status of this cluster. +cStatus :: Lens' Cluster (Maybe Text) +cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) + +-- | The machine type and image to use for all nodes in this cluster. See the +-- descriptions of the child properties of nodeConfig. +cNodeConfig :: Lens' Cluster (Maybe (Maybe NodeConfig)) +cNodeConfig + = lens _cNodeConfig (\ s a -> s{_cNodeConfig = a}) + +-- | The number of nodes to create in this cluster. You must ensure that your +-- Compute Engine resource quota is sufficient for this number of instances +-- plus one (to include the master). You must also have available firewall +-- and routes quota. +cNumNodes :: Lens' Cluster (Maybe Int32) +cNumNodes + = lens _cNumNodes (\ s a -> s{_cNumNodes = a}) + +-- | The API version of the Kubernetes master and kubelets running in this +-- cluster. Leave blank to pick up the latest stable release, or specify a +-- version of the form \"x.y.z\". The Google Container Engine release notes +-- lists the currently supported versions. If an incorrect version is +-- specified, the server returns an error listing the currently supported +-- versions. +cClusterApiVersion :: Lens' Cluster (Maybe Text) +cClusterApiVersion + = lens _cClusterApiVersion + (\ s a -> s{_cClusterApiVersion = a}) + +-- | The name of the Google Compute Engine network to which the cluster is +-- connected. +cNetwork :: Lens' Cluster (Maybe Text) +cNetwork = lens _cNetwork (\ s a -> s{_cNetwork = a}) + +-- | [Output only] The name of the Google Compute Engine zone in which the +-- cluster resides. +cZone :: Lens' Cluster (Maybe Text) +cZone = lens _cZone (\ s a -> s{_cZone = a}) + +-- | [Output only] The IP address range of the Kubernetes services in this +-- cluster, in CIDR notation (e.g. 1.2.3.4\/29). Service addresses are +-- typically put in the last \/16 from the container CIDR. +cServicesIpv4Cidr :: Lens' Cluster (Maybe Text) +cServicesIpv4Cidr + = lens _cServicesIpv4Cidr + (\ s a -> s{_cServicesIpv4Cidr = a}) + +-- | The authentication information for accessing the master. +cMasterAuth :: Lens' Cluster (Maybe (Maybe MasterAuth)) +cMasterAuth + = lens _cMasterAuth (\ s a -> s{_cMasterAuth = a}) + +-- | [Output only] Server-defined URL for the resource. +cSelfLink :: Lens' Cluster (Maybe Text) +cSelfLink + = lens _cSelfLink (\ s a -> s{_cSelfLink = a}) + +-- | Whether metrics from the cluster should be made available via the Google +-- Cloud Monitoring service. +cEnableCloudMonitoring :: Lens' Cluster (Maybe Bool) +cEnableCloudMonitoring + = lens _cEnableCloudMonitoring + (\ s a -> s{_cEnableCloudMonitoring = a}) + +-- | The name of this cluster. The name must be unique within this project +-- and zone, and can be up to 40 characters with the following +-- restrictions: - Lowercase letters, numbers, and hyphens only. - Must +-- start with a letter. - Must end with a number or a letter. +cName :: Lens' Cluster (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | [Output only] Additional information about the current status of this +-- cluster, if available. +cStatusMessage :: Lens' Cluster (Maybe Text) +cStatusMessage + = lens _cStatusMessage + (\ s a -> s{_cStatusMessage = a}) + +-- | [Output only] The time the cluster was created, in RFC3339 text format. +cCreationTimestamp :: Lens' Cluster (Maybe Text) +cCreationTimestamp + = lens _cCreationTimestamp + (\ s a -> s{_cCreationTimestamp = a}) + +-- | The IP address range of the container pods in this cluster, in CIDR +-- notation (e.g. 10.96.0.0\/14). Leave blank to have one automatically +-- chosen or specify a \/14 block in 10.0.0.0\/8. +cContainerIpv4Cidr :: Lens' Cluster (Maybe Text) +cContainerIpv4Cidr + = lens _cContainerIpv4Cidr + (\ s a -> s{_cContainerIpv4Cidr = a}) + +-- | [Output only] The IP address of this cluster\'s Kubernetes master. The +-- endpoint can be accessed from the internet at +-- https:\/\/username:password\'endpoint\/. See the masterAuth property of +-- this resource for username and password information. +cEndpoint :: Lens' Cluster (Maybe Text) +cEndpoint + = lens _cEndpoint (\ s a -> s{_cEndpoint = a}) + +-- | Whether logs from the cluster should be made available via the Google +-- Cloud Logging service. This includes both logs from your applications +-- running in the cluster as well as logs from the Kubernetes components +-- themselves. +cEnableCloudLogging :: Lens' Cluster (Maybe Bool) +cEnableCloudLogging + = lens _cEnableCloudLogging + (\ s a -> s{_cEnableCloudLogging = a}) + +-- | An optional description of this cluster. +cDescription :: Lens' Cluster (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +-- | [Output only] The resource URLs of [instance +-- groups](\/compute\/docs\/instance-groups\/) associated with this +-- cluster. +cInstanceGroupUrls :: Lens' Cluster [Text] +cInstanceGroupUrls + = lens _cInstanceGroupUrls + (\ s a -> s{_cInstanceGroupUrls = a}) + . _Default + . _Coerce + +-- | [Output only] The size of the address space on each node for hosting +-- containers. +cNodeRoutingPrefixSize :: Lens' Cluster (Maybe Int32) +cNodeRoutingPrefixSize + = lens _cNodeRoutingPrefixSize + (\ s a -> s{_cNodeRoutingPrefixSize = a}) + +instance FromJSON Cluster where + parseJSON + = withObject "Cluster" + (\ o -> + Cluster <$> + (o .:? "status") <*> (o .:? "nodeConfig") <*> + (o .:? "numNodes") + <*> (o .:? "clusterApiVersion") + <*> (o .:? "network") + <*> (o .:? "zone") + <*> (o .:? "servicesIpv4Cidr") + <*> (o .:? "masterAuth") + <*> (o .:? "selfLink") + <*> (o .:? "enableCloudMonitoring") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "containerIpv4Cidr") + <*> (o .:? "endpoint") + <*> (o .:? "enableCloudLogging") + <*> (o .:? "description") + <*> (o .:? "instanceGroupUrls" .!= mempty) + <*> (o .:? "nodeRoutingPrefixSize")) + +instance ToJSON Cluster where + toJSON Cluster{..} + = object + (catMaybes + [("status" .=) <$> _cStatus, + ("nodeConfig" .=) <$> _cNodeConfig, + ("numNodes" .=) <$> _cNumNodes, + ("clusterApiVersion" .=) <$> _cClusterApiVersion, + ("network" .=) <$> _cNetwork, ("zone" .=) <$> _cZone, + ("servicesIpv4Cidr" .=) <$> _cServicesIpv4Cidr, + ("masterAuth" .=) <$> _cMasterAuth, + ("selfLink" .=) <$> _cSelfLink, + ("enableCloudMonitoring" .=) <$> + _cEnableCloudMonitoring, + ("name" .=) <$> _cName, + ("statusMessage" .=) <$> _cStatusMessage, + ("creationTimestamp" .=) <$> _cCreationTimestamp, + ("containerIpv4Cidr" .=) <$> _cContainerIpv4Cidr, + ("endpoint" .=) <$> _cEndpoint, + ("enableCloudLogging" .=) <$> _cEnableCloudLogging, + ("description" .=) <$> _cDescription, + ("instanceGroupUrls" .=) <$> _cInstanceGroupUrls, + ("nodeRoutingPrefixSize" .=) <$> + _cNodeRoutingPrefixSize]) + +-- +-- /See:/ 'listAggregatedOperationsResponse' smart constructor. +newtype ListAggregatedOperationsResponse = ListAggregatedOperationsResponse + { _laorOperations :: Maybe [Maybe Operation] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListAggregatedOperationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laorOperations' +listAggregatedOperationsResponse + :: ListAggregatedOperationsResponse +listAggregatedOperationsResponse = + ListAggregatedOperationsResponse + { _laorOperations = Nothing + } + +-- | A list of operations in the project, across all zones. +laorOperations :: Lens' ListAggregatedOperationsResponse [Maybe Operation] +laorOperations + = lens _laorOperations + (\ s a -> s{_laorOperations = a}) + . _Default + . _Coerce + +instance FromJSON ListAggregatedOperationsResponse + where + parseJSON + = withObject "ListAggregatedOperationsResponse" + (\ o -> + ListAggregatedOperationsResponse <$> + (o .:? "operations" .!= mempty)) + +instance ToJSON ListAggregatedOperationsResponse + where + toJSON ListAggregatedOperationsResponse{..} + = object + (catMaybes [("operations" .=) <$> _laorOperations]) + +-- +-- /See:/ 'nodeConfig' smart constructor. +data NodeConfig = NodeConfig + { _ncServiceAccounts :: !(Maybe [Maybe ServiceAccount]) + , _ncSourceImage :: !(Maybe Text) + , _ncMachineType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NodeConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ncServiceAccounts' +-- +-- * 'ncSourceImage' +-- +-- * 'ncMachineType' +nodeConfig + :: NodeConfig +nodeConfig = + NodeConfig + { _ncServiceAccounts = Nothing + , _ncSourceImage = Nothing + , _ncMachineType = Nothing + } + +-- | The optional list of ServiceAccounts, each with their specified scopes, +-- to be made available on all of the node VMs. In addition to the service +-- accounts and scopes specified, the \"default\" account will always be +-- created with the following scopes to ensure the correct functioning of +-- the cluster: - https:\/\/www.googleapis.com\/auth\/compute, - +-- https:\/\/www.googleapis.com\/auth\/devstorage.read_only +ncServiceAccounts :: Lens' NodeConfig [Maybe ServiceAccount] +ncServiceAccounts + = lens _ncServiceAccounts + (\ s a -> s{_ncServiceAccounts = a}) + . _Default + . _Coerce + +-- | The fully-specified name of a Google Compute Engine image. For example: +-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/debian-cloud\/global\/images\/backports-debian-7-wheezy-vYYYYMMDD +-- (where YYYMMDD is the version date). If specifying an image, you are +-- responsible for ensuring its compatibility with the Debian 7 backports +-- image. We recommend leaving this field blank to accept the default +-- backports-debian-7-wheezy value. +ncSourceImage :: Lens' NodeConfig (Maybe Text) +ncSourceImage + = lens _ncSourceImage + (\ s a -> s{_ncSourceImage = a}) + +-- | The name of a Google Compute Engine machine type (e.g. n1-standard-1). +-- If unspecified, the default machine type is n1-standard-1. +ncMachineType :: Lens' NodeConfig (Maybe Text) +ncMachineType + = lens _ncMachineType + (\ s a -> s{_ncMachineType = a}) + +instance FromJSON NodeConfig where + parseJSON + = withObject "NodeConfig" + (\ o -> + NodeConfig <$> + (o .:? "serviceAccounts" .!= mempty) <*> + (o .:? "sourceImage") + <*> (o .:? "machineType")) + +instance ToJSON NodeConfig where + toJSON NodeConfig{..} + = object + (catMaybes + [("serviceAccounts" .=) <$> _ncServiceAccounts, + ("sourceImage" .=) <$> _ncSourceImage, + ("machineType" .=) <$> _ncMachineType]) + +-- | Defines the operation resource. All fields are output only. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oStatus :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oOperationType :: !(Maybe Text) + , _oErrorMessage :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oTarget :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oStatus' +-- +-- * 'oZone' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oOperationType' +-- +-- * 'oErrorMessage' +-- +-- * 'oTargetLink' +-- +-- * 'oTarget' +operation + :: Operation +operation = + Operation + { _oStatus = Nothing + , _oZone = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oOperationType = Nothing + , _oErrorMessage = Nothing + , _oTargetLink = Nothing + , _oTarget = Nothing + } + +-- | The current status of the operation. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | The name of the Google Compute Engine zone in which the operation is +-- taking place. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | Server-defined URL for the resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | The server-assigned ID for the operation. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | The operation type. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | If an error has occurred, a textual description of the error. +oErrorMessage :: Lens' Operation (Maybe Text) +oErrorMessage + = lens _oErrorMessage + (\ s a -> s{_oErrorMessage = a}) + +-- | Server-defined URL for the target of the operation. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Optional] The URL of the cluster resource that this operation is +-- associated with. +oTarget :: Lens' Operation (Maybe Text) +oTarget = lens _oTarget (\ s a -> s{_oTarget = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "status") <*> (o .:? "zone") <*> + (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "operationType") + <*> (o .:? "errorMessage") + <*> (o .:? "targetLink") + <*> (o .:? "target")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("status" .=) <$> _oStatus, ("zone" .=) <$> _oZone, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("operationType" .=) <$> _oOperationType, + ("errorMessage" .=) <$> _oErrorMessage, + ("targetLink" .=) <$> _oTargetLink, + ("target" .=) <$> _oTarget]) + +-- | A Compute Engine service account. +-- +-- /See:/ 'serviceAccount' smart constructor. +data ServiceAccount = ServiceAccount + { _saEmail :: !(Maybe Text) + , _saScopes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saEmail' +-- +-- * 'saScopes' +serviceAccount + :: ServiceAccount +serviceAccount = + ServiceAccount + { _saEmail = Nothing + , _saScopes = Nothing + } + +-- | Email address of the service account. +saEmail :: Lens' ServiceAccount (Maybe Text) +saEmail = lens _saEmail (\ s a -> s{_saEmail = a}) + +-- | The list of scopes to be made available for this service account. +saScopes :: Lens' ServiceAccount [Text] +saScopes + = lens _saScopes (\ s a -> s{_saScopes = a}) . + _Default + . _Coerce + +instance FromJSON ServiceAccount where + parseJSON + = withObject "ServiceAccount" + (\ o -> + ServiceAccount <$> + (o .:? "email") <*> (o .:? "scopes" .!= mempty)) + +instance ToJSON ServiceAccount where + toJSON ServiceAccount{..} + = object + (catMaybes + [("email" .=) <$> _saEmail, + ("scopes" .=) <$> _saScopes]) + +-- | The authentication information for accessing the master. Authentication +-- is either done using HTTP basic authentication or using a bearer token. +-- +-- /See:/ 'masterAuth' smart constructor. +data MasterAuth = MasterAuth + { _maBearerToken :: !(Maybe Text) + , _maClientKey :: !(Maybe Text) + , _maUser :: !(Maybe Text) + , _maClientCertificate :: !(Maybe Text) + , _maPassword :: !(Maybe Text) + , _maClusterCaCertificate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MasterAuth' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'maBearerToken' +-- +-- * 'maClientKey' +-- +-- * 'maUser' +-- +-- * 'maClientCertificate' +-- +-- * 'maPassword' +-- +-- * 'maClusterCaCertificate' +masterAuth + :: MasterAuth +masterAuth = + MasterAuth + { _maBearerToken = Nothing + , _maClientKey = Nothing + , _maUser = Nothing + , _maClientCertificate = Nothing + , _maPassword = Nothing + , _maClusterCaCertificate = Nothing + } + +-- | The token used to authenticate API requests to the master. The token is +-- to be included in an HTTP Authorization Header in all requests to the +-- master endpoint. The format of the header is: \"Authorization: Bearer +-- \". +maBearerToken :: Lens' MasterAuth (Maybe Text) +maBearerToken + = lens _maBearerToken + (\ s a -> s{_maBearerToken = a}) + +-- | [Output only] Base64 encoded private key used by clients to authenticate +-- to the cluster endpoint. +maClientKey :: Lens' MasterAuth (Maybe Text) +maClientKey + = lens _maClientKey (\ s a -> s{_maClientKey = a}) + +-- | The username to use for HTTP basic authentication when accessing the +-- Kubernetes master endpoint. +maUser :: Lens' MasterAuth (Maybe Text) +maUser = lens _maUser (\ s a -> s{_maUser = a}) + +-- | [Output only] Base64 encoded public certificate used by clients to +-- authenticate to the cluster endpoint. +maClientCertificate :: Lens' MasterAuth (Maybe Text) +maClientCertificate + = lens _maClientCertificate + (\ s a -> s{_maClientCertificate = a}) + +-- | The password to use for HTTP basic authentication when accessing the +-- Kubernetes master endpoint. Because the master endpoint is open to the +-- internet, you should create a strong password. +maPassword :: Lens' MasterAuth (Maybe Text) +maPassword + = lens _maPassword (\ s a -> s{_maPassword = a}) + +-- | [Output only] Base64 encoded public certificate that is the root of +-- trust for the cluster. +maClusterCaCertificate :: Lens' MasterAuth (Maybe Text) +maClusterCaCertificate + = lens _maClusterCaCertificate + (\ s a -> s{_maClusterCaCertificate = a}) + +instance FromJSON MasterAuth where + parseJSON + = withObject "MasterAuth" + (\ o -> + MasterAuth <$> + (o .:? "bearerToken") <*> (o .:? "clientKey") <*> + (o .:? "user") + <*> (o .:? "clientCertificate") + <*> (o .:? "password") + <*> (o .:? "clusterCaCertificate")) + +instance ToJSON MasterAuth where + toJSON MasterAuth{..} + = object + (catMaybes + [("bearerToken" .=) <$> _maBearerToken, + ("clientKey" .=) <$> _maClientKey, + ("user" .=) <$> _maUser, + ("clientCertificate" .=) <$> _maClientCertificate, + ("password" .=) <$> _maPassword, + ("clusterCaCertificate" .=) <$> + _maClusterCaCertificate]) + +-- +-- /See:/ 'listAggregatedClustersResponse' smart constructor. +newtype ListAggregatedClustersResponse = ListAggregatedClustersResponse + { _lacrClusters :: Maybe [Maybe Cluster] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListAggregatedClustersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lacrClusters' +listAggregatedClustersResponse + :: ListAggregatedClustersResponse +listAggregatedClustersResponse = + ListAggregatedClustersResponse + { _lacrClusters = Nothing + } + +-- | A list of clusters in the project, across all zones. +lacrClusters :: Lens' ListAggregatedClustersResponse [Maybe Cluster] +lacrClusters + = lens _lacrClusters (\ s a -> s{_lacrClusters = a}) + . _Default + . _Coerce + +instance FromJSON ListAggregatedClustersResponse + where + parseJSON + = withObject "ListAggregatedClustersResponse" + (\ o -> + ListAggregatedClustersResponse <$> + (o .:? "clusters" .!= mempty)) + +instance ToJSON ListAggregatedClustersResponse where + toJSON ListAggregatedClustersResponse{..} + = object + (catMaybes [("clusters" .=) <$> _lacrClusters]) + +-- +-- /See:/ 'listClustersResponse' smart constructor. +newtype ListClustersResponse = ListClustersResponse + { _lcrClusters :: Maybe [Maybe Cluster] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListClustersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcrClusters' +listClustersResponse + :: ListClustersResponse +listClustersResponse = + ListClustersResponse + { _lcrClusters = Nothing + } + +-- | A list of clusters in the project in the specified zone. +lcrClusters :: Lens' ListClustersResponse [Maybe Cluster] +lcrClusters + = lens _lcrClusters (\ s a -> s{_lcrClusters = a}) . + _Default + . _Coerce + +instance FromJSON ListClustersResponse where + parseJSON + = withObject "ListClustersResponse" + (\ o -> + ListClustersResponse <$> + (o .:? "clusters" .!= mempty)) + +instance ToJSON ListClustersResponse where + toJSON ListClustersResponse{..} + = object + (catMaybes [("clusters" .=) <$> _lcrClusters]) diff --git a/gogol-container/gen/Network/Google/Container/Types/Sum.hs b/gogol-container/gen/Network/Google/Container/Types/Sum.hs new file mode 100644 index 000000000..68ea93768 --- /dev/null +++ b/gogol-container/gen/Network/Google/Container/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Container.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Container.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Clusters/List.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Clusters/List.hs new file mode 100644 index 000000000..a2a0d020d --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Clusters/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Clusters.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all clusters owned by a project across all zones. +-- +-- /See:/ for @ContainerProjectsClustersList@. +module Container.Projects.Clusters.List + ( + -- * REST Resource + ProjectsClustersListAPI + + -- * Creating a Request + , projectsClustersList + , ProjectsClustersList + + -- * Request Lenses + , pclQuotaUser + , pclPrettyPrint + , pclUserIp + , pclKey + , pclProjectId + , pclOauthToken + , pclFields + , pclAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsClustersList@ which the +-- 'ProjectsClustersList' request conforms to. +type ProjectsClustersListAPI = + Capture "projectId" Text :> + "clusters" :> + Get '[JSON] ListAggregatedClustersResponse + +-- | Lists all clusters owned by a project across all zones. +-- +-- /See:/ 'projectsClustersList' smart constructor. +data ProjectsClustersList = ProjectsClustersList + { _pclQuotaUser :: !(Maybe Text) + , _pclPrettyPrint :: !Bool + , _pclUserIp :: !(Maybe Text) + , _pclKey :: !(Maybe Text) + , _pclProjectId :: !Text + , _pclOauthToken :: !(Maybe Text) + , _pclFields :: !(Maybe Text) + , _pclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsClustersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pclQuotaUser' +-- +-- * 'pclPrettyPrint' +-- +-- * 'pclUserIp' +-- +-- * 'pclKey' +-- +-- * 'pclProjectId' +-- +-- * 'pclOauthToken' +-- +-- * 'pclFields' +-- +-- * 'pclAlt' +projectsClustersList + :: Text -- ^ 'projectId' + -> ProjectsClustersList +projectsClustersList pPclProjectId_ = + ProjectsClustersList + { _pclQuotaUser = Nothing + , _pclPrettyPrint = True + , _pclUserIp = Nothing + , _pclKey = Nothing + , _pclProjectId = pPclProjectId_ + , _pclOauthToken = Nothing + , _pclFields = Nothing + , _pclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pclQuotaUser :: Lens' ProjectsClustersList' (Maybe Text) +pclQuotaUser + = lens _pclQuotaUser (\ s a -> s{_pclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pclPrettyPrint :: Lens' ProjectsClustersList' Bool +pclPrettyPrint + = lens _pclPrettyPrint + (\ s a -> s{_pclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pclUserIp :: Lens' ProjectsClustersList' (Maybe Text) +pclUserIp + = lens _pclUserIp (\ s a -> s{_pclUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pclKey :: Lens' ProjectsClustersList' (Maybe Text) +pclKey = lens _pclKey (\ s a -> s{_pclKey = a}) + +-- | The Google Developers Console project ID or project number. +pclProjectId :: Lens' ProjectsClustersList' Text +pclProjectId + = lens _pclProjectId (\ s a -> s{_pclProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pclOauthToken :: Lens' ProjectsClustersList' (Maybe Text) +pclOauthToken + = lens _pclOauthToken + (\ s a -> s{_pclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pclFields :: Lens' ProjectsClustersList' (Maybe Text) +pclFields + = lens _pclFields (\ s a -> s{_pclFields = a}) + +-- | Data format for the response. +pclAlt :: Lens' ProjectsClustersList' Text +pclAlt = lens _pclAlt (\ s a -> s{_pclAlt = a}) + +instance GoogleRequest ProjectsClustersList' where + type Rs ProjectsClustersList' = + ListAggregatedClustersResponse + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsClustersList{..} + = go _pclQuotaUser _pclPrettyPrint _pclUserIp _pclKey + _pclProjectId + _pclOauthToken + _pclFields + _pclAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsClustersListAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Operations/List.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Operations/List.hs new file mode 100644 index 000000000..84cf027bb --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Operations/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Operations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all operations in a project, across all zones. +-- +-- /See:/ for @ContainerProjectsOperationsList@. +module Container.Projects.Operations.List + ( + -- * REST Resource + ProjectsOperationsListAPI + + -- * Creating a Request + , projectsOperationsList + , ProjectsOperationsList + + -- * Request Lenses + , polQuotaUser + , polPrettyPrint + , polUserIp + , polKey + , polProjectId + , polOauthToken + , polFields + , polAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsOperationsList@ which the +-- 'ProjectsOperationsList' request conforms to. +type ProjectsOperationsListAPI = + Capture "projectId" Text :> + "operations" :> + Get '[JSON] ListAggregatedOperationsResponse + +-- | Lists all operations in a project, across all zones. +-- +-- /See:/ 'projectsOperationsList' smart constructor. +data ProjectsOperationsList = ProjectsOperationsList + { _polQuotaUser :: !(Maybe Text) + , _polPrettyPrint :: !Bool + , _polUserIp :: !(Maybe Text) + , _polKey :: !(Maybe Text) + , _polProjectId :: !Text + , _polOauthToken :: !(Maybe Text) + , _polFields :: !(Maybe Text) + , _polAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'polQuotaUser' +-- +-- * 'polPrettyPrint' +-- +-- * 'polUserIp' +-- +-- * 'polKey' +-- +-- * 'polProjectId' +-- +-- * 'polOauthToken' +-- +-- * 'polFields' +-- +-- * 'polAlt' +projectsOperationsList + :: Text -- ^ 'projectId' + -> ProjectsOperationsList +projectsOperationsList pPolProjectId_ = + ProjectsOperationsList + { _polQuotaUser = Nothing + , _polPrettyPrint = True + , _polUserIp = Nothing + , _polKey = Nothing + , _polProjectId = pPolProjectId_ + , _polOauthToken = Nothing + , _polFields = Nothing + , _polAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +polQuotaUser :: Lens' ProjectsOperationsList' (Maybe Text) +polQuotaUser + = lens _polQuotaUser (\ s a -> s{_polQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +polPrettyPrint :: Lens' ProjectsOperationsList' Bool +polPrettyPrint + = lens _polPrettyPrint + (\ s a -> s{_polPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +polUserIp :: Lens' ProjectsOperationsList' (Maybe Text) +polUserIp + = lens _polUserIp (\ s a -> s{_polUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +polKey :: Lens' ProjectsOperationsList' (Maybe Text) +polKey = lens _polKey (\ s a -> s{_polKey = a}) + +-- | The Google Developers Console project ID or project number. +polProjectId :: Lens' ProjectsOperationsList' Text +polProjectId + = lens _polProjectId (\ s a -> s{_polProjectId = a}) + +-- | OAuth 2.0 token for the current user. +polOauthToken :: Lens' ProjectsOperationsList' (Maybe Text) +polOauthToken + = lens _polOauthToken + (\ s a -> s{_polOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +polFields :: Lens' ProjectsOperationsList' (Maybe Text) +polFields + = lens _polFields (\ s a -> s{_polFields = a}) + +-- | Data format for the response. +polAlt :: Lens' ProjectsOperationsList' Text +polAlt = lens _polAlt (\ s a -> s{_polAlt = a}) + +instance GoogleRequest ProjectsOperationsList' where + type Rs ProjectsOperationsList' = + ListAggregatedOperationsResponse + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsOperationsList{..} + = go _polQuotaUser _polPrettyPrint _polUserIp _polKey + _polProjectId + _polOauthToken + _polFields + _polAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsOperationsListAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Create.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Create.hs new file mode 100644 index 000000000..9319ecabe --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Create.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a cluster, consisting of the specified number and type of Google +-- Compute Engine instances, plus a Kubernetes master instance. The cluster +-- is created in the project\'s default network. A firewall is added that +-- allows traffic into port 443 on the master, which enables HTTPS. A +-- firewall and a route is added for each node to allow the containers on +-- that node to communicate with all other instances in the cluster. +-- Finally, an entry is added to the project\'s global metadata indicating +-- which CIDR range is being used by the cluster. +-- +-- /See:/ for @ContainerProjectsZonesClustersCreate@. +module Container.Projects.Zones.Clusters.Create + ( + -- * REST Resource + ProjectsZonesClustersCreateAPI + + -- * Creating a Request + , projectsZonesClustersCreate + , ProjectsZonesClustersCreate + + -- * Request Lenses + , pzccQuotaUser + , pzccPrettyPrint + , pzccUserIp + , pzccZoneId + , pzccKey + , pzccProjectId + , pzccOauthToken + , pzccFields + , pzccAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesClustersCreate@ which the +-- 'ProjectsZonesClustersCreate' request conforms to. +type ProjectsZonesClustersCreateAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "clusters" :> Post '[JSON] Operation + +-- | Creates a cluster, consisting of the specified number and type of Google +-- Compute Engine instances, plus a Kubernetes master instance. The cluster +-- is created in the project\'s default network. A firewall is added that +-- allows traffic into port 443 on the master, which enables HTTPS. A +-- firewall and a route is added for each node to allow the containers on +-- that node to communicate with all other instances in the cluster. +-- Finally, an entry is added to the project\'s global metadata indicating +-- which CIDR range is being used by the cluster. +-- +-- /See:/ 'projectsZonesClustersCreate' smart constructor. +data ProjectsZonesClustersCreate = ProjectsZonesClustersCreate + { _pzccQuotaUser :: !(Maybe Text) + , _pzccPrettyPrint :: !Bool + , _pzccUserIp :: !(Maybe Text) + , _pzccZoneId :: !Text + , _pzccKey :: !(Maybe Text) + , _pzccProjectId :: !Text + , _pzccOauthToken :: !(Maybe Text) + , _pzccFields :: !(Maybe Text) + , _pzccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesClustersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzccQuotaUser' +-- +-- * 'pzccPrettyPrint' +-- +-- * 'pzccUserIp' +-- +-- * 'pzccZoneId' +-- +-- * 'pzccKey' +-- +-- * 'pzccProjectId' +-- +-- * 'pzccOauthToken' +-- +-- * 'pzccFields' +-- +-- * 'pzccAlt' +projectsZonesClustersCreate + :: Text -- ^ 'zoneId' + -> Text -- ^ 'projectId' + -> ProjectsZonesClustersCreate +projectsZonesClustersCreate pPzccZoneId_ pPzccProjectId_ = + ProjectsZonesClustersCreate + { _pzccQuotaUser = Nothing + , _pzccPrettyPrint = True + , _pzccUserIp = Nothing + , _pzccZoneId = pPzccZoneId_ + , _pzccKey = Nothing + , _pzccProjectId = pPzccProjectId_ + , _pzccOauthToken = Nothing + , _pzccFields = Nothing + , _pzccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzccQuotaUser :: Lens' ProjectsZonesClustersCreate' (Maybe Text) +pzccQuotaUser + = lens _pzccQuotaUser + (\ s a -> s{_pzccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzccPrettyPrint :: Lens' ProjectsZonesClustersCreate' Bool +pzccPrettyPrint + = lens _pzccPrettyPrint + (\ s a -> s{_pzccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzccUserIp :: Lens' ProjectsZonesClustersCreate' (Maybe Text) +pzccUserIp + = lens _pzccUserIp (\ s a -> s{_pzccUserIp = a}) + +-- | The name of the Google Compute Engine zone in which the cluster resides. +pzccZoneId :: Lens' ProjectsZonesClustersCreate' Text +pzccZoneId + = lens _pzccZoneId (\ s a -> s{_pzccZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzccKey :: Lens' ProjectsZonesClustersCreate' (Maybe Text) +pzccKey = lens _pzccKey (\ s a -> s{_pzccKey = a}) + +-- | The Google Developers Console project ID or project number. +pzccProjectId :: Lens' ProjectsZonesClustersCreate' Text +pzccProjectId + = lens _pzccProjectId + (\ s a -> s{_pzccProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pzccOauthToken :: Lens' ProjectsZonesClustersCreate' (Maybe Text) +pzccOauthToken + = lens _pzccOauthToken + (\ s a -> s{_pzccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzccFields :: Lens' ProjectsZonesClustersCreate' (Maybe Text) +pzccFields + = lens _pzccFields (\ s a -> s{_pzccFields = a}) + +-- | Data format for the response. +pzccAlt :: Lens' ProjectsZonesClustersCreate' Text +pzccAlt = lens _pzccAlt (\ s a -> s{_pzccAlt = a}) + +instance GoogleRequest ProjectsZonesClustersCreate' + where + type Rs ProjectsZonesClustersCreate' = Operation + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesClustersCreate{..} + = go _pzccQuotaUser _pzccPrettyPrint _pzccUserIp + _pzccZoneId + _pzccKey + _pzccProjectId + _pzccOauthToken + _pzccFields + _pzccAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesClustersCreateAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs new file mode 100644 index 000000000..4b86a06ac --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Delete.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the cluster, including the Kubernetes master and all worker +-- nodes. Firewalls and routes that were configured at cluster creation are +-- also deleted. +-- +-- /See:/ for @ContainerProjectsZonesClustersDelete@. +module Container.Projects.Zones.Clusters.Delete + ( + -- * REST Resource + ProjectsZonesClustersDeleteAPI + + -- * Creating a Request + , projectsZonesClustersDelete + , ProjectsZonesClustersDelete + + -- * Request Lenses + , pzcdQuotaUser + , pzcdPrettyPrint + , pzcdUserIp + , pzcdZoneId + , pzcdKey + , pzcdClusterId + , pzcdProjectId + , pzcdOauthToken + , pzcdFields + , pzcdAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesClustersDelete@ which the +-- 'ProjectsZonesClustersDelete' request conforms to. +type ProjectsZonesClustersDeleteAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "clusters" :> + Capture "clusterId" Text :> Delete '[JSON] Operation + +-- | Deletes the cluster, including the Kubernetes master and all worker +-- nodes. Firewalls and routes that were configured at cluster creation are +-- also deleted. +-- +-- /See:/ 'projectsZonesClustersDelete' smart constructor. +data ProjectsZonesClustersDelete = ProjectsZonesClustersDelete + { _pzcdQuotaUser :: !(Maybe Text) + , _pzcdPrettyPrint :: !Bool + , _pzcdUserIp :: !(Maybe Text) + , _pzcdZoneId :: !Text + , _pzcdKey :: !(Maybe Text) + , _pzcdClusterId :: !Text + , _pzcdProjectId :: !Text + , _pzcdOauthToken :: !(Maybe Text) + , _pzcdFields :: !(Maybe Text) + , _pzcdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesClustersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzcdQuotaUser' +-- +-- * 'pzcdPrettyPrint' +-- +-- * 'pzcdUserIp' +-- +-- * 'pzcdZoneId' +-- +-- * 'pzcdKey' +-- +-- * 'pzcdClusterId' +-- +-- * 'pzcdProjectId' +-- +-- * 'pzcdOauthToken' +-- +-- * 'pzcdFields' +-- +-- * 'pzcdAlt' +projectsZonesClustersDelete + :: Text -- ^ 'zoneId' + -> Text -- ^ 'clusterId' + -> Text -- ^ 'projectId' + -> ProjectsZonesClustersDelete +projectsZonesClustersDelete pPzcdZoneId_ pPzcdClusterId_ pPzcdProjectId_ = + ProjectsZonesClustersDelete + { _pzcdQuotaUser = Nothing + , _pzcdPrettyPrint = True + , _pzcdUserIp = Nothing + , _pzcdZoneId = pPzcdZoneId_ + , _pzcdKey = Nothing + , _pzcdClusterId = pPzcdClusterId_ + , _pzcdProjectId = pPzcdProjectId_ + , _pzcdOauthToken = Nothing + , _pzcdFields = Nothing + , _pzcdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzcdQuotaUser :: Lens' ProjectsZonesClustersDelete' (Maybe Text) +pzcdQuotaUser + = lens _pzcdQuotaUser + (\ s a -> s{_pzcdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzcdPrettyPrint :: Lens' ProjectsZonesClustersDelete' Bool +pzcdPrettyPrint + = lens _pzcdPrettyPrint + (\ s a -> s{_pzcdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzcdUserIp :: Lens' ProjectsZonesClustersDelete' (Maybe Text) +pzcdUserIp + = lens _pzcdUserIp (\ s a -> s{_pzcdUserIp = a}) + +-- | The name of the Google Compute Engine zone in which the cluster resides. +pzcdZoneId :: Lens' ProjectsZonesClustersDelete' Text +pzcdZoneId + = lens _pzcdZoneId (\ s a -> s{_pzcdZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzcdKey :: Lens' ProjectsZonesClustersDelete' (Maybe Text) +pzcdKey = lens _pzcdKey (\ s a -> s{_pzcdKey = a}) + +-- | The name of the cluster to delete. +pzcdClusterId :: Lens' ProjectsZonesClustersDelete' Text +pzcdClusterId + = lens _pzcdClusterId + (\ s a -> s{_pzcdClusterId = a}) + +-- | The Google Developers Console project ID or project number. +pzcdProjectId :: Lens' ProjectsZonesClustersDelete' Text +pzcdProjectId + = lens _pzcdProjectId + (\ s a -> s{_pzcdProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pzcdOauthToken :: Lens' ProjectsZonesClustersDelete' (Maybe Text) +pzcdOauthToken + = lens _pzcdOauthToken + (\ s a -> s{_pzcdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzcdFields :: Lens' ProjectsZonesClustersDelete' (Maybe Text) +pzcdFields + = lens _pzcdFields (\ s a -> s{_pzcdFields = a}) + +-- | Data format for the response. +pzcdAlt :: Lens' ProjectsZonesClustersDelete' Text +pzcdAlt = lens _pzcdAlt (\ s a -> s{_pzcdAlt = a}) + +instance GoogleRequest ProjectsZonesClustersDelete' + where + type Rs ProjectsZonesClustersDelete' = Operation + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesClustersDelete{..} + = go _pzcdQuotaUser _pzcdPrettyPrint _pzcdUserIp + _pzcdZoneId + _pzcdKey + _pzcdClusterId + _pzcdProjectId + _pzcdOauthToken + _pzcdFields + _pzcdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesClustersDeleteAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Get.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Get.hs new file mode 100644 index 000000000..8589aed96 --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific cluster. +-- +-- /See:/ for @ContainerProjectsZonesClustersGet@. +module Container.Projects.Zones.Clusters.Get + ( + -- * REST Resource + ProjectsZonesClustersGetAPI + + -- * Creating a Request + , projectsZonesClustersGet + , ProjectsZonesClustersGet + + -- * Request Lenses + , pzcgQuotaUser + , pzcgPrettyPrint + , pzcgUserIp + , pzcgZoneId + , pzcgKey + , pzcgClusterId + , pzcgProjectId + , pzcgOauthToken + , pzcgFields + , pzcgAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesClustersGet@ which the +-- 'ProjectsZonesClustersGet' request conforms to. +type ProjectsZonesClustersGetAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "clusters" :> + Capture "clusterId" Text :> Get '[JSON] Cluster + +-- | Gets a specific cluster. +-- +-- /See:/ 'projectsZonesClustersGet' smart constructor. +data ProjectsZonesClustersGet = ProjectsZonesClustersGet + { _pzcgQuotaUser :: !(Maybe Text) + , _pzcgPrettyPrint :: !Bool + , _pzcgUserIp :: !(Maybe Text) + , _pzcgZoneId :: !Text + , _pzcgKey :: !(Maybe Text) + , _pzcgClusterId :: !Text + , _pzcgProjectId :: !Text + , _pzcgOauthToken :: !(Maybe Text) + , _pzcgFields :: !(Maybe Text) + , _pzcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesClustersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzcgQuotaUser' +-- +-- * 'pzcgPrettyPrint' +-- +-- * 'pzcgUserIp' +-- +-- * 'pzcgZoneId' +-- +-- * 'pzcgKey' +-- +-- * 'pzcgClusterId' +-- +-- * 'pzcgProjectId' +-- +-- * 'pzcgOauthToken' +-- +-- * 'pzcgFields' +-- +-- * 'pzcgAlt' +projectsZonesClustersGet + :: Text -- ^ 'zoneId' + -> Text -- ^ 'clusterId' + -> Text -- ^ 'projectId' + -> ProjectsZonesClustersGet +projectsZonesClustersGet pPzcgZoneId_ pPzcgClusterId_ pPzcgProjectId_ = + ProjectsZonesClustersGet + { _pzcgQuotaUser = Nothing + , _pzcgPrettyPrint = True + , _pzcgUserIp = Nothing + , _pzcgZoneId = pPzcgZoneId_ + , _pzcgKey = Nothing + , _pzcgClusterId = pPzcgClusterId_ + , _pzcgProjectId = pPzcgProjectId_ + , _pzcgOauthToken = Nothing + , _pzcgFields = Nothing + , _pzcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzcgQuotaUser :: Lens' ProjectsZonesClustersGet' (Maybe Text) +pzcgQuotaUser + = lens _pzcgQuotaUser + (\ s a -> s{_pzcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzcgPrettyPrint :: Lens' ProjectsZonesClustersGet' Bool +pzcgPrettyPrint + = lens _pzcgPrettyPrint + (\ s a -> s{_pzcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzcgUserIp :: Lens' ProjectsZonesClustersGet' (Maybe Text) +pzcgUserIp + = lens _pzcgUserIp (\ s a -> s{_pzcgUserIp = a}) + +-- | The name of the Google Compute Engine zone in which the cluster resides. +pzcgZoneId :: Lens' ProjectsZonesClustersGet' Text +pzcgZoneId + = lens _pzcgZoneId (\ s a -> s{_pzcgZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzcgKey :: Lens' ProjectsZonesClustersGet' (Maybe Text) +pzcgKey = lens _pzcgKey (\ s a -> s{_pzcgKey = a}) + +-- | The name of the cluster to retrieve. +pzcgClusterId :: Lens' ProjectsZonesClustersGet' Text +pzcgClusterId + = lens _pzcgClusterId + (\ s a -> s{_pzcgClusterId = a}) + +-- | The Google Developers Console project ID or project number. +pzcgProjectId :: Lens' ProjectsZonesClustersGet' Text +pzcgProjectId + = lens _pzcgProjectId + (\ s a -> s{_pzcgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pzcgOauthToken :: Lens' ProjectsZonesClustersGet' (Maybe Text) +pzcgOauthToken + = lens _pzcgOauthToken + (\ s a -> s{_pzcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzcgFields :: Lens' ProjectsZonesClustersGet' (Maybe Text) +pzcgFields + = lens _pzcgFields (\ s a -> s{_pzcgFields = a}) + +-- | Data format for the response. +pzcgAlt :: Lens' ProjectsZonesClustersGet' Text +pzcgAlt = lens _pzcgAlt (\ s a -> s{_pzcgAlt = a}) + +instance GoogleRequest ProjectsZonesClustersGet' + where + type Rs ProjectsZonesClustersGet' = Cluster + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesClustersGet{..} + = go _pzcgQuotaUser _pzcgPrettyPrint _pzcgUserIp + _pzcgZoneId + _pzcgKey + _pzcgClusterId + _pzcgProjectId + _pzcgOauthToken + _pzcgFields + _pzcgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesClustersGetAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/List.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/List.hs new file mode 100644 index 000000000..3c34d3cf4 --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/List.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all clusters owned by a project in the specified zone. +-- +-- /See:/ for @ContainerProjectsZonesClustersList@. +module Container.Projects.Zones.Clusters.List + ( + -- * REST Resource + ProjectsZonesClustersListAPI + + -- * Creating a Request + , projectsZonesClustersList + , ProjectsZonesClustersList + + -- * Request Lenses + , pzclQuotaUser + , pzclPrettyPrint + , pzclUserIp + , pzclZoneId + , pzclKey + , pzclProjectId + , pzclOauthToken + , pzclFields + , pzclAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesClustersList@ which the +-- 'ProjectsZonesClustersList' request conforms to. +type ProjectsZonesClustersListAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "clusters" :> Get '[JSON] ListClustersResponse + +-- | Lists all clusters owned by a project in the specified zone. +-- +-- /See:/ 'projectsZonesClustersList' smart constructor. +data ProjectsZonesClustersList = ProjectsZonesClustersList + { _pzclQuotaUser :: !(Maybe Text) + , _pzclPrettyPrint :: !Bool + , _pzclUserIp :: !(Maybe Text) + , _pzclZoneId :: !Text + , _pzclKey :: !(Maybe Text) + , _pzclProjectId :: !Text + , _pzclOauthToken :: !(Maybe Text) + , _pzclFields :: !(Maybe Text) + , _pzclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesClustersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzclQuotaUser' +-- +-- * 'pzclPrettyPrint' +-- +-- * 'pzclUserIp' +-- +-- * 'pzclZoneId' +-- +-- * 'pzclKey' +-- +-- * 'pzclProjectId' +-- +-- * 'pzclOauthToken' +-- +-- * 'pzclFields' +-- +-- * 'pzclAlt' +projectsZonesClustersList + :: Text -- ^ 'zoneId' + -> Text -- ^ 'projectId' + -> ProjectsZonesClustersList +projectsZonesClustersList pPzclZoneId_ pPzclProjectId_ = + ProjectsZonesClustersList + { _pzclQuotaUser = Nothing + , _pzclPrettyPrint = True + , _pzclUserIp = Nothing + , _pzclZoneId = pPzclZoneId_ + , _pzclKey = Nothing + , _pzclProjectId = pPzclProjectId_ + , _pzclOauthToken = Nothing + , _pzclFields = Nothing + , _pzclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzclQuotaUser :: Lens' ProjectsZonesClustersList' (Maybe Text) +pzclQuotaUser + = lens _pzclQuotaUser + (\ s a -> s{_pzclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzclPrettyPrint :: Lens' ProjectsZonesClustersList' Bool +pzclPrettyPrint + = lens _pzclPrettyPrint + (\ s a -> s{_pzclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzclUserIp :: Lens' ProjectsZonesClustersList' (Maybe Text) +pzclUserIp + = lens _pzclUserIp (\ s a -> s{_pzclUserIp = a}) + +-- | The name of the Google Compute Engine zone in which the cluster resides. +pzclZoneId :: Lens' ProjectsZonesClustersList' Text +pzclZoneId + = lens _pzclZoneId (\ s a -> s{_pzclZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzclKey :: Lens' ProjectsZonesClustersList' (Maybe Text) +pzclKey = lens _pzclKey (\ s a -> s{_pzclKey = a}) + +-- | The Google Developers Console project ID or project number. +pzclProjectId :: Lens' ProjectsZonesClustersList' Text +pzclProjectId + = lens _pzclProjectId + (\ s a -> s{_pzclProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pzclOauthToken :: Lens' ProjectsZonesClustersList' (Maybe Text) +pzclOauthToken + = lens _pzclOauthToken + (\ s a -> s{_pzclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzclFields :: Lens' ProjectsZonesClustersList' (Maybe Text) +pzclFields + = lens _pzclFields (\ s a -> s{_pzclFields = a}) + +-- | Data format for the response. +pzclAlt :: Lens' ProjectsZonesClustersList' Text +pzclAlt = lens _pzclAlt (\ s a -> s{_pzclAlt = a}) + +instance GoogleRequest ProjectsZonesClustersList' + where + type Rs ProjectsZonesClustersList' = + ListClustersResponse + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesClustersList{..} + = go _pzclQuotaUser _pzclPrettyPrint _pzclUserIp + _pzclZoneId + _pzclKey + _pzclProjectId + _pzclOauthToken + _pzclFields + _pzclAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesClustersListAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Get.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Get.hs new file mode 100644 index 000000000..1c4de6ec9 --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Get.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Operations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified operation. +-- +-- /See:/ for @ContainerProjectsZonesOperationsGet@. +module Container.Projects.Zones.Operations.Get + ( + -- * REST Resource + ProjectsZonesOperationsGetAPI + + -- * Creating a Request + , projectsZonesOperationsGet + , ProjectsZonesOperationsGet + + -- * Request Lenses + , pzogQuotaUser + , pzogPrettyPrint + , pzogUserIp + , pzogZoneId + , pzogKey + , pzogProjectId + , pzogOperationId + , pzogOauthToken + , pzogFields + , pzogAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesOperationsGet@ which the +-- 'ProjectsZonesOperationsGet' request conforms to. +type ProjectsZonesOperationsGetAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "operations" :> + Capture "operationId" Text :> Get '[JSON] Operation + +-- | Gets the specified operation. +-- +-- /See:/ 'projectsZonesOperationsGet' smart constructor. +data ProjectsZonesOperationsGet = ProjectsZonesOperationsGet + { _pzogQuotaUser :: !(Maybe Text) + , _pzogPrettyPrint :: !Bool + , _pzogUserIp :: !(Maybe Text) + , _pzogZoneId :: !Text + , _pzogKey :: !(Maybe Text) + , _pzogProjectId :: !Text + , _pzogOperationId :: !Text + , _pzogOauthToken :: !(Maybe Text) + , _pzogFields :: !(Maybe Text) + , _pzogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzogQuotaUser' +-- +-- * 'pzogPrettyPrint' +-- +-- * 'pzogUserIp' +-- +-- * 'pzogZoneId' +-- +-- * 'pzogKey' +-- +-- * 'pzogProjectId' +-- +-- * 'pzogOperationId' +-- +-- * 'pzogOauthToken' +-- +-- * 'pzogFields' +-- +-- * 'pzogAlt' +projectsZonesOperationsGet + :: Text -- ^ 'zoneId' + -> Text -- ^ 'projectId' + -> Text -- ^ 'operationId' + -> ProjectsZonesOperationsGet +projectsZonesOperationsGet pPzogZoneId_ pPzogProjectId_ pPzogOperationId_ = + ProjectsZonesOperationsGet + { _pzogQuotaUser = Nothing + , _pzogPrettyPrint = True + , _pzogUserIp = Nothing + , _pzogZoneId = pPzogZoneId_ + , _pzogKey = Nothing + , _pzogProjectId = pPzogProjectId_ + , _pzogOperationId = pPzogOperationId_ + , _pzogOauthToken = Nothing + , _pzogFields = Nothing + , _pzogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzogQuotaUser :: Lens' ProjectsZonesOperationsGet' (Maybe Text) +pzogQuotaUser + = lens _pzogQuotaUser + (\ s a -> s{_pzogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzogPrettyPrint :: Lens' ProjectsZonesOperationsGet' Bool +pzogPrettyPrint + = lens _pzogPrettyPrint + (\ s a -> s{_pzogPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzogUserIp :: Lens' ProjectsZonesOperationsGet' (Maybe Text) +pzogUserIp + = lens _pzogUserIp (\ s a -> s{_pzogUserIp = a}) + +-- | The name of the Google Compute Engine zone in which the operation +-- resides. This is always the same zone as the cluster with which the +-- operation is associated. +pzogZoneId :: Lens' ProjectsZonesOperationsGet' Text +pzogZoneId + = lens _pzogZoneId (\ s a -> s{_pzogZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzogKey :: Lens' ProjectsZonesOperationsGet' (Maybe Text) +pzogKey = lens _pzogKey (\ s a -> s{_pzogKey = a}) + +-- | The Google Developers Console project ID or project number. +pzogProjectId :: Lens' ProjectsZonesOperationsGet' Text +pzogProjectId + = lens _pzogProjectId + (\ s a -> s{_pzogProjectId = a}) + +-- | The server-assigned name of the operation. +pzogOperationId :: Lens' ProjectsZonesOperationsGet' Text +pzogOperationId + = lens _pzogOperationId + (\ s a -> s{_pzogOperationId = a}) + +-- | OAuth 2.0 token for the current user. +pzogOauthToken :: Lens' ProjectsZonesOperationsGet' (Maybe Text) +pzogOauthToken + = lens _pzogOauthToken + (\ s a -> s{_pzogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzogFields :: Lens' ProjectsZonesOperationsGet' (Maybe Text) +pzogFields + = lens _pzogFields (\ s a -> s{_pzogFields = a}) + +-- | Data format for the response. +pzogAlt :: Lens' ProjectsZonesOperationsGet' Text +pzogAlt = lens _pzogAlt (\ s a -> s{_pzogAlt = a}) + +instance GoogleRequest ProjectsZonesOperationsGet' + where + type Rs ProjectsZonesOperationsGet' = Operation + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesOperationsGet{..} + = go _pzogQuotaUser _pzogPrettyPrint _pzogUserIp + _pzogZoneId + _pzogKey + _pzogProjectId + _pzogOperationId + _pzogOauthToken + _pzogFields + _pzogAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesOperationsGetAPI) + r + u diff --git a/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/List.hs b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/List.hs new file mode 100644 index 000000000..22768960e --- /dev/null +++ b/gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/List.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Container.Projects.Zones.Operations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all operations in a project in a specific zone. +-- +-- /See:/ for @ContainerProjectsZonesOperationsList@. +module Container.Projects.Zones.Operations.List + ( + -- * REST Resource + ProjectsZonesOperationsListAPI + + -- * Creating a Request + , projectsZonesOperationsList + , ProjectsZonesOperationsList + + -- * Request Lenses + , pzolQuotaUser + , pzolPrettyPrint + , pzolUserIp + , pzolZoneId + , pzolKey + , pzolProjectId + , pzolOauthToken + , pzolFields + , pzolAlt + ) where + +import Network.Google.Container.Types +import Network.Google.Prelude + +-- | A resource alias for @ContainerProjectsZonesOperationsList@ which the +-- 'ProjectsZonesOperationsList' request conforms to. +type ProjectsZonesOperationsListAPI = + Capture "projectId" Text :> + "zones" :> + Capture "zoneId" Text :> + "operations" :> Get '[JSON] ListOperationsResponse + +-- | Lists all operations in a project in a specific zone. +-- +-- /See:/ 'projectsZonesOperationsList' smart constructor. +data ProjectsZonesOperationsList = ProjectsZonesOperationsList + { _pzolQuotaUser :: !(Maybe Text) + , _pzolPrettyPrint :: !Bool + , _pzolUserIp :: !(Maybe Text) + , _pzolZoneId :: !Text + , _pzolKey :: !(Maybe Text) + , _pzolProjectId :: !Text + , _pzolOauthToken :: !(Maybe Text) + , _pzolFields :: !(Maybe Text) + , _pzolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsZonesOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pzolQuotaUser' +-- +-- * 'pzolPrettyPrint' +-- +-- * 'pzolUserIp' +-- +-- * 'pzolZoneId' +-- +-- * 'pzolKey' +-- +-- * 'pzolProjectId' +-- +-- * 'pzolOauthToken' +-- +-- * 'pzolFields' +-- +-- * 'pzolAlt' +projectsZonesOperationsList + :: Text -- ^ 'zoneId' + -> Text -- ^ 'projectId' + -> ProjectsZonesOperationsList +projectsZonesOperationsList pPzolZoneId_ pPzolProjectId_ = + ProjectsZonesOperationsList + { _pzolQuotaUser = Nothing + , _pzolPrettyPrint = True + , _pzolUserIp = Nothing + , _pzolZoneId = pPzolZoneId_ + , _pzolKey = Nothing + , _pzolProjectId = pPzolProjectId_ + , _pzolOauthToken = Nothing + , _pzolFields = Nothing + , _pzolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pzolQuotaUser :: Lens' ProjectsZonesOperationsList' (Maybe Text) +pzolQuotaUser + = lens _pzolQuotaUser + (\ s a -> s{_pzolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pzolPrettyPrint :: Lens' ProjectsZonesOperationsList' Bool +pzolPrettyPrint + = lens _pzolPrettyPrint + (\ s a -> s{_pzolPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pzolUserIp :: Lens' ProjectsZonesOperationsList' (Maybe Text) +pzolUserIp + = lens _pzolUserIp (\ s a -> s{_pzolUserIp = a}) + +-- | The name of the Google Compute Engine zone to return operations for. +pzolZoneId :: Lens' ProjectsZonesOperationsList' Text +pzolZoneId + = lens _pzolZoneId (\ s a -> s{_pzolZoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pzolKey :: Lens' ProjectsZonesOperationsList' (Maybe Text) +pzolKey = lens _pzolKey (\ s a -> s{_pzolKey = a}) + +-- | The Google Developers Console project ID or project number. +pzolProjectId :: Lens' ProjectsZonesOperationsList' Text +pzolProjectId + = lens _pzolProjectId + (\ s a -> s{_pzolProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pzolOauthToken :: Lens' ProjectsZonesOperationsList' (Maybe Text) +pzolOauthToken + = lens _pzolOauthToken + (\ s a -> s{_pzolOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pzolFields :: Lens' ProjectsZonesOperationsList' (Maybe Text) +pzolFields + = lens _pzolFields (\ s a -> s{_pzolFields = a}) + +-- | Data format for the response. +pzolAlt :: Lens' ProjectsZonesOperationsList' Text +pzolAlt = lens _pzolAlt (\ s a -> s{_pzolAlt = a}) + +instance GoogleRequest ProjectsZonesOperationsList' + where + type Rs ProjectsZonesOperationsList' = + ListOperationsResponse + request = requestWithRoute defReq containerURL + requestWithRoute r u ProjectsZonesOperationsList{..} + = go _pzolQuotaUser _pzolPrettyPrint _pzolUserIp + _pzolZoneId + _pzolKey + _pzolProjectId + _pzolOauthToken + _pzolFields + _pzolAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsZonesOperationsListAPI) + r + u diff --git a/gogol-container/gogol-container.cabal b/gogol-container/gogol-container.cabal new file mode 100644 index 000000000..7f7164907 --- /dev/null +++ b/gogol-container/gogol-container.cabal @@ -0,0 +1,52 @@ +name: gogol-container +version: 0.0.1 +synopsis: Google Container Engine API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Container Engine API is used for building and managing + container based applications, powered by the open source Kubernetes + technology. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Container + , Network.Google.Container.Types + , Network.Google.Resource.Container.Projects.Clusters.List + , Network.Google.Resource.Container.Projects.Operations.List + , Network.Google.Resource.Container.Projects.Zones.Clusters.Create + , Network.Google.Resource.Container.Projects.Zones.Clusters.Delete + , Network.Google.Resource.Container.Projects.Zones.Clusters.Get + , Network.Google.Resource.Container.Projects.Zones.Clusters.List + , Network.Google.Resource.Container.Projects.Zones.Operations.Get + , Network.Google.Resource.Container.Projects.Zones.Operations.List + + other-modules: + Network.Google.Container.Types.Product + , Network.Google.Container.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-container/src/.gitkeep b/gogol-container/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-customsearch/LICENSE b/gogol-customsearch/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-customsearch/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-customsearch/Makefile b/gogol-customsearch/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-customsearch/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-customsearch/README.md b/gogol-customsearch/README.md new file mode 100644 index 000000000..72626e4a9 --- /dev/null +++ b/gogol-customsearch/README.md @@ -0,0 +1,28 @@ +# gogol-customsearch + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the CustomSearch API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-customsearch` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-customsearch/Setup.hs b/gogol-customsearch/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-customsearch/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-customsearch/gen/Network/Google/CustomSearch.hs b/gogol-customsearch/gen/Network/Google/CustomSearch.hs new file mode 100644 index 000000000..71b9a8877 --- /dev/null +++ b/gogol-customsearch/gen/Network/Google/CustomSearch.hs @@ -0,0 +1,134 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.CustomSearch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you search over a website or collection of websites +-- +-- /See:/ +module Network.Google.CustomSearch + ( + -- * API + CustomSearchAPI + , customSearchAPI + , customSearchURL + + -- * Service Methods + + -- * REST Resources + + -- ** SearchCseList + , module Search.Cse.List + + -- * Types + + -- ** Context + , Context + , context + , cFacets + , cTitle + + -- ** Result + , Result + , result + , rMime + , rImage + , rPagemap + , rDisplayLink + , rFileFormat + , rSnippet + , rKind + , rLink + , rHtmlSnippet + , rHtmlFormattedUrl + , rCacheId + , rFormattedUrl + , rHtmlTitle + , rLabels + , rTitle + + -- ** Query + , Query + , query + , qImgDominantColor + , qOutputEncoding + , qSiteSearchFilter + , qInputEncoding + , qOrTerms + , qSearchTerms + , qStartPage + , qRights + , qCount + , qExcludeTerms + , qFileType + , qSearchType + , qGoogleHost + , qDisableCnTwTranslation + , qRelatedSite + , qHl + , qCref + , qSort + , qLanguage + , qSiteSearch + , qFilter + , qTotalResults + , qDateRestrict + , qTitle + , qLinkSite + , qLowRange + , qImgType + , qGl + , qCx + , qImgColorType + , qImgSize + , qExactTerms + , qStartIndex + , qCr + , qSafe + , qHq + , qHighRange + + -- ** Promotion + , Promotion + , promotion + , pImage + , pDisplayLink + , pBodyLines + , pLink + , pHtmlTitle + , pTitle + + -- ** Search + , Search + , search + , sQueries + , sContext + , sKind + , sUrl + , sItems + , sSearchInformation + , sPromotions + , sSpelling + ) where + +import Network.Google.CustomSearch.Types +import Network.Google.Prelude +import Network.Google.Resource.Search.Cse.List + +{- $resources +TODO +-} + +type CustomSearchAPI = Cse + +customSearchAPI :: Proxy CustomSearchAPI +customSearchAPI = Proxy diff --git a/gogol-customsearch/gen/Network/Google/CustomSearch/Types.hs b/gogol-customsearch/gen/Network/Google/CustomSearch/Types.hs new file mode 100644 index 000000000..e888f5bf8 --- /dev/null +++ b/gogol-customsearch/gen/Network/Google/CustomSearch/Types.hs @@ -0,0 +1,118 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CustomSearch.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CustomSearch.Types + ( + -- * Service URL + customSearchURL + + -- * Context + , Context + , context + , cFacets + , cTitle + + -- * Result + , Result + , result + , rMime + , rImage + , rPagemap + , rDisplayLink + , rFileFormat + , rSnippet + , rKind + , rLink + , rHtmlSnippet + , rHtmlFormattedUrl + , rCacheId + , rFormattedUrl + , rHtmlTitle + , rLabels + , rTitle + + -- * Query + , Query + , query + , qImgDominantColor + , qOutputEncoding + , qSiteSearchFilter + , qInputEncoding + , qOrTerms + , qSearchTerms + , qStartPage + , qRights + , qCount + , qExcludeTerms + , qFileType + , qSearchType + , qGoogleHost + , qDisableCnTwTranslation + , qRelatedSite + , qHl + , qCref + , qSort + , qLanguage + , qSiteSearch + , qFilter + , qTotalResults + , qDateRestrict + , qTitle + , qLinkSite + , qLowRange + , qImgType + , qGl + , qCx + , qImgColorType + , qImgSize + , qExactTerms + , qStartIndex + , qCr + , qSafe + , qHq + , qHighRange + + -- * Promotion + , Promotion + , promotion + , pImage + , pDisplayLink + , pBodyLines + , pLink + , pHtmlTitle + , pTitle + + -- * Search + , Search + , search + , sQueries + , sContext + , sKind + , sUrl + , sItems + , sSearchInformation + , sPromotions + , sSpelling + ) where + +import Network.Google.CustomSearch.Types.Product +import Network.Google.CustomSearch.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the CustomSearch API. +customSearchURL :: BaseURL +customSearchURL + = BaseUrl Https + "https://www.googleapis.com/customsearch/" + 443 diff --git a/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs b/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs new file mode 100644 index 000000000..575ce1c38 --- /dev/null +++ b/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs @@ -0,0 +1,802 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CustomSearch.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CustomSearch.Types.Product where + +import Network.Google.CustomSearch.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'context' smart constructor. +data Context = Context + { _cFacets :: !(Maybe [[ContextFacetsItemItem]]) + , _cTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Context' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cFacets' +-- +-- * 'cTitle' +context + :: Context +context = + Context + { _cFacets = Nothing + , _cTitle = Nothing + } + +cFacets :: Lens' Context [[ContextFacetsItemItem]] +cFacets + = lens _cFacets (\ s a -> s{_cFacets = a}) . _Default + . _Coerce + +cTitle :: Lens' Context (Maybe Text) +cTitle = lens _cTitle (\ s a -> s{_cTitle = a}) + +instance FromJSON Context where + parseJSON + = withObject "Context" + (\ o -> + Context <$> + (o .:? "facets" .!= mempty) <*> (o .:? "title")) + +instance ToJSON Context where + toJSON Context{..} + = object + (catMaybes + [("facets" .=) <$> _cFacets, + ("title" .=) <$> _cTitle]) + +-- +-- /See:/ 'result' smart constructor. +data Result = Result + { _rMime :: !(Maybe Text) + , _rImage :: !(Maybe ResultImage) + , _rPagemap :: !(Maybe ResultPagemap) + , _rDisplayLink :: !(Maybe Text) + , _rFileFormat :: !(Maybe Text) + , _rSnippet :: !(Maybe Text) + , _rKind :: !Text + , _rLink :: !(Maybe Text) + , _rHtmlSnippet :: !(Maybe Text) + , _rHtmlFormattedUrl :: !(Maybe Text) + , _rCacheId :: !(Maybe Text) + , _rFormattedUrl :: !(Maybe Text) + , _rHtmlTitle :: !(Maybe Text) + , _rLabels :: !(Maybe [ResultLabelsItem]) + , _rTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Result' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rMime' +-- +-- * 'rImage' +-- +-- * 'rPagemap' +-- +-- * 'rDisplayLink' +-- +-- * 'rFileFormat' +-- +-- * 'rSnippet' +-- +-- * 'rKind' +-- +-- * 'rLink' +-- +-- * 'rHtmlSnippet' +-- +-- * 'rHtmlFormattedUrl' +-- +-- * 'rCacheId' +-- +-- * 'rFormattedUrl' +-- +-- * 'rHtmlTitle' +-- +-- * 'rLabels' +-- +-- * 'rTitle' +result + :: Result +result = + Result + { _rMime = Nothing + , _rImage = Nothing + , _rPagemap = Nothing + , _rDisplayLink = Nothing + , _rFileFormat = Nothing + , _rSnippet = Nothing + , _rKind = "customsearch#result" + , _rLink = Nothing + , _rHtmlSnippet = Nothing + , _rHtmlFormattedUrl = Nothing + , _rCacheId = Nothing + , _rFormattedUrl = Nothing + , _rHtmlTitle = Nothing + , _rLabels = Nothing + , _rTitle = Nothing + } + +rMime :: Lens' Result (Maybe Text) +rMime = lens _rMime (\ s a -> s{_rMime = a}) + +rImage :: Lens' Result (Maybe ResultImage) +rImage = lens _rImage (\ s a -> s{_rImage = a}) + +rPagemap :: Lens' Result (Maybe ResultPagemap) +rPagemap = lens _rPagemap (\ s a -> s{_rPagemap = a}) + +rDisplayLink :: Lens' Result (Maybe Text) +rDisplayLink + = lens _rDisplayLink (\ s a -> s{_rDisplayLink = a}) + +rFileFormat :: Lens' Result (Maybe Text) +rFileFormat + = lens _rFileFormat (\ s a -> s{_rFileFormat = a}) + +rSnippet :: Lens' Result (Maybe Text) +rSnippet = lens _rSnippet (\ s a -> s{_rSnippet = a}) + +rKind :: Lens' Result Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +rLink :: Lens' Result (Maybe Text) +rLink = lens _rLink (\ s a -> s{_rLink = a}) + +rHtmlSnippet :: Lens' Result (Maybe Text) +rHtmlSnippet + = lens _rHtmlSnippet (\ s a -> s{_rHtmlSnippet = a}) + +rHtmlFormattedUrl :: Lens' Result (Maybe Text) +rHtmlFormattedUrl + = lens _rHtmlFormattedUrl + (\ s a -> s{_rHtmlFormattedUrl = a}) + +rCacheId :: Lens' Result (Maybe Text) +rCacheId = lens _rCacheId (\ s a -> s{_rCacheId = a}) + +rFormattedUrl :: Lens' Result (Maybe Text) +rFormattedUrl + = lens _rFormattedUrl + (\ s a -> s{_rFormattedUrl = a}) + +rHtmlTitle :: Lens' Result (Maybe Text) +rHtmlTitle + = lens _rHtmlTitle (\ s a -> s{_rHtmlTitle = a}) + +rLabels :: Lens' Result [ResultLabelsItem] +rLabels + = lens _rLabels (\ s a -> s{_rLabels = a}) . _Default + . _Coerce + +rTitle :: Lens' Result (Maybe Text) +rTitle = lens _rTitle (\ s a -> s{_rTitle = a}) + +instance FromJSON Result where + parseJSON + = withObject "Result" + (\ o -> + Result <$> + (o .:? "mime") <*> (o .:? "image") <*> + (o .:? "pagemap") + <*> (o .:? "displayLink") + <*> (o .:? "fileFormat") + <*> (o .:? "snippet") + <*> (o .:? "kind" .!= "customsearch#result") + <*> (o .:? "link") + <*> (o .:? "htmlSnippet") + <*> (o .:? "htmlFormattedUrl") + <*> (o .:? "cacheId") + <*> (o .:? "formattedUrl") + <*> (o .:? "htmlTitle") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "title")) + +instance ToJSON Result where + toJSON Result{..} + = object + (catMaybes + [("mime" .=) <$> _rMime, ("image" .=) <$> _rImage, + ("pagemap" .=) <$> _rPagemap, + ("displayLink" .=) <$> _rDisplayLink, + ("fileFormat" .=) <$> _rFileFormat, + ("snippet" .=) <$> _rSnippet, + Just ("kind" .= _rKind), ("link" .=) <$> _rLink, + ("htmlSnippet" .=) <$> _rHtmlSnippet, + ("htmlFormattedUrl" .=) <$> _rHtmlFormattedUrl, + ("cacheId" .=) <$> _rCacheId, + ("formattedUrl" .=) <$> _rFormattedUrl, + ("htmlTitle" .=) <$> _rHtmlTitle, + ("labels" .=) <$> _rLabels, + ("title" .=) <$> _rTitle]) + +-- +-- /See:/ 'query' smart constructor. +data Query = Query + { _qImgDominantColor :: !(Maybe Text) + , _qOutputEncoding :: !(Maybe Text) + , _qSiteSearchFilter :: !(Maybe Text) + , _qInputEncoding :: !(Maybe Text) + , _qOrTerms :: !(Maybe Text) + , _qSearchTerms :: !(Maybe Text) + , _qStartPage :: !(Maybe Int32) + , _qRights :: !(Maybe Text) + , _qCount :: !(Maybe Int32) + , _qExcludeTerms :: !(Maybe Text) + , _qFileType :: !(Maybe Text) + , _qSearchType :: !(Maybe Text) + , _qGoogleHost :: !(Maybe Text) + , _qDisableCnTwTranslation :: !(Maybe Text) + , _qRelatedSite :: !(Maybe Text) + , _qHl :: !(Maybe Text) + , _qCref :: !(Maybe Text) + , _qSort :: !(Maybe Text) + , _qLanguage :: !(Maybe Text) + , _qSiteSearch :: !(Maybe Text) + , _qFilter :: !(Maybe Text) + , _qTotalResults :: !(Maybe Int64) + , _qDateRestrict :: !(Maybe Text) + , _qTitle :: !(Maybe Text) + , _qLinkSite :: !(Maybe Text) + , _qLowRange :: !(Maybe Text) + , _qImgType :: !(Maybe Text) + , _qGl :: !(Maybe Text) + , _qCx :: !(Maybe Text) + , _qImgColorType :: !(Maybe Text) + , _qImgSize :: !(Maybe Text) + , _qExactTerms :: !(Maybe Text) + , _qStartIndex :: !(Maybe Int32) + , _qCr :: !(Maybe Text) + , _qSafe :: !(Maybe Text) + , _qHq :: !(Maybe Text) + , _qHighRange :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Query' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qImgDominantColor' +-- +-- * 'qOutputEncoding' +-- +-- * 'qSiteSearchFilter' +-- +-- * 'qInputEncoding' +-- +-- * 'qOrTerms' +-- +-- * 'qSearchTerms' +-- +-- * 'qStartPage' +-- +-- * 'qRights' +-- +-- * 'qCount' +-- +-- * 'qExcludeTerms' +-- +-- * 'qFileType' +-- +-- * 'qSearchType' +-- +-- * 'qGoogleHost' +-- +-- * 'qDisableCnTwTranslation' +-- +-- * 'qRelatedSite' +-- +-- * 'qHl' +-- +-- * 'qCref' +-- +-- * 'qSort' +-- +-- * 'qLanguage' +-- +-- * 'qSiteSearch' +-- +-- * 'qFilter' +-- +-- * 'qTotalResults' +-- +-- * 'qDateRestrict' +-- +-- * 'qTitle' +-- +-- * 'qLinkSite' +-- +-- * 'qLowRange' +-- +-- * 'qImgType' +-- +-- * 'qGl' +-- +-- * 'qCx' +-- +-- * 'qImgColorType' +-- +-- * 'qImgSize' +-- +-- * 'qExactTerms' +-- +-- * 'qStartIndex' +-- +-- * 'qCr' +-- +-- * 'qSafe' +-- +-- * 'qHq' +-- +-- * 'qHighRange' +query + :: Query +query = + Query + { _qImgDominantColor = Nothing + , _qOutputEncoding = Nothing + , _qSiteSearchFilter = Nothing + , _qInputEncoding = Nothing + , _qOrTerms = Nothing + , _qSearchTerms = Nothing + , _qStartPage = Nothing + , _qRights = Nothing + , _qCount = Nothing + , _qExcludeTerms = Nothing + , _qFileType = Nothing + , _qSearchType = Nothing + , _qGoogleHost = Nothing + , _qDisableCnTwTranslation = Nothing + , _qRelatedSite = Nothing + , _qHl = Nothing + , _qCref = Nothing + , _qSort = Nothing + , _qLanguage = Nothing + , _qSiteSearch = Nothing + , _qFilter = Nothing + , _qTotalResults = Nothing + , _qDateRestrict = Nothing + , _qTitle = Nothing + , _qLinkSite = Nothing + , _qLowRange = Nothing + , _qImgType = Nothing + , _qGl = Nothing + , _qCx = Nothing + , _qImgColorType = Nothing + , _qImgSize = Nothing + , _qExactTerms = Nothing + , _qStartIndex = Nothing + , _qCr = Nothing + , _qSafe = Nothing + , _qHq = Nothing + , _qHighRange = Nothing + } + +qImgDominantColor :: Lens' Query (Maybe Text) +qImgDominantColor + = lens _qImgDominantColor + (\ s a -> s{_qImgDominantColor = a}) + +qOutputEncoding :: Lens' Query (Maybe Text) +qOutputEncoding + = lens _qOutputEncoding + (\ s a -> s{_qOutputEncoding = a}) + +qSiteSearchFilter :: Lens' Query (Maybe Text) +qSiteSearchFilter + = lens _qSiteSearchFilter + (\ s a -> s{_qSiteSearchFilter = a}) + +qInputEncoding :: Lens' Query (Maybe Text) +qInputEncoding + = lens _qInputEncoding + (\ s a -> s{_qInputEncoding = a}) + +qOrTerms :: Lens' Query (Maybe Text) +qOrTerms = lens _qOrTerms (\ s a -> s{_qOrTerms = a}) + +qSearchTerms :: Lens' Query (Maybe Text) +qSearchTerms + = lens _qSearchTerms (\ s a -> s{_qSearchTerms = a}) + +qStartPage :: Lens' Query (Maybe Int32) +qStartPage + = lens _qStartPage (\ s a -> s{_qStartPage = a}) + +qRights :: Lens' Query (Maybe Text) +qRights = lens _qRights (\ s a -> s{_qRights = a}) + +qCount :: Lens' Query (Maybe Int32) +qCount = lens _qCount (\ s a -> s{_qCount = a}) + +qExcludeTerms :: Lens' Query (Maybe Text) +qExcludeTerms + = lens _qExcludeTerms + (\ s a -> s{_qExcludeTerms = a}) + +qFileType :: Lens' Query (Maybe Text) +qFileType + = lens _qFileType (\ s a -> s{_qFileType = a}) + +qSearchType :: Lens' Query (Maybe Text) +qSearchType + = lens _qSearchType (\ s a -> s{_qSearchType = a}) + +qGoogleHost :: Lens' Query (Maybe Text) +qGoogleHost + = lens _qGoogleHost (\ s a -> s{_qGoogleHost = a}) + +qDisableCnTwTranslation :: Lens' Query (Maybe Text) +qDisableCnTwTranslation + = lens _qDisableCnTwTranslation + (\ s a -> s{_qDisableCnTwTranslation = a}) + +qRelatedSite :: Lens' Query (Maybe Text) +qRelatedSite + = lens _qRelatedSite (\ s a -> s{_qRelatedSite = a}) + +qHl :: Lens' Query (Maybe Text) +qHl = lens _qHl (\ s a -> s{_qHl = a}) + +qCref :: Lens' Query (Maybe Text) +qCref = lens _qCref (\ s a -> s{_qCref = a}) + +qSort :: Lens' Query (Maybe Text) +qSort = lens _qSort (\ s a -> s{_qSort = a}) + +qLanguage :: Lens' Query (Maybe Text) +qLanguage + = lens _qLanguage (\ s a -> s{_qLanguage = a}) + +qSiteSearch :: Lens' Query (Maybe Text) +qSiteSearch + = lens _qSiteSearch (\ s a -> s{_qSiteSearch = a}) + +qFilter :: Lens' Query (Maybe Text) +qFilter = lens _qFilter (\ s a -> s{_qFilter = a}) + +qTotalResults :: Lens' Query (Maybe Int64) +qTotalResults + = lens _qTotalResults + (\ s a -> s{_qTotalResults = a}) + +qDateRestrict :: Lens' Query (Maybe Text) +qDateRestrict + = lens _qDateRestrict + (\ s a -> s{_qDateRestrict = a}) + +qTitle :: Lens' Query (Maybe Text) +qTitle = lens _qTitle (\ s a -> s{_qTitle = a}) + +qLinkSite :: Lens' Query (Maybe Text) +qLinkSite + = lens _qLinkSite (\ s a -> s{_qLinkSite = a}) + +qLowRange :: Lens' Query (Maybe Text) +qLowRange + = lens _qLowRange (\ s a -> s{_qLowRange = a}) + +qImgType :: Lens' Query (Maybe Text) +qImgType = lens _qImgType (\ s a -> s{_qImgType = a}) + +qGl :: Lens' Query (Maybe Text) +qGl = lens _qGl (\ s a -> s{_qGl = a}) + +qCx :: Lens' Query (Maybe Text) +qCx = lens _qCx (\ s a -> s{_qCx = a}) + +qImgColorType :: Lens' Query (Maybe Text) +qImgColorType + = lens _qImgColorType + (\ s a -> s{_qImgColorType = a}) + +qImgSize :: Lens' Query (Maybe Text) +qImgSize = lens _qImgSize (\ s a -> s{_qImgSize = a}) + +qExactTerms :: Lens' Query (Maybe Text) +qExactTerms + = lens _qExactTerms (\ s a -> s{_qExactTerms = a}) + +qStartIndex :: Lens' Query (Maybe Int32) +qStartIndex + = lens _qStartIndex (\ s a -> s{_qStartIndex = a}) + +qCr :: Lens' Query (Maybe Text) +qCr = lens _qCr (\ s a -> s{_qCr = a}) + +qSafe :: Lens' Query (Maybe Text) +qSafe = lens _qSafe (\ s a -> s{_qSafe = a}) + +qHq :: Lens' Query (Maybe Text) +qHq = lens _qHq (\ s a -> s{_qHq = a}) + +qHighRange :: Lens' Query (Maybe Text) +qHighRange + = lens _qHighRange (\ s a -> s{_qHighRange = a}) + +instance FromJSON Query where + parseJSON + = withObject "Query" + (\ o -> + Query <$> + (o .:? "imgDominantColor") <*> + (o .:? "outputEncoding") + <*> (o .:? "siteSearchFilter") + <*> (o .:? "inputEncoding") + <*> (o .:? "orTerms") + <*> (o .:? "searchTerms") + <*> (o .:? "startPage") + <*> (o .:? "rights") + <*> (o .:? "count") + <*> (o .:? "excludeTerms") + <*> (o .:? "fileType") + <*> (o .:? "searchType") + <*> (o .:? "googleHost") + <*> (o .:? "disableCnTwTranslation") + <*> (o .:? "relatedSite") + <*> (o .:? "hl") + <*> (o .:? "cref") + <*> (o .:? "sort") + <*> (o .:? "language") + <*> (o .:? "siteSearch") + <*> (o .:? "filter") + <*> (o .:? "totalResults") + <*> (o .:? "dateRestrict") + <*> (o .:? "title") + <*> (o .:? "linkSite") + <*> (o .:? "lowRange") + <*> (o .:? "imgType") + <*> (o .:? "gl") + <*> (o .:? "cx") + <*> (o .:? "imgColorType") + <*> (o .:? "imgSize") + <*> (o .:? "exactTerms") + <*> (o .:? "startIndex") + <*> (o .:? "cr") + <*> (o .:? "safe") + <*> (o .:? "hq") + <*> (o .:? "highRange")) + +instance ToJSON Query where + toJSON Query{..} + = object + (catMaybes + [("imgDominantColor" .=) <$> _qImgDominantColor, + ("outputEncoding" .=) <$> _qOutputEncoding, + ("siteSearchFilter" .=) <$> _qSiteSearchFilter, + ("inputEncoding" .=) <$> _qInputEncoding, + ("orTerms" .=) <$> _qOrTerms, + ("searchTerms" .=) <$> _qSearchTerms, + ("startPage" .=) <$> _qStartPage, + ("rights" .=) <$> _qRights, ("count" .=) <$> _qCount, + ("excludeTerms" .=) <$> _qExcludeTerms, + ("fileType" .=) <$> _qFileType, + ("searchType" .=) <$> _qSearchType, + ("googleHost" .=) <$> _qGoogleHost, + ("disableCnTwTranslation" .=) <$> + _qDisableCnTwTranslation, + ("relatedSite" .=) <$> _qRelatedSite, + ("hl" .=) <$> _qHl, ("cref" .=) <$> _qCref, + ("sort" .=) <$> _qSort, + ("language" .=) <$> _qLanguage, + ("siteSearch" .=) <$> _qSiteSearch, + ("filter" .=) <$> _qFilter, + ("totalResults" .=) <$> _qTotalResults, + ("dateRestrict" .=) <$> _qDateRestrict, + ("title" .=) <$> _qTitle, + ("linkSite" .=) <$> _qLinkSite, + ("lowRange" .=) <$> _qLowRange, + ("imgType" .=) <$> _qImgType, ("gl" .=) <$> _qGl, + ("cx" .=) <$> _qCx, + ("imgColorType" .=) <$> _qImgColorType, + ("imgSize" .=) <$> _qImgSize, + ("exactTerms" .=) <$> _qExactTerms, + ("startIndex" .=) <$> _qStartIndex, + ("cr" .=) <$> _qCr, ("safe" .=) <$> _qSafe, + ("hq" .=) <$> _qHq, + ("highRange" .=) <$> _qHighRange]) + +-- +-- /See:/ 'promotion' smart constructor. +data Promotion = Promotion + { _pImage :: !(Maybe PromotionImage) + , _pDisplayLink :: !(Maybe Text) + , _pBodyLines :: !(Maybe [PromotionBodyLinesItem]) + , _pLink :: !(Maybe Text) + , _pHtmlTitle :: !(Maybe Text) + , _pTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Promotion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pImage' +-- +-- * 'pDisplayLink' +-- +-- * 'pBodyLines' +-- +-- * 'pLink' +-- +-- * 'pHtmlTitle' +-- +-- * 'pTitle' +promotion + :: Promotion +promotion = + Promotion + { _pImage = Nothing + , _pDisplayLink = Nothing + , _pBodyLines = Nothing + , _pLink = Nothing + , _pHtmlTitle = Nothing + , _pTitle = Nothing + } + +pImage :: Lens' Promotion (Maybe PromotionImage) +pImage = lens _pImage (\ s a -> s{_pImage = a}) + +pDisplayLink :: Lens' Promotion (Maybe Text) +pDisplayLink + = lens _pDisplayLink (\ s a -> s{_pDisplayLink = a}) + +pBodyLines :: Lens' Promotion [PromotionBodyLinesItem] +pBodyLines + = lens _pBodyLines (\ s a -> s{_pBodyLines = a}) . + _Default + . _Coerce + +pLink :: Lens' Promotion (Maybe Text) +pLink = lens _pLink (\ s a -> s{_pLink = a}) + +pHtmlTitle :: Lens' Promotion (Maybe Text) +pHtmlTitle + = lens _pHtmlTitle (\ s a -> s{_pHtmlTitle = a}) + +pTitle :: Lens' Promotion (Maybe Text) +pTitle = lens _pTitle (\ s a -> s{_pTitle = a}) + +instance FromJSON Promotion where + parseJSON + = withObject "Promotion" + (\ o -> + Promotion <$> + (o .:? "image") <*> (o .:? "displayLink") <*> + (o .:? "bodyLines" .!= mempty) + <*> (o .:? "link") + <*> (o .:? "htmlTitle") + <*> (o .:? "title")) + +instance ToJSON Promotion where + toJSON Promotion{..} + = object + (catMaybes + [("image" .=) <$> _pImage, + ("displayLink" .=) <$> _pDisplayLink, + ("bodyLines" .=) <$> _pBodyLines, + ("link" .=) <$> _pLink, + ("htmlTitle" .=) <$> _pHtmlTitle, + ("title" .=) <$> _pTitle]) + +-- +-- /See:/ 'search' smart constructor. +data Search = Search + { _sQueries :: !(Maybe SearchQueries) + , _sContext :: !(Maybe (Maybe Context)) + , _sKind :: !Text + , _sUrl :: !(Maybe SearchURL) + , _sItems :: !(Maybe [Maybe Result]) + , _sSearchInformation :: !(Maybe SearchSearchInformation) + , _sPromotions :: !(Maybe [Maybe Promotion]) + , _sSpelling :: !(Maybe SearchSpelling) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Search' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQueries' +-- +-- * 'sContext' +-- +-- * 'sKind' +-- +-- * 'sUrl' +-- +-- * 'sItems' +-- +-- * 'sSearchInformation' +-- +-- * 'sPromotions' +-- +-- * 'sSpelling' +search + :: Search +search = + Search + { _sQueries = Nothing + , _sContext = Nothing + , _sKind = "customsearch#search" + , _sUrl = Nothing + , _sItems = Nothing + , _sSearchInformation = Nothing + , _sPromotions = Nothing + , _sSpelling = Nothing + } + +sQueries :: Lens' Search (Maybe SearchQueries) +sQueries = lens _sQueries (\ s a -> s{_sQueries = a}) + +sContext :: Lens' Search (Maybe (Maybe Context)) +sContext = lens _sContext (\ s a -> s{_sContext = a}) + +sKind :: Lens' Search Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +sUrl :: Lens' Search (Maybe SearchURL) +sUrl = lens _sUrl (\ s a -> s{_sUrl = a}) + +sItems :: Lens' Search [Maybe Result] +sItems + = lens _sItems (\ s a -> s{_sItems = a}) . _Default . + _Coerce + +sSearchInformation :: Lens' Search (Maybe SearchSearchInformation) +sSearchInformation + = lens _sSearchInformation + (\ s a -> s{_sSearchInformation = a}) + +sPromotions :: Lens' Search [Maybe Promotion] +sPromotions + = lens _sPromotions (\ s a -> s{_sPromotions = a}) . + _Default + . _Coerce + +sSpelling :: Lens' Search (Maybe SearchSpelling) +sSpelling + = lens _sSpelling (\ s a -> s{_sSpelling = a}) + +instance FromJSON Search where + parseJSON + = withObject "Search" + (\ o -> + Search <$> + (o .:? "queries") <*> (o .:? "context") <*> + (o .:? "kind" .!= "customsearch#search") + <*> (o .:? "url") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "searchInformation") + <*> (o .:? "promotions" .!= mempty) + <*> (o .:? "spelling")) + +instance ToJSON Search where + toJSON Search{..} + = object + (catMaybes + [("queries" .=) <$> _sQueries, + ("context" .=) <$> _sContext, + Just ("kind" .= _sKind), ("url" .=) <$> _sUrl, + ("items" .=) <$> _sItems, + ("searchInformation" .=) <$> _sSearchInformation, + ("promotions" .=) <$> _sPromotions, + ("spelling" .=) <$> _sSpelling]) diff --git a/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Sum.hs b/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Sum.hs new file mode 100644 index 000000000..4524b5059 --- /dev/null +++ b/gogol-customsearch/gen/Network/Google/CustomSearch/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.CustomSearch.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.CustomSearch.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-customsearch/gen/Network/Google/Resource/Search/Cse/List.hs b/gogol-customsearch/gen/Network/Google/Resource/Search/Cse/List.hs new file mode 100644 index 000000000..97c6f5f2e --- /dev/null +++ b/gogol-customsearch/gen/Network/Google/Resource/Search/Cse/List.hs @@ -0,0 +1,555 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Search.Cse.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns metadata about the search performed, metadata about the custom +-- search engine used for the search, and the search results. +-- +-- /See:/ for @SearchCseList@. +module Search.Cse.List + ( + -- * REST Resource + CseListAPI + + -- * Creating a Request + , cseList + , CseList + + -- * Request Lenses + , clImgDominantColor + , clQuotaUser + , clPrettyPrint + , clSiteSearchFilter + , clC2coff + , clOrTerms + , clUserIp + , clStart + , clRights + , clExcludeTerms + , clNum + , clFileType + , clSearchType + , clLr + , clQ + , clGooglehost + , clRelatedSite + , clHl + , clKey + , clCref + , clSort + , clSiteSearch + , clFilter + , clDateRestrict + , clLinkSite + , clOauthToken + , clLowRange + , clImgType + , clGl + , clCx + , clImgColorType + , clImgSize + , clExactTerms + , clCr + , clSafe + , clHq + , clFields + , clHighRange + , clAlt + ) where + +import Network.Google.CustomSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @SearchCseList@ which the +-- 'CseList' request conforms to. +type CseListAPI = + "v1" :> + QueryParam "imgDominantColor" Text :> + QueryParam "siteSearchFilter" Text :> + QueryParam "c2coff" Text :> + QueryParam "orTerms" Text :> + QueryParam "start" Word32 :> + QueryParam "rights" Text :> + QueryParam "excludeTerms" Text :> + QueryParam "num" Word32 :> + QueryParam "fileType" Text :> + QueryParam "searchType" Text :> + QueryParam "lr" Text :> + QueryParam "q" Text :> + QueryParam "googlehost" Text :> + QueryParam "relatedSite" Text :> + QueryParam "hl" Text :> + QueryParam "cref" Text :> + QueryParam "sort" Text :> + QueryParam "siteSearch" Text :> + QueryParam "filter" Text :> + QueryParam "dateRestrict" Text :> + QueryParam "linkSite" Text :> + QueryParam "lowRange" Text :> + QueryParam "imgType" Text :> + QueryParam "gl" Text :> + QueryParam "cx" Text :> + QueryParam + "imgColorType" + Text + :> + QueryParam "imgSize" + Text + :> + QueryParam + "exactTerms" + Text + :> + QueryParam "cr" + Text + :> + QueryParam + "safe" + Text + :> + QueryParam + "hq" + Text + :> + QueryParam + "highRange" + Text + :> + Get + '[JSON] + Search + +-- | Returns metadata about the search performed, metadata about the custom +-- search engine used for the search, and the search results. +-- +-- /See:/ 'cseList' smart constructor. +data CseList = CseList + { _clImgDominantColor :: !(Maybe Text) + , _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clSiteSearchFilter :: !(Maybe Text) + , _clC2coff :: !(Maybe Text) + , _clOrTerms :: !(Maybe Text) + , _clUserIp :: !(Maybe Text) + , _clStart :: !(Maybe Word32) + , _clRights :: !(Maybe Text) + , _clExcludeTerms :: !(Maybe Text) + , _clNum :: !Word32 + , _clFileType :: !(Maybe Text) + , _clSearchType :: !(Maybe Text) + , _clLr :: !(Maybe Text) + , _clQ :: !Text + , _clGooglehost :: !(Maybe Text) + , _clRelatedSite :: !(Maybe Text) + , _clHl :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clCref :: !(Maybe Text) + , _clSort :: !(Maybe Text) + , _clSiteSearch :: !(Maybe Text) + , _clFilter :: !(Maybe Text) + , _clDateRestrict :: !(Maybe Text) + , _clLinkSite :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clLowRange :: !(Maybe Text) + , _clImgType :: !(Maybe Text) + , _clGl :: !(Maybe Text) + , _clCx :: !(Maybe Text) + , _clImgColorType :: !(Maybe Text) + , _clImgSize :: !(Maybe Text) + , _clExactTerms :: !(Maybe Text) + , _clCr :: !(Maybe Text) + , _clSafe :: !Text + , _clHq :: !(Maybe Text) + , _clFields :: !(Maybe Text) + , _clHighRange :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CseList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clImgDominantColor' +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clSiteSearchFilter' +-- +-- * 'clC2coff' +-- +-- * 'clOrTerms' +-- +-- * 'clUserIp' +-- +-- * 'clStart' +-- +-- * 'clRights' +-- +-- * 'clExcludeTerms' +-- +-- * 'clNum' +-- +-- * 'clFileType' +-- +-- * 'clSearchType' +-- +-- * 'clLr' +-- +-- * 'clQ' +-- +-- * 'clGooglehost' +-- +-- * 'clRelatedSite' +-- +-- * 'clHl' +-- +-- * 'clKey' +-- +-- * 'clCref' +-- +-- * 'clSort' +-- +-- * 'clSiteSearch' +-- +-- * 'clFilter' +-- +-- * 'clDateRestrict' +-- +-- * 'clLinkSite' +-- +-- * 'clOauthToken' +-- +-- * 'clLowRange' +-- +-- * 'clImgType' +-- +-- * 'clGl' +-- +-- * 'clCx' +-- +-- * 'clImgColorType' +-- +-- * 'clImgSize' +-- +-- * 'clExactTerms' +-- +-- * 'clCr' +-- +-- * 'clSafe' +-- +-- * 'clHq' +-- +-- * 'clFields' +-- +-- * 'clHighRange' +-- +-- * 'clAlt' +cseList + :: Text -- ^ 'q' + -> CseList +cseList pClQ_ = + CseList + { _clImgDominantColor = Nothing + , _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clSiteSearchFilter = Nothing + , _clC2coff = Nothing + , _clOrTerms = Nothing + , _clUserIp = Nothing + , _clStart = Nothing + , _clRights = Nothing + , _clExcludeTerms = Nothing + , _clNum = 10 + , _clFileType = Nothing + , _clSearchType = Nothing + , _clLr = Nothing + , _clQ = pClQ_ + , _clGooglehost = Nothing + , _clRelatedSite = Nothing + , _clHl = Nothing + , _clKey = Nothing + , _clCref = Nothing + , _clSort = Nothing + , _clSiteSearch = Nothing + , _clFilter = Nothing + , _clDateRestrict = Nothing + , _clLinkSite = Nothing + , _clOauthToken = Nothing + , _clLowRange = Nothing + , _clImgType = Nothing + , _clGl = Nothing + , _clCx = Nothing + , _clImgColorType = Nothing + , _clImgSize = Nothing + , _clExactTerms = Nothing + , _clCr = Nothing + , _clSafe = "off" + , _clHq = Nothing + , _clFields = Nothing + , _clHighRange = Nothing + , _clAlt = "json" + } + +-- | Returns images of a specific dominant color: yellow, green, teal, blue, +-- purple, pink, white, gray, black and brown. +clImgDominantColor :: Lens' CseList' (Maybe Text) +clImgDominantColor + = lens _clImgDominantColor + (\ s a -> s{_clImgDominantColor = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CseList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CseList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | Controls whether to include or exclude results from the site named in +-- the as_sitesearch parameter +clSiteSearchFilter :: Lens' CseList' (Maybe Text) +clSiteSearchFilter + = lens _clSiteSearchFilter + (\ s a -> s{_clSiteSearchFilter = a}) + +-- | Turns off the translation between zh-CN and zh-TW. +clC2coff :: Lens' CseList' (Maybe Text) +clC2coff = lens _clC2coff (\ s a -> s{_clC2coff = a}) + +-- | Provides additional search terms to check for in a document, where each +-- document in the search results must contain at least one of the +-- additional search terms +clOrTerms :: Lens' CseList' (Maybe Text) +clOrTerms + = lens _clOrTerms (\ s a -> s{_clOrTerms = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CseList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | The index of the first result to return +clStart :: Lens' CseList' (Maybe Word32) +clStart = lens _clStart (\ s a -> s{_clStart = a}) + +-- | Filters based on licensing. Supported values include: cc_publicdomain, +-- cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and +-- combinations of these. +clRights :: Lens' CseList' (Maybe Text) +clRights = lens _clRights (\ s a -> s{_clRights = a}) + +-- | Identifies a word or phrase that should not appear in any documents in +-- the search results +clExcludeTerms :: Lens' CseList' (Maybe Text) +clExcludeTerms + = lens _clExcludeTerms + (\ s a -> s{_clExcludeTerms = a}) + +-- | Number of search results to return +clNum :: Lens' CseList' Word32 +clNum = lens _clNum (\ s a -> s{_clNum = a}) + +-- | Returns images of a specified type. Some of the allowed values are: bmp, +-- gif, png, jpg, svg, pdf, ... +clFileType :: Lens' CseList' (Maybe Text) +clFileType + = lens _clFileType (\ s a -> s{_clFileType = a}) + +-- | Specifies the search type: image. +clSearchType :: Lens' CseList' (Maybe Text) +clSearchType + = lens _clSearchType (\ s a -> s{_clSearchType = a}) + +-- | The language restriction for the search results +clLr :: Lens' CseList' (Maybe Text) +clLr = lens _clLr (\ s a -> s{_clLr = a}) + +-- | Query +clQ :: Lens' CseList' Text +clQ = lens _clQ (\ s a -> s{_clQ = a}) + +-- | The local Google domain to use to perform the search. +clGooglehost :: Lens' CseList' (Maybe Text) +clGooglehost + = lens _clGooglehost (\ s a -> s{_clGooglehost = a}) + +-- | Specifies that all search results should be pages that are related to +-- the specified URL +clRelatedSite :: Lens' CseList' (Maybe Text) +clRelatedSite + = lens _clRelatedSite + (\ s a -> s{_clRelatedSite = a}) + +-- | Sets the user interface language. +clHl :: Lens' CseList' (Maybe Text) +clHl = lens _clHl (\ s a -> s{_clHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CseList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | The URL of a linked custom search engine +clCref :: Lens' CseList' (Maybe Text) +clCref = lens _clCref (\ s a -> s{_clCref = a}) + +-- | The sort expression to apply to the results +clSort :: Lens' CseList' (Maybe Text) +clSort = lens _clSort (\ s a -> s{_clSort = a}) + +-- | Specifies all search results should be pages from a given site +clSiteSearch :: Lens' CseList' (Maybe Text) +clSiteSearch + = lens _clSiteSearch (\ s a -> s{_clSiteSearch = a}) + +-- | Controls turning on or off the duplicate content filter. +clFilter :: Lens' CseList' (Maybe Text) +clFilter = lens _clFilter (\ s a -> s{_clFilter = a}) + +-- | Specifies all search results are from a time period +clDateRestrict :: Lens' CseList' (Maybe Text) +clDateRestrict + = lens _clDateRestrict + (\ s a -> s{_clDateRestrict = a}) + +-- | Specifies that all search results should contain a link to a particular +-- URL +clLinkSite :: Lens' CseList' (Maybe Text) +clLinkSite + = lens _clLinkSite (\ s a -> s{_clLinkSite = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CseList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Creates a range in form as_nlo value..as_nhi value and attempts to +-- append it to query +clLowRange :: Lens' CseList' (Maybe Text) +clLowRange + = lens _clLowRange (\ s a -> s{_clLowRange = a}) + +-- | Returns images of a type, which can be one of: clipart, face, lineart, +-- news, and photo. +clImgType :: Lens' CseList' (Maybe Text) +clImgType + = lens _clImgType (\ s a -> s{_clImgType = a}) + +-- | Geolocation of end user. +clGl :: Lens' CseList' (Maybe Text) +clGl = lens _clGl (\ s a -> s{_clGl = a}) + +-- | The custom search engine ID to scope this search query +clCx :: Lens' CseList' (Maybe Text) +clCx = lens _clCx (\ s a -> s{_clCx = a}) + +-- | Returns black and white, grayscale, or color images: mono, gray, and +-- color. +clImgColorType :: Lens' CseList' (Maybe Text) +clImgColorType + = lens _clImgColorType + (\ s a -> s{_clImgColorType = a}) + +-- | Returns images of a specified size, where size can be one of: icon, +-- small, medium, large, xlarge, xxlarge, and huge. +clImgSize :: Lens' CseList' (Maybe Text) +clImgSize + = lens _clImgSize (\ s a -> s{_clImgSize = a}) + +-- | Identifies a phrase that all documents in the search results must +-- contain +clExactTerms :: Lens' CseList' (Maybe Text) +clExactTerms + = lens _clExactTerms (\ s a -> s{_clExactTerms = a}) + +-- | Country restrict(s). +clCr :: Lens' CseList' (Maybe Text) +clCr = lens _clCr (\ s a -> s{_clCr = a}) + +-- | Search safety level +clSafe :: Lens' CseList' Text +clSafe = lens _clSafe (\ s a -> s{_clSafe = a}) + +-- | Appends the extra query terms to the query. +clHq :: Lens' CseList' (Maybe Text) +clHq = lens _clHq (\ s a -> s{_clHq = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CseList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Creates a range in form as_nlo value..as_nhi value and attempts to +-- append it to query +clHighRange :: Lens' CseList' (Maybe Text) +clHighRange + = lens _clHighRange (\ s a -> s{_clHighRange = a}) + +-- | Data format for the response. +clAlt :: Lens' CseList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CseList' where + type Rs CseList' = Search + request = requestWithRoute defReq customSearchURL + requestWithRoute r u CseList{..} + = go _clImgDominantColor _clQuotaUser _clPrettyPrint + _clSiteSearchFilter + _clC2coff + _clOrTerms + _clUserIp + _clStart + _clRights + _clExcludeTerms + (Just _clNum) + _clFileType + _clSearchType + _clLr + (Just _clQ) + _clGooglehost + _clRelatedSite + _clHl + _clKey + _clCref + _clSort + _clSiteSearch + _clFilter + _clDateRestrict + _clLinkSite + _clOauthToken + _clLowRange + _clImgType + _clGl + _clCx + _clImgColorType + _clImgSize + _clExactTerms + _clCr + (Just _clSafe) + _clHq + _clFields + _clHighRange + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CseListAPI) r u diff --git a/gogol-customsearch/gogol-customsearch.cabal b/gogol-customsearch/gogol-customsearch.cabal new file mode 100644 index 000000000..cca38a59d --- /dev/null +++ b/gogol-customsearch/gogol-customsearch.cabal @@ -0,0 +1,43 @@ +name: gogol-customsearch +version: 0.0.1 +synopsis: CustomSearch API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you search over a website or collection of websites + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.CustomSearch + , Network.Google.CustomSearch.Types + , Network.Google.Resource.Search.Cse.List + + other-modules: + Network.Google.CustomSearch.Types.Product + , Network.Google.CustomSearch.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-customsearch/src/.gitkeep b/gogol-customsearch/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-dataflow/LICENSE b/gogol-dataflow/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-dataflow/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-dataflow/Makefile b/gogol-dataflow/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-dataflow/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-dataflow/README.md b/gogol-dataflow/README.md new file mode 100644 index 000000000..f967d63e0 --- /dev/null +++ b/gogol-dataflow/README.md @@ -0,0 +1,28 @@ +# gogol-dataflow + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Dataflow API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-dataflow` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-dataflow/Setup.hs b/gogol-dataflow/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-dataflow/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-dataflow/gen/Network/Google/Dataflow.hs b/gogol-dataflow/gen/Network/Google/Dataflow.hs new file mode 100644 index 000000000..3c066e2e3 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Dataflow.hs @@ -0,0 +1,633 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Dataflow +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Google Dataflow API. +-- +-- /See:/ +module Network.Google.Dataflow + ( + -- * API + DataflowAPI + , dataflowAPI + , dataflowURL + + -- * Service Methods + + -- * REST Resources + + -- ** DataflowProjectsJobsCreate + , module Dataflow.Projects.Jobs.Create + + -- ** DataflowProjectsJobsGet + , module Dataflow.Projects.Jobs.Get + + -- ** DataflowProjectsJobsGetMetrics + , module Dataflow.Projects.Jobs.GetMetrics + + -- ** DataflowProjectsJobsList + , module Dataflow.Projects.Jobs.List + + -- ** DataflowProjectsJobsMessagesList + , module Dataflow.Projects.Jobs.Messages.List + + -- ** DataflowProjectsJobsUpdate + , module Dataflow.Projects.Jobs.Update + + -- ** DataflowProjectsJobsWorkItemsLease + , module Dataflow.Projects.Jobs.WorkItems.Lease + + -- ** DataflowProjectsJobsWorkItemsReportStatus + , module Dataflow.Projects.Jobs.WorkItems.ReportStatus + + -- * Types + + -- ** ComputationTopology + , ComputationTopology + , computationTopology + , ctStateFamilies + , ctUserStageName + , ctInputs + , ctKeyRanges + , ctOutputs + , ctComputationId + , ctSystemStageName + + -- ** Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- ** WorkItem + , WorkItem + , workItem + , wiJobId + , wiReportStatusInterval + , wiShellTask + , wiStreamingSetupTask + , wiInitialReportIndex + , wiMapTask + , wiPackages + , wiStreamingComputationTask + , wiSourceOperationTask + , wiId + , wiProjectId + , wiLeaseExpireTime + , wiConfiguration + , wiSeqMapTask + + -- ** SourceSplitResponse + , SourceSplitResponse + , sourceSplitResponse + , ssrBundles + , ssrShards + , ssrOutcome + + -- ** AutoscalingSettings + , AutoscalingSettings + , autoscalingSettings + , asMaxNumWorkers + , asAlgorithm + + -- ** Sink + , Sink + , sink + , sCodec + , sSpec + + -- ** InstructionOutput + , InstructionOutput + , instructionOutput + , ioCodec + , ioName + , ioSystemName + + -- ** JobExecutionStageInfo + , JobExecutionStageInfo + , jobExecutionStageInfo + , jesiStepName + + -- ** SourceSplitOptions + , SourceSplitOptions + , sourceSplitOptions + , ssoDesiredShardSizeBytes + , ssoDesiredBundleSizeBytes + + -- ** ReportWorkItemStatusRequest + , ReportWorkItemStatusRequest + , reportWorkItemStatusRequest + , rwisrCurrentWorkerTime + , rwisrWorkItemStatuses + , rwisrWorkerId + + -- ** MetricStructuredName + , MetricStructuredName + , metricStructuredName + , msnOrigin + , msnContext + , msnName + + -- ** Disk + , Disk + , disk + , dSizeGb + , dDiskType + , dMountPoint + + -- ** ConcatPosition + , ConcatPosition + , concatPosition + , cpIndex + , cpPosition + + -- ** Environment + , Environment + , environment + , eDataset + , eExperiments + , eWorkerPools + , eClusterManagerApiService + , eVersion + , eInternalExperiments + , eTempStoragePrefix + , eUserAgent + , eSdkPipelineOptions + + -- ** WriteInstruction + , WriteInstruction + , writeInstruction + , wiSink + , wiInput + + -- ** SourceGetMetadataResponse + , SourceGetMetadataResponse + , sourceGetMetadataResponse + , sgmrMetadata + + -- ** MetricUpdate + , MetricUpdate + , metricUpdate + , muMeanSum + , muInternal + , muSet + , muCumulative + , muKind + , muUpdateTime + , muMeanCount + , muName + , muScalar + + -- ** StreamingStageLocation + , StreamingStageLocation + , streamingStageLocation + , sslStreamId + + -- ** DerivedSource + , DerivedSource + , derivedSource + , dsDerivationMode + , dsSource + + -- ** TaskRunnerSettings + , TaskRunnerSettings + , taskRunnerSettings + , trsContinueOnException + , trsHarnessCommand + , trsWorkflowFileName + , trsTaskGroup + , trsAlsologtostderr + , trsDataflowApiVersion + , trsLogDir + , trsCommandlinesFileName + , trsVmId + , trsBaseUrl + , trsOauthScopes + , trsTaskUser + , trsStreamingWorkerMainClass + , trsBaseTaskDir + , trsLogUploadLocation + , trsTempStoragePrefix + , trsLogToSerialconsole + , trsParallelWorkerSettings + , trsLanguageHint + + -- ** JobMetrics + , JobMetrics + , jobMetrics + , jmMetrics + , jmMetricTime + + -- ** FlattenInstruction + , FlattenInstruction + , flattenInstruction + , fiInputs + + -- ** SourceMetadata + , SourceMetadata + , sourceMetadata + , smEstimatedSizeBytes + , smProducesSortedKeys + , smInfinite + + -- ** WorkItemStatus + , WorkItemStatus + , workItemStatus + , wisProgress + , wisSourceOperationResponse + , wisStopPosition + , wisDynamicSourceSplit + , wisCompleted + , wisSourceFork + , wisReportIndex + , wisRequestedLeaseDuration + , wisErrors + , wisMetricUpdates + , wisWorkItemId + + -- ** ShellTask + , ShellTask + , shellTask + , stCommand + , stExitCode + + -- ** LeaseWorkItemRequest + , LeaseWorkItemRequest + , leaseWorkItemRequest + , lwirWorkItemTypes + , lwirCurrentWorkerTime + , lwirWorkerCapabilities + , lwirRequestedLeaseDuration + , lwirWorkerId + + -- ** SourceOperationResponse + , SourceOperationResponse + , sourceOperationResponse + , sorSplit + , sorGetMetadata + + -- ** TopologyConfig + , TopologyConfig + , topologyConfig + , tcDataDiskAssignments + , tcUserStageToComputationNameMap + , tcComputations + + -- ** WorkerSettings + , WorkerSettings + , workerSettings + , wsServicePath + , wsBaseUrl + , wsShuffleServicePath + , wsTempStoragePrefix + , wsReportingEnabled + , wsWorkerId + + -- ** WorkItemServiceState + , WorkItemServiceState + , workItemServiceState + , wissNextReportIndex + , wissReportStatusInterval + , wissHarnessData + , wissSuggestedStopPoint + , wissSuggestedStopPosition + , wissLeaseExpireTime + + -- ** DataDiskAssignment + , DataDiskAssignment + , dataDiskAssignment + , ddaVmInstance + , ddaDataDisks + + -- ** StreamingSetupTask + , StreamingSetupTask + , streamingSetupTask + , sstStreamingComputationTopology + , sstReceiveWorkPort + , sstWorkerHarnessPort + + -- ** StreamLocation + , StreamLocation + , streamLocation + , slStreamingStageLocation + , slSideInputLocation + , slCustomSourceLocation + , slPubsubLocation + + -- ** MountedDataDisk + , MountedDataDisk + , mountedDataDisk + , mddDataDisk + + -- ** MapTask + , MapTask + , mapTask + , mtInstructions + , mtSystemName + , mtStageName + + -- ** StreamingComputationTask + , StreamingComputationTask + , streamingComputationTask + , sctTaskType + , sctDataDisks + , sctComputationRanges + + -- ** StreamingSideInputLocation + , StreamingSideInputLocation + , streamingSideInputLocation + , ssilTag + , ssilStateFamily + + -- ** JobMessage + , JobMessage + , jobMessage + , jmTime + , jmMessageText + , jmMessageImportance + , jmId + + -- ** Job + , Job + , job + , jobRequestedState + , jobEnvironment + , jobClientRequestId + , jobCurrentState + , jobReplacedByJobId + , jobSteps + , jobExecutionInfo + , jobName + , jobTransformNameMapping + , jobId + , jobProjectId + , jobType + , jobCurrentStateTime + , jobReplaceJobId + , jobCreateTime + + -- ** SeqMapTaskOutputInfo + , SeqMapTaskOutputInfo + , seqMapTaskOutputInfo + , smtoiSink + , smtoiTag + + -- ** SourceGetMetadataRequest + , SourceGetMetadataRequest + , sourceGetMetadataRequest + , sgmrSource + + -- ** DynamicSourceSplit + , DynamicSourceSplit + , dynamicSourceSplit + , dssResidual + , dssPrimary + + -- ** ReadInstruction + , ReadInstruction + , readInstruction + , riSource + + -- ** WorkerPool + , WorkerPool + , workerPool + , wpAutoscalingSettings + , wpDiskSizeGb + , wpKind + , wpTaskrunnerSettings + , wpNumWorkers + , wpNetwork + , wpZone + , wpPackages + , wpOnHostMaintenance + , wpDiskSourceImage + , wpMachineType + , wpMetadata + , wpDiskType + , wpTeardownPolicy + , wpDefaultPackageSet + , wpPoolArgs + , wpDataDisks + + -- ** Package + , Package + , package + , pLocation + , pName + + -- ** Step + , Step + , step + , sKind + , sName + , sProperties + + -- ** Source + , Source + , source + , souDoesNotNeedSplitting + , souBaseSpecs + , souCodec + , souSpec + , souMetadata + + -- ** SourceFork + , SourceFork + , sourceFork + , sfResidual + , sfPrimarySource + , sfPrimary + , sfResidualSource + + -- ** KeyRangeLocation + , KeyRangeLocation + , keyRangeLocation + , krlPersistentDirectory + , krlDataDisk + , krlStart + , krlDeliveryEndpoint + , krlEnd + + -- ** ReportWorkItemStatusResponse + , ReportWorkItemStatusResponse + , reportWorkItemStatusResponse + , rwisrWorkItemServiceStates + + -- ** ApproximateProgress + , ApproximateProgress + , approximateProgress + , apRemainingTime + , apPercentComplete + , apPosition + + -- ** StreamingComputationRanges + , StreamingComputationRanges + , streamingComputationRanges + , scrRangeAssignments + , scrComputationId + + -- ** ListJobsResponse + , ListJobsResponse + , listJobsResponse + , ljrNextPageToken + , ljrJobs + + -- ** MultiOutputInfo + , MultiOutputInfo + , multiOutputInfo + , moiTag + + -- ** PartialGroupByKeyInstruction + , PartialGroupByKeyInstruction + , partialGroupByKeyInstruction + , pgbkiValueCombiningFn + , pgbkiInput + , pgbkiInputElementCodec + + -- ** ParDoInstruction + , ParDoInstruction + , parDoInstruction + , pdiNumOutputs + , pdiMultiOutputInfos + , pdiSideInputs + , pdiInput + , pdiUserFn + + -- ** SideInputInfo + , SideInputInfo + , sideInputInfo + , siiTag + , siiKind + , siiSources + + -- ** StateFamilyConfig + , StateFamilyConfig + , stateFamilyConfig + , sfcIsRead + , sfcStateFamily + + -- ** ParallelInstruction + , ParallelInstruction + , parallelInstruction + , piRead + , piWrite + , piParDo + , piPartialGroupByKey + , piOutputs + , piName + , piSystemName + , piFlatten + + -- ** SourceSplitShard + , SourceSplitShard + , sourceSplitShard + , sssDerivationMode + , sssSource + + -- ** CustomSourceLocation + , CustomSourceLocation + , customSourceLocation + , cslStateful + + -- ** JobExecutionInfo + , JobExecutionInfo + , jobExecutionInfo + , jeiStages + + -- ** SeqMapTask + , SeqMapTask + , seqMapTask + , smtInputs + , smtName + , smtOutputInfos + , smtSystemName + , smtStageName + , smtUserFn + + -- ** ListJobMessagesResponse + , ListJobMessagesResponse + , listJobMessagesResponse + , ljmrJobMessages + , ljmrNextPageToken + + -- ** KeyRangeDataDiskAssignment + , KeyRangeDataDiskAssignment + , keyRangeDataDiskAssignment + , krddaDataDisk + , krddaStart + , krddaEnd + + -- ** PubsubLocation + , PubsubLocation + , pubsubLocation + , plTrackingSubscription + , plDropLateData + , plTimestampLabel + , plIdLabel + , plTopic + , plSubscription + + -- ** InstructionInput + , InstructionInput + , instructionInput + , iiProducerInstructionIndex + , iiOutputNum + + -- ** SourceSplitRequest + , SourceSplitRequest + , sourceSplitRequest + , ssrSource + , ssrOptions + + -- ** SourceOperationRequest + , SourceOperationRequest + , sourceOperationRequest + , sSplit + , sGetMetadata + + -- ** LeaseWorkItemResponse + , LeaseWorkItemResponse + , leaseWorkItemResponse + , lwirWorkItems + + -- ** Position + , Position + , position + , pByteOffset + , pConcatPosition + , pRecordIndex + , pShufflePosition + , pKey + , pEnd + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude +import Network.Google.Resource.Dataflow.Projects.Jobs.Create +import Network.Google.Resource.Dataflow.Projects.Jobs.Get +import Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics +import Network.Google.Resource.Dataflow.Projects.Jobs.List +import Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List +import Network.Google.Resource.Dataflow.Projects.Jobs.Update +import Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease +import Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus + +{- $resources +TODO +-} + +type DataflowAPI = Projects + +dataflowAPI :: Proxy DataflowAPI +dataflowAPI = Proxy diff --git a/gogol-dataflow/gen/Network/Google/Dataflow/Types.hs b/gogol-dataflow/gen/Network/Google/Dataflow/Types.hs new file mode 100644 index 000000000..f3644648c --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Dataflow/Types.hs @@ -0,0 +1,588 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Dataflow.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Dataflow.Types + ( + -- * Service URL + dataflowURL + + -- * ComputationTopology + , ComputationTopology + , computationTopology + , ctStateFamilies + , ctUserStageName + , ctInputs + , ctKeyRanges + , ctOutputs + , ctComputationId + , ctSystemStageName + + -- * Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- * WorkItem + , WorkItem + , workItem + , wiJobId + , wiReportStatusInterval + , wiShellTask + , wiStreamingSetupTask + , wiInitialReportIndex + , wiMapTask + , wiPackages + , wiStreamingComputationTask + , wiSourceOperationTask + , wiId + , wiProjectId + , wiLeaseExpireTime + , wiConfiguration + , wiSeqMapTask + + -- * SourceSplitResponse + , SourceSplitResponse + , sourceSplitResponse + , ssrBundles + , ssrShards + , ssrOutcome + + -- * AutoscalingSettings + , AutoscalingSettings + , autoscalingSettings + , asMaxNumWorkers + , asAlgorithm + + -- * Sink + , Sink + , sink + , sCodec + , sSpec + + -- * InstructionOutput + , InstructionOutput + , instructionOutput + , ioCodec + , ioName + , ioSystemName + + -- * JobExecutionStageInfo + , JobExecutionStageInfo + , jobExecutionStageInfo + , jesiStepName + + -- * SourceSplitOptions + , SourceSplitOptions + , sourceSplitOptions + , ssoDesiredShardSizeBytes + , ssoDesiredBundleSizeBytes + + -- * ReportWorkItemStatusRequest + , ReportWorkItemStatusRequest + , reportWorkItemStatusRequest + , rwisrCurrentWorkerTime + , rwisrWorkItemStatuses + , rwisrWorkerId + + -- * MetricStructuredName + , MetricStructuredName + , metricStructuredName + , msnOrigin + , msnContext + , msnName + + -- * Disk + , Disk + , disk + , dSizeGb + , dDiskType + , dMountPoint + + -- * ConcatPosition + , ConcatPosition + , concatPosition + , cpIndex + , cpPosition + + -- * Environment + , Environment + , environment + , eDataset + , eExperiments + , eWorkerPools + , eClusterManagerApiService + , eVersion + , eInternalExperiments + , eTempStoragePrefix + , eUserAgent + , eSdkPipelineOptions + + -- * WriteInstruction + , WriteInstruction + , writeInstruction + , wiSink + , wiInput + + -- * SourceGetMetadataResponse + , SourceGetMetadataResponse + , sourceGetMetadataResponse + , sgmrMetadata + + -- * MetricUpdate + , MetricUpdate + , metricUpdate + , muMeanSum + , muInternal + , muSet + , muCumulative + , muKind + , muUpdateTime + , muMeanCount + , muName + , muScalar + + -- * StreamingStageLocation + , StreamingStageLocation + , streamingStageLocation + , sslStreamId + + -- * DerivedSource + , DerivedSource + , derivedSource + , dsDerivationMode + , dsSource + + -- * TaskRunnerSettings + , TaskRunnerSettings + , taskRunnerSettings + , trsContinueOnException + , trsHarnessCommand + , trsWorkflowFileName + , trsTaskGroup + , trsAlsologtostderr + , trsDataflowApiVersion + , trsLogDir + , trsCommandlinesFileName + , trsVmId + , trsBaseUrl + , trsOauthScopes + , trsTaskUser + , trsStreamingWorkerMainClass + , trsBaseTaskDir + , trsLogUploadLocation + , trsTempStoragePrefix + , trsLogToSerialconsole + , trsParallelWorkerSettings + , trsLanguageHint + + -- * JobMetrics + , JobMetrics + , jobMetrics + , jmMetrics + , jmMetricTime + + -- * FlattenInstruction + , FlattenInstruction + , flattenInstruction + , fiInputs + + -- * SourceMetadata + , SourceMetadata + , sourceMetadata + , smEstimatedSizeBytes + , smProducesSortedKeys + , smInfinite + + -- * WorkItemStatus + , WorkItemStatus + , workItemStatus + , wisProgress + , wisSourceOperationResponse + , wisStopPosition + , wisDynamicSourceSplit + , wisCompleted + , wisSourceFork + , wisReportIndex + , wisRequestedLeaseDuration + , wisErrors + , wisMetricUpdates + , wisWorkItemId + + -- * ShellTask + , ShellTask + , shellTask + , stCommand + , stExitCode + + -- * LeaseWorkItemRequest + , LeaseWorkItemRequest + , leaseWorkItemRequest + , lwirWorkItemTypes + , lwirCurrentWorkerTime + , lwirWorkerCapabilities + , lwirRequestedLeaseDuration + , lwirWorkerId + + -- * SourceOperationResponse + , SourceOperationResponse + , sourceOperationResponse + , sorSplit + , sorGetMetadata + + -- * TopologyConfig + , TopologyConfig + , topologyConfig + , tcDataDiskAssignments + , tcUserStageToComputationNameMap + , tcComputations + + -- * WorkerSettings + , WorkerSettings + , workerSettings + , wsServicePath + , wsBaseUrl + , wsShuffleServicePath + , wsTempStoragePrefix + , wsReportingEnabled + , wsWorkerId + + -- * WorkItemServiceState + , WorkItemServiceState + , workItemServiceState + , wissNextReportIndex + , wissReportStatusInterval + , wissHarnessData + , wissSuggestedStopPoint + , wissSuggestedStopPosition + , wissLeaseExpireTime + + -- * DataDiskAssignment + , DataDiskAssignment + , dataDiskAssignment + , ddaVmInstance + , ddaDataDisks + + -- * StreamingSetupTask + , StreamingSetupTask + , streamingSetupTask + , sstStreamingComputationTopology + , sstReceiveWorkPort + , sstWorkerHarnessPort + + -- * StreamLocation + , StreamLocation + , streamLocation + , slStreamingStageLocation + , slSideInputLocation + , slCustomSourceLocation + , slPubsubLocation + + -- * MountedDataDisk + , MountedDataDisk + , mountedDataDisk + , mddDataDisk + + -- * MapTask + , MapTask + , mapTask + , mtInstructions + , mtSystemName + , mtStageName + + -- * StreamingComputationTask + , StreamingComputationTask + , streamingComputationTask + , sctTaskType + , sctDataDisks + , sctComputationRanges + + -- * StreamingSideInputLocation + , StreamingSideInputLocation + , streamingSideInputLocation + , ssilTag + , ssilStateFamily + + -- * JobMessage + , JobMessage + , jobMessage + , jmTime + , jmMessageText + , jmMessageImportance + , jmId + + -- * Job + , Job + , job + , jobRequestedState + , jobEnvironment + , jobClientRequestId + , jobCurrentState + , jobReplacedByJobId + , jobSteps + , jobExecutionInfo + , jobName + , jobTransformNameMapping + , jobId + , jobProjectId + , jobType + , jobCurrentStateTime + , jobReplaceJobId + , jobCreateTime + + -- * SeqMapTaskOutputInfo + , SeqMapTaskOutputInfo + , seqMapTaskOutputInfo + , smtoiSink + , smtoiTag + + -- * SourceGetMetadataRequest + , SourceGetMetadataRequest + , sourceGetMetadataRequest + , sgmrSource + + -- * DynamicSourceSplit + , DynamicSourceSplit + , dynamicSourceSplit + , dssResidual + , dssPrimary + + -- * ReadInstruction + , ReadInstruction + , readInstruction + , riSource + + -- * WorkerPool + , WorkerPool + , workerPool + , wpAutoscalingSettings + , wpDiskSizeGb + , wpKind + , wpTaskrunnerSettings + , wpNumWorkers + , wpNetwork + , wpZone + , wpPackages + , wpOnHostMaintenance + , wpDiskSourceImage + , wpMachineType + , wpMetadata + , wpDiskType + , wpTeardownPolicy + , wpDefaultPackageSet + , wpPoolArgs + , wpDataDisks + + -- * Package + , Package + , package + , pLocation + , pName + + -- * Step + , Step + , step + , sKind + , sName + , sProperties + + -- * Source + , Source + , source + , souDoesNotNeedSplitting + , souBaseSpecs + , souCodec + , souSpec + , souMetadata + + -- * SourceFork + , SourceFork + , sourceFork + , sfResidual + , sfPrimarySource + , sfPrimary + , sfResidualSource + + -- * KeyRangeLocation + , KeyRangeLocation + , keyRangeLocation + , krlPersistentDirectory + , krlDataDisk + , krlStart + , krlDeliveryEndpoint + , krlEnd + + -- * ReportWorkItemStatusResponse + , ReportWorkItemStatusResponse + , reportWorkItemStatusResponse + , rwisrWorkItemServiceStates + + -- * ApproximateProgress + , ApproximateProgress + , approximateProgress + , apRemainingTime + , apPercentComplete + , apPosition + + -- * StreamingComputationRanges + , StreamingComputationRanges + , streamingComputationRanges + , scrRangeAssignments + , scrComputationId + + -- * ListJobsResponse + , ListJobsResponse + , listJobsResponse + , ljrNextPageToken + , ljrJobs + + -- * MultiOutputInfo + , MultiOutputInfo + , multiOutputInfo + , moiTag + + -- * PartialGroupByKeyInstruction + , PartialGroupByKeyInstruction + , partialGroupByKeyInstruction + , pgbkiValueCombiningFn + , pgbkiInput + , pgbkiInputElementCodec + + -- * ParDoInstruction + , ParDoInstruction + , parDoInstruction + , pdiNumOutputs + , pdiMultiOutputInfos + , pdiSideInputs + , pdiInput + , pdiUserFn + + -- * SideInputInfo + , SideInputInfo + , sideInputInfo + , siiTag + , siiKind + , siiSources + + -- * StateFamilyConfig + , StateFamilyConfig + , stateFamilyConfig + , sfcIsRead + , sfcStateFamily + + -- * ParallelInstruction + , ParallelInstruction + , parallelInstruction + , piRead + , piWrite + , piParDo + , piPartialGroupByKey + , piOutputs + , piName + , piSystemName + , piFlatten + + -- * SourceSplitShard + , SourceSplitShard + , sourceSplitShard + , sssDerivationMode + , sssSource + + -- * CustomSourceLocation + , CustomSourceLocation + , customSourceLocation + , cslStateful + + -- * JobExecutionInfo + , JobExecutionInfo + , jobExecutionInfo + , jeiStages + + -- * SeqMapTask + , SeqMapTask + , seqMapTask + , smtInputs + , smtName + , smtOutputInfos + , smtSystemName + , smtStageName + , smtUserFn + + -- * ListJobMessagesResponse + , ListJobMessagesResponse + , listJobMessagesResponse + , ljmrJobMessages + , ljmrNextPageToken + + -- * KeyRangeDataDiskAssignment + , KeyRangeDataDiskAssignment + , keyRangeDataDiskAssignment + , krddaDataDisk + , krddaStart + , krddaEnd + + -- * PubsubLocation + , PubsubLocation + , pubsubLocation + , plTrackingSubscription + , plDropLateData + , plTimestampLabel + , plIdLabel + , plTopic + , plSubscription + + -- * InstructionInput + , InstructionInput + , instructionInput + , iiProducerInstructionIndex + , iiOutputNum + + -- * SourceSplitRequest + , SourceSplitRequest + , sourceSplitRequest + , ssrSource + , ssrOptions + + -- * SourceOperationRequest + , SourceOperationRequest + , sourceOperationRequest + , sSplit + , sGetMetadata + + -- * LeaseWorkItemResponse + , LeaseWorkItemResponse + , leaseWorkItemResponse + , lwirWorkItems + + -- * Position + , Position + , position + , pByteOffset + , pConcatPosition + , pRecordIndex + , pShufflePosition + , pKey + , pEnd + ) where + +import Network.Google.Dataflow.Types.Product +import Network.Google.Dataflow.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1b3' of the Google Dataflow API. +dataflowURL :: BaseURL +dataflowURL + = BaseUrl Https "https://dataflow.googleapis.com/" + 443 diff --git a/gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs b/gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs new file mode 100644 index 000000000..06cf68dd4 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs @@ -0,0 +1,5359 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Dataflow.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Dataflow.Types.Product where + +import Network.Google.Dataflow.Types.Sum +import Network.Google.Prelude + +-- | All configuration data for a particular Computation. +-- +-- /See:/ 'computationTopology' smart constructor. +data ComputationTopology = ComputationTopology + { _ctStateFamilies :: !(Maybe [Maybe StateFamilyConfig]) + , _ctUserStageName :: !(Maybe Text) + , _ctInputs :: !(Maybe [Maybe StreamLocation]) + , _ctKeyRanges :: !(Maybe [Maybe KeyRangeLocation]) + , _ctOutputs :: !(Maybe [Maybe StreamLocation]) + , _ctComputationId :: !(Maybe Text) + , _ctSystemStageName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ComputationTopology' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctStateFamilies' +-- +-- * 'ctUserStageName' +-- +-- * 'ctInputs' +-- +-- * 'ctKeyRanges' +-- +-- * 'ctOutputs' +-- +-- * 'ctComputationId' +-- +-- * 'ctSystemStageName' +computationTopology + :: ComputationTopology +computationTopology = + ComputationTopology + { _ctStateFamilies = Nothing + , _ctUserStageName = Nothing + , _ctInputs = Nothing + , _ctKeyRanges = Nothing + , _ctOutputs = Nothing + , _ctComputationId = Nothing + , _ctSystemStageName = Nothing + } + +-- | The state family values. +ctStateFamilies :: Lens' ComputationTopology [Maybe StateFamilyConfig] +ctStateFamilies + = lens _ctStateFamilies + (\ s a -> s{_ctStateFamilies = a}) + . _Default + . _Coerce + +-- | The user stage name. +ctUserStageName :: Lens' ComputationTopology (Maybe Text) +ctUserStageName + = lens _ctUserStageName + (\ s a -> s{_ctUserStageName = a}) + +-- | The inputs to the computation. +ctInputs :: Lens' ComputationTopology [Maybe StreamLocation] +ctInputs + = lens _ctInputs (\ s a -> s{_ctInputs = a}) . + _Default + . _Coerce + +-- | The key ranges processed by the computation. +ctKeyRanges :: Lens' ComputationTopology [Maybe KeyRangeLocation] +ctKeyRanges + = lens _ctKeyRanges (\ s a -> s{_ctKeyRanges = a}) . + _Default + . _Coerce + +-- | The outputs from the computation. +ctOutputs :: Lens' ComputationTopology [Maybe StreamLocation] +ctOutputs + = lens _ctOutputs (\ s a -> s{_ctOutputs = a}) . + _Default + . _Coerce + +-- | The ID of the computation. +ctComputationId :: Lens' ComputationTopology (Maybe Text) +ctComputationId + = lens _ctComputationId + (\ s a -> s{_ctComputationId = a}) + +-- | The system stage name. +ctSystemStageName :: Lens' ComputationTopology (Maybe Text) +ctSystemStageName + = lens _ctSystemStageName + (\ s a -> s{_ctSystemStageName = a}) + +instance FromJSON ComputationTopology where + parseJSON + = withObject "ComputationTopology" + (\ o -> + ComputationTopology <$> + (o .:? "stateFamilies" .!= mempty) <*> + (o .:? "userStageName") + <*> (o .:? "inputs" .!= mempty) + <*> (o .:? "keyRanges" .!= mempty) + <*> (o .:? "outputs" .!= mempty) + <*> (o .:? "computationId") + <*> (o .:? "systemStageName")) + +instance ToJSON ComputationTopology where + toJSON ComputationTopology{..} + = object + (catMaybes + [("stateFamilies" .=) <$> _ctStateFamilies, + ("userStageName" .=) <$> _ctUserStageName, + ("inputs" .=) <$> _ctInputs, + ("keyRanges" .=) <$> _ctKeyRanges, + ("outputs" .=) <$> _ctOutputs, + ("computationId" .=) <$> _ctComputationId, + ("systemStageName" .=) <$> _ctSystemStageName]) + +-- | The \`Status\` type defines a logical error model that is suitable for +-- different programming environments, including REST APIs and RPC APIs. It +-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is +-- designed to be: - Simple to use and understand for most users - Flexible +-- enough to meet unexpected needs # Overview The \`Status\` message +-- contains three pieces of data: error code, error message, and error +-- details. The error code should be an enum value of [google.rpc.Code][], +-- but it may accept additional error codes if needed. The error message +-- should be a developer-facing English message that helps developers +-- *understand* and *resolve* the error. If a localized user-facing error +-- message is needed, put the localized message in the error details or +-- localize it in the client. The optional error details may contain +-- arbitrary information about the error. There is a predefined set of +-- error detail types in the package \`google.rpc\` which can be used for +-- common error conditions. # Language mapping The \`Status\` message is +-- the logical representation of the error model, but it is not necessarily +-- the actual wire format. When the \`Status\` message is exposed in +-- different client libraries and different wire protocols, it can be +-- mapped differently. For example, it will likely be mapped to some +-- exceptions in Java, but more likely mapped to some error codes in C. # +-- Other uses The error model and the \`Status\` message can be used in a +-- variety of environments, either with or without APIs, to provide a +-- consistent developer experience across different environments. Example +-- uses of this error model include: - Partial errors. If a service needs +-- to return partial errors to the client, it may embed the \`Status\` in +-- the normal response to indicate the partial errors. - Workflow errors. A +-- typical workflow has multiple steps. Each step may have a \`Status\` +-- message for error reporting purpose. - Batch operations. If a client +-- uses batch request and batch response, the \`Status\` message should be +-- used directly inside batch response, one for each error sub-response. - +-- Asynchronous operations. If an API call embeds asynchronous operation +-- results in its response, the status of those operations should be +-- represented directly using the \`Status\` message. - Logging. If some +-- API errors are stored in logs, the message \`Status\` could be used +-- directly after any stripping needed for security\/privacy reasons. +-- +-- /See:/ 'status' smart constructor. +data Status = Status + { _sDetails :: !(Maybe [StatusDetailsItem]) + , _sCode :: !(Maybe Int32) + , _sMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Status' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sDetails' +-- +-- * 'sCode' +-- +-- * 'sMessage' +status + :: Status +status = + Status + { _sDetails = Nothing + , _sCode = Nothing + , _sMessage = Nothing + } + +-- | A list of messages that carry the error details. There will be a common +-- set of message types for APIs to use. +sDetails :: Lens' Status [StatusDetailsItem] +sDetails + = lens _sDetails (\ s a -> s{_sDetails = a}) . + _Default + . _Coerce + +-- | The status code, which should be an enum value of [google.rpc.Code][]. +sCode :: Lens' Status (Maybe Int32) +sCode = lens _sCode (\ s a -> s{_sCode = a}) + +-- | A developer-facing error message, which should be in English. Any +-- user-facing error message should be localized and sent in the +-- [google.rpc.Status.details][google.rpc.Status.details] field, or +-- localized by the client. +sMessage :: Lens' Status (Maybe Text) +sMessage = lens _sMessage (\ s a -> s{_sMessage = a}) + +instance FromJSON Status where + parseJSON + = withObject "Status" + (\ o -> + Status <$> + (o .:? "details" .!= mempty) <*> (o .:? "code") <*> + (o .:? "message")) + +instance ToJSON Status where + toJSON Status{..} + = object + (catMaybes + [("details" .=) <$> _sDetails, + ("code" .=) <$> _sCode, + ("message" .=) <$> _sMessage]) + +-- | WorkItem represents basic information about a WorkItem to be executed in +-- the cloud. +-- +-- /See:/ 'workItem' smart constructor. +data WorkItem = WorkItem + { _wiJobId :: !(Maybe Text) + , _wiReportStatusInterval :: !(Maybe Text) + , _wiShellTask :: !(Maybe (Maybe ShellTask)) + , _wiStreamingSetupTask :: !(Maybe (Maybe StreamingSetupTask)) + , _wiInitialReportIndex :: !(Maybe Int64) + , _wiMapTask :: !(Maybe (Maybe MapTask)) + , _wiPackages :: !(Maybe [Maybe Package]) + , _wiStreamingComputationTask :: !(Maybe (Maybe StreamingComputationTask)) + , _wiSourceOperationTask :: !(Maybe (Maybe SourceOperationRequest)) + , _wiId :: !(Maybe Int64) + , _wiProjectId :: !(Maybe Text) + , _wiLeaseExpireTime :: !(Maybe Text) + , _wiConfiguration :: !(Maybe Text) + , _wiSeqMapTask :: !(Maybe (Maybe SeqMapTask)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wiJobId' +-- +-- * 'wiReportStatusInterval' +-- +-- * 'wiShellTask' +-- +-- * 'wiStreamingSetupTask' +-- +-- * 'wiInitialReportIndex' +-- +-- * 'wiMapTask' +-- +-- * 'wiPackages' +-- +-- * 'wiStreamingComputationTask' +-- +-- * 'wiSourceOperationTask' +-- +-- * 'wiId' +-- +-- * 'wiProjectId' +-- +-- * 'wiLeaseExpireTime' +-- +-- * 'wiConfiguration' +-- +-- * 'wiSeqMapTask' +workItem + :: WorkItem +workItem = + WorkItem + { _wiJobId = Nothing + , _wiReportStatusInterval = Nothing + , _wiShellTask = Nothing + , _wiStreamingSetupTask = Nothing + , _wiInitialReportIndex = Nothing + , _wiMapTask = Nothing + , _wiPackages = Nothing + , _wiStreamingComputationTask = Nothing + , _wiSourceOperationTask = Nothing + , _wiId = Nothing + , _wiProjectId = Nothing + , _wiLeaseExpireTime = Nothing + , _wiConfiguration = Nothing + , _wiSeqMapTask = Nothing + } + +-- | Identifies the workflow job this WorkItem belongs to. +wiJobId :: Lens' WorkItem (Maybe Text) +wiJobId = lens _wiJobId (\ s a -> s{_wiJobId = a}) + +-- | Recommended reporting interval. +wiReportStatusInterval :: Lens' WorkItem (Maybe Text) +wiReportStatusInterval + = lens _wiReportStatusInterval + (\ s a -> s{_wiReportStatusInterval = a}) + +-- | Additional information for ShellTask WorkItems. +wiShellTask :: Lens' WorkItem (Maybe (Maybe ShellTask)) +wiShellTask + = lens _wiShellTask (\ s a -> s{_wiShellTask = a}) + +-- | Additional information for StreamingSetupTask WorkItems. +wiStreamingSetupTask :: Lens' WorkItem (Maybe (Maybe StreamingSetupTask)) +wiStreamingSetupTask + = lens _wiStreamingSetupTask + (\ s a -> s{_wiStreamingSetupTask = a}) + +-- | The initial index to use when reporting the status of the WorkItem. +wiInitialReportIndex :: Lens' WorkItem (Maybe Int64) +wiInitialReportIndex + = lens _wiInitialReportIndex + (\ s a -> s{_wiInitialReportIndex = a}) + +-- | Additional information for MapTask WorkItems. +wiMapTask :: Lens' WorkItem (Maybe (Maybe MapTask)) +wiMapTask + = lens _wiMapTask (\ s a -> s{_wiMapTask = a}) + +-- | Any required packages that need to be fetched in order to execute this +-- WorkItem. +wiPackages :: Lens' WorkItem [Maybe Package] +wiPackages + = lens _wiPackages (\ s a -> s{_wiPackages = a}) . + _Default + . _Coerce + +-- | Additional information for StreamingComputationTask WorkItems. +wiStreamingComputationTask :: Lens' WorkItem (Maybe (Maybe StreamingComputationTask)) +wiStreamingComputationTask + = lens _wiStreamingComputationTask + (\ s a -> s{_wiStreamingComputationTask = a}) + +-- | Additional information for source operation WorkItems. +wiSourceOperationTask :: Lens' WorkItem (Maybe (Maybe SourceOperationRequest)) +wiSourceOperationTask + = lens _wiSourceOperationTask + (\ s a -> s{_wiSourceOperationTask = a}) + +-- | Identifies this WorkItem. +wiId :: Lens' WorkItem (Maybe Int64) +wiId = lens _wiId (\ s a -> s{_wiId = a}) + +-- | Identifies the cloud project this WorkItem belongs to. +wiProjectId :: Lens' WorkItem (Maybe Text) +wiProjectId + = lens _wiProjectId (\ s a -> s{_wiProjectId = a}) + +-- | Time when the lease on this [Work][] will expire. +wiLeaseExpireTime :: Lens' WorkItem (Maybe Text) +wiLeaseExpireTime + = lens _wiLeaseExpireTime + (\ s a -> s{_wiLeaseExpireTime = a}) + +-- | Work item-specific configuration as an opaque blob. +wiConfiguration :: Lens' WorkItem (Maybe Text) +wiConfiguration + = lens _wiConfiguration + (\ s a -> s{_wiConfiguration = a}) + +-- | Additional information for SeqMapTask WorkItems. +wiSeqMapTask :: Lens' WorkItem (Maybe (Maybe SeqMapTask)) +wiSeqMapTask + = lens _wiSeqMapTask (\ s a -> s{_wiSeqMapTask = a}) + +instance FromJSON WorkItem where + parseJSON + = withObject "WorkItem" + (\ o -> + WorkItem <$> + (o .:? "jobId") <*> (o .:? "reportStatusInterval") + <*> (o .:? "shellTask") + <*> (o .:? "streamingSetupTask") + <*> (o .:? "initialReportIndex") + <*> (o .:? "mapTask") + <*> (o .:? "packages" .!= mempty) + <*> (o .:? "streamingComputationTask") + <*> (o .:? "sourceOperationTask") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "leaseExpireTime") + <*> (o .:? "configuration") + <*> (o .:? "seqMapTask")) + +instance ToJSON WorkItem where + toJSON WorkItem{..} + = object + (catMaybes + [("jobId" .=) <$> _wiJobId, + ("reportStatusInterval" .=) <$> + _wiReportStatusInterval, + ("shellTask" .=) <$> _wiShellTask, + ("streamingSetupTask" .=) <$> _wiStreamingSetupTask, + ("initialReportIndex" .=) <$> _wiInitialReportIndex, + ("mapTask" .=) <$> _wiMapTask, + ("packages" .=) <$> _wiPackages, + ("streamingComputationTask" .=) <$> + _wiStreamingComputationTask, + ("sourceOperationTask" .=) <$> + _wiSourceOperationTask, + ("id" .=) <$> _wiId, + ("projectId" .=) <$> _wiProjectId, + ("leaseExpireTime" .=) <$> _wiLeaseExpireTime, + ("configuration" .=) <$> _wiConfiguration, + ("seqMapTask" .=) <$> _wiSeqMapTask]) + +-- | The response to a SourceSplitRequest. +-- +-- /See:/ 'sourceSplitResponse' smart constructor. +data SourceSplitResponse = SourceSplitResponse + { _ssrBundles :: !(Maybe [Maybe DerivedSource]) + , _ssrShards :: !(Maybe [Maybe SourceSplitShard]) + , _ssrOutcome :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceSplitResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssrBundles' +-- +-- * 'ssrShards' +-- +-- * 'ssrOutcome' +sourceSplitResponse + :: SourceSplitResponse +sourceSplitResponse = + SourceSplitResponse + { _ssrBundles = Nothing + , _ssrShards = Nothing + , _ssrOutcome = Nothing + } + +-- | If outcome is SPLITTING_HAPPENED, then this is a list of bundles into +-- which the source was split. Otherwise this field is ignored. This list +-- can be empty, which means the source represents an empty input. +ssrBundles :: Lens' SourceSplitResponse [Maybe DerivedSource] +ssrBundles + = lens _ssrBundles (\ s a -> s{_ssrBundles = a}) . + _Default + . _Coerce + +-- | DEPRECATED in favor of bundles. +ssrShards :: Lens' SourceSplitResponse [Maybe SourceSplitShard] +ssrShards + = lens _ssrShards (\ s a -> s{_ssrShards = a}) . + _Default + . _Coerce + +-- | Indicates whether splitting happened and produced a list of bundles. If +-- this is USE_CURRENT_SOURCE_AS_IS, the current source should be processed +-- \"as is\" without splitting. \"bundles\" is ignored in this case. If +-- this is SPLITTING_HAPPENED, then \"bundles\" contains a list of bundles +-- into which the source was split. +ssrOutcome :: Lens' SourceSplitResponse (Maybe Text) +ssrOutcome + = lens _ssrOutcome (\ s a -> s{_ssrOutcome = a}) + +instance FromJSON SourceSplitResponse where + parseJSON + = withObject "SourceSplitResponse" + (\ o -> + SourceSplitResponse <$> + (o .:? "bundles" .!= mempty) <*> + (o .:? "shards" .!= mempty) + <*> (o .:? "outcome")) + +instance ToJSON SourceSplitResponse where + toJSON SourceSplitResponse{..} + = object + (catMaybes + [("bundles" .=) <$> _ssrBundles, + ("shards" .=) <$> _ssrShards, + ("outcome" .=) <$> _ssrOutcome]) + +-- | Settings for WorkerPool autoscaling. +-- +-- /See:/ 'autoscalingSettings' smart constructor. +data AutoscalingSettings = AutoscalingSettings + { _asMaxNumWorkers :: !(Maybe Int32) + , _asAlgorithm :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AutoscalingSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asMaxNumWorkers' +-- +-- * 'asAlgorithm' +autoscalingSettings + :: AutoscalingSettings +autoscalingSettings = + AutoscalingSettings + { _asMaxNumWorkers = Nothing + , _asAlgorithm = Nothing + } + +-- | The maximum number of workers to cap scaling at. +asMaxNumWorkers :: Lens' AutoscalingSettings (Maybe Int32) +asMaxNumWorkers + = lens _asMaxNumWorkers + (\ s a -> s{_asMaxNumWorkers = a}) + +-- | The algorithm to use for autoscaling. +asAlgorithm :: Lens' AutoscalingSettings (Maybe Text) +asAlgorithm + = lens _asAlgorithm (\ s a -> s{_asAlgorithm = a}) + +instance FromJSON AutoscalingSettings where + parseJSON + = withObject "AutoscalingSettings" + (\ o -> + AutoscalingSettings <$> + (o .:? "maxNumWorkers") <*> (o .:? "algorithm")) + +instance ToJSON AutoscalingSettings where + toJSON AutoscalingSettings{..} + = object + (catMaybes + [("maxNumWorkers" .=) <$> _asMaxNumWorkers, + ("algorithm" .=) <$> _asAlgorithm]) + +-- | A sink that records can be encoded and written to. +-- +-- /See:/ 'sink' smart constructor. +data Sink = Sink + { _sCodec :: !(Maybe SinkCodec) + , _sSpec :: !(Maybe SinkSpec) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Sink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sCodec' +-- +-- * 'sSpec' +sink + :: Sink +sink = + Sink + { _sCodec = Nothing + , _sSpec = Nothing + } + +-- | The codec to use to encode data written to the sink. +sCodec :: Lens' Sink (Maybe SinkCodec) +sCodec = lens _sCodec (\ s a -> s{_sCodec = a}) + +-- | The sink to write to, plus its parameters. +sSpec :: Lens' Sink (Maybe SinkSpec) +sSpec = lens _sSpec (\ s a -> s{_sSpec = a}) + +instance FromJSON Sink where + parseJSON + = withObject "Sink" + (\ o -> Sink <$> (o .:? "codec") <*> (o .:? "spec")) + +instance ToJSON Sink where + toJSON Sink{..} + = object + (catMaybes + [("codec" .=) <$> _sCodec, ("spec" .=) <$> _sSpec]) + +-- | An output of an instruction. +-- +-- /See:/ 'instructionOutput' smart constructor. +data InstructionOutput = InstructionOutput + { _ioCodec :: !(Maybe InstructionOutputCodec) + , _ioName :: !(Maybe Text) + , _ioSystemName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstructionOutput' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ioCodec' +-- +-- * 'ioName' +-- +-- * 'ioSystemName' +instructionOutput + :: InstructionOutput +instructionOutput = + InstructionOutput + { _ioCodec = Nothing + , _ioName = Nothing + , _ioSystemName = Nothing + } + +-- | The codec to use to encode data being written via this output. +ioCodec :: Lens' InstructionOutput (Maybe InstructionOutputCodec) +ioCodec = lens _ioCodec (\ s a -> s{_ioCodec = a}) + +-- | The user-provided name of this output. +ioName :: Lens' InstructionOutput (Maybe Text) +ioName = lens _ioName (\ s a -> s{_ioName = a}) + +-- | System-defined name of this output. Unique across the workflow. +ioSystemName :: Lens' InstructionOutput (Maybe Text) +ioSystemName + = lens _ioSystemName (\ s a -> s{_ioSystemName = a}) + +instance FromJSON InstructionOutput where + parseJSON + = withObject "InstructionOutput" + (\ o -> + InstructionOutput <$> + (o .:? "codec") <*> (o .:? "name") <*> + (o .:? "systemName")) + +instance ToJSON InstructionOutput where + toJSON InstructionOutput{..} + = object + (catMaybes + [("codec" .=) <$> _ioCodec, ("name" .=) <$> _ioName, + ("systemName" .=) <$> _ioSystemName]) + +-- | Contains information about how a particular +-- [google.dataflow.v1beta3.Step][google.dataflow.v1beta3.Step] will be +-- executed. +-- +-- /See:/ 'jobExecutionStageInfo' smart constructor. +newtype JobExecutionStageInfo = JobExecutionStageInfo + { _jesiStepName :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobExecutionStageInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jesiStepName' +jobExecutionStageInfo + :: JobExecutionStageInfo +jobExecutionStageInfo = + JobExecutionStageInfo + { _jesiStepName = Nothing + } + +-- | The steps associated with the execution stage. Note that stages may have +-- several steps, and that a given step might be run by more than one +-- stage. +jesiStepName :: Lens' JobExecutionStageInfo [Text] +jesiStepName + = lens _jesiStepName (\ s a -> s{_jesiStepName = a}) + . _Default + . _Coerce + +instance FromJSON JobExecutionStageInfo where + parseJSON + = withObject "JobExecutionStageInfo" + (\ o -> + JobExecutionStageInfo <$> + (o .:? "stepName" .!= mempty)) + +instance ToJSON JobExecutionStageInfo where + toJSON JobExecutionStageInfo{..} + = object + (catMaybes [("stepName" .=) <$> _jesiStepName]) + +-- | Hints for splitting a Source into bundles (parts for parallel +-- processing) using SourceSplitRequest. +-- +-- /See:/ 'sourceSplitOptions' smart constructor. +data SourceSplitOptions = SourceSplitOptions + { _ssoDesiredShardSizeBytes :: !(Maybe Int64) + , _ssoDesiredBundleSizeBytes :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceSplitOptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssoDesiredShardSizeBytes' +-- +-- * 'ssoDesiredBundleSizeBytes' +sourceSplitOptions + :: SourceSplitOptions +sourceSplitOptions = + SourceSplitOptions + { _ssoDesiredShardSizeBytes = Nothing + , _ssoDesiredBundleSizeBytes = Nothing + } + +-- | DEPRECATED in favor of desired_bundle_size_bytes. +ssoDesiredShardSizeBytes :: Lens' SourceSplitOptions (Maybe Int64) +ssoDesiredShardSizeBytes + = lens _ssoDesiredShardSizeBytes + (\ s a -> s{_ssoDesiredShardSizeBytes = a}) + +-- | The source should be split into a set of bundles where the estimated +-- size of each is approximately this many bytes. +ssoDesiredBundleSizeBytes :: Lens' SourceSplitOptions (Maybe Int64) +ssoDesiredBundleSizeBytes + = lens _ssoDesiredBundleSizeBytes + (\ s a -> s{_ssoDesiredBundleSizeBytes = a}) + +instance FromJSON SourceSplitOptions where + parseJSON + = withObject "SourceSplitOptions" + (\ o -> + SourceSplitOptions <$> + (o .:? "desiredShardSizeBytes") <*> + (o .:? "desiredBundleSizeBytes")) + +instance ToJSON SourceSplitOptions where + toJSON SourceSplitOptions{..} + = object + (catMaybes + [("desiredShardSizeBytes" .=) <$> + _ssoDesiredShardSizeBytes, + ("desiredBundleSizeBytes" .=) <$> + _ssoDesiredBundleSizeBytes]) + +-- | Request to report the status of WorkItems. +-- +-- /See:/ 'reportWorkItemStatusRequest' smart constructor. +data ReportWorkItemStatusRequest = ReportWorkItemStatusRequest + { _rwisrCurrentWorkerTime :: !(Maybe Text) + , _rwisrWorkItemStatuses :: !(Maybe [Maybe WorkItemStatus]) + , _rwisrWorkerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportWorkItemStatusRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rwisrCurrentWorkerTime' +-- +-- * 'rwisrWorkItemStatuses' +-- +-- * 'rwisrWorkerId' +reportWorkItemStatusRequest + :: ReportWorkItemStatusRequest +reportWorkItemStatusRequest = + ReportWorkItemStatusRequest + { _rwisrCurrentWorkerTime = Nothing + , _rwisrWorkItemStatuses = Nothing + , _rwisrWorkerId = Nothing + } + +-- | The current timestamp at the worker. +rwisrCurrentWorkerTime :: Lens' ReportWorkItemStatusRequest (Maybe Text) +rwisrCurrentWorkerTime + = lens _rwisrCurrentWorkerTime + (\ s a -> s{_rwisrCurrentWorkerTime = a}) + +-- | The order is unimportant, except that the order of the +-- WorkItemServiceState messages in the ReportWorkItemStatusResponse +-- corresponds to the order of WorkItemStatus messages here. +rwisrWorkItemStatuses :: Lens' ReportWorkItemStatusRequest [Maybe WorkItemStatus] +rwisrWorkItemStatuses + = lens _rwisrWorkItemStatuses + (\ s a -> s{_rwisrWorkItemStatuses = a}) + . _Default + . _Coerce + +-- | The ID of the worker reporting the WorkItem status. If this does not +-- match the ID of the worker which the Dataflow service believes currently +-- has the lease on the WorkItem, the report will be dropped (with an error +-- response). +rwisrWorkerId :: Lens' ReportWorkItemStatusRequest (Maybe Text) +rwisrWorkerId + = lens _rwisrWorkerId + (\ s a -> s{_rwisrWorkerId = a}) + +instance FromJSON ReportWorkItemStatusRequest where + parseJSON + = withObject "ReportWorkItemStatusRequest" + (\ o -> + ReportWorkItemStatusRequest <$> + (o .:? "currentWorkerTime") <*> + (o .:? "workItemStatuses" .!= mempty) + <*> (o .:? "workerId")) + +instance ToJSON ReportWorkItemStatusRequest where + toJSON ReportWorkItemStatusRequest{..} + = object + (catMaybes + [("currentWorkerTime" .=) <$> + _rwisrCurrentWorkerTime, + ("workItemStatuses" .=) <$> _rwisrWorkItemStatuses, + ("workerId" .=) <$> _rwisrWorkerId]) + +-- | Identifies a metric, by describing the source which generated the +-- metric. +-- +-- /See:/ 'metricStructuredName' smart constructor. +data MetricStructuredName = MetricStructuredName + { _msnOrigin :: !(Maybe Text) + , _msnContext :: !(Maybe MetricStructuredNameContext) + , _msnName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricStructuredName' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msnOrigin' +-- +-- * 'msnContext' +-- +-- * 'msnName' +metricStructuredName + :: MetricStructuredName +metricStructuredName = + MetricStructuredName + { _msnOrigin = Nothing + , _msnContext = Nothing + , _msnName = Nothing + } + +-- | Origin (namespace) of metric name. May be blank for user-define metrics; +-- will be \"dataflow\" for metrics defined by the Dataflow service or SDK. +msnOrigin :: Lens' MetricStructuredName (Maybe Text) +msnOrigin + = lens _msnOrigin (\ s a -> s{_msnOrigin = a}) + +-- | Zero or more labeled fields which identify the part of the job this +-- metric is associated with, such as the name of a step or collection. For +-- example, built-in counters associated with steps will have +-- context[\'step\'] = . Counters associated with PCollections in the SDK +-- will have context[\'pcollection\'] = . +msnContext :: Lens' MetricStructuredName (Maybe MetricStructuredNameContext) +msnContext + = lens _msnContext (\ s a -> s{_msnContext = a}) + +-- | Worker-defined metric name. +msnName :: Lens' MetricStructuredName (Maybe Text) +msnName = lens _msnName (\ s a -> s{_msnName = a}) + +instance FromJSON MetricStructuredName where + parseJSON + = withObject "MetricStructuredName" + (\ o -> + MetricStructuredName <$> + (o .:? "origin") <*> (o .:? "context") <*> + (o .:? "name")) + +instance ToJSON MetricStructuredName where + toJSON MetricStructuredName{..} + = object + (catMaybes + [("origin" .=) <$> _msnOrigin, + ("context" .=) <$> _msnContext, + ("name" .=) <$> _msnName]) + +-- | Describes the data disk used by a workflow job. +-- +-- /See:/ 'disk' smart constructor. +data Disk = Disk + { _dSizeGb :: !(Maybe Int32) + , _dDiskType :: !(Maybe Text) + , _dMountPoint :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Disk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dSizeGb' +-- +-- * 'dDiskType' +-- +-- * 'dMountPoint' +disk + :: Disk +disk = + Disk + { _dSizeGb = Nothing + , _dDiskType = Nothing + , _dMountPoint = Nothing + } + +-- | Size of disk in GB. If zero or unspecified, the service will attempt to +-- choose a reasonable default. +dSizeGb :: Lens' Disk (Maybe Int32) +dSizeGb = lens _dSizeGb (\ s a -> s{_dSizeGb = a}) + +-- | Disk storage type, as defined by Google Compute Engine. This must be a +-- disk type appropriate to the project and zone in which the workers will +-- run. If unknown or unspecified, the service will attempt to choose a +-- reasonable default. For example, the standard persistent disk type is a +-- resource name typically ending in \"pd-standard\". If SSD persistent +-- disks are available, the resource name typically ends with \"pd-ssd\". +-- The actual valid values are defined the Google Compute Engine API, not +-- by the Dataflow API; consult the Google Compute Engine documentation for +-- more information about determining the set of available disk types for a +-- particular project and zone. Google Compute Engine Disk types are local +-- to a particular project in a particular zone, and so the resource name +-- will typically look something like this: +-- compute.googleapis.com\/projects\/ \/zones\/\/diskTypes\/pd-standard +dDiskType :: Lens' Disk (Maybe Text) +dDiskType + = lens _dDiskType (\ s a -> s{_dDiskType = a}) + +-- | Directory in a VM where disk is mounted. +dMountPoint :: Lens' Disk (Maybe Text) +dMountPoint + = lens _dMountPoint (\ s a -> s{_dMountPoint = a}) + +instance FromJSON Disk where + parseJSON + = withObject "Disk" + (\ o -> + Disk <$> + (o .:? "sizeGb") <*> (o .:? "diskType") <*> + (o .:? "mountPoint")) + +instance ToJSON Disk where + toJSON Disk{..} + = object + (catMaybes + [("sizeGb" .=) <$> _dSizeGb, + ("diskType" .=) <$> _dDiskType, + ("mountPoint" .=) <$> _dMountPoint]) + +-- | A position that encapsulates an inner position and an index for the +-- inner position. A ConcatPosition can be used by a reader of a source +-- that encapsulates a set of other sources. +-- +-- /See:/ 'concatPosition' smart constructor. +data ConcatPosition = ConcatPosition + { _cpIndex :: !(Maybe Int32) + , _cpPosition :: !(Maybe (Maybe Position)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConcatPosition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpIndex' +-- +-- * 'cpPosition' +concatPosition + :: ConcatPosition +concatPosition = + ConcatPosition + { _cpIndex = Nothing + , _cpPosition = Nothing + } + +-- | Index of the inner source. +cpIndex :: Lens' ConcatPosition (Maybe Int32) +cpIndex = lens _cpIndex (\ s a -> s{_cpIndex = a}) + +-- | Position within the inner source. +cpPosition :: Lens' ConcatPosition (Maybe (Maybe Position)) +cpPosition + = lens _cpPosition (\ s a -> s{_cpPosition = a}) + +instance FromJSON ConcatPosition where + parseJSON + = withObject "ConcatPosition" + (\ o -> + ConcatPosition <$> + (o .:? "index") <*> (o .:? "position")) + +instance ToJSON ConcatPosition where + toJSON ConcatPosition{..} + = object + (catMaybes + [("index" .=) <$> _cpIndex, + ("position" .=) <$> _cpPosition]) + +-- | Describes the environment in which a Dataflow Job runs. +-- +-- /See:/ 'environment' smart constructor. +data Environment = Environment + { _eDataset :: !(Maybe Text) + , _eExperiments :: !(Maybe [Text]) + , _eWorkerPools :: !(Maybe [Maybe WorkerPool]) + , _eClusterManagerApiService :: !(Maybe Text) + , _eVersion :: !(Maybe EnvironmentVersion) + , _eInternalExperiments :: !(Maybe EnvironmentInternalExperiments) + , _eTempStoragePrefix :: !(Maybe Text) + , _eUserAgent :: !(Maybe EnvironmentUserAgent) + , _eSdkPipelineOptions :: !(Maybe EnvironmentSdkPipelineOptions) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Environment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eDataset' +-- +-- * 'eExperiments' +-- +-- * 'eWorkerPools' +-- +-- * 'eClusterManagerApiService' +-- +-- * 'eVersion' +-- +-- * 'eInternalExperiments' +-- +-- * 'eTempStoragePrefix' +-- +-- * 'eUserAgent' +-- +-- * 'eSdkPipelineOptions' +environment + :: Environment +environment = + Environment + { _eDataset = Nothing + , _eExperiments = Nothing + , _eWorkerPools = Nothing + , _eClusterManagerApiService = Nothing + , _eVersion = Nothing + , _eInternalExperiments = Nothing + , _eTempStoragePrefix = Nothing + , _eUserAgent = Nothing + , _eSdkPipelineOptions = Nothing + } + +-- | The dataset for the current project where various workflow related +-- tables are stored. The supported resource type is: Google BigQuery: +-- bigquery.googleapis.com\/{dataset} +eDataset :: Lens' Environment (Maybe Text) +eDataset = lens _eDataset (\ s a -> s{_eDataset = a}) + +-- | The list of experiments to enable. +eExperiments :: Lens' Environment [Text] +eExperiments + = lens _eExperiments (\ s a -> s{_eExperiments = a}) + . _Default + . _Coerce + +-- | Worker pools. At least one \"harness\" worker pool must be specified in +-- order for the job to have workers. +eWorkerPools :: Lens' Environment [Maybe WorkerPool] +eWorkerPools + = lens _eWorkerPools (\ s a -> s{_eWorkerPools = a}) + . _Default + . _Coerce + +-- | The type of cluster manager API to use. If unknown or unspecified, the +-- service will attempt to choose a reasonable default. This should be in +-- the form of the API service name, e.g. \"compute.googleapis.com\". +eClusterManagerApiService :: Lens' Environment (Maybe Text) +eClusterManagerApiService + = lens _eClusterManagerApiService + (\ s a -> s{_eClusterManagerApiService = a}) + +-- | A structure describing which components and their versions of the +-- service are required in order to run the job. +eVersion :: Lens' Environment (Maybe EnvironmentVersion) +eVersion = lens _eVersion (\ s a -> s{_eVersion = a}) + +-- | Experimental settings. +eInternalExperiments :: Lens' Environment (Maybe EnvironmentInternalExperiments) +eInternalExperiments + = lens _eInternalExperiments + (\ s a -> s{_eInternalExperiments = a}) + +-- | The prefix of the resources the system should use for temporary storage. +-- The system will append the suffix \"\/temp-{JOBNAME} to this resource +-- prefix, where {JOBNAME} is the value of the job_name field. The +-- resulting bucket and object prefix is used as the prefix of the +-- resources used to store temporary data needed during the job execution. +-- NOTE: This will override the value in taskrunner_settings. The supported +-- resource type is: Google Cloud Storage: +-- storage.googleapis.com\/{bucket}\/{object} +-- bucket.storage.googleapis.com\/{object} +eTempStoragePrefix :: Lens' Environment (Maybe Text) +eTempStoragePrefix + = lens _eTempStoragePrefix + (\ s a -> s{_eTempStoragePrefix = a}) + +-- | A description of the process that generated the request. +eUserAgent :: Lens' Environment (Maybe EnvironmentUserAgent) +eUserAgent + = lens _eUserAgent (\ s a -> s{_eUserAgent = a}) + +-- | The Dataflow SDK pipeline options specified by the user. These options +-- are passed through the service and are used to recreate the SDK pipeline +-- options on the worker in a language agnostic and platform independent +-- way. +eSdkPipelineOptions :: Lens' Environment (Maybe EnvironmentSdkPipelineOptions) +eSdkPipelineOptions + = lens _eSdkPipelineOptions + (\ s a -> s{_eSdkPipelineOptions = a}) + +instance FromJSON Environment where + parseJSON + = withObject "Environment" + (\ o -> + Environment <$> + (o .:? "dataset") <*> + (o .:? "experiments" .!= mempty) + <*> (o .:? "workerPools" .!= mempty) + <*> (o .:? "clusterManagerApiService") + <*> (o .:? "version") + <*> (o .:? "internalExperiments") + <*> (o .:? "tempStoragePrefix") + <*> (o .:? "userAgent") + <*> (o .:? "sdkPipelineOptions")) + +instance ToJSON Environment where + toJSON Environment{..} + = object + (catMaybes + [("dataset" .=) <$> _eDataset, + ("experiments" .=) <$> _eExperiments, + ("workerPools" .=) <$> _eWorkerPools, + ("clusterManagerApiService" .=) <$> + _eClusterManagerApiService, + ("version" .=) <$> _eVersion, + ("internalExperiments" .=) <$> _eInternalExperiments, + ("tempStoragePrefix" .=) <$> _eTempStoragePrefix, + ("userAgent" .=) <$> _eUserAgent, + ("sdkPipelineOptions" .=) <$> _eSdkPipelineOptions]) + +-- | An instruction that writes records. Takes one input, produces no +-- outputs. +-- +-- /See:/ 'writeInstruction' smart constructor. +data WriteInstruction = WriteInstruction + { _wiSink :: !(Maybe (Maybe Sink)) + , _wiInput :: !(Maybe (Maybe InstructionInput)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wiSink' +-- +-- * 'wiInput' +writeInstruction + :: WriteInstruction +writeInstruction = + WriteInstruction + { _wiSink = Nothing + , _wiInput = Nothing + } + +-- | The sink to write to. +wiSink :: Lens' WriteInstruction (Maybe (Maybe Sink)) +wiSink = lens _wiSink (\ s a -> s{_wiSink = a}) + +-- | The input. +wiInput :: Lens' WriteInstruction (Maybe (Maybe InstructionInput)) +wiInput = lens _wiInput (\ s a -> s{_wiInput = a}) + +instance FromJSON WriteInstruction where + parseJSON + = withObject "WriteInstruction" + (\ o -> + WriteInstruction <$> + (o .:? "sink") <*> (o .:? "input")) + +instance ToJSON WriteInstruction where + toJSON WriteInstruction{..} + = object + (catMaybes + [("sink" .=) <$> _wiSink, ("input" .=) <$> _wiInput]) + +-- | The result of a SourceGetMetadataOperation. +-- +-- /See:/ 'sourceGetMetadataResponse' smart constructor. +newtype SourceGetMetadataResponse = SourceGetMetadataResponse + { _sgmrMetadata :: Maybe (Maybe SourceMetadata) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceGetMetadataResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgmrMetadata' +sourceGetMetadataResponse + :: SourceGetMetadataResponse +sourceGetMetadataResponse = + SourceGetMetadataResponse + { _sgmrMetadata = Nothing + } + +-- | The computed metadata. +sgmrMetadata :: Lens' SourceGetMetadataResponse (Maybe (Maybe SourceMetadata)) +sgmrMetadata + = lens _sgmrMetadata (\ s a -> s{_sgmrMetadata = a}) + +instance FromJSON SourceGetMetadataResponse where + parseJSON + = withObject "SourceGetMetadataResponse" + (\ o -> + SourceGetMetadataResponse <$> (o .:? "metadata")) + +instance ToJSON SourceGetMetadataResponse where + toJSON SourceGetMetadataResponse{..} + = object + (catMaybes [("metadata" .=) <$> _sgmrMetadata]) + +-- | Describes the state of a metric. +-- +-- /See:/ 'metricUpdate' smart constructor. +data MetricUpdate = MetricUpdate + { _muMeanSum :: !(Maybe JSON) + , _muInternal :: !(Maybe JSON) + , _muSet :: !(Maybe JSON) + , _muCumulative :: !(Maybe Bool) + , _muKind :: !(Maybe Text) + , _muUpdateTime :: !(Maybe Text) + , _muMeanCount :: !(Maybe JSON) + , _muName :: !(Maybe (Maybe MetricStructuredName)) + , _muScalar :: !(Maybe JSON) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muMeanSum' +-- +-- * 'muInternal' +-- +-- * 'muSet' +-- +-- * 'muCumulative' +-- +-- * 'muKind' +-- +-- * 'muUpdateTime' +-- +-- * 'muMeanCount' +-- +-- * 'muName' +-- +-- * 'muScalar' +metricUpdate + :: MetricUpdate +metricUpdate = + MetricUpdate + { _muMeanSum = Nothing + , _muInternal = Nothing + , _muSet = Nothing + , _muCumulative = Nothing + , _muKind = Nothing + , _muUpdateTime = Nothing + , _muMeanCount = Nothing + , _muName = Nothing + , _muScalar = Nothing + } + +-- | Worker-computed aggregate value for the \"Mean\" aggregation kind. This +-- holds the sum of the aggregated values and is used in combination with +-- mean_count below to obtain the actual mean aggregate value. The only +-- possible value types are Long and Double. +muMeanSum :: Lens' MetricUpdate (Maybe JSON) +muMeanSum + = lens _muMeanSum (\ s a -> s{_muMeanSum = a}) + +-- | Worker-computed aggregate value for internal use by the Dataflow +-- service. +muInternal :: Lens' MetricUpdate (Maybe JSON) +muInternal + = lens _muInternal (\ s a -> s{_muInternal = a}) + +-- | Worker-computed aggregate value for the \"Set\" aggregation kind. The +-- only possible value type is a list of Values whose type can be Long, +-- Double, or String, according to the metric\'s type. All Values in the +-- list must be of the same type. +muSet :: Lens' MetricUpdate (Maybe JSON) +muSet = lens _muSet (\ s a -> s{_muSet = a}) + +-- | True if this metric is reported as the total cumulative aggregate value +-- accumulated since the worker started working on this WorkItem. By +-- default this is false, indicating that this metric is reported as a +-- delta that is not associated with any WorkItem. +muCumulative :: Lens' MetricUpdate (Maybe Bool) +muCumulative + = lens _muCumulative (\ s a -> s{_muCumulative = a}) + +-- | Metric aggregation kind. The possible metric aggregation kinds are +-- \"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", and \"Or\". The +-- specified aggregation kind is case-insensitive. If omitted, this is not +-- an aggregated value but instead a single metric sample value. +muKind :: Lens' MetricUpdate (Maybe Text) +muKind = lens _muKind (\ s a -> s{_muKind = a}) + +-- | Timestamp associated with the metric value. Optional when workers are +-- reporting work progress; it will be filled in responses from the metrics +-- API. +muUpdateTime :: Lens' MetricUpdate (Maybe Text) +muUpdateTime + = lens _muUpdateTime (\ s a -> s{_muUpdateTime = a}) + +-- | Worker-computed aggregate value for the \"Mean\" aggregation kind. This +-- holds the count of the aggregated values and is used in combination with +-- mean_sum above to obtain the actual mean aggregate value. The only +-- possible value type is Long. +muMeanCount :: Lens' MetricUpdate (Maybe JSON) +muMeanCount + = lens _muMeanCount (\ s a -> s{_muMeanCount = a}) + +-- | Name of the metric. +muName :: Lens' MetricUpdate (Maybe (Maybe MetricStructuredName)) +muName = lens _muName (\ s a -> s{_muName = a}) + +-- | Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", +-- \"Min\", \"And\", and \"Or\". The possible value types are Long, Double, +-- and Boolean. +muScalar :: Lens' MetricUpdate (Maybe JSON) +muScalar = lens _muScalar (\ s a -> s{_muScalar = a}) + +instance FromJSON MetricUpdate where + parseJSON + = withObject "MetricUpdate" + (\ o -> + MetricUpdate <$> + (o .:? "meanSum") <*> (o .:? "internal") <*> + (o .:? "set") + <*> (o .:? "cumulative") + <*> (o .:? "kind") + <*> (o .:? "updateTime") + <*> (o .:? "meanCount") + <*> (o .:? "name") + <*> (o .:? "scalar")) + +instance ToJSON MetricUpdate where + toJSON MetricUpdate{..} + = object + (catMaybes + [("meanSum" .=) <$> _muMeanSum, + ("internal" .=) <$> _muInternal, + ("set" .=) <$> _muSet, + ("cumulative" .=) <$> _muCumulative, + ("kind" .=) <$> _muKind, + ("updateTime" .=) <$> _muUpdateTime, + ("meanCount" .=) <$> _muMeanCount, + ("name" .=) <$> _muName, + ("scalar" .=) <$> _muScalar]) + +-- | Identifies the location of a streaming computation stage, for +-- stage-to-stage communication. +-- +-- /See:/ 'streamingStageLocation' smart constructor. +newtype StreamingStageLocation = StreamingStageLocation + { _sslStreamId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingStageLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sslStreamId' +streamingStageLocation + :: StreamingStageLocation +streamingStageLocation = + StreamingStageLocation + { _sslStreamId = Nothing + } + +-- | Identifies the particular stream within the streaming Dataflow job. +sslStreamId :: Lens' StreamingStageLocation (Maybe Text) +sslStreamId + = lens _sslStreamId (\ s a -> s{_sslStreamId = a}) + +instance FromJSON StreamingStageLocation where + parseJSON + = withObject "StreamingStageLocation" + (\ o -> + StreamingStageLocation <$> (o .:? "streamId")) + +instance ToJSON StreamingStageLocation where + toJSON StreamingStageLocation{..} + = object + (catMaybes [("streamId" .=) <$> _sslStreamId]) + +-- | Specification of one of the bundles produced as a result of splitting a +-- Source (e.g. when executing a SourceSplitRequest, or when splitting an +-- active task using WorkItemStatus.dynamic_source_split), relative to the +-- source being split. +-- +-- /See:/ 'derivedSource' smart constructor. +data DerivedSource = DerivedSource + { _dsDerivationMode :: !(Maybe Text) + , _dsSource :: !(Maybe (Maybe Source)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DerivedSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsDerivationMode' +-- +-- * 'dsSource' +derivedSource + :: DerivedSource +derivedSource = + DerivedSource + { _dsDerivationMode = Nothing + , _dsSource = Nothing + } + +-- | What source to base the produced source on (if any). +dsDerivationMode :: Lens' DerivedSource (Maybe Text) +dsDerivationMode + = lens _dsDerivationMode + (\ s a -> s{_dsDerivationMode = a}) + +-- | Specification of the source. +dsSource :: Lens' DerivedSource (Maybe (Maybe Source)) +dsSource = lens _dsSource (\ s a -> s{_dsSource = a}) + +instance FromJSON DerivedSource where + parseJSON + = withObject "DerivedSource" + (\ o -> + DerivedSource <$> + (o .:? "derivationMode") <*> (o .:? "source")) + +instance ToJSON DerivedSource where + toJSON DerivedSource{..} + = object + (catMaybes + [("derivationMode" .=) <$> _dsDerivationMode, + ("source" .=) <$> _dsSource]) + +-- | Taskrunner configuration settings. +-- +-- /See:/ 'taskRunnerSettings' smart constructor. +data TaskRunnerSettings = TaskRunnerSettings + { _trsContinueOnException :: !(Maybe Bool) + , _trsHarnessCommand :: !(Maybe Text) + , _trsWorkflowFileName :: !(Maybe Text) + , _trsTaskGroup :: !(Maybe Text) + , _trsAlsologtostderr :: !(Maybe Bool) + , _trsDataflowApiVersion :: !(Maybe Text) + , _trsLogDir :: !(Maybe Text) + , _trsCommandlinesFileName :: !(Maybe Text) + , _trsVmId :: !(Maybe Text) + , _trsBaseUrl :: !(Maybe Text) + , _trsOauthScopes :: !(Maybe [Text]) + , _trsTaskUser :: !(Maybe Text) + , _trsStreamingWorkerMainClass :: !(Maybe Text) + , _trsBaseTaskDir :: !(Maybe Text) + , _trsLogUploadLocation :: !(Maybe Text) + , _trsTempStoragePrefix :: !(Maybe Text) + , _trsLogToSerialconsole :: !(Maybe Bool) + , _trsParallelWorkerSettings :: !(Maybe (Maybe WorkerSettings)) + , _trsLanguageHint :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskRunnerSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trsContinueOnException' +-- +-- * 'trsHarnessCommand' +-- +-- * 'trsWorkflowFileName' +-- +-- * 'trsTaskGroup' +-- +-- * 'trsAlsologtostderr' +-- +-- * 'trsDataflowApiVersion' +-- +-- * 'trsLogDir' +-- +-- * 'trsCommandlinesFileName' +-- +-- * 'trsVmId' +-- +-- * 'trsBaseUrl' +-- +-- * 'trsOauthScopes' +-- +-- * 'trsTaskUser' +-- +-- * 'trsStreamingWorkerMainClass' +-- +-- * 'trsBaseTaskDir' +-- +-- * 'trsLogUploadLocation' +-- +-- * 'trsTempStoragePrefix' +-- +-- * 'trsLogToSerialconsole' +-- +-- * 'trsParallelWorkerSettings' +-- +-- * 'trsLanguageHint' +taskRunnerSettings + :: TaskRunnerSettings +taskRunnerSettings = + TaskRunnerSettings + { _trsContinueOnException = Nothing + , _trsHarnessCommand = Nothing + , _trsWorkflowFileName = Nothing + , _trsTaskGroup = Nothing + , _trsAlsologtostderr = Nothing + , _trsDataflowApiVersion = Nothing + , _trsLogDir = Nothing + , _trsCommandlinesFileName = Nothing + , _trsVmId = Nothing + , _trsBaseUrl = Nothing + , _trsOauthScopes = Nothing + , _trsTaskUser = Nothing + , _trsStreamingWorkerMainClass = Nothing + , _trsBaseTaskDir = Nothing + , _trsLogUploadLocation = Nothing + , _trsTempStoragePrefix = Nothing + , _trsLogToSerialconsole = Nothing + , _trsParallelWorkerSettings = Nothing + , _trsLanguageHint = Nothing + } + +-- | Do we continue taskrunner if an exception is hit? +trsContinueOnException :: Lens' TaskRunnerSettings (Maybe Bool) +trsContinueOnException + = lens _trsContinueOnException + (\ s a -> s{_trsContinueOnException = a}) + +-- | Command to launch the worker harness. +trsHarnessCommand :: Lens' TaskRunnerSettings (Maybe Text) +trsHarnessCommand + = lens _trsHarnessCommand + (\ s a -> s{_trsHarnessCommand = a}) + +-- | Store the workflow in this file. +trsWorkflowFileName :: Lens' TaskRunnerSettings (Maybe Text) +trsWorkflowFileName + = lens _trsWorkflowFileName + (\ s a -> s{_trsWorkflowFileName = a}) + +-- | The UNIX group ID on the worker VM to use for tasks launched by +-- taskrunner; e.g. \"wheel\". +trsTaskGroup :: Lens' TaskRunnerSettings (Maybe Text) +trsTaskGroup + = lens _trsTaskGroup (\ s a -> s{_trsTaskGroup = a}) + +-- | Also send taskrunner log info to stderr? +trsAlsologtostderr :: Lens' TaskRunnerSettings (Maybe Bool) +trsAlsologtostderr + = lens _trsAlsologtostderr + (\ s a -> s{_trsAlsologtostderr = a}) + +-- | API version of endpoint, e.g. \"v1b3\" +trsDataflowApiVersion :: Lens' TaskRunnerSettings (Maybe Text) +trsDataflowApiVersion + = lens _trsDataflowApiVersion + (\ s a -> s{_trsDataflowApiVersion = a}) + +-- | Directory on the VM to store logs. +trsLogDir :: Lens' TaskRunnerSettings (Maybe Text) +trsLogDir + = lens _trsLogDir (\ s a -> s{_trsLogDir = a}) + +-- | Store preprocessing commands in this file. +trsCommandlinesFileName :: Lens' TaskRunnerSettings (Maybe Text) +trsCommandlinesFileName + = lens _trsCommandlinesFileName + (\ s a -> s{_trsCommandlinesFileName = a}) + +-- | ID string of VM. +trsVmId :: Lens' TaskRunnerSettings (Maybe Text) +trsVmId = lens _trsVmId (\ s a -> s{_trsVmId = a}) + +-- | The base URL for the taskrunner to use when accessing Google Cloud APIs. +-- When workers access Google Cloud APIs, they logically do so via relative +-- URLs. If this field is specified, it supplies the base URL to use for +-- resolving these relative URLs. The normative algorithm used is defined +-- by RFC 1808, \"Relative Uniform Resource Locators\". If not specified, +-- the default value is \"http:\/\/www.googleapis.com\/\" +trsBaseUrl :: Lens' TaskRunnerSettings (Maybe Text) +trsBaseUrl + = lens _trsBaseUrl (\ s a -> s{_trsBaseUrl = a}) + +-- | OAuth2 scopes to be requested by the taskrunner in order to access the +-- dataflow API. +trsOauthScopes :: Lens' TaskRunnerSettings [Text] +trsOauthScopes + = lens _trsOauthScopes + (\ s a -> s{_trsOauthScopes = a}) + . _Default + . _Coerce + +-- | The UNIX user ID on the worker VM to use for tasks launched by +-- taskrunner; e.g. \"root\". +trsTaskUser :: Lens' TaskRunnerSettings (Maybe Text) +trsTaskUser + = lens _trsTaskUser (\ s a -> s{_trsTaskUser = a}) + +-- | Streaming worker main class name. +trsStreamingWorkerMainClass :: Lens' TaskRunnerSettings (Maybe Text) +trsStreamingWorkerMainClass + = lens _trsStreamingWorkerMainClass + (\ s a -> s{_trsStreamingWorkerMainClass = a}) + +-- | Location on the worker for task-specific subdirectories. +trsBaseTaskDir :: Lens' TaskRunnerSettings (Maybe Text) +trsBaseTaskDir + = lens _trsBaseTaskDir + (\ s a -> s{_trsBaseTaskDir = a}) + +-- | Indicates where to put logs. If this is not specified, the logs will not +-- be uploaded. The supported resource type is: Google Cloud Storage: +-- storage.googleapis.com\/{bucket}\/{object} +-- bucket.storage.googleapis.com\/{object} +trsLogUploadLocation :: Lens' TaskRunnerSettings (Maybe Text) +trsLogUploadLocation + = lens _trsLogUploadLocation + (\ s a -> s{_trsLogUploadLocation = a}) + +-- | The prefix of the resources the taskrunner should use for temporary +-- storage. The supported resource type is: Google Cloud Storage: +-- storage.googleapis.com\/{bucket}\/{object} +-- bucket.storage.googleapis.com\/{object} +trsTempStoragePrefix :: Lens' TaskRunnerSettings (Maybe Text) +trsTempStoragePrefix + = lens _trsTempStoragePrefix + (\ s a -> s{_trsTempStoragePrefix = a}) + +-- | Send taskrunner log into to Google Compute Engine VM serial console? +trsLogToSerialconsole :: Lens' TaskRunnerSettings (Maybe Bool) +trsLogToSerialconsole + = lens _trsLogToSerialconsole + (\ s a -> s{_trsLogToSerialconsole = a}) + +-- | Settings to pass to the parallel worker harness. +trsParallelWorkerSettings :: Lens' TaskRunnerSettings (Maybe (Maybe WorkerSettings)) +trsParallelWorkerSettings + = lens _trsParallelWorkerSettings + (\ s a -> s{_trsParallelWorkerSettings = a}) + +-- | Suggested backend language. +trsLanguageHint :: Lens' TaskRunnerSettings (Maybe Text) +trsLanguageHint + = lens _trsLanguageHint + (\ s a -> s{_trsLanguageHint = a}) + +instance FromJSON TaskRunnerSettings where + parseJSON + = withObject "TaskRunnerSettings" + (\ o -> + TaskRunnerSettings <$> + (o .:? "continueOnException") <*> + (o .:? "harnessCommand") + <*> (o .:? "workflowFileName") + <*> (o .:? "taskGroup") + <*> (o .:? "alsologtostderr") + <*> (o .:? "dataflowApiVersion") + <*> (o .:? "logDir") + <*> (o .:? "commandlinesFileName") + <*> (o .:? "vmId") + <*> (o .:? "baseUrl") + <*> (o .:? "oauthScopes" .!= mempty) + <*> (o .:? "taskUser") + <*> (o .:? "streamingWorkerMainClass") + <*> (o .:? "baseTaskDir") + <*> (o .:? "logUploadLocation") + <*> (o .:? "tempStoragePrefix") + <*> (o .:? "logToSerialconsole") + <*> (o .:? "parallelWorkerSettings") + <*> (o .:? "languageHint")) + +instance ToJSON TaskRunnerSettings where + toJSON TaskRunnerSettings{..} + = object + (catMaybes + [("continueOnException" .=) <$> + _trsContinueOnException, + ("harnessCommand" .=) <$> _trsHarnessCommand, + ("workflowFileName" .=) <$> _trsWorkflowFileName, + ("taskGroup" .=) <$> _trsTaskGroup, + ("alsologtostderr" .=) <$> _trsAlsologtostderr, + ("dataflowApiVersion" .=) <$> _trsDataflowApiVersion, + ("logDir" .=) <$> _trsLogDir, + ("commandlinesFileName" .=) <$> + _trsCommandlinesFileName, + ("vmId" .=) <$> _trsVmId, + ("baseUrl" .=) <$> _trsBaseUrl, + ("oauthScopes" .=) <$> _trsOauthScopes, + ("taskUser" .=) <$> _trsTaskUser, + ("streamingWorkerMainClass" .=) <$> + _trsStreamingWorkerMainClass, + ("baseTaskDir" .=) <$> _trsBaseTaskDir, + ("logUploadLocation" .=) <$> _trsLogUploadLocation, + ("tempStoragePrefix" .=) <$> _trsTempStoragePrefix, + ("logToSerialconsole" .=) <$> _trsLogToSerialconsole, + ("parallelWorkerSettings" .=) <$> + _trsParallelWorkerSettings, + ("languageHint" .=) <$> _trsLanguageHint]) + +-- | JobMetrics contains a collection of metrics descibing the detailed +-- progress of a Dataflow job. Metrics correspond to user-defined and +-- system-defined metrics in the job. This resource captures only the most +-- recent values of each metric; time-series data can be queried for them +-- (under the same metric names) from Cloud Monitoring. +-- +-- /See:/ 'jobMetrics' smart constructor. +data JobMetrics = JobMetrics + { _jmMetrics :: !(Maybe [Maybe MetricUpdate]) + , _jmMetricTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobMetrics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jmMetrics' +-- +-- * 'jmMetricTime' +jobMetrics + :: JobMetrics +jobMetrics = + JobMetrics + { _jmMetrics = Nothing + , _jmMetricTime = Nothing + } + +-- | All metrics for this job. +jmMetrics :: Lens' JobMetrics [Maybe MetricUpdate] +jmMetrics + = lens _jmMetrics (\ s a -> s{_jmMetrics = a}) . + _Default + . _Coerce + +-- | Timestamp as of which metric values are current. +jmMetricTime :: Lens' JobMetrics (Maybe Text) +jmMetricTime + = lens _jmMetricTime (\ s a -> s{_jmMetricTime = a}) + +instance FromJSON JobMetrics where + parseJSON + = withObject "JobMetrics" + (\ o -> + JobMetrics <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "metricTime")) + +instance ToJSON JobMetrics where + toJSON JobMetrics{..} + = object + (catMaybes + [("metrics" .=) <$> _jmMetrics, + ("metricTime" .=) <$> _jmMetricTime]) + +-- | An instruction that copies its inputs (zero or more) to its (single) +-- output. +-- +-- /See:/ 'flattenInstruction' smart constructor. +newtype FlattenInstruction = FlattenInstruction + { _fiInputs :: Maybe [Maybe InstructionInput] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FlattenInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiInputs' +flattenInstruction + :: FlattenInstruction +flattenInstruction = + FlattenInstruction + { _fiInputs = Nothing + } + +-- | Describes the inputs to the flatten instruction. +fiInputs :: Lens' FlattenInstruction [Maybe InstructionInput] +fiInputs + = lens _fiInputs (\ s a -> s{_fiInputs = a}) . + _Default + . _Coerce + +instance FromJSON FlattenInstruction where + parseJSON + = withObject "FlattenInstruction" + (\ o -> + FlattenInstruction <$> (o .:? "inputs" .!= mempty)) + +instance ToJSON FlattenInstruction where + toJSON FlattenInstruction{..} + = object (catMaybes [("inputs" .=) <$> _fiInputs]) + +-- | Metadata about a Source useful for automatically optimizing and tuning +-- the pipeline, etc. +-- +-- /See:/ 'sourceMetadata' smart constructor. +data SourceMetadata = SourceMetadata + { _smEstimatedSizeBytes :: !(Maybe Int64) + , _smProducesSortedKeys :: !(Maybe Bool) + , _smInfinite :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smEstimatedSizeBytes' +-- +-- * 'smProducesSortedKeys' +-- +-- * 'smInfinite' +sourceMetadata + :: SourceMetadata +sourceMetadata = + SourceMetadata + { _smEstimatedSizeBytes = Nothing + , _smProducesSortedKeys = Nothing + , _smInfinite = Nothing + } + +-- | An estimate of the total size (in bytes) of the data that would be read +-- from this source. This estimate is in terms of external storage size, +-- before any decompression or other processing done by the reader. +smEstimatedSizeBytes :: Lens' SourceMetadata (Maybe Int64) +smEstimatedSizeBytes + = lens _smEstimatedSizeBytes + (\ s a -> s{_smEstimatedSizeBytes = a}) + +-- | Whether this source is known to produce key\/value pairs with the +-- (encoded) keys in lexicographically sorted order. +smProducesSortedKeys :: Lens' SourceMetadata (Maybe Bool) +smProducesSortedKeys + = lens _smProducesSortedKeys + (\ s a -> s{_smProducesSortedKeys = a}) + +-- | Specifies that the size of this source is known to be infinite (this is +-- a streaming source). +smInfinite :: Lens' SourceMetadata (Maybe Bool) +smInfinite + = lens _smInfinite (\ s a -> s{_smInfinite = a}) + +instance FromJSON SourceMetadata where + parseJSON + = withObject "SourceMetadata" + (\ o -> + SourceMetadata <$> + (o .:? "estimatedSizeBytes") <*> + (o .:? "producesSortedKeys") + <*> (o .:? "infinite")) + +instance ToJSON SourceMetadata where + toJSON SourceMetadata{..} + = object + (catMaybes + [("estimatedSizeBytes" .=) <$> _smEstimatedSizeBytes, + ("producesSortedKeys" .=) <$> _smProducesSortedKeys, + ("infinite" .=) <$> _smInfinite]) + +-- | Conveys a worker\'s progress through the work described by a WorkItem. +-- +-- /See:/ 'workItemStatus' smart constructor. +data WorkItemStatus = WorkItemStatus + { _wisProgress :: !(Maybe (Maybe ApproximateProgress)) + , _wisSourceOperationResponse :: !(Maybe (Maybe SourceOperationResponse)) + , _wisStopPosition :: !(Maybe (Maybe Position)) + , _wisDynamicSourceSplit :: !(Maybe (Maybe DynamicSourceSplit)) + , _wisCompleted :: !(Maybe Bool) + , _wisSourceFork :: !(Maybe (Maybe SourceFork)) + , _wisReportIndex :: !(Maybe Int64) + , _wisRequestedLeaseDuration :: !(Maybe Text) + , _wisErrors :: !(Maybe [Maybe Status]) + , _wisMetricUpdates :: !(Maybe [Maybe MetricUpdate]) + , _wisWorkItemId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkItemStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wisProgress' +-- +-- * 'wisSourceOperationResponse' +-- +-- * 'wisStopPosition' +-- +-- * 'wisDynamicSourceSplit' +-- +-- * 'wisCompleted' +-- +-- * 'wisSourceFork' +-- +-- * 'wisReportIndex' +-- +-- * 'wisRequestedLeaseDuration' +-- +-- * 'wisErrors' +-- +-- * 'wisMetricUpdates' +-- +-- * 'wisWorkItemId' +workItemStatus + :: WorkItemStatus +workItemStatus = + WorkItemStatus + { _wisProgress = Nothing + , _wisSourceOperationResponse = Nothing + , _wisStopPosition = Nothing + , _wisDynamicSourceSplit = Nothing + , _wisCompleted = Nothing + , _wisSourceFork = Nothing + , _wisReportIndex = Nothing + , _wisRequestedLeaseDuration = Nothing + , _wisErrors = Nothing + , _wisMetricUpdates = Nothing + , _wisWorkItemId = Nothing + } + +-- | The WorkItem\'s approximate progress. +wisProgress :: Lens' WorkItemStatus (Maybe (Maybe ApproximateProgress)) +wisProgress + = lens _wisProgress (\ s a -> s{_wisProgress = a}) + +-- | If the work item represented a SourceOperationRequest, and the work is +-- completed, contains the result of the operation. +wisSourceOperationResponse :: Lens' WorkItemStatus (Maybe (Maybe SourceOperationResponse)) +wisSourceOperationResponse + = lens _wisSourceOperationResponse + (\ s a -> s{_wisSourceOperationResponse = a}) + +-- | A worker may split an active map task in two parts, \"primary\" and +-- \"residual\", continuing to process the primary part and returning the +-- residual part into the pool of available work. This event is called a +-- \"dynamic split\" and is critical to the dynamic work rebalancing +-- feature. The two obtained sub-tasks are called \"parts\" of the split. +-- The parts, if concatenated, must represent the same input as would be +-- read by the current task if the split did not happen. The exact way in +-- which the original task is decomposed into the two parts is specified +-- either as a position demarcating them (stop_position), or explicitly as +-- two DerivedSources, if this task consumes a user-defined source type +-- (dynamic_source_split). The \"current\" task is adjusted as a result of +-- the split: after a task with range [A, B) sends a stop_position update +-- at C, its range is considered to be [A, C), e.g.: * Progress should be +-- interpreted relative to the new range, e.g. \"75% completed\" means +-- \"75% of [A, C) completed\" * The worker should interpret +-- proposed_stop_position relative to the new range, e.g. \"split at 68%\" +-- should be interpreted as \"split at 68% of [A, C)\". * If the worker +-- chooses to split again using stop_position, only stop_positions in [A, +-- C) will be accepted. * Etc. dynamic_source_split has similar semantics: +-- e.g., if a task with source S splits using dynamic_source_split into {P, +-- R} (where P and R must be together equivalent to S), then subsequent +-- progress and proposed_stop_position should be interpreted relative to P, +-- and in a potential subsequent dynamic_source_split into {P\', R\'}, P\' +-- and R\' must be together equivalent to P, etc. +wisStopPosition :: Lens' WorkItemStatus (Maybe (Maybe Position)) +wisStopPosition + = lens _wisStopPosition + (\ s a -> s{_wisStopPosition = a}) + +-- | See documentation of stop_position. +wisDynamicSourceSplit :: Lens' WorkItemStatus (Maybe (Maybe DynamicSourceSplit)) +wisDynamicSourceSplit + = lens _wisDynamicSourceSplit + (\ s a -> s{_wisDynamicSourceSplit = a}) + +-- | True if the WorkItem was completed (successfully or unsuccessfully). +wisCompleted :: Lens' WorkItemStatus (Maybe Bool) +wisCompleted + = lens _wisCompleted (\ s a -> s{_wisCompleted = a}) + +-- | DEPRECATED in favor of dynamic_source_split. +wisSourceFork :: Lens' WorkItemStatus (Maybe (Maybe SourceFork)) +wisSourceFork + = lens _wisSourceFork + (\ s a -> s{_wisSourceFork = a}) + +-- | The report index. When a WorkItem is leased, the lease will contain an +-- initial report index. When a WorkItem\'s status is reported to the +-- system, the report should be sent with that report index, and the +-- response will contain the index the worker should use for the next +-- report. Reports received with unexpected index values will be rejected +-- by the service. In order to preserve idempotency, the worker should not +-- alter the contents of a report, even if the worker must submit the same +-- report multiple times before getting back a response. The worker should +-- not submit a subsequent report until the response for the previous +-- report had been received from the service. +wisReportIndex :: Lens' WorkItemStatus (Maybe Int64) +wisReportIndex + = lens _wisReportIndex + (\ s a -> s{_wisReportIndex = a}) + +-- | Amount of time the worker requests for its lease. +wisRequestedLeaseDuration :: Lens' WorkItemStatus (Maybe Text) +wisRequestedLeaseDuration + = lens _wisRequestedLeaseDuration + (\ s a -> s{_wisRequestedLeaseDuration = a}) + +-- | Specifies errors which occurred during processing. If errors are +-- provided, and completed = true, then the WorkItem is considered to have +-- failed. +wisErrors :: Lens' WorkItemStatus [Maybe Status] +wisErrors + = lens _wisErrors (\ s a -> s{_wisErrors = a}) . + _Default + . _Coerce + +-- | Worker output metrics (counters) for this WorkItem. +wisMetricUpdates :: Lens' WorkItemStatus [Maybe MetricUpdate] +wisMetricUpdates + = lens _wisMetricUpdates + (\ s a -> s{_wisMetricUpdates = a}) + . _Default + . _Coerce + +-- | Identifies the WorkItem. +wisWorkItemId :: Lens' WorkItemStatus (Maybe Text) +wisWorkItemId + = lens _wisWorkItemId + (\ s a -> s{_wisWorkItemId = a}) + +instance FromJSON WorkItemStatus where + parseJSON + = withObject "WorkItemStatus" + (\ o -> + WorkItemStatus <$> + (o .:? "progress") <*> + (o .:? "sourceOperationResponse") + <*> (o .:? "stopPosition") + <*> (o .:? "dynamicSourceSplit") + <*> (o .:? "completed") + <*> (o .:? "sourceFork") + <*> (o .:? "reportIndex") + <*> (o .:? "requestedLeaseDuration") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "metricUpdates" .!= mempty) + <*> (o .:? "workItemId")) + +instance ToJSON WorkItemStatus where + toJSON WorkItemStatus{..} + = object + (catMaybes + [("progress" .=) <$> _wisProgress, + ("sourceOperationResponse" .=) <$> + _wisSourceOperationResponse, + ("stopPosition" .=) <$> _wisStopPosition, + ("dynamicSourceSplit" .=) <$> _wisDynamicSourceSplit, + ("completed" .=) <$> _wisCompleted, + ("sourceFork" .=) <$> _wisSourceFork, + ("reportIndex" .=) <$> _wisReportIndex, + ("requestedLeaseDuration" .=) <$> + _wisRequestedLeaseDuration, + ("errors" .=) <$> _wisErrors, + ("metricUpdates" .=) <$> _wisMetricUpdates, + ("workItemId" .=) <$> _wisWorkItemId]) + +-- | A task which consists of a shell command for the worker to execute. +-- +-- /See:/ 'shellTask' smart constructor. +data ShellTask = ShellTask + { _stCommand :: !(Maybe Text) + , _stExitCode :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ShellTask' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'stCommand' +-- +-- * 'stExitCode' +shellTask + :: ShellTask +shellTask = + ShellTask + { _stCommand = Nothing + , _stExitCode = Nothing + } + +-- | The shell command to run. +stCommand :: Lens' ShellTask (Maybe Text) +stCommand + = lens _stCommand (\ s a -> s{_stCommand = a}) + +-- | Exit code for the task. +stExitCode :: Lens' ShellTask (Maybe Int32) +stExitCode + = lens _stExitCode (\ s a -> s{_stExitCode = a}) + +instance FromJSON ShellTask where + parseJSON + = withObject "ShellTask" + (\ o -> + ShellTask <$> + (o .:? "command") <*> (o .:? "exitCode")) + +instance ToJSON ShellTask where + toJSON ShellTask{..} + = object + (catMaybes + [("command" .=) <$> _stCommand, + ("exitCode" .=) <$> _stExitCode]) + +-- | Request to lease WorkItems. +-- +-- /See:/ 'leaseWorkItemRequest' smart constructor. +data LeaseWorkItemRequest = LeaseWorkItemRequest + { _lwirWorkItemTypes :: !(Maybe [Text]) + , _lwirCurrentWorkerTime :: !(Maybe Text) + , _lwirWorkerCapabilities :: !(Maybe [Text]) + , _lwirRequestedLeaseDuration :: !(Maybe Text) + , _lwirWorkerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaseWorkItemRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lwirWorkItemTypes' +-- +-- * 'lwirCurrentWorkerTime' +-- +-- * 'lwirWorkerCapabilities' +-- +-- * 'lwirRequestedLeaseDuration' +-- +-- * 'lwirWorkerId' +leaseWorkItemRequest + :: LeaseWorkItemRequest +leaseWorkItemRequest = + LeaseWorkItemRequest + { _lwirWorkItemTypes = Nothing + , _lwirCurrentWorkerTime = Nothing + , _lwirWorkerCapabilities = Nothing + , _lwirRequestedLeaseDuration = Nothing + , _lwirWorkerId = Nothing + } + +-- | Filter for WorkItem type. +lwirWorkItemTypes :: Lens' LeaseWorkItemRequest [Text] +lwirWorkItemTypes + = lens _lwirWorkItemTypes + (\ s a -> s{_lwirWorkItemTypes = a}) + . _Default + . _Coerce + +-- | The current timestamp at the worker. +lwirCurrentWorkerTime :: Lens' LeaseWorkItemRequest (Maybe Text) +lwirCurrentWorkerTime + = lens _lwirCurrentWorkerTime + (\ s a -> s{_lwirCurrentWorkerTime = a}) + +-- | Worker capabilities. WorkItems might be limited to workers with specific +-- capabilities. +lwirWorkerCapabilities :: Lens' LeaseWorkItemRequest [Text] +lwirWorkerCapabilities + = lens _lwirWorkerCapabilities + (\ s a -> s{_lwirWorkerCapabilities = a}) + . _Default + . _Coerce + +-- | The initial lease period. +lwirRequestedLeaseDuration :: Lens' LeaseWorkItemRequest (Maybe Text) +lwirRequestedLeaseDuration + = lens _lwirRequestedLeaseDuration + (\ s a -> s{_lwirRequestedLeaseDuration = a}) + +-- | Identifies the worker leasing work -- typically the ID of the virtual +-- machine running the worker. +lwirWorkerId :: Lens' LeaseWorkItemRequest (Maybe Text) +lwirWorkerId + = lens _lwirWorkerId (\ s a -> s{_lwirWorkerId = a}) + +instance FromJSON LeaseWorkItemRequest where + parseJSON + = withObject "LeaseWorkItemRequest" + (\ o -> + LeaseWorkItemRequest <$> + (o .:? "workItemTypes" .!= mempty) <*> + (o .:? "currentWorkerTime") + <*> (o .:? "workerCapabilities" .!= mempty) + <*> (o .:? "requestedLeaseDuration") + <*> (o .:? "workerId")) + +instance ToJSON LeaseWorkItemRequest where + toJSON LeaseWorkItemRequest{..} + = object + (catMaybes + [("workItemTypes" .=) <$> _lwirWorkItemTypes, + ("currentWorkerTime" .=) <$> _lwirCurrentWorkerTime, + ("workerCapabilities" .=) <$> + _lwirWorkerCapabilities, + ("requestedLeaseDuration" .=) <$> + _lwirRequestedLeaseDuration, + ("workerId" .=) <$> _lwirWorkerId]) + +-- | The result of a SourceOperationRequest, specified in +-- ReportWorkItemStatusRequest.source_operation when the work item is +-- completed. +-- +-- /See:/ 'sourceOperationResponse' smart constructor. +data SourceOperationResponse = SourceOperationResponse + { _sorSplit :: !(Maybe (Maybe SourceSplitResponse)) + , _sorGetMetadata :: !(Maybe (Maybe SourceGetMetadataResponse)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceOperationResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sorSplit' +-- +-- * 'sorGetMetadata' +sourceOperationResponse + :: SourceOperationResponse +sourceOperationResponse = + SourceOperationResponse + { _sorSplit = Nothing + , _sorGetMetadata = Nothing + } + +-- | A response to a request to split a source. +sorSplit :: Lens' SourceOperationResponse (Maybe (Maybe SourceSplitResponse)) +sorSplit = lens _sorSplit (\ s a -> s{_sorSplit = a}) + +-- | A response to a request to get metadata about a source. +sorGetMetadata :: Lens' SourceOperationResponse (Maybe (Maybe SourceGetMetadataResponse)) +sorGetMetadata + = lens _sorGetMetadata + (\ s a -> s{_sorGetMetadata = a}) + +instance FromJSON SourceOperationResponse where + parseJSON + = withObject "SourceOperationResponse" + (\ o -> + SourceOperationResponse <$> + (o .:? "split") <*> (o .:? "getMetadata")) + +instance ToJSON SourceOperationResponse where + toJSON SourceOperationResponse{..} + = object + (catMaybes + [("split" .=) <$> _sorSplit, + ("getMetadata" .=) <$> _sorGetMetadata]) + +-- | Global topology of the streaming Dataflow job, including all +-- computations and their sharded locations. +-- +-- /See:/ 'topologyConfig' smart constructor. +data TopologyConfig = TopologyConfig + { _tcDataDiskAssignments :: !(Maybe [Maybe DataDiskAssignment]) + , _tcUserStageToComputationNameMap :: !(Maybe TopologyConfigUserStageToComputationNameMap) + , _tcComputations :: !(Maybe [Maybe ComputationTopology]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TopologyConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcDataDiskAssignments' +-- +-- * 'tcUserStageToComputationNameMap' +-- +-- * 'tcComputations' +topologyConfig + :: TopologyConfig +topologyConfig = + TopologyConfig + { _tcDataDiskAssignments = Nothing + , _tcUserStageToComputationNameMap = Nothing + , _tcComputations = Nothing + } + +-- | The disks assigned to a streaming Dataflow job. +tcDataDiskAssignments :: Lens' TopologyConfig [Maybe DataDiskAssignment] +tcDataDiskAssignments + = lens _tcDataDiskAssignments + (\ s a -> s{_tcDataDiskAssignments = a}) + . _Default + . _Coerce + +-- | Maps user stage names to stable computation names. +tcUserStageToComputationNameMap :: Lens' TopologyConfig (Maybe TopologyConfigUserStageToComputationNameMap) +tcUserStageToComputationNameMap + = lens _tcUserStageToComputationNameMap + (\ s a -> s{_tcUserStageToComputationNameMap = a}) + +-- | The computations associated with a streaming Dataflow job. +tcComputations :: Lens' TopologyConfig [Maybe ComputationTopology] +tcComputations + = lens _tcComputations + (\ s a -> s{_tcComputations = a}) + . _Default + . _Coerce + +instance FromJSON TopologyConfig where + parseJSON + = withObject "TopologyConfig" + (\ o -> + TopologyConfig <$> + (o .:? "dataDiskAssignments" .!= mempty) <*> + (o .:? "userStageToComputationNameMap") + <*> (o .:? "computations" .!= mempty)) + +instance ToJSON TopologyConfig where + toJSON TopologyConfig{..} + = object + (catMaybes + [("dataDiskAssignments" .=) <$> + _tcDataDiskAssignments, + ("userStageToComputationNameMap" .=) <$> + _tcUserStageToComputationNameMap, + ("computations" .=) <$> _tcComputations]) + +-- | Provides data to pass through to the worker harness. +-- +-- /See:/ 'workerSettings' smart constructor. +data WorkerSettings = WorkerSettings + { _wsServicePath :: !(Maybe Text) + , _wsBaseUrl :: !(Maybe Text) + , _wsShuffleServicePath :: !(Maybe Text) + , _wsTempStoragePrefix :: !(Maybe Text) + , _wsReportingEnabled :: !(Maybe Bool) + , _wsWorkerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsServicePath' +-- +-- * 'wsBaseUrl' +-- +-- * 'wsShuffleServicePath' +-- +-- * 'wsTempStoragePrefix' +-- +-- * 'wsReportingEnabled' +-- +-- * 'wsWorkerId' +workerSettings + :: WorkerSettings +workerSettings = + WorkerSettings + { _wsServicePath = Nothing + , _wsBaseUrl = Nothing + , _wsShuffleServicePath = Nothing + , _wsTempStoragePrefix = Nothing + , _wsReportingEnabled = Nothing + , _wsWorkerId = Nothing + } + +-- | The Dataflow service path relative to the root URL, for example, +-- \"dataflow\/v1b3\/projects\". +wsServicePath :: Lens' WorkerSettings (Maybe Text) +wsServicePath + = lens _wsServicePath + (\ s a -> s{_wsServicePath = a}) + +-- | The base URL for accessing Google Cloud APIs. When workers access Google +-- Cloud APIs, they logically do so via relative URLs. If this field is +-- specified, it supplies the base URL to use for resolving these relative +-- URLs. The normative algorithm used is defined by RFC 1808, \"Relative +-- Uniform Resource Locators\". If not specified, the default value is +-- \"http:\/\/www.googleapis.com\/\" +wsBaseUrl :: Lens' WorkerSettings (Maybe Text) +wsBaseUrl + = lens _wsBaseUrl (\ s a -> s{_wsBaseUrl = a}) + +-- | The Shuffle service path relative to the root URL, for example, +-- \"shuffle\/v1beta1\". +wsShuffleServicePath :: Lens' WorkerSettings (Maybe Text) +wsShuffleServicePath + = lens _wsShuffleServicePath + (\ s a -> s{_wsShuffleServicePath = a}) + +-- | The prefix of the resources the system should use for temporary storage. +-- The supported resource type is: Google Cloud Storage: +-- storage.googleapis.com\/{bucket}\/{object} +-- bucket.storage.googleapis.com\/{object} +wsTempStoragePrefix :: Lens' WorkerSettings (Maybe Text) +wsTempStoragePrefix + = lens _wsTempStoragePrefix + (\ s a -> s{_wsTempStoragePrefix = a}) + +-- | Send work progress updates to service. +wsReportingEnabled :: Lens' WorkerSettings (Maybe Bool) +wsReportingEnabled + = lens _wsReportingEnabled + (\ s a -> s{_wsReportingEnabled = a}) + +-- | ID of the worker running this pipeline. +wsWorkerId :: Lens' WorkerSettings (Maybe Text) +wsWorkerId + = lens _wsWorkerId (\ s a -> s{_wsWorkerId = a}) + +instance FromJSON WorkerSettings where + parseJSON + = withObject "WorkerSettings" + (\ o -> + WorkerSettings <$> + (o .:? "servicePath") <*> (o .:? "baseUrl") <*> + (o .:? "shuffleServicePath") + <*> (o .:? "tempStoragePrefix") + <*> (o .:? "reportingEnabled") + <*> (o .:? "workerId")) + +instance ToJSON WorkerSettings where + toJSON WorkerSettings{..} + = object + (catMaybes + [("servicePath" .=) <$> _wsServicePath, + ("baseUrl" .=) <$> _wsBaseUrl, + ("shuffleServicePath" .=) <$> _wsShuffleServicePath, + ("tempStoragePrefix" .=) <$> _wsTempStoragePrefix, + ("reportingEnabled" .=) <$> _wsReportingEnabled, + ("workerId" .=) <$> _wsWorkerId]) + +-- | The Dataflow service\'s idea of the current state of a WorkItem being +-- processed by a worker. +-- +-- /See:/ 'workItemServiceState' smart constructor. +data WorkItemServiceState = WorkItemServiceState + { _wissNextReportIndex :: !(Maybe Int64) + , _wissReportStatusInterval :: !(Maybe Text) + , _wissHarnessData :: !(Maybe WorkItemServiceStateHarnessData) + , _wissSuggestedStopPoint :: !(Maybe (Maybe ApproximateProgress)) + , _wissSuggestedStopPosition :: !(Maybe (Maybe Position)) + , _wissLeaseExpireTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkItemServiceState' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wissNextReportIndex' +-- +-- * 'wissReportStatusInterval' +-- +-- * 'wissHarnessData' +-- +-- * 'wissSuggestedStopPoint' +-- +-- * 'wissSuggestedStopPosition' +-- +-- * 'wissLeaseExpireTime' +workItemServiceState + :: WorkItemServiceState +workItemServiceState = + WorkItemServiceState + { _wissNextReportIndex = Nothing + , _wissReportStatusInterval = Nothing + , _wissHarnessData = Nothing + , _wissSuggestedStopPoint = Nothing + , _wissSuggestedStopPosition = Nothing + , _wissLeaseExpireTime = Nothing + } + +-- | The index value to use for the next report sent by the worker. Note: If +-- the report call fails for whatever reason, the worker should reuse this +-- index for subsequent report attempts. +wissNextReportIndex :: Lens' WorkItemServiceState (Maybe Int64) +wissNextReportIndex + = lens _wissNextReportIndex + (\ s a -> s{_wissNextReportIndex = a}) + +-- | New recommended reporting interval. +wissReportStatusInterval :: Lens' WorkItemServiceState (Maybe Text) +wissReportStatusInterval + = lens _wissReportStatusInterval + (\ s a -> s{_wissReportStatusInterval = a}) + +-- | Other data returned by the service, specific to the particular worker +-- harness. +wissHarnessData :: Lens' WorkItemServiceState (Maybe WorkItemServiceStateHarnessData) +wissHarnessData + = lens _wissHarnessData + (\ s a -> s{_wissHarnessData = a}) + +-- | The progress point in the WorkItem where the Dataflow service suggests +-- that the worker truncate the task. +wissSuggestedStopPoint :: Lens' WorkItemServiceState (Maybe (Maybe ApproximateProgress)) +wissSuggestedStopPoint + = lens _wissSuggestedStopPoint + (\ s a -> s{_wissSuggestedStopPoint = a}) + +-- | Obsolete, always empty. +wissSuggestedStopPosition :: Lens' WorkItemServiceState (Maybe (Maybe Position)) +wissSuggestedStopPosition + = lens _wissSuggestedStopPosition + (\ s a -> s{_wissSuggestedStopPosition = a}) + +-- | Time at which the current lease will expire. +wissLeaseExpireTime :: Lens' WorkItemServiceState (Maybe Text) +wissLeaseExpireTime + = lens _wissLeaseExpireTime + (\ s a -> s{_wissLeaseExpireTime = a}) + +instance FromJSON WorkItemServiceState where + parseJSON + = withObject "WorkItemServiceState" + (\ o -> + WorkItemServiceState <$> + (o .:? "nextReportIndex") <*> + (o .:? "reportStatusInterval") + <*> (o .:? "harnessData") + <*> (o .:? "suggestedStopPoint") + <*> (o .:? "suggestedStopPosition") + <*> (o .:? "leaseExpireTime")) + +instance ToJSON WorkItemServiceState where + toJSON WorkItemServiceState{..} + = object + (catMaybes + [("nextReportIndex" .=) <$> _wissNextReportIndex, + ("reportStatusInterval" .=) <$> + _wissReportStatusInterval, + ("harnessData" .=) <$> _wissHarnessData, + ("suggestedStopPoint" .=) <$> + _wissSuggestedStopPoint, + ("suggestedStopPosition" .=) <$> + _wissSuggestedStopPosition, + ("leaseExpireTime" .=) <$> _wissLeaseExpireTime]) + +-- | Data disk assignment for a given VM instance. +-- +-- /See:/ 'dataDiskAssignment' smart constructor. +data DataDiskAssignment = DataDiskAssignment + { _ddaVmInstance :: !(Maybe Text) + , _ddaDataDisks :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataDiskAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddaVmInstance' +-- +-- * 'ddaDataDisks' +dataDiskAssignment + :: DataDiskAssignment +dataDiskAssignment = + DataDiskAssignment + { _ddaVmInstance = Nothing + , _ddaDataDisks = Nothing + } + +-- | VM instance name the data disks mounted to, for example +-- \"myproject-1014-104817-4c2-harness-0\". +ddaVmInstance :: Lens' DataDiskAssignment (Maybe Text) +ddaVmInstance + = lens _ddaVmInstance + (\ s a -> s{_ddaVmInstance = a}) + +-- | Mounted data disks. The order is important a data disk\'s 0-based index +-- in this list defines which persistent directory the disk is mounted to, +-- for example the list of { \"myproject-1014-104817-4c2-harness-0-disk-0\" +-- }, { \"myproject-1014-104817-4c2-harness-0-disk-1\" }. +ddaDataDisks :: Lens' DataDiskAssignment [Text] +ddaDataDisks + = lens _ddaDataDisks (\ s a -> s{_ddaDataDisks = a}) + . _Default + . _Coerce + +instance FromJSON DataDiskAssignment where + parseJSON + = withObject "DataDiskAssignment" + (\ o -> + DataDiskAssignment <$> + (o .:? "vmInstance") <*> + (o .:? "dataDisks" .!= mempty)) + +instance ToJSON DataDiskAssignment where + toJSON DataDiskAssignment{..} + = object + (catMaybes + [("vmInstance" .=) <$> _ddaVmInstance, + ("dataDisks" .=) <$> _ddaDataDisks]) + +-- | A task which initializes part of a streaming Dataflow job. +-- +-- /See:/ 'streamingSetupTask' smart constructor. +data StreamingSetupTask = StreamingSetupTask + { _sstStreamingComputationTopology :: !(Maybe (Maybe TopologyConfig)) + , _sstReceiveWorkPort :: !(Maybe Int32) + , _sstWorkerHarnessPort :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingSetupTask' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sstStreamingComputationTopology' +-- +-- * 'sstReceiveWorkPort' +-- +-- * 'sstWorkerHarnessPort' +streamingSetupTask + :: StreamingSetupTask +streamingSetupTask = + StreamingSetupTask + { _sstStreamingComputationTopology = Nothing + , _sstReceiveWorkPort = Nothing + , _sstWorkerHarnessPort = Nothing + } + +-- | The global topology of the streaming Dataflow job. +sstStreamingComputationTopology :: Lens' StreamingSetupTask (Maybe (Maybe TopologyConfig)) +sstStreamingComputationTopology + = lens _sstStreamingComputationTopology + (\ s a -> s{_sstStreamingComputationTopology = a}) + +-- | The TCP port on which the worker should listen for messages from other +-- streaming computation workers. +sstReceiveWorkPort :: Lens' StreamingSetupTask (Maybe Int32) +sstReceiveWorkPort + = lens _sstReceiveWorkPort + (\ s a -> s{_sstReceiveWorkPort = a}) + +-- | The TCP port used by the worker to communicate with the Dataflow worker +-- harness. +sstWorkerHarnessPort :: Lens' StreamingSetupTask (Maybe Int32) +sstWorkerHarnessPort + = lens _sstWorkerHarnessPort + (\ s a -> s{_sstWorkerHarnessPort = a}) + +instance FromJSON StreamingSetupTask where + parseJSON + = withObject "StreamingSetupTask" + (\ o -> + StreamingSetupTask <$> + (o .:? "streamingComputationTopology") <*> + (o .:? "receiveWorkPort") + <*> (o .:? "workerHarnessPort")) + +instance ToJSON StreamingSetupTask where + toJSON StreamingSetupTask{..} + = object + (catMaybes + [("streamingComputationTopology" .=) <$> + _sstStreamingComputationTopology, + ("receiveWorkPort" .=) <$> _sstReceiveWorkPort, + ("workerHarnessPort" .=) <$> _sstWorkerHarnessPort]) + +-- | Describes a stream of data, either as input to be processed or as output +-- of a streaming Dataflow job. +-- +-- /See:/ 'streamLocation' smart constructor. +data StreamLocation = StreamLocation + { _slStreamingStageLocation :: !(Maybe (Maybe StreamingStageLocation)) + , _slSideInputLocation :: !(Maybe (Maybe StreamingSideInputLocation)) + , _slCustomSourceLocation :: !(Maybe (Maybe CustomSourceLocation)) + , _slPubsubLocation :: !(Maybe (Maybe PubsubLocation)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slStreamingStageLocation' +-- +-- * 'slSideInputLocation' +-- +-- * 'slCustomSourceLocation' +-- +-- * 'slPubsubLocation' +streamLocation + :: StreamLocation +streamLocation = + StreamLocation + { _slStreamingStageLocation = Nothing + , _slSideInputLocation = Nothing + , _slCustomSourceLocation = Nothing + , _slPubsubLocation = Nothing + } + +-- | The stream is part of another computation within the current streaming +-- Dataflow job. +slStreamingStageLocation :: Lens' StreamLocation (Maybe (Maybe StreamingStageLocation)) +slStreamingStageLocation + = lens _slStreamingStageLocation + (\ s a -> s{_slStreamingStageLocation = a}) + +-- | The stream is a streaming side input. +slSideInputLocation :: Lens' StreamLocation (Maybe (Maybe StreamingSideInputLocation)) +slSideInputLocation + = lens _slSideInputLocation + (\ s a -> s{_slSideInputLocation = a}) + +-- | The stream is a custom source. +slCustomSourceLocation :: Lens' StreamLocation (Maybe (Maybe CustomSourceLocation)) +slCustomSourceLocation + = lens _slCustomSourceLocation + (\ s a -> s{_slCustomSourceLocation = a}) + +-- | The stream is a pubsub stream. +slPubsubLocation :: Lens' StreamLocation (Maybe (Maybe PubsubLocation)) +slPubsubLocation + = lens _slPubsubLocation + (\ s a -> s{_slPubsubLocation = a}) + +instance FromJSON StreamLocation where + parseJSON + = withObject "StreamLocation" + (\ o -> + StreamLocation <$> + (o .:? "streamingStageLocation") <*> + (o .:? "sideInputLocation") + <*> (o .:? "customSourceLocation") + <*> (o .:? "pubsubLocation")) + +instance ToJSON StreamLocation where + toJSON StreamLocation{..} + = object + (catMaybes + [("streamingStageLocation" .=) <$> + _slStreamingStageLocation, + ("sideInputLocation" .=) <$> _slSideInputLocation, + ("customSourceLocation" .=) <$> + _slCustomSourceLocation, + ("pubsubLocation" .=) <$> _slPubsubLocation]) + +-- | Describes mounted data disk. +-- +-- /See:/ 'mountedDataDisk' smart constructor. +newtype MountedDataDisk = MountedDataDisk + { _mddDataDisk :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MountedDataDisk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mddDataDisk' +mountedDataDisk + :: MountedDataDisk +mountedDataDisk = + MountedDataDisk + { _mddDataDisk = Nothing + } + +-- | The name of the data disk. This name is local to the Google Cloud +-- Platform project and uniquely identifies the disk within that project, +-- for example \"myproject-1014-104817-4c2-harness-0-disk-1\". +mddDataDisk :: Lens' MountedDataDisk (Maybe Text) +mddDataDisk + = lens _mddDataDisk (\ s a -> s{_mddDataDisk = a}) + +instance FromJSON MountedDataDisk where + parseJSON + = withObject "MountedDataDisk" + (\ o -> MountedDataDisk <$> (o .:? "dataDisk")) + +instance ToJSON MountedDataDisk where + toJSON MountedDataDisk{..} + = object + (catMaybes [("dataDisk" .=) <$> _mddDataDisk]) + +-- | MapTask consists of an ordered set of instructions, each of which +-- describes one particular low-level operation for the worker to perform +-- in order to accomplish the MapTask\'s WorkItem. Each instruction must +-- appear in the list before any instructions which depends on its output. +-- +-- /See:/ 'mapTask' smart constructor. +data MapTask = MapTask + { _mtInstructions :: !(Maybe [Maybe ParallelInstruction]) + , _mtSystemName :: !(Maybe Text) + , _mtStageName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapTask' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtInstructions' +-- +-- * 'mtSystemName' +-- +-- * 'mtStageName' +mapTask + :: MapTask +mapTask = + MapTask + { _mtInstructions = Nothing + , _mtSystemName = Nothing + , _mtStageName = Nothing + } + +-- | The instructions in the MapTask. +mtInstructions :: Lens' MapTask [Maybe ParallelInstruction] +mtInstructions + = lens _mtInstructions + (\ s a -> s{_mtInstructions = a}) + . _Default + . _Coerce + +-- | System-defined name of this MapTask. Unique across the workflow. +mtSystemName :: Lens' MapTask (Maybe Text) +mtSystemName + = lens _mtSystemName (\ s a -> s{_mtSystemName = a}) + +-- | System-defined name of the stage containing this MapTask. Unique across +-- the workflow. +mtStageName :: Lens' MapTask (Maybe Text) +mtStageName + = lens _mtStageName (\ s a -> s{_mtStageName = a}) + +instance FromJSON MapTask where + parseJSON + = withObject "MapTask" + (\ o -> + MapTask <$> + (o .:? "instructions" .!= mempty) <*> + (o .:? "systemName") + <*> (o .:? "stageName")) + +instance ToJSON MapTask where + toJSON MapTask{..} + = object + (catMaybes + [("instructions" .=) <$> _mtInstructions, + ("systemName" .=) <$> _mtSystemName, + ("stageName" .=) <$> _mtStageName]) + +-- | A task which describes what action should be performed for the specified +-- streaming computation ranges. +-- +-- /See:/ 'streamingComputationTask' smart constructor. +data StreamingComputationTask = StreamingComputationTask + { _sctTaskType :: !(Maybe Text) + , _sctDataDisks :: !(Maybe [Maybe MountedDataDisk]) + , _sctComputationRanges :: !(Maybe [Maybe StreamingComputationRanges]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingComputationTask' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sctTaskType' +-- +-- * 'sctDataDisks' +-- +-- * 'sctComputationRanges' +streamingComputationTask + :: StreamingComputationTask +streamingComputationTask = + StreamingComputationTask + { _sctTaskType = Nothing + , _sctDataDisks = Nothing + , _sctComputationRanges = Nothing + } + +-- | A type of streaming computation task. +sctTaskType :: Lens' StreamingComputationTask (Maybe Text) +sctTaskType + = lens _sctTaskType (\ s a -> s{_sctTaskType = a}) + +-- | Describes the set of data disks this task should apply to. +sctDataDisks :: Lens' StreamingComputationTask [Maybe MountedDataDisk] +sctDataDisks + = lens _sctDataDisks (\ s a -> s{_sctDataDisks = a}) + . _Default + . _Coerce + +-- | Contains ranges of a streaming computation this task should apply to. +sctComputationRanges :: Lens' StreamingComputationTask [Maybe StreamingComputationRanges] +sctComputationRanges + = lens _sctComputationRanges + (\ s a -> s{_sctComputationRanges = a}) + . _Default + . _Coerce + +instance FromJSON StreamingComputationTask where + parseJSON + = withObject "StreamingComputationTask" + (\ o -> + StreamingComputationTask <$> + (o .:? "taskType") <*> (o .:? "dataDisks" .!= mempty) + <*> (o .:? "computationRanges" .!= mempty)) + +instance ToJSON StreamingComputationTask where + toJSON StreamingComputationTask{..} + = object + (catMaybes + [("taskType" .=) <$> _sctTaskType, + ("dataDisks" .=) <$> _sctDataDisks, + ("computationRanges" .=) <$> _sctComputationRanges]) + +-- | Identifies the location of a streaming side input. +-- +-- /See:/ 'streamingSideInputLocation' smart constructor. +data StreamingSideInputLocation = StreamingSideInputLocation + { _ssilTag :: !(Maybe Text) + , _ssilStateFamily :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingSideInputLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssilTag' +-- +-- * 'ssilStateFamily' +streamingSideInputLocation + :: StreamingSideInputLocation +streamingSideInputLocation = + StreamingSideInputLocation + { _ssilTag = Nothing + , _ssilStateFamily = Nothing + } + +-- | Identifies the particular side input within the streaming Dataflow job. +ssilTag :: Lens' StreamingSideInputLocation (Maybe Text) +ssilTag = lens _ssilTag (\ s a -> s{_ssilTag = a}) + +-- | Identifies the state family where this side input is stored. +ssilStateFamily :: Lens' StreamingSideInputLocation (Maybe Text) +ssilStateFamily + = lens _ssilStateFamily + (\ s a -> s{_ssilStateFamily = a}) + +instance FromJSON StreamingSideInputLocation where + parseJSON + = withObject "StreamingSideInputLocation" + (\ o -> + StreamingSideInputLocation <$> + (o .:? "tag") <*> (o .:? "stateFamily")) + +instance ToJSON StreamingSideInputLocation where + toJSON StreamingSideInputLocation{..} + = object + (catMaybes + [("tag" .=) <$> _ssilTag, + ("stateFamily" .=) <$> _ssilStateFamily]) + +-- | A particular message pertaining to a Dataflow job. +-- +-- /See:/ 'jobMessage' smart constructor. +data JobMessage = JobMessage + { _jmTime :: !(Maybe Text) + , _jmMessageText :: !(Maybe Text) + , _jmMessageImportance :: !(Maybe Text) + , _jmId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jmTime' +-- +-- * 'jmMessageText' +-- +-- * 'jmMessageImportance' +-- +-- * 'jmId' +jobMessage + :: JobMessage +jobMessage = + JobMessage + { _jmTime = Nothing + , _jmMessageText = Nothing + , _jmMessageImportance = Nothing + , _jmId = Nothing + } + +-- | The timestamp of the message. +jmTime :: Lens' JobMessage (Maybe Text) +jmTime = lens _jmTime (\ s a -> s{_jmTime = a}) + +-- | The text of the message. +jmMessageText :: Lens' JobMessage (Maybe Text) +jmMessageText + = lens _jmMessageText + (\ s a -> s{_jmMessageText = a}) + +-- | Importance level of the message. +jmMessageImportance :: Lens' JobMessage (Maybe Text) +jmMessageImportance + = lens _jmMessageImportance + (\ s a -> s{_jmMessageImportance = a}) + +-- | Identifies the message. This is automatically generated by the service; +-- the caller should treat it as an opaque string. +jmId :: Lens' JobMessage (Maybe Text) +jmId = lens _jmId (\ s a -> s{_jmId = a}) + +instance FromJSON JobMessage where + parseJSON + = withObject "JobMessage" + (\ o -> + JobMessage <$> + (o .:? "time") <*> (o .:? "messageText") <*> + (o .:? "messageImportance") + <*> (o .:? "id")) + +instance ToJSON JobMessage where + toJSON JobMessage{..} + = object + (catMaybes + [("time" .=) <$> _jmTime, + ("messageText" .=) <$> _jmMessageText, + ("messageImportance" .=) <$> _jmMessageImportance, + ("id" .=) <$> _jmId]) + +-- | Defines a job to be run by the Dataflow service. +-- +-- /See:/ 'job' smart constructor. +data Job = Job + { _jobRequestedState :: !(Maybe Text) + , _jobEnvironment :: !(Maybe (Maybe Environment)) + , _jobClientRequestId :: !(Maybe Text) + , _jobCurrentState :: !(Maybe Text) + , _jobReplacedByJobId :: !(Maybe Text) + , _jobSteps :: !(Maybe [Maybe Step]) + , _jobExecutionInfo :: !(Maybe (Maybe JobExecutionInfo)) + , _jobName :: !(Maybe Text) + , _jobTransformNameMapping :: !(Maybe JobTransformNameMapping) + , _jobId :: !(Maybe Text) + , _jobProjectId :: !(Maybe Text) + , _jobType :: !(Maybe Text) + , _jobCurrentStateTime :: !(Maybe Text) + , _jobReplaceJobId :: !(Maybe Text) + , _jobCreateTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Job' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jobRequestedState' +-- +-- * 'jobEnvironment' +-- +-- * 'jobClientRequestId' +-- +-- * 'jobCurrentState' +-- +-- * 'jobReplacedByJobId' +-- +-- * 'jobSteps' +-- +-- * 'jobExecutionInfo' +-- +-- * 'jobName' +-- +-- * 'jobTransformNameMapping' +-- +-- * 'jobId' +-- +-- * 'jobProjectId' +-- +-- * 'jobType' +-- +-- * 'jobCurrentStateTime' +-- +-- * 'jobReplaceJobId' +-- +-- * 'jobCreateTime' +job + :: Job +job = + Job + { _jobRequestedState = Nothing + , _jobEnvironment = Nothing + , _jobClientRequestId = Nothing + , _jobCurrentState = Nothing + , _jobReplacedByJobId = Nothing + , _jobSteps = Nothing + , _jobExecutionInfo = Nothing + , _jobName = Nothing + , _jobTransformNameMapping = Nothing + , _jobId = Nothing + , _jobProjectId = Nothing + , _jobType = Nothing + , _jobCurrentStateTime = Nothing + , _jobReplaceJobId = Nothing + , _jobCreateTime = Nothing + } + +-- | The job\'s requested state. UpdateJob may be used to switch between the +-- JOB_STATE_STOPPED and JOB_STATE_RUNNING states, by setting +-- requested_state. UpdateJob may also be used to directly set a job\'s +-- requested state to JOB_STATE_CANCELLED or JOB_STATE_DONE, irrevocably +-- terminating the job if it has not already reached a terminal state. +jobRequestedState :: Lens' Job (Maybe Text) +jobRequestedState + = lens _jobRequestedState + (\ s a -> s{_jobRequestedState = a}) + +-- | Environment for the job. +jobEnvironment :: Lens' Job (Maybe (Maybe Environment)) +jobEnvironment + = lens _jobEnvironment + (\ s a -> s{_jobEnvironment = a}) + +-- | Client\'s unique identifier of the job, re-used by SDK across retried +-- attempts. If this field is set, the service will ensure its uniqueness. +-- That is, the request to create a job will fail if the service has +-- knowledge of a previously submitted job with the same client\'s id and +-- job name. The caller may, for example, use this field to ensure +-- idempotence of job creation across retried attempts to create a job. By +-- default, the field is empty and, in that case, the service ignores it. +jobClientRequestId :: Lens' Job (Maybe Text) +jobClientRequestId + = lens _jobClientRequestId + (\ s a -> s{_jobClientRequestId = a}) + +-- | The current state of the job. Jobs are created in the JOB_STATE_STOPPED +-- state unless otherwise specified. A job in the JOB_STATE_RUNNING state +-- may asynchronously enter a terminal state. Once a job has reached a +-- terminal state, no further state updates may be made. This field may be +-- mutated by the Dataflow service; callers cannot mutate it. +jobCurrentState :: Lens' Job (Maybe Text) +jobCurrentState + = lens _jobCurrentState + (\ s a -> s{_jobCurrentState = a}) + +-- | If another job is an update of this job (and thus, this job is in +-- JOB_STATE_UPDATED), this field will contain the ID of that job. +jobReplacedByJobId :: Lens' Job (Maybe Text) +jobReplacedByJobId + = lens _jobReplacedByJobId + (\ s a -> s{_jobReplacedByJobId = a}) + +-- | The top-level steps that constitute the entire job. +jobSteps :: Lens' Job [Maybe Step] +jobSteps + = lens _jobSteps (\ s a -> s{_jobSteps = a}) . + _Default + . _Coerce + +-- | Information about how the Dataflow service will actually run the job. +jobExecutionInfo :: Lens' Job (Maybe (Maybe JobExecutionInfo)) +jobExecutionInfo + = lens _jobExecutionInfo + (\ s a -> s{_jobExecutionInfo = a}) + +-- | The user-specified Dataflow job name. Only one Job with a given name may +-- exist in a project at any given time. If a caller attempts to create a +-- Job with the same name as an already-existing Job, the attempt will +-- return the existing Job. The name must match the regular expression +-- [a-z]([-a-z0-9]{0,38}[a-z0-9])? +jobName :: Lens' Job (Maybe Text) +jobName = lens _jobName (\ s a -> s{_jobName = a}) + +-- | Map of transform name prefixes of the job to be replaced to the +-- corresponding name prefixes of the new job. +jobTransformNameMapping :: Lens' Job (Maybe JobTransformNameMapping) +jobTransformNameMapping + = lens _jobTransformNameMapping + (\ s a -> s{_jobTransformNameMapping = a}) + +-- | The unique ID of this job. This field is set by the Dataflow service +-- when the Job is created, and is immutable for the life of the Job. +jobId :: Lens' Job (Maybe Text) +jobId = lens _jobId (\ s a -> s{_jobId = a}) + +-- | The project which owns the job. +jobProjectId :: Lens' Job (Maybe Text) +jobProjectId + = lens _jobProjectId (\ s a -> s{_jobProjectId = a}) + +-- | The type of dataflow job. +jobType :: Lens' Job (Maybe Text) +jobType = lens _jobType (\ s a -> s{_jobType = a}) + +-- | The timestamp associated with the current state. +jobCurrentStateTime :: Lens' Job (Maybe Text) +jobCurrentStateTime + = lens _jobCurrentStateTime + (\ s a -> s{_jobCurrentStateTime = a}) + +-- | If this job is an update of an existing job, this field will be the ID +-- of the job it replaced. When sending a CreateJobRequest, you can update +-- a job by specifying it here. The job named here will be stopped, and its +-- intermediate state transferred to this job. +jobReplaceJobId :: Lens' Job (Maybe Text) +jobReplaceJobId + = lens _jobReplaceJobId + (\ s a -> s{_jobReplaceJobId = a}) + +-- | Timestamp when job was initially created. Immutable, set by the Dataflow +-- service. +jobCreateTime :: Lens' Job (Maybe Text) +jobCreateTime + = lens _jobCreateTime + (\ s a -> s{_jobCreateTime = a}) + +instance FromJSON Job where + parseJSON + = withObject "Job" + (\ o -> + Job <$> + (o .:? "requestedState") <*> (o .:? "environment") + <*> (o .:? "clientRequestId") + <*> (o .:? "currentState") + <*> (o .:? "replacedByJobId") + <*> (o .:? "steps" .!= mempty) + <*> (o .:? "executionInfo") + <*> (o .:? "name") + <*> (o .:? "transformNameMapping") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "type") + <*> (o .:? "currentStateTime") + <*> (o .:? "replaceJobId") + <*> (o .:? "createTime")) + +instance ToJSON Job where + toJSON Job{..} + = object + (catMaybes + [("requestedState" .=) <$> _jobRequestedState, + ("environment" .=) <$> _jobEnvironment, + ("clientRequestId" .=) <$> _jobClientRequestId, + ("currentState" .=) <$> _jobCurrentState, + ("replacedByJobId" .=) <$> _jobReplacedByJobId, + ("steps" .=) <$> _jobSteps, + ("executionInfo" .=) <$> _jobExecutionInfo, + ("name" .=) <$> _jobName, + ("transformNameMapping" .=) <$> + _jobTransformNameMapping, + ("id" .=) <$> _jobId, + ("projectId" .=) <$> _jobProjectId, + ("type" .=) <$> _jobType, + ("currentStateTime" .=) <$> _jobCurrentStateTime, + ("replaceJobId" .=) <$> _jobReplaceJobId, + ("createTime" .=) <$> _jobCreateTime]) + +-- | Information about an output of a SeqMapTask. +-- +-- /See:/ 'seqMapTaskOutputInfo' smart constructor. +data SeqMapTaskOutputInfo = SeqMapTaskOutputInfo + { _smtoiSink :: !(Maybe (Maybe Sink)) + , _smtoiTag :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SeqMapTaskOutputInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smtoiSink' +-- +-- * 'smtoiTag' +seqMapTaskOutputInfo + :: SeqMapTaskOutputInfo +seqMapTaskOutputInfo = + SeqMapTaskOutputInfo + { _smtoiSink = Nothing + , _smtoiTag = Nothing + } + +-- | The sink to write the output value to. +smtoiSink :: Lens' SeqMapTaskOutputInfo (Maybe (Maybe Sink)) +smtoiSink + = lens _smtoiSink (\ s a -> s{_smtoiSink = a}) + +-- | The id of the TupleTag the user code will tag the output value by. +smtoiTag :: Lens' SeqMapTaskOutputInfo (Maybe Text) +smtoiTag = lens _smtoiTag (\ s a -> s{_smtoiTag = a}) + +instance FromJSON SeqMapTaskOutputInfo where + parseJSON + = withObject "SeqMapTaskOutputInfo" + (\ o -> + SeqMapTaskOutputInfo <$> + (o .:? "sink") <*> (o .:? "tag")) + +instance ToJSON SeqMapTaskOutputInfo where + toJSON SeqMapTaskOutputInfo{..} + = object + (catMaybes + [("sink" .=) <$> _smtoiSink, + ("tag" .=) <$> _smtoiTag]) + +-- | A request to compute the SourceMetadata of a Source. +-- +-- /See:/ 'sourceGetMetadataRequest' smart constructor. +newtype SourceGetMetadataRequest = SourceGetMetadataRequest + { _sgmrSource :: Maybe (Maybe Source) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceGetMetadataRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgmrSource' +sourceGetMetadataRequest + :: SourceGetMetadataRequest +sourceGetMetadataRequest = + SourceGetMetadataRequest + { _sgmrSource = Nothing + } + +-- | Specification of the source whose metadata should be computed. +sgmrSource :: Lens' SourceGetMetadataRequest (Maybe (Maybe Source)) +sgmrSource + = lens _sgmrSource (\ s a -> s{_sgmrSource = a}) + +instance FromJSON SourceGetMetadataRequest where + parseJSON + = withObject "SourceGetMetadataRequest" + (\ o -> + SourceGetMetadataRequest <$> (o .:? "source")) + +instance ToJSON SourceGetMetadataRequest where + toJSON SourceGetMetadataRequest{..} + = object (catMaybes [("source" .=) <$> _sgmrSource]) + +-- | When a task splits using WorkItemStatus.dynamic_source_split, this +-- message describes the two parts of the split relative to the description +-- of the current task\'s input. +-- +-- /See:/ 'dynamicSourceSplit' smart constructor. +data DynamicSourceSplit = DynamicSourceSplit + { _dssResidual :: !(Maybe (Maybe DerivedSource)) + , _dssPrimary :: !(Maybe (Maybe DerivedSource)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DynamicSourceSplit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dssResidual' +-- +-- * 'dssPrimary' +dynamicSourceSplit + :: DynamicSourceSplit +dynamicSourceSplit = + DynamicSourceSplit + { _dssResidual = Nothing + , _dssPrimary = Nothing + } + +-- | Residual part (returned to the pool of work). Specified relative to the +-- previously-current source. +dssResidual :: Lens' DynamicSourceSplit (Maybe (Maybe DerivedSource)) +dssResidual + = lens _dssResidual (\ s a -> s{_dssResidual = a}) + +-- | Primary part (continued to be processed by worker). Specified relative +-- to the previously-current source. Becomes current. +dssPrimary :: Lens' DynamicSourceSplit (Maybe (Maybe DerivedSource)) +dssPrimary + = lens _dssPrimary (\ s a -> s{_dssPrimary = a}) + +instance FromJSON DynamicSourceSplit where + parseJSON + = withObject "DynamicSourceSplit" + (\ o -> + DynamicSourceSplit <$> + (o .:? "residual") <*> (o .:? "primary")) + +instance ToJSON DynamicSourceSplit where + toJSON DynamicSourceSplit{..} + = object + (catMaybes + [("residual" .=) <$> _dssResidual, + ("primary" .=) <$> _dssPrimary]) + +-- | An instruction that reads records. Takes no inputs, produces one output. +-- +-- /See:/ 'readInstruction' smart constructor. +newtype ReadInstruction = ReadInstruction + { _riSource :: Maybe (Maybe Source) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riSource' +readInstruction + :: ReadInstruction +readInstruction = + ReadInstruction + { _riSource = Nothing + } + +-- | The source to read from. +riSource :: Lens' ReadInstruction (Maybe (Maybe Source)) +riSource = lens _riSource (\ s a -> s{_riSource = a}) + +instance FromJSON ReadInstruction where + parseJSON + = withObject "ReadInstruction" + (\ o -> ReadInstruction <$> (o .:? "source")) + +instance ToJSON ReadInstruction where + toJSON ReadInstruction{..} + = object (catMaybes [("source" .=) <$> _riSource]) + +-- | Describes one particular pool of Dataflow workers to be instantiated by +-- the Dataflow service in order to perform the computations required by a +-- job. Note that a workflow job may use multiple pools, in order to match +-- the various computational requirements of the various stages of the job. +-- +-- /See:/ 'workerPool' smart constructor. +data WorkerPool = WorkerPool + { _wpAutoscalingSettings :: !(Maybe (Maybe AutoscalingSettings)) + , _wpDiskSizeGb :: !(Maybe Int32) + , _wpKind :: !(Maybe Text) + , _wpTaskrunnerSettings :: !(Maybe (Maybe TaskRunnerSettings)) + , _wpNumWorkers :: !(Maybe Int32) + , _wpNetwork :: !(Maybe Text) + , _wpZone :: !(Maybe Text) + , _wpPackages :: !(Maybe [Maybe Package]) + , _wpOnHostMaintenance :: !(Maybe Text) + , _wpDiskSourceImage :: !(Maybe Text) + , _wpMachineType :: !(Maybe Text) + , _wpMetadata :: !(Maybe WorkerPoolMetadata) + , _wpDiskType :: !(Maybe Text) + , _wpTeardownPolicy :: !(Maybe Text) + , _wpDefaultPackageSet :: !(Maybe Text) + , _wpPoolArgs :: !(Maybe WorkerPoolPoolArgs) + , _wpDataDisks :: !(Maybe [Maybe Disk]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerPool' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wpAutoscalingSettings' +-- +-- * 'wpDiskSizeGb' +-- +-- * 'wpKind' +-- +-- * 'wpTaskrunnerSettings' +-- +-- * 'wpNumWorkers' +-- +-- * 'wpNetwork' +-- +-- * 'wpZone' +-- +-- * 'wpPackages' +-- +-- * 'wpOnHostMaintenance' +-- +-- * 'wpDiskSourceImage' +-- +-- * 'wpMachineType' +-- +-- * 'wpMetadata' +-- +-- * 'wpDiskType' +-- +-- * 'wpTeardownPolicy' +-- +-- * 'wpDefaultPackageSet' +-- +-- * 'wpPoolArgs' +-- +-- * 'wpDataDisks' +workerPool + :: WorkerPool +workerPool = + WorkerPool + { _wpAutoscalingSettings = Nothing + , _wpDiskSizeGb = Nothing + , _wpKind = Nothing + , _wpTaskrunnerSettings = Nothing + , _wpNumWorkers = Nothing + , _wpNetwork = Nothing + , _wpZone = Nothing + , _wpPackages = Nothing + , _wpOnHostMaintenance = Nothing + , _wpDiskSourceImage = Nothing + , _wpMachineType = Nothing + , _wpMetadata = Nothing + , _wpDiskType = Nothing + , _wpTeardownPolicy = Nothing + , _wpDefaultPackageSet = Nothing + , _wpPoolArgs = Nothing + , _wpDataDisks = Nothing + } + +-- | Settings for autoscaling of this WorkerPool. +wpAutoscalingSettings :: Lens' WorkerPool (Maybe (Maybe AutoscalingSettings)) +wpAutoscalingSettings + = lens _wpAutoscalingSettings + (\ s a -> s{_wpAutoscalingSettings = a}) + +-- | Size of root disk for VMs, in GB. If zero or unspecified, the service +-- will attempt to choose a reasonable default. +wpDiskSizeGb :: Lens' WorkerPool (Maybe Int32) +wpDiskSizeGb + = lens _wpDiskSizeGb (\ s a -> s{_wpDiskSizeGb = a}) + +-- | The kind of the worker pool; currently only \'harness\' and \'shuffle\' +-- are supported. +wpKind :: Lens' WorkerPool (Maybe Text) +wpKind = lens _wpKind (\ s a -> s{_wpKind = a}) + +-- | Settings passed through to Google Compute Engine workers when using the +-- standard Dataflow task runner. Users should ignore this field. +wpTaskrunnerSettings :: Lens' WorkerPool (Maybe (Maybe TaskRunnerSettings)) +wpTaskrunnerSettings + = lens _wpTaskrunnerSettings + (\ s a -> s{_wpTaskrunnerSettings = a}) + +-- | Number of Google Compute Engine workers in this pool needed to execute +-- the job. If zero or unspecified, the service will attempt to choose a +-- reasonable default. +wpNumWorkers :: Lens' WorkerPool (Maybe Int32) +wpNumWorkers + = lens _wpNumWorkers (\ s a -> s{_wpNumWorkers = a}) + +-- | Network to which VMs will be assigned. If empty or unspecified, the +-- service will use the network \"default\". +wpNetwork :: Lens' WorkerPool (Maybe Text) +wpNetwork + = lens _wpNetwork (\ s a -> s{_wpNetwork = a}) + +-- | Zone to run the worker pools in (e.g. \"us-central1-b\"). If empty or +-- unspecified, the service will attempt to choose a reasonable default. +wpZone :: Lens' WorkerPool (Maybe Text) +wpZone = lens _wpZone (\ s a -> s{_wpZone = a}) + +-- | Packages to be installed on workers. +wpPackages :: Lens' WorkerPool [Maybe Package] +wpPackages + = lens _wpPackages (\ s a -> s{_wpPackages = a}) . + _Default + . _Coerce + +-- | The action to take on host maintenance, as defined by the Google Compute +-- Engine API. +wpOnHostMaintenance :: Lens' WorkerPool (Maybe Text) +wpOnHostMaintenance + = lens _wpOnHostMaintenance + (\ s a -> s{_wpOnHostMaintenance = a}) + +-- | Fully qualified source image for disks. +wpDiskSourceImage :: Lens' WorkerPool (Maybe Text) +wpDiskSourceImage + = lens _wpDiskSourceImage + (\ s a -> s{_wpDiskSourceImage = a}) + +-- | Machine type (e.g. \"n1-standard-1\"). If empty or unspecified, the +-- service will attempt to choose a reasonable default. +wpMachineType :: Lens' WorkerPool (Maybe Text) +wpMachineType + = lens _wpMachineType + (\ s a -> s{_wpMachineType = a}) + +-- | Metadata to set on the Google Compute Engine VMs. +wpMetadata :: Lens' WorkerPool (Maybe WorkerPoolMetadata) +wpMetadata + = lens _wpMetadata (\ s a -> s{_wpMetadata = a}) + +-- | Type of root disk for VMs. If empty or unspecified, the service will +-- attempt to choose a reasonable default. +wpDiskType :: Lens' WorkerPool (Maybe Text) +wpDiskType + = lens _wpDiskType (\ s a -> s{_wpDiskType = a}) + +-- | Sets the policy for determining when to turndown worker pool. Allowed +-- values are: TEARDOWN_ALWAYS, TEARDOWN_ON_SUCCESS, and TEARDOWN_NEVER. +-- TEARDOWN_ALWAYS means workers are always torn down regardless of whether +-- the job succeeds. TEARDOWN_ON_SUCCESS means workers are torn down if the +-- job succeeds. TEARDOWN_NEVER means the workers are never torn down. If +-- the workers are not torn down by the service, they will continue to run +-- and use Google Compute Engine VM resources in the user\'s project until +-- they are explicitly terminated by the user. Because of this, Google +-- recommends using the TEARDOWN_ALWAYS policy except for small, manually +-- supervised test jobs. If unknown or unspecified, the service will +-- attempt to choose a reasonable default. +wpTeardownPolicy :: Lens' WorkerPool (Maybe Text) +wpTeardownPolicy + = lens _wpTeardownPolicy + (\ s a -> s{_wpTeardownPolicy = a}) + +-- | The default package set to install. This allows the service to select a +-- default set of packages which are useful to worker harnesses written in +-- a particular language. +wpDefaultPackageSet :: Lens' WorkerPool (Maybe Text) +wpDefaultPackageSet + = lens _wpDefaultPackageSet + (\ s a -> s{_wpDefaultPackageSet = a}) + +-- | Extra arguments for this worker pool. +wpPoolArgs :: Lens' WorkerPool (Maybe WorkerPoolPoolArgs) +wpPoolArgs + = lens _wpPoolArgs (\ s a -> s{_wpPoolArgs = a}) + +-- | Data disks that are used by a VM in this workflow. +wpDataDisks :: Lens' WorkerPool [Maybe Disk] +wpDataDisks + = lens _wpDataDisks (\ s a -> s{_wpDataDisks = a}) . + _Default + . _Coerce + +instance FromJSON WorkerPool where + parseJSON + = withObject "WorkerPool" + (\ o -> + WorkerPool <$> + (o .:? "autoscalingSettings") <*> + (o .:? "diskSizeGb") + <*> (o .:? "kind") + <*> (o .:? "taskrunnerSettings") + <*> (o .:? "numWorkers") + <*> (o .:? "network") + <*> (o .:? "zone") + <*> (o .:? "packages" .!= mempty) + <*> (o .:? "onHostMaintenance") + <*> (o .:? "diskSourceImage") + <*> (o .:? "machineType") + <*> (o .:? "metadata") + <*> (o .:? "diskType") + <*> (o .:? "teardownPolicy") + <*> (o .:? "defaultPackageSet") + <*> (o .:? "poolArgs") + <*> (o .:? "dataDisks" .!= mempty)) + +instance ToJSON WorkerPool where + toJSON WorkerPool{..} + = object + (catMaybes + [("autoscalingSettings" .=) <$> + _wpAutoscalingSettings, + ("diskSizeGb" .=) <$> _wpDiskSizeGb, + ("kind" .=) <$> _wpKind, + ("taskrunnerSettings" .=) <$> _wpTaskrunnerSettings, + ("numWorkers" .=) <$> _wpNumWorkers, + ("network" .=) <$> _wpNetwork, + ("zone" .=) <$> _wpZone, + ("packages" .=) <$> _wpPackages, + ("onHostMaintenance" .=) <$> _wpOnHostMaintenance, + ("diskSourceImage" .=) <$> _wpDiskSourceImage, + ("machineType" .=) <$> _wpMachineType, + ("metadata" .=) <$> _wpMetadata, + ("diskType" .=) <$> _wpDiskType, + ("teardownPolicy" .=) <$> _wpTeardownPolicy, + ("defaultPackageSet" .=) <$> _wpDefaultPackageSet, + ("poolArgs" .=) <$> _wpPoolArgs, + ("dataDisks" .=) <$> _wpDataDisks]) + +-- | Packages that need to be installed in order for a worker to run the +-- steps of the Dataflow job which will be assigned to its worker pool. +-- This is the mechanism by which the SDK causes code to be loaded onto the +-- workers. For example, the Dataflow Java SDK might use this to install +-- jars containing the user\'s code and all of the various dependencies +-- (libraries, data files, etc) required in order for that code to run. +-- +-- /See:/ 'package' smart constructor. +data Package = Package + { _pLocation :: !(Maybe Text) + , _pName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Package' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pLocation' +-- +-- * 'pName' +package + :: Package +package = + Package + { _pLocation = Nothing + , _pName = Nothing + } + +-- | The resource to read the package from. The supported resource type is: +-- Google Cloud Storage: storage.googleapis.com\/{bucket} +-- bucket.storage.googleapis.com\/ +pLocation :: Lens' Package (Maybe Text) +pLocation + = lens _pLocation (\ s a -> s{_pLocation = a}) + +-- | The name of the package. +pName :: Lens' Package (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +instance FromJSON Package where + parseJSON + = withObject "Package" + (\ o -> + Package <$> (o .:? "location") <*> (o .:? "name")) + +instance ToJSON Package where + toJSON Package{..} + = object + (catMaybes + [("location" .=) <$> _pLocation, + ("name" .=) <$> _pName]) + +-- | Defines a particular step within a Dataflow job. A job consists of +-- multiple steps, each of which performs some specific operation as part +-- of the overall job. Data is typically passed from one step to another as +-- part of the job. Here\'s an example of a sequence of steps which +-- together implement a Map-Reduce job: * Read a collection of data from +-- some source, parsing the collection\'s elements. * Validate the +-- elements. * Apply a user-defined function to map each element to some +-- value and extract an element-specific key value. * Group elements with +-- the same key into a single element with that key, transforming a +-- multiply-keyed collection into a uniquely-keyed collection. * Write the +-- elements out to some data sink. (Note that the Dataflow service may be +-- used to run many different types of jobs, not just Map-Reduce). +-- +-- /See:/ 'step' smart constructor. +data Step = Step + { _sKind :: !(Maybe Text) + , _sName :: !(Maybe Text) + , _sProperties :: !(Maybe StepProperties) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Step' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sName' +-- +-- * 'sProperties' +step + :: Step +step = + Step + { _sKind = Nothing + , _sName = Nothing + , _sProperties = Nothing + } + +-- | The kind of step in the dataflow Job. +sKind :: Lens' Step (Maybe Text) +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | Name identifying the step. This must be unique for each step with +-- respect to all other steps in the dataflow Job. +sName :: Lens' Step (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | Named properties associated with the step. Each kind of predefined step +-- has its own required set of properties. +sProperties :: Lens' Step (Maybe StepProperties) +sProperties + = lens _sProperties (\ s a -> s{_sProperties = a}) + +instance FromJSON Step where + parseJSON + = withObject "Step" + (\ o -> + Step <$> + (o .:? "kind") <*> (o .:? "name") <*> + (o .:? "properties")) + +instance ToJSON Step where + toJSON Step{..} + = object + (catMaybes + [("kind" .=) <$> _sKind, ("name" .=) <$> _sName, + ("properties" .=) <$> _sProperties]) + +-- | A source that records can be read and decoded from. +-- +-- /See:/ 'source' smart constructor. +data Source = Source + { _souDoesNotNeedSplitting :: !(Maybe Bool) + , _souBaseSpecs :: !(Maybe [SourceBaseSpecsItem]) + , _souCodec :: !(Maybe SourceCodec) + , _souSpec :: !(Maybe SourceSpec) + , _souMetadata :: !(Maybe (Maybe SourceMetadata)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Source' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'souDoesNotNeedSplitting' +-- +-- * 'souBaseSpecs' +-- +-- * 'souCodec' +-- +-- * 'souSpec' +-- +-- * 'souMetadata' +source + :: Source +source = + Source + { _souDoesNotNeedSplitting = Nothing + , _souBaseSpecs = Nothing + , _souCodec = Nothing + , _souSpec = Nothing + , _souMetadata = Nothing + } + +-- | Setting this value to true hints to the framework that the source +-- doesn\'t need splitting, and using SourceSplitRequest on it would yield +-- SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to +-- true when splitting a single file into a set of byte ranges of +-- appropriate size, and set this to false when splitting a filepattern +-- into individual files. However, for efficiency, a file splitter may +-- decide to produce file subranges directly from the filepattern to avoid +-- a splitting round-trip. See SourceSplitRequest for an overview of the +-- splitting process. This field is meaningful only in the Source objects +-- populated by the user (e.g. when filling in a DerivedSource). Source +-- objects supplied by the framework to the user don\'t have this field +-- populated. +souDoesNotNeedSplitting :: Lens' Source (Maybe Bool) +souDoesNotNeedSplitting + = lens _souDoesNotNeedSplitting + (\ s a -> s{_souDoesNotNeedSplitting = a}) + +-- | While splitting, sources may specify the produced bundles as differences +-- against another source, in order to save backend-side memory and allow +-- bigger jobs. For details, see SourceSplitRequest. To support this use +-- case, the full set of parameters of the source is logically obtained by +-- taking the latest explicitly specified value of each parameter in the +-- order: base_specs (later items win), spec (overrides anything in +-- base_specs). +souBaseSpecs :: Lens' Source [SourceBaseSpecsItem] +souBaseSpecs + = lens _souBaseSpecs (\ s a -> s{_souBaseSpecs = a}) + . _Default + . _Coerce + +-- | The codec to use to decode data read from the source. +souCodec :: Lens' Source (Maybe SourceCodec) +souCodec = lens _souCodec (\ s a -> s{_souCodec = a}) + +-- | The source to read from, plus its parameters. +souSpec :: Lens' Source (Maybe SourceSpec) +souSpec = lens _souSpec (\ s a -> s{_souSpec = a}) + +-- | Optionally, metadata for this source can be supplied right away, +-- avoiding a SourceGetMetadataOperation roundtrip (see +-- SourceOperationRequest). This field is meaningful only in the Source +-- objects populated by the user (e.g. when filling in a DerivedSource). +-- Source objects supplied by the framework to the user don\'t have this +-- field populated. +souMetadata :: Lens' Source (Maybe (Maybe SourceMetadata)) +souMetadata + = lens _souMetadata (\ s a -> s{_souMetadata = a}) + +instance FromJSON Source where + parseJSON + = withObject "Source" + (\ o -> + Source <$> + (o .:? "doesNotNeedSplitting") <*> + (o .:? "baseSpecs" .!= mempty) + <*> (o .:? "codec") + <*> (o .:? "spec") + <*> (o .:? "metadata")) + +instance ToJSON Source where + toJSON Source{..} + = object + (catMaybes + [("doesNotNeedSplitting" .=) <$> + _souDoesNotNeedSplitting, + ("baseSpecs" .=) <$> _souBaseSpecs, + ("codec" .=) <$> _souCodec, ("spec" .=) <$> _souSpec, + ("metadata" .=) <$> _souMetadata]) + +-- | DEPRECATED in favor of DynamicSourceSplit. +-- +-- /See:/ 'sourceFork' smart constructor. +data SourceFork = SourceFork + { _sfResidual :: !(Maybe (Maybe SourceSplitShard)) + , _sfPrimarySource :: !(Maybe (Maybe DerivedSource)) + , _sfPrimary :: !(Maybe (Maybe SourceSplitShard)) + , _sfResidualSource :: !(Maybe (Maybe DerivedSource)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceFork' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfResidual' +-- +-- * 'sfPrimarySource' +-- +-- * 'sfPrimary' +-- +-- * 'sfResidualSource' +sourceFork + :: SourceFork +sourceFork = + SourceFork + { _sfResidual = Nothing + , _sfPrimarySource = Nothing + , _sfPrimary = Nothing + , _sfResidualSource = Nothing + } + +-- | DEPRECATED +sfResidual :: Lens' SourceFork (Maybe (Maybe SourceSplitShard)) +sfResidual + = lens _sfResidual (\ s a -> s{_sfResidual = a}) + +-- | DEPRECATED +sfPrimarySource :: Lens' SourceFork (Maybe (Maybe DerivedSource)) +sfPrimarySource + = lens _sfPrimarySource + (\ s a -> s{_sfPrimarySource = a}) + +-- | DEPRECATED +sfPrimary :: Lens' SourceFork (Maybe (Maybe SourceSplitShard)) +sfPrimary + = lens _sfPrimary (\ s a -> s{_sfPrimary = a}) + +-- | DEPRECATED +sfResidualSource :: Lens' SourceFork (Maybe (Maybe DerivedSource)) +sfResidualSource + = lens _sfResidualSource + (\ s a -> s{_sfResidualSource = a}) + +instance FromJSON SourceFork where + parseJSON + = withObject "SourceFork" + (\ o -> + SourceFork <$> + (o .:? "residual") <*> (o .:? "primarySource") <*> + (o .:? "primary") + <*> (o .:? "residualSource")) + +instance ToJSON SourceFork where + toJSON SourceFork{..} + = object + (catMaybes + [("residual" .=) <$> _sfResidual, + ("primarySource" .=) <$> _sfPrimarySource, + ("primary" .=) <$> _sfPrimary, + ("residualSource" .=) <$> _sfResidualSource]) + +-- | Location information for a specific key-range of a sharded computation. +-- Currently we only support UTF-8 character splits to simplify encoding +-- into JSON. +-- +-- /See:/ 'keyRangeLocation' smart constructor. +data KeyRangeLocation = KeyRangeLocation + { _krlPersistentDirectory :: !(Maybe Text) + , _krlDataDisk :: !(Maybe Text) + , _krlStart :: !(Maybe Text) + , _krlDeliveryEndpoint :: !(Maybe Text) + , _krlEnd :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KeyRangeLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'krlPersistentDirectory' +-- +-- * 'krlDataDisk' +-- +-- * 'krlStart' +-- +-- * 'krlDeliveryEndpoint' +-- +-- * 'krlEnd' +keyRangeLocation + :: KeyRangeLocation +keyRangeLocation = + KeyRangeLocation + { _krlPersistentDirectory = Nothing + , _krlDataDisk = Nothing + , _krlStart = Nothing + , _krlDeliveryEndpoint = Nothing + , _krlEnd = Nothing + } + +-- | The location of the persistent state for this range, as a persistent +-- directory in the worker local filesystem. +krlPersistentDirectory :: Lens' KeyRangeLocation (Maybe Text) +krlPersistentDirectory + = lens _krlPersistentDirectory + (\ s a -> s{_krlPersistentDirectory = a}) + +-- | The name of the data disk where data for this range is stored. This name +-- is local to the Google Cloud Platform project and uniquely identifies +-- the disk within that project, for example +-- \"myproject-1014-104817-4c2-harness-0-disk-1\". +krlDataDisk :: Lens' KeyRangeLocation (Maybe Text) +krlDataDisk + = lens _krlDataDisk (\ s a -> s{_krlDataDisk = a}) + +-- | The start (inclusive) of the key range. +krlStart :: Lens' KeyRangeLocation (Maybe Text) +krlStart = lens _krlStart (\ s a -> s{_krlStart = a}) + +-- | The physical location of this range assignment to be used for streaming +-- computation cross-worker message delivery. +krlDeliveryEndpoint :: Lens' KeyRangeLocation (Maybe Text) +krlDeliveryEndpoint + = lens _krlDeliveryEndpoint + (\ s a -> s{_krlDeliveryEndpoint = a}) + +-- | The end (exclusive) of the key range. +krlEnd :: Lens' KeyRangeLocation (Maybe Text) +krlEnd = lens _krlEnd (\ s a -> s{_krlEnd = a}) + +instance FromJSON KeyRangeLocation where + parseJSON + = withObject "KeyRangeLocation" + (\ o -> + KeyRangeLocation <$> + (o .:? "persistentDirectory") <*> (o .:? "dataDisk") + <*> (o .:? "start") + <*> (o .:? "deliveryEndpoint") + <*> (o .:? "end")) + +instance ToJSON KeyRangeLocation where + toJSON KeyRangeLocation{..} + = object + (catMaybes + [("persistentDirectory" .=) <$> + _krlPersistentDirectory, + ("dataDisk" .=) <$> _krlDataDisk, + ("start" .=) <$> _krlStart, + ("deliveryEndpoint" .=) <$> _krlDeliveryEndpoint, + ("end" .=) <$> _krlEnd]) + +-- | Response from a request to report the status of WorkItems. +-- +-- /See:/ 'reportWorkItemStatusResponse' smart constructor. +newtype ReportWorkItemStatusResponse = ReportWorkItemStatusResponse + { _rwisrWorkItemServiceStates :: Maybe [Maybe WorkItemServiceState] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportWorkItemStatusResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rwisrWorkItemServiceStates' +reportWorkItemStatusResponse + :: ReportWorkItemStatusResponse +reportWorkItemStatusResponse = + ReportWorkItemStatusResponse + { _rwisrWorkItemServiceStates = Nothing + } + +-- | A set of messages indicating the service-side state for each WorkItem +-- whose status was reported, in the same order as the WorkItemStatus +-- messages in the ReportWorkItemStatusRequest which resulting in this +-- response. +rwisrWorkItemServiceStates :: Lens' ReportWorkItemStatusResponse [Maybe WorkItemServiceState] +rwisrWorkItemServiceStates + = lens _rwisrWorkItemServiceStates + (\ s a -> s{_rwisrWorkItemServiceStates = a}) + . _Default + . _Coerce + +instance FromJSON ReportWorkItemStatusResponse where + parseJSON + = withObject "ReportWorkItemStatusResponse" + (\ o -> + ReportWorkItemStatusResponse <$> + (o .:? "workItemServiceStates" .!= mempty)) + +instance ToJSON ReportWorkItemStatusResponse where + toJSON ReportWorkItemStatusResponse{..} + = object + (catMaybes + [("workItemServiceStates" .=) <$> + _rwisrWorkItemServiceStates]) + +-- | A progress measurement of a WorkItem by a worker. +-- +-- /See:/ 'approximateProgress' smart constructor. +data ApproximateProgress = ApproximateProgress + { _apRemainingTime :: !(Maybe Text) + , _apPercentComplete :: !(Maybe Float) + , _apPosition :: !(Maybe (Maybe Position)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApproximateProgress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apRemainingTime' +-- +-- * 'apPercentComplete' +-- +-- * 'apPosition' +approximateProgress + :: ApproximateProgress +approximateProgress = + ApproximateProgress + { _apRemainingTime = Nothing + , _apPercentComplete = Nothing + , _apPosition = Nothing + } + +-- | Completion as an estimated time remaining. +apRemainingTime :: Lens' ApproximateProgress (Maybe Text) +apRemainingTime + = lens _apRemainingTime + (\ s a -> s{_apRemainingTime = a}) + +-- | Completion as percentage of the work, from 0.0 (beginning, nothing +-- complete), to 1.0 (end of the work range, entire WorkItem complete). +apPercentComplete :: Lens' ApproximateProgress (Maybe Float) +apPercentComplete + = lens _apPercentComplete + (\ s a -> s{_apPercentComplete = a}) + +-- | A Position within the work to represent a progress. +apPosition :: Lens' ApproximateProgress (Maybe (Maybe Position)) +apPosition + = lens _apPosition (\ s a -> s{_apPosition = a}) + +instance FromJSON ApproximateProgress where + parseJSON + = withObject "ApproximateProgress" + (\ o -> + ApproximateProgress <$> + (o .:? "remainingTime") <*> (o .:? "percentComplete") + <*> (o .:? "position")) + +instance ToJSON ApproximateProgress where + toJSON ApproximateProgress{..} + = object + (catMaybes + [("remainingTime" .=) <$> _apRemainingTime, + ("percentComplete" .=) <$> _apPercentComplete, + ("position" .=) <$> _apPosition]) + +-- | Describes full or partial data disk assignment information of the +-- computation ranges. +-- +-- /See:/ 'streamingComputationRanges' smart constructor. +data StreamingComputationRanges = StreamingComputationRanges + { _scrRangeAssignments :: !(Maybe [Maybe KeyRangeDataDiskAssignment]) + , _scrComputationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StreamingComputationRanges' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scrRangeAssignments' +-- +-- * 'scrComputationId' +streamingComputationRanges + :: StreamingComputationRanges +streamingComputationRanges = + StreamingComputationRanges + { _scrRangeAssignments = Nothing + , _scrComputationId = Nothing + } + +-- | Data disk assignments for ranges from this computation. +scrRangeAssignments :: Lens' StreamingComputationRanges [Maybe KeyRangeDataDiskAssignment] +scrRangeAssignments + = lens _scrRangeAssignments + (\ s a -> s{_scrRangeAssignments = a}) + . _Default + . _Coerce + +-- | The ID of the computation. +scrComputationId :: Lens' StreamingComputationRanges (Maybe Text) +scrComputationId + = lens _scrComputationId + (\ s a -> s{_scrComputationId = a}) + +instance FromJSON StreamingComputationRanges where + parseJSON + = withObject "StreamingComputationRanges" + (\ o -> + StreamingComputationRanges <$> + (o .:? "rangeAssignments" .!= mempty) <*> + (o .:? "computationId")) + +instance ToJSON StreamingComputationRanges where + toJSON StreamingComputationRanges{..} + = object + (catMaybes + [("rangeAssignments" .=) <$> _scrRangeAssignments, + ("computationId" .=) <$> _scrComputationId]) + +-- | Response to a request to list Dataflow jobs. This may be a partial +-- response, depending on the page size in the ListJobsRequest. +-- +-- /See:/ 'listJobsResponse' smart constructor. +data ListJobsResponse = ListJobsResponse + { _ljrNextPageToken :: !(Maybe Text) + , _ljrJobs :: !(Maybe [Maybe Job]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListJobsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ljrNextPageToken' +-- +-- * 'ljrJobs' +listJobsResponse + :: ListJobsResponse +listJobsResponse = + ListJobsResponse + { _ljrNextPageToken = Nothing + , _ljrJobs = Nothing + } + +-- | Set if there may be more results than fit in this response. +ljrNextPageToken :: Lens' ListJobsResponse (Maybe Text) +ljrNextPageToken + = lens _ljrNextPageToken + (\ s a -> s{_ljrNextPageToken = a}) + +-- | A subset of the requested job information. +ljrJobs :: Lens' ListJobsResponse [Maybe Job] +ljrJobs + = lens _ljrJobs (\ s a -> s{_ljrJobs = a}) . _Default + . _Coerce + +instance FromJSON ListJobsResponse where + parseJSON + = withObject "ListJobsResponse" + (\ o -> + ListJobsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "jobs" .!= mempty)) + +instance ToJSON ListJobsResponse where + toJSON ListJobsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ljrNextPageToken, + ("jobs" .=) <$> _ljrJobs]) + +-- | Information about an output of a multi-output DoFn. +-- +-- /See:/ 'multiOutputInfo' smart constructor. +newtype MultiOutputInfo = MultiOutputInfo + { _moiTag :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MultiOutputInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'moiTag' +multiOutputInfo + :: MultiOutputInfo +multiOutputInfo = + MultiOutputInfo + { _moiTag = Nothing + } + +-- | The id of the tag the user code will emit to this output by; this should +-- correspond to the tag of some SideInputInfo. +moiTag :: Lens' MultiOutputInfo (Maybe Text) +moiTag = lens _moiTag (\ s a -> s{_moiTag = a}) + +instance FromJSON MultiOutputInfo where + parseJSON + = withObject "MultiOutputInfo" + (\ o -> MultiOutputInfo <$> (o .:? "tag")) + +instance ToJSON MultiOutputInfo where + toJSON MultiOutputInfo{..} + = object (catMaybes [("tag" .=) <$> _moiTag]) + +-- | An instruction that does a partial group-by-key. One input and one +-- output. +-- +-- /See:/ 'partialGroupByKeyInstruction' smart constructor. +data PartialGroupByKeyInstruction = PartialGroupByKeyInstruction + { _pgbkiValueCombiningFn :: !(Maybe PartialGroupByKeyInstructionValueCombiningFn) + , _pgbkiInput :: !(Maybe (Maybe InstructionInput)) + , _pgbkiInputElementCodec :: !(Maybe PartialGroupByKeyInstructionInputElementCodec) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PartialGroupByKeyInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgbkiValueCombiningFn' +-- +-- * 'pgbkiInput' +-- +-- * 'pgbkiInputElementCodec' +partialGroupByKeyInstruction + :: PartialGroupByKeyInstruction +partialGroupByKeyInstruction = + PartialGroupByKeyInstruction + { _pgbkiValueCombiningFn = Nothing + , _pgbkiInput = Nothing + , _pgbkiInputElementCodec = Nothing + } + +-- | The value combining function to invoke. +pgbkiValueCombiningFn :: Lens' PartialGroupByKeyInstruction (Maybe PartialGroupByKeyInstructionValueCombiningFn) +pgbkiValueCombiningFn + = lens _pgbkiValueCombiningFn + (\ s a -> s{_pgbkiValueCombiningFn = a}) + +-- | Describes the input to the partial group-by-key instruction. +pgbkiInput :: Lens' PartialGroupByKeyInstruction (Maybe (Maybe InstructionInput)) +pgbkiInput + = lens _pgbkiInput (\ s a -> s{_pgbkiInput = a}) + +-- | The codec to use for interpreting an element in the input PTable. +pgbkiInputElementCodec :: Lens' PartialGroupByKeyInstruction (Maybe PartialGroupByKeyInstructionInputElementCodec) +pgbkiInputElementCodec + = lens _pgbkiInputElementCodec + (\ s a -> s{_pgbkiInputElementCodec = a}) + +instance FromJSON PartialGroupByKeyInstruction where + parseJSON + = withObject "PartialGroupByKeyInstruction" + (\ o -> + PartialGroupByKeyInstruction <$> + (o .:? "valueCombiningFn") <*> (o .:? "input") <*> + (o .:? "inputElementCodec")) + +instance ToJSON PartialGroupByKeyInstruction where + toJSON PartialGroupByKeyInstruction{..} + = object + (catMaybes + [("valueCombiningFn" .=) <$> _pgbkiValueCombiningFn, + ("input" .=) <$> _pgbkiInput, + ("inputElementCodec" .=) <$> + _pgbkiInputElementCodec]) + +-- | An instruction that does a ParDo operation. Takes one main input and +-- zero or more side inputs, and produces zero or more outputs. Runs user +-- code. +-- +-- /See:/ 'parDoInstruction' smart constructor. +data ParDoInstruction = ParDoInstruction + { _pdiNumOutputs :: !(Maybe Int32) + , _pdiMultiOutputInfos :: !(Maybe [Maybe MultiOutputInfo]) + , _pdiSideInputs :: !(Maybe [Maybe SideInputInfo]) + , _pdiInput :: !(Maybe (Maybe InstructionInput)) + , _pdiUserFn :: !(Maybe ParDoInstructionUserFn) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParDoInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdiNumOutputs' +-- +-- * 'pdiMultiOutputInfos' +-- +-- * 'pdiSideInputs' +-- +-- * 'pdiInput' +-- +-- * 'pdiUserFn' +parDoInstruction + :: ParDoInstruction +parDoInstruction = + ParDoInstruction + { _pdiNumOutputs = Nothing + , _pdiMultiOutputInfos = Nothing + , _pdiSideInputs = Nothing + , _pdiInput = Nothing + , _pdiUserFn = Nothing + } + +-- | The number of outputs. +pdiNumOutputs :: Lens' ParDoInstruction (Maybe Int32) +pdiNumOutputs + = lens _pdiNumOutputs + (\ s a -> s{_pdiNumOutputs = a}) + +-- | Information about each of the outputs, if user_fn is a MultiDoFn. +pdiMultiOutputInfos :: Lens' ParDoInstruction [Maybe MultiOutputInfo] +pdiMultiOutputInfos + = lens _pdiMultiOutputInfos + (\ s a -> s{_pdiMultiOutputInfos = a}) + . _Default + . _Coerce + +-- | Zero or more side inputs. +pdiSideInputs :: Lens' ParDoInstruction [Maybe SideInputInfo] +pdiSideInputs + = lens _pdiSideInputs + (\ s a -> s{_pdiSideInputs = a}) + . _Default + . _Coerce + +-- | The input. +pdiInput :: Lens' ParDoInstruction (Maybe (Maybe InstructionInput)) +pdiInput = lens _pdiInput (\ s a -> s{_pdiInput = a}) + +-- | The user function to invoke. +pdiUserFn :: Lens' ParDoInstruction (Maybe ParDoInstructionUserFn) +pdiUserFn + = lens _pdiUserFn (\ s a -> s{_pdiUserFn = a}) + +instance FromJSON ParDoInstruction where + parseJSON + = withObject "ParDoInstruction" + (\ o -> + ParDoInstruction <$> + (o .:? "numOutputs") <*> + (o .:? "multiOutputInfos" .!= mempty) + <*> (o .:? "sideInputs" .!= mempty) + <*> (o .:? "input") + <*> (o .:? "userFn")) + +instance ToJSON ParDoInstruction where + toJSON ParDoInstruction{..} + = object + (catMaybes + [("numOutputs" .=) <$> _pdiNumOutputs, + ("multiOutputInfos" .=) <$> _pdiMultiOutputInfos, + ("sideInputs" .=) <$> _pdiSideInputs, + ("input" .=) <$> _pdiInput, + ("userFn" .=) <$> _pdiUserFn]) + +-- | Information about a side input of a DoFn or an input of a SeqDoFn. +-- +-- /See:/ 'sideInputInfo' smart constructor. +data SideInputInfo = SideInputInfo + { _siiTag :: !(Maybe Text) + , _siiKind :: !(Maybe SideInputInfoKind) + , _siiSources :: !(Maybe [Maybe Source]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SideInputInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siiTag' +-- +-- * 'siiKind' +-- +-- * 'siiSources' +sideInputInfo + :: SideInputInfo +sideInputInfo = + SideInputInfo + { _siiTag = Nothing + , _siiKind = Nothing + , _siiSources = Nothing + } + +-- | The id of the tag the user code will access this side input by; this +-- should correspond to the tag of some MultiOutputInfo. +siiTag :: Lens' SideInputInfo (Maybe Text) +siiTag = lens _siiTag (\ s a -> s{_siiTag = a}) + +-- | How to interpret the source element(s) as a side input value. +siiKind :: Lens' SideInputInfo (Maybe SideInputInfoKind) +siiKind = lens _siiKind (\ s a -> s{_siiKind = a}) + +-- | The source(s) to read element(s) from to get the value of this side +-- input. If more than one source, then the elements are taken from the +-- sources, in the specified order if order matters. At least one source is +-- required. +siiSources :: Lens' SideInputInfo [Maybe Source] +siiSources + = lens _siiSources (\ s a -> s{_siiSources = a}) . + _Default + . _Coerce + +instance FromJSON SideInputInfo where + parseJSON + = withObject "SideInputInfo" + (\ o -> + SideInputInfo <$> + (o .:? "tag") <*> (o .:? "kind") <*> + (o .:? "sources" .!= mempty)) + +instance ToJSON SideInputInfo where + toJSON SideInputInfo{..} + = object + (catMaybes + [("tag" .=) <$> _siiTag, ("kind" .=) <$> _siiKind, + ("sources" .=) <$> _siiSources]) + +-- | State family configuration. +-- +-- /See:/ 'stateFamilyConfig' smart constructor. +data StateFamilyConfig = StateFamilyConfig + { _sfcIsRead :: !(Maybe Bool) + , _sfcStateFamily :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StateFamilyConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfcIsRead' +-- +-- * 'sfcStateFamily' +stateFamilyConfig + :: StateFamilyConfig +stateFamilyConfig = + StateFamilyConfig + { _sfcIsRead = Nothing + , _sfcStateFamily = Nothing + } + +-- | If true, this family corresponds to a read operation. +sfcIsRead :: Lens' StateFamilyConfig (Maybe Bool) +sfcIsRead + = lens _sfcIsRead (\ s a -> s{_sfcIsRead = a}) + +-- | The state family value. +sfcStateFamily :: Lens' StateFamilyConfig (Maybe Text) +sfcStateFamily + = lens _sfcStateFamily + (\ s a -> s{_sfcStateFamily = a}) + +instance FromJSON StateFamilyConfig where + parseJSON + = withObject "StateFamilyConfig" + (\ o -> + StateFamilyConfig <$> + (o .:? "isRead") <*> (o .:? "stateFamily")) + +instance ToJSON StateFamilyConfig where + toJSON StateFamilyConfig{..} + = object + (catMaybes + [("isRead" .=) <$> _sfcIsRead, + ("stateFamily" .=) <$> _sfcStateFamily]) + +-- | Describes a particular operation comprising a MapTask. +-- +-- /See:/ 'parallelInstruction' smart constructor. +data ParallelInstruction = ParallelInstruction + { _piRead :: !(Maybe (Maybe ReadInstruction)) + , _piWrite :: !(Maybe (Maybe WriteInstruction)) + , _piParDo :: !(Maybe (Maybe ParDoInstruction)) + , _piPartialGroupByKey :: !(Maybe (Maybe PartialGroupByKeyInstruction)) + , _piOutputs :: !(Maybe [Maybe InstructionOutput]) + , _piName :: !(Maybe Text) + , _piSystemName :: !(Maybe Text) + , _piFlatten :: !(Maybe (Maybe FlattenInstruction)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParallelInstruction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piRead' +-- +-- * 'piWrite' +-- +-- * 'piParDo' +-- +-- * 'piPartialGroupByKey' +-- +-- * 'piOutputs' +-- +-- * 'piName' +-- +-- * 'piSystemName' +-- +-- * 'piFlatten' +parallelInstruction + :: ParallelInstruction +parallelInstruction = + ParallelInstruction + { _piRead = Nothing + , _piWrite = Nothing + , _piParDo = Nothing + , _piPartialGroupByKey = Nothing + , _piOutputs = Nothing + , _piName = Nothing + , _piSystemName = Nothing + , _piFlatten = Nothing + } + +-- | Additional information for Read instructions. +piRead :: Lens' ParallelInstruction (Maybe (Maybe ReadInstruction)) +piRead = lens _piRead (\ s a -> s{_piRead = a}) + +-- | Additional information for Write instructions. +piWrite :: Lens' ParallelInstruction (Maybe (Maybe WriteInstruction)) +piWrite = lens _piWrite (\ s a -> s{_piWrite = a}) + +-- | Additional information for ParDo instructions. +piParDo :: Lens' ParallelInstruction (Maybe (Maybe ParDoInstruction)) +piParDo = lens _piParDo (\ s a -> s{_piParDo = a}) + +-- | Additional information for PartialGroupByKey instructions. +piPartialGroupByKey :: Lens' ParallelInstruction (Maybe (Maybe PartialGroupByKeyInstruction)) +piPartialGroupByKey + = lens _piPartialGroupByKey + (\ s a -> s{_piPartialGroupByKey = a}) + +-- | Describes the outputs of the instruction. +piOutputs :: Lens' ParallelInstruction [Maybe InstructionOutput] +piOutputs + = lens _piOutputs (\ s a -> s{_piOutputs = a}) . + _Default + . _Coerce + +-- | User-provided name of this operation. +piName :: Lens' ParallelInstruction (Maybe Text) +piName = lens _piName (\ s a -> s{_piName = a}) + +-- | System-defined name of this operation. Unique across the workflow. +piSystemName :: Lens' ParallelInstruction (Maybe Text) +piSystemName + = lens _piSystemName (\ s a -> s{_piSystemName = a}) + +-- | Additional information for Flatten instructions. +piFlatten :: Lens' ParallelInstruction (Maybe (Maybe FlattenInstruction)) +piFlatten + = lens _piFlatten (\ s a -> s{_piFlatten = a}) + +instance FromJSON ParallelInstruction where + parseJSON + = withObject "ParallelInstruction" + (\ o -> + ParallelInstruction <$> + (o .:? "read") <*> (o .:? "write") <*> + (o .:? "parDo") + <*> (o .:? "partialGroupByKey") + <*> (o .:? "outputs" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "systemName") + <*> (o .:? "flatten")) + +instance ToJSON ParallelInstruction where + toJSON ParallelInstruction{..} + = object + (catMaybes + [("read" .=) <$> _piRead, ("write" .=) <$> _piWrite, + ("parDo" .=) <$> _piParDo, + ("partialGroupByKey" .=) <$> _piPartialGroupByKey, + ("outputs" .=) <$> _piOutputs, + ("name" .=) <$> _piName, + ("systemName" .=) <$> _piSystemName, + ("flatten" .=) <$> _piFlatten]) + +-- | DEPRECATED in favor of DerivedSource. +-- +-- /See:/ 'sourceSplitShard' smart constructor. +data SourceSplitShard = SourceSplitShard + { _sssDerivationMode :: !(Maybe Text) + , _sssSource :: !(Maybe (Maybe Source)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceSplitShard' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sssDerivationMode' +-- +-- * 'sssSource' +sourceSplitShard + :: SourceSplitShard +sourceSplitShard = + SourceSplitShard + { _sssDerivationMode = Nothing + , _sssSource = Nothing + } + +-- | DEPRECATED +sssDerivationMode :: Lens' SourceSplitShard (Maybe Text) +sssDerivationMode + = lens _sssDerivationMode + (\ s a -> s{_sssDerivationMode = a}) + +-- | DEPRECATED +sssSource :: Lens' SourceSplitShard (Maybe (Maybe Source)) +sssSource + = lens _sssSource (\ s a -> s{_sssSource = a}) + +instance FromJSON SourceSplitShard where + parseJSON + = withObject "SourceSplitShard" + (\ o -> + SourceSplitShard <$> + (o .:? "derivationMode") <*> (o .:? "source")) + +instance ToJSON SourceSplitShard where + toJSON SourceSplitShard{..} + = object + (catMaybes + [("derivationMode" .=) <$> _sssDerivationMode, + ("source" .=) <$> _sssSource]) + +-- | Identifies the location of a custom souce. +-- +-- /See:/ 'customSourceLocation' smart constructor. +newtype CustomSourceLocation = CustomSourceLocation + { _cslStateful :: Maybe Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomSourceLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cslStateful' +customSourceLocation + :: CustomSourceLocation +customSourceLocation = + CustomSourceLocation + { _cslStateful = Nothing + } + +-- | Whether this source is stateful. +cslStateful :: Lens' CustomSourceLocation (Maybe Bool) +cslStateful + = lens _cslStateful (\ s a -> s{_cslStateful = a}) + +instance FromJSON CustomSourceLocation where + parseJSON + = withObject "CustomSourceLocation" + (\ o -> CustomSourceLocation <$> (o .:? "stateful")) + +instance ToJSON CustomSourceLocation where + toJSON CustomSourceLocation{..} + = object + (catMaybes [("stateful" .=) <$> _cslStateful]) + +-- | Additional information about how a Dataflow job will be executed which +-- isn’t contained in the submitted job. +-- +-- /See:/ 'jobExecutionInfo' smart constructor. +newtype JobExecutionInfo = JobExecutionInfo + { _jeiStages :: Maybe JobExecutionInfoStages + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobExecutionInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jeiStages' +jobExecutionInfo + :: JobExecutionInfo +jobExecutionInfo = + JobExecutionInfo + { _jeiStages = Nothing + } + +-- | A mapping from each stage to the information about that stage. +jeiStages :: Lens' JobExecutionInfo (Maybe JobExecutionInfoStages) +jeiStages + = lens _jeiStages (\ s a -> s{_jeiStages = a}) + +instance FromJSON JobExecutionInfo where + parseJSON + = withObject "JobExecutionInfo" + (\ o -> JobExecutionInfo <$> (o .:? "stages")) + +instance ToJSON JobExecutionInfo where + toJSON JobExecutionInfo{..} + = object (catMaybes [("stages" .=) <$> _jeiStages]) + +-- | Describes a particular function to invoke. +-- +-- /See:/ 'seqMapTask' smart constructor. +data SeqMapTask = SeqMapTask + { _smtInputs :: !(Maybe [Maybe SideInputInfo]) + , _smtName :: !(Maybe Text) + , _smtOutputInfos :: !(Maybe [Maybe SeqMapTaskOutputInfo]) + , _smtSystemName :: !(Maybe Text) + , _smtStageName :: !(Maybe Text) + , _smtUserFn :: !(Maybe SeqMapTaskUserFn) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SeqMapTask' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smtInputs' +-- +-- * 'smtName' +-- +-- * 'smtOutputInfos' +-- +-- * 'smtSystemName' +-- +-- * 'smtStageName' +-- +-- * 'smtUserFn' +seqMapTask + :: SeqMapTask +seqMapTask = + SeqMapTask + { _smtInputs = Nothing + , _smtName = Nothing + , _smtOutputInfos = Nothing + , _smtSystemName = Nothing + , _smtStageName = Nothing + , _smtUserFn = Nothing + } + +-- | Information about each of the inputs. +smtInputs :: Lens' SeqMapTask [Maybe SideInputInfo] +smtInputs + = lens _smtInputs (\ s a -> s{_smtInputs = a}) . + _Default + . _Coerce + +-- | The user-provided name of the SeqDo operation. +smtName :: Lens' SeqMapTask (Maybe Text) +smtName = lens _smtName (\ s a -> s{_smtName = a}) + +-- | Information about each of the outputs. +smtOutputInfos :: Lens' SeqMapTask [Maybe SeqMapTaskOutputInfo] +smtOutputInfos + = lens _smtOutputInfos + (\ s a -> s{_smtOutputInfos = a}) + . _Default + . _Coerce + +-- | System-defined name of the SeqDo operation. Unique across the workflow. +smtSystemName :: Lens' SeqMapTask (Maybe Text) +smtSystemName + = lens _smtSystemName + (\ s a -> s{_smtSystemName = a}) + +-- | System-defined name of the stage containing the SeqDo operation. Unique +-- across the workflow. +smtStageName :: Lens' SeqMapTask (Maybe Text) +smtStageName + = lens _smtStageName (\ s a -> s{_smtStageName = a}) + +-- | The user function to invoke. +smtUserFn :: Lens' SeqMapTask (Maybe SeqMapTaskUserFn) +smtUserFn + = lens _smtUserFn (\ s a -> s{_smtUserFn = a}) + +instance FromJSON SeqMapTask where + parseJSON + = withObject "SeqMapTask" + (\ o -> + SeqMapTask <$> + (o .:? "inputs" .!= mempty) <*> (o .:? "name") <*> + (o .:? "outputInfos" .!= mempty) + <*> (o .:? "systemName") + <*> (o .:? "stageName") + <*> (o .:? "userFn")) + +instance ToJSON SeqMapTask where + toJSON SeqMapTask{..} + = object + (catMaybes + [("inputs" .=) <$> _smtInputs, + ("name" .=) <$> _smtName, + ("outputInfos" .=) <$> _smtOutputInfos, + ("systemName" .=) <$> _smtSystemName, + ("stageName" .=) <$> _smtStageName, + ("userFn" .=) <$> _smtUserFn]) + +-- | Response to a request to list job messages. +-- +-- /See:/ 'listJobMessagesResponse' smart constructor. +data ListJobMessagesResponse = ListJobMessagesResponse + { _ljmrJobMessages :: !(Maybe [Maybe JobMessage]) + , _ljmrNextPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListJobMessagesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ljmrJobMessages' +-- +-- * 'ljmrNextPageToken' +listJobMessagesResponse + :: ListJobMessagesResponse +listJobMessagesResponse = + ListJobMessagesResponse + { _ljmrJobMessages = Nothing + , _ljmrNextPageToken = Nothing + } + +-- | Messages in ascending timestamp order. +ljmrJobMessages :: Lens' ListJobMessagesResponse [Maybe JobMessage] +ljmrJobMessages + = lens _ljmrJobMessages + (\ s a -> s{_ljmrJobMessages = a}) + . _Default + . _Coerce + +-- | The token to obtain the next page of results if there are more. +ljmrNextPageToken :: Lens' ListJobMessagesResponse (Maybe Text) +ljmrNextPageToken + = lens _ljmrNextPageToken + (\ s a -> s{_ljmrNextPageToken = a}) + +instance FromJSON ListJobMessagesResponse where + parseJSON + = withObject "ListJobMessagesResponse" + (\ o -> + ListJobMessagesResponse <$> + (o .:? "jobMessages" .!= mempty) <*> + (o .:? "nextPageToken")) + +instance ToJSON ListJobMessagesResponse where + toJSON ListJobMessagesResponse{..} + = object + (catMaybes + [("jobMessages" .=) <$> _ljmrJobMessages, + ("nextPageToken" .=) <$> _ljmrNextPageToken]) + +-- | Data disk assignment information for a specific key-range of a sharded +-- computation. Currently we only support UTF-8 character splits to +-- simplify encoding into JSON. +-- +-- /See:/ 'keyRangeDataDiskAssignment' smart constructor. +data KeyRangeDataDiskAssignment = KeyRangeDataDiskAssignment + { _krddaDataDisk :: !(Maybe Text) + , _krddaStart :: !(Maybe Text) + , _krddaEnd :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KeyRangeDataDiskAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'krddaDataDisk' +-- +-- * 'krddaStart' +-- +-- * 'krddaEnd' +keyRangeDataDiskAssignment + :: KeyRangeDataDiskAssignment +keyRangeDataDiskAssignment = + KeyRangeDataDiskAssignment + { _krddaDataDisk = Nothing + , _krddaStart = Nothing + , _krddaEnd = Nothing + } + +-- | The name of the data disk where data for this range is stored. This name +-- is local to the Google Cloud Platform project and uniquely identifies +-- the disk within that project, for example +-- \"myproject-1014-104817-4c2-harness-0-disk-1\". +krddaDataDisk :: Lens' KeyRangeDataDiskAssignment (Maybe Text) +krddaDataDisk + = lens _krddaDataDisk + (\ s a -> s{_krddaDataDisk = a}) + +-- | The start (inclusive) of the key range. +krddaStart :: Lens' KeyRangeDataDiskAssignment (Maybe Text) +krddaStart + = lens _krddaStart (\ s a -> s{_krddaStart = a}) + +-- | The end (exclusive) of the key range. +krddaEnd :: Lens' KeyRangeDataDiskAssignment (Maybe Text) +krddaEnd = lens _krddaEnd (\ s a -> s{_krddaEnd = a}) + +instance FromJSON KeyRangeDataDiskAssignment where + parseJSON + = withObject "KeyRangeDataDiskAssignment" + (\ o -> + KeyRangeDataDiskAssignment <$> + (o .:? "dataDisk") <*> (o .:? "start") <*> + (o .:? "end")) + +instance ToJSON KeyRangeDataDiskAssignment where + toJSON KeyRangeDataDiskAssignment{..} + = object + (catMaybes + [("dataDisk" .=) <$> _krddaDataDisk, + ("start" .=) <$> _krddaStart, + ("end" .=) <$> _krddaEnd]) + +-- | Identifies a pubsub location to use for transferring data into or out of +-- a streaming Dataflow job. +-- +-- /See:/ 'pubsubLocation' smart constructor. +data PubsubLocation = PubsubLocation + { _plTrackingSubscription :: !(Maybe Text) + , _plDropLateData :: !(Maybe Bool) + , _plTimestampLabel :: !(Maybe Text) + , _plIdLabel :: !(Maybe Text) + , _plTopic :: !(Maybe Text) + , _plSubscription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PubsubLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plTrackingSubscription' +-- +-- * 'plDropLateData' +-- +-- * 'plTimestampLabel' +-- +-- * 'plIdLabel' +-- +-- * 'plTopic' +-- +-- * 'plSubscription' +pubsubLocation + :: PubsubLocation +pubsubLocation = + PubsubLocation + { _plTrackingSubscription = Nothing + , _plDropLateData = Nothing + , _plTimestampLabel = Nothing + , _plIdLabel = Nothing + , _plTopic = Nothing + , _plSubscription = Nothing + } + +-- | If set, specifies the pubsub subscription that will be used for tracking +-- custom time timestamps for watermark estimation. +plTrackingSubscription :: Lens' PubsubLocation (Maybe Text) +plTrackingSubscription + = lens _plTrackingSubscription + (\ s a -> s{_plTrackingSubscription = a}) + +-- | Indicates whether the pipeline allows late-arriving data. +plDropLateData :: Lens' PubsubLocation (Maybe Bool) +plDropLateData + = lens _plDropLateData + (\ s a -> s{_plDropLateData = a}) + +-- | If set, contains a pubsub label from which to extract record timestamps. +-- If left empty, record timestamps will be generated upon arrival. +plTimestampLabel :: Lens' PubsubLocation (Maybe Text) +plTimestampLabel + = lens _plTimestampLabel + (\ s a -> s{_plTimestampLabel = a}) + +-- | If set, contains a pubsub label from which to extract record ids. If +-- left empty, record deduplication will be strictly best effort. +plIdLabel :: Lens' PubsubLocation (Maybe Text) +plIdLabel + = lens _plIdLabel (\ s a -> s{_plIdLabel = a}) + +-- | A pubsub topic, in the form of \"pubsub.googleapis.com\/topics\/ \/\" +plTopic :: Lens' PubsubLocation (Maybe Text) +plTopic = lens _plTopic (\ s a -> s{_plTopic = a}) + +-- | A pubsub subscription, in the form of +-- \"pubsub.googleapis.com\/subscriptions\/ \/\" +plSubscription :: Lens' PubsubLocation (Maybe Text) +plSubscription + = lens _plSubscription + (\ s a -> s{_plSubscription = a}) + +instance FromJSON PubsubLocation where + parseJSON + = withObject "PubsubLocation" + (\ o -> + PubsubLocation <$> + (o .:? "trackingSubscription") <*> + (o .:? "dropLateData") + <*> (o .:? "timestampLabel") + <*> (o .:? "idLabel") + <*> (o .:? "topic") + <*> (o .:? "subscription")) + +instance ToJSON PubsubLocation where + toJSON PubsubLocation{..} + = object + (catMaybes + [("trackingSubscription" .=) <$> + _plTrackingSubscription, + ("dropLateData" .=) <$> _plDropLateData, + ("timestampLabel" .=) <$> _plTimestampLabel, + ("idLabel" .=) <$> _plIdLabel, + ("topic" .=) <$> _plTopic, + ("subscription" .=) <$> _plSubscription]) + +-- | An input of an instruction, as a reference to an output of a producer +-- instruction. +-- +-- /See:/ 'instructionInput' smart constructor. +data InstructionInput = InstructionInput + { _iiProducerInstructionIndex :: !(Maybe Int32) + , _iiOutputNum :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstructionInput' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiProducerInstructionIndex' +-- +-- * 'iiOutputNum' +instructionInput + :: InstructionInput +instructionInput = + InstructionInput + { _iiProducerInstructionIndex = Nothing + , _iiOutputNum = Nothing + } + +-- | The index (origin zero) of the parallel instruction that produces the +-- output to be consumed by this input. This index is relative to the list +-- of instructions in this input\'s instruction\'s containing MapTask. +iiProducerInstructionIndex :: Lens' InstructionInput (Maybe Int32) +iiProducerInstructionIndex + = lens _iiProducerInstructionIndex + (\ s a -> s{_iiProducerInstructionIndex = a}) + +-- | The output index (origin zero) within the producer. +iiOutputNum :: Lens' InstructionInput (Maybe Int32) +iiOutputNum + = lens _iiOutputNum (\ s a -> s{_iiOutputNum = a}) + +instance FromJSON InstructionInput where + parseJSON + = withObject "InstructionInput" + (\ o -> + InstructionInput <$> + (o .:? "producerInstructionIndex") <*> + (o .:? "outputNum")) + +instance ToJSON InstructionInput where + toJSON InstructionInput{..} + = object + (catMaybes + [("producerInstructionIndex" .=) <$> + _iiProducerInstructionIndex, + ("outputNum" .=) <$> _iiOutputNum]) + +-- | Represents the operation to split a high-level Source specification into +-- bundles (parts for parallel processing). At a high level, splitting of a +-- source into bundles happens as follows: SourceSplitRequest is applied to +-- the source. If it returns SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further +-- splitting happens and the source is used \"as is\". Otherwise, splitting +-- is applied recursively to each produced DerivedSource. As an +-- optimization, for any Source, if its does_not_need_splitting is true, +-- the framework assumes that splitting this source would return +-- SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn\'t initiate a +-- SourceSplitRequest. This applies both to the initial source being split +-- and to bundles produced from it. +-- +-- /See:/ 'sourceSplitRequest' smart constructor. +data SourceSplitRequest = SourceSplitRequest + { _ssrSource :: !(Maybe (Maybe Source)) + , _ssrOptions :: !(Maybe (Maybe SourceSplitOptions)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceSplitRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssrSource' +-- +-- * 'ssrOptions' +sourceSplitRequest + :: SourceSplitRequest +sourceSplitRequest = + SourceSplitRequest + { _ssrSource = Nothing + , _ssrOptions = Nothing + } + +-- | Specification of the source to be split. +ssrSource :: Lens' SourceSplitRequest (Maybe (Maybe Source)) +ssrSource + = lens _ssrSource (\ s a -> s{_ssrSource = a}) + +-- | Hints for tuning the splitting process. +ssrOptions :: Lens' SourceSplitRequest (Maybe (Maybe SourceSplitOptions)) +ssrOptions + = lens _ssrOptions (\ s a -> s{_ssrOptions = a}) + +instance FromJSON SourceSplitRequest where + parseJSON + = withObject "SourceSplitRequest" + (\ o -> + SourceSplitRequest <$> + (o .:? "source") <*> (o .:? "options")) + +instance ToJSON SourceSplitRequest where + toJSON SourceSplitRequest{..} + = object + (catMaybes + [("source" .=) <$> _ssrSource, + ("options" .=) <$> _ssrOptions]) + +-- | A work item that represents the different operations that can be +-- performed on a user-defined Source specification. +-- +-- /See:/ 'sourceOperationRequest' smart constructor. +data SourceOperationRequest = SourceOperationRequest + { _sSplit :: !(Maybe (Maybe SourceSplitRequest)) + , _sGetMetadata :: !(Maybe (Maybe SourceGetMetadataRequest)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceOperationRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sSplit' +-- +-- * 'sGetMetadata' +sourceOperationRequest + :: SourceOperationRequest +sourceOperationRequest = + SourceOperationRequest + { _sSplit = Nothing + , _sGetMetadata = Nothing + } + +-- | Information about a request to split a source. +sSplit :: Lens' SourceOperationRequest (Maybe (Maybe SourceSplitRequest)) +sSplit = lens _sSplit (\ s a -> s{_sSplit = a}) + +-- | Information about a request to get metadata about a source. +sGetMetadata :: Lens' SourceOperationRequest (Maybe (Maybe SourceGetMetadataRequest)) +sGetMetadata + = lens _sGetMetadata (\ s a -> s{_sGetMetadata = a}) + +instance FromJSON SourceOperationRequest where + parseJSON + = withObject "SourceOperationRequest" + (\ o -> + SourceOperationRequest <$> + (o .:? "split") <*> (o .:? "getMetadata")) + +instance ToJSON SourceOperationRequest where + toJSON SourceOperationRequest{..} + = object + (catMaybes + [("split" .=) <$> _sSplit, + ("getMetadata" .=) <$> _sGetMetadata]) + +-- | Response to a request to lease WorkItems. +-- +-- /See:/ 'leaseWorkItemResponse' smart constructor. +newtype LeaseWorkItemResponse = LeaseWorkItemResponse + { _lwirWorkItems :: Maybe [Maybe WorkItem] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaseWorkItemResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lwirWorkItems' +leaseWorkItemResponse + :: LeaseWorkItemResponse +leaseWorkItemResponse = + LeaseWorkItemResponse + { _lwirWorkItems = Nothing + } + +-- | A list of the leased WorkItems. +lwirWorkItems :: Lens' LeaseWorkItemResponse [Maybe WorkItem] +lwirWorkItems + = lens _lwirWorkItems + (\ s a -> s{_lwirWorkItems = a}) + . _Default + . _Coerce + +instance FromJSON LeaseWorkItemResponse where + parseJSON + = withObject "LeaseWorkItemResponse" + (\ o -> + LeaseWorkItemResponse <$> + (o .:? "workItems" .!= mempty)) + +instance ToJSON LeaseWorkItemResponse where + toJSON LeaseWorkItemResponse{..} + = object + (catMaybes [("workItems" .=) <$> _lwirWorkItems]) + +-- | Position defines a position within a collection of data. The value can +-- be either the end position, a key (used with ordered collections), a +-- byte offset, or a record index. +-- +-- /See:/ 'position' smart constructor. +data Position = Position + { _pByteOffset :: !(Maybe Int64) + , _pConcatPosition :: !(Maybe (Maybe ConcatPosition)) + , _pRecordIndex :: !(Maybe Int64) + , _pShufflePosition :: !(Maybe Text) + , _pKey :: !(Maybe Text) + , _pEnd :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Position' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pByteOffset' +-- +-- * 'pConcatPosition' +-- +-- * 'pRecordIndex' +-- +-- * 'pShufflePosition' +-- +-- * 'pKey' +-- +-- * 'pEnd' +position + :: Position +position = + Position + { _pByteOffset = Nothing + , _pConcatPosition = Nothing + , _pRecordIndex = Nothing + , _pShufflePosition = Nothing + , _pKey = Nothing + , _pEnd = Nothing + } + +-- | Position is a byte offset. +pByteOffset :: Lens' Position (Maybe Int64) +pByteOffset + = lens _pByteOffset (\ s a -> s{_pByteOffset = a}) + +-- | CloudPosition is a concat position. +pConcatPosition :: Lens' Position (Maybe (Maybe ConcatPosition)) +pConcatPosition + = lens _pConcatPosition + (\ s a -> s{_pConcatPosition = a}) + +-- | Position is a record index. +pRecordIndex :: Lens' Position (Maybe Int64) +pRecordIndex + = lens _pRecordIndex (\ s a -> s{_pRecordIndex = a}) + +-- | CloudPosition is a base64 encoded BatchShufflePosition (with FIXED +-- sharding). +pShufflePosition :: Lens' Position (Maybe Text) +pShufflePosition + = lens _pShufflePosition + (\ s a -> s{_pShufflePosition = a}) + +-- | Position is a string key, ordered lexicographically. +pKey :: Lens' Position (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | Position is past all other positions. Also useful for the end position +-- of an unbounded range. +pEnd :: Lens' Position (Maybe Bool) +pEnd = lens _pEnd (\ s a -> s{_pEnd = a}) + +instance FromJSON Position where + parseJSON + = withObject "Position" + (\ o -> + Position <$> + (o .:? "byteOffset") <*> (o .:? "concatPosition") <*> + (o .:? "recordIndex") + <*> (o .:? "shufflePosition") + <*> (o .:? "key") + <*> (o .:? "end")) + +instance ToJSON Position where + toJSON Position{..} + = object + (catMaybes + [("byteOffset" .=) <$> _pByteOffset, + ("concatPosition" .=) <$> _pConcatPosition, + ("recordIndex" .=) <$> _pRecordIndex, + ("shufflePosition" .=) <$> _pShufflePosition, + ("key" .=) <$> _pKey, ("end" .=) <$> _pEnd]) diff --git a/gogol-dataflow/gen/Network/Google/Dataflow/Types/Sum.hs b/gogol-dataflow/gen/Network/Google/Dataflow/Types/Sum.hs new file mode 100644 index 000000000..d8bd25b26 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Dataflow/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Dataflow.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Dataflow.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs new file mode 100644 index 000000000..8ae650af3 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Create.hs @@ -0,0 +1,251 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a dataflow job. +-- +-- /See:/ for @DataflowProjectsJobsCreate@. +module Dataflow.Projects.Jobs.Create + ( + -- * REST Resource + ProjectsJobsCreateAPI + + -- * Creating a Request + , projectsJobsCreate + , ProjectsJobsCreate + + -- * Request Lenses + , pjcXgafv + , pjcQuotaUser + , pjcPrettyPrint + , pjcUploadProtocol + , pjcPp + , pjcAccessToken + , pjcUploadType + , pjcBearerToken + , pjcKey + , pjcView + , pjcProjectId + , pjcOauthToken + , pjcReplaceJobId + , pjcFields + , pjcCallback + , pjcAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsCreate@ which the +-- 'ProjectsJobsCreate' request conforms to. +type ProjectsJobsCreateAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + QueryParam "view" Text :> + QueryParam "replaceJobId" Text :> Post '[JSON] Job + +-- | Creates a dataflow job. +-- +-- /See:/ 'projectsJobsCreate' smart constructor. +data ProjectsJobsCreate = ProjectsJobsCreate + { _pjcXgafv :: !(Maybe Text) + , _pjcQuotaUser :: !(Maybe Text) + , _pjcPrettyPrint :: !Bool + , _pjcUploadProtocol :: !(Maybe Text) + , _pjcPp :: !Bool + , _pjcAccessToken :: !(Maybe Text) + , _pjcUploadType :: !(Maybe Text) + , _pjcBearerToken :: !(Maybe Text) + , _pjcKey :: !(Maybe Text) + , _pjcView :: !(Maybe Text) + , _pjcProjectId :: !Text + , _pjcOauthToken :: !(Maybe Text) + , _pjcReplaceJobId :: !(Maybe Text) + , _pjcFields :: !(Maybe Text) + , _pjcCallback :: !(Maybe Text) + , _pjcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjcXgafv' +-- +-- * 'pjcQuotaUser' +-- +-- * 'pjcPrettyPrint' +-- +-- * 'pjcUploadProtocol' +-- +-- * 'pjcPp' +-- +-- * 'pjcAccessToken' +-- +-- * 'pjcUploadType' +-- +-- * 'pjcBearerToken' +-- +-- * 'pjcKey' +-- +-- * 'pjcView' +-- +-- * 'pjcProjectId' +-- +-- * 'pjcOauthToken' +-- +-- * 'pjcReplaceJobId' +-- +-- * 'pjcFields' +-- +-- * 'pjcCallback' +-- +-- * 'pjcAlt' +projectsJobsCreate + :: Text -- ^ 'projectId' + -> ProjectsJobsCreate +projectsJobsCreate pPjcProjectId_ = + ProjectsJobsCreate + { _pjcXgafv = Nothing + , _pjcQuotaUser = Nothing + , _pjcPrettyPrint = True + , _pjcUploadProtocol = Nothing + , _pjcPp = True + , _pjcAccessToken = Nothing + , _pjcUploadType = Nothing + , _pjcBearerToken = Nothing + , _pjcKey = Nothing + , _pjcView = Nothing + , _pjcProjectId = pPjcProjectId_ + , _pjcOauthToken = Nothing + , _pjcReplaceJobId = Nothing + , _pjcFields = Nothing + , _pjcCallback = Nothing + , _pjcAlt = "json" + } + +-- | V1 error format. +pjcXgafv :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcXgafv = lens _pjcXgafv (\ s a -> s{_pjcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjcQuotaUser :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcQuotaUser + = lens _pjcQuotaUser (\ s a -> s{_pjcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjcPrettyPrint :: Lens' ProjectsJobsCreate' Bool +pjcPrettyPrint + = lens _pjcPrettyPrint + (\ s a -> s{_pjcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjcUploadProtocol :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcUploadProtocol + = lens _pjcUploadProtocol + (\ s a -> s{_pjcUploadProtocol = a}) + +-- | Pretty-print response. +pjcPp :: Lens' ProjectsJobsCreate' Bool +pjcPp = lens _pjcPp (\ s a -> s{_pjcPp = a}) + +-- | OAuth access token. +pjcAccessToken :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcAccessToken + = lens _pjcAccessToken + (\ s a -> s{_pjcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjcUploadType :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcUploadType + = lens _pjcUploadType + (\ s a -> s{_pjcUploadType = a}) + +-- | OAuth bearer token. +pjcBearerToken :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcBearerToken + = lens _pjcBearerToken + (\ s a -> s{_pjcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjcKey :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcKey = lens _pjcKey (\ s a -> s{_pjcKey = a}) + +-- | Level of information requested in response. +pjcView :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcView = lens _pjcView (\ s a -> s{_pjcView = a}) + +-- | The project which owns the job. +pjcProjectId :: Lens' ProjectsJobsCreate' Text +pjcProjectId + = lens _pjcProjectId (\ s a -> s{_pjcProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjcOauthToken :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcOauthToken + = lens _pjcOauthToken + (\ s a -> s{_pjcOauthToken = a}) + +-- | DEPRECATED. This field is now on the Job message. +pjcReplaceJobId :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcReplaceJobId + = lens _pjcReplaceJobId + (\ s a -> s{_pjcReplaceJobId = a}) + +-- | Selector specifying which fields to include in a partial response. +pjcFields :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcFields + = lens _pjcFields (\ s a -> s{_pjcFields = a}) + +-- | JSONP +pjcCallback :: Lens' ProjectsJobsCreate' (Maybe Text) +pjcCallback + = lens _pjcCallback (\ s a -> s{_pjcCallback = a}) + +-- | Data format for response. +pjcAlt :: Lens' ProjectsJobsCreate' Text +pjcAlt = lens _pjcAlt (\ s a -> s{_pjcAlt = a}) + +instance GoogleRequest ProjectsJobsCreate' where + type Rs ProjectsJobsCreate' = Job + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsCreate{..} + = go _pjcXgafv _pjcQuotaUser _pjcPrettyPrint + _pjcUploadProtocol + _pjcPp + _pjcAccessToken + _pjcUploadType + _pjcBearerToken + _pjcKey + _pjcView + _pjcProjectId + _pjcOauthToken + _pjcReplaceJobId + _pjcFields + _pjcCallback + _pjcAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsCreateAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs new file mode 100644 index 000000000..76393dcaa --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Get.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the state of the specified dataflow job. +-- +-- /See:/ for @DataflowProjectsJobsGet@. +module Dataflow.Projects.Jobs.Get + ( + -- * REST Resource + ProjectsJobsGetAPI + + -- * Creating a Request + , projectsJobsGet + , ProjectsJobsGet + + -- * Request Lenses + , pjgXgafv + , pjgQuotaUser + , pjgPrettyPrint + , pjgJobId + , pjgUploadProtocol + , pjgPp + , pjgAccessToken + , pjgUploadType + , pjgBearerToken + , pjgKey + , pjgView + , pjgProjectId + , pjgOauthToken + , pjgFields + , pjgCallback + , pjgAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsGet@ which the +-- 'ProjectsJobsGet' request conforms to. +type ProjectsJobsGetAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + QueryParam "view" Text :> Get '[JSON] Job + +-- | Gets the state of the specified dataflow job. +-- +-- /See:/ 'projectsJobsGet' smart constructor. +data ProjectsJobsGet = ProjectsJobsGet + { _pjgXgafv :: !(Maybe Text) + , _pjgQuotaUser :: !(Maybe Text) + , _pjgPrettyPrint :: !Bool + , _pjgJobId :: !Text + , _pjgUploadProtocol :: !(Maybe Text) + , _pjgPp :: !Bool + , _pjgAccessToken :: !(Maybe Text) + , _pjgUploadType :: !(Maybe Text) + , _pjgBearerToken :: !(Maybe Text) + , _pjgKey :: !(Maybe Text) + , _pjgView :: !(Maybe Text) + , _pjgProjectId :: !Text + , _pjgOauthToken :: !(Maybe Text) + , _pjgFields :: !(Maybe Text) + , _pjgCallback :: !(Maybe Text) + , _pjgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjgXgafv' +-- +-- * 'pjgQuotaUser' +-- +-- * 'pjgPrettyPrint' +-- +-- * 'pjgJobId' +-- +-- * 'pjgUploadProtocol' +-- +-- * 'pjgPp' +-- +-- * 'pjgAccessToken' +-- +-- * 'pjgUploadType' +-- +-- * 'pjgBearerToken' +-- +-- * 'pjgKey' +-- +-- * 'pjgView' +-- +-- * 'pjgProjectId' +-- +-- * 'pjgOauthToken' +-- +-- * 'pjgFields' +-- +-- * 'pjgCallback' +-- +-- * 'pjgAlt' +projectsJobsGet + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsGet +projectsJobsGet pPjgJobId_ pPjgProjectId_ = + ProjectsJobsGet + { _pjgXgafv = Nothing + , _pjgQuotaUser = Nothing + , _pjgPrettyPrint = True + , _pjgJobId = pPjgJobId_ + , _pjgUploadProtocol = Nothing + , _pjgPp = True + , _pjgAccessToken = Nothing + , _pjgUploadType = Nothing + , _pjgBearerToken = Nothing + , _pjgKey = Nothing + , _pjgView = Nothing + , _pjgProjectId = pPjgProjectId_ + , _pjgOauthToken = Nothing + , _pjgFields = Nothing + , _pjgCallback = Nothing + , _pjgAlt = "json" + } + +-- | V1 error format. +pjgXgafv :: Lens' ProjectsJobsGet' (Maybe Text) +pjgXgafv = lens _pjgXgafv (\ s a -> s{_pjgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjgQuotaUser :: Lens' ProjectsJobsGet' (Maybe Text) +pjgQuotaUser + = lens _pjgQuotaUser (\ s a -> s{_pjgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjgPrettyPrint :: Lens' ProjectsJobsGet' Bool +pjgPrettyPrint + = lens _pjgPrettyPrint + (\ s a -> s{_pjgPrettyPrint = a}) + +-- | Identifies a single job. +pjgJobId :: Lens' ProjectsJobsGet' Text +pjgJobId = lens _pjgJobId (\ s a -> s{_pjgJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjgUploadProtocol :: Lens' ProjectsJobsGet' (Maybe Text) +pjgUploadProtocol + = lens _pjgUploadProtocol + (\ s a -> s{_pjgUploadProtocol = a}) + +-- | Pretty-print response. +pjgPp :: Lens' ProjectsJobsGet' Bool +pjgPp = lens _pjgPp (\ s a -> s{_pjgPp = a}) + +-- | OAuth access token. +pjgAccessToken :: Lens' ProjectsJobsGet' (Maybe Text) +pjgAccessToken + = lens _pjgAccessToken + (\ s a -> s{_pjgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjgUploadType :: Lens' ProjectsJobsGet' (Maybe Text) +pjgUploadType + = lens _pjgUploadType + (\ s a -> s{_pjgUploadType = a}) + +-- | OAuth bearer token. +pjgBearerToken :: Lens' ProjectsJobsGet' (Maybe Text) +pjgBearerToken + = lens _pjgBearerToken + (\ s a -> s{_pjgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjgKey :: Lens' ProjectsJobsGet' (Maybe Text) +pjgKey = lens _pjgKey (\ s a -> s{_pjgKey = a}) + +-- | Level of information requested in response. +pjgView :: Lens' ProjectsJobsGet' (Maybe Text) +pjgView = lens _pjgView (\ s a -> s{_pjgView = a}) + +-- | The project which owns the job. +pjgProjectId :: Lens' ProjectsJobsGet' Text +pjgProjectId + = lens _pjgProjectId (\ s a -> s{_pjgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjgOauthToken :: Lens' ProjectsJobsGet' (Maybe Text) +pjgOauthToken + = lens _pjgOauthToken + (\ s a -> s{_pjgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pjgFields :: Lens' ProjectsJobsGet' (Maybe Text) +pjgFields + = lens _pjgFields (\ s a -> s{_pjgFields = a}) + +-- | JSONP +pjgCallback :: Lens' ProjectsJobsGet' (Maybe Text) +pjgCallback + = lens _pjgCallback (\ s a -> s{_pjgCallback = a}) + +-- | Data format for response. +pjgAlt :: Lens' ProjectsJobsGet' Text +pjgAlt = lens _pjgAlt (\ s a -> s{_pjgAlt = a}) + +instance GoogleRequest ProjectsJobsGet' where + type Rs ProjectsJobsGet' = Job + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsGet{..} + = go _pjgXgafv _pjgQuotaUser _pjgPrettyPrint + _pjgJobId + _pjgUploadProtocol + _pjgPp + _pjgAccessToken + _pjgUploadType + _pjgBearerToken + _pjgKey + _pjgView + _pjgProjectId + _pjgOauthToken + _pjgFields + _pjgCallback + _pjgAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsJobsGetAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs new file mode 100644 index 000000000..b96ec0d58 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/GetMetrics.hs @@ -0,0 +1,258 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Request the job status. +-- +-- /See:/ for @DataflowProjectsJobsGetMetrics@. +module Dataflow.Projects.Jobs.GetMetrics + ( + -- * REST Resource + ProjectsJobsGetMetricsAPI + + -- * Creating a Request + , projectsJobsGetMetrics + , ProjectsJobsGetMetrics + + -- * Request Lenses + , pjgmXgafv + , pjgmQuotaUser + , pjgmPrettyPrint + , pjgmJobId + , pjgmUploadProtocol + , pjgmStartTime + , pjgmPp + , pjgmAccessToken + , pjgmUploadType + , pjgmBearerToken + , pjgmKey + , pjgmProjectId + , pjgmOauthToken + , pjgmFields + , pjgmCallback + , pjgmAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsGetMetrics@ which the +-- 'ProjectsJobsGetMetrics' request conforms to. +type ProjectsJobsGetMetricsAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + "metrics" :> + QueryParam "startTime" Text :> Get '[JSON] JobMetrics + +-- | Request the job status. +-- +-- /See:/ 'projectsJobsGetMetrics' smart constructor. +data ProjectsJobsGetMetrics = ProjectsJobsGetMetrics + { _pjgmXgafv :: !(Maybe Text) + , _pjgmQuotaUser :: !(Maybe Text) + , _pjgmPrettyPrint :: !Bool + , _pjgmJobId :: !Text + , _pjgmUploadProtocol :: !(Maybe Text) + , _pjgmStartTime :: !(Maybe Text) + , _pjgmPp :: !Bool + , _pjgmAccessToken :: !(Maybe Text) + , _pjgmUploadType :: !(Maybe Text) + , _pjgmBearerToken :: !(Maybe Text) + , _pjgmKey :: !(Maybe Text) + , _pjgmProjectId :: !Text + , _pjgmOauthToken :: !(Maybe Text) + , _pjgmFields :: !(Maybe Text) + , _pjgmCallback :: !(Maybe Text) + , _pjgmAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsGetMetrics'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjgmXgafv' +-- +-- * 'pjgmQuotaUser' +-- +-- * 'pjgmPrettyPrint' +-- +-- * 'pjgmJobId' +-- +-- * 'pjgmUploadProtocol' +-- +-- * 'pjgmStartTime' +-- +-- * 'pjgmPp' +-- +-- * 'pjgmAccessToken' +-- +-- * 'pjgmUploadType' +-- +-- * 'pjgmBearerToken' +-- +-- * 'pjgmKey' +-- +-- * 'pjgmProjectId' +-- +-- * 'pjgmOauthToken' +-- +-- * 'pjgmFields' +-- +-- * 'pjgmCallback' +-- +-- * 'pjgmAlt' +projectsJobsGetMetrics + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsGetMetrics +projectsJobsGetMetrics pPjgmJobId_ pPjgmProjectId_ = + ProjectsJobsGetMetrics + { _pjgmXgafv = Nothing + , _pjgmQuotaUser = Nothing + , _pjgmPrettyPrint = True + , _pjgmJobId = pPjgmJobId_ + , _pjgmUploadProtocol = Nothing + , _pjgmStartTime = Nothing + , _pjgmPp = True + , _pjgmAccessToken = Nothing + , _pjgmUploadType = Nothing + , _pjgmBearerToken = Nothing + , _pjgmKey = Nothing + , _pjgmProjectId = pPjgmProjectId_ + , _pjgmOauthToken = Nothing + , _pjgmFields = Nothing + , _pjgmCallback = Nothing + , _pjgmAlt = "json" + } + +-- | V1 error format. +pjgmXgafv :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmXgafv + = lens _pjgmXgafv (\ s a -> s{_pjgmXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjgmQuotaUser :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmQuotaUser + = lens _pjgmQuotaUser + (\ s a -> s{_pjgmQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjgmPrettyPrint :: Lens' ProjectsJobsGetMetrics' Bool +pjgmPrettyPrint + = lens _pjgmPrettyPrint + (\ s a -> s{_pjgmPrettyPrint = a}) + +-- | The job to get messages for. +pjgmJobId :: Lens' ProjectsJobsGetMetrics' Text +pjgmJobId + = lens _pjgmJobId (\ s a -> s{_pjgmJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjgmUploadProtocol :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmUploadProtocol + = lens _pjgmUploadProtocol + (\ s a -> s{_pjgmUploadProtocol = a}) + +-- | Return only metric data that has changed since this time. Default is to +-- return all information about all metrics for the job. +pjgmStartTime :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmStartTime + = lens _pjgmStartTime + (\ s a -> s{_pjgmStartTime = a}) + +-- | Pretty-print response. +pjgmPp :: Lens' ProjectsJobsGetMetrics' Bool +pjgmPp = lens _pjgmPp (\ s a -> s{_pjgmPp = a}) + +-- | OAuth access token. +pjgmAccessToken :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmAccessToken + = lens _pjgmAccessToken + (\ s a -> s{_pjgmAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjgmUploadType :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmUploadType + = lens _pjgmUploadType + (\ s a -> s{_pjgmUploadType = a}) + +-- | OAuth bearer token. +pjgmBearerToken :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmBearerToken + = lens _pjgmBearerToken + (\ s a -> s{_pjgmBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjgmKey :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmKey = lens _pjgmKey (\ s a -> s{_pjgmKey = a}) + +-- | A project id. +pjgmProjectId :: Lens' ProjectsJobsGetMetrics' Text +pjgmProjectId + = lens _pjgmProjectId + (\ s a -> s{_pjgmProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjgmOauthToken :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmOauthToken + = lens _pjgmOauthToken + (\ s a -> s{_pjgmOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pjgmFields :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmFields + = lens _pjgmFields (\ s a -> s{_pjgmFields = a}) + +-- | JSONP +pjgmCallback :: Lens' ProjectsJobsGetMetrics' (Maybe Text) +pjgmCallback + = lens _pjgmCallback (\ s a -> s{_pjgmCallback = a}) + +-- | Data format for response. +pjgmAlt :: Lens' ProjectsJobsGetMetrics' Text +pjgmAlt = lens _pjgmAlt (\ s a -> s{_pjgmAlt = a}) + +instance GoogleRequest ProjectsJobsGetMetrics' where + type Rs ProjectsJobsGetMetrics' = JobMetrics + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsGetMetrics{..} + = go _pjgmXgafv _pjgmQuotaUser _pjgmPrettyPrint + _pjgmJobId + _pjgmUploadProtocol + _pjgmStartTime + _pjgmPp + _pjgmAccessToken + _pjgmUploadType + _pjgmBearerToken + _pjgmKey + _pjgmProjectId + _pjgmOauthToken + _pjgmFields + _pjgmCallback + _pjgmAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsGetMetricsAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs new file mode 100644 index 000000000..256f89b1d --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/List.hs @@ -0,0 +1,266 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the jobs of a project +-- +-- /See:/ for @DataflowProjectsJobsList@. +module Dataflow.Projects.Jobs.List + ( + -- * REST Resource + ProjectsJobsListAPI + + -- * Creating a Request + , projectsJobsList + , ProjectsJobsList + + -- * Request Lenses + , pjlXgafv + , pjlQuotaUser + , pjlPrettyPrint + , pjlUploadProtocol + , pjlPp + , pjlAccessToken + , pjlUploadType + , pjlBearerToken + , pjlKey + , pjlView + , pjlPageToken + , pjlProjectId + , pjlOauthToken + , pjlPageSize + , pjlFields + , pjlCallback + , pjlAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsList@ which the +-- 'ProjectsJobsList' request conforms to. +type ProjectsJobsListAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + QueryParam "view" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListJobsResponse + +-- | List the jobs of a project +-- +-- /See:/ 'projectsJobsList' smart constructor. +data ProjectsJobsList = ProjectsJobsList + { _pjlXgafv :: !(Maybe Text) + , _pjlQuotaUser :: !(Maybe Text) + , _pjlPrettyPrint :: !Bool + , _pjlUploadProtocol :: !(Maybe Text) + , _pjlPp :: !Bool + , _pjlAccessToken :: !(Maybe Text) + , _pjlUploadType :: !(Maybe Text) + , _pjlBearerToken :: !(Maybe Text) + , _pjlKey :: !(Maybe Text) + , _pjlView :: !(Maybe Text) + , _pjlPageToken :: !(Maybe Text) + , _pjlProjectId :: !Text + , _pjlOauthToken :: !(Maybe Text) + , _pjlPageSize :: !(Maybe Int32) + , _pjlFields :: !(Maybe Text) + , _pjlCallback :: !(Maybe Text) + , _pjlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjlXgafv' +-- +-- * 'pjlQuotaUser' +-- +-- * 'pjlPrettyPrint' +-- +-- * 'pjlUploadProtocol' +-- +-- * 'pjlPp' +-- +-- * 'pjlAccessToken' +-- +-- * 'pjlUploadType' +-- +-- * 'pjlBearerToken' +-- +-- * 'pjlKey' +-- +-- * 'pjlView' +-- +-- * 'pjlPageToken' +-- +-- * 'pjlProjectId' +-- +-- * 'pjlOauthToken' +-- +-- * 'pjlPageSize' +-- +-- * 'pjlFields' +-- +-- * 'pjlCallback' +-- +-- * 'pjlAlt' +projectsJobsList + :: Text -- ^ 'projectId' + -> ProjectsJobsList +projectsJobsList pPjlProjectId_ = + ProjectsJobsList + { _pjlXgafv = Nothing + , _pjlQuotaUser = Nothing + , _pjlPrettyPrint = True + , _pjlUploadProtocol = Nothing + , _pjlPp = True + , _pjlAccessToken = Nothing + , _pjlUploadType = Nothing + , _pjlBearerToken = Nothing + , _pjlKey = Nothing + , _pjlView = Nothing + , _pjlPageToken = Nothing + , _pjlProjectId = pPjlProjectId_ + , _pjlOauthToken = Nothing + , _pjlPageSize = Nothing + , _pjlFields = Nothing + , _pjlCallback = Nothing + , _pjlAlt = "json" + } + +-- | V1 error format. +pjlXgafv :: Lens' ProjectsJobsList' (Maybe Text) +pjlXgafv = lens _pjlXgafv (\ s a -> s{_pjlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjlQuotaUser :: Lens' ProjectsJobsList' (Maybe Text) +pjlQuotaUser + = lens _pjlQuotaUser (\ s a -> s{_pjlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjlPrettyPrint :: Lens' ProjectsJobsList' Bool +pjlPrettyPrint + = lens _pjlPrettyPrint + (\ s a -> s{_pjlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjlUploadProtocol :: Lens' ProjectsJobsList' (Maybe Text) +pjlUploadProtocol + = lens _pjlUploadProtocol + (\ s a -> s{_pjlUploadProtocol = a}) + +-- | Pretty-print response. +pjlPp :: Lens' ProjectsJobsList' Bool +pjlPp = lens _pjlPp (\ s a -> s{_pjlPp = a}) + +-- | OAuth access token. +pjlAccessToken :: Lens' ProjectsJobsList' (Maybe Text) +pjlAccessToken + = lens _pjlAccessToken + (\ s a -> s{_pjlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjlUploadType :: Lens' ProjectsJobsList' (Maybe Text) +pjlUploadType + = lens _pjlUploadType + (\ s a -> s{_pjlUploadType = a}) + +-- | OAuth bearer token. +pjlBearerToken :: Lens' ProjectsJobsList' (Maybe Text) +pjlBearerToken + = lens _pjlBearerToken + (\ s a -> s{_pjlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjlKey :: Lens' ProjectsJobsList' (Maybe Text) +pjlKey = lens _pjlKey (\ s a -> s{_pjlKey = a}) + +-- | Level of information requested in response. Default is SUMMARY. +pjlView :: Lens' ProjectsJobsList' (Maybe Text) +pjlView = lens _pjlView (\ s a -> s{_pjlView = a}) + +-- | Set this to the \'next_page_token\' field of a previous response to +-- request additional results in a long list. +pjlPageToken :: Lens' ProjectsJobsList' (Maybe Text) +pjlPageToken + = lens _pjlPageToken (\ s a -> s{_pjlPageToken = a}) + +-- | The project which owns the jobs. +pjlProjectId :: Lens' ProjectsJobsList' Text +pjlProjectId + = lens _pjlProjectId (\ s a -> s{_pjlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjlOauthToken :: Lens' ProjectsJobsList' (Maybe Text) +pjlOauthToken + = lens _pjlOauthToken + (\ s a -> s{_pjlOauthToken = a}) + +-- | If there are many jobs, limit response to at most this many. The actual +-- number of jobs returned will be the lesser of max_responses and an +-- unspecified server-defined limit. +pjlPageSize :: Lens' ProjectsJobsList' (Maybe Int32) +pjlPageSize + = lens _pjlPageSize (\ s a -> s{_pjlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +pjlFields :: Lens' ProjectsJobsList' (Maybe Text) +pjlFields + = lens _pjlFields (\ s a -> s{_pjlFields = a}) + +-- | JSONP +pjlCallback :: Lens' ProjectsJobsList' (Maybe Text) +pjlCallback + = lens _pjlCallback (\ s a -> s{_pjlCallback = a}) + +-- | Data format for response. +pjlAlt :: Lens' ProjectsJobsList' Text +pjlAlt = lens _pjlAlt (\ s a -> s{_pjlAlt = a}) + +instance GoogleRequest ProjectsJobsList' where + type Rs ProjectsJobsList' = ListJobsResponse + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsList{..} + = go _pjlXgafv _pjlQuotaUser _pjlPrettyPrint + _pjlUploadProtocol + _pjlPp + _pjlAccessToken + _pjlUploadType + _pjlBearerToken + _pjlKey + _pjlView + _pjlPageToken + _pjlProjectId + _pjlOauthToken + _pjlPageSize + _pjlFields + _pjlCallback + _pjlAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsListAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs new file mode 100644 index 000000000..50e384264 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Messages/List.hs @@ -0,0 +1,315 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Request the job status. +-- +-- /See:/ for @DataflowProjectsJobsMessagesList@. +module Dataflow.Projects.Jobs.Messages.List + ( + -- * REST Resource + ProjectsJobsMessagesListAPI + + -- * Creating a Request + , projectsJobsMessagesList + , ProjectsJobsMessagesList + + -- * Request Lenses + , pjmlXgafv + , pjmlQuotaUser + , pjmlPrettyPrint + , pjmlJobId + , pjmlUploadProtocol + , pjmlStartTime + , pjmlPp + , pjmlAccessToken + , pjmlUploadType + , pjmlBearerToken + , pjmlKey + , pjmlEndTime + , pjmlMinimumImportance + , pjmlPageToken + , pjmlProjectId + , pjmlOauthToken + , pjmlPageSize + , pjmlFields + , pjmlCallback + , pjmlAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsMessagesList@ which the +-- 'ProjectsJobsMessagesList' request conforms to. +type ProjectsJobsMessagesListAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + "messages" :> + QueryParam "startTime" Text :> + QueryParam "endTime" Text :> + QueryParam "minimumImportance" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListJobMessagesResponse + +-- | Request the job status. +-- +-- /See:/ 'projectsJobsMessagesList' smart constructor. +data ProjectsJobsMessagesList = ProjectsJobsMessagesList + { _pjmlXgafv :: !(Maybe Text) + , _pjmlQuotaUser :: !(Maybe Text) + , _pjmlPrettyPrint :: !Bool + , _pjmlJobId :: !Text + , _pjmlUploadProtocol :: !(Maybe Text) + , _pjmlStartTime :: !(Maybe Text) + , _pjmlPp :: !Bool + , _pjmlAccessToken :: !(Maybe Text) + , _pjmlUploadType :: !(Maybe Text) + , _pjmlBearerToken :: !(Maybe Text) + , _pjmlKey :: !(Maybe Text) + , _pjmlEndTime :: !(Maybe Text) + , _pjmlMinimumImportance :: !(Maybe Text) + , _pjmlPageToken :: !(Maybe Text) + , _pjmlProjectId :: !Text + , _pjmlOauthToken :: !(Maybe Text) + , _pjmlPageSize :: !(Maybe Int32) + , _pjmlFields :: !(Maybe Text) + , _pjmlCallback :: !(Maybe Text) + , _pjmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsMessagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjmlXgafv' +-- +-- * 'pjmlQuotaUser' +-- +-- * 'pjmlPrettyPrint' +-- +-- * 'pjmlJobId' +-- +-- * 'pjmlUploadProtocol' +-- +-- * 'pjmlStartTime' +-- +-- * 'pjmlPp' +-- +-- * 'pjmlAccessToken' +-- +-- * 'pjmlUploadType' +-- +-- * 'pjmlBearerToken' +-- +-- * 'pjmlKey' +-- +-- * 'pjmlEndTime' +-- +-- * 'pjmlMinimumImportance' +-- +-- * 'pjmlPageToken' +-- +-- * 'pjmlProjectId' +-- +-- * 'pjmlOauthToken' +-- +-- * 'pjmlPageSize' +-- +-- * 'pjmlFields' +-- +-- * 'pjmlCallback' +-- +-- * 'pjmlAlt' +projectsJobsMessagesList + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsMessagesList +projectsJobsMessagesList pPjmlJobId_ pPjmlProjectId_ = + ProjectsJobsMessagesList + { _pjmlXgafv = Nothing + , _pjmlQuotaUser = Nothing + , _pjmlPrettyPrint = True + , _pjmlJobId = pPjmlJobId_ + , _pjmlUploadProtocol = Nothing + , _pjmlStartTime = Nothing + , _pjmlPp = True + , _pjmlAccessToken = Nothing + , _pjmlUploadType = Nothing + , _pjmlBearerToken = Nothing + , _pjmlKey = Nothing + , _pjmlEndTime = Nothing + , _pjmlMinimumImportance = Nothing + , _pjmlPageToken = Nothing + , _pjmlProjectId = pPjmlProjectId_ + , _pjmlOauthToken = Nothing + , _pjmlPageSize = Nothing + , _pjmlFields = Nothing + , _pjmlCallback = Nothing + , _pjmlAlt = "json" + } + +-- | V1 error format. +pjmlXgafv :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlXgafv + = lens _pjmlXgafv (\ s a -> s{_pjmlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjmlQuotaUser :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlQuotaUser + = lens _pjmlQuotaUser + (\ s a -> s{_pjmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjmlPrettyPrint :: Lens' ProjectsJobsMessagesList' Bool +pjmlPrettyPrint + = lens _pjmlPrettyPrint + (\ s a -> s{_pjmlPrettyPrint = a}) + +-- | The job to get messages about. +pjmlJobId :: Lens' ProjectsJobsMessagesList' Text +pjmlJobId + = lens _pjmlJobId (\ s a -> s{_pjmlJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjmlUploadProtocol :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlUploadProtocol + = lens _pjmlUploadProtocol + (\ s a -> s{_pjmlUploadProtocol = a}) + +-- | If specified, return only messages with timestamps >= start_time. The +-- default is the job creation time (i.e. beginning of messages). +pjmlStartTime :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlStartTime + = lens _pjmlStartTime + (\ s a -> s{_pjmlStartTime = a}) + +-- | Pretty-print response. +pjmlPp :: Lens' ProjectsJobsMessagesList' Bool +pjmlPp = lens _pjmlPp (\ s a -> s{_pjmlPp = a}) + +-- | OAuth access token. +pjmlAccessToken :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlAccessToken + = lens _pjmlAccessToken + (\ s a -> s{_pjmlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjmlUploadType :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlUploadType + = lens _pjmlUploadType + (\ s a -> s{_pjmlUploadType = a}) + +-- | OAuth bearer token. +pjmlBearerToken :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlBearerToken + = lens _pjmlBearerToken + (\ s a -> s{_pjmlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjmlKey :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlKey = lens _pjmlKey (\ s a -> s{_pjmlKey = a}) + +-- | Return only messages with timestamps \< end_time. The default is now +-- (i.e. return up to the latest messages available). +pjmlEndTime :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlEndTime + = lens _pjmlEndTime (\ s a -> s{_pjmlEndTime = a}) + +-- | Filter to only get messages with importance >= level +pjmlMinimumImportance :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlMinimumImportance + = lens _pjmlMinimumImportance + (\ s a -> s{_pjmlMinimumImportance = a}) + +-- | If supplied, this should be the value of next_page_token returned by an +-- earlier call. This will cause the next page of results to be returned. +pjmlPageToken :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlPageToken + = lens _pjmlPageToken + (\ s a -> s{_pjmlPageToken = a}) + +-- | A project id. +pjmlProjectId :: Lens' ProjectsJobsMessagesList' Text +pjmlProjectId + = lens _pjmlProjectId + (\ s a -> s{_pjmlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjmlOauthToken :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlOauthToken + = lens _pjmlOauthToken + (\ s a -> s{_pjmlOauthToken = a}) + +-- | If specified, determines the maximum number of messages to return. If +-- unspecified, the service may choose an appropriate default, or may +-- return an arbitrarily large number of results. +pjmlPageSize :: Lens' ProjectsJobsMessagesList' (Maybe Int32) +pjmlPageSize + = lens _pjmlPageSize (\ s a -> s{_pjmlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +pjmlFields :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlFields + = lens _pjmlFields (\ s a -> s{_pjmlFields = a}) + +-- | JSONP +pjmlCallback :: Lens' ProjectsJobsMessagesList' (Maybe Text) +pjmlCallback + = lens _pjmlCallback (\ s a -> s{_pjmlCallback = a}) + +-- | Data format for response. +pjmlAlt :: Lens' ProjectsJobsMessagesList' Text +pjmlAlt = lens _pjmlAlt (\ s a -> s{_pjmlAlt = a}) + +instance GoogleRequest ProjectsJobsMessagesList' + where + type Rs ProjectsJobsMessagesList' = + ListJobMessagesResponse + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsMessagesList{..} + = go _pjmlXgafv _pjmlQuotaUser _pjmlPrettyPrint + _pjmlJobId + _pjmlUploadProtocol + _pjmlStartTime + _pjmlPp + _pjmlAccessToken + _pjmlUploadType + _pjmlBearerToken + _pjmlKey + _pjmlEndTime + _pjmlMinimumImportance + _pjmlPageToken + _pjmlProjectId + _pjmlOauthToken + _pjmlPageSize + _pjmlFields + _pjmlCallback + _pjmlAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsMessagesListAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs new file mode 100644 index 000000000..f2f0e77c4 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Update.hs @@ -0,0 +1,238 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the state of an existing dataflow job. +-- +-- /See:/ for @DataflowProjectsJobsUpdate@. +module Dataflow.Projects.Jobs.Update + ( + -- * REST Resource + ProjectsJobsUpdateAPI + + -- * Creating a Request + , projectsJobsUpdate + , ProjectsJobsUpdate + + -- * Request Lenses + , pjuXgafv + , pjuQuotaUser + , pjuPrettyPrint + , pjuJobId + , pjuUploadProtocol + , pjuPp + , pjuAccessToken + , pjuUploadType + , pjuBearerToken + , pjuKey + , pjuProjectId + , pjuOauthToken + , pjuFields + , pjuCallback + , pjuAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsUpdate@ which the +-- 'ProjectsJobsUpdate' request conforms to. +type ProjectsJobsUpdateAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> Capture "jobId" Text :> Put '[JSON] Job + +-- | Updates the state of an existing dataflow job. +-- +-- /See:/ 'projectsJobsUpdate' smart constructor. +data ProjectsJobsUpdate = ProjectsJobsUpdate + { _pjuXgafv :: !(Maybe Text) + , _pjuQuotaUser :: !(Maybe Text) + , _pjuPrettyPrint :: !Bool + , _pjuJobId :: !Text + , _pjuUploadProtocol :: !(Maybe Text) + , _pjuPp :: !Bool + , _pjuAccessToken :: !(Maybe Text) + , _pjuUploadType :: !(Maybe Text) + , _pjuBearerToken :: !(Maybe Text) + , _pjuKey :: !(Maybe Text) + , _pjuProjectId :: !Text + , _pjuOauthToken :: !(Maybe Text) + , _pjuFields :: !(Maybe Text) + , _pjuCallback :: !(Maybe Text) + , _pjuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjuXgafv' +-- +-- * 'pjuQuotaUser' +-- +-- * 'pjuPrettyPrint' +-- +-- * 'pjuJobId' +-- +-- * 'pjuUploadProtocol' +-- +-- * 'pjuPp' +-- +-- * 'pjuAccessToken' +-- +-- * 'pjuUploadType' +-- +-- * 'pjuBearerToken' +-- +-- * 'pjuKey' +-- +-- * 'pjuProjectId' +-- +-- * 'pjuOauthToken' +-- +-- * 'pjuFields' +-- +-- * 'pjuCallback' +-- +-- * 'pjuAlt' +projectsJobsUpdate + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsUpdate +projectsJobsUpdate pPjuJobId_ pPjuProjectId_ = + ProjectsJobsUpdate + { _pjuXgafv = Nothing + , _pjuQuotaUser = Nothing + , _pjuPrettyPrint = True + , _pjuJobId = pPjuJobId_ + , _pjuUploadProtocol = Nothing + , _pjuPp = True + , _pjuAccessToken = Nothing + , _pjuUploadType = Nothing + , _pjuBearerToken = Nothing + , _pjuKey = Nothing + , _pjuProjectId = pPjuProjectId_ + , _pjuOauthToken = Nothing + , _pjuFields = Nothing + , _pjuCallback = Nothing + , _pjuAlt = "json" + } + +-- | V1 error format. +pjuXgafv :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuXgafv = lens _pjuXgafv (\ s a -> s{_pjuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjuQuotaUser :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuQuotaUser + = lens _pjuQuotaUser (\ s a -> s{_pjuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjuPrettyPrint :: Lens' ProjectsJobsUpdate' Bool +pjuPrettyPrint + = lens _pjuPrettyPrint + (\ s a -> s{_pjuPrettyPrint = a}) + +-- | Identifies a single job. +pjuJobId :: Lens' ProjectsJobsUpdate' Text +pjuJobId = lens _pjuJobId (\ s a -> s{_pjuJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjuUploadProtocol :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuUploadProtocol + = lens _pjuUploadProtocol + (\ s a -> s{_pjuUploadProtocol = a}) + +-- | Pretty-print response. +pjuPp :: Lens' ProjectsJobsUpdate' Bool +pjuPp = lens _pjuPp (\ s a -> s{_pjuPp = a}) + +-- | OAuth access token. +pjuAccessToken :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuAccessToken + = lens _pjuAccessToken + (\ s a -> s{_pjuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjuUploadType :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuUploadType + = lens _pjuUploadType + (\ s a -> s{_pjuUploadType = a}) + +-- | OAuth bearer token. +pjuBearerToken :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuBearerToken + = lens _pjuBearerToken + (\ s a -> s{_pjuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjuKey :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuKey = lens _pjuKey (\ s a -> s{_pjuKey = a}) + +-- | The project which owns the job. +pjuProjectId :: Lens' ProjectsJobsUpdate' Text +pjuProjectId + = lens _pjuProjectId (\ s a -> s{_pjuProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjuOauthToken :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuOauthToken + = lens _pjuOauthToken + (\ s a -> s{_pjuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pjuFields :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuFields + = lens _pjuFields (\ s a -> s{_pjuFields = a}) + +-- | JSONP +pjuCallback :: Lens' ProjectsJobsUpdate' (Maybe Text) +pjuCallback + = lens _pjuCallback (\ s a -> s{_pjuCallback = a}) + +-- | Data format for response. +pjuAlt :: Lens' ProjectsJobsUpdate' Text +pjuAlt = lens _pjuAlt (\ s a -> s{_pjuAlt = a}) + +instance GoogleRequest ProjectsJobsUpdate' where + type Rs ProjectsJobsUpdate' = Job + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsUpdate{..} + = go _pjuXgafv _pjuQuotaUser _pjuPrettyPrint + _pjuJobId + _pjuUploadProtocol + _pjuPp + _pjuAccessToken + _pjuUploadType + _pjuBearerToken + _pjuKey + _pjuProjectId + _pjuOauthToken + _pjuFields + _pjuCallback + _pjuAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsUpdateAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs new file mode 100644 index 000000000..df618d07d --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/Lease.hs @@ -0,0 +1,248 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Leases a dataflow WorkItem to run. +-- +-- /See:/ for @DataflowProjectsJobsWorkItemsLease@. +module Dataflow.Projects.Jobs.WorkItems.Lease + ( + -- * REST Resource + ProjectsJobsWorkItemsLeaseAPI + + -- * Creating a Request + , projectsJobsWorkItemsLease + , ProjectsJobsWorkItemsLease + + -- * Request Lenses + , pjwilXgafv + , pjwilQuotaUser + , pjwilPrettyPrint + , pjwilJobId + , pjwilUploadProtocol + , pjwilPp + , pjwilAccessToken + , pjwilUploadType + , pjwilBearerToken + , pjwilKey + , pjwilProjectId + , pjwilOauthToken + , pjwilFields + , pjwilCallback + , pjwilAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsWorkItemsLease@ which the +-- 'ProjectsJobsWorkItemsLease' request conforms to. +type ProjectsJobsWorkItemsLeaseAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + "workItems:lease" :> + Post '[JSON] LeaseWorkItemResponse + +-- | Leases a dataflow WorkItem to run. +-- +-- /See:/ 'projectsJobsWorkItemsLease' smart constructor. +data ProjectsJobsWorkItemsLease = ProjectsJobsWorkItemsLease + { _pjwilXgafv :: !(Maybe Text) + , _pjwilQuotaUser :: !(Maybe Text) + , _pjwilPrettyPrint :: !Bool + , _pjwilJobId :: !Text + , _pjwilUploadProtocol :: !(Maybe Text) + , _pjwilPp :: !Bool + , _pjwilAccessToken :: !(Maybe Text) + , _pjwilUploadType :: !(Maybe Text) + , _pjwilBearerToken :: !(Maybe Text) + , _pjwilKey :: !(Maybe Text) + , _pjwilProjectId :: !Text + , _pjwilOauthToken :: !(Maybe Text) + , _pjwilFields :: !(Maybe Text) + , _pjwilCallback :: !(Maybe Text) + , _pjwilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsWorkItemsLease'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjwilXgafv' +-- +-- * 'pjwilQuotaUser' +-- +-- * 'pjwilPrettyPrint' +-- +-- * 'pjwilJobId' +-- +-- * 'pjwilUploadProtocol' +-- +-- * 'pjwilPp' +-- +-- * 'pjwilAccessToken' +-- +-- * 'pjwilUploadType' +-- +-- * 'pjwilBearerToken' +-- +-- * 'pjwilKey' +-- +-- * 'pjwilProjectId' +-- +-- * 'pjwilOauthToken' +-- +-- * 'pjwilFields' +-- +-- * 'pjwilCallback' +-- +-- * 'pjwilAlt' +projectsJobsWorkItemsLease + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsWorkItemsLease +projectsJobsWorkItemsLease pPjwilJobId_ pPjwilProjectId_ = + ProjectsJobsWorkItemsLease + { _pjwilXgafv = Nothing + , _pjwilQuotaUser = Nothing + , _pjwilPrettyPrint = True + , _pjwilJobId = pPjwilJobId_ + , _pjwilUploadProtocol = Nothing + , _pjwilPp = True + , _pjwilAccessToken = Nothing + , _pjwilUploadType = Nothing + , _pjwilBearerToken = Nothing + , _pjwilKey = Nothing + , _pjwilProjectId = pPjwilProjectId_ + , _pjwilOauthToken = Nothing + , _pjwilFields = Nothing + , _pjwilCallback = Nothing + , _pjwilAlt = "json" + } + +-- | V1 error format. +pjwilXgafv :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilXgafv + = lens _pjwilXgafv (\ s a -> s{_pjwilXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjwilQuotaUser :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilQuotaUser + = lens _pjwilQuotaUser + (\ s a -> s{_pjwilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjwilPrettyPrint :: Lens' ProjectsJobsWorkItemsLease' Bool +pjwilPrettyPrint + = lens _pjwilPrettyPrint + (\ s a -> s{_pjwilPrettyPrint = a}) + +-- | Identifies the workflow job this worker belongs to. +pjwilJobId :: Lens' ProjectsJobsWorkItemsLease' Text +pjwilJobId + = lens _pjwilJobId (\ s a -> s{_pjwilJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjwilUploadProtocol :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilUploadProtocol + = lens _pjwilUploadProtocol + (\ s a -> s{_pjwilUploadProtocol = a}) + +-- | Pretty-print response. +pjwilPp :: Lens' ProjectsJobsWorkItemsLease' Bool +pjwilPp = lens _pjwilPp (\ s a -> s{_pjwilPp = a}) + +-- | OAuth access token. +pjwilAccessToken :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilAccessToken + = lens _pjwilAccessToken + (\ s a -> s{_pjwilAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjwilUploadType :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilUploadType + = lens _pjwilUploadType + (\ s a -> s{_pjwilUploadType = a}) + +-- | OAuth bearer token. +pjwilBearerToken :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilBearerToken + = lens _pjwilBearerToken + (\ s a -> s{_pjwilBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjwilKey :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilKey = lens _pjwilKey (\ s a -> s{_pjwilKey = a}) + +-- | Identifies the project this worker belongs to. +pjwilProjectId :: Lens' ProjectsJobsWorkItemsLease' Text +pjwilProjectId + = lens _pjwilProjectId + (\ s a -> s{_pjwilProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjwilOauthToken :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilOauthToken + = lens _pjwilOauthToken + (\ s a -> s{_pjwilOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pjwilFields :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilFields + = lens _pjwilFields (\ s a -> s{_pjwilFields = a}) + +-- | JSONP +pjwilCallback :: Lens' ProjectsJobsWorkItemsLease' (Maybe Text) +pjwilCallback + = lens _pjwilCallback + (\ s a -> s{_pjwilCallback = a}) + +-- | Data format for response. +pjwilAlt :: Lens' ProjectsJobsWorkItemsLease' Text +pjwilAlt = lens _pjwilAlt (\ s a -> s{_pjwilAlt = a}) + +instance GoogleRequest ProjectsJobsWorkItemsLease' + where + type Rs ProjectsJobsWorkItemsLease' = + LeaseWorkItemResponse + request = requestWithRoute defReq dataflowURL + requestWithRoute r u ProjectsJobsWorkItemsLease{..} + = go _pjwilXgafv _pjwilQuotaUser _pjwilPrettyPrint + _pjwilJobId + _pjwilUploadProtocol + _pjwilPp + _pjwilAccessToken + _pjwilUploadType + _pjwilBearerToken + _pjwilKey + _pjwilProjectId + _pjwilOauthToken + _pjwilFields + _pjwilCallback + _pjwilAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsWorkItemsLeaseAPI) + r + u diff --git a/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs new file mode 100644 index 000000000..aceac36b4 --- /dev/null +++ b/gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs @@ -0,0 +1,251 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Reports the status of dataflow WorkItems leased by a worker. +-- +-- /See:/ for @DataflowProjectsJobsWorkItemsReportStatus@. +module Dataflow.Projects.Jobs.WorkItems.ReportStatus + ( + -- * REST Resource + ProjectsJobsWorkItemsReportStatusAPI + + -- * Creating a Request + , projectsJobsWorkItemsReportStatus + , ProjectsJobsWorkItemsReportStatus + + -- * Request Lenses + , pjwirsXgafv + , pjwirsQuotaUser + , pjwirsPrettyPrint + , pjwirsJobId + , pjwirsUploadProtocol + , pjwirsPp + , pjwirsAccessToken + , pjwirsUploadType + , pjwirsBearerToken + , pjwirsKey + , pjwirsProjectId + , pjwirsOauthToken + , pjwirsFields + , pjwirsCallback + , pjwirsAlt + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @DataflowProjectsJobsWorkItemsReportStatus@ which the +-- 'ProjectsJobsWorkItemsReportStatus' request conforms to. +type ProjectsJobsWorkItemsReportStatusAPI = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "jobs" :> + Capture "jobId" Text :> + "workItems:reportStatus" :> + Post '[JSON] ReportWorkItemStatusResponse + +-- | Reports the status of dataflow WorkItems leased by a worker. +-- +-- /See:/ 'projectsJobsWorkItemsReportStatus' smart constructor. +data ProjectsJobsWorkItemsReportStatus = ProjectsJobsWorkItemsReportStatus + { _pjwirsXgafv :: !(Maybe Text) + , _pjwirsQuotaUser :: !(Maybe Text) + , _pjwirsPrettyPrint :: !Bool + , _pjwirsJobId :: !Text + , _pjwirsUploadProtocol :: !(Maybe Text) + , _pjwirsPp :: !Bool + , _pjwirsAccessToken :: !(Maybe Text) + , _pjwirsUploadType :: !(Maybe Text) + , _pjwirsBearerToken :: !(Maybe Text) + , _pjwirsKey :: !(Maybe Text) + , _pjwirsProjectId :: !Text + , _pjwirsOauthToken :: !(Maybe Text) + , _pjwirsFields :: !(Maybe Text) + , _pjwirsCallback :: !(Maybe Text) + , _pjwirsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsJobsWorkItemsReportStatus'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pjwirsXgafv' +-- +-- * 'pjwirsQuotaUser' +-- +-- * 'pjwirsPrettyPrint' +-- +-- * 'pjwirsJobId' +-- +-- * 'pjwirsUploadProtocol' +-- +-- * 'pjwirsPp' +-- +-- * 'pjwirsAccessToken' +-- +-- * 'pjwirsUploadType' +-- +-- * 'pjwirsBearerToken' +-- +-- * 'pjwirsKey' +-- +-- * 'pjwirsProjectId' +-- +-- * 'pjwirsOauthToken' +-- +-- * 'pjwirsFields' +-- +-- * 'pjwirsCallback' +-- +-- * 'pjwirsAlt' +projectsJobsWorkItemsReportStatus + :: Text -- ^ 'jobId' + -> Text -- ^ 'projectId' + -> ProjectsJobsWorkItemsReportStatus +projectsJobsWorkItemsReportStatus pPjwirsJobId_ pPjwirsProjectId_ = + ProjectsJobsWorkItemsReportStatus + { _pjwirsXgafv = Nothing + , _pjwirsQuotaUser = Nothing + , _pjwirsPrettyPrint = True + , _pjwirsJobId = pPjwirsJobId_ + , _pjwirsUploadProtocol = Nothing + , _pjwirsPp = True + , _pjwirsAccessToken = Nothing + , _pjwirsUploadType = Nothing + , _pjwirsBearerToken = Nothing + , _pjwirsKey = Nothing + , _pjwirsProjectId = pPjwirsProjectId_ + , _pjwirsOauthToken = Nothing + , _pjwirsFields = Nothing + , _pjwirsCallback = Nothing + , _pjwirsAlt = "json" + } + +-- | V1 error format. +pjwirsXgafv :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsXgafv + = lens _pjwirsXgafv (\ s a -> s{_pjwirsXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pjwirsQuotaUser :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsQuotaUser + = lens _pjwirsQuotaUser + (\ s a -> s{_pjwirsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pjwirsPrettyPrint :: Lens' ProjectsJobsWorkItemsReportStatus' Bool +pjwirsPrettyPrint + = lens _pjwirsPrettyPrint + (\ s a -> s{_pjwirsPrettyPrint = a}) + +-- | The job which the WorkItem is part of. +pjwirsJobId :: Lens' ProjectsJobsWorkItemsReportStatus' Text +pjwirsJobId + = lens _pjwirsJobId (\ s a -> s{_pjwirsJobId = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pjwirsUploadProtocol :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsUploadProtocol + = lens _pjwirsUploadProtocol + (\ s a -> s{_pjwirsUploadProtocol = a}) + +-- | Pretty-print response. +pjwirsPp :: Lens' ProjectsJobsWorkItemsReportStatus' Bool +pjwirsPp = lens _pjwirsPp (\ s a -> s{_pjwirsPp = a}) + +-- | OAuth access token. +pjwirsAccessToken :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsAccessToken + = lens _pjwirsAccessToken + (\ s a -> s{_pjwirsAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pjwirsUploadType :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsUploadType + = lens _pjwirsUploadType + (\ s a -> s{_pjwirsUploadType = a}) + +-- | OAuth bearer token. +pjwirsBearerToken :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsBearerToken + = lens _pjwirsBearerToken + (\ s a -> s{_pjwirsBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pjwirsKey :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsKey + = lens _pjwirsKey (\ s a -> s{_pjwirsKey = a}) + +-- | The project which owns the WorkItem\'s job. +pjwirsProjectId :: Lens' ProjectsJobsWorkItemsReportStatus' Text +pjwirsProjectId + = lens _pjwirsProjectId + (\ s a -> s{_pjwirsProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pjwirsOauthToken :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsOauthToken + = lens _pjwirsOauthToken + (\ s a -> s{_pjwirsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pjwirsFields :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsFields + = lens _pjwirsFields (\ s a -> s{_pjwirsFields = a}) + +-- | JSONP +pjwirsCallback :: Lens' ProjectsJobsWorkItemsReportStatus' (Maybe Text) +pjwirsCallback + = lens _pjwirsCallback + (\ s a -> s{_pjwirsCallback = a}) + +-- | Data format for response. +pjwirsAlt :: Lens' ProjectsJobsWorkItemsReportStatus' Text +pjwirsAlt + = lens _pjwirsAlt (\ s a -> s{_pjwirsAlt = a}) + +instance GoogleRequest + ProjectsJobsWorkItemsReportStatus' where + type Rs ProjectsJobsWorkItemsReportStatus' = + ReportWorkItemStatusResponse + request = requestWithRoute defReq dataflowURL + requestWithRoute r u + ProjectsJobsWorkItemsReportStatus{..} + = go _pjwirsXgafv _pjwirsQuotaUser _pjwirsPrettyPrint + _pjwirsJobId + _pjwirsUploadProtocol + _pjwirsPp + _pjwirsAccessToken + _pjwirsUploadType + _pjwirsBearerToken + _pjwirsKey + _pjwirsProjectId + _pjwirsOauthToken + _pjwirsFields + _pjwirsCallback + _pjwirsAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsJobsWorkItemsReportStatusAPI) + r + u diff --git a/gogol-dataflow/gogol-dataflow.cabal b/gogol-dataflow/gogol-dataflow.cabal new file mode 100644 index 000000000..54707a4b9 --- /dev/null +++ b/gogol-dataflow/gogol-dataflow.cabal @@ -0,0 +1,50 @@ +name: gogol-dataflow +version: 0.0.1 +synopsis: Google Dataflow API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Google Dataflow API. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Dataflow + , Network.Google.Dataflow.Types + , Network.Google.Resource.Dataflow.Projects.Jobs.Create + , Network.Google.Resource.Dataflow.Projects.Jobs.Get + , Network.Google.Resource.Dataflow.Projects.Jobs.GetMetrics + , Network.Google.Resource.Dataflow.Projects.Jobs.List + , Network.Google.Resource.Dataflow.Projects.Jobs.Messages.List + , Network.Google.Resource.Dataflow.Projects.Jobs.Update + , Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.Lease + , Network.Google.Resource.Dataflow.Projects.Jobs.WorkItems.ReportStatus + + other-modules: + Network.Google.Dataflow.Types.Product + , Network.Google.Dataflow.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-dataflow/src/.gitkeep b/gogol-dataflow/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-datastore/LICENSE b/gogol-datastore/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-datastore/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-datastore/Makefile b/gogol-datastore/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-datastore/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-datastore/README.md b/gogol-datastore/README.md new file mode 100644 index 000000000..cf353299b --- /dev/null +++ b/gogol-datastore/README.md @@ -0,0 +1,28 @@ +# gogol-datastore + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Datastore API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-datastore` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-datastore/Setup.hs b/gogol-datastore/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-datastore/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-datastore/gen/Network/Google/Datastore.hs b/gogol-datastore/gen/Network/Google/Datastore.hs new file mode 100644 index 000000000..5f715ec2a --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Datastore.hs @@ -0,0 +1,307 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Datastore +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for accessing Google Cloud Datastore. +-- +-- /See:/ +module Network.Google.Datastore + ( + -- * API + DatastoreAPI + , datastoreAPI + , datastoreURL + + -- * Service Methods + + -- * REST Resources + + -- ** DatastoreDatasetsAllocateIds + , module Datastore.Datasets.AllocateIds + + -- ** DatastoreDatasetsBeginTransaction + , module Datastore.Datasets.BeginTransaction + + -- ** DatastoreDatasetsCommit + , module Datastore.Datasets.Commit + + -- ** DatastoreDatasetsLookup + , module Datastore.Datasets.Lookup + + -- ** DatastoreDatasetsRollback + , module Datastore.Datasets.Rollback + + -- ** DatastoreDatasetsRunQuery + , module Datastore.Datasets.RunQuery + + -- * Types + + -- ** RollbackRequest + , RollbackRequest + , rollbackRequest + , rrTransaction + + -- ** PartitionId + , PartitionId + , partitionId + , piNamespace + , piDatasetId + + -- ** QueryResultBatch + , QueryResultBatch + , queryResultBatch + , qrbSkippedResults + , qrbEntityResultType + , qrbEntityResults + , qrbMoreResults + , qrbEndCursor + + -- ** Property + , Property + , property + , pKeyValue + , pBlobKeyValue + , pDateTimeValue + , pIntegerValue + , pEntityValue + , pDoubleValue + , pStringValue + , pListValue + , pIndexed + , pBooleanValue + , pMeaning + , pBlobValue + + -- ** AllocateIdsRequest + , AllocateIdsRequest + , allocateIdsRequest + , airKeys + + -- ** BeginTransactionRequest + , BeginTransactionRequest + , beginTransactionRequest + , btrIsolationLevel + + -- ** RunQueryRequest + , RunQueryRequest + , runQueryRequest + , rqrPartitionId + , rqrGqlQuery + , rqrQuery + , rqrReadOptions + + -- ** CompositeFilter + , CompositeFilter + , compositeFilter + , cfOperator + , cfFilters + + -- ** BeginTransactionResponse + , BeginTransactionResponse + , beginTransactionResponse + , btrTransaction + , btrHeader + + -- ** RunQueryResponse + , RunQueryResponse + , runQueryResponse + , rqrBatch + , rqrHeader + + -- ** MutationResult + , MutationResult + , mutationResult + , mrInsertAutoIdKeys + , mrIndexUpdates + + -- ** GqlQuery + , GqlQuery + , gqlQuery + , gqAllowLiteral + , gqNumberArgs + , gqQueryString + , gqNameArgs + + -- ** AllocateIdsResponse + , AllocateIdsResponse + , allocateIdsResponse + , aKeys + , aHeader + + -- ** Value + , Value + , value + , vKeyValue + , vBlobKeyValue + , vDateTimeValue + , vIntegerValue + , vEntityValue + , vDoubleValue + , vStringValue + , vListValue + , vIndexed + , vBooleanValue + , vMeaning + , vBlobValue + + -- ** LookupRequest + , LookupRequest + , lookupRequest + , lrKeys + , lrReadOptions + + -- ** Mutation + , Mutation + , mutation + , mInsert + , mForce + , mInsertAutoId + , mUpsert + , mDelete + , mUpdate + + -- ** ResponseHeader + , ResponseHeader + , responseHeader + , rhKind + + -- ** GqlQueryArg + , GqlQueryArg + , gqlQueryArg + , gqaCursor + , gqaValue + , gqaName + + -- ** PropertyReference + , PropertyReference + , propertyReference + , prName + + -- ** KeyPathElement + , KeyPathElement + , keyPathElement + , kpeKind + , kpeName + , kpeId + + -- ** Key + , Key + , key + , keyPartitionId + , keyPath + + -- ** PropertyFilter + , PropertyFilter + , propertyFilter + , pfProperty + , pfOperator + , pfValue + + -- ** CommitResponse + , CommitResponse + , commitResponse + , crMutationResult + , crHeader + + -- ** EntityResult + , EntityResult + , entityResult + , erEntity + + -- ** Query + , Query + , query + , qGroupBy + , qStartCursor + , qOffset + , qEndCursor + , qLimit + , qProjection + , qFilter + , qKinds + , qOrder + + -- ** KindExpression + , KindExpression + , kindExpression + , keName + + -- ** ReadOptions + , ReadOptions + , readOptions + , roReadConsistency + , roTransaction + + -- ** RollbackResponse + , RollbackResponse + , rollbackResponse + , rrHeader + + -- ** PropertyExpression + , PropertyExpression + , propertyExpression + , peProperty + , peAggregationFunction + + -- ** Filter + , Filter + , filter' + , fCompositeFilter + , fPropertyFilter + + -- ** CommitRequest + , CommitRequest + , commitRequest + , crMode + , crMutation + , crTransaction + , crIgnoreReadOnly + + -- ** Entity + , Entity + , entity + , eKey + , eProperties + + -- ** LookupResponse + , LookupResponse + , lookupResponse + , lrDeferred + , lrFound + , lrMissing + , lrHeader + + -- ** PropertyOrder + , PropertyOrder + , propertyOrder + , poProperty + , poDirection + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude +import Network.Google.Resource.Datastore.Datasets.AllocateIds +import Network.Google.Resource.Datastore.Datasets.BeginTransaction +import Network.Google.Resource.Datastore.Datasets.Commit +import Network.Google.Resource.Datastore.Datasets.Lookup +import Network.Google.Resource.Datastore.Datasets.Rollback +import Network.Google.Resource.Datastore.Datasets.RunQuery + +{- $resources +TODO +-} + +type DatastoreAPI = Datasets + +datastoreAPI :: Proxy DatastoreAPI +datastoreAPI = Proxy diff --git a/gogol-datastore/gen/Network/Google/Datastore/Types.hs b/gogol-datastore/gen/Network/Google/Datastore/Types.hs new file mode 100644 index 000000000..d5fee5c06 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Datastore/Types.hs @@ -0,0 +1,271 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Datastore.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Datastore.Types + ( + -- * Service URL + datastoreURL + + -- * RollbackRequest + , RollbackRequest + , rollbackRequest + , rrTransaction + + -- * PartitionId + , PartitionId + , partitionId + , piNamespace + , piDatasetId + + -- * QueryResultBatch + , QueryResultBatch + , queryResultBatch + , qrbSkippedResults + , qrbEntityResultType + , qrbEntityResults + , qrbMoreResults + , qrbEndCursor + + -- * Property + , Property + , property + , pKeyValue + , pBlobKeyValue + , pDateTimeValue + , pIntegerValue + , pEntityValue + , pDoubleValue + , pStringValue + , pListValue + , pIndexed + , pBooleanValue + , pMeaning + , pBlobValue + + -- * AllocateIdsRequest + , AllocateIdsRequest + , allocateIdsRequest + , airKeys + + -- * BeginTransactionRequest + , BeginTransactionRequest + , beginTransactionRequest + , btrIsolationLevel + + -- * RunQueryRequest + , RunQueryRequest + , runQueryRequest + , rqrPartitionId + , rqrGqlQuery + , rqrQuery + , rqrReadOptions + + -- * CompositeFilter + , CompositeFilter + , compositeFilter + , cfOperator + , cfFilters + + -- * BeginTransactionResponse + , BeginTransactionResponse + , beginTransactionResponse + , btrTransaction + , btrHeader + + -- * RunQueryResponse + , RunQueryResponse + , runQueryResponse + , rqrBatch + , rqrHeader + + -- * MutationResult + , MutationResult + , mutationResult + , mrInsertAutoIdKeys + , mrIndexUpdates + + -- * GqlQuery + , GqlQuery + , gqlQuery + , gqAllowLiteral + , gqNumberArgs + , gqQueryString + , gqNameArgs + + -- * AllocateIdsResponse + , AllocateIdsResponse + , allocateIdsResponse + , aKeys + , aHeader + + -- * Value + , Value + , value + , vKeyValue + , vBlobKeyValue + , vDateTimeValue + , vIntegerValue + , vEntityValue + , vDoubleValue + , vStringValue + , vListValue + , vIndexed + , vBooleanValue + , vMeaning + , vBlobValue + + -- * LookupRequest + , LookupRequest + , lookupRequest + , lrKeys + , lrReadOptions + + -- * Mutation + , Mutation + , mutation + , mInsert + , mForce + , mInsertAutoId + , mUpsert + , mDelete + , mUpdate + + -- * ResponseHeader + , ResponseHeader + , responseHeader + , rhKind + + -- * GqlQueryArg + , GqlQueryArg + , gqlQueryArg + , gqaCursor + , gqaValue + , gqaName + + -- * PropertyReference + , PropertyReference + , propertyReference + , prName + + -- * KeyPathElement + , KeyPathElement + , keyPathElement + , kpeKind + , kpeName + , kpeId + + -- * Key + , Key + , key + , keyPartitionId + , keyPath + + -- * PropertyFilter + , PropertyFilter + , propertyFilter + , pfProperty + , pfOperator + , pfValue + + -- * CommitResponse + , CommitResponse + , commitResponse + , crMutationResult + , crHeader + + -- * EntityResult + , EntityResult + , entityResult + , erEntity + + -- * Query + , Query + , query + , qGroupBy + , qStartCursor + , qOffset + , qEndCursor + , qLimit + , qProjection + , qFilter + , qKinds + , qOrder + + -- * KindExpression + , KindExpression + , kindExpression + , keName + + -- * ReadOptions + , ReadOptions + , readOptions + , roReadConsistency + , roTransaction + + -- * RollbackResponse + , RollbackResponse + , rollbackResponse + , rrHeader + + -- * PropertyExpression + , PropertyExpression + , propertyExpression + , peProperty + , peAggregationFunction + + -- * Filter + , Filter + , filter' + , fCompositeFilter + , fPropertyFilter + + -- * CommitRequest + , CommitRequest + , commitRequest + , crMode + , crMutation + , crTransaction + , crIgnoreReadOnly + + -- * Entity + , Entity + , entity + , eKey + , eProperties + + -- * LookupResponse + , LookupResponse + , lookupResponse + , lrDeferred + , lrFound + , lrMissing + , lrHeader + + -- * PropertyOrder + , PropertyOrder + , propertyOrder + , poProperty + , poDirection + ) where + +import Network.Google.Datastore.Types.Product +import Network.Google.Datastore.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the Google Cloud Datastore API. +datastoreURL :: BaseURL +datastoreURL + = BaseUrl Https + "https://www.googleapis.com/datastore/v1beta2/datasets/" + 443 diff --git a/gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs b/gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs new file mode 100644 index 000000000..8ab5d8693 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs @@ -0,0 +1,2125 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Datastore.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Datastore.Types.Product where + +import Network.Google.Datastore.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'rollbackRequest' smart constructor. +newtype RollbackRequest = RollbackRequest + { _rrTransaction :: Maybe Word8 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollbackRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrTransaction' +rollbackRequest + :: RollbackRequest +rollbackRequest = + RollbackRequest + { _rrTransaction = Nothing + } + +-- | The transaction identifier, returned by a call to beginTransaction. +rrTransaction :: Lens' RollbackRequest (Maybe Word8) +rrTransaction + = lens _rrTransaction + (\ s a -> s{_rrTransaction = a}) + +instance FromJSON RollbackRequest where + parseJSON + = withObject "RollbackRequest" + (\ o -> RollbackRequest <$> (o .:? "transaction")) + +instance ToJSON RollbackRequest where + toJSON RollbackRequest{..} + = object + (catMaybes [("transaction" .=) <$> _rrTransaction]) + +-- | An identifier for a particular subset of entities. Entities are +-- partitioned into various subsets, each used by different datasets and +-- different namespaces within a dataset and so forth. +-- +-- /See:/ 'partitionId' smart constructor. +data PartitionId = PartitionId + { _piNamespace :: !(Maybe Text) + , _piDatasetId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PartitionId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piNamespace' +-- +-- * 'piDatasetId' +partitionId + :: PartitionId +partitionId = + PartitionId + { _piNamespace = Nothing + , _piDatasetId = Nothing + } + +-- | The namespace. +piNamespace :: Lens' PartitionId (Maybe Text) +piNamespace + = lens _piNamespace (\ s a -> s{_piNamespace = a}) + +-- | The dataset ID. +piDatasetId :: Lens' PartitionId (Maybe Text) +piDatasetId + = lens _piDatasetId (\ s a -> s{_piDatasetId = a}) + +instance FromJSON PartitionId where + parseJSON + = withObject "PartitionId" + (\ o -> + PartitionId <$> + (o .:? "namespace") <*> (o .:? "datasetId")) + +instance ToJSON PartitionId where + toJSON PartitionId{..} + = object + (catMaybes + [("namespace" .=) <$> _piNamespace, + ("datasetId" .=) <$> _piDatasetId]) + +-- | A batch of results produced by a query. +-- +-- /See:/ 'queryResultBatch' smart constructor. +data QueryResultBatch = QueryResultBatch + { _qrbSkippedResults :: !(Maybe Int32) + , _qrbEntityResultType :: !(Maybe Text) + , _qrbEntityResults :: !(Maybe [Maybe EntityResult]) + , _qrbMoreResults :: !(Maybe Text) + , _qrbEndCursor :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueryResultBatch' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrbSkippedResults' +-- +-- * 'qrbEntityResultType' +-- +-- * 'qrbEntityResults' +-- +-- * 'qrbMoreResults' +-- +-- * 'qrbEndCursor' +queryResultBatch + :: QueryResultBatch +queryResultBatch = + QueryResultBatch + { _qrbSkippedResults = Nothing + , _qrbEntityResultType = Nothing + , _qrbEntityResults = Nothing + , _qrbMoreResults = Nothing + , _qrbEndCursor = Nothing + } + +-- | The number of results skipped because of Query.offset. +qrbSkippedResults :: Lens' QueryResultBatch (Maybe Int32) +qrbSkippedResults + = lens _qrbSkippedResults + (\ s a -> s{_qrbSkippedResults = a}) + +-- | The result type for every entity in entityResults. full for full +-- entities, projection for entities with only projected properties, +-- keyOnly for entities with only a key. +qrbEntityResultType :: Lens' QueryResultBatch (Maybe Text) +qrbEntityResultType + = lens _qrbEntityResultType + (\ s a -> s{_qrbEntityResultType = a}) + +-- | The results for this batch. +qrbEntityResults :: Lens' QueryResultBatch [Maybe EntityResult] +qrbEntityResults + = lens _qrbEntityResults + (\ s a -> s{_qrbEntityResults = a}) + . _Default + . _Coerce + +-- | The state of the query after the current batch. One of notFinished, +-- moreResultsAfterLimit, noMoreResults. +qrbMoreResults :: Lens' QueryResultBatch (Maybe Text) +qrbMoreResults + = lens _qrbMoreResults + (\ s a -> s{_qrbMoreResults = a}) + +-- | A cursor that points to the position after the last result in the batch. +-- May be absent. TODO(arfuller): Once all plans produce cursors update +-- documentation here. +qrbEndCursor :: Lens' QueryResultBatch (Maybe Word8) +qrbEndCursor + = lens _qrbEndCursor (\ s a -> s{_qrbEndCursor = a}) + +instance FromJSON QueryResultBatch where + parseJSON + = withObject "QueryResultBatch" + (\ o -> + QueryResultBatch <$> + (o .:? "skippedResults") <*> + (o .:? "entityResultType") + <*> (o .:? "entityResults" .!= mempty) + <*> (o .:? "moreResults") + <*> (o .:? "endCursor")) + +instance ToJSON QueryResultBatch where + toJSON QueryResultBatch{..} + = object + (catMaybes + [("skippedResults" .=) <$> _qrbSkippedResults, + ("entityResultType" .=) <$> _qrbEntityResultType, + ("entityResults" .=) <$> _qrbEntityResults, + ("moreResults" .=) <$> _qrbMoreResults, + ("endCursor" .=) <$> _qrbEndCursor]) + +-- | An entity property. +-- +-- /See:/ 'property' smart constructor. +data Property = Property + { _pKeyValue :: !(Maybe (Maybe Key)) + , _pBlobKeyValue :: !(Maybe Text) + , _pDateTimeValue :: !(Maybe UTCTime) + , _pIntegerValue :: !(Maybe Int64) + , _pEntityValue :: !(Maybe (Maybe Entity)) + , _pDoubleValue :: !(Maybe Double) + , _pStringValue :: !(Maybe Text) + , _pListValue :: !(Maybe [Maybe Value]) + , _pIndexed :: !(Maybe Bool) + , _pBooleanValue :: !(Maybe Bool) + , _pMeaning :: !(Maybe Int32) + , _pBlobValue :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Property' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKeyValue' +-- +-- * 'pBlobKeyValue' +-- +-- * 'pDateTimeValue' +-- +-- * 'pIntegerValue' +-- +-- * 'pEntityValue' +-- +-- * 'pDoubleValue' +-- +-- * 'pStringValue' +-- +-- * 'pListValue' +-- +-- * 'pIndexed' +-- +-- * 'pBooleanValue' +-- +-- * 'pMeaning' +-- +-- * 'pBlobValue' +property + :: Property +property = + Property + { _pKeyValue = Nothing + , _pBlobKeyValue = Nothing + , _pDateTimeValue = Nothing + , _pIntegerValue = Nothing + , _pEntityValue = Nothing + , _pDoubleValue = Nothing + , _pStringValue = Nothing + , _pListValue = Nothing + , _pIndexed = Nothing + , _pBooleanValue = Nothing + , _pMeaning = Nothing + , _pBlobValue = Nothing + } + +-- | A key value. +pKeyValue :: Lens' Property (Maybe (Maybe Key)) +pKeyValue + = lens _pKeyValue (\ s a -> s{_pKeyValue = a}) + +-- | A blob key value. +pBlobKeyValue :: Lens' Property (Maybe Text) +pBlobKeyValue + = lens _pBlobKeyValue + (\ s a -> s{_pBlobKeyValue = a}) + +-- | A timestamp value. +pDateTimeValue :: Lens' Property (Maybe UTCTime) +pDateTimeValue + = lens _pDateTimeValue + (\ s a -> s{_pDateTimeValue = a}) + +-- | An integer value. +pIntegerValue :: Lens' Property (Maybe Int64) +pIntegerValue + = lens _pIntegerValue + (\ s a -> s{_pIntegerValue = a}) + +-- | An entity value. May have no key. May have a key with an incomplete key +-- path. May have a reserved\/read-only key. +pEntityValue :: Lens' Property (Maybe (Maybe Entity)) +pEntityValue + = lens _pEntityValue (\ s a -> s{_pEntityValue = a}) + +-- | A double value. +pDoubleValue :: Lens' Property (Maybe Double) +pDoubleValue + = lens _pDoubleValue (\ s a -> s{_pDoubleValue = a}) + +-- | A UTF-8 encoded string value. When indexed is true, may have at most 500 +-- characters. +pStringValue :: Lens' Property (Maybe Text) +pStringValue + = lens _pStringValue (\ s a -> s{_pStringValue = a}) + +-- | A list value. Cannot contain another list value. A Value instance that +-- sets field list_value must not set field meaning or field indexed. +pListValue :: Lens' Property [Maybe Value] +pListValue + = lens _pListValue (\ s a -> s{_pListValue = a}) . + _Default + . _Coerce + +-- | If the value should be indexed. The indexed property may be set for a +-- null value. When indexed is true, stringValue is limited to 500 +-- characters and the blob value is limited to 500 bytes. Input values by +-- default have indexed set to true; however, you can explicitly set +-- indexed to true if you want. (An output value never has indexed +-- explicitly set to true.) If a value is itself an entity, it cannot have +-- indexed set to true. +pIndexed :: Lens' Property (Maybe Bool) +pIndexed = lens _pIndexed (\ s a -> s{_pIndexed = a}) + +-- | A boolean value. +pBooleanValue :: Lens' Property (Maybe Bool) +pBooleanValue + = lens _pBooleanValue + (\ s a -> s{_pBooleanValue = a}) + +-- | The meaning field is reserved and should not be used. +pMeaning :: Lens' Property (Maybe Int32) +pMeaning = lens _pMeaning (\ s a -> s{_pMeaning = a}) + +-- | A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, +-- may have at most 500 bytes. +pBlobValue :: Lens' Property (Maybe Word8) +pBlobValue + = lens _pBlobValue (\ s a -> s{_pBlobValue = a}) + +instance FromJSON Property where + parseJSON + = withObject "Property" + (\ o -> + Property <$> + (o .:? "keyValue") <*> (o .:? "blobKeyValue") <*> + (o .:? "dateTimeValue") + <*> (o .:? "integerValue") + <*> (o .:? "entityValue") + <*> (o .:? "doubleValue") + <*> (o .:? "stringValue") + <*> (o .:? "listValue" .!= mempty) + <*> (o .:? "indexed") + <*> (o .:? "booleanValue") + <*> (o .:? "meaning") + <*> (o .:? "blobValue")) + +instance ToJSON Property where + toJSON Property{..} + = object + (catMaybes + [("keyValue" .=) <$> _pKeyValue, + ("blobKeyValue" .=) <$> _pBlobKeyValue, + ("dateTimeValue" .=) <$> _pDateTimeValue, + ("integerValue" .=) <$> _pIntegerValue, + ("entityValue" .=) <$> _pEntityValue, + ("doubleValue" .=) <$> _pDoubleValue, + ("stringValue" .=) <$> _pStringValue, + ("listValue" .=) <$> _pListValue, + ("indexed" .=) <$> _pIndexed, + ("booleanValue" .=) <$> _pBooleanValue, + ("meaning" .=) <$> _pMeaning, + ("blobValue" .=) <$> _pBlobValue]) + +-- +-- /See:/ 'allocateIdsRequest' smart constructor. +newtype AllocateIdsRequest = AllocateIdsRequest + { _airKeys :: Maybe [Maybe Key] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AllocateIdsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'airKeys' +allocateIdsRequest + :: AllocateIdsRequest +allocateIdsRequest = + AllocateIdsRequest + { _airKeys = Nothing + } + +-- | A list of keys with incomplete key paths to allocate IDs for. No key may +-- be reserved\/read-only. +airKeys :: Lens' AllocateIdsRequest [Maybe Key] +airKeys + = lens _airKeys (\ s a -> s{_airKeys = a}) . _Default + . _Coerce + +instance FromJSON AllocateIdsRequest where + parseJSON + = withObject "AllocateIdsRequest" + (\ o -> + AllocateIdsRequest <$> (o .:? "keys" .!= mempty)) + +instance ToJSON AllocateIdsRequest where + toJSON AllocateIdsRequest{..} + = object (catMaybes [("keys" .=) <$> _airKeys]) + +-- +-- /See:/ 'beginTransactionRequest' smart constructor. +newtype BeginTransactionRequest = BeginTransactionRequest + { _btrIsolationLevel :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeginTransactionRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'btrIsolationLevel' +beginTransactionRequest + :: BeginTransactionRequest +beginTransactionRequest = + BeginTransactionRequest + { _btrIsolationLevel = Nothing + } + +-- | The transaction isolation level. Either snapshot or serializable. The +-- default isolation level is snapshot isolation, which means that another +-- transaction may not concurrently modify the data that is modified by +-- this transaction. Optionally, a transaction can request to be made +-- serializable which means that another transaction cannot concurrently +-- modify the data that is read or modified by this transaction. +btrIsolationLevel :: Lens' BeginTransactionRequest (Maybe Text) +btrIsolationLevel + = lens _btrIsolationLevel + (\ s a -> s{_btrIsolationLevel = a}) + +instance FromJSON BeginTransactionRequest where + parseJSON + = withObject "BeginTransactionRequest" + (\ o -> + BeginTransactionRequest <$> (o .:? "isolationLevel")) + +instance ToJSON BeginTransactionRequest where + toJSON BeginTransactionRequest{..} + = object + (catMaybes + [("isolationLevel" .=) <$> _btrIsolationLevel]) + +-- +-- /See:/ 'runQueryRequest' smart constructor. +data RunQueryRequest = RunQueryRequest + { _rqrPartitionId :: !(Maybe (Maybe PartitionId)) + , _rqrGqlQuery :: !(Maybe (Maybe GqlQuery)) + , _rqrQuery :: !(Maybe (Maybe Query)) + , _rqrReadOptions :: !(Maybe (Maybe ReadOptions)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RunQueryRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rqrPartitionId' +-- +-- * 'rqrGqlQuery' +-- +-- * 'rqrQuery' +-- +-- * 'rqrReadOptions' +runQueryRequest + :: RunQueryRequest +runQueryRequest = + RunQueryRequest + { _rqrPartitionId = Nothing + , _rqrGqlQuery = Nothing + , _rqrQuery = Nothing + , _rqrReadOptions = Nothing + } + +-- | Entities are partitioned into subsets, identified by a dataset (usually +-- implicitly specified by the project) and namespace ID. Queries are +-- scoped to a single partition. This partition ID is normalized with the +-- standard default context partition ID, but all other partition IDs in +-- RunQueryRequest are normalized with this partition ID as the context +-- partition ID. +rqrPartitionId :: Lens' RunQueryRequest (Maybe (Maybe PartitionId)) +rqrPartitionId + = lens _rqrPartitionId + (\ s a -> s{_rqrPartitionId = a}) + +-- | The GQL query to run. Either this field or field query must be set, but +-- not both. +rqrGqlQuery :: Lens' RunQueryRequest (Maybe (Maybe GqlQuery)) +rqrGqlQuery + = lens _rqrGqlQuery (\ s a -> s{_rqrGqlQuery = a}) + +-- | The query to run. Either this field or field gql_query must be set, but +-- not both. +rqrQuery :: Lens' RunQueryRequest (Maybe (Maybe Query)) +rqrQuery = lens _rqrQuery (\ s a -> s{_rqrQuery = a}) + +-- | The options for this query. +rqrReadOptions :: Lens' RunQueryRequest (Maybe (Maybe ReadOptions)) +rqrReadOptions + = lens _rqrReadOptions + (\ s a -> s{_rqrReadOptions = a}) + +instance FromJSON RunQueryRequest where + parseJSON + = withObject "RunQueryRequest" + (\ o -> + RunQueryRequest <$> + (o .:? "partitionId") <*> (o .:? "gqlQuery") <*> + (o .:? "query") + <*> (o .:? "readOptions")) + +instance ToJSON RunQueryRequest where + toJSON RunQueryRequest{..} + = object + (catMaybes + [("partitionId" .=) <$> _rqrPartitionId, + ("gqlQuery" .=) <$> _rqrGqlQuery, + ("query" .=) <$> _rqrQuery, + ("readOptions" .=) <$> _rqrReadOptions]) + +-- | A filter that merges the multiple other filters using the given +-- operation. +-- +-- /See:/ 'compositeFilter' smart constructor. +data CompositeFilter = CompositeFilter + { _cfOperator :: !(Maybe Text) + , _cfFilters :: !(Maybe [Maybe Filter]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompositeFilter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfOperator' +-- +-- * 'cfFilters' +compositeFilter + :: CompositeFilter +compositeFilter = + CompositeFilter + { _cfOperator = Nothing + , _cfFilters = Nothing + } + +-- | The operator for combining multiple filters. Only \"and\" is currently +-- supported. +cfOperator :: Lens' CompositeFilter (Maybe Text) +cfOperator + = lens _cfOperator (\ s a -> s{_cfOperator = a}) + +-- | The list of filters to combine. Must contain at least one filter. +cfFilters :: Lens' CompositeFilter [Maybe Filter] +cfFilters + = lens _cfFilters (\ s a -> s{_cfFilters = a}) . + _Default + . _Coerce + +instance FromJSON CompositeFilter where + parseJSON + = withObject "CompositeFilter" + (\ o -> + CompositeFilter <$> + (o .:? "operator") <*> (o .:? "filters" .!= mempty)) + +instance ToJSON CompositeFilter where + toJSON CompositeFilter{..} + = object + (catMaybes + [("operator" .=) <$> _cfOperator, + ("filters" .=) <$> _cfFilters]) + +-- +-- /See:/ 'beginTransactionResponse' smart constructor. +data BeginTransactionResponse = BeginTransactionResponse + { _btrTransaction :: !(Maybe Word8) + , _btrHeader :: !(Maybe (Maybe ResponseHeader)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeginTransactionResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'btrTransaction' +-- +-- * 'btrHeader' +beginTransactionResponse + :: BeginTransactionResponse +beginTransactionResponse = + BeginTransactionResponse + { _btrTransaction = Nothing + , _btrHeader = Nothing + } + +-- | The transaction identifier (always present). +btrTransaction :: Lens' BeginTransactionResponse (Maybe Word8) +btrTransaction + = lens _btrTransaction + (\ s a -> s{_btrTransaction = a}) + +btrHeader :: Lens' BeginTransactionResponse (Maybe (Maybe ResponseHeader)) +btrHeader + = lens _btrHeader (\ s a -> s{_btrHeader = a}) + +instance FromJSON BeginTransactionResponse where + parseJSON + = withObject "BeginTransactionResponse" + (\ o -> + BeginTransactionResponse <$> + (o .:? "transaction") <*> (o .:? "header")) + +instance ToJSON BeginTransactionResponse where + toJSON BeginTransactionResponse{..} + = object + (catMaybes + [("transaction" .=) <$> _btrTransaction, + ("header" .=) <$> _btrHeader]) + +-- +-- /See:/ 'runQueryResponse' smart constructor. +data RunQueryResponse = RunQueryResponse + { _rqrBatch :: !(Maybe (Maybe QueryResultBatch)) + , _rqrHeader :: !(Maybe (Maybe ResponseHeader)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RunQueryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rqrBatch' +-- +-- * 'rqrHeader' +runQueryResponse + :: RunQueryResponse +runQueryResponse = + RunQueryResponse + { _rqrBatch = Nothing + , _rqrHeader = Nothing + } + +-- | A batch of query results (always present). +rqrBatch :: Lens' RunQueryResponse (Maybe (Maybe QueryResultBatch)) +rqrBatch = lens _rqrBatch (\ s a -> s{_rqrBatch = a}) + +rqrHeader :: Lens' RunQueryResponse (Maybe (Maybe ResponseHeader)) +rqrHeader + = lens _rqrHeader (\ s a -> s{_rqrHeader = a}) + +instance FromJSON RunQueryResponse where + parseJSON + = withObject "RunQueryResponse" + (\ o -> + RunQueryResponse <$> + (o .:? "batch") <*> (o .:? "header")) + +instance ToJSON RunQueryResponse where + toJSON RunQueryResponse{..} + = object + (catMaybes + [("batch" .=) <$> _rqrBatch, + ("header" .=) <$> _rqrHeader]) + +-- +-- /See:/ 'mutationResult' smart constructor. +data MutationResult = MutationResult + { _mrInsertAutoIdKeys :: !(Maybe [Maybe Key]) + , _mrIndexUpdates :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MutationResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mrInsertAutoIdKeys' +-- +-- * 'mrIndexUpdates' +mutationResult + :: MutationResult +mutationResult = + MutationResult + { _mrInsertAutoIdKeys = Nothing + , _mrIndexUpdates = Nothing + } + +-- | Keys for insertAutoId entities. One per entity from the request, in the +-- same order. +mrInsertAutoIdKeys :: Lens' MutationResult [Maybe Key] +mrInsertAutoIdKeys + = lens _mrInsertAutoIdKeys + (\ s a -> s{_mrInsertAutoIdKeys = a}) + . _Default + . _Coerce + +-- | Number of index writes. +mrIndexUpdates :: Lens' MutationResult (Maybe Int32) +mrIndexUpdates + = lens _mrIndexUpdates + (\ s a -> s{_mrIndexUpdates = a}) + +instance FromJSON MutationResult where + parseJSON + = withObject "MutationResult" + (\ o -> + MutationResult <$> + (o .:? "insertAutoIdKeys" .!= mempty) <*> + (o .:? "indexUpdates")) + +instance ToJSON MutationResult where + toJSON MutationResult{..} + = object + (catMaybes + [("insertAutoIdKeys" .=) <$> _mrInsertAutoIdKeys, + ("indexUpdates" .=) <$> _mrIndexUpdates]) + +-- | A GQL query. +-- +-- /See:/ 'gqlQuery' smart constructor. +data GqlQuery = GqlQuery + { _gqAllowLiteral :: !(Maybe Bool) + , _gqNumberArgs :: !(Maybe [Maybe GqlQueryArg]) + , _gqQueryString :: !(Maybe Text) + , _gqNameArgs :: !(Maybe [Maybe GqlQueryArg]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GqlQuery' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gqAllowLiteral' +-- +-- * 'gqNumberArgs' +-- +-- * 'gqQueryString' +-- +-- * 'gqNameArgs' +gqlQuery + :: GqlQuery +gqlQuery = + GqlQuery + { _gqAllowLiteral = Nothing + , _gqNumberArgs = Nothing + , _gqQueryString = Nothing + , _gqNameArgs = Nothing + } + +-- | When false, the query string must not contain a literal. +gqAllowLiteral :: Lens' GqlQuery (Maybe Bool) +gqAllowLiteral + = lens _gqAllowLiteral + (\ s a -> s{_gqAllowLiteral = a}) + +-- | Numbered binding site \'1 references the first numbered argument, +-- effectively using 1-based indexing, rather than the usual 0. A numbered +-- argument must NOT set field GqlQueryArg.name. For each binding site +-- numbered i in query_string, there must be an ith numbered argument. The +-- inverse must also be true. +gqNumberArgs :: Lens' GqlQuery [Maybe GqlQueryArg] +gqNumberArgs + = lens _gqNumberArgs (\ s a -> s{_gqNumberArgs = a}) + . _Default + . _Coerce + +-- | The query string. +gqQueryString :: Lens' GqlQuery (Maybe Text) +gqQueryString + = lens _gqQueryString + (\ s a -> s{_gqQueryString = a}) + +-- | A named argument must set field GqlQueryArg.name. No two named arguments +-- may have the same name. For each non-reserved named binding site in the +-- query string, there must be a named argument with that name, but not +-- necessarily the inverse. +gqNameArgs :: Lens' GqlQuery [Maybe GqlQueryArg] +gqNameArgs + = lens _gqNameArgs (\ s a -> s{_gqNameArgs = a}) . + _Default + . _Coerce + +instance FromJSON GqlQuery where + parseJSON + = withObject "GqlQuery" + (\ o -> + GqlQuery <$> + (o .:? "allowLiteral") <*> + (o .:? "numberArgs" .!= mempty) + <*> (o .:? "queryString") + <*> (o .:? "nameArgs" .!= mempty)) + +instance ToJSON GqlQuery where + toJSON GqlQuery{..} + = object + (catMaybes + [("allowLiteral" .=) <$> _gqAllowLiteral, + ("numberArgs" .=) <$> _gqNumberArgs, + ("queryString" .=) <$> _gqQueryString, + ("nameArgs" .=) <$> _gqNameArgs]) + +-- +-- /See:/ 'allocateIdsResponse' smart constructor. +data AllocateIdsResponse = AllocateIdsResponse + { _aKeys :: !(Maybe [Maybe Key]) + , _aHeader :: !(Maybe (Maybe ResponseHeader)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AllocateIdsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aKeys' +-- +-- * 'aHeader' +allocateIdsResponse + :: AllocateIdsResponse +allocateIdsResponse = + AllocateIdsResponse + { _aKeys = Nothing + , _aHeader = Nothing + } + +-- | The keys specified in the request (in the same order), each with its key +-- path completed with a newly allocated ID. +aKeys :: Lens' AllocateIdsResponse [Maybe Key] +aKeys + = lens _aKeys (\ s a -> s{_aKeys = a}) . _Default . + _Coerce + +aHeader :: Lens' AllocateIdsResponse (Maybe (Maybe ResponseHeader)) +aHeader = lens _aHeader (\ s a -> s{_aHeader = a}) + +instance FromJSON AllocateIdsResponse where + parseJSON + = withObject "AllocateIdsResponse" + (\ o -> + AllocateIdsResponse <$> + (o .:? "keys" .!= mempty) <*> (o .:? "header")) + +instance ToJSON AllocateIdsResponse where + toJSON AllocateIdsResponse{..} + = object + (catMaybes + [("keys" .=) <$> _aKeys, ("header" .=) <$> _aHeader]) + +-- | A message that can hold any of the supported value types and associated +-- metadata. +-- +-- /See:/ 'value' smart constructor. +data Value = Value + { _vKeyValue :: !(Maybe (Maybe Key)) + , _vBlobKeyValue :: !(Maybe Text) + , _vDateTimeValue :: !(Maybe UTCTime) + , _vIntegerValue :: !(Maybe Int64) + , _vEntityValue :: !(Maybe (Maybe Entity)) + , _vDoubleValue :: !(Maybe Double) + , _vStringValue :: !(Maybe Text) + , _vListValue :: !(Maybe [Maybe Value]) + , _vIndexed :: !(Maybe Bool) + , _vBooleanValue :: !(Maybe Bool) + , _vMeaning :: !(Maybe Int32) + , _vBlobValue :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Value' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vKeyValue' +-- +-- * 'vBlobKeyValue' +-- +-- * 'vDateTimeValue' +-- +-- * 'vIntegerValue' +-- +-- * 'vEntityValue' +-- +-- * 'vDoubleValue' +-- +-- * 'vStringValue' +-- +-- * 'vListValue' +-- +-- * 'vIndexed' +-- +-- * 'vBooleanValue' +-- +-- * 'vMeaning' +-- +-- * 'vBlobValue' +value + :: Value +value = + Value + { _vKeyValue = Nothing + , _vBlobKeyValue = Nothing + , _vDateTimeValue = Nothing + , _vIntegerValue = Nothing + , _vEntityValue = Nothing + , _vDoubleValue = Nothing + , _vStringValue = Nothing + , _vListValue = Nothing + , _vIndexed = Nothing + , _vBooleanValue = Nothing + , _vMeaning = Nothing + , _vBlobValue = Nothing + } + +-- | A key value. +vKeyValue :: Lens' Value (Maybe (Maybe Key)) +vKeyValue + = lens _vKeyValue (\ s a -> s{_vKeyValue = a}) + +-- | A blob key value. +vBlobKeyValue :: Lens' Value (Maybe Text) +vBlobKeyValue + = lens _vBlobKeyValue + (\ s a -> s{_vBlobKeyValue = a}) + +-- | A timestamp value. +vDateTimeValue :: Lens' Value (Maybe UTCTime) +vDateTimeValue + = lens _vDateTimeValue + (\ s a -> s{_vDateTimeValue = a}) + +-- | An integer value. +vIntegerValue :: Lens' Value (Maybe Int64) +vIntegerValue + = lens _vIntegerValue + (\ s a -> s{_vIntegerValue = a}) + +-- | An entity value. May have no key. May have a key with an incomplete key +-- path. May have a reserved\/read-only key. +vEntityValue :: Lens' Value (Maybe (Maybe Entity)) +vEntityValue + = lens _vEntityValue (\ s a -> s{_vEntityValue = a}) + +-- | A double value. +vDoubleValue :: Lens' Value (Maybe Double) +vDoubleValue + = lens _vDoubleValue (\ s a -> s{_vDoubleValue = a}) + +-- | A UTF-8 encoded string value. When indexed is true, may have at most 500 +-- characters. +vStringValue :: Lens' Value (Maybe Text) +vStringValue + = lens _vStringValue (\ s a -> s{_vStringValue = a}) + +-- | A list value. Cannot contain another list value. A Value instance that +-- sets field list_value must not set field meaning or field indexed. +vListValue :: Lens' Value [Maybe Value] +vListValue + = lens _vListValue (\ s a -> s{_vListValue = a}) . + _Default + . _Coerce + +-- | If the value should be indexed. The indexed property may be set for a +-- null value. When indexed is true, stringValue is limited to 500 +-- characters and the blob value is limited to 500 bytes. Input values by +-- default have indexed set to true; however, you can explicitly set +-- indexed to true if you want. (An output value never has indexed +-- explicitly set to true.) If a value is itself an entity, it cannot have +-- indexed set to true. +vIndexed :: Lens' Value (Maybe Bool) +vIndexed = lens _vIndexed (\ s a -> s{_vIndexed = a}) + +-- | A boolean value. +vBooleanValue :: Lens' Value (Maybe Bool) +vBooleanValue + = lens _vBooleanValue + (\ s a -> s{_vBooleanValue = a}) + +-- | The meaning field is reserved and should not be used. +vMeaning :: Lens' Value (Maybe Int32) +vMeaning = lens _vMeaning (\ s a -> s{_vMeaning = a}) + +-- | A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, +-- may have at most 500 bytes. +vBlobValue :: Lens' Value (Maybe Word8) +vBlobValue + = lens _vBlobValue (\ s a -> s{_vBlobValue = a}) + +instance FromJSON Value where + parseJSON + = withObject "Value" + (\ o -> + Value <$> + (o .:? "keyValue") <*> (o .:? "blobKeyValue") <*> + (o .:? "dateTimeValue") + <*> (o .:? "integerValue") + <*> (o .:? "entityValue") + <*> (o .:? "doubleValue") + <*> (o .:? "stringValue") + <*> (o .:? "listValue" .!= mempty) + <*> (o .:? "indexed") + <*> (o .:? "booleanValue") + <*> (o .:? "meaning") + <*> (o .:? "blobValue")) + +instance ToJSON Value where + toJSON Value{..} + = object + (catMaybes + [("keyValue" .=) <$> _vKeyValue, + ("blobKeyValue" .=) <$> _vBlobKeyValue, + ("dateTimeValue" .=) <$> _vDateTimeValue, + ("integerValue" .=) <$> _vIntegerValue, + ("entityValue" .=) <$> _vEntityValue, + ("doubleValue" .=) <$> _vDoubleValue, + ("stringValue" .=) <$> _vStringValue, + ("listValue" .=) <$> _vListValue, + ("indexed" .=) <$> _vIndexed, + ("booleanValue" .=) <$> _vBooleanValue, + ("meaning" .=) <$> _vMeaning, + ("blobValue" .=) <$> _vBlobValue]) + +-- +-- /See:/ 'lookupRequest' smart constructor. +data LookupRequest = LookupRequest + { _lrKeys :: !(Maybe [Maybe Key]) + , _lrReadOptions :: !(Maybe (Maybe ReadOptions)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LookupRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrKeys' +-- +-- * 'lrReadOptions' +lookupRequest + :: LookupRequest +lookupRequest = + LookupRequest + { _lrKeys = Nothing + , _lrReadOptions = Nothing + } + +-- | Keys of entities to look up from the datastore. +lrKeys :: Lens' LookupRequest [Maybe Key] +lrKeys + = lens _lrKeys (\ s a -> s{_lrKeys = a}) . _Default . + _Coerce + +-- | Options for this lookup request. Optional. +lrReadOptions :: Lens' LookupRequest (Maybe (Maybe ReadOptions)) +lrReadOptions + = lens _lrReadOptions + (\ s a -> s{_lrReadOptions = a}) + +instance FromJSON LookupRequest where + parseJSON + = withObject "LookupRequest" + (\ o -> + LookupRequest <$> + (o .:? "keys" .!= mempty) <*> (o .:? "readOptions")) + +instance ToJSON LookupRequest where + toJSON LookupRequest{..} + = object + (catMaybes + [("keys" .=) <$> _lrKeys, + ("readOptions" .=) <$> _lrReadOptions]) + +-- | A set of changes to apply. +-- +-- /See:/ 'mutation' smart constructor. +data Mutation = Mutation + { _mInsert :: !(Maybe [Maybe Entity]) + , _mForce :: !(Maybe Bool) + , _mInsertAutoId :: !(Maybe [Maybe Entity]) + , _mUpsert :: !(Maybe [Maybe Entity]) + , _mDelete :: !(Maybe [Maybe Key]) + , _mUpdate :: !(Maybe [Maybe Entity]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Mutation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mInsert' +-- +-- * 'mForce' +-- +-- * 'mInsertAutoId' +-- +-- * 'mUpsert' +-- +-- * 'mDelete' +-- +-- * 'mUpdate' +mutation + :: Mutation +mutation = + Mutation + { _mInsert = Nothing + , _mForce = Nothing + , _mInsertAutoId = Nothing + , _mUpsert = Nothing + , _mDelete = Nothing + , _mUpdate = Nothing + } + +-- | Entities to insert. Each inserted entity\'s key must have a complete +-- path and must not be reserved\/read-only. +mInsert :: Lens' Mutation [Maybe Entity] +mInsert + = lens _mInsert (\ s a -> s{_mInsert = a}) . _Default + . _Coerce + +-- | Ignore a user specified read-only period. Optional. +mForce :: Lens' Mutation (Maybe Bool) +mForce = lens _mForce (\ s a -> s{_mForce = a}) + +-- | Insert entities with a newly allocated ID. Each inserted entity\'s key +-- must omit the final identifier in its path and must not be +-- reserved\/read-only. +mInsertAutoId :: Lens' Mutation [Maybe Entity] +mInsertAutoId + = lens _mInsertAutoId + (\ s a -> s{_mInsertAutoId = a}) + . _Default + . _Coerce + +-- | Entities to upsert. Each upserted entity\'s key must have a complete +-- path and must not be reserved\/read-only. +mUpsert :: Lens' Mutation [Maybe Entity] +mUpsert + = lens _mUpsert (\ s a -> s{_mUpsert = a}) . _Default + . _Coerce + +-- | Keys of entities to delete. Each key must have a complete key path and +-- must not be reserved\/read-only. +mDelete :: Lens' Mutation [Maybe Key] +mDelete + = lens _mDelete (\ s a -> s{_mDelete = a}) . _Default + . _Coerce + +-- | Entities to update. Each updated entity\'s key must have a complete path +-- and must not be reserved\/read-only. +mUpdate :: Lens' Mutation [Maybe Entity] +mUpdate + = lens _mUpdate (\ s a -> s{_mUpdate = a}) . _Default + . _Coerce + +instance FromJSON Mutation where + parseJSON + = withObject "Mutation" + (\ o -> + Mutation <$> + (o .:? "insert" .!= mempty) <*> (o .:? "force") <*> + (o .:? "insertAutoId" .!= mempty) + <*> (o .:? "upsert" .!= mempty) + <*> (o .:? "delete" .!= mempty) + <*> (o .:? "update" .!= mempty)) + +instance ToJSON Mutation where + toJSON Mutation{..} + = object + (catMaybes + [("insert" .=) <$> _mInsert, + ("force" .=) <$> _mForce, + ("insertAutoId" .=) <$> _mInsertAutoId, + ("upsert" .=) <$> _mUpsert, + ("delete" .=) <$> _mDelete, + ("update" .=) <$> _mUpdate]) + +-- +-- /See:/ 'responseHeader' smart constructor. +newtype ResponseHeader = ResponseHeader + { _rhKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResponseHeader' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rhKind' +responseHeader + :: ResponseHeader +responseHeader = + ResponseHeader + { _rhKind = "datastore#responseHeader" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"datastore#responseHeader\". +rhKind :: Lens' ResponseHeader Text +rhKind = lens _rhKind (\ s a -> s{_rhKind = a}) + +instance FromJSON ResponseHeader where + parseJSON + = withObject "ResponseHeader" + (\ o -> + ResponseHeader <$> + (o .:? "kind" .!= "datastore#responseHeader")) + +instance ToJSON ResponseHeader where + toJSON ResponseHeader{..} + = object (catMaybes [Just ("kind" .= _rhKind)]) + +-- | A binding argument for a GQL query. +-- +-- /See:/ 'gqlQueryArg' smart constructor. +data GqlQueryArg = GqlQueryArg + { _gqaCursor :: !(Maybe Word8) + , _gqaValue :: !(Maybe (Maybe Value)) + , _gqaName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GqlQueryArg' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gqaCursor' +-- +-- * 'gqaValue' +-- +-- * 'gqaName' +gqlQueryArg + :: GqlQueryArg +gqlQueryArg = + GqlQueryArg + { _gqaCursor = Nothing + , _gqaValue = Nothing + , _gqaName = Nothing + } + +gqaCursor :: Lens' GqlQueryArg (Maybe Word8) +gqaCursor + = lens _gqaCursor (\ s a -> s{_gqaCursor = a}) + +gqaValue :: Lens' GqlQueryArg (Maybe (Maybe Value)) +gqaValue = lens _gqaValue (\ s a -> s{_gqaValue = a}) + +-- | Must match regex \"[A-Za-z_$][A-Za-z_$0-9]*\". Must not match regex +-- \"__.*__\". Must not be \"\". +gqaName :: Lens' GqlQueryArg (Maybe Text) +gqaName = lens _gqaName (\ s a -> s{_gqaName = a}) + +instance FromJSON GqlQueryArg where + parseJSON + = withObject "GqlQueryArg" + (\ o -> + GqlQueryArg <$> + (o .:? "cursor") <*> (o .:? "value") <*> + (o .:? "name")) + +instance ToJSON GqlQueryArg where + toJSON GqlQueryArg{..} + = object + (catMaybes + [("cursor" .=) <$> _gqaCursor, + ("value" .=) <$> _gqaValue, + ("name" .=) <$> _gqaName]) + +-- | A reference to a property relative to the kind expressions. +-- +-- /See:/ 'propertyReference' smart constructor. +newtype PropertyReference = PropertyReference + { _prName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prName' +propertyReference + :: PropertyReference +propertyReference = + PropertyReference + { _prName = Nothing + } + +-- | The name of the property. +prName :: Lens' PropertyReference (Maybe Text) +prName = lens _prName (\ s a -> s{_prName = a}) + +instance FromJSON PropertyReference where + parseJSON + = withObject "PropertyReference" + (\ o -> PropertyReference <$> (o .:? "name")) + +instance ToJSON PropertyReference where + toJSON PropertyReference{..} + = object (catMaybes [("name" .=) <$> _prName]) + +-- | A (kind, ID\/name) pair used to construct a key path. At most one of +-- name or ID may be set. If either is set, the element is complete. If +-- neither is set, the element is incomplete. +-- +-- /See:/ 'keyPathElement' smart constructor. +data KeyPathElement = KeyPathElement + { _kpeKind :: !(Maybe Text) + , _kpeName :: !(Maybe Text) + , _kpeId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KeyPathElement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'kpeKind' +-- +-- * 'kpeName' +-- +-- * 'kpeId' +keyPathElement + :: KeyPathElement +keyPathElement = + KeyPathElement + { _kpeKind = Nothing + , _kpeName = Nothing + , _kpeId = Nothing + } + +-- | The kind of the entity. A kind matching regex \"__.*__\" is +-- reserved\/read-only. A kind must not contain more than 500 characters. +-- Cannot be \"\". +kpeKind :: Lens' KeyPathElement (Maybe Text) +kpeKind = lens _kpeKind (\ s a -> s{_kpeKind = a}) + +-- | The name of the entity. A name matching regex \"__.*__\" is +-- reserved\/read-only. A name must not be more than 500 characters. Cannot +-- be \"\". +kpeName :: Lens' KeyPathElement (Maybe Text) +kpeName = lens _kpeName (\ s a -> s{_kpeName = a}) + +-- | The ID of the entity. Never equal to zero. Values less than zero are +-- discouraged and will not be supported in the future. +kpeId :: Lens' KeyPathElement (Maybe Int64) +kpeId = lens _kpeId (\ s a -> s{_kpeId = a}) + +instance FromJSON KeyPathElement where + parseJSON + = withObject "KeyPathElement" + (\ o -> + KeyPathElement <$> + (o .:? "kind") <*> (o .:? "name") <*> (o .:? "id")) + +instance ToJSON KeyPathElement where + toJSON KeyPathElement{..} + = object + (catMaybes + [("kind" .=) <$> _kpeKind, ("name" .=) <$> _kpeName, + ("id" .=) <$> _kpeId]) + +-- | A unique identifier for an entity. +-- +-- /See:/ 'key' smart constructor. +data Key = Key + { _keyPartitionId :: !(Maybe (Maybe PartitionId)) + , _keyPath :: !(Maybe [Maybe KeyPathElement]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Key' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'keyPartitionId' +-- +-- * 'keyPath' +key + :: Key +key = + Key + { _keyPartitionId = Nothing + , _keyPath = Nothing + } + +-- | Entities are partitioned into subsets, currently identified by a dataset +-- (usually implicitly specified by the project) and namespace ID. Queries +-- are scoped to a single partition. +keyPartitionId :: Lens' Key (Maybe (Maybe PartitionId)) +keyPartitionId + = lens _keyPartitionId + (\ s a -> s{_keyPartitionId = a}) + +-- | The entity path. An entity path consists of one or more elements +-- composed of a kind and a string or numerical identifier, which identify +-- entities. The first element identifies a root entity, the second element +-- identifies a child of the root entity, the third element a child of the +-- second entity, and so forth. The entities identified by all prefixes of +-- the path are called the element\'s ancestors. An entity path is always +-- fully complete: ALL of the entity\'s ancestors are required to be in the +-- path along with the entity identifier itself. The only exception is that +-- in some documented cases, the identifier in the last path element (for +-- the entity) itself may be omitted. A path can never be empty. The path +-- can have at most 100 elements. +keyPath :: Lens' Key [Maybe KeyPathElement] +keyPath + = lens _keyPath (\ s a -> s{_keyPath = a}) . _Default + . _Coerce + +instance FromJSON Key where + parseJSON + = withObject "Key" + (\ o -> + Key <$> + (o .:? "partitionId") <*> (o .:? "path" .!= mempty)) + +instance ToJSON Key where + toJSON Key{..} + = object + (catMaybes + [("partitionId" .=) <$> _keyPartitionId, + ("path" .=) <$> _keyPath]) + +-- | A filter on a specific property. +-- +-- /See:/ 'propertyFilter' smart constructor. +data PropertyFilter = PropertyFilter + { _pfProperty :: !(Maybe (Maybe PropertyReference)) + , _pfOperator :: !(Maybe Text) + , _pfValue :: !(Maybe (Maybe Value)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyFilter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pfProperty' +-- +-- * 'pfOperator' +-- +-- * 'pfValue' +propertyFilter + :: PropertyFilter +propertyFilter = + PropertyFilter + { _pfProperty = Nothing + , _pfOperator = Nothing + , _pfValue = Nothing + } + +-- | The property to filter by. +pfProperty :: Lens' PropertyFilter (Maybe (Maybe PropertyReference)) +pfProperty + = lens _pfProperty (\ s a -> s{_pfProperty = a}) + +-- | The operator to filter by. One of lessThan, lessThanOrEqual, +-- greaterThan, greaterThanOrEqual, equal, or hasAncestor. +pfOperator :: Lens' PropertyFilter (Maybe Text) +pfOperator + = lens _pfOperator (\ s a -> s{_pfOperator = a}) + +-- | The value to compare the property to. +pfValue :: Lens' PropertyFilter (Maybe (Maybe Value)) +pfValue = lens _pfValue (\ s a -> s{_pfValue = a}) + +instance FromJSON PropertyFilter where + parseJSON + = withObject "PropertyFilter" + (\ o -> + PropertyFilter <$> + (o .:? "property") <*> (o .:? "operator") <*> + (o .:? "value")) + +instance ToJSON PropertyFilter where + toJSON PropertyFilter{..} + = object + (catMaybes + [("property" .=) <$> _pfProperty, + ("operator" .=) <$> _pfOperator, + ("value" .=) <$> _pfValue]) + +-- +-- /See:/ 'commitResponse' smart constructor. +data CommitResponse = CommitResponse + { _crMutationResult :: !(Maybe (Maybe MutationResult)) + , _crHeader :: !(Maybe (Maybe ResponseHeader)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommitResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crMutationResult' +-- +-- * 'crHeader' +commitResponse + :: CommitResponse +commitResponse = + CommitResponse + { _crMutationResult = Nothing + , _crHeader = Nothing + } + +-- | The result of performing the mutation (if any). +crMutationResult :: Lens' CommitResponse (Maybe (Maybe MutationResult)) +crMutationResult + = lens _crMutationResult + (\ s a -> s{_crMutationResult = a}) + +crHeader :: Lens' CommitResponse (Maybe (Maybe ResponseHeader)) +crHeader = lens _crHeader (\ s a -> s{_crHeader = a}) + +instance FromJSON CommitResponse where + parseJSON + = withObject "CommitResponse" + (\ o -> + CommitResponse <$> + (o .:? "mutationResult") <*> (o .:? "header")) + +instance ToJSON CommitResponse where + toJSON CommitResponse{..} + = object + (catMaybes + [("mutationResult" .=) <$> _crMutationResult, + ("header" .=) <$> _crHeader]) + +-- | The result of fetching an entity from the datastore. +-- +-- /See:/ 'entityResult' smart constructor. +newtype EntityResult = EntityResult + { _erEntity :: Maybe (Maybe Entity) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntityResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erEntity' +entityResult + :: EntityResult +entityResult = + EntityResult + { _erEntity = Nothing + } + +-- | The resulting entity. +erEntity :: Lens' EntityResult (Maybe (Maybe Entity)) +erEntity = lens _erEntity (\ s a -> s{_erEntity = a}) + +instance FromJSON EntityResult where + parseJSON + = withObject "EntityResult" + (\ o -> EntityResult <$> (o .:? "entity")) + +instance ToJSON EntityResult where + toJSON EntityResult{..} + = object (catMaybes [("entity" .=) <$> _erEntity]) + +-- | A query. +-- +-- /See:/ 'query' smart constructor. +data Query = Query + { _qGroupBy :: !(Maybe [Maybe PropertyReference]) + , _qStartCursor :: !(Maybe Word8) + , _qOffset :: !(Maybe Int32) + , _qEndCursor :: !(Maybe Word8) + , _qLimit :: !(Maybe Int32) + , _qProjection :: !(Maybe [Maybe PropertyExpression]) + , _qFilter :: !(Maybe (Maybe Filter)) + , _qKinds :: !(Maybe [Maybe KindExpression]) + , _qOrder :: !(Maybe [Maybe PropertyOrder]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Query' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qGroupBy' +-- +-- * 'qStartCursor' +-- +-- * 'qOffset' +-- +-- * 'qEndCursor' +-- +-- * 'qLimit' +-- +-- * 'qProjection' +-- +-- * 'qFilter' +-- +-- * 'qKinds' +-- +-- * 'qOrder' +query + :: Query +query = + Query + { _qGroupBy = Nothing + , _qStartCursor = Nothing + , _qOffset = Nothing + , _qEndCursor = Nothing + , _qLimit = Nothing + , _qProjection = Nothing + , _qFilter = Nothing + , _qKinds = Nothing + , _qOrder = Nothing + } + +-- | The properties to group by (if empty, no grouping is applied to the +-- result set). +qGroupBy :: Lens' Query [Maybe PropertyReference] +qGroupBy + = lens _qGroupBy (\ s a -> s{_qGroupBy = a}) . + _Default + . _Coerce + +-- | A starting point for the query results. Optional. Query cursors are +-- returned in query result batches. +qStartCursor :: Lens' Query (Maybe Word8) +qStartCursor + = lens _qStartCursor (\ s a -> s{_qStartCursor = a}) + +-- | The number of results to skip. Applies before limit, but after all other +-- constraints (optional, defaults to 0). +qOffset :: Lens' Query (Maybe Int32) +qOffset = lens _qOffset (\ s a -> s{_qOffset = a}) + +-- | An ending point for the query results. Optional. Query cursors are +-- returned in query result batches. +qEndCursor :: Lens' Query (Maybe Word8) +qEndCursor + = lens _qEndCursor (\ s a -> s{_qEndCursor = a}) + +-- | The maximum number of results to return. Applies after all other +-- constraints. Optional. +qLimit :: Lens' Query (Maybe Int32) +qLimit = lens _qLimit (\ s a -> s{_qLimit = a}) + +-- | The projection to return. If not set the entire entity is returned. +qProjection :: Lens' Query [Maybe PropertyExpression] +qProjection + = lens _qProjection (\ s a -> s{_qProjection = a}) . + _Default + . _Coerce + +-- | The filter to apply (optional). +qFilter :: Lens' Query (Maybe (Maybe Filter)) +qFilter = lens _qFilter (\ s a -> s{_qFilter = a}) + +-- | The kinds to query (if empty, returns entities from all kinds). +qKinds :: Lens' Query [Maybe KindExpression] +qKinds + = lens _qKinds (\ s a -> s{_qKinds = a}) . _Default . + _Coerce + +-- | The order to apply to the query results (if empty, order is +-- unspecified). +qOrder :: Lens' Query [Maybe PropertyOrder] +qOrder + = lens _qOrder (\ s a -> s{_qOrder = a}) . _Default . + _Coerce + +instance FromJSON Query where + parseJSON + = withObject "Query" + (\ o -> + Query <$> + (o .:? "groupBy" .!= mempty) <*> + (o .:? "startCursor") + <*> (o .:? "offset") + <*> (o .:? "endCursor") + <*> (o .:? "limit") + <*> (o .:? "projection" .!= mempty) + <*> (o .:? "filter") + <*> (o .:? "kinds" .!= mempty) + <*> (o .:? "order" .!= mempty)) + +instance ToJSON Query where + toJSON Query{..} + = object + (catMaybes + [("groupBy" .=) <$> _qGroupBy, + ("startCursor" .=) <$> _qStartCursor, + ("offset" .=) <$> _qOffset, + ("endCursor" .=) <$> _qEndCursor, + ("limit" .=) <$> _qLimit, + ("projection" .=) <$> _qProjection, + ("filter" .=) <$> _qFilter, ("kinds" .=) <$> _qKinds, + ("order" .=) <$> _qOrder]) + +-- | A representation of a kind. +-- +-- /See:/ 'kindExpression' smart constructor. +newtype KindExpression = KindExpression + { _keName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KindExpression' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'keName' +kindExpression + :: KindExpression +kindExpression = + KindExpression + { _keName = Nothing + } + +-- | The name of the kind. +keName :: Lens' KindExpression (Maybe Text) +keName = lens _keName (\ s a -> s{_keName = a}) + +instance FromJSON KindExpression where + parseJSON + = withObject "KindExpression" + (\ o -> KindExpression <$> (o .:? "name")) + +instance ToJSON KindExpression where + toJSON KindExpression{..} + = object (catMaybes [("name" .=) <$> _keName]) + +-- +-- /See:/ 'readOptions' smart constructor. +data ReadOptions = ReadOptions + { _roReadConsistency :: !(Maybe Text) + , _roTransaction :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadOptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'roReadConsistency' +-- +-- * 'roTransaction' +readOptions + :: ReadOptions +readOptions = + ReadOptions + { _roReadConsistency = Nothing + , _roTransaction = Nothing + } + +-- | The read consistency to use. One of default, strong, or eventual. Cannot +-- be set when transaction is set. Lookup and ancestor queries default to +-- strong, global queries default to eventual and cannot be set to strong. +-- Optional. Default is default. +roReadConsistency :: Lens' ReadOptions (Maybe Text) +roReadConsistency + = lens _roReadConsistency + (\ s a -> s{_roReadConsistency = a}) + +-- | The transaction to use. Optional. +roTransaction :: Lens' ReadOptions (Maybe Word8) +roTransaction + = lens _roTransaction + (\ s a -> s{_roTransaction = a}) + +instance FromJSON ReadOptions where + parseJSON + = withObject "ReadOptions" + (\ o -> + ReadOptions <$> + (o .:? "readConsistency") <*> (o .:? "transaction")) + +instance ToJSON ReadOptions where + toJSON ReadOptions{..} + = object + (catMaybes + [("readConsistency" .=) <$> _roReadConsistency, + ("transaction" .=) <$> _roTransaction]) + +-- +-- /See:/ 'rollbackResponse' smart constructor. +newtype RollbackResponse = RollbackResponse + { _rrHeader :: Maybe (Maybe ResponseHeader) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollbackResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrHeader' +rollbackResponse + :: RollbackResponse +rollbackResponse = + RollbackResponse + { _rrHeader = Nothing + } + +rrHeader :: Lens' RollbackResponse (Maybe (Maybe ResponseHeader)) +rrHeader = lens _rrHeader (\ s a -> s{_rrHeader = a}) + +instance FromJSON RollbackResponse where + parseJSON + = withObject "RollbackResponse" + (\ o -> RollbackResponse <$> (o .:? "header")) + +instance ToJSON RollbackResponse where + toJSON RollbackResponse{..} + = object (catMaybes [("header" .=) <$> _rrHeader]) + +-- | A representation of a property in a projection. +-- +-- /See:/ 'propertyExpression' smart constructor. +data PropertyExpression = PropertyExpression + { _peProperty :: !(Maybe (Maybe PropertyReference)) + , _peAggregationFunction :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyExpression' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'peProperty' +-- +-- * 'peAggregationFunction' +propertyExpression + :: PropertyExpression +propertyExpression = + PropertyExpression + { _peProperty = Nothing + , _peAggregationFunction = Nothing + } + +-- | The property to project. +peProperty :: Lens' PropertyExpression (Maybe (Maybe PropertyReference)) +peProperty + = lens _peProperty (\ s a -> s{_peProperty = a}) + +-- | The aggregation function to apply to the property. Optional. Can only be +-- used when grouping by at least one property. Must then be set on all +-- properties in the projection that are not being grouped by. Aggregation +-- functions: first selects the first result as determined by the query\'s +-- order. +peAggregationFunction :: Lens' PropertyExpression (Maybe Text) +peAggregationFunction + = lens _peAggregationFunction + (\ s a -> s{_peAggregationFunction = a}) + +instance FromJSON PropertyExpression where + parseJSON + = withObject "PropertyExpression" + (\ o -> + PropertyExpression <$> + (o .:? "property") <*> (o .:? "aggregationFunction")) + +instance ToJSON PropertyExpression where + toJSON PropertyExpression{..} + = object + (catMaybes + [("property" .=) <$> _peProperty, + ("aggregationFunction" .=) <$> + _peAggregationFunction]) + +-- | A holder for any type of filter. Exactly one field should be specified. +-- +-- /See:/ 'filter'' smart constructor. +data Filter = Filter + { _fCompositeFilter :: !(Maybe (Maybe CompositeFilter)) + , _fPropertyFilter :: !(Maybe (Maybe PropertyFilter)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Filter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fCompositeFilter' +-- +-- * 'fPropertyFilter' +filter' + :: Filter +filter' = + Filter + { _fCompositeFilter = Nothing + , _fPropertyFilter = Nothing + } + +-- | A composite filter. +fCompositeFilter :: Lens' Filter (Maybe (Maybe CompositeFilter)) +fCompositeFilter + = lens _fCompositeFilter + (\ s a -> s{_fCompositeFilter = a}) + +-- | A filter on a property. +fPropertyFilter :: Lens' Filter (Maybe (Maybe PropertyFilter)) +fPropertyFilter + = lens _fPropertyFilter + (\ s a -> s{_fPropertyFilter = a}) + +instance FromJSON Filter where + parseJSON + = withObject "Filter" + (\ o -> + Filter <$> + (o .:? "compositeFilter") <*> + (o .:? "propertyFilter")) + +instance ToJSON Filter where + toJSON Filter{..} + = object + (catMaybes + [("compositeFilter" .=) <$> _fCompositeFilter, + ("propertyFilter" .=) <$> _fPropertyFilter]) + +-- +-- /See:/ 'commitRequest' smart constructor. +data CommitRequest = CommitRequest + { _crMode :: !(Maybe Text) + , _crMutation :: !(Maybe (Maybe Mutation)) + , _crTransaction :: !(Maybe Word8) + , _crIgnoreReadOnly :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommitRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crMode' +-- +-- * 'crMutation' +-- +-- * 'crTransaction' +-- +-- * 'crIgnoreReadOnly' +commitRequest + :: CommitRequest +commitRequest = + CommitRequest + { _crMode = Nothing + , _crMutation = Nothing + , _crTransaction = Nothing + , _crIgnoreReadOnly = Nothing + } + +-- | The type of commit to perform. Either TRANSACTIONAL or +-- NON_TRANSACTIONAL. +crMode :: Lens' CommitRequest (Maybe Text) +crMode = lens _crMode (\ s a -> s{_crMode = a}) + +-- | The mutation to perform. Optional. +crMutation :: Lens' CommitRequest (Maybe (Maybe Mutation)) +crMutation + = lens _crMutation (\ s a -> s{_crMutation = a}) + +-- | The transaction identifier, returned by a call to beginTransaction. Must +-- be set when mode is TRANSACTIONAL. +crTransaction :: Lens' CommitRequest (Maybe Word8) +crTransaction + = lens _crTransaction + (\ s a -> s{_crTransaction = a}) + +crIgnoreReadOnly :: Lens' CommitRequest (Maybe Bool) +crIgnoreReadOnly + = lens _crIgnoreReadOnly + (\ s a -> s{_crIgnoreReadOnly = a}) + +instance FromJSON CommitRequest where + parseJSON + = withObject "CommitRequest" + (\ o -> + CommitRequest <$> + (o .:? "mode") <*> (o .:? "mutation") <*> + (o .:? "transaction") + <*> (o .:? "ignoreReadOnly")) + +instance ToJSON CommitRequest where + toJSON CommitRequest{..} + = object + (catMaybes + [("mode" .=) <$> _crMode, + ("mutation" .=) <$> _crMutation, + ("transaction" .=) <$> _crTransaction, + ("ignoreReadOnly" .=) <$> _crIgnoreReadOnly]) + +-- | An entity. +-- +-- /See:/ 'entity' smart constructor. +data Entity = Entity + { _eKey :: !(Maybe (Maybe Key)) + , _eProperties :: !(Maybe EntityProperties) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Entity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eKey' +-- +-- * 'eProperties' +entity + :: Entity +entity = + Entity + { _eKey = Nothing + , _eProperties = Nothing + } + +-- | The entity\'s key. An entity must have a key, unless otherwise +-- documented (for example, an entity in Value.entityValue may have no +-- key). An entity\'s kind is its key\'s path\'s last element\'s kind, or +-- null if it has no key. +eKey :: Lens' Entity (Maybe (Maybe Key)) +eKey = lens _eKey (\ s a -> s{_eKey = a}) + +-- | The entity\'s properties. +eProperties :: Lens' Entity (Maybe EntityProperties) +eProperties + = lens _eProperties (\ s a -> s{_eProperties = a}) + +instance FromJSON Entity where + parseJSON + = withObject "Entity" + (\ o -> + Entity <$> (o .:? "key") <*> (o .:? "properties")) + +instance ToJSON Entity where + toJSON Entity{..} + = object + (catMaybes + [("key" .=) <$> _eKey, + ("properties" .=) <$> _eProperties]) + +-- +-- /See:/ 'lookupResponse' smart constructor. +data LookupResponse = LookupResponse + { _lrDeferred :: !(Maybe [Maybe Key]) + , _lrFound :: !(Maybe [Maybe EntityResult]) + , _lrMissing :: !(Maybe [Maybe EntityResult]) + , _lrHeader :: !(Maybe (Maybe ResponseHeader)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LookupResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrDeferred' +-- +-- * 'lrFound' +-- +-- * 'lrMissing' +-- +-- * 'lrHeader' +lookupResponse + :: LookupResponse +lookupResponse = + LookupResponse + { _lrDeferred = Nothing + , _lrFound = Nothing + , _lrMissing = Nothing + , _lrHeader = Nothing + } + +-- | A list of keys that were not looked up due to resource constraints. +lrDeferred :: Lens' LookupResponse [Maybe Key] +lrDeferred + = lens _lrDeferred (\ s a -> s{_lrDeferred = a}) . + _Default + . _Coerce + +-- | Entities found. +lrFound :: Lens' LookupResponse [Maybe EntityResult] +lrFound + = lens _lrFound (\ s a -> s{_lrFound = a}) . _Default + . _Coerce + +-- | Entities not found, with only the key populated. +lrMissing :: Lens' LookupResponse [Maybe EntityResult] +lrMissing + = lens _lrMissing (\ s a -> s{_lrMissing = a}) . + _Default + . _Coerce + +lrHeader :: Lens' LookupResponse (Maybe (Maybe ResponseHeader)) +lrHeader = lens _lrHeader (\ s a -> s{_lrHeader = a}) + +instance FromJSON LookupResponse where + parseJSON + = withObject "LookupResponse" + (\ o -> + LookupResponse <$> + (o .:? "deferred" .!= mempty) <*> + (o .:? "found" .!= mempty) + <*> (o .:? "missing" .!= mempty) + <*> (o .:? "header")) + +instance ToJSON LookupResponse where + toJSON LookupResponse{..} + = object + (catMaybes + [("deferred" .=) <$> _lrDeferred, + ("found" .=) <$> _lrFound, + ("missing" .=) <$> _lrMissing, + ("header" .=) <$> _lrHeader]) + +-- | The desired order for a specific property. +-- +-- /See:/ 'propertyOrder' smart constructor. +data PropertyOrder = PropertyOrder + { _poProperty :: !(Maybe (Maybe PropertyReference)) + , _poDirection :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyOrder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'poProperty' +-- +-- * 'poDirection' +propertyOrder + :: PropertyOrder +propertyOrder = + PropertyOrder + { _poProperty = Nothing + , _poDirection = Nothing + } + +-- | The property to order by. +poProperty :: Lens' PropertyOrder (Maybe (Maybe PropertyReference)) +poProperty + = lens _poProperty (\ s a -> s{_poProperty = a}) + +-- | The direction to order by. One of ascending or descending. Optional, +-- defaults to ascending. +poDirection :: Lens' PropertyOrder (Maybe Text) +poDirection + = lens _poDirection (\ s a -> s{_poDirection = a}) + +instance FromJSON PropertyOrder where + parseJSON + = withObject "PropertyOrder" + (\ o -> + PropertyOrder <$> + (o .:? "property") <*> (o .:? "direction")) + +instance ToJSON PropertyOrder where + toJSON PropertyOrder{..} + = object + (catMaybes + [("property" .=) <$> _poProperty, + ("direction" .=) <$> _poDirection]) diff --git a/gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs b/gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs new file mode 100644 index 000000000..9d8dba913 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Datastore.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Datastore.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/AllocateIds.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/AllocateIds.hs new file mode 100644 index 000000000..bf0c85574 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/AllocateIds.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.AllocateIds +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Allocate IDs for incomplete keys (useful for referencing an entity +-- before it is inserted). +-- +-- /See:/ for @DatastoreDatasetsAllocateIds@. +module Datastore.Datasets.AllocateIds + ( + -- * REST Resource + DatasetsAllocateIdsAPI + + -- * Creating a Request + , datasetsAllocateIds + , DatasetsAllocateIds + + -- * Request Lenses + , daiQuotaUser + , daiPrettyPrint + , daiUserIp + , daiKey + , daiDatasetId + , daiOauthToken + , daiFields + , daiAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsAllocateIds@ which the +-- 'DatasetsAllocateIds' request conforms to. +type DatasetsAllocateIdsAPI = + Capture "datasetId" Text :> + "allocateIds" :> Post '[JSON] AllocateIdsResponse + +-- | Allocate IDs for incomplete keys (useful for referencing an entity +-- before it is inserted). +-- +-- /See:/ 'datasetsAllocateIds' smart constructor. +data DatasetsAllocateIds = DatasetsAllocateIds + { _daiQuotaUser :: !(Maybe Text) + , _daiPrettyPrint :: !Bool + , _daiUserIp :: !(Maybe Text) + , _daiKey :: !(Maybe Text) + , _daiDatasetId :: !Text + , _daiOauthToken :: !(Maybe Text) + , _daiFields :: !(Maybe Text) + , _daiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsAllocateIds'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'daiQuotaUser' +-- +-- * 'daiPrettyPrint' +-- +-- * 'daiUserIp' +-- +-- * 'daiKey' +-- +-- * 'daiDatasetId' +-- +-- * 'daiOauthToken' +-- +-- * 'daiFields' +-- +-- * 'daiAlt' +datasetsAllocateIds + :: Text -- ^ 'datasetId' + -> DatasetsAllocateIds +datasetsAllocateIds pDaiDatasetId_ = + DatasetsAllocateIds + { _daiQuotaUser = Nothing + , _daiPrettyPrint = True + , _daiUserIp = Nothing + , _daiKey = Nothing + , _daiDatasetId = pDaiDatasetId_ + , _daiOauthToken = Nothing + , _daiFields = Nothing + , _daiAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +daiQuotaUser :: Lens' DatasetsAllocateIds' (Maybe Text) +daiQuotaUser + = lens _daiQuotaUser (\ s a -> s{_daiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +daiPrettyPrint :: Lens' DatasetsAllocateIds' Bool +daiPrettyPrint + = lens _daiPrettyPrint + (\ s a -> s{_daiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +daiUserIp :: Lens' DatasetsAllocateIds' (Maybe Text) +daiUserIp + = lens _daiUserIp (\ s a -> s{_daiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +daiKey :: Lens' DatasetsAllocateIds' (Maybe Text) +daiKey = lens _daiKey (\ s a -> s{_daiKey = a}) + +-- | Identifies the dataset. +daiDatasetId :: Lens' DatasetsAllocateIds' Text +daiDatasetId + = lens _daiDatasetId (\ s a -> s{_daiDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +daiOauthToken :: Lens' DatasetsAllocateIds' (Maybe Text) +daiOauthToken + = lens _daiOauthToken + (\ s a -> s{_daiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +daiFields :: Lens' DatasetsAllocateIds' (Maybe Text) +daiFields + = lens _daiFields (\ s a -> s{_daiFields = a}) + +-- | Data format for the response. +daiAlt :: Lens' DatasetsAllocateIds' Text +daiAlt = lens _daiAlt (\ s a -> s{_daiAlt = a}) + +instance GoogleRequest DatasetsAllocateIds' where + type Rs DatasetsAllocateIds' = AllocateIdsResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsAllocateIds{..} + = go _daiQuotaUser _daiPrettyPrint _daiUserIp _daiKey + _daiDatasetId + _daiOauthToken + _daiFields + _daiAlt + where go + = clientWithRoute + (Proxy :: Proxy DatasetsAllocateIdsAPI) + r + u diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/BeginTransaction.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/BeginTransaction.hs new file mode 100644 index 000000000..cf0494bc7 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/BeginTransaction.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.BeginTransaction +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Begin a new transaction. +-- +-- /See:/ for @DatastoreDatasetsBeginTransaction@. +module Datastore.Datasets.BeginTransaction + ( + -- * REST Resource + DatasetsBeginTransactionAPI + + -- * Creating a Request + , datasetsBeginTransaction + , DatasetsBeginTransaction + + -- * Request Lenses + , dbtQuotaUser + , dbtPrettyPrint + , dbtUserIp + , dbtKey + , dbtDatasetId + , dbtOauthToken + , dbtFields + , dbtAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsBeginTransaction@ which the +-- 'DatasetsBeginTransaction' request conforms to. +type DatasetsBeginTransactionAPI = + Capture "datasetId" Text :> + "beginTransaction" :> + Post '[JSON] BeginTransactionResponse + +-- | Begin a new transaction. +-- +-- /See:/ 'datasetsBeginTransaction' smart constructor. +data DatasetsBeginTransaction = DatasetsBeginTransaction + { _dbtQuotaUser :: !(Maybe Text) + , _dbtPrettyPrint :: !Bool + , _dbtUserIp :: !(Maybe Text) + , _dbtKey :: !(Maybe Text) + , _dbtDatasetId :: !Text + , _dbtOauthToken :: !(Maybe Text) + , _dbtFields :: !(Maybe Text) + , _dbtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsBeginTransaction'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dbtQuotaUser' +-- +-- * 'dbtPrettyPrint' +-- +-- * 'dbtUserIp' +-- +-- * 'dbtKey' +-- +-- * 'dbtDatasetId' +-- +-- * 'dbtOauthToken' +-- +-- * 'dbtFields' +-- +-- * 'dbtAlt' +datasetsBeginTransaction + :: Text -- ^ 'datasetId' + -> DatasetsBeginTransaction +datasetsBeginTransaction pDbtDatasetId_ = + DatasetsBeginTransaction + { _dbtQuotaUser = Nothing + , _dbtPrettyPrint = True + , _dbtUserIp = Nothing + , _dbtKey = Nothing + , _dbtDatasetId = pDbtDatasetId_ + , _dbtOauthToken = Nothing + , _dbtFields = Nothing + , _dbtAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dbtQuotaUser :: Lens' DatasetsBeginTransaction' (Maybe Text) +dbtQuotaUser + = lens _dbtQuotaUser (\ s a -> s{_dbtQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dbtPrettyPrint :: Lens' DatasetsBeginTransaction' Bool +dbtPrettyPrint + = lens _dbtPrettyPrint + (\ s a -> s{_dbtPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dbtUserIp :: Lens' DatasetsBeginTransaction' (Maybe Text) +dbtUserIp + = lens _dbtUserIp (\ s a -> s{_dbtUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dbtKey :: Lens' DatasetsBeginTransaction' (Maybe Text) +dbtKey = lens _dbtKey (\ s a -> s{_dbtKey = a}) + +-- | Identifies the dataset. +dbtDatasetId :: Lens' DatasetsBeginTransaction' Text +dbtDatasetId + = lens _dbtDatasetId (\ s a -> s{_dbtDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dbtOauthToken :: Lens' DatasetsBeginTransaction' (Maybe Text) +dbtOauthToken + = lens _dbtOauthToken + (\ s a -> s{_dbtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dbtFields :: Lens' DatasetsBeginTransaction' (Maybe Text) +dbtFields + = lens _dbtFields (\ s a -> s{_dbtFields = a}) + +-- | Data format for the response. +dbtAlt :: Lens' DatasetsBeginTransaction' Text +dbtAlt = lens _dbtAlt (\ s a -> s{_dbtAlt = a}) + +instance GoogleRequest DatasetsBeginTransaction' + where + type Rs DatasetsBeginTransaction' = + BeginTransactionResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsBeginTransaction{..} + = go _dbtQuotaUser _dbtPrettyPrint _dbtUserIp _dbtKey + _dbtDatasetId + _dbtOauthToken + _dbtFields + _dbtAlt + where go + = clientWithRoute + (Proxy :: Proxy DatasetsBeginTransactionAPI) + r + u diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Commit.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Commit.hs new file mode 100644 index 000000000..b61774475 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Commit.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.Commit +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Commit a transaction, optionally creating, deleting or modifying some +-- entities. +-- +-- /See:/ for @DatastoreDatasetsCommit@. +module Datastore.Datasets.Commit + ( + -- * REST Resource + DatasetsCommitAPI + + -- * Creating a Request + , datasetsCommit + , DatasetsCommit + + -- * Request Lenses + , dcQuotaUser + , dcPrettyPrint + , dcUserIp + , dcKey + , dcDatasetId + , dcOauthToken + , dcFields + , dcAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsCommit@ which the +-- 'DatasetsCommit' request conforms to. +type DatasetsCommitAPI = + Capture "datasetId" Text :> + "commit" :> Post '[JSON] CommitResponse + +-- | Commit a transaction, optionally creating, deleting or modifying some +-- entities. +-- +-- /See:/ 'datasetsCommit' smart constructor. +data DatasetsCommit = DatasetsCommit + { _dcQuotaUser :: !(Maybe Text) + , _dcPrettyPrint :: !Bool + , _dcUserIp :: !(Maybe Text) + , _dcKey :: !(Maybe Text) + , _dcDatasetId :: !Text + , _dcOauthToken :: !(Maybe Text) + , _dcFields :: !(Maybe Text) + , _dcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsCommit'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcQuotaUser' +-- +-- * 'dcPrettyPrint' +-- +-- * 'dcUserIp' +-- +-- * 'dcKey' +-- +-- * 'dcDatasetId' +-- +-- * 'dcOauthToken' +-- +-- * 'dcFields' +-- +-- * 'dcAlt' +datasetsCommit + :: Text -- ^ 'datasetId' + -> DatasetsCommit +datasetsCommit pDcDatasetId_ = + DatasetsCommit + { _dcQuotaUser = Nothing + , _dcPrettyPrint = True + , _dcUserIp = Nothing + , _dcKey = Nothing + , _dcDatasetId = pDcDatasetId_ + , _dcOauthToken = Nothing + , _dcFields = Nothing + , _dcAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dcQuotaUser :: Lens' DatasetsCommit' (Maybe Text) +dcQuotaUser + = lens _dcQuotaUser (\ s a -> s{_dcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dcPrettyPrint :: Lens' DatasetsCommit' Bool +dcPrettyPrint + = lens _dcPrettyPrint + (\ s a -> s{_dcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dcUserIp :: Lens' DatasetsCommit' (Maybe Text) +dcUserIp = lens _dcUserIp (\ s a -> s{_dcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dcKey :: Lens' DatasetsCommit' (Maybe Text) +dcKey = lens _dcKey (\ s a -> s{_dcKey = a}) + +-- | Identifies the dataset. +dcDatasetId :: Lens' DatasetsCommit' Text +dcDatasetId + = lens _dcDatasetId (\ s a -> s{_dcDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dcOauthToken :: Lens' DatasetsCommit' (Maybe Text) +dcOauthToken + = lens _dcOauthToken (\ s a -> s{_dcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dcFields :: Lens' DatasetsCommit' (Maybe Text) +dcFields = lens _dcFields (\ s a -> s{_dcFields = a}) + +-- | Data format for the response. +dcAlt :: Lens' DatasetsCommit' Text +dcAlt = lens _dcAlt (\ s a -> s{_dcAlt = a}) + +instance GoogleRequest DatasetsCommit' where + type Rs DatasetsCommit' = CommitResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsCommit{..} + = go _dcQuotaUser _dcPrettyPrint _dcUserIp _dcKey + _dcDatasetId + _dcOauthToken + _dcFields + _dcAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsCommitAPI) + r + u diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Lookup.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Lookup.hs new file mode 100644 index 000000000..2260a4e42 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Lookup.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.Lookup +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Look up some entities by key. +-- +-- /See:/ for @DatastoreDatasetsLookup@. +module Datastore.Datasets.Lookup + ( + -- * REST Resource + DatasetsLookupAPI + + -- * Creating a Request + , datasetsLookup + , DatasetsLookup + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlUserIp + , dlKey + , dlDatasetId + , dlOauthToken + , dlFields + , dlAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsLookup@ which the +-- 'DatasetsLookup' request conforms to. +type DatasetsLookupAPI = + Capture "datasetId" Text :> + "lookup" :> Post '[JSON] LookupResponse + +-- | Look up some entities by key. +-- +-- /See:/ 'datasetsLookup' smart constructor. +data DatasetsLookup = DatasetsLookup + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlUserIp :: !(Maybe Text) + , _dlKey :: !(Maybe Text) + , _dlDatasetId :: !Text + , _dlOauthToken :: !(Maybe Text) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsLookup'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlUserIp' +-- +-- * 'dlKey' +-- +-- * 'dlDatasetId' +-- +-- * 'dlOauthToken' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +datasetsLookup + :: Text -- ^ 'datasetId' + -> DatasetsLookup +datasetsLookup pDlDatasetId_ = + DatasetsLookup + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlUserIp = Nothing + , _dlKey = Nothing + , _dlDatasetId = pDlDatasetId_ + , _dlOauthToken = Nothing + , _dlFields = Nothing + , _dlAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DatasetsLookup' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DatasetsLookup' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DatasetsLookup' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DatasetsLookup' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | Identifies the dataset. +dlDatasetId :: Lens' DatasetsLookup' Text +dlDatasetId + = lens _dlDatasetId (\ s a -> s{_dlDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DatasetsLookup' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DatasetsLookup' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DatasetsLookup' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DatasetsLookup' where + type Rs DatasetsLookup' = LookupResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsLookup{..} + = go _dlQuotaUser _dlPrettyPrint _dlUserIp _dlKey + _dlDatasetId + _dlOauthToken + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsLookupAPI) + r + u diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Rollback.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Rollback.hs new file mode 100644 index 000000000..0f401fd30 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/Rollback.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.Rollback +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Roll back a transaction. +-- +-- /See:/ for @DatastoreDatasetsRollback@. +module Datastore.Datasets.Rollback + ( + -- * REST Resource + DatasetsRollbackAPI + + -- * Creating a Request + , datasetsRollback + , DatasetsRollback + + -- * Request Lenses + , drQuotaUser + , drPrettyPrint + , drUserIp + , drKey + , drDatasetId + , drOauthToken + , drFields + , drAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsRollback@ which the +-- 'DatasetsRollback' request conforms to. +type DatasetsRollbackAPI = + Capture "datasetId" Text :> + "rollback" :> Post '[JSON] RollbackResponse + +-- | Roll back a transaction. +-- +-- /See:/ 'datasetsRollback' smart constructor. +data DatasetsRollback = DatasetsRollback + { _drQuotaUser :: !(Maybe Text) + , _drPrettyPrint :: !Bool + , _drUserIp :: !(Maybe Text) + , _drKey :: !(Maybe Text) + , _drDatasetId :: !Text + , _drOauthToken :: !(Maybe Text) + , _drFields :: !(Maybe Text) + , _drAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsRollback'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drQuotaUser' +-- +-- * 'drPrettyPrint' +-- +-- * 'drUserIp' +-- +-- * 'drKey' +-- +-- * 'drDatasetId' +-- +-- * 'drOauthToken' +-- +-- * 'drFields' +-- +-- * 'drAlt' +datasetsRollback + :: Text -- ^ 'datasetId' + -> DatasetsRollback +datasetsRollback pDrDatasetId_ = + DatasetsRollback + { _drQuotaUser = Nothing + , _drPrettyPrint = True + , _drUserIp = Nothing + , _drKey = Nothing + , _drDatasetId = pDrDatasetId_ + , _drOauthToken = Nothing + , _drFields = Nothing + , _drAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +drQuotaUser :: Lens' DatasetsRollback' (Maybe Text) +drQuotaUser + = lens _drQuotaUser (\ s a -> s{_drQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +drPrettyPrint :: Lens' DatasetsRollback' Bool +drPrettyPrint + = lens _drPrettyPrint + (\ s a -> s{_drPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +drUserIp :: Lens' DatasetsRollback' (Maybe Text) +drUserIp = lens _drUserIp (\ s a -> s{_drUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +drKey :: Lens' DatasetsRollback' (Maybe Text) +drKey = lens _drKey (\ s a -> s{_drKey = a}) + +-- | Identifies the dataset. +drDatasetId :: Lens' DatasetsRollback' Text +drDatasetId + = lens _drDatasetId (\ s a -> s{_drDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +drOauthToken :: Lens' DatasetsRollback' (Maybe Text) +drOauthToken + = lens _drOauthToken (\ s a -> s{_drOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +drFields :: Lens' DatasetsRollback' (Maybe Text) +drFields = lens _drFields (\ s a -> s{_drFields = a}) + +-- | Data format for the response. +drAlt :: Lens' DatasetsRollback' Text +drAlt = lens _drAlt (\ s a -> s{_drAlt = a}) + +instance GoogleRequest DatasetsRollback' where + type Rs DatasetsRollback' = RollbackResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsRollback{..} + = go _drQuotaUser _drPrettyPrint _drUserIp _drKey + _drDatasetId + _drOauthToken + _drFields + _drAlt + where go + = clientWithRoute + (Proxy :: Proxy DatasetsRollbackAPI) + r + u diff --git a/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/RunQuery.hs b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/RunQuery.hs new file mode 100644 index 000000000..a0bf033c6 --- /dev/null +++ b/gogol-datastore/gen/Network/Google/Resource/Datastore/Datasets/RunQuery.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Datastore.Datasets.RunQuery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Query for entities. +-- +-- /See:/ for @DatastoreDatasetsRunQuery@. +module Datastore.Datasets.RunQuery + ( + -- * REST Resource + DatasetsRunQueryAPI + + -- * Creating a Request + , datasetsRunQuery + , DatasetsRunQuery + + -- * Request Lenses + , drqQuotaUser + , drqPrettyPrint + , drqUserIp + , drqKey + , drqDatasetId + , drqOauthToken + , drqFields + , drqAlt + ) where + +import Network.Google.Datastore.Types +import Network.Google.Prelude + +-- | A resource alias for @DatastoreDatasetsRunQuery@ which the +-- 'DatasetsRunQuery' request conforms to. +type DatasetsRunQueryAPI = + Capture "datasetId" Text :> + "runQuery" :> Post '[JSON] RunQueryResponse + +-- | Query for entities. +-- +-- /See:/ 'datasetsRunQuery' smart constructor. +data DatasetsRunQuery = DatasetsRunQuery + { _drqQuotaUser :: !(Maybe Text) + , _drqPrettyPrint :: !Bool + , _drqUserIp :: !(Maybe Text) + , _drqKey :: !(Maybe Text) + , _drqDatasetId :: !Text + , _drqOauthToken :: !(Maybe Text) + , _drqFields :: !(Maybe Text) + , _drqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsRunQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drqQuotaUser' +-- +-- * 'drqPrettyPrint' +-- +-- * 'drqUserIp' +-- +-- * 'drqKey' +-- +-- * 'drqDatasetId' +-- +-- * 'drqOauthToken' +-- +-- * 'drqFields' +-- +-- * 'drqAlt' +datasetsRunQuery + :: Text -- ^ 'datasetId' + -> DatasetsRunQuery +datasetsRunQuery pDrqDatasetId_ = + DatasetsRunQuery + { _drqQuotaUser = Nothing + , _drqPrettyPrint = True + , _drqUserIp = Nothing + , _drqKey = Nothing + , _drqDatasetId = pDrqDatasetId_ + , _drqOauthToken = Nothing + , _drqFields = Nothing + , _drqAlt = "proto" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +drqQuotaUser :: Lens' DatasetsRunQuery' (Maybe Text) +drqQuotaUser + = lens _drqQuotaUser (\ s a -> s{_drqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +drqPrettyPrint :: Lens' DatasetsRunQuery' Bool +drqPrettyPrint + = lens _drqPrettyPrint + (\ s a -> s{_drqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +drqUserIp :: Lens' DatasetsRunQuery' (Maybe Text) +drqUserIp + = lens _drqUserIp (\ s a -> s{_drqUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +drqKey :: Lens' DatasetsRunQuery' (Maybe Text) +drqKey = lens _drqKey (\ s a -> s{_drqKey = a}) + +-- | Identifies the dataset. +drqDatasetId :: Lens' DatasetsRunQuery' Text +drqDatasetId + = lens _drqDatasetId (\ s a -> s{_drqDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +drqOauthToken :: Lens' DatasetsRunQuery' (Maybe Text) +drqOauthToken + = lens _drqOauthToken + (\ s a -> s{_drqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +drqFields :: Lens' DatasetsRunQuery' (Maybe Text) +drqFields + = lens _drqFields (\ s a -> s{_drqFields = a}) + +-- | Data format for the response. +drqAlt :: Lens' DatasetsRunQuery' Text +drqAlt = lens _drqAlt (\ s a -> s{_drqAlt = a}) + +instance GoogleRequest DatasetsRunQuery' where + type Rs DatasetsRunQuery' = RunQueryResponse + request = requestWithRoute defReq datastoreURL + requestWithRoute r u DatasetsRunQuery{..} + = go _drqQuotaUser _drqPrettyPrint _drqUserIp _drqKey + _drqDatasetId + _drqOauthToken + _drqFields + _drqAlt + where go + = clientWithRoute + (Proxy :: Proxy DatasetsRunQueryAPI) + r + u diff --git a/gogol-datastore/gogol-datastore.cabal b/gogol-datastore/gogol-datastore.cabal new file mode 100644 index 000000000..47fe0b732 --- /dev/null +++ b/gogol-datastore/gogol-datastore.cabal @@ -0,0 +1,48 @@ +name: gogol-datastore +version: 0.0.1 +synopsis: Google Cloud Datastore API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for accessing Google Cloud Datastore. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Datastore + , Network.Google.Datastore.Types + , Network.Google.Resource.Datastore.Datasets.AllocateIds + , Network.Google.Resource.Datastore.Datasets.BeginTransaction + , Network.Google.Resource.Datastore.Datasets.Commit + , Network.Google.Resource.Datastore.Datasets.Lookup + , Network.Google.Resource.Datastore.Datasets.Rollback + , Network.Google.Resource.Datastore.Datasets.RunQuery + + other-modules: + Network.Google.Datastore.Types.Product + , Network.Google.Datastore.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-datastore/src/.gitkeep b/gogol-datastore/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-debugger/LICENSE b/gogol-debugger/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-debugger/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-debugger/Makefile b/gogol-debugger/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-debugger/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-debugger/README.md b/gogol-debugger/README.md new file mode 100644 index 000000000..c2f6b0900 --- /dev/null +++ b/gogol-debugger/README.md @@ -0,0 +1,28 @@ +# gogol-debugger + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Debugger API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-debugger` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-debugger/Setup.hs b/gogol-debugger/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-debugger/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-debugger/gen/Network/Google/Debugger.hs b/gogol-debugger/gen/Network/Google/Debugger.hs new file mode 100644 index 000000000..ab3630d7d --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Debugger.hs @@ -0,0 +1,247 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Debugger +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you examine the stack and variables of your running application +-- without stopping or slowing it down. +-- +-- /See:/ +module Network.Google.Debugger + ( + -- * API + DebuggerAPI + , debuggerAPI + , debuggerURL + + -- * Service Methods + + -- * REST Resources + + -- ** ClouddebuggerControllerDebuggeesBreakpointsList + , module Clouddebugger.Controller.Debuggees.Breakpoints.List + + -- ** ClouddebuggerControllerDebuggeesBreakpointsUpdate + , module Clouddebugger.Controller.Debuggees.Breakpoints.Update + + -- ** ClouddebuggerControllerDebuggeesRegister + , module Clouddebugger.Controller.Debuggees.Register + + -- ** ClouddebuggerDebuggerDebuggeesBreakpointsDelete + , module Clouddebugger.Debugger.Debuggees.Breakpoints.Delete + + -- ** ClouddebuggerDebuggerDebuggeesBreakpointsGet + , module Clouddebugger.Debugger.Debuggees.Breakpoints.Get + + -- ** ClouddebuggerDebuggerDebuggeesBreakpointsList + , module Clouddebugger.Debugger.Debuggees.Breakpoints.List + + -- ** ClouddebuggerDebuggerDebuggeesBreakpointsSet + , module Clouddebugger.Debugger.Debuggees.Breakpoints.Set + + -- ** ClouddebuggerDebuggerDebuggeesList + , module Clouddebugger.Debugger.Debuggees.List + + -- * Types + + -- ** RegisterDebuggeeResponse + , RegisterDebuggeeResponse + , registerDebuggeeResponse + , rdrDebuggee + + -- ** SetBreakpointResponse + , SetBreakpointResponse + , setBreakpointResponse + , sbrBreakpoint + + -- ** SourceContext + , SourceContext + , sourceContext + , scCloudWorkspace + , scCloudRepo + , scGerrit + , scGit + + -- ** RepoId + , RepoId + , repoId + , riUid + , riProjectRepoId + + -- ** UpdateActiveBreakpointResponse + , UpdateActiveBreakpointResponse + , updateActiveBreakpointResponse + + -- ** Empty + , Empty + , empty + + -- ** GerritSourceContext + , GerritSourceContext + , gerritSourceContext + , gscGerritProject + , gscAliasName + , gscRevisionId + , gscHostUri + + -- ** ProjectRepoId + , ProjectRepoId + , projectRepoId + , priRepoName + , priProjectId + + -- ** FormatMessage + , FormatMessage + , formatMessage + , fmFormat + , fmParameters + + -- ** Breakpoint + , Breakpoint + , breakpoint + , bStatus + , bLogLevel + , bLocation + , bAction + , bFinalTime + , bExpressions + , bLogMessageFormat + , bId + , bUserEmail + , bVariableTable + , bStackFrames + , bCondition + , bEvaluatedExpressions + , bCreateTime + , bIsFinalState + + -- ** GetBreakpointResponse + , GetBreakpointResponse + , getBreakpointResponse + , gbrBreakpoint + + -- ** Variable + , Variable + , variable + , vStatus + , vVarTableIndex + , vMembers + , vValue + , vName + + -- ** ListBreakpointsResponse + , ListBreakpointsResponse + , listBreakpointsResponse + , lbrNextWaitToken + , lbrBreakpoints + + -- ** ListDebuggeesResponse + , ListDebuggeesResponse + , listDebuggeesResponse + , ldrDebuggees + + -- ** UpdateActiveBreakpointRequest + , UpdateActiveBreakpointRequest + , updateActiveBreakpointRequest + , uabrBreakpoint + + -- ** StatusMessage + , StatusMessage + , statusMessage + , smRefersTo + , smIsError + , smDescription + + -- ** ListActiveBreakpointsResponse + , ListActiveBreakpointsResponse + , listActiveBreakpointsResponse + , labrNextWaitToken + , labrBreakpoints + + -- ** GitSourceContext + , GitSourceContext + , gitSourceContext + , gUrl + , gRevisionId + + -- ** SourceLocation + , SourceLocation + , sourceLocation + , slPath + , slLine + + -- ** StackFrame + , StackFrame + , stackFrame + , sfFunction + , sfLocation + , sfArguments + , sfLocals + + -- ** CloudRepoSourceContext + , CloudRepoSourceContext + , cloudRepoSourceContext + , crscRepoId + , crscAliasName + , crscRevisionId + + -- ** RegisterDebuggeeRequest + , RegisterDebuggeeRequest + , registerDebuggeeRequest + , rDebuggee + + -- ** CloudWorkspaceSourceContext + , CloudWorkspaceSourceContext + , cloudWorkspaceSourceContext + , cwscWorkspaceId + , cwscSnapshotId + + -- ** Debuggee + , Debuggee + , debuggee + , dStatus + , dUniquifier + , dProject + , dAgentVersion + , dIsDisabled + , dId + , dLabels + , dDescription + , dIsInactive + , dSourceContexts + + -- ** CloudWorkspaceId + , CloudWorkspaceId + , cloudWorkspaceId + , cwiRepoId + , cwiName + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude +import Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.List +import Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.Update +import Network.Google.Resource.Clouddebugger.Controller.Debuggees.Register +import Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Delete +import Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Get +import Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.List +import Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Set +import Network.Google.Resource.Clouddebugger.Debugger.Debuggees.List + +{- $resources +TODO +-} + +type DebuggerAPI = Controller :<|> Debugger + +debuggerAPI :: Proxy DebuggerAPI +debuggerAPI = Proxy diff --git a/gogol-debugger/gen/Network/Google/Debugger/Types.hs b/gogol-debugger/gen/Network/Google/Debugger/Types.hs new file mode 100644 index 000000000..f87f8a870 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Debugger/Types.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Debugger.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Debugger.Types + ( + -- * Service URL + debuggerURL + + -- * RegisterDebuggeeResponse + , RegisterDebuggeeResponse + , registerDebuggeeResponse + , rdrDebuggee + + -- * SetBreakpointResponse + , SetBreakpointResponse + , setBreakpointResponse + , sbrBreakpoint + + -- * SourceContext + , SourceContext + , sourceContext + , scCloudWorkspace + , scCloudRepo + , scGerrit + , scGit + + -- * RepoId + , RepoId + , repoId + , riUid + , riProjectRepoId + + -- * UpdateActiveBreakpointResponse + , UpdateActiveBreakpointResponse + , updateActiveBreakpointResponse + + -- * Empty + , Empty + , empty + + -- * GerritSourceContext + , GerritSourceContext + , gerritSourceContext + , gscGerritProject + , gscAliasName + , gscRevisionId + , gscHostUri + + -- * ProjectRepoId + , ProjectRepoId + , projectRepoId + , priRepoName + , priProjectId + + -- * FormatMessage + , FormatMessage + , formatMessage + , fmFormat + , fmParameters + + -- * Breakpoint + , Breakpoint + , breakpoint + , bStatus + , bLogLevel + , bLocation + , bAction + , bFinalTime + , bExpressions + , bLogMessageFormat + , bId + , bUserEmail + , bVariableTable + , bStackFrames + , bCondition + , bEvaluatedExpressions + , bCreateTime + , bIsFinalState + + -- * GetBreakpointResponse + , GetBreakpointResponse + , getBreakpointResponse + , gbrBreakpoint + + -- * Variable + , Variable + , variable + , vStatus + , vVarTableIndex + , vMembers + , vValue + , vName + + -- * ListBreakpointsResponse + , ListBreakpointsResponse + , listBreakpointsResponse + , lbrNextWaitToken + , lbrBreakpoints + + -- * ListDebuggeesResponse + , ListDebuggeesResponse + , listDebuggeesResponse + , ldrDebuggees + + -- * UpdateActiveBreakpointRequest + , UpdateActiveBreakpointRequest + , updateActiveBreakpointRequest + , uabrBreakpoint + + -- * StatusMessage + , StatusMessage + , statusMessage + , smRefersTo + , smIsError + , smDescription + + -- * ListActiveBreakpointsResponse + , ListActiveBreakpointsResponse + , listActiveBreakpointsResponse + , labrNextWaitToken + , labrBreakpoints + + -- * GitSourceContext + , GitSourceContext + , gitSourceContext + , gUrl + , gRevisionId + + -- * SourceLocation + , SourceLocation + , sourceLocation + , slPath + , slLine + + -- * StackFrame + , StackFrame + , stackFrame + , sfFunction + , sfLocation + , sfArguments + , sfLocals + + -- * CloudRepoSourceContext + , CloudRepoSourceContext + , cloudRepoSourceContext + , crscRepoId + , crscAliasName + , crscRevisionId + + -- * RegisterDebuggeeRequest + , RegisterDebuggeeRequest + , registerDebuggeeRequest + , rDebuggee + + -- * CloudWorkspaceSourceContext + , CloudWorkspaceSourceContext + , cloudWorkspaceSourceContext + , cwscWorkspaceId + , cwscSnapshotId + + -- * Debuggee + , Debuggee + , debuggee + , dStatus + , dUniquifier + , dProject + , dAgentVersion + , dIsDisabled + , dId + , dLabels + , dDescription + , dIsInactive + , dSourceContexts + + -- * CloudWorkspaceId + , CloudWorkspaceId + , cloudWorkspaceId + , cwiRepoId + , cwiName + ) where + +import Network.Google.Debugger.Types.Product +import Network.Google.Debugger.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google Cloud Debugger API. +debuggerURL :: BaseURL +debuggerURL + = BaseUrl Https + "https://clouddebugger.googleapis.com/" + 443 diff --git a/gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs b/gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs new file mode 100644 index 000000000..b59c8333a --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs @@ -0,0 +1,1581 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Debugger.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Debugger.Types.Product where + +import Network.Google.Debugger.Types.Sum +import Network.Google.Prelude + +-- | The response of registering a debuggee. +-- +-- /See:/ 'registerDebuggeeResponse' smart constructor. +newtype RegisterDebuggeeResponse = RegisterDebuggeeResponse + { _rdrDebuggee :: Maybe (Maybe Debuggee) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegisterDebuggeeResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdrDebuggee' +registerDebuggeeResponse + :: RegisterDebuggeeResponse +registerDebuggeeResponse = + RegisterDebuggeeResponse + { _rdrDebuggee = Nothing + } + +-- | The debuggee resource. The field \'id\' is guranteed to be set (in +-- addition to the echoed fields). +rdrDebuggee :: Lens' RegisterDebuggeeResponse (Maybe (Maybe Debuggee)) +rdrDebuggee + = lens _rdrDebuggee (\ s a -> s{_rdrDebuggee = a}) + +instance FromJSON RegisterDebuggeeResponse where + parseJSON + = withObject "RegisterDebuggeeResponse" + (\ o -> + RegisterDebuggeeResponse <$> (o .:? "debuggee")) + +instance ToJSON RegisterDebuggeeResponse where + toJSON RegisterDebuggeeResponse{..} + = object + (catMaybes [("debuggee" .=) <$> _rdrDebuggee]) + +-- | The response of setting a breakpoint. +-- +-- /See:/ 'setBreakpointResponse' smart constructor. +newtype SetBreakpointResponse = SetBreakpointResponse + { _sbrBreakpoint :: Maybe (Maybe Breakpoint) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SetBreakpointResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sbrBreakpoint' +setBreakpointResponse + :: SetBreakpointResponse +setBreakpointResponse = + SetBreakpointResponse + { _sbrBreakpoint = Nothing + } + +-- | The breakpoint resource. The field \'id\' is guranteed to be set (in +-- addition to the echoed fileds). +sbrBreakpoint :: Lens' SetBreakpointResponse (Maybe (Maybe Breakpoint)) +sbrBreakpoint + = lens _sbrBreakpoint + (\ s a -> s{_sbrBreakpoint = a}) + +instance FromJSON SetBreakpointResponse where + parseJSON + = withObject "SetBreakpointResponse" + (\ o -> + SetBreakpointResponse <$> (o .:? "breakpoint")) + +instance ToJSON SetBreakpointResponse where + toJSON SetBreakpointResponse{..} + = object + (catMaybes [("breakpoint" .=) <$> _sbrBreakpoint]) + +-- | A SourceContext is a reference to a tree of files. A SourceContext +-- together with a path point to a unique revision of a single file or +-- directory. +-- +-- /See:/ 'sourceContext' smart constructor. +data SourceContext = SourceContext + { _scCloudWorkspace :: !(Maybe (Maybe CloudWorkspaceSourceContext)) + , _scCloudRepo :: !(Maybe (Maybe CloudRepoSourceContext)) + , _scGerrit :: !(Maybe (Maybe GerritSourceContext)) + , _scGit :: !(Maybe (Maybe GitSourceContext)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scCloudWorkspace' +-- +-- * 'scCloudRepo' +-- +-- * 'scGerrit' +-- +-- * 'scGit' +sourceContext + :: SourceContext +sourceContext = + SourceContext + { _scCloudWorkspace = Nothing + , _scCloudRepo = Nothing + , _scGerrit = Nothing + , _scGit = Nothing + } + +-- | A SourceContext referring to a snapshot in a cloud workspace. +scCloudWorkspace :: Lens' SourceContext (Maybe (Maybe CloudWorkspaceSourceContext)) +scCloudWorkspace + = lens _scCloudWorkspace + (\ s a -> s{_scCloudWorkspace = a}) + +-- | A SourceContext referring to a revision in a cloud repo. +scCloudRepo :: Lens' SourceContext (Maybe (Maybe CloudRepoSourceContext)) +scCloudRepo + = lens _scCloudRepo (\ s a -> s{_scCloudRepo = a}) + +-- | A SourceContext referring to a Gerrit project. +scGerrit :: Lens' SourceContext (Maybe (Maybe GerritSourceContext)) +scGerrit = lens _scGerrit (\ s a -> s{_scGerrit = a}) + +-- | A SourceContext referring to any third party Git repo (e.g. GitHub). +scGit :: Lens' SourceContext (Maybe (Maybe GitSourceContext)) +scGit = lens _scGit (\ s a -> s{_scGit = a}) + +instance FromJSON SourceContext where + parseJSON + = withObject "SourceContext" + (\ o -> + SourceContext <$> + (o .:? "cloudWorkspace") <*> (o .:? "cloudRepo") <*> + (o .:? "gerrit") + <*> (o .:? "git")) + +instance ToJSON SourceContext where + toJSON SourceContext{..} + = object + (catMaybes + [("cloudWorkspace" .=) <$> _scCloudWorkspace, + ("cloudRepo" .=) <$> _scCloudRepo, + ("gerrit" .=) <$> _scGerrit, ("git" .=) <$> _scGit]) + +-- | A unique identifier for a cloud repo. +-- +-- /See:/ 'repoId' smart constructor. +data RepoId = RepoId + { _riUid :: !(Maybe Text) + , _riProjectRepoId :: !(Maybe (Maybe ProjectRepoId)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepoId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riUid' +-- +-- * 'riProjectRepoId' +repoId + :: RepoId +repoId = + RepoId + { _riUid = Nothing + , _riProjectRepoId = Nothing + } + +-- | A server-assigned, globally unique identifier. +riUid :: Lens' RepoId (Maybe Text) +riUid = lens _riUid (\ s a -> s{_riUid = a}) + +-- | A combination of a project ID and a repo name. +riProjectRepoId :: Lens' RepoId (Maybe (Maybe ProjectRepoId)) +riProjectRepoId + = lens _riProjectRepoId + (\ s a -> s{_riProjectRepoId = a}) + +instance FromJSON RepoId where + parseJSON + = withObject "RepoId" + (\ o -> + RepoId <$> (o .:? "uid") <*> (o .:? "projectRepoId")) + +instance ToJSON RepoId where + toJSON RepoId{..} + = object + (catMaybes + [("uid" .=) <$> _riUid, + ("projectRepoId" .=) <$> _riProjectRepoId]) + +-- | The response of updating an active breakpoint. The message is defined to +-- allow future extensions. +-- +-- /See:/ 'updateActiveBreakpointResponse' smart constructor. +data UpdateActiveBreakpointResponse = + UpdateActiveBreakpointResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateActiveBreakpointResponse' with the minimum fields required to make a request. +-- +updateActiveBreakpointResponse + :: UpdateActiveBreakpointResponse +updateActiveBreakpointResponse = UpdateActiveBreakpointResponse + +instance FromJSON UpdateActiveBreakpointResponse + where + parseJSON + = withObject "UpdateActiveBreakpointResponse" + (\ o -> pure UpdateActiveBreakpointResponse) + +instance ToJSON UpdateActiveBreakpointResponse where + toJSON = const (Object mempty) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | A SourceContext referring to a Gerrit project. +-- +-- /See:/ 'gerritSourceContext' smart constructor. +data GerritSourceContext = GerritSourceContext + { _gscGerritProject :: !(Maybe Text) + , _gscAliasName :: !(Maybe Text) + , _gscRevisionId :: !(Maybe Text) + , _gscHostUri :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GerritSourceContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gscGerritProject' +-- +-- * 'gscAliasName' +-- +-- * 'gscRevisionId' +-- +-- * 'gscHostUri' +gerritSourceContext + :: GerritSourceContext +gerritSourceContext = + GerritSourceContext + { _gscGerritProject = Nothing + , _gscAliasName = Nothing + , _gscRevisionId = Nothing + , _gscHostUri = Nothing + } + +-- | The full project name within the host. Projects may be nested, so +-- \"project\/subproject\" is a valid project name. The \"repo name\" is +-- hostURI\/project. +gscGerritProject :: Lens' GerritSourceContext (Maybe Text) +gscGerritProject + = lens _gscGerritProject + (\ s a -> s{_gscGerritProject = a}) + +-- | The name of an alias (branch, tag, etc.). +gscAliasName :: Lens' GerritSourceContext (Maybe Text) +gscAliasName + = lens _gscAliasName (\ s a -> s{_gscAliasName = a}) + +-- | A revision (commit) ID. +gscRevisionId :: Lens' GerritSourceContext (Maybe Text) +gscRevisionId + = lens _gscRevisionId + (\ s a -> s{_gscRevisionId = a}) + +-- | The URI of a running Gerrit instance. +gscHostUri :: Lens' GerritSourceContext (Maybe Text) +gscHostUri + = lens _gscHostUri (\ s a -> s{_gscHostUri = a}) + +instance FromJSON GerritSourceContext where + parseJSON + = withObject "GerritSourceContext" + (\ o -> + GerritSourceContext <$> + (o .:? "gerritProject") <*> (o .:? "aliasName") <*> + (o .:? "revisionId") + <*> (o .:? "hostUri")) + +instance ToJSON GerritSourceContext where + toJSON GerritSourceContext{..} + = object + (catMaybes + [("gerritProject" .=) <$> _gscGerritProject, + ("aliasName" .=) <$> _gscAliasName, + ("revisionId" .=) <$> _gscRevisionId, + ("hostUri" .=) <$> _gscHostUri]) + +-- | Selects a repo using a Google Cloud Platform project ID (e.g. +-- winged-cargo-31) and a repo name within that project. +-- +-- /See:/ 'projectRepoId' smart constructor. +data ProjectRepoId = ProjectRepoId + { _priRepoName :: !(Maybe Text) + , _priProjectId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectRepoId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'priRepoName' +-- +-- * 'priProjectId' +projectRepoId + :: ProjectRepoId +projectRepoId = + ProjectRepoId + { _priRepoName = Nothing + , _priProjectId = Nothing + } + +-- | The name of the repo. Leave empty for the default repo. +priRepoName :: Lens' ProjectRepoId (Maybe Text) +priRepoName + = lens _priRepoName (\ s a -> s{_priRepoName = a}) + +-- | The ID of the project. +priProjectId :: Lens' ProjectRepoId (Maybe Text) +priProjectId + = lens _priProjectId (\ s a -> s{_priProjectId = a}) + +instance FromJSON ProjectRepoId where + parseJSON + = withObject "ProjectRepoId" + (\ o -> + ProjectRepoId <$> + (o .:? "repoName") <*> (o .:? "projectId")) + +instance ToJSON ProjectRepoId where + toJSON ProjectRepoId{..} + = object + (catMaybes + [("repoName" .=) <$> _priRepoName, + ("projectId" .=) <$> _priProjectId]) + +-- | Represents a message with parameters. +-- +-- /See:/ 'formatMessage' smart constructor. +data FormatMessage = FormatMessage + { _fmFormat :: !(Maybe Text) + , _fmParameters :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FormatMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fmFormat' +-- +-- * 'fmParameters' +formatMessage + :: FormatMessage +formatMessage = + FormatMessage + { _fmFormat = Nothing + , _fmParameters = Nothing + } + +-- | Format template of the message. The \"format\" uses placeholders \"$0\", +-- \"$1\", etc. to reference parameters. \"$$\" can be used to denote the \'$\' +-- character. Examples: \"Failed to load \'$0\' which helps debug $1 the +-- first time it is loaded. Again, $0 is very important.\" \"Please pay +-- $$10 to use $0 instead of $1.\" +fmFormat :: Lens' FormatMessage (Maybe Text) +fmFormat = lens _fmFormat (\ s a -> s{_fmFormat = a}) + +-- | Optional parameters to be embedded into the message. +fmParameters :: Lens' FormatMessage [Text] +fmParameters + = lens _fmParameters (\ s a -> s{_fmParameters = a}) + . _Default + . _Coerce + +instance FromJSON FormatMessage where + parseJSON + = withObject "FormatMessage" + (\ o -> + FormatMessage <$> + (o .:? "format") <*> (o .:? "parameters" .!= mempty)) + +instance ToJSON FormatMessage where + toJSON FormatMessage{..} + = object + (catMaybes + [("format" .=) <$> _fmFormat, + ("parameters" .=) <$> _fmParameters]) + +-- | Represents the breakpoint specification, status and results. +-- +-- /See:/ 'breakpoint' smart constructor. +data Breakpoint = Breakpoint + { _bStatus :: !(Maybe (Maybe StatusMessage)) + , _bLogLevel :: !(Maybe Text) + , _bLocation :: !(Maybe (Maybe SourceLocation)) + , _bAction :: !(Maybe Text) + , _bFinalTime :: !(Maybe Text) + , _bExpressions :: !(Maybe [Text]) + , _bLogMessageFormat :: !(Maybe Text) + , _bId :: !(Maybe Text) + , _bUserEmail :: !(Maybe Text) + , _bVariableTable :: !(Maybe [Maybe Variable]) + , _bStackFrames :: !(Maybe [Maybe StackFrame]) + , _bCondition :: !(Maybe Text) + , _bEvaluatedExpressions :: !(Maybe [Maybe Variable]) + , _bCreateTime :: !(Maybe Text) + , _bIsFinalState :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Breakpoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bStatus' +-- +-- * 'bLogLevel' +-- +-- * 'bLocation' +-- +-- * 'bAction' +-- +-- * 'bFinalTime' +-- +-- * 'bExpressions' +-- +-- * 'bLogMessageFormat' +-- +-- * 'bId' +-- +-- * 'bUserEmail' +-- +-- * 'bVariableTable' +-- +-- * 'bStackFrames' +-- +-- * 'bCondition' +-- +-- * 'bEvaluatedExpressions' +-- +-- * 'bCreateTime' +-- +-- * 'bIsFinalState' +breakpoint + :: Breakpoint +breakpoint = + Breakpoint + { _bStatus = Nothing + , _bLogLevel = Nothing + , _bLocation = Nothing + , _bAction = Nothing + , _bFinalTime = Nothing + , _bExpressions = Nothing + , _bLogMessageFormat = Nothing + , _bId = Nothing + , _bUserEmail = Nothing + , _bVariableTable = Nothing + , _bStackFrames = Nothing + , _bCondition = Nothing + , _bEvaluatedExpressions = Nothing + , _bCreateTime = Nothing + , _bIsFinalState = Nothing + } + +-- | Breakpoint status. The status includes an error flag and a human +-- readable message. This field will usually stay unset. The message can be +-- either informational or error. Nevertheless, clients should always +-- display the text message back to the user. Error status of a breakpoint +-- indicates complete failure. Example (non-final state): \'Still loading +-- symbols...\' Examples (final state): \'Failed to insert breakpoint\' +-- referring to breakpoint, \'Field f not found in class C\' referring to +-- condition, ... +bStatus :: Lens' Breakpoint (Maybe (Maybe StatusMessage)) +bStatus = lens _bStatus (\ s a -> s{_bStatus = a}) + +-- | Indicates the severity of the log. Only relevant when action is \"LOG\". +bLogLevel :: Lens' Breakpoint (Maybe Text) +bLogLevel + = lens _bLogLevel (\ s a -> s{_bLogLevel = a}) + +-- | The breakpoint source location. +bLocation :: Lens' Breakpoint (Maybe (Maybe SourceLocation)) +bLocation + = lens _bLocation (\ s a -> s{_bLocation = a}) + +-- | Defines what to do when the breakpoint hits. +bAction :: Lens' Breakpoint (Maybe Text) +bAction = lens _bAction (\ s a -> s{_bAction = a}) + +-- | The time this breakpoint was finalized as seen by the server. The value +-- is in seconds resolution. +bFinalTime :: Lens' Breakpoint (Maybe Text) +bFinalTime + = lens _bFinalTime (\ s a -> s{_bFinalTime = a}) + +-- | A list of read-only expressions to evaluate at the breakpoint location. +-- The expressions are composed using expressions in the programming +-- language at the source location. If the breakpoint action is \"LOG\", +-- the evaluated expressions are included in log statements. +bExpressions :: Lens' Breakpoint [Text] +bExpressions + = lens _bExpressions (\ s a -> s{_bExpressions = a}) + . _Default + . _Coerce + +-- | Only relevant when action is \"LOG\". Defines the message to log when +-- the breakpoint hits. The message may include parameter placeholders +-- \"$0\", \"$1\", etc. These placeholders will be replaced with the +-- evaluated value of the appropriate expression. Expressions not +-- referenced in \"log_message_format\" will not be logged. Example: +-- \"Poisonous message received, id = $0, count = $1\" with expressions = [ +-- \"message.id\", \"message.count\" ]. +bLogMessageFormat :: Lens' Breakpoint (Maybe Text) +bLogMessageFormat + = lens _bLogMessageFormat + (\ s a -> s{_bLogMessageFormat = a}) + +-- | Breakpoint identifier, unique in the scope of the debuggee. +bId :: Lens' Breakpoint (Maybe Text) +bId = lens _bId (\ s a -> s{_bId = a}) + +-- | The e-mail of the user that created this breakpoint +bUserEmail :: Lens' Breakpoint (Maybe Text) +bUserEmail + = lens _bUserEmail (\ s a -> s{_bUserEmail = a}) + +-- | The variable_table exists to aid with computation, memory and network +-- traffic optimization. It enables storing a variable once and reference +-- it from multiple variables, including variables stored in the +-- variable_table itself. For example, the object \'this\', which may +-- appear at many levels of the stack, can have all of it\'s data stored +-- once in this table. The stack frame variables then would hold only a +-- reference to it. The variable var_index field is an index into this +-- repeated field. The stored objects are nameless and get their name from +-- the referencing variable. The effective variable is a merge of the +-- referencing veariable and the referenced variable. +bVariableTable :: Lens' Breakpoint [Maybe Variable] +bVariableTable + = lens _bVariableTable + (\ s a -> s{_bVariableTable = a}) + . _Default + . _Coerce + +-- | The stack at breakpoint time. +bStackFrames :: Lens' Breakpoint [Maybe StackFrame] +bStackFrames + = lens _bStackFrames (\ s a -> s{_bStackFrames = a}) + . _Default + . _Coerce + +-- | A condition to trigger the breakpoint. The condition is a compound +-- boolean expression composed using expressions in a programming language +-- at the source location. +bCondition :: Lens' Breakpoint (Maybe Text) +bCondition + = lens _bCondition (\ s a -> s{_bCondition = a}) + +-- | The evaluated expressions\' values at breakpoint time. The evaluated +-- expressions appear in exactly the same order they are listed in the +-- \'expressions\' field. The \'name\' field holds the original expression +-- text, the \'value\'\/\'members\' field holds the result of the evaluated +-- expression. If the expression can not be evaluated, an error text is +-- placed in the value field. +bEvaluatedExpressions :: Lens' Breakpoint [Maybe Variable] +bEvaluatedExpressions + = lens _bEvaluatedExpressions + (\ s a -> s{_bEvaluatedExpressions = a}) + . _Default + . _Coerce + +-- | The time this breakpoint was created by the server. The value is in +-- seconds resolution. +bCreateTime :: Lens' Breakpoint (Maybe Text) +bCreateTime + = lens _bCreateTime (\ s a -> s{_bCreateTime = a}) + +-- | When true, indicates that this is a final result and the breakpoint +-- state will not change from here on. +bIsFinalState :: Lens' Breakpoint (Maybe Bool) +bIsFinalState + = lens _bIsFinalState + (\ s a -> s{_bIsFinalState = a}) + +instance FromJSON Breakpoint where + parseJSON + = withObject "Breakpoint" + (\ o -> + Breakpoint <$> + (o .:? "status") <*> (o .:? "logLevel") <*> + (o .:? "location") + <*> (o .:? "action") + <*> (o .:? "finalTime") + <*> (o .:? "expressions" .!= mempty) + <*> (o .:? "logMessageFormat") + <*> (o .:? "id") + <*> (o .:? "userEmail") + <*> (o .:? "variableTable" .!= mempty) + <*> (o .:? "stackFrames" .!= mempty) + <*> (o .:? "condition") + <*> (o .:? "evaluatedExpressions" .!= mempty) + <*> (o .:? "createTime") + <*> (o .:? "isFinalState")) + +instance ToJSON Breakpoint where + toJSON Breakpoint{..} + = object + (catMaybes + [("status" .=) <$> _bStatus, + ("logLevel" .=) <$> _bLogLevel, + ("location" .=) <$> _bLocation, + ("action" .=) <$> _bAction, + ("finalTime" .=) <$> _bFinalTime, + ("expressions" .=) <$> _bExpressions, + ("logMessageFormat" .=) <$> _bLogMessageFormat, + ("id" .=) <$> _bId, ("userEmail" .=) <$> _bUserEmail, + ("variableTable" .=) <$> _bVariableTable, + ("stackFrames" .=) <$> _bStackFrames, + ("condition" .=) <$> _bCondition, + ("evaluatedExpressions" .=) <$> + _bEvaluatedExpressions, + ("createTime" .=) <$> _bCreateTime, + ("isFinalState" .=) <$> _bIsFinalState]) + +-- | The response of getting breakpoint information. +-- +-- /See:/ 'getBreakpointResponse' smart constructor. +newtype GetBreakpointResponse = GetBreakpointResponse + { _gbrBreakpoint :: Maybe (Maybe Breakpoint) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetBreakpointResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gbrBreakpoint' +getBreakpointResponse + :: GetBreakpointResponse +getBreakpointResponse = + GetBreakpointResponse + { _gbrBreakpoint = Nothing + } + +-- | The complete breakpoint state. The fields \'id\' and \'location\' are +-- guranteed to be set. +gbrBreakpoint :: Lens' GetBreakpointResponse (Maybe (Maybe Breakpoint)) +gbrBreakpoint + = lens _gbrBreakpoint + (\ s a -> s{_gbrBreakpoint = a}) + +instance FromJSON GetBreakpointResponse where + parseJSON + = withObject "GetBreakpointResponse" + (\ o -> + GetBreakpointResponse <$> (o .:? "breakpoint")) + +instance ToJSON GetBreakpointResponse where + toJSON GetBreakpointResponse{..} + = object + (catMaybes [("breakpoint" .=) <$> _gbrBreakpoint]) + +-- | Represents a variable or an argument possibly of a compound object type. +-- 1. A simple variable such as, int x = 5 is represented as: { name: +-- \"x\", value: \"5\" } 2. A compound object such as, struct T { int m1; +-- int m2; }; T x = { 3, 7 }; is represented as: { name: \"x\", members { +-- name: \"m1\", value: \"3\" }, members { name: \"m2\", value: \"7\" } } +-- 3. A pointer where the pointee was captured such as, T x = { 3, 7 }; T* +-- p = &x; is represented as: { name: \"p\", value: \"0x00500500\", members +-- { name: \"m1\", value: \"3\" }, members { name: \"m2\", value: \"7\" } } +-- 4. A pointer where the pointee was not captured or is inaccessible such +-- as, T* p = new T; is represented as: { name: \"p\", value: +-- \"0x00400400\", members { value: \"\" } } the value text should decribe +-- the reason for the missing value. such as , , . note that a null pointer +-- should not have members. 5. An unnamed value such as, int* p = new +-- int(7); is represented as, { name: \"p\", value: \"0x00500500\", members +-- { value: \"7\" } } 6. An unnamed pointer where the pointee was not +-- captured such as, int* p = new int(7); int** pp = &p; is represented as: +-- { name: \"pp\", value: \"0x00500500\", members { value: \"0x00400400\", +-- members { value: \"\" } } } To optimize computation, memory and network +-- traffic, variables that repeat in the output multiple times can be +-- stored once in a shared variable table and be referenced using the +-- var_index field. The variables stored in the shared table are nameless +-- and are essentially a partition of the complete variable. To reconstruct +-- the complete variable merge the referencing variable with the referenced +-- variable. When using the shared variable table, variables can be +-- represented as: T x = { 3, 7 }; T* p = &x; T& r = x; are represented as, +-- { name: \"x\", var_index: 3 } { name: \"p\", value \"0x00500500\", +-- var_index: 3 } { name: \"r\", var_index: 3 } with shared variable table +-- entry #3: { members { name: \"m1\", value: \"3\" }, members { name: +-- \"m2\", value: \"7\" } } Note that the pointer address is stored with +-- the referencing variable and not with the referenced variable, to allow +-- the referenced variable to be shared between pointer and references. +-- +-- /See:/ 'variable' smart constructor. +data Variable = Variable + { _vStatus :: !(Maybe (Maybe StatusMessage)) + , _vVarTableIndex :: !(Maybe Int32) + , _vMembers :: !(Maybe [Maybe Variable]) + , _vValue :: !(Maybe Text) + , _vName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Variable' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vStatus' +-- +-- * 'vVarTableIndex' +-- +-- * 'vMembers' +-- +-- * 'vValue' +-- +-- * 'vName' +variable + :: Variable +variable = + Variable + { _vStatus = Nothing + , _vVarTableIndex = Nothing + , _vMembers = Nothing + , _vValue = Nothing + , _vName = Nothing + } + +-- | Status associated with the variable. This field will usually stay unset. +-- A status of a single variable only applies to that variable or +-- expression. The rest of breakpoint data still remains valid. Variables +-- might be reported in error state even when breakpoint is not in final +-- state. The message may refer to variable name with \"refers_to\" set to +-- \"VARIABLE_NAME\". Alternatively \"refers_to\" will be set to +-- \"VARIABLE_VALUE\". In either case variable value and members will be +-- unset. Example of error message applied to name: \"Invalid expression +-- syntax\". Example of information message applied to value: \"Not +-- captured\". Examples of error message applied to value: \"Malformed +-- string\", \"Field f not found in class C\", \"Null pointer +-- dereference\". +vStatus :: Lens' Variable (Maybe (Maybe StatusMessage)) +vStatus = lens _vStatus (\ s a -> s{_vStatus = a}) + +-- | This is a reference to a variable in the shared variable table. More +-- than one variable can reference the same variable in the table. The +-- var_index field is an index into variable_table in Breakpoint. +vVarTableIndex :: Lens' Variable (Maybe Int32) +vVarTableIndex + = lens _vVarTableIndex + (\ s a -> s{_vVarTableIndex = a}) + +-- | The members contained or pointed to by the variable. +vMembers :: Lens' Variable [Maybe Variable] +vMembers + = lens _vMembers (\ s a -> s{_vMembers = a}) . + _Default + . _Coerce + +-- | The simple value of the variable. +vValue :: Lens' Variable (Maybe Text) +vValue = lens _vValue (\ s a -> s{_vValue = a}) + +-- | The name of the variable, if any. +vName :: Lens' Variable (Maybe Text) +vName = lens _vName (\ s a -> s{_vName = a}) + +instance FromJSON Variable where + parseJSON + = withObject "Variable" + (\ o -> + Variable <$> + (o .:? "status") <*> (o .:? "varTableIndex") <*> + (o .:? "members" .!= mempty) + <*> (o .:? "value") + <*> (o .:? "name")) + +instance ToJSON Variable where + toJSON Variable{..} + = object + (catMaybes + [("status" .=) <$> _vStatus, + ("varTableIndex" .=) <$> _vVarTableIndex, + ("members" .=) <$> _vMembers, + ("value" .=) <$> _vValue, ("name" .=) <$> _vName]) + +-- | The response of listing breakpoints. +-- +-- /See:/ 'listBreakpointsResponse' smart constructor. +data ListBreakpointsResponse = ListBreakpointsResponse + { _lbrNextWaitToken :: !(Maybe Text) + , _lbrBreakpoints :: !(Maybe [Maybe Breakpoint]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListBreakpointsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbrNextWaitToken' +-- +-- * 'lbrBreakpoints' +listBreakpointsResponse + :: ListBreakpointsResponse +listBreakpointsResponse = + ListBreakpointsResponse + { _lbrNextWaitToken = Nothing + , _lbrBreakpoints = Nothing + } + +-- | A wait token that can be used in the next call to ListBreakpoints to +-- block until the list of breakpoints has changes. +lbrNextWaitToken :: Lens' ListBreakpointsResponse (Maybe Text) +lbrNextWaitToken + = lens _lbrNextWaitToken + (\ s a -> s{_lbrNextWaitToken = a}) + +-- | List of all breakpoints with complete state. The fields \'id\' and +-- \'location\' are guranteed to be set on each breakpoint. +lbrBreakpoints :: Lens' ListBreakpointsResponse [Maybe Breakpoint] +lbrBreakpoints + = lens _lbrBreakpoints + (\ s a -> s{_lbrBreakpoints = a}) + . _Default + . _Coerce + +instance FromJSON ListBreakpointsResponse where + parseJSON + = withObject "ListBreakpointsResponse" + (\ o -> + ListBreakpointsResponse <$> + (o .:? "nextWaitToken") <*> + (o .:? "breakpoints" .!= mempty)) + +instance ToJSON ListBreakpointsResponse where + toJSON ListBreakpointsResponse{..} + = object + (catMaybes + [("nextWaitToken" .=) <$> _lbrNextWaitToken, + ("breakpoints" .=) <$> _lbrBreakpoints]) + +-- | The response of listing debuggees. +-- +-- /See:/ 'listDebuggeesResponse' smart constructor. +newtype ListDebuggeesResponse = ListDebuggeesResponse + { _ldrDebuggees :: Maybe [Maybe Debuggee] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListDebuggeesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldrDebuggees' +listDebuggeesResponse + :: ListDebuggeesResponse +listDebuggeesResponse = + ListDebuggeesResponse + { _ldrDebuggees = Nothing + } + +-- | The list of debuggees accessible to the calling user. Note that the +-- description field is the only human readable field that should be +-- displayed to the user. The fields \'debuggee.id\' and \'description\' +-- are guranteed to be set on each debuggee. +ldrDebuggees :: Lens' ListDebuggeesResponse [Maybe Debuggee] +ldrDebuggees + = lens _ldrDebuggees (\ s a -> s{_ldrDebuggees = a}) + . _Default + . _Coerce + +instance FromJSON ListDebuggeesResponse where + parseJSON + = withObject "ListDebuggeesResponse" + (\ o -> + ListDebuggeesResponse <$> + (o .:? "debuggees" .!= mempty)) + +instance ToJSON ListDebuggeesResponse where + toJSON ListDebuggeesResponse{..} + = object + (catMaybes [("debuggees" .=) <$> _ldrDebuggees]) + +-- | The request to update an active breakpoint. +-- +-- /See:/ 'updateActiveBreakpointRequest' smart constructor. +newtype UpdateActiveBreakpointRequest = UpdateActiveBreakpointRequest + { _uabrBreakpoint :: Maybe (Maybe Breakpoint) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateActiveBreakpointRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uabrBreakpoint' +updateActiveBreakpointRequest + :: UpdateActiveBreakpointRequest +updateActiveBreakpointRequest = + UpdateActiveBreakpointRequest + { _uabrBreakpoint = Nothing + } + +-- | The updated breakpoint information. The field \'id\' must be set. +uabrBreakpoint :: Lens' UpdateActiveBreakpointRequest (Maybe (Maybe Breakpoint)) +uabrBreakpoint + = lens _uabrBreakpoint + (\ s a -> s{_uabrBreakpoint = a}) + +instance FromJSON UpdateActiveBreakpointRequest where + parseJSON + = withObject "UpdateActiveBreakpointRequest" + (\ o -> + UpdateActiveBreakpointRequest <$> + (o .:? "breakpoint")) + +instance ToJSON UpdateActiveBreakpointRequest where + toJSON UpdateActiveBreakpointRequest{..} + = object + (catMaybes [("breakpoint" .=) <$> _uabrBreakpoint]) + +-- | Represents a contextual status message. The message can indicate an +-- error or informational status, and refer to specific parts of the +-- containing object. For example, the Breakpoint.status field can indicate +-- an error referring to the BREAKPOINT_SOURCE_LOCATION with the message +-- \"Location not found\". +-- +-- /See:/ 'statusMessage' smart constructor. +data StatusMessage = StatusMessage + { _smRefersTo :: !(Maybe Text) + , _smIsError :: !(Maybe Bool) + , _smDescription :: !(Maybe (Maybe FormatMessage)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatusMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smRefersTo' +-- +-- * 'smIsError' +-- +-- * 'smDescription' +statusMessage + :: StatusMessage +statusMessage = + StatusMessage + { _smRefersTo = Nothing + , _smIsError = Nothing + , _smDescription = Nothing + } + +-- | Reference to which the message applies. +smRefersTo :: Lens' StatusMessage (Maybe Text) +smRefersTo + = lens _smRefersTo (\ s a -> s{_smRefersTo = a}) + +-- | Distinguishes errors from informational messages. +smIsError :: Lens' StatusMessage (Maybe Bool) +smIsError + = lens _smIsError (\ s a -> s{_smIsError = a}) + +-- | Status message text. +smDescription :: Lens' StatusMessage (Maybe (Maybe FormatMessage)) +smDescription + = lens _smDescription + (\ s a -> s{_smDescription = a}) + +instance FromJSON StatusMessage where + parseJSON + = withObject "StatusMessage" + (\ o -> + StatusMessage <$> + (o .:? "refersTo") <*> (o .:? "isError") <*> + (o .:? "description")) + +instance ToJSON StatusMessage where + toJSON StatusMessage{..} + = object + (catMaybes + [("refersTo" .=) <$> _smRefersTo, + ("isError" .=) <$> _smIsError, + ("description" .=) <$> _smDescription]) + +-- | The response of listing active breakpoints. +-- +-- /See:/ 'listActiveBreakpointsResponse' smart constructor. +data ListActiveBreakpointsResponse = ListActiveBreakpointsResponse + { _labrNextWaitToken :: !(Maybe Text) + , _labrBreakpoints :: !(Maybe [Maybe Breakpoint]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListActiveBreakpointsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'labrNextWaitToken' +-- +-- * 'labrBreakpoints' +listActiveBreakpointsResponse + :: ListActiveBreakpointsResponse +listActiveBreakpointsResponse = + ListActiveBreakpointsResponse + { _labrNextWaitToken = Nothing + , _labrBreakpoints = Nothing + } + +-- | A wait token that can be used in the next method call to block until the +-- list of breakpoints changes. +labrNextWaitToken :: Lens' ListActiveBreakpointsResponse (Maybe Text) +labrNextWaitToken + = lens _labrNextWaitToken + (\ s a -> s{_labrNextWaitToken = a}) + +-- | List of all active breakpoints. The fields \'id\' and \'location\' are +-- guranteed to be set on each breakpoint. +labrBreakpoints :: Lens' ListActiveBreakpointsResponse [Maybe Breakpoint] +labrBreakpoints + = lens _labrBreakpoints + (\ s a -> s{_labrBreakpoints = a}) + . _Default + . _Coerce + +instance FromJSON ListActiveBreakpointsResponse where + parseJSON + = withObject "ListActiveBreakpointsResponse" + (\ o -> + ListActiveBreakpointsResponse <$> + (o .:? "nextWaitToken") <*> + (o .:? "breakpoints" .!= mempty)) + +instance ToJSON ListActiveBreakpointsResponse where + toJSON ListActiveBreakpointsResponse{..} + = object + (catMaybes + [("nextWaitToken" .=) <$> _labrNextWaitToken, + ("breakpoints" .=) <$> _labrBreakpoints]) + +-- | A GitSourceContext denotes a particular revision in a third party Git +-- repository (e.g. GitHub). +-- +-- /See:/ 'gitSourceContext' smart constructor. +data GitSourceContext = GitSourceContext + { _gUrl :: !(Maybe Text) + , _gRevisionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GitSourceContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gUrl' +-- +-- * 'gRevisionId' +gitSourceContext + :: GitSourceContext +gitSourceContext = + GitSourceContext + { _gUrl = Nothing + , _gRevisionId = Nothing + } + +-- | Git repository URL. +gUrl :: Lens' GitSourceContext (Maybe Text) +gUrl = lens _gUrl (\ s a -> s{_gUrl = a}) + +-- | Git commit hash. required. +gRevisionId :: Lens' GitSourceContext (Maybe Text) +gRevisionId + = lens _gRevisionId (\ s a -> s{_gRevisionId = a}) + +instance FromJSON GitSourceContext where + parseJSON + = withObject "GitSourceContext" + (\ o -> + GitSourceContext <$> + (o .:? "url") <*> (o .:? "revisionId")) + +instance ToJSON GitSourceContext where + toJSON GitSourceContext{..} + = object + (catMaybes + [("url" .=) <$> _gUrl, + ("revisionId" .=) <$> _gRevisionId]) + +-- | Represents a location in the source code. +-- +-- /See:/ 'sourceLocation' smart constructor. +data SourceLocation = SourceLocation + { _slPath :: !(Maybe Text) + , _slLine :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slPath' +-- +-- * 'slLine' +sourceLocation + :: SourceLocation +sourceLocation = + SourceLocation + { _slPath = Nothing + , _slLine = Nothing + } + +-- | A path to the source file within the source context of the target +-- binary. +slPath :: Lens' SourceLocation (Maybe Text) +slPath = lens _slPath (\ s a -> s{_slPath = a}) + +-- | The line inside the file (first line value is \'1\'). +slLine :: Lens' SourceLocation (Maybe Int32) +slLine = lens _slLine (\ s a -> s{_slLine = a}) + +instance FromJSON SourceLocation where + parseJSON + = withObject "SourceLocation" + (\ o -> + SourceLocation <$> (o .:? "path") <*> (o .:? "line")) + +instance ToJSON SourceLocation where + toJSON SourceLocation{..} + = object + (catMaybes + [("path" .=) <$> _slPath, ("line" .=) <$> _slLine]) + +-- | Represents a stack frame context. +-- +-- /See:/ 'stackFrame' smart constructor. +data StackFrame = StackFrame + { _sfFunction :: !(Maybe Text) + , _sfLocation :: !(Maybe (Maybe SourceLocation)) + , _sfArguments :: !(Maybe [Maybe Variable]) + , _sfLocals :: !(Maybe [Maybe Variable]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StackFrame' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfFunction' +-- +-- * 'sfLocation' +-- +-- * 'sfArguments' +-- +-- * 'sfLocals' +stackFrame + :: StackFrame +stackFrame = + StackFrame + { _sfFunction = Nothing + , _sfLocation = Nothing + , _sfArguments = Nothing + , _sfLocals = Nothing + } + +-- | The unmangled function name at the call site. +sfFunction :: Lens' StackFrame (Maybe Text) +sfFunction + = lens _sfFunction (\ s a -> s{_sfFunction = a}) + +-- | The source location of the call site. +sfLocation :: Lens' StackFrame (Maybe (Maybe SourceLocation)) +sfLocation + = lens _sfLocation (\ s a -> s{_sfLocation = a}) + +-- | The set of arguments passed to this function Note that this might not be +-- populated for all stack frames. +sfArguments :: Lens' StackFrame [Maybe Variable] +sfArguments + = lens _sfArguments (\ s a -> s{_sfArguments = a}) . + _Default + . _Coerce + +-- | The set of local variables at the stack frame location. Note that this +-- might not be populated for all stack frames. +sfLocals :: Lens' StackFrame [Maybe Variable] +sfLocals + = lens _sfLocals (\ s a -> s{_sfLocals = a}) . + _Default + . _Coerce + +instance FromJSON StackFrame where + parseJSON + = withObject "StackFrame" + (\ o -> + StackFrame <$> + (o .:? "function") <*> (o .:? "location") <*> + (o .:? "arguments" .!= mempty) + <*> (o .:? "locals" .!= mempty)) + +instance ToJSON StackFrame where + toJSON StackFrame{..} + = object + (catMaybes + [("function" .=) <$> _sfFunction, + ("location" .=) <$> _sfLocation, + ("arguments" .=) <$> _sfArguments, + ("locals" .=) <$> _sfLocals]) + +-- | A CloudRepoSourceContext denotes a particular revision in a cloud repo +-- (a repo hosted by the Google Cloud Platform). +-- +-- /See:/ 'cloudRepoSourceContext' smart constructor. +data CloudRepoSourceContext = CloudRepoSourceContext + { _crscRepoId :: !(Maybe (Maybe RepoId)) + , _crscAliasName :: !(Maybe Text) + , _crscRevisionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudRepoSourceContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crscRepoId' +-- +-- * 'crscAliasName' +-- +-- * 'crscRevisionId' +cloudRepoSourceContext + :: CloudRepoSourceContext +cloudRepoSourceContext = + CloudRepoSourceContext + { _crscRepoId = Nothing + , _crscAliasName = Nothing + , _crscRevisionId = Nothing + } + +-- | The ID of the repo. +crscRepoId :: Lens' CloudRepoSourceContext (Maybe (Maybe RepoId)) +crscRepoId + = lens _crscRepoId (\ s a -> s{_crscRepoId = a}) + +-- | The name of an alias (branch, tag, etc.). +crscAliasName :: Lens' CloudRepoSourceContext (Maybe Text) +crscAliasName + = lens _crscAliasName + (\ s a -> s{_crscAliasName = a}) + +-- | A revision ID. +crscRevisionId :: Lens' CloudRepoSourceContext (Maybe Text) +crscRevisionId + = lens _crscRevisionId + (\ s a -> s{_crscRevisionId = a}) + +instance FromJSON CloudRepoSourceContext where + parseJSON + = withObject "CloudRepoSourceContext" + (\ o -> + CloudRepoSourceContext <$> + (o .:? "repoId") <*> (o .:? "aliasName") <*> + (o .:? "revisionId")) + +instance ToJSON CloudRepoSourceContext where + toJSON CloudRepoSourceContext{..} + = object + (catMaybes + [("repoId" .=) <$> _crscRepoId, + ("aliasName" .=) <$> _crscAliasName, + ("revisionId" .=) <$> _crscRevisionId]) + +-- | The request to register a debuggee. +-- +-- /See:/ 'registerDebuggeeRequest' smart constructor. +newtype RegisterDebuggeeRequest = RegisterDebuggeeRequest + { _rDebuggee :: Maybe (Maybe Debuggee) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegisterDebuggeeRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rDebuggee' +registerDebuggeeRequest + :: RegisterDebuggeeRequest +registerDebuggeeRequest = + RegisterDebuggeeRequest + { _rDebuggee = Nothing + } + +-- | The debuggee information to register. The fields \'project\', +-- \'uniquifier\', \'description\' and \'agent_version\' of the debuggee +-- must be set. +rDebuggee :: Lens' RegisterDebuggeeRequest (Maybe (Maybe Debuggee)) +rDebuggee + = lens _rDebuggee (\ s a -> s{_rDebuggee = a}) + +instance FromJSON RegisterDebuggeeRequest where + parseJSON + = withObject "RegisterDebuggeeRequest" + (\ o -> + RegisterDebuggeeRequest <$> (o .:? "debuggee")) + +instance ToJSON RegisterDebuggeeRequest where + toJSON RegisterDebuggeeRequest{..} + = object (catMaybes [("debuggee" .=) <$> _rDebuggee]) + +-- | A CloudWorkspaceSourceContext denotes a workspace at a particular +-- snapshot. +-- +-- /See:/ 'cloudWorkspaceSourceContext' smart constructor. +data CloudWorkspaceSourceContext = CloudWorkspaceSourceContext + { _cwscWorkspaceId :: !(Maybe (Maybe CloudWorkspaceId)) + , _cwscSnapshotId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudWorkspaceSourceContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cwscWorkspaceId' +-- +-- * 'cwscSnapshotId' +cloudWorkspaceSourceContext + :: CloudWorkspaceSourceContext +cloudWorkspaceSourceContext = + CloudWorkspaceSourceContext + { _cwscWorkspaceId = Nothing + , _cwscSnapshotId = Nothing + } + +-- | The ID of the workspace. +cwscWorkspaceId :: Lens' CloudWorkspaceSourceContext (Maybe (Maybe CloudWorkspaceId)) +cwscWorkspaceId + = lens _cwscWorkspaceId + (\ s a -> s{_cwscWorkspaceId = a}) + +-- | The ID of the snapshot. An empty snapshot_id refers to the most recent +-- snapshot. +cwscSnapshotId :: Lens' CloudWorkspaceSourceContext (Maybe Text) +cwscSnapshotId + = lens _cwscSnapshotId + (\ s a -> s{_cwscSnapshotId = a}) + +instance FromJSON CloudWorkspaceSourceContext where + parseJSON + = withObject "CloudWorkspaceSourceContext" + (\ o -> + CloudWorkspaceSourceContext <$> + (o .:? "workspaceId") <*> (o .:? "snapshotId")) + +instance ToJSON CloudWorkspaceSourceContext where + toJSON CloudWorkspaceSourceContext{..} + = object + (catMaybes + [("workspaceId" .=) <$> _cwscWorkspaceId, + ("snapshotId" .=) <$> _cwscSnapshotId]) + +-- | Represents the application to debug. The application may include one or +-- more replicated processes executing the same code. Each of these +-- processes is attached with a debugger agent, carrying out the debugging +-- commands. The agents attached to the same debuggee are identified by +-- using exactly the same fields\' values when registering. +-- +-- /See:/ 'debuggee' smart constructor. +data Debuggee = Debuggee + { _dStatus :: !(Maybe (Maybe StatusMessage)) + , _dUniquifier :: !(Maybe Text) + , _dProject :: !(Maybe Text) + , _dAgentVersion :: !(Maybe Text) + , _dIsDisabled :: !(Maybe Bool) + , _dId :: !(Maybe Text) + , _dLabels :: !(Maybe DebuggeeLabels) + , _dDescription :: !(Maybe Text) + , _dIsInactive :: !(Maybe Bool) + , _dSourceContexts :: !(Maybe [Maybe SourceContext]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Debuggee' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dStatus' +-- +-- * 'dUniquifier' +-- +-- * 'dProject' +-- +-- * 'dAgentVersion' +-- +-- * 'dIsDisabled' +-- +-- * 'dId' +-- +-- * 'dLabels' +-- +-- * 'dDescription' +-- +-- * 'dIsInactive' +-- +-- * 'dSourceContexts' +debuggee + :: Debuggee +debuggee = + Debuggee + { _dStatus = Nothing + , _dUniquifier = Nothing + , _dProject = Nothing + , _dAgentVersion = Nothing + , _dIsDisabled = Nothing + , _dId = Nothing + , _dLabels = Nothing + , _dDescription = Nothing + , _dIsInactive = Nothing + , _dSourceContexts = Nothing + } + +-- | Human readable message to be displayed to the user about this debuggee. +-- Absense of this field indicates no message. The message can be either +-- informational or error. +dStatus :: Lens' Debuggee (Maybe (Maybe StatusMessage)) +dStatus = lens _dStatus (\ s a -> s{_dStatus = a}) + +-- | The debuggee uniqifier within the project. Any string that id the +-- application within the project can be used. Recomended to include +-- environement and version or build id\'s. +dUniquifier :: Lens' Debuggee (Maybe Text) +dUniquifier + = lens _dUniquifier (\ s a -> s{_dUniquifier = a}) + +-- | The project the debuggee is associated with. Use the project number when +-- registering a Google Cloud Platform project. +dProject :: Lens' Debuggee (Maybe Text) +dProject = lens _dProject (\ s a -> s{_dProject = a}) + +-- | Version ID of the agent release. The version ID is structured as +-- following: \"domain\/type\/vmajor.minor\" (for example +-- \"google.com\/gcp-java\/v1.1\"). +dAgentVersion :: Lens' Debuggee (Maybe Text) +dAgentVersion + = lens _dAgentVersion + (\ s a -> s{_dAgentVersion = a}) + +-- | If set to true, indicates that the agent should disable itself and +-- detach from the debuggee. +dIsDisabled :: Lens' Debuggee (Maybe Bool) +dIsDisabled + = lens _dIsDisabled (\ s a -> s{_dIsDisabled = a}) + +-- | Debuggee unique identifer generated by the server. +dId :: Lens' Debuggee (Maybe Text) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | A set of custom debuggee properties, populated by the agent, to be +-- displayed to the user. +dLabels :: Lens' Debuggee (Maybe DebuggeeLabels) +dLabels = lens _dLabels (\ s a -> s{_dLabels = a}) + +-- | A human readable description of the debuggee. Recommended to include +-- human readable project name, environment name, and version information . +dDescription :: Lens' Debuggee (Maybe Text) +dDescription + = lens _dDescription (\ s a -> s{_dDescription = a}) + +-- | If set to true indicates that the debuggee has not been seen by the +-- Controller service in the last active time period (defined by the +-- server). +dIsInactive :: Lens' Debuggee (Maybe Bool) +dIsInactive + = lens _dIsInactive (\ s a -> s{_dIsInactive = a}) + +-- | Repository snapshots containing the source code of the project. +dSourceContexts :: Lens' Debuggee [Maybe SourceContext] +dSourceContexts + = lens _dSourceContexts + (\ s a -> s{_dSourceContexts = a}) + . _Default + . _Coerce + +instance FromJSON Debuggee where + parseJSON + = withObject "Debuggee" + (\ o -> + Debuggee <$> + (o .:? "status") <*> (o .:? "uniquifier") <*> + (o .:? "project") + <*> (o .:? "agentVersion") + <*> (o .:? "isDisabled") + <*> (o .:? "id") + <*> (o .:? "labels") + <*> (o .:? "description") + <*> (o .:? "isInactive") + <*> (o .:? "sourceContexts" .!= mempty)) + +instance ToJSON Debuggee where + toJSON Debuggee{..} + = object + (catMaybes + [("status" .=) <$> _dStatus, + ("uniquifier" .=) <$> _dUniquifier, + ("project" .=) <$> _dProject, + ("agentVersion" .=) <$> _dAgentVersion, + ("isDisabled" .=) <$> _dIsDisabled, + ("id" .=) <$> _dId, ("labels" .=) <$> _dLabels, + ("description" .=) <$> _dDescription, + ("isInactive" .=) <$> _dIsInactive, + ("sourceContexts" .=) <$> _dSourceContexts]) + +-- | A CloudWorkspaceId is a unique identifier for a cloud workspace. A cloud +-- workspace is a place associated with a repo where modified files can be +-- stored before they are committed. +-- +-- /See:/ 'cloudWorkspaceId' smart constructor. +data CloudWorkspaceId = CloudWorkspaceId + { _cwiRepoId :: !(Maybe (Maybe RepoId)) + , _cwiName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloudWorkspaceId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cwiRepoId' +-- +-- * 'cwiName' +cloudWorkspaceId + :: CloudWorkspaceId +cloudWorkspaceId = + CloudWorkspaceId + { _cwiRepoId = Nothing + , _cwiName = Nothing + } + +-- | The ID of the repo containing the workspace. +cwiRepoId :: Lens' CloudWorkspaceId (Maybe (Maybe RepoId)) +cwiRepoId + = lens _cwiRepoId (\ s a -> s{_cwiRepoId = a}) + +-- | The unique name of the workspace within the repo. This is the name +-- chosen by the client in the Source API\'s CreateWorkspace method. +cwiName :: Lens' CloudWorkspaceId (Maybe Text) +cwiName = lens _cwiName (\ s a -> s{_cwiName = a}) + +instance FromJSON CloudWorkspaceId where + parseJSON + = withObject "CloudWorkspaceId" + (\ o -> + CloudWorkspaceId <$> + (o .:? "repoId") <*> (o .:? "name")) + +instance ToJSON CloudWorkspaceId where + toJSON CloudWorkspaceId{..} + = object + (catMaybes + [("repoId" .=) <$> _cwiRepoId, + ("name" .=) <$> _cwiName]) diff --git a/gogol-debugger/gen/Network/Google/Debugger/Types/Sum.hs b/gogol-debugger/gen/Network/Google/Debugger/Types/Sum.hs new file mode 100644 index 000000000..fcee2daf9 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Debugger/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Debugger.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Debugger.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/List.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/List.hs new file mode 100644 index 000000000..46f19e1c8 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/List.hs @@ -0,0 +1,271 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the list of all active breakpoints for the specified debuggee. +-- The breakpoint specification (location, condition, and expression +-- fields) is semantically immutable, although the field values may change. +-- For example, an agent may update the location line number to reflect the +-- actual line the breakpoint was set to, but that doesn\'t change the +-- breakpoint semantics. Thus, an agent does not need to check if a +-- breakpoint has changed when it encounters the same breakpoint on a +-- successive call. Moreover, an agent should remember breakpoints that are +-- complete until the controller removes them from the active list to avoid +-- setting those breakpoints again. +-- +-- /See:/ for @ClouddebuggerControllerDebuggeesBreakpointsList@. +module Clouddebugger.Controller.Debuggees.Breakpoints.List + ( + -- * REST Resource + ControllerDebuggeesBreakpointsListAPI + + -- * Creating a Request + , controllerDebuggeesBreakpointsList + , ControllerDebuggeesBreakpointsList + + -- * Request Lenses + , cdblXgafv + , cdblQuotaUser + , cdblPrettyPrint + , cdblUploadProtocol + , cdblPp + , cdblAccessToken + , cdblUploadType + , cdblBearerToken + , cdblKey + , cdblWaitToken + , cdblDebuggeeId + , cdblOauthToken + , cdblFields + , cdblCallback + , cdblAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerControllerDebuggeesBreakpointsList@ which the +-- 'ControllerDebuggeesBreakpointsList' request conforms to. +type ControllerDebuggeesBreakpointsListAPI = + "v2" :> + "controller" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + QueryParam "waitToken" Text :> + Get '[JSON] ListActiveBreakpointsResponse + +-- | Returns the list of all active breakpoints for the specified debuggee. +-- The breakpoint specification (location, condition, and expression +-- fields) is semantically immutable, although the field values may change. +-- For example, an agent may update the location line number to reflect the +-- actual line the breakpoint was set to, but that doesn\'t change the +-- breakpoint semantics. Thus, an agent does not need to check if a +-- breakpoint has changed when it encounters the same breakpoint on a +-- successive call. Moreover, an agent should remember breakpoints that are +-- complete until the controller removes them from the active list to avoid +-- setting those breakpoints again. +-- +-- /See:/ 'controllerDebuggeesBreakpointsList' smart constructor. +data ControllerDebuggeesBreakpointsList = ControllerDebuggeesBreakpointsList + { _cdblXgafv :: !(Maybe Text) + , _cdblQuotaUser :: !(Maybe Text) + , _cdblPrettyPrint :: !Bool + , _cdblUploadProtocol :: !(Maybe Text) + , _cdblPp :: !Bool + , _cdblAccessToken :: !(Maybe Text) + , _cdblUploadType :: !(Maybe Text) + , _cdblBearerToken :: !(Maybe Text) + , _cdblKey :: !(Maybe Text) + , _cdblWaitToken :: !(Maybe Text) + , _cdblDebuggeeId :: !Text + , _cdblOauthToken :: !(Maybe Text) + , _cdblFields :: !(Maybe Text) + , _cdblCallback :: !(Maybe Text) + , _cdblAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ControllerDebuggeesBreakpointsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdblXgafv' +-- +-- * 'cdblQuotaUser' +-- +-- * 'cdblPrettyPrint' +-- +-- * 'cdblUploadProtocol' +-- +-- * 'cdblPp' +-- +-- * 'cdblAccessToken' +-- +-- * 'cdblUploadType' +-- +-- * 'cdblBearerToken' +-- +-- * 'cdblKey' +-- +-- * 'cdblWaitToken' +-- +-- * 'cdblDebuggeeId' +-- +-- * 'cdblOauthToken' +-- +-- * 'cdblFields' +-- +-- * 'cdblCallback' +-- +-- * 'cdblAlt' +controllerDebuggeesBreakpointsList + :: Text -- ^ 'debuggeeId' + -> ControllerDebuggeesBreakpointsList +controllerDebuggeesBreakpointsList pCdblDebuggeeId_ = + ControllerDebuggeesBreakpointsList + { _cdblXgafv = Nothing + , _cdblQuotaUser = Nothing + , _cdblPrettyPrint = True + , _cdblUploadProtocol = Nothing + , _cdblPp = True + , _cdblAccessToken = Nothing + , _cdblUploadType = Nothing + , _cdblBearerToken = Nothing + , _cdblKey = Nothing + , _cdblWaitToken = Nothing + , _cdblDebuggeeId = pCdblDebuggeeId_ + , _cdblOauthToken = Nothing + , _cdblFields = Nothing + , _cdblCallback = Nothing + , _cdblAlt = "json" + } + +-- | V1 error format. +cdblXgafv :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblXgafv + = lens _cdblXgafv (\ s a -> s{_cdblXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cdblQuotaUser :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblQuotaUser + = lens _cdblQuotaUser + (\ s a -> s{_cdblQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdblPrettyPrint :: Lens' ControllerDebuggeesBreakpointsList' Bool +cdblPrettyPrint + = lens _cdblPrettyPrint + (\ s a -> s{_cdblPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cdblUploadProtocol :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblUploadProtocol + = lens _cdblUploadProtocol + (\ s a -> s{_cdblUploadProtocol = a}) + +-- | Pretty-print response. +cdblPp :: Lens' ControllerDebuggeesBreakpointsList' Bool +cdblPp = lens _cdblPp (\ s a -> s{_cdblPp = a}) + +-- | OAuth access token. +cdblAccessToken :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblAccessToken + = lens _cdblAccessToken + (\ s a -> s{_cdblAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cdblUploadType :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblUploadType + = lens _cdblUploadType + (\ s a -> s{_cdblUploadType = a}) + +-- | OAuth bearer token. +cdblBearerToken :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblBearerToken + = lens _cdblBearerToken + (\ s a -> s{_cdblBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdblKey :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblKey = lens _cdblKey (\ s a -> s{_cdblKey = a}) + +-- | A wait token that, if specified, blocks the method call until the list +-- of active breakpoints has changed, or a server selected timeout has +-- expired. The value should be set from the last returned response. The +-- error code google.rpc.Code.ABORTED is returned on wait timeout (which +-- does not require the agent to re-register with the server) +cdblWaitToken :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblWaitToken + = lens _cdblWaitToken + (\ s a -> s{_cdblWaitToken = a}) + +-- | Identifies the debuggee. +cdblDebuggeeId :: Lens' ControllerDebuggeesBreakpointsList' Text +cdblDebuggeeId + = lens _cdblDebuggeeId + (\ s a -> s{_cdblDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +cdblOauthToken :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblOauthToken + = lens _cdblOauthToken + (\ s a -> s{_cdblOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdblFields :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblFields + = lens _cdblFields (\ s a -> s{_cdblFields = a}) + +-- | JSONP +cdblCallback :: Lens' ControllerDebuggeesBreakpointsList' (Maybe Text) +cdblCallback + = lens _cdblCallback (\ s a -> s{_cdblCallback = a}) + +-- | Data format for response. +cdblAlt :: Lens' ControllerDebuggeesBreakpointsList' Text +cdblAlt = lens _cdblAlt (\ s a -> s{_cdblAlt = a}) + +instance GoogleRequest + ControllerDebuggeesBreakpointsList' where + type Rs ControllerDebuggeesBreakpointsList' = + ListActiveBreakpointsResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + ControllerDebuggeesBreakpointsList{..} + = go _cdblXgafv _cdblQuotaUser _cdblPrettyPrint + _cdblUploadProtocol + _cdblPp + _cdblAccessToken + _cdblUploadType + _cdblBearerToken + _cdblKey + _cdblWaitToken + _cdblDebuggeeId + _cdblOauthToken + _cdblFields + _cdblCallback + _cdblAlt + where go + = clientWithRoute + (Proxy :: + Proxy ControllerDebuggeesBreakpointsListAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/Update.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/Update.hs new file mode 100644 index 000000000..6c8c24a77 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Breakpoints/Update.hs @@ -0,0 +1,260 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the breakpoint state or mutable fields. The entire Breakpoint +-- protobuf must be sent back to the controller. Updates to active +-- breakpoint fields are only allowed if the new value does not change the +-- breakpoint specification. Updates to the \'location\', \'condition\' and +-- \'expression\' fields should not alter the breakpoint semantics. They +-- are restricted to changes such as canonicalizing a value or snapping the +-- location to the correct line of code. +-- +-- /See:/ for @ClouddebuggerControllerDebuggeesBreakpointsUpdate@. +module Clouddebugger.Controller.Debuggees.Breakpoints.Update + ( + -- * REST Resource + ControllerDebuggeesBreakpointsUpdateAPI + + -- * Creating a Request + , controllerDebuggeesBreakpointsUpdate + , ControllerDebuggeesBreakpointsUpdate + + -- * Request Lenses + , cdbuXgafv + , cdbuQuotaUser + , cdbuPrettyPrint + , cdbuUploadProtocol + , cdbuPp + , cdbuAccessToken + , cdbuUploadType + , cdbuBearerToken + , cdbuKey + , cdbuId + , cdbuDebuggeeId + , cdbuOauthToken + , cdbuFields + , cdbuCallback + , cdbuAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerControllerDebuggeesBreakpointsUpdate@ which the +-- 'ControllerDebuggeesBreakpointsUpdate' request conforms to. +type ControllerDebuggeesBreakpointsUpdateAPI = + "v2" :> + "controller" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + Capture "id" Text :> + Put '[JSON] UpdateActiveBreakpointResponse + +-- | Updates the breakpoint state or mutable fields. The entire Breakpoint +-- protobuf must be sent back to the controller. Updates to active +-- breakpoint fields are only allowed if the new value does not change the +-- breakpoint specification. Updates to the \'location\', \'condition\' and +-- \'expression\' fields should not alter the breakpoint semantics. They +-- are restricted to changes such as canonicalizing a value or snapping the +-- location to the correct line of code. +-- +-- /See:/ 'controllerDebuggeesBreakpointsUpdate' smart constructor. +data ControllerDebuggeesBreakpointsUpdate = ControllerDebuggeesBreakpointsUpdate + { _cdbuXgafv :: !(Maybe Text) + , _cdbuQuotaUser :: !(Maybe Text) + , _cdbuPrettyPrint :: !Bool + , _cdbuUploadProtocol :: !(Maybe Text) + , _cdbuPp :: !Bool + , _cdbuAccessToken :: !(Maybe Text) + , _cdbuUploadType :: !(Maybe Text) + , _cdbuBearerToken :: !(Maybe Text) + , _cdbuKey :: !(Maybe Text) + , _cdbuId :: !Text + , _cdbuDebuggeeId :: !Text + , _cdbuOauthToken :: !(Maybe Text) + , _cdbuFields :: !(Maybe Text) + , _cdbuCallback :: !(Maybe Text) + , _cdbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ControllerDebuggeesBreakpointsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdbuXgafv' +-- +-- * 'cdbuQuotaUser' +-- +-- * 'cdbuPrettyPrint' +-- +-- * 'cdbuUploadProtocol' +-- +-- * 'cdbuPp' +-- +-- * 'cdbuAccessToken' +-- +-- * 'cdbuUploadType' +-- +-- * 'cdbuBearerToken' +-- +-- * 'cdbuKey' +-- +-- * 'cdbuId' +-- +-- * 'cdbuDebuggeeId' +-- +-- * 'cdbuOauthToken' +-- +-- * 'cdbuFields' +-- +-- * 'cdbuCallback' +-- +-- * 'cdbuAlt' +controllerDebuggeesBreakpointsUpdate + :: Text -- ^ 'id' + -> Text -- ^ 'debuggeeId' + -> ControllerDebuggeesBreakpointsUpdate +controllerDebuggeesBreakpointsUpdate pCdbuId_ pCdbuDebuggeeId_ = + ControllerDebuggeesBreakpointsUpdate + { _cdbuXgafv = Nothing + , _cdbuQuotaUser = Nothing + , _cdbuPrettyPrint = True + , _cdbuUploadProtocol = Nothing + , _cdbuPp = True + , _cdbuAccessToken = Nothing + , _cdbuUploadType = Nothing + , _cdbuBearerToken = Nothing + , _cdbuKey = Nothing + , _cdbuId = pCdbuId_ + , _cdbuDebuggeeId = pCdbuDebuggeeId_ + , _cdbuOauthToken = Nothing + , _cdbuFields = Nothing + , _cdbuCallback = Nothing + , _cdbuAlt = "json" + } + +-- | V1 error format. +cdbuXgafv :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuXgafv + = lens _cdbuXgafv (\ s a -> s{_cdbuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cdbuQuotaUser :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuQuotaUser + = lens _cdbuQuotaUser + (\ s a -> s{_cdbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdbuPrettyPrint :: Lens' ControllerDebuggeesBreakpointsUpdate' Bool +cdbuPrettyPrint + = lens _cdbuPrettyPrint + (\ s a -> s{_cdbuPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cdbuUploadProtocol :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuUploadProtocol + = lens _cdbuUploadProtocol + (\ s a -> s{_cdbuUploadProtocol = a}) + +-- | Pretty-print response. +cdbuPp :: Lens' ControllerDebuggeesBreakpointsUpdate' Bool +cdbuPp = lens _cdbuPp (\ s a -> s{_cdbuPp = a}) + +-- | OAuth access token. +cdbuAccessToken :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuAccessToken + = lens _cdbuAccessToken + (\ s a -> s{_cdbuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cdbuUploadType :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuUploadType + = lens _cdbuUploadType + (\ s a -> s{_cdbuUploadType = a}) + +-- | OAuth bearer token. +cdbuBearerToken :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuBearerToken + = lens _cdbuBearerToken + (\ s a -> s{_cdbuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdbuKey :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuKey = lens _cdbuKey (\ s a -> s{_cdbuKey = a}) + +-- | Breakpoint identifier, unique in the scope of the debuggee. +cdbuId :: Lens' ControllerDebuggeesBreakpointsUpdate' Text +cdbuId = lens _cdbuId (\ s a -> s{_cdbuId = a}) + +-- | Identifies the debuggee being debugged. +cdbuDebuggeeId :: Lens' ControllerDebuggeesBreakpointsUpdate' Text +cdbuDebuggeeId + = lens _cdbuDebuggeeId + (\ s a -> s{_cdbuDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +cdbuOauthToken :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuOauthToken + = lens _cdbuOauthToken + (\ s a -> s{_cdbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdbuFields :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuFields + = lens _cdbuFields (\ s a -> s{_cdbuFields = a}) + +-- | JSONP +cdbuCallback :: Lens' ControllerDebuggeesBreakpointsUpdate' (Maybe Text) +cdbuCallback + = lens _cdbuCallback (\ s a -> s{_cdbuCallback = a}) + +-- | Data format for response. +cdbuAlt :: Lens' ControllerDebuggeesBreakpointsUpdate' Text +cdbuAlt = lens _cdbuAlt (\ s a -> s{_cdbuAlt = a}) + +instance GoogleRequest + ControllerDebuggeesBreakpointsUpdate' where + type Rs ControllerDebuggeesBreakpointsUpdate' = + UpdateActiveBreakpointResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + ControllerDebuggeesBreakpointsUpdate{..} + = go _cdbuXgafv _cdbuQuotaUser _cdbuPrettyPrint + _cdbuUploadProtocol + _cdbuPp + _cdbuAccessToken + _cdbuUploadType + _cdbuBearerToken + _cdbuKey + _cdbuId + _cdbuDebuggeeId + _cdbuOauthToken + _cdbuFields + _cdbuCallback + _cdbuAlt + where go + = clientWithRoute + (Proxy :: + Proxy ControllerDebuggeesBreakpointsUpdateAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Register.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Register.hs new file mode 100644 index 000000000..ae7394b39 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Controller/Debuggees/Register.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Controller.Debuggees.Register +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Registers the debuggee with the controller. All agents should call this +-- API with the same request content to get back the same stable +-- \'debuggee_id\'. Agents should call this API again whenever +-- ListActiveBreakpoints or UpdateActiveBreakpoint return the error +-- google.rpc.Code.NOT_FOUND. It allows the server to disable the agent or +-- recover from any registration loss. If the debuggee is disabled server, +-- the response will have is_disabled\' set to true. +-- +-- /See:/ for @ClouddebuggerControllerDebuggeesRegister@. +module Clouddebugger.Controller.Debuggees.Register + ( + -- * REST Resource + ControllerDebuggeesRegisterAPI + + -- * Creating a Request + , controllerDebuggeesRegister + , ControllerDebuggeesRegister + + -- * Request Lenses + , cdrXgafv + , cdrQuotaUser + , cdrPrettyPrint + , cdrUploadProtocol + , cdrPp + , cdrAccessToken + , cdrUploadType + , cdrBearerToken + , cdrKey + , cdrOauthToken + , cdrFields + , cdrCallback + , cdrAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerControllerDebuggeesRegister@ which the +-- 'ControllerDebuggeesRegister' request conforms to. +type ControllerDebuggeesRegisterAPI = + "v2" :> + "controller" :> + "debuggees" :> + "register" :> Post '[JSON] RegisterDebuggeeResponse + +-- | Registers the debuggee with the controller. All agents should call this +-- API with the same request content to get back the same stable +-- \'debuggee_id\'. Agents should call this API again whenever +-- ListActiveBreakpoints or UpdateActiveBreakpoint return the error +-- google.rpc.Code.NOT_FOUND. It allows the server to disable the agent or +-- recover from any registration loss. If the debuggee is disabled server, +-- the response will have is_disabled\' set to true. +-- +-- /See:/ 'controllerDebuggeesRegister' smart constructor. +data ControllerDebuggeesRegister = ControllerDebuggeesRegister + { _cdrXgafv :: !(Maybe Text) + , _cdrQuotaUser :: !(Maybe Text) + , _cdrPrettyPrint :: !Bool + , _cdrUploadProtocol :: !(Maybe Text) + , _cdrPp :: !Bool + , _cdrAccessToken :: !(Maybe Text) + , _cdrUploadType :: !(Maybe Text) + , _cdrBearerToken :: !(Maybe Text) + , _cdrKey :: !(Maybe Text) + , _cdrOauthToken :: !(Maybe Text) + , _cdrFields :: !(Maybe Text) + , _cdrCallback :: !(Maybe Text) + , _cdrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ControllerDebuggeesRegister'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdrXgafv' +-- +-- * 'cdrQuotaUser' +-- +-- * 'cdrPrettyPrint' +-- +-- * 'cdrUploadProtocol' +-- +-- * 'cdrPp' +-- +-- * 'cdrAccessToken' +-- +-- * 'cdrUploadType' +-- +-- * 'cdrBearerToken' +-- +-- * 'cdrKey' +-- +-- * 'cdrOauthToken' +-- +-- * 'cdrFields' +-- +-- * 'cdrCallback' +-- +-- * 'cdrAlt' +controllerDebuggeesRegister + :: ControllerDebuggeesRegister +controllerDebuggeesRegister = + ControllerDebuggeesRegister + { _cdrXgafv = Nothing + , _cdrQuotaUser = Nothing + , _cdrPrettyPrint = True + , _cdrUploadProtocol = Nothing + , _cdrPp = True + , _cdrAccessToken = Nothing + , _cdrUploadType = Nothing + , _cdrBearerToken = Nothing + , _cdrKey = Nothing + , _cdrOauthToken = Nothing + , _cdrFields = Nothing + , _cdrCallback = Nothing + , _cdrAlt = "json" + } + +-- | V1 error format. +cdrXgafv :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrXgafv = lens _cdrXgafv (\ s a -> s{_cdrXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cdrQuotaUser :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrQuotaUser + = lens _cdrQuotaUser (\ s a -> s{_cdrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdrPrettyPrint :: Lens' ControllerDebuggeesRegister' Bool +cdrPrettyPrint + = lens _cdrPrettyPrint + (\ s a -> s{_cdrPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cdrUploadProtocol :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrUploadProtocol + = lens _cdrUploadProtocol + (\ s a -> s{_cdrUploadProtocol = a}) + +-- | Pretty-print response. +cdrPp :: Lens' ControllerDebuggeesRegister' Bool +cdrPp = lens _cdrPp (\ s a -> s{_cdrPp = a}) + +-- | OAuth access token. +cdrAccessToken :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrAccessToken + = lens _cdrAccessToken + (\ s a -> s{_cdrAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cdrUploadType :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrUploadType + = lens _cdrUploadType + (\ s a -> s{_cdrUploadType = a}) + +-- | OAuth bearer token. +cdrBearerToken :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrBearerToken + = lens _cdrBearerToken + (\ s a -> s{_cdrBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdrKey :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrKey = lens _cdrKey (\ s a -> s{_cdrKey = a}) + +-- | OAuth 2.0 token for the current user. +cdrOauthToken :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrOauthToken + = lens _cdrOauthToken + (\ s a -> s{_cdrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdrFields :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrFields + = lens _cdrFields (\ s a -> s{_cdrFields = a}) + +-- | JSONP +cdrCallback :: Lens' ControllerDebuggeesRegister' (Maybe Text) +cdrCallback + = lens _cdrCallback (\ s a -> s{_cdrCallback = a}) + +-- | Data format for response. +cdrAlt :: Lens' ControllerDebuggeesRegister' Text +cdrAlt = lens _cdrAlt (\ s a -> s{_cdrAlt = a}) + +instance GoogleRequest ControllerDebuggeesRegister' + where + type Rs ControllerDebuggeesRegister' = + RegisterDebuggeeResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u ControllerDebuggeesRegister{..} + = go _cdrXgafv _cdrQuotaUser _cdrPrettyPrint + _cdrUploadProtocol + _cdrPp + _cdrAccessToken + _cdrUploadType + _cdrBearerToken + _cdrKey + _cdrOauthToken + _cdrFields + _cdrCallback + _cdrAlt + where go + = clientWithRoute + (Proxy :: Proxy ControllerDebuggeesRegisterAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Delete.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Delete.hs new file mode 100644 index 000000000..f38c161f3 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Delete.hs @@ -0,0 +1,248 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the breakpoint from the debuggee. +-- +-- /See:/ for @ClouddebuggerDebuggerDebuggeesBreakpointsDelete@. +module Clouddebugger.Debugger.Debuggees.Breakpoints.Delete + ( + -- * REST Resource + DebuggerDebuggeesBreakpointsDeleteAPI + + -- * Creating a Request + , debuggerDebuggeesBreakpointsDelete + , DebuggerDebuggeesBreakpointsDelete + + -- * Request Lenses + , ddbdXgafv + , ddbdQuotaUser + , ddbdPrettyPrint + , ddbdUploadProtocol + , ddbdPp + , ddbdAccessToken + , ddbdUploadType + , ddbdBreakpointId + , ddbdBearerToken + , ddbdKey + , ddbdDebuggeeId + , ddbdOauthToken + , ddbdFields + , ddbdCallback + , ddbdAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerDebuggerDebuggeesBreakpointsDelete@ which the +-- 'DebuggerDebuggeesBreakpointsDelete' request conforms to. +type DebuggerDebuggeesBreakpointsDeleteAPI = + "v2" :> + "debugger" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + Capture "breakpointId" Text :> Delete '[JSON] Empty + +-- | Deletes the breakpoint from the debuggee. +-- +-- /See:/ 'debuggerDebuggeesBreakpointsDelete' smart constructor. +data DebuggerDebuggeesBreakpointsDelete = DebuggerDebuggeesBreakpointsDelete + { _ddbdXgafv :: !(Maybe Text) + , _ddbdQuotaUser :: !(Maybe Text) + , _ddbdPrettyPrint :: !Bool + , _ddbdUploadProtocol :: !(Maybe Text) + , _ddbdPp :: !Bool + , _ddbdAccessToken :: !(Maybe Text) + , _ddbdUploadType :: !(Maybe Text) + , _ddbdBreakpointId :: !Text + , _ddbdBearerToken :: !(Maybe Text) + , _ddbdKey :: !(Maybe Text) + , _ddbdDebuggeeId :: !Text + , _ddbdOauthToken :: !(Maybe Text) + , _ddbdFields :: !(Maybe Text) + , _ddbdCallback :: !(Maybe Text) + , _ddbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebuggerDebuggeesBreakpointsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddbdXgafv' +-- +-- * 'ddbdQuotaUser' +-- +-- * 'ddbdPrettyPrint' +-- +-- * 'ddbdUploadProtocol' +-- +-- * 'ddbdPp' +-- +-- * 'ddbdAccessToken' +-- +-- * 'ddbdUploadType' +-- +-- * 'ddbdBreakpointId' +-- +-- * 'ddbdBearerToken' +-- +-- * 'ddbdKey' +-- +-- * 'ddbdDebuggeeId' +-- +-- * 'ddbdOauthToken' +-- +-- * 'ddbdFields' +-- +-- * 'ddbdCallback' +-- +-- * 'ddbdAlt' +debuggerDebuggeesBreakpointsDelete + :: Text -- ^ 'breakpointId' + -> Text -- ^ 'debuggeeId' + -> DebuggerDebuggeesBreakpointsDelete +debuggerDebuggeesBreakpointsDelete pDdbdBreakpointId_ pDdbdDebuggeeId_ = + DebuggerDebuggeesBreakpointsDelete + { _ddbdXgafv = Nothing + , _ddbdQuotaUser = Nothing + , _ddbdPrettyPrint = True + , _ddbdUploadProtocol = Nothing + , _ddbdPp = True + , _ddbdAccessToken = Nothing + , _ddbdUploadType = Nothing + , _ddbdBreakpointId = pDdbdBreakpointId_ + , _ddbdBearerToken = Nothing + , _ddbdKey = Nothing + , _ddbdDebuggeeId = pDdbdDebuggeeId_ + , _ddbdOauthToken = Nothing + , _ddbdFields = Nothing + , _ddbdCallback = Nothing + , _ddbdAlt = "json" + } + +-- | V1 error format. +ddbdXgafv :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdXgafv + = lens _ddbdXgafv (\ s a -> s{_ddbdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ddbdQuotaUser :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdQuotaUser + = lens _ddbdQuotaUser + (\ s a -> s{_ddbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddbdPrettyPrint :: Lens' DebuggerDebuggeesBreakpointsDelete' Bool +ddbdPrettyPrint + = lens _ddbdPrettyPrint + (\ s a -> s{_ddbdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ddbdUploadProtocol :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdUploadProtocol + = lens _ddbdUploadProtocol + (\ s a -> s{_ddbdUploadProtocol = a}) + +-- | Pretty-print response. +ddbdPp :: Lens' DebuggerDebuggeesBreakpointsDelete' Bool +ddbdPp = lens _ddbdPp (\ s a -> s{_ddbdPp = a}) + +-- | OAuth access token. +ddbdAccessToken :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdAccessToken + = lens _ddbdAccessToken + (\ s a -> s{_ddbdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ddbdUploadType :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdUploadType + = lens _ddbdUploadType + (\ s a -> s{_ddbdUploadType = a}) + +-- | The breakpoint to delete. +ddbdBreakpointId :: Lens' DebuggerDebuggeesBreakpointsDelete' Text +ddbdBreakpointId + = lens _ddbdBreakpointId + (\ s a -> s{_ddbdBreakpointId = a}) + +-- | OAuth bearer token. +ddbdBearerToken :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdBearerToken + = lens _ddbdBearerToken + (\ s a -> s{_ddbdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddbdKey :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdKey = lens _ddbdKey (\ s a -> s{_ddbdKey = a}) + +-- | The debuggee id to delete the breakpoint from. +ddbdDebuggeeId :: Lens' DebuggerDebuggeesBreakpointsDelete' Text +ddbdDebuggeeId + = lens _ddbdDebuggeeId + (\ s a -> s{_ddbdDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +ddbdOauthToken :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdOauthToken + = lens _ddbdOauthToken + (\ s a -> s{_ddbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddbdFields :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdFields + = lens _ddbdFields (\ s a -> s{_ddbdFields = a}) + +-- | JSONP +ddbdCallback :: Lens' DebuggerDebuggeesBreakpointsDelete' (Maybe Text) +ddbdCallback + = lens _ddbdCallback (\ s a -> s{_ddbdCallback = a}) + +-- | Data format for response. +ddbdAlt :: Lens' DebuggerDebuggeesBreakpointsDelete' Text +ddbdAlt = lens _ddbdAlt (\ s a -> s{_ddbdAlt = a}) + +instance GoogleRequest + DebuggerDebuggeesBreakpointsDelete' where + type Rs DebuggerDebuggeesBreakpointsDelete' = Empty + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + DebuggerDebuggeesBreakpointsDelete{..} + = go _ddbdXgafv _ddbdQuotaUser _ddbdPrettyPrint + _ddbdUploadProtocol + _ddbdPp + _ddbdAccessToken + _ddbdUploadType + _ddbdBreakpointId + _ddbdBearerToken + _ddbdKey + _ddbdDebuggeeId + _ddbdOauthToken + _ddbdFields + _ddbdCallback + _ddbdAlt + where go + = clientWithRoute + (Proxy :: + Proxy DebuggerDebuggeesBreakpointsDeleteAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Get.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Get.hs new file mode 100644 index 000000000..88fc3ba86 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Get.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets breakpoint information. +-- +-- /See:/ for @ClouddebuggerDebuggerDebuggeesBreakpointsGet@. +module Clouddebugger.Debugger.Debuggees.Breakpoints.Get + ( + -- * REST Resource + DebuggerDebuggeesBreakpointsGetAPI + + -- * Creating a Request + , debuggerDebuggeesBreakpointsGet + , DebuggerDebuggeesBreakpointsGet + + -- * Request Lenses + , ddbgXgafv + , ddbgQuotaUser + , ddbgPrettyPrint + , ddbgUploadProtocol + , ddbgPp + , ddbgAccessToken + , ddbgUploadType + , ddbgBreakpointId + , ddbgBearerToken + , ddbgKey + , ddbgDebuggeeId + , ddbgOauthToken + , ddbgFields + , ddbgCallback + , ddbgAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerDebuggerDebuggeesBreakpointsGet@ which the +-- 'DebuggerDebuggeesBreakpointsGet' request conforms to. +type DebuggerDebuggeesBreakpointsGetAPI = + "v2" :> + "debugger" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + Capture "breakpointId" Text :> + Get '[JSON] GetBreakpointResponse + +-- | Gets breakpoint information. +-- +-- /See:/ 'debuggerDebuggeesBreakpointsGet' smart constructor. +data DebuggerDebuggeesBreakpointsGet = DebuggerDebuggeesBreakpointsGet + { _ddbgXgafv :: !(Maybe Text) + , _ddbgQuotaUser :: !(Maybe Text) + , _ddbgPrettyPrint :: !Bool + , _ddbgUploadProtocol :: !(Maybe Text) + , _ddbgPp :: !Bool + , _ddbgAccessToken :: !(Maybe Text) + , _ddbgUploadType :: !(Maybe Text) + , _ddbgBreakpointId :: !Text + , _ddbgBearerToken :: !(Maybe Text) + , _ddbgKey :: !(Maybe Text) + , _ddbgDebuggeeId :: !Text + , _ddbgOauthToken :: !(Maybe Text) + , _ddbgFields :: !(Maybe Text) + , _ddbgCallback :: !(Maybe Text) + , _ddbgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebuggerDebuggeesBreakpointsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddbgXgafv' +-- +-- * 'ddbgQuotaUser' +-- +-- * 'ddbgPrettyPrint' +-- +-- * 'ddbgUploadProtocol' +-- +-- * 'ddbgPp' +-- +-- * 'ddbgAccessToken' +-- +-- * 'ddbgUploadType' +-- +-- * 'ddbgBreakpointId' +-- +-- * 'ddbgBearerToken' +-- +-- * 'ddbgKey' +-- +-- * 'ddbgDebuggeeId' +-- +-- * 'ddbgOauthToken' +-- +-- * 'ddbgFields' +-- +-- * 'ddbgCallback' +-- +-- * 'ddbgAlt' +debuggerDebuggeesBreakpointsGet + :: Text -- ^ 'breakpointId' + -> Text -- ^ 'debuggeeId' + -> DebuggerDebuggeesBreakpointsGet +debuggerDebuggeesBreakpointsGet pDdbgBreakpointId_ pDdbgDebuggeeId_ = + DebuggerDebuggeesBreakpointsGet + { _ddbgXgafv = Nothing + , _ddbgQuotaUser = Nothing + , _ddbgPrettyPrint = True + , _ddbgUploadProtocol = Nothing + , _ddbgPp = True + , _ddbgAccessToken = Nothing + , _ddbgUploadType = Nothing + , _ddbgBreakpointId = pDdbgBreakpointId_ + , _ddbgBearerToken = Nothing + , _ddbgKey = Nothing + , _ddbgDebuggeeId = pDdbgDebuggeeId_ + , _ddbgOauthToken = Nothing + , _ddbgFields = Nothing + , _ddbgCallback = Nothing + , _ddbgAlt = "json" + } + +-- | V1 error format. +ddbgXgafv :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgXgafv + = lens _ddbgXgafv (\ s a -> s{_ddbgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ddbgQuotaUser :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgQuotaUser + = lens _ddbgQuotaUser + (\ s a -> s{_ddbgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddbgPrettyPrint :: Lens' DebuggerDebuggeesBreakpointsGet' Bool +ddbgPrettyPrint + = lens _ddbgPrettyPrint + (\ s a -> s{_ddbgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ddbgUploadProtocol :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgUploadProtocol + = lens _ddbgUploadProtocol + (\ s a -> s{_ddbgUploadProtocol = a}) + +-- | Pretty-print response. +ddbgPp :: Lens' DebuggerDebuggeesBreakpointsGet' Bool +ddbgPp = lens _ddbgPp (\ s a -> s{_ddbgPp = a}) + +-- | OAuth access token. +ddbgAccessToken :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgAccessToken + = lens _ddbgAccessToken + (\ s a -> s{_ddbgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ddbgUploadType :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgUploadType + = lens _ddbgUploadType + (\ s a -> s{_ddbgUploadType = a}) + +-- | The breakpoint to get. +ddbgBreakpointId :: Lens' DebuggerDebuggeesBreakpointsGet' Text +ddbgBreakpointId + = lens _ddbgBreakpointId + (\ s a -> s{_ddbgBreakpointId = a}) + +-- | OAuth bearer token. +ddbgBearerToken :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgBearerToken + = lens _ddbgBearerToken + (\ s a -> s{_ddbgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddbgKey :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgKey = lens _ddbgKey (\ s a -> s{_ddbgKey = a}) + +-- | The debuggee id to get the breakpoint from. +ddbgDebuggeeId :: Lens' DebuggerDebuggeesBreakpointsGet' Text +ddbgDebuggeeId + = lens _ddbgDebuggeeId + (\ s a -> s{_ddbgDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +ddbgOauthToken :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgOauthToken + = lens _ddbgOauthToken + (\ s a -> s{_ddbgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddbgFields :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgFields + = lens _ddbgFields (\ s a -> s{_ddbgFields = a}) + +-- | JSONP +ddbgCallback :: Lens' DebuggerDebuggeesBreakpointsGet' (Maybe Text) +ddbgCallback + = lens _ddbgCallback (\ s a -> s{_ddbgCallback = a}) + +-- | Data format for response. +ddbgAlt :: Lens' DebuggerDebuggeesBreakpointsGet' Text +ddbgAlt = lens _ddbgAlt (\ s a -> s{_ddbgAlt = a}) + +instance GoogleRequest + DebuggerDebuggeesBreakpointsGet' where + type Rs DebuggerDebuggeesBreakpointsGet' = + GetBreakpointResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + DebuggerDebuggeesBreakpointsGet{..} + = go _ddbgXgafv _ddbgQuotaUser _ddbgPrettyPrint + _ddbgUploadProtocol + _ddbgPp + _ddbgAccessToken + _ddbgUploadType + _ddbgBreakpointId + _ddbgBearerToken + _ddbgKey + _ddbgDebuggeeId + _ddbgOauthToken + _ddbgFields + _ddbgCallback + _ddbgAlt + where go + = clientWithRoute + (Proxy :: Proxy DebuggerDebuggeesBreakpointsGetAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/List.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/List.hs new file mode 100644 index 000000000..62ae25d09 --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/List.hs @@ -0,0 +1,307 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all breakpoints of the debuggee that the user has access to. +-- +-- /See:/ for @ClouddebuggerDebuggerDebuggeesBreakpointsList@. +module Clouddebugger.Debugger.Debuggees.Breakpoints.List + ( + -- * REST Resource + DebuggerDebuggeesBreakpointsListAPI + + -- * Creating a Request + , debuggerDebuggeesBreakpointsList + , DebuggerDebuggeesBreakpointsList + + -- * Request Lenses + , ddblXgafv + , ddblQuotaUser + , ddblPrettyPrint + , ddblIncludeInactive + , ddblUploadProtocol + , ddblPp + , ddblAccessToken + , ddblActionValue + , ddblUploadType + , ddblStripResults + , ddblBearerToken + , ddblKey + , ddblIncludeAllUsers + , ddblWaitToken + , ddblDebuggeeId + , ddblOauthToken + , ddblFields + , ddblCallback + , ddblAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerDebuggerDebuggeesBreakpointsList@ which the +-- 'DebuggerDebuggeesBreakpointsList' request conforms to. +type DebuggerDebuggeesBreakpointsListAPI = + "v2" :> + "debugger" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + QueryParam "includeInactive" Bool :> + QueryParam "action.value" Text :> + QueryParam "stripResults" Bool :> + QueryParam "includeAllUsers" Bool :> + QueryParam "waitToken" Text :> + Get '[JSON] ListBreakpointsResponse + +-- | Lists all breakpoints of the debuggee that the user has access to. +-- +-- /See:/ 'debuggerDebuggeesBreakpointsList' smart constructor. +data DebuggerDebuggeesBreakpointsList = DebuggerDebuggeesBreakpointsList + { _ddblXgafv :: !(Maybe Text) + , _ddblQuotaUser :: !(Maybe Text) + , _ddblPrettyPrint :: !Bool + , _ddblIncludeInactive :: !(Maybe Bool) + , _ddblUploadProtocol :: !(Maybe Text) + , _ddblPp :: !Bool + , _ddblAccessToken :: !(Maybe Text) + , _ddblActionValue :: !(Maybe Text) + , _ddblUploadType :: !(Maybe Text) + , _ddblStripResults :: !(Maybe Bool) + , _ddblBearerToken :: !(Maybe Text) + , _ddblKey :: !(Maybe Text) + , _ddblIncludeAllUsers :: !(Maybe Bool) + , _ddblWaitToken :: !(Maybe Text) + , _ddblDebuggeeId :: !Text + , _ddblOauthToken :: !(Maybe Text) + , _ddblFields :: !(Maybe Text) + , _ddblCallback :: !(Maybe Text) + , _ddblAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebuggerDebuggeesBreakpointsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddblXgafv' +-- +-- * 'ddblQuotaUser' +-- +-- * 'ddblPrettyPrint' +-- +-- * 'ddblIncludeInactive' +-- +-- * 'ddblUploadProtocol' +-- +-- * 'ddblPp' +-- +-- * 'ddblAccessToken' +-- +-- * 'ddblActionValue' +-- +-- * 'ddblUploadType' +-- +-- * 'ddblStripResults' +-- +-- * 'ddblBearerToken' +-- +-- * 'ddblKey' +-- +-- * 'ddblIncludeAllUsers' +-- +-- * 'ddblWaitToken' +-- +-- * 'ddblDebuggeeId' +-- +-- * 'ddblOauthToken' +-- +-- * 'ddblFields' +-- +-- * 'ddblCallback' +-- +-- * 'ddblAlt' +debuggerDebuggeesBreakpointsList + :: Text -- ^ 'debuggeeId' + -> DebuggerDebuggeesBreakpointsList +debuggerDebuggeesBreakpointsList pDdblDebuggeeId_ = + DebuggerDebuggeesBreakpointsList + { _ddblXgafv = Nothing + , _ddblQuotaUser = Nothing + , _ddblPrettyPrint = True + , _ddblIncludeInactive = Nothing + , _ddblUploadProtocol = Nothing + , _ddblPp = True + , _ddblAccessToken = Nothing + , _ddblActionValue = Nothing + , _ddblUploadType = Nothing + , _ddblStripResults = Nothing + , _ddblBearerToken = Nothing + , _ddblKey = Nothing + , _ddblIncludeAllUsers = Nothing + , _ddblWaitToken = Nothing + , _ddblDebuggeeId = pDdblDebuggeeId_ + , _ddblOauthToken = Nothing + , _ddblFields = Nothing + , _ddblCallback = Nothing + , _ddblAlt = "json" + } + +-- | V1 error format. +ddblXgafv :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblXgafv + = lens _ddblXgafv (\ s a -> s{_ddblXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ddblQuotaUser :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblQuotaUser + = lens _ddblQuotaUser + (\ s a -> s{_ddblQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddblPrettyPrint :: Lens' DebuggerDebuggeesBreakpointsList' Bool +ddblPrettyPrint + = lens _ddblPrettyPrint + (\ s a -> s{_ddblPrettyPrint = a}) + +-- | When set to true the response includes active and inactive breakpoints, +-- otherwise only active breakpoints are returned. +ddblIncludeInactive :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Bool) +ddblIncludeInactive + = lens _ddblIncludeInactive + (\ s a -> s{_ddblIncludeInactive = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ddblUploadProtocol :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblUploadProtocol + = lens _ddblUploadProtocol + (\ s a -> s{_ddblUploadProtocol = a}) + +-- | Pretty-print response. +ddblPp :: Lens' DebuggerDebuggeesBreakpointsList' Bool +ddblPp = lens _ddblPp (\ s a -> s{_ddblPp = a}) + +-- | OAuth access token. +ddblAccessToken :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblAccessToken + = lens _ddblAccessToken + (\ s a -> s{_ddblAccessToken = a}) + +-- | Only breakpoints with the specified action will pass the filter. +ddblActionValue :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblActionValue + = lens _ddblActionValue + (\ s a -> s{_ddblActionValue = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ddblUploadType :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblUploadType + = lens _ddblUploadType + (\ s a -> s{_ddblUploadType = a}) + +-- | When set to true the response breakpoints will be stripped of the +-- results fields: stack_frames, evaluated_expressions and variable_table. +ddblStripResults :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Bool) +ddblStripResults + = lens _ddblStripResults + (\ s a -> s{_ddblStripResults = a}) + +-- | OAuth bearer token. +ddblBearerToken :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblBearerToken + = lens _ddblBearerToken + (\ s a -> s{_ddblBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddblKey :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblKey = lens _ddblKey (\ s a -> s{_ddblKey = a}) + +-- | When set to true the response includes the list of breakpoints set by +-- any user, otherwise only breakpoints set by the caller. +ddblIncludeAllUsers :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Bool) +ddblIncludeAllUsers + = lens _ddblIncludeAllUsers + (\ s a -> s{_ddblIncludeAllUsers = a}) + +-- | A wait token that, if specified, blocks the call until the breakpoints +-- list has changed, or a server selected timeout has expired. The value +-- should be set from the last response to ListBreakpoints. The error code +-- ABORTED is returned on wait timeout, which should be called again with +-- the same wait_token. +ddblWaitToken :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblWaitToken + = lens _ddblWaitToken + (\ s a -> s{_ddblWaitToken = a}) + +-- | The debuggee id to list breakpoint from. +ddblDebuggeeId :: Lens' DebuggerDebuggeesBreakpointsList' Text +ddblDebuggeeId + = lens _ddblDebuggeeId + (\ s a -> s{_ddblDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +ddblOauthToken :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblOauthToken + = lens _ddblOauthToken + (\ s a -> s{_ddblOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddblFields :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblFields + = lens _ddblFields (\ s a -> s{_ddblFields = a}) + +-- | JSONP +ddblCallback :: Lens' DebuggerDebuggeesBreakpointsList' (Maybe Text) +ddblCallback + = lens _ddblCallback (\ s a -> s{_ddblCallback = a}) + +-- | Data format for response. +ddblAlt :: Lens' DebuggerDebuggeesBreakpointsList' Text +ddblAlt = lens _ddblAlt (\ s a -> s{_ddblAlt = a}) + +instance GoogleRequest + DebuggerDebuggeesBreakpointsList' where + type Rs DebuggerDebuggeesBreakpointsList' = + ListBreakpointsResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + DebuggerDebuggeesBreakpointsList{..} + = go _ddblXgafv _ddblQuotaUser _ddblPrettyPrint + _ddblIncludeInactive + _ddblUploadProtocol + _ddblPp + _ddblAccessToken + _ddblActionValue + _ddblUploadType + _ddblStripResults + _ddblBearerToken + _ddblKey + _ddblIncludeAllUsers + _ddblWaitToken + _ddblDebuggeeId + _ddblOauthToken + _ddblFields + _ddblCallback + _ddblAlt + where go + = clientWithRoute + (Proxy :: Proxy DebuggerDebuggeesBreakpointsListAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Set.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Set.hs new file mode 100644 index 000000000..567be7bbd --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/Breakpoints/Set.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Set +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the breakpoint to the debuggee. +-- +-- /See:/ for @ClouddebuggerDebuggerDebuggeesBreakpointsSet@. +module Clouddebugger.Debugger.Debuggees.Breakpoints.Set + ( + -- * REST Resource + DebuggerDebuggeesBreakpointsSetAPI + + -- * Creating a Request + , debuggerDebuggeesBreakpointsSet + , DebuggerDebuggeesBreakpointsSet + + -- * Request Lenses + , ddbsXgafv + , ddbsQuotaUser + , ddbsPrettyPrint + , ddbsUploadProtocol + , ddbsPp + , ddbsAccessToken + , ddbsUploadType + , ddbsBearerToken + , ddbsKey + , ddbsDebuggeeId + , ddbsOauthToken + , ddbsFields + , ddbsCallback + , ddbsAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerDebuggerDebuggeesBreakpointsSet@ which the +-- 'DebuggerDebuggeesBreakpointsSet' request conforms to. +type DebuggerDebuggeesBreakpointsSetAPI = + "v2" :> + "debugger" :> + "debuggees" :> + Capture "debuggeeId" Text :> + "breakpoints" :> + "set" :> Post '[JSON] SetBreakpointResponse + +-- | Sets the breakpoint to the debuggee. +-- +-- /See:/ 'debuggerDebuggeesBreakpointsSet' smart constructor. +data DebuggerDebuggeesBreakpointsSet = DebuggerDebuggeesBreakpointsSet + { _ddbsXgafv :: !(Maybe Text) + , _ddbsQuotaUser :: !(Maybe Text) + , _ddbsPrettyPrint :: !Bool + , _ddbsUploadProtocol :: !(Maybe Text) + , _ddbsPp :: !Bool + , _ddbsAccessToken :: !(Maybe Text) + , _ddbsUploadType :: !(Maybe Text) + , _ddbsBearerToken :: !(Maybe Text) + , _ddbsKey :: !(Maybe Text) + , _ddbsDebuggeeId :: !Text + , _ddbsOauthToken :: !(Maybe Text) + , _ddbsFields :: !(Maybe Text) + , _ddbsCallback :: !(Maybe Text) + , _ddbsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebuggerDebuggeesBreakpointsSet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddbsXgafv' +-- +-- * 'ddbsQuotaUser' +-- +-- * 'ddbsPrettyPrint' +-- +-- * 'ddbsUploadProtocol' +-- +-- * 'ddbsPp' +-- +-- * 'ddbsAccessToken' +-- +-- * 'ddbsUploadType' +-- +-- * 'ddbsBearerToken' +-- +-- * 'ddbsKey' +-- +-- * 'ddbsDebuggeeId' +-- +-- * 'ddbsOauthToken' +-- +-- * 'ddbsFields' +-- +-- * 'ddbsCallback' +-- +-- * 'ddbsAlt' +debuggerDebuggeesBreakpointsSet + :: Text -- ^ 'debuggeeId' + -> DebuggerDebuggeesBreakpointsSet +debuggerDebuggeesBreakpointsSet pDdbsDebuggeeId_ = + DebuggerDebuggeesBreakpointsSet + { _ddbsXgafv = Nothing + , _ddbsQuotaUser = Nothing + , _ddbsPrettyPrint = True + , _ddbsUploadProtocol = Nothing + , _ddbsPp = True + , _ddbsAccessToken = Nothing + , _ddbsUploadType = Nothing + , _ddbsBearerToken = Nothing + , _ddbsKey = Nothing + , _ddbsDebuggeeId = pDdbsDebuggeeId_ + , _ddbsOauthToken = Nothing + , _ddbsFields = Nothing + , _ddbsCallback = Nothing + , _ddbsAlt = "json" + } + +-- | V1 error format. +ddbsXgafv :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsXgafv + = lens _ddbsXgafv (\ s a -> s{_ddbsXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ddbsQuotaUser :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsQuotaUser + = lens _ddbsQuotaUser + (\ s a -> s{_ddbsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddbsPrettyPrint :: Lens' DebuggerDebuggeesBreakpointsSet' Bool +ddbsPrettyPrint + = lens _ddbsPrettyPrint + (\ s a -> s{_ddbsPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ddbsUploadProtocol :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsUploadProtocol + = lens _ddbsUploadProtocol + (\ s a -> s{_ddbsUploadProtocol = a}) + +-- | Pretty-print response. +ddbsPp :: Lens' DebuggerDebuggeesBreakpointsSet' Bool +ddbsPp = lens _ddbsPp (\ s a -> s{_ddbsPp = a}) + +-- | OAuth access token. +ddbsAccessToken :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsAccessToken + = lens _ddbsAccessToken + (\ s a -> s{_ddbsAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ddbsUploadType :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsUploadType + = lens _ddbsUploadType + (\ s a -> s{_ddbsUploadType = a}) + +-- | OAuth bearer token. +ddbsBearerToken :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsBearerToken + = lens _ddbsBearerToken + (\ s a -> s{_ddbsBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddbsKey :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsKey = lens _ddbsKey (\ s a -> s{_ddbsKey = a}) + +-- | The debuggee id to set the breakpoint to. +ddbsDebuggeeId :: Lens' DebuggerDebuggeesBreakpointsSet' Text +ddbsDebuggeeId + = lens _ddbsDebuggeeId + (\ s a -> s{_ddbsDebuggeeId = a}) + +-- | OAuth 2.0 token for the current user. +ddbsOauthToken :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsOauthToken + = lens _ddbsOauthToken + (\ s a -> s{_ddbsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddbsFields :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsFields + = lens _ddbsFields (\ s a -> s{_ddbsFields = a}) + +-- | JSONP +ddbsCallback :: Lens' DebuggerDebuggeesBreakpointsSet' (Maybe Text) +ddbsCallback + = lens _ddbsCallback (\ s a -> s{_ddbsCallback = a}) + +-- | Data format for response. +ddbsAlt :: Lens' DebuggerDebuggeesBreakpointsSet' Text +ddbsAlt = lens _ddbsAlt (\ s a -> s{_ddbsAlt = a}) + +instance GoogleRequest + DebuggerDebuggeesBreakpointsSet' where + type Rs DebuggerDebuggeesBreakpointsSet' = + SetBreakpointResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u + DebuggerDebuggeesBreakpointsSet{..} + = go _ddbsXgafv _ddbsQuotaUser _ddbsPrettyPrint + _ddbsUploadProtocol + _ddbsPp + _ddbsAccessToken + _ddbsUploadType + _ddbsBearerToken + _ddbsKey + _ddbsDebuggeeId + _ddbsOauthToken + _ddbsFields + _ddbsCallback + _ddbsAlt + where go + = clientWithRoute + (Proxy :: Proxy DebuggerDebuggeesBreakpointsSetAPI) + r + u diff --git a/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/List.hs b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/List.hs new file mode 100644 index 000000000..40057a12b --- /dev/null +++ b/gogol-debugger/gen/Network/Google/Resource/Clouddebugger/Debugger/Debuggees/List.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Clouddebugger.Debugger.Debuggees.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the debuggees that the user can set breakpoints to. +-- +-- /See:/ for @ClouddebuggerDebuggerDebuggeesList@. +module Clouddebugger.Debugger.Debuggees.List + ( + -- * REST Resource + DebuggerDebuggeesListAPI + + -- * Creating a Request + , debuggerDebuggeesList + , DebuggerDebuggeesList + + -- * Request Lenses + , ddlXgafv + , ddlQuotaUser + , ddlPrettyPrint + , ddlIncludeInactive + , ddlUploadProtocol + , ddlProject + , ddlPp + , ddlAccessToken + , ddlUploadType + , ddlBearerToken + , ddlKey + , ddlOauthToken + , ddlFields + , ddlCallback + , ddlAlt + ) where + +import Network.Google.Debugger.Types +import Network.Google.Prelude + +-- | A resource alias for @ClouddebuggerDebuggerDebuggeesList@ which the +-- 'DebuggerDebuggeesList' request conforms to. +type DebuggerDebuggeesListAPI = + "v2" :> + "debugger" :> + "debuggees" :> + QueryParam "includeInactive" Bool :> + QueryParam "project" Text :> + Get '[JSON] ListDebuggeesResponse + +-- | Lists all the debuggees that the user can set breakpoints to. +-- +-- /See:/ 'debuggerDebuggeesList' smart constructor. +data DebuggerDebuggeesList = DebuggerDebuggeesList + { _ddlXgafv :: !(Maybe Text) + , _ddlQuotaUser :: !(Maybe Text) + , _ddlPrettyPrint :: !Bool + , _ddlIncludeInactive :: !(Maybe Bool) + , _ddlUploadProtocol :: !(Maybe Text) + , _ddlProject :: !(Maybe Text) + , _ddlPp :: !Bool + , _ddlAccessToken :: !(Maybe Text) + , _ddlUploadType :: !(Maybe Text) + , _ddlBearerToken :: !(Maybe Text) + , _ddlKey :: !(Maybe Text) + , _ddlOauthToken :: !(Maybe Text) + , _ddlFields :: !(Maybe Text) + , _ddlCallback :: !(Maybe Text) + , _ddlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebuggerDebuggeesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddlXgafv' +-- +-- * 'ddlQuotaUser' +-- +-- * 'ddlPrettyPrint' +-- +-- * 'ddlIncludeInactive' +-- +-- * 'ddlUploadProtocol' +-- +-- * 'ddlProject' +-- +-- * 'ddlPp' +-- +-- * 'ddlAccessToken' +-- +-- * 'ddlUploadType' +-- +-- * 'ddlBearerToken' +-- +-- * 'ddlKey' +-- +-- * 'ddlOauthToken' +-- +-- * 'ddlFields' +-- +-- * 'ddlCallback' +-- +-- * 'ddlAlt' +debuggerDebuggeesList + :: DebuggerDebuggeesList +debuggerDebuggeesList = + DebuggerDebuggeesList + { _ddlXgafv = Nothing + , _ddlQuotaUser = Nothing + , _ddlPrettyPrint = True + , _ddlIncludeInactive = Nothing + , _ddlUploadProtocol = Nothing + , _ddlProject = Nothing + , _ddlPp = True + , _ddlAccessToken = Nothing + , _ddlUploadType = Nothing + , _ddlBearerToken = Nothing + , _ddlKey = Nothing + , _ddlOauthToken = Nothing + , _ddlFields = Nothing + , _ddlCallback = Nothing + , _ddlAlt = "json" + } + +-- | V1 error format. +ddlXgafv :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlXgafv = lens _ddlXgafv (\ s a -> s{_ddlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ddlQuotaUser :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlQuotaUser + = lens _ddlQuotaUser (\ s a -> s{_ddlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddlPrettyPrint :: Lens' DebuggerDebuggeesList' Bool +ddlPrettyPrint + = lens _ddlPrettyPrint + (\ s a -> s{_ddlPrettyPrint = a}) + +-- | When set to true the result includes all debuggees, otherwise only +-- debugees that are active. +ddlIncludeInactive :: Lens' DebuggerDebuggeesList' (Maybe Bool) +ddlIncludeInactive + = lens _ddlIncludeInactive + (\ s a -> s{_ddlIncludeInactive = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ddlUploadProtocol :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlUploadProtocol + = lens _ddlUploadProtocol + (\ s a -> s{_ddlUploadProtocol = a}) + +-- | Set to the project number of the Google Cloud Platform to list the +-- debuggees that are part of that project. +ddlProject :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlProject + = lens _ddlProject (\ s a -> s{_ddlProject = a}) + +-- | Pretty-print response. +ddlPp :: Lens' DebuggerDebuggeesList' Bool +ddlPp = lens _ddlPp (\ s a -> s{_ddlPp = a}) + +-- | OAuth access token. +ddlAccessToken :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlAccessToken + = lens _ddlAccessToken + (\ s a -> s{_ddlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ddlUploadType :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlUploadType + = lens _ddlUploadType + (\ s a -> s{_ddlUploadType = a}) + +-- | OAuth bearer token. +ddlBearerToken :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlBearerToken + = lens _ddlBearerToken + (\ s a -> s{_ddlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddlKey :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlKey = lens _ddlKey (\ s a -> s{_ddlKey = a}) + +-- | OAuth 2.0 token for the current user. +ddlOauthToken :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlOauthToken + = lens _ddlOauthToken + (\ s a -> s{_ddlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddlFields :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlFields + = lens _ddlFields (\ s a -> s{_ddlFields = a}) + +-- | JSONP +ddlCallback :: Lens' DebuggerDebuggeesList' (Maybe Text) +ddlCallback + = lens _ddlCallback (\ s a -> s{_ddlCallback = a}) + +-- | Data format for response. +ddlAlt :: Lens' DebuggerDebuggeesList' Text +ddlAlt = lens _ddlAlt (\ s a -> s{_ddlAlt = a}) + +instance GoogleRequest DebuggerDebuggeesList' where + type Rs DebuggerDebuggeesList' = + ListDebuggeesResponse + request = requestWithRoute defReq debuggerURL + requestWithRoute r u DebuggerDebuggeesList{..} + = go _ddlXgafv _ddlQuotaUser _ddlPrettyPrint + _ddlIncludeInactive + _ddlUploadProtocol + _ddlProject + _ddlPp + _ddlAccessToken + _ddlUploadType + _ddlBearerToken + _ddlKey + _ddlOauthToken + _ddlFields + _ddlCallback + _ddlAlt + where go + = clientWithRoute + (Proxy :: Proxy DebuggerDebuggeesListAPI) + r + u diff --git a/gogol-debugger/gogol-debugger.cabal b/gogol-debugger/gogol-debugger.cabal new file mode 100644 index 000000000..3bafd8762 --- /dev/null +++ b/gogol-debugger/gogol-debugger.cabal @@ -0,0 +1,51 @@ +name: gogol-debugger +version: 0.0.1 +synopsis: Google Cloud Debugger API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you examine the stack and variables of your running application + without stopping or slowing it down. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Debugger + , Network.Google.Debugger.Types + , Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.List + , Network.Google.Resource.Clouddebugger.Controller.Debuggees.Breakpoints.Update + , Network.Google.Resource.Clouddebugger.Controller.Debuggees.Register + , Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Delete + , Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Get + , Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.List + , Network.Google.Resource.Clouddebugger.Debugger.Debuggees.Breakpoints.Set + , Network.Google.Resource.Clouddebugger.Debugger.Debuggees.List + + other-modules: + Network.Google.Debugger.Types.Product + , Network.Google.Debugger.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-debugger/src/.gitkeep b/gogol-debugger/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-deploymentmanager/LICENSE b/gogol-deploymentmanager/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-deploymentmanager/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-deploymentmanager/Makefile b/gogol-deploymentmanager/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-deploymentmanager/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-deploymentmanager/README.md b/gogol-deploymentmanager/README.md new file mode 100644 index 000000000..f949e1175 --- /dev/null +++ b/gogol-deploymentmanager/README.md @@ -0,0 +1,28 @@ +# gogol-deploymentmanager + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Deployment Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-deploymentmanager` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-deploymentmanager/Setup.hs b/gogol-deploymentmanager/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-deploymentmanager/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs new file mode 100644 index 000000000..c1afdfac5 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.DeploymentManager +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Deployment Manager API allows users to declaratively configure, +-- deploy and run complex solutions on the Google Cloud Platform. +-- +-- /See:/ +module Network.Google.DeploymentManager + ( + -- * API + DeploymentManagerAPI + , deploymentManagerAPI + , deploymentManagerURL + + -- * Service Methods + + -- * REST Resources + + -- ** DeploymentmanagerDeploymentsDelete + , module DeploymentManager.Deployments.Delete + + -- ** DeploymentmanagerDeploymentsGet + , module DeploymentManager.Deployments.Get + + -- ** DeploymentmanagerDeploymentsInsert + , module DeploymentManager.Deployments.Insert + + -- ** DeploymentmanagerDeploymentsList + , module DeploymentManager.Deployments.List + + -- ** DeploymentmanagerDeploymentsPatch + , module DeploymentManager.Deployments.Patch + + -- ** DeploymentmanagerDeploymentsUpdate + , module DeploymentManager.Deployments.Update + + -- ** DeploymentmanagerManifestsGet + , module DeploymentManager.Manifests.Get + + -- ** DeploymentmanagerManifestsList + , module DeploymentManager.Manifests.List + + -- ** DeploymentmanagerOperationsGet + , module DeploymentManager.Operations.Get + + -- ** DeploymentmanagerOperationsList + , module DeploymentManager.Operations.List + + -- ** DeploymentmanagerResourcesGet + , module DeploymentManager.Resources.Get + + -- ** DeploymentmanagerResourcesList + , module DeploymentManager.Resources.List + + -- ** DeploymentmanagerTypesList + , module DeploymentManager.Types.List + + -- * Types + + -- ** OperationsListResponse + , OperationsListResponse + , operationsListResponse + , olrNextPageToken + , olrOperations + + -- ** TypesListResponse + , TypesListResponse + , typesListResponse + , tlrNextPageToken + , tlrTypes + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** ResourcesListResponse + , ResourcesListResponse + , resourcesListResponse + , rlrNextPageToken + , rlrResources + + -- ** DeploymentUpdate + , DeploymentUpdate + , deploymentUpdate + , duManifest + , duErrors + + -- ** ResourceUpdate + , ResourceUpdate + , resourceUpdate + , ruState + , ruIntent + , ruManifest + , ruFinalProperties + , ruErrors + , ruProperties + + -- ** Manifest + , Manifest + , manifest + , mInsertTime + , mLayout + , mConfig + , mImports + , mSelfLink + , mName + , mEvaluatedConfig + , mId + + -- ** Resource + , Resource + , resource + , rInsertTime + , rUrl + , rUpdateTime + , rName + , rManifest + , rFinalProperties + , rId + , rType + , rUpdate + , rProperties + + -- ** ManifestsListResponse + , ManifestsListResponse + , manifestsListResponse + , mlrNextPageToken + , mlrManifests + + -- ** Type + , Type + , type' + , tInsertTime + , tSelfLink + , tName + , tId + + -- ** ImportFile + , ImportFile + , importFile + , ifContent + , ifName + + -- ** DeploymentsListResponse + , DeploymentsListResponse + , deploymentsListResponse + , dlrNextPageToken + , dlrDeployments + + -- ** Deployment + , Deployment + , deployment + , dState + , dInsertTime + , dFingerprint + , dIntent + , dUpdateTime + , dName + , dManifest + , dId + , dDescription + , dUpdate + , dTarget + + -- ** TargetConfiguration + , TargetConfiguration + , targetConfiguration + , tcConfig + , tcImports + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude +import Network.Google.Resource.DeploymentManager.Deployments.Delete +import Network.Google.Resource.DeploymentManager.Deployments.Get +import Network.Google.Resource.DeploymentManager.Deployments.Insert +import Network.Google.Resource.DeploymentManager.Deployments.List +import Network.Google.Resource.DeploymentManager.Deployments.Patch +import Network.Google.Resource.DeploymentManager.Deployments.Update +import Network.Google.Resource.DeploymentManager.Manifests.Get +import Network.Google.Resource.DeploymentManager.Manifests.List +import Network.Google.Resource.DeploymentManager.Operations.Get +import Network.Google.Resource.DeploymentManager.Operations.List +import Network.Google.Resource.DeploymentManager.Resources.Get +import Network.Google.Resource.DeploymentManager.Resources.List +import Network.Google.Resource.DeploymentManager.Types.List + +{- $resources +TODO +-} + +type DeploymentManagerAPI = + Types :<|> Resources :<|> Manifests :<|> Deployments + :<|> Operations + +deploymentManagerAPI :: Proxy DeploymentManagerAPI +deploymentManagerAPI = Proxy diff --git a/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types.hs b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types.hs new file mode 100644 index 000000000..c89ec29ef --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DeploymentManager.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DeploymentManager.Types + ( + -- * Service URL + deploymentManagerURL + + -- * OperationsListResponse + , OperationsListResponse + , operationsListResponse + , olrNextPageToken + , olrOperations + + -- * TypesListResponse + , TypesListResponse + , typesListResponse + , tlrNextPageToken + , tlrTypes + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * ResourcesListResponse + , ResourcesListResponse + , resourcesListResponse + , rlrNextPageToken + , rlrResources + + -- * DeploymentUpdate + , DeploymentUpdate + , deploymentUpdate + , duManifest + , duErrors + + -- * ResourceUpdate + , ResourceUpdate + , resourceUpdate + , ruState + , ruIntent + , ruManifest + , ruFinalProperties + , ruErrors + , ruProperties + + -- * Manifest + , Manifest + , manifest + , mInsertTime + , mLayout + , mConfig + , mImports + , mSelfLink + , mName + , mEvaluatedConfig + , mId + + -- * Resource + , Resource + , resource + , rInsertTime + , rUrl + , rUpdateTime + , rName + , rManifest + , rFinalProperties + , rId + , rType + , rUpdate + , rProperties + + -- * ManifestsListResponse + , ManifestsListResponse + , manifestsListResponse + , mlrNextPageToken + , mlrManifests + + -- * Type + , Type + , type' + , tInsertTime + , tSelfLink + , tName + , tId + + -- * ImportFile + , ImportFile + , importFile + , ifContent + , ifName + + -- * DeploymentsListResponse + , DeploymentsListResponse + , deploymentsListResponse + , dlrNextPageToken + , dlrDeployments + + -- * Deployment + , Deployment + , deployment + , dState + , dInsertTime + , dFingerprint + , dIntent + , dUpdateTime + , dName + , dManifest + , dId + , dDescription + , dUpdate + , dTarget + + -- * TargetConfiguration + , TargetConfiguration + , targetConfiguration + , tcConfig + , tcImports + ) where + +import Network.Google.DeploymentManager.Types.Product +import Network.Google.DeploymentManager.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2beta2' of the Google Cloud Deployment Manager API. +deploymentManagerURL :: BaseURL +deploymentManagerURL + = BaseUrl Https + "https://www.googleapis.com/deploymentmanager/v2beta2/projects/" + 443 diff --git a/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs new file mode 100644 index 000000000..0895bbf5e --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs @@ -0,0 +1,1297 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DeploymentManager.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DeploymentManager.Types.Product where + +import Network.Google.DeploymentManager.Types.Sum +import Network.Google.Prelude + +-- | A response containing a partial list of operations and a page token used +-- to build the next request if the request has been truncated. +-- +-- /See:/ 'operationsListResponse' smart constructor. +data OperationsListResponse = OperationsListResponse + { _olrNextPageToken :: !(Maybe Text) + , _olrOperations :: !(Maybe [Maybe Operation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olrNextPageToken' +-- +-- * 'olrOperations' +operationsListResponse + :: OperationsListResponse +operationsListResponse = + OperationsListResponse + { _olrNextPageToken = Nothing + , _olrOperations = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +olrNextPageToken :: Lens' OperationsListResponse (Maybe Text) +olrNextPageToken + = lens _olrNextPageToken + (\ s a -> s{_olrNextPageToken = a}) + +-- | [Output Only] Operations contained in this list response. +olrOperations :: Lens' OperationsListResponse [Maybe Operation] +olrOperations + = lens _olrOperations + (\ s a -> s{_olrOperations = a}) + . _Default + . _Coerce + +instance FromJSON OperationsListResponse where + parseJSON + = withObject "OperationsListResponse" + (\ o -> + OperationsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "operations" .!= mempty)) + +instance ToJSON OperationsListResponse where + toJSON OperationsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olrNextPageToken, + ("operations" .=) <$> _olrOperations]) + +-- | A response that returns all Types supported by Deployment Manager +-- +-- /See:/ 'typesListResponse' smart constructor. +data TypesListResponse = TypesListResponse + { _tlrNextPageToken :: !(Maybe Text) + , _tlrTypes :: !(Maybe [Maybe Type]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TypesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrNextPageToken' +-- +-- * 'tlrTypes' +typesListResponse + :: TypesListResponse +typesListResponse = + TypesListResponse + { _tlrNextPageToken = Nothing + , _tlrTypes = Nothing + } + +-- | A token used to continue a truncated list request. +tlrNextPageToken :: Lens' TypesListResponse (Maybe Text) +tlrNextPageToken + = lens _tlrNextPageToken + (\ s a -> s{_tlrNextPageToken = a}) + +-- | [Output Only] A list of resource types supported by Deployment Manager. +tlrTypes :: Lens' TypesListResponse [Maybe Type] +tlrTypes + = lens _tlrTypes (\ s a -> s{_tlrTypes = a}) . + _Default + . _Coerce + +instance FromJSON TypesListResponse where + parseJSON + = withObject "TypesListResponse" + (\ o -> + TypesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "types" .!= mempty)) + +instance ToJSON TypesListResponse where + toJSON TypesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tlrNextPageToken, + ("types" .=) <$> _tlrTypes]) + +-- | An Operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "deploymentmanager#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target ID which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. Can be one of the following: +-- PENDING, RUNNING, or DONE. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested. This is in +-- RFC3339 text format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | [Output Only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the operation +-- will be complete. This number should monotonically increase as the +-- operation progresses. +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server. +-- This is in RFC3339 text format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output Only] Type of the resource. Always compute#Operation for +-- Operation resources. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors are generated during processing of the +-- operation, this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as NOT FOUND. +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | [Output Only] If warning messages are generated during processing of the +-- operation, this field will be populated. +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +-- | [Output Only] If the operation fails, this field contains the HTTP error +-- message that was returned, such as 404. +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +-- | [Output Only] User who requested the operation, for example: +-- user\'example.com. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server-defined URL for the resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +-- | [Output Only] The time that this operation was completed. This is in +-- RFC3339 text format. +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | [Output Only] Type of the operation, such as insert, update, and delete. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. Only +-- applicable for regional resources. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output Only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Output Only] An optional identifier specified by the client when the +-- mutation was initiated. Must be unique for all Operation resources in +-- the project. +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "deploymentmanager#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- | A response containing a partial list of resources and a page token used +-- to build the next request if the request has been truncated. +-- +-- /See:/ 'resourcesListResponse' smart constructor. +data ResourcesListResponse = ResourcesListResponse + { _rlrNextPageToken :: !(Maybe Text) + , _rlrResources :: !(Maybe [Maybe Resource]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourcesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlrNextPageToken' +-- +-- * 'rlrResources' +resourcesListResponse + :: ResourcesListResponse +resourcesListResponse = + ResourcesListResponse + { _rlrNextPageToken = Nothing + , _rlrResources = Nothing + } + +-- | A token used to continue a truncated list request. +rlrNextPageToken :: Lens' ResourcesListResponse (Maybe Text) +rlrNextPageToken + = lens _rlrNextPageToken + (\ s a -> s{_rlrNextPageToken = a}) + +-- | Resources contained in this list response. +rlrResources :: Lens' ResourcesListResponse [Maybe Resource] +rlrResources + = lens _rlrResources (\ s a -> s{_rlrResources = a}) + . _Default + . _Coerce + +instance FromJSON ResourcesListResponse where + parseJSON + = withObject "ResourcesListResponse" + (\ o -> + ResourcesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "resources" .!= mempty)) + +instance ToJSON ResourcesListResponse where + toJSON ResourcesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rlrNextPageToken, + ("resources" .=) <$> _rlrResources]) + +-- | +-- +-- /See:/ 'deploymentUpdate' smart constructor. +data DeploymentUpdate = DeploymentUpdate + { _duManifest :: !(Maybe Text) + , _duErrors :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'duManifest' +-- +-- * 'duErrors' +deploymentUpdate + :: DeploymentUpdate +deploymentUpdate = + DeploymentUpdate + { _duManifest = Nothing + , _duErrors = Nothing + } + +-- | [Output Only] URL of the manifest representing the update configuration +-- of this deployment. +duManifest :: Lens' DeploymentUpdate (Maybe Text) +duManifest + = lens _duManifest (\ s a -> s{_duManifest = a}) + +-- | [Output Only] List of all errors encountered while trying to enact the +-- update. +duErrors :: Lens' DeploymentUpdate [Text] +duErrors + = lens _duErrors (\ s a -> s{_duErrors = a}) . + _Default + . _Coerce + +instance FromJSON DeploymentUpdate where + parseJSON + = withObject "DeploymentUpdate" + (\ o -> + DeploymentUpdate <$> + (o .:? "manifest") <*> (o .:? "errors" .!= mempty)) + +instance ToJSON DeploymentUpdate where + toJSON DeploymentUpdate{..} + = object + (catMaybes + [("manifest" .=) <$> _duManifest, + ("errors" .=) <$> _duErrors]) + +-- | +-- +-- /See:/ 'resourceUpdate' smart constructor. +data ResourceUpdate = ResourceUpdate + { _ruState :: !(Maybe Text) + , _ruIntent :: !(Maybe Text) + , _ruManifest :: !(Maybe Text) + , _ruFinalProperties :: !(Maybe Text) + , _ruErrors :: !(Maybe [Text]) + , _ruProperties :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruState' +-- +-- * 'ruIntent' +-- +-- * 'ruManifest' +-- +-- * 'ruFinalProperties' +-- +-- * 'ruErrors' +-- +-- * 'ruProperties' +resourceUpdate + :: ResourceUpdate +resourceUpdate = + ResourceUpdate + { _ruState = Nothing + , _ruIntent = Nothing + , _ruManifest = Nothing + , _ruFinalProperties = Nothing + , _ruErrors = Nothing + , _ruProperties = Nothing + } + +-- | [Output Only] The state of the resource. +ruState :: Lens' ResourceUpdate (Maybe Text) +ruState = lens _ruState (\ s a -> s{_ruState = a}) + +-- | [Output Only] The intent of the resource: PREVIEW, UPDATE, or CANCEL. +ruIntent :: Lens' ResourceUpdate (Maybe Text) +ruIntent = lens _ruIntent (\ s a -> s{_ruIntent = a}) + +-- | [Output Only] URL of the manifest representing the update configuration +-- of this resource. +ruManifest :: Lens' ResourceUpdate (Maybe Text) +ruManifest + = lens _ruManifest (\ s a -> s{_ruManifest = a}) + +-- | [Output Only] The expanded properties of the resource with reference +-- values expanded. Returned as serialized YAML. +ruFinalProperties :: Lens' ResourceUpdate (Maybe Text) +ruFinalProperties + = lens _ruFinalProperties + (\ s a -> s{_ruFinalProperties = a}) + +-- | [Output Only] List of all errors encountered while trying to enact +-- update.intent. +ruErrors :: Lens' ResourceUpdate [Text] +ruErrors + = lens _ruErrors (\ s a -> s{_ruErrors = a}) . + _Default + . _Coerce + +-- | [Output Only] The set of updated properties for this resource, before +-- references are expanded. Returned as serialized YAML. +ruProperties :: Lens' ResourceUpdate (Maybe Text) +ruProperties + = lens _ruProperties (\ s a -> s{_ruProperties = a}) + +instance FromJSON ResourceUpdate where + parseJSON + = withObject "ResourceUpdate" + (\ o -> + ResourceUpdate <$> + (o .:? "state") <*> (o .:? "intent") <*> + (o .:? "manifest") + <*> (o .:? "finalProperties") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "properties")) + +instance ToJSON ResourceUpdate where + toJSON ResourceUpdate{..} + = object + (catMaybes + [("state" .=) <$> _ruState, + ("intent" .=) <$> _ruIntent, + ("manifest" .=) <$> _ruManifest, + ("finalProperties" .=) <$> _ruFinalProperties, + ("errors" .=) <$> _ruErrors, + ("properties" .=) <$> _ruProperties]) + +-- | +-- +-- /See:/ 'manifest' smart constructor. +data Manifest = Manifest + { _mInsertTime :: !(Maybe Text) + , _mLayout :: !(Maybe Text) + , _mConfig :: !(Maybe Text) + , _mImports :: !(Maybe [Maybe ImportFile]) + , _mSelfLink :: !(Maybe Text) + , _mName :: !(Maybe Text) + , _mEvaluatedConfig :: !(Maybe Text) + , _mId :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Manifest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mInsertTime' +-- +-- * 'mLayout' +-- +-- * 'mConfig' +-- +-- * 'mImports' +-- +-- * 'mSelfLink' +-- +-- * 'mName' +-- +-- * 'mEvaluatedConfig' +-- +-- * 'mId' +manifest + :: Manifest +manifest = + Manifest + { _mInsertTime = Nothing + , _mLayout = Nothing + , _mConfig = Nothing + , _mImports = Nothing + , _mSelfLink = Nothing + , _mName = Nothing + , _mEvaluatedConfig = Nothing + , _mId = Nothing + } + +-- | [Output Only] Timestamp when the manifest was created, in RFC3339 text +-- format. +mInsertTime :: Lens' Manifest (Maybe Text) +mInsertTime + = lens _mInsertTime (\ s a -> s{_mInsertTime = a}) + +-- | [Output Only] The YAML layout for this manifest. +mLayout :: Lens' Manifest (Maybe Text) +mLayout = lens _mLayout (\ s a -> s{_mLayout = a}) + +-- | [Output Only] The YAML configuration for this manifest. +mConfig :: Lens' Manifest (Maybe Text) +mConfig = lens _mConfig (\ s a -> s{_mConfig = a}) + +-- | [Output Only] The imported files for this manifest. +mImports :: Lens' Manifest [Maybe ImportFile] +mImports + = lens _mImports (\ s a -> s{_mImports = a}) . + _Default + . _Coerce + +-- | [Output Only] Self link for the manifest. +mSelfLink :: Lens' Manifest (Maybe Text) +mSelfLink + = lens _mSelfLink (\ s a -> s{_mSelfLink = a}) + +-- | [Output Only] The name of the manifest. +mName :: Lens' Manifest (Maybe Text) +mName = lens _mName (\ s a -> s{_mName = a}) + +-- | [Output Only] The fully-expanded configuration file, including any +-- templates and references. +mEvaluatedConfig :: Lens' Manifest (Maybe Text) +mEvaluatedConfig + = lens _mEvaluatedConfig + (\ s a -> s{_mEvaluatedConfig = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +mId :: Lens' Manifest (Maybe Word64) +mId = lens _mId (\ s a -> s{_mId = a}) + +instance FromJSON Manifest where + parseJSON + = withObject "Manifest" + (\ o -> + Manifest <$> + (o .:? "insertTime") <*> (o .:? "layout") <*> + (o .:? "config") + <*> (o .:? "imports" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "evaluatedConfig") + <*> (o .:? "id")) + +instance ToJSON Manifest where + toJSON Manifest{..} + = object + (catMaybes + [("insertTime" .=) <$> _mInsertTime, + ("layout" .=) <$> _mLayout, + ("config" .=) <$> _mConfig, + ("imports" .=) <$> _mImports, + ("selfLink" .=) <$> _mSelfLink, + ("name" .=) <$> _mName, + ("evaluatedConfig" .=) <$> _mEvaluatedConfig, + ("id" .=) <$> _mId]) + +-- | +-- +-- /See:/ 'resource' smart constructor. +data Resource = Resource + { _rInsertTime :: !(Maybe Text) + , _rUrl :: !(Maybe Text) + , _rUpdateTime :: !(Maybe Text) + , _rName :: !(Maybe Text) + , _rManifest :: !(Maybe Text) + , _rFinalProperties :: !(Maybe Text) + , _rId :: !(Maybe Word64) + , _rType :: !(Maybe Text) + , _rUpdate :: !(Maybe (Maybe ResourceUpdate)) + , _rProperties :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Resource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rInsertTime' +-- +-- * 'rUrl' +-- +-- * 'rUpdateTime' +-- +-- * 'rName' +-- +-- * 'rManifest' +-- +-- * 'rFinalProperties' +-- +-- * 'rId' +-- +-- * 'rType' +-- +-- * 'rUpdate' +-- +-- * 'rProperties' +resource + :: Resource +resource = + Resource + { _rInsertTime = Nothing + , _rUrl = Nothing + , _rUpdateTime = Nothing + , _rName = Nothing + , _rManifest = Nothing + , _rFinalProperties = Nothing + , _rId = Nothing + , _rType = Nothing + , _rUpdate = Nothing + , _rProperties = Nothing + } + +-- | [Output Only] Timestamp when the resource was created or acquired, in +-- RFC3339 text format . +rInsertTime :: Lens' Resource (Maybe Text) +rInsertTime + = lens _rInsertTime (\ s a -> s{_rInsertTime = a}) + +-- | [Output Only] The URL of the actual resource. +rUrl :: Lens' Resource (Maybe Text) +rUrl = lens _rUrl (\ s a -> s{_rUrl = a}) + +-- | [Output Only] Timestamp when the resource was updated, in RFC3339 text +-- format . +rUpdateTime :: Lens' Resource (Maybe Text) +rUpdateTime + = lens _rUpdateTime (\ s a -> s{_rUpdateTime = a}) + +-- | [Output Only] The name of the resource as it appears in the YAML config. +rName :: Lens' Resource (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | [Output Only] URL of the manifest representing the current configuration +-- of this resource. +rManifest :: Lens' Resource (Maybe Text) +rManifest + = lens _rManifest (\ s a -> s{_rManifest = a}) + +-- | [Output Only] The evaluated properties of the resource with references +-- expanded. Returned as serialized YAML. +rFinalProperties :: Lens' Resource (Maybe Text) +rFinalProperties + = lens _rFinalProperties + (\ s a -> s{_rFinalProperties = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +rId :: Lens' Resource (Maybe Word64) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | [Output Only] The type of the resource, for example compute.v1.instance, +-- or replicaPools.v1beta2.instanceGroupManager. +rType :: Lens' Resource (Maybe Text) +rType = lens _rType (\ s a -> s{_rType = a}) + +-- | [Output Only] If Deployment Manager is currently updating or previewing +-- an update to this resource, the updated configuration appears here. +rUpdate :: Lens' Resource (Maybe (Maybe ResourceUpdate)) +rUpdate = lens _rUpdate (\ s a -> s{_rUpdate = a}) + +-- | [Output Only] The current properties of the resource before any +-- references have been filled in. Returned as serialized YAML. +rProperties :: Lens' Resource (Maybe Text) +rProperties + = lens _rProperties (\ s a -> s{_rProperties = a}) + +instance FromJSON Resource where + parseJSON + = withObject "Resource" + (\ o -> + Resource <$> + (o .:? "insertTime") <*> (o .:? "url") <*> + (o .:? "updateTime") + <*> (o .:? "name") + <*> (o .:? "manifest") + <*> (o .:? "finalProperties") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "update") + <*> (o .:? "properties")) + +instance ToJSON Resource where + toJSON Resource{..} + = object + (catMaybes + [("insertTime" .=) <$> _rInsertTime, + ("url" .=) <$> _rUrl, + ("updateTime" .=) <$> _rUpdateTime, + ("name" .=) <$> _rName, + ("manifest" .=) <$> _rManifest, + ("finalProperties" .=) <$> _rFinalProperties, + ("id" .=) <$> _rId, ("type" .=) <$> _rType, + ("update" .=) <$> _rUpdate, + ("properties" .=) <$> _rProperties]) + +-- | A response containing a partial list of manifests and a page token used +-- to build the next request if the request has been truncated. +-- +-- /See:/ 'manifestsListResponse' smart constructor. +data ManifestsListResponse = ManifestsListResponse + { _mlrNextPageToken :: !(Maybe Text) + , _mlrManifests :: !(Maybe [Maybe Manifest]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManifestsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlrNextPageToken' +-- +-- * 'mlrManifests' +manifestsListResponse + :: ManifestsListResponse +manifestsListResponse = + ManifestsListResponse + { _mlrNextPageToken = Nothing + , _mlrManifests = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +mlrNextPageToken :: Lens' ManifestsListResponse (Maybe Text) +mlrNextPageToken + = lens _mlrNextPageToken + (\ s a -> s{_mlrNextPageToken = a}) + +-- | [Output Only] Manifests contained in this list response. +mlrManifests :: Lens' ManifestsListResponse [Maybe Manifest] +mlrManifests + = lens _mlrManifests (\ s a -> s{_mlrManifests = a}) + . _Default + . _Coerce + +instance FromJSON ManifestsListResponse where + parseJSON + = withObject "ManifestsListResponse" + (\ o -> + ManifestsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "manifests" .!= mempty)) + +instance ToJSON ManifestsListResponse where + toJSON ManifestsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _mlrNextPageToken, + ("manifests" .=) <$> _mlrManifests]) + +-- | A resource type supported by Deployment Manager. +-- +-- /See:/ 'type'' smart constructor. +data Type = Type + { _tInsertTime :: !(Maybe Text) + , _tSelfLink :: !(Maybe Text) + , _tName :: !(Maybe Text) + , _tId :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Type' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tInsertTime' +-- +-- * 'tSelfLink' +-- +-- * 'tName' +-- +-- * 'tId' +type' + :: Type +type' = + Type + { _tInsertTime = Nothing + , _tSelfLink = Nothing + , _tName = Nothing + , _tId = Nothing + } + +-- | [Output Only] Timestamp when the type was created, in RFC3339 text +-- format. +tInsertTime :: Lens' Type (Maybe Text) +tInsertTime + = lens _tInsertTime (\ s a -> s{_tInsertTime = a}) + +-- | [Output Only] Self link for the type. +tSelfLink :: Lens' Type (Maybe Text) +tSelfLink + = lens _tSelfLink (\ s a -> s{_tSelfLink = a}) + +-- | Name of the type. +tName :: Lens' Type (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +tId :: Lens' Type (Maybe Word64) +tId = lens _tId (\ s a -> s{_tId = a}) + +instance FromJSON Type where + parseJSON + = withObject "Type" + (\ o -> + Type <$> + (o .:? "insertTime") <*> (o .:? "selfLink") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Type where + toJSON Type{..} + = object + (catMaybes + [("insertTime" .=) <$> _tInsertTime, + ("selfLink" .=) <$> _tSelfLink, + ("name" .=) <$> _tName, ("id" .=) <$> _tId]) + +-- | +-- +-- /See:/ 'importFile' smart constructor. +data ImportFile = ImportFile + { _ifContent :: !(Maybe Text) + , _ifName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportFile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ifContent' +-- +-- * 'ifName' +importFile + :: ImportFile +importFile = + ImportFile + { _ifContent = Nothing + , _ifName = Nothing + } + +-- | The contents of the file. +ifContent :: Lens' ImportFile (Maybe Text) +ifContent + = lens _ifContent (\ s a -> s{_ifContent = a}) + +-- | The name of the file. +ifName :: Lens' ImportFile (Maybe Text) +ifName = lens _ifName (\ s a -> s{_ifName = a}) + +instance FromJSON ImportFile where + parseJSON + = withObject "ImportFile" + (\ o -> + ImportFile <$> (o .:? "content") <*> (o .:? "name")) + +instance ToJSON ImportFile where + toJSON ImportFile{..} + = object + (catMaybes + [("content" .=) <$> _ifContent, + ("name" .=) <$> _ifName]) + +-- | A response containing a partial list of deployments and a page token +-- used to build the next request if the request has been truncated. +-- +-- /See:/ 'deploymentsListResponse' smart constructor. +data DeploymentsListResponse = DeploymentsListResponse + { _dlrNextPageToken :: !(Maybe Text) + , _dlrDeployments :: !(Maybe [Maybe Deployment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlrNextPageToken' +-- +-- * 'dlrDeployments' +deploymentsListResponse + :: DeploymentsListResponse +deploymentsListResponse = + DeploymentsListResponse + { _dlrNextPageToken = Nothing + , _dlrDeployments = Nothing + } + +-- | [Output Only] A token used to continue a truncated list request. +dlrNextPageToken :: Lens' DeploymentsListResponse (Maybe Text) +dlrNextPageToken + = lens _dlrNextPageToken + (\ s a -> s{_dlrNextPageToken = a}) + +-- | [Output Only] The deployments contained in this response. +dlrDeployments :: Lens' DeploymentsListResponse [Maybe Deployment] +dlrDeployments + = lens _dlrDeployments + (\ s a -> s{_dlrDeployments = a}) + . _Default + . _Coerce + +instance FromJSON DeploymentsListResponse where + parseJSON + = withObject "DeploymentsListResponse" + (\ o -> + DeploymentsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "deployments" .!= mempty)) + +instance ToJSON DeploymentsListResponse where + toJSON DeploymentsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dlrNextPageToken, + ("deployments" .=) <$> _dlrDeployments]) + +-- | +-- +-- /See:/ 'deployment' smart constructor. +data Deployment = Deployment + { _dState :: !(Maybe Text) + , _dInsertTime :: !(Maybe Text) + , _dFingerprint :: !(Maybe Word8) + , _dIntent :: !(Maybe Text) + , _dUpdateTime :: !(Maybe Text) + , _dName :: !(Maybe Text) + , _dManifest :: !(Maybe Text) + , _dId :: !(Maybe Word64) + , _dDescription :: !(Maybe Text) + , _dUpdate :: !(Maybe (Maybe DeploymentUpdate)) + , _dTarget :: !(Maybe (Maybe TargetConfiguration)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Deployment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dState' +-- +-- * 'dInsertTime' +-- +-- * 'dFingerprint' +-- +-- * 'dIntent' +-- +-- * 'dUpdateTime' +-- +-- * 'dName' +-- +-- * 'dManifest' +-- +-- * 'dId' +-- +-- * 'dDescription' +-- +-- * 'dUpdate' +-- +-- * 'dTarget' +deployment + :: Deployment +deployment = + Deployment + { _dState = Nothing + , _dInsertTime = Nothing + , _dFingerprint = Nothing + , _dIntent = Nothing + , _dUpdateTime = Nothing + , _dName = Nothing + , _dManifest = Nothing + , _dId = Nothing + , _dDescription = Nothing + , _dUpdate = Nothing + , _dTarget = Nothing + } + +-- | [Output Only] The current state of the deployment. This can be DEPLOYED, +-- DEPLOYMENT_FAILED, PREVIEWING, UPDATING, and CANCELING. +dState :: Lens' Deployment (Maybe Text) +dState = lens _dState (\ s a -> s{_dState = a}) + +-- | [Output Only] Timestamp when the deployment was created, in RFC3339 text +-- format . +dInsertTime :: Lens' Deployment (Maybe Text) +dInsertTime + = lens _dInsertTime (\ s a -> s{_dInsertTime = a}) + +-- | Specifies a fingerprint for update() requests. A fingerprint is a +-- randomly generated value that must be provided in update() requests to +-- perform optimistic locking. This ensures optimistic concurrency so that +-- only one update can be performed at a time. The fingerprint is initially +-- generated by Deployment Manager and changes after every request to +-- modify data. To get the latest fingerprint value, perform a get() +-- request to a deployment. +dFingerprint :: Lens' Deployment (Maybe Word8) +dFingerprint + = lens _dFingerprint (\ s a -> s{_dFingerprint = a}) + +-- | [Input Only] Specifies how Deployment Manager should apply this +-- template. Possible options are PREVIEW, UPDATE, and CANCEL. PREVIEW +-- creates a deployment and creates \"shell\" resources but does not +-- actually instantiate these resources. This allows you to preview what +-- your deployment looks like. You can use this intent to preview updates +-- to deployments or preview new deployments. You must provide a +-- target.config with a configuration for this intent. After previewing a +-- deployment, you can deploy your resources by making a request with the +-- UPDATE intent or you can CANCEL the preview altogether. Note that the +-- deployment will still exist after you cancel the preview and you must +-- separately delete this deployment if you want to remove it. UPDATE +-- performs an update to the underlying resources in a deployment. If you +-- provide a populated target.config field with this request, Deployment +-- Manager uses that configuration to perform an update. If you had +-- previewed this update beforehand, and do not supply a target.config or +-- provide an empty target.config, Deployment Manager uses the last +-- previewed configuration. CANCEL cancels an update that is in PREVIEW or +-- UPDATE but does not undo any changes already made. +dIntent :: Lens' Deployment (Maybe Text) +dIntent = lens _dIntent (\ s a -> s{_dIntent = a}) + +-- | [Output Only] Timestamp when the deployment was updated, in RFC3339 text +-- format . +dUpdateTime :: Lens' Deployment (Maybe Text) +dUpdateTime + = lens _dUpdateTime (\ s a -> s{_dUpdateTime = a}) + +-- | Name of the resource; provided by the client when the resource is +-- created. The name must be 1-63 characters long, and comply with RFC1035. +-- Specifically, the name must be 1-63 characters long and match the +-- regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first +-- character must be a lowercase letter, and all following characters must +-- be a dash, lowercase letter, or digit, except the last character, which +-- cannot be a dash. +dName :: Lens' Deployment (Maybe Text) +dName = lens _dName (\ s a -> s{_dName = a}) + +-- | [Output Only] URL of the manifest representing the last manifest that +-- was successfully deployed. +dManifest :: Lens' Deployment (Maybe Text) +dManifest + = lens _dManifest (\ s a -> s{_dManifest = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +dId :: Lens' Deployment (Maybe Word64) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | An optional user-provided description of the deployment. +dDescription :: Lens' Deployment (Maybe Text) +dDescription + = lens _dDescription (\ s a -> s{_dDescription = a}) + +-- | [Output Only] If Deployment Manager is currently updating or previewing +-- an update to this deployment, the updated configuration appears here. +dUpdate :: Lens' Deployment (Maybe (Maybe DeploymentUpdate)) +dUpdate = lens _dUpdate (\ s a -> s{_dUpdate = a}) + +-- | [Input Only] The parameters that define your deployment, including the +-- deployment configuration and relevant templates. +dTarget :: Lens' Deployment (Maybe (Maybe TargetConfiguration)) +dTarget = lens _dTarget (\ s a -> s{_dTarget = a}) + +instance FromJSON Deployment where + parseJSON + = withObject "Deployment" + (\ o -> + Deployment <$> + (o .:? "state") <*> (o .:? "insertTime") <*> + (o .:? "fingerprint") + <*> (o .:? "intent") + <*> (o .:? "updateTime") + <*> (o .:? "name") + <*> (o .:? "manifest") + <*> (o .:? "id") + <*> (o .:? "description") + <*> (o .:? "update") + <*> (o .:? "target")) + +instance ToJSON Deployment where + toJSON Deployment{..} + = object + (catMaybes + [("state" .=) <$> _dState, + ("insertTime" .=) <$> _dInsertTime, + ("fingerprint" .=) <$> _dFingerprint, + ("intent" .=) <$> _dIntent, + ("updateTime" .=) <$> _dUpdateTime, + ("name" .=) <$> _dName, + ("manifest" .=) <$> _dManifest, ("id" .=) <$> _dId, + ("description" .=) <$> _dDescription, + ("update" .=) <$> _dUpdate, + ("target" .=) <$> _dTarget]) + +-- | +-- +-- /See:/ 'targetConfiguration' smart constructor. +data TargetConfiguration = TargetConfiguration + { _tcConfig :: !(Maybe Text) + , _tcImports :: !(Maybe [Maybe ImportFile]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcConfig' +-- +-- * 'tcImports' +targetConfiguration + :: TargetConfiguration +targetConfiguration = + TargetConfiguration + { _tcConfig = Nothing + , _tcImports = Nothing + } + +-- | The configuration to use for this deployment. +tcConfig :: Lens' TargetConfiguration (Maybe Text) +tcConfig = lens _tcConfig (\ s a -> s{_tcConfig = a}) + +-- | Specifies any files to import for this configuration. This can be used +-- to import templates or other files. For example, you might import a text +-- file in order to use the file in a template. +tcImports :: Lens' TargetConfiguration [Maybe ImportFile] +tcImports + = lens _tcImports (\ s a -> s{_tcImports = a}) . + _Default + . _Coerce + +instance FromJSON TargetConfiguration where + parseJSON + = withObject "TargetConfiguration" + (\ o -> + TargetConfiguration <$> + (o .:? "config") <*> (o .:? "imports" .!= mempty)) + +instance ToJSON TargetConfiguration where + toJSON TargetConfiguration{..} + = object + (catMaybes + [("config" .=) <$> _tcConfig, + ("imports" .=) <$> _tcImports]) diff --git a/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Sum.hs b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Sum.hs new file mode 100644 index 000000000..0f7964def --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DeploymentManager.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DeploymentManager.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Delete.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Delete.hs new file mode 100644 index 000000000..ce10bb82e --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Delete.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a deployment and all of the resources in the deployment. +-- +-- /See:/ for @DeploymentmanagerDeploymentsDelete@. +module DeploymentManager.Deployments.Delete + ( + -- * REST Resource + DeploymentsDeleteAPI + + -- * Creating a Request + , deploymentsDelete + , DeploymentsDelete + + -- * Request Lenses + , ddQuotaUser + , ddPrettyPrint + , ddProject + , ddUserIp + , ddKey + , ddOauthToken + , ddFields + , ddAlt + , ddDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsDelete@ which the +-- 'DeploymentsDelete' request conforms to. +type DeploymentsDeleteAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> Delete '[JSON] Operation + +-- | Deletes a deployment and all of the resources in the deployment. +-- +-- /See:/ 'deploymentsDelete' smart constructor. +data DeploymentsDelete = DeploymentsDelete + { _ddQuotaUser :: !(Maybe Text) + , _ddPrettyPrint :: !Bool + , _ddProject :: !Text + , _ddUserIp :: !(Maybe Text) + , _ddKey :: !(Maybe Text) + , _ddOauthToken :: !(Maybe Text) + , _ddFields :: !(Maybe Text) + , _ddAlt :: !Text + , _ddDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddQuotaUser' +-- +-- * 'ddPrettyPrint' +-- +-- * 'ddProject' +-- +-- * 'ddUserIp' +-- +-- * 'ddKey' +-- +-- * 'ddOauthToken' +-- +-- * 'ddFields' +-- +-- * 'ddAlt' +-- +-- * 'ddDeployment' +deploymentsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> DeploymentsDelete +deploymentsDelete pDdProject_ pDdDeployment_ = + DeploymentsDelete + { _ddQuotaUser = Nothing + , _ddPrettyPrint = True + , _ddProject = pDdProject_ + , _ddUserIp = Nothing + , _ddKey = Nothing + , _ddOauthToken = Nothing + , _ddFields = Nothing + , _ddAlt = "json" + , _ddDeployment = pDdDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ddQuotaUser :: Lens' DeploymentsDelete' (Maybe Text) +ddQuotaUser + = lens _ddQuotaUser (\ s a -> s{_ddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddPrettyPrint :: Lens' DeploymentsDelete' Bool +ddPrettyPrint + = lens _ddPrettyPrint + (\ s a -> s{_ddPrettyPrint = a}) + +-- | The project ID for this request. +ddProject :: Lens' DeploymentsDelete' Text +ddProject + = lens _ddProject (\ s a -> s{_ddProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ddUserIp :: Lens' DeploymentsDelete' (Maybe Text) +ddUserIp = lens _ddUserIp (\ s a -> s{_ddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddKey :: Lens' DeploymentsDelete' (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | OAuth 2.0 token for the current user. +ddOauthToken :: Lens' DeploymentsDelete' (Maybe Text) +ddOauthToken + = lens _ddOauthToken (\ s a -> s{_ddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddFields :: Lens' DeploymentsDelete' (Maybe Text) +ddFields = lens _ddFields (\ s a -> s{_ddFields = a}) + +-- | Data format for the response. +ddAlt :: Lens' DeploymentsDelete' Text +ddAlt = lens _ddAlt (\ s a -> s{_ddAlt = a}) + +-- | The name of the deployment for this request. +ddDeployment :: Lens' DeploymentsDelete' Text +ddDeployment + = lens _ddDeployment (\ s a -> s{_ddDeployment = a}) + +instance GoogleRequest DeploymentsDelete' where + type Rs DeploymentsDelete' = Operation + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsDelete{..} + = go _ddQuotaUser _ddPrettyPrint _ddProject _ddUserIp + _ddKey + _ddOauthToken + _ddFields + _ddAlt + _ddDeployment + where go + = clientWithRoute + (Proxy :: Proxy DeploymentsDeleteAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Get.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Get.hs new file mode 100644 index 000000000..1c448cb74 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about a specific deployment. +-- +-- /See:/ for @DeploymentmanagerDeploymentsGet@. +module DeploymentManager.Deployments.Get + ( + -- * REST Resource + DeploymentsGetAPI + + -- * Creating a Request + , deploymentsGet + , DeploymentsGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgProject + , dgUserIp + , dgKey + , dgOauthToken + , dgFields + , dgAlt + , dgDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsGet@ which the +-- 'DeploymentsGet' request conforms to. +type DeploymentsGetAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> Get '[JSON] Deployment + +-- | Gets information about a specific deployment. +-- +-- /See:/ 'deploymentsGet' smart constructor. +data DeploymentsGet = DeploymentsGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgProject :: !Text + , _dgUserIp :: !(Maybe Text) + , _dgKey :: !(Maybe Text) + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + , _dgDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgProject' +-- +-- * 'dgUserIp' +-- +-- * 'dgKey' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +-- +-- * 'dgDeployment' +deploymentsGet + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> DeploymentsGet +deploymentsGet pDgProject_ pDgDeployment_ = + DeploymentsGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgProject = pDgProject_ + , _dgUserIp = Nothing + , _dgKey = Nothing + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + , _dgDeployment = pDgDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DeploymentsGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DeploymentsGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | The project ID for this request. +dgProject :: Lens' DeploymentsGet' Text +dgProject + = lens _dgProject (\ s a -> s{_dgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DeploymentsGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DeploymentsGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DeploymentsGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DeploymentsGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DeploymentsGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +-- | The name of the deployment for this request. +dgDeployment :: Lens' DeploymentsGet' Text +dgDeployment + = lens _dgDeployment (\ s a -> s{_dgDeployment = a}) + +instance GoogleRequest DeploymentsGet' where + type Rs DeploymentsGet' = Deployment + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgProject _dgUserIp + _dgKey + _dgOauthToken + _dgFields + _dgAlt + _dgDeployment + where go + = clientWithRoute (Proxy :: Proxy DeploymentsGetAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Insert.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Insert.hs new file mode 100644 index 000000000..a430005ec --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Insert.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a deployment and all of the resources described by the +-- deployment manifest. +-- +-- /See:/ for @DeploymentmanagerDeploymentsInsert@. +module DeploymentManager.Deployments.Insert + ( + -- * REST Resource + DeploymentsInsertAPI + + -- * Creating a Request + , deploymentsInsert + , DeploymentsInsert + + -- * Request Lenses + , diQuotaUser + , diPrettyPrint + , diProject + , diUserIp + , diKey + , diOauthToken + , diFields + , diAlt + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsInsert@ which the +-- 'DeploymentsInsert' request conforms to. +type DeploymentsInsertAPI = + Capture "project" Text :> + "global" :> "deployments" :> Post '[JSON] Operation + +-- | Creates a deployment and all of the resources described by the +-- deployment manifest. +-- +-- /See:/ 'deploymentsInsert' smart constructor. +data DeploymentsInsert = DeploymentsInsert + { _diQuotaUser :: !(Maybe Text) + , _diPrettyPrint :: !Bool + , _diProject :: !Text + , _diUserIp :: !(Maybe Text) + , _diKey :: !(Maybe Text) + , _diOauthToken :: !(Maybe Text) + , _diFields :: !(Maybe Text) + , _diAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diQuotaUser' +-- +-- * 'diPrettyPrint' +-- +-- * 'diProject' +-- +-- * 'diUserIp' +-- +-- * 'diKey' +-- +-- * 'diOauthToken' +-- +-- * 'diFields' +-- +-- * 'diAlt' +deploymentsInsert + :: Text -- ^ 'project' + -> DeploymentsInsert +deploymentsInsert pDiProject_ = + DeploymentsInsert + { _diQuotaUser = Nothing + , _diPrettyPrint = True + , _diProject = pDiProject_ + , _diUserIp = Nothing + , _diKey = Nothing + , _diOauthToken = Nothing + , _diFields = Nothing + , _diAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +diQuotaUser :: Lens' DeploymentsInsert' (Maybe Text) +diQuotaUser + = lens _diQuotaUser (\ s a -> s{_diQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +diPrettyPrint :: Lens' DeploymentsInsert' Bool +diPrettyPrint + = lens _diPrettyPrint + (\ s a -> s{_diPrettyPrint = a}) + +-- | The project ID for this request. +diProject :: Lens' DeploymentsInsert' Text +diProject + = lens _diProject (\ s a -> s{_diProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +diUserIp :: Lens' DeploymentsInsert' (Maybe Text) +diUserIp = lens _diUserIp (\ s a -> s{_diUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +diKey :: Lens' DeploymentsInsert' (Maybe Text) +diKey = lens _diKey (\ s a -> s{_diKey = a}) + +-- | OAuth 2.0 token for the current user. +diOauthToken :: Lens' DeploymentsInsert' (Maybe Text) +diOauthToken + = lens _diOauthToken (\ s a -> s{_diOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +diFields :: Lens' DeploymentsInsert' (Maybe Text) +diFields = lens _diFields (\ s a -> s{_diFields = a}) + +-- | Data format for the response. +diAlt :: Lens' DeploymentsInsert' Text +diAlt = lens _diAlt (\ s a -> s{_diAlt = a}) + +instance GoogleRequest DeploymentsInsert' where + type Rs DeploymentsInsert' = Operation + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsInsert{..} + = go _diQuotaUser _diPrettyPrint _diProject _diUserIp + _diKey + _diOauthToken + _diFields + _diAlt + where go + = clientWithRoute + (Proxy :: Proxy DeploymentsInsertAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/List.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/List.hs new file mode 100644 index 000000000..40db9adab --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all deployments for a given project. +-- +-- /See:/ for @DeploymentmanagerDeploymentsList@. +module DeploymentManager.Deployments.List + ( + -- * REST Resource + DeploymentsListAPI + + -- * Creating a Request + , deploymentsList + , DeploymentsList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlProject + , dlUserIp + , dlKey + , dlFilter + , dlPageToken + , dlOauthToken + , dlMaxResults + , dlFields + , dlAlt + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsList@ which the +-- 'DeploymentsList' request conforms to. +type DeploymentsListAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] DeploymentsListResponse + +-- | Lists all deployments for a given project. +-- +-- /See:/ 'deploymentsList' smart constructor. +data DeploymentsList = DeploymentsList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlProject :: !Text + , _dlUserIp :: !(Maybe Text) + , _dlKey :: !(Maybe Text) + , _dlFilter :: !(Maybe Text) + , _dlPageToken :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlMaxResults :: !Word32 + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlProject' +-- +-- * 'dlUserIp' +-- +-- * 'dlKey' +-- +-- * 'dlFilter' +-- +-- * 'dlPageToken' +-- +-- * 'dlOauthToken' +-- +-- * 'dlMaxResults' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +deploymentsList + :: Text -- ^ 'project' + -> DeploymentsList +deploymentsList pDlProject_ = + DeploymentsList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlProject = pDlProject_ + , _dlUserIp = Nothing + , _dlKey = Nothing + , _dlFilter = Nothing + , _dlPageToken = Nothing + , _dlOauthToken = Nothing + , _dlMaxResults = 500 + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DeploymentsList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DeploymentsList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | The project ID for this request. +dlProject :: Lens' DeploymentsList' Text +dlProject + = lens _dlProject (\ s a -> s{_dlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DeploymentsList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DeploymentsList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +dlFilter :: Lens' DeploymentsList' (Maybe Text) +dlFilter = lens _dlFilter (\ s a -> s{_dlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +dlPageToken :: Lens' DeploymentsList' (Maybe Text) +dlPageToken + = lens _dlPageToken (\ s a -> s{_dlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DeploymentsList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Maximum count of results to be returned. +dlMaxResults :: Lens' DeploymentsList' Word32 +dlMaxResults + = lens _dlMaxResults (\ s a -> s{_dlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DeploymentsList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DeploymentsList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DeploymentsList' where + type Rs DeploymentsList' = DeploymentsListResponse + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsList{..} + = go _dlQuotaUser _dlPrettyPrint _dlProject _dlUserIp + _dlKey + _dlFilter + _dlPageToken + _dlOauthToken + (Just _dlMaxResults) + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DeploymentsListAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Patch.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Patch.hs new file mode 100644 index 000000000..d96dc3337 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Patch.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a deployment and all of the resources described by the +-- deployment manifest. This method supports patch semantics. +-- +-- /See:/ for @DeploymentmanagerDeploymentsPatch@. +module DeploymentManager.Deployments.Patch + ( + -- * REST Resource + DeploymentsPatchAPI + + -- * Creating a Request + , deploymentsPatch + , DeploymentsPatch + + -- * Request Lenses + , dpCreatePolicy + , dpQuotaUser + , dpPrettyPrint + , dpProject + , dpUserIp + , dpUpdatePolicy + , dpDeletePolicy + , dpKey + , dpOauthToken + , dpFields + , dpAlt + , dpDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsPatch@ which the +-- 'DeploymentsPatch' request conforms to. +type DeploymentsPatchAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + QueryParam "createPolicy" Text :> + QueryParam "updatePolicy" Text :> + QueryParam "deletePolicy" Text :> + Patch '[JSON] Operation + +-- | Updates a deployment and all of the resources described by the +-- deployment manifest. This method supports patch semantics. +-- +-- /See:/ 'deploymentsPatch' smart constructor. +data DeploymentsPatch = DeploymentsPatch + { _dpCreatePolicy :: !Text + , _dpQuotaUser :: !(Maybe Text) + , _dpPrettyPrint :: !Bool + , _dpProject :: !Text + , _dpUserIp :: !(Maybe Text) + , _dpUpdatePolicy :: !Text + , _dpDeletePolicy :: !Text + , _dpKey :: !(Maybe Text) + , _dpOauthToken :: !(Maybe Text) + , _dpFields :: !(Maybe Text) + , _dpAlt :: !Text + , _dpDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpCreatePolicy' +-- +-- * 'dpQuotaUser' +-- +-- * 'dpPrettyPrint' +-- +-- * 'dpProject' +-- +-- * 'dpUserIp' +-- +-- * 'dpUpdatePolicy' +-- +-- * 'dpDeletePolicy' +-- +-- * 'dpKey' +-- +-- * 'dpOauthToken' +-- +-- * 'dpFields' +-- +-- * 'dpAlt' +-- +-- * 'dpDeployment' +deploymentsPatch + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> DeploymentsPatch +deploymentsPatch pDpProject_ pDpDeployment_ = + DeploymentsPatch + { _dpCreatePolicy = "CREATE_OR_ACQUIRE" + , _dpQuotaUser = Nothing + , _dpPrettyPrint = True + , _dpProject = pDpProject_ + , _dpUserIp = Nothing + , _dpUpdatePolicy = "PATCH" + , _dpDeletePolicy = "DELETE" + , _dpKey = Nothing + , _dpOauthToken = Nothing + , _dpFields = Nothing + , _dpAlt = "json" + , _dpDeployment = pDpDeployment_ + } + +-- | Sets the policy to use for creating new resources. +dpCreatePolicy :: Lens' DeploymentsPatch' Text +dpCreatePolicy + = lens _dpCreatePolicy + (\ s a -> s{_dpCreatePolicy = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dpQuotaUser :: Lens' DeploymentsPatch' (Maybe Text) +dpQuotaUser + = lens _dpQuotaUser (\ s a -> s{_dpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dpPrettyPrint :: Lens' DeploymentsPatch' Bool +dpPrettyPrint + = lens _dpPrettyPrint + (\ s a -> s{_dpPrettyPrint = a}) + +-- | The project ID for this request. +dpProject :: Lens' DeploymentsPatch' Text +dpProject + = lens _dpProject (\ s a -> s{_dpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dpUserIp :: Lens' DeploymentsPatch' (Maybe Text) +dpUserIp = lens _dpUserIp (\ s a -> s{_dpUserIp = a}) + +-- | Sets the policy to use for updating resources. +dpUpdatePolicy :: Lens' DeploymentsPatch' Text +dpUpdatePolicy + = lens _dpUpdatePolicy + (\ s a -> s{_dpUpdatePolicy = a}) + +-- | Sets the policy to use for deleting resources. +dpDeletePolicy :: Lens' DeploymentsPatch' Text +dpDeletePolicy + = lens _dpDeletePolicy + (\ s a -> s{_dpDeletePolicy = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dpKey :: Lens' DeploymentsPatch' (Maybe Text) +dpKey = lens _dpKey (\ s a -> s{_dpKey = a}) + +-- | OAuth 2.0 token for the current user. +dpOauthToken :: Lens' DeploymentsPatch' (Maybe Text) +dpOauthToken + = lens _dpOauthToken (\ s a -> s{_dpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dpFields :: Lens' DeploymentsPatch' (Maybe Text) +dpFields = lens _dpFields (\ s a -> s{_dpFields = a}) + +-- | Data format for the response. +dpAlt :: Lens' DeploymentsPatch' Text +dpAlt = lens _dpAlt (\ s a -> s{_dpAlt = a}) + +-- | The name of the deployment for this request. +dpDeployment :: Lens' DeploymentsPatch' Text +dpDeployment + = lens _dpDeployment (\ s a -> s{_dpDeployment = a}) + +instance GoogleRequest DeploymentsPatch' where + type Rs DeploymentsPatch' = Operation + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsPatch{..} + = go (Just _dpCreatePolicy) _dpQuotaUser + _dpPrettyPrint + _dpProject + _dpUserIp + (Just _dpUpdatePolicy) + (Just _dpDeletePolicy) + _dpKey + _dpOauthToken + _dpFields + _dpAlt + _dpDeployment + where go + = clientWithRoute + (Proxy :: Proxy DeploymentsPatchAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs new file mode 100644 index 000000000..765bd211c --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Deployments.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a deployment and all of the resources described by the +-- deployment manifest. +-- +-- /See:/ for @DeploymentmanagerDeploymentsUpdate@. +module DeploymentManager.Deployments.Update + ( + -- * REST Resource + DeploymentsUpdateAPI + + -- * Creating a Request + , deploymentsUpdate + , DeploymentsUpdate + + -- * Request Lenses + , duCreatePolicy + , duQuotaUser + , duPrettyPrint + , duProject + , duUserIp + , duUpdatePolicy + , duDeletePolicy + , duKey + , duOauthToken + , duFields + , duAlt + , duDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerDeploymentsUpdate@ which the +-- 'DeploymentsUpdate' request conforms to. +type DeploymentsUpdateAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + QueryParam "createPolicy" Text :> + QueryParam "updatePolicy" Text :> + QueryParam "deletePolicy" Text :> + Put '[JSON] Operation + +-- | Updates a deployment and all of the resources described by the +-- deployment manifest. +-- +-- /See:/ 'deploymentsUpdate' smart constructor. +data DeploymentsUpdate = DeploymentsUpdate + { _duCreatePolicy :: !Text + , _duQuotaUser :: !(Maybe Text) + , _duPrettyPrint :: !Bool + , _duProject :: !Text + , _duUserIp :: !(Maybe Text) + , _duUpdatePolicy :: !Text + , _duDeletePolicy :: !Text + , _duKey :: !(Maybe Text) + , _duOauthToken :: !(Maybe Text) + , _duFields :: !(Maybe Text) + , _duAlt :: !Text + , _duDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeploymentsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'duCreatePolicy' +-- +-- * 'duQuotaUser' +-- +-- * 'duPrettyPrint' +-- +-- * 'duProject' +-- +-- * 'duUserIp' +-- +-- * 'duUpdatePolicy' +-- +-- * 'duDeletePolicy' +-- +-- * 'duKey' +-- +-- * 'duOauthToken' +-- +-- * 'duFields' +-- +-- * 'duAlt' +-- +-- * 'duDeployment' +deploymentsUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> DeploymentsUpdate +deploymentsUpdate pDuProject_ pDuDeployment_ = + DeploymentsUpdate + { _duCreatePolicy = "CREATE_OR_ACQUIRE" + , _duQuotaUser = Nothing + , _duPrettyPrint = True + , _duProject = pDuProject_ + , _duUserIp = Nothing + , _duUpdatePolicy = "PATCH" + , _duDeletePolicy = "DELETE" + , _duKey = Nothing + , _duOauthToken = Nothing + , _duFields = Nothing + , _duAlt = "json" + , _duDeployment = pDuDeployment_ + } + +-- | Sets the policy to use for creating new resources. +duCreatePolicy :: Lens' DeploymentsUpdate' Text +duCreatePolicy + = lens _duCreatePolicy + (\ s a -> s{_duCreatePolicy = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +duQuotaUser :: Lens' DeploymentsUpdate' (Maybe Text) +duQuotaUser + = lens _duQuotaUser (\ s a -> s{_duQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +duPrettyPrint :: Lens' DeploymentsUpdate' Bool +duPrettyPrint + = lens _duPrettyPrint + (\ s a -> s{_duPrettyPrint = a}) + +-- | The project ID for this request. +duProject :: Lens' DeploymentsUpdate' Text +duProject + = lens _duProject (\ s a -> s{_duProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +duUserIp :: Lens' DeploymentsUpdate' (Maybe Text) +duUserIp = lens _duUserIp (\ s a -> s{_duUserIp = a}) + +-- | Sets the policy to use for updating resources. +duUpdatePolicy :: Lens' DeploymentsUpdate' Text +duUpdatePolicy + = lens _duUpdatePolicy + (\ s a -> s{_duUpdatePolicy = a}) + +-- | Sets the policy to use for deleting resources. +duDeletePolicy :: Lens' DeploymentsUpdate' Text +duDeletePolicy + = lens _duDeletePolicy + (\ s a -> s{_duDeletePolicy = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +duKey :: Lens' DeploymentsUpdate' (Maybe Text) +duKey = lens _duKey (\ s a -> s{_duKey = a}) + +-- | OAuth 2.0 token for the current user. +duOauthToken :: Lens' DeploymentsUpdate' (Maybe Text) +duOauthToken + = lens _duOauthToken (\ s a -> s{_duOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +duFields :: Lens' DeploymentsUpdate' (Maybe Text) +duFields = lens _duFields (\ s a -> s{_duFields = a}) + +-- | Data format for the response. +duAlt :: Lens' DeploymentsUpdate' Text +duAlt = lens _duAlt (\ s a -> s{_duAlt = a}) + +-- | The name of the deployment for this request. +duDeployment :: Lens' DeploymentsUpdate' Text +duDeployment + = lens _duDeployment (\ s a -> s{_duDeployment = a}) + +instance GoogleRequest DeploymentsUpdate' where + type Rs DeploymentsUpdate' = Operation + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u DeploymentsUpdate{..} + = go (Just _duCreatePolicy) _duQuotaUser + _duPrettyPrint + _duProject + _duUserIp + (Just _duUpdatePolicy) + (Just _duDeletePolicy) + _duKey + _duOauthToken + _duFields + _duAlt + _duDeployment + where go + = clientWithRoute + (Proxy :: Proxy DeploymentsUpdateAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/Get.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/Get.hs new file mode 100644 index 000000000..9e45dc53f --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Manifests.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about a specific manifest. +-- +-- /See:/ for @DeploymentmanagerManifestsGet@. +module DeploymentManager.Manifests.Get + ( + -- * REST Resource + ManifestsGetAPI + + -- * Creating a Request + , manifestsGet + , ManifestsGet + + -- * Request Lenses + , mgQuotaUser + , mgPrettyPrint + , mgProject + , mgUserIp + , mgKey + , mgManifest + , mgOauthToken + , mgFields + , mgAlt + , mgDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerManifestsGet@ which the +-- 'ManifestsGet' request conforms to. +type ManifestsGetAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + "manifests" :> + Capture "manifest" Text :> Get '[JSON] Manifest + +-- | Gets information about a specific manifest. +-- +-- /See:/ 'manifestsGet' smart constructor. +data ManifestsGet = ManifestsGet + { _mgQuotaUser :: !(Maybe Text) + , _mgPrettyPrint :: !Bool + , _mgProject :: !Text + , _mgUserIp :: !(Maybe Text) + , _mgKey :: !(Maybe Text) + , _mgManifest :: !Text + , _mgOauthToken :: !(Maybe Text) + , _mgFields :: !(Maybe Text) + , _mgAlt :: !Text + , _mgDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManifestsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgQuotaUser' +-- +-- * 'mgPrettyPrint' +-- +-- * 'mgProject' +-- +-- * 'mgUserIp' +-- +-- * 'mgKey' +-- +-- * 'mgManifest' +-- +-- * 'mgOauthToken' +-- +-- * 'mgFields' +-- +-- * 'mgAlt' +-- +-- * 'mgDeployment' +manifestsGet + :: Text -- ^ 'project' + -> Text -- ^ 'manifest' + -> Text -- ^ 'deployment' + -> ManifestsGet +manifestsGet pMgProject_ pMgManifest_ pMgDeployment_ = + ManifestsGet + { _mgQuotaUser = Nothing + , _mgPrettyPrint = True + , _mgProject = pMgProject_ + , _mgUserIp = Nothing + , _mgKey = Nothing + , _mgManifest = pMgManifest_ + , _mgOauthToken = Nothing + , _mgFields = Nothing + , _mgAlt = "json" + , _mgDeployment = pMgDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgQuotaUser :: Lens' ManifestsGet' (Maybe Text) +mgQuotaUser + = lens _mgQuotaUser (\ s a -> s{_mgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgPrettyPrint :: Lens' ManifestsGet' Bool +mgPrettyPrint + = lens _mgPrettyPrint + (\ s a -> s{_mgPrettyPrint = a}) + +-- | The project ID for this request. +mgProject :: Lens' ManifestsGet' Text +mgProject + = lens _mgProject (\ s a -> s{_mgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgUserIp :: Lens' ManifestsGet' (Maybe Text) +mgUserIp = lens _mgUserIp (\ s a -> s{_mgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgKey :: Lens' ManifestsGet' (Maybe Text) +mgKey = lens _mgKey (\ s a -> s{_mgKey = a}) + +-- | The name of the manifest for this request. +mgManifest :: Lens' ManifestsGet' Text +mgManifest + = lens _mgManifest (\ s a -> s{_mgManifest = a}) + +-- | OAuth 2.0 token for the current user. +mgOauthToken :: Lens' ManifestsGet' (Maybe Text) +mgOauthToken + = lens _mgOauthToken (\ s a -> s{_mgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgFields :: Lens' ManifestsGet' (Maybe Text) +mgFields = lens _mgFields (\ s a -> s{_mgFields = a}) + +-- | Data format for the response. +mgAlt :: Lens' ManifestsGet' Text +mgAlt = lens _mgAlt (\ s a -> s{_mgAlt = a}) + +-- | The name of the deployment for this request. +mgDeployment :: Lens' ManifestsGet' Text +mgDeployment + = lens _mgDeployment (\ s a -> s{_mgDeployment = a}) + +instance GoogleRequest ManifestsGet' where + type Rs ManifestsGet' = Manifest + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u ManifestsGet{..} + = go _mgQuotaUser _mgPrettyPrint _mgProject _mgUserIp + _mgKey + _mgManifest + _mgOauthToken + _mgFields + _mgAlt + _mgDeployment + where go + = clientWithRoute (Proxy :: Proxy ManifestsGetAPI) r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/List.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/List.hs new file mode 100644 index 000000000..7daa6341c --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Manifests/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Manifests.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all manifests for a given deployment. +-- +-- /See:/ for @DeploymentmanagerManifestsList@. +module DeploymentManager.Manifests.List + ( + -- * REST Resource + ManifestsListAPI + + -- * Creating a Request + , manifestsList + , ManifestsList + + -- * Request Lenses + , mlQuotaUser + , mlPrettyPrint + , mlProject + , mlUserIp + , mlKey + , mlFilter + , mlPageToken + , mlOauthToken + , mlMaxResults + , mlFields + , mlAlt + , mlDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerManifestsList@ which the +-- 'ManifestsList' request conforms to. +type ManifestsListAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + "manifests" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ManifestsListResponse + +-- | Lists all manifests for a given deployment. +-- +-- /See:/ 'manifestsList' smart constructor. +data ManifestsList = ManifestsList + { _mlQuotaUser :: !(Maybe Text) + , _mlPrettyPrint :: !Bool + , _mlProject :: !Text + , _mlUserIp :: !(Maybe Text) + , _mlKey :: !(Maybe Text) + , _mlFilter :: !(Maybe Text) + , _mlPageToken :: !(Maybe Text) + , _mlOauthToken :: !(Maybe Text) + , _mlMaxResults :: !Word32 + , _mlFields :: !(Maybe Text) + , _mlAlt :: !Text + , _mlDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManifestsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlQuotaUser' +-- +-- * 'mlPrettyPrint' +-- +-- * 'mlProject' +-- +-- * 'mlUserIp' +-- +-- * 'mlKey' +-- +-- * 'mlFilter' +-- +-- * 'mlPageToken' +-- +-- * 'mlOauthToken' +-- +-- * 'mlMaxResults' +-- +-- * 'mlFields' +-- +-- * 'mlAlt' +-- +-- * 'mlDeployment' +manifestsList + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> ManifestsList +manifestsList pMlProject_ pMlDeployment_ = + ManifestsList + { _mlQuotaUser = Nothing + , _mlPrettyPrint = True + , _mlProject = pMlProject_ + , _mlUserIp = Nothing + , _mlKey = Nothing + , _mlFilter = Nothing + , _mlPageToken = Nothing + , _mlOauthToken = Nothing + , _mlMaxResults = 500 + , _mlFields = Nothing + , _mlAlt = "json" + , _mlDeployment = pMlDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlQuotaUser :: Lens' ManifestsList' (Maybe Text) +mlQuotaUser + = lens _mlQuotaUser (\ s a -> s{_mlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlPrettyPrint :: Lens' ManifestsList' Bool +mlPrettyPrint + = lens _mlPrettyPrint + (\ s a -> s{_mlPrettyPrint = a}) + +-- | The project ID for this request. +mlProject :: Lens' ManifestsList' Text +mlProject + = lens _mlProject (\ s a -> s{_mlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlUserIp :: Lens' ManifestsList' (Maybe Text) +mlUserIp = lens _mlUserIp (\ s a -> s{_mlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlKey :: Lens' ManifestsList' (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +mlFilter :: Lens' ManifestsList' (Maybe Text) +mlFilter = lens _mlFilter (\ s a -> s{_mlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +mlPageToken :: Lens' ManifestsList' (Maybe Text) +mlPageToken + = lens _mlPageToken (\ s a -> s{_mlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mlOauthToken :: Lens' ManifestsList' (Maybe Text) +mlOauthToken + = lens _mlOauthToken (\ s a -> s{_mlOauthToken = a}) + +-- | Maximum count of results to be returned. +mlMaxResults :: Lens' ManifestsList' Word32 +mlMaxResults + = lens _mlMaxResults (\ s a -> s{_mlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mlFields :: Lens' ManifestsList' (Maybe Text) +mlFields = lens _mlFields (\ s a -> s{_mlFields = a}) + +-- | Data format for the response. +mlAlt :: Lens' ManifestsList' Text +mlAlt = lens _mlAlt (\ s a -> s{_mlAlt = a}) + +-- | The name of the deployment for this request. +mlDeployment :: Lens' ManifestsList' Text +mlDeployment + = lens _mlDeployment (\ s a -> s{_mlDeployment = a}) + +instance GoogleRequest ManifestsList' where + type Rs ManifestsList' = ManifestsListResponse + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u ManifestsList{..} + = go _mlQuotaUser _mlPrettyPrint _mlProject _mlUserIp + _mlKey + _mlFilter + _mlPageToken + _mlOauthToken + (Just _mlMaxResults) + _mlFields + _mlAlt + _mlDeployment + where go + = clientWithRoute (Proxy :: Proxy ManifestsListAPI) r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/Get.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/Get.hs new file mode 100644 index 000000000..4da73504f --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Operations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about a specific operation. +-- +-- /See:/ for @DeploymentmanagerOperationsGet@. +module DeploymentManager.Operations.Get + ( + -- * REST Resource + OperationsGetAPI + + -- * Creating a Request + , operationsGet + , OperationsGet + + -- * Request Lenses + , ogQuotaUser + , ogPrettyPrint + , ogProject + , ogOperation + , ogUserIp + , ogKey + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerOperationsGet@ which the +-- 'OperationsGet' request conforms to. +type OperationsGetAPI = + Capture "project" Text :> + "global" :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Gets information about a specific operation. +-- +-- /See:/ 'operationsGet' smart constructor. +data OperationsGet = OperationsGet + { _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogProject :: !Text + , _ogOperation :: !Text + , _ogUserIp :: !(Maybe Text) + , _ogKey :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogProject' +-- +-- * 'ogOperation' +-- +-- * 'ogUserIp' +-- +-- * 'ogKey' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +operationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> OperationsGet +operationsGet pOgProject_ pOgOperation_ = + OperationsGet + { _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogProject = pOgProject_ + , _ogOperation = pOgOperation_ + , _ogUserIp = Nothing + , _ogKey = Nothing + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OperationsGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OperationsGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | The project ID for this request. +ogProject :: Lens' OperationsGet' Text +ogProject + = lens _ogProject (\ s a -> s{_ogProject = a}) + +-- | The name of the operation for this request. +ogOperation :: Lens' OperationsGet' Text +ogOperation + = lens _ogOperation (\ s a -> s{_ogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OperationsGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OperationsGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OperationsGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OperationsGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OperationsGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OperationsGet' where + type Rs OperationsGet' = Operation + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u OperationsGet{..} + = go _ogQuotaUser _ogPrettyPrint _ogProject + _ogOperation + _ogUserIp + _ogKey + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy OperationsGetAPI) r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/List.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/List.hs new file mode 100644 index 000000000..fb7831594 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Operations/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Operations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all operations for a project. +-- +-- /See:/ for @DeploymentmanagerOperationsList@. +module DeploymentManager.Operations.List + ( + -- * REST Resource + OperationsListAPI + + -- * Creating a Request + , operationsList + , OperationsList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olProject + , olUserIp + , olKey + , olFilter + , olPageToken + , olOauthToken + , olMaxResults + , olFields + , olAlt + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerOperationsList@ which the +-- 'OperationsList' request conforms to. +type OperationsListAPI = + Capture "project" Text :> + "global" :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationsListResponse + +-- | Lists all operations for a project. +-- +-- /See:/ 'operationsList' smart constructor. +data OperationsList = OperationsList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olProject :: !Text + , _olUserIp :: !(Maybe Text) + , _olKey :: !(Maybe Text) + , _olFilter :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olMaxResults :: !Word32 + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olProject' +-- +-- * 'olUserIp' +-- +-- * 'olKey' +-- +-- * 'olFilter' +-- +-- * 'olPageToken' +-- +-- * 'olOauthToken' +-- +-- * 'olMaxResults' +-- +-- * 'olFields' +-- +-- * 'olAlt' +operationsList + :: Text -- ^ 'project' + -> OperationsList +operationsList pOlProject_ = + OperationsList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olProject = pOlProject_ + , _olUserIp = Nothing + , _olKey = Nothing + , _olFilter = Nothing + , _olPageToken = Nothing + , _olOauthToken = Nothing + , _olMaxResults = 500 + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OperationsList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OperationsList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | The project ID for this request. +olProject :: Lens' OperationsList' Text +olProject + = lens _olProject (\ s a -> s{_olProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OperationsList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OperationsList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +olFilter :: Lens' OperationsList' (Maybe Text) +olFilter = lens _olFilter (\ s a -> s{_olFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +olPageToken :: Lens' OperationsList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OperationsList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Maximum count of results to be returned. +olMaxResults :: Lens' OperationsList' Word32 +olMaxResults + = lens _olMaxResults (\ s a -> s{_olMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OperationsList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OperationsList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OperationsList' where + type Rs OperationsList' = OperationsListResponse + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u OperationsList{..} + = go _olQuotaUser _olPrettyPrint _olProject _olUserIp + _olKey + _olFilter + _olPageToken + _olOauthToken + (Just _olMaxResults) + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy OperationsListAPI) + r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/Get.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/Get.hs new file mode 100644 index 000000000..d6f58a53d --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Resources.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets information about a single resource. +-- +-- /See:/ for @DeploymentmanagerResourcesGet@. +module DeploymentManager.Resources.Get + ( + -- * REST Resource + ResourcesGetAPI + + -- * Creating a Request + , resourcesGet + , ResourcesGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgProject + , rgUserIp + , rgKey + , rgResource + , rgOauthToken + , rgFields + , rgAlt + , rgDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerResourcesGet@ which the +-- 'ResourcesGet' request conforms to. +type ResourcesGetAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + "resources" :> + Capture "resource" Text :> Get '[JSON] Resource + +-- | Gets information about a single resource. +-- +-- /See:/ 'resourcesGet' smart constructor. +data ResourcesGet = ResourcesGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgProject :: !Text + , _rgUserIp :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgResource :: !Text + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + , _rgDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourcesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgProject' +-- +-- * 'rgUserIp' +-- +-- * 'rgKey' +-- +-- * 'rgResource' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +-- +-- * 'rgDeployment' +resourcesGet + :: Text -- ^ 'project' + -> Text -- ^ 'resource' + -> Text -- ^ 'deployment' + -> ResourcesGet +resourcesGet pRgProject_ pRgResource_ pRgDeployment_ = + ResourcesGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgProject = pRgProject_ + , _rgUserIp = Nothing + , _rgKey = Nothing + , _rgResource = pRgResource_ + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + , _rgDeployment = pRgDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ResourcesGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ResourcesGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | The project ID for this request. +rgProject :: Lens' ResourcesGet' Text +rgProject + = lens _rgProject (\ s a -> s{_rgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ResourcesGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ResourcesGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | The name of the resource for this request. +rgResource :: Lens' ResourcesGet' Text +rgResource + = lens _rgResource (\ s a -> s{_rgResource = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ResourcesGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ResourcesGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ResourcesGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +-- | The name of the deployment for this request. +rgDeployment :: Lens' ResourcesGet' Text +rgDeployment + = lens _rgDeployment (\ s a -> s{_rgDeployment = a}) + +instance GoogleRequest ResourcesGet' where + type Rs ResourcesGet' = Resource + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u ResourcesGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgProject _rgUserIp + _rgKey + _rgResource + _rgOauthToken + _rgFields + _rgAlt + _rgDeployment + where go + = clientWithRoute (Proxy :: Proxy ResourcesGetAPI) r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/List.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/List.hs new file mode 100644 index 000000000..c1f139428 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/List.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Resources.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all resources in a given deployment. +-- +-- /See:/ for @DeploymentmanagerResourcesList@. +module DeploymentManager.Resources.List + ( + -- * REST Resource + ResourcesListAPI + + -- * Creating a Request + , resourcesList + , ResourcesList + + -- * Request Lenses + , rlQuotaUser + , rlPrettyPrint + , rlProject + , rlUserIp + , rlKey + , rlFilter + , rlPageToken + , rlOauthToken + , rlMaxResults + , rlFields + , rlAlt + , rlDeployment + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerResourcesList@ which the +-- 'ResourcesList' request conforms to. +type ResourcesListAPI = + Capture "project" Text :> + "global" :> + "deployments" :> + Capture "deployment" Text :> + "resources" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ResourcesListResponse + +-- | Lists all resources in a given deployment. +-- +-- /See:/ 'resourcesList' smart constructor. +data ResourcesList = ResourcesList + { _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlProject :: !Text + , _rlUserIp :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlFilter :: !(Maybe Text) + , _rlPageToken :: !(Maybe Text) + , _rlOauthToken :: !(Maybe Text) + , _rlMaxResults :: !Word32 + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + , _rlDeployment :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourcesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlProject' +-- +-- * 'rlUserIp' +-- +-- * 'rlKey' +-- +-- * 'rlFilter' +-- +-- * 'rlPageToken' +-- +-- * 'rlOauthToken' +-- +-- * 'rlMaxResults' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +-- +-- * 'rlDeployment' +resourcesList + :: Text -- ^ 'project' + -> Text -- ^ 'deployment' + -> ResourcesList +resourcesList pRlProject_ pRlDeployment_ = + ResourcesList + { _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlProject = pRlProject_ + , _rlUserIp = Nothing + , _rlKey = Nothing + , _rlFilter = Nothing + , _rlPageToken = Nothing + , _rlOauthToken = Nothing + , _rlMaxResults = 500 + , _rlFields = Nothing + , _rlAlt = "json" + , _rlDeployment = pRlDeployment_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' ResourcesList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' ResourcesList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | The project ID for this request. +rlProject :: Lens' ResourcesList' Text +rlProject + = lens _rlProject (\ s a -> s{_rlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' ResourcesList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' ResourcesList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +rlFilter :: Lens' ResourcesList' (Maybe Text) +rlFilter = lens _rlFilter (\ s a -> s{_rlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +rlPageToken :: Lens' ResourcesList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' ResourcesList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | Maximum count of results to be returned. +rlMaxResults :: Lens' ResourcesList' Word32 +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' ResourcesList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' ResourcesList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +-- | The name of the deployment for this request. +rlDeployment :: Lens' ResourcesList' Text +rlDeployment + = lens _rlDeployment (\ s a -> s{_rlDeployment = a}) + +instance GoogleRequest ResourcesList' where + type Rs ResourcesList' = ResourcesListResponse + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u ResourcesList{..} + = go _rlQuotaUser _rlPrettyPrint _rlProject _rlUserIp + _rlKey + _rlFilter + _rlPageToken + _rlOauthToken + (Just _rlMaxResults) + _rlFields + _rlAlt + _rlDeployment + where go + = clientWithRoute (Proxy :: Proxy ResourcesListAPI) r + u diff --git a/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Types/List.hs b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Types/List.hs new file mode 100644 index 000000000..771c56168 --- /dev/null +++ b/gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Types/List.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DeploymentManager.Types.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all resource types for Deployment Manager. +-- +-- /See:/ for @DeploymentmanagerTypesList@. +module DeploymentManager.Types.List + ( + -- * REST Resource + TypesListAPI + + -- * Creating a Request + , typesList + , TypesList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlProject + , tlUserIp + , tlKey + , tlFilter + , tlPageToken + , tlOauthToken + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.DeploymentManager.Types +import Network.Google.Prelude + +-- | A resource alias for @DeploymentmanagerTypesList@ which the +-- 'TypesList' request conforms to. +type TypesListAPI = + Capture "project" Text :> + "global" :> + "types" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TypesListResponse + +-- | Lists all resource types for Deployment Manager. +-- +-- /See:/ 'typesList' smart constructor. +data TypesList = TypesList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlProject :: !Text + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlFilter :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !Word32 + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TypesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlProject' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlFilter' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +typesList + :: Text -- ^ 'project' + -> TypesList +typesList pTlProject_ = + TypesList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlProject = pTlProject_ + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlFilter = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlMaxResults = 500 + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TypesList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TypesList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | The project ID for this request. +tlProject :: Lens' TypesList' Text +tlProject + = lens _tlProject (\ s a -> s{_tlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TypesList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TypesList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Sets a filter expression for filtering listed resources, in the form +-- filter={expression}. Your {expression} must be in the format: FIELD_NAME +-- COMPARISON_STRING LITERAL_STRING. The FIELD_NAME is the name of the +-- field you want to compare. Only atomic field types are supported +-- (string, number, boolean). The COMPARISON_STRING must be either eq +-- (equals) or ne (not equals). The LITERAL_STRING is the string value to +-- filter to. The literal value must be valid for the type of field +-- (string, number, boolean). For string fields, the literal value is +-- interpreted as a regular expression using RE2 syntax. The literal value +-- must match the entire field. For example, filter=name ne +-- example-instance. +tlFilter :: Lens' TypesList' (Maybe Text) +tlFilter = lens _tlFilter (\ s a -> s{_tlFilter = a}) + +-- | Specifies a page token to use. Use this parameter if you want to list +-- the next page of results. Set pageToken to the nextPageToken returned by +-- a previous list request. +tlPageToken :: Lens' TypesList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TypesList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Maximum count of results to be returned. +tlMaxResults :: Lens' TypesList' Word32 +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TypesList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TypesList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TypesList' where + type Rs TypesList' = TypesListResponse + request + = requestWithRoute defReq deploymentManagerURL + requestWithRoute r u TypesList{..} + = go _tlQuotaUser _tlPrettyPrint _tlProject _tlUserIp + _tlKey + _tlFilter + _tlPageToken + _tlOauthToken + (Just _tlMaxResults) + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TypesListAPI) r u diff --git a/gogol-deploymentmanager/gogol-deploymentmanager.cabal b/gogol-deploymentmanager/gogol-deploymentmanager.cabal new file mode 100644 index 000000000..d8467415e --- /dev/null +++ b/gogol-deploymentmanager/gogol-deploymentmanager.cabal @@ -0,0 +1,56 @@ +name: gogol-deploymentmanager +version: 0.0.1 +synopsis: Google Cloud Deployment Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Deployment Manager API allows users to declaratively configure, + deploy and run complex solutions on the Google Cloud Platform. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.DeploymentManager + , Network.Google.DeploymentManager.Types + , Network.Google.Resource.DeploymentManager.Deployments.Delete + , Network.Google.Resource.DeploymentManager.Deployments.Get + , Network.Google.Resource.DeploymentManager.Deployments.Insert + , Network.Google.Resource.DeploymentManager.Deployments.List + , Network.Google.Resource.DeploymentManager.Deployments.Patch + , Network.Google.Resource.DeploymentManager.Deployments.Update + , Network.Google.Resource.DeploymentManager.Manifests.Get + , Network.Google.Resource.DeploymentManager.Manifests.List + , Network.Google.Resource.DeploymentManager.Operations.Get + , Network.Google.Resource.DeploymentManager.Operations.List + , Network.Google.Resource.DeploymentManager.Resources.Get + , Network.Google.Resource.DeploymentManager.Resources.List + , Network.Google.Resource.DeploymentManager.Types.List + + other-modules: + Network.Google.DeploymentManager.Types.Product + , Network.Google.DeploymentManager.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-deploymentmanager/src/.gitkeep b/gogol-deploymentmanager/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-dfareporting/LICENSE b/gogol-dfareporting/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-dfareporting/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-dfareporting/Makefile b/gogol-dfareporting/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-dfareporting/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-dfareporting/README.md b/gogol-dfareporting/README.md new file mode 100644 index 000000000..4bba2b8c2 --- /dev/null +++ b/gogol-dfareporting/README.md @@ -0,0 +1,28 @@ +# gogol-dfareporting + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the DCM/DFA Reporting And Trafficking API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-dfareporting` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-dfareporting/Setup.hs b/gogol-dfareporting/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-dfareporting/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-dfareporting/gen/Network/Google/DFAReporting.hs b/gogol-dfareporting/gen/Network/Google/DFAReporting.hs new file mode 100644 index 000000000..642b55203 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/DFAReporting.hs @@ -0,0 +1,2722 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.DFAReporting +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Manage your DoubleClick Campaign Manager ad campaigns and reports. +-- +-- /See:/ +module Network.Google.DFAReporting + ( + -- * API + DFAReportingAPI + , dFAReportingAPI + , dFAReportingURL + + -- * Service Methods + + -- * REST Resources + + -- ** DfareportingAccountActiveAdSummariesGet + , module DFAReporting.AccountActiveAdSummaries.Get + + -- ** DfareportingAccountPermissionGroupsGet + , module DFAReporting.AccountPermissionGroups.Get + + -- ** DfareportingAccountPermissionGroupsList + , module DFAReporting.AccountPermissionGroups.List + + -- ** DfareportingAccountPermissionsGet + , module DFAReporting.AccountPermissions.Get + + -- ** DfareportingAccountPermissionsList + , module DFAReporting.AccountPermissions.List + + -- ** DfareportingAccountUserProfilesGet + , module DFAReporting.AccountUserProfiles.Get + + -- ** DfareportingAccountUserProfilesInsert + , module DFAReporting.AccountUserProfiles.Insert + + -- ** DfareportingAccountUserProfilesList + , module DFAReporting.AccountUserProfiles.List + + -- ** DfareportingAccountUserProfilesPatch + , module DFAReporting.AccountUserProfiles.Patch + + -- ** DfareportingAccountUserProfilesUpdate + , module DFAReporting.AccountUserProfiles.Update + + -- ** DfareportingAccountsGet + , module DFAReporting.Accounts.Get + + -- ** DfareportingAccountsList + , module DFAReporting.Accounts.List + + -- ** DfareportingAccountsPatch + , module DFAReporting.Accounts.Patch + + -- ** DfareportingAccountsUpdate + , module DFAReporting.Accounts.Update + + -- ** DfareportingAdsGet + , module DFAReporting.Ads.Get + + -- ** DfareportingAdsInsert + , module DFAReporting.Ads.Insert + + -- ** DfareportingAdsList + , module DFAReporting.Ads.List + + -- ** DfareportingAdsPatch + , module DFAReporting.Ads.Patch + + -- ** DfareportingAdsUpdate + , module DFAReporting.Ads.Update + + -- ** DfareportingAdvertiserGroupsDelete + , module DFAReporting.AdvertiserGroups.Delete + + -- ** DfareportingAdvertiserGroupsGet + , module DFAReporting.AdvertiserGroups.Get + + -- ** DfareportingAdvertiserGroupsInsert + , module DFAReporting.AdvertiserGroups.Insert + + -- ** DfareportingAdvertiserGroupsList + , module DFAReporting.AdvertiserGroups.List + + -- ** DfareportingAdvertiserGroupsPatch + , module DFAReporting.AdvertiserGroups.Patch + + -- ** DfareportingAdvertiserGroupsUpdate + , module DFAReporting.AdvertiserGroups.Update + + -- ** DfareportingAdvertisersGet + , module DFAReporting.Advertisers.Get + + -- ** DfareportingAdvertisersInsert + , module DFAReporting.Advertisers.Insert + + -- ** DfareportingAdvertisersList + , module DFAReporting.Advertisers.List + + -- ** DfareportingAdvertisersPatch + , module DFAReporting.Advertisers.Patch + + -- ** DfareportingAdvertisersUpdate + , module DFAReporting.Advertisers.Update + + -- ** DfareportingBrowsersList + , module DFAReporting.Browsers.List + + -- ** DfareportingCampaignCreativeAssociationsInsert + , module DFAReporting.CampaignCreativeAssociations.Insert + + -- ** DfareportingCampaignCreativeAssociationsList + , module DFAReporting.CampaignCreativeAssociations.List + + -- ** DfareportingCampaignsGet + , module DFAReporting.Campaigns.Get + + -- ** DfareportingCampaignsInsert + , module DFAReporting.Campaigns.Insert + + -- ** DfareportingCampaignsList + , module DFAReporting.Campaigns.List + + -- ** DfareportingCampaignsPatch + , module DFAReporting.Campaigns.Patch + + -- ** DfareportingCampaignsUpdate + , module DFAReporting.Campaigns.Update + + -- ** DfareportingChangeLogsGet + , module DFAReporting.ChangeLogs.Get + + -- ** DfareportingChangeLogsList + , module DFAReporting.ChangeLogs.List + + -- ** DfareportingCitiesList + , module DFAReporting.Cities.List + + -- ** DfareportingConnectionTypesGet + , module DFAReporting.ConnectionTypes.Get + + -- ** DfareportingConnectionTypesList + , module DFAReporting.ConnectionTypes.List + + -- ** DfareportingContentCategoriesDelete + , module DFAReporting.ContentCategories.Delete + + -- ** DfareportingContentCategoriesGet + , module DFAReporting.ContentCategories.Get + + -- ** DfareportingContentCategoriesInsert + , module DFAReporting.ContentCategories.Insert + + -- ** DfareportingContentCategoriesList + , module DFAReporting.ContentCategories.List + + -- ** DfareportingContentCategoriesPatch + , module DFAReporting.ContentCategories.Patch + + -- ** DfareportingContentCategoriesUpdate + , module DFAReporting.ContentCategories.Update + + -- ** DfareportingCountriesGet + , module DFAReporting.Countries.Get + + -- ** DfareportingCountriesList + , module DFAReporting.Countries.List + + -- ** DfareportingCreativeAssetsInsert + , module DFAReporting.CreativeAssets.Insert + + -- ** DfareportingCreativeFieldValuesDelete + , module DFAReporting.CreativeFieldValues.Delete + + -- ** DfareportingCreativeFieldValuesGet + , module DFAReporting.CreativeFieldValues.Get + + -- ** DfareportingCreativeFieldValuesInsert + , module DFAReporting.CreativeFieldValues.Insert + + -- ** DfareportingCreativeFieldValuesList + , module DFAReporting.CreativeFieldValues.List + + -- ** DfareportingCreativeFieldValuesPatch + , module DFAReporting.CreativeFieldValues.Patch + + -- ** DfareportingCreativeFieldValuesUpdate + , module DFAReporting.CreativeFieldValues.Update + + -- ** DfareportingCreativeFieldsDelete + , module DFAReporting.CreativeFields.Delete + + -- ** DfareportingCreativeFieldsGet + , module DFAReporting.CreativeFields.Get + + -- ** DfareportingCreativeFieldsInsert + , module DFAReporting.CreativeFields.Insert + + -- ** DfareportingCreativeFieldsList + , module DFAReporting.CreativeFields.List + + -- ** DfareportingCreativeFieldsPatch + , module DFAReporting.CreativeFields.Patch + + -- ** DfareportingCreativeFieldsUpdate + , module DFAReporting.CreativeFields.Update + + -- ** DfareportingCreativeGroupsGet + , module DFAReporting.CreativeGroups.Get + + -- ** DfareportingCreativeGroupsInsert + , module DFAReporting.CreativeGroups.Insert + + -- ** DfareportingCreativeGroupsList + , module DFAReporting.CreativeGroups.List + + -- ** DfareportingCreativeGroupsPatch + , module DFAReporting.CreativeGroups.Patch + + -- ** DfareportingCreativeGroupsUpdate + , module DFAReporting.CreativeGroups.Update + + -- ** DfareportingCreativesGet + , module DFAReporting.Creatives.Get + + -- ** DfareportingCreativesInsert + , module DFAReporting.Creatives.Insert + + -- ** DfareportingCreativesList + , module DFAReporting.Creatives.List + + -- ** DfareportingCreativesPatch + , module DFAReporting.Creatives.Patch + + -- ** DfareportingCreativesUpdate + , module DFAReporting.Creatives.Update + + -- ** DfareportingDimensionValuesQuery + , module DFAReporting.DimensionValues.Query + + -- ** DfareportingDirectorySiteContactsGet + , module DFAReporting.DirectorySiteContacts.Get + + -- ** DfareportingDirectorySiteContactsList + , module DFAReporting.DirectorySiteContacts.List + + -- ** DfareportingDirectorySitesGet + , module DFAReporting.DirectorySites.Get + + -- ** DfareportingDirectorySitesInsert + , module DFAReporting.DirectorySites.Insert + + -- ** DfareportingDirectorySitesList + , module DFAReporting.DirectorySites.List + + -- ** DfareportingEventTagsDelete + , module DFAReporting.EventTags.Delete + + -- ** DfareportingEventTagsGet + , module DFAReporting.EventTags.Get + + -- ** DfareportingEventTagsInsert + , module DFAReporting.EventTags.Insert + + -- ** DfareportingEventTagsList + , module DFAReporting.EventTags.List + + -- ** DfareportingEventTagsPatch + , module DFAReporting.EventTags.Patch + + -- ** DfareportingEventTagsUpdate + , module DFAReporting.EventTags.Update + + -- ** DfareportingFilesGet + , module DFAReporting.Files.Get + + -- ** DfareportingFilesList + , module DFAReporting.Files.List + + -- ** DfareportingFloodlightActivitiesDelete + , module DFAReporting.FloodlightActivities.Delete + + -- ** DfareportingFloodlightActivitiesGeneratetag + , module DFAReporting.FloodlightActivities.Generatetag + + -- ** DfareportingFloodlightActivitiesGet + , module DFAReporting.FloodlightActivities.Get + + -- ** DfareportingFloodlightActivitiesInsert + , module DFAReporting.FloodlightActivities.Insert + + -- ** DfareportingFloodlightActivitiesList + , module DFAReporting.FloodlightActivities.List + + -- ** DfareportingFloodlightActivitiesPatch + , module DFAReporting.FloodlightActivities.Patch + + -- ** DfareportingFloodlightActivitiesUpdate + , module DFAReporting.FloodlightActivities.Update + + -- ** DfareportingFloodlightActivityGroupsDelete + , module DFAReporting.FloodlightActivityGroups.Delete + + -- ** DfareportingFloodlightActivityGroupsGet + , module DFAReporting.FloodlightActivityGroups.Get + + -- ** DfareportingFloodlightActivityGroupsInsert + , module DFAReporting.FloodlightActivityGroups.Insert + + -- ** DfareportingFloodlightActivityGroupsList + , module DFAReporting.FloodlightActivityGroups.List + + -- ** DfareportingFloodlightActivityGroupsPatch + , module DFAReporting.FloodlightActivityGroups.Patch + + -- ** DfareportingFloodlightActivityGroupsUpdate + , module DFAReporting.FloodlightActivityGroups.Update + + -- ** DfareportingFloodlightConfigurationsGet + , module DFAReporting.FloodlightConfigurations.Get + + -- ** DfareportingFloodlightConfigurationsList + , module DFAReporting.FloodlightConfigurations.List + + -- ** DfareportingFloodlightConfigurationsPatch + , module DFAReporting.FloodlightConfigurations.Patch + + -- ** DfareportingFloodlightConfigurationsUpdate + , module DFAReporting.FloodlightConfigurations.Update + + -- ** DfareportingInventoryItemsGet + , module DFAReporting.InventoryItems.Get + + -- ** DfareportingInventoryItemsList + , module DFAReporting.InventoryItems.List + + -- ** DfareportingLandingPagesDelete + , module DFAReporting.LandingPages.Delete + + -- ** DfareportingLandingPagesGet + , module DFAReporting.LandingPages.Get + + -- ** DfareportingLandingPagesInsert + , module DFAReporting.LandingPages.Insert + + -- ** DfareportingLandingPagesList + , module DFAReporting.LandingPages.List + + -- ** DfareportingLandingPagesPatch + , module DFAReporting.LandingPages.Patch + + -- ** DfareportingLandingPagesUpdate + , module DFAReporting.LandingPages.Update + + -- ** DfareportingMetrosList + , module DFAReporting.Metros.List + + -- ** DfareportingMobileCarriersGet + , module DFAReporting.MobileCarriers.Get + + -- ** DfareportingMobileCarriersList + , module DFAReporting.MobileCarriers.List + + -- ** DfareportingOperatingSystemVersionsGet + , module DFAReporting.OperatingSystemVersions.Get + + -- ** DfareportingOperatingSystemVersionsList + , module DFAReporting.OperatingSystemVersions.List + + -- ** DfareportingOperatingSystemsGet + , module DFAReporting.OperatingSystems.Get + + -- ** DfareportingOperatingSystemsList + , module DFAReporting.OperatingSystems.List + + -- ** DfareportingOrderDocumentsGet + , module DFAReporting.OrderDocuments.Get + + -- ** DfareportingOrderDocumentsList + , module DFAReporting.OrderDocuments.List + + -- ** DfareportingOrdersGet + , module DFAReporting.Orders.Get + + -- ** DfareportingOrdersList + , module DFAReporting.Orders.List + + -- ** DfareportingPlacementGroupsGet + , module DFAReporting.PlacementGroups.Get + + -- ** DfareportingPlacementGroupsInsert + , module DFAReporting.PlacementGroups.Insert + + -- ** DfareportingPlacementGroupsList + , module DFAReporting.PlacementGroups.List + + -- ** DfareportingPlacementGroupsPatch + , module DFAReporting.PlacementGroups.Patch + + -- ** DfareportingPlacementGroupsUpdate + , module DFAReporting.PlacementGroups.Update + + -- ** DfareportingPlacementStrategiesDelete + , module DFAReporting.PlacementStrategies.Delete + + -- ** DfareportingPlacementStrategiesGet + , module DFAReporting.PlacementStrategies.Get + + -- ** DfareportingPlacementStrategiesInsert + , module DFAReporting.PlacementStrategies.Insert + + -- ** DfareportingPlacementStrategiesList + , module DFAReporting.PlacementStrategies.List + + -- ** DfareportingPlacementStrategiesPatch + , module DFAReporting.PlacementStrategies.Patch + + -- ** DfareportingPlacementStrategiesUpdate + , module DFAReporting.PlacementStrategies.Update + + -- ** DfareportingPlacementsGeneratetags + , module DFAReporting.Placements.Generatetags + + -- ** DfareportingPlacementsGet + , module DFAReporting.Placements.Get + + -- ** DfareportingPlacementsInsert + , module DFAReporting.Placements.Insert + + -- ** DfareportingPlacementsList + , module DFAReporting.Placements.List + + -- ** DfareportingPlacementsPatch + , module DFAReporting.Placements.Patch + + -- ** DfareportingPlacementsUpdate + , module DFAReporting.Placements.Update + + -- ** DfareportingPlatformTypesGet + , module DFAReporting.PlatformTypes.Get + + -- ** DfareportingPlatformTypesList + , module DFAReporting.PlatformTypes.List + + -- ** DfareportingPostalCodesGet + , module DFAReporting.PostalCodes.Get + + -- ** DfareportingPostalCodesList + , module DFAReporting.PostalCodes.List + + -- ** DfareportingProjectsGet + , module DFAReporting.Projects.Get + + -- ** DfareportingProjectsList + , module DFAReporting.Projects.List + + -- ** DfareportingRegionsList + , module DFAReporting.Regions.List + + -- ** DfareportingRemarketingListSharesGet + , module DFAReporting.RemarketingListShares.Get + + -- ** DfareportingRemarketingListSharesPatch + , module DFAReporting.RemarketingListShares.Patch + + -- ** DfareportingRemarketingListSharesUpdate + , module DFAReporting.RemarketingListShares.Update + + -- ** DfareportingRemarketingListsGet + , module DFAReporting.RemarketingLists.Get + + -- ** DfareportingRemarketingListsInsert + , module DFAReporting.RemarketingLists.Insert + + -- ** DfareportingRemarketingListsList + , module DFAReporting.RemarketingLists.List + + -- ** DfareportingRemarketingListsPatch + , module DFAReporting.RemarketingLists.Patch + + -- ** DfareportingRemarketingListsUpdate + , module DFAReporting.RemarketingLists.Update + + -- ** DfareportingReportsCompatibleFieldsQuery + , module DFAReporting.Reports.CompatibleFields.Query + + -- ** DfareportingReportsDelete + , module DFAReporting.Reports.Delete + + -- ** DfareportingReportsFilesGet + , module DFAReporting.Reports.Files.Get + + -- ** DfareportingReportsFilesList + , module DFAReporting.Reports.Files.List + + -- ** DfareportingReportsGet + , module DFAReporting.Reports.Get + + -- ** DfareportingReportsInsert + , module DFAReporting.Reports.Insert + + -- ** DfareportingReportsList + , module DFAReporting.Reports.List + + -- ** DfareportingReportsPatch + , module DFAReporting.Reports.Patch + + -- ** DfareportingReportsRun + , module DFAReporting.Reports.Run + + -- ** DfareportingReportsUpdate + , module DFAReporting.Reports.Update + + -- ** DfareportingSitesGet + , module DFAReporting.Sites.Get + + -- ** DfareportingSitesInsert + , module DFAReporting.Sites.Insert + + -- ** DfareportingSitesList + , module DFAReporting.Sites.List + + -- ** DfareportingSitesPatch + , module DFAReporting.Sites.Patch + + -- ** DfareportingSitesUpdate + , module DFAReporting.Sites.Update + + -- ** DfareportingSizesGet + , module DFAReporting.Sizes.Get + + -- ** DfareportingSizesInsert + , module DFAReporting.Sizes.Insert + + -- ** DfareportingSizesList + , module DFAReporting.Sizes.List + + -- ** DfareportingSubaccountsGet + , module DFAReporting.Subaccounts.Get + + -- ** DfareportingSubaccountsInsert + , module DFAReporting.Subaccounts.Insert + + -- ** DfareportingSubaccountsList + , module DFAReporting.Subaccounts.List + + -- ** DfareportingSubaccountsPatch + , module DFAReporting.Subaccounts.Patch + + -- ** DfareportingSubaccountsUpdate + , module DFAReporting.Subaccounts.Update + + -- ** DfareportingTargetableRemarketingListsGet + , module DFAReporting.TargetableRemarketingLists.Get + + -- ** DfareportingTargetableRemarketingListsList + , module DFAReporting.TargetableRemarketingLists.List + + -- ** DfareportingUserProfilesGet + , module DFAReporting.UserProfiles.Get + + -- ** DfareportingUserProfilesList + , module DFAReporting.UserProfiles.List + + -- ** DfareportingUserRolePermissionGroupsGet + , module DFAReporting.UserRolePermissionGroups.Get + + -- ** DfareportingUserRolePermissionGroupsList + , module DFAReporting.UserRolePermissionGroups.List + + -- ** DfareportingUserRolePermissionsGet + , module DFAReporting.UserRolePermissions.Get + + -- ** DfareportingUserRolePermissionsList + , module DFAReporting.UserRolePermissions.List + + -- ** DfareportingUserRolesDelete + , module DFAReporting.UserRoles.Delete + + -- ** DfareportingUserRolesGet + , module DFAReporting.UserRoles.Get + + -- ** DfareportingUserRolesInsert + , module DFAReporting.UserRoles.Insert + + -- ** DfareportingUserRolesList + , module DFAReporting.UserRoles.List + + -- ** DfareportingUserRolesPatch + , module DFAReporting.UserRoles.Patch + + -- ** DfareportingUserRolesUpdate + , module DFAReporting.UserRoles.Update + + -- * Types + + -- ** Browser + , Browser + , browser + , bMinorVersion + , bKind + , bBrowserVersionId + , bMajorVersion + , bName + , bDartId + + -- ** CampaignsListResponse + , CampaignsListResponse + , campaignsListResponse + , clrNextPageToken + , clrCampaigns + , clrKind + + -- ** OptimizationActivity + , OptimizationActivity + , optimizationActivity + , oaWeight + , oaFloodlightActivityId + , oaFloodlightActivityIdDimensionValue + + -- ** FileList + , FileList + , fileList + , flEtag + , flNextPageToken + , flKind + , flItems + + -- ** ClickTag + , ClickTag + , clickTag + , ctValue + , ctName + , ctEventName + + -- ** ListPopulationClause + , ListPopulationClause + , listPopulationClause + , lpcTerms + + -- ** GeoTargeting + , GeoTargeting + , geoTargeting + , gtRegions + , gtCountries + , gtCities + , gtMetros + , gtExcludeCountries + , gtPostalCodes + + -- ** CreativeCustomEvent + , CreativeCustomEvent + , creativeCustomEvent + , cceAdvertiserCustomEventType + , cceAdvertiserCustomEventName + , cceExitUrl + , cceTargetType + , ccePopupWindowProperties + , cceVideoReportingId + , cceId + , cceArtworkLabel + , cceArtworkType + + -- ** ReachReportCompatibleFields + , ReachReportCompatibleFields + , reachReportCompatibleFields + , rrcfMetrics + , rrcfReachByFrequencyMetrics + , rrcfKind + , rrcfDimensionFilters + , rrcfPivotedActivityMetrics + , rrcfDimensions + + -- ** CreativeGroupAssignment + , CreativeGroupAssignment + , creativeGroupAssignment + , cgaCreativeGroupNumber + , cgaCreativeGroupId + + -- ** AdsListResponse + , AdsListResponse + , adsListResponse + , alrNextPageToken + , alrKind + , alrAds + + -- ** ListPopulationTerm + , ListPopulationTerm + , listPopulationTerm + , lptOperator + , lptValue + , lptVariableFriendlyName + , lptNegation + , lptVariableName + , lptRemarketingListId + , lptType + , lptContains + + -- ** SubaccountsListResponse + , SubaccountsListResponse + , subaccountsListResponse + , slrNextPageToken + , slrKind + , slrSubaccounts + + -- ** TechnologyTargeting + , TechnologyTargeting + , technologyTargeting + , ttMobileCarriers + , ttOperatingSystemVersions + , ttPlatformTypes + , ttBrowsers + , ttConnectionTypes + , ttOperatingSystems + + -- ** ProjectsListResponse + , ProjectsListResponse + , projectsListResponse + , plrNextPageToken + , plrKind + , plrProjects + + -- ** DirectorySiteSettings + , DirectorySiteSettings + , directorySiteSettings + , dssInterstitialPlacementAccepted + , dssDfpSettings + , dssVerificationTagOptOut + , dssActiveViewOptOut + , dssVideoActiveViewOptOut + , dssInstreamVideoPlacementAccepted + , dssNielsenOcrOptOut + + -- ** TagSettings + , TagSettings + , tagSettings + , tsDynamicTagEnabled + , tsImageTagEnabled + + -- ** InventoryItem + , InventoryItem + , inventoryItem + , iiPlacementStrategyId + , iiEstimatedClickThroughRate + , iiPricing + , iiKind + , iiAdvertiserId + , iiRfpId + , iiContentCategoryId + , iiInPlan + , iiAccountId + , iiName + , iiAdSlots + , iiNegotiationChannelId + , iiLastModifiedInfo + , iiId + , iiEstimatedConversionRate + , iiProjectId + , iiSubaccountId + , iiOrderId + , iiSiteId + + -- ** ListPopulationRule + , ListPopulationRule + , listPopulationRule + , lprFloodlightActivityName + , lprFloodlightActivityId + , lprListPopulationClauses + + -- ** CreativeRotation + , CreativeRotation + , creativeRotation + , crWeightCalculationStrategy + , crCreativeAssignments + , crCreativeOptimizationConfigurationId + , crType + + -- ** SizesListResponse + , SizesListResponse + , sizesListResponse + , sKind + , sSizes + + -- ** DirectorySite + , DirectorySite + , directorySite + , dsCurrencyId + , dsSettings + , dsInterstitialTagFormats + , dsKind + , dsUrl + , dsIdDimensionValue + , dsInpageTagFormats + , dsActive + , dsName + , dsId + , dsCountryId + , dsContactAssignments + , dsDescription + , dsParentId + + -- ** FloodlightActivitiesListResponse + , FloodlightActivitiesListResponse + , floodlightActivitiesListResponse + , falrNextPageToken + , falrKind + , falrFloodlightActivities + + -- ** CrossDimensionReachReportCompatibleFields + , CrossDimensionReachReportCompatibleFields + , crossDimensionReachReportCompatibleFields + , cdrrcfMetrics + , cdrrcfBreakdown + , cdrrcfKind + , cdrrcfDimensionFilters + , cdrrcfOverlapMetrics + + -- ** FsCommand + , FsCommand + , fsCommand + , fcPositionOption + , fcLeft + , fcWindowHeight + , fcWindowWidth + , fcTop + + -- ** CreativeOptimizationConfiguration + , CreativeOptimizationConfiguration + , creativeOptimizationConfiguration + , cocOptimizationModel + , cocName + , cocOptimizationActivitys + , cocId + + -- ** FloodlightActivityDynamicTag + , FloodlightActivityDynamicTag + , floodlightActivityDynamicTag + , fadtTag + , fadtName + , fadtId + + -- ** PlacementAssignment + , PlacementAssignment + , placementAssignment + , paPlacementId + , paPlacementIdDimensionValue + , paActive + , paSslRequired + + -- ** CreativeFieldValue + , CreativeFieldValue + , creativeFieldValue + , cfvKind + , cfvValue + , cfvId + + -- ** TagData + , TagData + , tagData + , tdClickTag + , tdFormat + , tdCreativeId + , tdAdId + , tdImpressionTag + + -- ** DayPartTargeting + , DayPartTargeting + , dayPartTargeting + , dptDaysOfWeek + , dptHoursOfDay + , dptUserLocalTime + + -- ** RegionsListResponse + , RegionsListResponse + , regionsListResponse + , rlrKind + , rlrRegions + + -- ** DirectorySiteContact + , DirectorySiteContact + , directorySiteContact + , dscEmail + , dscPhone + , dscLastName + , dscKind + , dscAddress + , dscRole + , dscFirstName + , dscId + , dscTitle + , dscType + + -- ** FloodlightActivityGroup + , FloodlightActivityGroup + , floodlightActivityGroup + , fagTagString + , fagFloodlightConfigurationId + , fagKind + , fagAdvertiserId + , fagAdvertiserIdDimensionValue + , fagIdDimensionValue + , fagAccountId + , fagName + , fagId + , fagSubaccountId + , fagType + , fagFloodlightConfigurationIdDimensionValue + + -- ** AdvertiserGroup + , AdvertiserGroup + , advertiserGroup + , agKind + , agAccountId + , agName + , agId + + -- ** CreativeFieldAssignment + , CreativeFieldAssignment + , creativeFieldAssignment + , cfaCreativeFieldId + , cfaCreativeFieldValueId + + -- ** FloodlightConfigurationsListResponse + , FloodlightConfigurationsListResponse + , floodlightConfigurationsListResponse + , fclrKind + , fclrFloodlightConfigurations + + -- ** DimensionValueRequest + , DimensionValueRequest + , dimensionValueRequest + , dvrKind + , dvrEndDate + , dvrFilters + , dvrStartDate + , dvrDimensionName + + -- ** Ad + , Ad + , ad + , adCreativeGroupAssignments + , adGeoTargeting + , adCreativeRotation + , adTechnologyTargeting + , adAudienceSegmentId + , adDayPartTargeting + , adSize + , adStartTime + , adKind + , adClickThroughUrlSuffixProperties + , adCampaignIdDimensionValue + , adAdvertiserId + , adAdvertiserIdDimensionValue + , adSslCompliant + , adCampaignId + , adIdDimensionValue + , adClickThroughUrl + , adDeliverySchedule + , adEventTagOverrides + , adActive + , adAccountId + , adName + , adKeyValueTargetingExpression + , adEndTime + , adCreateInfo + , adLastModifiedInfo + , adId + , adSslRequired + , adComments + , adSubaccountId + , adType + , adRemarketingListExpression + , adDynamicClickTracker + , adCompatibility + , adArchived + , adDefaultClickThroughEventTagProperties + , adPlacementAssignments + + -- ** ObjectFilter + , ObjectFilter + , objectFilter + , ofStatus + , ofKind + , ofObjectIds + + -- ** ReportsConfiguration + , ReportsConfiguration + , reportsConfiguration + , rcExposureToConversionEnabled + , rcReportGenerationTimeZoneId + , rcLookbackConfiguration + + -- ** Size + , Size + , size + , sizHeight + , sizKind + , sizWidth + , sizIab + , sizId + + -- ** InventoryItemsListResponse + , InventoryItemsListResponse + , inventoryItemsListResponse + , iilrInventoryItems + , iilrNextPageToken + , iilrKind + + -- ** Project + , Project + , project + , pTargetClicks + , pClientBillingCode + , pTargetCpmNanos + , pTargetConversions + , pBudget + , pKind + , pAdvertiserId + , pEndDate + , pOverview + , pTargetImpressions + , pStartDate + , pTargetCpcNanos + , pAccountId + , pName + , pLastModifiedInfo + , pId + , pAudienceAgeGroup + , pSubaccountId + , pAudienceGender + , pClientName + , pTargetCpaNanos + + -- ** Subaccount + , Subaccount + , subaccount + , subKind + , subAvailablePermissionIds + , subAccountId + , subName + , subId + + -- ** PlacementStrategiesListResponse + , PlacementStrategiesListResponse + , placementStrategiesListResponse + , pslrPlacementStrategies + , pslrNextPageToken + , pslrKind + + -- ** PricingSchedule + , PricingSchedule + , pricingSchedule + , psTestingStartDate + , psFloodlightActivityId + , psEndDate + , psDisregardOverdelivery + , psStartDate + , psCapCostOption + , psPricingType + , psPricingPeriods + , psFlighted + + -- ** PostalCode + , PostalCode + , postalCode + , pcKind + , pcCode + , pcCountryCode + , pcId + , pcCountryDartId + + -- ** OperatingSystem + , OperatingSystem + , operatingSystem + , osDesktop + , osKind + , osName + , osMobile + , osDartId + + -- ** CitiesListResponse + , CitiesListResponse + , citiesListResponse + , cKind + , cCities + + -- ** ChangeLogsListResponse + , ChangeLogsListResponse + , changeLogsListResponse + , cllrNextPageToken + , cllrKind + , cllrChangeLogs + + -- ** AccountPermissionsListResponse + , AccountPermissionsListResponse + , accountPermissionsListResponse + , aplrKind + , aplrAccountPermissions + + -- ** ClickThroughURLSuffixProperties + , ClickThroughURLSuffixProperties + , clickThroughURLSuffixProperties + , ctuspOverrideInheritedSuffix + , ctuspClickThroughUrlSuffix + + -- ** OperatingSystemVersionsListResponse + , OperatingSystemVersionsListResponse + , operatingSystemVersionsListResponse + , osvlrKind + , osvlrOperatingSystemVersions + + -- ** TargetableRemarketingListsListResponse + , TargetableRemarketingListsListResponse + , targetableRemarketingListsListResponse + , trllrNextPageToken + , trllrKind + , trllrTargetableRemarketingLists + + -- ** Country + , Country + , country + , couKind + , couName + , couCountryCode + , couDartId + , couSslEnabled + + -- ** Pricing + , Pricing + , pricing + , priEndDate + , priStartDate + , priGroupType + , priPricingType + , priFlights + , priCapCostType + + -- ** CustomRichMediaEvents + , CustomRichMediaEvents + , customRichMediaEvents + , crmeKind + , crmeFilteredEventIds + + -- ** AudienceSegmentGroup + , AudienceSegmentGroup + , audienceSegmentGroup + , asgAudienceSegments + , asgName + , asgId + + -- ** Dimension + , Dimension + , dimension + , dKind + , dName + + -- ** Flight + , Flight + , flight + , fRateOrCost + , fEndDate + , fStartDate + , fUnits + + -- ** Activities + , Activities + , activities + , aKind + , aMetricNames + , aFilters + + -- ** AccountsListResponse + , AccountsListResponse + , accountsListResponse + , accNextPageToken + , accAccounts + , accKind + + -- ** Creative + , Creative + , creative + , creConvertFlashToHtml5 + , creBackupImageTargetWindow + , creRenderingIdDimensionValue + , creCustomKeyValues + , creVideoDuration + , creRenderingId + , creThirdPartyBackupImageImpressionsUrl + , creFsCommand + , creAllowScriptAccess + , creHtmlCodeLocked + , creRequiredFlashPluginVersion + , creAuthoringTool + , creSize + , creThirdPartyUrls + , creCounterCustomEvents + , creKind + , creSslOverride + , creHtmlCode + , creAdvertiserId + , creRequiredFlashVersion + , creBackgroundColor + , creAdTagKeys + , creSkippable + , creSslCompliant + , creIdDimensionValue + , creBackupImageReportingLabel + , creCommercialId + , creActive + , creExitCustomEvents + , creAccountId + , creBackupImageClickThroughUrl + , creName + , creOverrideCss + , creVideoDescription + , creClickTags + , creAdParameters + , creVersion + , creLatestTraffickedCreativeId + , creThirdPartyRichMediaImpressionsUrl + , creLastModifiedInfo + , creId + , creStudioAdvertiserId + , creCreativeAssets + , creSubaccountId + , creType + , creTimerCustomEvents + , creStudioCreativeId + , creCompatibility + , creBackupImageFeatures + , creArtworkType + , creArchived + , creCompanionCreatives + , creTotalFileSize + , creStudioTraffickedCreativeId + , creRedirectUrl + , creAutoAdvanceImages + , creCreativeFieldAssignments + + -- ** UserRolePermissionGroupsListResponse + , UserRolePermissionGroupsListResponse + , userRolePermissionGroupsListResponse + , urpglrUserRolePermissionGroups + , urpglrKind + + -- ** DimensionValue + , DimensionValue + , dimensionValue + , dvEtag + , dvKind + , dvValue + , dvMatchType + , dvDimensionName + , dvId + + -- ** SiteContact + , SiteContact + , siteContact + , scEmail + , scPhone + , scLastName + , scAddress + , scFirstName + , scId + , scTitle + , scContactType + + -- ** DateRange + , DateRange + , dateRange + , drKind + , drEndDate + , drStartDate + , drRelativeDateRange + + -- ** AccountUserProfile + , AccountUserProfile + , accountUserProfile + , aupEmail + , aupUserRoleFilter + , aupAdvertiserFilter + , aupUserRoleId + , aupKind + , aupLocale + , aupSiteFilter + , aupTraffickerType + , aupActive + , aupAccountId + , aupName + , aupId + , aupUserAccessType + , aupComments + , aupSubaccountId + , aupCampaignFilter + + -- ** PlacementTag + , PlacementTag + , placementTag + , ptPlacementId + , ptTagDatas + + -- ** RemarketingListsListResponse + , RemarketingListsListResponse + , remarketingListsListResponse + , rllrNextPageToken + , rllrRemarketingLists + , rllrKind + + -- ** SiteSettings + , SiteSettings + , siteSettings + , ssDisableNewCookie + , ssDisableBrandSafeAds + , ssLookbackConfiguration + , ssTagSetting + , ssActiveViewOptOut + , ssCreativeSettings + + -- ** ThirdPartyAuthenticationToken + , ThirdPartyAuthenticationToken + , thirdPartyAuthenticationToken + , tpatValue + , tpatName + + -- ** BrowsersListResponse + , BrowsersListResponse + , browsersListResponse + , blrKind + , blrBrowsers + + -- ** ClickThroughURL + , ClickThroughURL + , clickThroughURL + , ctuDefaultLandingPage + , ctuComputedClickThroughUrl + , ctuCustomClickThroughUrl + , ctuLandingPageId + + -- ** ContentCategoriesListResponse + , ContentCategoriesListResponse + , contentCategoriesListResponse + , cclrNextPageToken + , cclrKind + , cclrContentCategories + + -- ** Report + , Report + , report + , rDelivery + , rEtag + , rOwnerProfileId + , rSchedule + , rPathToConversionCriteria + , rKind + , rFormat + , rReachCriteria + , rLastModifiedTime + , rAccountId + , rName + , rId + , rCrossDimensionReachCriteria + , rType + , rSubAccountId + , rFloodlightCriteria + , rCriteria + , rFileName + + -- ** Campaign + , Campaign + , campaign + , camCreativeOptimizationConfiguration + , camCreativeGroupIds + , camNielsenOcrEnabled + , camKind + , camClickThroughUrlSuffixProperties + , camAdvertiserId + , camEndDate + , camAdvertiserIdDimensionValue + , camIdDimensionValue + , camEventTagOverrides + , camLookbackConfiguration + , camStartDate + , camAccountId + , camComscoreVceEnabled + , camName + , camAdvertiserGroupId + , camBillingInvoiceCode + , camCreateInfo + , camLastModifiedInfo + , camId + , camSubaccountId + , camAdditionalCreativeOptimizationConfigurations + , camExternalId + , camComment + , camAudienceSegmentGroups + , camArchived + , camTraffickerEmails + , camDefaultClickThroughEventTagProperties + + -- ** ReportCompatibleFields + , ReportCompatibleFields + , reportCompatibleFields + , rcfMetrics + , rcfKind + , rcfDimensionFilters + , rcfPivotedActivityMetrics + , rcfDimensions + + -- ** FloodlightReportCompatibleFields + , FloodlightReportCompatibleFields + , floodlightReportCompatibleFields + , frcfMetrics + , frcfKind + , frcfDimensionFilters + , frcfDimensions + + -- ** ContentCategory + , ContentCategory + , contentCategory + , ccKind + , ccAccountId + , ccName + , ccId + + -- ** DimensionValueList + , DimensionValueList + , dimensionValueList + , dvlEtag + , dvlNextPageToken + , dvlKind + , dvlItems + + -- ** CreativesListResponse + , CreativesListResponse + , creativesListResponse + , clrlNextPageToken + , clrlKind + , clrlCreatives + + -- ** UserRolePermissionGroup + , UserRolePermissionGroup + , userRolePermissionGroup + , urpgKind + , urpgName + , urpgId + + -- ** Account + , Account + , account + , aaAccountPermissionIds + , aaMaximumImageSize + , aaCurrencyId + , aaReportsConfiguration + , aaNielsenOcrEnabled + , aaKind + , aaLocale + , aaActive + , aaAvailablePermissionIds + , aaTeaserSizeLimit + , aaComscoreVceEnabled + , aaActiveViewOptOut + , aaName + , aaAccountProfile + , aaId + , aaCountryId + , aaActiveAdsLimitTier + , aaDefaultCreativeSizeId + , aaDescription + + -- ** RemarketingList + , RemarketingList + , remarketingList + , rlListSize + , rlListPopulationRule + , rlLifeSpan + , rlKind + , rlAdvertiserId + , rlAdvertiserIdDimensionValue + , rlActive + , rlAccountId + , rlName + , rlListSource + , rlId + , rlSubaccountId + , rlDescription + + -- ** AccountUserProfilesListResponse + , AccountUserProfilesListResponse + , accountUserProfilesListResponse + , auplrNextPageToken + , auplrAccountUserProfiles + , auplrKind + + -- ** DeliverySchedule + , DeliverySchedule + , deliverySchedule + , dsHardCutoff + , dsPriority + , dsImpressionRatio + , dsFrequencyCap + + -- ** PlacementGroupsListResponse + , PlacementGroupsListResponse + , placementGroupsListResponse + , pglrNextPageToken + , pglrKind + , pglrPlacementGroups + + -- ** OrdersListResponse + , OrdersListResponse + , ordersListResponse + , olrNextPageToken + , olrKind + , olrOrders + + -- ** UserRolePermissionsListResponse + , UserRolePermissionsListResponse + , userRolePermissionsListResponse + , urplrKind + , urplrUserRolePermissions + + -- ** MobileCarrier + , MobileCarrier + , mobileCarrier + , mcKind + , mcName + , mcCountryCode + , mcId + , mcCountryDartId + + -- ** LandingPage + , LandingPage + , landingPage + , lpKind + , lpDefault + , lpUrl + , lpName + , lpId + + -- ** TagSetting + , TagSetting + , tagSetting + , tsKeywordOption + , tsIncludeClickThroughUrls + , tsIncludeClickTracking + , tsAdditionalKeyValues + + -- ** CreativeGroup + , CreativeGroup + , creativeGroup + , cgKind + , cgAdvertiserId + , cgAdvertiserIdDimensionValue + , cgGroupNumber + , cgAccountId + , cgName + , cgId + , cgSubaccountId + + -- ** ConnectionTypesListResponse + , ConnectionTypesListResponse + , connectionTypesListResponse + , ctlrKind + , ctlrConnectionTypes + + -- ** LookbackConfiguration + , LookbackConfiguration + , lookbackConfiguration + , lcClickDuration + , lcPostImpressionActivitiesDuration + + -- ** Metric + , Metric + , metric + , mKind + , mName + + -- ** RemarketingListShare + , RemarketingListShare + , remarketingListShare + , rlsSharedAdvertiserIds + , rlsKind + , rlsRemarketingListId + , rlsSharedAccountIds + + -- ** ReportList + , ReportList + , reportList + , repEtag + , repNextPageToken + , repKind + , repItems + + -- ** EventTagsListResponse + , EventTagsListResponse + , eventTagsListResponse + , etlrKind + , etlrEventTags + + -- ** CampaignCreativeAssociation + , CampaignCreativeAssociation + , campaignCreativeAssociation + , ccaKind + , ccaCreativeId + + -- ** AccountActiveAdSummary + , AccountActiveAdSummary + , accountActiveAdSummary + , aaasAvailableAds + , aaasKind + , aaasAccountId + , aaasActiveAds + , aaasActiveAdsLimitTier + + -- ** OffsetPosition + , OffsetPosition + , offsetPosition + , opLeft + , opTop + + -- ** FloodlightActivityPublisherDynamicTag + , FloodlightActivityPublisherDynamicTag + , floodlightActivityPublisherDynamicTag + , fapdtClickThrough + , fapdtSiteIdDimensionValue + , fapdtDynamicTag + , fapdtDirectorySiteId + , fapdtSiteId + , fapdtViewThrough + + -- ** UserRolesListResponse + , UserRolesListResponse + , userRolesListResponse + , urlrNextPageToken + , urlrKind + , urlrUserRoles + + -- ** AudienceSegment + , AudienceSegment + , audienceSegment + , asName + , asId + , asAllocation + + -- ** City + , City + , city + , citMetroCode + , citRegionCode + , citKind + , citRegionDartId + , citMetroDmaId + , citName + , citCountryCode + , citCountryDartId + , citDartId + + -- ** PopupWindowProperties + , PopupWindowProperties + , popupWindowProperties + , pwpOffset + , pwpDimension + , pwpShowStatusBar + , pwpShowMenuBar + , pwpPositionType + , pwpShowAddressBar + , pwpShowScrollBar + , pwpShowToolBar + , pwpTitle + + -- ** KeyValueTargetingExpression + , KeyValueTargetingExpression + , keyValueTargetingExpression + , kvteExpression + + -- ** DfpSettings + , DfpSettings + , dfpSettings + , dsPubPaidPlacementAccepted + , dsDfpNetworkName + , dsPublisherPortalOnly + , dsProgrammaticPlacementAccepted + , dsDfpNetworkCode + + -- ** AdvertisersListResponse + , AdvertisersListResponse + , advertisersListResponse + , advNextPageToken + , advKind + , advAdvertisers + + -- ** CountriesListResponse + , CountriesListResponse + , countriesListResponse + , couoKind + , couoCountries + + -- ** CompatibleFields + , CompatibleFields + , compatibleFields + , cfReachReportCompatibleFields + , cfCrossDimensionReachReportCompatibleFields + , cfKind + , cfFloodlightReportCompatibleFields + , cfReportCompatibleFields + , cfPathToConversionReportCompatibleFields + + -- ** AccountPermissionGroupsListResponse + , AccountPermissionGroupsListResponse + , accountPermissionGroupsListResponse + , apglrKind + , apglrAccountPermissionGroups + + -- ** PathToConversionReportCompatibleFields + , PathToConversionReportCompatibleFields + , pathToConversionReportCompatibleFields + , ptcrcfMetrics + , ptcrcfKind + , ptcrcfConversionDimensions + , ptcrcfCustomFloodlightVariables + , ptcrcfPerInteractionDimensions + + -- ** CompanionClickThroughOverride + , CompanionClickThroughOverride + , companionClickThroughOverride + , cctoCreativeId + , cctoClickThroughUrl + + -- ** PlatformType + , PlatformType + , platformType + , ptKind + , ptName + , ptId + + -- ** TargetableRemarketingList + , TargetableRemarketingList + , targetableRemarketingList + , trlListSize + , trlLifeSpan + , trlKind + , trlAdvertiserId + , trlAdvertiserIdDimensionValue + , trlActive + , trlAccountId + , trlName + , trlListSource + , trlId + , trlSubaccountId + , trlDescription + + -- ** OperatingSystemVersion + , OperatingSystemVersion + , operatingSystemVersion + , osvMinorVersion + , osvKind + , osvOperatingSystem + , osvMajorVersion + , osvName + , osvId + + -- ** AccountPermission + , AccountPermission + , accountPermission + , apKind + , apAccountProfiles + , apName + , apId + , apLevel + , apPermissionGroupId + + -- ** UserProfile + , UserProfile + , userProfile + , upEtag + , upKind + , upAccountName + , upProfileId + , upUserName + , upAccountId + , upSubAccountName + , upSubAccountId + + -- ** PostalCodesListResponse + , PostalCodesListResponse + , postalCodesListResponse + , pclrKind + , pclrPostalCodes + + -- ** ChangeLog + , ChangeLog + , changeLog + , clUserProfileId + , clObjectType + , clUserProfileName + , clKind + , clObjectId + , clAction + , clTransactionId + , clOldValue + , clAccountId + , clNewValue + , clFieldName + , clId + , clSubaccountId + , clChangeTime + + -- ** OperatingSystemsListResponse + , OperatingSystemsListResponse + , operatingSystemsListResponse + , oslrKind + , oslrOperatingSystems + + -- ** PlacementStrategy + , PlacementStrategy + , placementStrategy + , psKind + , psAccountId + , psName + , psId + + -- ** EventTagOverride + , EventTagOverride + , eventTagOverride + , etoEnabled + , etoId + + -- ** PlatformTypesListResponse + , PlatformTypesListResponse + , platformTypesListResponse + , ptlrKind + , ptlrPlatformTypes + + -- ** FloodlightActivity + , FloodlightActivity + , floodlightActivity + , faCountingMethod + , faTagString + , faSecure + , faExpectedUrl + , faFloodlightActivityGroupTagString + , faFloodlightConfigurationId + , faKind + , faImageTagEnabled + , faAdvertiserId + , faAdvertiserIdDimensionValue + , faSslCompliant + , faIdDimensionValue + , faTagFormat + , faCacheBustingType + , faAccountId + , faName + , faPublisherTags + , faFloodlightActivityGroupId + , faHidden + , faFloodlightActivityGroupType + , faDefaultTags + , faFloodlightActivityGroupName + , faId + , faSslRequired + , faUserDefinedVariableTypes + , faSubaccountId + , faNotes + , faFloodlightConfigurationIdDimensionValue + + -- ** Advertiser + , Advertiser + , advertiser + , advdOriginalFloodlightConfigurationId + , advdStatus + , advdFloodlightConfigurationId + , advdKind + , advdSuspended + , advdIdDimensionValue + , advdAccountId + , advdDefaultEmail + , advdName + , advdAdvertiserGroupId + , advdDefaultClickThroughEventTagId + , advdId + , advdSubaccountId + , advdFloodlightConfigurationIdDimensionValue + , advdClickThroughUrlSuffix + + -- ** AccountPermissionGroup + , AccountPermissionGroup + , accountPermissionGroup + , apgKind + , apgName + , apgId + + -- ** TargetWindow + , TargetWindow + , targetWindow + , twCustomHtml + , twTargetWindowOption + + -- ** LastModifiedInfo + , LastModifiedInfo + , lastModifiedInfo + , lmiTime + + -- ** UserRole + , UserRole + , userRole + , urParentUserRoleId + , urKind + , urDefaultUserRole + , urAccountId + , urName + , urId + , urPermissions + , urSubaccountId + + -- ** Region + , Region + , region + , regRegionCode + , regKind + , regName + , regCountryCode + , regCountryDartId + , regDartId + + -- ** DirectorySitesListResponse + , DirectorySitesListResponse + , directorySitesListResponse + , dslrNextPageToken + , dslrKind + , dslrDirectorySites + + -- ** CreativeFieldValuesListResponse + , CreativeFieldValuesListResponse + , creativeFieldValuesListResponse + , cfvlrNextPageToken + , cfvlrKind + , cfvlrCreativeFieldValues + + -- ** DimensionFilter + , DimensionFilter + , dimensionFilter + , dfKind + , dfValue + , dfDimensionName + + -- ** PricingSchedulePricingPeriod + , PricingSchedulePricingPeriod + , pricingSchedulePricingPeriod + , psppEndDate + , psppRateOrCostNanos + , psppStartDate + , psppUnits + , psppPricingComment + + -- ** FloodlightConfiguration + , FloodlightConfiguration + , floodlightConfiguration + , fcTagSettings + , fcExposureToConversionEnabled + , fcInAppAttributionTrackingEnabled + , fcThirdPartyAuthenticationTokens + , fcKind + , fcAdvertiserId + , fcAnalyticsDataSharingEnabled + , fcAdvertiserIdDimensionValue + , fcIdDimensionValue + , fcLookbackConfiguration + , fcAccountId + , fcId + , fcSslRequired + , fcNaturalSearchConversionAttributionOption + , fcUserDefinedVariableConfigurations + , fcSubaccountId + , fcFirstDayOfWeek + , fcOmnitureSettings + , fcStandardVariableTypes + + -- ** AdvertiserGroupsListResponse + , AdvertiserGroupsListResponse + , advertiserGroupsListResponse + , aglrNextPageToken + , aglrKind + , aglrAdvertiserGroups + + -- ** FloodlightActivityGroupsListResponse + , FloodlightActivityGroupsListResponse + , floodlightActivityGroupsListResponse + , faglrNextPageToken + , faglrKind + , faglrFloodlightActivityGroups + + -- ** RichMediaExitOverride + , RichMediaExitOverride + , richMediaExitOverride + , rmeoUseCustomExitUrl + , rmeoExitId + , rmeoCustomExitUrl + + -- ** CreativeAssignment + , CreativeAssignment + , creativeAssignment + , caCreativeGroupAssignments + , caStartTime + , caWeight + , caRichMediaExitOverrides + , caSslCompliant + , caCreativeId + , caClickThroughUrl + , caApplyEventTags + , caActive + , caSequence + , caEndTime + , caCompanionCreativeOverrides + , caCreativeIdDimensionValue + + -- ** UserProfileList + , UserProfileList + , userProfileList + , uplEtag + , uplKind + , uplItems + + -- ** DirectorySiteContactsListResponse + , DirectorySiteContactsListResponse + , directorySiteContactsListResponse + , dsclrNextPageToken + , dsclrKind + , dsclrDirectorySiteContacts + + -- ** PlacementsGenerateTagsResponse + , PlacementsGenerateTagsResponse + , placementsGenerateTagsResponse + , pgtrKind + , pgtrPlacementTags + + -- ** CreativeFieldsListResponse + , CreativeFieldsListResponse + , creativeFieldsListResponse + , cflrNextPageToken + , cflrKind + , cflrCreativeFields + + -- ** OrderDocumentsListResponse + , OrderDocumentsListResponse + , orderDocumentsListResponse + , odlrNextPageToken + , odlrKind + , odlrOrderDocuments + + -- ** Site + , Site + , site + , sitKind + , sitKeyName + , sitSiteContacts + , sitSiteSettings + , sitIdDimensionValue + , sitDirectorySiteIdDimensionValue + , sitAccountId + , sitName + , sitDirectorySiteId + , sitId + , sitSubaccountId + , sitApproved + + -- ** SortedDimension + , SortedDimension + , sortedDimension + , sdKind + , sdSortOrder + , sdName + + -- ** Recipient + , Recipient + , recipient + , recEmail + , recKind + , recDeliveryType + + -- ** PlacementsListResponse + , PlacementsListResponse + , placementsListResponse + , plaNextPageToken + , plaKind + , plaPlacements + + -- ** CreativeAsset + , CreativeAsset + , creativeAsset + , cZIndex + , cPushdown + , cVideoDuration + , cOriginalBackup + , cWindowMode + , cFlashVersion + , cPushdownDuration + , cSize + , cVerticallyLocked + , cOffset + , cStreamingServingUrl + , cZipFilesize + , cTransparency + , cHideSelectionBoxes + , cSslCompliant + , cFileSize + , cAssetIdentifier + , cDurationType + , cProgressiveServingUrl + , cActive + , cRole + , cMimeType + , cPositionTopUnit + , cPositionLeftUnit + , cAlignment + , cExpandedDimension + , cZipFilename + , cActionScript3 + , cDisplayType + , cChildAssetType + , cCollapsedSize + , cId + , cBitRate + , cCustomStartTimeValue + , cStartTimeType + , cDuration + , cArtworkType + , cHideFlashObjects + , cDetectedFeatures + , cBackupImageExit + , cPosition + , cHorizontallyLocked + + -- ** MetrosListResponse + , MetrosListResponse + , metrosListResponse + , mlrKind + , mlrMetros + + -- ** PlacementGroup + , PlacementGroup + , placementGroup + , pgPlacementStrategyId + , pgSiteIdDimensionValue + , pgPricingSchedule + , pgKind + , pgCampaignIdDimensionValue + , pgAdvertiserId + , pgAdvertiserIdDimensionValue + , pgCampaignId + , pgIdDimensionValue + , pgPlacementGroupType + , pgContentCategoryId + , pgDirectorySiteIdDimensionValue + , pgAccountId + , pgName + , pgDirectorySiteId + , pgCreateInfo + , pgChildPlacementIds + , pgLastModifiedInfo + , pgId + , pgPrimaryPlacementId + , pgSubaccountId + , pgExternalId + , pgComment + , pgPrimaryPlacementIdDimensionValue + , pgSiteId + , pgArchived + + -- ** CreativeGroupsListResponse + , CreativeGroupsListResponse + , creativeGroupsListResponse + , cglrCreativeGroups + , cglrNextPageToken + , cglrKind + + -- ** EventTag + , EventTag + , eventTag + , etStatus + , etExcludeFromAdxRequests + , etEnabledByDefault + , etKind + , etCampaignIdDimensionValue + , etAdvertiserId + , etUrl + , etAdvertiserIdDimensionValue + , etSslCompliant + , etCampaignId + , etAccountId + , etName + , etUrlEscapeLevels + , etSiteIds + , etId + , etSubaccountId + , etType + , etSiteFilterType + + -- ** CampaignCreativeAssociationsListResponse + , CampaignCreativeAssociationsListResponse + , campaignCreativeAssociationsListResponse + , ccalrCampaignCreativeAssociations + , ccalrNextPageToken + , ccalrKind + + -- ** CreativeAssetId + , CreativeAssetId + , creativeAssetId + , caiName + , caiType + + -- ** FrequencyCap + , FrequencyCap + , frequencyCap + , fcImpressions + , fcDuration + + -- ** CreativeSettings + , CreativeSettings + , creativeSettings + , csIFrameHeader + , csIFrameFooter + + -- ** UserDefinedVariableConfiguration + , UserDefinedVariableConfiguration + , userDefinedVariableConfiguration + , udvcReportName + , udvcDataType + , udvcVariableType + + -- ** Order + , Order + , order + , oSellerOrderId + , oSellerOrganizationName + , oKind + , oAdvertiserId + , oPlanningTermId + , oAccountId + , oName + , oSiteNames + , oLastModifiedInfo + , oBuyerOrganizationName + , oId + , oBuyerInvoiceId + , oComments + , oProjectId + , oSubaccountId + , oNotes + , oContacts + , oSiteId + , oTermsAndConditions + , oApproverUserProfileIds + + -- ** OmnitureSettings + , OmnitureSettings + , omnitureSettings + , osOmnitureCostDataEnabled + , osOmnitureIntegrationEnabled + + -- ** ConnectionType + , ConnectionType + , connectionType + , conKind + , conName + , conId + + -- ** CreativeAssetMetadata + , CreativeAssetMetadata + , creativeAssetMetadata + , camaKind + , camaAssetIdentifier + , camaClickTags + , camaWarnedValidationRules + , camaDetectedFeatures + + -- ** UserRolePermission + , UserRolePermission + , userRolePermission + , urpKind + , urpAvailability + , urpName + , urpId + , urpPermissionGroupId + + -- ** MobileCarriersListResponse + , MobileCarriersListResponse + , mobileCarriersListResponse + , mclrMobileCarriers + , mclrKind + + -- ** LandingPagesListResponse + , LandingPagesListResponse + , landingPagesListResponse + , lplrLandingPages + , lplrKind + + -- ** File + , File + , file + , fStatus + , fEtag + , fKind + , fUrls + , fReportId + , fDateRange + , fFormat + , fLastModifiedTime + , fId + , fFileName + + -- ** OrderContact + , OrderContact + , orderContact + , ocSignatureUserProfileId + , ocContactName + , ocContactTitle + , ocContactType + , ocContactInfo + + -- ** SitesListResponse + , SitesListResponse + , sitesListResponse + , slrlNextPageToken + , slrlKind + , slrlSites + + -- ** ThirdPartyTrackingURL + , ThirdPartyTrackingURL + , thirdPartyTrackingURL + , tptuUrl + , tptuThirdPartyUrlType + + -- ** Placement + , Placement + , placement + , ppStatus + , ppPlacementStrategyId + , ppTagFormats + , ppSiteIdDimensionValue + , ppPricingSchedule + , ppSize + , ppKind + , ppKeyName + , ppCampaignIdDimensionValue + , ppAdvertiserId + , ppAdvertiserIdDimensionValue + , ppCampaignId + , ppIdDimensionValue + , ppPrimary + , ppLookbackConfiguration + , ppTagSetting + , ppContentCategoryId + , ppDirectorySiteIdDimensionValue + , ppAccountId + , ppPaymentSource + , ppName + , ppDirectorySiteId + , ppCreateInfo + , ppLastModifiedInfo + , ppId + , ppSslRequired + , ppSubaccountId + , ppPlacementGroupIdDimensionValue + , ppExternalId + , ppPlacementGroupId + , ppComment + , ppSiteId + , ppCompatibility + , ppArchived + , ppPaymentApproved + , ppPublisherUpdateInfo + + -- ** DirectorySiteContactAssignment + , DirectorySiteContactAssignment + , directorySiteContactAssignment + , dscaVisibility + , dscaContactId + + -- ** FloodlightActivitiesGenerateTagResponse + , FloodlightActivitiesGenerateTagResponse + , floodlightActivitiesGenerateTagResponse + , fagtrFloodlightActivityTag + , fagtrKind + + -- ** ListTargetingExpression + , ListTargetingExpression + , listTargetingExpression + , lteExpression + + -- ** OrderDocument + , OrderDocument + , orderDocument + , odSigned + , odKind + , odAdvertiserId + , odLastSentTime + , odAmendedOrderDocumentId + , odLastSentRecipients + , odEffectiveDate + , odApprovedByUserProfileIds + , odAccountId + , odId + , odProjectId + , odTitle + , odSubaccountId + , odType + , odOrderId + , odCancelled + , odCreatedInfo + + -- ** AdSlot + , AdSlot + , adSlot + , aHeight + , aPaymentSourceType + , aLinkedPlacementId + , aWidth + , aPrimary + , aName + , aComment + , aCompatibility + + -- ** CreativeField + , CreativeField + , creativeField + , cffKind + , cffAdvertiserId + , cffAdvertiserIdDimensionValue + , cffAccountId + , cffName + , cffId + , cffSubaccountId + + -- ** DefaultClickThroughEventTagProperties + , DefaultClickThroughEventTagProperties + , defaultClickThroughEventTagProperties + , dctetpOverrideInheritedEventTag + , dctetpDefaultClickThroughEventTagId + + -- ** Metro + , Metro + , metro + , metMetroCode + , metKind + , metName + , metCountryCode + , metDmaId + , metCountryDartId + , metDartId + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude +import Network.Google.Resource.DFAReporting.AccountActiveAdSummaries.Get +import Network.Google.Resource.DFAReporting.AccountPermissionGroups.Get +import Network.Google.Resource.DFAReporting.AccountPermissionGroups.List +import Network.Google.Resource.DFAReporting.AccountPermissions.Get +import Network.Google.Resource.DFAReporting.AccountPermissions.List +import Network.Google.Resource.DFAReporting.Accounts.Get +import Network.Google.Resource.DFAReporting.Accounts.List +import Network.Google.Resource.DFAReporting.Accounts.Patch +import Network.Google.Resource.DFAReporting.Accounts.Update +import Network.Google.Resource.DFAReporting.AccountUserProfiles.Get +import Network.Google.Resource.DFAReporting.AccountUserProfiles.Insert +import Network.Google.Resource.DFAReporting.AccountUserProfiles.List +import Network.Google.Resource.DFAReporting.AccountUserProfiles.Patch +import Network.Google.Resource.DFAReporting.AccountUserProfiles.Update +import Network.Google.Resource.DFAReporting.Ads.Get +import Network.Google.Resource.DFAReporting.Ads.Insert +import Network.Google.Resource.DFAReporting.Ads.List +import Network.Google.Resource.DFAReporting.Ads.Patch +import Network.Google.Resource.DFAReporting.Ads.Update +import Network.Google.Resource.DFAReporting.AdvertiserGroups.Delete +import Network.Google.Resource.DFAReporting.AdvertiserGroups.Get +import Network.Google.Resource.DFAReporting.AdvertiserGroups.Insert +import Network.Google.Resource.DFAReporting.AdvertiserGroups.List +import Network.Google.Resource.DFAReporting.AdvertiserGroups.Patch +import Network.Google.Resource.DFAReporting.AdvertiserGroups.Update +import Network.Google.Resource.DFAReporting.Advertisers.Get +import Network.Google.Resource.DFAReporting.Advertisers.Insert +import Network.Google.Resource.DFAReporting.Advertisers.List +import Network.Google.Resource.DFAReporting.Advertisers.Patch +import Network.Google.Resource.DFAReporting.Advertisers.Update +import Network.Google.Resource.DFAReporting.Browsers.List +import Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.Insert +import Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.List +import Network.Google.Resource.DFAReporting.Campaigns.Get +import Network.Google.Resource.DFAReporting.Campaigns.Insert +import Network.Google.Resource.DFAReporting.Campaigns.List +import Network.Google.Resource.DFAReporting.Campaigns.Patch +import Network.Google.Resource.DFAReporting.Campaigns.Update +import Network.Google.Resource.DFAReporting.ChangeLogs.Get +import Network.Google.Resource.DFAReporting.ChangeLogs.List +import Network.Google.Resource.DFAReporting.Cities.List +import Network.Google.Resource.DFAReporting.ConnectionTypes.Get +import Network.Google.Resource.DFAReporting.ConnectionTypes.List +import Network.Google.Resource.DFAReporting.ContentCategories.Delete +import Network.Google.Resource.DFAReporting.ContentCategories.Get +import Network.Google.Resource.DFAReporting.ContentCategories.Insert +import Network.Google.Resource.DFAReporting.ContentCategories.List +import Network.Google.Resource.DFAReporting.ContentCategories.Patch +import Network.Google.Resource.DFAReporting.ContentCategories.Update +import Network.Google.Resource.DFAReporting.Countries.Get +import Network.Google.Resource.DFAReporting.Countries.List +import Network.Google.Resource.DFAReporting.CreativeAssets.Insert +import Network.Google.Resource.DFAReporting.CreativeFields.Delete +import Network.Google.Resource.DFAReporting.CreativeFields.Get +import Network.Google.Resource.DFAReporting.CreativeFields.Insert +import Network.Google.Resource.DFAReporting.CreativeFields.List +import Network.Google.Resource.DFAReporting.CreativeFields.Patch +import Network.Google.Resource.DFAReporting.CreativeFields.Update +import Network.Google.Resource.DFAReporting.CreativeFieldValues.Delete +import Network.Google.Resource.DFAReporting.CreativeFieldValues.Get +import Network.Google.Resource.DFAReporting.CreativeFieldValues.Insert +import Network.Google.Resource.DFAReporting.CreativeFieldValues.List +import Network.Google.Resource.DFAReporting.CreativeFieldValues.Patch +import Network.Google.Resource.DFAReporting.CreativeFieldValues.Update +import Network.Google.Resource.DFAReporting.CreativeGroups.Get +import Network.Google.Resource.DFAReporting.CreativeGroups.Insert +import Network.Google.Resource.DFAReporting.CreativeGroups.List +import Network.Google.Resource.DFAReporting.CreativeGroups.Patch +import Network.Google.Resource.DFAReporting.CreativeGroups.Update +import Network.Google.Resource.DFAReporting.Creatives.Get +import Network.Google.Resource.DFAReporting.Creatives.Insert +import Network.Google.Resource.DFAReporting.Creatives.List +import Network.Google.Resource.DFAReporting.Creatives.Patch +import Network.Google.Resource.DFAReporting.Creatives.Update +import Network.Google.Resource.DFAReporting.DimensionValues.Query +import Network.Google.Resource.DFAReporting.DirectorySiteContacts.Get +import Network.Google.Resource.DFAReporting.DirectorySiteContacts.List +import Network.Google.Resource.DFAReporting.DirectorySites.Get +import Network.Google.Resource.DFAReporting.DirectorySites.Insert +import Network.Google.Resource.DFAReporting.DirectorySites.List +import Network.Google.Resource.DFAReporting.EventTags.Delete +import Network.Google.Resource.DFAReporting.EventTags.Get +import Network.Google.Resource.DFAReporting.EventTags.Insert +import Network.Google.Resource.DFAReporting.EventTags.List +import Network.Google.Resource.DFAReporting.EventTags.Patch +import Network.Google.Resource.DFAReporting.EventTags.Update +import Network.Google.Resource.DFAReporting.Files.Get +import Network.Google.Resource.DFAReporting.Files.List +import Network.Google.Resource.DFAReporting.FloodlightActivities.Delete +import Network.Google.Resource.DFAReporting.FloodlightActivities.Generatetag +import Network.Google.Resource.DFAReporting.FloodlightActivities.Get +import Network.Google.Resource.DFAReporting.FloodlightActivities.Insert +import Network.Google.Resource.DFAReporting.FloodlightActivities.List +import Network.Google.Resource.DFAReporting.FloodlightActivities.Patch +import Network.Google.Resource.DFAReporting.FloodlightActivities.Update +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Delete +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Get +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Insert +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.List +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Patch +import Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Update +import Network.Google.Resource.DFAReporting.FloodlightConfigurations.Get +import Network.Google.Resource.DFAReporting.FloodlightConfigurations.List +import Network.Google.Resource.DFAReporting.FloodlightConfigurations.Patch +import Network.Google.Resource.DFAReporting.FloodlightConfigurations.Update +import Network.Google.Resource.DFAReporting.InventoryItems.Get +import Network.Google.Resource.DFAReporting.InventoryItems.List +import Network.Google.Resource.DFAReporting.LandingPages.Delete +import Network.Google.Resource.DFAReporting.LandingPages.Get +import Network.Google.Resource.DFAReporting.LandingPages.Insert +import Network.Google.Resource.DFAReporting.LandingPages.List +import Network.Google.Resource.DFAReporting.LandingPages.Patch +import Network.Google.Resource.DFAReporting.LandingPages.Update +import Network.Google.Resource.DFAReporting.Metros.List +import Network.Google.Resource.DFAReporting.MobileCarriers.Get +import Network.Google.Resource.DFAReporting.MobileCarriers.List +import Network.Google.Resource.DFAReporting.OperatingSystems.Get +import Network.Google.Resource.DFAReporting.OperatingSystems.List +import Network.Google.Resource.DFAReporting.OperatingSystemVersions.Get +import Network.Google.Resource.DFAReporting.OperatingSystemVersions.List +import Network.Google.Resource.DFAReporting.OrderDocuments.Get +import Network.Google.Resource.DFAReporting.OrderDocuments.List +import Network.Google.Resource.DFAReporting.Orders.Get +import Network.Google.Resource.DFAReporting.Orders.List +import Network.Google.Resource.DFAReporting.PlacementGroups.Get +import Network.Google.Resource.DFAReporting.PlacementGroups.Insert +import Network.Google.Resource.DFAReporting.PlacementGroups.List +import Network.Google.Resource.DFAReporting.PlacementGroups.Patch +import Network.Google.Resource.DFAReporting.PlacementGroups.Update +import Network.Google.Resource.DFAReporting.Placements.Generatetags +import Network.Google.Resource.DFAReporting.Placements.Get +import Network.Google.Resource.DFAReporting.Placements.Insert +import Network.Google.Resource.DFAReporting.Placements.List +import Network.Google.Resource.DFAReporting.Placements.Patch +import Network.Google.Resource.DFAReporting.Placements.Update +import Network.Google.Resource.DFAReporting.PlacementStrategies.Delete +import Network.Google.Resource.DFAReporting.PlacementStrategies.Get +import Network.Google.Resource.DFAReporting.PlacementStrategies.Insert +import Network.Google.Resource.DFAReporting.PlacementStrategies.List +import Network.Google.Resource.DFAReporting.PlacementStrategies.Patch +import Network.Google.Resource.DFAReporting.PlacementStrategies.Update +import Network.Google.Resource.DFAReporting.PlatformTypes.Get +import Network.Google.Resource.DFAReporting.PlatformTypes.List +import Network.Google.Resource.DFAReporting.PostalCodes.Get +import Network.Google.Resource.DFAReporting.PostalCodes.List +import Network.Google.Resource.DFAReporting.Projects.Get +import Network.Google.Resource.DFAReporting.Projects.List +import Network.Google.Resource.DFAReporting.Regions.List +import Network.Google.Resource.DFAReporting.RemarketingLists.Get +import Network.Google.Resource.DFAReporting.RemarketingLists.Insert +import Network.Google.Resource.DFAReporting.RemarketingLists.List +import Network.Google.Resource.DFAReporting.RemarketingLists.Patch +import Network.Google.Resource.DFAReporting.RemarketingLists.Update +import Network.Google.Resource.DFAReporting.RemarketingListShares.Get +import Network.Google.Resource.DFAReporting.RemarketingListShares.Patch +import Network.Google.Resource.DFAReporting.RemarketingListShares.Update +import Network.Google.Resource.DFAReporting.Reports.CompatibleFields.Query +import Network.Google.Resource.DFAReporting.Reports.Delete +import Network.Google.Resource.DFAReporting.Reports.Files.Get +import Network.Google.Resource.DFAReporting.Reports.Files.List +import Network.Google.Resource.DFAReporting.Reports.Get +import Network.Google.Resource.DFAReporting.Reports.Insert +import Network.Google.Resource.DFAReporting.Reports.List +import Network.Google.Resource.DFAReporting.Reports.Patch +import Network.Google.Resource.DFAReporting.Reports.Run +import Network.Google.Resource.DFAReporting.Reports.Update +import Network.Google.Resource.DFAReporting.Sites.Get +import Network.Google.Resource.DFAReporting.Sites.Insert +import Network.Google.Resource.DFAReporting.Sites.List +import Network.Google.Resource.DFAReporting.Sites.Patch +import Network.Google.Resource.DFAReporting.Sites.Update +import Network.Google.Resource.DFAReporting.Sizes.Get +import Network.Google.Resource.DFAReporting.Sizes.Insert +import Network.Google.Resource.DFAReporting.Sizes.List +import Network.Google.Resource.DFAReporting.Subaccounts.Get +import Network.Google.Resource.DFAReporting.Subaccounts.Insert +import Network.Google.Resource.DFAReporting.Subaccounts.List +import Network.Google.Resource.DFAReporting.Subaccounts.Patch +import Network.Google.Resource.DFAReporting.Subaccounts.Update +import Network.Google.Resource.DFAReporting.TargetableRemarketingLists.Get +import Network.Google.Resource.DFAReporting.TargetableRemarketingLists.List +import Network.Google.Resource.DFAReporting.UserProfiles.Get +import Network.Google.Resource.DFAReporting.UserProfiles.List +import Network.Google.Resource.DFAReporting.UserRolePermissionGroups.Get +import Network.Google.Resource.DFAReporting.UserRolePermissionGroups.List +import Network.Google.Resource.DFAReporting.UserRolePermissions.Get +import Network.Google.Resource.DFAReporting.UserRolePermissions.List +import Network.Google.Resource.DFAReporting.UserRoles.Delete +import Network.Google.Resource.DFAReporting.UserRoles.Get +import Network.Google.Resource.DFAReporting.UserRoles.Insert +import Network.Google.Resource.DFAReporting.UserRoles.List +import Network.Google.Resource.DFAReporting.UserRoles.Patch +import Network.Google.Resource.DFAReporting.UserRoles.Update + +{- $resources +TODO +-} + +type DFAReportingAPI = + InventoryItems :<|> PlacementStrategies :<|> + CampaignCreativeAssociations + :<|> CreativeGroups + :<|> MobileCarriers + :<|> LandingPages + :<|> RemarketingListShares + :<|> AccountActiveAdSummaries + :<|> UserRolePermissionGroups + :<|> RemarketingLists + :<|> Accounts + :<|> Reports + :<|> Campaigns + :<|> AccountUserProfiles + :<|> Creatives + :<|> DimensionValues + :<|> FloodlightConfigurations + :<|> Regions + :<|> FloodlightActivities + :<|> AccountPermissionGroups + :<|> Advertisers + :<|> Countries + :<|> UserRoles + :<|> UserProfiles + :<|> OperatingSystemVersions + :<|> AccountPermissions + :<|> Cities + :<|> ChangeLogs + :<|> TargetableRemarketingLists + :<|> PlatformTypes + :<|> ContentCategories + :<|> Browsers + :<|> Placements + :<|> Metros + :<|> CreativeFields + :<|> OrderDocuments + :<|> Files + :<|> ConnectionTypes + :<|> PlacementGroups + :<|> EventTags + :<|> Orders + :<|> UserRolePermissions + :<|> CreativeAssets + :<|> Sites + :<|> OperatingSystems + :<|> PostalCodes + :<|> Sizes + :<|> Ads + :<|> Projects + :<|> Subaccounts + :<|> AdvertiserGroups + :<|> CreativeFieldValues + :<|> DirectorySiteContacts + :<|> DirectorySites + :<|> FloodlightActivityGroups + +dFAReportingAPI :: Proxy DFAReportingAPI +dFAReportingAPI = Proxy diff --git a/gogol-dfareporting/gen/Network/Google/DFAReporting/Types.hs b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types.hs new file mode 100644 index 000000000..93c6c554b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types.hs @@ -0,0 +1,1884 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DFAReporting.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DFAReporting.Types + ( + -- * Service URL + dFAReportingURL + + -- * Browser + , Browser + , browser + , bMinorVersion + , bKind + , bBrowserVersionId + , bMajorVersion + , bName + , bDartId + + -- * CampaignsListResponse + , CampaignsListResponse + , campaignsListResponse + , clrNextPageToken + , clrCampaigns + , clrKind + + -- * OptimizationActivity + , OptimizationActivity + , optimizationActivity + , oaWeight + , oaFloodlightActivityId + , oaFloodlightActivityIdDimensionValue + + -- * FileList + , FileList + , fileList + , flEtag + , flNextPageToken + , flKind + , flItems + + -- * ClickTag + , ClickTag + , clickTag + , ctValue + , ctName + , ctEventName + + -- * ListPopulationClause + , ListPopulationClause + , listPopulationClause + , lpcTerms + + -- * GeoTargeting + , GeoTargeting + , geoTargeting + , gtRegions + , gtCountries + , gtCities + , gtMetros + , gtExcludeCountries + , gtPostalCodes + + -- * CreativeCustomEvent + , CreativeCustomEvent + , creativeCustomEvent + , cceAdvertiserCustomEventType + , cceAdvertiserCustomEventName + , cceExitUrl + , cceTargetType + , ccePopupWindowProperties + , cceVideoReportingId + , cceId + , cceArtworkLabel + , cceArtworkType + + -- * ReachReportCompatibleFields + , ReachReportCompatibleFields + , reachReportCompatibleFields + , rrcfMetrics + , rrcfReachByFrequencyMetrics + , rrcfKind + , rrcfDimensionFilters + , rrcfPivotedActivityMetrics + , rrcfDimensions + + -- * CreativeGroupAssignment + , CreativeGroupAssignment + , creativeGroupAssignment + , cgaCreativeGroupNumber + , cgaCreativeGroupId + + -- * AdsListResponse + , AdsListResponse + , adsListResponse + , alrNextPageToken + , alrKind + , alrAds + + -- * ListPopulationTerm + , ListPopulationTerm + , listPopulationTerm + , lptOperator + , lptValue + , lptVariableFriendlyName + , lptNegation + , lptVariableName + , lptRemarketingListId + , lptType + , lptContains + + -- * SubaccountsListResponse + , SubaccountsListResponse + , subaccountsListResponse + , slrNextPageToken + , slrKind + , slrSubaccounts + + -- * TechnologyTargeting + , TechnologyTargeting + , technologyTargeting + , ttMobileCarriers + , ttOperatingSystemVersions + , ttPlatformTypes + , ttBrowsers + , ttConnectionTypes + , ttOperatingSystems + + -- * ProjectsListResponse + , ProjectsListResponse + , projectsListResponse + , plrNextPageToken + , plrKind + , plrProjects + + -- * DirectorySiteSettings + , DirectorySiteSettings + , directorySiteSettings + , dssInterstitialPlacementAccepted + , dssDfpSettings + , dssVerificationTagOptOut + , dssActiveViewOptOut + , dssVideoActiveViewOptOut + , dssInstreamVideoPlacementAccepted + , dssNielsenOcrOptOut + + -- * TagSettings + , TagSettings + , tagSettings + , tsDynamicTagEnabled + , tsImageTagEnabled + + -- * InventoryItem + , InventoryItem + , inventoryItem + , iiPlacementStrategyId + , iiEstimatedClickThroughRate + , iiPricing + , iiKind + , iiAdvertiserId + , iiRfpId + , iiContentCategoryId + , iiInPlan + , iiAccountId + , iiName + , iiAdSlots + , iiNegotiationChannelId + , iiLastModifiedInfo + , iiId + , iiEstimatedConversionRate + , iiProjectId + , iiSubaccountId + , iiOrderId + , iiSiteId + + -- * ListPopulationRule + , ListPopulationRule + , listPopulationRule + , lprFloodlightActivityName + , lprFloodlightActivityId + , lprListPopulationClauses + + -- * CreativeRotation + , CreativeRotation + , creativeRotation + , crWeightCalculationStrategy + , crCreativeAssignments + , crCreativeOptimizationConfigurationId + , crType + + -- * SizesListResponse + , SizesListResponse + , sizesListResponse + , sKind + , sSizes + + -- * DirectorySite + , DirectorySite + , directorySite + , dsCurrencyId + , dsSettings + , dsInterstitialTagFormats + , dsKind + , dsUrl + , dsIdDimensionValue + , dsInpageTagFormats + , dsActive + , dsName + , dsId + , dsCountryId + , dsContactAssignments + , dsDescription + , dsParentId + + -- * FloodlightActivitiesListResponse + , FloodlightActivitiesListResponse + , floodlightActivitiesListResponse + , falrNextPageToken + , falrKind + , falrFloodlightActivities + + -- * CrossDimensionReachReportCompatibleFields + , CrossDimensionReachReportCompatibleFields + , crossDimensionReachReportCompatibleFields + , cdrrcfMetrics + , cdrrcfBreakdown + , cdrrcfKind + , cdrrcfDimensionFilters + , cdrrcfOverlapMetrics + + -- * FsCommand + , FsCommand + , fsCommand + , fcPositionOption + , fcLeft + , fcWindowHeight + , fcWindowWidth + , fcTop + + -- * CreativeOptimizationConfiguration + , CreativeOptimizationConfiguration + , creativeOptimizationConfiguration + , cocOptimizationModel + , cocName + , cocOptimizationActivitys + , cocId + + -- * FloodlightActivityDynamicTag + , FloodlightActivityDynamicTag + , floodlightActivityDynamicTag + , fadtTag + , fadtName + , fadtId + + -- * PlacementAssignment + , PlacementAssignment + , placementAssignment + , paPlacementId + , paPlacementIdDimensionValue + , paActive + , paSslRequired + + -- * CreativeFieldValue + , CreativeFieldValue + , creativeFieldValue + , cfvKind + , cfvValue + , cfvId + + -- * TagData + , TagData + , tagData + , tdClickTag + , tdFormat + , tdCreativeId + , tdAdId + , tdImpressionTag + + -- * DayPartTargeting + , DayPartTargeting + , dayPartTargeting + , dptDaysOfWeek + , dptHoursOfDay + , dptUserLocalTime + + -- * RegionsListResponse + , RegionsListResponse + , regionsListResponse + , rlrKind + , rlrRegions + + -- * DirectorySiteContact + , DirectorySiteContact + , directorySiteContact + , dscEmail + , dscPhone + , dscLastName + , dscKind + , dscAddress + , dscRole + , dscFirstName + , dscId + , dscTitle + , dscType + + -- * FloodlightActivityGroup + , FloodlightActivityGroup + , floodlightActivityGroup + , fagTagString + , fagFloodlightConfigurationId + , fagKind + , fagAdvertiserId + , fagAdvertiserIdDimensionValue + , fagIdDimensionValue + , fagAccountId + , fagName + , fagId + , fagSubaccountId + , fagType + , fagFloodlightConfigurationIdDimensionValue + + -- * AdvertiserGroup + , AdvertiserGroup + , advertiserGroup + , agKind + , agAccountId + , agName + , agId + + -- * CreativeFieldAssignment + , CreativeFieldAssignment + , creativeFieldAssignment + , cfaCreativeFieldId + , cfaCreativeFieldValueId + + -- * FloodlightConfigurationsListResponse + , FloodlightConfigurationsListResponse + , floodlightConfigurationsListResponse + , fclrKind + , fclrFloodlightConfigurations + + -- * DimensionValueRequest + , DimensionValueRequest + , dimensionValueRequest + , dvrKind + , dvrEndDate + , dvrFilters + , dvrStartDate + , dvrDimensionName + + -- * Ad + , Ad + , ad + , adCreativeGroupAssignments + , adGeoTargeting + , adCreativeRotation + , adTechnologyTargeting + , adAudienceSegmentId + , adDayPartTargeting + , adSize + , adStartTime + , adKind + , adClickThroughUrlSuffixProperties + , adCampaignIdDimensionValue + , adAdvertiserId + , adAdvertiserIdDimensionValue + , adSslCompliant + , adCampaignId + , adIdDimensionValue + , adClickThroughUrl + , adDeliverySchedule + , adEventTagOverrides + , adActive + , adAccountId + , adName + , adKeyValueTargetingExpression + , adEndTime + , adCreateInfo + , adLastModifiedInfo + , adId + , adSslRequired + , adComments + , adSubaccountId + , adType + , adRemarketingListExpression + , adDynamicClickTracker + , adCompatibility + , adArchived + , adDefaultClickThroughEventTagProperties + , adPlacementAssignments + + -- * ObjectFilter + , ObjectFilter + , objectFilter + , ofStatus + , ofKind + , ofObjectIds + + -- * ReportsConfiguration + , ReportsConfiguration + , reportsConfiguration + , rcExposureToConversionEnabled + , rcReportGenerationTimeZoneId + , rcLookbackConfiguration + + -- * Size + , Size + , size + , sizHeight + , sizKind + , sizWidth + , sizIab + , sizId + + -- * InventoryItemsListResponse + , InventoryItemsListResponse + , inventoryItemsListResponse + , iilrInventoryItems + , iilrNextPageToken + , iilrKind + + -- * Project + , Project + , project + , pTargetClicks + , pClientBillingCode + , pTargetCpmNanos + , pTargetConversions + , pBudget + , pKind + , pAdvertiserId + , pEndDate + , pOverview + , pTargetImpressions + , pStartDate + , pTargetCpcNanos + , pAccountId + , pName + , pLastModifiedInfo + , pId + , pAudienceAgeGroup + , pSubaccountId + , pAudienceGender + , pClientName + , pTargetCpaNanos + + -- * Subaccount + , Subaccount + , subaccount + , subKind + , subAvailablePermissionIds + , subAccountId + , subName + , subId + + -- * PlacementStrategiesListResponse + , PlacementStrategiesListResponse + , placementStrategiesListResponse + , pslrPlacementStrategies + , pslrNextPageToken + , pslrKind + + -- * PricingSchedule + , PricingSchedule + , pricingSchedule + , psTestingStartDate + , psFloodlightActivityId + , psEndDate + , psDisregardOverdelivery + , psStartDate + , psCapCostOption + , psPricingType + , psPricingPeriods + , psFlighted + + -- * PostalCode + , PostalCode + , postalCode + , pcKind + , pcCode + , pcCountryCode + , pcId + , pcCountryDartId + + -- * OperatingSystem + , OperatingSystem + , operatingSystem + , osDesktop + , osKind + , osName + , osMobile + , osDartId + + -- * CitiesListResponse + , CitiesListResponse + , citiesListResponse + , cKind + , cCities + + -- * ChangeLogsListResponse + , ChangeLogsListResponse + , changeLogsListResponse + , cllrNextPageToken + , cllrKind + , cllrChangeLogs + + -- * AccountPermissionsListResponse + , AccountPermissionsListResponse + , accountPermissionsListResponse + , aplrKind + , aplrAccountPermissions + + -- * ClickThroughURLSuffixProperties + , ClickThroughURLSuffixProperties + , clickThroughURLSuffixProperties + , ctuspOverrideInheritedSuffix + , ctuspClickThroughUrlSuffix + + -- * OperatingSystemVersionsListResponse + , OperatingSystemVersionsListResponse + , operatingSystemVersionsListResponse + , osvlrKind + , osvlrOperatingSystemVersions + + -- * TargetableRemarketingListsListResponse + , TargetableRemarketingListsListResponse + , targetableRemarketingListsListResponse + , trllrNextPageToken + , trllrKind + , trllrTargetableRemarketingLists + + -- * Country + , Country + , country + , couKind + , couName + , couCountryCode + , couDartId + , couSslEnabled + + -- * Pricing + , Pricing + , pricing + , priEndDate + , priStartDate + , priGroupType + , priPricingType + , priFlights + , priCapCostType + + -- * CustomRichMediaEvents + , CustomRichMediaEvents + , customRichMediaEvents + , crmeKind + , crmeFilteredEventIds + + -- * AudienceSegmentGroup + , AudienceSegmentGroup + , audienceSegmentGroup + , asgAudienceSegments + , asgName + , asgId + + -- * Dimension + , Dimension + , dimension + , dKind + , dName + + -- * Flight + , Flight + , flight + , fRateOrCost + , fEndDate + , fStartDate + , fUnits + + -- * Activities + , Activities + , activities + , aKind + , aMetricNames + , aFilters + + -- * AccountsListResponse + , AccountsListResponse + , accountsListResponse + , accNextPageToken + , accAccounts + , accKind + + -- * Creative + , Creative + , creative + , creConvertFlashToHtml5 + , creBackupImageTargetWindow + , creRenderingIdDimensionValue + , creCustomKeyValues + , creVideoDuration + , creRenderingId + , creThirdPartyBackupImageImpressionsUrl + , creFsCommand + , creAllowScriptAccess + , creHtmlCodeLocked + , creRequiredFlashPluginVersion + , creAuthoringTool + , creSize + , creThirdPartyUrls + , creCounterCustomEvents + , creKind + , creSslOverride + , creHtmlCode + , creAdvertiserId + , creRequiredFlashVersion + , creBackgroundColor + , creAdTagKeys + , creSkippable + , creSslCompliant + , creIdDimensionValue + , creBackupImageReportingLabel + , creCommercialId + , creActive + , creExitCustomEvents + , creAccountId + , creBackupImageClickThroughUrl + , creName + , creOverrideCss + , creVideoDescription + , creClickTags + , creAdParameters + , creVersion + , creLatestTraffickedCreativeId + , creThirdPartyRichMediaImpressionsUrl + , creLastModifiedInfo + , creId + , creStudioAdvertiserId + , creCreativeAssets + , creSubaccountId + , creType + , creTimerCustomEvents + , creStudioCreativeId + , creCompatibility + , creBackupImageFeatures + , creArtworkType + , creArchived + , creCompanionCreatives + , creTotalFileSize + , creStudioTraffickedCreativeId + , creRedirectUrl + , creAutoAdvanceImages + , creCreativeFieldAssignments + + -- * UserRolePermissionGroupsListResponse + , UserRolePermissionGroupsListResponse + , userRolePermissionGroupsListResponse + , urpglrUserRolePermissionGroups + , urpglrKind + + -- * DimensionValue + , DimensionValue + , dimensionValue + , dvEtag + , dvKind + , dvValue + , dvMatchType + , dvDimensionName + , dvId + + -- * SiteContact + , SiteContact + , siteContact + , scEmail + , scPhone + , scLastName + , scAddress + , scFirstName + , scId + , scTitle + , scContactType + + -- * DateRange + , DateRange + , dateRange + , drKind + , drEndDate + , drStartDate + , drRelativeDateRange + + -- * AccountUserProfile + , AccountUserProfile + , accountUserProfile + , aupEmail + , aupUserRoleFilter + , aupAdvertiserFilter + , aupUserRoleId + , aupKind + , aupLocale + , aupSiteFilter + , aupTraffickerType + , aupActive + , aupAccountId + , aupName + , aupId + , aupUserAccessType + , aupComments + , aupSubaccountId + , aupCampaignFilter + + -- * PlacementTag + , PlacementTag + , placementTag + , ptPlacementId + , ptTagDatas + + -- * RemarketingListsListResponse + , RemarketingListsListResponse + , remarketingListsListResponse + , rllrNextPageToken + , rllrRemarketingLists + , rllrKind + + -- * SiteSettings + , SiteSettings + , siteSettings + , ssDisableNewCookie + , ssDisableBrandSafeAds + , ssLookbackConfiguration + , ssTagSetting + , ssActiveViewOptOut + , ssCreativeSettings + + -- * ThirdPartyAuthenticationToken + , ThirdPartyAuthenticationToken + , thirdPartyAuthenticationToken + , tpatValue + , tpatName + + -- * BrowsersListResponse + , BrowsersListResponse + , browsersListResponse + , blrKind + , blrBrowsers + + -- * ClickThroughURL + , ClickThroughURL + , clickThroughURL + , ctuDefaultLandingPage + , ctuComputedClickThroughUrl + , ctuCustomClickThroughUrl + , ctuLandingPageId + + -- * ContentCategoriesListResponse + , ContentCategoriesListResponse + , contentCategoriesListResponse + , cclrNextPageToken + , cclrKind + , cclrContentCategories + + -- * Report + , Report + , report + , rDelivery + , rEtag + , rOwnerProfileId + , rSchedule + , rPathToConversionCriteria + , rKind + , rFormat + , rReachCriteria + , rLastModifiedTime + , rAccountId + , rName + , rId + , rCrossDimensionReachCriteria + , rType + , rSubAccountId + , rFloodlightCriteria + , rCriteria + , rFileName + + -- * Campaign + , Campaign + , campaign + , camCreativeOptimizationConfiguration + , camCreativeGroupIds + , camNielsenOcrEnabled + , camKind + , camClickThroughUrlSuffixProperties + , camAdvertiserId + , camEndDate + , camAdvertiserIdDimensionValue + , camIdDimensionValue + , camEventTagOverrides + , camLookbackConfiguration + , camStartDate + , camAccountId + , camComscoreVceEnabled + , camName + , camAdvertiserGroupId + , camBillingInvoiceCode + , camCreateInfo + , camLastModifiedInfo + , camId + , camSubaccountId + , camAdditionalCreativeOptimizationConfigurations + , camExternalId + , camComment + , camAudienceSegmentGroups + , camArchived + , camTraffickerEmails + , camDefaultClickThroughEventTagProperties + + -- * ReportCompatibleFields + , ReportCompatibleFields + , reportCompatibleFields + , rcfMetrics + , rcfKind + , rcfDimensionFilters + , rcfPivotedActivityMetrics + , rcfDimensions + + -- * FloodlightReportCompatibleFields + , FloodlightReportCompatibleFields + , floodlightReportCompatibleFields + , frcfMetrics + , frcfKind + , frcfDimensionFilters + , frcfDimensions + + -- * ContentCategory + , ContentCategory + , contentCategory + , ccKind + , ccAccountId + , ccName + , ccId + + -- * DimensionValueList + , DimensionValueList + , dimensionValueList + , dvlEtag + , dvlNextPageToken + , dvlKind + , dvlItems + + -- * CreativesListResponse + , CreativesListResponse + , creativesListResponse + , clrlNextPageToken + , clrlKind + , clrlCreatives + + -- * UserRolePermissionGroup + , UserRolePermissionGroup + , userRolePermissionGroup + , urpgKind + , urpgName + , urpgId + + -- * Account + , Account + , account + , aaAccountPermissionIds + , aaMaximumImageSize + , aaCurrencyId + , aaReportsConfiguration + , aaNielsenOcrEnabled + , aaKind + , aaLocale + , aaActive + , aaAvailablePermissionIds + , aaTeaserSizeLimit + , aaComscoreVceEnabled + , aaActiveViewOptOut + , aaName + , aaAccountProfile + , aaId + , aaCountryId + , aaActiveAdsLimitTier + , aaDefaultCreativeSizeId + , aaDescription + + -- * RemarketingList + , RemarketingList + , remarketingList + , rlListSize + , rlListPopulationRule + , rlLifeSpan + , rlKind + , rlAdvertiserId + , rlAdvertiserIdDimensionValue + , rlActive + , rlAccountId + , rlName + , rlListSource + , rlId + , rlSubaccountId + , rlDescription + + -- * AccountUserProfilesListResponse + , AccountUserProfilesListResponse + , accountUserProfilesListResponse + , auplrNextPageToken + , auplrAccountUserProfiles + , auplrKind + + -- * DeliverySchedule + , DeliverySchedule + , deliverySchedule + , dsHardCutoff + , dsPriority + , dsImpressionRatio + , dsFrequencyCap + + -- * PlacementGroupsListResponse + , PlacementGroupsListResponse + , placementGroupsListResponse + , pglrNextPageToken + , pglrKind + , pglrPlacementGroups + + -- * OrdersListResponse + , OrdersListResponse + , ordersListResponse + , olrNextPageToken + , olrKind + , olrOrders + + -- * UserRolePermissionsListResponse + , UserRolePermissionsListResponse + , userRolePermissionsListResponse + , urplrKind + , urplrUserRolePermissions + + -- * MobileCarrier + , MobileCarrier + , mobileCarrier + , mcKind + , mcName + , mcCountryCode + , mcId + , mcCountryDartId + + -- * LandingPage + , LandingPage + , landingPage + , lpKind + , lpDefault + , lpUrl + , lpName + , lpId + + -- * TagSetting + , TagSetting + , tagSetting + , tsKeywordOption + , tsIncludeClickThroughUrls + , tsIncludeClickTracking + , tsAdditionalKeyValues + + -- * CreativeGroup + , CreativeGroup + , creativeGroup + , cgKind + , cgAdvertiserId + , cgAdvertiserIdDimensionValue + , cgGroupNumber + , cgAccountId + , cgName + , cgId + , cgSubaccountId + + -- * ConnectionTypesListResponse + , ConnectionTypesListResponse + , connectionTypesListResponse + , ctlrKind + , ctlrConnectionTypes + + -- * LookbackConfiguration + , LookbackConfiguration + , lookbackConfiguration + , lcClickDuration + , lcPostImpressionActivitiesDuration + + -- * Metric + , Metric + , metric + , mKind + , mName + + -- * RemarketingListShare + , RemarketingListShare + , remarketingListShare + , rlsSharedAdvertiserIds + , rlsKind + , rlsRemarketingListId + , rlsSharedAccountIds + + -- * ReportList + , ReportList + , reportList + , repEtag + , repNextPageToken + , repKind + , repItems + + -- * EventTagsListResponse + , EventTagsListResponse + , eventTagsListResponse + , etlrKind + , etlrEventTags + + -- * CampaignCreativeAssociation + , CampaignCreativeAssociation + , campaignCreativeAssociation + , ccaKind + , ccaCreativeId + + -- * AccountActiveAdSummary + , AccountActiveAdSummary + , accountActiveAdSummary + , aaasAvailableAds + , aaasKind + , aaasAccountId + , aaasActiveAds + , aaasActiveAdsLimitTier + + -- * OffsetPosition + , OffsetPosition + , offsetPosition + , opLeft + , opTop + + -- * FloodlightActivityPublisherDynamicTag + , FloodlightActivityPublisherDynamicTag + , floodlightActivityPublisherDynamicTag + , fapdtClickThrough + , fapdtSiteIdDimensionValue + , fapdtDynamicTag + , fapdtDirectorySiteId + , fapdtSiteId + , fapdtViewThrough + + -- * UserRolesListResponse + , UserRolesListResponse + , userRolesListResponse + , urlrNextPageToken + , urlrKind + , urlrUserRoles + + -- * AudienceSegment + , AudienceSegment + , audienceSegment + , asName + , asId + , asAllocation + + -- * City + , City + , city + , citMetroCode + , citRegionCode + , citKind + , citRegionDartId + , citMetroDmaId + , citName + , citCountryCode + , citCountryDartId + , citDartId + + -- * PopupWindowProperties + , PopupWindowProperties + , popupWindowProperties + , pwpOffset + , pwpDimension + , pwpShowStatusBar + , pwpShowMenuBar + , pwpPositionType + , pwpShowAddressBar + , pwpShowScrollBar + , pwpShowToolBar + , pwpTitle + + -- * KeyValueTargetingExpression + , KeyValueTargetingExpression + , keyValueTargetingExpression + , kvteExpression + + -- * DfpSettings + , DfpSettings + , dfpSettings + , dsPubPaidPlacementAccepted + , dsDfpNetworkName + , dsPublisherPortalOnly + , dsProgrammaticPlacementAccepted + , dsDfpNetworkCode + + -- * AdvertisersListResponse + , AdvertisersListResponse + , advertisersListResponse + , advNextPageToken + , advKind + , advAdvertisers + + -- * CountriesListResponse + , CountriesListResponse + , countriesListResponse + , couoKind + , couoCountries + + -- * CompatibleFields + , CompatibleFields + , compatibleFields + , cfReachReportCompatibleFields + , cfCrossDimensionReachReportCompatibleFields + , cfKind + , cfFloodlightReportCompatibleFields + , cfReportCompatibleFields + , cfPathToConversionReportCompatibleFields + + -- * AccountPermissionGroupsListResponse + , AccountPermissionGroupsListResponse + , accountPermissionGroupsListResponse + , apglrKind + , apglrAccountPermissionGroups + + -- * PathToConversionReportCompatibleFields + , PathToConversionReportCompatibleFields + , pathToConversionReportCompatibleFields + , ptcrcfMetrics + , ptcrcfKind + , ptcrcfConversionDimensions + , ptcrcfCustomFloodlightVariables + , ptcrcfPerInteractionDimensions + + -- * CompanionClickThroughOverride + , CompanionClickThroughOverride + , companionClickThroughOverride + , cctoCreativeId + , cctoClickThroughUrl + + -- * PlatformType + , PlatformType + , platformType + , ptKind + , ptName + , ptId + + -- * TargetableRemarketingList + , TargetableRemarketingList + , targetableRemarketingList + , trlListSize + , trlLifeSpan + , trlKind + , trlAdvertiserId + , trlAdvertiserIdDimensionValue + , trlActive + , trlAccountId + , trlName + , trlListSource + , trlId + , trlSubaccountId + , trlDescription + + -- * OperatingSystemVersion + , OperatingSystemVersion + , operatingSystemVersion + , osvMinorVersion + , osvKind + , osvOperatingSystem + , osvMajorVersion + , osvName + , osvId + + -- * AccountPermission + , AccountPermission + , accountPermission + , apKind + , apAccountProfiles + , apName + , apId + , apLevel + , apPermissionGroupId + + -- * UserProfile + , UserProfile + , userProfile + , upEtag + , upKind + , upAccountName + , upProfileId + , upUserName + , upAccountId + , upSubAccountName + , upSubAccountId + + -- * PostalCodesListResponse + , PostalCodesListResponse + , postalCodesListResponse + , pclrKind + , pclrPostalCodes + + -- * ChangeLog + , ChangeLog + , changeLog + , clUserProfileId + , clObjectType + , clUserProfileName + , clKind + , clObjectId + , clAction + , clTransactionId + , clOldValue + , clAccountId + , clNewValue + , clFieldName + , clId + , clSubaccountId + , clChangeTime + + -- * OperatingSystemsListResponse + , OperatingSystemsListResponse + , operatingSystemsListResponse + , oslrKind + , oslrOperatingSystems + + -- * PlacementStrategy + , PlacementStrategy + , placementStrategy + , psKind + , psAccountId + , psName + , psId + + -- * EventTagOverride + , EventTagOverride + , eventTagOverride + , etoEnabled + , etoId + + -- * PlatformTypesListResponse + , PlatformTypesListResponse + , platformTypesListResponse + , ptlrKind + , ptlrPlatformTypes + + -- * FloodlightActivity + , FloodlightActivity + , floodlightActivity + , faCountingMethod + , faTagString + , faSecure + , faExpectedUrl + , faFloodlightActivityGroupTagString + , faFloodlightConfigurationId + , faKind + , faImageTagEnabled + , faAdvertiserId + , faAdvertiserIdDimensionValue + , faSslCompliant + , faIdDimensionValue + , faTagFormat + , faCacheBustingType + , faAccountId + , faName + , faPublisherTags + , faFloodlightActivityGroupId + , faHidden + , faFloodlightActivityGroupType + , faDefaultTags + , faFloodlightActivityGroupName + , faId + , faSslRequired + , faUserDefinedVariableTypes + , faSubaccountId + , faNotes + , faFloodlightConfigurationIdDimensionValue + + -- * Advertiser + , Advertiser + , advertiser + , advdOriginalFloodlightConfigurationId + , advdStatus + , advdFloodlightConfigurationId + , advdKind + , advdSuspended + , advdIdDimensionValue + , advdAccountId + , advdDefaultEmail + , advdName + , advdAdvertiserGroupId + , advdDefaultClickThroughEventTagId + , advdId + , advdSubaccountId + , advdFloodlightConfigurationIdDimensionValue + , advdClickThroughUrlSuffix + + -- * AccountPermissionGroup + , AccountPermissionGroup + , accountPermissionGroup + , apgKind + , apgName + , apgId + + -- * TargetWindow + , TargetWindow + , targetWindow + , twCustomHtml + , twTargetWindowOption + + -- * LastModifiedInfo + , LastModifiedInfo + , lastModifiedInfo + , lmiTime + + -- * UserRole + , UserRole + , userRole + , urParentUserRoleId + , urKind + , urDefaultUserRole + , urAccountId + , urName + , urId + , urPermissions + , urSubaccountId + + -- * Region + , Region + , region + , regRegionCode + , regKind + , regName + , regCountryCode + , regCountryDartId + , regDartId + + -- * DirectorySitesListResponse + , DirectorySitesListResponse + , directorySitesListResponse + , dslrNextPageToken + , dslrKind + , dslrDirectorySites + + -- * CreativeFieldValuesListResponse + , CreativeFieldValuesListResponse + , creativeFieldValuesListResponse + , cfvlrNextPageToken + , cfvlrKind + , cfvlrCreativeFieldValues + + -- * DimensionFilter + , DimensionFilter + , dimensionFilter + , dfKind + , dfValue + , dfDimensionName + + -- * PricingSchedulePricingPeriod + , PricingSchedulePricingPeriod + , pricingSchedulePricingPeriod + , psppEndDate + , psppRateOrCostNanos + , psppStartDate + , psppUnits + , psppPricingComment + + -- * FloodlightConfiguration + , FloodlightConfiguration + , floodlightConfiguration + , fcTagSettings + , fcExposureToConversionEnabled + , fcInAppAttributionTrackingEnabled + , fcThirdPartyAuthenticationTokens + , fcKind + , fcAdvertiserId + , fcAnalyticsDataSharingEnabled + , fcAdvertiserIdDimensionValue + , fcIdDimensionValue + , fcLookbackConfiguration + , fcAccountId + , fcId + , fcSslRequired + , fcNaturalSearchConversionAttributionOption + , fcUserDefinedVariableConfigurations + , fcSubaccountId + , fcFirstDayOfWeek + , fcOmnitureSettings + , fcStandardVariableTypes + + -- * AdvertiserGroupsListResponse + , AdvertiserGroupsListResponse + , advertiserGroupsListResponse + , aglrNextPageToken + , aglrKind + , aglrAdvertiserGroups + + -- * FloodlightActivityGroupsListResponse + , FloodlightActivityGroupsListResponse + , floodlightActivityGroupsListResponse + , faglrNextPageToken + , faglrKind + , faglrFloodlightActivityGroups + + -- * RichMediaExitOverride + , RichMediaExitOverride + , richMediaExitOverride + , rmeoUseCustomExitUrl + , rmeoExitId + , rmeoCustomExitUrl + + -- * CreativeAssignment + , CreativeAssignment + , creativeAssignment + , caCreativeGroupAssignments + , caStartTime + , caWeight + , caRichMediaExitOverrides + , caSslCompliant + , caCreativeId + , caClickThroughUrl + , caApplyEventTags + , caActive + , caSequence + , caEndTime + , caCompanionCreativeOverrides + , caCreativeIdDimensionValue + + -- * UserProfileList + , UserProfileList + , userProfileList + , uplEtag + , uplKind + , uplItems + + -- * DirectorySiteContactsListResponse + , DirectorySiteContactsListResponse + , directorySiteContactsListResponse + , dsclrNextPageToken + , dsclrKind + , dsclrDirectorySiteContacts + + -- * PlacementsGenerateTagsResponse + , PlacementsGenerateTagsResponse + , placementsGenerateTagsResponse + , pgtrKind + , pgtrPlacementTags + + -- * CreativeFieldsListResponse + , CreativeFieldsListResponse + , creativeFieldsListResponse + , cflrNextPageToken + , cflrKind + , cflrCreativeFields + + -- * OrderDocumentsListResponse + , OrderDocumentsListResponse + , orderDocumentsListResponse + , odlrNextPageToken + , odlrKind + , odlrOrderDocuments + + -- * Site + , Site + , site + , sitKind + , sitKeyName + , sitSiteContacts + , sitSiteSettings + , sitIdDimensionValue + , sitDirectorySiteIdDimensionValue + , sitAccountId + , sitName + , sitDirectorySiteId + , sitId + , sitSubaccountId + , sitApproved + + -- * SortedDimension + , SortedDimension + , sortedDimension + , sdKind + , sdSortOrder + , sdName + + -- * Recipient + , Recipient + , recipient + , recEmail + , recKind + , recDeliveryType + + -- * PlacementsListResponse + , PlacementsListResponse + , placementsListResponse + , plaNextPageToken + , plaKind + , plaPlacements + + -- * CreativeAsset + , CreativeAsset + , creativeAsset + , cZIndex + , cPushdown + , cVideoDuration + , cOriginalBackup + , cWindowMode + , cFlashVersion + , cPushdownDuration + , cSize + , cVerticallyLocked + , cOffset + , cStreamingServingUrl + , cZipFilesize + , cTransparency + , cHideSelectionBoxes + , cSslCompliant + , cFileSize + , cAssetIdentifier + , cDurationType + , cProgressiveServingUrl + , cActive + , cRole + , cMimeType + , cPositionTopUnit + , cPositionLeftUnit + , cAlignment + , cExpandedDimension + , cZipFilename + , cActionScript3 + , cDisplayType + , cChildAssetType + , cCollapsedSize + , cId + , cBitRate + , cCustomStartTimeValue + , cStartTimeType + , cDuration + , cArtworkType + , cHideFlashObjects + , cDetectedFeatures + , cBackupImageExit + , cPosition + , cHorizontallyLocked + + -- * MetrosListResponse + , MetrosListResponse + , metrosListResponse + , mlrKind + , mlrMetros + + -- * PlacementGroup + , PlacementGroup + , placementGroup + , pgPlacementStrategyId + , pgSiteIdDimensionValue + , pgPricingSchedule + , pgKind + , pgCampaignIdDimensionValue + , pgAdvertiserId + , pgAdvertiserIdDimensionValue + , pgCampaignId + , pgIdDimensionValue + , pgPlacementGroupType + , pgContentCategoryId + , pgDirectorySiteIdDimensionValue + , pgAccountId + , pgName + , pgDirectorySiteId + , pgCreateInfo + , pgChildPlacementIds + , pgLastModifiedInfo + , pgId + , pgPrimaryPlacementId + , pgSubaccountId + , pgExternalId + , pgComment + , pgPrimaryPlacementIdDimensionValue + , pgSiteId + , pgArchived + + -- * CreativeGroupsListResponse + , CreativeGroupsListResponse + , creativeGroupsListResponse + , cglrCreativeGroups + , cglrNextPageToken + , cglrKind + + -- * EventTag + , EventTag + , eventTag + , etStatus + , etExcludeFromAdxRequests + , etEnabledByDefault + , etKind + , etCampaignIdDimensionValue + , etAdvertiserId + , etUrl + , etAdvertiserIdDimensionValue + , etSslCompliant + , etCampaignId + , etAccountId + , etName + , etUrlEscapeLevels + , etSiteIds + , etId + , etSubaccountId + , etType + , etSiteFilterType + + -- * CampaignCreativeAssociationsListResponse + , CampaignCreativeAssociationsListResponse + , campaignCreativeAssociationsListResponse + , ccalrCampaignCreativeAssociations + , ccalrNextPageToken + , ccalrKind + + -- * CreativeAssetId + , CreativeAssetId + , creativeAssetId + , caiName + , caiType + + -- * FrequencyCap + , FrequencyCap + , frequencyCap + , fcImpressions + , fcDuration + + -- * CreativeSettings + , CreativeSettings + , creativeSettings + , csIFrameHeader + , csIFrameFooter + + -- * UserDefinedVariableConfiguration + , UserDefinedVariableConfiguration + , userDefinedVariableConfiguration + , udvcReportName + , udvcDataType + , udvcVariableType + + -- * Order + , Order + , order + , oSellerOrderId + , oSellerOrganizationName + , oKind + , oAdvertiserId + , oPlanningTermId + , oAccountId + , oName + , oSiteNames + , oLastModifiedInfo + , oBuyerOrganizationName + , oId + , oBuyerInvoiceId + , oComments + , oProjectId + , oSubaccountId + , oNotes + , oContacts + , oSiteId + , oTermsAndConditions + , oApproverUserProfileIds + + -- * OmnitureSettings + , OmnitureSettings + , omnitureSettings + , osOmnitureCostDataEnabled + , osOmnitureIntegrationEnabled + + -- * ConnectionType + , ConnectionType + , connectionType + , conKind + , conName + , conId + + -- * CreativeAssetMetadata + , CreativeAssetMetadata + , creativeAssetMetadata + , camaKind + , camaAssetIdentifier + , camaClickTags + , camaWarnedValidationRules + , camaDetectedFeatures + + -- * UserRolePermission + , UserRolePermission + , userRolePermission + , urpKind + , urpAvailability + , urpName + , urpId + , urpPermissionGroupId + + -- * MobileCarriersListResponse + , MobileCarriersListResponse + , mobileCarriersListResponse + , mclrMobileCarriers + , mclrKind + + -- * LandingPagesListResponse + , LandingPagesListResponse + , landingPagesListResponse + , lplrLandingPages + , lplrKind + + -- * File + , File + , file + , fStatus + , fEtag + , fKind + , fUrls + , fReportId + , fDateRange + , fFormat + , fLastModifiedTime + , fId + , fFileName + + -- * OrderContact + , OrderContact + , orderContact + , ocSignatureUserProfileId + , ocContactName + , ocContactTitle + , ocContactType + , ocContactInfo + + -- * SitesListResponse + , SitesListResponse + , sitesListResponse + , slrlNextPageToken + , slrlKind + , slrlSites + + -- * ThirdPartyTrackingURL + , ThirdPartyTrackingURL + , thirdPartyTrackingURL + , tptuUrl + , tptuThirdPartyUrlType + + -- * Placement + , Placement + , placement + , ppStatus + , ppPlacementStrategyId + , ppTagFormats + , ppSiteIdDimensionValue + , ppPricingSchedule + , ppSize + , ppKind + , ppKeyName + , ppCampaignIdDimensionValue + , ppAdvertiserId + , ppAdvertiserIdDimensionValue + , ppCampaignId + , ppIdDimensionValue + , ppPrimary + , ppLookbackConfiguration + , ppTagSetting + , ppContentCategoryId + , ppDirectorySiteIdDimensionValue + , ppAccountId + , ppPaymentSource + , ppName + , ppDirectorySiteId + , ppCreateInfo + , ppLastModifiedInfo + , ppId + , ppSslRequired + , ppSubaccountId + , ppPlacementGroupIdDimensionValue + , ppExternalId + , ppPlacementGroupId + , ppComment + , ppSiteId + , ppCompatibility + , ppArchived + , ppPaymentApproved + , ppPublisherUpdateInfo + + -- * DirectorySiteContactAssignment + , DirectorySiteContactAssignment + , directorySiteContactAssignment + , dscaVisibility + , dscaContactId + + -- * FloodlightActivitiesGenerateTagResponse + , FloodlightActivitiesGenerateTagResponse + , floodlightActivitiesGenerateTagResponse + , fagtrFloodlightActivityTag + , fagtrKind + + -- * ListTargetingExpression + , ListTargetingExpression + , listTargetingExpression + , lteExpression + + -- * OrderDocument + , OrderDocument + , orderDocument + , odSigned + , odKind + , odAdvertiserId + , odLastSentTime + , odAmendedOrderDocumentId + , odLastSentRecipients + , odEffectiveDate + , odApprovedByUserProfileIds + , odAccountId + , odId + , odProjectId + , odTitle + , odSubaccountId + , odType + , odOrderId + , odCancelled + , odCreatedInfo + + -- * AdSlot + , AdSlot + , adSlot + , aHeight + , aPaymentSourceType + , aLinkedPlacementId + , aWidth + , aPrimary + , aName + , aComment + , aCompatibility + + -- * CreativeField + , CreativeField + , creativeField + , cffKind + , cffAdvertiserId + , cffAdvertiserIdDimensionValue + , cffAccountId + , cffName + , cffId + , cffSubaccountId + + -- * DefaultClickThroughEventTagProperties + , DefaultClickThroughEventTagProperties + , defaultClickThroughEventTagProperties + , dctetpOverrideInheritedEventTag + , dctetpDefaultClickThroughEventTagId + + -- * Metro + , Metro + , metro + , metMetroCode + , metKind + , metName + , metCountryCode + , metDmaId + , metCountryDartId + , metDartId + ) where + +import Network.Google.DFAReporting.Types.Product +import Network.Google.DFAReporting.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2.2' of the DCM/DFA Reporting And Trafficking API. +dFAReportingURL :: BaseURL +dFAReportingURL + = BaseUrl Https + "https://www.googleapis.com/dfareporting/v2.2/" + 443 diff --git a/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs new file mode 100644 index 000000000..5efc0d71b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs @@ -0,0 +1,18934 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DFAReporting.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DFAReporting.Types.Product where + +import Network.Google.DFAReporting.Types.Sum +import Network.Google.Prelude + +-- | Contains information about a browser that can be targeted by ads. +-- +-- /See:/ 'browser' smart constructor. +data Browser = Browser + { _bMinorVersion :: !(Maybe Text) + , _bKind :: !Text + , _bBrowserVersionId :: !(Maybe Int64) + , _bMajorVersion :: !(Maybe Text) + , _bName :: !(Maybe Text) + , _bDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Browser' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bMinorVersion' +-- +-- * 'bKind' +-- +-- * 'bBrowserVersionId' +-- +-- * 'bMajorVersion' +-- +-- * 'bName' +-- +-- * 'bDartId' +browser + :: Browser +browser = + Browser + { _bMinorVersion = Nothing + , _bKind = "dfareporting#browser" + , _bBrowserVersionId = Nothing + , _bMajorVersion = Nothing + , _bName = Nothing + , _bDartId = Nothing + } + +-- | Minor version number (number after first dot on left) of this browser. +-- For example, for Chrome 5.0.375.86 beta, this field should be set to 0. +-- An asterisk (*) may be used to target any version number, and a question +-- mark (?) may be used to target cases where the version number cannot be +-- identified. For example, Chrome *.* targets any version of Chrome: 1.2, +-- 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. +-- Firefox ?.? targets cases where the ad server knows the browser is +-- Firefox but can\'t tell which version it is. +bMinorVersion :: Lens' Browser (Maybe Text) +bMinorVersion + = lens _bMinorVersion + (\ s a -> s{_bMinorVersion = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#browser\". +bKind :: Lens' Browser Text +bKind = lens _bKind (\ s a -> s{_bKind = a}) + +-- | ID referring to this grouping of browser and version numbers. This is +-- the ID used for targeting. +bBrowserVersionId :: Lens' Browser (Maybe Int64) +bBrowserVersionId + = lens _bBrowserVersionId + (\ s a -> s{_bBrowserVersionId = a}) + +-- | Major version number (leftmost number) of this browser. For example, for +-- Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) +-- may be used to target any version number, and a question mark (?) may be +-- used to target cases where the version number cannot be identified. For +-- example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so +-- on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets +-- cases where the ad server knows the browser is Firefox but can\'t tell +-- which version it is. +bMajorVersion :: Lens' Browser (Maybe Text) +bMajorVersion + = lens _bMajorVersion + (\ s a -> s{_bMajorVersion = a}) + +-- | Name of this browser. +bName :: Lens' Browser (Maybe Text) +bName = lens _bName (\ s a -> s{_bName = a}) + +-- | DART ID of this browser. This is the ID used when generating reports. +bDartId :: Lens' Browser (Maybe Int64) +bDartId = lens _bDartId (\ s a -> s{_bDartId = a}) + +instance FromJSON Browser where + parseJSON + = withObject "Browser" + (\ o -> + Browser <$> + (o .:? "minorVersion") <*> + (o .:? "kind" .!= "dfareporting#browser") + <*> (o .:? "browserVersionId") + <*> (o .:? "majorVersion") + <*> (o .:? "name") + <*> (o .:? "dartId")) + +instance ToJSON Browser where + toJSON Browser{..} + = object + (catMaybes + [("minorVersion" .=) <$> _bMinorVersion, + Just ("kind" .= _bKind), + ("browserVersionId" .=) <$> _bBrowserVersionId, + ("majorVersion" .=) <$> _bMajorVersion, + ("name" .=) <$> _bName, ("dartId" .=) <$> _bDartId]) + +-- | Campaign List Response +-- +-- /See:/ 'campaignsListResponse' smart constructor. +data CampaignsListResponse = CampaignsListResponse + { _clrNextPageToken :: !(Maybe Text) + , _clrCampaigns :: !(Maybe [Maybe Campaign]) + , _clrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrNextPageToken' +-- +-- * 'clrCampaigns' +-- +-- * 'clrKind' +campaignsListResponse + :: CampaignsListResponse +campaignsListResponse = + CampaignsListResponse + { _clrNextPageToken = Nothing + , _clrCampaigns = Nothing + , _clrKind = "dfareporting#campaignsListResponse" + } + +-- | Pagination token to be used for the next list operation. +clrNextPageToken :: Lens' CampaignsListResponse (Maybe Text) +clrNextPageToken + = lens _clrNextPageToken + (\ s a -> s{_clrNextPageToken = a}) + +-- | Campaign collection. +clrCampaigns :: Lens' CampaignsListResponse [Maybe Campaign] +clrCampaigns + = lens _clrCampaigns (\ s a -> s{_clrCampaigns = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#campaignsListResponse\". +clrKind :: Lens' CampaignsListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +instance FromJSON CampaignsListResponse where + parseJSON + = withObject "CampaignsListResponse" + (\ o -> + CampaignsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "campaigns" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#campaignsListResponse")) + +instance ToJSON CampaignsListResponse where + toJSON CampaignsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _clrNextPageToken, + ("campaigns" .=) <$> _clrCampaigns, + Just ("kind" .= _clrKind)]) + +-- | Creative optimization activity. +-- +-- /See:/ 'optimizationActivity' smart constructor. +data OptimizationActivity = OptimizationActivity + { _oaWeight :: !(Maybe Int32) + , _oaFloodlightActivityId :: !(Maybe Int64) + , _oaFloodlightActivityIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OptimizationActivity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaWeight' +-- +-- * 'oaFloodlightActivityId' +-- +-- * 'oaFloodlightActivityIdDimensionValue' +optimizationActivity + :: OptimizationActivity +optimizationActivity = + OptimizationActivity + { _oaWeight = Nothing + , _oaFloodlightActivityId = Nothing + , _oaFloodlightActivityIdDimensionValue = Nothing + } + +-- | Weight associated with this optimization. Must be greater than 1. The +-- weight assigned will be understood in proportion to the weights assigned +-- to the other optimization activities. +oaWeight :: Lens' OptimizationActivity (Maybe Int32) +oaWeight = lens _oaWeight (\ s a -> s{_oaWeight = a}) + +-- | Floodlight activity ID of this optimization activity. This is a required +-- field. +oaFloodlightActivityId :: Lens' OptimizationActivity (Maybe Int64) +oaFloodlightActivityId + = lens _oaFloodlightActivityId + (\ s a -> s{_oaFloodlightActivityId = a}) + +-- | Dimension value for the ID of the floodlight activity. This is a +-- read-only, auto-generated field. +oaFloodlightActivityIdDimensionValue :: Lens' OptimizationActivity (Maybe (Maybe DimensionValue)) +oaFloodlightActivityIdDimensionValue + = lens _oaFloodlightActivityIdDimensionValue + (\ s a -> + s{_oaFloodlightActivityIdDimensionValue = a}) + +instance FromJSON OptimizationActivity where + parseJSON + = withObject "OptimizationActivity" + (\ o -> + OptimizationActivity <$> + (o .:? "weight") <*> (o .:? "floodlightActivityId") + <*> (o .:? "floodlightActivityIdDimensionValue")) + +instance ToJSON OptimizationActivity where + toJSON OptimizationActivity{..} + = object + (catMaybes + [("weight" .=) <$> _oaWeight, + ("floodlightActivityId" .=) <$> + _oaFloodlightActivityId, + ("floodlightActivityIdDimensionValue" .=) <$> + _oaFloodlightActivityIdDimensionValue]) + +-- | Represents the list of File resources. +-- +-- /See:/ 'fileList' smart constructor. +data FileList = FileList + { _flEtag :: !(Maybe Text) + , _flNextPageToken :: !(Maybe Text) + , _flKind :: !Text + , _flItems :: !(Maybe [Maybe File]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FileList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flEtag' +-- +-- * 'flNextPageToken' +-- +-- * 'flKind' +-- +-- * 'flItems' +fileList + :: FileList +fileList = + FileList + { _flEtag = Nothing + , _flNextPageToken = Nothing + , _flKind = "dfareporting#fileList" + , _flItems = Nothing + } + +-- | The eTag of this response for caching purposes. +flEtag :: Lens' FileList (Maybe Text) +flEtag = lens _flEtag (\ s a -> s{_flEtag = a}) + +-- | Continuation token used to page through files. To retrieve the next page +-- of results, set the next request\'s \"pageToken\" to the value of this +-- field. The page token is only valid for a limited amount of time and +-- should not be persisted. +flNextPageToken :: Lens' FileList (Maybe Text) +flNextPageToken + = lens _flNextPageToken + (\ s a -> s{_flNextPageToken = a}) + +-- | The kind of list this is, in this case dfareporting#fileList. +flKind :: Lens' FileList Text +flKind = lens _flKind (\ s a -> s{_flKind = a}) + +-- | The files returned in this response. +flItems :: Lens' FileList [Maybe File] +flItems + = lens _flItems (\ s a -> s{_flItems = a}) . _Default + . _Coerce + +instance FromJSON FileList where + parseJSON + = withObject "FileList" + (\ o -> + FileList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#fileList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON FileList where + toJSON FileList{..} + = object + (catMaybes + [("etag" .=) <$> _flEtag, + ("nextPageToken" .=) <$> _flNextPageToken, + Just ("kind" .= _flKind), ("items" .=) <$> _flItems]) + +-- | Creative Click Tag. +-- +-- /See:/ 'clickTag' smart constructor. +data ClickTag = ClickTag + { _ctValue :: !(Maybe Text) + , _ctName :: !(Maybe Text) + , _ctEventName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClickTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctValue' +-- +-- * 'ctName' +-- +-- * 'ctEventName' +clickTag + :: ClickTag +clickTag = + ClickTag + { _ctValue = Nothing + , _ctName = Nothing + , _ctEventName = Nothing + } + +-- | Parameter value for the specified click tag. This field contains a +-- click-through url. +ctValue :: Lens' ClickTag (Maybe Text) +ctValue = lens _ctValue (\ s a -> s{_ctValue = a}) + +-- | Parameter name for the specified click tag. For ENHANCED_IMAGE creative +-- assets, this field must match the value of the creative asset\'s +-- creativeAssetId.name field. +ctName :: Lens' ClickTag (Maybe Text) +ctName = lens _ctName (\ s a -> s{_ctName = a}) + +-- | Advertiser event name associated with the click tag. This field is used +-- by ENHANCED_BANNER, ENHANCED_IMAGE, and HTML5_BANNER creatives. +ctEventName :: Lens' ClickTag (Maybe Text) +ctEventName + = lens _ctEventName (\ s a -> s{_ctEventName = a}) + +instance FromJSON ClickTag where + parseJSON + = withObject "ClickTag" + (\ o -> + ClickTag <$> + (o .:? "value") <*> (o .:? "name") <*> + (o .:? "eventName")) + +instance ToJSON ClickTag where + toJSON ClickTag{..} + = object + (catMaybes + [("value" .=) <$> _ctValue, ("name" .=) <$> _ctName, + ("eventName" .=) <$> _ctEventName]) + +-- | A group clause made up of list population terms representing constraints +-- joined by ORs. +-- +-- /See:/ 'listPopulationClause' smart constructor. +newtype ListPopulationClause = ListPopulationClause + { _lpcTerms :: Maybe [Maybe ListPopulationTerm] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListPopulationClause' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpcTerms' +listPopulationClause + :: ListPopulationClause +listPopulationClause = + ListPopulationClause + { _lpcTerms = Nothing + } + +-- | Terms of this list population clause. Each clause is made up of list +-- population terms representing constraints and are joined by ORs. +lpcTerms :: Lens' ListPopulationClause [Maybe ListPopulationTerm] +lpcTerms + = lens _lpcTerms (\ s a -> s{_lpcTerms = a}) . + _Default + . _Coerce + +instance FromJSON ListPopulationClause where + parseJSON + = withObject "ListPopulationClause" + (\ o -> + ListPopulationClause <$> (o .:? "terms" .!= mempty)) + +instance ToJSON ListPopulationClause where + toJSON ListPopulationClause{..} + = object (catMaybes [("terms" .=) <$> _lpcTerms]) + +-- | Geographical Targeting. +-- +-- /See:/ 'geoTargeting' smart constructor. +data GeoTargeting = GeoTargeting + { _gtRegions :: !(Maybe [Maybe Region]) + , _gtCountries :: !(Maybe [Maybe Country]) + , _gtCities :: !(Maybe [Maybe City]) + , _gtMetros :: !(Maybe [Maybe Metro]) + , _gtExcludeCountries :: !(Maybe Bool) + , _gtPostalCodes :: !(Maybe [Maybe PostalCode]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gtRegions' +-- +-- * 'gtCountries' +-- +-- * 'gtCities' +-- +-- * 'gtMetros' +-- +-- * 'gtExcludeCountries' +-- +-- * 'gtPostalCodes' +geoTargeting + :: GeoTargeting +geoTargeting = + GeoTargeting + { _gtRegions = Nothing + , _gtCountries = Nothing + , _gtCities = Nothing + , _gtMetros = Nothing + , _gtExcludeCountries = Nothing + , _gtPostalCodes = Nothing + } + +-- | Regions to be targeted. For each region only dartId is required. The +-- other fields are populated automatically when the ad is inserted or +-- updated. If targeting a region, do not target or exclude the country of +-- the region. +gtRegions :: Lens' GeoTargeting [Maybe Region] +gtRegions + = lens _gtRegions (\ s a -> s{_gtRegions = a}) . + _Default + . _Coerce + +-- | Countries to be targeted or excluded from targeting, depending on the +-- setting of the excludeCountries field. For each country only dartId is +-- required. The other fields are populated automatically when the ad is +-- inserted or updated. If targeting or excluding a country, do not target +-- regions, cities, metros, or postal codes in the same country. +gtCountries :: Lens' GeoTargeting [Maybe Country] +gtCountries + = lens _gtCountries (\ s a -> s{_gtCountries = a}) . + _Default + . _Coerce + +-- | Cities to be targeted. For each city only dartId is required. The other +-- fields are populated automatically when the ad is inserted or updated. +-- If targeting a city, do not target or exclude the country of the city, +-- and do not target the metro or region of the city. +gtCities :: Lens' GeoTargeting [Maybe City] +gtCities + = lens _gtCities (\ s a -> s{_gtCities = a}) . + _Default + . _Coerce + +-- | Metros to be targeted. For each metro only dmaId is required. The other +-- fields are populated automatically when the ad is inserted or updated. +-- If targeting a metro, do not target or exclude the country of the metro. +gtMetros :: Lens' GeoTargeting [Maybe Metro] +gtMetros + = lens _gtMetros (\ s a -> s{_gtMetros = a}) . + _Default + . _Coerce + +-- | Whether or not to exclude the countries in the countries field from +-- targeting. If false, the countries field refers to countries which will +-- be targeted by the ad. +gtExcludeCountries :: Lens' GeoTargeting (Maybe Bool) +gtExcludeCountries + = lens _gtExcludeCountries + (\ s a -> s{_gtExcludeCountries = a}) + +-- | Postal codes to be targeted. For each postal code only id is required. +-- The other fields are populated automatically when the ad is inserted or +-- updated. If targeting a postal code, do not target or exclude the +-- country of the postal code. +gtPostalCodes :: Lens' GeoTargeting [Maybe PostalCode] +gtPostalCodes + = lens _gtPostalCodes + (\ s a -> s{_gtPostalCodes = a}) + . _Default + . _Coerce + +instance FromJSON GeoTargeting where + parseJSON + = withObject "GeoTargeting" + (\ o -> + GeoTargeting <$> + (o .:? "regions" .!= mempty) <*> + (o .:? "countries" .!= mempty) + <*> (o .:? "cities" .!= mempty) + <*> (o .:? "metros" .!= mempty) + <*> (o .:? "excludeCountries") + <*> (o .:? "postalCodes" .!= mempty)) + +instance ToJSON GeoTargeting where + toJSON GeoTargeting{..} + = object + (catMaybes + [("regions" .=) <$> _gtRegions, + ("countries" .=) <$> _gtCountries, + ("cities" .=) <$> _gtCities, + ("metros" .=) <$> _gtMetros, + ("excludeCountries" .=) <$> _gtExcludeCountries, + ("postalCodes" .=) <$> _gtPostalCodes]) + +-- | Creative Custom Event. +-- +-- /See:/ 'creativeCustomEvent' smart constructor. +data CreativeCustomEvent = CreativeCustomEvent + { _cceAdvertiserCustomEventType :: !(Maybe Text) + , _cceAdvertiserCustomEventName :: !(Maybe Text) + , _cceExitUrl :: !(Maybe Text) + , _cceTargetType :: !(Maybe Text) + , _ccePopupWindowProperties :: !(Maybe (Maybe PopupWindowProperties)) + , _cceVideoReportingId :: !(Maybe Text) + , _cceId :: !(Maybe Int64) + , _cceArtworkLabel :: !(Maybe Text) + , _cceArtworkType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeCustomEvent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cceAdvertiserCustomEventType' +-- +-- * 'cceAdvertiserCustomEventName' +-- +-- * 'cceExitUrl' +-- +-- * 'cceTargetType' +-- +-- * 'ccePopupWindowProperties' +-- +-- * 'cceVideoReportingId' +-- +-- * 'cceId' +-- +-- * 'cceArtworkLabel' +-- +-- * 'cceArtworkType' +creativeCustomEvent + :: CreativeCustomEvent +creativeCustomEvent = + CreativeCustomEvent + { _cceAdvertiserCustomEventType = Nothing + , _cceAdvertiserCustomEventName = Nothing + , _cceExitUrl = Nothing + , _cceTargetType = Nothing + , _ccePopupWindowProperties = Nothing + , _cceVideoReportingId = Nothing + , _cceId = Nothing + , _cceArtworkLabel = Nothing + , _cceArtworkType = Nothing + } + +-- | Type of the event. This is a read-only field. +cceAdvertiserCustomEventType :: Lens' CreativeCustomEvent (Maybe Text) +cceAdvertiserCustomEventType + = lens _cceAdvertiserCustomEventType + (\ s a -> s{_cceAdvertiserCustomEventType = a}) + +-- | User-entered name for the event. +cceAdvertiserCustomEventName :: Lens' CreativeCustomEvent (Maybe Text) +cceAdvertiserCustomEventName + = lens _cceAdvertiserCustomEventName + (\ s a -> s{_cceAdvertiserCustomEventName = a}) + +-- | Exit URL of the event. This field is used only for exit events. +cceExitUrl :: Lens' CreativeCustomEvent (Maybe Text) +cceExitUrl + = lens _cceExitUrl (\ s a -> s{_cceExitUrl = a}) + +-- | Target type used by the event. +cceTargetType :: Lens' CreativeCustomEvent (Maybe Text) +cceTargetType + = lens _cceTargetType + (\ s a -> s{_cceTargetType = a}) + +-- | Properties for rich media popup windows. This field is used only for +-- exit events. +ccePopupWindowProperties :: Lens' CreativeCustomEvent (Maybe (Maybe PopupWindowProperties)) +ccePopupWindowProperties + = lens _ccePopupWindowProperties + (\ s a -> s{_ccePopupWindowProperties = a}) + +-- | Reporting ID, used to differentiate multiple videos in a single +-- creative. +cceVideoReportingId :: Lens' CreativeCustomEvent (Maybe Text) +cceVideoReportingId + = lens _cceVideoReportingId + (\ s a -> s{_cceVideoReportingId = a}) + +-- | ID of this event. This is a required field and should not be modified +-- after insertion. +cceId :: Lens' CreativeCustomEvent (Maybe Int64) +cceId = lens _cceId (\ s a -> s{_cceId = a}) + +-- | Artwork label column, used to link events in DCM back to events in +-- Studio. This is a required field and should not be modified after +-- insertion. +cceArtworkLabel :: Lens' CreativeCustomEvent (Maybe Text) +cceArtworkLabel + = lens _cceArtworkLabel + (\ s a -> s{_cceArtworkLabel = a}) + +-- | Artwork type used by the creative.This is a read-only field. +cceArtworkType :: Lens' CreativeCustomEvent (Maybe Text) +cceArtworkType + = lens _cceArtworkType + (\ s a -> s{_cceArtworkType = a}) + +instance FromJSON CreativeCustomEvent where + parseJSON + = withObject "CreativeCustomEvent" + (\ o -> + CreativeCustomEvent <$> + (o .:? "advertiserCustomEventType") <*> + (o .:? "advertiserCustomEventName") + <*> (o .:? "exitUrl") + <*> (o .:? "targetType") + <*> (o .:? "popupWindowProperties") + <*> (o .:? "videoReportingId") + <*> (o .:? "id") + <*> (o .:? "artworkLabel") + <*> (o .:? "artworkType")) + +instance ToJSON CreativeCustomEvent where + toJSON CreativeCustomEvent{..} + = object + (catMaybes + [("advertiserCustomEventType" .=) <$> + _cceAdvertiserCustomEventType, + ("advertiserCustomEventName" .=) <$> + _cceAdvertiserCustomEventName, + ("exitUrl" .=) <$> _cceExitUrl, + ("targetType" .=) <$> _cceTargetType, + ("popupWindowProperties" .=) <$> + _ccePopupWindowProperties, + ("videoReportingId" .=) <$> _cceVideoReportingId, + ("id" .=) <$> _cceId, + ("artworkLabel" .=) <$> _cceArtworkLabel, + ("artworkType" .=) <$> _cceArtworkType]) + +-- | Represents fields that are compatible to be selected for a report of +-- type \"REACH\". +-- +-- /See:/ 'reachReportCompatibleFields' smart constructor. +data ReachReportCompatibleFields = ReachReportCompatibleFields + { _rrcfMetrics :: !(Maybe [Maybe Metric]) + , _rrcfReachByFrequencyMetrics :: !(Maybe [Maybe Metric]) + , _rrcfKind :: !Text + , _rrcfDimensionFilters :: !(Maybe [Maybe Dimension]) + , _rrcfPivotedActivityMetrics :: !(Maybe [Maybe Metric]) + , _rrcfDimensions :: !(Maybe [Maybe Dimension]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReachReportCompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrcfMetrics' +-- +-- * 'rrcfReachByFrequencyMetrics' +-- +-- * 'rrcfKind' +-- +-- * 'rrcfDimensionFilters' +-- +-- * 'rrcfPivotedActivityMetrics' +-- +-- * 'rrcfDimensions' +reachReportCompatibleFields + :: ReachReportCompatibleFields +reachReportCompatibleFields = + ReachReportCompatibleFields + { _rrcfMetrics = Nothing + , _rrcfReachByFrequencyMetrics = Nothing + , _rrcfKind = "dfareporting#reachReportCompatibleFields" + , _rrcfDimensionFilters = Nothing + , _rrcfPivotedActivityMetrics = Nothing + , _rrcfDimensions = Nothing + } + +-- | Metrics which are compatible to be selected in the \"metricNames\" +-- section of the report. +rrcfMetrics :: Lens' ReachReportCompatibleFields [Maybe Metric] +rrcfMetrics + = lens _rrcfMetrics (\ s a -> s{_rrcfMetrics = a}) . + _Default + . _Coerce + +-- | Metrics which are compatible to be selected in the +-- \"reachByFrequencyMetricNames\" section of the report. +rrcfReachByFrequencyMetrics :: Lens' ReachReportCompatibleFields [Maybe Metric] +rrcfReachByFrequencyMetrics + = lens _rrcfReachByFrequencyMetrics + (\ s a -> s{_rrcfReachByFrequencyMetrics = a}) + . _Default + . _Coerce + +-- | The kind of resource this is, in this case +-- dfareporting#reachReportCompatibleFields. +rrcfKind :: Lens' ReachReportCompatibleFields Text +rrcfKind = lens _rrcfKind (\ s a -> s{_rrcfKind = a}) + +-- | Dimensions which are compatible to be selected in the +-- \"dimensionFilters\" section of the report. +rrcfDimensionFilters :: Lens' ReachReportCompatibleFields [Maybe Dimension] +rrcfDimensionFilters + = lens _rrcfDimensionFilters + (\ s a -> s{_rrcfDimensionFilters = a}) + . _Default + . _Coerce + +-- | Metrics which are compatible to be selected as activity metrics to pivot +-- on in the \"activities\" section of the report. +rrcfPivotedActivityMetrics :: Lens' ReachReportCompatibleFields [Maybe Metric] +rrcfPivotedActivityMetrics + = lens _rrcfPivotedActivityMetrics + (\ s a -> s{_rrcfPivotedActivityMetrics = a}) + . _Default + . _Coerce + +-- | Dimensions which are compatible to be selected in the \"dimensions\" +-- section of the report. +rrcfDimensions :: Lens' ReachReportCompatibleFields [Maybe Dimension] +rrcfDimensions + = lens _rrcfDimensions + (\ s a -> s{_rrcfDimensions = a}) + . _Default + . _Coerce + +instance FromJSON ReachReportCompatibleFields where + parseJSON + = withObject "ReachReportCompatibleFields" + (\ o -> + ReachReportCompatibleFields <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "reachByFrequencyMetrics" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#reachReportCompatibleFields") + <*> (o .:? "dimensionFilters" .!= mempty) + <*> (o .:? "pivotedActivityMetrics" .!= mempty) + <*> (o .:? "dimensions" .!= mempty)) + +instance ToJSON ReachReportCompatibleFields where + toJSON ReachReportCompatibleFields{..} + = object + (catMaybes + [("metrics" .=) <$> _rrcfMetrics, + ("reachByFrequencyMetrics" .=) <$> + _rrcfReachByFrequencyMetrics, + Just ("kind" .= _rrcfKind), + ("dimensionFilters" .=) <$> _rrcfDimensionFilters, + ("pivotedActivityMetrics" .=) <$> + _rrcfPivotedActivityMetrics, + ("dimensions" .=) <$> _rrcfDimensions]) + +-- | Creative Group Assignment. +-- +-- /See:/ 'creativeGroupAssignment' smart constructor. +data CreativeGroupAssignment = CreativeGroupAssignment + { _cgaCreativeGroupNumber :: !(Maybe Text) + , _cgaCreativeGroupId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgaCreativeGroupNumber' +-- +-- * 'cgaCreativeGroupId' +creativeGroupAssignment + :: CreativeGroupAssignment +creativeGroupAssignment = + CreativeGroupAssignment + { _cgaCreativeGroupNumber = Nothing + , _cgaCreativeGroupId = Nothing + } + +-- | Creative group number of the creative group assignment. +cgaCreativeGroupNumber :: Lens' CreativeGroupAssignment (Maybe Text) +cgaCreativeGroupNumber + = lens _cgaCreativeGroupNumber + (\ s a -> s{_cgaCreativeGroupNumber = a}) + +-- | ID of the creative group to be assigned. +cgaCreativeGroupId :: Lens' CreativeGroupAssignment (Maybe Int64) +cgaCreativeGroupId + = lens _cgaCreativeGroupId + (\ s a -> s{_cgaCreativeGroupId = a}) + +instance FromJSON CreativeGroupAssignment where + parseJSON + = withObject "CreativeGroupAssignment" + (\ o -> + CreativeGroupAssignment <$> + (o .:? "creativeGroupNumber") <*> + (o .:? "creativeGroupId")) + +instance ToJSON CreativeGroupAssignment where + toJSON CreativeGroupAssignment{..} + = object + (catMaybes + [("creativeGroupNumber" .=) <$> + _cgaCreativeGroupNumber, + ("creativeGroupId" .=) <$> _cgaCreativeGroupId]) + +-- | Ad List Response +-- +-- /See:/ 'adsListResponse' smart constructor. +data AdsListResponse = AdsListResponse + { _alrNextPageToken :: !(Maybe Text) + , _alrKind :: !Text + , _alrAds :: !(Maybe [Maybe Ad]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrNextPageToken' +-- +-- * 'alrKind' +-- +-- * 'alrAds' +adsListResponse + :: AdsListResponse +adsListResponse = + AdsListResponse + { _alrNextPageToken = Nothing + , _alrKind = "dfareporting#adsListResponse" + , _alrAds = Nothing + } + +-- | Pagination token to be used for the next list operation. +alrNextPageToken :: Lens' AdsListResponse (Maybe Text) +alrNextPageToken + = lens _alrNextPageToken + (\ s a -> s{_alrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#adsListResponse\". +alrKind :: Lens' AdsListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +-- | Ad collection. +alrAds :: Lens' AdsListResponse [Maybe Ad] +alrAds + = lens _alrAds (\ s a -> s{_alrAds = a}) . _Default . + _Coerce + +instance FromJSON AdsListResponse where + parseJSON + = withObject "AdsListResponse" + (\ o -> + AdsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#adsListResponse") + <*> (o .:? "ads" .!= mempty)) + +instance ToJSON AdsListResponse where + toJSON AdsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _alrNextPageToken, + Just ("kind" .= _alrKind), ("ads" .=) <$> _alrAds]) + +-- | Remarketing List Population Rule Term. +-- +-- /See:/ 'listPopulationTerm' smart constructor. +data ListPopulationTerm = ListPopulationTerm + { _lptOperator :: !(Maybe Text) + , _lptValue :: !(Maybe Text) + , _lptVariableFriendlyName :: !(Maybe Text) + , _lptNegation :: !(Maybe Bool) + , _lptVariableName :: !(Maybe Text) + , _lptRemarketingListId :: !(Maybe Int64) + , _lptType :: !(Maybe Text) + , _lptContains :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListPopulationTerm' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lptOperator' +-- +-- * 'lptValue' +-- +-- * 'lptVariableFriendlyName' +-- +-- * 'lptNegation' +-- +-- * 'lptVariableName' +-- +-- * 'lptRemarketingListId' +-- +-- * 'lptType' +-- +-- * 'lptContains' +listPopulationTerm + :: ListPopulationTerm +listPopulationTerm = + ListPopulationTerm + { _lptOperator = Nothing + , _lptValue = Nothing + , _lptVariableFriendlyName = Nothing + , _lptNegation = Nothing + , _lptVariableName = Nothing + , _lptRemarketingListId = Nothing + , _lptType = Nothing + , _lptContains = Nothing + } + +-- | Comparison operator of this term. This field is only relevant when type +-- is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. +lptOperator :: Lens' ListPopulationTerm (Maybe Text) +lptOperator + = lens _lptOperator (\ s a -> s{_lptOperator = a}) + +-- | Literal to compare the variable to. This field is only relevant when +-- type is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. +lptValue :: Lens' ListPopulationTerm (Maybe Text) +lptValue = lens _lptValue (\ s a -> s{_lptValue = a}) + +-- | Friendly name of this term\'s variable. This is a read-only, +-- auto-generated field. This field is only relevant when type is left +-- unset or set to CUSTOM_VARIABLE_TERM. +lptVariableFriendlyName :: Lens' ListPopulationTerm (Maybe Text) +lptVariableFriendlyName + = lens _lptVariableFriendlyName + (\ s a -> s{_lptVariableFriendlyName = a}) + +-- | Whether to negate the comparison result of this term during rule +-- evaluation. This field is only relevant when type is left unset or set +-- to CUSTOM_VARIABLE_TERM or REFERRER_TERM. +lptNegation :: Lens' ListPopulationTerm (Maybe Bool) +lptNegation + = lens _lptNegation (\ s a -> s{_lptNegation = a}) + +-- | Name of the variable (U1, U2, etc.) being compared in this term. This +-- field is only relevant when type is set to null, CUSTOM_VARIABLE_TERM or +-- REFERRER_TERM. +lptVariableName :: Lens' ListPopulationTerm (Maybe Text) +lptVariableName + = lens _lptVariableName + (\ s a -> s{_lptVariableName = a}) + +-- | ID of the list in question. This field is only relevant when type is set +-- to LIST_MEMBERSHIP_TERM. +lptRemarketingListId :: Lens' ListPopulationTerm (Maybe Int64) +lptRemarketingListId + = lens _lptRemarketingListId + (\ s a -> s{_lptRemarketingListId = a}) + +-- | List population term type determines the applicable fields in this +-- object. If left unset or set to CUSTOM_VARIABLE_TERM, then variableName, +-- variableFriendlyName, operator, value, and negation are applicable. If +-- set to LIST_MEMBERSHIP_TERM then remarketingListId and contains are +-- applicable. If set to REFERRER_TERM then operator, value, and negation +-- are applicable. +lptType :: Lens' ListPopulationTerm (Maybe Text) +lptType = lens _lptType (\ s a -> s{_lptType = a}) + +-- | Will be true if the term should check if the user is in the list and +-- false if the term should check if the user is not in the list. This +-- field is only relevant when type is set to LIST_MEMBERSHIP_TERM. False +-- by default. +lptContains :: Lens' ListPopulationTerm (Maybe Bool) +lptContains + = lens _lptContains (\ s a -> s{_lptContains = a}) + +instance FromJSON ListPopulationTerm where + parseJSON + = withObject "ListPopulationTerm" + (\ o -> + ListPopulationTerm <$> + (o .:? "operator") <*> (o .:? "value") <*> + (o .:? "variableFriendlyName") + <*> (o .:? "negation") + <*> (o .:? "variableName") + <*> (o .:? "remarketingListId") + <*> (o .:? "type") + <*> (o .:? "contains")) + +instance ToJSON ListPopulationTerm where + toJSON ListPopulationTerm{..} + = object + (catMaybes + [("operator" .=) <$> _lptOperator, + ("value" .=) <$> _lptValue, + ("variableFriendlyName" .=) <$> + _lptVariableFriendlyName, + ("negation" .=) <$> _lptNegation, + ("variableName" .=) <$> _lptVariableName, + ("remarketingListId" .=) <$> _lptRemarketingListId, + ("type" .=) <$> _lptType, + ("contains" .=) <$> _lptContains]) + +-- | Subaccount List Response +-- +-- /See:/ 'subaccountsListResponse' smart constructor. +data SubaccountsListResponse = SubaccountsListResponse + { _slrNextPageToken :: !(Maybe Text) + , _slrKind :: !Text + , _slrSubaccounts :: !(Maybe [Maybe Subaccount]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrNextPageToken' +-- +-- * 'slrKind' +-- +-- * 'slrSubaccounts' +subaccountsListResponse + :: SubaccountsListResponse +subaccountsListResponse = + SubaccountsListResponse + { _slrNextPageToken = Nothing + , _slrKind = "dfareporting#subaccountsListResponse" + , _slrSubaccounts = Nothing + } + +-- | Pagination token to be used for the next list operation. +slrNextPageToken :: Lens' SubaccountsListResponse (Maybe Text) +slrNextPageToken + = lens _slrNextPageToken + (\ s a -> s{_slrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#subaccountsListResponse\". +slrKind :: Lens' SubaccountsListResponse Text +slrKind = lens _slrKind (\ s a -> s{_slrKind = a}) + +-- | Subaccount collection. +slrSubaccounts :: Lens' SubaccountsListResponse [Maybe Subaccount] +slrSubaccounts + = lens _slrSubaccounts + (\ s a -> s{_slrSubaccounts = a}) + . _Default + . _Coerce + +instance FromJSON SubaccountsListResponse where + parseJSON + = withObject "SubaccountsListResponse" + (\ o -> + SubaccountsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#subaccountsListResponse") + <*> (o .:? "subaccounts" .!= mempty)) + +instance ToJSON SubaccountsListResponse where + toJSON SubaccountsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _slrNextPageToken, + Just ("kind" .= _slrKind), + ("subaccounts" .=) <$> _slrSubaccounts]) + +-- | Technology Targeting. +-- +-- /See:/ 'technologyTargeting' smart constructor. +data TechnologyTargeting = TechnologyTargeting + { _ttMobileCarriers :: !(Maybe [Maybe MobileCarrier]) + , _ttOperatingSystemVersions :: !(Maybe [Maybe OperatingSystemVersion]) + , _ttPlatformTypes :: !(Maybe [Maybe PlatformType]) + , _ttBrowsers :: !(Maybe [Maybe Browser]) + , _ttConnectionTypes :: !(Maybe [Maybe ConnectionType]) + , _ttOperatingSystems :: !(Maybe [Maybe OperatingSystem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TechnologyTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ttMobileCarriers' +-- +-- * 'ttOperatingSystemVersions' +-- +-- * 'ttPlatformTypes' +-- +-- * 'ttBrowsers' +-- +-- * 'ttConnectionTypes' +-- +-- * 'ttOperatingSystems' +technologyTargeting + :: TechnologyTargeting +technologyTargeting = + TechnologyTargeting + { _ttMobileCarriers = Nothing + , _ttOperatingSystemVersions = Nothing + , _ttPlatformTypes = Nothing + , _ttBrowsers = Nothing + , _ttConnectionTypes = Nothing + , _ttOperatingSystems = Nothing + } + +-- | Mobile carriers that this ad targets. For each mobile carrier only id is +-- required, and the other fields are populated automatically when the ad +-- is inserted or updated. If targeting a mobile carrier, do not set +-- targeting for any zip codes. +ttMobileCarriers :: Lens' TechnologyTargeting [Maybe MobileCarrier] +ttMobileCarriers + = lens _ttMobileCarriers + (\ s a -> s{_ttMobileCarriers = a}) + . _Default + . _Coerce + +-- | Operating system versions that this ad targets. To target all versions, +-- use operatingSystems. For each operating system version, only id is +-- required. The other fields are populated automatically when the ad is +-- inserted or updated. If targeting an operating system version, do not +-- set targeting for the corresponding operating system in +-- operatingSystems. +ttOperatingSystemVersions :: Lens' TechnologyTargeting [Maybe OperatingSystemVersion] +ttOperatingSystemVersions + = lens _ttOperatingSystemVersions + (\ s a -> s{_ttOperatingSystemVersions = a}) + . _Default + . _Coerce + +-- | Platform types that this ad targets. For example, desktop, mobile, or +-- tablet. For each platform type, only id is required, and the other +-- fields are populated automatically when the ad is inserted or updated. +ttPlatformTypes :: Lens' TechnologyTargeting [Maybe PlatformType] +ttPlatformTypes + = lens _ttPlatformTypes + (\ s a -> s{_ttPlatformTypes = a}) + . _Default + . _Coerce + +-- | Browsers that this ad targets. For each browser either set +-- browserVersionId or dartId along with the version numbers. If both are +-- specified, only browserVersionId will be used.The other fields are +-- populated automatically when the ad is inserted or updated. +ttBrowsers :: Lens' TechnologyTargeting [Maybe Browser] +ttBrowsers + = lens _ttBrowsers (\ s a -> s{_ttBrowsers = a}) . + _Default + . _Coerce + +-- | Connection types that this ad targets. For each connection type only id +-- is required.The other fields are populated automatically when the ad is +-- inserted or updated. +ttConnectionTypes :: Lens' TechnologyTargeting [Maybe ConnectionType] +ttConnectionTypes + = lens _ttConnectionTypes + (\ s a -> s{_ttConnectionTypes = a}) + . _Default + . _Coerce + +-- | Operating systems that this ad targets. To target specific versions, use +-- operatingSystemVersions. For each operating system only dartId is +-- required. The other fields are populated automatically when the ad is +-- inserted or updated. If targeting an operating system, do not set +-- targeting for operating system versions for the same operating system. +ttOperatingSystems :: Lens' TechnologyTargeting [Maybe OperatingSystem] +ttOperatingSystems + = lens _ttOperatingSystems + (\ s a -> s{_ttOperatingSystems = a}) + . _Default + . _Coerce + +instance FromJSON TechnologyTargeting where + parseJSON + = withObject "TechnologyTargeting" + (\ o -> + TechnologyTargeting <$> + (o .:? "mobileCarriers" .!= mempty) <*> + (o .:? "operatingSystemVersions" .!= mempty) + <*> (o .:? "platformTypes" .!= mempty) + <*> (o .:? "browsers" .!= mempty) + <*> (o .:? "connectionTypes" .!= mempty) + <*> (o .:? "operatingSystems" .!= mempty)) + +instance ToJSON TechnologyTargeting where + toJSON TechnologyTargeting{..} + = object + (catMaybes + [("mobileCarriers" .=) <$> _ttMobileCarriers, + ("operatingSystemVersions" .=) <$> + _ttOperatingSystemVersions, + ("platformTypes" .=) <$> _ttPlatformTypes, + ("browsers" .=) <$> _ttBrowsers, + ("connectionTypes" .=) <$> _ttConnectionTypes, + ("operatingSystems" .=) <$> _ttOperatingSystems]) + +-- | Project List Response +-- +-- /See:/ 'projectsListResponse' smart constructor. +data ProjectsListResponse = ProjectsListResponse + { _plrNextPageToken :: !(Maybe Text) + , _plrKind :: !Text + , _plrProjects :: !(Maybe [Maybe Project]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrNextPageToken' +-- +-- * 'plrKind' +-- +-- * 'plrProjects' +projectsListResponse + :: ProjectsListResponse +projectsListResponse = + ProjectsListResponse + { _plrNextPageToken = Nothing + , _plrKind = "dfareporting#projectsListResponse" + , _plrProjects = Nothing + } + +-- | Pagination token to be used for the next list operation. +plrNextPageToken :: Lens' ProjectsListResponse (Maybe Text) +plrNextPageToken + = lens _plrNextPageToken + (\ s a -> s{_plrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#projectsListResponse\". +plrKind :: Lens' ProjectsListResponse Text +plrKind = lens _plrKind (\ s a -> s{_plrKind = a}) + +-- | Project collection. +plrProjects :: Lens' ProjectsListResponse [Maybe Project] +plrProjects + = lens _plrProjects (\ s a -> s{_plrProjects = a}) . + _Default + . _Coerce + +instance FromJSON ProjectsListResponse where + parseJSON + = withObject "ProjectsListResponse" + (\ o -> + ProjectsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#projectsListResponse") + <*> (o .:? "projects" .!= mempty)) + +instance ToJSON ProjectsListResponse where + toJSON ProjectsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _plrNextPageToken, + Just ("kind" .= _plrKind), + ("projects" .=) <$> _plrProjects]) + +-- | Directory Site Settings +-- +-- /See:/ 'directorySiteSettings' smart constructor. +data DirectorySiteSettings = DirectorySiteSettings + { _dssInterstitialPlacementAccepted :: !(Maybe Bool) + , _dssDfpSettings :: !(Maybe (Maybe DfpSettings)) + , _dssVerificationTagOptOut :: !(Maybe Bool) + , _dssActiveViewOptOut :: !(Maybe Bool) + , _dssVideoActiveViewOptOut :: !(Maybe Bool) + , _dssInstreamVideoPlacementAccepted :: !(Maybe Bool) + , _dssNielsenOcrOptOut :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dssInterstitialPlacementAccepted' +-- +-- * 'dssDfpSettings' +-- +-- * 'dssVerificationTagOptOut' +-- +-- * 'dssActiveViewOptOut' +-- +-- * 'dssVideoActiveViewOptOut' +-- +-- * 'dssInstreamVideoPlacementAccepted' +-- +-- * 'dssNielsenOcrOptOut' +directorySiteSettings + :: DirectorySiteSettings +directorySiteSettings = + DirectorySiteSettings + { _dssInterstitialPlacementAccepted = Nothing + , _dssDfpSettings = Nothing + , _dssVerificationTagOptOut = Nothing + , _dssActiveViewOptOut = Nothing + , _dssVideoActiveViewOptOut = Nothing + , _dssInstreamVideoPlacementAccepted = Nothing + , _dssNielsenOcrOptOut = Nothing + } + +-- | Whether this site accepts interstitial ads. +dssInterstitialPlacementAccepted :: Lens' DirectorySiteSettings (Maybe Bool) +dssInterstitialPlacementAccepted + = lens _dssInterstitialPlacementAccepted + (\ s a -> s{_dssInterstitialPlacementAccepted = a}) + +-- | Directory site DFP settings. +dssDfpSettings :: Lens' DirectorySiteSettings (Maybe (Maybe DfpSettings)) +dssDfpSettings + = lens _dssDfpSettings + (\ s a -> s{_dssDfpSettings = a}) + +-- | Whether this directory site has disabled generation of Verification ins +-- tags. +dssVerificationTagOptOut :: Lens' DirectorySiteSettings (Maybe Bool) +dssVerificationTagOptOut + = lens _dssVerificationTagOptOut + (\ s a -> s{_dssVerificationTagOptOut = a}) + +-- | Whether this directory site has disabled active view creatives. +dssActiveViewOptOut :: Lens' DirectorySiteSettings (Maybe Bool) +dssActiveViewOptOut + = lens _dssActiveViewOptOut + (\ s a -> s{_dssActiveViewOptOut = a}) + +-- | Whether this directory site has disabled active view for in-stream video +-- creatives. +dssVideoActiveViewOptOut :: Lens' DirectorySiteSettings (Maybe Bool) +dssVideoActiveViewOptOut + = lens _dssVideoActiveViewOptOut + (\ s a -> s{_dssVideoActiveViewOptOut = a}) + +-- | Whether this site accepts in-stream video ads. +dssInstreamVideoPlacementAccepted :: Lens' DirectorySiteSettings (Maybe Bool) +dssInstreamVideoPlacementAccepted + = lens _dssInstreamVideoPlacementAccepted + (\ s a -> s{_dssInstreamVideoPlacementAccepted = a}) + +-- | Whether this directory site has disabled Nielsen OCR reach ratings. +dssNielsenOcrOptOut :: Lens' DirectorySiteSettings (Maybe Bool) +dssNielsenOcrOptOut + = lens _dssNielsenOcrOptOut + (\ s a -> s{_dssNielsenOcrOptOut = a}) + +instance FromJSON DirectorySiteSettings where + parseJSON + = withObject "DirectorySiteSettings" + (\ o -> + DirectorySiteSettings <$> + (o .:? "interstitialPlacementAccepted") <*> + (o .:? "dfp_settings") + <*> (o .:? "verificationTagOptOut") + <*> (o .:? "activeViewOptOut") + <*> (o .:? "videoActiveViewOptOut") + <*> (o .:? "instream_video_placement_accepted") + <*> (o .:? "nielsenOcrOptOut")) + +instance ToJSON DirectorySiteSettings where + toJSON DirectorySiteSettings{..} + = object + (catMaybes + [("interstitialPlacementAccepted" .=) <$> + _dssInterstitialPlacementAccepted, + ("dfp_settings" .=) <$> _dssDfpSettings, + ("verificationTagOptOut" .=) <$> + _dssVerificationTagOptOut, + ("activeViewOptOut" .=) <$> _dssActiveViewOptOut, + ("videoActiveViewOptOut" .=) <$> + _dssVideoActiveViewOptOut, + ("instream_video_placement_accepted" .=) <$> + _dssInstreamVideoPlacementAccepted, + ("nielsenOcrOptOut" .=) <$> _dssNielsenOcrOptOut]) + +-- | Dynamic and Image Tag Settings. +-- +-- /See:/ 'tagSettings' smart constructor. +data TagSettings = TagSettings + { _tsDynamicTagEnabled :: !(Maybe Bool) + , _tsImageTagEnabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TagSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsDynamicTagEnabled' +-- +-- * 'tsImageTagEnabled' +tagSettings + :: TagSettings +tagSettings = + TagSettings + { _tsDynamicTagEnabled = Nothing + , _tsImageTagEnabled = Nothing + } + +-- | Whether dynamic floodlight tags are enabled. +tsDynamicTagEnabled :: Lens' TagSettings (Maybe Bool) +tsDynamicTagEnabled + = lens _tsDynamicTagEnabled + (\ s a -> s{_tsDynamicTagEnabled = a}) + +-- | Whether image tags are enabled. +tsImageTagEnabled :: Lens' TagSettings (Maybe Bool) +tsImageTagEnabled + = lens _tsImageTagEnabled + (\ s a -> s{_tsImageTagEnabled = a}) + +instance FromJSON TagSettings where + parseJSON + = withObject "TagSettings" + (\ o -> + TagSettings <$> + (o .:? "dynamicTagEnabled") <*> + (o .:? "imageTagEnabled")) + +instance ToJSON TagSettings where + toJSON TagSettings{..} + = object + (catMaybes + [("dynamicTagEnabled" .=) <$> _tsDynamicTagEnabled, + ("imageTagEnabled" .=) <$> _tsImageTagEnabled]) + +-- | Represents a buy from the DoubleClick Planning inventory store. +-- +-- /See:/ 'inventoryItem' smart constructor. +data InventoryItem = InventoryItem + { _iiPlacementStrategyId :: !(Maybe Int64) + , _iiEstimatedClickThroughRate :: !(Maybe Int64) + , _iiPricing :: !(Maybe (Maybe Pricing)) + , _iiKind :: !Text + , _iiAdvertiserId :: !(Maybe Int64) + , _iiRfpId :: !(Maybe Int64) + , _iiContentCategoryId :: !(Maybe Int64) + , _iiInPlan :: !(Maybe Bool) + , _iiAccountId :: !(Maybe Int64) + , _iiName :: !(Maybe Text) + , _iiAdSlots :: !(Maybe [Maybe AdSlot]) + , _iiNegotiationChannelId :: !(Maybe Int64) + , _iiLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _iiId :: !(Maybe Int64) + , _iiEstimatedConversionRate :: !(Maybe Int64) + , _iiProjectId :: !(Maybe Int64) + , _iiSubaccountId :: !(Maybe Int64) + , _iiOrderId :: !(Maybe Int64) + , _iiSiteId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InventoryItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiPlacementStrategyId' +-- +-- * 'iiEstimatedClickThroughRate' +-- +-- * 'iiPricing' +-- +-- * 'iiKind' +-- +-- * 'iiAdvertiserId' +-- +-- * 'iiRfpId' +-- +-- * 'iiContentCategoryId' +-- +-- * 'iiInPlan' +-- +-- * 'iiAccountId' +-- +-- * 'iiName' +-- +-- * 'iiAdSlots' +-- +-- * 'iiNegotiationChannelId' +-- +-- * 'iiLastModifiedInfo' +-- +-- * 'iiId' +-- +-- * 'iiEstimatedConversionRate' +-- +-- * 'iiProjectId' +-- +-- * 'iiSubaccountId' +-- +-- * 'iiOrderId' +-- +-- * 'iiSiteId' +inventoryItem + :: InventoryItem +inventoryItem = + InventoryItem + { _iiPlacementStrategyId = Nothing + , _iiEstimatedClickThroughRate = Nothing + , _iiPricing = Nothing + , _iiKind = "dfareporting#inventoryItem" + , _iiAdvertiserId = Nothing + , _iiRfpId = Nothing + , _iiContentCategoryId = Nothing + , _iiInPlan = Nothing + , _iiAccountId = Nothing + , _iiName = Nothing + , _iiAdSlots = Nothing + , _iiNegotiationChannelId = Nothing + , _iiLastModifiedInfo = Nothing + , _iiId = Nothing + , _iiEstimatedConversionRate = Nothing + , _iiProjectId = Nothing + , _iiSubaccountId = Nothing + , _iiOrderId = Nothing + , _iiSiteId = Nothing + } + +-- | Placement strategy ID of this inventory item. +iiPlacementStrategyId :: Lens' InventoryItem (Maybe Int64) +iiPlacementStrategyId + = lens _iiPlacementStrategyId + (\ s a -> s{_iiPlacementStrategyId = a}) + +-- | Estimated click-through rate of this inventory item. +iiEstimatedClickThroughRate :: Lens' InventoryItem (Maybe Int64) +iiEstimatedClickThroughRate + = lens _iiEstimatedClickThroughRate + (\ s a -> s{_iiEstimatedClickThroughRate = a}) + +-- | Pricing of this inventory item. +iiPricing :: Lens' InventoryItem (Maybe (Maybe Pricing)) +iiPricing + = lens _iiPricing (\ s a -> s{_iiPricing = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#inventoryItem\". +iiKind :: Lens' InventoryItem Text +iiKind = lens _iiKind (\ s a -> s{_iiKind = a}) + +-- | Advertiser ID of this inventory item. +iiAdvertiserId :: Lens' InventoryItem (Maybe Int64) +iiAdvertiserId + = lens _iiAdvertiserId + (\ s a -> s{_iiAdvertiserId = a}) + +-- | RFP ID of this inventory item. +iiRfpId :: Lens' InventoryItem (Maybe Int64) +iiRfpId = lens _iiRfpId (\ s a -> s{_iiRfpId = a}) + +-- | Content category ID of this inventory item. +iiContentCategoryId :: Lens' InventoryItem (Maybe Int64) +iiContentCategoryId + = lens _iiContentCategoryId + (\ s a -> s{_iiContentCategoryId = a}) + +-- | Whether this inventory item is in plan. +iiInPlan :: Lens' InventoryItem (Maybe Bool) +iiInPlan = lens _iiInPlan (\ s a -> s{_iiInPlan = a}) + +-- | Account ID of this inventory item. +iiAccountId :: Lens' InventoryItem (Maybe Int64) +iiAccountId + = lens _iiAccountId (\ s a -> s{_iiAccountId = a}) + +-- | Name of this inventory item. For standalone inventory items, this is the +-- same name as that of its only ad slot. For group inventory items, this +-- can differ from the name of any of its ad slots. +iiName :: Lens' InventoryItem (Maybe Text) +iiName = lens _iiName (\ s a -> s{_iiName = a}) + +-- | Ad slots of this inventory item. If this inventory item represents a +-- standalone placement, there will be exactly one ad slot. If this +-- inventory item represents a placement group, there will be more than one +-- ad slot, each representing one child placement in that placement group. +iiAdSlots :: Lens' InventoryItem [Maybe AdSlot] +iiAdSlots + = lens _iiAdSlots (\ s a -> s{_iiAdSlots = a}) . + _Default + . _Coerce + +-- | Negotiation channel ID of this inventory item. +iiNegotiationChannelId :: Lens' InventoryItem (Maybe Int64) +iiNegotiationChannelId + = lens _iiNegotiationChannelId + (\ s a -> s{_iiNegotiationChannelId = a}) + +-- | Information about the most recent modification of this inventory item. +iiLastModifiedInfo :: Lens' InventoryItem (Maybe (Maybe LastModifiedInfo)) +iiLastModifiedInfo + = lens _iiLastModifiedInfo + (\ s a -> s{_iiLastModifiedInfo = a}) + +-- | ID of this inventory item. +iiId :: Lens' InventoryItem (Maybe Int64) +iiId = lens _iiId (\ s a -> s{_iiId = a}) + +-- | Estimated conversion rate of this inventory item. +iiEstimatedConversionRate :: Lens' InventoryItem (Maybe Int64) +iiEstimatedConversionRate + = lens _iiEstimatedConversionRate + (\ s a -> s{_iiEstimatedConversionRate = a}) + +-- | Project ID of this inventory item. +iiProjectId :: Lens' InventoryItem (Maybe Int64) +iiProjectId + = lens _iiProjectId (\ s a -> s{_iiProjectId = a}) + +-- | Subaccount ID of this inventory item. +iiSubaccountId :: Lens' InventoryItem (Maybe Int64) +iiSubaccountId + = lens _iiSubaccountId + (\ s a -> s{_iiSubaccountId = a}) + +-- | Order ID of this inventory item. +iiOrderId :: Lens' InventoryItem (Maybe Int64) +iiOrderId + = lens _iiOrderId (\ s a -> s{_iiOrderId = a}) + +-- | ID of the site this inventory item is associated with. +iiSiteId :: Lens' InventoryItem (Maybe Int64) +iiSiteId = lens _iiSiteId (\ s a -> s{_iiSiteId = a}) + +instance FromJSON InventoryItem where + parseJSON + = withObject "InventoryItem" + (\ o -> + InventoryItem <$> + (o .:? "placementStrategyId") <*> + (o .:? "estimatedClickThroughRate") + <*> (o .:? "pricing") + <*> (o .:? "kind" .!= "dfareporting#inventoryItem") + <*> (o .:? "advertiserId") + <*> (o .:? "rfpId") + <*> (o .:? "contentCategoryId") + <*> (o .:? "inPlan") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "adSlots" .!= mempty) + <*> (o .:? "negotiationChannelId") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "estimatedConversionRate") + <*> (o .:? "projectId") + <*> (o .:? "subaccountId") + <*> (o .:? "orderId") + <*> (o .:? "siteId")) + +instance ToJSON InventoryItem where + toJSON InventoryItem{..} + = object + (catMaybes + [("placementStrategyId" .=) <$> + _iiPlacementStrategyId, + ("estimatedClickThroughRate" .=) <$> + _iiEstimatedClickThroughRate, + ("pricing" .=) <$> _iiPricing, + Just ("kind" .= _iiKind), + ("advertiserId" .=) <$> _iiAdvertiserId, + ("rfpId" .=) <$> _iiRfpId, + ("contentCategoryId" .=) <$> _iiContentCategoryId, + ("inPlan" .=) <$> _iiInPlan, + ("accountId" .=) <$> _iiAccountId, + ("name" .=) <$> _iiName, + ("adSlots" .=) <$> _iiAdSlots, + ("negotiationChannelId" .=) <$> + _iiNegotiationChannelId, + ("lastModifiedInfo" .=) <$> _iiLastModifiedInfo, + ("id" .=) <$> _iiId, + ("estimatedConversionRate" .=) <$> + _iiEstimatedConversionRate, + ("projectId" .=) <$> _iiProjectId, + ("subaccountId" .=) <$> _iiSubaccountId, + ("orderId" .=) <$> _iiOrderId, + ("siteId" .=) <$> _iiSiteId]) + +-- | Remarketing List Population Rule. +-- +-- /See:/ 'listPopulationRule' smart constructor. +data ListPopulationRule = ListPopulationRule + { _lprFloodlightActivityName :: !(Maybe Text) + , _lprFloodlightActivityId :: !(Maybe Int64) + , _lprListPopulationClauses :: !(Maybe [Maybe ListPopulationClause]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListPopulationRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lprFloodlightActivityName' +-- +-- * 'lprFloodlightActivityId' +-- +-- * 'lprListPopulationClauses' +listPopulationRule + :: ListPopulationRule +listPopulationRule = + ListPopulationRule + { _lprFloodlightActivityName = Nothing + , _lprFloodlightActivityId = Nothing + , _lprListPopulationClauses = Nothing + } + +-- | Name of floodlight activity associated with this rule. This is a +-- read-only, auto-generated field. +lprFloodlightActivityName :: Lens' ListPopulationRule (Maybe Text) +lprFloodlightActivityName + = lens _lprFloodlightActivityName + (\ s a -> s{_lprFloodlightActivityName = a}) + +-- | Floodlight activity ID associated with this rule. This field can be left +-- blank. +lprFloodlightActivityId :: Lens' ListPopulationRule (Maybe Int64) +lprFloodlightActivityId + = lens _lprFloodlightActivityId + (\ s a -> s{_lprFloodlightActivityId = a}) + +-- | Clauses that make up this list population rule. Clauses are joined by +-- ANDs, and the clauses themselves are made up of list population terms +-- which are joined by ORs. +lprListPopulationClauses :: Lens' ListPopulationRule [Maybe ListPopulationClause] +lprListPopulationClauses + = lens _lprListPopulationClauses + (\ s a -> s{_lprListPopulationClauses = a}) + . _Default + . _Coerce + +instance FromJSON ListPopulationRule where + parseJSON + = withObject "ListPopulationRule" + (\ o -> + ListPopulationRule <$> + (o .:? "floodlightActivityName") <*> + (o .:? "floodlightActivityId") + <*> (o .:? "listPopulationClauses" .!= mempty)) + +instance ToJSON ListPopulationRule where + toJSON ListPopulationRule{..} + = object + (catMaybes + [("floodlightActivityName" .=) <$> + _lprFloodlightActivityName, + ("floodlightActivityId" .=) <$> + _lprFloodlightActivityId, + ("listPopulationClauses" .=) <$> + _lprListPopulationClauses]) + +-- | Creative Rotation. +-- +-- /See:/ 'creativeRotation' smart constructor. +data CreativeRotation = CreativeRotation + { _crWeightCalculationStrategy :: !(Maybe Text) + , _crCreativeAssignments :: !(Maybe [Maybe CreativeAssignment]) + , _crCreativeOptimizationConfigurationId :: !(Maybe Int64) + , _crType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeRotation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crWeightCalculationStrategy' +-- +-- * 'crCreativeAssignments' +-- +-- * 'crCreativeOptimizationConfigurationId' +-- +-- * 'crType' +creativeRotation + :: CreativeRotation +creativeRotation = + CreativeRotation + { _crWeightCalculationStrategy = Nothing + , _crCreativeAssignments = Nothing + , _crCreativeOptimizationConfigurationId = Nothing + , _crType = Nothing + } + +-- | Strategy for calculating weights. Used with +-- CREATIVE_ROTATION_TYPE_RANDOM. +crWeightCalculationStrategy :: Lens' CreativeRotation (Maybe Text) +crWeightCalculationStrategy + = lens _crWeightCalculationStrategy + (\ s a -> s{_crWeightCalculationStrategy = a}) + +-- | Creative assignments in this creative rotation. +crCreativeAssignments :: Lens' CreativeRotation [Maybe CreativeAssignment] +crCreativeAssignments + = lens _crCreativeAssignments + (\ s a -> s{_crCreativeAssignments = a}) + . _Default + . _Coerce + +-- | Creative optimization configuration that is used by this ad. It should +-- refer to one of the existing optimization configurations in the ad\'s +-- campaign. If it is unset or set to 0, then the campaign\'s default +-- optimization configuration will be used for this ad. +crCreativeOptimizationConfigurationId :: Lens' CreativeRotation (Maybe Int64) +crCreativeOptimizationConfigurationId + = lens _crCreativeOptimizationConfigurationId + (\ s a -> + s{_crCreativeOptimizationConfigurationId = a}) + +-- | Type of creative rotation. Can be used to specify whether to use +-- sequential or random rotation. +crType :: Lens' CreativeRotation (Maybe Text) +crType = lens _crType (\ s a -> s{_crType = a}) + +instance FromJSON CreativeRotation where + parseJSON + = withObject "CreativeRotation" + (\ o -> + CreativeRotation <$> + (o .:? "weightCalculationStrategy") <*> + (o .:? "creativeAssignments" .!= mempty) + <*> (o .:? "creativeOptimizationConfigurationId") + <*> (o .:? "type")) + +instance ToJSON CreativeRotation where + toJSON CreativeRotation{..} + = object + (catMaybes + [("weightCalculationStrategy" .=) <$> + _crWeightCalculationStrategy, + ("creativeAssignments" .=) <$> + _crCreativeAssignments, + ("creativeOptimizationConfigurationId" .=) <$> + _crCreativeOptimizationConfigurationId, + ("type" .=) <$> _crType]) + +-- | Size List Response +-- +-- /See:/ 'sizesListResponse' smart constructor. +data SizesListResponse = SizesListResponse + { _sKind :: !Text + , _sSizes :: !(Maybe [Maybe Size]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SizesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sSizes' +sizesListResponse + :: SizesListResponse +sizesListResponse = + SizesListResponse + { _sKind = "dfareporting#sizesListResponse" + , _sSizes = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#sizesListResponse\". +sKind :: Lens' SizesListResponse Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | Size collection. +sSizes :: Lens' SizesListResponse [Maybe Size] +sSizes + = lens _sSizes (\ s a -> s{_sSizes = a}) . _Default . + _Coerce + +instance FromJSON SizesListResponse where + parseJSON + = withObject "SizesListResponse" + (\ o -> + SizesListResponse <$> + (o .:? "kind" .!= "dfareporting#sizesListResponse") + <*> (o .:? "sizes" .!= mempty)) + +instance ToJSON SizesListResponse where + toJSON SizesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _sKind), ("sizes" .=) <$> _sSizes]) + +-- | DirectorySites contains properties of a website from the Site Directory. +-- Sites need to be added to an account via the Sites resource before they +-- can be assigned to a placement. +-- +-- /See:/ 'directorySite' smart constructor. +data DirectorySite = DirectorySite + { _dsCurrencyId :: !(Maybe Int64) + , _dsSettings :: !(Maybe (Maybe DirectorySiteSettings)) + , _dsInterstitialTagFormats :: !(Maybe [Text]) + , _dsKind :: !Text + , _dsUrl :: !(Maybe Text) + , _dsIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _dsInpageTagFormats :: !(Maybe [Text]) + , _dsActive :: !(Maybe Bool) + , _dsName :: !(Maybe Text) + , _dsId :: !(Maybe Int64) + , _dsCountryId :: !(Maybe Int64) + , _dsContactAssignments :: !(Maybe [Maybe DirectorySiteContactAssignment]) + , _dsDescription :: !(Maybe Text) + , _dsParentId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySite' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsCurrencyId' +-- +-- * 'dsSettings' +-- +-- * 'dsInterstitialTagFormats' +-- +-- * 'dsKind' +-- +-- * 'dsUrl' +-- +-- * 'dsIdDimensionValue' +-- +-- * 'dsInpageTagFormats' +-- +-- * 'dsActive' +-- +-- * 'dsName' +-- +-- * 'dsId' +-- +-- * 'dsCountryId' +-- +-- * 'dsContactAssignments' +-- +-- * 'dsDescription' +-- +-- * 'dsParentId' +directorySite + :: DirectorySite +directorySite = + DirectorySite + { _dsCurrencyId = Nothing + , _dsSettings = Nothing + , _dsInterstitialTagFormats = Nothing + , _dsKind = "dfareporting#directorySite" + , _dsUrl = Nothing + , _dsIdDimensionValue = Nothing + , _dsInpageTagFormats = Nothing + , _dsActive = Nothing + , _dsName = Nothing + , _dsId = Nothing + , _dsCountryId = Nothing + , _dsContactAssignments = Nothing + , _dsDescription = Nothing + , _dsParentId = Nothing + } + +-- | Currency ID of this directory site. Possible values are: - \"1\" for USD +-- - \"2\" for GBP - \"3\" for ESP - \"4\" for SEK - \"5\" for CAD - \"6\" +-- for JPY - \"7\" for DEM - \"8\" for AUD - \"9\" for FRF - \"10\" for ITL +-- - \"11\" for DKK - \"12\" for NOK - \"13\" for FIM - \"14\" for ZAR - +-- \"15\" for IEP - \"16\" for NLG - \"17\" for EUR - \"18\" for KRW - +-- \"19\" for TWD - \"20\" for SGD - \"21\" for CNY - \"22\" for HKD - +-- \"23\" for NZD - \"24\" for MYR - \"25\" for BRL - \"26\" for PTE - +-- \"27\" for MXP - \"28\" for CLP - \"29\" for TRY - \"30\" for ARS - +-- \"31\" for PEN - \"32\" for ILS - \"33\" for CHF - \"34\" for VEF - +-- \"35\" for COP - \"36\" for GTQ +dsCurrencyId :: Lens' DirectorySite (Maybe Int64) +dsCurrencyId + = lens _dsCurrencyId (\ s a -> s{_dsCurrencyId = a}) + +-- | Directory site settings. +dsSettings :: Lens' DirectorySite (Maybe (Maybe DirectorySiteSettings)) +dsSettings + = lens _dsSettings (\ s a -> s{_dsSettings = a}) + +-- | Tag types for interstitial placements. Acceptable values are: - +-- \"IFRAME_JAVASCRIPT_INTERSTITIAL\" - \"INTERNAL_REDIRECT_INTERSTITIAL\" +-- - \"JAVASCRIPT_INTERSTITIAL\" +dsInterstitialTagFormats :: Lens' DirectorySite [Text] +dsInterstitialTagFormats + = lens _dsInterstitialTagFormats + (\ s a -> s{_dsInterstitialTagFormats = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#directorySite\". +dsKind :: Lens' DirectorySite Text +dsKind = lens _dsKind (\ s a -> s{_dsKind = a}) + +-- | URL of this directory site. +dsUrl :: Lens' DirectorySite (Maybe Text) +dsUrl = lens _dsUrl (\ s a -> s{_dsUrl = a}) + +-- | Dimension value for the ID of this directory site. This is a read-only, +-- auto-generated field. +dsIdDimensionValue :: Lens' DirectorySite (Maybe (Maybe DimensionValue)) +dsIdDimensionValue + = lens _dsIdDimensionValue + (\ s a -> s{_dsIdDimensionValue = a}) + +-- | Tag types for regular placements. Acceptable values are: - \"STANDARD\" +-- - \"IFRAME_JAVASCRIPT_INPAGE\" - \"INTERNAL_REDIRECT_INPAGE\" - +-- \"JAVASCRIPT_INPAGE\" +dsInpageTagFormats :: Lens' DirectorySite [Text] +dsInpageTagFormats + = lens _dsInpageTagFormats + (\ s a -> s{_dsInpageTagFormats = a}) + . _Default + . _Coerce + +-- | Whether this directory site is active. +dsActive :: Lens' DirectorySite (Maybe Bool) +dsActive = lens _dsActive (\ s a -> s{_dsActive = a}) + +-- | Name of this directory site. +dsName :: Lens' DirectorySite (Maybe Text) +dsName = lens _dsName (\ s a -> s{_dsName = a}) + +-- | ID of this directory site. This is a read-only, auto-generated field. +dsId :: Lens' DirectorySite (Maybe Int64) +dsId = lens _dsId (\ s a -> s{_dsId = a}) + +-- | Country ID of this directory site. +dsCountryId :: Lens' DirectorySite (Maybe Int64) +dsCountryId + = lens _dsCountryId (\ s a -> s{_dsCountryId = a}) + +-- | Directory site contacts. +dsContactAssignments :: Lens' DirectorySite [Maybe DirectorySiteContactAssignment] +dsContactAssignments + = lens _dsContactAssignments + (\ s a -> s{_dsContactAssignments = a}) + . _Default + . _Coerce + +-- | Description of this directory site. +dsDescription :: Lens' DirectorySite (Maybe Text) +dsDescription + = lens _dsDescription + (\ s a -> s{_dsDescription = a}) + +-- | Parent directory site ID. +dsParentId :: Lens' DirectorySite (Maybe Int64) +dsParentId + = lens _dsParentId (\ s a -> s{_dsParentId = a}) + +instance FromJSON DirectorySite where + parseJSON + = withObject "DirectorySite" + (\ o -> + DirectorySite <$> + (o .:? "currencyId") <*> (o .:? "settings") <*> + (o .:? "interstitialTagFormats" .!= mempty) + <*> (o .:? "kind" .!= "dfareporting#directorySite") + <*> (o .:? "url") + <*> (o .:? "idDimensionValue") + <*> (o .:? "inpageTagFormats" .!= mempty) + <*> (o .:? "active") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "countryId") + <*> (o .:? "contactAssignments" .!= mempty) + <*> (o .:? "description") + <*> (o .:? "parentId")) + +instance ToJSON DirectorySite where + toJSON DirectorySite{..} + = object + (catMaybes + [("currencyId" .=) <$> _dsCurrencyId, + ("settings" .=) <$> _dsSettings, + ("interstitialTagFormats" .=) <$> + _dsInterstitialTagFormats, + Just ("kind" .= _dsKind), ("url" .=) <$> _dsUrl, + ("idDimensionValue" .=) <$> _dsIdDimensionValue, + ("inpageTagFormats" .=) <$> _dsInpageTagFormats, + ("active" .=) <$> _dsActive, ("name" .=) <$> _dsName, + ("id" .=) <$> _dsId, + ("countryId" .=) <$> _dsCountryId, + ("contactAssignments" .=) <$> _dsContactAssignments, + ("description" .=) <$> _dsDescription, + ("parentId" .=) <$> _dsParentId]) + +-- | Floodlight Activity List Response +-- +-- /See:/ 'floodlightActivitiesListResponse' smart constructor. +data FloodlightActivitiesListResponse = FloodlightActivitiesListResponse + { _falrNextPageToken :: !(Maybe Text) + , _falrKind :: !Text + , _falrFloodlightActivities :: !(Maybe [Maybe FloodlightActivity]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'falrNextPageToken' +-- +-- * 'falrKind' +-- +-- * 'falrFloodlightActivities' +floodlightActivitiesListResponse + :: FloodlightActivitiesListResponse +floodlightActivitiesListResponse = + FloodlightActivitiesListResponse + { _falrNextPageToken = Nothing + , _falrKind = "dfareporting#floodlightActivitiesListResponse" + , _falrFloodlightActivities = Nothing + } + +-- | Pagination token to be used for the next list operation. +falrNextPageToken :: Lens' FloodlightActivitiesListResponse (Maybe Text) +falrNextPageToken + = lens _falrNextPageToken + (\ s a -> s{_falrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightActivitiesListResponse\". +falrKind :: Lens' FloodlightActivitiesListResponse Text +falrKind = lens _falrKind (\ s a -> s{_falrKind = a}) + +-- | Floodlight activity collection. +falrFloodlightActivities :: Lens' FloodlightActivitiesListResponse [Maybe FloodlightActivity] +falrFloodlightActivities + = lens _falrFloodlightActivities + (\ s a -> s{_falrFloodlightActivities = a}) + . _Default + . _Coerce + +instance FromJSON FloodlightActivitiesListResponse + where + parseJSON + = withObject "FloodlightActivitiesListResponse" + (\ o -> + FloodlightActivitiesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#floodlightActivitiesListResponse") + <*> (o .:? "floodlightActivities" .!= mempty)) + +instance ToJSON FloodlightActivitiesListResponse + where + toJSON FloodlightActivitiesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _falrNextPageToken, + Just ("kind" .= _falrKind), + ("floodlightActivities" .=) <$> + _falrFloodlightActivities]) + +-- | Represents fields that are compatible to be selected for a report of +-- type \"CROSS_DIMENSION_REACH\". +-- +-- /See:/ 'crossDimensionReachReportCompatibleFields' smart constructor. +data CrossDimensionReachReportCompatibleFields = CrossDimensionReachReportCompatibleFields + { _cdrrcfMetrics :: !(Maybe [Maybe Metric]) + , _cdrrcfBreakdown :: !(Maybe [Maybe Dimension]) + , _cdrrcfKind :: !Text + , _cdrrcfDimensionFilters :: !(Maybe [Maybe Dimension]) + , _cdrrcfOverlapMetrics :: !(Maybe [Maybe Metric]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CrossDimensionReachReportCompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdrrcfMetrics' +-- +-- * 'cdrrcfBreakdown' +-- +-- * 'cdrrcfKind' +-- +-- * 'cdrrcfDimensionFilters' +-- +-- * 'cdrrcfOverlapMetrics' +crossDimensionReachReportCompatibleFields + :: CrossDimensionReachReportCompatibleFields +crossDimensionReachReportCompatibleFields = + CrossDimensionReachReportCompatibleFields + { _cdrrcfMetrics = Nothing + , _cdrrcfBreakdown = Nothing + , _cdrrcfKind = "dfareporting#crossDimensionReachReportCompatibleFields" + , _cdrrcfDimensionFilters = Nothing + , _cdrrcfOverlapMetrics = Nothing + } + +-- | Metrics which are compatible to be selected in the \"metricNames\" +-- section of the report. +cdrrcfMetrics :: Lens' CrossDimensionReachReportCompatibleFields [Maybe Metric] +cdrrcfMetrics + = lens _cdrrcfMetrics + (\ s a -> s{_cdrrcfMetrics = a}) + . _Default + . _Coerce + +-- | Dimensions which are compatible to be selected in the \"breakdown\" +-- section of the report. +cdrrcfBreakdown :: Lens' CrossDimensionReachReportCompatibleFields [Maybe Dimension] +cdrrcfBreakdown + = lens _cdrrcfBreakdown + (\ s a -> s{_cdrrcfBreakdown = a}) + . _Default + . _Coerce + +-- | The kind of resource this is, in this case +-- dfareporting#crossDimensionReachReportCompatibleFields. +cdrrcfKind :: Lens' CrossDimensionReachReportCompatibleFields Text +cdrrcfKind + = lens _cdrrcfKind (\ s a -> s{_cdrrcfKind = a}) + +-- | Dimensions which are compatible to be selected in the +-- \"dimensionFilters\" section of the report. +cdrrcfDimensionFilters :: Lens' CrossDimensionReachReportCompatibleFields [Maybe Dimension] +cdrrcfDimensionFilters + = lens _cdrrcfDimensionFilters + (\ s a -> s{_cdrrcfDimensionFilters = a}) + . _Default + . _Coerce + +-- | Metrics which are compatible to be selected in the +-- \"overlapMetricNames\" section of the report. +cdrrcfOverlapMetrics :: Lens' CrossDimensionReachReportCompatibleFields [Maybe Metric] +cdrrcfOverlapMetrics + = lens _cdrrcfOverlapMetrics + (\ s a -> s{_cdrrcfOverlapMetrics = a}) + . _Default + . _Coerce + +instance FromJSON + CrossDimensionReachReportCompatibleFields where + parseJSON + = withObject + "CrossDimensionReachReportCompatibleFields" + (\ o -> + CrossDimensionReachReportCompatibleFields <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "breakdown" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#crossDimensionReachReportCompatibleFields") + <*> (o .:? "dimensionFilters" .!= mempty) + <*> (o .:? "overlapMetrics" .!= mempty)) + +instance ToJSON + CrossDimensionReachReportCompatibleFields where + toJSON CrossDimensionReachReportCompatibleFields{..} + = object + (catMaybes + [("metrics" .=) <$> _cdrrcfMetrics, + ("breakdown" .=) <$> _cdrrcfBreakdown, + Just ("kind" .= _cdrrcfKind), + ("dimensionFilters" .=) <$> _cdrrcfDimensionFilters, + ("overlapMetrics" .=) <$> _cdrrcfOverlapMetrics]) + +-- | FsCommand. +-- +-- /See:/ 'fsCommand' smart constructor. +data FsCommand = FsCommand + { _fcPositionOption :: !(Maybe Text) + , _fcLeft :: !(Maybe Int32) + , _fcWindowHeight :: !(Maybe Int32) + , _fcWindowWidth :: !(Maybe Int32) + , _fcTop :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FsCommand' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcPositionOption' +-- +-- * 'fcLeft' +-- +-- * 'fcWindowHeight' +-- +-- * 'fcWindowWidth' +-- +-- * 'fcTop' +fsCommand + :: FsCommand +fsCommand = + FsCommand + { _fcPositionOption = Nothing + , _fcLeft = Nothing + , _fcWindowHeight = Nothing + , _fcWindowWidth = Nothing + , _fcTop = Nothing + } + +-- | Position in the browser where the window will open. +fcPositionOption :: Lens' FsCommand (Maybe Text) +fcPositionOption + = lens _fcPositionOption + (\ s a -> s{_fcPositionOption = a}) + +-- | Distance from the left of the browser.Applicable when positionOption is +-- DISTANCE_FROM_TOP_LEFT_CORNER. +fcLeft :: Lens' FsCommand (Maybe Int32) +fcLeft = lens _fcLeft (\ s a -> s{_fcLeft = a}) + +-- | Height of the window. +fcWindowHeight :: Lens' FsCommand (Maybe Int32) +fcWindowHeight + = lens _fcWindowHeight + (\ s a -> s{_fcWindowHeight = a}) + +-- | Width of the window. +fcWindowWidth :: Lens' FsCommand (Maybe Int32) +fcWindowWidth + = lens _fcWindowWidth + (\ s a -> s{_fcWindowWidth = a}) + +-- | Distance from the top of the browser. Applicable when positionOption is +-- DISTANCE_FROM_TOP_LEFT_CORNER. +fcTop :: Lens' FsCommand (Maybe Int32) +fcTop = lens _fcTop (\ s a -> s{_fcTop = a}) + +instance FromJSON FsCommand where + parseJSON + = withObject "FsCommand" + (\ o -> + FsCommand <$> + (o .:? "positionOption") <*> (o .:? "left") <*> + (o .:? "windowHeight") + <*> (o .:? "windowWidth") + <*> (o .:? "top")) + +instance ToJSON FsCommand where + toJSON FsCommand{..} + = object + (catMaybes + [("positionOption" .=) <$> _fcPositionOption, + ("left" .=) <$> _fcLeft, + ("windowHeight" .=) <$> _fcWindowHeight, + ("windowWidth" .=) <$> _fcWindowWidth, + ("top" .=) <$> _fcTop]) + +-- | Creative optimization settings. +-- +-- /See:/ 'creativeOptimizationConfiguration' smart constructor. +data CreativeOptimizationConfiguration = CreativeOptimizationConfiguration + { _cocOptimizationModel :: !(Maybe Text) + , _cocName :: !(Maybe Text) + , _cocOptimizationActivitys :: !(Maybe [Maybe OptimizationActivity]) + , _cocId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeOptimizationConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cocOptimizationModel' +-- +-- * 'cocName' +-- +-- * 'cocOptimizationActivitys' +-- +-- * 'cocId' +creativeOptimizationConfiguration + :: CreativeOptimizationConfiguration +creativeOptimizationConfiguration = + CreativeOptimizationConfiguration + { _cocOptimizationModel = Nothing + , _cocName = Nothing + , _cocOptimizationActivitys = Nothing + , _cocId = Nothing + } + +-- | Optimization model for this configuration. +cocOptimizationModel :: Lens' CreativeOptimizationConfiguration (Maybe Text) +cocOptimizationModel + = lens _cocOptimizationModel + (\ s a -> s{_cocOptimizationModel = a}) + +-- | Name of this creative optimization config. This is a required field and +-- must be less than 129 characters long. +cocName :: Lens' CreativeOptimizationConfiguration (Maybe Text) +cocName = lens _cocName (\ s a -> s{_cocName = a}) + +-- | List of optimization activities associated with this configuration. +cocOptimizationActivitys :: Lens' CreativeOptimizationConfiguration [Maybe OptimizationActivity] +cocOptimizationActivitys + = lens _cocOptimizationActivitys + (\ s a -> s{_cocOptimizationActivitys = a}) + . _Default + . _Coerce + +-- | ID of this creative optimization config. This field is auto-generated +-- when the campaign is inserted or updated. It can be null for existing +-- campaigns. +cocId :: Lens' CreativeOptimizationConfiguration (Maybe Int64) +cocId = lens _cocId (\ s a -> s{_cocId = a}) + +instance FromJSON CreativeOptimizationConfiguration + where + parseJSON + = withObject "CreativeOptimizationConfiguration" + (\ o -> + CreativeOptimizationConfiguration <$> + (o .:? "optimizationModel") <*> (o .:? "name") <*> + (o .:? "optimizationActivitys" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON CreativeOptimizationConfiguration + where + toJSON CreativeOptimizationConfiguration{..} + = object + (catMaybes + [("optimizationModel" .=) <$> _cocOptimizationModel, + ("name" .=) <$> _cocName, + ("optimizationActivitys" .=) <$> + _cocOptimizationActivitys, + ("id" .=) <$> _cocId]) + +-- | Dynamic Tag +-- +-- /See:/ 'floodlightActivityDynamicTag' smart constructor. +data FloodlightActivityDynamicTag = FloodlightActivityDynamicTag + { _fadtTag :: !(Maybe Text) + , _fadtName :: !(Maybe Text) + , _fadtId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityDynamicTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fadtTag' +-- +-- * 'fadtName' +-- +-- * 'fadtId' +floodlightActivityDynamicTag + :: FloodlightActivityDynamicTag +floodlightActivityDynamicTag = + FloodlightActivityDynamicTag + { _fadtTag = Nothing + , _fadtName = Nothing + , _fadtId = Nothing + } + +-- | Tag code. +fadtTag :: Lens' FloodlightActivityDynamicTag (Maybe Text) +fadtTag = lens _fadtTag (\ s a -> s{_fadtTag = a}) + +-- | Name of this tag. +fadtName :: Lens' FloodlightActivityDynamicTag (Maybe Text) +fadtName = lens _fadtName (\ s a -> s{_fadtName = a}) + +-- | ID of this dynamic tag. This is a read-only, auto-generated field. +fadtId :: Lens' FloodlightActivityDynamicTag (Maybe Int64) +fadtId = lens _fadtId (\ s a -> s{_fadtId = a}) + +instance FromJSON FloodlightActivityDynamicTag where + parseJSON + = withObject "FloodlightActivityDynamicTag" + (\ o -> + FloodlightActivityDynamicTag <$> + (o .:? "tag") <*> (o .:? "name") <*> (o .:? "id")) + +instance ToJSON FloodlightActivityDynamicTag where + toJSON FloodlightActivityDynamicTag{..} + = object + (catMaybes + [("tag" .=) <$> _fadtTag, ("name" .=) <$> _fadtName, + ("id" .=) <$> _fadtId]) + +-- | Placement Assignment. +-- +-- /See:/ 'placementAssignment' smart constructor. +data PlacementAssignment = PlacementAssignment + { _paPlacementId :: !(Maybe Int64) + , _paPlacementIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _paActive :: !(Maybe Bool) + , _paSslRequired :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'paPlacementId' +-- +-- * 'paPlacementIdDimensionValue' +-- +-- * 'paActive' +-- +-- * 'paSslRequired' +placementAssignment + :: PlacementAssignment +placementAssignment = + PlacementAssignment + { _paPlacementId = Nothing + , _paPlacementIdDimensionValue = Nothing + , _paActive = Nothing + , _paSslRequired = Nothing + } + +-- | ID of the placement to be assigned. This is a required field. +paPlacementId :: Lens' PlacementAssignment (Maybe Int64) +paPlacementId + = lens _paPlacementId + (\ s a -> s{_paPlacementId = a}) + +-- | Dimension value for the ID of the placement. This is a read-only, +-- auto-generated field. +paPlacementIdDimensionValue :: Lens' PlacementAssignment (Maybe (Maybe DimensionValue)) +paPlacementIdDimensionValue + = lens _paPlacementIdDimensionValue + (\ s a -> s{_paPlacementIdDimensionValue = a}) + +-- | Whether this placement assignment is active. When true, the placement +-- will be included in the ad\'s rotation. +paActive :: Lens' PlacementAssignment (Maybe Bool) +paActive = lens _paActive (\ s a -> s{_paActive = a}) + +-- | Whether the placement to be assigned requires SSL. This is a read-only +-- field that is auto-generated when the ad is inserted or updated. +paSslRequired :: Lens' PlacementAssignment (Maybe Bool) +paSslRequired + = lens _paSslRequired + (\ s a -> s{_paSslRequired = a}) + +instance FromJSON PlacementAssignment where + parseJSON + = withObject "PlacementAssignment" + (\ o -> + PlacementAssignment <$> + (o .:? "placementId") <*> + (o .:? "placementIdDimensionValue") + <*> (o .:? "active") + <*> (o .:? "sslRequired")) + +instance ToJSON PlacementAssignment where + toJSON PlacementAssignment{..} + = object + (catMaybes + [("placementId" .=) <$> _paPlacementId, + ("placementIdDimensionValue" .=) <$> + _paPlacementIdDimensionValue, + ("active" .=) <$> _paActive, + ("sslRequired" .=) <$> _paSslRequired]) + +-- | Contains properties of a creative field value. +-- +-- /See:/ 'creativeFieldValue' smart constructor. +data CreativeFieldValue = CreativeFieldValue + { _cfvKind :: !Text + , _cfvValue :: !(Maybe Text) + , _cfvId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvKind' +-- +-- * 'cfvValue' +-- +-- * 'cfvId' +creativeFieldValue + :: CreativeFieldValue +creativeFieldValue = + CreativeFieldValue + { _cfvKind = "dfareporting#creativeFieldValue" + , _cfvValue = Nothing + , _cfvId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeFieldValue\". +cfvKind :: Lens' CreativeFieldValue Text +cfvKind = lens _cfvKind (\ s a -> s{_cfvKind = a}) + +-- | Value of this creative field value. It needs to be less than 256 +-- characters in length and unique per creative field. +cfvValue :: Lens' CreativeFieldValue (Maybe Text) +cfvValue = lens _cfvValue (\ s a -> s{_cfvValue = a}) + +-- | ID of this creative field value. This is a read-only, auto-generated +-- field. +cfvId :: Lens' CreativeFieldValue (Maybe Int64) +cfvId = lens _cfvId (\ s a -> s{_cfvId = a}) + +instance FromJSON CreativeFieldValue where + parseJSON + = withObject "CreativeFieldValue" + (\ o -> + CreativeFieldValue <$> + (o .:? "kind" .!= "dfareporting#creativeFieldValue") + <*> (o .:? "value") + <*> (o .:? "id")) + +instance ToJSON CreativeFieldValue where + toJSON CreativeFieldValue{..} + = object + (catMaybes + [Just ("kind" .= _cfvKind), + ("value" .=) <$> _cfvValue, ("id" .=) <$> _cfvId]) + +-- | Placement Tag Data +-- +-- /See:/ 'tagData' smart constructor. +data TagData = TagData + { _tdClickTag :: !(Maybe Text) + , _tdFormat :: !(Maybe Text) + , _tdCreativeId :: !(Maybe Int64) + , _tdAdId :: !(Maybe Int64) + , _tdImpressionTag :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TagData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdClickTag' +-- +-- * 'tdFormat' +-- +-- * 'tdCreativeId' +-- +-- * 'tdAdId' +-- +-- * 'tdImpressionTag' +tagData + :: TagData +tagData = + TagData + { _tdClickTag = Nothing + , _tdFormat = Nothing + , _tdCreativeId = Nothing + , _tdAdId = Nothing + , _tdImpressionTag = Nothing + } + +-- | Tag string to record a click. +tdClickTag :: Lens' TagData (Maybe Text) +tdClickTag + = lens _tdClickTag (\ s a -> s{_tdClickTag = a}) + +-- | TagData tag format of this tag. +tdFormat :: Lens' TagData (Maybe Text) +tdFormat = lens _tdFormat (\ s a -> s{_tdFormat = a}) + +-- | Creative associated with this placement tag. +tdCreativeId :: Lens' TagData (Maybe Int64) +tdCreativeId + = lens _tdCreativeId (\ s a -> s{_tdCreativeId = a}) + +-- | Ad associated with this placement tag. +tdAdId :: Lens' TagData (Maybe Int64) +tdAdId = lens _tdAdId (\ s a -> s{_tdAdId = a}) + +-- | Tag string for serving an ad. +tdImpressionTag :: Lens' TagData (Maybe Text) +tdImpressionTag + = lens _tdImpressionTag + (\ s a -> s{_tdImpressionTag = a}) + +instance FromJSON TagData where + parseJSON + = withObject "TagData" + (\ o -> + TagData <$> + (o .:? "clickTag") <*> (o .:? "format") <*> + (o .:? "creativeId") + <*> (o .:? "adId") + <*> (o .:? "impressionTag")) + +instance ToJSON TagData where + toJSON TagData{..} + = object + (catMaybes + [("clickTag" .=) <$> _tdClickTag, + ("format" .=) <$> _tdFormat, + ("creativeId" .=) <$> _tdCreativeId, + ("adId" .=) <$> _tdAdId, + ("impressionTag" .=) <$> _tdImpressionTag]) + +-- | Day Part Targeting. +-- +-- /See:/ 'dayPartTargeting' smart constructor. +data DayPartTargeting = DayPartTargeting + { _dptDaysOfWeek :: !(Maybe [Text]) + , _dptHoursOfDay :: !(Maybe [Int32]) + , _dptUserLocalTime :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DayPartTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dptDaysOfWeek' +-- +-- * 'dptHoursOfDay' +-- +-- * 'dptUserLocalTime' +dayPartTargeting + :: DayPartTargeting +dayPartTargeting = + DayPartTargeting + { _dptDaysOfWeek = Nothing + , _dptHoursOfDay = Nothing + , _dptUserLocalTime = Nothing + } + +-- | Days of the week when the ad will serve. Acceptable values are: - +-- \"SUNDAY\" - \"MONDAY\" - \"TUESDAY\" - \"WEDNESDAY\" - \"THURSDAY\" - +-- \"FRIDAY\" - \"SATURDAY\" +dptDaysOfWeek :: Lens' DayPartTargeting [Text] +dptDaysOfWeek + = lens _dptDaysOfWeek + (\ s a -> s{_dptDaysOfWeek = a}) + . _Default + . _Coerce + +-- | Hours of the day when the ad will serve. Must be an integer between 0 +-- and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to +-- midnight. Can be specified with days of week, in which case the ad would +-- serve during these hours on the specified days. For example, if Monday, +-- Wednesday, Friday are the days of week specified and 9-10am, 3-5pm +-- (hours 9, 15, and 16) is specified, the ad would serve Monday, +-- Wednesdays, and Fridays at 9-10am and 3-5pm. +dptHoursOfDay :: Lens' DayPartTargeting [Int32] +dptHoursOfDay + = lens _dptHoursOfDay + (\ s a -> s{_dptHoursOfDay = a}) + . _Default + . _Coerce + +-- | Whether or not to use the user\'s local time. If false, the America\/New +-- York time zone applies. +dptUserLocalTime :: Lens' DayPartTargeting (Maybe Bool) +dptUserLocalTime + = lens _dptUserLocalTime + (\ s a -> s{_dptUserLocalTime = a}) + +instance FromJSON DayPartTargeting where + parseJSON + = withObject "DayPartTargeting" + (\ o -> + DayPartTargeting <$> + (o .:? "daysOfWeek" .!= mempty) <*> + (o .:? "hoursOfDay" .!= mempty) + <*> (o .:? "userLocalTime")) + +instance ToJSON DayPartTargeting where + toJSON DayPartTargeting{..} + = object + (catMaybes + [("daysOfWeek" .=) <$> _dptDaysOfWeek, + ("hoursOfDay" .=) <$> _dptHoursOfDay, + ("userLocalTime" .=) <$> _dptUserLocalTime]) + +-- | Region List Response +-- +-- /See:/ 'regionsListResponse' smart constructor. +data RegionsListResponse = RegionsListResponse + { _rlrKind :: !Text + , _rlrRegions :: !(Maybe [Maybe Region]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlrKind' +-- +-- * 'rlrRegions' +regionsListResponse + :: RegionsListResponse +regionsListResponse = + RegionsListResponse + { _rlrKind = "dfareporting#regionsListResponse" + , _rlrRegions = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#regionsListResponse\". +rlrKind :: Lens' RegionsListResponse Text +rlrKind = lens _rlrKind (\ s a -> s{_rlrKind = a}) + +-- | Region collection. +rlrRegions :: Lens' RegionsListResponse [Maybe Region] +rlrRegions + = lens _rlrRegions (\ s a -> s{_rlrRegions = a}) . + _Default + . _Coerce + +instance FromJSON RegionsListResponse where + parseJSON + = withObject "RegionsListResponse" + (\ o -> + RegionsListResponse <$> + (o .:? "kind" .!= "dfareporting#regionsListResponse") + <*> (o .:? "regions" .!= mempty)) + +instance ToJSON RegionsListResponse where + toJSON RegionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _rlrKind), + ("regions" .=) <$> _rlrRegions]) + +-- | Contains properties of a Site Directory contact. +-- +-- /See:/ 'directorySiteContact' smart constructor. +data DirectorySiteContact = DirectorySiteContact + { _dscEmail :: !(Maybe Text) + , _dscPhone :: !(Maybe Text) + , _dscLastName :: !(Maybe Text) + , _dscKind :: !Text + , _dscAddress :: !(Maybe Text) + , _dscRole :: !(Maybe Text) + , _dscFirstName :: !(Maybe Text) + , _dscId :: !(Maybe Int64) + , _dscTitle :: !(Maybe Text) + , _dscType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteContact' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dscEmail' +-- +-- * 'dscPhone' +-- +-- * 'dscLastName' +-- +-- * 'dscKind' +-- +-- * 'dscAddress' +-- +-- * 'dscRole' +-- +-- * 'dscFirstName' +-- +-- * 'dscId' +-- +-- * 'dscTitle' +-- +-- * 'dscType' +directorySiteContact + :: DirectorySiteContact +directorySiteContact = + DirectorySiteContact + { _dscEmail = Nothing + , _dscPhone = Nothing + , _dscLastName = Nothing + , _dscKind = "dfareporting#directorySiteContact" + , _dscAddress = Nothing + , _dscRole = Nothing + , _dscFirstName = Nothing + , _dscId = Nothing + , _dscTitle = Nothing + , _dscType = Nothing + } + +-- | Email address of this directory site contact. +dscEmail :: Lens' DirectorySiteContact (Maybe Text) +dscEmail = lens _dscEmail (\ s a -> s{_dscEmail = a}) + +-- | Phone number of this directory site contact. +dscPhone :: Lens' DirectorySiteContact (Maybe Text) +dscPhone = lens _dscPhone (\ s a -> s{_dscPhone = a}) + +-- | Last name of this directory site contact. +dscLastName :: Lens' DirectorySiteContact (Maybe Text) +dscLastName + = lens _dscLastName (\ s a -> s{_dscLastName = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#directorySiteContact\". +dscKind :: Lens' DirectorySiteContact Text +dscKind = lens _dscKind (\ s a -> s{_dscKind = a}) + +-- | Address of this directory site contact. +dscAddress :: Lens' DirectorySiteContact (Maybe Text) +dscAddress + = lens _dscAddress (\ s a -> s{_dscAddress = a}) + +-- | Directory site contact role. +dscRole :: Lens' DirectorySiteContact (Maybe Text) +dscRole = lens _dscRole (\ s a -> s{_dscRole = a}) + +-- | First name of this directory site contact. +dscFirstName :: Lens' DirectorySiteContact (Maybe Text) +dscFirstName + = lens _dscFirstName (\ s a -> s{_dscFirstName = a}) + +-- | ID of this directory site contact. This is a read-only, auto-generated +-- field. +dscId :: Lens' DirectorySiteContact (Maybe Int64) +dscId = lens _dscId (\ s a -> s{_dscId = a}) + +-- | Title or designation of this directory site contact. +dscTitle :: Lens' DirectorySiteContact (Maybe Text) +dscTitle = lens _dscTitle (\ s a -> s{_dscTitle = a}) + +-- | Directory site contact type. +dscType :: Lens' DirectorySiteContact (Maybe Text) +dscType = lens _dscType (\ s a -> s{_dscType = a}) + +instance FromJSON DirectorySiteContact where + parseJSON + = withObject "DirectorySiteContact" + (\ o -> + DirectorySiteContact <$> + (o .:? "email") <*> (o .:? "phone") <*> + (o .:? "lastName") + <*> + (o .:? "kind" .!= + "dfareporting#directorySiteContact") + <*> (o .:? "address") + <*> (o .:? "role") + <*> (o .:? "firstName") + <*> (o .:? "id") + <*> (o .:? "title") + <*> (o .:? "type")) + +instance ToJSON DirectorySiteContact where + toJSON DirectorySiteContact{..} + = object + (catMaybes + [("email" .=) <$> _dscEmail, + ("phone" .=) <$> _dscPhone, + ("lastName" .=) <$> _dscLastName, + Just ("kind" .= _dscKind), + ("address" .=) <$> _dscAddress, + ("role" .=) <$> _dscRole, + ("firstName" .=) <$> _dscFirstName, + ("id" .=) <$> _dscId, ("title" .=) <$> _dscTitle, + ("type" .=) <$> _dscType]) + +-- | Contains properties of a Floodlight activity group. +-- +-- /See:/ 'floodlightActivityGroup' smart constructor. +data FloodlightActivityGroup = FloodlightActivityGroup + { _fagTagString :: !(Maybe Text) + , _fagFloodlightConfigurationId :: !(Maybe Int64) + , _fagKind :: !Text + , _fagAdvertiserId :: !(Maybe Int64) + , _fagAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _fagIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _fagAccountId :: !(Maybe Int64) + , _fagName :: !(Maybe Text) + , _fagId :: !(Maybe Int64) + , _fagSubaccountId :: !(Maybe Int64) + , _fagType :: !(Maybe Text) + , _fagFloodlightConfigurationIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagTagString' +-- +-- * 'fagFloodlightConfigurationId' +-- +-- * 'fagKind' +-- +-- * 'fagAdvertiserId' +-- +-- * 'fagAdvertiserIdDimensionValue' +-- +-- * 'fagIdDimensionValue' +-- +-- * 'fagAccountId' +-- +-- * 'fagName' +-- +-- * 'fagId' +-- +-- * 'fagSubaccountId' +-- +-- * 'fagType' +-- +-- * 'fagFloodlightConfigurationIdDimensionValue' +floodlightActivityGroup + :: FloodlightActivityGroup +floodlightActivityGroup = + FloodlightActivityGroup + { _fagTagString = Nothing + , _fagFloodlightConfigurationId = Nothing + , _fagKind = "dfareporting#floodlightActivityGroup" + , _fagAdvertiserId = Nothing + , _fagAdvertiserIdDimensionValue = Nothing + , _fagIdDimensionValue = Nothing + , _fagAccountId = Nothing + , _fagName = Nothing + , _fagId = Nothing + , _fagSubaccountId = Nothing + , _fagType = Nothing + , _fagFloodlightConfigurationIdDimensionValue = Nothing + } + +-- | Value of the type= parameter in the floodlight tag, which the ad servers +-- use to identify the activity group that the activity belongs to. This is +-- optional: if empty, a new tag string will be generated for you. This +-- string must be 1 to 8 characters long, with valid characters being +-- [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among +-- activity groups of the same floodlight configuration. This field is +-- read-only after insertion. +fagTagString :: Lens' FloodlightActivityGroup (Maybe Text) +fagTagString + = lens _fagTagString (\ s a -> s{_fagTagString = a}) + +-- | Floodlight configuration ID of this floodlight activity group. This is a +-- required field. +fagFloodlightConfigurationId :: Lens' FloodlightActivityGroup (Maybe Int64) +fagFloodlightConfigurationId + = lens _fagFloodlightConfigurationId + (\ s a -> s{_fagFloodlightConfigurationId = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightActivityGroup\". +fagKind :: Lens' FloodlightActivityGroup Text +fagKind = lens _fagKind (\ s a -> s{_fagKind = a}) + +-- | Advertiser ID of this floodlight activity group. If this field is left +-- blank, the value will be copied over either from the floodlight +-- configuration\'s advertiser or from the existing activity group\'s +-- advertiser. +fagAdvertiserId :: Lens' FloodlightActivityGroup (Maybe Int64) +fagAdvertiserId + = lens _fagAdvertiserId + (\ s a -> s{_fagAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +fagAdvertiserIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe (Maybe DimensionValue)) +fagAdvertiserIdDimensionValue + = lens _fagAdvertiserIdDimensionValue + (\ s a -> s{_fagAdvertiserIdDimensionValue = a}) + +-- | Dimension value for the ID of this floodlight activity group. This is a +-- read-only, auto-generated field. +fagIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe (Maybe DimensionValue)) +fagIdDimensionValue + = lens _fagIdDimensionValue + (\ s a -> s{_fagIdDimensionValue = a}) + +-- | Account ID of this floodlight activity group. This is a read-only field +-- that can be left blank. +fagAccountId :: Lens' FloodlightActivityGroup (Maybe Int64) +fagAccountId + = lens _fagAccountId (\ s a -> s{_fagAccountId = a}) + +-- | Name of this floodlight activity group. This is a required field. Must +-- be less than 65 characters long and cannot contain quotes. +fagName :: Lens' FloodlightActivityGroup (Maybe Text) +fagName = lens _fagName (\ s a -> s{_fagName = a}) + +-- | ID of this floodlight activity group. This is a read-only, +-- auto-generated field. +fagId :: Lens' FloodlightActivityGroup (Maybe Int64) +fagId = lens _fagId (\ s a -> s{_fagId = a}) + +-- | Subaccount ID of this floodlight activity group. This is a read-only +-- field that can be left blank. +fagSubaccountId :: Lens' FloodlightActivityGroup (Maybe Int64) +fagSubaccountId + = lens _fagSubaccountId + (\ s a -> s{_fagSubaccountId = a}) + +-- | Type of the floodlight activity group. This is a required field that is +-- read-only after insertion. +fagType :: Lens' FloodlightActivityGroup (Maybe Text) +fagType = lens _fagType (\ s a -> s{_fagType = a}) + +-- | Dimension value for the ID of the floodlight configuration. This is a +-- read-only, auto-generated field. +fagFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe (Maybe DimensionValue)) +fagFloodlightConfigurationIdDimensionValue + = lens _fagFloodlightConfigurationIdDimensionValue + (\ s a -> + s{_fagFloodlightConfigurationIdDimensionValue = a}) + +instance FromJSON FloodlightActivityGroup where + parseJSON + = withObject "FloodlightActivityGroup" + (\ o -> + FloodlightActivityGroup <$> + (o .:? "tagString") <*> + (o .:? "floodlightConfigurationId") + <*> + (o .:? "kind" .!= + "dfareporting#floodlightActivityGroup") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "idDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "type") + <*> + (o .:? "floodlightConfigurationIdDimensionValue")) + +instance ToJSON FloodlightActivityGroup where + toJSON FloodlightActivityGroup{..} + = object + (catMaybes + [("tagString" .=) <$> _fagTagString, + ("floodlightConfigurationId" .=) <$> + _fagFloodlightConfigurationId, + Just ("kind" .= _fagKind), + ("advertiserId" .=) <$> _fagAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _fagAdvertiserIdDimensionValue, + ("idDimensionValue" .=) <$> _fagIdDimensionValue, + ("accountId" .=) <$> _fagAccountId, + ("name" .=) <$> _fagName, ("id" .=) <$> _fagId, + ("subaccountId" .=) <$> _fagSubaccountId, + ("type" .=) <$> _fagType, + ("floodlightConfigurationIdDimensionValue" .=) <$> + _fagFloodlightConfigurationIdDimensionValue]) + +-- | Groups advertisers together so that reports can be generated for the +-- entire group at once. +-- +-- /See:/ 'advertiserGroup' smart constructor. +data AdvertiserGroup = AdvertiserGroup + { _agKind :: !Text + , _agAccountId :: !(Maybe Int64) + , _agName :: !(Maybe Text) + , _agId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agKind' +-- +-- * 'agAccountId' +-- +-- * 'agName' +-- +-- * 'agId' +advertiserGroup + :: AdvertiserGroup +advertiserGroup = + AdvertiserGroup + { _agKind = "dfareporting#advertiserGroup" + , _agAccountId = Nothing + , _agName = Nothing + , _agId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#advertiserGroup\". +agKind :: Lens' AdvertiserGroup Text +agKind = lens _agKind (\ s a -> s{_agKind = a}) + +-- | Account ID of this advertiser group. This is a read-only field that can +-- be left blank. +agAccountId :: Lens' AdvertiserGroup (Maybe Int64) +agAccountId + = lens _agAccountId (\ s a -> s{_agAccountId = a}) + +-- | Name of this advertiser group. This is a required field and must be less +-- than 256 characters long and unique among advertiser groups of the same +-- account. +agName :: Lens' AdvertiserGroup (Maybe Text) +agName = lens _agName (\ s a -> s{_agName = a}) + +-- | ID of this advertiser group. This is a read-only, auto-generated field. +agId :: Lens' AdvertiserGroup (Maybe Int64) +agId = lens _agId (\ s a -> s{_agId = a}) + +instance FromJSON AdvertiserGroup where + parseJSON + = withObject "AdvertiserGroup" + (\ o -> + AdvertiserGroup <$> + (o .:? "kind" .!= "dfareporting#advertiserGroup") <*> + (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AdvertiserGroup where + toJSON AdvertiserGroup{..} + = object + (catMaybes + [Just ("kind" .= _agKind), + ("accountId" .=) <$> _agAccountId, + ("name" .=) <$> _agName, ("id" .=) <$> _agId]) + +-- | Creative Field Assignment. +-- +-- /See:/ 'creativeFieldAssignment' smart constructor. +data CreativeFieldAssignment = CreativeFieldAssignment + { _cfaCreativeFieldId :: !(Maybe Int64) + , _cfaCreativeFieldValueId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfaCreativeFieldId' +-- +-- * 'cfaCreativeFieldValueId' +creativeFieldAssignment + :: CreativeFieldAssignment +creativeFieldAssignment = + CreativeFieldAssignment + { _cfaCreativeFieldId = Nothing + , _cfaCreativeFieldValueId = Nothing + } + +-- | ID of the creative field. +cfaCreativeFieldId :: Lens' CreativeFieldAssignment (Maybe Int64) +cfaCreativeFieldId + = lens _cfaCreativeFieldId + (\ s a -> s{_cfaCreativeFieldId = a}) + +-- | ID of the creative field value. +cfaCreativeFieldValueId :: Lens' CreativeFieldAssignment (Maybe Int64) +cfaCreativeFieldValueId + = lens _cfaCreativeFieldValueId + (\ s a -> s{_cfaCreativeFieldValueId = a}) + +instance FromJSON CreativeFieldAssignment where + parseJSON + = withObject "CreativeFieldAssignment" + (\ o -> + CreativeFieldAssignment <$> + (o .:? "creativeFieldId") <*> + (o .:? "creativeFieldValueId")) + +instance ToJSON CreativeFieldAssignment where + toJSON CreativeFieldAssignment{..} + = object + (catMaybes + [("creativeFieldId" .=) <$> _cfaCreativeFieldId, + ("creativeFieldValueId" .=) <$> + _cfaCreativeFieldValueId]) + +-- | Floodlight Configuration List Response +-- +-- /See:/ 'floodlightConfigurationsListResponse' smart constructor. +data FloodlightConfigurationsListResponse = FloodlightConfigurationsListResponse + { _fclrKind :: !Text + , _fclrFloodlightConfigurations :: !(Maybe [Maybe FloodlightConfiguration]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfigurationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fclrKind' +-- +-- * 'fclrFloodlightConfigurations' +floodlightConfigurationsListResponse + :: FloodlightConfigurationsListResponse +floodlightConfigurationsListResponse = + FloodlightConfigurationsListResponse + { _fclrKind = "dfareporting#floodlightConfigurationsListResponse" + , _fclrFloodlightConfigurations = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightConfigurationsListResponse\". +fclrKind :: Lens' FloodlightConfigurationsListResponse Text +fclrKind = lens _fclrKind (\ s a -> s{_fclrKind = a}) + +-- | Floodlight configuration collection. +fclrFloodlightConfigurations :: Lens' FloodlightConfigurationsListResponse [Maybe FloodlightConfiguration] +fclrFloodlightConfigurations + = lens _fclrFloodlightConfigurations + (\ s a -> s{_fclrFloodlightConfigurations = a}) + . _Default + . _Coerce + +instance FromJSON + FloodlightConfigurationsListResponse where + parseJSON + = withObject "FloodlightConfigurationsListResponse" + (\ o -> + FloodlightConfigurationsListResponse <$> + (o .:? "kind" .!= + "dfareporting#floodlightConfigurationsListResponse") + <*> (o .:? "floodlightConfigurations" .!= mempty)) + +instance ToJSON FloodlightConfigurationsListResponse + where + toJSON FloodlightConfigurationsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _fclrKind), + ("floodlightConfigurations" .=) <$> + _fclrFloodlightConfigurations]) + +-- | Represents a DimensionValuesRequest. +-- +-- /See:/ 'dimensionValueRequest' smart constructor. +data DimensionValueRequest = DimensionValueRequest + { _dvrKind :: !Text + , _dvrEndDate :: !(Maybe UTCTime) + , _dvrFilters :: !(Maybe [Maybe DimensionFilter]) + , _dvrStartDate :: !(Maybe UTCTime) + , _dvrDimensionName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DimensionValueRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvrKind' +-- +-- * 'dvrEndDate' +-- +-- * 'dvrFilters' +-- +-- * 'dvrStartDate' +-- +-- * 'dvrDimensionName' +dimensionValueRequest + :: DimensionValueRequest +dimensionValueRequest = + DimensionValueRequest + { _dvrKind = "dfareporting#dimensionValueRequest" + , _dvrEndDate = Nothing + , _dvrFilters = Nothing + , _dvrStartDate = Nothing + , _dvrDimensionName = Nothing + } + +-- | The kind of request this is, in this case +-- dfareporting#dimensionValueRequest. +dvrKind :: Lens' DimensionValueRequest Text +dvrKind = lens _dvrKind (\ s a -> s{_dvrKind = a}) + +-- | The end date of the date range for which to retrieve dimension values. A +-- string of the format \"yyyy-MM-dd\". +dvrEndDate :: Lens' DimensionValueRequest (Maybe UTCTime) +dvrEndDate + = lens _dvrEndDate (\ s a -> s{_dvrEndDate = a}) + +-- | The list of filters by which to filter values. The filters are ANDed. +dvrFilters :: Lens' DimensionValueRequest [Maybe DimensionFilter] +dvrFilters + = lens _dvrFilters (\ s a -> s{_dvrFilters = a}) . + _Default + . _Coerce + +-- | The start date of the date range for which to retrieve dimension values. +-- A string of the format \"yyyy-MM-dd\". +dvrStartDate :: Lens' DimensionValueRequest (Maybe UTCTime) +dvrStartDate + = lens _dvrStartDate (\ s a -> s{_dvrStartDate = a}) + +-- | The name of the dimension for which values should be requested. +dvrDimensionName :: Lens' DimensionValueRequest (Maybe Text) +dvrDimensionName + = lens _dvrDimensionName + (\ s a -> s{_dvrDimensionName = a}) + +instance FromJSON DimensionValueRequest where + parseJSON + = withObject "DimensionValueRequest" + (\ o -> + DimensionValueRequest <$> + (o .:? "kind" .!= + "dfareporting#dimensionValueRequest") + <*> (o .:? "endDate") + <*> (o .:? "filters" .!= mempty) + <*> (o .:? "startDate") + <*> (o .:? "dimensionName")) + +instance ToJSON DimensionValueRequest where + toJSON DimensionValueRequest{..} + = object + (catMaybes + [Just ("kind" .= _dvrKind), + ("endDate" .=) <$> _dvrEndDate, + ("filters" .=) <$> _dvrFilters, + ("startDate" .=) <$> _dvrStartDate, + ("dimensionName" .=) <$> _dvrDimensionName]) + +-- | Contains properties of a DCM ad. +-- +-- /See:/ 'ad' smart constructor. +data Ad = Ad + { _adCreativeGroupAssignments :: !(Maybe [Maybe CreativeGroupAssignment]) + , _adGeoTargeting :: !(Maybe (Maybe GeoTargeting)) + , _adCreativeRotation :: !(Maybe (Maybe CreativeRotation)) + , _adTechnologyTargeting :: !(Maybe (Maybe TechnologyTargeting)) + , _adAudienceSegmentId :: !(Maybe Int64) + , _adDayPartTargeting :: !(Maybe (Maybe DayPartTargeting)) + , _adSize :: !(Maybe (Maybe Size)) + , _adStartTime :: !(Maybe UTCTime) + , _adKind :: !Text + , _adClickThroughUrlSuffixProperties :: !(Maybe (Maybe ClickThroughURLSuffixProperties)) + , _adCampaignIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _adAdvertiserId :: !(Maybe Int64) + , _adAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _adSslCompliant :: !(Maybe Bool) + , _adCampaignId :: !(Maybe Int64) + , _adIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _adClickThroughUrl :: !(Maybe (Maybe ClickThroughURL)) + , _adDeliverySchedule :: !(Maybe (Maybe DeliverySchedule)) + , _adEventTagOverrides :: !(Maybe [Maybe EventTagOverride]) + , _adActive :: !(Maybe Bool) + , _adAccountId :: !(Maybe Int64) + , _adName :: !(Maybe Text) + , _adKeyValueTargetingExpression :: !(Maybe (Maybe KeyValueTargetingExpression)) + , _adEndTime :: !(Maybe UTCTime) + , _adCreateInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _adLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _adId :: !(Maybe Int64) + , _adSslRequired :: !(Maybe Bool) + , _adComments :: !(Maybe Text) + , _adSubaccountId :: !(Maybe Int64) + , _adType :: !(Maybe Text) + , _adRemarketingListExpression :: !(Maybe (Maybe ListTargetingExpression)) + , _adDynamicClickTracker :: !(Maybe Bool) + , _adCompatibility :: !(Maybe Text) + , _adArchived :: !(Maybe Bool) + , _adDefaultClickThroughEventTagProperties :: !(Maybe (Maybe DefaultClickThroughEventTagProperties)) + , _adPlacementAssignments :: !(Maybe [Maybe PlacementAssignment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Ad' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adCreativeGroupAssignments' +-- +-- * 'adGeoTargeting' +-- +-- * 'adCreativeRotation' +-- +-- * 'adTechnologyTargeting' +-- +-- * 'adAudienceSegmentId' +-- +-- * 'adDayPartTargeting' +-- +-- * 'adSize' +-- +-- * 'adStartTime' +-- +-- * 'adKind' +-- +-- * 'adClickThroughUrlSuffixProperties' +-- +-- * 'adCampaignIdDimensionValue' +-- +-- * 'adAdvertiserId' +-- +-- * 'adAdvertiserIdDimensionValue' +-- +-- * 'adSslCompliant' +-- +-- * 'adCampaignId' +-- +-- * 'adIdDimensionValue' +-- +-- * 'adClickThroughUrl' +-- +-- * 'adDeliverySchedule' +-- +-- * 'adEventTagOverrides' +-- +-- * 'adActive' +-- +-- * 'adAccountId' +-- +-- * 'adName' +-- +-- * 'adKeyValueTargetingExpression' +-- +-- * 'adEndTime' +-- +-- * 'adCreateInfo' +-- +-- * 'adLastModifiedInfo' +-- +-- * 'adId' +-- +-- * 'adSslRequired' +-- +-- * 'adComments' +-- +-- * 'adSubaccountId' +-- +-- * 'adType' +-- +-- * 'adRemarketingListExpression' +-- +-- * 'adDynamicClickTracker' +-- +-- * 'adCompatibility' +-- +-- * 'adArchived' +-- +-- * 'adDefaultClickThroughEventTagProperties' +-- +-- * 'adPlacementAssignments' +ad + :: Ad +ad = + Ad + { _adCreativeGroupAssignments = Nothing + , _adGeoTargeting = Nothing + , _adCreativeRotation = Nothing + , _adTechnologyTargeting = Nothing + , _adAudienceSegmentId = Nothing + , _adDayPartTargeting = Nothing + , _adSize = Nothing + , _adStartTime = Nothing + , _adKind = "dfareporting#ad" + , _adClickThroughUrlSuffixProperties = Nothing + , _adCampaignIdDimensionValue = Nothing + , _adAdvertiserId = Nothing + , _adAdvertiserIdDimensionValue = Nothing + , _adSslCompliant = Nothing + , _adCampaignId = Nothing + , _adIdDimensionValue = Nothing + , _adClickThroughUrl = Nothing + , _adDeliverySchedule = Nothing + , _adEventTagOverrides = Nothing + , _adActive = Nothing + , _adAccountId = Nothing + , _adName = Nothing + , _adKeyValueTargetingExpression = Nothing + , _adEndTime = Nothing + , _adCreateInfo = Nothing + , _adLastModifiedInfo = Nothing + , _adId = Nothing + , _adSslRequired = Nothing + , _adComments = Nothing + , _adSubaccountId = Nothing + , _adType = Nothing + , _adRemarketingListExpression = Nothing + , _adDynamicClickTracker = Nothing + , _adCompatibility = Nothing + , _adArchived = Nothing + , _adDefaultClickThroughEventTagProperties = Nothing + , _adPlacementAssignments = Nothing + } + +-- | Creative group assignments for this ad. Applicable when type is +-- AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number +-- is allowed for a maximum of two assignments. +adCreativeGroupAssignments :: Lens' Ad [Maybe CreativeGroupAssignment] +adCreativeGroupAssignments + = lens _adCreativeGroupAssignments + (\ s a -> s{_adCreativeGroupAssignments = a}) + . _Default + . _Coerce + +-- | Geographical targeting information for this ad.Applicable when type is +-- AD_SERVING_STANDARD_AD. +adGeoTargeting :: Lens' Ad (Maybe (Maybe GeoTargeting)) +adGeoTargeting + = lens _adGeoTargeting + (\ s a -> s{_adGeoTargeting = a}) + +-- | Creative rotation for this ad. Applicable when type is +-- AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. +-- When type is AD_SERVING_DEFAULT_AD, this field should have exactly one +-- creativeAssignment. +adCreativeRotation :: Lens' Ad (Maybe (Maybe CreativeRotation)) +adCreativeRotation + = lens _adCreativeRotation + (\ s a -> s{_adCreativeRotation = a}) + +-- | Technology platform targeting information for this ad. Applicable when +-- type is AD_SERVING_STANDARD_AD. +adTechnologyTargeting :: Lens' Ad (Maybe (Maybe TechnologyTargeting)) +adTechnologyTargeting + = lens _adTechnologyTargeting + (\ s a -> s{_adTechnologyTargeting = a}) + +-- | Audience segment ID that is being targeted for this ad. Applicable when +-- type is AD_SERVING_STANDARD_AD. +adAudienceSegmentId :: Lens' Ad (Maybe Int64) +adAudienceSegmentId + = lens _adAudienceSegmentId + (\ s a -> s{_adAudienceSegmentId = a}) + +-- | Time and day targeting information for this ad. Applicable when type is +-- AD_SERVING_STANDARD_AD. +adDayPartTargeting :: Lens' Ad (Maybe (Maybe DayPartTargeting)) +adDayPartTargeting + = lens _adDayPartTargeting + (\ s a -> s{_adDayPartTargeting = a}) + +-- | Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. +adSize :: Lens' Ad (Maybe (Maybe Size)) +adSize = lens _adSize (\ s a -> s{_adSize = a}) + +-- | Date and time that this ad should start serving. If creating an ad, this +-- field must be a time in the future. This is a required field on +-- insertion. +adStartTime :: Lens' Ad (Maybe UTCTime) +adStartTime + = lens _adStartTime (\ s a -> s{_adStartTime = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#ad\". +adKind :: Lens' Ad Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | Click-through URL suffix properties for this ad. Applies to the URL in +-- the ad or (if overriding ad properties) the URL in the creative. +adClickThroughUrlSuffixProperties :: Lens' Ad (Maybe (Maybe ClickThroughURLSuffixProperties)) +adClickThroughUrlSuffixProperties + = lens _adClickThroughUrlSuffixProperties + (\ s a -> s{_adClickThroughUrlSuffixProperties = a}) + +-- | Dimension value for the ID of the campaign. This is a read-only, +-- auto-generated field. +adCampaignIdDimensionValue :: Lens' Ad (Maybe (Maybe DimensionValue)) +adCampaignIdDimensionValue + = lens _adCampaignIdDimensionValue + (\ s a -> s{_adCampaignIdDimensionValue = a}) + +-- | Advertiser ID of this ad. This is a required field on insertion. +adAdvertiserId :: Lens' Ad (Maybe Int64) +adAdvertiserId + = lens _adAdvertiserId + (\ s a -> s{_adAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +adAdvertiserIdDimensionValue :: Lens' Ad (Maybe (Maybe DimensionValue)) +adAdvertiserIdDimensionValue + = lens _adAdvertiserIdDimensionValue + (\ s a -> s{_adAdvertiserIdDimensionValue = a}) + +-- | Whether this ad is ssl compliant. This is a read-only field that is +-- auto-generated when the ad is inserted or updated. +adSslCompliant :: Lens' Ad (Maybe Bool) +adSslCompliant + = lens _adSslCompliant + (\ s a -> s{_adSslCompliant = a}) + +-- | Campaign ID of this ad. This is a required field on insertion. +adCampaignId :: Lens' Ad (Maybe Int64) +adCampaignId + = lens _adCampaignId (\ s a -> s{_adCampaignId = a}) + +-- | Dimension value for the ID of this ad. This is a read-only, +-- auto-generated field. +adIdDimensionValue :: Lens' Ad (Maybe (Maybe DimensionValue)) +adIdDimensionValue + = lens _adIdDimensionValue + (\ s a -> s{_adIdDimensionValue = a}) + +-- | Click-through URL for this ad. This is a required field on insertion. +-- Applicable when type is AD_SERVING_CLICK_TRACKER. +adClickThroughUrl :: Lens' Ad (Maybe (Maybe ClickThroughURL)) +adClickThroughUrl + = lens _adClickThroughUrl + (\ s a -> s{_adClickThroughUrl = a}) + +-- | Delivery schedule information for this ad. Applicable when type is +-- AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with +-- subfields priority and impressionRatio are required on insertion when +-- type is AD_SERVING_STANDARD_AD. +adDeliverySchedule :: Lens' Ad (Maybe (Maybe DeliverySchedule)) +adDeliverySchedule + = lens _adDeliverySchedule + (\ s a -> s{_adDeliverySchedule = a}) + +-- | Event tag overrides for this ad. +adEventTagOverrides :: Lens' Ad [Maybe EventTagOverride] +adEventTagOverrides + = lens _adEventTagOverrides + (\ s a -> s{_adEventTagOverrides = a}) + . _Default + . _Coerce + +-- | Whether this ad is active. +adActive :: Lens' Ad (Maybe Bool) +adActive = lens _adActive (\ s a -> s{_adActive = a}) + +-- | Account ID of this ad. This is a read-only field that can be left blank. +adAccountId :: Lens' Ad (Maybe Int64) +adAccountId + = lens _adAccountId (\ s a -> s{_adAccountId = a}) + +-- | Name of this ad. This is a required field and must be less than 256 +-- characters long. +adName :: Lens' Ad (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +-- | Key-value targeting information for this ad. Applicable when type is +-- AD_SERVING_STANDARD_AD. +adKeyValueTargetingExpression :: Lens' Ad (Maybe (Maybe KeyValueTargetingExpression)) +adKeyValueTargetingExpression + = lens _adKeyValueTargetingExpression + (\ s a -> s{_adKeyValueTargetingExpression = a}) + +-- | Date and time that this ad should stop serving. Must be later than the +-- start time. This is a required field on insertion. +adEndTime :: Lens' Ad (Maybe UTCTime) +adEndTime + = lens _adEndTime (\ s a -> s{_adEndTime = a}) + +-- | Information about the creation of this ad.This is a read-only field. +adCreateInfo :: Lens' Ad (Maybe (Maybe LastModifiedInfo)) +adCreateInfo + = lens _adCreateInfo (\ s a -> s{_adCreateInfo = a}) + +-- | Information about the most recent modification of this ad. This is a +-- read-only field. +adLastModifiedInfo :: Lens' Ad (Maybe (Maybe LastModifiedInfo)) +adLastModifiedInfo + = lens _adLastModifiedInfo + (\ s a -> s{_adLastModifiedInfo = a}) + +-- | ID of this ad. This is a read-only, auto-generated field. +adId :: Lens' Ad (Maybe Int64) +adId = lens _adId (\ s a -> s{_adId = a}) + +-- | Whether this ad requires ssl. This is a read-only field that is +-- auto-generated when the ad is inserted or updated. +adSslRequired :: Lens' Ad (Maybe Bool) +adSslRequired + = lens _adSslRequired + (\ s a -> s{_adSslRequired = a}) + +-- | Comments for this ad. +adComments :: Lens' Ad (Maybe Text) +adComments + = lens _adComments (\ s a -> s{_adComments = a}) + +-- | Subaccount ID of this ad. This is a read-only field that can be left +-- blank. +adSubaccountId :: Lens' Ad (Maybe Int64) +adSubaccountId + = lens _adSubaccountId + (\ s a -> s{_adSubaccountId = a}) + +-- | Type of ad. This is a required field on insertion. Note that default ads +-- (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative +-- resource). +adType :: Lens' Ad (Maybe Text) +adType = lens _adType (\ s a -> s{_adType = a}) + +-- | Applicable when type is AD_SERVING_STANDARD_AD. Remarketing list +-- targeting expression for this ad. +adRemarketingListExpression :: Lens' Ad (Maybe (Maybe ListTargetingExpression)) +adRemarketingListExpression + = lens _adRemarketingListExpression + (\ s a -> s{_adRemarketingListExpression = a}) + +-- | Whether this ad is a dynamic click tracker. Applicable when type is +-- AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is +-- read-only after insert. +adDynamicClickTracker :: Lens' Ad (Maybe Bool) +adDynamicClickTracker + = lens _adDynamicClickTracker + (\ s a -> s{_adDynamicClickTracker = a}) + +-- | Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. +-- WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on +-- mobile devices for regular or interstitial ads, respectively. APP and +-- APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO +-- refers to rendering an in-stream video ads developed with the VAST +-- standard. +adCompatibility :: Lens' Ad (Maybe Text) +adCompatibility + = lens _adCompatibility + (\ s a -> s{_adCompatibility = a}) + +-- | Whether this ad is archived. +adArchived :: Lens' Ad (Maybe Bool) +adArchived + = lens _adArchived (\ s a -> s{_adArchived = a}) + +-- | Default click-through event tag properties for this ad. +adDefaultClickThroughEventTagProperties :: Lens' Ad (Maybe (Maybe DefaultClickThroughEventTagProperties)) +adDefaultClickThroughEventTagProperties + = lens _adDefaultClickThroughEventTagProperties + (\ s a -> + s{_adDefaultClickThroughEventTagProperties = a}) + +-- | Placement assignments for this ad. +adPlacementAssignments :: Lens' Ad [Maybe PlacementAssignment] +adPlacementAssignments + = lens _adPlacementAssignments + (\ s a -> s{_adPlacementAssignments = a}) + . _Default + . _Coerce + +instance FromJSON Ad where + parseJSON + = withObject "Ad" + (\ o -> + Ad <$> + (o .:? "creativeGroupAssignments" .!= mempty) <*> + (o .:? "geoTargeting") + <*> (o .:? "creativeRotation") + <*> (o .:? "technologyTargeting") + <*> (o .:? "audienceSegmentId") + <*> (o .:? "dayPartTargeting") + <*> (o .:? "size") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "dfareporting#ad") + <*> (o .:? "clickThroughUrlSuffixProperties") + <*> (o .:? "campaignIdDimensionValue") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "sslCompliant") + <*> (o .:? "campaignId") + <*> (o .:? "idDimensionValue") + <*> (o .:? "clickThroughUrl") + <*> (o .:? "deliverySchedule") + <*> (o .:? "eventTagOverrides" .!= mempty) + <*> (o .:? "active") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "keyValueTargetingExpression") + <*> (o .:? "endTime") + <*> (o .:? "createInfo") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "sslRequired") + <*> (o .:? "comments") + <*> (o .:? "subaccountId") + <*> (o .:? "type") + <*> (o .:? "remarketingListExpression") + <*> (o .:? "dynamicClickTracker") + <*> (o .:? "compatibility") + <*> (o .:? "archived") + <*> (o .:? "defaultClickThroughEventTagProperties") + <*> (o .:? "placementAssignments" .!= mempty)) + +instance ToJSON Ad where + toJSON Ad{..} + = object + (catMaybes + [("creativeGroupAssignments" .=) <$> + _adCreativeGroupAssignments, + ("geoTargeting" .=) <$> _adGeoTargeting, + ("creativeRotation" .=) <$> _adCreativeRotation, + ("technologyTargeting" .=) <$> + _adTechnologyTargeting, + ("audienceSegmentId" .=) <$> _adAudienceSegmentId, + ("dayPartTargeting" .=) <$> _adDayPartTargeting, + ("size" .=) <$> _adSize, + ("startTime" .=) <$> _adStartTime, + Just ("kind" .= _adKind), + ("clickThroughUrlSuffixProperties" .=) <$> + _adClickThroughUrlSuffixProperties, + ("campaignIdDimensionValue" .=) <$> + _adCampaignIdDimensionValue, + ("advertiserId" .=) <$> _adAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _adAdvertiserIdDimensionValue, + ("sslCompliant" .=) <$> _adSslCompliant, + ("campaignId" .=) <$> _adCampaignId, + ("idDimensionValue" .=) <$> _adIdDimensionValue, + ("clickThroughUrl" .=) <$> _adClickThroughUrl, + ("deliverySchedule" .=) <$> _adDeliverySchedule, + ("eventTagOverrides" .=) <$> _adEventTagOverrides, + ("active" .=) <$> _adActive, + ("accountId" .=) <$> _adAccountId, + ("name" .=) <$> _adName, + ("keyValueTargetingExpression" .=) <$> + _adKeyValueTargetingExpression, + ("endTime" .=) <$> _adEndTime, + ("createInfo" .=) <$> _adCreateInfo, + ("lastModifiedInfo" .=) <$> _adLastModifiedInfo, + ("id" .=) <$> _adId, + ("sslRequired" .=) <$> _adSslRequired, + ("comments" .=) <$> _adComments, + ("subaccountId" .=) <$> _adSubaccountId, + ("type" .=) <$> _adType, + ("remarketingListExpression" .=) <$> + _adRemarketingListExpression, + ("dynamicClickTracker" .=) <$> + _adDynamicClickTracker, + ("compatibility" .=) <$> _adCompatibility, + ("archived" .=) <$> _adArchived, + ("defaultClickThroughEventTagProperties" .=) <$> + _adDefaultClickThroughEventTagProperties, + ("placementAssignments" .=) <$> + _adPlacementAssignments]) + +-- | Object Filter. +-- +-- /See:/ 'objectFilter' smart constructor. +data ObjectFilter = ObjectFilter + { _ofStatus :: !(Maybe Text) + , _ofKind :: !Text + , _ofObjectIds :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectFilter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ofStatus' +-- +-- * 'ofKind' +-- +-- * 'ofObjectIds' +objectFilter + :: ObjectFilter +objectFilter = + ObjectFilter + { _ofStatus = Nothing + , _ofKind = "dfareporting#objectFilter" + , _ofObjectIds = Nothing + } + +-- | Status of the filter. NONE means the user has access to none of the +-- objects. ALL means the user has access to all objects. ASSIGNED means +-- the user has access to the objects with IDs in the objectIds list. +ofStatus :: Lens' ObjectFilter (Maybe Text) +ofStatus = lens _ofStatus (\ s a -> s{_ofStatus = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#objectFilter\". +ofKind :: Lens' ObjectFilter Text +ofKind = lens _ofKind (\ s a -> s{_ofKind = a}) + +-- | Applicable when status is ASSIGNED. The user has access to objects with +-- these object IDs. +ofObjectIds :: Lens' ObjectFilter [Int64] +ofObjectIds + = lens _ofObjectIds (\ s a -> s{_ofObjectIds = a}) . + _Default + . _Coerce + +instance FromJSON ObjectFilter where + parseJSON + = withObject "ObjectFilter" + (\ o -> + ObjectFilter <$> + (o .:? "status") <*> + (o .:? "kind" .!= "dfareporting#objectFilter") + <*> (o .:? "objectIds" .!= mempty)) + +instance ToJSON ObjectFilter where + toJSON ObjectFilter{..} + = object + (catMaybes + [("status" .=) <$> _ofStatus, + Just ("kind" .= _ofKind), + ("objectIds" .=) <$> _ofObjectIds]) + +-- | Reporting Configuration +-- +-- /See:/ 'reportsConfiguration' smart constructor. +data ReportsConfiguration = ReportsConfiguration + { _rcExposureToConversionEnabled :: !(Maybe Bool) + , _rcReportGenerationTimeZoneId :: !(Maybe Int64) + , _rcLookbackConfiguration :: !(Maybe (Maybe LookbackConfiguration)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcExposureToConversionEnabled' +-- +-- * 'rcReportGenerationTimeZoneId' +-- +-- * 'rcLookbackConfiguration' +reportsConfiguration + :: ReportsConfiguration +reportsConfiguration = + ReportsConfiguration + { _rcExposureToConversionEnabled = Nothing + , _rcReportGenerationTimeZoneId = Nothing + , _rcLookbackConfiguration = Nothing + } + +-- | Whether the exposure to conversion report is enabled. This report shows +-- detailed pathway information on up to 10 of the most recent ad exposures +-- seen by a user before converting. +rcExposureToConversionEnabled :: Lens' ReportsConfiguration (Maybe Bool) +rcExposureToConversionEnabled + = lens _rcExposureToConversionEnabled + (\ s a -> s{_rcExposureToConversionEnabled = a}) + +-- | Report generation time zone ID of this account. This is a required field +-- that can only be changed by a superuser. Acceptable values are: - \"1\" +-- for \"America\/New_York\" - \"2\" for \"Europe\/London\" - \"3\" for +-- \"Europe\/Paris\" - \"4\" for \"Africa\/Johannesburg\" - \"5\" for +-- \"Asia\/Jerusalem\" - \"6\" for \"Asia\/Shanghai\" - \"7\" for +-- \"Asia\/Hong_Kong\" - \"8\" for \"Asia\/Tokyo\" - \"9\" for +-- \"Australia\/Sydney\" - \"10\" for \"Asia\/Dubai\" - \"11\" for +-- \"America\/Los_Angeles\" - \"12\" for \"Pacific\/Auckland\" - \"13\" for +-- \"America\/Sao_Paulo\" +rcReportGenerationTimeZoneId :: Lens' ReportsConfiguration (Maybe Int64) +rcReportGenerationTimeZoneId + = lens _rcReportGenerationTimeZoneId + (\ s a -> s{_rcReportGenerationTimeZoneId = a}) + +-- | Default lookback windows for new advertisers in this account. +rcLookbackConfiguration :: Lens' ReportsConfiguration (Maybe (Maybe LookbackConfiguration)) +rcLookbackConfiguration + = lens _rcLookbackConfiguration + (\ s a -> s{_rcLookbackConfiguration = a}) + +instance FromJSON ReportsConfiguration where + parseJSON + = withObject "ReportsConfiguration" + (\ o -> + ReportsConfiguration <$> + (o .:? "exposureToConversionEnabled") <*> + (o .:? "reportGenerationTimeZoneId") + <*> (o .:? "lookbackConfiguration")) + +instance ToJSON ReportsConfiguration where + toJSON ReportsConfiguration{..} + = object + (catMaybes + [("exposureToConversionEnabled" .=) <$> + _rcExposureToConversionEnabled, + ("reportGenerationTimeZoneId" .=) <$> + _rcReportGenerationTimeZoneId, + ("lookbackConfiguration" .=) <$> + _rcLookbackConfiguration]) + +-- | Represents the dimensions of ads, placements, creatives, or creative +-- assets. +-- +-- /See:/ 'size' smart constructor. +data Size = Size + { _sizHeight :: !(Maybe Int32) + , _sizKind :: !Text + , _sizWidth :: !(Maybe Int32) + , _sizIab :: !(Maybe Bool) + , _sizId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Size' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sizHeight' +-- +-- * 'sizKind' +-- +-- * 'sizWidth' +-- +-- * 'sizIab' +-- +-- * 'sizId' +size + :: Size +size = + Size + { _sizHeight = Nothing + , _sizKind = "dfareporting#size" + , _sizWidth = Nothing + , _sizIab = Nothing + , _sizId = Nothing + } + +-- | Height of this size. +sizHeight :: Lens' Size (Maybe Int32) +sizHeight + = lens _sizHeight (\ s a -> s{_sizHeight = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#size\". +sizKind :: Lens' Size Text +sizKind = lens _sizKind (\ s a -> s{_sizKind = a}) + +-- | Width of this size. +sizWidth :: Lens' Size (Maybe Int32) +sizWidth = lens _sizWidth (\ s a -> s{_sizWidth = a}) + +-- | IAB standard size. This is a read-only, auto-generated field. +sizIab :: Lens' Size (Maybe Bool) +sizIab = lens _sizIab (\ s a -> s{_sizIab = a}) + +-- | ID of this size. This is a read-only, auto-generated field. +sizId :: Lens' Size (Maybe Int64) +sizId = lens _sizId (\ s a -> s{_sizId = a}) + +instance FromJSON Size where + parseJSON + = withObject "Size" + (\ o -> + Size <$> + (o .:? "height") <*> + (o .:? "kind" .!= "dfareporting#size") + <*> (o .:? "width") + <*> (o .:? "iab") + <*> (o .:? "id")) + +instance ToJSON Size where + toJSON Size{..} + = object + (catMaybes + [("height" .=) <$> _sizHeight, + Just ("kind" .= _sizKind), + ("width" .=) <$> _sizWidth, ("iab" .=) <$> _sizIab, + ("id" .=) <$> _sizId]) + +-- | Inventory item List Response +-- +-- /See:/ 'inventoryItemsListResponse' smart constructor. +data InventoryItemsListResponse = InventoryItemsListResponse + { _iilrInventoryItems :: !(Maybe [Maybe InventoryItem]) + , _iilrNextPageToken :: !(Maybe Text) + , _iilrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InventoryItemsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iilrInventoryItems' +-- +-- * 'iilrNextPageToken' +-- +-- * 'iilrKind' +inventoryItemsListResponse + :: InventoryItemsListResponse +inventoryItemsListResponse = + InventoryItemsListResponse + { _iilrInventoryItems = Nothing + , _iilrNextPageToken = Nothing + , _iilrKind = "dfareporting#inventoryItemsListResponse" + } + +-- | Inventory item collection +iilrInventoryItems :: Lens' InventoryItemsListResponse [Maybe InventoryItem] +iilrInventoryItems + = lens _iilrInventoryItems + (\ s a -> s{_iilrInventoryItems = a}) + . _Default + . _Coerce + +-- | Pagination token to be used for the next list operation. +iilrNextPageToken :: Lens' InventoryItemsListResponse (Maybe Text) +iilrNextPageToken + = lens _iilrNextPageToken + (\ s a -> s{_iilrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#inventoryItemsListResponse\". +iilrKind :: Lens' InventoryItemsListResponse Text +iilrKind = lens _iilrKind (\ s a -> s{_iilrKind = a}) + +instance FromJSON InventoryItemsListResponse where + parseJSON + = withObject "InventoryItemsListResponse" + (\ o -> + InventoryItemsListResponse <$> + (o .:? "inventoryItems" .!= mempty) <*> + (o .:? "nextPageToken") + <*> + (o .:? "kind" .!= + "dfareporting#inventoryItemsListResponse")) + +instance ToJSON InventoryItemsListResponse where + toJSON InventoryItemsListResponse{..} + = object + (catMaybes + [("inventoryItems" .=) <$> _iilrInventoryItems, + ("nextPageToken" .=) <$> _iilrNextPageToken, + Just ("kind" .= _iilrKind)]) + +-- | Contains properties of a DoubleClick Planning project. +-- +-- /See:/ 'project' smart constructor. +data Project = Project + { _pTargetClicks :: !(Maybe Int64) + , _pClientBillingCode :: !(Maybe Text) + , _pTargetCpmNanos :: !(Maybe Int64) + , _pTargetConversions :: !(Maybe Int64) + , _pBudget :: !(Maybe Int64) + , _pKind :: !Text + , _pAdvertiserId :: !(Maybe Int64) + , _pEndDate :: !(Maybe UTCTime) + , _pOverview :: !(Maybe Text) + , _pTargetImpressions :: !(Maybe Int64) + , _pStartDate :: !(Maybe UTCTime) + , _pTargetCpcNanos :: !(Maybe Int64) + , _pAccountId :: !(Maybe Int64) + , _pName :: !(Maybe Text) + , _pLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _pId :: !(Maybe Int64) + , _pAudienceAgeGroup :: !(Maybe Text) + , _pSubaccountId :: !(Maybe Int64) + , _pAudienceGender :: !(Maybe Text) + , _pClientName :: !(Maybe Text) + , _pTargetCpaNanos :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Project' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pTargetClicks' +-- +-- * 'pClientBillingCode' +-- +-- * 'pTargetCpmNanos' +-- +-- * 'pTargetConversions' +-- +-- * 'pBudget' +-- +-- * 'pKind' +-- +-- * 'pAdvertiserId' +-- +-- * 'pEndDate' +-- +-- * 'pOverview' +-- +-- * 'pTargetImpressions' +-- +-- * 'pStartDate' +-- +-- * 'pTargetCpcNanos' +-- +-- * 'pAccountId' +-- +-- * 'pName' +-- +-- * 'pLastModifiedInfo' +-- +-- * 'pId' +-- +-- * 'pAudienceAgeGroup' +-- +-- * 'pSubaccountId' +-- +-- * 'pAudienceGender' +-- +-- * 'pClientName' +-- +-- * 'pTargetCpaNanos' +project + :: Project +project = + Project + { _pTargetClicks = Nothing + , _pClientBillingCode = Nothing + , _pTargetCpmNanos = Nothing + , _pTargetConversions = Nothing + , _pBudget = Nothing + , _pKind = "dfareporting#project" + , _pAdvertiserId = Nothing + , _pEndDate = Nothing + , _pOverview = Nothing + , _pTargetImpressions = Nothing + , _pStartDate = Nothing + , _pTargetCpcNanos = Nothing + , _pAccountId = Nothing + , _pName = Nothing + , _pLastModifiedInfo = Nothing + , _pId = Nothing + , _pAudienceAgeGroup = Nothing + , _pSubaccountId = Nothing + , _pAudienceGender = Nothing + , _pClientName = Nothing + , _pTargetCpaNanos = Nothing + } + +-- | Number of clicks that the advertiser is targeting. +pTargetClicks :: Lens' Project (Maybe Int64) +pTargetClicks + = lens _pTargetClicks + (\ s a -> s{_pTargetClicks = a}) + +-- | Client billing code of this project. +pClientBillingCode :: Lens' Project (Maybe Text) +pClientBillingCode + = lens _pClientBillingCode + (\ s a -> s{_pClientBillingCode = a}) + +-- | CPM that the advertiser is targeting. +pTargetCpmNanos :: Lens' Project (Maybe Int64) +pTargetCpmNanos + = lens _pTargetCpmNanos + (\ s a -> s{_pTargetCpmNanos = a}) + +-- | Number of conversions that the advertiser is targeting. +pTargetConversions :: Lens' Project (Maybe Int64) +pTargetConversions + = lens _pTargetConversions + (\ s a -> s{_pTargetConversions = a}) + +-- | Budget of this project in the currency specified by the current account. +-- The value stored in this field represents only the non-fractional +-- amount. For example, for USD, the smallest value that can be represented +-- by this field is 1 US dollar. +pBudget :: Lens' Project (Maybe Int64) +pBudget = lens _pBudget (\ s a -> s{_pBudget = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#project\". +pKind :: Lens' Project Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | Advertiser ID of this project. +pAdvertiserId :: Lens' Project (Maybe Int64) +pAdvertiserId + = lens _pAdvertiserId + (\ s a -> s{_pAdvertiserId = a}) + +-- | End date of the project. +pEndDate :: Lens' Project (Maybe UTCTime) +pEndDate = lens _pEndDate (\ s a -> s{_pEndDate = a}) + +-- | Overview of this project. +pOverview :: Lens' Project (Maybe Text) +pOverview + = lens _pOverview (\ s a -> s{_pOverview = a}) + +-- | Number of impressions that the advertiser is targeting. +pTargetImpressions :: Lens' Project (Maybe Int64) +pTargetImpressions + = lens _pTargetImpressions + (\ s a -> s{_pTargetImpressions = a}) + +-- | Start date of the project. +pStartDate :: Lens' Project (Maybe UTCTime) +pStartDate + = lens _pStartDate (\ s a -> s{_pStartDate = a}) + +-- | CPC that the advertiser is targeting. +pTargetCpcNanos :: Lens' Project (Maybe Int64) +pTargetCpcNanos + = lens _pTargetCpcNanos + (\ s a -> s{_pTargetCpcNanos = a}) + +-- | Account ID of this project. +pAccountId :: Lens' Project (Maybe Int64) +pAccountId + = lens _pAccountId (\ s a -> s{_pAccountId = a}) + +-- | Name of this project. +pName :: Lens' Project (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | Information about the most recent modification of this project. +pLastModifiedInfo :: Lens' Project (Maybe (Maybe LastModifiedInfo)) +pLastModifiedInfo + = lens _pLastModifiedInfo + (\ s a -> s{_pLastModifiedInfo = a}) + +-- | ID of this project. This is a read-only, auto-generated field. +pId :: Lens' Project (Maybe Int64) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | Audience age group of this project. +pAudienceAgeGroup :: Lens' Project (Maybe Text) +pAudienceAgeGroup + = lens _pAudienceAgeGroup + (\ s a -> s{_pAudienceAgeGroup = a}) + +-- | Subaccount ID of this project. +pSubaccountId :: Lens' Project (Maybe Int64) +pSubaccountId + = lens _pSubaccountId + (\ s a -> s{_pSubaccountId = a}) + +-- | Audience gender of this project. +pAudienceGender :: Lens' Project (Maybe Text) +pAudienceGender + = lens _pAudienceGender + (\ s a -> s{_pAudienceGender = a}) + +-- | Name of the project client. +pClientName :: Lens' Project (Maybe Text) +pClientName + = lens _pClientName (\ s a -> s{_pClientName = a}) + +-- | CPA that the advertiser is targeting. +pTargetCpaNanos :: Lens' Project (Maybe Int64) +pTargetCpaNanos + = lens _pTargetCpaNanos + (\ s a -> s{_pTargetCpaNanos = a}) + +instance FromJSON Project where + parseJSON + = withObject "Project" + (\ o -> + Project <$> + (o .:? "targetClicks") <*> + (o .:? "clientBillingCode") + <*> (o .:? "targetCpmNanos") + <*> (o .:? "targetConversions") + <*> (o .:? "budget") + <*> (o .:? "kind" .!= "dfareporting#project") + <*> (o .:? "advertiserId") + <*> (o .:? "endDate") + <*> (o .:? "overview") + <*> (o .:? "targetImpressions") + <*> (o .:? "startDate") + <*> (o .:? "targetCpcNanos") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "audienceAgeGroup") + <*> (o .:? "subaccountId") + <*> (o .:? "audienceGender") + <*> (o .:? "clientName") + <*> (o .:? "targetCpaNanos")) + +instance ToJSON Project where + toJSON Project{..} + = object + (catMaybes + [("targetClicks" .=) <$> _pTargetClicks, + ("clientBillingCode" .=) <$> _pClientBillingCode, + ("targetCpmNanos" .=) <$> _pTargetCpmNanos, + ("targetConversions" .=) <$> _pTargetConversions, + ("budget" .=) <$> _pBudget, Just ("kind" .= _pKind), + ("advertiserId" .=) <$> _pAdvertiserId, + ("endDate" .=) <$> _pEndDate, + ("overview" .=) <$> _pOverview, + ("targetImpressions" .=) <$> _pTargetImpressions, + ("startDate" .=) <$> _pStartDate, + ("targetCpcNanos" .=) <$> _pTargetCpcNanos, + ("accountId" .=) <$> _pAccountId, + ("name" .=) <$> _pName, + ("lastModifiedInfo" .=) <$> _pLastModifiedInfo, + ("id" .=) <$> _pId, + ("audienceAgeGroup" .=) <$> _pAudienceAgeGroup, + ("subaccountId" .=) <$> _pSubaccountId, + ("audienceGender" .=) <$> _pAudienceGender, + ("clientName" .=) <$> _pClientName, + ("targetCpaNanos" .=) <$> _pTargetCpaNanos]) + +-- | Contains properties of a DCM subaccount. +-- +-- /See:/ 'subaccount' smart constructor. +data Subaccount = Subaccount + { _subKind :: !Text + , _subAvailablePermissionIds :: !(Maybe [Int64]) + , _subAccountId :: !(Maybe Int64) + , _subName :: !(Maybe Text) + , _subId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subaccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subKind' +-- +-- * 'subAvailablePermissionIds' +-- +-- * 'subAccountId' +-- +-- * 'subName' +-- +-- * 'subId' +subaccount + :: Subaccount +subaccount = + Subaccount + { _subKind = "dfareporting#subaccount" + , _subAvailablePermissionIds = Nothing + , _subAccountId = Nothing + , _subName = Nothing + , _subId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#subaccount\". +subKind :: Lens' Subaccount Text +subKind = lens _subKind (\ s a -> s{_subKind = a}) + +-- | IDs of the available user role permissions for this subaccount. +subAvailablePermissionIds :: Lens' Subaccount [Int64] +subAvailablePermissionIds + = lens _subAvailablePermissionIds + (\ s a -> s{_subAvailablePermissionIds = a}) + . _Default + . _Coerce + +-- | ID of the account that contains this subaccount. This is a read-only +-- field that can be left blank. +subAccountId :: Lens' Subaccount (Maybe Int64) +subAccountId + = lens _subAccountId (\ s a -> s{_subAccountId = a}) + +-- | Name of this subaccount. This is a required field. Must be less than 128 +-- characters long and be unique among subaccounts of the same account. +subName :: Lens' Subaccount (Maybe Text) +subName = lens _subName (\ s a -> s{_subName = a}) + +-- | ID of this subaccount. This is a read-only, auto-generated field. +subId :: Lens' Subaccount (Maybe Int64) +subId = lens _subId (\ s a -> s{_subId = a}) + +instance FromJSON Subaccount where + parseJSON + = withObject "Subaccount" + (\ o -> + Subaccount <$> + (o .:? "kind" .!= "dfareporting#subaccount") <*> + (o .:? "availablePermissionIds" .!= mempty) + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Subaccount where + toJSON Subaccount{..} + = object + (catMaybes + [Just ("kind" .= _subKind), + ("availablePermissionIds" .=) <$> + _subAvailablePermissionIds, + ("accountId" .=) <$> _subAccountId, + ("name" .=) <$> _subName, ("id" .=) <$> _subId]) + +-- | Placement Strategy List Response +-- +-- /See:/ 'placementStrategiesListResponse' smart constructor. +data PlacementStrategiesListResponse = PlacementStrategiesListResponse + { _pslrPlacementStrategies :: !(Maybe [Maybe PlacementStrategy]) + , _pslrNextPageToken :: !(Maybe Text) + , _pslrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslrPlacementStrategies' +-- +-- * 'pslrNextPageToken' +-- +-- * 'pslrKind' +placementStrategiesListResponse + :: PlacementStrategiesListResponse +placementStrategiesListResponse = + PlacementStrategiesListResponse + { _pslrPlacementStrategies = Nothing + , _pslrNextPageToken = Nothing + , _pslrKind = "dfareporting#placementStrategiesListResponse" + } + +-- | Placement strategy collection. +pslrPlacementStrategies :: Lens' PlacementStrategiesListResponse [Maybe PlacementStrategy] +pslrPlacementStrategies + = lens _pslrPlacementStrategies + (\ s a -> s{_pslrPlacementStrategies = a}) + . _Default + . _Coerce + +-- | Pagination token to be used for the next list operation. +pslrNextPageToken :: Lens' PlacementStrategiesListResponse (Maybe Text) +pslrNextPageToken + = lens _pslrNextPageToken + (\ s a -> s{_pslrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementStrategiesListResponse\". +pslrKind :: Lens' PlacementStrategiesListResponse Text +pslrKind = lens _pslrKind (\ s a -> s{_pslrKind = a}) + +instance FromJSON PlacementStrategiesListResponse + where + parseJSON + = withObject "PlacementStrategiesListResponse" + (\ o -> + PlacementStrategiesListResponse <$> + (o .:? "placementStrategies" .!= mempty) <*> + (o .:? "nextPageToken") + <*> + (o .:? "kind" .!= + "dfareporting#placementStrategiesListResponse")) + +instance ToJSON PlacementStrategiesListResponse where + toJSON PlacementStrategiesListResponse{..} + = object + (catMaybes + [("placementStrategies" .=) <$> + _pslrPlacementStrategies, + ("nextPageToken" .=) <$> _pslrNextPageToken, + Just ("kind" .= _pslrKind)]) + +-- | Pricing Schedule +-- +-- /See:/ 'pricingSchedule' smart constructor. +data PricingSchedule = PricingSchedule + { _psTestingStartDate :: !(Maybe UTCTime) + , _psFloodlightActivityId :: !(Maybe Int64) + , _psEndDate :: !(Maybe UTCTime) + , _psDisregardOverdelivery :: !(Maybe Bool) + , _psStartDate :: !(Maybe UTCTime) + , _psCapCostOption :: !(Maybe Text) + , _psPricingType :: !(Maybe Text) + , _psPricingPeriods :: !(Maybe [Maybe PricingSchedulePricingPeriod]) + , _psFlighted :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PricingSchedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psTestingStartDate' +-- +-- * 'psFloodlightActivityId' +-- +-- * 'psEndDate' +-- +-- * 'psDisregardOverdelivery' +-- +-- * 'psStartDate' +-- +-- * 'psCapCostOption' +-- +-- * 'psPricingType' +-- +-- * 'psPricingPeriods' +-- +-- * 'psFlighted' +pricingSchedule + :: PricingSchedule +pricingSchedule = + PricingSchedule + { _psTestingStartDate = Nothing + , _psFloodlightActivityId = Nothing + , _psEndDate = Nothing + , _psDisregardOverdelivery = Nothing + , _psStartDate = Nothing + , _psCapCostOption = Nothing + , _psPricingType = Nothing + , _psPricingPeriods = Nothing + , _psFlighted = Nothing + } + +-- | Testing start date of this placement. The hours, minutes, and seconds of +-- the start date should not be set, as doing so will result in an error. +psTestingStartDate :: Lens' PricingSchedule (Maybe UTCTime) +psTestingStartDate + = lens _psTestingStartDate + (\ s a -> s{_psTestingStartDate = a}) + +-- | Floodlight activity ID associated with this placement. This field should +-- be set when placement pricing type is set to PRICING_TYPE_CPA. +psFloodlightActivityId :: Lens' PricingSchedule (Maybe Int64) +psFloodlightActivityId + = lens _psFloodlightActivityId + (\ s a -> s{_psFloodlightActivityId = a}) + +-- | Placement end date. This date must be later than, or the same day as, +-- the placement start date, but not later than the campaign end date. If, +-- for example, you set 6\/25\/2015 as both the start and end dates, the +-- effective placement date is just that day only, 6\/25\/2015. The hours, +-- minutes, and seconds of the end date should not be set, as doing so will +-- result in an error. This field is required on insertion. +psEndDate :: Lens' PricingSchedule (Maybe UTCTime) +psEndDate + = lens _psEndDate (\ s a -> s{_psEndDate = a}) + +-- | Whether cap costs are ignored by ad serving. +psDisregardOverdelivery :: Lens' PricingSchedule (Maybe Bool) +psDisregardOverdelivery + = lens _psDisregardOverdelivery + (\ s a -> s{_psDisregardOverdelivery = a}) + +-- | Placement start date. This date must be later than, or the same day as, +-- the campaign start date. The hours, minutes, and seconds of the start +-- date should not be set, as doing so will result in an error. This field +-- is required on insertion. +psStartDate :: Lens' PricingSchedule (Maybe UTCTime) +psStartDate + = lens _psStartDate (\ s a -> s{_psStartDate = a}) + +-- | Placement cap cost option. +psCapCostOption :: Lens' PricingSchedule (Maybe Text) +psCapCostOption + = lens _psCapCostOption + (\ s a -> s{_psCapCostOption = a}) + +-- | Placement pricing type. This field is required on insertion. +psPricingType :: Lens' PricingSchedule (Maybe Text) +psPricingType + = lens _psPricingType + (\ s a -> s{_psPricingType = a}) + +-- | Pricing periods for this placement. +psPricingPeriods :: Lens' PricingSchedule [Maybe PricingSchedulePricingPeriod] +psPricingPeriods + = lens _psPricingPeriods + (\ s a -> s{_psPricingPeriods = a}) + . _Default + . _Coerce + +-- | Whether this placement is flighted. If true, pricing periods will be +-- computed automatically. +psFlighted :: Lens' PricingSchedule (Maybe Bool) +psFlighted + = lens _psFlighted (\ s a -> s{_psFlighted = a}) + +instance FromJSON PricingSchedule where + parseJSON + = withObject "PricingSchedule" + (\ o -> + PricingSchedule <$> + (o .:? "testingStartDate") <*> + (o .:? "floodlightActivityId") + <*> (o .:? "endDate") + <*> (o .:? "disregardOverdelivery") + <*> (o .:? "startDate") + <*> (o .:? "capCostOption") + <*> (o .:? "pricingType") + <*> (o .:? "pricingPeriods" .!= mempty) + <*> (o .:? "flighted")) + +instance ToJSON PricingSchedule where + toJSON PricingSchedule{..} + = object + (catMaybes + [("testingStartDate" .=) <$> _psTestingStartDate, + ("floodlightActivityId" .=) <$> + _psFloodlightActivityId, + ("endDate" .=) <$> _psEndDate, + ("disregardOverdelivery" .=) <$> + _psDisregardOverdelivery, + ("startDate" .=) <$> _psStartDate, + ("capCostOption" .=) <$> _psCapCostOption, + ("pricingType" .=) <$> _psPricingType, + ("pricingPeriods" .=) <$> _psPricingPeriods, + ("flighted" .=) <$> _psFlighted]) + +-- | Contains information about a postal code that can be targeted by ads. +-- +-- /See:/ 'postalCode' smart constructor. +data PostalCode = PostalCode + { _pcKind :: !Text + , _pcCode :: !(Maybe Text) + , _pcCountryCode :: !(Maybe Text) + , _pcId :: !(Maybe Text) + , _pcCountryDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostalCode' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcKind' +-- +-- * 'pcCode' +-- +-- * 'pcCountryCode' +-- +-- * 'pcId' +-- +-- * 'pcCountryDartId' +postalCode + :: PostalCode +postalCode = + PostalCode + { _pcKind = "dfareporting#postalCode" + , _pcCode = Nothing + , _pcCountryCode = Nothing + , _pcId = Nothing + , _pcCountryDartId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#postalCode\". +pcKind :: Lens' PostalCode Text +pcKind = lens _pcKind (\ s a -> s{_pcKind = a}) + +-- | Postal code. This is equivalent to the id field. +pcCode :: Lens' PostalCode (Maybe Text) +pcCode = lens _pcCode (\ s a -> s{_pcCode = a}) + +-- | Country code of the country to which this postal code belongs. +pcCountryCode :: Lens' PostalCode (Maybe Text) +pcCountryCode + = lens _pcCountryCode + (\ s a -> s{_pcCountryCode = a}) + +-- | ID of this postal code. +pcId :: Lens' PostalCode (Maybe Text) +pcId = lens _pcId (\ s a -> s{_pcId = a}) + +-- | DART ID of the country to which this postal code belongs. +pcCountryDartId :: Lens' PostalCode (Maybe Int64) +pcCountryDartId + = lens _pcCountryDartId + (\ s a -> s{_pcCountryDartId = a}) + +instance FromJSON PostalCode where + parseJSON + = withObject "PostalCode" + (\ o -> + PostalCode <$> + (o .:? "kind" .!= "dfareporting#postalCode") <*> + (o .:? "code") + <*> (o .:? "countryCode") + <*> (o .:? "id") + <*> (o .:? "countryDartId")) + +instance ToJSON PostalCode where + toJSON PostalCode{..} + = object + (catMaybes + [Just ("kind" .= _pcKind), ("code" .=) <$> _pcCode, + ("countryCode" .=) <$> _pcCountryCode, + ("id" .=) <$> _pcId, + ("countryDartId" .=) <$> _pcCountryDartId]) + +-- | Contains information about an operating system that can be targeted by +-- ads. +-- +-- /See:/ 'operatingSystem' smart constructor. +data OperatingSystem = OperatingSystem + { _osDesktop :: !(Maybe Bool) + , _osKind :: !Text + , _osName :: !(Maybe Text) + , _osMobile :: !(Maybe Bool) + , _osDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osDesktop' +-- +-- * 'osKind' +-- +-- * 'osName' +-- +-- * 'osMobile' +-- +-- * 'osDartId' +operatingSystem + :: OperatingSystem +operatingSystem = + OperatingSystem + { _osDesktop = Nothing + , _osKind = "dfareporting#operatingSystem" + , _osName = Nothing + , _osMobile = Nothing + , _osDartId = Nothing + } + +-- | Whether this operating system is for desktop. +osDesktop :: Lens' OperatingSystem (Maybe Bool) +osDesktop + = lens _osDesktop (\ s a -> s{_osDesktop = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#operatingSystem\". +osKind :: Lens' OperatingSystem Text +osKind = lens _osKind (\ s a -> s{_osKind = a}) + +-- | Name of this operating system. +osName :: Lens' OperatingSystem (Maybe Text) +osName = lens _osName (\ s a -> s{_osName = a}) + +-- | Whether this operating system is for mobile. +osMobile :: Lens' OperatingSystem (Maybe Bool) +osMobile = lens _osMobile (\ s a -> s{_osMobile = a}) + +-- | DART ID of this operating system. This is the ID used for targeting. +osDartId :: Lens' OperatingSystem (Maybe Int64) +osDartId = lens _osDartId (\ s a -> s{_osDartId = a}) + +instance FromJSON OperatingSystem where + parseJSON + = withObject "OperatingSystem" + (\ o -> + OperatingSystem <$> + (o .:? "desktop") <*> + (o .:? "kind" .!= "dfareporting#operatingSystem") + <*> (o .:? "name") + <*> (o .:? "mobile") + <*> (o .:? "dartId")) + +instance ToJSON OperatingSystem where + toJSON OperatingSystem{..} + = object + (catMaybes + [("desktop" .=) <$> _osDesktop, + Just ("kind" .= _osKind), ("name" .=) <$> _osName, + ("mobile" .=) <$> _osMobile, + ("dartId" .=) <$> _osDartId]) + +-- | City List Response +-- +-- /See:/ 'citiesListResponse' smart constructor. +data CitiesListResponse = CitiesListResponse + { _cKind :: !Text + , _cCities :: !(Maybe [Maybe City]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CitiesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cKind' +-- +-- * 'cCities' +citiesListResponse + :: CitiesListResponse +citiesListResponse = + CitiesListResponse + { _cKind = "dfareporting#citiesListResponse" + , _cCities = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#citiesListResponse\". +cKind :: Lens' CitiesListResponse Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | City collection. +cCities :: Lens' CitiesListResponse [Maybe City] +cCities + = lens _cCities (\ s a -> s{_cCities = a}) . _Default + . _Coerce + +instance FromJSON CitiesListResponse where + parseJSON + = withObject "CitiesListResponse" + (\ o -> + CitiesListResponse <$> + (o .:? "kind" .!= "dfareporting#citiesListResponse") + <*> (o .:? "cities" .!= mempty)) + +instance ToJSON CitiesListResponse where + toJSON CitiesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _cKind), + ("cities" .=) <$> _cCities]) + +-- | Change Log List Response +-- +-- /See:/ 'changeLogsListResponse' smart constructor. +data ChangeLogsListResponse = ChangeLogsListResponse + { _cllrNextPageToken :: !(Maybe Text) + , _cllrKind :: !Text + , _cllrChangeLogs :: !(Maybe [Maybe ChangeLog]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangeLogsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllrNextPageToken' +-- +-- * 'cllrKind' +-- +-- * 'cllrChangeLogs' +changeLogsListResponse + :: ChangeLogsListResponse +changeLogsListResponse = + ChangeLogsListResponse + { _cllrNextPageToken = Nothing + , _cllrKind = "dfareporting#changeLogsListResponse" + , _cllrChangeLogs = Nothing + } + +-- | Pagination token to be used for the next list operation. +cllrNextPageToken :: Lens' ChangeLogsListResponse (Maybe Text) +cllrNextPageToken + = lens _cllrNextPageToken + (\ s a -> s{_cllrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#changeLogsListResponse\". +cllrKind :: Lens' ChangeLogsListResponse Text +cllrKind = lens _cllrKind (\ s a -> s{_cllrKind = a}) + +-- | Change log collection. +cllrChangeLogs :: Lens' ChangeLogsListResponse [Maybe ChangeLog] +cllrChangeLogs + = lens _cllrChangeLogs + (\ s a -> s{_cllrChangeLogs = a}) + . _Default + . _Coerce + +instance FromJSON ChangeLogsListResponse where + parseJSON + = withObject "ChangeLogsListResponse" + (\ o -> + ChangeLogsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#changeLogsListResponse") + <*> (o .:? "changeLogs" .!= mempty)) + +instance ToJSON ChangeLogsListResponse where + toJSON ChangeLogsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _cllrNextPageToken, + Just ("kind" .= _cllrKind), + ("changeLogs" .=) <$> _cllrChangeLogs]) + +-- | Account Permission List Response +-- +-- /See:/ 'accountPermissionsListResponse' smart constructor. +data AccountPermissionsListResponse = AccountPermissionsListResponse + { _aplrKind :: !Text + , _aplrAccountPermissions :: !(Maybe [Maybe AccountPermission]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplrKind' +-- +-- * 'aplrAccountPermissions' +accountPermissionsListResponse + :: AccountPermissionsListResponse +accountPermissionsListResponse = + AccountPermissionsListResponse + { _aplrKind = "dfareporting#accountPermissionsListResponse" + , _aplrAccountPermissions = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountPermissionsListResponse\". +aplrKind :: Lens' AccountPermissionsListResponse Text +aplrKind = lens _aplrKind (\ s a -> s{_aplrKind = a}) + +-- | Account permission collection. +aplrAccountPermissions :: Lens' AccountPermissionsListResponse [Maybe AccountPermission] +aplrAccountPermissions + = lens _aplrAccountPermissions + (\ s a -> s{_aplrAccountPermissions = a}) + . _Default + . _Coerce + +instance FromJSON AccountPermissionsListResponse + where + parseJSON + = withObject "AccountPermissionsListResponse" + (\ o -> + AccountPermissionsListResponse <$> + (o .:? "kind" .!= + "dfareporting#accountPermissionsListResponse") + <*> (o .:? "accountPermissions" .!= mempty)) + +instance ToJSON AccountPermissionsListResponse where + toJSON AccountPermissionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _aplrKind), + ("accountPermissions" .=) <$> + _aplrAccountPermissions]) + +-- | Click Through URL Suffix settings. +-- +-- /See:/ 'clickThroughURLSuffixProperties' smart constructor. +data ClickThroughURLSuffixProperties = ClickThroughURLSuffixProperties + { _ctuspOverrideInheritedSuffix :: !(Maybe Bool) + , _ctuspClickThroughUrlSuffix :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClickThroughURLSuffixProperties' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctuspOverrideInheritedSuffix' +-- +-- * 'ctuspClickThroughUrlSuffix' +clickThroughURLSuffixProperties + :: ClickThroughURLSuffixProperties +clickThroughURLSuffixProperties = + ClickThroughURLSuffixProperties + { _ctuspOverrideInheritedSuffix = Nothing + , _ctuspClickThroughUrlSuffix = Nothing + } + +-- | Whether this entity should override the inherited click-through URL +-- suffix with its own defined value. +ctuspOverrideInheritedSuffix :: Lens' ClickThroughURLSuffixProperties (Maybe Bool) +ctuspOverrideInheritedSuffix + = lens _ctuspOverrideInheritedSuffix + (\ s a -> s{_ctuspOverrideInheritedSuffix = a}) + +-- | Click-through URL suffix to apply to all ads in this entity\'s scope. +-- Must be less than 128 characters long. +ctuspClickThroughUrlSuffix :: Lens' ClickThroughURLSuffixProperties (Maybe Text) +ctuspClickThroughUrlSuffix + = lens _ctuspClickThroughUrlSuffix + (\ s a -> s{_ctuspClickThroughUrlSuffix = a}) + +instance FromJSON ClickThroughURLSuffixProperties + where + parseJSON + = withObject "ClickThroughURLSuffixProperties" + (\ o -> + ClickThroughURLSuffixProperties <$> + (o .:? "overrideInheritedSuffix") <*> + (o .:? "clickThroughUrlSuffix")) + +instance ToJSON ClickThroughURLSuffixProperties where + toJSON ClickThroughURLSuffixProperties{..} + = object + (catMaybes + [("overrideInheritedSuffix" .=) <$> + _ctuspOverrideInheritedSuffix, + ("clickThroughUrlSuffix" .=) <$> + _ctuspClickThroughUrlSuffix]) + +-- | Operating System Version List Response +-- +-- /See:/ 'operatingSystemVersionsListResponse' smart constructor. +data OperatingSystemVersionsListResponse = OperatingSystemVersionsListResponse + { _osvlrKind :: !Text + , _osvlrOperatingSystemVersions :: !(Maybe [Maybe OperatingSystemVersion]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemVersionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osvlrKind' +-- +-- * 'osvlrOperatingSystemVersions' +operatingSystemVersionsListResponse + :: OperatingSystemVersionsListResponse +operatingSystemVersionsListResponse = + OperatingSystemVersionsListResponse + { _osvlrKind = "dfareporting#operatingSystemVersionsListResponse" + , _osvlrOperatingSystemVersions = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#operatingSystemVersionsListResponse\". +osvlrKind :: Lens' OperatingSystemVersionsListResponse Text +osvlrKind + = lens _osvlrKind (\ s a -> s{_osvlrKind = a}) + +-- | Operating system version collection. +osvlrOperatingSystemVersions :: Lens' OperatingSystemVersionsListResponse [Maybe OperatingSystemVersion] +osvlrOperatingSystemVersions + = lens _osvlrOperatingSystemVersions + (\ s a -> s{_osvlrOperatingSystemVersions = a}) + . _Default + . _Coerce + +instance FromJSON OperatingSystemVersionsListResponse + where + parseJSON + = withObject "OperatingSystemVersionsListResponse" + (\ o -> + OperatingSystemVersionsListResponse <$> + (o .:? "kind" .!= + "dfareporting#operatingSystemVersionsListResponse") + <*> (o .:? "operatingSystemVersions" .!= mempty)) + +instance ToJSON OperatingSystemVersionsListResponse + where + toJSON OperatingSystemVersionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _osvlrKind), + ("operatingSystemVersions" .=) <$> + _osvlrOperatingSystemVersions]) + +-- | Targetable remarketing list response +-- +-- /See:/ 'targetableRemarketingListsListResponse' smart constructor. +data TargetableRemarketingListsListResponse = TargetableRemarketingListsListResponse + { _trllrNextPageToken :: !(Maybe Text) + , _trllrKind :: !Text + , _trllrTargetableRemarketingLists :: !(Maybe [Maybe TargetableRemarketingList]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetableRemarketingListsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trllrNextPageToken' +-- +-- * 'trllrKind' +-- +-- * 'trllrTargetableRemarketingLists' +targetableRemarketingListsListResponse + :: TargetableRemarketingListsListResponse +targetableRemarketingListsListResponse = + TargetableRemarketingListsListResponse + { _trllrNextPageToken = Nothing + , _trllrKind = "dfareporting#targetableRemarketingListsListResponse" + , _trllrTargetableRemarketingLists = Nothing + } + +-- | Pagination token to be used for the next list operation. +trllrNextPageToken :: Lens' TargetableRemarketingListsListResponse (Maybe Text) +trllrNextPageToken + = lens _trllrNextPageToken + (\ s a -> s{_trllrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#targetableRemarketingListsListResponse\". +trllrKind :: Lens' TargetableRemarketingListsListResponse Text +trllrKind + = lens _trllrKind (\ s a -> s{_trllrKind = a}) + +-- | Targetable remarketing list collection. +trllrTargetableRemarketingLists :: Lens' TargetableRemarketingListsListResponse [Maybe TargetableRemarketingList] +trllrTargetableRemarketingLists + = lens _trllrTargetableRemarketingLists + (\ s a -> s{_trllrTargetableRemarketingLists = a}) + . _Default + . _Coerce + +instance FromJSON + TargetableRemarketingListsListResponse where + parseJSON + = withObject "TargetableRemarketingListsListResponse" + (\ o -> + TargetableRemarketingListsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#targetableRemarketingListsListResponse") + <*> (o .:? "targetableRemarketingLists" .!= mempty)) + +instance ToJSON + TargetableRemarketingListsListResponse where + toJSON TargetableRemarketingListsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _trllrNextPageToken, + Just ("kind" .= _trllrKind), + ("targetableRemarketingLists" .=) <$> + _trllrTargetableRemarketingLists]) + +-- | Contains information about a country that can be targeted by ads. +-- +-- /See:/ 'country' smart constructor. +data Country = Country + { _couKind :: !Text + , _couName :: !(Maybe Text) + , _couCountryCode :: !(Maybe Text) + , _couDartId :: !(Maybe Int64) + , _couSslEnabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Country' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'couKind' +-- +-- * 'couName' +-- +-- * 'couCountryCode' +-- +-- * 'couDartId' +-- +-- * 'couSslEnabled' +country + :: Country +country = + Country + { _couKind = "dfareporting#country" + , _couName = Nothing + , _couCountryCode = Nothing + , _couDartId = Nothing + , _couSslEnabled = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#country\". +couKind :: Lens' Country Text +couKind = lens _couKind (\ s a -> s{_couKind = a}) + +-- | Name of this country. +couName :: Lens' Country (Maybe Text) +couName = lens _couName (\ s a -> s{_couName = a}) + +-- | Country code. +couCountryCode :: Lens' Country (Maybe Text) +couCountryCode + = lens _couCountryCode + (\ s a -> s{_couCountryCode = a}) + +-- | DART ID of this country. This is the ID used for targeting and +-- generating reports. +couDartId :: Lens' Country (Maybe Int64) +couDartId + = lens _couDartId (\ s a -> s{_couDartId = a}) + +-- | Whether ad serving supports secure servers in this country. +couSslEnabled :: Lens' Country (Maybe Bool) +couSslEnabled + = lens _couSslEnabled + (\ s a -> s{_couSslEnabled = a}) + +instance FromJSON Country where + parseJSON + = withObject "Country" + (\ o -> + Country <$> + (o .:? "kind" .!= "dfareporting#country") <*> + (o .:? "name") + <*> (o .:? "countryCode") + <*> (o .:? "dartId") + <*> (o .:? "sslEnabled")) + +instance ToJSON Country where + toJSON Country{..} + = object + (catMaybes + [Just ("kind" .= _couKind), ("name" .=) <$> _couName, + ("countryCode" .=) <$> _couCountryCode, + ("dartId" .=) <$> _couDartId, + ("sslEnabled" .=) <$> _couSslEnabled]) + +-- | Pricing Information +-- +-- /See:/ 'pricing' smart constructor. +data Pricing = Pricing + { _priEndDate :: !(Maybe UTCTime) + , _priStartDate :: !(Maybe UTCTime) + , _priGroupType :: !(Maybe Text) + , _priPricingType :: !(Maybe Text) + , _priFlights :: !(Maybe [Maybe Flight]) + , _priCapCostType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Pricing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'priEndDate' +-- +-- * 'priStartDate' +-- +-- * 'priGroupType' +-- +-- * 'priPricingType' +-- +-- * 'priFlights' +-- +-- * 'priCapCostType' +pricing + :: Pricing +pricing = + Pricing + { _priEndDate = Nothing + , _priStartDate = Nothing + , _priGroupType = Nothing + , _priPricingType = Nothing + , _priFlights = Nothing + , _priCapCostType = Nothing + } + +-- | End date of this inventory item. +priEndDate :: Lens' Pricing (Maybe UTCTime) +priEndDate + = lens _priEndDate (\ s a -> s{_priEndDate = a}) + +-- | Start date of this inventory item. +priStartDate :: Lens' Pricing (Maybe UTCTime) +priStartDate + = lens _priStartDate (\ s a -> s{_priStartDate = a}) + +-- | Group type of this inventory item if it represents a placement group. Is +-- null otherwise. There are two type of placement groups: +-- PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of inventory +-- items that acts as a single pricing point for a group of tags. +-- PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory items +-- that not only acts as a single pricing point, but also assumes that all +-- the tags in it will be served at the same time. A roadblock requires one +-- of its assigned inventory items to be marked as primary. +priGroupType :: Lens' Pricing (Maybe Text) +priGroupType + = lens _priGroupType (\ s a -> s{_priGroupType = a}) + +-- | Pricing type of this inventory item. +priPricingType :: Lens' Pricing (Maybe Text) +priPricingType + = lens _priPricingType + (\ s a -> s{_priPricingType = a}) + +-- | Flights of this inventory item. A flight (a.k.a. pricing period) +-- represents the inventory item pricing information for a specific period +-- of time. +priFlights :: Lens' Pricing [Maybe Flight] +priFlights + = lens _priFlights (\ s a -> s{_priFlights = a}) . + _Default + . _Coerce + +-- | Cap cost type of this inventory item. +priCapCostType :: Lens' Pricing (Maybe Text) +priCapCostType + = lens _priCapCostType + (\ s a -> s{_priCapCostType = a}) + +instance FromJSON Pricing where + parseJSON + = withObject "Pricing" + (\ o -> + Pricing <$> + (o .:? "endDate") <*> (o .:? "startDate") <*> + (o .:? "groupType") + <*> (o .:? "pricingType") + <*> (o .:? "flights" .!= mempty) + <*> (o .:? "capCostType")) + +instance ToJSON Pricing where + toJSON Pricing{..} + = object + (catMaybes + [("endDate" .=) <$> _priEndDate, + ("startDate" .=) <$> _priStartDate, + ("groupType" .=) <$> _priGroupType, + ("pricingType" .=) <$> _priPricingType, + ("flights" .=) <$> _priFlights, + ("capCostType" .=) <$> _priCapCostType]) + +-- | Represents a Custom Rich Media Events group. +-- +-- /See:/ 'customRichMediaEvents' smart constructor. +data CustomRichMediaEvents = CustomRichMediaEvents + { _crmeKind :: !Text + , _crmeFilteredEventIds :: !(Maybe [Maybe DimensionValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomRichMediaEvents' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crmeKind' +-- +-- * 'crmeFilteredEventIds' +customRichMediaEvents + :: CustomRichMediaEvents +customRichMediaEvents = + CustomRichMediaEvents + { _crmeKind = "dfareporting#customRichMediaEvents" + , _crmeFilteredEventIds = Nothing + } + +-- | The kind of resource this is, in this case +-- dfareporting#customRichMediaEvents. +crmeKind :: Lens' CustomRichMediaEvents Text +crmeKind = lens _crmeKind (\ s a -> s{_crmeKind = a}) + +-- | List of custom rich media event IDs. Dimension values must be all of +-- type dfa:richMediaEventTypeIdAndName. +crmeFilteredEventIds :: Lens' CustomRichMediaEvents [Maybe DimensionValue] +crmeFilteredEventIds + = lens _crmeFilteredEventIds + (\ s a -> s{_crmeFilteredEventIds = a}) + . _Default + . _Coerce + +instance FromJSON CustomRichMediaEvents where + parseJSON + = withObject "CustomRichMediaEvents" + (\ o -> + CustomRichMediaEvents <$> + (o .:? "kind" .!= + "dfareporting#customRichMediaEvents") + <*> (o .:? "filteredEventIds" .!= mempty)) + +instance ToJSON CustomRichMediaEvents where + toJSON CustomRichMediaEvents{..} + = object + (catMaybes + [Just ("kind" .= _crmeKind), + ("filteredEventIds" .=) <$> _crmeFilteredEventIds]) + +-- | Audience Segment Group. +-- +-- /See:/ 'audienceSegmentGroup' smart constructor. +data AudienceSegmentGroup = AudienceSegmentGroup + { _asgAudienceSegments :: !(Maybe [Maybe AudienceSegment]) + , _asgName :: !(Maybe Text) + , _asgId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AudienceSegmentGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asgAudienceSegments' +-- +-- * 'asgName' +-- +-- * 'asgId' +audienceSegmentGroup + :: AudienceSegmentGroup +audienceSegmentGroup = + AudienceSegmentGroup + { _asgAudienceSegments = Nothing + , _asgName = Nothing + , _asgId = Nothing + } + +-- | Audience segments assigned to this group. The number of segments must be +-- between 2 and 100. +asgAudienceSegments :: Lens' AudienceSegmentGroup [Maybe AudienceSegment] +asgAudienceSegments + = lens _asgAudienceSegments + (\ s a -> s{_asgAudienceSegments = a}) + . _Default + . _Coerce + +-- | Name of this audience segment group. This is a required field and must +-- be less than 65 characters long. +asgName :: Lens' AudienceSegmentGroup (Maybe Text) +asgName = lens _asgName (\ s a -> s{_asgName = a}) + +-- | ID of this audience segment group. This is a read-only, auto-generated +-- field. +asgId :: Lens' AudienceSegmentGroup (Maybe Int64) +asgId = lens _asgId (\ s a -> s{_asgId = a}) + +instance FromJSON AudienceSegmentGroup where + parseJSON + = withObject "AudienceSegmentGroup" + (\ o -> + AudienceSegmentGroup <$> + (o .:? "audienceSegments" .!= mempty) <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AudienceSegmentGroup where + toJSON AudienceSegmentGroup{..} + = object + (catMaybes + [("audienceSegments" .=) <$> _asgAudienceSegments, + ("name" .=) <$> _asgName, ("id" .=) <$> _asgId]) + +-- | Represents a dimension. +-- +-- /See:/ 'dimension' smart constructor. +data Dimension = Dimension + { _dKind :: !Text + , _dName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Dimension' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dKind' +-- +-- * 'dName' +dimension + :: Dimension +dimension = + Dimension + { _dKind = "dfareporting#dimension" + , _dName = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#dimension. +dKind :: Lens' Dimension Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | The dimension name, e.g. dfa:advertiser +dName :: Lens' Dimension (Maybe Text) +dName = lens _dName (\ s a -> s{_dName = a}) + +instance FromJSON Dimension where + parseJSON + = withObject "Dimension" + (\ o -> + Dimension <$> + (o .:? "kind" .!= "dfareporting#dimension") <*> + (o .:? "name")) + +instance ToJSON Dimension where + toJSON Dimension{..} + = object + (catMaybes + [Just ("kind" .= _dKind), ("name" .=) <$> _dName]) + +-- | Flight +-- +-- /See:/ 'flight' smart constructor. +data Flight = Flight + { _fRateOrCost :: !(Maybe Int64) + , _fEndDate :: !(Maybe UTCTime) + , _fStartDate :: !(Maybe UTCTime) + , _fUnits :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Flight' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fRateOrCost' +-- +-- * 'fEndDate' +-- +-- * 'fStartDate' +-- +-- * 'fUnits' +flight + :: Flight +flight = + Flight + { _fRateOrCost = Nothing + , _fEndDate = Nothing + , _fStartDate = Nothing + , _fUnits = Nothing + } + +-- | Rate or cost of this flight. +fRateOrCost :: Lens' Flight (Maybe Int64) +fRateOrCost + = lens _fRateOrCost (\ s a -> s{_fRateOrCost = a}) + +-- | Inventory item flight end date. +fEndDate :: Lens' Flight (Maybe UTCTime) +fEndDate = lens _fEndDate (\ s a -> s{_fEndDate = a}) + +-- | Inventory item flight start date. +fStartDate :: Lens' Flight (Maybe UTCTime) +fStartDate + = lens _fStartDate (\ s a -> s{_fStartDate = a}) + +-- | Units of this flight. +fUnits :: Lens' Flight (Maybe Int64) +fUnits = lens _fUnits (\ s a -> s{_fUnits = a}) + +instance FromJSON Flight where + parseJSON + = withObject "Flight" + (\ o -> + Flight <$> + (o .:? "rateOrCost") <*> (o .:? "endDate") <*> + (o .:? "startDate") + <*> (o .:? "units")) + +instance ToJSON Flight where + toJSON Flight{..} + = object + (catMaybes + [("rateOrCost" .=) <$> _fRateOrCost, + ("endDate" .=) <$> _fEndDate, + ("startDate" .=) <$> _fStartDate, + ("units" .=) <$> _fUnits]) + +-- | Represents an activity group. +-- +-- /See:/ 'activities' smart constructor. +data Activities = Activities + { _aKind :: !Text + , _aMetricNames :: !(Maybe [Text]) + , _aFilters :: !(Maybe [Maybe DimensionValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activities' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aKind' +-- +-- * 'aMetricNames' +-- +-- * 'aFilters' +activities + :: Activities +activities = + Activities + { _aKind = "dfareporting#activities" + , _aMetricNames = Nothing + , _aFilters = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#activities. +aKind :: Lens' Activities Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | List of names of floodlight activity metrics. +aMetricNames :: Lens' Activities [Text] +aMetricNames + = lens _aMetricNames (\ s a -> s{_aMetricNames = a}) + . _Default + . _Coerce + +-- | List of activity filters. The dimension values need to be all either of +-- type \"dfa:activity\" or \"dfa:activityGroup\". +aFilters :: Lens' Activities [Maybe DimensionValue] +aFilters + = lens _aFilters (\ s a -> s{_aFilters = a}) . + _Default + . _Coerce + +instance FromJSON Activities where + parseJSON + = withObject "Activities" + (\ o -> + Activities <$> + (o .:? "kind" .!= "dfareporting#activities") <*> + (o .:? "metricNames" .!= mempty) + <*> (o .:? "filters" .!= mempty)) + +instance ToJSON Activities where + toJSON Activities{..} + = object + (catMaybes + [Just ("kind" .= _aKind), + ("metricNames" .=) <$> _aMetricNames, + ("filters" .=) <$> _aFilters]) + +-- | Account List Response +-- +-- /See:/ 'accountsListResponse' smart constructor. +data AccountsListResponse = AccountsListResponse + { _accNextPageToken :: !(Maybe Text) + , _accAccounts :: !(Maybe [Maybe Account]) + , _accKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accNextPageToken' +-- +-- * 'accAccounts' +-- +-- * 'accKind' +accountsListResponse + :: AccountsListResponse +accountsListResponse = + AccountsListResponse + { _accNextPageToken = Nothing + , _accAccounts = Nothing + , _accKind = "dfareporting#accountsListResponse" + } + +-- | Pagination token to be used for the next list operation. +accNextPageToken :: Lens' AccountsListResponse (Maybe Text) +accNextPageToken + = lens _accNextPageToken + (\ s a -> s{_accNextPageToken = a}) + +-- | Account collection. +accAccounts :: Lens' AccountsListResponse [Maybe Account] +accAccounts + = lens _accAccounts (\ s a -> s{_accAccounts = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountsListResponse\". +accKind :: Lens' AccountsListResponse Text +accKind = lens _accKind (\ s a -> s{_accKind = a}) + +instance FromJSON AccountsListResponse where + parseJSON + = withObject "AccountsListResponse" + (\ o -> + AccountsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "accounts" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#accountsListResponse")) + +instance ToJSON AccountsListResponse where + toJSON AccountsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _accNextPageToken, + ("accounts" .=) <$> _accAccounts, + Just ("kind" .= _accKind)]) + +-- | Contains properties of a Creative. +-- +-- /See:/ 'creative' smart constructor. +data Creative = Creative + { _creConvertFlashToHtml5 :: !(Maybe Bool) + , _creBackupImageTargetWindow :: !(Maybe (Maybe TargetWindow)) + , _creRenderingIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _creCustomKeyValues :: !(Maybe [Text]) + , _creVideoDuration :: !(Maybe Float) + , _creRenderingId :: !(Maybe Int64) + , _creThirdPartyBackupImageImpressionsUrl :: !(Maybe Text) + , _creFsCommand :: !(Maybe (Maybe FsCommand)) + , _creAllowScriptAccess :: !(Maybe Bool) + , _creHtmlCodeLocked :: !(Maybe Bool) + , _creRequiredFlashPluginVersion :: !(Maybe Text) + , _creAuthoringTool :: !(Maybe Text) + , _creSize :: !(Maybe (Maybe Size)) + , _creThirdPartyUrls :: !(Maybe [Maybe ThirdPartyTrackingURL]) + , _creCounterCustomEvents :: !(Maybe [Maybe CreativeCustomEvent]) + , _creKind :: !Text + , _creSslOverride :: !(Maybe Bool) + , _creHtmlCode :: !(Maybe Text) + , _creAdvertiserId :: !(Maybe Int64) + , _creRequiredFlashVersion :: !(Maybe Int32) + , _creBackgroundColor :: !(Maybe Text) + , _creAdTagKeys :: !(Maybe [Text]) + , _creSkippable :: !(Maybe Bool) + , _creSslCompliant :: !(Maybe Bool) + , _creIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _creBackupImageReportingLabel :: !(Maybe Text) + , _creCommercialId :: !(Maybe Text) + , _creActive :: !(Maybe Bool) + , _creExitCustomEvents :: !(Maybe [Maybe CreativeCustomEvent]) + , _creAccountId :: !(Maybe Int64) + , _creBackupImageClickThroughUrl :: !(Maybe Text) + , _creName :: !(Maybe Text) + , _creOverrideCss :: !(Maybe Text) + , _creVideoDescription :: !(Maybe Text) + , _creClickTags :: !(Maybe [Maybe ClickTag]) + , _creAdParameters :: !(Maybe Text) + , _creVersion :: !(Maybe Int32) + , _creLatestTraffickedCreativeId :: !(Maybe Int64) + , _creThirdPartyRichMediaImpressionsUrl :: !(Maybe Text) + , _creLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _creId :: !(Maybe Int64) + , _creStudioAdvertiserId :: !(Maybe Int64) + , _creCreativeAssets :: !(Maybe [Maybe CreativeAsset]) + , _creSubaccountId :: !(Maybe Int64) + , _creType :: !(Maybe Text) + , _creTimerCustomEvents :: !(Maybe [Maybe CreativeCustomEvent]) + , _creStudioCreativeId :: !(Maybe Int64) + , _creCompatibility :: !(Maybe [Text]) + , _creBackupImageFeatures :: !(Maybe [Text]) + , _creArtworkType :: !(Maybe Text) + , _creArchived :: !(Maybe Bool) + , _creCompanionCreatives :: !(Maybe [Int64]) + , _creTotalFileSize :: !(Maybe Int64) + , _creStudioTraffickedCreativeId :: !(Maybe Int64) + , _creRedirectUrl :: !(Maybe Text) + , _creAutoAdvanceImages :: !(Maybe Bool) + , _creCreativeFieldAssignments :: !(Maybe [Maybe CreativeFieldAssignment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Creative' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'creConvertFlashToHtml5' +-- +-- * 'creBackupImageTargetWindow' +-- +-- * 'creRenderingIdDimensionValue' +-- +-- * 'creCustomKeyValues' +-- +-- * 'creVideoDuration' +-- +-- * 'creRenderingId' +-- +-- * 'creThirdPartyBackupImageImpressionsUrl' +-- +-- * 'creFsCommand' +-- +-- * 'creAllowScriptAccess' +-- +-- * 'creHtmlCodeLocked' +-- +-- * 'creRequiredFlashPluginVersion' +-- +-- * 'creAuthoringTool' +-- +-- * 'creSize' +-- +-- * 'creThirdPartyUrls' +-- +-- * 'creCounterCustomEvents' +-- +-- * 'creKind' +-- +-- * 'creSslOverride' +-- +-- * 'creHtmlCode' +-- +-- * 'creAdvertiserId' +-- +-- * 'creRequiredFlashVersion' +-- +-- * 'creBackgroundColor' +-- +-- * 'creAdTagKeys' +-- +-- * 'creSkippable' +-- +-- * 'creSslCompliant' +-- +-- * 'creIdDimensionValue' +-- +-- * 'creBackupImageReportingLabel' +-- +-- * 'creCommercialId' +-- +-- * 'creActive' +-- +-- * 'creExitCustomEvents' +-- +-- * 'creAccountId' +-- +-- * 'creBackupImageClickThroughUrl' +-- +-- * 'creName' +-- +-- * 'creOverrideCss' +-- +-- * 'creVideoDescription' +-- +-- * 'creClickTags' +-- +-- * 'creAdParameters' +-- +-- * 'creVersion' +-- +-- * 'creLatestTraffickedCreativeId' +-- +-- * 'creThirdPartyRichMediaImpressionsUrl' +-- +-- * 'creLastModifiedInfo' +-- +-- * 'creId' +-- +-- * 'creStudioAdvertiserId' +-- +-- * 'creCreativeAssets' +-- +-- * 'creSubaccountId' +-- +-- * 'creType' +-- +-- * 'creTimerCustomEvents' +-- +-- * 'creStudioCreativeId' +-- +-- * 'creCompatibility' +-- +-- * 'creBackupImageFeatures' +-- +-- * 'creArtworkType' +-- +-- * 'creArchived' +-- +-- * 'creCompanionCreatives' +-- +-- * 'creTotalFileSize' +-- +-- * 'creStudioTraffickedCreativeId' +-- +-- * 'creRedirectUrl' +-- +-- * 'creAutoAdvanceImages' +-- +-- * 'creCreativeFieldAssignments' +creative + :: Creative +creative = + Creative + { _creConvertFlashToHtml5 = Nothing + , _creBackupImageTargetWindow = Nothing + , _creRenderingIdDimensionValue = Nothing + , _creCustomKeyValues = Nothing + , _creVideoDuration = Nothing + , _creRenderingId = Nothing + , _creThirdPartyBackupImageImpressionsUrl = Nothing + , _creFsCommand = Nothing + , _creAllowScriptAccess = Nothing + , _creHtmlCodeLocked = Nothing + , _creRequiredFlashPluginVersion = Nothing + , _creAuthoringTool = Nothing + , _creSize = Nothing + , _creThirdPartyUrls = Nothing + , _creCounterCustomEvents = Nothing + , _creKind = "dfareporting#creative" + , _creSslOverride = Nothing + , _creHtmlCode = Nothing + , _creAdvertiserId = Nothing + , _creRequiredFlashVersion = Nothing + , _creBackgroundColor = Nothing + , _creAdTagKeys = Nothing + , _creSkippable = Nothing + , _creSslCompliant = Nothing + , _creIdDimensionValue = Nothing + , _creBackupImageReportingLabel = Nothing + , _creCommercialId = Nothing + , _creActive = Nothing + , _creExitCustomEvents = Nothing + , _creAccountId = Nothing + , _creBackupImageClickThroughUrl = Nothing + , _creName = Nothing + , _creOverrideCss = Nothing + , _creVideoDescription = Nothing + , _creClickTags = Nothing + , _creAdParameters = Nothing + , _creVersion = Nothing + , _creLatestTraffickedCreativeId = Nothing + , _creThirdPartyRichMediaImpressionsUrl = Nothing + , _creLastModifiedInfo = Nothing + , _creId = Nothing + , _creStudioAdvertiserId = Nothing + , _creCreativeAssets = Nothing + , _creSubaccountId = Nothing + , _creType = Nothing + , _creTimerCustomEvents = Nothing + , _creStudioCreativeId = Nothing + , _creCompatibility = Nothing + , _creBackupImageFeatures = Nothing + , _creArtworkType = Nothing + , _creArchived = Nothing + , _creCompanionCreatives = Nothing + , _creTotalFileSize = Nothing + , _creStudioTraffickedCreativeId = Nothing + , _creRedirectUrl = Nothing + , _creAutoAdvanceImages = Nothing + , _creCreativeFieldAssignments = Nothing + } + +-- | Whether Flash assets associated with the creative need to be +-- automatically converted to HTML5. This flag is enabled by default and +-- users can choose to disable it if they don\'t want the system to +-- generate and use HTML5 asset for this creative. Applicable to the +-- following creative types: ENHANCED_BANNER and FLASH_INPAGE. +creConvertFlashToHtml5 :: Lens' Creative (Maybe Bool) +creConvertFlashToHtml5 + = lens _creConvertFlashToHtml5 + (\ s a -> s{_creConvertFlashToHtml5 = a}) + +-- | Target window for backup image. Applicable to the following creative +-- types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. +creBackupImageTargetWindow :: Lens' Creative (Maybe (Maybe TargetWindow)) +creBackupImageTargetWindow + = lens _creBackupImageTargetWindow + (\ s a -> s{_creBackupImageTargetWindow = a}) + +-- | Dimension value for the rendering ID of this creative. This is a +-- read-only field. Applicable to all creative types. +creRenderingIdDimensionValue :: Lens' Creative (Maybe (Maybe DimensionValue)) +creRenderingIdDimensionValue + = lens _creRenderingIdDimensionValue + (\ s a -> s{_creRenderingIdDimensionValue = a}) + +-- | Custom key-values for a Rich Media creative. Key-values let you +-- customize the creative settings of a Rich Media ad running on your site +-- without having to contact the advertiser. You can use key-values to +-- dynamically change the look or functionality of a creative. Applicable +-- to the following creative types: all RICH_MEDIA, and all VPAID. +creCustomKeyValues :: Lens' Creative [Text] +creCustomKeyValues + = lens _creCustomKeyValues + (\ s a -> s{_creCustomKeyValues = a}) + . _Default + . _Coerce + +-- | Creative video duration in seconds. This is a read-only field. +-- Applicable to the following creative types: INSTREAM_VIDEO, all +-- RICH_MEDIA, and all VPAID. +creVideoDuration :: Lens' Creative (Maybe Float) +creVideoDuration + = lens _creVideoDuration + (\ s a -> s{_creVideoDuration = a}) + +-- | ID of current rendering version. This is a read-only field. Applicable +-- to all creative types. +creRenderingId :: Lens' Creative (Maybe Int64) +creRenderingId + = lens _creRenderingId + (\ s a -> s{_creRenderingId = a}) + +-- | Third-party URL used to record backup image impressions. Applicable to +-- the following creative types: all RICH_MEDIA +creThirdPartyBackupImageImpressionsUrl :: Lens' Creative (Maybe Text) +creThirdPartyBackupImageImpressionsUrl + = lens _creThirdPartyBackupImageImpressionsUrl + (\ s a -> + s{_creThirdPartyBackupImageImpressionsUrl = a}) + +-- | OpenWindow FSCommand of this creative. This lets the SWF file +-- communicate with either Flash Player or the program hosting Flash +-- Player, such as a web browser. This is only triggered if +-- allowScriptAccess field is true. Applicable to the following creative +-- types: FLASH_INPAGE. +creFsCommand :: Lens' Creative (Maybe (Maybe FsCommand)) +creFsCommand + = lens _creFsCommand (\ s a -> s{_creFsCommand = a}) + +-- | Whether script access is allowed for this creative. This is a read-only +-- and deprecated field which will automatically be set to true on update. +-- Applicable to the following creative types: FLASH_INPAGE. +creAllowScriptAccess :: Lens' Creative (Maybe Bool) +creAllowScriptAccess + = lens _creAllowScriptAccess + (\ s a -> s{_creAllowScriptAccess = a}) + +-- | Whether HTML code is DCM-generated or manually entered. Set to true to +-- ignore changes to htmlCode. Applicable to the following creative types: +-- FLASH_INPAGE and HTML5_BANNER. +creHtmlCodeLocked :: Lens' Creative (Maybe Bool) +creHtmlCodeLocked + = lens _creHtmlCodeLocked + (\ s a -> s{_creHtmlCodeLocked = a}) + +-- | The minimum required Flash plugin version for this creative. For +-- example, 11.2.202.235. This is a read-only field. Applicable to the +-- following creative types: all RICH_MEDIA, and all VPAID. +creRequiredFlashPluginVersion :: Lens' Creative (Maybe Text) +creRequiredFlashPluginVersion + = lens _creRequiredFlashPluginVersion + (\ s a -> s{_creRequiredFlashPluginVersion = a}) + +-- | Authoring tool for HTML5 banner creatives. This is a read-only field. +-- Applicable to the following creative types: HTML5_BANNER. +creAuthoringTool :: Lens' Creative (Maybe Text) +creAuthoringTool + = lens _creAuthoringTool + (\ s a -> s{_creAuthoringTool = a}) + +-- | Size associated with this creative. When inserting or updating a +-- creative either the size ID field or size width and height fields can be +-- used. This is a required field when applicable; however for IMAGE and +-- FLASH_INPAGE creatives, if left blank, this field will be automatically +-- set using the actual size of the associated image assets. Applicable to +-- the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, +-- FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. +creSize :: Lens' Creative (Maybe (Maybe Size)) +creSize = lens _creSize (\ s a -> s{_creSize = a}) + +-- | Third-party URLs for tracking in-stream video creative events. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +creThirdPartyUrls :: Lens' Creative [Maybe ThirdPartyTrackingURL] +creThirdPartyUrls + = lens _creThirdPartyUrls + (\ s a -> s{_creThirdPartyUrls = a}) + . _Default + . _Coerce + +-- | List of counter events configured for the creative. Applicable to the +-- following creative types: all RICH_MEDIA, and all VPAID. +creCounterCustomEvents :: Lens' Creative [Maybe CreativeCustomEvent] +creCounterCustomEvents + = lens _creCounterCustomEvents + (\ s a -> s{_creCounterCustomEvents = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creative\". +creKind :: Lens' Creative Text +creKind = lens _creKind (\ s a -> s{_creKind = a}) + +-- | Whether creative should be treated as SSL compliant even if the system +-- scan shows it\'s not. +creSslOverride :: Lens' Creative (Maybe Bool) +creSslOverride + = lens _creSslOverride + (\ s a -> s{_creSslOverride = a}) + +-- | HTML code for the creative. This is a required field when applicable. +-- This field is ignored if htmlCodeLocked is false. Applicable to the +-- following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, +-- and all RICH_MEDIA. +creHtmlCode :: Lens' Creative (Maybe Text) +creHtmlCode + = lens _creHtmlCode (\ s a -> s{_creHtmlCode = a}) + +-- | Advertiser ID of this creative. This is a required field. Applicable to +-- all creative types. +creAdvertiserId :: Lens' Creative (Maybe Int64) +creAdvertiserId + = lens _creAdvertiserId + (\ s a -> s{_creAdvertiserId = a}) + +-- | The internal Flash version for this creative as calculated by +-- DoubleClick Studio. This is a read-only field. Applicable to the +-- following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, +-- and all VPAID. +creRequiredFlashVersion :: Lens' Creative (Maybe Int32) +creRequiredFlashVersion + = lens _creRequiredFlashVersion + (\ s a -> s{_creRequiredFlashVersion = a}) + +-- | The 6-character HTML color code, beginning with #, for the background of +-- the window area where the Flash file is displayed. Default is white. +-- Applicable to the following creative types: FLASH_INPAGE. +creBackgroundColor :: Lens' Creative (Maybe Text) +creBackgroundColor + = lens _creBackgroundColor + (\ s a -> s{_creBackgroundColor = a}) + +-- | Keywords for a Rich Media creative. Keywords let you customize the +-- creative settings of a Rich Media ad running on your site without having +-- to contact the advertiser. You can use keywords to dynamically change +-- the look or functionality of a creative. Applicable to the following +-- creative types: all RICH_MEDIA, and all VPAID. +creAdTagKeys :: Lens' Creative [Text] +creAdTagKeys + = lens _creAdTagKeys (\ s a -> s{_creAdTagKeys = a}) + . _Default + . _Coerce + +-- | Whether the user can choose to skip the creative. Applicable to the +-- following creative types: INSTREAM_VIDEO. +creSkippable :: Lens' Creative (Maybe Bool) +creSkippable + = lens _creSkippable (\ s a -> s{_creSkippable = a}) + +-- | Whether the creative is SSL-compliant. This is a read-only field. +-- Applicable to all creative types. +creSslCompliant :: Lens' Creative (Maybe Bool) +creSslCompliant + = lens _creSslCompliant + (\ s a -> s{_creSslCompliant = a}) + +-- | Dimension value for the ID of this creative. This is a read-only field. +-- Applicable to all creative types. +creIdDimensionValue :: Lens' Creative (Maybe (Maybe DimensionValue)) +creIdDimensionValue + = lens _creIdDimensionValue + (\ s a -> s{_creIdDimensionValue = a}) + +-- | Reporting label used for HTML5 banner backup image. Applicable to the +-- following creative types: ENHANCED_BANNER. +creBackupImageReportingLabel :: Lens' Creative (Maybe Text) +creBackupImageReportingLabel + = lens _creBackupImageReportingLabel + (\ s a -> s{_creBackupImageReportingLabel = a}) + +-- | Industry standard ID assigned to creative for reach and frequency. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +creCommercialId :: Lens' Creative (Maybe Text) +creCommercialId + = lens _creCommercialId + (\ s a -> s{_creCommercialId = a}) + +-- | Whether the creative is active. Applicable to all creative types. +creActive :: Lens' Creative (Maybe Bool) +creActive + = lens _creActive (\ s a -> s{_creActive = a}) + +-- | List of exit events configured for the creative. Applicable to the +-- following creative types: all RICH_MEDIA, and all VPAID. +creExitCustomEvents :: Lens' Creative [Maybe CreativeCustomEvent] +creExitCustomEvents + = lens _creExitCustomEvents + (\ s a -> s{_creExitCustomEvents = a}) + . _Default + . _Coerce + +-- | Account ID of this creative. This field, if left unset, will be +-- auto-generated for both insert and update operations. Applicable to all +-- creative types. +creAccountId :: Lens' Creative (Maybe Int64) +creAccountId + = lens _creAccountId (\ s a -> s{_creAccountId = a}) + +-- | Click-through URL for backup image. Applicable to the following creative +-- types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. +creBackupImageClickThroughUrl :: Lens' Creative (Maybe Text) +creBackupImageClickThroughUrl + = lens _creBackupImageClickThroughUrl + (\ s a -> s{_creBackupImageClickThroughUrl = a}) + +-- | Name of the creative. This is a required field and must be less than 256 +-- characters long. Applicable to all creative types. +creName :: Lens' Creative (Maybe Text) +creName = lens _creName (\ s a -> s{_creName = a}) + +-- | Override CSS value for rich media creatives. Applicable to the following +-- creative types: all RICH_MEDIA. +creOverrideCss :: Lens' Creative (Maybe Text) +creOverrideCss + = lens _creOverrideCss + (\ s a -> s{_creOverrideCss = a}) + +-- | Description of the video ad. Applicable to the following creative types: +-- INSTREAM_VIDEO and all VPAID. +creVideoDescription :: Lens' Creative (Maybe Text) +creVideoDescription + = lens _creVideoDescription + (\ s a -> s{_creVideoDescription = a}) + +-- | Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and +-- HTML5_BANNER creatives, this is a subset of detected click tags for the +-- assets associated with this creative. After creating a flash asset, +-- detected click tags will be returned in the creativeAssetMetadata. When +-- inserting the creative, populate the creative clickTags field using the +-- creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, +-- there should be exactly one entry in this list for each image creative +-- asset. A click tag is matched with a corresponding creative asset by +-- matching the clickTag.name field with the +-- creativeAsset.assetIdentifier.name field. Applicable to the following +-- creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, +-- HTML5_BANNER. +creClickTags :: Lens' Creative [Maybe ClickTag] +creClickTags + = lens _creClickTags (\ s a -> s{_creClickTags = a}) + . _Default + . _Coerce + +-- | Ad parameters user for VPAID creative. This is a read-only field. +-- Applicable to the following creative types: all VPAID. +creAdParameters :: Lens' Creative (Maybe Text) +creAdParameters + = lens _creAdParameters + (\ s a -> s{_creAdParameters = a}) + +-- | The version number helps you keep track of multiple versions of your +-- creative in your reports. The version number will always be +-- auto-generated during insert operations to start at 1. For tracking +-- creatives the version cannot be incremented and will always remain at 1. +-- For all other creative types the version can be incremented only by 1 +-- during update operations. In addition, the version will be automatically +-- incremented by 1 when undergoing Rich Media creative merging. Applicable +-- to all creative types. +creVersion :: Lens' Creative (Maybe Int32) +creVersion + = lens _creVersion (\ s a -> s{_creVersion = a}) + +-- | Latest Studio trafficked creative ID associated with rich media and +-- VPAID creatives. This is a read-only field. Applicable to the following +-- creative types: all RICH_MEDIA, and all VPAID. +creLatestTraffickedCreativeId :: Lens' Creative (Maybe Int64) +creLatestTraffickedCreativeId + = lens _creLatestTraffickedCreativeId + (\ s a -> s{_creLatestTraffickedCreativeId = a}) + +-- | Third-party URL used to record rich media impressions. Applicable to the +-- following creative types: all RICH_MEDIA +creThirdPartyRichMediaImpressionsUrl :: Lens' Creative (Maybe Text) +creThirdPartyRichMediaImpressionsUrl + = lens _creThirdPartyRichMediaImpressionsUrl + (\ s a -> + s{_creThirdPartyRichMediaImpressionsUrl = a}) + +-- | Creative last modification information. This is a read-only field. +-- Applicable to all creative types. +creLastModifiedInfo :: Lens' Creative (Maybe (Maybe LastModifiedInfo)) +creLastModifiedInfo + = lens _creLastModifiedInfo + (\ s a -> s{_creLastModifiedInfo = a}) + +-- | ID of this creative. This is a read-only, auto-generated field. +-- Applicable to all creative types. +creId :: Lens' Creative (Maybe Int64) +creId = lens _creId (\ s a -> s{_creId = a}) + +-- | Studio advertiser ID associated with rich media and VPAID creatives. +-- This is a read-only field. Applicable to the following creative types: +-- all RICH_MEDIA, and all VPAID. +creStudioAdvertiserId :: Lens' Creative (Maybe Int64) +creStudioAdvertiserId + = lens _creStudioAdvertiserId + (\ s a -> s{_creStudioAdvertiserId = a}) + +-- | Assets associated with a creative. Applicable to all but the following +-- creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and +-- REDIRECT +creCreativeAssets :: Lens' Creative [Maybe CreativeAsset] +creCreativeAssets + = lens _creCreativeAssets + (\ s a -> s{_creCreativeAssets = a}) + . _Default + . _Coerce + +-- | Subaccount ID of this creative. This field, if left unset, will be +-- auto-generated for both insert and update operations. Applicable to all +-- creative types. +creSubaccountId :: Lens' Creative (Maybe Int64) +creSubaccountId + = lens _creSubaccountId + (\ s a -> s{_creSubaccountId = a}) + +-- | Type of this creative.This is a required field. Applicable to all +-- creative types. +creType :: Lens' Creative (Maybe Text) +creType = lens _creType (\ s a -> s{_creType = a}) + +-- | List of timer events configured for the creative. Applicable to the +-- following creative types: all RICH_MEDIA, and all VPAID. +creTimerCustomEvents :: Lens' Creative [Maybe CreativeCustomEvent] +creTimerCustomEvents + = lens _creTimerCustomEvents + (\ s a -> s{_creTimerCustomEvents = a}) + . _Default + . _Coerce + +-- | Studio creative ID associated with rich media and VPAID creatives. This +-- is a read-only field. Applicable to the following creative types: all +-- RICH_MEDIA, and all VPAID. +creStudioCreativeId :: Lens' Creative (Maybe Int64) +creStudioCreativeId + = lens _creStudioCreativeId + (\ s a -> s{_creStudioCreativeId = a}) + +-- | Compatibilities associated with this creative. This is a read-only +-- field. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or +-- on mobile devices for regular or interstitial ads, respectively. APP and +-- APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO +-- refers to rendering in in-stream video ads developed with the VAST +-- standard. Applicable to all creative types. Acceptable values are: - +-- \"APP\" - \"APP_INTERSTITIAL\" - \"IN_STREAM_VIDEO\" - \"WEB\" - +-- \"WEB_INTERSTITIAL\" +creCompatibility :: Lens' Creative [Text] +creCompatibility + = lens _creCompatibility + (\ s a -> s{_creCompatibility = a}) + . _Default + . _Coerce + +-- | List of feature dependencies that will cause a backup image to be served +-- if the browser that serves the ad does not support them. Feature +-- dependencies are features that a browser must be able to support in +-- order to render your HTML5 creative asset correctly. This field is +-- initially auto-generated to contain all features detected by DCM for all +-- the assets of this creative and can then be modified by the client. To +-- reset this field, copy over all the creativeAssets\' detected features. +-- Applicable to the following creative types: ENHANCED_BANNER and +-- HTML5_BANNER. +creBackupImageFeatures :: Lens' Creative [Text] +creBackupImageFeatures + = lens _creBackupImageFeatures + (\ s a -> s{_creBackupImageFeatures = a}) + . _Default + . _Coerce + +-- | Type of artwork used for the creative. This is a read-only field. +-- Applicable to the following creative types: all RICH_MEDIA, and all +-- VPAID. +creArtworkType :: Lens' Creative (Maybe Text) +creArtworkType + = lens _creArtworkType + (\ s a -> s{_creArtworkType = a}) + +-- | Whether the creative is archived. Applicable to all creative types. +creArchived :: Lens' Creative (Maybe Bool) +creArchived + = lens _creArchived (\ s a -> s{_creArchived = a}) + +-- | List of companion creatives assigned to an in-Stream videocreative. +-- Acceptable values include IDs of existing flash and image creatives. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +creCompanionCreatives :: Lens' Creative [Int64] +creCompanionCreatives + = lens _creCompanionCreatives + (\ s a -> s{_creCompanionCreatives = a}) + . _Default + . _Coerce + +-- | Combined size of all creative assets. This is a read-only field. +-- Applicable to the following creative types: all RICH_MEDIA, and all +-- VPAID. +creTotalFileSize :: Lens' Creative (Maybe Int64) +creTotalFileSize + = lens _creTotalFileSize + (\ s a -> s{_creTotalFileSize = a}) + +-- | Studio trafficked creative ID associated with rich media and VPAID +-- creatives. This is a read-only field. Applicable to the following +-- creative types: all RICH_MEDIA, and all VPAID. +creStudioTraffickedCreativeId :: Lens' Creative (Maybe Int64) +creStudioTraffickedCreativeId + = lens _creStudioTraffickedCreativeId + (\ s a -> s{_creStudioTraffickedCreativeId = a}) + +-- | URL of hosted image or another ad tag. This is a required field when +-- applicable. Applicable to the following creative types: +-- INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT +creRedirectUrl :: Lens' Creative (Maybe Text) +creRedirectUrl + = lens _creRedirectUrl + (\ s a -> s{_creRedirectUrl = a}) + +-- | Whether images are automatically advanced for enhanced image creatives. +-- Applicable to the following creative types: ENHANCED_IMAGE. +creAutoAdvanceImages :: Lens' Creative (Maybe Bool) +creAutoAdvanceImages + = lens _creAutoAdvanceImages + (\ s a -> s{_creAutoAdvanceImages = a}) + +-- | Creative field assignments for this creative. Applicable to all creative +-- types. +creCreativeFieldAssignments :: Lens' Creative [Maybe CreativeFieldAssignment] +creCreativeFieldAssignments + = lens _creCreativeFieldAssignments + (\ s a -> s{_creCreativeFieldAssignments = a}) + . _Default + . _Coerce + +instance FromJSON Creative where + parseJSON + = withObject "Creative" + (\ o -> + Creative <$> + (o .:? "convertFlashToHtml5") <*> + (o .:? "backupImageTargetWindow") + <*> (o .:? "renderingIdDimensionValue") + <*> (o .:? "customKeyValues" .!= mempty) + <*> (o .:? "videoDuration") + <*> (o .:? "renderingId") + <*> (o .:? "thirdPartyBackupImageImpressionsUrl") + <*> (o .:? "fsCommand") + <*> (o .:? "allowScriptAccess") + <*> (o .:? "htmlCodeLocked") + <*> (o .:? "requiredFlashPluginVersion") + <*> (o .:? "authoringTool") + <*> (o .:? "size") + <*> (o .:? "thirdPartyUrls" .!= mempty) + <*> (o .:? "counterCustomEvents" .!= mempty) + <*> (o .:? "kind" .!= "dfareporting#creative") + <*> (o .:? "sslOverride") + <*> (o .:? "htmlCode") + <*> (o .:? "advertiserId") + <*> (o .:? "requiredFlashVersion") + <*> (o .:? "backgroundColor") + <*> (o .:? "adTagKeys" .!= mempty) + <*> (o .:? "skippable") + <*> (o .:? "sslCompliant") + <*> (o .:? "idDimensionValue") + <*> (o .:? "backupImageReportingLabel") + <*> (o .:? "commercialId") + <*> (o .:? "active") + <*> (o .:? "exitCustomEvents" .!= mempty) + <*> (o .:? "accountId") + <*> (o .:? "backupImageClickThroughUrl") + <*> (o .:? "name") + <*> (o .:? "overrideCss") + <*> (o .:? "videoDescription") + <*> (o .:? "clickTags" .!= mempty) + <*> (o .:? "adParameters") + <*> (o .:? "version") + <*> (o .:? "latestTraffickedCreativeId") + <*> (o .:? "thirdPartyRichMediaImpressionsUrl") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "studioAdvertiserId") + <*> (o .:? "creativeAssets" .!= mempty) + <*> (o .:? "subaccountId") + <*> (o .:? "type") + <*> (o .:? "timerCustomEvents" .!= mempty) + <*> (o .:? "studioCreativeId") + <*> (o .:? "compatibility" .!= mempty) + <*> (o .:? "backupImageFeatures" .!= mempty) + <*> (o .:? "artworkType") + <*> (o .:? "archived") + <*> (o .:? "companionCreatives" .!= mempty) + <*> (o .:? "totalFileSize") + <*> (o .:? "studioTraffickedCreativeId") + <*> (o .:? "redirectUrl") + <*> (o .:? "auto_advance_images") + <*> (o .:? "creativeFieldAssignments" .!= mempty)) + +instance ToJSON Creative where + toJSON Creative{..} + = object + (catMaybes + [("convertFlashToHtml5" .=) <$> + _creConvertFlashToHtml5, + ("backupImageTargetWindow" .=) <$> + _creBackupImageTargetWindow, + ("renderingIdDimensionValue" .=) <$> + _creRenderingIdDimensionValue, + ("customKeyValues" .=) <$> _creCustomKeyValues, + ("videoDuration" .=) <$> _creVideoDuration, + ("renderingId" .=) <$> _creRenderingId, + ("thirdPartyBackupImageImpressionsUrl" .=) <$> + _creThirdPartyBackupImageImpressionsUrl, + ("fsCommand" .=) <$> _creFsCommand, + ("allowScriptAccess" .=) <$> _creAllowScriptAccess, + ("htmlCodeLocked" .=) <$> _creHtmlCodeLocked, + ("requiredFlashPluginVersion" .=) <$> + _creRequiredFlashPluginVersion, + ("authoringTool" .=) <$> _creAuthoringTool, + ("size" .=) <$> _creSize, + ("thirdPartyUrls" .=) <$> _creThirdPartyUrls, + ("counterCustomEvents" .=) <$> + _creCounterCustomEvents, + Just ("kind" .= _creKind), + ("sslOverride" .=) <$> _creSslOverride, + ("htmlCode" .=) <$> _creHtmlCode, + ("advertiserId" .=) <$> _creAdvertiserId, + ("requiredFlashVersion" .=) <$> + _creRequiredFlashVersion, + ("backgroundColor" .=) <$> _creBackgroundColor, + ("adTagKeys" .=) <$> _creAdTagKeys, + ("skippable" .=) <$> _creSkippable, + ("sslCompliant" .=) <$> _creSslCompliant, + ("idDimensionValue" .=) <$> _creIdDimensionValue, + ("backupImageReportingLabel" .=) <$> + _creBackupImageReportingLabel, + ("commercialId" .=) <$> _creCommercialId, + ("active" .=) <$> _creActive, + ("exitCustomEvents" .=) <$> _creExitCustomEvents, + ("accountId" .=) <$> _creAccountId, + ("backupImageClickThroughUrl" .=) <$> + _creBackupImageClickThroughUrl, + ("name" .=) <$> _creName, + ("overrideCss" .=) <$> _creOverrideCss, + ("videoDescription" .=) <$> _creVideoDescription, + ("clickTags" .=) <$> _creClickTags, + ("adParameters" .=) <$> _creAdParameters, + ("version" .=) <$> _creVersion, + ("latestTraffickedCreativeId" .=) <$> + _creLatestTraffickedCreativeId, + ("thirdPartyRichMediaImpressionsUrl" .=) <$> + _creThirdPartyRichMediaImpressionsUrl, + ("lastModifiedInfo" .=) <$> _creLastModifiedInfo, + ("id" .=) <$> _creId, + ("studioAdvertiserId" .=) <$> _creStudioAdvertiserId, + ("creativeAssets" .=) <$> _creCreativeAssets, + ("subaccountId" .=) <$> _creSubaccountId, + ("type" .=) <$> _creType, + ("timerCustomEvents" .=) <$> _creTimerCustomEvents, + ("studioCreativeId" .=) <$> _creStudioCreativeId, + ("compatibility" .=) <$> _creCompatibility, + ("backupImageFeatures" .=) <$> + _creBackupImageFeatures, + ("artworkType" .=) <$> _creArtworkType, + ("archived" .=) <$> _creArchived, + ("companionCreatives" .=) <$> _creCompanionCreatives, + ("totalFileSize" .=) <$> _creTotalFileSize, + ("studioTraffickedCreativeId" .=) <$> + _creStudioTraffickedCreativeId, + ("redirectUrl" .=) <$> _creRedirectUrl, + ("auto_advance_images" .=) <$> _creAutoAdvanceImages, + ("creativeFieldAssignments" .=) <$> + _creCreativeFieldAssignments]) + +-- | User Role Permission Group List Response +-- +-- /See:/ 'userRolePermissionGroupsListResponse' smart constructor. +data UserRolePermissionGroupsListResponse = UserRolePermissionGroupsListResponse + { _urpglrUserRolePermissionGroups :: !(Maybe [Maybe UserRolePermissionGroup]) + , _urpglrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpglrUserRolePermissionGroups' +-- +-- * 'urpglrKind' +userRolePermissionGroupsListResponse + :: UserRolePermissionGroupsListResponse +userRolePermissionGroupsListResponse = + UserRolePermissionGroupsListResponse + { _urpglrUserRolePermissionGroups = Nothing + , _urpglrKind = "dfareporting#userRolePermissionGroupsListResponse" + } + +-- | User role permission group collection. +urpglrUserRolePermissionGroups :: Lens' UserRolePermissionGroupsListResponse [Maybe UserRolePermissionGroup] +urpglrUserRolePermissionGroups + = lens _urpglrUserRolePermissionGroups + (\ s a -> s{_urpglrUserRolePermissionGroups = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRolePermissionGroupsListResponse\". +urpglrKind :: Lens' UserRolePermissionGroupsListResponse Text +urpglrKind + = lens _urpglrKind (\ s a -> s{_urpglrKind = a}) + +instance FromJSON + UserRolePermissionGroupsListResponse where + parseJSON + = withObject "UserRolePermissionGroupsListResponse" + (\ o -> + UserRolePermissionGroupsListResponse <$> + (o .:? "userRolePermissionGroups" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#userRolePermissionGroupsListResponse")) + +instance ToJSON UserRolePermissionGroupsListResponse + where + toJSON UserRolePermissionGroupsListResponse{..} + = object + (catMaybes + [("userRolePermissionGroups" .=) <$> + _urpglrUserRolePermissionGroups, + Just ("kind" .= _urpglrKind)]) + +-- | Represents a DimensionValue resource. +-- +-- /See:/ 'dimensionValue' smart constructor. +data DimensionValue = DimensionValue + { _dvEtag :: !(Maybe Text) + , _dvKind :: !Text + , _dvValue :: !(Maybe Text) + , _dvMatchType :: !(Maybe Text) + , _dvDimensionName :: !(Maybe Text) + , _dvId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DimensionValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvEtag' +-- +-- * 'dvKind' +-- +-- * 'dvValue' +-- +-- * 'dvMatchType' +-- +-- * 'dvDimensionName' +-- +-- * 'dvId' +dimensionValue + :: DimensionValue +dimensionValue = + DimensionValue + { _dvEtag = Nothing + , _dvKind = "dfareporting#dimensionValue" + , _dvValue = Nothing + , _dvMatchType = Nothing + , _dvDimensionName = Nothing + , _dvId = Nothing + } + +-- | The eTag of this response for caching purposes. +dvEtag :: Lens' DimensionValue (Maybe Text) +dvEtag = lens _dvEtag (\ s a -> s{_dvEtag = a}) + +-- | The kind of resource this is, in this case dfareporting#dimensionValue. +dvKind :: Lens' DimensionValue Text +dvKind = lens _dvKind (\ s a -> s{_dvKind = a}) + +-- | The value of the dimension. +dvValue :: Lens' DimensionValue (Maybe Text) +dvValue = lens _dvValue (\ s a -> s{_dvValue = a}) + +-- | Determines how the \'value\' field is matched when filtering. If not +-- specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, \'*\' is +-- allowed as a placeholder for variable length character sequences, and it +-- can be escaped with a backslash. Note, only paid search dimensions +-- (\'dfa:paidSearch*\') allow a matchType other than EXACT. +dvMatchType :: Lens' DimensionValue (Maybe Text) +dvMatchType + = lens _dvMatchType (\ s a -> s{_dvMatchType = a}) + +-- | The name of the dimension. +dvDimensionName :: Lens' DimensionValue (Maybe Text) +dvDimensionName + = lens _dvDimensionName + (\ s a -> s{_dvDimensionName = a}) + +-- | The ID associated with the value if available. +dvId :: Lens' DimensionValue (Maybe Text) +dvId = lens _dvId (\ s a -> s{_dvId = a}) + +instance FromJSON DimensionValue where + parseJSON + = withObject "DimensionValue" + (\ o -> + DimensionValue <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "dfareporting#dimensionValue") + <*> (o .:? "value") + <*> (o .:? "matchType") + <*> (o .:? "dimensionName") + <*> (o .:? "id")) + +instance ToJSON DimensionValue where + toJSON DimensionValue{..} + = object + (catMaybes + [("etag" .=) <$> _dvEtag, Just ("kind" .= _dvKind), + ("value" .=) <$> _dvValue, + ("matchType" .=) <$> _dvMatchType, + ("dimensionName" .=) <$> _dvDimensionName, + ("id" .=) <$> _dvId]) + +-- | Site Contact +-- +-- /See:/ 'siteContact' smart constructor. +data SiteContact = SiteContact + { _scEmail :: !(Maybe Text) + , _scPhone :: !(Maybe Text) + , _scLastName :: !(Maybe Text) + , _scAddress :: !(Maybe Text) + , _scFirstName :: !(Maybe Text) + , _scId :: !(Maybe Int64) + , _scTitle :: !(Maybe Text) + , _scContactType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteContact' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scEmail' +-- +-- * 'scPhone' +-- +-- * 'scLastName' +-- +-- * 'scAddress' +-- +-- * 'scFirstName' +-- +-- * 'scId' +-- +-- * 'scTitle' +-- +-- * 'scContactType' +siteContact + :: SiteContact +siteContact = + SiteContact + { _scEmail = Nothing + , _scPhone = Nothing + , _scLastName = Nothing + , _scAddress = Nothing + , _scFirstName = Nothing + , _scId = Nothing + , _scTitle = Nothing + , _scContactType = Nothing + } + +-- | Email address of this site contact. This is a required field. +scEmail :: Lens' SiteContact (Maybe Text) +scEmail = lens _scEmail (\ s a -> s{_scEmail = a}) + +-- | Primary phone number of this site contact. +scPhone :: Lens' SiteContact (Maybe Text) +scPhone = lens _scPhone (\ s a -> s{_scPhone = a}) + +-- | Last name of this site contact. +scLastName :: Lens' SiteContact (Maybe Text) +scLastName + = lens _scLastName (\ s a -> s{_scLastName = a}) + +-- | Address of this site contact. +scAddress :: Lens' SiteContact (Maybe Text) +scAddress + = lens _scAddress (\ s a -> s{_scAddress = a}) + +-- | First name of this site contact. +scFirstName :: Lens' SiteContact (Maybe Text) +scFirstName + = lens _scFirstName (\ s a -> s{_scFirstName = a}) + +-- | ID of this site contact. This is a read-only, auto-generated field. +scId :: Lens' SiteContact (Maybe Int64) +scId = lens _scId (\ s a -> s{_scId = a}) + +-- | Title or designation of this site contact. +scTitle :: Lens' SiteContact (Maybe Text) +scTitle = lens _scTitle (\ s a -> s{_scTitle = a}) + +-- | Site contact type. +scContactType :: Lens' SiteContact (Maybe Text) +scContactType + = lens _scContactType + (\ s a -> s{_scContactType = a}) + +instance FromJSON SiteContact where + parseJSON + = withObject "SiteContact" + (\ o -> + SiteContact <$> + (o .:? "email") <*> (o .:? "phone") <*> + (o .:? "lastName") + <*> (o .:? "address") + <*> (o .:? "firstName") + <*> (o .:? "id") + <*> (o .:? "title") + <*> (o .:? "contactType")) + +instance ToJSON SiteContact where + toJSON SiteContact{..} + = object + (catMaybes + [("email" .=) <$> _scEmail, + ("phone" .=) <$> _scPhone, + ("lastName" .=) <$> _scLastName, + ("address" .=) <$> _scAddress, + ("firstName" .=) <$> _scFirstName, + ("id" .=) <$> _scId, ("title" .=) <$> _scTitle, + ("contactType" .=) <$> _scContactType]) + +-- | Represents a date range. +-- +-- /See:/ 'dateRange' smart constructor. +data DateRange = DateRange + { _drKind :: !Text + , _drEndDate :: !(Maybe UTCTime) + , _drStartDate :: !(Maybe UTCTime) + , _drRelativeDateRange :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DateRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drKind' +-- +-- * 'drEndDate' +-- +-- * 'drStartDate' +-- +-- * 'drRelativeDateRange' +dateRange + :: DateRange +dateRange = + DateRange + { _drKind = "dfareporting#dateRange" + , _drEndDate = Nothing + , _drStartDate = Nothing + , _drRelativeDateRange = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#dateRange. +drKind :: Lens' DateRange Text +drKind = lens _drKind (\ s a -> s{_drKind = a}) + +-- | The end date of the date range, inclusive. A string of the format: +-- \"yyyy-MM-dd\". +drEndDate :: Lens' DateRange (Maybe UTCTime) +drEndDate + = lens _drEndDate (\ s a -> s{_drEndDate = a}) + +-- | The start date of the date range, inclusive. A string of the format: +-- \"yyyy-MM-dd\". +drStartDate :: Lens' DateRange (Maybe UTCTime) +drStartDate + = lens _drStartDate (\ s a -> s{_drStartDate = a}) + +-- | The date range relative to the date of when the report is run. +drRelativeDateRange :: Lens' DateRange (Maybe Text) +drRelativeDateRange + = lens _drRelativeDateRange + (\ s a -> s{_drRelativeDateRange = a}) + +instance FromJSON DateRange where + parseJSON + = withObject "DateRange" + (\ o -> + DateRange <$> + (o .:? "kind" .!= "dfareporting#dateRange") <*> + (o .:? "endDate") + <*> (o .:? "startDate") + <*> (o .:? "relativeDateRange")) + +instance ToJSON DateRange where + toJSON DateRange{..} + = object + (catMaybes + [Just ("kind" .= _drKind), + ("endDate" .=) <$> _drEndDate, + ("startDate" .=) <$> _drStartDate, + ("relativeDateRange" .=) <$> _drRelativeDateRange]) + +-- | AccountUserProfiles contains properties of a DCM user profile. This +-- resource is specifically for managing user profiles, whereas +-- UserProfiles is for accessing the API. +-- +-- /See:/ 'accountUserProfile' smart constructor. +data AccountUserProfile = AccountUserProfile + { _aupEmail :: !(Maybe Text) + , _aupUserRoleFilter :: !(Maybe (Maybe ObjectFilter)) + , _aupAdvertiserFilter :: !(Maybe (Maybe ObjectFilter)) + , _aupUserRoleId :: !(Maybe Int64) + , _aupKind :: !Text + , _aupLocale :: !(Maybe Text) + , _aupSiteFilter :: !(Maybe (Maybe ObjectFilter)) + , _aupTraffickerType :: !(Maybe Text) + , _aupActive :: !(Maybe Bool) + , _aupAccountId :: !(Maybe Int64) + , _aupName :: !(Maybe Text) + , _aupId :: !(Maybe Int64) + , _aupUserAccessType :: !(Maybe Text) + , _aupComments :: !(Maybe Text) + , _aupSubaccountId :: !(Maybe Int64) + , _aupCampaignFilter :: !(Maybe (Maybe ObjectFilter)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aupEmail' +-- +-- * 'aupUserRoleFilter' +-- +-- * 'aupAdvertiserFilter' +-- +-- * 'aupUserRoleId' +-- +-- * 'aupKind' +-- +-- * 'aupLocale' +-- +-- * 'aupSiteFilter' +-- +-- * 'aupTraffickerType' +-- +-- * 'aupActive' +-- +-- * 'aupAccountId' +-- +-- * 'aupName' +-- +-- * 'aupId' +-- +-- * 'aupUserAccessType' +-- +-- * 'aupComments' +-- +-- * 'aupSubaccountId' +-- +-- * 'aupCampaignFilter' +accountUserProfile + :: AccountUserProfile +accountUserProfile = + AccountUserProfile + { _aupEmail = Nothing + , _aupUserRoleFilter = Nothing + , _aupAdvertiserFilter = Nothing + , _aupUserRoleId = Nothing + , _aupKind = "dfareporting#accountUserProfile" + , _aupLocale = Nothing + , _aupSiteFilter = Nothing + , _aupTraffickerType = Nothing + , _aupActive = Nothing + , _aupAccountId = Nothing + , _aupName = Nothing + , _aupId = Nothing + , _aupUserAccessType = Nothing + , _aupComments = Nothing + , _aupSubaccountId = Nothing + , _aupCampaignFilter = Nothing + } + +-- | Email of the user profile. The email addresss must be linked to a Google +-- Account. This field is required on insertion and is read-only after +-- insertion. +aupEmail :: Lens' AccountUserProfile (Maybe Text) +aupEmail = lens _aupEmail (\ s a -> s{_aupEmail = a}) + +-- | Filter that describes which user roles are visible to the user profile. +aupUserRoleFilter :: Lens' AccountUserProfile (Maybe (Maybe ObjectFilter)) +aupUserRoleFilter + = lens _aupUserRoleFilter + (\ s a -> s{_aupUserRoleFilter = a}) + +-- | Filter that describes which advertisers are visible to the user profile. +aupAdvertiserFilter :: Lens' AccountUserProfile (Maybe (Maybe ObjectFilter)) +aupAdvertiserFilter + = lens _aupAdvertiserFilter + (\ s a -> s{_aupAdvertiserFilter = a}) + +-- | User role ID of the user profile. This is a required field. +aupUserRoleId :: Lens' AccountUserProfile (Maybe Int64) +aupUserRoleId + = lens _aupUserRoleId + (\ s a -> s{_aupUserRoleId = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountUserProfile\". +aupKind :: Lens' AccountUserProfile Text +aupKind = lens _aupKind (\ s a -> s{_aupKind = a}) + +-- | Locale of the user profile. This is a required field. Acceptable values +-- are: - \"cs\" (Czech) - \"de\" (German) - \"en\" (English) - \"en-GB\" +-- (English United Kingdom) - \"es\" (Spanish) - \"fr\" (French) - \"it\" +-- (Italian) - \"ja\" (Japanese) - \"ko\" (Korean) - \"pl\" (Polish) - +-- \"pt-BR\" (Portuguese Brazil) - \"ru\" (Russian) - \"sv\" (Swedish) - +-- \"tr\" (Turkish) - \"zh-CN\" (Chinese Simplified) - \"zh-TW\" (Chinese +-- Traditional) +aupLocale :: Lens' AccountUserProfile (Maybe Text) +aupLocale + = lens _aupLocale (\ s a -> s{_aupLocale = a}) + +-- | Filter that describes which sites are visible to the user profile. +aupSiteFilter :: Lens' AccountUserProfile (Maybe (Maybe ObjectFilter)) +aupSiteFilter + = lens _aupSiteFilter + (\ s a -> s{_aupSiteFilter = a}) + +-- | Trafficker type of this user profile. +aupTraffickerType :: Lens' AccountUserProfile (Maybe Text) +aupTraffickerType + = lens _aupTraffickerType + (\ s a -> s{_aupTraffickerType = a}) + +-- | Whether this user profile is active. This defaults to false, and must be +-- set true on insert for the user profile to be usable. +aupActive :: Lens' AccountUserProfile (Maybe Bool) +aupActive + = lens _aupActive (\ s a -> s{_aupActive = a}) + +-- | Account ID of the user profile. This is a read-only field that can be +-- left blank. +aupAccountId :: Lens' AccountUserProfile (Maybe Int64) +aupAccountId + = lens _aupAccountId (\ s a -> s{_aupAccountId = a}) + +-- | Name of the user profile. This is a required field. Must be less than 64 +-- characters long, must be globally unique, and cannot contain whitespace +-- or any of the following characters: \"&;\"#%,\". +aupName :: Lens' AccountUserProfile (Maybe Text) +aupName = lens _aupName (\ s a -> s{_aupName = a}) + +-- | ID of the user profile. This is a read-only, auto-generated field. +aupId :: Lens' AccountUserProfile (Maybe Int64) +aupId = lens _aupId (\ s a -> s{_aupId = a}) + +-- | User type of the user profile. This is a read-only field that can be +-- left blank. +aupUserAccessType :: Lens' AccountUserProfile (Maybe Text) +aupUserAccessType + = lens _aupUserAccessType + (\ s a -> s{_aupUserAccessType = a}) + +-- | Comments for this user profile. +aupComments :: Lens' AccountUserProfile (Maybe Text) +aupComments + = lens _aupComments (\ s a -> s{_aupComments = a}) + +-- | Subaccount ID of the user profile. This is a read-only field that can be +-- left blank. +aupSubaccountId :: Lens' AccountUserProfile (Maybe Int64) +aupSubaccountId + = lens _aupSubaccountId + (\ s a -> s{_aupSubaccountId = a}) + +-- | Filter that describes which campaigns are visible to the user profile. +aupCampaignFilter :: Lens' AccountUserProfile (Maybe (Maybe ObjectFilter)) +aupCampaignFilter + = lens _aupCampaignFilter + (\ s a -> s{_aupCampaignFilter = a}) + +instance FromJSON AccountUserProfile where + parseJSON + = withObject "AccountUserProfile" + (\ o -> + AccountUserProfile <$> + (o .:? "email") <*> (o .:? "userRoleFilter") <*> + (o .:? "advertiserFilter") + <*> (o .:? "userRoleId") + <*> + (o .:? "kind" .!= "dfareporting#accountUserProfile") + <*> (o .:? "locale") + <*> (o .:? "siteFilter") + <*> (o .:? "traffickerType") + <*> (o .:? "active") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "userAccessType") + <*> (o .:? "comments") + <*> (o .:? "subaccountId") + <*> (o .:? "campaignFilter")) + +instance ToJSON AccountUserProfile where + toJSON AccountUserProfile{..} + = object + (catMaybes + [("email" .=) <$> _aupEmail, + ("userRoleFilter" .=) <$> _aupUserRoleFilter, + ("advertiserFilter" .=) <$> _aupAdvertiserFilter, + ("userRoleId" .=) <$> _aupUserRoleId, + Just ("kind" .= _aupKind), + ("locale" .=) <$> _aupLocale, + ("siteFilter" .=) <$> _aupSiteFilter, + ("traffickerType" .=) <$> _aupTraffickerType, + ("active" .=) <$> _aupActive, + ("accountId" .=) <$> _aupAccountId, + ("name" .=) <$> _aupName, ("id" .=) <$> _aupId, + ("userAccessType" .=) <$> _aupUserAccessType, + ("comments" .=) <$> _aupComments, + ("subaccountId" .=) <$> _aupSubaccountId, + ("campaignFilter" .=) <$> _aupCampaignFilter]) + +-- | Placement Tag +-- +-- /See:/ 'placementTag' smart constructor. +data PlacementTag = PlacementTag + { _ptPlacementId :: !(Maybe Int64) + , _ptTagDatas :: !(Maybe [Maybe TagData]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptPlacementId' +-- +-- * 'ptTagDatas' +placementTag + :: PlacementTag +placementTag = + PlacementTag + { _ptPlacementId = Nothing + , _ptTagDatas = Nothing + } + +-- | Placement ID +ptPlacementId :: Lens' PlacementTag (Maybe Int64) +ptPlacementId + = lens _ptPlacementId + (\ s a -> s{_ptPlacementId = a}) + +-- | Tags generated for this placement. +ptTagDatas :: Lens' PlacementTag [Maybe TagData] +ptTagDatas + = lens _ptTagDatas (\ s a -> s{_ptTagDatas = a}) . + _Default + . _Coerce + +instance FromJSON PlacementTag where + parseJSON + = withObject "PlacementTag" + (\ o -> + PlacementTag <$> + (o .:? "placementId") <*> + (o .:? "tagDatas" .!= mempty)) + +instance ToJSON PlacementTag where + toJSON PlacementTag{..} + = object + (catMaybes + [("placementId" .=) <$> _ptPlacementId, + ("tagDatas" .=) <$> _ptTagDatas]) + +-- | Remarketing list response +-- +-- /See:/ 'remarketingListsListResponse' smart constructor. +data RemarketingListsListResponse = RemarketingListsListResponse + { _rllrNextPageToken :: !(Maybe Text) + , _rllrRemarketingLists :: !(Maybe [Maybe RemarketingList]) + , _rllrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rllrNextPageToken' +-- +-- * 'rllrRemarketingLists' +-- +-- * 'rllrKind' +remarketingListsListResponse + :: RemarketingListsListResponse +remarketingListsListResponse = + RemarketingListsListResponse + { _rllrNextPageToken = Nothing + , _rllrRemarketingLists = Nothing + , _rllrKind = "dfareporting#remarketingListsListResponse" + } + +-- | Pagination token to be used for the next list operation. +rllrNextPageToken :: Lens' RemarketingListsListResponse (Maybe Text) +rllrNextPageToken + = lens _rllrNextPageToken + (\ s a -> s{_rllrNextPageToken = a}) + +-- | Remarketing list collection. +rllrRemarketingLists :: Lens' RemarketingListsListResponse [Maybe RemarketingList] +rllrRemarketingLists + = lens _rllrRemarketingLists + (\ s a -> s{_rllrRemarketingLists = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#remarketingListsListResponse\". +rllrKind :: Lens' RemarketingListsListResponse Text +rllrKind = lens _rllrKind (\ s a -> s{_rllrKind = a}) + +instance FromJSON RemarketingListsListResponse where + parseJSON + = withObject "RemarketingListsListResponse" + (\ o -> + RemarketingListsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "remarketingLists" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#remarketingListsListResponse")) + +instance ToJSON RemarketingListsListResponse where + toJSON RemarketingListsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rllrNextPageToken, + ("remarketingLists" .=) <$> _rllrRemarketingLists, + Just ("kind" .= _rllrKind)]) + +-- | Site Settings +-- +-- /See:/ 'siteSettings' smart constructor. +data SiteSettings = SiteSettings + { _ssDisableNewCookie :: !(Maybe Bool) + , _ssDisableBrandSafeAds :: !(Maybe Bool) + , _ssLookbackConfiguration :: !(Maybe (Maybe LookbackConfiguration)) + , _ssTagSetting :: !(Maybe (Maybe TagSetting)) + , _ssActiveViewOptOut :: !(Maybe Bool) + , _ssCreativeSettings :: !(Maybe (Maybe CreativeSettings)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssDisableNewCookie' +-- +-- * 'ssDisableBrandSafeAds' +-- +-- * 'ssLookbackConfiguration' +-- +-- * 'ssTagSetting' +-- +-- * 'ssActiveViewOptOut' +-- +-- * 'ssCreativeSettings' +siteSettings + :: SiteSettings +siteSettings = + SiteSettings + { _ssDisableNewCookie = Nothing + , _ssDisableBrandSafeAds = Nothing + , _ssLookbackConfiguration = Nothing + , _ssTagSetting = Nothing + , _ssActiveViewOptOut = Nothing + , _ssCreativeSettings = Nothing + } + +-- | Whether new cookies are disabled for this site. +ssDisableNewCookie :: Lens' SiteSettings (Maybe Bool) +ssDisableNewCookie + = lens _ssDisableNewCookie + (\ s a -> s{_ssDisableNewCookie = a}) + +-- | Whether brand safe ads are disabled for this site. +ssDisableBrandSafeAds :: Lens' SiteSettings (Maybe Bool) +ssDisableBrandSafeAds + = lens _ssDisableBrandSafeAds + (\ s a -> s{_ssDisableBrandSafeAds = a}) + +-- | Lookback window settings for this site. +ssLookbackConfiguration :: Lens' SiteSettings (Maybe (Maybe LookbackConfiguration)) +ssLookbackConfiguration + = lens _ssLookbackConfiguration + (\ s a -> s{_ssLookbackConfiguration = a}) + +-- | Configuration settings for dynamic and image floodlight tags. +ssTagSetting :: Lens' SiteSettings (Maybe (Maybe TagSetting)) +ssTagSetting + = lens _ssTagSetting (\ s a -> s{_ssTagSetting = a}) + +-- | Whether active view creatives are disabled for this site. +ssActiveViewOptOut :: Lens' SiteSettings (Maybe Bool) +ssActiveViewOptOut + = lens _ssActiveViewOptOut + (\ s a -> s{_ssActiveViewOptOut = a}) + +-- | Site-wide creative settings. +ssCreativeSettings :: Lens' SiteSettings (Maybe (Maybe CreativeSettings)) +ssCreativeSettings + = lens _ssCreativeSettings + (\ s a -> s{_ssCreativeSettings = a}) + +instance FromJSON SiteSettings where + parseJSON + = withObject "SiteSettings" + (\ o -> + SiteSettings <$> + (o .:? "disableNewCookie") <*> + (o .:? "disableBrandSafeAds") + <*> (o .:? "lookbackConfiguration") + <*> (o .:? "tagSetting") + <*> (o .:? "activeViewOptOut") + <*> (o .:? "creativeSettings")) + +instance ToJSON SiteSettings where + toJSON SiteSettings{..} + = object + (catMaybes + [("disableNewCookie" .=) <$> _ssDisableNewCookie, + ("disableBrandSafeAds" .=) <$> + _ssDisableBrandSafeAds, + ("lookbackConfiguration" .=) <$> + _ssLookbackConfiguration, + ("tagSetting" .=) <$> _ssTagSetting, + ("activeViewOptOut" .=) <$> _ssActiveViewOptOut, + ("creativeSettings" .=) <$> _ssCreativeSettings]) + +-- | Third Party Authentication Token +-- +-- /See:/ 'thirdPartyAuthenticationToken' smart constructor. +data ThirdPartyAuthenticationToken = ThirdPartyAuthenticationToken + { _tpatValue :: !(Maybe Text) + , _tpatName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ThirdPartyAuthenticationToken' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpatValue' +-- +-- * 'tpatName' +thirdPartyAuthenticationToken + :: ThirdPartyAuthenticationToken +thirdPartyAuthenticationToken = + ThirdPartyAuthenticationToken + { _tpatValue = Nothing + , _tpatName = Nothing + } + +-- | Value of the third-party authentication token. This is a read-only, +-- auto-generated field. +tpatValue :: Lens' ThirdPartyAuthenticationToken (Maybe Text) +tpatValue + = lens _tpatValue (\ s a -> s{_tpatValue = a}) + +-- | Name of the third-party authentication token. +tpatName :: Lens' ThirdPartyAuthenticationToken (Maybe Text) +tpatName = lens _tpatName (\ s a -> s{_tpatName = a}) + +instance FromJSON ThirdPartyAuthenticationToken where + parseJSON + = withObject "ThirdPartyAuthenticationToken" + (\ o -> + ThirdPartyAuthenticationToken <$> + (o .:? "value") <*> (o .:? "name")) + +instance ToJSON ThirdPartyAuthenticationToken where + toJSON ThirdPartyAuthenticationToken{..} + = object + (catMaybes + [("value" .=) <$> _tpatValue, + ("name" .=) <$> _tpatName]) + +-- | Browser List Response +-- +-- /See:/ 'browsersListResponse' smart constructor. +data BrowsersListResponse = BrowsersListResponse + { _blrKind :: !Text + , _blrBrowsers :: !(Maybe [Maybe Browser]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BrowsersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blrKind' +-- +-- * 'blrBrowsers' +browsersListResponse + :: BrowsersListResponse +browsersListResponse = + BrowsersListResponse + { _blrKind = "dfareporting#browsersListResponse" + , _blrBrowsers = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#browsersListResponse\". +blrKind :: Lens' BrowsersListResponse Text +blrKind = lens _blrKind (\ s a -> s{_blrKind = a}) + +-- | Browser collection. +blrBrowsers :: Lens' BrowsersListResponse [Maybe Browser] +blrBrowsers + = lens _blrBrowsers (\ s a -> s{_blrBrowsers = a}) . + _Default + . _Coerce + +instance FromJSON BrowsersListResponse where + parseJSON + = withObject "BrowsersListResponse" + (\ o -> + BrowsersListResponse <$> + (o .:? "kind" .!= + "dfareporting#browsersListResponse") + <*> (o .:? "browsers" .!= mempty)) + +instance ToJSON BrowsersListResponse where + toJSON BrowsersListResponse{..} + = object + (catMaybes + [Just ("kind" .= _blrKind), + ("browsers" .=) <$> _blrBrowsers]) + +-- | Click-through URL +-- +-- /See:/ 'clickThroughURL' smart constructor. +data ClickThroughURL = ClickThroughURL + { _ctuDefaultLandingPage :: !(Maybe Bool) + , _ctuComputedClickThroughUrl :: !(Maybe Text) + , _ctuCustomClickThroughUrl :: !(Maybe Text) + , _ctuLandingPageId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClickThroughURL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctuDefaultLandingPage' +-- +-- * 'ctuComputedClickThroughUrl' +-- +-- * 'ctuCustomClickThroughUrl' +-- +-- * 'ctuLandingPageId' +clickThroughURL + :: ClickThroughURL +clickThroughURL = + ClickThroughURL + { _ctuDefaultLandingPage = Nothing + , _ctuComputedClickThroughUrl = Nothing + , _ctuCustomClickThroughUrl = Nothing + , _ctuLandingPageId = Nothing + } + +-- | Whether the campaign default landing page is used. +ctuDefaultLandingPage :: Lens' ClickThroughURL (Maybe Bool) +ctuDefaultLandingPage + = lens _ctuDefaultLandingPage + (\ s a -> s{_ctuDefaultLandingPage = a}) + +-- | Read-only convenience field representing the actual URL that will be +-- used for this click-through. The URL is computed as follows: - If +-- defaultLandingPage is enabled then the campaign\'s default landing page +-- URL is assigned to this field. - If defaultLandingPage is not enabled +-- and a landingPageId is specified then that landing page\'s URL is +-- assigned to this field. - If neither of the above cases apply, then the +-- customClickThroughUrl is assigned to this field. +ctuComputedClickThroughUrl :: Lens' ClickThroughURL (Maybe Text) +ctuComputedClickThroughUrl + = lens _ctuComputedClickThroughUrl + (\ s a -> s{_ctuComputedClickThroughUrl = a}) + +-- | Custom click-through URL. Applicable if the defaultLandingPage field is +-- set to false and the landingPageId field is left unset. +ctuCustomClickThroughUrl :: Lens' ClickThroughURL (Maybe Text) +ctuCustomClickThroughUrl + = lens _ctuCustomClickThroughUrl + (\ s a -> s{_ctuCustomClickThroughUrl = a}) + +-- | ID of the landing page for the click-through URL. Applicable if the +-- defaultLandingPage field is set to false. +ctuLandingPageId :: Lens' ClickThroughURL (Maybe Int64) +ctuLandingPageId + = lens _ctuLandingPageId + (\ s a -> s{_ctuLandingPageId = a}) + +instance FromJSON ClickThroughURL where + parseJSON + = withObject "ClickThroughURL" + (\ o -> + ClickThroughURL <$> + (o .:? "defaultLandingPage") <*> + (o .:? "computedClickThroughUrl") + <*> (o .:? "customClickThroughUrl") + <*> (o .:? "landingPageId")) + +instance ToJSON ClickThroughURL where + toJSON ClickThroughURL{..} + = object + (catMaybes + [("defaultLandingPage" .=) <$> + _ctuDefaultLandingPage, + ("computedClickThroughUrl" .=) <$> + _ctuComputedClickThroughUrl, + ("customClickThroughUrl" .=) <$> + _ctuCustomClickThroughUrl, + ("landingPageId" .=) <$> _ctuLandingPageId]) + +-- | Content Category List Response +-- +-- /See:/ 'contentCategoriesListResponse' smart constructor. +data ContentCategoriesListResponse = ContentCategoriesListResponse + { _cclrNextPageToken :: !(Maybe Text) + , _cclrKind :: !Text + , _cclrContentCategories :: !(Maybe [Maybe ContentCategory]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cclrNextPageToken' +-- +-- * 'cclrKind' +-- +-- * 'cclrContentCategories' +contentCategoriesListResponse + :: ContentCategoriesListResponse +contentCategoriesListResponse = + ContentCategoriesListResponse + { _cclrNextPageToken = Nothing + , _cclrKind = "dfareporting#contentCategoriesListResponse" + , _cclrContentCategories = Nothing + } + +-- | Pagination token to be used for the next list operation. +cclrNextPageToken :: Lens' ContentCategoriesListResponse (Maybe Text) +cclrNextPageToken + = lens _cclrNextPageToken + (\ s a -> s{_cclrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#contentCategoriesListResponse\". +cclrKind :: Lens' ContentCategoriesListResponse Text +cclrKind = lens _cclrKind (\ s a -> s{_cclrKind = a}) + +-- | Content category collection. +cclrContentCategories :: Lens' ContentCategoriesListResponse [Maybe ContentCategory] +cclrContentCategories + = lens _cclrContentCategories + (\ s a -> s{_cclrContentCategories = a}) + . _Default + . _Coerce + +instance FromJSON ContentCategoriesListResponse where + parseJSON + = withObject "ContentCategoriesListResponse" + (\ o -> + ContentCategoriesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#contentCategoriesListResponse") + <*> (o .:? "contentCategories" .!= mempty)) + +instance ToJSON ContentCategoriesListResponse where + toJSON ContentCategoriesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _cclrNextPageToken, + Just ("kind" .= _cclrKind), + ("contentCategories" .=) <$> _cclrContentCategories]) + +-- | Represents a Report resource. +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rDelivery :: !(Maybe ReportDelivery) + , _rEtag :: !(Maybe Text) + , _rOwnerProfileId :: !(Maybe Int64) + , _rSchedule :: !(Maybe ReportSchedule) + , _rPathToConversionCriteria :: !(Maybe ReportPathToConversionCriteria) + , _rKind :: !Text + , _rFormat :: !(Maybe Text) + , _rReachCriteria :: !(Maybe ReportReachCriteria) + , _rLastModifiedTime :: !(Maybe Word64) + , _rAccountId :: !(Maybe Int64) + , _rName :: !(Maybe Text) + , _rId :: !(Maybe Int64) + , _rCrossDimensionReachCriteria :: !(Maybe ReportCrossDimensionReachCriteria) + , _rType :: !(Maybe Text) + , _rSubAccountId :: !(Maybe Int64) + , _rFloodlightCriteria :: !(Maybe ReportFloodlightCriteria) + , _rCriteria :: !(Maybe ReportCriteria) + , _rFileName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rDelivery' +-- +-- * 'rEtag' +-- +-- * 'rOwnerProfileId' +-- +-- * 'rSchedule' +-- +-- * 'rPathToConversionCriteria' +-- +-- * 'rKind' +-- +-- * 'rFormat' +-- +-- * 'rReachCriteria' +-- +-- * 'rLastModifiedTime' +-- +-- * 'rAccountId' +-- +-- * 'rName' +-- +-- * 'rId' +-- +-- * 'rCrossDimensionReachCriteria' +-- +-- * 'rType' +-- +-- * 'rSubAccountId' +-- +-- * 'rFloodlightCriteria' +-- +-- * 'rCriteria' +-- +-- * 'rFileName' +report + :: Report +report = + Report + { _rDelivery = Nothing + , _rEtag = Nothing + , _rOwnerProfileId = Nothing + , _rSchedule = Nothing + , _rPathToConversionCriteria = Nothing + , _rKind = "dfareporting#report" + , _rFormat = Nothing + , _rReachCriteria = Nothing + , _rLastModifiedTime = Nothing + , _rAccountId = Nothing + , _rName = Nothing + , _rId = Nothing + , _rCrossDimensionReachCriteria = Nothing + , _rType = Nothing + , _rSubAccountId = Nothing + , _rFloodlightCriteria = Nothing + , _rCriteria = Nothing + , _rFileName = Nothing + } + +-- | The report\'s email delivery settings. +rDelivery :: Lens' Report (Maybe ReportDelivery) +rDelivery + = lens _rDelivery (\ s a -> s{_rDelivery = a}) + +-- | The eTag of this response for caching purposes. +rEtag :: Lens' Report (Maybe Text) +rEtag = lens _rEtag (\ s a -> s{_rEtag = a}) + +-- | The user profile id of the owner of this report. +rOwnerProfileId :: Lens' Report (Maybe Int64) +rOwnerProfileId + = lens _rOwnerProfileId + (\ s a -> s{_rOwnerProfileId = a}) + +-- | The report\'s schedule. Can only be set if the report\'s \'dateRange\' +-- is a relative date range and the relative date range is not \"TODAY\". +rSchedule :: Lens' Report (Maybe ReportSchedule) +rSchedule + = lens _rSchedule (\ s a -> s{_rSchedule = a}) + +-- | The report criteria for a report of type \"PATH_TO_CONVERSION\". +rPathToConversionCriteria :: Lens' Report (Maybe ReportPathToConversionCriteria) +rPathToConversionCriteria + = lens _rPathToConversionCriteria + (\ s a -> s{_rPathToConversionCriteria = a}) + +-- | The kind of resource this is, in this case dfareporting#report. +rKind :: Lens' Report Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The output format of the report. If not specified, default format is +-- \"CSV\". Note that the actual format in the completed report file might +-- differ if for instance the report\'s size exceeds the format\'s +-- capabilities. \"CSV\" will then be the fallback format. +rFormat :: Lens' Report (Maybe Text) +rFormat = lens _rFormat (\ s a -> s{_rFormat = a}) + +-- | The report criteria for a report of type \"REACH\". +rReachCriteria :: Lens' Report (Maybe ReportReachCriteria) +rReachCriteria + = lens _rReachCriteria + (\ s a -> s{_rReachCriteria = a}) + +-- | The timestamp (in milliseconds since epoch) of when this report was last +-- modified. +rLastModifiedTime :: Lens' Report (Maybe Word64) +rLastModifiedTime + = lens _rLastModifiedTime + (\ s a -> s{_rLastModifiedTime = a}) + +-- | The account ID to which this report belongs. +rAccountId :: Lens' Report (Maybe Int64) +rAccountId + = lens _rAccountId (\ s a -> s{_rAccountId = a}) + +-- | The name of the report. +rName :: Lens' Report (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | The unique ID identifying this report resource. +rId :: Lens' Report (Maybe Int64) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | The report criteria for a report of type \"CROSS_DIMENSION_REACH\". +rCrossDimensionReachCriteria :: Lens' Report (Maybe ReportCrossDimensionReachCriteria) +rCrossDimensionReachCriteria + = lens _rCrossDimensionReachCriteria + (\ s a -> s{_rCrossDimensionReachCriteria = a}) + +-- | The type of the report. +rType :: Lens' Report (Maybe Text) +rType = lens _rType (\ s a -> s{_rType = a}) + +-- | The subaccount ID to which this report belongs if applicable. +rSubAccountId :: Lens' Report (Maybe Int64) +rSubAccountId + = lens _rSubAccountId + (\ s a -> s{_rSubAccountId = a}) + +-- | The report criteria for a report of type \"FLOODLIGHT\". +rFloodlightCriteria :: Lens' Report (Maybe ReportFloodlightCriteria) +rFloodlightCriteria + = lens _rFloodlightCriteria + (\ s a -> s{_rFloodlightCriteria = a}) + +-- | The report criteria for a report of type \"STANDARD\". +rCriteria :: Lens' Report (Maybe ReportCriteria) +rCriteria + = lens _rCriteria (\ s a -> s{_rCriteria = a}) + +-- | The filename used when generating report files for this report. +rFileName :: Lens' Report (Maybe Text) +rFileName + = lens _rFileName (\ s a -> s{_rFileName = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "delivery") <*> (o .:? "etag") <*> + (o .:? "ownerProfileId") + <*> (o .:? "schedule") + <*> (o .:? "pathToConversionCriteria") + <*> (o .:? "kind" .!= "dfareporting#report") + <*> (o .:? "format") + <*> (o .:? "reachCriteria") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "crossDimensionReachCriteria") + <*> (o .:? "type") + <*> (o .:? "subAccountId") + <*> (o .:? "floodlightCriteria") + <*> (o .:? "criteria") + <*> (o .:? "fileName")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [("delivery" .=) <$> _rDelivery, + ("etag" .=) <$> _rEtag, + ("ownerProfileId" .=) <$> _rOwnerProfileId, + ("schedule" .=) <$> _rSchedule, + ("pathToConversionCriteria" .=) <$> + _rPathToConversionCriteria, + Just ("kind" .= _rKind), ("format" .=) <$> _rFormat, + ("reachCriteria" .=) <$> _rReachCriteria, + ("lastModifiedTime" .=) <$> _rLastModifiedTime, + ("accountId" .=) <$> _rAccountId, + ("name" .=) <$> _rName, ("id" .=) <$> _rId, + ("crossDimensionReachCriteria" .=) <$> + _rCrossDimensionReachCriteria, + ("type" .=) <$> _rType, + ("subAccountId" .=) <$> _rSubAccountId, + ("floodlightCriteria" .=) <$> _rFloodlightCriteria, + ("criteria" .=) <$> _rCriteria, + ("fileName" .=) <$> _rFileName]) + +-- | Contains properties of a DCM campaign. +-- +-- /See:/ 'campaign' smart constructor. +data Campaign = Campaign + { _camCreativeOptimizationConfiguration :: !(Maybe (Maybe CreativeOptimizationConfiguration)) + , _camCreativeGroupIds :: !(Maybe [Int64]) + , _camNielsenOcrEnabled :: !(Maybe Bool) + , _camKind :: !Text + , _camClickThroughUrlSuffixProperties :: !(Maybe (Maybe ClickThroughURLSuffixProperties)) + , _camAdvertiserId :: !(Maybe Int64) + , _camEndDate :: !(Maybe UTCTime) + , _camAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _camIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _camEventTagOverrides :: !(Maybe [Maybe EventTagOverride]) + , _camLookbackConfiguration :: !(Maybe (Maybe LookbackConfiguration)) + , _camStartDate :: !(Maybe UTCTime) + , _camAccountId :: !(Maybe Int64) + , _camComscoreVceEnabled :: !(Maybe Bool) + , _camName :: !(Maybe Text) + , _camAdvertiserGroupId :: !(Maybe Int64) + , _camBillingInvoiceCode :: !(Maybe Text) + , _camCreateInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _camLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _camId :: !(Maybe Int64) + , _camSubaccountId :: !(Maybe Int64) + , _camAdditionalCreativeOptimizationConfigurations :: !(Maybe [Maybe CreativeOptimizationConfiguration]) + , _camExternalId :: !(Maybe Text) + , _camComment :: !(Maybe Text) + , _camAudienceSegmentGroups :: !(Maybe [Maybe AudienceSegmentGroup]) + , _camArchived :: !(Maybe Bool) + , _camTraffickerEmails :: !(Maybe [Text]) + , _camDefaultClickThroughEventTagProperties :: !(Maybe (Maybe DefaultClickThroughEventTagProperties)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Campaign' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'camCreativeOptimizationConfiguration' +-- +-- * 'camCreativeGroupIds' +-- +-- * 'camNielsenOcrEnabled' +-- +-- * 'camKind' +-- +-- * 'camClickThroughUrlSuffixProperties' +-- +-- * 'camAdvertiserId' +-- +-- * 'camEndDate' +-- +-- * 'camAdvertiserIdDimensionValue' +-- +-- * 'camIdDimensionValue' +-- +-- * 'camEventTagOverrides' +-- +-- * 'camLookbackConfiguration' +-- +-- * 'camStartDate' +-- +-- * 'camAccountId' +-- +-- * 'camComscoreVceEnabled' +-- +-- * 'camName' +-- +-- * 'camAdvertiserGroupId' +-- +-- * 'camBillingInvoiceCode' +-- +-- * 'camCreateInfo' +-- +-- * 'camLastModifiedInfo' +-- +-- * 'camId' +-- +-- * 'camSubaccountId' +-- +-- * 'camAdditionalCreativeOptimizationConfigurations' +-- +-- * 'camExternalId' +-- +-- * 'camComment' +-- +-- * 'camAudienceSegmentGroups' +-- +-- * 'camArchived' +-- +-- * 'camTraffickerEmails' +-- +-- * 'camDefaultClickThroughEventTagProperties' +campaign + :: Campaign +campaign = + Campaign + { _camCreativeOptimizationConfiguration = Nothing + , _camCreativeGroupIds = Nothing + , _camNielsenOcrEnabled = Nothing + , _camKind = "dfareporting#campaign" + , _camClickThroughUrlSuffixProperties = Nothing + , _camAdvertiserId = Nothing + , _camEndDate = Nothing + , _camAdvertiserIdDimensionValue = Nothing + , _camIdDimensionValue = Nothing + , _camEventTagOverrides = Nothing + , _camLookbackConfiguration = Nothing + , _camStartDate = Nothing + , _camAccountId = Nothing + , _camComscoreVceEnabled = Nothing + , _camName = Nothing + , _camAdvertiserGroupId = Nothing + , _camBillingInvoiceCode = Nothing + , _camCreateInfo = Nothing + , _camLastModifiedInfo = Nothing + , _camId = Nothing + , _camSubaccountId = Nothing + , _camAdditionalCreativeOptimizationConfigurations = Nothing + , _camExternalId = Nothing + , _camComment = Nothing + , _camAudienceSegmentGroups = Nothing + , _camArchived = Nothing + , _camTraffickerEmails = Nothing + , _camDefaultClickThroughEventTagProperties = Nothing + } + +-- | Creative optimization configuration for the campaign. +camCreativeOptimizationConfiguration :: Lens' Campaign (Maybe (Maybe CreativeOptimizationConfiguration)) +camCreativeOptimizationConfiguration + = lens _camCreativeOptimizationConfiguration + (\ s a -> + s{_camCreativeOptimizationConfiguration = a}) + +-- | List of creative group IDs that are assigned to the campaign. +camCreativeGroupIds :: Lens' Campaign [Int64] +camCreativeGroupIds + = lens _camCreativeGroupIds + (\ s a -> s{_camCreativeGroupIds = a}) + . _Default + . _Coerce + +-- | Whether Nielsen reports are enabled for this campaign. +camNielsenOcrEnabled :: Lens' Campaign (Maybe Bool) +camNielsenOcrEnabled + = lens _camNielsenOcrEnabled + (\ s a -> s{_camNielsenOcrEnabled = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#campaign\". +camKind :: Lens' Campaign Text +camKind = lens _camKind (\ s a -> s{_camKind = a}) + +-- | Click-through URL suffix override properties for this campaign. +camClickThroughUrlSuffixProperties :: Lens' Campaign (Maybe (Maybe ClickThroughURLSuffixProperties)) +camClickThroughUrlSuffixProperties + = lens _camClickThroughUrlSuffixProperties + (\ s a -> s{_camClickThroughUrlSuffixProperties = a}) + +-- | Advertiser ID of this campaign. This is a required field. +camAdvertiserId :: Lens' Campaign (Maybe Int64) +camAdvertiserId + = lens _camAdvertiserId + (\ s a -> s{_camAdvertiserId = a}) + +-- | Date on which the campaign will stop running. On insert, the end date +-- must be today or a future date. The end date must be later than or be +-- the same as the start date. If, for example, you set 6\/25\/2015 as both +-- the start and end dates, the effective campaign run date is just that +-- day only, 6\/25\/2015. The hours, minutes, and seconds of the end date +-- should not be set, as doing so will result in an error. This is a +-- required field. +camEndDate :: Lens' Campaign (Maybe UTCTime) +camEndDate + = lens _camEndDate (\ s a -> s{_camEndDate = a}) + +-- | Dimension value for the advertiser ID of this campaign. This is a +-- read-only, auto-generated field. +camAdvertiserIdDimensionValue :: Lens' Campaign (Maybe (Maybe DimensionValue)) +camAdvertiserIdDimensionValue + = lens _camAdvertiserIdDimensionValue + (\ s a -> s{_camAdvertiserIdDimensionValue = a}) + +-- | Dimension value for the ID of this campaign. This is a read-only, +-- auto-generated field. +camIdDimensionValue :: Lens' Campaign (Maybe (Maybe DimensionValue)) +camIdDimensionValue + = lens _camIdDimensionValue + (\ s a -> s{_camIdDimensionValue = a}) + +-- | Overrides that can be used to activate or deactivate advertiser event +-- tags. +camEventTagOverrides :: Lens' Campaign [Maybe EventTagOverride] +camEventTagOverrides + = lens _camEventTagOverrides + (\ s a -> s{_camEventTagOverrides = a}) + . _Default + . _Coerce + +-- | Lookback window settings for the campaign. +camLookbackConfiguration :: Lens' Campaign (Maybe (Maybe LookbackConfiguration)) +camLookbackConfiguration + = lens _camLookbackConfiguration + (\ s a -> s{_camLookbackConfiguration = a}) + +-- | Date on which the campaign starts running. The start date can be any +-- date. The hours, minutes, and seconds of the start date should not be +-- set, as doing so will result in an error. This is a required field. +camStartDate :: Lens' Campaign (Maybe UTCTime) +camStartDate + = lens _camStartDate (\ s a -> s{_camStartDate = a}) + +-- | Account ID of this campaign. This is a read-only field that can be left +-- blank. +camAccountId :: Lens' Campaign (Maybe Int64) +camAccountId + = lens _camAccountId (\ s a -> s{_camAccountId = a}) + +-- | Whether comScore vCE reports are enabled for this campaign. +camComscoreVceEnabled :: Lens' Campaign (Maybe Bool) +camComscoreVceEnabled + = lens _camComscoreVceEnabled + (\ s a -> s{_camComscoreVceEnabled = a}) + +-- | Name of this campaign. This is a required field and must be less than +-- 256 characters long and unique among campaigns of the same advertiser. +camName :: Lens' Campaign (Maybe Text) +camName = lens _camName (\ s a -> s{_camName = a}) + +-- | Advertiser group ID of the associated advertiser. +camAdvertiserGroupId :: Lens' Campaign (Maybe Int64) +camAdvertiserGroupId + = lens _camAdvertiserGroupId + (\ s a -> s{_camAdvertiserGroupId = a}) + +-- | Billing invoice code included in the DCM client billing invoices +-- associated with the campaign. +camBillingInvoiceCode :: Lens' Campaign (Maybe Text) +camBillingInvoiceCode + = lens _camBillingInvoiceCode + (\ s a -> s{_camBillingInvoiceCode = a}) + +-- | Information about the creation of this campaign. This is a read-only +-- field. +camCreateInfo :: Lens' Campaign (Maybe (Maybe LastModifiedInfo)) +camCreateInfo + = lens _camCreateInfo + (\ s a -> s{_camCreateInfo = a}) + +-- | Information about the most recent modification of this campaign. This is +-- a read-only field. +camLastModifiedInfo :: Lens' Campaign (Maybe (Maybe LastModifiedInfo)) +camLastModifiedInfo + = lens _camLastModifiedInfo + (\ s a -> s{_camLastModifiedInfo = a}) + +-- | ID of this campaign. This is a read-only auto-generated field. +camId :: Lens' Campaign (Maybe Int64) +camId = lens _camId (\ s a -> s{_camId = a}) + +-- | Subaccount ID of this campaign. This is a read-only field that can be +-- left blank. +camSubaccountId :: Lens' Campaign (Maybe Int64) +camSubaccountId + = lens _camSubaccountId + (\ s a -> s{_camSubaccountId = a}) + +-- | Additional creative optimization configurations for the campaign. +camAdditionalCreativeOptimizationConfigurations :: Lens' Campaign [Maybe CreativeOptimizationConfiguration] +camAdditionalCreativeOptimizationConfigurations + = lens + _camAdditionalCreativeOptimizationConfigurations + (\ s a -> + s{_camAdditionalCreativeOptimizationConfigurations = + a}) + . _Default + . _Coerce + +-- | External ID for this campaign. +camExternalId :: Lens' Campaign (Maybe Text) +camExternalId + = lens _camExternalId + (\ s a -> s{_camExternalId = a}) + +-- | Arbitrary comments about this campaign. Must be less than 256 characters +-- long. +camComment :: Lens' Campaign (Maybe Text) +camComment + = lens _camComment (\ s a -> s{_camComment = a}) + +-- | Audience segment groups assigned to this campaign. Cannot have more than +-- 300 segment groups. +camAudienceSegmentGroups :: Lens' Campaign [Maybe AudienceSegmentGroup] +camAudienceSegmentGroups + = lens _camAudienceSegmentGroups + (\ s a -> s{_camAudienceSegmentGroups = a}) + . _Default + . _Coerce + +-- | Whether this campaign has been archived. +camArchived :: Lens' Campaign (Maybe Bool) +camArchived + = lens _camArchived (\ s a -> s{_camArchived = a}) + +-- | Campaign trafficker contact emails. +camTraffickerEmails :: Lens' Campaign [Text] +camTraffickerEmails + = lens _camTraffickerEmails + (\ s a -> s{_camTraffickerEmails = a}) + . _Default + . _Coerce + +-- | Click-through event tag ID override properties for this campaign. +camDefaultClickThroughEventTagProperties :: Lens' Campaign (Maybe (Maybe DefaultClickThroughEventTagProperties)) +camDefaultClickThroughEventTagProperties + = lens _camDefaultClickThroughEventTagProperties + (\ s a -> + s{_camDefaultClickThroughEventTagProperties = a}) + +instance FromJSON Campaign where + parseJSON + = withObject "Campaign" + (\ o -> + Campaign <$> + (o .:? "creativeOptimizationConfiguration") <*> + (o .:? "creativeGroupIds" .!= mempty) + <*> (o .:? "nielsenOcrEnabled") + <*> (o .:? "kind" .!= "dfareporting#campaign") + <*> (o .:? "clickThroughUrlSuffixProperties") + <*> (o .:? "advertiserId") + <*> (o .:? "endDate") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "idDimensionValue") + <*> (o .:? "eventTagOverrides" .!= mempty) + <*> (o .:? "lookbackConfiguration") + <*> (o .:? "startDate") + <*> (o .:? "accountId") + <*> (o .:? "comscoreVceEnabled") + <*> (o .:? "name") + <*> (o .:? "advertiserGroupId") + <*> (o .:? "billingInvoiceCode") + <*> (o .:? "createInfo") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> + (o .:? "additionalCreativeOptimizationConfigurations" + .!= mempty) + <*> (o .:? "externalId") + <*> (o .:? "comment") + <*> (o .:? "audienceSegmentGroups" .!= mempty) + <*> (o .:? "archived") + <*> (o .:? "traffickerEmails" .!= mempty) + <*> (o .:? "defaultClickThroughEventTagProperties")) + +instance ToJSON Campaign where + toJSON Campaign{..} + = object + (catMaybes + [("creativeOptimizationConfiguration" .=) <$> + _camCreativeOptimizationConfiguration, + ("creativeGroupIds" .=) <$> _camCreativeGroupIds, + ("nielsenOcrEnabled" .=) <$> _camNielsenOcrEnabled, + Just ("kind" .= _camKind), + ("clickThroughUrlSuffixProperties" .=) <$> + _camClickThroughUrlSuffixProperties, + ("advertiserId" .=) <$> _camAdvertiserId, + ("endDate" .=) <$> _camEndDate, + ("advertiserIdDimensionValue" .=) <$> + _camAdvertiserIdDimensionValue, + ("idDimensionValue" .=) <$> _camIdDimensionValue, + ("eventTagOverrides" .=) <$> _camEventTagOverrides, + ("lookbackConfiguration" .=) <$> + _camLookbackConfiguration, + ("startDate" .=) <$> _camStartDate, + ("accountId" .=) <$> _camAccountId, + ("comscoreVceEnabled" .=) <$> _camComscoreVceEnabled, + ("name" .=) <$> _camName, + ("advertiserGroupId" .=) <$> _camAdvertiserGroupId, + ("billingInvoiceCode" .=) <$> _camBillingInvoiceCode, + ("createInfo" .=) <$> _camCreateInfo, + ("lastModifiedInfo" .=) <$> _camLastModifiedInfo, + ("id" .=) <$> _camId, + ("subaccountId" .=) <$> _camSubaccountId, + ("additionalCreativeOptimizationConfigurations" .=) + <$> _camAdditionalCreativeOptimizationConfigurations, + ("externalId" .=) <$> _camExternalId, + ("comment" .=) <$> _camComment, + ("audienceSegmentGroups" .=) <$> + _camAudienceSegmentGroups, + ("archived" .=) <$> _camArchived, + ("traffickerEmails" .=) <$> _camTraffickerEmails, + ("defaultClickThroughEventTagProperties" .=) <$> + _camDefaultClickThroughEventTagProperties]) + +-- | Represents fields that are compatible to be selected for a report of +-- type \"STANDARD\". +-- +-- /See:/ 'reportCompatibleFields' smart constructor. +data ReportCompatibleFields = ReportCompatibleFields + { _rcfMetrics :: !(Maybe [Maybe Metric]) + , _rcfKind :: !Text + , _rcfDimensionFilters :: !(Maybe [Maybe Dimension]) + , _rcfPivotedActivityMetrics :: !(Maybe [Maybe Metric]) + , _rcfDimensions :: !(Maybe [Maybe Dimension]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportCompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcfMetrics' +-- +-- * 'rcfKind' +-- +-- * 'rcfDimensionFilters' +-- +-- * 'rcfPivotedActivityMetrics' +-- +-- * 'rcfDimensions' +reportCompatibleFields + :: ReportCompatibleFields +reportCompatibleFields = + ReportCompatibleFields + { _rcfMetrics = Nothing + , _rcfKind = "dfareporting#reportCompatibleFields" + , _rcfDimensionFilters = Nothing + , _rcfPivotedActivityMetrics = Nothing + , _rcfDimensions = Nothing + } + +-- | Metrics which are compatible to be selected in the \"metricNames\" +-- section of the report. +rcfMetrics :: Lens' ReportCompatibleFields [Maybe Metric] +rcfMetrics + = lens _rcfMetrics (\ s a -> s{_rcfMetrics = a}) . + _Default + . _Coerce + +-- | The kind of resource this is, in this case +-- dfareporting#reportCompatibleFields. +rcfKind :: Lens' ReportCompatibleFields Text +rcfKind = lens _rcfKind (\ s a -> s{_rcfKind = a}) + +-- | Dimensions which are compatible to be selected in the +-- \"dimensionFilters\" section of the report. +rcfDimensionFilters :: Lens' ReportCompatibleFields [Maybe Dimension] +rcfDimensionFilters + = lens _rcfDimensionFilters + (\ s a -> s{_rcfDimensionFilters = a}) + . _Default + . _Coerce + +-- | Metrics which are compatible to be selected as activity metrics to pivot +-- on in the \"activities\" section of the report. +rcfPivotedActivityMetrics :: Lens' ReportCompatibleFields [Maybe Metric] +rcfPivotedActivityMetrics + = lens _rcfPivotedActivityMetrics + (\ s a -> s{_rcfPivotedActivityMetrics = a}) + . _Default + . _Coerce + +-- | Dimensions which are compatible to be selected in the \"dimensions\" +-- section of the report. +rcfDimensions :: Lens' ReportCompatibleFields [Maybe Dimension] +rcfDimensions + = lens _rcfDimensions + (\ s a -> s{_rcfDimensions = a}) + . _Default + . _Coerce + +instance FromJSON ReportCompatibleFields where + parseJSON + = withObject "ReportCompatibleFields" + (\ o -> + ReportCompatibleFields <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#reportCompatibleFields") + <*> (o .:? "dimensionFilters" .!= mempty) + <*> (o .:? "pivotedActivityMetrics" .!= mempty) + <*> (o .:? "dimensions" .!= mempty)) + +instance ToJSON ReportCompatibleFields where + toJSON ReportCompatibleFields{..} + = object + (catMaybes + [("metrics" .=) <$> _rcfMetrics, + Just ("kind" .= _rcfKind), + ("dimensionFilters" .=) <$> _rcfDimensionFilters, + ("pivotedActivityMetrics" .=) <$> + _rcfPivotedActivityMetrics, + ("dimensions" .=) <$> _rcfDimensions]) + +-- | Represents fields that are compatible to be selected for a report of +-- type \"FlOODLIGHT\". +-- +-- /See:/ 'floodlightReportCompatibleFields' smart constructor. +data FloodlightReportCompatibleFields = FloodlightReportCompatibleFields + { _frcfMetrics :: !(Maybe [Maybe Metric]) + , _frcfKind :: !Text + , _frcfDimensionFilters :: !(Maybe [Maybe Dimension]) + , _frcfDimensions :: !(Maybe [Maybe Dimension]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightReportCompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frcfMetrics' +-- +-- * 'frcfKind' +-- +-- * 'frcfDimensionFilters' +-- +-- * 'frcfDimensions' +floodlightReportCompatibleFields + :: FloodlightReportCompatibleFields +floodlightReportCompatibleFields = + FloodlightReportCompatibleFields + { _frcfMetrics = Nothing + , _frcfKind = "dfareporting#floodlightReportCompatibleFields" + , _frcfDimensionFilters = Nothing + , _frcfDimensions = Nothing + } + +-- | Metrics which are compatible to be selected in the \"metricNames\" +-- section of the report. +frcfMetrics :: Lens' FloodlightReportCompatibleFields [Maybe Metric] +frcfMetrics + = lens _frcfMetrics (\ s a -> s{_frcfMetrics = a}) . + _Default + . _Coerce + +-- | The kind of resource this is, in this case +-- dfareporting#floodlightReportCompatibleFields. +frcfKind :: Lens' FloodlightReportCompatibleFields Text +frcfKind = lens _frcfKind (\ s a -> s{_frcfKind = a}) + +-- | Dimensions which are compatible to be selected in the +-- \"dimensionFilters\" section of the report. +frcfDimensionFilters :: Lens' FloodlightReportCompatibleFields [Maybe Dimension] +frcfDimensionFilters + = lens _frcfDimensionFilters + (\ s a -> s{_frcfDimensionFilters = a}) + . _Default + . _Coerce + +-- | Dimensions which are compatible to be selected in the \"dimensions\" +-- section of the report. +frcfDimensions :: Lens' FloodlightReportCompatibleFields [Maybe Dimension] +frcfDimensions + = lens _frcfDimensions + (\ s a -> s{_frcfDimensions = a}) + . _Default + . _Coerce + +instance FromJSON FloodlightReportCompatibleFields + where + parseJSON + = withObject "FloodlightReportCompatibleFields" + (\ o -> + FloodlightReportCompatibleFields <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#floodlightReportCompatibleFields") + <*> (o .:? "dimensionFilters" .!= mempty) + <*> (o .:? "dimensions" .!= mempty)) + +instance ToJSON FloodlightReportCompatibleFields + where + toJSON FloodlightReportCompatibleFields{..} + = object + (catMaybes + [("metrics" .=) <$> _frcfMetrics, + Just ("kind" .= _frcfKind), + ("dimensionFilters" .=) <$> _frcfDimensionFilters, + ("dimensions" .=) <$> _frcfDimensions]) + +-- | Organizes placements according to the contents of their associated +-- webpages. +-- +-- /See:/ 'contentCategory' smart constructor. +data ContentCategory = ContentCategory + { _ccKind :: !Text + , _ccAccountId :: !(Maybe Int64) + , _ccName :: !(Maybe Text) + , _ccId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategory' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccKind' +-- +-- * 'ccAccountId' +-- +-- * 'ccName' +-- +-- * 'ccId' +contentCategory + :: ContentCategory +contentCategory = + ContentCategory + { _ccKind = "dfareporting#contentCategory" + , _ccAccountId = Nothing + , _ccName = Nothing + , _ccId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#contentCategory\". +ccKind :: Lens' ContentCategory Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | Account ID of this content category. This is a read-only field that can +-- be left blank. +ccAccountId :: Lens' ContentCategory (Maybe Int64) +ccAccountId + = lens _ccAccountId (\ s a -> s{_ccAccountId = a}) + +-- | Name of this content category. This is a required field and must be less +-- than 256 characters long and unique among content categories of the same +-- account. +ccName :: Lens' ContentCategory (Maybe Text) +ccName = lens _ccName (\ s a -> s{_ccName = a}) + +-- | ID of this content category. This is a read-only, auto-generated field. +ccId :: Lens' ContentCategory (Maybe Int64) +ccId = lens _ccId (\ s a -> s{_ccId = a}) + +instance FromJSON ContentCategory where + parseJSON + = withObject "ContentCategory" + (\ o -> + ContentCategory <$> + (o .:? "kind" .!= "dfareporting#contentCategory") <*> + (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON ContentCategory where + toJSON ContentCategory{..} + = object + (catMaybes + [Just ("kind" .= _ccKind), + ("accountId" .=) <$> _ccAccountId, + ("name" .=) <$> _ccName, ("id" .=) <$> _ccId]) + +-- | Represents the list of DimensionValue resources. +-- +-- /See:/ 'dimensionValueList' smart constructor. +data DimensionValueList = DimensionValueList + { _dvlEtag :: !(Maybe Text) + , _dvlNextPageToken :: !(Maybe Text) + , _dvlKind :: !Text + , _dvlItems :: !(Maybe [Maybe DimensionValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DimensionValueList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvlEtag' +-- +-- * 'dvlNextPageToken' +-- +-- * 'dvlKind' +-- +-- * 'dvlItems' +dimensionValueList + :: DimensionValueList +dimensionValueList = + DimensionValueList + { _dvlEtag = Nothing + , _dvlNextPageToken = Nothing + , _dvlKind = "dfareporting#dimensionValueList" + , _dvlItems = Nothing + } + +-- | The eTag of this response for caching purposes. +dvlEtag :: Lens' DimensionValueList (Maybe Text) +dvlEtag = lens _dvlEtag (\ s a -> s{_dvlEtag = a}) + +-- | Continuation token used to page through dimension values. To retrieve +-- the next page of results, set the next request\'s \"pageToken\" to the +-- value of this field. The page token is only valid for a limited amount +-- of time and should not be persisted. +dvlNextPageToken :: Lens' DimensionValueList (Maybe Text) +dvlNextPageToken + = lens _dvlNextPageToken + (\ s a -> s{_dvlNextPageToken = a}) + +-- | The kind of list this is, in this case dfareporting#dimensionValueList. +dvlKind :: Lens' DimensionValueList Text +dvlKind = lens _dvlKind (\ s a -> s{_dvlKind = a}) + +-- | The dimension values returned in this response. +dvlItems :: Lens' DimensionValueList [Maybe DimensionValue] +dvlItems + = lens _dvlItems (\ s a -> s{_dvlItems = a}) . + _Default + . _Coerce + +instance FromJSON DimensionValueList where + parseJSON + = withObject "DimensionValueList" + (\ o -> + DimensionValueList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#dimensionValueList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON DimensionValueList where + toJSON DimensionValueList{..} + = object + (catMaybes + [("etag" .=) <$> _dvlEtag, + ("nextPageToken" .=) <$> _dvlNextPageToken, + Just ("kind" .= _dvlKind), + ("items" .=) <$> _dvlItems]) + +-- | Creative List Response +-- +-- /See:/ 'creativesListResponse' smart constructor. +data CreativesListResponse = CreativesListResponse + { _clrlNextPageToken :: !(Maybe Text) + , _clrlKind :: !Text + , _clrlCreatives :: !(Maybe [Maybe Creative]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrlNextPageToken' +-- +-- * 'clrlKind' +-- +-- * 'clrlCreatives' +creativesListResponse + :: CreativesListResponse +creativesListResponse = + CreativesListResponse + { _clrlNextPageToken = Nothing + , _clrlKind = "dfareporting#creativesListResponse" + , _clrlCreatives = Nothing + } + +-- | Pagination token to be used for the next list operation. +clrlNextPageToken :: Lens' CreativesListResponse (Maybe Text) +clrlNextPageToken + = lens _clrlNextPageToken + (\ s a -> s{_clrlNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativesListResponse\". +clrlKind :: Lens' CreativesListResponse Text +clrlKind = lens _clrlKind (\ s a -> s{_clrlKind = a}) + +-- | Creative collection. +clrlCreatives :: Lens' CreativesListResponse [Maybe Creative] +clrlCreatives + = lens _clrlCreatives + (\ s a -> s{_clrlCreatives = a}) + . _Default + . _Coerce + +instance FromJSON CreativesListResponse where + parseJSON + = withObject "CreativesListResponse" + (\ o -> + CreativesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#creativesListResponse") + <*> (o .:? "creatives" .!= mempty)) + +instance ToJSON CreativesListResponse where + toJSON CreativesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _clrlNextPageToken, + Just ("kind" .= _clrlKind), + ("creatives" .=) <$> _clrlCreatives]) + +-- | Represents a grouping of related user role permissions. +-- +-- /See:/ 'userRolePermissionGroup' smart constructor. +data UserRolePermissionGroup = UserRolePermissionGroup + { _urpgKind :: !Text + , _urpgName :: !(Maybe Text) + , _urpgId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpgKind' +-- +-- * 'urpgName' +-- +-- * 'urpgId' +userRolePermissionGroup + :: UserRolePermissionGroup +userRolePermissionGroup = + UserRolePermissionGroup + { _urpgKind = "dfareporting#userRolePermissionGroup" + , _urpgName = Nothing + , _urpgId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRolePermissionGroup\". +urpgKind :: Lens' UserRolePermissionGroup Text +urpgKind = lens _urpgKind (\ s a -> s{_urpgKind = a}) + +-- | Name of this user role permission group. +urpgName :: Lens' UserRolePermissionGroup (Maybe Text) +urpgName = lens _urpgName (\ s a -> s{_urpgName = a}) + +-- | ID of this user role permission. +urpgId :: Lens' UserRolePermissionGroup (Maybe Int64) +urpgId = lens _urpgId (\ s a -> s{_urpgId = a}) + +instance FromJSON UserRolePermissionGroup where + parseJSON + = withObject "UserRolePermissionGroup" + (\ o -> + UserRolePermissionGroup <$> + (o .:? "kind" .!= + "dfareporting#userRolePermissionGroup") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON UserRolePermissionGroup where + toJSON UserRolePermissionGroup{..} + = object + (catMaybes + [Just ("kind" .= _urpgKind), + ("name" .=) <$> _urpgName, ("id" .=) <$> _urpgId]) + +-- | Contains properties of a DCM account. +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _aaAccountPermissionIds :: !(Maybe [Int64]) + , _aaMaximumImageSize :: !(Maybe Int64) + , _aaCurrencyId :: !(Maybe Int64) + , _aaReportsConfiguration :: !(Maybe (Maybe ReportsConfiguration)) + , _aaNielsenOcrEnabled :: !(Maybe Bool) + , _aaKind :: !Text + , _aaLocale :: !(Maybe Text) + , _aaActive :: !(Maybe Bool) + , _aaAvailablePermissionIds :: !(Maybe [Int64]) + , _aaTeaserSizeLimit :: !(Maybe Int64) + , _aaComscoreVceEnabled :: !(Maybe Bool) + , _aaActiveViewOptOut :: !(Maybe Bool) + , _aaName :: !(Maybe Text) + , _aaAccountProfile :: !(Maybe Text) + , _aaId :: !(Maybe Int64) + , _aaCountryId :: !(Maybe Int64) + , _aaActiveAdsLimitTier :: !(Maybe Text) + , _aaDefaultCreativeSizeId :: !(Maybe Int64) + , _aaDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaAccountPermissionIds' +-- +-- * 'aaMaximumImageSize' +-- +-- * 'aaCurrencyId' +-- +-- * 'aaReportsConfiguration' +-- +-- * 'aaNielsenOcrEnabled' +-- +-- * 'aaKind' +-- +-- * 'aaLocale' +-- +-- * 'aaActive' +-- +-- * 'aaAvailablePermissionIds' +-- +-- * 'aaTeaserSizeLimit' +-- +-- * 'aaComscoreVceEnabled' +-- +-- * 'aaActiveViewOptOut' +-- +-- * 'aaName' +-- +-- * 'aaAccountProfile' +-- +-- * 'aaId' +-- +-- * 'aaCountryId' +-- +-- * 'aaActiveAdsLimitTier' +-- +-- * 'aaDefaultCreativeSizeId' +-- +-- * 'aaDescription' +account + :: Account +account = + Account + { _aaAccountPermissionIds = Nothing + , _aaMaximumImageSize = Nothing + , _aaCurrencyId = Nothing + , _aaReportsConfiguration = Nothing + , _aaNielsenOcrEnabled = Nothing + , _aaKind = "dfareporting#account" + , _aaLocale = Nothing + , _aaActive = Nothing + , _aaAvailablePermissionIds = Nothing + , _aaTeaserSizeLimit = Nothing + , _aaComscoreVceEnabled = Nothing + , _aaActiveViewOptOut = Nothing + , _aaName = Nothing + , _aaAccountProfile = Nothing + , _aaId = Nothing + , _aaCountryId = Nothing + , _aaActiveAdsLimitTier = Nothing + , _aaDefaultCreativeSizeId = Nothing + , _aaDescription = Nothing + } + +-- | Account permissions assigned to this account. +aaAccountPermissionIds :: Lens' Account [Int64] +aaAccountPermissionIds + = lens _aaAccountPermissionIds + (\ s a -> s{_aaAccountPermissionIds = a}) + . _Default + . _Coerce + +-- | Maximum image size allowed for this account. +aaMaximumImageSize :: Lens' Account (Maybe Int64) +aaMaximumImageSize + = lens _aaMaximumImageSize + (\ s a -> s{_aaMaximumImageSize = a}) + +-- | ID of currency associated with this account. This is a required field. +-- Acceptable values are: - \"1\" for USD - \"2\" for GBP - \"3\" for ESP - +-- \"4\" for SEK - \"5\" for CAD - \"6\" for JPY - \"7\" for DEM - \"8\" +-- for AUD - \"9\" for FRF - \"10\" for ITL - \"11\" for DKK - \"12\" for +-- NOK - \"13\" for FIM - \"14\" for ZAR - \"15\" for IEP - \"16\" for NLG +-- - \"17\" for EUR - \"18\" for KRW - \"19\" for TWD - \"20\" for SGD - +-- \"21\" for CNY - \"22\" for HKD - \"23\" for NZD - \"24\" for MYR - +-- \"25\" for BRL - \"26\" for PTE - \"27\" for MXP - \"28\" for CLP - +-- \"29\" for TRY - \"30\" for ARS - \"31\" for PEN - \"32\" for ILS - +-- \"33\" for CHF - \"34\" for VEF - \"35\" for COP - \"36\" for GTQ +aaCurrencyId :: Lens' Account (Maybe Int64) +aaCurrencyId + = lens _aaCurrencyId (\ s a -> s{_aaCurrencyId = a}) + +-- | Reporting configuration of this account. +aaReportsConfiguration :: Lens' Account (Maybe (Maybe ReportsConfiguration)) +aaReportsConfiguration + = lens _aaReportsConfiguration + (\ s a -> s{_aaReportsConfiguration = a}) + +-- | Whether campaigns created in this account will be enabled for Nielsen +-- OCR reach ratings by default. +aaNielsenOcrEnabled :: Lens' Account (Maybe Bool) +aaNielsenOcrEnabled + = lens _aaNielsenOcrEnabled + (\ s a -> s{_aaNielsenOcrEnabled = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#account\". +aaKind :: Lens' Account Text +aaKind = lens _aaKind (\ s a -> s{_aaKind = a}) + +-- | Locale of this account. Acceptable values are: - \"cs\" (Czech) - \"de\" +-- (German) - \"en\" (English) - \"en-GB\" (English United Kingdom) - +-- \"es\" (Spanish) - \"fr\" (French) - \"it\" (Italian) - \"ja\" +-- (Japanese) - \"ko\" (Korean) - \"pl\" (Polish) - \"pt-BR\" (Portuguese +-- Brazil) - \"ru\" (Russian) - \"sv\" (Swedish) - \"tr\" (Turkish) - +-- \"zh-CN\" (Chinese Simplified) - \"zh-TW\" (Chinese Traditional) +aaLocale :: Lens' Account (Maybe Text) +aaLocale = lens _aaLocale (\ s a -> s{_aaLocale = a}) + +-- | Whether this account is active. +aaActive :: Lens' Account (Maybe Bool) +aaActive = lens _aaActive (\ s a -> s{_aaActive = a}) + +-- | User role permissions available to the user roles of this account. +aaAvailablePermissionIds :: Lens' Account [Int64] +aaAvailablePermissionIds + = lens _aaAvailablePermissionIds + (\ s a -> s{_aaAvailablePermissionIds = a}) + . _Default + . _Coerce + +-- | File size limit in kilobytes of Rich Media teaser creatives. Must be +-- between 1 and 10240. +aaTeaserSizeLimit :: Lens' Account (Maybe Int64) +aaTeaserSizeLimit + = lens _aaTeaserSizeLimit + (\ s a -> s{_aaTeaserSizeLimit = a}) + +-- | Whether campaigns created in this account will be enabled for comScore +-- vCE by default. +aaComscoreVceEnabled :: Lens' Account (Maybe Bool) +aaComscoreVceEnabled + = lens _aaComscoreVceEnabled + (\ s a -> s{_aaComscoreVceEnabled = a}) + +-- | Whether to serve creatives with Active View tags. If disabled, +-- viewability data will not be available for any impressions. +aaActiveViewOptOut :: Lens' Account (Maybe Bool) +aaActiveViewOptOut + = lens _aaActiveViewOptOut + (\ s a -> s{_aaActiveViewOptOut = a}) + +-- | Name of this account. This is a required field, and must be less than +-- 128 characters long and be globally unique. +aaName :: Lens' Account (Maybe Text) +aaName = lens _aaName (\ s a -> s{_aaName = a}) + +-- | Profile for this account. This is a read-only field that can be left +-- blank. +aaAccountProfile :: Lens' Account (Maybe Text) +aaAccountProfile + = lens _aaAccountProfile + (\ s a -> s{_aaAccountProfile = a}) + +-- | ID of this account. This is a read-only, auto-generated field. +aaId :: Lens' Account (Maybe Int64) +aaId = lens _aaId (\ s a -> s{_aaId = a}) + +-- | ID of the country associated with this account. +aaCountryId :: Lens' Account (Maybe Int64) +aaCountryId + = lens _aaCountryId (\ s a -> s{_aaCountryId = a}) + +-- | Maximum number of active ads allowed for this account. +aaActiveAdsLimitTier :: Lens' Account (Maybe Text) +aaActiveAdsLimitTier + = lens _aaActiveAdsLimitTier + (\ s a -> s{_aaActiveAdsLimitTier = a}) + +-- | Default placement dimensions for this account. +aaDefaultCreativeSizeId :: Lens' Account (Maybe Int64) +aaDefaultCreativeSizeId + = lens _aaDefaultCreativeSizeId + (\ s a -> s{_aaDefaultCreativeSizeId = a}) + +-- | Description of this account. +aaDescription :: Lens' Account (Maybe Text) +aaDescription + = lens _aaDescription + (\ s a -> s{_aaDescription = a}) + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "accountPermissionIds" .!= mempty) <*> + (o .:? "maximumImageSize") + <*> (o .:? "currencyId") + <*> (o .:? "reportsConfiguration") + <*> (o .:? "nielsenOcrEnabled") + <*> (o .:? "kind" .!= "dfareporting#account") + <*> (o .:? "locale") + <*> (o .:? "active") + <*> (o .:? "availablePermissionIds" .!= mempty) + <*> (o .:? "teaserSizeLimit") + <*> (o .:? "comscoreVceEnabled") + <*> (o .:? "activeViewOptOut") + <*> (o .:? "name") + <*> (o .:? "accountProfile") + <*> (o .:? "id") + <*> (o .:? "countryId") + <*> (o .:? "activeAdsLimitTier") + <*> (o .:? "defaultCreativeSizeId") + <*> (o .:? "description")) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("accountPermissionIds" .=) <$> + _aaAccountPermissionIds, + ("maximumImageSize" .=) <$> _aaMaximumImageSize, + ("currencyId" .=) <$> _aaCurrencyId, + ("reportsConfiguration" .=) <$> + _aaReportsConfiguration, + ("nielsenOcrEnabled" .=) <$> _aaNielsenOcrEnabled, + Just ("kind" .= _aaKind), + ("locale" .=) <$> _aaLocale, + ("active" .=) <$> _aaActive, + ("availablePermissionIds" .=) <$> + _aaAvailablePermissionIds, + ("teaserSizeLimit" .=) <$> _aaTeaserSizeLimit, + ("comscoreVceEnabled" .=) <$> _aaComscoreVceEnabled, + ("activeViewOptOut" .=) <$> _aaActiveViewOptOut, + ("name" .=) <$> _aaName, + ("accountProfile" .=) <$> _aaAccountProfile, + ("id" .=) <$> _aaId, + ("countryId" .=) <$> _aaCountryId, + ("activeAdsLimitTier" .=) <$> _aaActiveAdsLimitTier, + ("defaultCreativeSizeId" .=) <$> + _aaDefaultCreativeSizeId, + ("description" .=) <$> _aaDescription]) + +-- | Contains properties of a remarketing list. Remarketing enables you to +-- create lists of users who have performed specific actions on a site, +-- then target ads to members of those lists. This resource can be used to +-- manage remarketing lists that are owned by your advertisers. To see all +-- remarketing lists that are visible to your advertisers, including those +-- that are shared to your advertiser or account, use the +-- TargetableRemarketingLists resource. +-- +-- /See:/ 'remarketingList' smart constructor. +data RemarketingList = RemarketingList + { _rlListSize :: !(Maybe Int64) + , _rlListPopulationRule :: !(Maybe (Maybe ListPopulationRule)) + , _rlLifeSpan :: !(Maybe Int64) + , _rlKind :: !Text + , _rlAdvertiserId :: !(Maybe Int64) + , _rlAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _rlActive :: !(Maybe Bool) + , _rlAccountId :: !(Maybe Int64) + , _rlName :: !(Maybe Text) + , _rlListSource :: !(Maybe Text) + , _rlId :: !(Maybe Int64) + , _rlSubaccountId :: !(Maybe Int64) + , _rlDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlListSize' +-- +-- * 'rlListPopulationRule' +-- +-- * 'rlLifeSpan' +-- +-- * 'rlKind' +-- +-- * 'rlAdvertiserId' +-- +-- * 'rlAdvertiserIdDimensionValue' +-- +-- * 'rlActive' +-- +-- * 'rlAccountId' +-- +-- * 'rlName' +-- +-- * 'rlListSource' +-- +-- * 'rlId' +-- +-- * 'rlSubaccountId' +-- +-- * 'rlDescription' +remarketingList + :: RemarketingList +remarketingList = + RemarketingList + { _rlListSize = Nothing + , _rlListPopulationRule = Nothing + , _rlLifeSpan = Nothing + , _rlKind = "dfareporting#remarketingList" + , _rlAdvertiserId = Nothing + , _rlAdvertiserIdDimensionValue = Nothing + , _rlActive = Nothing + , _rlAccountId = Nothing + , _rlName = Nothing + , _rlListSource = Nothing + , _rlId = Nothing + , _rlSubaccountId = Nothing + , _rlDescription = Nothing + } + +-- | Number of users currently in the list. This is a read-only field. +rlListSize :: Lens' RemarketingList (Maybe Int64) +rlListSize + = lens _rlListSize (\ s a -> s{_rlListSize = a}) + +-- | Rule used to populate the remarketing list with users. +rlListPopulationRule :: Lens' RemarketingList (Maybe (Maybe ListPopulationRule)) +rlListPopulationRule + = lens _rlListPopulationRule + (\ s a -> s{_rlListPopulationRule = a}) + +-- | Number of days that a user should remain in the remarketing list without +-- an impression. +rlLifeSpan :: Lens' RemarketingList (Maybe Int64) +rlLifeSpan + = lens _rlLifeSpan (\ s a -> s{_rlLifeSpan = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#remarketingList\". +rlKind :: Lens' RemarketingList Text +rlKind = lens _rlKind (\ s a -> s{_rlKind = a}) + +-- | Dimension value for the advertiser ID that owns this remarketing list. +-- This is a required field. +rlAdvertiserId :: Lens' RemarketingList (Maybe Int64) +rlAdvertiserId + = lens _rlAdvertiserId + (\ s a -> s{_rlAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +rlAdvertiserIdDimensionValue :: Lens' RemarketingList (Maybe (Maybe DimensionValue)) +rlAdvertiserIdDimensionValue + = lens _rlAdvertiserIdDimensionValue + (\ s a -> s{_rlAdvertiserIdDimensionValue = a}) + +-- | Whether this remarketing list is active. +rlActive :: Lens' RemarketingList (Maybe Bool) +rlActive = lens _rlActive (\ s a -> s{_rlActive = a}) + +-- | Account ID of this remarketing list. This is a read-only, auto-generated +-- field that is only returned in GET requests. +rlAccountId :: Lens' RemarketingList (Maybe Int64) +rlAccountId + = lens _rlAccountId (\ s a -> s{_rlAccountId = a}) + +-- | Name of the remarketing list. This is a required field. Must be no +-- greater than 128 characters long. +rlName :: Lens' RemarketingList (Maybe Text) +rlName = lens _rlName (\ s a -> s{_rlName = a}) + +-- | Product from which this remarketing list was originated. +rlListSource :: Lens' RemarketingList (Maybe Text) +rlListSource + = lens _rlListSource (\ s a -> s{_rlListSource = a}) + +-- | Remarketing list ID. This is a read-only, auto-generated field. +rlId :: Lens' RemarketingList (Maybe Int64) +rlId = lens _rlId (\ s a -> s{_rlId = a}) + +-- | Subaccount ID of this remarketing list. This is a read-only, +-- auto-generated field that is only returned in GET requests. +rlSubaccountId :: Lens' RemarketingList (Maybe Int64) +rlSubaccountId + = lens _rlSubaccountId + (\ s a -> s{_rlSubaccountId = a}) + +-- | Remarketing list description. +rlDescription :: Lens' RemarketingList (Maybe Text) +rlDescription + = lens _rlDescription + (\ s a -> s{_rlDescription = a}) + +instance FromJSON RemarketingList where + parseJSON + = withObject "RemarketingList" + (\ o -> + RemarketingList <$> + (o .:? "listSize") <*> (o .:? "listPopulationRule") + <*> (o .:? "lifeSpan") + <*> (o .:? "kind" .!= "dfareporting#remarketingList") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "active") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "listSource") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "description")) + +instance ToJSON RemarketingList where + toJSON RemarketingList{..} + = object + (catMaybes + [("listSize" .=) <$> _rlListSize, + ("listPopulationRule" .=) <$> _rlListPopulationRule, + ("lifeSpan" .=) <$> _rlLifeSpan, + Just ("kind" .= _rlKind), + ("advertiserId" .=) <$> _rlAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _rlAdvertiserIdDimensionValue, + ("active" .=) <$> _rlActive, + ("accountId" .=) <$> _rlAccountId, + ("name" .=) <$> _rlName, + ("listSource" .=) <$> _rlListSource, + ("id" .=) <$> _rlId, + ("subaccountId" .=) <$> _rlSubaccountId, + ("description" .=) <$> _rlDescription]) + +-- | Account User Profile List Response +-- +-- /See:/ 'accountUserProfilesListResponse' smart constructor. +data AccountUserProfilesListResponse = AccountUserProfilesListResponse + { _auplrNextPageToken :: !(Maybe Text) + , _auplrAccountUserProfiles :: !(Maybe [Maybe AccountUserProfile]) + , _auplrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auplrNextPageToken' +-- +-- * 'auplrAccountUserProfiles' +-- +-- * 'auplrKind' +accountUserProfilesListResponse + :: AccountUserProfilesListResponse +accountUserProfilesListResponse = + AccountUserProfilesListResponse + { _auplrNextPageToken = Nothing + , _auplrAccountUserProfiles = Nothing + , _auplrKind = "dfareporting#accountUserProfilesListResponse" + } + +-- | Pagination token to be used for the next list operation. +auplrNextPageToken :: Lens' AccountUserProfilesListResponse (Maybe Text) +auplrNextPageToken + = lens _auplrNextPageToken + (\ s a -> s{_auplrNextPageToken = a}) + +-- | Account user profile collection. +auplrAccountUserProfiles :: Lens' AccountUserProfilesListResponse [Maybe AccountUserProfile] +auplrAccountUserProfiles + = lens _auplrAccountUserProfiles + (\ s a -> s{_auplrAccountUserProfiles = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountUserProfilesListResponse\". +auplrKind :: Lens' AccountUserProfilesListResponse Text +auplrKind + = lens _auplrKind (\ s a -> s{_auplrKind = a}) + +instance FromJSON AccountUserProfilesListResponse + where + parseJSON + = withObject "AccountUserProfilesListResponse" + (\ o -> + AccountUserProfilesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "accountUserProfiles" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#accountUserProfilesListResponse")) + +instance ToJSON AccountUserProfilesListResponse where + toJSON AccountUserProfilesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _auplrNextPageToken, + ("accountUserProfiles" .=) <$> + _auplrAccountUserProfiles, + Just ("kind" .= _auplrKind)]) + +-- | Delivery Schedule. +-- +-- /See:/ 'deliverySchedule' smart constructor. +data DeliverySchedule = DeliverySchedule + { _dsHardCutoff :: !(Maybe Bool) + , _dsPriority :: !(Maybe Text) + , _dsImpressionRatio :: !(Maybe Int64) + , _dsFrequencyCap :: !(Maybe (Maybe FrequencyCap)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeliverySchedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsHardCutoff' +-- +-- * 'dsPriority' +-- +-- * 'dsImpressionRatio' +-- +-- * 'dsFrequencyCap' +deliverySchedule + :: DeliverySchedule +deliverySchedule = + DeliverySchedule + { _dsHardCutoff = Nothing + , _dsPriority = Nothing + , _dsImpressionRatio = Nothing + , _dsFrequencyCap = Nothing + } + +-- | Whether or not hard cutoff is enabled. If true, the ad will not serve +-- after the end date and time. Otherwise the ad will continue to be served +-- until it has reached its delivery goals. +dsHardCutoff :: Lens' DeliverySchedule (Maybe Bool) +dsHardCutoff + = lens _dsHardCutoff (\ s a -> s{_dsHardCutoff = a}) + +-- | Serving priority of an ad, with respect to other ads. The lower the +-- priority number, the greater the priority with which it is served. +dsPriority :: Lens' DeliverySchedule (Maybe Text) +dsPriority + = lens _dsPriority (\ s a -> s{_dsPriority = a}) + +-- | Impression ratio for this ad. This ratio determines how often each ad is +-- served relative to the others. For example, if ad A has an impression +-- ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad +-- B three times as often as ad A. Must be between 1 and 10. +dsImpressionRatio :: Lens' DeliverySchedule (Maybe Int64) +dsImpressionRatio + = lens _dsImpressionRatio + (\ s a -> s{_dsImpressionRatio = a}) + +-- | Limit on the number of times an individual user can be served the ad +-- within a specified period of time. +dsFrequencyCap :: Lens' DeliverySchedule (Maybe (Maybe FrequencyCap)) +dsFrequencyCap + = lens _dsFrequencyCap + (\ s a -> s{_dsFrequencyCap = a}) + +instance FromJSON DeliverySchedule where + parseJSON + = withObject "DeliverySchedule" + (\ o -> + DeliverySchedule <$> + (o .:? "hardCutoff") <*> (o .:? "priority") <*> + (o .:? "impressionRatio") + <*> (o .:? "frequencyCap")) + +instance ToJSON DeliverySchedule where + toJSON DeliverySchedule{..} + = object + (catMaybes + [("hardCutoff" .=) <$> _dsHardCutoff, + ("priority" .=) <$> _dsPriority, + ("impressionRatio" .=) <$> _dsImpressionRatio, + ("frequencyCap" .=) <$> _dsFrequencyCap]) + +-- | Placement Group List Response +-- +-- /See:/ 'placementGroupsListResponse' smart constructor. +data PlacementGroupsListResponse = PlacementGroupsListResponse + { _pglrNextPageToken :: !(Maybe Text) + , _pglrKind :: !Text + , _pglrPlacementGroups :: !(Maybe [Maybe PlacementGroup]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pglrNextPageToken' +-- +-- * 'pglrKind' +-- +-- * 'pglrPlacementGroups' +placementGroupsListResponse + :: PlacementGroupsListResponse +placementGroupsListResponse = + PlacementGroupsListResponse + { _pglrNextPageToken = Nothing + , _pglrKind = "dfareporting#placementGroupsListResponse" + , _pglrPlacementGroups = Nothing + } + +-- | Pagination token to be used for the next list operation. +pglrNextPageToken :: Lens' PlacementGroupsListResponse (Maybe Text) +pglrNextPageToken + = lens _pglrNextPageToken + (\ s a -> s{_pglrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementGroupsListResponse\". +pglrKind :: Lens' PlacementGroupsListResponse Text +pglrKind = lens _pglrKind (\ s a -> s{_pglrKind = a}) + +-- | Placement group collection. +pglrPlacementGroups :: Lens' PlacementGroupsListResponse [Maybe PlacementGroup] +pglrPlacementGroups + = lens _pglrPlacementGroups + (\ s a -> s{_pglrPlacementGroups = a}) + . _Default + . _Coerce + +instance FromJSON PlacementGroupsListResponse where + parseJSON + = withObject "PlacementGroupsListResponse" + (\ o -> + PlacementGroupsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#placementGroupsListResponse") + <*> (o .:? "placementGroups" .!= mempty)) + +instance ToJSON PlacementGroupsListResponse where + toJSON PlacementGroupsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _pglrNextPageToken, + Just ("kind" .= _pglrKind), + ("placementGroups" .=) <$> _pglrPlacementGroups]) + +-- | Order List Response +-- +-- /See:/ 'ordersListResponse' smart constructor. +data OrdersListResponse = OrdersListResponse + { _olrNextPageToken :: !(Maybe Text) + , _olrKind :: !Text + , _olrOrders :: !(Maybe [Maybe Order]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olrNextPageToken' +-- +-- * 'olrKind' +-- +-- * 'olrOrders' +ordersListResponse + :: OrdersListResponse +ordersListResponse = + OrdersListResponse + { _olrNextPageToken = Nothing + , _olrKind = "dfareporting#ordersListResponse" + , _olrOrders = Nothing + } + +-- | Pagination token to be used for the next list operation. +olrNextPageToken :: Lens' OrdersListResponse (Maybe Text) +olrNextPageToken + = lens _olrNextPageToken + (\ s a -> s{_olrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#ordersListResponse\". +olrKind :: Lens' OrdersListResponse Text +olrKind = lens _olrKind (\ s a -> s{_olrKind = a}) + +-- | Order collection. +olrOrders :: Lens' OrdersListResponse [Maybe Order] +olrOrders + = lens _olrOrders (\ s a -> s{_olrOrders = a}) . + _Default + . _Coerce + +instance FromJSON OrdersListResponse where + parseJSON + = withObject "OrdersListResponse" + (\ o -> + OrdersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#ordersListResponse") + <*> (o .:? "orders" .!= mempty)) + +instance ToJSON OrdersListResponse where + toJSON OrdersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olrNextPageToken, + Just ("kind" .= _olrKind), + ("orders" .=) <$> _olrOrders]) + +-- | User Role Permission List Response +-- +-- /See:/ 'userRolePermissionsListResponse' smart constructor. +data UserRolePermissionsListResponse = UserRolePermissionsListResponse + { _urplrKind :: !Text + , _urplrUserRolePermissions :: !(Maybe [Maybe UserRolePermission]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urplrKind' +-- +-- * 'urplrUserRolePermissions' +userRolePermissionsListResponse + :: UserRolePermissionsListResponse +userRolePermissionsListResponse = + UserRolePermissionsListResponse + { _urplrKind = "dfareporting#userRolePermissionsListResponse" + , _urplrUserRolePermissions = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRolePermissionsListResponse\". +urplrKind :: Lens' UserRolePermissionsListResponse Text +urplrKind + = lens _urplrKind (\ s a -> s{_urplrKind = a}) + +-- | User role permission collection. +urplrUserRolePermissions :: Lens' UserRolePermissionsListResponse [Maybe UserRolePermission] +urplrUserRolePermissions + = lens _urplrUserRolePermissions + (\ s a -> s{_urplrUserRolePermissions = a}) + . _Default + . _Coerce + +instance FromJSON UserRolePermissionsListResponse + where + parseJSON + = withObject "UserRolePermissionsListResponse" + (\ o -> + UserRolePermissionsListResponse <$> + (o .:? "kind" .!= + "dfareporting#userRolePermissionsListResponse") + <*> (o .:? "userRolePermissions" .!= mempty)) + +instance ToJSON UserRolePermissionsListResponse where + toJSON UserRolePermissionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _urplrKind), + ("userRolePermissions" .=) <$> + _urplrUserRolePermissions]) + +-- | Contains information about a mobile carrier that can be targeted by ads. +-- +-- /See:/ 'mobileCarrier' smart constructor. +data MobileCarrier = MobileCarrier + { _mcKind :: !Text + , _mcName :: !(Maybe Text) + , _mcCountryCode :: !(Maybe Text) + , _mcId :: !(Maybe Int64) + , _mcCountryDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileCarrier' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcKind' +-- +-- * 'mcName' +-- +-- * 'mcCountryCode' +-- +-- * 'mcId' +-- +-- * 'mcCountryDartId' +mobileCarrier + :: MobileCarrier +mobileCarrier = + MobileCarrier + { _mcKind = "dfareporting#mobileCarrier" + , _mcName = Nothing + , _mcCountryCode = Nothing + , _mcId = Nothing + , _mcCountryDartId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#mobileCarrier\". +mcKind :: Lens' MobileCarrier Text +mcKind = lens _mcKind (\ s a -> s{_mcKind = a}) + +-- | Name of this mobile carrier. +mcName :: Lens' MobileCarrier (Maybe Text) +mcName = lens _mcName (\ s a -> s{_mcName = a}) + +-- | Country code of the country to which this mobile carrier belongs. +mcCountryCode :: Lens' MobileCarrier (Maybe Text) +mcCountryCode + = lens _mcCountryCode + (\ s a -> s{_mcCountryCode = a}) + +-- | ID of this mobile carrier. +mcId :: Lens' MobileCarrier (Maybe Int64) +mcId = lens _mcId (\ s a -> s{_mcId = a}) + +-- | DART ID of the country to which this mobile carrier belongs. +mcCountryDartId :: Lens' MobileCarrier (Maybe Int64) +mcCountryDartId + = lens _mcCountryDartId + (\ s a -> s{_mcCountryDartId = a}) + +instance FromJSON MobileCarrier where + parseJSON + = withObject "MobileCarrier" + (\ o -> + MobileCarrier <$> + (o .:? "kind" .!= "dfareporting#mobileCarrier") <*> + (o .:? "name") + <*> (o .:? "countryCode") + <*> (o .:? "id") + <*> (o .:? "countryDartId")) + +instance ToJSON MobileCarrier where + toJSON MobileCarrier{..} + = object + (catMaybes + [Just ("kind" .= _mcKind), ("name" .=) <$> _mcName, + ("countryCode" .=) <$> _mcCountryCode, + ("id" .=) <$> _mcId, + ("countryDartId" .=) <$> _mcCountryDartId]) + +-- | Contains information about where a user\'s browser is taken after the +-- user clicks an ad. +-- +-- /See:/ 'landingPage' smart constructor. +data LandingPage = LandingPage + { _lpKind :: !Text + , _lpDefault :: !(Maybe Bool) + , _lpUrl :: !(Maybe Text) + , _lpName :: !(Maybe Text) + , _lpId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpKind' +-- +-- * 'lpDefault' +-- +-- * 'lpUrl' +-- +-- * 'lpName' +-- +-- * 'lpId' +landingPage + :: LandingPage +landingPage = + LandingPage + { _lpKind = "dfareporting#landingPage" + , _lpDefault = Nothing + , _lpUrl = Nothing + , _lpName = Nothing + , _lpId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#landingPage\". +lpKind :: Lens' LandingPage Text +lpKind = lens _lpKind (\ s a -> s{_lpKind = a}) + +-- | Whether or not this landing page will be assigned to any ads or +-- creatives that do not have a landing page assigned explicitly. Only one +-- default landing page is allowed per campaign. +lpDefault :: Lens' LandingPage (Maybe Bool) +lpDefault + = lens _lpDefault (\ s a -> s{_lpDefault = a}) + +-- | URL of this landing page. This is a required field. +lpUrl :: Lens' LandingPage (Maybe Text) +lpUrl = lens _lpUrl (\ s a -> s{_lpUrl = a}) + +-- | Name of this landing page. This is a required field. It must be less +-- than 256 characters long, and must be unique among landing pages of the +-- same campaign. +lpName :: Lens' LandingPage (Maybe Text) +lpName = lens _lpName (\ s a -> s{_lpName = a}) + +-- | ID of this landing page. This is a read-only, auto-generated field. +lpId :: Lens' LandingPage (Maybe Int64) +lpId = lens _lpId (\ s a -> s{_lpId = a}) + +instance FromJSON LandingPage where + parseJSON + = withObject "LandingPage" + (\ o -> + LandingPage <$> + (o .:? "kind" .!= "dfareporting#landingPage") <*> + (o .:? "default") + <*> (o .:? "url") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON LandingPage where + toJSON LandingPage{..} + = object + (catMaybes + [Just ("kind" .= _lpKind), + ("default" .=) <$> _lpDefault, ("url" .=) <$> _lpUrl, + ("name" .=) <$> _lpName, ("id" .=) <$> _lpId]) + +-- | Tag Settings +-- +-- /See:/ 'tagSetting' smart constructor. +data TagSetting = TagSetting + { _tsKeywordOption :: !(Maybe Text) + , _tsIncludeClickThroughUrls :: !(Maybe Bool) + , _tsIncludeClickTracking :: !(Maybe Bool) + , _tsAdditionalKeyValues :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TagSetting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsKeywordOption' +-- +-- * 'tsIncludeClickThroughUrls' +-- +-- * 'tsIncludeClickTracking' +-- +-- * 'tsAdditionalKeyValues' +tagSetting + :: TagSetting +tagSetting = + TagSetting + { _tsKeywordOption = Nothing + , _tsIncludeClickThroughUrls = Nothing + , _tsIncludeClickTracking = Nothing + , _tsAdditionalKeyValues = Nothing + } + +-- | Option specifying how keywords are embedded in ad tags. This setting can +-- be used to specify whether keyword placeholders are inserted in +-- placement tags for this site. Publishers can then add keywords to those +-- placeholders. +tsKeywordOption :: Lens' TagSetting (Maybe Text) +tsKeywordOption + = lens _tsKeywordOption + (\ s a -> s{_tsKeywordOption = a}) + +-- | Whether static landing page URLs should be included in the tags. This +-- setting applies only to placements. +tsIncludeClickThroughUrls :: Lens' TagSetting (Maybe Bool) +tsIncludeClickThroughUrls + = lens _tsIncludeClickThroughUrls + (\ s a -> s{_tsIncludeClickThroughUrls = a}) + +-- | Whether click-tracking string should be included in the tags. +tsIncludeClickTracking :: Lens' TagSetting (Maybe Bool) +tsIncludeClickTracking + = lens _tsIncludeClickTracking + (\ s a -> s{_tsIncludeClickTracking = a}) + +-- | Additional key-values to be included in tags. Each key-value pair must +-- be of the form key=value, and pairs must be separated by a semicolon +-- (;). Keys and values must not contain commas. For example, +-- id=2;color=red is a valid value for this field. +tsAdditionalKeyValues :: Lens' TagSetting (Maybe Text) +tsAdditionalKeyValues + = lens _tsAdditionalKeyValues + (\ s a -> s{_tsAdditionalKeyValues = a}) + +instance FromJSON TagSetting where + parseJSON + = withObject "TagSetting" + (\ o -> + TagSetting <$> + (o .:? "keywordOption") <*> + (o .:? "includeClickThroughUrls") + <*> (o .:? "includeClickTracking") + <*> (o .:? "additionalKeyValues")) + +instance ToJSON TagSetting where + toJSON TagSetting{..} + = object + (catMaybes + [("keywordOption" .=) <$> _tsKeywordOption, + ("includeClickThroughUrls" .=) <$> + _tsIncludeClickThroughUrls, + ("includeClickTracking" .=) <$> + _tsIncludeClickTracking, + ("additionalKeyValues" .=) <$> + _tsAdditionalKeyValues]) + +-- | Contains properties of a creative group. +-- +-- /See:/ 'creativeGroup' smart constructor. +data CreativeGroup = CreativeGroup + { _cgKind :: !Text + , _cgAdvertiserId :: !(Maybe Int64) + , _cgAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _cgGroupNumber :: !(Maybe Int32) + , _cgAccountId :: !(Maybe Int64) + , _cgName :: !(Maybe Text) + , _cgId :: !(Maybe Int64) + , _cgSubaccountId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgKind' +-- +-- * 'cgAdvertiserId' +-- +-- * 'cgAdvertiserIdDimensionValue' +-- +-- * 'cgGroupNumber' +-- +-- * 'cgAccountId' +-- +-- * 'cgName' +-- +-- * 'cgId' +-- +-- * 'cgSubaccountId' +creativeGroup + :: CreativeGroup +creativeGroup = + CreativeGroup + { _cgKind = "dfareporting#creativeGroup" + , _cgAdvertiserId = Nothing + , _cgAdvertiserIdDimensionValue = Nothing + , _cgGroupNumber = Nothing + , _cgAccountId = Nothing + , _cgName = Nothing + , _cgId = Nothing + , _cgSubaccountId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeGroup\". +cgKind :: Lens' CreativeGroup Text +cgKind = lens _cgKind (\ s a -> s{_cgKind = a}) + +-- | Advertiser ID of this creative group. This is a required field on +-- insertion. +cgAdvertiserId :: Lens' CreativeGroup (Maybe Int64) +cgAdvertiserId + = lens _cgAdvertiserId + (\ s a -> s{_cgAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +cgAdvertiserIdDimensionValue :: Lens' CreativeGroup (Maybe (Maybe DimensionValue)) +cgAdvertiserIdDimensionValue + = lens _cgAdvertiserIdDimensionValue + (\ s a -> s{_cgAdvertiserIdDimensionValue = a}) + +-- | Subgroup of the creative group. Assign your creative groups to one of +-- the following subgroups in order to filter or manage them more easily. +-- This field is required on insertion and is read-only after insertion. +-- Acceptable values are: - 1 - 2 +cgGroupNumber :: Lens' CreativeGroup (Maybe Int32) +cgGroupNumber + = lens _cgGroupNumber + (\ s a -> s{_cgGroupNumber = a}) + +-- | Account ID of this creative group. This is a read-only field that can be +-- left blank. +cgAccountId :: Lens' CreativeGroup (Maybe Int64) +cgAccountId + = lens _cgAccountId (\ s a -> s{_cgAccountId = a}) + +-- | Name of this creative group. This is a required field and must be less +-- than 256 characters long and unique among creative groups of the same +-- advertiser. +cgName :: Lens' CreativeGroup (Maybe Text) +cgName = lens _cgName (\ s a -> s{_cgName = a}) + +-- | ID of this creative group. This is a read-only, auto-generated field. +cgId :: Lens' CreativeGroup (Maybe Int64) +cgId = lens _cgId (\ s a -> s{_cgId = a}) + +-- | Subaccount ID of this creative group. This is a read-only field that can +-- be left blank. +cgSubaccountId :: Lens' CreativeGroup (Maybe Int64) +cgSubaccountId + = lens _cgSubaccountId + (\ s a -> s{_cgSubaccountId = a}) + +instance FromJSON CreativeGroup where + parseJSON + = withObject "CreativeGroup" + (\ o -> + CreativeGroup <$> + (o .:? "kind" .!= "dfareporting#creativeGroup") <*> + (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "groupNumber") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "subaccountId")) + +instance ToJSON CreativeGroup where + toJSON CreativeGroup{..} + = object + (catMaybes + [Just ("kind" .= _cgKind), + ("advertiserId" .=) <$> _cgAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _cgAdvertiserIdDimensionValue, + ("groupNumber" .=) <$> _cgGroupNumber, + ("accountId" .=) <$> _cgAccountId, + ("name" .=) <$> _cgName, ("id" .=) <$> _cgId, + ("subaccountId" .=) <$> _cgSubaccountId]) + +-- | Connection Type List Response +-- +-- /See:/ 'connectionTypesListResponse' smart constructor. +data ConnectionTypesListResponse = ConnectionTypesListResponse + { _ctlrKind :: !Text + , _ctlrConnectionTypes :: !(Maybe [Maybe ConnectionType]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConnectionTypesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctlrKind' +-- +-- * 'ctlrConnectionTypes' +connectionTypesListResponse + :: ConnectionTypesListResponse +connectionTypesListResponse = + ConnectionTypesListResponse + { _ctlrKind = "dfareporting#connectionTypesListResponse" + , _ctlrConnectionTypes = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#connectionTypesListResponse\". +ctlrKind :: Lens' ConnectionTypesListResponse Text +ctlrKind = lens _ctlrKind (\ s a -> s{_ctlrKind = a}) + +-- | Collection of connection types such as broadband and mobile. +ctlrConnectionTypes :: Lens' ConnectionTypesListResponse [Maybe ConnectionType] +ctlrConnectionTypes + = lens _ctlrConnectionTypes + (\ s a -> s{_ctlrConnectionTypes = a}) + . _Default + . _Coerce + +instance FromJSON ConnectionTypesListResponse where + parseJSON + = withObject "ConnectionTypesListResponse" + (\ o -> + ConnectionTypesListResponse <$> + (o .:? "kind" .!= + "dfareporting#connectionTypesListResponse") + <*> (o .:? "connectionTypes" .!= mempty)) + +instance ToJSON ConnectionTypesListResponse where + toJSON ConnectionTypesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _ctlrKind), + ("connectionTypes" .=) <$> _ctlrConnectionTypes]) + +-- | Lookback configuration settings. +-- +-- /See:/ 'lookbackConfiguration' smart constructor. +data LookbackConfiguration = LookbackConfiguration + { _lcClickDuration :: !(Maybe Int32) + , _lcPostImpressionActivitiesDuration :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LookbackConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcClickDuration' +-- +-- * 'lcPostImpressionActivitiesDuration' +lookbackConfiguration + :: LookbackConfiguration +lookbackConfiguration = + LookbackConfiguration + { _lcClickDuration = Nothing + , _lcPostImpressionActivitiesDuration = Nothing + } + +-- | Lookback window, in days, from the last time a given user clicked on one +-- of your ads. If you enter 0, clicks will not be considered as triggering +-- events for floodlight tracking. If you leave this field blank, the +-- default value for your account will be used. +lcClickDuration :: Lens' LookbackConfiguration (Maybe Int32) +lcClickDuration + = lens _lcClickDuration + (\ s a -> s{_lcClickDuration = a}) + +-- | Lookback window, in days, from the last time a given user viewed one of +-- your ads. If you enter 0, impressions will not be considered as +-- triggering events for floodlight tracking. If you leave this field +-- blank, the default value for your account will be used. +lcPostImpressionActivitiesDuration :: Lens' LookbackConfiguration (Maybe Int32) +lcPostImpressionActivitiesDuration + = lens _lcPostImpressionActivitiesDuration + (\ s a -> s{_lcPostImpressionActivitiesDuration = a}) + +instance FromJSON LookbackConfiguration where + parseJSON + = withObject "LookbackConfiguration" + (\ o -> + LookbackConfiguration <$> + (o .:? "clickDuration") <*> + (o .:? "postImpressionActivitiesDuration")) + +instance ToJSON LookbackConfiguration where + toJSON LookbackConfiguration{..} + = object + (catMaybes + [("clickDuration" .=) <$> _lcClickDuration, + ("postImpressionActivitiesDuration" .=) <$> + _lcPostImpressionActivitiesDuration]) + +-- | Represents a metric. +-- +-- /See:/ 'metric' smart constructor. +data Metric = Metric + { _mKind :: !Text + , _mName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metric' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mName' +metric + :: Metric +metric = + Metric + { _mKind = "dfareporting#metric" + , _mName = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#metric. +mKind :: Lens' Metric Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | The metric name, e.g. dfa:impressions +mName :: Lens' Metric (Maybe Text) +mName = lens _mName (\ s a -> s{_mName = a}) + +instance FromJSON Metric where + parseJSON + = withObject "Metric" + (\ o -> + Metric <$> + (o .:? "kind" .!= "dfareporting#metric") <*> + (o .:? "name")) + +instance ToJSON Metric where + toJSON Metric{..} + = object + (catMaybes + [Just ("kind" .= _mKind), ("name" .=) <$> _mName]) + +-- | Contains properties of a remarketing list\'s sharing information. +-- Sharing allows other accounts or advertisers to target to your +-- remarketing lists. This resource can be used to manage remarketing list +-- sharing to other accounts and advertisers. +-- +-- /See:/ 'remarketingListShare' smart constructor. +data RemarketingListShare = RemarketingListShare + { _rlsSharedAdvertiserIds :: !(Maybe [Int64]) + , _rlsKind :: !Text + , _rlsRemarketingListId :: !(Maybe Int64) + , _rlsSharedAccountIds :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListShare' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlsSharedAdvertiserIds' +-- +-- * 'rlsKind' +-- +-- * 'rlsRemarketingListId' +-- +-- * 'rlsSharedAccountIds' +remarketingListShare + :: RemarketingListShare +remarketingListShare = + RemarketingListShare + { _rlsSharedAdvertiserIds = Nothing + , _rlsKind = "dfareporting#remarketingListShare" + , _rlsRemarketingListId = Nothing + , _rlsSharedAccountIds = Nothing + } + +-- | Advertisers that the remarketing list is shared with. +rlsSharedAdvertiserIds :: Lens' RemarketingListShare [Int64] +rlsSharedAdvertiserIds + = lens _rlsSharedAdvertiserIds + (\ s a -> s{_rlsSharedAdvertiserIds = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#remarketingListShare\". +rlsKind :: Lens' RemarketingListShare Text +rlsKind = lens _rlsKind (\ s a -> s{_rlsKind = a}) + +-- | Remarketing list ID. This is a read-only, auto-generated field. +rlsRemarketingListId :: Lens' RemarketingListShare (Maybe Int64) +rlsRemarketingListId + = lens _rlsRemarketingListId + (\ s a -> s{_rlsRemarketingListId = a}) + +-- | Accounts that the remarketing list is shared with. +rlsSharedAccountIds :: Lens' RemarketingListShare [Int64] +rlsSharedAccountIds + = lens _rlsSharedAccountIds + (\ s a -> s{_rlsSharedAccountIds = a}) + . _Default + . _Coerce + +instance FromJSON RemarketingListShare where + parseJSON + = withObject "RemarketingListShare" + (\ o -> + RemarketingListShare <$> + (o .:? "sharedAdvertiserIds" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#remarketingListShare") + <*> (o .:? "remarketingListId") + <*> (o .:? "sharedAccountIds" .!= mempty)) + +instance ToJSON RemarketingListShare where + toJSON RemarketingListShare{..} + = object + (catMaybes + [("sharedAdvertiserIds" .=) <$> + _rlsSharedAdvertiserIds, + Just ("kind" .= _rlsKind), + ("remarketingListId" .=) <$> _rlsRemarketingListId, + ("sharedAccountIds" .=) <$> _rlsSharedAccountIds]) + +-- | Represents the list of reports. +-- +-- /See:/ 'reportList' smart constructor. +data ReportList = ReportList + { _repEtag :: !(Maybe Text) + , _repNextPageToken :: !(Maybe Text) + , _repKind :: !Text + , _repItems :: !(Maybe [Maybe Report]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'repEtag' +-- +-- * 'repNextPageToken' +-- +-- * 'repKind' +-- +-- * 'repItems' +reportList + :: ReportList +reportList = + ReportList + { _repEtag = Nothing + , _repNextPageToken = Nothing + , _repKind = "dfareporting#reportList" + , _repItems = Nothing + } + +-- | The eTag of this response for caching purposes. +repEtag :: Lens' ReportList (Maybe Text) +repEtag = lens _repEtag (\ s a -> s{_repEtag = a}) + +-- | Continuation token used to page through reports. To retrieve the next +-- page of results, set the next request\'s \"pageToken\" to the value of +-- this field. The page token is only valid for a limited amount of time +-- and should not be persisted. +repNextPageToken :: Lens' ReportList (Maybe Text) +repNextPageToken + = lens _repNextPageToken + (\ s a -> s{_repNextPageToken = a}) + +-- | The kind of list this is, in this case dfareporting#reportList. +repKind :: Lens' ReportList Text +repKind = lens _repKind (\ s a -> s{_repKind = a}) + +-- | The reports returned in this response. +repItems :: Lens' ReportList [Maybe Report] +repItems + = lens _repItems (\ s a -> s{_repItems = a}) . + _Default + . _Coerce + +instance FromJSON ReportList where + parseJSON + = withObject "ReportList" + (\ o -> + ReportList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#reportList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON ReportList where + toJSON ReportList{..} + = object + (catMaybes + [("etag" .=) <$> _repEtag, + ("nextPageToken" .=) <$> _repNextPageToken, + Just ("kind" .= _repKind), + ("items" .=) <$> _repItems]) + +-- | Event Tag List Response +-- +-- /See:/ 'eventTagsListResponse' smart constructor. +data EventTagsListResponse = EventTagsListResponse + { _etlrKind :: !Text + , _etlrEventTags :: !(Maybe [Maybe EventTag]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etlrKind' +-- +-- * 'etlrEventTags' +eventTagsListResponse + :: EventTagsListResponse +eventTagsListResponse = + EventTagsListResponse + { _etlrKind = "dfareporting#eventTagsListResponse" + , _etlrEventTags = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#eventTagsListResponse\". +etlrKind :: Lens' EventTagsListResponse Text +etlrKind = lens _etlrKind (\ s a -> s{_etlrKind = a}) + +-- | Event tag collection. +etlrEventTags :: Lens' EventTagsListResponse [Maybe EventTag] +etlrEventTags + = lens _etlrEventTags + (\ s a -> s{_etlrEventTags = a}) + . _Default + . _Coerce + +instance FromJSON EventTagsListResponse where + parseJSON + = withObject "EventTagsListResponse" + (\ o -> + EventTagsListResponse <$> + (o .:? "kind" .!= + "dfareporting#eventTagsListResponse") + <*> (o .:? "eventTags" .!= mempty)) + +instance ToJSON EventTagsListResponse where + toJSON EventTagsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _etlrKind), + ("eventTags" .=) <$> _etlrEventTags]) + +-- | Identifies a creative which has been associated with a given campaign. +-- +-- /See:/ 'campaignCreativeAssociation' smart constructor. +data CampaignCreativeAssociation = CampaignCreativeAssociation + { _ccaKind :: !Text + , _ccaCreativeId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignCreativeAssociation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccaKind' +-- +-- * 'ccaCreativeId' +campaignCreativeAssociation + :: CampaignCreativeAssociation +campaignCreativeAssociation = + CampaignCreativeAssociation + { _ccaKind = "dfareporting#campaignCreativeAssociation" + , _ccaCreativeId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#campaignCreativeAssociation\". +ccaKind :: Lens' CampaignCreativeAssociation Text +ccaKind = lens _ccaKind (\ s a -> s{_ccaKind = a}) + +-- | ID of the creative associated with the campaign. This is a required +-- field. +ccaCreativeId :: Lens' CampaignCreativeAssociation (Maybe Int64) +ccaCreativeId + = lens _ccaCreativeId + (\ s a -> s{_ccaCreativeId = a}) + +instance FromJSON CampaignCreativeAssociation where + parseJSON + = withObject "CampaignCreativeAssociation" + (\ o -> + CampaignCreativeAssociation <$> + (o .:? "kind" .!= + "dfareporting#campaignCreativeAssociation") + <*> (o .:? "creativeId")) + +instance ToJSON CampaignCreativeAssociation where + toJSON CampaignCreativeAssociation{..} + = object + (catMaybes + [Just ("kind" .= _ccaKind), + ("creativeId" .=) <$> _ccaCreativeId]) + +-- | Gets a summary of active ads in an account. +-- +-- /See:/ 'accountActiveAdSummary' smart constructor. +data AccountActiveAdSummary = AccountActiveAdSummary + { _aaasAvailableAds :: !(Maybe Int64) + , _aaasKind :: !Text + , _aaasAccountId :: !(Maybe Int64) + , _aaasActiveAds :: !(Maybe Int64) + , _aaasActiveAdsLimitTier :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountActiveAdSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaasAvailableAds' +-- +-- * 'aaasKind' +-- +-- * 'aaasAccountId' +-- +-- * 'aaasActiveAds' +-- +-- * 'aaasActiveAdsLimitTier' +accountActiveAdSummary + :: AccountActiveAdSummary +accountActiveAdSummary = + AccountActiveAdSummary + { _aaasAvailableAds = Nothing + , _aaasKind = "dfareporting#accountActiveAdSummary" + , _aaasAccountId = Nothing + , _aaasActiveAds = Nothing + , _aaasActiveAdsLimitTier = Nothing + } + +-- | Ads that can be activated for the account. +aaasAvailableAds :: Lens' AccountActiveAdSummary (Maybe Int64) +aaasAvailableAds + = lens _aaasAvailableAds + (\ s a -> s{_aaasAvailableAds = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountActiveAdSummary\". +aaasKind :: Lens' AccountActiveAdSummary Text +aaasKind = lens _aaasKind (\ s a -> s{_aaasKind = a}) + +-- | ID of the account. +aaasAccountId :: Lens' AccountActiveAdSummary (Maybe Int64) +aaasAccountId + = lens _aaasAccountId + (\ s a -> s{_aaasAccountId = a}) + +-- | Ads that have been activated for the account +aaasActiveAds :: Lens' AccountActiveAdSummary (Maybe Int64) +aaasActiveAds + = lens _aaasActiveAds + (\ s a -> s{_aaasActiveAds = a}) + +-- | Maximum number of active ads allowed for the account. +aaasActiveAdsLimitTier :: Lens' AccountActiveAdSummary (Maybe Text) +aaasActiveAdsLimitTier + = lens _aaasActiveAdsLimitTier + (\ s a -> s{_aaasActiveAdsLimitTier = a}) + +instance FromJSON AccountActiveAdSummary where + parseJSON + = withObject "AccountActiveAdSummary" + (\ o -> + AccountActiveAdSummary <$> + (o .:? "availableAds") <*> + (o .:? "kind" .!= + "dfareporting#accountActiveAdSummary") + <*> (o .:? "accountId") + <*> (o .:? "activeAds") + <*> (o .:? "activeAdsLimitTier")) + +instance ToJSON AccountActiveAdSummary where + toJSON AccountActiveAdSummary{..} + = object + (catMaybes + [("availableAds" .=) <$> _aaasAvailableAds, + Just ("kind" .= _aaasKind), + ("accountId" .=) <$> _aaasAccountId, + ("activeAds" .=) <$> _aaasActiveAds, + ("activeAdsLimitTier" .=) <$> + _aaasActiveAdsLimitTier]) + +-- | Offset Position. +-- +-- /See:/ 'offsetPosition' smart constructor. +data OffsetPosition = OffsetPosition + { _opLeft :: !(Maybe Int32) + , _opTop :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OffsetPosition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opLeft' +-- +-- * 'opTop' +offsetPosition + :: OffsetPosition +offsetPosition = + OffsetPosition + { _opLeft = Nothing + , _opTop = Nothing + } + +-- | Offset distance from left side of an asset or a window. +opLeft :: Lens' OffsetPosition (Maybe Int32) +opLeft = lens _opLeft (\ s a -> s{_opLeft = a}) + +-- | Offset distance from top side of an asset or a window. +opTop :: Lens' OffsetPosition (Maybe Int32) +opTop = lens _opTop (\ s a -> s{_opTop = a}) + +instance FromJSON OffsetPosition where + parseJSON + = withObject "OffsetPosition" + (\ o -> + OffsetPosition <$> (o .:? "left") <*> (o .:? "top")) + +instance ToJSON OffsetPosition where + toJSON OffsetPosition{..} + = object + (catMaybes + [("left" .=) <$> _opLeft, ("top" .=) <$> _opTop]) + +-- | Publisher Dynamic Tag +-- +-- /See:/ 'floodlightActivityPublisherDynamicTag' smart constructor. +data FloodlightActivityPublisherDynamicTag = FloodlightActivityPublisherDynamicTag + { _fapdtClickThrough :: !(Maybe Bool) + , _fapdtSiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _fapdtDynamicTag :: !(Maybe (Maybe FloodlightActivityDynamicTag)) + , _fapdtDirectorySiteId :: !(Maybe Int64) + , _fapdtSiteId :: !(Maybe Int64) + , _fapdtViewThrough :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityPublisherDynamicTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fapdtClickThrough' +-- +-- * 'fapdtSiteIdDimensionValue' +-- +-- * 'fapdtDynamicTag' +-- +-- * 'fapdtDirectorySiteId' +-- +-- * 'fapdtSiteId' +-- +-- * 'fapdtViewThrough' +floodlightActivityPublisherDynamicTag + :: FloodlightActivityPublisherDynamicTag +floodlightActivityPublisherDynamicTag = + FloodlightActivityPublisherDynamicTag + { _fapdtClickThrough = Nothing + , _fapdtSiteIdDimensionValue = Nothing + , _fapdtDynamicTag = Nothing + , _fapdtDirectorySiteId = Nothing + , _fapdtSiteId = Nothing + , _fapdtViewThrough = Nothing + } + +-- | Whether this tag is applicable only for click-throughs. +fapdtClickThrough :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Bool) +fapdtClickThrough + = lens _fapdtClickThrough + (\ s a -> s{_fapdtClickThrough = a}) + +-- | Dimension value for the ID of the site. This is a read-only, +-- auto-generated field. +fapdtSiteIdDimensionValue :: Lens' FloodlightActivityPublisherDynamicTag (Maybe (Maybe DimensionValue)) +fapdtSiteIdDimensionValue + = lens _fapdtSiteIdDimensionValue + (\ s a -> s{_fapdtSiteIdDimensionValue = a}) + +-- | Dynamic floodlight tag. +fapdtDynamicTag :: Lens' FloodlightActivityPublisherDynamicTag (Maybe (Maybe FloodlightActivityDynamicTag)) +fapdtDynamicTag + = lens _fapdtDynamicTag + (\ s a -> s{_fapdtDynamicTag = a}) + +-- | Directory site ID of this dynamic tag. This is a write-only field that +-- can be used as an alternative to the siteId field. When this resource is +-- retrieved, only the siteId field will be populated. +fapdtDirectorySiteId :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Int64) +fapdtDirectorySiteId + = lens _fapdtDirectorySiteId + (\ s a -> s{_fapdtDirectorySiteId = a}) + +-- | Site ID of this dynamic tag. +fapdtSiteId :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Int64) +fapdtSiteId + = lens _fapdtSiteId (\ s a -> s{_fapdtSiteId = a}) + +-- | Whether this tag is applicable only for view-throughs. +fapdtViewThrough :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Bool) +fapdtViewThrough + = lens _fapdtViewThrough + (\ s a -> s{_fapdtViewThrough = a}) + +instance FromJSON + FloodlightActivityPublisherDynamicTag where + parseJSON + = withObject "FloodlightActivityPublisherDynamicTag" + (\ o -> + FloodlightActivityPublisherDynamicTag <$> + (o .:? "clickThrough") <*> + (o .:? "siteIdDimensionValue") + <*> (o .:? "dynamicTag") + <*> (o .:? "directorySiteId") + <*> (o .:? "siteId") + <*> (o .:? "viewThrough")) + +instance ToJSON FloodlightActivityPublisherDynamicTag + where + toJSON FloodlightActivityPublisherDynamicTag{..} + = object + (catMaybes + [("clickThrough" .=) <$> _fapdtClickThrough, + ("siteIdDimensionValue" .=) <$> + _fapdtSiteIdDimensionValue, + ("dynamicTag" .=) <$> _fapdtDynamicTag, + ("directorySiteId" .=) <$> _fapdtDirectorySiteId, + ("siteId" .=) <$> _fapdtSiteId, + ("viewThrough" .=) <$> _fapdtViewThrough]) + +-- | User Role List Response +-- +-- /See:/ 'userRolesListResponse' smart constructor. +data UserRolesListResponse = UserRolesListResponse + { _urlrNextPageToken :: !(Maybe Text) + , _urlrKind :: !Text + , _urlrUserRoles :: !(Maybe [Maybe UserRole]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlrNextPageToken' +-- +-- * 'urlrKind' +-- +-- * 'urlrUserRoles' +userRolesListResponse + :: UserRolesListResponse +userRolesListResponse = + UserRolesListResponse + { _urlrNextPageToken = Nothing + , _urlrKind = "dfareporting#userRolesListResponse" + , _urlrUserRoles = Nothing + } + +-- | Pagination token to be used for the next list operation. +urlrNextPageToken :: Lens' UserRolesListResponse (Maybe Text) +urlrNextPageToken + = lens _urlrNextPageToken + (\ s a -> s{_urlrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRolesListResponse\". +urlrKind :: Lens' UserRolesListResponse Text +urlrKind = lens _urlrKind (\ s a -> s{_urlrKind = a}) + +-- | User role collection. +urlrUserRoles :: Lens' UserRolesListResponse [Maybe UserRole] +urlrUserRoles + = lens _urlrUserRoles + (\ s a -> s{_urlrUserRoles = a}) + . _Default + . _Coerce + +instance FromJSON UserRolesListResponse where + parseJSON + = withObject "UserRolesListResponse" + (\ o -> + UserRolesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#userRolesListResponse") + <*> (o .:? "userRoles" .!= mempty)) + +instance ToJSON UserRolesListResponse where + toJSON UserRolesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _urlrNextPageToken, + Just ("kind" .= _urlrKind), + ("userRoles" .=) <$> _urlrUserRoles]) + +-- | Audience Segment. +-- +-- /See:/ 'audienceSegment' smart constructor. +data AudienceSegment = AudienceSegment + { _asName :: !(Maybe Text) + , _asId :: !(Maybe Int64) + , _asAllocation :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AudienceSegment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asName' +-- +-- * 'asId' +-- +-- * 'asAllocation' +audienceSegment + :: AudienceSegment +audienceSegment = + AudienceSegment + { _asName = Nothing + , _asId = Nothing + , _asAllocation = Nothing + } + +-- | Name of this audience segment. This is a required field and must be less +-- than 65 characters long. +asName :: Lens' AudienceSegment (Maybe Text) +asName = lens _asName (\ s a -> s{_asName = a}) + +-- | ID of this audience segment. This is a read-only, auto-generated field. +asId :: Lens' AudienceSegment (Maybe Int64) +asId = lens _asId (\ s a -> s{_asId = a}) + +-- | Weight allocated to this segment. Must be between 1 and 1000. The weight +-- assigned will be understood in proportion to the weights assigned to +-- other segments in the same segment group. +asAllocation :: Lens' AudienceSegment (Maybe Int32) +asAllocation + = lens _asAllocation (\ s a -> s{_asAllocation = a}) + +instance FromJSON AudienceSegment where + parseJSON + = withObject "AudienceSegment" + (\ o -> + AudienceSegment <$> + (o .:? "name") <*> (o .:? "id") <*> + (o .:? "allocation")) + +instance ToJSON AudienceSegment where + toJSON AudienceSegment{..} + = object + (catMaybes + [("name" .=) <$> _asName, ("id" .=) <$> _asId, + ("allocation" .=) <$> _asAllocation]) + +-- | Contains information about a city that can be targeted by ads. +-- +-- /See:/ 'city' smart constructor. +data City = City + { _citMetroCode :: !(Maybe Text) + , _citRegionCode :: !(Maybe Text) + , _citKind :: !Text + , _citRegionDartId :: !(Maybe Int64) + , _citMetroDmaId :: !(Maybe Int64) + , _citName :: !(Maybe Text) + , _citCountryCode :: !(Maybe Text) + , _citCountryDartId :: !(Maybe Int64) + , _citDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'City' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'citMetroCode' +-- +-- * 'citRegionCode' +-- +-- * 'citKind' +-- +-- * 'citRegionDartId' +-- +-- * 'citMetroDmaId' +-- +-- * 'citName' +-- +-- * 'citCountryCode' +-- +-- * 'citCountryDartId' +-- +-- * 'citDartId' +city + :: City +city = + City + { _citMetroCode = Nothing + , _citRegionCode = Nothing + , _citKind = "dfareporting#city" + , _citRegionDartId = Nothing + , _citMetroDmaId = Nothing + , _citName = Nothing + , _citCountryCode = Nothing + , _citCountryDartId = Nothing + , _citDartId = Nothing + } + +-- | Metro region code of the metro region (DMA) to which this city belongs. +citMetroCode :: Lens' City (Maybe Text) +citMetroCode + = lens _citMetroCode (\ s a -> s{_citMetroCode = a}) + +-- | Region code of the region to which this city belongs. +citRegionCode :: Lens' City (Maybe Text) +citRegionCode + = lens _citRegionCode + (\ s a -> s{_citRegionCode = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#city\". +citKind :: Lens' City Text +citKind = lens _citKind (\ s a -> s{_citKind = a}) + +-- | DART ID of the region to which this city belongs. +citRegionDartId :: Lens' City (Maybe Int64) +citRegionDartId + = lens _citRegionDartId + (\ s a -> s{_citRegionDartId = a}) + +-- | ID of the metro region (DMA) to which this city belongs. +citMetroDmaId :: Lens' City (Maybe Int64) +citMetroDmaId + = lens _citMetroDmaId + (\ s a -> s{_citMetroDmaId = a}) + +-- | Name of this city. +citName :: Lens' City (Maybe Text) +citName = lens _citName (\ s a -> s{_citName = a}) + +-- | Country code of the country to which this city belongs. +citCountryCode :: Lens' City (Maybe Text) +citCountryCode + = lens _citCountryCode + (\ s a -> s{_citCountryCode = a}) + +-- | DART ID of the country to which this city belongs. +citCountryDartId :: Lens' City (Maybe Int64) +citCountryDartId + = lens _citCountryDartId + (\ s a -> s{_citCountryDartId = a}) + +-- | DART ID of this city. This is the ID used for targeting and generating +-- reports. +citDartId :: Lens' City (Maybe Int64) +citDartId + = lens _citDartId (\ s a -> s{_citDartId = a}) + +instance FromJSON City where + parseJSON + = withObject "City" + (\ o -> + City <$> + (o .:? "metroCode") <*> (o .:? "regionCode") <*> + (o .:? "kind" .!= "dfareporting#city") + <*> (o .:? "regionDartId") + <*> (o .:? "metroDmaId") + <*> (o .:? "name") + <*> (o .:? "countryCode") + <*> (o .:? "countryDartId") + <*> (o .:? "dartId")) + +instance ToJSON City where + toJSON City{..} + = object + (catMaybes + [("metroCode" .=) <$> _citMetroCode, + ("regionCode" .=) <$> _citRegionCode, + Just ("kind" .= _citKind), + ("regionDartId" .=) <$> _citRegionDartId, + ("metroDmaId" .=) <$> _citMetroDmaId, + ("name" .=) <$> _citName, + ("countryCode" .=) <$> _citCountryCode, + ("countryDartId" .=) <$> _citCountryDartId, + ("dartId" .=) <$> _citDartId]) + +-- | Popup Window Properties. +-- +-- /See:/ 'popupWindowProperties' smart constructor. +data PopupWindowProperties = PopupWindowProperties + { _pwpOffset :: !(Maybe (Maybe OffsetPosition)) + , _pwpDimension :: !(Maybe (Maybe Size)) + , _pwpShowStatusBar :: !(Maybe Bool) + , _pwpShowMenuBar :: !(Maybe Bool) + , _pwpPositionType :: !(Maybe Text) + , _pwpShowAddressBar :: !(Maybe Bool) + , _pwpShowScrollBar :: !(Maybe Bool) + , _pwpShowToolBar :: !(Maybe Bool) + , _pwpTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PopupWindowProperties' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pwpOffset' +-- +-- * 'pwpDimension' +-- +-- * 'pwpShowStatusBar' +-- +-- * 'pwpShowMenuBar' +-- +-- * 'pwpPositionType' +-- +-- * 'pwpShowAddressBar' +-- +-- * 'pwpShowScrollBar' +-- +-- * 'pwpShowToolBar' +-- +-- * 'pwpTitle' +popupWindowProperties + :: PopupWindowProperties +popupWindowProperties = + PopupWindowProperties + { _pwpOffset = Nothing + , _pwpDimension = Nothing + , _pwpShowStatusBar = Nothing + , _pwpShowMenuBar = Nothing + , _pwpPositionType = Nothing + , _pwpShowAddressBar = Nothing + , _pwpShowScrollBar = Nothing + , _pwpShowToolBar = Nothing + , _pwpTitle = Nothing + } + +-- | Upper-left corner coordinates of the popup window. Applicable if +-- positionType is COORDINATES. +pwpOffset :: Lens' PopupWindowProperties (Maybe (Maybe OffsetPosition)) +pwpOffset + = lens _pwpOffset (\ s a -> s{_pwpOffset = a}) + +-- | Popup dimension for a creative. This is a read-only field. Applicable to +-- the following creative types: all RICH_MEDIA and all VPAID +pwpDimension :: Lens' PopupWindowProperties (Maybe (Maybe Size)) +pwpDimension + = lens _pwpDimension (\ s a -> s{_pwpDimension = a}) + +-- | Whether to display the browser status bar. +pwpShowStatusBar :: Lens' PopupWindowProperties (Maybe Bool) +pwpShowStatusBar + = lens _pwpShowStatusBar + (\ s a -> s{_pwpShowStatusBar = a}) + +-- | Whether to display the browser menu bar. +pwpShowMenuBar :: Lens' PopupWindowProperties (Maybe Bool) +pwpShowMenuBar + = lens _pwpShowMenuBar + (\ s a -> s{_pwpShowMenuBar = a}) + +-- | Popup window position either centered or at specific coordinate. +pwpPositionType :: Lens' PopupWindowProperties (Maybe Text) +pwpPositionType + = lens _pwpPositionType + (\ s a -> s{_pwpPositionType = a}) + +-- | Whether to display the browser address bar. +pwpShowAddressBar :: Lens' PopupWindowProperties (Maybe Bool) +pwpShowAddressBar + = lens _pwpShowAddressBar + (\ s a -> s{_pwpShowAddressBar = a}) + +-- | Whether to display the browser scroll bar. +pwpShowScrollBar :: Lens' PopupWindowProperties (Maybe Bool) +pwpShowScrollBar + = lens _pwpShowScrollBar + (\ s a -> s{_pwpShowScrollBar = a}) + +-- | Whether to display the browser tool bar. +pwpShowToolBar :: Lens' PopupWindowProperties (Maybe Bool) +pwpShowToolBar + = lens _pwpShowToolBar + (\ s a -> s{_pwpShowToolBar = a}) + +-- | Title of popup window. +pwpTitle :: Lens' PopupWindowProperties (Maybe Text) +pwpTitle = lens _pwpTitle (\ s a -> s{_pwpTitle = a}) + +instance FromJSON PopupWindowProperties where + parseJSON + = withObject "PopupWindowProperties" + (\ o -> + PopupWindowProperties <$> + (o .:? "offset") <*> (o .:? "dimension") <*> + (o .:? "showStatusBar") + <*> (o .:? "showMenuBar") + <*> (o .:? "positionType") + <*> (o .:? "showAddressBar") + <*> (o .:? "showScrollBar") + <*> (o .:? "showToolBar") + <*> (o .:? "title")) + +instance ToJSON PopupWindowProperties where + toJSON PopupWindowProperties{..} + = object + (catMaybes + [("offset" .=) <$> _pwpOffset, + ("dimension" .=) <$> _pwpDimension, + ("showStatusBar" .=) <$> _pwpShowStatusBar, + ("showMenuBar" .=) <$> _pwpShowMenuBar, + ("positionType" .=) <$> _pwpPositionType, + ("showAddressBar" .=) <$> _pwpShowAddressBar, + ("showScrollBar" .=) <$> _pwpShowScrollBar, + ("showToolBar" .=) <$> _pwpShowToolBar, + ("title" .=) <$> _pwpTitle]) + +-- | Key Value Targeting Expression. +-- +-- /See:/ 'keyValueTargetingExpression' smart constructor. +newtype KeyValueTargetingExpression = KeyValueTargetingExpression + { _kvteExpression :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KeyValueTargetingExpression' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'kvteExpression' +keyValueTargetingExpression + :: KeyValueTargetingExpression +keyValueTargetingExpression = + KeyValueTargetingExpression + { _kvteExpression = Nothing + } + +-- | Keyword expression being targeted by the ad. +kvteExpression :: Lens' KeyValueTargetingExpression (Maybe Text) +kvteExpression + = lens _kvteExpression + (\ s a -> s{_kvteExpression = a}) + +instance FromJSON KeyValueTargetingExpression where + parseJSON + = withObject "KeyValueTargetingExpression" + (\ o -> + KeyValueTargetingExpression <$> (o .:? "expression")) + +instance ToJSON KeyValueTargetingExpression where + toJSON KeyValueTargetingExpression{..} + = object + (catMaybes [("expression" .=) <$> _kvteExpression]) + +-- | DFP Settings +-- +-- /See:/ 'dfpSettings' smart constructor. +data DfpSettings = DfpSettings + { _dsPubPaidPlacementAccepted :: !(Maybe Bool) + , _dsDfpNetworkName :: !(Maybe Text) + , _dsPublisherPortalOnly :: !(Maybe Bool) + , _dsProgrammaticPlacementAccepted :: !(Maybe Bool) + , _dsDfpNetworkCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DfpSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsPubPaidPlacementAccepted' +-- +-- * 'dsDfpNetworkName' +-- +-- * 'dsPublisherPortalOnly' +-- +-- * 'dsProgrammaticPlacementAccepted' +-- +-- * 'dsDfpNetworkCode' +dfpSettings + :: DfpSettings +dfpSettings = + DfpSettings + { _dsPubPaidPlacementAccepted = Nothing + , _dsDfpNetworkName = Nothing + , _dsPublisherPortalOnly = Nothing + , _dsProgrammaticPlacementAccepted = Nothing + , _dsDfpNetworkCode = Nothing + } + +-- | Whether this directory site accepts publisher-paid tags. +dsPubPaidPlacementAccepted :: Lens' DfpSettings (Maybe Bool) +dsPubPaidPlacementAccepted + = lens _dsPubPaidPlacementAccepted + (\ s a -> s{_dsPubPaidPlacementAccepted = a}) + +-- | DFP network name for this directory site. +dsDfpNetworkName :: Lens' DfpSettings (Maybe Text) +dsDfpNetworkName + = lens _dsDfpNetworkName + (\ s a -> s{_dsDfpNetworkName = a}) + +-- | Whether this directory site is available only via DoubleClick Publisher +-- Portal. +dsPublisherPortalOnly :: Lens' DfpSettings (Maybe Bool) +dsPublisherPortalOnly + = lens _dsPublisherPortalOnly + (\ s a -> s{_dsPublisherPortalOnly = a}) + +-- | Whether this directory site accepts programmatic placements. +dsProgrammaticPlacementAccepted :: Lens' DfpSettings (Maybe Bool) +dsProgrammaticPlacementAccepted + = lens _dsProgrammaticPlacementAccepted + (\ s a -> s{_dsProgrammaticPlacementAccepted = a}) + +-- | DFP network code for this directory site. +dsDfpNetworkCode :: Lens' DfpSettings (Maybe Text) +dsDfpNetworkCode + = lens _dsDfpNetworkCode + (\ s a -> s{_dsDfpNetworkCode = a}) + +instance FromJSON DfpSettings where + parseJSON + = withObject "DfpSettings" + (\ o -> + DfpSettings <$> + (o .:? "pubPaidPlacementAccepted") <*> + (o .:? "dfp_network_name") + <*> (o .:? "publisherPortalOnly") + <*> (o .:? "programmaticPlacementAccepted") + <*> (o .:? "dfp_network_code")) + +instance ToJSON DfpSettings where + toJSON DfpSettings{..} + = object + (catMaybes + [("pubPaidPlacementAccepted" .=) <$> + _dsPubPaidPlacementAccepted, + ("dfp_network_name" .=) <$> _dsDfpNetworkName, + ("publisherPortalOnly" .=) <$> + _dsPublisherPortalOnly, + ("programmaticPlacementAccepted" .=) <$> + _dsProgrammaticPlacementAccepted, + ("dfp_network_code" .=) <$> _dsDfpNetworkCode]) + +-- | Advertiser List Response +-- +-- /See:/ 'advertisersListResponse' smart constructor. +data AdvertisersListResponse = AdvertisersListResponse + { _advNextPageToken :: !(Maybe Text) + , _advKind :: !Text + , _advAdvertisers :: !(Maybe [Maybe Advertiser]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'advNextPageToken' +-- +-- * 'advKind' +-- +-- * 'advAdvertisers' +advertisersListResponse + :: AdvertisersListResponse +advertisersListResponse = + AdvertisersListResponse + { _advNextPageToken = Nothing + , _advKind = "dfareporting#advertisersListResponse" + , _advAdvertisers = Nothing + } + +-- | Pagination token to be used for the next list operation. +advNextPageToken :: Lens' AdvertisersListResponse (Maybe Text) +advNextPageToken + = lens _advNextPageToken + (\ s a -> s{_advNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#advertisersListResponse\". +advKind :: Lens' AdvertisersListResponse Text +advKind = lens _advKind (\ s a -> s{_advKind = a}) + +-- | Advertiser collection. +advAdvertisers :: Lens' AdvertisersListResponse [Maybe Advertiser] +advAdvertisers + = lens _advAdvertisers + (\ s a -> s{_advAdvertisers = a}) + . _Default + . _Coerce + +instance FromJSON AdvertisersListResponse where + parseJSON + = withObject "AdvertisersListResponse" + (\ o -> + AdvertisersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#advertisersListResponse") + <*> (o .:? "advertisers" .!= mempty)) + +instance ToJSON AdvertisersListResponse where + toJSON AdvertisersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _advNextPageToken, + Just ("kind" .= _advKind), + ("advertisers" .=) <$> _advAdvertisers]) + +-- | Country List Response +-- +-- /See:/ 'countriesListResponse' smart constructor. +data CountriesListResponse = CountriesListResponse + { _couoKind :: !Text + , _couoCountries :: !(Maybe [Maybe Country]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CountriesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'couoKind' +-- +-- * 'couoCountries' +countriesListResponse + :: CountriesListResponse +countriesListResponse = + CountriesListResponse + { _couoKind = "dfareporting#countriesListResponse" + , _couoCountries = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#countriesListResponse\". +couoKind :: Lens' CountriesListResponse Text +couoKind = lens _couoKind (\ s a -> s{_couoKind = a}) + +-- | Country collection. +couoCountries :: Lens' CountriesListResponse [Maybe Country] +couoCountries + = lens _couoCountries + (\ s a -> s{_couoCountries = a}) + . _Default + . _Coerce + +instance FromJSON CountriesListResponse where + parseJSON + = withObject "CountriesListResponse" + (\ o -> + CountriesListResponse <$> + (o .:? "kind" .!= + "dfareporting#countriesListResponse") + <*> (o .:? "countries" .!= mempty)) + +instance ToJSON CountriesListResponse where + toJSON CountriesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _couoKind), + ("countries" .=) <$> _couoCountries]) + +-- | Represents a response to the queryCompatibleFields method. +-- +-- /See:/ 'compatibleFields' smart constructor. +data CompatibleFields = CompatibleFields + { _cfReachReportCompatibleFields :: !(Maybe (Maybe ReachReportCompatibleFields)) + , _cfCrossDimensionReachReportCompatibleFields :: !(Maybe (Maybe CrossDimensionReachReportCompatibleFields)) + , _cfKind :: !Text + , _cfFloodlightReportCompatibleFields :: !(Maybe (Maybe FloodlightReportCompatibleFields)) + , _cfReportCompatibleFields :: !(Maybe (Maybe ReportCompatibleFields)) + , _cfPathToConversionReportCompatibleFields :: !(Maybe (Maybe PathToConversionReportCompatibleFields)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfReachReportCompatibleFields' +-- +-- * 'cfCrossDimensionReachReportCompatibleFields' +-- +-- * 'cfKind' +-- +-- * 'cfFloodlightReportCompatibleFields' +-- +-- * 'cfReportCompatibleFields' +-- +-- * 'cfPathToConversionReportCompatibleFields' +compatibleFields + :: CompatibleFields +compatibleFields = + CompatibleFields + { _cfReachReportCompatibleFields = Nothing + , _cfCrossDimensionReachReportCompatibleFields = Nothing + , _cfKind = "dfareporting#compatibleFields" + , _cfFloodlightReportCompatibleFields = Nothing + , _cfReportCompatibleFields = Nothing + , _cfPathToConversionReportCompatibleFields = Nothing + } + +-- | Contains items that are compatible to be selected for a report of type +-- \"REACH\". +cfReachReportCompatibleFields :: Lens' CompatibleFields (Maybe (Maybe ReachReportCompatibleFields)) +cfReachReportCompatibleFields + = lens _cfReachReportCompatibleFields + (\ s a -> s{_cfReachReportCompatibleFields = a}) + +-- | Contains items that are compatible to be selected for a report of type +-- \"CROSS_DIMENSION_REACH\". +cfCrossDimensionReachReportCompatibleFields :: Lens' CompatibleFields (Maybe (Maybe CrossDimensionReachReportCompatibleFields)) +cfCrossDimensionReachReportCompatibleFields + = lens _cfCrossDimensionReachReportCompatibleFields + (\ s a -> + s{_cfCrossDimensionReachReportCompatibleFields = a}) + +-- | The kind of resource this is, in this case +-- dfareporting#compatibleFields. +cfKind :: Lens' CompatibleFields Text +cfKind = lens _cfKind (\ s a -> s{_cfKind = a}) + +-- | Contains items that are compatible to be selected for a report of type +-- \"FLOODLIGHT\". +cfFloodlightReportCompatibleFields :: Lens' CompatibleFields (Maybe (Maybe FloodlightReportCompatibleFields)) +cfFloodlightReportCompatibleFields + = lens _cfFloodlightReportCompatibleFields + (\ s a -> s{_cfFloodlightReportCompatibleFields = a}) + +-- | Contains items that are compatible to be selected for a report of type +-- \"STANDARD\". +cfReportCompatibleFields :: Lens' CompatibleFields (Maybe (Maybe ReportCompatibleFields)) +cfReportCompatibleFields + = lens _cfReportCompatibleFields + (\ s a -> s{_cfReportCompatibleFields = a}) + +-- | Contains items that are compatible to be selected for a report of type +-- \"PATH_TO_CONVERSION\". +cfPathToConversionReportCompatibleFields :: Lens' CompatibleFields (Maybe (Maybe PathToConversionReportCompatibleFields)) +cfPathToConversionReportCompatibleFields + = lens _cfPathToConversionReportCompatibleFields + (\ s a -> + s{_cfPathToConversionReportCompatibleFields = a}) + +instance FromJSON CompatibleFields where + parseJSON + = withObject "CompatibleFields" + (\ o -> + CompatibleFields <$> + (o .:? "reachReportCompatibleFields") <*> + (o .:? "crossDimensionReachReportCompatibleFields") + <*> + (o .:? "kind" .!= "dfareporting#compatibleFields") + <*> (o .:? "floodlightReportCompatibleFields") + <*> (o .:? "reportCompatibleFields") + <*> (o .:? "pathToConversionReportCompatibleFields")) + +instance ToJSON CompatibleFields where + toJSON CompatibleFields{..} + = object + (catMaybes + [("reachReportCompatibleFields" .=) <$> + _cfReachReportCompatibleFields, + ("crossDimensionReachReportCompatibleFields" .=) <$> + _cfCrossDimensionReachReportCompatibleFields, + Just ("kind" .= _cfKind), + ("floodlightReportCompatibleFields" .=) <$> + _cfFloodlightReportCompatibleFields, + ("reportCompatibleFields" .=) <$> + _cfReportCompatibleFields, + ("pathToConversionReportCompatibleFields" .=) <$> + _cfPathToConversionReportCompatibleFields]) + +-- | Account Permission Group List Response +-- +-- /See:/ 'accountPermissionGroupsListResponse' smart constructor. +data AccountPermissionGroupsListResponse = AccountPermissionGroupsListResponse + { _apglrKind :: !Text + , _apglrAccountPermissionGroups :: !(Maybe [Maybe AccountPermissionGroup]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apglrKind' +-- +-- * 'apglrAccountPermissionGroups' +accountPermissionGroupsListResponse + :: AccountPermissionGroupsListResponse +accountPermissionGroupsListResponse = + AccountPermissionGroupsListResponse + { _apglrKind = "dfareporting#accountPermissionGroupsListResponse" + , _apglrAccountPermissionGroups = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountPermissionGroupsListResponse\". +apglrKind :: Lens' AccountPermissionGroupsListResponse Text +apglrKind + = lens _apglrKind (\ s a -> s{_apglrKind = a}) + +-- | Account permission group collection. +apglrAccountPermissionGroups :: Lens' AccountPermissionGroupsListResponse [Maybe AccountPermissionGroup] +apglrAccountPermissionGroups + = lens _apglrAccountPermissionGroups + (\ s a -> s{_apglrAccountPermissionGroups = a}) + . _Default + . _Coerce + +instance FromJSON AccountPermissionGroupsListResponse + where + parseJSON + = withObject "AccountPermissionGroupsListResponse" + (\ o -> + AccountPermissionGroupsListResponse <$> + (o .:? "kind" .!= + "dfareporting#accountPermissionGroupsListResponse") + <*> (o .:? "accountPermissionGroups" .!= mempty)) + +instance ToJSON AccountPermissionGroupsListResponse + where + toJSON AccountPermissionGroupsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _apglrKind), + ("accountPermissionGroups" .=) <$> + _apglrAccountPermissionGroups]) + +-- | Represents fields that are compatible to be selected for a report of +-- type \"PATH_TO_CONVERSION\". +-- +-- /See:/ 'pathToConversionReportCompatibleFields' smart constructor. +data PathToConversionReportCompatibleFields = PathToConversionReportCompatibleFields + { _ptcrcfMetrics :: !(Maybe [Maybe Metric]) + , _ptcrcfKind :: !Text + , _ptcrcfConversionDimensions :: !(Maybe [Maybe Dimension]) + , _ptcrcfCustomFloodlightVariables :: !(Maybe [Maybe Dimension]) + , _ptcrcfPerInteractionDimensions :: !(Maybe [Maybe Dimension]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PathToConversionReportCompatibleFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptcrcfMetrics' +-- +-- * 'ptcrcfKind' +-- +-- * 'ptcrcfConversionDimensions' +-- +-- * 'ptcrcfCustomFloodlightVariables' +-- +-- * 'ptcrcfPerInteractionDimensions' +pathToConversionReportCompatibleFields + :: PathToConversionReportCompatibleFields +pathToConversionReportCompatibleFields = + PathToConversionReportCompatibleFields + { _ptcrcfMetrics = Nothing + , _ptcrcfKind = "dfareporting#pathToConversionReportCompatibleFields" + , _ptcrcfConversionDimensions = Nothing + , _ptcrcfCustomFloodlightVariables = Nothing + , _ptcrcfPerInteractionDimensions = Nothing + } + +-- | Metrics which are compatible to be selected in the \"metricNames\" +-- section of the report. +ptcrcfMetrics :: Lens' PathToConversionReportCompatibleFields [Maybe Metric] +ptcrcfMetrics + = lens _ptcrcfMetrics + (\ s a -> s{_ptcrcfMetrics = a}) + . _Default + . _Coerce + +-- | The kind of resource this is, in this case +-- dfareporting#pathToConversionReportCompatibleFields. +ptcrcfKind :: Lens' PathToConversionReportCompatibleFields Text +ptcrcfKind + = lens _ptcrcfKind (\ s a -> s{_ptcrcfKind = a}) + +-- | Conversion dimensions which are compatible to be selected in the +-- \"conversionDimensions\" section of the report. +ptcrcfConversionDimensions :: Lens' PathToConversionReportCompatibleFields [Maybe Dimension] +ptcrcfConversionDimensions + = lens _ptcrcfConversionDimensions + (\ s a -> s{_ptcrcfConversionDimensions = a}) + . _Default + . _Coerce + +-- | Custom floodlight variables which are compatible to be selected in the +-- \"customFloodlightVariables\" section of the report. +ptcrcfCustomFloodlightVariables :: Lens' PathToConversionReportCompatibleFields [Maybe Dimension] +ptcrcfCustomFloodlightVariables + = lens _ptcrcfCustomFloodlightVariables + (\ s a -> s{_ptcrcfCustomFloodlightVariables = a}) + . _Default + . _Coerce + +-- | Per-interaction dimensions which are compatible to be selected in the +-- \"perInteractionDimensions\" section of the report. +ptcrcfPerInteractionDimensions :: Lens' PathToConversionReportCompatibleFields [Maybe Dimension] +ptcrcfPerInteractionDimensions + = lens _ptcrcfPerInteractionDimensions + (\ s a -> s{_ptcrcfPerInteractionDimensions = a}) + . _Default + . _Coerce + +instance FromJSON + PathToConversionReportCompatibleFields where + parseJSON + = withObject "PathToConversionReportCompatibleFields" + (\ o -> + PathToConversionReportCompatibleFields <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#pathToConversionReportCompatibleFields") + <*> (o .:? "conversionDimensions" .!= mempty) + <*> (o .:? "customFloodlightVariables" .!= mempty) + <*> (o .:? "perInteractionDimensions" .!= mempty)) + +instance ToJSON + PathToConversionReportCompatibleFields where + toJSON PathToConversionReportCompatibleFields{..} + = object + (catMaybes + [("metrics" .=) <$> _ptcrcfMetrics, + Just ("kind" .= _ptcrcfKind), + ("conversionDimensions" .=) <$> + _ptcrcfConversionDimensions, + ("customFloodlightVariables" .=) <$> + _ptcrcfCustomFloodlightVariables, + ("perInteractionDimensions" .=) <$> + _ptcrcfPerInteractionDimensions]) + +-- | Companion Click-through override. +-- +-- /See:/ 'companionClickThroughOverride' smart constructor. +data CompanionClickThroughOverride = CompanionClickThroughOverride + { _cctoCreativeId :: !(Maybe Int64) + , _cctoClickThroughUrl :: !(Maybe (Maybe ClickThroughURL)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompanionClickThroughOverride' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cctoCreativeId' +-- +-- * 'cctoClickThroughUrl' +companionClickThroughOverride + :: CompanionClickThroughOverride +companionClickThroughOverride = + CompanionClickThroughOverride + { _cctoCreativeId = Nothing + , _cctoClickThroughUrl = Nothing + } + +-- | ID of the creative for this companion click-through override. +cctoCreativeId :: Lens' CompanionClickThroughOverride (Maybe Int64) +cctoCreativeId + = lens _cctoCreativeId + (\ s a -> s{_cctoCreativeId = a}) + +-- | Click-through URL of this companion click-through override. +cctoClickThroughUrl :: Lens' CompanionClickThroughOverride (Maybe (Maybe ClickThroughURL)) +cctoClickThroughUrl + = lens _cctoClickThroughUrl + (\ s a -> s{_cctoClickThroughUrl = a}) + +instance FromJSON CompanionClickThroughOverride where + parseJSON + = withObject "CompanionClickThroughOverride" + (\ o -> + CompanionClickThroughOverride <$> + (o .:? "creativeId") <*> (o .:? "clickThroughUrl")) + +instance ToJSON CompanionClickThroughOverride where + toJSON CompanionClickThroughOverride{..} + = object + (catMaybes + [("creativeId" .=) <$> _cctoCreativeId, + ("clickThroughUrl" .=) <$> _cctoClickThroughUrl]) + +-- | Contains information about a platform type that can be targeted by ads. +-- +-- /See:/ 'platformType' smart constructor. +data PlatformType = PlatformType + { _ptKind :: !Text + , _ptName :: !(Maybe Text) + , _ptId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlatformType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptKind' +-- +-- * 'ptName' +-- +-- * 'ptId' +platformType + :: PlatformType +platformType = + PlatformType + { _ptKind = "dfareporting#platformType" + , _ptName = Nothing + , _ptId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#platformType\". +ptKind :: Lens' PlatformType Text +ptKind = lens _ptKind (\ s a -> s{_ptKind = a}) + +-- | Name of this platform type. +ptName :: Lens' PlatformType (Maybe Text) +ptName = lens _ptName (\ s a -> s{_ptName = a}) + +-- | ID of this platform type. +ptId :: Lens' PlatformType (Maybe Int64) +ptId = lens _ptId (\ s a -> s{_ptId = a}) + +instance FromJSON PlatformType where + parseJSON + = withObject "PlatformType" + (\ o -> + PlatformType <$> + (o .:? "kind" .!= "dfareporting#platformType") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON PlatformType where + toJSON PlatformType{..} + = object + (catMaybes + [Just ("kind" .= _ptKind), ("name" .=) <$> _ptName, + ("id" .=) <$> _ptId]) + +-- | Contains properties of a targetable remarketing list. Remarketing +-- enables you to create lists of users who have performed specific actions +-- on a site, then target ads to members of those lists. This resource is a +-- read-only view of a remarketing list to be used to faciliate targeting +-- ads to specific lists. Remarketing lists that are owned by your +-- advertisers and those that are shared to your advertisers or account are +-- accessible via this resource. To manage remarketing lists that are owned +-- by your advertisers, use the RemarketingLists resource. +-- +-- /See:/ 'targetableRemarketingList' smart constructor. +data TargetableRemarketingList = TargetableRemarketingList + { _trlListSize :: !(Maybe Int64) + , _trlLifeSpan :: !(Maybe Int64) + , _trlKind :: !Text + , _trlAdvertiserId :: !(Maybe Int64) + , _trlAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _trlActive :: !(Maybe Bool) + , _trlAccountId :: !(Maybe Int64) + , _trlName :: !(Maybe Text) + , _trlListSource :: !(Maybe Text) + , _trlId :: !(Maybe Int64) + , _trlSubaccountId :: !(Maybe Int64) + , _trlDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetableRemarketingList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trlListSize' +-- +-- * 'trlLifeSpan' +-- +-- * 'trlKind' +-- +-- * 'trlAdvertiserId' +-- +-- * 'trlAdvertiserIdDimensionValue' +-- +-- * 'trlActive' +-- +-- * 'trlAccountId' +-- +-- * 'trlName' +-- +-- * 'trlListSource' +-- +-- * 'trlId' +-- +-- * 'trlSubaccountId' +-- +-- * 'trlDescription' +targetableRemarketingList + :: TargetableRemarketingList +targetableRemarketingList = + TargetableRemarketingList + { _trlListSize = Nothing + , _trlLifeSpan = Nothing + , _trlKind = "dfareporting#targetableRemarketingList" + , _trlAdvertiserId = Nothing + , _trlAdvertiserIdDimensionValue = Nothing + , _trlActive = Nothing + , _trlAccountId = Nothing + , _trlName = Nothing + , _trlListSource = Nothing + , _trlId = Nothing + , _trlSubaccountId = Nothing + , _trlDescription = Nothing + } + +-- | Number of users currently in the list. This is a read-only field. +trlListSize :: Lens' TargetableRemarketingList (Maybe Int64) +trlListSize + = lens _trlListSize (\ s a -> s{_trlListSize = a}) + +-- | Number of days that a user should remain in the targetable remarketing +-- list without an impression. +trlLifeSpan :: Lens' TargetableRemarketingList (Maybe Int64) +trlLifeSpan + = lens _trlLifeSpan (\ s a -> s{_trlLifeSpan = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#targetableRemarketingList\". +trlKind :: Lens' TargetableRemarketingList Text +trlKind = lens _trlKind (\ s a -> s{_trlKind = a}) + +-- | Dimension value for the advertiser ID that owns this targetable +-- remarketing list. +trlAdvertiserId :: Lens' TargetableRemarketingList (Maybe Int64) +trlAdvertiserId + = lens _trlAdvertiserId + (\ s a -> s{_trlAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. +trlAdvertiserIdDimensionValue :: Lens' TargetableRemarketingList (Maybe (Maybe DimensionValue)) +trlAdvertiserIdDimensionValue + = lens _trlAdvertiserIdDimensionValue + (\ s a -> s{_trlAdvertiserIdDimensionValue = a}) + +-- | Whether this targetable remarketing list is active. +trlActive :: Lens' TargetableRemarketingList (Maybe Bool) +trlActive + = lens _trlActive (\ s a -> s{_trlActive = a}) + +-- | Account ID of this remarketing list. This is a read-only, auto-generated +-- field that is only returned in GET requests. +trlAccountId :: Lens' TargetableRemarketingList (Maybe Int64) +trlAccountId + = lens _trlAccountId (\ s a -> s{_trlAccountId = a}) + +-- | Name of the targetable remarketing list. Is no greater than 128 +-- characters long. +trlName :: Lens' TargetableRemarketingList (Maybe Text) +trlName = lens _trlName (\ s a -> s{_trlName = a}) + +-- | Product from which this targetable remarketing list was originated. +trlListSource :: Lens' TargetableRemarketingList (Maybe Text) +trlListSource + = lens _trlListSource + (\ s a -> s{_trlListSource = a}) + +-- | Targetable remarketing list ID. +trlId :: Lens' TargetableRemarketingList (Maybe Int64) +trlId = lens _trlId (\ s a -> s{_trlId = a}) + +-- | Subaccount ID of this remarketing list. This is a read-only, +-- auto-generated field that is only returned in GET requests. +trlSubaccountId :: Lens' TargetableRemarketingList (Maybe Int64) +trlSubaccountId + = lens _trlSubaccountId + (\ s a -> s{_trlSubaccountId = a}) + +-- | Targetable remarketing list description. +trlDescription :: Lens' TargetableRemarketingList (Maybe Text) +trlDescription + = lens _trlDescription + (\ s a -> s{_trlDescription = a}) + +instance FromJSON TargetableRemarketingList where + parseJSON + = withObject "TargetableRemarketingList" + (\ o -> + TargetableRemarketingList <$> + (o .:? "listSize") <*> (o .:? "lifeSpan") <*> + (o .:? "kind" .!= + "dfareporting#targetableRemarketingList") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "active") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "listSource") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "description")) + +instance ToJSON TargetableRemarketingList where + toJSON TargetableRemarketingList{..} + = object + (catMaybes + [("listSize" .=) <$> _trlListSize, + ("lifeSpan" .=) <$> _trlLifeSpan, + Just ("kind" .= _trlKind), + ("advertiserId" .=) <$> _trlAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _trlAdvertiserIdDimensionValue, + ("active" .=) <$> _trlActive, + ("accountId" .=) <$> _trlAccountId, + ("name" .=) <$> _trlName, + ("listSource" .=) <$> _trlListSource, + ("id" .=) <$> _trlId, + ("subaccountId" .=) <$> _trlSubaccountId, + ("description" .=) <$> _trlDescription]) + +-- | Contains information about a particular version of an operating system +-- that can be targeted by ads. +-- +-- /See:/ 'operatingSystemVersion' smart constructor. +data OperatingSystemVersion = OperatingSystemVersion + { _osvMinorVersion :: !(Maybe Text) + , _osvKind :: !Text + , _osvOperatingSystem :: !(Maybe (Maybe OperatingSystem)) + , _osvMajorVersion :: !(Maybe Text) + , _osvName :: !(Maybe Text) + , _osvId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemVersion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osvMinorVersion' +-- +-- * 'osvKind' +-- +-- * 'osvOperatingSystem' +-- +-- * 'osvMajorVersion' +-- +-- * 'osvName' +-- +-- * 'osvId' +operatingSystemVersion + :: OperatingSystemVersion +operatingSystemVersion = + OperatingSystemVersion + { _osvMinorVersion = Nothing + , _osvKind = "dfareporting#operatingSystemVersion" + , _osvOperatingSystem = Nothing + , _osvMajorVersion = Nothing + , _osvName = Nothing + , _osvId = Nothing + } + +-- | Minor version (number after the first dot) of this operating system +-- version. +osvMinorVersion :: Lens' OperatingSystemVersion (Maybe Text) +osvMinorVersion + = lens _osvMinorVersion + (\ s a -> s{_osvMinorVersion = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#operatingSystemVersion\". +osvKind :: Lens' OperatingSystemVersion Text +osvKind = lens _osvKind (\ s a -> s{_osvKind = a}) + +-- | Operating system of this operating system version. +osvOperatingSystem :: Lens' OperatingSystemVersion (Maybe (Maybe OperatingSystem)) +osvOperatingSystem + = lens _osvOperatingSystem + (\ s a -> s{_osvOperatingSystem = a}) + +-- | Major version (leftmost number) of this operating system version. +osvMajorVersion :: Lens' OperatingSystemVersion (Maybe Text) +osvMajorVersion + = lens _osvMajorVersion + (\ s a -> s{_osvMajorVersion = a}) + +-- | Name of this operating system version. +osvName :: Lens' OperatingSystemVersion (Maybe Text) +osvName = lens _osvName (\ s a -> s{_osvName = a}) + +-- | ID of this operating system version. +osvId :: Lens' OperatingSystemVersion (Maybe Int64) +osvId = lens _osvId (\ s a -> s{_osvId = a}) + +instance FromJSON OperatingSystemVersion where + parseJSON + = withObject "OperatingSystemVersion" + (\ o -> + OperatingSystemVersion <$> + (o .:? "minorVersion") <*> + (o .:? "kind" .!= + "dfareporting#operatingSystemVersion") + <*> (o .:? "operatingSystem") + <*> (o .:? "majorVersion") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON OperatingSystemVersion where + toJSON OperatingSystemVersion{..} + = object + (catMaybes + [("minorVersion" .=) <$> _osvMinorVersion, + Just ("kind" .= _osvKind), + ("operatingSystem" .=) <$> _osvOperatingSystem, + ("majorVersion" .=) <$> _osvMajorVersion, + ("name" .=) <$> _osvName, ("id" .=) <$> _osvId]) + +-- | AccountPermissions contains information about a particular account +-- permission. Some features of DCM require an account permission to be +-- present in the account. +-- +-- /See:/ 'accountPermission' smart constructor. +data AccountPermission = AccountPermission + { _apKind :: !Text + , _apAccountProfiles :: !(Maybe [Text]) + , _apName :: !(Maybe Text) + , _apId :: !(Maybe Int64) + , _apLevel :: !(Maybe Text) + , _apPermissionGroupId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apKind' +-- +-- * 'apAccountProfiles' +-- +-- * 'apName' +-- +-- * 'apId' +-- +-- * 'apLevel' +-- +-- * 'apPermissionGroupId' +accountPermission + :: AccountPermission +accountPermission = + AccountPermission + { _apKind = "dfareporting#accountPermission" + , _apAccountProfiles = Nothing + , _apName = Nothing + , _apId = Nothing + , _apLevel = Nothing + , _apPermissionGroupId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountPermission\". +apKind :: Lens' AccountPermission Text +apKind = lens _apKind (\ s a -> s{_apKind = a}) + +-- | Account profiles associated with this account permission. Possible +-- values are: - \"ACCOUNT_PROFILE_BASIC\" - \"ACCOUNT_PROFILE_STANDARD\" +apAccountProfiles :: Lens' AccountPermission [Text] +apAccountProfiles + = lens _apAccountProfiles + (\ s a -> s{_apAccountProfiles = a}) + . _Default + . _Coerce + +-- | Name of this account permission. +apName :: Lens' AccountPermission (Maybe Text) +apName = lens _apName (\ s a -> s{_apName = a}) + +-- | ID of this account permission. +apId :: Lens' AccountPermission (Maybe Int64) +apId = lens _apId (\ s a -> s{_apId = a}) + +-- | Administrative level required to enable this account permission. +apLevel :: Lens' AccountPermission (Maybe Text) +apLevel = lens _apLevel (\ s a -> s{_apLevel = a}) + +-- | Permission group of this account permission. +apPermissionGroupId :: Lens' AccountPermission (Maybe Int64) +apPermissionGroupId + = lens _apPermissionGroupId + (\ s a -> s{_apPermissionGroupId = a}) + +instance FromJSON AccountPermission where + parseJSON + = withObject "AccountPermission" + (\ o -> + AccountPermission <$> + (o .:? "kind" .!= "dfareporting#accountPermission") + <*> (o .:? "accountProfiles" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "level") + <*> (o .:? "permissionGroupId")) + +instance ToJSON AccountPermission where + toJSON AccountPermission{..} + = object + (catMaybes + [Just ("kind" .= _apKind), + ("accountProfiles" .=) <$> _apAccountProfiles, + ("name" .=) <$> _apName, ("id" .=) <$> _apId, + ("level" .=) <$> _apLevel, + ("permissionGroupId" .=) <$> _apPermissionGroupId]) + +-- | Represents a UserProfile resource. +-- +-- /See:/ 'userProfile' smart constructor. +data UserProfile = UserProfile + { _upEtag :: !(Maybe Text) + , _upKind :: !Text + , _upAccountName :: !(Maybe Text) + , _upProfileId :: !(Maybe Int64) + , _upUserName :: !(Maybe Text) + , _upAccountId :: !(Maybe Int64) + , _upSubAccountName :: !(Maybe Text) + , _upSubAccountId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upEtag' +-- +-- * 'upKind' +-- +-- * 'upAccountName' +-- +-- * 'upProfileId' +-- +-- * 'upUserName' +-- +-- * 'upAccountId' +-- +-- * 'upSubAccountName' +-- +-- * 'upSubAccountId' +userProfile + :: UserProfile +userProfile = + UserProfile + { _upEtag = Nothing + , _upKind = "dfareporting#userProfile" + , _upAccountName = Nothing + , _upProfileId = Nothing + , _upUserName = Nothing + , _upAccountId = Nothing + , _upSubAccountName = Nothing + , _upSubAccountId = Nothing + } + +-- | The eTag of this response for caching purposes. +upEtag :: Lens' UserProfile (Maybe Text) +upEtag = lens _upEtag (\ s a -> s{_upEtag = a}) + +-- | The kind of resource this is, in this case dfareporting#userProfile. +upKind :: Lens' UserProfile Text +upKind = lens _upKind (\ s a -> s{_upKind = a}) + +-- | The account name this profile belongs to. +upAccountName :: Lens' UserProfile (Maybe Text) +upAccountName + = lens _upAccountName + (\ s a -> s{_upAccountName = a}) + +-- | The unique ID of the user profile. +upProfileId :: Lens' UserProfile (Maybe Int64) +upProfileId + = lens _upProfileId (\ s a -> s{_upProfileId = a}) + +-- | The user name. +upUserName :: Lens' UserProfile (Maybe Text) +upUserName + = lens _upUserName (\ s a -> s{_upUserName = a}) + +-- | The account ID to which this profile belongs. +upAccountId :: Lens' UserProfile (Maybe Int64) +upAccountId + = lens _upAccountId (\ s a -> s{_upAccountId = a}) + +-- | The sub account name this profile belongs to if applicable. +upSubAccountName :: Lens' UserProfile (Maybe Text) +upSubAccountName + = lens _upSubAccountName + (\ s a -> s{_upSubAccountName = a}) + +-- | The sub account ID this profile belongs to if applicable. +upSubAccountId :: Lens' UserProfile (Maybe Int64) +upSubAccountId + = lens _upSubAccountId + (\ s a -> s{_upSubAccountId = a}) + +instance FromJSON UserProfile where + parseJSON + = withObject "UserProfile" + (\ o -> + UserProfile <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "dfareporting#userProfile") + <*> (o .:? "accountName") + <*> (o .:? "profileId") + <*> (o .:? "userName") + <*> (o .:? "accountId") + <*> (o .:? "subAccountName") + <*> (o .:? "subAccountId")) + +instance ToJSON UserProfile where + toJSON UserProfile{..} + = object + (catMaybes + [("etag" .=) <$> _upEtag, Just ("kind" .= _upKind), + ("accountName" .=) <$> _upAccountName, + ("profileId" .=) <$> _upProfileId, + ("userName" .=) <$> _upUserName, + ("accountId" .=) <$> _upAccountId, + ("subAccountName" .=) <$> _upSubAccountName, + ("subAccountId" .=) <$> _upSubAccountId]) + +-- | Postal Code List Response +-- +-- /See:/ 'postalCodesListResponse' smart constructor. +data PostalCodesListResponse = PostalCodesListResponse + { _pclrKind :: !Text + , _pclrPostalCodes :: !(Maybe [Maybe PostalCode]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostalCodesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pclrKind' +-- +-- * 'pclrPostalCodes' +postalCodesListResponse + :: PostalCodesListResponse +postalCodesListResponse = + PostalCodesListResponse + { _pclrKind = "dfareporting#postalCodesListResponse" + , _pclrPostalCodes = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#postalCodesListResponse\". +pclrKind :: Lens' PostalCodesListResponse Text +pclrKind = lens _pclrKind (\ s a -> s{_pclrKind = a}) + +-- | Postal code collection. +pclrPostalCodes :: Lens' PostalCodesListResponse [Maybe PostalCode] +pclrPostalCodes + = lens _pclrPostalCodes + (\ s a -> s{_pclrPostalCodes = a}) + . _Default + . _Coerce + +instance FromJSON PostalCodesListResponse where + parseJSON + = withObject "PostalCodesListResponse" + (\ o -> + PostalCodesListResponse <$> + (o .:? "kind" .!= + "dfareporting#postalCodesListResponse") + <*> (o .:? "postalCodes" .!= mempty)) + +instance ToJSON PostalCodesListResponse where + toJSON PostalCodesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _pclrKind), + ("postalCodes" .=) <$> _pclrPostalCodes]) + +-- | Describes a change that a user has made to a resource. +-- +-- /See:/ 'changeLog' smart constructor. +data ChangeLog = ChangeLog + { _clUserProfileId :: !(Maybe Int64) + , _clObjectType :: !(Maybe Text) + , _clUserProfileName :: !(Maybe Text) + , _clKind :: !Text + , _clObjectId :: !(Maybe Int64) + , _clAction :: !(Maybe Text) + , _clTransactionId :: !(Maybe Int64) + , _clOldValue :: !(Maybe Text) + , _clAccountId :: !(Maybe Int64) + , _clNewValue :: !(Maybe Text) + , _clFieldName :: !(Maybe Text) + , _clId :: !(Maybe Int64) + , _clSubaccountId :: !(Maybe Int64) + , _clChangeTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangeLog' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clUserProfileId' +-- +-- * 'clObjectType' +-- +-- * 'clUserProfileName' +-- +-- * 'clKind' +-- +-- * 'clObjectId' +-- +-- * 'clAction' +-- +-- * 'clTransactionId' +-- +-- * 'clOldValue' +-- +-- * 'clAccountId' +-- +-- * 'clNewValue' +-- +-- * 'clFieldName' +-- +-- * 'clId' +-- +-- * 'clSubaccountId' +-- +-- * 'clChangeTime' +changeLog + :: ChangeLog +changeLog = + ChangeLog + { _clUserProfileId = Nothing + , _clObjectType = Nothing + , _clUserProfileName = Nothing + , _clKind = "dfareporting#changeLog" + , _clObjectId = Nothing + , _clAction = Nothing + , _clTransactionId = Nothing + , _clOldValue = Nothing + , _clAccountId = Nothing + , _clNewValue = Nothing + , _clFieldName = Nothing + , _clId = Nothing + , _clSubaccountId = Nothing + , _clChangeTime = Nothing + } + +-- | ID of the user who modified the object. +clUserProfileId :: Lens' ChangeLog (Maybe Int64) +clUserProfileId + = lens _clUserProfileId + (\ s a -> s{_clUserProfileId = a}) + +-- | Object type of the change log. +clObjectType :: Lens' ChangeLog (Maybe Text) +clObjectType + = lens _clObjectType (\ s a -> s{_clObjectType = a}) + +-- | User profile name of the user who modified the object. +clUserProfileName :: Lens' ChangeLog (Maybe Text) +clUserProfileName + = lens _clUserProfileName + (\ s a -> s{_clUserProfileName = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#changeLog\". +clKind :: Lens' ChangeLog Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | ID of the object of this change log. The object could be a campaign, +-- placement, ad, or other type. +clObjectId :: Lens' ChangeLog (Maybe Int64) +clObjectId + = lens _clObjectId (\ s a -> s{_clObjectId = a}) + +-- | Action which caused the change. +clAction :: Lens' ChangeLog (Maybe Text) +clAction = lens _clAction (\ s a -> s{_clAction = a}) + +-- | Transaction ID of this change log. When a single API call results in +-- many changes, each change will have a separate ID in the change log but +-- will share the same transactionId. +clTransactionId :: Lens' ChangeLog (Maybe Int64) +clTransactionId + = lens _clTransactionId + (\ s a -> s{_clTransactionId = a}) + +-- | Old value of the object field. +clOldValue :: Lens' ChangeLog (Maybe Text) +clOldValue + = lens _clOldValue (\ s a -> s{_clOldValue = a}) + +-- | Account ID of the modified object. +clAccountId :: Lens' ChangeLog (Maybe Int64) +clAccountId + = lens _clAccountId (\ s a -> s{_clAccountId = a}) + +-- | New value of the object field. +clNewValue :: Lens' ChangeLog (Maybe Text) +clNewValue + = lens _clNewValue (\ s a -> s{_clNewValue = a}) + +-- | Field name of the object which changed. +clFieldName :: Lens' ChangeLog (Maybe Text) +clFieldName + = lens _clFieldName (\ s a -> s{_clFieldName = a}) + +-- | ID of this change log. +clId :: Lens' ChangeLog (Maybe Int64) +clId = lens _clId (\ s a -> s{_clId = a}) + +-- | Subaccount ID of the modified object. +clSubaccountId :: Lens' ChangeLog (Maybe Int64) +clSubaccountId + = lens _clSubaccountId + (\ s a -> s{_clSubaccountId = a}) + +-- | Time when the object was modified. +clChangeTime :: Lens' ChangeLog (Maybe UTCTime) +clChangeTime + = lens _clChangeTime (\ s a -> s{_clChangeTime = a}) + +instance FromJSON ChangeLog where + parseJSON + = withObject "ChangeLog" + (\ o -> + ChangeLog <$> + (o .:? "userProfileId") <*> (o .:? "objectType") <*> + (o .:? "userProfileName") + <*> (o .:? "kind" .!= "dfareporting#changeLog") + <*> (o .:? "objectId") + <*> (o .:? "action") + <*> (o .:? "transactionId") + <*> (o .:? "oldValue") + <*> (o .:? "accountId") + <*> (o .:? "newValue") + <*> (o .:? "fieldName") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "changeTime")) + +instance ToJSON ChangeLog where + toJSON ChangeLog{..} + = object + (catMaybes + [("userProfileId" .=) <$> _clUserProfileId, + ("objectType" .=) <$> _clObjectType, + ("userProfileName" .=) <$> _clUserProfileName, + Just ("kind" .= _clKind), + ("objectId" .=) <$> _clObjectId, + ("action" .=) <$> _clAction, + ("transactionId" .=) <$> _clTransactionId, + ("oldValue" .=) <$> _clOldValue, + ("accountId" .=) <$> _clAccountId, + ("newValue" .=) <$> _clNewValue, + ("fieldName" .=) <$> _clFieldName, + ("id" .=) <$> _clId, + ("subaccountId" .=) <$> _clSubaccountId, + ("changeTime" .=) <$> _clChangeTime]) + +-- | Operating System List Response +-- +-- /See:/ 'operatingSystemsListResponse' smart constructor. +data OperatingSystemsListResponse = OperatingSystemsListResponse + { _oslrKind :: !Text + , _oslrOperatingSystems :: !(Maybe [Maybe OperatingSystem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslrKind' +-- +-- * 'oslrOperatingSystems' +operatingSystemsListResponse + :: OperatingSystemsListResponse +operatingSystemsListResponse = + OperatingSystemsListResponse + { _oslrKind = "dfareporting#operatingSystemsListResponse" + , _oslrOperatingSystems = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#operatingSystemsListResponse\". +oslrKind :: Lens' OperatingSystemsListResponse Text +oslrKind = lens _oslrKind (\ s a -> s{_oslrKind = a}) + +-- | Operating system collection. +oslrOperatingSystems :: Lens' OperatingSystemsListResponse [Maybe OperatingSystem] +oslrOperatingSystems + = lens _oslrOperatingSystems + (\ s a -> s{_oslrOperatingSystems = a}) + . _Default + . _Coerce + +instance FromJSON OperatingSystemsListResponse where + parseJSON + = withObject "OperatingSystemsListResponse" + (\ o -> + OperatingSystemsListResponse <$> + (o .:? "kind" .!= + "dfareporting#operatingSystemsListResponse") + <*> (o .:? "operatingSystems" .!= mempty)) + +instance ToJSON OperatingSystemsListResponse where + toJSON OperatingSystemsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _oslrKind), + ("operatingSystems" .=) <$> _oslrOperatingSystems]) + +-- | Contains properties of a placement strategy. +-- +-- /See:/ 'placementStrategy' smart constructor. +data PlacementStrategy = PlacementStrategy + { _psKind :: !Text + , _psAccountId :: !(Maybe Int64) + , _psName :: !(Maybe Text) + , _psId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psKind' +-- +-- * 'psAccountId' +-- +-- * 'psName' +-- +-- * 'psId' +placementStrategy + :: PlacementStrategy +placementStrategy = + PlacementStrategy + { _psKind = "dfareporting#placementStrategy" + , _psAccountId = Nothing + , _psName = Nothing + , _psId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementStrategy\". +psKind :: Lens' PlacementStrategy Text +psKind = lens _psKind (\ s a -> s{_psKind = a}) + +-- | Account ID of this placement strategy.This is a read-only field that can +-- be left blank. +psAccountId :: Lens' PlacementStrategy (Maybe Int64) +psAccountId + = lens _psAccountId (\ s a -> s{_psAccountId = a}) + +-- | Name of this placement strategy. This is a required field. It must be +-- less than 256 characters long and unique among placement strategies of +-- the same account. +psName :: Lens' PlacementStrategy (Maybe Text) +psName = lens _psName (\ s a -> s{_psName = a}) + +-- | ID of this placement strategy. This is a read-only, auto-generated +-- field. +psId :: Lens' PlacementStrategy (Maybe Int64) +psId = lens _psId (\ s a -> s{_psId = a}) + +instance FromJSON PlacementStrategy where + parseJSON + = withObject "PlacementStrategy" + (\ o -> + PlacementStrategy <$> + (o .:? "kind" .!= "dfareporting#placementStrategy") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON PlacementStrategy where + toJSON PlacementStrategy{..} + = object + (catMaybes + [Just ("kind" .= _psKind), + ("accountId" .=) <$> _psAccountId, + ("name" .=) <$> _psName, ("id" .=) <$> _psId]) + +-- | Event tag override information. +-- +-- /See:/ 'eventTagOverride' smart constructor. +data EventTagOverride = EventTagOverride + { _etoEnabled :: !(Maybe Bool) + , _etoId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagOverride' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etoEnabled' +-- +-- * 'etoId' +eventTagOverride + :: EventTagOverride +eventTagOverride = + EventTagOverride + { _etoEnabled = Nothing + , _etoId = Nothing + } + +-- | Whether this override is enabled. +etoEnabled :: Lens' EventTagOverride (Maybe Bool) +etoEnabled + = lens _etoEnabled (\ s a -> s{_etoEnabled = a}) + +-- | ID of this event tag override. This is a read-only, auto-generated +-- field. +etoId :: Lens' EventTagOverride (Maybe Int64) +etoId = lens _etoId (\ s a -> s{_etoId = a}) + +instance FromJSON EventTagOverride where + parseJSON + = withObject "EventTagOverride" + (\ o -> + EventTagOverride <$> + (o .:? "enabled") <*> (o .:? "id")) + +instance ToJSON EventTagOverride where + toJSON EventTagOverride{..} + = object + (catMaybes + [("enabled" .=) <$> _etoEnabled, + ("id" .=) <$> _etoId]) + +-- | Platform Type List Response +-- +-- /See:/ 'platformTypesListResponse' smart constructor. +data PlatformTypesListResponse = PlatformTypesListResponse + { _ptlrKind :: !Text + , _ptlrPlatformTypes :: !(Maybe [Maybe PlatformType]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlatformTypesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptlrKind' +-- +-- * 'ptlrPlatformTypes' +platformTypesListResponse + :: PlatformTypesListResponse +platformTypesListResponse = + PlatformTypesListResponse + { _ptlrKind = "dfareporting#platformTypesListResponse" + , _ptlrPlatformTypes = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#platformTypesListResponse\". +ptlrKind :: Lens' PlatformTypesListResponse Text +ptlrKind = lens _ptlrKind (\ s a -> s{_ptlrKind = a}) + +-- | Platform type collection. +ptlrPlatformTypes :: Lens' PlatformTypesListResponse [Maybe PlatformType] +ptlrPlatformTypes + = lens _ptlrPlatformTypes + (\ s a -> s{_ptlrPlatformTypes = a}) + . _Default + . _Coerce + +instance FromJSON PlatformTypesListResponse where + parseJSON + = withObject "PlatformTypesListResponse" + (\ o -> + PlatformTypesListResponse <$> + (o .:? "kind" .!= + "dfareporting#platformTypesListResponse") + <*> (o .:? "platformTypes" .!= mempty)) + +instance ToJSON PlatformTypesListResponse where + toJSON PlatformTypesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _ptlrKind), + ("platformTypes" .=) <$> _ptlrPlatformTypes]) + +-- | Contains properties of a Floodlight activity. +-- +-- /See:/ 'floodlightActivity' smart constructor. +data FloodlightActivity = FloodlightActivity + { _faCountingMethod :: !(Maybe Text) + , _faTagString :: !(Maybe Text) + , _faSecure :: !(Maybe Bool) + , _faExpectedUrl :: !(Maybe Text) + , _faFloodlightActivityGroupTagString :: !(Maybe Text) + , _faFloodlightConfigurationId :: !(Maybe Int64) + , _faKind :: !Text + , _faImageTagEnabled :: !(Maybe Bool) + , _faAdvertiserId :: !(Maybe Int64) + , _faAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _faSslCompliant :: !(Maybe Bool) + , _faIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _faTagFormat :: !(Maybe Text) + , _faCacheBustingType :: !(Maybe Text) + , _faAccountId :: !(Maybe Int64) + , _faName :: !(Maybe Text) + , _faPublisherTags :: !(Maybe [Maybe FloodlightActivityPublisherDynamicTag]) + , _faFloodlightActivityGroupId :: !(Maybe Int64) + , _faHidden :: !(Maybe Bool) + , _faFloodlightActivityGroupType :: !(Maybe Text) + , _faDefaultTags :: !(Maybe [Maybe FloodlightActivityDynamicTag]) + , _faFloodlightActivityGroupName :: !(Maybe Text) + , _faId :: !(Maybe Int64) + , _faSslRequired :: !(Maybe Bool) + , _faUserDefinedVariableTypes :: !(Maybe [Text]) + , _faSubaccountId :: !(Maybe Int64) + , _faNotes :: !(Maybe Text) + , _faFloodlightConfigurationIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faCountingMethod' +-- +-- * 'faTagString' +-- +-- * 'faSecure' +-- +-- * 'faExpectedUrl' +-- +-- * 'faFloodlightActivityGroupTagString' +-- +-- * 'faFloodlightConfigurationId' +-- +-- * 'faKind' +-- +-- * 'faImageTagEnabled' +-- +-- * 'faAdvertiserId' +-- +-- * 'faAdvertiserIdDimensionValue' +-- +-- * 'faSslCompliant' +-- +-- * 'faIdDimensionValue' +-- +-- * 'faTagFormat' +-- +-- * 'faCacheBustingType' +-- +-- * 'faAccountId' +-- +-- * 'faName' +-- +-- * 'faPublisherTags' +-- +-- * 'faFloodlightActivityGroupId' +-- +-- * 'faHidden' +-- +-- * 'faFloodlightActivityGroupType' +-- +-- * 'faDefaultTags' +-- +-- * 'faFloodlightActivityGroupName' +-- +-- * 'faId' +-- +-- * 'faSslRequired' +-- +-- * 'faUserDefinedVariableTypes' +-- +-- * 'faSubaccountId' +-- +-- * 'faNotes' +-- +-- * 'faFloodlightConfigurationIdDimensionValue' +floodlightActivity + :: FloodlightActivity +floodlightActivity = + FloodlightActivity + { _faCountingMethod = Nothing + , _faTagString = Nothing + , _faSecure = Nothing + , _faExpectedUrl = Nothing + , _faFloodlightActivityGroupTagString = Nothing + , _faFloodlightConfigurationId = Nothing + , _faKind = "dfareporting#floodlightActivity" + , _faImageTagEnabled = Nothing + , _faAdvertiserId = Nothing + , _faAdvertiserIdDimensionValue = Nothing + , _faSslCompliant = Nothing + , _faIdDimensionValue = Nothing + , _faTagFormat = Nothing + , _faCacheBustingType = Nothing + , _faAccountId = Nothing + , _faName = Nothing + , _faPublisherTags = Nothing + , _faFloodlightActivityGroupId = Nothing + , _faHidden = Nothing + , _faFloodlightActivityGroupType = Nothing + , _faDefaultTags = Nothing + , _faFloodlightActivityGroupName = Nothing + , _faId = Nothing + , _faSslRequired = Nothing + , _faUserDefinedVariableTypes = Nothing + , _faSubaccountId = Nothing + , _faNotes = Nothing + , _faFloodlightConfigurationIdDimensionValue = Nothing + } + +-- | Counting method for conversions for this floodlight activity. This is a +-- required field. +faCountingMethod :: Lens' FloodlightActivity (Maybe Text) +faCountingMethod + = lens _faCountingMethod + (\ s a -> s{_faCountingMethod = a}) + +-- | Value of the cat= paramter in the floodlight tag, which the ad servers +-- use to identify the activity. This is optional: if empty, a new tag +-- string will be generated for you. This string must be 1 to 8 characters +-- long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag +-- string must also be unique among activities of the same activity group. +-- This field is read-only after insertion. +faTagString :: Lens' FloodlightActivity (Maybe Text) +faTagString + = lens _faTagString (\ s a -> s{_faTagString = a}) + +-- | Whether this tag should use SSL. +faSecure :: Lens' FloodlightActivity (Maybe Bool) +faSecure = lens _faSecure (\ s a -> s{_faSecure = a}) + +-- | URL where this tag will be deployed. If specified, must be less than 256 +-- characters long. +faExpectedUrl :: Lens' FloodlightActivity (Maybe Text) +faExpectedUrl + = lens _faExpectedUrl + (\ s a -> s{_faExpectedUrl = a}) + +-- | Tag string of the associated floodlight activity group. This is a +-- read-only field. +faFloodlightActivityGroupTagString :: Lens' FloodlightActivity (Maybe Text) +faFloodlightActivityGroupTagString + = lens _faFloodlightActivityGroupTagString + (\ s a -> s{_faFloodlightActivityGroupTagString = a}) + +-- | Floodlight configuration ID of this floodlight activity. If this field +-- is left blank, the value will be copied over either from the activity +-- group\'s floodlight configuration or from the existing activity\'s +-- floodlight configuration. +faFloodlightConfigurationId :: Lens' FloodlightActivity (Maybe Int64) +faFloodlightConfigurationId + = lens _faFloodlightConfigurationId + (\ s a -> s{_faFloodlightConfigurationId = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightActivity\". +faKind :: Lens' FloodlightActivity Text +faKind = lens _faKind (\ s a -> s{_faKind = a}) + +-- | Whether the image tag is enabled for this activity. +faImageTagEnabled :: Lens' FloodlightActivity (Maybe Bool) +faImageTagEnabled + = lens _faImageTagEnabled + (\ s a -> s{_faImageTagEnabled = a}) + +-- | Advertiser ID of this floodlight activity. If this field is left blank, +-- the value will be copied over either from the activity group\'s +-- advertiser or the existing activity\'s advertiser. +faAdvertiserId :: Lens' FloodlightActivity (Maybe Int64) +faAdvertiserId + = lens _faAdvertiserId + (\ s a -> s{_faAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +faAdvertiserIdDimensionValue :: Lens' FloodlightActivity (Maybe (Maybe DimensionValue)) +faAdvertiserIdDimensionValue + = lens _faAdvertiserIdDimensionValue + (\ s a -> s{_faAdvertiserIdDimensionValue = a}) + +-- | Whether the floodlight activity is SSL-compliant. This is a read-only +-- field, its value detected by the system from the floodlight tags. +faSslCompliant :: Lens' FloodlightActivity (Maybe Bool) +faSslCompliant + = lens _faSslCompliant + (\ s a -> s{_faSslCompliant = a}) + +-- | Dimension value for the ID of this floodlight activity. This is a +-- read-only, auto-generated field. +faIdDimensionValue :: Lens' FloodlightActivity (Maybe (Maybe DimensionValue)) +faIdDimensionValue + = lens _faIdDimensionValue + (\ s a -> s{_faIdDimensionValue = a}) + +-- | Tag format type for the floodlight activity. If left blank, the tag +-- format will default to HTML. +faTagFormat :: Lens' FloodlightActivity (Maybe Text) +faTagFormat + = lens _faTagFormat (\ s a -> s{_faTagFormat = a}) + +-- | Code type used for cache busting in the generated tag. +faCacheBustingType :: Lens' FloodlightActivity (Maybe Text) +faCacheBustingType + = lens _faCacheBustingType + (\ s a -> s{_faCacheBustingType = a}) + +-- | Account ID of this floodlight activity. This is a read-only field that +-- can be left blank. +faAccountId :: Lens' FloodlightActivity (Maybe Int64) +faAccountId + = lens _faAccountId (\ s a -> s{_faAccountId = a}) + +-- | Name of this floodlight activity. This is a required field. Must be less +-- than 129 characters long and cannot contain quotes. +faName :: Lens' FloodlightActivity (Maybe Text) +faName = lens _faName (\ s a -> s{_faName = a}) + +-- | Publisher dynamic floodlight tags. +faPublisherTags :: Lens' FloodlightActivity [Maybe FloodlightActivityPublisherDynamicTag] +faPublisherTags + = lens _faPublisherTags + (\ s a -> s{_faPublisherTags = a}) + . _Default + . _Coerce + +-- | Floodlight activity group ID of this floodlight activity. This is a +-- required field. +faFloodlightActivityGroupId :: Lens' FloodlightActivity (Maybe Int64) +faFloodlightActivityGroupId + = lens _faFloodlightActivityGroupId + (\ s a -> s{_faFloodlightActivityGroupId = a}) + +-- | Whether this activity is archived. +faHidden :: Lens' FloodlightActivity (Maybe Bool) +faHidden = lens _faHidden (\ s a -> s{_faHidden = a}) + +-- | Type of the associated floodlight activity group. This is a read-only +-- field. +faFloodlightActivityGroupType :: Lens' FloodlightActivity (Maybe Text) +faFloodlightActivityGroupType + = lens _faFloodlightActivityGroupType + (\ s a -> s{_faFloodlightActivityGroupType = a}) + +-- | Dynamic floodlight tags. +faDefaultTags :: Lens' FloodlightActivity [Maybe FloodlightActivityDynamicTag] +faDefaultTags + = lens _faDefaultTags + (\ s a -> s{_faDefaultTags = a}) + . _Default + . _Coerce + +-- | Name of the associated floodlight activity group. This is a read-only +-- field. +faFloodlightActivityGroupName :: Lens' FloodlightActivity (Maybe Text) +faFloodlightActivityGroupName + = lens _faFloodlightActivityGroupName + (\ s a -> s{_faFloodlightActivityGroupName = a}) + +-- | ID of this floodlight activity. This is a read-only, auto-generated +-- field. +faId :: Lens' FloodlightActivity (Maybe Int64) +faId = lens _faId (\ s a -> s{_faId = a}) + +-- | Whether this floodlight activity must be SSL-compliant. +faSslRequired :: Lens' FloodlightActivity (Maybe Bool) +faSslRequired + = lens _faSslRequired + (\ s a -> s{_faSslRequired = a}) + +-- | List of the user-defined variables used by this conversion tag. These +-- map to the \"u[1-20]=\" in the tags. Each of these can have a user +-- defined type. Acceptable values are: - \"U1\" - \"U2\" - \"U3\" - \"U4\" +-- - \"U5\" - \"U6\" - \"U7\" - \"U8\" - \"U9\" - \"U10\" - \"U11\" - +-- \"U12\" - \"U13\" - \"U14\" - \"U15\" - \"U16\" - \"U17\" - \"U18\" - +-- \"U19\" - \"U20\" +faUserDefinedVariableTypes :: Lens' FloodlightActivity [Text] +faUserDefinedVariableTypes + = lens _faUserDefinedVariableTypes + (\ s a -> s{_faUserDefinedVariableTypes = a}) + . _Default + . _Coerce + +-- | Subaccount ID of this floodlight activity. This is a read-only field +-- that can be left blank. +faSubaccountId :: Lens' FloodlightActivity (Maybe Int64) +faSubaccountId + = lens _faSubaccountId + (\ s a -> s{_faSubaccountId = a}) + +-- | General notes or implementation instructions for the tag. +faNotes :: Lens' FloodlightActivity (Maybe Text) +faNotes = lens _faNotes (\ s a -> s{_faNotes = a}) + +-- | Dimension value for the ID of the floodlight configuration. This is a +-- read-only, auto-generated field. +faFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivity (Maybe (Maybe DimensionValue)) +faFloodlightConfigurationIdDimensionValue + = lens _faFloodlightConfigurationIdDimensionValue + (\ s a -> + s{_faFloodlightConfigurationIdDimensionValue = a}) + +instance FromJSON FloodlightActivity where + parseJSON + = withObject "FloodlightActivity" + (\ o -> + FloodlightActivity <$> + (o .:? "countingMethod") <*> (o .:? "tagString") <*> + (o .:? "secure") + <*> (o .:? "expectedUrl") + <*> (o .:? "floodlightActivityGroupTagString") + <*> (o .:? "floodlightConfigurationId") + <*> + (o .:? "kind" .!= "dfareporting#floodlightActivity") + <*> (o .:? "imageTagEnabled") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "sslCompliant") + <*> (o .:? "idDimensionValue") + <*> (o .:? "tagFormat") + <*> (o .:? "cacheBustingType") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "publisherTags" .!= mempty) + <*> (o .:? "floodlightActivityGroupId") + <*> (o .:? "hidden") + <*> (o .:? "floodlightActivityGroupType") + <*> (o .:? "defaultTags" .!= mempty) + <*> (o .:? "floodlightActivityGroupName") + <*> (o .:? "id") + <*> (o .:? "sslRequired") + <*> (o .:? "userDefinedVariableTypes" .!= mempty) + <*> (o .:? "subaccountId") + <*> (o .:? "notes") + <*> + (o .:? "floodlightConfigurationIdDimensionValue")) + +instance ToJSON FloodlightActivity where + toJSON FloodlightActivity{..} + = object + (catMaybes + [("countingMethod" .=) <$> _faCountingMethod, + ("tagString" .=) <$> _faTagString, + ("secure" .=) <$> _faSecure, + ("expectedUrl" .=) <$> _faExpectedUrl, + ("floodlightActivityGroupTagString" .=) <$> + _faFloodlightActivityGroupTagString, + ("floodlightConfigurationId" .=) <$> + _faFloodlightConfigurationId, + Just ("kind" .= _faKind), + ("imageTagEnabled" .=) <$> _faImageTagEnabled, + ("advertiserId" .=) <$> _faAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _faAdvertiserIdDimensionValue, + ("sslCompliant" .=) <$> _faSslCompliant, + ("idDimensionValue" .=) <$> _faIdDimensionValue, + ("tagFormat" .=) <$> _faTagFormat, + ("cacheBustingType" .=) <$> _faCacheBustingType, + ("accountId" .=) <$> _faAccountId, + ("name" .=) <$> _faName, + ("publisherTags" .=) <$> _faPublisherTags, + ("floodlightActivityGroupId" .=) <$> + _faFloodlightActivityGroupId, + ("hidden" .=) <$> _faHidden, + ("floodlightActivityGroupType" .=) <$> + _faFloodlightActivityGroupType, + ("defaultTags" .=) <$> _faDefaultTags, + ("floodlightActivityGroupName" .=) <$> + _faFloodlightActivityGroupName, + ("id" .=) <$> _faId, + ("sslRequired" .=) <$> _faSslRequired, + ("userDefinedVariableTypes" .=) <$> + _faUserDefinedVariableTypes, + ("subaccountId" .=) <$> _faSubaccountId, + ("notes" .=) <$> _faNotes, + ("floodlightConfigurationIdDimensionValue" .=) <$> + _faFloodlightConfigurationIdDimensionValue]) + +-- | Contains properties of a DCM advertiser. +-- +-- /See:/ 'advertiser' smart constructor. +data Advertiser = Advertiser + { _advdOriginalFloodlightConfigurationId :: !(Maybe Int64) + , _advdStatus :: !(Maybe Text) + , _advdFloodlightConfigurationId :: !(Maybe Int64) + , _advdKind :: !Text + , _advdSuspended :: !(Maybe Bool) + , _advdIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _advdAccountId :: !(Maybe Int64) + , _advdDefaultEmail :: !(Maybe Text) + , _advdName :: !(Maybe Text) + , _advdAdvertiserGroupId :: !(Maybe Int64) + , _advdDefaultClickThroughEventTagId :: !(Maybe Int64) + , _advdId :: !(Maybe Int64) + , _advdSubaccountId :: !(Maybe Int64) + , _advdFloodlightConfigurationIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _advdClickThroughUrlSuffix :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Advertiser' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'advdOriginalFloodlightConfigurationId' +-- +-- * 'advdStatus' +-- +-- * 'advdFloodlightConfigurationId' +-- +-- * 'advdKind' +-- +-- * 'advdSuspended' +-- +-- * 'advdIdDimensionValue' +-- +-- * 'advdAccountId' +-- +-- * 'advdDefaultEmail' +-- +-- * 'advdName' +-- +-- * 'advdAdvertiserGroupId' +-- +-- * 'advdDefaultClickThroughEventTagId' +-- +-- * 'advdId' +-- +-- * 'advdSubaccountId' +-- +-- * 'advdFloodlightConfigurationIdDimensionValue' +-- +-- * 'advdClickThroughUrlSuffix' +advertiser + :: Advertiser +advertiser = + Advertiser + { _advdOriginalFloodlightConfigurationId = Nothing + , _advdStatus = Nothing + , _advdFloodlightConfigurationId = Nothing + , _advdKind = "dfareporting#advertiser" + , _advdSuspended = Nothing + , _advdIdDimensionValue = Nothing + , _advdAccountId = Nothing + , _advdDefaultEmail = Nothing + , _advdName = Nothing + , _advdAdvertiserGroupId = Nothing + , _advdDefaultClickThroughEventTagId = Nothing + , _advdId = Nothing + , _advdSubaccountId = Nothing + , _advdFloodlightConfigurationIdDimensionValue = Nothing + , _advdClickThroughUrlSuffix = Nothing + } + +-- | Original floodlight configuration before any sharing occurred. Set the +-- floodlightConfigurationId of this advertiser to +-- originalFloodlightConfigurationId to unshare the advertiser\'s current +-- floodlight configuration. You cannot unshare an advertiser\'s floodlight +-- configuration if the shared configuration has activities associated with +-- any campaign or placement. +advdOriginalFloodlightConfigurationId :: Lens' Advertiser (Maybe Int64) +advdOriginalFloodlightConfigurationId + = lens _advdOriginalFloodlightConfigurationId + (\ s a -> + s{_advdOriginalFloodlightConfigurationId = a}) + +-- | Status of this advertiser. +advdStatus :: Lens' Advertiser (Maybe Text) +advdStatus + = lens _advdStatus (\ s a -> s{_advdStatus = a}) + +-- | Floodlight configuration ID of this advertiser. The floodlight +-- configuration ID will be created automatically, so on insert this field +-- should be left blank. This field can be set to another advertiser\'s +-- floodlight configuration ID in order to share that advertiser\'s +-- floodlight configuration with this advertiser, so long as: - This +-- advertiser\'s original floodlight configuration is not already +-- associated with floodlight activities or floodlight activity groups. - +-- This advertiser\'s original floodlight configuration is not already +-- shared with another advertiser. +advdFloodlightConfigurationId :: Lens' Advertiser (Maybe Int64) +advdFloodlightConfigurationId + = lens _advdFloodlightConfigurationId + (\ s a -> s{_advdFloodlightConfigurationId = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#advertiser\". +advdKind :: Lens' Advertiser Text +advdKind = lens _advdKind (\ s a -> s{_advdKind = a}) + +-- | Suspension status of this advertiser. +advdSuspended :: Lens' Advertiser (Maybe Bool) +advdSuspended + = lens _advdSuspended + (\ s a -> s{_advdSuspended = a}) + +-- | Dimension value for the ID of this advertiser. This is a read-only, +-- auto-generated field. +advdIdDimensionValue :: Lens' Advertiser (Maybe (Maybe DimensionValue)) +advdIdDimensionValue + = lens _advdIdDimensionValue + (\ s a -> s{_advdIdDimensionValue = a}) + +-- | Account ID of this advertiser.This is a read-only field that can be left +-- blank. +advdAccountId :: Lens' Advertiser (Maybe Int64) +advdAccountId + = lens _advdAccountId + (\ s a -> s{_advdAccountId = a}) + +-- | Default email address used in sender field for tag emails. +advdDefaultEmail :: Lens' Advertiser (Maybe Text) +advdDefaultEmail + = lens _advdDefaultEmail + (\ s a -> s{_advdDefaultEmail = a}) + +-- | Name of this advertiser. This is a required field and must be less than +-- 256 characters long and unique among advertisers of the same account. +advdName :: Lens' Advertiser (Maybe Text) +advdName = lens _advdName (\ s a -> s{_advdName = a}) + +-- | ID of the advertiser group this advertiser belongs to. You can group +-- advertisers for reporting purposes, allowing you to see aggregated +-- information for all advertisers in each group. +advdAdvertiserGroupId :: Lens' Advertiser (Maybe Int64) +advdAdvertiserGroupId + = lens _advdAdvertiserGroupId + (\ s a -> s{_advdAdvertiserGroupId = a}) + +-- | ID of the click-through event tag to apply by default to the landing +-- pages of this advertiser\'s campaigns. +advdDefaultClickThroughEventTagId :: Lens' Advertiser (Maybe Int64) +advdDefaultClickThroughEventTagId + = lens _advdDefaultClickThroughEventTagId + (\ s a -> s{_advdDefaultClickThroughEventTagId = a}) + +-- | ID of this advertiser. This is a read-only, auto-generated field. +advdId :: Lens' Advertiser (Maybe Int64) +advdId = lens _advdId (\ s a -> s{_advdId = a}) + +-- | Subaccount ID of this advertiser.This is a read-only field that can be +-- left blank. +advdSubaccountId :: Lens' Advertiser (Maybe Int64) +advdSubaccountId + = lens _advdSubaccountId + (\ s a -> s{_advdSubaccountId = a}) + +-- | Dimension value for the ID of the floodlight configuration. This is a +-- read-only, auto-generated field. +advdFloodlightConfigurationIdDimensionValue :: Lens' Advertiser (Maybe (Maybe DimensionValue)) +advdFloodlightConfigurationIdDimensionValue + = lens _advdFloodlightConfigurationIdDimensionValue + (\ s a -> + s{_advdFloodlightConfigurationIdDimensionValue = a}) + +-- | Suffix added to click-through URL of ad creative associations under this +-- advertiser. Must be less than 129 characters long. +advdClickThroughUrlSuffix :: Lens' Advertiser (Maybe Text) +advdClickThroughUrlSuffix + = lens _advdClickThroughUrlSuffix + (\ s a -> s{_advdClickThroughUrlSuffix = a}) + +instance FromJSON Advertiser where + parseJSON + = withObject "Advertiser" + (\ o -> + Advertiser <$> + (o .:? "originalFloodlightConfigurationId") <*> + (o .:? "status") + <*> (o .:? "floodlightConfigurationId") + <*> (o .:? "kind" .!= "dfareporting#advertiser") + <*> (o .:? "suspended") + <*> (o .:? "idDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "defaultEmail") + <*> (o .:? "name") + <*> (o .:? "advertiserGroupId") + <*> (o .:? "defaultClickThroughEventTagId") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "floodlightConfigurationIdDimensionValue") + <*> (o .:? "clickThroughUrlSuffix")) + +instance ToJSON Advertiser where + toJSON Advertiser{..} + = object + (catMaybes + [("originalFloodlightConfigurationId" .=) <$> + _advdOriginalFloodlightConfigurationId, + ("status" .=) <$> _advdStatus, + ("floodlightConfigurationId" .=) <$> + _advdFloodlightConfigurationId, + Just ("kind" .= _advdKind), + ("suspended" .=) <$> _advdSuspended, + ("idDimensionValue" .=) <$> _advdIdDimensionValue, + ("accountId" .=) <$> _advdAccountId, + ("defaultEmail" .=) <$> _advdDefaultEmail, + ("name" .=) <$> _advdName, + ("advertiserGroupId" .=) <$> _advdAdvertiserGroupId, + ("defaultClickThroughEventTagId" .=) <$> + _advdDefaultClickThroughEventTagId, + ("id" .=) <$> _advdId, + ("subaccountId" .=) <$> _advdSubaccountId, + ("floodlightConfigurationIdDimensionValue" .=) <$> + _advdFloodlightConfigurationIdDimensionValue, + ("clickThroughUrlSuffix" .=) <$> + _advdClickThroughUrlSuffix]) + +-- | AccountPermissionGroups contains a mapping of permission group IDs to +-- names. A permission group is a grouping of account permissions. +-- +-- /See:/ 'accountPermissionGroup' smart constructor. +data AccountPermissionGroup = AccountPermissionGroup + { _apgKind :: !Text + , _apgName :: !(Maybe Text) + , _apgId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apgKind' +-- +-- * 'apgName' +-- +-- * 'apgId' +accountPermissionGroup + :: AccountPermissionGroup +accountPermissionGroup = + AccountPermissionGroup + { _apgKind = "dfareporting#accountPermissionGroup" + , _apgName = Nothing + , _apgId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#accountPermissionGroup\". +apgKind :: Lens' AccountPermissionGroup Text +apgKind = lens _apgKind (\ s a -> s{_apgKind = a}) + +-- | Name of this account permission group. +apgName :: Lens' AccountPermissionGroup (Maybe Text) +apgName = lens _apgName (\ s a -> s{_apgName = a}) + +-- | ID of this account permission group. +apgId :: Lens' AccountPermissionGroup (Maybe Int64) +apgId = lens _apgId (\ s a -> s{_apgId = a}) + +instance FromJSON AccountPermissionGroup where + parseJSON + = withObject "AccountPermissionGroup" + (\ o -> + AccountPermissionGroup <$> + (o .:? "kind" .!= + "dfareporting#accountPermissionGroup") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON AccountPermissionGroup where + toJSON AccountPermissionGroup{..} + = object + (catMaybes + [Just ("kind" .= _apgKind), ("name" .=) <$> _apgName, + ("id" .=) <$> _apgId]) + +-- | Target Window. +-- +-- /See:/ 'targetWindow' smart constructor. +data TargetWindow = TargetWindow + { _twCustomHtml :: !(Maybe Text) + , _twTargetWindowOption :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetWindow' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'twCustomHtml' +-- +-- * 'twTargetWindowOption' +targetWindow + :: TargetWindow +targetWindow = + TargetWindow + { _twCustomHtml = Nothing + , _twTargetWindowOption = Nothing + } + +-- | User-entered value. +twCustomHtml :: Lens' TargetWindow (Maybe Text) +twCustomHtml + = lens _twCustomHtml (\ s a -> s{_twCustomHtml = a}) + +-- | Type of browser window for which the backup image of the flash creative +-- can be displayed. +twTargetWindowOption :: Lens' TargetWindow (Maybe Text) +twTargetWindowOption + = lens _twTargetWindowOption + (\ s a -> s{_twTargetWindowOption = a}) + +instance FromJSON TargetWindow where + parseJSON + = withObject "TargetWindow" + (\ o -> + TargetWindow <$> + (o .:? "customHtml") <*> + (o .:? "targetWindowOption")) + +instance ToJSON TargetWindow where + toJSON TargetWindow{..} + = object + (catMaybes + [("customHtml" .=) <$> _twCustomHtml, + ("targetWindowOption" .=) <$> _twTargetWindowOption]) + +-- | Modification timestamp. +-- +-- /See:/ 'lastModifiedInfo' smart constructor. +newtype LastModifiedInfo = LastModifiedInfo + { _lmiTime :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LastModifiedInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmiTime' +lastModifiedInfo + :: LastModifiedInfo +lastModifiedInfo = + LastModifiedInfo + { _lmiTime = Nothing + } + +-- | Timestamp of the last change in milliseconds since epoch. +lmiTime :: Lens' LastModifiedInfo (Maybe Int64) +lmiTime = lens _lmiTime (\ s a -> s{_lmiTime = a}) + +instance FromJSON LastModifiedInfo where + parseJSON + = withObject "LastModifiedInfo" + (\ o -> LastModifiedInfo <$> (o .:? "time")) + +instance ToJSON LastModifiedInfo where + toJSON LastModifiedInfo{..} + = object (catMaybes [("time" .=) <$> _lmiTime]) + +-- | Contains properties of auser role, which is used to manage user access. +-- +-- /See:/ 'userRole' smart constructor. +data UserRole = UserRole + { _urParentUserRoleId :: !(Maybe Int64) + , _urKind :: !Text + , _urDefaultUserRole :: !(Maybe Bool) + , _urAccountId :: !(Maybe Int64) + , _urName :: !(Maybe Text) + , _urId :: !(Maybe Int64) + , _urPermissions :: !(Maybe [Maybe UserRolePermission]) + , _urSubaccountId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRole' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urParentUserRoleId' +-- +-- * 'urKind' +-- +-- * 'urDefaultUserRole' +-- +-- * 'urAccountId' +-- +-- * 'urName' +-- +-- * 'urId' +-- +-- * 'urPermissions' +-- +-- * 'urSubaccountId' +userRole + :: UserRole +userRole = + UserRole + { _urParentUserRoleId = Nothing + , _urKind = "dfareporting#userRole" + , _urDefaultUserRole = Nothing + , _urAccountId = Nothing + , _urName = Nothing + , _urId = Nothing + , _urPermissions = Nothing + , _urSubaccountId = Nothing + } + +-- | ID of the user role that this user role is based on or copied from. This +-- is a required field. +urParentUserRoleId :: Lens' UserRole (Maybe Int64) +urParentUserRoleId + = lens _urParentUserRoleId + (\ s a -> s{_urParentUserRoleId = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRole\". +urKind :: Lens' UserRole Text +urKind = lens _urKind (\ s a -> s{_urKind = a}) + +-- | Whether this is a default user role. Default user roles are created by +-- the system for the account\/subaccount and cannot be modified or +-- deleted. Each default user role comes with a basic set of preassigned +-- permissions. +urDefaultUserRole :: Lens' UserRole (Maybe Bool) +urDefaultUserRole + = lens _urDefaultUserRole + (\ s a -> s{_urDefaultUserRole = a}) + +-- | Account ID of this user role. This is a read-only field that can be left +-- blank. +urAccountId :: Lens' UserRole (Maybe Int64) +urAccountId + = lens _urAccountId (\ s a -> s{_urAccountId = a}) + +-- | Name of this user role. This is a required field. Must be less than 256 +-- characters long. If this user role is under a subaccount, the name must +-- be unique among sites of the same subaccount. Otherwise, this user role +-- is a top-level user role, and the name must be unique among top-level +-- user roles of the same account. +urName :: Lens' UserRole (Maybe Text) +urName = lens _urName (\ s a -> s{_urName = a}) + +-- | ID of this user role. This is a read-only, auto-generated field. +urId :: Lens' UserRole (Maybe Int64) +urId = lens _urId (\ s a -> s{_urId = a}) + +-- | List of permissions associated with this user role. +urPermissions :: Lens' UserRole [Maybe UserRolePermission] +urPermissions + = lens _urPermissions + (\ s a -> s{_urPermissions = a}) + . _Default + . _Coerce + +-- | Subaccount ID of this user role. This is a read-only field that can be +-- left blank. +urSubaccountId :: Lens' UserRole (Maybe Int64) +urSubaccountId + = lens _urSubaccountId + (\ s a -> s{_urSubaccountId = a}) + +instance FromJSON UserRole where + parseJSON + = withObject "UserRole" + (\ o -> + UserRole <$> + (o .:? "parentUserRoleId") <*> + (o .:? "kind" .!= "dfareporting#userRole") + <*> (o .:? "defaultUserRole") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "permissions" .!= mempty) + <*> (o .:? "subaccountId")) + +instance ToJSON UserRole where + toJSON UserRole{..} + = object + (catMaybes + [("parentUserRoleId" .=) <$> _urParentUserRoleId, + Just ("kind" .= _urKind), + ("defaultUserRole" .=) <$> _urDefaultUserRole, + ("accountId" .=) <$> _urAccountId, + ("name" .=) <$> _urName, ("id" .=) <$> _urId, + ("permissions" .=) <$> _urPermissions, + ("subaccountId" .=) <$> _urSubaccountId]) + +-- | Contains information about a region that can be targeted by ads. +-- +-- /See:/ 'region' smart constructor. +data Region = Region + { _regRegionCode :: !(Maybe Text) + , _regKind :: !Text + , _regName :: !(Maybe Text) + , _regCountryCode :: !(Maybe Text) + , _regCountryDartId :: !(Maybe Int64) + , _regDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Region' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'regRegionCode' +-- +-- * 'regKind' +-- +-- * 'regName' +-- +-- * 'regCountryCode' +-- +-- * 'regCountryDartId' +-- +-- * 'regDartId' +region + :: Region +region = + Region + { _regRegionCode = Nothing + , _regKind = "dfareporting#region" + , _regName = Nothing + , _regCountryCode = Nothing + , _regCountryDartId = Nothing + , _regDartId = Nothing + } + +-- | Region code. +regRegionCode :: Lens' Region (Maybe Text) +regRegionCode + = lens _regRegionCode + (\ s a -> s{_regRegionCode = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#region\". +regKind :: Lens' Region Text +regKind = lens _regKind (\ s a -> s{_regKind = a}) + +-- | Name of this region. +regName :: Lens' Region (Maybe Text) +regName = lens _regName (\ s a -> s{_regName = a}) + +-- | Country code of the country to which this region belongs. +regCountryCode :: Lens' Region (Maybe Text) +regCountryCode + = lens _regCountryCode + (\ s a -> s{_regCountryCode = a}) + +-- | DART ID of the country to which this region belongs. +regCountryDartId :: Lens' Region (Maybe Int64) +regCountryDartId + = lens _regCountryDartId + (\ s a -> s{_regCountryDartId = a}) + +-- | DART ID of this region. +regDartId :: Lens' Region (Maybe Int64) +regDartId + = lens _regDartId (\ s a -> s{_regDartId = a}) + +instance FromJSON Region where + parseJSON + = withObject "Region" + (\ o -> + Region <$> + (o .:? "regionCode") <*> + (o .:? "kind" .!= "dfareporting#region") + <*> (o .:? "name") + <*> (o .:? "countryCode") + <*> (o .:? "countryDartId") + <*> (o .:? "dartId")) + +instance ToJSON Region where + toJSON Region{..} + = object + (catMaybes + [("regionCode" .=) <$> _regRegionCode, + Just ("kind" .= _regKind), ("name" .=) <$> _regName, + ("countryCode" .=) <$> _regCountryCode, + ("countryDartId" .=) <$> _regCountryDartId, + ("dartId" .=) <$> _regDartId]) + +-- | Directory Site List Response +-- +-- /See:/ 'directorySitesListResponse' smart constructor. +data DirectorySitesListResponse = DirectorySitesListResponse + { _dslrNextPageToken :: !(Maybe Text) + , _dslrKind :: !Text + , _dslrDirectorySites :: !(Maybe [Maybe DirectorySite]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySitesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dslrNextPageToken' +-- +-- * 'dslrKind' +-- +-- * 'dslrDirectorySites' +directorySitesListResponse + :: DirectorySitesListResponse +directorySitesListResponse = + DirectorySitesListResponse + { _dslrNextPageToken = Nothing + , _dslrKind = "dfareporting#directorySitesListResponse" + , _dslrDirectorySites = Nothing + } + +-- | Pagination token to be used for the next list operation. +dslrNextPageToken :: Lens' DirectorySitesListResponse (Maybe Text) +dslrNextPageToken + = lens _dslrNextPageToken + (\ s a -> s{_dslrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#directorySitesListResponse\". +dslrKind :: Lens' DirectorySitesListResponse Text +dslrKind = lens _dslrKind (\ s a -> s{_dslrKind = a}) + +-- | Directory site collection. +dslrDirectorySites :: Lens' DirectorySitesListResponse [Maybe DirectorySite] +dslrDirectorySites + = lens _dslrDirectorySites + (\ s a -> s{_dslrDirectorySites = a}) + . _Default + . _Coerce + +instance FromJSON DirectorySitesListResponse where + parseJSON + = withObject "DirectorySitesListResponse" + (\ o -> + DirectorySitesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#directorySitesListResponse") + <*> (o .:? "directorySites" .!= mempty)) + +instance ToJSON DirectorySitesListResponse where + toJSON DirectorySitesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dslrNextPageToken, + Just ("kind" .= _dslrKind), + ("directorySites" .=) <$> _dslrDirectorySites]) + +-- | Creative Field Value List Response +-- +-- /See:/ 'creativeFieldValuesListResponse' smart constructor. +data CreativeFieldValuesListResponse = CreativeFieldValuesListResponse + { _cfvlrNextPageToken :: !(Maybe Text) + , _cfvlrKind :: !Text + , _cfvlrCreativeFieldValues :: !(Maybe [Maybe CreativeFieldValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvlrNextPageToken' +-- +-- * 'cfvlrKind' +-- +-- * 'cfvlrCreativeFieldValues' +creativeFieldValuesListResponse + :: CreativeFieldValuesListResponse +creativeFieldValuesListResponse = + CreativeFieldValuesListResponse + { _cfvlrNextPageToken = Nothing + , _cfvlrKind = "dfareporting#creativeFieldValuesListResponse" + , _cfvlrCreativeFieldValues = Nothing + } + +-- | Pagination token to be used for the next list operation. +cfvlrNextPageToken :: Lens' CreativeFieldValuesListResponse (Maybe Text) +cfvlrNextPageToken + = lens _cfvlrNextPageToken + (\ s a -> s{_cfvlrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeFieldValuesListResponse\". +cfvlrKind :: Lens' CreativeFieldValuesListResponse Text +cfvlrKind + = lens _cfvlrKind (\ s a -> s{_cfvlrKind = a}) + +-- | Creative field value collection. +cfvlrCreativeFieldValues :: Lens' CreativeFieldValuesListResponse [Maybe CreativeFieldValue] +cfvlrCreativeFieldValues + = lens _cfvlrCreativeFieldValues + (\ s a -> s{_cfvlrCreativeFieldValues = a}) + . _Default + . _Coerce + +instance FromJSON CreativeFieldValuesListResponse + where + parseJSON + = withObject "CreativeFieldValuesListResponse" + (\ o -> + CreativeFieldValuesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#creativeFieldValuesListResponse") + <*> (o .:? "creativeFieldValues" .!= mempty)) + +instance ToJSON CreativeFieldValuesListResponse where + toJSON CreativeFieldValuesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _cfvlrNextPageToken, + Just ("kind" .= _cfvlrKind), + ("creativeFieldValues" .=) <$> + _cfvlrCreativeFieldValues]) + +-- | Represents a dimension filter. +-- +-- /See:/ 'dimensionFilter' smart constructor. +data DimensionFilter = DimensionFilter + { _dfKind :: !Text + , _dfValue :: !(Maybe Text) + , _dfDimensionName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DimensionFilter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dfKind' +-- +-- * 'dfValue' +-- +-- * 'dfDimensionName' +dimensionFilter + :: DimensionFilter +dimensionFilter = + DimensionFilter + { _dfKind = "dfareporting#dimensionFilter" + , _dfValue = Nothing + , _dfDimensionName = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#dimensionFilter. +dfKind :: Lens' DimensionFilter Text +dfKind = lens _dfKind (\ s a -> s{_dfKind = a}) + +-- | The value of the dimension to filter. +dfValue :: Lens' DimensionFilter (Maybe Text) +dfValue = lens _dfValue (\ s a -> s{_dfValue = a}) + +-- | The name of the dimension to filter. +dfDimensionName :: Lens' DimensionFilter (Maybe Text) +dfDimensionName + = lens _dfDimensionName + (\ s a -> s{_dfDimensionName = a}) + +instance FromJSON DimensionFilter where + parseJSON + = withObject "DimensionFilter" + (\ o -> + DimensionFilter <$> + (o .:? "kind" .!= "dfareporting#dimensionFilter") <*> + (o .:? "value") + <*> (o .:? "dimensionName")) + +instance ToJSON DimensionFilter where + toJSON DimensionFilter{..} + = object + (catMaybes + [Just ("kind" .= _dfKind), ("value" .=) <$> _dfValue, + ("dimensionName" .=) <$> _dfDimensionName]) + +-- | Pricing Period +-- +-- /See:/ 'pricingSchedulePricingPeriod' smart constructor. +data PricingSchedulePricingPeriod = PricingSchedulePricingPeriod + { _psppEndDate :: !(Maybe UTCTime) + , _psppRateOrCostNanos :: !(Maybe Int64) + , _psppStartDate :: !(Maybe UTCTime) + , _psppUnits :: !(Maybe Int64) + , _psppPricingComment :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PricingSchedulePricingPeriod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psppEndDate' +-- +-- * 'psppRateOrCostNanos' +-- +-- * 'psppStartDate' +-- +-- * 'psppUnits' +-- +-- * 'psppPricingComment' +pricingSchedulePricingPeriod + :: PricingSchedulePricingPeriod +pricingSchedulePricingPeriod = + PricingSchedulePricingPeriod + { _psppEndDate = Nothing + , _psppRateOrCostNanos = Nothing + , _psppStartDate = Nothing + , _psppUnits = Nothing + , _psppPricingComment = Nothing + } + +-- | Pricing period end date. This date must be later than, or the same day +-- as, the pricing period start date, but not later than the placement end +-- date. The period end date can be the same date as the period start date. +-- If, for example, you set 6\/25\/2015 as both the start and end dates, +-- the effective pricing period date is just that day only, 6\/25\/2015. +-- The hours, minutes, and seconds of the end date should not be set, as +-- doing so will result in an error. +psppEndDate :: Lens' PricingSchedulePricingPeriod (Maybe UTCTime) +psppEndDate + = lens _psppEndDate (\ s a -> s{_psppEndDate = a}) + +-- | Rate or cost of this pricing period. +psppRateOrCostNanos :: Lens' PricingSchedulePricingPeriod (Maybe Int64) +psppRateOrCostNanos + = lens _psppRateOrCostNanos + (\ s a -> s{_psppRateOrCostNanos = a}) + +-- | Pricing period start date. This date must be later than, or the same day +-- as, the placement start date. The hours, minutes, and seconds of the +-- start date should not be set, as doing so will result in an error. +psppStartDate :: Lens' PricingSchedulePricingPeriod (Maybe UTCTime) +psppStartDate + = lens _psppStartDate + (\ s a -> s{_psppStartDate = a}) + +-- | Units of this pricing period. +psppUnits :: Lens' PricingSchedulePricingPeriod (Maybe Int64) +psppUnits + = lens _psppUnits (\ s a -> s{_psppUnits = a}) + +-- | Comments for this pricing period. +psppPricingComment :: Lens' PricingSchedulePricingPeriod (Maybe Text) +psppPricingComment + = lens _psppPricingComment + (\ s a -> s{_psppPricingComment = a}) + +instance FromJSON PricingSchedulePricingPeriod where + parseJSON + = withObject "PricingSchedulePricingPeriod" + (\ o -> + PricingSchedulePricingPeriod <$> + (o .:? "endDate") <*> (o .:? "rateOrCostNanos") <*> + (o .:? "startDate") + <*> (o .:? "units") + <*> (o .:? "pricingComment")) + +instance ToJSON PricingSchedulePricingPeriod where + toJSON PricingSchedulePricingPeriod{..} + = object + (catMaybes + [("endDate" .=) <$> _psppEndDate, + ("rateOrCostNanos" .=) <$> _psppRateOrCostNanos, + ("startDate" .=) <$> _psppStartDate, + ("units" .=) <$> _psppUnits, + ("pricingComment" .=) <$> _psppPricingComment]) + +-- | Contains properties of a Floodlight configuration. +-- +-- /See:/ 'floodlightConfiguration' smart constructor. +data FloodlightConfiguration = FloodlightConfiguration + { _fcTagSettings :: !(Maybe (Maybe TagSettings)) + , _fcExposureToConversionEnabled :: !(Maybe Bool) + , _fcInAppAttributionTrackingEnabled :: !(Maybe Bool) + , _fcThirdPartyAuthenticationTokens :: !(Maybe [Maybe ThirdPartyAuthenticationToken]) + , _fcKind :: !Text + , _fcAdvertiserId :: !(Maybe Int64) + , _fcAnalyticsDataSharingEnabled :: !(Maybe Bool) + , _fcAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _fcIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _fcLookbackConfiguration :: !(Maybe (Maybe LookbackConfiguration)) + , _fcAccountId :: !(Maybe Int64) + , _fcId :: !(Maybe Int64) + , _fcSslRequired :: !(Maybe Bool) + , _fcNaturalSearchConversionAttributionOption :: !(Maybe Text) + , _fcUserDefinedVariableConfigurations :: !(Maybe [Maybe UserDefinedVariableConfiguration]) + , _fcSubaccountId :: !(Maybe Int64) + , _fcFirstDayOfWeek :: !(Maybe Text) + , _fcOmnitureSettings :: !(Maybe (Maybe OmnitureSettings)) + , _fcStandardVariableTypes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcTagSettings' +-- +-- * 'fcExposureToConversionEnabled' +-- +-- * 'fcInAppAttributionTrackingEnabled' +-- +-- * 'fcThirdPartyAuthenticationTokens' +-- +-- * 'fcKind' +-- +-- * 'fcAdvertiserId' +-- +-- * 'fcAnalyticsDataSharingEnabled' +-- +-- * 'fcAdvertiserIdDimensionValue' +-- +-- * 'fcIdDimensionValue' +-- +-- * 'fcLookbackConfiguration' +-- +-- * 'fcAccountId' +-- +-- * 'fcId' +-- +-- * 'fcSslRequired' +-- +-- * 'fcNaturalSearchConversionAttributionOption' +-- +-- * 'fcUserDefinedVariableConfigurations' +-- +-- * 'fcSubaccountId' +-- +-- * 'fcFirstDayOfWeek' +-- +-- * 'fcOmnitureSettings' +-- +-- * 'fcStandardVariableTypes' +floodlightConfiguration + :: FloodlightConfiguration +floodlightConfiguration = + FloodlightConfiguration + { _fcTagSettings = Nothing + , _fcExposureToConversionEnabled = Nothing + , _fcInAppAttributionTrackingEnabled = Nothing + , _fcThirdPartyAuthenticationTokens = Nothing + , _fcKind = "dfareporting#floodlightConfiguration" + , _fcAdvertiserId = Nothing + , _fcAnalyticsDataSharingEnabled = Nothing + , _fcAdvertiserIdDimensionValue = Nothing + , _fcIdDimensionValue = Nothing + , _fcLookbackConfiguration = Nothing + , _fcAccountId = Nothing + , _fcId = Nothing + , _fcSslRequired = Nothing + , _fcNaturalSearchConversionAttributionOption = Nothing + , _fcUserDefinedVariableConfigurations = Nothing + , _fcSubaccountId = Nothing + , _fcFirstDayOfWeek = Nothing + , _fcOmnitureSettings = Nothing + , _fcStandardVariableTypes = Nothing + } + +-- | Configuration settings for dynamic and image floodlight tags. +fcTagSettings :: Lens' FloodlightConfiguration (Maybe (Maybe TagSettings)) +fcTagSettings + = lens _fcTagSettings + (\ s a -> s{_fcTagSettings = a}) + +-- | Whether the exposure-to-conversion report is enabled. This report shows +-- detailed pathway information on up to 10 of the most recent ad exposures +-- seen by a user before converting. +fcExposureToConversionEnabled :: Lens' FloodlightConfiguration (Maybe Bool) +fcExposureToConversionEnabled + = lens _fcExposureToConversionEnabled + (\ s a -> s{_fcExposureToConversionEnabled = a}) + +-- | Whether in-app attribution tracking is enabled. +fcInAppAttributionTrackingEnabled :: Lens' FloodlightConfiguration (Maybe Bool) +fcInAppAttributionTrackingEnabled + = lens _fcInAppAttributionTrackingEnabled + (\ s a -> s{_fcInAppAttributionTrackingEnabled = a}) + +-- | List of third-party authentication tokens enabled for this +-- configuration. +fcThirdPartyAuthenticationTokens :: Lens' FloodlightConfiguration [Maybe ThirdPartyAuthenticationToken] +fcThirdPartyAuthenticationTokens + = lens _fcThirdPartyAuthenticationTokens + (\ s a -> s{_fcThirdPartyAuthenticationTokens = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightConfiguration\". +fcKind :: Lens' FloodlightConfiguration Text +fcKind = lens _fcKind (\ s a -> s{_fcKind = a}) + +-- | Advertiser ID of the parent advertiser of this floodlight configuration. +fcAdvertiserId :: Lens' FloodlightConfiguration (Maybe Int64) +fcAdvertiserId + = lens _fcAdvertiserId + (\ s a -> s{_fcAdvertiserId = a}) + +-- | Whether advertiser data is shared with Google Analytics. +fcAnalyticsDataSharingEnabled :: Lens' FloodlightConfiguration (Maybe Bool) +fcAnalyticsDataSharingEnabled + = lens _fcAnalyticsDataSharingEnabled + (\ s a -> s{_fcAnalyticsDataSharingEnabled = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +fcAdvertiserIdDimensionValue :: Lens' FloodlightConfiguration (Maybe (Maybe DimensionValue)) +fcAdvertiserIdDimensionValue + = lens _fcAdvertiserIdDimensionValue + (\ s a -> s{_fcAdvertiserIdDimensionValue = a}) + +-- | Dimension value for the ID of this floodlight configuration. This is a +-- read-only, auto-generated field. +fcIdDimensionValue :: Lens' FloodlightConfiguration (Maybe (Maybe DimensionValue)) +fcIdDimensionValue + = lens _fcIdDimensionValue + (\ s a -> s{_fcIdDimensionValue = a}) + +-- | Lookback window settings for this floodlight configuration. +fcLookbackConfiguration :: Lens' FloodlightConfiguration (Maybe (Maybe LookbackConfiguration)) +fcLookbackConfiguration + = lens _fcLookbackConfiguration + (\ s a -> s{_fcLookbackConfiguration = a}) + +-- | Account ID of this floodlight configuration. This is a read-only field +-- that can be left blank. +fcAccountId :: Lens' FloodlightConfiguration (Maybe Int64) +fcAccountId + = lens _fcAccountId (\ s a -> s{_fcAccountId = a}) + +-- | ID of this floodlight configuration. This is a read-only, auto-generated +-- field. +fcId :: Lens' FloodlightConfiguration (Maybe Int64) +fcId = lens _fcId (\ s a -> s{_fcId = a}) + +-- | Whether floodlight activities owned by this configuration are required +-- to be SSL-compliant. +fcSslRequired :: Lens' FloodlightConfiguration (Maybe Bool) +fcSslRequired + = lens _fcSslRequired + (\ s a -> s{_fcSslRequired = a}) + +-- | Types of attribution options for natural search conversions. +fcNaturalSearchConversionAttributionOption :: Lens' FloodlightConfiguration (Maybe Text) +fcNaturalSearchConversionAttributionOption + = lens _fcNaturalSearchConversionAttributionOption + (\ s a -> + s{_fcNaturalSearchConversionAttributionOption = a}) + +-- | List of user defined variables enabled for this configuration. +fcUserDefinedVariableConfigurations :: Lens' FloodlightConfiguration [Maybe UserDefinedVariableConfiguration] +fcUserDefinedVariableConfigurations + = lens _fcUserDefinedVariableConfigurations + (\ s a -> + s{_fcUserDefinedVariableConfigurations = a}) + . _Default + . _Coerce + +-- | Subaccount ID of this floodlight configuration. This is a read-only +-- field that can be left blank. +fcSubaccountId :: Lens' FloodlightConfiguration (Maybe Int64) +fcSubaccountId + = lens _fcSubaccountId + (\ s a -> s{_fcSubaccountId = a}) + +-- | Day that will be counted as the first day of the week in reports. This +-- is a required field. +fcFirstDayOfWeek :: Lens' FloodlightConfiguration (Maybe Text) +fcFirstDayOfWeek + = lens _fcFirstDayOfWeek + (\ s a -> s{_fcFirstDayOfWeek = a}) + +-- | Settings for DCM Omniture integration. +fcOmnitureSettings :: Lens' FloodlightConfiguration (Maybe (Maybe OmnitureSettings)) +fcOmnitureSettings + = lens _fcOmnitureSettings + (\ s a -> s{_fcOmnitureSettings = a}) + +-- | List of standard variables enabled for this configuration. Acceptable +-- values are: - \"ORD\" - \"NUM\" +fcStandardVariableTypes :: Lens' FloodlightConfiguration [Text] +fcStandardVariableTypes + = lens _fcStandardVariableTypes + (\ s a -> s{_fcStandardVariableTypes = a}) + . _Default + . _Coerce + +instance FromJSON FloodlightConfiguration where + parseJSON + = withObject "FloodlightConfiguration" + (\ o -> + FloodlightConfiguration <$> + (o .:? "tagSettings") <*> + (o .:? "exposureToConversionEnabled") + <*> (o .:? "inAppAttributionTrackingEnabled") + <*> + (o .:? "thirdPartyAuthenticationTokens" .!= mempty) + <*> + (o .:? "kind" .!= + "dfareporting#floodlightConfiguration") + <*> (o .:? "advertiserId") + <*> (o .:? "analyticsDataSharingEnabled") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "idDimensionValue") + <*> (o .:? "lookbackConfiguration") + <*> (o .:? "accountId") + <*> (o .:? "id") + <*> (o .:? "sslRequired") + <*> + (o .:? "naturalSearchConversionAttributionOption") + <*> + (o .:? "userDefinedVariableConfigurations" .!= + mempty) + <*> (o .:? "subaccountId") + <*> (o .:? "firstDayOfWeek") + <*> (o .:? "omnitureSettings") + <*> (o .:? "standardVariableTypes" .!= mempty)) + +instance ToJSON FloodlightConfiguration where + toJSON FloodlightConfiguration{..} + = object + (catMaybes + [("tagSettings" .=) <$> _fcTagSettings, + ("exposureToConversionEnabled" .=) <$> + _fcExposureToConversionEnabled, + ("inAppAttributionTrackingEnabled" .=) <$> + _fcInAppAttributionTrackingEnabled, + ("thirdPartyAuthenticationTokens" .=) <$> + _fcThirdPartyAuthenticationTokens, + Just ("kind" .= _fcKind), + ("advertiserId" .=) <$> _fcAdvertiserId, + ("analyticsDataSharingEnabled" .=) <$> + _fcAnalyticsDataSharingEnabled, + ("advertiserIdDimensionValue" .=) <$> + _fcAdvertiserIdDimensionValue, + ("idDimensionValue" .=) <$> _fcIdDimensionValue, + ("lookbackConfiguration" .=) <$> + _fcLookbackConfiguration, + ("accountId" .=) <$> _fcAccountId, + ("id" .=) <$> _fcId, + ("sslRequired" .=) <$> _fcSslRequired, + ("naturalSearchConversionAttributionOption" .=) <$> + _fcNaturalSearchConversionAttributionOption, + ("userDefinedVariableConfigurations" .=) <$> + _fcUserDefinedVariableConfigurations, + ("subaccountId" .=) <$> _fcSubaccountId, + ("firstDayOfWeek" .=) <$> _fcFirstDayOfWeek, + ("omnitureSettings" .=) <$> _fcOmnitureSettings, + ("standardVariableTypes" .=) <$> + _fcStandardVariableTypes]) + +-- | Advertiser Group List Response +-- +-- /See:/ 'advertiserGroupsListResponse' smart constructor. +data AdvertiserGroupsListResponse = AdvertiserGroupsListResponse + { _aglrNextPageToken :: !(Maybe Text) + , _aglrKind :: !Text + , _aglrAdvertiserGroups :: !(Maybe [Maybe AdvertiserGroup]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aglrNextPageToken' +-- +-- * 'aglrKind' +-- +-- * 'aglrAdvertiserGroups' +advertiserGroupsListResponse + :: AdvertiserGroupsListResponse +advertiserGroupsListResponse = + AdvertiserGroupsListResponse + { _aglrNextPageToken = Nothing + , _aglrKind = "dfareporting#advertiserGroupsListResponse" + , _aglrAdvertiserGroups = Nothing + } + +-- | Pagination token to be used for the next list operation. +aglrNextPageToken :: Lens' AdvertiserGroupsListResponse (Maybe Text) +aglrNextPageToken + = lens _aglrNextPageToken + (\ s a -> s{_aglrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#advertiserGroupsListResponse\". +aglrKind :: Lens' AdvertiserGroupsListResponse Text +aglrKind = lens _aglrKind (\ s a -> s{_aglrKind = a}) + +-- | Advertiser group collection. +aglrAdvertiserGroups :: Lens' AdvertiserGroupsListResponse [Maybe AdvertiserGroup] +aglrAdvertiserGroups + = lens _aglrAdvertiserGroups + (\ s a -> s{_aglrAdvertiserGroups = a}) + . _Default + . _Coerce + +instance FromJSON AdvertiserGroupsListResponse where + parseJSON + = withObject "AdvertiserGroupsListResponse" + (\ o -> + AdvertiserGroupsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#advertiserGroupsListResponse") + <*> (o .:? "advertiserGroups" .!= mempty)) + +instance ToJSON AdvertiserGroupsListResponse where + toJSON AdvertiserGroupsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _aglrNextPageToken, + Just ("kind" .= _aglrKind), + ("advertiserGroups" .=) <$> _aglrAdvertiserGroups]) + +-- | Floodlight Activity Group List Response +-- +-- /See:/ 'floodlightActivityGroupsListResponse' smart constructor. +data FloodlightActivityGroupsListResponse = FloodlightActivityGroupsListResponse + { _faglrNextPageToken :: !(Maybe Text) + , _faglrKind :: !Text + , _faglrFloodlightActivityGroups :: !(Maybe [Maybe FloodlightActivityGroup]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faglrNextPageToken' +-- +-- * 'faglrKind' +-- +-- * 'faglrFloodlightActivityGroups' +floodlightActivityGroupsListResponse + :: FloodlightActivityGroupsListResponse +floodlightActivityGroupsListResponse = + FloodlightActivityGroupsListResponse + { _faglrNextPageToken = Nothing + , _faglrKind = "dfareporting#floodlightActivityGroupsListResponse" + , _faglrFloodlightActivityGroups = Nothing + } + +-- | Pagination token to be used for the next list operation. +faglrNextPageToken :: Lens' FloodlightActivityGroupsListResponse (Maybe Text) +faglrNextPageToken + = lens _faglrNextPageToken + (\ s a -> s{_faglrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightActivityGroupsListResponse\". +faglrKind :: Lens' FloodlightActivityGroupsListResponse Text +faglrKind + = lens _faglrKind (\ s a -> s{_faglrKind = a}) + +-- | Floodlight activity group collection. +faglrFloodlightActivityGroups :: Lens' FloodlightActivityGroupsListResponse [Maybe FloodlightActivityGroup] +faglrFloodlightActivityGroups + = lens _faglrFloodlightActivityGroups + (\ s a -> s{_faglrFloodlightActivityGroups = a}) + . _Default + . _Coerce + +instance FromJSON + FloodlightActivityGroupsListResponse where + parseJSON + = withObject "FloodlightActivityGroupsListResponse" + (\ o -> + FloodlightActivityGroupsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#floodlightActivityGroupsListResponse") + <*> (o .:? "floodlightActivityGroups" .!= mempty)) + +instance ToJSON FloodlightActivityGroupsListResponse + where + toJSON FloodlightActivityGroupsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _faglrNextPageToken, + Just ("kind" .= _faglrKind), + ("floodlightActivityGroups" .=) <$> + _faglrFloodlightActivityGroups]) + +-- | Rich Media Exit Override. +-- +-- /See:/ 'richMediaExitOverride' smart constructor. +data RichMediaExitOverride = RichMediaExitOverride + { _rmeoUseCustomExitUrl :: !(Maybe Bool) + , _rmeoExitId :: !(Maybe Int64) + , _rmeoCustomExitUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RichMediaExitOverride' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmeoUseCustomExitUrl' +-- +-- * 'rmeoExitId' +-- +-- * 'rmeoCustomExitUrl' +richMediaExitOverride + :: RichMediaExitOverride +richMediaExitOverride = + RichMediaExitOverride + { _rmeoUseCustomExitUrl = Nothing + , _rmeoExitId = Nothing + , _rmeoCustomExitUrl = Nothing + } + +-- | Whether to use the custom exit URL. +rmeoUseCustomExitUrl :: Lens' RichMediaExitOverride (Maybe Bool) +rmeoUseCustomExitUrl + = lens _rmeoUseCustomExitUrl + (\ s a -> s{_rmeoUseCustomExitUrl = a}) + +-- | ID for the override to refer to a specific exit in the creative. +rmeoExitId :: Lens' RichMediaExitOverride (Maybe Int64) +rmeoExitId + = lens _rmeoExitId (\ s a -> s{_rmeoExitId = a}) + +-- | Click-through URL to override the default exit URL. Applicable if the +-- useCustomExitUrl field is set to true. +rmeoCustomExitUrl :: Lens' RichMediaExitOverride (Maybe Text) +rmeoCustomExitUrl + = lens _rmeoCustomExitUrl + (\ s a -> s{_rmeoCustomExitUrl = a}) + +instance FromJSON RichMediaExitOverride where + parseJSON + = withObject "RichMediaExitOverride" + (\ o -> + RichMediaExitOverride <$> + (o .:? "useCustomExitUrl") <*> (o .:? "exitId") <*> + (o .:? "customExitUrl")) + +instance ToJSON RichMediaExitOverride where + toJSON RichMediaExitOverride{..} + = object + (catMaybes + [("useCustomExitUrl" .=) <$> _rmeoUseCustomExitUrl, + ("exitId" .=) <$> _rmeoExitId, + ("customExitUrl" .=) <$> _rmeoCustomExitUrl]) + +-- | Creative Assignment. +-- +-- /See:/ 'creativeAssignment' smart constructor. +data CreativeAssignment = CreativeAssignment + { _caCreativeGroupAssignments :: !(Maybe [Maybe CreativeGroupAssignment]) + , _caStartTime :: !(Maybe UTCTime) + , _caWeight :: !(Maybe Int32) + , _caRichMediaExitOverrides :: !(Maybe [Maybe RichMediaExitOverride]) + , _caSslCompliant :: !(Maybe Bool) + , _caCreativeId :: !(Maybe Int64) + , _caClickThroughUrl :: !(Maybe (Maybe ClickThroughURL)) + , _caApplyEventTags :: !(Maybe Bool) + , _caActive :: !(Maybe Bool) + , _caSequence :: !(Maybe Int32) + , _caEndTime :: !(Maybe UTCTime) + , _caCompanionCreativeOverrides :: !(Maybe [Maybe CompanionClickThroughOverride]) + , _caCreativeIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caCreativeGroupAssignments' +-- +-- * 'caStartTime' +-- +-- * 'caWeight' +-- +-- * 'caRichMediaExitOverrides' +-- +-- * 'caSslCompliant' +-- +-- * 'caCreativeId' +-- +-- * 'caClickThroughUrl' +-- +-- * 'caApplyEventTags' +-- +-- * 'caActive' +-- +-- * 'caSequence' +-- +-- * 'caEndTime' +-- +-- * 'caCompanionCreativeOverrides' +-- +-- * 'caCreativeIdDimensionValue' +creativeAssignment + :: CreativeAssignment +creativeAssignment = + CreativeAssignment + { _caCreativeGroupAssignments = Nothing + , _caStartTime = Nothing + , _caWeight = Nothing + , _caRichMediaExitOverrides = Nothing + , _caSslCompliant = Nothing + , _caCreativeId = Nothing + , _caClickThroughUrl = Nothing + , _caApplyEventTags = Nothing + , _caActive = Nothing + , _caSequence = Nothing + , _caEndTime = Nothing + , _caCompanionCreativeOverrides = Nothing + , _caCreativeIdDimensionValue = Nothing + } + +-- | Creative group assignments for this creative assignment. Only one +-- assignment per creative group number is allowed for a maximum of two +-- assignments. +caCreativeGroupAssignments :: Lens' CreativeAssignment [Maybe CreativeGroupAssignment] +caCreativeGroupAssignments + = lens _caCreativeGroupAssignments + (\ s a -> s{_caCreativeGroupAssignments = a}) + . _Default + . _Coerce + +-- | Date and time that the assigned creative should start serving. +caStartTime :: Lens' CreativeAssignment (Maybe UTCTime) +caStartTime + = lens _caStartTime (\ s a -> s{_caStartTime = a}) + +-- | Weight of the creative assignment, applicable when the rotation type is +-- CREATIVE_ROTATION_TYPE_RANDOM. +caWeight :: Lens' CreativeAssignment (Maybe Int32) +caWeight = lens _caWeight (\ s a -> s{_caWeight = a}) + +-- | Rich media exit overrides for this creative assignment. Applicable when +-- the creative type is any of the following: - RICH_MEDIA_INPAGE - +-- RICH_MEDIA_INPAGE_FLOATING - RICH_MEDIA_IM_EXPAND - RICH_MEDIA_EXPANDING +-- - RICH_MEDIA_INTERSTITIAL_FLOAT - RICH_MEDIA_MOBILE_IN_APP - +-- RICH_MEDIA_MULTI_FLOATING - RICH_MEDIA_PEEL_DOWN - ADVANCED_BANNER - +-- VPAID_LINEAR - VPAID_NON_LINEAR +caRichMediaExitOverrides :: Lens' CreativeAssignment [Maybe RichMediaExitOverride] +caRichMediaExitOverrides + = lens _caRichMediaExitOverrides + (\ s a -> s{_caRichMediaExitOverrides = a}) + . _Default + . _Coerce + +-- | Whether the creative to be assigned is SSL-compliant. This is a +-- read-only field that is auto-generated when the ad is inserted or +-- updated. +caSslCompliant :: Lens' CreativeAssignment (Maybe Bool) +caSslCompliant + = lens _caSslCompliant + (\ s a -> s{_caSslCompliant = a}) + +-- | ID of the creative to be assigned. This is a required field. +caCreativeId :: Lens' CreativeAssignment (Maybe Int64) +caCreativeId + = lens _caCreativeId (\ s a -> s{_caCreativeId = a}) + +-- | Click-through URL of the creative assignment. +caClickThroughUrl :: Lens' CreativeAssignment (Maybe (Maybe ClickThroughURL)) +caClickThroughUrl + = lens _caClickThroughUrl + (\ s a -> s{_caClickThroughUrl = a}) + +-- | Whether applicable event tags should fire when this creative assignment +-- is rendered. If this value is unset when the ad is inserted or updated, +-- it will default to true for all creative types EXCEPT for +-- INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. +caApplyEventTags :: Lens' CreativeAssignment (Maybe Bool) +caApplyEventTags + = lens _caApplyEventTags + (\ s a -> s{_caApplyEventTags = a}) + +-- | Whether this creative assignment is active. When true, the creative will +-- be included in the ad\'s rotation. +caActive :: Lens' CreativeAssignment (Maybe Bool) +caActive = lens _caActive (\ s a -> s{_caActive = a}) + +-- | Sequence number of the creative assignment, applicable when the rotation +-- type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. +caSequence :: Lens' CreativeAssignment (Maybe Int32) +caSequence + = lens _caSequence (\ s a -> s{_caSequence = a}) + +-- | Date and time that the assigned creative should stop serving. Must be +-- later than the start time. +caEndTime :: Lens' CreativeAssignment (Maybe UTCTime) +caEndTime + = lens _caEndTime (\ s a -> s{_caEndTime = a}) + +-- | Companion creative overrides for this creative assignment. Applicable to +-- video ads. +caCompanionCreativeOverrides :: Lens' CreativeAssignment [Maybe CompanionClickThroughOverride] +caCompanionCreativeOverrides + = lens _caCompanionCreativeOverrides + (\ s a -> s{_caCompanionCreativeOverrides = a}) + . _Default + . _Coerce + +-- | Dimension value for the ID of the creative. This is a read-only, +-- auto-generated field. +caCreativeIdDimensionValue :: Lens' CreativeAssignment (Maybe (Maybe DimensionValue)) +caCreativeIdDimensionValue + = lens _caCreativeIdDimensionValue + (\ s a -> s{_caCreativeIdDimensionValue = a}) + +instance FromJSON CreativeAssignment where + parseJSON + = withObject "CreativeAssignment" + (\ o -> + CreativeAssignment <$> + (o .:? "creativeGroupAssignments" .!= mempty) <*> + (o .:? "startTime") + <*> (o .:? "weight") + <*> (o .:? "richMediaExitOverrides" .!= mempty) + <*> (o .:? "sslCompliant") + <*> (o .:? "creativeId") + <*> (o .:? "clickThroughUrl") + <*> (o .:? "applyEventTags") + <*> (o .:? "active") + <*> (o .:? "sequence") + <*> (o .:? "endTime") + <*> (o .:? "companionCreativeOverrides" .!= mempty) + <*> (o .:? "creativeIdDimensionValue")) + +instance ToJSON CreativeAssignment where + toJSON CreativeAssignment{..} + = object + (catMaybes + [("creativeGroupAssignments" .=) <$> + _caCreativeGroupAssignments, + ("startTime" .=) <$> _caStartTime, + ("weight" .=) <$> _caWeight, + ("richMediaExitOverrides" .=) <$> + _caRichMediaExitOverrides, + ("sslCompliant" .=) <$> _caSslCompliant, + ("creativeId" .=) <$> _caCreativeId, + ("clickThroughUrl" .=) <$> _caClickThroughUrl, + ("applyEventTags" .=) <$> _caApplyEventTags, + ("active" .=) <$> _caActive, + ("sequence" .=) <$> _caSequence, + ("endTime" .=) <$> _caEndTime, + ("companionCreativeOverrides" .=) <$> + _caCompanionCreativeOverrides, + ("creativeIdDimensionValue" .=) <$> + _caCreativeIdDimensionValue]) + +-- | Represents the list of user profiles. +-- +-- /See:/ 'userProfileList' smart constructor. +data UserProfileList = UserProfileList + { _uplEtag :: !(Maybe Text) + , _uplKind :: !Text + , _uplItems :: !(Maybe [Maybe UserProfile]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfileList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uplEtag' +-- +-- * 'uplKind' +-- +-- * 'uplItems' +userProfileList + :: UserProfileList +userProfileList = + UserProfileList + { _uplEtag = Nothing + , _uplKind = "dfareporting#userProfileList" + , _uplItems = Nothing + } + +-- | The eTag of this response for caching purposes. +uplEtag :: Lens' UserProfileList (Maybe Text) +uplEtag = lens _uplEtag (\ s a -> s{_uplEtag = a}) + +-- | The kind of list this is, in this case dfareporting#userProfileList. +uplKind :: Lens' UserProfileList Text +uplKind = lens _uplKind (\ s a -> s{_uplKind = a}) + +-- | The user profiles returned in this response. +uplItems :: Lens' UserProfileList [Maybe UserProfile] +uplItems + = lens _uplItems (\ s a -> s{_uplItems = a}) . + _Default + . _Coerce + +instance FromJSON UserProfileList where + parseJSON + = withObject "UserProfileList" + (\ o -> + UserProfileList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "dfareporting#userProfileList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON UserProfileList where + toJSON UserProfileList{..} + = object + (catMaybes + [("etag" .=) <$> _uplEtag, Just ("kind" .= _uplKind), + ("items" .=) <$> _uplItems]) + +-- | Directory Site Contact List Response +-- +-- /See:/ 'directorySiteContactsListResponse' smart constructor. +data DirectorySiteContactsListResponse = DirectorySiteContactsListResponse + { _dsclrNextPageToken :: !(Maybe Text) + , _dsclrKind :: !Text + , _dsclrDirectorySiteContacts :: !(Maybe [Maybe DirectorySiteContact]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteContactsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsclrNextPageToken' +-- +-- * 'dsclrKind' +-- +-- * 'dsclrDirectorySiteContacts' +directorySiteContactsListResponse + :: DirectorySiteContactsListResponse +directorySiteContactsListResponse = + DirectorySiteContactsListResponse + { _dsclrNextPageToken = Nothing + , _dsclrKind = "dfareporting#directorySiteContactsListResponse" + , _dsclrDirectorySiteContacts = Nothing + } + +-- | Pagination token to be used for the next list operation. +dsclrNextPageToken :: Lens' DirectorySiteContactsListResponse (Maybe Text) +dsclrNextPageToken + = lens _dsclrNextPageToken + (\ s a -> s{_dsclrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#directorySiteContactsListResponse\". +dsclrKind :: Lens' DirectorySiteContactsListResponse Text +dsclrKind + = lens _dsclrKind (\ s a -> s{_dsclrKind = a}) + +-- | Directory site contact collection +dsclrDirectorySiteContacts :: Lens' DirectorySiteContactsListResponse [Maybe DirectorySiteContact] +dsclrDirectorySiteContacts + = lens _dsclrDirectorySiteContacts + (\ s a -> s{_dsclrDirectorySiteContacts = a}) + . _Default + . _Coerce + +instance FromJSON DirectorySiteContactsListResponse + where + parseJSON + = withObject "DirectorySiteContactsListResponse" + (\ o -> + DirectorySiteContactsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#directorySiteContactsListResponse") + <*> (o .:? "directorySiteContacts" .!= mempty)) + +instance ToJSON DirectorySiteContactsListResponse + where + toJSON DirectorySiteContactsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dsclrNextPageToken, + Just ("kind" .= _dsclrKind), + ("directorySiteContacts" .=) <$> + _dsclrDirectorySiteContacts]) + +-- | Placement GenerateTags Response +-- +-- /See:/ 'placementsGenerateTagsResponse' smart constructor. +data PlacementsGenerateTagsResponse = PlacementsGenerateTagsResponse + { _pgtrKind :: !Text + , _pgtrPlacementTags :: !(Maybe [Maybe PlacementTag]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsGenerateTagsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgtrKind' +-- +-- * 'pgtrPlacementTags' +placementsGenerateTagsResponse + :: PlacementsGenerateTagsResponse +placementsGenerateTagsResponse = + PlacementsGenerateTagsResponse + { _pgtrKind = "dfareporting#placementsGenerateTagsResponse" + , _pgtrPlacementTags = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementsGenerateTagsResponse\". +pgtrKind :: Lens' PlacementsGenerateTagsResponse Text +pgtrKind = lens _pgtrKind (\ s a -> s{_pgtrKind = a}) + +-- | Set of generated tags for the specified placements. +pgtrPlacementTags :: Lens' PlacementsGenerateTagsResponse [Maybe PlacementTag] +pgtrPlacementTags + = lens _pgtrPlacementTags + (\ s a -> s{_pgtrPlacementTags = a}) + . _Default + . _Coerce + +instance FromJSON PlacementsGenerateTagsResponse + where + parseJSON + = withObject "PlacementsGenerateTagsResponse" + (\ o -> + PlacementsGenerateTagsResponse <$> + (o .:? "kind" .!= + "dfareporting#placementsGenerateTagsResponse") + <*> (o .:? "placementTags" .!= mempty)) + +instance ToJSON PlacementsGenerateTagsResponse where + toJSON PlacementsGenerateTagsResponse{..} + = object + (catMaybes + [Just ("kind" .= _pgtrKind), + ("placementTags" .=) <$> _pgtrPlacementTags]) + +-- | Creative Field List Response +-- +-- /See:/ 'creativeFieldsListResponse' smart constructor. +data CreativeFieldsListResponse = CreativeFieldsListResponse + { _cflrNextPageToken :: !(Maybe Text) + , _cflrKind :: !Text + , _cflrCreativeFields :: !(Maybe [Maybe CreativeField]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cflrNextPageToken' +-- +-- * 'cflrKind' +-- +-- * 'cflrCreativeFields' +creativeFieldsListResponse + :: CreativeFieldsListResponse +creativeFieldsListResponse = + CreativeFieldsListResponse + { _cflrNextPageToken = Nothing + , _cflrKind = "dfareporting#creativeFieldsListResponse" + , _cflrCreativeFields = Nothing + } + +-- | Pagination token to be used for the next list operation. +cflrNextPageToken :: Lens' CreativeFieldsListResponse (Maybe Text) +cflrNextPageToken + = lens _cflrNextPageToken + (\ s a -> s{_cflrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeFieldsListResponse\". +cflrKind :: Lens' CreativeFieldsListResponse Text +cflrKind = lens _cflrKind (\ s a -> s{_cflrKind = a}) + +-- | Creative field collection. +cflrCreativeFields :: Lens' CreativeFieldsListResponse [Maybe CreativeField] +cflrCreativeFields + = lens _cflrCreativeFields + (\ s a -> s{_cflrCreativeFields = a}) + . _Default + . _Coerce + +instance FromJSON CreativeFieldsListResponse where + parseJSON + = withObject "CreativeFieldsListResponse" + (\ o -> + CreativeFieldsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#creativeFieldsListResponse") + <*> (o .:? "creativeFields" .!= mempty)) + +instance ToJSON CreativeFieldsListResponse where + toJSON CreativeFieldsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _cflrNextPageToken, + Just ("kind" .= _cflrKind), + ("creativeFields" .=) <$> _cflrCreativeFields]) + +-- | Order document List Response +-- +-- /See:/ 'orderDocumentsListResponse' smart constructor. +data OrderDocumentsListResponse = OrderDocumentsListResponse + { _odlrNextPageToken :: !(Maybe Text) + , _odlrKind :: !Text + , _odlrOrderDocuments :: !(Maybe [Maybe OrderDocument]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderDocumentsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odlrNextPageToken' +-- +-- * 'odlrKind' +-- +-- * 'odlrOrderDocuments' +orderDocumentsListResponse + :: OrderDocumentsListResponse +orderDocumentsListResponse = + OrderDocumentsListResponse + { _odlrNextPageToken = Nothing + , _odlrKind = "dfareporting#orderDocumentsListResponse" + , _odlrOrderDocuments = Nothing + } + +-- | Pagination token to be used for the next list operation. +odlrNextPageToken :: Lens' OrderDocumentsListResponse (Maybe Text) +odlrNextPageToken + = lens _odlrNextPageToken + (\ s a -> s{_odlrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#orderDocumentsListResponse\". +odlrKind :: Lens' OrderDocumentsListResponse Text +odlrKind = lens _odlrKind (\ s a -> s{_odlrKind = a}) + +-- | Order document collection +odlrOrderDocuments :: Lens' OrderDocumentsListResponse [Maybe OrderDocument] +odlrOrderDocuments + = lens _odlrOrderDocuments + (\ s a -> s{_odlrOrderDocuments = a}) + . _Default + . _Coerce + +instance FromJSON OrderDocumentsListResponse where + parseJSON + = withObject "OrderDocumentsListResponse" + (\ o -> + OrderDocumentsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#orderDocumentsListResponse") + <*> (o .:? "orderDocuments" .!= mempty)) + +instance ToJSON OrderDocumentsListResponse where + toJSON OrderDocumentsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _odlrNextPageToken, + Just ("kind" .= _odlrKind), + ("orderDocuments" .=) <$> _odlrOrderDocuments]) + +-- | Contains properties of a site. +-- +-- /See:/ 'site' smart constructor. +data Site = Site + { _sitKind :: !Text + , _sitKeyName :: !(Maybe Text) + , _sitSiteContacts :: !(Maybe [Maybe SiteContact]) + , _sitSiteSettings :: !(Maybe (Maybe SiteSettings)) + , _sitIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _sitDirectorySiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _sitAccountId :: !(Maybe Int64) + , _sitName :: !(Maybe Text) + , _sitDirectorySiteId :: !(Maybe Int64) + , _sitId :: !(Maybe Int64) + , _sitSubaccountId :: !(Maybe Int64) + , _sitApproved :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Site' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sitKind' +-- +-- * 'sitKeyName' +-- +-- * 'sitSiteContacts' +-- +-- * 'sitSiteSettings' +-- +-- * 'sitIdDimensionValue' +-- +-- * 'sitDirectorySiteIdDimensionValue' +-- +-- * 'sitAccountId' +-- +-- * 'sitName' +-- +-- * 'sitDirectorySiteId' +-- +-- * 'sitId' +-- +-- * 'sitSubaccountId' +-- +-- * 'sitApproved' +site + :: Site +site = + Site + { _sitKind = "dfareporting#site" + , _sitKeyName = Nothing + , _sitSiteContacts = Nothing + , _sitSiteSettings = Nothing + , _sitIdDimensionValue = Nothing + , _sitDirectorySiteIdDimensionValue = Nothing + , _sitAccountId = Nothing + , _sitName = Nothing + , _sitDirectorySiteId = Nothing + , _sitId = Nothing + , _sitSubaccountId = Nothing + , _sitApproved = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#site\". +sitKind :: Lens' Site Text +sitKind = lens _sitKind (\ s a -> s{_sitKind = a}) + +-- | Key name of this site. This is a read-only, auto-generated field. +sitKeyName :: Lens' Site (Maybe Text) +sitKeyName + = lens _sitKeyName (\ s a -> s{_sitKeyName = a}) + +-- | Site contacts. +sitSiteContacts :: Lens' Site [Maybe SiteContact] +sitSiteContacts + = lens _sitSiteContacts + (\ s a -> s{_sitSiteContacts = a}) + . _Default + . _Coerce + +-- | Site-wide settings. +sitSiteSettings :: Lens' Site (Maybe (Maybe SiteSettings)) +sitSiteSettings + = lens _sitSiteSettings + (\ s a -> s{_sitSiteSettings = a}) + +-- | Dimension value for the ID of this site. This is a read-only, +-- auto-generated field. +sitIdDimensionValue :: Lens' Site (Maybe (Maybe DimensionValue)) +sitIdDimensionValue + = lens _sitIdDimensionValue + (\ s a -> s{_sitIdDimensionValue = a}) + +-- | Dimension value for the ID of the directory site. This is a read-only, +-- auto-generated field. +sitDirectorySiteIdDimensionValue :: Lens' Site (Maybe (Maybe DimensionValue)) +sitDirectorySiteIdDimensionValue + = lens _sitDirectorySiteIdDimensionValue + (\ s a -> s{_sitDirectorySiteIdDimensionValue = a}) + +-- | Account ID of this site. This is a read-only field that can be left +-- blank. +sitAccountId :: Lens' Site (Maybe Int64) +sitAccountId + = lens _sitAccountId (\ s a -> s{_sitAccountId = a}) + +-- | Name of this site.This is a required field. Must be less than 128 +-- characters long. If this site is under a subaccount, the name must be +-- unique among sites of the same subaccount. Otherwise, this site is a +-- top-level site, and the name must be unique among top-level sites of the +-- same account. +sitName :: Lens' Site (Maybe Text) +sitName = lens _sitName (\ s a -> s{_sitName = a}) + +-- | Directory site associated with this site. This is a required field that +-- is read-only after insertion. +sitDirectorySiteId :: Lens' Site (Maybe Int64) +sitDirectorySiteId + = lens _sitDirectorySiteId + (\ s a -> s{_sitDirectorySiteId = a}) + +-- | ID of this site. This is a read-only, auto-generated field. +sitId :: Lens' Site (Maybe Int64) +sitId = lens _sitId (\ s a -> s{_sitId = a}) + +-- | Subaccount ID of this site. This is a read-only field that can be left +-- blank. +sitSubaccountId :: Lens' Site (Maybe Int64) +sitSubaccountId + = lens _sitSubaccountId + (\ s a -> s{_sitSubaccountId = a}) + +-- | Whether this site is approved. +sitApproved :: Lens' Site (Maybe Bool) +sitApproved + = lens _sitApproved (\ s a -> s{_sitApproved = a}) + +instance FromJSON Site where + parseJSON + = withObject "Site" + (\ o -> + Site <$> + (o .:? "kind" .!= "dfareporting#site") <*> + (o .:? "keyName") + <*> (o .:? "siteContacts" .!= mempty) + <*> (o .:? "siteSettings") + <*> (o .:? "idDimensionValue") + <*> (o .:? "directorySiteIdDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "directorySiteId") + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "approved")) + +instance ToJSON Site where + toJSON Site{..} + = object + (catMaybes + [Just ("kind" .= _sitKind), + ("keyName" .=) <$> _sitKeyName, + ("siteContacts" .=) <$> _sitSiteContacts, + ("siteSettings" .=) <$> _sitSiteSettings, + ("idDimensionValue" .=) <$> _sitIdDimensionValue, + ("directorySiteIdDimensionValue" .=) <$> + _sitDirectorySiteIdDimensionValue, + ("accountId" .=) <$> _sitAccountId, + ("name" .=) <$> _sitName, + ("directorySiteId" .=) <$> _sitDirectorySiteId, + ("id" .=) <$> _sitId, + ("subaccountId" .=) <$> _sitSubaccountId, + ("approved" .=) <$> _sitApproved]) + +-- | Represents a sorted dimension. +-- +-- /See:/ 'sortedDimension' smart constructor. +data SortedDimension = SortedDimension + { _sdKind :: !Text + , _sdSortOrder :: !(Maybe Text) + , _sdName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SortedDimension' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdKind' +-- +-- * 'sdSortOrder' +-- +-- * 'sdName' +sortedDimension + :: SortedDimension +sortedDimension = + SortedDimension + { _sdKind = "dfareporting#sortedDimension" + , _sdSortOrder = Nothing + , _sdName = Nothing + } + +-- | The kind of resource this is, in this case dfareporting#sortedDimension. +sdKind :: Lens' SortedDimension Text +sdKind = lens _sdKind (\ s a -> s{_sdKind = a}) + +-- | An optional sort order for the dimension column. +sdSortOrder :: Lens' SortedDimension (Maybe Text) +sdSortOrder + = lens _sdSortOrder (\ s a -> s{_sdSortOrder = a}) + +-- | The name of the dimension. +sdName :: Lens' SortedDimension (Maybe Text) +sdName = lens _sdName (\ s a -> s{_sdName = a}) + +instance FromJSON SortedDimension where + parseJSON + = withObject "SortedDimension" + (\ o -> + SortedDimension <$> + (o .:? "kind" .!= "dfareporting#sortedDimension") <*> + (o .:? "sortOrder") + <*> (o .:? "name")) + +instance ToJSON SortedDimension where + toJSON SortedDimension{..} + = object + (catMaybes + [Just ("kind" .= _sdKind), + ("sortOrder" .=) <$> _sdSortOrder, + ("name" .=) <$> _sdName]) + +-- | Represents a recipient. +-- +-- /See:/ 'recipient' smart constructor. +data Recipient = Recipient + { _recEmail :: !(Maybe Text) + , _recKind :: !Text + , _recDeliveryType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Recipient' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'recEmail' +-- +-- * 'recKind' +-- +-- * 'recDeliveryType' +recipient + :: Recipient +recipient = + Recipient + { _recEmail = Nothing + , _recKind = "dfareporting#recipient" + , _recDeliveryType = Nothing + } + +-- | The email address of the recipient. +recEmail :: Lens' Recipient (Maybe Text) +recEmail = lens _recEmail (\ s a -> s{_recEmail = a}) + +-- | The kind of resource this is, in this case dfareporting#recipient. +recKind :: Lens' Recipient Text +recKind = lens _recKind (\ s a -> s{_recKind = a}) + +-- | The delivery type for the recipient. +recDeliveryType :: Lens' Recipient (Maybe Text) +recDeliveryType + = lens _recDeliveryType + (\ s a -> s{_recDeliveryType = a}) + +instance FromJSON Recipient where + parseJSON + = withObject "Recipient" + (\ o -> + Recipient <$> + (o .:? "email") <*> + (o .:? "kind" .!= "dfareporting#recipient") + <*> (o .:? "deliveryType")) + +instance ToJSON Recipient where + toJSON Recipient{..} + = object + (catMaybes + [("email" .=) <$> _recEmail, + Just ("kind" .= _recKind), + ("deliveryType" .=) <$> _recDeliveryType]) + +-- | Placement List Response +-- +-- /See:/ 'placementsListResponse' smart constructor. +data PlacementsListResponse = PlacementsListResponse + { _plaNextPageToken :: !(Maybe Text) + , _plaKind :: !Text + , _plaPlacements :: !(Maybe [Maybe Placement]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaNextPageToken' +-- +-- * 'plaKind' +-- +-- * 'plaPlacements' +placementsListResponse + :: PlacementsListResponse +placementsListResponse = + PlacementsListResponse + { _plaNextPageToken = Nothing + , _plaKind = "dfareporting#placementsListResponse" + , _plaPlacements = Nothing + } + +-- | Pagination token to be used for the next list operation. +plaNextPageToken :: Lens' PlacementsListResponse (Maybe Text) +plaNextPageToken + = lens _plaNextPageToken + (\ s a -> s{_plaNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementsListResponse\". +plaKind :: Lens' PlacementsListResponse Text +plaKind = lens _plaKind (\ s a -> s{_plaKind = a}) + +-- | Placement collection. +plaPlacements :: Lens' PlacementsListResponse [Maybe Placement] +plaPlacements + = lens _plaPlacements + (\ s a -> s{_plaPlacements = a}) + . _Default + . _Coerce + +instance FromJSON PlacementsListResponse where + parseJSON + = withObject "PlacementsListResponse" + (\ o -> + PlacementsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dfareporting#placementsListResponse") + <*> (o .:? "placements" .!= mempty)) + +instance ToJSON PlacementsListResponse where + toJSON PlacementsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _plaNextPageToken, + Just ("kind" .= _plaKind), + ("placements" .=) <$> _plaPlacements]) + +-- | Creative Asset. +-- +-- /See:/ 'creativeAsset' smart constructor. +data CreativeAsset = CreativeAsset + { _cZIndex :: !(Maybe Int32) + , _cPushdown :: !(Maybe Bool) + , _cVideoDuration :: !(Maybe Float) + , _cOriginalBackup :: !(Maybe Bool) + , _cWindowMode :: !(Maybe Text) + , _cFlashVersion :: !(Maybe Int32) + , _cPushdownDuration :: !(Maybe Float) + , _cSize :: !(Maybe (Maybe Size)) + , _cVerticallyLocked :: !(Maybe Bool) + , _cOffset :: !(Maybe (Maybe OffsetPosition)) + , _cStreamingServingUrl :: !(Maybe Text) + , _cZipFilesize :: !(Maybe Text) + , _cTransparency :: !(Maybe Bool) + , _cHideSelectionBoxes :: !(Maybe Bool) + , _cSslCompliant :: !(Maybe Bool) + , _cFileSize :: !(Maybe Int64) + , _cAssetIdentifier :: !(Maybe (Maybe CreativeAssetId)) + , _cDurationType :: !(Maybe Text) + , _cProgressiveServingUrl :: !(Maybe Text) + , _cActive :: !(Maybe Bool) + , _cRole :: !(Maybe Text) + , _cMimeType :: !(Maybe Text) + , _cPositionTopUnit :: !(Maybe Text) + , _cPositionLeftUnit :: !(Maybe Text) + , _cAlignment :: !(Maybe Text) + , _cExpandedDimension :: !(Maybe (Maybe Size)) + , _cZipFilename :: !(Maybe Text) + , _cActionScript3 :: !(Maybe Bool) + , _cDisplayType :: !(Maybe Text) + , _cChildAssetType :: !(Maybe Text) + , _cCollapsedSize :: !(Maybe (Maybe Size)) + , _cId :: !(Maybe Int64) + , _cBitRate :: !(Maybe Int32) + , _cCustomStartTimeValue :: !(Maybe Int32) + , _cStartTimeType :: !(Maybe Text) + , _cDuration :: !(Maybe Int32) + , _cArtworkType :: !(Maybe Text) + , _cHideFlashObjects :: !(Maybe Bool) + , _cDetectedFeatures :: !(Maybe [Text]) + , _cBackupImageExit :: !(Maybe (Maybe CreativeCustomEvent)) + , _cPosition :: !(Maybe (Maybe OffsetPosition)) + , _cHorizontallyLocked :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeAsset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cZIndex' +-- +-- * 'cPushdown' +-- +-- * 'cVideoDuration' +-- +-- * 'cOriginalBackup' +-- +-- * 'cWindowMode' +-- +-- * 'cFlashVersion' +-- +-- * 'cPushdownDuration' +-- +-- * 'cSize' +-- +-- * 'cVerticallyLocked' +-- +-- * 'cOffset' +-- +-- * 'cStreamingServingUrl' +-- +-- * 'cZipFilesize' +-- +-- * 'cTransparency' +-- +-- * 'cHideSelectionBoxes' +-- +-- * 'cSslCompliant' +-- +-- * 'cFileSize' +-- +-- * 'cAssetIdentifier' +-- +-- * 'cDurationType' +-- +-- * 'cProgressiveServingUrl' +-- +-- * 'cActive' +-- +-- * 'cRole' +-- +-- * 'cMimeType' +-- +-- * 'cPositionTopUnit' +-- +-- * 'cPositionLeftUnit' +-- +-- * 'cAlignment' +-- +-- * 'cExpandedDimension' +-- +-- * 'cZipFilename' +-- +-- * 'cActionScript3' +-- +-- * 'cDisplayType' +-- +-- * 'cChildAssetType' +-- +-- * 'cCollapsedSize' +-- +-- * 'cId' +-- +-- * 'cBitRate' +-- +-- * 'cCustomStartTimeValue' +-- +-- * 'cStartTimeType' +-- +-- * 'cDuration' +-- +-- * 'cArtworkType' +-- +-- * 'cHideFlashObjects' +-- +-- * 'cDetectedFeatures' +-- +-- * 'cBackupImageExit' +-- +-- * 'cPosition' +-- +-- * 'cHorizontallyLocked' +creativeAsset + :: CreativeAsset +creativeAsset = + CreativeAsset + { _cZIndex = Nothing + , _cPushdown = Nothing + , _cVideoDuration = Nothing + , _cOriginalBackup = Nothing + , _cWindowMode = Nothing + , _cFlashVersion = Nothing + , _cPushdownDuration = Nothing + , _cSize = Nothing + , _cVerticallyLocked = Nothing + , _cOffset = Nothing + , _cStreamingServingUrl = Nothing + , _cZipFilesize = Nothing + , _cTransparency = Nothing + , _cHideSelectionBoxes = Nothing + , _cSslCompliant = Nothing + , _cFileSize = Nothing + , _cAssetIdentifier = Nothing + , _cDurationType = Nothing + , _cProgressiveServingUrl = Nothing + , _cActive = Nothing + , _cRole = Nothing + , _cMimeType = Nothing + , _cPositionTopUnit = Nothing + , _cPositionLeftUnit = Nothing + , _cAlignment = Nothing + , _cExpandedDimension = Nothing + , _cZipFilename = Nothing + , _cActionScript3 = Nothing + , _cDisplayType = Nothing + , _cChildAssetType = Nothing + , _cCollapsedSize = Nothing + , _cId = Nothing + , _cBitRate = Nothing + , _cCustomStartTimeValue = Nothing + , _cStartTimeType = Nothing + , _cDuration = Nothing + , _cArtworkType = Nothing + , _cHideFlashObjects = Nothing + , _cDetectedFeatures = Nothing + , _cBackupImageExit = Nothing + , _cPosition = Nothing + , _cHorizontallyLocked = Nothing + } + +-- | zIndex value of an asset. This is a read-only field. Applicable to the +-- following creative types: all RICH_MEDIA.Additionally, only applicable +-- to assets whose displayType is NOT one of the following types: +-- ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. +cZIndex :: Lens' CreativeAsset (Maybe Int32) +cZIndex = lens _cZIndex (\ s a -> s{_cZIndex = a}) + +-- | Whether the asset pushes down other content. Applicable to the following +-- creative types: all RICH_MEDIA. Additionally, only applicable when the +-- asset offsets are 0, the collapsedSize.width matches size.width, and the +-- collapsedSize.height is less than size.height. +cPushdown :: Lens' CreativeAsset (Maybe Bool) +cPushdown + = lens _cPushdown (\ s a -> s{_cPushdown = a}) + +-- | Detected video duration for video asset. This is a read-only field. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +cVideoDuration :: Lens' CreativeAsset (Maybe Float) +cVideoDuration + = lens _cVideoDuration + (\ s a -> s{_cVideoDuration = a}) + +-- | Whether the backup asset is original or changed by the user in DCM. +-- Applicable to the following creative types: all RICH_MEDIA. +cOriginalBackup :: Lens' CreativeAsset (Maybe Bool) +cOriginalBackup + = lens _cOriginalBackup + (\ s a -> s{_cOriginalBackup = a}) + +-- | Window mode options for flash assets. Applicable to the following +-- creative types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, +-- RICH_MEDIA_IM_EXPAND, RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING. +cWindowMode :: Lens' CreativeAsset (Maybe Text) +cWindowMode + = lens _cWindowMode (\ s a -> s{_cWindowMode = a}) + +-- | Flash version of the asset. This is a read-only field. Applicable to the +-- following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, +-- and all VPAID. +cFlashVersion :: Lens' CreativeAsset (Maybe Int32) +cFlashVersion + = lens _cFlashVersion + (\ s a -> s{_cFlashVersion = a}) + +-- | Pushdown duration in seconds for an asset. Must be between 0 and 9.99. +-- Applicable to the following creative types: all RICH_MEDIA.Additionally, +-- only applicable when the asset pushdown field is true, the offsets are +-- 0, the collapsedSize.width matches size.width, and the +-- collapsedSize.height is less than size.height. +cPushdownDuration :: Lens' CreativeAsset (Maybe Float) +cPushdownDuration + = lens _cPushdownDuration + (\ s a -> s{_cPushdownDuration = a}) + +-- | Size associated with this creative asset. This is a required field when +-- applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, +-- this field will be automatically set using the actual size of the +-- associated image asset. Applicable to the following creative types: +-- ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and +-- all RICH_MEDIA. +cSize :: Lens' CreativeAsset (Maybe (Maybe Size)) +cSize = lens _cSize (\ s a -> s{_cSize = a}) + +-- | Whether the asset is vertically locked. This is a read-only field. +-- Applicable to the following creative types: all RICH_MEDIA. +cVerticallyLocked :: Lens' CreativeAsset (Maybe Bool) +cVerticallyLocked + = lens _cVerticallyLocked + (\ s a -> s{_cVerticallyLocked = a}) + +-- | Offset position for an asset in collapsed mode. This is a read-only +-- field. Applicable to the following creative types: all RICH_MEDIA and +-- all VPAID. Additionally, only applicable to assets whose displayType is +-- ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. +cOffset :: Lens' CreativeAsset (Maybe (Maybe OffsetPosition)) +cOffset = lens _cOffset (\ s a -> s{_cOffset = a}) + +-- | Streaming URL for video asset. This is a read-only field. Applicable to +-- the following creative types: INSTREAM_VIDEO and all VPAID. +cStreamingServingUrl :: Lens' CreativeAsset (Maybe Text) +cStreamingServingUrl + = lens _cStreamingServingUrl + (\ s a -> s{_cStreamingServingUrl = a}) + +-- | Size of zip file. This is a read-only field. Applicable to the following +-- creative types: HTML5_BANNER. +cZipFilesize :: Lens' CreativeAsset (Maybe Text) +cZipFilesize + = lens _cZipFilesize (\ s a -> s{_cZipFilesize = a}) + +-- | Whether the asset is transparent. Applicable to the following creative +-- types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets. +cTransparency :: Lens' CreativeAsset (Maybe Bool) +cTransparency + = lens _cTransparency + (\ s a -> s{_cTransparency = a}) + +-- | Whether to hide selection boxes flag for an asset. Applicable to the +-- following creative types: all RICH_MEDIA. +cHideSelectionBoxes :: Lens' CreativeAsset (Maybe Bool) +cHideSelectionBoxes + = lens _cHideSelectionBoxes + (\ s a -> s{_cHideSelectionBoxes = a}) + +-- | Whether the asset is SSL-compliant. This is a read-only field. +-- Applicable to all but the following creative types: all REDIRECT and +-- TRACKING_TEXT. +cSslCompliant :: Lens' CreativeAsset (Maybe Bool) +cSslCompliant + = lens _cSslCompliant + (\ s a -> s{_cSslCompliant = a}) + +-- | File size associated with this creative asset. This is a read-only +-- field. Applicable to all but the following creative types: all REDIRECT +-- and TRACKING_TEXT. +cFileSize :: Lens' CreativeAsset (Maybe Int64) +cFileSize + = lens _cFileSize (\ s a -> s{_cFileSize = a}) + +-- | Identifier of this asset. This is the same identifier returned during +-- creative asset insert operation. This is a required field. Applicable to +-- all but the following creative types: all REDIRECT and TRACKING_TEXT. +cAssetIdentifier :: Lens' CreativeAsset (Maybe (Maybe CreativeAssetId)) +cAssetIdentifier + = lens _cAssetIdentifier + (\ s a -> s{_cAssetIdentifier = a}) + +-- | Duration type for which an asset will be displayed. Applicable to the +-- following creative types: all RICH_MEDIA. +cDurationType :: Lens' CreativeAsset (Maybe Text) +cDurationType + = lens _cDurationType + (\ s a -> s{_cDurationType = a}) + +-- | Progressive URL for video asset. This is a read-only field. Applicable +-- to the following creative types: INSTREAM_VIDEO and all VPAID. +cProgressiveServingUrl :: Lens' CreativeAsset (Maybe Text) +cProgressiveServingUrl + = lens _cProgressiveServingUrl + (\ s a -> s{_cProgressiveServingUrl = a}) + +-- | Whether the video asset is active. This is a read-only field for +-- VPAID_NON_LINEAR assets. Applicable to the following creative types: +-- INSTREAM_VIDEO and all VPAID. +cActive :: Lens' CreativeAsset (Maybe Bool) +cActive = lens _cActive (\ s a -> s{_cActive = a}) + +-- | Role of the asset in relation to creative. Applicable to all but the +-- following creative types: all REDIRECT and TRACKING_TEXT. This is a +-- required field. PRIMARY applies to ENHANCED_BANNER, FLASH_INPAGE, +-- HTML5_BANNER, IMAGE, IMAGE_GALLERY, all RICH_MEDIA (which may contain +-- multiple primary assets), and all VPAID creatives. BACKUP_IMAGE applies +-- to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA, and all +-- VPAID creatives. ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to +-- FLASH_INPAGE creatives. OTHER refers to assets from sources other than +-- DCM, such as Studio uploaded assets, applicable to all RICH_MEDIA and +-- all VPAID creatives. PARENT_VIDEO refers to videos uploaded by the user +-- in DCM and is applicable to INSTREAM_VIDEO and VPAID_LINEAR creatives. +-- TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO +-- assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR creatives. +-- ALTERNATE_VIDEO refers to the DCM representation of child asset videos +-- from Studio, and is applicable to VPAID_LINEAR creatives. These cannot +-- be added or removed within DCM. For VPAID_LINEAR creatives, +-- PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO assets that are +-- marked active serve as backup in case the VPAID creative cannot be +-- served. Only PARENT_VIDEO assets can be added or removed for an +-- INSTREAM_VIDEO or VPAID_LINEAR creative. +cRole :: Lens' CreativeAsset (Maybe Text) +cRole = lens _cRole (\ s a -> s{_cRole = a}) + +-- | Detected MIME type for video asset. This is a read-only field. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +cMimeType :: Lens' CreativeAsset (Maybe Text) +cMimeType + = lens _cMimeType (\ s a -> s{_cMimeType = a}) + +-- | Offset top unit for an asset. This is a read-only field if the asset +-- displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following +-- creative types: all RICH_MEDIA. +cPositionTopUnit :: Lens' CreativeAsset (Maybe Text) +cPositionTopUnit + = lens _cPositionTopUnit + (\ s a -> s{_cPositionTopUnit = a}) + +-- | Offset left unit for an asset. This is a read-only field. Applicable to +-- the following creative types: all RICH_MEDIA. +cPositionLeftUnit :: Lens' CreativeAsset (Maybe Text) +cPositionLeftUnit + = lens _cPositionLeftUnit + (\ s a -> s{_cPositionLeftUnit = a}) + +-- | Possible alignments for an asset. This is a read-only field. Applicable +-- to the following creative types: RICH_MEDIA_MULTI_FLOATING. +cAlignment :: Lens' CreativeAsset (Maybe Text) +cAlignment + = lens _cAlignment (\ s a -> s{_cAlignment = a}) + +-- | Detected expanded dimension for video asset. This is a read-only field. +-- Applicable to the following creative types: INSTREAM_VIDEO and all +-- VPAID. +cExpandedDimension :: Lens' CreativeAsset (Maybe (Maybe Size)) +cExpandedDimension + = lens _cExpandedDimension + (\ s a -> s{_cExpandedDimension = a}) + +-- | File name of zip file. This is a read-only field. Applicable to the +-- following creative types: HTML5_BANNER. +cZipFilename :: Lens' CreativeAsset (Maybe Text) +cZipFilename + = lens _cZipFilename (\ s a -> s{_cZipFilename = a}) + +-- | Whether ActionScript3 is enabled for the flash asset. This is a +-- read-only field. Applicable to the following creative types: +-- FLASH_INPAGE and ENHANCED_BANNER. +cActionScript3 :: Lens' CreativeAsset (Maybe Bool) +cActionScript3 + = lens _cActionScript3 + (\ s a -> s{_cActionScript3 = a}) + +-- | Type of rich media asset. This is a read-only field. Applicable to the +-- following creative types: all RICH_MEDIA. +cDisplayType :: Lens' CreativeAsset (Maybe Text) +cDisplayType + = lens _cDisplayType (\ s a -> s{_cDisplayType = a}) + +-- | Rich media child asset type. This is a read-only field. Applicable to +-- the following creative types: all VPAID. +cChildAssetType :: Lens' CreativeAsset (Maybe Text) +cChildAssetType + = lens _cChildAssetType + (\ s a -> s{_cChildAssetType = a}) + +-- | Size of an asset when collapsed. This is a read-only field. Applicable +-- to the following creative types: all RICH_MEDIA and all VPAID. +-- Additionally, applicable to assets whose displayType is +-- ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. +cCollapsedSize :: Lens' CreativeAsset (Maybe (Maybe Size)) +cCollapsedSize + = lens _cCollapsedSize + (\ s a -> s{_cCollapsedSize = a}) + +-- | Numeric ID of this creative asset. This is a required field and should +-- not be modified. Applicable to all but the following creative types: all +-- REDIRECT and TRACKING_TEXT. +cId :: Lens' CreativeAsset (Maybe Int64) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | Detected bit-rate for video asset. This is a read-only field. Applicable +-- to the following creative types: INSTREAM_VIDEO and all VPAID. +cBitRate :: Lens' CreativeAsset (Maybe Int32) +cBitRate = lens _cBitRate (\ s a -> s{_cBitRate = a}) + +-- | Custom start time in seconds for making the asset visible. Applicable to +-- the following creative types: all RICH_MEDIA. +cCustomStartTimeValue :: Lens' CreativeAsset (Maybe Int32) +cCustomStartTimeValue + = lens _cCustomStartTimeValue + (\ s a -> s{_cCustomStartTimeValue = a}) + +-- | Initial wait time type before making the asset visible. Applicable to +-- the following creative types: all RICH_MEDIA. +cStartTimeType :: Lens' CreativeAsset (Maybe Text) +cStartTimeType + = lens _cStartTimeType + (\ s a -> s{_cStartTimeType = a}) + +-- | Duration in seconds for which an asset will be displayed. Applicable to +-- the following creative types: INSTREAM_VIDEO and VPAID_LINEAR. +cDuration :: Lens' CreativeAsset (Maybe Int32) +cDuration + = lens _cDuration (\ s a -> s{_cDuration = a}) + +-- | Artwork type of rich media creative. This is a read-only field. +-- Applicable to the following creative types: all RICH_MEDIA. +cArtworkType :: Lens' CreativeAsset (Maybe Text) +cArtworkType + = lens _cArtworkType (\ s a -> s{_cArtworkType = a}) + +-- | Whether to hide Flash objects flag for an asset. Applicable to the +-- following creative types: all RICH_MEDIA. +cHideFlashObjects :: Lens' CreativeAsset (Maybe Bool) +cHideFlashObjects + = lens _cHideFlashObjects + (\ s a -> s{_cHideFlashObjects = a}) + +-- | List of feature dependencies for the creative asset that are detected by +-- DCM. Feature dependencies are features that a browser must be able to +-- support in order to render your HTML5 creative correctly. This is a +-- read-only, auto-generated field. Applicable to the following creative +-- types: ENHANCED_BANNER and HTML5_BANNER. +cDetectedFeatures :: Lens' CreativeAsset [Text] +cDetectedFeatures + = lens _cDetectedFeatures + (\ s a -> s{_cDetectedFeatures = a}) + . _Default + . _Coerce + +-- | Exit event configured for the backup image. Applicable to the following +-- creative types: all RICH_MEDIA. +cBackupImageExit :: Lens' CreativeAsset (Maybe (Maybe CreativeCustomEvent)) +cBackupImageExit + = lens _cBackupImageExit + (\ s a -> s{_cBackupImageExit = a}) + +-- | Offset position for an asset. Applicable to the following creative +-- types: all RICH_MEDIA. +cPosition :: Lens' CreativeAsset (Maybe (Maybe OffsetPosition)) +cPosition + = lens _cPosition (\ s a -> s{_cPosition = a}) + +-- | Whether the asset is horizontally locked. This is a read-only field. +-- Applicable to the following creative types: all RICH_MEDIA. +cHorizontallyLocked :: Lens' CreativeAsset (Maybe Bool) +cHorizontallyLocked + = lens _cHorizontallyLocked + (\ s a -> s{_cHorizontallyLocked = a}) + +instance FromJSON CreativeAsset where + parseJSON + = withObject "CreativeAsset" + (\ o -> + CreativeAsset <$> + (o .:? "zIndex") <*> (o .:? "pushdown") <*> + (o .:? "videoDuration") + <*> (o .:? "originalBackup") + <*> (o .:? "windowMode") + <*> (o .:? "flashVersion") + <*> (o .:? "pushdownDuration") + <*> (o .:? "size") + <*> (o .:? "verticallyLocked") + <*> (o .:? "offset") + <*> (o .:? "streamingServingUrl") + <*> (o .:? "zipFilesize") + <*> (o .:? "transparency") + <*> (o .:? "hideSelectionBoxes") + <*> (o .:? "sslCompliant") + <*> (o .:? "fileSize") + <*> (o .:? "assetIdentifier") + <*> (o .:? "durationType") + <*> (o .:? "progressiveServingUrl") + <*> (o .:? "active") + <*> (o .:? "role") + <*> (o .:? "mimeType") + <*> (o .:? "positionTopUnit") + <*> (o .:? "positionLeftUnit") + <*> (o .:? "alignment") + <*> (o .:? "expandedDimension") + <*> (o .:? "zipFilename") + <*> (o .:? "actionScript3") + <*> (o .:? "displayType") + <*> (o .:? "childAssetType") + <*> (o .:? "collapsedSize") + <*> (o .:? "id") + <*> (o .:? "bitRate") + <*> (o .:? "customStartTimeValue") + <*> (o .:? "startTimeType") + <*> (o .:? "duration") + <*> (o .:? "artworkType") + <*> (o .:? "hideFlashObjects") + <*> (o .:? "detectedFeatures" .!= mempty) + <*> (o .:? "backupImageExit") + <*> (o .:? "position") + <*> (o .:? "horizontallyLocked")) + +instance ToJSON CreativeAsset where + toJSON CreativeAsset{..} + = object + (catMaybes + [("zIndex" .=) <$> _cZIndex, + ("pushdown" .=) <$> _cPushdown, + ("videoDuration" .=) <$> _cVideoDuration, + ("originalBackup" .=) <$> _cOriginalBackup, + ("windowMode" .=) <$> _cWindowMode, + ("flashVersion" .=) <$> _cFlashVersion, + ("pushdownDuration" .=) <$> _cPushdownDuration, + ("size" .=) <$> _cSize, + ("verticallyLocked" .=) <$> _cVerticallyLocked, + ("offset" .=) <$> _cOffset, + ("streamingServingUrl" .=) <$> _cStreamingServingUrl, + ("zipFilesize" .=) <$> _cZipFilesize, + ("transparency" .=) <$> _cTransparency, + ("hideSelectionBoxes" .=) <$> _cHideSelectionBoxes, + ("sslCompliant" .=) <$> _cSslCompliant, + ("fileSize" .=) <$> _cFileSize, + ("assetIdentifier" .=) <$> _cAssetIdentifier, + ("durationType" .=) <$> _cDurationType, + ("progressiveServingUrl" .=) <$> + _cProgressiveServingUrl, + ("active" .=) <$> _cActive, ("role" .=) <$> _cRole, + ("mimeType" .=) <$> _cMimeType, + ("positionTopUnit" .=) <$> _cPositionTopUnit, + ("positionLeftUnit" .=) <$> _cPositionLeftUnit, + ("alignment" .=) <$> _cAlignment, + ("expandedDimension" .=) <$> _cExpandedDimension, + ("zipFilename" .=) <$> _cZipFilename, + ("actionScript3" .=) <$> _cActionScript3, + ("displayType" .=) <$> _cDisplayType, + ("childAssetType" .=) <$> _cChildAssetType, + ("collapsedSize" .=) <$> _cCollapsedSize, + ("id" .=) <$> _cId, ("bitRate" .=) <$> _cBitRate, + ("customStartTimeValue" .=) <$> + _cCustomStartTimeValue, + ("startTimeType" .=) <$> _cStartTimeType, + ("duration" .=) <$> _cDuration, + ("artworkType" .=) <$> _cArtworkType, + ("hideFlashObjects" .=) <$> _cHideFlashObjects, + ("detectedFeatures" .=) <$> _cDetectedFeatures, + ("backupImageExit" .=) <$> _cBackupImageExit, + ("position" .=) <$> _cPosition, + ("horizontallyLocked" .=) <$> _cHorizontallyLocked]) + +-- | Metro List Response +-- +-- /See:/ 'metrosListResponse' smart constructor. +data MetrosListResponse = MetrosListResponse + { _mlrKind :: !Text + , _mlrMetros :: !(Maybe [Maybe Metro]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetrosListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlrKind' +-- +-- * 'mlrMetros' +metrosListResponse + :: MetrosListResponse +metrosListResponse = + MetrosListResponse + { _mlrKind = "dfareporting#metrosListResponse" + , _mlrMetros = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#metrosListResponse\". +mlrKind :: Lens' MetrosListResponse Text +mlrKind = lens _mlrKind (\ s a -> s{_mlrKind = a}) + +-- | Metro collection. +mlrMetros :: Lens' MetrosListResponse [Maybe Metro] +mlrMetros + = lens _mlrMetros (\ s a -> s{_mlrMetros = a}) . + _Default + . _Coerce + +instance FromJSON MetrosListResponse where + parseJSON + = withObject "MetrosListResponse" + (\ o -> + MetrosListResponse <$> + (o .:? "kind" .!= "dfareporting#metrosListResponse") + <*> (o .:? "metros" .!= mempty)) + +instance ToJSON MetrosListResponse where + toJSON MetrosListResponse{..} + = object + (catMaybes + [Just ("kind" .= _mlrKind), + ("metros" .=) <$> _mlrMetros]) + +-- | Contains properties of a package or roadblock. +-- +-- /See:/ 'placementGroup' smart constructor. +data PlacementGroup = PlacementGroup + { _pgPlacementStrategyId :: !(Maybe Int64) + , _pgSiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgPricingSchedule :: !(Maybe (Maybe PricingSchedule)) + , _pgKind :: !Text + , _pgCampaignIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgAdvertiserId :: !(Maybe Int64) + , _pgAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgCampaignId :: !(Maybe Int64) + , _pgIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgPlacementGroupType :: !(Maybe Text) + , _pgContentCategoryId :: !(Maybe Int64) + , _pgDirectorySiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgAccountId :: !(Maybe Int64) + , _pgName :: !(Maybe Text) + , _pgDirectorySiteId :: !(Maybe Int64) + , _pgCreateInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _pgChildPlacementIds :: !(Maybe [Int64]) + , _pgLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _pgId :: !(Maybe Int64) + , _pgPrimaryPlacementId :: !(Maybe Int64) + , _pgSubaccountId :: !(Maybe Int64) + , _pgExternalId :: !(Maybe Text) + , _pgComment :: !(Maybe Text) + , _pgPrimaryPlacementIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _pgSiteId :: !(Maybe Int64) + , _pgArchived :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgPlacementStrategyId' +-- +-- * 'pgSiteIdDimensionValue' +-- +-- * 'pgPricingSchedule' +-- +-- * 'pgKind' +-- +-- * 'pgCampaignIdDimensionValue' +-- +-- * 'pgAdvertiserId' +-- +-- * 'pgAdvertiserIdDimensionValue' +-- +-- * 'pgCampaignId' +-- +-- * 'pgIdDimensionValue' +-- +-- * 'pgPlacementGroupType' +-- +-- * 'pgContentCategoryId' +-- +-- * 'pgDirectorySiteIdDimensionValue' +-- +-- * 'pgAccountId' +-- +-- * 'pgName' +-- +-- * 'pgDirectorySiteId' +-- +-- * 'pgCreateInfo' +-- +-- * 'pgChildPlacementIds' +-- +-- * 'pgLastModifiedInfo' +-- +-- * 'pgId' +-- +-- * 'pgPrimaryPlacementId' +-- +-- * 'pgSubaccountId' +-- +-- * 'pgExternalId' +-- +-- * 'pgComment' +-- +-- * 'pgPrimaryPlacementIdDimensionValue' +-- +-- * 'pgSiteId' +-- +-- * 'pgArchived' +placementGroup + :: PlacementGroup +placementGroup = + PlacementGroup + { _pgPlacementStrategyId = Nothing + , _pgSiteIdDimensionValue = Nothing + , _pgPricingSchedule = Nothing + , _pgKind = "dfareporting#placementGroup" + , _pgCampaignIdDimensionValue = Nothing + , _pgAdvertiserId = Nothing + , _pgAdvertiserIdDimensionValue = Nothing + , _pgCampaignId = Nothing + , _pgIdDimensionValue = Nothing + , _pgPlacementGroupType = Nothing + , _pgContentCategoryId = Nothing + , _pgDirectorySiteIdDimensionValue = Nothing + , _pgAccountId = Nothing + , _pgName = Nothing + , _pgDirectorySiteId = Nothing + , _pgCreateInfo = Nothing + , _pgChildPlacementIds = Nothing + , _pgLastModifiedInfo = Nothing + , _pgId = Nothing + , _pgPrimaryPlacementId = Nothing + , _pgSubaccountId = Nothing + , _pgExternalId = Nothing + , _pgComment = Nothing + , _pgPrimaryPlacementIdDimensionValue = Nothing + , _pgSiteId = Nothing + , _pgArchived = Nothing + } + +-- | ID of the placement strategy assigned to this placement group. +pgPlacementStrategyId :: Lens' PlacementGroup (Maybe Int64) +pgPlacementStrategyId + = lens _pgPlacementStrategyId + (\ s a -> s{_pgPlacementStrategyId = a}) + +-- | Dimension value for the ID of the site. This is a read-only, +-- auto-generated field. +pgSiteIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgSiteIdDimensionValue + = lens _pgSiteIdDimensionValue + (\ s a -> s{_pgSiteIdDimensionValue = a}) + +-- | Pricing schedule of this placement group. This field is required on +-- insertion. +pgPricingSchedule :: Lens' PlacementGroup (Maybe (Maybe PricingSchedule)) +pgPricingSchedule + = lens _pgPricingSchedule + (\ s a -> s{_pgPricingSchedule = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placementGroup\". +pgKind :: Lens' PlacementGroup Text +pgKind = lens _pgKind (\ s a -> s{_pgKind = a}) + +-- | Dimension value for the ID of the campaign. This is a read-only, +-- auto-generated field. +pgCampaignIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgCampaignIdDimensionValue + = lens _pgCampaignIdDimensionValue + (\ s a -> s{_pgCampaignIdDimensionValue = a}) + +-- | Advertiser ID of this placement group. This is a required field on +-- insertion. +pgAdvertiserId :: Lens' PlacementGroup (Maybe Int64) +pgAdvertiserId + = lens _pgAdvertiserId + (\ s a -> s{_pgAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +pgAdvertiserIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgAdvertiserIdDimensionValue + = lens _pgAdvertiserIdDimensionValue + (\ s a -> s{_pgAdvertiserIdDimensionValue = a}) + +-- | Campaign ID of this placement group. This field is required on +-- insertion. +pgCampaignId :: Lens' PlacementGroup (Maybe Int64) +pgCampaignId + = lens _pgCampaignId (\ s a -> s{_pgCampaignId = a}) + +-- | Dimension value for the ID of this placement group. This is a read-only, +-- auto-generated field. +pgIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgIdDimensionValue + = lens _pgIdDimensionValue + (\ s a -> s{_pgIdDimensionValue = a}) + +-- | Type of this placement group. A package is a simple group of placements +-- that acts as a single pricing point for a group of tags. A roadblock is +-- a group of placements that not only acts as a single pricing point, but +-- also assumes that all the tags in it will be served at the same time. A +-- roadblock requires one of its assigned placements to be marked as +-- primary for reporting. This field is required on insertion. +pgPlacementGroupType :: Lens' PlacementGroup (Maybe Text) +pgPlacementGroupType + = lens _pgPlacementGroupType + (\ s a -> s{_pgPlacementGroupType = a}) + +-- | ID of the content category assigned to this placement group. +pgContentCategoryId :: Lens' PlacementGroup (Maybe Int64) +pgContentCategoryId + = lens _pgContentCategoryId + (\ s a -> s{_pgContentCategoryId = a}) + +-- | Dimension value for the ID of the directory site. This is a read-only, +-- auto-generated field. +pgDirectorySiteIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgDirectorySiteIdDimensionValue + = lens _pgDirectorySiteIdDimensionValue + (\ s a -> s{_pgDirectorySiteIdDimensionValue = a}) + +-- | Account ID of this placement group. This is a read-only field that can +-- be left blank. +pgAccountId :: Lens' PlacementGroup (Maybe Int64) +pgAccountId + = lens _pgAccountId (\ s a -> s{_pgAccountId = a}) + +-- | Name of this placement group. This is a required field and must be less +-- than 256 characters long. +pgName :: Lens' PlacementGroup (Maybe Text) +pgName = lens _pgName (\ s a -> s{_pgName = a}) + +-- | Directory site ID associated with this placement group. On insert, you +-- must set either this field or the site_id field to specify the site +-- associated with this placement group. This is a required field that is +-- read-only after insertion. +pgDirectorySiteId :: Lens' PlacementGroup (Maybe Int64) +pgDirectorySiteId + = lens _pgDirectorySiteId + (\ s a -> s{_pgDirectorySiteId = a}) + +-- | Information about the creation of this placement group. This is a +-- read-only field. +pgCreateInfo :: Lens' PlacementGroup (Maybe (Maybe LastModifiedInfo)) +pgCreateInfo + = lens _pgCreateInfo (\ s a -> s{_pgCreateInfo = a}) + +-- | IDs of placements which are assigned to this placement group. This is a +-- read-only, auto-generated field. +pgChildPlacementIds :: Lens' PlacementGroup [Int64] +pgChildPlacementIds + = lens _pgChildPlacementIds + (\ s a -> s{_pgChildPlacementIds = a}) + . _Default + . _Coerce + +-- | Information about the most recent modification of this placement group. +-- This is a read-only field. +pgLastModifiedInfo :: Lens' PlacementGroup (Maybe (Maybe LastModifiedInfo)) +pgLastModifiedInfo + = lens _pgLastModifiedInfo + (\ s a -> s{_pgLastModifiedInfo = a}) + +-- | ID of this placement group. This is a read-only, auto-generated field. +pgId :: Lens' PlacementGroup (Maybe Int64) +pgId = lens _pgId (\ s a -> s{_pgId = a}) + +-- | ID of the primary placement, used to calculate the media cost of a +-- roadblock (placement group). Modifying this field will automatically +-- modify the primary field on all affected roadblock child placements. +pgPrimaryPlacementId :: Lens' PlacementGroup (Maybe Int64) +pgPrimaryPlacementId + = lens _pgPrimaryPlacementId + (\ s a -> s{_pgPrimaryPlacementId = a}) + +-- | Subaccount ID of this placement group. This is a read-only field that +-- can be left blank. +pgSubaccountId :: Lens' PlacementGroup (Maybe Int64) +pgSubaccountId + = lens _pgSubaccountId + (\ s a -> s{_pgSubaccountId = a}) + +-- | External ID for this placement. +pgExternalId :: Lens' PlacementGroup (Maybe Text) +pgExternalId + = lens _pgExternalId (\ s a -> s{_pgExternalId = a}) + +-- | Comments for this placement group. +pgComment :: Lens' PlacementGroup (Maybe Text) +pgComment + = lens _pgComment (\ s a -> s{_pgComment = a}) + +-- | Dimension value for the ID of the primary placement. This is a +-- read-only, auto-generated field. +pgPrimaryPlacementIdDimensionValue :: Lens' PlacementGroup (Maybe (Maybe DimensionValue)) +pgPrimaryPlacementIdDimensionValue + = lens _pgPrimaryPlacementIdDimensionValue + (\ s a -> s{_pgPrimaryPlacementIdDimensionValue = a}) + +-- | Site ID associated with this placement group. On insert, you must set +-- either this field or the directorySiteId field to specify the site +-- associated with this placement group. This is a required field that is +-- read-only after insertion. +pgSiteId :: Lens' PlacementGroup (Maybe Int64) +pgSiteId = lens _pgSiteId (\ s a -> s{_pgSiteId = a}) + +-- | Whether this placement group is archived. +pgArchived :: Lens' PlacementGroup (Maybe Bool) +pgArchived + = lens _pgArchived (\ s a -> s{_pgArchived = a}) + +instance FromJSON PlacementGroup where + parseJSON + = withObject "PlacementGroup" + (\ o -> + PlacementGroup <$> + (o .:? "placementStrategyId") <*> + (o .:? "siteIdDimensionValue") + <*> (o .:? "pricingSchedule") + <*> (o .:? "kind" .!= "dfareporting#placementGroup") + <*> (o .:? "campaignIdDimensionValue") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "campaignId") + <*> (o .:? "idDimensionValue") + <*> (o .:? "placementGroupType") + <*> (o .:? "contentCategoryId") + <*> (o .:? "directorySiteIdDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "directorySiteId") + <*> (o .:? "createInfo") + <*> (o .:? "childPlacementIds" .!= mempty) + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "primaryPlacementId") + <*> (o .:? "subaccountId") + <*> (o .:? "externalId") + <*> (o .:? "comment") + <*> (o .:? "primaryPlacementIdDimensionValue") + <*> (o .:? "siteId") + <*> (o .:? "archived")) + +instance ToJSON PlacementGroup where + toJSON PlacementGroup{..} + = object + (catMaybes + [("placementStrategyId" .=) <$> + _pgPlacementStrategyId, + ("siteIdDimensionValue" .=) <$> + _pgSiteIdDimensionValue, + ("pricingSchedule" .=) <$> _pgPricingSchedule, + Just ("kind" .= _pgKind), + ("campaignIdDimensionValue" .=) <$> + _pgCampaignIdDimensionValue, + ("advertiserId" .=) <$> _pgAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _pgAdvertiserIdDimensionValue, + ("campaignId" .=) <$> _pgCampaignId, + ("idDimensionValue" .=) <$> _pgIdDimensionValue, + ("placementGroupType" .=) <$> _pgPlacementGroupType, + ("contentCategoryId" .=) <$> _pgContentCategoryId, + ("directorySiteIdDimensionValue" .=) <$> + _pgDirectorySiteIdDimensionValue, + ("accountId" .=) <$> _pgAccountId, + ("name" .=) <$> _pgName, + ("directorySiteId" .=) <$> _pgDirectorySiteId, + ("createInfo" .=) <$> _pgCreateInfo, + ("childPlacementIds" .=) <$> _pgChildPlacementIds, + ("lastModifiedInfo" .=) <$> _pgLastModifiedInfo, + ("id" .=) <$> _pgId, + ("primaryPlacementId" .=) <$> _pgPrimaryPlacementId, + ("subaccountId" .=) <$> _pgSubaccountId, + ("externalId" .=) <$> _pgExternalId, + ("comment" .=) <$> _pgComment, + ("primaryPlacementIdDimensionValue" .=) <$> + _pgPrimaryPlacementIdDimensionValue, + ("siteId" .=) <$> _pgSiteId, + ("archived" .=) <$> _pgArchived]) + +-- | Creative Group List Response +-- +-- /See:/ 'creativeGroupsListResponse' smart constructor. +data CreativeGroupsListResponse = CreativeGroupsListResponse + { _cglrCreativeGroups :: !(Maybe [Maybe CreativeGroup]) + , _cglrNextPageToken :: !(Maybe Text) + , _cglrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cglrCreativeGroups' +-- +-- * 'cglrNextPageToken' +-- +-- * 'cglrKind' +creativeGroupsListResponse + :: CreativeGroupsListResponse +creativeGroupsListResponse = + CreativeGroupsListResponse + { _cglrCreativeGroups = Nothing + , _cglrNextPageToken = Nothing + , _cglrKind = "dfareporting#creativeGroupsListResponse" + } + +-- | Creative group collection. +cglrCreativeGroups :: Lens' CreativeGroupsListResponse [Maybe CreativeGroup] +cglrCreativeGroups + = lens _cglrCreativeGroups + (\ s a -> s{_cglrCreativeGroups = a}) + . _Default + . _Coerce + +-- | Pagination token to be used for the next list operation. +cglrNextPageToken :: Lens' CreativeGroupsListResponse (Maybe Text) +cglrNextPageToken + = lens _cglrNextPageToken + (\ s a -> s{_cglrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeGroupsListResponse\". +cglrKind :: Lens' CreativeGroupsListResponse Text +cglrKind = lens _cglrKind (\ s a -> s{_cglrKind = a}) + +instance FromJSON CreativeGroupsListResponse where + parseJSON + = withObject "CreativeGroupsListResponse" + (\ o -> + CreativeGroupsListResponse <$> + (o .:? "creativeGroups" .!= mempty) <*> + (o .:? "nextPageToken") + <*> + (o .:? "kind" .!= + "dfareporting#creativeGroupsListResponse")) + +instance ToJSON CreativeGroupsListResponse where + toJSON CreativeGroupsListResponse{..} + = object + (catMaybes + [("creativeGroups" .=) <$> _cglrCreativeGroups, + ("nextPageToken" .=) <$> _cglrNextPageToken, + Just ("kind" .= _cglrKind)]) + +-- | Contains properties of an event tag. +-- +-- /See:/ 'eventTag' smart constructor. +data EventTag = EventTag + { _etStatus :: !(Maybe Text) + , _etExcludeFromAdxRequests :: !(Maybe Bool) + , _etEnabledByDefault :: !(Maybe Bool) + , _etKind :: !Text + , _etCampaignIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _etAdvertiserId :: !(Maybe Int64) + , _etUrl :: !(Maybe Text) + , _etAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _etSslCompliant :: !(Maybe Bool) + , _etCampaignId :: !(Maybe Int64) + , _etAccountId :: !(Maybe Int64) + , _etName :: !(Maybe Text) + , _etUrlEscapeLevels :: !(Maybe Int32) + , _etSiteIds :: !(Maybe [Int64]) + , _etId :: !(Maybe Int64) + , _etSubaccountId :: !(Maybe Int64) + , _etType :: !(Maybe Text) + , _etSiteFilterType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etStatus' +-- +-- * 'etExcludeFromAdxRequests' +-- +-- * 'etEnabledByDefault' +-- +-- * 'etKind' +-- +-- * 'etCampaignIdDimensionValue' +-- +-- * 'etAdvertiserId' +-- +-- * 'etUrl' +-- +-- * 'etAdvertiserIdDimensionValue' +-- +-- * 'etSslCompliant' +-- +-- * 'etCampaignId' +-- +-- * 'etAccountId' +-- +-- * 'etName' +-- +-- * 'etUrlEscapeLevels' +-- +-- * 'etSiteIds' +-- +-- * 'etId' +-- +-- * 'etSubaccountId' +-- +-- * 'etType' +-- +-- * 'etSiteFilterType' +eventTag + :: EventTag +eventTag = + EventTag + { _etStatus = Nothing + , _etExcludeFromAdxRequests = Nothing + , _etEnabledByDefault = Nothing + , _etKind = "dfareporting#eventTag" + , _etCampaignIdDimensionValue = Nothing + , _etAdvertiserId = Nothing + , _etUrl = Nothing + , _etAdvertiserIdDimensionValue = Nothing + , _etSslCompliant = Nothing + , _etCampaignId = Nothing + , _etAccountId = Nothing + , _etName = Nothing + , _etUrlEscapeLevels = Nothing + , _etSiteIds = Nothing + , _etId = Nothing + , _etSubaccountId = Nothing + , _etType = Nothing + , _etSiteFilterType = Nothing + } + +-- | Status of this event tag. Must be ENABLED for this event tag to fire. +-- This is a required field. +etStatus :: Lens' EventTag (Maybe Text) +etStatus = lens _etStatus (\ s a -> s{_etStatus = a}) + +-- | Whether to remove this event tag from ads that are trafficked through +-- DoubleClick Bid Manager to Ad Exchange. This may be useful if the event +-- tag uses a pixel that is unapproved for Ad Exchange bids on one or more +-- networks, such as the Google Display Network. +etExcludeFromAdxRequests :: Lens' EventTag (Maybe Bool) +etExcludeFromAdxRequests + = lens _etExcludeFromAdxRequests + (\ s a -> s{_etExcludeFromAdxRequests = a}) + +-- | Whether this event tag should be automatically enabled for all of the +-- advertiser\'s campaigns and ads. +etEnabledByDefault :: Lens' EventTag (Maybe Bool) +etEnabledByDefault + = lens _etEnabledByDefault + (\ s a -> s{_etEnabledByDefault = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#eventTag\". +etKind :: Lens' EventTag Text +etKind = lens _etKind (\ s a -> s{_etKind = a}) + +-- | Dimension value for the ID of the campaign. This is a read-only, +-- auto-generated field. +etCampaignIdDimensionValue :: Lens' EventTag (Maybe (Maybe DimensionValue)) +etCampaignIdDimensionValue + = lens _etCampaignIdDimensionValue + (\ s a -> s{_etCampaignIdDimensionValue = a}) + +-- | Advertiser ID of this event tag. This field or the campaignId field is +-- required on insertion. +etAdvertiserId :: Lens' EventTag (Maybe Int64) +etAdvertiserId + = lens _etAdvertiserId + (\ s a -> s{_etAdvertiserId = a}) + +-- | Payload URL for this event tag. The URL on a click-through event tag +-- should have a landing page URL appended to the end of it. This field is +-- required on insertion. +etUrl :: Lens' EventTag (Maybe Text) +etUrl = lens _etUrl (\ s a -> s{_etUrl = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +etAdvertiserIdDimensionValue :: Lens' EventTag (Maybe (Maybe DimensionValue)) +etAdvertiserIdDimensionValue + = lens _etAdvertiserIdDimensionValue + (\ s a -> s{_etAdvertiserIdDimensionValue = a}) + +-- | Whether this tag is SSL-compliant or not. This is a read-only field. +etSslCompliant :: Lens' EventTag (Maybe Bool) +etSslCompliant + = lens _etSslCompliant + (\ s a -> s{_etSslCompliant = a}) + +-- | Campaign ID of this event tag. This field or the advertiserId field is +-- required on insertion. +etCampaignId :: Lens' EventTag (Maybe Int64) +etCampaignId + = lens _etCampaignId (\ s a -> s{_etCampaignId = a}) + +-- | Account ID of this event tag. This is a read-only field that can be left +-- blank. +etAccountId :: Lens' EventTag (Maybe Int64) +etAccountId + = lens _etAccountId (\ s a -> s{_etAccountId = a}) + +-- | Name of this event tag. This is a required field and must be less than +-- 256 characters long. +etName :: Lens' EventTag (Maybe Text) +etName = lens _etName (\ s a -> s{_etName = a}) + +-- | Number of times the landing page URL should be URL-escaped before being +-- appended to the click-through event tag URL. Only applies to +-- click-through event tags as specified by the event tag type. +etUrlEscapeLevels :: Lens' EventTag (Maybe Int32) +etUrlEscapeLevels + = lens _etUrlEscapeLevels + (\ s a -> s{_etUrlEscapeLevels = a}) + +-- | Filter list of site IDs associated with this event tag. The +-- siteFilterType determines whether this is a whitelist or blacklist +-- filter. +etSiteIds :: Lens' EventTag [Int64] +etSiteIds + = lens _etSiteIds (\ s a -> s{_etSiteIds = a}) . + _Default + . _Coerce + +-- | ID of this event tag. This is a read-only, auto-generated field. +etId :: Lens' EventTag (Maybe Int64) +etId = lens _etId (\ s a -> s{_etId = a}) + +-- | Subaccount ID of this event tag. This is a read-only field that can be +-- left blank. +etSubaccountId :: Lens' EventTag (Maybe Int64) +etSubaccountId + = lens _etSubaccountId + (\ s a -> s{_etSubaccountId = a}) + +-- | Event tag type. Can be used to specify whether to use a third-party +-- pixel, a third-party JavaScript URL, or a third-party click-through URL +-- for either impression or click tracking. This is a required field. +etType :: Lens' EventTag (Maybe Text) +etType = lens _etType (\ s a -> s{_etType = a}) + +-- | Site filter type for this event tag. If no type is specified then the +-- event tag will be applied to all sites. +etSiteFilterType :: Lens' EventTag (Maybe Text) +etSiteFilterType + = lens _etSiteFilterType + (\ s a -> s{_etSiteFilterType = a}) + +instance FromJSON EventTag where + parseJSON + = withObject "EventTag" + (\ o -> + EventTag <$> + (o .:? "status") <*> (o .:? "excludeFromAdxRequests") + <*> (o .:? "enabledByDefault") + <*> (o .:? "kind" .!= "dfareporting#eventTag") + <*> (o .:? "campaignIdDimensionValue") + <*> (o .:? "advertiserId") + <*> (o .:? "url") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "sslCompliant") + <*> (o .:? "campaignId") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "urlEscapeLevels") + <*> (o .:? "siteIds" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "subaccountId") + <*> (o .:? "type") + <*> (o .:? "siteFilterType")) + +instance ToJSON EventTag where + toJSON EventTag{..} + = object + (catMaybes + [("status" .=) <$> _etStatus, + ("excludeFromAdxRequests" .=) <$> + _etExcludeFromAdxRequests, + ("enabledByDefault" .=) <$> _etEnabledByDefault, + Just ("kind" .= _etKind), + ("campaignIdDimensionValue" .=) <$> + _etCampaignIdDimensionValue, + ("advertiserId" .=) <$> _etAdvertiserId, + ("url" .=) <$> _etUrl, + ("advertiserIdDimensionValue" .=) <$> + _etAdvertiserIdDimensionValue, + ("sslCompliant" .=) <$> _etSslCompliant, + ("campaignId" .=) <$> _etCampaignId, + ("accountId" .=) <$> _etAccountId, + ("name" .=) <$> _etName, + ("urlEscapeLevels" .=) <$> _etUrlEscapeLevels, + ("siteIds" .=) <$> _etSiteIds, ("id" .=) <$> _etId, + ("subaccountId" .=) <$> _etSubaccountId, + ("type" .=) <$> _etType, + ("siteFilterType" .=) <$> _etSiteFilterType]) + +-- | Campaign Creative Association List Response +-- +-- /See:/ 'campaignCreativeAssociationsListResponse' smart constructor. +data CampaignCreativeAssociationsListResponse = CampaignCreativeAssociationsListResponse + { _ccalrCampaignCreativeAssociations :: !(Maybe [Maybe CampaignCreativeAssociation]) + , _ccalrNextPageToken :: !(Maybe Text) + , _ccalrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignCreativeAssociationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccalrCampaignCreativeAssociations' +-- +-- * 'ccalrNextPageToken' +-- +-- * 'ccalrKind' +campaignCreativeAssociationsListResponse + :: CampaignCreativeAssociationsListResponse +campaignCreativeAssociationsListResponse = + CampaignCreativeAssociationsListResponse + { _ccalrCampaignCreativeAssociations = Nothing + , _ccalrNextPageToken = Nothing + , _ccalrKind = "dfareporting#campaignCreativeAssociationsListResponse" + } + +-- | Campaign creative association collection +ccalrCampaignCreativeAssociations :: Lens' CampaignCreativeAssociationsListResponse [Maybe CampaignCreativeAssociation] +ccalrCampaignCreativeAssociations + = lens _ccalrCampaignCreativeAssociations + (\ s a -> s{_ccalrCampaignCreativeAssociations = a}) + . _Default + . _Coerce + +-- | Pagination token to be used for the next list operation. +ccalrNextPageToken :: Lens' CampaignCreativeAssociationsListResponse (Maybe Text) +ccalrNextPageToken + = lens _ccalrNextPageToken + (\ s a -> s{_ccalrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#campaignCreativeAssociationsListResponse\". +ccalrKind :: Lens' CampaignCreativeAssociationsListResponse Text +ccalrKind + = lens _ccalrKind (\ s a -> s{_ccalrKind = a}) + +instance FromJSON + CampaignCreativeAssociationsListResponse where + parseJSON + = withObject + "CampaignCreativeAssociationsListResponse" + (\ o -> + CampaignCreativeAssociationsListResponse <$> + (o .:? "campaignCreativeAssociations" .!= mempty) <*> + (o .:? "nextPageToken") + <*> + (o .:? "kind" .!= + "dfareporting#campaignCreativeAssociationsListResponse")) + +instance ToJSON + CampaignCreativeAssociationsListResponse where + toJSON CampaignCreativeAssociationsListResponse{..} + = object + (catMaybes + [("campaignCreativeAssociations" .=) <$> + _ccalrCampaignCreativeAssociations, + ("nextPageToken" .=) <$> _ccalrNextPageToken, + Just ("kind" .= _ccalrKind)]) + +-- | Creative Asset ID. +-- +-- /See:/ 'creativeAssetId' smart constructor. +data CreativeAssetId = CreativeAssetId + { _caiName :: !(Maybe Text) + , _caiType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeAssetId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caiName' +-- +-- * 'caiType' +creativeAssetId + :: CreativeAssetId +creativeAssetId = + CreativeAssetId + { _caiName = Nothing + , _caiType = Nothing + } + +-- | Name of the creative asset. This is a required field while inserting an +-- asset. After insertion, this assetIdentifier is used to identify the +-- uploaded asset. Characters in the name must be alphanumeric or one of +-- the following: \".-_ \". Spaces are allowed. +caiName :: Lens' CreativeAssetId (Maybe Text) +caiName = lens _caiName (\ s a -> s{_caiName = a}) + +-- | Type of asset to upload. This is a required field. IMAGE is solely used +-- for IMAGE creatives. Other image assets should use HTML_IMAGE. +caiType :: Lens' CreativeAssetId (Maybe Text) +caiType = lens _caiType (\ s a -> s{_caiType = a}) + +instance FromJSON CreativeAssetId where + parseJSON + = withObject "CreativeAssetId" + (\ o -> + CreativeAssetId <$> + (o .:? "name") <*> (o .:? "type")) + +instance ToJSON CreativeAssetId where + toJSON CreativeAssetId{..} + = object + (catMaybes + [("name" .=) <$> _caiName, ("type" .=) <$> _caiType]) + +-- | Frequency Cap. +-- +-- /See:/ 'frequencyCap' smart constructor. +data FrequencyCap = FrequencyCap + { _fcImpressions :: !(Maybe Int64) + , _fcDuration :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FrequencyCap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcImpressions' +-- +-- * 'fcDuration' +frequencyCap + :: FrequencyCap +frequencyCap = + FrequencyCap + { _fcImpressions = Nothing + , _fcDuration = Nothing + } + +-- | Number of times an individual user can be served the ad within the +-- specified duration. The maximum allowed is 15. +fcImpressions :: Lens' FrequencyCap (Maybe Int64) +fcImpressions + = lens _fcImpressions + (\ s a -> s{_fcImpressions = a}) + +-- | Duration of time, in seconds, for this frequency cap. The maximum +-- duration is 90 days in seconds, or 7,776,000. +fcDuration :: Lens' FrequencyCap (Maybe Int64) +fcDuration + = lens _fcDuration (\ s a -> s{_fcDuration = a}) + +instance FromJSON FrequencyCap where + parseJSON + = withObject "FrequencyCap" + (\ o -> + FrequencyCap <$> + (o .:? "impressions") <*> (o .:? "duration")) + +instance ToJSON FrequencyCap where + toJSON FrequencyCap{..} + = object + (catMaybes + [("impressions" .=) <$> _fcImpressions, + ("duration" .=) <$> _fcDuration]) + +-- | Creative Settings +-- +-- /See:/ 'creativeSettings' smart constructor. +data CreativeSettings = CreativeSettings + { _csIFrameHeader :: !(Maybe Text) + , _csIFrameFooter :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csIFrameHeader' +-- +-- * 'csIFrameFooter' +creativeSettings + :: CreativeSettings +creativeSettings = + CreativeSettings + { _csIFrameHeader = Nothing + , _csIFrameFooter = Nothing + } + +-- | Header text for iFrames for this site. Must be less than or equal to +-- 2000 characters long. +csIFrameHeader :: Lens' CreativeSettings (Maybe Text) +csIFrameHeader + = lens _csIFrameHeader + (\ s a -> s{_csIFrameHeader = a}) + +-- | Header text for iFrames for this site. Must be less than or equal to +-- 2000 characters long. +csIFrameFooter :: Lens' CreativeSettings (Maybe Text) +csIFrameFooter + = lens _csIFrameFooter + (\ s a -> s{_csIFrameFooter = a}) + +instance FromJSON CreativeSettings where + parseJSON + = withObject "CreativeSettings" + (\ o -> + CreativeSettings <$> + (o .:? "iFrameHeader") <*> (o .:? "iFrameFooter")) + +instance ToJSON CreativeSettings where + toJSON CreativeSettings{..} + = object + (catMaybes + [("iFrameHeader" .=) <$> _csIFrameHeader, + ("iFrameFooter" .=) <$> _csIFrameFooter]) + +-- | User Defined Variable configuration. +-- +-- /See:/ 'userDefinedVariableConfiguration' smart constructor. +data UserDefinedVariableConfiguration = UserDefinedVariableConfiguration + { _udvcReportName :: !(Maybe Text) + , _udvcDataType :: !(Maybe Text) + , _udvcVariableType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserDefinedVariableConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udvcReportName' +-- +-- * 'udvcDataType' +-- +-- * 'udvcVariableType' +userDefinedVariableConfiguration + :: UserDefinedVariableConfiguration +userDefinedVariableConfiguration = + UserDefinedVariableConfiguration + { _udvcReportName = Nothing + , _udvcDataType = Nothing + , _udvcVariableType = Nothing + } + +-- | User-friendly name for the variable which will appear in reports. This +-- is a required field, must be less than 64 characters long, and cannot +-- contain the following characters: \"\"\<>\". +udvcReportName :: Lens' UserDefinedVariableConfiguration (Maybe Text) +udvcReportName + = lens _udvcReportName + (\ s a -> s{_udvcReportName = a}) + +-- | Data type for the variable. This is a required field. +udvcDataType :: Lens' UserDefinedVariableConfiguration (Maybe Text) +udvcDataType + = lens _udvcDataType (\ s a -> s{_udvcDataType = a}) + +-- | Variable name in the tag. This is a required field. +udvcVariableType :: Lens' UserDefinedVariableConfiguration (Maybe Text) +udvcVariableType + = lens _udvcVariableType + (\ s a -> s{_udvcVariableType = a}) + +instance FromJSON UserDefinedVariableConfiguration + where + parseJSON + = withObject "UserDefinedVariableConfiguration" + (\ o -> + UserDefinedVariableConfiguration <$> + (o .:? "reportName") <*> (o .:? "dataType") <*> + (o .:? "variableType")) + +instance ToJSON UserDefinedVariableConfiguration + where + toJSON UserDefinedVariableConfiguration{..} + = object + (catMaybes + [("reportName" .=) <$> _udvcReportName, + ("dataType" .=) <$> _udvcDataType, + ("variableType" .=) <$> _udvcVariableType]) + +-- | Describes properties of a DoubleClick Planning order. +-- +-- /See:/ 'order' smart constructor. +data Order = Order + { _oSellerOrderId :: !(Maybe Text) + , _oSellerOrganizationName :: !(Maybe Text) + , _oKind :: !Text + , _oAdvertiserId :: !(Maybe Int64) + , _oPlanningTermId :: !(Maybe Int64) + , _oAccountId :: !(Maybe Int64) + , _oName :: !(Maybe Text) + , _oSiteNames :: !(Maybe [Text]) + , _oLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _oBuyerOrganizationName :: !(Maybe Text) + , _oId :: !(Maybe Int64) + , _oBuyerInvoiceId :: !(Maybe Text) + , _oComments :: !(Maybe Text) + , _oProjectId :: !(Maybe Int64) + , _oSubaccountId :: !(Maybe Int64) + , _oNotes :: !(Maybe Text) + , _oContacts :: !(Maybe [Maybe OrderContact]) + , _oSiteId :: !(Maybe [Int64]) + , _oTermsAndConditions :: !(Maybe Text) + , _oApproverUserProfileIds :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Order' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oSellerOrderId' +-- +-- * 'oSellerOrganizationName' +-- +-- * 'oKind' +-- +-- * 'oAdvertiserId' +-- +-- * 'oPlanningTermId' +-- +-- * 'oAccountId' +-- +-- * 'oName' +-- +-- * 'oSiteNames' +-- +-- * 'oLastModifiedInfo' +-- +-- * 'oBuyerOrganizationName' +-- +-- * 'oId' +-- +-- * 'oBuyerInvoiceId' +-- +-- * 'oComments' +-- +-- * 'oProjectId' +-- +-- * 'oSubaccountId' +-- +-- * 'oNotes' +-- +-- * 'oContacts' +-- +-- * 'oSiteId' +-- +-- * 'oTermsAndConditions' +-- +-- * 'oApproverUserProfileIds' +order + :: Order +order = + Order + { _oSellerOrderId = Nothing + , _oSellerOrganizationName = Nothing + , _oKind = "dfareporting#order" + , _oAdvertiserId = Nothing + , _oPlanningTermId = Nothing + , _oAccountId = Nothing + , _oName = Nothing + , _oSiteNames = Nothing + , _oLastModifiedInfo = Nothing + , _oBuyerOrganizationName = Nothing + , _oId = Nothing + , _oBuyerInvoiceId = Nothing + , _oComments = Nothing + , _oProjectId = Nothing + , _oSubaccountId = Nothing + , _oNotes = Nothing + , _oContacts = Nothing + , _oSiteId = Nothing + , _oTermsAndConditions = Nothing + , _oApproverUserProfileIds = Nothing + } + +-- | Seller order ID associated with this order. +oSellerOrderId :: Lens' Order (Maybe Text) +oSellerOrderId + = lens _oSellerOrderId + (\ s a -> s{_oSellerOrderId = a}) + +-- | Name of the seller organization. +oSellerOrganizationName :: Lens' Order (Maybe Text) +oSellerOrganizationName + = lens _oSellerOrganizationName + (\ s a -> s{_oSellerOrganizationName = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#order\". +oKind :: Lens' Order Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | Advertiser ID of this order. +oAdvertiserId :: Lens' Order (Maybe Int64) +oAdvertiserId + = lens _oAdvertiserId + (\ s a -> s{_oAdvertiserId = a}) + +-- | ID of the terms and conditions template used in this order. +oPlanningTermId :: Lens' Order (Maybe Int64) +oPlanningTermId + = lens _oPlanningTermId + (\ s a -> s{_oPlanningTermId = a}) + +-- | Account ID of this order. +oAccountId :: Lens' Order (Maybe Int64) +oAccountId + = lens _oAccountId (\ s a -> s{_oAccountId = a}) + +-- | Name of this order. +oName :: Lens' Order (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | Free-form site names this order is associated with. +oSiteNames :: Lens' Order [Text] +oSiteNames + = lens _oSiteNames (\ s a -> s{_oSiteNames = a}) . + _Default + . _Coerce + +-- | Information about the most recent modification of this order. +oLastModifiedInfo :: Lens' Order (Maybe (Maybe LastModifiedInfo)) +oLastModifiedInfo + = lens _oLastModifiedInfo + (\ s a -> s{_oLastModifiedInfo = a}) + +-- | Name of the buyer organization. +oBuyerOrganizationName :: Lens' Order (Maybe Text) +oBuyerOrganizationName + = lens _oBuyerOrganizationName + (\ s a -> s{_oBuyerOrganizationName = a}) + +-- | ID of this order. This is a read-only, auto-generated field. +oId :: Lens' Order (Maybe Int64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | Buyer invoice ID associated with this order. +oBuyerInvoiceId :: Lens' Order (Maybe Text) +oBuyerInvoiceId + = lens _oBuyerInvoiceId + (\ s a -> s{_oBuyerInvoiceId = a}) + +-- | Comments in this order. +oComments :: Lens' Order (Maybe Text) +oComments + = lens _oComments (\ s a -> s{_oComments = a}) + +-- | Project ID of this order. +oProjectId :: Lens' Order (Maybe Int64) +oProjectId + = lens _oProjectId (\ s a -> s{_oProjectId = a}) + +-- | Subaccount ID of this order. +oSubaccountId :: Lens' Order (Maybe Int64) +oSubaccountId + = lens _oSubaccountId + (\ s a -> s{_oSubaccountId = a}) + +-- | Notes of this order. +oNotes :: Lens' Order (Maybe Text) +oNotes = lens _oNotes (\ s a -> s{_oNotes = a}) + +-- | Contacts for this order. +oContacts :: Lens' Order [Maybe OrderContact] +oContacts + = lens _oContacts (\ s a -> s{_oContacts = a}) . + _Default + . _Coerce + +-- | Site IDs this order is associated with. +oSiteId :: Lens' Order [Int64] +oSiteId + = lens _oSiteId (\ s a -> s{_oSiteId = a}) . _Default + . _Coerce + +-- | Terms and conditions of this order. +oTermsAndConditions :: Lens' Order (Maybe Text) +oTermsAndConditions + = lens _oTermsAndConditions + (\ s a -> s{_oTermsAndConditions = a}) + +-- | IDs for users that have to approve documents created for this order. +oApproverUserProfileIds :: Lens' Order [Int64] +oApproverUserProfileIds + = lens _oApproverUserProfileIds + (\ s a -> s{_oApproverUserProfileIds = a}) + . _Default + . _Coerce + +instance FromJSON Order where + parseJSON + = withObject "Order" + (\ o -> + Order <$> + (o .:? "sellerOrderId") <*> + (o .:? "sellerOrganizationName") + <*> (o .:? "kind" .!= "dfareporting#order") + <*> (o .:? "advertiserId") + <*> (o .:? "planningTermId") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "siteNames" .!= mempty) + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "buyerOrganizationName") + <*> (o .:? "id") + <*> (o .:? "buyerInvoiceId") + <*> (o .:? "comments") + <*> (o .:? "projectId") + <*> (o .:? "subaccountId") + <*> (o .:? "notes") + <*> (o .:? "contacts" .!= mempty) + <*> (o .:? "siteId" .!= mempty) + <*> (o .:? "termsAndConditions") + <*> (o .:? "approverUserProfileIds" .!= mempty)) + +instance ToJSON Order where + toJSON Order{..} + = object + (catMaybes + [("sellerOrderId" .=) <$> _oSellerOrderId, + ("sellerOrganizationName" .=) <$> + _oSellerOrganizationName, + Just ("kind" .= _oKind), + ("advertiserId" .=) <$> _oAdvertiserId, + ("planningTermId" .=) <$> _oPlanningTermId, + ("accountId" .=) <$> _oAccountId, + ("name" .=) <$> _oName, + ("siteNames" .=) <$> _oSiteNames, + ("lastModifiedInfo" .=) <$> _oLastModifiedInfo, + ("buyerOrganizationName" .=) <$> + _oBuyerOrganizationName, + ("id" .=) <$> _oId, + ("buyerInvoiceId" .=) <$> _oBuyerInvoiceId, + ("comments" .=) <$> _oComments, + ("projectId" .=) <$> _oProjectId, + ("subaccountId" .=) <$> _oSubaccountId, + ("notes" .=) <$> _oNotes, + ("contacts" .=) <$> _oContacts, + ("siteId" .=) <$> _oSiteId, + ("termsAndConditions" .=) <$> _oTermsAndConditions, + ("approverUserProfileIds" .=) <$> + _oApproverUserProfileIds]) + +-- | Omniture Integration Settings. +-- +-- /See:/ 'omnitureSettings' smart constructor. +data OmnitureSettings = OmnitureSettings + { _osOmnitureCostDataEnabled :: !(Maybe Bool) + , _osOmnitureIntegrationEnabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OmnitureSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osOmnitureCostDataEnabled' +-- +-- * 'osOmnitureIntegrationEnabled' +omnitureSettings + :: OmnitureSettings +omnitureSettings = + OmnitureSettings + { _osOmnitureCostDataEnabled = Nothing + , _osOmnitureIntegrationEnabled = Nothing + } + +-- | Whether placement cost data will be sent to Omniture. This property can +-- be enabled only if omnitureIntegrationEnabled is true. +osOmnitureCostDataEnabled :: Lens' OmnitureSettings (Maybe Bool) +osOmnitureCostDataEnabled + = lens _osOmnitureCostDataEnabled + (\ s a -> s{_osOmnitureCostDataEnabled = a}) + +-- | Whether Omniture integration is enabled. This property can be enabled +-- only when the \"Advanced Ad Serving\" account setting is enabled. +osOmnitureIntegrationEnabled :: Lens' OmnitureSettings (Maybe Bool) +osOmnitureIntegrationEnabled + = lens _osOmnitureIntegrationEnabled + (\ s a -> s{_osOmnitureIntegrationEnabled = a}) + +instance FromJSON OmnitureSettings where + parseJSON + = withObject "OmnitureSettings" + (\ o -> + OmnitureSettings <$> + (o .:? "omnitureCostDataEnabled") <*> + (o .:? "omnitureIntegrationEnabled")) + +instance ToJSON OmnitureSettings where + toJSON OmnitureSettings{..} + = object + (catMaybes + [("omnitureCostDataEnabled" .=) <$> + _osOmnitureCostDataEnabled, + ("omnitureIntegrationEnabled" .=) <$> + _osOmnitureIntegrationEnabled]) + +-- | Contains information about an internet connection type that can be +-- targeted by ads. Clients can use the connection type to target mobile +-- vs. broadband users. +-- +-- /See:/ 'connectionType' smart constructor. +data ConnectionType = ConnectionType + { _conKind :: !Text + , _conName :: !(Maybe Text) + , _conId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConnectionType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'conKind' +-- +-- * 'conName' +-- +-- * 'conId' +connectionType + :: ConnectionType +connectionType = + ConnectionType + { _conKind = "dfareporting#connectionType" + , _conName = Nothing + , _conId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#connectionType\". +conKind :: Lens' ConnectionType Text +conKind = lens _conKind (\ s a -> s{_conKind = a}) + +-- | Name of this connection type. +conName :: Lens' ConnectionType (Maybe Text) +conName = lens _conName (\ s a -> s{_conName = a}) + +-- | ID of this connection type. +conId :: Lens' ConnectionType (Maybe Int64) +conId = lens _conId (\ s a -> s{_conId = a}) + +instance FromJSON ConnectionType where + parseJSON + = withObject "ConnectionType" + (\ o -> + ConnectionType <$> + (o .:? "kind" .!= "dfareporting#connectionType") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON ConnectionType where + toJSON ConnectionType{..} + = object + (catMaybes + [Just ("kind" .= _conKind), ("name" .=) <$> _conName, + ("id" .=) <$> _conId]) + +-- | CreativeAssets contains properties of a creative asset file which will +-- be uploaded or has already been uploaded. Refer to the creative sample +-- code for how to upload assets and insert a creative. +-- +-- /See:/ 'creativeAssetMetadata' smart constructor. +data CreativeAssetMetadata = CreativeAssetMetadata + { _camaKind :: !Text + , _camaAssetIdentifier :: !(Maybe (Maybe CreativeAssetId)) + , _camaClickTags :: !(Maybe [Maybe ClickTag]) + , _camaWarnedValidationRules :: !(Maybe [Text]) + , _camaDetectedFeatures :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeAssetMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'camaKind' +-- +-- * 'camaAssetIdentifier' +-- +-- * 'camaClickTags' +-- +-- * 'camaWarnedValidationRules' +-- +-- * 'camaDetectedFeatures' +creativeAssetMetadata + :: CreativeAssetMetadata +creativeAssetMetadata = + CreativeAssetMetadata + { _camaKind = "dfareporting#creativeAssetMetadata" + , _camaAssetIdentifier = Nothing + , _camaClickTags = Nothing + , _camaWarnedValidationRules = Nothing + , _camaDetectedFeatures = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeAssetMetadata\". +camaKind :: Lens' CreativeAssetMetadata Text +camaKind = lens _camaKind (\ s a -> s{_camaKind = a}) + +-- | ID of the creative asset. This is a required field. +camaAssetIdentifier :: Lens' CreativeAssetMetadata (Maybe (Maybe CreativeAssetId)) +camaAssetIdentifier + = lens _camaAssetIdentifier + (\ s a -> s{_camaAssetIdentifier = a}) + +-- | List of detected click tags for assets. This is a read-only +-- auto-generated field. +camaClickTags :: Lens' CreativeAssetMetadata [Maybe ClickTag] +camaClickTags + = lens _camaClickTags + (\ s a -> s{_camaClickTags = a}) + . _Default + . _Coerce + +-- | Rules validated during code generation that generated a warning. This is +-- a read-only, auto-generated field. Possible values are: - +-- \"CLICK_TAG_NON_TOP_LEVEL\" - \"CLICK_TAG_MISSING\" - +-- \"CLICK_TAG_MORE_THAN_ONE\" - \"CLICK_TAG_INVALID\" - \"ORPHANED_ASSET\" +-- - \"PRIMARY_HTML_MISSING\" - \"EXTERNAL_FILE_REFERENCED\" - +-- \"MRAID_REFERENCED\" - \"ADMOB_REFERENCED\" - \"FILE_TYPE_INVALID\" - +-- \"ZIP_INVALID\" - \"LINKED_FILE_NOT_FOUND\" - \"MAX_FLASH_VERSION_11\" - +-- \"NOT_SSL_COMPLIANT\" - \"FILE_DETAIL_EMPTY\" - \"ASSET_INVALID\" - +-- \"GWD_PROPERTIES_INVALID\" - \"ENABLER_UNSUPPORTED_METHOD_DCM\" - +-- \"ASSET_FORMAT_UNSUPPORTED_DCM\" - \"COMPONENT_UNSUPPORTED_DCM\" - +-- \"HTML5_FEATURE_UNSUPPORTED\' \" +camaWarnedValidationRules :: Lens' CreativeAssetMetadata [Text] +camaWarnedValidationRules + = lens _camaWarnedValidationRules + (\ s a -> s{_camaWarnedValidationRules = a}) + . _Default + . _Coerce + +-- | List of feature dependencies for the creative asset that are detected by +-- DCM. Feature dependencies are features that a browser must be able to +-- support in order to render your HTML5 creative correctly. This is a +-- read-only, auto-generated field. +camaDetectedFeatures :: Lens' CreativeAssetMetadata [Text] +camaDetectedFeatures + = lens _camaDetectedFeatures + (\ s a -> s{_camaDetectedFeatures = a}) + . _Default + . _Coerce + +instance FromJSON CreativeAssetMetadata where + parseJSON + = withObject "CreativeAssetMetadata" + (\ o -> + CreativeAssetMetadata <$> + (o .:? "kind" .!= + "dfareporting#creativeAssetMetadata") + <*> (o .:? "assetIdentifier") + <*> (o .:? "clickTags" .!= mempty) + <*> (o .:? "warnedValidationRules" .!= mempty) + <*> (o .:? "detectedFeatures" .!= mempty)) + +instance ToJSON CreativeAssetMetadata where + toJSON CreativeAssetMetadata{..} + = object + (catMaybes + [Just ("kind" .= _camaKind), + ("assetIdentifier" .=) <$> _camaAssetIdentifier, + ("clickTags" .=) <$> _camaClickTags, + ("warnedValidationRules" .=) <$> + _camaWarnedValidationRules, + ("detectedFeatures" .=) <$> _camaDetectedFeatures]) + +-- | Contains properties of a user role permission. +-- +-- /See:/ 'userRolePermission' smart constructor. +data UserRolePermission = UserRolePermission + { _urpKind :: !Text + , _urpAvailability :: !(Maybe Text) + , _urpName :: !(Maybe Text) + , _urpId :: !(Maybe Int64) + , _urpPermissionGroupId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpKind' +-- +-- * 'urpAvailability' +-- +-- * 'urpName' +-- +-- * 'urpId' +-- +-- * 'urpPermissionGroupId' +userRolePermission + :: UserRolePermission +userRolePermission = + UserRolePermission + { _urpKind = "dfareporting#userRolePermission" + , _urpAvailability = Nothing + , _urpName = Nothing + , _urpId = Nothing + , _urpPermissionGroupId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#userRolePermission\". +urpKind :: Lens' UserRolePermission Text +urpKind = lens _urpKind (\ s a -> s{_urpKind = a}) + +-- | Levels of availability for a user role permission. +urpAvailability :: Lens' UserRolePermission (Maybe Text) +urpAvailability + = lens _urpAvailability + (\ s a -> s{_urpAvailability = a}) + +-- | Name of this user role permission. +urpName :: Lens' UserRolePermission (Maybe Text) +urpName = lens _urpName (\ s a -> s{_urpName = a}) + +-- | ID of this user role permission. +urpId :: Lens' UserRolePermission (Maybe Int64) +urpId = lens _urpId (\ s a -> s{_urpId = a}) + +-- | ID of the permission group that this user role permission belongs to. +urpPermissionGroupId :: Lens' UserRolePermission (Maybe Int64) +urpPermissionGroupId + = lens _urpPermissionGroupId + (\ s a -> s{_urpPermissionGroupId = a}) + +instance FromJSON UserRolePermission where + parseJSON + = withObject "UserRolePermission" + (\ o -> + UserRolePermission <$> + (o .:? "kind" .!= "dfareporting#userRolePermission") + <*> (o .:? "availability") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "permissionGroupId")) + +instance ToJSON UserRolePermission where + toJSON UserRolePermission{..} + = object + (catMaybes + [Just ("kind" .= _urpKind), + ("availability" .=) <$> _urpAvailability, + ("name" .=) <$> _urpName, ("id" .=) <$> _urpId, + ("permissionGroupId" .=) <$> _urpPermissionGroupId]) + +-- | Mobile Carrier List Response +-- +-- /See:/ 'mobileCarriersListResponse' smart constructor. +data MobileCarriersListResponse = MobileCarriersListResponse + { _mclrMobileCarriers :: !(Maybe [Maybe MobileCarrier]) + , _mclrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileCarriersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mclrMobileCarriers' +-- +-- * 'mclrKind' +mobileCarriersListResponse + :: MobileCarriersListResponse +mobileCarriersListResponse = + MobileCarriersListResponse + { _mclrMobileCarriers = Nothing + , _mclrKind = "dfareporting#mobileCarriersListResponse" + } + +-- | Mobile carrier collection. +mclrMobileCarriers :: Lens' MobileCarriersListResponse [Maybe MobileCarrier] +mclrMobileCarriers + = lens _mclrMobileCarriers + (\ s a -> s{_mclrMobileCarriers = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#mobileCarriersListResponse\". +mclrKind :: Lens' MobileCarriersListResponse Text +mclrKind = lens _mclrKind (\ s a -> s{_mclrKind = a}) + +instance FromJSON MobileCarriersListResponse where + parseJSON + = withObject "MobileCarriersListResponse" + (\ o -> + MobileCarriersListResponse <$> + (o .:? "mobileCarriers" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#mobileCarriersListResponse")) + +instance ToJSON MobileCarriersListResponse where + toJSON MobileCarriersListResponse{..} + = object + (catMaybes + [("mobileCarriers" .=) <$> _mclrMobileCarriers, + Just ("kind" .= _mclrKind)]) + +-- | Landing Page List Response +-- +-- /See:/ 'landingPagesListResponse' smart constructor. +data LandingPagesListResponse = LandingPagesListResponse + { _lplrLandingPages :: !(Maybe [Maybe LandingPage]) + , _lplrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lplrLandingPages' +-- +-- * 'lplrKind' +landingPagesListResponse + :: LandingPagesListResponse +landingPagesListResponse = + LandingPagesListResponse + { _lplrLandingPages = Nothing + , _lplrKind = "dfareporting#landingPagesListResponse" + } + +-- | Landing page collection +lplrLandingPages :: Lens' LandingPagesListResponse [Maybe LandingPage] +lplrLandingPages + = lens _lplrLandingPages + (\ s a -> s{_lplrLandingPages = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#landingPagesListResponse\". +lplrKind :: Lens' LandingPagesListResponse Text +lplrKind = lens _lplrKind (\ s a -> s{_lplrKind = a}) + +instance FromJSON LandingPagesListResponse where + parseJSON + = withObject "LandingPagesListResponse" + (\ o -> + LandingPagesListResponse <$> + (o .:? "landingPages" .!= mempty) <*> + (o .:? "kind" .!= + "dfareporting#landingPagesListResponse")) + +instance ToJSON LandingPagesListResponse where + toJSON LandingPagesListResponse{..} + = object + (catMaybes + [("landingPages" .=) <$> _lplrLandingPages, + Just ("kind" .= _lplrKind)]) + +-- | Represents a File resource. A file contains the metadata for a report +-- run. It shows the status of the run and holds the URLs to the generated +-- report data if the run is finished and the status is +-- \"REPORT_AVAILABLE\". +-- +-- /See:/ 'file' smart constructor. +data File = File + { _fStatus :: !(Maybe Text) + , _fEtag :: !(Maybe Text) + , _fKind :: !Text + , _fUrls :: !(Maybe FileURLs) + , _fReportId :: !(Maybe Int64) + , _fDateRange :: !(Maybe (Maybe DateRange)) + , _fFormat :: !(Maybe Text) + , _fLastModifiedTime :: !(Maybe Int64) + , _fId :: !(Maybe Int64) + , _fFileName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'File' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fStatus' +-- +-- * 'fEtag' +-- +-- * 'fKind' +-- +-- * 'fUrls' +-- +-- * 'fReportId' +-- +-- * 'fDateRange' +-- +-- * 'fFormat' +-- +-- * 'fLastModifiedTime' +-- +-- * 'fId' +-- +-- * 'fFileName' +file + :: File +file = + File + { _fStatus = Nothing + , _fEtag = Nothing + , _fKind = "dfareporting#file" + , _fUrls = Nothing + , _fReportId = Nothing + , _fDateRange = Nothing + , _fFormat = Nothing + , _fLastModifiedTime = Nothing + , _fId = Nothing + , _fFileName = Nothing + } + +-- | The status of the report file. +fStatus :: Lens' File (Maybe Text) +fStatus = lens _fStatus (\ s a -> s{_fStatus = a}) + +-- | The eTag of this response for caching purposes. +fEtag :: Lens' File (Maybe Text) +fEtag = lens _fEtag (\ s a -> s{_fEtag = a}) + +-- | The kind of resource this is, in this case dfareporting#file. +fKind :: Lens' File Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +-- | The URLs where the completed report file can be downloaded. +fUrls :: Lens' File (Maybe FileURLs) +fUrls = lens _fUrls (\ s a -> s{_fUrls = a}) + +-- | The ID of the report this file was generated from. +fReportId :: Lens' File (Maybe Int64) +fReportId + = lens _fReportId (\ s a -> s{_fReportId = a}) + +-- | The date range for which the file has report data. The date range will +-- always be the absolute date range for which the report is run. +fDateRange :: Lens' File (Maybe (Maybe DateRange)) +fDateRange + = lens _fDateRange (\ s a -> s{_fDateRange = a}) + +-- | The output format of the report. Only available once the file is +-- available. +fFormat :: Lens' File (Maybe Text) +fFormat = lens _fFormat (\ s a -> s{_fFormat = a}) + +-- | The timestamp in milliseconds since epoch when this file was last +-- modified. +fLastModifiedTime :: Lens' File (Maybe Int64) +fLastModifiedTime + = lens _fLastModifiedTime + (\ s a -> s{_fLastModifiedTime = a}) + +-- | The unique ID of this report file. +fId :: Lens' File (Maybe Int64) +fId = lens _fId (\ s a -> s{_fId = a}) + +-- | The filename of the file. +fFileName :: Lens' File (Maybe Text) +fFileName + = lens _fFileName (\ s a -> s{_fFileName = a}) + +instance FromJSON File where + parseJSON + = withObject "File" + (\ o -> + File <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "dfareporting#file") + <*> (o .:? "urls") + <*> (o .:? "reportId") + <*> (o .:? "dateRange") + <*> (o .:? "format") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "id") + <*> (o .:? "fileName")) + +instance ToJSON File where + toJSON File{..} + = object + (catMaybes + [("status" .=) <$> _fStatus, ("etag" .=) <$> _fEtag, + Just ("kind" .= _fKind), ("urls" .=) <$> _fUrls, + ("reportId" .=) <$> _fReportId, + ("dateRange" .=) <$> _fDateRange, + ("format" .=) <$> _fFormat, + ("lastModifiedTime" .=) <$> _fLastModifiedTime, + ("id" .=) <$> _fId, ("fileName" .=) <$> _fFileName]) + +-- | Contact of an order. +-- +-- /See:/ 'orderContact' smart constructor. +data OrderContact = OrderContact + { _ocSignatureUserProfileId :: !(Maybe Int64) + , _ocContactName :: !(Maybe Text) + , _ocContactTitle :: !(Maybe Text) + , _ocContactType :: !(Maybe Text) + , _ocContactInfo :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderContact' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocSignatureUserProfileId' +-- +-- * 'ocContactName' +-- +-- * 'ocContactTitle' +-- +-- * 'ocContactType' +-- +-- * 'ocContactInfo' +orderContact + :: OrderContact +orderContact = + OrderContact + { _ocSignatureUserProfileId = Nothing + , _ocContactName = Nothing + , _ocContactTitle = Nothing + , _ocContactType = Nothing + , _ocContactInfo = Nothing + } + +-- | ID of the user profile containing the signature that will be embedded +-- into order documents. +ocSignatureUserProfileId :: Lens' OrderContact (Maybe Int64) +ocSignatureUserProfileId + = lens _ocSignatureUserProfileId + (\ s a -> s{_ocSignatureUserProfileId = a}) + +-- | Name of this contact. +ocContactName :: Lens' OrderContact (Maybe Text) +ocContactName + = lens _ocContactName + (\ s a -> s{_ocContactName = a}) + +-- | Title of this contact. +ocContactTitle :: Lens' OrderContact (Maybe Text) +ocContactTitle + = lens _ocContactTitle + (\ s a -> s{_ocContactTitle = a}) + +-- | Type of this contact. +ocContactType :: Lens' OrderContact (Maybe Text) +ocContactType + = lens _ocContactType + (\ s a -> s{_ocContactType = a}) + +-- | Free-form information about this contact. It could be any information +-- related to this contact in addition to type, title, name, and signature +-- user profile ID. +ocContactInfo :: Lens' OrderContact (Maybe Text) +ocContactInfo + = lens _ocContactInfo + (\ s a -> s{_ocContactInfo = a}) + +instance FromJSON OrderContact where + parseJSON + = withObject "OrderContact" + (\ o -> + OrderContact <$> + (o .:? "signatureUserProfileId") <*> + (o .:? "contactName") + <*> (o .:? "contactTitle") + <*> (o .:? "contactType") + <*> (o .:? "contactInfo")) + +instance ToJSON OrderContact where + toJSON OrderContact{..} + = object + (catMaybes + [("signatureUserProfileId" .=) <$> + _ocSignatureUserProfileId, + ("contactName" .=) <$> _ocContactName, + ("contactTitle" .=) <$> _ocContactTitle, + ("contactType" .=) <$> _ocContactType, + ("contactInfo" .=) <$> _ocContactInfo]) + +-- | Site List Response +-- +-- /See:/ 'sitesListResponse' smart constructor. +data SitesListResponse = SitesListResponse + { _slrlNextPageToken :: !(Maybe Text) + , _slrlKind :: !Text + , _slrlSites :: !(Maybe [Maybe Site]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrlNextPageToken' +-- +-- * 'slrlKind' +-- +-- * 'slrlSites' +sitesListResponse + :: SitesListResponse +sitesListResponse = + SitesListResponse + { _slrlNextPageToken = Nothing + , _slrlKind = "dfareporting#sitesListResponse" + , _slrlSites = Nothing + } + +-- | Pagination token to be used for the next list operation. +slrlNextPageToken :: Lens' SitesListResponse (Maybe Text) +slrlNextPageToken + = lens _slrlNextPageToken + (\ s a -> s{_slrlNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#sitesListResponse\". +slrlKind :: Lens' SitesListResponse Text +slrlKind = lens _slrlKind (\ s a -> s{_slrlKind = a}) + +-- | Site collection. +slrlSites :: Lens' SitesListResponse [Maybe Site] +slrlSites + = lens _slrlSites (\ s a -> s{_slrlSites = a}) . + _Default + . _Coerce + +instance FromJSON SitesListResponse where + parseJSON + = withObject "SitesListResponse" + (\ o -> + SitesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dfareporting#sitesListResponse") + <*> (o .:? "sites" .!= mempty)) + +instance ToJSON SitesListResponse where + toJSON SitesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _slrlNextPageToken, + Just ("kind" .= _slrlKind), + ("sites" .=) <$> _slrlSites]) + +-- | Third-party Tracking URL. +-- +-- /See:/ 'thirdPartyTrackingURL' smart constructor. +data ThirdPartyTrackingURL = ThirdPartyTrackingURL + { _tptuUrl :: !(Maybe Text) + , _tptuThirdPartyUrlType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ThirdPartyTrackingURL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tptuUrl' +-- +-- * 'tptuThirdPartyUrlType' +thirdPartyTrackingURL + :: ThirdPartyTrackingURL +thirdPartyTrackingURL = + ThirdPartyTrackingURL + { _tptuUrl = Nothing + , _tptuThirdPartyUrlType = Nothing + } + +-- | URL for the specified third-party URL type. +tptuUrl :: Lens' ThirdPartyTrackingURL (Maybe Text) +tptuUrl = lens _tptuUrl (\ s a -> s{_tptuUrl = a}) + +-- | Third-party URL type for in-stream video creatives. +tptuThirdPartyUrlType :: Lens' ThirdPartyTrackingURL (Maybe Text) +tptuThirdPartyUrlType + = lens _tptuThirdPartyUrlType + (\ s a -> s{_tptuThirdPartyUrlType = a}) + +instance FromJSON ThirdPartyTrackingURL where + parseJSON + = withObject "ThirdPartyTrackingURL" + (\ o -> + ThirdPartyTrackingURL <$> + (o .:? "url") <*> (o .:? "thirdPartyUrlType")) + +instance ToJSON ThirdPartyTrackingURL where + toJSON ThirdPartyTrackingURL{..} + = object + (catMaybes + [("url" .=) <$> _tptuUrl, + ("thirdPartyUrlType" .=) <$> _tptuThirdPartyUrlType]) + +-- | Contains properties of a placement. +-- +-- /See:/ 'placement' smart constructor. +data Placement = Placement + { _ppStatus :: !(Maybe Text) + , _ppPlacementStrategyId :: !(Maybe Int64) + , _ppTagFormats :: !(Maybe [Text]) + , _ppSiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppPricingSchedule :: !(Maybe (Maybe PricingSchedule)) + , _ppSize :: !(Maybe (Maybe Size)) + , _ppKind :: !Text + , _ppKeyName :: !(Maybe Text) + , _ppCampaignIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppAdvertiserId :: !(Maybe Int64) + , _ppAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppCampaignId :: !(Maybe Int64) + , _ppIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppPrimary :: !(Maybe Bool) + , _ppLookbackConfiguration :: !(Maybe (Maybe LookbackConfiguration)) + , _ppTagSetting :: !(Maybe (Maybe TagSetting)) + , _ppContentCategoryId :: !(Maybe Int64) + , _ppDirectorySiteIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppAccountId :: !(Maybe Int64) + , _ppPaymentSource :: !(Maybe Text) + , _ppName :: !(Maybe Text) + , _ppDirectorySiteId :: !(Maybe Int64) + , _ppCreateInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _ppLastModifiedInfo :: !(Maybe (Maybe LastModifiedInfo)) + , _ppId :: !(Maybe Int64) + , _ppSslRequired :: !(Maybe Bool) + , _ppSubaccountId :: !(Maybe Int64) + , _ppPlacementGroupIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _ppExternalId :: !(Maybe Text) + , _ppPlacementGroupId :: !(Maybe Int64) + , _ppComment :: !(Maybe Text) + , _ppSiteId :: !(Maybe Int64) + , _ppCompatibility :: !(Maybe Text) + , _ppArchived :: !(Maybe Bool) + , _ppPaymentApproved :: !(Maybe Bool) + , _ppPublisherUpdateInfo :: !(Maybe (Maybe LastModifiedInfo)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Placement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppStatus' +-- +-- * 'ppPlacementStrategyId' +-- +-- * 'ppTagFormats' +-- +-- * 'ppSiteIdDimensionValue' +-- +-- * 'ppPricingSchedule' +-- +-- * 'ppSize' +-- +-- * 'ppKind' +-- +-- * 'ppKeyName' +-- +-- * 'ppCampaignIdDimensionValue' +-- +-- * 'ppAdvertiserId' +-- +-- * 'ppAdvertiserIdDimensionValue' +-- +-- * 'ppCampaignId' +-- +-- * 'ppIdDimensionValue' +-- +-- * 'ppPrimary' +-- +-- * 'ppLookbackConfiguration' +-- +-- * 'ppTagSetting' +-- +-- * 'ppContentCategoryId' +-- +-- * 'ppDirectorySiteIdDimensionValue' +-- +-- * 'ppAccountId' +-- +-- * 'ppPaymentSource' +-- +-- * 'ppName' +-- +-- * 'ppDirectorySiteId' +-- +-- * 'ppCreateInfo' +-- +-- * 'ppLastModifiedInfo' +-- +-- * 'ppId' +-- +-- * 'ppSslRequired' +-- +-- * 'ppSubaccountId' +-- +-- * 'ppPlacementGroupIdDimensionValue' +-- +-- * 'ppExternalId' +-- +-- * 'ppPlacementGroupId' +-- +-- * 'ppComment' +-- +-- * 'ppSiteId' +-- +-- * 'ppCompatibility' +-- +-- * 'ppArchived' +-- +-- * 'ppPaymentApproved' +-- +-- * 'ppPublisherUpdateInfo' +placement + :: Placement +placement = + Placement + { _ppStatus = Nothing + , _ppPlacementStrategyId = Nothing + , _ppTagFormats = Nothing + , _ppSiteIdDimensionValue = Nothing + , _ppPricingSchedule = Nothing + , _ppSize = Nothing + , _ppKind = "dfareporting#placement" + , _ppKeyName = Nothing + , _ppCampaignIdDimensionValue = Nothing + , _ppAdvertiserId = Nothing + , _ppAdvertiserIdDimensionValue = Nothing + , _ppCampaignId = Nothing + , _ppIdDimensionValue = Nothing + , _ppPrimary = Nothing + , _ppLookbackConfiguration = Nothing + , _ppTagSetting = Nothing + , _ppContentCategoryId = Nothing + , _ppDirectorySiteIdDimensionValue = Nothing + , _ppAccountId = Nothing + , _ppPaymentSource = Nothing + , _ppName = Nothing + , _ppDirectorySiteId = Nothing + , _ppCreateInfo = Nothing + , _ppLastModifiedInfo = Nothing + , _ppId = Nothing + , _ppSslRequired = Nothing + , _ppSubaccountId = Nothing + , _ppPlacementGroupIdDimensionValue = Nothing + , _ppExternalId = Nothing + , _ppPlacementGroupId = Nothing + , _ppComment = Nothing + , _ppSiteId = Nothing + , _ppCompatibility = Nothing + , _ppArchived = Nothing + , _ppPaymentApproved = Nothing + , _ppPublisherUpdateInfo = Nothing + } + +-- | Third-party placement status. +ppStatus :: Lens' Placement (Maybe Text) +ppStatus = lens _ppStatus (\ s a -> s{_ppStatus = a}) + +-- | ID of the placement strategy assigned to this placement. +ppPlacementStrategyId :: Lens' Placement (Maybe Int64) +ppPlacementStrategyId + = lens _ppPlacementStrategyId + (\ s a -> s{_ppPlacementStrategyId = a}) + +-- | Tag formats to generate for this placement. This field is required on +-- insertion. Acceptable values are: - \"PLACEMENT_TAG_STANDARD\" - +-- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\" - \"PLACEMENT_TAG_IFRAME_ILAYER\" - +-- \"PLACEMENT_TAG_INTERNAL_REDIRECT\" - \"PLACEMENT_TAG_JAVASCRIPT\" - +-- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\" - +-- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\" - +-- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\" - +-- \"PLACEMENT_TAG_CLICK_COMMANDS\" - +-- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\" - \"PLACEMENT_TAG_TRACKING\" - +-- \"PLACEMENT_TAG_TRACKING_IFRAME\" - +-- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\" +ppTagFormats :: Lens' Placement [Text] +ppTagFormats + = lens _ppTagFormats (\ s a -> s{_ppTagFormats = a}) + . _Default + . _Coerce + +-- | Dimension value for the ID of the site. This is a read-only, +-- auto-generated field. +ppSiteIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppSiteIdDimensionValue + = lens _ppSiteIdDimensionValue + (\ s a -> s{_ppSiteIdDimensionValue = a}) + +-- | Pricing schedule of this placement. This field is required on insertion, +-- specifically subfields startDate, endDate and pricingType. +ppPricingSchedule :: Lens' Placement (Maybe (Maybe PricingSchedule)) +ppPricingSchedule + = lens _ppPricingSchedule + (\ s a -> s{_ppPricingSchedule = a}) + +-- | Size associated with this placement. When inserting or updating a +-- placement, only the size ID field is used. This field is required on +-- insertion. +ppSize :: Lens' Placement (Maybe (Maybe Size)) +ppSize = lens _ppSize (\ s a -> s{_ppSize = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#placement\". +ppKind :: Lens' Placement Text +ppKind = lens _ppKind (\ s a -> s{_ppKind = a}) + +-- | Key name of this placement. This is a read-only, auto-generated field. +ppKeyName :: Lens' Placement (Maybe Text) +ppKeyName + = lens _ppKeyName (\ s a -> s{_ppKeyName = a}) + +-- | Dimension value for the ID of the campaign. This is a read-only, +-- auto-generated field. +ppCampaignIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppCampaignIdDimensionValue + = lens _ppCampaignIdDimensionValue + (\ s a -> s{_ppCampaignIdDimensionValue = a}) + +-- | Advertiser ID of this placement. This field can be left blank. +ppAdvertiserId :: Lens' Placement (Maybe Int64) +ppAdvertiserId + = lens _ppAdvertiserId + (\ s a -> s{_ppAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +ppAdvertiserIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppAdvertiserIdDimensionValue + = lens _ppAdvertiserIdDimensionValue + (\ s a -> s{_ppAdvertiserIdDimensionValue = a}) + +-- | Campaign ID of this placement. This field is a required field on +-- insertion. +ppCampaignId :: Lens' Placement (Maybe Int64) +ppCampaignId + = lens _ppCampaignId (\ s a -> s{_ppCampaignId = a}) + +-- | Dimension value for the ID of this placement. This is a read-only, +-- auto-generated field. +ppIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppIdDimensionValue + = lens _ppIdDimensionValue + (\ s a -> s{_ppIdDimensionValue = a}) + +-- | Whether this placement is the primary placement of a roadblock +-- (placement group). You cannot change this field from true to false. +-- Setting this field to true will automatically set the primary field on +-- the original primary placement of the roadblock to false, and it will +-- automatically set the roadblock\'s primaryPlacementId field to the ID of +-- this placement. +ppPrimary :: Lens' Placement (Maybe Bool) +ppPrimary + = lens _ppPrimary (\ s a -> s{_ppPrimary = a}) + +-- | Lookback window settings for this placement. +ppLookbackConfiguration :: Lens' Placement (Maybe (Maybe LookbackConfiguration)) +ppLookbackConfiguration + = lens _ppLookbackConfiguration + (\ s a -> s{_ppLookbackConfiguration = a}) + +-- | Tag settings for this placement. +ppTagSetting :: Lens' Placement (Maybe (Maybe TagSetting)) +ppTagSetting + = lens _ppTagSetting (\ s a -> s{_ppTagSetting = a}) + +-- | ID of the content category assigned to this placement. +ppContentCategoryId :: Lens' Placement (Maybe Int64) +ppContentCategoryId + = lens _ppContentCategoryId + (\ s a -> s{_ppContentCategoryId = a}) + +-- | Dimension value for the ID of the directory site. This is a read-only, +-- auto-generated field. +ppDirectorySiteIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppDirectorySiteIdDimensionValue + = lens _ppDirectorySiteIdDimensionValue + (\ s a -> s{_ppDirectorySiteIdDimensionValue = a}) + +-- | Account ID of this placement. This field can be left blank. +ppAccountId :: Lens' Placement (Maybe Int64) +ppAccountId + = lens _ppAccountId (\ s a -> s{_ppAccountId = a}) + +-- | Payment source for this placement. This is a required field that is +-- read-only after insertion. +ppPaymentSource :: Lens' Placement (Maybe Text) +ppPaymentSource + = lens _ppPaymentSource + (\ s a -> s{_ppPaymentSource = a}) + +-- | Name of this placement.This is a required field and must be less than +-- 256 characters long. +ppName :: Lens' Placement (Maybe Text) +ppName = lens _ppName (\ s a -> s{_ppName = a}) + +-- | Directory site ID of this placement. On insert, you must set either this +-- field or the siteId field to specify the site associated with this +-- placement. This is a required field that is read-only after insertion. +ppDirectorySiteId :: Lens' Placement (Maybe Int64) +ppDirectorySiteId + = lens _ppDirectorySiteId + (\ s a -> s{_ppDirectorySiteId = a}) + +-- | Information about the creation of this placement. This is a read-only +-- field. +ppCreateInfo :: Lens' Placement (Maybe (Maybe LastModifiedInfo)) +ppCreateInfo + = lens _ppCreateInfo (\ s a -> s{_ppCreateInfo = a}) + +-- | Information about the most recent modification of this placement. This +-- is a read-only field. +ppLastModifiedInfo :: Lens' Placement (Maybe (Maybe LastModifiedInfo)) +ppLastModifiedInfo + = lens _ppLastModifiedInfo + (\ s a -> s{_ppLastModifiedInfo = a}) + +-- | ID of this placement. This is a read-only, auto-generated field. +ppId :: Lens' Placement (Maybe Int64) +ppId = lens _ppId (\ s a -> s{_ppId = a}) + +-- | Whether creatives assigned to this placement must be SSL-compliant. +ppSslRequired :: Lens' Placement (Maybe Bool) +ppSslRequired + = lens _ppSslRequired + (\ s a -> s{_ppSslRequired = a}) + +-- | Subaccount ID of this placement. This field can be left blank. +ppSubaccountId :: Lens' Placement (Maybe Int64) +ppSubaccountId + = lens _ppSubaccountId + (\ s a -> s{_ppSubaccountId = a}) + +-- | Dimension value for the ID of the placement group. This is a read-only, +-- auto-generated field. +ppPlacementGroupIdDimensionValue :: Lens' Placement (Maybe (Maybe DimensionValue)) +ppPlacementGroupIdDimensionValue + = lens _ppPlacementGroupIdDimensionValue + (\ s a -> s{_ppPlacementGroupIdDimensionValue = a}) + +-- | External ID for this placement. +ppExternalId :: Lens' Placement (Maybe Text) +ppExternalId + = lens _ppExternalId (\ s a -> s{_ppExternalId = a}) + +-- | ID of this placement\'s group, if applicable. +ppPlacementGroupId :: Lens' Placement (Maybe Int64) +ppPlacementGroupId + = lens _ppPlacementGroupId + (\ s a -> s{_ppPlacementGroupId = a}) + +-- | Comments for this placement. +ppComment :: Lens' Placement (Maybe Text) +ppComment + = lens _ppComment (\ s a -> s{_ppComment = a}) + +-- | Site ID associated with this placement. On insert, you must set either +-- this field or the directorySiteId field to specify the site associated +-- with this placement. This is a required field that is read-only after +-- insertion. +ppSiteId :: Lens' Placement (Maybe Int64) +ppSiteId = lens _ppSiteId (\ s a -> s{_ppSiteId = a}) + +-- | Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering +-- either on desktop or on mobile devices for regular or interstitial ads, +-- respectively. APP and APP_INTERSTITIAL are for rendering in mobile +-- apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads +-- developed with the VAST standard. This field is required on insertion. +ppCompatibility :: Lens' Placement (Maybe Text) +ppCompatibility + = lens _ppCompatibility + (\ s a -> s{_ppCompatibility = a}) + +-- | Whether this placement is archived. +ppArchived :: Lens' Placement (Maybe Bool) +ppArchived + = lens _ppArchived (\ s a -> s{_ppArchived = a}) + +-- | Whether payment was approved for this placement. This is a read-only +-- field relevant only to publisher-paid placements. +ppPaymentApproved :: Lens' Placement (Maybe Bool) +ppPaymentApproved + = lens _ppPaymentApproved + (\ s a -> s{_ppPaymentApproved = a}) + +-- | Information about the last publisher update. This is a read-only field. +ppPublisherUpdateInfo :: Lens' Placement (Maybe (Maybe LastModifiedInfo)) +ppPublisherUpdateInfo + = lens _ppPublisherUpdateInfo + (\ s a -> s{_ppPublisherUpdateInfo = a}) + +instance FromJSON Placement where + parseJSON + = withObject "Placement" + (\ o -> + Placement <$> + (o .:? "status") <*> (o .:? "placementStrategyId") + <*> (o .:? "tagFormats" .!= mempty) + <*> (o .:? "siteIdDimensionValue") + <*> (o .:? "pricingSchedule") + <*> (o .:? "size") + <*> (o .:? "kind" .!= "dfareporting#placement") + <*> (o .:? "keyName") + <*> (o .:? "campaignIdDimensionValue") + <*> (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "campaignId") + <*> (o .:? "idDimensionValue") + <*> (o .:? "primary") + <*> (o .:? "lookbackConfiguration") + <*> (o .:? "tagSetting") + <*> (o .:? "contentCategoryId") + <*> (o .:? "directorySiteIdDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "paymentSource") + <*> (o .:? "name") + <*> (o .:? "directorySiteId") + <*> (o .:? "createInfo") + <*> (o .:? "lastModifiedInfo") + <*> (o .:? "id") + <*> (o .:? "sslRequired") + <*> (o .:? "subaccountId") + <*> (o .:? "placementGroupIdDimensionValue") + <*> (o .:? "externalId") + <*> (o .:? "placementGroupId") + <*> (o .:? "comment") + <*> (o .:? "siteId") + <*> (o .:? "compatibility") + <*> (o .:? "archived") + <*> (o .:? "paymentApproved") + <*> (o .:? "publisherUpdateInfo")) + +instance ToJSON Placement where + toJSON Placement{..} + = object + (catMaybes + [("status" .=) <$> _ppStatus, + ("placementStrategyId" .=) <$> + _ppPlacementStrategyId, + ("tagFormats" .=) <$> _ppTagFormats, + ("siteIdDimensionValue" .=) <$> + _ppSiteIdDimensionValue, + ("pricingSchedule" .=) <$> _ppPricingSchedule, + ("size" .=) <$> _ppSize, Just ("kind" .= _ppKind), + ("keyName" .=) <$> _ppKeyName, + ("campaignIdDimensionValue" .=) <$> + _ppCampaignIdDimensionValue, + ("advertiserId" .=) <$> _ppAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _ppAdvertiserIdDimensionValue, + ("campaignId" .=) <$> _ppCampaignId, + ("idDimensionValue" .=) <$> _ppIdDimensionValue, + ("primary" .=) <$> _ppPrimary, + ("lookbackConfiguration" .=) <$> + _ppLookbackConfiguration, + ("tagSetting" .=) <$> _ppTagSetting, + ("contentCategoryId" .=) <$> _ppContentCategoryId, + ("directorySiteIdDimensionValue" .=) <$> + _ppDirectorySiteIdDimensionValue, + ("accountId" .=) <$> _ppAccountId, + ("paymentSource" .=) <$> _ppPaymentSource, + ("name" .=) <$> _ppName, + ("directorySiteId" .=) <$> _ppDirectorySiteId, + ("createInfo" .=) <$> _ppCreateInfo, + ("lastModifiedInfo" .=) <$> _ppLastModifiedInfo, + ("id" .=) <$> _ppId, + ("sslRequired" .=) <$> _ppSslRequired, + ("subaccountId" .=) <$> _ppSubaccountId, + ("placementGroupIdDimensionValue" .=) <$> + _ppPlacementGroupIdDimensionValue, + ("externalId" .=) <$> _ppExternalId, + ("placementGroupId" .=) <$> _ppPlacementGroupId, + ("comment" .=) <$> _ppComment, + ("siteId" .=) <$> _ppSiteId, + ("compatibility" .=) <$> _ppCompatibility, + ("archived" .=) <$> _ppArchived, + ("paymentApproved" .=) <$> _ppPaymentApproved, + ("publisherUpdateInfo" .=) <$> + _ppPublisherUpdateInfo]) + +-- | Directory Site Contact Assignment +-- +-- /See:/ 'directorySiteContactAssignment' smart constructor. +data DirectorySiteContactAssignment = DirectorySiteContactAssignment + { _dscaVisibility :: !(Maybe Text) + , _dscaContactId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteContactAssignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dscaVisibility' +-- +-- * 'dscaContactId' +directorySiteContactAssignment + :: DirectorySiteContactAssignment +directorySiteContactAssignment = + DirectorySiteContactAssignment + { _dscaVisibility = Nothing + , _dscaContactId = Nothing + } + +-- | Visibility of this directory site contact assignment. When set to PUBLIC +-- this contact assignment is visible to all account and agency users; when +-- set to PRIVATE it is visible only to the site. +dscaVisibility :: Lens' DirectorySiteContactAssignment (Maybe Text) +dscaVisibility + = lens _dscaVisibility + (\ s a -> s{_dscaVisibility = a}) + +-- | ID of this directory site contact. This is a read-only, auto-generated +-- field. +dscaContactId :: Lens' DirectorySiteContactAssignment (Maybe Int64) +dscaContactId + = lens _dscaContactId + (\ s a -> s{_dscaContactId = a}) + +instance FromJSON DirectorySiteContactAssignment + where + parseJSON + = withObject "DirectorySiteContactAssignment" + (\ o -> + DirectorySiteContactAssignment <$> + (o .:? "visibility") <*> (o .:? "contactId")) + +instance ToJSON DirectorySiteContactAssignment where + toJSON DirectorySiteContactAssignment{..} + = object + (catMaybes + [("visibility" .=) <$> _dscaVisibility, + ("contactId" .=) <$> _dscaContactId]) + +-- | Floodlight Activity GenerateTag Response +-- +-- /See:/ 'floodlightActivitiesGenerateTagResponse' smart constructor. +data FloodlightActivitiesGenerateTagResponse = FloodlightActivitiesGenerateTagResponse + { _fagtrFloodlightActivityTag :: !(Maybe Text) + , _fagtrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesGenerateTagResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagtrFloodlightActivityTag' +-- +-- * 'fagtrKind' +floodlightActivitiesGenerateTagResponse + :: FloodlightActivitiesGenerateTagResponse +floodlightActivitiesGenerateTagResponse = + FloodlightActivitiesGenerateTagResponse + { _fagtrFloodlightActivityTag = Nothing + , _fagtrKind = "dfareporting#floodlightActivitiesGenerateTagResponse" + } + +-- | Generated tag for this floodlight activity. +fagtrFloodlightActivityTag :: Lens' FloodlightActivitiesGenerateTagResponse (Maybe Text) +fagtrFloodlightActivityTag + = lens _fagtrFloodlightActivityTag + (\ s a -> s{_fagtrFloodlightActivityTag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#floodlightActivitiesGenerateTagResponse\". +fagtrKind :: Lens' FloodlightActivitiesGenerateTagResponse Text +fagtrKind + = lens _fagtrKind (\ s a -> s{_fagtrKind = a}) + +instance FromJSON + FloodlightActivitiesGenerateTagResponse where + parseJSON + = withObject + "FloodlightActivitiesGenerateTagResponse" + (\ o -> + FloodlightActivitiesGenerateTagResponse <$> + (o .:? "floodlightActivityTag") <*> + (o .:? "kind" .!= + "dfareporting#floodlightActivitiesGenerateTagResponse")) + +instance ToJSON + FloodlightActivitiesGenerateTagResponse where + toJSON FloodlightActivitiesGenerateTagResponse{..} + = object + (catMaybes + [("floodlightActivityTag" .=) <$> + _fagtrFloodlightActivityTag, + Just ("kind" .= _fagtrKind)]) + +-- | Remarketing List Targeting Expression. +-- +-- /See:/ 'listTargetingExpression' smart constructor. +newtype ListTargetingExpression = ListTargetingExpression + { _lteExpression :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTargetingExpression' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lteExpression' +listTargetingExpression + :: ListTargetingExpression +listTargetingExpression = + ListTargetingExpression + { _lteExpression = Nothing + } + +-- | Expression describing which lists are being targeted by the ad. +lteExpression :: Lens' ListTargetingExpression (Maybe Text) +lteExpression + = lens _lteExpression + (\ s a -> s{_lteExpression = a}) + +instance FromJSON ListTargetingExpression where + parseJSON + = withObject "ListTargetingExpression" + (\ o -> + ListTargetingExpression <$> (o .:? "expression")) + +instance ToJSON ListTargetingExpression where + toJSON ListTargetingExpression{..} + = object + (catMaybes [("expression" .=) <$> _lteExpression]) + +-- | Contains properties of a DoubleClick Planning order document. +-- +-- /See:/ 'orderDocument' smart constructor. +data OrderDocument = OrderDocument + { _odSigned :: !(Maybe Bool) + , _odKind :: !Text + , _odAdvertiserId :: !(Maybe Int64) + , _odLastSentTime :: !(Maybe UTCTime) + , _odAmendedOrderDocumentId :: !(Maybe Int64) + , _odLastSentRecipients :: !(Maybe [Text]) + , _odEffectiveDate :: !(Maybe UTCTime) + , _odApprovedByUserProfileIds :: !(Maybe [Int64]) + , _odAccountId :: !(Maybe Int64) + , _odId :: !(Maybe Int64) + , _odProjectId :: !(Maybe Int64) + , _odTitle :: !(Maybe Text) + , _odSubaccountId :: !(Maybe Int64) + , _odType :: !(Maybe Text) + , _odOrderId :: !(Maybe Int64) + , _odCancelled :: !(Maybe Bool) + , _odCreatedInfo :: !(Maybe (Maybe LastModifiedInfo)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderDocument' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odSigned' +-- +-- * 'odKind' +-- +-- * 'odAdvertiserId' +-- +-- * 'odLastSentTime' +-- +-- * 'odAmendedOrderDocumentId' +-- +-- * 'odLastSentRecipients' +-- +-- * 'odEffectiveDate' +-- +-- * 'odApprovedByUserProfileIds' +-- +-- * 'odAccountId' +-- +-- * 'odId' +-- +-- * 'odProjectId' +-- +-- * 'odTitle' +-- +-- * 'odSubaccountId' +-- +-- * 'odType' +-- +-- * 'odOrderId' +-- +-- * 'odCancelled' +-- +-- * 'odCreatedInfo' +orderDocument + :: OrderDocument +orderDocument = + OrderDocument + { _odSigned = Nothing + , _odKind = "dfareporting#orderDocument" + , _odAdvertiserId = Nothing + , _odLastSentTime = Nothing + , _odAmendedOrderDocumentId = Nothing + , _odLastSentRecipients = Nothing + , _odEffectiveDate = Nothing + , _odApprovedByUserProfileIds = Nothing + , _odAccountId = Nothing + , _odId = Nothing + , _odProjectId = Nothing + , _odTitle = Nothing + , _odSubaccountId = Nothing + , _odType = Nothing + , _odOrderId = Nothing + , _odCancelled = Nothing + , _odCreatedInfo = Nothing + } + +-- | Whether this order document has been signed. +odSigned :: Lens' OrderDocument (Maybe Bool) +odSigned = lens _odSigned (\ s a -> s{_odSigned = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#orderDocument\". +odKind :: Lens' OrderDocument Text +odKind = lens _odKind (\ s a -> s{_odKind = a}) + +-- | Advertiser ID of this order document. +odAdvertiserId :: Lens' OrderDocument (Maybe Int64) +odAdvertiserId + = lens _odAdvertiserId + (\ s a -> s{_odAdvertiserId = a}) + +-- | Timestamp of the last email sent with this order document. +odLastSentTime :: Lens' OrderDocument (Maybe UTCTime) +odLastSentTime + = lens _odLastSentTime + (\ s a -> s{_odLastSentTime = a}) + +-- | The amended order document ID of this order document. An order document +-- can be created by optionally amending another order document so that the +-- change history can be preserved. +odAmendedOrderDocumentId :: Lens' OrderDocument (Maybe Int64) +odAmendedOrderDocumentId + = lens _odAmendedOrderDocumentId + (\ s a -> s{_odAmendedOrderDocumentId = a}) + +-- | List of email addresses that received the last sent document. +odLastSentRecipients :: Lens' OrderDocument [Text] +odLastSentRecipients + = lens _odLastSentRecipients + (\ s a -> s{_odLastSentRecipients = a}) + . _Default + . _Coerce + +-- | Effective date of this order document. +odEffectiveDate :: Lens' OrderDocument (Maybe UTCTime) +odEffectiveDate + = lens _odEffectiveDate + (\ s a -> s{_odEffectiveDate = a}) + +-- | IDs of users who have approved this order document. +odApprovedByUserProfileIds :: Lens' OrderDocument [Int64] +odApprovedByUserProfileIds + = lens _odApprovedByUserProfileIds + (\ s a -> s{_odApprovedByUserProfileIds = a}) + . _Default + . _Coerce + +-- | Account ID of this order document. +odAccountId :: Lens' OrderDocument (Maybe Int64) +odAccountId + = lens _odAccountId (\ s a -> s{_odAccountId = a}) + +-- | ID of this order document. +odId :: Lens' OrderDocument (Maybe Int64) +odId = lens _odId (\ s a -> s{_odId = a}) + +-- | Project ID of this order document. +odProjectId :: Lens' OrderDocument (Maybe Int64) +odProjectId + = lens _odProjectId (\ s a -> s{_odProjectId = a}) + +-- | Title of this order document. +odTitle :: Lens' OrderDocument (Maybe Text) +odTitle = lens _odTitle (\ s a -> s{_odTitle = a}) + +-- | Subaccount ID of this order document. +odSubaccountId :: Lens' OrderDocument (Maybe Int64) +odSubaccountId + = lens _odSubaccountId + (\ s a -> s{_odSubaccountId = a}) + +-- | Type of this order document +odType :: Lens' OrderDocument (Maybe Text) +odType = lens _odType (\ s a -> s{_odType = a}) + +-- | ID of the order from which this order document is created. +odOrderId :: Lens' OrderDocument (Maybe Int64) +odOrderId + = lens _odOrderId (\ s a -> s{_odOrderId = a}) + +-- | Whether this order document is cancelled. +odCancelled :: Lens' OrderDocument (Maybe Bool) +odCancelled + = lens _odCancelled (\ s a -> s{_odCancelled = a}) + +-- | Information about the creation of this order document. +odCreatedInfo :: Lens' OrderDocument (Maybe (Maybe LastModifiedInfo)) +odCreatedInfo + = lens _odCreatedInfo + (\ s a -> s{_odCreatedInfo = a}) + +instance FromJSON OrderDocument where + parseJSON + = withObject "OrderDocument" + (\ o -> + OrderDocument <$> + (o .:? "signed") <*> + (o .:? "kind" .!= "dfareporting#orderDocument") + <*> (o .:? "advertiserId") + <*> (o .:? "lastSentTime") + <*> (o .:? "amendedOrderDocumentId") + <*> (o .:? "lastSentRecipients" .!= mempty) + <*> (o .:? "effectiveDate") + <*> (o .:? "approvedByUserProfileIds" .!= mempty) + <*> (o .:? "accountId") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "title") + <*> (o .:? "subaccountId") + <*> (o .:? "type") + <*> (o .:? "orderId") + <*> (o .:? "cancelled") + <*> (o .:? "createdInfo")) + +instance ToJSON OrderDocument where + toJSON OrderDocument{..} + = object + (catMaybes + [("signed" .=) <$> _odSigned, + Just ("kind" .= _odKind), + ("advertiserId" .=) <$> _odAdvertiserId, + ("lastSentTime" .=) <$> _odLastSentTime, + ("amendedOrderDocumentId" .=) <$> + _odAmendedOrderDocumentId, + ("lastSentRecipients" .=) <$> _odLastSentRecipients, + ("effectiveDate" .=) <$> _odEffectiveDate, + ("approvedByUserProfileIds" .=) <$> + _odApprovedByUserProfileIds, + ("accountId" .=) <$> _odAccountId, + ("id" .=) <$> _odId, + ("projectId" .=) <$> _odProjectId, + ("title" .=) <$> _odTitle, + ("subaccountId" .=) <$> _odSubaccountId, + ("type" .=) <$> _odType, + ("orderId" .=) <$> _odOrderId, + ("cancelled" .=) <$> _odCancelled, + ("createdInfo" .=) <$> _odCreatedInfo]) + +-- | Ad Slot +-- +-- /See:/ 'adSlot' smart constructor. +data AdSlot = AdSlot + { _aHeight :: !(Maybe Int64) + , _aPaymentSourceType :: !(Maybe Text) + , _aLinkedPlacementId :: !(Maybe Int64) + , _aWidth :: !(Maybe Int64) + , _aPrimary :: !(Maybe Bool) + , _aName :: !(Maybe Text) + , _aComment :: !(Maybe Text) + , _aCompatibility :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdSlot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aHeight' +-- +-- * 'aPaymentSourceType' +-- +-- * 'aLinkedPlacementId' +-- +-- * 'aWidth' +-- +-- * 'aPrimary' +-- +-- * 'aName' +-- +-- * 'aComment' +-- +-- * 'aCompatibility' +adSlot + :: AdSlot +adSlot = + AdSlot + { _aHeight = Nothing + , _aPaymentSourceType = Nothing + , _aLinkedPlacementId = Nothing + , _aWidth = Nothing + , _aPrimary = Nothing + , _aName = Nothing + , _aComment = Nothing + , _aCompatibility = Nothing + } + +-- | Height of this ad slot. +aHeight :: Lens' AdSlot (Maybe Int64) +aHeight = lens _aHeight (\ s a -> s{_aHeight = a}) + +-- | Payment source type of this ad slot. +aPaymentSourceType :: Lens' AdSlot (Maybe Text) +aPaymentSourceType + = lens _aPaymentSourceType + (\ s a -> s{_aPaymentSourceType = a}) + +-- | ID of the placement from an external platform that is linked to this ad +-- slot. +aLinkedPlacementId :: Lens' AdSlot (Maybe Int64) +aLinkedPlacementId + = lens _aLinkedPlacementId + (\ s a -> s{_aLinkedPlacementId = a}) + +-- | Width of this ad slot. +aWidth :: Lens' AdSlot (Maybe Int64) +aWidth = lens _aWidth (\ s a -> s{_aWidth = a}) + +-- | Primary ad slot of a roadblock inventory item. +aPrimary :: Lens' AdSlot (Maybe Bool) +aPrimary = lens _aPrimary (\ s a -> s{_aPrimary = a}) + +-- | Name of this ad slot. +aName :: Lens' AdSlot (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | Comment for this ad slot. +aComment :: Lens' AdSlot (Maybe Text) +aComment = lens _aComment (\ s a -> s{_aComment = a}) + +-- | Ad slot compatibility. WEB and WEB_INTERSTITIAL refer to rendering +-- either on desktop or on mobile devices for regular or interstitial ads +-- respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. +-- IN_STREAM_VIDEO refers to rendering in in-stream video ads developed +-- with the VAST standard. +aCompatibility :: Lens' AdSlot (Maybe Text) +aCompatibility + = lens _aCompatibility + (\ s a -> s{_aCompatibility = a}) + +instance FromJSON AdSlot where + parseJSON + = withObject "AdSlot" + (\ o -> + AdSlot <$> + (o .:? "height") <*> (o .:? "paymentSourceType") <*> + (o .:? "linkedPlacementId") + <*> (o .:? "width") + <*> (o .:? "primary") + <*> (o .:? "name") + <*> (o .:? "comment") + <*> (o .:? "compatibility")) + +instance ToJSON AdSlot where + toJSON AdSlot{..} + = object + (catMaybes + [("height" .=) <$> _aHeight, + ("paymentSourceType" .=) <$> _aPaymentSourceType, + ("linkedPlacementId" .=) <$> _aLinkedPlacementId, + ("width" .=) <$> _aWidth, + ("primary" .=) <$> _aPrimary, ("name" .=) <$> _aName, + ("comment" .=) <$> _aComment, + ("compatibility" .=) <$> _aCompatibility]) + +-- | Contains properties of a creative field. +-- +-- /See:/ 'creativeField' smart constructor. +data CreativeField = CreativeField + { _cffKind :: !Text + , _cffAdvertiserId :: !(Maybe Int64) + , _cffAdvertiserIdDimensionValue :: !(Maybe (Maybe DimensionValue)) + , _cffAccountId :: !(Maybe Int64) + , _cffName :: !(Maybe Text) + , _cffId :: !(Maybe Int64) + , _cffSubaccountId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeField' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cffKind' +-- +-- * 'cffAdvertiserId' +-- +-- * 'cffAdvertiserIdDimensionValue' +-- +-- * 'cffAccountId' +-- +-- * 'cffName' +-- +-- * 'cffId' +-- +-- * 'cffSubaccountId' +creativeField + :: CreativeField +creativeField = + CreativeField + { _cffKind = "dfareporting#creativeField" + , _cffAdvertiserId = Nothing + , _cffAdvertiserIdDimensionValue = Nothing + , _cffAccountId = Nothing + , _cffName = Nothing + , _cffId = Nothing + , _cffSubaccountId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#creativeField\". +cffKind :: Lens' CreativeField Text +cffKind = lens _cffKind (\ s a -> s{_cffKind = a}) + +-- | Advertiser ID of this creative field. This is a required field on +-- insertion. +cffAdvertiserId :: Lens' CreativeField (Maybe Int64) +cffAdvertiserId + = lens _cffAdvertiserId + (\ s a -> s{_cffAdvertiserId = a}) + +-- | Dimension value for the ID of the advertiser. This is a read-only, +-- auto-generated field. +cffAdvertiserIdDimensionValue :: Lens' CreativeField (Maybe (Maybe DimensionValue)) +cffAdvertiserIdDimensionValue + = lens _cffAdvertiserIdDimensionValue + (\ s a -> s{_cffAdvertiserIdDimensionValue = a}) + +-- | Account ID of this creative field. This is a read-only field that can be +-- left blank. +cffAccountId :: Lens' CreativeField (Maybe Int64) +cffAccountId + = lens _cffAccountId (\ s a -> s{_cffAccountId = a}) + +-- | Name of this creative field. This is a required field and must be less +-- than 256 characters long and unique among creative fields of the same +-- advertiser. +cffName :: Lens' CreativeField (Maybe Text) +cffName = lens _cffName (\ s a -> s{_cffName = a}) + +-- | ID of this creative field. This is a read-only, auto-generated field. +cffId :: Lens' CreativeField (Maybe Int64) +cffId = lens _cffId (\ s a -> s{_cffId = a}) + +-- | Subaccount ID of this creative field. This is a read-only field that can +-- be left blank. +cffSubaccountId :: Lens' CreativeField (Maybe Int64) +cffSubaccountId + = lens _cffSubaccountId + (\ s a -> s{_cffSubaccountId = a}) + +instance FromJSON CreativeField where + parseJSON + = withObject "CreativeField" + (\ o -> + CreativeField <$> + (o .:? "kind" .!= "dfareporting#creativeField") <*> + (o .:? "advertiserId") + <*> (o .:? "advertiserIdDimensionValue") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "subaccountId")) + +instance ToJSON CreativeField where + toJSON CreativeField{..} + = object + (catMaybes + [Just ("kind" .= _cffKind), + ("advertiserId" .=) <$> _cffAdvertiserId, + ("advertiserIdDimensionValue" .=) <$> + _cffAdvertiserIdDimensionValue, + ("accountId" .=) <$> _cffAccountId, + ("name" .=) <$> _cffName, ("id" .=) <$> _cffId, + ("subaccountId" .=) <$> _cffSubaccountId]) + +-- | Properties of inheriting and overriding the default click-through event +-- tag. A campaign may override the event tag defined at the advertiser +-- level, and an ad may also override the campaign\'s setting further. +-- +-- /See:/ 'defaultClickThroughEventTagProperties' smart constructor. +data DefaultClickThroughEventTagProperties = DefaultClickThroughEventTagProperties + { _dctetpOverrideInheritedEventTag :: !(Maybe Bool) + , _dctetpDefaultClickThroughEventTagId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultClickThroughEventTagProperties' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dctetpOverrideInheritedEventTag' +-- +-- * 'dctetpDefaultClickThroughEventTagId' +defaultClickThroughEventTagProperties + :: DefaultClickThroughEventTagProperties +defaultClickThroughEventTagProperties = + DefaultClickThroughEventTagProperties + { _dctetpOverrideInheritedEventTag = Nothing + , _dctetpDefaultClickThroughEventTagId = Nothing + } + +-- | Whether this entity should override the inherited default click-through +-- event tag with its own defined value. +dctetpOverrideInheritedEventTag :: Lens' DefaultClickThroughEventTagProperties (Maybe Bool) +dctetpOverrideInheritedEventTag + = lens _dctetpOverrideInheritedEventTag + (\ s a -> s{_dctetpOverrideInheritedEventTag = a}) + +-- | ID of the click-through event tag to apply to all ads in this entity\'s +-- scope. +dctetpDefaultClickThroughEventTagId :: Lens' DefaultClickThroughEventTagProperties (Maybe Int64) +dctetpDefaultClickThroughEventTagId + = lens _dctetpDefaultClickThroughEventTagId + (\ s a -> + s{_dctetpDefaultClickThroughEventTagId = a}) + +instance FromJSON + DefaultClickThroughEventTagProperties where + parseJSON + = withObject "DefaultClickThroughEventTagProperties" + (\ o -> + DefaultClickThroughEventTagProperties <$> + (o .:? "overrideInheritedEventTag") <*> + (o .:? "defaultClickThroughEventTagId")) + +instance ToJSON DefaultClickThroughEventTagProperties + where + toJSON DefaultClickThroughEventTagProperties{..} + = object + (catMaybes + [("overrideInheritedEventTag" .=) <$> + _dctetpOverrideInheritedEventTag, + ("defaultClickThroughEventTagId" .=) <$> + _dctetpDefaultClickThroughEventTagId]) + +-- | Contains information about a metro region that can be targeted by ads. +-- +-- /See:/ 'metro' smart constructor. +data Metro = Metro + { _metMetroCode :: !(Maybe Text) + , _metKind :: !Text + , _metName :: !(Maybe Text) + , _metCountryCode :: !(Maybe Text) + , _metDmaId :: !(Maybe Int64) + , _metCountryDartId :: !(Maybe Int64) + , _metDartId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metro' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'metMetroCode' +-- +-- * 'metKind' +-- +-- * 'metName' +-- +-- * 'metCountryCode' +-- +-- * 'metDmaId' +-- +-- * 'metCountryDartId' +-- +-- * 'metDartId' +metro + :: Metro +metro = + Metro + { _metMetroCode = Nothing + , _metKind = "dfareporting#metro" + , _metName = Nothing + , _metCountryCode = Nothing + , _metDmaId = Nothing + , _metCountryDartId = Nothing + , _metDartId = Nothing + } + +-- | Metro code of this metro region. This is equivalent to dma_id. +metMetroCode :: Lens' Metro (Maybe Text) +metMetroCode + = lens _metMetroCode (\ s a -> s{_metMetroCode = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dfareporting#metro\". +metKind :: Lens' Metro Text +metKind = lens _metKind (\ s a -> s{_metKind = a}) + +-- | Name of this metro region. +metName :: Lens' Metro (Maybe Text) +metName = lens _metName (\ s a -> s{_metName = a}) + +-- | Country code of the country to which this metro region belongs. +metCountryCode :: Lens' Metro (Maybe Text) +metCountryCode + = lens _metCountryCode + (\ s a -> s{_metCountryCode = a}) + +-- | DMA ID of this metro region. This is the ID used for targeting and +-- generating reports, and is equivalent to metro_code. +metDmaId :: Lens' Metro (Maybe Int64) +metDmaId = lens _metDmaId (\ s a -> s{_metDmaId = a}) + +-- | DART ID of the country to which this metro region belongs. +metCountryDartId :: Lens' Metro (Maybe Int64) +metCountryDartId + = lens _metCountryDartId + (\ s a -> s{_metCountryDartId = a}) + +-- | DART ID of this metro region. +metDartId :: Lens' Metro (Maybe Int64) +metDartId + = lens _metDartId (\ s a -> s{_metDartId = a}) + +instance FromJSON Metro where + parseJSON + = withObject "Metro" + (\ o -> + Metro <$> + (o .:? "metroCode") <*> + (o .:? "kind" .!= "dfareporting#metro") + <*> (o .:? "name") + <*> (o .:? "countryCode") + <*> (o .:? "dmaId") + <*> (o .:? "countryDartId") + <*> (o .:? "dartId")) + +instance ToJSON Metro where + toJSON Metro{..} + = object + (catMaybes + [("metroCode" .=) <$> _metMetroCode, + Just ("kind" .= _metKind), ("name" .=) <$> _metName, + ("countryCode" .=) <$> _metCountryCode, + ("dmaId" .=) <$> _metDmaId, + ("countryDartId" .=) <$> _metCountryDartId, + ("dartId" .=) <$> _metDartId]) diff --git a/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs new file mode 100644 index 000000000..a11a87c9b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DFAReporting.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DFAReporting.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountActiveAdSummaries/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountActiveAdSummaries/Get.hs new file mode 100644 index 000000000..019aa7828 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountActiveAdSummaries/Get.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountActiveAdSummaries.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the account\'s active ad summary by account ID. +-- +-- /See:/ for @DfareportingAccountActiveAdSummariesGet@. +module DFAReporting.AccountActiveAdSummaries.Get + ( + -- * REST Resource + AccountActiveAdSummariesGetAPI + + -- * Creating a Request + , accountActiveAdSummariesGet + , AccountActiveAdSummariesGet + + -- * Request Lenses + , aaasgQuotaUser + , aaasgPrettyPrint + , aaasgUserIp + , aaasgProfileId + , aaasgKey + , aaasgSummaryAccountId + , aaasgOauthToken + , aaasgFields + , aaasgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountActiveAdSummariesGet@ which the +-- 'AccountActiveAdSummariesGet' request conforms to. +type AccountActiveAdSummariesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountActiveAdSummaries" :> + Capture "summaryAccountId" Int64 :> + Get '[JSON] AccountActiveAdSummary + +-- | Gets the account\'s active ad summary by account ID. +-- +-- /See:/ 'accountActiveAdSummariesGet' smart constructor. +data AccountActiveAdSummariesGet = AccountActiveAdSummariesGet + { _aaasgQuotaUser :: !(Maybe Text) + , _aaasgPrettyPrint :: !Bool + , _aaasgUserIp :: !(Maybe Text) + , _aaasgProfileId :: !Int64 + , _aaasgKey :: !(Maybe Text) + , _aaasgSummaryAccountId :: !Int64 + , _aaasgOauthToken :: !(Maybe Text) + , _aaasgFields :: !(Maybe Text) + , _aaasgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountActiveAdSummariesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaasgQuotaUser' +-- +-- * 'aaasgPrettyPrint' +-- +-- * 'aaasgUserIp' +-- +-- * 'aaasgProfileId' +-- +-- * 'aaasgKey' +-- +-- * 'aaasgSummaryAccountId' +-- +-- * 'aaasgOauthToken' +-- +-- * 'aaasgFields' +-- +-- * 'aaasgAlt' +accountActiveAdSummariesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'summaryAccountId' + -> AccountActiveAdSummariesGet +accountActiveAdSummariesGet pAaasgProfileId_ pAaasgSummaryAccountId_ = + AccountActiveAdSummariesGet + { _aaasgQuotaUser = Nothing + , _aaasgPrettyPrint = True + , _aaasgUserIp = Nothing + , _aaasgProfileId = pAaasgProfileId_ + , _aaasgKey = Nothing + , _aaasgSummaryAccountId = pAaasgSummaryAccountId_ + , _aaasgOauthToken = Nothing + , _aaasgFields = Nothing + , _aaasgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaasgQuotaUser :: Lens' AccountActiveAdSummariesGet' (Maybe Text) +aaasgQuotaUser + = lens _aaasgQuotaUser + (\ s a -> s{_aaasgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaasgPrettyPrint :: Lens' AccountActiveAdSummariesGet' Bool +aaasgPrettyPrint + = lens _aaasgPrettyPrint + (\ s a -> s{_aaasgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaasgUserIp :: Lens' AccountActiveAdSummariesGet' (Maybe Text) +aaasgUserIp + = lens _aaasgUserIp (\ s a -> s{_aaasgUserIp = a}) + +-- | User profile ID associated with this request. +aaasgProfileId :: Lens' AccountActiveAdSummariesGet' Int64 +aaasgProfileId + = lens _aaasgProfileId + (\ s a -> s{_aaasgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaasgKey :: Lens' AccountActiveAdSummariesGet' (Maybe Text) +aaasgKey = lens _aaasgKey (\ s a -> s{_aaasgKey = a}) + +-- | Account ID. +aaasgSummaryAccountId :: Lens' AccountActiveAdSummariesGet' Int64 +aaasgSummaryAccountId + = lens _aaasgSummaryAccountId + (\ s a -> s{_aaasgSummaryAccountId = a}) + +-- | OAuth 2.0 token for the current user. +aaasgOauthToken :: Lens' AccountActiveAdSummariesGet' (Maybe Text) +aaasgOauthToken + = lens _aaasgOauthToken + (\ s a -> s{_aaasgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aaasgFields :: Lens' AccountActiveAdSummariesGet' (Maybe Text) +aaasgFields + = lens _aaasgFields (\ s a -> s{_aaasgFields = a}) + +-- | Data format for the response. +aaasgAlt :: Lens' AccountActiveAdSummariesGet' Text +aaasgAlt = lens _aaasgAlt (\ s a -> s{_aaasgAlt = a}) + +instance GoogleRequest AccountActiveAdSummariesGet' + where + type Rs AccountActiveAdSummariesGet' = + AccountActiveAdSummary + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountActiveAdSummariesGet{..} + = go _aaasgQuotaUser _aaasgPrettyPrint _aaasgUserIp + _aaasgProfileId + _aaasgKey + _aaasgSummaryAccountId + _aaasgOauthToken + _aaasgFields + _aaasgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountActiveAdSummariesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/Get.hs new file mode 100644 index 000000000..fd6e2212e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountPermissionGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one account permission group by ID. +-- +-- /See:/ for @DfareportingAccountPermissionGroupsGet@. +module DFAReporting.AccountPermissionGroups.Get + ( + -- * REST Resource + AccountPermissionGroupsGetAPI + + -- * Creating a Request + , accountPermissionGroupsGet + , AccountPermissionGroupsGet + + -- * Request Lenses + , apggQuotaUser + , apggPrettyPrint + , apggUserIp + , apggProfileId + , apggKey + , apggId + , apggOauthToken + , apggFields + , apggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountPermissionGroupsGet@ which the +-- 'AccountPermissionGroupsGet' request conforms to. +type AccountPermissionGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountPermissionGroups" :> + Capture "id" Int64 :> + Get '[JSON] AccountPermissionGroup + +-- | Gets one account permission group by ID. +-- +-- /See:/ 'accountPermissionGroupsGet' smart constructor. +data AccountPermissionGroupsGet = AccountPermissionGroupsGet + { _apggQuotaUser :: !(Maybe Text) + , _apggPrettyPrint :: !Bool + , _apggUserIp :: !(Maybe Text) + , _apggProfileId :: !Int64 + , _apggKey :: !(Maybe Text) + , _apggId :: !Int64 + , _apggOauthToken :: !(Maybe Text) + , _apggFields :: !(Maybe Text) + , _apggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apggQuotaUser' +-- +-- * 'apggPrettyPrint' +-- +-- * 'apggUserIp' +-- +-- * 'apggProfileId' +-- +-- * 'apggKey' +-- +-- * 'apggId' +-- +-- * 'apggOauthToken' +-- +-- * 'apggFields' +-- +-- * 'apggAlt' +accountPermissionGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountPermissionGroupsGet +accountPermissionGroupsGet pApggProfileId_ pApggId_ = + AccountPermissionGroupsGet + { _apggQuotaUser = Nothing + , _apggPrettyPrint = True + , _apggUserIp = Nothing + , _apggProfileId = pApggProfileId_ + , _apggKey = Nothing + , _apggId = pApggId_ + , _apggOauthToken = Nothing + , _apggFields = Nothing + , _apggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apggQuotaUser :: Lens' AccountPermissionGroupsGet' (Maybe Text) +apggQuotaUser + = lens _apggQuotaUser + (\ s a -> s{_apggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apggPrettyPrint :: Lens' AccountPermissionGroupsGet' Bool +apggPrettyPrint + = lens _apggPrettyPrint + (\ s a -> s{_apggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apggUserIp :: Lens' AccountPermissionGroupsGet' (Maybe Text) +apggUserIp + = lens _apggUserIp (\ s a -> s{_apggUserIp = a}) + +-- | User profile ID associated with this request. +apggProfileId :: Lens' AccountPermissionGroupsGet' Int64 +apggProfileId + = lens _apggProfileId + (\ s a -> s{_apggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apggKey :: Lens' AccountPermissionGroupsGet' (Maybe Text) +apggKey = lens _apggKey (\ s a -> s{_apggKey = a}) + +-- | Account permission group ID. +apggId :: Lens' AccountPermissionGroupsGet' Int64 +apggId = lens _apggId (\ s a -> s{_apggId = a}) + +-- | OAuth 2.0 token for the current user. +apggOauthToken :: Lens' AccountPermissionGroupsGet' (Maybe Text) +apggOauthToken + = lens _apggOauthToken + (\ s a -> s{_apggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apggFields :: Lens' AccountPermissionGroupsGet' (Maybe Text) +apggFields + = lens _apggFields (\ s a -> s{_apggFields = a}) + +-- | Data format for the response. +apggAlt :: Lens' AccountPermissionGroupsGet' Text +apggAlt = lens _apggAlt (\ s a -> s{_apggAlt = a}) + +instance GoogleRequest AccountPermissionGroupsGet' + where + type Rs AccountPermissionGroupsGet' = + AccountPermissionGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountPermissionGroupsGet{..} + = go _apggQuotaUser _apggPrettyPrint _apggUserIp + _apggProfileId + _apggKey + _apggId + _apggOauthToken + _apggFields + _apggAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountPermissionGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/List.hs new file mode 100644 index 000000000..1dfb9fc92 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissionGroups/List.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountPermissionGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of account permission groups. +-- +-- /See:/ for @DfareportingAccountPermissionGroupsList@. +module DFAReporting.AccountPermissionGroups.List + ( + -- * REST Resource + AccountPermissionGroupsListAPI + + -- * Creating a Request + , accountPermissionGroupsList + , AccountPermissionGroupsList + + -- * Request Lenses + , apglQuotaUser + , apglPrettyPrint + , apglUserIp + , apglProfileId + , apglKey + , apglOauthToken + , apglFields + , apglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountPermissionGroupsList@ which the +-- 'AccountPermissionGroupsList' request conforms to. +type AccountPermissionGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountPermissionGroups" :> + Get '[JSON] AccountPermissionGroupsListResponse + +-- | Retrieves the list of account permission groups. +-- +-- /See:/ 'accountPermissionGroupsList' smart constructor. +data AccountPermissionGroupsList = AccountPermissionGroupsList + { _apglQuotaUser :: !(Maybe Text) + , _apglPrettyPrint :: !Bool + , _apglUserIp :: !(Maybe Text) + , _apglProfileId :: !Int64 + , _apglKey :: !(Maybe Text) + , _apglOauthToken :: !(Maybe Text) + , _apglFields :: !(Maybe Text) + , _apglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apglQuotaUser' +-- +-- * 'apglPrettyPrint' +-- +-- * 'apglUserIp' +-- +-- * 'apglProfileId' +-- +-- * 'apglKey' +-- +-- * 'apglOauthToken' +-- +-- * 'apglFields' +-- +-- * 'apglAlt' +accountPermissionGroupsList + :: Int64 -- ^ 'profileId' + -> AccountPermissionGroupsList +accountPermissionGroupsList pApglProfileId_ = + AccountPermissionGroupsList + { _apglQuotaUser = Nothing + , _apglPrettyPrint = True + , _apglUserIp = Nothing + , _apglProfileId = pApglProfileId_ + , _apglKey = Nothing + , _apglOauthToken = Nothing + , _apglFields = Nothing + , _apglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apglQuotaUser :: Lens' AccountPermissionGroupsList' (Maybe Text) +apglQuotaUser + = lens _apglQuotaUser + (\ s a -> s{_apglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apglPrettyPrint :: Lens' AccountPermissionGroupsList' Bool +apglPrettyPrint + = lens _apglPrettyPrint + (\ s a -> s{_apglPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apglUserIp :: Lens' AccountPermissionGroupsList' (Maybe Text) +apglUserIp + = lens _apglUserIp (\ s a -> s{_apglUserIp = a}) + +-- | User profile ID associated with this request. +apglProfileId :: Lens' AccountPermissionGroupsList' Int64 +apglProfileId + = lens _apglProfileId + (\ s a -> s{_apglProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apglKey :: Lens' AccountPermissionGroupsList' (Maybe Text) +apglKey = lens _apglKey (\ s a -> s{_apglKey = a}) + +-- | OAuth 2.0 token for the current user. +apglOauthToken :: Lens' AccountPermissionGroupsList' (Maybe Text) +apglOauthToken + = lens _apglOauthToken + (\ s a -> s{_apglOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apglFields :: Lens' AccountPermissionGroupsList' (Maybe Text) +apglFields + = lens _apglFields (\ s a -> s{_apglFields = a}) + +-- | Data format for the response. +apglAlt :: Lens' AccountPermissionGroupsList' Text +apglAlt = lens _apglAlt (\ s a -> s{_apglAlt = a}) + +instance GoogleRequest AccountPermissionGroupsList' + where + type Rs AccountPermissionGroupsList' = + AccountPermissionGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountPermissionGroupsList{..} + = go _apglQuotaUser _apglPrettyPrint _apglUserIp + _apglProfileId + _apglKey + _apglOauthToken + _apglFields + _apglAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountPermissionGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/Get.hs new file mode 100644 index 000000000..2cad4bcd4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountPermissions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one account permission by ID. +-- +-- /See:/ for @DfareportingAccountPermissionsGet@. +module DFAReporting.AccountPermissions.Get + ( + -- * REST Resource + AccountPermissionsGetAPI + + -- * Creating a Request + , accountPermissionsGet + , AccountPermissionsGet + + -- * Request Lenses + , apgpQuotaUser + , apgpPrettyPrint + , apgpUserIp + , apgpProfileId + , apgpKey + , apgpId + , apgpOauthToken + , apgpFields + , apgpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountPermissionsGet@ which the +-- 'AccountPermissionsGet' request conforms to. +type AccountPermissionsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountPermissions" :> + Capture "id" Int64 :> Get '[JSON] AccountPermission + +-- | Gets one account permission by ID. +-- +-- /See:/ 'accountPermissionsGet' smart constructor. +data AccountPermissionsGet = AccountPermissionsGet + { _apgpQuotaUser :: !(Maybe Text) + , _apgpPrettyPrint :: !Bool + , _apgpUserIp :: !(Maybe Text) + , _apgpProfileId :: !Int64 + , _apgpKey :: !(Maybe Text) + , _apgpId :: !Int64 + , _apgpOauthToken :: !(Maybe Text) + , _apgpFields :: !(Maybe Text) + , _apgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apgpQuotaUser' +-- +-- * 'apgpPrettyPrint' +-- +-- * 'apgpUserIp' +-- +-- * 'apgpProfileId' +-- +-- * 'apgpKey' +-- +-- * 'apgpId' +-- +-- * 'apgpOauthToken' +-- +-- * 'apgpFields' +-- +-- * 'apgpAlt' +accountPermissionsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountPermissionsGet +accountPermissionsGet pApgpProfileId_ pApgpId_ = + AccountPermissionsGet + { _apgpQuotaUser = Nothing + , _apgpPrettyPrint = True + , _apgpUserIp = Nothing + , _apgpProfileId = pApgpProfileId_ + , _apgpKey = Nothing + , _apgpId = pApgpId_ + , _apgpOauthToken = Nothing + , _apgpFields = Nothing + , _apgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apgpQuotaUser :: Lens' AccountPermissionsGet' (Maybe Text) +apgpQuotaUser + = lens _apgpQuotaUser + (\ s a -> s{_apgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apgpPrettyPrint :: Lens' AccountPermissionsGet' Bool +apgpPrettyPrint + = lens _apgpPrettyPrint + (\ s a -> s{_apgpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apgpUserIp :: Lens' AccountPermissionsGet' (Maybe Text) +apgpUserIp + = lens _apgpUserIp (\ s a -> s{_apgpUserIp = a}) + +-- | User profile ID associated with this request. +apgpProfileId :: Lens' AccountPermissionsGet' Int64 +apgpProfileId + = lens _apgpProfileId + (\ s a -> s{_apgpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apgpKey :: Lens' AccountPermissionsGet' (Maybe Text) +apgpKey = lens _apgpKey (\ s a -> s{_apgpKey = a}) + +-- | Account permission ID. +apgpId :: Lens' AccountPermissionsGet' Int64 +apgpId = lens _apgpId (\ s a -> s{_apgpId = a}) + +-- | OAuth 2.0 token for the current user. +apgpOauthToken :: Lens' AccountPermissionsGet' (Maybe Text) +apgpOauthToken + = lens _apgpOauthToken + (\ s a -> s{_apgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apgpFields :: Lens' AccountPermissionsGet' (Maybe Text) +apgpFields + = lens _apgpFields (\ s a -> s{_apgpFields = a}) + +-- | Data format for the response. +apgpAlt :: Lens' AccountPermissionsGet' Text +apgpAlt = lens _apgpAlt (\ s a -> s{_apgpAlt = a}) + +instance GoogleRequest AccountPermissionsGet' where + type Rs AccountPermissionsGet' = AccountPermission + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountPermissionsGet{..} + = go _apgpQuotaUser _apgpPrettyPrint _apgpUserIp + _apgpProfileId + _apgpKey + _apgpId + _apgpOauthToken + _apgpFields + _apgpAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountPermissionsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/List.hs new file mode 100644 index 000000000..13cfc9a79 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountPermissions/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountPermissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of account permissions. +-- +-- /See:/ for @DfareportingAccountPermissionsList@. +module DFAReporting.AccountPermissions.List + ( + -- * REST Resource + AccountPermissionsListAPI + + -- * Creating a Request + , accountPermissionsList + , AccountPermissionsList + + -- * Request Lenses + , aplQuotaUser + , aplPrettyPrint + , aplUserIp + , aplProfileId + , aplKey + , aplOauthToken + , aplFields + , aplAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountPermissionsList@ which the +-- 'AccountPermissionsList' request conforms to. +type AccountPermissionsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountPermissions" :> + Get '[JSON] AccountPermissionsListResponse + +-- | Retrieves the list of account permissions. +-- +-- /See:/ 'accountPermissionsList' smart constructor. +data AccountPermissionsList = AccountPermissionsList + { _aplQuotaUser :: !(Maybe Text) + , _aplPrettyPrint :: !Bool + , _aplUserIp :: !(Maybe Text) + , _aplProfileId :: !Int64 + , _aplKey :: !(Maybe Text) + , _aplOauthToken :: !(Maybe Text) + , _aplFields :: !(Maybe Text) + , _aplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplQuotaUser' +-- +-- * 'aplPrettyPrint' +-- +-- * 'aplUserIp' +-- +-- * 'aplProfileId' +-- +-- * 'aplKey' +-- +-- * 'aplOauthToken' +-- +-- * 'aplFields' +-- +-- * 'aplAlt' +accountPermissionsList + :: Int64 -- ^ 'profileId' + -> AccountPermissionsList +accountPermissionsList pAplProfileId_ = + AccountPermissionsList + { _aplQuotaUser = Nothing + , _aplPrettyPrint = True + , _aplUserIp = Nothing + , _aplProfileId = pAplProfileId_ + , _aplKey = Nothing + , _aplOauthToken = Nothing + , _aplFields = Nothing + , _aplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aplQuotaUser :: Lens' AccountPermissionsList' (Maybe Text) +aplQuotaUser + = lens _aplQuotaUser (\ s a -> s{_aplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aplPrettyPrint :: Lens' AccountPermissionsList' Bool +aplPrettyPrint + = lens _aplPrettyPrint + (\ s a -> s{_aplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aplUserIp :: Lens' AccountPermissionsList' (Maybe Text) +aplUserIp + = lens _aplUserIp (\ s a -> s{_aplUserIp = a}) + +-- | User profile ID associated with this request. +aplProfileId :: Lens' AccountPermissionsList' Int64 +aplProfileId + = lens _aplProfileId (\ s a -> s{_aplProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aplKey :: Lens' AccountPermissionsList' (Maybe Text) +aplKey = lens _aplKey (\ s a -> s{_aplKey = a}) + +-- | OAuth 2.0 token for the current user. +aplOauthToken :: Lens' AccountPermissionsList' (Maybe Text) +aplOauthToken + = lens _aplOauthToken + (\ s a -> s{_aplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aplFields :: Lens' AccountPermissionsList' (Maybe Text) +aplFields + = lens _aplFields (\ s a -> s{_aplFields = a}) + +-- | Data format for the response. +aplAlt :: Lens' AccountPermissionsList' Text +aplAlt = lens _aplAlt (\ s a -> s{_aplAlt = a}) + +instance GoogleRequest AccountPermissionsList' where + type Rs AccountPermissionsList' = + AccountPermissionsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountPermissionsList{..} + = go _aplQuotaUser _aplPrettyPrint _aplUserIp + _aplProfileId + _aplKey + _aplOauthToken + _aplFields + _aplAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountPermissionsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Get.hs new file mode 100644 index 000000000..eaa41be80 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one account user profile by ID. +-- +-- /See:/ for @DfareportingAccountUserProfilesGet@. +module DFAReporting.AccountUserProfiles.Get + ( + -- * REST Resource + AccountUserProfilesGetAPI + + -- * Creating a Request + , accountUserProfilesGet + , AccountUserProfilesGet + + -- * Request Lenses + , aupgQuotaUser + , aupgPrettyPrint + , aupgUserIp + , aupgProfileId + , aupgKey + , aupgId + , aupgOauthToken + , aupgFields + , aupgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountUserProfilesGet@ which the +-- 'AccountUserProfilesGet' request conforms to. +type AccountUserProfilesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountUserProfiles" :> + Capture "id" Int64 :> Get '[JSON] AccountUserProfile + +-- | Gets one account user profile by ID. +-- +-- /See:/ 'accountUserProfilesGet' smart constructor. +data AccountUserProfilesGet = AccountUserProfilesGet + { _aupgQuotaUser :: !(Maybe Text) + , _aupgPrettyPrint :: !Bool + , _aupgUserIp :: !(Maybe Text) + , _aupgProfileId :: !Int64 + , _aupgKey :: !(Maybe Text) + , _aupgId :: !Int64 + , _aupgOauthToken :: !(Maybe Text) + , _aupgFields :: !(Maybe Text) + , _aupgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aupgQuotaUser' +-- +-- * 'aupgPrettyPrint' +-- +-- * 'aupgUserIp' +-- +-- * 'aupgProfileId' +-- +-- * 'aupgKey' +-- +-- * 'aupgId' +-- +-- * 'aupgOauthToken' +-- +-- * 'aupgFields' +-- +-- * 'aupgAlt' +accountUserProfilesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountUserProfilesGet +accountUserProfilesGet pAupgProfileId_ pAupgId_ = + AccountUserProfilesGet + { _aupgQuotaUser = Nothing + , _aupgPrettyPrint = True + , _aupgUserIp = Nothing + , _aupgProfileId = pAupgProfileId_ + , _aupgKey = Nothing + , _aupgId = pAupgId_ + , _aupgOauthToken = Nothing + , _aupgFields = Nothing + , _aupgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aupgQuotaUser :: Lens' AccountUserProfilesGet' (Maybe Text) +aupgQuotaUser + = lens _aupgQuotaUser + (\ s a -> s{_aupgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aupgPrettyPrint :: Lens' AccountUserProfilesGet' Bool +aupgPrettyPrint + = lens _aupgPrettyPrint + (\ s a -> s{_aupgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aupgUserIp :: Lens' AccountUserProfilesGet' (Maybe Text) +aupgUserIp + = lens _aupgUserIp (\ s a -> s{_aupgUserIp = a}) + +-- | User profile ID associated with this request. +aupgProfileId :: Lens' AccountUserProfilesGet' Int64 +aupgProfileId + = lens _aupgProfileId + (\ s a -> s{_aupgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aupgKey :: Lens' AccountUserProfilesGet' (Maybe Text) +aupgKey = lens _aupgKey (\ s a -> s{_aupgKey = a}) + +-- | User profile ID. +aupgId :: Lens' AccountUserProfilesGet' Int64 +aupgId = lens _aupgId (\ s a -> s{_aupgId = a}) + +-- | OAuth 2.0 token for the current user. +aupgOauthToken :: Lens' AccountUserProfilesGet' (Maybe Text) +aupgOauthToken + = lens _aupgOauthToken + (\ s a -> s{_aupgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aupgFields :: Lens' AccountUserProfilesGet' (Maybe Text) +aupgFields + = lens _aupgFields (\ s a -> s{_aupgFields = a}) + +-- | Data format for the response. +aupgAlt :: Lens' AccountUserProfilesGet' Text +aupgAlt = lens _aupgAlt (\ s a -> s{_aupgAlt = a}) + +instance GoogleRequest AccountUserProfilesGet' where + type Rs AccountUserProfilesGet' = AccountUserProfile + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountUserProfilesGet{..} + = go _aupgQuotaUser _aupgPrettyPrint _aupgUserIp + _aupgProfileId + _aupgKey + _aupgId + _aupgOauthToken + _aupgFields + _aupgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountUserProfilesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Insert.hs new file mode 100644 index 000000000..73ec310b5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Insert.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new account user profile. +-- +-- /See:/ for @DfareportingAccountUserProfilesInsert@. +module DFAReporting.AccountUserProfiles.Insert + ( + -- * REST Resource + AccountUserProfilesInsertAPI + + -- * Creating a Request + , accountUserProfilesInsert + , AccountUserProfilesInsert + + -- * Request Lenses + , aupiQuotaUser + , aupiPrettyPrint + , aupiUserIp + , aupiProfileId + , aupiKey + , aupiOauthToken + , aupiFields + , aupiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountUserProfilesInsert@ which the +-- 'AccountUserProfilesInsert' request conforms to. +type AccountUserProfilesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountUserProfiles" :> + Post '[JSON] AccountUserProfile + +-- | Inserts a new account user profile. +-- +-- /See:/ 'accountUserProfilesInsert' smart constructor. +data AccountUserProfilesInsert = AccountUserProfilesInsert + { _aupiQuotaUser :: !(Maybe Text) + , _aupiPrettyPrint :: !Bool + , _aupiUserIp :: !(Maybe Text) + , _aupiProfileId :: !Int64 + , _aupiKey :: !(Maybe Text) + , _aupiOauthToken :: !(Maybe Text) + , _aupiFields :: !(Maybe Text) + , _aupiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aupiQuotaUser' +-- +-- * 'aupiPrettyPrint' +-- +-- * 'aupiUserIp' +-- +-- * 'aupiProfileId' +-- +-- * 'aupiKey' +-- +-- * 'aupiOauthToken' +-- +-- * 'aupiFields' +-- +-- * 'aupiAlt' +accountUserProfilesInsert + :: Int64 -- ^ 'profileId' + -> AccountUserProfilesInsert +accountUserProfilesInsert pAupiProfileId_ = + AccountUserProfilesInsert + { _aupiQuotaUser = Nothing + , _aupiPrettyPrint = True + , _aupiUserIp = Nothing + , _aupiProfileId = pAupiProfileId_ + , _aupiKey = Nothing + , _aupiOauthToken = Nothing + , _aupiFields = Nothing + , _aupiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aupiQuotaUser :: Lens' AccountUserProfilesInsert' (Maybe Text) +aupiQuotaUser + = lens _aupiQuotaUser + (\ s a -> s{_aupiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aupiPrettyPrint :: Lens' AccountUserProfilesInsert' Bool +aupiPrettyPrint + = lens _aupiPrettyPrint + (\ s a -> s{_aupiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aupiUserIp :: Lens' AccountUserProfilesInsert' (Maybe Text) +aupiUserIp + = lens _aupiUserIp (\ s a -> s{_aupiUserIp = a}) + +-- | User profile ID associated with this request. +aupiProfileId :: Lens' AccountUserProfilesInsert' Int64 +aupiProfileId + = lens _aupiProfileId + (\ s a -> s{_aupiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aupiKey :: Lens' AccountUserProfilesInsert' (Maybe Text) +aupiKey = lens _aupiKey (\ s a -> s{_aupiKey = a}) + +-- | OAuth 2.0 token for the current user. +aupiOauthToken :: Lens' AccountUserProfilesInsert' (Maybe Text) +aupiOauthToken + = lens _aupiOauthToken + (\ s a -> s{_aupiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aupiFields :: Lens' AccountUserProfilesInsert' (Maybe Text) +aupiFields + = lens _aupiFields (\ s a -> s{_aupiFields = a}) + +-- | Data format for the response. +aupiAlt :: Lens' AccountUserProfilesInsert' Text +aupiAlt = lens _aupiAlt (\ s a -> s{_aupiAlt = a}) + +instance GoogleRequest AccountUserProfilesInsert' + where + type Rs AccountUserProfilesInsert' = + AccountUserProfile + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountUserProfilesInsert{..} + = go _aupiQuotaUser _aupiPrettyPrint _aupiUserIp + _aupiProfileId + _aupiKey + _aupiOauthToken + _aupiFields + _aupiAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountUserProfilesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/List.hs new file mode 100644 index 000000000..08cba3925 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/List.hs @@ -0,0 +1,283 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of account user profiles, possibly filtered. +-- +-- /See:/ for @DfareportingAccountUserProfilesList@. +module DFAReporting.AccountUserProfiles.List + ( + -- * REST Resource + AccountUserProfilesListAPI + + -- * Creating a Request + , accountUserProfilesList + , AccountUserProfilesList + + -- * Request Lenses + , auplQuotaUser + , auplPrettyPrint + , auplUserRoleId + , auplUserIp + , auplSearchString + , auplIds + , auplProfileId + , auplSortOrder + , auplActive + , auplKey + , auplPageToken + , auplSortField + , auplSubaccountId + , auplOauthToken + , auplMaxResults + , auplFields + , auplAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountUserProfilesList@ which the +-- 'AccountUserProfilesList' request conforms to. +type AccountUserProfilesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountUserProfiles" :> + QueryParam "userRoleId" Int64 :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "subaccountId" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AccountUserProfilesListResponse + +-- | Retrieves a list of account user profiles, possibly filtered. +-- +-- /See:/ 'accountUserProfilesList' smart constructor. +data AccountUserProfilesList = AccountUserProfilesList + { _auplQuotaUser :: !(Maybe Text) + , _auplPrettyPrint :: !Bool + , _auplUserRoleId :: !(Maybe Int64) + , _auplUserIp :: !(Maybe Text) + , _auplSearchString :: !(Maybe Text) + , _auplIds :: !(Maybe Int64) + , _auplProfileId :: !Int64 + , _auplSortOrder :: !(Maybe Text) + , _auplActive :: !(Maybe Bool) + , _auplKey :: !(Maybe Text) + , _auplPageToken :: !(Maybe Text) + , _auplSortField :: !(Maybe Text) + , _auplSubaccountId :: !(Maybe Int64) + , _auplOauthToken :: !(Maybe Text) + , _auplMaxResults :: !(Maybe Int32) + , _auplFields :: !(Maybe Text) + , _auplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auplQuotaUser' +-- +-- * 'auplPrettyPrint' +-- +-- * 'auplUserRoleId' +-- +-- * 'auplUserIp' +-- +-- * 'auplSearchString' +-- +-- * 'auplIds' +-- +-- * 'auplProfileId' +-- +-- * 'auplSortOrder' +-- +-- * 'auplActive' +-- +-- * 'auplKey' +-- +-- * 'auplPageToken' +-- +-- * 'auplSortField' +-- +-- * 'auplSubaccountId' +-- +-- * 'auplOauthToken' +-- +-- * 'auplMaxResults' +-- +-- * 'auplFields' +-- +-- * 'auplAlt' +accountUserProfilesList + :: Int64 -- ^ 'profileId' + -> AccountUserProfilesList +accountUserProfilesList pAuplProfileId_ = + AccountUserProfilesList + { _auplQuotaUser = Nothing + , _auplPrettyPrint = True + , _auplUserRoleId = Nothing + , _auplUserIp = Nothing + , _auplSearchString = Nothing + , _auplIds = Nothing + , _auplProfileId = pAuplProfileId_ + , _auplSortOrder = Nothing + , _auplActive = Nothing + , _auplKey = Nothing + , _auplPageToken = Nothing + , _auplSortField = Nothing + , _auplSubaccountId = Nothing + , _auplOauthToken = Nothing + , _auplMaxResults = Nothing + , _auplFields = Nothing + , _auplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auplQuotaUser :: Lens' AccountUserProfilesList' (Maybe Text) +auplQuotaUser + = lens _auplQuotaUser + (\ s a -> s{_auplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auplPrettyPrint :: Lens' AccountUserProfilesList' Bool +auplPrettyPrint + = lens _auplPrettyPrint + (\ s a -> s{_auplPrettyPrint = a}) + +-- | Select only user profiles with the specified user role ID. +auplUserRoleId :: Lens' AccountUserProfilesList' (Maybe Int64) +auplUserRoleId + = lens _auplUserRoleId + (\ s a -> s{_auplUserRoleId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auplUserIp :: Lens' AccountUserProfilesList' (Maybe Text) +auplUserIp + = lens _auplUserIp (\ s a -> s{_auplUserIp = a}) + +-- | Allows searching for objects by name, ID or email. Wildcards (*) are +-- allowed. For example, \"user profile*2015\" will return objects with +-- names like \"user profile June 2015\", \"user profile April 2015\", or +-- simply \"user profile 2015\". Most of the searches also add wildcards +-- implicitly at the start and the end of the search string. For example, a +-- search string of \"user profile\" will match objects with name \"my user +-- profile\", \"user profile 2015\", or simply \"user profile\". +auplSearchString :: Lens' AccountUserProfilesList' (Maybe Text) +auplSearchString + = lens _auplSearchString + (\ s a -> s{_auplSearchString = a}) + +-- | Select only user profiles with these IDs. +auplIds :: Lens' AccountUserProfilesList' (Maybe Int64) +auplIds = lens _auplIds (\ s a -> s{_auplIds = a}) + +-- | User profile ID associated with this request. +auplProfileId :: Lens' AccountUserProfilesList' Int64 +auplProfileId + = lens _auplProfileId + (\ s a -> s{_auplProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +auplSortOrder :: Lens' AccountUserProfilesList' (Maybe Text) +auplSortOrder + = lens _auplSortOrder + (\ s a -> s{_auplSortOrder = a}) + +-- | Select only active user profiles. +auplActive :: Lens' AccountUserProfilesList' (Maybe Bool) +auplActive + = lens _auplActive (\ s a -> s{_auplActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auplKey :: Lens' AccountUserProfilesList' (Maybe Text) +auplKey = lens _auplKey (\ s a -> s{_auplKey = a}) + +-- | Value of the nextPageToken from the previous result page. +auplPageToken :: Lens' AccountUserProfilesList' (Maybe Text) +auplPageToken + = lens _auplPageToken + (\ s a -> s{_auplPageToken = a}) + +-- | Field by which to sort the list. +auplSortField :: Lens' AccountUserProfilesList' (Maybe Text) +auplSortField + = lens _auplSortField + (\ s a -> s{_auplSortField = a}) + +-- | Select only user profiles with the specified subaccount ID. +auplSubaccountId :: Lens' AccountUserProfilesList' (Maybe Int64) +auplSubaccountId + = lens _auplSubaccountId + (\ s a -> s{_auplSubaccountId = a}) + +-- | OAuth 2.0 token for the current user. +auplOauthToken :: Lens' AccountUserProfilesList' (Maybe Text) +auplOauthToken + = lens _auplOauthToken + (\ s a -> s{_auplOauthToken = a}) + +-- | Maximum number of results to return. +auplMaxResults :: Lens' AccountUserProfilesList' (Maybe Int32) +auplMaxResults + = lens _auplMaxResults + (\ s a -> s{_auplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +auplFields :: Lens' AccountUserProfilesList' (Maybe Text) +auplFields + = lens _auplFields (\ s a -> s{_auplFields = a}) + +-- | Data format for the response. +auplAlt :: Lens' AccountUserProfilesList' Text +auplAlt = lens _auplAlt (\ s a -> s{_auplAlt = a}) + +instance GoogleRequest AccountUserProfilesList' where + type Rs AccountUserProfilesList' = + AccountUserProfilesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountUserProfilesList{..} + = go _auplQuotaUser _auplPrettyPrint _auplUserRoleId + _auplUserIp + _auplSearchString + _auplIds + _auplProfileId + _auplSortOrder + _auplActive + _auplKey + _auplPageToken + _auplSortField + _auplSubaccountId + _auplOauthToken + _auplMaxResults + _auplFields + _auplAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountUserProfilesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Patch.hs new file mode 100644 index 000000000..d1a712bd9 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Patch.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account user profile. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingAccountUserProfilesPatch@. +module DFAReporting.AccountUserProfiles.Patch + ( + -- * REST Resource + AccountUserProfilesPatchAPI + + -- * Creating a Request + , accountUserProfilesPatch + , AccountUserProfilesPatch + + -- * Request Lenses + , auppQuotaUser + , auppPrettyPrint + , auppUserIp + , auppProfileId + , auppKey + , auppId + , auppOauthToken + , auppFields + , auppAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountUserProfilesPatch@ which the +-- 'AccountUserProfilesPatch' request conforms to. +type AccountUserProfilesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountUserProfiles" :> + QueryParam "id" Int64 :> + Patch '[JSON] AccountUserProfile + +-- | Updates an existing account user profile. This method supports patch +-- semantics. +-- +-- /See:/ 'accountUserProfilesPatch' smart constructor. +data AccountUserProfilesPatch = AccountUserProfilesPatch + { _auppQuotaUser :: !(Maybe Text) + , _auppPrettyPrint :: !Bool + , _auppUserIp :: !(Maybe Text) + , _auppProfileId :: !Int64 + , _auppKey :: !(Maybe Text) + , _auppId :: !Int64 + , _auppOauthToken :: !(Maybe Text) + , _auppFields :: !(Maybe Text) + , _auppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auppQuotaUser' +-- +-- * 'auppPrettyPrint' +-- +-- * 'auppUserIp' +-- +-- * 'auppProfileId' +-- +-- * 'auppKey' +-- +-- * 'auppId' +-- +-- * 'auppOauthToken' +-- +-- * 'auppFields' +-- +-- * 'auppAlt' +accountUserProfilesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountUserProfilesPatch +accountUserProfilesPatch pAuppProfileId_ pAuppId_ = + AccountUserProfilesPatch + { _auppQuotaUser = Nothing + , _auppPrettyPrint = True + , _auppUserIp = Nothing + , _auppProfileId = pAuppProfileId_ + , _auppKey = Nothing + , _auppId = pAuppId_ + , _auppOauthToken = Nothing + , _auppFields = Nothing + , _auppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auppQuotaUser :: Lens' AccountUserProfilesPatch' (Maybe Text) +auppQuotaUser + = lens _auppQuotaUser + (\ s a -> s{_auppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auppPrettyPrint :: Lens' AccountUserProfilesPatch' Bool +auppPrettyPrint + = lens _auppPrettyPrint + (\ s a -> s{_auppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auppUserIp :: Lens' AccountUserProfilesPatch' (Maybe Text) +auppUserIp + = lens _auppUserIp (\ s a -> s{_auppUserIp = a}) + +-- | User profile ID associated with this request. +auppProfileId :: Lens' AccountUserProfilesPatch' Int64 +auppProfileId + = lens _auppProfileId + (\ s a -> s{_auppProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auppKey :: Lens' AccountUserProfilesPatch' (Maybe Text) +auppKey = lens _auppKey (\ s a -> s{_auppKey = a}) + +-- | User profile ID. +auppId :: Lens' AccountUserProfilesPatch' Int64 +auppId = lens _auppId (\ s a -> s{_auppId = a}) + +-- | OAuth 2.0 token for the current user. +auppOauthToken :: Lens' AccountUserProfilesPatch' (Maybe Text) +auppOauthToken + = lens _auppOauthToken + (\ s a -> s{_auppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auppFields :: Lens' AccountUserProfilesPatch' (Maybe Text) +auppFields + = lens _auppFields (\ s a -> s{_auppFields = a}) + +-- | Data format for the response. +auppAlt :: Lens' AccountUserProfilesPatch' Text +auppAlt = lens _auppAlt (\ s a -> s{_auppAlt = a}) + +instance GoogleRequest AccountUserProfilesPatch' + where + type Rs AccountUserProfilesPatch' = + AccountUserProfile + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountUserProfilesPatch{..} + = go _auppQuotaUser _auppPrettyPrint _auppUserIp + _auppProfileId + _auppKey + (Just _auppId) + _auppOauthToken + _auppFields + _auppAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountUserProfilesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Update.hs new file mode 100644 index 000000000..e96bd282a --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountUserProfiles/Update.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account user profile. +-- +-- /See:/ for @DfareportingAccountUserProfilesUpdate@. +module DFAReporting.AccountUserProfiles.Update + ( + -- * REST Resource + AccountUserProfilesUpdateAPI + + -- * Creating a Request + , accountUserProfilesUpdate + , AccountUserProfilesUpdate + + -- * Request Lenses + , aupuQuotaUser + , aupuPrettyPrint + , aupuUserIp + , aupuProfileId + , aupuKey + , aupuOauthToken + , aupuFields + , aupuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountUserProfilesUpdate@ which the +-- 'AccountUserProfilesUpdate' request conforms to. +type AccountUserProfilesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accountUserProfiles" :> + Put '[JSON] AccountUserProfile + +-- | Updates an existing account user profile. +-- +-- /See:/ 'accountUserProfilesUpdate' smart constructor. +data AccountUserProfilesUpdate = AccountUserProfilesUpdate + { _aupuQuotaUser :: !(Maybe Text) + , _aupuPrettyPrint :: !Bool + , _aupuUserIp :: !(Maybe Text) + , _aupuProfileId :: !Int64 + , _aupuKey :: !(Maybe Text) + , _aupuOauthToken :: !(Maybe Text) + , _aupuFields :: !(Maybe Text) + , _aupuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountUserProfilesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aupuQuotaUser' +-- +-- * 'aupuPrettyPrint' +-- +-- * 'aupuUserIp' +-- +-- * 'aupuProfileId' +-- +-- * 'aupuKey' +-- +-- * 'aupuOauthToken' +-- +-- * 'aupuFields' +-- +-- * 'aupuAlt' +accountUserProfilesUpdate + :: Int64 -- ^ 'profileId' + -> AccountUserProfilesUpdate +accountUserProfilesUpdate pAupuProfileId_ = + AccountUserProfilesUpdate + { _aupuQuotaUser = Nothing + , _aupuPrettyPrint = True + , _aupuUserIp = Nothing + , _aupuProfileId = pAupuProfileId_ + , _aupuKey = Nothing + , _aupuOauthToken = Nothing + , _aupuFields = Nothing + , _aupuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aupuQuotaUser :: Lens' AccountUserProfilesUpdate' (Maybe Text) +aupuQuotaUser + = lens _aupuQuotaUser + (\ s a -> s{_aupuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aupuPrettyPrint :: Lens' AccountUserProfilesUpdate' Bool +aupuPrettyPrint + = lens _aupuPrettyPrint + (\ s a -> s{_aupuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aupuUserIp :: Lens' AccountUserProfilesUpdate' (Maybe Text) +aupuUserIp + = lens _aupuUserIp (\ s a -> s{_aupuUserIp = a}) + +-- | User profile ID associated with this request. +aupuProfileId :: Lens' AccountUserProfilesUpdate' Int64 +aupuProfileId + = lens _aupuProfileId + (\ s a -> s{_aupuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aupuKey :: Lens' AccountUserProfilesUpdate' (Maybe Text) +aupuKey = lens _aupuKey (\ s a -> s{_aupuKey = a}) + +-- | OAuth 2.0 token for the current user. +aupuOauthToken :: Lens' AccountUserProfilesUpdate' (Maybe Text) +aupuOauthToken + = lens _aupuOauthToken + (\ s a -> s{_aupuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aupuFields :: Lens' AccountUserProfilesUpdate' (Maybe Text) +aupuFields + = lens _aupuFields (\ s a -> s{_aupuFields = a}) + +-- | Data format for the response. +aupuAlt :: Lens' AccountUserProfilesUpdate' Text +aupuAlt = lens _aupuAlt (\ s a -> s{_aupuAlt = a}) + +instance GoogleRequest AccountUserProfilesUpdate' + where + type Rs AccountUserProfilesUpdate' = + AccountUserProfile + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountUserProfilesUpdate{..} + = go _aupuQuotaUser _aupuPrettyPrint _aupuUserIp + _aupuProfileId + _aupuKey + _aupuOauthToken + _aupuFields + _aupuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountUserProfilesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Get.hs new file mode 100644 index 000000000..a46290d34 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one account by ID. +-- +-- /See:/ for @DfareportingAccountsGet@. +module DFAReporting.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , accQuotaUser + , accPrettyPrint + , accUserIp + , accProfileId + , accKey + , accId + , accOauthToken + , accFields + , accAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accounts" :> + Capture "id" Int64 :> Get '[JSON] Account + +-- | Gets one account by ID. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _accQuotaUser :: !(Maybe Text) + , _accPrettyPrint :: !Bool + , _accUserIp :: !(Maybe Text) + , _accProfileId :: !Int64 + , _accKey :: !(Maybe Text) + , _accId :: !Int64 + , _accOauthToken :: !(Maybe Text) + , _accFields :: !(Maybe Text) + , _accAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accQuotaUser' +-- +-- * 'accPrettyPrint' +-- +-- * 'accUserIp' +-- +-- * 'accProfileId' +-- +-- * 'accKey' +-- +-- * 'accId' +-- +-- * 'accOauthToken' +-- +-- * 'accFields' +-- +-- * 'accAlt' +accountsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountsGet +accountsGet pAccProfileId_ pAccId_ = + AccountsGet + { _accQuotaUser = Nothing + , _accPrettyPrint = True + , _accUserIp = Nothing + , _accProfileId = pAccProfileId_ + , _accKey = Nothing + , _accId = pAccId_ + , _accOauthToken = Nothing + , _accFields = Nothing + , _accAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +accQuotaUser :: Lens' AccountsGet' (Maybe Text) +accQuotaUser + = lens _accQuotaUser (\ s a -> s{_accQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +accPrettyPrint :: Lens' AccountsGet' Bool +accPrettyPrint + = lens _accPrettyPrint + (\ s a -> s{_accPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +accUserIp :: Lens' AccountsGet' (Maybe Text) +accUserIp + = lens _accUserIp (\ s a -> s{_accUserIp = a}) + +-- | User profile ID associated with this request. +accProfileId :: Lens' AccountsGet' Int64 +accProfileId + = lens _accProfileId (\ s a -> s{_accProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +accKey :: Lens' AccountsGet' (Maybe Text) +accKey = lens _accKey (\ s a -> s{_accKey = a}) + +-- | Account ID. +accId :: Lens' AccountsGet' Int64 +accId = lens _accId (\ s a -> s{_accId = a}) + +-- | OAuth 2.0 token for the current user. +accOauthToken :: Lens' AccountsGet' (Maybe Text) +accOauthToken + = lens _accOauthToken + (\ s a -> s{_accOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +accFields :: Lens' AccountsGet' (Maybe Text) +accFields + = lens _accFields (\ s a -> s{_accFields = a}) + +-- | Data format for the response. +accAlt :: Lens' AccountsGet' Text +accAlt = lens _accAlt (\ s a -> s{_accAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountsGet{..} + = go _accQuotaUser _accPrettyPrint _accUserIp + _accProfileId + _accKey + _accId + _accOauthToken + _accFields + _accAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/List.hs new file mode 100644 index 000000000..d613387cc --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/List.hs @@ -0,0 +1,245 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of accounts, possibly filtered. +-- +-- /See:/ for @DfareportingAccountsList@. +module DFAReporting.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alSearchString + , alIds + , alProfileId + , alSortOrder + , alActive + , alKey + , alPageToken + , alSortField + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accounts" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AccountsListResponse + +-- | Retrieves the list of accounts, possibly filtered. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alSearchString :: !(Maybe Text) + , _alIds :: !(Maybe Int64) + , _alProfileId :: !Int64 + , _alSortOrder :: !(Maybe Text) + , _alActive :: !(Maybe Bool) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alSortField :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alSearchString' +-- +-- * 'alIds' +-- +-- * 'alProfileId' +-- +-- * 'alSortOrder' +-- +-- * 'alActive' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alSortField' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +accountsList + :: Int64 -- ^ 'profileId' + -> AccountsList +accountsList pAlProfileId_ = + AccountsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alSearchString = Nothing + , _alIds = Nothing + , _alProfileId = pAlProfileId_ + , _alSortOrder = Nothing + , _alActive = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alSortField = Nothing + , _alOauthToken = Nothing + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AccountsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AccountsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AccountsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"account*2015\" will return objects with names like +-- \"account June 2015\", \"account April 2015\", or simply \"account +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"account\" will match objects with name \"my account\", \"account +-- 2015\", or simply \"account\". +alSearchString :: Lens' AccountsList' (Maybe Text) +alSearchString + = lens _alSearchString + (\ s a -> s{_alSearchString = a}) + +-- | Select only accounts with these IDs. +alIds :: Lens' AccountsList' (Maybe Int64) +alIds = lens _alIds (\ s a -> s{_alIds = a}) + +-- | User profile ID associated with this request. +alProfileId :: Lens' AccountsList' Int64 +alProfileId + = lens _alProfileId (\ s a -> s{_alProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +alSortOrder :: Lens' AccountsList' (Maybe Text) +alSortOrder + = lens _alSortOrder (\ s a -> s{_alSortOrder = a}) + +-- | Select only active accounts. Don\'t set this field to select both active +-- and non-active accounts. +alActive :: Lens' AccountsList' (Maybe Bool) +alActive = lens _alActive (\ s a -> s{_alActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AccountsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Value of the nextPageToken from the previous result page. +alPageToken :: Lens' AccountsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | Field by which to sort the list. +alSortField :: Lens' AccountsList' (Maybe Text) +alSortField + = lens _alSortField (\ s a -> s{_alSortField = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AccountsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Maximum number of results to return. +alMaxResults :: Lens' AccountsList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AccountsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AccountsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = AccountsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alSearchString + _alIds + _alProfileId + _alSortOrder + _alActive + _alKey + _alPageToken + _alSortField + _alOauthToken + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Patch.hs new file mode 100644 index 000000000..2bf6ec080 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Patch.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Accounts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account. This method supports patch semantics. +-- +-- /See:/ for @DfareportingAccountsPatch@. +module DFAReporting.Accounts.Patch + ( + -- * REST Resource + AccountsPatchAPI + + -- * Creating a Request + , accountsPatch + , AccountsPatch + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aProfileId + , aKey + , aId + , aOauthToken + , aFields + , aAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountsPatch@ which the +-- 'AccountsPatch' request conforms to. +type AccountsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accounts" :> + QueryParam "id" Int64 :> Patch '[JSON] Account + +-- | Updates an existing account. This method supports patch semantics. +-- +-- /See:/ 'accountsPatch' smart constructor. +data AccountsPatch = AccountsPatch + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aProfileId :: !Int64 + , _aKey :: !(Maybe Text) + , _aId :: !Int64 + , _aOauthToken :: !(Maybe Text) + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aProfileId' +-- +-- * 'aKey' +-- +-- * 'aId' +-- +-- * 'aOauthToken' +-- +-- * 'aFields' +-- +-- * 'aAlt' +accountsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AccountsPatch +accountsPatch pAProfileId_ pAId_ = + AccountsPatch + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aProfileId = pAProfileId_ + , _aKey = Nothing + , _aId = pAId_ + , _aOauthToken = Nothing + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AccountsPatch' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AccountsPatch' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AccountsPatch' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | User profile ID associated with this request. +aProfileId :: Lens' AccountsPatch' Int64 +aProfileId + = lens _aProfileId (\ s a -> s{_aProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AccountsPatch' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | Account ID. +aId :: Lens' AccountsPatch' Int64 +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AccountsPatch' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AccountsPatch' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AccountsPatch' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AccountsPatch' where + type Rs AccountsPatch' = Account + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountsPatch{..} + = go _aQuotaUser _aPrettyPrint _aUserIp _aProfileId + _aKey + (Just _aId) + _aOauthToken + _aFields + _aAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsPatchAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Update.hs new file mode 100644 index 000000000..4eb84000c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Accounts/Update.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Accounts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing account. +-- +-- /See:/ for @DfareportingAccountsUpdate@. +module DFAReporting.Accounts.Update + ( + -- * REST Resource + AccountsUpdateAPI + + -- * Creating a Request + , accountsUpdate + , AccountsUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auUserIp + , auProfileId + , auKey + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAccountsUpdate@ which the +-- 'AccountsUpdate' request conforms to. +type AccountsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "accounts" :> Put '[JSON] Account + +-- | Updates an existing account. +-- +-- /See:/ 'accountsUpdate' smart constructor. +data AccountsUpdate = AccountsUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auUserIp :: !(Maybe Text) + , _auProfileId :: !Int64 + , _auKey :: !(Maybe Text) + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auUserIp' +-- +-- * 'auProfileId' +-- +-- * 'auKey' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +accountsUpdate + :: Int64 -- ^ 'profileId' + -> AccountsUpdate +accountsUpdate pAuProfileId_ = + AccountsUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auUserIp = Nothing + , _auProfileId = pAuProfileId_ + , _auKey = Nothing + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AccountsUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AccountsUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AccountsUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | User profile ID associated with this request. +auProfileId :: Lens' AccountsUpdate' Int64 +auProfileId + = lens _auProfileId (\ s a -> s{_auProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AccountsUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AccountsUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AccountsUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AccountsUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AccountsUpdate' where + type Rs AccountsUpdate' = Account + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AccountsUpdate{..} + = go _auQuotaUser _auPrettyPrint _auUserIp + _auProfileId + _auKey + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Get.hs new file mode 100644 index 000000000..2e7297703 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Ads.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one ad by ID. +-- +-- /See:/ for @DfareportingAdsGet@. +module DFAReporting.Ads.Get + ( + -- * REST Resource + AdsGetAPI + + -- * Creating a Request + , adsGet + , AdsGet + + -- * Request Lenses + , ag1QuotaUser + , ag1PrettyPrint + , ag1UserIp + , ag1ProfileId + , ag1Key + , ag1Id + , ag1OauthToken + , ag1Fields + , ag1Alt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdsGet@ which the +-- 'AdsGet' request conforms to. +type AdsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "ads" :> Capture "id" Int64 :> Get '[JSON] Ad + +-- | Gets one ad by ID. +-- +-- /See:/ 'adsGet' smart constructor. +data AdsGet = AdsGet + { _ag1QuotaUser :: !(Maybe Text) + , _ag1PrettyPrint :: !Bool + , _ag1UserIp :: !(Maybe Text) + , _ag1ProfileId :: !Int64 + , _ag1Key :: !(Maybe Text) + , _ag1Id :: !Int64 + , _ag1OauthToken :: !(Maybe Text) + , _ag1Fields :: !(Maybe Text) + , _ag1Alt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ag1QuotaUser' +-- +-- * 'ag1PrettyPrint' +-- +-- * 'ag1UserIp' +-- +-- * 'ag1ProfileId' +-- +-- * 'ag1Key' +-- +-- * 'ag1Id' +-- +-- * 'ag1OauthToken' +-- +-- * 'ag1Fields' +-- +-- * 'ag1Alt' +adsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdsGet +adsGet pAg1ProfileId_ pAg1Id_ = + AdsGet + { _ag1QuotaUser = Nothing + , _ag1PrettyPrint = True + , _ag1UserIp = Nothing + , _ag1ProfileId = pAg1ProfileId_ + , _ag1Key = Nothing + , _ag1Id = pAg1Id_ + , _ag1OauthToken = Nothing + , _ag1Fields = Nothing + , _ag1Alt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ag1QuotaUser :: Lens' AdsGet' (Maybe Text) +ag1QuotaUser + = lens _ag1QuotaUser (\ s a -> s{_ag1QuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ag1PrettyPrint :: Lens' AdsGet' Bool +ag1PrettyPrint + = lens _ag1PrettyPrint + (\ s a -> s{_ag1PrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ag1UserIp :: Lens' AdsGet' (Maybe Text) +ag1UserIp + = lens _ag1UserIp (\ s a -> s{_ag1UserIp = a}) + +-- | User profile ID associated with this request. +ag1ProfileId :: Lens' AdsGet' Int64 +ag1ProfileId + = lens _ag1ProfileId (\ s a -> s{_ag1ProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ag1Key :: Lens' AdsGet' (Maybe Text) +ag1Key = lens _ag1Key (\ s a -> s{_ag1Key = a}) + +-- | Ad ID. +ag1Id :: Lens' AdsGet' Int64 +ag1Id = lens _ag1Id (\ s a -> s{_ag1Id = a}) + +-- | OAuth 2.0 token for the current user. +ag1OauthToken :: Lens' AdsGet' (Maybe Text) +ag1OauthToken + = lens _ag1OauthToken + (\ s a -> s{_ag1OauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ag1Fields :: Lens' AdsGet' (Maybe Text) +ag1Fields + = lens _ag1Fields (\ s a -> s{_ag1Fields = a}) + +-- | Data format for the response. +ag1Alt :: Lens' AdsGet' Text +ag1Alt = lens _ag1Alt (\ s a -> s{_ag1Alt = a}) + +instance GoogleRequest AdsGet' where + type Rs AdsGet' = Ad + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdsGet{..} + = go _ag1QuotaUser _ag1PrettyPrint _ag1UserIp + _ag1ProfileId + _ag1Key + _ag1Id + _ag1OauthToken + _ag1Fields + _ag1Alt + where go + = clientWithRoute (Proxy :: Proxy AdsGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Insert.hs new file mode 100644 index 000000000..aad10e342 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Ads.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new ad. +-- +-- /See:/ for @DfareportingAdsInsert@. +module DFAReporting.Ads.Insert + ( + -- * REST Resource + AdsInsertAPI + + -- * Creating a Request + , adsInsert + , AdsInsert + + -- * Request Lenses + , adsQuotaUser + , adsPrettyPrint + , adsUserIp + , adsProfileId + , adsKey + , adsOauthToken + , adsFields + , adsAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdsInsert@ which the +-- 'AdsInsert' request conforms to. +type AdsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> "ads" :> Post '[JSON] Ad + +-- | Inserts a new ad. +-- +-- /See:/ 'adsInsert' smart constructor. +data AdsInsert = AdsInsert + { _adsQuotaUser :: !(Maybe Text) + , _adsPrettyPrint :: !Bool + , _adsUserIp :: !(Maybe Text) + , _adsProfileId :: !Int64 + , _adsKey :: !(Maybe Text) + , _adsOauthToken :: !(Maybe Text) + , _adsFields :: !(Maybe Text) + , _adsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adsQuotaUser' +-- +-- * 'adsPrettyPrint' +-- +-- * 'adsUserIp' +-- +-- * 'adsProfileId' +-- +-- * 'adsKey' +-- +-- * 'adsOauthToken' +-- +-- * 'adsFields' +-- +-- * 'adsAlt' +adsInsert + :: Int64 -- ^ 'profileId' + -> AdsInsert +adsInsert pAdsProfileId_ = + AdsInsert + { _adsQuotaUser = Nothing + , _adsPrettyPrint = True + , _adsUserIp = Nothing + , _adsProfileId = pAdsProfileId_ + , _adsKey = Nothing + , _adsOauthToken = Nothing + , _adsFields = Nothing + , _adsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adsQuotaUser :: Lens' AdsInsert' (Maybe Text) +adsQuotaUser + = lens _adsQuotaUser (\ s a -> s{_adsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adsPrettyPrint :: Lens' AdsInsert' Bool +adsPrettyPrint + = lens _adsPrettyPrint + (\ s a -> s{_adsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adsUserIp :: Lens' AdsInsert' (Maybe Text) +adsUserIp + = lens _adsUserIp (\ s a -> s{_adsUserIp = a}) + +-- | User profile ID associated with this request. +adsProfileId :: Lens' AdsInsert' Int64 +adsProfileId + = lens _adsProfileId (\ s a -> s{_adsProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adsKey :: Lens' AdsInsert' (Maybe Text) +adsKey = lens _adsKey (\ s a -> s{_adsKey = a}) + +-- | OAuth 2.0 token for the current user. +adsOauthToken :: Lens' AdsInsert' (Maybe Text) +adsOauthToken + = lens _adsOauthToken + (\ s a -> s{_adsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adsFields :: Lens' AdsInsert' (Maybe Text) +adsFields + = lens _adsFields (\ s a -> s{_adsFields = a}) + +-- | Data format for the response. +adsAlt :: Lens' AdsInsert' Text +adsAlt = lens _adsAlt (\ s a -> s{_adsAlt = a}) + +instance GoogleRequest AdsInsert' where + type Rs AdsInsert' = Ad + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdsInsert{..} + = go _adsQuotaUser _adsPrettyPrint _adsUserIp + _adsProfileId + _adsKey + _adsOauthToken + _adsFields + _adsAlt + where go + = clientWithRoute (Proxy :: Proxy AdsInsertAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/List.hs new file mode 100644 index 000000000..dfaee28ae --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/List.hs @@ -0,0 +1,490 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Ads.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of ads, possibly filtered. +-- +-- /See:/ for @DfareportingAdsList@. +module DFAReporting.Ads.List + ( + -- * REST Resource + AdsListAPI + + -- * Creating a Request + , adsList + , AdsList + + -- * Request Lenses + , allQuotaUser + , allPrettyPrint + , allRemarketingListIds + , allLandingPageIds + , allCreativeIds + , allUserIp + , allAdvertiserId + , allCampaignIds + , allSearchString + , allSizeIds + , allSslCompliant + , allIds + , allProfileId + , allSortOrder + , allActive + , allCreativeOptimizationConfigurationIds + , allKey + , allPlacementIds + , allSslRequired + , allOverriddenEventTagId + , allPageToken + , allSortField + , allType + , allOauthToken + , allCreativeType + , allDynamicClickTracker + , allCompatibility + , allArchived + , allMaxResults + , allFields + , allAlt + , allAudienceSegmentIds + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdsList@ which the +-- 'AdsList' request conforms to. +type AdsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "ads" :> + QueryParams "remarketingListIds" Int64 :> + QueryParams "landingPageIds" Int64 :> + QueryParams "creativeIds" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParams "campaignIds" Int64 :> + QueryParam "searchString" Text :> + QueryParams "sizeIds" Int64 :> + QueryParam "sslCompliant" Bool :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParams + "creativeOptimizationConfigurationIds" + Int64 + :> + QueryParams "placementIds" Int64 :> + QueryParam "sslRequired" Bool :> + QueryParam "overriddenEventTagId" Int64 + :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "type" Text :> + QueryParam "creativeType" Text :> + QueryParam + "dynamicClickTracker" + Bool + :> + QueryParam "compatibility" + Text + :> + QueryParam "archived" Bool + :> + QueryParam "maxResults" + Int32 + :> + QueryParams + "audienceSegmentIds" + Int64 + :> + Get '[JSON] + AdsListResponse + +-- | Retrieves a list of ads, possibly filtered. +-- +-- /See:/ 'adsList' smart constructor. +data AdsList = AdsList + { _allQuotaUser :: !(Maybe Text) + , _allPrettyPrint :: !Bool + , _allRemarketingListIds :: !(Maybe Int64) + , _allLandingPageIds :: !(Maybe Int64) + , _allCreativeIds :: !(Maybe Int64) + , _allUserIp :: !(Maybe Text) + , _allAdvertiserId :: !(Maybe Int64) + , _allCampaignIds :: !(Maybe Int64) + , _allSearchString :: !(Maybe Text) + , _allSizeIds :: !(Maybe Int64) + , _allSslCompliant :: !(Maybe Bool) + , _allIds :: !(Maybe Int64) + , _allProfileId :: !Int64 + , _allSortOrder :: !(Maybe Text) + , _allActive :: !(Maybe Bool) + , _allCreativeOptimizationConfigurationIds :: !(Maybe Int64) + , _allKey :: !(Maybe Text) + , _allPlacementIds :: !(Maybe Int64) + , _allSslRequired :: !(Maybe Bool) + , _allOverriddenEventTagId :: !(Maybe Int64) + , _allPageToken :: !(Maybe Text) + , _allSortField :: !(Maybe Text) + , _allType :: !(Maybe Text) + , _allOauthToken :: !(Maybe Text) + , _allCreativeType :: !(Maybe Text) + , _allDynamicClickTracker :: !(Maybe Bool) + , _allCompatibility :: !(Maybe Text) + , _allArchived :: !(Maybe Bool) + , _allMaxResults :: !(Maybe Int32) + , _allFields :: !(Maybe Text) + , _allAlt :: !Text + , _allAudienceSegmentIds :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'allQuotaUser' +-- +-- * 'allPrettyPrint' +-- +-- * 'allRemarketingListIds' +-- +-- * 'allLandingPageIds' +-- +-- * 'allCreativeIds' +-- +-- * 'allUserIp' +-- +-- * 'allAdvertiserId' +-- +-- * 'allCampaignIds' +-- +-- * 'allSearchString' +-- +-- * 'allSizeIds' +-- +-- * 'allSslCompliant' +-- +-- * 'allIds' +-- +-- * 'allProfileId' +-- +-- * 'allSortOrder' +-- +-- * 'allActive' +-- +-- * 'allCreativeOptimizationConfigurationIds' +-- +-- * 'allKey' +-- +-- * 'allPlacementIds' +-- +-- * 'allSslRequired' +-- +-- * 'allOverriddenEventTagId' +-- +-- * 'allPageToken' +-- +-- * 'allSortField' +-- +-- * 'allType' +-- +-- * 'allOauthToken' +-- +-- * 'allCreativeType' +-- +-- * 'allDynamicClickTracker' +-- +-- * 'allCompatibility' +-- +-- * 'allArchived' +-- +-- * 'allMaxResults' +-- +-- * 'allFields' +-- +-- * 'allAlt' +-- +-- * 'allAudienceSegmentIds' +adsList + :: Int64 -- ^ 'profileId' + -> AdsList +adsList pAllProfileId_ = + AdsList + { _allQuotaUser = Nothing + , _allPrettyPrint = True + , _allRemarketingListIds = Nothing + , _allLandingPageIds = Nothing + , _allCreativeIds = Nothing + , _allUserIp = Nothing + , _allAdvertiserId = Nothing + , _allCampaignIds = Nothing + , _allSearchString = Nothing + , _allSizeIds = Nothing + , _allSslCompliant = Nothing + , _allIds = Nothing + , _allProfileId = pAllProfileId_ + , _allSortOrder = Nothing + , _allActive = Nothing + , _allCreativeOptimizationConfigurationIds = Nothing + , _allKey = Nothing + , _allPlacementIds = Nothing + , _allSslRequired = Nothing + , _allOverriddenEventTagId = Nothing + , _allPageToken = Nothing + , _allSortField = Nothing + , _allType = Nothing + , _allOauthToken = Nothing + , _allCreativeType = Nothing + , _allDynamicClickTracker = Nothing + , _allCompatibility = Nothing + , _allArchived = Nothing + , _allMaxResults = Nothing + , _allFields = Nothing + , _allAlt = "json" + , _allAudienceSegmentIds = Nothing + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +allQuotaUser :: Lens' AdsList' (Maybe Text) +allQuotaUser + = lens _allQuotaUser (\ s a -> s{_allQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +allPrettyPrint :: Lens' AdsList' Bool +allPrettyPrint + = lens _allPrettyPrint + (\ s a -> s{_allPrettyPrint = a}) + +-- | Select only ads whose list targeting expression use these remarketing +-- list IDs. +allRemarketingListIds :: Lens' AdsList' (Maybe Int64) +allRemarketingListIds + = lens _allRemarketingListIds + (\ s a -> s{_allRemarketingListIds = a}) + +-- | Select only ads with these landing page IDs. +allLandingPageIds :: Lens' AdsList' (Maybe Int64) +allLandingPageIds + = lens _allLandingPageIds + (\ s a -> s{_allLandingPageIds = a}) + +-- | Select only ads with these creative IDs assigned. +allCreativeIds :: Lens' AdsList' (Maybe Int64) +allCreativeIds + = lens _allCreativeIds + (\ s a -> s{_allCreativeIds = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +allUserIp :: Lens' AdsList' (Maybe Text) +allUserIp + = lens _allUserIp (\ s a -> s{_allUserIp = a}) + +-- | Select only ads with this advertiser ID. +allAdvertiserId :: Lens' AdsList' (Maybe Int64) +allAdvertiserId + = lens _allAdvertiserId + (\ s a -> s{_allAdvertiserId = a}) + +-- | Select only ads with these campaign IDs. +allCampaignIds :: Lens' AdsList' (Maybe Int64) +allCampaignIds + = lens _allCampaignIds + (\ s a -> s{_allCampaignIds = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"ad*2015\" will return objects with names like \"ad June +-- 2015\", \"ad April 2015\", or simply \"ad 2015\". Most of the searches +-- also add wildcards implicitly at the start and the end of the search +-- string. For example, a search string of \"ad\" will match objects with +-- name \"my ad\", \"ad 2015\", or simply \"ad\". +allSearchString :: Lens' AdsList' (Maybe Text) +allSearchString + = lens _allSearchString + (\ s a -> s{_allSearchString = a}) + +-- | Select only ads with these size IDs. +allSizeIds :: Lens' AdsList' (Maybe Int64) +allSizeIds + = lens _allSizeIds (\ s a -> s{_allSizeIds = a}) + +-- | Select only ads that are SSL-compliant. +allSslCompliant :: Lens' AdsList' (Maybe Bool) +allSslCompliant + = lens _allSslCompliant + (\ s a -> s{_allSslCompliant = a}) + +-- | Select only ads with these IDs. +allIds :: Lens' AdsList' (Maybe Int64) +allIds = lens _allIds (\ s a -> s{_allIds = a}) + +-- | User profile ID associated with this request. +allProfileId :: Lens' AdsList' Int64 +allProfileId + = lens _allProfileId (\ s a -> s{_allProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +allSortOrder :: Lens' AdsList' (Maybe Text) +allSortOrder + = lens _allSortOrder (\ s a -> s{_allSortOrder = a}) + +-- | Select only active ads. +allActive :: Lens' AdsList' (Maybe Bool) +allActive + = lens _allActive (\ s a -> s{_allActive = a}) + +-- | Select only ads with these creative optimization configuration IDs. +allCreativeOptimizationConfigurationIds :: Lens' AdsList' (Maybe Int64) +allCreativeOptimizationConfigurationIds + = lens _allCreativeOptimizationConfigurationIds + (\ s a -> + s{_allCreativeOptimizationConfigurationIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +allKey :: Lens' AdsList' (Maybe Text) +allKey = lens _allKey (\ s a -> s{_allKey = a}) + +-- | Select only ads with these placement IDs assigned. +allPlacementIds :: Lens' AdsList' (Maybe Int64) +allPlacementIds + = lens _allPlacementIds + (\ s a -> s{_allPlacementIds = a}) + +-- | Select only ads that require SSL. +allSslRequired :: Lens' AdsList' (Maybe Bool) +allSslRequired + = lens _allSslRequired + (\ s a -> s{_allSslRequired = a}) + +-- | Select only ads with this event tag override ID. +allOverriddenEventTagId :: Lens' AdsList' (Maybe Int64) +allOverriddenEventTagId + = lens _allOverriddenEventTagId + (\ s a -> s{_allOverriddenEventTagId = a}) + +-- | Value of the nextPageToken from the previous result page. +allPageToken :: Lens' AdsList' (Maybe Text) +allPageToken + = lens _allPageToken (\ s a -> s{_allPageToken = a}) + +-- | Field by which to sort the list. +allSortField :: Lens' AdsList' (Maybe Text) +allSortField + = lens _allSortField (\ s a -> s{_allSortField = a}) + +-- | Select only ads with these types. +allType :: Lens' AdsList' (Maybe Text) +allType = lens _allType (\ s a -> s{_allType = a}) + +-- | OAuth 2.0 token for the current user. +allOauthToken :: Lens' AdsList' (Maybe Text) +allOauthToken + = lens _allOauthToken + (\ s a -> s{_allOauthToken = a}) + +-- | Select only ads with the specified creativeType. +allCreativeType :: Lens' AdsList' (Maybe Text) +allCreativeType + = lens _allCreativeType + (\ s a -> s{_allCreativeType = a}) + +-- | Select only dynamic click trackers. Applicable when type is +-- AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If +-- false, select static click trackers. Leave unset to select both. +allDynamicClickTracker :: Lens' AdsList' (Maybe Bool) +allDynamicClickTracker + = lens _allDynamicClickTracker + (\ s a -> s{_allDynamicClickTracker = a}) + +-- | Select default ads with the specified compatibility. Applicable when +-- type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to +-- rendering either on desktop or on mobile devices for regular or +-- interstitial ads, respectively. APP and APP_INTERSTITIAL are for +-- rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an +-- in-stream video ads developed with the VAST standard. +allCompatibility :: Lens' AdsList' (Maybe Text) +allCompatibility + = lens _allCompatibility + (\ s a -> s{_allCompatibility = a}) + +-- | Select only archived ads. +allArchived :: Lens' AdsList' (Maybe Bool) +allArchived + = lens _allArchived (\ s a -> s{_allArchived = a}) + +-- | Maximum number of results to return. +allMaxResults :: Lens' AdsList' (Maybe Int32) +allMaxResults + = lens _allMaxResults + (\ s a -> s{_allMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +allFields :: Lens' AdsList' (Maybe Text) +allFields + = lens _allFields (\ s a -> s{_allFields = a}) + +-- | Data format for the response. +allAlt :: Lens' AdsList' Text +allAlt = lens _allAlt (\ s a -> s{_allAlt = a}) + +-- | Select only ads with these audience segment IDs. +allAudienceSegmentIds :: Lens' AdsList' (Maybe Int64) +allAudienceSegmentIds + = lens _allAudienceSegmentIds + (\ s a -> s{_allAudienceSegmentIds = a}) + +instance GoogleRequest AdsList' where + type Rs AdsList' = AdsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdsList{..} + = go _allQuotaUser _allPrettyPrint + _allRemarketingListIds + _allLandingPageIds + _allCreativeIds + _allUserIp + _allAdvertiserId + _allCampaignIds + _allSearchString + _allSizeIds + _allSslCompliant + _allIds + _allProfileId + _allSortOrder + _allActive + _allCreativeOptimizationConfigurationIds + _allKey + _allPlacementIds + _allSslRequired + _allOverriddenEventTagId + _allPageToken + _allSortField + _allType + _allOauthToken + _allCreativeType + _allDynamicClickTracker + _allCompatibility + _allArchived + _allMaxResults + _allFields + _allAlt + _allAudienceSegmentIds + where go + = clientWithRoute (Proxy :: Proxy AdsListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Patch.hs new file mode 100644 index 000000000..cda3b1e1f --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Patch.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Ads.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing ad. This method supports patch semantics. +-- +-- /See:/ for @DfareportingAdsPatch@. +module DFAReporting.Ads.Patch + ( + -- * REST Resource + AdsPatchAPI + + -- * Creating a Request + , adsPatch + , AdsPatch + + -- * Request Lenses + , adsdQuotaUser + , adsdPrettyPrint + , adsdUserIp + , adsdProfileId + , adsdKey + , adsdId + , adsdOauthToken + , adsdFields + , adsdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdsPatch@ which the +-- 'AdsPatch' request conforms to. +type AdsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "ads" :> QueryParam "id" Int64 :> Patch '[JSON] Ad + +-- | Updates an existing ad. This method supports patch semantics. +-- +-- /See:/ 'adsPatch' smart constructor. +data AdsPatch = AdsPatch + { _adsdQuotaUser :: !(Maybe Text) + , _adsdPrettyPrint :: !Bool + , _adsdUserIp :: !(Maybe Text) + , _adsdProfileId :: !Int64 + , _adsdKey :: !(Maybe Text) + , _adsdId :: !Int64 + , _adsdOauthToken :: !(Maybe Text) + , _adsdFields :: !(Maybe Text) + , _adsdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adsdQuotaUser' +-- +-- * 'adsdPrettyPrint' +-- +-- * 'adsdUserIp' +-- +-- * 'adsdProfileId' +-- +-- * 'adsdKey' +-- +-- * 'adsdId' +-- +-- * 'adsdOauthToken' +-- +-- * 'adsdFields' +-- +-- * 'adsdAlt' +adsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdsPatch +adsPatch pAdsdProfileId_ pAdsdId_ = + AdsPatch + { _adsdQuotaUser = Nothing + , _adsdPrettyPrint = True + , _adsdUserIp = Nothing + , _adsdProfileId = pAdsdProfileId_ + , _adsdKey = Nothing + , _adsdId = pAdsdId_ + , _adsdOauthToken = Nothing + , _adsdFields = Nothing + , _adsdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adsdQuotaUser :: Lens' AdsPatch' (Maybe Text) +adsdQuotaUser + = lens _adsdQuotaUser + (\ s a -> s{_adsdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adsdPrettyPrint :: Lens' AdsPatch' Bool +adsdPrettyPrint + = lens _adsdPrettyPrint + (\ s a -> s{_adsdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adsdUserIp :: Lens' AdsPatch' (Maybe Text) +adsdUserIp + = lens _adsdUserIp (\ s a -> s{_adsdUserIp = a}) + +-- | User profile ID associated with this request. +adsdProfileId :: Lens' AdsPatch' Int64 +adsdProfileId + = lens _adsdProfileId + (\ s a -> s{_adsdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adsdKey :: Lens' AdsPatch' (Maybe Text) +adsdKey = lens _adsdKey (\ s a -> s{_adsdKey = a}) + +-- | Ad ID. +adsdId :: Lens' AdsPatch' Int64 +adsdId = lens _adsdId (\ s a -> s{_adsdId = a}) + +-- | OAuth 2.0 token for the current user. +adsdOauthToken :: Lens' AdsPatch' (Maybe Text) +adsdOauthToken + = lens _adsdOauthToken + (\ s a -> s{_adsdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adsdFields :: Lens' AdsPatch' (Maybe Text) +adsdFields + = lens _adsdFields (\ s a -> s{_adsdFields = a}) + +-- | Data format for the response. +adsdAlt :: Lens' AdsPatch' Text +adsdAlt = lens _adsdAlt (\ s a -> s{_adsdAlt = a}) + +instance GoogleRequest AdsPatch' where + type Rs AdsPatch' = Ad + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdsPatch{..} + = go _adsdQuotaUser _adsdPrettyPrint _adsdUserIp + _adsdProfileId + _adsdKey + (Just _adsdId) + _adsdOauthToken + _adsdFields + _adsdAlt + where go + = clientWithRoute (Proxy :: Proxy AdsPatchAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Update.hs new file mode 100644 index 000000000..519d02b32 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Ads.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing ad. +-- +-- /See:/ for @DfareportingAdsUpdate@. +module DFAReporting.Ads.Update + ( + -- * REST Resource + AdsUpdateAPI + + -- * Creating a Request + , adsUpdate + , AdsUpdate + + -- * Request Lenses + , aaQuotaUser + , aaPrettyPrint + , aaUserIp + , aaProfileId + , aaKey + , aaOauthToken + , aaFields + , aaAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdsUpdate@ which the +-- 'AdsUpdate' request conforms to. +type AdsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> "ads" :> Put '[JSON] Ad + +-- | Updates an existing ad. +-- +-- /See:/ 'adsUpdate' smart constructor. +data AdsUpdate = AdsUpdate + { _aaQuotaUser :: !(Maybe Text) + , _aaPrettyPrint :: !Bool + , _aaUserIp :: !(Maybe Text) + , _aaProfileId :: !Int64 + , _aaKey :: !(Maybe Text) + , _aaOauthToken :: !(Maybe Text) + , _aaFields :: !(Maybe Text) + , _aaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaQuotaUser' +-- +-- * 'aaPrettyPrint' +-- +-- * 'aaUserIp' +-- +-- * 'aaProfileId' +-- +-- * 'aaKey' +-- +-- * 'aaOauthToken' +-- +-- * 'aaFields' +-- +-- * 'aaAlt' +adsUpdate + :: Int64 -- ^ 'profileId' + -> AdsUpdate +adsUpdate pAaProfileId_ = + AdsUpdate + { _aaQuotaUser = Nothing + , _aaPrettyPrint = True + , _aaUserIp = Nothing + , _aaProfileId = pAaProfileId_ + , _aaKey = Nothing + , _aaOauthToken = Nothing + , _aaFields = Nothing + , _aaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaQuotaUser :: Lens' AdsUpdate' (Maybe Text) +aaQuotaUser + = lens _aaQuotaUser (\ s a -> s{_aaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaPrettyPrint :: Lens' AdsUpdate' Bool +aaPrettyPrint + = lens _aaPrettyPrint + (\ s a -> s{_aaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaUserIp :: Lens' AdsUpdate' (Maybe Text) +aaUserIp = lens _aaUserIp (\ s a -> s{_aaUserIp = a}) + +-- | User profile ID associated with this request. +aaProfileId :: Lens' AdsUpdate' Int64 +aaProfileId + = lens _aaProfileId (\ s a -> s{_aaProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaKey :: Lens' AdsUpdate' (Maybe Text) +aaKey = lens _aaKey (\ s a -> s{_aaKey = a}) + +-- | OAuth 2.0 token for the current user. +aaOauthToken :: Lens' AdsUpdate' (Maybe Text) +aaOauthToken + = lens _aaOauthToken (\ s a -> s{_aaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aaFields :: Lens' AdsUpdate' (Maybe Text) +aaFields = lens _aaFields (\ s a -> s{_aaFields = a}) + +-- | Data format for the response. +aaAlt :: Lens' AdsUpdate' Text +aaAlt = lens _aaAlt (\ s a -> s{_aaAlt = a}) + +instance GoogleRequest AdsUpdate' where + type Rs AdsUpdate' = Ad + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdsUpdate{..} + = go _aaQuotaUser _aaPrettyPrint _aaUserIp + _aaProfileId + _aaKey + _aaOauthToken + _aaFields + _aaAlt + where go + = clientWithRoute (Proxy :: Proxy AdsUpdateAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Delete.hs new file mode 100644 index 000000000..4b52964e4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing advertiser group. +-- +-- /See:/ for @DfareportingAdvertiserGroupsDelete@. +module DFAReporting.AdvertiserGroups.Delete + ( + -- * REST Resource + AdvertiserGroupsDeleteAPI + + -- * Creating a Request + , advertiserGroupsDelete + , AdvertiserGroupsDelete + + -- * Request Lenses + , agdQuotaUser + , agdPrettyPrint + , agdUserIp + , agdProfileId + , agdKey + , agdId + , agdOauthToken + , agdFields + , agdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsDelete@ which the +-- 'AdvertiserGroupsDelete' request conforms to. +type AdvertiserGroupsDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing advertiser group. +-- +-- /See:/ 'advertiserGroupsDelete' smart constructor. +data AdvertiserGroupsDelete = AdvertiserGroupsDelete + { _agdQuotaUser :: !(Maybe Text) + , _agdPrettyPrint :: !Bool + , _agdUserIp :: !(Maybe Text) + , _agdProfileId :: !Int64 + , _agdKey :: !(Maybe Text) + , _agdId :: !Int64 + , _agdOauthToken :: !(Maybe Text) + , _agdFields :: !(Maybe Text) + , _agdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agdQuotaUser' +-- +-- * 'agdPrettyPrint' +-- +-- * 'agdUserIp' +-- +-- * 'agdProfileId' +-- +-- * 'agdKey' +-- +-- * 'agdId' +-- +-- * 'agdOauthToken' +-- +-- * 'agdFields' +-- +-- * 'agdAlt' +advertiserGroupsDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdvertiserGroupsDelete +advertiserGroupsDelete pAgdProfileId_ pAgdId_ = + AdvertiserGroupsDelete + { _agdQuotaUser = Nothing + , _agdPrettyPrint = True + , _agdUserIp = Nothing + , _agdProfileId = pAgdProfileId_ + , _agdKey = Nothing + , _agdId = pAgdId_ + , _agdOauthToken = Nothing + , _agdFields = Nothing + , _agdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agdQuotaUser :: Lens' AdvertiserGroupsDelete' (Maybe Text) +agdQuotaUser + = lens _agdQuotaUser (\ s a -> s{_agdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agdPrettyPrint :: Lens' AdvertiserGroupsDelete' Bool +agdPrettyPrint + = lens _agdPrettyPrint + (\ s a -> s{_agdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agdUserIp :: Lens' AdvertiserGroupsDelete' (Maybe Text) +agdUserIp + = lens _agdUserIp (\ s a -> s{_agdUserIp = a}) + +-- | User profile ID associated with this request. +agdProfileId :: Lens' AdvertiserGroupsDelete' Int64 +agdProfileId + = lens _agdProfileId (\ s a -> s{_agdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agdKey :: Lens' AdvertiserGroupsDelete' (Maybe Text) +agdKey = lens _agdKey (\ s a -> s{_agdKey = a}) + +-- | Advertiser group ID. +agdId :: Lens' AdvertiserGroupsDelete' Int64 +agdId = lens _agdId (\ s a -> s{_agdId = a}) + +-- | OAuth 2.0 token for the current user. +agdOauthToken :: Lens' AdvertiserGroupsDelete' (Maybe Text) +agdOauthToken + = lens _agdOauthToken + (\ s a -> s{_agdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agdFields :: Lens' AdvertiserGroupsDelete' (Maybe Text) +agdFields + = lens _agdFields (\ s a -> s{_agdFields = a}) + +-- | Data format for the response. +agdAlt :: Lens' AdvertiserGroupsDelete' Text +agdAlt = lens _agdAlt (\ s a -> s{_agdAlt = a}) + +instance GoogleRequest AdvertiserGroupsDelete' where + type Rs AdvertiserGroupsDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsDelete{..} + = go _agdQuotaUser _agdPrettyPrint _agdUserIp + _agdProfileId + _agdKey + _agdId + _agdOauthToken + _agdFields + _agdAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Get.hs new file mode 100644 index 000000000..b3ac5ff40 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one advertiser group by ID. +-- +-- /See:/ for @DfareportingAdvertiserGroupsGet@. +module DFAReporting.AdvertiserGroups.Get + ( + -- * REST Resource + AdvertiserGroupsGetAPI + + -- * Creating a Request + , advertiserGroupsGet + , AdvertiserGroupsGet + + -- * Request Lenses + , agggQuotaUser + , agggPrettyPrint + , agggUserIp + , agggProfileId + , agggKey + , agggId + , agggOauthToken + , agggFields + , agggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsGet@ which the +-- 'AdvertiserGroupsGet' request conforms to. +type AdvertiserGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> + Capture "id" Int64 :> Get '[JSON] AdvertiserGroup + +-- | Gets one advertiser group by ID. +-- +-- /See:/ 'advertiserGroupsGet' smart constructor. +data AdvertiserGroupsGet = AdvertiserGroupsGet + { _agggQuotaUser :: !(Maybe Text) + , _agggPrettyPrint :: !Bool + , _agggUserIp :: !(Maybe Text) + , _agggProfileId :: !Int64 + , _agggKey :: !(Maybe Text) + , _agggId :: !Int64 + , _agggOauthToken :: !(Maybe Text) + , _agggFields :: !(Maybe Text) + , _agggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agggQuotaUser' +-- +-- * 'agggPrettyPrint' +-- +-- * 'agggUserIp' +-- +-- * 'agggProfileId' +-- +-- * 'agggKey' +-- +-- * 'agggId' +-- +-- * 'agggOauthToken' +-- +-- * 'agggFields' +-- +-- * 'agggAlt' +advertiserGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdvertiserGroupsGet +advertiserGroupsGet pAgggProfileId_ pAgggId_ = + AdvertiserGroupsGet + { _agggQuotaUser = Nothing + , _agggPrettyPrint = True + , _agggUserIp = Nothing + , _agggProfileId = pAgggProfileId_ + , _agggKey = Nothing + , _agggId = pAgggId_ + , _agggOauthToken = Nothing + , _agggFields = Nothing + , _agggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agggQuotaUser :: Lens' AdvertiserGroupsGet' (Maybe Text) +agggQuotaUser + = lens _agggQuotaUser + (\ s a -> s{_agggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agggPrettyPrint :: Lens' AdvertiserGroupsGet' Bool +agggPrettyPrint + = lens _agggPrettyPrint + (\ s a -> s{_agggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agggUserIp :: Lens' AdvertiserGroupsGet' (Maybe Text) +agggUserIp + = lens _agggUserIp (\ s a -> s{_agggUserIp = a}) + +-- | User profile ID associated with this request. +agggProfileId :: Lens' AdvertiserGroupsGet' Int64 +agggProfileId + = lens _agggProfileId + (\ s a -> s{_agggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agggKey :: Lens' AdvertiserGroupsGet' (Maybe Text) +agggKey = lens _agggKey (\ s a -> s{_agggKey = a}) + +-- | Advertiser group ID. +agggId :: Lens' AdvertiserGroupsGet' Int64 +agggId = lens _agggId (\ s a -> s{_agggId = a}) + +-- | OAuth 2.0 token for the current user. +agggOauthToken :: Lens' AdvertiserGroupsGet' (Maybe Text) +agggOauthToken + = lens _agggOauthToken + (\ s a -> s{_agggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agggFields :: Lens' AdvertiserGroupsGet' (Maybe Text) +agggFields + = lens _agggFields (\ s a -> s{_agggFields = a}) + +-- | Data format for the response. +agggAlt :: Lens' AdvertiserGroupsGet' Text +agggAlt = lens _agggAlt (\ s a -> s{_agggAlt = a}) + +instance GoogleRequest AdvertiserGroupsGet' where + type Rs AdvertiserGroupsGet' = AdvertiserGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsGet{..} + = go _agggQuotaUser _agggPrettyPrint _agggUserIp + _agggProfileId + _agggKey + _agggId + _agggOauthToken + _agggFields + _agggAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Insert.hs new file mode 100644 index 000000000..906e04ade --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new advertiser group. +-- +-- /See:/ for @DfareportingAdvertiserGroupsInsert@. +module DFAReporting.AdvertiserGroups.Insert + ( + -- * REST Resource + AdvertiserGroupsInsertAPI + + -- * Creating a Request + , advertiserGroupsInsert + , AdvertiserGroupsInsert + + -- * Request Lenses + , agiQuotaUser + , agiPrettyPrint + , agiUserIp + , agiProfileId + , agiKey + , agiOauthToken + , agiFields + , agiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsInsert@ which the +-- 'AdvertiserGroupsInsert' request conforms to. +type AdvertiserGroupsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> Post '[JSON] AdvertiserGroup + +-- | Inserts a new advertiser group. +-- +-- /See:/ 'advertiserGroupsInsert' smart constructor. +data AdvertiserGroupsInsert = AdvertiserGroupsInsert + { _agiQuotaUser :: !(Maybe Text) + , _agiPrettyPrint :: !Bool + , _agiUserIp :: !(Maybe Text) + , _agiProfileId :: !Int64 + , _agiKey :: !(Maybe Text) + , _agiOauthToken :: !(Maybe Text) + , _agiFields :: !(Maybe Text) + , _agiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agiQuotaUser' +-- +-- * 'agiPrettyPrint' +-- +-- * 'agiUserIp' +-- +-- * 'agiProfileId' +-- +-- * 'agiKey' +-- +-- * 'agiOauthToken' +-- +-- * 'agiFields' +-- +-- * 'agiAlt' +advertiserGroupsInsert + :: Int64 -- ^ 'profileId' + -> AdvertiserGroupsInsert +advertiserGroupsInsert pAgiProfileId_ = + AdvertiserGroupsInsert + { _agiQuotaUser = Nothing + , _agiPrettyPrint = True + , _agiUserIp = Nothing + , _agiProfileId = pAgiProfileId_ + , _agiKey = Nothing + , _agiOauthToken = Nothing + , _agiFields = Nothing + , _agiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agiQuotaUser :: Lens' AdvertiserGroupsInsert' (Maybe Text) +agiQuotaUser + = lens _agiQuotaUser (\ s a -> s{_agiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agiPrettyPrint :: Lens' AdvertiserGroupsInsert' Bool +agiPrettyPrint + = lens _agiPrettyPrint + (\ s a -> s{_agiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agiUserIp :: Lens' AdvertiserGroupsInsert' (Maybe Text) +agiUserIp + = lens _agiUserIp (\ s a -> s{_agiUserIp = a}) + +-- | User profile ID associated with this request. +agiProfileId :: Lens' AdvertiserGroupsInsert' Int64 +agiProfileId + = lens _agiProfileId (\ s a -> s{_agiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agiKey :: Lens' AdvertiserGroupsInsert' (Maybe Text) +agiKey = lens _agiKey (\ s a -> s{_agiKey = a}) + +-- | OAuth 2.0 token for the current user. +agiOauthToken :: Lens' AdvertiserGroupsInsert' (Maybe Text) +agiOauthToken + = lens _agiOauthToken + (\ s a -> s{_agiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agiFields :: Lens' AdvertiserGroupsInsert' (Maybe Text) +agiFields + = lens _agiFields (\ s a -> s{_agiFields = a}) + +-- | Data format for the response. +agiAlt :: Lens' AdvertiserGroupsInsert' Text +agiAlt = lens _agiAlt (\ s a -> s{_agiAlt = a}) + +instance GoogleRequest AdvertiserGroupsInsert' where + type Rs AdvertiserGroupsInsert' = AdvertiserGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsInsert{..} + = go _agiQuotaUser _agiPrettyPrint _agiUserIp + _agiProfileId + _agiKey + _agiOauthToken + _agiFields + _agiAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/List.hs new file mode 100644 index 000000000..e0fddcf6c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/List.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of advertiser groups, possibly filtered. +-- +-- /See:/ for @DfareportingAdvertiserGroupsList@. +module DFAReporting.AdvertiserGroups.List + ( + -- * REST Resource + AdvertiserGroupsListAPI + + -- * Creating a Request + , advertiserGroupsList + , AdvertiserGroupsList + + -- * Request Lenses + , aglQuotaUser + , aglPrettyPrint + , aglUserIp + , aglSearchString + , aglIds + , aglProfileId + , aglSortOrder + , aglKey + , aglPageToken + , aglSortField + , aglOauthToken + , aglMaxResults + , aglFields + , aglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsList@ which the +-- 'AdvertiserGroupsList' request conforms to. +type AdvertiserGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdvertiserGroupsListResponse + +-- | Retrieves a list of advertiser groups, possibly filtered. +-- +-- /See:/ 'advertiserGroupsList' smart constructor. +data AdvertiserGroupsList = AdvertiserGroupsList + { _aglQuotaUser :: !(Maybe Text) + , _aglPrettyPrint :: !Bool + , _aglUserIp :: !(Maybe Text) + , _aglSearchString :: !(Maybe Text) + , _aglIds :: !(Maybe Int64) + , _aglProfileId :: !Int64 + , _aglSortOrder :: !(Maybe Text) + , _aglKey :: !(Maybe Text) + , _aglPageToken :: !(Maybe Text) + , _aglSortField :: !(Maybe Text) + , _aglOauthToken :: !(Maybe Text) + , _aglMaxResults :: !(Maybe Int32) + , _aglFields :: !(Maybe Text) + , _aglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aglQuotaUser' +-- +-- * 'aglPrettyPrint' +-- +-- * 'aglUserIp' +-- +-- * 'aglSearchString' +-- +-- * 'aglIds' +-- +-- * 'aglProfileId' +-- +-- * 'aglSortOrder' +-- +-- * 'aglKey' +-- +-- * 'aglPageToken' +-- +-- * 'aglSortField' +-- +-- * 'aglOauthToken' +-- +-- * 'aglMaxResults' +-- +-- * 'aglFields' +-- +-- * 'aglAlt' +advertiserGroupsList + :: Int64 -- ^ 'profileId' + -> AdvertiserGroupsList +advertiserGroupsList pAglProfileId_ = + AdvertiserGroupsList + { _aglQuotaUser = Nothing + , _aglPrettyPrint = True + , _aglUserIp = Nothing + , _aglSearchString = Nothing + , _aglIds = Nothing + , _aglProfileId = pAglProfileId_ + , _aglSortOrder = Nothing + , _aglKey = Nothing + , _aglPageToken = Nothing + , _aglSortField = Nothing + , _aglOauthToken = Nothing + , _aglMaxResults = Nothing + , _aglFields = Nothing + , _aglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aglQuotaUser :: Lens' AdvertiserGroupsList' (Maybe Text) +aglQuotaUser + = lens _aglQuotaUser (\ s a -> s{_aglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aglPrettyPrint :: Lens' AdvertiserGroupsList' Bool +aglPrettyPrint + = lens _aglPrettyPrint + (\ s a -> s{_aglPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aglUserIp :: Lens' AdvertiserGroupsList' (Maybe Text) +aglUserIp + = lens _aglUserIp (\ s a -> s{_aglUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"advertiser*2015\" will return objects with names like +-- \"advertiser group June 2015\", \"advertiser group April 2015\", or +-- simply \"advertiser group 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"advertisergroup\" will match objects with +-- name \"my advertisergroup\", \"advertisergroup 2015\", or simply +-- \"advertisergroup\". +aglSearchString :: Lens' AdvertiserGroupsList' (Maybe Text) +aglSearchString + = lens _aglSearchString + (\ s a -> s{_aglSearchString = a}) + +-- | Select only advertiser groups with these IDs. +aglIds :: Lens' AdvertiserGroupsList' (Maybe Int64) +aglIds = lens _aglIds (\ s a -> s{_aglIds = a}) + +-- | User profile ID associated with this request. +aglProfileId :: Lens' AdvertiserGroupsList' Int64 +aglProfileId + = lens _aglProfileId (\ s a -> s{_aglProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +aglSortOrder :: Lens' AdvertiserGroupsList' (Maybe Text) +aglSortOrder + = lens _aglSortOrder (\ s a -> s{_aglSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aglKey :: Lens' AdvertiserGroupsList' (Maybe Text) +aglKey = lens _aglKey (\ s a -> s{_aglKey = a}) + +-- | Value of the nextPageToken from the previous result page. +aglPageToken :: Lens' AdvertiserGroupsList' (Maybe Text) +aglPageToken + = lens _aglPageToken (\ s a -> s{_aglPageToken = a}) + +-- | Field by which to sort the list. +aglSortField :: Lens' AdvertiserGroupsList' (Maybe Text) +aglSortField + = lens _aglSortField (\ s a -> s{_aglSortField = a}) + +-- | OAuth 2.0 token for the current user. +aglOauthToken :: Lens' AdvertiserGroupsList' (Maybe Text) +aglOauthToken + = lens _aglOauthToken + (\ s a -> s{_aglOauthToken = a}) + +-- | Maximum number of results to return. +aglMaxResults :: Lens' AdvertiserGroupsList' (Maybe Int32) +aglMaxResults + = lens _aglMaxResults + (\ s a -> s{_aglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aglFields :: Lens' AdvertiserGroupsList' (Maybe Text) +aglFields + = lens _aglFields (\ s a -> s{_aglFields = a}) + +-- | Data format for the response. +aglAlt :: Lens' AdvertiserGroupsList' Text +aglAlt = lens _aglAlt (\ s a -> s{_aglAlt = a}) + +instance GoogleRequest AdvertiserGroupsList' where + type Rs AdvertiserGroupsList' = + AdvertiserGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsList{..} + = go _aglQuotaUser _aglPrettyPrint _aglUserIp + _aglSearchString + _aglIds + _aglProfileId + _aglSortOrder + _aglKey + _aglPageToken + _aglSortField + _aglOauthToken + _aglMaxResults + _aglFields + _aglAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Patch.hs new file mode 100644 index 000000000..29424e7bc --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing advertiser group. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingAdvertiserGroupsPatch@. +module DFAReporting.AdvertiserGroups.Patch + ( + -- * REST Resource + AdvertiserGroupsPatchAPI + + -- * Creating a Request + , advertiserGroupsPatch + , AdvertiserGroupsPatch + + -- * Request Lenses + , agpQuotaUser + , agpPrettyPrint + , agpUserIp + , agpProfileId + , agpKey + , agpId + , agpOauthToken + , agpFields + , agpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsPatch@ which the +-- 'AdvertiserGroupsPatch' request conforms to. +type AdvertiserGroupsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> + QueryParam "id" Int64 :> + Patch '[JSON] AdvertiserGroup + +-- | Updates an existing advertiser group. This method supports patch +-- semantics. +-- +-- /See:/ 'advertiserGroupsPatch' smart constructor. +data AdvertiserGroupsPatch = AdvertiserGroupsPatch + { _agpQuotaUser :: !(Maybe Text) + , _agpPrettyPrint :: !Bool + , _agpUserIp :: !(Maybe Text) + , _agpProfileId :: !Int64 + , _agpKey :: !(Maybe Text) + , _agpId :: !Int64 + , _agpOauthToken :: !(Maybe Text) + , _agpFields :: !(Maybe Text) + , _agpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agpQuotaUser' +-- +-- * 'agpPrettyPrint' +-- +-- * 'agpUserIp' +-- +-- * 'agpProfileId' +-- +-- * 'agpKey' +-- +-- * 'agpId' +-- +-- * 'agpOauthToken' +-- +-- * 'agpFields' +-- +-- * 'agpAlt' +advertiserGroupsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdvertiserGroupsPatch +advertiserGroupsPatch pAgpProfileId_ pAgpId_ = + AdvertiserGroupsPatch + { _agpQuotaUser = Nothing + , _agpPrettyPrint = True + , _agpUserIp = Nothing + , _agpProfileId = pAgpProfileId_ + , _agpKey = Nothing + , _agpId = pAgpId_ + , _agpOauthToken = Nothing + , _agpFields = Nothing + , _agpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agpQuotaUser :: Lens' AdvertiserGroupsPatch' (Maybe Text) +agpQuotaUser + = lens _agpQuotaUser (\ s a -> s{_agpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agpPrettyPrint :: Lens' AdvertiserGroupsPatch' Bool +agpPrettyPrint + = lens _agpPrettyPrint + (\ s a -> s{_agpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agpUserIp :: Lens' AdvertiserGroupsPatch' (Maybe Text) +agpUserIp + = lens _agpUserIp (\ s a -> s{_agpUserIp = a}) + +-- | User profile ID associated with this request. +agpProfileId :: Lens' AdvertiserGroupsPatch' Int64 +agpProfileId + = lens _agpProfileId (\ s a -> s{_agpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agpKey :: Lens' AdvertiserGroupsPatch' (Maybe Text) +agpKey = lens _agpKey (\ s a -> s{_agpKey = a}) + +-- | Advertiser group ID. +agpId :: Lens' AdvertiserGroupsPatch' Int64 +agpId = lens _agpId (\ s a -> s{_agpId = a}) + +-- | OAuth 2.0 token for the current user. +agpOauthToken :: Lens' AdvertiserGroupsPatch' (Maybe Text) +agpOauthToken + = lens _agpOauthToken + (\ s a -> s{_agpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agpFields :: Lens' AdvertiserGroupsPatch' (Maybe Text) +agpFields + = lens _agpFields (\ s a -> s{_agpFields = a}) + +-- | Data format for the response. +agpAlt :: Lens' AdvertiserGroupsPatch' Text +agpAlt = lens _agpAlt (\ s a -> s{_agpAlt = a}) + +instance GoogleRequest AdvertiserGroupsPatch' where + type Rs AdvertiserGroupsPatch' = AdvertiserGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsPatch{..} + = go _agpQuotaUser _agpPrettyPrint _agpUserIp + _agpProfileId + _agpKey + (Just _agpId) + _agpOauthToken + _agpFields + _agpAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Update.hs new file mode 100644 index 000000000..b9d57927d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.AdvertiserGroups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing advertiser group. +-- +-- /See:/ for @DfareportingAdvertiserGroupsUpdate@. +module DFAReporting.AdvertiserGroups.Update + ( + -- * REST Resource + AdvertiserGroupsUpdateAPI + + -- * Creating a Request + , advertiserGroupsUpdate + , AdvertiserGroupsUpdate + + -- * Request Lenses + , aguQuotaUser + , aguPrettyPrint + , aguUserIp + , aguProfileId + , aguKey + , aguOauthToken + , aguFields + , aguAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertiserGroupsUpdate@ which the +-- 'AdvertiserGroupsUpdate' request conforms to. +type AdvertiserGroupsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertiserGroups" :> Put '[JSON] AdvertiserGroup + +-- | Updates an existing advertiser group. +-- +-- /See:/ 'advertiserGroupsUpdate' smart constructor. +data AdvertiserGroupsUpdate = AdvertiserGroupsUpdate + { _aguQuotaUser :: !(Maybe Text) + , _aguPrettyPrint :: !Bool + , _aguUserIp :: !(Maybe Text) + , _aguProfileId :: !Int64 + , _aguKey :: !(Maybe Text) + , _aguOauthToken :: !(Maybe Text) + , _aguFields :: !(Maybe Text) + , _aguAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertiserGroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aguQuotaUser' +-- +-- * 'aguPrettyPrint' +-- +-- * 'aguUserIp' +-- +-- * 'aguProfileId' +-- +-- * 'aguKey' +-- +-- * 'aguOauthToken' +-- +-- * 'aguFields' +-- +-- * 'aguAlt' +advertiserGroupsUpdate + :: Int64 -- ^ 'profileId' + -> AdvertiserGroupsUpdate +advertiserGroupsUpdate pAguProfileId_ = + AdvertiserGroupsUpdate + { _aguQuotaUser = Nothing + , _aguPrettyPrint = True + , _aguUserIp = Nothing + , _aguProfileId = pAguProfileId_ + , _aguKey = Nothing + , _aguOauthToken = Nothing + , _aguFields = Nothing + , _aguAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aguQuotaUser :: Lens' AdvertiserGroupsUpdate' (Maybe Text) +aguQuotaUser + = lens _aguQuotaUser (\ s a -> s{_aguQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aguPrettyPrint :: Lens' AdvertiserGroupsUpdate' Bool +aguPrettyPrint + = lens _aguPrettyPrint + (\ s a -> s{_aguPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aguUserIp :: Lens' AdvertiserGroupsUpdate' (Maybe Text) +aguUserIp + = lens _aguUserIp (\ s a -> s{_aguUserIp = a}) + +-- | User profile ID associated with this request. +aguProfileId :: Lens' AdvertiserGroupsUpdate' Int64 +aguProfileId + = lens _aguProfileId (\ s a -> s{_aguProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aguKey :: Lens' AdvertiserGroupsUpdate' (Maybe Text) +aguKey = lens _aguKey (\ s a -> s{_aguKey = a}) + +-- | OAuth 2.0 token for the current user. +aguOauthToken :: Lens' AdvertiserGroupsUpdate' (Maybe Text) +aguOauthToken + = lens _aguOauthToken + (\ s a -> s{_aguOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aguFields :: Lens' AdvertiserGroupsUpdate' (Maybe Text) +aguFields + = lens _aguFields (\ s a -> s{_aguFields = a}) + +-- | Data format for the response. +aguAlt :: Lens' AdvertiserGroupsUpdate' Text +aguAlt = lens _aguAlt (\ s a -> s{_aguAlt = a}) + +instance GoogleRequest AdvertiserGroupsUpdate' where + type Rs AdvertiserGroupsUpdate' = AdvertiserGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertiserGroupsUpdate{..} + = go _aguQuotaUser _aguPrettyPrint _aguUserIp + _aguProfileId + _aguKey + _aguOauthToken + _aguFields + _aguAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertiserGroupsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Get.hs new file mode 100644 index 000000000..0090bdd78 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Advertisers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one advertiser by ID. +-- +-- /See:/ for @DfareportingAdvertisersGet@. +module DFAReporting.Advertisers.Get + ( + -- * REST Resource + AdvertisersGetAPI + + -- * Creating a Request + , advertisersGet + , AdvertisersGet + + -- * Request Lenses + , aggQuotaUser + , aggPrettyPrint + , aggUserIp + , aggProfileId + , aggKey + , aggId + , aggOauthToken + , aggFields + , aggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertisersGet@ which the +-- 'AdvertisersGet' request conforms to. +type AdvertisersGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertisers" :> + Capture "id" Int64 :> Get '[JSON] Advertiser + +-- | Gets one advertiser by ID. +-- +-- /See:/ 'advertisersGet' smart constructor. +data AdvertisersGet = AdvertisersGet + { _aggQuotaUser :: !(Maybe Text) + , _aggPrettyPrint :: !Bool + , _aggUserIp :: !(Maybe Text) + , _aggProfileId :: !Int64 + , _aggKey :: !(Maybe Text) + , _aggId :: !Int64 + , _aggOauthToken :: !(Maybe Text) + , _aggFields :: !(Maybe Text) + , _aggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aggQuotaUser' +-- +-- * 'aggPrettyPrint' +-- +-- * 'aggUserIp' +-- +-- * 'aggProfileId' +-- +-- * 'aggKey' +-- +-- * 'aggId' +-- +-- * 'aggOauthToken' +-- +-- * 'aggFields' +-- +-- * 'aggAlt' +advertisersGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdvertisersGet +advertisersGet pAggProfileId_ pAggId_ = + AdvertisersGet + { _aggQuotaUser = Nothing + , _aggPrettyPrint = True + , _aggUserIp = Nothing + , _aggProfileId = pAggProfileId_ + , _aggKey = Nothing + , _aggId = pAggId_ + , _aggOauthToken = Nothing + , _aggFields = Nothing + , _aggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aggQuotaUser :: Lens' AdvertisersGet' (Maybe Text) +aggQuotaUser + = lens _aggQuotaUser (\ s a -> s{_aggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aggPrettyPrint :: Lens' AdvertisersGet' Bool +aggPrettyPrint + = lens _aggPrettyPrint + (\ s a -> s{_aggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aggUserIp :: Lens' AdvertisersGet' (Maybe Text) +aggUserIp + = lens _aggUserIp (\ s a -> s{_aggUserIp = a}) + +-- | User profile ID associated with this request. +aggProfileId :: Lens' AdvertisersGet' Int64 +aggProfileId + = lens _aggProfileId (\ s a -> s{_aggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aggKey :: Lens' AdvertisersGet' (Maybe Text) +aggKey = lens _aggKey (\ s a -> s{_aggKey = a}) + +-- | Advertiser ID. +aggId :: Lens' AdvertisersGet' Int64 +aggId = lens _aggId (\ s a -> s{_aggId = a}) + +-- | OAuth 2.0 token for the current user. +aggOauthToken :: Lens' AdvertisersGet' (Maybe Text) +aggOauthToken + = lens _aggOauthToken + (\ s a -> s{_aggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aggFields :: Lens' AdvertisersGet' (Maybe Text) +aggFields + = lens _aggFields (\ s a -> s{_aggFields = a}) + +-- | Data format for the response. +aggAlt :: Lens' AdvertisersGet' Text +aggAlt = lens _aggAlt (\ s a -> s{_aggAlt = a}) + +instance GoogleRequest AdvertisersGet' where + type Rs AdvertisersGet' = Advertiser + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertisersGet{..} + = go _aggQuotaUser _aggPrettyPrint _aggUserIp + _aggProfileId + _aggKey + _aggId + _aggOauthToken + _aggFields + _aggAlt + where go + = clientWithRoute (Proxy :: Proxy AdvertisersGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Insert.hs new file mode 100644 index 000000000..691211665 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Advertisers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new advertiser. +-- +-- /See:/ for @DfareportingAdvertisersInsert@. +module DFAReporting.Advertisers.Insert + ( + -- * REST Resource + AdvertisersInsertAPI + + -- * Creating a Request + , advertisersInsert + , AdvertisersInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiUserIp + , aiProfileId + , aiKey + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertisersInsert@ which the +-- 'AdvertisersInsert' request conforms to. +type AdvertisersInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertisers" :> Post '[JSON] Advertiser + +-- | Inserts a new advertiser. +-- +-- /See:/ 'advertisersInsert' smart constructor. +data AdvertisersInsert = AdvertisersInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiProfileId :: !Int64 + , _aiKey :: !(Maybe Text) + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiProfileId' +-- +-- * 'aiKey' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +advertisersInsert + :: Int64 -- ^ 'profileId' + -> AdvertisersInsert +advertisersInsert pAiProfileId_ = + AdvertisersInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiProfileId = pAiProfileId_ + , _aiKey = Nothing + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' AdvertisersInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' AdvertisersInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' AdvertisersInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | User profile ID associated with this request. +aiProfileId :: Lens' AdvertisersInsert' Int64 +aiProfileId + = lens _aiProfileId (\ s a -> s{_aiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' AdvertisersInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' AdvertisersInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' AdvertisersInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' AdvertisersInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest AdvertisersInsert' where + type Rs AdvertisersInsert' = Advertiser + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertisersInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiUserIp + _aiProfileId + _aiKey + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertisersInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/List.hs new file mode 100644 index 000000000..72a4034f8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/List.hs @@ -0,0 +1,318 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Advertisers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of advertisers, possibly filtered. +-- +-- /See:/ for @DfareportingAdvertisersList@. +module DFAReporting.Advertisers.List + ( + -- * REST Resource + AdvertisersListAPI + + -- * Creating a Request + , advertisersList + , AdvertisersList + + -- * Request Lenses + , advStatus + , advQuotaUser + , advPrettyPrint + , advUserIp + , advOnlyParent + , advSearchString + , advIds + , advIncludeAdvertisersWithoutGroupsOnly + , advProfileId + , advSortOrder + , advAdvertiserGroupIds + , advKey + , advPageToken + , advSortField + , advSubaccountId + , advOauthToken + , advFloodlightConfigurationIds + , advMaxResults + , advFields + , advAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertisersList@ which the +-- 'AdvertisersList' request conforms to. +type AdvertisersListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertisers" :> + QueryParam "status" Text :> + QueryParam "onlyParent" Bool :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "includeAdvertisersWithoutGroupsOnly" Bool + :> + QueryParam "sortOrder" Text :> + QueryParams "advertiserGroupIds" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "subaccountId" Int64 :> + QueryParams "floodlightConfigurationIds" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AdvertisersListResponse + +-- | Retrieves a list of advertisers, possibly filtered. +-- +-- /See:/ 'advertisersList' smart constructor. +data AdvertisersList = AdvertisersList + { _advStatus :: !(Maybe Text) + , _advQuotaUser :: !(Maybe Text) + , _advPrettyPrint :: !Bool + , _advUserIp :: !(Maybe Text) + , _advOnlyParent :: !(Maybe Bool) + , _advSearchString :: !(Maybe Text) + , _advIds :: !(Maybe Int64) + , _advIncludeAdvertisersWithoutGroupsOnly :: !(Maybe Bool) + , _advProfileId :: !Int64 + , _advSortOrder :: !(Maybe Text) + , _advAdvertiserGroupIds :: !(Maybe Int64) + , _advKey :: !(Maybe Text) + , _advPageToken :: !(Maybe Text) + , _advSortField :: !(Maybe Text) + , _advSubaccountId :: !(Maybe Int64) + , _advOauthToken :: !(Maybe Text) + , _advFloodlightConfigurationIds :: !(Maybe Int64) + , _advMaxResults :: !(Maybe Int32) + , _advFields :: !(Maybe Text) + , _advAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'advStatus' +-- +-- * 'advQuotaUser' +-- +-- * 'advPrettyPrint' +-- +-- * 'advUserIp' +-- +-- * 'advOnlyParent' +-- +-- * 'advSearchString' +-- +-- * 'advIds' +-- +-- * 'advIncludeAdvertisersWithoutGroupsOnly' +-- +-- * 'advProfileId' +-- +-- * 'advSortOrder' +-- +-- * 'advAdvertiserGroupIds' +-- +-- * 'advKey' +-- +-- * 'advPageToken' +-- +-- * 'advSortField' +-- +-- * 'advSubaccountId' +-- +-- * 'advOauthToken' +-- +-- * 'advFloodlightConfigurationIds' +-- +-- * 'advMaxResults' +-- +-- * 'advFields' +-- +-- * 'advAlt' +advertisersList + :: Int64 -- ^ 'profileId' + -> AdvertisersList +advertisersList pAdvProfileId_ = + AdvertisersList + { _advStatus = Nothing + , _advQuotaUser = Nothing + , _advPrettyPrint = True + , _advUserIp = Nothing + , _advOnlyParent = Nothing + , _advSearchString = Nothing + , _advIds = Nothing + , _advIncludeAdvertisersWithoutGroupsOnly = Nothing + , _advProfileId = pAdvProfileId_ + , _advSortOrder = Nothing + , _advAdvertiserGroupIds = Nothing + , _advKey = Nothing + , _advPageToken = Nothing + , _advSortField = Nothing + , _advSubaccountId = Nothing + , _advOauthToken = Nothing + , _advFloodlightConfigurationIds = Nothing + , _advMaxResults = Nothing + , _advFields = Nothing + , _advAlt = "json" + } + +-- | Select only advertisers with the specified status. +advStatus :: Lens' AdvertisersList' (Maybe Text) +advStatus + = lens _advStatus (\ s a -> s{_advStatus = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +advQuotaUser :: Lens' AdvertisersList' (Maybe Text) +advQuotaUser + = lens _advQuotaUser (\ s a -> s{_advQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +advPrettyPrint :: Lens' AdvertisersList' Bool +advPrettyPrint + = lens _advPrettyPrint + (\ s a -> s{_advPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +advUserIp :: Lens' AdvertisersList' (Maybe Text) +advUserIp + = lens _advUserIp (\ s a -> s{_advUserIp = a}) + +-- | Select only advertisers which use another advertiser\'s floodlight +-- configuration. +advOnlyParent :: Lens' AdvertisersList' (Maybe Bool) +advOnlyParent + = lens _advOnlyParent + (\ s a -> s{_advOnlyParent = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"advertiser*2015\" will return objects with names like +-- \"advertiser June 2015\", \"advertiser April 2015\", or simply +-- \"advertiser 2015\". Most of the searches also add wildcards implicitly +-- at the start and the end of the search string. For example, a search +-- string of \"advertiser\" will match objects with name \"my advertiser\", +-- \"advertiser 2015\", or simply \"advertiser\". +advSearchString :: Lens' AdvertisersList' (Maybe Text) +advSearchString + = lens _advSearchString + (\ s a -> s{_advSearchString = a}) + +-- | Select only advertisers with these IDs. +advIds :: Lens' AdvertisersList' (Maybe Int64) +advIds = lens _advIds (\ s a -> s{_advIds = a}) + +-- | Select only advertisers which do not belong to any advertiser group. +advIncludeAdvertisersWithoutGroupsOnly :: Lens' AdvertisersList' (Maybe Bool) +advIncludeAdvertisersWithoutGroupsOnly + = lens _advIncludeAdvertisersWithoutGroupsOnly + (\ s a -> + s{_advIncludeAdvertisersWithoutGroupsOnly = a}) + +-- | User profile ID associated with this request. +advProfileId :: Lens' AdvertisersList' Int64 +advProfileId + = lens _advProfileId (\ s a -> s{_advProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +advSortOrder :: Lens' AdvertisersList' (Maybe Text) +advSortOrder + = lens _advSortOrder (\ s a -> s{_advSortOrder = a}) + +-- | Select only advertisers with these advertiser group IDs. +advAdvertiserGroupIds :: Lens' AdvertisersList' (Maybe Int64) +advAdvertiserGroupIds + = lens _advAdvertiserGroupIds + (\ s a -> s{_advAdvertiserGroupIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +advKey :: Lens' AdvertisersList' (Maybe Text) +advKey = lens _advKey (\ s a -> s{_advKey = a}) + +-- | Value of the nextPageToken from the previous result page. +advPageToken :: Lens' AdvertisersList' (Maybe Text) +advPageToken + = lens _advPageToken (\ s a -> s{_advPageToken = a}) + +-- | Field by which to sort the list. +advSortField :: Lens' AdvertisersList' (Maybe Text) +advSortField + = lens _advSortField (\ s a -> s{_advSortField = a}) + +-- | Select only advertisers with these subaccount IDs. +advSubaccountId :: Lens' AdvertisersList' (Maybe Int64) +advSubaccountId + = lens _advSubaccountId + (\ s a -> s{_advSubaccountId = a}) + +-- | OAuth 2.0 token for the current user. +advOauthToken :: Lens' AdvertisersList' (Maybe Text) +advOauthToken + = lens _advOauthToken + (\ s a -> s{_advOauthToken = a}) + +-- | Select only advertisers with these floodlight configuration IDs. +advFloodlightConfigurationIds :: Lens' AdvertisersList' (Maybe Int64) +advFloodlightConfigurationIds + = lens _advFloodlightConfigurationIds + (\ s a -> s{_advFloodlightConfigurationIds = a}) + +-- | Maximum number of results to return. +advMaxResults :: Lens' AdvertisersList' (Maybe Int32) +advMaxResults + = lens _advMaxResults + (\ s a -> s{_advMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +advFields :: Lens' AdvertisersList' (Maybe Text) +advFields + = lens _advFields (\ s a -> s{_advFields = a}) + +-- | Data format for the response. +advAlt :: Lens' AdvertisersList' Text +advAlt = lens _advAlt (\ s a -> s{_advAlt = a}) + +instance GoogleRequest AdvertisersList' where + type Rs AdvertisersList' = AdvertisersListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertisersList{..} + = go _advStatus _advQuotaUser _advPrettyPrint + _advUserIp + _advOnlyParent + _advSearchString + _advIds + _advIncludeAdvertisersWithoutGroupsOnly + _advProfileId + _advSortOrder + _advAdvertiserGroupIds + _advKey + _advPageToken + _advSortField + _advSubaccountId + _advOauthToken + _advFloodlightConfigurationIds + _advMaxResults + _advFields + _advAlt + where go + = clientWithRoute (Proxy :: Proxy AdvertisersListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Patch.hs new file mode 100644 index 000000000..e048b9417 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Patch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Advertisers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing advertiser. This method supports patch semantics. +-- +-- /See:/ for @DfareportingAdvertisersPatch@. +module DFAReporting.Advertisers.Patch + ( + -- * REST Resource + AdvertisersPatchAPI + + -- * Creating a Request + , advertisersPatch + , AdvertisersPatch + + -- * Request Lenses + , appQuotaUser + , appPrettyPrint + , appUserIp + , appProfileId + , appKey + , appId + , appOauthToken + , appFields + , appAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertisersPatch@ which the +-- 'AdvertisersPatch' request conforms to. +type AdvertisersPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertisers" :> + QueryParam "id" Int64 :> Patch '[JSON] Advertiser + +-- | Updates an existing advertiser. This method supports patch semantics. +-- +-- /See:/ 'advertisersPatch' smart constructor. +data AdvertisersPatch = AdvertisersPatch + { _appQuotaUser :: !(Maybe Text) + , _appPrettyPrint :: !Bool + , _appUserIp :: !(Maybe Text) + , _appProfileId :: !Int64 + , _appKey :: !(Maybe Text) + , _appId :: !Int64 + , _appOauthToken :: !(Maybe Text) + , _appFields :: !(Maybe Text) + , _appAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'appQuotaUser' +-- +-- * 'appPrettyPrint' +-- +-- * 'appUserIp' +-- +-- * 'appProfileId' +-- +-- * 'appKey' +-- +-- * 'appId' +-- +-- * 'appOauthToken' +-- +-- * 'appFields' +-- +-- * 'appAlt' +advertisersPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> AdvertisersPatch +advertisersPatch pAppProfileId_ pAppId_ = + AdvertisersPatch + { _appQuotaUser = Nothing + , _appPrettyPrint = True + , _appUserIp = Nothing + , _appProfileId = pAppProfileId_ + , _appKey = Nothing + , _appId = pAppId_ + , _appOauthToken = Nothing + , _appFields = Nothing + , _appAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +appQuotaUser :: Lens' AdvertisersPatch' (Maybe Text) +appQuotaUser + = lens _appQuotaUser (\ s a -> s{_appQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +appPrettyPrint :: Lens' AdvertisersPatch' Bool +appPrettyPrint + = lens _appPrettyPrint + (\ s a -> s{_appPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +appUserIp :: Lens' AdvertisersPatch' (Maybe Text) +appUserIp + = lens _appUserIp (\ s a -> s{_appUserIp = a}) + +-- | User profile ID associated with this request. +appProfileId :: Lens' AdvertisersPatch' Int64 +appProfileId + = lens _appProfileId (\ s a -> s{_appProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +appKey :: Lens' AdvertisersPatch' (Maybe Text) +appKey = lens _appKey (\ s a -> s{_appKey = a}) + +-- | Advertiser ID. +appId :: Lens' AdvertisersPatch' Int64 +appId = lens _appId (\ s a -> s{_appId = a}) + +-- | OAuth 2.0 token for the current user. +appOauthToken :: Lens' AdvertisersPatch' (Maybe Text) +appOauthToken + = lens _appOauthToken + (\ s a -> s{_appOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +appFields :: Lens' AdvertisersPatch' (Maybe Text) +appFields + = lens _appFields (\ s a -> s{_appFields = a}) + +-- | Data format for the response. +appAlt :: Lens' AdvertisersPatch' Text +appAlt = lens _appAlt (\ s a -> s{_appAlt = a}) + +instance GoogleRequest AdvertisersPatch' where + type Rs AdvertisersPatch' = Advertiser + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertisersPatch{..} + = go _appQuotaUser _appPrettyPrint _appUserIp + _appProfileId + _appKey + (Just _appId) + _appOauthToken + _appFields + _appAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertisersPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Update.hs new file mode 100644 index 000000000..320e6fe52 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Advertisers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing advertiser. +-- +-- /See:/ for @DfareportingAdvertisersUpdate@. +module DFAReporting.Advertisers.Update + ( + -- * REST Resource + AdvertisersUpdateAPI + + -- * Creating a Request + , advertisersUpdate + , AdvertisersUpdate + + -- * Request Lenses + , auuQuotaUser + , auuPrettyPrint + , auuUserIp + , auuProfileId + , auuKey + , auuOauthToken + , auuFields + , auuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingAdvertisersUpdate@ which the +-- 'AdvertisersUpdate' request conforms to. +type AdvertisersUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "advertisers" :> Put '[JSON] Advertiser + +-- | Updates an existing advertiser. +-- +-- /See:/ 'advertisersUpdate' smart constructor. +data AdvertisersUpdate = AdvertisersUpdate + { _auuQuotaUser :: !(Maybe Text) + , _auuPrettyPrint :: !Bool + , _auuUserIp :: !(Maybe Text) + , _auuProfileId :: !Int64 + , _auuKey :: !(Maybe Text) + , _auuOauthToken :: !(Maybe Text) + , _auuFields :: !(Maybe Text) + , _auuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auuQuotaUser' +-- +-- * 'auuPrettyPrint' +-- +-- * 'auuUserIp' +-- +-- * 'auuProfileId' +-- +-- * 'auuKey' +-- +-- * 'auuOauthToken' +-- +-- * 'auuFields' +-- +-- * 'auuAlt' +advertisersUpdate + :: Int64 -- ^ 'profileId' + -> AdvertisersUpdate +advertisersUpdate pAuuProfileId_ = + AdvertisersUpdate + { _auuQuotaUser = Nothing + , _auuPrettyPrint = True + , _auuUserIp = Nothing + , _auuProfileId = pAuuProfileId_ + , _auuKey = Nothing + , _auuOauthToken = Nothing + , _auuFields = Nothing + , _auuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auuQuotaUser :: Lens' AdvertisersUpdate' (Maybe Text) +auuQuotaUser + = lens _auuQuotaUser (\ s a -> s{_auuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auuPrettyPrint :: Lens' AdvertisersUpdate' Bool +auuPrettyPrint + = lens _auuPrettyPrint + (\ s a -> s{_auuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auuUserIp :: Lens' AdvertisersUpdate' (Maybe Text) +auuUserIp + = lens _auuUserIp (\ s a -> s{_auuUserIp = a}) + +-- | User profile ID associated with this request. +auuProfileId :: Lens' AdvertisersUpdate' Int64 +auuProfileId + = lens _auuProfileId (\ s a -> s{_auuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auuKey :: Lens' AdvertisersUpdate' (Maybe Text) +auuKey = lens _auuKey (\ s a -> s{_auuKey = a}) + +-- | OAuth 2.0 token for the current user. +auuOauthToken :: Lens' AdvertisersUpdate' (Maybe Text) +auuOauthToken + = lens _auuOauthToken + (\ s a -> s{_auuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auuFields :: Lens' AdvertisersUpdate' (Maybe Text) +auuFields + = lens _auuFields (\ s a -> s{_auuFields = a}) + +-- | Data format for the response. +auuAlt :: Lens' AdvertisersUpdate' Text +auuAlt = lens _auuAlt (\ s a -> s{_auuAlt = a}) + +instance GoogleRequest AdvertisersUpdate' where + type Rs AdvertisersUpdate' = Advertiser + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u AdvertisersUpdate{..} + = go _auuQuotaUser _auuPrettyPrint _auuUserIp + _auuProfileId + _auuKey + _auuOauthToken + _auuFields + _auuAlt + where go + = clientWithRoute + (Proxy :: Proxy AdvertisersUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Browsers/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Browsers/List.hs new file mode 100644 index 000000000..5e879c9e4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Browsers/List.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Browsers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of browsers. +-- +-- /See:/ for @DfareportingBrowsersList@. +module DFAReporting.Browsers.List + ( + -- * REST Resource + BrowsersListAPI + + -- * Creating a Request + , browsersList + , BrowsersList + + -- * Request Lenses + , blQuotaUser + , blPrettyPrint + , blUserIp + , blProfileId + , blKey + , blOauthToken + , blFields + , blAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingBrowsersList@ which the +-- 'BrowsersList' request conforms to. +type BrowsersListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "browsers" :> Get '[JSON] BrowsersListResponse + +-- | Retrieves a list of browsers. +-- +-- /See:/ 'browsersList' smart constructor. +data BrowsersList = BrowsersList + { _blQuotaUser :: !(Maybe Text) + , _blPrettyPrint :: !Bool + , _blUserIp :: !(Maybe Text) + , _blProfileId :: !Int64 + , _blKey :: !(Maybe Text) + , _blOauthToken :: !(Maybe Text) + , _blFields :: !(Maybe Text) + , _blAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BrowsersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blQuotaUser' +-- +-- * 'blPrettyPrint' +-- +-- * 'blUserIp' +-- +-- * 'blProfileId' +-- +-- * 'blKey' +-- +-- * 'blOauthToken' +-- +-- * 'blFields' +-- +-- * 'blAlt' +browsersList + :: Int64 -- ^ 'profileId' + -> BrowsersList +browsersList pBlProfileId_ = + BrowsersList + { _blQuotaUser = Nothing + , _blPrettyPrint = True + , _blUserIp = Nothing + , _blProfileId = pBlProfileId_ + , _blKey = Nothing + , _blOauthToken = Nothing + , _blFields = Nothing + , _blAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +blQuotaUser :: Lens' BrowsersList' (Maybe Text) +blQuotaUser + = lens _blQuotaUser (\ s a -> s{_blQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +blPrettyPrint :: Lens' BrowsersList' Bool +blPrettyPrint + = lens _blPrettyPrint + (\ s a -> s{_blPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +blUserIp :: Lens' BrowsersList' (Maybe Text) +blUserIp = lens _blUserIp (\ s a -> s{_blUserIp = a}) + +-- | User profile ID associated with this request. +blProfileId :: Lens' BrowsersList' Int64 +blProfileId + = lens _blProfileId (\ s a -> s{_blProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +blKey :: Lens' BrowsersList' (Maybe Text) +blKey = lens _blKey (\ s a -> s{_blKey = a}) + +-- | OAuth 2.0 token for the current user. +blOauthToken :: Lens' BrowsersList' (Maybe Text) +blOauthToken + = lens _blOauthToken (\ s a -> s{_blOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +blFields :: Lens' BrowsersList' (Maybe Text) +blFields = lens _blFields (\ s a -> s{_blFields = a}) + +-- | Data format for the response. +blAlt :: Lens' BrowsersList' Text +blAlt = lens _blAlt (\ s a -> s{_blAlt = a}) + +instance GoogleRequest BrowsersList' where + type Rs BrowsersList' = BrowsersListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u BrowsersList{..} + = go _blQuotaUser _blPrettyPrint _blUserIp + _blProfileId + _blKey + _blOauthToken + _blFields + _blAlt + where go + = clientWithRoute (Proxy :: Proxy BrowsersListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/Insert.hs new file mode 100644 index 000000000..a9456fd34 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/Insert.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Associates a creative with the specified campaign. This method creates a +-- default ad with dimensions matching the creative in the campaign if such +-- a default ad does not exist already. +-- +-- /See:/ for @DfareportingCampaignCreativeAssociationsInsert@. +module DFAReporting.CampaignCreativeAssociations.Insert + ( + -- * REST Resource + CampaignCreativeAssociationsInsertAPI + + -- * Creating a Request + , campaignCreativeAssociationsInsert + , CampaignCreativeAssociationsInsert + + -- * Request Lenses + , ccaiQuotaUser + , ccaiPrettyPrint + , ccaiUserIp + , ccaiCampaignId + , ccaiProfileId + , ccaiKey + , ccaiOauthToken + , ccaiFields + , ccaiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignCreativeAssociationsInsert@ which the +-- 'CampaignCreativeAssociationsInsert' request conforms to. +type CampaignCreativeAssociationsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "campaignCreativeAssociations" :> + Post '[JSON] CampaignCreativeAssociation + +-- | Associates a creative with the specified campaign. This method creates a +-- default ad with dimensions matching the creative in the campaign if such +-- a default ad does not exist already. +-- +-- /See:/ 'campaignCreativeAssociationsInsert' smart constructor. +data CampaignCreativeAssociationsInsert = CampaignCreativeAssociationsInsert + { _ccaiQuotaUser :: !(Maybe Text) + , _ccaiPrettyPrint :: !Bool + , _ccaiUserIp :: !(Maybe Text) + , _ccaiCampaignId :: !Int64 + , _ccaiProfileId :: !Int64 + , _ccaiKey :: !(Maybe Text) + , _ccaiOauthToken :: !(Maybe Text) + , _ccaiFields :: !(Maybe Text) + , _ccaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignCreativeAssociationsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccaiQuotaUser' +-- +-- * 'ccaiPrettyPrint' +-- +-- * 'ccaiUserIp' +-- +-- * 'ccaiCampaignId' +-- +-- * 'ccaiProfileId' +-- +-- * 'ccaiKey' +-- +-- * 'ccaiOauthToken' +-- +-- * 'ccaiFields' +-- +-- * 'ccaiAlt' +campaignCreativeAssociationsInsert + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> CampaignCreativeAssociationsInsert +campaignCreativeAssociationsInsert pCcaiCampaignId_ pCcaiProfileId_ = + CampaignCreativeAssociationsInsert + { _ccaiQuotaUser = Nothing + , _ccaiPrettyPrint = True + , _ccaiUserIp = Nothing + , _ccaiCampaignId = pCcaiCampaignId_ + , _ccaiProfileId = pCcaiProfileId_ + , _ccaiKey = Nothing + , _ccaiOauthToken = Nothing + , _ccaiFields = Nothing + , _ccaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccaiQuotaUser :: Lens' CampaignCreativeAssociationsInsert' (Maybe Text) +ccaiQuotaUser + = lens _ccaiQuotaUser + (\ s a -> s{_ccaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccaiPrettyPrint :: Lens' CampaignCreativeAssociationsInsert' Bool +ccaiPrettyPrint + = lens _ccaiPrettyPrint + (\ s a -> s{_ccaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccaiUserIp :: Lens' CampaignCreativeAssociationsInsert' (Maybe Text) +ccaiUserIp + = lens _ccaiUserIp (\ s a -> s{_ccaiUserIp = a}) + +-- | Campaign ID in this association. +ccaiCampaignId :: Lens' CampaignCreativeAssociationsInsert' Int64 +ccaiCampaignId + = lens _ccaiCampaignId + (\ s a -> s{_ccaiCampaignId = a}) + +-- | User profile ID associated with this request. +ccaiProfileId :: Lens' CampaignCreativeAssociationsInsert' Int64 +ccaiProfileId + = lens _ccaiProfileId + (\ s a -> s{_ccaiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccaiKey :: Lens' CampaignCreativeAssociationsInsert' (Maybe Text) +ccaiKey = lens _ccaiKey (\ s a -> s{_ccaiKey = a}) + +-- | OAuth 2.0 token for the current user. +ccaiOauthToken :: Lens' CampaignCreativeAssociationsInsert' (Maybe Text) +ccaiOauthToken + = lens _ccaiOauthToken + (\ s a -> s{_ccaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccaiFields :: Lens' CampaignCreativeAssociationsInsert' (Maybe Text) +ccaiFields + = lens _ccaiFields (\ s a -> s{_ccaiFields = a}) + +-- | Data format for the response. +ccaiAlt :: Lens' CampaignCreativeAssociationsInsert' Text +ccaiAlt = lens _ccaiAlt (\ s a -> s{_ccaiAlt = a}) + +instance GoogleRequest + CampaignCreativeAssociationsInsert' where + type Rs CampaignCreativeAssociationsInsert' = + CampaignCreativeAssociation + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + CampaignCreativeAssociationsInsert{..} + = go _ccaiQuotaUser _ccaiPrettyPrint _ccaiUserIp + _ccaiCampaignId + _ccaiProfileId + _ccaiKey + _ccaiOauthToken + _ccaiFields + _ccaiAlt + where go + = clientWithRoute + (Proxy :: + Proxy CampaignCreativeAssociationsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/List.hs new file mode 100644 index 000000000..eecf236ec --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CampaignCreativeAssociations/List.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of creative IDs associated with the specified +-- campaign. +-- +-- /See:/ for @DfareportingCampaignCreativeAssociationsList@. +module DFAReporting.CampaignCreativeAssociations.List + ( + -- * REST Resource + CampaignCreativeAssociationsListAPI + + -- * Creating a Request + , campaignCreativeAssociationsList + , CampaignCreativeAssociationsList + + -- * Request Lenses + , ccalQuotaUser + , ccalPrettyPrint + , ccalUserIp + , ccalCampaignId + , ccalProfileId + , ccalSortOrder + , ccalKey + , ccalPageToken + , ccalOauthToken + , ccalMaxResults + , ccalFields + , ccalAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignCreativeAssociationsList@ which the +-- 'CampaignCreativeAssociationsList' request conforms to. +type CampaignCreativeAssociationsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "campaignCreativeAssociations" :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CampaignCreativeAssociationsListResponse + +-- | Retrieves the list of creative IDs associated with the specified +-- campaign. +-- +-- /See:/ 'campaignCreativeAssociationsList' smart constructor. +data CampaignCreativeAssociationsList = CampaignCreativeAssociationsList + { _ccalQuotaUser :: !(Maybe Text) + , _ccalPrettyPrint :: !Bool + , _ccalUserIp :: !(Maybe Text) + , _ccalCampaignId :: !Int64 + , _ccalProfileId :: !Int64 + , _ccalSortOrder :: !(Maybe Text) + , _ccalKey :: !(Maybe Text) + , _ccalPageToken :: !(Maybe Text) + , _ccalOauthToken :: !(Maybe Text) + , _ccalMaxResults :: !(Maybe Int32) + , _ccalFields :: !(Maybe Text) + , _ccalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignCreativeAssociationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccalQuotaUser' +-- +-- * 'ccalPrettyPrint' +-- +-- * 'ccalUserIp' +-- +-- * 'ccalCampaignId' +-- +-- * 'ccalProfileId' +-- +-- * 'ccalSortOrder' +-- +-- * 'ccalKey' +-- +-- * 'ccalPageToken' +-- +-- * 'ccalOauthToken' +-- +-- * 'ccalMaxResults' +-- +-- * 'ccalFields' +-- +-- * 'ccalAlt' +campaignCreativeAssociationsList + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> CampaignCreativeAssociationsList +campaignCreativeAssociationsList pCcalCampaignId_ pCcalProfileId_ = + CampaignCreativeAssociationsList + { _ccalQuotaUser = Nothing + , _ccalPrettyPrint = True + , _ccalUserIp = Nothing + , _ccalCampaignId = pCcalCampaignId_ + , _ccalProfileId = pCcalProfileId_ + , _ccalSortOrder = Nothing + , _ccalKey = Nothing + , _ccalPageToken = Nothing + , _ccalOauthToken = Nothing + , _ccalMaxResults = Nothing + , _ccalFields = Nothing + , _ccalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccalQuotaUser :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalQuotaUser + = lens _ccalQuotaUser + (\ s a -> s{_ccalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccalPrettyPrint :: Lens' CampaignCreativeAssociationsList' Bool +ccalPrettyPrint + = lens _ccalPrettyPrint + (\ s a -> s{_ccalPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccalUserIp :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalUserIp + = lens _ccalUserIp (\ s a -> s{_ccalUserIp = a}) + +-- | Campaign ID in this association. +ccalCampaignId :: Lens' CampaignCreativeAssociationsList' Int64 +ccalCampaignId + = lens _ccalCampaignId + (\ s a -> s{_ccalCampaignId = a}) + +-- | User profile ID associated with this request. +ccalProfileId :: Lens' CampaignCreativeAssociationsList' Int64 +ccalProfileId + = lens _ccalProfileId + (\ s a -> s{_ccalProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +ccalSortOrder :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalSortOrder + = lens _ccalSortOrder + (\ s a -> s{_ccalSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccalKey :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalKey = lens _ccalKey (\ s a -> s{_ccalKey = a}) + +-- | Value of the nextPageToken from the previous result page. +ccalPageToken :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalPageToken + = lens _ccalPageToken + (\ s a -> s{_ccalPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ccalOauthToken :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalOauthToken + = lens _ccalOauthToken + (\ s a -> s{_ccalOauthToken = a}) + +-- | Maximum number of results to return. +ccalMaxResults :: Lens' CampaignCreativeAssociationsList' (Maybe Int32) +ccalMaxResults + = lens _ccalMaxResults + (\ s a -> s{_ccalMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ccalFields :: Lens' CampaignCreativeAssociationsList' (Maybe Text) +ccalFields + = lens _ccalFields (\ s a -> s{_ccalFields = a}) + +-- | Data format for the response. +ccalAlt :: Lens' CampaignCreativeAssociationsList' Text +ccalAlt = lens _ccalAlt (\ s a -> s{_ccalAlt = a}) + +instance GoogleRequest + CampaignCreativeAssociationsList' where + type Rs CampaignCreativeAssociationsList' = + CampaignCreativeAssociationsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + CampaignCreativeAssociationsList{..} + = go _ccalQuotaUser _ccalPrettyPrint _ccalUserIp + _ccalCampaignId + _ccalProfileId + _ccalSortOrder + _ccalKey + _ccalPageToken + _ccalOauthToken + _ccalMaxResults + _ccalFields + _ccalAlt + where go + = clientWithRoute + (Proxy :: Proxy CampaignCreativeAssociationsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Get.hs new file mode 100644 index 000000000..d6dbb6000 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Campaigns.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one campaign by ID. +-- +-- /See:/ for @DfareportingCampaignsGet@. +module DFAReporting.Campaigns.Get + ( + -- * REST Resource + CampaignsGetAPI + + -- * Creating a Request + , campaignsGet + , CampaignsGet + + -- * Request Lenses + , camaQuotaUser + , camaPrettyPrint + , camaUserIp + , camaProfileId + , camaKey + , camaId + , camaOauthToken + , camaFields + , camaAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignsGet@ which the +-- 'CampaignsGet' request conforms to. +type CampaignsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "id" Int64 :> Get '[JSON] Campaign + +-- | Gets one campaign by ID. +-- +-- /See:/ 'campaignsGet' smart constructor. +data CampaignsGet = CampaignsGet + { _camaQuotaUser :: !(Maybe Text) + , _camaPrettyPrint :: !Bool + , _camaUserIp :: !(Maybe Text) + , _camaProfileId :: !Int64 + , _camaKey :: !(Maybe Text) + , _camaId :: !Int64 + , _camaOauthToken :: !(Maybe Text) + , _camaFields :: !(Maybe Text) + , _camaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'camaQuotaUser' +-- +-- * 'camaPrettyPrint' +-- +-- * 'camaUserIp' +-- +-- * 'camaProfileId' +-- +-- * 'camaKey' +-- +-- * 'camaId' +-- +-- * 'camaOauthToken' +-- +-- * 'camaFields' +-- +-- * 'camaAlt' +campaignsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CampaignsGet +campaignsGet pCamaProfileId_ pCamaId_ = + CampaignsGet + { _camaQuotaUser = Nothing + , _camaPrettyPrint = True + , _camaUserIp = Nothing + , _camaProfileId = pCamaProfileId_ + , _camaKey = Nothing + , _camaId = pCamaId_ + , _camaOauthToken = Nothing + , _camaFields = Nothing + , _camaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +camaQuotaUser :: Lens' CampaignsGet' (Maybe Text) +camaQuotaUser + = lens _camaQuotaUser + (\ s a -> s{_camaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +camaPrettyPrint :: Lens' CampaignsGet' Bool +camaPrettyPrint + = lens _camaPrettyPrint + (\ s a -> s{_camaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +camaUserIp :: Lens' CampaignsGet' (Maybe Text) +camaUserIp + = lens _camaUserIp (\ s a -> s{_camaUserIp = a}) + +-- | User profile ID associated with this request. +camaProfileId :: Lens' CampaignsGet' Int64 +camaProfileId + = lens _camaProfileId + (\ s a -> s{_camaProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +camaKey :: Lens' CampaignsGet' (Maybe Text) +camaKey = lens _camaKey (\ s a -> s{_camaKey = a}) + +-- | Campaign ID. +camaId :: Lens' CampaignsGet' Int64 +camaId = lens _camaId (\ s a -> s{_camaId = a}) + +-- | OAuth 2.0 token for the current user. +camaOauthToken :: Lens' CampaignsGet' (Maybe Text) +camaOauthToken + = lens _camaOauthToken + (\ s a -> s{_camaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +camaFields :: Lens' CampaignsGet' (Maybe Text) +camaFields + = lens _camaFields (\ s a -> s{_camaFields = a}) + +-- | Data format for the response. +camaAlt :: Lens' CampaignsGet' Text +camaAlt = lens _camaAlt (\ s a -> s{_camaAlt = a}) + +instance GoogleRequest CampaignsGet' where + type Rs CampaignsGet' = Campaign + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CampaignsGet{..} + = go _camaQuotaUser _camaPrettyPrint _camaUserIp + _camaProfileId + _camaKey + _camaId + _camaOauthToken + _camaFields + _camaAlt + where go + = clientWithRoute (Proxy :: Proxy CampaignsGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Insert.hs new file mode 100644 index 000000000..826fed94b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Insert.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Campaigns.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new campaign. +-- +-- /See:/ for @DfareportingCampaignsInsert@. +module DFAReporting.Campaigns.Insert + ( + -- * REST Resource + CampaignsInsertAPI + + -- * Creating a Request + , campaignsInsert + , CampaignsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciProfileId + , ciDefaultLandingPageUrl + , ciKey + , ciDefaultLandingPageName + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignsInsert@ which the +-- 'CampaignsInsert' request conforms to. +type CampaignsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + QueryParam "defaultLandingPageUrl" Text :> + QueryParam "defaultLandingPageName" Text :> + Post '[JSON] Campaign + +-- | Inserts a new campaign. +-- +-- /See:/ 'campaignsInsert' smart constructor. +data CampaignsInsert = CampaignsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciProfileId :: !Int64 + , _ciDefaultLandingPageUrl :: !Text + , _ciKey :: !(Maybe Text) + , _ciDefaultLandingPageName :: !Text + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciProfileId' +-- +-- * 'ciDefaultLandingPageUrl' +-- +-- * 'ciKey' +-- +-- * 'ciDefaultLandingPageName' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +campaignsInsert + :: Int64 -- ^ 'profileId' + -> Text -- ^ 'defaultLandingPageUrl' + -> Text -- ^ 'defaultLandingPageName' + -> CampaignsInsert +campaignsInsert pCiProfileId_ pCiDefaultLandingPageUrl_ pCiDefaultLandingPageName_ = + CampaignsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciProfileId = pCiProfileId_ + , _ciDefaultLandingPageUrl = pCiDefaultLandingPageUrl_ + , _ciKey = Nothing + , _ciDefaultLandingPageName = pCiDefaultLandingPageName_ + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CampaignsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CampaignsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CampaignsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | User profile ID associated with this request. +ciProfileId :: Lens' CampaignsInsert' Int64 +ciProfileId + = lens _ciProfileId (\ s a -> s{_ciProfileId = a}) + +-- | Default landing page URL for this new campaign. +ciDefaultLandingPageUrl :: Lens' CampaignsInsert' Text +ciDefaultLandingPageUrl + = lens _ciDefaultLandingPageUrl + (\ s a -> s{_ciDefaultLandingPageUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CampaignsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | Default landing page name for this new campaign. Must be less than 256 +-- characters long. +ciDefaultLandingPageName :: Lens' CampaignsInsert' Text +ciDefaultLandingPageName + = lens _ciDefaultLandingPageName + (\ s a -> s{_ciDefaultLandingPageName = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CampaignsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CampaignsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CampaignsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CampaignsInsert' where + type Rs CampaignsInsert' = Campaign + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CampaignsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp + _ciProfileId + (Just _ciDefaultLandingPageUrl) + _ciKey + (Just _ciDefaultLandingPageName) + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CampaignsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs new file mode 100644 index 000000000..3242744c6 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs @@ -0,0 +1,322 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Campaigns.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of campaigns, possibly filtered. +-- +-- /See:/ for @DfareportingCampaignsList@. +module DFAReporting.Campaigns.List + ( + -- * REST Resource + CampaignsListAPI + + -- * Creating a Request + , campaignsList + , CampaignsList + + -- * Request Lenses + , cExcludedIds + , cQuotaUser + , cPrettyPrint + , cUserIp + , cSearchString + , cIds + , cProfileId + , cSortOrder + , cAdvertiserGroupIds + , cKey + , cAtLeastOneOptimizationActivity + , cOverriddenEventTagId + , cPageToken + , cSortField + , cSubaccountId + , cOauthToken + , cAdvertiserIds + , cArchived + , cMaxResults + , cFields + , cAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignsList@ which the +-- 'CampaignsList' request conforms to. +type CampaignsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + QueryParams "excludedIds" Int64 :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParams "advertiserGroupIds" Int64 :> + QueryParam "atLeastOneOptimizationActivity" Bool :> + QueryParam "overriddenEventTagId" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "subaccountId" Int64 :> + QueryParams "advertiserIds" Int64 :> + QueryParam "archived" Bool :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CampaignsListResponse + +-- | Retrieves a list of campaigns, possibly filtered. +-- +-- /See:/ 'campaignsList' smart constructor. +data CampaignsList = CampaignsList + { _cExcludedIds :: !(Maybe Int64) + , _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cUserIp :: !(Maybe Text) + , _cSearchString :: !(Maybe Text) + , _cIds :: !(Maybe Int64) + , _cProfileId :: !Int64 + , _cSortOrder :: !(Maybe Text) + , _cAdvertiserGroupIds :: !(Maybe Int64) + , _cKey :: !(Maybe Text) + , _cAtLeastOneOptimizationActivity :: !(Maybe Bool) + , _cOverriddenEventTagId :: !(Maybe Int64) + , _cPageToken :: !(Maybe Text) + , _cSortField :: !(Maybe Text) + , _cSubaccountId :: !(Maybe Int64) + , _cOauthToken :: !(Maybe Text) + , _cAdvertiserIds :: !(Maybe Int64) + , _cArchived :: !(Maybe Bool) + , _cMaxResults :: !(Maybe Int32) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cExcludedIds' +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cUserIp' +-- +-- * 'cSearchString' +-- +-- * 'cIds' +-- +-- * 'cProfileId' +-- +-- * 'cSortOrder' +-- +-- * 'cAdvertiserGroupIds' +-- +-- * 'cKey' +-- +-- * 'cAtLeastOneOptimizationActivity' +-- +-- * 'cOverriddenEventTagId' +-- +-- * 'cPageToken' +-- +-- * 'cSortField' +-- +-- * 'cSubaccountId' +-- +-- * 'cOauthToken' +-- +-- * 'cAdvertiserIds' +-- +-- * 'cArchived' +-- +-- * 'cMaxResults' +-- +-- * 'cFields' +-- +-- * 'cAlt' +campaignsList + :: Int64 -- ^ 'profileId' + -> CampaignsList +campaignsList pCProfileId_ = + CampaignsList + { _cExcludedIds = Nothing + , _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cUserIp = Nothing + , _cSearchString = Nothing + , _cIds = Nothing + , _cProfileId = pCProfileId_ + , _cSortOrder = Nothing + , _cAdvertiserGroupIds = Nothing + , _cKey = Nothing + , _cAtLeastOneOptimizationActivity = Nothing + , _cOverriddenEventTagId = Nothing + , _cPageToken = Nothing + , _cSortField = Nothing + , _cSubaccountId = Nothing + , _cOauthToken = Nothing + , _cAdvertiserIds = Nothing + , _cArchived = Nothing + , _cMaxResults = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Exclude campaigns with these IDs. +cExcludedIds :: Lens' CampaignsList' (Maybe Int64) +cExcludedIds + = lens _cExcludedIds (\ s a -> s{_cExcludedIds = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' CampaignsList' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' CampaignsList' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' CampaignsList' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | Allows searching for campaigns by name or ID. Wildcards (*) are allowed. +-- For example, \"campaign*2015\" will return campaigns with names like +-- \"campaign June 2015\", \"campaign April 2015\", or simply \"campaign +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"campaign\" will match campaigns with name \"my campaign\", \"campaign +-- 2015\", or simply \"campaign\". +cSearchString :: Lens' CampaignsList' (Maybe Text) +cSearchString + = lens _cSearchString + (\ s a -> s{_cSearchString = a}) + +-- | Select only campaigns with these IDs. +cIds :: Lens' CampaignsList' (Maybe Int64) +cIds = lens _cIds (\ s a -> s{_cIds = a}) + +-- | User profile ID associated with this request. +cProfileId :: Lens' CampaignsList' Int64 +cProfileId + = lens _cProfileId (\ s a -> s{_cProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +cSortOrder :: Lens' CampaignsList' (Maybe Text) +cSortOrder + = lens _cSortOrder (\ s a -> s{_cSortOrder = a}) + +-- | Select only campaigns whose advertisers belong to these advertiser +-- groups. +cAdvertiserGroupIds :: Lens' CampaignsList' (Maybe Int64) +cAdvertiserGroupIds + = lens _cAdvertiserGroupIds + (\ s a -> s{_cAdvertiserGroupIds = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' CampaignsList' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | Select only campaigns that have at least one optimization activity. +cAtLeastOneOptimizationActivity :: Lens' CampaignsList' (Maybe Bool) +cAtLeastOneOptimizationActivity + = lens _cAtLeastOneOptimizationActivity + (\ s a -> s{_cAtLeastOneOptimizationActivity = a}) + +-- | Select only campaigns that have overridden this event tag ID. +cOverriddenEventTagId :: Lens' CampaignsList' (Maybe Int64) +cOverriddenEventTagId + = lens _cOverriddenEventTagId + (\ s a -> s{_cOverriddenEventTagId = a}) + +-- | Value of the nextPageToken from the previous result page. +cPageToken :: Lens' CampaignsList' (Maybe Text) +cPageToken + = lens _cPageToken (\ s a -> s{_cPageToken = a}) + +-- | Field by which to sort the list. +cSortField :: Lens' CampaignsList' (Maybe Text) +cSortField + = lens _cSortField (\ s a -> s{_cSortField = a}) + +-- | Select only campaigns that belong to this subaccount. +cSubaccountId :: Lens' CampaignsList' (Maybe Int64) +cSubaccountId + = lens _cSubaccountId + (\ s a -> s{_cSubaccountId = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' CampaignsList' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Select only campaigns that belong to these advertisers. +cAdvertiserIds :: Lens' CampaignsList' (Maybe Int64) +cAdvertiserIds + = lens _cAdvertiserIds + (\ s a -> s{_cAdvertiserIds = a}) + +-- | Select only archived campaigns. Don\'t set this field to select both +-- archived and non-archived campaigns. +cArchived :: Lens' CampaignsList' (Maybe Bool) +cArchived + = lens _cArchived (\ s a -> s{_cArchived = a}) + +-- | Maximum number of results to return. +cMaxResults :: Lens' CampaignsList' (Maybe Int32) +cMaxResults + = lens _cMaxResults (\ s a -> s{_cMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' CampaignsList' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' CampaignsList' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest CampaignsList' where + type Rs CampaignsList' = CampaignsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CampaignsList{..} + = go _cExcludedIds _cQuotaUser _cPrettyPrint _cUserIp + _cSearchString + _cIds + _cProfileId + _cSortOrder + _cAdvertiserGroupIds + _cKey + _cAtLeastOneOptimizationActivity + _cOverriddenEventTagId + _cPageToken + _cSortField + _cSubaccountId + _cOauthToken + _cAdvertiserIds + _cArchived + _cMaxResults + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy CampaignsListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Patch.hs new file mode 100644 index 000000000..c1a3ec7d2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Campaigns.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing campaign. This method supports patch semantics. +-- +-- /See:/ for @DfareportingCampaignsPatch@. +module DFAReporting.Campaigns.Patch + ( + -- * REST Resource + CampaignsPatchAPI + + -- * Creating a Request + , campaignsPatch + , CampaignsPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpProfileId + , cpKey + , cpId + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignsPatch@ which the +-- 'CampaignsPatch' request conforms to. +type CampaignsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + QueryParam "id" Int64 :> Patch '[JSON] Campaign + +-- | Updates an existing campaign. This method supports patch semantics. +-- +-- /See:/ 'campaignsPatch' smart constructor. +data CampaignsPatch = CampaignsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpProfileId :: !Int64 + , _cpKey :: !(Maybe Text) + , _cpId :: !Int64 + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpProfileId' +-- +-- * 'cpKey' +-- +-- * 'cpId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +campaignsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CampaignsPatch +campaignsPatch pCpProfileId_ pCpId_ = + CampaignsPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpProfileId = pCpProfileId_ + , _cpKey = Nothing + , _cpId = pCpId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CampaignsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CampaignsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CampaignsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | User profile ID associated with this request. +cpProfileId :: Lens' CampaignsPatch' Int64 +cpProfileId + = lens _cpProfileId (\ s a -> s{_cpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CampaignsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | Campaign ID. +cpId :: Lens' CampaignsPatch' Int64 +cpId = lens _cpId (\ s a -> s{_cpId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CampaignsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CampaignsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CampaignsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CampaignsPatch' where + type Rs CampaignsPatch' = Campaign + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CampaignsPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp + _cpProfileId + _cpKey + (Just _cpId) + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CampaignsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Update.hs new file mode 100644 index 000000000..cc1a85e2d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Update.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Campaigns.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing campaign. +-- +-- /See:/ for @DfareportingCampaignsUpdate@. +module DFAReporting.Campaigns.Update + ( + -- * REST Resource + CampaignsUpdateAPI + + -- * Creating a Request + , campaignsUpdate + , CampaignsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuProfileId + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCampaignsUpdate@ which the +-- 'CampaignsUpdate' request conforms to. +type CampaignsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> Put '[JSON] Campaign + +-- | Updates an existing campaign. +-- +-- /See:/ 'campaignsUpdate' smart constructor. +data CampaignsUpdate = CampaignsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuProfileId :: !Int64 + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CampaignsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuProfileId' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +campaignsUpdate + :: Int64 -- ^ 'profileId' + -> CampaignsUpdate +campaignsUpdate pCuProfileId_ = + CampaignsUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuProfileId = pCuProfileId_ + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CampaignsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CampaignsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CampaignsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | User profile ID associated with this request. +cuProfileId :: Lens' CampaignsUpdate' Int64 +cuProfileId + = lens _cuProfileId (\ s a -> s{_cuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CampaignsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CampaignsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CampaignsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CampaignsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CampaignsUpdate' where + type Rs CampaignsUpdate' = Campaign + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CampaignsUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp + _cuProfileId + _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CampaignsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/Get.hs new file mode 100644 index 000000000..6d3b6a052 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ChangeLogs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one change log by ID. +-- +-- /See:/ for @DfareportingChangeLogsGet@. +module DFAReporting.ChangeLogs.Get + ( + -- * REST Resource + ChangeLogsGetAPI + + -- * Creating a Request + , changeLogsGet + , ChangeLogsGet + + -- * Request Lenses + , clgQuotaUser + , clgPrettyPrint + , clgUserIp + , clgProfileId + , clgKey + , clgId + , clgOauthToken + , clgFields + , clgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingChangeLogsGet@ which the +-- 'ChangeLogsGet' request conforms to. +type ChangeLogsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "changeLogs" :> + Capture "id" Int64 :> Get '[JSON] ChangeLog + +-- | Gets one change log by ID. +-- +-- /See:/ 'changeLogsGet' smart constructor. +data ChangeLogsGet = ChangeLogsGet + { _clgQuotaUser :: !(Maybe Text) + , _clgPrettyPrint :: !Bool + , _clgUserIp :: !(Maybe Text) + , _clgProfileId :: !Int64 + , _clgKey :: !(Maybe Text) + , _clgId :: !Int64 + , _clgOauthToken :: !(Maybe Text) + , _clgFields :: !(Maybe Text) + , _clgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangeLogsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clgQuotaUser' +-- +-- * 'clgPrettyPrint' +-- +-- * 'clgUserIp' +-- +-- * 'clgProfileId' +-- +-- * 'clgKey' +-- +-- * 'clgId' +-- +-- * 'clgOauthToken' +-- +-- * 'clgFields' +-- +-- * 'clgAlt' +changeLogsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ChangeLogsGet +changeLogsGet pClgProfileId_ pClgId_ = + ChangeLogsGet + { _clgQuotaUser = Nothing + , _clgPrettyPrint = True + , _clgUserIp = Nothing + , _clgProfileId = pClgProfileId_ + , _clgKey = Nothing + , _clgId = pClgId_ + , _clgOauthToken = Nothing + , _clgFields = Nothing + , _clgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clgQuotaUser :: Lens' ChangeLogsGet' (Maybe Text) +clgQuotaUser + = lens _clgQuotaUser (\ s a -> s{_clgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clgPrettyPrint :: Lens' ChangeLogsGet' Bool +clgPrettyPrint + = lens _clgPrettyPrint + (\ s a -> s{_clgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clgUserIp :: Lens' ChangeLogsGet' (Maybe Text) +clgUserIp + = lens _clgUserIp (\ s a -> s{_clgUserIp = a}) + +-- | User profile ID associated with this request. +clgProfileId :: Lens' ChangeLogsGet' Int64 +clgProfileId + = lens _clgProfileId (\ s a -> s{_clgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clgKey :: Lens' ChangeLogsGet' (Maybe Text) +clgKey = lens _clgKey (\ s a -> s{_clgKey = a}) + +-- | Change log ID. +clgId :: Lens' ChangeLogsGet' Int64 +clgId = lens _clgId (\ s a -> s{_clgId = a}) + +-- | OAuth 2.0 token for the current user. +clgOauthToken :: Lens' ChangeLogsGet' (Maybe Text) +clgOauthToken + = lens _clgOauthToken + (\ s a -> s{_clgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clgFields :: Lens' ChangeLogsGet' (Maybe Text) +clgFields + = lens _clgFields (\ s a -> s{_clgFields = a}) + +-- | Data format for the response. +clgAlt :: Lens' ChangeLogsGet' Text +clgAlt = lens _clgAlt (\ s a -> s{_clgAlt = a}) + +instance GoogleRequest ChangeLogsGet' where + type Rs ChangeLogsGet' = ChangeLog + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ChangeLogsGet{..} + = go _clgQuotaUser _clgPrettyPrint _clgUserIp + _clgProfileId + _clgKey + _clgId + _clgOauthToken + _clgFields + _clgAlt + where go + = clientWithRoute (Proxy :: Proxy ChangeLogsGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/List.hs new file mode 100644 index 000000000..54382796e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ChangeLogs/List.hs @@ -0,0 +1,297 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ChangeLogs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of change logs. +-- +-- /See:/ for @DfareportingChangeLogsList@. +module DFAReporting.ChangeLogs.List + ( + -- * REST Resource + ChangeLogsListAPI + + -- * Creating a Request + , changeLogsList + , ChangeLogsList + + -- * Request Lenses + , cllUserProfileIds + , cllQuotaUser + , cllPrettyPrint + , cllObjectType + , cllUserIp + , cllSearchString + , cllIds + , cllProfileId + , cllAction + , cllMinChangeTime + , cllKey + , cllMaxChangeTime + , cllPageToken + , cllOauthToken + , cllObjectIds + , cllMaxResults + , cllFields + , cllAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingChangeLogsList@ which the +-- 'ChangeLogsList' request conforms to. +type ChangeLogsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "changeLogs" :> + QueryParams "userProfileIds" Int64 :> + QueryParam "objectType" Text :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "action" Text :> + QueryParam "minChangeTime" Text :> + QueryParam "maxChangeTime" Text :> + QueryParam "pageToken" Text :> + QueryParams "objectIds" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ChangeLogsListResponse + +-- | Retrieves a list of change logs. +-- +-- /See:/ 'changeLogsList' smart constructor. +data ChangeLogsList = ChangeLogsList + { _cllUserProfileIds :: !(Maybe Int64) + , _cllQuotaUser :: !(Maybe Text) + , _cllPrettyPrint :: !Bool + , _cllObjectType :: !(Maybe Text) + , _cllUserIp :: !(Maybe Text) + , _cllSearchString :: !(Maybe Text) + , _cllIds :: !(Maybe Int64) + , _cllProfileId :: !Int64 + , _cllAction :: !(Maybe Text) + , _cllMinChangeTime :: !(Maybe Text) + , _cllKey :: !(Maybe Text) + , _cllMaxChangeTime :: !(Maybe Text) + , _cllPageToken :: !(Maybe Text) + , _cllOauthToken :: !(Maybe Text) + , _cllObjectIds :: !(Maybe Int64) + , _cllMaxResults :: !(Maybe Int32) + , _cllFields :: !(Maybe Text) + , _cllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangeLogsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllUserProfileIds' +-- +-- * 'cllQuotaUser' +-- +-- * 'cllPrettyPrint' +-- +-- * 'cllObjectType' +-- +-- * 'cllUserIp' +-- +-- * 'cllSearchString' +-- +-- * 'cllIds' +-- +-- * 'cllProfileId' +-- +-- * 'cllAction' +-- +-- * 'cllMinChangeTime' +-- +-- * 'cllKey' +-- +-- * 'cllMaxChangeTime' +-- +-- * 'cllPageToken' +-- +-- * 'cllOauthToken' +-- +-- * 'cllObjectIds' +-- +-- * 'cllMaxResults' +-- +-- * 'cllFields' +-- +-- * 'cllAlt' +changeLogsList + :: Int64 -- ^ 'profileId' + -> ChangeLogsList +changeLogsList pCllProfileId_ = + ChangeLogsList + { _cllUserProfileIds = Nothing + , _cllQuotaUser = Nothing + , _cllPrettyPrint = True + , _cllObjectType = Nothing + , _cllUserIp = Nothing + , _cllSearchString = Nothing + , _cllIds = Nothing + , _cllProfileId = pCllProfileId_ + , _cllAction = Nothing + , _cllMinChangeTime = Nothing + , _cllKey = Nothing + , _cllMaxChangeTime = Nothing + , _cllPageToken = Nothing + , _cllOauthToken = Nothing + , _cllObjectIds = Nothing + , _cllMaxResults = Nothing + , _cllFields = Nothing + , _cllAlt = "json" + } + +-- | Select only change logs with these user profile IDs. +cllUserProfileIds :: Lens' ChangeLogsList' (Maybe Int64) +cllUserProfileIds + = lens _cllUserProfileIds + (\ s a -> s{_cllUserProfileIds = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cllQuotaUser :: Lens' ChangeLogsList' (Maybe Text) +cllQuotaUser + = lens _cllQuotaUser (\ s a -> s{_cllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cllPrettyPrint :: Lens' ChangeLogsList' Bool +cllPrettyPrint + = lens _cllPrettyPrint + (\ s a -> s{_cllPrettyPrint = a}) + +-- | Select only change logs with the specified object type. +cllObjectType :: Lens' ChangeLogsList' (Maybe Text) +cllObjectType + = lens _cllObjectType + (\ s a -> s{_cllObjectType = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cllUserIp :: Lens' ChangeLogsList' (Maybe Text) +cllUserIp + = lens _cllUserIp (\ s a -> s{_cllUserIp = a}) + +-- | Select only change logs whose object ID, user name, old or new values +-- match the search string. +cllSearchString :: Lens' ChangeLogsList' (Maybe Text) +cllSearchString + = lens _cllSearchString + (\ s a -> s{_cllSearchString = a}) + +-- | Select only change logs with these IDs. +cllIds :: Lens' ChangeLogsList' (Maybe Int64) +cllIds = lens _cllIds (\ s a -> s{_cllIds = a}) + +-- | User profile ID associated with this request. +cllProfileId :: Lens' ChangeLogsList' Int64 +cllProfileId + = lens _cllProfileId (\ s a -> s{_cllProfileId = a}) + +-- | Select only change logs with the specified action. +cllAction :: Lens' ChangeLogsList' (Maybe Text) +cllAction + = lens _cllAction (\ s a -> s{_cllAction = a}) + +-- | Select only change logs whose change time is before the specified +-- minChangeTime.The time should be formatted as an RFC3339 date\/time +-- string. For example, for 10:54 PM on July 18th, 2015, in the +-- America\/New York time zone, the format is +-- \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the +-- letter T, the hour (24-hour clock system), minute, second, and then the +-- time zone offset. +cllMinChangeTime :: Lens' ChangeLogsList' (Maybe Text) +cllMinChangeTime + = lens _cllMinChangeTime + (\ s a -> s{_cllMinChangeTime = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cllKey :: Lens' ChangeLogsList' (Maybe Text) +cllKey = lens _cllKey (\ s a -> s{_cllKey = a}) + +-- | Select only change logs whose change time is before the specified +-- maxChangeTime.The time should be formatted as an RFC3339 date\/time +-- string. For example, for 10:54 PM on July 18th, 2015, in the +-- America\/New York time zone, the format is +-- \"2015-07-18T22:54:00-04:00\". In other words, the year, month, day, the +-- letter T, the hour (24-hour clock system), minute, second, and then the +-- time zone offset. +cllMaxChangeTime :: Lens' ChangeLogsList' (Maybe Text) +cllMaxChangeTime + = lens _cllMaxChangeTime + (\ s a -> s{_cllMaxChangeTime = a}) + +-- | Value of the nextPageToken from the previous result page. +cllPageToken :: Lens' ChangeLogsList' (Maybe Text) +cllPageToken + = lens _cllPageToken (\ s a -> s{_cllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cllOauthToken :: Lens' ChangeLogsList' (Maybe Text) +cllOauthToken + = lens _cllOauthToken + (\ s a -> s{_cllOauthToken = a}) + +-- | Select only change logs with these object IDs. +cllObjectIds :: Lens' ChangeLogsList' (Maybe Int64) +cllObjectIds + = lens _cllObjectIds (\ s a -> s{_cllObjectIds = a}) + +-- | Maximum number of results to return. +cllMaxResults :: Lens' ChangeLogsList' (Maybe Int32) +cllMaxResults + = lens _cllMaxResults + (\ s a -> s{_cllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cllFields :: Lens' ChangeLogsList' (Maybe Text) +cllFields + = lens _cllFields (\ s a -> s{_cllFields = a}) + +-- | Data format for the response. +cllAlt :: Lens' ChangeLogsList' Text +cllAlt = lens _cllAlt (\ s a -> s{_cllAlt = a}) + +instance GoogleRequest ChangeLogsList' where + type Rs ChangeLogsList' = ChangeLogsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ChangeLogsList{..} + = go _cllUserProfileIds _cllQuotaUser _cllPrettyPrint + _cllObjectType + _cllUserIp + _cllSearchString + _cllIds + _cllProfileId + _cllAction + _cllMinChangeTime + _cllKey + _cllMaxChangeTime + _cllPageToken + _cllOauthToken + _cllObjectIds + _cllMaxResults + _cllFields + _cllAlt + where go + = clientWithRoute (Proxy :: Proxy ChangeLogsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs new file mode 100644 index 000000000..fbd64471f --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Cities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of cities, possibly filtered. +-- +-- /See:/ for @DfareportingCitiesList@. +module DFAReporting.Cities.List + ( + -- * REST Resource + CitiesListAPI + + -- * Creating a Request + , citiesList + , CitiesList + + -- * Request Lenses + , citQuotaUser + , citPrettyPrint + , citRegionDartIds + , citUserIp + , citProfileId + , citNamePrefix + , citKey + , citCountryDartIds + , citDartIds + , citOauthToken + , citFields + , citAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCitiesList@ which the +-- 'CitiesList' request conforms to. +type CitiesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "cities" :> + QueryParams "regionDartIds" Int64 :> + QueryParam "namePrefix" Text :> + QueryParams "countryDartIds" Int64 :> + QueryParams "dartIds" Int64 :> + Get '[JSON] CitiesListResponse + +-- | Retrieves a list of cities, possibly filtered. +-- +-- /See:/ 'citiesList' smart constructor. +data CitiesList = CitiesList + { _citQuotaUser :: !(Maybe Text) + , _citPrettyPrint :: !Bool + , _citRegionDartIds :: !(Maybe Int64) + , _citUserIp :: !(Maybe Text) + , _citProfileId :: !Int64 + , _citNamePrefix :: !(Maybe Text) + , _citKey :: !(Maybe Text) + , _citCountryDartIds :: !(Maybe Int64) + , _citDartIds :: !(Maybe Int64) + , _citOauthToken :: !(Maybe Text) + , _citFields :: !(Maybe Text) + , _citAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'citQuotaUser' +-- +-- * 'citPrettyPrint' +-- +-- * 'citRegionDartIds' +-- +-- * 'citUserIp' +-- +-- * 'citProfileId' +-- +-- * 'citNamePrefix' +-- +-- * 'citKey' +-- +-- * 'citCountryDartIds' +-- +-- * 'citDartIds' +-- +-- * 'citOauthToken' +-- +-- * 'citFields' +-- +-- * 'citAlt' +citiesList + :: Int64 -- ^ 'profileId' + -> CitiesList +citiesList pCitProfileId_ = + CitiesList + { _citQuotaUser = Nothing + , _citPrettyPrint = True + , _citRegionDartIds = Nothing + , _citUserIp = Nothing + , _citProfileId = pCitProfileId_ + , _citNamePrefix = Nothing + , _citKey = Nothing + , _citCountryDartIds = Nothing + , _citDartIds = Nothing + , _citOauthToken = Nothing + , _citFields = Nothing + , _citAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +citQuotaUser :: Lens' CitiesList' (Maybe Text) +citQuotaUser + = lens _citQuotaUser (\ s a -> s{_citQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +citPrettyPrint :: Lens' CitiesList' Bool +citPrettyPrint + = lens _citPrettyPrint + (\ s a -> s{_citPrettyPrint = a}) + +-- | Select only cities from these regions. +citRegionDartIds :: Lens' CitiesList' (Maybe Int64) +citRegionDartIds + = lens _citRegionDartIds + (\ s a -> s{_citRegionDartIds = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +citUserIp :: Lens' CitiesList' (Maybe Text) +citUserIp + = lens _citUserIp (\ s a -> s{_citUserIp = a}) + +-- | User profile ID associated with this request. +citProfileId :: Lens' CitiesList' Int64 +citProfileId + = lens _citProfileId (\ s a -> s{_citProfileId = a}) + +-- | Select only cities with names starting with this prefix. +citNamePrefix :: Lens' CitiesList' (Maybe Text) +citNamePrefix + = lens _citNamePrefix + (\ s a -> s{_citNamePrefix = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +citKey :: Lens' CitiesList' (Maybe Text) +citKey = lens _citKey (\ s a -> s{_citKey = a}) + +-- | Select only cities from these countries. +citCountryDartIds :: Lens' CitiesList' (Maybe Int64) +citCountryDartIds + = lens _citCountryDartIds + (\ s a -> s{_citCountryDartIds = a}) + +-- | Select only cities with these DART IDs. +citDartIds :: Lens' CitiesList' (Maybe Int64) +citDartIds + = lens _citDartIds (\ s a -> s{_citDartIds = a}) + +-- | OAuth 2.0 token for the current user. +citOauthToken :: Lens' CitiesList' (Maybe Text) +citOauthToken + = lens _citOauthToken + (\ s a -> s{_citOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +citFields :: Lens' CitiesList' (Maybe Text) +citFields + = lens _citFields (\ s a -> s{_citFields = a}) + +-- | Data format for the response. +citAlt :: Lens' CitiesList' Text +citAlt = lens _citAlt (\ s a -> s{_citAlt = a}) + +instance GoogleRequest CitiesList' where + type Rs CitiesList' = CitiesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CitiesList{..} + = go _citQuotaUser _citPrettyPrint _citRegionDartIds + _citUserIp + _citProfileId + _citNamePrefix + _citKey + _citCountryDartIds + _citDartIds + _citOauthToken + _citFields + _citAlt + where go + = clientWithRoute (Proxy :: Proxy CitiesListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/Get.hs new file mode 100644 index 000000000..ea6a8b51c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ConnectionTypes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one connection type by ID. +-- +-- /See:/ for @DfareportingConnectionTypesGet@. +module DFAReporting.ConnectionTypes.Get + ( + -- * REST Resource + ConnectionTypesGetAPI + + -- * Creating a Request + , connectionTypesGet + , ConnectionTypesGet + + -- * Request Lenses + , ctgQuotaUser + , ctgPrettyPrint + , ctgUserIp + , ctgProfileId + , ctgKey + , ctgId + , ctgOauthToken + , ctgFields + , ctgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingConnectionTypesGet@ which the +-- 'ConnectionTypesGet' request conforms to. +type ConnectionTypesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "connectionTypes" :> + Capture "id" Int64 :> Get '[JSON] ConnectionType + +-- | Gets one connection type by ID. +-- +-- /See:/ 'connectionTypesGet' smart constructor. +data ConnectionTypesGet = ConnectionTypesGet + { _ctgQuotaUser :: !(Maybe Text) + , _ctgPrettyPrint :: !Bool + , _ctgUserIp :: !(Maybe Text) + , _ctgProfileId :: !Int64 + , _ctgKey :: !(Maybe Text) + , _ctgId :: !Int64 + , _ctgOauthToken :: !(Maybe Text) + , _ctgFields :: !(Maybe Text) + , _ctgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConnectionTypesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctgQuotaUser' +-- +-- * 'ctgPrettyPrint' +-- +-- * 'ctgUserIp' +-- +-- * 'ctgProfileId' +-- +-- * 'ctgKey' +-- +-- * 'ctgId' +-- +-- * 'ctgOauthToken' +-- +-- * 'ctgFields' +-- +-- * 'ctgAlt' +connectionTypesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ConnectionTypesGet +connectionTypesGet pCtgProfileId_ pCtgId_ = + ConnectionTypesGet + { _ctgQuotaUser = Nothing + , _ctgPrettyPrint = True + , _ctgUserIp = Nothing + , _ctgProfileId = pCtgProfileId_ + , _ctgKey = Nothing + , _ctgId = pCtgId_ + , _ctgOauthToken = Nothing + , _ctgFields = Nothing + , _ctgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ctgQuotaUser :: Lens' ConnectionTypesGet' (Maybe Text) +ctgQuotaUser + = lens _ctgQuotaUser (\ s a -> s{_ctgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctgPrettyPrint :: Lens' ConnectionTypesGet' Bool +ctgPrettyPrint + = lens _ctgPrettyPrint + (\ s a -> s{_ctgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ctgUserIp :: Lens' ConnectionTypesGet' (Maybe Text) +ctgUserIp + = lens _ctgUserIp (\ s a -> s{_ctgUserIp = a}) + +-- | User profile ID associated with this request. +ctgProfileId :: Lens' ConnectionTypesGet' Int64 +ctgProfileId + = lens _ctgProfileId (\ s a -> s{_ctgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctgKey :: Lens' ConnectionTypesGet' (Maybe Text) +ctgKey = lens _ctgKey (\ s a -> s{_ctgKey = a}) + +-- | Connection type ID. +ctgId :: Lens' ConnectionTypesGet' Int64 +ctgId = lens _ctgId (\ s a -> s{_ctgId = a}) + +-- | OAuth 2.0 token for the current user. +ctgOauthToken :: Lens' ConnectionTypesGet' (Maybe Text) +ctgOauthToken + = lens _ctgOauthToken + (\ s a -> s{_ctgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctgFields :: Lens' ConnectionTypesGet' (Maybe Text) +ctgFields + = lens _ctgFields (\ s a -> s{_ctgFields = a}) + +-- | Data format for the response. +ctgAlt :: Lens' ConnectionTypesGet' Text +ctgAlt = lens _ctgAlt (\ s a -> s{_ctgAlt = a}) + +instance GoogleRequest ConnectionTypesGet' where + type Rs ConnectionTypesGet' = ConnectionType + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ConnectionTypesGet{..} + = go _ctgQuotaUser _ctgPrettyPrint _ctgUserIp + _ctgProfileId + _ctgKey + _ctgId + _ctgOauthToken + _ctgFields + _ctgAlt + where go + = clientWithRoute + (Proxy :: Proxy ConnectionTypesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/List.hs new file mode 100644 index 000000000..a35a4740e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ConnectionTypes/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ConnectionTypes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of connection types. +-- +-- /See:/ for @DfareportingConnectionTypesList@. +module DFAReporting.ConnectionTypes.List + ( + -- * REST Resource + ConnectionTypesListAPI + + -- * Creating a Request + , connectionTypesList + , ConnectionTypesList + + -- * Request Lenses + , ctlQuotaUser + , ctlPrettyPrint + , ctlUserIp + , ctlProfileId + , ctlKey + , ctlOauthToken + , ctlFields + , ctlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingConnectionTypesList@ which the +-- 'ConnectionTypesList' request conforms to. +type ConnectionTypesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "connectionTypes" :> + Get '[JSON] ConnectionTypesListResponse + +-- | Retrieves a list of connection types. +-- +-- /See:/ 'connectionTypesList' smart constructor. +data ConnectionTypesList = ConnectionTypesList + { _ctlQuotaUser :: !(Maybe Text) + , _ctlPrettyPrint :: !Bool + , _ctlUserIp :: !(Maybe Text) + , _ctlProfileId :: !Int64 + , _ctlKey :: !(Maybe Text) + , _ctlOauthToken :: !(Maybe Text) + , _ctlFields :: !(Maybe Text) + , _ctlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConnectionTypesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctlQuotaUser' +-- +-- * 'ctlPrettyPrint' +-- +-- * 'ctlUserIp' +-- +-- * 'ctlProfileId' +-- +-- * 'ctlKey' +-- +-- * 'ctlOauthToken' +-- +-- * 'ctlFields' +-- +-- * 'ctlAlt' +connectionTypesList + :: Int64 -- ^ 'profileId' + -> ConnectionTypesList +connectionTypesList pCtlProfileId_ = + ConnectionTypesList + { _ctlQuotaUser = Nothing + , _ctlPrettyPrint = True + , _ctlUserIp = Nothing + , _ctlProfileId = pCtlProfileId_ + , _ctlKey = Nothing + , _ctlOauthToken = Nothing + , _ctlFields = Nothing + , _ctlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ctlQuotaUser :: Lens' ConnectionTypesList' (Maybe Text) +ctlQuotaUser + = lens _ctlQuotaUser (\ s a -> s{_ctlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ctlPrettyPrint :: Lens' ConnectionTypesList' Bool +ctlPrettyPrint + = lens _ctlPrettyPrint + (\ s a -> s{_ctlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ctlUserIp :: Lens' ConnectionTypesList' (Maybe Text) +ctlUserIp + = lens _ctlUserIp (\ s a -> s{_ctlUserIp = a}) + +-- | User profile ID associated with this request. +ctlProfileId :: Lens' ConnectionTypesList' Int64 +ctlProfileId + = lens _ctlProfileId (\ s a -> s{_ctlProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctlKey :: Lens' ConnectionTypesList' (Maybe Text) +ctlKey = lens _ctlKey (\ s a -> s{_ctlKey = a}) + +-- | OAuth 2.0 token for the current user. +ctlOauthToken :: Lens' ConnectionTypesList' (Maybe Text) +ctlOauthToken + = lens _ctlOauthToken + (\ s a -> s{_ctlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctlFields :: Lens' ConnectionTypesList' (Maybe Text) +ctlFields + = lens _ctlFields (\ s a -> s{_ctlFields = a}) + +-- | Data format for the response. +ctlAlt :: Lens' ConnectionTypesList' Text +ctlAlt = lens _ctlAlt (\ s a -> s{_ctlAlt = a}) + +instance GoogleRequest ConnectionTypesList' where + type Rs ConnectionTypesList' = + ConnectionTypesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ConnectionTypesList{..} + = go _ctlQuotaUser _ctlPrettyPrint _ctlUserIp + _ctlProfileId + _ctlKey + _ctlOauthToken + _ctlFields + _ctlAlt + where go + = clientWithRoute + (Proxy :: Proxy ConnectionTypesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Delete.hs new file mode 100644 index 000000000..bf7f20865 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing content category. +-- +-- /See:/ for @DfareportingContentCategoriesDelete@. +module DFAReporting.ContentCategories.Delete + ( + -- * REST Resource + ContentCategoriesDeleteAPI + + -- * Creating a Request + , contentCategoriesDelete + , ContentCategoriesDelete + + -- * Request Lenses + , ccdQuotaUser + , ccdPrettyPrint + , ccdUserIp + , ccdProfileId + , ccdKey + , ccdId + , ccdOauthToken + , ccdFields + , ccdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesDelete@ which the +-- 'ContentCategoriesDelete' request conforms to. +type ContentCategoriesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing content category. +-- +-- /See:/ 'contentCategoriesDelete' smart constructor. +data ContentCategoriesDelete = ContentCategoriesDelete + { _ccdQuotaUser :: !(Maybe Text) + , _ccdPrettyPrint :: !Bool + , _ccdUserIp :: !(Maybe Text) + , _ccdProfileId :: !Int64 + , _ccdKey :: !(Maybe Text) + , _ccdId :: !Int64 + , _ccdOauthToken :: !(Maybe Text) + , _ccdFields :: !(Maybe Text) + , _ccdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccdQuotaUser' +-- +-- * 'ccdPrettyPrint' +-- +-- * 'ccdUserIp' +-- +-- * 'ccdProfileId' +-- +-- * 'ccdKey' +-- +-- * 'ccdId' +-- +-- * 'ccdOauthToken' +-- +-- * 'ccdFields' +-- +-- * 'ccdAlt' +contentCategoriesDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ContentCategoriesDelete +contentCategoriesDelete pCcdProfileId_ pCcdId_ = + ContentCategoriesDelete + { _ccdQuotaUser = Nothing + , _ccdPrettyPrint = True + , _ccdUserIp = Nothing + , _ccdProfileId = pCcdProfileId_ + , _ccdKey = Nothing + , _ccdId = pCcdId_ + , _ccdOauthToken = Nothing + , _ccdFields = Nothing + , _ccdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccdQuotaUser :: Lens' ContentCategoriesDelete' (Maybe Text) +ccdQuotaUser + = lens _ccdQuotaUser (\ s a -> s{_ccdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccdPrettyPrint :: Lens' ContentCategoriesDelete' Bool +ccdPrettyPrint + = lens _ccdPrettyPrint + (\ s a -> s{_ccdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccdUserIp :: Lens' ContentCategoriesDelete' (Maybe Text) +ccdUserIp + = lens _ccdUserIp (\ s a -> s{_ccdUserIp = a}) + +-- | User profile ID associated with this request. +ccdProfileId :: Lens' ContentCategoriesDelete' Int64 +ccdProfileId + = lens _ccdProfileId (\ s a -> s{_ccdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccdKey :: Lens' ContentCategoriesDelete' (Maybe Text) +ccdKey = lens _ccdKey (\ s a -> s{_ccdKey = a}) + +-- | Content category ID. +ccdId :: Lens' ContentCategoriesDelete' Int64 +ccdId = lens _ccdId (\ s a -> s{_ccdId = a}) + +-- | OAuth 2.0 token for the current user. +ccdOauthToken :: Lens' ContentCategoriesDelete' (Maybe Text) +ccdOauthToken + = lens _ccdOauthToken + (\ s a -> s{_ccdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccdFields :: Lens' ContentCategoriesDelete' (Maybe Text) +ccdFields + = lens _ccdFields (\ s a -> s{_ccdFields = a}) + +-- | Data format for the response. +ccdAlt :: Lens' ContentCategoriesDelete' Text +ccdAlt = lens _ccdAlt (\ s a -> s{_ccdAlt = a}) + +instance GoogleRequest ContentCategoriesDelete' where + type Rs ContentCategoriesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesDelete{..} + = go _ccdQuotaUser _ccdPrettyPrint _ccdUserIp + _ccdProfileId + _ccdKey + _ccdId + _ccdOauthToken + _ccdFields + _ccdAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Get.hs new file mode 100644 index 000000000..eedb7dcef --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one content category by ID. +-- +-- /See:/ for @DfareportingContentCategoriesGet@. +module DFAReporting.ContentCategories.Get + ( + -- * REST Resource + ContentCategoriesGetAPI + + -- * Creating a Request + , contentCategoriesGet + , ContentCategoriesGet + + -- * Request Lenses + , ccgQuotaUser + , ccgPrettyPrint + , ccgUserIp + , ccgProfileId + , ccgKey + , ccgId + , ccgOauthToken + , ccgFields + , ccgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesGet@ which the +-- 'ContentCategoriesGet' request conforms to. +type ContentCategoriesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> + Capture "id" Int64 :> Get '[JSON] ContentCategory + +-- | Gets one content category by ID. +-- +-- /See:/ 'contentCategoriesGet' smart constructor. +data ContentCategoriesGet = ContentCategoriesGet + { _ccgQuotaUser :: !(Maybe Text) + , _ccgPrettyPrint :: !Bool + , _ccgUserIp :: !(Maybe Text) + , _ccgProfileId :: !Int64 + , _ccgKey :: !(Maybe Text) + , _ccgId :: !Int64 + , _ccgOauthToken :: !(Maybe Text) + , _ccgFields :: !(Maybe Text) + , _ccgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccgQuotaUser' +-- +-- * 'ccgPrettyPrint' +-- +-- * 'ccgUserIp' +-- +-- * 'ccgProfileId' +-- +-- * 'ccgKey' +-- +-- * 'ccgId' +-- +-- * 'ccgOauthToken' +-- +-- * 'ccgFields' +-- +-- * 'ccgAlt' +contentCategoriesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ContentCategoriesGet +contentCategoriesGet pCcgProfileId_ pCcgId_ = + ContentCategoriesGet + { _ccgQuotaUser = Nothing + , _ccgPrettyPrint = True + , _ccgUserIp = Nothing + , _ccgProfileId = pCcgProfileId_ + , _ccgKey = Nothing + , _ccgId = pCcgId_ + , _ccgOauthToken = Nothing + , _ccgFields = Nothing + , _ccgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccgQuotaUser :: Lens' ContentCategoriesGet' (Maybe Text) +ccgQuotaUser + = lens _ccgQuotaUser (\ s a -> s{_ccgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccgPrettyPrint :: Lens' ContentCategoriesGet' Bool +ccgPrettyPrint + = lens _ccgPrettyPrint + (\ s a -> s{_ccgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccgUserIp :: Lens' ContentCategoriesGet' (Maybe Text) +ccgUserIp + = lens _ccgUserIp (\ s a -> s{_ccgUserIp = a}) + +-- | User profile ID associated with this request. +ccgProfileId :: Lens' ContentCategoriesGet' Int64 +ccgProfileId + = lens _ccgProfileId (\ s a -> s{_ccgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccgKey :: Lens' ContentCategoriesGet' (Maybe Text) +ccgKey = lens _ccgKey (\ s a -> s{_ccgKey = a}) + +-- | Content category ID. +ccgId :: Lens' ContentCategoriesGet' Int64 +ccgId = lens _ccgId (\ s a -> s{_ccgId = a}) + +-- | OAuth 2.0 token for the current user. +ccgOauthToken :: Lens' ContentCategoriesGet' (Maybe Text) +ccgOauthToken + = lens _ccgOauthToken + (\ s a -> s{_ccgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccgFields :: Lens' ContentCategoriesGet' (Maybe Text) +ccgFields + = lens _ccgFields (\ s a -> s{_ccgFields = a}) + +-- | Data format for the response. +ccgAlt :: Lens' ContentCategoriesGet' Text +ccgAlt = lens _ccgAlt (\ s a -> s{_ccgAlt = a}) + +instance GoogleRequest ContentCategoriesGet' where + type Rs ContentCategoriesGet' = ContentCategory + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesGet{..} + = go _ccgQuotaUser _ccgPrettyPrint _ccgUserIp + _ccgProfileId + _ccgKey + _ccgId + _ccgOauthToken + _ccgFields + _ccgAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Insert.hs new file mode 100644 index 000000000..6f9001d3b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new content category. +-- +-- /See:/ for @DfareportingContentCategoriesInsert@. +module DFAReporting.ContentCategories.Insert + ( + -- * REST Resource + ContentCategoriesInsertAPI + + -- * Creating a Request + , contentCategoriesInsert + , ContentCategoriesInsert + + -- * Request Lenses + , cciQuotaUser + , cciPrettyPrint + , cciUserIp + , cciProfileId + , cciKey + , cciOauthToken + , cciFields + , cciAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesInsert@ which the +-- 'ContentCategoriesInsert' request conforms to. +type ContentCategoriesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> Post '[JSON] ContentCategory + +-- | Inserts a new content category. +-- +-- /See:/ 'contentCategoriesInsert' smart constructor. +data ContentCategoriesInsert = ContentCategoriesInsert + { _cciQuotaUser :: !(Maybe Text) + , _cciPrettyPrint :: !Bool + , _cciUserIp :: !(Maybe Text) + , _cciProfileId :: !Int64 + , _cciKey :: !(Maybe Text) + , _cciOauthToken :: !(Maybe Text) + , _cciFields :: !(Maybe Text) + , _cciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cciQuotaUser' +-- +-- * 'cciPrettyPrint' +-- +-- * 'cciUserIp' +-- +-- * 'cciProfileId' +-- +-- * 'cciKey' +-- +-- * 'cciOauthToken' +-- +-- * 'cciFields' +-- +-- * 'cciAlt' +contentCategoriesInsert + :: Int64 -- ^ 'profileId' + -> ContentCategoriesInsert +contentCategoriesInsert pCciProfileId_ = + ContentCategoriesInsert + { _cciQuotaUser = Nothing + , _cciPrettyPrint = True + , _cciUserIp = Nothing + , _cciProfileId = pCciProfileId_ + , _cciKey = Nothing + , _cciOauthToken = Nothing + , _cciFields = Nothing + , _cciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cciQuotaUser :: Lens' ContentCategoriesInsert' (Maybe Text) +cciQuotaUser + = lens _cciQuotaUser (\ s a -> s{_cciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cciPrettyPrint :: Lens' ContentCategoriesInsert' Bool +cciPrettyPrint + = lens _cciPrettyPrint + (\ s a -> s{_cciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cciUserIp :: Lens' ContentCategoriesInsert' (Maybe Text) +cciUserIp + = lens _cciUserIp (\ s a -> s{_cciUserIp = a}) + +-- | User profile ID associated with this request. +cciProfileId :: Lens' ContentCategoriesInsert' Int64 +cciProfileId + = lens _cciProfileId (\ s a -> s{_cciProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cciKey :: Lens' ContentCategoriesInsert' (Maybe Text) +cciKey = lens _cciKey (\ s a -> s{_cciKey = a}) + +-- | OAuth 2.0 token for the current user. +cciOauthToken :: Lens' ContentCategoriesInsert' (Maybe Text) +cciOauthToken + = lens _cciOauthToken + (\ s a -> s{_cciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cciFields :: Lens' ContentCategoriesInsert' (Maybe Text) +cciFields + = lens _cciFields (\ s a -> s{_cciFields = a}) + +-- | Data format for the response. +cciAlt :: Lens' ContentCategoriesInsert' Text +cciAlt = lens _cciAlt (\ s a -> s{_cciAlt = a}) + +instance GoogleRequest ContentCategoriesInsert' where + type Rs ContentCategoriesInsert' = ContentCategory + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesInsert{..} + = go _cciQuotaUser _cciPrettyPrint _cciUserIp + _cciProfileId + _cciKey + _cciOauthToken + _cciFields + _cciAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/List.hs new file mode 100644 index 000000000..82bb14ca2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/List.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of content categories, possibly filtered. +-- +-- /See:/ for @DfareportingContentCategoriesList@. +module DFAReporting.ContentCategories.List + ( + -- * REST Resource + ContentCategoriesListAPI + + -- * Creating a Request + , contentCategoriesList + , ContentCategoriesList + + -- * Request Lenses + , cclQuotaUser + , cclPrettyPrint + , cclUserIp + , cclSearchString + , cclIds + , cclProfileId + , cclSortOrder + , cclKey + , cclPageToken + , cclSortField + , cclOauthToken + , cclMaxResults + , cclFields + , cclAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesList@ which the +-- 'ContentCategoriesList' request conforms to. +type ContentCategoriesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ContentCategoriesListResponse + +-- | Retrieves a list of content categories, possibly filtered. +-- +-- /See:/ 'contentCategoriesList' smart constructor. +data ContentCategoriesList = ContentCategoriesList + { _cclQuotaUser :: !(Maybe Text) + , _cclPrettyPrint :: !Bool + , _cclUserIp :: !(Maybe Text) + , _cclSearchString :: !(Maybe Text) + , _cclIds :: !(Maybe Int64) + , _cclProfileId :: !Int64 + , _cclSortOrder :: !(Maybe Text) + , _cclKey :: !(Maybe Text) + , _cclPageToken :: !(Maybe Text) + , _cclSortField :: !(Maybe Text) + , _cclOauthToken :: !(Maybe Text) + , _cclMaxResults :: !(Maybe Int32) + , _cclFields :: !(Maybe Text) + , _cclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cclQuotaUser' +-- +-- * 'cclPrettyPrint' +-- +-- * 'cclUserIp' +-- +-- * 'cclSearchString' +-- +-- * 'cclIds' +-- +-- * 'cclProfileId' +-- +-- * 'cclSortOrder' +-- +-- * 'cclKey' +-- +-- * 'cclPageToken' +-- +-- * 'cclSortField' +-- +-- * 'cclOauthToken' +-- +-- * 'cclMaxResults' +-- +-- * 'cclFields' +-- +-- * 'cclAlt' +contentCategoriesList + :: Int64 -- ^ 'profileId' + -> ContentCategoriesList +contentCategoriesList pCclProfileId_ = + ContentCategoriesList + { _cclQuotaUser = Nothing + , _cclPrettyPrint = True + , _cclUserIp = Nothing + , _cclSearchString = Nothing + , _cclIds = Nothing + , _cclProfileId = pCclProfileId_ + , _cclSortOrder = Nothing + , _cclKey = Nothing + , _cclPageToken = Nothing + , _cclSortField = Nothing + , _cclOauthToken = Nothing + , _cclMaxResults = Nothing + , _cclFields = Nothing + , _cclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cclQuotaUser :: Lens' ContentCategoriesList' (Maybe Text) +cclQuotaUser + = lens _cclQuotaUser (\ s a -> s{_cclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cclPrettyPrint :: Lens' ContentCategoriesList' Bool +cclPrettyPrint + = lens _cclPrettyPrint + (\ s a -> s{_cclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cclUserIp :: Lens' ContentCategoriesList' (Maybe Text) +cclUserIp + = lens _cclUserIp (\ s a -> s{_cclUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"contentcategory*2015\" will return objects with names +-- like \"contentcategory June 2015\", \"contentcategory April 2015\", or +-- simply \"contentcategory 2015\". Most of the searches also add wildcards +-- implicitly at the start and the end of the search string. For example, a +-- search string of \"contentcategory\" will match objects with name \"my +-- contentcategory\", \"contentcategory 2015\", or simply +-- \"contentcategory\". +cclSearchString :: Lens' ContentCategoriesList' (Maybe Text) +cclSearchString + = lens _cclSearchString + (\ s a -> s{_cclSearchString = a}) + +-- | Select only content categories with these IDs. +cclIds :: Lens' ContentCategoriesList' (Maybe Int64) +cclIds = lens _cclIds (\ s a -> s{_cclIds = a}) + +-- | User profile ID associated with this request. +cclProfileId :: Lens' ContentCategoriesList' Int64 +cclProfileId + = lens _cclProfileId (\ s a -> s{_cclProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +cclSortOrder :: Lens' ContentCategoriesList' (Maybe Text) +cclSortOrder + = lens _cclSortOrder (\ s a -> s{_cclSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cclKey :: Lens' ContentCategoriesList' (Maybe Text) +cclKey = lens _cclKey (\ s a -> s{_cclKey = a}) + +-- | Value of the nextPageToken from the previous result page. +cclPageToken :: Lens' ContentCategoriesList' (Maybe Text) +cclPageToken + = lens _cclPageToken (\ s a -> s{_cclPageToken = a}) + +-- | Field by which to sort the list. +cclSortField :: Lens' ContentCategoriesList' (Maybe Text) +cclSortField + = lens _cclSortField (\ s a -> s{_cclSortField = a}) + +-- | OAuth 2.0 token for the current user. +cclOauthToken :: Lens' ContentCategoriesList' (Maybe Text) +cclOauthToken + = lens _cclOauthToken + (\ s a -> s{_cclOauthToken = a}) + +-- | Maximum number of results to return. +cclMaxResults :: Lens' ContentCategoriesList' (Maybe Int32) +cclMaxResults + = lens _cclMaxResults + (\ s a -> s{_cclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cclFields :: Lens' ContentCategoriesList' (Maybe Text) +cclFields + = lens _cclFields (\ s a -> s{_cclFields = a}) + +-- | Data format for the response. +cclAlt :: Lens' ContentCategoriesList' Text +cclAlt = lens _cclAlt (\ s a -> s{_cclAlt = a}) + +instance GoogleRequest ContentCategoriesList' where + type Rs ContentCategoriesList' = + ContentCategoriesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesList{..} + = go _cclQuotaUser _cclPrettyPrint _cclUserIp + _cclSearchString + _cclIds + _cclProfileId + _cclSortOrder + _cclKey + _cclPageToken + _cclSortField + _cclOauthToken + _cclMaxResults + _cclFields + _cclAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Patch.hs new file mode 100644 index 000000000..0cea047a3 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing content category. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingContentCategoriesPatch@. +module DFAReporting.ContentCategories.Patch + ( + -- * REST Resource + ContentCategoriesPatchAPI + + -- * Creating a Request + , contentCategoriesPatch + , ContentCategoriesPatch + + -- * Request Lenses + , ccpQuotaUser + , ccpPrettyPrint + , ccpUserIp + , ccpProfileId + , ccpKey + , ccpId + , ccpOauthToken + , ccpFields + , ccpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesPatch@ which the +-- 'ContentCategoriesPatch' request conforms to. +type ContentCategoriesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> + QueryParam "id" Int64 :> + Patch '[JSON] ContentCategory + +-- | Updates an existing content category. This method supports patch +-- semantics. +-- +-- /See:/ 'contentCategoriesPatch' smart constructor. +data ContentCategoriesPatch = ContentCategoriesPatch + { _ccpQuotaUser :: !(Maybe Text) + , _ccpPrettyPrint :: !Bool + , _ccpUserIp :: !(Maybe Text) + , _ccpProfileId :: !Int64 + , _ccpKey :: !(Maybe Text) + , _ccpId :: !Int64 + , _ccpOauthToken :: !(Maybe Text) + , _ccpFields :: !(Maybe Text) + , _ccpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccpQuotaUser' +-- +-- * 'ccpPrettyPrint' +-- +-- * 'ccpUserIp' +-- +-- * 'ccpProfileId' +-- +-- * 'ccpKey' +-- +-- * 'ccpId' +-- +-- * 'ccpOauthToken' +-- +-- * 'ccpFields' +-- +-- * 'ccpAlt' +contentCategoriesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ContentCategoriesPatch +contentCategoriesPatch pCcpProfileId_ pCcpId_ = + ContentCategoriesPatch + { _ccpQuotaUser = Nothing + , _ccpPrettyPrint = True + , _ccpUserIp = Nothing + , _ccpProfileId = pCcpProfileId_ + , _ccpKey = Nothing + , _ccpId = pCcpId_ + , _ccpOauthToken = Nothing + , _ccpFields = Nothing + , _ccpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccpQuotaUser :: Lens' ContentCategoriesPatch' (Maybe Text) +ccpQuotaUser + = lens _ccpQuotaUser (\ s a -> s{_ccpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccpPrettyPrint :: Lens' ContentCategoriesPatch' Bool +ccpPrettyPrint + = lens _ccpPrettyPrint + (\ s a -> s{_ccpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccpUserIp :: Lens' ContentCategoriesPatch' (Maybe Text) +ccpUserIp + = lens _ccpUserIp (\ s a -> s{_ccpUserIp = a}) + +-- | User profile ID associated with this request. +ccpProfileId :: Lens' ContentCategoriesPatch' Int64 +ccpProfileId + = lens _ccpProfileId (\ s a -> s{_ccpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccpKey :: Lens' ContentCategoriesPatch' (Maybe Text) +ccpKey = lens _ccpKey (\ s a -> s{_ccpKey = a}) + +-- | Content category ID. +ccpId :: Lens' ContentCategoriesPatch' Int64 +ccpId = lens _ccpId (\ s a -> s{_ccpId = a}) + +-- | OAuth 2.0 token for the current user. +ccpOauthToken :: Lens' ContentCategoriesPatch' (Maybe Text) +ccpOauthToken + = lens _ccpOauthToken + (\ s a -> s{_ccpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccpFields :: Lens' ContentCategoriesPatch' (Maybe Text) +ccpFields + = lens _ccpFields (\ s a -> s{_ccpFields = a}) + +-- | Data format for the response. +ccpAlt :: Lens' ContentCategoriesPatch' Text +ccpAlt = lens _ccpAlt (\ s a -> s{_ccpAlt = a}) + +instance GoogleRequest ContentCategoriesPatch' where + type Rs ContentCategoriesPatch' = ContentCategory + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesPatch{..} + = go _ccpQuotaUser _ccpPrettyPrint _ccpUserIp + _ccpProfileId + _ccpKey + (Just _ccpId) + _ccpOauthToken + _ccpFields + _ccpAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Update.hs new file mode 100644 index 000000000..65c296774 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/ContentCategories/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.ContentCategories.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing content category. +-- +-- /See:/ for @DfareportingContentCategoriesUpdate@. +module DFAReporting.ContentCategories.Update + ( + -- * REST Resource + ContentCategoriesUpdateAPI + + -- * Creating a Request + , contentCategoriesUpdate + , ContentCategoriesUpdate + + -- * Request Lenses + , ccuQuotaUser + , ccuPrettyPrint + , ccuUserIp + , ccuProfileId + , ccuKey + , ccuOauthToken + , ccuFields + , ccuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingContentCategoriesUpdate@ which the +-- 'ContentCategoriesUpdate' request conforms to. +type ContentCategoriesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "contentCategories" :> Put '[JSON] ContentCategory + +-- | Updates an existing content category. +-- +-- /See:/ 'contentCategoriesUpdate' smart constructor. +data ContentCategoriesUpdate = ContentCategoriesUpdate + { _ccuQuotaUser :: !(Maybe Text) + , _ccuPrettyPrint :: !Bool + , _ccuUserIp :: !(Maybe Text) + , _ccuProfileId :: !Int64 + , _ccuKey :: !(Maybe Text) + , _ccuOauthToken :: !(Maybe Text) + , _ccuFields :: !(Maybe Text) + , _ccuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentCategoriesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccuQuotaUser' +-- +-- * 'ccuPrettyPrint' +-- +-- * 'ccuUserIp' +-- +-- * 'ccuProfileId' +-- +-- * 'ccuKey' +-- +-- * 'ccuOauthToken' +-- +-- * 'ccuFields' +-- +-- * 'ccuAlt' +contentCategoriesUpdate + :: Int64 -- ^ 'profileId' + -> ContentCategoriesUpdate +contentCategoriesUpdate pCcuProfileId_ = + ContentCategoriesUpdate + { _ccuQuotaUser = Nothing + , _ccuPrettyPrint = True + , _ccuUserIp = Nothing + , _ccuProfileId = pCcuProfileId_ + , _ccuKey = Nothing + , _ccuOauthToken = Nothing + , _ccuFields = Nothing + , _ccuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccuQuotaUser :: Lens' ContentCategoriesUpdate' (Maybe Text) +ccuQuotaUser + = lens _ccuQuotaUser (\ s a -> s{_ccuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccuPrettyPrint :: Lens' ContentCategoriesUpdate' Bool +ccuPrettyPrint + = lens _ccuPrettyPrint + (\ s a -> s{_ccuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccuUserIp :: Lens' ContentCategoriesUpdate' (Maybe Text) +ccuUserIp + = lens _ccuUserIp (\ s a -> s{_ccuUserIp = a}) + +-- | User profile ID associated with this request. +ccuProfileId :: Lens' ContentCategoriesUpdate' Int64 +ccuProfileId + = lens _ccuProfileId (\ s a -> s{_ccuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccuKey :: Lens' ContentCategoriesUpdate' (Maybe Text) +ccuKey = lens _ccuKey (\ s a -> s{_ccuKey = a}) + +-- | OAuth 2.0 token for the current user. +ccuOauthToken :: Lens' ContentCategoriesUpdate' (Maybe Text) +ccuOauthToken + = lens _ccuOauthToken + (\ s a -> s{_ccuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccuFields :: Lens' ContentCategoriesUpdate' (Maybe Text) +ccuFields + = lens _ccuFields (\ s a -> s{_ccuFields = a}) + +-- | Data format for the response. +ccuAlt :: Lens' ContentCategoriesUpdate' Text +ccuAlt = lens _ccuAlt (\ s a -> s{_ccuAlt = a}) + +instance GoogleRequest ContentCategoriesUpdate' where + type Rs ContentCategoriesUpdate' = ContentCategory + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ContentCategoriesUpdate{..} + = go _ccuQuotaUser _ccuPrettyPrint _ccuUserIp + _ccuProfileId + _ccuKey + _ccuOauthToken + _ccuFields + _ccuAlt + where go + = clientWithRoute + (Proxy :: Proxy ContentCategoriesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/Get.hs new file mode 100644 index 000000000..b311579de --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Countries.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one country by ID. +-- +-- /See:/ for @DfareportingCountriesGet@. +module DFAReporting.Countries.Get + ( + -- * REST Resource + CountriesGetAPI + + -- * Creating a Request + , countriesGet + , CountriesGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgProfileId + , cgKey + , cgOauthToken + , cgDartId + , cgFields + , cgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCountriesGet@ which the +-- 'CountriesGet' request conforms to. +type CountriesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "countries" :> + Capture "dartId" Int64 :> Get '[JSON] Country + +-- | Gets one country by ID. +-- +-- /See:/ 'countriesGet' smart constructor. +data CountriesGet = CountriesGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgProfileId :: !Int64 + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgDartId :: !Int64 + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CountriesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgProfileId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgDartId' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +countriesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'dartId' + -> CountriesGet +countriesGet pCgProfileId_ pCgDartId_ = + CountriesGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgProfileId = pCgProfileId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgDartId = pCgDartId_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CountriesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CountriesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CountriesGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | User profile ID associated with this request. +cgProfileId :: Lens' CountriesGet' Int64 +cgProfileId + = lens _cgProfileId (\ s a -> s{_cgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CountriesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CountriesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Country DART ID. +cgDartId :: Lens' CountriesGet' Int64 +cgDartId = lens _cgDartId (\ s a -> s{_cgDartId = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CountriesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CountriesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CountriesGet' where + type Rs CountriesGet' = Country + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CountriesGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp + _cgProfileId + _cgKey + _cgOauthToken + _cgDartId + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CountriesGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/List.hs new file mode 100644 index 000000000..834388f55 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Countries/List.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Countries.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of countries. +-- +-- /See:/ for @DfareportingCountriesList@. +module DFAReporting.Countries.List + ( + -- * REST Resource + CountriesListAPI + + -- * Creating a Request + , countriesList + , CountriesList + + -- * Request Lenses + , couQuotaUser + , couPrettyPrint + , couUserIp + , couProfileId + , couKey + , couOauthToken + , couFields + , couAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCountriesList@ which the +-- 'CountriesList' request conforms to. +type CountriesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "countries" :> Get '[JSON] CountriesListResponse + +-- | Retrieves a list of countries. +-- +-- /See:/ 'countriesList' smart constructor. +data CountriesList = CountriesList + { _couQuotaUser :: !(Maybe Text) + , _couPrettyPrint :: !Bool + , _couUserIp :: !(Maybe Text) + , _couProfileId :: !Int64 + , _couKey :: !(Maybe Text) + , _couOauthToken :: !(Maybe Text) + , _couFields :: !(Maybe Text) + , _couAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CountriesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'couQuotaUser' +-- +-- * 'couPrettyPrint' +-- +-- * 'couUserIp' +-- +-- * 'couProfileId' +-- +-- * 'couKey' +-- +-- * 'couOauthToken' +-- +-- * 'couFields' +-- +-- * 'couAlt' +countriesList + :: Int64 -- ^ 'profileId' + -> CountriesList +countriesList pCouProfileId_ = + CountriesList + { _couQuotaUser = Nothing + , _couPrettyPrint = True + , _couUserIp = Nothing + , _couProfileId = pCouProfileId_ + , _couKey = Nothing + , _couOauthToken = Nothing + , _couFields = Nothing + , _couAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +couQuotaUser :: Lens' CountriesList' (Maybe Text) +couQuotaUser + = lens _couQuotaUser (\ s a -> s{_couQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +couPrettyPrint :: Lens' CountriesList' Bool +couPrettyPrint + = lens _couPrettyPrint + (\ s a -> s{_couPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +couUserIp :: Lens' CountriesList' (Maybe Text) +couUserIp + = lens _couUserIp (\ s a -> s{_couUserIp = a}) + +-- | User profile ID associated with this request. +couProfileId :: Lens' CountriesList' Int64 +couProfileId + = lens _couProfileId (\ s a -> s{_couProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +couKey :: Lens' CountriesList' (Maybe Text) +couKey = lens _couKey (\ s a -> s{_couKey = a}) + +-- | OAuth 2.0 token for the current user. +couOauthToken :: Lens' CountriesList' (Maybe Text) +couOauthToken + = lens _couOauthToken + (\ s a -> s{_couOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +couFields :: Lens' CountriesList' (Maybe Text) +couFields + = lens _couFields (\ s a -> s{_couFields = a}) + +-- | Data format for the response. +couAlt :: Lens' CountriesList' Text +couAlt = lens _couAlt (\ s a -> s{_couAlt = a}) + +instance GoogleRequest CountriesList' where + type Rs CountriesList' = CountriesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CountriesList{..} + = go _couQuotaUser _couPrettyPrint _couUserIp + _couProfileId + _couKey + _couOauthToken + _couFields + _couAlt + where go + = clientWithRoute (Proxy :: Proxy CountriesListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeAssets/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeAssets/Insert.hs new file mode 100644 index 000000000..f7796e7af --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeAssets/Insert.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeAssets.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new creative asset. +-- +-- /See:/ for @DfareportingCreativeAssetsInsert@. +module DFAReporting.CreativeAssets.Insert + ( + -- * REST Resource + CreativeAssetsInsertAPI + + -- * Creating a Request + , creativeAssetsInsert + , CreativeAssetsInsert + + -- * Request Lenses + , caiQuotaUser + , caiPrettyPrint + , caiUserIp + , caiAdvertiserId + , caiProfileId + , caiKey + , caiOauthToken + , caiFields + , caiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeAssetsInsert@ which the +-- 'CreativeAssetsInsert' request conforms to. +type CreativeAssetsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeAssets" :> + Capture "advertiserId" Int64 :> + "creativeAssets" :> + Post '[JSON] CreativeAssetMetadata + +-- | Inserts a new creative asset. +-- +-- /See:/ 'creativeAssetsInsert' smart constructor. +data CreativeAssetsInsert = CreativeAssetsInsert + { _caiQuotaUser :: !(Maybe Text) + , _caiPrettyPrint :: !Bool + , _caiUserIp :: !(Maybe Text) + , _caiAdvertiserId :: !Int64 + , _caiProfileId :: !Int64 + , _caiKey :: !(Maybe Text) + , _caiOauthToken :: !(Maybe Text) + , _caiFields :: !(Maybe Text) + , _caiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeAssetsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caiQuotaUser' +-- +-- * 'caiPrettyPrint' +-- +-- * 'caiUserIp' +-- +-- * 'caiAdvertiserId' +-- +-- * 'caiProfileId' +-- +-- * 'caiKey' +-- +-- * 'caiOauthToken' +-- +-- * 'caiFields' +-- +-- * 'caiAlt' +creativeAssetsInsert + :: Int64 -- ^ 'advertiserId' + -> Int64 -- ^ 'profileId' + -> CreativeAssetsInsert +creativeAssetsInsert pCaiAdvertiserId_ pCaiProfileId_ = + CreativeAssetsInsert + { _caiQuotaUser = Nothing + , _caiPrettyPrint = True + , _caiUserIp = Nothing + , _caiAdvertiserId = pCaiAdvertiserId_ + , _caiProfileId = pCaiProfileId_ + , _caiKey = Nothing + , _caiOauthToken = Nothing + , _caiFields = Nothing + , _caiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +caiQuotaUser :: Lens' CreativeAssetsInsert' (Maybe Text) +caiQuotaUser + = lens _caiQuotaUser (\ s a -> s{_caiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +caiPrettyPrint :: Lens' CreativeAssetsInsert' Bool +caiPrettyPrint + = lens _caiPrettyPrint + (\ s a -> s{_caiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +caiUserIp :: Lens' CreativeAssetsInsert' (Maybe Text) +caiUserIp + = lens _caiUserIp (\ s a -> s{_caiUserIp = a}) + +-- | Advertiser ID of this creative. This is a required field. +caiAdvertiserId :: Lens' CreativeAssetsInsert' Int64 +caiAdvertiserId + = lens _caiAdvertiserId + (\ s a -> s{_caiAdvertiserId = a}) + +-- | User profile ID associated with this request. +caiProfileId :: Lens' CreativeAssetsInsert' Int64 +caiProfileId + = lens _caiProfileId (\ s a -> s{_caiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +caiKey :: Lens' CreativeAssetsInsert' (Maybe Text) +caiKey = lens _caiKey (\ s a -> s{_caiKey = a}) + +-- | OAuth 2.0 token for the current user. +caiOauthToken :: Lens' CreativeAssetsInsert' (Maybe Text) +caiOauthToken + = lens _caiOauthToken + (\ s a -> s{_caiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +caiFields :: Lens' CreativeAssetsInsert' (Maybe Text) +caiFields + = lens _caiFields (\ s a -> s{_caiFields = a}) + +-- | Data format for the response. +caiAlt :: Lens' CreativeAssetsInsert' Text +caiAlt = lens _caiAlt (\ s a -> s{_caiAlt = a}) + +instance GoogleRequest CreativeAssetsInsert' where + type Rs CreativeAssetsInsert' = CreativeAssetMetadata + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeAssetsInsert{..} + = go _caiQuotaUser _caiPrettyPrint _caiUserIp + _caiAdvertiserId + _caiProfileId + _caiKey + _caiOauthToken + _caiFields + _caiAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeAssetsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Delete.hs new file mode 100644 index 000000000..ad76bc9ec --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Delete.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing creative field value. +-- +-- /See:/ for @DfareportingCreativeFieldValuesDelete@. +module DFAReporting.CreativeFieldValues.Delete + ( + -- * REST Resource + CreativeFieldValuesDeleteAPI + + -- * Creating a Request + , creativeFieldValuesDelete + , CreativeFieldValuesDelete + + -- * Request Lenses + , cfvdCreativeFieldId + , cfvdQuotaUser + , cfvdPrettyPrint + , cfvdUserIp + , cfvdProfileId + , cfvdKey + , cfvdId + , cfvdOauthToken + , cfvdFields + , cfvdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesDelete@ which the +-- 'CreativeFieldValuesDelete' request conforms to. +type CreativeFieldValuesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing creative field value. +-- +-- /See:/ 'creativeFieldValuesDelete' smart constructor. +data CreativeFieldValuesDelete = CreativeFieldValuesDelete + { _cfvdCreativeFieldId :: !Int64 + , _cfvdQuotaUser :: !(Maybe Text) + , _cfvdPrettyPrint :: !Bool + , _cfvdUserIp :: !(Maybe Text) + , _cfvdProfileId :: !Int64 + , _cfvdKey :: !(Maybe Text) + , _cfvdId :: !Int64 + , _cfvdOauthToken :: !(Maybe Text) + , _cfvdFields :: !(Maybe Text) + , _cfvdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvdCreativeFieldId' +-- +-- * 'cfvdQuotaUser' +-- +-- * 'cfvdPrettyPrint' +-- +-- * 'cfvdUserIp' +-- +-- * 'cfvdProfileId' +-- +-- * 'cfvdKey' +-- +-- * 'cfvdId' +-- +-- * 'cfvdOauthToken' +-- +-- * 'cfvdFields' +-- +-- * 'cfvdAlt' +creativeFieldValuesDelete + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldValuesDelete +creativeFieldValuesDelete pCfvdCreativeFieldId_ pCfvdProfileId_ pCfvdId_ = + CreativeFieldValuesDelete + { _cfvdCreativeFieldId = pCfvdCreativeFieldId_ + , _cfvdQuotaUser = Nothing + , _cfvdPrettyPrint = True + , _cfvdUserIp = Nothing + , _cfvdProfileId = pCfvdProfileId_ + , _cfvdKey = Nothing + , _cfvdId = pCfvdId_ + , _cfvdOauthToken = Nothing + , _cfvdFields = Nothing + , _cfvdAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfvdCreativeFieldId :: Lens' CreativeFieldValuesDelete' Int64 +cfvdCreativeFieldId + = lens _cfvdCreativeFieldId + (\ s a -> s{_cfvdCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfvdQuotaUser :: Lens' CreativeFieldValuesDelete' (Maybe Text) +cfvdQuotaUser + = lens _cfvdQuotaUser + (\ s a -> s{_cfvdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfvdPrettyPrint :: Lens' CreativeFieldValuesDelete' Bool +cfvdPrettyPrint + = lens _cfvdPrettyPrint + (\ s a -> s{_cfvdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfvdUserIp :: Lens' CreativeFieldValuesDelete' (Maybe Text) +cfvdUserIp + = lens _cfvdUserIp (\ s a -> s{_cfvdUserIp = a}) + +-- | User profile ID associated with this request. +cfvdProfileId :: Lens' CreativeFieldValuesDelete' Int64 +cfvdProfileId + = lens _cfvdProfileId + (\ s a -> s{_cfvdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfvdKey :: Lens' CreativeFieldValuesDelete' (Maybe Text) +cfvdKey = lens _cfvdKey (\ s a -> s{_cfvdKey = a}) + +-- | Creative Field Value ID +cfvdId :: Lens' CreativeFieldValuesDelete' Int64 +cfvdId = lens _cfvdId (\ s a -> s{_cfvdId = a}) + +-- | OAuth 2.0 token for the current user. +cfvdOauthToken :: Lens' CreativeFieldValuesDelete' (Maybe Text) +cfvdOauthToken + = lens _cfvdOauthToken + (\ s a -> s{_cfvdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfvdFields :: Lens' CreativeFieldValuesDelete' (Maybe Text) +cfvdFields + = lens _cfvdFields (\ s a -> s{_cfvdFields = a}) + +-- | Data format for the response. +cfvdAlt :: Lens' CreativeFieldValuesDelete' Text +cfvdAlt = lens _cfvdAlt (\ s a -> s{_cfvdAlt = a}) + +instance GoogleRequest CreativeFieldValuesDelete' + where + type Rs CreativeFieldValuesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesDelete{..} + = go _cfvdCreativeFieldId _cfvdQuotaUser + _cfvdPrettyPrint + _cfvdUserIp + _cfvdProfileId + _cfvdKey + _cfvdId + _cfvdOauthToken + _cfvdFields + _cfvdAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Get.hs new file mode 100644 index 000000000..de8a179ca --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one creative field value by ID. +-- +-- /See:/ for @DfareportingCreativeFieldValuesGet@. +module DFAReporting.CreativeFieldValues.Get + ( + -- * REST Resource + CreativeFieldValuesGetAPI + + -- * Creating a Request + , creativeFieldValuesGet + , CreativeFieldValuesGet + + -- * Request Lenses + , cfvgCreativeFieldId + , cfvgQuotaUser + , cfvgPrettyPrint + , cfvgUserIp + , cfvgProfileId + , cfvgKey + , cfvgId + , cfvgOauthToken + , cfvgFields + , cfvgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesGet@ which the +-- 'CreativeFieldValuesGet' request conforms to. +type CreativeFieldValuesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + Capture "id" Int64 :> Get '[JSON] CreativeFieldValue + +-- | Gets one creative field value by ID. +-- +-- /See:/ 'creativeFieldValuesGet' smart constructor. +data CreativeFieldValuesGet = CreativeFieldValuesGet + { _cfvgCreativeFieldId :: !Int64 + , _cfvgQuotaUser :: !(Maybe Text) + , _cfvgPrettyPrint :: !Bool + , _cfvgUserIp :: !(Maybe Text) + , _cfvgProfileId :: !Int64 + , _cfvgKey :: !(Maybe Text) + , _cfvgId :: !Int64 + , _cfvgOauthToken :: !(Maybe Text) + , _cfvgFields :: !(Maybe Text) + , _cfvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvgCreativeFieldId' +-- +-- * 'cfvgQuotaUser' +-- +-- * 'cfvgPrettyPrint' +-- +-- * 'cfvgUserIp' +-- +-- * 'cfvgProfileId' +-- +-- * 'cfvgKey' +-- +-- * 'cfvgId' +-- +-- * 'cfvgOauthToken' +-- +-- * 'cfvgFields' +-- +-- * 'cfvgAlt' +creativeFieldValuesGet + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldValuesGet +creativeFieldValuesGet pCfvgCreativeFieldId_ pCfvgProfileId_ pCfvgId_ = + CreativeFieldValuesGet + { _cfvgCreativeFieldId = pCfvgCreativeFieldId_ + , _cfvgQuotaUser = Nothing + , _cfvgPrettyPrint = True + , _cfvgUserIp = Nothing + , _cfvgProfileId = pCfvgProfileId_ + , _cfvgKey = Nothing + , _cfvgId = pCfvgId_ + , _cfvgOauthToken = Nothing + , _cfvgFields = Nothing + , _cfvgAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfvgCreativeFieldId :: Lens' CreativeFieldValuesGet' Int64 +cfvgCreativeFieldId + = lens _cfvgCreativeFieldId + (\ s a -> s{_cfvgCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfvgQuotaUser :: Lens' CreativeFieldValuesGet' (Maybe Text) +cfvgQuotaUser + = lens _cfvgQuotaUser + (\ s a -> s{_cfvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfvgPrettyPrint :: Lens' CreativeFieldValuesGet' Bool +cfvgPrettyPrint + = lens _cfvgPrettyPrint + (\ s a -> s{_cfvgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfvgUserIp :: Lens' CreativeFieldValuesGet' (Maybe Text) +cfvgUserIp + = lens _cfvgUserIp (\ s a -> s{_cfvgUserIp = a}) + +-- | User profile ID associated with this request. +cfvgProfileId :: Lens' CreativeFieldValuesGet' Int64 +cfvgProfileId + = lens _cfvgProfileId + (\ s a -> s{_cfvgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfvgKey :: Lens' CreativeFieldValuesGet' (Maybe Text) +cfvgKey = lens _cfvgKey (\ s a -> s{_cfvgKey = a}) + +-- | Creative Field Value ID +cfvgId :: Lens' CreativeFieldValuesGet' Int64 +cfvgId = lens _cfvgId (\ s a -> s{_cfvgId = a}) + +-- | OAuth 2.0 token for the current user. +cfvgOauthToken :: Lens' CreativeFieldValuesGet' (Maybe Text) +cfvgOauthToken + = lens _cfvgOauthToken + (\ s a -> s{_cfvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfvgFields :: Lens' CreativeFieldValuesGet' (Maybe Text) +cfvgFields + = lens _cfvgFields (\ s a -> s{_cfvgFields = a}) + +-- | Data format for the response. +cfvgAlt :: Lens' CreativeFieldValuesGet' Text +cfvgAlt = lens _cfvgAlt (\ s a -> s{_cfvgAlt = a}) + +instance GoogleRequest CreativeFieldValuesGet' where + type Rs CreativeFieldValuesGet' = CreativeFieldValue + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesGet{..} + = go _cfvgCreativeFieldId _cfvgQuotaUser + _cfvgPrettyPrint + _cfvgUserIp + _cfvgProfileId + _cfvgKey + _cfvgId + _cfvgOauthToken + _cfvgFields + _cfvgAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Insert.hs new file mode 100644 index 000000000..75ecbc33b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Insert.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new creative field value. +-- +-- /See:/ for @DfareportingCreativeFieldValuesInsert@. +module DFAReporting.CreativeFieldValues.Insert + ( + -- * REST Resource + CreativeFieldValuesInsertAPI + + -- * Creating a Request + , creativeFieldValuesInsert + , CreativeFieldValuesInsert + + -- * Request Lenses + , cfviCreativeFieldId + , cfviQuotaUser + , cfviPrettyPrint + , cfviUserIp + , cfviProfileId + , cfviKey + , cfviOauthToken + , cfviFields + , cfviAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesInsert@ which the +-- 'CreativeFieldValuesInsert' request conforms to. +type CreativeFieldValuesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + Post '[JSON] CreativeFieldValue + +-- | Inserts a new creative field value. +-- +-- /See:/ 'creativeFieldValuesInsert' smart constructor. +data CreativeFieldValuesInsert = CreativeFieldValuesInsert + { _cfviCreativeFieldId :: !Int64 + , _cfviQuotaUser :: !(Maybe Text) + , _cfviPrettyPrint :: !Bool + , _cfviUserIp :: !(Maybe Text) + , _cfviProfileId :: !Int64 + , _cfviKey :: !(Maybe Text) + , _cfviOauthToken :: !(Maybe Text) + , _cfviFields :: !(Maybe Text) + , _cfviAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfviCreativeFieldId' +-- +-- * 'cfviQuotaUser' +-- +-- * 'cfviPrettyPrint' +-- +-- * 'cfviUserIp' +-- +-- * 'cfviProfileId' +-- +-- * 'cfviKey' +-- +-- * 'cfviOauthToken' +-- +-- * 'cfviFields' +-- +-- * 'cfviAlt' +creativeFieldValuesInsert + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> CreativeFieldValuesInsert +creativeFieldValuesInsert pCfviCreativeFieldId_ pCfviProfileId_ = + CreativeFieldValuesInsert + { _cfviCreativeFieldId = pCfviCreativeFieldId_ + , _cfviQuotaUser = Nothing + , _cfviPrettyPrint = True + , _cfviUserIp = Nothing + , _cfviProfileId = pCfviProfileId_ + , _cfviKey = Nothing + , _cfviOauthToken = Nothing + , _cfviFields = Nothing + , _cfviAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfviCreativeFieldId :: Lens' CreativeFieldValuesInsert' Int64 +cfviCreativeFieldId + = lens _cfviCreativeFieldId + (\ s a -> s{_cfviCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfviQuotaUser :: Lens' CreativeFieldValuesInsert' (Maybe Text) +cfviQuotaUser + = lens _cfviQuotaUser + (\ s a -> s{_cfviQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfviPrettyPrint :: Lens' CreativeFieldValuesInsert' Bool +cfviPrettyPrint + = lens _cfviPrettyPrint + (\ s a -> s{_cfviPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfviUserIp :: Lens' CreativeFieldValuesInsert' (Maybe Text) +cfviUserIp + = lens _cfviUserIp (\ s a -> s{_cfviUserIp = a}) + +-- | User profile ID associated with this request. +cfviProfileId :: Lens' CreativeFieldValuesInsert' Int64 +cfviProfileId + = lens _cfviProfileId + (\ s a -> s{_cfviProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfviKey :: Lens' CreativeFieldValuesInsert' (Maybe Text) +cfviKey = lens _cfviKey (\ s a -> s{_cfviKey = a}) + +-- | OAuth 2.0 token for the current user. +cfviOauthToken :: Lens' CreativeFieldValuesInsert' (Maybe Text) +cfviOauthToken + = lens _cfviOauthToken + (\ s a -> s{_cfviOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfviFields :: Lens' CreativeFieldValuesInsert' (Maybe Text) +cfviFields + = lens _cfviFields (\ s a -> s{_cfviFields = a}) + +-- | Data format for the response. +cfviAlt :: Lens' CreativeFieldValuesInsert' Text +cfviAlt = lens _cfviAlt (\ s a -> s{_cfviAlt = a}) + +instance GoogleRequest CreativeFieldValuesInsert' + where + type Rs CreativeFieldValuesInsert' = + CreativeFieldValue + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesInsert{..} + = go _cfviCreativeFieldId _cfviQuotaUser + _cfviPrettyPrint + _cfviUserIp + _cfviProfileId + _cfviKey + _cfviOauthToken + _cfviFields + _cfviAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs new file mode 100644 index 000000000..bf51fd6e4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs @@ -0,0 +1,256 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of creative field values, possibly filtered. +-- +-- /See:/ for @DfareportingCreativeFieldValuesList@. +module DFAReporting.CreativeFieldValues.List + ( + -- * REST Resource + CreativeFieldValuesListAPI + + -- * Creating a Request + , creativeFieldValuesList + , CreativeFieldValuesList + + -- * Request Lenses + , cfvlCreativeFieldId + , cfvlQuotaUser + , cfvlPrettyPrint + , cfvlUserIp + , cfvlSearchString + , cfvlIds + , cfvlProfileId + , cfvlSortOrder + , cfvlKey + , cfvlPageToken + , cfvlSortField + , cfvlOauthToken + , cfvlMaxResults + , cfvlFields + , cfvlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesList@ which the +-- 'CreativeFieldValuesList' request conforms to. +type CreativeFieldValuesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CreativeFieldValuesListResponse + +-- | Retrieves a list of creative field values, possibly filtered. +-- +-- /See:/ 'creativeFieldValuesList' smart constructor. +data CreativeFieldValuesList = CreativeFieldValuesList + { _cfvlCreativeFieldId :: !Int64 + , _cfvlQuotaUser :: !(Maybe Text) + , _cfvlPrettyPrint :: !Bool + , _cfvlUserIp :: !(Maybe Text) + , _cfvlSearchString :: !(Maybe Text) + , _cfvlIds :: !(Maybe Int64) + , _cfvlProfileId :: !Int64 + , _cfvlSortOrder :: !(Maybe Text) + , _cfvlKey :: !(Maybe Text) + , _cfvlPageToken :: !(Maybe Text) + , _cfvlSortField :: !(Maybe Text) + , _cfvlOauthToken :: !(Maybe Text) + , _cfvlMaxResults :: !(Maybe Int32) + , _cfvlFields :: !(Maybe Text) + , _cfvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvlCreativeFieldId' +-- +-- * 'cfvlQuotaUser' +-- +-- * 'cfvlPrettyPrint' +-- +-- * 'cfvlUserIp' +-- +-- * 'cfvlSearchString' +-- +-- * 'cfvlIds' +-- +-- * 'cfvlProfileId' +-- +-- * 'cfvlSortOrder' +-- +-- * 'cfvlKey' +-- +-- * 'cfvlPageToken' +-- +-- * 'cfvlSortField' +-- +-- * 'cfvlOauthToken' +-- +-- * 'cfvlMaxResults' +-- +-- * 'cfvlFields' +-- +-- * 'cfvlAlt' +creativeFieldValuesList + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> CreativeFieldValuesList +creativeFieldValuesList pCfvlCreativeFieldId_ pCfvlProfileId_ = + CreativeFieldValuesList + { _cfvlCreativeFieldId = pCfvlCreativeFieldId_ + , _cfvlQuotaUser = Nothing + , _cfvlPrettyPrint = True + , _cfvlUserIp = Nothing + , _cfvlSearchString = Nothing + , _cfvlIds = Nothing + , _cfvlProfileId = pCfvlProfileId_ + , _cfvlSortOrder = Nothing + , _cfvlKey = Nothing + , _cfvlPageToken = Nothing + , _cfvlSortField = Nothing + , _cfvlOauthToken = Nothing + , _cfvlMaxResults = Nothing + , _cfvlFields = Nothing + , _cfvlAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfvlCreativeFieldId :: Lens' CreativeFieldValuesList' Int64 +cfvlCreativeFieldId + = lens _cfvlCreativeFieldId + (\ s a -> s{_cfvlCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfvlQuotaUser :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlQuotaUser + = lens _cfvlQuotaUser + (\ s a -> s{_cfvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfvlPrettyPrint :: Lens' CreativeFieldValuesList' Bool +cfvlPrettyPrint + = lens _cfvlPrettyPrint + (\ s a -> s{_cfvlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfvlUserIp :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlUserIp + = lens _cfvlUserIp (\ s a -> s{_cfvlUserIp = a}) + +-- | Allows searching for creative field values by their values. Wildcards +-- (e.g. *) are not allowed. +cfvlSearchString :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlSearchString + = lens _cfvlSearchString + (\ s a -> s{_cfvlSearchString = a}) + +-- | Select only creative field values with these IDs. +cfvlIds :: Lens' CreativeFieldValuesList' (Maybe Int64) +cfvlIds = lens _cfvlIds (\ s a -> s{_cfvlIds = a}) + +-- | User profile ID associated with this request. +cfvlProfileId :: Lens' CreativeFieldValuesList' Int64 +cfvlProfileId + = lens _cfvlProfileId + (\ s a -> s{_cfvlProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +cfvlSortOrder :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlSortOrder + = lens _cfvlSortOrder + (\ s a -> s{_cfvlSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfvlKey :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlKey = lens _cfvlKey (\ s a -> s{_cfvlKey = a}) + +-- | Value of the nextPageToken from the previous result page. +cfvlPageToken :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlPageToken + = lens _cfvlPageToken + (\ s a -> s{_cfvlPageToken = a}) + +-- | Field by which to sort the list. +cfvlSortField :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlSortField + = lens _cfvlSortField + (\ s a -> s{_cfvlSortField = a}) + +-- | OAuth 2.0 token for the current user. +cfvlOauthToken :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlOauthToken + = lens _cfvlOauthToken + (\ s a -> s{_cfvlOauthToken = a}) + +-- | Maximum number of results to return. +cfvlMaxResults :: Lens' CreativeFieldValuesList' (Maybe Int32) +cfvlMaxResults + = lens _cfvlMaxResults + (\ s a -> s{_cfvlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cfvlFields :: Lens' CreativeFieldValuesList' (Maybe Text) +cfvlFields + = lens _cfvlFields (\ s a -> s{_cfvlFields = a}) + +-- | Data format for the response. +cfvlAlt :: Lens' CreativeFieldValuesList' Text +cfvlAlt = lens _cfvlAlt (\ s a -> s{_cfvlAlt = a}) + +instance GoogleRequest CreativeFieldValuesList' where + type Rs CreativeFieldValuesList' = + CreativeFieldValuesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesList{..} + = go _cfvlCreativeFieldId _cfvlQuotaUser + _cfvlPrettyPrint + _cfvlUserIp + _cfvlSearchString + _cfvlIds + _cfvlProfileId + _cfvlSortOrder + _cfvlKey + _cfvlPageToken + _cfvlSortField + _cfvlOauthToken + _cfvlMaxResults + _cfvlFields + _cfvlAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs new file mode 100644 index 000000000..10558743e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative field value. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingCreativeFieldValuesPatch@. +module DFAReporting.CreativeFieldValues.Patch + ( + -- * REST Resource + CreativeFieldValuesPatchAPI + + -- * Creating a Request + , creativeFieldValuesPatch + , CreativeFieldValuesPatch + + -- * Request Lenses + , cfvpCreativeFieldId + , cfvpQuotaUser + , cfvpPrettyPrint + , cfvpUserIp + , cfvpProfileId + , cfvpKey + , cfvpId + , cfvpOauthToken + , cfvpFields + , cfvpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesPatch@ which the +-- 'CreativeFieldValuesPatch' request conforms to. +type CreativeFieldValuesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + QueryParam "id" Int64 :> + Patch '[JSON] CreativeFieldValue + +-- | Updates an existing creative field value. This method supports patch +-- semantics. +-- +-- /See:/ 'creativeFieldValuesPatch' smart constructor. +data CreativeFieldValuesPatch = CreativeFieldValuesPatch + { _cfvpCreativeFieldId :: !Int64 + , _cfvpQuotaUser :: !(Maybe Text) + , _cfvpPrettyPrint :: !Bool + , _cfvpUserIp :: !(Maybe Text) + , _cfvpProfileId :: !Int64 + , _cfvpKey :: !(Maybe Text) + , _cfvpId :: !Int64 + , _cfvpOauthToken :: !(Maybe Text) + , _cfvpFields :: !(Maybe Text) + , _cfvpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvpCreativeFieldId' +-- +-- * 'cfvpQuotaUser' +-- +-- * 'cfvpPrettyPrint' +-- +-- * 'cfvpUserIp' +-- +-- * 'cfvpProfileId' +-- +-- * 'cfvpKey' +-- +-- * 'cfvpId' +-- +-- * 'cfvpOauthToken' +-- +-- * 'cfvpFields' +-- +-- * 'cfvpAlt' +creativeFieldValuesPatch + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldValuesPatch +creativeFieldValuesPatch pCfvpCreativeFieldId_ pCfvpProfileId_ pCfvpId_ = + CreativeFieldValuesPatch + { _cfvpCreativeFieldId = pCfvpCreativeFieldId_ + , _cfvpQuotaUser = Nothing + , _cfvpPrettyPrint = True + , _cfvpUserIp = Nothing + , _cfvpProfileId = pCfvpProfileId_ + , _cfvpKey = Nothing + , _cfvpId = pCfvpId_ + , _cfvpOauthToken = Nothing + , _cfvpFields = Nothing + , _cfvpAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfvpCreativeFieldId :: Lens' CreativeFieldValuesPatch' Int64 +cfvpCreativeFieldId + = lens _cfvpCreativeFieldId + (\ s a -> s{_cfvpCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfvpQuotaUser :: Lens' CreativeFieldValuesPatch' (Maybe Text) +cfvpQuotaUser + = lens _cfvpQuotaUser + (\ s a -> s{_cfvpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfvpPrettyPrint :: Lens' CreativeFieldValuesPatch' Bool +cfvpPrettyPrint + = lens _cfvpPrettyPrint + (\ s a -> s{_cfvpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfvpUserIp :: Lens' CreativeFieldValuesPatch' (Maybe Text) +cfvpUserIp + = lens _cfvpUserIp (\ s a -> s{_cfvpUserIp = a}) + +-- | User profile ID associated with this request. +cfvpProfileId :: Lens' CreativeFieldValuesPatch' Int64 +cfvpProfileId + = lens _cfvpProfileId + (\ s a -> s{_cfvpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfvpKey :: Lens' CreativeFieldValuesPatch' (Maybe Text) +cfvpKey = lens _cfvpKey (\ s a -> s{_cfvpKey = a}) + +-- | Creative Field Value ID +cfvpId :: Lens' CreativeFieldValuesPatch' Int64 +cfvpId = lens _cfvpId (\ s a -> s{_cfvpId = a}) + +-- | OAuth 2.0 token for the current user. +cfvpOauthToken :: Lens' CreativeFieldValuesPatch' (Maybe Text) +cfvpOauthToken + = lens _cfvpOauthToken + (\ s a -> s{_cfvpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfvpFields :: Lens' CreativeFieldValuesPatch' (Maybe Text) +cfvpFields + = lens _cfvpFields (\ s a -> s{_cfvpFields = a}) + +-- | Data format for the response. +cfvpAlt :: Lens' CreativeFieldValuesPatch' Text +cfvpAlt = lens _cfvpAlt (\ s a -> s{_cfvpAlt = a}) + +instance GoogleRequest CreativeFieldValuesPatch' + where + type Rs CreativeFieldValuesPatch' = + CreativeFieldValue + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesPatch{..} + = go _cfvpCreativeFieldId _cfvpQuotaUser + _cfvpPrettyPrint + _cfvpUserIp + _cfvpProfileId + _cfvpKey + (Just _cfvpId) + _cfvpOauthToken + _cfvpFields + _cfvpAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs new file mode 100644 index 000000000..cc0eb3902 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFieldValues.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative field value. +-- +-- /See:/ for @DfareportingCreativeFieldValuesUpdate@. +module DFAReporting.CreativeFieldValues.Update + ( + -- * REST Resource + CreativeFieldValuesUpdateAPI + + -- * Creating a Request + , creativeFieldValuesUpdate + , CreativeFieldValuesUpdate + + -- * Request Lenses + , cfvuCreativeFieldId + , cfvuQuotaUser + , cfvuPrettyPrint + , cfvuUserIp + , cfvuProfileId + , cfvuKey + , cfvuOauthToken + , cfvuFields + , cfvuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldValuesUpdate@ which the +-- 'CreativeFieldValuesUpdate' request conforms to. +type CreativeFieldValuesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "creativeFieldId" Int64 :> + "creativeFieldValues" :> + Put '[JSON] CreativeFieldValue + +-- | Updates an existing creative field value. +-- +-- /See:/ 'creativeFieldValuesUpdate' smart constructor. +data CreativeFieldValuesUpdate = CreativeFieldValuesUpdate + { _cfvuCreativeFieldId :: !Int64 + , _cfvuQuotaUser :: !(Maybe Text) + , _cfvuPrettyPrint :: !Bool + , _cfvuUserIp :: !(Maybe Text) + , _cfvuProfileId :: !Int64 + , _cfvuKey :: !(Maybe Text) + , _cfvuOauthToken :: !(Maybe Text) + , _cfvuFields :: !(Maybe Text) + , _cfvuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldValuesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfvuCreativeFieldId' +-- +-- * 'cfvuQuotaUser' +-- +-- * 'cfvuPrettyPrint' +-- +-- * 'cfvuUserIp' +-- +-- * 'cfvuProfileId' +-- +-- * 'cfvuKey' +-- +-- * 'cfvuOauthToken' +-- +-- * 'cfvuFields' +-- +-- * 'cfvuAlt' +creativeFieldValuesUpdate + :: Int64 -- ^ 'creativeFieldId' + -> Int64 -- ^ 'profileId' + -> CreativeFieldValuesUpdate +creativeFieldValuesUpdate pCfvuCreativeFieldId_ pCfvuProfileId_ = + CreativeFieldValuesUpdate + { _cfvuCreativeFieldId = pCfvuCreativeFieldId_ + , _cfvuQuotaUser = Nothing + , _cfvuPrettyPrint = True + , _cfvuUserIp = Nothing + , _cfvuProfileId = pCfvuProfileId_ + , _cfvuKey = Nothing + , _cfvuOauthToken = Nothing + , _cfvuFields = Nothing + , _cfvuAlt = "json" + } + +-- | Creative field ID for this creative field value. +cfvuCreativeFieldId :: Lens' CreativeFieldValuesUpdate' Int64 +cfvuCreativeFieldId + = lens _cfvuCreativeFieldId + (\ s a -> s{_cfvuCreativeFieldId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfvuQuotaUser :: Lens' CreativeFieldValuesUpdate' (Maybe Text) +cfvuQuotaUser + = lens _cfvuQuotaUser + (\ s a -> s{_cfvuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfvuPrettyPrint :: Lens' CreativeFieldValuesUpdate' Bool +cfvuPrettyPrint + = lens _cfvuPrettyPrint + (\ s a -> s{_cfvuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfvuUserIp :: Lens' CreativeFieldValuesUpdate' (Maybe Text) +cfvuUserIp + = lens _cfvuUserIp (\ s a -> s{_cfvuUserIp = a}) + +-- | User profile ID associated with this request. +cfvuProfileId :: Lens' CreativeFieldValuesUpdate' Int64 +cfvuProfileId + = lens _cfvuProfileId + (\ s a -> s{_cfvuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfvuKey :: Lens' CreativeFieldValuesUpdate' (Maybe Text) +cfvuKey = lens _cfvuKey (\ s a -> s{_cfvuKey = a}) + +-- | OAuth 2.0 token for the current user. +cfvuOauthToken :: Lens' CreativeFieldValuesUpdate' (Maybe Text) +cfvuOauthToken + = lens _cfvuOauthToken + (\ s a -> s{_cfvuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfvuFields :: Lens' CreativeFieldValuesUpdate' (Maybe Text) +cfvuFields + = lens _cfvuFields (\ s a -> s{_cfvuFields = a}) + +-- | Data format for the response. +cfvuAlt :: Lens' CreativeFieldValuesUpdate' Text +cfvuAlt = lens _cfvuAlt (\ s a -> s{_cfvuAlt = a}) + +instance GoogleRequest CreativeFieldValuesUpdate' + where + type Rs CreativeFieldValuesUpdate' = + CreativeFieldValue + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldValuesUpdate{..} + = go _cfvuCreativeFieldId _cfvuQuotaUser + _cfvuPrettyPrint + _cfvuUserIp + _cfvuProfileId + _cfvuKey + _cfvuOauthToken + _cfvuFields + _cfvuAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldValuesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Delete.hs new file mode 100644 index 000000000..04139392a --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing creative field. +-- +-- /See:/ for @DfareportingCreativeFieldsDelete@. +module DFAReporting.CreativeFields.Delete + ( + -- * REST Resource + CreativeFieldsDeleteAPI + + -- * Creating a Request + , creativeFieldsDelete + , CreativeFieldsDelete + + -- * Request Lenses + , cfdQuotaUser + , cfdPrettyPrint + , cfdUserIp + , cfdProfileId + , cfdKey + , cfdId + , cfdOauthToken + , cfdFields + , cfdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsDelete@ which the +-- 'CreativeFieldsDelete' request conforms to. +type CreativeFieldsDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing creative field. +-- +-- /See:/ 'creativeFieldsDelete' smart constructor. +data CreativeFieldsDelete = CreativeFieldsDelete + { _cfdQuotaUser :: !(Maybe Text) + , _cfdPrettyPrint :: !Bool + , _cfdUserIp :: !(Maybe Text) + , _cfdProfileId :: !Int64 + , _cfdKey :: !(Maybe Text) + , _cfdId :: !Int64 + , _cfdOauthToken :: !(Maybe Text) + , _cfdFields :: !(Maybe Text) + , _cfdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfdQuotaUser' +-- +-- * 'cfdPrettyPrint' +-- +-- * 'cfdUserIp' +-- +-- * 'cfdProfileId' +-- +-- * 'cfdKey' +-- +-- * 'cfdId' +-- +-- * 'cfdOauthToken' +-- +-- * 'cfdFields' +-- +-- * 'cfdAlt' +creativeFieldsDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldsDelete +creativeFieldsDelete pCfdProfileId_ pCfdId_ = + CreativeFieldsDelete + { _cfdQuotaUser = Nothing + , _cfdPrettyPrint = True + , _cfdUserIp = Nothing + , _cfdProfileId = pCfdProfileId_ + , _cfdKey = Nothing + , _cfdId = pCfdId_ + , _cfdOauthToken = Nothing + , _cfdFields = Nothing + , _cfdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfdQuotaUser :: Lens' CreativeFieldsDelete' (Maybe Text) +cfdQuotaUser + = lens _cfdQuotaUser (\ s a -> s{_cfdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfdPrettyPrint :: Lens' CreativeFieldsDelete' Bool +cfdPrettyPrint + = lens _cfdPrettyPrint + (\ s a -> s{_cfdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfdUserIp :: Lens' CreativeFieldsDelete' (Maybe Text) +cfdUserIp + = lens _cfdUserIp (\ s a -> s{_cfdUserIp = a}) + +-- | User profile ID associated with this request. +cfdProfileId :: Lens' CreativeFieldsDelete' Int64 +cfdProfileId + = lens _cfdProfileId (\ s a -> s{_cfdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfdKey :: Lens' CreativeFieldsDelete' (Maybe Text) +cfdKey = lens _cfdKey (\ s a -> s{_cfdKey = a}) + +-- | Creative Field ID +cfdId :: Lens' CreativeFieldsDelete' Int64 +cfdId = lens _cfdId (\ s a -> s{_cfdId = a}) + +-- | OAuth 2.0 token for the current user. +cfdOauthToken :: Lens' CreativeFieldsDelete' (Maybe Text) +cfdOauthToken + = lens _cfdOauthToken + (\ s a -> s{_cfdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfdFields :: Lens' CreativeFieldsDelete' (Maybe Text) +cfdFields + = lens _cfdFields (\ s a -> s{_cfdFields = a}) + +-- | Data format for the response. +cfdAlt :: Lens' CreativeFieldsDelete' Text +cfdAlt = lens _cfdAlt (\ s a -> s{_cfdAlt = a}) + +instance GoogleRequest CreativeFieldsDelete' where + type Rs CreativeFieldsDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsDelete{..} + = go _cfdQuotaUser _cfdPrettyPrint _cfdUserIp + _cfdProfileId + _cfdKey + _cfdId + _cfdOauthToken + _cfdFields + _cfdAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Get.hs new file mode 100644 index 000000000..655a05db9 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one creative field by ID. +-- +-- /See:/ for @DfareportingCreativeFieldsGet@. +module DFAReporting.CreativeFields.Get + ( + -- * REST Resource + CreativeFieldsGetAPI + + -- * Creating a Request + , creativeFieldsGet + , CreativeFieldsGet + + -- * Request Lenses + , cfgQuotaUser + , cfgPrettyPrint + , cfgUserIp + , cfgProfileId + , cfgKey + , cfgId + , cfgOauthToken + , cfgFields + , cfgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsGet@ which the +-- 'CreativeFieldsGet' request conforms to. +type CreativeFieldsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + Capture "id" Int64 :> Get '[JSON] CreativeField + +-- | Gets one creative field by ID. +-- +-- /See:/ 'creativeFieldsGet' smart constructor. +data CreativeFieldsGet = CreativeFieldsGet + { _cfgQuotaUser :: !(Maybe Text) + , _cfgPrettyPrint :: !Bool + , _cfgUserIp :: !(Maybe Text) + , _cfgProfileId :: !Int64 + , _cfgKey :: !(Maybe Text) + , _cfgId :: !Int64 + , _cfgOauthToken :: !(Maybe Text) + , _cfgFields :: !(Maybe Text) + , _cfgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfgQuotaUser' +-- +-- * 'cfgPrettyPrint' +-- +-- * 'cfgUserIp' +-- +-- * 'cfgProfileId' +-- +-- * 'cfgKey' +-- +-- * 'cfgId' +-- +-- * 'cfgOauthToken' +-- +-- * 'cfgFields' +-- +-- * 'cfgAlt' +creativeFieldsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldsGet +creativeFieldsGet pCfgProfileId_ pCfgId_ = + CreativeFieldsGet + { _cfgQuotaUser = Nothing + , _cfgPrettyPrint = True + , _cfgUserIp = Nothing + , _cfgProfileId = pCfgProfileId_ + , _cfgKey = Nothing + , _cfgId = pCfgId_ + , _cfgOauthToken = Nothing + , _cfgFields = Nothing + , _cfgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfgQuotaUser :: Lens' CreativeFieldsGet' (Maybe Text) +cfgQuotaUser + = lens _cfgQuotaUser (\ s a -> s{_cfgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfgPrettyPrint :: Lens' CreativeFieldsGet' Bool +cfgPrettyPrint + = lens _cfgPrettyPrint + (\ s a -> s{_cfgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfgUserIp :: Lens' CreativeFieldsGet' (Maybe Text) +cfgUserIp + = lens _cfgUserIp (\ s a -> s{_cfgUserIp = a}) + +-- | User profile ID associated with this request. +cfgProfileId :: Lens' CreativeFieldsGet' Int64 +cfgProfileId + = lens _cfgProfileId (\ s a -> s{_cfgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfgKey :: Lens' CreativeFieldsGet' (Maybe Text) +cfgKey = lens _cfgKey (\ s a -> s{_cfgKey = a}) + +-- | Creative Field ID +cfgId :: Lens' CreativeFieldsGet' Int64 +cfgId = lens _cfgId (\ s a -> s{_cfgId = a}) + +-- | OAuth 2.0 token for the current user. +cfgOauthToken :: Lens' CreativeFieldsGet' (Maybe Text) +cfgOauthToken + = lens _cfgOauthToken + (\ s a -> s{_cfgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfgFields :: Lens' CreativeFieldsGet' (Maybe Text) +cfgFields + = lens _cfgFields (\ s a -> s{_cfgFields = a}) + +-- | Data format for the response. +cfgAlt :: Lens' CreativeFieldsGet' Text +cfgAlt = lens _cfgAlt (\ s a -> s{_cfgAlt = a}) + +instance GoogleRequest CreativeFieldsGet' where + type Rs CreativeFieldsGet' = CreativeField + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsGet{..} + = go _cfgQuotaUser _cfgPrettyPrint _cfgUserIp + _cfgProfileId + _cfgKey + _cfgId + _cfgOauthToken + _cfgFields + _cfgAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Insert.hs new file mode 100644 index 000000000..eff877ab4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new creative field. +-- +-- /See:/ for @DfareportingCreativeFieldsInsert@. +module DFAReporting.CreativeFields.Insert + ( + -- * REST Resource + CreativeFieldsInsertAPI + + -- * Creating a Request + , creativeFieldsInsert + , CreativeFieldsInsert + + -- * Request Lenses + , cfiQuotaUser + , cfiPrettyPrint + , cfiUserIp + , cfiProfileId + , cfiKey + , cfiOauthToken + , cfiFields + , cfiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsInsert@ which the +-- 'CreativeFieldsInsert' request conforms to. +type CreativeFieldsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> Post '[JSON] CreativeField + +-- | Inserts a new creative field. +-- +-- /See:/ 'creativeFieldsInsert' smart constructor. +data CreativeFieldsInsert = CreativeFieldsInsert + { _cfiQuotaUser :: !(Maybe Text) + , _cfiPrettyPrint :: !Bool + , _cfiUserIp :: !(Maybe Text) + , _cfiProfileId :: !Int64 + , _cfiKey :: !(Maybe Text) + , _cfiOauthToken :: !(Maybe Text) + , _cfiFields :: !(Maybe Text) + , _cfiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfiQuotaUser' +-- +-- * 'cfiPrettyPrint' +-- +-- * 'cfiUserIp' +-- +-- * 'cfiProfileId' +-- +-- * 'cfiKey' +-- +-- * 'cfiOauthToken' +-- +-- * 'cfiFields' +-- +-- * 'cfiAlt' +creativeFieldsInsert + :: Int64 -- ^ 'profileId' + -> CreativeFieldsInsert +creativeFieldsInsert pCfiProfileId_ = + CreativeFieldsInsert + { _cfiQuotaUser = Nothing + , _cfiPrettyPrint = True + , _cfiUserIp = Nothing + , _cfiProfileId = pCfiProfileId_ + , _cfiKey = Nothing + , _cfiOauthToken = Nothing + , _cfiFields = Nothing + , _cfiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfiQuotaUser :: Lens' CreativeFieldsInsert' (Maybe Text) +cfiQuotaUser + = lens _cfiQuotaUser (\ s a -> s{_cfiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfiPrettyPrint :: Lens' CreativeFieldsInsert' Bool +cfiPrettyPrint + = lens _cfiPrettyPrint + (\ s a -> s{_cfiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfiUserIp :: Lens' CreativeFieldsInsert' (Maybe Text) +cfiUserIp + = lens _cfiUserIp (\ s a -> s{_cfiUserIp = a}) + +-- | User profile ID associated with this request. +cfiProfileId :: Lens' CreativeFieldsInsert' Int64 +cfiProfileId + = lens _cfiProfileId (\ s a -> s{_cfiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfiKey :: Lens' CreativeFieldsInsert' (Maybe Text) +cfiKey = lens _cfiKey (\ s a -> s{_cfiKey = a}) + +-- | OAuth 2.0 token for the current user. +cfiOauthToken :: Lens' CreativeFieldsInsert' (Maybe Text) +cfiOauthToken + = lens _cfiOauthToken + (\ s a -> s{_cfiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfiFields :: Lens' CreativeFieldsInsert' (Maybe Text) +cfiFields + = lens _cfiFields (\ s a -> s{_cfiFields = a}) + +-- | Data format for the response. +cfiAlt :: Lens' CreativeFieldsInsert' Text +cfiAlt = lens _cfiAlt (\ s a -> s{_cfiAlt = a}) + +instance GoogleRequest CreativeFieldsInsert' where + type Rs CreativeFieldsInsert' = CreativeField + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsInsert{..} + = go _cfiQuotaUser _cfiPrettyPrint _cfiUserIp + _cfiProfileId + _cfiKey + _cfiOauthToken + _cfiFields + _cfiAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/List.hs new file mode 100644 index 000000000..f11ffd3d9 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/List.hs @@ -0,0 +1,254 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of creative fields, possibly filtered. +-- +-- /See:/ for @DfareportingCreativeFieldsList@. +module DFAReporting.CreativeFields.List + ( + -- * REST Resource + CreativeFieldsListAPI + + -- * Creating a Request + , creativeFieldsList + , CreativeFieldsList + + -- * Request Lenses + , cflQuotaUser + , cflPrettyPrint + , cflUserIp + , cflSearchString + , cflIds + , cflProfileId + , cflSortOrder + , cflKey + , cflPageToken + , cflSortField + , cflOauthToken + , cflAdvertiserIds + , cflMaxResults + , cflFields + , cflAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsList@ which the +-- 'CreativeFieldsList' request conforms to. +type CreativeFieldsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "advertiserIds" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CreativeFieldsListResponse + +-- | Retrieves a list of creative fields, possibly filtered. +-- +-- /See:/ 'creativeFieldsList' smart constructor. +data CreativeFieldsList = CreativeFieldsList + { _cflQuotaUser :: !(Maybe Text) + , _cflPrettyPrint :: !Bool + , _cflUserIp :: !(Maybe Text) + , _cflSearchString :: !(Maybe Text) + , _cflIds :: !(Maybe Int64) + , _cflProfileId :: !Int64 + , _cflSortOrder :: !(Maybe Text) + , _cflKey :: !(Maybe Text) + , _cflPageToken :: !(Maybe Text) + , _cflSortField :: !(Maybe Text) + , _cflOauthToken :: !(Maybe Text) + , _cflAdvertiserIds :: !(Maybe Int64) + , _cflMaxResults :: !(Maybe Int32) + , _cflFields :: !(Maybe Text) + , _cflAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cflQuotaUser' +-- +-- * 'cflPrettyPrint' +-- +-- * 'cflUserIp' +-- +-- * 'cflSearchString' +-- +-- * 'cflIds' +-- +-- * 'cflProfileId' +-- +-- * 'cflSortOrder' +-- +-- * 'cflKey' +-- +-- * 'cflPageToken' +-- +-- * 'cflSortField' +-- +-- * 'cflOauthToken' +-- +-- * 'cflAdvertiserIds' +-- +-- * 'cflMaxResults' +-- +-- * 'cflFields' +-- +-- * 'cflAlt' +creativeFieldsList + :: Int64 -- ^ 'profileId' + -> CreativeFieldsList +creativeFieldsList pCflProfileId_ = + CreativeFieldsList + { _cflQuotaUser = Nothing + , _cflPrettyPrint = True + , _cflUserIp = Nothing + , _cflSearchString = Nothing + , _cflIds = Nothing + , _cflProfileId = pCflProfileId_ + , _cflSortOrder = Nothing + , _cflKey = Nothing + , _cflPageToken = Nothing + , _cflSortField = Nothing + , _cflOauthToken = Nothing + , _cflAdvertiserIds = Nothing + , _cflMaxResults = Nothing + , _cflFields = Nothing + , _cflAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cflQuotaUser :: Lens' CreativeFieldsList' (Maybe Text) +cflQuotaUser + = lens _cflQuotaUser (\ s a -> s{_cflQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cflPrettyPrint :: Lens' CreativeFieldsList' Bool +cflPrettyPrint + = lens _cflPrettyPrint + (\ s a -> s{_cflPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cflUserIp :: Lens' CreativeFieldsList' (Maybe Text) +cflUserIp + = lens _cflUserIp (\ s a -> s{_cflUserIp = a}) + +-- | Allows searching for creative fields by name or ID. Wildcards (*) are +-- allowed. For example, \"creativefield*2015\" will return creative fields +-- with names like \"creativefield June 2015\", \"creativefield April +-- 2015\", or simply \"creativefield 2015\". Most of the searches also add +-- wild-cards implicitly at the start and the end of the search string. For +-- example, a search string of \"creativefield\" will match creative fields +-- with the name \"my creativefield\", \"creativefield 2015\", or simply +-- \"creativefield\". +cflSearchString :: Lens' CreativeFieldsList' (Maybe Text) +cflSearchString + = lens _cflSearchString + (\ s a -> s{_cflSearchString = a}) + +-- | Select only creative fields with these IDs. +cflIds :: Lens' CreativeFieldsList' (Maybe Int64) +cflIds = lens _cflIds (\ s a -> s{_cflIds = a}) + +-- | User profile ID associated with this request. +cflProfileId :: Lens' CreativeFieldsList' Int64 +cflProfileId + = lens _cflProfileId (\ s a -> s{_cflProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +cflSortOrder :: Lens' CreativeFieldsList' (Maybe Text) +cflSortOrder + = lens _cflSortOrder (\ s a -> s{_cflSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cflKey :: Lens' CreativeFieldsList' (Maybe Text) +cflKey = lens _cflKey (\ s a -> s{_cflKey = a}) + +-- | Value of the nextPageToken from the previous result page. +cflPageToken :: Lens' CreativeFieldsList' (Maybe Text) +cflPageToken + = lens _cflPageToken (\ s a -> s{_cflPageToken = a}) + +-- | Field by which to sort the list. +cflSortField :: Lens' CreativeFieldsList' (Maybe Text) +cflSortField + = lens _cflSortField (\ s a -> s{_cflSortField = a}) + +-- | OAuth 2.0 token for the current user. +cflOauthToken :: Lens' CreativeFieldsList' (Maybe Text) +cflOauthToken + = lens _cflOauthToken + (\ s a -> s{_cflOauthToken = a}) + +-- | Select only creative fields that belong to these advertisers. +cflAdvertiserIds :: Lens' CreativeFieldsList' (Maybe Int64) +cflAdvertiserIds + = lens _cflAdvertiserIds + (\ s a -> s{_cflAdvertiserIds = a}) + +-- | Maximum number of results to return. +cflMaxResults :: Lens' CreativeFieldsList' (Maybe Int32) +cflMaxResults + = lens _cflMaxResults + (\ s a -> s{_cflMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cflFields :: Lens' CreativeFieldsList' (Maybe Text) +cflFields + = lens _cflFields (\ s a -> s{_cflFields = a}) + +-- | Data format for the response. +cflAlt :: Lens' CreativeFieldsList' Text +cflAlt = lens _cflAlt (\ s a -> s{_cflAlt = a}) + +instance GoogleRequest CreativeFieldsList' where + type Rs CreativeFieldsList' = + CreativeFieldsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsList{..} + = go _cflQuotaUser _cflPrettyPrint _cflUserIp + _cflSearchString + _cflIds + _cflProfileId + _cflSortOrder + _cflKey + _cflPageToken + _cflSortField + _cflOauthToken + _cflAdvertiserIds + _cflMaxResults + _cflFields + _cflAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Patch.hs new file mode 100644 index 000000000..15c80dfd8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Patch.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative field. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingCreativeFieldsPatch@. +module DFAReporting.CreativeFields.Patch + ( + -- * REST Resource + CreativeFieldsPatchAPI + + -- * Creating a Request + , creativeFieldsPatch + , CreativeFieldsPatch + + -- * Request Lenses + , cfpQuotaUser + , cfpPrettyPrint + , cfpUserIp + , cfpProfileId + , cfpKey + , cfpId + , cfpOauthToken + , cfpFields + , cfpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsPatch@ which the +-- 'CreativeFieldsPatch' request conforms to. +type CreativeFieldsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> + QueryParam "id" Int64 :> Patch '[JSON] CreativeField + +-- | Updates an existing creative field. This method supports patch +-- semantics. +-- +-- /See:/ 'creativeFieldsPatch' smart constructor. +data CreativeFieldsPatch = CreativeFieldsPatch + { _cfpQuotaUser :: !(Maybe Text) + , _cfpPrettyPrint :: !Bool + , _cfpUserIp :: !(Maybe Text) + , _cfpProfileId :: !Int64 + , _cfpKey :: !(Maybe Text) + , _cfpId :: !Int64 + , _cfpOauthToken :: !(Maybe Text) + , _cfpFields :: !(Maybe Text) + , _cfpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfpQuotaUser' +-- +-- * 'cfpPrettyPrint' +-- +-- * 'cfpUserIp' +-- +-- * 'cfpProfileId' +-- +-- * 'cfpKey' +-- +-- * 'cfpId' +-- +-- * 'cfpOauthToken' +-- +-- * 'cfpFields' +-- +-- * 'cfpAlt' +creativeFieldsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeFieldsPatch +creativeFieldsPatch pCfpProfileId_ pCfpId_ = + CreativeFieldsPatch + { _cfpQuotaUser = Nothing + , _cfpPrettyPrint = True + , _cfpUserIp = Nothing + , _cfpProfileId = pCfpProfileId_ + , _cfpKey = Nothing + , _cfpId = pCfpId_ + , _cfpOauthToken = Nothing + , _cfpFields = Nothing + , _cfpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfpQuotaUser :: Lens' CreativeFieldsPatch' (Maybe Text) +cfpQuotaUser + = lens _cfpQuotaUser (\ s a -> s{_cfpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfpPrettyPrint :: Lens' CreativeFieldsPatch' Bool +cfpPrettyPrint + = lens _cfpPrettyPrint + (\ s a -> s{_cfpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfpUserIp :: Lens' CreativeFieldsPatch' (Maybe Text) +cfpUserIp + = lens _cfpUserIp (\ s a -> s{_cfpUserIp = a}) + +-- | User profile ID associated with this request. +cfpProfileId :: Lens' CreativeFieldsPatch' Int64 +cfpProfileId + = lens _cfpProfileId (\ s a -> s{_cfpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfpKey :: Lens' CreativeFieldsPatch' (Maybe Text) +cfpKey = lens _cfpKey (\ s a -> s{_cfpKey = a}) + +-- | Creative Field ID +cfpId :: Lens' CreativeFieldsPatch' Int64 +cfpId = lens _cfpId (\ s a -> s{_cfpId = a}) + +-- | OAuth 2.0 token for the current user. +cfpOauthToken :: Lens' CreativeFieldsPatch' (Maybe Text) +cfpOauthToken + = lens _cfpOauthToken + (\ s a -> s{_cfpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfpFields :: Lens' CreativeFieldsPatch' (Maybe Text) +cfpFields + = lens _cfpFields (\ s a -> s{_cfpFields = a}) + +-- | Data format for the response. +cfpAlt :: Lens' CreativeFieldsPatch' Text +cfpAlt = lens _cfpAlt (\ s a -> s{_cfpAlt = a}) + +instance GoogleRequest CreativeFieldsPatch' where + type Rs CreativeFieldsPatch' = CreativeField + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsPatch{..} + = go _cfpQuotaUser _cfpPrettyPrint _cfpUserIp + _cfpProfileId + _cfpKey + (Just _cfpId) + _cfpOauthToken + _cfpFields + _cfpAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs new file mode 100644 index 000000000..6ce1408d2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeFields.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative field. +-- +-- /See:/ for @DfareportingCreativeFieldsUpdate@. +module DFAReporting.CreativeFields.Update + ( + -- * REST Resource + CreativeFieldsUpdateAPI + + -- * Creating a Request + , creativeFieldsUpdate + , CreativeFieldsUpdate + + -- * Request Lenses + , cfuQuotaUser + , cfuPrettyPrint + , cfuUserIp + , cfuProfileId + , cfuKey + , cfuOauthToken + , cfuFields + , cfuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeFieldsUpdate@ which the +-- 'CreativeFieldsUpdate' request conforms to. +type CreativeFieldsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeFields" :> Put '[JSON] CreativeField + +-- | Updates an existing creative field. +-- +-- /See:/ 'creativeFieldsUpdate' smart constructor. +data CreativeFieldsUpdate = CreativeFieldsUpdate + { _cfuQuotaUser :: !(Maybe Text) + , _cfuPrettyPrint :: !Bool + , _cfuUserIp :: !(Maybe Text) + , _cfuProfileId :: !Int64 + , _cfuKey :: !(Maybe Text) + , _cfuOauthToken :: !(Maybe Text) + , _cfuFields :: !(Maybe Text) + , _cfuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeFieldsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfuQuotaUser' +-- +-- * 'cfuPrettyPrint' +-- +-- * 'cfuUserIp' +-- +-- * 'cfuProfileId' +-- +-- * 'cfuKey' +-- +-- * 'cfuOauthToken' +-- +-- * 'cfuFields' +-- +-- * 'cfuAlt' +creativeFieldsUpdate + :: Int64 -- ^ 'profileId' + -> CreativeFieldsUpdate +creativeFieldsUpdate pCfuProfileId_ = + CreativeFieldsUpdate + { _cfuQuotaUser = Nothing + , _cfuPrettyPrint = True + , _cfuUserIp = Nothing + , _cfuProfileId = pCfuProfileId_ + , _cfuKey = Nothing + , _cfuOauthToken = Nothing + , _cfuFields = Nothing + , _cfuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfuQuotaUser :: Lens' CreativeFieldsUpdate' (Maybe Text) +cfuQuotaUser + = lens _cfuQuotaUser (\ s a -> s{_cfuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfuPrettyPrint :: Lens' CreativeFieldsUpdate' Bool +cfuPrettyPrint + = lens _cfuPrettyPrint + (\ s a -> s{_cfuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfuUserIp :: Lens' CreativeFieldsUpdate' (Maybe Text) +cfuUserIp + = lens _cfuUserIp (\ s a -> s{_cfuUserIp = a}) + +-- | User profile ID associated with this request. +cfuProfileId :: Lens' CreativeFieldsUpdate' Int64 +cfuProfileId + = lens _cfuProfileId (\ s a -> s{_cfuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfuKey :: Lens' CreativeFieldsUpdate' (Maybe Text) +cfuKey = lens _cfuKey (\ s a -> s{_cfuKey = a}) + +-- | OAuth 2.0 token for the current user. +cfuOauthToken :: Lens' CreativeFieldsUpdate' (Maybe Text) +cfuOauthToken + = lens _cfuOauthToken + (\ s a -> s{_cfuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfuFields :: Lens' CreativeFieldsUpdate' (Maybe Text) +cfuFields + = lens _cfuFields (\ s a -> s{_cfuFields = a}) + +-- | Data format for the response. +cfuAlt :: Lens' CreativeFieldsUpdate' Text +cfuAlt = lens _cfuAlt (\ s a -> s{_cfuAlt = a}) + +instance GoogleRequest CreativeFieldsUpdate' where + type Rs CreativeFieldsUpdate' = CreativeField + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeFieldsUpdate{..} + = go _cfuQuotaUser _cfuPrettyPrint _cfuUserIp + _cfuProfileId + _cfuKey + _cfuOauthToken + _cfuFields + _cfuAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeFieldsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Get.hs new file mode 100644 index 000000000..e29f07ca0 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one creative group by ID. +-- +-- /See:/ for @DfareportingCreativeGroupsGet@. +module DFAReporting.CreativeGroups.Get + ( + -- * REST Resource + CreativeGroupsGetAPI + + -- * Creating a Request + , creativeGroupsGet + , CreativeGroupsGet + + -- * Request Lenses + , cggQuotaUser + , cggPrettyPrint + , cggUserIp + , cggProfileId + , cggKey + , cggId + , cggOauthToken + , cggFields + , cggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeGroupsGet@ which the +-- 'CreativeGroupsGet' request conforms to. +type CreativeGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeGroups" :> + Capture "id" Int64 :> Get '[JSON] CreativeGroup + +-- | Gets one creative group by ID. +-- +-- /See:/ 'creativeGroupsGet' smart constructor. +data CreativeGroupsGet = CreativeGroupsGet + { _cggQuotaUser :: !(Maybe Text) + , _cggPrettyPrint :: !Bool + , _cggUserIp :: !(Maybe Text) + , _cggProfileId :: !Int64 + , _cggKey :: !(Maybe Text) + , _cggId :: !Int64 + , _cggOauthToken :: !(Maybe Text) + , _cggFields :: !(Maybe Text) + , _cggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cggQuotaUser' +-- +-- * 'cggPrettyPrint' +-- +-- * 'cggUserIp' +-- +-- * 'cggProfileId' +-- +-- * 'cggKey' +-- +-- * 'cggId' +-- +-- * 'cggOauthToken' +-- +-- * 'cggFields' +-- +-- * 'cggAlt' +creativeGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeGroupsGet +creativeGroupsGet pCggProfileId_ pCggId_ = + CreativeGroupsGet + { _cggQuotaUser = Nothing + , _cggPrettyPrint = True + , _cggUserIp = Nothing + , _cggProfileId = pCggProfileId_ + , _cggKey = Nothing + , _cggId = pCggId_ + , _cggOauthToken = Nothing + , _cggFields = Nothing + , _cggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cggQuotaUser :: Lens' CreativeGroupsGet' (Maybe Text) +cggQuotaUser + = lens _cggQuotaUser (\ s a -> s{_cggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cggPrettyPrint :: Lens' CreativeGroupsGet' Bool +cggPrettyPrint + = lens _cggPrettyPrint + (\ s a -> s{_cggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cggUserIp :: Lens' CreativeGroupsGet' (Maybe Text) +cggUserIp + = lens _cggUserIp (\ s a -> s{_cggUserIp = a}) + +-- | User profile ID associated with this request. +cggProfileId :: Lens' CreativeGroupsGet' Int64 +cggProfileId + = lens _cggProfileId (\ s a -> s{_cggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cggKey :: Lens' CreativeGroupsGet' (Maybe Text) +cggKey = lens _cggKey (\ s a -> s{_cggKey = a}) + +-- | Creative group ID. +cggId :: Lens' CreativeGroupsGet' Int64 +cggId = lens _cggId (\ s a -> s{_cggId = a}) + +-- | OAuth 2.0 token for the current user. +cggOauthToken :: Lens' CreativeGroupsGet' (Maybe Text) +cggOauthToken + = lens _cggOauthToken + (\ s a -> s{_cggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cggFields :: Lens' CreativeGroupsGet' (Maybe Text) +cggFields + = lens _cggFields (\ s a -> s{_cggFields = a}) + +-- | Data format for the response. +cggAlt :: Lens' CreativeGroupsGet' Text +cggAlt = lens _cggAlt (\ s a -> s{_cggAlt = a}) + +instance GoogleRequest CreativeGroupsGet' where + type Rs CreativeGroupsGet' = CreativeGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeGroupsGet{..} + = go _cggQuotaUser _cggPrettyPrint _cggUserIp + _cggProfileId + _cggKey + _cggId + _cggOauthToken + _cggFields + _cggAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Insert.hs new file mode 100644 index 000000000..378974995 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeGroups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new creative group. +-- +-- /See:/ for @DfareportingCreativeGroupsInsert@. +module DFAReporting.CreativeGroups.Insert + ( + -- * REST Resource + CreativeGroupsInsertAPI + + -- * Creating a Request + , creativeGroupsInsert + , CreativeGroupsInsert + + -- * Request Lenses + , cgiQuotaUser + , cgiPrettyPrint + , cgiUserIp + , cgiProfileId + , cgiKey + , cgiOauthToken + , cgiFields + , cgiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeGroupsInsert@ which the +-- 'CreativeGroupsInsert' request conforms to. +type CreativeGroupsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeGroups" :> Post '[JSON] CreativeGroup + +-- | Inserts a new creative group. +-- +-- /See:/ 'creativeGroupsInsert' smart constructor. +data CreativeGroupsInsert = CreativeGroupsInsert + { _cgiQuotaUser :: !(Maybe Text) + , _cgiPrettyPrint :: !Bool + , _cgiUserIp :: !(Maybe Text) + , _cgiProfileId :: !Int64 + , _cgiKey :: !(Maybe Text) + , _cgiOauthToken :: !(Maybe Text) + , _cgiFields :: !(Maybe Text) + , _cgiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgiQuotaUser' +-- +-- * 'cgiPrettyPrint' +-- +-- * 'cgiUserIp' +-- +-- * 'cgiProfileId' +-- +-- * 'cgiKey' +-- +-- * 'cgiOauthToken' +-- +-- * 'cgiFields' +-- +-- * 'cgiAlt' +creativeGroupsInsert + :: Int64 -- ^ 'profileId' + -> CreativeGroupsInsert +creativeGroupsInsert pCgiProfileId_ = + CreativeGroupsInsert + { _cgiQuotaUser = Nothing + , _cgiPrettyPrint = True + , _cgiUserIp = Nothing + , _cgiProfileId = pCgiProfileId_ + , _cgiKey = Nothing + , _cgiOauthToken = Nothing + , _cgiFields = Nothing + , _cgiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgiQuotaUser :: Lens' CreativeGroupsInsert' (Maybe Text) +cgiQuotaUser + = lens _cgiQuotaUser (\ s a -> s{_cgiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgiPrettyPrint :: Lens' CreativeGroupsInsert' Bool +cgiPrettyPrint + = lens _cgiPrettyPrint + (\ s a -> s{_cgiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgiUserIp :: Lens' CreativeGroupsInsert' (Maybe Text) +cgiUserIp + = lens _cgiUserIp (\ s a -> s{_cgiUserIp = a}) + +-- | User profile ID associated with this request. +cgiProfileId :: Lens' CreativeGroupsInsert' Int64 +cgiProfileId + = lens _cgiProfileId (\ s a -> s{_cgiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgiKey :: Lens' CreativeGroupsInsert' (Maybe Text) +cgiKey = lens _cgiKey (\ s a -> s{_cgiKey = a}) + +-- | OAuth 2.0 token for the current user. +cgiOauthToken :: Lens' CreativeGroupsInsert' (Maybe Text) +cgiOauthToken + = lens _cgiOauthToken + (\ s a -> s{_cgiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgiFields :: Lens' CreativeGroupsInsert' (Maybe Text) +cgiFields + = lens _cgiFields (\ s a -> s{_cgiFields = a}) + +-- | Data format for the response. +cgiAlt :: Lens' CreativeGroupsInsert' Text +cgiAlt = lens _cgiAlt (\ s a -> s{_cgiAlt = a}) + +instance GoogleRequest CreativeGroupsInsert' where + type Rs CreativeGroupsInsert' = CreativeGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeGroupsInsert{..} + = go _cgiQuotaUser _cgiPrettyPrint _cgiUserIp + _cgiProfileId + _cgiKey + _cgiOauthToken + _cgiFields + _cgiAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeGroupsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/List.hs new file mode 100644 index 000000000..9e8b4e81b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/List.hs @@ -0,0 +1,267 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of creative groups, possibly filtered. +-- +-- /See:/ for @DfareportingCreativeGroupsList@. +module DFAReporting.CreativeGroups.List + ( + -- * REST Resource + CreativeGroupsListAPI + + -- * Creating a Request + , creativeGroupsList + , CreativeGroupsList + + -- * Request Lenses + , cglQuotaUser + , cglPrettyPrint + , cglUserIp + , cglSearchString + , cglIds + , cglProfileId + , cglSortOrder + , cglGroupNumber + , cglKey + , cglPageToken + , cglSortField + , cglOauthToken + , cglAdvertiserIds + , cglMaxResults + , cglFields + , cglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeGroupsList@ which the +-- 'CreativeGroupsList' request conforms to. +type CreativeGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeGroups" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "groupNumber" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "advertiserIds" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CreativeGroupsListResponse + +-- | Retrieves a list of creative groups, possibly filtered. +-- +-- /See:/ 'creativeGroupsList' smart constructor. +data CreativeGroupsList = CreativeGroupsList + { _cglQuotaUser :: !(Maybe Text) + , _cglPrettyPrint :: !Bool + , _cglUserIp :: !(Maybe Text) + , _cglSearchString :: !(Maybe Text) + , _cglIds :: !(Maybe Int64) + , _cglProfileId :: !Int64 + , _cglSortOrder :: !(Maybe Text) + , _cglGroupNumber :: !(Maybe Int32) + , _cglKey :: !(Maybe Text) + , _cglPageToken :: !(Maybe Text) + , _cglSortField :: !(Maybe Text) + , _cglOauthToken :: !(Maybe Text) + , _cglAdvertiserIds :: !(Maybe Int64) + , _cglMaxResults :: !(Maybe Int32) + , _cglFields :: !(Maybe Text) + , _cglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cglQuotaUser' +-- +-- * 'cglPrettyPrint' +-- +-- * 'cglUserIp' +-- +-- * 'cglSearchString' +-- +-- * 'cglIds' +-- +-- * 'cglProfileId' +-- +-- * 'cglSortOrder' +-- +-- * 'cglGroupNumber' +-- +-- * 'cglKey' +-- +-- * 'cglPageToken' +-- +-- * 'cglSortField' +-- +-- * 'cglOauthToken' +-- +-- * 'cglAdvertiserIds' +-- +-- * 'cglMaxResults' +-- +-- * 'cglFields' +-- +-- * 'cglAlt' +creativeGroupsList + :: Int64 -- ^ 'profileId' + -> CreativeGroupsList +creativeGroupsList pCglProfileId_ = + CreativeGroupsList + { _cglQuotaUser = Nothing + , _cglPrettyPrint = True + , _cglUserIp = Nothing + , _cglSearchString = Nothing + , _cglIds = Nothing + , _cglProfileId = pCglProfileId_ + , _cglSortOrder = Nothing + , _cglGroupNumber = Nothing + , _cglKey = Nothing + , _cglPageToken = Nothing + , _cglSortField = Nothing + , _cglOauthToken = Nothing + , _cglAdvertiserIds = Nothing + , _cglMaxResults = Nothing + , _cglFields = Nothing + , _cglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cglQuotaUser :: Lens' CreativeGroupsList' (Maybe Text) +cglQuotaUser + = lens _cglQuotaUser (\ s a -> s{_cglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cglPrettyPrint :: Lens' CreativeGroupsList' Bool +cglPrettyPrint + = lens _cglPrettyPrint + (\ s a -> s{_cglPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cglUserIp :: Lens' CreativeGroupsList' (Maybe Text) +cglUserIp + = lens _cglUserIp (\ s a -> s{_cglUserIp = a}) + +-- | Allows searching for creative groups by name or ID. Wildcards (*) are +-- allowed. For example, \"creativegroup*2015\" will return creative groups +-- with names like \"creativegroup June 2015\", \"creativegroup April +-- 2015\", or simply \"creativegroup 2015\". Most of the searches also add +-- wild-cards implicitly at the start and the end of the search string. For +-- example, a search string of \"creativegroup\" will match creative groups +-- with the name \"my creativegroup\", \"creativegroup 2015\", or simply +-- \"creativegroup\". +cglSearchString :: Lens' CreativeGroupsList' (Maybe Text) +cglSearchString + = lens _cglSearchString + (\ s a -> s{_cglSearchString = a}) + +-- | Select only creative groups with these IDs. +cglIds :: Lens' CreativeGroupsList' (Maybe Int64) +cglIds = lens _cglIds (\ s a -> s{_cglIds = a}) + +-- | User profile ID associated with this request. +cglProfileId :: Lens' CreativeGroupsList' Int64 +cglProfileId + = lens _cglProfileId (\ s a -> s{_cglProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +cglSortOrder :: Lens' CreativeGroupsList' (Maybe Text) +cglSortOrder + = lens _cglSortOrder (\ s a -> s{_cglSortOrder = a}) + +-- | Select only creative groups that belong to this subgroup. +cglGroupNumber :: Lens' CreativeGroupsList' (Maybe Int32) +cglGroupNumber + = lens _cglGroupNumber + (\ s a -> s{_cglGroupNumber = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cglKey :: Lens' CreativeGroupsList' (Maybe Text) +cglKey = lens _cglKey (\ s a -> s{_cglKey = a}) + +-- | Value of the nextPageToken from the previous result page. +cglPageToken :: Lens' CreativeGroupsList' (Maybe Text) +cglPageToken + = lens _cglPageToken (\ s a -> s{_cglPageToken = a}) + +-- | Field by which to sort the list. +cglSortField :: Lens' CreativeGroupsList' (Maybe Text) +cglSortField + = lens _cglSortField (\ s a -> s{_cglSortField = a}) + +-- | OAuth 2.0 token for the current user. +cglOauthToken :: Lens' CreativeGroupsList' (Maybe Text) +cglOauthToken + = lens _cglOauthToken + (\ s a -> s{_cglOauthToken = a}) + +-- | Select only creative groups that belong to these advertisers. +cglAdvertiserIds :: Lens' CreativeGroupsList' (Maybe Int64) +cglAdvertiserIds + = lens _cglAdvertiserIds + (\ s a -> s{_cglAdvertiserIds = a}) + +-- | Maximum number of results to return. +cglMaxResults :: Lens' CreativeGroupsList' (Maybe Int32) +cglMaxResults + = lens _cglMaxResults + (\ s a -> s{_cglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cglFields :: Lens' CreativeGroupsList' (Maybe Text) +cglFields + = lens _cglFields (\ s a -> s{_cglFields = a}) + +-- | Data format for the response. +cglAlt :: Lens' CreativeGroupsList' Text +cglAlt = lens _cglAlt (\ s a -> s{_cglAlt = a}) + +instance GoogleRequest CreativeGroupsList' where + type Rs CreativeGroupsList' = + CreativeGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeGroupsList{..} + = go _cglQuotaUser _cglPrettyPrint _cglUserIp + _cglSearchString + _cglIds + _cglProfileId + _cglSortOrder + _cglGroupNumber + _cglKey + _cglPageToken + _cglSortField + _cglOauthToken + _cglAdvertiserIds + _cglMaxResults + _cglFields + _cglAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Patch.hs new file mode 100644 index 000000000..9891f6dad --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Patch.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeGroups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative group. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingCreativeGroupsPatch@. +module DFAReporting.CreativeGroups.Patch + ( + -- * REST Resource + CreativeGroupsPatchAPI + + -- * Creating a Request + , creativeGroupsPatch + , CreativeGroupsPatch + + -- * Request Lenses + , cgpQuotaUser + , cgpPrettyPrint + , cgpUserIp + , cgpProfileId + , cgpKey + , cgpId + , cgpOauthToken + , cgpFields + , cgpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeGroupsPatch@ which the +-- 'CreativeGroupsPatch' request conforms to. +type CreativeGroupsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeGroups" :> + QueryParam "id" Int64 :> Patch '[JSON] CreativeGroup + +-- | Updates an existing creative group. This method supports patch +-- semantics. +-- +-- /See:/ 'creativeGroupsPatch' smart constructor. +data CreativeGroupsPatch = CreativeGroupsPatch + { _cgpQuotaUser :: !(Maybe Text) + , _cgpPrettyPrint :: !Bool + , _cgpUserIp :: !(Maybe Text) + , _cgpProfileId :: !Int64 + , _cgpKey :: !(Maybe Text) + , _cgpId :: !Int64 + , _cgpOauthToken :: !(Maybe Text) + , _cgpFields :: !(Maybe Text) + , _cgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgpQuotaUser' +-- +-- * 'cgpPrettyPrint' +-- +-- * 'cgpUserIp' +-- +-- * 'cgpProfileId' +-- +-- * 'cgpKey' +-- +-- * 'cgpId' +-- +-- * 'cgpOauthToken' +-- +-- * 'cgpFields' +-- +-- * 'cgpAlt' +creativeGroupsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativeGroupsPatch +creativeGroupsPatch pCgpProfileId_ pCgpId_ = + CreativeGroupsPatch + { _cgpQuotaUser = Nothing + , _cgpPrettyPrint = True + , _cgpUserIp = Nothing + , _cgpProfileId = pCgpProfileId_ + , _cgpKey = Nothing + , _cgpId = pCgpId_ + , _cgpOauthToken = Nothing + , _cgpFields = Nothing + , _cgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgpQuotaUser :: Lens' CreativeGroupsPatch' (Maybe Text) +cgpQuotaUser + = lens _cgpQuotaUser (\ s a -> s{_cgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgpPrettyPrint :: Lens' CreativeGroupsPatch' Bool +cgpPrettyPrint + = lens _cgpPrettyPrint + (\ s a -> s{_cgpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgpUserIp :: Lens' CreativeGroupsPatch' (Maybe Text) +cgpUserIp + = lens _cgpUserIp (\ s a -> s{_cgpUserIp = a}) + +-- | User profile ID associated with this request. +cgpProfileId :: Lens' CreativeGroupsPatch' Int64 +cgpProfileId + = lens _cgpProfileId (\ s a -> s{_cgpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgpKey :: Lens' CreativeGroupsPatch' (Maybe Text) +cgpKey = lens _cgpKey (\ s a -> s{_cgpKey = a}) + +-- | Creative group ID. +cgpId :: Lens' CreativeGroupsPatch' Int64 +cgpId = lens _cgpId (\ s a -> s{_cgpId = a}) + +-- | OAuth 2.0 token for the current user. +cgpOauthToken :: Lens' CreativeGroupsPatch' (Maybe Text) +cgpOauthToken + = lens _cgpOauthToken + (\ s a -> s{_cgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgpFields :: Lens' CreativeGroupsPatch' (Maybe Text) +cgpFields + = lens _cgpFields (\ s a -> s{_cgpFields = a}) + +-- | Data format for the response. +cgpAlt :: Lens' CreativeGroupsPatch' Text +cgpAlt = lens _cgpAlt (\ s a -> s{_cgpAlt = a}) + +instance GoogleRequest CreativeGroupsPatch' where + type Rs CreativeGroupsPatch' = CreativeGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeGroupsPatch{..} + = go _cgpQuotaUser _cgpPrettyPrint _cgpUserIp + _cgpProfileId + _cgpKey + (Just _cgpId) + _cgpOauthToken + _cgpFields + _cgpAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeGroupsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Update.hs new file mode 100644 index 000000000..d6d07e50d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.CreativeGroups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative group. +-- +-- /See:/ for @DfareportingCreativeGroupsUpdate@. +module DFAReporting.CreativeGroups.Update + ( + -- * REST Resource + CreativeGroupsUpdateAPI + + -- * Creating a Request + , creativeGroupsUpdate + , CreativeGroupsUpdate + + -- * Request Lenses + , cguQuotaUser + , cguPrettyPrint + , cguUserIp + , cguProfileId + , cguKey + , cguOauthToken + , cguFields + , cguAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativeGroupsUpdate@ which the +-- 'CreativeGroupsUpdate' request conforms to. +type CreativeGroupsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creativeGroups" :> Put '[JSON] CreativeGroup + +-- | Updates an existing creative group. +-- +-- /See:/ 'creativeGroupsUpdate' smart constructor. +data CreativeGroupsUpdate = CreativeGroupsUpdate + { _cguQuotaUser :: !(Maybe Text) + , _cguPrettyPrint :: !Bool + , _cguUserIp :: !(Maybe Text) + , _cguProfileId :: !Int64 + , _cguKey :: !(Maybe Text) + , _cguOauthToken :: !(Maybe Text) + , _cguFields :: !(Maybe Text) + , _cguAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativeGroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cguQuotaUser' +-- +-- * 'cguPrettyPrint' +-- +-- * 'cguUserIp' +-- +-- * 'cguProfileId' +-- +-- * 'cguKey' +-- +-- * 'cguOauthToken' +-- +-- * 'cguFields' +-- +-- * 'cguAlt' +creativeGroupsUpdate + :: Int64 -- ^ 'profileId' + -> CreativeGroupsUpdate +creativeGroupsUpdate pCguProfileId_ = + CreativeGroupsUpdate + { _cguQuotaUser = Nothing + , _cguPrettyPrint = True + , _cguUserIp = Nothing + , _cguProfileId = pCguProfileId_ + , _cguKey = Nothing + , _cguOauthToken = Nothing + , _cguFields = Nothing + , _cguAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cguQuotaUser :: Lens' CreativeGroupsUpdate' (Maybe Text) +cguQuotaUser + = lens _cguQuotaUser (\ s a -> s{_cguQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cguPrettyPrint :: Lens' CreativeGroupsUpdate' Bool +cguPrettyPrint + = lens _cguPrettyPrint + (\ s a -> s{_cguPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cguUserIp :: Lens' CreativeGroupsUpdate' (Maybe Text) +cguUserIp + = lens _cguUserIp (\ s a -> s{_cguUserIp = a}) + +-- | User profile ID associated with this request. +cguProfileId :: Lens' CreativeGroupsUpdate' Int64 +cguProfileId + = lens _cguProfileId (\ s a -> s{_cguProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cguKey :: Lens' CreativeGroupsUpdate' (Maybe Text) +cguKey = lens _cguKey (\ s a -> s{_cguKey = a}) + +-- | OAuth 2.0 token for the current user. +cguOauthToken :: Lens' CreativeGroupsUpdate' (Maybe Text) +cguOauthToken + = lens _cguOauthToken + (\ s a -> s{_cguOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cguFields :: Lens' CreativeGroupsUpdate' (Maybe Text) +cguFields + = lens _cguFields (\ s a -> s{_cguFields = a}) + +-- | Data format for the response. +cguAlt :: Lens' CreativeGroupsUpdate' Text +cguAlt = lens _cguAlt (\ s a -> s{_cguAlt = a}) + +instance GoogleRequest CreativeGroupsUpdate' where + type Rs CreativeGroupsUpdate' = CreativeGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativeGroupsUpdate{..} + = go _cguQuotaUser _cguPrettyPrint _cguUserIp + _cguProfileId + _cguKey + _cguOauthToken + _cguFields + _cguAlt + where go + = clientWithRoute + (Proxy :: Proxy CreativeGroupsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Get.hs new file mode 100644 index 000000000..2b146a5f2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Creatives.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one creative by ID. +-- +-- /See:/ for @DfareportingCreativesGet@. +module DFAReporting.Creatives.Get + ( + -- * REST Resource + CreativesGetAPI + + -- * Creating a Request + , creativesGet + , CreativesGet + + -- * Request Lenses + , crerQuotaUser + , crerPrettyPrint + , crerUserIp + , crerProfileId + , crerKey + , crerId + , crerOauthToken + , crerFields + , crerAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativesGet@ which the +-- 'CreativesGet' request conforms to. +type CreativesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creatives" :> + Capture "id" Int64 :> Get '[JSON] Creative + +-- | Gets one creative by ID. +-- +-- /See:/ 'creativesGet' smart constructor. +data CreativesGet = CreativesGet + { _crerQuotaUser :: !(Maybe Text) + , _crerPrettyPrint :: !Bool + , _crerUserIp :: !(Maybe Text) + , _crerProfileId :: !Int64 + , _crerKey :: !(Maybe Text) + , _crerId :: !Int64 + , _crerOauthToken :: !(Maybe Text) + , _crerFields :: !(Maybe Text) + , _crerAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crerQuotaUser' +-- +-- * 'crerPrettyPrint' +-- +-- * 'crerUserIp' +-- +-- * 'crerProfileId' +-- +-- * 'crerKey' +-- +-- * 'crerId' +-- +-- * 'crerOauthToken' +-- +-- * 'crerFields' +-- +-- * 'crerAlt' +creativesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativesGet +creativesGet pCrerProfileId_ pCrerId_ = + CreativesGet + { _crerQuotaUser = Nothing + , _crerPrettyPrint = True + , _crerUserIp = Nothing + , _crerProfileId = pCrerProfileId_ + , _crerKey = Nothing + , _crerId = pCrerId_ + , _crerOauthToken = Nothing + , _crerFields = Nothing + , _crerAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +crerQuotaUser :: Lens' CreativesGet' (Maybe Text) +crerQuotaUser + = lens _crerQuotaUser + (\ s a -> s{_crerQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +crerPrettyPrint :: Lens' CreativesGet' Bool +crerPrettyPrint + = lens _crerPrettyPrint + (\ s a -> s{_crerPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +crerUserIp :: Lens' CreativesGet' (Maybe Text) +crerUserIp + = lens _crerUserIp (\ s a -> s{_crerUserIp = a}) + +-- | User profile ID associated with this request. +crerProfileId :: Lens' CreativesGet' Int64 +crerProfileId + = lens _crerProfileId + (\ s a -> s{_crerProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +crerKey :: Lens' CreativesGet' (Maybe Text) +crerKey = lens _crerKey (\ s a -> s{_crerKey = a}) + +-- | Creative ID. +crerId :: Lens' CreativesGet' Int64 +crerId = lens _crerId (\ s a -> s{_crerId = a}) + +-- | OAuth 2.0 token for the current user. +crerOauthToken :: Lens' CreativesGet' (Maybe Text) +crerOauthToken + = lens _crerOauthToken + (\ s a -> s{_crerOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +crerFields :: Lens' CreativesGet' (Maybe Text) +crerFields + = lens _crerFields (\ s a -> s{_crerFields = a}) + +-- | Data format for the response. +crerAlt :: Lens' CreativesGet' Text +crerAlt = lens _crerAlt (\ s a -> s{_crerAlt = a}) + +instance GoogleRequest CreativesGet' where + type Rs CreativesGet' = Creative + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativesGet{..} + = go _crerQuotaUser _crerPrettyPrint _crerUserIp + _crerProfileId + _crerKey + _crerId + _crerOauthToken + _crerFields + _crerAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Insert.hs new file mode 100644 index 000000000..b97ed3c74 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Creatives.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new creative. +-- +-- /See:/ for @DfareportingCreativesInsert@. +module DFAReporting.Creatives.Insert + ( + -- * REST Resource + CreativesInsertAPI + + -- * Creating a Request + , creativesInsert + , CreativesInsert + + -- * Request Lenses + , creQuotaUser + , crePrettyPrint + , creUserIp + , creProfileId + , creKey + , creOauthToken + , creFields + , creAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativesInsert@ which the +-- 'CreativesInsert' request conforms to. +type CreativesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creatives" :> Post '[JSON] Creative + +-- | Inserts a new creative. +-- +-- /See:/ 'creativesInsert' smart constructor. +data CreativesInsert = CreativesInsert + { _creQuotaUser :: !(Maybe Text) + , _crePrettyPrint :: !Bool + , _creUserIp :: !(Maybe Text) + , _creProfileId :: !Int64 + , _creKey :: !(Maybe Text) + , _creOauthToken :: !(Maybe Text) + , _creFields :: !(Maybe Text) + , _creAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'creQuotaUser' +-- +-- * 'crePrettyPrint' +-- +-- * 'creUserIp' +-- +-- * 'creProfileId' +-- +-- * 'creKey' +-- +-- * 'creOauthToken' +-- +-- * 'creFields' +-- +-- * 'creAlt' +creativesInsert + :: Int64 -- ^ 'profileId' + -> CreativesInsert +creativesInsert pCreProfileId_ = + CreativesInsert + { _creQuotaUser = Nothing + , _crePrettyPrint = True + , _creUserIp = Nothing + , _creProfileId = pCreProfileId_ + , _creKey = Nothing + , _creOauthToken = Nothing + , _creFields = Nothing + , _creAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +creQuotaUser :: Lens' CreativesInsert' (Maybe Text) +creQuotaUser + = lens _creQuotaUser (\ s a -> s{_creQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +crePrettyPrint :: Lens' CreativesInsert' Bool +crePrettyPrint + = lens _crePrettyPrint + (\ s a -> s{_crePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +creUserIp :: Lens' CreativesInsert' (Maybe Text) +creUserIp + = lens _creUserIp (\ s a -> s{_creUserIp = a}) + +-- | User profile ID associated with this request. +creProfileId :: Lens' CreativesInsert' Int64 +creProfileId + = lens _creProfileId (\ s a -> s{_creProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +creKey :: Lens' CreativesInsert' (Maybe Text) +creKey = lens _creKey (\ s a -> s{_creKey = a}) + +-- | OAuth 2.0 token for the current user. +creOauthToken :: Lens' CreativesInsert' (Maybe Text) +creOauthToken + = lens _creOauthToken + (\ s a -> s{_creOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +creFields :: Lens' CreativesInsert' (Maybe Text) +creFields + = lens _creFields (\ s a -> s{_creFields = a}) + +-- | Data format for the response. +creAlt :: Lens' CreativesInsert' Text +creAlt = lens _creAlt (\ s a -> s{_creAlt = a}) + +instance GoogleRequest CreativesInsert' where + type Rs CreativesInsert' = Creative + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativesInsert{..} + = go _creQuotaUser _crePrettyPrint _creUserIp + _creProfileId + _creKey + _creOauthToken + _creFields + _creAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs new file mode 100644 index 000000000..508e674d0 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs @@ -0,0 +1,358 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Creatives.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of creatives, possibly filtered. +-- +-- /See:/ for @DfareportingCreativesList@. +module DFAReporting.Creatives.List + ( + -- * REST Resource + CreativesListAPI + + -- * Creating a Request + , creativesList + , CreativesList + + -- * Request Lenses + , clRenderingIds + , clQuotaUser + , clPrettyPrint + , clUserIp + , clAdvertiserId + , clSearchString + , clSizeIds + , clCompanionCreativeIds + , clCampaignId + , clTypes + , clIds + , clProfileId + , clSortOrder + , clActive + , clKey + , clCreativeFieldIds + , clPageToken + , clSortField + , clOauthToken + , clStudioCreativeId + , clArchived + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativesList@ which the +-- 'CreativesList' request conforms to. +type CreativesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creatives" :> + QueryParams "renderingIds" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParam "searchString" Text :> + QueryParams "sizeIds" Int64 :> + QueryParams "companionCreativeIds" Int64 :> + QueryParam "campaignId" Int64 :> + QueryParams "types" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParams "creativeFieldIds" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "studioCreativeId" Int64 :> + QueryParam "archived" Bool :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CreativesListResponse + +-- | Retrieves a list of creatives, possibly filtered. +-- +-- /See:/ 'creativesList' smart constructor. +data CreativesList = CreativesList + { _clRenderingIds :: !(Maybe Int64) + , _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clAdvertiserId :: !(Maybe Int64) + , _clSearchString :: !(Maybe Text) + , _clSizeIds :: !(Maybe Int64) + , _clCompanionCreativeIds :: !(Maybe Int64) + , _clCampaignId :: !(Maybe Int64) + , _clTypes :: !(Maybe Text) + , _clIds :: !(Maybe Int64) + , _clProfileId :: !Int64 + , _clSortOrder :: !(Maybe Text) + , _clActive :: !(Maybe Bool) + , _clKey :: !(Maybe Text) + , _clCreativeFieldIds :: !(Maybe Int64) + , _clPageToken :: !(Maybe Text) + , _clSortField :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clStudioCreativeId :: !(Maybe Int64) + , _clArchived :: !(Maybe Bool) + , _clMaxResults :: !(Maybe Int32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clRenderingIds' +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clAdvertiserId' +-- +-- * 'clSearchString' +-- +-- * 'clSizeIds' +-- +-- * 'clCompanionCreativeIds' +-- +-- * 'clCampaignId' +-- +-- * 'clTypes' +-- +-- * 'clIds' +-- +-- * 'clProfileId' +-- +-- * 'clSortOrder' +-- +-- * 'clActive' +-- +-- * 'clKey' +-- +-- * 'clCreativeFieldIds' +-- +-- * 'clPageToken' +-- +-- * 'clSortField' +-- +-- * 'clOauthToken' +-- +-- * 'clStudioCreativeId' +-- +-- * 'clArchived' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +creativesList + :: Int64 -- ^ 'profileId' + -> CreativesList +creativesList pClProfileId_ = + CreativesList + { _clRenderingIds = Nothing + , _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clAdvertiserId = Nothing + , _clSearchString = Nothing + , _clSizeIds = Nothing + , _clCompanionCreativeIds = Nothing + , _clCampaignId = Nothing + , _clTypes = Nothing + , _clIds = Nothing + , _clProfileId = pClProfileId_ + , _clSortOrder = Nothing + , _clActive = Nothing + , _clKey = Nothing + , _clCreativeFieldIds = Nothing + , _clPageToken = Nothing + , _clSortField = Nothing + , _clOauthToken = Nothing + , _clStudioCreativeId = Nothing + , _clArchived = Nothing + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Select only creatives with these rendering IDs. +clRenderingIds :: Lens' CreativesList' (Maybe Int64) +clRenderingIds + = lens _clRenderingIds + (\ s a -> s{_clRenderingIds = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CreativesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CreativesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CreativesList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Select only creatives with this advertiser ID. +clAdvertiserId :: Lens' CreativesList' (Maybe Int64) +clAdvertiserId + = lens _clAdvertiserId + (\ s a -> s{_clAdvertiserId = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"creative*2015\" will return objects with names like +-- \"creative June 2015\", \"creative April 2015\", or simply \"creative +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"creative\" will match objects with name \"my creative\", \"creative +-- 2015\", or simply \"creative\". +clSearchString :: Lens' CreativesList' (Maybe Text) +clSearchString + = lens _clSearchString + (\ s a -> s{_clSearchString = a}) + +-- | Select only creatives with these size IDs. +clSizeIds :: Lens' CreativesList' (Maybe Int64) +clSizeIds + = lens _clSizeIds (\ s a -> s{_clSizeIds = a}) + +-- | Select only in-stream video creatives with these companion IDs. +clCompanionCreativeIds :: Lens' CreativesList' (Maybe Int64) +clCompanionCreativeIds + = lens _clCompanionCreativeIds + (\ s a -> s{_clCompanionCreativeIds = a}) + +-- | Select only creatives with this campaign ID. +clCampaignId :: Lens' CreativesList' (Maybe Int64) +clCampaignId + = lens _clCampaignId (\ s a -> s{_clCampaignId = a}) + +-- | Select only creatives with these creative types. +clTypes :: Lens' CreativesList' (Maybe Text) +clTypes = lens _clTypes (\ s a -> s{_clTypes = a}) + +-- | Select only creatives with these IDs. +clIds :: Lens' CreativesList' (Maybe Int64) +clIds = lens _clIds (\ s a -> s{_clIds = a}) + +-- | User profile ID associated with this request. +clProfileId :: Lens' CreativesList' Int64 +clProfileId + = lens _clProfileId (\ s a -> s{_clProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +clSortOrder :: Lens' CreativesList' (Maybe Text) +clSortOrder + = lens _clSortOrder (\ s a -> s{_clSortOrder = a}) + +-- | Select only active creatives. Leave blank to select active and inactive +-- creatives. +clActive :: Lens' CreativesList' (Maybe Bool) +clActive = lens _clActive (\ s a -> s{_clActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CreativesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Select only creatives with these creative field IDs. +clCreativeFieldIds :: Lens' CreativesList' (Maybe Int64) +clCreativeFieldIds + = lens _clCreativeFieldIds + (\ s a -> s{_clCreativeFieldIds = a}) + +-- | Value of the nextPageToken from the previous result page. +clPageToken :: Lens' CreativesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | Field by which to sort the list. +clSortField :: Lens' CreativesList' (Maybe Text) +clSortField + = lens _clSortField (\ s a -> s{_clSortField = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CreativesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Select only creatives corresponding to this Studio creative ID. +clStudioCreativeId :: Lens' CreativesList' (Maybe Int64) +clStudioCreativeId + = lens _clStudioCreativeId + (\ s a -> s{_clStudioCreativeId = a}) + +-- | Select only archived creatives. Leave blank to select archived and +-- unarchived creatives. +clArchived :: Lens' CreativesList' (Maybe Bool) +clArchived + = lens _clArchived (\ s a -> s{_clArchived = a}) + +-- | Maximum number of results to return. +clMaxResults :: Lens' CreativesList' (Maybe Int32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CreativesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CreativesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CreativesList' where + type Rs CreativesList' = CreativesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativesList{..} + = go _clRenderingIds _clQuotaUser _clPrettyPrint + _clUserIp + _clAdvertiserId + _clSearchString + _clSizeIds + _clCompanionCreativeIds + _clCampaignId + _clTypes + _clIds + _clProfileId + _clSortOrder + _clActive + _clKey + _clCreativeFieldIds + _clPageToken + _clSortField + _clOauthToken + _clStudioCreativeId + _clArchived + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Patch.hs new file mode 100644 index 000000000..a3782ac0e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Patch.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Creatives.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative. This method supports patch semantics. +-- +-- /See:/ for @DfareportingCreativesPatch@. +module DFAReporting.Creatives.Patch + ( + -- * REST Resource + CreativesPatchAPI + + -- * Creating a Request + , creativesPatch + , CreativesPatch + + -- * Request Lenses + , cppQuotaUser + , cppPrettyPrint + , cppUserIp + , cppProfileId + , cppKey + , cppId + , cppOauthToken + , cppFields + , cppAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativesPatch@ which the +-- 'CreativesPatch' request conforms to. +type CreativesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creatives" :> + QueryParam "id" Int64 :> Patch '[JSON] Creative + +-- | Updates an existing creative. This method supports patch semantics. +-- +-- /See:/ 'creativesPatch' smart constructor. +data CreativesPatch = CreativesPatch + { _cppQuotaUser :: !(Maybe Text) + , _cppPrettyPrint :: !Bool + , _cppUserIp :: !(Maybe Text) + , _cppProfileId :: !Int64 + , _cppKey :: !(Maybe Text) + , _cppId :: !Int64 + , _cppOauthToken :: !(Maybe Text) + , _cppFields :: !(Maybe Text) + , _cppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cppQuotaUser' +-- +-- * 'cppPrettyPrint' +-- +-- * 'cppUserIp' +-- +-- * 'cppProfileId' +-- +-- * 'cppKey' +-- +-- * 'cppId' +-- +-- * 'cppOauthToken' +-- +-- * 'cppFields' +-- +-- * 'cppAlt' +creativesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> CreativesPatch +creativesPatch pCppProfileId_ pCppId_ = + CreativesPatch + { _cppQuotaUser = Nothing + , _cppPrettyPrint = True + , _cppUserIp = Nothing + , _cppProfileId = pCppProfileId_ + , _cppKey = Nothing + , _cppId = pCppId_ + , _cppOauthToken = Nothing + , _cppFields = Nothing + , _cppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cppQuotaUser :: Lens' CreativesPatch' (Maybe Text) +cppQuotaUser + = lens _cppQuotaUser (\ s a -> s{_cppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cppPrettyPrint :: Lens' CreativesPatch' Bool +cppPrettyPrint + = lens _cppPrettyPrint + (\ s a -> s{_cppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cppUserIp :: Lens' CreativesPatch' (Maybe Text) +cppUserIp + = lens _cppUserIp (\ s a -> s{_cppUserIp = a}) + +-- | User profile ID associated with this request. +cppProfileId :: Lens' CreativesPatch' Int64 +cppProfileId + = lens _cppProfileId (\ s a -> s{_cppProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cppKey :: Lens' CreativesPatch' (Maybe Text) +cppKey = lens _cppKey (\ s a -> s{_cppKey = a}) + +-- | Creative ID. +cppId :: Lens' CreativesPatch' Int64 +cppId = lens _cppId (\ s a -> s{_cppId = a}) + +-- | OAuth 2.0 token for the current user. +cppOauthToken :: Lens' CreativesPatch' (Maybe Text) +cppOauthToken + = lens _cppOauthToken + (\ s a -> s{_cppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cppFields :: Lens' CreativesPatch' (Maybe Text) +cppFields + = lens _cppFields (\ s a -> s{_cppFields = a}) + +-- | Data format for the response. +cppAlt :: Lens' CreativesPatch' Text +cppAlt = lens _cppAlt (\ s a -> s{_cppAlt = a}) + +instance GoogleRequest CreativesPatch' where + type Rs CreativesPatch' = Creative + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativesPatch{..} + = go _cppQuotaUser _cppPrettyPrint _cppUserIp + _cppProfileId + _cppKey + (Just _cppId) + _cppOauthToken + _cppFields + _cppAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Update.hs new file mode 100644 index 000000000..f94707ffe --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Creatives.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing creative. +-- +-- /See:/ for @DfareportingCreativesUpdate@. +module DFAReporting.Creatives.Update + ( + -- * REST Resource + CreativesUpdateAPI + + -- * Creating a Request + , creativesUpdate + , CreativesUpdate + + -- * Request Lenses + , cuuQuotaUser + , cuuPrettyPrint + , cuuUserIp + , cuuProfileId + , cuuKey + , cuuOauthToken + , cuuFields + , cuuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingCreativesUpdate@ which the +-- 'CreativesUpdate' request conforms to. +type CreativesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "creatives" :> Put '[JSON] Creative + +-- | Updates an existing creative. +-- +-- /See:/ 'creativesUpdate' smart constructor. +data CreativesUpdate = CreativesUpdate + { _cuuQuotaUser :: !(Maybe Text) + , _cuuPrettyPrint :: !Bool + , _cuuUserIp :: !(Maybe Text) + , _cuuProfileId :: !Int64 + , _cuuKey :: !(Maybe Text) + , _cuuOauthToken :: !(Maybe Text) + , _cuuFields :: !(Maybe Text) + , _cuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreativesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuuQuotaUser' +-- +-- * 'cuuPrettyPrint' +-- +-- * 'cuuUserIp' +-- +-- * 'cuuProfileId' +-- +-- * 'cuuKey' +-- +-- * 'cuuOauthToken' +-- +-- * 'cuuFields' +-- +-- * 'cuuAlt' +creativesUpdate + :: Int64 -- ^ 'profileId' + -> CreativesUpdate +creativesUpdate pCuuProfileId_ = + CreativesUpdate + { _cuuQuotaUser = Nothing + , _cuuPrettyPrint = True + , _cuuUserIp = Nothing + , _cuuProfileId = pCuuProfileId_ + , _cuuKey = Nothing + , _cuuOauthToken = Nothing + , _cuuFields = Nothing + , _cuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuuQuotaUser :: Lens' CreativesUpdate' (Maybe Text) +cuuQuotaUser + = lens _cuuQuotaUser (\ s a -> s{_cuuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuuPrettyPrint :: Lens' CreativesUpdate' Bool +cuuPrettyPrint + = lens _cuuPrettyPrint + (\ s a -> s{_cuuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuuUserIp :: Lens' CreativesUpdate' (Maybe Text) +cuuUserIp + = lens _cuuUserIp (\ s a -> s{_cuuUserIp = a}) + +-- | User profile ID associated with this request. +cuuProfileId :: Lens' CreativesUpdate' Int64 +cuuProfileId + = lens _cuuProfileId (\ s a -> s{_cuuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuuKey :: Lens' CreativesUpdate' (Maybe Text) +cuuKey = lens _cuuKey (\ s a -> s{_cuuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuuOauthToken :: Lens' CreativesUpdate' (Maybe Text) +cuuOauthToken + = lens _cuuOauthToken + (\ s a -> s{_cuuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuuFields :: Lens' CreativesUpdate' (Maybe Text) +cuuFields + = lens _cuuFields (\ s a -> s{_cuuFields = a}) + +-- | Data format for the response. +cuuAlt :: Lens' CreativesUpdate' Text +cuuAlt = lens _cuuAlt (\ s a -> s{_cuuAlt = a}) + +instance GoogleRequest CreativesUpdate' where + type Rs CreativesUpdate' = Creative + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u CreativesUpdate{..} + = go _cuuQuotaUser _cuuPrettyPrint _cuuUserIp + _cuuProfileId + _cuuKey + _cuuOauthToken + _cuuFields + _cuuAlt + where go + = clientWithRoute (Proxy :: Proxy CreativesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DimensionValues/Query.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DimensionValues/Query.hs new file mode 100644 index 000000000..6cf305f05 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DimensionValues/Query.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DimensionValues.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves list of report dimension values for a list of filters. +-- +-- /See:/ for @DfareportingDimensionValuesQuery@. +module DFAReporting.DimensionValues.Query + ( + -- * REST Resource + DimensionValuesQueryAPI + + -- * Creating a Request + , dimensionValuesQuery + , DimensionValuesQuery + + -- * Request Lenses + , dvqQuotaUser + , dvqPrettyPrint + , dvqUserIp + , dvqProfileId + , dvqKey + , dvqPageToken + , dvqOauthToken + , dvqMaxResults + , dvqFields + , dvqAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDimensionValuesQuery@ which the +-- 'DimensionValuesQuery' request conforms to. +type DimensionValuesQueryAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "dimensionvalues" :> + "query" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Post '[JSON] DimensionValueList + +-- | Retrieves list of report dimension values for a list of filters. +-- +-- /See:/ 'dimensionValuesQuery' smart constructor. +data DimensionValuesQuery = DimensionValuesQuery + { _dvqQuotaUser :: !(Maybe Text) + , _dvqPrettyPrint :: !Bool + , _dvqUserIp :: !(Maybe Text) + , _dvqProfileId :: !Int64 + , _dvqKey :: !(Maybe Text) + , _dvqPageToken :: !(Maybe Text) + , _dvqOauthToken :: !(Maybe Text) + , _dvqMaxResults :: !(Maybe Int32) + , _dvqFields :: !(Maybe Text) + , _dvqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DimensionValuesQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvqQuotaUser' +-- +-- * 'dvqPrettyPrint' +-- +-- * 'dvqUserIp' +-- +-- * 'dvqProfileId' +-- +-- * 'dvqKey' +-- +-- * 'dvqPageToken' +-- +-- * 'dvqOauthToken' +-- +-- * 'dvqMaxResults' +-- +-- * 'dvqFields' +-- +-- * 'dvqAlt' +dimensionValuesQuery + :: Int64 -- ^ 'profileId' + -> DimensionValuesQuery +dimensionValuesQuery pDvqProfileId_ = + DimensionValuesQuery + { _dvqQuotaUser = Nothing + , _dvqPrettyPrint = True + , _dvqUserIp = Nothing + , _dvqProfileId = pDvqProfileId_ + , _dvqKey = Nothing + , _dvqPageToken = Nothing + , _dvqOauthToken = Nothing + , _dvqMaxResults = Nothing + , _dvqFields = Nothing + , _dvqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dvqQuotaUser :: Lens' DimensionValuesQuery' (Maybe Text) +dvqQuotaUser + = lens _dvqQuotaUser (\ s a -> s{_dvqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dvqPrettyPrint :: Lens' DimensionValuesQuery' Bool +dvqPrettyPrint + = lens _dvqPrettyPrint + (\ s a -> s{_dvqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dvqUserIp :: Lens' DimensionValuesQuery' (Maybe Text) +dvqUserIp + = lens _dvqUserIp (\ s a -> s{_dvqUserIp = a}) + +-- | The DFA user profile ID. +dvqProfileId :: Lens' DimensionValuesQuery' Int64 +dvqProfileId + = lens _dvqProfileId (\ s a -> s{_dvqProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dvqKey :: Lens' DimensionValuesQuery' (Maybe Text) +dvqKey = lens _dvqKey (\ s a -> s{_dvqKey = a}) + +-- | The value of the nextToken from the previous result page. +dvqPageToken :: Lens' DimensionValuesQuery' (Maybe Text) +dvqPageToken + = lens _dvqPageToken (\ s a -> s{_dvqPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dvqOauthToken :: Lens' DimensionValuesQuery' (Maybe Text) +dvqOauthToken + = lens _dvqOauthToken + (\ s a -> s{_dvqOauthToken = a}) + +-- | Maximum number of results to return. +dvqMaxResults :: Lens' DimensionValuesQuery' (Maybe Int32) +dvqMaxResults + = lens _dvqMaxResults + (\ s a -> s{_dvqMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dvqFields :: Lens' DimensionValuesQuery' (Maybe Text) +dvqFields + = lens _dvqFields (\ s a -> s{_dvqFields = a}) + +-- | Data format for the response. +dvqAlt :: Lens' DimensionValuesQuery' Text +dvqAlt = lens _dvqAlt (\ s a -> s{_dvqAlt = a}) + +instance GoogleRequest DimensionValuesQuery' where + type Rs DimensionValuesQuery' = DimensionValueList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DimensionValuesQuery{..} + = go _dvqQuotaUser _dvqPrettyPrint _dvqUserIp + _dvqProfileId + _dvqKey + _dvqPageToken + _dvqOauthToken + _dvqMaxResults + _dvqFields + _dvqAlt + where go + = clientWithRoute + (Proxy :: Proxy DimensionValuesQueryAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/Get.hs new file mode 100644 index 000000000..642ea7e0a --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DirectorySiteContacts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one directory site contact by ID. +-- +-- /See:/ for @DfareportingDirectorySiteContactsGet@. +module DFAReporting.DirectorySiteContacts.Get + ( + -- * REST Resource + DirectorySiteContactsGetAPI + + -- * Creating a Request + , directorySiteContactsGet + , DirectorySiteContactsGet + + -- * Request Lenses + , dscgQuotaUser + , dscgPrettyPrint + , dscgUserIp + , dscgProfileId + , dscgKey + , dscgId + , dscgOauthToken + , dscgFields + , dscgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDirectorySiteContactsGet@ which the +-- 'DirectorySiteContactsGet' request conforms to. +type DirectorySiteContactsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "directorySiteContacts" :> + Capture "id" Int64 :> + Get '[JSON] DirectorySiteContact + +-- | Gets one directory site contact by ID. +-- +-- /See:/ 'directorySiteContactsGet' smart constructor. +data DirectorySiteContactsGet = DirectorySiteContactsGet + { _dscgQuotaUser :: !(Maybe Text) + , _dscgPrettyPrint :: !Bool + , _dscgUserIp :: !(Maybe Text) + , _dscgProfileId :: !Int64 + , _dscgKey :: !(Maybe Text) + , _dscgId :: !Int64 + , _dscgOauthToken :: !(Maybe Text) + , _dscgFields :: !(Maybe Text) + , _dscgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteContactsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dscgQuotaUser' +-- +-- * 'dscgPrettyPrint' +-- +-- * 'dscgUserIp' +-- +-- * 'dscgProfileId' +-- +-- * 'dscgKey' +-- +-- * 'dscgId' +-- +-- * 'dscgOauthToken' +-- +-- * 'dscgFields' +-- +-- * 'dscgAlt' +directorySiteContactsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> DirectorySiteContactsGet +directorySiteContactsGet pDscgProfileId_ pDscgId_ = + DirectorySiteContactsGet + { _dscgQuotaUser = Nothing + , _dscgPrettyPrint = True + , _dscgUserIp = Nothing + , _dscgProfileId = pDscgProfileId_ + , _dscgKey = Nothing + , _dscgId = pDscgId_ + , _dscgOauthToken = Nothing + , _dscgFields = Nothing + , _dscgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dscgQuotaUser :: Lens' DirectorySiteContactsGet' (Maybe Text) +dscgQuotaUser + = lens _dscgQuotaUser + (\ s a -> s{_dscgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dscgPrettyPrint :: Lens' DirectorySiteContactsGet' Bool +dscgPrettyPrint + = lens _dscgPrettyPrint + (\ s a -> s{_dscgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dscgUserIp :: Lens' DirectorySiteContactsGet' (Maybe Text) +dscgUserIp + = lens _dscgUserIp (\ s a -> s{_dscgUserIp = a}) + +-- | User profile ID associated with this request. +dscgProfileId :: Lens' DirectorySiteContactsGet' Int64 +dscgProfileId + = lens _dscgProfileId + (\ s a -> s{_dscgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dscgKey :: Lens' DirectorySiteContactsGet' (Maybe Text) +dscgKey = lens _dscgKey (\ s a -> s{_dscgKey = a}) + +-- | Directory site contact ID. +dscgId :: Lens' DirectorySiteContactsGet' Int64 +dscgId = lens _dscgId (\ s a -> s{_dscgId = a}) + +-- | OAuth 2.0 token for the current user. +dscgOauthToken :: Lens' DirectorySiteContactsGet' (Maybe Text) +dscgOauthToken + = lens _dscgOauthToken + (\ s a -> s{_dscgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dscgFields :: Lens' DirectorySiteContactsGet' (Maybe Text) +dscgFields + = lens _dscgFields (\ s a -> s{_dscgFields = a}) + +-- | Data format for the response. +dscgAlt :: Lens' DirectorySiteContactsGet' Text +dscgAlt = lens _dscgAlt (\ s a -> s{_dscgAlt = a}) + +instance GoogleRequest DirectorySiteContactsGet' + where + type Rs DirectorySiteContactsGet' = + DirectorySiteContact + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DirectorySiteContactsGet{..} + = go _dscgQuotaUser _dscgPrettyPrint _dscgUserIp + _dscgProfileId + _dscgKey + _dscgId + _dscgOauthToken + _dscgFields + _dscgAlt + where go + = clientWithRoute + (Proxy :: Proxy DirectorySiteContactsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/List.hs new file mode 100644 index 000000000..c55d1cbd2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySiteContacts/List.hs @@ -0,0 +1,262 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DirectorySiteContacts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of directory site contacts, possibly filtered. +-- +-- /See:/ for @DfareportingDirectorySiteContactsList@. +module DFAReporting.DirectorySiteContacts.List + ( + -- * REST Resource + DirectorySiteContactsListAPI + + -- * Creating a Request + , directorySiteContactsList + , DirectorySiteContactsList + + -- * Request Lenses + , dsclQuotaUser + , dsclPrettyPrint + , dsclUserIp + , dsclSearchString + , dsclIds + , dsclProfileId + , dsclDirectorySiteIds + , dsclSortOrder + , dsclKey + , dsclPageToken + , dsclSortField + , dsclOauthToken + , dsclMaxResults + , dsclFields + , dsclAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDirectorySiteContactsList@ which the +-- 'DirectorySiteContactsList' request conforms to. +type DirectorySiteContactsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "directorySiteContacts" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParams "directorySiteIds" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] DirectorySiteContactsListResponse + +-- | Retrieves a list of directory site contacts, possibly filtered. +-- +-- /See:/ 'directorySiteContactsList' smart constructor. +data DirectorySiteContactsList = DirectorySiteContactsList + { _dsclQuotaUser :: !(Maybe Text) + , _dsclPrettyPrint :: !Bool + , _dsclUserIp :: !(Maybe Text) + , _dsclSearchString :: !(Maybe Text) + , _dsclIds :: !(Maybe Int64) + , _dsclProfileId :: !Int64 + , _dsclDirectorySiteIds :: !(Maybe Int64) + , _dsclSortOrder :: !(Maybe Text) + , _dsclKey :: !(Maybe Text) + , _dsclPageToken :: !(Maybe Text) + , _dsclSortField :: !(Maybe Text) + , _dsclOauthToken :: !(Maybe Text) + , _dsclMaxResults :: !(Maybe Int32) + , _dsclFields :: !(Maybe Text) + , _dsclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySiteContactsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsclQuotaUser' +-- +-- * 'dsclPrettyPrint' +-- +-- * 'dsclUserIp' +-- +-- * 'dsclSearchString' +-- +-- * 'dsclIds' +-- +-- * 'dsclProfileId' +-- +-- * 'dsclDirectorySiteIds' +-- +-- * 'dsclSortOrder' +-- +-- * 'dsclKey' +-- +-- * 'dsclPageToken' +-- +-- * 'dsclSortField' +-- +-- * 'dsclOauthToken' +-- +-- * 'dsclMaxResults' +-- +-- * 'dsclFields' +-- +-- * 'dsclAlt' +directorySiteContactsList + :: Int64 -- ^ 'profileId' + -> DirectorySiteContactsList +directorySiteContactsList pDsclProfileId_ = + DirectorySiteContactsList + { _dsclQuotaUser = Nothing + , _dsclPrettyPrint = True + , _dsclUserIp = Nothing + , _dsclSearchString = Nothing + , _dsclIds = Nothing + , _dsclProfileId = pDsclProfileId_ + , _dsclDirectorySiteIds = Nothing + , _dsclSortOrder = Nothing + , _dsclKey = Nothing + , _dsclPageToken = Nothing + , _dsclSortField = Nothing + , _dsclOauthToken = Nothing + , _dsclMaxResults = Nothing + , _dsclFields = Nothing + , _dsclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dsclQuotaUser :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclQuotaUser + = lens _dsclQuotaUser + (\ s a -> s{_dsclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dsclPrettyPrint :: Lens' DirectorySiteContactsList' Bool +dsclPrettyPrint + = lens _dsclPrettyPrint + (\ s a -> s{_dsclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dsclUserIp :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclUserIp + = lens _dsclUserIp (\ s a -> s{_dsclUserIp = a}) + +-- | Allows searching for objects by name, ID or email. Wildcards (*) are +-- allowed. For example, \"directory site contact*2015\" will return +-- objects with names like \"directory site contact June 2015\", +-- \"directory site contact April 2015\", or simply \"directory site +-- contact 2015\". Most of the searches also add wildcards implicitly at +-- the start and the end of the search string. For example, a search string +-- of \"directory site contact\" will match objects with name \"my +-- directory site contact\", \"directory site contact 2015\", or simply +-- \"directory site contact\". +dsclSearchString :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclSearchString + = lens _dsclSearchString + (\ s a -> s{_dsclSearchString = a}) + +-- | Select only directory site contacts with these IDs. +dsclIds :: Lens' DirectorySiteContactsList' (Maybe Int64) +dsclIds = lens _dsclIds (\ s a -> s{_dsclIds = a}) + +-- | User profile ID associated with this request. +dsclProfileId :: Lens' DirectorySiteContactsList' Int64 +dsclProfileId + = lens _dsclProfileId + (\ s a -> s{_dsclProfileId = a}) + +-- | Select only directory site contacts with these directory site IDs. This +-- is a required field. +dsclDirectorySiteIds :: Lens' DirectorySiteContactsList' (Maybe Int64) +dsclDirectorySiteIds + = lens _dsclDirectorySiteIds + (\ s a -> s{_dsclDirectorySiteIds = a}) + +-- | Order of sorted results, default is ASCENDING. +dsclSortOrder :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclSortOrder + = lens _dsclSortOrder + (\ s a -> s{_dsclSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dsclKey :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclKey = lens _dsclKey (\ s a -> s{_dsclKey = a}) + +-- | Value of the nextPageToken from the previous result page. +dsclPageToken :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclPageToken + = lens _dsclPageToken + (\ s a -> s{_dsclPageToken = a}) + +-- | Field by which to sort the list. +dsclSortField :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclSortField + = lens _dsclSortField + (\ s a -> s{_dsclSortField = a}) + +-- | OAuth 2.0 token for the current user. +dsclOauthToken :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclOauthToken + = lens _dsclOauthToken + (\ s a -> s{_dsclOauthToken = a}) + +-- | Maximum number of results to return. +dsclMaxResults :: Lens' DirectorySiteContactsList' (Maybe Int32) +dsclMaxResults + = lens _dsclMaxResults + (\ s a -> s{_dsclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +dsclFields :: Lens' DirectorySiteContactsList' (Maybe Text) +dsclFields + = lens _dsclFields (\ s a -> s{_dsclFields = a}) + +-- | Data format for the response. +dsclAlt :: Lens' DirectorySiteContactsList' Text +dsclAlt = lens _dsclAlt (\ s a -> s{_dsclAlt = a}) + +instance GoogleRequest DirectorySiteContactsList' + where + type Rs DirectorySiteContactsList' = + DirectorySiteContactsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DirectorySiteContactsList{..} + = go _dsclQuotaUser _dsclPrettyPrint _dsclUserIp + _dsclSearchString + _dsclIds + _dsclProfileId + _dsclDirectorySiteIds + _dsclSortOrder + _dsclKey + _dsclPageToken + _dsclSortField + _dsclOauthToken + _dsclMaxResults + _dsclFields + _dsclAlt + where go + = clientWithRoute + (Proxy :: Proxy DirectorySiteContactsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Get.hs new file mode 100644 index 000000000..88801d4e0 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DirectorySites.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one directory site by ID. +-- +-- /See:/ for @DfareportingDirectorySitesGet@. +module DFAReporting.DirectorySites.Get + ( + -- * REST Resource + DirectorySitesGetAPI + + -- * Creating a Request + , directorySitesGet + , DirectorySitesGet + + -- * Request Lenses + , dsgQuotaUser + , dsgPrettyPrint + , dsgUserIp + , dsgProfileId + , dsgKey + , dsgId + , dsgOauthToken + , dsgFields + , dsgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDirectorySitesGet@ which the +-- 'DirectorySitesGet' request conforms to. +type DirectorySitesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "directorySites" :> + Capture "id" Int64 :> Get '[JSON] DirectorySite + +-- | Gets one directory site by ID. +-- +-- /See:/ 'directorySitesGet' smart constructor. +data DirectorySitesGet = DirectorySitesGet + { _dsgQuotaUser :: !(Maybe Text) + , _dsgPrettyPrint :: !Bool + , _dsgUserIp :: !(Maybe Text) + , _dsgProfileId :: !Int64 + , _dsgKey :: !(Maybe Text) + , _dsgId :: !Int64 + , _dsgOauthToken :: !(Maybe Text) + , _dsgFields :: !(Maybe Text) + , _dsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySitesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsgQuotaUser' +-- +-- * 'dsgPrettyPrint' +-- +-- * 'dsgUserIp' +-- +-- * 'dsgProfileId' +-- +-- * 'dsgKey' +-- +-- * 'dsgId' +-- +-- * 'dsgOauthToken' +-- +-- * 'dsgFields' +-- +-- * 'dsgAlt' +directorySitesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> DirectorySitesGet +directorySitesGet pDsgProfileId_ pDsgId_ = + DirectorySitesGet + { _dsgQuotaUser = Nothing + , _dsgPrettyPrint = True + , _dsgUserIp = Nothing + , _dsgProfileId = pDsgProfileId_ + , _dsgKey = Nothing + , _dsgId = pDsgId_ + , _dsgOauthToken = Nothing + , _dsgFields = Nothing + , _dsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dsgQuotaUser :: Lens' DirectorySitesGet' (Maybe Text) +dsgQuotaUser + = lens _dsgQuotaUser (\ s a -> s{_dsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dsgPrettyPrint :: Lens' DirectorySitesGet' Bool +dsgPrettyPrint + = lens _dsgPrettyPrint + (\ s a -> s{_dsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dsgUserIp :: Lens' DirectorySitesGet' (Maybe Text) +dsgUserIp + = lens _dsgUserIp (\ s a -> s{_dsgUserIp = a}) + +-- | User profile ID associated with this request. +dsgProfileId :: Lens' DirectorySitesGet' Int64 +dsgProfileId + = lens _dsgProfileId (\ s a -> s{_dsgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dsgKey :: Lens' DirectorySitesGet' (Maybe Text) +dsgKey = lens _dsgKey (\ s a -> s{_dsgKey = a}) + +-- | Directory site ID. +dsgId :: Lens' DirectorySitesGet' Int64 +dsgId = lens _dsgId (\ s a -> s{_dsgId = a}) + +-- | OAuth 2.0 token for the current user. +dsgOauthToken :: Lens' DirectorySitesGet' (Maybe Text) +dsgOauthToken + = lens _dsgOauthToken + (\ s a -> s{_dsgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dsgFields :: Lens' DirectorySitesGet' (Maybe Text) +dsgFields + = lens _dsgFields (\ s a -> s{_dsgFields = a}) + +-- | Data format for the response. +dsgAlt :: Lens' DirectorySitesGet' Text +dsgAlt = lens _dsgAlt (\ s a -> s{_dsgAlt = a}) + +instance GoogleRequest DirectorySitesGet' where + type Rs DirectorySitesGet' = DirectorySite + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DirectorySitesGet{..} + = go _dsgQuotaUser _dsgPrettyPrint _dsgUserIp + _dsgProfileId + _dsgKey + _dsgId + _dsgOauthToken + _dsgFields + _dsgAlt + where go + = clientWithRoute + (Proxy :: Proxy DirectorySitesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Insert.hs new file mode 100644 index 000000000..389505d71 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DirectorySites.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new directory site. +-- +-- /See:/ for @DfareportingDirectorySitesInsert@. +module DFAReporting.DirectorySites.Insert + ( + -- * REST Resource + DirectorySitesInsertAPI + + -- * Creating a Request + , directorySitesInsert + , DirectorySitesInsert + + -- * Request Lenses + , dsiQuotaUser + , dsiPrettyPrint + , dsiUserIp + , dsiProfileId + , dsiKey + , dsiOauthToken + , dsiFields + , dsiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDirectorySitesInsert@ which the +-- 'DirectorySitesInsert' request conforms to. +type DirectorySitesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "directorySites" :> Post '[JSON] DirectorySite + +-- | Inserts a new directory site. +-- +-- /See:/ 'directorySitesInsert' smart constructor. +data DirectorySitesInsert = DirectorySitesInsert + { _dsiQuotaUser :: !(Maybe Text) + , _dsiPrettyPrint :: !Bool + , _dsiUserIp :: !(Maybe Text) + , _dsiProfileId :: !Int64 + , _dsiKey :: !(Maybe Text) + , _dsiOauthToken :: !(Maybe Text) + , _dsiFields :: !(Maybe Text) + , _dsiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySitesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsiQuotaUser' +-- +-- * 'dsiPrettyPrint' +-- +-- * 'dsiUserIp' +-- +-- * 'dsiProfileId' +-- +-- * 'dsiKey' +-- +-- * 'dsiOauthToken' +-- +-- * 'dsiFields' +-- +-- * 'dsiAlt' +directorySitesInsert + :: Int64 -- ^ 'profileId' + -> DirectorySitesInsert +directorySitesInsert pDsiProfileId_ = + DirectorySitesInsert + { _dsiQuotaUser = Nothing + , _dsiPrettyPrint = True + , _dsiUserIp = Nothing + , _dsiProfileId = pDsiProfileId_ + , _dsiKey = Nothing + , _dsiOauthToken = Nothing + , _dsiFields = Nothing + , _dsiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dsiQuotaUser :: Lens' DirectorySitesInsert' (Maybe Text) +dsiQuotaUser + = lens _dsiQuotaUser (\ s a -> s{_dsiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dsiPrettyPrint :: Lens' DirectorySitesInsert' Bool +dsiPrettyPrint + = lens _dsiPrettyPrint + (\ s a -> s{_dsiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dsiUserIp :: Lens' DirectorySitesInsert' (Maybe Text) +dsiUserIp + = lens _dsiUserIp (\ s a -> s{_dsiUserIp = a}) + +-- | User profile ID associated with this request. +dsiProfileId :: Lens' DirectorySitesInsert' Int64 +dsiProfileId + = lens _dsiProfileId (\ s a -> s{_dsiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dsiKey :: Lens' DirectorySitesInsert' (Maybe Text) +dsiKey = lens _dsiKey (\ s a -> s{_dsiKey = a}) + +-- | OAuth 2.0 token for the current user. +dsiOauthToken :: Lens' DirectorySitesInsert' (Maybe Text) +dsiOauthToken + = lens _dsiOauthToken + (\ s a -> s{_dsiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dsiFields :: Lens' DirectorySitesInsert' (Maybe Text) +dsiFields + = lens _dsiFields (\ s a -> s{_dsiFields = a}) + +-- | Data format for the response. +dsiAlt :: Lens' DirectorySitesInsert' Text +dsiAlt = lens _dsiAlt (\ s a -> s{_dsiAlt = a}) + +instance GoogleRequest DirectorySitesInsert' where + type Rs DirectorySitesInsert' = DirectorySite + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DirectorySitesInsert{..} + = go _dsiQuotaUser _dsiPrettyPrint _dsiUserIp + _dsiProfileId + _dsiKey + _dsiOauthToken + _dsiFields + _dsiAlt + where go + = clientWithRoute + (Proxy :: Proxy DirectorySitesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs new file mode 100644 index 000000000..6da50602b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs @@ -0,0 +1,333 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.DirectorySites.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of directory sites, possibly filtered. +-- +-- /See:/ for @DfareportingDirectorySitesList@. +module DFAReporting.DirectorySites.List + ( + -- * REST Resource + DirectorySitesListAPI + + -- * Creating a Request + , directorySitesList + , DirectorySitesList + + -- * Request Lenses + , dslQuotaUser + , dslPrettyPrint + , dslUserIp + , dslSearchString + , dslAcceptsInterstitialPlacements + , dslAcceptsPublisherPaidPlacements + , dslIds + , dslProfileId + , dslSortOrder + , dslActive + , dslKey + , dslCountryId + , dslPageToken + , dslSortField + , dslAcceptsInStreamVideoPlacements + , dslOauthToken + , dslMaxResults + , dslParentId + , dslDfpNetworkCode + , dslFields + , dslAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingDirectorySitesList@ which the +-- 'DirectorySitesList' request conforms to. +type DirectorySitesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "directorySites" :> + QueryParam "searchString" Text :> + QueryParam "acceptsInterstitialPlacements" Bool :> + QueryParam "acceptsPublisherPaidPlacements" Bool :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParam "countryId" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "acceptsInStreamVideoPlacements" Bool :> + QueryParam "maxResults" Int32 :> + QueryParam "parentId" Int64 :> + QueryParam "dfp_network_code" Text :> + Get '[JSON] DirectorySitesListResponse + +-- | Retrieves a list of directory sites, possibly filtered. +-- +-- /See:/ 'directorySitesList' smart constructor. +data DirectorySitesList = DirectorySitesList + { _dslQuotaUser :: !(Maybe Text) + , _dslPrettyPrint :: !Bool + , _dslUserIp :: !(Maybe Text) + , _dslSearchString :: !(Maybe Text) + , _dslAcceptsInterstitialPlacements :: !(Maybe Bool) + , _dslAcceptsPublisherPaidPlacements :: !(Maybe Bool) + , _dslIds :: !(Maybe Int64) + , _dslProfileId :: !Int64 + , _dslSortOrder :: !(Maybe Text) + , _dslActive :: !(Maybe Bool) + , _dslKey :: !(Maybe Text) + , _dslCountryId :: !(Maybe Int64) + , _dslPageToken :: !(Maybe Text) + , _dslSortField :: !(Maybe Text) + , _dslAcceptsInStreamVideoPlacements :: !(Maybe Bool) + , _dslOauthToken :: !(Maybe Text) + , _dslMaxResults :: !(Maybe Int32) + , _dslParentId :: !(Maybe Int64) + , _dslDfpNetworkCode :: !(Maybe Text) + , _dslFields :: !(Maybe Text) + , _dslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectorySitesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dslQuotaUser' +-- +-- * 'dslPrettyPrint' +-- +-- * 'dslUserIp' +-- +-- * 'dslSearchString' +-- +-- * 'dslAcceptsInterstitialPlacements' +-- +-- * 'dslAcceptsPublisherPaidPlacements' +-- +-- * 'dslIds' +-- +-- * 'dslProfileId' +-- +-- * 'dslSortOrder' +-- +-- * 'dslActive' +-- +-- * 'dslKey' +-- +-- * 'dslCountryId' +-- +-- * 'dslPageToken' +-- +-- * 'dslSortField' +-- +-- * 'dslAcceptsInStreamVideoPlacements' +-- +-- * 'dslOauthToken' +-- +-- * 'dslMaxResults' +-- +-- * 'dslParentId' +-- +-- * 'dslDfpNetworkCode' +-- +-- * 'dslFields' +-- +-- * 'dslAlt' +directorySitesList + :: Int64 -- ^ 'profileId' + -> DirectorySitesList +directorySitesList pDslProfileId_ = + DirectorySitesList + { _dslQuotaUser = Nothing + , _dslPrettyPrint = True + , _dslUserIp = Nothing + , _dslSearchString = Nothing + , _dslAcceptsInterstitialPlacements = Nothing + , _dslAcceptsPublisherPaidPlacements = Nothing + , _dslIds = Nothing + , _dslProfileId = pDslProfileId_ + , _dslSortOrder = Nothing + , _dslActive = Nothing + , _dslKey = Nothing + , _dslCountryId = Nothing + , _dslPageToken = Nothing + , _dslSortField = Nothing + , _dslAcceptsInStreamVideoPlacements = Nothing + , _dslOauthToken = Nothing + , _dslMaxResults = Nothing + , _dslParentId = Nothing + , _dslDfpNetworkCode = Nothing + , _dslFields = Nothing + , _dslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dslQuotaUser :: Lens' DirectorySitesList' (Maybe Text) +dslQuotaUser + = lens _dslQuotaUser (\ s a -> s{_dslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dslPrettyPrint :: Lens' DirectorySitesList' Bool +dslPrettyPrint + = lens _dslPrettyPrint + (\ s a -> s{_dslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dslUserIp :: Lens' DirectorySitesList' (Maybe Text) +dslUserIp + = lens _dslUserIp (\ s a -> s{_dslUserIp = a}) + +-- | Allows searching for objects by name, ID or URL. Wildcards (*) are +-- allowed. For example, \"directory site*2015\" will return objects with +-- names like \"directory site June 2015\", \"directory site April 2015\", +-- or simply \"directory site 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"directory site\" will match objects with +-- name \"my directory site\", \"directory site 2015\" or simply, +-- \"directory site\". +dslSearchString :: Lens' DirectorySitesList' (Maybe Text) +dslSearchString + = lens _dslSearchString + (\ s a -> s{_dslSearchString = a}) + +-- | This search filter is no longer supported and will have no effect on the +-- results returned. +dslAcceptsInterstitialPlacements :: Lens' DirectorySitesList' (Maybe Bool) +dslAcceptsInterstitialPlacements + = lens _dslAcceptsInterstitialPlacements + (\ s a -> s{_dslAcceptsInterstitialPlacements = a}) + +-- | Select only directory sites that accept publisher paid placements. This +-- field can be left blank. +dslAcceptsPublisherPaidPlacements :: Lens' DirectorySitesList' (Maybe Bool) +dslAcceptsPublisherPaidPlacements + = lens _dslAcceptsPublisherPaidPlacements + (\ s a -> s{_dslAcceptsPublisherPaidPlacements = a}) + +-- | Select only directory sites with these IDs. +dslIds :: Lens' DirectorySitesList' (Maybe Int64) +dslIds = lens _dslIds (\ s a -> s{_dslIds = a}) + +-- | User profile ID associated with this request. +dslProfileId :: Lens' DirectorySitesList' Int64 +dslProfileId + = lens _dslProfileId (\ s a -> s{_dslProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +dslSortOrder :: Lens' DirectorySitesList' (Maybe Text) +dslSortOrder + = lens _dslSortOrder (\ s a -> s{_dslSortOrder = a}) + +-- | Select only active directory sites. Leave blank to retrieve both active +-- and inactive directory sites. +dslActive :: Lens' DirectorySitesList' (Maybe Bool) +dslActive + = lens _dslActive (\ s a -> s{_dslActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dslKey :: Lens' DirectorySitesList' (Maybe Text) +dslKey = lens _dslKey (\ s a -> s{_dslKey = a}) + +-- | Select only directory sites with this country ID. +dslCountryId :: Lens' DirectorySitesList' (Maybe Int64) +dslCountryId + = lens _dslCountryId (\ s a -> s{_dslCountryId = a}) + +-- | Value of the nextPageToken from the previous result page. +dslPageToken :: Lens' DirectorySitesList' (Maybe Text) +dslPageToken + = lens _dslPageToken (\ s a -> s{_dslPageToken = a}) + +-- | Field by which to sort the list. +dslSortField :: Lens' DirectorySitesList' (Maybe Text) +dslSortField + = lens _dslSortField (\ s a -> s{_dslSortField = a}) + +-- | This search filter is no longer supported and will have no effect on the +-- results returned. +dslAcceptsInStreamVideoPlacements :: Lens' DirectorySitesList' (Maybe Bool) +dslAcceptsInStreamVideoPlacements + = lens _dslAcceptsInStreamVideoPlacements + (\ s a -> s{_dslAcceptsInStreamVideoPlacements = a}) + +-- | OAuth 2.0 token for the current user. +dslOauthToken :: Lens' DirectorySitesList' (Maybe Text) +dslOauthToken + = lens _dslOauthToken + (\ s a -> s{_dslOauthToken = a}) + +-- | Maximum number of results to return. +dslMaxResults :: Lens' DirectorySitesList' (Maybe Int32) +dslMaxResults + = lens _dslMaxResults + (\ s a -> s{_dslMaxResults = a}) + +-- | Select only directory sites with this parent ID. +dslParentId :: Lens' DirectorySitesList' (Maybe Int64) +dslParentId + = lens _dslParentId (\ s a -> s{_dslParentId = a}) + +-- | Select only directory sites with this DFP network code. +dslDfpNetworkCode :: Lens' DirectorySitesList' (Maybe Text) +dslDfpNetworkCode + = lens _dslDfpNetworkCode + (\ s a -> s{_dslDfpNetworkCode = a}) + +-- | Selector specifying which fields to include in a partial response. +dslFields :: Lens' DirectorySitesList' (Maybe Text) +dslFields + = lens _dslFields (\ s a -> s{_dslFields = a}) + +-- | Data format for the response. +dslAlt :: Lens' DirectorySitesList' Text +dslAlt = lens _dslAlt (\ s a -> s{_dslAlt = a}) + +instance GoogleRequest DirectorySitesList' where + type Rs DirectorySitesList' = + DirectorySitesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u DirectorySitesList{..} + = go _dslQuotaUser _dslPrettyPrint _dslUserIp + _dslSearchString + _dslAcceptsInterstitialPlacements + _dslAcceptsPublisherPaidPlacements + _dslIds + _dslProfileId + _dslSortOrder + _dslActive + _dslKey + _dslCountryId + _dslPageToken + _dslSortField + _dslAcceptsInStreamVideoPlacements + _dslOauthToken + _dslMaxResults + _dslParentId + _dslDfpNetworkCode + _dslFields + _dslAlt + where go + = clientWithRoute + (Proxy :: Proxy DirectorySitesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Delete.hs new file mode 100644 index 000000000..09a870142 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Delete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing event tag. +-- +-- /See:/ for @DfareportingEventTagsDelete@. +module DFAReporting.EventTags.Delete + ( + -- * REST Resource + EventTagsDeleteAPI + + -- * Creating a Request + , eventTagsDelete + , EventTagsDelete + + -- * Request Lenses + , etdQuotaUser + , etdPrettyPrint + , etdUserIp + , etdProfileId + , etdKey + , etdId + , etdOauthToken + , etdFields + , etdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsDelete@ which the +-- 'EventTagsDelete' request conforms to. +type EventTagsDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing event tag. +-- +-- /See:/ 'eventTagsDelete' smart constructor. +data EventTagsDelete = EventTagsDelete + { _etdQuotaUser :: !(Maybe Text) + , _etdPrettyPrint :: !Bool + , _etdUserIp :: !(Maybe Text) + , _etdProfileId :: !Int64 + , _etdKey :: !(Maybe Text) + , _etdId :: !Int64 + , _etdOauthToken :: !(Maybe Text) + , _etdFields :: !(Maybe Text) + , _etdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etdQuotaUser' +-- +-- * 'etdPrettyPrint' +-- +-- * 'etdUserIp' +-- +-- * 'etdProfileId' +-- +-- * 'etdKey' +-- +-- * 'etdId' +-- +-- * 'etdOauthToken' +-- +-- * 'etdFields' +-- +-- * 'etdAlt' +eventTagsDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> EventTagsDelete +eventTagsDelete pEtdProfileId_ pEtdId_ = + EventTagsDelete + { _etdQuotaUser = Nothing + , _etdPrettyPrint = True + , _etdUserIp = Nothing + , _etdProfileId = pEtdProfileId_ + , _etdKey = Nothing + , _etdId = pEtdId_ + , _etdOauthToken = Nothing + , _etdFields = Nothing + , _etdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etdQuotaUser :: Lens' EventTagsDelete' (Maybe Text) +etdQuotaUser + = lens _etdQuotaUser (\ s a -> s{_etdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etdPrettyPrint :: Lens' EventTagsDelete' Bool +etdPrettyPrint + = lens _etdPrettyPrint + (\ s a -> s{_etdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etdUserIp :: Lens' EventTagsDelete' (Maybe Text) +etdUserIp + = lens _etdUserIp (\ s a -> s{_etdUserIp = a}) + +-- | User profile ID associated with this request. +etdProfileId :: Lens' EventTagsDelete' Int64 +etdProfileId + = lens _etdProfileId (\ s a -> s{_etdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etdKey :: Lens' EventTagsDelete' (Maybe Text) +etdKey = lens _etdKey (\ s a -> s{_etdKey = a}) + +-- | Event tag ID. +etdId :: Lens' EventTagsDelete' Int64 +etdId = lens _etdId (\ s a -> s{_etdId = a}) + +-- | OAuth 2.0 token for the current user. +etdOauthToken :: Lens' EventTagsDelete' (Maybe Text) +etdOauthToken + = lens _etdOauthToken + (\ s a -> s{_etdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etdFields :: Lens' EventTagsDelete' (Maybe Text) +etdFields + = lens _etdFields (\ s a -> s{_etdFields = a}) + +-- | Data format for the response. +etdAlt :: Lens' EventTagsDelete' Text +etdAlt = lens _etdAlt (\ s a -> s{_etdAlt = a}) + +instance GoogleRequest EventTagsDelete' where + type Rs EventTagsDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsDelete{..} + = go _etdQuotaUser _etdPrettyPrint _etdUserIp + _etdProfileId + _etdKey + _etdId + _etdOauthToken + _etdFields + _etdAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Get.hs new file mode 100644 index 000000000..1d3d13338 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one event tag by ID. +-- +-- /See:/ for @DfareportingEventTagsGet@. +module DFAReporting.EventTags.Get + ( + -- * REST Resource + EventTagsGetAPI + + -- * Creating a Request + , eventTagsGet + , EventTagsGet + + -- * Request Lenses + , etgQuotaUser + , etgPrettyPrint + , etgUserIp + , etgProfileId + , etgKey + , etgId + , etgOauthToken + , etgFields + , etgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsGet@ which the +-- 'EventTagsGet' request conforms to. +type EventTagsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> + Capture "id" Int64 :> Get '[JSON] EventTag + +-- | Gets one event tag by ID. +-- +-- /See:/ 'eventTagsGet' smart constructor. +data EventTagsGet = EventTagsGet + { _etgQuotaUser :: !(Maybe Text) + , _etgPrettyPrint :: !Bool + , _etgUserIp :: !(Maybe Text) + , _etgProfileId :: !Int64 + , _etgKey :: !(Maybe Text) + , _etgId :: !Int64 + , _etgOauthToken :: !(Maybe Text) + , _etgFields :: !(Maybe Text) + , _etgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etgQuotaUser' +-- +-- * 'etgPrettyPrint' +-- +-- * 'etgUserIp' +-- +-- * 'etgProfileId' +-- +-- * 'etgKey' +-- +-- * 'etgId' +-- +-- * 'etgOauthToken' +-- +-- * 'etgFields' +-- +-- * 'etgAlt' +eventTagsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> EventTagsGet +eventTagsGet pEtgProfileId_ pEtgId_ = + EventTagsGet + { _etgQuotaUser = Nothing + , _etgPrettyPrint = True + , _etgUserIp = Nothing + , _etgProfileId = pEtgProfileId_ + , _etgKey = Nothing + , _etgId = pEtgId_ + , _etgOauthToken = Nothing + , _etgFields = Nothing + , _etgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etgQuotaUser :: Lens' EventTagsGet' (Maybe Text) +etgQuotaUser + = lens _etgQuotaUser (\ s a -> s{_etgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etgPrettyPrint :: Lens' EventTagsGet' Bool +etgPrettyPrint + = lens _etgPrettyPrint + (\ s a -> s{_etgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etgUserIp :: Lens' EventTagsGet' (Maybe Text) +etgUserIp + = lens _etgUserIp (\ s a -> s{_etgUserIp = a}) + +-- | User profile ID associated with this request. +etgProfileId :: Lens' EventTagsGet' Int64 +etgProfileId + = lens _etgProfileId (\ s a -> s{_etgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etgKey :: Lens' EventTagsGet' (Maybe Text) +etgKey = lens _etgKey (\ s a -> s{_etgKey = a}) + +-- | Event tag ID. +etgId :: Lens' EventTagsGet' Int64 +etgId = lens _etgId (\ s a -> s{_etgId = a}) + +-- | OAuth 2.0 token for the current user. +etgOauthToken :: Lens' EventTagsGet' (Maybe Text) +etgOauthToken + = lens _etgOauthToken + (\ s a -> s{_etgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etgFields :: Lens' EventTagsGet' (Maybe Text) +etgFields + = lens _etgFields (\ s a -> s{_etgFields = a}) + +-- | Data format for the response. +etgAlt :: Lens' EventTagsGet' Text +etgAlt = lens _etgAlt (\ s a -> s{_etgAlt = a}) + +instance GoogleRequest EventTagsGet' where + type Rs EventTagsGet' = EventTag + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsGet{..} + = go _etgQuotaUser _etgPrettyPrint _etgUserIp + _etgProfileId + _etgKey + _etgId + _etgOauthToken + _etgFields + _etgAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Insert.hs new file mode 100644 index 000000000..fdbc97943 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new event tag. +-- +-- /See:/ for @DfareportingEventTagsInsert@. +module DFAReporting.EventTags.Insert + ( + -- * REST Resource + EventTagsInsertAPI + + -- * Creating a Request + , eventTagsInsert + , EventTagsInsert + + -- * Request Lenses + , etiQuotaUser + , etiPrettyPrint + , etiUserIp + , etiProfileId + , etiKey + , etiOauthToken + , etiFields + , etiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsInsert@ which the +-- 'EventTagsInsert' request conforms to. +type EventTagsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> Post '[JSON] EventTag + +-- | Inserts a new event tag. +-- +-- /See:/ 'eventTagsInsert' smart constructor. +data EventTagsInsert = EventTagsInsert + { _etiQuotaUser :: !(Maybe Text) + , _etiPrettyPrint :: !Bool + , _etiUserIp :: !(Maybe Text) + , _etiProfileId :: !Int64 + , _etiKey :: !(Maybe Text) + , _etiOauthToken :: !(Maybe Text) + , _etiFields :: !(Maybe Text) + , _etiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etiQuotaUser' +-- +-- * 'etiPrettyPrint' +-- +-- * 'etiUserIp' +-- +-- * 'etiProfileId' +-- +-- * 'etiKey' +-- +-- * 'etiOauthToken' +-- +-- * 'etiFields' +-- +-- * 'etiAlt' +eventTagsInsert + :: Int64 -- ^ 'profileId' + -> EventTagsInsert +eventTagsInsert pEtiProfileId_ = + EventTagsInsert + { _etiQuotaUser = Nothing + , _etiPrettyPrint = True + , _etiUserIp = Nothing + , _etiProfileId = pEtiProfileId_ + , _etiKey = Nothing + , _etiOauthToken = Nothing + , _etiFields = Nothing + , _etiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etiQuotaUser :: Lens' EventTagsInsert' (Maybe Text) +etiQuotaUser + = lens _etiQuotaUser (\ s a -> s{_etiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etiPrettyPrint :: Lens' EventTagsInsert' Bool +etiPrettyPrint + = lens _etiPrettyPrint + (\ s a -> s{_etiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etiUserIp :: Lens' EventTagsInsert' (Maybe Text) +etiUserIp + = lens _etiUserIp (\ s a -> s{_etiUserIp = a}) + +-- | User profile ID associated with this request. +etiProfileId :: Lens' EventTagsInsert' Int64 +etiProfileId + = lens _etiProfileId (\ s a -> s{_etiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etiKey :: Lens' EventTagsInsert' (Maybe Text) +etiKey = lens _etiKey (\ s a -> s{_etiKey = a}) + +-- | OAuth 2.0 token for the current user. +etiOauthToken :: Lens' EventTagsInsert' (Maybe Text) +etiOauthToken + = lens _etiOauthToken + (\ s a -> s{_etiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etiFields :: Lens' EventTagsInsert' (Maybe Text) +etiFields + = lens _etiFields (\ s a -> s{_etiFields = a}) + +-- | Data format for the response. +etiAlt :: Lens' EventTagsInsert' Text +etiAlt = lens _etiAlt (\ s a -> s{_etiAlt = a}) + +instance GoogleRequest EventTagsInsert' where + type Rs EventTagsInsert' = EventTag + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsInsert{..} + = go _etiQuotaUser _etiPrettyPrint _etiUserIp + _etiProfileId + _etiKey + _etiOauthToken + _etiFields + _etiAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/List.hs new file mode 100644 index 000000000..ba831398c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/List.hs @@ -0,0 +1,302 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of event tags, possibly filtered. +-- +-- /See:/ for @DfareportingEventTagsList@. +module DFAReporting.EventTags.List + ( + -- * REST Resource + EventTagsListAPI + + -- * Creating a Request + , eventTagsList + , EventTagsList + + -- * Request Lenses + , etlQuotaUser + , etlPrettyPrint + , etlDefinitionsOnly + , etlEventTagTypes + , etlEnabled + , etlUserIp + , etlAdvertiserId + , etlSearchString + , etlCampaignId + , etlIds + , etlProfileId + , etlSortOrder + , etlKey + , etlAdId + , etlSortField + , etlOauthToken + , etlFields + , etlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsList@ which the +-- 'EventTagsList' request conforms to. +type EventTagsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> + QueryParam "definitionsOnly" Bool :> + QueryParams "eventTagTypes" Text :> + QueryParam "enabled" Bool :> + QueryParam "advertiserId" Int64 :> + QueryParam "searchString" Text :> + QueryParam "campaignId" Int64 :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "adId" Int64 :> + QueryParam "sortField" Text :> + Get '[JSON] EventTagsListResponse + +-- | Retrieves a list of event tags, possibly filtered. +-- +-- /See:/ 'eventTagsList' smart constructor. +data EventTagsList = EventTagsList + { _etlQuotaUser :: !(Maybe Text) + , _etlPrettyPrint :: !Bool + , _etlDefinitionsOnly :: !(Maybe Bool) + , _etlEventTagTypes :: !(Maybe Text) + , _etlEnabled :: !(Maybe Bool) + , _etlUserIp :: !(Maybe Text) + , _etlAdvertiserId :: !(Maybe Int64) + , _etlSearchString :: !(Maybe Text) + , _etlCampaignId :: !(Maybe Int64) + , _etlIds :: !(Maybe Int64) + , _etlProfileId :: !Int64 + , _etlSortOrder :: !(Maybe Text) + , _etlKey :: !(Maybe Text) + , _etlAdId :: !(Maybe Int64) + , _etlSortField :: !(Maybe Text) + , _etlOauthToken :: !(Maybe Text) + , _etlFields :: !(Maybe Text) + , _etlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etlQuotaUser' +-- +-- * 'etlPrettyPrint' +-- +-- * 'etlDefinitionsOnly' +-- +-- * 'etlEventTagTypes' +-- +-- * 'etlEnabled' +-- +-- * 'etlUserIp' +-- +-- * 'etlAdvertiserId' +-- +-- * 'etlSearchString' +-- +-- * 'etlCampaignId' +-- +-- * 'etlIds' +-- +-- * 'etlProfileId' +-- +-- * 'etlSortOrder' +-- +-- * 'etlKey' +-- +-- * 'etlAdId' +-- +-- * 'etlSortField' +-- +-- * 'etlOauthToken' +-- +-- * 'etlFields' +-- +-- * 'etlAlt' +eventTagsList + :: Int64 -- ^ 'profileId' + -> EventTagsList +eventTagsList pEtlProfileId_ = + EventTagsList + { _etlQuotaUser = Nothing + , _etlPrettyPrint = True + , _etlDefinitionsOnly = Nothing + , _etlEventTagTypes = Nothing + , _etlEnabled = Nothing + , _etlUserIp = Nothing + , _etlAdvertiserId = Nothing + , _etlSearchString = Nothing + , _etlCampaignId = Nothing + , _etlIds = Nothing + , _etlProfileId = pEtlProfileId_ + , _etlSortOrder = Nothing + , _etlKey = Nothing + , _etlAdId = Nothing + , _etlSortField = Nothing + , _etlOauthToken = Nothing + , _etlFields = Nothing + , _etlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etlQuotaUser :: Lens' EventTagsList' (Maybe Text) +etlQuotaUser + = lens _etlQuotaUser (\ s a -> s{_etlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etlPrettyPrint :: Lens' EventTagsList' Bool +etlPrettyPrint + = lens _etlPrettyPrint + (\ s a -> s{_etlPrettyPrint = a}) + +-- | Examine only the specified campaign or advertiser\'s event tags for +-- matching selector criteria. When set to false, the parent advertiser and +-- parent campaign of the specified ad or campaign is examined as well. In +-- addition, when set to false, the status field is examined as well, along +-- with the enabledByDefault field. This parameter can not be set to true +-- when adId is specified as ads do not define their own even tags. +etlDefinitionsOnly :: Lens' EventTagsList' (Maybe Bool) +etlDefinitionsOnly + = lens _etlDefinitionsOnly + (\ s a -> s{_etlDefinitionsOnly = a}) + +-- | Select only event tags with the specified event tag types. Event tag +-- types can be used to specify whether to use a third-party pixel, a +-- third-party JavaScript URL, or a third-party click-through URL for +-- either impression or click tracking. +etlEventTagTypes :: Lens' EventTagsList' (Maybe Text) +etlEventTagTypes + = lens _etlEventTagTypes + (\ s a -> s{_etlEventTagTypes = a}) + +-- | Select only enabled event tags. What is considered enabled or disabled +-- depends on the definitionsOnly parameter. When definitionsOnly is set to +-- true, only the specified advertiser or campaign\'s event tags\' +-- enabledByDefault field is examined. When definitionsOnly is set to +-- false, the specified ad or specified campaign\'s parent advertiser\'s or +-- parent campaign\'s event tags\' enabledByDefault and status fields are +-- examined as well. +etlEnabled :: Lens' EventTagsList' (Maybe Bool) +etlEnabled + = lens _etlEnabled (\ s a -> s{_etlEnabled = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etlUserIp :: Lens' EventTagsList' (Maybe Text) +etlUserIp + = lens _etlUserIp (\ s a -> s{_etlUserIp = a}) + +-- | Select only event tags that belong to this advertiser. +etlAdvertiserId :: Lens' EventTagsList' (Maybe Int64) +etlAdvertiserId + = lens _etlAdvertiserId + (\ s a -> s{_etlAdvertiserId = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"eventtag*2015\" will return objects with names like +-- \"eventtag June 2015\", \"eventtag April 2015\", or simply \"eventtag +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"eventtag\" will match objects with name \"my eventtag\", \"eventtag +-- 2015\", or simply \"eventtag\". +etlSearchString :: Lens' EventTagsList' (Maybe Text) +etlSearchString + = lens _etlSearchString + (\ s a -> s{_etlSearchString = a}) + +-- | Select only event tags that belong to this campaign. +etlCampaignId :: Lens' EventTagsList' (Maybe Int64) +etlCampaignId + = lens _etlCampaignId + (\ s a -> s{_etlCampaignId = a}) + +-- | Select only event tags with these IDs. +etlIds :: Lens' EventTagsList' (Maybe Int64) +etlIds = lens _etlIds (\ s a -> s{_etlIds = a}) + +-- | User profile ID associated with this request. +etlProfileId :: Lens' EventTagsList' Int64 +etlProfileId + = lens _etlProfileId (\ s a -> s{_etlProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +etlSortOrder :: Lens' EventTagsList' (Maybe Text) +etlSortOrder + = lens _etlSortOrder (\ s a -> s{_etlSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etlKey :: Lens' EventTagsList' (Maybe Text) +etlKey = lens _etlKey (\ s a -> s{_etlKey = a}) + +-- | Select only event tags that belong to this ad. +etlAdId :: Lens' EventTagsList' (Maybe Int64) +etlAdId = lens _etlAdId (\ s a -> s{_etlAdId = a}) + +-- | Field by which to sort the list. +etlSortField :: Lens' EventTagsList' (Maybe Text) +etlSortField + = lens _etlSortField (\ s a -> s{_etlSortField = a}) + +-- | OAuth 2.0 token for the current user. +etlOauthToken :: Lens' EventTagsList' (Maybe Text) +etlOauthToken + = lens _etlOauthToken + (\ s a -> s{_etlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etlFields :: Lens' EventTagsList' (Maybe Text) +etlFields + = lens _etlFields (\ s a -> s{_etlFields = a}) + +-- | Data format for the response. +etlAlt :: Lens' EventTagsList' Text +etlAlt = lens _etlAlt (\ s a -> s{_etlAlt = a}) + +instance GoogleRequest EventTagsList' where + type Rs EventTagsList' = EventTagsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsList{..} + = go _etlQuotaUser _etlPrettyPrint + _etlDefinitionsOnly + _etlEventTagTypes + _etlEnabled + _etlUserIp + _etlAdvertiserId + _etlSearchString + _etlCampaignId + _etlIds + _etlProfileId + _etlSortOrder + _etlKey + _etlAdId + _etlSortField + _etlOauthToken + _etlFields + _etlAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Patch.hs new file mode 100644 index 000000000..18089cf0c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Patch.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing event tag. This method supports patch semantics. +-- +-- /See:/ for @DfareportingEventTagsPatch@. +module DFAReporting.EventTags.Patch + ( + -- * REST Resource + EventTagsPatchAPI + + -- * Creating a Request + , eventTagsPatch + , EventTagsPatch + + -- * Request Lenses + , etpQuotaUser + , etpPrettyPrint + , etpUserIp + , etpProfileId + , etpKey + , etpId + , etpOauthToken + , etpFields + , etpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsPatch@ which the +-- 'EventTagsPatch' request conforms to. +type EventTagsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> + QueryParam "id" Int64 :> Patch '[JSON] EventTag + +-- | Updates an existing event tag. This method supports patch semantics. +-- +-- /See:/ 'eventTagsPatch' smart constructor. +data EventTagsPatch = EventTagsPatch + { _etpQuotaUser :: !(Maybe Text) + , _etpPrettyPrint :: !Bool + , _etpUserIp :: !(Maybe Text) + , _etpProfileId :: !Int64 + , _etpKey :: !(Maybe Text) + , _etpId :: !Int64 + , _etpOauthToken :: !(Maybe Text) + , _etpFields :: !(Maybe Text) + , _etpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etpQuotaUser' +-- +-- * 'etpPrettyPrint' +-- +-- * 'etpUserIp' +-- +-- * 'etpProfileId' +-- +-- * 'etpKey' +-- +-- * 'etpId' +-- +-- * 'etpOauthToken' +-- +-- * 'etpFields' +-- +-- * 'etpAlt' +eventTagsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> EventTagsPatch +eventTagsPatch pEtpProfileId_ pEtpId_ = + EventTagsPatch + { _etpQuotaUser = Nothing + , _etpPrettyPrint = True + , _etpUserIp = Nothing + , _etpProfileId = pEtpProfileId_ + , _etpKey = Nothing + , _etpId = pEtpId_ + , _etpOauthToken = Nothing + , _etpFields = Nothing + , _etpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etpQuotaUser :: Lens' EventTagsPatch' (Maybe Text) +etpQuotaUser + = lens _etpQuotaUser (\ s a -> s{_etpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etpPrettyPrint :: Lens' EventTagsPatch' Bool +etpPrettyPrint + = lens _etpPrettyPrint + (\ s a -> s{_etpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etpUserIp :: Lens' EventTagsPatch' (Maybe Text) +etpUserIp + = lens _etpUserIp (\ s a -> s{_etpUserIp = a}) + +-- | User profile ID associated with this request. +etpProfileId :: Lens' EventTagsPatch' Int64 +etpProfileId + = lens _etpProfileId (\ s a -> s{_etpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etpKey :: Lens' EventTagsPatch' (Maybe Text) +etpKey = lens _etpKey (\ s a -> s{_etpKey = a}) + +-- | Event tag ID. +etpId :: Lens' EventTagsPatch' Int64 +etpId = lens _etpId (\ s a -> s{_etpId = a}) + +-- | OAuth 2.0 token for the current user. +etpOauthToken :: Lens' EventTagsPatch' (Maybe Text) +etpOauthToken + = lens _etpOauthToken + (\ s a -> s{_etpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etpFields :: Lens' EventTagsPatch' (Maybe Text) +etpFields + = lens _etpFields (\ s a -> s{_etpFields = a}) + +-- | Data format for the response. +etpAlt :: Lens' EventTagsPatch' Text +etpAlt = lens _etpAlt (\ s a -> s{_etpAlt = a}) + +instance GoogleRequest EventTagsPatch' where + type Rs EventTagsPatch' = EventTag + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsPatch{..} + = go _etpQuotaUser _etpPrettyPrint _etpUserIp + _etpProfileId + _etpKey + (Just _etpId) + _etpOauthToken + _etpFields + _etpAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Update.hs new file mode 100644 index 000000000..ab2ef6429 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.EventTags.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing event tag. +-- +-- /See:/ for @DfareportingEventTagsUpdate@. +module DFAReporting.EventTags.Update + ( + -- * REST Resource + EventTagsUpdateAPI + + -- * Creating a Request + , eventTagsUpdate + , EventTagsUpdate + + -- * Request Lenses + , etuQuotaUser + , etuPrettyPrint + , etuUserIp + , etuProfileId + , etuKey + , etuOauthToken + , etuFields + , etuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingEventTagsUpdate@ which the +-- 'EventTagsUpdate' request conforms to. +type EventTagsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "eventTags" :> Put '[JSON] EventTag + +-- | Updates an existing event tag. +-- +-- /See:/ 'eventTagsUpdate' smart constructor. +data EventTagsUpdate = EventTagsUpdate + { _etuQuotaUser :: !(Maybe Text) + , _etuPrettyPrint :: !Bool + , _etuUserIp :: !(Maybe Text) + , _etuProfileId :: !Int64 + , _etuKey :: !(Maybe Text) + , _etuOauthToken :: !(Maybe Text) + , _etuFields :: !(Maybe Text) + , _etuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTagsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etuQuotaUser' +-- +-- * 'etuPrettyPrint' +-- +-- * 'etuUserIp' +-- +-- * 'etuProfileId' +-- +-- * 'etuKey' +-- +-- * 'etuOauthToken' +-- +-- * 'etuFields' +-- +-- * 'etuAlt' +eventTagsUpdate + :: Int64 -- ^ 'profileId' + -> EventTagsUpdate +eventTagsUpdate pEtuProfileId_ = + EventTagsUpdate + { _etuQuotaUser = Nothing + , _etuPrettyPrint = True + , _etuUserIp = Nothing + , _etuProfileId = pEtuProfileId_ + , _etuKey = Nothing + , _etuOauthToken = Nothing + , _etuFields = Nothing + , _etuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etuQuotaUser :: Lens' EventTagsUpdate' (Maybe Text) +etuQuotaUser + = lens _etuQuotaUser (\ s a -> s{_etuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etuPrettyPrint :: Lens' EventTagsUpdate' Bool +etuPrettyPrint + = lens _etuPrettyPrint + (\ s a -> s{_etuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etuUserIp :: Lens' EventTagsUpdate' (Maybe Text) +etuUserIp + = lens _etuUserIp (\ s a -> s{_etuUserIp = a}) + +-- | User profile ID associated with this request. +etuProfileId :: Lens' EventTagsUpdate' Int64 +etuProfileId + = lens _etuProfileId (\ s a -> s{_etuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etuKey :: Lens' EventTagsUpdate' (Maybe Text) +etuKey = lens _etuKey (\ s a -> s{_etuKey = a}) + +-- | OAuth 2.0 token for the current user. +etuOauthToken :: Lens' EventTagsUpdate' (Maybe Text) +etuOauthToken + = lens _etuOauthToken + (\ s a -> s{_etuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +etuFields :: Lens' EventTagsUpdate' (Maybe Text) +etuFields + = lens _etuFields (\ s a -> s{_etuFields = a}) + +-- | Data format for the response. +etuAlt :: Lens' EventTagsUpdate' Text +etuAlt = lens _etuAlt (\ s a -> s{_etuAlt = a}) + +instance GoogleRequest EventTagsUpdate' where + type Rs EventTagsUpdate' = EventTag + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u EventTagsUpdate{..} + = go _etuQuotaUser _etuPrettyPrint _etuUserIp + _etuProfileId + _etuKey + _etuOauthToken + _etuFields + _etuAlt + where go + = clientWithRoute (Proxy :: Proxy EventTagsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/Get.hs new file mode 100644 index 000000000..edb66f069 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Files.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report file by its report ID and file ID. +-- +-- /See:/ for @DfareportingFilesGet@. +module DFAReporting.Files.Get + ( + -- * REST Resource + FilesGetAPI + + -- * Creating a Request + , filesGet + , FilesGet + + -- * Request Lenses + , fgQuotaUser + , fgPrettyPrint + , fgUserIp + , fgReportId + , fgKey + , fgFileId + , fgOauthToken + , fgFields + , fgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFilesGet@ which the +-- 'FilesGet' request conforms to. +type FilesGetAPI = + "reports" :> + Capture "reportId" Int64 :> + "files" :> Capture "fileId" Int64 :> Get '[JSON] File + +-- | Retrieves a report file by its report ID and file ID. +-- +-- /See:/ 'filesGet' smart constructor. +data FilesGet = FilesGet + { _fgQuotaUser :: !(Maybe Text) + , _fgPrettyPrint :: !Bool + , _fgUserIp :: !(Maybe Text) + , _fgReportId :: !Int64 + , _fgKey :: !(Maybe Text) + , _fgFileId :: !Int64 + , _fgOauthToken :: !(Maybe Text) + , _fgFields :: !(Maybe Text) + , _fgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fgQuotaUser' +-- +-- * 'fgPrettyPrint' +-- +-- * 'fgUserIp' +-- +-- * 'fgReportId' +-- +-- * 'fgKey' +-- +-- * 'fgFileId' +-- +-- * 'fgOauthToken' +-- +-- * 'fgFields' +-- +-- * 'fgAlt' +filesGet + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'fileId' + -> FilesGet +filesGet pFgReportId_ pFgFileId_ = + FilesGet + { _fgQuotaUser = Nothing + , _fgPrettyPrint = True + , _fgUserIp = Nothing + , _fgReportId = pFgReportId_ + , _fgKey = Nothing + , _fgFileId = pFgFileId_ + , _fgOauthToken = Nothing + , _fgFields = Nothing + , _fgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fgQuotaUser :: Lens' FilesGet' (Maybe Text) +fgQuotaUser + = lens _fgQuotaUser (\ s a -> s{_fgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fgPrettyPrint :: Lens' FilesGet' Bool +fgPrettyPrint + = lens _fgPrettyPrint + (\ s a -> s{_fgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fgUserIp :: Lens' FilesGet' (Maybe Text) +fgUserIp = lens _fgUserIp (\ s a -> s{_fgUserIp = a}) + +-- | The ID of the report. +fgReportId :: Lens' FilesGet' Int64 +fgReportId + = lens _fgReportId (\ s a -> s{_fgReportId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fgKey :: Lens' FilesGet' (Maybe Text) +fgKey = lens _fgKey (\ s a -> s{_fgKey = a}) + +-- | The ID of the report file. +fgFileId :: Lens' FilesGet' Int64 +fgFileId = lens _fgFileId (\ s a -> s{_fgFileId = a}) + +-- | OAuth 2.0 token for the current user. +fgOauthToken :: Lens' FilesGet' (Maybe Text) +fgOauthToken + = lens _fgOauthToken (\ s a -> s{_fgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fgFields :: Lens' FilesGet' (Maybe Text) +fgFields = lens _fgFields (\ s a -> s{_fgFields = a}) + +-- | Data format for the response. +fgAlt :: Lens' FilesGet' Text +fgAlt = lens _fgAlt (\ s a -> s{_fgAlt = a}) + +instance GoogleRequest FilesGet' where + type Rs FilesGet' = File + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FilesGet{..} + = go _fgQuotaUser _fgPrettyPrint _fgUserIp + _fgReportId + _fgKey + _fgFileId + _fgOauthToken + _fgFields + _fgAlt + where go + = clientWithRoute (Proxy :: Proxy FilesGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/List.hs new file mode 100644 index 000000000..d8489bf5c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/List.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Files.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists files for a user profile. +-- +-- /See:/ for @DfareportingFilesList@. +module DFAReporting.Files.List + ( + -- * REST Resource + FilesListAPI + + -- * Creating a Request + , filesList + , FilesList + + -- * Request Lenses + , flQuotaUser + , flPrettyPrint + , flUserIp + , flProfileId + , flSortOrder + , flKey + , flScope + , flPageToken + , flSortField + , flOauthToken + , flMaxResults + , flFields + , flAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFilesList@ which the +-- 'FilesList' request conforms to. +type FilesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "files" :> + QueryParam "sortOrder" Text :> + QueryParam "scope" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] FileList + +-- | Lists files for a user profile. +-- +-- /See:/ 'filesList' smart constructor. +data FilesList = FilesList + { _flQuotaUser :: !(Maybe Text) + , _flPrettyPrint :: !Bool + , _flUserIp :: !(Maybe Text) + , _flProfileId :: !Int64 + , _flSortOrder :: !Text + , _flKey :: !(Maybe Text) + , _flScope :: !Text + , _flPageToken :: !(Maybe Text) + , _flSortField :: !Text + , _flOauthToken :: !(Maybe Text) + , _flMaxResults :: !(Maybe Int32) + , _flFields :: !(Maybe Text) + , _flAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flQuotaUser' +-- +-- * 'flPrettyPrint' +-- +-- * 'flUserIp' +-- +-- * 'flProfileId' +-- +-- * 'flSortOrder' +-- +-- * 'flKey' +-- +-- * 'flScope' +-- +-- * 'flPageToken' +-- +-- * 'flSortField' +-- +-- * 'flOauthToken' +-- +-- * 'flMaxResults' +-- +-- * 'flFields' +-- +-- * 'flAlt' +filesList + :: Int64 -- ^ 'profileId' + -> FilesList +filesList pFlProfileId_ = + FilesList + { _flQuotaUser = Nothing + , _flPrettyPrint = True + , _flUserIp = Nothing + , _flProfileId = pFlProfileId_ + , _flSortOrder = "DESCENDING" + , _flKey = Nothing + , _flScope = "MINE" + , _flPageToken = Nothing + , _flSortField = "LAST_MODIFIED_TIME" + , _flOauthToken = Nothing + , _flMaxResults = Nothing + , _flFields = Nothing + , _flAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +flQuotaUser :: Lens' FilesList' (Maybe Text) +flQuotaUser + = lens _flQuotaUser (\ s a -> s{_flQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +flPrettyPrint :: Lens' FilesList' Bool +flPrettyPrint + = lens _flPrettyPrint + (\ s a -> s{_flPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +flUserIp :: Lens' FilesList' (Maybe Text) +flUserIp = lens _flUserIp (\ s a -> s{_flUserIp = a}) + +-- | The DFA profile ID. +flProfileId :: Lens' FilesList' Int64 +flProfileId + = lens _flProfileId (\ s a -> s{_flProfileId = a}) + +-- | Order of sorted results, default is \'DESCENDING\'. +flSortOrder :: Lens' FilesList' Text +flSortOrder + = lens _flSortOrder (\ s a -> s{_flSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +flKey :: Lens' FilesList' (Maybe Text) +flKey = lens _flKey (\ s a -> s{_flKey = a}) + +-- | The scope that defines which results are returned, default is \'MINE\'. +flScope :: Lens' FilesList' Text +flScope = lens _flScope (\ s a -> s{_flScope = a}) + +-- | The value of the nextToken from the previous result page. +flPageToken :: Lens' FilesList' (Maybe Text) +flPageToken + = lens _flPageToken (\ s a -> s{_flPageToken = a}) + +-- | The field by which to sort the list. +flSortField :: Lens' FilesList' Text +flSortField + = lens _flSortField (\ s a -> s{_flSortField = a}) + +-- | OAuth 2.0 token for the current user. +flOauthToken :: Lens' FilesList' (Maybe Text) +flOauthToken + = lens _flOauthToken (\ s a -> s{_flOauthToken = a}) + +-- | Maximum number of results to return. +flMaxResults :: Lens' FilesList' (Maybe Int32) +flMaxResults + = lens _flMaxResults (\ s a -> s{_flMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +flFields :: Lens' FilesList' (Maybe Text) +flFields = lens _flFields (\ s a -> s{_flFields = a}) + +-- | Data format for the response. +flAlt :: Lens' FilesList' Text +flAlt = lens _flAlt (\ s a -> s{_flAlt = a}) + +instance GoogleRequest FilesList' where + type Rs FilesList' = FileList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FilesList{..} + = go _flQuotaUser _flPrettyPrint _flUserIp + _flProfileId + (Just _flSortOrder) + _flKey + (Just _flScope) + _flPageToken + (Just _flSortField) + _flOauthToken + _flMaxResults + _flFields + _flAlt + where go + = clientWithRoute (Proxy :: Proxy FilesListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Delete.hs new file mode 100644 index 000000000..cf220a933 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing floodlight activity. +-- +-- /See:/ for @DfareportingFloodlightActivitiesDelete@. +module DFAReporting.FloodlightActivities.Delete + ( + -- * REST Resource + FloodlightActivitiesDeleteAPI + + -- * Creating a Request + , floodlightActivitiesDelete + , FloodlightActivitiesDelete + + -- * Request Lenses + , fadQuotaUser + , fadPrettyPrint + , fadUserIp + , fadProfileId + , fadKey + , fadId + , fadOauthToken + , fadFields + , fadAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesDelete@ which the +-- 'FloodlightActivitiesDelete' request conforms to. +type FloodlightActivitiesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing floodlight activity. +-- +-- /See:/ 'floodlightActivitiesDelete' smart constructor. +data FloodlightActivitiesDelete = FloodlightActivitiesDelete + { _fadQuotaUser :: !(Maybe Text) + , _fadPrettyPrint :: !Bool + , _fadUserIp :: !(Maybe Text) + , _fadProfileId :: !Int64 + , _fadKey :: !(Maybe Text) + , _fadId :: !Int64 + , _fadOauthToken :: !(Maybe Text) + , _fadFields :: !(Maybe Text) + , _fadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fadQuotaUser' +-- +-- * 'fadPrettyPrint' +-- +-- * 'fadUserIp' +-- +-- * 'fadProfileId' +-- +-- * 'fadKey' +-- +-- * 'fadId' +-- +-- * 'fadOauthToken' +-- +-- * 'fadFields' +-- +-- * 'fadAlt' +floodlightActivitiesDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivitiesDelete +floodlightActivitiesDelete pFadProfileId_ pFadId_ = + FloodlightActivitiesDelete + { _fadQuotaUser = Nothing + , _fadPrettyPrint = True + , _fadUserIp = Nothing + , _fadProfileId = pFadProfileId_ + , _fadKey = Nothing + , _fadId = pFadId_ + , _fadOauthToken = Nothing + , _fadFields = Nothing + , _fadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fadQuotaUser :: Lens' FloodlightActivitiesDelete' (Maybe Text) +fadQuotaUser + = lens _fadQuotaUser (\ s a -> s{_fadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fadPrettyPrint :: Lens' FloodlightActivitiesDelete' Bool +fadPrettyPrint + = lens _fadPrettyPrint + (\ s a -> s{_fadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fadUserIp :: Lens' FloodlightActivitiesDelete' (Maybe Text) +fadUserIp + = lens _fadUserIp (\ s a -> s{_fadUserIp = a}) + +-- | User profile ID associated with this request. +fadProfileId :: Lens' FloodlightActivitiesDelete' Int64 +fadProfileId + = lens _fadProfileId (\ s a -> s{_fadProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fadKey :: Lens' FloodlightActivitiesDelete' (Maybe Text) +fadKey = lens _fadKey (\ s a -> s{_fadKey = a}) + +-- | Floodlight activity ID. +fadId :: Lens' FloodlightActivitiesDelete' Int64 +fadId = lens _fadId (\ s a -> s{_fadId = a}) + +-- | OAuth 2.0 token for the current user. +fadOauthToken :: Lens' FloodlightActivitiesDelete' (Maybe Text) +fadOauthToken + = lens _fadOauthToken + (\ s a -> s{_fadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fadFields :: Lens' FloodlightActivitiesDelete' (Maybe Text) +fadFields + = lens _fadFields (\ s a -> s{_fadFields = a}) + +-- | Data format for the response. +fadAlt :: Lens' FloodlightActivitiesDelete' Text +fadAlt = lens _fadAlt (\ s a -> s{_fadAlt = a}) + +instance GoogleRequest FloodlightActivitiesDelete' + where + type Rs FloodlightActivitiesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesDelete{..} + = go _fadQuotaUser _fadPrettyPrint _fadUserIp + _fadProfileId + _fadKey + _fadId + _fadOauthToken + _fadFields + _fadAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Generatetag.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Generatetag.hs new file mode 100644 index 000000000..39bea1f6c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Generatetag.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Generatetag +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates a tag for a floodlight activity. +-- +-- /See:/ for @DfareportingFloodlightActivitiesGeneratetag@. +module DFAReporting.FloodlightActivities.Generatetag + ( + -- * REST Resource + FloodlightActivitiesGeneratetagAPI + + -- * Creating a Request + , floodlightActivitiesGeneratetag + , FloodlightActivitiesGeneratetag + + -- * Request Lenses + , fagQuotaUser + , fagPrettyPrint + , fagUserIp + , fagFloodlightActivityId + , fagProfileId + , fagKey + , fagOauthToken + , fagFields + , fagAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesGeneratetag@ which the +-- 'FloodlightActivitiesGeneratetag' request conforms to. +type FloodlightActivitiesGeneratetagAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + "generatetag" :> + QueryParam "floodlightActivityId" Int64 :> + Post '[JSON] FloodlightActivitiesGenerateTagResponse + +-- | Generates a tag for a floodlight activity. +-- +-- /See:/ 'floodlightActivitiesGeneratetag' smart constructor. +data FloodlightActivitiesGeneratetag = FloodlightActivitiesGeneratetag + { _fagQuotaUser :: !(Maybe Text) + , _fagPrettyPrint :: !Bool + , _fagUserIp :: !(Maybe Text) + , _fagFloodlightActivityId :: !(Maybe Int64) + , _fagProfileId :: !Int64 + , _fagKey :: !(Maybe Text) + , _fagOauthToken :: !(Maybe Text) + , _fagFields :: !(Maybe Text) + , _fagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesGeneratetag'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagQuotaUser' +-- +-- * 'fagPrettyPrint' +-- +-- * 'fagUserIp' +-- +-- * 'fagFloodlightActivityId' +-- +-- * 'fagProfileId' +-- +-- * 'fagKey' +-- +-- * 'fagOauthToken' +-- +-- * 'fagFields' +-- +-- * 'fagAlt' +floodlightActivitiesGeneratetag + :: Int64 -- ^ 'profileId' + -> FloodlightActivitiesGeneratetag +floodlightActivitiesGeneratetag pFagProfileId_ = + FloodlightActivitiesGeneratetag + { _fagQuotaUser = Nothing + , _fagPrettyPrint = True + , _fagUserIp = Nothing + , _fagFloodlightActivityId = Nothing + , _fagProfileId = pFagProfileId_ + , _fagKey = Nothing + , _fagOauthToken = Nothing + , _fagFields = Nothing + , _fagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fagQuotaUser :: Lens' FloodlightActivitiesGeneratetag' (Maybe Text) +fagQuotaUser + = lens _fagQuotaUser (\ s a -> s{_fagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fagPrettyPrint :: Lens' FloodlightActivitiesGeneratetag' Bool +fagPrettyPrint + = lens _fagPrettyPrint + (\ s a -> s{_fagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fagUserIp :: Lens' FloodlightActivitiesGeneratetag' (Maybe Text) +fagUserIp + = lens _fagUserIp (\ s a -> s{_fagUserIp = a}) + +-- | Floodlight activity ID for which we want to generate a tag. +fagFloodlightActivityId :: Lens' FloodlightActivitiesGeneratetag' (Maybe Int64) +fagFloodlightActivityId + = lens _fagFloodlightActivityId + (\ s a -> s{_fagFloodlightActivityId = a}) + +-- | User profile ID associated with this request. +fagProfileId :: Lens' FloodlightActivitiesGeneratetag' Int64 +fagProfileId + = lens _fagProfileId (\ s a -> s{_fagProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fagKey :: Lens' FloodlightActivitiesGeneratetag' (Maybe Text) +fagKey = lens _fagKey (\ s a -> s{_fagKey = a}) + +-- | OAuth 2.0 token for the current user. +fagOauthToken :: Lens' FloodlightActivitiesGeneratetag' (Maybe Text) +fagOauthToken + = lens _fagOauthToken + (\ s a -> s{_fagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fagFields :: Lens' FloodlightActivitiesGeneratetag' (Maybe Text) +fagFields + = lens _fagFields (\ s a -> s{_fagFields = a}) + +-- | Data format for the response. +fagAlt :: Lens' FloodlightActivitiesGeneratetag' Text +fagAlt = lens _fagAlt (\ s a -> s{_fagAlt = a}) + +instance GoogleRequest + FloodlightActivitiesGeneratetag' where + type Rs FloodlightActivitiesGeneratetag' = + FloodlightActivitiesGenerateTagResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightActivitiesGeneratetag{..} + = go _fagQuotaUser _fagPrettyPrint _fagUserIp + _fagFloodlightActivityId + _fagProfileId + _fagKey + _fagOauthToken + _fagFields + _fagAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesGeneratetagAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Get.hs new file mode 100644 index 000000000..e89433c88 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one floodlight activity by ID. +-- +-- /See:/ for @DfareportingFloodlightActivitiesGet@. +module DFAReporting.FloodlightActivities.Get + ( + -- * REST Resource + FloodlightActivitiesGetAPI + + -- * Creating a Request + , floodlightActivitiesGet + , FloodlightActivitiesGet + + -- * Request Lenses + , floQuotaUser + , floPrettyPrint + , floUserIp + , floProfileId + , floKey + , floId + , floOauthToken + , floFields + , floAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesGet@ which the +-- 'FloodlightActivitiesGet' request conforms to. +type FloodlightActivitiesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + Capture "id" Int64 :> Get '[JSON] FloodlightActivity + +-- | Gets one floodlight activity by ID. +-- +-- /See:/ 'floodlightActivitiesGet' smart constructor. +data FloodlightActivitiesGet = FloodlightActivitiesGet + { _floQuotaUser :: !(Maybe Text) + , _floPrettyPrint :: !Bool + , _floUserIp :: !(Maybe Text) + , _floProfileId :: !Int64 + , _floKey :: !(Maybe Text) + , _floId :: !Int64 + , _floOauthToken :: !(Maybe Text) + , _floFields :: !(Maybe Text) + , _floAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'floQuotaUser' +-- +-- * 'floPrettyPrint' +-- +-- * 'floUserIp' +-- +-- * 'floProfileId' +-- +-- * 'floKey' +-- +-- * 'floId' +-- +-- * 'floOauthToken' +-- +-- * 'floFields' +-- +-- * 'floAlt' +floodlightActivitiesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivitiesGet +floodlightActivitiesGet pFloProfileId_ pFloId_ = + FloodlightActivitiesGet + { _floQuotaUser = Nothing + , _floPrettyPrint = True + , _floUserIp = Nothing + , _floProfileId = pFloProfileId_ + , _floKey = Nothing + , _floId = pFloId_ + , _floOauthToken = Nothing + , _floFields = Nothing + , _floAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +floQuotaUser :: Lens' FloodlightActivitiesGet' (Maybe Text) +floQuotaUser + = lens _floQuotaUser (\ s a -> s{_floQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +floPrettyPrint :: Lens' FloodlightActivitiesGet' Bool +floPrettyPrint + = lens _floPrettyPrint + (\ s a -> s{_floPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +floUserIp :: Lens' FloodlightActivitiesGet' (Maybe Text) +floUserIp + = lens _floUserIp (\ s a -> s{_floUserIp = a}) + +-- | User profile ID associated with this request. +floProfileId :: Lens' FloodlightActivitiesGet' Int64 +floProfileId + = lens _floProfileId (\ s a -> s{_floProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +floKey :: Lens' FloodlightActivitiesGet' (Maybe Text) +floKey = lens _floKey (\ s a -> s{_floKey = a}) + +-- | Floodlight activity ID. +floId :: Lens' FloodlightActivitiesGet' Int64 +floId = lens _floId (\ s a -> s{_floId = a}) + +-- | OAuth 2.0 token for the current user. +floOauthToken :: Lens' FloodlightActivitiesGet' (Maybe Text) +floOauthToken + = lens _floOauthToken + (\ s a -> s{_floOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +floFields :: Lens' FloodlightActivitiesGet' (Maybe Text) +floFields + = lens _floFields (\ s a -> s{_floFields = a}) + +-- | Data format for the response. +floAlt :: Lens' FloodlightActivitiesGet' Text +floAlt = lens _floAlt (\ s a -> s{_floAlt = a}) + +instance GoogleRequest FloodlightActivitiesGet' where + type Rs FloodlightActivitiesGet' = FloodlightActivity + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesGet{..} + = go _floQuotaUser _floPrettyPrint _floUserIp + _floProfileId + _floKey + _floId + _floOauthToken + _floFields + _floAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Insert.hs new file mode 100644 index 000000000..700fb9616 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Insert.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new floodlight activity. +-- +-- /See:/ for @DfareportingFloodlightActivitiesInsert@. +module DFAReporting.FloodlightActivities.Insert + ( + -- * REST Resource + FloodlightActivitiesInsertAPI + + -- * Creating a Request + , floodlightActivitiesInsert + , FloodlightActivitiesInsert + + -- * Request Lenses + , faiQuotaUser + , faiPrettyPrint + , faiUserIp + , faiProfileId + , faiKey + , faiOauthToken + , faiFields + , faiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesInsert@ which the +-- 'FloodlightActivitiesInsert' request conforms to. +type FloodlightActivitiesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + Post '[JSON] FloodlightActivity + +-- | Inserts a new floodlight activity. +-- +-- /See:/ 'floodlightActivitiesInsert' smart constructor. +data FloodlightActivitiesInsert = FloodlightActivitiesInsert + { _faiQuotaUser :: !(Maybe Text) + , _faiPrettyPrint :: !Bool + , _faiUserIp :: !(Maybe Text) + , _faiProfileId :: !Int64 + , _faiKey :: !(Maybe Text) + , _faiOauthToken :: !(Maybe Text) + , _faiFields :: !(Maybe Text) + , _faiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faiQuotaUser' +-- +-- * 'faiPrettyPrint' +-- +-- * 'faiUserIp' +-- +-- * 'faiProfileId' +-- +-- * 'faiKey' +-- +-- * 'faiOauthToken' +-- +-- * 'faiFields' +-- +-- * 'faiAlt' +floodlightActivitiesInsert + :: Int64 -- ^ 'profileId' + -> FloodlightActivitiesInsert +floodlightActivitiesInsert pFaiProfileId_ = + FloodlightActivitiesInsert + { _faiQuotaUser = Nothing + , _faiPrettyPrint = True + , _faiUserIp = Nothing + , _faiProfileId = pFaiProfileId_ + , _faiKey = Nothing + , _faiOauthToken = Nothing + , _faiFields = Nothing + , _faiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +faiQuotaUser :: Lens' FloodlightActivitiesInsert' (Maybe Text) +faiQuotaUser + = lens _faiQuotaUser (\ s a -> s{_faiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +faiPrettyPrint :: Lens' FloodlightActivitiesInsert' Bool +faiPrettyPrint + = lens _faiPrettyPrint + (\ s a -> s{_faiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +faiUserIp :: Lens' FloodlightActivitiesInsert' (Maybe Text) +faiUserIp + = lens _faiUserIp (\ s a -> s{_faiUserIp = a}) + +-- | User profile ID associated with this request. +faiProfileId :: Lens' FloodlightActivitiesInsert' Int64 +faiProfileId + = lens _faiProfileId (\ s a -> s{_faiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +faiKey :: Lens' FloodlightActivitiesInsert' (Maybe Text) +faiKey = lens _faiKey (\ s a -> s{_faiKey = a}) + +-- | OAuth 2.0 token for the current user. +faiOauthToken :: Lens' FloodlightActivitiesInsert' (Maybe Text) +faiOauthToken + = lens _faiOauthToken + (\ s a -> s{_faiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +faiFields :: Lens' FloodlightActivitiesInsert' (Maybe Text) +faiFields + = lens _faiFields (\ s a -> s{_faiFields = a}) + +-- | Data format for the response. +faiAlt :: Lens' FloodlightActivitiesInsert' Text +faiAlt = lens _faiAlt (\ s a -> s{_faiAlt = a}) + +instance GoogleRequest FloodlightActivitiesInsert' + where + type Rs FloodlightActivitiesInsert' = + FloodlightActivity + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesInsert{..} + = go _faiQuotaUser _faiPrettyPrint _faiUserIp + _faiProfileId + _faiKey + _faiOauthToken + _faiFields + _faiAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/List.hs new file mode 100644 index 000000000..95b6f55a8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/List.hs @@ -0,0 +1,344 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of floodlight activities, possibly filtered. +-- +-- /See:/ for @DfareportingFloodlightActivitiesList@. +module DFAReporting.FloodlightActivities.List + ( + -- * REST Resource + FloodlightActivitiesListAPI + + -- * Creating a Request + , floodlightActivitiesList + , FloodlightActivitiesList + + -- * Request Lenses + , falQuotaUser + , falTagString + , falPrettyPrint + , falFloodlightActivityGroupTagString + , falFloodlightConfigurationId + , falUserIp + , falAdvertiserId + , falSearchString + , falIds + , falProfileId + , falFloodlightActivityGroupIds + , falSortOrder + , falKey + , falFloodlightActivityGroupType + , falFloodlightActivityGroupName + , falPageToken + , falSortField + , falOauthToken + , falMaxResults + , falFields + , falAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesList@ which the +-- 'FloodlightActivitiesList' request conforms to. +type FloodlightActivitiesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + QueryParam "tagString" Text :> + QueryParam "floodlightActivityGroupTagString" Text :> + QueryParam "floodlightConfigurationId" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParams "floodlightActivityGroupIds" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "floodlightActivityGroupType" Text :> + QueryParam "floodlightActivityGroupName" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] + FloodlightActivitiesListResponse + +-- | Retrieves a list of floodlight activities, possibly filtered. +-- +-- /See:/ 'floodlightActivitiesList' smart constructor. +data FloodlightActivitiesList = FloodlightActivitiesList + { _falQuotaUser :: !(Maybe Text) + , _falTagString :: !(Maybe Text) + , _falPrettyPrint :: !Bool + , _falFloodlightActivityGroupTagString :: !(Maybe Text) + , _falFloodlightConfigurationId :: !(Maybe Int64) + , _falUserIp :: !(Maybe Text) + , _falAdvertiserId :: !(Maybe Int64) + , _falSearchString :: !(Maybe Text) + , _falIds :: !(Maybe Int64) + , _falProfileId :: !Int64 + , _falFloodlightActivityGroupIds :: !(Maybe Int64) + , _falSortOrder :: !(Maybe Text) + , _falKey :: !(Maybe Text) + , _falFloodlightActivityGroupType :: !(Maybe Text) + , _falFloodlightActivityGroupName :: !(Maybe Text) + , _falPageToken :: !(Maybe Text) + , _falSortField :: !(Maybe Text) + , _falOauthToken :: !(Maybe Text) + , _falMaxResults :: !(Maybe Int32) + , _falFields :: !(Maybe Text) + , _falAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'falQuotaUser' +-- +-- * 'falTagString' +-- +-- * 'falPrettyPrint' +-- +-- * 'falFloodlightActivityGroupTagString' +-- +-- * 'falFloodlightConfigurationId' +-- +-- * 'falUserIp' +-- +-- * 'falAdvertiserId' +-- +-- * 'falSearchString' +-- +-- * 'falIds' +-- +-- * 'falProfileId' +-- +-- * 'falFloodlightActivityGroupIds' +-- +-- * 'falSortOrder' +-- +-- * 'falKey' +-- +-- * 'falFloodlightActivityGroupType' +-- +-- * 'falFloodlightActivityGroupName' +-- +-- * 'falPageToken' +-- +-- * 'falSortField' +-- +-- * 'falOauthToken' +-- +-- * 'falMaxResults' +-- +-- * 'falFields' +-- +-- * 'falAlt' +floodlightActivitiesList + :: Int64 -- ^ 'profileId' + -> FloodlightActivitiesList +floodlightActivitiesList pFalProfileId_ = + FloodlightActivitiesList + { _falQuotaUser = Nothing + , _falTagString = Nothing + , _falPrettyPrint = True + , _falFloodlightActivityGroupTagString = Nothing + , _falFloodlightConfigurationId = Nothing + , _falUserIp = Nothing + , _falAdvertiserId = Nothing + , _falSearchString = Nothing + , _falIds = Nothing + , _falProfileId = pFalProfileId_ + , _falFloodlightActivityGroupIds = Nothing + , _falSortOrder = Nothing + , _falKey = Nothing + , _falFloodlightActivityGroupType = Nothing + , _falFloodlightActivityGroupName = Nothing + , _falPageToken = Nothing + , _falSortField = Nothing + , _falOauthToken = Nothing + , _falMaxResults = Nothing + , _falFields = Nothing + , _falAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +falQuotaUser :: Lens' FloodlightActivitiesList' (Maybe Text) +falQuotaUser + = lens _falQuotaUser (\ s a -> s{_falQuotaUser = a}) + +-- | Select only floodlight activities with the specified tag string. +falTagString :: Lens' FloodlightActivitiesList' (Maybe Text) +falTagString + = lens _falTagString (\ s a -> s{_falTagString = a}) + +-- | Returns response with indentations and line breaks. +falPrettyPrint :: Lens' FloodlightActivitiesList' Bool +falPrettyPrint + = lens _falPrettyPrint + (\ s a -> s{_falPrettyPrint = a}) + +-- | Select only floodlight activities with the specified floodlight activity +-- group tag string. +falFloodlightActivityGroupTagString :: Lens' FloodlightActivitiesList' (Maybe Text) +falFloodlightActivityGroupTagString + = lens _falFloodlightActivityGroupTagString + (\ s a -> + s{_falFloodlightActivityGroupTagString = a}) + +-- | Select only floodlight activities for the specified floodlight +-- configuration ID. Must specify either ids, advertiserId, or +-- floodlightConfigurationId for a non-empty result. +falFloodlightConfigurationId :: Lens' FloodlightActivitiesList' (Maybe Int64) +falFloodlightConfigurationId + = lens _falFloodlightConfigurationId + (\ s a -> s{_falFloodlightConfigurationId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +falUserIp :: Lens' FloodlightActivitiesList' (Maybe Text) +falUserIp + = lens _falUserIp (\ s a -> s{_falUserIp = a}) + +-- | Select only floodlight activities for the specified advertiser ID. Must +-- specify either ids, advertiserId, or floodlightConfigurationId for a +-- non-empty result. +falAdvertiserId :: Lens' FloodlightActivitiesList' (Maybe Int64) +falAdvertiserId + = lens _falAdvertiserId + (\ s a -> s{_falAdvertiserId = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"floodlightactivity*2015\" will return objects with names +-- like \"floodlightactivity June 2015\", \"floodlightactivity April +-- 2015\", or simply \"floodlightactivity 2015\". Most of the searches also +-- add wildcards implicitly at the start and the end of the search string. +-- For example, a search string of \"floodlightactivity\" will match +-- objects with name \"my floodlightactivity activity\", +-- \"floodlightactivity 2015\", or simply \"floodlightactivity\". +falSearchString :: Lens' FloodlightActivitiesList' (Maybe Text) +falSearchString + = lens _falSearchString + (\ s a -> s{_falSearchString = a}) + +-- | Select only floodlight activities with the specified IDs. Must specify +-- either ids, advertiserId, or floodlightConfigurationId for a non-empty +-- result. +falIds :: Lens' FloodlightActivitiesList' (Maybe Int64) +falIds = lens _falIds (\ s a -> s{_falIds = a}) + +-- | User profile ID associated with this request. +falProfileId :: Lens' FloodlightActivitiesList' Int64 +falProfileId + = lens _falProfileId (\ s a -> s{_falProfileId = a}) + +-- | Select only floodlight activities with the specified floodlight activity +-- group IDs. +falFloodlightActivityGroupIds :: Lens' FloodlightActivitiesList' (Maybe Int64) +falFloodlightActivityGroupIds + = lens _falFloodlightActivityGroupIds + (\ s a -> s{_falFloodlightActivityGroupIds = a}) + +-- | Order of sorted results, default is ASCENDING. +falSortOrder :: Lens' FloodlightActivitiesList' (Maybe Text) +falSortOrder + = lens _falSortOrder (\ s a -> s{_falSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +falKey :: Lens' FloodlightActivitiesList' (Maybe Text) +falKey = lens _falKey (\ s a -> s{_falKey = a}) + +-- | Select only floodlight activities with the specified floodlight activity +-- group type. +falFloodlightActivityGroupType :: Lens' FloodlightActivitiesList' (Maybe Text) +falFloodlightActivityGroupType + = lens _falFloodlightActivityGroupType + (\ s a -> s{_falFloodlightActivityGroupType = a}) + +-- | Select only floodlight activities with the specified floodlight activity +-- group name. +falFloodlightActivityGroupName :: Lens' FloodlightActivitiesList' (Maybe Text) +falFloodlightActivityGroupName + = lens _falFloodlightActivityGroupName + (\ s a -> s{_falFloodlightActivityGroupName = a}) + +-- | Value of the nextPageToken from the previous result page. +falPageToken :: Lens' FloodlightActivitiesList' (Maybe Text) +falPageToken + = lens _falPageToken (\ s a -> s{_falPageToken = a}) + +-- | Field by which to sort the list. +falSortField :: Lens' FloodlightActivitiesList' (Maybe Text) +falSortField + = lens _falSortField (\ s a -> s{_falSortField = a}) + +-- | OAuth 2.0 token for the current user. +falOauthToken :: Lens' FloodlightActivitiesList' (Maybe Text) +falOauthToken + = lens _falOauthToken + (\ s a -> s{_falOauthToken = a}) + +-- | Maximum number of results to return. +falMaxResults :: Lens' FloodlightActivitiesList' (Maybe Int32) +falMaxResults + = lens _falMaxResults + (\ s a -> s{_falMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +falFields :: Lens' FloodlightActivitiesList' (Maybe Text) +falFields + = lens _falFields (\ s a -> s{_falFields = a}) + +-- | Data format for the response. +falAlt :: Lens' FloodlightActivitiesList' Text +falAlt = lens _falAlt (\ s a -> s{_falAlt = a}) + +instance GoogleRequest FloodlightActivitiesList' + where + type Rs FloodlightActivitiesList' = + FloodlightActivitiesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesList{..} + = go _falQuotaUser _falTagString _falPrettyPrint + _falFloodlightActivityGroupTagString + _falFloodlightConfigurationId + _falUserIp + _falAdvertiserId + _falSearchString + _falIds + _falProfileId + _falFloodlightActivityGroupIds + _falSortOrder + _falKey + _falFloodlightActivityGroupType + _falFloodlightActivityGroupName + _falPageToken + _falSortField + _falOauthToken + _falMaxResults + _falFields + _falAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Patch.hs new file mode 100644 index 000000000..074e854fb --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Patch.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight activity. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingFloodlightActivitiesPatch@. +module DFAReporting.FloodlightActivities.Patch + ( + -- * REST Resource + FloodlightActivitiesPatchAPI + + -- * Creating a Request + , floodlightActivitiesPatch + , FloodlightActivitiesPatch + + -- * Request Lenses + , fapQuotaUser + , fapPrettyPrint + , fapUserIp + , fapProfileId + , fapKey + , fapId + , fapOauthToken + , fapFields + , fapAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesPatch@ which the +-- 'FloodlightActivitiesPatch' request conforms to. +type FloodlightActivitiesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + QueryParam "id" Int64 :> + Patch '[JSON] FloodlightActivity + +-- | Updates an existing floodlight activity. This method supports patch +-- semantics. +-- +-- /See:/ 'floodlightActivitiesPatch' smart constructor. +data FloodlightActivitiesPatch = FloodlightActivitiesPatch + { _fapQuotaUser :: !(Maybe Text) + , _fapPrettyPrint :: !Bool + , _fapUserIp :: !(Maybe Text) + , _fapProfileId :: !Int64 + , _fapKey :: !(Maybe Text) + , _fapId :: !Int64 + , _fapOauthToken :: !(Maybe Text) + , _fapFields :: !(Maybe Text) + , _fapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fapQuotaUser' +-- +-- * 'fapPrettyPrint' +-- +-- * 'fapUserIp' +-- +-- * 'fapProfileId' +-- +-- * 'fapKey' +-- +-- * 'fapId' +-- +-- * 'fapOauthToken' +-- +-- * 'fapFields' +-- +-- * 'fapAlt' +floodlightActivitiesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivitiesPatch +floodlightActivitiesPatch pFapProfileId_ pFapId_ = + FloodlightActivitiesPatch + { _fapQuotaUser = Nothing + , _fapPrettyPrint = True + , _fapUserIp = Nothing + , _fapProfileId = pFapProfileId_ + , _fapKey = Nothing + , _fapId = pFapId_ + , _fapOauthToken = Nothing + , _fapFields = Nothing + , _fapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fapQuotaUser :: Lens' FloodlightActivitiesPatch' (Maybe Text) +fapQuotaUser + = lens _fapQuotaUser (\ s a -> s{_fapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fapPrettyPrint :: Lens' FloodlightActivitiesPatch' Bool +fapPrettyPrint + = lens _fapPrettyPrint + (\ s a -> s{_fapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fapUserIp :: Lens' FloodlightActivitiesPatch' (Maybe Text) +fapUserIp + = lens _fapUserIp (\ s a -> s{_fapUserIp = a}) + +-- | User profile ID associated with this request. +fapProfileId :: Lens' FloodlightActivitiesPatch' Int64 +fapProfileId + = lens _fapProfileId (\ s a -> s{_fapProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fapKey :: Lens' FloodlightActivitiesPatch' (Maybe Text) +fapKey = lens _fapKey (\ s a -> s{_fapKey = a}) + +-- | Floodlight activity ID. +fapId :: Lens' FloodlightActivitiesPatch' Int64 +fapId = lens _fapId (\ s a -> s{_fapId = a}) + +-- | OAuth 2.0 token for the current user. +fapOauthToken :: Lens' FloodlightActivitiesPatch' (Maybe Text) +fapOauthToken + = lens _fapOauthToken + (\ s a -> s{_fapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fapFields :: Lens' FloodlightActivitiesPatch' (Maybe Text) +fapFields + = lens _fapFields (\ s a -> s{_fapFields = a}) + +-- | Data format for the response. +fapAlt :: Lens' FloodlightActivitiesPatch' Text +fapAlt = lens _fapAlt (\ s a -> s{_fapAlt = a}) + +instance GoogleRequest FloodlightActivitiesPatch' + where + type Rs FloodlightActivitiesPatch' = + FloodlightActivity + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesPatch{..} + = go _fapQuotaUser _fapPrettyPrint _fapUserIp + _fapProfileId + _fapKey + (Just _fapId) + _fapOauthToken + _fapFields + _fapAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Update.hs new file mode 100644 index 000000000..323c286ba --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Update.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivities.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight activity. +-- +-- /See:/ for @DfareportingFloodlightActivitiesUpdate@. +module DFAReporting.FloodlightActivities.Update + ( + -- * REST Resource + FloodlightActivitiesUpdateAPI + + -- * Creating a Request + , floodlightActivitiesUpdate + , FloodlightActivitiesUpdate + + -- * Request Lenses + , fauQuotaUser + , fauPrettyPrint + , fauUserIp + , fauProfileId + , fauKey + , fauOauthToken + , fauFields + , fauAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivitiesUpdate@ which the +-- 'FloodlightActivitiesUpdate' request conforms to. +type FloodlightActivitiesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivities" :> + Put '[JSON] FloodlightActivity + +-- | Updates an existing floodlight activity. +-- +-- /See:/ 'floodlightActivitiesUpdate' smart constructor. +data FloodlightActivitiesUpdate = FloodlightActivitiesUpdate + { _fauQuotaUser :: !(Maybe Text) + , _fauPrettyPrint :: !Bool + , _fauUserIp :: !(Maybe Text) + , _fauProfileId :: !Int64 + , _fauKey :: !(Maybe Text) + , _fauOauthToken :: !(Maybe Text) + , _fauFields :: !(Maybe Text) + , _fauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivitiesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fauQuotaUser' +-- +-- * 'fauPrettyPrint' +-- +-- * 'fauUserIp' +-- +-- * 'fauProfileId' +-- +-- * 'fauKey' +-- +-- * 'fauOauthToken' +-- +-- * 'fauFields' +-- +-- * 'fauAlt' +floodlightActivitiesUpdate + :: Int64 -- ^ 'profileId' + -> FloodlightActivitiesUpdate +floodlightActivitiesUpdate pFauProfileId_ = + FloodlightActivitiesUpdate + { _fauQuotaUser = Nothing + , _fauPrettyPrint = True + , _fauUserIp = Nothing + , _fauProfileId = pFauProfileId_ + , _fauKey = Nothing + , _fauOauthToken = Nothing + , _fauFields = Nothing + , _fauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fauQuotaUser :: Lens' FloodlightActivitiesUpdate' (Maybe Text) +fauQuotaUser + = lens _fauQuotaUser (\ s a -> s{_fauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fauPrettyPrint :: Lens' FloodlightActivitiesUpdate' Bool +fauPrettyPrint + = lens _fauPrettyPrint + (\ s a -> s{_fauPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fauUserIp :: Lens' FloodlightActivitiesUpdate' (Maybe Text) +fauUserIp + = lens _fauUserIp (\ s a -> s{_fauUserIp = a}) + +-- | User profile ID associated with this request. +fauProfileId :: Lens' FloodlightActivitiesUpdate' Int64 +fauProfileId + = lens _fauProfileId (\ s a -> s{_fauProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fauKey :: Lens' FloodlightActivitiesUpdate' (Maybe Text) +fauKey = lens _fauKey (\ s a -> s{_fauKey = a}) + +-- | OAuth 2.0 token for the current user. +fauOauthToken :: Lens' FloodlightActivitiesUpdate' (Maybe Text) +fauOauthToken + = lens _fauOauthToken + (\ s a -> s{_fauOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fauFields :: Lens' FloodlightActivitiesUpdate' (Maybe Text) +fauFields + = lens _fauFields (\ s a -> s{_fauFields = a}) + +-- | Data format for the response. +fauAlt :: Lens' FloodlightActivitiesUpdate' Text +fauAlt = lens _fauAlt (\ s a -> s{_fauAlt = a}) + +instance GoogleRequest FloodlightActivitiesUpdate' + where + type Rs FloodlightActivitiesUpdate' = + FloodlightActivity + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivitiesUpdate{..} + = go _fauQuotaUser _fauPrettyPrint _fauUserIp + _fauProfileId + _fauKey + _fauOauthToken + _fauFields + _fauAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivitiesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Delete.hs new file mode 100644 index 000000000..67513ee17 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Delete.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing floodlight activity group. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsDelete@. +module DFAReporting.FloodlightActivityGroups.Delete + ( + -- * REST Resource + FloodlightActivityGroupsDeleteAPI + + -- * Creating a Request + , floodlightActivityGroupsDelete + , FloodlightActivityGroupsDelete + + -- * Request Lenses + , fagdQuotaUser + , fagdPrettyPrint + , fagdUserIp + , fagdProfileId + , fagdKey + , fagdId + , fagdOauthToken + , fagdFields + , fagdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsDelete@ which the +-- 'FloodlightActivityGroupsDelete' request conforms to. +type FloodlightActivityGroupsDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing floodlight activity group. +-- +-- /See:/ 'floodlightActivityGroupsDelete' smart constructor. +data FloodlightActivityGroupsDelete = FloodlightActivityGroupsDelete + { _fagdQuotaUser :: !(Maybe Text) + , _fagdPrettyPrint :: !Bool + , _fagdUserIp :: !(Maybe Text) + , _fagdProfileId :: !Int64 + , _fagdKey :: !(Maybe Text) + , _fagdId :: !Int64 + , _fagdOauthToken :: !(Maybe Text) + , _fagdFields :: !(Maybe Text) + , _fagdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagdQuotaUser' +-- +-- * 'fagdPrettyPrint' +-- +-- * 'fagdUserIp' +-- +-- * 'fagdProfileId' +-- +-- * 'fagdKey' +-- +-- * 'fagdId' +-- +-- * 'fagdOauthToken' +-- +-- * 'fagdFields' +-- +-- * 'fagdAlt' +floodlightActivityGroupsDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivityGroupsDelete +floodlightActivityGroupsDelete pFagdProfileId_ pFagdId_ = + FloodlightActivityGroupsDelete + { _fagdQuotaUser = Nothing + , _fagdPrettyPrint = True + , _fagdUserIp = Nothing + , _fagdProfileId = pFagdProfileId_ + , _fagdKey = Nothing + , _fagdId = pFagdId_ + , _fagdOauthToken = Nothing + , _fagdFields = Nothing + , _fagdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fagdQuotaUser :: Lens' FloodlightActivityGroupsDelete' (Maybe Text) +fagdQuotaUser + = lens _fagdQuotaUser + (\ s a -> s{_fagdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fagdPrettyPrint :: Lens' FloodlightActivityGroupsDelete' Bool +fagdPrettyPrint + = lens _fagdPrettyPrint + (\ s a -> s{_fagdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fagdUserIp :: Lens' FloodlightActivityGroupsDelete' (Maybe Text) +fagdUserIp + = lens _fagdUserIp (\ s a -> s{_fagdUserIp = a}) + +-- | User profile ID associated with this request. +fagdProfileId :: Lens' FloodlightActivityGroupsDelete' Int64 +fagdProfileId + = lens _fagdProfileId + (\ s a -> s{_fagdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fagdKey :: Lens' FloodlightActivityGroupsDelete' (Maybe Text) +fagdKey = lens _fagdKey (\ s a -> s{_fagdKey = a}) + +-- | Floodlight activity Group ID. +fagdId :: Lens' FloodlightActivityGroupsDelete' Int64 +fagdId = lens _fagdId (\ s a -> s{_fagdId = a}) + +-- | OAuth 2.0 token for the current user. +fagdOauthToken :: Lens' FloodlightActivityGroupsDelete' (Maybe Text) +fagdOauthToken + = lens _fagdOauthToken + (\ s a -> s{_fagdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fagdFields :: Lens' FloodlightActivityGroupsDelete' (Maybe Text) +fagdFields + = lens _fagdFields (\ s a -> s{_fagdFields = a}) + +-- | Data format for the response. +fagdAlt :: Lens' FloodlightActivityGroupsDelete' Text +fagdAlt = lens _fagdAlt (\ s a -> s{_fagdAlt = a}) + +instance GoogleRequest + FloodlightActivityGroupsDelete' where + type Rs FloodlightActivityGroupsDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightActivityGroupsDelete{..} + = go _fagdQuotaUser _fagdPrettyPrint _fagdUserIp + _fagdProfileId + _fagdKey + _fagdId + _fagdOauthToken + _fagdFields + _fagdAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Get.hs new file mode 100644 index 000000000..a131e840d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one floodlight activity group by ID. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsGet@. +module DFAReporting.FloodlightActivityGroups.Get + ( + -- * REST Resource + FloodlightActivityGroupsGetAPI + + -- * Creating a Request + , floodlightActivityGroupsGet + , FloodlightActivityGroupsGet + + -- * Request Lenses + , faggQuotaUser + , faggPrettyPrint + , faggUserIp + , faggProfileId + , faggKey + , faggId + , faggOauthToken + , faggFields + , faggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsGet@ which the +-- 'FloodlightActivityGroupsGet' request conforms to. +type FloodlightActivityGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + Capture "id" Int64 :> + Get '[JSON] FloodlightActivityGroup + +-- | Gets one floodlight activity group by ID. +-- +-- /See:/ 'floodlightActivityGroupsGet' smart constructor. +data FloodlightActivityGroupsGet = FloodlightActivityGroupsGet + { _faggQuotaUser :: !(Maybe Text) + , _faggPrettyPrint :: !Bool + , _faggUserIp :: !(Maybe Text) + , _faggProfileId :: !Int64 + , _faggKey :: !(Maybe Text) + , _faggId :: !Int64 + , _faggOauthToken :: !(Maybe Text) + , _faggFields :: !(Maybe Text) + , _faggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faggQuotaUser' +-- +-- * 'faggPrettyPrint' +-- +-- * 'faggUserIp' +-- +-- * 'faggProfileId' +-- +-- * 'faggKey' +-- +-- * 'faggId' +-- +-- * 'faggOauthToken' +-- +-- * 'faggFields' +-- +-- * 'faggAlt' +floodlightActivityGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivityGroupsGet +floodlightActivityGroupsGet pFaggProfileId_ pFaggId_ = + FloodlightActivityGroupsGet + { _faggQuotaUser = Nothing + , _faggPrettyPrint = True + , _faggUserIp = Nothing + , _faggProfileId = pFaggProfileId_ + , _faggKey = Nothing + , _faggId = pFaggId_ + , _faggOauthToken = Nothing + , _faggFields = Nothing + , _faggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +faggQuotaUser :: Lens' FloodlightActivityGroupsGet' (Maybe Text) +faggQuotaUser + = lens _faggQuotaUser + (\ s a -> s{_faggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +faggPrettyPrint :: Lens' FloodlightActivityGroupsGet' Bool +faggPrettyPrint + = lens _faggPrettyPrint + (\ s a -> s{_faggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +faggUserIp :: Lens' FloodlightActivityGroupsGet' (Maybe Text) +faggUserIp + = lens _faggUserIp (\ s a -> s{_faggUserIp = a}) + +-- | User profile ID associated with this request. +faggProfileId :: Lens' FloodlightActivityGroupsGet' Int64 +faggProfileId + = lens _faggProfileId + (\ s a -> s{_faggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +faggKey :: Lens' FloodlightActivityGroupsGet' (Maybe Text) +faggKey = lens _faggKey (\ s a -> s{_faggKey = a}) + +-- | Floodlight activity Group ID. +faggId :: Lens' FloodlightActivityGroupsGet' Int64 +faggId = lens _faggId (\ s a -> s{_faggId = a}) + +-- | OAuth 2.0 token for the current user. +faggOauthToken :: Lens' FloodlightActivityGroupsGet' (Maybe Text) +faggOauthToken + = lens _faggOauthToken + (\ s a -> s{_faggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +faggFields :: Lens' FloodlightActivityGroupsGet' (Maybe Text) +faggFields + = lens _faggFields (\ s a -> s{_faggFields = a}) + +-- | Data format for the response. +faggAlt :: Lens' FloodlightActivityGroupsGet' Text +faggAlt = lens _faggAlt (\ s a -> s{_faggAlt = a}) + +instance GoogleRequest FloodlightActivityGroupsGet' + where + type Rs FloodlightActivityGroupsGet' = + FloodlightActivityGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivityGroupsGet{..} + = go _faggQuotaUser _faggPrettyPrint _faggUserIp + _faggProfileId + _faggKey + _faggId + _faggOauthToken + _faggFields + _faggAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Insert.hs new file mode 100644 index 000000000..85b8d1b99 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Insert.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new floodlight activity group. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsInsert@. +module DFAReporting.FloodlightActivityGroups.Insert + ( + -- * REST Resource + FloodlightActivityGroupsInsertAPI + + -- * Creating a Request + , floodlightActivityGroupsInsert + , FloodlightActivityGroupsInsert + + -- * Request Lenses + , fagiQuotaUser + , fagiPrettyPrint + , fagiUserIp + , fagiProfileId + , fagiKey + , fagiOauthToken + , fagiFields + , fagiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsInsert@ which the +-- 'FloodlightActivityGroupsInsert' request conforms to. +type FloodlightActivityGroupsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + Post '[JSON] FloodlightActivityGroup + +-- | Inserts a new floodlight activity group. +-- +-- /See:/ 'floodlightActivityGroupsInsert' smart constructor. +data FloodlightActivityGroupsInsert = FloodlightActivityGroupsInsert + { _fagiQuotaUser :: !(Maybe Text) + , _fagiPrettyPrint :: !Bool + , _fagiUserIp :: !(Maybe Text) + , _fagiProfileId :: !Int64 + , _fagiKey :: !(Maybe Text) + , _fagiOauthToken :: !(Maybe Text) + , _fagiFields :: !(Maybe Text) + , _fagiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagiQuotaUser' +-- +-- * 'fagiPrettyPrint' +-- +-- * 'fagiUserIp' +-- +-- * 'fagiProfileId' +-- +-- * 'fagiKey' +-- +-- * 'fagiOauthToken' +-- +-- * 'fagiFields' +-- +-- * 'fagiAlt' +floodlightActivityGroupsInsert + :: Int64 -- ^ 'profileId' + -> FloodlightActivityGroupsInsert +floodlightActivityGroupsInsert pFagiProfileId_ = + FloodlightActivityGroupsInsert + { _fagiQuotaUser = Nothing + , _fagiPrettyPrint = True + , _fagiUserIp = Nothing + , _fagiProfileId = pFagiProfileId_ + , _fagiKey = Nothing + , _fagiOauthToken = Nothing + , _fagiFields = Nothing + , _fagiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fagiQuotaUser :: Lens' FloodlightActivityGroupsInsert' (Maybe Text) +fagiQuotaUser + = lens _fagiQuotaUser + (\ s a -> s{_fagiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fagiPrettyPrint :: Lens' FloodlightActivityGroupsInsert' Bool +fagiPrettyPrint + = lens _fagiPrettyPrint + (\ s a -> s{_fagiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fagiUserIp :: Lens' FloodlightActivityGroupsInsert' (Maybe Text) +fagiUserIp + = lens _fagiUserIp (\ s a -> s{_fagiUserIp = a}) + +-- | User profile ID associated with this request. +fagiProfileId :: Lens' FloodlightActivityGroupsInsert' Int64 +fagiProfileId + = lens _fagiProfileId + (\ s a -> s{_fagiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fagiKey :: Lens' FloodlightActivityGroupsInsert' (Maybe Text) +fagiKey = lens _fagiKey (\ s a -> s{_fagiKey = a}) + +-- | OAuth 2.0 token for the current user. +fagiOauthToken :: Lens' FloodlightActivityGroupsInsert' (Maybe Text) +fagiOauthToken + = lens _fagiOauthToken + (\ s a -> s{_fagiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fagiFields :: Lens' FloodlightActivityGroupsInsert' (Maybe Text) +fagiFields + = lens _fagiFields (\ s a -> s{_fagiFields = a}) + +-- | Data format for the response. +fagiAlt :: Lens' FloodlightActivityGroupsInsert' Text +fagiAlt = lens _fagiAlt (\ s a -> s{_fagiAlt = a}) + +instance GoogleRequest + FloodlightActivityGroupsInsert' where + type Rs FloodlightActivityGroupsInsert' = + FloodlightActivityGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightActivityGroupsInsert{..} + = go _fagiQuotaUser _fagiPrettyPrint _fagiUserIp + _fagiProfileId + _fagiKey + _fagiOauthToken + _fagiFields + _fagiAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/List.hs new file mode 100644 index 000000000..0aef1ec25 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/List.hs @@ -0,0 +1,293 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of floodlight activity groups, possibly filtered. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsList@. +module DFAReporting.FloodlightActivityGroups.List + ( + -- * REST Resource + FloodlightActivityGroupsListAPI + + -- * Creating a Request + , floodlightActivityGroupsList + , FloodlightActivityGroupsList + + -- * Request Lenses + , faglQuotaUser + , faglPrettyPrint + , faglFloodlightConfigurationId + , faglUserIp + , faglAdvertiserId + , faglSearchString + , faglIds + , faglProfileId + , faglSortOrder + , faglKey + , faglPageToken + , faglSortField + , faglType + , faglOauthToken + , faglMaxResults + , faglFields + , faglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsList@ which the +-- 'FloodlightActivityGroupsList' request conforms to. +type FloodlightActivityGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + QueryParam "floodlightConfigurationId" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "type" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] FloodlightActivityGroupsListResponse + +-- | Retrieves a list of floodlight activity groups, possibly filtered. +-- +-- /See:/ 'floodlightActivityGroupsList' smart constructor. +data FloodlightActivityGroupsList = FloodlightActivityGroupsList + { _faglQuotaUser :: !(Maybe Text) + , _faglPrettyPrint :: !Bool + , _faglFloodlightConfigurationId :: !(Maybe Int64) + , _faglUserIp :: !(Maybe Text) + , _faglAdvertiserId :: !(Maybe Int64) + , _faglSearchString :: !(Maybe Text) + , _faglIds :: !(Maybe Int64) + , _faglProfileId :: !Int64 + , _faglSortOrder :: !(Maybe Text) + , _faglKey :: !(Maybe Text) + , _faglPageToken :: !(Maybe Text) + , _faglSortField :: !(Maybe Text) + , _faglType :: !(Maybe Text) + , _faglOauthToken :: !(Maybe Text) + , _faglMaxResults :: !(Maybe Int32) + , _faglFields :: !(Maybe Text) + , _faglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faglQuotaUser' +-- +-- * 'faglPrettyPrint' +-- +-- * 'faglFloodlightConfigurationId' +-- +-- * 'faglUserIp' +-- +-- * 'faglAdvertiserId' +-- +-- * 'faglSearchString' +-- +-- * 'faglIds' +-- +-- * 'faglProfileId' +-- +-- * 'faglSortOrder' +-- +-- * 'faglKey' +-- +-- * 'faglPageToken' +-- +-- * 'faglSortField' +-- +-- * 'faglType' +-- +-- * 'faglOauthToken' +-- +-- * 'faglMaxResults' +-- +-- * 'faglFields' +-- +-- * 'faglAlt' +floodlightActivityGroupsList + :: Int64 -- ^ 'profileId' + -> FloodlightActivityGroupsList +floodlightActivityGroupsList pFaglProfileId_ = + FloodlightActivityGroupsList + { _faglQuotaUser = Nothing + , _faglPrettyPrint = True + , _faglFloodlightConfigurationId = Nothing + , _faglUserIp = Nothing + , _faglAdvertiserId = Nothing + , _faglSearchString = Nothing + , _faglIds = Nothing + , _faglProfileId = pFaglProfileId_ + , _faglSortOrder = Nothing + , _faglKey = Nothing + , _faglPageToken = Nothing + , _faglSortField = Nothing + , _faglType = Nothing + , _faglOauthToken = Nothing + , _faglMaxResults = Nothing + , _faglFields = Nothing + , _faglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +faglQuotaUser :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglQuotaUser + = lens _faglQuotaUser + (\ s a -> s{_faglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +faglPrettyPrint :: Lens' FloodlightActivityGroupsList' Bool +faglPrettyPrint + = lens _faglPrettyPrint + (\ s a -> s{_faglPrettyPrint = a}) + +-- | Select only floodlight activity groups with the specified floodlight +-- configuration ID. Must specify either advertiserId, or +-- floodlightConfigurationId for a non-empty result. +faglFloodlightConfigurationId :: Lens' FloodlightActivityGroupsList' (Maybe Int64) +faglFloodlightConfigurationId + = lens _faglFloodlightConfigurationId + (\ s a -> s{_faglFloodlightConfigurationId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +faglUserIp :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglUserIp + = lens _faglUserIp (\ s a -> s{_faglUserIp = a}) + +-- | Select only floodlight activity groups with the specified advertiser ID. +-- Must specify either advertiserId or floodlightConfigurationId for a +-- non-empty result. +faglAdvertiserId :: Lens' FloodlightActivityGroupsList' (Maybe Int64) +faglAdvertiserId + = lens _faglAdvertiserId + (\ s a -> s{_faglAdvertiserId = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"floodlightactivitygroup*2015\" will return objects with +-- names like \"floodlightactivitygroup June 2015\", +-- \"floodlightactivitygroup April 2015\", or simply +-- \"floodlightactivitygroup 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"floodlightactivitygroup\" will match +-- objects with name \"my floodlightactivitygroup activity\", +-- \"floodlightactivitygroup 2015\", or simply \"floodlightactivitygroup\". +faglSearchString :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglSearchString + = lens _faglSearchString + (\ s a -> s{_faglSearchString = a}) + +-- | Select only floodlight activity groups with the specified IDs. Must +-- specify either advertiserId or floodlightConfigurationId for a non-empty +-- result. +faglIds :: Lens' FloodlightActivityGroupsList' (Maybe Int64) +faglIds = lens _faglIds (\ s a -> s{_faglIds = a}) + +-- | User profile ID associated with this request. +faglProfileId :: Lens' FloodlightActivityGroupsList' Int64 +faglProfileId + = lens _faglProfileId + (\ s a -> s{_faglProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +faglSortOrder :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglSortOrder + = lens _faglSortOrder + (\ s a -> s{_faglSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +faglKey :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglKey = lens _faglKey (\ s a -> s{_faglKey = a}) + +-- | Value of the nextPageToken from the previous result page. +faglPageToken :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglPageToken + = lens _faglPageToken + (\ s a -> s{_faglPageToken = a}) + +-- | Field by which to sort the list. +faglSortField :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglSortField + = lens _faglSortField + (\ s a -> s{_faglSortField = a}) + +-- | Select only floodlight activity groups with the specified floodlight +-- activity group type. +faglType :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglType = lens _faglType (\ s a -> s{_faglType = a}) + +-- | OAuth 2.0 token for the current user. +faglOauthToken :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglOauthToken + = lens _faglOauthToken + (\ s a -> s{_faglOauthToken = a}) + +-- | Maximum number of results to return. +faglMaxResults :: Lens' FloodlightActivityGroupsList' (Maybe Int32) +faglMaxResults + = lens _faglMaxResults + (\ s a -> s{_faglMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +faglFields :: Lens' FloodlightActivityGroupsList' (Maybe Text) +faglFields + = lens _faglFields (\ s a -> s{_faglFields = a}) + +-- | Data format for the response. +faglAlt :: Lens' FloodlightActivityGroupsList' Text +faglAlt = lens _faglAlt (\ s a -> s{_faglAlt = a}) + +instance GoogleRequest FloodlightActivityGroupsList' + where + type Rs FloodlightActivityGroupsList' = + FloodlightActivityGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightActivityGroupsList{..} + = go _faglQuotaUser _faglPrettyPrint + _faglFloodlightConfigurationId + _faglUserIp + _faglAdvertiserId + _faglSearchString + _faglIds + _faglProfileId + _faglSortOrder + _faglKey + _faglPageToken + _faglSortField + _faglType + _faglOauthToken + _faglMaxResults + _faglFields + _faglAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Patch.hs new file mode 100644 index 000000000..f872229a6 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Patch.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight activity group. This method supports +-- patch semantics. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsPatch@. +module DFAReporting.FloodlightActivityGroups.Patch + ( + -- * REST Resource + FloodlightActivityGroupsPatchAPI + + -- * Creating a Request + , floodlightActivityGroupsPatch + , FloodlightActivityGroupsPatch + + -- * Request Lenses + , fagpQuotaUser + , fagpPrettyPrint + , fagpUserIp + , fagpProfileId + , fagpKey + , fagpId + , fagpOauthToken + , fagpFields + , fagpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsPatch@ which the +-- 'FloodlightActivityGroupsPatch' request conforms to. +type FloodlightActivityGroupsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + QueryParam "id" Int64 :> + Patch '[JSON] FloodlightActivityGroup + +-- | Updates an existing floodlight activity group. This method supports +-- patch semantics. +-- +-- /See:/ 'floodlightActivityGroupsPatch' smart constructor. +data FloodlightActivityGroupsPatch = FloodlightActivityGroupsPatch + { _fagpQuotaUser :: !(Maybe Text) + , _fagpPrettyPrint :: !Bool + , _fagpUserIp :: !(Maybe Text) + , _fagpProfileId :: !Int64 + , _fagpKey :: !(Maybe Text) + , _fagpId :: !Int64 + , _fagpOauthToken :: !(Maybe Text) + , _fagpFields :: !(Maybe Text) + , _fagpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fagpQuotaUser' +-- +-- * 'fagpPrettyPrint' +-- +-- * 'fagpUserIp' +-- +-- * 'fagpProfileId' +-- +-- * 'fagpKey' +-- +-- * 'fagpId' +-- +-- * 'fagpOauthToken' +-- +-- * 'fagpFields' +-- +-- * 'fagpAlt' +floodlightActivityGroupsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightActivityGroupsPatch +floodlightActivityGroupsPatch pFagpProfileId_ pFagpId_ = + FloodlightActivityGroupsPatch + { _fagpQuotaUser = Nothing + , _fagpPrettyPrint = True + , _fagpUserIp = Nothing + , _fagpProfileId = pFagpProfileId_ + , _fagpKey = Nothing + , _fagpId = pFagpId_ + , _fagpOauthToken = Nothing + , _fagpFields = Nothing + , _fagpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fagpQuotaUser :: Lens' FloodlightActivityGroupsPatch' (Maybe Text) +fagpQuotaUser + = lens _fagpQuotaUser + (\ s a -> s{_fagpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fagpPrettyPrint :: Lens' FloodlightActivityGroupsPatch' Bool +fagpPrettyPrint + = lens _fagpPrettyPrint + (\ s a -> s{_fagpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fagpUserIp :: Lens' FloodlightActivityGroupsPatch' (Maybe Text) +fagpUserIp + = lens _fagpUserIp (\ s a -> s{_fagpUserIp = a}) + +-- | User profile ID associated with this request. +fagpProfileId :: Lens' FloodlightActivityGroupsPatch' Int64 +fagpProfileId + = lens _fagpProfileId + (\ s a -> s{_fagpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fagpKey :: Lens' FloodlightActivityGroupsPatch' (Maybe Text) +fagpKey = lens _fagpKey (\ s a -> s{_fagpKey = a}) + +-- | Floodlight activity Group ID. +fagpId :: Lens' FloodlightActivityGroupsPatch' Int64 +fagpId = lens _fagpId (\ s a -> s{_fagpId = a}) + +-- | OAuth 2.0 token for the current user. +fagpOauthToken :: Lens' FloodlightActivityGroupsPatch' (Maybe Text) +fagpOauthToken + = lens _fagpOauthToken + (\ s a -> s{_fagpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fagpFields :: Lens' FloodlightActivityGroupsPatch' (Maybe Text) +fagpFields + = lens _fagpFields (\ s a -> s{_fagpFields = a}) + +-- | Data format for the response. +fagpAlt :: Lens' FloodlightActivityGroupsPatch' Text +fagpAlt = lens _fagpAlt (\ s a -> s{_fagpAlt = a}) + +instance GoogleRequest FloodlightActivityGroupsPatch' + where + type Rs FloodlightActivityGroupsPatch' = + FloodlightActivityGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightActivityGroupsPatch{..} + = go _fagpQuotaUser _fagpPrettyPrint _fagpUserIp + _fagpProfileId + _fagpKey + (Just _fagpId) + _fagpOauthToken + _fagpFields + _fagpAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Update.hs new file mode 100644 index 000000000..cfdb40fd8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/Update.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight activity group. +-- +-- /See:/ for @DfareportingFloodlightActivityGroupsUpdate@. +module DFAReporting.FloodlightActivityGroups.Update + ( + -- * REST Resource + FloodlightActivityGroupsUpdateAPI + + -- * Creating a Request + , floodlightActivityGroupsUpdate + , FloodlightActivityGroupsUpdate + + -- * Request Lenses + , faguQuotaUser + , faguPrettyPrint + , faguUserIp + , faguProfileId + , faguKey + , faguOauthToken + , faguFields + , faguAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightActivityGroupsUpdate@ which the +-- 'FloodlightActivityGroupsUpdate' request conforms to. +type FloodlightActivityGroupsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightActivityGroups" :> + Put '[JSON] FloodlightActivityGroup + +-- | Updates an existing floodlight activity group. +-- +-- /See:/ 'floodlightActivityGroupsUpdate' smart constructor. +data FloodlightActivityGroupsUpdate = FloodlightActivityGroupsUpdate + { _faguQuotaUser :: !(Maybe Text) + , _faguPrettyPrint :: !Bool + , _faguUserIp :: !(Maybe Text) + , _faguProfileId :: !Int64 + , _faguKey :: !(Maybe Text) + , _faguOauthToken :: !(Maybe Text) + , _faguFields :: !(Maybe Text) + , _faguAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightActivityGroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'faguQuotaUser' +-- +-- * 'faguPrettyPrint' +-- +-- * 'faguUserIp' +-- +-- * 'faguProfileId' +-- +-- * 'faguKey' +-- +-- * 'faguOauthToken' +-- +-- * 'faguFields' +-- +-- * 'faguAlt' +floodlightActivityGroupsUpdate + :: Int64 -- ^ 'profileId' + -> FloodlightActivityGroupsUpdate +floodlightActivityGroupsUpdate pFaguProfileId_ = + FloodlightActivityGroupsUpdate + { _faguQuotaUser = Nothing + , _faguPrettyPrint = True + , _faguUserIp = Nothing + , _faguProfileId = pFaguProfileId_ + , _faguKey = Nothing + , _faguOauthToken = Nothing + , _faguFields = Nothing + , _faguAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +faguQuotaUser :: Lens' FloodlightActivityGroupsUpdate' (Maybe Text) +faguQuotaUser + = lens _faguQuotaUser + (\ s a -> s{_faguQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +faguPrettyPrint :: Lens' FloodlightActivityGroupsUpdate' Bool +faguPrettyPrint + = lens _faguPrettyPrint + (\ s a -> s{_faguPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +faguUserIp :: Lens' FloodlightActivityGroupsUpdate' (Maybe Text) +faguUserIp + = lens _faguUserIp (\ s a -> s{_faguUserIp = a}) + +-- | User profile ID associated with this request. +faguProfileId :: Lens' FloodlightActivityGroupsUpdate' Int64 +faguProfileId + = lens _faguProfileId + (\ s a -> s{_faguProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +faguKey :: Lens' FloodlightActivityGroupsUpdate' (Maybe Text) +faguKey = lens _faguKey (\ s a -> s{_faguKey = a}) + +-- | OAuth 2.0 token for the current user. +faguOauthToken :: Lens' FloodlightActivityGroupsUpdate' (Maybe Text) +faguOauthToken + = lens _faguOauthToken + (\ s a -> s{_faguOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +faguFields :: Lens' FloodlightActivityGroupsUpdate' (Maybe Text) +faguFields + = lens _faguFields (\ s a -> s{_faguFields = a}) + +-- | Data format for the response. +faguAlt :: Lens' FloodlightActivityGroupsUpdate' Text +faguAlt = lens _faguAlt (\ s a -> s{_faguAlt = a}) + +instance GoogleRequest + FloodlightActivityGroupsUpdate' where + type Rs FloodlightActivityGroupsUpdate' = + FloodlightActivityGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightActivityGroupsUpdate{..} + = go _faguQuotaUser _faguPrettyPrint _faguUserIp + _faguProfileId + _faguKey + _faguOauthToken + _faguFields + _faguAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightActivityGroupsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Get.hs new file mode 100644 index 000000000..2e40ac665 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Get.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightConfigurations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one floodlight configuration by ID. +-- +-- /See:/ for @DfareportingFloodlightConfigurationsGet@. +module DFAReporting.FloodlightConfigurations.Get + ( + -- * REST Resource + FloodlightConfigurationsGetAPI + + -- * Creating a Request + , floodlightConfigurationsGet + , FloodlightConfigurationsGet + + -- * Request Lenses + , fcgQuotaUser + , fcgPrettyPrint + , fcgUserIp + , fcgProfileId + , fcgKey + , fcgId + , fcgOauthToken + , fcgFields + , fcgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightConfigurationsGet@ which the +-- 'FloodlightConfigurationsGet' request conforms to. +type FloodlightConfigurationsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightConfigurations" :> + Capture "id" Int64 :> + Get '[JSON] FloodlightConfiguration + +-- | Gets one floodlight configuration by ID. +-- +-- /See:/ 'floodlightConfigurationsGet' smart constructor. +data FloodlightConfigurationsGet = FloodlightConfigurationsGet + { _fcgQuotaUser :: !(Maybe Text) + , _fcgPrettyPrint :: !Bool + , _fcgUserIp :: !(Maybe Text) + , _fcgProfileId :: !Int64 + , _fcgKey :: !(Maybe Text) + , _fcgId :: !Int64 + , _fcgOauthToken :: !(Maybe Text) + , _fcgFields :: !(Maybe Text) + , _fcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfigurationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcgQuotaUser' +-- +-- * 'fcgPrettyPrint' +-- +-- * 'fcgUserIp' +-- +-- * 'fcgProfileId' +-- +-- * 'fcgKey' +-- +-- * 'fcgId' +-- +-- * 'fcgOauthToken' +-- +-- * 'fcgFields' +-- +-- * 'fcgAlt' +floodlightConfigurationsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightConfigurationsGet +floodlightConfigurationsGet pFcgProfileId_ pFcgId_ = + FloodlightConfigurationsGet + { _fcgQuotaUser = Nothing + , _fcgPrettyPrint = True + , _fcgUserIp = Nothing + , _fcgProfileId = pFcgProfileId_ + , _fcgKey = Nothing + , _fcgId = pFcgId_ + , _fcgOauthToken = Nothing + , _fcgFields = Nothing + , _fcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fcgQuotaUser :: Lens' FloodlightConfigurationsGet' (Maybe Text) +fcgQuotaUser + = lens _fcgQuotaUser (\ s a -> s{_fcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fcgPrettyPrint :: Lens' FloodlightConfigurationsGet' Bool +fcgPrettyPrint + = lens _fcgPrettyPrint + (\ s a -> s{_fcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fcgUserIp :: Lens' FloodlightConfigurationsGet' (Maybe Text) +fcgUserIp + = lens _fcgUserIp (\ s a -> s{_fcgUserIp = a}) + +-- | User profile ID associated with this request. +fcgProfileId :: Lens' FloodlightConfigurationsGet' Int64 +fcgProfileId + = lens _fcgProfileId (\ s a -> s{_fcgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fcgKey :: Lens' FloodlightConfigurationsGet' (Maybe Text) +fcgKey = lens _fcgKey (\ s a -> s{_fcgKey = a}) + +-- | Floodlight configuration ID. +fcgId :: Lens' FloodlightConfigurationsGet' Int64 +fcgId = lens _fcgId (\ s a -> s{_fcgId = a}) + +-- | OAuth 2.0 token for the current user. +fcgOauthToken :: Lens' FloodlightConfigurationsGet' (Maybe Text) +fcgOauthToken + = lens _fcgOauthToken + (\ s a -> s{_fcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fcgFields :: Lens' FloodlightConfigurationsGet' (Maybe Text) +fcgFields + = lens _fcgFields (\ s a -> s{_fcgFields = a}) + +-- | Data format for the response. +fcgAlt :: Lens' FloodlightConfigurationsGet' Text +fcgAlt = lens _fcgAlt (\ s a -> s{_fcgAlt = a}) + +instance GoogleRequest FloodlightConfigurationsGet' + where + type Rs FloodlightConfigurationsGet' = + FloodlightConfiguration + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightConfigurationsGet{..} + = go _fcgQuotaUser _fcgPrettyPrint _fcgUserIp + _fcgProfileId + _fcgKey + _fcgId + _fcgOauthToken + _fcgFields + _fcgAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightConfigurationsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/List.hs new file mode 100644 index 000000000..290f1a902 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/List.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightConfigurations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of floodlight configurations, possibly filtered. +-- +-- /See:/ for @DfareportingFloodlightConfigurationsList@. +module DFAReporting.FloodlightConfigurations.List + ( + -- * REST Resource + FloodlightConfigurationsListAPI + + -- * Creating a Request + , floodlightConfigurationsList + , FloodlightConfigurationsList + + -- * Request Lenses + , fclQuotaUser + , fclPrettyPrint + , fclUserIp + , fclIds + , fclProfileId + , fclKey + , fclOauthToken + , fclFields + , fclAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightConfigurationsList@ which the +-- 'FloodlightConfigurationsList' request conforms to. +type FloodlightConfigurationsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightConfigurations" :> + QueryParams "ids" Int64 :> + Get '[JSON] FloodlightConfigurationsListResponse + +-- | Retrieves a list of floodlight configurations, possibly filtered. +-- +-- /See:/ 'floodlightConfigurationsList' smart constructor. +data FloodlightConfigurationsList = FloodlightConfigurationsList + { _fclQuotaUser :: !(Maybe Text) + , _fclPrettyPrint :: !Bool + , _fclUserIp :: !(Maybe Text) + , _fclIds :: !(Maybe Int64) + , _fclProfileId :: !Int64 + , _fclKey :: !(Maybe Text) + , _fclOauthToken :: !(Maybe Text) + , _fclFields :: !(Maybe Text) + , _fclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfigurationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fclQuotaUser' +-- +-- * 'fclPrettyPrint' +-- +-- * 'fclUserIp' +-- +-- * 'fclIds' +-- +-- * 'fclProfileId' +-- +-- * 'fclKey' +-- +-- * 'fclOauthToken' +-- +-- * 'fclFields' +-- +-- * 'fclAlt' +floodlightConfigurationsList + :: Int64 -- ^ 'profileId' + -> FloodlightConfigurationsList +floodlightConfigurationsList pFclProfileId_ = + FloodlightConfigurationsList + { _fclQuotaUser = Nothing + , _fclPrettyPrint = True + , _fclUserIp = Nothing + , _fclIds = Nothing + , _fclProfileId = pFclProfileId_ + , _fclKey = Nothing + , _fclOauthToken = Nothing + , _fclFields = Nothing + , _fclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fclQuotaUser :: Lens' FloodlightConfigurationsList' (Maybe Text) +fclQuotaUser + = lens _fclQuotaUser (\ s a -> s{_fclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fclPrettyPrint :: Lens' FloodlightConfigurationsList' Bool +fclPrettyPrint + = lens _fclPrettyPrint + (\ s a -> s{_fclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fclUserIp :: Lens' FloodlightConfigurationsList' (Maybe Text) +fclUserIp + = lens _fclUserIp (\ s a -> s{_fclUserIp = a}) + +-- | Set of IDs of floodlight configurations to retrieve. Required field; +-- otherwise an empty list will be returned. +fclIds :: Lens' FloodlightConfigurationsList' (Maybe Int64) +fclIds = lens _fclIds (\ s a -> s{_fclIds = a}) + +-- | User profile ID associated with this request. +fclProfileId :: Lens' FloodlightConfigurationsList' Int64 +fclProfileId + = lens _fclProfileId (\ s a -> s{_fclProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fclKey :: Lens' FloodlightConfigurationsList' (Maybe Text) +fclKey = lens _fclKey (\ s a -> s{_fclKey = a}) + +-- | OAuth 2.0 token for the current user. +fclOauthToken :: Lens' FloodlightConfigurationsList' (Maybe Text) +fclOauthToken + = lens _fclOauthToken + (\ s a -> s{_fclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fclFields :: Lens' FloodlightConfigurationsList' (Maybe Text) +fclFields + = lens _fclFields (\ s a -> s{_fclFields = a}) + +-- | Data format for the response. +fclAlt :: Lens' FloodlightConfigurationsList' Text +fclAlt = lens _fclAlt (\ s a -> s{_fclAlt = a}) + +instance GoogleRequest FloodlightConfigurationsList' + where + type Rs FloodlightConfigurationsList' = + FloodlightConfigurationsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u FloodlightConfigurationsList{..} + = go _fclQuotaUser _fclPrettyPrint _fclUserIp _fclIds + _fclProfileId + _fclKey + _fclOauthToken + _fclFields + _fclAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightConfigurationsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Patch.hs new file mode 100644 index 000000000..a0ab95b81 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Patch.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightConfigurations.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight configuration. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingFloodlightConfigurationsPatch@. +module DFAReporting.FloodlightConfigurations.Patch + ( + -- * REST Resource + FloodlightConfigurationsPatchAPI + + -- * Creating a Request + , floodlightConfigurationsPatch + , FloodlightConfigurationsPatch + + -- * Request Lenses + , fcpQuotaUser + , fcpPrettyPrint + , fcpUserIp + , fcpProfileId + , fcpKey + , fcpId + , fcpOauthToken + , fcpFields + , fcpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightConfigurationsPatch@ which the +-- 'FloodlightConfigurationsPatch' request conforms to. +type FloodlightConfigurationsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightConfigurations" :> + QueryParam "id" Int64 :> + Patch '[JSON] FloodlightConfiguration + +-- | Updates an existing floodlight configuration. This method supports patch +-- semantics. +-- +-- /See:/ 'floodlightConfigurationsPatch' smart constructor. +data FloodlightConfigurationsPatch = FloodlightConfigurationsPatch + { _fcpQuotaUser :: !(Maybe Text) + , _fcpPrettyPrint :: !Bool + , _fcpUserIp :: !(Maybe Text) + , _fcpProfileId :: !Int64 + , _fcpKey :: !(Maybe Text) + , _fcpId :: !Int64 + , _fcpOauthToken :: !(Maybe Text) + , _fcpFields :: !(Maybe Text) + , _fcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfigurationsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcpQuotaUser' +-- +-- * 'fcpPrettyPrint' +-- +-- * 'fcpUserIp' +-- +-- * 'fcpProfileId' +-- +-- * 'fcpKey' +-- +-- * 'fcpId' +-- +-- * 'fcpOauthToken' +-- +-- * 'fcpFields' +-- +-- * 'fcpAlt' +floodlightConfigurationsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> FloodlightConfigurationsPatch +floodlightConfigurationsPatch pFcpProfileId_ pFcpId_ = + FloodlightConfigurationsPatch + { _fcpQuotaUser = Nothing + , _fcpPrettyPrint = True + , _fcpUserIp = Nothing + , _fcpProfileId = pFcpProfileId_ + , _fcpKey = Nothing + , _fcpId = pFcpId_ + , _fcpOauthToken = Nothing + , _fcpFields = Nothing + , _fcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fcpQuotaUser :: Lens' FloodlightConfigurationsPatch' (Maybe Text) +fcpQuotaUser + = lens _fcpQuotaUser (\ s a -> s{_fcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fcpPrettyPrint :: Lens' FloodlightConfigurationsPatch' Bool +fcpPrettyPrint + = lens _fcpPrettyPrint + (\ s a -> s{_fcpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fcpUserIp :: Lens' FloodlightConfigurationsPatch' (Maybe Text) +fcpUserIp + = lens _fcpUserIp (\ s a -> s{_fcpUserIp = a}) + +-- | User profile ID associated with this request. +fcpProfileId :: Lens' FloodlightConfigurationsPatch' Int64 +fcpProfileId + = lens _fcpProfileId (\ s a -> s{_fcpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fcpKey :: Lens' FloodlightConfigurationsPatch' (Maybe Text) +fcpKey = lens _fcpKey (\ s a -> s{_fcpKey = a}) + +-- | Floodlight configuration ID. +fcpId :: Lens' FloodlightConfigurationsPatch' Int64 +fcpId = lens _fcpId (\ s a -> s{_fcpId = a}) + +-- | OAuth 2.0 token for the current user. +fcpOauthToken :: Lens' FloodlightConfigurationsPatch' (Maybe Text) +fcpOauthToken + = lens _fcpOauthToken + (\ s a -> s{_fcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fcpFields :: Lens' FloodlightConfigurationsPatch' (Maybe Text) +fcpFields + = lens _fcpFields (\ s a -> s{_fcpFields = a}) + +-- | Data format for the response. +fcpAlt :: Lens' FloodlightConfigurationsPatch' Text +fcpAlt = lens _fcpAlt (\ s a -> s{_fcpAlt = a}) + +instance GoogleRequest FloodlightConfigurationsPatch' + where + type Rs FloodlightConfigurationsPatch' = + FloodlightConfiguration + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightConfigurationsPatch{..} + = go _fcpQuotaUser _fcpPrettyPrint _fcpUserIp + _fcpProfileId + _fcpKey + (Just _fcpId) + _fcpOauthToken + _fcpFields + _fcpAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightConfigurationsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs new file mode 100644 index 000000000..71fd3f018 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.FloodlightConfigurations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing floodlight configuration. +-- +-- /See:/ for @DfareportingFloodlightConfigurationsUpdate@. +module DFAReporting.FloodlightConfigurations.Update + ( + -- * REST Resource + FloodlightConfigurationsUpdateAPI + + -- * Creating a Request + , floodlightConfigurationsUpdate + , FloodlightConfigurationsUpdate + + -- * Request Lenses + , fcuQuotaUser + , fcuPrettyPrint + , fcuUserIp + , fcuProfileId + , fcuKey + , fcuOauthToken + , fcuFields + , fcuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingFloodlightConfigurationsUpdate@ which the +-- 'FloodlightConfigurationsUpdate' request conforms to. +type FloodlightConfigurationsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "floodlightConfigurations" :> + Put '[JSON] FloodlightConfiguration + +-- | Updates an existing floodlight configuration. +-- +-- /See:/ 'floodlightConfigurationsUpdate' smart constructor. +data FloodlightConfigurationsUpdate = FloodlightConfigurationsUpdate + { _fcuQuotaUser :: !(Maybe Text) + , _fcuPrettyPrint :: !Bool + , _fcuUserIp :: !(Maybe Text) + , _fcuProfileId :: !Int64 + , _fcuKey :: !(Maybe Text) + , _fcuOauthToken :: !(Maybe Text) + , _fcuFields :: !(Maybe Text) + , _fcuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FloodlightConfigurationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcuQuotaUser' +-- +-- * 'fcuPrettyPrint' +-- +-- * 'fcuUserIp' +-- +-- * 'fcuProfileId' +-- +-- * 'fcuKey' +-- +-- * 'fcuOauthToken' +-- +-- * 'fcuFields' +-- +-- * 'fcuAlt' +floodlightConfigurationsUpdate + :: Int64 -- ^ 'profileId' + -> FloodlightConfigurationsUpdate +floodlightConfigurationsUpdate pFcuProfileId_ = + FloodlightConfigurationsUpdate + { _fcuQuotaUser = Nothing + , _fcuPrettyPrint = True + , _fcuUserIp = Nothing + , _fcuProfileId = pFcuProfileId_ + , _fcuKey = Nothing + , _fcuOauthToken = Nothing + , _fcuFields = Nothing + , _fcuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fcuQuotaUser :: Lens' FloodlightConfigurationsUpdate' (Maybe Text) +fcuQuotaUser + = lens _fcuQuotaUser (\ s a -> s{_fcuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fcuPrettyPrint :: Lens' FloodlightConfigurationsUpdate' Bool +fcuPrettyPrint + = lens _fcuPrettyPrint + (\ s a -> s{_fcuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fcuUserIp :: Lens' FloodlightConfigurationsUpdate' (Maybe Text) +fcuUserIp + = lens _fcuUserIp (\ s a -> s{_fcuUserIp = a}) + +-- | User profile ID associated with this request. +fcuProfileId :: Lens' FloodlightConfigurationsUpdate' Int64 +fcuProfileId + = lens _fcuProfileId (\ s a -> s{_fcuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fcuKey :: Lens' FloodlightConfigurationsUpdate' (Maybe Text) +fcuKey = lens _fcuKey (\ s a -> s{_fcuKey = a}) + +-- | OAuth 2.0 token for the current user. +fcuOauthToken :: Lens' FloodlightConfigurationsUpdate' (Maybe Text) +fcuOauthToken + = lens _fcuOauthToken + (\ s a -> s{_fcuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fcuFields :: Lens' FloodlightConfigurationsUpdate' (Maybe Text) +fcuFields + = lens _fcuFields (\ s a -> s{_fcuFields = a}) + +-- | Data format for the response. +fcuAlt :: Lens' FloodlightConfigurationsUpdate' Text +fcuAlt = lens _fcuAlt (\ s a -> s{_fcuAlt = a}) + +instance GoogleRequest + FloodlightConfigurationsUpdate' where + type Rs FloodlightConfigurationsUpdate' = + FloodlightConfiguration + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + FloodlightConfigurationsUpdate{..} + = go _fcuQuotaUser _fcuPrettyPrint _fcuUserIp + _fcuProfileId + _fcuKey + _fcuOauthToken + _fcuFields + _fcuAlt + where go + = clientWithRoute + (Proxy :: Proxy FloodlightConfigurationsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/Get.hs new file mode 100644 index 000000000..7710630ce --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.InventoryItems.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one inventory item by ID. +-- +-- /See:/ for @DfareportingInventoryItemsGet@. +module DFAReporting.InventoryItems.Get + ( + -- * REST Resource + InventoryItemsGetAPI + + -- * Creating a Request + , inventoryItemsGet + , InventoryItemsGet + + -- * Request Lenses + , iigQuotaUser + , iigPrettyPrint + , iigUserIp + , iigProfileId + , iigKey + , iigId + , iigProjectId + , iigOauthToken + , iigFields + , iigAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingInventoryItemsGet@ which the +-- 'InventoryItemsGet' request conforms to. +type InventoryItemsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "inventoryItems" :> + Capture "id" Int64 :> Get '[JSON] InventoryItem + +-- | Gets one inventory item by ID. +-- +-- /See:/ 'inventoryItemsGet' smart constructor. +data InventoryItemsGet = InventoryItemsGet + { _iigQuotaUser :: !(Maybe Text) + , _iigPrettyPrint :: !Bool + , _iigUserIp :: !(Maybe Text) + , _iigProfileId :: !Int64 + , _iigKey :: !(Maybe Text) + , _iigId :: !Int64 + , _iigProjectId :: !Int64 + , _iigOauthToken :: !(Maybe Text) + , _iigFields :: !(Maybe Text) + , _iigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InventoryItemsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iigQuotaUser' +-- +-- * 'iigPrettyPrint' +-- +-- * 'iigUserIp' +-- +-- * 'iigProfileId' +-- +-- * 'iigKey' +-- +-- * 'iigId' +-- +-- * 'iigProjectId' +-- +-- * 'iigOauthToken' +-- +-- * 'iigFields' +-- +-- * 'iigAlt' +inventoryItemsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> Int64 -- ^ 'projectId' + -> InventoryItemsGet +inventoryItemsGet pIigProfileId_ pIigId_ pIigProjectId_ = + InventoryItemsGet + { _iigQuotaUser = Nothing + , _iigPrettyPrint = True + , _iigUserIp = Nothing + , _iigProfileId = pIigProfileId_ + , _iigKey = Nothing + , _iigId = pIigId_ + , _iigProjectId = pIigProjectId_ + , _iigOauthToken = Nothing + , _iigFields = Nothing + , _iigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iigQuotaUser :: Lens' InventoryItemsGet' (Maybe Text) +iigQuotaUser + = lens _iigQuotaUser (\ s a -> s{_iigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iigPrettyPrint :: Lens' InventoryItemsGet' Bool +iigPrettyPrint + = lens _iigPrettyPrint + (\ s a -> s{_iigPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iigUserIp :: Lens' InventoryItemsGet' (Maybe Text) +iigUserIp + = lens _iigUserIp (\ s a -> s{_iigUserIp = a}) + +-- | User profile ID associated with this request. +iigProfileId :: Lens' InventoryItemsGet' Int64 +iigProfileId + = lens _iigProfileId (\ s a -> s{_iigProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iigKey :: Lens' InventoryItemsGet' (Maybe Text) +iigKey = lens _iigKey (\ s a -> s{_iigKey = a}) + +-- | Inventory item ID. +iigId :: Lens' InventoryItemsGet' Int64 +iigId = lens _iigId (\ s a -> s{_iigId = a}) + +-- | Project ID for order documents. +iigProjectId :: Lens' InventoryItemsGet' Int64 +iigProjectId + = lens _iigProjectId (\ s a -> s{_iigProjectId = a}) + +-- | OAuth 2.0 token for the current user. +iigOauthToken :: Lens' InventoryItemsGet' (Maybe Text) +iigOauthToken + = lens _iigOauthToken + (\ s a -> s{_iigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iigFields :: Lens' InventoryItemsGet' (Maybe Text) +iigFields + = lens _iigFields (\ s a -> s{_iigFields = a}) + +-- | Data format for the response. +iigAlt :: Lens' InventoryItemsGet' Text +iigAlt = lens _iigAlt (\ s a -> s{_iigAlt = a}) + +instance GoogleRequest InventoryItemsGet' where + type Rs InventoryItemsGet' = InventoryItem + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u InventoryItemsGet{..} + = go _iigQuotaUser _iigPrettyPrint _iigUserIp + _iigProfileId + _iigKey + _iigId + _iigProjectId + _iigOauthToken + _iigFields + _iigAlt + where go + = clientWithRoute + (Proxy :: Proxy InventoryItemsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/List.hs new file mode 100644 index 000000000..70a4226ba --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/List.hs @@ -0,0 +1,270 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.InventoryItems.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of inventory items, possibly filtered. +-- +-- /See:/ for @DfareportingInventoryItemsList@. +module DFAReporting.InventoryItems.List + ( + -- * REST Resource + InventoryItemsListAPI + + -- * Creating a Request + , inventoryItemsList + , InventoryItemsList + + -- * Request Lenses + , iilQuotaUser + , iilPrettyPrint + , iilUserIp + , iilIds + , iilProfileId + , iilSortOrder + , iilInPlan + , iilKey + , iilPageToken + , iilProjectId + , iilSortField + , iilOauthToken + , iilOrderId + , iilSiteId + , iilMaxResults + , iilFields + , iilAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingInventoryItemsList@ which the +-- 'InventoryItemsList' request conforms to. +type InventoryItemsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "inventoryItems" :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "inPlan" Bool :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "orderId" Int64 :> + QueryParams "siteId" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] InventoryItemsListResponse + +-- | Retrieves a list of inventory items, possibly filtered. +-- +-- /See:/ 'inventoryItemsList' smart constructor. +data InventoryItemsList = InventoryItemsList + { _iilQuotaUser :: !(Maybe Text) + , _iilPrettyPrint :: !Bool + , _iilUserIp :: !(Maybe Text) + , _iilIds :: !(Maybe Int64) + , _iilProfileId :: !Int64 + , _iilSortOrder :: !(Maybe Text) + , _iilInPlan :: !(Maybe Bool) + , _iilKey :: !(Maybe Text) + , _iilPageToken :: !(Maybe Text) + , _iilProjectId :: !Int64 + , _iilSortField :: !(Maybe Text) + , _iilOauthToken :: !(Maybe Text) + , _iilOrderId :: !(Maybe Int64) + , _iilSiteId :: !(Maybe Int64) + , _iilMaxResults :: !(Maybe Int32) + , _iilFields :: !(Maybe Text) + , _iilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InventoryItemsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iilQuotaUser' +-- +-- * 'iilPrettyPrint' +-- +-- * 'iilUserIp' +-- +-- * 'iilIds' +-- +-- * 'iilProfileId' +-- +-- * 'iilSortOrder' +-- +-- * 'iilInPlan' +-- +-- * 'iilKey' +-- +-- * 'iilPageToken' +-- +-- * 'iilProjectId' +-- +-- * 'iilSortField' +-- +-- * 'iilOauthToken' +-- +-- * 'iilOrderId' +-- +-- * 'iilSiteId' +-- +-- * 'iilMaxResults' +-- +-- * 'iilFields' +-- +-- * 'iilAlt' +inventoryItemsList + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'projectId' + -> InventoryItemsList +inventoryItemsList pIilProfileId_ pIilProjectId_ = + InventoryItemsList + { _iilQuotaUser = Nothing + , _iilPrettyPrint = True + , _iilUserIp = Nothing + , _iilIds = Nothing + , _iilProfileId = pIilProfileId_ + , _iilSortOrder = Nothing + , _iilInPlan = Nothing + , _iilKey = Nothing + , _iilPageToken = Nothing + , _iilProjectId = pIilProjectId_ + , _iilSortField = Nothing + , _iilOauthToken = Nothing + , _iilOrderId = Nothing + , _iilSiteId = Nothing + , _iilMaxResults = Nothing + , _iilFields = Nothing + , _iilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iilQuotaUser :: Lens' InventoryItemsList' (Maybe Text) +iilQuotaUser + = lens _iilQuotaUser (\ s a -> s{_iilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iilPrettyPrint :: Lens' InventoryItemsList' Bool +iilPrettyPrint + = lens _iilPrettyPrint + (\ s a -> s{_iilPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iilUserIp :: Lens' InventoryItemsList' (Maybe Text) +iilUserIp + = lens _iilUserIp (\ s a -> s{_iilUserIp = a}) + +-- | Select only inventory items with these IDs. +iilIds :: Lens' InventoryItemsList' (Maybe Int64) +iilIds = lens _iilIds (\ s a -> s{_iilIds = a}) + +-- | User profile ID associated with this request. +iilProfileId :: Lens' InventoryItemsList' Int64 +iilProfileId + = lens _iilProfileId (\ s a -> s{_iilProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +iilSortOrder :: Lens' InventoryItemsList' (Maybe Text) +iilSortOrder + = lens _iilSortOrder (\ s a -> s{_iilSortOrder = a}) + +-- | Select only inventory items that are in plan. +iilInPlan :: Lens' InventoryItemsList' (Maybe Bool) +iilInPlan + = lens _iilInPlan (\ s a -> s{_iilInPlan = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iilKey :: Lens' InventoryItemsList' (Maybe Text) +iilKey = lens _iilKey (\ s a -> s{_iilKey = a}) + +-- | Value of the nextPageToken from the previous result page. +iilPageToken :: Lens' InventoryItemsList' (Maybe Text) +iilPageToken + = lens _iilPageToken (\ s a -> s{_iilPageToken = a}) + +-- | Project ID for order documents. +iilProjectId :: Lens' InventoryItemsList' Int64 +iilProjectId + = lens _iilProjectId (\ s a -> s{_iilProjectId = a}) + +-- | Field by which to sort the list. +iilSortField :: Lens' InventoryItemsList' (Maybe Text) +iilSortField + = lens _iilSortField (\ s a -> s{_iilSortField = a}) + +-- | OAuth 2.0 token for the current user. +iilOauthToken :: Lens' InventoryItemsList' (Maybe Text) +iilOauthToken + = lens _iilOauthToken + (\ s a -> s{_iilOauthToken = a}) + +-- | Select only inventory items that belong to specified orders. +iilOrderId :: Lens' InventoryItemsList' (Maybe Int64) +iilOrderId + = lens _iilOrderId (\ s a -> s{_iilOrderId = a}) + +-- | Select only inventory items that are associated with these sites. +iilSiteId :: Lens' InventoryItemsList' (Maybe Int64) +iilSiteId + = lens _iilSiteId (\ s a -> s{_iilSiteId = a}) + +-- | Maximum number of results to return. +iilMaxResults :: Lens' InventoryItemsList' (Maybe Int32) +iilMaxResults + = lens _iilMaxResults + (\ s a -> s{_iilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +iilFields :: Lens' InventoryItemsList' (Maybe Text) +iilFields + = lens _iilFields (\ s a -> s{_iilFields = a}) + +-- | Data format for the response. +iilAlt :: Lens' InventoryItemsList' Text +iilAlt = lens _iilAlt (\ s a -> s{_iilAlt = a}) + +instance GoogleRequest InventoryItemsList' where + type Rs InventoryItemsList' = + InventoryItemsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u InventoryItemsList{..} + = go _iilQuotaUser _iilPrettyPrint _iilUserIp _iilIds + _iilProfileId + _iilSortOrder + _iilInPlan + _iilKey + _iilPageToken + _iilProjectId + _iilSortField + _iilOauthToken + _iilOrderId + _iilSiteId + _iilMaxResults + _iilFields + _iilAlt + where go + = clientWithRoute + (Proxy :: Proxy InventoryItemsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Delete.hs new file mode 100644 index 000000000..803fb9939 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing campaign landing page. +-- +-- /See:/ for @DfareportingLandingPagesDelete@. +module DFAReporting.LandingPages.Delete + ( + -- * REST Resource + LandingPagesDeleteAPI + + -- * Creating a Request + , landingPagesDelete + , LandingPagesDelete + + -- * Request Lenses + , lpdQuotaUser + , lpdPrettyPrint + , lpdUserIp + , lpdCampaignId + , lpdProfileId + , lpdKey + , lpdId + , lpdOauthToken + , lpdFields + , lpdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesDelete@ which the +-- 'LandingPagesDelete' request conforms to. +type LandingPagesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing campaign landing page. +-- +-- /See:/ 'landingPagesDelete' smart constructor. +data LandingPagesDelete = LandingPagesDelete + { _lpdQuotaUser :: !(Maybe Text) + , _lpdPrettyPrint :: !Bool + , _lpdUserIp :: !(Maybe Text) + , _lpdCampaignId :: !Int64 + , _lpdProfileId :: !Int64 + , _lpdKey :: !(Maybe Text) + , _lpdId :: !Int64 + , _lpdOauthToken :: !(Maybe Text) + , _lpdFields :: !(Maybe Text) + , _lpdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpdQuotaUser' +-- +-- * 'lpdPrettyPrint' +-- +-- * 'lpdUserIp' +-- +-- * 'lpdCampaignId' +-- +-- * 'lpdProfileId' +-- +-- * 'lpdKey' +-- +-- * 'lpdId' +-- +-- * 'lpdOauthToken' +-- +-- * 'lpdFields' +-- +-- * 'lpdAlt' +landingPagesDelete + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> LandingPagesDelete +landingPagesDelete pLpdCampaignId_ pLpdProfileId_ pLpdId_ = + LandingPagesDelete + { _lpdQuotaUser = Nothing + , _lpdPrettyPrint = True + , _lpdUserIp = Nothing + , _lpdCampaignId = pLpdCampaignId_ + , _lpdProfileId = pLpdProfileId_ + , _lpdKey = Nothing + , _lpdId = pLpdId_ + , _lpdOauthToken = Nothing + , _lpdFields = Nothing + , _lpdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpdQuotaUser :: Lens' LandingPagesDelete' (Maybe Text) +lpdQuotaUser + = lens _lpdQuotaUser (\ s a -> s{_lpdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpdPrettyPrint :: Lens' LandingPagesDelete' Bool +lpdPrettyPrint + = lens _lpdPrettyPrint + (\ s a -> s{_lpdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpdUserIp :: Lens' LandingPagesDelete' (Maybe Text) +lpdUserIp + = lens _lpdUserIp (\ s a -> s{_lpdUserIp = a}) + +-- | Landing page campaign ID. +lpdCampaignId :: Lens' LandingPagesDelete' Int64 +lpdCampaignId + = lens _lpdCampaignId + (\ s a -> s{_lpdCampaignId = a}) + +-- | User profile ID associated with this request. +lpdProfileId :: Lens' LandingPagesDelete' Int64 +lpdProfileId + = lens _lpdProfileId (\ s a -> s{_lpdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpdKey :: Lens' LandingPagesDelete' (Maybe Text) +lpdKey = lens _lpdKey (\ s a -> s{_lpdKey = a}) + +-- | Landing page ID. +lpdId :: Lens' LandingPagesDelete' Int64 +lpdId = lens _lpdId (\ s a -> s{_lpdId = a}) + +-- | OAuth 2.0 token for the current user. +lpdOauthToken :: Lens' LandingPagesDelete' (Maybe Text) +lpdOauthToken + = lens _lpdOauthToken + (\ s a -> s{_lpdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpdFields :: Lens' LandingPagesDelete' (Maybe Text) +lpdFields + = lens _lpdFields (\ s a -> s{_lpdFields = a}) + +-- | Data format for the response. +lpdAlt :: Lens' LandingPagesDelete' Text +lpdAlt = lens _lpdAlt (\ s a -> s{_lpdAlt = a}) + +instance GoogleRequest LandingPagesDelete' where + type Rs LandingPagesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesDelete{..} + = go _lpdQuotaUser _lpdPrettyPrint _lpdUserIp + _lpdCampaignId + _lpdProfileId + _lpdKey + _lpdId + _lpdOauthToken + _lpdFields + _lpdAlt + where go + = clientWithRoute + (Proxy :: Proxy LandingPagesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Get.hs new file mode 100644 index 000000000..a7a5f31a5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one campaign landing page by ID. +-- +-- /See:/ for @DfareportingLandingPagesGet@. +module DFAReporting.LandingPages.Get + ( + -- * REST Resource + LandingPagesGetAPI + + -- * Creating a Request + , landingPagesGet + , LandingPagesGet + + -- * Request Lenses + , lpgQuotaUser + , lpgPrettyPrint + , lpgUserIp + , lpgCampaignId + , lpgProfileId + , lpgKey + , lpgId + , lpgOauthToken + , lpgFields + , lpgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesGet@ which the +-- 'LandingPagesGet' request conforms to. +type LandingPagesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> + Capture "id" Int64 :> Get '[JSON] LandingPage + +-- | Gets one campaign landing page by ID. +-- +-- /See:/ 'landingPagesGet' smart constructor. +data LandingPagesGet = LandingPagesGet + { _lpgQuotaUser :: !(Maybe Text) + , _lpgPrettyPrint :: !Bool + , _lpgUserIp :: !(Maybe Text) + , _lpgCampaignId :: !Int64 + , _lpgProfileId :: !Int64 + , _lpgKey :: !(Maybe Text) + , _lpgId :: !Int64 + , _lpgOauthToken :: !(Maybe Text) + , _lpgFields :: !(Maybe Text) + , _lpgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpgQuotaUser' +-- +-- * 'lpgPrettyPrint' +-- +-- * 'lpgUserIp' +-- +-- * 'lpgCampaignId' +-- +-- * 'lpgProfileId' +-- +-- * 'lpgKey' +-- +-- * 'lpgId' +-- +-- * 'lpgOauthToken' +-- +-- * 'lpgFields' +-- +-- * 'lpgAlt' +landingPagesGet + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> LandingPagesGet +landingPagesGet pLpgCampaignId_ pLpgProfileId_ pLpgId_ = + LandingPagesGet + { _lpgQuotaUser = Nothing + , _lpgPrettyPrint = True + , _lpgUserIp = Nothing + , _lpgCampaignId = pLpgCampaignId_ + , _lpgProfileId = pLpgProfileId_ + , _lpgKey = Nothing + , _lpgId = pLpgId_ + , _lpgOauthToken = Nothing + , _lpgFields = Nothing + , _lpgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpgQuotaUser :: Lens' LandingPagesGet' (Maybe Text) +lpgQuotaUser + = lens _lpgQuotaUser (\ s a -> s{_lpgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpgPrettyPrint :: Lens' LandingPagesGet' Bool +lpgPrettyPrint + = lens _lpgPrettyPrint + (\ s a -> s{_lpgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpgUserIp :: Lens' LandingPagesGet' (Maybe Text) +lpgUserIp + = lens _lpgUserIp (\ s a -> s{_lpgUserIp = a}) + +-- | Landing page campaign ID. +lpgCampaignId :: Lens' LandingPagesGet' Int64 +lpgCampaignId + = lens _lpgCampaignId + (\ s a -> s{_lpgCampaignId = a}) + +-- | User profile ID associated with this request. +lpgProfileId :: Lens' LandingPagesGet' Int64 +lpgProfileId + = lens _lpgProfileId (\ s a -> s{_lpgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpgKey :: Lens' LandingPagesGet' (Maybe Text) +lpgKey = lens _lpgKey (\ s a -> s{_lpgKey = a}) + +-- | Landing page ID. +lpgId :: Lens' LandingPagesGet' Int64 +lpgId = lens _lpgId (\ s a -> s{_lpgId = a}) + +-- | OAuth 2.0 token for the current user. +lpgOauthToken :: Lens' LandingPagesGet' (Maybe Text) +lpgOauthToken + = lens _lpgOauthToken + (\ s a -> s{_lpgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpgFields :: Lens' LandingPagesGet' (Maybe Text) +lpgFields + = lens _lpgFields (\ s a -> s{_lpgFields = a}) + +-- | Data format for the response. +lpgAlt :: Lens' LandingPagesGet' Text +lpgAlt = lens _lpgAlt (\ s a -> s{_lpgAlt = a}) + +instance GoogleRequest LandingPagesGet' where + type Rs LandingPagesGet' = LandingPage + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesGet{..} + = go _lpgQuotaUser _lpgPrettyPrint _lpgUserIp + _lpgCampaignId + _lpgProfileId + _lpgKey + _lpgId + _lpgOauthToken + _lpgFields + _lpgAlt + where go + = clientWithRoute (Proxy :: Proxy LandingPagesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Insert.hs new file mode 100644 index 000000000..be702d2d7 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new landing page for the specified campaign. +-- +-- /See:/ for @DfareportingLandingPagesInsert@. +module DFAReporting.LandingPages.Insert + ( + -- * REST Resource + LandingPagesInsertAPI + + -- * Creating a Request + , landingPagesInsert + , LandingPagesInsert + + -- * Request Lenses + , lpiQuotaUser + , lpiPrettyPrint + , lpiUserIp + , lpiCampaignId + , lpiProfileId + , lpiKey + , lpiOauthToken + , lpiFields + , lpiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesInsert@ which the +-- 'LandingPagesInsert' request conforms to. +type LandingPagesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> Post '[JSON] LandingPage + +-- | Inserts a new landing page for the specified campaign. +-- +-- /See:/ 'landingPagesInsert' smart constructor. +data LandingPagesInsert = LandingPagesInsert + { _lpiQuotaUser :: !(Maybe Text) + , _lpiPrettyPrint :: !Bool + , _lpiUserIp :: !(Maybe Text) + , _lpiCampaignId :: !Int64 + , _lpiProfileId :: !Int64 + , _lpiKey :: !(Maybe Text) + , _lpiOauthToken :: !(Maybe Text) + , _lpiFields :: !(Maybe Text) + , _lpiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpiQuotaUser' +-- +-- * 'lpiPrettyPrint' +-- +-- * 'lpiUserIp' +-- +-- * 'lpiCampaignId' +-- +-- * 'lpiProfileId' +-- +-- * 'lpiKey' +-- +-- * 'lpiOauthToken' +-- +-- * 'lpiFields' +-- +-- * 'lpiAlt' +landingPagesInsert + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> LandingPagesInsert +landingPagesInsert pLpiCampaignId_ pLpiProfileId_ = + LandingPagesInsert + { _lpiQuotaUser = Nothing + , _lpiPrettyPrint = True + , _lpiUserIp = Nothing + , _lpiCampaignId = pLpiCampaignId_ + , _lpiProfileId = pLpiProfileId_ + , _lpiKey = Nothing + , _lpiOauthToken = Nothing + , _lpiFields = Nothing + , _lpiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpiQuotaUser :: Lens' LandingPagesInsert' (Maybe Text) +lpiQuotaUser + = lens _lpiQuotaUser (\ s a -> s{_lpiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpiPrettyPrint :: Lens' LandingPagesInsert' Bool +lpiPrettyPrint + = lens _lpiPrettyPrint + (\ s a -> s{_lpiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpiUserIp :: Lens' LandingPagesInsert' (Maybe Text) +lpiUserIp + = lens _lpiUserIp (\ s a -> s{_lpiUserIp = a}) + +-- | Landing page campaign ID. +lpiCampaignId :: Lens' LandingPagesInsert' Int64 +lpiCampaignId + = lens _lpiCampaignId + (\ s a -> s{_lpiCampaignId = a}) + +-- | User profile ID associated with this request. +lpiProfileId :: Lens' LandingPagesInsert' Int64 +lpiProfileId + = lens _lpiProfileId (\ s a -> s{_lpiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpiKey :: Lens' LandingPagesInsert' (Maybe Text) +lpiKey = lens _lpiKey (\ s a -> s{_lpiKey = a}) + +-- | OAuth 2.0 token for the current user. +lpiOauthToken :: Lens' LandingPagesInsert' (Maybe Text) +lpiOauthToken + = lens _lpiOauthToken + (\ s a -> s{_lpiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpiFields :: Lens' LandingPagesInsert' (Maybe Text) +lpiFields + = lens _lpiFields (\ s a -> s{_lpiFields = a}) + +-- | Data format for the response. +lpiAlt :: Lens' LandingPagesInsert' Text +lpiAlt = lens _lpiAlt (\ s a -> s{_lpiAlt = a}) + +instance GoogleRequest LandingPagesInsert' where + type Rs LandingPagesInsert' = LandingPage + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesInsert{..} + = go _lpiQuotaUser _lpiPrettyPrint _lpiUserIp + _lpiCampaignId + _lpiProfileId + _lpiKey + _lpiOauthToken + _lpiFields + _lpiAlt + where go + = clientWithRoute + (Proxy :: Proxy LandingPagesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/List.hs new file mode 100644 index 000000000..f92275bf2 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/List.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of landing pages for the specified campaign. +-- +-- /See:/ for @DfareportingLandingPagesList@. +module DFAReporting.LandingPages.List + ( + -- * REST Resource + LandingPagesListAPI + + -- * Creating a Request + , landingPagesList + , LandingPagesList + + -- * Request Lenses + , lplQuotaUser + , lplPrettyPrint + , lplUserIp + , lplCampaignId + , lplProfileId + , lplKey + , lplOauthToken + , lplFields + , lplAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesList@ which the +-- 'LandingPagesList' request conforms to. +type LandingPagesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> + Get '[JSON] LandingPagesListResponse + +-- | Retrieves the list of landing pages for the specified campaign. +-- +-- /See:/ 'landingPagesList' smart constructor. +data LandingPagesList = LandingPagesList + { _lplQuotaUser :: !(Maybe Text) + , _lplPrettyPrint :: !Bool + , _lplUserIp :: !(Maybe Text) + , _lplCampaignId :: !Int64 + , _lplProfileId :: !Int64 + , _lplKey :: !(Maybe Text) + , _lplOauthToken :: !(Maybe Text) + , _lplFields :: !(Maybe Text) + , _lplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lplQuotaUser' +-- +-- * 'lplPrettyPrint' +-- +-- * 'lplUserIp' +-- +-- * 'lplCampaignId' +-- +-- * 'lplProfileId' +-- +-- * 'lplKey' +-- +-- * 'lplOauthToken' +-- +-- * 'lplFields' +-- +-- * 'lplAlt' +landingPagesList + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> LandingPagesList +landingPagesList pLplCampaignId_ pLplProfileId_ = + LandingPagesList + { _lplQuotaUser = Nothing + , _lplPrettyPrint = True + , _lplUserIp = Nothing + , _lplCampaignId = pLplCampaignId_ + , _lplProfileId = pLplProfileId_ + , _lplKey = Nothing + , _lplOauthToken = Nothing + , _lplFields = Nothing + , _lplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lplQuotaUser :: Lens' LandingPagesList' (Maybe Text) +lplQuotaUser + = lens _lplQuotaUser (\ s a -> s{_lplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lplPrettyPrint :: Lens' LandingPagesList' Bool +lplPrettyPrint + = lens _lplPrettyPrint + (\ s a -> s{_lplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lplUserIp :: Lens' LandingPagesList' (Maybe Text) +lplUserIp + = lens _lplUserIp (\ s a -> s{_lplUserIp = a}) + +-- | Landing page campaign ID. +lplCampaignId :: Lens' LandingPagesList' Int64 +lplCampaignId + = lens _lplCampaignId + (\ s a -> s{_lplCampaignId = a}) + +-- | User profile ID associated with this request. +lplProfileId :: Lens' LandingPagesList' Int64 +lplProfileId + = lens _lplProfileId (\ s a -> s{_lplProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lplKey :: Lens' LandingPagesList' (Maybe Text) +lplKey = lens _lplKey (\ s a -> s{_lplKey = a}) + +-- | OAuth 2.0 token for the current user. +lplOauthToken :: Lens' LandingPagesList' (Maybe Text) +lplOauthToken + = lens _lplOauthToken + (\ s a -> s{_lplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lplFields :: Lens' LandingPagesList' (Maybe Text) +lplFields + = lens _lplFields (\ s a -> s{_lplFields = a}) + +-- | Data format for the response. +lplAlt :: Lens' LandingPagesList' Text +lplAlt = lens _lplAlt (\ s a -> s{_lplAlt = a}) + +instance GoogleRequest LandingPagesList' where + type Rs LandingPagesList' = LandingPagesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesList{..} + = go _lplQuotaUser _lplPrettyPrint _lplUserIp + _lplCampaignId + _lplProfileId + _lplKey + _lplOauthToken + _lplFields + _lplAlt + where go + = clientWithRoute + (Proxy :: Proxy LandingPagesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Patch.hs new file mode 100644 index 000000000..2eb5da7e6 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Patch.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing campaign landing page. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingLandingPagesPatch@. +module DFAReporting.LandingPages.Patch + ( + -- * REST Resource + LandingPagesPatchAPI + + -- * Creating a Request + , landingPagesPatch + , LandingPagesPatch + + -- * Request Lenses + , lppQuotaUser + , lppPrettyPrint + , lppUserIp + , lppCampaignId + , lppProfileId + , lppKey + , lppId + , lppOauthToken + , lppFields + , lppAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesPatch@ which the +-- 'LandingPagesPatch' request conforms to. +type LandingPagesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> + QueryParam "id" Int64 :> Patch '[JSON] LandingPage + +-- | Updates an existing campaign landing page. This method supports patch +-- semantics. +-- +-- /See:/ 'landingPagesPatch' smart constructor. +data LandingPagesPatch = LandingPagesPatch + { _lppQuotaUser :: !(Maybe Text) + , _lppPrettyPrint :: !Bool + , _lppUserIp :: !(Maybe Text) + , _lppCampaignId :: !Int64 + , _lppProfileId :: !Int64 + , _lppKey :: !(Maybe Text) + , _lppId :: !Int64 + , _lppOauthToken :: !(Maybe Text) + , _lppFields :: !(Maybe Text) + , _lppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lppQuotaUser' +-- +-- * 'lppPrettyPrint' +-- +-- * 'lppUserIp' +-- +-- * 'lppCampaignId' +-- +-- * 'lppProfileId' +-- +-- * 'lppKey' +-- +-- * 'lppId' +-- +-- * 'lppOauthToken' +-- +-- * 'lppFields' +-- +-- * 'lppAlt' +landingPagesPatch + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> LandingPagesPatch +landingPagesPatch pLppCampaignId_ pLppProfileId_ pLppId_ = + LandingPagesPatch + { _lppQuotaUser = Nothing + , _lppPrettyPrint = True + , _lppUserIp = Nothing + , _lppCampaignId = pLppCampaignId_ + , _lppProfileId = pLppProfileId_ + , _lppKey = Nothing + , _lppId = pLppId_ + , _lppOauthToken = Nothing + , _lppFields = Nothing + , _lppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lppQuotaUser :: Lens' LandingPagesPatch' (Maybe Text) +lppQuotaUser + = lens _lppQuotaUser (\ s a -> s{_lppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lppPrettyPrint :: Lens' LandingPagesPatch' Bool +lppPrettyPrint + = lens _lppPrettyPrint + (\ s a -> s{_lppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lppUserIp :: Lens' LandingPagesPatch' (Maybe Text) +lppUserIp + = lens _lppUserIp (\ s a -> s{_lppUserIp = a}) + +-- | Landing page campaign ID. +lppCampaignId :: Lens' LandingPagesPatch' Int64 +lppCampaignId + = lens _lppCampaignId + (\ s a -> s{_lppCampaignId = a}) + +-- | User profile ID associated with this request. +lppProfileId :: Lens' LandingPagesPatch' Int64 +lppProfileId + = lens _lppProfileId (\ s a -> s{_lppProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lppKey :: Lens' LandingPagesPatch' (Maybe Text) +lppKey = lens _lppKey (\ s a -> s{_lppKey = a}) + +-- | Landing page ID. +lppId :: Lens' LandingPagesPatch' Int64 +lppId = lens _lppId (\ s a -> s{_lppId = a}) + +-- | OAuth 2.0 token for the current user. +lppOauthToken :: Lens' LandingPagesPatch' (Maybe Text) +lppOauthToken + = lens _lppOauthToken + (\ s a -> s{_lppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lppFields :: Lens' LandingPagesPatch' (Maybe Text) +lppFields + = lens _lppFields (\ s a -> s{_lppFields = a}) + +-- | Data format for the response. +lppAlt :: Lens' LandingPagesPatch' Text +lppAlt = lens _lppAlt (\ s a -> s{_lppAlt = a}) + +instance GoogleRequest LandingPagesPatch' where + type Rs LandingPagesPatch' = LandingPage + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesPatch{..} + = go _lppQuotaUser _lppPrettyPrint _lppUserIp + _lppCampaignId + _lppProfileId + _lppKey + (Just _lppId) + _lppOauthToken + _lppFields + _lppAlt + where go + = clientWithRoute + (Proxy :: Proxy LandingPagesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Update.hs new file mode 100644 index 000000000..2acd13f05 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/LandingPages/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.LandingPages.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing campaign landing page. +-- +-- /See:/ for @DfareportingLandingPagesUpdate@. +module DFAReporting.LandingPages.Update + ( + -- * REST Resource + LandingPagesUpdateAPI + + -- * Creating a Request + , landingPagesUpdate + , LandingPagesUpdate + + -- * Request Lenses + , lpuQuotaUser + , lpuPrettyPrint + , lpuUserIp + , lpuCampaignId + , lpuProfileId + , lpuKey + , lpuOauthToken + , lpuFields + , lpuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingLandingPagesUpdate@ which the +-- 'LandingPagesUpdate' request conforms to. +type LandingPagesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "campaigns" :> + Capture "campaignId" Int64 :> + "landingPages" :> Put '[JSON] LandingPage + +-- | Updates an existing campaign landing page. +-- +-- /See:/ 'landingPagesUpdate' smart constructor. +data LandingPagesUpdate = LandingPagesUpdate + { _lpuQuotaUser :: !(Maybe Text) + , _lpuPrettyPrint :: !Bool + , _lpuUserIp :: !(Maybe Text) + , _lpuCampaignId :: !Int64 + , _lpuProfileId :: !Int64 + , _lpuKey :: !(Maybe Text) + , _lpuOauthToken :: !(Maybe Text) + , _lpuFields :: !(Maybe Text) + , _lpuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LandingPagesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpuQuotaUser' +-- +-- * 'lpuPrettyPrint' +-- +-- * 'lpuUserIp' +-- +-- * 'lpuCampaignId' +-- +-- * 'lpuProfileId' +-- +-- * 'lpuKey' +-- +-- * 'lpuOauthToken' +-- +-- * 'lpuFields' +-- +-- * 'lpuAlt' +landingPagesUpdate + :: Int64 -- ^ 'campaignId' + -> Int64 -- ^ 'profileId' + -> LandingPagesUpdate +landingPagesUpdate pLpuCampaignId_ pLpuProfileId_ = + LandingPagesUpdate + { _lpuQuotaUser = Nothing + , _lpuPrettyPrint = True + , _lpuUserIp = Nothing + , _lpuCampaignId = pLpuCampaignId_ + , _lpuProfileId = pLpuProfileId_ + , _lpuKey = Nothing + , _lpuOauthToken = Nothing + , _lpuFields = Nothing + , _lpuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpuQuotaUser :: Lens' LandingPagesUpdate' (Maybe Text) +lpuQuotaUser + = lens _lpuQuotaUser (\ s a -> s{_lpuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpuPrettyPrint :: Lens' LandingPagesUpdate' Bool +lpuPrettyPrint + = lens _lpuPrettyPrint + (\ s a -> s{_lpuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpuUserIp :: Lens' LandingPagesUpdate' (Maybe Text) +lpuUserIp + = lens _lpuUserIp (\ s a -> s{_lpuUserIp = a}) + +-- | Landing page campaign ID. +lpuCampaignId :: Lens' LandingPagesUpdate' Int64 +lpuCampaignId + = lens _lpuCampaignId + (\ s a -> s{_lpuCampaignId = a}) + +-- | User profile ID associated with this request. +lpuProfileId :: Lens' LandingPagesUpdate' Int64 +lpuProfileId + = lens _lpuProfileId (\ s a -> s{_lpuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpuKey :: Lens' LandingPagesUpdate' (Maybe Text) +lpuKey = lens _lpuKey (\ s a -> s{_lpuKey = a}) + +-- | OAuth 2.0 token for the current user. +lpuOauthToken :: Lens' LandingPagesUpdate' (Maybe Text) +lpuOauthToken + = lens _lpuOauthToken + (\ s a -> s{_lpuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpuFields :: Lens' LandingPagesUpdate' (Maybe Text) +lpuFields + = lens _lpuFields (\ s a -> s{_lpuFields = a}) + +-- | Data format for the response. +lpuAlt :: Lens' LandingPagesUpdate' Text +lpuAlt = lens _lpuAlt (\ s a -> s{_lpuAlt = a}) + +instance GoogleRequest LandingPagesUpdate' where + type Rs LandingPagesUpdate' = LandingPage + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u LandingPagesUpdate{..} + = go _lpuQuotaUser _lpuPrettyPrint _lpuUserIp + _lpuCampaignId + _lpuProfileId + _lpuKey + _lpuOauthToken + _lpuFields + _lpuAlt + where go + = clientWithRoute + (Proxy :: Proxy LandingPagesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Metros/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Metros/List.hs new file mode 100644 index 000000000..757473eaf --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Metros/List.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Metros.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of metros. +-- +-- /See:/ for @DfareportingMetrosList@. +module DFAReporting.Metros.List + ( + -- * REST Resource + MetrosListAPI + + -- * Creating a Request + , metrosList + , MetrosList + + -- * Request Lenses + , mlQuotaUser + , mlPrettyPrint + , mlUserIp + , mlProfileId + , mlKey + , mlOauthToken + , mlFields + , mlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingMetrosList@ which the +-- 'MetrosList' request conforms to. +type MetrosListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "metros" :> Get '[JSON] MetrosListResponse + +-- | Retrieves a list of metros. +-- +-- /See:/ 'metrosList' smart constructor. +data MetrosList = MetrosList + { _mlQuotaUser :: !(Maybe Text) + , _mlPrettyPrint :: !Bool + , _mlUserIp :: !(Maybe Text) + , _mlProfileId :: !Int64 + , _mlKey :: !(Maybe Text) + , _mlOauthToken :: !(Maybe Text) + , _mlFields :: !(Maybe Text) + , _mlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetrosList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlQuotaUser' +-- +-- * 'mlPrettyPrint' +-- +-- * 'mlUserIp' +-- +-- * 'mlProfileId' +-- +-- * 'mlKey' +-- +-- * 'mlOauthToken' +-- +-- * 'mlFields' +-- +-- * 'mlAlt' +metrosList + :: Int64 -- ^ 'profileId' + -> MetrosList +metrosList pMlProfileId_ = + MetrosList + { _mlQuotaUser = Nothing + , _mlPrettyPrint = True + , _mlUserIp = Nothing + , _mlProfileId = pMlProfileId_ + , _mlKey = Nothing + , _mlOauthToken = Nothing + , _mlFields = Nothing + , _mlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlQuotaUser :: Lens' MetrosList' (Maybe Text) +mlQuotaUser + = lens _mlQuotaUser (\ s a -> s{_mlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlPrettyPrint :: Lens' MetrosList' Bool +mlPrettyPrint + = lens _mlPrettyPrint + (\ s a -> s{_mlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlUserIp :: Lens' MetrosList' (Maybe Text) +mlUserIp = lens _mlUserIp (\ s a -> s{_mlUserIp = a}) + +-- | User profile ID associated with this request. +mlProfileId :: Lens' MetrosList' Int64 +mlProfileId + = lens _mlProfileId (\ s a -> s{_mlProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlKey :: Lens' MetrosList' (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | OAuth 2.0 token for the current user. +mlOauthToken :: Lens' MetrosList' (Maybe Text) +mlOauthToken + = lens _mlOauthToken (\ s a -> s{_mlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mlFields :: Lens' MetrosList' (Maybe Text) +mlFields = lens _mlFields (\ s a -> s{_mlFields = a}) + +-- | Data format for the response. +mlAlt :: Lens' MetrosList' Text +mlAlt = lens _mlAlt (\ s a -> s{_mlAlt = a}) + +instance GoogleRequest MetrosList' where + type Rs MetrosList' = MetrosListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u MetrosList{..} + = go _mlQuotaUser _mlPrettyPrint _mlUserIp + _mlProfileId + _mlKey + _mlOauthToken + _mlFields + _mlAlt + where go + = clientWithRoute (Proxy :: Proxy MetrosListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/Get.hs new file mode 100644 index 000000000..3028e6352 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.MobileCarriers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one mobile carrier by ID. +-- +-- /See:/ for @DfareportingMobileCarriersGet@. +module DFAReporting.MobileCarriers.Get + ( + -- * REST Resource + MobileCarriersGetAPI + + -- * Creating a Request + , mobileCarriersGet + , MobileCarriersGet + + -- * Request Lenses + , mcgQuotaUser + , mcgPrettyPrint + , mcgUserIp + , mcgProfileId + , mcgKey + , mcgId + , mcgOauthToken + , mcgFields + , mcgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingMobileCarriersGet@ which the +-- 'MobileCarriersGet' request conforms to. +type MobileCarriersGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "mobileCarriers" :> + Capture "id" Int64 :> Get '[JSON] MobileCarrier + +-- | Gets one mobile carrier by ID. +-- +-- /See:/ 'mobileCarriersGet' smart constructor. +data MobileCarriersGet = MobileCarriersGet + { _mcgQuotaUser :: !(Maybe Text) + , _mcgPrettyPrint :: !Bool + , _mcgUserIp :: !(Maybe Text) + , _mcgProfileId :: !Int64 + , _mcgKey :: !(Maybe Text) + , _mcgId :: !Int64 + , _mcgOauthToken :: !(Maybe Text) + , _mcgFields :: !(Maybe Text) + , _mcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileCarriersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcgQuotaUser' +-- +-- * 'mcgPrettyPrint' +-- +-- * 'mcgUserIp' +-- +-- * 'mcgProfileId' +-- +-- * 'mcgKey' +-- +-- * 'mcgId' +-- +-- * 'mcgOauthToken' +-- +-- * 'mcgFields' +-- +-- * 'mcgAlt' +mobileCarriersGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> MobileCarriersGet +mobileCarriersGet pMcgProfileId_ pMcgId_ = + MobileCarriersGet + { _mcgQuotaUser = Nothing + , _mcgPrettyPrint = True + , _mcgUserIp = Nothing + , _mcgProfileId = pMcgProfileId_ + , _mcgKey = Nothing + , _mcgId = pMcgId_ + , _mcgOauthToken = Nothing + , _mcgFields = Nothing + , _mcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcgQuotaUser :: Lens' MobileCarriersGet' (Maybe Text) +mcgQuotaUser + = lens _mcgQuotaUser (\ s a -> s{_mcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcgPrettyPrint :: Lens' MobileCarriersGet' Bool +mcgPrettyPrint + = lens _mcgPrettyPrint + (\ s a -> s{_mcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcgUserIp :: Lens' MobileCarriersGet' (Maybe Text) +mcgUserIp + = lens _mcgUserIp (\ s a -> s{_mcgUserIp = a}) + +-- | User profile ID associated with this request. +mcgProfileId :: Lens' MobileCarriersGet' Int64 +mcgProfileId + = lens _mcgProfileId (\ s a -> s{_mcgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcgKey :: Lens' MobileCarriersGet' (Maybe Text) +mcgKey = lens _mcgKey (\ s a -> s{_mcgKey = a}) + +-- | Mobile carrier ID. +mcgId :: Lens' MobileCarriersGet' Int64 +mcgId = lens _mcgId (\ s a -> s{_mcgId = a}) + +-- | OAuth 2.0 token for the current user. +mcgOauthToken :: Lens' MobileCarriersGet' (Maybe Text) +mcgOauthToken + = lens _mcgOauthToken + (\ s a -> s{_mcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcgFields :: Lens' MobileCarriersGet' (Maybe Text) +mcgFields + = lens _mcgFields (\ s a -> s{_mcgFields = a}) + +-- | Data format for the response. +mcgAlt :: Lens' MobileCarriersGet' Text +mcgAlt = lens _mcgAlt (\ s a -> s{_mcgAlt = a}) + +instance GoogleRequest MobileCarriersGet' where + type Rs MobileCarriersGet' = MobileCarrier + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u MobileCarriersGet{..} + = go _mcgQuotaUser _mcgPrettyPrint _mcgUserIp + _mcgProfileId + _mcgKey + _mcgId + _mcgOauthToken + _mcgFields + _mcgAlt + where go + = clientWithRoute + (Proxy :: Proxy MobileCarriersGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/List.hs new file mode 100644 index 000000000..f3f72d30a --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.MobileCarriers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of mobile carriers. +-- +-- /See:/ for @DfareportingMobileCarriersList@. +module DFAReporting.MobileCarriers.List + ( + -- * REST Resource + MobileCarriersListAPI + + -- * Creating a Request + , mobileCarriersList + , MobileCarriersList + + -- * Request Lenses + , mclQuotaUser + , mclPrettyPrint + , mclUserIp + , mclProfileId + , mclKey + , mclOauthToken + , mclFields + , mclAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingMobileCarriersList@ which the +-- 'MobileCarriersList' request conforms to. +type MobileCarriersListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "mobileCarriers" :> + Get '[JSON] MobileCarriersListResponse + +-- | Retrieves a list of mobile carriers. +-- +-- /See:/ 'mobileCarriersList' smart constructor. +data MobileCarriersList = MobileCarriersList + { _mclQuotaUser :: !(Maybe Text) + , _mclPrettyPrint :: !Bool + , _mclUserIp :: !(Maybe Text) + , _mclProfileId :: !Int64 + , _mclKey :: !(Maybe Text) + , _mclOauthToken :: !(Maybe Text) + , _mclFields :: !(Maybe Text) + , _mclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MobileCarriersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mclQuotaUser' +-- +-- * 'mclPrettyPrint' +-- +-- * 'mclUserIp' +-- +-- * 'mclProfileId' +-- +-- * 'mclKey' +-- +-- * 'mclOauthToken' +-- +-- * 'mclFields' +-- +-- * 'mclAlt' +mobileCarriersList + :: Int64 -- ^ 'profileId' + -> MobileCarriersList +mobileCarriersList pMclProfileId_ = + MobileCarriersList + { _mclQuotaUser = Nothing + , _mclPrettyPrint = True + , _mclUserIp = Nothing + , _mclProfileId = pMclProfileId_ + , _mclKey = Nothing + , _mclOauthToken = Nothing + , _mclFields = Nothing + , _mclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mclQuotaUser :: Lens' MobileCarriersList' (Maybe Text) +mclQuotaUser + = lens _mclQuotaUser (\ s a -> s{_mclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mclPrettyPrint :: Lens' MobileCarriersList' Bool +mclPrettyPrint + = lens _mclPrettyPrint + (\ s a -> s{_mclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mclUserIp :: Lens' MobileCarriersList' (Maybe Text) +mclUserIp + = lens _mclUserIp (\ s a -> s{_mclUserIp = a}) + +-- | User profile ID associated with this request. +mclProfileId :: Lens' MobileCarriersList' Int64 +mclProfileId + = lens _mclProfileId (\ s a -> s{_mclProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mclKey :: Lens' MobileCarriersList' (Maybe Text) +mclKey = lens _mclKey (\ s a -> s{_mclKey = a}) + +-- | OAuth 2.0 token for the current user. +mclOauthToken :: Lens' MobileCarriersList' (Maybe Text) +mclOauthToken + = lens _mclOauthToken + (\ s a -> s{_mclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mclFields :: Lens' MobileCarriersList' (Maybe Text) +mclFields + = lens _mclFields (\ s a -> s{_mclFields = a}) + +-- | Data format for the response. +mclAlt :: Lens' MobileCarriersList' Text +mclAlt = lens _mclAlt (\ s a -> s{_mclAlt = a}) + +instance GoogleRequest MobileCarriersList' where + type Rs MobileCarriersList' = + MobileCarriersListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u MobileCarriersList{..} + = go _mclQuotaUser _mclPrettyPrint _mclUserIp + _mclProfileId + _mclKey + _mclOauthToken + _mclFields + _mclAlt + where go + = clientWithRoute + (Proxy :: Proxy MobileCarriersListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/Get.hs new file mode 100644 index 000000000..3721c9139 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OperatingSystemVersions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one operating system version by ID. +-- +-- /See:/ for @DfareportingOperatingSystemVersionsGet@. +module DFAReporting.OperatingSystemVersions.Get + ( + -- * REST Resource + OperatingSystemVersionsGetAPI + + -- * Creating a Request + , operatingSystemVersionsGet + , OperatingSystemVersionsGet + + -- * Request Lenses + , osvgQuotaUser + , osvgPrettyPrint + , osvgUserIp + , osvgProfileId + , osvgKey + , osvgId + , osvgOauthToken + , osvgFields + , osvgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOperatingSystemVersionsGet@ which the +-- 'OperatingSystemVersionsGet' request conforms to. +type OperatingSystemVersionsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "operatingSystemVersions" :> + Capture "id" Int64 :> + Get '[JSON] OperatingSystemVersion + +-- | Gets one operating system version by ID. +-- +-- /See:/ 'operatingSystemVersionsGet' smart constructor. +data OperatingSystemVersionsGet = OperatingSystemVersionsGet + { _osvgQuotaUser :: !(Maybe Text) + , _osvgPrettyPrint :: !Bool + , _osvgUserIp :: !(Maybe Text) + , _osvgProfileId :: !Int64 + , _osvgKey :: !(Maybe Text) + , _osvgId :: !Int64 + , _osvgOauthToken :: !(Maybe Text) + , _osvgFields :: !(Maybe Text) + , _osvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemVersionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osvgQuotaUser' +-- +-- * 'osvgPrettyPrint' +-- +-- * 'osvgUserIp' +-- +-- * 'osvgProfileId' +-- +-- * 'osvgKey' +-- +-- * 'osvgId' +-- +-- * 'osvgOauthToken' +-- +-- * 'osvgFields' +-- +-- * 'osvgAlt' +operatingSystemVersionsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> OperatingSystemVersionsGet +operatingSystemVersionsGet pOsvgProfileId_ pOsvgId_ = + OperatingSystemVersionsGet + { _osvgQuotaUser = Nothing + , _osvgPrettyPrint = True + , _osvgUserIp = Nothing + , _osvgProfileId = pOsvgProfileId_ + , _osvgKey = Nothing + , _osvgId = pOsvgId_ + , _osvgOauthToken = Nothing + , _osvgFields = Nothing + , _osvgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +osvgQuotaUser :: Lens' OperatingSystemVersionsGet' (Maybe Text) +osvgQuotaUser + = lens _osvgQuotaUser + (\ s a -> s{_osvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +osvgPrettyPrint :: Lens' OperatingSystemVersionsGet' Bool +osvgPrettyPrint + = lens _osvgPrettyPrint + (\ s a -> s{_osvgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +osvgUserIp :: Lens' OperatingSystemVersionsGet' (Maybe Text) +osvgUserIp + = lens _osvgUserIp (\ s a -> s{_osvgUserIp = a}) + +-- | User profile ID associated with this request. +osvgProfileId :: Lens' OperatingSystemVersionsGet' Int64 +osvgProfileId + = lens _osvgProfileId + (\ s a -> s{_osvgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +osvgKey :: Lens' OperatingSystemVersionsGet' (Maybe Text) +osvgKey = lens _osvgKey (\ s a -> s{_osvgKey = a}) + +-- | Operating system version ID. +osvgId :: Lens' OperatingSystemVersionsGet' Int64 +osvgId = lens _osvgId (\ s a -> s{_osvgId = a}) + +-- | OAuth 2.0 token for the current user. +osvgOauthToken :: Lens' OperatingSystemVersionsGet' (Maybe Text) +osvgOauthToken + = lens _osvgOauthToken + (\ s a -> s{_osvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +osvgFields :: Lens' OperatingSystemVersionsGet' (Maybe Text) +osvgFields + = lens _osvgFields (\ s a -> s{_osvgFields = a}) + +-- | Data format for the response. +osvgAlt :: Lens' OperatingSystemVersionsGet' Text +osvgAlt = lens _osvgAlt (\ s a -> s{_osvgAlt = a}) + +instance GoogleRequest OperatingSystemVersionsGet' + where + type Rs OperatingSystemVersionsGet' = + OperatingSystemVersion + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OperatingSystemVersionsGet{..} + = go _osvgQuotaUser _osvgPrettyPrint _osvgUserIp + _osvgProfileId + _osvgKey + _osvgId + _osvgOauthToken + _osvgFields + _osvgAlt + where go + = clientWithRoute + (Proxy :: Proxy OperatingSystemVersionsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/List.hs new file mode 100644 index 000000000..4b0731b2f --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystemVersions/List.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OperatingSystemVersions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of operating system versions. +-- +-- /See:/ for @DfareportingOperatingSystemVersionsList@. +module DFAReporting.OperatingSystemVersions.List + ( + -- * REST Resource + OperatingSystemVersionsListAPI + + -- * Creating a Request + , operatingSystemVersionsList + , OperatingSystemVersionsList + + -- * Request Lenses + , osvlQuotaUser + , osvlPrettyPrint + , osvlUserIp + , osvlProfileId + , osvlKey + , osvlOauthToken + , osvlFields + , osvlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOperatingSystemVersionsList@ which the +-- 'OperatingSystemVersionsList' request conforms to. +type OperatingSystemVersionsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "operatingSystemVersions" :> + Get '[JSON] OperatingSystemVersionsListResponse + +-- | Retrieves a list of operating system versions. +-- +-- /See:/ 'operatingSystemVersionsList' smart constructor. +data OperatingSystemVersionsList = OperatingSystemVersionsList + { _osvlQuotaUser :: !(Maybe Text) + , _osvlPrettyPrint :: !Bool + , _osvlUserIp :: !(Maybe Text) + , _osvlProfileId :: !Int64 + , _osvlKey :: !(Maybe Text) + , _osvlOauthToken :: !(Maybe Text) + , _osvlFields :: !(Maybe Text) + , _osvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemVersionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osvlQuotaUser' +-- +-- * 'osvlPrettyPrint' +-- +-- * 'osvlUserIp' +-- +-- * 'osvlProfileId' +-- +-- * 'osvlKey' +-- +-- * 'osvlOauthToken' +-- +-- * 'osvlFields' +-- +-- * 'osvlAlt' +operatingSystemVersionsList + :: Int64 -- ^ 'profileId' + -> OperatingSystemVersionsList +operatingSystemVersionsList pOsvlProfileId_ = + OperatingSystemVersionsList + { _osvlQuotaUser = Nothing + , _osvlPrettyPrint = True + , _osvlUserIp = Nothing + , _osvlProfileId = pOsvlProfileId_ + , _osvlKey = Nothing + , _osvlOauthToken = Nothing + , _osvlFields = Nothing + , _osvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +osvlQuotaUser :: Lens' OperatingSystemVersionsList' (Maybe Text) +osvlQuotaUser + = lens _osvlQuotaUser + (\ s a -> s{_osvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +osvlPrettyPrint :: Lens' OperatingSystemVersionsList' Bool +osvlPrettyPrint + = lens _osvlPrettyPrint + (\ s a -> s{_osvlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +osvlUserIp :: Lens' OperatingSystemVersionsList' (Maybe Text) +osvlUserIp + = lens _osvlUserIp (\ s a -> s{_osvlUserIp = a}) + +-- | User profile ID associated with this request. +osvlProfileId :: Lens' OperatingSystemVersionsList' Int64 +osvlProfileId + = lens _osvlProfileId + (\ s a -> s{_osvlProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +osvlKey :: Lens' OperatingSystemVersionsList' (Maybe Text) +osvlKey = lens _osvlKey (\ s a -> s{_osvlKey = a}) + +-- | OAuth 2.0 token for the current user. +osvlOauthToken :: Lens' OperatingSystemVersionsList' (Maybe Text) +osvlOauthToken + = lens _osvlOauthToken + (\ s a -> s{_osvlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +osvlFields :: Lens' OperatingSystemVersionsList' (Maybe Text) +osvlFields + = lens _osvlFields (\ s a -> s{_osvlFields = a}) + +-- | Data format for the response. +osvlAlt :: Lens' OperatingSystemVersionsList' Text +osvlAlt = lens _osvlAlt (\ s a -> s{_osvlAlt = a}) + +instance GoogleRequest OperatingSystemVersionsList' + where + type Rs OperatingSystemVersionsList' = + OperatingSystemVersionsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OperatingSystemVersionsList{..} + = go _osvlQuotaUser _osvlPrettyPrint _osvlUserIp + _osvlProfileId + _osvlKey + _osvlOauthToken + _osvlFields + _osvlAlt + where go + = clientWithRoute + (Proxy :: Proxy OperatingSystemVersionsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/Get.hs new file mode 100644 index 000000000..dbb6a7580 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OperatingSystems.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one operating system by DART ID. +-- +-- /See:/ for @DfareportingOperatingSystemsGet@. +module DFAReporting.OperatingSystems.Get + ( + -- * REST Resource + OperatingSystemsGetAPI + + -- * Creating a Request + , operatingSystemsGet + , OperatingSystemsGet + + -- * Request Lenses + , osgQuotaUser + , osgPrettyPrint + , osgUserIp + , osgProfileId + , osgKey + , osgOauthToken + , osgDartId + , osgFields + , osgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOperatingSystemsGet@ which the +-- 'OperatingSystemsGet' request conforms to. +type OperatingSystemsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "operatingSystems" :> + Capture "dartId" Int64 :> Get '[JSON] OperatingSystem + +-- | Gets one operating system by DART ID. +-- +-- /See:/ 'operatingSystemsGet' smart constructor. +data OperatingSystemsGet = OperatingSystemsGet + { _osgQuotaUser :: !(Maybe Text) + , _osgPrettyPrint :: !Bool + , _osgUserIp :: !(Maybe Text) + , _osgProfileId :: !Int64 + , _osgKey :: !(Maybe Text) + , _osgOauthToken :: !(Maybe Text) + , _osgDartId :: !Int64 + , _osgFields :: !(Maybe Text) + , _osgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osgQuotaUser' +-- +-- * 'osgPrettyPrint' +-- +-- * 'osgUserIp' +-- +-- * 'osgProfileId' +-- +-- * 'osgKey' +-- +-- * 'osgOauthToken' +-- +-- * 'osgDartId' +-- +-- * 'osgFields' +-- +-- * 'osgAlt' +operatingSystemsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'dartId' + -> OperatingSystemsGet +operatingSystemsGet pOsgProfileId_ pOsgDartId_ = + OperatingSystemsGet + { _osgQuotaUser = Nothing + , _osgPrettyPrint = True + , _osgUserIp = Nothing + , _osgProfileId = pOsgProfileId_ + , _osgKey = Nothing + , _osgOauthToken = Nothing + , _osgDartId = pOsgDartId_ + , _osgFields = Nothing + , _osgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +osgQuotaUser :: Lens' OperatingSystemsGet' (Maybe Text) +osgQuotaUser + = lens _osgQuotaUser (\ s a -> s{_osgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +osgPrettyPrint :: Lens' OperatingSystemsGet' Bool +osgPrettyPrint + = lens _osgPrettyPrint + (\ s a -> s{_osgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +osgUserIp :: Lens' OperatingSystemsGet' (Maybe Text) +osgUserIp + = lens _osgUserIp (\ s a -> s{_osgUserIp = a}) + +-- | User profile ID associated with this request. +osgProfileId :: Lens' OperatingSystemsGet' Int64 +osgProfileId + = lens _osgProfileId (\ s a -> s{_osgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +osgKey :: Lens' OperatingSystemsGet' (Maybe Text) +osgKey = lens _osgKey (\ s a -> s{_osgKey = a}) + +-- | OAuth 2.0 token for the current user. +osgOauthToken :: Lens' OperatingSystemsGet' (Maybe Text) +osgOauthToken + = lens _osgOauthToken + (\ s a -> s{_osgOauthToken = a}) + +-- | Operating system DART ID. +osgDartId :: Lens' OperatingSystemsGet' Int64 +osgDartId + = lens _osgDartId (\ s a -> s{_osgDartId = a}) + +-- | Selector specifying which fields to include in a partial response. +osgFields :: Lens' OperatingSystemsGet' (Maybe Text) +osgFields + = lens _osgFields (\ s a -> s{_osgFields = a}) + +-- | Data format for the response. +osgAlt :: Lens' OperatingSystemsGet' Text +osgAlt = lens _osgAlt (\ s a -> s{_osgAlt = a}) + +instance GoogleRequest OperatingSystemsGet' where + type Rs OperatingSystemsGet' = OperatingSystem + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OperatingSystemsGet{..} + = go _osgQuotaUser _osgPrettyPrint _osgUserIp + _osgProfileId + _osgKey + _osgOauthToken + _osgDartId + _osgFields + _osgAlt + where go + = clientWithRoute + (Proxy :: Proxy OperatingSystemsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/List.hs new file mode 100644 index 000000000..e35100fdd --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OperatingSystems/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OperatingSystems.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of operating systems. +-- +-- /See:/ for @DfareportingOperatingSystemsList@. +module DFAReporting.OperatingSystems.List + ( + -- * REST Resource + OperatingSystemsListAPI + + -- * Creating a Request + , operatingSystemsList + , OperatingSystemsList + + -- * Request Lenses + , oslQuotaUser + , oslPrettyPrint + , oslUserIp + , oslProfileId + , oslKey + , oslOauthToken + , oslFields + , oslAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOperatingSystemsList@ which the +-- 'OperatingSystemsList' request conforms to. +type OperatingSystemsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "operatingSystems" :> + Get '[JSON] OperatingSystemsListResponse + +-- | Retrieves a list of operating systems. +-- +-- /See:/ 'operatingSystemsList' smart constructor. +data OperatingSystemsList = OperatingSystemsList + { _oslQuotaUser :: !(Maybe Text) + , _oslPrettyPrint :: !Bool + , _oslUserIp :: !(Maybe Text) + , _oslProfileId :: !Int64 + , _oslKey :: !(Maybe Text) + , _oslOauthToken :: !(Maybe Text) + , _oslFields :: !(Maybe Text) + , _oslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperatingSystemsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslQuotaUser' +-- +-- * 'oslPrettyPrint' +-- +-- * 'oslUserIp' +-- +-- * 'oslProfileId' +-- +-- * 'oslKey' +-- +-- * 'oslOauthToken' +-- +-- * 'oslFields' +-- +-- * 'oslAlt' +operatingSystemsList + :: Int64 -- ^ 'profileId' + -> OperatingSystemsList +operatingSystemsList pOslProfileId_ = + OperatingSystemsList + { _oslQuotaUser = Nothing + , _oslPrettyPrint = True + , _oslUserIp = Nothing + , _oslProfileId = pOslProfileId_ + , _oslKey = Nothing + , _oslOauthToken = Nothing + , _oslFields = Nothing + , _oslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oslQuotaUser :: Lens' OperatingSystemsList' (Maybe Text) +oslQuotaUser + = lens _oslQuotaUser (\ s a -> s{_oslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oslPrettyPrint :: Lens' OperatingSystemsList' Bool +oslPrettyPrint + = lens _oslPrettyPrint + (\ s a -> s{_oslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oslUserIp :: Lens' OperatingSystemsList' (Maybe Text) +oslUserIp + = lens _oslUserIp (\ s a -> s{_oslUserIp = a}) + +-- | User profile ID associated with this request. +oslProfileId :: Lens' OperatingSystemsList' Int64 +oslProfileId + = lens _oslProfileId (\ s a -> s{_oslProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oslKey :: Lens' OperatingSystemsList' (Maybe Text) +oslKey = lens _oslKey (\ s a -> s{_oslKey = a}) + +-- | OAuth 2.0 token for the current user. +oslOauthToken :: Lens' OperatingSystemsList' (Maybe Text) +oslOauthToken + = lens _oslOauthToken + (\ s a -> s{_oslOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oslFields :: Lens' OperatingSystemsList' (Maybe Text) +oslFields + = lens _oslFields (\ s a -> s{_oslFields = a}) + +-- | Data format for the response. +oslAlt :: Lens' OperatingSystemsList' Text +oslAlt = lens _oslAlt (\ s a -> s{_oslAlt = a}) + +instance GoogleRequest OperatingSystemsList' where + type Rs OperatingSystemsList' = + OperatingSystemsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OperatingSystemsList{..} + = go _oslQuotaUser _oslPrettyPrint _oslUserIp + _oslProfileId + _oslKey + _oslOauthToken + _oslFields + _oslAlt + where go + = clientWithRoute + (Proxy :: Proxy OperatingSystemsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/Get.hs new file mode 100644 index 000000000..e26905541 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OrderDocuments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one order document by ID. +-- +-- /See:/ for @DfareportingOrderDocumentsGet@. +module DFAReporting.OrderDocuments.Get + ( + -- * REST Resource + OrderDocumentsGetAPI + + -- * Creating a Request + , orderDocumentsGet + , OrderDocumentsGet + + -- * Request Lenses + , odgQuotaUser + , odgPrettyPrint + , odgUserIp + , odgProfileId + , odgKey + , odgId + , odgProjectId + , odgOauthToken + , odgFields + , odgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOrderDocumentsGet@ which the +-- 'OrderDocumentsGet' request conforms to. +type OrderDocumentsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "orderDocuments" :> + Capture "id" Int64 :> Get '[JSON] OrderDocument + +-- | Gets one order document by ID. +-- +-- /See:/ 'orderDocumentsGet' smart constructor. +data OrderDocumentsGet = OrderDocumentsGet + { _odgQuotaUser :: !(Maybe Text) + , _odgPrettyPrint :: !Bool + , _odgUserIp :: !(Maybe Text) + , _odgProfileId :: !Int64 + , _odgKey :: !(Maybe Text) + , _odgId :: !Int64 + , _odgProjectId :: !Int64 + , _odgOauthToken :: !(Maybe Text) + , _odgFields :: !(Maybe Text) + , _odgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderDocumentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odgQuotaUser' +-- +-- * 'odgPrettyPrint' +-- +-- * 'odgUserIp' +-- +-- * 'odgProfileId' +-- +-- * 'odgKey' +-- +-- * 'odgId' +-- +-- * 'odgProjectId' +-- +-- * 'odgOauthToken' +-- +-- * 'odgFields' +-- +-- * 'odgAlt' +orderDocumentsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> Int64 -- ^ 'projectId' + -> OrderDocumentsGet +orderDocumentsGet pOdgProfileId_ pOdgId_ pOdgProjectId_ = + OrderDocumentsGet + { _odgQuotaUser = Nothing + , _odgPrettyPrint = True + , _odgUserIp = Nothing + , _odgProfileId = pOdgProfileId_ + , _odgKey = Nothing + , _odgId = pOdgId_ + , _odgProjectId = pOdgProjectId_ + , _odgOauthToken = Nothing + , _odgFields = Nothing + , _odgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +odgQuotaUser :: Lens' OrderDocumentsGet' (Maybe Text) +odgQuotaUser + = lens _odgQuotaUser (\ s a -> s{_odgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +odgPrettyPrint :: Lens' OrderDocumentsGet' Bool +odgPrettyPrint + = lens _odgPrettyPrint + (\ s a -> s{_odgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +odgUserIp :: Lens' OrderDocumentsGet' (Maybe Text) +odgUserIp + = lens _odgUserIp (\ s a -> s{_odgUserIp = a}) + +-- | User profile ID associated with this request. +odgProfileId :: Lens' OrderDocumentsGet' Int64 +odgProfileId + = lens _odgProfileId (\ s a -> s{_odgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +odgKey :: Lens' OrderDocumentsGet' (Maybe Text) +odgKey = lens _odgKey (\ s a -> s{_odgKey = a}) + +-- | Order document ID. +odgId :: Lens' OrderDocumentsGet' Int64 +odgId = lens _odgId (\ s a -> s{_odgId = a}) + +-- | Project ID for order documents. +odgProjectId :: Lens' OrderDocumentsGet' Int64 +odgProjectId + = lens _odgProjectId (\ s a -> s{_odgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +odgOauthToken :: Lens' OrderDocumentsGet' (Maybe Text) +odgOauthToken + = lens _odgOauthToken + (\ s a -> s{_odgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +odgFields :: Lens' OrderDocumentsGet' (Maybe Text) +odgFields + = lens _odgFields (\ s a -> s{_odgFields = a}) + +-- | Data format for the response. +odgAlt :: Lens' OrderDocumentsGet' Text +odgAlt = lens _odgAlt (\ s a -> s{_odgAlt = a}) + +instance GoogleRequest OrderDocumentsGet' where + type Rs OrderDocumentsGet' = OrderDocument + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OrderDocumentsGet{..} + = go _odgQuotaUser _odgPrettyPrint _odgUserIp + _odgProfileId + _odgKey + _odgId + _odgProjectId + _odgOauthToken + _odgFields + _odgAlt + where go + = clientWithRoute + (Proxy :: Proxy OrderDocumentsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/List.hs new file mode 100644 index 000000000..e91237f7d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/OrderDocuments/List.hs @@ -0,0 +1,292 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.OrderDocuments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of order documents, possibly filtered. +-- +-- /See:/ for @DfareportingOrderDocumentsList@. +module DFAReporting.OrderDocuments.List + ( + -- * REST Resource + OrderDocumentsListAPI + + -- * Creating a Request + , orderDocumentsList + , OrderDocumentsList + + -- * Request Lenses + , odlQuotaUser + , odlPrettyPrint + , odlUserIp + , odlSearchString + , odlIds + , odlProfileId + , odlSortOrder + , odlKey + , odlPageToken + , odlProjectId + , odlSortField + , odlOauthToken + , odlOrderId + , odlApproved + , odlSiteId + , odlMaxResults + , odlFields + , odlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOrderDocumentsList@ which the +-- 'OrderDocumentsList' request conforms to. +type OrderDocumentsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "orderDocuments" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "orderId" Int64 :> + QueryParam "approved" Bool :> + QueryParams "siteId" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] OrderDocumentsListResponse + +-- | Retrieves a list of order documents, possibly filtered. +-- +-- /See:/ 'orderDocumentsList' smart constructor. +data OrderDocumentsList = OrderDocumentsList + { _odlQuotaUser :: !(Maybe Text) + , _odlPrettyPrint :: !Bool + , _odlUserIp :: !(Maybe Text) + , _odlSearchString :: !(Maybe Text) + , _odlIds :: !(Maybe Int64) + , _odlProfileId :: !Int64 + , _odlSortOrder :: !(Maybe Text) + , _odlKey :: !(Maybe Text) + , _odlPageToken :: !(Maybe Text) + , _odlProjectId :: !Int64 + , _odlSortField :: !(Maybe Text) + , _odlOauthToken :: !(Maybe Text) + , _odlOrderId :: !(Maybe Int64) + , _odlApproved :: !(Maybe Bool) + , _odlSiteId :: !(Maybe Int64) + , _odlMaxResults :: !(Maybe Int32) + , _odlFields :: !(Maybe Text) + , _odlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderDocumentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odlQuotaUser' +-- +-- * 'odlPrettyPrint' +-- +-- * 'odlUserIp' +-- +-- * 'odlSearchString' +-- +-- * 'odlIds' +-- +-- * 'odlProfileId' +-- +-- * 'odlSortOrder' +-- +-- * 'odlKey' +-- +-- * 'odlPageToken' +-- +-- * 'odlProjectId' +-- +-- * 'odlSortField' +-- +-- * 'odlOauthToken' +-- +-- * 'odlOrderId' +-- +-- * 'odlApproved' +-- +-- * 'odlSiteId' +-- +-- * 'odlMaxResults' +-- +-- * 'odlFields' +-- +-- * 'odlAlt' +orderDocumentsList + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'projectId' + -> OrderDocumentsList +orderDocumentsList pOdlProfileId_ pOdlProjectId_ = + OrderDocumentsList + { _odlQuotaUser = Nothing + , _odlPrettyPrint = True + , _odlUserIp = Nothing + , _odlSearchString = Nothing + , _odlIds = Nothing + , _odlProfileId = pOdlProfileId_ + , _odlSortOrder = Nothing + , _odlKey = Nothing + , _odlPageToken = Nothing + , _odlProjectId = pOdlProjectId_ + , _odlSortField = Nothing + , _odlOauthToken = Nothing + , _odlOrderId = Nothing + , _odlApproved = Nothing + , _odlSiteId = Nothing + , _odlMaxResults = Nothing + , _odlFields = Nothing + , _odlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +odlQuotaUser :: Lens' OrderDocumentsList' (Maybe Text) +odlQuotaUser + = lens _odlQuotaUser (\ s a -> s{_odlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +odlPrettyPrint :: Lens' OrderDocumentsList' Bool +odlPrettyPrint + = lens _odlPrettyPrint + (\ s a -> s{_odlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +odlUserIp :: Lens' OrderDocumentsList' (Maybe Text) +odlUserIp + = lens _odlUserIp (\ s a -> s{_odlUserIp = a}) + +-- | Allows searching for order documents by name or ID. Wildcards (*) are +-- allowed. For example, \"orderdocument*2015\" will return order documents +-- with names like \"orderdocument June 2015\", \"orderdocument April +-- 2015\", or simply \"orderdocument 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"orderdocument\" will match order documents +-- with name \"my orderdocument\", \"orderdocument 2015\", or simply +-- \"orderdocument\". +odlSearchString :: Lens' OrderDocumentsList' (Maybe Text) +odlSearchString + = lens _odlSearchString + (\ s a -> s{_odlSearchString = a}) + +-- | Select only order documents with these IDs. +odlIds :: Lens' OrderDocumentsList' (Maybe Int64) +odlIds = lens _odlIds (\ s a -> s{_odlIds = a}) + +-- | User profile ID associated with this request. +odlProfileId :: Lens' OrderDocumentsList' Int64 +odlProfileId + = lens _odlProfileId (\ s a -> s{_odlProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +odlSortOrder :: Lens' OrderDocumentsList' (Maybe Text) +odlSortOrder + = lens _odlSortOrder (\ s a -> s{_odlSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +odlKey :: Lens' OrderDocumentsList' (Maybe Text) +odlKey = lens _odlKey (\ s a -> s{_odlKey = a}) + +-- | Value of the nextPageToken from the previous result page. +odlPageToken :: Lens' OrderDocumentsList' (Maybe Text) +odlPageToken + = lens _odlPageToken (\ s a -> s{_odlPageToken = a}) + +-- | Project ID for order documents. +odlProjectId :: Lens' OrderDocumentsList' Int64 +odlProjectId + = lens _odlProjectId (\ s a -> s{_odlProjectId = a}) + +-- | Field by which to sort the list. +odlSortField :: Lens' OrderDocumentsList' (Maybe Text) +odlSortField + = lens _odlSortField (\ s a -> s{_odlSortField = a}) + +-- | OAuth 2.0 token for the current user. +odlOauthToken :: Lens' OrderDocumentsList' (Maybe Text) +odlOauthToken + = lens _odlOauthToken + (\ s a -> s{_odlOauthToken = a}) + +-- | Select only order documents for specified orders. +odlOrderId :: Lens' OrderDocumentsList' (Maybe Int64) +odlOrderId + = lens _odlOrderId (\ s a -> s{_odlOrderId = a}) + +-- | Select only order documents that have been approved by at least one +-- user. +odlApproved :: Lens' OrderDocumentsList' (Maybe Bool) +odlApproved + = lens _odlApproved (\ s a -> s{_odlApproved = a}) + +-- | Select only order documents that are associated with these sites. +odlSiteId :: Lens' OrderDocumentsList' (Maybe Int64) +odlSiteId + = lens _odlSiteId (\ s a -> s{_odlSiteId = a}) + +-- | Maximum number of results to return. +odlMaxResults :: Lens' OrderDocumentsList' (Maybe Int32) +odlMaxResults + = lens _odlMaxResults + (\ s a -> s{_odlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +odlFields :: Lens' OrderDocumentsList' (Maybe Text) +odlFields + = lens _odlFields (\ s a -> s{_odlFields = a}) + +-- | Data format for the response. +odlAlt :: Lens' OrderDocumentsList' Text +odlAlt = lens _odlAlt (\ s a -> s{_odlAlt = a}) + +instance GoogleRequest OrderDocumentsList' where + type Rs OrderDocumentsList' = + OrderDocumentsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OrderDocumentsList{..} + = go _odlQuotaUser _odlPrettyPrint _odlUserIp + _odlSearchString + _odlIds + _odlProfileId + _odlSortOrder + _odlKey + _odlPageToken + _odlProjectId + _odlSortField + _odlOauthToken + _odlOrderId + _odlApproved + _odlSiteId + _odlMaxResults + _odlFields + _odlAlt + where go + = clientWithRoute + (Proxy :: Proxy OrderDocumentsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/Get.hs new file mode 100644 index 000000000..9653968f1 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/Get.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Orders.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one order by ID. +-- +-- /See:/ for @DfareportingOrdersGet@. +module DFAReporting.Orders.Get + ( + -- * REST Resource + OrdersGetAPI + + -- * Creating a Request + , ordersGet + , OrdersGet + + -- * Request Lenses + , ogQuotaUser + , ogPrettyPrint + , ogUserIp + , ogProfileId + , ogKey + , ogId + , ogProjectId + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOrdersGet@ which the +-- 'OrdersGet' request conforms to. +type OrdersGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "orders" :> Capture "id" Int64 :> Get '[JSON] Order + +-- | Gets one order by ID. +-- +-- /See:/ 'ordersGet' smart constructor. +data OrdersGet = OrdersGet + { _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogUserIp :: !(Maybe Text) + , _ogProfileId :: !Int64 + , _ogKey :: !(Maybe Text) + , _ogId :: !Int64 + , _ogProjectId :: !Int64 + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogUserIp' +-- +-- * 'ogProfileId' +-- +-- * 'ogKey' +-- +-- * 'ogId' +-- +-- * 'ogProjectId' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +ordersGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> Int64 -- ^ 'projectId' + -> OrdersGet +ordersGet pOgProfileId_ pOgId_ pOgProjectId_ = + OrdersGet + { _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogUserIp = Nothing + , _ogProfileId = pOgProfileId_ + , _ogKey = Nothing + , _ogId = pOgId_ + , _ogProjectId = pOgProjectId_ + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OrdersGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OrdersGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OrdersGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | User profile ID associated with this request. +ogProfileId :: Lens' OrdersGet' Int64 +ogProfileId + = lens _ogProfileId (\ s a -> s{_ogProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OrdersGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | Order ID. +ogId :: Lens' OrdersGet' Int64 +ogId = lens _ogId (\ s a -> s{_ogId = a}) + +-- | Project ID for orders. +ogProjectId :: Lens' OrdersGet' Int64 +ogProjectId + = lens _ogProjectId (\ s a -> s{_ogProjectId = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OrdersGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OrdersGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OrdersGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OrdersGet' where + type Rs OrdersGet' = Order + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OrdersGet{..} + = go _ogQuotaUser _ogPrettyPrint _ogUserIp + _ogProfileId + _ogKey + _ogId + _ogProjectId + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/List.hs new file mode 100644 index 000000000..c3fcb3967 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Orders/List.hs @@ -0,0 +1,256 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Orders.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of orders, possibly filtered. +-- +-- /See:/ for @DfareportingOrdersList@. +module DFAReporting.Orders.List + ( + -- * REST Resource + OrdersListAPI + + -- * Creating a Request + , ordersList + , OrdersList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olUserIp + , olSearchString + , olIds + , olProfileId + , olSortOrder + , olKey + , olPageToken + , olProjectId + , olSortField + , olOauthToken + , olSiteId + , olMaxResults + , olFields + , olAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingOrdersList@ which the +-- 'OrdersList' request conforms to. +type OrdersListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "projectId" Int64 :> + "orders" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "siteId" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] OrdersListResponse + +-- | Retrieves a list of orders, possibly filtered. +-- +-- /See:/ 'ordersList' smart constructor. +data OrdersList = OrdersList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olUserIp :: !(Maybe Text) + , _olSearchString :: !(Maybe Text) + , _olIds :: !(Maybe Int64) + , _olProfileId :: !Int64 + , _olSortOrder :: !(Maybe Text) + , _olKey :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olProjectId :: !Int64 + , _olSortField :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olSiteId :: !(Maybe Int64) + , _olMaxResults :: !(Maybe Int32) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olUserIp' +-- +-- * 'olSearchString' +-- +-- * 'olIds' +-- +-- * 'olProfileId' +-- +-- * 'olSortOrder' +-- +-- * 'olKey' +-- +-- * 'olPageToken' +-- +-- * 'olProjectId' +-- +-- * 'olSortField' +-- +-- * 'olOauthToken' +-- +-- * 'olSiteId' +-- +-- * 'olMaxResults' +-- +-- * 'olFields' +-- +-- * 'olAlt' +ordersList + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'projectId' + -> OrdersList +ordersList pOlProfileId_ pOlProjectId_ = + OrdersList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olUserIp = Nothing + , _olSearchString = Nothing + , _olIds = Nothing + , _olProfileId = pOlProfileId_ + , _olSortOrder = Nothing + , _olKey = Nothing + , _olPageToken = Nothing + , _olProjectId = pOlProjectId_ + , _olSortField = Nothing + , _olOauthToken = Nothing + , _olSiteId = Nothing + , _olMaxResults = Nothing + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OrdersList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OrdersList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OrdersList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | Allows searching for orders by name or ID. Wildcards (*) are allowed. +-- For example, \"order*2015\" will return orders with names like \"order +-- June 2015\", \"order April 2015\", or simply \"order 2015\". Most of the +-- searches also add wildcards implicitly at the start and the end of the +-- search string. For example, a search string of \"order\" will match +-- orders with name \"my order\", \"order 2015\", or simply \"order\". +olSearchString :: Lens' OrdersList' (Maybe Text) +olSearchString + = lens _olSearchString + (\ s a -> s{_olSearchString = a}) + +-- | Select only orders with these IDs. +olIds :: Lens' OrdersList' (Maybe Int64) +olIds = lens _olIds (\ s a -> s{_olIds = a}) + +-- | User profile ID associated with this request. +olProfileId :: Lens' OrdersList' Int64 +olProfileId + = lens _olProfileId (\ s a -> s{_olProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +olSortOrder :: Lens' OrdersList' (Maybe Text) +olSortOrder + = lens _olSortOrder (\ s a -> s{_olSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OrdersList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | Value of the nextPageToken from the previous result page. +olPageToken :: Lens' OrdersList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | Project ID for orders. +olProjectId :: Lens' OrdersList' Int64 +olProjectId + = lens _olProjectId (\ s a -> s{_olProjectId = a}) + +-- | Field by which to sort the list. +olSortField :: Lens' OrdersList' (Maybe Text) +olSortField + = lens _olSortField (\ s a -> s{_olSortField = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OrdersList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Select only orders that are associated with these site IDs. +olSiteId :: Lens' OrdersList' (Maybe Int64) +olSiteId = lens _olSiteId (\ s a -> s{_olSiteId = a}) + +-- | Maximum number of results to return. +olMaxResults :: Lens' OrdersList' (Maybe Int32) +olMaxResults + = lens _olMaxResults (\ s a -> s{_olMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OrdersList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OrdersList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OrdersList' where + type Rs OrdersList' = OrdersListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u OrdersList{..} + = go _olQuotaUser _olPrettyPrint _olUserIp + _olSearchString + _olIds + _olProfileId + _olSortOrder + _olKey + _olPageToken + _olProjectId + _olSortField + _olOauthToken + _olSiteId + _olMaxResults + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Get.hs new file mode 100644 index 000000000..57bb49b06 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one placement group by ID. +-- +-- /See:/ for @DfareportingPlacementGroupsGet@. +module DFAReporting.PlacementGroups.Get + ( + -- * REST Resource + PlacementGroupsGetAPI + + -- * Creating a Request + , placementGroupsGet + , PlacementGroupsGet + + -- * Request Lenses + , pgggQuotaUser + , pgggPrettyPrint + , pgggUserIp + , pgggProfileId + , pgggKey + , pgggId + , pgggOauthToken + , pgggFields + , pgggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementGroupsGet@ which the +-- 'PlacementGroupsGet' request conforms to. +type PlacementGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementGroups" :> + Capture "id" Int64 :> Get '[JSON] PlacementGroup + +-- | Gets one placement group by ID. +-- +-- /See:/ 'placementGroupsGet' smart constructor. +data PlacementGroupsGet = PlacementGroupsGet + { _pgggQuotaUser :: !(Maybe Text) + , _pgggPrettyPrint :: !Bool + , _pgggUserIp :: !(Maybe Text) + , _pgggProfileId :: !Int64 + , _pgggKey :: !(Maybe Text) + , _pgggId :: !Int64 + , _pgggOauthToken :: !(Maybe Text) + , _pgggFields :: !(Maybe Text) + , _pgggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgggQuotaUser' +-- +-- * 'pgggPrettyPrint' +-- +-- * 'pgggUserIp' +-- +-- * 'pgggProfileId' +-- +-- * 'pgggKey' +-- +-- * 'pgggId' +-- +-- * 'pgggOauthToken' +-- +-- * 'pgggFields' +-- +-- * 'pgggAlt' +placementGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementGroupsGet +placementGroupsGet pPgggProfileId_ pPgggId_ = + PlacementGroupsGet + { _pgggQuotaUser = Nothing + , _pgggPrettyPrint = True + , _pgggUserIp = Nothing + , _pgggProfileId = pPgggProfileId_ + , _pgggKey = Nothing + , _pgggId = pPgggId_ + , _pgggOauthToken = Nothing + , _pgggFields = Nothing + , _pgggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgggQuotaUser :: Lens' PlacementGroupsGet' (Maybe Text) +pgggQuotaUser + = lens _pgggQuotaUser + (\ s a -> s{_pgggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgggPrettyPrint :: Lens' PlacementGroupsGet' Bool +pgggPrettyPrint + = lens _pgggPrettyPrint + (\ s a -> s{_pgggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgggUserIp :: Lens' PlacementGroupsGet' (Maybe Text) +pgggUserIp + = lens _pgggUserIp (\ s a -> s{_pgggUserIp = a}) + +-- | User profile ID associated with this request. +pgggProfileId :: Lens' PlacementGroupsGet' Int64 +pgggProfileId + = lens _pgggProfileId + (\ s a -> s{_pgggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgggKey :: Lens' PlacementGroupsGet' (Maybe Text) +pgggKey = lens _pgggKey (\ s a -> s{_pgggKey = a}) + +-- | Placement group ID. +pgggId :: Lens' PlacementGroupsGet' Int64 +pgggId = lens _pgggId (\ s a -> s{_pgggId = a}) + +-- | OAuth 2.0 token for the current user. +pgggOauthToken :: Lens' PlacementGroupsGet' (Maybe Text) +pgggOauthToken + = lens _pgggOauthToken + (\ s a -> s{_pgggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgggFields :: Lens' PlacementGroupsGet' (Maybe Text) +pgggFields + = lens _pgggFields (\ s a -> s{_pgggFields = a}) + +-- | Data format for the response. +pgggAlt :: Lens' PlacementGroupsGet' Text +pgggAlt = lens _pgggAlt (\ s a -> s{_pgggAlt = a}) + +instance GoogleRequest PlacementGroupsGet' where + type Rs PlacementGroupsGet' = PlacementGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementGroupsGet{..} + = go _pgggQuotaUser _pgggPrettyPrint _pgggUserIp + _pgggProfileId + _pgggKey + _pgggId + _pgggOauthToken + _pgggFields + _pgggAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Insert.hs new file mode 100644 index 000000000..6b66769cb --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementGroups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new placement group. +-- +-- /See:/ for @DfareportingPlacementGroupsInsert@. +module DFAReporting.PlacementGroups.Insert + ( + -- * REST Resource + PlacementGroupsInsertAPI + + -- * Creating a Request + , placementGroupsInsert + , PlacementGroupsInsert + + -- * Request Lenses + , pgiQuotaUser + , pgiPrettyPrint + , pgiUserIp + , pgiProfileId + , pgiKey + , pgiOauthToken + , pgiFields + , pgiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementGroupsInsert@ which the +-- 'PlacementGroupsInsert' request conforms to. +type PlacementGroupsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementGroups" :> Post '[JSON] PlacementGroup + +-- | Inserts a new placement group. +-- +-- /See:/ 'placementGroupsInsert' smart constructor. +data PlacementGroupsInsert = PlacementGroupsInsert + { _pgiQuotaUser :: !(Maybe Text) + , _pgiPrettyPrint :: !Bool + , _pgiUserIp :: !(Maybe Text) + , _pgiProfileId :: !Int64 + , _pgiKey :: !(Maybe Text) + , _pgiOauthToken :: !(Maybe Text) + , _pgiFields :: !(Maybe Text) + , _pgiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgiQuotaUser' +-- +-- * 'pgiPrettyPrint' +-- +-- * 'pgiUserIp' +-- +-- * 'pgiProfileId' +-- +-- * 'pgiKey' +-- +-- * 'pgiOauthToken' +-- +-- * 'pgiFields' +-- +-- * 'pgiAlt' +placementGroupsInsert + :: Int64 -- ^ 'profileId' + -> PlacementGroupsInsert +placementGroupsInsert pPgiProfileId_ = + PlacementGroupsInsert + { _pgiQuotaUser = Nothing + , _pgiPrettyPrint = True + , _pgiUserIp = Nothing + , _pgiProfileId = pPgiProfileId_ + , _pgiKey = Nothing + , _pgiOauthToken = Nothing + , _pgiFields = Nothing + , _pgiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgiQuotaUser :: Lens' PlacementGroupsInsert' (Maybe Text) +pgiQuotaUser + = lens _pgiQuotaUser (\ s a -> s{_pgiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgiPrettyPrint :: Lens' PlacementGroupsInsert' Bool +pgiPrettyPrint + = lens _pgiPrettyPrint + (\ s a -> s{_pgiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgiUserIp :: Lens' PlacementGroupsInsert' (Maybe Text) +pgiUserIp + = lens _pgiUserIp (\ s a -> s{_pgiUserIp = a}) + +-- | User profile ID associated with this request. +pgiProfileId :: Lens' PlacementGroupsInsert' Int64 +pgiProfileId + = lens _pgiProfileId (\ s a -> s{_pgiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgiKey :: Lens' PlacementGroupsInsert' (Maybe Text) +pgiKey = lens _pgiKey (\ s a -> s{_pgiKey = a}) + +-- | OAuth 2.0 token for the current user. +pgiOauthToken :: Lens' PlacementGroupsInsert' (Maybe Text) +pgiOauthToken + = lens _pgiOauthToken + (\ s a -> s{_pgiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgiFields :: Lens' PlacementGroupsInsert' (Maybe Text) +pgiFields + = lens _pgiFields (\ s a -> s{_pgiFields = a}) + +-- | Data format for the response. +pgiAlt :: Lens' PlacementGroupsInsert' Text +pgiAlt = lens _pgiAlt (\ s a -> s{_pgiAlt = a}) + +instance GoogleRequest PlacementGroupsInsert' where + type Rs PlacementGroupsInsert' = PlacementGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementGroupsInsert{..} + = go _pgiQuotaUser _pgiPrettyPrint _pgiUserIp + _pgiProfileId + _pgiKey + _pgiOauthToken + _pgiFields + _pgiAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementGroupsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/List.hs new file mode 100644 index 000000000..437bc0a07 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/List.hs @@ -0,0 +1,427 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of placement groups, possibly filtered. +-- +-- /See:/ for @DfareportingPlacementGroupsList@. +module DFAReporting.PlacementGroups.List + ( + -- * REST Resource + PlacementGroupsListAPI + + -- * Creating a Request + , placementGroupsList + , PlacementGroupsList + + -- * Request Lenses + , pglPlacementStrategyIds + , pglQuotaUser + , pglPrettyPrint + , pglContentCategoryIds + , pglMaxEndDate + , pglUserIp + , pglCampaignIds + , pglPricingTypes + , pglSearchString + , pglIds + , pglProfileId + , pglPlacementGroupType + , pglDirectorySiteIds + , pglSortOrder + , pglKey + , pglSiteIds + , pglPageToken + , pglSortField + , pglMaxStartDate + , pglOauthToken + , pglAdvertiserIds + , pglMinStartDate + , pglArchived + , pglMaxResults + , pglMinEndDate + , pglFields + , pglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementGroupsList@ which the +-- 'PlacementGroupsList' request conforms to. +type PlacementGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementGroups" :> + QueryParams "placementStrategyIds" Int64 :> + QueryParams "contentCategoryIds" Int64 :> + QueryParam "maxEndDate" Text :> + QueryParams "campaignIds" Int64 :> + QueryParams "pricingTypes" Text :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "placementGroupType" Text :> + QueryParams "directorySiteIds" Int64 :> + QueryParam "sortOrder" Text :> + QueryParams "siteIds" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxStartDate" Text :> + QueryParams "advertiserIds" Int64 :> + QueryParam "minStartDate" Text :> + QueryParam "archived" Bool :> + QueryParam "maxResults" Int32 :> + QueryParam "minEndDate" Text :> + Get '[JSON] + PlacementGroupsListResponse + +-- | Retrieves a list of placement groups, possibly filtered. +-- +-- /See:/ 'placementGroupsList' smart constructor. +data PlacementGroupsList = PlacementGroupsList + { _pglPlacementStrategyIds :: !(Maybe Int64) + , _pglQuotaUser :: !(Maybe Text) + , _pglPrettyPrint :: !Bool + , _pglContentCategoryIds :: !(Maybe Int64) + , _pglMaxEndDate :: !(Maybe Text) + , _pglUserIp :: !(Maybe Text) + , _pglCampaignIds :: !(Maybe Int64) + , _pglPricingTypes :: !(Maybe Text) + , _pglSearchString :: !(Maybe Text) + , _pglIds :: !(Maybe Int64) + , _pglProfileId :: !Int64 + , _pglPlacementGroupType :: !(Maybe Text) + , _pglDirectorySiteIds :: !(Maybe Int64) + , _pglSortOrder :: !(Maybe Text) + , _pglKey :: !(Maybe Text) + , _pglSiteIds :: !(Maybe Int64) + , _pglPageToken :: !(Maybe Text) + , _pglSortField :: !(Maybe Text) + , _pglMaxStartDate :: !(Maybe Text) + , _pglOauthToken :: !(Maybe Text) + , _pglAdvertiserIds :: !(Maybe Int64) + , _pglMinStartDate :: !(Maybe Text) + , _pglArchived :: !(Maybe Bool) + , _pglMaxResults :: !(Maybe Int32) + , _pglMinEndDate :: !(Maybe Text) + , _pglFields :: !(Maybe Text) + , _pglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pglPlacementStrategyIds' +-- +-- * 'pglQuotaUser' +-- +-- * 'pglPrettyPrint' +-- +-- * 'pglContentCategoryIds' +-- +-- * 'pglMaxEndDate' +-- +-- * 'pglUserIp' +-- +-- * 'pglCampaignIds' +-- +-- * 'pglPricingTypes' +-- +-- * 'pglSearchString' +-- +-- * 'pglIds' +-- +-- * 'pglProfileId' +-- +-- * 'pglPlacementGroupType' +-- +-- * 'pglDirectorySiteIds' +-- +-- * 'pglSortOrder' +-- +-- * 'pglKey' +-- +-- * 'pglSiteIds' +-- +-- * 'pglPageToken' +-- +-- * 'pglSortField' +-- +-- * 'pglMaxStartDate' +-- +-- * 'pglOauthToken' +-- +-- * 'pglAdvertiserIds' +-- +-- * 'pglMinStartDate' +-- +-- * 'pglArchived' +-- +-- * 'pglMaxResults' +-- +-- * 'pglMinEndDate' +-- +-- * 'pglFields' +-- +-- * 'pglAlt' +placementGroupsList + :: Int64 -- ^ 'profileId' + -> PlacementGroupsList +placementGroupsList pPglProfileId_ = + PlacementGroupsList + { _pglPlacementStrategyIds = Nothing + , _pglQuotaUser = Nothing + , _pglPrettyPrint = True + , _pglContentCategoryIds = Nothing + , _pglMaxEndDate = Nothing + , _pglUserIp = Nothing + , _pglCampaignIds = Nothing + , _pglPricingTypes = Nothing + , _pglSearchString = Nothing + , _pglIds = Nothing + , _pglProfileId = pPglProfileId_ + , _pglPlacementGroupType = Nothing + , _pglDirectorySiteIds = Nothing + , _pglSortOrder = Nothing + , _pglKey = Nothing + , _pglSiteIds = Nothing + , _pglPageToken = Nothing + , _pglSortField = Nothing + , _pglMaxStartDate = Nothing + , _pglOauthToken = Nothing + , _pglAdvertiserIds = Nothing + , _pglMinStartDate = Nothing + , _pglArchived = Nothing + , _pglMaxResults = Nothing + , _pglMinEndDate = Nothing + , _pglFields = Nothing + , _pglAlt = "json" + } + +-- | Select only placement groups that are associated with these placement +-- strategies. +pglPlacementStrategyIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglPlacementStrategyIds + = lens _pglPlacementStrategyIds + (\ s a -> s{_pglPlacementStrategyIds = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pglQuotaUser :: Lens' PlacementGroupsList' (Maybe Text) +pglQuotaUser + = lens _pglQuotaUser (\ s a -> s{_pglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pglPrettyPrint :: Lens' PlacementGroupsList' Bool +pglPrettyPrint + = lens _pglPrettyPrint + (\ s a -> s{_pglPrettyPrint = a}) + +-- | Select only placement groups that are associated with these content +-- categories. +pglContentCategoryIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglContentCategoryIds + = lens _pglContentCategoryIds + (\ s a -> s{_pglContentCategoryIds = a}) + +-- | Select only placements or placement groups whose end date is on or +-- before the specified maxEndDate. The date should be formatted as +-- \"yyyy-MM-dd\". +pglMaxEndDate :: Lens' PlacementGroupsList' (Maybe Text) +pglMaxEndDate + = lens _pglMaxEndDate + (\ s a -> s{_pglMaxEndDate = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pglUserIp :: Lens' PlacementGroupsList' (Maybe Text) +pglUserIp + = lens _pglUserIp (\ s a -> s{_pglUserIp = a}) + +-- | Select only placement groups that belong to these campaigns. +pglCampaignIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglCampaignIds + = lens _pglCampaignIds + (\ s a -> s{_pglCampaignIds = a}) + +-- | Select only placement groups with these pricing types. +pglPricingTypes :: Lens' PlacementGroupsList' (Maybe Text) +pglPricingTypes + = lens _pglPricingTypes + (\ s a -> s{_pglPricingTypes = a}) + +-- | Allows searching for placement groups by name or ID. Wildcards (*) are +-- allowed. For example, \"placement*2015\" will return placement groups +-- with names like \"placement group June 2015\", \"placement group May +-- 2015\", or simply \"placements 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"placementgroup\" will match placement +-- groups with name \"my placementgroup\", \"placementgroup 2015\", or +-- simply \"placementgroup\". +pglSearchString :: Lens' PlacementGroupsList' (Maybe Text) +pglSearchString + = lens _pglSearchString + (\ s a -> s{_pglSearchString = a}) + +-- | Select only placement groups with these IDs. +pglIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglIds = lens _pglIds (\ s a -> s{_pglIds = a}) + +-- | User profile ID associated with this request. +pglProfileId :: Lens' PlacementGroupsList' Int64 +pglProfileId + = lens _pglProfileId (\ s a -> s{_pglProfileId = a}) + +-- | Select only placement groups belonging with this group type. A package +-- is a simple group of placements that acts as a single pricing point for +-- a group of tags. A roadblock is a group of placements that not only acts +-- as a single pricing point but also assumes that all the tags in it will +-- be served at the same time. A roadblock requires one of its assigned +-- placements to be marked as primary for reporting. +pglPlacementGroupType :: Lens' PlacementGroupsList' (Maybe Text) +pglPlacementGroupType + = lens _pglPlacementGroupType + (\ s a -> s{_pglPlacementGroupType = a}) + +-- | Select only placement groups that are associated with these directory +-- sites. +pglDirectorySiteIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglDirectorySiteIds + = lens _pglDirectorySiteIds + (\ s a -> s{_pglDirectorySiteIds = a}) + +-- | Order of sorted results, default is ASCENDING. +pglSortOrder :: Lens' PlacementGroupsList' (Maybe Text) +pglSortOrder + = lens _pglSortOrder (\ s a -> s{_pglSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pglKey :: Lens' PlacementGroupsList' (Maybe Text) +pglKey = lens _pglKey (\ s a -> s{_pglKey = a}) + +-- | Select only placement groups that are associated with these sites. +pglSiteIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglSiteIds + = lens _pglSiteIds (\ s a -> s{_pglSiteIds = a}) + +-- | Value of the nextPageToken from the previous result page. +pglPageToken :: Lens' PlacementGroupsList' (Maybe Text) +pglPageToken + = lens _pglPageToken (\ s a -> s{_pglPageToken = a}) + +-- | Field by which to sort the list. +pglSortField :: Lens' PlacementGroupsList' (Maybe Text) +pglSortField + = lens _pglSortField (\ s a -> s{_pglSortField = a}) + +-- | Select only placements or placement groups whose start date is on or +-- before the specified maxStartDate. The date should be formatted as +-- \"yyyy-MM-dd\". +pglMaxStartDate :: Lens' PlacementGroupsList' (Maybe Text) +pglMaxStartDate + = lens _pglMaxStartDate + (\ s a -> s{_pglMaxStartDate = a}) + +-- | OAuth 2.0 token for the current user. +pglOauthToken :: Lens' PlacementGroupsList' (Maybe Text) +pglOauthToken + = lens _pglOauthToken + (\ s a -> s{_pglOauthToken = a}) + +-- | Select only placement groups that belong to these advertisers. +pglAdvertiserIds :: Lens' PlacementGroupsList' (Maybe Int64) +pglAdvertiserIds + = lens _pglAdvertiserIds + (\ s a -> s{_pglAdvertiserIds = a}) + +-- | Select only placements or placement groups whose start date is on or +-- after the specified minStartDate. The date should be formatted as +-- \"yyyy-MM-dd\". +pglMinStartDate :: Lens' PlacementGroupsList' (Maybe Text) +pglMinStartDate + = lens _pglMinStartDate + (\ s a -> s{_pglMinStartDate = a}) + +-- | Select only archived placements. Don\'t set this field to select both +-- archived and non-archived placements. +pglArchived :: Lens' PlacementGroupsList' (Maybe Bool) +pglArchived + = lens _pglArchived (\ s a -> s{_pglArchived = a}) + +-- | Maximum number of results to return. +pglMaxResults :: Lens' PlacementGroupsList' (Maybe Int32) +pglMaxResults + = lens _pglMaxResults + (\ s a -> s{_pglMaxResults = a}) + +-- | Select only placements or placement groups whose end date is on or after +-- the specified minEndDate. The date should be formatted as +-- \"yyyy-MM-dd\". +pglMinEndDate :: Lens' PlacementGroupsList' (Maybe Text) +pglMinEndDate + = lens _pglMinEndDate + (\ s a -> s{_pglMinEndDate = a}) + +-- | Selector specifying which fields to include in a partial response. +pglFields :: Lens' PlacementGroupsList' (Maybe Text) +pglFields + = lens _pglFields (\ s a -> s{_pglFields = a}) + +-- | Data format for the response. +pglAlt :: Lens' PlacementGroupsList' Text +pglAlt = lens _pglAlt (\ s a -> s{_pglAlt = a}) + +instance GoogleRequest PlacementGroupsList' where + type Rs PlacementGroupsList' = + PlacementGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementGroupsList{..} + = go _pglPlacementStrategyIds _pglQuotaUser + _pglPrettyPrint + _pglContentCategoryIds + _pglMaxEndDate + _pglUserIp + _pglCampaignIds + _pglPricingTypes + _pglSearchString + _pglIds + _pglProfileId + _pglPlacementGroupType + _pglDirectorySiteIds + _pglSortOrder + _pglKey + _pglSiteIds + _pglPageToken + _pglSortField + _pglMaxStartDate + _pglOauthToken + _pglAdvertiserIds + _pglMinStartDate + _pglArchived + _pglMaxResults + _pglMinEndDate + _pglFields + _pglAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Patch.hs new file mode 100644 index 000000000..1332adbb9 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Patch.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementGroups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement group. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingPlacementGroupsPatch@. +module DFAReporting.PlacementGroups.Patch + ( + -- * REST Resource + PlacementGroupsPatchAPI + + -- * Creating a Request + , placementGroupsPatch + , PlacementGroupsPatch + + -- * Request Lenses + , pgpQuotaUser + , pgpPrettyPrint + , pgpUserIp + , pgpProfileId + , pgpKey + , pgpId + , pgpOauthToken + , pgpFields + , pgpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementGroupsPatch@ which the +-- 'PlacementGroupsPatch' request conforms to. +type PlacementGroupsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementGroups" :> + QueryParam "id" Int64 :> Patch '[JSON] PlacementGroup + +-- | Updates an existing placement group. This method supports patch +-- semantics. +-- +-- /See:/ 'placementGroupsPatch' smart constructor. +data PlacementGroupsPatch = PlacementGroupsPatch + { _pgpQuotaUser :: !(Maybe Text) + , _pgpPrettyPrint :: !Bool + , _pgpUserIp :: !(Maybe Text) + , _pgpProfileId :: !Int64 + , _pgpKey :: !(Maybe Text) + , _pgpId :: !Int64 + , _pgpOauthToken :: !(Maybe Text) + , _pgpFields :: !(Maybe Text) + , _pgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgpQuotaUser' +-- +-- * 'pgpPrettyPrint' +-- +-- * 'pgpUserIp' +-- +-- * 'pgpProfileId' +-- +-- * 'pgpKey' +-- +-- * 'pgpId' +-- +-- * 'pgpOauthToken' +-- +-- * 'pgpFields' +-- +-- * 'pgpAlt' +placementGroupsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementGroupsPatch +placementGroupsPatch pPgpProfileId_ pPgpId_ = + PlacementGroupsPatch + { _pgpQuotaUser = Nothing + , _pgpPrettyPrint = True + , _pgpUserIp = Nothing + , _pgpProfileId = pPgpProfileId_ + , _pgpKey = Nothing + , _pgpId = pPgpId_ + , _pgpOauthToken = Nothing + , _pgpFields = Nothing + , _pgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgpQuotaUser :: Lens' PlacementGroupsPatch' (Maybe Text) +pgpQuotaUser + = lens _pgpQuotaUser (\ s a -> s{_pgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgpPrettyPrint :: Lens' PlacementGroupsPatch' Bool +pgpPrettyPrint + = lens _pgpPrettyPrint + (\ s a -> s{_pgpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgpUserIp :: Lens' PlacementGroupsPatch' (Maybe Text) +pgpUserIp + = lens _pgpUserIp (\ s a -> s{_pgpUserIp = a}) + +-- | User profile ID associated with this request. +pgpProfileId :: Lens' PlacementGroupsPatch' Int64 +pgpProfileId + = lens _pgpProfileId (\ s a -> s{_pgpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgpKey :: Lens' PlacementGroupsPatch' (Maybe Text) +pgpKey = lens _pgpKey (\ s a -> s{_pgpKey = a}) + +-- | Placement group ID. +pgpId :: Lens' PlacementGroupsPatch' Int64 +pgpId = lens _pgpId (\ s a -> s{_pgpId = a}) + +-- | OAuth 2.0 token for the current user. +pgpOauthToken :: Lens' PlacementGroupsPatch' (Maybe Text) +pgpOauthToken + = lens _pgpOauthToken + (\ s a -> s{_pgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgpFields :: Lens' PlacementGroupsPatch' (Maybe Text) +pgpFields + = lens _pgpFields (\ s a -> s{_pgpFields = a}) + +-- | Data format for the response. +pgpAlt :: Lens' PlacementGroupsPatch' Text +pgpAlt = lens _pgpAlt (\ s a -> s{_pgpAlt = a}) + +instance GoogleRequest PlacementGroupsPatch' where + type Rs PlacementGroupsPatch' = PlacementGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementGroupsPatch{..} + = go _pgpQuotaUser _pgpPrettyPrint _pgpUserIp + _pgpProfileId + _pgpKey + (Just _pgpId) + _pgpOauthToken + _pgpFields + _pgpAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementGroupsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Update.hs new file mode 100644 index 000000000..48f857a97 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementGroups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement group. +-- +-- /See:/ for @DfareportingPlacementGroupsUpdate@. +module DFAReporting.PlacementGroups.Update + ( + -- * REST Resource + PlacementGroupsUpdateAPI + + -- * Creating a Request + , placementGroupsUpdate + , PlacementGroupsUpdate + + -- * Request Lenses + , pguQuotaUser + , pguPrettyPrint + , pguUserIp + , pguProfileId + , pguKey + , pguOauthToken + , pguFields + , pguAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementGroupsUpdate@ which the +-- 'PlacementGroupsUpdate' request conforms to. +type PlacementGroupsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementGroups" :> Put '[JSON] PlacementGroup + +-- | Updates an existing placement group. +-- +-- /See:/ 'placementGroupsUpdate' smart constructor. +data PlacementGroupsUpdate = PlacementGroupsUpdate + { _pguQuotaUser :: !(Maybe Text) + , _pguPrettyPrint :: !Bool + , _pguUserIp :: !(Maybe Text) + , _pguProfileId :: !Int64 + , _pguKey :: !(Maybe Text) + , _pguOauthToken :: !(Maybe Text) + , _pguFields :: !(Maybe Text) + , _pguAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementGroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pguQuotaUser' +-- +-- * 'pguPrettyPrint' +-- +-- * 'pguUserIp' +-- +-- * 'pguProfileId' +-- +-- * 'pguKey' +-- +-- * 'pguOauthToken' +-- +-- * 'pguFields' +-- +-- * 'pguAlt' +placementGroupsUpdate + :: Int64 -- ^ 'profileId' + -> PlacementGroupsUpdate +placementGroupsUpdate pPguProfileId_ = + PlacementGroupsUpdate + { _pguQuotaUser = Nothing + , _pguPrettyPrint = True + , _pguUserIp = Nothing + , _pguProfileId = pPguProfileId_ + , _pguKey = Nothing + , _pguOauthToken = Nothing + , _pguFields = Nothing + , _pguAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pguQuotaUser :: Lens' PlacementGroupsUpdate' (Maybe Text) +pguQuotaUser + = lens _pguQuotaUser (\ s a -> s{_pguQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pguPrettyPrint :: Lens' PlacementGroupsUpdate' Bool +pguPrettyPrint + = lens _pguPrettyPrint + (\ s a -> s{_pguPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pguUserIp :: Lens' PlacementGroupsUpdate' (Maybe Text) +pguUserIp + = lens _pguUserIp (\ s a -> s{_pguUserIp = a}) + +-- | User profile ID associated with this request. +pguProfileId :: Lens' PlacementGroupsUpdate' Int64 +pguProfileId + = lens _pguProfileId (\ s a -> s{_pguProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pguKey :: Lens' PlacementGroupsUpdate' (Maybe Text) +pguKey = lens _pguKey (\ s a -> s{_pguKey = a}) + +-- | OAuth 2.0 token for the current user. +pguOauthToken :: Lens' PlacementGroupsUpdate' (Maybe Text) +pguOauthToken + = lens _pguOauthToken + (\ s a -> s{_pguOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pguFields :: Lens' PlacementGroupsUpdate' (Maybe Text) +pguFields + = lens _pguFields (\ s a -> s{_pguFields = a}) + +-- | Data format for the response. +pguAlt :: Lens' PlacementGroupsUpdate' Text +pguAlt = lens _pguAlt (\ s a -> s{_pguAlt = a}) + +instance GoogleRequest PlacementGroupsUpdate' where + type Rs PlacementGroupsUpdate' = PlacementGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementGroupsUpdate{..} + = go _pguQuotaUser _pguPrettyPrint _pguUserIp + _pguProfileId + _pguKey + _pguOauthToken + _pguFields + _pguAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementGroupsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Delete.hs new file mode 100644 index 000000000..2aa3ec951 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing placement strategy. +-- +-- /See:/ for @DfareportingPlacementStrategiesDelete@. +module DFAReporting.PlacementStrategies.Delete + ( + -- * REST Resource + PlacementStrategiesDeleteAPI + + -- * Creating a Request + , placementStrategiesDelete + , PlacementStrategiesDelete + + -- * Request Lenses + , psdQuotaUser + , psdPrettyPrint + , psdUserIp + , psdProfileId + , psdKey + , psdId + , psdOauthToken + , psdFields + , psdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesDelete@ which the +-- 'PlacementStrategiesDelete' request conforms to. +type PlacementStrategiesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing placement strategy. +-- +-- /See:/ 'placementStrategiesDelete' smart constructor. +data PlacementStrategiesDelete = PlacementStrategiesDelete + { _psdQuotaUser :: !(Maybe Text) + , _psdPrettyPrint :: !Bool + , _psdUserIp :: !(Maybe Text) + , _psdProfileId :: !Int64 + , _psdKey :: !(Maybe Text) + , _psdId :: !Int64 + , _psdOauthToken :: !(Maybe Text) + , _psdFields :: !(Maybe Text) + , _psdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psdQuotaUser' +-- +-- * 'psdPrettyPrint' +-- +-- * 'psdUserIp' +-- +-- * 'psdProfileId' +-- +-- * 'psdKey' +-- +-- * 'psdId' +-- +-- * 'psdOauthToken' +-- +-- * 'psdFields' +-- +-- * 'psdAlt' +placementStrategiesDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementStrategiesDelete +placementStrategiesDelete pPsdProfileId_ pPsdId_ = + PlacementStrategiesDelete + { _psdQuotaUser = Nothing + , _psdPrettyPrint = True + , _psdUserIp = Nothing + , _psdProfileId = pPsdProfileId_ + , _psdKey = Nothing + , _psdId = pPsdId_ + , _psdOauthToken = Nothing + , _psdFields = Nothing + , _psdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psdQuotaUser :: Lens' PlacementStrategiesDelete' (Maybe Text) +psdQuotaUser + = lens _psdQuotaUser (\ s a -> s{_psdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psdPrettyPrint :: Lens' PlacementStrategiesDelete' Bool +psdPrettyPrint + = lens _psdPrettyPrint + (\ s a -> s{_psdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psdUserIp :: Lens' PlacementStrategiesDelete' (Maybe Text) +psdUserIp + = lens _psdUserIp (\ s a -> s{_psdUserIp = a}) + +-- | User profile ID associated with this request. +psdProfileId :: Lens' PlacementStrategiesDelete' Int64 +psdProfileId + = lens _psdProfileId (\ s a -> s{_psdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psdKey :: Lens' PlacementStrategiesDelete' (Maybe Text) +psdKey = lens _psdKey (\ s a -> s{_psdKey = a}) + +-- | Placement strategy ID. +psdId :: Lens' PlacementStrategiesDelete' Int64 +psdId = lens _psdId (\ s a -> s{_psdId = a}) + +-- | OAuth 2.0 token for the current user. +psdOauthToken :: Lens' PlacementStrategiesDelete' (Maybe Text) +psdOauthToken + = lens _psdOauthToken + (\ s a -> s{_psdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psdFields :: Lens' PlacementStrategiesDelete' (Maybe Text) +psdFields + = lens _psdFields (\ s a -> s{_psdFields = a}) + +-- | Data format for the response. +psdAlt :: Lens' PlacementStrategiesDelete' Text +psdAlt = lens _psdAlt (\ s a -> s{_psdAlt = a}) + +instance GoogleRequest PlacementStrategiesDelete' + where + type Rs PlacementStrategiesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesDelete{..} + = go _psdQuotaUser _psdPrettyPrint _psdUserIp + _psdProfileId + _psdKey + _psdId + _psdOauthToken + _psdFields + _psdAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Get.hs new file mode 100644 index 000000000..337f46dd0 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one placement strategy by ID. +-- +-- /See:/ for @DfareportingPlacementStrategiesGet@. +module DFAReporting.PlacementStrategies.Get + ( + -- * REST Resource + PlacementStrategiesGetAPI + + -- * Creating a Request + , placementStrategiesGet + , PlacementStrategiesGet + + -- * Request Lenses + , psgQuotaUser + , psgPrettyPrint + , psgUserIp + , psgProfileId + , psgKey + , psgId + , psgOauthToken + , psgFields + , psgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesGet@ which the +-- 'PlacementStrategiesGet' request conforms to. +type PlacementStrategiesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + Capture "id" Int64 :> Get '[JSON] PlacementStrategy + +-- | Gets one placement strategy by ID. +-- +-- /See:/ 'placementStrategiesGet' smart constructor. +data PlacementStrategiesGet = PlacementStrategiesGet + { _psgQuotaUser :: !(Maybe Text) + , _psgPrettyPrint :: !Bool + , _psgUserIp :: !(Maybe Text) + , _psgProfileId :: !Int64 + , _psgKey :: !(Maybe Text) + , _psgId :: !Int64 + , _psgOauthToken :: !(Maybe Text) + , _psgFields :: !(Maybe Text) + , _psgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgQuotaUser' +-- +-- * 'psgPrettyPrint' +-- +-- * 'psgUserIp' +-- +-- * 'psgProfileId' +-- +-- * 'psgKey' +-- +-- * 'psgId' +-- +-- * 'psgOauthToken' +-- +-- * 'psgFields' +-- +-- * 'psgAlt' +placementStrategiesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementStrategiesGet +placementStrategiesGet pPsgProfileId_ pPsgId_ = + PlacementStrategiesGet + { _psgQuotaUser = Nothing + , _psgPrettyPrint = True + , _psgUserIp = Nothing + , _psgProfileId = pPsgProfileId_ + , _psgKey = Nothing + , _psgId = pPsgId_ + , _psgOauthToken = Nothing + , _psgFields = Nothing + , _psgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psgQuotaUser :: Lens' PlacementStrategiesGet' (Maybe Text) +psgQuotaUser + = lens _psgQuotaUser (\ s a -> s{_psgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psgPrettyPrint :: Lens' PlacementStrategiesGet' Bool +psgPrettyPrint + = lens _psgPrettyPrint + (\ s a -> s{_psgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psgUserIp :: Lens' PlacementStrategiesGet' (Maybe Text) +psgUserIp + = lens _psgUserIp (\ s a -> s{_psgUserIp = a}) + +-- | User profile ID associated with this request. +psgProfileId :: Lens' PlacementStrategiesGet' Int64 +psgProfileId + = lens _psgProfileId (\ s a -> s{_psgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psgKey :: Lens' PlacementStrategiesGet' (Maybe Text) +psgKey = lens _psgKey (\ s a -> s{_psgKey = a}) + +-- | Placement strategy ID. +psgId :: Lens' PlacementStrategiesGet' Int64 +psgId = lens _psgId (\ s a -> s{_psgId = a}) + +-- | OAuth 2.0 token for the current user. +psgOauthToken :: Lens' PlacementStrategiesGet' (Maybe Text) +psgOauthToken + = lens _psgOauthToken + (\ s a -> s{_psgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psgFields :: Lens' PlacementStrategiesGet' (Maybe Text) +psgFields + = lens _psgFields (\ s a -> s{_psgFields = a}) + +-- | Data format for the response. +psgAlt :: Lens' PlacementStrategiesGet' Text +psgAlt = lens _psgAlt (\ s a -> s{_psgAlt = a}) + +instance GoogleRequest PlacementStrategiesGet' where + type Rs PlacementStrategiesGet' = PlacementStrategy + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesGet{..} + = go _psgQuotaUser _psgPrettyPrint _psgUserIp + _psgProfileId + _psgKey + _psgId + _psgOauthToken + _psgFields + _psgAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Insert.hs new file mode 100644 index 000000000..22804da85 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Insert.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new placement strategy. +-- +-- /See:/ for @DfareportingPlacementStrategiesInsert@. +module DFAReporting.PlacementStrategies.Insert + ( + -- * REST Resource + PlacementStrategiesInsertAPI + + -- * Creating a Request + , placementStrategiesInsert + , PlacementStrategiesInsert + + -- * Request Lenses + , psiQuotaUser + , psiPrettyPrint + , psiUserIp + , psiProfileId + , psiKey + , psiOauthToken + , psiFields + , psiAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesInsert@ which the +-- 'PlacementStrategiesInsert' request conforms to. +type PlacementStrategiesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + Post '[JSON] PlacementStrategy + +-- | Inserts a new placement strategy. +-- +-- /See:/ 'placementStrategiesInsert' smart constructor. +data PlacementStrategiesInsert = PlacementStrategiesInsert + { _psiQuotaUser :: !(Maybe Text) + , _psiPrettyPrint :: !Bool + , _psiUserIp :: !(Maybe Text) + , _psiProfileId :: !Int64 + , _psiKey :: !(Maybe Text) + , _psiOauthToken :: !(Maybe Text) + , _psiFields :: !(Maybe Text) + , _psiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psiQuotaUser' +-- +-- * 'psiPrettyPrint' +-- +-- * 'psiUserIp' +-- +-- * 'psiProfileId' +-- +-- * 'psiKey' +-- +-- * 'psiOauthToken' +-- +-- * 'psiFields' +-- +-- * 'psiAlt' +placementStrategiesInsert + :: Int64 -- ^ 'profileId' + -> PlacementStrategiesInsert +placementStrategiesInsert pPsiProfileId_ = + PlacementStrategiesInsert + { _psiQuotaUser = Nothing + , _psiPrettyPrint = True + , _psiUserIp = Nothing + , _psiProfileId = pPsiProfileId_ + , _psiKey = Nothing + , _psiOauthToken = Nothing + , _psiFields = Nothing + , _psiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psiQuotaUser :: Lens' PlacementStrategiesInsert' (Maybe Text) +psiQuotaUser + = lens _psiQuotaUser (\ s a -> s{_psiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psiPrettyPrint :: Lens' PlacementStrategiesInsert' Bool +psiPrettyPrint + = lens _psiPrettyPrint + (\ s a -> s{_psiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psiUserIp :: Lens' PlacementStrategiesInsert' (Maybe Text) +psiUserIp + = lens _psiUserIp (\ s a -> s{_psiUserIp = a}) + +-- | User profile ID associated with this request. +psiProfileId :: Lens' PlacementStrategiesInsert' Int64 +psiProfileId + = lens _psiProfileId (\ s a -> s{_psiProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psiKey :: Lens' PlacementStrategiesInsert' (Maybe Text) +psiKey = lens _psiKey (\ s a -> s{_psiKey = a}) + +-- | OAuth 2.0 token for the current user. +psiOauthToken :: Lens' PlacementStrategiesInsert' (Maybe Text) +psiOauthToken + = lens _psiOauthToken + (\ s a -> s{_psiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psiFields :: Lens' PlacementStrategiesInsert' (Maybe Text) +psiFields + = lens _psiFields (\ s a -> s{_psiFields = a}) + +-- | Data format for the response. +psiAlt :: Lens' PlacementStrategiesInsert' Text +psiAlt = lens _psiAlt (\ s a -> s{_psiAlt = a}) + +instance GoogleRequest PlacementStrategiesInsert' + where + type Rs PlacementStrategiesInsert' = + PlacementStrategy + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesInsert{..} + = go _psiQuotaUser _psiPrettyPrint _psiUserIp + _psiProfileId + _psiKey + _psiOauthToken + _psiFields + _psiAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/List.hs new file mode 100644 index 000000000..47debba31 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/List.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of placement strategies, possibly filtered. +-- +-- /See:/ for @DfareportingPlacementStrategiesList@. +module DFAReporting.PlacementStrategies.List + ( + -- * REST Resource + PlacementStrategiesListAPI + + -- * Creating a Request + , placementStrategiesList + , PlacementStrategiesList + + -- * Request Lenses + , pslQuotaUser + , pslPrettyPrint + , pslUserIp + , pslSearchString + , pslIds + , pslProfileId + , pslSortOrder + , pslKey + , pslPageToken + , pslSortField + , pslOauthToken + , pslMaxResults + , pslFields + , pslAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesList@ which the +-- 'PlacementStrategiesList' request conforms to. +type PlacementStrategiesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] PlacementStrategiesListResponse + +-- | Retrieves a list of placement strategies, possibly filtered. +-- +-- /See:/ 'placementStrategiesList' smart constructor. +data PlacementStrategiesList = PlacementStrategiesList + { _pslQuotaUser :: !(Maybe Text) + , _pslPrettyPrint :: !Bool + , _pslUserIp :: !(Maybe Text) + , _pslSearchString :: !(Maybe Text) + , _pslIds :: !(Maybe Int64) + , _pslProfileId :: !Int64 + , _pslSortOrder :: !(Maybe Text) + , _pslKey :: !(Maybe Text) + , _pslPageToken :: !(Maybe Text) + , _pslSortField :: !(Maybe Text) + , _pslOauthToken :: !(Maybe Text) + , _pslMaxResults :: !(Maybe Int32) + , _pslFields :: !(Maybe Text) + , _pslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslQuotaUser' +-- +-- * 'pslPrettyPrint' +-- +-- * 'pslUserIp' +-- +-- * 'pslSearchString' +-- +-- * 'pslIds' +-- +-- * 'pslProfileId' +-- +-- * 'pslSortOrder' +-- +-- * 'pslKey' +-- +-- * 'pslPageToken' +-- +-- * 'pslSortField' +-- +-- * 'pslOauthToken' +-- +-- * 'pslMaxResults' +-- +-- * 'pslFields' +-- +-- * 'pslAlt' +placementStrategiesList + :: Int64 -- ^ 'profileId' + -> PlacementStrategiesList +placementStrategiesList pPslProfileId_ = + PlacementStrategiesList + { _pslQuotaUser = Nothing + , _pslPrettyPrint = True + , _pslUserIp = Nothing + , _pslSearchString = Nothing + , _pslIds = Nothing + , _pslProfileId = pPslProfileId_ + , _pslSortOrder = Nothing + , _pslKey = Nothing + , _pslPageToken = Nothing + , _pslSortField = Nothing + , _pslOauthToken = Nothing + , _pslMaxResults = Nothing + , _pslFields = Nothing + , _pslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pslQuotaUser :: Lens' PlacementStrategiesList' (Maybe Text) +pslQuotaUser + = lens _pslQuotaUser (\ s a -> s{_pslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pslPrettyPrint :: Lens' PlacementStrategiesList' Bool +pslPrettyPrint + = lens _pslPrettyPrint + (\ s a -> s{_pslPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pslUserIp :: Lens' PlacementStrategiesList' (Maybe Text) +pslUserIp + = lens _pslUserIp (\ s a -> s{_pslUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"placementstrategy*2015\" will return objects with names +-- like \"placementstrategy June 2015\", \"placementstrategy April 2015\", +-- or simply \"placementstrategy 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"placementstrategy\" will match objects +-- with name \"my placementstrategy\", \"placementstrategy 2015\", or +-- simply \"placementstrategy\". +pslSearchString :: Lens' PlacementStrategiesList' (Maybe Text) +pslSearchString + = lens _pslSearchString + (\ s a -> s{_pslSearchString = a}) + +-- | Select only placement strategies with these IDs. +pslIds :: Lens' PlacementStrategiesList' (Maybe Int64) +pslIds = lens _pslIds (\ s a -> s{_pslIds = a}) + +-- | User profile ID associated with this request. +pslProfileId :: Lens' PlacementStrategiesList' Int64 +pslProfileId + = lens _pslProfileId (\ s a -> s{_pslProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +pslSortOrder :: Lens' PlacementStrategiesList' (Maybe Text) +pslSortOrder + = lens _pslSortOrder (\ s a -> s{_pslSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pslKey :: Lens' PlacementStrategiesList' (Maybe Text) +pslKey = lens _pslKey (\ s a -> s{_pslKey = a}) + +-- | Value of the nextPageToken from the previous result page. +pslPageToken :: Lens' PlacementStrategiesList' (Maybe Text) +pslPageToken + = lens _pslPageToken (\ s a -> s{_pslPageToken = a}) + +-- | Field by which to sort the list. +pslSortField :: Lens' PlacementStrategiesList' (Maybe Text) +pslSortField + = lens _pslSortField (\ s a -> s{_pslSortField = a}) + +-- | OAuth 2.0 token for the current user. +pslOauthToken :: Lens' PlacementStrategiesList' (Maybe Text) +pslOauthToken + = lens _pslOauthToken + (\ s a -> s{_pslOauthToken = a}) + +-- | Maximum number of results to return. +pslMaxResults :: Lens' PlacementStrategiesList' (Maybe Int32) +pslMaxResults + = lens _pslMaxResults + (\ s a -> s{_pslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +pslFields :: Lens' PlacementStrategiesList' (Maybe Text) +pslFields + = lens _pslFields (\ s a -> s{_pslFields = a}) + +-- | Data format for the response. +pslAlt :: Lens' PlacementStrategiesList' Text +pslAlt = lens _pslAlt (\ s a -> s{_pslAlt = a}) + +instance GoogleRequest PlacementStrategiesList' where + type Rs PlacementStrategiesList' = + PlacementStrategiesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesList{..} + = go _pslQuotaUser _pslPrettyPrint _pslUserIp + _pslSearchString + _pslIds + _pslProfileId + _pslSortOrder + _pslKey + _pslPageToken + _pslSortField + _pslOauthToken + _pslMaxResults + _pslFields + _pslAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Patch.hs new file mode 100644 index 000000000..d80d15076 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Patch.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement strategy. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingPlacementStrategiesPatch@. +module DFAReporting.PlacementStrategies.Patch + ( + -- * REST Resource + PlacementStrategiesPatchAPI + + -- * Creating a Request + , placementStrategiesPatch + , PlacementStrategiesPatch + + -- * Request Lenses + , pspQuotaUser + , pspPrettyPrint + , pspUserIp + , pspProfileId + , pspKey + , pspId + , pspOauthToken + , pspFields + , pspAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesPatch@ which the +-- 'PlacementStrategiesPatch' request conforms to. +type PlacementStrategiesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + QueryParam "id" Int64 :> + Patch '[JSON] PlacementStrategy + +-- | Updates an existing placement strategy. This method supports patch +-- semantics. +-- +-- /See:/ 'placementStrategiesPatch' smart constructor. +data PlacementStrategiesPatch = PlacementStrategiesPatch + { _pspQuotaUser :: !(Maybe Text) + , _pspPrettyPrint :: !Bool + , _pspUserIp :: !(Maybe Text) + , _pspProfileId :: !Int64 + , _pspKey :: !(Maybe Text) + , _pspId :: !Int64 + , _pspOauthToken :: !(Maybe Text) + , _pspFields :: !(Maybe Text) + , _pspAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pspQuotaUser' +-- +-- * 'pspPrettyPrint' +-- +-- * 'pspUserIp' +-- +-- * 'pspProfileId' +-- +-- * 'pspKey' +-- +-- * 'pspId' +-- +-- * 'pspOauthToken' +-- +-- * 'pspFields' +-- +-- * 'pspAlt' +placementStrategiesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementStrategiesPatch +placementStrategiesPatch pPspProfileId_ pPspId_ = + PlacementStrategiesPatch + { _pspQuotaUser = Nothing + , _pspPrettyPrint = True + , _pspUserIp = Nothing + , _pspProfileId = pPspProfileId_ + , _pspKey = Nothing + , _pspId = pPspId_ + , _pspOauthToken = Nothing + , _pspFields = Nothing + , _pspAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pspQuotaUser :: Lens' PlacementStrategiesPatch' (Maybe Text) +pspQuotaUser + = lens _pspQuotaUser (\ s a -> s{_pspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pspPrettyPrint :: Lens' PlacementStrategiesPatch' Bool +pspPrettyPrint + = lens _pspPrettyPrint + (\ s a -> s{_pspPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pspUserIp :: Lens' PlacementStrategiesPatch' (Maybe Text) +pspUserIp + = lens _pspUserIp (\ s a -> s{_pspUserIp = a}) + +-- | User profile ID associated with this request. +pspProfileId :: Lens' PlacementStrategiesPatch' Int64 +pspProfileId + = lens _pspProfileId (\ s a -> s{_pspProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pspKey :: Lens' PlacementStrategiesPatch' (Maybe Text) +pspKey = lens _pspKey (\ s a -> s{_pspKey = a}) + +-- | Placement strategy ID. +pspId :: Lens' PlacementStrategiesPatch' Int64 +pspId = lens _pspId (\ s a -> s{_pspId = a}) + +-- | OAuth 2.0 token for the current user. +pspOauthToken :: Lens' PlacementStrategiesPatch' (Maybe Text) +pspOauthToken + = lens _pspOauthToken + (\ s a -> s{_pspOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pspFields :: Lens' PlacementStrategiesPatch' (Maybe Text) +pspFields + = lens _pspFields (\ s a -> s{_pspFields = a}) + +-- | Data format for the response. +pspAlt :: Lens' PlacementStrategiesPatch' Text +pspAlt = lens _pspAlt (\ s a -> s{_pspAlt = a}) + +instance GoogleRequest PlacementStrategiesPatch' + where + type Rs PlacementStrategiesPatch' = PlacementStrategy + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesPatch{..} + = go _pspQuotaUser _pspPrettyPrint _pspUserIp + _pspProfileId + _pspKey + (Just _pspId) + _pspOauthToken + _pspFields + _pspAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Update.hs new file mode 100644 index 000000000..39e004a26 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Update.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlacementStrategies.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement strategy. +-- +-- /See:/ for @DfareportingPlacementStrategiesUpdate@. +module DFAReporting.PlacementStrategies.Update + ( + -- * REST Resource + PlacementStrategiesUpdateAPI + + -- * Creating a Request + , placementStrategiesUpdate + , PlacementStrategiesUpdate + + -- * Request Lenses + , psuQuotaUser + , psuPrettyPrint + , psuUserIp + , psuProfileId + , psuKey + , psuOauthToken + , psuFields + , psuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementStrategiesUpdate@ which the +-- 'PlacementStrategiesUpdate' request conforms to. +type PlacementStrategiesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placementStrategies" :> + Put '[JSON] PlacementStrategy + +-- | Updates an existing placement strategy. +-- +-- /See:/ 'placementStrategiesUpdate' smart constructor. +data PlacementStrategiesUpdate = PlacementStrategiesUpdate + { _psuQuotaUser :: !(Maybe Text) + , _psuPrettyPrint :: !Bool + , _psuUserIp :: !(Maybe Text) + , _psuProfileId :: !Int64 + , _psuKey :: !(Maybe Text) + , _psuOauthToken :: !(Maybe Text) + , _psuFields :: !(Maybe Text) + , _psuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementStrategiesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psuQuotaUser' +-- +-- * 'psuPrettyPrint' +-- +-- * 'psuUserIp' +-- +-- * 'psuProfileId' +-- +-- * 'psuKey' +-- +-- * 'psuOauthToken' +-- +-- * 'psuFields' +-- +-- * 'psuAlt' +placementStrategiesUpdate + :: Int64 -- ^ 'profileId' + -> PlacementStrategiesUpdate +placementStrategiesUpdate pPsuProfileId_ = + PlacementStrategiesUpdate + { _psuQuotaUser = Nothing + , _psuPrettyPrint = True + , _psuUserIp = Nothing + , _psuProfileId = pPsuProfileId_ + , _psuKey = Nothing + , _psuOauthToken = Nothing + , _psuFields = Nothing + , _psuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psuQuotaUser :: Lens' PlacementStrategiesUpdate' (Maybe Text) +psuQuotaUser + = lens _psuQuotaUser (\ s a -> s{_psuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psuPrettyPrint :: Lens' PlacementStrategiesUpdate' Bool +psuPrettyPrint + = lens _psuPrettyPrint + (\ s a -> s{_psuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psuUserIp :: Lens' PlacementStrategiesUpdate' (Maybe Text) +psuUserIp + = lens _psuUserIp (\ s a -> s{_psuUserIp = a}) + +-- | User profile ID associated with this request. +psuProfileId :: Lens' PlacementStrategiesUpdate' Int64 +psuProfileId + = lens _psuProfileId (\ s a -> s{_psuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psuKey :: Lens' PlacementStrategiesUpdate' (Maybe Text) +psuKey = lens _psuKey (\ s a -> s{_psuKey = a}) + +-- | OAuth 2.0 token for the current user. +psuOauthToken :: Lens' PlacementStrategiesUpdate' (Maybe Text) +psuOauthToken + = lens _psuOauthToken + (\ s a -> s{_psuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psuFields :: Lens' PlacementStrategiesUpdate' (Maybe Text) +psuFields + = lens _psuFields (\ s a -> s{_psuFields = a}) + +-- | Data format for the response. +psuAlt :: Lens' PlacementStrategiesUpdate' Text +psuAlt = lens _psuAlt (\ s a -> s{_psuAlt = a}) + +instance GoogleRequest PlacementStrategiesUpdate' + where + type Rs PlacementStrategiesUpdate' = + PlacementStrategy + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementStrategiesUpdate{..} + = go _psuQuotaUser _psuPrettyPrint _psuUserIp + _psuProfileId + _psuKey + _psuOauthToken + _psuFields + _psuAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementStrategiesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Generatetags.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Generatetags.hs new file mode 100644 index 000000000..a74ddc8c5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Generatetags.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.Generatetags +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates tags for a placement. +-- +-- /See:/ for @DfareportingPlacementsGeneratetags@. +module DFAReporting.Placements.Generatetags + ( + -- * REST Resource + PlacementsGeneratetagsAPI + + -- * Creating a Request + , placementsGeneratetags + , PlacementsGeneratetags + + -- * Request Lenses + , pQuotaUser + , pPrettyPrint + , pTagFormats + , pUserIp + , pCampaignId + , pProfileId + , pKey + , pPlacementIds + , pOauthToken + , pFields + , pAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsGeneratetags@ which the +-- 'PlacementsGeneratetags' request conforms to. +type PlacementsGeneratetagsAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> + "generatetags" :> + QueryParams "tagFormats" Text :> + QueryParam "campaignId" Int64 :> + QueryParams "placementIds" Int64 :> + Post '[JSON] PlacementsGenerateTagsResponse + +-- | Generates tags for a placement. +-- +-- /See:/ 'placementsGeneratetags' smart constructor. +data PlacementsGeneratetags = PlacementsGeneratetags + { _pQuotaUser :: !(Maybe Text) + , _pPrettyPrint :: !Bool + , _pTagFormats :: !(Maybe Text) + , _pUserIp :: !(Maybe Text) + , _pCampaignId :: !(Maybe Int64) + , _pProfileId :: !Int64 + , _pKey :: !(Maybe Text) + , _pPlacementIds :: !(Maybe Int64) + , _pOauthToken :: !(Maybe Text) + , _pFields :: !(Maybe Text) + , _pAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsGeneratetags'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pQuotaUser' +-- +-- * 'pPrettyPrint' +-- +-- * 'pTagFormats' +-- +-- * 'pUserIp' +-- +-- * 'pCampaignId' +-- +-- * 'pProfileId' +-- +-- * 'pKey' +-- +-- * 'pPlacementIds' +-- +-- * 'pOauthToken' +-- +-- * 'pFields' +-- +-- * 'pAlt' +placementsGeneratetags + :: Int64 -- ^ 'profileId' + -> PlacementsGeneratetags +placementsGeneratetags pPProfileId_ = + PlacementsGeneratetags + { _pQuotaUser = Nothing + , _pPrettyPrint = True + , _pTagFormats = Nothing + , _pUserIp = Nothing + , _pCampaignId = Nothing + , _pProfileId = pPProfileId_ + , _pKey = Nothing + , _pPlacementIds = Nothing + , _pOauthToken = Nothing + , _pFields = Nothing + , _pAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pQuotaUser :: Lens' PlacementsGeneratetags' (Maybe Text) +pQuotaUser + = lens _pQuotaUser (\ s a -> s{_pQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pPrettyPrint :: Lens' PlacementsGeneratetags' Bool +pPrettyPrint + = lens _pPrettyPrint (\ s a -> s{_pPrettyPrint = a}) + +-- | Tag formats to generate for these placements. +pTagFormats :: Lens' PlacementsGeneratetags' (Maybe Text) +pTagFormats + = lens _pTagFormats (\ s a -> s{_pTagFormats = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pUserIp :: Lens' PlacementsGeneratetags' (Maybe Text) +pUserIp = lens _pUserIp (\ s a -> s{_pUserIp = a}) + +-- | Generate placements belonging to this campaign. This is a required +-- field. +pCampaignId :: Lens' PlacementsGeneratetags' (Maybe Int64) +pCampaignId + = lens _pCampaignId (\ s a -> s{_pCampaignId = a}) + +-- | User profile ID associated with this request. +pProfileId :: Lens' PlacementsGeneratetags' Int64 +pProfileId + = lens _pProfileId (\ s a -> s{_pProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pKey :: Lens' PlacementsGeneratetags' (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | Generate tags for these placements. +pPlacementIds :: Lens' PlacementsGeneratetags' (Maybe Int64) +pPlacementIds + = lens _pPlacementIds + (\ s a -> s{_pPlacementIds = a}) + +-- | OAuth 2.0 token for the current user. +pOauthToken :: Lens' PlacementsGeneratetags' (Maybe Text) +pOauthToken + = lens _pOauthToken (\ s a -> s{_pOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pFields :: Lens' PlacementsGeneratetags' (Maybe Text) +pFields = lens _pFields (\ s a -> s{_pFields = a}) + +-- | Data format for the response. +pAlt :: Lens' PlacementsGeneratetags' Text +pAlt = lens _pAlt (\ s a -> s{_pAlt = a}) + +instance GoogleRequest PlacementsGeneratetags' where + type Rs PlacementsGeneratetags' = + PlacementsGenerateTagsResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsGeneratetags{..} + = go _pQuotaUser _pPrettyPrint _pTagFormats _pUserIp + _pCampaignId + _pProfileId + _pKey + _pPlacementIds + _pOauthToken + _pFields + _pAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementsGeneratetagsAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Get.hs new file mode 100644 index 000000000..7067ad685 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one placement by ID. +-- +-- /See:/ for @DfareportingPlacementsGet@. +module DFAReporting.Placements.Get + ( + -- * REST Resource + PlacementsGetAPI + + -- * Creating a Request + , placementsGet + , PlacementsGet + + -- * Request Lenses + , pggQuotaUser + , pggPrettyPrint + , pggUserIp + , pggProfileId + , pggKey + , pggId + , pggOauthToken + , pggFields + , pggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsGet@ which the +-- 'PlacementsGet' request conforms to. +type PlacementsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> + Capture "id" Int64 :> Get '[JSON] Placement + +-- | Gets one placement by ID. +-- +-- /See:/ 'placementsGet' smart constructor. +data PlacementsGet = PlacementsGet + { _pggQuotaUser :: !(Maybe Text) + , _pggPrettyPrint :: !Bool + , _pggUserIp :: !(Maybe Text) + , _pggProfileId :: !Int64 + , _pggKey :: !(Maybe Text) + , _pggId :: !Int64 + , _pggOauthToken :: !(Maybe Text) + , _pggFields :: !(Maybe Text) + , _pggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pggQuotaUser' +-- +-- * 'pggPrettyPrint' +-- +-- * 'pggUserIp' +-- +-- * 'pggProfileId' +-- +-- * 'pggKey' +-- +-- * 'pggId' +-- +-- * 'pggOauthToken' +-- +-- * 'pggFields' +-- +-- * 'pggAlt' +placementsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementsGet +placementsGet pPggProfileId_ pPggId_ = + PlacementsGet + { _pggQuotaUser = Nothing + , _pggPrettyPrint = True + , _pggUserIp = Nothing + , _pggProfileId = pPggProfileId_ + , _pggKey = Nothing + , _pggId = pPggId_ + , _pggOauthToken = Nothing + , _pggFields = Nothing + , _pggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pggQuotaUser :: Lens' PlacementsGet' (Maybe Text) +pggQuotaUser + = lens _pggQuotaUser (\ s a -> s{_pggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pggPrettyPrint :: Lens' PlacementsGet' Bool +pggPrettyPrint + = lens _pggPrettyPrint + (\ s a -> s{_pggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pggUserIp :: Lens' PlacementsGet' (Maybe Text) +pggUserIp + = lens _pggUserIp (\ s a -> s{_pggUserIp = a}) + +-- | User profile ID associated with this request. +pggProfileId :: Lens' PlacementsGet' Int64 +pggProfileId + = lens _pggProfileId (\ s a -> s{_pggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pggKey :: Lens' PlacementsGet' (Maybe Text) +pggKey = lens _pggKey (\ s a -> s{_pggKey = a}) + +-- | Placement ID. +pggId :: Lens' PlacementsGet' Int64 +pggId = lens _pggId (\ s a -> s{_pggId = a}) + +-- | OAuth 2.0 token for the current user. +pggOauthToken :: Lens' PlacementsGet' (Maybe Text) +pggOauthToken + = lens _pggOauthToken + (\ s a -> s{_pggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pggFields :: Lens' PlacementsGet' (Maybe Text) +pggFields + = lens _pggFields (\ s a -> s{_pggFields = a}) + +-- | Data format for the response. +pggAlt :: Lens' PlacementsGet' Text +pggAlt = lens _pggAlt (\ s a -> s{_pggAlt = a}) + +instance GoogleRequest PlacementsGet' where + type Rs PlacementsGet' = Placement + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsGet{..} + = go _pggQuotaUser _pggPrettyPrint _pggUserIp + _pggProfileId + _pggKey + _pggId + _pggOauthToken + _pggFields + _pggAlt + where go + = clientWithRoute (Proxy :: Proxy PlacementsGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs new file mode 100644 index 000000000..44df498ec --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new placement. +-- +-- /See:/ for @DfareportingPlacementsInsert@. +module DFAReporting.Placements.Insert + ( + -- * REST Resource + PlacementsInsertAPI + + -- * Creating a Request + , placementsInsert + , PlacementsInsert + + -- * Request Lenses + , piQuotaUser + , piPrettyPrint + , piUserIp + , piProfileId + , piKey + , piOauthToken + , piFields + , piAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsInsert@ which the +-- 'PlacementsInsert' request conforms to. +type PlacementsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> Post '[JSON] Placement + +-- | Inserts a new placement. +-- +-- /See:/ 'placementsInsert' smart constructor. +data PlacementsInsert = PlacementsInsert + { _piQuotaUser :: !(Maybe Text) + , _piPrettyPrint :: !Bool + , _piUserIp :: !(Maybe Text) + , _piProfileId :: !Int64 + , _piKey :: !(Maybe Text) + , _piOauthToken :: !(Maybe Text) + , _piFields :: !(Maybe Text) + , _piAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piQuotaUser' +-- +-- * 'piPrettyPrint' +-- +-- * 'piUserIp' +-- +-- * 'piProfileId' +-- +-- * 'piKey' +-- +-- * 'piOauthToken' +-- +-- * 'piFields' +-- +-- * 'piAlt' +placementsInsert + :: Int64 -- ^ 'profileId' + -> PlacementsInsert +placementsInsert pPiProfileId_ = + PlacementsInsert + { _piQuotaUser = Nothing + , _piPrettyPrint = True + , _piUserIp = Nothing + , _piProfileId = pPiProfileId_ + , _piKey = Nothing + , _piOauthToken = Nothing + , _piFields = Nothing + , _piAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piQuotaUser :: Lens' PlacementsInsert' (Maybe Text) +piQuotaUser + = lens _piQuotaUser (\ s a -> s{_piQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +piPrettyPrint :: Lens' PlacementsInsert' Bool +piPrettyPrint + = lens _piPrettyPrint + (\ s a -> s{_piPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piUserIp :: Lens' PlacementsInsert' (Maybe Text) +piUserIp = lens _piUserIp (\ s a -> s{_piUserIp = a}) + +-- | User profile ID associated with this request. +piProfileId :: Lens' PlacementsInsert' Int64 +piProfileId + = lens _piProfileId (\ s a -> s{_piProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piKey :: Lens' PlacementsInsert' (Maybe Text) +piKey = lens _piKey (\ s a -> s{_piKey = a}) + +-- | OAuth 2.0 token for the current user. +piOauthToken :: Lens' PlacementsInsert' (Maybe Text) +piOauthToken + = lens _piOauthToken (\ s a -> s{_piOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piFields :: Lens' PlacementsInsert' (Maybe Text) +piFields = lens _piFields (\ s a -> s{_piFields = a}) + +-- | Data format for the response. +piAlt :: Lens' PlacementsInsert' Text +piAlt = lens _piAlt (\ s a -> s{_piAlt = a}) + +instance GoogleRequest PlacementsInsert' where + type Rs PlacementsInsert' = Placement + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsInsert{..} + = go _piQuotaUser _piPrettyPrint _piUserIp + _piProfileId + _piKey + _piOauthToken + _piFields + _piAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs new file mode 100644 index 000000000..220de5390 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs @@ -0,0 +1,457 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of placements, possibly filtered. +-- +-- /See:/ for @DfareportingPlacementsList@. +module DFAReporting.Placements.List + ( + -- * REST Resource + PlacementsListAPI + + -- * Creating a Request + , placementsList + , PlacementsList + + -- * Request Lenses + , plPlacementStrategyIds + , plQuotaUser + , plPrettyPrint + , plContentCategoryIds + , plMaxEndDate + , plUserIp + , plCampaignIds + , plPricingTypes + , plSearchString + , plSizeIds + , plIds + , plProfileId + , plGroupIds + , plDirectorySiteIds + , plSortOrder + , plPaymentSource + , plKey + , plSiteIds + , plPageToken + , plSortField + , plCompatibilities + , plMaxStartDate + , plOauthToken + , plAdvertiserIds + , plMinStartDate + , plArchived + , plMaxResults + , plMinEndDate + , plFields + , plAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsList@ which the +-- 'PlacementsList' request conforms to. +type PlacementsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> + QueryParams "placementStrategyIds" Int64 :> + QueryParams "contentCategoryIds" Int64 :> + QueryParam "maxEndDate" Text :> + QueryParams "campaignIds" Int64 :> + QueryParams "pricingTypes" Text :> + QueryParam "searchString" Text :> + QueryParams "sizeIds" Int64 :> + QueryParams "ids" Int64 :> + QueryParams "groupIds" Int64 :> + QueryParams "directorySiteIds" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "paymentSource" Text :> + QueryParams "siteIds" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "compatibilities" Text :> + QueryParam "maxStartDate" Text :> + QueryParams "advertiserIds" Int64 + :> + QueryParam "minStartDate" Text :> + QueryParam "archived" Bool :> + QueryParam "maxResults" Int32 + :> + QueryParam "minEndDate" + Text + :> + Get '[JSON] + PlacementsListResponse + +-- | Retrieves a list of placements, possibly filtered. +-- +-- /See:/ 'placementsList' smart constructor. +data PlacementsList = PlacementsList + { _plPlacementStrategyIds :: !(Maybe Int64) + , _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plContentCategoryIds :: !(Maybe Int64) + , _plMaxEndDate :: !(Maybe Text) + , _plUserIp :: !(Maybe Text) + , _plCampaignIds :: !(Maybe Int64) + , _plPricingTypes :: !(Maybe Text) + , _plSearchString :: !(Maybe Text) + , _plSizeIds :: !(Maybe Int64) + , _plIds :: !(Maybe Int64) + , _plProfileId :: !Int64 + , _plGroupIds :: !(Maybe Int64) + , _plDirectorySiteIds :: !(Maybe Int64) + , _plSortOrder :: !(Maybe Text) + , _plPaymentSource :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plSiteIds :: !(Maybe Int64) + , _plPageToken :: !(Maybe Text) + , _plSortField :: !(Maybe Text) + , _plCompatibilities :: !(Maybe Text) + , _plMaxStartDate :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plAdvertiserIds :: !(Maybe Int64) + , _plMinStartDate :: !(Maybe Text) + , _plArchived :: !(Maybe Bool) + , _plMaxResults :: !(Maybe Int32) + , _plMinEndDate :: !(Maybe Text) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plPlacementStrategyIds' +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plContentCategoryIds' +-- +-- * 'plMaxEndDate' +-- +-- * 'plUserIp' +-- +-- * 'plCampaignIds' +-- +-- * 'plPricingTypes' +-- +-- * 'plSearchString' +-- +-- * 'plSizeIds' +-- +-- * 'plIds' +-- +-- * 'plProfileId' +-- +-- * 'plGroupIds' +-- +-- * 'plDirectorySiteIds' +-- +-- * 'plSortOrder' +-- +-- * 'plPaymentSource' +-- +-- * 'plKey' +-- +-- * 'plSiteIds' +-- +-- * 'plPageToken' +-- +-- * 'plSortField' +-- +-- * 'plCompatibilities' +-- +-- * 'plMaxStartDate' +-- +-- * 'plOauthToken' +-- +-- * 'plAdvertiserIds' +-- +-- * 'plMinStartDate' +-- +-- * 'plArchived' +-- +-- * 'plMaxResults' +-- +-- * 'plMinEndDate' +-- +-- * 'plFields' +-- +-- * 'plAlt' +placementsList + :: Int64 -- ^ 'profileId' + -> PlacementsList +placementsList pPlProfileId_ = + PlacementsList + { _plPlacementStrategyIds = Nothing + , _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plContentCategoryIds = Nothing + , _plMaxEndDate = Nothing + , _plUserIp = Nothing + , _plCampaignIds = Nothing + , _plPricingTypes = Nothing + , _plSearchString = Nothing + , _plSizeIds = Nothing + , _plIds = Nothing + , _plProfileId = pPlProfileId_ + , _plGroupIds = Nothing + , _plDirectorySiteIds = Nothing + , _plSortOrder = Nothing + , _plPaymentSource = Nothing + , _plKey = Nothing + , _plSiteIds = Nothing + , _plPageToken = Nothing + , _plSortField = Nothing + , _plCompatibilities = Nothing + , _plMaxStartDate = Nothing + , _plOauthToken = Nothing + , _plAdvertiserIds = Nothing + , _plMinStartDate = Nothing + , _plArchived = Nothing + , _plMaxResults = Nothing + , _plMinEndDate = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Select only placements that are associated with these placement +-- strategies. +plPlacementStrategyIds :: Lens' PlacementsList' (Maybe Int64) +plPlacementStrategyIds + = lens _plPlacementStrategyIds + (\ s a -> s{_plPlacementStrategyIds = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PlacementsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PlacementsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | Select only placements that are associated with these content +-- categories. +plContentCategoryIds :: Lens' PlacementsList' (Maybe Int64) +plContentCategoryIds + = lens _plContentCategoryIds + (\ s a -> s{_plContentCategoryIds = a}) + +-- | Select only placements or placement groups whose end date is on or +-- before the specified maxEndDate. The date should be formatted as +-- \"yyyy-MM-dd\". +plMaxEndDate :: Lens' PlacementsList' (Maybe Text) +plMaxEndDate + = lens _plMaxEndDate (\ s a -> s{_plMaxEndDate = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PlacementsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | Select only placements that belong to these campaigns. +plCampaignIds :: Lens' PlacementsList' (Maybe Int64) +plCampaignIds + = lens _plCampaignIds + (\ s a -> s{_plCampaignIds = a}) + +-- | Select only placements with these pricing types. +plPricingTypes :: Lens' PlacementsList' (Maybe Text) +plPricingTypes + = lens _plPricingTypes + (\ s a -> s{_plPricingTypes = a}) + +-- | Allows searching for placements by name or ID. Wildcards (*) are +-- allowed. For example, \"placement*2015\" will return placements with +-- names like \"placement June 2015\", \"placement May 2015\", or simply +-- \"placements 2015\". Most of the searches also add wildcards implicitly +-- at the start and the end of the search string. For example, a search +-- string of \"placement\" will match placements with name \"my +-- placement\", \"placement 2015\", or simply \"placement\". +plSearchString :: Lens' PlacementsList' (Maybe Text) +plSearchString + = lens _plSearchString + (\ s a -> s{_plSearchString = a}) + +-- | Select only placements that are associated with these sizes. +plSizeIds :: Lens' PlacementsList' (Maybe Int64) +plSizeIds + = lens _plSizeIds (\ s a -> s{_plSizeIds = a}) + +-- | Select only placements with these IDs. +plIds :: Lens' PlacementsList' (Maybe Int64) +plIds = lens _plIds (\ s a -> s{_plIds = a}) + +-- | User profile ID associated with this request. +plProfileId :: Lens' PlacementsList' Int64 +plProfileId + = lens _plProfileId (\ s a -> s{_plProfileId = a}) + +-- | Select only placements that belong to these placement groups. +plGroupIds :: Lens' PlacementsList' (Maybe Int64) +plGroupIds + = lens _plGroupIds (\ s a -> s{_plGroupIds = a}) + +-- | Select only placements that are associated with these directory sites. +plDirectorySiteIds :: Lens' PlacementsList' (Maybe Int64) +plDirectorySiteIds + = lens _plDirectorySiteIds + (\ s a -> s{_plDirectorySiteIds = a}) + +-- | Order of sorted results, default is ASCENDING. +plSortOrder :: Lens' PlacementsList' (Maybe Text) +plSortOrder + = lens _plSortOrder (\ s a -> s{_plSortOrder = a}) + +-- | Select only placements with this payment source. +plPaymentSource :: Lens' PlacementsList' (Maybe Text) +plPaymentSource + = lens _plPaymentSource + (\ s a -> s{_plPaymentSource = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PlacementsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | Select only placements that are associated with these sites. +plSiteIds :: Lens' PlacementsList' (Maybe Int64) +plSiteIds + = lens _plSiteIds (\ s a -> s{_plSiteIds = a}) + +-- | Value of the nextPageToken from the previous result page. +plPageToken :: Lens' PlacementsList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | Field by which to sort the list. +plSortField :: Lens' PlacementsList' (Maybe Text) +plSortField + = lens _plSortField (\ s a -> s{_plSortField = a}) + +-- | Select only placements that are associated with these compatibilities. +-- WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on +-- mobile devices for regular or interstitial ads respectively. APP and +-- APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers +-- to rendering in in-stream video ads developed with the VAST standard. +plCompatibilities :: Lens' PlacementsList' (Maybe Text) +plCompatibilities + = lens _plCompatibilities + (\ s a -> s{_plCompatibilities = a}) + +-- | Select only placements or placement groups whose start date is on or +-- before the specified maxStartDate. The date should be formatted as +-- \"yyyy-MM-dd\". +plMaxStartDate :: Lens' PlacementsList' (Maybe Text) +plMaxStartDate + = lens _plMaxStartDate + (\ s a -> s{_plMaxStartDate = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PlacementsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Select only placements that belong to these advertisers. +plAdvertiserIds :: Lens' PlacementsList' (Maybe Int64) +plAdvertiserIds + = lens _plAdvertiserIds + (\ s a -> s{_plAdvertiserIds = a}) + +-- | Select only placements or placement groups whose start date is on or +-- after the specified minStartDate. The date should be formatted as +-- \"yyyy-MM-dd\". +plMinStartDate :: Lens' PlacementsList' (Maybe Text) +plMinStartDate + = lens _plMinStartDate + (\ s a -> s{_plMinStartDate = a}) + +-- | Select only archived placements. Don\'t set this field to select both +-- archived and non-archived placements. +plArchived :: Lens' PlacementsList' (Maybe Bool) +plArchived + = lens _plArchived (\ s a -> s{_plArchived = a}) + +-- | Maximum number of results to return. +plMaxResults :: Lens' PlacementsList' (Maybe Int32) +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Select only placements or placement groups whose end date is on or after +-- the specified minEndDate. The date should be formatted as +-- \"yyyy-MM-dd\". +plMinEndDate :: Lens' PlacementsList' (Maybe Text) +plMinEndDate + = lens _plMinEndDate (\ s a -> s{_plMinEndDate = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PlacementsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PlacementsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PlacementsList' where + type Rs PlacementsList' = PlacementsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsList{..} + = go _plPlacementStrategyIds _plQuotaUser + _plPrettyPrint + _plContentCategoryIds + _plMaxEndDate + _plUserIp + _plCampaignIds + _plPricingTypes + _plSearchString + _plSizeIds + _plIds + _plProfileId + _plGroupIds + _plDirectorySiteIds + _plSortOrder + _plPaymentSource + _plKey + _plSiteIds + _plPageToken + _plSortField + _plCompatibilities + _plMaxStartDate + _plOauthToken + _plAdvertiserIds + _plMinStartDate + _plArchived + _plMaxResults + _plMinEndDate + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PlacementsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Patch.hs new file mode 100644 index 000000000..4772b9098 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Patch.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement. This method supports patch semantics. +-- +-- /See:/ for @DfareportingPlacementsPatch@. +module DFAReporting.Placements.Patch + ( + -- * REST Resource + PlacementsPatchAPI + + -- * Creating a Request + , placementsPatch + , PlacementsPatch + + -- * Request Lenses + , plaQuotaUser + , plaPrettyPrint + , plaUserIp + , plaProfileId + , plaKey + , plaId + , plaOauthToken + , plaFields + , plaAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsPatch@ which the +-- 'PlacementsPatch' request conforms to. +type PlacementsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> + QueryParam "id" Int64 :> Patch '[JSON] Placement + +-- | Updates an existing placement. This method supports patch semantics. +-- +-- /See:/ 'placementsPatch' smart constructor. +data PlacementsPatch = PlacementsPatch + { _plaQuotaUser :: !(Maybe Text) + , _plaPrettyPrint :: !Bool + , _plaUserIp :: !(Maybe Text) + , _plaProfileId :: !Int64 + , _plaKey :: !(Maybe Text) + , _plaId :: !Int64 + , _plaOauthToken :: !(Maybe Text) + , _plaFields :: !(Maybe Text) + , _plaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaQuotaUser' +-- +-- * 'plaPrettyPrint' +-- +-- * 'plaUserIp' +-- +-- * 'plaProfileId' +-- +-- * 'plaKey' +-- +-- * 'plaId' +-- +-- * 'plaOauthToken' +-- +-- * 'plaFields' +-- +-- * 'plaAlt' +placementsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlacementsPatch +placementsPatch pPlaProfileId_ pPlaId_ = + PlacementsPatch + { _plaQuotaUser = Nothing + , _plaPrettyPrint = True + , _plaUserIp = Nothing + , _plaProfileId = pPlaProfileId_ + , _plaKey = Nothing + , _plaId = pPlaId_ + , _plaOauthToken = Nothing + , _plaFields = Nothing + , _plaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plaQuotaUser :: Lens' PlacementsPatch' (Maybe Text) +plaQuotaUser + = lens _plaQuotaUser (\ s a -> s{_plaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plaPrettyPrint :: Lens' PlacementsPatch' Bool +plaPrettyPrint + = lens _plaPrettyPrint + (\ s a -> s{_plaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plaUserIp :: Lens' PlacementsPatch' (Maybe Text) +plaUserIp + = lens _plaUserIp (\ s a -> s{_plaUserIp = a}) + +-- | User profile ID associated with this request. +plaProfileId :: Lens' PlacementsPatch' Int64 +plaProfileId + = lens _plaProfileId (\ s a -> s{_plaProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plaKey :: Lens' PlacementsPatch' (Maybe Text) +plaKey = lens _plaKey (\ s a -> s{_plaKey = a}) + +-- | Placement ID. +plaId :: Lens' PlacementsPatch' Int64 +plaId = lens _plaId (\ s a -> s{_plaId = a}) + +-- | OAuth 2.0 token for the current user. +plaOauthToken :: Lens' PlacementsPatch' (Maybe Text) +plaOauthToken + = lens _plaOauthToken + (\ s a -> s{_plaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +plaFields :: Lens' PlacementsPatch' (Maybe Text) +plaFields + = lens _plaFields (\ s a -> s{_plaFields = a}) + +-- | Data format for the response. +plaAlt :: Lens' PlacementsPatch' Text +plaAlt = lens _plaAlt (\ s a -> s{_plaAlt = a}) + +instance GoogleRequest PlacementsPatch' where + type Rs PlacementsPatch' = Placement + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsPatch{..} + = go _plaQuotaUser _plaPrettyPrint _plaUserIp + _plaProfileId + _plaKey + (Just _plaId) + _plaOauthToken + _plaFields + _plaAlt + where go + = clientWithRoute (Proxy :: Proxy PlacementsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Update.hs new file mode 100644 index 000000000..5ca753e7b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Update.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Placements.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing placement. +-- +-- /See:/ for @DfareportingPlacementsUpdate@. +module DFAReporting.Placements.Update + ( + -- * REST Resource + PlacementsUpdateAPI + + -- * Creating a Request + , placementsUpdate + , PlacementsUpdate + + -- * Request Lenses + , puQuotaUser + , puPrettyPrint + , puUserIp + , puProfileId + , puKey + , puOauthToken + , puFields + , puAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlacementsUpdate@ which the +-- 'PlacementsUpdate' request conforms to. +type PlacementsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "placements" :> Put '[JSON] Placement + +-- | Updates an existing placement. +-- +-- /See:/ 'placementsUpdate' smart constructor. +data PlacementsUpdate = PlacementsUpdate + { _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puProfileId :: !Int64 + , _puKey :: !(Maybe Text) + , _puOauthToken :: !(Maybe Text) + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlacementsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puProfileId' +-- +-- * 'puKey' +-- +-- * 'puOauthToken' +-- +-- * 'puFields' +-- +-- * 'puAlt' +placementsUpdate + :: Int64 -- ^ 'profileId' + -> PlacementsUpdate +placementsUpdate pPuProfileId_ = + PlacementsUpdate + { _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puProfileId = pPuProfileId_ + , _puKey = Nothing + , _puOauthToken = Nothing + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PlacementsUpdate' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PlacementsUpdate' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PlacementsUpdate' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | User profile ID associated with this request. +puProfileId :: Lens' PlacementsUpdate' Int64 +puProfileId + = lens _puProfileId (\ s a -> s{_puProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PlacementsUpdate' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PlacementsUpdate' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PlacementsUpdate' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PlacementsUpdate' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PlacementsUpdate' where + type Rs PlacementsUpdate' = Placement + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlacementsUpdate{..} + = go _puQuotaUser _puPrettyPrint _puUserIp + _puProfileId + _puKey + _puOauthToken + _puFields + _puAlt + where go + = clientWithRoute + (Proxy :: Proxy PlacementsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/Get.hs new file mode 100644 index 000000000..03b63f334 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlatformTypes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one platform type by ID. +-- +-- /See:/ for @DfareportingPlatformTypesGet@. +module DFAReporting.PlatformTypes.Get + ( + -- * REST Resource + PlatformTypesGetAPI + + -- * Creating a Request + , platformTypesGet + , PlatformTypesGet + + -- * Request Lenses + , ptgQuotaUser + , ptgPrettyPrint + , ptgUserIp + , ptgProfileId + , ptgKey + , ptgId + , ptgOauthToken + , ptgFields + , ptgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlatformTypesGet@ which the +-- 'PlatformTypesGet' request conforms to. +type PlatformTypesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "platformTypes" :> + Capture "id" Int64 :> Get '[JSON] PlatformType + +-- | Gets one platform type by ID. +-- +-- /See:/ 'platformTypesGet' smart constructor. +data PlatformTypesGet = PlatformTypesGet + { _ptgQuotaUser :: !(Maybe Text) + , _ptgPrettyPrint :: !Bool + , _ptgUserIp :: !(Maybe Text) + , _ptgProfileId :: !Int64 + , _ptgKey :: !(Maybe Text) + , _ptgId :: !Int64 + , _ptgOauthToken :: !(Maybe Text) + , _ptgFields :: !(Maybe Text) + , _ptgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlatformTypesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptgQuotaUser' +-- +-- * 'ptgPrettyPrint' +-- +-- * 'ptgUserIp' +-- +-- * 'ptgProfileId' +-- +-- * 'ptgKey' +-- +-- * 'ptgId' +-- +-- * 'ptgOauthToken' +-- +-- * 'ptgFields' +-- +-- * 'ptgAlt' +platformTypesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> PlatformTypesGet +platformTypesGet pPtgProfileId_ pPtgId_ = + PlatformTypesGet + { _ptgQuotaUser = Nothing + , _ptgPrettyPrint = True + , _ptgUserIp = Nothing + , _ptgProfileId = pPtgProfileId_ + , _ptgKey = Nothing + , _ptgId = pPtgId_ + , _ptgOauthToken = Nothing + , _ptgFields = Nothing + , _ptgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ptgQuotaUser :: Lens' PlatformTypesGet' (Maybe Text) +ptgQuotaUser + = lens _ptgQuotaUser (\ s a -> s{_ptgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptgPrettyPrint :: Lens' PlatformTypesGet' Bool +ptgPrettyPrint + = lens _ptgPrettyPrint + (\ s a -> s{_ptgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ptgUserIp :: Lens' PlatformTypesGet' (Maybe Text) +ptgUserIp + = lens _ptgUserIp (\ s a -> s{_ptgUserIp = a}) + +-- | User profile ID associated with this request. +ptgProfileId :: Lens' PlatformTypesGet' Int64 +ptgProfileId + = lens _ptgProfileId (\ s a -> s{_ptgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptgKey :: Lens' PlatformTypesGet' (Maybe Text) +ptgKey = lens _ptgKey (\ s a -> s{_ptgKey = a}) + +-- | Platform type ID. +ptgId :: Lens' PlatformTypesGet' Int64 +ptgId = lens _ptgId (\ s a -> s{_ptgId = a}) + +-- | OAuth 2.0 token for the current user. +ptgOauthToken :: Lens' PlatformTypesGet' (Maybe Text) +ptgOauthToken + = lens _ptgOauthToken + (\ s a -> s{_ptgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptgFields :: Lens' PlatformTypesGet' (Maybe Text) +ptgFields + = lens _ptgFields (\ s a -> s{_ptgFields = a}) + +-- | Data format for the response. +ptgAlt :: Lens' PlatformTypesGet' Text +ptgAlt = lens _ptgAlt (\ s a -> s{_ptgAlt = a}) + +instance GoogleRequest PlatformTypesGet' where + type Rs PlatformTypesGet' = PlatformType + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlatformTypesGet{..} + = go _ptgQuotaUser _ptgPrettyPrint _ptgUserIp + _ptgProfileId + _ptgKey + _ptgId + _ptgOauthToken + _ptgFields + _ptgAlt + where go + = clientWithRoute + (Proxy :: Proxy PlatformTypesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/List.hs new file mode 100644 index 000000000..a80fe79f8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlatformTypes/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PlatformTypes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of platform types. +-- +-- /See:/ for @DfareportingPlatformTypesList@. +module DFAReporting.PlatformTypes.List + ( + -- * REST Resource + PlatformTypesListAPI + + -- * Creating a Request + , platformTypesList + , PlatformTypesList + + -- * Request Lenses + , ptlQuotaUser + , ptlPrettyPrint + , ptlUserIp + , ptlProfileId + , ptlKey + , ptlOauthToken + , ptlFields + , ptlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPlatformTypesList@ which the +-- 'PlatformTypesList' request conforms to. +type PlatformTypesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "platformTypes" :> + Get '[JSON] PlatformTypesListResponse + +-- | Retrieves a list of platform types. +-- +-- /See:/ 'platformTypesList' smart constructor. +data PlatformTypesList = PlatformTypesList + { _ptlQuotaUser :: !(Maybe Text) + , _ptlPrettyPrint :: !Bool + , _ptlUserIp :: !(Maybe Text) + , _ptlProfileId :: !Int64 + , _ptlKey :: !(Maybe Text) + , _ptlOauthToken :: !(Maybe Text) + , _ptlFields :: !(Maybe Text) + , _ptlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlatformTypesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptlQuotaUser' +-- +-- * 'ptlPrettyPrint' +-- +-- * 'ptlUserIp' +-- +-- * 'ptlProfileId' +-- +-- * 'ptlKey' +-- +-- * 'ptlOauthToken' +-- +-- * 'ptlFields' +-- +-- * 'ptlAlt' +platformTypesList + :: Int64 -- ^ 'profileId' + -> PlatformTypesList +platformTypesList pPtlProfileId_ = + PlatformTypesList + { _ptlQuotaUser = Nothing + , _ptlPrettyPrint = True + , _ptlUserIp = Nothing + , _ptlProfileId = pPtlProfileId_ + , _ptlKey = Nothing + , _ptlOauthToken = Nothing + , _ptlFields = Nothing + , _ptlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ptlQuotaUser :: Lens' PlatformTypesList' (Maybe Text) +ptlQuotaUser + = lens _ptlQuotaUser (\ s a -> s{_ptlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptlPrettyPrint :: Lens' PlatformTypesList' Bool +ptlPrettyPrint + = lens _ptlPrettyPrint + (\ s a -> s{_ptlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ptlUserIp :: Lens' PlatformTypesList' (Maybe Text) +ptlUserIp + = lens _ptlUserIp (\ s a -> s{_ptlUserIp = a}) + +-- | User profile ID associated with this request. +ptlProfileId :: Lens' PlatformTypesList' Int64 +ptlProfileId + = lens _ptlProfileId (\ s a -> s{_ptlProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptlKey :: Lens' PlatformTypesList' (Maybe Text) +ptlKey = lens _ptlKey (\ s a -> s{_ptlKey = a}) + +-- | OAuth 2.0 token for the current user. +ptlOauthToken :: Lens' PlatformTypesList' (Maybe Text) +ptlOauthToken + = lens _ptlOauthToken + (\ s a -> s{_ptlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptlFields :: Lens' PlatformTypesList' (Maybe Text) +ptlFields + = lens _ptlFields (\ s a -> s{_ptlFields = a}) + +-- | Data format for the response. +ptlAlt :: Lens' PlatformTypesList' Text +ptlAlt = lens _ptlAlt (\ s a -> s{_ptlAlt = a}) + +instance GoogleRequest PlatformTypesList' where + type Rs PlatformTypesList' = + PlatformTypesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PlatformTypesList{..} + = go _ptlQuotaUser _ptlPrettyPrint _ptlUserIp + _ptlProfileId + _ptlKey + _ptlOauthToken + _ptlFields + _ptlAlt + where go + = clientWithRoute + (Proxy :: Proxy PlatformTypesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/Get.hs new file mode 100644 index 000000000..016f9b93b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PostalCodes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one postal code by ID. +-- +-- /See:/ for @DfareportingPostalCodesGet@. +module DFAReporting.PostalCodes.Get + ( + -- * REST Resource + PostalCodesGetAPI + + -- * Creating a Request + , postalCodesGet + , PostalCodesGet + + -- * Request Lenses + , pcgQuotaUser + , pcgPrettyPrint + , pcgUserIp + , pcgProfileId + , pcgKey + , pcgCode + , pcgOauthToken + , pcgFields + , pcgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPostalCodesGet@ which the +-- 'PostalCodesGet' request conforms to. +type PostalCodesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "postalCodes" :> + Capture "code" Text :> Get '[JSON] PostalCode + +-- | Gets one postal code by ID. +-- +-- /See:/ 'postalCodesGet' smart constructor. +data PostalCodesGet = PostalCodesGet + { _pcgQuotaUser :: !(Maybe Text) + , _pcgPrettyPrint :: !Bool + , _pcgUserIp :: !(Maybe Text) + , _pcgProfileId :: !Int64 + , _pcgKey :: !(Maybe Text) + , _pcgCode :: !Text + , _pcgOauthToken :: !(Maybe Text) + , _pcgFields :: !(Maybe Text) + , _pcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostalCodesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcgQuotaUser' +-- +-- * 'pcgPrettyPrint' +-- +-- * 'pcgUserIp' +-- +-- * 'pcgProfileId' +-- +-- * 'pcgKey' +-- +-- * 'pcgCode' +-- +-- * 'pcgOauthToken' +-- +-- * 'pcgFields' +-- +-- * 'pcgAlt' +postalCodesGet + :: Int64 -- ^ 'profileId' + -> Text -- ^ 'code' + -> PostalCodesGet +postalCodesGet pPcgProfileId_ pPcgCode_ = + PostalCodesGet + { _pcgQuotaUser = Nothing + , _pcgPrettyPrint = True + , _pcgUserIp = Nothing + , _pcgProfileId = pPcgProfileId_ + , _pcgKey = Nothing + , _pcgCode = pPcgCode_ + , _pcgOauthToken = Nothing + , _pcgFields = Nothing + , _pcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pcgQuotaUser :: Lens' PostalCodesGet' (Maybe Text) +pcgQuotaUser + = lens _pcgQuotaUser (\ s a -> s{_pcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcgPrettyPrint :: Lens' PostalCodesGet' Bool +pcgPrettyPrint + = lens _pcgPrettyPrint + (\ s a -> s{_pcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pcgUserIp :: Lens' PostalCodesGet' (Maybe Text) +pcgUserIp + = lens _pcgUserIp (\ s a -> s{_pcgUserIp = a}) + +-- | User profile ID associated with this request. +pcgProfileId :: Lens' PostalCodesGet' Int64 +pcgProfileId + = lens _pcgProfileId (\ s a -> s{_pcgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcgKey :: Lens' PostalCodesGet' (Maybe Text) +pcgKey = lens _pcgKey (\ s a -> s{_pcgKey = a}) + +-- | Postal code ID. +pcgCode :: Lens' PostalCodesGet' Text +pcgCode = lens _pcgCode (\ s a -> s{_pcgCode = a}) + +-- | OAuth 2.0 token for the current user. +pcgOauthToken :: Lens' PostalCodesGet' (Maybe Text) +pcgOauthToken + = lens _pcgOauthToken + (\ s a -> s{_pcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcgFields :: Lens' PostalCodesGet' (Maybe Text) +pcgFields + = lens _pcgFields (\ s a -> s{_pcgFields = a}) + +-- | Data format for the response. +pcgAlt :: Lens' PostalCodesGet' Text +pcgAlt = lens _pcgAlt (\ s a -> s{_pcgAlt = a}) + +instance GoogleRequest PostalCodesGet' where + type Rs PostalCodesGet' = PostalCode + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PostalCodesGet{..} + = go _pcgQuotaUser _pcgPrettyPrint _pcgUserIp + _pcgProfileId + _pcgKey + _pcgCode + _pcgOauthToken + _pcgFields + _pcgAlt + where go + = clientWithRoute (Proxy :: Proxy PostalCodesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/List.hs new file mode 100644 index 000000000..5f3313054 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PostalCodes/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.PostalCodes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of postal codes. +-- +-- /See:/ for @DfareportingPostalCodesList@. +module DFAReporting.PostalCodes.List + ( + -- * REST Resource + PostalCodesListAPI + + -- * Creating a Request + , postalCodesList + , PostalCodesList + + -- * Request Lenses + , pclQuotaUser + , pclPrettyPrint + , pclUserIp + , pclProfileId + , pclKey + , pclOauthToken + , pclFields + , pclAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingPostalCodesList@ which the +-- 'PostalCodesList' request conforms to. +type PostalCodesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "postalCodes" :> Get '[JSON] PostalCodesListResponse + +-- | Retrieves a list of postal codes. +-- +-- /See:/ 'postalCodesList' smart constructor. +data PostalCodesList = PostalCodesList + { _pclQuotaUser :: !(Maybe Text) + , _pclPrettyPrint :: !Bool + , _pclUserIp :: !(Maybe Text) + , _pclProfileId :: !Int64 + , _pclKey :: !(Maybe Text) + , _pclOauthToken :: !(Maybe Text) + , _pclFields :: !(Maybe Text) + , _pclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PostalCodesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pclQuotaUser' +-- +-- * 'pclPrettyPrint' +-- +-- * 'pclUserIp' +-- +-- * 'pclProfileId' +-- +-- * 'pclKey' +-- +-- * 'pclOauthToken' +-- +-- * 'pclFields' +-- +-- * 'pclAlt' +postalCodesList + :: Int64 -- ^ 'profileId' + -> PostalCodesList +postalCodesList pPclProfileId_ = + PostalCodesList + { _pclQuotaUser = Nothing + , _pclPrettyPrint = True + , _pclUserIp = Nothing + , _pclProfileId = pPclProfileId_ + , _pclKey = Nothing + , _pclOauthToken = Nothing + , _pclFields = Nothing + , _pclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pclQuotaUser :: Lens' PostalCodesList' (Maybe Text) +pclQuotaUser + = lens _pclQuotaUser (\ s a -> s{_pclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pclPrettyPrint :: Lens' PostalCodesList' Bool +pclPrettyPrint + = lens _pclPrettyPrint + (\ s a -> s{_pclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pclUserIp :: Lens' PostalCodesList' (Maybe Text) +pclUserIp + = lens _pclUserIp (\ s a -> s{_pclUserIp = a}) + +-- | User profile ID associated with this request. +pclProfileId :: Lens' PostalCodesList' Int64 +pclProfileId + = lens _pclProfileId (\ s a -> s{_pclProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pclKey :: Lens' PostalCodesList' (Maybe Text) +pclKey = lens _pclKey (\ s a -> s{_pclKey = a}) + +-- | OAuth 2.0 token for the current user. +pclOauthToken :: Lens' PostalCodesList' (Maybe Text) +pclOauthToken + = lens _pclOauthToken + (\ s a -> s{_pclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pclFields :: Lens' PostalCodesList' (Maybe Text) +pclFields + = lens _pclFields (\ s a -> s{_pclFields = a}) + +-- | Data format for the response. +pclAlt :: Lens' PostalCodesList' Text +pclAlt = lens _pclAlt (\ s a -> s{_pclAlt = a}) + +instance GoogleRequest PostalCodesList' where + type Rs PostalCodesList' = PostalCodesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u PostalCodesList{..} + = go _pclQuotaUser _pclPrettyPrint _pclUserIp + _pclProfileId + _pclKey + _pclOauthToken + _pclFields + _pclAlt + where go + = clientWithRoute (Proxy :: Proxy PostalCodesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs new file mode 100644 index 000000000..001e43522 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Projects.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one project by ID. +-- +-- /See:/ for @DfareportingProjectsGet@. +module DFAReporting.Projects.Get + ( + -- * REST Resource + ProjectsGetAPI + + -- * Creating a Request + , projectsGet + , ProjectsGet + + -- * Request Lenses + , prorQuotaUser + , prorPrettyPrint + , prorUserIp + , prorProfileId + , prorKey + , prorId + , prorOauthToken + , prorFields + , prorAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingProjectsGet@ which the +-- 'ProjectsGet' request conforms to. +type ProjectsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + Capture "id" Int64 :> Get '[JSON] Project + +-- | Gets one project by ID. +-- +-- /See:/ 'projectsGet' smart constructor. +data ProjectsGet = ProjectsGet + { _prorQuotaUser :: !(Maybe Text) + , _prorPrettyPrint :: !Bool + , _prorUserIp :: !(Maybe Text) + , _prorProfileId :: !Int64 + , _prorKey :: !(Maybe Text) + , _prorId :: !Int64 + , _prorOauthToken :: !(Maybe Text) + , _prorFields :: !(Maybe Text) + , _prorAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prorQuotaUser' +-- +-- * 'prorPrettyPrint' +-- +-- * 'prorUserIp' +-- +-- * 'prorProfileId' +-- +-- * 'prorKey' +-- +-- * 'prorId' +-- +-- * 'prorOauthToken' +-- +-- * 'prorFields' +-- +-- * 'prorAlt' +projectsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> ProjectsGet +projectsGet pProrProfileId_ pProrId_ = + ProjectsGet + { _prorQuotaUser = Nothing + , _prorPrettyPrint = True + , _prorUserIp = Nothing + , _prorProfileId = pProrProfileId_ + , _prorKey = Nothing + , _prorId = pProrId_ + , _prorOauthToken = Nothing + , _prorFields = Nothing + , _prorAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prorQuotaUser :: Lens' ProjectsGet' (Maybe Text) +prorQuotaUser + = lens _prorQuotaUser + (\ s a -> s{_prorQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prorPrettyPrint :: Lens' ProjectsGet' Bool +prorPrettyPrint + = lens _prorPrettyPrint + (\ s a -> s{_prorPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prorUserIp :: Lens' ProjectsGet' (Maybe Text) +prorUserIp + = lens _prorUserIp (\ s a -> s{_prorUserIp = a}) + +-- | User profile ID associated with this request. +prorProfileId :: Lens' ProjectsGet' Int64 +prorProfileId + = lens _prorProfileId + (\ s a -> s{_prorProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prorKey :: Lens' ProjectsGet' (Maybe Text) +prorKey = lens _prorKey (\ s a -> s{_prorKey = a}) + +-- | Project ID. +prorId :: Lens' ProjectsGet' Int64 +prorId = lens _prorId (\ s a -> s{_prorId = a}) + +-- | OAuth 2.0 token for the current user. +prorOauthToken :: Lens' ProjectsGet' (Maybe Text) +prorOauthToken + = lens _prorOauthToken + (\ s a -> s{_prorOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prorFields :: Lens' ProjectsGet' (Maybe Text) +prorFields + = lens _prorFields (\ s a -> s{_prorFields = a}) + +-- | Data format for the response. +prorAlt :: Lens' ProjectsGet' Text +prorAlt = lens _prorAlt (\ s a -> s{_prorAlt = a}) + +instance GoogleRequest ProjectsGet' where + type Rs ProjectsGet' = Project + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ProjectsGet{..} + = go _prorQuotaUser _prorPrettyPrint _prorUserIp + _prorProfileId + _prorKey + _prorId + _prorOauthToken + _prorFields + _prorAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/List.hs new file mode 100644 index 000000000..c9a8c991c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/List.hs @@ -0,0 +1,250 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Projects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of projects, possibly filtered. +-- +-- /See:/ for @DfareportingProjectsList@. +module DFAReporting.Projects.List + ( + -- * REST Resource + ProjectsListAPI + + -- * Creating a Request + , projectsList + , ProjectsList + + -- * Request Lenses + , proQuotaUser + , proPrettyPrint + , proUserIp + , proSearchString + , proIds + , proProfileId + , proSortOrder + , proKey + , proPageToken + , proSortField + , proOauthToken + , proAdvertiserIds + , proMaxResults + , proFields + , proAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingProjectsList@ which the +-- 'ProjectsList' request conforms to. +type ProjectsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "projects" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParams "advertiserIds" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ProjectsListResponse + +-- | Retrieves a list of projects, possibly filtered. +-- +-- /See:/ 'projectsList' smart constructor. +data ProjectsList = ProjectsList + { _proQuotaUser :: !(Maybe Text) + , _proPrettyPrint :: !Bool + , _proUserIp :: !(Maybe Text) + , _proSearchString :: !(Maybe Text) + , _proIds :: !(Maybe Int64) + , _proProfileId :: !Int64 + , _proSortOrder :: !(Maybe Text) + , _proKey :: !(Maybe Text) + , _proPageToken :: !(Maybe Text) + , _proSortField :: !(Maybe Text) + , _proOauthToken :: !(Maybe Text) + , _proAdvertiserIds :: !(Maybe Int64) + , _proMaxResults :: !(Maybe Int32) + , _proFields :: !(Maybe Text) + , _proAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proQuotaUser' +-- +-- * 'proPrettyPrint' +-- +-- * 'proUserIp' +-- +-- * 'proSearchString' +-- +-- * 'proIds' +-- +-- * 'proProfileId' +-- +-- * 'proSortOrder' +-- +-- * 'proKey' +-- +-- * 'proPageToken' +-- +-- * 'proSortField' +-- +-- * 'proOauthToken' +-- +-- * 'proAdvertiserIds' +-- +-- * 'proMaxResults' +-- +-- * 'proFields' +-- +-- * 'proAlt' +projectsList + :: Int64 -- ^ 'profileId' + -> ProjectsList +projectsList pProProfileId_ = + ProjectsList + { _proQuotaUser = Nothing + , _proPrettyPrint = True + , _proUserIp = Nothing + , _proSearchString = Nothing + , _proIds = Nothing + , _proProfileId = pProProfileId_ + , _proSortOrder = Nothing + , _proKey = Nothing + , _proPageToken = Nothing + , _proSortField = Nothing + , _proOauthToken = Nothing + , _proAdvertiserIds = Nothing + , _proMaxResults = Nothing + , _proFields = Nothing + , _proAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +proQuotaUser :: Lens' ProjectsList' (Maybe Text) +proQuotaUser + = lens _proQuotaUser (\ s a -> s{_proQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +proPrettyPrint :: Lens' ProjectsList' Bool +proPrettyPrint + = lens _proPrettyPrint + (\ s a -> s{_proPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +proUserIp :: Lens' ProjectsList' (Maybe Text) +proUserIp + = lens _proUserIp (\ s a -> s{_proUserIp = a}) + +-- | Allows searching for projects by name or ID. Wildcards (*) are allowed. +-- For example, \"project*2015\" will return projects with names like +-- \"project June 2015\", \"project April 2015\", or simply \"project +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"project\" will match projects with name \"my project\", \"project +-- 2015\", or simply \"project\". +proSearchString :: Lens' ProjectsList' (Maybe Text) +proSearchString + = lens _proSearchString + (\ s a -> s{_proSearchString = a}) + +-- | Select only projects with these IDs. +proIds :: Lens' ProjectsList' (Maybe Int64) +proIds = lens _proIds (\ s a -> s{_proIds = a}) + +-- | User profile ID associated with this request. +proProfileId :: Lens' ProjectsList' Int64 +proProfileId + = lens _proProfileId (\ s a -> s{_proProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +proSortOrder :: Lens' ProjectsList' (Maybe Text) +proSortOrder + = lens _proSortOrder (\ s a -> s{_proSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +proKey :: Lens' ProjectsList' (Maybe Text) +proKey = lens _proKey (\ s a -> s{_proKey = a}) + +-- | Value of the nextPageToken from the previous result page. +proPageToken :: Lens' ProjectsList' (Maybe Text) +proPageToken + = lens _proPageToken (\ s a -> s{_proPageToken = a}) + +-- | Field by which to sort the list. +proSortField :: Lens' ProjectsList' (Maybe Text) +proSortField + = lens _proSortField (\ s a -> s{_proSortField = a}) + +-- | OAuth 2.0 token for the current user. +proOauthToken :: Lens' ProjectsList' (Maybe Text) +proOauthToken + = lens _proOauthToken + (\ s a -> s{_proOauthToken = a}) + +-- | Select only projects with these advertiser IDs. +proAdvertiserIds :: Lens' ProjectsList' (Maybe Int64) +proAdvertiserIds + = lens _proAdvertiserIds + (\ s a -> s{_proAdvertiserIds = a}) + +-- | Maximum number of results to return. +proMaxResults :: Lens' ProjectsList' (Maybe Int32) +proMaxResults + = lens _proMaxResults + (\ s a -> s{_proMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +proFields :: Lens' ProjectsList' (Maybe Text) +proFields + = lens _proFields (\ s a -> s{_proFields = a}) + +-- | Data format for the response. +proAlt :: Lens' ProjectsList' Text +proAlt = lens _proAlt (\ s a -> s{_proAlt = a}) + +instance GoogleRequest ProjectsList' where + type Rs ProjectsList' = ProjectsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ProjectsList{..} + = go _proQuotaUser _proPrettyPrint _proUserIp + _proSearchString + _proIds + _proProfileId + _proSortOrder + _proKey + _proPageToken + _proSortField + _proOauthToken + _proAdvertiserIds + _proMaxResults + _proFields + _proAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Regions/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Regions/List.hs new file mode 100644 index 000000000..e10260b2c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Regions/List.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Regions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of regions. +-- +-- /See:/ for @DfareportingRegionsList@. +module DFAReporting.Regions.List + ( + -- * REST Resource + RegionsListAPI + + -- * Creating a Request + , regionsList + , RegionsList + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rUserIp + , rProfileId + , rKey + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRegionsList@ which the +-- 'RegionsList' request conforms to. +type RegionsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "regions" :> Get '[JSON] RegionsListResponse + +-- | Retrieves a list of regions. +-- +-- /See:/ 'regionsList' smart constructor. +data RegionsList = RegionsList + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rUserIp :: !(Maybe Text) + , _rProfileId :: !Int64 + , _rKey :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RegionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rUserIp' +-- +-- * 'rProfileId' +-- +-- * 'rKey' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +regionsList + :: Int64 -- ^ 'profileId' + -> RegionsList +regionsList pRProfileId_ = + RegionsList + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rUserIp = Nothing + , _rProfileId = pRProfileId_ + , _rKey = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' RegionsList' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' RegionsList' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' RegionsList' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | User profile ID associated with this request. +rProfileId :: Lens' RegionsList' Int64 +rProfileId + = lens _rProfileId (\ s a -> s{_rProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' RegionsList' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' RegionsList' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' RegionsList' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' RegionsList' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest RegionsList' where + type Rs RegionsList' = RegionsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RegionsList{..} + = go _rQuotaUser _rPrettyPrint _rUserIp _rProfileId + _rKey + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy RegionsListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Get.hs new file mode 100644 index 000000000..d1666d639 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Get.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingListShares.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one remarketing list share by remarketing list ID. +-- +-- /See:/ for @DfareportingRemarketingListSharesGet@. +module DFAReporting.RemarketingListShares.Get + ( + -- * REST Resource + RemarketingListSharesGetAPI + + -- * Creating a Request + , remarketingListSharesGet + , RemarketingListSharesGet + + -- * Request Lenses + , rlsgQuotaUser + , rlsgPrettyPrint + , rlsgUserIp + , rlsgProfileId + , rlsgRemarketingListId + , rlsgKey + , rlsgOauthToken + , rlsgFields + , rlsgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListSharesGet@ which the +-- 'RemarketingListSharesGet' request conforms to. +type RemarketingListSharesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingListShares" :> + Capture "remarketingListId" Int64 :> + Get '[JSON] RemarketingListShare + +-- | Gets one remarketing list share by remarketing list ID. +-- +-- /See:/ 'remarketingListSharesGet' smart constructor. +data RemarketingListSharesGet = RemarketingListSharesGet + { _rlsgQuotaUser :: !(Maybe Text) + , _rlsgPrettyPrint :: !Bool + , _rlsgUserIp :: !(Maybe Text) + , _rlsgProfileId :: !Int64 + , _rlsgRemarketingListId :: !Int64 + , _rlsgKey :: !(Maybe Text) + , _rlsgOauthToken :: !(Maybe Text) + , _rlsgFields :: !(Maybe Text) + , _rlsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListSharesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlsgQuotaUser' +-- +-- * 'rlsgPrettyPrint' +-- +-- * 'rlsgUserIp' +-- +-- * 'rlsgProfileId' +-- +-- * 'rlsgRemarketingListId' +-- +-- * 'rlsgKey' +-- +-- * 'rlsgOauthToken' +-- +-- * 'rlsgFields' +-- +-- * 'rlsgAlt' +remarketingListSharesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'remarketingListId' + -> RemarketingListSharesGet +remarketingListSharesGet pRlsgProfileId_ pRlsgRemarketingListId_ = + RemarketingListSharesGet + { _rlsgQuotaUser = Nothing + , _rlsgPrettyPrint = True + , _rlsgUserIp = Nothing + , _rlsgProfileId = pRlsgProfileId_ + , _rlsgRemarketingListId = pRlsgRemarketingListId_ + , _rlsgKey = Nothing + , _rlsgOauthToken = Nothing + , _rlsgFields = Nothing + , _rlsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlsgQuotaUser :: Lens' RemarketingListSharesGet' (Maybe Text) +rlsgQuotaUser + = lens _rlsgQuotaUser + (\ s a -> s{_rlsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlsgPrettyPrint :: Lens' RemarketingListSharesGet' Bool +rlsgPrettyPrint + = lens _rlsgPrettyPrint + (\ s a -> s{_rlsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlsgUserIp :: Lens' RemarketingListSharesGet' (Maybe Text) +rlsgUserIp + = lens _rlsgUserIp (\ s a -> s{_rlsgUserIp = a}) + +-- | User profile ID associated with this request. +rlsgProfileId :: Lens' RemarketingListSharesGet' Int64 +rlsgProfileId + = lens _rlsgProfileId + (\ s a -> s{_rlsgProfileId = a}) + +-- | Remarketing list ID. +rlsgRemarketingListId :: Lens' RemarketingListSharesGet' Int64 +rlsgRemarketingListId + = lens _rlsgRemarketingListId + (\ s a -> s{_rlsgRemarketingListId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlsgKey :: Lens' RemarketingListSharesGet' (Maybe Text) +rlsgKey = lens _rlsgKey (\ s a -> s{_rlsgKey = a}) + +-- | OAuth 2.0 token for the current user. +rlsgOauthToken :: Lens' RemarketingListSharesGet' (Maybe Text) +rlsgOauthToken + = lens _rlsgOauthToken + (\ s a -> s{_rlsgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlsgFields :: Lens' RemarketingListSharesGet' (Maybe Text) +rlsgFields + = lens _rlsgFields (\ s a -> s{_rlsgFields = a}) + +-- | Data format for the response. +rlsgAlt :: Lens' RemarketingListSharesGet' Text +rlsgAlt = lens _rlsgAlt (\ s a -> s{_rlsgAlt = a}) + +instance GoogleRequest RemarketingListSharesGet' + where + type Rs RemarketingListSharesGet' = + RemarketingListShare + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListSharesGet{..} + = go _rlsgQuotaUser _rlsgPrettyPrint _rlsgUserIp + _rlsgProfileId + _rlsgRemarketingListId + _rlsgKey + _rlsgOauthToken + _rlsgFields + _rlsgAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListSharesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs new file mode 100644 index 000000000..8bdb894b6 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingListShares.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing remarketing list share. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingRemarketingListSharesPatch@. +module DFAReporting.RemarketingListShares.Patch + ( + -- * REST Resource + RemarketingListSharesPatchAPI + + -- * Creating a Request + , remarketingListSharesPatch + , RemarketingListSharesPatch + + -- * Request Lenses + , rlspQuotaUser + , rlspPrettyPrint + , rlspUserIp + , rlspProfileId + , rlspRemarketingListId + , rlspKey + , rlspOauthToken + , rlspFields + , rlspAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListSharesPatch@ which the +-- 'RemarketingListSharesPatch' request conforms to. +type RemarketingListSharesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingListShares" :> + QueryParam "remarketingListId" Int64 :> + Patch '[JSON] RemarketingListShare + +-- | Updates an existing remarketing list share. This method supports patch +-- semantics. +-- +-- /See:/ 'remarketingListSharesPatch' smart constructor. +data RemarketingListSharesPatch = RemarketingListSharesPatch + { _rlspQuotaUser :: !(Maybe Text) + , _rlspPrettyPrint :: !Bool + , _rlspUserIp :: !(Maybe Text) + , _rlspProfileId :: !Int64 + , _rlspRemarketingListId :: !Int64 + , _rlspKey :: !(Maybe Text) + , _rlspOauthToken :: !(Maybe Text) + , _rlspFields :: !(Maybe Text) + , _rlspAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListSharesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlspQuotaUser' +-- +-- * 'rlspPrettyPrint' +-- +-- * 'rlspUserIp' +-- +-- * 'rlspProfileId' +-- +-- * 'rlspRemarketingListId' +-- +-- * 'rlspKey' +-- +-- * 'rlspOauthToken' +-- +-- * 'rlspFields' +-- +-- * 'rlspAlt' +remarketingListSharesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'remarketingListId' + -> RemarketingListSharesPatch +remarketingListSharesPatch pRlspProfileId_ pRlspRemarketingListId_ = + RemarketingListSharesPatch + { _rlspQuotaUser = Nothing + , _rlspPrettyPrint = True + , _rlspUserIp = Nothing + , _rlspProfileId = pRlspProfileId_ + , _rlspRemarketingListId = pRlspRemarketingListId_ + , _rlspKey = Nothing + , _rlspOauthToken = Nothing + , _rlspFields = Nothing + , _rlspAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlspQuotaUser :: Lens' RemarketingListSharesPatch' (Maybe Text) +rlspQuotaUser + = lens _rlspQuotaUser + (\ s a -> s{_rlspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlspPrettyPrint :: Lens' RemarketingListSharesPatch' Bool +rlspPrettyPrint + = lens _rlspPrettyPrint + (\ s a -> s{_rlspPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlspUserIp :: Lens' RemarketingListSharesPatch' (Maybe Text) +rlspUserIp + = lens _rlspUserIp (\ s a -> s{_rlspUserIp = a}) + +-- | User profile ID associated with this request. +rlspProfileId :: Lens' RemarketingListSharesPatch' Int64 +rlspProfileId + = lens _rlspProfileId + (\ s a -> s{_rlspProfileId = a}) + +-- | Remarketing list ID. +rlspRemarketingListId :: Lens' RemarketingListSharesPatch' Int64 +rlspRemarketingListId + = lens _rlspRemarketingListId + (\ s a -> s{_rlspRemarketingListId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlspKey :: Lens' RemarketingListSharesPatch' (Maybe Text) +rlspKey = lens _rlspKey (\ s a -> s{_rlspKey = a}) + +-- | OAuth 2.0 token for the current user. +rlspOauthToken :: Lens' RemarketingListSharesPatch' (Maybe Text) +rlspOauthToken + = lens _rlspOauthToken + (\ s a -> s{_rlspOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlspFields :: Lens' RemarketingListSharesPatch' (Maybe Text) +rlspFields + = lens _rlspFields (\ s a -> s{_rlspFields = a}) + +-- | Data format for the response. +rlspAlt :: Lens' RemarketingListSharesPatch' Text +rlspAlt = lens _rlspAlt (\ s a -> s{_rlspAlt = a}) + +instance GoogleRequest RemarketingListSharesPatch' + where + type Rs RemarketingListSharesPatch' = + RemarketingListShare + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListSharesPatch{..} + = go _rlspQuotaUser _rlspPrettyPrint _rlspUserIp + _rlspProfileId + (Just _rlspRemarketingListId) + _rlspKey + _rlspOauthToken + _rlspFields + _rlspAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListSharesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Update.hs new file mode 100644 index 000000000..ed0db0e33 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Update.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingListShares.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing remarketing list share. +-- +-- /See:/ for @DfareportingRemarketingListSharesUpdate@. +module DFAReporting.RemarketingListShares.Update + ( + -- * REST Resource + RemarketingListSharesUpdateAPI + + -- * Creating a Request + , remarketingListSharesUpdate + , RemarketingListSharesUpdate + + -- * Request Lenses + , rlsuQuotaUser + , rlsuPrettyPrint + , rlsuUserIp + , rlsuProfileId + , rlsuKey + , rlsuOauthToken + , rlsuFields + , rlsuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListSharesUpdate@ which the +-- 'RemarketingListSharesUpdate' request conforms to. +type RemarketingListSharesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingListShares" :> + Put '[JSON] RemarketingListShare + +-- | Updates an existing remarketing list share. +-- +-- /See:/ 'remarketingListSharesUpdate' smart constructor. +data RemarketingListSharesUpdate = RemarketingListSharesUpdate + { _rlsuQuotaUser :: !(Maybe Text) + , _rlsuPrettyPrint :: !Bool + , _rlsuUserIp :: !(Maybe Text) + , _rlsuProfileId :: !Int64 + , _rlsuKey :: !(Maybe Text) + , _rlsuOauthToken :: !(Maybe Text) + , _rlsuFields :: !(Maybe Text) + , _rlsuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListSharesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlsuQuotaUser' +-- +-- * 'rlsuPrettyPrint' +-- +-- * 'rlsuUserIp' +-- +-- * 'rlsuProfileId' +-- +-- * 'rlsuKey' +-- +-- * 'rlsuOauthToken' +-- +-- * 'rlsuFields' +-- +-- * 'rlsuAlt' +remarketingListSharesUpdate + :: Int64 -- ^ 'profileId' + -> RemarketingListSharesUpdate +remarketingListSharesUpdate pRlsuProfileId_ = + RemarketingListSharesUpdate + { _rlsuQuotaUser = Nothing + , _rlsuPrettyPrint = True + , _rlsuUserIp = Nothing + , _rlsuProfileId = pRlsuProfileId_ + , _rlsuKey = Nothing + , _rlsuOauthToken = Nothing + , _rlsuFields = Nothing + , _rlsuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlsuQuotaUser :: Lens' RemarketingListSharesUpdate' (Maybe Text) +rlsuQuotaUser + = lens _rlsuQuotaUser + (\ s a -> s{_rlsuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlsuPrettyPrint :: Lens' RemarketingListSharesUpdate' Bool +rlsuPrettyPrint + = lens _rlsuPrettyPrint + (\ s a -> s{_rlsuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlsuUserIp :: Lens' RemarketingListSharesUpdate' (Maybe Text) +rlsuUserIp + = lens _rlsuUserIp (\ s a -> s{_rlsuUserIp = a}) + +-- | User profile ID associated with this request. +rlsuProfileId :: Lens' RemarketingListSharesUpdate' Int64 +rlsuProfileId + = lens _rlsuProfileId + (\ s a -> s{_rlsuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlsuKey :: Lens' RemarketingListSharesUpdate' (Maybe Text) +rlsuKey = lens _rlsuKey (\ s a -> s{_rlsuKey = a}) + +-- | OAuth 2.0 token for the current user. +rlsuOauthToken :: Lens' RemarketingListSharesUpdate' (Maybe Text) +rlsuOauthToken + = lens _rlsuOauthToken + (\ s a -> s{_rlsuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlsuFields :: Lens' RemarketingListSharesUpdate' (Maybe Text) +rlsuFields + = lens _rlsuFields (\ s a -> s{_rlsuFields = a}) + +-- | Data format for the response. +rlsuAlt :: Lens' RemarketingListSharesUpdate' Text +rlsuAlt = lens _rlsuAlt (\ s a -> s{_rlsuAlt = a}) + +instance GoogleRequest RemarketingListSharesUpdate' + where + type Rs RemarketingListSharesUpdate' = + RemarketingListShare + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListSharesUpdate{..} + = go _rlsuQuotaUser _rlsuPrettyPrint _rlsuUserIp + _rlsuProfileId + _rlsuKey + _rlsuOauthToken + _rlsuFields + _rlsuAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListSharesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Get.hs new file mode 100644 index 000000000..236ea75a9 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingLists.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one remarketing list by ID. +-- +-- /See:/ for @DfareportingRemarketingListsGet@. +module DFAReporting.RemarketingLists.Get + ( + -- * REST Resource + RemarketingListsGetAPI + + -- * Creating a Request + , remarketingListsGet + , RemarketingListsGet + + -- * Request Lenses + , rlgQuotaUser + , rlgPrettyPrint + , rlgUserIp + , rlgProfileId + , rlgKey + , rlgId + , rlgOauthToken + , rlgFields + , rlgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListsGet@ which the +-- 'RemarketingListsGet' request conforms to. +type RemarketingListsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingLists" :> + Capture "id" Int64 :> Get '[JSON] RemarketingList + +-- | Gets one remarketing list by ID. +-- +-- /See:/ 'remarketingListsGet' smart constructor. +data RemarketingListsGet = RemarketingListsGet + { _rlgQuotaUser :: !(Maybe Text) + , _rlgPrettyPrint :: !Bool + , _rlgUserIp :: !(Maybe Text) + , _rlgProfileId :: !Int64 + , _rlgKey :: !(Maybe Text) + , _rlgId :: !Int64 + , _rlgOauthToken :: !(Maybe Text) + , _rlgFields :: !(Maybe Text) + , _rlgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlgQuotaUser' +-- +-- * 'rlgPrettyPrint' +-- +-- * 'rlgUserIp' +-- +-- * 'rlgProfileId' +-- +-- * 'rlgKey' +-- +-- * 'rlgId' +-- +-- * 'rlgOauthToken' +-- +-- * 'rlgFields' +-- +-- * 'rlgAlt' +remarketingListsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> RemarketingListsGet +remarketingListsGet pRlgProfileId_ pRlgId_ = + RemarketingListsGet + { _rlgQuotaUser = Nothing + , _rlgPrettyPrint = True + , _rlgUserIp = Nothing + , _rlgProfileId = pRlgProfileId_ + , _rlgKey = Nothing + , _rlgId = pRlgId_ + , _rlgOauthToken = Nothing + , _rlgFields = Nothing + , _rlgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlgQuotaUser :: Lens' RemarketingListsGet' (Maybe Text) +rlgQuotaUser + = lens _rlgQuotaUser (\ s a -> s{_rlgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlgPrettyPrint :: Lens' RemarketingListsGet' Bool +rlgPrettyPrint + = lens _rlgPrettyPrint + (\ s a -> s{_rlgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlgUserIp :: Lens' RemarketingListsGet' (Maybe Text) +rlgUserIp + = lens _rlgUserIp (\ s a -> s{_rlgUserIp = a}) + +-- | User profile ID associated with this request. +rlgProfileId :: Lens' RemarketingListsGet' Int64 +rlgProfileId + = lens _rlgProfileId (\ s a -> s{_rlgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlgKey :: Lens' RemarketingListsGet' (Maybe Text) +rlgKey = lens _rlgKey (\ s a -> s{_rlgKey = a}) + +-- | Remarketing list ID. +rlgId :: Lens' RemarketingListsGet' Int64 +rlgId = lens _rlgId (\ s a -> s{_rlgId = a}) + +-- | OAuth 2.0 token for the current user. +rlgOauthToken :: Lens' RemarketingListsGet' (Maybe Text) +rlgOauthToken + = lens _rlgOauthToken + (\ s a -> s{_rlgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlgFields :: Lens' RemarketingListsGet' (Maybe Text) +rlgFields + = lens _rlgFields (\ s a -> s{_rlgFields = a}) + +-- | Data format for the response. +rlgAlt :: Lens' RemarketingListsGet' Text +rlgAlt = lens _rlgAlt (\ s a -> s{_rlgAlt = a}) + +instance GoogleRequest RemarketingListsGet' where + type Rs RemarketingListsGet' = RemarketingList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListsGet{..} + = go _rlgQuotaUser _rlgPrettyPrint _rlgUserIp + _rlgProfileId + _rlgKey + _rlgId + _rlgOauthToken + _rlgFields + _rlgAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Insert.hs new file mode 100644 index 000000000..c5ea474ec --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingLists.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new remarketing list. +-- +-- /See:/ for @DfareportingRemarketingListsInsert@. +module DFAReporting.RemarketingLists.Insert + ( + -- * REST Resource + RemarketingListsInsertAPI + + -- * Creating a Request + , remarketingListsInsert + , RemarketingListsInsert + + -- * Request Lenses + , rliQuotaUser + , rliPrettyPrint + , rliUserIp + , rliProfileId + , rliKey + , rliOauthToken + , rliFields + , rliAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListsInsert@ which the +-- 'RemarketingListsInsert' request conforms to. +type RemarketingListsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingLists" :> Post '[JSON] RemarketingList + +-- | Inserts a new remarketing list. +-- +-- /See:/ 'remarketingListsInsert' smart constructor. +data RemarketingListsInsert = RemarketingListsInsert + { _rliQuotaUser :: !(Maybe Text) + , _rliPrettyPrint :: !Bool + , _rliUserIp :: !(Maybe Text) + , _rliProfileId :: !Int64 + , _rliKey :: !(Maybe Text) + , _rliOauthToken :: !(Maybe Text) + , _rliFields :: !(Maybe Text) + , _rliAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rliQuotaUser' +-- +-- * 'rliPrettyPrint' +-- +-- * 'rliUserIp' +-- +-- * 'rliProfileId' +-- +-- * 'rliKey' +-- +-- * 'rliOauthToken' +-- +-- * 'rliFields' +-- +-- * 'rliAlt' +remarketingListsInsert + :: Int64 -- ^ 'profileId' + -> RemarketingListsInsert +remarketingListsInsert pRliProfileId_ = + RemarketingListsInsert + { _rliQuotaUser = Nothing + , _rliPrettyPrint = True + , _rliUserIp = Nothing + , _rliProfileId = pRliProfileId_ + , _rliKey = Nothing + , _rliOauthToken = Nothing + , _rliFields = Nothing + , _rliAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rliQuotaUser :: Lens' RemarketingListsInsert' (Maybe Text) +rliQuotaUser + = lens _rliQuotaUser (\ s a -> s{_rliQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rliPrettyPrint :: Lens' RemarketingListsInsert' Bool +rliPrettyPrint + = lens _rliPrettyPrint + (\ s a -> s{_rliPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rliUserIp :: Lens' RemarketingListsInsert' (Maybe Text) +rliUserIp + = lens _rliUserIp (\ s a -> s{_rliUserIp = a}) + +-- | User profile ID associated with this request. +rliProfileId :: Lens' RemarketingListsInsert' Int64 +rliProfileId + = lens _rliProfileId (\ s a -> s{_rliProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rliKey :: Lens' RemarketingListsInsert' (Maybe Text) +rliKey = lens _rliKey (\ s a -> s{_rliKey = a}) + +-- | OAuth 2.0 token for the current user. +rliOauthToken :: Lens' RemarketingListsInsert' (Maybe Text) +rliOauthToken + = lens _rliOauthToken + (\ s a -> s{_rliOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rliFields :: Lens' RemarketingListsInsert' (Maybe Text) +rliFields + = lens _rliFields (\ s a -> s{_rliFields = a}) + +-- | Data format for the response. +rliAlt :: Lens' RemarketingListsInsert' Text +rliAlt = lens _rliAlt (\ s a -> s{_rliAlt = a}) + +instance GoogleRequest RemarketingListsInsert' where + type Rs RemarketingListsInsert' = RemarketingList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListsInsert{..} + = go _rliQuotaUser _rliPrettyPrint _rliUserIp + _rliProfileId + _rliKey + _rliOauthToken + _rliFields + _rliAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs new file mode 100644 index 000000000..5e42384ae --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs @@ -0,0 +1,267 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingLists.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of remarketing lists, possibly filtered. +-- +-- /See:/ for @DfareportingRemarketingListsList@. +module DFAReporting.RemarketingLists.List + ( + -- * REST Resource + RemarketingListsListAPI + + -- * Creating a Request + , remarketingListsList + , RemarketingListsList + + -- * Request Lenses + , rllQuotaUser + , rllPrettyPrint + , rllUserIp + , rllFloodlightActivityId + , rllAdvertiserId + , rllProfileId + , rllSortOrder + , rllActive + , rllKey + , rllName + , rllPageToken + , rllSortField + , rllOauthToken + , rllMaxResults + , rllFields + , rllAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListsList@ which the +-- 'RemarketingListsList' request conforms to. +type RemarketingListsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingLists" :> + QueryParam "floodlightActivityId" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParam "name" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] RemarketingListsListResponse + +-- | Retrieves a list of remarketing lists, possibly filtered. +-- +-- /See:/ 'remarketingListsList' smart constructor. +data RemarketingListsList = RemarketingListsList + { _rllQuotaUser :: !(Maybe Text) + , _rllPrettyPrint :: !Bool + , _rllUserIp :: !(Maybe Text) + , _rllFloodlightActivityId :: !(Maybe Int64) + , _rllAdvertiserId :: !Int64 + , _rllProfileId :: !Int64 + , _rllSortOrder :: !(Maybe Text) + , _rllActive :: !(Maybe Bool) + , _rllKey :: !(Maybe Text) + , _rllName :: !(Maybe Text) + , _rllPageToken :: !(Maybe Text) + , _rllSortField :: !(Maybe Text) + , _rllOauthToken :: !(Maybe Text) + , _rllMaxResults :: !(Maybe Int32) + , _rllFields :: !(Maybe Text) + , _rllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rllQuotaUser' +-- +-- * 'rllPrettyPrint' +-- +-- * 'rllUserIp' +-- +-- * 'rllFloodlightActivityId' +-- +-- * 'rllAdvertiserId' +-- +-- * 'rllProfileId' +-- +-- * 'rllSortOrder' +-- +-- * 'rllActive' +-- +-- * 'rllKey' +-- +-- * 'rllName' +-- +-- * 'rllPageToken' +-- +-- * 'rllSortField' +-- +-- * 'rllOauthToken' +-- +-- * 'rllMaxResults' +-- +-- * 'rllFields' +-- +-- * 'rllAlt' +remarketingListsList + :: Int64 -- ^ 'advertiserId' + -> Int64 -- ^ 'profileId' + -> RemarketingListsList +remarketingListsList pRllAdvertiserId_ pRllProfileId_ = + RemarketingListsList + { _rllQuotaUser = Nothing + , _rllPrettyPrint = True + , _rllUserIp = Nothing + , _rllFloodlightActivityId = Nothing + , _rllAdvertiserId = pRllAdvertiserId_ + , _rllProfileId = pRllProfileId_ + , _rllSortOrder = Nothing + , _rllActive = Nothing + , _rllKey = Nothing + , _rllName = Nothing + , _rllPageToken = Nothing + , _rllSortField = Nothing + , _rllOauthToken = Nothing + , _rllMaxResults = Nothing + , _rllFields = Nothing + , _rllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rllQuotaUser :: Lens' RemarketingListsList' (Maybe Text) +rllQuotaUser + = lens _rllQuotaUser (\ s a -> s{_rllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rllPrettyPrint :: Lens' RemarketingListsList' Bool +rllPrettyPrint + = lens _rllPrettyPrint + (\ s a -> s{_rllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rllUserIp :: Lens' RemarketingListsList' (Maybe Text) +rllUserIp + = lens _rllUserIp (\ s a -> s{_rllUserIp = a}) + +-- | Select only remarketing lists that have this floodlight activity ID. +rllFloodlightActivityId :: Lens' RemarketingListsList' (Maybe Int64) +rllFloodlightActivityId + = lens _rllFloodlightActivityId + (\ s a -> s{_rllFloodlightActivityId = a}) + +-- | Select only remarketing lists owned by this advertiser. +rllAdvertiserId :: Lens' RemarketingListsList' Int64 +rllAdvertiserId + = lens _rllAdvertiserId + (\ s a -> s{_rllAdvertiserId = a}) + +-- | User profile ID associated with this request. +rllProfileId :: Lens' RemarketingListsList' Int64 +rllProfileId + = lens _rllProfileId (\ s a -> s{_rllProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +rllSortOrder :: Lens' RemarketingListsList' (Maybe Text) +rllSortOrder + = lens _rllSortOrder (\ s a -> s{_rllSortOrder = a}) + +-- | Select only active or only inactive remarketing lists. +rllActive :: Lens' RemarketingListsList' (Maybe Bool) +rllActive + = lens _rllActive (\ s a -> s{_rllActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rllKey :: Lens' RemarketingListsList' (Maybe Text) +rllKey = lens _rllKey (\ s a -> s{_rllKey = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"remarketing list*2015\" will return objects with names +-- like \"remarketing list June 2015\", \"remarketing list April 2015\", or +-- simply \"remarketing list 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"remarketing list\" will match objects with +-- name \"my remarketing list\", \"remarketing list 2015\", or simply +-- \"remarketing list\". +rllName :: Lens' RemarketingListsList' (Maybe Text) +rllName = lens _rllName (\ s a -> s{_rllName = a}) + +-- | Value of the nextPageToken from the previous result page. +rllPageToken :: Lens' RemarketingListsList' (Maybe Text) +rllPageToken + = lens _rllPageToken (\ s a -> s{_rllPageToken = a}) + +-- | Field by which to sort the list. +rllSortField :: Lens' RemarketingListsList' (Maybe Text) +rllSortField + = lens _rllSortField (\ s a -> s{_rllSortField = a}) + +-- | OAuth 2.0 token for the current user. +rllOauthToken :: Lens' RemarketingListsList' (Maybe Text) +rllOauthToken + = lens _rllOauthToken + (\ s a -> s{_rllOauthToken = a}) + +-- | Maximum number of results to return. +rllMaxResults :: Lens' RemarketingListsList' (Maybe Int32) +rllMaxResults + = lens _rllMaxResults + (\ s a -> s{_rllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rllFields :: Lens' RemarketingListsList' (Maybe Text) +rllFields + = lens _rllFields (\ s a -> s{_rllFields = a}) + +-- | Data format for the response. +rllAlt :: Lens' RemarketingListsList' Text +rllAlt = lens _rllAlt (\ s a -> s{_rllAlt = a}) + +instance GoogleRequest RemarketingListsList' where + type Rs RemarketingListsList' = + RemarketingListsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListsList{..} + = go _rllQuotaUser _rllPrettyPrint _rllUserIp + _rllFloodlightActivityId + (Just _rllAdvertiserId) + _rllProfileId + _rllSortOrder + _rllActive + _rllKey + _rllName + _rllPageToken + _rllSortField + _rllOauthToken + _rllMaxResults + _rllFields + _rllAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Patch.hs new file mode 100644 index 000000000..86f075ae8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingLists.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing remarketing list. This method supports patch +-- semantics. +-- +-- /See:/ for @DfareportingRemarketingListsPatch@. +module DFAReporting.RemarketingLists.Patch + ( + -- * REST Resource + RemarketingListsPatchAPI + + -- * Creating a Request + , remarketingListsPatch + , RemarketingListsPatch + + -- * Request Lenses + , rlpQuotaUser + , rlpPrettyPrint + , rlpUserIp + , rlpProfileId + , rlpKey + , rlpId + , rlpOauthToken + , rlpFields + , rlpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListsPatch@ which the +-- 'RemarketingListsPatch' request conforms to. +type RemarketingListsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingLists" :> + QueryParam "id" Int64 :> + Patch '[JSON] RemarketingList + +-- | Updates an existing remarketing list. This method supports patch +-- semantics. +-- +-- /See:/ 'remarketingListsPatch' smart constructor. +data RemarketingListsPatch = RemarketingListsPatch + { _rlpQuotaUser :: !(Maybe Text) + , _rlpPrettyPrint :: !Bool + , _rlpUserIp :: !(Maybe Text) + , _rlpProfileId :: !Int64 + , _rlpKey :: !(Maybe Text) + , _rlpId :: !Int64 + , _rlpOauthToken :: !(Maybe Text) + , _rlpFields :: !(Maybe Text) + , _rlpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlpQuotaUser' +-- +-- * 'rlpPrettyPrint' +-- +-- * 'rlpUserIp' +-- +-- * 'rlpProfileId' +-- +-- * 'rlpKey' +-- +-- * 'rlpId' +-- +-- * 'rlpOauthToken' +-- +-- * 'rlpFields' +-- +-- * 'rlpAlt' +remarketingListsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> RemarketingListsPatch +remarketingListsPatch pRlpProfileId_ pRlpId_ = + RemarketingListsPatch + { _rlpQuotaUser = Nothing + , _rlpPrettyPrint = True + , _rlpUserIp = Nothing + , _rlpProfileId = pRlpProfileId_ + , _rlpKey = Nothing + , _rlpId = pRlpId_ + , _rlpOauthToken = Nothing + , _rlpFields = Nothing + , _rlpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlpQuotaUser :: Lens' RemarketingListsPatch' (Maybe Text) +rlpQuotaUser + = lens _rlpQuotaUser (\ s a -> s{_rlpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlpPrettyPrint :: Lens' RemarketingListsPatch' Bool +rlpPrettyPrint + = lens _rlpPrettyPrint + (\ s a -> s{_rlpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlpUserIp :: Lens' RemarketingListsPatch' (Maybe Text) +rlpUserIp + = lens _rlpUserIp (\ s a -> s{_rlpUserIp = a}) + +-- | User profile ID associated with this request. +rlpProfileId :: Lens' RemarketingListsPatch' Int64 +rlpProfileId + = lens _rlpProfileId (\ s a -> s{_rlpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlpKey :: Lens' RemarketingListsPatch' (Maybe Text) +rlpKey = lens _rlpKey (\ s a -> s{_rlpKey = a}) + +-- | Remarketing list ID. +rlpId :: Lens' RemarketingListsPatch' Int64 +rlpId = lens _rlpId (\ s a -> s{_rlpId = a}) + +-- | OAuth 2.0 token for the current user. +rlpOauthToken :: Lens' RemarketingListsPatch' (Maybe Text) +rlpOauthToken + = lens _rlpOauthToken + (\ s a -> s{_rlpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlpFields :: Lens' RemarketingListsPatch' (Maybe Text) +rlpFields + = lens _rlpFields (\ s a -> s{_rlpFields = a}) + +-- | Data format for the response. +rlpAlt :: Lens' RemarketingListsPatch' Text +rlpAlt = lens _rlpAlt (\ s a -> s{_rlpAlt = a}) + +instance GoogleRequest RemarketingListsPatch' where + type Rs RemarketingListsPatch' = RemarketingList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListsPatch{..} + = go _rlpQuotaUser _rlpPrettyPrint _rlpUserIp + _rlpProfileId + _rlpKey + (Just _rlpId) + _rlpOauthToken + _rlpFields + _rlpAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Update.hs new file mode 100644 index 000000000..c9ec0371e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.RemarketingLists.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing remarketing list. +-- +-- /See:/ for @DfareportingRemarketingListsUpdate@. +module DFAReporting.RemarketingLists.Update + ( + -- * REST Resource + RemarketingListsUpdateAPI + + -- * Creating a Request + , remarketingListsUpdate + , RemarketingListsUpdate + + -- * Request Lenses + , rluQuotaUser + , rluPrettyPrint + , rluUserIp + , rluProfileId + , rluKey + , rluOauthToken + , rluFields + , rluAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingRemarketingListsUpdate@ which the +-- 'RemarketingListsUpdate' request conforms to. +type RemarketingListsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "remarketingLists" :> Put '[JSON] RemarketingList + +-- | Updates an existing remarketing list. +-- +-- /See:/ 'remarketingListsUpdate' smart constructor. +data RemarketingListsUpdate = RemarketingListsUpdate + { _rluQuotaUser :: !(Maybe Text) + , _rluPrettyPrint :: !Bool + , _rluUserIp :: !(Maybe Text) + , _rluProfileId :: !Int64 + , _rluKey :: !(Maybe Text) + , _rluOauthToken :: !(Maybe Text) + , _rluFields :: !(Maybe Text) + , _rluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RemarketingListsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rluQuotaUser' +-- +-- * 'rluPrettyPrint' +-- +-- * 'rluUserIp' +-- +-- * 'rluProfileId' +-- +-- * 'rluKey' +-- +-- * 'rluOauthToken' +-- +-- * 'rluFields' +-- +-- * 'rluAlt' +remarketingListsUpdate + :: Int64 -- ^ 'profileId' + -> RemarketingListsUpdate +remarketingListsUpdate pRluProfileId_ = + RemarketingListsUpdate + { _rluQuotaUser = Nothing + , _rluPrettyPrint = True + , _rluUserIp = Nothing + , _rluProfileId = pRluProfileId_ + , _rluKey = Nothing + , _rluOauthToken = Nothing + , _rluFields = Nothing + , _rluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rluQuotaUser :: Lens' RemarketingListsUpdate' (Maybe Text) +rluQuotaUser + = lens _rluQuotaUser (\ s a -> s{_rluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rluPrettyPrint :: Lens' RemarketingListsUpdate' Bool +rluPrettyPrint + = lens _rluPrettyPrint + (\ s a -> s{_rluPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rluUserIp :: Lens' RemarketingListsUpdate' (Maybe Text) +rluUserIp + = lens _rluUserIp (\ s a -> s{_rluUserIp = a}) + +-- | User profile ID associated with this request. +rluProfileId :: Lens' RemarketingListsUpdate' Int64 +rluProfileId + = lens _rluProfileId (\ s a -> s{_rluProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rluKey :: Lens' RemarketingListsUpdate' (Maybe Text) +rluKey = lens _rluKey (\ s a -> s{_rluKey = a}) + +-- | OAuth 2.0 token for the current user. +rluOauthToken :: Lens' RemarketingListsUpdate' (Maybe Text) +rluOauthToken + = lens _rluOauthToken + (\ s a -> s{_rluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rluFields :: Lens' RemarketingListsUpdate' (Maybe Text) +rluFields + = lens _rluFields (\ s a -> s{_rluFields = a}) + +-- | Data format for the response. +rluAlt :: Lens' RemarketingListsUpdate' Text +rluAlt = lens _rluAlt (\ s a -> s{_rluAlt = a}) + +instance GoogleRequest RemarketingListsUpdate' where + type Rs RemarketingListsUpdate' = RemarketingList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u RemarketingListsUpdate{..} + = go _rluQuotaUser _rluPrettyPrint _rluUserIp + _rluProfileId + _rluKey + _rluOauthToken + _rluFields + _rluAlt + where go + = clientWithRoute + (Proxy :: Proxy RemarketingListsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/CompatibleFields/Query.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/CompatibleFields/Query.hs new file mode 100644 index 000000000..a1bb321a4 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/CompatibleFields/Query.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.CompatibleFields.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the fields that are compatible to be selected in the respective +-- sections of a report criteria, given the fields already selected in the +-- input report and user permissions. +-- +-- /See:/ for @DfareportingReportsCompatibleFieldsQuery@. +module DFAReporting.Reports.CompatibleFields.Query + ( + -- * REST Resource + ReportsCompatibleFieldsQueryAPI + + -- * Creating a Request + , reportsCompatibleFieldsQuery + , ReportsCompatibleFieldsQuery + + -- * Request Lenses + , rcfqQuotaUser + , rcfqPrettyPrint + , rcfqUserIp + , rcfqProfileId + , rcfqKey + , rcfqOauthToken + , rcfqFields + , rcfqAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsCompatibleFieldsQuery@ which the +-- 'ReportsCompatibleFieldsQuery' request conforms to. +type ReportsCompatibleFieldsQueryAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + "compatiblefields" :> + "query" :> Post '[JSON] CompatibleFields + +-- | Returns the fields that are compatible to be selected in the respective +-- sections of a report criteria, given the fields already selected in the +-- input report and user permissions. +-- +-- /See:/ 'reportsCompatibleFieldsQuery' smart constructor. +data ReportsCompatibleFieldsQuery = ReportsCompatibleFieldsQuery + { _rcfqQuotaUser :: !(Maybe Text) + , _rcfqPrettyPrint :: !Bool + , _rcfqUserIp :: !(Maybe Text) + , _rcfqProfileId :: !Int64 + , _rcfqKey :: !(Maybe Text) + , _rcfqOauthToken :: !(Maybe Text) + , _rcfqFields :: !(Maybe Text) + , _rcfqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsCompatibleFieldsQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcfqQuotaUser' +-- +-- * 'rcfqPrettyPrint' +-- +-- * 'rcfqUserIp' +-- +-- * 'rcfqProfileId' +-- +-- * 'rcfqKey' +-- +-- * 'rcfqOauthToken' +-- +-- * 'rcfqFields' +-- +-- * 'rcfqAlt' +reportsCompatibleFieldsQuery + :: Int64 -- ^ 'profileId' + -> ReportsCompatibleFieldsQuery +reportsCompatibleFieldsQuery pRcfqProfileId_ = + ReportsCompatibleFieldsQuery + { _rcfqQuotaUser = Nothing + , _rcfqPrettyPrint = True + , _rcfqUserIp = Nothing + , _rcfqProfileId = pRcfqProfileId_ + , _rcfqKey = Nothing + , _rcfqOauthToken = Nothing + , _rcfqFields = Nothing + , _rcfqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcfqQuotaUser :: Lens' ReportsCompatibleFieldsQuery' (Maybe Text) +rcfqQuotaUser + = lens _rcfqQuotaUser + (\ s a -> s{_rcfqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcfqPrettyPrint :: Lens' ReportsCompatibleFieldsQuery' Bool +rcfqPrettyPrint + = lens _rcfqPrettyPrint + (\ s a -> s{_rcfqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcfqUserIp :: Lens' ReportsCompatibleFieldsQuery' (Maybe Text) +rcfqUserIp + = lens _rcfqUserIp (\ s a -> s{_rcfqUserIp = a}) + +-- | The DFA user profile ID. +rcfqProfileId :: Lens' ReportsCompatibleFieldsQuery' Int64 +rcfqProfileId + = lens _rcfqProfileId + (\ s a -> s{_rcfqProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcfqKey :: Lens' ReportsCompatibleFieldsQuery' (Maybe Text) +rcfqKey = lens _rcfqKey (\ s a -> s{_rcfqKey = a}) + +-- | OAuth 2.0 token for the current user. +rcfqOauthToken :: Lens' ReportsCompatibleFieldsQuery' (Maybe Text) +rcfqOauthToken + = lens _rcfqOauthToken + (\ s a -> s{_rcfqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcfqFields :: Lens' ReportsCompatibleFieldsQuery' (Maybe Text) +rcfqFields + = lens _rcfqFields (\ s a -> s{_rcfqFields = a}) + +-- | Data format for the response. +rcfqAlt :: Lens' ReportsCompatibleFieldsQuery' Text +rcfqAlt = lens _rcfqAlt (\ s a -> s{_rcfqAlt = a}) + +instance GoogleRequest ReportsCompatibleFieldsQuery' + where + type Rs ReportsCompatibleFieldsQuery' = + CompatibleFields + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsCompatibleFieldsQuery{..} + = go _rcfqQuotaUser _rcfqPrettyPrint _rcfqUserIp + _rcfqProfileId + _rcfqKey + _rcfqOauthToken + _rcfqFields + _rcfqAlt + where go + = clientWithRoute + (Proxy :: Proxy ReportsCompatibleFieldsQueryAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Delete.hs new file mode 100644 index 000000000..957dd8259 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a report by its ID. +-- +-- /See:/ for @DfareportingReportsDelete@. +module DFAReporting.Reports.Delete + ( + -- * REST Resource + ReportsDeleteAPI + + -- * Creating a Request + , reportsDelete + , ReportsDelete + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdUserIp + , rdReportId + , rdProfileId + , rdKey + , rdOauthToken + , rdFields + , rdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsDelete@ which the +-- 'ReportsDelete' request conforms to. +type ReportsDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> Delete '[JSON] () + +-- | Deletes a report by its ID. +-- +-- /See:/ 'reportsDelete' smart constructor. +data ReportsDelete = ReportsDelete + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdUserIp :: !(Maybe Text) + , _rdReportId :: !Int64 + , _rdProfileId :: !Int64 + , _rdKey :: !(Maybe Text) + , _rdOauthToken :: !(Maybe Text) + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdUserIp' +-- +-- * 'rdReportId' +-- +-- * 'rdProfileId' +-- +-- * 'rdKey' +-- +-- * 'rdOauthToken' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +reportsDelete + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsDelete +reportsDelete pRdReportId_ pRdProfileId_ = + ReportsDelete + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdUserIp = Nothing + , _rdReportId = pRdReportId_ + , _rdProfileId = pRdProfileId_ + , _rdKey = Nothing + , _rdOauthToken = Nothing + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' ReportsDelete' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' ReportsDelete' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' ReportsDelete' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | The ID of the report. +rdReportId :: Lens' ReportsDelete' Int64 +rdReportId + = lens _rdReportId (\ s a -> s{_rdReportId = a}) + +-- | The DFA user profile ID. +rdProfileId :: Lens' ReportsDelete' Int64 +rdProfileId + = lens _rdProfileId (\ s a -> s{_rdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' ReportsDelete' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' ReportsDelete' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' ReportsDelete' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' ReportsDelete' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest ReportsDelete' where + type Rs ReportsDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsDelete{..} + = go _rdQuotaUser _rdPrettyPrint _rdUserIp + _rdReportId + _rdProfileId + _rdKey + _rdOauthToken + _rdFields + _rdAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsDeleteAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/Get.hs new file mode 100644 index 000000000..6a45eec6c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Files.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report file. +-- +-- /See:/ for @DfareportingReportsFilesGet@. +module DFAReporting.Reports.Files.Get + ( + -- * REST Resource + ReportsFilesGetAPI + + -- * Creating a Request + , reportsFilesGet + , ReportsFilesGet + + -- * Request Lenses + , rfgQuotaUser + , rfgPrettyPrint + , rfgUserIp + , rfgReportId + , rfgProfileId + , rfgKey + , rfgFileId + , rfgOauthToken + , rfgFields + , rfgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsFilesGet@ which the +-- 'ReportsFilesGet' request conforms to. +type ReportsFilesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> + "files" :> Capture "fileId" Int64 :> Get '[JSON] File + +-- | Retrieves a report file. +-- +-- /See:/ 'reportsFilesGet' smart constructor. +data ReportsFilesGet = ReportsFilesGet + { _rfgQuotaUser :: !(Maybe Text) + , _rfgPrettyPrint :: !Bool + , _rfgUserIp :: !(Maybe Text) + , _rfgReportId :: !Int64 + , _rfgProfileId :: !Int64 + , _rfgKey :: !(Maybe Text) + , _rfgFileId :: !Int64 + , _rfgOauthToken :: !(Maybe Text) + , _rfgFields :: !(Maybe Text) + , _rfgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsFilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rfgQuotaUser' +-- +-- * 'rfgPrettyPrint' +-- +-- * 'rfgUserIp' +-- +-- * 'rfgReportId' +-- +-- * 'rfgProfileId' +-- +-- * 'rfgKey' +-- +-- * 'rfgFileId' +-- +-- * 'rfgOauthToken' +-- +-- * 'rfgFields' +-- +-- * 'rfgAlt' +reportsFilesGet + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> Int64 -- ^ 'fileId' + -> ReportsFilesGet +reportsFilesGet pRfgReportId_ pRfgProfileId_ pRfgFileId_ = + ReportsFilesGet + { _rfgQuotaUser = Nothing + , _rfgPrettyPrint = True + , _rfgUserIp = Nothing + , _rfgReportId = pRfgReportId_ + , _rfgProfileId = pRfgProfileId_ + , _rfgKey = Nothing + , _rfgFileId = pRfgFileId_ + , _rfgOauthToken = Nothing + , _rfgFields = Nothing + , _rfgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rfgQuotaUser :: Lens' ReportsFilesGet' (Maybe Text) +rfgQuotaUser + = lens _rfgQuotaUser (\ s a -> s{_rfgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rfgPrettyPrint :: Lens' ReportsFilesGet' Bool +rfgPrettyPrint + = lens _rfgPrettyPrint + (\ s a -> s{_rfgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rfgUserIp :: Lens' ReportsFilesGet' (Maybe Text) +rfgUserIp + = lens _rfgUserIp (\ s a -> s{_rfgUserIp = a}) + +-- | The ID of the report. +rfgReportId :: Lens' ReportsFilesGet' Int64 +rfgReportId + = lens _rfgReportId (\ s a -> s{_rfgReportId = a}) + +-- | The DFA profile ID. +rfgProfileId :: Lens' ReportsFilesGet' Int64 +rfgProfileId + = lens _rfgProfileId (\ s a -> s{_rfgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rfgKey :: Lens' ReportsFilesGet' (Maybe Text) +rfgKey = lens _rfgKey (\ s a -> s{_rfgKey = a}) + +-- | The ID of the report file. +rfgFileId :: Lens' ReportsFilesGet' Int64 +rfgFileId + = lens _rfgFileId (\ s a -> s{_rfgFileId = a}) + +-- | OAuth 2.0 token for the current user. +rfgOauthToken :: Lens' ReportsFilesGet' (Maybe Text) +rfgOauthToken + = lens _rfgOauthToken + (\ s a -> s{_rfgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rfgFields :: Lens' ReportsFilesGet' (Maybe Text) +rfgFields + = lens _rfgFields (\ s a -> s{_rfgFields = a}) + +-- | Data format for the response. +rfgAlt :: Lens' ReportsFilesGet' Text +rfgAlt = lens _rfgAlt (\ s a -> s{_rfgAlt = a}) + +instance GoogleRequest ReportsFilesGet' where + type Rs ReportsFilesGet' = File + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsFilesGet{..} + = go _rfgQuotaUser _rfgPrettyPrint _rfgUserIp + _rfgReportId + _rfgProfileId + _rfgKey + _rfgFileId + _rfgOauthToken + _rfgFields + _rfgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsFilesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/List.hs new file mode 100644 index 000000000..9ba5d99c8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Files/List.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Files.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists files for a report. +-- +-- /See:/ for @DfareportingReportsFilesList@. +module DFAReporting.Reports.Files.List + ( + -- * REST Resource + ReportsFilesListAPI + + -- * Creating a Request + , reportsFilesList + , ReportsFilesList + + -- * Request Lenses + , rflQuotaUser + , rflPrettyPrint + , rflUserIp + , rflReportId + , rflProfileId + , rflSortOrder + , rflKey + , rflPageToken + , rflSortField + , rflOauthToken + , rflMaxResults + , rflFields + , rflAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsFilesList@ which the +-- 'ReportsFilesList' request conforms to. +type ReportsFilesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> + "files" :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] FileList + +-- | Lists files for a report. +-- +-- /See:/ 'reportsFilesList' smart constructor. +data ReportsFilesList = ReportsFilesList + { _rflQuotaUser :: !(Maybe Text) + , _rflPrettyPrint :: !Bool + , _rflUserIp :: !(Maybe Text) + , _rflReportId :: !Int64 + , _rflProfileId :: !Int64 + , _rflSortOrder :: !Text + , _rflKey :: !(Maybe Text) + , _rflPageToken :: !(Maybe Text) + , _rflSortField :: !Text + , _rflOauthToken :: !(Maybe Text) + , _rflMaxResults :: !(Maybe Int32) + , _rflFields :: !(Maybe Text) + , _rflAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsFilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rflQuotaUser' +-- +-- * 'rflPrettyPrint' +-- +-- * 'rflUserIp' +-- +-- * 'rflReportId' +-- +-- * 'rflProfileId' +-- +-- * 'rflSortOrder' +-- +-- * 'rflKey' +-- +-- * 'rflPageToken' +-- +-- * 'rflSortField' +-- +-- * 'rflOauthToken' +-- +-- * 'rflMaxResults' +-- +-- * 'rflFields' +-- +-- * 'rflAlt' +reportsFilesList + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsFilesList +reportsFilesList pRflReportId_ pRflProfileId_ = + ReportsFilesList + { _rflQuotaUser = Nothing + , _rflPrettyPrint = True + , _rflUserIp = Nothing + , _rflReportId = pRflReportId_ + , _rflProfileId = pRflProfileId_ + , _rflSortOrder = "DESCENDING" + , _rflKey = Nothing + , _rflPageToken = Nothing + , _rflSortField = "LAST_MODIFIED_TIME" + , _rflOauthToken = Nothing + , _rflMaxResults = Nothing + , _rflFields = Nothing + , _rflAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rflQuotaUser :: Lens' ReportsFilesList' (Maybe Text) +rflQuotaUser + = lens _rflQuotaUser (\ s a -> s{_rflQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rflPrettyPrint :: Lens' ReportsFilesList' Bool +rflPrettyPrint + = lens _rflPrettyPrint + (\ s a -> s{_rflPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rflUserIp :: Lens' ReportsFilesList' (Maybe Text) +rflUserIp + = lens _rflUserIp (\ s a -> s{_rflUserIp = a}) + +-- | The ID of the parent report. +rflReportId :: Lens' ReportsFilesList' Int64 +rflReportId + = lens _rflReportId (\ s a -> s{_rflReportId = a}) + +-- | The DFA profile ID. +rflProfileId :: Lens' ReportsFilesList' Int64 +rflProfileId + = lens _rflProfileId (\ s a -> s{_rflProfileId = a}) + +-- | Order of sorted results, default is \'DESCENDING\'. +rflSortOrder :: Lens' ReportsFilesList' Text +rflSortOrder + = lens _rflSortOrder (\ s a -> s{_rflSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rflKey :: Lens' ReportsFilesList' (Maybe Text) +rflKey = lens _rflKey (\ s a -> s{_rflKey = a}) + +-- | The value of the nextToken from the previous result page. +rflPageToken :: Lens' ReportsFilesList' (Maybe Text) +rflPageToken + = lens _rflPageToken (\ s a -> s{_rflPageToken = a}) + +-- | The field by which to sort the list. +rflSortField :: Lens' ReportsFilesList' Text +rflSortField + = lens _rflSortField (\ s a -> s{_rflSortField = a}) + +-- | OAuth 2.0 token for the current user. +rflOauthToken :: Lens' ReportsFilesList' (Maybe Text) +rflOauthToken + = lens _rflOauthToken + (\ s a -> s{_rflOauthToken = a}) + +-- | Maximum number of results to return. +rflMaxResults :: Lens' ReportsFilesList' (Maybe Int32) +rflMaxResults + = lens _rflMaxResults + (\ s a -> s{_rflMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rflFields :: Lens' ReportsFilesList' (Maybe Text) +rflFields + = lens _rflFields (\ s a -> s{_rflFields = a}) + +-- | Data format for the response. +rflAlt :: Lens' ReportsFilesList' Text +rflAlt = lens _rflAlt (\ s a -> s{_rflAlt = a}) + +instance GoogleRequest ReportsFilesList' where + type Rs ReportsFilesList' = FileList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsFilesList{..} + = go _rflQuotaUser _rflPrettyPrint _rflUserIp + _rflReportId + _rflProfileId + (Just _rflSortOrder) + _rflKey + _rflPageToken + (Just _rflSortField) + _rflOauthToken + _rflMaxResults + _rflFields + _rflAlt + where go + = clientWithRoute + (Proxy :: Proxy ReportsFilesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Get.hs new file mode 100644 index 000000000..d03908610 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a report by its ID. +-- +-- /See:/ for @DfareportingReportsGet@. +module DFAReporting.Reports.Get + ( + -- * REST Resource + ReportsGetAPI + + -- * Creating a Request + , reportsGet + , ReportsGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgReportId + , rgProfileId + , rgKey + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsGet@ which the +-- 'ReportsGet' request conforms to. +type ReportsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> Get '[JSON] Report + +-- | Retrieves a report by its ID. +-- +-- /See:/ 'reportsGet' smart constructor. +data ReportsGet = ReportsGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgReportId :: !Int64 + , _rgProfileId :: !Int64 + , _rgKey :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgReportId' +-- +-- * 'rgProfileId' +-- +-- * 'rgKey' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +reportsGet + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsGet +reportsGet pRgReportId_ pRgProfileId_ = + ReportsGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgReportId = pRgReportId_ + , _rgProfileId = pRgProfileId_ + , _rgKey = Nothing + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReportsGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReportsGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReportsGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | The ID of the report. +rgReportId :: Lens' ReportsGet' Int64 +rgReportId + = lens _rgReportId (\ s a -> s{_rgReportId = a}) + +-- | The DFA user profile ID. +rgProfileId :: Lens' ReportsGet' Int64 +rgProfileId + = lens _rgProfileId (\ s a -> s{_rgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReportsGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReportsGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReportsGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReportsGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReportsGet' where + type Rs ReportsGet' = Report + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgReportId + _rgProfileId + _rgKey + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Insert.hs new file mode 100644 index 000000000..965892fd6 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a report. +-- +-- /See:/ for @DfareportingReportsInsert@. +module DFAReporting.Reports.Insert + ( + -- * REST Resource + ReportsInsertAPI + + -- * Creating a Request + , reportsInsert + , ReportsInsert + + -- * Request Lenses + , riQuotaUser + , riPrettyPrint + , riUserIp + , riProfileId + , riKey + , riOauthToken + , riFields + , riAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsInsert@ which the +-- 'ReportsInsert' request conforms to. +type ReportsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> Post '[JSON] Report + +-- | Creates a report. +-- +-- /See:/ 'reportsInsert' smart constructor. +data ReportsInsert = ReportsInsert + { _riQuotaUser :: !(Maybe Text) + , _riPrettyPrint :: !Bool + , _riUserIp :: !(Maybe Text) + , _riProfileId :: !Int64 + , _riKey :: !(Maybe Text) + , _riOauthToken :: !(Maybe Text) + , _riFields :: !(Maybe Text) + , _riAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riQuotaUser' +-- +-- * 'riPrettyPrint' +-- +-- * 'riUserIp' +-- +-- * 'riProfileId' +-- +-- * 'riKey' +-- +-- * 'riOauthToken' +-- +-- * 'riFields' +-- +-- * 'riAlt' +reportsInsert + :: Int64 -- ^ 'profileId' + -> ReportsInsert +reportsInsert pRiProfileId_ = + ReportsInsert + { _riQuotaUser = Nothing + , _riPrettyPrint = True + , _riUserIp = Nothing + , _riProfileId = pRiProfileId_ + , _riKey = Nothing + , _riOauthToken = Nothing + , _riFields = Nothing + , _riAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +riQuotaUser :: Lens' ReportsInsert' (Maybe Text) +riQuotaUser + = lens _riQuotaUser (\ s a -> s{_riQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +riPrettyPrint :: Lens' ReportsInsert' Bool +riPrettyPrint + = lens _riPrettyPrint + (\ s a -> s{_riPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +riUserIp :: Lens' ReportsInsert' (Maybe Text) +riUserIp = lens _riUserIp (\ s a -> s{_riUserIp = a}) + +-- | The DFA user profile ID. +riProfileId :: Lens' ReportsInsert' Int64 +riProfileId + = lens _riProfileId (\ s a -> s{_riProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +riKey :: Lens' ReportsInsert' (Maybe Text) +riKey = lens _riKey (\ s a -> s{_riKey = a}) + +-- | OAuth 2.0 token for the current user. +riOauthToken :: Lens' ReportsInsert' (Maybe Text) +riOauthToken + = lens _riOauthToken (\ s a -> s{_riOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +riFields :: Lens' ReportsInsert' (Maybe Text) +riFields = lens _riFields (\ s a -> s{_riFields = a}) + +-- | Data format for the response. +riAlt :: Lens' ReportsInsert' Text +riAlt = lens _riAlt (\ s a -> s{_riAlt = a}) + +instance GoogleRequest ReportsInsert' where + type Rs ReportsInsert' = Report + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsInsert{..} + = go _riQuotaUser _riPrettyPrint _riUserIp + _riProfileId + _riKey + _riOauthToken + _riFields + _riAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsInsertAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/List.hs new file mode 100644 index 000000000..e84d4ce8d --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/List.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves list of reports. +-- +-- /See:/ for @DfareportingReportsList@. +module DFAReporting.Reports.List + ( + -- * REST Resource + ReportsListAPI + + -- * Creating a Request + , reportsList + , ReportsList + + -- * Request Lenses + , rlQuotaUser + , rlPrettyPrint + , rlUserIp + , rlProfileId + , rlSortOrder + , rlKey + , rlScope + , rlPageToken + , rlSortField + , rlOauthToken + , rlMaxResults + , rlFields + , rlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsList@ which the +-- 'ReportsList' request conforms to. +type ReportsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + QueryParam "sortOrder" Text :> + QueryParam "scope" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ReportList + +-- | Retrieves list of reports. +-- +-- /See:/ 'reportsList' smart constructor. +data ReportsList = ReportsList + { _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlUserIp :: !(Maybe Text) + , _rlProfileId :: !Int64 + , _rlSortOrder :: !Text + , _rlKey :: !(Maybe Text) + , _rlScope :: !Text + , _rlPageToken :: !(Maybe Text) + , _rlSortField :: !Text + , _rlOauthToken :: !(Maybe Text) + , _rlMaxResults :: !(Maybe Int32) + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlUserIp' +-- +-- * 'rlProfileId' +-- +-- * 'rlSortOrder' +-- +-- * 'rlKey' +-- +-- * 'rlScope' +-- +-- * 'rlPageToken' +-- +-- * 'rlSortField' +-- +-- * 'rlOauthToken' +-- +-- * 'rlMaxResults' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +reportsList + :: Int64 -- ^ 'profileId' + -> ReportsList +reportsList pRlProfileId_ = + ReportsList + { _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlUserIp = Nothing + , _rlProfileId = pRlProfileId_ + , _rlSortOrder = "DESCENDING" + , _rlKey = Nothing + , _rlScope = "MINE" + , _rlPageToken = Nothing + , _rlSortField = "LAST_MODIFIED_TIME" + , _rlOauthToken = Nothing + , _rlMaxResults = Nothing + , _rlFields = Nothing + , _rlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' ReportsList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' ReportsList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' ReportsList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | The DFA user profile ID. +rlProfileId :: Lens' ReportsList' Int64 +rlProfileId + = lens _rlProfileId (\ s a -> s{_rlProfileId = a}) + +-- | Order of sorted results, default is \'DESCENDING\'. +rlSortOrder :: Lens' ReportsList' Text +rlSortOrder + = lens _rlSortOrder (\ s a -> s{_rlSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' ReportsList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | The scope that defines which results are returned, default is \'MINE\'. +rlScope :: Lens' ReportsList' Text +rlScope = lens _rlScope (\ s a -> s{_rlScope = a}) + +-- | The value of the nextToken from the previous result page. +rlPageToken :: Lens' ReportsList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | The field by which to sort the list. +rlSortField :: Lens' ReportsList' Text +rlSortField + = lens _rlSortField (\ s a -> s{_rlSortField = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' ReportsList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | Maximum number of results to return. +rlMaxResults :: Lens' ReportsList' (Maybe Int32) +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' ReportsList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' ReportsList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest ReportsList' where + type Rs ReportsList' = ReportList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsList{..} + = go _rlQuotaUser _rlPrettyPrint _rlUserIp + _rlProfileId + (Just _rlSortOrder) + _rlKey + (Just _rlScope) + _rlPageToken + (Just _rlSortField) + _rlOauthToken + _rlMaxResults + _rlFields + _rlAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Patch.hs new file mode 100644 index 000000000..121ea5a94 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a report. This method supports patch semantics. +-- +-- /See:/ for @DfareportingReportsPatch@. +module DFAReporting.Reports.Patch + ( + -- * REST Resource + ReportsPatchAPI + + -- * Creating a Request + , reportsPatch + , ReportsPatch + + -- * Request Lenses + , rpQuotaUser + , rpPrettyPrint + , rpUserIp + , rpReportId + , rpProfileId + , rpKey + , rpOauthToken + , rpFields + , rpAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsPatch@ which the +-- 'ReportsPatch' request conforms to. +type ReportsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> Patch '[JSON] Report + +-- | Updates a report. This method supports patch semantics. +-- +-- /See:/ 'reportsPatch' smart constructor. +data ReportsPatch = ReportsPatch + { _rpQuotaUser :: !(Maybe Text) + , _rpPrettyPrint :: !Bool + , _rpUserIp :: !(Maybe Text) + , _rpReportId :: !Int64 + , _rpProfileId :: !Int64 + , _rpKey :: !(Maybe Text) + , _rpOauthToken :: !(Maybe Text) + , _rpFields :: !(Maybe Text) + , _rpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpQuotaUser' +-- +-- * 'rpPrettyPrint' +-- +-- * 'rpUserIp' +-- +-- * 'rpReportId' +-- +-- * 'rpProfileId' +-- +-- * 'rpKey' +-- +-- * 'rpOauthToken' +-- +-- * 'rpFields' +-- +-- * 'rpAlt' +reportsPatch + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsPatch +reportsPatch pRpReportId_ pRpProfileId_ = + ReportsPatch + { _rpQuotaUser = Nothing + , _rpPrettyPrint = True + , _rpUserIp = Nothing + , _rpReportId = pRpReportId_ + , _rpProfileId = pRpProfileId_ + , _rpKey = Nothing + , _rpOauthToken = Nothing + , _rpFields = Nothing + , _rpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpQuotaUser :: Lens' ReportsPatch' (Maybe Text) +rpQuotaUser + = lens _rpQuotaUser (\ s a -> s{_rpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpPrettyPrint :: Lens' ReportsPatch' Bool +rpPrettyPrint + = lens _rpPrettyPrint + (\ s a -> s{_rpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpUserIp :: Lens' ReportsPatch' (Maybe Text) +rpUserIp = lens _rpUserIp (\ s a -> s{_rpUserIp = a}) + +-- | The ID of the report. +rpReportId :: Lens' ReportsPatch' Int64 +rpReportId + = lens _rpReportId (\ s a -> s{_rpReportId = a}) + +-- | The DFA user profile ID. +rpProfileId :: Lens' ReportsPatch' Int64 +rpProfileId + = lens _rpProfileId (\ s a -> s{_rpProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpKey :: Lens' ReportsPatch' (Maybe Text) +rpKey = lens _rpKey (\ s a -> s{_rpKey = a}) + +-- | OAuth 2.0 token for the current user. +rpOauthToken :: Lens' ReportsPatch' (Maybe Text) +rpOauthToken + = lens _rpOauthToken (\ s a -> s{_rpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rpFields :: Lens' ReportsPatch' (Maybe Text) +rpFields = lens _rpFields (\ s a -> s{_rpFields = a}) + +-- | Data format for the response. +rpAlt :: Lens' ReportsPatch' Text +rpAlt = lens _rpAlt (\ s a -> s{_rpAlt = a}) + +instance GoogleRequest ReportsPatch' where + type Rs ReportsPatch' = Report + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsPatch{..} + = go _rpQuotaUser _rpPrettyPrint _rpUserIp + _rpReportId + _rpProfileId + _rpKey + _rpOauthToken + _rpFields + _rpAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsPatchAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Run.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Run.hs new file mode 100644 index 000000000..52b9c8ca5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Run.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Run +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Runs a report. +-- +-- /See:/ for @DfareportingReportsRun@. +module DFAReporting.Reports.Run + ( + -- * REST Resource + ReportsRunAPI + + -- * Creating a Request + , reportsRun + , ReportsRun + + -- * Request Lenses + , rrQuotaUser + , rrPrettyPrint + , rrSynchronous + , rrUserIp + , rrReportId + , rrProfileId + , rrKey + , rrOauthToken + , rrFields + , rrAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsRun@ which the +-- 'ReportsRun' request conforms to. +type ReportsRunAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> + "run" :> + QueryParam "synchronous" Bool :> Post '[JSON] File + +-- | Runs a report. +-- +-- /See:/ 'reportsRun' smart constructor. +data ReportsRun = ReportsRun + { _rrQuotaUser :: !(Maybe Text) + , _rrPrettyPrint :: !Bool + , _rrSynchronous :: !(Maybe Bool) + , _rrUserIp :: !(Maybe Text) + , _rrReportId :: !Int64 + , _rrProfileId :: !Int64 + , _rrKey :: !(Maybe Text) + , _rrOauthToken :: !(Maybe Text) + , _rrFields :: !(Maybe Text) + , _rrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsRun'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrQuotaUser' +-- +-- * 'rrPrettyPrint' +-- +-- * 'rrSynchronous' +-- +-- * 'rrUserIp' +-- +-- * 'rrReportId' +-- +-- * 'rrProfileId' +-- +-- * 'rrKey' +-- +-- * 'rrOauthToken' +-- +-- * 'rrFields' +-- +-- * 'rrAlt' +reportsRun + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsRun +reportsRun pRrReportId_ pRrProfileId_ = + ReportsRun + { _rrQuotaUser = Nothing + , _rrPrettyPrint = True + , _rrSynchronous = Nothing + , _rrUserIp = Nothing + , _rrReportId = pRrReportId_ + , _rrProfileId = pRrProfileId_ + , _rrKey = Nothing + , _rrOauthToken = Nothing + , _rrFields = Nothing + , _rrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrQuotaUser :: Lens' ReportsRun' (Maybe Text) +rrQuotaUser + = lens _rrQuotaUser (\ s a -> s{_rrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrPrettyPrint :: Lens' ReportsRun' Bool +rrPrettyPrint + = lens _rrPrettyPrint + (\ s a -> s{_rrPrettyPrint = a}) + +-- | If set and true, tries to run the report synchronously. +rrSynchronous :: Lens' ReportsRun' (Maybe Bool) +rrSynchronous + = lens _rrSynchronous + (\ s a -> s{_rrSynchronous = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrUserIp :: Lens' ReportsRun' (Maybe Text) +rrUserIp = lens _rrUserIp (\ s a -> s{_rrUserIp = a}) + +-- | The ID of the report. +rrReportId :: Lens' ReportsRun' Int64 +rrReportId + = lens _rrReportId (\ s a -> s{_rrReportId = a}) + +-- | The DFA profile ID. +rrProfileId :: Lens' ReportsRun' Int64 +rrProfileId + = lens _rrProfileId (\ s a -> s{_rrProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrKey :: Lens' ReportsRun' (Maybe Text) +rrKey = lens _rrKey (\ s a -> s{_rrKey = a}) + +-- | OAuth 2.0 token for the current user. +rrOauthToken :: Lens' ReportsRun' (Maybe Text) +rrOauthToken + = lens _rrOauthToken (\ s a -> s{_rrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrFields :: Lens' ReportsRun' (Maybe Text) +rrFields = lens _rrFields (\ s a -> s{_rrFields = a}) + +-- | Data format for the response. +rrAlt :: Lens' ReportsRun' Text +rrAlt = lens _rrAlt (\ s a -> s{_rrAlt = a}) + +instance GoogleRequest ReportsRun' where + type Rs ReportsRun' = File + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsRun{..} + = go _rrQuotaUser _rrPrettyPrint _rrSynchronous + _rrUserIp + _rrReportId + _rrProfileId + _rrKey + _rrOauthToken + _rrFields + _rrAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsRunAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Update.hs new file mode 100644 index 000000000..d68d50989 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Reports/Update.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Reports.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a report. +-- +-- /See:/ for @DfareportingReportsUpdate@. +module DFAReporting.Reports.Update + ( + -- * REST Resource + ReportsUpdateAPI + + -- * Creating a Request + , reportsUpdate + , ReportsUpdate + + -- * Request Lenses + , ruQuotaUser + , ruPrettyPrint + , ruUserIp + , ruReportId + , ruProfileId + , ruKey + , ruOauthToken + , ruFields + , ruAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingReportsUpdate@ which the +-- 'ReportsUpdate' request conforms to. +type ReportsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "reports" :> + Capture "reportId" Int64 :> Put '[JSON] Report + +-- | Updates a report. +-- +-- /See:/ 'reportsUpdate' smart constructor. +data ReportsUpdate = ReportsUpdate + { _ruQuotaUser :: !(Maybe Text) + , _ruPrettyPrint :: !Bool + , _ruUserIp :: !(Maybe Text) + , _ruReportId :: !Int64 + , _ruProfileId :: !Int64 + , _ruKey :: !(Maybe Text) + , _ruOauthToken :: !(Maybe Text) + , _ruFields :: !(Maybe Text) + , _ruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruQuotaUser' +-- +-- * 'ruPrettyPrint' +-- +-- * 'ruUserIp' +-- +-- * 'ruReportId' +-- +-- * 'ruProfileId' +-- +-- * 'ruKey' +-- +-- * 'ruOauthToken' +-- +-- * 'ruFields' +-- +-- * 'ruAlt' +reportsUpdate + :: Int64 -- ^ 'reportId' + -> Int64 -- ^ 'profileId' + -> ReportsUpdate +reportsUpdate pRuReportId_ pRuProfileId_ = + ReportsUpdate + { _ruQuotaUser = Nothing + , _ruPrettyPrint = True + , _ruUserIp = Nothing + , _ruReportId = pRuReportId_ + , _ruProfileId = pRuProfileId_ + , _ruKey = Nothing + , _ruOauthToken = Nothing + , _ruFields = Nothing + , _ruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruQuotaUser :: Lens' ReportsUpdate' (Maybe Text) +ruQuotaUser + = lens _ruQuotaUser (\ s a -> s{_ruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruPrettyPrint :: Lens' ReportsUpdate' Bool +ruPrettyPrint + = lens _ruPrettyPrint + (\ s a -> s{_ruPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruUserIp :: Lens' ReportsUpdate' (Maybe Text) +ruUserIp = lens _ruUserIp (\ s a -> s{_ruUserIp = a}) + +-- | The ID of the report. +ruReportId :: Lens' ReportsUpdate' Int64 +ruReportId + = lens _ruReportId (\ s a -> s{_ruReportId = a}) + +-- | The DFA user profile ID. +ruProfileId :: Lens' ReportsUpdate' Int64 +ruProfileId + = lens _ruProfileId (\ s a -> s{_ruProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruKey :: Lens' ReportsUpdate' (Maybe Text) +ruKey = lens _ruKey (\ s a -> s{_ruKey = a}) + +-- | OAuth 2.0 token for the current user. +ruOauthToken :: Lens' ReportsUpdate' (Maybe Text) +ruOauthToken + = lens _ruOauthToken (\ s a -> s{_ruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ruFields :: Lens' ReportsUpdate' (Maybe Text) +ruFields = lens _ruFields (\ s a -> s{_ruFields = a}) + +-- | Data format for the response. +ruAlt :: Lens' ReportsUpdate' Text +ruAlt = lens _ruAlt (\ s a -> s{_ruAlt = a}) + +instance GoogleRequest ReportsUpdate' where + type Rs ReportsUpdate' = Report + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u ReportsUpdate{..} + = go _ruQuotaUser _ruPrettyPrint _ruUserIp + _ruReportId + _ruProfileId + _ruKey + _ruOauthToken + _ruFields + _ruAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsUpdateAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Get.hs new file mode 100644 index 000000000..4ccd12855 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sites.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one site by ID. +-- +-- /See:/ for @DfareportingSitesGet@. +module DFAReporting.Sites.Get + ( + -- * REST Resource + SitesGetAPI + + -- * Creating a Request + , sitesGet + , SitesGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgProfileId + , sgKey + , sgId + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSitesGet@ which the +-- 'SitesGet' request conforms to. +type SitesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sites" :> Capture "id" Int64 :> Get '[JSON] Site + +-- | Gets one site by ID. +-- +-- /See:/ 'sitesGet' smart constructor. +data SitesGet = SitesGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgProfileId :: !Int64 + , _sgKey :: !(Maybe Text) + , _sgId :: !Int64 + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgProfileId' +-- +-- * 'sgKey' +-- +-- * 'sgId' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +sitesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> SitesGet +sitesGet pSgProfileId_ pSgId_ = + SitesGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgProfileId = pSgProfileId_ + , _sgKey = Nothing + , _sgId = pSgId_ + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SitesGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SitesGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SitesGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | User profile ID associated with this request. +sgProfileId :: Lens' SitesGet' Int64 +sgProfileId + = lens _sgProfileId (\ s a -> s{_sgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SitesGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | Site ID. +sgId :: Lens' SitesGet' Int64 +sgId = lens _sgId (\ s a -> s{_sgId = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SitesGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SitesGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SitesGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SitesGet' where + type Rs SitesGet' = Site + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SitesGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp + _sgProfileId + _sgKey + _sgId + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SitesGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Insert.hs new file mode 100644 index 000000000..62c334308 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Insert.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sites.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new site. +-- +-- /See:/ for @DfareportingSitesInsert@. +module DFAReporting.Sites.Insert + ( + -- * REST Resource + SitesInsertAPI + + -- * Creating a Request + , sitesInsert + , SitesInsert + + -- * Request Lenses + , siQuotaUser + , siPrettyPrint + , siUserIp + , siProfileId + , siKey + , siOauthToken + , siFields + , siAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSitesInsert@ which the +-- 'SitesInsert' request conforms to. +type SitesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sites" :> Post '[JSON] Site + +-- | Inserts a new site. +-- +-- /See:/ 'sitesInsert' smart constructor. +data SitesInsert = SitesInsert + { _siQuotaUser :: !(Maybe Text) + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siProfileId :: !Int64 + , _siKey :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siProfileId' +-- +-- * 'siKey' +-- +-- * 'siOauthToken' +-- +-- * 'siFields' +-- +-- * 'siAlt' +sitesInsert + :: Int64 -- ^ 'profileId' + -> SitesInsert +sitesInsert pSiProfileId_ = + SitesInsert + { _siQuotaUser = Nothing + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siProfileId = pSiProfileId_ + , _siKey = Nothing + , _siOauthToken = Nothing + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' SitesInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' SitesInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' SitesInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | User profile ID associated with this request. +siProfileId :: Lens' SitesInsert' Int64 +siProfileId + = lens _siProfileId (\ s a -> s{_siProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' SitesInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' SitesInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' SitesInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' SitesInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest SitesInsert' where + type Rs SitesInsert' = Site + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SitesInsert{..} + = go _siQuotaUser _siPrettyPrint _siUserIp + _siProfileId + _siKey + _siOauthToken + _siFields + _siAlt + where go + = clientWithRoute (Proxy :: Proxy SitesInsertAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/List.hs new file mode 100644 index 000000000..dfa4f877a --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/List.hs @@ -0,0 +1,351 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sites.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of sites, possibly filtered. +-- +-- /See:/ for @DfareportingSitesList@. +module DFAReporting.Sites.List + ( + -- * REST Resource + SitesListAPI + + -- * Creating a Request + , sitesList + , SitesList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUnmappedSite + , slUserIp + , slCampaignIds + , slSearchString + , slAcceptsInterstitialPlacements + , slAcceptsPublisherPaidPlacements + , slIds + , slProfileId + , slDirectorySiteIds + , slSortOrder + , slKey + , slPageToken + , slSortField + , slSubaccountId + , slAcceptsInStreamVideoPlacements + , slOauthToken + , slApproved + , slAdWordsSite + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSitesList@ which the +-- 'SitesList' request conforms to. +type SitesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sites" :> + QueryParam "unmappedSite" Bool :> + QueryParams "campaignIds" Int64 :> + QueryParam "searchString" Text :> + QueryParam "acceptsInterstitialPlacements" Bool :> + QueryParam "acceptsPublisherPaidPlacements" Bool :> + QueryParams "ids" Int64 :> + QueryParams "directorySiteIds" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "subaccountId" Int64 :> + QueryParam "acceptsInStreamVideoPlacements" + Bool + :> + QueryParam "approved" Bool :> + QueryParam "adWordsSite" Bool :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SitesListResponse + +-- | Retrieves a list of sites, possibly filtered. +-- +-- /See:/ 'sitesList' smart constructor. +data SitesList = SitesList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUnmappedSite :: !(Maybe Bool) + , _slUserIp :: !(Maybe Text) + , _slCampaignIds :: !(Maybe Int64) + , _slSearchString :: !(Maybe Text) + , _slAcceptsInterstitialPlacements :: !(Maybe Bool) + , _slAcceptsPublisherPaidPlacements :: !(Maybe Bool) + , _slIds :: !(Maybe Int64) + , _slProfileId :: !Int64 + , _slDirectorySiteIds :: !(Maybe Int64) + , _slSortOrder :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slSortField :: !(Maybe Text) + , _slSubaccountId :: !(Maybe Int64) + , _slAcceptsInStreamVideoPlacements :: !(Maybe Bool) + , _slOauthToken :: !(Maybe Text) + , _slApproved :: !(Maybe Bool) + , _slAdWordsSite :: !(Maybe Bool) + , _slMaxResults :: !(Maybe Int32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUnmappedSite' +-- +-- * 'slUserIp' +-- +-- * 'slCampaignIds' +-- +-- * 'slSearchString' +-- +-- * 'slAcceptsInterstitialPlacements' +-- +-- * 'slAcceptsPublisherPaidPlacements' +-- +-- * 'slIds' +-- +-- * 'slProfileId' +-- +-- * 'slDirectorySiteIds' +-- +-- * 'slSortOrder' +-- +-- * 'slKey' +-- +-- * 'slPageToken' +-- +-- * 'slSortField' +-- +-- * 'slSubaccountId' +-- +-- * 'slAcceptsInStreamVideoPlacements' +-- +-- * 'slOauthToken' +-- +-- * 'slApproved' +-- +-- * 'slAdWordsSite' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +sitesList + :: Int64 -- ^ 'profileId' + -> SitesList +sitesList pSlProfileId_ = + SitesList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUnmappedSite = Nothing + , _slUserIp = Nothing + , _slCampaignIds = Nothing + , _slSearchString = Nothing + , _slAcceptsInterstitialPlacements = Nothing + , _slAcceptsPublisherPaidPlacements = Nothing + , _slIds = Nothing + , _slProfileId = pSlProfileId_ + , _slDirectorySiteIds = Nothing + , _slSortOrder = Nothing + , _slKey = Nothing + , _slPageToken = Nothing + , _slSortField = Nothing + , _slSubaccountId = Nothing + , _slAcceptsInStreamVideoPlacements = Nothing + , _slOauthToken = Nothing + , _slApproved = Nothing + , _slAdWordsSite = Nothing + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SitesList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SitesList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | Select only sites that have not been mapped to a directory site. +slUnmappedSite :: Lens' SitesList' (Maybe Bool) +slUnmappedSite + = lens _slUnmappedSite + (\ s a -> s{_slUnmappedSite = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SitesList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | Select only sites with these campaign IDs. +slCampaignIds :: Lens' SitesList' (Maybe Int64) +slCampaignIds + = lens _slCampaignIds + (\ s a -> s{_slCampaignIds = a}) + +-- | Allows searching for objects by name, ID or keyName. Wildcards (*) are +-- allowed. For example, \"site*2015\" will return objects with names like +-- \"site June 2015\", \"site April 2015\", or simply \"site 2015\". Most +-- of the searches also add wildcards implicitly at the start and the end +-- of the search string. For example, a search string of \"site\" will +-- match objects with name \"my site\", \"site 2015\", or simply \"site\". +slSearchString :: Lens' SitesList' (Maybe Text) +slSearchString + = lens _slSearchString + (\ s a -> s{_slSearchString = a}) + +-- | This search filter is no longer supported and will have no effect on the +-- results returned. +slAcceptsInterstitialPlacements :: Lens' SitesList' (Maybe Bool) +slAcceptsInterstitialPlacements + = lens _slAcceptsInterstitialPlacements + (\ s a -> s{_slAcceptsInterstitialPlacements = a}) + +-- | Select only sites that accept publisher paid placements. +slAcceptsPublisherPaidPlacements :: Lens' SitesList' (Maybe Bool) +slAcceptsPublisherPaidPlacements + = lens _slAcceptsPublisherPaidPlacements + (\ s a -> s{_slAcceptsPublisherPaidPlacements = a}) + +-- | Select only sites with these IDs. +slIds :: Lens' SitesList' (Maybe Int64) +slIds = lens _slIds (\ s a -> s{_slIds = a}) + +-- | User profile ID associated with this request. +slProfileId :: Lens' SitesList' Int64 +slProfileId + = lens _slProfileId (\ s a -> s{_slProfileId = a}) + +-- | Select only sites with these directory site IDs. +slDirectorySiteIds :: Lens' SitesList' (Maybe Int64) +slDirectorySiteIds + = lens _slDirectorySiteIds + (\ s a -> s{_slDirectorySiteIds = a}) + +-- | Order of sorted results, default is ASCENDING. +slSortOrder :: Lens' SitesList' (Maybe Text) +slSortOrder + = lens _slSortOrder (\ s a -> s{_slSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SitesList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | Value of the nextPageToken from the previous result page. +slPageToken :: Lens' SitesList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | Field by which to sort the list. +slSortField :: Lens' SitesList' (Maybe Text) +slSortField + = lens _slSortField (\ s a -> s{_slSortField = a}) + +-- | Select only sites with this subaccount ID. +slSubaccountId :: Lens' SitesList' (Maybe Int64) +slSubaccountId + = lens _slSubaccountId + (\ s a -> s{_slSubaccountId = a}) + +-- | This search filter is no longer supported and will have no effect on the +-- results returned. +slAcceptsInStreamVideoPlacements :: Lens' SitesList' (Maybe Bool) +slAcceptsInStreamVideoPlacements + = lens _slAcceptsInStreamVideoPlacements + (\ s a -> s{_slAcceptsInStreamVideoPlacements = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SitesList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Select only approved sites. +slApproved :: Lens' SitesList' (Maybe Bool) +slApproved + = lens _slApproved (\ s a -> s{_slApproved = a}) + +-- | Select only AdWords sites. +slAdWordsSite :: Lens' SitesList' (Maybe Bool) +slAdWordsSite + = lens _slAdWordsSite + (\ s a -> s{_slAdWordsSite = a}) + +-- | Maximum number of results to return. +slMaxResults :: Lens' SitesList' (Maybe Int32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SitesList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SitesList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SitesList' where + type Rs SitesList' = SitesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SitesList{..} + = go _slQuotaUser _slPrettyPrint _slUnmappedSite + _slUserIp + _slCampaignIds + _slSearchString + _slAcceptsInterstitialPlacements + _slAcceptsPublisherPaidPlacements + _slIds + _slProfileId + _slDirectorySiteIds + _slSortOrder + _slKey + _slPageToken + _slSortField + _slSubaccountId + _slAcceptsInStreamVideoPlacements + _slOauthToken + _slApproved + _slAdWordsSite + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SitesListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Patch.hs new file mode 100644 index 000000000..7f7fef040 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Patch.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sites.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing site. This method supports patch semantics. +-- +-- /See:/ for @DfareportingSitesPatch@. +module DFAReporting.Sites.Patch + ( + -- * REST Resource + SitesPatchAPI + + -- * Creating a Request + , sitesPatch + , SitesPatch + + -- * Request Lenses + , spQuotaUser + , spPrettyPrint + , spUserIp + , spProfileId + , spKey + , spId + , spOauthToken + , spFields + , spAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSitesPatch@ which the +-- 'SitesPatch' request conforms to. +type SitesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sites" :> + QueryParam "id" Int64 :> Patch '[JSON] Site + +-- | Updates an existing site. This method supports patch semantics. +-- +-- /See:/ 'sitesPatch' smart constructor. +data SitesPatch = SitesPatch + { _spQuotaUser :: !(Maybe Text) + , _spPrettyPrint :: !Bool + , _spUserIp :: !(Maybe Text) + , _spProfileId :: !Int64 + , _spKey :: !(Maybe Text) + , _spId :: !Int64 + , _spOauthToken :: !(Maybe Text) + , _spFields :: !(Maybe Text) + , _spAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spQuotaUser' +-- +-- * 'spPrettyPrint' +-- +-- * 'spUserIp' +-- +-- * 'spProfileId' +-- +-- * 'spKey' +-- +-- * 'spId' +-- +-- * 'spOauthToken' +-- +-- * 'spFields' +-- +-- * 'spAlt' +sitesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> SitesPatch +sitesPatch pSpProfileId_ pSpId_ = + SitesPatch + { _spQuotaUser = Nothing + , _spPrettyPrint = True + , _spUserIp = Nothing + , _spProfileId = pSpProfileId_ + , _spKey = Nothing + , _spId = pSpId_ + , _spOauthToken = Nothing + , _spFields = Nothing + , _spAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +spQuotaUser :: Lens' SitesPatch' (Maybe Text) +spQuotaUser + = lens _spQuotaUser (\ s a -> s{_spQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +spPrettyPrint :: Lens' SitesPatch' Bool +spPrettyPrint + = lens _spPrettyPrint + (\ s a -> s{_spPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +spUserIp :: Lens' SitesPatch' (Maybe Text) +spUserIp = lens _spUserIp (\ s a -> s{_spUserIp = a}) + +-- | User profile ID associated with this request. +spProfileId :: Lens' SitesPatch' Int64 +spProfileId + = lens _spProfileId (\ s a -> s{_spProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +spKey :: Lens' SitesPatch' (Maybe Text) +spKey = lens _spKey (\ s a -> s{_spKey = a}) + +-- | Site ID. +spId :: Lens' SitesPatch' Int64 +spId = lens _spId (\ s a -> s{_spId = a}) + +-- | OAuth 2.0 token for the current user. +spOauthToken :: Lens' SitesPatch' (Maybe Text) +spOauthToken + = lens _spOauthToken (\ s a -> s{_spOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +spFields :: Lens' SitesPatch' (Maybe Text) +spFields = lens _spFields (\ s a -> s{_spFields = a}) + +-- | Data format for the response. +spAlt :: Lens' SitesPatch' Text +spAlt = lens _spAlt (\ s a -> s{_spAlt = a}) + +instance GoogleRequest SitesPatch' where + type Rs SitesPatch' = Site + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SitesPatch{..} + = go _spQuotaUser _spPrettyPrint _spUserIp + _spProfileId + _spKey + (Just _spId) + _spOauthToken + _spFields + _spAlt + where go + = clientWithRoute (Proxy :: Proxy SitesPatchAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Update.hs new file mode 100644 index 000000000..f5fdf3b99 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sites/Update.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sites.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing site. +-- +-- /See:/ for @DfareportingSitesUpdate@. +module DFAReporting.Sites.Update + ( + -- * REST Resource + SitesUpdateAPI + + -- * Creating a Request + , sitesUpdate + , SitesUpdate + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suUserIp + , suProfileId + , suKey + , suOauthToken + , suFields + , suAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSitesUpdate@ which the +-- 'SitesUpdate' request conforms to. +type SitesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sites" :> Put '[JSON] Site + +-- | Updates an existing site. +-- +-- /See:/ 'sitesUpdate' smart constructor. +data SitesUpdate = SitesUpdate + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suProfileId :: !Int64 + , _suKey :: !(Maybe Text) + , _suOauthToken :: !(Maybe Text) + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suProfileId' +-- +-- * 'suKey' +-- +-- * 'suOauthToken' +-- +-- * 'suFields' +-- +-- * 'suAlt' +sitesUpdate + :: Int64 -- ^ 'profileId' + -> SitesUpdate +sitesUpdate pSuProfileId_ = + SitesUpdate + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suProfileId = pSuProfileId_ + , _suKey = Nothing + , _suOauthToken = Nothing + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' SitesUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' SitesUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' SitesUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | User profile ID associated with this request. +suProfileId :: Lens' SitesUpdate' Int64 +suProfileId + = lens _suProfileId (\ s a -> s{_suProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' SitesUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' SitesUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' SitesUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' SitesUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest SitesUpdate' where + type Rs SitesUpdate' = Site + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SitesUpdate{..} + = go _suQuotaUser _suPrettyPrint _suUserIp + _suProfileId + _suKey + _suOauthToken + _suFields + _suAlt + where go + = clientWithRoute (Proxy :: Proxy SitesUpdateAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Get.hs new file mode 100644 index 000000000..50d435e8b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sizes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one size by ID. +-- +-- /See:/ for @DfareportingSizesGet@. +module DFAReporting.Sizes.Get + ( + -- * REST Resource + SizesGetAPI + + -- * Creating a Request + , sizesGet + , SizesGet + + -- * Request Lenses + , sggQuotaUser + , sggPrettyPrint + , sggUserIp + , sggProfileId + , sggKey + , sggId + , sggOauthToken + , sggFields + , sggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSizesGet@ which the +-- 'SizesGet' request conforms to. +type SizesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sizes" :> Capture "id" Int64 :> Get '[JSON] Size + +-- | Gets one size by ID. +-- +-- /See:/ 'sizesGet' smart constructor. +data SizesGet = SizesGet + { _sggQuotaUser :: !(Maybe Text) + , _sggPrettyPrint :: !Bool + , _sggUserIp :: !(Maybe Text) + , _sggProfileId :: !Int64 + , _sggKey :: !(Maybe Text) + , _sggId :: !Int64 + , _sggOauthToken :: !(Maybe Text) + , _sggFields :: !(Maybe Text) + , _sggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SizesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sggQuotaUser' +-- +-- * 'sggPrettyPrint' +-- +-- * 'sggUserIp' +-- +-- * 'sggProfileId' +-- +-- * 'sggKey' +-- +-- * 'sggId' +-- +-- * 'sggOauthToken' +-- +-- * 'sggFields' +-- +-- * 'sggAlt' +sizesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> SizesGet +sizesGet pSggProfileId_ pSggId_ = + SizesGet + { _sggQuotaUser = Nothing + , _sggPrettyPrint = True + , _sggUserIp = Nothing + , _sggProfileId = pSggProfileId_ + , _sggKey = Nothing + , _sggId = pSggId_ + , _sggOauthToken = Nothing + , _sggFields = Nothing + , _sggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sggQuotaUser :: Lens' SizesGet' (Maybe Text) +sggQuotaUser + = lens _sggQuotaUser (\ s a -> s{_sggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sggPrettyPrint :: Lens' SizesGet' Bool +sggPrettyPrint + = lens _sggPrettyPrint + (\ s a -> s{_sggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sggUserIp :: Lens' SizesGet' (Maybe Text) +sggUserIp + = lens _sggUserIp (\ s a -> s{_sggUserIp = a}) + +-- | User profile ID associated with this request. +sggProfileId :: Lens' SizesGet' Int64 +sggProfileId + = lens _sggProfileId (\ s a -> s{_sggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sggKey :: Lens' SizesGet' (Maybe Text) +sggKey = lens _sggKey (\ s a -> s{_sggKey = a}) + +-- | Size ID. +sggId :: Lens' SizesGet' Int64 +sggId = lens _sggId (\ s a -> s{_sggId = a}) + +-- | OAuth 2.0 token for the current user. +sggOauthToken :: Lens' SizesGet' (Maybe Text) +sggOauthToken + = lens _sggOauthToken + (\ s a -> s{_sggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sggFields :: Lens' SizesGet' (Maybe Text) +sggFields + = lens _sggFields (\ s a -> s{_sggFields = a}) + +-- | Data format for the response. +sggAlt :: Lens' SizesGet' Text +sggAlt = lens _sggAlt (\ s a -> s{_sggAlt = a}) + +instance GoogleRequest SizesGet' where + type Rs SizesGet' = Size + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SizesGet{..} + = go _sggQuotaUser _sggPrettyPrint _sggUserIp + _sggProfileId + _sggKey + _sggId + _sggOauthToken + _sggFields + _sggAlt + where go + = clientWithRoute (Proxy :: Proxy SizesGetAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Insert.hs new file mode 100644 index 000000000..10b6dce4c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Insert.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sizes.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new size. +-- +-- /See:/ for @DfareportingSizesInsert@. +module DFAReporting.Sizes.Insert + ( + -- * REST Resource + SizesInsertAPI + + -- * Creating a Request + , sizesInsert + , SizesInsert + + -- * Request Lenses + , sQuotaUser + , sPrettyPrint + , sUserIp + , sProfileId + , sKey + , sOauthToken + , sFields + , sAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSizesInsert@ which the +-- 'SizesInsert' request conforms to. +type SizesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sizes" :> Post '[JSON] Size + +-- | Inserts a new size. +-- +-- /See:/ 'sizesInsert' smart constructor. +data SizesInsert = SizesInsert + { _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sUserIp :: !(Maybe Text) + , _sProfileId :: !Int64 + , _sKey :: !(Maybe Text) + , _sOauthToken :: !(Maybe Text) + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SizesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sUserIp' +-- +-- * 'sProfileId' +-- +-- * 'sKey' +-- +-- * 'sOauthToken' +-- +-- * 'sFields' +-- +-- * 'sAlt' +sizesInsert + :: Int64 -- ^ 'profileId' + -> SizesInsert +sizesInsert pSProfileId_ = + SizesInsert + { _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sUserIp = Nothing + , _sProfileId = pSProfileId_ + , _sKey = Nothing + , _sOauthToken = Nothing + , _sFields = Nothing + , _sAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' SizesInsert' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' SizesInsert' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' SizesInsert' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | User profile ID associated with this request. +sProfileId :: Lens' SizesInsert' Int64 +sProfileId + = lens _sProfileId (\ s a -> s{_sProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' SizesInsert' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' SizesInsert' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' SizesInsert' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' SizesInsert' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest SizesInsert' where + type Rs SizesInsert' = Size + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SizesInsert{..} + = go _sQuotaUser _sPrettyPrint _sUserIp _sProfileId + _sKey + _sOauthToken + _sFields + _sAlt + where go + = clientWithRoute (Proxy :: Proxy SizesInsertAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/List.hs new file mode 100644 index 000000000..c471bbf0c --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/List.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Sizes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of sizes, possibly filtered. +-- +-- /See:/ for @DfareportingSizesList@. +module DFAReporting.Sizes.List + ( + -- * REST Resource + SizesListAPI + + -- * Creating a Request + , sizesList + , SizesList + + -- * Request Lenses + , sllQuotaUser + , sllHeight + , sllPrettyPrint + , sllUserIp + , sllIds + , sllWidth + , sllProfileId + , sllKey + , sllOauthToken + , sllIabStandard + , sllFields + , sllAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSizesList@ which the +-- 'SizesList' request conforms to. +type SizesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "sizes" :> + QueryParam "height" Int32 :> + QueryParams "ids" Int64 :> + QueryParam "width" Int32 :> + QueryParam "iabStandard" Bool :> + Get '[JSON] SizesListResponse + +-- | Retrieves a list of sizes, possibly filtered. +-- +-- /See:/ 'sizesList' smart constructor. +data SizesList = SizesList + { _sllQuotaUser :: !(Maybe Text) + , _sllHeight :: !(Maybe Int32) + , _sllPrettyPrint :: !Bool + , _sllUserIp :: !(Maybe Text) + , _sllIds :: !(Maybe Int64) + , _sllWidth :: !(Maybe Int32) + , _sllProfileId :: !Int64 + , _sllKey :: !(Maybe Text) + , _sllOauthToken :: !(Maybe Text) + , _sllIabStandard :: !(Maybe Bool) + , _sllFields :: !(Maybe Text) + , _sllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SizesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sllQuotaUser' +-- +-- * 'sllHeight' +-- +-- * 'sllPrettyPrint' +-- +-- * 'sllUserIp' +-- +-- * 'sllIds' +-- +-- * 'sllWidth' +-- +-- * 'sllProfileId' +-- +-- * 'sllKey' +-- +-- * 'sllOauthToken' +-- +-- * 'sllIabStandard' +-- +-- * 'sllFields' +-- +-- * 'sllAlt' +sizesList + :: Int64 -- ^ 'profileId' + -> SizesList +sizesList pSllProfileId_ = + SizesList + { _sllQuotaUser = Nothing + , _sllHeight = Nothing + , _sllPrettyPrint = True + , _sllUserIp = Nothing + , _sllIds = Nothing + , _sllWidth = Nothing + , _sllProfileId = pSllProfileId_ + , _sllKey = Nothing + , _sllOauthToken = Nothing + , _sllIabStandard = Nothing + , _sllFields = Nothing + , _sllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sllQuotaUser :: Lens' SizesList' (Maybe Text) +sllQuotaUser + = lens _sllQuotaUser (\ s a -> s{_sllQuotaUser = a}) + +-- | Select only sizes with this height. +sllHeight :: Lens' SizesList' (Maybe Int32) +sllHeight + = lens _sllHeight (\ s a -> s{_sllHeight = a}) + +-- | Returns response with indentations and line breaks. +sllPrettyPrint :: Lens' SizesList' Bool +sllPrettyPrint + = lens _sllPrettyPrint + (\ s a -> s{_sllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sllUserIp :: Lens' SizesList' (Maybe Text) +sllUserIp + = lens _sllUserIp (\ s a -> s{_sllUserIp = a}) + +-- | Select only sizes with these IDs. +sllIds :: Lens' SizesList' (Maybe Int64) +sllIds = lens _sllIds (\ s a -> s{_sllIds = a}) + +-- | Select only sizes with this width. +sllWidth :: Lens' SizesList' (Maybe Int32) +sllWidth = lens _sllWidth (\ s a -> s{_sllWidth = a}) + +-- | User profile ID associated with this request. +sllProfileId :: Lens' SizesList' Int64 +sllProfileId + = lens _sllProfileId (\ s a -> s{_sllProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sllKey :: Lens' SizesList' (Maybe Text) +sllKey = lens _sllKey (\ s a -> s{_sllKey = a}) + +-- | OAuth 2.0 token for the current user. +sllOauthToken :: Lens' SizesList' (Maybe Text) +sllOauthToken + = lens _sllOauthToken + (\ s a -> s{_sllOauthToken = a}) + +-- | Select only IAB standard sizes. +sllIabStandard :: Lens' SizesList' (Maybe Bool) +sllIabStandard + = lens _sllIabStandard + (\ s a -> s{_sllIabStandard = a}) + +-- | Selector specifying which fields to include in a partial response. +sllFields :: Lens' SizesList' (Maybe Text) +sllFields + = lens _sllFields (\ s a -> s{_sllFields = a}) + +-- | Data format for the response. +sllAlt :: Lens' SizesList' Text +sllAlt = lens _sllAlt (\ s a -> s{_sllAlt = a}) + +instance GoogleRequest SizesList' where + type Rs SizesList' = SizesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SizesList{..} + = go _sllQuotaUser _sllHeight _sllPrettyPrint + _sllUserIp + _sllIds + _sllWidth + _sllProfileId + _sllKey + _sllOauthToken + _sllIabStandard + _sllFields + _sllAlt + where go + = clientWithRoute (Proxy :: Proxy SizesListAPI) r u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Get.hs new file mode 100644 index 000000000..dca54ec81 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Subaccounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one subaccount by ID. +-- +-- /See:/ for @DfareportingSubaccountsGet@. +module DFAReporting.Subaccounts.Get + ( + -- * REST Resource + SubaccountsGetAPI + + -- * Creating a Request + , subaccountsGet + , SubaccountsGet + + -- * Request Lenses + , subuQuotaUser + , subuPrettyPrint + , subuUserIp + , subuProfileId + , subuKey + , subuId + , subuOauthToken + , subuFields + , subuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSubaccountsGet@ which the +-- 'SubaccountsGet' request conforms to. +type SubaccountsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "subaccounts" :> + Capture "id" Int64 :> Get '[JSON] Subaccount + +-- | Gets one subaccount by ID. +-- +-- /See:/ 'subaccountsGet' smart constructor. +data SubaccountsGet = SubaccountsGet + { _subuQuotaUser :: !(Maybe Text) + , _subuPrettyPrint :: !Bool + , _subuUserIp :: !(Maybe Text) + , _subuProfileId :: !Int64 + , _subuKey :: !(Maybe Text) + , _subuId :: !Int64 + , _subuOauthToken :: !(Maybe Text) + , _subuFields :: !(Maybe Text) + , _subuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subuQuotaUser' +-- +-- * 'subuPrettyPrint' +-- +-- * 'subuUserIp' +-- +-- * 'subuProfileId' +-- +-- * 'subuKey' +-- +-- * 'subuId' +-- +-- * 'subuOauthToken' +-- +-- * 'subuFields' +-- +-- * 'subuAlt' +subaccountsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> SubaccountsGet +subaccountsGet pSubuProfileId_ pSubuId_ = + SubaccountsGet + { _subuQuotaUser = Nothing + , _subuPrettyPrint = True + , _subuUserIp = Nothing + , _subuProfileId = pSubuProfileId_ + , _subuKey = Nothing + , _subuId = pSubuId_ + , _subuOauthToken = Nothing + , _subuFields = Nothing + , _subuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +subuQuotaUser :: Lens' SubaccountsGet' (Maybe Text) +subuQuotaUser + = lens _subuQuotaUser + (\ s a -> s{_subuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +subuPrettyPrint :: Lens' SubaccountsGet' Bool +subuPrettyPrint + = lens _subuPrettyPrint + (\ s a -> s{_subuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +subuUserIp :: Lens' SubaccountsGet' (Maybe Text) +subuUserIp + = lens _subuUserIp (\ s a -> s{_subuUserIp = a}) + +-- | User profile ID associated with this request. +subuProfileId :: Lens' SubaccountsGet' Int64 +subuProfileId + = lens _subuProfileId + (\ s a -> s{_subuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +subuKey :: Lens' SubaccountsGet' (Maybe Text) +subuKey = lens _subuKey (\ s a -> s{_subuKey = a}) + +-- | Subaccount ID. +subuId :: Lens' SubaccountsGet' Int64 +subuId = lens _subuId (\ s a -> s{_subuId = a}) + +-- | OAuth 2.0 token for the current user. +subuOauthToken :: Lens' SubaccountsGet' (Maybe Text) +subuOauthToken + = lens _subuOauthToken + (\ s a -> s{_subuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +subuFields :: Lens' SubaccountsGet' (Maybe Text) +subuFields + = lens _subuFields (\ s a -> s{_subuFields = a}) + +-- | Data format for the response. +subuAlt :: Lens' SubaccountsGet' Text +subuAlt = lens _subuAlt (\ s a -> s{_subuAlt = a}) + +instance GoogleRequest SubaccountsGet' where + type Rs SubaccountsGet' = Subaccount + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SubaccountsGet{..} + = go _subuQuotaUser _subuPrettyPrint _subuUserIp + _subuProfileId + _subuKey + _subuId + _subuOauthToken + _subuFields + _subuAlt + where go + = clientWithRoute (Proxy :: Proxy SubaccountsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Insert.hs new file mode 100644 index 000000000..796d355bc --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Insert.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Subaccounts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new subaccount. +-- +-- /See:/ for @DfareportingSubaccountsInsert@. +module DFAReporting.Subaccounts.Insert + ( + -- * REST Resource + SubaccountsInsertAPI + + -- * Creating a Request + , subaccountsInsert + , SubaccountsInsert + + -- * Request Lenses + , subQuotaUser + , subPrettyPrint + , subUserIp + , subProfileId + , subKey + , subOauthToken + , subFields + , subAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSubaccountsInsert@ which the +-- 'SubaccountsInsert' request conforms to. +type SubaccountsInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "subaccounts" :> Post '[JSON] Subaccount + +-- | Inserts a new subaccount. +-- +-- /See:/ 'subaccountsInsert' smart constructor. +data SubaccountsInsert = SubaccountsInsert + { _subQuotaUser :: !(Maybe Text) + , _subPrettyPrint :: !Bool + , _subUserIp :: !(Maybe Text) + , _subProfileId :: !Int64 + , _subKey :: !(Maybe Text) + , _subOauthToken :: !(Maybe Text) + , _subFields :: !(Maybe Text) + , _subAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subQuotaUser' +-- +-- * 'subPrettyPrint' +-- +-- * 'subUserIp' +-- +-- * 'subProfileId' +-- +-- * 'subKey' +-- +-- * 'subOauthToken' +-- +-- * 'subFields' +-- +-- * 'subAlt' +subaccountsInsert + :: Int64 -- ^ 'profileId' + -> SubaccountsInsert +subaccountsInsert pSubProfileId_ = + SubaccountsInsert + { _subQuotaUser = Nothing + , _subPrettyPrint = True + , _subUserIp = Nothing + , _subProfileId = pSubProfileId_ + , _subKey = Nothing + , _subOauthToken = Nothing + , _subFields = Nothing + , _subAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +subQuotaUser :: Lens' SubaccountsInsert' (Maybe Text) +subQuotaUser + = lens _subQuotaUser (\ s a -> s{_subQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +subPrettyPrint :: Lens' SubaccountsInsert' Bool +subPrettyPrint + = lens _subPrettyPrint + (\ s a -> s{_subPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +subUserIp :: Lens' SubaccountsInsert' (Maybe Text) +subUserIp + = lens _subUserIp (\ s a -> s{_subUserIp = a}) + +-- | User profile ID associated with this request. +subProfileId :: Lens' SubaccountsInsert' Int64 +subProfileId + = lens _subProfileId (\ s a -> s{_subProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +subKey :: Lens' SubaccountsInsert' (Maybe Text) +subKey = lens _subKey (\ s a -> s{_subKey = a}) + +-- | OAuth 2.0 token for the current user. +subOauthToken :: Lens' SubaccountsInsert' (Maybe Text) +subOauthToken + = lens _subOauthToken + (\ s a -> s{_subOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +subFields :: Lens' SubaccountsInsert' (Maybe Text) +subFields + = lens _subFields (\ s a -> s{_subFields = a}) + +-- | Data format for the response. +subAlt :: Lens' SubaccountsInsert' Text +subAlt = lens _subAlt (\ s a -> s{_subAlt = a}) + +instance GoogleRequest SubaccountsInsert' where + type Rs SubaccountsInsert' = Subaccount + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SubaccountsInsert{..} + = go _subQuotaUser _subPrettyPrint _subUserIp + _subProfileId + _subKey + _subOauthToken + _subFields + _subAlt + where go + = clientWithRoute + (Proxy :: Proxy SubaccountsInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/List.hs new file mode 100644 index 000000000..1c17692ff --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/List.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Subaccounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of subaccounts, possibly filtered. +-- +-- /See:/ for @DfareportingSubaccountsList@. +module DFAReporting.Subaccounts.List + ( + -- * REST Resource + SubaccountsListAPI + + -- * Creating a Request + , subaccountsList + , SubaccountsList + + -- * Request Lenses + , ssQuotaUser + , ssPrettyPrint + , ssUserIp + , ssSearchString + , ssIds + , ssProfileId + , ssSortOrder + , ssKey + , ssPageToken + , ssSortField + , ssOauthToken + , ssMaxResults + , ssFields + , ssAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSubaccountsList@ which the +-- 'SubaccountsList' request conforms to. +type SubaccountsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "subaccounts" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SubaccountsListResponse + +-- | Gets a list of subaccounts, possibly filtered. +-- +-- /See:/ 'subaccountsList' smart constructor. +data SubaccountsList = SubaccountsList + { _ssQuotaUser :: !(Maybe Text) + , _ssPrettyPrint :: !Bool + , _ssUserIp :: !(Maybe Text) + , _ssSearchString :: !(Maybe Text) + , _ssIds :: !(Maybe Int64) + , _ssProfileId :: !Int64 + , _ssSortOrder :: !(Maybe Text) + , _ssKey :: !(Maybe Text) + , _ssPageToken :: !(Maybe Text) + , _ssSortField :: !(Maybe Text) + , _ssOauthToken :: !(Maybe Text) + , _ssMaxResults :: !(Maybe Int32) + , _ssFields :: !(Maybe Text) + , _ssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssQuotaUser' +-- +-- * 'ssPrettyPrint' +-- +-- * 'ssUserIp' +-- +-- * 'ssSearchString' +-- +-- * 'ssIds' +-- +-- * 'ssProfileId' +-- +-- * 'ssSortOrder' +-- +-- * 'ssKey' +-- +-- * 'ssPageToken' +-- +-- * 'ssSortField' +-- +-- * 'ssOauthToken' +-- +-- * 'ssMaxResults' +-- +-- * 'ssFields' +-- +-- * 'ssAlt' +subaccountsList + :: Int64 -- ^ 'profileId' + -> SubaccountsList +subaccountsList pSsProfileId_ = + SubaccountsList + { _ssQuotaUser = Nothing + , _ssPrettyPrint = True + , _ssUserIp = Nothing + , _ssSearchString = Nothing + , _ssIds = Nothing + , _ssProfileId = pSsProfileId_ + , _ssSortOrder = Nothing + , _ssKey = Nothing + , _ssPageToken = Nothing + , _ssSortField = Nothing + , _ssOauthToken = Nothing + , _ssMaxResults = Nothing + , _ssFields = Nothing + , _ssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ssQuotaUser :: Lens' SubaccountsList' (Maybe Text) +ssQuotaUser + = lens _ssQuotaUser (\ s a -> s{_ssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ssPrettyPrint :: Lens' SubaccountsList' Bool +ssPrettyPrint + = lens _ssPrettyPrint + (\ s a -> s{_ssPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ssUserIp :: Lens' SubaccountsList' (Maybe Text) +ssUserIp = lens _ssUserIp (\ s a -> s{_ssUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"subaccount*2015\" will return objects with names like +-- \"subaccount June 2015\", \"subaccount April 2015\", or simply +-- \"subaccount 2015\". Most of the searches also add wildcards implicitly +-- at the start and the end of the search string. For example, a search +-- string of \"subaccount\" will match objects with name \"my subaccount\", +-- \"subaccount 2015\", or simply \"subaccount\". +ssSearchString :: Lens' SubaccountsList' (Maybe Text) +ssSearchString + = lens _ssSearchString + (\ s a -> s{_ssSearchString = a}) + +-- | Select only subaccounts with these IDs. +ssIds :: Lens' SubaccountsList' (Maybe Int64) +ssIds = lens _ssIds (\ s a -> s{_ssIds = a}) + +-- | User profile ID associated with this request. +ssProfileId :: Lens' SubaccountsList' Int64 +ssProfileId + = lens _ssProfileId (\ s a -> s{_ssProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +ssSortOrder :: Lens' SubaccountsList' (Maybe Text) +ssSortOrder + = lens _ssSortOrder (\ s a -> s{_ssSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ssKey :: Lens' SubaccountsList' (Maybe Text) +ssKey = lens _ssKey (\ s a -> s{_ssKey = a}) + +-- | Value of the nextPageToken from the previous result page. +ssPageToken :: Lens' SubaccountsList' (Maybe Text) +ssPageToken + = lens _ssPageToken (\ s a -> s{_ssPageToken = a}) + +-- | Field by which to sort the list. +ssSortField :: Lens' SubaccountsList' (Maybe Text) +ssSortField + = lens _ssSortField (\ s a -> s{_ssSortField = a}) + +-- | OAuth 2.0 token for the current user. +ssOauthToken :: Lens' SubaccountsList' (Maybe Text) +ssOauthToken + = lens _ssOauthToken (\ s a -> s{_ssOauthToken = a}) + +-- | Maximum number of results to return. +ssMaxResults :: Lens' SubaccountsList' (Maybe Int32) +ssMaxResults + = lens _ssMaxResults (\ s a -> s{_ssMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ssFields :: Lens' SubaccountsList' (Maybe Text) +ssFields = lens _ssFields (\ s a -> s{_ssFields = a}) + +-- | Data format for the response. +ssAlt :: Lens' SubaccountsList' Text +ssAlt = lens _ssAlt (\ s a -> s{_ssAlt = a}) + +instance GoogleRequest SubaccountsList' where + type Rs SubaccountsList' = SubaccountsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SubaccountsList{..} + = go _ssQuotaUser _ssPrettyPrint _ssUserIp + _ssSearchString + _ssIds + _ssProfileId + _ssSortOrder + _ssKey + _ssPageToken + _ssSortField + _ssOauthToken + _ssMaxResults + _ssFields + _ssAlt + where go + = clientWithRoute (Proxy :: Proxy SubaccountsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Patch.hs new file mode 100644 index 000000000..8048a8711 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Patch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Subaccounts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing subaccount. This method supports patch semantics. +-- +-- /See:/ for @DfareportingSubaccountsPatch@. +module DFAReporting.Subaccounts.Patch + ( + -- * REST Resource + SubaccountsPatchAPI + + -- * Creating a Request + , subaccountsPatch + , SubaccountsPatch + + -- * Request Lenses + , sppQuotaUser + , sppPrettyPrint + , sppUserIp + , sppProfileId + , sppKey + , sppId + , sppOauthToken + , sppFields + , sppAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSubaccountsPatch@ which the +-- 'SubaccountsPatch' request conforms to. +type SubaccountsPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "subaccounts" :> + QueryParam "id" Int64 :> Patch '[JSON] Subaccount + +-- | Updates an existing subaccount. This method supports patch semantics. +-- +-- /See:/ 'subaccountsPatch' smart constructor. +data SubaccountsPatch = SubaccountsPatch + { _sppQuotaUser :: !(Maybe Text) + , _sppPrettyPrint :: !Bool + , _sppUserIp :: !(Maybe Text) + , _sppProfileId :: !Int64 + , _sppKey :: !(Maybe Text) + , _sppId :: !Int64 + , _sppOauthToken :: !(Maybe Text) + , _sppFields :: !(Maybe Text) + , _sppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sppQuotaUser' +-- +-- * 'sppPrettyPrint' +-- +-- * 'sppUserIp' +-- +-- * 'sppProfileId' +-- +-- * 'sppKey' +-- +-- * 'sppId' +-- +-- * 'sppOauthToken' +-- +-- * 'sppFields' +-- +-- * 'sppAlt' +subaccountsPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> SubaccountsPatch +subaccountsPatch pSppProfileId_ pSppId_ = + SubaccountsPatch + { _sppQuotaUser = Nothing + , _sppPrettyPrint = True + , _sppUserIp = Nothing + , _sppProfileId = pSppProfileId_ + , _sppKey = Nothing + , _sppId = pSppId_ + , _sppOauthToken = Nothing + , _sppFields = Nothing + , _sppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sppQuotaUser :: Lens' SubaccountsPatch' (Maybe Text) +sppQuotaUser + = lens _sppQuotaUser (\ s a -> s{_sppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sppPrettyPrint :: Lens' SubaccountsPatch' Bool +sppPrettyPrint + = lens _sppPrettyPrint + (\ s a -> s{_sppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sppUserIp :: Lens' SubaccountsPatch' (Maybe Text) +sppUserIp + = lens _sppUserIp (\ s a -> s{_sppUserIp = a}) + +-- | User profile ID associated with this request. +sppProfileId :: Lens' SubaccountsPatch' Int64 +sppProfileId + = lens _sppProfileId (\ s a -> s{_sppProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sppKey :: Lens' SubaccountsPatch' (Maybe Text) +sppKey = lens _sppKey (\ s a -> s{_sppKey = a}) + +-- | Subaccount ID. +sppId :: Lens' SubaccountsPatch' Int64 +sppId = lens _sppId (\ s a -> s{_sppId = a}) + +-- | OAuth 2.0 token for the current user. +sppOauthToken :: Lens' SubaccountsPatch' (Maybe Text) +sppOauthToken + = lens _sppOauthToken + (\ s a -> s{_sppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sppFields :: Lens' SubaccountsPatch' (Maybe Text) +sppFields + = lens _sppFields (\ s a -> s{_sppFields = a}) + +-- | Data format for the response. +sppAlt :: Lens' SubaccountsPatch' Text +sppAlt = lens _sppAlt (\ s a -> s{_sppAlt = a}) + +instance GoogleRequest SubaccountsPatch' where + type Rs SubaccountsPatch' = Subaccount + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SubaccountsPatch{..} + = go _sppQuotaUser _sppPrettyPrint _sppUserIp + _sppProfileId + _sppKey + (Just _sppId) + _sppOauthToken + _sppFields + _sppAlt + where go + = clientWithRoute + (Proxy :: Proxy SubaccountsPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Update.hs new file mode 100644 index 000000000..c99f1a5f5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Subaccounts/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.Subaccounts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing subaccount. +-- +-- /See:/ for @DfareportingSubaccountsUpdate@. +module DFAReporting.Subaccounts.Update + ( + -- * REST Resource + SubaccountsUpdateAPI + + -- * Creating a Request + , subaccountsUpdate + , SubaccountsUpdate + + -- * Request Lenses + , suuQuotaUser + , suuPrettyPrint + , suuUserIp + , suuProfileId + , suuKey + , suuOauthToken + , suuFields + , suuAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingSubaccountsUpdate@ which the +-- 'SubaccountsUpdate' request conforms to. +type SubaccountsUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "subaccounts" :> Put '[JSON] Subaccount + +-- | Updates an existing subaccount. +-- +-- /See:/ 'subaccountsUpdate' smart constructor. +data SubaccountsUpdate = SubaccountsUpdate + { _suuQuotaUser :: !(Maybe Text) + , _suuPrettyPrint :: !Bool + , _suuUserIp :: !(Maybe Text) + , _suuProfileId :: !Int64 + , _suuKey :: !(Maybe Text) + , _suuOauthToken :: !(Maybe Text) + , _suuFields :: !(Maybe Text) + , _suuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubaccountsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suuQuotaUser' +-- +-- * 'suuPrettyPrint' +-- +-- * 'suuUserIp' +-- +-- * 'suuProfileId' +-- +-- * 'suuKey' +-- +-- * 'suuOauthToken' +-- +-- * 'suuFields' +-- +-- * 'suuAlt' +subaccountsUpdate + :: Int64 -- ^ 'profileId' + -> SubaccountsUpdate +subaccountsUpdate pSuuProfileId_ = + SubaccountsUpdate + { _suuQuotaUser = Nothing + , _suuPrettyPrint = True + , _suuUserIp = Nothing + , _suuProfileId = pSuuProfileId_ + , _suuKey = Nothing + , _suuOauthToken = Nothing + , _suuFields = Nothing + , _suuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suuQuotaUser :: Lens' SubaccountsUpdate' (Maybe Text) +suuQuotaUser + = lens _suuQuotaUser (\ s a -> s{_suuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suuPrettyPrint :: Lens' SubaccountsUpdate' Bool +suuPrettyPrint + = lens _suuPrettyPrint + (\ s a -> s{_suuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suuUserIp :: Lens' SubaccountsUpdate' (Maybe Text) +suuUserIp + = lens _suuUserIp (\ s a -> s{_suuUserIp = a}) + +-- | User profile ID associated with this request. +suuProfileId :: Lens' SubaccountsUpdate' Int64 +suuProfileId + = lens _suuProfileId (\ s a -> s{_suuProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suuKey :: Lens' SubaccountsUpdate' (Maybe Text) +suuKey = lens _suuKey (\ s a -> s{_suuKey = a}) + +-- | OAuth 2.0 token for the current user. +suuOauthToken :: Lens' SubaccountsUpdate' (Maybe Text) +suuOauthToken + = lens _suuOauthToken + (\ s a -> s{_suuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +suuFields :: Lens' SubaccountsUpdate' (Maybe Text) +suuFields + = lens _suuFields (\ s a -> s{_suuFields = a}) + +-- | Data format for the response. +suuAlt :: Lens' SubaccountsUpdate' Text +suuAlt = lens _suuAlt (\ s a -> s{_suuAlt = a}) + +instance GoogleRequest SubaccountsUpdate' where + type Rs SubaccountsUpdate' = Subaccount + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u SubaccountsUpdate{..} + = go _suuQuotaUser _suuPrettyPrint _suuUserIp + _suuProfileId + _suuKey + _suuOauthToken + _suuFields + _suuAlt + where go + = clientWithRoute + (Proxy :: Proxy SubaccountsUpdateAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/Get.hs new file mode 100644 index 000000000..d645c9394 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/Get.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.TargetableRemarketingLists.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one remarketing list by ID. +-- +-- /See:/ for @DfareportingTargetableRemarketingListsGet@. +module DFAReporting.TargetableRemarketingLists.Get + ( + -- * REST Resource + TargetableRemarketingListsGetAPI + + -- * Creating a Request + , targetableRemarketingListsGet + , TargetableRemarketingListsGet + + -- * Request Lenses + , trlgQuotaUser + , trlgPrettyPrint + , trlgUserIp + , trlgProfileId + , trlgKey + , trlgId + , trlgOauthToken + , trlgFields + , trlgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingTargetableRemarketingListsGet@ which the +-- 'TargetableRemarketingListsGet' request conforms to. +type TargetableRemarketingListsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "targetableRemarketingLists" :> + Capture "id" Int64 :> + Get '[JSON] TargetableRemarketingList + +-- | Gets one remarketing list by ID. +-- +-- /See:/ 'targetableRemarketingListsGet' smart constructor. +data TargetableRemarketingListsGet = TargetableRemarketingListsGet + { _trlgQuotaUser :: !(Maybe Text) + , _trlgPrettyPrint :: !Bool + , _trlgUserIp :: !(Maybe Text) + , _trlgProfileId :: !Int64 + , _trlgKey :: !(Maybe Text) + , _trlgId :: !Int64 + , _trlgOauthToken :: !(Maybe Text) + , _trlgFields :: !(Maybe Text) + , _trlgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetableRemarketingListsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trlgQuotaUser' +-- +-- * 'trlgPrettyPrint' +-- +-- * 'trlgUserIp' +-- +-- * 'trlgProfileId' +-- +-- * 'trlgKey' +-- +-- * 'trlgId' +-- +-- * 'trlgOauthToken' +-- +-- * 'trlgFields' +-- +-- * 'trlgAlt' +targetableRemarketingListsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> TargetableRemarketingListsGet +targetableRemarketingListsGet pTrlgProfileId_ pTrlgId_ = + TargetableRemarketingListsGet + { _trlgQuotaUser = Nothing + , _trlgPrettyPrint = True + , _trlgUserIp = Nothing + , _trlgProfileId = pTrlgProfileId_ + , _trlgKey = Nothing + , _trlgId = pTrlgId_ + , _trlgOauthToken = Nothing + , _trlgFields = Nothing + , _trlgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +trlgQuotaUser :: Lens' TargetableRemarketingListsGet' (Maybe Text) +trlgQuotaUser + = lens _trlgQuotaUser + (\ s a -> s{_trlgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +trlgPrettyPrint :: Lens' TargetableRemarketingListsGet' Bool +trlgPrettyPrint + = lens _trlgPrettyPrint + (\ s a -> s{_trlgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +trlgUserIp :: Lens' TargetableRemarketingListsGet' (Maybe Text) +trlgUserIp + = lens _trlgUserIp (\ s a -> s{_trlgUserIp = a}) + +-- | User profile ID associated with this request. +trlgProfileId :: Lens' TargetableRemarketingListsGet' Int64 +trlgProfileId + = lens _trlgProfileId + (\ s a -> s{_trlgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +trlgKey :: Lens' TargetableRemarketingListsGet' (Maybe Text) +trlgKey = lens _trlgKey (\ s a -> s{_trlgKey = a}) + +-- | Remarketing list ID. +trlgId :: Lens' TargetableRemarketingListsGet' Int64 +trlgId = lens _trlgId (\ s a -> s{_trlgId = a}) + +-- | OAuth 2.0 token for the current user. +trlgOauthToken :: Lens' TargetableRemarketingListsGet' (Maybe Text) +trlgOauthToken + = lens _trlgOauthToken + (\ s a -> s{_trlgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +trlgFields :: Lens' TargetableRemarketingListsGet' (Maybe Text) +trlgFields + = lens _trlgFields (\ s a -> s{_trlgFields = a}) + +-- | Data format for the response. +trlgAlt :: Lens' TargetableRemarketingListsGet' Text +trlgAlt = lens _trlgAlt (\ s a -> s{_trlgAlt = a}) + +instance GoogleRequest TargetableRemarketingListsGet' + where + type Rs TargetableRemarketingListsGet' = + TargetableRemarketingList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + TargetableRemarketingListsGet{..} + = go _trlgQuotaUser _trlgPrettyPrint _trlgUserIp + _trlgProfileId + _trlgKey + _trlgId + _trlgOauthToken + _trlgFields + _trlgAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetableRemarketingListsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/List.hs new file mode 100644 index 000000000..48ab37d76 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/TargetableRemarketingLists/List.hs @@ -0,0 +1,262 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.TargetableRemarketingLists.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of targetable remarketing lists, possibly filtered. +-- +-- /See:/ for @DfareportingTargetableRemarketingListsList@. +module DFAReporting.TargetableRemarketingLists.List + ( + -- * REST Resource + TargetableRemarketingListsListAPI + + -- * Creating a Request + , targetableRemarketingListsList + , TargetableRemarketingListsList + + -- * Request Lenses + , trllQuotaUser + , trllPrettyPrint + , trllUserIp + , trllAdvertiserId + , trllProfileId + , trllSortOrder + , trllActive + , trllKey + , trllName + , trllPageToken + , trllSortField + , trllOauthToken + , trllMaxResults + , trllFields + , trllAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingTargetableRemarketingListsList@ which the +-- 'TargetableRemarketingListsList' request conforms to. +type TargetableRemarketingListsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "targetableRemarketingLists" :> + QueryParam "advertiserId" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "active" Bool :> + QueryParam "name" Text :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] TargetableRemarketingListsListResponse + +-- | Retrieves a list of targetable remarketing lists, possibly filtered. +-- +-- /See:/ 'targetableRemarketingListsList' smart constructor. +data TargetableRemarketingListsList = TargetableRemarketingListsList + { _trllQuotaUser :: !(Maybe Text) + , _trllPrettyPrint :: !Bool + , _trllUserIp :: !(Maybe Text) + , _trllAdvertiserId :: !Int64 + , _trllProfileId :: !Int64 + , _trllSortOrder :: !(Maybe Text) + , _trllActive :: !(Maybe Bool) + , _trllKey :: !(Maybe Text) + , _trllName :: !(Maybe Text) + , _trllPageToken :: !(Maybe Text) + , _trllSortField :: !(Maybe Text) + , _trllOauthToken :: !(Maybe Text) + , _trllMaxResults :: !(Maybe Int32) + , _trllFields :: !(Maybe Text) + , _trllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TargetableRemarketingListsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trllQuotaUser' +-- +-- * 'trllPrettyPrint' +-- +-- * 'trllUserIp' +-- +-- * 'trllAdvertiserId' +-- +-- * 'trllProfileId' +-- +-- * 'trllSortOrder' +-- +-- * 'trllActive' +-- +-- * 'trllKey' +-- +-- * 'trllName' +-- +-- * 'trllPageToken' +-- +-- * 'trllSortField' +-- +-- * 'trllOauthToken' +-- +-- * 'trllMaxResults' +-- +-- * 'trllFields' +-- +-- * 'trllAlt' +targetableRemarketingListsList + :: Int64 -- ^ 'advertiserId' + -> Int64 -- ^ 'profileId' + -> TargetableRemarketingListsList +targetableRemarketingListsList pTrllAdvertiserId_ pTrllProfileId_ = + TargetableRemarketingListsList + { _trllQuotaUser = Nothing + , _trllPrettyPrint = True + , _trllUserIp = Nothing + , _trllAdvertiserId = pTrllAdvertiserId_ + , _trllProfileId = pTrllProfileId_ + , _trllSortOrder = Nothing + , _trllActive = Nothing + , _trllKey = Nothing + , _trllName = Nothing + , _trllPageToken = Nothing + , _trllSortField = Nothing + , _trllOauthToken = Nothing + , _trllMaxResults = Nothing + , _trllFields = Nothing + , _trllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +trllQuotaUser :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllQuotaUser + = lens _trllQuotaUser + (\ s a -> s{_trllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +trllPrettyPrint :: Lens' TargetableRemarketingListsList' Bool +trllPrettyPrint + = lens _trllPrettyPrint + (\ s a -> s{_trllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +trllUserIp :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllUserIp + = lens _trllUserIp (\ s a -> s{_trllUserIp = a}) + +-- | Select only targetable remarketing lists targetable by these +-- advertisers. +trllAdvertiserId :: Lens' TargetableRemarketingListsList' Int64 +trllAdvertiserId + = lens _trllAdvertiserId + (\ s a -> s{_trllAdvertiserId = a}) + +-- | User profile ID associated with this request. +trllProfileId :: Lens' TargetableRemarketingListsList' Int64 +trllProfileId + = lens _trllProfileId + (\ s a -> s{_trllProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +trllSortOrder :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllSortOrder + = lens _trllSortOrder + (\ s a -> s{_trllSortOrder = a}) + +-- | Select only active or only inactive targetable remarketing lists. +trllActive :: Lens' TargetableRemarketingListsList' (Maybe Bool) +trllActive + = lens _trllActive (\ s a -> s{_trllActive = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +trllKey :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllKey = lens _trllKey (\ s a -> s{_trllKey = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"remarketing list*2015\" will return objects with names +-- like \"remarketing list June 2015\", \"remarketing list April 2015\", or +-- simply \"remarketing list 2015\". Most of the searches also add +-- wildcards implicitly at the start and the end of the search string. For +-- example, a search string of \"remarketing list\" will match objects with +-- name \"my remarketing list\", \"remarketing list 2015\", or simply +-- \"remarketing list\". +trllName :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllName = lens _trllName (\ s a -> s{_trllName = a}) + +-- | Value of the nextPageToken from the previous result page. +trllPageToken :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllPageToken + = lens _trllPageToken + (\ s a -> s{_trllPageToken = a}) + +-- | Field by which to sort the list. +trllSortField :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllSortField + = lens _trllSortField + (\ s a -> s{_trllSortField = a}) + +-- | OAuth 2.0 token for the current user. +trllOauthToken :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllOauthToken + = lens _trllOauthToken + (\ s a -> s{_trllOauthToken = a}) + +-- | Maximum number of results to return. +trllMaxResults :: Lens' TargetableRemarketingListsList' (Maybe Int32) +trllMaxResults + = lens _trllMaxResults + (\ s a -> s{_trllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +trllFields :: Lens' TargetableRemarketingListsList' (Maybe Text) +trllFields + = lens _trllFields (\ s a -> s{_trllFields = a}) + +-- | Data format for the response. +trllAlt :: Lens' TargetableRemarketingListsList' Text +trllAlt = lens _trllAlt (\ s a -> s{_trllAlt = a}) + +instance GoogleRequest + TargetableRemarketingListsList' where + type Rs TargetableRemarketingListsList' = + TargetableRemarketingListsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u + TargetableRemarketingListsList{..} + = go _trllQuotaUser _trllPrettyPrint _trllUserIp + (Just _trllAdvertiserId) + _trllProfileId + _trllSortOrder + _trllActive + _trllKey + _trllName + _trllPageToken + _trllSortField + _trllOauthToken + _trllMaxResults + _trllFields + _trllAlt + where go + = clientWithRoute + (Proxy :: Proxy TargetableRemarketingListsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/Get.hs new file mode 100644 index 000000000..eaff03948 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserProfiles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one user profile by ID. +-- +-- /See:/ for @DfareportingUserProfilesGet@. +module DFAReporting.UserProfiles.Get + ( + -- * REST Resource + UserProfilesGetAPI + + -- * Creating a Request + , userProfilesGet + , UserProfilesGet + + -- * Request Lenses + , upgQuotaUser + , upgPrettyPrint + , upgUserIp + , upgProfileId + , upgKey + , upgOauthToken + , upgFields + , upgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserProfilesGet@ which the +-- 'UserProfilesGet' request conforms to. +type UserProfilesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> Get '[JSON] UserProfile + +-- | Gets one user profile by ID. +-- +-- /See:/ 'userProfilesGet' smart constructor. +data UserProfilesGet = UserProfilesGet + { _upgQuotaUser :: !(Maybe Text) + , _upgPrettyPrint :: !Bool + , _upgUserIp :: !(Maybe Text) + , _upgProfileId :: !Int64 + , _upgKey :: !(Maybe Text) + , _upgOauthToken :: !(Maybe Text) + , _upgFields :: !(Maybe Text) + , _upgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'upgQuotaUser' +-- +-- * 'upgPrettyPrint' +-- +-- * 'upgUserIp' +-- +-- * 'upgProfileId' +-- +-- * 'upgKey' +-- +-- * 'upgOauthToken' +-- +-- * 'upgFields' +-- +-- * 'upgAlt' +userProfilesGet + :: Int64 -- ^ 'profileId' + -> UserProfilesGet +userProfilesGet pUpgProfileId_ = + UserProfilesGet + { _upgQuotaUser = Nothing + , _upgPrettyPrint = True + , _upgUserIp = Nothing + , _upgProfileId = pUpgProfileId_ + , _upgKey = Nothing + , _upgOauthToken = Nothing + , _upgFields = Nothing + , _upgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +upgQuotaUser :: Lens' UserProfilesGet' (Maybe Text) +upgQuotaUser + = lens _upgQuotaUser (\ s a -> s{_upgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +upgPrettyPrint :: Lens' UserProfilesGet' Bool +upgPrettyPrint + = lens _upgPrettyPrint + (\ s a -> s{_upgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +upgUserIp :: Lens' UserProfilesGet' (Maybe Text) +upgUserIp + = lens _upgUserIp (\ s a -> s{_upgUserIp = a}) + +-- | The user profile ID. +upgProfileId :: Lens' UserProfilesGet' Int64 +upgProfileId + = lens _upgProfileId (\ s a -> s{_upgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +upgKey :: Lens' UserProfilesGet' (Maybe Text) +upgKey = lens _upgKey (\ s a -> s{_upgKey = a}) + +-- | OAuth 2.0 token for the current user. +upgOauthToken :: Lens' UserProfilesGet' (Maybe Text) +upgOauthToken + = lens _upgOauthToken + (\ s a -> s{_upgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +upgFields :: Lens' UserProfilesGet' (Maybe Text) +upgFields + = lens _upgFields (\ s a -> s{_upgFields = a}) + +-- | Data format for the response. +upgAlt :: Lens' UserProfilesGet' Text +upgAlt = lens _upgAlt (\ s a -> s{_upgAlt = a}) + +instance GoogleRequest UserProfilesGet' where + type Rs UserProfilesGet' = UserProfile + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserProfilesGet{..} + = go _upgQuotaUser _upgPrettyPrint _upgUserIp + _upgProfileId + _upgKey + _upgOauthToken + _upgFields + _upgAlt + where go + = clientWithRoute (Proxy :: Proxy UserProfilesGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/List.hs new file mode 100644 index 000000000..2ff18a9f5 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProfiles/List.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserProfiles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves list of user profiles for a user. +-- +-- /See:/ for @DfareportingUserProfilesList@. +module DFAReporting.UserProfiles.List + ( + -- * REST Resource + UserProfilesListAPI + + -- * Creating a Request + , userProfilesList + , UserProfilesList + + -- * Request Lenses + , uplQuotaUser + , uplPrettyPrint + , uplUserIp + , uplKey + , uplOauthToken + , uplFields + , uplAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserProfilesList@ which the +-- 'UserProfilesList' request conforms to. +type UserProfilesListAPI = + "userprofiles" :> Get '[JSON] UserProfileList + +-- | Retrieves list of user profiles for a user. +-- +-- /See:/ 'userProfilesList' smart constructor. +data UserProfilesList = UserProfilesList + { _uplQuotaUser :: !(Maybe Text) + , _uplPrettyPrint :: !Bool + , _uplUserIp :: !(Maybe Text) + , _uplKey :: !(Maybe Text) + , _uplOauthToken :: !(Maybe Text) + , _uplFields :: !(Maybe Text) + , _uplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserProfilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uplQuotaUser' +-- +-- * 'uplPrettyPrint' +-- +-- * 'uplUserIp' +-- +-- * 'uplKey' +-- +-- * 'uplOauthToken' +-- +-- * 'uplFields' +-- +-- * 'uplAlt' +userProfilesList + :: UserProfilesList +userProfilesList = + UserProfilesList + { _uplQuotaUser = Nothing + , _uplPrettyPrint = True + , _uplUserIp = Nothing + , _uplKey = Nothing + , _uplOauthToken = Nothing + , _uplFields = Nothing + , _uplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uplQuotaUser :: Lens' UserProfilesList' (Maybe Text) +uplQuotaUser + = lens _uplQuotaUser (\ s a -> s{_uplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uplPrettyPrint :: Lens' UserProfilesList' Bool +uplPrettyPrint + = lens _uplPrettyPrint + (\ s a -> s{_uplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uplUserIp :: Lens' UserProfilesList' (Maybe Text) +uplUserIp + = lens _uplUserIp (\ s a -> s{_uplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uplKey :: Lens' UserProfilesList' (Maybe Text) +uplKey = lens _uplKey (\ s a -> s{_uplKey = a}) + +-- | OAuth 2.0 token for the current user. +uplOauthToken :: Lens' UserProfilesList' (Maybe Text) +uplOauthToken + = lens _uplOauthToken + (\ s a -> s{_uplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uplFields :: Lens' UserProfilesList' (Maybe Text) +uplFields + = lens _uplFields (\ s a -> s{_uplFields = a}) + +-- | Data format for the response. +uplAlt :: Lens' UserProfilesList' Text +uplAlt = lens _uplAlt (\ s a -> s{_uplAlt = a}) + +instance GoogleRequest UserProfilesList' where + type Rs UserProfilesList' = UserProfileList + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserProfilesList{..} + = go _uplQuotaUser _uplPrettyPrint _uplUserIp _uplKey + _uplOauthToken + _uplFields + _uplAlt + where go + = clientWithRoute + (Proxy :: Proxy UserProfilesListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/Get.hs new file mode 100644 index 000000000..98d73e1d7 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/Get.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRolePermissionGroups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one user role permission group by ID. +-- +-- /See:/ for @DfareportingUserRolePermissionGroupsGet@. +module DFAReporting.UserRolePermissionGroups.Get + ( + -- * REST Resource + UserRolePermissionGroupsGetAPI + + -- * Creating a Request + , userRolePermissionGroupsGet + , UserRolePermissionGroupsGet + + -- * Request Lenses + , urpggQuotaUser + , urpggPrettyPrint + , urpggUserIp + , urpggProfileId + , urpggKey + , urpggId + , urpggOauthToken + , urpggFields + , urpggAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolePermissionGroupsGet@ which the +-- 'UserRolePermissionGroupsGet' request conforms to. +type UserRolePermissionGroupsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRolePermissionGroups" :> + Capture "id" Int64 :> + Get '[JSON] UserRolePermissionGroup + +-- | Gets one user role permission group by ID. +-- +-- /See:/ 'userRolePermissionGroupsGet' smart constructor. +data UserRolePermissionGroupsGet = UserRolePermissionGroupsGet + { _urpggQuotaUser :: !(Maybe Text) + , _urpggPrettyPrint :: !Bool + , _urpggUserIp :: !(Maybe Text) + , _urpggProfileId :: !Int64 + , _urpggKey :: !(Maybe Text) + , _urpggId :: !Int64 + , _urpggOauthToken :: !(Maybe Text) + , _urpggFields :: !(Maybe Text) + , _urpggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionGroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpggQuotaUser' +-- +-- * 'urpggPrettyPrint' +-- +-- * 'urpggUserIp' +-- +-- * 'urpggProfileId' +-- +-- * 'urpggKey' +-- +-- * 'urpggId' +-- +-- * 'urpggOauthToken' +-- +-- * 'urpggFields' +-- +-- * 'urpggAlt' +userRolePermissionGroupsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> UserRolePermissionGroupsGet +userRolePermissionGroupsGet pUrpggProfileId_ pUrpggId_ = + UserRolePermissionGroupsGet + { _urpggQuotaUser = Nothing + , _urpggPrettyPrint = True + , _urpggUserIp = Nothing + , _urpggProfileId = pUrpggProfileId_ + , _urpggKey = Nothing + , _urpggId = pUrpggId_ + , _urpggOauthToken = Nothing + , _urpggFields = Nothing + , _urpggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urpggQuotaUser :: Lens' UserRolePermissionGroupsGet' (Maybe Text) +urpggQuotaUser + = lens _urpggQuotaUser + (\ s a -> s{_urpggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urpggPrettyPrint :: Lens' UserRolePermissionGroupsGet' Bool +urpggPrettyPrint + = lens _urpggPrettyPrint + (\ s a -> s{_urpggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urpggUserIp :: Lens' UserRolePermissionGroupsGet' (Maybe Text) +urpggUserIp + = lens _urpggUserIp (\ s a -> s{_urpggUserIp = a}) + +-- | User profile ID associated with this request. +urpggProfileId :: Lens' UserRolePermissionGroupsGet' Int64 +urpggProfileId + = lens _urpggProfileId + (\ s a -> s{_urpggProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urpggKey :: Lens' UserRolePermissionGroupsGet' (Maybe Text) +urpggKey = lens _urpggKey (\ s a -> s{_urpggKey = a}) + +-- | User role permission group ID. +urpggId :: Lens' UserRolePermissionGroupsGet' Int64 +urpggId = lens _urpggId (\ s a -> s{_urpggId = a}) + +-- | OAuth 2.0 token for the current user. +urpggOauthToken :: Lens' UserRolePermissionGroupsGet' (Maybe Text) +urpggOauthToken + = lens _urpggOauthToken + (\ s a -> s{_urpggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urpggFields :: Lens' UserRolePermissionGroupsGet' (Maybe Text) +urpggFields + = lens _urpggFields (\ s a -> s{_urpggFields = a}) + +-- | Data format for the response. +urpggAlt :: Lens' UserRolePermissionGroupsGet' Text +urpggAlt = lens _urpggAlt (\ s a -> s{_urpggAlt = a}) + +instance GoogleRequest UserRolePermissionGroupsGet' + where + type Rs UserRolePermissionGroupsGet' = + UserRolePermissionGroup + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolePermissionGroupsGet{..} + = go _urpggQuotaUser _urpggPrettyPrint _urpggUserIp + _urpggProfileId + _urpggKey + _urpggId + _urpggOauthToken + _urpggFields + _urpggAlt + where go + = clientWithRoute + (Proxy :: Proxy UserRolePermissionGroupsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/List.hs new file mode 100644 index 000000000..e2ab1e3eb --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissionGroups/List.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRolePermissionGroups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of all supported user role permission groups. +-- +-- /See:/ for @DfareportingUserRolePermissionGroupsList@. +module DFAReporting.UserRolePermissionGroups.List + ( + -- * REST Resource + UserRolePermissionGroupsListAPI + + -- * Creating a Request + , userRolePermissionGroupsList + , UserRolePermissionGroupsList + + -- * Request Lenses + , urpglQuotaUser + , urpglPrettyPrint + , urpglUserIp + , urpglProfileId + , urpglKey + , urpglOauthToken + , urpglFields + , urpglAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolePermissionGroupsList@ which the +-- 'UserRolePermissionGroupsList' request conforms to. +type UserRolePermissionGroupsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRolePermissionGroups" :> + Get '[JSON] UserRolePermissionGroupsListResponse + +-- | Gets a list of all supported user role permission groups. +-- +-- /See:/ 'userRolePermissionGroupsList' smart constructor. +data UserRolePermissionGroupsList = UserRolePermissionGroupsList + { _urpglQuotaUser :: !(Maybe Text) + , _urpglPrettyPrint :: !Bool + , _urpglUserIp :: !(Maybe Text) + , _urpglProfileId :: !Int64 + , _urpglKey :: !(Maybe Text) + , _urpglOauthToken :: !(Maybe Text) + , _urpglFields :: !(Maybe Text) + , _urpglAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionGroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urpglQuotaUser' +-- +-- * 'urpglPrettyPrint' +-- +-- * 'urpglUserIp' +-- +-- * 'urpglProfileId' +-- +-- * 'urpglKey' +-- +-- * 'urpglOauthToken' +-- +-- * 'urpglFields' +-- +-- * 'urpglAlt' +userRolePermissionGroupsList + :: Int64 -- ^ 'profileId' + -> UserRolePermissionGroupsList +userRolePermissionGroupsList pUrpglProfileId_ = + UserRolePermissionGroupsList + { _urpglQuotaUser = Nothing + , _urpglPrettyPrint = True + , _urpglUserIp = Nothing + , _urpglProfileId = pUrpglProfileId_ + , _urpglKey = Nothing + , _urpglOauthToken = Nothing + , _urpglFields = Nothing + , _urpglAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urpglQuotaUser :: Lens' UserRolePermissionGroupsList' (Maybe Text) +urpglQuotaUser + = lens _urpglQuotaUser + (\ s a -> s{_urpglQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urpglPrettyPrint :: Lens' UserRolePermissionGroupsList' Bool +urpglPrettyPrint + = lens _urpglPrettyPrint + (\ s a -> s{_urpglPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urpglUserIp :: Lens' UserRolePermissionGroupsList' (Maybe Text) +urpglUserIp + = lens _urpglUserIp (\ s a -> s{_urpglUserIp = a}) + +-- | User profile ID associated with this request. +urpglProfileId :: Lens' UserRolePermissionGroupsList' Int64 +urpglProfileId + = lens _urpglProfileId + (\ s a -> s{_urpglProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urpglKey :: Lens' UserRolePermissionGroupsList' (Maybe Text) +urpglKey = lens _urpglKey (\ s a -> s{_urpglKey = a}) + +-- | OAuth 2.0 token for the current user. +urpglOauthToken :: Lens' UserRolePermissionGroupsList' (Maybe Text) +urpglOauthToken + = lens _urpglOauthToken + (\ s a -> s{_urpglOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urpglFields :: Lens' UserRolePermissionGroupsList' (Maybe Text) +urpglFields + = lens _urpglFields (\ s a -> s{_urpglFields = a}) + +-- | Data format for the response. +urpglAlt :: Lens' UserRolePermissionGroupsList' Text +urpglAlt = lens _urpglAlt (\ s a -> s{_urpglAlt = a}) + +instance GoogleRequest UserRolePermissionGroupsList' + where + type Rs UserRolePermissionGroupsList' = + UserRolePermissionGroupsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolePermissionGroupsList{..} + = go _urpglQuotaUser _urpglPrettyPrint _urpglUserIp + _urpglProfileId + _urpglKey + _urpglOauthToken + _urpglFields + _urpglAlt + where go + = clientWithRoute + (Proxy :: Proxy UserRolePermissionGroupsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/Get.hs new file mode 100644 index 000000000..b8144884f --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRolePermissions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one user role permission by ID. +-- +-- /See:/ for @DfareportingUserRolePermissionsGet@. +module DFAReporting.UserRolePermissions.Get + ( + -- * REST Resource + UserRolePermissionsGetAPI + + -- * Creating a Request + , userRolePermissionsGet + , UserRolePermissionsGet + + -- * Request Lenses + , useQuotaUser + , usePrettyPrint + , useUserIp + , useProfileId + , useKey + , useId + , useOauthToken + , useFields + , useAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolePermissionsGet@ which the +-- 'UserRolePermissionsGet' request conforms to. +type UserRolePermissionsGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRolePermissions" :> + Capture "id" Int64 :> Get '[JSON] UserRolePermission + +-- | Gets one user role permission by ID. +-- +-- /See:/ 'userRolePermissionsGet' smart constructor. +data UserRolePermissionsGet = UserRolePermissionsGet + { _useQuotaUser :: !(Maybe Text) + , _usePrettyPrint :: !Bool + , _useUserIp :: !(Maybe Text) + , _useProfileId :: !Int64 + , _useKey :: !(Maybe Text) + , _useId :: !Int64 + , _useOauthToken :: !(Maybe Text) + , _useFields :: !(Maybe Text) + , _useAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'useQuotaUser' +-- +-- * 'usePrettyPrint' +-- +-- * 'useUserIp' +-- +-- * 'useProfileId' +-- +-- * 'useKey' +-- +-- * 'useId' +-- +-- * 'useOauthToken' +-- +-- * 'useFields' +-- +-- * 'useAlt' +userRolePermissionsGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> UserRolePermissionsGet +userRolePermissionsGet pUseProfileId_ pUseId_ = + UserRolePermissionsGet + { _useQuotaUser = Nothing + , _usePrettyPrint = True + , _useUserIp = Nothing + , _useProfileId = pUseProfileId_ + , _useKey = Nothing + , _useId = pUseId_ + , _useOauthToken = Nothing + , _useFields = Nothing + , _useAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +useQuotaUser :: Lens' UserRolePermissionsGet' (Maybe Text) +useQuotaUser + = lens _useQuotaUser (\ s a -> s{_useQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +usePrettyPrint :: Lens' UserRolePermissionsGet' Bool +usePrettyPrint + = lens _usePrettyPrint + (\ s a -> s{_usePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +useUserIp :: Lens' UserRolePermissionsGet' (Maybe Text) +useUserIp + = lens _useUserIp (\ s a -> s{_useUserIp = a}) + +-- | User profile ID associated with this request. +useProfileId :: Lens' UserRolePermissionsGet' Int64 +useProfileId + = lens _useProfileId (\ s a -> s{_useProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +useKey :: Lens' UserRolePermissionsGet' (Maybe Text) +useKey = lens _useKey (\ s a -> s{_useKey = a}) + +-- | User role permission ID. +useId :: Lens' UserRolePermissionsGet' Int64 +useId = lens _useId (\ s a -> s{_useId = a}) + +-- | OAuth 2.0 token for the current user. +useOauthToken :: Lens' UserRolePermissionsGet' (Maybe Text) +useOauthToken + = lens _useOauthToken + (\ s a -> s{_useOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +useFields :: Lens' UserRolePermissionsGet' (Maybe Text) +useFields + = lens _useFields (\ s a -> s{_useFields = a}) + +-- | Data format for the response. +useAlt :: Lens' UserRolePermissionsGet' Text +useAlt = lens _useAlt (\ s a -> s{_useAlt = a}) + +instance GoogleRequest UserRolePermissionsGet' where + type Rs UserRolePermissionsGet' = UserRolePermission + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolePermissionsGet{..} + = go _useQuotaUser _usePrettyPrint _useUserIp + _useProfileId + _useKey + _useId + _useOauthToken + _useFields + _useAlt + where go + = clientWithRoute + (Proxy :: Proxy UserRolePermissionsGetAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/List.hs new file mode 100644 index 000000000..0f3f0364b --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRolePermissions/List.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRolePermissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of user role permissions, possibly filtered. +-- +-- /See:/ for @DfareportingUserRolePermissionsList@. +module DFAReporting.UserRolePermissions.List + ( + -- * REST Resource + UserRolePermissionsListAPI + + -- * Creating a Request + , userRolePermissionsList + , UserRolePermissionsList + + -- * Request Lenses + , urplQuotaUser + , urplPrettyPrint + , urplUserIp + , urplIds + , urplProfileId + , urplKey + , urplOauthToken + , urplFields + , urplAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolePermissionsList@ which the +-- 'UserRolePermissionsList' request conforms to. +type UserRolePermissionsListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRolePermissions" :> + QueryParams "ids" Int64 :> + Get '[JSON] UserRolePermissionsListResponse + +-- | Gets a list of user role permissions, possibly filtered. +-- +-- /See:/ 'userRolePermissionsList' smart constructor. +data UserRolePermissionsList = UserRolePermissionsList + { _urplQuotaUser :: !(Maybe Text) + , _urplPrettyPrint :: !Bool + , _urplUserIp :: !(Maybe Text) + , _urplIds :: !(Maybe Int64) + , _urplProfileId :: !Int64 + , _urplKey :: !(Maybe Text) + , _urplOauthToken :: !(Maybe Text) + , _urplFields :: !(Maybe Text) + , _urplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolePermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urplQuotaUser' +-- +-- * 'urplPrettyPrint' +-- +-- * 'urplUserIp' +-- +-- * 'urplIds' +-- +-- * 'urplProfileId' +-- +-- * 'urplKey' +-- +-- * 'urplOauthToken' +-- +-- * 'urplFields' +-- +-- * 'urplAlt' +userRolePermissionsList + :: Int64 -- ^ 'profileId' + -> UserRolePermissionsList +userRolePermissionsList pUrplProfileId_ = + UserRolePermissionsList + { _urplQuotaUser = Nothing + , _urplPrettyPrint = True + , _urplUserIp = Nothing + , _urplIds = Nothing + , _urplProfileId = pUrplProfileId_ + , _urplKey = Nothing + , _urplOauthToken = Nothing + , _urplFields = Nothing + , _urplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urplQuotaUser :: Lens' UserRolePermissionsList' (Maybe Text) +urplQuotaUser + = lens _urplQuotaUser + (\ s a -> s{_urplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urplPrettyPrint :: Lens' UserRolePermissionsList' Bool +urplPrettyPrint + = lens _urplPrettyPrint + (\ s a -> s{_urplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urplUserIp :: Lens' UserRolePermissionsList' (Maybe Text) +urplUserIp + = lens _urplUserIp (\ s a -> s{_urplUserIp = a}) + +-- | Select only user role permissions with these IDs. +urplIds :: Lens' UserRolePermissionsList' (Maybe Int64) +urplIds = lens _urplIds (\ s a -> s{_urplIds = a}) + +-- | User profile ID associated with this request. +urplProfileId :: Lens' UserRolePermissionsList' Int64 +urplProfileId + = lens _urplProfileId + (\ s a -> s{_urplProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urplKey :: Lens' UserRolePermissionsList' (Maybe Text) +urplKey = lens _urplKey (\ s a -> s{_urplKey = a}) + +-- | OAuth 2.0 token for the current user. +urplOauthToken :: Lens' UserRolePermissionsList' (Maybe Text) +urplOauthToken + = lens _urplOauthToken + (\ s a -> s{_urplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urplFields :: Lens' UserRolePermissionsList' (Maybe Text) +urplFields + = lens _urplFields (\ s a -> s{_urplFields = a}) + +-- | Data format for the response. +urplAlt :: Lens' UserRolePermissionsList' Text +urplAlt = lens _urplAlt (\ s a -> s{_urplAlt = a}) + +instance GoogleRequest UserRolePermissionsList' where + type Rs UserRolePermissionsList' = + UserRolePermissionsListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolePermissionsList{..} + = go _urplQuotaUser _urplPrettyPrint _urplUserIp + _urplIds + _urplProfileId + _urplKey + _urplOauthToken + _urplFields + _urplAlt + where go + = clientWithRoute + (Proxy :: Proxy UserRolePermissionsListAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Delete.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Delete.hs new file mode 100644 index 000000000..2e5ab4da1 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Delete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing user role. +-- +-- /See:/ for @DfareportingUserRolesDelete@. +module DFAReporting.UserRoles.Delete + ( + -- * REST Resource + UserRolesDeleteAPI + + -- * Creating a Request + , userRolesDelete + , UserRolesDelete + + -- * Request Lenses + , urdQuotaUser + , urdPrettyPrint + , urdUserIp + , urdProfileId + , urdKey + , urdId + , urdOauthToken + , urdFields + , urdAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesDelete@ which the +-- 'UserRolesDelete' request conforms to. +type UserRolesDeleteAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> + Capture "id" Int64 :> Delete '[JSON] () + +-- | Deletes an existing user role. +-- +-- /See:/ 'userRolesDelete' smart constructor. +data UserRolesDelete = UserRolesDelete + { _urdQuotaUser :: !(Maybe Text) + , _urdPrettyPrint :: !Bool + , _urdUserIp :: !(Maybe Text) + , _urdProfileId :: !Int64 + , _urdKey :: !(Maybe Text) + , _urdId :: !Int64 + , _urdOauthToken :: !(Maybe Text) + , _urdFields :: !(Maybe Text) + , _urdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urdQuotaUser' +-- +-- * 'urdPrettyPrint' +-- +-- * 'urdUserIp' +-- +-- * 'urdProfileId' +-- +-- * 'urdKey' +-- +-- * 'urdId' +-- +-- * 'urdOauthToken' +-- +-- * 'urdFields' +-- +-- * 'urdAlt' +userRolesDelete + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> UserRolesDelete +userRolesDelete pUrdProfileId_ pUrdId_ = + UserRolesDelete + { _urdQuotaUser = Nothing + , _urdPrettyPrint = True + , _urdUserIp = Nothing + , _urdProfileId = pUrdProfileId_ + , _urdKey = Nothing + , _urdId = pUrdId_ + , _urdOauthToken = Nothing + , _urdFields = Nothing + , _urdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urdQuotaUser :: Lens' UserRolesDelete' (Maybe Text) +urdQuotaUser + = lens _urdQuotaUser (\ s a -> s{_urdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urdPrettyPrint :: Lens' UserRolesDelete' Bool +urdPrettyPrint + = lens _urdPrettyPrint + (\ s a -> s{_urdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urdUserIp :: Lens' UserRolesDelete' (Maybe Text) +urdUserIp + = lens _urdUserIp (\ s a -> s{_urdUserIp = a}) + +-- | User profile ID associated with this request. +urdProfileId :: Lens' UserRolesDelete' Int64 +urdProfileId + = lens _urdProfileId (\ s a -> s{_urdProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urdKey :: Lens' UserRolesDelete' (Maybe Text) +urdKey = lens _urdKey (\ s a -> s{_urdKey = a}) + +-- | User role ID. +urdId :: Lens' UserRolesDelete' Int64 +urdId = lens _urdId (\ s a -> s{_urdId = a}) + +-- | OAuth 2.0 token for the current user. +urdOauthToken :: Lens' UserRolesDelete' (Maybe Text) +urdOauthToken + = lens _urdOauthToken + (\ s a -> s{_urdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urdFields :: Lens' UserRolesDelete' (Maybe Text) +urdFields + = lens _urdFields (\ s a -> s{_urdFields = a}) + +-- | Data format for the response. +urdAlt :: Lens' UserRolesDelete' Text +urdAlt = lens _urdAlt (\ s a -> s{_urdAlt = a}) + +instance GoogleRequest UserRolesDelete' where + type Rs UserRolesDelete' = () + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesDelete{..} + = go _urdQuotaUser _urdPrettyPrint _urdUserIp + _urdProfileId + _urdKey + _urdId + _urdOauthToken + _urdFields + _urdAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesDeleteAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Get.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Get.hs new file mode 100644 index 000000000..28828d0b8 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one user role by ID. +-- +-- /See:/ for @DfareportingUserRolesGet@. +module DFAReporting.UserRoles.Get + ( + -- * REST Resource + UserRolesGetAPI + + -- * Creating a Request + , userRolesGet + , UserRolesGet + + -- * Request Lenses + , urgQuotaUser + , urgPrettyPrint + , urgUserIp + , urgProfileId + , urgKey + , urgId + , urgOauthToken + , urgFields + , urgAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesGet@ which the +-- 'UserRolesGet' request conforms to. +type UserRolesGetAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> + Capture "id" Int64 :> Get '[JSON] UserRole + +-- | Gets one user role by ID. +-- +-- /See:/ 'userRolesGet' smart constructor. +data UserRolesGet = UserRolesGet + { _urgQuotaUser :: !(Maybe Text) + , _urgPrettyPrint :: !Bool + , _urgUserIp :: !(Maybe Text) + , _urgProfileId :: !Int64 + , _urgKey :: !(Maybe Text) + , _urgId :: !Int64 + , _urgOauthToken :: !(Maybe Text) + , _urgFields :: !(Maybe Text) + , _urgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urgQuotaUser' +-- +-- * 'urgPrettyPrint' +-- +-- * 'urgUserIp' +-- +-- * 'urgProfileId' +-- +-- * 'urgKey' +-- +-- * 'urgId' +-- +-- * 'urgOauthToken' +-- +-- * 'urgFields' +-- +-- * 'urgAlt' +userRolesGet + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> UserRolesGet +userRolesGet pUrgProfileId_ pUrgId_ = + UserRolesGet + { _urgQuotaUser = Nothing + , _urgPrettyPrint = True + , _urgUserIp = Nothing + , _urgProfileId = pUrgProfileId_ + , _urgKey = Nothing + , _urgId = pUrgId_ + , _urgOauthToken = Nothing + , _urgFields = Nothing + , _urgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urgQuotaUser :: Lens' UserRolesGet' (Maybe Text) +urgQuotaUser + = lens _urgQuotaUser (\ s a -> s{_urgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urgPrettyPrint :: Lens' UserRolesGet' Bool +urgPrettyPrint + = lens _urgPrettyPrint + (\ s a -> s{_urgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urgUserIp :: Lens' UserRolesGet' (Maybe Text) +urgUserIp + = lens _urgUserIp (\ s a -> s{_urgUserIp = a}) + +-- | User profile ID associated with this request. +urgProfileId :: Lens' UserRolesGet' Int64 +urgProfileId + = lens _urgProfileId (\ s a -> s{_urgProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urgKey :: Lens' UserRolesGet' (Maybe Text) +urgKey = lens _urgKey (\ s a -> s{_urgKey = a}) + +-- | User role ID. +urgId :: Lens' UserRolesGet' Int64 +urgId = lens _urgId (\ s a -> s{_urgId = a}) + +-- | OAuth 2.0 token for the current user. +urgOauthToken :: Lens' UserRolesGet' (Maybe Text) +urgOauthToken + = lens _urgOauthToken + (\ s a -> s{_urgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urgFields :: Lens' UserRolesGet' (Maybe Text) +urgFields + = lens _urgFields (\ s a -> s{_urgFields = a}) + +-- | Data format for the response. +urgAlt :: Lens' UserRolesGet' Text +urgAlt = lens _urgAlt (\ s a -> s{_urgAlt = a}) + +instance GoogleRequest UserRolesGet' where + type Rs UserRolesGet' = UserRole + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesGet{..} + = go _urgQuotaUser _urgPrettyPrint _urgUserIp + _urgProfileId + _urgKey + _urgId + _urgOauthToken + _urgFields + _urgAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesGetAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Insert.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Insert.hs new file mode 100644 index 000000000..0d9560d3e --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new user role. +-- +-- /See:/ for @DfareportingUserRolesInsert@. +module DFAReporting.UserRoles.Insert + ( + -- * REST Resource + UserRolesInsertAPI + + -- * Creating a Request + , userRolesInsert + , UserRolesInsert + + -- * Request Lenses + , uriQuotaUser + , uriPrettyPrint + , uriUserIp + , uriProfileId + , uriKey + , uriOauthToken + , uriFields + , uriAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesInsert@ which the +-- 'UserRolesInsert' request conforms to. +type UserRolesInsertAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> Post '[JSON] UserRole + +-- | Inserts a new user role. +-- +-- /See:/ 'userRolesInsert' smart constructor. +data UserRolesInsert = UserRolesInsert + { _uriQuotaUser :: !(Maybe Text) + , _uriPrettyPrint :: !Bool + , _uriUserIp :: !(Maybe Text) + , _uriProfileId :: !Int64 + , _uriKey :: !(Maybe Text) + , _uriOauthToken :: !(Maybe Text) + , _uriFields :: !(Maybe Text) + , _uriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uriQuotaUser' +-- +-- * 'uriPrettyPrint' +-- +-- * 'uriUserIp' +-- +-- * 'uriProfileId' +-- +-- * 'uriKey' +-- +-- * 'uriOauthToken' +-- +-- * 'uriFields' +-- +-- * 'uriAlt' +userRolesInsert + :: Int64 -- ^ 'profileId' + -> UserRolesInsert +userRolesInsert pUriProfileId_ = + UserRolesInsert + { _uriQuotaUser = Nothing + , _uriPrettyPrint = True + , _uriUserIp = Nothing + , _uriProfileId = pUriProfileId_ + , _uriKey = Nothing + , _uriOauthToken = Nothing + , _uriFields = Nothing + , _uriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uriQuotaUser :: Lens' UserRolesInsert' (Maybe Text) +uriQuotaUser + = lens _uriQuotaUser (\ s a -> s{_uriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uriPrettyPrint :: Lens' UserRolesInsert' Bool +uriPrettyPrint + = lens _uriPrettyPrint + (\ s a -> s{_uriPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uriUserIp :: Lens' UserRolesInsert' (Maybe Text) +uriUserIp + = lens _uriUserIp (\ s a -> s{_uriUserIp = a}) + +-- | User profile ID associated with this request. +uriProfileId :: Lens' UserRolesInsert' Int64 +uriProfileId + = lens _uriProfileId (\ s a -> s{_uriProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uriKey :: Lens' UserRolesInsert' (Maybe Text) +uriKey = lens _uriKey (\ s a -> s{_uriKey = a}) + +-- | OAuth 2.0 token for the current user. +uriOauthToken :: Lens' UserRolesInsert' (Maybe Text) +uriOauthToken + = lens _uriOauthToken + (\ s a -> s{_uriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uriFields :: Lens' UserRolesInsert' (Maybe Text) +uriFields + = lens _uriFields (\ s a -> s{_uriFields = a}) + +-- | Data format for the response. +uriAlt :: Lens' UserRolesInsert' Text +uriAlt = lens _uriAlt (\ s a -> s{_uriAlt = a}) + +instance GoogleRequest UserRolesInsert' where + type Rs UserRolesInsert' = UserRole + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesInsert{..} + = go _uriQuotaUser _uriPrettyPrint _uriUserIp + _uriProfileId + _uriKey + _uriOauthToken + _uriFields + _uriAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesInsertAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/List.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/List.hs new file mode 100644 index 000000000..6f7467f83 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/List.hs @@ -0,0 +1,264 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of user roles, possibly filtered. +-- +-- /See:/ for @DfareportingUserRolesList@. +module DFAReporting.UserRoles.List + ( + -- * REST Resource + UserRolesListAPI + + -- * Creating a Request + , userRolesList + , UserRolesList + + -- * Request Lenses + , urlQuotaUser + , urlPrettyPrint + , urlUserIp + , urlSearchString + , urlIds + , urlProfileId + , urlSortOrder + , urlKey + , urlAccountUserRoleOnly + , urlPageToken + , urlSortField + , urlSubaccountId + , urlOauthToken + , urlMaxResults + , urlFields + , urlAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesList@ which the +-- 'UserRolesList' request conforms to. +type UserRolesListAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> + QueryParam "searchString" Text :> + QueryParams "ids" Int64 :> + QueryParam "sortOrder" Text :> + QueryParam "accountUserRoleOnly" Bool :> + QueryParam "pageToken" Text :> + QueryParam "sortField" Text :> + QueryParam "subaccountId" Int64 :> + QueryParam "maxResults" Int32 :> + Get '[JSON] UserRolesListResponse + +-- | Retrieves a list of user roles, possibly filtered. +-- +-- /See:/ 'userRolesList' smart constructor. +data UserRolesList = UserRolesList + { _urlQuotaUser :: !(Maybe Text) + , _urlPrettyPrint :: !Bool + , _urlUserIp :: !(Maybe Text) + , _urlSearchString :: !(Maybe Text) + , _urlIds :: !(Maybe Int64) + , _urlProfileId :: !Int64 + , _urlSortOrder :: !(Maybe Text) + , _urlKey :: !(Maybe Text) + , _urlAccountUserRoleOnly :: !(Maybe Bool) + , _urlPageToken :: !(Maybe Text) + , _urlSortField :: !(Maybe Text) + , _urlSubaccountId :: !(Maybe Int64) + , _urlOauthToken :: !(Maybe Text) + , _urlMaxResults :: !(Maybe Int32) + , _urlFields :: !(Maybe Text) + , _urlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlQuotaUser' +-- +-- * 'urlPrettyPrint' +-- +-- * 'urlUserIp' +-- +-- * 'urlSearchString' +-- +-- * 'urlIds' +-- +-- * 'urlProfileId' +-- +-- * 'urlSortOrder' +-- +-- * 'urlKey' +-- +-- * 'urlAccountUserRoleOnly' +-- +-- * 'urlPageToken' +-- +-- * 'urlSortField' +-- +-- * 'urlSubaccountId' +-- +-- * 'urlOauthToken' +-- +-- * 'urlMaxResults' +-- +-- * 'urlFields' +-- +-- * 'urlAlt' +userRolesList + :: Int64 -- ^ 'profileId' + -> UserRolesList +userRolesList pUrlProfileId_ = + UserRolesList + { _urlQuotaUser = Nothing + , _urlPrettyPrint = True + , _urlUserIp = Nothing + , _urlSearchString = Nothing + , _urlIds = Nothing + , _urlProfileId = pUrlProfileId_ + , _urlSortOrder = Nothing + , _urlKey = Nothing + , _urlAccountUserRoleOnly = Nothing + , _urlPageToken = Nothing + , _urlSortField = Nothing + , _urlSubaccountId = Nothing + , _urlOauthToken = Nothing + , _urlMaxResults = Nothing + , _urlFields = Nothing + , _urlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urlQuotaUser :: Lens' UserRolesList' (Maybe Text) +urlQuotaUser + = lens _urlQuotaUser (\ s a -> s{_urlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urlPrettyPrint :: Lens' UserRolesList' Bool +urlPrettyPrint + = lens _urlPrettyPrint + (\ s a -> s{_urlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urlUserIp :: Lens' UserRolesList' (Maybe Text) +urlUserIp + = lens _urlUserIp (\ s a -> s{_urlUserIp = a}) + +-- | Allows searching for objects by name or ID. Wildcards (*) are allowed. +-- For example, \"userrole*2015\" will return objects with names like +-- \"userrole June 2015\", \"userrole April 2015\", or simply \"userrole +-- 2015\". Most of the searches also add wildcards implicitly at the start +-- and the end of the search string. For example, a search string of +-- \"userrole\" will match objects with name \"my userrole\", \"userrole +-- 2015\", or simply \"userrole\". +urlSearchString :: Lens' UserRolesList' (Maybe Text) +urlSearchString + = lens _urlSearchString + (\ s a -> s{_urlSearchString = a}) + +-- | Select only user roles with the specified IDs. +urlIds :: Lens' UserRolesList' (Maybe Int64) +urlIds = lens _urlIds (\ s a -> s{_urlIds = a}) + +-- | User profile ID associated with this request. +urlProfileId :: Lens' UserRolesList' Int64 +urlProfileId + = lens _urlProfileId (\ s a -> s{_urlProfileId = a}) + +-- | Order of sorted results, default is ASCENDING. +urlSortOrder :: Lens' UserRolesList' (Maybe Text) +urlSortOrder + = lens _urlSortOrder (\ s a -> s{_urlSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urlKey :: Lens' UserRolesList' (Maybe Text) +urlKey = lens _urlKey (\ s a -> s{_urlKey = a}) + +-- | Select only account level user roles not associated with any specific +-- subaccount. +urlAccountUserRoleOnly :: Lens' UserRolesList' (Maybe Bool) +urlAccountUserRoleOnly + = lens _urlAccountUserRoleOnly + (\ s a -> s{_urlAccountUserRoleOnly = a}) + +-- | Value of the nextPageToken from the previous result page. +urlPageToken :: Lens' UserRolesList' (Maybe Text) +urlPageToken + = lens _urlPageToken (\ s a -> s{_urlPageToken = a}) + +-- | Field by which to sort the list. +urlSortField :: Lens' UserRolesList' (Maybe Text) +urlSortField + = lens _urlSortField (\ s a -> s{_urlSortField = a}) + +-- | Select only user roles that belong to this subaccount. +urlSubaccountId :: Lens' UserRolesList' (Maybe Int64) +urlSubaccountId + = lens _urlSubaccountId + (\ s a -> s{_urlSubaccountId = a}) + +-- | OAuth 2.0 token for the current user. +urlOauthToken :: Lens' UserRolesList' (Maybe Text) +urlOauthToken + = lens _urlOauthToken + (\ s a -> s{_urlOauthToken = a}) + +-- | Maximum number of results to return. +urlMaxResults :: Lens' UserRolesList' (Maybe Int32) +urlMaxResults + = lens _urlMaxResults + (\ s a -> s{_urlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +urlFields :: Lens' UserRolesList' (Maybe Text) +urlFields + = lens _urlFields (\ s a -> s{_urlFields = a}) + +-- | Data format for the response. +urlAlt :: Lens' UserRolesList' Text +urlAlt = lens _urlAlt (\ s a -> s{_urlAlt = a}) + +instance GoogleRequest UserRolesList' where + type Rs UserRolesList' = UserRolesListResponse + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesList{..} + = go _urlQuotaUser _urlPrettyPrint _urlUserIp + _urlSearchString + _urlIds + _urlProfileId + _urlSortOrder + _urlKey + _urlAccountUserRoleOnly + _urlPageToken + _urlSortField + _urlSubaccountId + _urlOauthToken + _urlMaxResults + _urlFields + _urlAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesListAPI) r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Patch.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Patch.hs new file mode 100644 index 000000000..77260717f --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Patch.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing user role. This method supports patch semantics. +-- +-- /See:/ for @DfareportingUserRolesPatch@. +module DFAReporting.UserRoles.Patch + ( + -- * REST Resource + UserRolesPatchAPI + + -- * Creating a Request + , userRolesPatch + , UserRolesPatch + + -- * Request Lenses + , uQuotaUser + , uPrettyPrint + , uUserIp + , uProfileId + , uKey + , uId + , uOauthToken + , uFields + , uAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesPatch@ which the +-- 'UserRolesPatch' request conforms to. +type UserRolesPatchAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> + QueryParam "id" Int64 :> Patch '[JSON] UserRole + +-- | Updates an existing user role. This method supports patch semantics. +-- +-- /See:/ 'userRolesPatch' smart constructor. +data UserRolesPatch = UserRolesPatch + { _uQuotaUser :: !(Maybe Text) + , _uPrettyPrint :: !Bool + , _uUserIp :: !(Maybe Text) + , _uProfileId :: !Int64 + , _uKey :: !(Maybe Text) + , _uId :: !Int64 + , _uOauthToken :: !(Maybe Text) + , _uFields :: !(Maybe Text) + , _uAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uQuotaUser' +-- +-- * 'uPrettyPrint' +-- +-- * 'uUserIp' +-- +-- * 'uProfileId' +-- +-- * 'uKey' +-- +-- * 'uId' +-- +-- * 'uOauthToken' +-- +-- * 'uFields' +-- +-- * 'uAlt' +userRolesPatch + :: Int64 -- ^ 'profileId' + -> Int64 -- ^ 'id' + -> UserRolesPatch +userRolesPatch pUProfileId_ pUId_ = + UserRolesPatch + { _uQuotaUser = Nothing + , _uPrettyPrint = True + , _uUserIp = Nothing + , _uProfileId = pUProfileId_ + , _uKey = Nothing + , _uId = pUId_ + , _uOauthToken = Nothing + , _uFields = Nothing + , _uAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uQuotaUser :: Lens' UserRolesPatch' (Maybe Text) +uQuotaUser + = lens _uQuotaUser (\ s a -> s{_uQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uPrettyPrint :: Lens' UserRolesPatch' Bool +uPrettyPrint + = lens _uPrettyPrint (\ s a -> s{_uPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uUserIp :: Lens' UserRolesPatch' (Maybe Text) +uUserIp = lens _uUserIp (\ s a -> s{_uUserIp = a}) + +-- | User profile ID associated with this request. +uProfileId :: Lens' UserRolesPatch' Int64 +uProfileId + = lens _uProfileId (\ s a -> s{_uProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uKey :: Lens' UserRolesPatch' (Maybe Text) +uKey = lens _uKey (\ s a -> s{_uKey = a}) + +-- | User role ID. +uId :: Lens' UserRolesPatch' Int64 +uId = lens _uId (\ s a -> s{_uId = a}) + +-- | OAuth 2.0 token for the current user. +uOauthToken :: Lens' UserRolesPatch' (Maybe Text) +uOauthToken + = lens _uOauthToken (\ s a -> s{_uOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uFields :: Lens' UserRolesPatch' (Maybe Text) +uFields = lens _uFields (\ s a -> s{_uFields = a}) + +-- | Data format for the response. +uAlt :: Lens' UserRolesPatch' Text +uAlt = lens _uAlt (\ s a -> s{_uAlt = a}) + +instance GoogleRequest UserRolesPatch' where + type Rs UserRolesPatch' = UserRole + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesPatch{..} + = go _uQuotaUser _uPrettyPrint _uUserIp _uProfileId + _uKey + (Just _uId) + _uOauthToken + _uFields + _uAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesPatchAPI) + r + u diff --git a/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Update.hs b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Update.hs new file mode 100644 index 000000000..c298290c7 --- /dev/null +++ b/gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserRoles/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DFAReporting.UserRoles.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing user role. +-- +-- /See:/ for @DfareportingUserRolesUpdate@. +module DFAReporting.UserRoles.Update + ( + -- * REST Resource + UserRolesUpdateAPI + + -- * Creating a Request + , userRolesUpdate + , UserRolesUpdate + + -- * Request Lenses + , uruQuotaUser + , uruPrettyPrint + , uruUserIp + , uruProfileId + , uruKey + , uruOauthToken + , uruFields + , uruAlt + ) where + +import Network.Google.DFAReporting.Types +import Network.Google.Prelude + +-- | A resource alias for @DfareportingUserRolesUpdate@ which the +-- 'UserRolesUpdate' request conforms to. +type UserRolesUpdateAPI = + "userprofiles" :> + Capture "profileId" Int64 :> + "userRoles" :> Put '[JSON] UserRole + +-- | Updates an existing user role. +-- +-- /See:/ 'userRolesUpdate' smart constructor. +data UserRolesUpdate = UserRolesUpdate + { _uruQuotaUser :: !(Maybe Text) + , _uruPrettyPrint :: !Bool + , _uruUserIp :: !(Maybe Text) + , _uruProfileId :: !Int64 + , _uruKey :: !(Maybe Text) + , _uruOauthToken :: !(Maybe Text) + , _uruFields :: !(Maybe Text) + , _uruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserRolesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uruQuotaUser' +-- +-- * 'uruPrettyPrint' +-- +-- * 'uruUserIp' +-- +-- * 'uruProfileId' +-- +-- * 'uruKey' +-- +-- * 'uruOauthToken' +-- +-- * 'uruFields' +-- +-- * 'uruAlt' +userRolesUpdate + :: Int64 -- ^ 'profileId' + -> UserRolesUpdate +userRolesUpdate pUruProfileId_ = + UserRolesUpdate + { _uruQuotaUser = Nothing + , _uruPrettyPrint = True + , _uruUserIp = Nothing + , _uruProfileId = pUruProfileId_ + , _uruKey = Nothing + , _uruOauthToken = Nothing + , _uruFields = Nothing + , _uruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uruQuotaUser :: Lens' UserRolesUpdate' (Maybe Text) +uruQuotaUser + = lens _uruQuotaUser (\ s a -> s{_uruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uruPrettyPrint :: Lens' UserRolesUpdate' Bool +uruPrettyPrint + = lens _uruPrettyPrint + (\ s a -> s{_uruPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uruUserIp :: Lens' UserRolesUpdate' (Maybe Text) +uruUserIp + = lens _uruUserIp (\ s a -> s{_uruUserIp = a}) + +-- | User profile ID associated with this request. +uruProfileId :: Lens' UserRolesUpdate' Int64 +uruProfileId + = lens _uruProfileId (\ s a -> s{_uruProfileId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uruKey :: Lens' UserRolesUpdate' (Maybe Text) +uruKey = lens _uruKey (\ s a -> s{_uruKey = a}) + +-- | OAuth 2.0 token for the current user. +uruOauthToken :: Lens' UserRolesUpdate' (Maybe Text) +uruOauthToken + = lens _uruOauthToken + (\ s a -> s{_uruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uruFields :: Lens' UserRolesUpdate' (Maybe Text) +uruFields + = lens _uruFields (\ s a -> s{_uruFields = a}) + +-- | Data format for the response. +uruAlt :: Lens' UserRolesUpdate' Text +uruAlt = lens _uruAlt (\ s a -> s{_uruAlt = a}) + +instance GoogleRequest UserRolesUpdate' where + type Rs UserRolesUpdate' = UserRole + request = requestWithRoute defReq dFAReportingURL + requestWithRoute r u UserRolesUpdate{..} + = go _uruQuotaUser _uruPrettyPrint _uruUserIp + _uruProfileId + _uruKey + _uruOauthToken + _uruFields + _uruAlt + where go + = clientWithRoute (Proxy :: Proxy UserRolesUpdateAPI) + r + u diff --git a/gogol-dfareporting/gogol-dfareporting.cabal b/gogol-dfareporting/gogol-dfareporting.cabal new file mode 100644 index 000000000..ffdb393ec --- /dev/null +++ b/gogol-dfareporting/gogol-dfareporting.cabal @@ -0,0 +1,235 @@ +name: gogol-dfareporting +version: 0.0.1 +synopsis: DCM/DFA Reporting And Trafficking API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Manage your DoubleClick Campaign Manager ad campaigns and reports. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.DFAReporting + , Network.Google.DFAReporting.Types + , Network.Google.Resource.DFAReporting.AccountActiveAdSummaries.Get + , Network.Google.Resource.DFAReporting.AccountPermissionGroups.Get + , Network.Google.Resource.DFAReporting.AccountPermissionGroups.List + , Network.Google.Resource.DFAReporting.AccountPermissions.Get + , Network.Google.Resource.DFAReporting.AccountPermissions.List + , Network.Google.Resource.DFAReporting.AccountUserProfiles.Get + , Network.Google.Resource.DFAReporting.AccountUserProfiles.Insert + , Network.Google.Resource.DFAReporting.AccountUserProfiles.List + , Network.Google.Resource.DFAReporting.AccountUserProfiles.Patch + , Network.Google.Resource.DFAReporting.AccountUserProfiles.Update + , Network.Google.Resource.DFAReporting.Accounts.Get + , Network.Google.Resource.DFAReporting.Accounts.List + , Network.Google.Resource.DFAReporting.Accounts.Patch + , Network.Google.Resource.DFAReporting.Accounts.Update + , Network.Google.Resource.DFAReporting.Ads.Get + , Network.Google.Resource.DFAReporting.Ads.Insert + , Network.Google.Resource.DFAReporting.Ads.List + , Network.Google.Resource.DFAReporting.Ads.Patch + , Network.Google.Resource.DFAReporting.Ads.Update + , Network.Google.Resource.DFAReporting.AdvertiserGroups.Delete + , Network.Google.Resource.DFAReporting.AdvertiserGroups.Get + , Network.Google.Resource.DFAReporting.AdvertiserGroups.Insert + , Network.Google.Resource.DFAReporting.AdvertiserGroups.List + , Network.Google.Resource.DFAReporting.AdvertiserGroups.Patch + , Network.Google.Resource.DFAReporting.AdvertiserGroups.Update + , Network.Google.Resource.DFAReporting.Advertisers.Get + , Network.Google.Resource.DFAReporting.Advertisers.Insert + , Network.Google.Resource.DFAReporting.Advertisers.List + , Network.Google.Resource.DFAReporting.Advertisers.Patch + , Network.Google.Resource.DFAReporting.Advertisers.Update + , Network.Google.Resource.DFAReporting.Browsers.List + , Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.Insert + , Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.List + , Network.Google.Resource.DFAReporting.Campaigns.Get + , Network.Google.Resource.DFAReporting.Campaigns.Insert + , Network.Google.Resource.DFAReporting.Campaigns.List + , Network.Google.Resource.DFAReporting.Campaigns.Patch + , Network.Google.Resource.DFAReporting.Campaigns.Update + , Network.Google.Resource.DFAReporting.ChangeLogs.Get + , Network.Google.Resource.DFAReporting.ChangeLogs.List + , Network.Google.Resource.DFAReporting.Cities.List + , Network.Google.Resource.DFAReporting.ConnectionTypes.Get + , Network.Google.Resource.DFAReporting.ConnectionTypes.List + , Network.Google.Resource.DFAReporting.ContentCategories.Delete + , Network.Google.Resource.DFAReporting.ContentCategories.Get + , Network.Google.Resource.DFAReporting.ContentCategories.Insert + , Network.Google.Resource.DFAReporting.ContentCategories.List + , Network.Google.Resource.DFAReporting.ContentCategories.Patch + , Network.Google.Resource.DFAReporting.ContentCategories.Update + , Network.Google.Resource.DFAReporting.Countries.Get + , Network.Google.Resource.DFAReporting.Countries.List + , Network.Google.Resource.DFAReporting.CreativeAssets.Insert + , Network.Google.Resource.DFAReporting.CreativeFieldValues.Delete + , Network.Google.Resource.DFAReporting.CreativeFieldValues.Get + , Network.Google.Resource.DFAReporting.CreativeFieldValues.Insert + , Network.Google.Resource.DFAReporting.CreativeFieldValues.List + , Network.Google.Resource.DFAReporting.CreativeFieldValues.Patch + , Network.Google.Resource.DFAReporting.CreativeFieldValues.Update + , Network.Google.Resource.DFAReporting.CreativeFields.Delete + , Network.Google.Resource.DFAReporting.CreativeFields.Get + , Network.Google.Resource.DFAReporting.CreativeFields.Insert + , Network.Google.Resource.DFAReporting.CreativeFields.List + , Network.Google.Resource.DFAReporting.CreativeFields.Patch + , Network.Google.Resource.DFAReporting.CreativeFields.Update + , Network.Google.Resource.DFAReporting.CreativeGroups.Get + , Network.Google.Resource.DFAReporting.CreativeGroups.Insert + , Network.Google.Resource.DFAReporting.CreativeGroups.List + , Network.Google.Resource.DFAReporting.CreativeGroups.Patch + , Network.Google.Resource.DFAReporting.CreativeGroups.Update + , Network.Google.Resource.DFAReporting.Creatives.Get + , Network.Google.Resource.DFAReporting.Creatives.Insert + , Network.Google.Resource.DFAReporting.Creatives.List + , Network.Google.Resource.DFAReporting.Creatives.Patch + , Network.Google.Resource.DFAReporting.Creatives.Update + , Network.Google.Resource.DFAReporting.DimensionValues.Query + , Network.Google.Resource.DFAReporting.DirectorySiteContacts.Get + , Network.Google.Resource.DFAReporting.DirectorySiteContacts.List + , Network.Google.Resource.DFAReporting.DirectorySites.Get + , Network.Google.Resource.DFAReporting.DirectorySites.Insert + , Network.Google.Resource.DFAReporting.DirectorySites.List + , Network.Google.Resource.DFAReporting.EventTags.Delete + , Network.Google.Resource.DFAReporting.EventTags.Get + , Network.Google.Resource.DFAReporting.EventTags.Insert + , Network.Google.Resource.DFAReporting.EventTags.List + , Network.Google.Resource.DFAReporting.EventTags.Patch + , Network.Google.Resource.DFAReporting.EventTags.Update + , Network.Google.Resource.DFAReporting.Files.Get + , Network.Google.Resource.DFAReporting.Files.List + , Network.Google.Resource.DFAReporting.FloodlightActivities.Delete + , Network.Google.Resource.DFAReporting.FloodlightActivities.Generatetag + , Network.Google.Resource.DFAReporting.FloodlightActivities.Get + , Network.Google.Resource.DFAReporting.FloodlightActivities.Insert + , Network.Google.Resource.DFAReporting.FloodlightActivities.List + , Network.Google.Resource.DFAReporting.FloodlightActivities.Patch + , Network.Google.Resource.DFAReporting.FloodlightActivities.Update + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Delete + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Get + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Insert + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.List + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Patch + , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Update + , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Get + , Network.Google.Resource.DFAReporting.FloodlightConfigurations.List + , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Patch + , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Update + , Network.Google.Resource.DFAReporting.InventoryItems.Get + , Network.Google.Resource.DFAReporting.InventoryItems.List + , Network.Google.Resource.DFAReporting.LandingPages.Delete + , Network.Google.Resource.DFAReporting.LandingPages.Get + , Network.Google.Resource.DFAReporting.LandingPages.Insert + , Network.Google.Resource.DFAReporting.LandingPages.List + , Network.Google.Resource.DFAReporting.LandingPages.Patch + , Network.Google.Resource.DFAReporting.LandingPages.Update + , Network.Google.Resource.DFAReporting.Metros.List + , Network.Google.Resource.DFAReporting.MobileCarriers.Get + , Network.Google.Resource.DFAReporting.MobileCarriers.List + , Network.Google.Resource.DFAReporting.OperatingSystemVersions.Get + , Network.Google.Resource.DFAReporting.OperatingSystemVersions.List + , Network.Google.Resource.DFAReporting.OperatingSystems.Get + , Network.Google.Resource.DFAReporting.OperatingSystems.List + , Network.Google.Resource.DFAReporting.OrderDocuments.Get + , Network.Google.Resource.DFAReporting.OrderDocuments.List + , Network.Google.Resource.DFAReporting.Orders.Get + , Network.Google.Resource.DFAReporting.Orders.List + , Network.Google.Resource.DFAReporting.PlacementGroups.Get + , Network.Google.Resource.DFAReporting.PlacementGroups.Insert + , Network.Google.Resource.DFAReporting.PlacementGroups.List + , Network.Google.Resource.DFAReporting.PlacementGroups.Patch + , Network.Google.Resource.DFAReporting.PlacementGroups.Update + , Network.Google.Resource.DFAReporting.PlacementStrategies.Delete + , Network.Google.Resource.DFAReporting.PlacementStrategies.Get + , Network.Google.Resource.DFAReporting.PlacementStrategies.Insert + , Network.Google.Resource.DFAReporting.PlacementStrategies.List + , Network.Google.Resource.DFAReporting.PlacementStrategies.Patch + , Network.Google.Resource.DFAReporting.PlacementStrategies.Update + , Network.Google.Resource.DFAReporting.Placements.Generatetags + , Network.Google.Resource.DFAReporting.Placements.Get + , Network.Google.Resource.DFAReporting.Placements.Insert + , Network.Google.Resource.DFAReporting.Placements.List + , Network.Google.Resource.DFAReporting.Placements.Patch + , Network.Google.Resource.DFAReporting.Placements.Update + , Network.Google.Resource.DFAReporting.PlatformTypes.Get + , Network.Google.Resource.DFAReporting.PlatformTypes.List + , Network.Google.Resource.DFAReporting.PostalCodes.Get + , Network.Google.Resource.DFAReporting.PostalCodes.List + , Network.Google.Resource.DFAReporting.Projects.Get + , Network.Google.Resource.DFAReporting.Projects.List + , Network.Google.Resource.DFAReporting.Regions.List + , Network.Google.Resource.DFAReporting.RemarketingListShares.Get + , Network.Google.Resource.DFAReporting.RemarketingListShares.Patch + , Network.Google.Resource.DFAReporting.RemarketingListShares.Update + , Network.Google.Resource.DFAReporting.RemarketingLists.Get + , Network.Google.Resource.DFAReporting.RemarketingLists.Insert + , Network.Google.Resource.DFAReporting.RemarketingLists.List + , Network.Google.Resource.DFAReporting.RemarketingLists.Patch + , Network.Google.Resource.DFAReporting.RemarketingLists.Update + , Network.Google.Resource.DFAReporting.Reports.CompatibleFields.Query + , Network.Google.Resource.DFAReporting.Reports.Delete + , Network.Google.Resource.DFAReporting.Reports.Files.Get + , Network.Google.Resource.DFAReporting.Reports.Files.List + , Network.Google.Resource.DFAReporting.Reports.Get + , Network.Google.Resource.DFAReporting.Reports.Insert + , Network.Google.Resource.DFAReporting.Reports.List + , Network.Google.Resource.DFAReporting.Reports.Patch + , Network.Google.Resource.DFAReporting.Reports.Run + , Network.Google.Resource.DFAReporting.Reports.Update + , Network.Google.Resource.DFAReporting.Sites.Get + , Network.Google.Resource.DFAReporting.Sites.Insert + , Network.Google.Resource.DFAReporting.Sites.List + , Network.Google.Resource.DFAReporting.Sites.Patch + , Network.Google.Resource.DFAReporting.Sites.Update + , Network.Google.Resource.DFAReporting.Sizes.Get + , Network.Google.Resource.DFAReporting.Sizes.Insert + , Network.Google.Resource.DFAReporting.Sizes.List + , Network.Google.Resource.DFAReporting.Subaccounts.Get + , Network.Google.Resource.DFAReporting.Subaccounts.Insert + , Network.Google.Resource.DFAReporting.Subaccounts.List + , Network.Google.Resource.DFAReporting.Subaccounts.Patch + , Network.Google.Resource.DFAReporting.Subaccounts.Update + , Network.Google.Resource.DFAReporting.TargetableRemarketingLists.Get + , Network.Google.Resource.DFAReporting.TargetableRemarketingLists.List + , Network.Google.Resource.DFAReporting.UserProfiles.Get + , Network.Google.Resource.DFAReporting.UserProfiles.List + , Network.Google.Resource.DFAReporting.UserRolePermissionGroups.Get + , Network.Google.Resource.DFAReporting.UserRolePermissionGroups.List + , Network.Google.Resource.DFAReporting.UserRolePermissions.Get + , Network.Google.Resource.DFAReporting.UserRolePermissions.List + , Network.Google.Resource.DFAReporting.UserRoles.Delete + , Network.Google.Resource.DFAReporting.UserRoles.Get + , Network.Google.Resource.DFAReporting.UserRoles.Insert + , Network.Google.Resource.DFAReporting.UserRoles.List + , Network.Google.Resource.DFAReporting.UserRoles.Patch + , Network.Google.Resource.DFAReporting.UserRoles.Update + + other-modules: + Network.Google.DFAReporting.Types.Product + , Network.Google.DFAReporting.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-dfareporting/src/.gitkeep b/gogol-dfareporting/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-discovery/LICENSE b/gogol-discovery/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-discovery/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-discovery/Makefile b/gogol-discovery/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-discovery/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-discovery/README.md b/gogol-discovery/README.md new file mode 100644 index 000000000..797126e77 --- /dev/null +++ b/gogol-discovery/README.md @@ -0,0 +1,28 @@ +# gogol-discovery + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the APIs Discovery Service. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-discovery` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-discovery/Setup.hs b/gogol-discovery/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-discovery/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-discovery/gen/Network/Google/Discovery.hs b/gogol-discovery/gen/Network/Google/Discovery.hs new file mode 100644 index 000000000..e3a7ea0ae --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Discovery.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Discovery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you discover information about other Google APIs, such as what APIs +-- are available, the resource and method details for each API. +-- +-- /See:/ +module Network.Google.Discovery + ( + -- * API + DiscoveryAPI + , discoveryAPI + , discoveryURL + + -- * Service Methods + + -- * REST Resources + + -- ** DiscoveryAPIsGetRest + , module Discovery.APIs.GetRest + + -- ** DiscoveryAPIsList + , module Discovery.APIs.List + + -- * Types + + -- ** RestMethod + , RestMethod + , restMethod + , rmSupportsMediaDownload + , rmParameterOrder + , rmMediaUpload + , rmHttpMethod + , rmPath + , rmResponse + , rmSupportsMediaUpload + , rmScopes + , rmSupportsSubscription + , rmParameters + , rmId + , rmEtagRequired + , rmUseMediaDownloadService + , rmDescription + , rmRequest + + -- ** RestResource + , RestResource + , restResource + , rrResources + , rrMethods + + -- ** RestDescription + , RestDescription + , restDescription + , rdEtag + , rdSchemas + , rdServicePath + , rdBasePath + , rdKind + , rdExponentialBackoffDefault + , rdAuth + , rdIcons + , rdBaseUrl + , rdProtocol + , rdOwnerName + , rdResources + , rdOwnerDomain + , rdBatchPath + , rdMethods + , rdName + , rdPackagePath + , rdFeatures + , rdVersion + , rdParameters + , rdDocumentationLink + , rdRootUrl + , rdId + , rdCanonicalName + , rdLabels + , rdDiscoveryVersion + , rdTitle + , rdRevision + , rdDescription + + -- ** JSONSchema + , JSONSchema + , jSONSchema + , jsAnnotations + , jsVariant + , jsLocation + , jsRef + , jsPattern + , jsMaximum + , jsDefault + , jsFormat + , jsItems + , jsMinimum + , jsRequired + , jsId + , jsAdditionalProperties + , jsType + , jsEnum + , jsRepeated + , jsReadOnly + , jsEnumDescriptions + , jsDescription + , jsProperties + + -- ** DirectoryList + , DirectoryList + , directoryList + , dlKind + , dlItems + , dlDiscoveryVersion + ) where + +import Network.Google.Discovery.Types +import Network.Google.Prelude +import Network.Google.Resource.Discovery.APIs.GetRest +import Network.Google.Resource.Discovery.APIs.List + +{- $resources +TODO +-} + +type DiscoveryAPI = APIs + +discoveryAPI :: Proxy DiscoveryAPI +discoveryAPI = Proxy diff --git a/gogol-discovery/gen/Network/Google/Discovery/Types.hs b/gogol-discovery/gen/Network/Google/Discovery/Types.hs new file mode 100644 index 000000000..6863e3fd8 --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Discovery/Types.hs @@ -0,0 +1,119 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Discovery.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Discovery.Types + ( + -- * Service URL + discoveryURL + + -- * RestMethod + , RestMethod + , restMethod + , rmSupportsMediaDownload + , rmParameterOrder + , rmMediaUpload + , rmHttpMethod + , rmPath + , rmResponse + , rmSupportsMediaUpload + , rmScopes + , rmSupportsSubscription + , rmParameters + , rmId + , rmEtagRequired + , rmUseMediaDownloadService + , rmDescription + , rmRequest + + -- * RestResource + , RestResource + , restResource + , rrResources + , rrMethods + + -- * RestDescription + , RestDescription + , restDescription + , rdEtag + , rdSchemas + , rdServicePath + , rdBasePath + , rdKind + , rdExponentialBackoffDefault + , rdAuth + , rdIcons + , rdBaseUrl + , rdProtocol + , rdOwnerName + , rdResources + , rdOwnerDomain + , rdBatchPath + , rdMethods + , rdName + , rdPackagePath + , rdFeatures + , rdVersion + , rdParameters + , rdDocumentationLink + , rdRootUrl + , rdId + , rdCanonicalName + , rdLabels + , rdDiscoveryVersion + , rdTitle + , rdRevision + , rdDescription + + -- * JSONSchema + , JSONSchema + , jSONSchema + , jsAnnotations + , jsVariant + , jsLocation + , jsRef + , jsPattern + , jsMaximum + , jsDefault + , jsFormat + , jsItems + , jsMinimum + , jsRequired + , jsId + , jsAdditionalProperties + , jsType + , jsEnum + , jsRepeated + , jsReadOnly + , jsEnumDescriptions + , jsDescription + , jsProperties + + -- * DirectoryList + , DirectoryList + , directoryList + , dlKind + , dlItems + , dlDiscoveryVersion + ) where + +import Network.Google.Discovery.Types.Product +import Network.Google.Discovery.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the APIs Discovery Service. +discoveryURL :: BaseURL +discoveryURL + = BaseUrl Https + "https://www.googleapis.com/discovery/v1/" + 443 diff --git a/gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs b/gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs new file mode 100644 index 000000000..90d4fa898 --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs @@ -0,0 +1,944 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Discovery.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Discovery.Types.Product where + +import Network.Google.Discovery.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'restMethod' smart constructor. +data RestMethod = RestMethod + { _rmSupportsMediaDownload :: !(Maybe Bool) + , _rmParameterOrder :: !(Maybe [Text]) + , _rmMediaUpload :: !(Maybe RestMethodMediaUpload) + , _rmHttpMethod :: !(Maybe Text) + , _rmPath :: !(Maybe Text) + , _rmResponse :: !(Maybe RestMethodResponse) + , _rmSupportsMediaUpload :: !(Maybe Bool) + , _rmScopes :: !(Maybe [Text]) + , _rmSupportsSubscription :: !(Maybe Bool) + , _rmParameters :: !(Maybe RestMethodParameters) + , _rmId :: !(Maybe Text) + , _rmEtagRequired :: !(Maybe Bool) + , _rmUseMediaDownloadService :: !(Maybe Bool) + , _rmDescription :: !(Maybe Text) + , _rmRequest :: !(Maybe RestMethodRequest) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RestMethod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmSupportsMediaDownload' +-- +-- * 'rmParameterOrder' +-- +-- * 'rmMediaUpload' +-- +-- * 'rmHttpMethod' +-- +-- * 'rmPath' +-- +-- * 'rmResponse' +-- +-- * 'rmSupportsMediaUpload' +-- +-- * 'rmScopes' +-- +-- * 'rmSupportsSubscription' +-- +-- * 'rmParameters' +-- +-- * 'rmId' +-- +-- * 'rmEtagRequired' +-- +-- * 'rmUseMediaDownloadService' +-- +-- * 'rmDescription' +-- +-- * 'rmRequest' +restMethod + :: RestMethod +restMethod = + RestMethod + { _rmSupportsMediaDownload = Nothing + , _rmParameterOrder = Nothing + , _rmMediaUpload = Nothing + , _rmHttpMethod = Nothing + , _rmPath = Nothing + , _rmResponse = Nothing + , _rmSupportsMediaUpload = Nothing + , _rmScopes = Nothing + , _rmSupportsSubscription = Nothing + , _rmParameters = Nothing + , _rmId = Nothing + , _rmEtagRequired = Nothing + , _rmUseMediaDownloadService = Nothing + , _rmDescription = Nothing + , _rmRequest = Nothing + } + +-- | Whether this method supports media downloads. +rmSupportsMediaDownload :: Lens' RestMethod (Maybe Bool) +rmSupportsMediaDownload + = lens _rmSupportsMediaDownload + (\ s a -> s{_rmSupportsMediaDownload = a}) + +-- | Ordered list of required parameters, serves as a hint to clients on how +-- to structure their method signatures. The array is ordered such that the +-- \"most-significant\" parameter appears first. +rmParameterOrder :: Lens' RestMethod [Text] +rmParameterOrder + = lens _rmParameterOrder + (\ s a -> s{_rmParameterOrder = a}) + . _Default + . _Coerce + +-- | Media upload parameters. +rmMediaUpload :: Lens' RestMethod (Maybe RestMethodMediaUpload) +rmMediaUpload + = lens _rmMediaUpload + (\ s a -> s{_rmMediaUpload = a}) + +-- | HTTP method used by this method. +rmHttpMethod :: Lens' RestMethod (Maybe Text) +rmHttpMethod + = lens _rmHttpMethod (\ s a -> s{_rmHttpMethod = a}) + +-- | The URI path of this REST method. Should be used in conjunction with the +-- basePath property at the api-level. +rmPath :: Lens' RestMethod (Maybe Text) +rmPath = lens _rmPath (\ s a -> s{_rmPath = a}) + +-- | The schema for the response. +rmResponse :: Lens' RestMethod (Maybe RestMethodResponse) +rmResponse + = lens _rmResponse (\ s a -> s{_rmResponse = a}) + +-- | Whether this method supports media uploads. +rmSupportsMediaUpload :: Lens' RestMethod (Maybe Bool) +rmSupportsMediaUpload + = lens _rmSupportsMediaUpload + (\ s a -> s{_rmSupportsMediaUpload = a}) + +-- | OAuth 2.0 scopes applicable to this method. +rmScopes :: Lens' RestMethod [Text] +rmScopes + = lens _rmScopes (\ s a -> s{_rmScopes = a}) . + _Default + . _Coerce + +-- | Whether this method supports subscriptions. +rmSupportsSubscription :: Lens' RestMethod (Maybe Bool) +rmSupportsSubscription + = lens _rmSupportsSubscription + (\ s a -> s{_rmSupportsSubscription = a}) + +-- | Details for all parameters in this method. +rmParameters :: Lens' RestMethod (Maybe RestMethodParameters) +rmParameters + = lens _rmParameters (\ s a -> s{_rmParameters = a}) + +-- | A unique ID for this method. This property can be used to match methods +-- between different versions of Discovery. +rmId :: Lens' RestMethod (Maybe Text) +rmId = lens _rmId (\ s a -> s{_rmId = a}) + +-- | Whether this method requires an ETag to be specified. The ETag is sent +-- as an HTTP If-Match or If-None-Match header. +rmEtagRequired :: Lens' RestMethod (Maybe Bool) +rmEtagRequired + = lens _rmEtagRequired + (\ s a -> s{_rmEtagRequired = a}) + +-- | Indicates that downloads from this method should use the download +-- service URL (i.e. \"\/download\"). Only applies if the method supports +-- media download. +rmUseMediaDownloadService :: Lens' RestMethod (Maybe Bool) +rmUseMediaDownloadService + = lens _rmUseMediaDownloadService + (\ s a -> s{_rmUseMediaDownloadService = a}) + +-- | Description of this method. +rmDescription :: Lens' RestMethod (Maybe Text) +rmDescription + = lens _rmDescription + (\ s a -> s{_rmDescription = a}) + +-- | The schema for the request. +rmRequest :: Lens' RestMethod (Maybe RestMethodRequest) +rmRequest + = lens _rmRequest (\ s a -> s{_rmRequest = a}) + +instance FromJSON RestMethod where + parseJSON + = withObject "RestMethod" + (\ o -> + RestMethod <$> + (o .:? "supportsMediaDownload") <*> + (o .:? "parameterOrder" .!= mempty) + <*> (o .:? "mediaUpload") + <*> (o .:? "httpMethod") + <*> (o .:? "path") + <*> (o .:? "response") + <*> (o .:? "supportsMediaUpload") + <*> (o .:? "scopes" .!= mempty) + <*> (o .:? "supportsSubscription") + <*> (o .:? "parameters") + <*> (o .:? "id") + <*> (o .:? "etagRequired") + <*> (o .:? "useMediaDownloadService") + <*> (o .:? "description") + <*> (o .:? "request")) + +instance ToJSON RestMethod where + toJSON RestMethod{..} + = object + (catMaybes + [("supportsMediaDownload" .=) <$> + _rmSupportsMediaDownload, + ("parameterOrder" .=) <$> _rmParameterOrder, + ("mediaUpload" .=) <$> _rmMediaUpload, + ("httpMethod" .=) <$> _rmHttpMethod, + ("path" .=) <$> _rmPath, + ("response" .=) <$> _rmResponse, + ("supportsMediaUpload" .=) <$> + _rmSupportsMediaUpload, + ("scopes" .=) <$> _rmScopes, + ("supportsSubscription" .=) <$> + _rmSupportsSubscription, + ("parameters" .=) <$> _rmParameters, + ("id" .=) <$> _rmId, + ("etagRequired" .=) <$> _rmEtagRequired, + ("useMediaDownloadService" .=) <$> + _rmUseMediaDownloadService, + ("description" .=) <$> _rmDescription, + ("request" .=) <$> _rmRequest]) + +-- +-- /See:/ 'restResource' smart constructor. +data RestResource = RestResource + { _rrResources :: !(Maybe RestResourceResources) + , _rrMethods :: !(Maybe RestResourceMethods) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RestResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrResources' +-- +-- * 'rrMethods' +restResource + :: RestResource +restResource = + RestResource + { _rrResources = Nothing + , _rrMethods = Nothing + } + +-- | Sub-resources on this resource. +rrResources :: Lens' RestResource (Maybe RestResourceResources) +rrResources + = lens _rrResources (\ s a -> s{_rrResources = a}) + +-- | Methods on this resource. +rrMethods :: Lens' RestResource (Maybe RestResourceMethods) +rrMethods + = lens _rrMethods (\ s a -> s{_rrMethods = a}) + +instance FromJSON RestResource where + parseJSON + = withObject "RestResource" + (\ o -> + RestResource <$> + (o .:? "resources") <*> (o .:? "methods")) + +instance ToJSON RestResource where + toJSON RestResource{..} + = object + (catMaybes + [("resources" .=) <$> _rrResources, + ("methods" .=) <$> _rrMethods]) + +-- +-- /See:/ 'restDescription' smart constructor. +data RestDescription = RestDescription + { _rdEtag :: !(Maybe Text) + , _rdSchemas :: !(Maybe RestDescriptionSchemas) + , _rdServicePath :: !(Maybe Text) + , _rdBasePath :: !(Maybe Text) + , _rdKind :: !Text + , _rdExponentialBackoffDefault :: !(Maybe Bool) + , _rdAuth :: !(Maybe RestDescriptionAuth) + , _rdIcons :: !(Maybe RestDescriptionIcons) + , _rdBaseUrl :: !(Maybe Text) + , _rdProtocol :: !Text + , _rdOwnerName :: !(Maybe Text) + , _rdResources :: !(Maybe RestDescriptionResources) + , _rdOwnerDomain :: !(Maybe Text) + , _rdBatchPath :: !Text + , _rdMethods :: !(Maybe RestDescriptionMethods) + , _rdName :: !(Maybe Text) + , _rdPackagePath :: !(Maybe Text) + , _rdFeatures :: !(Maybe [Text]) + , _rdVersion :: !(Maybe Text) + , _rdParameters :: !(Maybe RestDescriptionParameters) + , _rdDocumentationLink :: !(Maybe Text) + , _rdRootUrl :: !(Maybe Text) + , _rdId :: !(Maybe Text) + , _rdCanonicalName :: !(Maybe Text) + , _rdLabels :: !(Maybe [Text]) + , _rdDiscoveryVersion :: !Text + , _rdTitle :: !(Maybe Text) + , _rdRevision :: !(Maybe Text) + , _rdDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RestDescription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdEtag' +-- +-- * 'rdSchemas' +-- +-- * 'rdServicePath' +-- +-- * 'rdBasePath' +-- +-- * 'rdKind' +-- +-- * 'rdExponentialBackoffDefault' +-- +-- * 'rdAuth' +-- +-- * 'rdIcons' +-- +-- * 'rdBaseUrl' +-- +-- * 'rdProtocol' +-- +-- * 'rdOwnerName' +-- +-- * 'rdResources' +-- +-- * 'rdOwnerDomain' +-- +-- * 'rdBatchPath' +-- +-- * 'rdMethods' +-- +-- * 'rdName' +-- +-- * 'rdPackagePath' +-- +-- * 'rdFeatures' +-- +-- * 'rdVersion' +-- +-- * 'rdParameters' +-- +-- * 'rdDocumentationLink' +-- +-- * 'rdRootUrl' +-- +-- * 'rdId' +-- +-- * 'rdCanonicalName' +-- +-- * 'rdLabels' +-- +-- * 'rdDiscoveryVersion' +-- +-- * 'rdTitle' +-- +-- * 'rdRevision' +-- +-- * 'rdDescription' +restDescription + :: RestDescription +restDescription = + RestDescription + { _rdEtag = Nothing + , _rdSchemas = Nothing + , _rdServicePath = Nothing + , _rdBasePath = Nothing + , _rdKind = "discovery#restDescription" + , _rdExponentialBackoffDefault = Nothing + , _rdAuth = Nothing + , _rdIcons = Nothing + , _rdBaseUrl = Nothing + , _rdProtocol = "rest" + , _rdOwnerName = Nothing + , _rdResources = Nothing + , _rdOwnerDomain = Nothing + , _rdBatchPath = "batch" + , _rdMethods = Nothing + , _rdName = Nothing + , _rdPackagePath = Nothing + , _rdFeatures = Nothing + , _rdVersion = Nothing + , _rdParameters = Nothing + , _rdDocumentationLink = Nothing + , _rdRootUrl = Nothing + , _rdId = Nothing + , _rdCanonicalName = Nothing + , _rdLabels = Nothing + , _rdDiscoveryVersion = "v1" + , _rdTitle = Nothing + , _rdRevision = Nothing + , _rdDescription = Nothing + } + +-- | The ETag for this response. +rdEtag :: Lens' RestDescription (Maybe Text) +rdEtag = lens _rdEtag (\ s a -> s{_rdEtag = a}) + +-- | The schemas for this API. +rdSchemas :: Lens' RestDescription (Maybe RestDescriptionSchemas) +rdSchemas + = lens _rdSchemas (\ s a -> s{_rdSchemas = a}) + +-- | The base path for all REST requests. +rdServicePath :: Lens' RestDescription (Maybe Text) +rdServicePath + = lens _rdServicePath + (\ s a -> s{_rdServicePath = a}) + +-- | [DEPRECATED] The base path for REST requests. +rdBasePath :: Lens' RestDescription (Maybe Text) +rdBasePath + = lens _rdBasePath (\ s a -> s{_rdBasePath = a}) + +-- | The kind for this response. +rdKind :: Lens' RestDescription Text +rdKind = lens _rdKind (\ s a -> s{_rdKind = a}) + +-- | Enable exponential backoff for suitable methods in the generated +-- clients. +rdExponentialBackoffDefault :: Lens' RestDescription (Maybe Bool) +rdExponentialBackoffDefault + = lens _rdExponentialBackoffDefault + (\ s a -> s{_rdExponentialBackoffDefault = a}) + +-- | Authentication information. +rdAuth :: Lens' RestDescription (Maybe RestDescriptionAuth) +rdAuth = lens _rdAuth (\ s a -> s{_rdAuth = a}) + +-- | Links to 16x16 and 32x32 icons representing the API. +rdIcons :: Lens' RestDescription (Maybe RestDescriptionIcons) +rdIcons = lens _rdIcons (\ s a -> s{_rdIcons = a}) + +-- | [DEPRECATED] The base URL for REST requests. +rdBaseUrl :: Lens' RestDescription (Maybe Text) +rdBaseUrl + = lens _rdBaseUrl (\ s a -> s{_rdBaseUrl = a}) + +-- | The protocol described by this document. +rdProtocol :: Lens' RestDescription Text +rdProtocol + = lens _rdProtocol (\ s a -> s{_rdProtocol = a}) + +-- | The name of the owner of this API. See ownerDomain. +rdOwnerName :: Lens' RestDescription (Maybe Text) +rdOwnerName + = lens _rdOwnerName (\ s a -> s{_rdOwnerName = a}) + +-- | The resources in this API. +rdResources :: Lens' RestDescription (Maybe RestDescriptionResources) +rdResources + = lens _rdResources (\ s a -> s{_rdResources = a}) + +-- | The domain of the owner of this API. Together with the ownerName and a +-- packagePath values, this can be used to generate a library for this API +-- which would have a unique fully qualified name. +rdOwnerDomain :: Lens' RestDescription (Maybe Text) +rdOwnerDomain + = lens _rdOwnerDomain + (\ s a -> s{_rdOwnerDomain = a}) + +-- | The path for REST batch requests. +rdBatchPath :: Lens' RestDescription Text +rdBatchPath + = lens _rdBatchPath (\ s a -> s{_rdBatchPath = a}) + +-- | API-level methods for this API. +rdMethods :: Lens' RestDescription (Maybe RestDescriptionMethods) +rdMethods + = lens _rdMethods (\ s a -> s{_rdMethods = a}) + +-- | The name of this API. +rdName :: Lens' RestDescription (Maybe Text) +rdName = lens _rdName (\ s a -> s{_rdName = a}) + +-- | The package of the owner of this API. See ownerDomain. +rdPackagePath :: Lens' RestDescription (Maybe Text) +rdPackagePath + = lens _rdPackagePath + (\ s a -> s{_rdPackagePath = a}) + +-- | A list of supported features for this API. +rdFeatures :: Lens' RestDescription [Text] +rdFeatures + = lens _rdFeatures (\ s a -> s{_rdFeatures = a}) . + _Default + . _Coerce + +-- | The version of this API. +rdVersion :: Lens' RestDescription (Maybe Text) +rdVersion + = lens _rdVersion (\ s a -> s{_rdVersion = a}) + +-- | Common parameters that apply across all apis. +rdParameters :: Lens' RestDescription (Maybe RestDescriptionParameters) +rdParameters + = lens _rdParameters (\ s a -> s{_rdParameters = a}) + +-- | A link to human readable documentation for the API. +rdDocumentationLink :: Lens' RestDescription (Maybe Text) +rdDocumentationLink + = lens _rdDocumentationLink + (\ s a -> s{_rdDocumentationLink = a}) + +-- | The root URL under which all API services live. +rdRootUrl :: Lens' RestDescription (Maybe Text) +rdRootUrl + = lens _rdRootUrl (\ s a -> s{_rdRootUrl = a}) + +-- | The ID of this API. +rdId :: Lens' RestDescription (Maybe Text) +rdId = lens _rdId (\ s a -> s{_rdId = a}) + +-- | Indicates how the API name should be capitalized and split into various +-- parts. Useful for generating pretty class names. +rdCanonicalName :: Lens' RestDescription (Maybe Text) +rdCanonicalName + = lens _rdCanonicalName + (\ s a -> s{_rdCanonicalName = a}) + +-- | Labels for the status of this API, such as labs or deprecated. +rdLabels :: Lens' RestDescription [Text] +rdLabels + = lens _rdLabels (\ s a -> s{_rdLabels = a}) . + _Default + . _Coerce + +-- | Indicate the version of the Discovery API used to generate this doc. +rdDiscoveryVersion :: Lens' RestDescription Text +rdDiscoveryVersion + = lens _rdDiscoveryVersion + (\ s a -> s{_rdDiscoveryVersion = a}) + +-- | The title of this API. +rdTitle :: Lens' RestDescription (Maybe Text) +rdTitle = lens _rdTitle (\ s a -> s{_rdTitle = a}) + +-- | The version of this API. +rdRevision :: Lens' RestDescription (Maybe Text) +rdRevision + = lens _rdRevision (\ s a -> s{_rdRevision = a}) + +-- | The description of this API. +rdDescription :: Lens' RestDescription (Maybe Text) +rdDescription + = lens _rdDescription + (\ s a -> s{_rdDescription = a}) + +instance FromJSON RestDescription where + parseJSON + = withObject "RestDescription" + (\ o -> + RestDescription <$> + (o .:? "etag") <*> (o .:? "schemas") <*> + (o .:? "servicePath") + <*> (o .:? "basePath") + <*> (o .:? "kind" .!= "discovery#restDescription") + <*> (o .:? "exponentialBackoffDefault") + <*> (o .:? "auth") + <*> (o .:? "icons") + <*> (o .:? "baseUrl") + <*> (o .:? "protocol" .!= "rest") + <*> (o .:? "ownerName") + <*> (o .:? "resources") + <*> (o .:? "ownerDomain") + <*> (o .:? "batchPath" .!= "batch") + <*> (o .:? "methods") + <*> (o .:? "name") + <*> (o .:? "packagePath") + <*> (o .:? "features" .!= mempty) + <*> (o .:? "version") + <*> (o .:? "parameters") + <*> (o .:? "documentationLink") + <*> (o .:? "rootUrl") + <*> (o .:? "id") + <*> (o .:? "canonicalName") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "discoveryVersion" .!= "v1") + <*> (o .:? "title") + <*> (o .:? "revision") + <*> (o .:? "description")) + +instance ToJSON RestDescription where + toJSON RestDescription{..} + = object + (catMaybes + [("etag" .=) <$> _rdEtag, + ("schemas" .=) <$> _rdSchemas, + ("servicePath" .=) <$> _rdServicePath, + ("basePath" .=) <$> _rdBasePath, + Just ("kind" .= _rdKind), + ("exponentialBackoffDefault" .=) <$> + _rdExponentialBackoffDefault, + ("auth" .=) <$> _rdAuth, ("icons" .=) <$> _rdIcons, + ("baseUrl" .=) <$> _rdBaseUrl, + Just ("protocol" .= _rdProtocol), + ("ownerName" .=) <$> _rdOwnerName, + ("resources" .=) <$> _rdResources, + ("ownerDomain" .=) <$> _rdOwnerDomain, + Just ("batchPath" .= _rdBatchPath), + ("methods" .=) <$> _rdMethods, + ("name" .=) <$> _rdName, + ("packagePath" .=) <$> _rdPackagePath, + ("features" .=) <$> _rdFeatures, + ("version" .=) <$> _rdVersion, + ("parameters" .=) <$> _rdParameters, + ("documentationLink" .=) <$> _rdDocumentationLink, + ("rootUrl" .=) <$> _rdRootUrl, ("id" .=) <$> _rdId, + ("canonicalName" .=) <$> _rdCanonicalName, + ("labels" .=) <$> _rdLabels, + Just ("discoveryVersion" .= _rdDiscoveryVersion), + ("title" .=) <$> _rdTitle, + ("revision" .=) <$> _rdRevision, + ("description" .=) <$> _rdDescription]) + +-- +-- /See:/ 'jSONSchema' smart constructor. +data JSONSchema = JSONSchema + { _jsAnnotations :: !(Maybe JSONSchemaAnnotations) + , _jsVariant :: !(Maybe JSONSchemaVariant) + , _jsLocation :: !(Maybe Text) + , _jsRef :: !(Maybe Text) + , _jsPattern :: !(Maybe Text) + , _jsMaximum :: !(Maybe Text) + , _jsDefault :: !(Maybe Text) + , _jsFormat :: !(Maybe Text) + , _jsItems :: !(Maybe (Maybe JSONSchema)) + , _jsMinimum :: !(Maybe Text) + , _jsRequired :: !(Maybe Bool) + , _jsId :: !(Maybe Text) + , _jsAdditionalProperties :: !(Maybe (Maybe JSONSchema)) + , _jsType :: !(Maybe Text) + , _jsEnum :: !(Maybe [Text]) + , _jsRepeated :: !(Maybe Bool) + , _jsReadOnly :: !(Maybe Bool) + , _jsEnumDescriptions :: !(Maybe [Text]) + , _jsDescription :: !(Maybe Text) + , _jsProperties :: !(Maybe JSONSchemaProperties) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JSONSchema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsAnnotations' +-- +-- * 'jsVariant' +-- +-- * 'jsLocation' +-- +-- * 'jsRef' +-- +-- * 'jsPattern' +-- +-- * 'jsMaximum' +-- +-- * 'jsDefault' +-- +-- * 'jsFormat' +-- +-- * 'jsItems' +-- +-- * 'jsMinimum' +-- +-- * 'jsRequired' +-- +-- * 'jsId' +-- +-- * 'jsAdditionalProperties' +-- +-- * 'jsType' +-- +-- * 'jsEnum' +-- +-- * 'jsRepeated' +-- +-- * 'jsReadOnly' +-- +-- * 'jsEnumDescriptions' +-- +-- * 'jsDescription' +-- +-- * 'jsProperties' +jSONSchema + :: JSONSchema +jSONSchema = + JSONSchema + { _jsAnnotations = Nothing + , _jsVariant = Nothing + , _jsLocation = Nothing + , _jsRef = Nothing + , _jsPattern = Nothing + , _jsMaximum = Nothing + , _jsDefault = Nothing + , _jsFormat = Nothing + , _jsItems = Nothing + , _jsMinimum = Nothing + , _jsRequired = Nothing + , _jsId = Nothing + , _jsAdditionalProperties = Nothing + , _jsType = Nothing + , _jsEnum = Nothing + , _jsRepeated = Nothing + , _jsReadOnly = Nothing + , _jsEnumDescriptions = Nothing + , _jsDescription = Nothing + , _jsProperties = Nothing + } + +-- | Additional information about this property. +jsAnnotations :: Lens' JSONSchema (Maybe JSONSchemaAnnotations) +jsAnnotations + = lens _jsAnnotations + (\ s a -> s{_jsAnnotations = a}) + +-- | In a variant data type, the value of one property is used to determine +-- how to interpret the entire entity. Its value must exist in a map of +-- descriminant values to schema names. +jsVariant :: Lens' JSONSchema (Maybe JSONSchemaVariant) +jsVariant + = lens _jsVariant (\ s a -> s{_jsVariant = a}) + +-- | Whether this parameter goes in the query or the path for REST requests. +jsLocation :: Lens' JSONSchema (Maybe Text) +jsLocation + = lens _jsLocation (\ s a -> s{_jsLocation = a}) + +-- | A reference to another schema. The value of this property is the \"id\" +-- of another schema. +jsRef :: Lens' JSONSchema (Maybe Text) +jsRef = lens _jsRef (\ s a -> s{_jsRef = a}) + +-- | The regular expression this parameter must conform to. Uses Java 6 regex +-- format: +-- http:\/\/docs.oracle.com\/javase\/6\/docs\/api\/java\/util\/regex\/Pattern.html +jsPattern :: Lens' JSONSchema (Maybe Text) +jsPattern + = lens _jsPattern (\ s a -> s{_jsPattern = a}) + +-- | The maximum value of this parameter. +jsMaximum :: Lens' JSONSchema (Maybe Text) +jsMaximum + = lens _jsMaximum (\ s a -> s{_jsMaximum = a}) + +-- | The default value of this property (if one exists). +jsDefault :: Lens' JSONSchema (Maybe Text) +jsDefault + = lens _jsDefault (\ s a -> s{_jsDefault = a}) + +-- | An additional regular expression or key that helps constrain the value. +-- For more details see: +-- http:\/\/tools.ietf.org\/html\/draft-zyp-json-schema-03#section-5.23 +jsFormat :: Lens' JSONSchema (Maybe Text) +jsFormat = lens _jsFormat (\ s a -> s{_jsFormat = a}) + +-- | If this is a schema for an array, this property is the schema for each +-- element in the array. +jsItems :: Lens' JSONSchema (Maybe (Maybe JSONSchema)) +jsItems = lens _jsItems (\ s a -> s{_jsItems = a}) + +-- | The minimum value of this parameter. +jsMinimum :: Lens' JSONSchema (Maybe Text) +jsMinimum + = lens _jsMinimum (\ s a -> s{_jsMinimum = a}) + +-- | Whether the parameter is required. +jsRequired :: Lens' JSONSchema (Maybe Bool) +jsRequired + = lens _jsRequired (\ s a -> s{_jsRequired = a}) + +-- | Unique identifier for this schema. +jsId :: Lens' JSONSchema (Maybe Text) +jsId = lens _jsId (\ s a -> s{_jsId = a}) + +-- | If this is a schema for an object, this property is the schema for any +-- additional properties with dynamic keys on this object. +jsAdditionalProperties :: Lens' JSONSchema (Maybe (Maybe JSONSchema)) +jsAdditionalProperties + = lens _jsAdditionalProperties + (\ s a -> s{_jsAdditionalProperties = a}) + +-- | The value type for this schema. A list of values can be found here: +-- http:\/\/tools.ietf.org\/html\/draft-zyp-json-schema-03#section-5.1 +jsType :: Lens' JSONSchema (Maybe Text) +jsType = lens _jsType (\ s a -> s{_jsType = a}) + +-- | Values this parameter may take (if it is an enum). +jsEnum :: Lens' JSONSchema [Text] +jsEnum + = lens _jsEnum (\ s a -> s{_jsEnum = a}) . _Default . + _Coerce + +-- | Whether this parameter may appear multiple times. +jsRepeated :: Lens' JSONSchema (Maybe Bool) +jsRepeated + = lens _jsRepeated (\ s a -> s{_jsRepeated = a}) + +-- | The value is read-only, generated by the service. The value cannot be +-- modified by the client. If the value is included in a POST, PUT, or +-- PATCH request, it is ignored by the service. +jsReadOnly :: Lens' JSONSchema (Maybe Bool) +jsReadOnly + = lens _jsReadOnly (\ s a -> s{_jsReadOnly = a}) + +-- | The descriptions for the enums. Each position maps to the corresponding +-- value in the \"enum\" array. +jsEnumDescriptions :: Lens' JSONSchema [Text] +jsEnumDescriptions + = lens _jsEnumDescriptions + (\ s a -> s{_jsEnumDescriptions = a}) + . _Default + . _Coerce + +-- | A description of this object. +jsDescription :: Lens' JSONSchema (Maybe Text) +jsDescription + = lens _jsDescription + (\ s a -> s{_jsDescription = a}) + +-- | If this is a schema for an object, list the schema for each property of +-- this object. +jsProperties :: Lens' JSONSchema (Maybe JSONSchemaProperties) +jsProperties + = lens _jsProperties (\ s a -> s{_jsProperties = a}) + +instance FromJSON JSONSchema where + parseJSON + = withObject "JSONSchema" + (\ o -> + JSONSchema <$> + (o .:? "annotations") <*> (o .:? "variant") <*> + (o .:? "location") + <*> (o .:? "$ref") + <*> (o .:? "pattern") + <*> (o .:? "maximum") + <*> (o .:? "default") + <*> (o .:? "format") + <*> (o .:? "items") + <*> (o .:? "minimum") + <*> (o .:? "required") + <*> (o .:? "id") + <*> (o .:? "additionalProperties") + <*> (o .:? "type") + <*> (o .:? "enum" .!= mempty) + <*> (o .:? "repeated") + <*> (o .:? "readOnly") + <*> (o .:? "enumDescriptions" .!= mempty) + <*> (o .:? "description") + <*> (o .:? "properties")) + +instance ToJSON JSONSchema where + toJSON JSONSchema{..} + = object + (catMaybes + [("annotations" .=) <$> _jsAnnotations, + ("variant" .=) <$> _jsVariant, + ("location" .=) <$> _jsLocation, + ("$ref" .=) <$> _jsRef, + ("pattern" .=) <$> _jsPattern, + ("maximum" .=) <$> _jsMaximum, + ("default" .=) <$> _jsDefault, + ("format" .=) <$> _jsFormat, + ("items" .=) <$> _jsItems, + ("minimum" .=) <$> _jsMinimum, + ("required" .=) <$> _jsRequired, ("id" .=) <$> _jsId, + ("additionalProperties" .=) <$> + _jsAdditionalProperties, + ("type" .=) <$> _jsType, ("enum" .=) <$> _jsEnum, + ("repeated" .=) <$> _jsRepeated, + ("readOnly" .=) <$> _jsReadOnly, + ("enumDescriptions" .=) <$> _jsEnumDescriptions, + ("description" .=) <$> _jsDescription, + ("properties" .=) <$> _jsProperties]) + +-- +-- /See:/ 'directoryList' smart constructor. +data DirectoryList = DirectoryList + { _dlKind :: !Text + , _dlItems :: !(Maybe [DirectoryListItemsItem]) + , _dlDiscoveryVersion :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DirectoryList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlKind' +-- +-- * 'dlItems' +-- +-- * 'dlDiscoveryVersion' +directoryList + :: DirectoryList +directoryList = + DirectoryList + { _dlKind = "discovery#directoryList" + , _dlItems = Nothing + , _dlDiscoveryVersion = "v1" + } + +-- | The kind for this response. +dlKind :: Lens' DirectoryList Text +dlKind = lens _dlKind (\ s a -> s{_dlKind = a}) + +-- | The individual directory entries. One entry per api\/version pair. +dlItems :: Lens' DirectoryList [DirectoryListItemsItem] +dlItems + = lens _dlItems (\ s a -> s{_dlItems = a}) . _Default + . _Coerce + +-- | Indicate the version of the Discovery API used to generate this doc. +dlDiscoveryVersion :: Lens' DirectoryList Text +dlDiscoveryVersion + = lens _dlDiscoveryVersion + (\ s a -> s{_dlDiscoveryVersion = a}) + +instance FromJSON DirectoryList where + parseJSON + = withObject "DirectoryList" + (\ o -> + DirectoryList <$> + (o .:? "kind" .!= "discovery#directoryList") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "discoveryVersion" .!= "v1")) + +instance ToJSON DirectoryList where + toJSON DirectoryList{..} + = object + (catMaybes + [Just ("kind" .= _dlKind), ("items" .=) <$> _dlItems, + Just ("discoveryVersion" .= _dlDiscoveryVersion)]) diff --git a/gogol-discovery/gen/Network/Google/Discovery/Types/Sum.hs b/gogol-discovery/gen/Network/Google/Discovery/Types/Sum.hs new file mode 100644 index 000000000..28962ba9f --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Discovery/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Discovery.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Discovery.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/GetRest.hs b/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/GetRest.hs new file mode 100644 index 000000000..08348434d --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/GetRest.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Discovery.APIs.GetRest +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve the description of a particular version of an api. +-- +-- /See:/ for @DiscoveryAPIsGetRest@. +module Discovery.APIs.GetRest + ( + -- * REST Resource + ApisGetRestAPI + + -- * Creating a Request + , aPIsGetRest + , APIsGetRest + + -- * Request Lenses + , agrQuotaUser + , agrPrettyPrint + , agrUserIp + , agrKey + , agrVersion + , agrApi + , agrOauthToken + , agrFields + , agrAlt + ) where + +import Network.Google.Discovery.Types +import Network.Google.Prelude + +-- | A resource alias for @DiscoveryAPIsGetRest@ which the +-- 'APIsGetRest' request conforms to. +type ApisGetRestAPI = + "apis" :> + Capture "api" Text :> + Capture "version" Text :> + "rest" :> Get '[JSON] RestDescription + +-- | Retrieve the description of a particular version of an api. +-- +-- /See:/ 'aPIsGetRest' smart constructor. +data APIsGetRest = APIsGetRest + { _agrQuotaUser :: !(Maybe Text) + , _agrPrettyPrint :: !Bool + , _agrUserIp :: !(Maybe Text) + , _agrKey :: !(Maybe Text) + , _agrVersion :: !Text + , _agrApi :: !Text + , _agrOauthToken :: !(Maybe Text) + , _agrFields :: !(Maybe Text) + , _agrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIsGetRest'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agrQuotaUser' +-- +-- * 'agrPrettyPrint' +-- +-- * 'agrUserIp' +-- +-- * 'agrKey' +-- +-- * 'agrVersion' +-- +-- * 'agrApi' +-- +-- * 'agrOauthToken' +-- +-- * 'agrFields' +-- +-- * 'agrAlt' +aPIsGetRest + :: Text -- ^ 'version' + -> Text -- ^ 'api' + -> APIsGetRest +aPIsGetRest pAgrVersion_ pAgrApi_ = + APIsGetRest + { _agrQuotaUser = Nothing + , _agrPrettyPrint = True + , _agrUserIp = Nothing + , _agrKey = Nothing + , _agrVersion = pAgrVersion_ + , _agrApi = pAgrApi_ + , _agrOauthToken = Nothing + , _agrFields = Nothing + , _agrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agrQuotaUser :: Lens' APIsGetRest' (Maybe Text) +agrQuotaUser + = lens _agrQuotaUser (\ s a -> s{_agrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agrPrettyPrint :: Lens' APIsGetRest' Bool +agrPrettyPrint + = lens _agrPrettyPrint + (\ s a -> s{_agrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agrUserIp :: Lens' APIsGetRest' (Maybe Text) +agrUserIp + = lens _agrUserIp (\ s a -> s{_agrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agrKey :: Lens' APIsGetRest' (Maybe Text) +agrKey = lens _agrKey (\ s a -> s{_agrKey = a}) + +-- | The version of the API. +agrVersion :: Lens' APIsGetRest' Text +agrVersion + = lens _agrVersion (\ s a -> s{_agrVersion = a}) + +-- | The name of the API. +agrApi :: Lens' APIsGetRest' Text +agrApi = lens _agrApi (\ s a -> s{_agrApi = a}) + +-- | OAuth 2.0 token for the current user. +agrOauthToken :: Lens' APIsGetRest' (Maybe Text) +agrOauthToken + = lens _agrOauthToken + (\ s a -> s{_agrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agrFields :: Lens' APIsGetRest' (Maybe Text) +agrFields + = lens _agrFields (\ s a -> s{_agrFields = a}) + +-- | Data format for the response. +agrAlt :: Lens' APIsGetRest' Text +agrAlt = lens _agrAlt (\ s a -> s{_agrAlt = a}) + +instance GoogleRequest APIsGetRest' where + type Rs APIsGetRest' = RestDescription + request = requestWithRoute defReq discoveryURL + requestWithRoute r u APIsGetRest{..} + = go _agrQuotaUser _agrPrettyPrint _agrUserIp _agrKey + _agrVersion + _agrApi + _agrOauthToken + _agrFields + _agrAlt + where go + = clientWithRoute (Proxy :: Proxy ApisGetRestAPI) r u diff --git a/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/List.hs b/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/List.hs new file mode 100644 index 000000000..607bd4a1b --- /dev/null +++ b/gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Discovery.APIs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve the list of APIs supported at this endpoint. +-- +-- /See:/ for @DiscoveryAPIsList@. +module Discovery.APIs.List + ( + -- * REST Resource + ApisListAPI + + -- * Creating a Request + , aPIsList + , APIsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alPreferred + , alUserIp + , alKey + , alName + , alOauthToken + , alFields + , alAlt + ) where + +import Network.Google.Discovery.Types +import Network.Google.Prelude + +-- | A resource alias for @DiscoveryAPIsList@ which the +-- 'APIsList' request conforms to. +type ApisListAPI = + "apis" :> + QueryParam "preferred" Bool :> + QueryParam "name" Text :> Get '[JSON] DirectoryList + +-- | Retrieve the list of APIs supported at this endpoint. +-- +-- /See:/ 'aPIsList' smart constructor. +data APIsList = APIsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alPreferred :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alName :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alPreferred' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alName' +-- +-- * 'alOauthToken' +-- +-- * 'alFields' +-- +-- * 'alAlt' +aPIsList + :: APIsList +aPIsList = + APIsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alPreferred = False + , _alUserIp = Nothing + , _alKey = Nothing + , _alName = Nothing + , _alOauthToken = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' APIsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' APIsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Return only the preferred version of an API. +alPreferred :: Lens' APIsList' Bool +alPreferred + = lens _alPreferred (\ s a -> s{_alPreferred = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' APIsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' APIsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | Only include APIs with the given name. +alName :: Lens' APIsList' (Maybe Text) +alName = lens _alName (\ s a -> s{_alName = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' APIsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' APIsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' APIsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest APIsList' where + type Rs APIsList' = DirectoryList + request = requestWithRoute defReq discoveryURL + requestWithRoute r u APIsList{..} + = go _alQuotaUser _alPrettyPrint (Just _alPreferred) + _alUserIp + _alKey + _alName + _alOauthToken + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ApisListAPI) r u diff --git a/gogol-discovery/gogol-discovery.cabal b/gogol-discovery/gogol-discovery.cabal new file mode 100644 index 000000000..db4b2683f --- /dev/null +++ b/gogol-discovery/gogol-discovery.cabal @@ -0,0 +1,45 @@ +name: gogol-discovery +version: 0.0.1 +synopsis: APIs Discovery Service Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you discover information about other Google APIs, such as what APIs + are available, the resource and method details for each API. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Discovery + , Network.Google.Discovery.Types + , Network.Google.Resource.Discovery.APIs.GetRest + , Network.Google.Resource.Discovery.APIs.List + + other-modules: + Network.Google.Discovery.Types.Product + , Network.Google.Discovery.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-discovery/src/.gitkeep b/gogol-discovery/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-dns/LICENSE b/gogol-dns/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-dns/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-dns/Makefile b/gogol-dns/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-dns/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-dns/README.md b/gogol-dns/README.md new file mode 100644 index 000000000..d17fdf4df --- /dev/null +++ b/gogol-dns/README.md @@ -0,0 +1,28 @@ +# gogol-dns + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud DNS API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-dns` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-dns/Setup.hs b/gogol-dns/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-dns/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-dns/gen/Network/Google/DNS.hs b/gogol-dns/gen/Network/Google/DNS.hs new file mode 100644 index 000000000..c77d13e6f --- /dev/null +++ b/gogol-dns/gen/Network/Google/DNS.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.DNS +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Cloud DNS API provides services for configuring and serving +-- authoritative DNS records. +-- +-- /See:/ +module Network.Google.DNS + ( + -- * API + DNSAPI + , dNSAPI + , dNSURL + + -- * Service Methods + + -- * REST Resources + + -- ** DNSChangesCreate + , module DNS.Changes.Create + + -- ** DNSChangesGet + , module DNS.Changes.Get + + -- ** DNSChangesList + , module DNS.Changes.List + + -- ** DNSManagedZonesCreate + , module DNS.ManagedZones.Create + + -- ** DNSManagedZonesDelete + , module DNS.ManagedZones.Delete + + -- ** DNSManagedZonesGet + , module DNS.ManagedZones.Get + + -- ** DNSManagedZonesList + , module DNS.ManagedZones.List + + -- ** DNSProjectsGet + , module DNS.Projects.Get + + -- ** DNSResourceRecordSetsList + , module DNS.ResourceRecordSets.List + + -- * Types + + -- ** ChangesListResponse + , ChangesListResponse + , changesListResponse + , clrNextPageToken + , clrChanges + , clrKind + + -- ** Project + , Project + , project + , pKind + , pId + , pNumber + , pQuota + + -- ** Change + , Change + , change + , cStatus + , cAdditions + , cStartTime + , cKind + , cDeletions + , cId + + -- ** ResourceRecordSetsListResponse + , ResourceRecordSetsListResponse + , resourceRecordSetsListResponse + , rrslrNextPageToken + , rrslrKind + , rrslrRrsets + + -- ** ResourceRecordSet + , ResourceRecordSet + , resourceRecordSet + , rrsTtl + , rrsKind + , rrsName + , rrsType + , rrsRrdatas + + -- ** ManagedZone + , ManagedZone + , managedZone + , mzCreationTime + , mzKind + , mzNameServerSet + , mzName + , mzId + , mzDnsName + , mzDescription + , mzNameServers + + -- ** Quota + , Quota + , quota + , qRrsetDeletionsPerChange + , qRrsetsPerManagedZone + , qKind + , qResourceRecordsPerRrset + , qRrsetAdditionsPerChange + , qManagedZones + , qTotalRrdataSizePerChange + + -- ** ManagedZonesListResponse + , ManagedZonesListResponse + , managedZonesListResponse + , mzlrNextPageToken + , mzlrKind + , mzlrManagedZones + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude +import Network.Google.Resource.DNS.Changes.Create +import Network.Google.Resource.DNS.Changes.Get +import Network.Google.Resource.DNS.Changes.List +import Network.Google.Resource.DNS.ManagedZones.Create +import Network.Google.Resource.DNS.ManagedZones.Delete +import Network.Google.Resource.DNS.ManagedZones.Get +import Network.Google.Resource.DNS.ManagedZones.List +import Network.Google.Resource.DNS.Projects.Get +import Network.Google.Resource.DNS.ResourceRecordSets.List + +{- $resources +TODO +-} + +type DNSAPI = + Changes :<|> ResourceRecordSets :<|> ManagedZones + :<|> Projects + +dNSAPI :: Proxy DNSAPI +dNSAPI = Proxy diff --git a/gogol-dns/gen/Network/Google/DNS/Types.hs b/gogol-dns/gen/Network/Google/DNS/Types.hs new file mode 100644 index 000000000..228bc0af6 --- /dev/null +++ b/gogol-dns/gen/Network/Google/DNS/Types.hs @@ -0,0 +1,101 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DNS.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DNS.Types + ( + -- * Service URL + dNSURL + + -- * ChangesListResponse + , ChangesListResponse + , changesListResponse + , clrNextPageToken + , clrChanges + , clrKind + + -- * Project + , Project + , project + , pKind + , pId + , pNumber + , pQuota + + -- * Change + , Change + , change + , cStatus + , cAdditions + , cStartTime + , cKind + , cDeletions + , cId + + -- * ResourceRecordSetsListResponse + , ResourceRecordSetsListResponse + , resourceRecordSetsListResponse + , rrslrNextPageToken + , rrslrKind + , rrslrRrsets + + -- * ResourceRecordSet + , ResourceRecordSet + , resourceRecordSet + , rrsTtl + , rrsKind + , rrsName + , rrsType + , rrsRrdatas + + -- * ManagedZone + , ManagedZone + , managedZone + , mzCreationTime + , mzKind + , mzNameServerSet + , mzName + , mzId + , mzDnsName + , mzDescription + , mzNameServers + + -- * Quota + , Quota + , quota + , qRrsetDeletionsPerChange + , qRrsetsPerManagedZone + , qKind + , qResourceRecordsPerRrset + , qRrsetAdditionsPerChange + , qManagedZones + , qTotalRrdataSizePerChange + + -- * ManagedZonesListResponse + , ManagedZonesListResponse + , managedZonesListResponse + , mzlrNextPageToken + , mzlrKind + , mzlrManagedZones + ) where + +import Network.Google.DNS.Types.Product +import Network.Google.DNS.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta1' of the Google Cloud DNS API. +dNSURL :: BaseURL +dNSURL + = BaseUrl Https + "https://www.googleapis.com/dns/v1beta1/projects/" + 443 diff --git a/gogol-dns/gen/Network/Google/DNS/Types/Product.hs b/gogol-dns/gen/Network/Google/DNS/Types/Product.hs new file mode 100644 index 000000000..d93a5aef7 --- /dev/null +++ b/gogol-dns/gen/Network/Google/DNS/Types/Product.hs @@ -0,0 +1,716 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DNS.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DNS.Types.Product where + +import Network.Google.DNS.Types.Sum +import Network.Google.Prelude + +-- | The response to a request to enumerate Changes to a ResourceRecordSets +-- collection. +-- +-- /See:/ 'changesListResponse' smart constructor. +data ChangesListResponse = ChangesListResponse + { _clrNextPageToken :: !(Maybe Text) + , _clrChanges :: !(Maybe [Maybe Change]) + , _clrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrNextPageToken' +-- +-- * 'clrChanges' +-- +-- * 'clrKind' +changesListResponse + :: ChangesListResponse +changesListResponse = + ChangesListResponse + { _clrNextPageToken = Nothing + , _clrChanges = Nothing + , _clrKind = "dns#changesListResponse" + } + +-- | The presence of this field indicates that there exist more results +-- following your last page of results in pagination order. To fetch them, +-- make another list request using this value as your pagination token. In +-- this way you can retrieve the complete contents of even very large +-- collections one page at a time. However, if the contents of the +-- collection change between the first and last paginated list request, the +-- set of all elements returned will be an inconsistent view of the +-- collection. There is no way to retrieve a \"snapshot\" of collections +-- larger than the maximum page size. +clrNextPageToken :: Lens' ChangesListResponse (Maybe Text) +clrNextPageToken + = lens _clrNextPageToken + (\ s a -> s{_clrNextPageToken = a}) + +-- | The requested changes. +clrChanges :: Lens' ChangesListResponse [Maybe Change] +clrChanges + = lens _clrChanges (\ s a -> s{_clrChanges = a}) . + _Default + . _Coerce + +-- | Type of resource. +clrKind :: Lens' ChangesListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +instance FromJSON ChangesListResponse where + parseJSON + = withObject "ChangesListResponse" + (\ o -> + ChangesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "changes" .!= mempty) + <*> (o .:? "kind" .!= "dns#changesListResponse")) + +instance ToJSON ChangesListResponse where + toJSON ChangesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _clrNextPageToken, + ("changes" .=) <$> _clrChanges, + Just ("kind" .= _clrKind)]) + +-- | A project resource. The project is a top level container for resources +-- including Cloud DNS ManagedZones. Projects can be created only in the +-- APIs console. +-- +-- /See:/ 'project' smart constructor. +data Project = Project + { _pKind :: !Text + , _pId :: !(Maybe Text) + , _pNumber :: !(Maybe Word64) + , _pQuota :: !(Maybe (Maybe Quota)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Project' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKind' +-- +-- * 'pId' +-- +-- * 'pNumber' +-- +-- * 'pQuota' +project + :: Project +project = + Project + { _pKind = "dns#project" + , _pId = Nothing + , _pNumber = Nothing + , _pQuota = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dns#project\". +pKind :: Lens' Project Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | User assigned unique identifier for the resource (output only). +pId :: Lens' Project (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | Unique numeric identifier for the resource; defined by the server +-- (output only). +pNumber :: Lens' Project (Maybe Word64) +pNumber = lens _pNumber (\ s a -> s{_pNumber = a}) + +-- | Quotas assigned to this project (output only). +pQuota :: Lens' Project (Maybe (Maybe Quota)) +pQuota = lens _pQuota (\ s a -> s{_pQuota = a}) + +instance FromJSON Project where + parseJSON + = withObject "Project" + (\ o -> + Project <$> + (o .:? "kind" .!= "dns#project") <*> (o .:? "id") <*> + (o .:? "number") + <*> (o .:? "quota")) + +instance ToJSON Project where + toJSON Project{..} + = object + (catMaybes + [Just ("kind" .= _pKind), ("id" .=) <$> _pId, + ("number" .=) <$> _pNumber, + ("quota" .=) <$> _pQuota]) + +-- | An atomic update to a collection of ResourceRecordSets. +-- +-- /See:/ 'change' smart constructor. +data Change = Change + { _cStatus :: !(Maybe Text) + , _cAdditions :: !(Maybe [Maybe ResourceRecordSet]) + , _cStartTime :: !(Maybe Text) + , _cKind :: !Text + , _cDeletions :: !(Maybe [Maybe ResourceRecordSet]) + , _cId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Change' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cStatus' +-- +-- * 'cAdditions' +-- +-- * 'cStartTime' +-- +-- * 'cKind' +-- +-- * 'cDeletions' +-- +-- * 'cId' +change + :: Change +change = + Change + { _cStatus = Nothing + , _cAdditions = Nothing + , _cStartTime = Nothing + , _cKind = "dns#change" + , _cDeletions = Nothing + , _cId = Nothing + } + +-- | Status of the operation (output only). +cStatus :: Lens' Change (Maybe Text) +cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) + +-- | Which ResourceRecordSets to add? +cAdditions :: Lens' Change [Maybe ResourceRecordSet] +cAdditions + = lens _cAdditions (\ s a -> s{_cAdditions = a}) . + _Default + . _Coerce + +-- | The time that this operation was started by the server. This is in +-- RFC3339 text format. +cStartTime :: Lens' Change (Maybe Text) +cStartTime + = lens _cStartTime (\ s a -> s{_cStartTime = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dns#change\". +cKind :: Lens' Change Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Which ResourceRecordSets to remove? Must match existing data exactly. +cDeletions :: Lens' Change [Maybe ResourceRecordSet] +cDeletions + = lens _cDeletions (\ s a -> s{_cDeletions = a}) . + _Default + . _Coerce + +-- | Unique identifier for the resource; defined by the server (output only). +cId :: Lens' Change (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +instance FromJSON Change where + parseJSON + = withObject "Change" + (\ o -> + Change <$> + (o .:? "status") <*> (o .:? "additions" .!= mempty) + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "dns#change") + <*> (o .:? "deletions" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON Change where + toJSON Change{..} + = object + (catMaybes + [("status" .=) <$> _cStatus, + ("additions" .=) <$> _cAdditions, + ("startTime" .=) <$> _cStartTime, + Just ("kind" .= _cKind), + ("deletions" .=) <$> _cDeletions, + ("id" .=) <$> _cId]) + +-- +-- /See:/ 'resourceRecordSetsListResponse' smart constructor. +data ResourceRecordSetsListResponse = ResourceRecordSetsListResponse + { _rrslrNextPageToken :: !(Maybe Text) + , _rrslrKind :: !Text + , _rrslrRrsets :: !(Maybe [Maybe ResourceRecordSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceRecordSetsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrslrNextPageToken' +-- +-- * 'rrslrKind' +-- +-- * 'rrslrRrsets' +resourceRecordSetsListResponse + :: ResourceRecordSetsListResponse +resourceRecordSetsListResponse = + ResourceRecordSetsListResponse + { _rrslrNextPageToken = Nothing + , _rrslrKind = "dns#resourceRecordSetsListResponse" + , _rrslrRrsets = Nothing + } + +-- | The presence of this field indicates that there exist more results +-- following your last page of results in pagination order. To fetch them, +-- make another list request using this value as your pagination token. In +-- this way you can retrieve the complete contents of even very large +-- collections one page at a time. However, if the contents of the +-- collection change between the first and last paginated list request, the +-- set of all elements returned will be an inconsistent view of the +-- collection. There is no way to retrieve a consistent snapshot of a +-- collection larger than the maximum page size. +rrslrNextPageToken :: Lens' ResourceRecordSetsListResponse (Maybe Text) +rrslrNextPageToken + = lens _rrslrNextPageToken + (\ s a -> s{_rrslrNextPageToken = a}) + +-- | Type of resource. +rrslrKind :: Lens' ResourceRecordSetsListResponse Text +rrslrKind + = lens _rrslrKind (\ s a -> s{_rrslrKind = a}) + +-- | The resource record set resources. +rrslrRrsets :: Lens' ResourceRecordSetsListResponse [Maybe ResourceRecordSet] +rrslrRrsets + = lens _rrslrRrsets (\ s a -> s{_rrslrRrsets = a}) . + _Default + . _Coerce + +instance FromJSON ResourceRecordSetsListResponse + where + parseJSON + = withObject "ResourceRecordSetsListResponse" + (\ o -> + ResourceRecordSetsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "dns#resourceRecordSetsListResponse") + <*> (o .:? "rrsets" .!= mempty)) + +instance ToJSON ResourceRecordSetsListResponse where + toJSON ResourceRecordSetsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rrslrNextPageToken, + Just ("kind" .= _rrslrKind), + ("rrsets" .=) <$> _rrslrRrsets]) + +-- | A unit of data that will be returned by the DNS servers. +-- +-- /See:/ 'resourceRecordSet' smart constructor. +data ResourceRecordSet = ResourceRecordSet + { _rrsTtl :: !(Maybe Int32) + , _rrsKind :: !Text + , _rrsName :: !(Maybe Text) + , _rrsType :: !(Maybe Text) + , _rrsRrdatas :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceRecordSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrsTtl' +-- +-- * 'rrsKind' +-- +-- * 'rrsName' +-- +-- * 'rrsType' +-- +-- * 'rrsRrdatas' +resourceRecordSet + :: ResourceRecordSet +resourceRecordSet = + ResourceRecordSet + { _rrsTtl = Nothing + , _rrsKind = "dns#resourceRecordSet" + , _rrsName = Nothing + , _rrsType = Nothing + , _rrsRrdatas = Nothing + } + +-- | Number of seconds that this ResourceRecordSet can be cached by +-- resolvers. +rrsTtl :: Lens' ResourceRecordSet (Maybe Int32) +rrsTtl = lens _rrsTtl (\ s a -> s{_rrsTtl = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dns#resourceRecordSet\". +rrsKind :: Lens' ResourceRecordSet Text +rrsKind = lens _rrsKind (\ s a -> s{_rrsKind = a}) + +-- | For example, www.example.com. +rrsName :: Lens' ResourceRecordSet (Maybe Text) +rrsName = lens _rrsName (\ s a -> s{_rrsName = a}) + +-- | The identifier of a supported record type, for example, A, AAAA, MX, +-- TXT, and so on. +rrsType :: Lens' ResourceRecordSet (Maybe Text) +rrsType = lens _rrsType (\ s a -> s{_rrsType = a}) + +-- | As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). +rrsRrdatas :: Lens' ResourceRecordSet [Text] +rrsRrdatas + = lens _rrsRrdatas (\ s a -> s{_rrsRrdatas = a}) . + _Default + . _Coerce + +instance FromJSON ResourceRecordSet where + parseJSON + = withObject "ResourceRecordSet" + (\ o -> + ResourceRecordSet <$> + (o .:? "ttl") <*> + (o .:? "kind" .!= "dns#resourceRecordSet") + <*> (o .:? "name") + <*> (o .:? "type") + <*> (o .:? "rrdatas" .!= mempty)) + +instance ToJSON ResourceRecordSet where + toJSON ResourceRecordSet{..} + = object + (catMaybes + [("ttl" .=) <$> _rrsTtl, Just ("kind" .= _rrsKind), + ("name" .=) <$> _rrsName, ("type" .=) <$> _rrsType, + ("rrdatas" .=) <$> _rrsRrdatas]) + +-- | A zone is a subtree of the DNS namespace under one administrative +-- responsibility. A ManagedZone is a resource that represents a DNS zone +-- hosted by the Cloud DNS service. +-- +-- /See:/ 'managedZone' smart constructor. +data ManagedZone = ManagedZone + { _mzCreationTime :: !(Maybe Text) + , _mzKind :: !Text + , _mzNameServerSet :: !(Maybe Text) + , _mzName :: !(Maybe Text) + , _mzId :: !(Maybe Word64) + , _mzDnsName :: !(Maybe Text) + , _mzDescription :: !(Maybe Text) + , _mzNameServers :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzCreationTime' +-- +-- * 'mzKind' +-- +-- * 'mzNameServerSet' +-- +-- * 'mzName' +-- +-- * 'mzId' +-- +-- * 'mzDnsName' +-- +-- * 'mzDescription' +-- +-- * 'mzNameServers' +managedZone + :: ManagedZone +managedZone = + ManagedZone + { _mzCreationTime = Nothing + , _mzKind = "dns#managedZone" + , _mzNameServerSet = Nothing + , _mzName = Nothing + , _mzId = Nothing + , _mzDnsName = Nothing + , _mzDescription = Nothing + , _mzNameServers = Nothing + } + +-- | The time that this resource was created on the server. This is in +-- RFC3339 text format. Output only. +mzCreationTime :: Lens' ManagedZone (Maybe Text) +mzCreationTime + = lens _mzCreationTime + (\ s a -> s{_mzCreationTime = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dns#managedZone\". +mzKind :: Lens' ManagedZone Text +mzKind = lens _mzKind (\ s a -> s{_mzKind = a}) + +-- | Optionally specifies the NameServerSet for this ManagedZone. A +-- NameServerSet is a set of DNS name servers that all host the same +-- ManagedZones. Most users will leave this field unset. +mzNameServerSet :: Lens' ManagedZone (Maybe Text) +mzNameServerSet + = lens _mzNameServerSet + (\ s a -> s{_mzNameServerSet = a}) + +-- | User assigned name for this resource. Must be unique within the project. +-- The name must be 1-32 characters long, must begin with a letter, end +-- with a letter or digit, and only contain lowercase letters, digits or +-- dashes. +mzName :: Lens' ManagedZone (Maybe Text) +mzName = lens _mzName (\ s a -> s{_mzName = a}) + +-- | Unique identifier for the resource; defined by the server (output only) +mzId :: Lens' ManagedZone (Maybe Word64) +mzId = lens _mzId (\ s a -> s{_mzId = a}) + +-- | The DNS name of this managed zone, for instance \"example.com.\". +mzDnsName :: Lens' ManagedZone (Maybe Text) +mzDnsName + = lens _mzDnsName (\ s a -> s{_mzDnsName = a}) + +-- | A mutable string of at most 1024 characters associated with this +-- resource for the user\'s convenience. Has no effect on the managed +-- zone\'s function. +mzDescription :: Lens' ManagedZone (Maybe Text) +mzDescription + = lens _mzDescription + (\ s a -> s{_mzDescription = a}) + +-- | Delegate your managed_zone to these virtual name servers; defined by the +-- server (output only) +mzNameServers :: Lens' ManagedZone [Text] +mzNameServers + = lens _mzNameServers + (\ s a -> s{_mzNameServers = a}) + . _Default + . _Coerce + +instance FromJSON ManagedZone where + parseJSON + = withObject "ManagedZone" + (\ o -> + ManagedZone <$> + (o .:? "creationTime") <*> + (o .:? "kind" .!= "dns#managedZone") + <*> (o .:? "nameServerSet") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "dnsName") + <*> (o .:? "description") + <*> (o .:? "nameServers" .!= mempty)) + +instance ToJSON ManagedZone where + toJSON ManagedZone{..} + = object + (catMaybes + [("creationTime" .=) <$> _mzCreationTime, + Just ("kind" .= _mzKind), + ("nameServerSet" .=) <$> _mzNameServerSet, + ("name" .=) <$> _mzName, ("id" .=) <$> _mzId, + ("dnsName" .=) <$> _mzDnsName, + ("description" .=) <$> _mzDescription, + ("nameServers" .=) <$> _mzNameServers]) + +-- | Limits associated with a Project. +-- +-- /See:/ 'quota' smart constructor. +data Quota = Quota + { _qRrsetDeletionsPerChange :: !(Maybe Int32) + , _qRrsetsPerManagedZone :: !(Maybe Int32) + , _qKind :: !Text + , _qResourceRecordsPerRrset :: !(Maybe Int32) + , _qRrsetAdditionsPerChange :: !(Maybe Int32) + , _qManagedZones :: !(Maybe Int32) + , _qTotalRrdataSizePerChange :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Quota' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qRrsetDeletionsPerChange' +-- +-- * 'qRrsetsPerManagedZone' +-- +-- * 'qKind' +-- +-- * 'qResourceRecordsPerRrset' +-- +-- * 'qRrsetAdditionsPerChange' +-- +-- * 'qManagedZones' +-- +-- * 'qTotalRrdataSizePerChange' +quota + :: Quota +quota = + Quota + { _qRrsetDeletionsPerChange = Nothing + , _qRrsetsPerManagedZone = Nothing + , _qKind = "dns#quota" + , _qResourceRecordsPerRrset = Nothing + , _qRrsetAdditionsPerChange = Nothing + , _qManagedZones = Nothing + , _qTotalRrdataSizePerChange = Nothing + } + +-- | Maximum allowed number of ResourceRecordSets to delete per +-- ChangesCreateRequest. +qRrsetDeletionsPerChange :: Lens' Quota (Maybe Int32) +qRrsetDeletionsPerChange + = lens _qRrsetDeletionsPerChange + (\ s a -> s{_qRrsetDeletionsPerChange = a}) + +-- | Maximum allowed number of ResourceRecordSets per zone in the project. +qRrsetsPerManagedZone :: Lens' Quota (Maybe Int32) +qRrsetsPerManagedZone + = lens _qRrsetsPerManagedZone + (\ s a -> s{_qRrsetsPerManagedZone = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"dns#quota\". +qKind :: Lens' Quota Text +qKind = lens _qKind (\ s a -> s{_qKind = a}) + +-- | Maximum allowed number of ResourceRecords per ResourceRecordSet. +qResourceRecordsPerRrset :: Lens' Quota (Maybe Int32) +qResourceRecordsPerRrset + = lens _qResourceRecordsPerRrset + (\ s a -> s{_qResourceRecordsPerRrset = a}) + +-- | Maximum allowed number of ResourceRecordSets to add per +-- ChangesCreateRequest. +qRrsetAdditionsPerChange :: Lens' Quota (Maybe Int32) +qRrsetAdditionsPerChange + = lens _qRrsetAdditionsPerChange + (\ s a -> s{_qRrsetAdditionsPerChange = a}) + +-- | Maximum allowed number of managed zones in the project. +qManagedZones :: Lens' Quota (Maybe Int32) +qManagedZones + = lens _qManagedZones + (\ s a -> s{_qManagedZones = a}) + +-- | Maximum allowed size for total rrdata in one ChangesCreateRequest in +-- bytes. +qTotalRrdataSizePerChange :: Lens' Quota (Maybe Int32) +qTotalRrdataSizePerChange + = lens _qTotalRrdataSizePerChange + (\ s a -> s{_qTotalRrdataSizePerChange = a}) + +instance FromJSON Quota where + parseJSON + = withObject "Quota" + (\ o -> + Quota <$> + (o .:? "rrsetDeletionsPerChange") <*> + (o .:? "rrsetsPerManagedZone") + <*> (o .:? "kind" .!= "dns#quota") + <*> (o .:? "resourceRecordsPerRrset") + <*> (o .:? "rrsetAdditionsPerChange") + <*> (o .:? "managedZones") + <*> (o .:? "totalRrdataSizePerChange")) + +instance ToJSON Quota where + toJSON Quota{..} + = object + (catMaybes + [("rrsetDeletionsPerChange" .=) <$> + _qRrsetDeletionsPerChange, + ("rrsetsPerManagedZone" .=) <$> + _qRrsetsPerManagedZone, + Just ("kind" .= _qKind), + ("resourceRecordsPerRrset" .=) <$> + _qResourceRecordsPerRrset, + ("rrsetAdditionsPerChange" .=) <$> + _qRrsetAdditionsPerChange, + ("managedZones" .=) <$> _qManagedZones, + ("totalRrdataSizePerChange" .=) <$> + _qTotalRrdataSizePerChange]) + +-- +-- /See:/ 'managedZonesListResponse' smart constructor. +data ManagedZonesListResponse = ManagedZonesListResponse + { _mzlrNextPageToken :: !(Maybe Text) + , _mzlrKind :: !Text + , _mzlrManagedZones :: !(Maybe [Maybe ManagedZone]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZonesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzlrNextPageToken' +-- +-- * 'mzlrKind' +-- +-- * 'mzlrManagedZones' +managedZonesListResponse + :: ManagedZonesListResponse +managedZonesListResponse = + ManagedZonesListResponse + { _mzlrNextPageToken = Nothing + , _mzlrKind = "dns#managedZonesListResponse" + , _mzlrManagedZones = Nothing + } + +-- | The presence of this field indicates that there exist more results +-- following your last page of results in pagination order. To fetch them, +-- make another list request using this value as your page token. In this +-- way you can retrieve the complete contents of even very large +-- collections one page at a time. However, if the contents of the +-- collection change between the first and last paginated list request, the +-- set of all elements returned will be an inconsistent view of the +-- collection. There is no way to retrieve a consistent snapshot of a +-- collection larger than the maximum page size. +mzlrNextPageToken :: Lens' ManagedZonesListResponse (Maybe Text) +mzlrNextPageToken + = lens _mzlrNextPageToken + (\ s a -> s{_mzlrNextPageToken = a}) + +-- | Type of resource. +mzlrKind :: Lens' ManagedZonesListResponse Text +mzlrKind = lens _mzlrKind (\ s a -> s{_mzlrKind = a}) + +-- | The managed zone resources. +mzlrManagedZones :: Lens' ManagedZonesListResponse [Maybe ManagedZone] +mzlrManagedZones + = lens _mzlrManagedZones + (\ s a -> s{_mzlrManagedZones = a}) + . _Default + . _Coerce + +instance FromJSON ManagedZonesListResponse where + parseJSON + = withObject "ManagedZonesListResponse" + (\ o -> + ManagedZonesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "dns#managedZonesListResponse") + <*> (o .:? "managedZones" .!= mempty)) + +instance ToJSON ManagedZonesListResponse where + toJSON ManagedZonesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _mzlrNextPageToken, + Just ("kind" .= _mzlrKind), + ("managedZones" .=) <$> _mzlrManagedZones]) diff --git a/gogol-dns/gen/Network/Google/DNS/Types/Sum.hs b/gogol-dns/gen/Network/Google/DNS/Types/Sum.hs new file mode 100644 index 000000000..527dc8371 --- /dev/null +++ b/gogol-dns/gen/Network/Google/DNS/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DNS.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DNS.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Create.hs b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Create.hs new file mode 100644 index 000000000..b67e4412e --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Create.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.Changes.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Atomically update the ResourceRecordSet collection. +-- +-- /See:/ for @DNSChangesCreate@. +module DNS.Changes.Create + ( + -- * REST Resource + ChangesCreateAPI + + -- * Creating a Request + , changesCreate + , ChangesCreate + + -- * Request Lenses + , ccQuotaUser + , ccPrettyPrint + , ccProject + , ccUserIp + , ccKey + , ccOauthToken + , ccManagedZone + , ccFields + , ccAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSChangesCreate@ which the +-- 'ChangesCreate' request conforms to. +type ChangesCreateAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> + "changes" :> Post '[JSON] Change + +-- | Atomically update the ResourceRecordSet collection. +-- +-- /See:/ 'changesCreate' smart constructor. +data ChangesCreate = ChangesCreate + { _ccQuotaUser :: !(Maybe Text) + , _ccPrettyPrint :: !Bool + , _ccProject :: !Text + , _ccUserIp :: !(Maybe Text) + , _ccKey :: !(Maybe Text) + , _ccOauthToken :: !(Maybe Text) + , _ccManagedZone :: !Text + , _ccFields :: !(Maybe Text) + , _ccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccQuotaUser' +-- +-- * 'ccPrettyPrint' +-- +-- * 'ccProject' +-- +-- * 'ccUserIp' +-- +-- * 'ccKey' +-- +-- * 'ccOauthToken' +-- +-- * 'ccManagedZone' +-- +-- * 'ccFields' +-- +-- * 'ccAlt' +changesCreate + :: Text -- ^ 'project' + -> Text -- ^ 'managedZone' + -> ChangesCreate +changesCreate pCcProject_ pCcManagedZone_ = + ChangesCreate + { _ccQuotaUser = Nothing + , _ccPrettyPrint = True + , _ccProject = pCcProject_ + , _ccUserIp = Nothing + , _ccKey = Nothing + , _ccOauthToken = Nothing + , _ccManagedZone = pCcManagedZone_ + , _ccFields = Nothing + , _ccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccQuotaUser :: Lens' ChangesCreate' (Maybe Text) +ccQuotaUser + = lens _ccQuotaUser (\ s a -> s{_ccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccPrettyPrint :: Lens' ChangesCreate' Bool +ccPrettyPrint + = lens _ccPrettyPrint + (\ s a -> s{_ccPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +ccProject :: Lens' ChangesCreate' Text +ccProject + = lens _ccProject (\ s a -> s{_ccProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccUserIp :: Lens' ChangesCreate' (Maybe Text) +ccUserIp = lens _ccUserIp (\ s a -> s{_ccUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccKey :: Lens' ChangesCreate' (Maybe Text) +ccKey = lens _ccKey (\ s a -> s{_ccKey = a}) + +-- | OAuth 2.0 token for the current user. +ccOauthToken :: Lens' ChangesCreate' (Maybe Text) +ccOauthToken + = lens _ccOauthToken (\ s a -> s{_ccOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +ccManagedZone :: Lens' ChangesCreate' Text +ccManagedZone + = lens _ccManagedZone + (\ s a -> s{_ccManagedZone = a}) + +-- | Selector specifying which fields to include in a partial response. +ccFields :: Lens' ChangesCreate' (Maybe Text) +ccFields = lens _ccFields (\ s a -> s{_ccFields = a}) + +-- | Data format for the response. +ccAlt :: Lens' ChangesCreate' Text +ccAlt = lens _ccAlt (\ s a -> s{_ccAlt = a}) + +instance GoogleRequest ChangesCreate' where + type Rs ChangesCreate' = Change + request = requestWithRoute defReq dNSURL + requestWithRoute r u ChangesCreate{..} + = go _ccQuotaUser _ccPrettyPrint _ccProject _ccUserIp + _ccKey + _ccOauthToken + _ccManagedZone + _ccFields + _ccAlt + where go + = clientWithRoute (Proxy :: Proxy ChangesCreateAPI) r + u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Get.hs b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Get.hs new file mode 100644 index 000000000..8bcb3231a --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.Changes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetch the representation of an existing Change. +-- +-- /See:/ for @DNSChangesGet@. +module DNS.Changes.Get + ( + -- * REST Resource + ChangesGetAPI + + -- * Creating a Request + , changesGet + , ChangesGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgProject + , cgUserIp + , cgChangeId + , cgKey + , cgOauthToken + , cgManagedZone + , cgFields + , cgAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSChangesGet@ which the +-- 'ChangesGet' request conforms to. +type ChangesGetAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> + "changes" :> + Capture "changeId" Text :> Get '[JSON] Change + +-- | Fetch the representation of an existing Change. +-- +-- /See:/ 'changesGet' smart constructor. +data ChangesGet = ChangesGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgProject :: !Text + , _cgUserIp :: !(Maybe Text) + , _cgChangeId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgManagedZone :: !Text + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgProject' +-- +-- * 'cgUserIp' +-- +-- * 'cgChangeId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgManagedZone' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +changesGet + :: Text -- ^ 'project' + -> Text -- ^ 'changeId' + -> Text -- ^ 'managedZone' + -> ChangesGet +changesGet pCgProject_ pCgChangeId_ pCgManagedZone_ = + ChangesGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgProject = pCgProject_ + , _cgUserIp = Nothing + , _cgChangeId = pCgChangeId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgManagedZone = pCgManagedZone_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ChangesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ChangesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +cgProject :: Lens' ChangesGet' Text +cgProject + = lens _cgProject (\ s a -> s{_cgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ChangesGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | The identifier of the requested change, from a previous +-- ResourceRecordSetsChangeResponse. +cgChangeId :: Lens' ChangesGet' Text +cgChangeId + = lens _cgChangeId (\ s a -> s{_cgChangeId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ChangesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ChangesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +cgManagedZone :: Lens' ChangesGet' Text +cgManagedZone + = lens _cgManagedZone + (\ s a -> s{_cgManagedZone = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ChangesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ChangesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ChangesGet' where + type Rs ChangesGet' = Change + request = requestWithRoute defReq dNSURL + requestWithRoute r u ChangesGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgProject _cgUserIp + _cgChangeId + _cgKey + _cgOauthToken + _cgManagedZone + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy ChangesGetAPI) r u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/Changes/List.hs b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/List.hs new file mode 100644 index 000000000..501ef14eb --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/Changes/List.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.Changes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Enumerate Changes to a ResourceRecordSet collection. +-- +-- /See:/ for @DNSChangesList@. +module DNS.Changes.List + ( + -- * REST Resource + ChangesListAPI + + -- * Creating a Request + , changesList + , ChangesList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clProject + , clUserIp + , clSortOrder + , clKey + , clPageToken + , clOauthToken + , clManagedZone + , clMaxResults + , clFields + , clAlt + , clSortBy + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSChangesList@ which the +-- 'ChangesList' request conforms to. +type ChangesListAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> + "changes" :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "sortBy" Text :> + Get '[JSON] ChangesListResponse + +-- | Enumerate Changes to a ResourceRecordSet collection. +-- +-- /See:/ 'changesList' smart constructor. +data ChangesList = ChangesList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clProject :: !Text + , _clUserIp :: !(Maybe Text) + , _clSortOrder :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clManagedZone :: !Text + , _clMaxResults :: !(Maybe Int32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + , _clSortBy :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clProject' +-- +-- * 'clUserIp' +-- +-- * 'clSortOrder' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clManagedZone' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +-- +-- * 'clSortBy' +changesList + :: Text -- ^ 'project' + -> Text -- ^ 'managedZone' + -> ChangesList +changesList pClProject_ pClManagedZone_ = + ChangesList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clProject = pClProject_ + , _clUserIp = Nothing + , _clSortOrder = Nothing + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clManagedZone = pClManagedZone_ + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + , _clSortBy = "changeSequence" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' ChangesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' ChangesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +clProject :: Lens' ChangesList' Text +clProject + = lens _clProject (\ s a -> s{_clProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' ChangesList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Sorting order direction: \'ascending\' or \'descending\'. +clSortOrder :: Lens' ChangesList' (Maybe Text) +clSortOrder + = lens _clSortOrder (\ s a -> s{_clSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' ChangesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Optional. A tag returned by a previous list request that was truncated. +-- Use this parameter to continue a previous list request. +clPageToken :: Lens' ChangesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' ChangesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +clManagedZone :: Lens' ChangesList' Text +clManagedZone + = lens _clManagedZone + (\ s a -> s{_clManagedZone = a}) + +-- | Optional. Maximum number of results to be returned. If unspecified, the +-- server will decide how many results to return. +clMaxResults :: Lens' ChangesList' (Maybe Int32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' ChangesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' ChangesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +-- | Sorting criterion. The only supported value is change sequence. +clSortBy :: Lens' ChangesList' Text +clSortBy = lens _clSortBy (\ s a -> s{_clSortBy = a}) + +instance GoogleRequest ChangesList' where + type Rs ChangesList' = ChangesListResponse + request = requestWithRoute defReq dNSURL + requestWithRoute r u ChangesList{..} + = go _clQuotaUser _clPrettyPrint _clProject _clUserIp + _clSortOrder + _clKey + _clPageToken + _clOauthToken + _clManagedZone + _clMaxResults + _clFields + _clAlt + (Just _clSortBy) + where go + = clientWithRoute (Proxy :: Proxy ChangesListAPI) r u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Create.hs b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Create.hs new file mode 100644 index 000000000..098639734 --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Create.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.ManagedZones.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new ManagedZone. +-- +-- /See:/ for @DNSManagedZonesCreate@. +module DNS.ManagedZones.Create + ( + -- * REST Resource + ManagedZonesCreateAPI + + -- * Creating a Request + , managedZonesCreate + , ManagedZonesCreate + + -- * Request Lenses + , mzcQuotaUser + , mzcPrettyPrint + , mzcProject + , mzcUserIp + , mzcKey + , mzcOauthToken + , mzcFields + , mzcAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSManagedZonesCreate@ which the +-- 'ManagedZonesCreate' request conforms to. +type ManagedZonesCreateAPI = + Capture "project" Text :> + "managedZones" :> Post '[JSON] ManagedZone + +-- | Create a new ManagedZone. +-- +-- /See:/ 'managedZonesCreate' smart constructor. +data ManagedZonesCreate = ManagedZonesCreate + { _mzcQuotaUser :: !(Maybe Text) + , _mzcPrettyPrint :: !Bool + , _mzcProject :: !Text + , _mzcUserIp :: !(Maybe Text) + , _mzcKey :: !(Maybe Text) + , _mzcOauthToken :: !(Maybe Text) + , _mzcFields :: !(Maybe Text) + , _mzcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZonesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzcQuotaUser' +-- +-- * 'mzcPrettyPrint' +-- +-- * 'mzcProject' +-- +-- * 'mzcUserIp' +-- +-- * 'mzcKey' +-- +-- * 'mzcOauthToken' +-- +-- * 'mzcFields' +-- +-- * 'mzcAlt' +managedZonesCreate + :: Text -- ^ 'project' + -> ManagedZonesCreate +managedZonesCreate pMzcProject_ = + ManagedZonesCreate + { _mzcQuotaUser = Nothing + , _mzcPrettyPrint = True + , _mzcProject = pMzcProject_ + , _mzcUserIp = Nothing + , _mzcKey = Nothing + , _mzcOauthToken = Nothing + , _mzcFields = Nothing + , _mzcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mzcQuotaUser :: Lens' ManagedZonesCreate' (Maybe Text) +mzcQuotaUser + = lens _mzcQuotaUser (\ s a -> s{_mzcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mzcPrettyPrint :: Lens' ManagedZonesCreate' Bool +mzcPrettyPrint + = lens _mzcPrettyPrint + (\ s a -> s{_mzcPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +mzcProject :: Lens' ManagedZonesCreate' Text +mzcProject + = lens _mzcProject (\ s a -> s{_mzcProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mzcUserIp :: Lens' ManagedZonesCreate' (Maybe Text) +mzcUserIp + = lens _mzcUserIp (\ s a -> s{_mzcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mzcKey :: Lens' ManagedZonesCreate' (Maybe Text) +mzcKey = lens _mzcKey (\ s a -> s{_mzcKey = a}) + +-- | OAuth 2.0 token for the current user. +mzcOauthToken :: Lens' ManagedZonesCreate' (Maybe Text) +mzcOauthToken + = lens _mzcOauthToken + (\ s a -> s{_mzcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mzcFields :: Lens' ManagedZonesCreate' (Maybe Text) +mzcFields + = lens _mzcFields (\ s a -> s{_mzcFields = a}) + +-- | Data format for the response. +mzcAlt :: Lens' ManagedZonesCreate' Text +mzcAlt = lens _mzcAlt (\ s a -> s{_mzcAlt = a}) + +instance GoogleRequest ManagedZonesCreate' where + type Rs ManagedZonesCreate' = ManagedZone + request = requestWithRoute defReq dNSURL + requestWithRoute r u ManagedZonesCreate{..} + = go _mzcQuotaUser _mzcPrettyPrint _mzcProject + _mzcUserIp + _mzcKey + _mzcOauthToken + _mzcFields + _mzcAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagedZonesCreateAPI) + r + u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Delete.hs b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Delete.hs new file mode 100644 index 000000000..7312f9ef1 --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Delete.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.ManagedZones.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a previously created ManagedZone. +-- +-- /See:/ for @DNSManagedZonesDelete@. +module DNS.ManagedZones.Delete + ( + -- * REST Resource + ManagedZonesDeleteAPI + + -- * Creating a Request + , managedZonesDelete + , ManagedZonesDelete + + -- * Request Lenses + , mzdQuotaUser + , mzdPrettyPrint + , mzdProject + , mzdUserIp + , mzdKey + , mzdOauthToken + , mzdManagedZone + , mzdFields + , mzdAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSManagedZonesDelete@ which the +-- 'ManagedZonesDelete' request conforms to. +type ManagedZonesDeleteAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> Delete '[JSON] () + +-- | Delete a previously created ManagedZone. +-- +-- /See:/ 'managedZonesDelete' smart constructor. +data ManagedZonesDelete = ManagedZonesDelete + { _mzdQuotaUser :: !(Maybe Text) + , _mzdPrettyPrint :: !Bool + , _mzdProject :: !Text + , _mzdUserIp :: !(Maybe Text) + , _mzdKey :: !(Maybe Text) + , _mzdOauthToken :: !(Maybe Text) + , _mzdManagedZone :: !Text + , _mzdFields :: !(Maybe Text) + , _mzdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZonesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzdQuotaUser' +-- +-- * 'mzdPrettyPrint' +-- +-- * 'mzdProject' +-- +-- * 'mzdUserIp' +-- +-- * 'mzdKey' +-- +-- * 'mzdOauthToken' +-- +-- * 'mzdManagedZone' +-- +-- * 'mzdFields' +-- +-- * 'mzdAlt' +managedZonesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'managedZone' + -> ManagedZonesDelete +managedZonesDelete pMzdProject_ pMzdManagedZone_ = + ManagedZonesDelete + { _mzdQuotaUser = Nothing + , _mzdPrettyPrint = True + , _mzdProject = pMzdProject_ + , _mzdUserIp = Nothing + , _mzdKey = Nothing + , _mzdOauthToken = Nothing + , _mzdManagedZone = pMzdManagedZone_ + , _mzdFields = Nothing + , _mzdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mzdQuotaUser :: Lens' ManagedZonesDelete' (Maybe Text) +mzdQuotaUser + = lens _mzdQuotaUser (\ s a -> s{_mzdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mzdPrettyPrint :: Lens' ManagedZonesDelete' Bool +mzdPrettyPrint + = lens _mzdPrettyPrint + (\ s a -> s{_mzdPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +mzdProject :: Lens' ManagedZonesDelete' Text +mzdProject + = lens _mzdProject (\ s a -> s{_mzdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mzdUserIp :: Lens' ManagedZonesDelete' (Maybe Text) +mzdUserIp + = lens _mzdUserIp (\ s a -> s{_mzdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mzdKey :: Lens' ManagedZonesDelete' (Maybe Text) +mzdKey = lens _mzdKey (\ s a -> s{_mzdKey = a}) + +-- | OAuth 2.0 token for the current user. +mzdOauthToken :: Lens' ManagedZonesDelete' (Maybe Text) +mzdOauthToken + = lens _mzdOauthToken + (\ s a -> s{_mzdOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +mzdManagedZone :: Lens' ManagedZonesDelete' Text +mzdManagedZone + = lens _mzdManagedZone + (\ s a -> s{_mzdManagedZone = a}) + +-- | Selector specifying which fields to include in a partial response. +mzdFields :: Lens' ManagedZonesDelete' (Maybe Text) +mzdFields + = lens _mzdFields (\ s a -> s{_mzdFields = a}) + +-- | Data format for the response. +mzdAlt :: Lens' ManagedZonesDelete' Text +mzdAlt = lens _mzdAlt (\ s a -> s{_mzdAlt = a}) + +instance GoogleRequest ManagedZonesDelete' where + type Rs ManagedZonesDelete' = () + request = requestWithRoute defReq dNSURL + requestWithRoute r u ManagedZonesDelete{..} + = go _mzdQuotaUser _mzdPrettyPrint _mzdProject + _mzdUserIp + _mzdKey + _mzdOauthToken + _mzdManagedZone + _mzdFields + _mzdAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagedZonesDeleteAPI) + r + u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Get.hs b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Get.hs new file mode 100644 index 000000000..b404685b5 --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Get.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.ManagedZones.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetch the representation of an existing ManagedZone. +-- +-- /See:/ for @DNSManagedZonesGet@. +module DNS.ManagedZones.Get + ( + -- * REST Resource + ManagedZonesGetAPI + + -- * Creating a Request + , managedZonesGet + , ManagedZonesGet + + -- * Request Lenses + , mzgQuotaUser + , mzgPrettyPrint + , mzgProject + , mzgUserIp + , mzgKey + , mzgOauthToken + , mzgManagedZone + , mzgFields + , mzgAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSManagedZonesGet@ which the +-- 'ManagedZonesGet' request conforms to. +type ManagedZonesGetAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> Get '[JSON] ManagedZone + +-- | Fetch the representation of an existing ManagedZone. +-- +-- /See:/ 'managedZonesGet' smart constructor. +data ManagedZonesGet = ManagedZonesGet + { _mzgQuotaUser :: !(Maybe Text) + , _mzgPrettyPrint :: !Bool + , _mzgProject :: !Text + , _mzgUserIp :: !(Maybe Text) + , _mzgKey :: !(Maybe Text) + , _mzgOauthToken :: !(Maybe Text) + , _mzgManagedZone :: !Text + , _mzgFields :: !(Maybe Text) + , _mzgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZonesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzgQuotaUser' +-- +-- * 'mzgPrettyPrint' +-- +-- * 'mzgProject' +-- +-- * 'mzgUserIp' +-- +-- * 'mzgKey' +-- +-- * 'mzgOauthToken' +-- +-- * 'mzgManagedZone' +-- +-- * 'mzgFields' +-- +-- * 'mzgAlt' +managedZonesGet + :: Text -- ^ 'project' + -> Text -- ^ 'managedZone' + -> ManagedZonesGet +managedZonesGet pMzgProject_ pMzgManagedZone_ = + ManagedZonesGet + { _mzgQuotaUser = Nothing + , _mzgPrettyPrint = True + , _mzgProject = pMzgProject_ + , _mzgUserIp = Nothing + , _mzgKey = Nothing + , _mzgOauthToken = Nothing + , _mzgManagedZone = pMzgManagedZone_ + , _mzgFields = Nothing + , _mzgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mzgQuotaUser :: Lens' ManagedZonesGet' (Maybe Text) +mzgQuotaUser + = lens _mzgQuotaUser (\ s a -> s{_mzgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mzgPrettyPrint :: Lens' ManagedZonesGet' Bool +mzgPrettyPrint + = lens _mzgPrettyPrint + (\ s a -> s{_mzgPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +mzgProject :: Lens' ManagedZonesGet' Text +mzgProject + = lens _mzgProject (\ s a -> s{_mzgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mzgUserIp :: Lens' ManagedZonesGet' (Maybe Text) +mzgUserIp + = lens _mzgUserIp (\ s a -> s{_mzgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mzgKey :: Lens' ManagedZonesGet' (Maybe Text) +mzgKey = lens _mzgKey (\ s a -> s{_mzgKey = a}) + +-- | OAuth 2.0 token for the current user. +mzgOauthToken :: Lens' ManagedZonesGet' (Maybe Text) +mzgOauthToken + = lens _mzgOauthToken + (\ s a -> s{_mzgOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +mzgManagedZone :: Lens' ManagedZonesGet' Text +mzgManagedZone + = lens _mzgManagedZone + (\ s a -> s{_mzgManagedZone = a}) + +-- | Selector specifying which fields to include in a partial response. +mzgFields :: Lens' ManagedZonesGet' (Maybe Text) +mzgFields + = lens _mzgFields (\ s a -> s{_mzgFields = a}) + +-- | Data format for the response. +mzgAlt :: Lens' ManagedZonesGet' Text +mzgAlt = lens _mzgAlt (\ s a -> s{_mzgAlt = a}) + +instance GoogleRequest ManagedZonesGet' where + type Rs ManagedZonesGet' = ManagedZone + request = requestWithRoute defReq dNSURL + requestWithRoute r u ManagedZonesGet{..} + = go _mzgQuotaUser _mzgPrettyPrint _mzgProject + _mzgUserIp + _mzgKey + _mzgOauthToken + _mzgManagedZone + _mzgFields + _mzgAlt + where go + = clientWithRoute (Proxy :: Proxy ManagedZonesGetAPI) + r + u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/List.hs b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/List.hs new file mode 100644 index 000000000..3685c9149 --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/List.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.ManagedZones.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Enumerate ManagedZones that have been created but not yet deleted. +-- +-- /See:/ for @DNSManagedZonesList@. +module DNS.ManagedZones.List + ( + -- * REST Resource + ManagedZonesListAPI + + -- * Creating a Request + , managedZonesList + , ManagedZonesList + + -- * Request Lenses + , mzlQuotaUser + , mzlPrettyPrint + , mzlProject + , mzlUserIp + , mzlKey + , mzlPageToken + , mzlOauthToken + , mzlDnsName + , mzlMaxResults + , mzlFields + , mzlAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSManagedZonesList@ which the +-- 'ManagedZonesList' request conforms to. +type ManagedZonesListAPI = + Capture "project" Text :> + "managedZones" :> + QueryParam "pageToken" Text :> + QueryParam "dnsName" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ManagedZonesListResponse + +-- | Enumerate ManagedZones that have been created but not yet deleted. +-- +-- /See:/ 'managedZonesList' smart constructor. +data ManagedZonesList = ManagedZonesList + { _mzlQuotaUser :: !(Maybe Text) + , _mzlPrettyPrint :: !Bool + , _mzlProject :: !Text + , _mzlUserIp :: !(Maybe Text) + , _mzlKey :: !(Maybe Text) + , _mzlPageToken :: !(Maybe Text) + , _mzlOauthToken :: !(Maybe Text) + , _mzlDnsName :: !(Maybe Text) + , _mzlMaxResults :: !(Maybe Int32) + , _mzlFields :: !(Maybe Text) + , _mzlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ManagedZonesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mzlQuotaUser' +-- +-- * 'mzlPrettyPrint' +-- +-- * 'mzlProject' +-- +-- * 'mzlUserIp' +-- +-- * 'mzlKey' +-- +-- * 'mzlPageToken' +-- +-- * 'mzlOauthToken' +-- +-- * 'mzlDnsName' +-- +-- * 'mzlMaxResults' +-- +-- * 'mzlFields' +-- +-- * 'mzlAlt' +managedZonesList + :: Text -- ^ 'project' + -> ManagedZonesList +managedZonesList pMzlProject_ = + ManagedZonesList + { _mzlQuotaUser = Nothing + , _mzlPrettyPrint = True + , _mzlProject = pMzlProject_ + , _mzlUserIp = Nothing + , _mzlKey = Nothing + , _mzlPageToken = Nothing + , _mzlOauthToken = Nothing + , _mzlDnsName = Nothing + , _mzlMaxResults = Nothing + , _mzlFields = Nothing + , _mzlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mzlQuotaUser :: Lens' ManagedZonesList' (Maybe Text) +mzlQuotaUser + = lens _mzlQuotaUser (\ s a -> s{_mzlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mzlPrettyPrint :: Lens' ManagedZonesList' Bool +mzlPrettyPrint + = lens _mzlPrettyPrint + (\ s a -> s{_mzlPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +mzlProject :: Lens' ManagedZonesList' Text +mzlProject + = lens _mzlProject (\ s a -> s{_mzlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mzlUserIp :: Lens' ManagedZonesList' (Maybe Text) +mzlUserIp + = lens _mzlUserIp (\ s a -> s{_mzlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mzlKey :: Lens' ManagedZonesList' (Maybe Text) +mzlKey = lens _mzlKey (\ s a -> s{_mzlKey = a}) + +-- | Optional. A tag returned by a previous list request that was truncated. +-- Use this parameter to continue a previous list request. +mzlPageToken :: Lens' ManagedZonesList' (Maybe Text) +mzlPageToken + = lens _mzlPageToken (\ s a -> s{_mzlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mzlOauthToken :: Lens' ManagedZonesList' (Maybe Text) +mzlOauthToken + = lens _mzlOauthToken + (\ s a -> s{_mzlOauthToken = a}) + +-- | Restricts the list to return only zones with this domain name. +mzlDnsName :: Lens' ManagedZonesList' (Maybe Text) +mzlDnsName + = lens _mzlDnsName (\ s a -> s{_mzlDnsName = a}) + +-- | Optional. Maximum number of results to be returned. If unspecified, the +-- server will decide how many results to return. +mzlMaxResults :: Lens' ManagedZonesList' (Maybe Int32) +mzlMaxResults + = lens _mzlMaxResults + (\ s a -> s{_mzlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mzlFields :: Lens' ManagedZonesList' (Maybe Text) +mzlFields + = lens _mzlFields (\ s a -> s{_mzlFields = a}) + +-- | Data format for the response. +mzlAlt :: Lens' ManagedZonesList' Text +mzlAlt = lens _mzlAlt (\ s a -> s{_mzlAlt = a}) + +instance GoogleRequest ManagedZonesList' where + type Rs ManagedZonesList' = ManagedZonesListResponse + request = requestWithRoute defReq dNSURL + requestWithRoute r u ManagedZonesList{..} + = go _mzlQuotaUser _mzlPrettyPrint _mzlProject + _mzlUserIp + _mzlKey + _mzlPageToken + _mzlOauthToken + _mzlDnsName + _mzlMaxResults + _mzlFields + _mzlAlt + where go + = clientWithRoute + (Proxy :: Proxy ManagedZonesListAPI) + r + u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/Projects/Get.hs b/gogol-dns/gen/Network/Google/Resource/DNS/Projects/Get.hs new file mode 100644 index 000000000..776dad72b --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/Projects/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.Projects.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetch the representation of an existing Project. +-- +-- /See:/ for @DNSProjectsGet@. +module DNS.Projects.Get + ( + -- * REST Resource + ProjectsGetAPI + + -- * Creating a Request + , projectsGet + , ProjectsGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgProject + , pgUserIp + , pgKey + , pgOauthToken + , pgFields + , pgAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSProjectsGet@ which the +-- 'ProjectsGet' request conforms to. +type ProjectsGetAPI = + Capture "project" Text :> Get '[JSON] Project + +-- | Fetch the representation of an existing Project. +-- +-- /See:/ 'projectsGet' smart constructor. +data ProjectsGet = ProjectsGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgProject :: !Text + , _pgUserIp :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgProject' +-- +-- * 'pgUserIp' +-- +-- * 'pgKey' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +projectsGet + :: Text -- ^ 'project' + -> ProjectsGet +projectsGet pPgProject_ = + ProjectsGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgProject = pPgProject_ + , _pgUserIp = Nothing + , _pgKey = Nothing + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' ProjectsGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' ProjectsGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +pgProject :: Lens' ProjectsGet' Text +pgProject + = lens _pgProject (\ s a -> s{_pgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' ProjectsGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' ProjectsGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' ProjectsGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' ProjectsGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' ProjectsGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest ProjectsGet' where + type Rs ProjectsGet' = Project + request = requestWithRoute defReq dNSURL + requestWithRoute r u ProjectsGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgProject _pgUserIp + _pgKey + _pgOauthToken + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsGetAPI) r u diff --git a/gogol-dns/gen/Network/Google/Resource/DNS/ResourceRecordSets/List.hs b/gogol-dns/gen/Network/Google/Resource/DNS/ResourceRecordSets/List.hs new file mode 100644 index 000000000..90ff63e2a --- /dev/null +++ b/gogol-dns/gen/Network/Google/Resource/DNS/ResourceRecordSets/List.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DNS.ResourceRecordSets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Enumerate ResourceRecordSets that have been created but not yet deleted. +-- +-- /See:/ for @DNSResourceRecordSetsList@. +module DNS.ResourceRecordSets.List + ( + -- * REST Resource + ResourceRecordSetsListAPI + + -- * Creating a Request + , resourceRecordSetsList + , ResourceRecordSetsList + + -- * Request Lenses + , rrslQuotaUser + , rrslPrettyPrint + , rrslProject + , rrslUserIp + , rrslKey + , rrslName + , rrslPageToken + , rrslType + , rrslOauthToken + , rrslManagedZone + , rrslMaxResults + , rrslFields + , rrslAlt + ) where + +import Network.Google.DNS.Types +import Network.Google.Prelude + +-- | A resource alias for @DNSResourceRecordSetsList@ which the +-- 'ResourceRecordSetsList' request conforms to. +type ResourceRecordSetsListAPI = + Capture "project" Text :> + "managedZones" :> + Capture "managedZone" Text :> + "rrsets" :> + QueryParam "name" Text :> + QueryParam "pageToken" Text :> + QueryParam "type" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ResourceRecordSetsListResponse + +-- | Enumerate ResourceRecordSets that have been created but not yet deleted. +-- +-- /See:/ 'resourceRecordSetsList' smart constructor. +data ResourceRecordSetsList = ResourceRecordSetsList + { _rrslQuotaUser :: !(Maybe Text) + , _rrslPrettyPrint :: !Bool + , _rrslProject :: !Text + , _rrslUserIp :: !(Maybe Text) + , _rrslKey :: !(Maybe Text) + , _rrslName :: !(Maybe Text) + , _rrslPageToken :: !(Maybe Text) + , _rrslType :: !(Maybe Text) + , _rrslOauthToken :: !(Maybe Text) + , _rrslManagedZone :: !Text + , _rrslMaxResults :: !(Maybe Int32) + , _rrslFields :: !(Maybe Text) + , _rrslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceRecordSetsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrslQuotaUser' +-- +-- * 'rrslPrettyPrint' +-- +-- * 'rrslProject' +-- +-- * 'rrslUserIp' +-- +-- * 'rrslKey' +-- +-- * 'rrslName' +-- +-- * 'rrslPageToken' +-- +-- * 'rrslType' +-- +-- * 'rrslOauthToken' +-- +-- * 'rrslManagedZone' +-- +-- * 'rrslMaxResults' +-- +-- * 'rrslFields' +-- +-- * 'rrslAlt' +resourceRecordSetsList + :: Text -- ^ 'project' + -> Text -- ^ 'managedZone' + -> ResourceRecordSetsList +resourceRecordSetsList pRrslProject_ pRrslManagedZone_ = + ResourceRecordSetsList + { _rrslQuotaUser = Nothing + , _rrslPrettyPrint = True + , _rrslProject = pRrslProject_ + , _rrslUserIp = Nothing + , _rrslKey = Nothing + , _rrslName = Nothing + , _rrslPageToken = Nothing + , _rrslType = Nothing + , _rrslOauthToken = Nothing + , _rrslManagedZone = pRrslManagedZone_ + , _rrslMaxResults = Nothing + , _rrslFields = Nothing + , _rrslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrslQuotaUser :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslQuotaUser + = lens _rrslQuotaUser + (\ s a -> s{_rrslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrslPrettyPrint :: Lens' ResourceRecordSetsList' Bool +rrslPrettyPrint + = lens _rrslPrettyPrint + (\ s a -> s{_rrslPrettyPrint = a}) + +-- | Identifies the project addressed by this request. +rrslProject :: Lens' ResourceRecordSetsList' Text +rrslProject + = lens _rrslProject (\ s a -> s{_rrslProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrslUserIp :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslUserIp + = lens _rrslUserIp (\ s a -> s{_rrslUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrslKey :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslKey = lens _rrslKey (\ s a -> s{_rrslKey = a}) + +-- | Restricts the list to return only records with this fully qualified +-- domain name. +rrslName :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslName = lens _rrslName (\ s a -> s{_rrslName = a}) + +-- | Optional. A tag returned by a previous list request that was truncated. +-- Use this parameter to continue a previous list request. +rrslPageToken :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslPageToken + = lens _rrslPageToken + (\ s a -> s{_rrslPageToken = a}) + +-- | Restricts the list to return only records of this type. If present, the +-- \"name\" parameter must also be present. +rrslType :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslType = lens _rrslType (\ s a -> s{_rrslType = a}) + +-- | OAuth 2.0 token for the current user. +rrslOauthToken :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslOauthToken + = lens _rrslOauthToken + (\ s a -> s{_rrslOauthToken = a}) + +-- | Identifies the managed zone addressed by this request. Can be the +-- managed zone name or id. +rrslManagedZone :: Lens' ResourceRecordSetsList' Text +rrslManagedZone + = lens _rrslManagedZone + (\ s a -> s{_rrslManagedZone = a}) + +-- | Optional. Maximum number of results to be returned. If unspecified, the +-- server will decide how many results to return. +rrslMaxResults :: Lens' ResourceRecordSetsList' (Maybe Int32) +rrslMaxResults + = lens _rrslMaxResults + (\ s a -> s{_rrslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rrslFields :: Lens' ResourceRecordSetsList' (Maybe Text) +rrslFields + = lens _rrslFields (\ s a -> s{_rrslFields = a}) + +-- | Data format for the response. +rrslAlt :: Lens' ResourceRecordSetsList' Text +rrslAlt = lens _rrslAlt (\ s a -> s{_rrslAlt = a}) + +instance GoogleRequest ResourceRecordSetsList' where + type Rs ResourceRecordSetsList' = + ResourceRecordSetsListResponse + request = requestWithRoute defReq dNSURL + requestWithRoute r u ResourceRecordSetsList{..} + = go _rrslQuotaUser _rrslPrettyPrint _rrslProject + _rrslUserIp + _rrslKey + _rrslName + _rrslPageToken + _rrslType + _rrslOauthToken + _rrslManagedZone + _rrslMaxResults + _rrslFields + _rrslAlt + where go + = clientWithRoute + (Proxy :: Proxy ResourceRecordSetsListAPI) + r + u diff --git a/gogol-dns/gogol-dns.cabal b/gogol-dns/gogol-dns.cabal new file mode 100644 index 000000000..42aed3270 --- /dev/null +++ b/gogol-dns/gogol-dns.cabal @@ -0,0 +1,52 @@ +name: gogol-dns +version: 0.0.1 +synopsis: Google Cloud DNS API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Cloud DNS API provides services for configuring and serving + authoritative DNS records. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.DNS + , Network.Google.DNS.Types + , Network.Google.Resource.DNS.Changes.Create + , Network.Google.Resource.DNS.Changes.Get + , Network.Google.Resource.DNS.Changes.List + , Network.Google.Resource.DNS.ManagedZones.Create + , Network.Google.Resource.DNS.ManagedZones.Delete + , Network.Google.Resource.DNS.ManagedZones.Get + , Network.Google.Resource.DNS.ManagedZones.List + , Network.Google.Resource.DNS.Projects.Get + , Network.Google.Resource.DNS.ResourceRecordSets.List + + other-modules: + Network.Google.DNS.Types.Product + , Network.Google.DNS.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-dns/src/.gitkeep b/gogol-dns/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-doubleclick-bids/LICENSE b/gogol-doubleclick-bids/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-doubleclick-bids/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-doubleclick-bids/Makefile b/gogol-doubleclick-bids/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-doubleclick-bids/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-doubleclick-bids/README.md b/gogol-doubleclick-bids/README.md new file mode 100644 index 000000000..e60b14f8b --- /dev/null +++ b/gogol-doubleclick-bids/README.md @@ -0,0 +1,28 @@ +# gogol-doubleclick-bids + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the DoubleClick Bid Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-doubleclick-bids` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-doubleclick-bids/Setup.hs b/gogol-doubleclick-bids/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-doubleclick-bids/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids.hs b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids.hs new file mode 100644 index 000000000..9c0846e5c --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids.hs @@ -0,0 +1,219 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.DoubleClickBids +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for viewing and managing your reports in DoubleClick Bid Manager. +-- +-- /See:/ +module Network.Google.DoubleClickBids + ( + -- * API + DoubleClickBidsAPI + , doubleClickBidsAPI + , doubleClickBidsURL + + -- * Service Methods + + -- * REST Resources + + -- ** DoubleclickbidmanagerLineitemsDownloadlineitems + , module Doubleclickbidmanager.Lineitems.Downloadlineitems + + -- ** DoubleclickbidmanagerLineitemsUploadlineitems + , module Doubleclickbidmanager.Lineitems.Uploadlineitems + + -- ** DoubleclickbidmanagerQueriesCreatequery + , module Doubleclickbidmanager.Queries.Createquery + + -- ** DoubleclickbidmanagerQueriesDeletequery + , module Doubleclickbidmanager.Queries.Deletequery + + -- ** DoubleclickbidmanagerQueriesGetquery + , module Doubleclickbidmanager.Queries.Getquery + + -- ** DoubleclickbidmanagerQueriesListqueries + , module Doubleclickbidmanager.Queries.Listqueries + + -- ** DoubleclickbidmanagerQueriesRunquery + , module Doubleclickbidmanager.Queries.Runquery + + -- ** DoubleclickbidmanagerReportsListreports + , module Doubleclickbidmanager.Reports.Listreports + + -- * Types + + -- ** ListReportsResponse + , ListReportsResponse + , listReportsResponse + , lrrReports + , lrrKind + + -- ** QueryMetadata + , QueryMetadata + , queryMetadata + , qmGoogleCloudStoragePathForLatestReport + , qmLocale + , qmFormat + , qmGoogleDrivePathForLatestReport + , qmShareEmailAddress + , qmRunning + , qmDataRange + , qmLatestReportRunTimeMs + , qmReportCount + , qmTitle + , qmSendNotification + + -- ** UploadLineItemsRequest + , UploadLineItemsRequest + , uploadLineItemsRequest + , ulirLineItems + , ulirFormat + , ulirDryRun + + -- ** FilterPair + , FilterPair + , filterPair + , fpValue + , fpType + + -- ** RunQueryRequest + , RunQueryRequest + , runQueryRequest + , rqrReportDataEndTimeMs + , rqrDataRange + , rqrReportDataStartTimeMs + , rqrTimezoneCode + + -- ** ListQueriesResponse + , ListQueriesResponse + , listQueriesResponse + , lqrQueries + , lqrKind + + -- ** DownloadLineItemsRequest + , DownloadLineItemsRequest + , downloadLineItemsRequest + , dlirFilterType + , dlirFormat + , dlirFilterIds + + -- ** UploadLineItemsResponse + , UploadLineItemsResponse + , uploadLineItemsResponse + , ulirUploadStatus + + -- ** ReportMetadata + , ReportMetadata + , reportMetadata + , rmStatus + , rmReportDataEndTimeMs + , rmGoogleCloudStoragePath + , rmReportDataStartTimeMs + + -- ** Report + , Report + , report + , rParams + , rKey + , rMetadata + + -- ** RowStatus + , RowStatus + , rowStatus + , rsEntityName + , rsChanged + , rsPersisted + , rsRowNumber + , rsErrors + , rsEntityId + + -- ** ReportKey + , ReportKey + , reportKey + , rkQueryId + , rkReportId + + -- ** UploadStatus + , UploadStatus + , uploadStatus + , usRowStatus + , usErrors + + -- ** DownloadLineItemsResponse + , DownloadLineItemsResponse + , downloadLineItemsResponse + , dlirLineItems + + -- ** QuerySchedule + , QuerySchedule + , querySchedule + , qsFrequency + , qsEndTimeMs + , qsNextRunMinuteOfDay + , qsNextRunTimezoneCode + + -- ** ReportStatus + , ReportStatus + , reportStatus + , rsState + , rsFinishTimeMs + , rsFormat + , rsFailure + + -- ** Query + , Query + , query + , qQueryId + , qReportDataEndTimeMs + , qSchedule + , qKind + , qParams + , qMetadata + , qReportDataStartTimeMs + , qTimezoneCode + + -- ** Parameters + , Parameters + , parameters + , pMetrics + , pIncludeInviteData + , pFilters + , pGroupBys + , pType + + -- ** ReportFailure + , ReportFailure + , reportFailure + , rfErrorCode + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude +import Network.Google.Resource.Doubleclickbidmanager.Lineitems.Downloadlineitems +import Network.Google.Resource.Doubleclickbidmanager.Lineitems.Uploadlineitems +import Network.Google.Resource.Doubleclickbidmanager.Queries.Createquery +import Network.Google.Resource.Doubleclickbidmanager.Queries.Deletequery +import Network.Google.Resource.Doubleclickbidmanager.Queries.Getquery +import Network.Google.Resource.Doubleclickbidmanager.Queries.Listqueries +import Network.Google.Resource.Doubleclickbidmanager.Queries.Runquery +import Network.Google.Resource.Doubleclickbidmanager.Reports.Listreports + +{- $resources +TODO +-} + +type DoubleClickBidsAPI = + Queries :<|> Reports :<|> Lineitems + +doubleClickBidsAPI :: Proxy DoubleClickBidsAPI +doubleClickBidsAPI = Proxy diff --git a/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types.hs b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types.hs new file mode 100644 index 000000000..70edd2a05 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickBids.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickBids.Types + ( + -- * Service URL + doubleClickBidsURL + + -- * ListReportsResponse + , ListReportsResponse + , listReportsResponse + , lrrReports + , lrrKind + + -- * QueryMetadata + , QueryMetadata + , queryMetadata + , qmGoogleCloudStoragePathForLatestReport + , qmLocale + , qmFormat + , qmGoogleDrivePathForLatestReport + , qmShareEmailAddress + , qmRunning + , qmDataRange + , qmLatestReportRunTimeMs + , qmReportCount + , qmTitle + , qmSendNotification + + -- * UploadLineItemsRequest + , UploadLineItemsRequest + , uploadLineItemsRequest + , ulirLineItems + , ulirFormat + , ulirDryRun + + -- * FilterPair + , FilterPair + , filterPair + , fpValue + , fpType + + -- * RunQueryRequest + , RunQueryRequest + , runQueryRequest + , rqrReportDataEndTimeMs + , rqrDataRange + , rqrReportDataStartTimeMs + , rqrTimezoneCode + + -- * ListQueriesResponse + , ListQueriesResponse + , listQueriesResponse + , lqrQueries + , lqrKind + + -- * DownloadLineItemsRequest + , DownloadLineItemsRequest + , downloadLineItemsRequest + , dlirFilterType + , dlirFormat + , dlirFilterIds + + -- * UploadLineItemsResponse + , UploadLineItemsResponse + , uploadLineItemsResponse + , ulirUploadStatus + + -- * ReportMetadata + , ReportMetadata + , reportMetadata + , rmStatus + , rmReportDataEndTimeMs + , rmGoogleCloudStoragePath + , rmReportDataStartTimeMs + + -- * Report + , Report + , report + , rParams + , rKey + , rMetadata + + -- * RowStatus + , RowStatus + , rowStatus + , rsEntityName + , rsChanged + , rsPersisted + , rsRowNumber + , rsErrors + , rsEntityId + + -- * ReportKey + , ReportKey + , reportKey + , rkQueryId + , rkReportId + + -- * UploadStatus + , UploadStatus + , uploadStatus + , usRowStatus + , usErrors + + -- * DownloadLineItemsResponse + , DownloadLineItemsResponse + , downloadLineItemsResponse + , dlirLineItems + + -- * QuerySchedule + , QuerySchedule + , querySchedule + , qsFrequency + , qsEndTimeMs + , qsNextRunMinuteOfDay + , qsNextRunTimezoneCode + + -- * ReportStatus + , ReportStatus + , reportStatus + , rsState + , rsFinishTimeMs + , rsFormat + , rsFailure + + -- * Query + , Query + , query + , qQueryId + , qReportDataEndTimeMs + , qSchedule + , qKind + , qParams + , qMetadata + , qReportDataStartTimeMs + , qTimezoneCode + + -- * Parameters + , Parameters + , parameters + , pMetrics + , pIncludeInviteData + , pFilters + , pGroupBys + , pType + + -- * ReportFailure + , ReportFailure + , reportFailure + , rfErrorCode + ) where + +import Network.Google.DoubleClickBids.Types.Product +import Network.Google.DoubleClickBids.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the DoubleClick Bid Manager API. +doubleClickBidsURL :: BaseURL +doubleClickBidsURL + = BaseUrl Https + "https://www.googleapis.com/doubleclickbidmanager/v1/" + 443 diff --git a/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Product.hs b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Product.hs new file mode 100644 index 000000000..f04677ee1 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Product.hs @@ -0,0 +1,1309 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickBids.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickBids.Types.Product where + +import Network.Google.DoubleClickBids.Types.Sum +import Network.Google.Prelude + +-- | List reports response. +-- +-- /See:/ 'listReportsResponse' smart constructor. +data ListReportsResponse = ListReportsResponse + { _lrrReports :: !(Maybe [Maybe Report]) + , _lrrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListReportsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrrReports' +-- +-- * 'lrrKind' +listReportsResponse + :: ListReportsResponse +listReportsResponse = + ListReportsResponse + { _lrrReports = Nothing + , _lrrKind = "doubleclickbidmanager#listReportsResponse" + } + +-- | Retrieved reports. +lrrReports :: Lens' ListReportsResponse [Maybe Report] +lrrReports + = lens _lrrReports (\ s a -> s{_lrrReports = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"doubleclickbidmanager#listReportsResponse\". +lrrKind :: Lens' ListReportsResponse Text +lrrKind = lens _lrrKind (\ s a -> s{_lrrKind = a}) + +instance FromJSON ListReportsResponse where + parseJSON + = withObject "ListReportsResponse" + (\ o -> + ListReportsResponse <$> + (o .:? "reports" .!= mempty) <*> + (o .:? "kind" .!= + "doubleclickbidmanager#listReportsResponse")) + +instance ToJSON ListReportsResponse where + toJSON ListReportsResponse{..} + = object + (catMaybes + [("reports" .=) <$> _lrrReports, + Just ("kind" .= _lrrKind)]) + +-- | Query metadata. +-- +-- /See:/ 'queryMetadata' smart constructor. +data QueryMetadata = QueryMetadata + { _qmGoogleCloudStoragePathForLatestReport :: !(Maybe Text) + , _qmLocale :: !(Maybe Text) + , _qmFormat :: !(Maybe Text) + , _qmGoogleDrivePathForLatestReport :: !(Maybe Text) + , _qmShareEmailAddress :: !(Maybe [Text]) + , _qmRunning :: !(Maybe Bool) + , _qmDataRange :: !(Maybe Text) + , _qmLatestReportRunTimeMs :: !(Maybe Int64) + , _qmReportCount :: !(Maybe Int32) + , _qmTitle :: !(Maybe Text) + , _qmSendNotification :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueryMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qmGoogleCloudStoragePathForLatestReport' +-- +-- * 'qmLocale' +-- +-- * 'qmFormat' +-- +-- * 'qmGoogleDrivePathForLatestReport' +-- +-- * 'qmShareEmailAddress' +-- +-- * 'qmRunning' +-- +-- * 'qmDataRange' +-- +-- * 'qmLatestReportRunTimeMs' +-- +-- * 'qmReportCount' +-- +-- * 'qmTitle' +-- +-- * 'qmSendNotification' +queryMetadata + :: QueryMetadata +queryMetadata = + QueryMetadata + { _qmGoogleCloudStoragePathForLatestReport = Nothing + , _qmLocale = Nothing + , _qmFormat = Nothing + , _qmGoogleDrivePathForLatestReport = Nothing + , _qmShareEmailAddress = Nothing + , _qmRunning = Nothing + , _qmDataRange = Nothing + , _qmLatestReportRunTimeMs = Nothing + , _qmReportCount = Nothing + , _qmTitle = Nothing + , _qmSendNotification = Nothing + } + +-- | The path to the location in Google Cloud Storage where the latest report +-- is stored. +qmGoogleCloudStoragePathForLatestReport :: Lens' QueryMetadata (Maybe Text) +qmGoogleCloudStoragePathForLatestReport + = lens _qmGoogleCloudStoragePathForLatestReport + (\ s a -> + s{_qmGoogleCloudStoragePathForLatestReport = a}) + +-- | Locale of the generated reports. Valid values are cs CZECH de GERMAN en +-- ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH +-- pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN +-- CHINA_CHINESE zh-TW TAIWAN_CHINESE An locale string not in the list +-- above will generate reports in English. +qmLocale :: Lens' QueryMetadata (Maybe Text) +qmLocale = lens _qmLocale (\ s a -> s{_qmLocale = a}) + +-- | Format of the generated report. +qmFormat :: Lens' QueryMetadata (Maybe Text) +qmFormat = lens _qmFormat (\ s a -> s{_qmFormat = a}) + +-- | The path in Google Drive for the latest report. +qmGoogleDrivePathForLatestReport :: Lens' QueryMetadata (Maybe Text) +qmGoogleDrivePathForLatestReport + = lens _qmGoogleDrivePathForLatestReport + (\ s a -> s{_qmGoogleDrivePathForLatestReport = a}) + +-- | List of email addresses which are sent email notifications when the +-- report is finished. Separate from sendNotification. +qmShareEmailAddress :: Lens' QueryMetadata [Text] +qmShareEmailAddress + = lens _qmShareEmailAddress + (\ s a -> s{_qmShareEmailAddress = a}) + . _Default + . _Coerce + +-- | Whether the latest report is currently running. +qmRunning :: Lens' QueryMetadata (Maybe Bool) +qmRunning + = lens _qmRunning (\ s a -> s{_qmRunning = a}) + +-- | Range of report data. +qmDataRange :: Lens' QueryMetadata (Maybe Text) +qmDataRange + = lens _qmDataRange (\ s a -> s{_qmDataRange = a}) + +-- | The time when the latest report started to run. +qmLatestReportRunTimeMs :: Lens' QueryMetadata (Maybe Int64) +qmLatestReportRunTimeMs + = lens _qmLatestReportRunTimeMs + (\ s a -> s{_qmLatestReportRunTimeMs = a}) + +-- | Number of reports that have been generated for the query. +qmReportCount :: Lens' QueryMetadata (Maybe Int32) +qmReportCount + = lens _qmReportCount + (\ s a -> s{_qmReportCount = a}) + +-- | Query title. It is used to name the reports generated from this query. +qmTitle :: Lens' QueryMetadata (Maybe Text) +qmTitle = lens _qmTitle (\ s a -> s{_qmTitle = a}) + +-- | Whether to send an email notification when a report is ready. Default to +-- false. +qmSendNotification :: Lens' QueryMetadata (Maybe Bool) +qmSendNotification + = lens _qmSendNotification + (\ s a -> s{_qmSendNotification = a}) + +instance FromJSON QueryMetadata where + parseJSON + = withObject "QueryMetadata" + (\ o -> + QueryMetadata <$> + (o .:? "googleCloudStoragePathForLatestReport") <*> + (o .:? "locale") + <*> (o .:? "format") + <*> (o .:? "googleDrivePathForLatestReport") + <*> (o .:? "shareEmailAddress" .!= mempty) + <*> (o .:? "running") + <*> (o .:? "dataRange") + <*> (o .:? "latestReportRunTimeMs") + <*> (o .:? "reportCount") + <*> (o .:? "title") + <*> (o .:? "sendNotification")) + +instance ToJSON QueryMetadata where + toJSON QueryMetadata{..} + = object + (catMaybes + [("googleCloudStoragePathForLatestReport" .=) <$> + _qmGoogleCloudStoragePathForLatestReport, + ("locale" .=) <$> _qmLocale, + ("format" .=) <$> _qmFormat, + ("googleDrivePathForLatestReport" .=) <$> + _qmGoogleDrivePathForLatestReport, + ("shareEmailAddress" .=) <$> _qmShareEmailAddress, + ("running" .=) <$> _qmRunning, + ("dataRange" .=) <$> _qmDataRange, + ("latestReportRunTimeMs" .=) <$> + _qmLatestReportRunTimeMs, + ("reportCount" .=) <$> _qmReportCount, + ("title" .=) <$> _qmTitle, + ("sendNotification" .=) <$> _qmSendNotification]) + +-- | Request to upload line items. +-- +-- /See:/ 'uploadLineItemsRequest' smart constructor. +data UploadLineItemsRequest = UploadLineItemsRequest + { _ulirLineItems :: !(Maybe Text) + , _ulirFormat :: !(Maybe Text) + , _ulirDryRun :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UploadLineItemsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulirLineItems' +-- +-- * 'ulirFormat' +-- +-- * 'ulirDryRun' +uploadLineItemsRequest + :: UploadLineItemsRequest +uploadLineItemsRequest = + UploadLineItemsRequest + { _ulirLineItems = Nothing + , _ulirFormat = Nothing + , _ulirDryRun = Nothing + } + +-- | Line items in CSV to upload. Refer to Entity Write File Format for more +-- information on file format. +ulirLineItems :: Lens' UploadLineItemsRequest (Maybe Text) +ulirLineItems + = lens _ulirLineItems + (\ s a -> s{_ulirLineItems = a}) + +-- | Format the line items are in. Default to CSV. +ulirFormat :: Lens' UploadLineItemsRequest (Maybe Text) +ulirFormat + = lens _ulirFormat (\ s a -> s{_ulirFormat = a}) + +-- | Set to true to get upload status without actually persisting the line +-- items. +ulirDryRun :: Lens' UploadLineItemsRequest (Maybe Bool) +ulirDryRun + = lens _ulirDryRun (\ s a -> s{_ulirDryRun = a}) + +instance FromJSON UploadLineItemsRequest where + parseJSON + = withObject "UploadLineItemsRequest" + (\ o -> + UploadLineItemsRequest <$> + (o .:? "lineItems") <*> (o .:? "format") <*> + (o .:? "dryRun")) + +instance ToJSON UploadLineItemsRequest where + toJSON UploadLineItemsRequest{..} + = object + (catMaybes + [("lineItems" .=) <$> _ulirLineItems, + ("format" .=) <$> _ulirFormat, + ("dryRun" .=) <$> _ulirDryRun]) + +-- | Filter used to match traffic data in your report. +-- +-- /See:/ 'filterPair' smart constructor. +data FilterPair = FilterPair + { _fpValue :: !(Maybe Text) + , _fpType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilterPair' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fpValue' +-- +-- * 'fpType' +filterPair + :: FilterPair +filterPair = + FilterPair + { _fpValue = Nothing + , _fpType = Nothing + } + +-- | Filter value. +fpValue :: Lens' FilterPair (Maybe Text) +fpValue = lens _fpValue (\ s a -> s{_fpValue = a}) + +-- | Filter type. +fpType :: Lens' FilterPair (Maybe Text) +fpType = lens _fpType (\ s a -> s{_fpType = a}) + +instance FromJSON FilterPair where + parseJSON + = withObject "FilterPair" + (\ o -> + FilterPair <$> (o .:? "value") <*> (o .:? "type")) + +instance ToJSON FilterPair where + toJSON FilterPair{..} + = object + (catMaybes + [("value" .=) <$> _fpValue, ("type" .=) <$> _fpType]) + +-- | Request to run a stored query to generate a report. +-- +-- /See:/ 'runQueryRequest' smart constructor. +data RunQueryRequest = RunQueryRequest + { _rqrReportDataEndTimeMs :: !(Maybe Int64) + , _rqrDataRange :: !(Maybe Text) + , _rqrReportDataStartTimeMs :: !(Maybe Int64) + , _rqrTimezoneCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RunQueryRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rqrReportDataEndTimeMs' +-- +-- * 'rqrDataRange' +-- +-- * 'rqrReportDataStartTimeMs' +-- +-- * 'rqrTimezoneCode' +runQueryRequest + :: RunQueryRequest +runQueryRequest = + RunQueryRequest + { _rqrReportDataEndTimeMs = Nothing + , _rqrDataRange = Nothing + , _rqrReportDataStartTimeMs = Nothing + , _rqrTimezoneCode = Nothing + } + +-- | The ending time for the data that is shown in the report. Note, +-- reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored +-- otherwise. +rqrReportDataEndTimeMs :: Lens' RunQueryRequest (Maybe Int64) +rqrReportDataEndTimeMs + = lens _rqrReportDataEndTimeMs + (\ s a -> s{_rqrReportDataEndTimeMs = a}) + +-- | Report data range used to generate the report. +rqrDataRange :: Lens' RunQueryRequest (Maybe Text) +rqrDataRange + = lens _rqrDataRange (\ s a -> s{_rqrDataRange = a}) + +-- | The starting time for the data that is shown in the report. Note, +-- reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and +-- ignored otherwise. +rqrReportDataStartTimeMs :: Lens' RunQueryRequest (Maybe Int64) +rqrReportDataStartTimeMs + = lens _rqrReportDataStartTimeMs + (\ s a -> s{_rqrReportDataStartTimeMs = a}) + +-- | Canonical timezone code for report data time. Defaults to +-- America\/New_York. +rqrTimezoneCode :: Lens' RunQueryRequest (Maybe Text) +rqrTimezoneCode + = lens _rqrTimezoneCode + (\ s a -> s{_rqrTimezoneCode = a}) + +instance FromJSON RunQueryRequest where + parseJSON + = withObject "RunQueryRequest" + (\ o -> + RunQueryRequest <$> + (o .:? "reportDataEndTimeMs") <*> (o .:? "dataRange") + <*> (o .:? "reportDataStartTimeMs") + <*> (o .:? "timezoneCode")) + +instance ToJSON RunQueryRequest where + toJSON RunQueryRequest{..} + = object + (catMaybes + [("reportDataEndTimeMs" .=) <$> + _rqrReportDataEndTimeMs, + ("dataRange" .=) <$> _rqrDataRange, + ("reportDataStartTimeMs" .=) <$> + _rqrReportDataStartTimeMs, + ("timezoneCode" .=) <$> _rqrTimezoneCode]) + +-- | List queries response. +-- +-- /See:/ 'listQueriesResponse' smart constructor. +data ListQueriesResponse = ListQueriesResponse + { _lqrQueries :: !(Maybe [Maybe Query]) + , _lqrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListQueriesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lqrQueries' +-- +-- * 'lqrKind' +listQueriesResponse + :: ListQueriesResponse +listQueriesResponse = + ListQueriesResponse + { _lqrQueries = Nothing + , _lqrKind = "doubleclickbidmanager#listQueriesResponse" + } + +-- | Retrieved queries. +lqrQueries :: Lens' ListQueriesResponse [Maybe Query] +lqrQueries + = lens _lqrQueries (\ s a -> s{_lqrQueries = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"doubleclickbidmanager#listQueriesResponse\". +lqrKind :: Lens' ListQueriesResponse Text +lqrKind = lens _lqrKind (\ s a -> s{_lqrKind = a}) + +instance FromJSON ListQueriesResponse where + parseJSON + = withObject "ListQueriesResponse" + (\ o -> + ListQueriesResponse <$> + (o .:? "queries" .!= mempty) <*> + (o .:? "kind" .!= + "doubleclickbidmanager#listQueriesResponse")) + +instance ToJSON ListQueriesResponse where + toJSON ListQueriesResponse{..} + = object + (catMaybes + [("queries" .=) <$> _lqrQueries, + Just ("kind" .= _lqrKind)]) + +-- | Request to fetch stored line items. +-- +-- /See:/ 'downloadLineItemsRequest' smart constructor. +data DownloadLineItemsRequest = DownloadLineItemsRequest + { _dlirFilterType :: !(Maybe Text) + , _dlirFormat :: !(Maybe Text) + , _dlirFilterIds :: !(Maybe [Int64]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DownloadLineItemsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlirFilterType' +-- +-- * 'dlirFormat' +-- +-- * 'dlirFilterIds' +downloadLineItemsRequest + :: DownloadLineItemsRequest +downloadLineItemsRequest = + DownloadLineItemsRequest + { _dlirFilterType = Nothing + , _dlirFormat = Nothing + , _dlirFilterIds = Nothing + } + +-- | Filter type used to filter line items to fetch. +dlirFilterType :: Lens' DownloadLineItemsRequest (Maybe Text) +dlirFilterType + = lens _dlirFilterType + (\ s a -> s{_dlirFilterType = a}) + +-- | Format in which the line items will be returned. Default to CSV. +dlirFormat :: Lens' DownloadLineItemsRequest (Maybe Text) +dlirFormat + = lens _dlirFormat (\ s a -> s{_dlirFormat = a}) + +-- | Ids of the specified filter type used to filter line items to fetch. If +-- omitted, all the line items will be returned. +dlirFilterIds :: Lens' DownloadLineItemsRequest [Int64] +dlirFilterIds + = lens _dlirFilterIds + (\ s a -> s{_dlirFilterIds = a}) + . _Default + . _Coerce + +instance FromJSON DownloadLineItemsRequest where + parseJSON + = withObject "DownloadLineItemsRequest" + (\ o -> + DownloadLineItemsRequest <$> + (o .:? "filterType") <*> (o .:? "format") <*> + (o .:? "filterIds" .!= mempty)) + +instance ToJSON DownloadLineItemsRequest where + toJSON DownloadLineItemsRequest{..} + = object + (catMaybes + [("filterType" .=) <$> _dlirFilterType, + ("format" .=) <$> _dlirFormat, + ("filterIds" .=) <$> _dlirFilterIds]) + +-- | Upload line items response. +-- +-- /See:/ 'uploadLineItemsResponse' smart constructor. +newtype UploadLineItemsResponse = UploadLineItemsResponse + { _ulirUploadStatus :: Maybe (Maybe UploadStatus) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UploadLineItemsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulirUploadStatus' +uploadLineItemsResponse + :: UploadLineItemsResponse +uploadLineItemsResponse = + UploadLineItemsResponse + { _ulirUploadStatus = Nothing + } + +-- | Status of upload. +ulirUploadStatus :: Lens' UploadLineItemsResponse (Maybe (Maybe UploadStatus)) +ulirUploadStatus + = lens _ulirUploadStatus + (\ s a -> s{_ulirUploadStatus = a}) + +instance FromJSON UploadLineItemsResponse where + parseJSON + = withObject "UploadLineItemsResponse" + (\ o -> + UploadLineItemsResponse <$> (o .:? "uploadStatus")) + +instance ToJSON UploadLineItemsResponse where + toJSON UploadLineItemsResponse{..} + = object + (catMaybes + [("uploadStatus" .=) <$> _ulirUploadStatus]) + +-- | Report metadata. +-- +-- /See:/ 'reportMetadata' smart constructor. +data ReportMetadata = ReportMetadata + { _rmStatus :: !(Maybe (Maybe ReportStatus)) + , _rmReportDataEndTimeMs :: !(Maybe Int64) + , _rmGoogleCloudStoragePath :: !(Maybe Text) + , _rmReportDataStartTimeMs :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmStatus' +-- +-- * 'rmReportDataEndTimeMs' +-- +-- * 'rmGoogleCloudStoragePath' +-- +-- * 'rmReportDataStartTimeMs' +reportMetadata + :: ReportMetadata +reportMetadata = + ReportMetadata + { _rmStatus = Nothing + , _rmReportDataEndTimeMs = Nothing + , _rmGoogleCloudStoragePath = Nothing + , _rmReportDataStartTimeMs = Nothing + } + +-- | Report status. +rmStatus :: Lens' ReportMetadata (Maybe (Maybe ReportStatus)) +rmStatus = lens _rmStatus (\ s a -> s{_rmStatus = a}) + +-- | The ending time for the data that is shown in the report. +rmReportDataEndTimeMs :: Lens' ReportMetadata (Maybe Int64) +rmReportDataEndTimeMs + = lens _rmReportDataEndTimeMs + (\ s a -> s{_rmReportDataEndTimeMs = a}) + +-- | The path to the location in Google Cloud Storage where the report is +-- stored. +rmGoogleCloudStoragePath :: Lens' ReportMetadata (Maybe Text) +rmGoogleCloudStoragePath + = lens _rmGoogleCloudStoragePath + (\ s a -> s{_rmGoogleCloudStoragePath = a}) + +-- | The starting time for the data that is shown in the report. +rmReportDataStartTimeMs :: Lens' ReportMetadata (Maybe Int64) +rmReportDataStartTimeMs + = lens _rmReportDataStartTimeMs + (\ s a -> s{_rmReportDataStartTimeMs = a}) + +instance FromJSON ReportMetadata where + parseJSON + = withObject "ReportMetadata" + (\ o -> + ReportMetadata <$> + (o .:? "status") <*> (o .:? "reportDataEndTimeMs") + <*> (o .:? "googleCloudStoragePath") + <*> (o .:? "reportDataStartTimeMs")) + +instance ToJSON ReportMetadata where + toJSON ReportMetadata{..} + = object + (catMaybes + [("status" .=) <$> _rmStatus, + ("reportDataEndTimeMs" .=) <$> + _rmReportDataEndTimeMs, + ("googleCloudStoragePath" .=) <$> + _rmGoogleCloudStoragePath, + ("reportDataStartTimeMs" .=) <$> + _rmReportDataStartTimeMs]) + +-- | Represents a report. +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rParams :: !(Maybe (Maybe Parameters)) + , _rKey :: !(Maybe (Maybe ReportKey)) + , _rMetadata :: !(Maybe (Maybe ReportMetadata)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rParams' +-- +-- * 'rKey' +-- +-- * 'rMetadata' +report + :: Report +report = + Report + { _rParams = Nothing + , _rKey = Nothing + , _rMetadata = Nothing + } + +-- | Report parameters. +rParams :: Lens' Report (Maybe (Maybe Parameters)) +rParams = lens _rParams (\ s a -> s{_rParams = a}) + +-- | Key used to identify a report. +rKey :: Lens' Report (Maybe (Maybe ReportKey)) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | Report metadata. +rMetadata :: Lens' Report (Maybe (Maybe ReportMetadata)) +rMetadata + = lens _rMetadata (\ s a -> s{_rMetadata = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "params") <*> (o .:? "key") <*> + (o .:? "metadata")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [("params" .=) <$> _rParams, ("key" .=) <$> _rKey, + ("metadata" .=) <$> _rMetadata]) + +-- | Represents the upload status of a row in the request. +-- +-- /See:/ 'rowStatus' smart constructor. +data RowStatus = RowStatus + { _rsEntityName :: !(Maybe Text) + , _rsChanged :: !(Maybe Bool) + , _rsPersisted :: !(Maybe Bool) + , _rsRowNumber :: !(Maybe Int32) + , _rsErrors :: !(Maybe [Text]) + , _rsEntityId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RowStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsEntityName' +-- +-- * 'rsChanged' +-- +-- * 'rsPersisted' +-- +-- * 'rsRowNumber' +-- +-- * 'rsErrors' +-- +-- * 'rsEntityId' +rowStatus + :: RowStatus +rowStatus = + RowStatus + { _rsEntityName = Nothing + , _rsChanged = Nothing + , _rsPersisted = Nothing + , _rsRowNumber = Nothing + , _rsErrors = Nothing + , _rsEntityId = Nothing + } + +-- | Entity name. +rsEntityName :: Lens' RowStatus (Maybe Text) +rsEntityName + = lens _rsEntityName (\ s a -> s{_rsEntityName = a}) + +-- | Whether the stored entity is changed as a result of upload. +rsChanged :: Lens' RowStatus (Maybe Bool) +rsChanged + = lens _rsChanged (\ s a -> s{_rsChanged = a}) + +-- | Whether the entity is persisted. +rsPersisted :: Lens' RowStatus (Maybe Bool) +rsPersisted + = lens _rsPersisted (\ s a -> s{_rsPersisted = a}) + +-- | Row number. +rsRowNumber :: Lens' RowStatus (Maybe Int32) +rsRowNumber + = lens _rsRowNumber (\ s a -> s{_rsRowNumber = a}) + +-- | Reasons why the entity can\'t be uploaded. +rsErrors :: Lens' RowStatus [Text] +rsErrors + = lens _rsErrors (\ s a -> s{_rsErrors = a}) . + _Default + . _Coerce + +-- | Entity Id. +rsEntityId :: Lens' RowStatus (Maybe Int64) +rsEntityId + = lens _rsEntityId (\ s a -> s{_rsEntityId = a}) + +instance FromJSON RowStatus where + parseJSON + = withObject "RowStatus" + (\ o -> + RowStatus <$> + (o .:? "entityName") <*> (o .:? "changed") <*> + (o .:? "persisted") + <*> (o .:? "rowNumber") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "entityId")) + +instance ToJSON RowStatus where + toJSON RowStatus{..} + = object + (catMaybes + [("entityName" .=) <$> _rsEntityName, + ("changed" .=) <$> _rsChanged, + ("persisted" .=) <$> _rsPersisted, + ("rowNumber" .=) <$> _rsRowNumber, + ("errors" .=) <$> _rsErrors, + ("entityId" .=) <$> _rsEntityId]) + +-- | Key used to identify a report. +-- +-- /See:/ 'reportKey' smart constructor. +data ReportKey = ReportKey + { _rkQueryId :: !(Maybe Int64) + , _rkReportId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportKey' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rkQueryId' +-- +-- * 'rkReportId' +reportKey + :: ReportKey +reportKey = + ReportKey + { _rkQueryId = Nothing + , _rkReportId = Nothing + } + +-- | Query ID. +rkQueryId :: Lens' ReportKey (Maybe Int64) +rkQueryId + = lens _rkQueryId (\ s a -> s{_rkQueryId = a}) + +-- | Report ID. +rkReportId :: Lens' ReportKey (Maybe Int64) +rkReportId + = lens _rkReportId (\ s a -> s{_rkReportId = a}) + +instance FromJSON ReportKey where + parseJSON + = withObject "ReportKey" + (\ o -> + ReportKey <$> + (o .:? "queryId") <*> (o .:? "reportId")) + +instance ToJSON ReportKey where + toJSON ReportKey{..} + = object + (catMaybes + [("queryId" .=) <$> _rkQueryId, + ("reportId" .=) <$> _rkReportId]) + +-- | Represents the status of upload. +-- +-- /See:/ 'uploadStatus' smart constructor. +data UploadStatus = UploadStatus + { _usRowStatus :: !(Maybe [Maybe RowStatus]) + , _usErrors :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UploadStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usRowStatus' +-- +-- * 'usErrors' +uploadStatus + :: UploadStatus +uploadStatus = + UploadStatus + { _usRowStatus = Nothing + , _usErrors = Nothing + } + +-- | Per-row upload status. +usRowStatus :: Lens' UploadStatus [Maybe RowStatus] +usRowStatus + = lens _usRowStatus (\ s a -> s{_usRowStatus = a}) . + _Default + . _Coerce + +-- | Reasons why upload can\'t be completed. +usErrors :: Lens' UploadStatus [Text] +usErrors + = lens _usErrors (\ s a -> s{_usErrors = a}) . + _Default + . _Coerce + +instance FromJSON UploadStatus where + parseJSON + = withObject "UploadStatus" + (\ o -> + UploadStatus <$> + (o .:? "rowStatus" .!= mempty) <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON UploadStatus where + toJSON UploadStatus{..} + = object + (catMaybes + [("rowStatus" .=) <$> _usRowStatus, + ("errors" .=) <$> _usErrors]) + +-- | Download line items response. +-- +-- /See:/ 'downloadLineItemsResponse' smart constructor. +newtype DownloadLineItemsResponse = DownloadLineItemsResponse + { _dlirLineItems :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DownloadLineItemsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlirLineItems' +downloadLineItemsResponse + :: DownloadLineItemsResponse +downloadLineItemsResponse = + DownloadLineItemsResponse + { _dlirLineItems = Nothing + } + +-- | Retrieved line items in CSV format. Refer to Entity Write File Format +-- for more information on file format. +dlirLineItems :: Lens' DownloadLineItemsResponse (Maybe Text) +dlirLineItems + = lens _dlirLineItems + (\ s a -> s{_dlirLineItems = a}) + +instance FromJSON DownloadLineItemsResponse where + parseJSON + = withObject "DownloadLineItemsResponse" + (\ o -> + DownloadLineItemsResponse <$> (o .:? "lineItems")) + +instance ToJSON DownloadLineItemsResponse where + toJSON DownloadLineItemsResponse{..} + = object + (catMaybes [("lineItems" .=) <$> _dlirLineItems]) + +-- | Information on how frequently and when to run a query. +-- +-- /See:/ 'querySchedule' smart constructor. +data QuerySchedule = QuerySchedule + { _qsFrequency :: !(Maybe Text) + , _qsEndTimeMs :: !(Maybe Int64) + , _qsNextRunMinuteOfDay :: !(Maybe Int32) + , _qsNextRunTimezoneCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuerySchedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qsFrequency' +-- +-- * 'qsEndTimeMs' +-- +-- * 'qsNextRunMinuteOfDay' +-- +-- * 'qsNextRunTimezoneCode' +querySchedule + :: QuerySchedule +querySchedule = + QuerySchedule + { _qsFrequency = Nothing + , _qsEndTimeMs = Nothing + , _qsNextRunMinuteOfDay = Nothing + , _qsNextRunTimezoneCode = Nothing + } + +-- | How often the query is run. +qsFrequency :: Lens' QuerySchedule (Maybe Text) +qsFrequency + = lens _qsFrequency (\ s a -> s{_qsFrequency = a}) + +-- | Datetime to periodically run the query until. +qsEndTimeMs :: Lens' QuerySchedule (Maybe Int64) +qsEndTimeMs + = lens _qsEndTimeMs (\ s a -> s{_qsEndTimeMs = a}) + +-- | Time of day at which a new report will be generated, represented as +-- minutes past midnight. Range is 0 to 1439. Only applies to scheduled +-- reports. +qsNextRunMinuteOfDay :: Lens' QuerySchedule (Maybe Int32) +qsNextRunMinuteOfDay + = lens _qsNextRunMinuteOfDay + (\ s a -> s{_qsNextRunMinuteOfDay = a}) + +-- | Canonical timezone code for report generation time. Defaults to +-- America\/New_York. +qsNextRunTimezoneCode :: Lens' QuerySchedule (Maybe Text) +qsNextRunTimezoneCode + = lens _qsNextRunTimezoneCode + (\ s a -> s{_qsNextRunTimezoneCode = a}) + +instance FromJSON QuerySchedule where + parseJSON + = withObject "QuerySchedule" + (\ o -> + QuerySchedule <$> + (o .:? "frequency") <*> (o .:? "endTimeMs") <*> + (o .:? "nextRunMinuteOfDay") + <*> (o .:? "nextRunTimezoneCode")) + +instance ToJSON QuerySchedule where + toJSON QuerySchedule{..} + = object + (catMaybes + [("frequency" .=) <$> _qsFrequency, + ("endTimeMs" .=) <$> _qsEndTimeMs, + ("nextRunMinuteOfDay" .=) <$> _qsNextRunMinuteOfDay, + ("nextRunTimezoneCode" .=) <$> + _qsNextRunTimezoneCode]) + +-- | Report status. +-- +-- /See:/ 'reportStatus' smart constructor. +data ReportStatus = ReportStatus + { _rsState :: !(Maybe Text) + , _rsFinishTimeMs :: !(Maybe Int64) + , _rsFormat :: !(Maybe Text) + , _rsFailure :: !(Maybe (Maybe ReportFailure)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsState' +-- +-- * 'rsFinishTimeMs' +-- +-- * 'rsFormat' +-- +-- * 'rsFailure' +reportStatus + :: ReportStatus +reportStatus = + ReportStatus + { _rsState = Nothing + , _rsFinishTimeMs = Nothing + , _rsFormat = Nothing + , _rsFailure = Nothing + } + +-- | The state of the report. +rsState :: Lens' ReportStatus (Maybe Text) +rsState = lens _rsState (\ s a -> s{_rsState = a}) + +-- | The time when this report either completed successfully or failed. +rsFinishTimeMs :: Lens' ReportStatus (Maybe Int64) +rsFinishTimeMs + = lens _rsFinishTimeMs + (\ s a -> s{_rsFinishTimeMs = a}) + +-- | The file type of the report. +rsFormat :: Lens' ReportStatus (Maybe Text) +rsFormat = lens _rsFormat (\ s a -> s{_rsFormat = a}) + +-- | If the report failed, this records the cause. +rsFailure :: Lens' ReportStatus (Maybe (Maybe ReportFailure)) +rsFailure + = lens _rsFailure (\ s a -> s{_rsFailure = a}) + +instance FromJSON ReportStatus where + parseJSON + = withObject "ReportStatus" + (\ o -> + ReportStatus <$> + (o .:? "state") <*> (o .:? "finishTimeMs") <*> + (o .:? "format") + <*> (o .:? "failure")) + +instance ToJSON ReportStatus where + toJSON ReportStatus{..} + = object + (catMaybes + [("state" .=) <$> _rsState, + ("finishTimeMs" .=) <$> _rsFinishTimeMs, + ("format" .=) <$> _rsFormat, + ("failure" .=) <$> _rsFailure]) + +-- | Represents a query. +-- +-- /See:/ 'query' smart constructor. +data Query = Query + { _qQueryId :: !(Maybe Int64) + , _qReportDataEndTimeMs :: !(Maybe Int64) + , _qSchedule :: !(Maybe (Maybe QuerySchedule)) + , _qKind :: !Text + , _qParams :: !(Maybe (Maybe Parameters)) + , _qMetadata :: !(Maybe (Maybe QueryMetadata)) + , _qReportDataStartTimeMs :: !(Maybe Int64) + , _qTimezoneCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Query' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qQueryId' +-- +-- * 'qReportDataEndTimeMs' +-- +-- * 'qSchedule' +-- +-- * 'qKind' +-- +-- * 'qParams' +-- +-- * 'qMetadata' +-- +-- * 'qReportDataStartTimeMs' +-- +-- * 'qTimezoneCode' +query + :: Query +query = + Query + { _qQueryId = Nothing + , _qReportDataEndTimeMs = Nothing + , _qSchedule = Nothing + , _qKind = "doubleclickbidmanager#query" + , _qParams = Nothing + , _qMetadata = Nothing + , _qReportDataStartTimeMs = Nothing + , _qTimezoneCode = Nothing + } + +-- | Query ID. +qQueryId :: Lens' Query (Maybe Int64) +qQueryId = lens _qQueryId (\ s a -> s{_qQueryId = a}) + +-- | The ending time for the data that is shown in the report. Note, +-- reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES +-- and ignored otherwise. +qReportDataEndTimeMs :: Lens' Query (Maybe Int64) +qReportDataEndTimeMs + = lens _qReportDataEndTimeMs + (\ s a -> s{_qReportDataEndTimeMs = a}) + +-- | Information on how often and when to run a query. +qSchedule :: Lens' Query (Maybe (Maybe QuerySchedule)) +qSchedule + = lens _qSchedule (\ s a -> s{_qSchedule = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"doubleclickbidmanager#query\". +qKind :: Lens' Query Text +qKind = lens _qKind (\ s a -> s{_qKind = a}) + +-- | Query parameters. +qParams :: Lens' Query (Maybe (Maybe Parameters)) +qParams = lens _qParams (\ s a -> s{_qParams = a}) + +-- | Query metadata. +qMetadata :: Lens' Query (Maybe (Maybe QueryMetadata)) +qMetadata + = lens _qMetadata (\ s a -> s{_qMetadata = a}) + +-- | The starting time for the data that is shown in the report. Note, +-- reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES +-- and ignored otherwise. +qReportDataStartTimeMs :: Lens' Query (Maybe Int64) +qReportDataStartTimeMs + = lens _qReportDataStartTimeMs + (\ s a -> s{_qReportDataStartTimeMs = a}) + +-- | Canonical timezone code for report data time. Defaults to +-- America\/New_York. +qTimezoneCode :: Lens' Query (Maybe Text) +qTimezoneCode + = lens _qTimezoneCode + (\ s a -> s{_qTimezoneCode = a}) + +instance FromJSON Query where + parseJSON + = withObject "Query" + (\ o -> + Query <$> + (o .:? "queryId") <*> (o .:? "reportDataEndTimeMs") + <*> (o .:? "schedule") + <*> (o .:? "kind" .!= "doubleclickbidmanager#query") + <*> (o .:? "params") + <*> (o .:? "metadata") + <*> (o .:? "reportDataStartTimeMs") + <*> (o .:? "timezoneCode")) + +instance ToJSON Query where + toJSON Query{..} + = object + (catMaybes + [("queryId" .=) <$> _qQueryId, + ("reportDataEndTimeMs" .=) <$> _qReportDataEndTimeMs, + ("schedule" .=) <$> _qSchedule, + Just ("kind" .= _qKind), ("params" .=) <$> _qParams, + ("metadata" .=) <$> _qMetadata, + ("reportDataStartTimeMs" .=) <$> + _qReportDataStartTimeMs, + ("timezoneCode" .=) <$> _qTimezoneCode]) + +-- | Parameters of a query or report. +-- +-- /See:/ 'parameters' smart constructor. +data Parameters = Parameters + { _pMetrics :: !(Maybe [Text]) + , _pIncludeInviteData :: !(Maybe Bool) + , _pFilters :: !(Maybe [Maybe FilterPair]) + , _pGroupBys :: !(Maybe [Text]) + , _pType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Parameters' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pMetrics' +-- +-- * 'pIncludeInviteData' +-- +-- * 'pFilters' +-- +-- * 'pGroupBys' +-- +-- * 'pType' +parameters + :: Parameters +parameters = + Parameters + { _pMetrics = Nothing + , _pIncludeInviteData = Nothing + , _pFilters = Nothing + , _pGroupBys = Nothing + , _pType = Nothing + } + +-- | Metrics to include as columns in your report. +pMetrics :: Lens' Parameters [Text] +pMetrics + = lens _pMetrics (\ s a -> s{_pMetrics = a}) . + _Default + . _Coerce + +-- | Whether to include data from Invite Media. +pIncludeInviteData :: Lens' Parameters (Maybe Bool) +pIncludeInviteData + = lens _pIncludeInviteData + (\ s a -> s{_pIncludeInviteData = a}) + +-- | Filters used to match traffic data in your report. +pFilters :: Lens' Parameters [Maybe FilterPair] +pFilters + = lens _pFilters (\ s a -> s{_pFilters = a}) . + _Default + . _Coerce + +-- | Data is grouped by the filters listed in this field. +pGroupBys :: Lens' Parameters [Text] +pGroupBys + = lens _pGroupBys (\ s a -> s{_pGroupBys = a}) . + _Default + . _Coerce + +-- | Report type. +pType :: Lens' Parameters (Maybe Text) +pType = lens _pType (\ s a -> s{_pType = a}) + +instance FromJSON Parameters where + parseJSON + = withObject "Parameters" + (\ o -> + Parameters <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "includeInviteData") + <*> (o .:? "filters" .!= mempty) + <*> (o .:? "groupBys" .!= mempty) + <*> (o .:? "type")) + +instance ToJSON Parameters where + toJSON Parameters{..} + = object + (catMaybes + [("metrics" .=) <$> _pMetrics, + ("includeInviteData" .=) <$> _pIncludeInviteData, + ("filters" .=) <$> _pFilters, + ("groupBys" .=) <$> _pGroupBys, + ("type" .=) <$> _pType]) + +-- | An explanation of a report failure. +-- +-- /See:/ 'reportFailure' smart constructor. +newtype ReportFailure = ReportFailure + { _rfErrorCode :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportFailure' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rfErrorCode' +reportFailure + :: ReportFailure +reportFailure = + ReportFailure + { _rfErrorCode = Nothing + } + +-- | Error code that shows why the report was not created. +rfErrorCode :: Lens' ReportFailure (Maybe Text) +rfErrorCode + = lens _rfErrorCode (\ s a -> s{_rfErrorCode = a}) + +instance FromJSON ReportFailure where + parseJSON + = withObject "ReportFailure" + (\ o -> ReportFailure <$> (o .:? "errorCode")) + +instance ToJSON ReportFailure where + toJSON ReportFailure{..} + = object + (catMaybes [("errorCode" .=) <$> _rfErrorCode]) diff --git a/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Sum.hs b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Sum.hs new file mode 100644 index 000000000..ff4547587 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/DoubleClickBids/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickBids.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickBids.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Downloadlineitems.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Downloadlineitems.hs new file mode 100644 index 000000000..604ca3d48 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Downloadlineitems.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Lineitems.Downloadlineitems +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves line items in CSV format. +-- +-- /See:/ for @DoubleclickbidmanagerLineitemsDownloadlineitems@. +module Doubleclickbidmanager.Lineitems.Downloadlineitems + ( + -- * REST Resource + LineitemsDownloadlineitemsAPI + + -- * Creating a Request + , lineitemsDownloadlineitems + , LineitemsDownloadlineitems + + -- * Request Lenses + , ldQuotaUser + , ldPrettyPrint + , ldUserIp + , ldKey + , ldOauthToken + , ldFields + , ldAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerLineitemsDownloadlineitems@ which the +-- 'LineitemsDownloadlineitems' request conforms to. +type LineitemsDownloadlineitemsAPI = + "lineitems" :> + "downloadlineitems" :> + Post '[JSON] DownloadLineItemsResponse + +-- | Retrieves line items in CSV format. +-- +-- /See:/ 'lineitemsDownloadlineitems' smart constructor. +data LineitemsDownloadlineitems = LineitemsDownloadlineitems + { _ldQuotaUser :: !(Maybe Text) + , _ldPrettyPrint :: !Bool + , _ldUserIp :: !(Maybe Text) + , _ldKey :: !(Maybe Text) + , _ldOauthToken :: !(Maybe Text) + , _ldFields :: !(Maybe Text) + , _ldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LineitemsDownloadlineitems'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldQuotaUser' +-- +-- * 'ldPrettyPrint' +-- +-- * 'ldUserIp' +-- +-- * 'ldKey' +-- +-- * 'ldOauthToken' +-- +-- * 'ldFields' +-- +-- * 'ldAlt' +lineitemsDownloadlineitems + :: LineitemsDownloadlineitems +lineitemsDownloadlineitems = + LineitemsDownloadlineitems + { _ldQuotaUser = Nothing + , _ldPrettyPrint = True + , _ldUserIp = Nothing + , _ldKey = Nothing + , _ldOauthToken = Nothing + , _ldFields = Nothing + , _ldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ldQuotaUser :: Lens' LineitemsDownloadlineitems' (Maybe Text) +ldQuotaUser + = lens _ldQuotaUser (\ s a -> s{_ldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ldPrettyPrint :: Lens' LineitemsDownloadlineitems' Bool +ldPrettyPrint + = lens _ldPrettyPrint + (\ s a -> s{_ldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ldUserIp :: Lens' LineitemsDownloadlineitems' (Maybe Text) +ldUserIp = lens _ldUserIp (\ s a -> s{_ldUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ldKey :: Lens' LineitemsDownloadlineitems' (Maybe Text) +ldKey = lens _ldKey (\ s a -> s{_ldKey = a}) + +-- | OAuth 2.0 token for the current user. +ldOauthToken :: Lens' LineitemsDownloadlineitems' (Maybe Text) +ldOauthToken + = lens _ldOauthToken (\ s a -> s{_ldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ldFields :: Lens' LineitemsDownloadlineitems' (Maybe Text) +ldFields = lens _ldFields (\ s a -> s{_ldFields = a}) + +-- | Data format for the response. +ldAlt :: Lens' LineitemsDownloadlineitems' Text +ldAlt = lens _ldAlt (\ s a -> s{_ldAlt = a}) + +instance GoogleRequest LineitemsDownloadlineitems' + where + type Rs LineitemsDownloadlineitems' = + DownloadLineItemsResponse + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u LineitemsDownloadlineitems{..} + = go _ldQuotaUser _ldPrettyPrint _ldUserIp _ldKey + _ldOauthToken + _ldFields + _ldAlt + where go + = clientWithRoute + (Proxy :: Proxy LineitemsDownloadlineitemsAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Uploadlineitems.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Uploadlineitems.hs new file mode 100644 index 000000000..e5c801c52 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Lineitems/Uploadlineitems.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Lineitems.Uploadlineitems +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads line items in CSV format. +-- +-- /See:/ for @DoubleclickbidmanagerLineitemsUploadlineitems@. +module Doubleclickbidmanager.Lineitems.Uploadlineitems + ( + -- * REST Resource + LineitemsUploadlineitemsAPI + + -- * Creating a Request + , lineitemsUploadlineitems + , LineitemsUploadlineitems + + -- * Request Lenses + , luQuotaUser + , luPrettyPrint + , luUserIp + , luKey + , luOauthToken + , luFields + , luAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerLineitemsUploadlineitems@ which the +-- 'LineitemsUploadlineitems' request conforms to. +type LineitemsUploadlineitemsAPI = + "lineitems" :> + "uploadlineitems" :> + Post '[JSON] UploadLineItemsResponse + +-- | Uploads line items in CSV format. +-- +-- /See:/ 'lineitemsUploadlineitems' smart constructor. +data LineitemsUploadlineitems = LineitemsUploadlineitems + { _luQuotaUser :: !(Maybe Text) + , _luPrettyPrint :: !Bool + , _luUserIp :: !(Maybe Text) + , _luKey :: !(Maybe Text) + , _luOauthToken :: !(Maybe Text) + , _luFields :: !(Maybe Text) + , _luAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LineitemsUploadlineitems'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'luQuotaUser' +-- +-- * 'luPrettyPrint' +-- +-- * 'luUserIp' +-- +-- * 'luKey' +-- +-- * 'luOauthToken' +-- +-- * 'luFields' +-- +-- * 'luAlt' +lineitemsUploadlineitems + :: LineitemsUploadlineitems +lineitemsUploadlineitems = + LineitemsUploadlineitems + { _luQuotaUser = Nothing + , _luPrettyPrint = True + , _luUserIp = Nothing + , _luKey = Nothing + , _luOauthToken = Nothing + , _luFields = Nothing + , _luAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +luQuotaUser :: Lens' LineitemsUploadlineitems' (Maybe Text) +luQuotaUser + = lens _luQuotaUser (\ s a -> s{_luQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +luPrettyPrint :: Lens' LineitemsUploadlineitems' Bool +luPrettyPrint + = lens _luPrettyPrint + (\ s a -> s{_luPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +luUserIp :: Lens' LineitemsUploadlineitems' (Maybe Text) +luUserIp = lens _luUserIp (\ s a -> s{_luUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +luKey :: Lens' LineitemsUploadlineitems' (Maybe Text) +luKey = lens _luKey (\ s a -> s{_luKey = a}) + +-- | OAuth 2.0 token for the current user. +luOauthToken :: Lens' LineitemsUploadlineitems' (Maybe Text) +luOauthToken + = lens _luOauthToken (\ s a -> s{_luOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +luFields :: Lens' LineitemsUploadlineitems' (Maybe Text) +luFields = lens _luFields (\ s a -> s{_luFields = a}) + +-- | Data format for the response. +luAlt :: Lens' LineitemsUploadlineitems' Text +luAlt = lens _luAlt (\ s a -> s{_luAlt = a}) + +instance GoogleRequest LineitemsUploadlineitems' + where + type Rs LineitemsUploadlineitems' = + UploadLineItemsResponse + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u LineitemsUploadlineitems{..} + = go _luQuotaUser _luPrettyPrint _luUserIp _luKey + _luOauthToken + _luFields + _luAlt + where go + = clientWithRoute + (Proxy :: Proxy LineitemsUploadlineitemsAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Createquery.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Createquery.hs new file mode 100644 index 000000000..3c8abb59f --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Createquery.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Queries.Createquery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a query. +-- +-- /See:/ for @DoubleclickbidmanagerQueriesCreatequery@. +module Doubleclickbidmanager.Queries.Createquery + ( + -- * REST Resource + QueriesCreatequeryAPI + + -- * Creating a Request + , queriesCreatequery + , QueriesCreatequery + + -- * Request Lenses + , qcQuotaUser + , qcPrettyPrint + , qcUserIp + , qcKey + , qcOauthToken + , qcFields + , qcAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerQueriesCreatequery@ which the +-- 'QueriesCreatequery' request conforms to. +type QueriesCreatequeryAPI = + "query" :> Post '[JSON] Query + +-- | Creates a query. +-- +-- /See:/ 'queriesCreatequery' smart constructor. +data QueriesCreatequery = QueriesCreatequery + { _qcQuotaUser :: !(Maybe Text) + , _qcPrettyPrint :: !Bool + , _qcUserIp :: !(Maybe Text) + , _qcKey :: !(Maybe Text) + , _qcOauthToken :: !(Maybe Text) + , _qcFields :: !(Maybe Text) + , _qcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueriesCreatequery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qcQuotaUser' +-- +-- * 'qcPrettyPrint' +-- +-- * 'qcUserIp' +-- +-- * 'qcKey' +-- +-- * 'qcOauthToken' +-- +-- * 'qcFields' +-- +-- * 'qcAlt' +queriesCreatequery + :: QueriesCreatequery +queriesCreatequery = + QueriesCreatequery + { _qcQuotaUser = Nothing + , _qcPrettyPrint = True + , _qcUserIp = Nothing + , _qcKey = Nothing + , _qcOauthToken = Nothing + , _qcFields = Nothing + , _qcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qcQuotaUser :: Lens' QueriesCreatequery' (Maybe Text) +qcQuotaUser + = lens _qcQuotaUser (\ s a -> s{_qcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qcPrettyPrint :: Lens' QueriesCreatequery' Bool +qcPrettyPrint + = lens _qcPrettyPrint + (\ s a -> s{_qcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qcUserIp :: Lens' QueriesCreatequery' (Maybe Text) +qcUserIp = lens _qcUserIp (\ s a -> s{_qcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qcKey :: Lens' QueriesCreatequery' (Maybe Text) +qcKey = lens _qcKey (\ s a -> s{_qcKey = a}) + +-- | OAuth 2.0 token for the current user. +qcOauthToken :: Lens' QueriesCreatequery' (Maybe Text) +qcOauthToken + = lens _qcOauthToken (\ s a -> s{_qcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qcFields :: Lens' QueriesCreatequery' (Maybe Text) +qcFields = lens _qcFields (\ s a -> s{_qcFields = a}) + +-- | Data format for the response. +qcAlt :: Lens' QueriesCreatequery' Text +qcAlt = lens _qcAlt (\ s a -> s{_qcAlt = a}) + +instance GoogleRequest QueriesCreatequery' where + type Rs QueriesCreatequery' = Query + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u QueriesCreatequery{..} + = go _qcQuotaUser _qcPrettyPrint _qcUserIp _qcKey + _qcOauthToken + _qcFields + _qcAlt + where go + = clientWithRoute + (Proxy :: Proxy QueriesCreatequeryAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Deletequery.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Deletequery.hs new file mode 100644 index 000000000..a21eb18fe --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Deletequery.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Queries.Deletequery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a stored query as well as the associated stored reports. +-- +-- /See:/ for @DoubleclickbidmanagerQueriesDeletequery@. +module Doubleclickbidmanager.Queries.Deletequery + ( + -- * REST Resource + QueriesDeletequeryAPI + + -- * Creating a Request + , queriesDeletequery + , QueriesDeletequery + + -- * Request Lenses + , qdQuotaUser + , qdQueryId + , qdPrettyPrint + , qdUserIp + , qdKey + , qdOauthToken + , qdFields + , qdAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerQueriesDeletequery@ which the +-- 'QueriesDeletequery' request conforms to. +type QueriesDeletequeryAPI = + "query" :> + Capture "queryId" Int64 :> Delete '[JSON] () + +-- | Deletes a stored query as well as the associated stored reports. +-- +-- /See:/ 'queriesDeletequery' smart constructor. +data QueriesDeletequery = QueriesDeletequery + { _qdQuotaUser :: !(Maybe Text) + , _qdQueryId :: !Int64 + , _qdPrettyPrint :: !Bool + , _qdUserIp :: !(Maybe Text) + , _qdKey :: !(Maybe Text) + , _qdOauthToken :: !(Maybe Text) + , _qdFields :: !(Maybe Text) + , _qdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueriesDeletequery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qdQuotaUser' +-- +-- * 'qdQueryId' +-- +-- * 'qdPrettyPrint' +-- +-- * 'qdUserIp' +-- +-- * 'qdKey' +-- +-- * 'qdOauthToken' +-- +-- * 'qdFields' +-- +-- * 'qdAlt' +queriesDeletequery + :: Int64 -- ^ 'queryId' + -> QueriesDeletequery +queriesDeletequery pQdQueryId_ = + QueriesDeletequery + { _qdQuotaUser = Nothing + , _qdQueryId = pQdQueryId_ + , _qdPrettyPrint = True + , _qdUserIp = Nothing + , _qdKey = Nothing + , _qdOauthToken = Nothing + , _qdFields = Nothing + , _qdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qdQuotaUser :: Lens' QueriesDeletequery' (Maybe Text) +qdQuotaUser + = lens _qdQuotaUser (\ s a -> s{_qdQuotaUser = a}) + +-- | Query ID to delete. +qdQueryId :: Lens' QueriesDeletequery' Int64 +qdQueryId + = lens _qdQueryId (\ s a -> s{_qdQueryId = a}) + +-- | Returns response with indentations and line breaks. +qdPrettyPrint :: Lens' QueriesDeletequery' Bool +qdPrettyPrint + = lens _qdPrettyPrint + (\ s a -> s{_qdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qdUserIp :: Lens' QueriesDeletequery' (Maybe Text) +qdUserIp = lens _qdUserIp (\ s a -> s{_qdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qdKey :: Lens' QueriesDeletequery' (Maybe Text) +qdKey = lens _qdKey (\ s a -> s{_qdKey = a}) + +-- | OAuth 2.0 token for the current user. +qdOauthToken :: Lens' QueriesDeletequery' (Maybe Text) +qdOauthToken + = lens _qdOauthToken (\ s a -> s{_qdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qdFields :: Lens' QueriesDeletequery' (Maybe Text) +qdFields = lens _qdFields (\ s a -> s{_qdFields = a}) + +-- | Data format for the response. +qdAlt :: Lens' QueriesDeletequery' Text +qdAlt = lens _qdAlt (\ s a -> s{_qdAlt = a}) + +instance GoogleRequest QueriesDeletequery' where + type Rs QueriesDeletequery' = () + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u QueriesDeletequery{..} + = go _qdQuotaUser _qdQueryId _qdPrettyPrint _qdUserIp + _qdKey + _qdOauthToken + _qdFields + _qdAlt + where go + = clientWithRoute + (Proxy :: Proxy QueriesDeletequeryAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Getquery.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Getquery.hs new file mode 100644 index 000000000..caece8e1d --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Getquery.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Queries.Getquery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a stored query. +-- +-- /See:/ for @DoubleclickbidmanagerQueriesGetquery@. +module Doubleclickbidmanager.Queries.Getquery + ( + -- * REST Resource + QueriesGetqueryAPI + + -- * Creating a Request + , queriesGetquery + , QueriesGetquery + + -- * Request Lenses + , qgQuotaUser + , qgQueryId + , qgPrettyPrint + , qgUserIp + , qgKey + , qgOauthToken + , qgFields + , qgAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerQueriesGetquery@ which the +-- 'QueriesGetquery' request conforms to. +type QueriesGetqueryAPI = + "query" :> + Capture "queryId" Int64 :> Get '[JSON] Query + +-- | Retrieves a stored query. +-- +-- /See:/ 'queriesGetquery' smart constructor. +data QueriesGetquery = QueriesGetquery + { _qgQuotaUser :: !(Maybe Text) + , _qgQueryId :: !Int64 + , _qgPrettyPrint :: !Bool + , _qgUserIp :: !(Maybe Text) + , _qgKey :: !(Maybe Text) + , _qgOauthToken :: !(Maybe Text) + , _qgFields :: !(Maybe Text) + , _qgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueriesGetquery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qgQuotaUser' +-- +-- * 'qgQueryId' +-- +-- * 'qgPrettyPrint' +-- +-- * 'qgUserIp' +-- +-- * 'qgKey' +-- +-- * 'qgOauthToken' +-- +-- * 'qgFields' +-- +-- * 'qgAlt' +queriesGetquery + :: Int64 -- ^ 'queryId' + -> QueriesGetquery +queriesGetquery pQgQueryId_ = + QueriesGetquery + { _qgQuotaUser = Nothing + , _qgQueryId = pQgQueryId_ + , _qgPrettyPrint = True + , _qgUserIp = Nothing + , _qgKey = Nothing + , _qgOauthToken = Nothing + , _qgFields = Nothing + , _qgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qgQuotaUser :: Lens' QueriesGetquery' (Maybe Text) +qgQuotaUser + = lens _qgQuotaUser (\ s a -> s{_qgQuotaUser = a}) + +-- | Query ID to retrieve. +qgQueryId :: Lens' QueriesGetquery' Int64 +qgQueryId + = lens _qgQueryId (\ s a -> s{_qgQueryId = a}) + +-- | Returns response with indentations and line breaks. +qgPrettyPrint :: Lens' QueriesGetquery' Bool +qgPrettyPrint + = lens _qgPrettyPrint + (\ s a -> s{_qgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qgUserIp :: Lens' QueriesGetquery' (Maybe Text) +qgUserIp = lens _qgUserIp (\ s a -> s{_qgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qgKey :: Lens' QueriesGetquery' (Maybe Text) +qgKey = lens _qgKey (\ s a -> s{_qgKey = a}) + +-- | OAuth 2.0 token for the current user. +qgOauthToken :: Lens' QueriesGetquery' (Maybe Text) +qgOauthToken + = lens _qgOauthToken (\ s a -> s{_qgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qgFields :: Lens' QueriesGetquery' (Maybe Text) +qgFields = lens _qgFields (\ s a -> s{_qgFields = a}) + +-- | Data format for the response. +qgAlt :: Lens' QueriesGetquery' Text +qgAlt = lens _qgAlt (\ s a -> s{_qgAlt = a}) + +instance GoogleRequest QueriesGetquery' where + type Rs QueriesGetquery' = Query + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u QueriesGetquery{..} + = go _qgQuotaUser _qgQueryId _qgPrettyPrint _qgUserIp + _qgKey + _qgOauthToken + _qgFields + _qgAlt + where go + = clientWithRoute (Proxy :: Proxy QueriesGetqueryAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Listqueries.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Listqueries.hs new file mode 100644 index 000000000..d039fdd76 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Listqueries.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Queries.Listqueries +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves stored queries. +-- +-- /See:/ for @DoubleclickbidmanagerQueriesListqueries@. +module Doubleclickbidmanager.Queries.Listqueries + ( + -- * REST Resource + QueriesListqueriesAPI + + -- * Creating a Request + , queriesListqueries + , QueriesListqueries + + -- * Request Lenses + , qlQuotaUser + , qlPrettyPrint + , qlUserIp + , qlKey + , qlOauthToken + , qlFields + , qlAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerQueriesListqueries@ which the +-- 'QueriesListqueries' request conforms to. +type QueriesListqueriesAPI = + "queries" :> Get '[JSON] ListQueriesResponse + +-- | Retrieves stored queries. +-- +-- /See:/ 'queriesListqueries' smart constructor. +data QueriesListqueries = QueriesListqueries + { _qlQuotaUser :: !(Maybe Text) + , _qlPrettyPrint :: !Bool + , _qlUserIp :: !(Maybe Text) + , _qlKey :: !(Maybe Text) + , _qlOauthToken :: !(Maybe Text) + , _qlFields :: !(Maybe Text) + , _qlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueriesListqueries'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qlQuotaUser' +-- +-- * 'qlPrettyPrint' +-- +-- * 'qlUserIp' +-- +-- * 'qlKey' +-- +-- * 'qlOauthToken' +-- +-- * 'qlFields' +-- +-- * 'qlAlt' +queriesListqueries + :: QueriesListqueries +queriesListqueries = + QueriesListqueries + { _qlQuotaUser = Nothing + , _qlPrettyPrint = True + , _qlUserIp = Nothing + , _qlKey = Nothing + , _qlOauthToken = Nothing + , _qlFields = Nothing + , _qlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qlQuotaUser :: Lens' QueriesListqueries' (Maybe Text) +qlQuotaUser + = lens _qlQuotaUser (\ s a -> s{_qlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qlPrettyPrint :: Lens' QueriesListqueries' Bool +qlPrettyPrint + = lens _qlPrettyPrint + (\ s a -> s{_qlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qlUserIp :: Lens' QueriesListqueries' (Maybe Text) +qlUserIp = lens _qlUserIp (\ s a -> s{_qlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qlKey :: Lens' QueriesListqueries' (Maybe Text) +qlKey = lens _qlKey (\ s a -> s{_qlKey = a}) + +-- | OAuth 2.0 token for the current user. +qlOauthToken :: Lens' QueriesListqueries' (Maybe Text) +qlOauthToken + = lens _qlOauthToken (\ s a -> s{_qlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qlFields :: Lens' QueriesListqueries' (Maybe Text) +qlFields = lens _qlFields (\ s a -> s{_qlFields = a}) + +-- | Data format for the response. +qlAlt :: Lens' QueriesListqueries' Text +qlAlt = lens _qlAlt (\ s a -> s{_qlAlt = a}) + +instance GoogleRequest QueriesListqueries' where + type Rs QueriesListqueries' = ListQueriesResponse + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u QueriesListqueries{..} + = go _qlQuotaUser _qlPrettyPrint _qlUserIp _qlKey + _qlOauthToken + _qlFields + _qlAlt + where go + = clientWithRoute + (Proxy :: Proxy QueriesListqueriesAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Runquery.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Runquery.hs new file mode 100644 index 000000000..04960c2db --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Queries/Runquery.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Queries.Runquery +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Runs a stored query to generate a report. +-- +-- /See:/ for @DoubleclickbidmanagerQueriesRunquery@. +module Doubleclickbidmanager.Queries.Runquery + ( + -- * REST Resource + QueriesRunqueryAPI + + -- * Creating a Request + , queriesRunquery + , QueriesRunquery + + -- * Request Lenses + , qrQuotaUser + , qrQueryId + , qrPrettyPrint + , qrUserIp + , qrKey + , qrOauthToken + , qrFields + , qrAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerQueriesRunquery@ which the +-- 'QueriesRunquery' request conforms to. +type QueriesRunqueryAPI = + "query" :> Capture "queryId" Int64 :> Post '[JSON] () + +-- | Runs a stored query to generate a report. +-- +-- /See:/ 'queriesRunquery' smart constructor. +data QueriesRunquery = QueriesRunquery + { _qrQuotaUser :: !(Maybe Text) + , _qrQueryId :: !Int64 + , _qrPrettyPrint :: !Bool + , _qrUserIp :: !(Maybe Text) + , _qrKey :: !(Maybe Text) + , _qrOauthToken :: !(Maybe Text) + , _qrFields :: !(Maybe Text) + , _qrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueriesRunquery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrQuotaUser' +-- +-- * 'qrQueryId' +-- +-- * 'qrPrettyPrint' +-- +-- * 'qrUserIp' +-- +-- * 'qrKey' +-- +-- * 'qrOauthToken' +-- +-- * 'qrFields' +-- +-- * 'qrAlt' +queriesRunquery + :: Int64 -- ^ 'queryId' + -> QueriesRunquery +queriesRunquery pQrQueryId_ = + QueriesRunquery + { _qrQuotaUser = Nothing + , _qrQueryId = pQrQueryId_ + , _qrPrettyPrint = True + , _qrUserIp = Nothing + , _qrKey = Nothing + , _qrOauthToken = Nothing + , _qrFields = Nothing + , _qrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qrQuotaUser :: Lens' QueriesRunquery' (Maybe Text) +qrQuotaUser + = lens _qrQuotaUser (\ s a -> s{_qrQuotaUser = a}) + +-- | Query ID to run. +qrQueryId :: Lens' QueriesRunquery' Int64 +qrQueryId + = lens _qrQueryId (\ s a -> s{_qrQueryId = a}) + +-- | Returns response with indentations and line breaks. +qrPrettyPrint :: Lens' QueriesRunquery' Bool +qrPrettyPrint + = lens _qrPrettyPrint + (\ s a -> s{_qrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qrUserIp :: Lens' QueriesRunquery' (Maybe Text) +qrUserIp = lens _qrUserIp (\ s a -> s{_qrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qrKey :: Lens' QueriesRunquery' (Maybe Text) +qrKey = lens _qrKey (\ s a -> s{_qrKey = a}) + +-- | OAuth 2.0 token for the current user. +qrOauthToken :: Lens' QueriesRunquery' (Maybe Text) +qrOauthToken + = lens _qrOauthToken (\ s a -> s{_qrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qrFields :: Lens' QueriesRunquery' (Maybe Text) +qrFields = lens _qrFields (\ s a -> s{_qrFields = a}) + +-- | Data format for the response. +qrAlt :: Lens' QueriesRunquery' Text +qrAlt = lens _qrAlt (\ s a -> s{_qrAlt = a}) + +instance GoogleRequest QueriesRunquery' where + type Rs QueriesRunquery' = () + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u QueriesRunquery{..} + = go _qrQuotaUser _qrQueryId _qrPrettyPrint _qrUserIp + _qrKey + _qrOauthToken + _qrFields + _qrAlt + where go + = clientWithRoute (Proxy :: Proxy QueriesRunqueryAPI) + r + u diff --git a/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Reports/Listreports.hs b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Reports/Listreports.hs new file mode 100644 index 000000000..82e64dc89 --- /dev/null +++ b/gogol-doubleclick-bids/gen/Network/Google/Resource/Doubleclickbidmanager/Reports/Listreports.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Doubleclickbidmanager.Reports.Listreports +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves stored reports. +-- +-- /See:/ for @DoubleclickbidmanagerReportsListreports@. +module Doubleclickbidmanager.Reports.Listreports + ( + -- * REST Resource + ReportsListreportsAPI + + -- * Creating a Request + , reportsListreports + , ReportsListreports + + -- * Request Lenses + , rlQuotaUser + , rlQueryId + , rlPrettyPrint + , rlUserIp + , rlKey + , rlOauthToken + , rlFields + , rlAlt + ) where + +import Network.Google.DoubleClickBids.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclickbidmanagerReportsListreports@ which the +-- 'ReportsListreports' request conforms to. +type ReportsListreportsAPI = + "queries" :> + Capture "queryId" Int64 :> + "reports" :> Get '[JSON] ListReportsResponse + +-- | Retrieves stored reports. +-- +-- /See:/ 'reportsListreports' smart constructor. +data ReportsListreports = ReportsListreports + { _rlQuotaUser :: !(Maybe Text) + , _rlQueryId :: !Int64 + , _rlPrettyPrint :: !Bool + , _rlUserIp :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlOauthToken :: !(Maybe Text) + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsListreports'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlQueryId' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlUserIp' +-- +-- * 'rlKey' +-- +-- * 'rlOauthToken' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +reportsListreports + :: Int64 -- ^ 'queryId' + -> ReportsListreports +reportsListreports pRlQueryId_ = + ReportsListreports + { _rlQuotaUser = Nothing + , _rlQueryId = pRlQueryId_ + , _rlPrettyPrint = True + , _rlUserIp = Nothing + , _rlKey = Nothing + , _rlOauthToken = Nothing + , _rlFields = Nothing + , _rlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' ReportsListreports' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Query ID with which the reports are associated. +rlQueryId :: Lens' ReportsListreports' Int64 +rlQueryId + = lens _rlQueryId (\ s a -> s{_rlQueryId = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' ReportsListreports' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' ReportsListreports' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' ReportsListreports' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' ReportsListreports' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' ReportsListreports' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' ReportsListreports' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest ReportsListreports' where + type Rs ReportsListreports' = ListReportsResponse + request = requestWithRoute defReq doubleClickBidsURL + requestWithRoute r u ReportsListreports{..} + = go _rlQuotaUser _rlQueryId _rlPrettyPrint _rlUserIp + _rlKey + _rlOauthToken + _rlFields + _rlAlt + where go + = clientWithRoute + (Proxy :: Proxy ReportsListreportsAPI) + r + u diff --git a/gogol-doubleclick-bids/gogol-doubleclick-bids.cabal b/gogol-doubleclick-bids/gogol-doubleclick-bids.cabal new file mode 100644 index 000000000..833658210 --- /dev/null +++ b/gogol-doubleclick-bids/gogol-doubleclick-bids.cabal @@ -0,0 +1,50 @@ +name: gogol-doubleclick-bids +version: 0.0.1 +synopsis: DoubleClick Bid Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for viewing and managing your reports in DoubleClick Bid Manager. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.DoubleClickBids + , Network.Google.DoubleClickBids.Types + , Network.Google.Resource.Doubleclickbidmanager.Lineitems.Downloadlineitems + , Network.Google.Resource.Doubleclickbidmanager.Lineitems.Uploadlineitems + , Network.Google.Resource.Doubleclickbidmanager.Queries.Createquery + , Network.Google.Resource.Doubleclickbidmanager.Queries.Deletequery + , Network.Google.Resource.Doubleclickbidmanager.Queries.Getquery + , Network.Google.Resource.Doubleclickbidmanager.Queries.Listqueries + , Network.Google.Resource.Doubleclickbidmanager.Queries.Runquery + , Network.Google.Resource.Doubleclickbidmanager.Reports.Listreports + + other-modules: + Network.Google.DoubleClickBids.Types.Product + , Network.Google.DoubleClickBids.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-doubleclick-bids/src/.gitkeep b/gogol-doubleclick-bids/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-doubleclick-search/LICENSE b/gogol-doubleclick-search/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-doubleclick-search/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-doubleclick-search/Makefile b/gogol-doubleclick-search/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-doubleclick-search/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-doubleclick-search/README.md b/gogol-doubleclick-search/README.md new file mode 100644 index 000000000..830280e66 --- /dev/null +++ b/gogol-doubleclick-search/README.md @@ -0,0 +1,28 @@ +# gogol-doubleclick-search + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the DoubleClick Search API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-doubleclick-search` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-doubleclick-search/Setup.hs b/gogol-doubleclick-search/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-doubleclick-search/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch.hs b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch.hs new file mode 100644 index 000000000..e6a3cd836 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.DoubleClickSearch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Report and modify your advertising data in DoubleClick Search (for +-- example, campaigns, ad groups, keywords, and conversions). +-- +-- /See:/ +module Network.Google.DoubleClickSearch + ( + -- * API + DoubleClickSearchAPI + , doubleClickSearchAPI + , doubleClickSearchURL + + -- * Service Methods + + -- * REST Resources + + -- ** DoubleclicksearchConversionGet + , module DoubleClickSearch.Conversion.Get + + -- ** DoubleclicksearchConversionInsert + , module DoubleClickSearch.Conversion.Insert + + -- ** DoubleclicksearchConversionPatch + , module DoubleClickSearch.Conversion.Patch + + -- ** DoubleclicksearchConversionUpdate + , module DoubleClickSearch.Conversion.Update + + -- ** DoubleclicksearchConversionUpdateAvailability + , module DoubleClickSearch.Conversion.UpdateAvailability + + -- ** DoubleclicksearchReportsGenerate + , module DoubleClickSearch.Reports.Generate + + -- ** DoubleclicksearchReportsGet + , module DoubleClickSearch.Reports.Get + + -- ** DoubleclicksearchReportsGetFile + , module DoubleClickSearch.Reports.GetFile + + -- ** DoubleclicksearchReportsRequest + , module DoubleClickSearch.Reports.Request + + -- ** DoubleclicksearchSavedColumnsList + , module DoubleClickSearch.SavedColumns.List + + -- * Types + + -- ** ReportRow + , ReportRow + , reportRow + + -- ** ReportRequest + , ReportRequest + , reportRequest + , rrMaxRowsPerFile + , rrReportScope + , rrStatisticsCurrency + , rrTimeRange + , rrOrderBy + , rrFilters + , rrIncludeRemovedEntities + , rrIncludeDeletedEntities + , rrDownloadFormat + , rrStartRow + , rrColumns + , rrReportType + , rrVerifySingleTimeZone + , rrRowCount + + -- ** Report + , Report + , report + , rKind + , rRows + , rStatisticsCurrencyCode + , rIsReportReady + , rFiles + , rId + , rStatisticsTimeZone + , rRowCount + , rRequest + + -- ** UpdateAvailabilityRequest + , UpdateAvailabilityRequest + , updateAvailabilityRequest + , uarAvailabilities + + -- ** Availability + , Availability + , availability + , aAgencyId + , aAdvertiserId + , aSegmentationId + , aSegmentationName + , aAvailabilityTimestamp + , aSegmentationType + + -- ** CustomMetric + , CustomMetric + , customMetric + , cmValue + , cmName + + -- ** ConversionList + , ConversionList + , conversionList + , clKind + , clConversion + + -- ** ReportAPIColumnSpec + , ReportAPIColumnSpec + , reportAPIColumnSpec + , racsCustomDimensionName + , racsSavedColumnName + , racsGroupByColumn + , racsCustomMetricName + , racsEndDate + , racsStartDate + , racsHeaderText + , racsPlatformSource + , racsColumnName + + -- ** Conversion + , Conversion + , conversion + , cAdGroupId + , cConversionModifiedTimestamp + , cState + , cEngineAccountId + , cAgencyId + , cCurrencyCode + , cStoreId + , cDsConversionId + , cConversionId + , cAdvertiserId + , cSegmentationId + , cChannel + , cProductCountry + , cCampaignId + , cCriterionId + , cConversionTimestamp + , cAttributionModel + , cSegmentationName + , cProductLanguage + , cCustomMetric + , cCountMillis + , cQuantityMillis + , cAdId + , cDeviceType + , cType + , cCustomDimension + , cFloodlightOrderId + , cRevenueMicros + , cClickId + , cInventoryAccountId + , cSegmentationType + , cProductId + , cProductGroupId + + -- ** SavedColumn + , SavedColumn + , savedColumn + , scSavedColumnName + , scKind + , scType + + -- ** UpdateAvailabilityResponse + , UpdateAvailabilityResponse + , updateAvailabilityResponse + , uAvailabilities + + -- ** CustomDimension + , CustomDimension + , customDimension + , cdValue + , cdName + + -- ** SavedColumnList + , SavedColumnList + , savedColumnList + , sclKind + , sclItems + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude +import Network.Google.Resource.DoubleClickSearch.Conversion.Get +import Network.Google.Resource.DoubleClickSearch.Conversion.Insert +import Network.Google.Resource.DoubleClickSearch.Conversion.Patch +import Network.Google.Resource.DoubleClickSearch.Conversion.Update +import Network.Google.Resource.DoubleClickSearch.Conversion.UpdateAvailability +import Network.Google.Resource.DoubleClickSearch.Reports.Generate +import Network.Google.Resource.DoubleClickSearch.Reports.Get +import Network.Google.Resource.DoubleClickSearch.Reports.GetFile +import Network.Google.Resource.DoubleClickSearch.Reports.Request +import Network.Google.Resource.DoubleClickSearch.SavedColumns.List + +{- $resources +TODO +-} + +type DoubleClickSearchAPI = + Reports :<|> SavedColumns :<|> Conversion + +doubleClickSearchAPI :: Proxy DoubleClickSearchAPI +doubleClickSearchAPI = Proxy diff --git a/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types.hs b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types.hs new file mode 100644 index 000000000..931e571e5 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickSearch.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickSearch.Types + ( + -- * Service URL + doubleClickSearchURL + + -- * ReportRow + , ReportRow + , reportRow + + -- * ReportRequest + , ReportRequest + , reportRequest + , rrMaxRowsPerFile + , rrReportScope + , rrStatisticsCurrency + , rrTimeRange + , rrOrderBy + , rrFilters + , rrIncludeRemovedEntities + , rrIncludeDeletedEntities + , rrDownloadFormat + , rrStartRow + , rrColumns + , rrReportType + , rrVerifySingleTimeZone + , rrRowCount + + -- * Report + , Report + , report + , rKind + , rRows + , rStatisticsCurrencyCode + , rIsReportReady + , rFiles + , rId + , rStatisticsTimeZone + , rRowCount + , rRequest + + -- * UpdateAvailabilityRequest + , UpdateAvailabilityRequest + , updateAvailabilityRequest + , uarAvailabilities + + -- * Availability + , Availability + , availability + , aAgencyId + , aAdvertiserId + , aSegmentationId + , aSegmentationName + , aAvailabilityTimestamp + , aSegmentationType + + -- * CustomMetric + , CustomMetric + , customMetric + , cmValue + , cmName + + -- * ConversionList + , ConversionList + , conversionList + , clKind + , clConversion + + -- * ReportAPIColumnSpec + , ReportAPIColumnSpec + , reportAPIColumnSpec + , racsCustomDimensionName + , racsSavedColumnName + , racsGroupByColumn + , racsCustomMetricName + , racsEndDate + , racsStartDate + , racsHeaderText + , racsPlatformSource + , racsColumnName + + -- * Conversion + , Conversion + , conversion + , cAdGroupId + , cConversionModifiedTimestamp + , cState + , cEngineAccountId + , cAgencyId + , cCurrencyCode + , cStoreId + , cDsConversionId + , cConversionId + , cAdvertiserId + , cSegmentationId + , cChannel + , cProductCountry + , cCampaignId + , cCriterionId + , cConversionTimestamp + , cAttributionModel + , cSegmentationName + , cProductLanguage + , cCustomMetric + , cCountMillis + , cQuantityMillis + , cAdId + , cDeviceType + , cType + , cCustomDimension + , cFloodlightOrderId + , cRevenueMicros + , cClickId + , cInventoryAccountId + , cSegmentationType + , cProductId + , cProductGroupId + + -- * SavedColumn + , SavedColumn + , savedColumn + , scSavedColumnName + , scKind + , scType + + -- * UpdateAvailabilityResponse + , UpdateAvailabilityResponse + , updateAvailabilityResponse + , uAvailabilities + + -- * CustomDimension + , CustomDimension + , customDimension + , cdValue + , cdName + + -- * SavedColumnList + , SavedColumnList + , savedColumnList + , sclKind + , sclItems + ) where + +import Network.Google.DoubleClickSearch.Types.Product +import Network.Google.DoubleClickSearch.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the DoubleClick Search API. +doubleClickSearchURL :: BaseURL +doubleClickSearchURL + = BaseUrl Https + "https://www.googleapis.com/doubleclicksearch/v2/" + 443 diff --git a/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs new file mode 100644 index 000000000..88cf7e5c9 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs @@ -0,0 +1,1408 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickSearch.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickSearch.Types.Product where + +import Network.Google.DoubleClickSearch.Types.Sum +import Network.Google.Prelude + +-- | A row in a DoubleClick Search report. +-- +-- /See:/ 'reportRow' smart constructor. +data ReportRow = + ReportRow + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportRow' with the minimum fields required to make a request. +-- +reportRow + :: ReportRow +reportRow = ReportRow + +instance FromJSON ReportRow where + parseJSON + = withObject "ReportRow" (\ o -> pure ReportRow) + +instance ToJSON ReportRow where + toJSON = const (Object mempty) + +-- | A request object used to create a DoubleClick Search report. +-- +-- /See:/ 'reportRequest' smart constructor. +data ReportRequest = ReportRequest + { _rrMaxRowsPerFile :: !(Maybe Int32) + , _rrReportScope :: !(Maybe ReportRequestReportScope) + , _rrStatisticsCurrency :: !(Maybe Text) + , _rrTimeRange :: !(Maybe ReportRequestTimeRange) + , _rrOrderBy :: !(Maybe [ReportRequestOrderByItem]) + , _rrFilters :: !(Maybe [ReportRequestFiltersItem]) + , _rrIncludeRemovedEntities :: !Bool + , _rrIncludeDeletedEntities :: !Bool + , _rrDownloadFormat :: !(Maybe Text) + , _rrStartRow :: !Int32 + , _rrColumns :: !(Maybe [Maybe ReportAPIColumnSpec]) + , _rrReportType :: !(Maybe Text) + , _rrVerifySingleTimeZone :: !Bool + , _rrRowCount :: !Int32 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrMaxRowsPerFile' +-- +-- * 'rrReportScope' +-- +-- * 'rrStatisticsCurrency' +-- +-- * 'rrTimeRange' +-- +-- * 'rrOrderBy' +-- +-- * 'rrFilters' +-- +-- * 'rrIncludeRemovedEntities' +-- +-- * 'rrIncludeDeletedEntities' +-- +-- * 'rrDownloadFormat' +-- +-- * 'rrStartRow' +-- +-- * 'rrColumns' +-- +-- * 'rrReportType' +-- +-- * 'rrVerifySingleTimeZone' +-- +-- * 'rrRowCount' +reportRequest + :: ReportRequest +reportRequest = + ReportRequest + { _rrMaxRowsPerFile = Nothing + , _rrReportScope = Nothing + , _rrStatisticsCurrency = Nothing + , _rrTimeRange = Nothing + , _rrOrderBy = Nothing + , _rrFilters = Nothing + , _rrIncludeRemovedEntities = False + , _rrIncludeDeletedEntities = False + , _rrDownloadFormat = Nothing + , _rrStartRow = 0 + , _rrColumns = Nothing + , _rrReportType = Nothing + , _rrVerifySingleTimeZone = False + , _rrRowCount = 10000 + } + +-- | Asynchronous report only. The maximum number of rows per report file. A +-- large report is split into many files based on this field. Acceptable +-- values are 1000000 to 100000000, inclusive. +rrMaxRowsPerFile :: Lens' ReportRequest (Maybe Int32) +rrMaxRowsPerFile + = lens _rrMaxRowsPerFile + (\ s a -> s{_rrMaxRowsPerFile = a}) + +-- | The reportScope is a set of IDs that are used to determine which subset +-- of entities will be returned in the report. The full lineage of IDs from +-- the lowest scoped level desired up through agency is required. +rrReportScope :: Lens' ReportRequest (Maybe ReportRequestReportScope) +rrReportScope + = lens _rrReportScope + (\ s a -> s{_rrReportScope = a}) + +-- | Specifies the currency in which monetary will be returned. Possible +-- values are: usd, agency (valid if the report is scoped to agency or +-- lower), advertiser (valid if the report is scoped to * advertiser or +-- lower), or account (valid if the report is scoped to engine account or +-- lower). +rrStatisticsCurrency :: Lens' ReportRequest (Maybe Text) +rrStatisticsCurrency + = lens _rrStatisticsCurrency + (\ s a -> s{_rrStatisticsCurrency = a}) + +-- | If metrics are requested in a report, this argument will be used to +-- restrict the metrics to a specific time range. +rrTimeRange :: Lens' ReportRequest (Maybe ReportRequestTimeRange) +rrTimeRange + = lens _rrTimeRange (\ s a -> s{_rrTimeRange = a}) + +-- | Synchronous report only. A list of columns and directions defining +-- sorting to be performed on the report rows. +rrOrderBy :: Lens' ReportRequest [ReportRequestOrderByItem] +rrOrderBy + = lens _rrOrderBy (\ s a -> s{_rrOrderBy = a}) . + _Default + . _Coerce + +-- | A list of filters to be applied to the report. +rrFilters :: Lens' ReportRequest [ReportRequestFiltersItem] +rrFilters + = lens _rrFilters (\ s a -> s{_rrFilters = a}) . + _Default + . _Coerce + +-- | Determines if removed entities should be included in the report. +-- Defaults to false. +rrIncludeRemovedEntities :: Lens' ReportRequest Bool +rrIncludeRemovedEntities + = lens _rrIncludeRemovedEntities + (\ s a -> s{_rrIncludeRemovedEntities = a}) + +-- | Determines if removed entities should be included in the report. +-- Defaults to false. Deprecated, please use includeRemovedEntities +-- instead. +rrIncludeDeletedEntities :: Lens' ReportRequest Bool +rrIncludeDeletedEntities + = lens _rrIncludeDeletedEntities + (\ s a -> s{_rrIncludeDeletedEntities = a}) + +-- | Format that the report should be returned in. Currently csv or tsv is +-- supported. +rrDownloadFormat :: Lens' ReportRequest (Maybe Text) +rrDownloadFormat + = lens _rrDownloadFormat + (\ s a -> s{_rrDownloadFormat = a}) + +-- | Synchronous report only. Zero-based index of the first row to return. +-- Acceptable values are 0 to 50000, inclusive. Defaults to 0. +rrStartRow :: Lens' ReportRequest Int32 +rrStartRow + = lens _rrStartRow (\ s a -> s{_rrStartRow = a}) + +-- | The columns to include in the report. This includes both DoubleClick +-- Search columns and saved columns. For DoubleClick Search columns, only +-- the columnName parameter is required. For saved columns only the +-- savedColumnName parameter is required. Both columnName and +-- savedColumnName cannot be set in the same stanza. +rrColumns :: Lens' ReportRequest [Maybe ReportAPIColumnSpec] +rrColumns + = lens _rrColumns (\ s a -> s{_rrColumns = a}) . + _Default + . _Coerce + +-- | Determines the type of rows that are returned in the report. For +-- example, if you specify reportType: keyword, each row in the report will +-- contain data about a keyword. See the Types of Reports reference for the +-- columns that are available for each type. +rrReportType :: Lens' ReportRequest (Maybe Text) +rrReportType + = lens _rrReportType (\ s a -> s{_rrReportType = a}) + +-- | If true, the report would only be created if all the requested stat data +-- are sourced from a single timezone. Defaults to false. +rrVerifySingleTimeZone :: Lens' ReportRequest Bool +rrVerifySingleTimeZone + = lens _rrVerifySingleTimeZone + (\ s a -> s{_rrVerifySingleTimeZone = a}) + +-- | Synchronous report only. The maxinum number of rows to return; +-- additional rows are dropped. Acceptable values are 0 to 10000, +-- inclusive. Defaults to 10000. +rrRowCount :: Lens' ReportRequest Int32 +rrRowCount + = lens _rrRowCount (\ s a -> s{_rrRowCount = a}) + +instance FromJSON ReportRequest where + parseJSON + = withObject "ReportRequest" + (\ o -> + ReportRequest <$> + (o .:? "maxRowsPerFile") <*> (o .:? "reportScope") + <*> (o .:? "statisticsCurrency") + <*> (o .:? "timeRange") + <*> (o .:? "orderBy" .!= mempty) + <*> (o .:? "filters" .!= mempty) + <*> (o .:? "includeRemovedEntities" .!= False) + <*> (o .:? "includeDeletedEntities" .!= False) + <*> (o .:? "downloadFormat") + <*> (o .:? "startRow" .!= 0) + <*> (o .:? "columns" .!= mempty) + <*> (o .:? "reportType") + <*> (o .:? "verifySingleTimeZone" .!= False) + <*> (o .:? "rowCount" .!= 10000)) + +instance ToJSON ReportRequest where + toJSON ReportRequest{..} + = object + (catMaybes + [("maxRowsPerFile" .=) <$> _rrMaxRowsPerFile, + ("reportScope" .=) <$> _rrReportScope, + ("statisticsCurrency" .=) <$> _rrStatisticsCurrency, + ("timeRange" .=) <$> _rrTimeRange, + ("orderBy" .=) <$> _rrOrderBy, + ("filters" .=) <$> _rrFilters, + Just + ("includeRemovedEntities" .= + _rrIncludeRemovedEntities), + Just + ("includeDeletedEntities" .= + _rrIncludeDeletedEntities), + ("downloadFormat" .=) <$> _rrDownloadFormat, + Just ("startRow" .= _rrStartRow), + ("columns" .=) <$> _rrColumns, + ("reportType" .=) <$> _rrReportType, + Just + ("verifySingleTimeZone" .= _rrVerifySingleTimeZone), + Just ("rowCount" .= _rrRowCount)]) + +-- | A DoubleClick Search report. This object contains the report request, +-- some report metadata such as currency code, and the generated report +-- rows or report files. +-- +-- /See:/ 'report' smart constructor. +data Report = Report + { _rKind :: !Text + , _rRows :: !(Maybe [Maybe ReportRow]) + , _rStatisticsCurrencyCode :: !(Maybe Text) + , _rIsReportReady :: !(Maybe Bool) + , _rFiles :: !(Maybe [ReportFilesItem]) + , _rId :: !(Maybe Text) + , _rStatisticsTimeZone :: !(Maybe Text) + , _rRowCount :: !(Maybe Int32) + , _rRequest :: !(Maybe (Maybe ReportRequest)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Report' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rKind' +-- +-- * 'rRows' +-- +-- * 'rStatisticsCurrencyCode' +-- +-- * 'rIsReportReady' +-- +-- * 'rFiles' +-- +-- * 'rId' +-- +-- * 'rStatisticsTimeZone' +-- +-- * 'rRowCount' +-- +-- * 'rRequest' +report + :: Report +report = + Report + { _rKind = "doubleclicksearch#report" + , _rRows = Nothing + , _rStatisticsCurrencyCode = Nothing + , _rIsReportReady = Nothing + , _rFiles = Nothing + , _rId = Nothing + , _rStatisticsTimeZone = Nothing + , _rRowCount = Nothing + , _rRequest = Nothing + } + +-- | Identifies this as a Report resource. Value: the fixed string +-- doubleclicksearch#report. +rKind :: Lens' Report Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | Synchronous report only. Generated report rows. +rRows :: Lens' Report [Maybe ReportRow] +rRows + = lens _rRows (\ s a -> s{_rRows = a}) . _Default . + _Coerce + +-- | The currency code of all monetary values produced in the report, +-- including values that are set by users (e.g., keyword bid settings) and +-- metrics (e.g., cost and revenue). The currency code of a report is +-- determined by the statisticsCurrency field of the report request. +rStatisticsCurrencyCode :: Lens' Report (Maybe Text) +rStatisticsCurrencyCode + = lens _rStatisticsCurrencyCode + (\ s a -> s{_rStatisticsCurrencyCode = a}) + +-- | Asynchronous report only. True if and only if the report has completed +-- successfully and the report files are ready to be downloaded. +rIsReportReady :: Lens' Report (Maybe Bool) +rIsReportReady + = lens _rIsReportReady + (\ s a -> s{_rIsReportReady = a}) + +-- | Asynchronous report only. Contains a list of generated report files once +-- the report has succesfully completed. +rFiles :: Lens' Report [ReportFilesItem] +rFiles + = lens _rFiles (\ s a -> s{_rFiles = a}) . _Default . + _Coerce + +-- | Asynchronous report only. Id of the report. +rId :: Lens' Report (Maybe Text) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | If all statistics of the report are sourced from the same time zone, +-- this would be it. Otherwise the field is unset. +rStatisticsTimeZone :: Lens' Report (Maybe Text) +rStatisticsTimeZone + = lens _rStatisticsTimeZone + (\ s a -> s{_rStatisticsTimeZone = a}) + +-- | The number of report rows generated by the report, not including +-- headers. +rRowCount :: Lens' Report (Maybe Int32) +rRowCount + = lens _rRowCount (\ s a -> s{_rRowCount = a}) + +-- | The request that created the report. Optional fields not specified in +-- the original request are filled with default values. +rRequest :: Lens' Report (Maybe (Maybe ReportRequest)) +rRequest = lens _rRequest (\ s a -> s{_rRequest = a}) + +instance FromJSON Report where + parseJSON + = withObject "Report" + (\ o -> + Report <$> + (o .:? "kind" .!= "doubleclicksearch#report") <*> + (o .:? "rows" .!= mempty) + <*> (o .:? "statisticsCurrencyCode") + <*> (o .:? "isReportReady") + <*> (o .:? "files" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "statisticsTimeZone") + <*> (o .:? "rowCount") + <*> (o .:? "request")) + +instance ToJSON Report where + toJSON Report{..} + = object + (catMaybes + [Just ("kind" .= _rKind), ("rows" .=) <$> _rRows, + ("statisticsCurrencyCode" .=) <$> + _rStatisticsCurrencyCode, + ("isReportReady" .=) <$> _rIsReportReady, + ("files" .=) <$> _rFiles, ("id" .=) <$> _rId, + ("statisticsTimeZone" .=) <$> _rStatisticsTimeZone, + ("rowCount" .=) <$> _rRowCount, + ("request" .=) <$> _rRequest]) + +-- | The request to update availability. +-- +-- /See:/ 'updateAvailabilityRequest' smart constructor. +newtype UpdateAvailabilityRequest = UpdateAvailabilityRequest + { _uarAvailabilities :: Maybe [Maybe Availability] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateAvailabilityRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uarAvailabilities' +updateAvailabilityRequest + :: UpdateAvailabilityRequest +updateAvailabilityRequest = + UpdateAvailabilityRequest + { _uarAvailabilities = Nothing + } + +-- | The availabilities being requested. +uarAvailabilities :: Lens' UpdateAvailabilityRequest [Maybe Availability] +uarAvailabilities + = lens _uarAvailabilities + (\ s a -> s{_uarAvailabilities = a}) + . _Default + . _Coerce + +instance FromJSON UpdateAvailabilityRequest where + parseJSON + = withObject "UpdateAvailabilityRequest" + (\ o -> + UpdateAvailabilityRequest <$> + (o .:? "availabilities" .!= mempty)) + +instance ToJSON UpdateAvailabilityRequest where + toJSON UpdateAvailabilityRequest{..} + = object + (catMaybes + [("availabilities" .=) <$> _uarAvailabilities]) + +-- | A message containing availability data relevant to DoubleClick Search. +-- +-- /See:/ 'availability' smart constructor. +data Availability = Availability + { _aAgencyId :: !(Maybe Int64) + , _aAdvertiserId :: !(Maybe Int64) + , _aSegmentationId :: !(Maybe Int64) + , _aSegmentationName :: !(Maybe Text) + , _aAvailabilityTimestamp :: !(Maybe Word64) + , _aSegmentationType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Availability' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aAgencyId' +-- +-- * 'aAdvertiserId' +-- +-- * 'aSegmentationId' +-- +-- * 'aSegmentationName' +-- +-- * 'aAvailabilityTimestamp' +-- +-- * 'aSegmentationType' +availability + :: Availability +availability = + Availability + { _aAgencyId = Nothing + , _aAdvertiserId = Nothing + , _aSegmentationId = Nothing + , _aSegmentationName = Nothing + , _aAvailabilityTimestamp = Nothing + , _aSegmentationType = Nothing + } + +-- | DS agency ID. +aAgencyId :: Lens' Availability (Maybe Int64) +aAgencyId + = lens _aAgencyId (\ s a -> s{_aAgencyId = a}) + +-- | DS advertiser ID. +aAdvertiserId :: Lens' Availability (Maybe Int64) +aAdvertiserId + = lens _aAdvertiserId + (\ s a -> s{_aAdvertiserId = a}) + +-- | The numeric segmentation identifier (for example, DoubleClick Search +-- Floodlight activity ID). +aSegmentationId :: Lens' Availability (Maybe Int64) +aSegmentationId + = lens _aSegmentationId + (\ s a -> s{_aSegmentationId = a}) + +-- | The friendly segmentation identifier (for example, DoubleClick Search +-- Floodlight activity name). +aSegmentationName :: Lens' Availability (Maybe Text) +aSegmentationName + = lens _aSegmentationName + (\ s a -> s{_aSegmentationName = a}) + +-- | The time by which all conversions have been uploaded, in epoch millis +-- UTC. +aAvailabilityTimestamp :: Lens' Availability (Maybe Word64) +aAvailabilityTimestamp + = lens _aAvailabilityTimestamp + (\ s a -> s{_aAvailabilityTimestamp = a}) + +-- | The segmentation type that this availability is for (its default value +-- is FLOODLIGHT). +aSegmentationType :: Lens' Availability (Maybe Text) +aSegmentationType + = lens _aSegmentationType + (\ s a -> s{_aSegmentationType = a}) + +instance FromJSON Availability where + parseJSON + = withObject "Availability" + (\ o -> + Availability <$> + (o .:? "agencyId") <*> (o .:? "advertiserId") <*> + (o .:? "segmentationId") + <*> (o .:? "segmentationName") + <*> (o .:? "availabilityTimestamp") + <*> (o .:? "segmentationType")) + +instance ToJSON Availability where + toJSON Availability{..} + = object + (catMaybes + [("agencyId" .=) <$> _aAgencyId, + ("advertiserId" .=) <$> _aAdvertiserId, + ("segmentationId" .=) <$> _aSegmentationId, + ("segmentationName" .=) <$> _aSegmentationName, + ("availabilityTimestamp" .=) <$> + _aAvailabilityTimestamp, + ("segmentationType" .=) <$> _aSegmentationType]) + +-- | A message containing the custome metric. +-- +-- /See:/ 'customMetric' smart constructor. +data CustomMetric = CustomMetric + { _cmValue :: !(Maybe Double) + , _cmName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomMetric' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cmValue' +-- +-- * 'cmName' +customMetric + :: CustomMetric +customMetric = + CustomMetric + { _cmValue = Nothing + , _cmName = Nothing + } + +-- | Custom metric numeric value. +cmValue :: Lens' CustomMetric (Maybe Double) +cmValue = lens _cmValue (\ s a -> s{_cmValue = a}) + +-- | Custom metric name. +cmName :: Lens' CustomMetric (Maybe Text) +cmName = lens _cmName (\ s a -> s{_cmName = a}) + +instance FromJSON CustomMetric where + parseJSON + = withObject "CustomMetric" + (\ o -> + CustomMetric <$> (o .:? "value") <*> (o .:? "name")) + +instance ToJSON CustomMetric where + toJSON CustomMetric{..} + = object + (catMaybes + [("value" .=) <$> _cmValue, ("name" .=) <$> _cmName]) + +-- | A list of conversions. +-- +-- /See:/ 'conversionList' smart constructor. +data ConversionList = ConversionList + { _clKind :: !Text + , _clConversion :: !(Maybe [Maybe Conversion]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clKind' +-- +-- * 'clConversion' +conversionList + :: ConversionList +conversionList = + ConversionList + { _clKind = "doubleclicksearch#conversionList" + , _clConversion = Nothing + } + +-- | Identifies this as a ConversionList resource. Value: the fixed string +-- doubleclicksearch#conversionList. +clKind :: Lens' ConversionList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | The conversions being requested. +clConversion :: Lens' ConversionList [Maybe Conversion] +clConversion + = lens _clConversion (\ s a -> s{_clConversion = a}) + . _Default + . _Coerce + +instance FromJSON ConversionList where + parseJSON + = withObject "ConversionList" + (\ o -> + ConversionList <$> + (o .:? "kind" .!= "doubleclicksearch#conversionList") + <*> (o .:? "conversion" .!= mempty)) + +instance ToJSON ConversionList where + toJSON ConversionList{..} + = object + (catMaybes + [Just ("kind" .= _clKind), + ("conversion" .=) <$> _clConversion]) + +-- | A request object used to create a DoubleClick Search report. +-- +-- /See:/ 'reportAPIColumnSpec' smart constructor. +data ReportAPIColumnSpec = ReportAPIColumnSpec + { _racsCustomDimensionName :: !(Maybe Text) + , _racsSavedColumnName :: !(Maybe Text) + , _racsGroupByColumn :: !Bool + , _racsCustomMetricName :: !(Maybe Text) + , _racsEndDate :: !(Maybe Text) + , _racsStartDate :: !(Maybe Text) + , _racsHeaderText :: !(Maybe Text) + , _racsPlatformSource :: !(Maybe Text) + , _racsColumnName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportAPIColumnSpec' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'racsCustomDimensionName' +-- +-- * 'racsSavedColumnName' +-- +-- * 'racsGroupByColumn' +-- +-- * 'racsCustomMetricName' +-- +-- * 'racsEndDate' +-- +-- * 'racsStartDate' +-- +-- * 'racsHeaderText' +-- +-- * 'racsPlatformSource' +-- +-- * 'racsColumnName' +reportAPIColumnSpec + :: ReportAPIColumnSpec +reportAPIColumnSpec = + ReportAPIColumnSpec + { _racsCustomDimensionName = Nothing + , _racsSavedColumnName = Nothing + , _racsGroupByColumn = False + , _racsCustomMetricName = Nothing + , _racsEndDate = Nothing + , _racsStartDate = Nothing + , _racsHeaderText = Nothing + , _racsPlatformSource = Nothing + , _racsColumnName = Nothing + } + +-- | Segments a report by a custom dimension. The report must be scoped to an +-- advertiser or lower, and the custom dimension must already be set up in +-- DoubleClick Search. The custom dimension name, which appears in +-- DoubleClick Search, is case sensitive. If used in a conversion report, +-- returns the value of the specified custom dimension for the given +-- conversion, if set. This column does not segment the conversion report. +racsCustomDimensionName :: Lens' ReportAPIColumnSpec (Maybe Text) +racsCustomDimensionName + = lens _racsCustomDimensionName + (\ s a -> s{_racsCustomDimensionName = a}) + +-- | Name of a saved column to include in the report. The report must be +-- scoped at advertiser or lower, and this saved column must already be +-- created in the DoubleClick Search UI. +racsSavedColumnName :: Lens' ReportAPIColumnSpec (Maybe Text) +racsSavedColumnName + = lens _racsSavedColumnName + (\ s a -> s{_racsSavedColumnName = a}) + +-- | Synchronous report only. Set to true to group by this column. Defaults +-- to false. +racsGroupByColumn :: Lens' ReportAPIColumnSpec Bool +racsGroupByColumn + = lens _racsGroupByColumn + (\ s a -> s{_racsGroupByColumn = a}) + +-- | Name of a custom metric to include in the report. The report must be +-- scoped to an advertiser or lower, and the custom metric must already be +-- set up in DoubleClick Search. The custom metric name, which appears in +-- DoubleClick Search, is case sensitive. +racsCustomMetricName :: Lens' ReportAPIColumnSpec (Maybe Text) +racsCustomMetricName + = lens _racsCustomMetricName + (\ s a -> s{_racsCustomMetricName = a}) + +-- | Inclusive day in YYYY-MM-DD format. When provided, this overrides the +-- overall time range of the report for this column only. Must be provided +-- together with startDate. +racsEndDate :: Lens' ReportAPIColumnSpec (Maybe Text) +racsEndDate + = lens _racsEndDate (\ s a -> s{_racsEndDate = a}) + +-- | Inclusive date in YYYY-MM-DD format. When provided, this overrides the +-- overall time range of the report for this column only. Must be provided +-- together with endDate. +racsStartDate :: Lens' ReportAPIColumnSpec (Maybe Text) +racsStartDate + = lens _racsStartDate + (\ s a -> s{_racsStartDate = a}) + +-- | Text used to identify this column in the report output; defaults to +-- columnName or savedColumnName when not specified. This can be used to +-- prevent collisions between DoubleClick Search columns and saved columns +-- with the same name. +racsHeaderText :: Lens' ReportAPIColumnSpec (Maybe Text) +racsHeaderText + = lens _racsHeaderText + (\ s a -> s{_racsHeaderText = a}) + +-- | The platform that is used to provide data for the custom dimension. +-- Acceptable values are \"Floodlight\". +racsPlatformSource :: Lens' ReportAPIColumnSpec (Maybe Text) +racsPlatformSource + = lens _racsPlatformSource + (\ s a -> s{_racsPlatformSource = a}) + +-- | Name of a DoubleClick Search column to include in the report. +racsColumnName :: Lens' ReportAPIColumnSpec (Maybe Text) +racsColumnName + = lens _racsColumnName + (\ s a -> s{_racsColumnName = a}) + +instance FromJSON ReportAPIColumnSpec where + parseJSON + = withObject "ReportAPIColumnSpec" + (\ o -> + ReportAPIColumnSpec <$> + (o .:? "customDimensionName") <*> + (o .:? "savedColumnName") + <*> (o .:? "groupByColumn" .!= False) + <*> (o .:? "customMetricName") + <*> (o .:? "endDate") + <*> (o .:? "startDate") + <*> (o .:? "headerText") + <*> (o .:? "platformSource") + <*> (o .:? "columnName")) + +instance ToJSON ReportAPIColumnSpec where + toJSON ReportAPIColumnSpec{..} + = object + (catMaybes + [("customDimensionName" .=) <$> + _racsCustomDimensionName, + ("savedColumnName" .=) <$> _racsSavedColumnName, + Just ("groupByColumn" .= _racsGroupByColumn), + ("customMetricName" .=) <$> _racsCustomMetricName, + ("endDate" .=) <$> _racsEndDate, + ("startDate" .=) <$> _racsStartDate, + ("headerText" .=) <$> _racsHeaderText, + ("platformSource" .=) <$> _racsPlatformSource, + ("columnName" .=) <$> _racsColumnName]) + +-- | A conversion containing data relevant to DoubleClick Search. +-- +-- /See:/ 'conversion' smart constructor. +data Conversion = Conversion + { _cAdGroupId :: !(Maybe Int64) + , _cConversionModifiedTimestamp :: !(Maybe Word64) + , _cState :: !(Maybe Text) + , _cEngineAccountId :: !(Maybe Int64) + , _cAgencyId :: !(Maybe Int64) + , _cCurrencyCode :: !(Maybe Text) + , _cStoreId :: !(Maybe Text) + , _cDsConversionId :: !(Maybe Int64) + , _cConversionId :: !(Maybe Text) + , _cAdvertiserId :: !(Maybe Int64) + , _cSegmentationId :: !(Maybe Int64) + , _cChannel :: !(Maybe Text) + , _cProductCountry :: !(Maybe Text) + , _cCampaignId :: !(Maybe Int64) + , _cCriterionId :: !(Maybe Int64) + , _cConversionTimestamp :: !(Maybe Word64) + , _cAttributionModel :: !(Maybe Text) + , _cSegmentationName :: !(Maybe Text) + , _cProductLanguage :: !(Maybe Text) + , _cCustomMetric :: !(Maybe [Maybe CustomMetric]) + , _cCountMillis :: !(Maybe Int64) + , _cQuantityMillis :: !(Maybe Int64) + , _cAdId :: !(Maybe Int64) + , _cDeviceType :: !(Maybe Text) + , _cType :: !(Maybe Text) + , _cCustomDimension :: !(Maybe [Maybe CustomDimension]) + , _cFloodlightOrderId :: !(Maybe Text) + , _cRevenueMicros :: !(Maybe Int64) + , _cClickId :: !(Maybe Text) + , _cInventoryAccountId :: !(Maybe Int64) + , _cSegmentationType :: !(Maybe Text) + , _cProductId :: !(Maybe Text) + , _cProductGroupId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Conversion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cAdGroupId' +-- +-- * 'cConversionModifiedTimestamp' +-- +-- * 'cState' +-- +-- * 'cEngineAccountId' +-- +-- * 'cAgencyId' +-- +-- * 'cCurrencyCode' +-- +-- * 'cStoreId' +-- +-- * 'cDsConversionId' +-- +-- * 'cConversionId' +-- +-- * 'cAdvertiserId' +-- +-- * 'cSegmentationId' +-- +-- * 'cChannel' +-- +-- * 'cProductCountry' +-- +-- * 'cCampaignId' +-- +-- * 'cCriterionId' +-- +-- * 'cConversionTimestamp' +-- +-- * 'cAttributionModel' +-- +-- * 'cSegmentationName' +-- +-- * 'cProductLanguage' +-- +-- * 'cCustomMetric' +-- +-- * 'cCountMillis' +-- +-- * 'cQuantityMillis' +-- +-- * 'cAdId' +-- +-- * 'cDeviceType' +-- +-- * 'cType' +-- +-- * 'cCustomDimension' +-- +-- * 'cFloodlightOrderId' +-- +-- * 'cRevenueMicros' +-- +-- * 'cClickId' +-- +-- * 'cInventoryAccountId' +-- +-- * 'cSegmentationType' +-- +-- * 'cProductId' +-- +-- * 'cProductGroupId' +conversion + :: Conversion +conversion = + Conversion + { _cAdGroupId = Nothing + , _cConversionModifiedTimestamp = Nothing + , _cState = Nothing + , _cEngineAccountId = Nothing + , _cAgencyId = Nothing + , _cCurrencyCode = Nothing + , _cStoreId = Nothing + , _cDsConversionId = Nothing + , _cConversionId = Nothing + , _cAdvertiserId = Nothing + , _cSegmentationId = Nothing + , _cChannel = Nothing + , _cProductCountry = Nothing + , _cCampaignId = Nothing + , _cCriterionId = Nothing + , _cConversionTimestamp = Nothing + , _cAttributionModel = Nothing + , _cSegmentationName = Nothing + , _cProductLanguage = Nothing + , _cCustomMetric = Nothing + , _cCountMillis = Nothing + , _cQuantityMillis = Nothing + , _cAdId = Nothing + , _cDeviceType = Nothing + , _cType = Nothing + , _cCustomDimension = Nothing + , _cFloodlightOrderId = Nothing + , _cRevenueMicros = Nothing + , _cClickId = Nothing + , _cInventoryAccountId = Nothing + , _cSegmentationType = Nothing + , _cProductId = Nothing + , _cProductGroupId = Nothing + } + +-- | DS ad group ID. +cAdGroupId :: Lens' Conversion (Maybe Int64) +cAdGroupId + = lens _cAdGroupId (\ s a -> s{_cAdGroupId = a}) + +-- | The time at which the conversion was last modified, in epoch millis UTC. +cConversionModifiedTimestamp :: Lens' Conversion (Maybe Word64) +cConversionModifiedTimestamp + = lens _cConversionModifiedTimestamp + (\ s a -> s{_cConversionModifiedTimestamp = a}) + +-- | The state of the conversion, that is, either ACTIVE or REMOVED. Note: +-- state DELETED is deprecated. +cState :: Lens' Conversion (Maybe Text) +cState = lens _cState (\ s a -> s{_cState = a}) + +-- | DS engine account ID. +cEngineAccountId :: Lens' Conversion (Maybe Int64) +cEngineAccountId + = lens _cEngineAccountId + (\ s a -> s{_cEngineAccountId = a}) + +-- | DS agency ID. +cAgencyId :: Lens' Conversion (Maybe Int64) +cAgencyId + = lens _cAgencyId (\ s a -> s{_cAgencyId = a}) + +-- | The currency code for the conversion\'s revenue. Should be in ISO 4217 +-- alphabetic (3-char) format. +cCurrencyCode :: Lens' Conversion (Maybe Text) +cCurrencyCode + = lens _cCurrencyCode + (\ s a -> s{_cCurrencyCode = a}) + +-- | The ID of the local store for which the product was advertised. +-- Applicable only when the channel is \"local\". +cStoreId :: Lens' Conversion (Maybe Text) +cStoreId = lens _cStoreId (\ s a -> s{_cStoreId = a}) + +-- | ID that DoubleClick Search generates for each conversion. +cDsConversionId :: Lens' Conversion (Maybe Int64) +cDsConversionId + = lens _cDsConversionId + (\ s a -> s{_cDsConversionId = a}) + +-- | For offline conversions, this is an ID provided by advertisers. +-- Advertisers can use this property to specify an ID that is meaningful to +-- them. If an advertiser doesn\'t specify a conversionId, DoubleClick +-- Search generates one. For online conversions, DS copies the +-- dsConversionId or floodlightOrderId into this property depending on the +-- advertiser\'s Floodlight instructions. +cConversionId :: Lens' Conversion (Maybe Text) +cConversionId + = lens _cConversionId + (\ s a -> s{_cConversionId = a}) + +-- | DS advertiser ID. +cAdvertiserId :: Lens' Conversion (Maybe Int64) +cAdvertiserId + = lens _cAdvertiserId + (\ s a -> s{_cAdvertiserId = a}) + +-- | The numeric segmentation identifier (for example, DoubleClick Search +-- Floodlight activity ID). +cSegmentationId :: Lens' Conversion (Maybe Int64) +cSegmentationId + = lens _cSegmentationId + (\ s a -> s{_cSegmentationId = a}) + +-- | Sales channel for the product. Acceptable values are: - \"local\": a +-- physical store - \"online\": an online store +cChannel :: Lens' Conversion (Maybe Text) +cChannel = lens _cChannel (\ s a -> s{_cChannel = a}) + +-- | The country registered for the Merchant Center feed that contains the +-- product. Use an ISO 3166 code to specify a country. +cProductCountry :: Lens' Conversion (Maybe Text) +cProductCountry + = lens _cProductCountry + (\ s a -> s{_cProductCountry = a}) + +-- | DS campaign ID. +cCampaignId :: Lens' Conversion (Maybe Int64) +cCampaignId + = lens _cCampaignId (\ s a -> s{_cCampaignId = a}) + +-- | DS criterion (keyword) ID. +cCriterionId :: Lens' Conversion (Maybe Int64) +cCriterionId + = lens _cCriterionId (\ s a -> s{_cCriterionId = a}) + +-- | The time at which the conversion took place, in epoch millis UTC. +cConversionTimestamp :: Lens' Conversion (Maybe Word64) +cConversionTimestamp + = lens _cConversionTimestamp + (\ s a -> s{_cConversionTimestamp = a}) + +-- | This field is ignored. +cAttributionModel :: Lens' Conversion (Maybe Text) +cAttributionModel + = lens _cAttributionModel + (\ s a -> s{_cAttributionModel = a}) + +-- | The friendly segmentation identifier (for example, DoubleClick Search +-- Floodlight activity name). +cSegmentationName :: Lens' Conversion (Maybe Text) +cSegmentationName + = lens _cSegmentationName + (\ s a -> s{_cSegmentationName = a}) + +-- | The language registered for the Merchant Center feed that contains the +-- product. Use an ISO 639 code to specify a language. +cProductLanguage :: Lens' Conversion (Maybe Text) +cProductLanguage + = lens _cProductLanguage + (\ s a -> s{_cProductLanguage = a}) + +-- | Custom metrics for the conversion. +cCustomMetric :: Lens' Conversion [Maybe CustomMetric] +cCustomMetric + = lens _cCustomMetric + (\ s a -> s{_cCustomMetric = a}) + . _Default + . _Coerce + +-- | This field is ignored. +cCountMillis :: Lens' Conversion (Maybe Int64) +cCountMillis + = lens _cCountMillis (\ s a -> s{_cCountMillis = a}) + +-- | The quantity of this conversion, in millis. +cQuantityMillis :: Lens' Conversion (Maybe Int64) +cQuantityMillis + = lens _cQuantityMillis + (\ s a -> s{_cQuantityMillis = a}) + +-- | DS ad ID. +cAdId :: Lens' Conversion (Maybe Int64) +cAdId = lens _cAdId (\ s a -> s{_cAdId = a}) + +-- | The type of device on which the conversion occurred. +cDeviceType :: Lens' Conversion (Maybe Text) +cDeviceType + = lens _cDeviceType (\ s a -> s{_cDeviceType = a}) + +-- | The type of the conversion, that is, either ACTION or TRANSACTION. An +-- ACTION conversion is an action by the user that has no monetarily +-- quantifiable value, while a TRANSACTION conversion is an action that +-- does have a monetarily quantifiable value. Examples are email list +-- signups (ACTION) versus ecommerce purchases (TRANSACTION). +cType :: Lens' Conversion (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +-- | Custom dimensions for the conversion, which can be used to filter data +-- in a report. +cCustomDimension :: Lens' Conversion [Maybe CustomDimension] +cCustomDimension + = lens _cCustomDimension + (\ s a -> s{_cCustomDimension = a}) + . _Default + . _Coerce + +-- | The Floodlight order ID provided by the advertiser for the conversion. +cFloodlightOrderId :: Lens' Conversion (Maybe Text) +cFloodlightOrderId + = lens _cFloodlightOrderId + (\ s a -> s{_cFloodlightOrderId = a}) + +-- | The revenue amount of this TRANSACTION conversion, in micros. +cRevenueMicros :: Lens' Conversion (Maybe Int64) +cRevenueMicros + = lens _cRevenueMicros + (\ s a -> s{_cRevenueMicros = a}) + +-- | DS click ID for the conversion. +cClickId :: Lens' Conversion (Maybe Text) +cClickId = lens _cClickId (\ s a -> s{_cClickId = a}) + +-- | ID that DS generates and uses to uniquely identify the inventory account +-- that contains the product. +cInventoryAccountId :: Lens' Conversion (Maybe Int64) +cInventoryAccountId + = lens _cInventoryAccountId + (\ s a -> s{_cInventoryAccountId = a}) + +-- | The segmentation type of this conversion (for example, FLOODLIGHT). +cSegmentationType :: Lens' Conversion (Maybe Text) +cSegmentationType + = lens _cSegmentationType + (\ s a -> s{_cSegmentationType = a}) + +-- | The product ID (SKU). +cProductId :: Lens' Conversion (Maybe Text) +cProductId + = lens _cProductId (\ s a -> s{_cProductId = a}) + +-- | DS product group ID. +cProductGroupId :: Lens' Conversion (Maybe Int64) +cProductGroupId + = lens _cProductGroupId + (\ s a -> s{_cProductGroupId = a}) + +instance FromJSON Conversion where + parseJSON + = withObject "Conversion" + (\ o -> + Conversion <$> + (o .:? "adGroupId") <*> + (o .:? "conversionModifiedTimestamp") + <*> (o .:? "state") + <*> (o .:? "engineAccountId") + <*> (o .:? "agencyId") + <*> (o .:? "currencyCode") + <*> (o .:? "storeId") + <*> (o .:? "dsConversionId") + <*> (o .:? "conversionId") + <*> (o .:? "advertiserId") + <*> (o .:? "segmentationId") + <*> (o .:? "channel") + <*> (o .:? "productCountry") + <*> (o .:? "campaignId") + <*> (o .:? "criterionId") + <*> (o .:? "conversionTimestamp") + <*> (o .:? "attributionModel") + <*> (o .:? "segmentationName") + <*> (o .:? "productLanguage") + <*> (o .:? "customMetric" .!= mempty) + <*> (o .:? "countMillis") + <*> (o .:? "quantityMillis") + <*> (o .:? "adId") + <*> (o .:? "deviceType") + <*> (o .:? "type") + <*> (o .:? "customDimension" .!= mempty) + <*> (o .:? "floodlightOrderId") + <*> (o .:? "revenueMicros") + <*> (o .:? "clickId") + <*> (o .:? "inventoryAccountId") + <*> (o .:? "segmentationType") + <*> (o .:? "productId") + <*> (o .:? "productGroupId")) + +instance ToJSON Conversion where + toJSON Conversion{..} + = object + (catMaybes + [("adGroupId" .=) <$> _cAdGroupId, + ("conversionModifiedTimestamp" .=) <$> + _cConversionModifiedTimestamp, + ("state" .=) <$> _cState, + ("engineAccountId" .=) <$> _cEngineAccountId, + ("agencyId" .=) <$> _cAgencyId, + ("currencyCode" .=) <$> _cCurrencyCode, + ("storeId" .=) <$> _cStoreId, + ("dsConversionId" .=) <$> _cDsConversionId, + ("conversionId" .=) <$> _cConversionId, + ("advertiserId" .=) <$> _cAdvertiserId, + ("segmentationId" .=) <$> _cSegmentationId, + ("channel" .=) <$> _cChannel, + ("productCountry" .=) <$> _cProductCountry, + ("campaignId" .=) <$> _cCampaignId, + ("criterionId" .=) <$> _cCriterionId, + ("conversionTimestamp" .=) <$> _cConversionTimestamp, + ("attributionModel" .=) <$> _cAttributionModel, + ("segmentationName" .=) <$> _cSegmentationName, + ("productLanguage" .=) <$> _cProductLanguage, + ("customMetric" .=) <$> _cCustomMetric, + ("countMillis" .=) <$> _cCountMillis, + ("quantityMillis" .=) <$> _cQuantityMillis, + ("adId" .=) <$> _cAdId, + ("deviceType" .=) <$> _cDeviceType, + ("type" .=) <$> _cType, + ("customDimension" .=) <$> _cCustomDimension, + ("floodlightOrderId" .=) <$> _cFloodlightOrderId, + ("revenueMicros" .=) <$> _cRevenueMicros, + ("clickId" .=) <$> _cClickId, + ("inventoryAccountId" .=) <$> _cInventoryAccountId, + ("segmentationType" .=) <$> _cSegmentationType, + ("productId" .=) <$> _cProductId, + ("productGroupId" .=) <$> _cProductGroupId]) + +-- | A saved column +-- +-- /See:/ 'savedColumn' smart constructor. +data SavedColumn = SavedColumn + { _scSavedColumnName :: !(Maybe Text) + , _scKind :: !Text + , _scType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedColumn' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scSavedColumnName' +-- +-- * 'scKind' +-- +-- * 'scType' +savedColumn + :: SavedColumn +savedColumn = + SavedColumn + { _scSavedColumnName = Nothing + , _scKind = "doubleclicksearch#savedColumn" + , _scType = Nothing + } + +-- | The name of the saved column. +scSavedColumnName :: Lens' SavedColumn (Maybe Text) +scSavedColumnName + = lens _scSavedColumnName + (\ s a -> s{_scSavedColumnName = a}) + +-- | Identifies this as a SavedColumn resource. Value: the fixed string +-- doubleclicksearch#savedColumn. +scKind :: Lens' SavedColumn Text +scKind = lens _scKind (\ s a -> s{_scKind = a}) + +-- | The type of data this saved column will produce. +scType :: Lens' SavedColumn (Maybe Text) +scType = lens _scType (\ s a -> s{_scType = a}) + +instance FromJSON SavedColumn where + parseJSON + = withObject "SavedColumn" + (\ o -> + SavedColumn <$> + (o .:? "savedColumnName") <*> + (o .:? "kind" .!= "doubleclicksearch#savedColumn") + <*> (o .:? "type")) + +instance ToJSON SavedColumn where + toJSON SavedColumn{..} + = object + (catMaybes + [("savedColumnName" .=) <$> _scSavedColumnName, + Just ("kind" .= _scKind), ("type" .=) <$> _scType]) + +-- | The response to a update availability request. +-- +-- /See:/ 'updateAvailabilityResponse' smart constructor. +newtype UpdateAvailabilityResponse = UpdateAvailabilityResponse + { _uAvailabilities :: Maybe [Maybe Availability] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateAvailabilityResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uAvailabilities' +updateAvailabilityResponse + :: UpdateAvailabilityResponse +updateAvailabilityResponse = + UpdateAvailabilityResponse + { _uAvailabilities = Nothing + } + +-- | The availabilities being returned. +uAvailabilities :: Lens' UpdateAvailabilityResponse [Maybe Availability] +uAvailabilities + = lens _uAvailabilities + (\ s a -> s{_uAvailabilities = a}) + . _Default + . _Coerce + +instance FromJSON UpdateAvailabilityResponse where + parseJSON + = withObject "UpdateAvailabilityResponse" + (\ o -> + UpdateAvailabilityResponse <$> + (o .:? "availabilities" .!= mempty)) + +instance ToJSON UpdateAvailabilityResponse where + toJSON UpdateAvailabilityResponse{..} + = object + (catMaybes + [("availabilities" .=) <$> _uAvailabilities]) + +-- | A message containing the custome dimension. +-- +-- /See:/ 'customDimension' smart constructor. +data CustomDimension = CustomDimension + { _cdValue :: !(Maybe Text) + , _cdName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomDimension' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdValue' +-- +-- * 'cdName' +customDimension + :: CustomDimension +customDimension = + CustomDimension + { _cdValue = Nothing + , _cdName = Nothing + } + +-- | Custom dimension value. +cdValue :: Lens' CustomDimension (Maybe Text) +cdValue = lens _cdValue (\ s a -> s{_cdValue = a}) + +-- | Custom dimension name. +cdName :: Lens' CustomDimension (Maybe Text) +cdName = lens _cdName (\ s a -> s{_cdName = a}) + +instance FromJSON CustomDimension where + parseJSON + = withObject "CustomDimension" + (\ o -> + CustomDimension <$> + (o .:? "value") <*> (o .:? "name")) + +instance ToJSON CustomDimension where + toJSON CustomDimension{..} + = object + (catMaybes + [("value" .=) <$> _cdValue, ("name" .=) <$> _cdName]) + +-- | A list of saved columns. Advertisers create saved columns to report on +-- Floodlight activities, Google Analytics goals, or custom KPIs. To +-- request reports with saved columns, you\'ll need the saved column names +-- that are available from this list. +-- +-- /See:/ 'savedColumnList' smart constructor. +data SavedColumnList = SavedColumnList + { _sclKind :: !Text + , _sclItems :: !(Maybe [Maybe SavedColumn]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedColumnList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sclKind' +-- +-- * 'sclItems' +savedColumnList + :: SavedColumnList +savedColumnList = + SavedColumnList + { _sclKind = "doubleclicksearch#savedColumnList" + , _sclItems = Nothing + } + +-- | Identifies this as a SavedColumnList resource. Value: the fixed string +-- doubleclicksearch#savedColumnList. +sclKind :: Lens' SavedColumnList Text +sclKind = lens _sclKind (\ s a -> s{_sclKind = a}) + +-- | The saved columns being requested. +sclItems :: Lens' SavedColumnList [Maybe SavedColumn] +sclItems + = lens _sclItems (\ s a -> s{_sclItems = a}) . + _Default + . _Coerce + +instance FromJSON SavedColumnList where + parseJSON + = withObject "SavedColumnList" + (\ o -> + SavedColumnList <$> + (o .:? "kind" .!= + "doubleclicksearch#savedColumnList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON SavedColumnList where + toJSON SavedColumnList{..} + = object + (catMaybes + [Just ("kind" .= _sclKind), + ("items" .=) <$> _sclItems]) diff --git a/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Sum.hs b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Sum.hs new file mode 100644 index 000000000..23e782c94 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.DoubleClickSearch.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.DoubleClickSearch.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Get.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Get.hs new file mode 100644 index 000000000..df7e6f430 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Get.hs @@ -0,0 +1,290 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Conversion.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of conversions from a DoubleClick Search engine +-- account. +-- +-- /See:/ for @DoubleclicksearchConversionGet@. +module DoubleClickSearch.Conversion.Get + ( + -- * REST Resource + ConversionGetAPI + + -- * Creating a Request + , conversionGet + , ConversionGet + + -- * Request Lenses + , cgQuotaUser + , cgAdGroupId + , cgPrettyPrint + , cgEngineAccountId + , cgAgencyId + , cgUserIp + , cgAdvertiserId + , cgEndDate + , cgCampaignId + , cgCriterionId + , cgStartDate + , cgKey + , cgStartRow + , cgAdId + , cgOauthToken + , cgRowCount + , cgFields + , cgAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchConversionGet@ which the +-- 'ConversionGet' request conforms to. +type ConversionGetAPI = + "agency" :> + Capture "agencyId" Int64 :> + "advertiser" :> + Capture "advertiserId" Int64 :> + "engine" :> + Capture "engineAccountId" Int64 :> + "conversion" :> + QueryParam "adGroupId" Int64 :> + QueryParam "endDate" Int32 :> + QueryParam "campaignId" Int64 :> + QueryParam "criterionId" Int64 :> + QueryParam "startDate" Int32 :> + QueryParam "startRow" Word32 :> + QueryParam "adId" Int64 :> + QueryParam "rowCount" Int32 :> + Get '[JSON] ConversionList + +-- | Retrieves a list of conversions from a DoubleClick Search engine +-- account. +-- +-- /See:/ 'conversionGet' smart constructor. +data ConversionGet = ConversionGet + { _cgQuotaUser :: !(Maybe Text) + , _cgAdGroupId :: !(Maybe Int64) + , _cgPrettyPrint :: !Bool + , _cgEngineAccountId :: !Int64 + , _cgAgencyId :: !Int64 + , _cgUserIp :: !(Maybe Text) + , _cgAdvertiserId :: !Int64 + , _cgEndDate :: !Int32 + , _cgCampaignId :: !(Maybe Int64) + , _cgCriterionId :: !(Maybe Int64) + , _cgStartDate :: !Int32 + , _cgKey :: !(Maybe Text) + , _cgStartRow :: !Word32 + , _cgAdId :: !(Maybe Int64) + , _cgOauthToken :: !(Maybe Text) + , _cgRowCount :: !Int32 + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgAdGroupId' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgEngineAccountId' +-- +-- * 'cgAgencyId' +-- +-- * 'cgUserIp' +-- +-- * 'cgAdvertiserId' +-- +-- * 'cgEndDate' +-- +-- * 'cgCampaignId' +-- +-- * 'cgCriterionId' +-- +-- * 'cgStartDate' +-- +-- * 'cgKey' +-- +-- * 'cgStartRow' +-- +-- * 'cgAdId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgRowCount' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +conversionGet + :: Int64 -- ^ 'engineAccountId' + -> Int64 -- ^ 'agencyId' + -> Int64 -- ^ 'advertiserId' + -> Int32 -- ^ 'endDate' + -> Int32 -- ^ 'startDate' + -> Word32 -- ^ 'startRow' + -> Int32 -- ^ 'rowCount' + -> ConversionGet +conversionGet pCgEngineAccountId_ pCgAgencyId_ pCgAdvertiserId_ pCgEndDate_ pCgStartDate_ pCgStartRow_ pCgRowCount_ = + ConversionGet + { _cgQuotaUser = Nothing + , _cgAdGroupId = Nothing + , _cgPrettyPrint = True + , _cgEngineAccountId = pCgEngineAccountId_ + , _cgAgencyId = pCgAgencyId_ + , _cgUserIp = Nothing + , _cgAdvertiserId = pCgAdvertiserId_ + , _cgEndDate = pCgEndDate_ + , _cgCampaignId = Nothing + , _cgCriterionId = Nothing + , _cgStartDate = pCgStartDate_ + , _cgKey = Nothing + , _cgStartRow = pCgStartRow_ + , _cgAdId = Nothing + , _cgOauthToken = Nothing + , _cgRowCount = pCgRowCount_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ConversionGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Numeric ID of the ad group. +cgAdGroupId :: Lens' ConversionGet' (Maybe Int64) +cgAdGroupId + = lens _cgAdGroupId (\ s a -> s{_cgAdGroupId = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ConversionGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | Numeric ID of the engine account. +cgEngineAccountId :: Lens' ConversionGet' Int64 +cgEngineAccountId + = lens _cgEngineAccountId + (\ s a -> s{_cgEngineAccountId = a}) + +-- | Numeric ID of the agency. +cgAgencyId :: Lens' ConversionGet' Int64 +cgAgencyId + = lens _cgAgencyId (\ s a -> s{_cgAgencyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ConversionGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | Numeric ID of the advertiser. +cgAdvertiserId :: Lens' ConversionGet' Int64 +cgAdvertiserId + = lens _cgAdvertiserId + (\ s a -> s{_cgAdvertiserId = a}) + +-- | Last date (inclusive) on which to retrieve conversions. Format is +-- yyyymmdd. +cgEndDate :: Lens' ConversionGet' Int32 +cgEndDate + = lens _cgEndDate (\ s a -> s{_cgEndDate = a}) + +-- | Numeric ID of the campaign. +cgCampaignId :: Lens' ConversionGet' (Maybe Int64) +cgCampaignId + = lens _cgCampaignId (\ s a -> s{_cgCampaignId = a}) + +-- | Numeric ID of the criterion. +cgCriterionId :: Lens' ConversionGet' (Maybe Int64) +cgCriterionId + = lens _cgCriterionId + (\ s a -> s{_cgCriterionId = a}) + +-- | First date (inclusive) on which to retrieve conversions. Format is +-- yyyymmdd. +cgStartDate :: Lens' ConversionGet' Int32 +cgStartDate + = lens _cgStartDate (\ s a -> s{_cgStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ConversionGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | The 0-based starting index for retrieving conversions results. +cgStartRow :: Lens' ConversionGet' Word32 +cgStartRow + = lens _cgStartRow (\ s a -> s{_cgStartRow = a}) + +-- | Numeric ID of the ad. +cgAdId :: Lens' ConversionGet' (Maybe Int64) +cgAdId = lens _cgAdId (\ s a -> s{_cgAdId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ConversionGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | The number of conversions to return per call. +cgRowCount :: Lens' ConversionGet' Int32 +cgRowCount + = lens _cgRowCount (\ s a -> s{_cgRowCount = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ConversionGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ConversionGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ConversionGet' where + type Rs ConversionGet' = ConversionList + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ConversionGet{..} + = go _cgQuotaUser _cgAdGroupId _cgPrettyPrint + _cgEngineAccountId + _cgAgencyId + _cgUserIp + _cgAdvertiserId + (Just _cgEndDate) + _cgCampaignId + _cgCriterionId + (Just _cgStartDate) + _cgKey + (Just _cgStartRow) + _cgAdId + _cgOauthToken + (Just _cgRowCount) + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy ConversionGetAPI) r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Insert.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Insert.hs new file mode 100644 index 000000000..01b8ea6b2 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Insert.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Conversion.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a batch of new conversions into DoubleClick Search. +-- +-- /See:/ for @DoubleclicksearchConversionInsert@. +module DoubleClickSearch.Conversion.Insert + ( + -- * REST Resource + ConversionInsertAPI + + -- * Creating a Request + , conversionInsert + , ConversionInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchConversionInsert@ which the +-- 'ConversionInsert' request conforms to. +type ConversionInsertAPI = + "conversion" :> Post '[JSON] ConversionList + +-- | Inserts a batch of new conversions into DoubleClick Search. +-- +-- /See:/ 'conversionInsert' smart constructor. +data ConversionInsert = ConversionInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +conversionInsert + :: ConversionInsert +conversionInsert = + ConversionInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' ConversionInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' ConversionInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' ConversionInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' ConversionInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' ConversionInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' ConversionInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' ConversionInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest ConversionInsert' where + type Rs ConversionInsert' = ConversionList + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ConversionInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute + (Proxy :: Proxy ConversionInsertAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Patch.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Patch.hs new file mode 100644 index 000000000..c9b470939 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Patch.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Conversion.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a batch of conversions in DoubleClick Search. This method +-- supports patch semantics. +-- +-- /See:/ for @DoubleclicksearchConversionPatch@. +module DoubleClickSearch.Conversion.Patch + ( + -- * REST Resource + ConversionPatchAPI + + -- * Creating a Request + , conversionPatch + , ConversionPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpEngineAccountId + , cpAgencyId + , cpUserIp + , cpAdvertiserId + , cpEndDate + , cpStartDate + , cpKey + , cpStartRow + , cpOauthToken + , cpRowCount + , cpFields + , cpAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchConversionPatch@ which the +-- 'ConversionPatch' request conforms to. +type ConversionPatchAPI = + "conversion" :> + QueryParam "engineAccountId" Int64 :> + QueryParam "agencyId" Int64 :> + QueryParam "advertiserId" Int64 :> + QueryParam "endDate" Int32 :> + QueryParam "startDate" Int32 :> + QueryParam "startRow" Word32 :> + QueryParam "rowCount" Int32 :> + Patch '[JSON] ConversionList + +-- | Updates a batch of conversions in DoubleClick Search. This method +-- supports patch semantics. +-- +-- /See:/ 'conversionPatch' smart constructor. +data ConversionPatch = ConversionPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpEngineAccountId :: !Int64 + , _cpAgencyId :: !Int64 + , _cpUserIp :: !(Maybe Text) + , _cpAdvertiserId :: !Int64 + , _cpEndDate :: !Int32 + , _cpStartDate :: !Int32 + , _cpKey :: !(Maybe Text) + , _cpStartRow :: !Word32 + , _cpOauthToken :: !(Maybe Text) + , _cpRowCount :: !Int32 + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpEngineAccountId' +-- +-- * 'cpAgencyId' +-- +-- * 'cpUserIp' +-- +-- * 'cpAdvertiserId' +-- +-- * 'cpEndDate' +-- +-- * 'cpStartDate' +-- +-- * 'cpKey' +-- +-- * 'cpStartRow' +-- +-- * 'cpOauthToken' +-- +-- * 'cpRowCount' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +conversionPatch + :: Int64 -- ^ 'engineAccountId' + -> Int64 -- ^ 'agencyId' + -> Int64 -- ^ 'advertiserId' + -> Int32 -- ^ 'endDate' + -> Int32 -- ^ 'startDate' + -> Word32 -- ^ 'startRow' + -> Int32 -- ^ 'rowCount' + -> ConversionPatch +conversionPatch pCpEngineAccountId_ pCpAgencyId_ pCpAdvertiserId_ pCpEndDate_ pCpStartDate_ pCpStartRow_ pCpRowCount_ = + ConversionPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpEngineAccountId = pCpEngineAccountId_ + , _cpAgencyId = pCpAgencyId_ + , _cpUserIp = Nothing + , _cpAdvertiserId = pCpAdvertiserId_ + , _cpEndDate = pCpEndDate_ + , _cpStartDate = pCpStartDate_ + , _cpKey = Nothing + , _cpStartRow = pCpStartRow_ + , _cpOauthToken = Nothing + , _cpRowCount = pCpRowCount_ + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' ConversionPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' ConversionPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | Numeric ID of the engine account. +cpEngineAccountId :: Lens' ConversionPatch' Int64 +cpEngineAccountId + = lens _cpEngineAccountId + (\ s a -> s{_cpEngineAccountId = a}) + +-- | Numeric ID of the agency. +cpAgencyId :: Lens' ConversionPatch' Int64 +cpAgencyId + = lens _cpAgencyId (\ s a -> s{_cpAgencyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' ConversionPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | Numeric ID of the advertiser. +cpAdvertiserId :: Lens' ConversionPatch' Int64 +cpAdvertiserId + = lens _cpAdvertiserId + (\ s a -> s{_cpAdvertiserId = a}) + +-- | Last date (inclusive) on which to retrieve conversions. Format is +-- yyyymmdd. +cpEndDate :: Lens' ConversionPatch' Int32 +cpEndDate + = lens _cpEndDate (\ s a -> s{_cpEndDate = a}) + +-- | First date (inclusive) on which to retrieve conversions. Format is +-- yyyymmdd. +cpStartDate :: Lens' ConversionPatch' Int32 +cpStartDate + = lens _cpStartDate (\ s a -> s{_cpStartDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' ConversionPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | The 0-based starting index for retrieving conversions results. +cpStartRow :: Lens' ConversionPatch' Word32 +cpStartRow + = lens _cpStartRow (\ s a -> s{_cpStartRow = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' ConversionPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | The number of conversions to return per call. +cpRowCount :: Lens' ConversionPatch' Int32 +cpRowCount + = lens _cpRowCount (\ s a -> s{_cpRowCount = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' ConversionPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' ConversionPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest ConversionPatch' where + type Rs ConversionPatch' = ConversionList + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ConversionPatch{..} + = go _cpQuotaUser _cpPrettyPrint + (Just _cpEngineAccountId) + (Just _cpAgencyId) + _cpUserIp + (Just _cpAdvertiserId) + (Just _cpEndDate) + (Just _cpStartDate) + _cpKey + (Just _cpStartRow) + _cpOauthToken + (Just _cpRowCount) + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy ConversionPatchAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Update.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Update.hs new file mode 100644 index 000000000..0f31f3d90 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Update.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Conversion.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a batch of conversions in DoubleClick Search. +-- +-- /See:/ for @DoubleclicksearchConversionUpdate@. +module DoubleClickSearch.Conversion.Update + ( + -- * REST Resource + ConversionUpdateAPI + + -- * Creating a Request + , conversionUpdate + , ConversionUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchConversionUpdate@ which the +-- 'ConversionUpdate' request conforms to. +type ConversionUpdateAPI = + "conversion" :> Put '[JSON] ConversionList + +-- | Updates a batch of conversions in DoubleClick Search. +-- +-- /See:/ 'conversionUpdate' smart constructor. +data ConversionUpdate = ConversionUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +conversionUpdate + :: ConversionUpdate +conversionUpdate = + ConversionUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' ConversionUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' ConversionUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' ConversionUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' ConversionUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' ConversionUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' ConversionUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' ConversionUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest ConversionUpdate' where + type Rs ConversionUpdate' = ConversionList + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ConversionUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute + (Proxy :: Proxy ConversionUpdateAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/UpdateAvailability.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/UpdateAvailability.hs new file mode 100644 index 000000000..88a0ef45f --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/UpdateAvailability.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Conversion.UpdateAvailability +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the availabilities of a batch of floodlight activities in +-- DoubleClick Search. +-- +-- /See:/ for @DoubleclicksearchConversionUpdateAvailability@. +module DoubleClickSearch.Conversion.UpdateAvailability + ( + -- * REST Resource + ConversionUpdateAvailabilityAPI + + -- * Creating a Request + , conversionUpdateAvailability + , ConversionUpdateAvailability + + -- * Request Lenses + , cuaQuotaUser + , cuaPrettyPrint + , cuaUserIp + , cuaKey + , cuaOauthToken + , cuaFields + , cuaAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchConversionUpdateAvailability@ which the +-- 'ConversionUpdateAvailability' request conforms to. +type ConversionUpdateAvailabilityAPI = + "conversion" :> + "updateAvailability" :> + Post '[JSON] UpdateAvailabilityResponse + +-- | Updates the availabilities of a batch of floodlight activities in +-- DoubleClick Search. +-- +-- /See:/ 'conversionUpdateAvailability' smart constructor. +data ConversionUpdateAvailability = ConversionUpdateAvailability + { _cuaQuotaUser :: !(Maybe Text) + , _cuaPrettyPrint :: !Bool + , _cuaUserIp :: !(Maybe Text) + , _cuaKey :: !(Maybe Text) + , _cuaOauthToken :: !(Maybe Text) + , _cuaFields :: !(Maybe Text) + , _cuaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ConversionUpdateAvailability'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuaQuotaUser' +-- +-- * 'cuaPrettyPrint' +-- +-- * 'cuaUserIp' +-- +-- * 'cuaKey' +-- +-- * 'cuaOauthToken' +-- +-- * 'cuaFields' +-- +-- * 'cuaAlt' +conversionUpdateAvailability + :: ConversionUpdateAvailability +conversionUpdateAvailability = + ConversionUpdateAvailability + { _cuaQuotaUser = Nothing + , _cuaPrettyPrint = True + , _cuaUserIp = Nothing + , _cuaKey = Nothing + , _cuaOauthToken = Nothing + , _cuaFields = Nothing + , _cuaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuaQuotaUser :: Lens' ConversionUpdateAvailability' (Maybe Text) +cuaQuotaUser + = lens _cuaQuotaUser (\ s a -> s{_cuaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuaPrettyPrint :: Lens' ConversionUpdateAvailability' Bool +cuaPrettyPrint + = lens _cuaPrettyPrint + (\ s a -> s{_cuaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuaUserIp :: Lens' ConversionUpdateAvailability' (Maybe Text) +cuaUserIp + = lens _cuaUserIp (\ s a -> s{_cuaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuaKey :: Lens' ConversionUpdateAvailability' (Maybe Text) +cuaKey = lens _cuaKey (\ s a -> s{_cuaKey = a}) + +-- | OAuth 2.0 token for the current user. +cuaOauthToken :: Lens' ConversionUpdateAvailability' (Maybe Text) +cuaOauthToken + = lens _cuaOauthToken + (\ s a -> s{_cuaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuaFields :: Lens' ConversionUpdateAvailability' (Maybe Text) +cuaFields + = lens _cuaFields (\ s a -> s{_cuaFields = a}) + +-- | Data format for the response. +cuaAlt :: Lens' ConversionUpdateAvailability' Text +cuaAlt = lens _cuaAlt (\ s a -> s{_cuaAlt = a}) + +instance GoogleRequest ConversionUpdateAvailability' + where + type Rs ConversionUpdateAvailability' = + UpdateAvailabilityResponse + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ConversionUpdateAvailability{..} + = go _cuaQuotaUser _cuaPrettyPrint _cuaUserIp _cuaKey + _cuaOauthToken + _cuaFields + _cuaAlt + where go + = clientWithRoute + (Proxy :: Proxy ConversionUpdateAvailabilityAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Generate.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Generate.hs new file mode 100644 index 000000000..d0000b6ab --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Generate.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Reports.Generate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates and returns a report immediately. +-- +-- /See:/ for @DoubleclicksearchReportsGenerate@. +module DoubleClickSearch.Reports.Generate + ( + -- * REST Resource + ReportsGenerateAPI + + -- * Creating a Request + , reportsGenerate + , ReportsGenerate + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rUserIp + , rKey + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchReportsGenerate@ which the +-- 'ReportsGenerate' request conforms to. +type ReportsGenerateAPI = + "reports" :> "generate" :> Post '[JSON] Report + +-- | Generates and returns a report immediately. +-- +-- /See:/ 'reportsGenerate' smart constructor. +data ReportsGenerate = ReportsGenerate + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rUserIp :: !(Maybe Text) + , _rKey :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGenerate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rUserIp' +-- +-- * 'rKey' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +reportsGenerate + :: ReportsGenerate +reportsGenerate = + ReportsGenerate + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rUserIp = Nothing + , _rKey = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' ReportsGenerate' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' ReportsGenerate' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' ReportsGenerate' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' ReportsGenerate' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' ReportsGenerate' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' ReportsGenerate' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' ReportsGenerate' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest ReportsGenerate' where + type Rs ReportsGenerate' = Report + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ReportsGenerate{..} + = go _rQuotaUser _rPrettyPrint _rUserIp _rKey + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGenerateAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Get.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Get.hs new file mode 100644 index 000000000..11e46da84 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Reports.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Polls for the status of a report request. +-- +-- /See:/ for @DoubleclicksearchReportsGet@. +module DoubleClickSearch.Reports.Get + ( + -- * REST Resource + ReportsGetAPI + + -- * Creating a Request + , reportsGet + , ReportsGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgReportId + , rgKey + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchReportsGet@ which the +-- 'ReportsGet' request conforms to. +type ReportsGetAPI = + "reports" :> + Capture "reportId" Text :> Get '[JSON] Report + +-- | Polls for the status of a report request. +-- +-- /See:/ 'reportsGet' smart constructor. +data ReportsGet = ReportsGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgReportId :: !Text + , _rgKey :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgReportId' +-- +-- * 'rgKey' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +reportsGet + :: Text -- ^ 'reportId' + -> ReportsGet +reportsGet pRgReportId_ = + ReportsGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgReportId = pRgReportId_ + , _rgKey = Nothing + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReportsGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReportsGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReportsGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | ID of the report request being polled. +rgReportId :: Lens' ReportsGet' Text +rgReportId + = lens _rgReportId (\ s a -> s{_rgReportId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReportsGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReportsGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReportsGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReportsGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReportsGet' where + type Rs ReportsGet' = Report + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ReportsGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgReportId + _rgKey + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGetAPI) r u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/GetFile.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/GetFile.hs new file mode 100644 index 000000000..7b45b9209 --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/GetFile.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Reports.GetFile +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Downloads a report file encoded in UTF-8. +-- +-- /See:/ for @DoubleclicksearchReportsGetFile@. +module DoubleClickSearch.Reports.GetFile + ( + -- * REST Resource + ReportsGetFileAPI + + -- * Creating a Request + , reportsGetFile + , ReportsGetFile + + -- * Request Lenses + , rgfQuotaUser + , rgfPrettyPrint + , rgfUserIp + , rgfReportId + , rgfReportFragment + , rgfKey + , rgfOauthToken + , rgfFields + , rgfAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchReportsGetFile@ which the +-- 'ReportsGetFile' request conforms to. +type ReportsGetFileAPI = + "reports" :> + Capture "reportId" Text :> + "files" :> + Capture "reportFragment" Int32 :> Get '[JSON] () + +-- | Downloads a report file encoded in UTF-8. +-- +-- /See:/ 'reportsGetFile' smart constructor. +data ReportsGetFile = ReportsGetFile + { _rgfQuotaUser :: !(Maybe Text) + , _rgfPrettyPrint :: !Bool + , _rgfUserIp :: !(Maybe Text) + , _rgfReportId :: !Text + , _rgfReportFragment :: !Int32 + , _rgfKey :: !(Maybe Text) + , _rgfOauthToken :: !(Maybe Text) + , _rgfFields :: !(Maybe Text) + , _rgfAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsGetFile'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgfQuotaUser' +-- +-- * 'rgfPrettyPrint' +-- +-- * 'rgfUserIp' +-- +-- * 'rgfReportId' +-- +-- * 'rgfReportFragment' +-- +-- * 'rgfKey' +-- +-- * 'rgfOauthToken' +-- +-- * 'rgfFields' +-- +-- * 'rgfAlt' +reportsGetFile + :: Text -- ^ 'reportId' + -> Int32 -- ^ 'reportFragment' + -> ReportsGetFile +reportsGetFile pRgfReportId_ pRgfReportFragment_ = + ReportsGetFile + { _rgfQuotaUser = Nothing + , _rgfPrettyPrint = True + , _rgfUserIp = Nothing + , _rgfReportId = pRgfReportId_ + , _rgfReportFragment = pRgfReportFragment_ + , _rgfKey = Nothing + , _rgfOauthToken = Nothing + , _rgfFields = Nothing + , _rgfAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgfQuotaUser :: Lens' ReportsGetFile' (Maybe Text) +rgfQuotaUser + = lens _rgfQuotaUser (\ s a -> s{_rgfQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgfPrettyPrint :: Lens' ReportsGetFile' Bool +rgfPrettyPrint + = lens _rgfPrettyPrint + (\ s a -> s{_rgfPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgfUserIp :: Lens' ReportsGetFile' (Maybe Text) +rgfUserIp + = lens _rgfUserIp (\ s a -> s{_rgfUserIp = a}) + +-- | ID of the report. +rgfReportId :: Lens' ReportsGetFile' Text +rgfReportId + = lens _rgfReportId (\ s a -> s{_rgfReportId = a}) + +-- | The index of the report fragment to download. +rgfReportFragment :: Lens' ReportsGetFile' Int32 +rgfReportFragment + = lens _rgfReportFragment + (\ s a -> s{_rgfReportFragment = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgfKey :: Lens' ReportsGetFile' (Maybe Text) +rgfKey = lens _rgfKey (\ s a -> s{_rgfKey = a}) + +-- | OAuth 2.0 token for the current user. +rgfOauthToken :: Lens' ReportsGetFile' (Maybe Text) +rgfOauthToken + = lens _rgfOauthToken + (\ s a -> s{_rgfOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgfFields :: Lens' ReportsGetFile' (Maybe Text) +rgfFields + = lens _rgfFields (\ s a -> s{_rgfFields = a}) + +-- | Data format for the response. +rgfAlt :: Lens' ReportsGetFile' Text +rgfAlt = lens _rgfAlt (\ s a -> s{_rgfAlt = a}) + +instance GoogleRequest ReportsGetFile' where + type Rs ReportsGetFile' = () + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ReportsGetFile{..} + = go _rgfQuotaUser _rgfPrettyPrint _rgfUserIp + _rgfReportId + _rgfReportFragment + _rgfKey + _rgfOauthToken + _rgfFields + _rgfAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsGetFileAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Request.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Request.hs new file mode 100644 index 000000000..7fb101e5a --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Request.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.Reports.Request +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a report request into the reporting system. +-- +-- /See:/ for @DoubleclicksearchReportsRequest@. +module DoubleClickSearch.Reports.Request + ( + -- * REST Resource + ReportsRequestAPI + + -- * Creating a Request + , reportsRequest + , ReportsRequest + + -- * Request Lenses + , rrQuotaUser + , rrPrettyPrint + , rrUserIp + , rrKey + , rrOauthToken + , rrFields + , rrAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchReportsRequest@ which the +-- 'ReportsRequest' request conforms to. +type ReportsRequestAPI = + "reports" :> Post '[JSON] Report + +-- | Inserts a report request into the reporting system. +-- +-- /See:/ 'reportsRequest' smart constructor. +data ReportsRequest = ReportsRequest + { _rrQuotaUser :: !(Maybe Text) + , _rrPrettyPrint :: !Bool + , _rrUserIp :: !(Maybe Text) + , _rrKey :: !(Maybe Text) + , _rrOauthToken :: !(Maybe Text) + , _rrFields :: !(Maybe Text) + , _rrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsRequest'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrQuotaUser' +-- +-- * 'rrPrettyPrint' +-- +-- * 'rrUserIp' +-- +-- * 'rrKey' +-- +-- * 'rrOauthToken' +-- +-- * 'rrFields' +-- +-- * 'rrAlt' +reportsRequest + :: ReportsRequest +reportsRequest = + ReportsRequest + { _rrQuotaUser = Nothing + , _rrPrettyPrint = True + , _rrUserIp = Nothing + , _rrKey = Nothing + , _rrOauthToken = Nothing + , _rrFields = Nothing + , _rrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrQuotaUser :: Lens' ReportsRequest' (Maybe Text) +rrQuotaUser + = lens _rrQuotaUser (\ s a -> s{_rrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrPrettyPrint :: Lens' ReportsRequest' Bool +rrPrettyPrint + = lens _rrPrettyPrint + (\ s a -> s{_rrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrUserIp :: Lens' ReportsRequest' (Maybe Text) +rrUserIp = lens _rrUserIp (\ s a -> s{_rrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrKey :: Lens' ReportsRequest' (Maybe Text) +rrKey = lens _rrKey (\ s a -> s{_rrKey = a}) + +-- | OAuth 2.0 token for the current user. +rrOauthToken :: Lens' ReportsRequest' (Maybe Text) +rrOauthToken + = lens _rrOauthToken (\ s a -> s{_rrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrFields :: Lens' ReportsRequest' (Maybe Text) +rrFields = lens _rrFields (\ s a -> s{_rrFields = a}) + +-- | Data format for the response. +rrAlt :: Lens' ReportsRequest' Text +rrAlt = lens _rrAlt (\ s a -> s{_rrAlt = a}) + +instance GoogleRequest ReportsRequest' where + type Rs ReportsRequest' = Report + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u ReportsRequest{..} + = go _rrQuotaUser _rrPrettyPrint _rrUserIp _rrKey + _rrOauthToken + _rrFields + _rrAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsRequestAPI) + r + u diff --git a/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs new file mode 100644 index 000000000..c6bb1c2ba --- /dev/null +++ b/gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.DoubleClickSearch.SavedColumns.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve the list of saved columns for a specified advertiser. +-- +-- /See:/ for @DoubleclicksearchSavedColumnsList@. +module DoubleClickSearch.SavedColumns.List + ( + -- * REST Resource + SavedColumnsListAPI + + -- * Creating a Request + , savedColumnsList + , SavedColumnsList + + -- * Request Lenses + , sclQuotaUser + , sclPrettyPrint + , sclAgencyId + , sclUserIp + , sclAdvertiserId + , sclKey + , sclOauthToken + , sclFields + , sclAlt + ) where + +import Network.Google.DoubleClickSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @DoubleclicksearchSavedColumnsList@ which the +-- 'SavedColumnsList' request conforms to. +type SavedColumnsListAPI = + "agency" :> + Capture "agencyId" Int64 :> + "advertiser" :> + Capture "advertiserId" Int64 :> + "savedcolumns" :> Get '[JSON] SavedColumnList + +-- | Retrieve the list of saved columns for a specified advertiser. +-- +-- /See:/ 'savedColumnsList' smart constructor. +data SavedColumnsList = SavedColumnsList + { _sclQuotaUser :: !(Maybe Text) + , _sclPrettyPrint :: !Bool + , _sclAgencyId :: !Int64 + , _sclUserIp :: !(Maybe Text) + , _sclAdvertiserId :: !Int64 + , _sclKey :: !(Maybe Text) + , _sclOauthToken :: !(Maybe Text) + , _sclFields :: !(Maybe Text) + , _sclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SavedColumnsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sclQuotaUser' +-- +-- * 'sclPrettyPrint' +-- +-- * 'sclAgencyId' +-- +-- * 'sclUserIp' +-- +-- * 'sclAdvertiserId' +-- +-- * 'sclKey' +-- +-- * 'sclOauthToken' +-- +-- * 'sclFields' +-- +-- * 'sclAlt' +savedColumnsList + :: Int64 -- ^ 'agencyId' + -> Int64 -- ^ 'advertiserId' + -> SavedColumnsList +savedColumnsList pSclAgencyId_ pSclAdvertiserId_ = + SavedColumnsList + { _sclQuotaUser = Nothing + , _sclPrettyPrint = True + , _sclAgencyId = pSclAgencyId_ + , _sclUserIp = Nothing + , _sclAdvertiserId = pSclAdvertiserId_ + , _sclKey = Nothing + , _sclOauthToken = Nothing + , _sclFields = Nothing + , _sclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sclQuotaUser :: Lens' SavedColumnsList' (Maybe Text) +sclQuotaUser + = lens _sclQuotaUser (\ s a -> s{_sclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sclPrettyPrint :: Lens' SavedColumnsList' Bool +sclPrettyPrint + = lens _sclPrettyPrint + (\ s a -> s{_sclPrettyPrint = a}) + +-- | DS ID of the agency. +sclAgencyId :: Lens' SavedColumnsList' Int64 +sclAgencyId + = lens _sclAgencyId (\ s a -> s{_sclAgencyId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sclUserIp :: Lens' SavedColumnsList' (Maybe Text) +sclUserIp + = lens _sclUserIp (\ s a -> s{_sclUserIp = a}) + +-- | DS ID of the advertiser. +sclAdvertiserId :: Lens' SavedColumnsList' Int64 +sclAdvertiserId + = lens _sclAdvertiserId + (\ s a -> s{_sclAdvertiserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sclKey :: Lens' SavedColumnsList' (Maybe Text) +sclKey = lens _sclKey (\ s a -> s{_sclKey = a}) + +-- | OAuth 2.0 token for the current user. +sclOauthToken :: Lens' SavedColumnsList' (Maybe Text) +sclOauthToken + = lens _sclOauthToken + (\ s a -> s{_sclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sclFields :: Lens' SavedColumnsList' (Maybe Text) +sclFields + = lens _sclFields (\ s a -> s{_sclFields = a}) + +-- | Data format for the response. +sclAlt :: Lens' SavedColumnsList' Text +sclAlt = lens _sclAlt (\ s a -> s{_sclAlt = a}) + +instance GoogleRequest SavedColumnsList' where + type Rs SavedColumnsList' = SavedColumnList + request + = requestWithRoute defReq doubleClickSearchURL + requestWithRoute r u SavedColumnsList{..} + = go _sclQuotaUser _sclPrettyPrint _sclAgencyId + _sclUserIp + _sclAdvertiserId + _sclKey + _sclOauthToken + _sclFields + _sclAlt + where go + = clientWithRoute + (Proxy :: Proxy SavedColumnsListAPI) + r + u diff --git a/gogol-doubleclick-search/gogol-doubleclick-search.cabal b/gogol-doubleclick-search/gogol-doubleclick-search.cabal new file mode 100644 index 000000000..eddde9b7f --- /dev/null +++ b/gogol-doubleclick-search/gogol-doubleclick-search.cabal @@ -0,0 +1,53 @@ +name: gogol-doubleclick-search +version: 0.0.1 +synopsis: DoubleClick Search API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Report and modify your advertising data in DoubleClick Search (for + example, campaigns, ad groups, keywords, and conversions). + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.DoubleClickSearch + , Network.Google.DoubleClickSearch.Types + , Network.Google.Resource.DoubleClickSearch.Conversion.Get + , Network.Google.Resource.DoubleClickSearch.Conversion.Insert + , Network.Google.Resource.DoubleClickSearch.Conversion.Patch + , Network.Google.Resource.DoubleClickSearch.Conversion.Update + , Network.Google.Resource.DoubleClickSearch.Conversion.UpdateAvailability + , Network.Google.Resource.DoubleClickSearch.Reports.Generate + , Network.Google.Resource.DoubleClickSearch.Reports.Get + , Network.Google.Resource.DoubleClickSearch.Reports.GetFile + , Network.Google.Resource.DoubleClickSearch.Reports.Request + , Network.Google.Resource.DoubleClickSearch.SavedColumns.List + + other-modules: + Network.Google.DoubleClickSearch.Types.Product + , Network.Google.DoubleClickSearch.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-doubleclick-search/src/.gitkeep b/gogol-doubleclick-search/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-drive/LICENSE b/gogol-drive/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-drive/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-drive/Makefile b/gogol-drive/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-drive/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-drive/README.md b/gogol-drive/README.md new file mode 100644 index 000000000..765b4bba9 --- /dev/null +++ b/gogol-drive/README.md @@ -0,0 +1,28 @@ +# gogol-drive + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Drive API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-drive` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-drive/Setup.hs b/gogol-drive/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-drive/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-drive/gen/Network/Google/Drive.hs b/gogol-drive/gen/Network/Google/Drive.hs new file mode 100644 index 000000000..669b3d1db --- /dev/null +++ b/gogol-drive/gen/Network/Google/Drive.hs @@ -0,0 +1,645 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Drive +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The API to interact with Drive. +-- +-- /See:/ +module Network.Google.Drive + ( + -- * API + DriveAPI + , driveAPI + , driveURL + + -- * Service Methods + + -- * REST Resources + + -- ** DriveAboutGet + , module Drive.About.Get + + -- ** DriveAppsGet + , module Drive.Apps.Get + + -- ** DriveAppsList + , module Drive.Apps.List + + -- ** DriveChangesGet + , module Drive.Changes.Get + + -- ** DriveChangesList + , module Drive.Changes.List + + -- ** DriveChangesWatch + , module Drive.Changes.Watch + + -- ** DriveChannelsStop + , module Drive.Channels.Stop + + -- ** DriveChildrenDelete + , module Drive.Children.Delete + + -- ** DriveChildrenGet + , module Drive.Children.Get + + -- ** DriveChildrenInsert + , module Drive.Children.Insert + + -- ** DriveChildrenList + , module Drive.Children.List + + -- ** DriveCommentsDelete + , module Drive.Comments.Delete + + -- ** DriveCommentsGet + , module Drive.Comments.Get + + -- ** DriveCommentsInsert + , module Drive.Comments.Insert + + -- ** DriveCommentsList + , module Drive.Comments.List + + -- ** DriveCommentsPatch + , module Drive.Comments.Patch + + -- ** DriveCommentsUpdate + , module Drive.Comments.Update + + -- ** DriveFilesCopy + , module Drive.Files.Copy + + -- ** DriveFilesDelete + , module Drive.Files.Delete + + -- ** DriveFilesEmptyTrash + , module Drive.Files.EmptyTrash + + -- ** DriveFilesGenerateIds + , module Drive.Files.GenerateIds + + -- ** DriveFilesGet + , module Drive.Files.Get + + -- ** DriveFilesInsert + , module Drive.Files.Insert + + -- ** DriveFilesList + , module Drive.Files.List + + -- ** DriveFilesPatch + , module Drive.Files.Patch + + -- ** DriveFilesTouch + , module Drive.Files.Touch + + -- ** DriveFilesTrash + , module Drive.Files.Trash + + -- ** DriveFilesUntrash + , module Drive.Files.Untrash + + -- ** DriveFilesUpdate + , module Drive.Files.Update + + -- ** DriveFilesWatch + , module Drive.Files.Watch + + -- ** DriveParentsDelete + , module Drive.Parents.Delete + + -- ** DriveParentsGet + , module Drive.Parents.Get + + -- ** DriveParentsInsert + , module Drive.Parents.Insert + + -- ** DriveParentsList + , module Drive.Parents.List + + -- ** DrivePermissionsDelete + , module Drive.Permissions.Delete + + -- ** DrivePermissionsGet + , module Drive.Permissions.Get + + -- ** DrivePermissionsGetIdForEmail + , module Drive.Permissions.GetIdForEmail + + -- ** DrivePermissionsInsert + , module Drive.Permissions.Insert + + -- ** DrivePermissionsList + , module Drive.Permissions.List + + -- ** DrivePermissionsPatch + , module Drive.Permissions.Patch + + -- ** DrivePermissionsUpdate + , module Drive.Permissions.Update + + -- ** DrivePropertiesDelete + , module Drive.Properties.Delete + + -- ** DrivePropertiesGet + , module Drive.Properties.Get + + -- ** DrivePropertiesInsert + , module Drive.Properties.Insert + + -- ** DrivePropertiesList + , module Drive.Properties.List + + -- ** DrivePropertiesPatch + , module Drive.Properties.Patch + + -- ** DrivePropertiesUpdate + , module Drive.Properties.Update + + -- ** DriveRealtimeGet + , module Drive.Realtime.Get + + -- ** DriveRealtimeUpdate + , module Drive.Realtime.Update + + -- ** DriveRepliesDelete + , module Drive.Replies.Delete + + -- ** DriveRepliesGet + , module Drive.Replies.Get + + -- ** DriveRepliesInsert + , module Drive.Replies.Insert + + -- ** DriveRepliesList + , module Drive.Replies.List + + -- ** DriveRepliesPatch + , module Drive.Replies.Patch + + -- ** DriveRepliesUpdate + , module Drive.Replies.Update + + -- ** DriveRevisionsDelete + , module Drive.Revisions.Delete + + -- ** DriveRevisionsGet + , module Drive.Revisions.Get + + -- ** DriveRevisionsList + , module Drive.Revisions.List + + -- ** DriveRevisionsPatch + , module Drive.Revisions.Patch + + -- ** DriveRevisionsUpdate + , module Drive.Revisions.Update + + -- * Types + + -- ** FileList + , FileList + , fileList + , flEtag + , flNextPageToken + , flNextLink + , flKind + , flItems + , flSelfLink + + -- ** ParentReference + , ParentReference + , parentReference + , prParentLink + , prIsRoot + , prKind + , prSelfLink + , prId + + -- ** Property + , Property + , property + , pEtag + , pKind + , pValue + , pVisibility + , pSelfLink + , pKey + + -- ** PropertyList + , PropertyList + , propertyList + , plEtag + , plKind + , plItems + , plSelfLink + + -- ** ChildList + , ChildList + , childList + , clEtag + , clNextPageToken + , clNextLink + , clKind + , clItems + , clSelfLink + + -- ** CommentReplyList + , CommentReplyList + , commentReplyList + , crlNextPageToken + , crlNextLink + , crlKind + , crlItems + , crlSelfLink + + -- ** Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- ** AppList + , AppList + , appList + , alDefaultAppIds + , alEtag + , alKind + , alItems + , alSelfLink + + -- ** Change + , Change + , change + , chaKind + , chaSelfLink + , chaModificationDate + , chaId + , chaDeleted + , chaFileId + , chaFile + + -- ** ChildReference + , ChildReference + , childReference + , crChildLink + , crKind + , crSelfLink + , crId + + -- ** App + , App + , app + , appLongDescription + , appOpenUrlTemplate + , appAuthorized + , appObjectType + , appSecondaryMimeTypes + , appCreateInFolderTemplate + , appKind + , appIcons + , appProductUrl + , appUseByDefault + , appShortDescription + , appName + , appCreateUrl + , appId + , appPrimaryFileExtensions + , appInstalled + , appSupportsCreate + , appPrimaryMimeTypes + , appHasDriveWideScope + , appProductId + , appSecondaryFileExtensions + , appSupportsMultiOpen + , appSupportsImport + , appSupportsOfflineCreate + + -- ** User + , User + , user + , uIsAuthenticatedUser + , uKind + , uPicture + , uEmailAddress + , uDisplayName + , uPermissionId + + -- ** CommentReply + , CommentReply + , commentReply + , comHtmlContent + , comKind + , comContent + , comCreatedDate + , comReplyId + , comAuthor + , comModifiedDate + , comDeleted + , comVerb + + -- ** ChangeList + , ChangeList + , changeList + , cllEtag + , cllNextPageToken + , cllNextLink + , cllKind + , cllItems + , cllSelfLink + , cllLargestChangeId + + -- ** About + , About + , about + , aExportFormats + , aRemainingChangeIds + , aLanguageCode + , aEtag + , aImportFormats + , aKind + , aDomainSharingPolicy + , aQuotaBytesUsedInTrash + , aQuotaType + , aMaxUploadSizes + , aUser + , aSelfLink + , aName + , aFeatures + , aIsCurrentAppInstalled + , aQuotaBytesTotal + , aRootFolderId + , aQuotaBytesUsed + , aAdditionalRoleInfo + , aFolderColorPalette + , aPermissionId + , aQuotaBytesUsedAggregate + , aQuotaBytesByService + , aLargestChangeId + + -- ** Revision + , Revision + , revision + , rEtag + , rOriginalFilename + , rKind + , rPublishedLink + , rPinned + , rPublished + , rLastModifyingUser + , rFileSize + , rPublishAuto + , rMd5Checksum + , rMimeType + , rSelfLink + , rLastModifyingUserName + , rDownloadUrl + , rExportLinks + , rPublishedOutsideDomain + , rId + , rModifiedDate + + -- ** Permission + , Permission + , permission + , perPhotoLink + , perEtag + , perWithLink + , perKind + , perDomain + , perValue + , perAdditionalRoles + , perRole + , perSelfLink + , perName + , perAuthKey + , perEmailAddress + , perId + , perType + + -- ** Comment + , Comment + , comment + , ccStatus + , ccHtmlContent + , ccContext + , ccKind + , ccFileTitle + , ccAnchor + , ccContent + , ccReplies + , ccCreatedDate + , ccSelfLink + , ccAuthor + , ccModifiedDate + , ccDeleted + , ccFileId + , ccCommentId + + -- ** PermissionId + , PermissionId + , permissionId + , piKind + , piId + + -- ** File + , File + , file + , fOwnedByMe + , fThumbnailLink + , fFullFileExtension + , fThumbnail + , fMarkedViewedByMeDate + , fEtag + , fFileExtension + , fCanComment + , fOwners + , fOwnerNames + , fOpenWithLinks + , fWebViewLink + , fOriginalFilename + , fKind + , fLastModifyingUser + , fIconLink + , fEmbedLink + , fFileSize + , fAppDataContents + , fImageMediaMetadata + , fExplicitlyTrashed + , fEditable + , fModifiedByMeDate + , fLastViewedByMeDate + , fShared + , fMd5Checksum + , fFolderColorRgb + , fMimeType + , fCreatedDate + , fSelfLink + , fLastModifyingUserName + , fShareable + , fDownloadUrl + , fExportLinks + , fCopyable + , fParents + , fSharedWithMeDate + , fSpaces + , fVersion + , fUserPermission + , fWritersCanShare + , fDefaultOpenWithLink + , fId + , fLabels + , fModifiedDate + , fPermissions + , fQuotaBytesUsed + , fTitle + , fAlternateLink + , fVideoMediaMetadata + , fHeadRevisionId + , fDescription + , fSharingUser + , fWebContentLink + , fProperties + , fIndexableText + + -- ** ParentList + , ParentList + , parentList + , parEtag + , parKind + , parItems + , parSelfLink + + -- ** RevisionList + , RevisionList + , revisionList + , rlEtag + , rlKind + , rlItems + , rlSelfLink + + -- ** PermissionList + , PermissionList + , permissionList + , pllEtag + , pllKind + , pllItems + , pllSelfLink + + -- ** GeneratedIds + , GeneratedIds + , generatedIds + , giSpace + , giKind + , giIds + + -- ** CommentList + , CommentList + , commentList + , comoNextPageToken + , comoNextLink + , comoKind + , comoItems + , comoSelfLink + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude +import Network.Google.Resource.Drive.About.Get +import Network.Google.Resource.Drive.Apps.Get +import Network.Google.Resource.Drive.Apps.List +import Network.Google.Resource.Drive.Changes.Get +import Network.Google.Resource.Drive.Changes.List +import Network.Google.Resource.Drive.Changes.Watch +import Network.Google.Resource.Drive.Channels.Stop +import Network.Google.Resource.Drive.Children.Delete +import Network.Google.Resource.Drive.Children.Get +import Network.Google.Resource.Drive.Children.Insert +import Network.Google.Resource.Drive.Children.List +import Network.Google.Resource.Drive.Comments.Delete +import Network.Google.Resource.Drive.Comments.Get +import Network.Google.Resource.Drive.Comments.Insert +import Network.Google.Resource.Drive.Comments.List +import Network.Google.Resource.Drive.Comments.Patch +import Network.Google.Resource.Drive.Comments.Update +import Network.Google.Resource.Drive.Files.Copy +import Network.Google.Resource.Drive.Files.Delete +import Network.Google.Resource.Drive.Files.EmptyTrash +import Network.Google.Resource.Drive.Files.GenerateIds +import Network.Google.Resource.Drive.Files.Get +import Network.Google.Resource.Drive.Files.Insert +import Network.Google.Resource.Drive.Files.List +import Network.Google.Resource.Drive.Files.Patch +import Network.Google.Resource.Drive.Files.Touch +import Network.Google.Resource.Drive.Files.Trash +import Network.Google.Resource.Drive.Files.Untrash +import Network.Google.Resource.Drive.Files.Update +import Network.Google.Resource.Drive.Files.Watch +import Network.Google.Resource.Drive.Parents.Delete +import Network.Google.Resource.Drive.Parents.Get +import Network.Google.Resource.Drive.Parents.Insert +import Network.Google.Resource.Drive.Parents.List +import Network.Google.Resource.Drive.Permissions.Delete +import Network.Google.Resource.Drive.Permissions.Get +import Network.Google.Resource.Drive.Permissions.GetIdForEmail +import Network.Google.Resource.Drive.Permissions.Insert +import Network.Google.Resource.Drive.Permissions.List +import Network.Google.Resource.Drive.Permissions.Patch +import Network.Google.Resource.Drive.Permissions.Update +import Network.Google.Resource.Drive.Properties.Delete +import Network.Google.Resource.Drive.Properties.Get +import Network.Google.Resource.Drive.Properties.Insert +import Network.Google.Resource.Drive.Properties.List +import Network.Google.Resource.Drive.Properties.Patch +import Network.Google.Resource.Drive.Properties.Update +import Network.Google.Resource.Drive.Realtime.Get +import Network.Google.Resource.Drive.Realtime.Update +import Network.Google.Resource.Drive.Replies.Delete +import Network.Google.Resource.Drive.Replies.Get +import Network.Google.Resource.Drive.Replies.Insert +import Network.Google.Resource.Drive.Replies.List +import Network.Google.Resource.Drive.Replies.Patch +import Network.Google.Resource.Drive.Replies.Update +import Network.Google.Resource.Drive.Revisions.Delete +import Network.Google.Resource.Drive.Revisions.Get +import Network.Google.Resource.Drive.Revisions.List +import Network.Google.Resource.Drive.Revisions.Patch +import Network.Google.Resource.Drive.Revisions.Update + +{- $resources +TODO +-} + +type DriveAPI = + Apps :<|> Changes :<|> Channels :<|> Children :<|> + Replies + :<|> Parents + :<|> Realtime + :<|> About + :<|> Files + :<|> Permissions + :<|> Comments + :<|> Revisions + :<|> Properties + +driveAPI :: Proxy DriveAPI +driveAPI = Proxy diff --git a/gogol-drive/gen/Network/Google/Drive/Types.hs b/gogol-drive/gen/Network/Google/Drive/Types.hs new file mode 100644 index 000000000..677aa0131 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Drive/Types.hs @@ -0,0 +1,383 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Drive.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Drive.Types + ( + -- * Service URL + driveURL + + -- * FileList + , FileList + , fileList + , flEtag + , flNextPageToken + , flNextLink + , flKind + , flItems + , flSelfLink + + -- * ParentReference + , ParentReference + , parentReference + , prParentLink + , prIsRoot + , prKind + , prSelfLink + , prId + + -- * Property + , Property + , property + , pEtag + , pKind + , pValue + , pVisibility + , pSelfLink + , pKey + + -- * PropertyList + , PropertyList + , propertyList + , plEtag + , plKind + , plItems + , plSelfLink + + -- * ChildList + , ChildList + , childList + , clEtag + , clNextPageToken + , clNextLink + , clKind + , clItems + , clSelfLink + + -- * CommentReplyList + , CommentReplyList + , commentReplyList + , crlNextPageToken + , crlNextLink + , crlKind + , crlItems + , crlSelfLink + + -- * Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- * AppList + , AppList + , appList + , alDefaultAppIds + , alEtag + , alKind + , alItems + , alSelfLink + + -- * Change + , Change + , change + , chaKind + , chaSelfLink + , chaModificationDate + , chaId + , chaDeleted + , chaFileId + , chaFile + + -- * ChildReference + , ChildReference + , childReference + , crChildLink + , crKind + , crSelfLink + , crId + + -- * App + , App + , app + , appLongDescription + , appOpenUrlTemplate + , appAuthorized + , appObjectType + , appSecondaryMimeTypes + , appCreateInFolderTemplate + , appKind + , appIcons + , appProductUrl + , appUseByDefault + , appShortDescription + , appName + , appCreateUrl + , appId + , appPrimaryFileExtensions + , appInstalled + , appSupportsCreate + , appPrimaryMimeTypes + , appHasDriveWideScope + , appProductId + , appSecondaryFileExtensions + , appSupportsMultiOpen + , appSupportsImport + , appSupportsOfflineCreate + + -- * User + , User + , user + , uIsAuthenticatedUser + , uKind + , uPicture + , uEmailAddress + , uDisplayName + , uPermissionId + + -- * CommentReply + , CommentReply + , commentReply + , comHtmlContent + , comKind + , comContent + , comCreatedDate + , comReplyId + , comAuthor + , comModifiedDate + , comDeleted + , comVerb + + -- * ChangeList + , ChangeList + , changeList + , cllEtag + , cllNextPageToken + , cllNextLink + , cllKind + , cllItems + , cllSelfLink + , cllLargestChangeId + + -- * About + , About + , about + , aExportFormats + , aRemainingChangeIds + , aLanguageCode + , aEtag + , aImportFormats + , aKind + , aDomainSharingPolicy + , aQuotaBytesUsedInTrash + , aQuotaType + , aMaxUploadSizes + , aUser + , aSelfLink + , aName + , aFeatures + , aIsCurrentAppInstalled + , aQuotaBytesTotal + , aRootFolderId + , aQuotaBytesUsed + , aAdditionalRoleInfo + , aFolderColorPalette + , aPermissionId + , aQuotaBytesUsedAggregate + , aQuotaBytesByService + , aLargestChangeId + + -- * Revision + , Revision + , revision + , rEtag + , rOriginalFilename + , rKind + , rPublishedLink + , rPinned + , rPublished + , rLastModifyingUser + , rFileSize + , rPublishAuto + , rMd5Checksum + , rMimeType + , rSelfLink + , rLastModifyingUserName + , rDownloadUrl + , rExportLinks + , rPublishedOutsideDomain + , rId + , rModifiedDate + + -- * Permission + , Permission + , permission + , perPhotoLink + , perEtag + , perWithLink + , perKind + , perDomain + , perValue + , perAdditionalRoles + , perRole + , perSelfLink + , perName + , perAuthKey + , perEmailAddress + , perId + , perType + + -- * Comment + , Comment + , comment + , ccStatus + , ccHtmlContent + , ccContext + , ccKind + , ccFileTitle + , ccAnchor + , ccContent + , ccReplies + , ccCreatedDate + , ccSelfLink + , ccAuthor + , ccModifiedDate + , ccDeleted + , ccFileId + , ccCommentId + + -- * PermissionId + , PermissionId + , permissionId + , piKind + , piId + + -- * File + , File + , file + , fOwnedByMe + , fThumbnailLink + , fFullFileExtension + , fThumbnail + , fMarkedViewedByMeDate + , fEtag + , fFileExtension + , fCanComment + , fOwners + , fOwnerNames + , fOpenWithLinks + , fWebViewLink + , fOriginalFilename + , fKind + , fLastModifyingUser + , fIconLink + , fEmbedLink + , fFileSize + , fAppDataContents + , fImageMediaMetadata + , fExplicitlyTrashed + , fEditable + , fModifiedByMeDate + , fLastViewedByMeDate + , fShared + , fMd5Checksum + , fFolderColorRgb + , fMimeType + , fCreatedDate + , fSelfLink + , fLastModifyingUserName + , fShareable + , fDownloadUrl + , fExportLinks + , fCopyable + , fParents + , fSharedWithMeDate + , fSpaces + , fVersion + , fUserPermission + , fWritersCanShare + , fDefaultOpenWithLink + , fId + , fLabels + , fModifiedDate + , fPermissions + , fQuotaBytesUsed + , fTitle + , fAlternateLink + , fVideoMediaMetadata + , fHeadRevisionId + , fDescription + , fSharingUser + , fWebContentLink + , fProperties + , fIndexableText + + -- * ParentList + , ParentList + , parentList + , parEtag + , parKind + , parItems + , parSelfLink + + -- * RevisionList + , RevisionList + , revisionList + , rlEtag + , rlKind + , rlItems + , rlSelfLink + + -- * PermissionList + , PermissionList + , permissionList + , pllEtag + , pllKind + , pllItems + , pllSelfLink + + -- * GeneratedIds + , GeneratedIds + , generatedIds + , giSpace + , giKind + , giIds + + -- * CommentList + , CommentList + , commentList + , comoNextPageToken + , comoNextLink + , comoKind + , comoItems + , comoSelfLink + ) where + +import Network.Google.Drive.Types.Product +import Network.Google.Drive.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Drive API. +driveURL :: BaseURL +driveURL + = BaseUrl Https + "https://www.googleapis.com/drive/v2/" + 443 diff --git a/gogol-drive/gen/Network/Google/Drive/Types/Product.hs b/gogol-drive/gen/Network/Google/Drive/Types/Product.hs new file mode 100644 index 000000000..952388c44 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Drive/Types/Product.hs @@ -0,0 +1,3618 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Drive.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Drive.Types.Product where + +import Network.Google.Drive.Types.Sum +import Network.Google.Prelude + +-- | A list of files. +-- +-- /See:/ 'fileList' smart constructor. +data FileList = FileList + { _flEtag :: !(Maybe Text) + , _flNextPageToken :: !(Maybe Text) + , _flNextLink :: !(Maybe Text) + , _flKind :: !Text + , _flItems :: !(Maybe [Maybe File]) + , _flSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FileList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flEtag' +-- +-- * 'flNextPageToken' +-- +-- * 'flNextLink' +-- +-- * 'flKind' +-- +-- * 'flItems' +-- +-- * 'flSelfLink' +fileList + :: FileList +fileList = + FileList + { _flEtag = Nothing + , _flNextPageToken = Nothing + , _flNextLink = Nothing + , _flKind = "drive#fileList" + , _flItems = Nothing + , _flSelfLink = Nothing + } + +-- | The ETag of the list. +flEtag :: Lens' FileList (Maybe Text) +flEtag = lens _flEtag (\ s a -> s{_flEtag = a}) + +-- | The page token for the next page of files. +flNextPageToken :: Lens' FileList (Maybe Text) +flNextPageToken + = lens _flNextPageToken + (\ s a -> s{_flNextPageToken = a}) + +-- | A link to the next page of files. +flNextLink :: Lens' FileList (Maybe Text) +flNextLink + = lens _flNextLink (\ s a -> s{_flNextLink = a}) + +-- | This is always drive#fileList. +flKind :: Lens' FileList Text +flKind = lens _flKind (\ s a -> s{_flKind = a}) + +-- | The actual list of files. +flItems :: Lens' FileList [Maybe File] +flItems + = lens _flItems (\ s a -> s{_flItems = a}) . _Default + . _Coerce + +-- | A link back to this list. +flSelfLink :: Lens' FileList (Maybe Text) +flSelfLink + = lens _flSelfLink (\ s a -> s{_flSelfLink = a}) + +instance FromJSON FileList where + parseJSON + = withObject "FileList" + (\ o -> + FileList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "drive#fileList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON FileList where + toJSON FileList{..} + = object + (catMaybes + [("etag" .=) <$> _flEtag, + ("nextPageToken" .=) <$> _flNextPageToken, + ("nextLink" .=) <$> _flNextLink, + Just ("kind" .= _flKind), ("items" .=) <$> _flItems, + ("selfLink" .=) <$> _flSelfLink]) + +-- | A reference to a file\'s parent. +-- +-- /See:/ 'parentReference' smart constructor. +data ParentReference = ParentReference + { _prParentLink :: !(Maybe Text) + , _prIsRoot :: !(Maybe Bool) + , _prKind :: !Text + , _prSelfLink :: !(Maybe Text) + , _prId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prParentLink' +-- +-- * 'prIsRoot' +-- +-- * 'prKind' +-- +-- * 'prSelfLink' +-- +-- * 'prId' +parentReference + :: ParentReference +parentReference = + ParentReference + { _prParentLink = Nothing + , _prIsRoot = Nothing + , _prKind = "drive#parentReference" + , _prSelfLink = Nothing + , _prId = Nothing + } + +-- | A link to the parent. +prParentLink :: Lens' ParentReference (Maybe Text) +prParentLink + = lens _prParentLink (\ s a -> s{_prParentLink = a}) + +-- | Whether or not the parent is the root folder. +prIsRoot :: Lens' ParentReference (Maybe Bool) +prIsRoot = lens _prIsRoot (\ s a -> s{_prIsRoot = a}) + +-- | This is always drive#parentReference. +prKind :: Lens' ParentReference Text +prKind = lens _prKind (\ s a -> s{_prKind = a}) + +-- | A link back to this reference. +prSelfLink :: Lens' ParentReference (Maybe Text) +prSelfLink + = lens _prSelfLink (\ s a -> s{_prSelfLink = a}) + +-- | The ID of the parent. +prId :: Lens' ParentReference (Maybe Text) +prId = lens _prId (\ s a -> s{_prId = a}) + +instance FromJSON ParentReference where + parseJSON + = withObject "ParentReference" + (\ o -> + ParentReference <$> + (o .:? "parentLink") <*> (o .:? "isRoot") <*> + (o .:? "kind" .!= "drive#parentReference") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ParentReference where + toJSON ParentReference{..} + = object + (catMaybes + [("parentLink" .=) <$> _prParentLink, + ("isRoot" .=) <$> _prIsRoot, + Just ("kind" .= _prKind), + ("selfLink" .=) <$> _prSelfLink, + ("id" .=) <$> _prId]) + +-- | A key-value pair attached to a file that is either public or private to +-- an application. The following limits apply to file properties: - Maximum +-- of 100 properties total per file - Maximum of 30 private properties per +-- app - Maximum of 30 public properties - Maximum of 124 bytes size limit +-- on (key + value) string in UTF-8 encoding for a single property. +-- +-- /See:/ 'property' smart constructor. +data Property = Property + { _pEtag :: !(Maybe Text) + , _pKind :: !Text + , _pValue :: !(Maybe Text) + , _pVisibility :: !(Maybe Text) + , _pSelfLink :: !(Maybe Text) + , _pKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Property' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pEtag' +-- +-- * 'pKind' +-- +-- * 'pValue' +-- +-- * 'pVisibility' +-- +-- * 'pSelfLink' +-- +-- * 'pKey' +property + :: Property +property = + Property + { _pEtag = Nothing + , _pKind = "drive#property" + , _pValue = Nothing + , _pVisibility = Nothing + , _pSelfLink = Nothing + , _pKey = Nothing + } + +-- | ETag of the property. +pEtag :: Lens' Property (Maybe Text) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | This is always drive#property. +pKind :: Lens' Property Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The value of this property. +pValue :: Lens' Property (Maybe Text) +pValue = lens _pValue (\ s a -> s{_pValue = a}) + +-- | The visibility of this property. +pVisibility :: Lens' Property (Maybe Text) +pVisibility + = lens _pVisibility (\ s a -> s{_pVisibility = a}) + +-- | The link back to this property. +pSelfLink :: Lens' Property (Maybe Text) +pSelfLink + = lens _pSelfLink (\ s a -> s{_pSelfLink = a}) + +-- | The key of this property. +pKey :: Lens' Property (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +instance FromJSON Property where + parseJSON + = withObject "Property" + (\ o -> + Property <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "drive#property") + <*> (o .:? "value") + <*> (o .:? "visibility") + <*> (o .:? "selfLink") + <*> (o .:? "key")) + +instance ToJSON Property where + toJSON Property{..} + = object + (catMaybes + [("etag" .=) <$> _pEtag, Just ("kind" .= _pKind), + ("value" .=) <$> _pValue, + ("visibility" .=) <$> _pVisibility, + ("selfLink" .=) <$> _pSelfLink, + ("key" .=) <$> _pKey]) + +-- | A collection of properties, key-value pairs that are either public or +-- private to an application. +-- +-- /See:/ 'propertyList' smart constructor. +data PropertyList = PropertyList + { _plEtag :: !(Maybe Text) + , _plKind :: !Text + , _plItems :: !(Maybe [Maybe Property]) + , _plSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plEtag' +-- +-- * 'plKind' +-- +-- * 'plItems' +-- +-- * 'plSelfLink' +propertyList + :: PropertyList +propertyList = + PropertyList + { _plEtag = Nothing + , _plKind = "drive#propertyList" + , _plItems = Nothing + , _plSelfLink = Nothing + } + +-- | The ETag of the list. +plEtag :: Lens' PropertyList (Maybe Text) +plEtag = lens _plEtag (\ s a -> s{_plEtag = a}) + +-- | This is always drive#propertyList. +plKind :: Lens' PropertyList Text +plKind = lens _plKind (\ s a -> s{_plKind = a}) + +-- | The list of properties. +plItems :: Lens' PropertyList [Maybe Property] +plItems + = lens _plItems (\ s a -> s{_plItems = a}) . _Default + . _Coerce + +-- | The link back to this list. +plSelfLink :: Lens' PropertyList (Maybe Text) +plSelfLink + = lens _plSelfLink (\ s a -> s{_plSelfLink = a}) + +instance FromJSON PropertyList where + parseJSON + = withObject "PropertyList" + (\ o -> + PropertyList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "drive#propertyList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON PropertyList where + toJSON PropertyList{..} + = object + (catMaybes + [("etag" .=) <$> _plEtag, Just ("kind" .= _plKind), + ("items" .=) <$> _plItems, + ("selfLink" .=) <$> _plSelfLink]) + +-- | A list of children of a file. +-- +-- /See:/ 'childList' smart constructor. +data ChildList = ChildList + { _clEtag :: !(Maybe Text) + , _clNextPageToken :: !(Maybe Text) + , _clNextLink :: !(Maybe Text) + , _clKind :: !Text + , _clItems :: !(Maybe [Maybe ChildReference]) + , _clSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clEtag' +-- +-- * 'clNextPageToken' +-- +-- * 'clNextLink' +-- +-- * 'clKind' +-- +-- * 'clItems' +-- +-- * 'clSelfLink' +childList + :: ChildList +childList = + ChildList + { _clEtag = Nothing + , _clNextPageToken = Nothing + , _clNextLink = Nothing + , _clKind = "drive#childList" + , _clItems = Nothing + , _clSelfLink = Nothing + } + +-- | The ETag of the list. +clEtag :: Lens' ChildList (Maybe Text) +clEtag = lens _clEtag (\ s a -> s{_clEtag = a}) + +-- | The page token for the next page of children. +clNextPageToken :: Lens' ChildList (Maybe Text) +clNextPageToken + = lens _clNextPageToken + (\ s a -> s{_clNextPageToken = a}) + +-- | A link to the next page of children. +clNextLink :: Lens' ChildList (Maybe Text) +clNextLink + = lens _clNextLink (\ s a -> s{_clNextLink = a}) + +-- | This is always drive#childList. +clKind :: Lens' ChildList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | The actual list of children. +clItems :: Lens' ChildList [Maybe ChildReference] +clItems + = lens _clItems (\ s a -> s{_clItems = a}) . _Default + . _Coerce + +-- | A link back to this list. +clSelfLink :: Lens' ChildList (Maybe Text) +clSelfLink + = lens _clSelfLink (\ s a -> s{_clSelfLink = a}) + +instance FromJSON ChildList where + parseJSON + = withObject "ChildList" + (\ o -> + ChildList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "drive#childList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON ChildList where + toJSON ChildList{..} + = object + (catMaybes + [("etag" .=) <$> _clEtag, + ("nextPageToken" .=) <$> _clNextPageToken, + ("nextLink" .=) <$> _clNextLink, + Just ("kind" .= _clKind), ("items" .=) <$> _clItems, + ("selfLink" .=) <$> _clSelfLink]) + +-- | A JSON representation of a list of replies to a comment on a file in +-- Google Drive. +-- +-- /See:/ 'commentReplyList' smart constructor. +data CommentReplyList = CommentReplyList + { _crlNextPageToken :: !(Maybe Text) + , _crlNextLink :: !(Maybe Text) + , _crlKind :: !Text + , _crlItems :: !(Maybe [Maybe CommentReply]) + , _crlSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentReplyList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crlNextPageToken' +-- +-- * 'crlNextLink' +-- +-- * 'crlKind' +-- +-- * 'crlItems' +-- +-- * 'crlSelfLink' +commentReplyList + :: CommentReplyList +commentReplyList = + CommentReplyList + { _crlNextPageToken = Nothing + , _crlNextLink = Nothing + , _crlKind = "drive#commentReplyList" + , _crlItems = Nothing + , _crlSelfLink = Nothing + } + +-- | The token to use to request the next page of results. +crlNextPageToken :: Lens' CommentReplyList (Maybe Text) +crlNextPageToken + = lens _crlNextPageToken + (\ s a -> s{_crlNextPageToken = a}) + +-- | A link to the next page of replies. +crlNextLink :: Lens' CommentReplyList (Maybe Text) +crlNextLink + = lens _crlNextLink (\ s a -> s{_crlNextLink = a}) + +-- | This is always drive#commentReplyList. +crlKind :: Lens' CommentReplyList Text +crlKind = lens _crlKind (\ s a -> s{_crlKind = a}) + +-- | List of reply. +crlItems :: Lens' CommentReplyList [Maybe CommentReply] +crlItems + = lens _crlItems (\ s a -> s{_crlItems = a}) . + _Default + . _Coerce + +-- | A link back to this list. +crlSelfLink :: Lens' CommentReplyList (Maybe Text) +crlSelfLink + = lens _crlSelfLink (\ s a -> s{_crlSelfLink = a}) + +instance FromJSON CommentReplyList where + parseJSON + = withObject "CommentReplyList" + (\ o -> + CommentReplyList <$> + (o .:? "nextPageToken") <*> (o .:? "nextLink") <*> + (o .:? "kind" .!= "drive#commentReplyList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON CommentReplyList where + toJSON CommentReplyList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _crlNextPageToken, + ("nextLink" .=) <$> _crlNextLink, + Just ("kind" .= _crlKind), + ("items" .=) <$> _crlItems, + ("selfLink" .=) <$> _crlSelfLink]) + +-- | An notification channel used to watch for resource changes. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cResourceUri :: !(Maybe Text) + , _cResourceId :: !(Maybe Text) + , _cKind :: !Text + , _cExpiration :: !(Maybe Int64) + , _cToken :: !(Maybe Text) + , _cAddress :: !(Maybe Text) + , _cPayload :: !(Maybe Bool) + , _cParams :: !(Maybe ChannelParams) + , _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUri' +-- +-- * 'cResourceId' +-- +-- * 'cKind' +-- +-- * 'cExpiration' +-- +-- * 'cToken' +-- +-- * 'cAddress' +-- +-- * 'cPayload' +-- +-- * 'cParams' +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cResourceUri = Nothing + , _cResourceId = Nothing + , _cKind = "api#channel" + , _cExpiration = Nothing + , _cToken = Nothing + , _cAddress = Nothing + , _cPayload = Nothing + , _cParams = Nothing + , _cId = Nothing + , _cType = Nothing + } + +-- | A version-specific identifier for the watched resource. +cResourceUri :: Lens' Channel (Maybe Text) +cResourceUri + = lens _cResourceUri (\ s a -> s{_cResourceUri = a}) + +-- | An opaque ID that identifies the resource being watched on this channel. +-- Stable across different API versions. +cResourceId :: Lens' Channel (Maybe Text) +cResourceId + = lens _cResourceId (\ s a -> s{_cResourceId = a}) + +-- | Identifies this as a notification channel used to watch for changes to a +-- resource. Value: the fixed string \"api#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Date and time of notification channel expiration, expressed as a Unix +-- timestamp, in milliseconds. Optional. +cExpiration :: Lens' Channel (Maybe Int64) +cExpiration + = lens _cExpiration (\ s a -> s{_cExpiration = a}) + +-- | An arbitrary string delivered to the target address with each +-- notification delivered over this channel. Optional. +cToken :: Lens' Channel (Maybe Text) +cToken = lens _cToken (\ s a -> s{_cToken = a}) + +-- | The address where notifications are delivered for this channel. +cAddress :: Lens' Channel (Maybe Text) +cAddress = lens _cAddress (\ s a -> s{_cAddress = a}) + +-- | A Boolean value to indicate whether payload is wanted. Optional. +cPayload :: Lens' Channel (Maybe Bool) +cPayload = lens _cPayload (\ s a -> s{_cPayload = a}) + +-- | Additional parameters controlling delivery channel behavior. Optional. +cParams :: Lens' Channel (Maybe ChannelParams) +cParams = lens _cParams (\ s a -> s{_cParams = a}) + +-- | A UUID or similar unique string that identifies this channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of delivery mechanism used for this channel. +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "resourceUri") <*> (o .:? "resourceId") <*> + (o .:? "kind" .!= "api#channel") + <*> (o .:? "expiration") + <*> (o .:? "token") + <*> (o .:? "address") + <*> (o .:? "payload") + <*> (o .:? "params") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("resourceUri" .=) <$> _cResourceUri, + ("resourceId" .=) <$> _cResourceId, + Just ("kind" .= _cKind), + ("expiration" .=) <$> _cExpiration, + ("token" .=) <$> _cToken, + ("address" .=) <$> _cAddress, + ("payload" .=) <$> _cPayload, + ("params" .=) <$> _cParams, ("id" .=) <$> _cId, + ("type" .=) <$> _cType]) + +-- | A list of third-party applications which the user has installed or given +-- access to Google Drive. +-- +-- /See:/ 'appList' smart constructor. +data AppList = AppList + { _alDefaultAppIds :: !(Maybe [Text]) + , _alEtag :: !(Maybe Text) + , _alKind :: !Text + , _alItems :: !(Maybe [Maybe App]) + , _alSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alDefaultAppIds' +-- +-- * 'alEtag' +-- +-- * 'alKind' +-- +-- * 'alItems' +-- +-- * 'alSelfLink' +appList + :: AppList +appList = + AppList + { _alDefaultAppIds = Nothing + , _alEtag = Nothing + , _alKind = "drive#appList" + , _alItems = Nothing + , _alSelfLink = Nothing + } + +-- | List of app IDs that the user has specified to use by default. The list +-- is in reverse-priority order (lowest to highest). +alDefaultAppIds :: Lens' AppList [Text] +alDefaultAppIds + = lens _alDefaultAppIds + (\ s a -> s{_alDefaultAppIds = a}) + . _Default + . _Coerce + +-- | The ETag of the list. +alEtag :: Lens' AppList (Maybe Text) +alEtag = lens _alEtag (\ s a -> s{_alEtag = a}) + +-- | This is always drive#appList. +alKind :: Lens' AppList Text +alKind = lens _alKind (\ s a -> s{_alKind = a}) + +-- | The actual list of apps. +alItems :: Lens' AppList [Maybe App] +alItems + = lens _alItems (\ s a -> s{_alItems = a}) . _Default + . _Coerce + +-- | A link back to this list. +alSelfLink :: Lens' AppList (Maybe Text) +alSelfLink + = lens _alSelfLink (\ s a -> s{_alSelfLink = a}) + +instance FromJSON AppList where + parseJSON + = withObject "AppList" + (\ o -> + AppList <$> + (o .:? "defaultAppIds" .!= mempty) <*> (o .:? "etag") + <*> (o .:? "kind" .!= "drive#appList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON AppList where + toJSON AppList{..} + = object + (catMaybes + [("defaultAppIds" .=) <$> _alDefaultAppIds, + ("etag" .=) <$> _alEtag, Just ("kind" .= _alKind), + ("items" .=) <$> _alItems, + ("selfLink" .=) <$> _alSelfLink]) + +-- | Representation of a change to a file. +-- +-- /See:/ 'change' smart constructor. +data Change = Change + { _chaKind :: !Text + , _chaSelfLink :: !(Maybe Text) + , _chaModificationDate :: !(Maybe UTCTime) + , _chaId :: !(Maybe Int64) + , _chaDeleted :: !(Maybe Bool) + , _chaFileId :: !(Maybe Text) + , _chaFile :: !(Maybe (Maybe File)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Change' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'chaKind' +-- +-- * 'chaSelfLink' +-- +-- * 'chaModificationDate' +-- +-- * 'chaId' +-- +-- * 'chaDeleted' +-- +-- * 'chaFileId' +-- +-- * 'chaFile' +change + :: Change +change = + Change + { _chaKind = "drive#change" + , _chaSelfLink = Nothing + , _chaModificationDate = Nothing + , _chaId = Nothing + , _chaDeleted = Nothing + , _chaFileId = Nothing + , _chaFile = Nothing + } + +-- | This is always drive#change. +chaKind :: Lens' Change Text +chaKind = lens _chaKind (\ s a -> s{_chaKind = a}) + +-- | A link back to this change. +chaSelfLink :: Lens' Change (Maybe Text) +chaSelfLink + = lens _chaSelfLink (\ s a -> s{_chaSelfLink = a}) + +-- | The time of this modification. +chaModificationDate :: Lens' Change (Maybe UTCTime) +chaModificationDate + = lens _chaModificationDate + (\ s a -> s{_chaModificationDate = a}) + +-- | The ID of the change. +chaId :: Lens' Change (Maybe Int64) +chaId = lens _chaId (\ s a -> s{_chaId = a}) + +-- | Whether the file has been deleted. +chaDeleted :: Lens' Change (Maybe Bool) +chaDeleted + = lens _chaDeleted (\ s a -> s{_chaDeleted = a}) + +-- | The ID of the file associated with this change. +chaFileId :: Lens' Change (Maybe Text) +chaFileId + = lens _chaFileId (\ s a -> s{_chaFileId = a}) + +-- | The updated state of the file. Present if the file has not been deleted. +chaFile :: Lens' Change (Maybe (Maybe File)) +chaFile = lens _chaFile (\ s a -> s{_chaFile = a}) + +instance FromJSON Change where + parseJSON + = withObject "Change" + (\ o -> + Change <$> + (o .:? "kind" .!= "drive#change") <*> + (o .:? "selfLink") + <*> (o .:? "modificationDate") + <*> (o .:? "id") + <*> (o .:? "deleted") + <*> (o .:? "fileId") + <*> (o .:? "file")) + +instance ToJSON Change where + toJSON Change{..} + = object + (catMaybes + [Just ("kind" .= _chaKind), + ("selfLink" .=) <$> _chaSelfLink, + ("modificationDate" .=) <$> _chaModificationDate, + ("id" .=) <$> _chaId, ("deleted" .=) <$> _chaDeleted, + ("fileId" .=) <$> _chaFileId, + ("file" .=) <$> _chaFile]) + +-- | A reference to a folder\'s child. +-- +-- /See:/ 'childReference' smart constructor. +data ChildReference = ChildReference + { _crChildLink :: !(Maybe Text) + , _crKind :: !Text + , _crSelfLink :: !(Maybe Text) + , _crId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crChildLink' +-- +-- * 'crKind' +-- +-- * 'crSelfLink' +-- +-- * 'crId' +childReference + :: ChildReference +childReference = + ChildReference + { _crChildLink = Nothing + , _crKind = "drive#childReference" + , _crSelfLink = Nothing + , _crId = Nothing + } + +-- | A link to the child. +crChildLink :: Lens' ChildReference (Maybe Text) +crChildLink + = lens _crChildLink (\ s a -> s{_crChildLink = a}) + +-- | This is always drive#childReference. +crKind :: Lens' ChildReference Text +crKind = lens _crKind (\ s a -> s{_crKind = a}) + +-- | A link back to this reference. +crSelfLink :: Lens' ChildReference (Maybe Text) +crSelfLink + = lens _crSelfLink (\ s a -> s{_crSelfLink = a}) + +-- | The ID of the child. +crId :: Lens' ChildReference (Maybe Text) +crId = lens _crId (\ s a -> s{_crId = a}) + +instance FromJSON ChildReference where + parseJSON + = withObject "ChildReference" + (\ o -> + ChildReference <$> + (o .:? "childLink") <*> + (o .:? "kind" .!= "drive#childReference") + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON ChildReference where + toJSON ChildReference{..} + = object + (catMaybes + [("childLink" .=) <$> _crChildLink, + Just ("kind" .= _crKind), + ("selfLink" .=) <$> _crSelfLink, + ("id" .=) <$> _crId]) + +-- | The apps resource provides a list of the apps that a user has installed, +-- with information about each app\'s supported MIME types, file +-- extensions, and other details. +-- +-- /See:/ 'app' smart constructor. +data App = App + { _appLongDescription :: !(Maybe Text) + , _appOpenUrlTemplate :: !(Maybe Text) + , _appAuthorized :: !(Maybe Bool) + , _appObjectType :: !(Maybe Text) + , _appSecondaryMimeTypes :: !(Maybe [Text]) + , _appCreateInFolderTemplate :: !(Maybe Text) + , _appKind :: !Text + , _appIcons :: !(Maybe [AppIconsItem]) + , _appProductUrl :: !(Maybe Text) + , _appUseByDefault :: !(Maybe Bool) + , _appShortDescription :: !(Maybe Text) + , _appName :: !(Maybe Text) + , _appCreateUrl :: !(Maybe Text) + , _appId :: !(Maybe Text) + , _appPrimaryFileExtensions :: !(Maybe [Text]) + , _appInstalled :: !(Maybe Bool) + , _appSupportsCreate :: !(Maybe Bool) + , _appPrimaryMimeTypes :: !(Maybe [Text]) + , _appHasDriveWideScope :: !(Maybe Bool) + , _appProductId :: !(Maybe Text) + , _appSecondaryFileExtensions :: !(Maybe [Text]) + , _appSupportsMultiOpen :: !(Maybe Bool) + , _appSupportsImport :: !(Maybe Bool) + , _appSupportsOfflineCreate :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'App' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'appLongDescription' +-- +-- * 'appOpenUrlTemplate' +-- +-- * 'appAuthorized' +-- +-- * 'appObjectType' +-- +-- * 'appSecondaryMimeTypes' +-- +-- * 'appCreateInFolderTemplate' +-- +-- * 'appKind' +-- +-- * 'appIcons' +-- +-- * 'appProductUrl' +-- +-- * 'appUseByDefault' +-- +-- * 'appShortDescription' +-- +-- * 'appName' +-- +-- * 'appCreateUrl' +-- +-- * 'appId' +-- +-- * 'appPrimaryFileExtensions' +-- +-- * 'appInstalled' +-- +-- * 'appSupportsCreate' +-- +-- * 'appPrimaryMimeTypes' +-- +-- * 'appHasDriveWideScope' +-- +-- * 'appProductId' +-- +-- * 'appSecondaryFileExtensions' +-- +-- * 'appSupportsMultiOpen' +-- +-- * 'appSupportsImport' +-- +-- * 'appSupportsOfflineCreate' +app + :: App +app = + App + { _appLongDescription = Nothing + , _appOpenUrlTemplate = Nothing + , _appAuthorized = Nothing + , _appObjectType = Nothing + , _appSecondaryMimeTypes = Nothing + , _appCreateInFolderTemplate = Nothing + , _appKind = "drive#app" + , _appIcons = Nothing + , _appProductUrl = Nothing + , _appUseByDefault = Nothing + , _appShortDescription = Nothing + , _appName = Nothing + , _appCreateUrl = Nothing + , _appId = Nothing + , _appPrimaryFileExtensions = Nothing + , _appInstalled = Nothing + , _appSupportsCreate = Nothing + , _appPrimaryMimeTypes = Nothing + , _appHasDriveWideScope = Nothing + , _appProductId = Nothing + , _appSecondaryFileExtensions = Nothing + , _appSupportsMultiOpen = Nothing + , _appSupportsImport = Nothing + , _appSupportsOfflineCreate = Nothing + } + +-- | A long description of the app. +appLongDescription :: Lens' App (Maybe Text) +appLongDescription + = lens _appLongDescription + (\ s a -> s{_appLongDescription = a}) + +-- | The template url for opening files with this app. The template will +-- contain {ids} and\/or {exportIds} to be replaced by the actual file ids. +-- See Open Files for the full documentation. +appOpenUrlTemplate :: Lens' App (Maybe Text) +appOpenUrlTemplate + = lens _appOpenUrlTemplate + (\ s a -> s{_appOpenUrlTemplate = a}) + +-- | Whether the app is authorized to access data on the user\'s Drive. +appAuthorized :: Lens' App (Maybe Bool) +appAuthorized + = lens _appAuthorized + (\ s a -> s{_appAuthorized = a}) + +-- | The type of object this app creates (e.g. Chart). If empty, the app name +-- should be used instead. +appObjectType :: Lens' App (Maybe Text) +appObjectType + = lens _appObjectType + (\ s a -> s{_appObjectType = a}) + +-- | The list of secondary mime types. +appSecondaryMimeTypes :: Lens' App [Text] +appSecondaryMimeTypes + = lens _appSecondaryMimeTypes + (\ s a -> s{_appSecondaryMimeTypes = a}) + . _Default + . _Coerce + +-- | The template url to create a new file with this app in a given folder. +-- The template will contain {folderId} to be replaced by the folder to +-- create the new file in. +appCreateInFolderTemplate :: Lens' App (Maybe Text) +appCreateInFolderTemplate + = lens _appCreateInFolderTemplate + (\ s a -> s{_appCreateInFolderTemplate = a}) + +-- | This is always drive#app. +appKind :: Lens' App Text +appKind = lens _appKind (\ s a -> s{_appKind = a}) + +-- | The various icons for the app. +appIcons :: Lens' App [AppIconsItem] +appIcons + = lens _appIcons (\ s a -> s{_appIcons = a}) . + _Default + . _Coerce + +-- | A link to the product listing for this app. +appProductUrl :: Lens' App (Maybe Text) +appProductUrl + = lens _appProductUrl + (\ s a -> s{_appProductUrl = a}) + +-- | Whether the app is selected as the default handler for the types it +-- supports. +appUseByDefault :: Lens' App (Maybe Bool) +appUseByDefault + = lens _appUseByDefault + (\ s a -> s{_appUseByDefault = a}) + +-- | A short description of the app. +appShortDescription :: Lens' App (Maybe Text) +appShortDescription + = lens _appShortDescription + (\ s a -> s{_appShortDescription = a}) + +-- | The name of the app. +appName :: Lens' App (Maybe Text) +appName = lens _appName (\ s a -> s{_appName = a}) + +-- | The url to create a new file with this app. +appCreateUrl :: Lens' App (Maybe Text) +appCreateUrl + = lens _appCreateUrl (\ s a -> s{_appCreateUrl = a}) + +-- | The ID of the app. +appId :: Lens' App (Maybe Text) +appId = lens _appId (\ s a -> s{_appId = a}) + +-- | The list of primary file extensions. +appPrimaryFileExtensions :: Lens' App [Text] +appPrimaryFileExtensions + = lens _appPrimaryFileExtensions + (\ s a -> s{_appPrimaryFileExtensions = a}) + . _Default + . _Coerce + +-- | Whether the app is installed. +appInstalled :: Lens' App (Maybe Bool) +appInstalled + = lens _appInstalled (\ s a -> s{_appInstalled = a}) + +-- | Whether this app supports creating new objects. +appSupportsCreate :: Lens' App (Maybe Bool) +appSupportsCreate + = lens _appSupportsCreate + (\ s a -> s{_appSupportsCreate = a}) + +-- | The list of primary mime types. +appPrimaryMimeTypes :: Lens' App [Text] +appPrimaryMimeTypes + = lens _appPrimaryMimeTypes + (\ s a -> s{_appPrimaryMimeTypes = a}) + . _Default + . _Coerce + +-- | Whether the app has drive-wide scope. An app with drive-wide scope can +-- access all files in the user\'s drive. +appHasDriveWideScope :: Lens' App (Maybe Bool) +appHasDriveWideScope + = lens _appHasDriveWideScope + (\ s a -> s{_appHasDriveWideScope = a}) + +-- | The ID of the product listing for this app. +appProductId :: Lens' App (Maybe Text) +appProductId + = lens _appProductId (\ s a -> s{_appProductId = a}) + +-- | The list of secondary file extensions. +appSecondaryFileExtensions :: Lens' App [Text] +appSecondaryFileExtensions + = lens _appSecondaryFileExtensions + (\ s a -> s{_appSecondaryFileExtensions = a}) + . _Default + . _Coerce + +-- | Whether this app supports opening more than one file. +appSupportsMultiOpen :: Lens' App (Maybe Bool) +appSupportsMultiOpen + = lens _appSupportsMultiOpen + (\ s a -> s{_appSupportsMultiOpen = a}) + +-- | Whether this app supports importing Google Docs. +appSupportsImport :: Lens' App (Maybe Bool) +appSupportsImport + = lens _appSupportsImport + (\ s a -> s{_appSupportsImport = a}) + +-- | Whether this app supports creating new files when offline. +appSupportsOfflineCreate :: Lens' App (Maybe Bool) +appSupportsOfflineCreate + = lens _appSupportsOfflineCreate + (\ s a -> s{_appSupportsOfflineCreate = a}) + +instance FromJSON App where + parseJSON + = withObject "App" + (\ o -> + App <$> + (o .:? "longDescription") <*> + (o .:? "openUrlTemplate") + <*> (o .:? "authorized") + <*> (o .:? "objectType") + <*> (o .:? "secondaryMimeTypes" .!= mempty) + <*> (o .:? "createInFolderTemplate") + <*> (o .:? "kind" .!= "drive#app") + <*> (o .:? "icons" .!= mempty) + <*> (o .:? "productUrl") + <*> (o .:? "useByDefault") + <*> (o .:? "shortDescription") + <*> (o .:? "name") + <*> (o .:? "createUrl") + <*> (o .:? "id") + <*> (o .:? "primaryFileExtensions" .!= mempty) + <*> (o .:? "installed") + <*> (o .:? "supportsCreate") + <*> (o .:? "primaryMimeTypes" .!= mempty) + <*> (o .:? "hasDriveWideScope") + <*> (o .:? "productId") + <*> (o .:? "secondaryFileExtensions" .!= mempty) + <*> (o .:? "supportsMultiOpen") + <*> (o .:? "supportsImport") + <*> (o .:? "supportsOfflineCreate")) + +instance ToJSON App where + toJSON App{..} + = object + (catMaybes + [("longDescription" .=) <$> _appLongDescription, + ("openUrlTemplate" .=) <$> _appOpenUrlTemplate, + ("authorized" .=) <$> _appAuthorized, + ("objectType" .=) <$> _appObjectType, + ("secondaryMimeTypes" .=) <$> _appSecondaryMimeTypes, + ("createInFolderTemplate" .=) <$> + _appCreateInFolderTemplate, + Just ("kind" .= _appKind), + ("icons" .=) <$> _appIcons, + ("productUrl" .=) <$> _appProductUrl, + ("useByDefault" .=) <$> _appUseByDefault, + ("shortDescription" .=) <$> _appShortDescription, + ("name" .=) <$> _appName, + ("createUrl" .=) <$> _appCreateUrl, + ("id" .=) <$> _appId, + ("primaryFileExtensions" .=) <$> + _appPrimaryFileExtensions, + ("installed" .=) <$> _appInstalled, + ("supportsCreate" .=) <$> _appSupportsCreate, + ("primaryMimeTypes" .=) <$> _appPrimaryMimeTypes, + ("hasDriveWideScope" .=) <$> _appHasDriveWideScope, + ("productId" .=) <$> _appProductId, + ("secondaryFileExtensions" .=) <$> + _appSecondaryFileExtensions, + ("supportsMultiOpen" .=) <$> _appSupportsMultiOpen, + ("supportsImport" .=) <$> _appSupportsImport, + ("supportsOfflineCreate" .=) <$> + _appSupportsOfflineCreate]) + +-- | The JSON template for a user. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uIsAuthenticatedUser :: !(Maybe Bool) + , _uKind :: !Text + , _uPicture :: !(Maybe UserPicture) + , _uEmailAddress :: !(Maybe Text) + , _uDisplayName :: !(Maybe Text) + , _uPermissionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uIsAuthenticatedUser' +-- +-- * 'uKind' +-- +-- * 'uPicture' +-- +-- * 'uEmailAddress' +-- +-- * 'uDisplayName' +-- +-- * 'uPermissionId' +user + :: User +user = + User + { _uIsAuthenticatedUser = Nothing + , _uKind = "drive#user" + , _uPicture = Nothing + , _uEmailAddress = Nothing + , _uDisplayName = Nothing + , _uPermissionId = Nothing + } + +-- | Whether this user is the same as the authenticated user for whom the +-- request was made. +uIsAuthenticatedUser :: Lens' User (Maybe Bool) +uIsAuthenticatedUser + = lens _uIsAuthenticatedUser + (\ s a -> s{_uIsAuthenticatedUser = a}) + +-- | This is always drive#user. +uKind :: Lens' User Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | The user\'s profile picture. +uPicture :: Lens' User (Maybe UserPicture) +uPicture = lens _uPicture (\ s a -> s{_uPicture = a}) + +-- | The email address of the user. +uEmailAddress :: Lens' User (Maybe Text) +uEmailAddress + = lens _uEmailAddress + (\ s a -> s{_uEmailAddress = a}) + +-- | A plain text displayable name for this user. +uDisplayName :: Lens' User (Maybe Text) +uDisplayName + = lens _uDisplayName (\ s a -> s{_uDisplayName = a}) + +-- | The user\'s ID as visible in the permissions collection. +uPermissionId :: Lens' User (Maybe Text) +uPermissionId + = lens _uPermissionId + (\ s a -> s{_uPermissionId = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "isAuthenticatedUser") <*> + (o .:? "kind" .!= "drive#user") + <*> (o .:? "picture") + <*> (o .:? "emailAddress") + <*> (o .:? "displayName") + <*> (o .:? "permissionId")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("isAuthenticatedUser" .=) <$> + _uIsAuthenticatedUser, + Just ("kind" .= _uKind), + ("picture" .=) <$> _uPicture, + ("emailAddress" .=) <$> _uEmailAddress, + ("displayName" .=) <$> _uDisplayName, + ("permissionId" .=) <$> _uPermissionId]) + +-- | A JSON representation of a reply to a comment on a file in Google Drive. +-- +-- /See:/ 'commentReply' smart constructor. +data CommentReply = CommentReply + { _comHtmlContent :: !(Maybe Text) + , _comKind :: !Text + , _comContent :: !(Maybe Text) + , _comCreatedDate :: !(Maybe UTCTime) + , _comReplyId :: !(Maybe Text) + , _comAuthor :: !(Maybe (Maybe User)) + , _comModifiedDate :: !(Maybe UTCTime) + , _comDeleted :: !(Maybe Bool) + , _comVerb :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentReply' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comHtmlContent' +-- +-- * 'comKind' +-- +-- * 'comContent' +-- +-- * 'comCreatedDate' +-- +-- * 'comReplyId' +-- +-- * 'comAuthor' +-- +-- * 'comModifiedDate' +-- +-- * 'comDeleted' +-- +-- * 'comVerb' +commentReply + :: CommentReply +commentReply = + CommentReply + { _comHtmlContent = Nothing + , _comKind = "drive#commentReply" + , _comContent = Nothing + , _comCreatedDate = Nothing + , _comReplyId = Nothing + , _comAuthor = Nothing + , _comModifiedDate = Nothing + , _comDeleted = Nothing + , _comVerb = Nothing + } + +-- | HTML formatted content for this reply. +comHtmlContent :: Lens' CommentReply (Maybe Text) +comHtmlContent + = lens _comHtmlContent + (\ s a -> s{_comHtmlContent = a}) + +-- | This is always drive#commentReply. +comKind :: Lens' CommentReply Text +comKind = lens _comKind (\ s a -> s{_comKind = a}) + +-- | The plain text content used to create this reply. This is not HTML safe +-- and should only be used as a starting point to make edits to a reply\'s +-- content. This field is required on inserts if no verb is specified +-- (resolve\/reopen). +comContent :: Lens' CommentReply (Maybe Text) +comContent + = lens _comContent (\ s a -> s{_comContent = a}) + +-- | The date when this reply was first created. +comCreatedDate :: Lens' CommentReply (Maybe UTCTime) +comCreatedDate + = lens _comCreatedDate + (\ s a -> s{_comCreatedDate = a}) + +-- | The ID of the reply. +comReplyId :: Lens' CommentReply (Maybe Text) +comReplyId + = lens _comReplyId (\ s a -> s{_comReplyId = a}) + +-- | The user who wrote this reply. +comAuthor :: Lens' CommentReply (Maybe (Maybe User)) +comAuthor + = lens _comAuthor (\ s a -> s{_comAuthor = a}) + +-- | The date when this reply was last modified. +comModifiedDate :: Lens' CommentReply (Maybe UTCTime) +comModifiedDate + = lens _comModifiedDate + (\ s a -> s{_comModifiedDate = a}) + +-- | Whether this reply has been deleted. If a reply has been deleted the +-- content will be cleared and this will only represent a reply that once +-- existed. +comDeleted :: Lens' CommentReply (Maybe Bool) +comDeleted + = lens _comDeleted (\ s a -> s{_comDeleted = a}) + +-- | The action this reply performed to the parent comment. When creating a +-- new reply this is the action to be perform to the parent comment. +-- Possible values are: - \"resolve\" - To resolve a comment. - \"reopen\" +-- - To reopen (un-resolve) a comment. +comVerb :: Lens' CommentReply (Maybe Text) +comVerb = lens _comVerb (\ s a -> s{_comVerb = a}) + +instance FromJSON CommentReply where + parseJSON + = withObject "CommentReply" + (\ o -> + CommentReply <$> + (o .:? "htmlContent") <*> + (o .:? "kind" .!= "drive#commentReply") + <*> (o .:? "content") + <*> (o .:? "createdDate") + <*> (o .:? "replyId") + <*> (o .:? "author") + <*> (o .:? "modifiedDate") + <*> (o .:? "deleted") + <*> (o .:? "verb")) + +instance ToJSON CommentReply where + toJSON CommentReply{..} + = object + (catMaybes + [("htmlContent" .=) <$> _comHtmlContent, + Just ("kind" .= _comKind), + ("content" .=) <$> _comContent, + ("createdDate" .=) <$> _comCreatedDate, + ("replyId" .=) <$> _comReplyId, + ("author" .=) <$> _comAuthor, + ("modifiedDate" .=) <$> _comModifiedDate, + ("deleted" .=) <$> _comDeleted, + ("verb" .=) <$> _comVerb]) + +-- | A list of changes for a user. +-- +-- /See:/ 'changeList' smart constructor. +data ChangeList = ChangeList + { _cllEtag :: !(Maybe Text) + , _cllNextPageToken :: !(Maybe Text) + , _cllNextLink :: !(Maybe Text) + , _cllKind :: !Text + , _cllItems :: !(Maybe [Maybe Change]) + , _cllSelfLink :: !(Maybe Text) + , _cllLargestChangeId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangeList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllEtag' +-- +-- * 'cllNextPageToken' +-- +-- * 'cllNextLink' +-- +-- * 'cllKind' +-- +-- * 'cllItems' +-- +-- * 'cllSelfLink' +-- +-- * 'cllLargestChangeId' +changeList + :: ChangeList +changeList = + ChangeList + { _cllEtag = Nothing + , _cllNextPageToken = Nothing + , _cllNextLink = Nothing + , _cllKind = "drive#changeList" + , _cllItems = Nothing + , _cllSelfLink = Nothing + , _cllLargestChangeId = Nothing + } + +-- | The ETag of the list. +cllEtag :: Lens' ChangeList (Maybe Text) +cllEtag = lens _cllEtag (\ s a -> s{_cllEtag = a}) + +-- | The page token for the next page of changes. +cllNextPageToken :: Lens' ChangeList (Maybe Text) +cllNextPageToken + = lens _cllNextPageToken + (\ s a -> s{_cllNextPageToken = a}) + +-- | A link to the next page of changes. +cllNextLink :: Lens' ChangeList (Maybe Text) +cllNextLink + = lens _cllNextLink (\ s a -> s{_cllNextLink = a}) + +-- | This is always drive#changeList. +cllKind :: Lens' ChangeList Text +cllKind = lens _cllKind (\ s a -> s{_cllKind = a}) + +-- | The actual list of changes. +cllItems :: Lens' ChangeList [Maybe Change] +cllItems + = lens _cllItems (\ s a -> s{_cllItems = a}) . + _Default + . _Coerce + +-- | A link back to this list. +cllSelfLink :: Lens' ChangeList (Maybe Text) +cllSelfLink + = lens _cllSelfLink (\ s a -> s{_cllSelfLink = a}) + +-- | The current largest change ID. +cllLargestChangeId :: Lens' ChangeList (Maybe Int64) +cllLargestChangeId + = lens _cllLargestChangeId + (\ s a -> s{_cllLargestChangeId = a}) + +instance FromJSON ChangeList where + parseJSON + = withObject "ChangeList" + (\ o -> + ChangeList <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "drive#changeList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "largestChangeId")) + +instance ToJSON ChangeList where + toJSON ChangeList{..} + = object + (catMaybes + [("etag" .=) <$> _cllEtag, + ("nextPageToken" .=) <$> _cllNextPageToken, + ("nextLink" .=) <$> _cllNextLink, + Just ("kind" .= _cllKind), + ("items" .=) <$> _cllItems, + ("selfLink" .=) <$> _cllSelfLink, + ("largestChangeId" .=) <$> _cllLargestChangeId]) + +-- | An item with user information and settings. +-- +-- /See:/ 'about' smart constructor. +data About = About + { _aExportFormats :: !(Maybe [AboutExportFormatsItem]) + , _aRemainingChangeIds :: !(Maybe Int64) + , _aLanguageCode :: !(Maybe Text) + , _aEtag :: !(Maybe Text) + , _aImportFormats :: !(Maybe [AboutImportFormatsItem]) + , _aKind :: !Text + , _aDomainSharingPolicy :: !(Maybe Text) + , _aQuotaBytesUsedInTrash :: !(Maybe Int64) + , _aQuotaType :: !(Maybe Text) + , _aMaxUploadSizes :: !(Maybe [AboutMaxUploadSizesItem]) + , _aUser :: !(Maybe (Maybe User)) + , _aSelfLink :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aFeatures :: !(Maybe [AboutFeaturesItem]) + , _aIsCurrentAppInstalled :: !(Maybe Bool) + , _aQuotaBytesTotal :: !(Maybe Int64) + , _aRootFolderId :: !(Maybe Text) + , _aQuotaBytesUsed :: !(Maybe Int64) + , _aAdditionalRoleInfo :: !(Maybe [AboutAdditionalRoleInfoItem]) + , _aFolderColorPalette :: !(Maybe [Text]) + , _aPermissionId :: !(Maybe Text) + , _aQuotaBytesUsedAggregate :: !(Maybe Int64) + , _aQuotaBytesByService :: !(Maybe [AboutQuotaBytesByServiceItem]) + , _aLargestChangeId :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'About' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aExportFormats' +-- +-- * 'aRemainingChangeIds' +-- +-- * 'aLanguageCode' +-- +-- * 'aEtag' +-- +-- * 'aImportFormats' +-- +-- * 'aKind' +-- +-- * 'aDomainSharingPolicy' +-- +-- * 'aQuotaBytesUsedInTrash' +-- +-- * 'aQuotaType' +-- +-- * 'aMaxUploadSizes' +-- +-- * 'aUser' +-- +-- * 'aSelfLink' +-- +-- * 'aName' +-- +-- * 'aFeatures' +-- +-- * 'aIsCurrentAppInstalled' +-- +-- * 'aQuotaBytesTotal' +-- +-- * 'aRootFolderId' +-- +-- * 'aQuotaBytesUsed' +-- +-- * 'aAdditionalRoleInfo' +-- +-- * 'aFolderColorPalette' +-- +-- * 'aPermissionId' +-- +-- * 'aQuotaBytesUsedAggregate' +-- +-- * 'aQuotaBytesByService' +-- +-- * 'aLargestChangeId' +about + :: About +about = + About + { _aExportFormats = Nothing + , _aRemainingChangeIds = Nothing + , _aLanguageCode = Nothing + , _aEtag = Nothing + , _aImportFormats = Nothing + , _aKind = "drive#about" + , _aDomainSharingPolicy = Nothing + , _aQuotaBytesUsedInTrash = Nothing + , _aQuotaType = Nothing + , _aMaxUploadSizes = Nothing + , _aUser = Nothing + , _aSelfLink = Nothing + , _aName = Nothing + , _aFeatures = Nothing + , _aIsCurrentAppInstalled = Nothing + , _aQuotaBytesTotal = Nothing + , _aRootFolderId = Nothing + , _aQuotaBytesUsed = Nothing + , _aAdditionalRoleInfo = Nothing + , _aFolderColorPalette = Nothing + , _aPermissionId = Nothing + , _aQuotaBytesUsedAggregate = Nothing + , _aQuotaBytesByService = Nothing + , _aLargestChangeId = Nothing + } + +-- | The allowable export formats. +aExportFormats :: Lens' About [AboutExportFormatsItem] +aExportFormats + = lens _aExportFormats + (\ s a -> s{_aExportFormats = a}) + . _Default + . _Coerce + +-- | The number of remaining change ids. +aRemainingChangeIds :: Lens' About (Maybe Int64) +aRemainingChangeIds + = lens _aRemainingChangeIds + (\ s a -> s{_aRemainingChangeIds = a}) + +-- | The user\'s language or locale code, as defined by BCP 47, with some +-- extensions from Unicode\'s LDML format +-- (http:\/\/www.unicode.org\/reports\/tr35\/). +aLanguageCode :: Lens' About (Maybe Text) +aLanguageCode + = lens _aLanguageCode + (\ s a -> s{_aLanguageCode = a}) + +-- | The ETag of the item. +aEtag :: Lens' About (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | The allowable import formats. +aImportFormats :: Lens' About [AboutImportFormatsItem] +aImportFormats + = lens _aImportFormats + (\ s a -> s{_aImportFormats = a}) + . _Default + . _Coerce + +-- | This is always drive#about. +aKind :: Lens' About Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The domain sharing policy for the current user. Possible values are: - +-- allowed - allowedWithWarning - incomingOnly - disallowed +aDomainSharingPolicy :: Lens' About (Maybe Text) +aDomainSharingPolicy + = lens _aDomainSharingPolicy + (\ s a -> s{_aDomainSharingPolicy = a}) + +-- | The number of quota bytes used by trashed items. +aQuotaBytesUsedInTrash :: Lens' About (Maybe Int64) +aQuotaBytesUsedInTrash + = lens _aQuotaBytesUsedInTrash + (\ s a -> s{_aQuotaBytesUsedInTrash = a}) + +-- | The type of the user\'s storage quota. Possible values are: - LIMITED - +-- UNLIMITED +aQuotaType :: Lens' About (Maybe Text) +aQuotaType + = lens _aQuotaType (\ s a -> s{_aQuotaType = a}) + +-- | List of max upload sizes for each file type. The most specific type +-- takes precedence. +aMaxUploadSizes :: Lens' About [AboutMaxUploadSizesItem] +aMaxUploadSizes + = lens _aMaxUploadSizes + (\ s a -> s{_aMaxUploadSizes = a}) + . _Default + . _Coerce + +-- | The authenticated user. +aUser :: Lens' About (Maybe (Maybe User)) +aUser = lens _aUser (\ s a -> s{_aUser = a}) + +-- | A link back to this item. +aSelfLink :: Lens' About (Maybe Text) +aSelfLink + = lens _aSelfLink (\ s a -> s{_aSelfLink = a}) + +-- | The name of the current user. +aName :: Lens' About (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | List of additional features enabled on this account. +aFeatures :: Lens' About [AboutFeaturesItem] +aFeatures + = lens _aFeatures (\ s a -> s{_aFeatures = a}) . + _Default + . _Coerce + +-- | A boolean indicating whether the authenticated app is installed by the +-- authenticated user. +aIsCurrentAppInstalled :: Lens' About (Maybe Bool) +aIsCurrentAppInstalled + = lens _aIsCurrentAppInstalled + (\ s a -> s{_aIsCurrentAppInstalled = a}) + +-- | The total number of quota bytes. +aQuotaBytesTotal :: Lens' About (Maybe Int64) +aQuotaBytesTotal + = lens _aQuotaBytesTotal + (\ s a -> s{_aQuotaBytesTotal = a}) + +-- | The id of the root folder. +aRootFolderId :: Lens' About (Maybe Text) +aRootFolderId + = lens _aRootFolderId + (\ s a -> s{_aRootFolderId = a}) + +-- | The number of quota bytes used by Google Drive. +aQuotaBytesUsed :: Lens' About (Maybe Int64) +aQuotaBytesUsed + = lens _aQuotaBytesUsed + (\ s a -> s{_aQuotaBytesUsed = a}) + +-- | Information about supported additional roles per file type. The most +-- specific type takes precedence. +aAdditionalRoleInfo :: Lens' About [AboutAdditionalRoleInfoItem] +aAdditionalRoleInfo + = lens _aAdditionalRoleInfo + (\ s a -> s{_aAdditionalRoleInfo = a}) + . _Default + . _Coerce + +-- | The palette of allowable folder colors as RGB hex strings. +aFolderColorPalette :: Lens' About [Text] +aFolderColorPalette + = lens _aFolderColorPalette + (\ s a -> s{_aFolderColorPalette = a}) + . _Default + . _Coerce + +-- | The current user\'s ID as visible in the permissions collection. +aPermissionId :: Lens' About (Maybe Text) +aPermissionId + = lens _aPermissionId + (\ s a -> s{_aPermissionId = a}) + +-- | The number of quota bytes used by all Google apps (Drive, Picasa, etc.). +aQuotaBytesUsedAggregate :: Lens' About (Maybe Int64) +aQuotaBytesUsedAggregate + = lens _aQuotaBytesUsedAggregate + (\ s a -> s{_aQuotaBytesUsedAggregate = a}) + +-- | The amount of storage quota used by different Google services. +aQuotaBytesByService :: Lens' About [AboutQuotaBytesByServiceItem] +aQuotaBytesByService + = lens _aQuotaBytesByService + (\ s a -> s{_aQuotaBytesByService = a}) + . _Default + . _Coerce + +-- | The largest change id. +aLargestChangeId :: Lens' About (Maybe Int64) +aLargestChangeId + = lens _aLargestChangeId + (\ s a -> s{_aLargestChangeId = a}) + +instance FromJSON About where + parseJSON + = withObject "About" + (\ o -> + About <$> + (o .:? "exportFormats" .!= mempty) <*> + (o .:? "remainingChangeIds") + <*> (o .:? "languageCode") + <*> (o .:? "etag") + <*> (o .:? "importFormats" .!= mempty) + <*> (o .:? "kind" .!= "drive#about") + <*> (o .:? "domainSharingPolicy") + <*> (o .:? "quotaBytesUsedInTrash") + <*> (o .:? "quotaType") + <*> (o .:? "maxUploadSizes" .!= mempty) + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "features" .!= mempty) + <*> (o .:? "isCurrentAppInstalled") + <*> (o .:? "quotaBytesTotal") + <*> (o .:? "rootFolderId") + <*> (o .:? "quotaBytesUsed") + <*> (o .:? "additionalRoleInfo" .!= mempty) + <*> (o .:? "folderColorPalette" .!= mempty) + <*> (o .:? "permissionId") + <*> (o .:? "quotaBytesUsedAggregate") + <*> (o .:? "quotaBytesByService" .!= mempty) + <*> (o .:? "largestChangeId")) + +instance ToJSON About where + toJSON About{..} + = object + (catMaybes + [("exportFormats" .=) <$> _aExportFormats, + ("remainingChangeIds" .=) <$> _aRemainingChangeIds, + ("languageCode" .=) <$> _aLanguageCode, + ("etag" .=) <$> _aEtag, + ("importFormats" .=) <$> _aImportFormats, + Just ("kind" .= _aKind), + ("domainSharingPolicy" .=) <$> _aDomainSharingPolicy, + ("quotaBytesUsedInTrash" .=) <$> + _aQuotaBytesUsedInTrash, + ("quotaType" .=) <$> _aQuotaType, + ("maxUploadSizes" .=) <$> _aMaxUploadSizes, + ("user" .=) <$> _aUser, + ("selfLink" .=) <$> _aSelfLink, + ("name" .=) <$> _aName, + ("features" .=) <$> _aFeatures, + ("isCurrentAppInstalled" .=) <$> + _aIsCurrentAppInstalled, + ("quotaBytesTotal" .=) <$> _aQuotaBytesTotal, + ("rootFolderId" .=) <$> _aRootFolderId, + ("quotaBytesUsed" .=) <$> _aQuotaBytesUsed, + ("additionalRoleInfo" .=) <$> _aAdditionalRoleInfo, + ("folderColorPalette" .=) <$> _aFolderColorPalette, + ("permissionId" .=) <$> _aPermissionId, + ("quotaBytesUsedAggregate" .=) <$> + _aQuotaBytesUsedAggregate, + ("quotaBytesByService" .=) <$> _aQuotaBytesByService, + ("largestChangeId" .=) <$> _aLargestChangeId]) + +-- | A revision of a file. +-- +-- /See:/ 'revision' smart constructor. +data Revision = Revision + { _rEtag :: !(Maybe Text) + , _rOriginalFilename :: !(Maybe Text) + , _rKind :: !Text + , _rPublishedLink :: !(Maybe Text) + , _rPinned :: !(Maybe Bool) + , _rPublished :: !(Maybe Bool) + , _rLastModifyingUser :: !(Maybe (Maybe User)) + , _rFileSize :: !(Maybe Int64) + , _rPublishAuto :: !(Maybe Bool) + , _rMd5Checksum :: !(Maybe Text) + , _rMimeType :: !(Maybe Text) + , _rSelfLink :: !(Maybe Text) + , _rLastModifyingUserName :: !(Maybe Text) + , _rDownloadUrl :: !(Maybe Text) + , _rExportLinks :: !(Maybe RevisionExportLinks) + , _rPublishedOutsideDomain :: !(Maybe Bool) + , _rId :: !(Maybe Text) + , _rModifiedDate :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Revision' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rEtag' +-- +-- * 'rOriginalFilename' +-- +-- * 'rKind' +-- +-- * 'rPublishedLink' +-- +-- * 'rPinned' +-- +-- * 'rPublished' +-- +-- * 'rLastModifyingUser' +-- +-- * 'rFileSize' +-- +-- * 'rPublishAuto' +-- +-- * 'rMd5Checksum' +-- +-- * 'rMimeType' +-- +-- * 'rSelfLink' +-- +-- * 'rLastModifyingUserName' +-- +-- * 'rDownloadUrl' +-- +-- * 'rExportLinks' +-- +-- * 'rPublishedOutsideDomain' +-- +-- * 'rId' +-- +-- * 'rModifiedDate' +revision + :: Revision +revision = + Revision + { _rEtag = Nothing + , _rOriginalFilename = Nothing + , _rKind = "drive#revision" + , _rPublishedLink = Nothing + , _rPinned = Nothing + , _rPublished = Nothing + , _rLastModifyingUser = Nothing + , _rFileSize = Nothing + , _rPublishAuto = Nothing + , _rMd5Checksum = Nothing + , _rMimeType = Nothing + , _rSelfLink = Nothing + , _rLastModifyingUserName = Nothing + , _rDownloadUrl = Nothing + , _rExportLinks = Nothing + , _rPublishedOutsideDomain = Nothing + , _rId = Nothing + , _rModifiedDate = Nothing + } + +-- | The ETag of the revision. +rEtag :: Lens' Revision (Maybe Text) +rEtag = lens _rEtag (\ s a -> s{_rEtag = a}) + +-- | The original filename when this revision was created. This will only be +-- populated on files with content stored in Drive. +rOriginalFilename :: Lens' Revision (Maybe Text) +rOriginalFilename + = lens _rOriginalFilename + (\ s a -> s{_rOriginalFilename = a}) + +-- | This is always drive#revision. +rKind :: Lens' Revision Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | A link to the published revision. +rPublishedLink :: Lens' Revision (Maybe Text) +rPublishedLink + = lens _rPublishedLink + (\ s a -> s{_rPublishedLink = a}) + +-- | Whether this revision is pinned to prevent automatic purging. This will +-- only be populated and can only be modified on files with content stored +-- in Drive which are not Google Docs. Revisions can also be pinned when +-- they are created through the drive.files.insert\/update\/copy by using +-- the pinned query parameter. +rPinned :: Lens' Revision (Maybe Bool) +rPinned = lens _rPinned (\ s a -> s{_rPinned = a}) + +-- | Whether this revision is published. This is only populated and can only +-- be modified for Google Docs. +rPublished :: Lens' Revision (Maybe Bool) +rPublished + = lens _rPublished (\ s a -> s{_rPublished = a}) + +-- | The last user to modify this revision. +rLastModifyingUser :: Lens' Revision (Maybe (Maybe User)) +rLastModifyingUser + = lens _rLastModifyingUser + (\ s a -> s{_rLastModifyingUser = a}) + +-- | The size of the revision in bytes. This will only be populated on files +-- with content stored in Drive. +rFileSize :: Lens' Revision (Maybe Int64) +rFileSize + = lens _rFileSize (\ s a -> s{_rFileSize = a}) + +-- | Whether subsequent revisions will be automatically republished. This is +-- only populated and can only be modified for Google Docs. +rPublishAuto :: Lens' Revision (Maybe Bool) +rPublishAuto + = lens _rPublishAuto (\ s a -> s{_rPublishAuto = a}) + +-- | An MD5 checksum for the content of this revision. This will only be +-- populated on files with content stored in Drive. +rMd5Checksum :: Lens' Revision (Maybe Text) +rMd5Checksum + = lens _rMd5Checksum (\ s a -> s{_rMd5Checksum = a}) + +-- | The MIME type of the revision. +rMimeType :: Lens' Revision (Maybe Text) +rMimeType + = lens _rMimeType (\ s a -> s{_rMimeType = a}) + +-- | A link back to this revision. +rSelfLink :: Lens' Revision (Maybe Text) +rSelfLink + = lens _rSelfLink (\ s a -> s{_rSelfLink = a}) + +-- | Name of the last user to modify this revision. +rLastModifyingUserName :: Lens' Revision (Maybe Text) +rLastModifyingUserName + = lens _rLastModifyingUserName + (\ s a -> s{_rLastModifyingUserName = a}) + +-- | Short term download URL for the file. This will only be populated on +-- files with content stored in Drive. +rDownloadUrl :: Lens' Revision (Maybe Text) +rDownloadUrl + = lens _rDownloadUrl (\ s a -> s{_rDownloadUrl = a}) + +-- | Links for exporting Google Docs to specific formats. +rExportLinks :: Lens' Revision (Maybe RevisionExportLinks) +rExportLinks + = lens _rExportLinks (\ s a -> s{_rExportLinks = a}) + +-- | Whether this revision is published outside the domain. This is only +-- populated and can only be modified for Google Docs. +rPublishedOutsideDomain :: Lens' Revision (Maybe Bool) +rPublishedOutsideDomain + = lens _rPublishedOutsideDomain + (\ s a -> s{_rPublishedOutsideDomain = a}) + +-- | The ID of the revision. +rId :: Lens' Revision (Maybe Text) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | Last time this revision was modified (formatted RFC 3339 timestamp). +rModifiedDate :: Lens' Revision (Maybe UTCTime) +rModifiedDate + = lens _rModifiedDate + (\ s a -> s{_rModifiedDate = a}) + +instance FromJSON Revision where + parseJSON + = withObject "Revision" + (\ o -> + Revision <$> + (o .:? "etag") <*> (o .:? "originalFilename") <*> + (o .:? "kind" .!= "drive#revision") + <*> (o .:? "publishedLink") + <*> (o .:? "pinned") + <*> (o .:? "published") + <*> (o .:? "lastModifyingUser") + <*> (o .:? "fileSize") + <*> (o .:? "publishAuto") + <*> (o .:? "md5Checksum") + <*> (o .:? "mimeType") + <*> (o .:? "selfLink") + <*> (o .:? "lastModifyingUserName") + <*> (o .:? "downloadUrl") + <*> (o .:? "exportLinks") + <*> (o .:? "publishedOutsideDomain") + <*> (o .:? "id") + <*> (o .:? "modifiedDate")) + +instance ToJSON Revision where + toJSON Revision{..} + = object + (catMaybes + [("etag" .=) <$> _rEtag, + ("originalFilename" .=) <$> _rOriginalFilename, + Just ("kind" .= _rKind), + ("publishedLink" .=) <$> _rPublishedLink, + ("pinned" .=) <$> _rPinned, + ("published" .=) <$> _rPublished, + ("lastModifyingUser" .=) <$> _rLastModifyingUser, + ("fileSize" .=) <$> _rFileSize, + ("publishAuto" .=) <$> _rPublishAuto, + ("md5Checksum" .=) <$> _rMd5Checksum, + ("mimeType" .=) <$> _rMimeType, + ("selfLink" .=) <$> _rSelfLink, + ("lastModifyingUserName" .=) <$> + _rLastModifyingUserName, + ("downloadUrl" .=) <$> _rDownloadUrl, + ("exportLinks" .=) <$> _rExportLinks, + ("publishedOutsideDomain" .=) <$> + _rPublishedOutsideDomain, + ("id" .=) <$> _rId, + ("modifiedDate" .=) <$> _rModifiedDate]) + +-- | A permission for a file. +-- +-- /See:/ 'permission' smart constructor. +data Permission = Permission + { _perPhotoLink :: !(Maybe Text) + , _perEtag :: !(Maybe Text) + , _perWithLink :: !(Maybe Bool) + , _perKind :: !Text + , _perDomain :: !(Maybe Text) + , _perValue :: !(Maybe Text) + , _perAdditionalRoles :: !(Maybe [Text]) + , _perRole :: !(Maybe Text) + , _perSelfLink :: !(Maybe Text) + , _perName :: !(Maybe Text) + , _perAuthKey :: !(Maybe Text) + , _perEmailAddress :: !(Maybe Text) + , _perId :: !(Maybe Text) + , _perType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Permission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'perPhotoLink' +-- +-- * 'perEtag' +-- +-- * 'perWithLink' +-- +-- * 'perKind' +-- +-- * 'perDomain' +-- +-- * 'perValue' +-- +-- * 'perAdditionalRoles' +-- +-- * 'perRole' +-- +-- * 'perSelfLink' +-- +-- * 'perName' +-- +-- * 'perAuthKey' +-- +-- * 'perEmailAddress' +-- +-- * 'perId' +-- +-- * 'perType' +permission + :: Permission +permission = + Permission + { _perPhotoLink = Nothing + , _perEtag = Nothing + , _perWithLink = Nothing + , _perKind = "drive#permission" + , _perDomain = Nothing + , _perValue = Nothing + , _perAdditionalRoles = Nothing + , _perRole = Nothing + , _perSelfLink = Nothing + , _perName = Nothing + , _perAuthKey = Nothing + , _perEmailAddress = Nothing + , _perId = Nothing + , _perType = Nothing + } + +-- | A link to the profile photo, if available. +perPhotoLink :: Lens' Permission (Maybe Text) +perPhotoLink + = lens _perPhotoLink (\ s a -> s{_perPhotoLink = a}) + +-- | The ETag of the permission. +perEtag :: Lens' Permission (Maybe Text) +perEtag = lens _perEtag (\ s a -> s{_perEtag = a}) + +-- | Whether the link is required for this permission. +perWithLink :: Lens' Permission (Maybe Bool) +perWithLink + = lens _perWithLink (\ s a -> s{_perWithLink = a}) + +-- | This is always drive#permission. +perKind :: Lens' Permission Text +perKind = lens _perKind (\ s a -> s{_perKind = a}) + +-- | The domain name of the entity this permission refers to. This is an +-- output-only field which is present when the permission type is user, +-- group or domain. +perDomain :: Lens' Permission (Maybe Text) +perDomain + = lens _perDomain (\ s a -> s{_perDomain = a}) + +-- | The email address or domain name for the entity. This is used during +-- inserts and is not populated in responses. When making a +-- drive.permissions.insert request, exactly one of the id or value fields +-- must be specified. +perValue :: Lens' Permission (Maybe Text) +perValue = lens _perValue (\ s a -> s{_perValue = a}) + +-- | Additional roles for this user. Only commenter is currently allowed. +perAdditionalRoles :: Lens' Permission [Text] +perAdditionalRoles + = lens _perAdditionalRoles + (\ s a -> s{_perAdditionalRoles = a}) + . _Default + . _Coerce + +-- | The primary role for this user. Allowed values are: - owner - reader - +-- writer +perRole :: Lens' Permission (Maybe Text) +perRole = lens _perRole (\ s a -> s{_perRole = a}) + +-- | A link back to this permission. +perSelfLink :: Lens' Permission (Maybe Text) +perSelfLink + = lens _perSelfLink (\ s a -> s{_perSelfLink = a}) + +-- | The name for this permission. +perName :: Lens' Permission (Maybe Text) +perName = lens _perName (\ s a -> s{_perName = a}) + +-- | The authkey parameter required for this permission. +perAuthKey :: Lens' Permission (Maybe Text) +perAuthKey + = lens _perAuthKey (\ s a -> s{_perAuthKey = a}) + +-- | The email address of the user or group this permission refers to. This +-- is an output-only field which is present when the permission type is +-- user or group. +perEmailAddress :: Lens' Permission (Maybe Text) +perEmailAddress + = lens _perEmailAddress + (\ s a -> s{_perEmailAddress = a}) + +-- | The ID of the user this permission refers to, and identical to the +-- permissionId in the About and Files resources. When making a +-- drive.permissions.insert request, exactly one of the id or value fields +-- must be specified. +perId :: Lens' Permission (Maybe Text) +perId = lens _perId (\ s a -> s{_perId = a}) + +-- | The account type. Allowed values are: - user - group - domain - anyone +perType :: Lens' Permission (Maybe Text) +perType = lens _perType (\ s a -> s{_perType = a}) + +instance FromJSON Permission where + parseJSON + = withObject "Permission" + (\ o -> + Permission <$> + (o .:? "photoLink") <*> (o .:? "etag") <*> + (o .:? "withLink") + <*> (o .:? "kind" .!= "drive#permission") + <*> (o .:? "domain") + <*> (o .:? "value") + <*> (o .:? "additionalRoles" .!= mempty) + <*> (o .:? "role") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "authKey") + <*> (o .:? "emailAddress") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Permission where + toJSON Permission{..} + = object + (catMaybes + [("photoLink" .=) <$> _perPhotoLink, + ("etag" .=) <$> _perEtag, + ("withLink" .=) <$> _perWithLink, + Just ("kind" .= _perKind), + ("domain" .=) <$> _perDomain, + ("value" .=) <$> _perValue, + ("additionalRoles" .=) <$> _perAdditionalRoles, + ("role" .=) <$> _perRole, + ("selfLink" .=) <$> _perSelfLink, + ("name" .=) <$> _perName, + ("authKey" .=) <$> _perAuthKey, + ("emailAddress" .=) <$> _perEmailAddress, + ("id" .=) <$> _perId, ("type" .=) <$> _perType]) + +-- | A JSON representation of a comment on a file in Google Drive. +-- +-- /See:/ 'comment' smart constructor. +data Comment = Comment + { _ccStatus :: !(Maybe Text) + , _ccHtmlContent :: !(Maybe Text) + , _ccContext :: !(Maybe CommentContext) + , _ccKind :: !Text + , _ccFileTitle :: !(Maybe Text) + , _ccAnchor :: !(Maybe Text) + , _ccContent :: !(Maybe Text) + , _ccReplies :: !(Maybe [Maybe CommentReply]) + , _ccCreatedDate :: !(Maybe UTCTime) + , _ccSelfLink :: !(Maybe Text) + , _ccAuthor :: !(Maybe (Maybe User)) + , _ccModifiedDate :: !(Maybe UTCTime) + , _ccDeleted :: !(Maybe Bool) + , _ccFileId :: !(Maybe Text) + , _ccCommentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Comment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccStatus' +-- +-- * 'ccHtmlContent' +-- +-- * 'ccContext' +-- +-- * 'ccKind' +-- +-- * 'ccFileTitle' +-- +-- * 'ccAnchor' +-- +-- * 'ccContent' +-- +-- * 'ccReplies' +-- +-- * 'ccCreatedDate' +-- +-- * 'ccSelfLink' +-- +-- * 'ccAuthor' +-- +-- * 'ccModifiedDate' +-- +-- * 'ccDeleted' +-- +-- * 'ccFileId' +-- +-- * 'ccCommentId' +comment + :: Comment +comment = + Comment + { _ccStatus = Nothing + , _ccHtmlContent = Nothing + , _ccContext = Nothing + , _ccKind = "drive#comment" + , _ccFileTitle = Nothing + , _ccAnchor = Nothing + , _ccContent = Nothing + , _ccReplies = Nothing + , _ccCreatedDate = Nothing + , _ccSelfLink = Nothing + , _ccAuthor = Nothing + , _ccModifiedDate = Nothing + , _ccDeleted = Nothing + , _ccFileId = Nothing + , _ccCommentId = Nothing + } + +-- | The status of this comment. Status can be changed by posting a reply to +-- a comment with the desired status. - \"open\" - The comment is still +-- open. - \"resolved\" - The comment has been resolved by one of its +-- replies. +ccStatus :: Lens' Comment (Maybe Text) +ccStatus = lens _ccStatus (\ s a -> s{_ccStatus = a}) + +-- | HTML formatted content for this comment. +ccHtmlContent :: Lens' Comment (Maybe Text) +ccHtmlContent + = lens _ccHtmlContent + (\ s a -> s{_ccHtmlContent = a}) + +-- | The context of the file which is being commented on. +ccContext :: Lens' Comment (Maybe CommentContext) +ccContext + = lens _ccContext (\ s a -> s{_ccContext = a}) + +-- | This is always drive#comment. +ccKind :: Lens' Comment Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | The title of the file which this comment is addressing. +ccFileTitle :: Lens' Comment (Maybe Text) +ccFileTitle + = lens _ccFileTitle (\ s a -> s{_ccFileTitle = a}) + +-- | A region of the document represented as a JSON string. See anchor +-- documentation for details on how to define and interpret anchor +-- properties. +ccAnchor :: Lens' Comment (Maybe Text) +ccAnchor = lens _ccAnchor (\ s a -> s{_ccAnchor = a}) + +-- | The plain text content used to create this comment. This is not HTML +-- safe and should only be used as a starting point to make edits to a +-- comment\'s content. +ccContent :: Lens' Comment (Maybe Text) +ccContent + = lens _ccContent (\ s a -> s{_ccContent = a}) + +-- | Replies to this post. +ccReplies :: Lens' Comment [Maybe CommentReply] +ccReplies + = lens _ccReplies (\ s a -> s{_ccReplies = a}) . + _Default + . _Coerce + +-- | The date when this comment was first created. +ccCreatedDate :: Lens' Comment (Maybe UTCTime) +ccCreatedDate + = lens _ccCreatedDate + (\ s a -> s{_ccCreatedDate = a}) + +-- | A link back to this comment. +ccSelfLink :: Lens' Comment (Maybe Text) +ccSelfLink + = lens _ccSelfLink (\ s a -> s{_ccSelfLink = a}) + +-- | The user who wrote this comment. +ccAuthor :: Lens' Comment (Maybe (Maybe User)) +ccAuthor = lens _ccAuthor (\ s a -> s{_ccAuthor = a}) + +-- | The date when this comment or any of its replies were last modified. +ccModifiedDate :: Lens' Comment (Maybe UTCTime) +ccModifiedDate + = lens _ccModifiedDate + (\ s a -> s{_ccModifiedDate = a}) + +-- | Whether this comment has been deleted. If a comment has been deleted the +-- content will be cleared and this will only represent a comment that once +-- existed. +ccDeleted :: Lens' Comment (Maybe Bool) +ccDeleted + = lens _ccDeleted (\ s a -> s{_ccDeleted = a}) + +-- | The file which this comment is addressing. +ccFileId :: Lens' Comment (Maybe Text) +ccFileId = lens _ccFileId (\ s a -> s{_ccFileId = a}) + +-- | The ID of the comment. +ccCommentId :: Lens' Comment (Maybe Text) +ccCommentId + = lens _ccCommentId (\ s a -> s{_ccCommentId = a}) + +instance FromJSON Comment where + parseJSON + = withObject "Comment" + (\ o -> + Comment <$> + (o .:? "status") <*> (o .:? "htmlContent") <*> + (o .:? "context") + <*> (o .:? "kind" .!= "drive#comment") + <*> (o .:? "fileTitle") + <*> (o .:? "anchor") + <*> (o .:? "content") + <*> (o .:? "replies" .!= mempty) + <*> (o .:? "createdDate") + <*> (o .:? "selfLink") + <*> (o .:? "author") + <*> (o .:? "modifiedDate") + <*> (o .:? "deleted") + <*> (o .:? "fileId") + <*> (o .:? "commentId")) + +instance ToJSON Comment where + toJSON Comment{..} + = object + (catMaybes + [("status" .=) <$> _ccStatus, + ("htmlContent" .=) <$> _ccHtmlContent, + ("context" .=) <$> _ccContext, + Just ("kind" .= _ccKind), + ("fileTitle" .=) <$> _ccFileTitle, + ("anchor" .=) <$> _ccAnchor, + ("content" .=) <$> _ccContent, + ("replies" .=) <$> _ccReplies, + ("createdDate" .=) <$> _ccCreatedDate, + ("selfLink" .=) <$> _ccSelfLink, + ("author" .=) <$> _ccAuthor, + ("modifiedDate" .=) <$> _ccModifiedDate, + ("deleted" .=) <$> _ccDeleted, + ("fileId" .=) <$> _ccFileId, + ("commentId" .=) <$> _ccCommentId]) + +-- | An ID for a user or group as seen in Permission items. +-- +-- /See:/ 'permissionId' smart constructor. +data PermissionId = PermissionId + { _piKind :: !Text + , _piId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piKind' +-- +-- * 'piId' +permissionId + :: PermissionId +permissionId = + PermissionId + { _piKind = "drive#permissionId" + , _piId = Nothing + } + +-- | This is always drive#permissionId. +piKind :: Lens' PermissionId Text +piKind = lens _piKind (\ s a -> s{_piKind = a}) + +-- | The permission ID. +piId :: Lens' PermissionId (Maybe Text) +piId = lens _piId (\ s a -> s{_piId = a}) + +instance FromJSON PermissionId where + parseJSON + = withObject "PermissionId" + (\ o -> + PermissionId <$> + (o .:? "kind" .!= "drive#permissionId") <*> + (o .:? "id")) + +instance ToJSON PermissionId where + toJSON PermissionId{..} + = object + (catMaybes + [Just ("kind" .= _piKind), ("id" .=) <$> _piId]) + +-- | The metadata for a file. +-- +-- /See:/ 'file' smart constructor. +data File = File + { _fOwnedByMe :: !(Maybe Bool) + , _fThumbnailLink :: !(Maybe Text) + , _fFullFileExtension :: !(Maybe Text) + , _fThumbnail :: !(Maybe FileThumbnail) + , _fMarkedViewedByMeDate :: !(Maybe UTCTime) + , _fEtag :: !(Maybe Text) + , _fFileExtension :: !(Maybe Text) + , _fCanComment :: !(Maybe Bool) + , _fOwners :: !(Maybe [Maybe User]) + , _fOwnerNames :: !(Maybe [Text]) + , _fOpenWithLinks :: !(Maybe FileOpenWithLinks) + , _fWebViewLink :: !(Maybe Text) + , _fOriginalFilename :: !(Maybe Text) + , _fKind :: !Text + , _fLastModifyingUser :: !(Maybe (Maybe User)) + , _fIconLink :: !(Maybe Text) + , _fEmbedLink :: !(Maybe Text) + , _fFileSize :: !(Maybe Int64) + , _fAppDataContents :: !(Maybe Bool) + , _fImageMediaMetadata :: !(Maybe FileImageMediaMetadata) + , _fExplicitlyTrashed :: !(Maybe Bool) + , _fEditable :: !(Maybe Bool) + , _fModifiedByMeDate :: !(Maybe UTCTime) + , _fLastViewedByMeDate :: !(Maybe UTCTime) + , _fShared :: !(Maybe Bool) + , _fMd5Checksum :: !(Maybe Text) + , _fFolderColorRgb :: !(Maybe Text) + , _fMimeType :: !(Maybe Text) + , _fCreatedDate :: !(Maybe UTCTime) + , _fSelfLink :: !(Maybe Text) + , _fLastModifyingUserName :: !(Maybe Text) + , _fShareable :: !(Maybe Bool) + , _fDownloadUrl :: !(Maybe Text) + , _fExportLinks :: !(Maybe FileExportLinks) + , _fCopyable :: !(Maybe Bool) + , _fParents :: !(Maybe [Maybe ParentReference]) + , _fSharedWithMeDate :: !(Maybe UTCTime) + , _fSpaces :: !(Maybe [Text]) + , _fVersion :: !(Maybe Int64) + , _fUserPermission :: !(Maybe (Maybe Permission)) + , _fWritersCanShare :: !(Maybe Bool) + , _fDefaultOpenWithLink :: !(Maybe Text) + , _fId :: !(Maybe Text) + , _fLabels :: !(Maybe FileLabels) + , _fModifiedDate :: !(Maybe UTCTime) + , _fPermissions :: !(Maybe [Maybe Permission]) + , _fQuotaBytesUsed :: !(Maybe Int64) + , _fTitle :: !(Maybe Text) + , _fAlternateLink :: !(Maybe Text) + , _fVideoMediaMetadata :: !(Maybe FileVideoMediaMetadata) + , _fHeadRevisionId :: !(Maybe Text) + , _fDescription :: !(Maybe Text) + , _fSharingUser :: !(Maybe (Maybe User)) + , _fWebContentLink :: !(Maybe Text) + , _fProperties :: !(Maybe [Maybe Property]) + , _fIndexableText :: !(Maybe FileIndexableText) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'File' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fOwnedByMe' +-- +-- * 'fThumbnailLink' +-- +-- * 'fFullFileExtension' +-- +-- * 'fThumbnail' +-- +-- * 'fMarkedViewedByMeDate' +-- +-- * 'fEtag' +-- +-- * 'fFileExtension' +-- +-- * 'fCanComment' +-- +-- * 'fOwners' +-- +-- * 'fOwnerNames' +-- +-- * 'fOpenWithLinks' +-- +-- * 'fWebViewLink' +-- +-- * 'fOriginalFilename' +-- +-- * 'fKind' +-- +-- * 'fLastModifyingUser' +-- +-- * 'fIconLink' +-- +-- * 'fEmbedLink' +-- +-- * 'fFileSize' +-- +-- * 'fAppDataContents' +-- +-- * 'fImageMediaMetadata' +-- +-- * 'fExplicitlyTrashed' +-- +-- * 'fEditable' +-- +-- * 'fModifiedByMeDate' +-- +-- * 'fLastViewedByMeDate' +-- +-- * 'fShared' +-- +-- * 'fMd5Checksum' +-- +-- * 'fFolderColorRgb' +-- +-- * 'fMimeType' +-- +-- * 'fCreatedDate' +-- +-- * 'fSelfLink' +-- +-- * 'fLastModifyingUserName' +-- +-- * 'fShareable' +-- +-- * 'fDownloadUrl' +-- +-- * 'fExportLinks' +-- +-- * 'fCopyable' +-- +-- * 'fParents' +-- +-- * 'fSharedWithMeDate' +-- +-- * 'fSpaces' +-- +-- * 'fVersion' +-- +-- * 'fUserPermission' +-- +-- * 'fWritersCanShare' +-- +-- * 'fDefaultOpenWithLink' +-- +-- * 'fId' +-- +-- * 'fLabels' +-- +-- * 'fModifiedDate' +-- +-- * 'fPermissions' +-- +-- * 'fQuotaBytesUsed' +-- +-- * 'fTitle' +-- +-- * 'fAlternateLink' +-- +-- * 'fVideoMediaMetadata' +-- +-- * 'fHeadRevisionId' +-- +-- * 'fDescription' +-- +-- * 'fSharingUser' +-- +-- * 'fWebContentLink' +-- +-- * 'fProperties' +-- +-- * 'fIndexableText' +file + :: File +file = + File + { _fOwnedByMe = Nothing + , _fThumbnailLink = Nothing + , _fFullFileExtension = Nothing + , _fThumbnail = Nothing + , _fMarkedViewedByMeDate = Nothing + , _fEtag = Nothing + , _fFileExtension = Nothing + , _fCanComment = Nothing + , _fOwners = Nothing + , _fOwnerNames = Nothing + , _fOpenWithLinks = Nothing + , _fWebViewLink = Nothing + , _fOriginalFilename = Nothing + , _fKind = "drive#file" + , _fLastModifyingUser = Nothing + , _fIconLink = Nothing + , _fEmbedLink = Nothing + , _fFileSize = Nothing + , _fAppDataContents = Nothing + , _fImageMediaMetadata = Nothing + , _fExplicitlyTrashed = Nothing + , _fEditable = Nothing + , _fModifiedByMeDate = Nothing + , _fLastViewedByMeDate = Nothing + , _fShared = Nothing + , _fMd5Checksum = Nothing + , _fFolderColorRgb = Nothing + , _fMimeType = Nothing + , _fCreatedDate = Nothing + , _fSelfLink = Nothing + , _fLastModifyingUserName = Nothing + , _fShareable = Nothing + , _fDownloadUrl = Nothing + , _fExportLinks = Nothing + , _fCopyable = Nothing + , _fParents = Nothing + , _fSharedWithMeDate = Nothing + , _fSpaces = Nothing + , _fVersion = Nothing + , _fUserPermission = Nothing + , _fWritersCanShare = Nothing + , _fDefaultOpenWithLink = Nothing + , _fId = Nothing + , _fLabels = Nothing + , _fModifiedDate = Nothing + , _fPermissions = Nothing + , _fQuotaBytesUsed = Nothing + , _fTitle = Nothing + , _fAlternateLink = Nothing + , _fVideoMediaMetadata = Nothing + , _fHeadRevisionId = Nothing + , _fDescription = Nothing + , _fSharingUser = Nothing + , _fWebContentLink = Nothing + , _fProperties = Nothing + , _fIndexableText = Nothing + } + +-- | Whether the file is owned by the current user. +fOwnedByMe :: Lens' File (Maybe Bool) +fOwnedByMe + = lens _fOwnedByMe (\ s a -> s{_fOwnedByMe = a}) + +-- | A short-lived link to the file\'s thumbnail. Typically lasts on the +-- order of hours. +fThumbnailLink :: Lens' File (Maybe Text) +fThumbnailLink + = lens _fThumbnailLink + (\ s a -> s{_fThumbnailLink = a}) + +-- | The full file extension; extracted from the title. May contain multiple +-- concatenated extensions, such as \"tar.gz\". Removing an extension from +-- the title does not clear this field; however, changing the extension on +-- the title does update this field. This field is only populated for files +-- with content stored in Drive; it is not populated for Google Docs or +-- shortcut files. +fFullFileExtension :: Lens' File (Maybe Text) +fFullFileExtension + = lens _fFullFileExtension + (\ s a -> s{_fFullFileExtension = a}) + +-- | Thumbnail for the file. Only accepted on upload and for files that are +-- not already thumbnailed by Google. +fThumbnail :: Lens' File (Maybe FileThumbnail) +fThumbnail + = lens _fThumbnail (\ s a -> s{_fThumbnail = a}) + +-- | Time this file was explicitly marked viewed by the user (formatted RFC +-- 3339 timestamp). +fMarkedViewedByMeDate :: Lens' File (Maybe UTCTime) +fMarkedViewedByMeDate + = lens _fMarkedViewedByMeDate + (\ s a -> s{_fMarkedViewedByMeDate = a}) + +-- | ETag of the file. +fEtag :: Lens' File (Maybe Text) +fEtag = lens _fEtag (\ s a -> s{_fEtag = a}) + +-- | The final component of fullFileExtension with trailing text that does +-- not appear to be part of the extension removed. This field is only +-- populated for files with content stored in Drive; it is not populated +-- for Google Docs or shortcut files. +fFileExtension :: Lens' File (Maybe Text) +fFileExtension + = lens _fFileExtension + (\ s a -> s{_fFileExtension = a}) + +-- | Whether the current user can comment on the file. +fCanComment :: Lens' File (Maybe Bool) +fCanComment + = lens _fCanComment (\ s a -> s{_fCanComment = a}) + +-- | The owner(s) of this file. +fOwners :: Lens' File [Maybe User] +fOwners + = lens _fOwners (\ s a -> s{_fOwners = a}) . _Default + . _Coerce + +-- | Name(s) of the owner(s) of this file. +fOwnerNames :: Lens' File [Text] +fOwnerNames + = lens _fOwnerNames (\ s a -> s{_fOwnerNames = a}) . + _Default + . _Coerce + +-- | A map of the id of each of the user\'s apps to a link to open this file +-- with that app. Only populated when the drive.apps.readonly scope is +-- used. +fOpenWithLinks :: Lens' File (Maybe FileOpenWithLinks) +fOpenWithLinks + = lens _fOpenWithLinks + (\ s a -> s{_fOpenWithLinks = a}) + +-- | A link only available on public folders for viewing their static web +-- assets (HTML, CSS, JS, etc) via Google Drive\'s Website Hosting. +fWebViewLink :: Lens' File (Maybe Text) +fWebViewLink + = lens _fWebViewLink (\ s a -> s{_fWebViewLink = a}) + +-- | The original filename if the file was uploaded manually, or the original +-- title if the file was inserted through the API. Note that renames of the +-- title will not change the original filename. This field is only +-- populated for files with content stored in Drive; it is not populated +-- for Google Docs or shortcut files. +fOriginalFilename :: Lens' File (Maybe Text) +fOriginalFilename + = lens _fOriginalFilename + (\ s a -> s{_fOriginalFilename = a}) + +-- | The type of file. This is always drive#file. +fKind :: Lens' File Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +-- | The last user to modify this file. +fLastModifyingUser :: Lens' File (Maybe (Maybe User)) +fLastModifyingUser + = lens _fLastModifyingUser + (\ s a -> s{_fLastModifyingUser = a}) + +-- | A link to the file\'s icon. +fIconLink :: Lens' File (Maybe Text) +fIconLink + = lens _fIconLink (\ s a -> s{_fIconLink = a}) + +-- | A link for embedding the file. +fEmbedLink :: Lens' File (Maybe Text) +fEmbedLink + = lens _fEmbedLink (\ s a -> s{_fEmbedLink = a}) + +-- | The size of the file in bytes. This field is only populated for files +-- with content stored in Drive; it is not populated for Google Docs or +-- shortcut files. +fFileSize :: Lens' File (Maybe Int64) +fFileSize + = lens _fFileSize (\ s a -> s{_fFileSize = a}) + +-- | Whether this file is in the Application Data folder. +fAppDataContents :: Lens' File (Maybe Bool) +fAppDataContents + = lens _fAppDataContents + (\ s a -> s{_fAppDataContents = a}) + +-- | Metadata about image media. This will only be present for image types, +-- and its contents will depend on what can be parsed from the image +-- content. +fImageMediaMetadata :: Lens' File (Maybe FileImageMediaMetadata) +fImageMediaMetadata + = lens _fImageMediaMetadata + (\ s a -> s{_fImageMediaMetadata = a}) + +-- | Whether this file has been explicitly trashed, as opposed to recursively +-- trashed. +fExplicitlyTrashed :: Lens' File (Maybe Bool) +fExplicitlyTrashed + = lens _fExplicitlyTrashed + (\ s a -> s{_fExplicitlyTrashed = a}) + +-- | Whether the file can be edited by the current user. +fEditable :: Lens' File (Maybe Bool) +fEditable + = lens _fEditable (\ s a -> s{_fEditable = a}) + +-- | Last time this file was modified by the user (formatted RFC 3339 +-- timestamp). Note that setting modifiedDate will also update the +-- modifiedByMe date for the user which set the date. +fModifiedByMeDate :: Lens' File (Maybe UTCTime) +fModifiedByMeDate + = lens _fModifiedByMeDate + (\ s a -> s{_fModifiedByMeDate = a}) + +-- | Last time this file was viewed by the user (formatted RFC 3339 +-- timestamp). +fLastViewedByMeDate :: Lens' File (Maybe UTCTime) +fLastViewedByMeDate + = lens _fLastViewedByMeDate + (\ s a -> s{_fLastViewedByMeDate = a}) + +-- | Whether the file has been shared. +fShared :: Lens' File (Maybe Bool) +fShared = lens _fShared (\ s a -> s{_fShared = a}) + +-- | An MD5 checksum for the content of this file. This field is only +-- populated for files with content stored in Drive; it is not populated +-- for Google Docs or shortcut files. +fMd5Checksum :: Lens' File (Maybe Text) +fMd5Checksum + = lens _fMd5Checksum (\ s a -> s{_fMd5Checksum = a}) + +-- | Folder color as an RGB hex string if the file is a folder. The list of +-- supported colors is available in the folderColorPalette field of the +-- About resource. If an unsupported color is specified, it will be changed +-- to the closest color in the palette. +fFolderColorRgb :: Lens' File (Maybe Text) +fFolderColorRgb + = lens _fFolderColorRgb + (\ s a -> s{_fFolderColorRgb = a}) + +-- | The MIME type of the file. This is only mutable on update when uploading +-- new content. This field can be left blank, and the mimetype will be +-- determined from the uploaded content\'s MIME type. +fMimeType :: Lens' File (Maybe Text) +fMimeType + = lens _fMimeType (\ s a -> s{_fMimeType = a}) + +-- | Create time for this file (formatted RFC 3339 timestamp). +fCreatedDate :: Lens' File (Maybe UTCTime) +fCreatedDate + = lens _fCreatedDate (\ s a -> s{_fCreatedDate = a}) + +-- | A link back to this file. +fSelfLink :: Lens' File (Maybe Text) +fSelfLink + = lens _fSelfLink (\ s a -> s{_fSelfLink = a}) + +-- | Name of the last user to modify this file. +fLastModifyingUserName :: Lens' File (Maybe Text) +fLastModifyingUserName + = lens _fLastModifyingUserName + (\ s a -> s{_fLastModifyingUserName = a}) + +-- | Whether the file\'s sharing settings can be modified by the current +-- user. +fShareable :: Lens' File (Maybe Bool) +fShareable + = lens _fShareable (\ s a -> s{_fShareable = a}) + +fDownloadUrl :: Lens' File (Maybe Text) +fDownloadUrl + = lens _fDownloadUrl (\ s a -> s{_fDownloadUrl = a}) + +-- | Links for exporting Google Docs to specific formats. +fExportLinks :: Lens' File (Maybe FileExportLinks) +fExportLinks + = lens _fExportLinks (\ s a -> s{_fExportLinks = a}) + +-- | Whether the file can be copied by the current user. +fCopyable :: Lens' File (Maybe Bool) +fCopyable + = lens _fCopyable (\ s a -> s{_fCopyable = a}) + +-- | Collection of parent folders which contain this file. Setting this field +-- will put the file in all of the provided folders. On insert, if no +-- folders are provided, the file will be placed in the default root +-- folder. +fParents :: Lens' File [Maybe ParentReference] +fParents + = lens _fParents (\ s a -> s{_fParents = a}) . + _Default + . _Coerce + +-- | Time at which this file was shared with the user (formatted RFC 3339 +-- timestamp). +fSharedWithMeDate :: Lens' File (Maybe UTCTime) +fSharedWithMeDate + = lens _fSharedWithMeDate + (\ s a -> s{_fSharedWithMeDate = a}) + +-- | The list of spaces which contain the file. Supported values are +-- \'drive\', \'appDataFolder\' and \'photos\'. +fSpaces :: Lens' File [Text] +fSpaces + = lens _fSpaces (\ s a -> s{_fSpaces = a}) . _Default + . _Coerce + +-- | A monotonically increasing version number for the file. This reflects +-- every change made to the file on the server, even those not visible to +-- the requesting user. +fVersion :: Lens' File (Maybe Int64) +fVersion = lens _fVersion (\ s a -> s{_fVersion = a}) + +-- | The permissions for the authenticated user on this file. +fUserPermission :: Lens' File (Maybe (Maybe Permission)) +fUserPermission + = lens _fUserPermission + (\ s a -> s{_fUserPermission = a}) + +-- | Whether writers can share the document with other users. +fWritersCanShare :: Lens' File (Maybe Bool) +fWritersCanShare + = lens _fWritersCanShare + (\ s a -> s{_fWritersCanShare = a}) + +-- | A link to open this file with the user\'s default app for this file. +-- Only populated when the drive.apps.readonly scope is used. +fDefaultOpenWithLink :: Lens' File (Maybe Text) +fDefaultOpenWithLink + = lens _fDefaultOpenWithLink + (\ s a -> s{_fDefaultOpenWithLink = a}) + +-- | The ID of the file. +fId :: Lens' File (Maybe Text) +fId = lens _fId (\ s a -> s{_fId = a}) + +-- | A group of labels for the file. +fLabels :: Lens' File (Maybe FileLabels) +fLabels = lens _fLabels (\ s a -> s{_fLabels = a}) + +-- | Last time this file was modified by anyone (formatted RFC 3339 +-- timestamp). This is only mutable on update when the setModifiedDate +-- parameter is set. +fModifiedDate :: Lens' File (Maybe UTCTime) +fModifiedDate + = lens _fModifiedDate + (\ s a -> s{_fModifiedDate = a}) + +-- | The list of permissions for users with access to this file. +fPermissions :: Lens' File [Maybe Permission] +fPermissions + = lens _fPermissions (\ s a -> s{_fPermissions = a}) + . _Default + . _Coerce + +-- | The number of quota bytes used by this file. +fQuotaBytesUsed :: Lens' File (Maybe Int64) +fQuotaBytesUsed + = lens _fQuotaBytesUsed + (\ s a -> s{_fQuotaBytesUsed = a}) + +-- | The title of this file. +fTitle :: Lens' File (Maybe Text) +fTitle = lens _fTitle (\ s a -> s{_fTitle = a}) + +-- | A link for opening the file in a relevant Google editor or viewer. +fAlternateLink :: Lens' File (Maybe Text) +fAlternateLink + = lens _fAlternateLink + (\ s a -> s{_fAlternateLink = a}) + +-- | Metadata about video media. This will only be present for video types. +fVideoMediaMetadata :: Lens' File (Maybe FileVideoMediaMetadata) +fVideoMediaMetadata + = lens _fVideoMediaMetadata + (\ s a -> s{_fVideoMediaMetadata = a}) + +-- | The ID of the file\'s head revision. This field is only populated for +-- files with content stored in Drive; it is not populated for Google Docs +-- or shortcut files. +fHeadRevisionId :: Lens' File (Maybe Text) +fHeadRevisionId + = lens _fHeadRevisionId + (\ s a -> s{_fHeadRevisionId = a}) + +-- | A short description of the file. +fDescription :: Lens' File (Maybe Text) +fDescription + = lens _fDescription (\ s a -> s{_fDescription = a}) + +-- | User that shared the item with the current user, if available. +fSharingUser :: Lens' File (Maybe (Maybe User)) +fSharingUser + = lens _fSharingUser (\ s a -> s{_fSharingUser = a}) + +-- | A link for downloading the content of the file in a browser using cookie +-- based authentication. In cases where the content is shared publicly, the +-- content can be downloaded without any credentials. +fWebContentLink :: Lens' File (Maybe Text) +fWebContentLink + = lens _fWebContentLink + (\ s a -> s{_fWebContentLink = a}) + +-- | The list of properties. +fProperties :: Lens' File [Maybe Property] +fProperties + = lens _fProperties (\ s a -> s{_fProperties = a}) . + _Default + . _Coerce + +-- | Indexable text attributes for the file (can only be written) +fIndexableText :: Lens' File (Maybe FileIndexableText) +fIndexableText + = lens _fIndexableText + (\ s a -> s{_fIndexableText = a}) + +instance FromJSON File where + parseJSON + = withObject "File" + (\ o -> + File <$> + (o .:? "ownedByMe") <*> (o .:? "thumbnailLink") <*> + (o .:? "fullFileExtension") + <*> (o .:? "thumbnail") + <*> (o .:? "markedViewedByMeDate") + <*> (o .:? "etag") + <*> (o .:? "fileExtension") + <*> (o .:? "canComment") + <*> (o .:? "owners" .!= mempty) + <*> (o .:? "ownerNames" .!= mempty) + <*> (o .:? "openWithLinks") + <*> (o .:? "webViewLink") + <*> (o .:? "originalFilename") + <*> (o .:? "kind" .!= "drive#file") + <*> (o .:? "lastModifyingUser") + <*> (o .:? "iconLink") + <*> (o .:? "embedLink") + <*> (o .:? "fileSize") + <*> (o .:? "appDataContents") + <*> (o .:? "imageMediaMetadata") + <*> (o .:? "explicitlyTrashed") + <*> (o .:? "editable") + <*> (o .:? "modifiedByMeDate") + <*> (o .:? "lastViewedByMeDate") + <*> (o .:? "shared") + <*> (o .:? "md5Checksum") + <*> (o .:? "folderColorRgb") + <*> (o .:? "mimeType") + <*> (o .:? "createdDate") + <*> (o .:? "selfLink") + <*> (o .:? "lastModifyingUserName") + <*> (o .:? "shareable") + <*> (o .:? "downloadUrl") + <*> (o .:? "exportLinks") + <*> (o .:? "copyable") + <*> (o .:? "parents" .!= mempty) + <*> (o .:? "sharedWithMeDate") + <*> (o .:? "spaces" .!= mempty) + <*> (o .:? "version") + <*> (o .:? "userPermission") + <*> (o .:? "writersCanShare") + <*> (o .:? "defaultOpenWithLink") + <*> (o .:? "id") + <*> (o .:? "labels") + <*> (o .:? "modifiedDate") + <*> (o .:? "permissions" .!= mempty) + <*> (o .:? "quotaBytesUsed") + <*> (o .:? "title") + <*> (o .:? "alternateLink") + <*> (o .:? "videoMediaMetadata") + <*> (o .:? "headRevisionId") + <*> (o .:? "description") + <*> (o .:? "sharingUser") + <*> (o .:? "webContentLink") + <*> (o .:? "properties" .!= mempty) + <*> (o .:? "indexableText")) + +instance ToJSON File where + toJSON File{..} + = object + (catMaybes + [("ownedByMe" .=) <$> _fOwnedByMe, + ("thumbnailLink" .=) <$> _fThumbnailLink, + ("fullFileExtension" .=) <$> _fFullFileExtension, + ("thumbnail" .=) <$> _fThumbnail, + ("markedViewedByMeDate" .=) <$> + _fMarkedViewedByMeDate, + ("etag" .=) <$> _fEtag, + ("fileExtension" .=) <$> _fFileExtension, + ("canComment" .=) <$> _fCanComment, + ("owners" .=) <$> _fOwners, + ("ownerNames" .=) <$> _fOwnerNames, + ("openWithLinks" .=) <$> _fOpenWithLinks, + ("webViewLink" .=) <$> _fWebViewLink, + ("originalFilename" .=) <$> _fOriginalFilename, + Just ("kind" .= _fKind), + ("lastModifyingUser" .=) <$> _fLastModifyingUser, + ("iconLink" .=) <$> _fIconLink, + ("embedLink" .=) <$> _fEmbedLink, + ("fileSize" .=) <$> _fFileSize, + ("appDataContents" .=) <$> _fAppDataContents, + ("imageMediaMetadata" .=) <$> _fImageMediaMetadata, + ("explicitlyTrashed" .=) <$> _fExplicitlyTrashed, + ("editable" .=) <$> _fEditable, + ("modifiedByMeDate" .=) <$> _fModifiedByMeDate, + ("lastViewedByMeDate" .=) <$> _fLastViewedByMeDate, + ("shared" .=) <$> _fShared, + ("md5Checksum" .=) <$> _fMd5Checksum, + ("folderColorRgb" .=) <$> _fFolderColorRgb, + ("mimeType" .=) <$> _fMimeType, + ("createdDate" .=) <$> _fCreatedDate, + ("selfLink" .=) <$> _fSelfLink, + ("lastModifyingUserName" .=) <$> + _fLastModifyingUserName, + ("shareable" .=) <$> _fShareable, + ("downloadUrl" .=) <$> _fDownloadUrl, + ("exportLinks" .=) <$> _fExportLinks, + ("copyable" .=) <$> _fCopyable, + ("parents" .=) <$> _fParents, + ("sharedWithMeDate" .=) <$> _fSharedWithMeDate, + ("spaces" .=) <$> _fSpaces, + ("version" .=) <$> _fVersion, + ("userPermission" .=) <$> _fUserPermission, + ("writersCanShare" .=) <$> _fWritersCanShare, + ("defaultOpenWithLink" .=) <$> _fDefaultOpenWithLink, + ("id" .=) <$> _fId, ("labels" .=) <$> _fLabels, + ("modifiedDate" .=) <$> _fModifiedDate, + ("permissions" .=) <$> _fPermissions, + ("quotaBytesUsed" .=) <$> _fQuotaBytesUsed, + ("title" .=) <$> _fTitle, + ("alternateLink" .=) <$> _fAlternateLink, + ("videoMediaMetadata" .=) <$> _fVideoMediaMetadata, + ("headRevisionId" .=) <$> _fHeadRevisionId, + ("description" .=) <$> _fDescription, + ("sharingUser" .=) <$> _fSharingUser, + ("webContentLink" .=) <$> _fWebContentLink, + ("properties" .=) <$> _fProperties, + ("indexableText" .=) <$> _fIndexableText]) + +-- | A list of a file\'s parents. +-- +-- /See:/ 'parentList' smart constructor. +data ParentList = ParentList + { _parEtag :: !(Maybe Text) + , _parKind :: !Text + , _parItems :: !(Maybe [Maybe ParentReference]) + , _parSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'parEtag' +-- +-- * 'parKind' +-- +-- * 'parItems' +-- +-- * 'parSelfLink' +parentList + :: ParentList +parentList = + ParentList + { _parEtag = Nothing + , _parKind = "drive#parentList" + , _parItems = Nothing + , _parSelfLink = Nothing + } + +-- | The ETag of the list. +parEtag :: Lens' ParentList (Maybe Text) +parEtag = lens _parEtag (\ s a -> s{_parEtag = a}) + +-- | This is always drive#parentList. +parKind :: Lens' ParentList Text +parKind = lens _parKind (\ s a -> s{_parKind = a}) + +-- | The actual list of parents. +parItems :: Lens' ParentList [Maybe ParentReference] +parItems + = lens _parItems (\ s a -> s{_parItems = a}) . + _Default + . _Coerce + +-- | A link back to this list. +parSelfLink :: Lens' ParentList (Maybe Text) +parSelfLink + = lens _parSelfLink (\ s a -> s{_parSelfLink = a}) + +instance FromJSON ParentList where + parseJSON + = withObject "ParentList" + (\ o -> + ParentList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "drive#parentList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON ParentList where + toJSON ParentList{..} + = object + (catMaybes + [("etag" .=) <$> _parEtag, Just ("kind" .= _parKind), + ("items" .=) <$> _parItems, + ("selfLink" .=) <$> _parSelfLink]) + +-- | A list of revisions of a file. +-- +-- /See:/ 'revisionList' smart constructor. +data RevisionList = RevisionList + { _rlEtag :: !(Maybe Text) + , _rlKind :: !Text + , _rlItems :: !(Maybe [Maybe Revision]) + , _rlSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlEtag' +-- +-- * 'rlKind' +-- +-- * 'rlItems' +-- +-- * 'rlSelfLink' +revisionList + :: RevisionList +revisionList = + RevisionList + { _rlEtag = Nothing + , _rlKind = "drive#revisionList" + , _rlItems = Nothing + , _rlSelfLink = Nothing + } + +-- | The ETag of the list. +rlEtag :: Lens' RevisionList (Maybe Text) +rlEtag = lens _rlEtag (\ s a -> s{_rlEtag = a}) + +-- | This is always drive#revisionList. +rlKind :: Lens' RevisionList Text +rlKind = lens _rlKind (\ s a -> s{_rlKind = a}) + +-- | The actual list of revisions. +rlItems :: Lens' RevisionList [Maybe Revision] +rlItems + = lens _rlItems (\ s a -> s{_rlItems = a}) . _Default + . _Coerce + +-- | A link back to this list. +rlSelfLink :: Lens' RevisionList (Maybe Text) +rlSelfLink + = lens _rlSelfLink (\ s a -> s{_rlSelfLink = a}) + +instance FromJSON RevisionList where + parseJSON + = withObject "RevisionList" + (\ o -> + RevisionList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "drive#revisionList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON RevisionList where + toJSON RevisionList{..} + = object + (catMaybes + [("etag" .=) <$> _rlEtag, Just ("kind" .= _rlKind), + ("items" .=) <$> _rlItems, + ("selfLink" .=) <$> _rlSelfLink]) + +-- | A list of permissions associated with a file. +-- +-- /See:/ 'permissionList' smart constructor. +data PermissionList = PermissionList + { _pllEtag :: !(Maybe Text) + , _pllKind :: !Text + , _pllItems :: !(Maybe [Maybe Permission]) + , _pllSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllEtag' +-- +-- * 'pllKind' +-- +-- * 'pllItems' +-- +-- * 'pllSelfLink' +permissionList + :: PermissionList +permissionList = + PermissionList + { _pllEtag = Nothing + , _pllKind = "drive#permissionList" + , _pllItems = Nothing + , _pllSelfLink = Nothing + } + +-- | The ETag of the list. +pllEtag :: Lens' PermissionList (Maybe Text) +pllEtag = lens _pllEtag (\ s a -> s{_pllEtag = a}) + +-- | This is always drive#permissionList. +pllKind :: Lens' PermissionList Text +pllKind = lens _pllKind (\ s a -> s{_pllKind = a}) + +-- | The actual list of permissions. +pllItems :: Lens' PermissionList [Maybe Permission] +pllItems + = lens _pllItems (\ s a -> s{_pllItems = a}) . + _Default + . _Coerce + +-- | A link back to this list. +pllSelfLink :: Lens' PermissionList (Maybe Text) +pllSelfLink + = lens _pllSelfLink (\ s a -> s{_pllSelfLink = a}) + +instance FromJSON PermissionList where + parseJSON + = withObject "PermissionList" + (\ o -> + PermissionList <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "drive#permissionList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON PermissionList where + toJSON PermissionList{..} + = object + (catMaybes + [("etag" .=) <$> _pllEtag, Just ("kind" .= _pllKind), + ("items" .=) <$> _pllItems, + ("selfLink" .=) <$> _pllSelfLink]) + +-- | A list of generated IDs which can be provided in insert requests +-- +-- /See:/ 'generatedIds' smart constructor. +data GeneratedIds = GeneratedIds + { _giSpace :: !(Maybe Text) + , _giKind :: !Text + , _giIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeneratedIds' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giSpace' +-- +-- * 'giKind' +-- +-- * 'giIds' +generatedIds + :: GeneratedIds +generatedIds = + GeneratedIds + { _giSpace = Nothing + , _giKind = "drive#generatedIds" + , _giIds = Nothing + } + +-- | The type of file that can be created with these IDs. +giSpace :: Lens' GeneratedIds (Maybe Text) +giSpace = lens _giSpace (\ s a -> s{_giSpace = a}) + +-- | This is always drive#generatedIds +giKind :: Lens' GeneratedIds Text +giKind = lens _giKind (\ s a -> s{_giKind = a}) + +-- | The IDs generated for the requesting user in the specified space. +giIds :: Lens' GeneratedIds [Text] +giIds + = lens _giIds (\ s a -> s{_giIds = a}) . _Default . + _Coerce + +instance FromJSON GeneratedIds where + parseJSON + = withObject "GeneratedIds" + (\ o -> + GeneratedIds <$> + (o .:? "space") <*> + (o .:? "kind" .!= "drive#generatedIds") + <*> (o .:? "ids" .!= mempty)) + +instance ToJSON GeneratedIds where + toJSON GeneratedIds{..} + = object + (catMaybes + [("space" .=) <$> _giSpace, Just ("kind" .= _giKind), + ("ids" .=) <$> _giIds]) + +-- | A JSON representation of a list of comments on a file in Google Drive. +-- +-- /See:/ 'commentList' smart constructor. +data CommentList = CommentList + { _comoNextPageToken :: !(Maybe Text) + , _comoNextLink :: !(Maybe Text) + , _comoKind :: !Text + , _comoItems :: !(Maybe [Maybe Comment]) + , _comoSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comoNextPageToken' +-- +-- * 'comoNextLink' +-- +-- * 'comoKind' +-- +-- * 'comoItems' +-- +-- * 'comoSelfLink' +commentList + :: CommentList +commentList = + CommentList + { _comoNextPageToken = Nothing + , _comoNextLink = Nothing + , _comoKind = "drive#commentList" + , _comoItems = Nothing + , _comoSelfLink = Nothing + } + +-- | The token to use to request the next page of results. +comoNextPageToken :: Lens' CommentList (Maybe Text) +comoNextPageToken + = lens _comoNextPageToken + (\ s a -> s{_comoNextPageToken = a}) + +-- | A link to the next page of comments. +comoNextLink :: Lens' CommentList (Maybe Text) +comoNextLink + = lens _comoNextLink (\ s a -> s{_comoNextLink = a}) + +-- | This is always drive#commentList. +comoKind :: Lens' CommentList Text +comoKind = lens _comoKind (\ s a -> s{_comoKind = a}) + +-- | List of comments. +comoItems :: Lens' CommentList [Maybe Comment] +comoItems + = lens _comoItems (\ s a -> s{_comoItems = a}) . + _Default + . _Coerce + +-- | A link back to this list. +comoSelfLink :: Lens' CommentList (Maybe Text) +comoSelfLink + = lens _comoSelfLink (\ s a -> s{_comoSelfLink = a}) + +instance FromJSON CommentList where + parseJSON + = withObject "CommentList" + (\ o -> + CommentList <$> + (o .:? "nextPageToken") <*> (o .:? "nextLink") <*> + (o .:? "kind" .!= "drive#commentList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON CommentList where + toJSON CommentList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _comoNextPageToken, + ("nextLink" .=) <$> _comoNextLink, + Just ("kind" .= _comoKind), + ("items" .=) <$> _comoItems, + ("selfLink" .=) <$> _comoSelfLink]) diff --git a/gogol-drive/gen/Network/Google/Drive/Types/Sum.hs b/gogol-drive/gen/Network/Google/Drive/Types/Sum.hs new file mode 100644 index 000000000..4793aef9f --- /dev/null +++ b/gogol-drive/gen/Network/Google/Drive/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Drive.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Drive.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/About/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/About/Get.hs new file mode 100644 index 000000000..ce7af732f --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/About/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.About.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the information about the current user along with Drive API +-- settings +-- +-- /See:/ for @DriveAboutGet@. +module Drive.About.Get + ( + -- * REST Resource + AboutGetAPI + + -- * Creating a Request + , aboutGet + , AboutGet + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aIncludeSubscribed + , aStartChangeId + , aMaxChangeIdCount + , aKey + , aOauthToken + , aFields + , aAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveAboutGet@ which the +-- 'AboutGet' request conforms to. +type AboutGetAPI = + "about" :> + QueryParam "includeSubscribed" Bool :> + QueryParam "startChangeId" Int64 :> + QueryParam "maxChangeIdCount" Int64 :> + Get '[JSON] About + +-- | Gets the information about the current user along with Drive API +-- settings +-- +-- /See:/ 'aboutGet' smart constructor. +data AboutGet = AboutGet + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aIncludeSubscribed :: !Bool + , _aStartChangeId :: !(Maybe Int64) + , _aMaxChangeIdCount :: !Int64 + , _aKey :: !(Maybe Text) + , _aOauthToken :: !(Maybe Text) + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AboutGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aIncludeSubscribed' +-- +-- * 'aStartChangeId' +-- +-- * 'aMaxChangeIdCount' +-- +-- * 'aKey' +-- +-- * 'aOauthToken' +-- +-- * 'aFields' +-- +-- * 'aAlt' +aboutGet + :: AboutGet +aboutGet = + AboutGet + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aIncludeSubscribed = True + , _aStartChangeId = Nothing + , _aMaxChangeIdCount = 1 + , _aKey = Nothing + , _aOauthToken = Nothing + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AboutGet' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AboutGet' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AboutGet' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | When calculating the number of remaining change IDs, whether to include +-- public files the user has opened and shared files. When set to false, +-- this counts only change IDs for owned files and any shared or public +-- files that the user has explicitly added to a folder they own. +aIncludeSubscribed :: Lens' AboutGet' Bool +aIncludeSubscribed + = lens _aIncludeSubscribed + (\ s a -> s{_aIncludeSubscribed = a}) + +-- | Change ID to start counting from when calculating number of remaining +-- change IDs +aStartChangeId :: Lens' AboutGet' (Maybe Int64) +aStartChangeId + = lens _aStartChangeId + (\ s a -> s{_aStartChangeId = a}) + +-- | Maximum number of remaining change IDs to count +aMaxChangeIdCount :: Lens' AboutGet' Int64 +aMaxChangeIdCount + = lens _aMaxChangeIdCount + (\ s a -> s{_aMaxChangeIdCount = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AboutGet' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AboutGet' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AboutGet' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AboutGet' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AboutGet' where + type Rs AboutGet' = About + request = requestWithRoute defReq driveURL + requestWithRoute r u AboutGet{..} + = go _aQuotaUser _aPrettyPrint _aUserIp + (Just _aIncludeSubscribed) + _aStartChangeId + (Just _aMaxChangeIdCount) + _aKey + _aOauthToken + _aFields + _aAlt + where go + = clientWithRoute (Proxy :: Proxy AboutGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Apps/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Apps/Get.hs new file mode 100644 index 000000000..ebcba1ca4 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Apps/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Apps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific app. +-- +-- /See:/ for @DriveAppsGet@. +module Drive.Apps.Get + ( + -- * REST Resource + AppsGetAPI + + -- * Creating a Request + , appsGet + , AppsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agAppId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveAppsGet@ which the +-- 'AppsGet' request conforms to. +type AppsGetAPI = + "apps" :> Capture "appId" Text :> Get '[JSON] App + +-- | Gets a specific app. +-- +-- /See:/ 'appsGet' smart constructor. +data AppsGet = AppsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agAppId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agAppId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +appsGet + :: Text -- ^ 'appId' + -> AppsGet +appsGet pAgAppId_ = + AppsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agAppId = pAgAppId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AppsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AppsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AppsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The ID of the app. +agAppId :: Lens' AppsGet' Text +agAppId = lens _agAppId (\ s a -> s{_agAppId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AppsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AppsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AppsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AppsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AppsGet' where + type Rs AppsGet' = App + request = requestWithRoute defReq driveURL + requestWithRoute r u AppsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp _agAppId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AppsGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Apps/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Apps/List.hs new file mode 100644 index 000000000..179d14a30 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Apps/List.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Apps.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a user\'s installed apps. +-- +-- /See:/ for @DriveAppsList@. +module Drive.Apps.List + ( + -- * REST Resource + AppsListAPI + + -- * Creating a Request + , appsList + , AppsList + + -- * Request Lenses + , alQuotaUser + , alLanguageCode + , alPrettyPrint + , alUserIp + , alKey + , alOauthToken + , alAppFilterExtensions + , alAppFilterMimeTypes + , alFields + , alAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveAppsList@ which the +-- 'AppsList' request conforms to. +type AppsListAPI = + "apps" :> + QueryParam "languageCode" Text :> + QueryParam "appFilterExtensions" Text :> + QueryParam "appFilterMimeTypes" Text :> + Get '[JSON] AppList + +-- | Lists a user\'s installed apps. +-- +-- /See:/ 'appsList' smart constructor. +data AppsList = AppsList + { _alQuotaUser :: !(Maybe Text) + , _alLanguageCode :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alAppFilterExtensions :: !Text + , _alAppFilterMimeTypes :: !Text + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alLanguageCode' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alOauthToken' +-- +-- * 'alAppFilterExtensions' +-- +-- * 'alAppFilterMimeTypes' +-- +-- * 'alFields' +-- +-- * 'alAlt' +appsList + :: AppsList +appsList = + AppsList + { _alQuotaUser = Nothing + , _alLanguageCode = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alOauthToken = Nothing + , _alAppFilterExtensions = "" + , _alAppFilterMimeTypes = "" + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AppsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | A language or locale code, as defined by BCP 47, with some extensions +-- from Unicode\'s LDML format (http:\/\/www.unicode.org\/reports\/tr35\/). +alLanguageCode :: Lens' AppsList' (Maybe Text) +alLanguageCode + = lens _alLanguageCode + (\ s a -> s{_alLanguageCode = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AppsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AppsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AppsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AppsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | A comma-separated list of file extensions for open with filtering. All +-- apps within the given app query scope which can open any of the given +-- file extensions will be included in the response. If appFilterMimeTypes +-- are provided as well, the result is a union of the two resulting app +-- lists. +alAppFilterExtensions :: Lens' AppsList' Text +alAppFilterExtensions + = lens _alAppFilterExtensions + (\ s a -> s{_alAppFilterExtensions = a}) + +-- | A comma-separated list of MIME types for open with filtering. All apps +-- within the given app query scope which can open any of the given MIME +-- types will be included in the response. If appFilterExtensions are +-- provided as well, the result is a union of the two resulting app lists. +alAppFilterMimeTypes :: Lens' AppsList' Text +alAppFilterMimeTypes + = lens _alAppFilterMimeTypes + (\ s a -> s{_alAppFilterMimeTypes = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AppsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AppsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AppsList' where + type Rs AppsList' = AppList + request = requestWithRoute defReq driveURL + requestWithRoute r u AppsList{..} + = go _alQuotaUser _alLanguageCode _alPrettyPrint + _alUserIp + _alKey + _alOauthToken + (Just _alAppFilterExtensions) + (Just _alAppFilterMimeTypes) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AppsListAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Get.hs new file mode 100644 index 000000000..5782e53bd --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Get.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Changes.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific change. +-- +-- /See:/ for @DriveChangesGet@. +module Drive.Changes.Get + ( + -- * REST Resource + ChangesGetAPI + + -- * Creating a Request + , changesGet + , ChangesGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgChangeId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChangesGet@ which the +-- 'ChangesGet' request conforms to. +type ChangesGetAPI = + "changes" :> + Capture "changeId" Text :> Get '[JSON] Change + +-- | Gets a specific change. +-- +-- /See:/ 'changesGet' smart constructor. +data ChangesGet = ChangesGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgChangeId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgChangeId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +changesGet + :: Text -- ^ 'changeId' + -> ChangesGet +changesGet pCgChangeId_ = + ChangesGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgChangeId = pCgChangeId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ChangesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ChangesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ChangesGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | The ID of the change. +cgChangeId :: Lens' ChangesGet' Text +cgChangeId + = lens _cgChangeId (\ s a -> s{_cgChangeId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ChangesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ChangesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ChangesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ChangesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ChangesGet' where + type Rs ChangesGet' = Change + request = requestWithRoute defReq driveURL + requestWithRoute r u ChangesGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp + _cgChangeId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy ChangesGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Changes/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/List.hs new file mode 100644 index 000000000..66529adec --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/List.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Changes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the changes for a user. +-- +-- /See:/ for @DriveChangesList@. +module Drive.Changes.List + ( + -- * REST Resource + ChangesListAPI + + -- * Creating a Request + , changesList + , ChangesList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clIncludeSubscribed + , clStartChangeId + , clKey + , clSpaces + , clPageToken + , clOauthToken + , clMaxResults + , clIncludeDeleted + , clFields + , clAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChangesList@ which the +-- 'ChangesList' request conforms to. +type ChangesListAPI = + "changes" :> + QueryParam "includeSubscribed" Bool :> + QueryParam "startChangeId" Int64 :> + QueryParam "spaces" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] ChangeList + +-- | Lists the changes for a user. +-- +-- /See:/ 'changesList' smart constructor. +data ChangesList = ChangesList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clIncludeSubscribed :: !Bool + , _clStartChangeId :: !(Maybe Int64) + , _clKey :: !(Maybe Text) + , _clSpaces :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !Int32 + , _clIncludeDeleted :: !Bool + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clIncludeSubscribed' +-- +-- * 'clStartChangeId' +-- +-- * 'clKey' +-- +-- * 'clSpaces' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clIncludeDeleted' +-- +-- * 'clFields' +-- +-- * 'clAlt' +changesList + :: ChangesList +changesList = + ChangesList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clIncludeSubscribed = True + , _clStartChangeId = Nothing + , _clKey = Nothing + , _clSpaces = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = 100 + , _clIncludeDeleted = True + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' ChangesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' ChangesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' ChangesList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Whether to include public files the user has opened and shared files. +-- When set to false, the list only includes owned files plus any shared or +-- public files the user has explicitly added to a folder they own. +clIncludeSubscribed :: Lens' ChangesList' Bool +clIncludeSubscribed + = lens _clIncludeSubscribed + (\ s a -> s{_clIncludeSubscribed = a}) + +-- | Change ID to start listing changes from. +clStartChangeId :: Lens' ChangesList' (Maybe Int64) +clStartChangeId + = lens _clStartChangeId + (\ s a -> s{_clStartChangeId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' ChangesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | A comma-separated list of spaces to query. Supported values are +-- \'drive\', \'appDataFolder\' and \'photos\'. +clSpaces :: Lens' ChangesList' (Maybe Text) +clSpaces = lens _clSpaces (\ s a -> s{_clSpaces = a}) + +-- | Page token for changes. +clPageToken :: Lens' ChangesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' ChangesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Maximum number of changes to return. +clMaxResults :: Lens' ChangesList' Int32 +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Whether to include deleted items. +clIncludeDeleted :: Lens' ChangesList' Bool +clIncludeDeleted + = lens _clIncludeDeleted + (\ s a -> s{_clIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' ChangesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' ChangesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest ChangesList' where + type Rs ChangesList' = ChangeList + request = requestWithRoute defReq driveURL + requestWithRoute r u ChangesList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp + (Just _clIncludeSubscribed) + _clStartChangeId + _clKey + _clSpaces + _clPageToken + _clOauthToken + (Just _clMaxResults) + (Just _clIncludeDeleted) + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy ChangesListAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Watch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Watch.hs new file mode 100644 index 000000000..63cb2bc5e --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Changes/Watch.hs @@ -0,0 +1,219 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Changes.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Subscribe to changes for a user. +-- +-- /See:/ for @DriveChangesWatch@. +module Drive.Changes.Watch + ( + -- * REST Resource + ChangesWatchAPI + + -- * Creating a Request + , changesWatch + , ChangesWatch + + -- * Request Lenses + , cwQuotaUser + , cwPrettyPrint + , cwUserIp + , cwIncludeSubscribed + , cwStartChangeId + , cwKey + , cwSpaces + , cwPageToken + , cwOauthToken + , cwMaxResults + , cwIncludeDeleted + , cwFields + , cwAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChangesWatch@ which the +-- 'ChangesWatch' request conforms to. +type ChangesWatchAPI = + "changes" :> + "watch" :> + QueryParam "includeSubscribed" Bool :> + QueryParam "startChangeId" Int64 :> + QueryParam "spaces" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "includeDeleted" Bool :> + Post '[JSON] Channel + +-- | Subscribe to changes for a user. +-- +-- /See:/ 'changesWatch' smart constructor. +data ChangesWatch = ChangesWatch + { _cwQuotaUser :: !(Maybe Text) + , _cwPrettyPrint :: !Bool + , _cwUserIp :: !(Maybe Text) + , _cwIncludeSubscribed :: !Bool + , _cwStartChangeId :: !(Maybe Int64) + , _cwKey :: !(Maybe Text) + , _cwSpaces :: !(Maybe Text) + , _cwPageToken :: !(Maybe Text) + , _cwOauthToken :: !(Maybe Text) + , _cwMaxResults :: !Int32 + , _cwIncludeDeleted :: !Bool + , _cwFields :: !(Maybe Text) + , _cwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChangesWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cwQuotaUser' +-- +-- * 'cwPrettyPrint' +-- +-- * 'cwUserIp' +-- +-- * 'cwIncludeSubscribed' +-- +-- * 'cwStartChangeId' +-- +-- * 'cwKey' +-- +-- * 'cwSpaces' +-- +-- * 'cwPageToken' +-- +-- * 'cwOauthToken' +-- +-- * 'cwMaxResults' +-- +-- * 'cwIncludeDeleted' +-- +-- * 'cwFields' +-- +-- * 'cwAlt' +changesWatch + :: ChangesWatch +changesWatch = + ChangesWatch + { _cwQuotaUser = Nothing + , _cwPrettyPrint = True + , _cwUserIp = Nothing + , _cwIncludeSubscribed = True + , _cwStartChangeId = Nothing + , _cwKey = Nothing + , _cwSpaces = Nothing + , _cwPageToken = Nothing + , _cwOauthToken = Nothing + , _cwMaxResults = 100 + , _cwIncludeDeleted = True + , _cwFields = Nothing + , _cwAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cwQuotaUser :: Lens' ChangesWatch' (Maybe Text) +cwQuotaUser + = lens _cwQuotaUser (\ s a -> s{_cwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cwPrettyPrint :: Lens' ChangesWatch' Bool +cwPrettyPrint + = lens _cwPrettyPrint + (\ s a -> s{_cwPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cwUserIp :: Lens' ChangesWatch' (Maybe Text) +cwUserIp = lens _cwUserIp (\ s a -> s{_cwUserIp = a}) + +-- | Whether to include public files the user has opened and shared files. +-- When set to false, the list only includes owned files plus any shared or +-- public files the user has explicitly added to a folder they own. +cwIncludeSubscribed :: Lens' ChangesWatch' Bool +cwIncludeSubscribed + = lens _cwIncludeSubscribed + (\ s a -> s{_cwIncludeSubscribed = a}) + +-- | Change ID to start listing changes from. +cwStartChangeId :: Lens' ChangesWatch' (Maybe Int64) +cwStartChangeId + = lens _cwStartChangeId + (\ s a -> s{_cwStartChangeId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cwKey :: Lens' ChangesWatch' (Maybe Text) +cwKey = lens _cwKey (\ s a -> s{_cwKey = a}) + +-- | A comma-separated list of spaces to query. Supported values are +-- \'drive\', \'appDataFolder\' and \'photos\'. +cwSpaces :: Lens' ChangesWatch' (Maybe Text) +cwSpaces = lens _cwSpaces (\ s a -> s{_cwSpaces = a}) + +-- | Page token for changes. +cwPageToken :: Lens' ChangesWatch' (Maybe Text) +cwPageToken + = lens _cwPageToken (\ s a -> s{_cwPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cwOauthToken :: Lens' ChangesWatch' (Maybe Text) +cwOauthToken + = lens _cwOauthToken (\ s a -> s{_cwOauthToken = a}) + +-- | Maximum number of changes to return. +cwMaxResults :: Lens' ChangesWatch' Int32 +cwMaxResults + = lens _cwMaxResults (\ s a -> s{_cwMaxResults = a}) + +-- | Whether to include deleted items. +cwIncludeDeleted :: Lens' ChangesWatch' Bool +cwIncludeDeleted + = lens _cwIncludeDeleted + (\ s a -> s{_cwIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +cwFields :: Lens' ChangesWatch' (Maybe Text) +cwFields = lens _cwFields (\ s a -> s{_cwFields = a}) + +-- | Data format for the response. +cwAlt :: Lens' ChangesWatch' Text +cwAlt = lens _cwAlt (\ s a -> s{_cwAlt = a}) + +instance GoogleRequest ChangesWatch' where + type Rs ChangesWatch' = Channel + request = requestWithRoute defReq driveURL + requestWithRoute r u ChangesWatch{..} + = go _cwQuotaUser _cwPrettyPrint _cwUserIp + (Just _cwIncludeSubscribed) + _cwStartChangeId + _cwKey + _cwSpaces + _cwPageToken + _cwOauthToken + (Just _cwMaxResults) + (Just _cwIncludeDeleted) + _cwFields + _cwAlt + where go + = clientWithRoute (Proxy :: Proxy ChangesWatchAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Channels/Stop.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Channels/Stop.hs new file mode 100644 index 000000000..19b31cefe --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Channels/Stop.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Channels.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop watching resources through this channel +-- +-- /See:/ for @DriveChannelsStop@. +module Drive.Channels.Stop + ( + -- * REST Resource + ChannelsStopAPI + + -- * Creating a Request + , channelsStop + , ChannelsStop + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChannelsStop@ which the +-- 'ChannelsStop' request conforms to. +type ChannelsStopAPI = + "channels" :> "stop" :> Post '[JSON] () + +-- | Stop watching resources through this channel +-- +-- /See:/ 'channelsStop' smart constructor. +data ChannelsStop = ChannelsStop + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +channelsStop + :: ChannelsStop +channelsStop = + ChannelsStop + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' ChannelsStop' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' ChannelsStop' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' ChannelsStop' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' ChannelsStop' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' ChannelsStop' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' ChannelsStop' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' ChannelsStop' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest ChannelsStop' where + type Rs ChannelsStop' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u ChannelsStop{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsStopAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Children/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Delete.hs new file mode 100644 index 000000000..a301ab1ca --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Delete.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Children.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a child from a folder. +-- +-- /See:/ for @DriveChildrenDelete@. +module Drive.Children.Delete + ( + -- * REST Resource + ChildrenDeleteAPI + + -- * Creating a Request + , childrenDelete + , ChildrenDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdFolderId + , cdKey + , cdChildId + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChildrenDelete@ which the +-- 'ChildrenDelete' request conforms to. +type ChildrenDeleteAPI = + "files" :> + Capture "folderId" Text :> + "children" :> + Capture "childId" Text :> Delete '[JSON] () + +-- | Removes a child from a folder. +-- +-- /See:/ 'childrenDelete' smart constructor. +data ChildrenDelete = ChildrenDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdFolderId :: !Text + , _cdKey :: !(Maybe Text) + , _cdChildId :: !Text + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildrenDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdFolderId' +-- +-- * 'cdKey' +-- +-- * 'cdChildId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +childrenDelete + :: Text -- ^ 'folderId' + -> Text -- ^ 'childId' + -> ChildrenDelete +childrenDelete pCdFolderId_ pCdChildId_ = + ChildrenDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdFolderId = pCdFolderId_ + , _cdKey = Nothing + , _cdChildId = pCdChildId_ + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' ChildrenDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' ChildrenDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' ChildrenDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | The ID of the folder. +cdFolderId :: Lens' ChildrenDelete' Text +cdFolderId + = lens _cdFolderId (\ s a -> s{_cdFolderId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' ChildrenDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | The ID of the child. +cdChildId :: Lens' ChildrenDelete' Text +cdChildId + = lens _cdChildId (\ s a -> s{_cdChildId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' ChildrenDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' ChildrenDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' ChildrenDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest ChildrenDelete' where + type Rs ChildrenDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u ChildrenDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp + _cdFolderId + _cdKey + _cdChildId + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy ChildrenDeleteAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Children/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Get.hs new file mode 100644 index 000000000..88a7083ef --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Children.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific child reference. +-- +-- /See:/ for @DriveChildrenGet@. +module Drive.Children.Get + ( + -- * REST Resource + ChildrenGetAPI + + -- * Creating a Request + , childrenGet + , ChildrenGet + + -- * Request Lenses + , chiQuotaUser + , chiPrettyPrint + , chiUserIp + , chiFolderId + , chiKey + , chiChildId + , chiOauthToken + , chiFields + , chiAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChildrenGet@ which the +-- 'ChildrenGet' request conforms to. +type ChildrenGetAPI = + "files" :> + Capture "folderId" Text :> + "children" :> + Capture "childId" Text :> Get '[JSON] ChildReference + +-- | Gets a specific child reference. +-- +-- /See:/ 'childrenGet' smart constructor. +data ChildrenGet = ChildrenGet + { _chiQuotaUser :: !(Maybe Text) + , _chiPrettyPrint :: !Bool + , _chiUserIp :: !(Maybe Text) + , _chiFolderId :: !Text + , _chiKey :: !(Maybe Text) + , _chiChildId :: !Text + , _chiOauthToken :: !(Maybe Text) + , _chiFields :: !(Maybe Text) + , _chiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildrenGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'chiQuotaUser' +-- +-- * 'chiPrettyPrint' +-- +-- * 'chiUserIp' +-- +-- * 'chiFolderId' +-- +-- * 'chiKey' +-- +-- * 'chiChildId' +-- +-- * 'chiOauthToken' +-- +-- * 'chiFields' +-- +-- * 'chiAlt' +childrenGet + :: Text -- ^ 'folderId' + -> Text -- ^ 'childId' + -> ChildrenGet +childrenGet pChiFolderId_ pChiChildId_ = + ChildrenGet + { _chiQuotaUser = Nothing + , _chiPrettyPrint = True + , _chiUserIp = Nothing + , _chiFolderId = pChiFolderId_ + , _chiKey = Nothing + , _chiChildId = pChiChildId_ + , _chiOauthToken = Nothing + , _chiFields = Nothing + , _chiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +chiQuotaUser :: Lens' ChildrenGet' (Maybe Text) +chiQuotaUser + = lens _chiQuotaUser (\ s a -> s{_chiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +chiPrettyPrint :: Lens' ChildrenGet' Bool +chiPrettyPrint + = lens _chiPrettyPrint + (\ s a -> s{_chiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +chiUserIp :: Lens' ChildrenGet' (Maybe Text) +chiUserIp + = lens _chiUserIp (\ s a -> s{_chiUserIp = a}) + +-- | The ID of the folder. +chiFolderId :: Lens' ChildrenGet' Text +chiFolderId + = lens _chiFolderId (\ s a -> s{_chiFolderId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +chiKey :: Lens' ChildrenGet' (Maybe Text) +chiKey = lens _chiKey (\ s a -> s{_chiKey = a}) + +-- | The ID of the child. +chiChildId :: Lens' ChildrenGet' Text +chiChildId + = lens _chiChildId (\ s a -> s{_chiChildId = a}) + +-- | OAuth 2.0 token for the current user. +chiOauthToken :: Lens' ChildrenGet' (Maybe Text) +chiOauthToken + = lens _chiOauthToken + (\ s a -> s{_chiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +chiFields :: Lens' ChildrenGet' (Maybe Text) +chiFields + = lens _chiFields (\ s a -> s{_chiFields = a}) + +-- | Data format for the response. +chiAlt :: Lens' ChildrenGet' Text +chiAlt = lens _chiAlt (\ s a -> s{_chiAlt = a}) + +instance GoogleRequest ChildrenGet' where + type Rs ChildrenGet' = ChildReference + request = requestWithRoute defReq driveURL + requestWithRoute r u ChildrenGet{..} + = go _chiQuotaUser _chiPrettyPrint _chiUserIp + _chiFolderId + _chiKey + _chiChildId + _chiOauthToken + _chiFields + _chiAlt + where go + = clientWithRoute (Proxy :: Proxy ChildrenGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Children/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Insert.hs new file mode 100644 index 000000000..bce1ae54f --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Children/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Children.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a file into a folder. +-- +-- /See:/ for @DriveChildrenInsert@. +module Drive.Children.Insert + ( + -- * REST Resource + ChildrenInsertAPI + + -- * Creating a Request + , childrenInsert + , ChildrenInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciFolderId + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChildrenInsert@ which the +-- 'ChildrenInsert' request conforms to. +type ChildrenInsertAPI = + "files" :> + Capture "folderId" Text :> + "children" :> Post '[JSON] ChildReference + +-- | Inserts a file into a folder. +-- +-- /See:/ 'childrenInsert' smart constructor. +data ChildrenInsert = ChildrenInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciFolderId :: !Text + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildrenInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciFolderId' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +childrenInsert + :: Text -- ^ 'folderId' + -> ChildrenInsert +childrenInsert pCiFolderId_ = + ChildrenInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciFolderId = pCiFolderId_ + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' ChildrenInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' ChildrenInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' ChildrenInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | The ID of the folder. +ciFolderId :: Lens' ChildrenInsert' Text +ciFolderId + = lens _ciFolderId (\ s a -> s{_ciFolderId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' ChildrenInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' ChildrenInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' ChildrenInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' ChildrenInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest ChildrenInsert' where + type Rs ChildrenInsert' = ChildReference + request = requestWithRoute defReq driveURL + requestWithRoute r u ChildrenInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp + _ciFolderId + _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy ChildrenInsertAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Children/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Children/List.hs new file mode 100644 index 000000000..24d652522 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Children/List.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Children.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a folder\'s children. +-- +-- /See:/ for @DriveChildrenList@. +module Drive.Children.List + ( + -- * REST Resource + ChildrenListAPI + + -- * Creating a Request + , childrenList + , ChildrenList + + -- * Request Lenses + , cQuotaUser + , cPrettyPrint + , cOrderBy + , cUserIp + , cFolderId + , cQ + , cKey + , cPageToken + , cOauthToken + , cMaxResults + , cFields + , cAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveChildrenList@ which the +-- 'ChildrenList' request conforms to. +type ChildrenListAPI = + "files" :> + Capture "folderId" Text :> + "children" :> + QueryParam "orderBy" Text :> + QueryParam "q" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ChildList + +-- | Lists a folder\'s children. +-- +-- /See:/ 'childrenList' smart constructor. +data ChildrenList = ChildrenList + { _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cOrderBy :: !(Maybe Text) + , _cUserIp :: !(Maybe Text) + , _cFolderId :: !Text + , _cQ :: !(Maybe Text) + , _cKey :: !(Maybe Text) + , _cPageToken :: !(Maybe Text) + , _cOauthToken :: !(Maybe Text) + , _cMaxResults :: !Int32 + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChildrenList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cOrderBy' +-- +-- * 'cUserIp' +-- +-- * 'cFolderId' +-- +-- * 'cQ' +-- +-- * 'cKey' +-- +-- * 'cPageToken' +-- +-- * 'cOauthToken' +-- +-- * 'cMaxResults' +-- +-- * 'cFields' +-- +-- * 'cAlt' +childrenList + :: Text -- ^ 'folderId' + -> ChildrenList +childrenList pCFolderId_ = + ChildrenList + { _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cOrderBy = Nothing + , _cUserIp = Nothing + , _cFolderId = pCFolderId_ + , _cQ = Nothing + , _cKey = Nothing + , _cPageToken = Nothing + , _cOauthToken = Nothing + , _cMaxResults = 100 + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' ChildrenList' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' ChildrenList' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | A comma-separated list of sort keys. Valid keys are \'createdDate\', +-- \'folder\', \'lastViewedByMeDate\', \'modifiedByMeDate\', +-- \'modifiedDate\', \'quotaBytesUsed\', \'recency\', \'sharedWithMeDate\', +-- \'starred\', and \'title\'. Each key sorts ascending by default, but may +-- be reversed with the \'desc\' modifier. Example usage: +-- ?orderBy=folder,modifiedDate desc,title. Please note that there is a +-- current limitation for users with approximately one million files in +-- which the requested sort order is ignored. +cOrderBy :: Lens' ChildrenList' (Maybe Text) +cOrderBy = lens _cOrderBy (\ s a -> s{_cOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' ChildrenList' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | The ID of the folder. +cFolderId :: Lens' ChildrenList' Text +cFolderId + = lens _cFolderId (\ s a -> s{_cFolderId = a}) + +-- | Query string for searching children. +cQ :: Lens' ChildrenList' (Maybe Text) +cQ = lens _cQ (\ s a -> s{_cQ = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' ChildrenList' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | Page token for children. +cPageToken :: Lens' ChildrenList' (Maybe Text) +cPageToken + = lens _cPageToken (\ s a -> s{_cPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' ChildrenList' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Maximum number of children to return. +cMaxResults :: Lens' ChildrenList' Int32 +cMaxResults + = lens _cMaxResults (\ s a -> s{_cMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' ChildrenList' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' ChildrenList' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest ChildrenList' where + type Rs ChildrenList' = ChildList + request = requestWithRoute defReq driveURL + requestWithRoute r u ChildrenList{..} + = go _cQuotaUser _cPrettyPrint _cOrderBy _cUserIp + _cFolderId + _cQ + _cKey + _cPageToken + _cOauthToken + (Just _cMaxResults) + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy ChildrenListAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Delete.hs new file mode 100644 index 000000000..bc99e8874 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Delete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a comment. +-- +-- /See:/ for @DriveCommentsDelete@. +module Drive.Comments.Delete + ( + -- * REST Resource + CommentsDeleteAPI + + -- * Creating a Request + , commentsDelete + , CommentsDelete + + -- * Request Lenses + , cddQuotaUser + , cddPrettyPrint + , cddUserIp + , cddKey + , cddFileId + , cddOauthToken + , cddCommentId + , cddFields + , cddAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsDelete@ which the +-- 'CommentsDelete' request conforms to. +type CommentsDeleteAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> Delete '[JSON] () + +-- | Deletes a comment. +-- +-- /See:/ 'commentsDelete' smart constructor. +data CommentsDelete = CommentsDelete + { _cddQuotaUser :: !(Maybe Text) + , _cddPrettyPrint :: !Bool + , _cddUserIp :: !(Maybe Text) + , _cddKey :: !(Maybe Text) + , _cddFileId :: !Text + , _cddOauthToken :: !(Maybe Text) + , _cddCommentId :: !Text + , _cddFields :: !(Maybe Text) + , _cddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cddQuotaUser' +-- +-- * 'cddPrettyPrint' +-- +-- * 'cddUserIp' +-- +-- * 'cddKey' +-- +-- * 'cddFileId' +-- +-- * 'cddOauthToken' +-- +-- * 'cddCommentId' +-- +-- * 'cddFields' +-- +-- * 'cddAlt' +commentsDelete + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> CommentsDelete +commentsDelete pCddFileId_ pCddCommentId_ = + CommentsDelete + { _cddQuotaUser = Nothing + , _cddPrettyPrint = True + , _cddUserIp = Nothing + , _cddKey = Nothing + , _cddFileId = pCddFileId_ + , _cddOauthToken = Nothing + , _cddCommentId = pCddCommentId_ + , _cddFields = Nothing + , _cddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cddQuotaUser :: Lens' CommentsDelete' (Maybe Text) +cddQuotaUser + = lens _cddQuotaUser (\ s a -> s{_cddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cddPrettyPrint :: Lens' CommentsDelete' Bool +cddPrettyPrint + = lens _cddPrettyPrint + (\ s a -> s{_cddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cddUserIp :: Lens' CommentsDelete' (Maybe Text) +cddUserIp + = lens _cddUserIp (\ s a -> s{_cddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cddKey :: Lens' CommentsDelete' (Maybe Text) +cddKey = lens _cddKey (\ s a -> s{_cddKey = a}) + +-- | The ID of the file. +cddFileId :: Lens' CommentsDelete' Text +cddFileId + = lens _cddFileId (\ s a -> s{_cddFileId = a}) + +-- | OAuth 2.0 token for the current user. +cddOauthToken :: Lens' CommentsDelete' (Maybe Text) +cddOauthToken + = lens _cddOauthToken + (\ s a -> s{_cddOauthToken = a}) + +-- | The ID of the comment. +cddCommentId :: Lens' CommentsDelete' Text +cddCommentId + = lens _cddCommentId (\ s a -> s{_cddCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cddFields :: Lens' CommentsDelete' (Maybe Text) +cddFields + = lens _cddFields (\ s a -> s{_cddFields = a}) + +-- | Data format for the response. +cddAlt :: Lens' CommentsDelete' Text +cddAlt = lens _cddAlt (\ s a -> s{_cddAlt = a}) + +instance GoogleRequest CommentsDelete' where + type Rs CommentsDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsDelete{..} + = go _cddQuotaUser _cddPrettyPrint _cddUserIp _cddKey + _cddFileId + _cddOauthToken + _cddCommentId + _cddFields + _cddAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsDeleteAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Get.hs new file mode 100644 index 000000000..1c9d5e1ff --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a comment by ID. +-- +-- /See:/ for @DriveCommentsGet@. +module Drive.Comments.Get + ( + -- * REST Resource + CommentsGetAPI + + -- * Creating a Request + , commentsGet + , CommentsGet + + -- * Request Lenses + , cggQuotaUser + , cggPrettyPrint + , cggUserIp + , cggKey + , cggFileId + , cggOauthToken + , cggCommentId + , cggIncludeDeleted + , cggFields + , cggAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsGet@ which the +-- 'CommentsGet' request conforms to. +type CommentsGetAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] Comment + +-- | Gets a comment by ID. +-- +-- /See:/ 'commentsGet' smart constructor. +data CommentsGet = CommentsGet + { _cggQuotaUser :: !(Maybe Text) + , _cggPrettyPrint :: !Bool + , _cggUserIp :: !(Maybe Text) + , _cggKey :: !(Maybe Text) + , _cggFileId :: !Text + , _cggOauthToken :: !(Maybe Text) + , _cggCommentId :: !Text + , _cggIncludeDeleted :: !Bool + , _cggFields :: !(Maybe Text) + , _cggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cggQuotaUser' +-- +-- * 'cggPrettyPrint' +-- +-- * 'cggUserIp' +-- +-- * 'cggKey' +-- +-- * 'cggFileId' +-- +-- * 'cggOauthToken' +-- +-- * 'cggCommentId' +-- +-- * 'cggIncludeDeleted' +-- +-- * 'cggFields' +-- +-- * 'cggAlt' +commentsGet + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> CommentsGet +commentsGet pCggFileId_ pCggCommentId_ = + CommentsGet + { _cggQuotaUser = Nothing + , _cggPrettyPrint = True + , _cggUserIp = Nothing + , _cggKey = Nothing + , _cggFileId = pCggFileId_ + , _cggOauthToken = Nothing + , _cggCommentId = pCggCommentId_ + , _cggIncludeDeleted = False + , _cggFields = Nothing + , _cggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cggQuotaUser :: Lens' CommentsGet' (Maybe Text) +cggQuotaUser + = lens _cggQuotaUser (\ s a -> s{_cggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cggPrettyPrint :: Lens' CommentsGet' Bool +cggPrettyPrint + = lens _cggPrettyPrint + (\ s a -> s{_cggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cggUserIp :: Lens' CommentsGet' (Maybe Text) +cggUserIp + = lens _cggUserIp (\ s a -> s{_cggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cggKey :: Lens' CommentsGet' (Maybe Text) +cggKey = lens _cggKey (\ s a -> s{_cggKey = a}) + +-- | The ID of the file. +cggFileId :: Lens' CommentsGet' Text +cggFileId + = lens _cggFileId (\ s a -> s{_cggFileId = a}) + +-- | OAuth 2.0 token for the current user. +cggOauthToken :: Lens' CommentsGet' (Maybe Text) +cggOauthToken + = lens _cggOauthToken + (\ s a -> s{_cggOauthToken = a}) + +-- | The ID of the comment. +cggCommentId :: Lens' CommentsGet' Text +cggCommentId + = lens _cggCommentId (\ s a -> s{_cggCommentId = a}) + +-- | If set, this will succeed when retrieving a deleted comment, and will +-- include any deleted replies. +cggIncludeDeleted :: Lens' CommentsGet' Bool +cggIncludeDeleted + = lens _cggIncludeDeleted + (\ s a -> s{_cggIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +cggFields :: Lens' CommentsGet' (Maybe Text) +cggFields + = lens _cggFields (\ s a -> s{_cggFields = a}) + +-- | Data format for the response. +cggAlt :: Lens' CommentsGet' Text +cggAlt = lens _cggAlt (\ s a -> s{_cggAlt = a}) + +instance GoogleRequest CommentsGet' where + type Rs CommentsGet' = Comment + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsGet{..} + = go _cggQuotaUser _cggPrettyPrint _cggUserIp _cggKey + _cggFileId + _cggOauthToken + _cggCommentId + (Just _cggIncludeDeleted) + _cggFields + _cggAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Insert.hs new file mode 100644 index 000000000..acabdacd0 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Insert.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new comment on the given file. +-- +-- /See:/ for @DriveCommentsInsert@. +module Drive.Comments.Insert + ( + -- * REST Resource + CommentsInsertAPI + + -- * Creating a Request + , commentsInsert + , CommentsInsert + + -- * Request Lenses + , comQuotaUser + , comPrettyPrint + , comUserIp + , comKey + , comFileId + , comOauthToken + , comFields + , comAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsInsert@ which the +-- 'CommentsInsert' request conforms to. +type CommentsInsertAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> Post '[JSON] Comment + +-- | Creates a new comment on the given file. +-- +-- /See:/ 'commentsInsert' smart constructor. +data CommentsInsert = CommentsInsert + { _comQuotaUser :: !(Maybe Text) + , _comPrettyPrint :: !Bool + , _comUserIp :: !(Maybe Text) + , _comKey :: !(Maybe Text) + , _comFileId :: !Text + , _comOauthToken :: !(Maybe Text) + , _comFields :: !(Maybe Text) + , _comAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comQuotaUser' +-- +-- * 'comPrettyPrint' +-- +-- * 'comUserIp' +-- +-- * 'comKey' +-- +-- * 'comFileId' +-- +-- * 'comOauthToken' +-- +-- * 'comFields' +-- +-- * 'comAlt' +commentsInsert + :: Text -- ^ 'fileId' + -> CommentsInsert +commentsInsert pComFileId_ = + CommentsInsert + { _comQuotaUser = Nothing + , _comPrettyPrint = True + , _comUserIp = Nothing + , _comKey = Nothing + , _comFileId = pComFileId_ + , _comOauthToken = Nothing + , _comFields = Nothing + , _comAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +comQuotaUser :: Lens' CommentsInsert' (Maybe Text) +comQuotaUser + = lens _comQuotaUser (\ s a -> s{_comQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +comPrettyPrint :: Lens' CommentsInsert' Bool +comPrettyPrint + = lens _comPrettyPrint + (\ s a -> s{_comPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +comUserIp :: Lens' CommentsInsert' (Maybe Text) +comUserIp + = lens _comUserIp (\ s a -> s{_comUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +comKey :: Lens' CommentsInsert' (Maybe Text) +comKey = lens _comKey (\ s a -> s{_comKey = a}) + +-- | The ID of the file. +comFileId :: Lens' CommentsInsert' Text +comFileId + = lens _comFileId (\ s a -> s{_comFileId = a}) + +-- | OAuth 2.0 token for the current user. +comOauthToken :: Lens' CommentsInsert' (Maybe Text) +comOauthToken + = lens _comOauthToken + (\ s a -> s{_comOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +comFields :: Lens' CommentsInsert' (Maybe Text) +comFields + = lens _comFields (\ s a -> s{_comFields = a}) + +-- | Data format for the response. +comAlt :: Lens' CommentsInsert' Text +comAlt = lens _comAlt (\ s a -> s{_comAlt = a}) + +instance GoogleRequest CommentsInsert' where + type Rs CommentsInsert' = Comment + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsInsert{..} + = go _comQuotaUser _comPrettyPrint _comUserIp _comKey + _comFileId + _comOauthToken + _comFields + _comAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsInsertAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/List.hs new file mode 100644 index 000000000..59bdf1c89 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/List.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a file\'s comments. +-- +-- /See:/ for @DriveCommentsList@. +module Drive.Comments.List + ( + -- * REST Resource + CommentsListAPI + + -- * Creating a Request + , commentsList + , CommentsList + + -- * Request Lenses + , cllQuotaUser + , cllPrettyPrint + , cllUserIp + , cllKey + , cllUpdatedMin + , cllPageToken + , cllFileId + , cllOauthToken + , cllMaxResults + , cllIncludeDeleted + , cllFields + , cllAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsList@ which the +-- 'CommentsList' request conforms to. +type CommentsListAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + QueryParam "updatedMin" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] CommentList + +-- | Lists a file\'s comments. +-- +-- /See:/ 'commentsList' smart constructor. +data CommentsList = CommentsList + { _cllQuotaUser :: !(Maybe Text) + , _cllPrettyPrint :: !Bool + , _cllUserIp :: !(Maybe Text) + , _cllKey :: !(Maybe Text) + , _cllUpdatedMin :: !(Maybe Text) + , _cllPageToken :: !(Maybe Text) + , _cllFileId :: !Text + , _cllOauthToken :: !(Maybe Text) + , _cllMaxResults :: !Int32 + , _cllIncludeDeleted :: !Bool + , _cllFields :: !(Maybe Text) + , _cllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllQuotaUser' +-- +-- * 'cllPrettyPrint' +-- +-- * 'cllUserIp' +-- +-- * 'cllKey' +-- +-- * 'cllUpdatedMin' +-- +-- * 'cllPageToken' +-- +-- * 'cllFileId' +-- +-- * 'cllOauthToken' +-- +-- * 'cllMaxResults' +-- +-- * 'cllIncludeDeleted' +-- +-- * 'cllFields' +-- +-- * 'cllAlt' +commentsList + :: Text -- ^ 'fileId' + -> CommentsList +commentsList pCllFileId_ = + CommentsList + { _cllQuotaUser = Nothing + , _cllPrettyPrint = True + , _cllUserIp = Nothing + , _cllKey = Nothing + , _cllUpdatedMin = Nothing + , _cllPageToken = Nothing + , _cllFileId = pCllFileId_ + , _cllOauthToken = Nothing + , _cllMaxResults = 20 + , _cllIncludeDeleted = False + , _cllFields = Nothing + , _cllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cllQuotaUser :: Lens' CommentsList' (Maybe Text) +cllQuotaUser + = lens _cllQuotaUser (\ s a -> s{_cllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cllPrettyPrint :: Lens' CommentsList' Bool +cllPrettyPrint + = lens _cllPrettyPrint + (\ s a -> s{_cllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cllUserIp :: Lens' CommentsList' (Maybe Text) +cllUserIp + = lens _cllUserIp (\ s a -> s{_cllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cllKey :: Lens' CommentsList' (Maybe Text) +cllKey = lens _cllKey (\ s a -> s{_cllKey = a}) + +-- | Only discussions that were updated after this timestamp will be +-- returned. Formatted as an RFC 3339 timestamp. +cllUpdatedMin :: Lens' CommentsList' (Maybe Text) +cllUpdatedMin + = lens _cllUpdatedMin + (\ s a -> s{_cllUpdatedMin = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +cllPageToken :: Lens' CommentsList' (Maybe Text) +cllPageToken + = lens _cllPageToken (\ s a -> s{_cllPageToken = a}) + +-- | The ID of the file. +cllFileId :: Lens' CommentsList' Text +cllFileId + = lens _cllFileId (\ s a -> s{_cllFileId = a}) + +-- | OAuth 2.0 token for the current user. +cllOauthToken :: Lens' CommentsList' (Maybe Text) +cllOauthToken + = lens _cllOauthToken + (\ s a -> s{_cllOauthToken = a}) + +-- | The maximum number of discussions to include in the response, used for +-- paging. +cllMaxResults :: Lens' CommentsList' Int32 +cllMaxResults + = lens _cllMaxResults + (\ s a -> s{_cllMaxResults = a}) + +-- | If set, all comments and replies, including deleted comments and replies +-- (with content stripped) will be returned. +cllIncludeDeleted :: Lens' CommentsList' Bool +cllIncludeDeleted + = lens _cllIncludeDeleted + (\ s a -> s{_cllIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +cllFields :: Lens' CommentsList' (Maybe Text) +cllFields + = lens _cllFields (\ s a -> s{_cllFields = a}) + +-- | Data format for the response. +cllAlt :: Lens' CommentsList' Text +cllAlt = lens _cllAlt (\ s a -> s{_cllAlt = a}) + +instance GoogleRequest CommentsList' where + type Rs CommentsList' = CommentList + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsList{..} + = go _cllQuotaUser _cllPrettyPrint _cllUserIp _cllKey + _cllUpdatedMin + _cllPageToken + _cllFileId + _cllOauthToken + (Just _cllMaxResults) + (Just _cllIncludeDeleted) + _cllFields + _cllAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsListAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Patch.hs new file mode 100644 index 000000000..f4cddd102 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Patch.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing comment. This method supports patch semantics. +-- +-- /See:/ for @DriveCommentsPatch@. +module Drive.Comments.Patch + ( + -- * REST Resource + CommentsPatchAPI + + -- * Creating a Request + , commentsPatch + , CommentsPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpKey + , cpFileId + , cpOauthToken + , cpCommentId + , cpFields + , cpAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsPatch@ which the +-- 'CommentsPatch' request conforms to. +type CommentsPatchAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> Patch '[JSON] Comment + +-- | Updates an existing comment. This method supports patch semantics. +-- +-- /See:/ 'commentsPatch' smart constructor. +data CommentsPatch = CommentsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpFileId :: !Text + , _cpOauthToken :: !(Maybe Text) + , _cpCommentId :: !Text + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpFileId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpCommentId' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +commentsPatch + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> CommentsPatch +commentsPatch pCpFileId_ pCpCommentId_ = + CommentsPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpFileId = pCpFileId_ + , _cpOauthToken = Nothing + , _cpCommentId = pCpCommentId_ + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CommentsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CommentsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CommentsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CommentsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | The ID of the file. +cpFileId :: Lens' CommentsPatch' Text +cpFileId = lens _cpFileId (\ s a -> s{_cpFileId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CommentsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | The ID of the comment. +cpCommentId :: Lens' CommentsPatch' Text +cpCommentId + = lens _cpCommentId (\ s a -> s{_cpCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CommentsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CommentsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CommentsPatch' where + type Rs CommentsPatch' = Comment + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp _cpKey + _cpFileId + _cpOauthToken + _cpCommentId + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsPatchAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Update.hs new file mode 100644 index 000000000..add221aa3 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Comments/Update.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Comments.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing comment. +-- +-- /See:/ for @DriveCommentsUpdate@. +module Drive.Comments.Update + ( + -- * REST Resource + CommentsUpdateAPI + + -- * Creating a Request + , commentsUpdate + , CommentsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuFileId + , cuOauthToken + , cuCommentId + , cuFields + , cuAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveCommentsUpdate@ which the +-- 'CommentsUpdate' request conforms to. +type CommentsUpdateAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> Put '[JSON] Comment + +-- | Updates an existing comment. +-- +-- /See:/ 'commentsUpdate' smart constructor. +data CommentsUpdate = CommentsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuFileId :: !Text + , _cuOauthToken :: !(Maybe Text) + , _cuCommentId :: !Text + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuFileId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuCommentId' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +commentsUpdate + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> CommentsUpdate +commentsUpdate pCuFileId_ pCuCommentId_ = + CommentsUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuFileId = pCuFileId_ + , _cuOauthToken = Nothing + , _cuCommentId = pCuCommentId_ + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CommentsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CommentsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CommentsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CommentsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | The ID of the file. +cuFileId :: Lens' CommentsUpdate' Text +cuFileId = lens _cuFileId (\ s a -> s{_cuFileId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CommentsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | The ID of the comment. +cuCommentId :: Lens' CommentsUpdate' Text +cuCommentId + = lens _cuCommentId (\ s a -> s{_cuCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CommentsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CommentsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CommentsUpdate' where + type Rs CommentsUpdate' = Comment + request = requestWithRoute defReq driveURL + requestWithRoute r u CommentsUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuFileId + _cuOauthToken + _cuCommentId + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsUpdateAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Copy.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Copy.hs new file mode 100644 index 000000000..76d077044 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Copy.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Copy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a copy of the specified file. +-- +-- /See:/ for @DriveFilesCopy@. +module Drive.Files.Copy + ( + -- * REST Resource + FilesCopyAPI + + -- * Creating a Request + , filesCopy + , FilesCopy + + -- * Request Lenses + , fcQuotaUser + , fcPrettyPrint + , fcUserIp + , fcPinned + , fcVisibility + , fcTimedTextLanguage + , fcTimedTextTrackName + , fcOcrLanguage + , fcKey + , fcConvert + , fcFileId + , fcOauthToken + , fcOcr + , fcFields + , fcAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesCopy@ which the +-- 'FilesCopy' request conforms to. +type FilesCopyAPI = + "files" :> + Capture "fileId" Text :> + "copy" :> + QueryParam "pinned" Bool :> + QueryParam "visibility" Text :> + QueryParam "timedTextLanguage" Text :> + QueryParam "timedTextTrackName" Text :> + QueryParam "ocrLanguage" Text :> + QueryParam "convert" Bool :> + QueryParam "ocr" Bool :> Post '[JSON] File + +-- | Creates a copy of the specified file. +-- +-- /See:/ 'filesCopy' smart constructor. +data FilesCopy = FilesCopy + { _fcQuotaUser :: !(Maybe Text) + , _fcPrettyPrint :: !Bool + , _fcUserIp :: !(Maybe Text) + , _fcPinned :: !Bool + , _fcVisibility :: !Text + , _fcTimedTextLanguage :: !(Maybe Text) + , _fcTimedTextTrackName :: !(Maybe Text) + , _fcOcrLanguage :: !(Maybe Text) + , _fcKey :: !(Maybe Text) + , _fcConvert :: !Bool + , _fcFileId :: !Text + , _fcOauthToken :: !(Maybe Text) + , _fcOcr :: !Bool + , _fcFields :: !(Maybe Text) + , _fcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesCopy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fcQuotaUser' +-- +-- * 'fcPrettyPrint' +-- +-- * 'fcUserIp' +-- +-- * 'fcPinned' +-- +-- * 'fcVisibility' +-- +-- * 'fcTimedTextLanguage' +-- +-- * 'fcTimedTextTrackName' +-- +-- * 'fcOcrLanguage' +-- +-- * 'fcKey' +-- +-- * 'fcConvert' +-- +-- * 'fcFileId' +-- +-- * 'fcOauthToken' +-- +-- * 'fcOcr' +-- +-- * 'fcFields' +-- +-- * 'fcAlt' +filesCopy + :: Text -- ^ 'fileId' + -> FilesCopy +filesCopy pFcFileId_ = + FilesCopy + { _fcQuotaUser = Nothing + , _fcPrettyPrint = True + , _fcUserIp = Nothing + , _fcPinned = False + , _fcVisibility = "DEFAULT" + , _fcTimedTextLanguage = Nothing + , _fcTimedTextTrackName = Nothing + , _fcOcrLanguage = Nothing + , _fcKey = Nothing + , _fcConvert = False + , _fcFileId = pFcFileId_ + , _fcOauthToken = Nothing + , _fcOcr = False + , _fcFields = Nothing + , _fcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fcQuotaUser :: Lens' FilesCopy' (Maybe Text) +fcQuotaUser + = lens _fcQuotaUser (\ s a -> s{_fcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fcPrettyPrint :: Lens' FilesCopy' Bool +fcPrettyPrint + = lens _fcPrettyPrint + (\ s a -> s{_fcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fcUserIp :: Lens' FilesCopy' (Maybe Text) +fcUserIp = lens _fcUserIp (\ s a -> s{_fcUserIp = a}) + +-- | Whether to pin the head revision of the new copy. A file can have a +-- maximum of 200 pinned revisions. +fcPinned :: Lens' FilesCopy' Bool +fcPinned = lens _fcPinned (\ s a -> s{_fcPinned = a}) + +-- | The visibility of the new file. This parameter is only relevant when the +-- source is not a native Google Doc and convert=false. +fcVisibility :: Lens' FilesCopy' Text +fcVisibility + = lens _fcVisibility (\ s a -> s{_fcVisibility = a}) + +-- | The language of the timed text. +fcTimedTextLanguage :: Lens' FilesCopy' (Maybe Text) +fcTimedTextLanguage + = lens _fcTimedTextLanguage + (\ s a -> s{_fcTimedTextLanguage = a}) + +-- | The timed text track name. +fcTimedTextTrackName :: Lens' FilesCopy' (Maybe Text) +fcTimedTextTrackName + = lens _fcTimedTextTrackName + (\ s a -> s{_fcTimedTextTrackName = a}) + +-- | If ocr is true, hints at the language to use. Valid values are BCP 47 +-- codes. +fcOcrLanguage :: Lens' FilesCopy' (Maybe Text) +fcOcrLanguage + = lens _fcOcrLanguage + (\ s a -> s{_fcOcrLanguage = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fcKey :: Lens' FilesCopy' (Maybe Text) +fcKey = lens _fcKey (\ s a -> s{_fcKey = a}) + +-- | Whether to convert this file to the corresponding Google Docs format. +fcConvert :: Lens' FilesCopy' Bool +fcConvert + = lens _fcConvert (\ s a -> s{_fcConvert = a}) + +-- | The ID of the file to copy. +fcFileId :: Lens' FilesCopy' Text +fcFileId = lens _fcFileId (\ s a -> s{_fcFileId = a}) + +-- | OAuth 2.0 token for the current user. +fcOauthToken :: Lens' FilesCopy' (Maybe Text) +fcOauthToken + = lens _fcOauthToken (\ s a -> s{_fcOauthToken = a}) + +-- | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. +fcOcr :: Lens' FilesCopy' Bool +fcOcr = lens _fcOcr (\ s a -> s{_fcOcr = a}) + +-- | Selector specifying which fields to include in a partial response. +fcFields :: Lens' FilesCopy' (Maybe Text) +fcFields = lens _fcFields (\ s a -> s{_fcFields = a}) + +-- | Data format for the response. +fcAlt :: Lens' FilesCopy' Text +fcAlt = lens _fcAlt (\ s a -> s{_fcAlt = a}) + +instance GoogleRequest FilesCopy' where + type Rs FilesCopy' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesCopy{..} + = go _fcQuotaUser _fcPrettyPrint _fcUserIp + (Just _fcPinned) + (Just _fcVisibility) + _fcTimedTextLanguage + _fcTimedTextTrackName + _fcOcrLanguage + _fcKey + (Just _fcConvert) + _fcFileId + _fcOauthToken + (Just _fcOcr) + _fcFields + _fcAlt + where go + = clientWithRoute (Proxy :: Proxy FilesCopyAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Delete.hs new file mode 100644 index 000000000..44cf15df2 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Delete.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes a file by ID. Skips the trash. The currently +-- authenticated user must own the file. +-- +-- /See:/ for @DriveFilesDelete@. +module Drive.Files.Delete + ( + -- * REST Resource + FilesDeleteAPI + + -- * Creating a Request + , filesDelete + , FilesDelete + + -- * Request Lenses + , fdQuotaUser + , fdPrettyPrint + , fdUserIp + , fdKey + , fdFileId + , fdOauthToken + , fdFields + , fdAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesDelete@ which the +-- 'FilesDelete' request conforms to. +type FilesDeleteAPI = + "files" :> Capture "fileId" Text :> Delete '[JSON] () + +-- | Permanently deletes a file by ID. Skips the trash. The currently +-- authenticated user must own the file. +-- +-- /See:/ 'filesDelete' smart constructor. +data FilesDelete = FilesDelete + { _fdQuotaUser :: !(Maybe Text) + , _fdPrettyPrint :: !Bool + , _fdUserIp :: !(Maybe Text) + , _fdKey :: !(Maybe Text) + , _fdFileId :: !Text + , _fdOauthToken :: !(Maybe Text) + , _fdFields :: !(Maybe Text) + , _fdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fdQuotaUser' +-- +-- * 'fdPrettyPrint' +-- +-- * 'fdUserIp' +-- +-- * 'fdKey' +-- +-- * 'fdFileId' +-- +-- * 'fdOauthToken' +-- +-- * 'fdFields' +-- +-- * 'fdAlt' +filesDelete + :: Text -- ^ 'fileId' + -> FilesDelete +filesDelete pFdFileId_ = + FilesDelete + { _fdQuotaUser = Nothing + , _fdPrettyPrint = True + , _fdUserIp = Nothing + , _fdKey = Nothing + , _fdFileId = pFdFileId_ + , _fdOauthToken = Nothing + , _fdFields = Nothing + , _fdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fdQuotaUser :: Lens' FilesDelete' (Maybe Text) +fdQuotaUser + = lens _fdQuotaUser (\ s a -> s{_fdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fdPrettyPrint :: Lens' FilesDelete' Bool +fdPrettyPrint + = lens _fdPrettyPrint + (\ s a -> s{_fdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fdUserIp :: Lens' FilesDelete' (Maybe Text) +fdUserIp = lens _fdUserIp (\ s a -> s{_fdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fdKey :: Lens' FilesDelete' (Maybe Text) +fdKey = lens _fdKey (\ s a -> s{_fdKey = a}) + +-- | The ID of the file to delete. +fdFileId :: Lens' FilesDelete' Text +fdFileId = lens _fdFileId (\ s a -> s{_fdFileId = a}) + +-- | OAuth 2.0 token for the current user. +fdOauthToken :: Lens' FilesDelete' (Maybe Text) +fdOauthToken + = lens _fdOauthToken (\ s a -> s{_fdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fdFields :: Lens' FilesDelete' (Maybe Text) +fdFields = lens _fdFields (\ s a -> s{_fdFields = a}) + +-- | Data format for the response. +fdAlt :: Lens' FilesDelete' Text +fdAlt = lens _fdAlt (\ s a -> s{_fdAlt = a}) + +instance GoogleRequest FilesDelete' where + type Rs FilesDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesDelete{..} + = go _fdQuotaUser _fdPrettyPrint _fdUserIp _fdKey + _fdFileId + _fdOauthToken + _fdFields + _fdAlt + where go + = clientWithRoute (Proxy :: Proxy FilesDeleteAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/EmptyTrash.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/EmptyTrash.hs new file mode 100644 index 000000000..192105536 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/EmptyTrash.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.EmptyTrash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes all of the user\'s trashed files. +-- +-- /See:/ for @DriveFilesEmptyTrash@. +module Drive.Files.EmptyTrash + ( + -- * REST Resource + FilesEmptyTrashAPI + + -- * Creating a Request + , filesEmptyTrash + , FilesEmptyTrash + + -- * Request Lenses + , fetQuotaUser + , fetPrettyPrint + , fetUserIp + , fetKey + , fetOauthToken + , fetFields + , fetAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesEmptyTrash@ which the +-- 'FilesEmptyTrash' request conforms to. +type FilesEmptyTrashAPI = + "files" :> "trash" :> Delete '[JSON] () + +-- | Permanently deletes all of the user\'s trashed files. +-- +-- /See:/ 'filesEmptyTrash' smart constructor. +data FilesEmptyTrash = FilesEmptyTrash + { _fetQuotaUser :: !(Maybe Text) + , _fetPrettyPrint :: !Bool + , _fetUserIp :: !(Maybe Text) + , _fetKey :: !(Maybe Text) + , _fetOauthToken :: !(Maybe Text) + , _fetFields :: !(Maybe Text) + , _fetAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesEmptyTrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fetQuotaUser' +-- +-- * 'fetPrettyPrint' +-- +-- * 'fetUserIp' +-- +-- * 'fetKey' +-- +-- * 'fetOauthToken' +-- +-- * 'fetFields' +-- +-- * 'fetAlt' +filesEmptyTrash + :: FilesEmptyTrash +filesEmptyTrash = + FilesEmptyTrash + { _fetQuotaUser = Nothing + , _fetPrettyPrint = True + , _fetUserIp = Nothing + , _fetKey = Nothing + , _fetOauthToken = Nothing + , _fetFields = Nothing + , _fetAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fetQuotaUser :: Lens' FilesEmptyTrash' (Maybe Text) +fetQuotaUser + = lens _fetQuotaUser (\ s a -> s{_fetQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fetPrettyPrint :: Lens' FilesEmptyTrash' Bool +fetPrettyPrint + = lens _fetPrettyPrint + (\ s a -> s{_fetPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fetUserIp :: Lens' FilesEmptyTrash' (Maybe Text) +fetUserIp + = lens _fetUserIp (\ s a -> s{_fetUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fetKey :: Lens' FilesEmptyTrash' (Maybe Text) +fetKey = lens _fetKey (\ s a -> s{_fetKey = a}) + +-- | OAuth 2.0 token for the current user. +fetOauthToken :: Lens' FilesEmptyTrash' (Maybe Text) +fetOauthToken + = lens _fetOauthToken + (\ s a -> s{_fetOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fetFields :: Lens' FilesEmptyTrash' (Maybe Text) +fetFields + = lens _fetFields (\ s a -> s{_fetFields = a}) + +-- | Data format for the response. +fetAlt :: Lens' FilesEmptyTrash' Text +fetAlt = lens _fetAlt (\ s a -> s{_fetAlt = a}) + +instance GoogleRequest FilesEmptyTrash' where + type Rs FilesEmptyTrash' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesEmptyTrash{..} + = go _fetQuotaUser _fetPrettyPrint _fetUserIp _fetKey + _fetOauthToken + _fetFields + _fetAlt + where go + = clientWithRoute (Proxy :: Proxy FilesEmptyTrashAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/GenerateIds.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/GenerateIds.hs new file mode 100644 index 000000000..4202e9b36 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/GenerateIds.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.GenerateIds +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates a set of file IDs which can be provided in insert requests. +-- +-- /See:/ for @DriveFilesGenerateIds@. +module Drive.Files.GenerateIds + ( + -- * REST Resource + FilesGenerateIdsAPI + + -- * Creating a Request + , filesGenerateIds + , FilesGenerateIds + + -- * Request Lenses + , fgiSpace + , fgiQuotaUser + , fgiPrettyPrint + , fgiUserIp + , fgiKey + , fgiOauthToken + , fgiMaxResults + , fgiFields + , fgiAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesGenerateIds@ which the +-- 'FilesGenerateIds' request conforms to. +type FilesGenerateIdsAPI = + "files" :> + "generateIds" :> + QueryParam "space" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] GeneratedIds + +-- | Generates a set of file IDs which can be provided in insert requests. +-- +-- /See:/ 'filesGenerateIds' smart constructor. +data FilesGenerateIds = FilesGenerateIds + { _fgiSpace :: !Text + , _fgiQuotaUser :: !(Maybe Text) + , _fgiPrettyPrint :: !Bool + , _fgiUserIp :: !(Maybe Text) + , _fgiKey :: !(Maybe Text) + , _fgiOauthToken :: !(Maybe Text) + , _fgiMaxResults :: !Int32 + , _fgiFields :: !(Maybe Text) + , _fgiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesGenerateIds'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fgiSpace' +-- +-- * 'fgiQuotaUser' +-- +-- * 'fgiPrettyPrint' +-- +-- * 'fgiUserIp' +-- +-- * 'fgiKey' +-- +-- * 'fgiOauthToken' +-- +-- * 'fgiMaxResults' +-- +-- * 'fgiFields' +-- +-- * 'fgiAlt' +filesGenerateIds + :: FilesGenerateIds +filesGenerateIds = + FilesGenerateIds + { _fgiSpace = "drive" + , _fgiQuotaUser = Nothing + , _fgiPrettyPrint = True + , _fgiUserIp = Nothing + , _fgiKey = Nothing + , _fgiOauthToken = Nothing + , _fgiMaxResults = 10 + , _fgiFields = Nothing + , _fgiAlt = "json" + } + +-- | The space in which the IDs can be used to create new files. Supported +-- values are \'drive\' and \'appDataFolder\'. +fgiSpace :: Lens' FilesGenerateIds' Text +fgiSpace = lens _fgiSpace (\ s a -> s{_fgiSpace = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fgiQuotaUser :: Lens' FilesGenerateIds' (Maybe Text) +fgiQuotaUser + = lens _fgiQuotaUser (\ s a -> s{_fgiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fgiPrettyPrint :: Lens' FilesGenerateIds' Bool +fgiPrettyPrint + = lens _fgiPrettyPrint + (\ s a -> s{_fgiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fgiUserIp :: Lens' FilesGenerateIds' (Maybe Text) +fgiUserIp + = lens _fgiUserIp (\ s a -> s{_fgiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fgiKey :: Lens' FilesGenerateIds' (Maybe Text) +fgiKey = lens _fgiKey (\ s a -> s{_fgiKey = a}) + +-- | OAuth 2.0 token for the current user. +fgiOauthToken :: Lens' FilesGenerateIds' (Maybe Text) +fgiOauthToken + = lens _fgiOauthToken + (\ s a -> s{_fgiOauthToken = a}) + +-- | Maximum number of IDs to return. +fgiMaxResults :: Lens' FilesGenerateIds' Int32 +fgiMaxResults + = lens _fgiMaxResults + (\ s a -> s{_fgiMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +fgiFields :: Lens' FilesGenerateIds' (Maybe Text) +fgiFields + = lens _fgiFields (\ s a -> s{_fgiFields = a}) + +-- | Data format for the response. +fgiAlt :: Lens' FilesGenerateIds' Text +fgiAlt = lens _fgiAlt (\ s a -> s{_fgiAlt = a}) + +instance GoogleRequest FilesGenerateIds' where + type Rs FilesGenerateIds' = GeneratedIds + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesGenerateIds{..} + = go (Just _fgiSpace) _fgiQuotaUser _fgiPrettyPrint + _fgiUserIp + _fgiKey + _fgiOauthToken + (Just _fgiMaxResults) + _fgiFields + _fgiAlt + where go + = clientWithRoute + (Proxy :: Proxy FilesGenerateIdsAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Get.hs new file mode 100644 index 000000000..f3ed283b4 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Get.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a file\'s metadata by ID. +-- +-- /See:/ for @DriveFilesGet@. +module Drive.Files.Get + ( + -- * REST Resource + FilesGetAPI + + -- * Creating a Request + , filesGet + , FilesGet + + -- * Request Lenses + , fgQuotaUser + , fgPrettyPrint + , fgUserIp + , fgUpdateViewedDate + , fgKey + , fgProjection + , fgAcknowledgeAbuse + , fgFileId + , fgOauthToken + , fgRevisionId + , fgFields + , fgAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesGet@ which the +-- 'FilesGet' request conforms to. +type FilesGetAPI = + "files" :> + Capture "fileId" Text :> + QueryParam "updateViewedDate" Bool :> + QueryParam "projection" Text :> + QueryParam "acknowledgeAbuse" Bool :> + QueryParam "revisionId" Text :> Get '[JSON] File + +-- | Gets a file\'s metadata by ID. +-- +-- /See:/ 'filesGet' smart constructor. +data FilesGet = FilesGet + { _fgQuotaUser :: !(Maybe Text) + , _fgPrettyPrint :: !Bool + , _fgUserIp :: !(Maybe Text) + , _fgUpdateViewedDate :: !Bool + , _fgKey :: !(Maybe Text) + , _fgProjection :: !(Maybe Text) + , _fgAcknowledgeAbuse :: !Bool + , _fgFileId :: !Text + , _fgOauthToken :: !(Maybe Text) + , _fgRevisionId :: !(Maybe Text) + , _fgFields :: !(Maybe Text) + , _fgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fgQuotaUser' +-- +-- * 'fgPrettyPrint' +-- +-- * 'fgUserIp' +-- +-- * 'fgUpdateViewedDate' +-- +-- * 'fgKey' +-- +-- * 'fgProjection' +-- +-- * 'fgAcknowledgeAbuse' +-- +-- * 'fgFileId' +-- +-- * 'fgOauthToken' +-- +-- * 'fgRevisionId' +-- +-- * 'fgFields' +-- +-- * 'fgAlt' +filesGet + :: Text -- ^ 'fileId' + -> FilesGet +filesGet pFgFileId_ = + FilesGet + { _fgQuotaUser = Nothing + , _fgPrettyPrint = True + , _fgUserIp = Nothing + , _fgUpdateViewedDate = False + , _fgKey = Nothing + , _fgProjection = Nothing + , _fgAcknowledgeAbuse = False + , _fgFileId = pFgFileId_ + , _fgOauthToken = Nothing + , _fgRevisionId = Nothing + , _fgFields = Nothing + , _fgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fgQuotaUser :: Lens' FilesGet' (Maybe Text) +fgQuotaUser + = lens _fgQuotaUser (\ s a -> s{_fgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fgPrettyPrint :: Lens' FilesGet' Bool +fgPrettyPrint + = lens _fgPrettyPrint + (\ s a -> s{_fgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fgUserIp :: Lens' FilesGet' (Maybe Text) +fgUserIp = lens _fgUserIp (\ s a -> s{_fgUserIp = a}) + +-- | Deprecated: Use files.update with modifiedDateBehavior=noChange, +-- updateViewedDate=true and an empty request body. +fgUpdateViewedDate :: Lens' FilesGet' Bool +fgUpdateViewedDate + = lens _fgUpdateViewedDate + (\ s a -> s{_fgUpdateViewedDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fgKey :: Lens' FilesGet' (Maybe Text) +fgKey = lens _fgKey (\ s a -> s{_fgKey = a}) + +-- | This parameter is deprecated and has no function. +fgProjection :: Lens' FilesGet' (Maybe Text) +fgProjection + = lens _fgProjection (\ s a -> s{_fgProjection = a}) + +-- | Whether the user is acknowledging the risk of downloading known malware +-- or other abusive files. +fgAcknowledgeAbuse :: Lens' FilesGet' Bool +fgAcknowledgeAbuse + = lens _fgAcknowledgeAbuse + (\ s a -> s{_fgAcknowledgeAbuse = a}) + +-- | The ID for the file in question. +fgFileId :: Lens' FilesGet' Text +fgFileId = lens _fgFileId (\ s a -> s{_fgFileId = a}) + +-- | OAuth 2.0 token for the current user. +fgOauthToken :: Lens' FilesGet' (Maybe Text) +fgOauthToken + = lens _fgOauthToken (\ s a -> s{_fgOauthToken = a}) + +-- | Specifies the Revision ID that should be downloaded. Ignored unless +-- alt=media is specified. +fgRevisionId :: Lens' FilesGet' (Maybe Text) +fgRevisionId + = lens _fgRevisionId (\ s a -> s{_fgRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +fgFields :: Lens' FilesGet' (Maybe Text) +fgFields = lens _fgFields (\ s a -> s{_fgFields = a}) + +-- | Data format for the response. +fgAlt :: Lens' FilesGet' Text +fgAlt = lens _fgAlt (\ s a -> s{_fgAlt = a}) + +instance GoogleRequest FilesGet' where + type Rs FilesGet' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesGet{..} + = go _fgQuotaUser _fgPrettyPrint _fgUserIp + (Just _fgUpdateViewedDate) + _fgKey + _fgProjection + (Just _fgAcknowledgeAbuse) + _fgFileId + _fgOauthToken + _fgRevisionId + _fgFields + _fgAlt + where go + = clientWithRoute (Proxy :: Proxy FilesGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Insert.hs new file mode 100644 index 000000000..1830ebab5 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Insert.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert a new file. +-- +-- /See:/ for @DriveFilesInsert@. +module Drive.Files.Insert + ( + -- * REST Resource + FilesInsertAPI + + -- * Creating a Request + , filesInsert + , FilesInsert + + -- * Request Lenses + , fiQuotaUser + , fiPrettyPrint + , fiUserIp + , fiPinned + , fiVisibility + , fiTimedTextLanguage + , fiUseContentAsIndexableText + , fiTimedTextTrackName + , fiOcrLanguage + , fiKey + , fiConvert + , fiOauthToken + , fiOcr + , fiFields + , fiAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesInsert@ which the +-- 'FilesInsert' request conforms to. +type FilesInsertAPI = + "files" :> + QueryParam "pinned" Bool :> + QueryParam "visibility" Text :> + QueryParam "timedTextLanguage" Text :> + QueryParam "useContentAsIndexableText" Bool :> + QueryParam "timedTextTrackName" Text :> + QueryParam "ocrLanguage" Text :> + QueryParam "convert" Bool :> + QueryParam "ocr" Bool :> Post '[JSON] File + +-- | Insert a new file. +-- +-- /See:/ 'filesInsert' smart constructor. +data FilesInsert = FilesInsert + { _fiQuotaUser :: !(Maybe Text) + , _fiPrettyPrint :: !Bool + , _fiUserIp :: !(Maybe Text) + , _fiPinned :: !Bool + , _fiVisibility :: !Text + , _fiTimedTextLanguage :: !(Maybe Text) + , _fiUseContentAsIndexableText :: !Bool + , _fiTimedTextTrackName :: !(Maybe Text) + , _fiOcrLanguage :: !(Maybe Text) + , _fiKey :: !(Maybe Text) + , _fiConvert :: !Bool + , _fiOauthToken :: !(Maybe Text) + , _fiOcr :: !Bool + , _fiFields :: !(Maybe Text) + , _fiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiQuotaUser' +-- +-- * 'fiPrettyPrint' +-- +-- * 'fiUserIp' +-- +-- * 'fiPinned' +-- +-- * 'fiVisibility' +-- +-- * 'fiTimedTextLanguage' +-- +-- * 'fiUseContentAsIndexableText' +-- +-- * 'fiTimedTextTrackName' +-- +-- * 'fiOcrLanguage' +-- +-- * 'fiKey' +-- +-- * 'fiConvert' +-- +-- * 'fiOauthToken' +-- +-- * 'fiOcr' +-- +-- * 'fiFields' +-- +-- * 'fiAlt' +filesInsert + :: FilesInsert +filesInsert = + FilesInsert + { _fiQuotaUser = Nothing + , _fiPrettyPrint = True + , _fiUserIp = Nothing + , _fiPinned = False + , _fiVisibility = "DEFAULT" + , _fiTimedTextLanguage = Nothing + , _fiUseContentAsIndexableText = False + , _fiTimedTextTrackName = Nothing + , _fiOcrLanguage = Nothing + , _fiKey = Nothing + , _fiConvert = False + , _fiOauthToken = Nothing + , _fiOcr = False + , _fiFields = Nothing + , _fiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fiQuotaUser :: Lens' FilesInsert' (Maybe Text) +fiQuotaUser + = lens _fiQuotaUser (\ s a -> s{_fiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fiPrettyPrint :: Lens' FilesInsert' Bool +fiPrettyPrint + = lens _fiPrettyPrint + (\ s a -> s{_fiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fiUserIp :: Lens' FilesInsert' (Maybe Text) +fiUserIp = lens _fiUserIp (\ s a -> s{_fiUserIp = a}) + +-- | Whether to pin the head revision of the uploaded file. A file can have a +-- maximum of 200 pinned revisions. +fiPinned :: Lens' FilesInsert' Bool +fiPinned = lens _fiPinned (\ s a -> s{_fiPinned = a}) + +-- | The visibility of the new file. This parameter is only relevant when +-- convert=false. +fiVisibility :: Lens' FilesInsert' Text +fiVisibility + = lens _fiVisibility (\ s a -> s{_fiVisibility = a}) + +-- | The language of the timed text. +fiTimedTextLanguage :: Lens' FilesInsert' (Maybe Text) +fiTimedTextLanguage + = lens _fiTimedTextLanguage + (\ s a -> s{_fiTimedTextLanguage = a}) + +-- | Whether to use the content as indexable text. +fiUseContentAsIndexableText :: Lens' FilesInsert' Bool +fiUseContentAsIndexableText + = lens _fiUseContentAsIndexableText + (\ s a -> s{_fiUseContentAsIndexableText = a}) + +-- | The timed text track name. +fiTimedTextTrackName :: Lens' FilesInsert' (Maybe Text) +fiTimedTextTrackName + = lens _fiTimedTextTrackName + (\ s a -> s{_fiTimedTextTrackName = a}) + +-- | If ocr is true, hints at the language to use. Valid values are BCP 47 +-- codes. +fiOcrLanguage :: Lens' FilesInsert' (Maybe Text) +fiOcrLanguage + = lens _fiOcrLanguage + (\ s a -> s{_fiOcrLanguage = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fiKey :: Lens' FilesInsert' (Maybe Text) +fiKey = lens _fiKey (\ s a -> s{_fiKey = a}) + +-- | Whether to convert this file to the corresponding Google Docs format. +fiConvert :: Lens' FilesInsert' Bool +fiConvert + = lens _fiConvert (\ s a -> s{_fiConvert = a}) + +-- | OAuth 2.0 token for the current user. +fiOauthToken :: Lens' FilesInsert' (Maybe Text) +fiOauthToken + = lens _fiOauthToken (\ s a -> s{_fiOauthToken = a}) + +-- | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. +fiOcr :: Lens' FilesInsert' Bool +fiOcr = lens _fiOcr (\ s a -> s{_fiOcr = a}) + +-- | Selector specifying which fields to include in a partial response. +fiFields :: Lens' FilesInsert' (Maybe Text) +fiFields = lens _fiFields (\ s a -> s{_fiFields = a}) + +-- | Data format for the response. +fiAlt :: Lens' FilesInsert' Text +fiAlt = lens _fiAlt (\ s a -> s{_fiAlt = a}) + +instance GoogleRequest FilesInsert' where + type Rs FilesInsert' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesInsert{..} + = go _fiQuotaUser _fiPrettyPrint _fiUserIp + (Just _fiPinned) + (Just _fiVisibility) + _fiTimedTextLanguage + (Just _fiUseContentAsIndexableText) + _fiTimedTextTrackName + _fiOcrLanguage + _fiKey + (Just _fiConvert) + _fiOauthToken + (Just _fiOcr) + _fiFields + _fiAlt + where go + = clientWithRoute (Proxy :: Proxy FilesInsertAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/List.hs new file mode 100644 index 000000000..4a81ec79e --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/List.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the user\'s files. +-- +-- /See:/ for @DriveFilesList@. +module Drive.Files.List + ( + -- * REST Resource + FilesListAPI + + -- * Creating a Request + , filesList + , FilesList + + -- * Request Lenses + , flQuotaUser + , flPrettyPrint + , flOrderBy + , flUserIp + , flQ + , flKey + , flSpaces + , flProjection + , flCorpus + , flPageToken + , flOauthToken + , flMaxResults + , flFields + , flAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesList@ which the +-- 'FilesList' request conforms to. +type FilesListAPI = + "files" :> + QueryParam "orderBy" Text :> + QueryParam "q" Text :> + QueryParam "spaces" Text :> + QueryParam "projection" Text :> + QueryParam "corpus" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] FileList + +-- | Lists the user\'s files. +-- +-- /See:/ 'filesList' smart constructor. +data FilesList = FilesList + { _flQuotaUser :: !(Maybe Text) + , _flPrettyPrint :: !Bool + , _flOrderBy :: !(Maybe Text) + , _flUserIp :: !(Maybe Text) + , _flQ :: !(Maybe Text) + , _flKey :: !(Maybe Text) + , _flSpaces :: !(Maybe Text) + , _flProjection :: !(Maybe Text) + , _flCorpus :: !(Maybe Text) + , _flPageToken :: !(Maybe Text) + , _flOauthToken :: !(Maybe Text) + , _flMaxResults :: !Int32 + , _flFields :: !(Maybe Text) + , _flAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flQuotaUser' +-- +-- * 'flPrettyPrint' +-- +-- * 'flOrderBy' +-- +-- * 'flUserIp' +-- +-- * 'flQ' +-- +-- * 'flKey' +-- +-- * 'flSpaces' +-- +-- * 'flProjection' +-- +-- * 'flCorpus' +-- +-- * 'flPageToken' +-- +-- * 'flOauthToken' +-- +-- * 'flMaxResults' +-- +-- * 'flFields' +-- +-- * 'flAlt' +filesList + :: FilesList +filesList = + FilesList + { _flQuotaUser = Nothing + , _flPrettyPrint = True + , _flOrderBy = Nothing + , _flUserIp = Nothing + , _flQ = Nothing + , _flKey = Nothing + , _flSpaces = Nothing + , _flProjection = Nothing + , _flCorpus = Nothing + , _flPageToken = Nothing + , _flOauthToken = Nothing + , _flMaxResults = 100 + , _flFields = Nothing + , _flAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +flQuotaUser :: Lens' FilesList' (Maybe Text) +flQuotaUser + = lens _flQuotaUser (\ s a -> s{_flQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +flPrettyPrint :: Lens' FilesList' Bool +flPrettyPrint + = lens _flPrettyPrint + (\ s a -> s{_flPrettyPrint = a}) + +-- | A comma-separated list of sort keys. Valid keys are \'createdDate\', +-- \'folder\', \'lastViewedByMeDate\', \'modifiedByMeDate\', +-- \'modifiedDate\', \'quotaBytesUsed\', \'recency\', \'sharedWithMeDate\', +-- \'starred\', and \'title\'. Each key sorts ascending by default, but may +-- be reversed with the \'desc\' modifier. Example usage: +-- ?orderBy=folder,modifiedDate desc,title. Please note that there is a +-- current limitation for users with approximately one million files in +-- which the requested sort order is ignored. +flOrderBy :: Lens' FilesList' (Maybe Text) +flOrderBy + = lens _flOrderBy (\ s a -> s{_flOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +flUserIp :: Lens' FilesList' (Maybe Text) +flUserIp = lens _flUserIp (\ s a -> s{_flUserIp = a}) + +-- | Query string for searching files. +flQ :: Lens' FilesList' (Maybe Text) +flQ = lens _flQ (\ s a -> s{_flQ = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +flKey :: Lens' FilesList' (Maybe Text) +flKey = lens _flKey (\ s a -> s{_flKey = a}) + +-- | A comma-separated list of spaces to query. Supported values are +-- \'drive\', \'appDataFolder\' and \'photos\'. +flSpaces :: Lens' FilesList' (Maybe Text) +flSpaces = lens _flSpaces (\ s a -> s{_flSpaces = a}) + +-- | This parameter is deprecated and has no function. +flProjection :: Lens' FilesList' (Maybe Text) +flProjection + = lens _flProjection (\ s a -> s{_flProjection = a}) + +-- | The body of items (files\/documents) to which the query applies. +flCorpus :: Lens' FilesList' (Maybe Text) +flCorpus = lens _flCorpus (\ s a -> s{_flCorpus = a}) + +-- | Page token for files. +flPageToken :: Lens' FilesList' (Maybe Text) +flPageToken + = lens _flPageToken (\ s a -> s{_flPageToken = a}) + +-- | OAuth 2.0 token for the current user. +flOauthToken :: Lens' FilesList' (Maybe Text) +flOauthToken + = lens _flOauthToken (\ s a -> s{_flOauthToken = a}) + +-- | Maximum number of files to return. +flMaxResults :: Lens' FilesList' Int32 +flMaxResults + = lens _flMaxResults (\ s a -> s{_flMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +flFields :: Lens' FilesList' (Maybe Text) +flFields = lens _flFields (\ s a -> s{_flFields = a}) + +-- | Data format for the response. +flAlt :: Lens' FilesList' Text +flAlt = lens _flAlt (\ s a -> s{_flAlt = a}) + +instance GoogleRequest FilesList' where + type Rs FilesList' = FileList + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesList{..} + = go _flQuotaUser _flPrettyPrint _flOrderBy _flUserIp + _flQ + _flKey + _flSpaces + _flProjection + _flCorpus + _flPageToken + _flOauthToken + (Just _flMaxResults) + _flFields + _flAlt + where go + = clientWithRoute (Proxy :: Proxy FilesListAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Patch.hs new file mode 100644 index 000000000..b351adba0 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Patch.hs @@ -0,0 +1,326 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates file metadata and\/or content. This method supports patch +-- semantics. +-- +-- /See:/ for @DriveFilesPatch@. +module Drive.Files.Patch + ( + -- * REST Resource + FilesPatchAPI + + -- * Creating a Request + , filesPatch + , FilesPatch + + -- * Request Lenses + , fpQuotaUser + , fpNewRevision + , fpPrettyPrint + , fpUserIp + , fpPinned + , fpTimedTextLanguage + , fpUpdateViewedDate + , fpRemoveParents + , fpModifiedDateBehavior + , fpUseContentAsIndexableText + , fpTimedTextTrackName + , fpOcrLanguage + , fpKey + , fpConvert + , fpSetModifiedDate + , fpFileId + , fpOauthToken + , fpAddParents + , fpOcr + , fpFields + , fpAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesPatch@ which the +-- 'FilesPatch' request conforms to. +type FilesPatchAPI = + "files" :> + Capture "fileId" Text :> + QueryParam "newRevision" Bool :> + QueryParam "pinned" Bool :> + QueryParam "timedTextLanguage" Text :> + QueryParam "updateViewedDate" Bool :> + QueryParam "removeParents" Text :> + QueryParam "modifiedDateBehavior" Text :> + QueryParam "useContentAsIndexableText" Bool :> + QueryParam "timedTextTrackName" Text :> + QueryParam "ocrLanguage" Text :> + QueryParam "convert" Bool :> + QueryParam "setModifiedDate" Bool :> + QueryParam "addParents" Text :> + QueryParam "ocr" Bool :> Patch '[JSON] File + +-- | Updates file metadata and\/or content. This method supports patch +-- semantics. +-- +-- /See:/ 'filesPatch' smart constructor. +data FilesPatch = FilesPatch + { _fpQuotaUser :: !(Maybe Text) + , _fpNewRevision :: !Bool + , _fpPrettyPrint :: !Bool + , _fpUserIp :: !(Maybe Text) + , _fpPinned :: !Bool + , _fpTimedTextLanguage :: !(Maybe Text) + , _fpUpdateViewedDate :: !Bool + , _fpRemoveParents :: !(Maybe Text) + , _fpModifiedDateBehavior :: !(Maybe Text) + , _fpUseContentAsIndexableText :: !Bool + , _fpTimedTextTrackName :: !(Maybe Text) + , _fpOcrLanguage :: !(Maybe Text) + , _fpKey :: !(Maybe Text) + , _fpConvert :: !Bool + , _fpSetModifiedDate :: !Bool + , _fpFileId :: !Text + , _fpOauthToken :: !(Maybe Text) + , _fpAddParents :: !(Maybe Text) + , _fpOcr :: !Bool + , _fpFields :: !(Maybe Text) + , _fpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fpQuotaUser' +-- +-- * 'fpNewRevision' +-- +-- * 'fpPrettyPrint' +-- +-- * 'fpUserIp' +-- +-- * 'fpPinned' +-- +-- * 'fpTimedTextLanguage' +-- +-- * 'fpUpdateViewedDate' +-- +-- * 'fpRemoveParents' +-- +-- * 'fpModifiedDateBehavior' +-- +-- * 'fpUseContentAsIndexableText' +-- +-- * 'fpTimedTextTrackName' +-- +-- * 'fpOcrLanguage' +-- +-- * 'fpKey' +-- +-- * 'fpConvert' +-- +-- * 'fpSetModifiedDate' +-- +-- * 'fpFileId' +-- +-- * 'fpOauthToken' +-- +-- * 'fpAddParents' +-- +-- * 'fpOcr' +-- +-- * 'fpFields' +-- +-- * 'fpAlt' +filesPatch + :: Text -- ^ 'fileId' + -> FilesPatch +filesPatch pFpFileId_ = + FilesPatch + { _fpQuotaUser = Nothing + , _fpNewRevision = True + , _fpPrettyPrint = True + , _fpUserIp = Nothing + , _fpPinned = False + , _fpTimedTextLanguage = Nothing + , _fpUpdateViewedDate = True + , _fpRemoveParents = Nothing + , _fpModifiedDateBehavior = Nothing + , _fpUseContentAsIndexableText = False + , _fpTimedTextTrackName = Nothing + , _fpOcrLanguage = Nothing + , _fpKey = Nothing + , _fpConvert = False + , _fpSetModifiedDate = False + , _fpFileId = pFpFileId_ + , _fpOauthToken = Nothing + , _fpAddParents = Nothing + , _fpOcr = False + , _fpFields = Nothing + , _fpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fpQuotaUser :: Lens' FilesPatch' (Maybe Text) +fpQuotaUser + = lens _fpQuotaUser (\ s a -> s{_fpQuotaUser = a}) + +-- | Whether a blob upload should create a new revision. If false, the blob +-- data in the current head revision is replaced. If true or not set, a new +-- blob is created as head revision, and previous unpinned revisions are +-- preserved for a short period of time. Pinned revisions are stored +-- indefinitely, using additional storage quota, up to a maximum of 200 +-- revisions. For details on how revisions are retained, see the Drive Help +-- Center. +fpNewRevision :: Lens' FilesPatch' Bool +fpNewRevision + = lens _fpNewRevision + (\ s a -> s{_fpNewRevision = a}) + +-- | Returns response with indentations and line breaks. +fpPrettyPrint :: Lens' FilesPatch' Bool +fpPrettyPrint + = lens _fpPrettyPrint + (\ s a -> s{_fpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fpUserIp :: Lens' FilesPatch' (Maybe Text) +fpUserIp = lens _fpUserIp (\ s a -> s{_fpUserIp = a}) + +-- | Whether to pin the new revision. A file can have a maximum of 200 pinned +-- revisions. +fpPinned :: Lens' FilesPatch' Bool +fpPinned = lens _fpPinned (\ s a -> s{_fpPinned = a}) + +-- | The language of the timed text. +fpTimedTextLanguage :: Lens' FilesPatch' (Maybe Text) +fpTimedTextLanguage + = lens _fpTimedTextLanguage + (\ s a -> s{_fpTimedTextLanguage = a}) + +-- | Whether to update the view date after successfully updating the file. +fpUpdateViewedDate :: Lens' FilesPatch' Bool +fpUpdateViewedDate + = lens _fpUpdateViewedDate + (\ s a -> s{_fpUpdateViewedDate = a}) + +-- | Comma-separated list of parent IDs to remove. +fpRemoveParents :: Lens' FilesPatch' (Maybe Text) +fpRemoveParents + = lens _fpRemoveParents + (\ s a -> s{_fpRemoveParents = a}) + +-- | Determines the behavior in which modifiedDate is updated. This overrides +-- setModifiedDate. +fpModifiedDateBehavior :: Lens' FilesPatch' (Maybe Text) +fpModifiedDateBehavior + = lens _fpModifiedDateBehavior + (\ s a -> s{_fpModifiedDateBehavior = a}) + +-- | Whether to use the content as indexable text. +fpUseContentAsIndexableText :: Lens' FilesPatch' Bool +fpUseContentAsIndexableText + = lens _fpUseContentAsIndexableText + (\ s a -> s{_fpUseContentAsIndexableText = a}) + +-- | The timed text track name. +fpTimedTextTrackName :: Lens' FilesPatch' (Maybe Text) +fpTimedTextTrackName + = lens _fpTimedTextTrackName + (\ s a -> s{_fpTimedTextTrackName = a}) + +-- | If ocr is true, hints at the language to use. Valid values are BCP 47 +-- codes. +fpOcrLanguage :: Lens' FilesPatch' (Maybe Text) +fpOcrLanguage + = lens _fpOcrLanguage + (\ s a -> s{_fpOcrLanguage = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fpKey :: Lens' FilesPatch' (Maybe Text) +fpKey = lens _fpKey (\ s a -> s{_fpKey = a}) + +-- | This parameter is deprecated and has no function. +fpConvert :: Lens' FilesPatch' Bool +fpConvert + = lens _fpConvert (\ s a -> s{_fpConvert = a}) + +-- | Whether to set the modified date with the supplied modified date. +fpSetModifiedDate :: Lens' FilesPatch' Bool +fpSetModifiedDate + = lens _fpSetModifiedDate + (\ s a -> s{_fpSetModifiedDate = a}) + +-- | The ID of the file to update. +fpFileId :: Lens' FilesPatch' Text +fpFileId = lens _fpFileId (\ s a -> s{_fpFileId = a}) + +-- | OAuth 2.0 token for the current user. +fpOauthToken :: Lens' FilesPatch' (Maybe Text) +fpOauthToken + = lens _fpOauthToken (\ s a -> s{_fpOauthToken = a}) + +-- | Comma-separated list of parent IDs to add. +fpAddParents :: Lens' FilesPatch' (Maybe Text) +fpAddParents + = lens _fpAddParents (\ s a -> s{_fpAddParents = a}) + +-- | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. +fpOcr :: Lens' FilesPatch' Bool +fpOcr = lens _fpOcr (\ s a -> s{_fpOcr = a}) + +-- | Selector specifying which fields to include in a partial response. +fpFields :: Lens' FilesPatch' (Maybe Text) +fpFields = lens _fpFields (\ s a -> s{_fpFields = a}) + +-- | Data format for the response. +fpAlt :: Lens' FilesPatch' Text +fpAlt = lens _fpAlt (\ s a -> s{_fpAlt = a}) + +instance GoogleRequest FilesPatch' where + type Rs FilesPatch' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesPatch{..} + = go _fpQuotaUser (Just _fpNewRevision) + _fpPrettyPrint + _fpUserIp + (Just _fpPinned) + _fpTimedTextLanguage + (Just _fpUpdateViewedDate) + _fpRemoveParents + _fpModifiedDateBehavior + (Just _fpUseContentAsIndexableText) + _fpTimedTextTrackName + _fpOcrLanguage + _fpKey + (Just _fpConvert) + (Just _fpSetModifiedDate) + _fpFileId + _fpOauthToken + _fpAddParents + (Just _fpOcr) + _fpFields + _fpAlt + where go + = clientWithRoute (Proxy :: Proxy FilesPatchAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Touch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Touch.hs new file mode 100644 index 000000000..6fc9ef02b --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Touch.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Touch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Set the file\'s updated time to the current server time. +-- +-- /See:/ for @DriveFilesTouch@. +module Drive.Files.Touch + ( + -- * REST Resource + FilesTouchAPI + + -- * Creating a Request + , filesTouch + , FilesTouch + + -- * Request Lenses + , fQuotaUser + , fPrettyPrint + , fUserIp + , fKey + , fFileId + , fOauthToken + , fFields + , fAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesTouch@ which the +-- 'FilesTouch' request conforms to. +type FilesTouchAPI = + "files" :> + Capture "fileId" Text :> "touch" :> Post '[JSON] File + +-- | Set the file\'s updated time to the current server time. +-- +-- /See:/ 'filesTouch' smart constructor. +data FilesTouch = FilesTouch + { _fQuotaUser :: !(Maybe Text) + , _fPrettyPrint :: !Bool + , _fUserIp :: !(Maybe Text) + , _fKey :: !(Maybe Text) + , _fFileId :: !Text + , _fOauthToken :: !(Maybe Text) + , _fFields :: !(Maybe Text) + , _fAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesTouch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fQuotaUser' +-- +-- * 'fPrettyPrint' +-- +-- * 'fUserIp' +-- +-- * 'fKey' +-- +-- * 'fFileId' +-- +-- * 'fOauthToken' +-- +-- * 'fFields' +-- +-- * 'fAlt' +filesTouch + :: Text -- ^ 'fileId' + -> FilesTouch +filesTouch pFFileId_ = + FilesTouch + { _fQuotaUser = Nothing + , _fPrettyPrint = True + , _fUserIp = Nothing + , _fKey = Nothing + , _fFileId = pFFileId_ + , _fOauthToken = Nothing + , _fFields = Nothing + , _fAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fQuotaUser :: Lens' FilesTouch' (Maybe Text) +fQuotaUser + = lens _fQuotaUser (\ s a -> s{_fQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fPrettyPrint :: Lens' FilesTouch' Bool +fPrettyPrint + = lens _fPrettyPrint (\ s a -> s{_fPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fUserIp :: Lens' FilesTouch' (Maybe Text) +fUserIp = lens _fUserIp (\ s a -> s{_fUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fKey :: Lens' FilesTouch' (Maybe Text) +fKey = lens _fKey (\ s a -> s{_fKey = a}) + +-- | The ID of the file to update. +fFileId :: Lens' FilesTouch' Text +fFileId = lens _fFileId (\ s a -> s{_fFileId = a}) + +-- | OAuth 2.0 token for the current user. +fOauthToken :: Lens' FilesTouch' (Maybe Text) +fOauthToken + = lens _fOauthToken (\ s a -> s{_fOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fFields :: Lens' FilesTouch' (Maybe Text) +fFields = lens _fFields (\ s a -> s{_fFields = a}) + +-- | Data format for the response. +fAlt :: Lens' FilesTouch' Text +fAlt = lens _fAlt (\ s a -> s{_fAlt = a}) + +instance GoogleRequest FilesTouch' where + type Rs FilesTouch' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesTouch{..} + = go _fQuotaUser _fPrettyPrint _fUserIp _fKey + _fFileId + _fOauthToken + _fFields + _fAlt + where go + = clientWithRoute (Proxy :: Proxy FilesTouchAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Trash.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Trash.hs new file mode 100644 index 000000000..325391ff1 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Trash.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Trash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves a file to the trash. The currently authenticated user must own the +-- file. +-- +-- /See:/ for @DriveFilesTrash@. +module Drive.Files.Trash + ( + -- * REST Resource + FilesTrashAPI + + -- * Creating a Request + , filesTrash + , FilesTrash + + -- * Request Lenses + , ftQuotaUser + , ftPrettyPrint + , ftUserIp + , ftKey + , ftFileId + , ftOauthToken + , ftFields + , ftAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesTrash@ which the +-- 'FilesTrash' request conforms to. +type FilesTrashAPI = + "files" :> + Capture "fileId" Text :> "trash" :> Post '[JSON] File + +-- | Moves a file to the trash. The currently authenticated user must own the +-- file. +-- +-- /See:/ 'filesTrash' smart constructor. +data FilesTrash = FilesTrash + { _ftQuotaUser :: !(Maybe Text) + , _ftPrettyPrint :: !Bool + , _ftUserIp :: !(Maybe Text) + , _ftKey :: !(Maybe Text) + , _ftFileId :: !Text + , _ftOauthToken :: !(Maybe Text) + , _ftFields :: !(Maybe Text) + , _ftAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesTrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ftQuotaUser' +-- +-- * 'ftPrettyPrint' +-- +-- * 'ftUserIp' +-- +-- * 'ftKey' +-- +-- * 'ftFileId' +-- +-- * 'ftOauthToken' +-- +-- * 'ftFields' +-- +-- * 'ftAlt' +filesTrash + :: Text -- ^ 'fileId' + -> FilesTrash +filesTrash pFtFileId_ = + FilesTrash + { _ftQuotaUser = Nothing + , _ftPrettyPrint = True + , _ftUserIp = Nothing + , _ftKey = Nothing + , _ftFileId = pFtFileId_ + , _ftOauthToken = Nothing + , _ftFields = Nothing + , _ftAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ftQuotaUser :: Lens' FilesTrash' (Maybe Text) +ftQuotaUser + = lens _ftQuotaUser (\ s a -> s{_ftQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ftPrettyPrint :: Lens' FilesTrash' Bool +ftPrettyPrint + = lens _ftPrettyPrint + (\ s a -> s{_ftPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ftUserIp :: Lens' FilesTrash' (Maybe Text) +ftUserIp = lens _ftUserIp (\ s a -> s{_ftUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ftKey :: Lens' FilesTrash' (Maybe Text) +ftKey = lens _ftKey (\ s a -> s{_ftKey = a}) + +-- | The ID of the file to trash. +ftFileId :: Lens' FilesTrash' Text +ftFileId = lens _ftFileId (\ s a -> s{_ftFileId = a}) + +-- | OAuth 2.0 token for the current user. +ftOauthToken :: Lens' FilesTrash' (Maybe Text) +ftOauthToken + = lens _ftOauthToken (\ s a -> s{_ftOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ftFields :: Lens' FilesTrash' (Maybe Text) +ftFields = lens _ftFields (\ s a -> s{_ftFields = a}) + +-- | Data format for the response. +ftAlt :: Lens' FilesTrash' Text +ftAlt = lens _ftAlt (\ s a -> s{_ftAlt = a}) + +instance GoogleRequest FilesTrash' where + type Rs FilesTrash' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesTrash{..} + = go _ftQuotaUser _ftPrettyPrint _ftUserIp _ftKey + _ftFileId + _ftOauthToken + _ftFields + _ftAlt + where go + = clientWithRoute (Proxy :: Proxy FilesTrashAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Untrash.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Untrash.hs new file mode 100644 index 000000000..c0d898d66 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Untrash.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Untrash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Restores a file from the trash. +-- +-- /See:/ for @DriveFilesUntrash@. +module Drive.Files.Untrash + ( + -- * REST Resource + FilesUntrashAPI + + -- * Creating a Request + , filesUntrash + , FilesUntrash + + -- * Request Lenses + , fuQuotaUser + , fuPrettyPrint + , fuUserIp + , fuKey + , fuFileId + , fuOauthToken + , fuFields + , fuAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesUntrash@ which the +-- 'FilesUntrash' request conforms to. +type FilesUntrashAPI = + "files" :> + Capture "fileId" Text :> + "untrash" :> Post '[JSON] File + +-- | Restores a file from the trash. +-- +-- /See:/ 'filesUntrash' smart constructor. +data FilesUntrash = FilesUntrash + { _fuQuotaUser :: !(Maybe Text) + , _fuPrettyPrint :: !Bool + , _fuUserIp :: !(Maybe Text) + , _fuKey :: !(Maybe Text) + , _fuFileId :: !Text + , _fuOauthToken :: !(Maybe Text) + , _fuFields :: !(Maybe Text) + , _fuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesUntrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fuQuotaUser' +-- +-- * 'fuPrettyPrint' +-- +-- * 'fuUserIp' +-- +-- * 'fuKey' +-- +-- * 'fuFileId' +-- +-- * 'fuOauthToken' +-- +-- * 'fuFields' +-- +-- * 'fuAlt' +filesUntrash + :: Text -- ^ 'fileId' + -> FilesUntrash +filesUntrash pFuFileId_ = + FilesUntrash + { _fuQuotaUser = Nothing + , _fuPrettyPrint = True + , _fuUserIp = Nothing + , _fuKey = Nothing + , _fuFileId = pFuFileId_ + , _fuOauthToken = Nothing + , _fuFields = Nothing + , _fuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fuQuotaUser :: Lens' FilesUntrash' (Maybe Text) +fuQuotaUser + = lens _fuQuotaUser (\ s a -> s{_fuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fuPrettyPrint :: Lens' FilesUntrash' Bool +fuPrettyPrint + = lens _fuPrettyPrint + (\ s a -> s{_fuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fuUserIp :: Lens' FilesUntrash' (Maybe Text) +fuUserIp = lens _fuUserIp (\ s a -> s{_fuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fuKey :: Lens' FilesUntrash' (Maybe Text) +fuKey = lens _fuKey (\ s a -> s{_fuKey = a}) + +-- | The ID of the file to untrash. +fuFileId :: Lens' FilesUntrash' Text +fuFileId = lens _fuFileId (\ s a -> s{_fuFileId = a}) + +-- | OAuth 2.0 token for the current user. +fuOauthToken :: Lens' FilesUntrash' (Maybe Text) +fuOauthToken + = lens _fuOauthToken (\ s a -> s{_fuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +fuFields :: Lens' FilesUntrash' (Maybe Text) +fuFields = lens _fuFields (\ s a -> s{_fuFields = a}) + +-- | Data format for the response. +fuAlt :: Lens' FilesUntrash' Text +fuAlt = lens _fuAlt (\ s a -> s{_fuAlt = a}) + +instance GoogleRequest FilesUntrash' where + type Rs FilesUntrash' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesUntrash{..} + = go _fuQuotaUser _fuPrettyPrint _fuUserIp _fuKey + _fuFileId + _fuOauthToken + _fuFields + _fuAlt + where go + = clientWithRoute (Proxy :: Proxy FilesUntrashAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Update.hs new file mode 100644 index 000000000..4612c0f3a --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Update.hs @@ -0,0 +1,330 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates file metadata and\/or content. +-- +-- /See:/ for @DriveFilesUpdate@. +module Drive.Files.Update + ( + -- * REST Resource + FilesUpdateAPI + + -- * Creating a Request + , filesUpdate + , FilesUpdate + + -- * Request Lenses + , filQuotaUser + , filNewRevision + , filPrettyPrint + , filUserIp + , filPinned + , filTimedTextLanguage + , filUpdateViewedDate + , filRemoveParents + , filModifiedDateBehavior + , filUseContentAsIndexableText + , filTimedTextTrackName + , filOcrLanguage + , filKey + , filConvert + , filSetModifiedDate + , filFileId + , filOauthToken + , filAddParents + , filOcr + , filFields + , filAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesUpdate@ which the +-- 'FilesUpdate' request conforms to. +type FilesUpdateAPI = + "files" :> + Capture "fileId" Text :> + QueryParam "newRevision" Bool :> + QueryParam "pinned" Bool :> + QueryParam "timedTextLanguage" Text :> + QueryParam "updateViewedDate" Bool :> + QueryParam "removeParents" Text :> + QueryParam "modifiedDateBehavior" Text :> + QueryParam "useContentAsIndexableText" Bool :> + QueryParam "timedTextTrackName" Text :> + QueryParam "ocrLanguage" Text :> + QueryParam "convert" Bool :> + QueryParam "setModifiedDate" Bool :> + QueryParam "addParents" Text :> + QueryParam "ocr" Bool :> Put '[JSON] File + +-- | Updates file metadata and\/or content. +-- +-- /See:/ 'filesUpdate' smart constructor. +data FilesUpdate = FilesUpdate + { _filQuotaUser :: !(Maybe Text) + , _filNewRevision :: !Bool + , _filPrettyPrint :: !Bool + , _filUserIp :: !(Maybe Text) + , _filPinned :: !Bool + , _filTimedTextLanguage :: !(Maybe Text) + , _filUpdateViewedDate :: !Bool + , _filRemoveParents :: !(Maybe Text) + , _filModifiedDateBehavior :: !(Maybe Text) + , _filUseContentAsIndexableText :: !Bool + , _filTimedTextTrackName :: !(Maybe Text) + , _filOcrLanguage :: !(Maybe Text) + , _filKey :: !(Maybe Text) + , _filConvert :: !Bool + , _filSetModifiedDate :: !Bool + , _filFileId :: !Text + , _filOauthToken :: !(Maybe Text) + , _filAddParents :: !(Maybe Text) + , _filOcr :: !Bool + , _filFields :: !(Maybe Text) + , _filAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'filQuotaUser' +-- +-- * 'filNewRevision' +-- +-- * 'filPrettyPrint' +-- +-- * 'filUserIp' +-- +-- * 'filPinned' +-- +-- * 'filTimedTextLanguage' +-- +-- * 'filUpdateViewedDate' +-- +-- * 'filRemoveParents' +-- +-- * 'filModifiedDateBehavior' +-- +-- * 'filUseContentAsIndexableText' +-- +-- * 'filTimedTextTrackName' +-- +-- * 'filOcrLanguage' +-- +-- * 'filKey' +-- +-- * 'filConvert' +-- +-- * 'filSetModifiedDate' +-- +-- * 'filFileId' +-- +-- * 'filOauthToken' +-- +-- * 'filAddParents' +-- +-- * 'filOcr' +-- +-- * 'filFields' +-- +-- * 'filAlt' +filesUpdate + :: Text -- ^ 'fileId' + -> FilesUpdate +filesUpdate pFilFileId_ = + FilesUpdate + { _filQuotaUser = Nothing + , _filNewRevision = True + , _filPrettyPrint = True + , _filUserIp = Nothing + , _filPinned = False + , _filTimedTextLanguage = Nothing + , _filUpdateViewedDate = True + , _filRemoveParents = Nothing + , _filModifiedDateBehavior = Nothing + , _filUseContentAsIndexableText = False + , _filTimedTextTrackName = Nothing + , _filOcrLanguage = Nothing + , _filKey = Nothing + , _filConvert = False + , _filSetModifiedDate = False + , _filFileId = pFilFileId_ + , _filOauthToken = Nothing + , _filAddParents = Nothing + , _filOcr = False + , _filFields = Nothing + , _filAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +filQuotaUser :: Lens' FilesUpdate' (Maybe Text) +filQuotaUser + = lens _filQuotaUser (\ s a -> s{_filQuotaUser = a}) + +-- | Whether a blob upload should create a new revision. If false, the blob +-- data in the current head revision is replaced. If true or not set, a new +-- blob is created as head revision, and previous unpinned revisions are +-- preserved for a short period of time. Pinned revisions are stored +-- indefinitely, using additional storage quota, up to a maximum of 200 +-- revisions. For details on how revisions are retained, see the Drive Help +-- Center. +filNewRevision :: Lens' FilesUpdate' Bool +filNewRevision + = lens _filNewRevision + (\ s a -> s{_filNewRevision = a}) + +-- | Returns response with indentations and line breaks. +filPrettyPrint :: Lens' FilesUpdate' Bool +filPrettyPrint + = lens _filPrettyPrint + (\ s a -> s{_filPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +filUserIp :: Lens' FilesUpdate' (Maybe Text) +filUserIp + = lens _filUserIp (\ s a -> s{_filUserIp = a}) + +-- | Whether to pin the new revision. A file can have a maximum of 200 pinned +-- revisions. +filPinned :: Lens' FilesUpdate' Bool +filPinned + = lens _filPinned (\ s a -> s{_filPinned = a}) + +-- | The language of the timed text. +filTimedTextLanguage :: Lens' FilesUpdate' (Maybe Text) +filTimedTextLanguage + = lens _filTimedTextLanguage + (\ s a -> s{_filTimedTextLanguage = a}) + +-- | Whether to update the view date after successfully updating the file. +filUpdateViewedDate :: Lens' FilesUpdate' Bool +filUpdateViewedDate + = lens _filUpdateViewedDate + (\ s a -> s{_filUpdateViewedDate = a}) + +-- | Comma-separated list of parent IDs to remove. +filRemoveParents :: Lens' FilesUpdate' (Maybe Text) +filRemoveParents + = lens _filRemoveParents + (\ s a -> s{_filRemoveParents = a}) + +-- | Determines the behavior in which modifiedDate is updated. This overrides +-- setModifiedDate. +filModifiedDateBehavior :: Lens' FilesUpdate' (Maybe Text) +filModifiedDateBehavior + = lens _filModifiedDateBehavior + (\ s a -> s{_filModifiedDateBehavior = a}) + +-- | Whether to use the content as indexable text. +filUseContentAsIndexableText :: Lens' FilesUpdate' Bool +filUseContentAsIndexableText + = lens _filUseContentAsIndexableText + (\ s a -> s{_filUseContentAsIndexableText = a}) + +-- | The timed text track name. +filTimedTextTrackName :: Lens' FilesUpdate' (Maybe Text) +filTimedTextTrackName + = lens _filTimedTextTrackName + (\ s a -> s{_filTimedTextTrackName = a}) + +-- | If ocr is true, hints at the language to use. Valid values are BCP 47 +-- codes. +filOcrLanguage :: Lens' FilesUpdate' (Maybe Text) +filOcrLanguage + = lens _filOcrLanguage + (\ s a -> s{_filOcrLanguage = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +filKey :: Lens' FilesUpdate' (Maybe Text) +filKey = lens _filKey (\ s a -> s{_filKey = a}) + +-- | This parameter is deprecated and has no function. +filConvert :: Lens' FilesUpdate' Bool +filConvert + = lens _filConvert (\ s a -> s{_filConvert = a}) + +-- | Whether to set the modified date with the supplied modified date. +filSetModifiedDate :: Lens' FilesUpdate' Bool +filSetModifiedDate + = lens _filSetModifiedDate + (\ s a -> s{_filSetModifiedDate = a}) + +-- | The ID of the file to update. +filFileId :: Lens' FilesUpdate' Text +filFileId + = lens _filFileId (\ s a -> s{_filFileId = a}) + +-- | OAuth 2.0 token for the current user. +filOauthToken :: Lens' FilesUpdate' (Maybe Text) +filOauthToken + = lens _filOauthToken + (\ s a -> s{_filOauthToken = a}) + +-- | Comma-separated list of parent IDs to add. +filAddParents :: Lens' FilesUpdate' (Maybe Text) +filAddParents + = lens _filAddParents + (\ s a -> s{_filAddParents = a}) + +-- | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. +filOcr :: Lens' FilesUpdate' Bool +filOcr = lens _filOcr (\ s a -> s{_filOcr = a}) + +-- | Selector specifying which fields to include in a partial response. +filFields :: Lens' FilesUpdate' (Maybe Text) +filFields + = lens _filFields (\ s a -> s{_filFields = a}) + +-- | Data format for the response. +filAlt :: Lens' FilesUpdate' Text +filAlt = lens _filAlt (\ s a -> s{_filAlt = a}) + +instance GoogleRequest FilesUpdate' where + type Rs FilesUpdate' = File + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesUpdate{..} + = go _filQuotaUser (Just _filNewRevision) + _filPrettyPrint + _filUserIp + (Just _filPinned) + _filTimedTextLanguage + (Just _filUpdateViewedDate) + _filRemoveParents + _filModifiedDateBehavior + (Just _filUseContentAsIndexableText) + _filTimedTextTrackName + _filOcrLanguage + _filKey + (Just _filConvert) + (Just _filSetModifiedDate) + _filFileId + _filOauthToken + _filAddParents + (Just _filOcr) + _filFields + _filAlt + where go + = clientWithRoute (Proxy :: Proxy FilesUpdateAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Files/Watch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Watch.hs new file mode 100644 index 000000000..0c699b08f --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Files/Watch.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Files.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Subscribe to changes on a file +-- +-- /See:/ for @DriveFilesWatch@. +module Drive.Files.Watch + ( + -- * REST Resource + FilesWatchAPI + + -- * Creating a Request + , filesWatch + , FilesWatch + + -- * Request Lenses + , fwQuotaUser + , fwPrettyPrint + , fwUserIp + , fwUpdateViewedDate + , fwKey + , fwProjection + , fwAcknowledgeAbuse + , fwFileId + , fwOauthToken + , fwRevisionId + , fwFields + , fwAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveFilesWatch@ which the +-- 'FilesWatch' request conforms to. +type FilesWatchAPI = + "files" :> + Capture "fileId" Text :> + "watch" :> + QueryParam "updateViewedDate" Bool :> + QueryParam "projection" Text :> + QueryParam "acknowledgeAbuse" Bool :> + QueryParam "revisionId" Text :> Post '[JSON] Channel + +-- | Subscribe to changes on a file +-- +-- /See:/ 'filesWatch' smart constructor. +data FilesWatch = FilesWatch + { _fwQuotaUser :: !(Maybe Text) + , _fwPrettyPrint :: !Bool + , _fwUserIp :: !(Maybe Text) + , _fwUpdateViewedDate :: !Bool + , _fwKey :: !(Maybe Text) + , _fwProjection :: !(Maybe Text) + , _fwAcknowledgeAbuse :: !Bool + , _fwFileId :: !Text + , _fwOauthToken :: !(Maybe Text) + , _fwRevisionId :: !(Maybe Text) + , _fwFields :: !(Maybe Text) + , _fwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FilesWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fwQuotaUser' +-- +-- * 'fwPrettyPrint' +-- +-- * 'fwUserIp' +-- +-- * 'fwUpdateViewedDate' +-- +-- * 'fwKey' +-- +-- * 'fwProjection' +-- +-- * 'fwAcknowledgeAbuse' +-- +-- * 'fwFileId' +-- +-- * 'fwOauthToken' +-- +-- * 'fwRevisionId' +-- +-- * 'fwFields' +-- +-- * 'fwAlt' +filesWatch + :: Text -- ^ 'fileId' + -> FilesWatch +filesWatch pFwFileId_ = + FilesWatch + { _fwQuotaUser = Nothing + , _fwPrettyPrint = True + , _fwUserIp = Nothing + , _fwUpdateViewedDate = False + , _fwKey = Nothing + , _fwProjection = Nothing + , _fwAcknowledgeAbuse = False + , _fwFileId = pFwFileId_ + , _fwOauthToken = Nothing + , _fwRevisionId = Nothing + , _fwFields = Nothing + , _fwAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +fwQuotaUser :: Lens' FilesWatch' (Maybe Text) +fwQuotaUser + = lens _fwQuotaUser (\ s a -> s{_fwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +fwPrettyPrint :: Lens' FilesWatch' Bool +fwPrettyPrint + = lens _fwPrettyPrint + (\ s a -> s{_fwPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +fwUserIp :: Lens' FilesWatch' (Maybe Text) +fwUserIp = lens _fwUserIp (\ s a -> s{_fwUserIp = a}) + +-- | Deprecated: Use files.update with modifiedDateBehavior=noChange, +-- updateViewedDate=true and an empty request body. +fwUpdateViewedDate :: Lens' FilesWatch' Bool +fwUpdateViewedDate + = lens _fwUpdateViewedDate + (\ s a -> s{_fwUpdateViewedDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +fwKey :: Lens' FilesWatch' (Maybe Text) +fwKey = lens _fwKey (\ s a -> s{_fwKey = a}) + +-- | This parameter is deprecated and has no function. +fwProjection :: Lens' FilesWatch' (Maybe Text) +fwProjection + = lens _fwProjection (\ s a -> s{_fwProjection = a}) + +-- | Whether the user is acknowledging the risk of downloading known malware +-- or other abusive files. +fwAcknowledgeAbuse :: Lens' FilesWatch' Bool +fwAcknowledgeAbuse + = lens _fwAcknowledgeAbuse + (\ s a -> s{_fwAcknowledgeAbuse = a}) + +-- | The ID for the file in question. +fwFileId :: Lens' FilesWatch' Text +fwFileId = lens _fwFileId (\ s a -> s{_fwFileId = a}) + +-- | OAuth 2.0 token for the current user. +fwOauthToken :: Lens' FilesWatch' (Maybe Text) +fwOauthToken + = lens _fwOauthToken (\ s a -> s{_fwOauthToken = a}) + +-- | Specifies the Revision ID that should be downloaded. Ignored unless +-- alt=media is specified. +fwRevisionId :: Lens' FilesWatch' (Maybe Text) +fwRevisionId + = lens _fwRevisionId (\ s a -> s{_fwRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +fwFields :: Lens' FilesWatch' (Maybe Text) +fwFields = lens _fwFields (\ s a -> s{_fwFields = a}) + +-- | Data format for the response. +fwAlt :: Lens' FilesWatch' Text +fwAlt = lens _fwAlt (\ s a -> s{_fwAlt = a}) + +instance GoogleRequest FilesWatch' where + type Rs FilesWatch' = Channel + request = requestWithRoute defReq driveURL + requestWithRoute r u FilesWatch{..} + = go _fwQuotaUser _fwPrettyPrint _fwUserIp + (Just _fwUpdateViewedDate) + _fwKey + _fwProjection + (Just _fwAcknowledgeAbuse) + _fwFileId + _fwOauthToken + _fwRevisionId + _fwFields + _fwAlt + where go + = clientWithRoute (Proxy :: Proxy FilesWatchAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Delete.hs new file mode 100644 index 000000000..2abed6d49 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Delete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Parents.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a parent from a file. +-- +-- /See:/ for @DriveParentsDelete@. +module Drive.Parents.Delete + ( + -- * REST Resource + ParentsDeleteAPI + + -- * Creating a Request + , parentsDelete + , ParentsDelete + + -- * Request Lenses + , pdQuotaUser + , pdPrettyPrint + , pdUserIp + , pdKey + , pdFileId + , pdOauthToken + , pdParentId + , pdFields + , pdAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveParentsDelete@ which the +-- 'ParentsDelete' request conforms to. +type ParentsDeleteAPI = + "files" :> + Capture "fileId" Text :> + "parents" :> + Capture "parentId" Text :> Delete '[JSON] () + +-- | Removes a parent from a file. +-- +-- /See:/ 'parentsDelete' smart constructor. +data ParentsDelete = ParentsDelete + { _pdQuotaUser :: !(Maybe Text) + , _pdPrettyPrint :: !Bool + , _pdUserIp :: !(Maybe Text) + , _pdKey :: !(Maybe Text) + , _pdFileId :: !Text + , _pdOauthToken :: !(Maybe Text) + , _pdParentId :: !Text + , _pdFields :: !(Maybe Text) + , _pdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdQuotaUser' +-- +-- * 'pdPrettyPrint' +-- +-- * 'pdUserIp' +-- +-- * 'pdKey' +-- +-- * 'pdFileId' +-- +-- * 'pdOauthToken' +-- +-- * 'pdParentId' +-- +-- * 'pdFields' +-- +-- * 'pdAlt' +parentsDelete + :: Text -- ^ 'fileId' + -> Text -- ^ 'parentId' + -> ParentsDelete +parentsDelete pPdFileId_ pPdParentId_ = + ParentsDelete + { _pdQuotaUser = Nothing + , _pdPrettyPrint = True + , _pdUserIp = Nothing + , _pdKey = Nothing + , _pdFileId = pPdFileId_ + , _pdOauthToken = Nothing + , _pdParentId = pPdParentId_ + , _pdFields = Nothing + , _pdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pdQuotaUser :: Lens' ParentsDelete' (Maybe Text) +pdQuotaUser + = lens _pdQuotaUser (\ s a -> s{_pdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pdPrettyPrint :: Lens' ParentsDelete' Bool +pdPrettyPrint + = lens _pdPrettyPrint + (\ s a -> s{_pdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pdUserIp :: Lens' ParentsDelete' (Maybe Text) +pdUserIp = lens _pdUserIp (\ s a -> s{_pdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pdKey :: Lens' ParentsDelete' (Maybe Text) +pdKey = lens _pdKey (\ s a -> s{_pdKey = a}) + +-- | The ID of the file. +pdFileId :: Lens' ParentsDelete' Text +pdFileId = lens _pdFileId (\ s a -> s{_pdFileId = a}) + +-- | OAuth 2.0 token for the current user. +pdOauthToken :: Lens' ParentsDelete' (Maybe Text) +pdOauthToken + = lens _pdOauthToken (\ s a -> s{_pdOauthToken = a}) + +-- | The ID of the parent. +pdParentId :: Lens' ParentsDelete' Text +pdParentId + = lens _pdParentId (\ s a -> s{_pdParentId = a}) + +-- | Selector specifying which fields to include in a partial response. +pdFields :: Lens' ParentsDelete' (Maybe Text) +pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) + +-- | Data format for the response. +pdAlt :: Lens' ParentsDelete' Text +pdAlt = lens _pdAlt (\ s a -> s{_pdAlt = a}) + +instance GoogleRequest ParentsDelete' where + type Rs ParentsDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u ParentsDelete{..} + = go _pdQuotaUser _pdPrettyPrint _pdUserIp _pdKey + _pdFileId + _pdOauthToken + _pdParentId + _pdFields + _pdAlt + where go + = clientWithRoute (Proxy :: Proxy ParentsDeleteAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Get.hs new file mode 100644 index 000000000..a1b30d56a --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Parents.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific parent reference. +-- +-- /See:/ for @DriveParentsGet@. +module Drive.Parents.Get + ( + -- * REST Resource + ParentsGetAPI + + -- * Creating a Request + , parentsGet + , ParentsGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgKey + , pgFileId + , pgOauthToken + , pgParentId + , pgFields + , pgAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveParentsGet@ which the +-- 'ParentsGet' request conforms to. +type ParentsGetAPI = + "files" :> + Capture "fileId" Text :> + "parents" :> + Capture "parentId" Text :> + Get '[JSON] ParentReference + +-- | Gets a specific parent reference. +-- +-- /See:/ 'parentsGet' smart constructor. +data ParentsGet = ParentsGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgFileId :: !Text + , _pgOauthToken :: !(Maybe Text) + , _pgParentId :: !Text + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgKey' +-- +-- * 'pgFileId' +-- +-- * 'pgOauthToken' +-- +-- * 'pgParentId' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +parentsGet + :: Text -- ^ 'fileId' + -> Text -- ^ 'parentId' + -> ParentsGet +parentsGet pPgFileId_ pPgParentId_ = + ParentsGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgKey = Nothing + , _pgFileId = pPgFileId_ + , _pgOauthToken = Nothing + , _pgParentId = pPgParentId_ + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' ParentsGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' ParentsGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' ParentsGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' ParentsGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | The ID of the file. +pgFileId :: Lens' ParentsGet' Text +pgFileId = lens _pgFileId (\ s a -> s{_pgFileId = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' ParentsGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | The ID of the parent. +pgParentId :: Lens' ParentsGet' Text +pgParentId + = lens _pgParentId (\ s a -> s{_pgParentId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' ParentsGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' ParentsGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest ParentsGet' where + type Rs ParentsGet' = ParentReference + request = requestWithRoute defReq driveURL + requestWithRoute r u ParentsGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgKey + _pgFileId + _pgOauthToken + _pgParentId + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy ParentsGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Insert.hs new file mode 100644 index 000000000..d89d46b34 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/Insert.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Parents.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a parent folder for a file. +-- +-- /See:/ for @DriveParentsInsert@. +module Drive.Parents.Insert + ( + -- * REST Resource + ParentsInsertAPI + + -- * Creating a Request + , parentsInsert + , ParentsInsert + + -- * Request Lenses + , piQuotaUser + , piPrettyPrint + , piUserIp + , piKey + , piFileId + , piOauthToken + , piFields + , piAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveParentsInsert@ which the +-- 'ParentsInsert' request conforms to. +type ParentsInsertAPI = + "files" :> + Capture "fileId" Text :> + "parents" :> Post '[JSON] ParentReference + +-- | Adds a parent folder for a file. +-- +-- /See:/ 'parentsInsert' smart constructor. +data ParentsInsert = ParentsInsert + { _piQuotaUser :: !(Maybe Text) + , _piPrettyPrint :: !Bool + , _piUserIp :: !(Maybe Text) + , _piKey :: !(Maybe Text) + , _piFileId :: !Text + , _piOauthToken :: !(Maybe Text) + , _piFields :: !(Maybe Text) + , _piAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piQuotaUser' +-- +-- * 'piPrettyPrint' +-- +-- * 'piUserIp' +-- +-- * 'piKey' +-- +-- * 'piFileId' +-- +-- * 'piOauthToken' +-- +-- * 'piFields' +-- +-- * 'piAlt' +parentsInsert + :: Text -- ^ 'fileId' + -> ParentsInsert +parentsInsert pPiFileId_ = + ParentsInsert + { _piQuotaUser = Nothing + , _piPrettyPrint = True + , _piUserIp = Nothing + , _piKey = Nothing + , _piFileId = pPiFileId_ + , _piOauthToken = Nothing + , _piFields = Nothing + , _piAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piQuotaUser :: Lens' ParentsInsert' (Maybe Text) +piQuotaUser + = lens _piQuotaUser (\ s a -> s{_piQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +piPrettyPrint :: Lens' ParentsInsert' Bool +piPrettyPrint + = lens _piPrettyPrint + (\ s a -> s{_piPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piUserIp :: Lens' ParentsInsert' (Maybe Text) +piUserIp = lens _piUserIp (\ s a -> s{_piUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piKey :: Lens' ParentsInsert' (Maybe Text) +piKey = lens _piKey (\ s a -> s{_piKey = a}) + +-- | The ID of the file. +piFileId :: Lens' ParentsInsert' Text +piFileId = lens _piFileId (\ s a -> s{_piFileId = a}) + +-- | OAuth 2.0 token for the current user. +piOauthToken :: Lens' ParentsInsert' (Maybe Text) +piOauthToken + = lens _piOauthToken (\ s a -> s{_piOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piFields :: Lens' ParentsInsert' (Maybe Text) +piFields = lens _piFields (\ s a -> s{_piFields = a}) + +-- | Data format for the response. +piAlt :: Lens' ParentsInsert' Text +piAlt = lens _piAlt (\ s a -> s{_piAlt = a}) + +instance GoogleRequest ParentsInsert' where + type Rs ParentsInsert' = ParentReference + request = requestWithRoute defReq driveURL + requestWithRoute r u ParentsInsert{..} + = go _piQuotaUser _piPrettyPrint _piUserIp _piKey + _piFileId + _piOauthToken + _piFields + _piAlt + where go + = clientWithRoute (Proxy :: Proxy ParentsInsertAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Parents/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/List.hs new file mode 100644 index 000000000..d35affba5 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Parents/List.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a file\'s parents. +-- +-- /See:/ for @DriveParentsList@. +module Drive.Parents.List + ( + -- * REST Resource + ParentsListAPI + + -- * Creating a Request + , parentsList + , ParentsList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plKey + , plFileId + , plOauthToken + , plFields + , plAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveParentsList@ which the +-- 'ParentsList' request conforms to. +type ParentsListAPI = + "files" :> + Capture "fileId" Text :> + "parents" :> Get '[JSON] ParentList + +-- | Lists a file\'s parents. +-- +-- /See:/ 'parentsList' smart constructor. +data ParentsList = ParentsList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plFileId :: !Text + , _plOauthToken :: !(Maybe Text) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plKey' +-- +-- * 'plFileId' +-- +-- * 'plOauthToken' +-- +-- * 'plFields' +-- +-- * 'plAlt' +parentsList + :: Text -- ^ 'fileId' + -> ParentsList +parentsList pPlFileId_ = + ParentsList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plKey = Nothing + , _plFileId = pPlFileId_ + , _plOauthToken = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' ParentsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' ParentsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' ParentsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' ParentsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | The ID of the file. +plFileId :: Lens' ParentsList' Text +plFileId = lens _plFileId (\ s a -> s{_plFileId = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' ParentsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' ParentsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' ParentsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest ParentsList' where + type Rs ParentsList' = ParentList + request = requestWithRoute defReq driveURL + requestWithRoute r u ParentsList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp _plKey + _plFileId + _plOauthToken + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy ParentsListAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Delete.hs new file mode 100644 index 000000000..ecaaffbdf --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a permission from a file. +-- +-- /See:/ for @DrivePermissionsDelete@. +module Drive.Permissions.Delete + ( + -- * REST Resource + PermissionsDeleteAPI + + -- * Creating a Request + , permissionsDelete + , PermissionsDelete + + -- * Request Lenses + , pddQuotaUser + , pddPrettyPrint + , pddUserIp + , pddKey + , pddFileId + , pddOauthToken + , pddPermissionId + , pddFields + , pddAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsDelete@ which the +-- 'PermissionsDelete' request conforms to. +type PermissionsDeleteAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> + Capture "permissionId" Text :> Delete '[JSON] () + +-- | Deletes a permission from a file. +-- +-- /See:/ 'permissionsDelete' smart constructor. +data PermissionsDelete = PermissionsDelete + { _pddQuotaUser :: !(Maybe Text) + , _pddPrettyPrint :: !Bool + , _pddUserIp :: !(Maybe Text) + , _pddKey :: !(Maybe Text) + , _pddFileId :: !Text + , _pddOauthToken :: !(Maybe Text) + , _pddPermissionId :: !Text + , _pddFields :: !(Maybe Text) + , _pddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pddQuotaUser' +-- +-- * 'pddPrettyPrint' +-- +-- * 'pddUserIp' +-- +-- * 'pddKey' +-- +-- * 'pddFileId' +-- +-- * 'pddOauthToken' +-- +-- * 'pddPermissionId' +-- +-- * 'pddFields' +-- +-- * 'pddAlt' +permissionsDelete + :: Text -- ^ 'fileId' + -> Text -- ^ 'permissionId' + -> PermissionsDelete +permissionsDelete pPddFileId_ pPddPermissionId_ = + PermissionsDelete + { _pddQuotaUser = Nothing + , _pddPrettyPrint = True + , _pddUserIp = Nothing + , _pddKey = Nothing + , _pddFileId = pPddFileId_ + , _pddOauthToken = Nothing + , _pddPermissionId = pPddPermissionId_ + , _pddFields = Nothing + , _pddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pddQuotaUser :: Lens' PermissionsDelete' (Maybe Text) +pddQuotaUser + = lens _pddQuotaUser (\ s a -> s{_pddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pddPrettyPrint :: Lens' PermissionsDelete' Bool +pddPrettyPrint + = lens _pddPrettyPrint + (\ s a -> s{_pddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pddUserIp :: Lens' PermissionsDelete' (Maybe Text) +pddUserIp + = lens _pddUserIp (\ s a -> s{_pddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pddKey :: Lens' PermissionsDelete' (Maybe Text) +pddKey = lens _pddKey (\ s a -> s{_pddKey = a}) + +-- | The ID for the file. +pddFileId :: Lens' PermissionsDelete' Text +pddFileId + = lens _pddFileId (\ s a -> s{_pddFileId = a}) + +-- | OAuth 2.0 token for the current user. +pddOauthToken :: Lens' PermissionsDelete' (Maybe Text) +pddOauthToken + = lens _pddOauthToken + (\ s a -> s{_pddOauthToken = a}) + +-- | The ID for the permission. +pddPermissionId :: Lens' PermissionsDelete' Text +pddPermissionId + = lens _pddPermissionId + (\ s a -> s{_pddPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +pddFields :: Lens' PermissionsDelete' (Maybe Text) +pddFields + = lens _pddFields (\ s a -> s{_pddFields = a}) + +-- | Data format for the response. +pddAlt :: Lens' PermissionsDelete' Text +pddAlt = lens _pddAlt (\ s a -> s{_pddAlt = a}) + +instance GoogleRequest PermissionsDelete' where + type Rs PermissionsDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsDelete{..} + = go _pddQuotaUser _pddPrettyPrint _pddUserIp _pddKey + _pddFileId + _pddOauthToken + _pddPermissionId + _pddFields + _pddAlt + where go + = clientWithRoute + (Proxy :: Proxy PermissionsDeleteAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Get.hs new file mode 100644 index 000000000..8dc388a82 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Get.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a permission by ID. +-- +-- /See:/ for @DrivePermissionsGet@. +module Drive.Permissions.Get + ( + -- * REST Resource + PermissionsGetAPI + + -- * Creating a Request + , permissionsGet + , PermissionsGet + + -- * Request Lenses + , pggQuotaUser + , pggPrettyPrint + , pggUserIp + , pggKey + , pggFileId + , pggOauthToken + , pggPermissionId + , pggFields + , pggAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsGet@ which the +-- 'PermissionsGet' request conforms to. +type PermissionsGetAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> + Capture "permissionId" Text :> Get '[JSON] Permission + +-- | Gets a permission by ID. +-- +-- /See:/ 'permissionsGet' smart constructor. +data PermissionsGet = PermissionsGet + { _pggQuotaUser :: !(Maybe Text) + , _pggPrettyPrint :: !Bool + , _pggUserIp :: !(Maybe Text) + , _pggKey :: !(Maybe Text) + , _pggFileId :: !Text + , _pggOauthToken :: !(Maybe Text) + , _pggPermissionId :: !Text + , _pggFields :: !(Maybe Text) + , _pggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pggQuotaUser' +-- +-- * 'pggPrettyPrint' +-- +-- * 'pggUserIp' +-- +-- * 'pggKey' +-- +-- * 'pggFileId' +-- +-- * 'pggOauthToken' +-- +-- * 'pggPermissionId' +-- +-- * 'pggFields' +-- +-- * 'pggAlt' +permissionsGet + :: Text -- ^ 'fileId' + -> Text -- ^ 'permissionId' + -> PermissionsGet +permissionsGet pPggFileId_ pPggPermissionId_ = + PermissionsGet + { _pggQuotaUser = Nothing + , _pggPrettyPrint = True + , _pggUserIp = Nothing + , _pggKey = Nothing + , _pggFileId = pPggFileId_ + , _pggOauthToken = Nothing + , _pggPermissionId = pPggPermissionId_ + , _pggFields = Nothing + , _pggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pggQuotaUser :: Lens' PermissionsGet' (Maybe Text) +pggQuotaUser + = lens _pggQuotaUser (\ s a -> s{_pggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pggPrettyPrint :: Lens' PermissionsGet' Bool +pggPrettyPrint + = lens _pggPrettyPrint + (\ s a -> s{_pggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pggUserIp :: Lens' PermissionsGet' (Maybe Text) +pggUserIp + = lens _pggUserIp (\ s a -> s{_pggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pggKey :: Lens' PermissionsGet' (Maybe Text) +pggKey = lens _pggKey (\ s a -> s{_pggKey = a}) + +-- | The ID for the file. +pggFileId :: Lens' PermissionsGet' Text +pggFileId + = lens _pggFileId (\ s a -> s{_pggFileId = a}) + +-- | OAuth 2.0 token for the current user. +pggOauthToken :: Lens' PermissionsGet' (Maybe Text) +pggOauthToken + = lens _pggOauthToken + (\ s a -> s{_pggOauthToken = a}) + +-- | The ID for the permission. +pggPermissionId :: Lens' PermissionsGet' Text +pggPermissionId + = lens _pggPermissionId + (\ s a -> s{_pggPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +pggFields :: Lens' PermissionsGet' (Maybe Text) +pggFields + = lens _pggFields (\ s a -> s{_pggFields = a}) + +-- | Data format for the response. +pggAlt :: Lens' PermissionsGet' Text +pggAlt = lens _pggAlt (\ s a -> s{_pggAlt = a}) + +instance GoogleRequest PermissionsGet' where + type Rs PermissionsGet' = Permission + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsGet{..} + = go _pggQuotaUser _pggPrettyPrint _pggUserIp _pggKey + _pggFileId + _pggOauthToken + _pggPermissionId + _pggFields + _pggAlt + where go + = clientWithRoute (Proxy :: Proxy PermissionsGetAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/GetIdForEmail.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/GetIdForEmail.hs new file mode 100644 index 000000000..f54af8b66 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/GetIdForEmail.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.GetIdForEmail +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the permission ID for an email address. +-- +-- /See:/ for @DrivePermissionsGetIdForEmail@. +module Drive.Permissions.GetIdForEmail + ( + -- * REST Resource + PermissionsGetIdForEmailAPI + + -- * Creating a Request + , permissionsGetIdForEmail + , PermissionsGetIdForEmail + + -- * Request Lenses + , pgifeEmail + , pgifeQuotaUser + , pgifePrettyPrint + , pgifeUserIp + , pgifeKey + , pgifeOauthToken + , pgifeFields + , pgifeAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsGetIdForEmail@ which the +-- 'PermissionsGetIdForEmail' request conforms to. +type PermissionsGetIdForEmailAPI = + "permissionIds" :> + Capture "email" Text :> Get '[JSON] PermissionId + +-- | Returns the permission ID for an email address. +-- +-- /See:/ 'permissionsGetIdForEmail' smart constructor. +data PermissionsGetIdForEmail = PermissionsGetIdForEmail + { _pgifeEmail :: !Text + , _pgifeQuotaUser :: !(Maybe Text) + , _pgifePrettyPrint :: !Bool + , _pgifeUserIp :: !(Maybe Text) + , _pgifeKey :: !(Maybe Text) + , _pgifeOauthToken :: !(Maybe Text) + , _pgifeFields :: !(Maybe Text) + , _pgifeAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsGetIdForEmail'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgifeEmail' +-- +-- * 'pgifeQuotaUser' +-- +-- * 'pgifePrettyPrint' +-- +-- * 'pgifeUserIp' +-- +-- * 'pgifeKey' +-- +-- * 'pgifeOauthToken' +-- +-- * 'pgifeFields' +-- +-- * 'pgifeAlt' +permissionsGetIdForEmail + :: Text -- ^ 'email' + -> PermissionsGetIdForEmail +permissionsGetIdForEmail pPgifeEmail_ = + PermissionsGetIdForEmail + { _pgifeEmail = pPgifeEmail_ + , _pgifeQuotaUser = Nothing + , _pgifePrettyPrint = True + , _pgifeUserIp = Nothing + , _pgifeKey = Nothing + , _pgifeOauthToken = Nothing + , _pgifeFields = Nothing + , _pgifeAlt = "json" + } + +-- | The email address for which to return a permission ID +pgifeEmail :: Lens' PermissionsGetIdForEmail' Text +pgifeEmail + = lens _pgifeEmail (\ s a -> s{_pgifeEmail = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgifeQuotaUser :: Lens' PermissionsGetIdForEmail' (Maybe Text) +pgifeQuotaUser + = lens _pgifeQuotaUser + (\ s a -> s{_pgifeQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgifePrettyPrint :: Lens' PermissionsGetIdForEmail' Bool +pgifePrettyPrint + = lens _pgifePrettyPrint + (\ s a -> s{_pgifePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgifeUserIp :: Lens' PermissionsGetIdForEmail' (Maybe Text) +pgifeUserIp + = lens _pgifeUserIp (\ s a -> s{_pgifeUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgifeKey :: Lens' PermissionsGetIdForEmail' (Maybe Text) +pgifeKey = lens _pgifeKey (\ s a -> s{_pgifeKey = a}) + +-- | OAuth 2.0 token for the current user. +pgifeOauthToken :: Lens' PermissionsGetIdForEmail' (Maybe Text) +pgifeOauthToken + = lens _pgifeOauthToken + (\ s a -> s{_pgifeOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgifeFields :: Lens' PermissionsGetIdForEmail' (Maybe Text) +pgifeFields + = lens _pgifeFields (\ s a -> s{_pgifeFields = a}) + +-- | Data format for the response. +pgifeAlt :: Lens' PermissionsGetIdForEmail' Text +pgifeAlt = lens _pgifeAlt (\ s a -> s{_pgifeAlt = a}) + +instance GoogleRequest PermissionsGetIdForEmail' + where + type Rs PermissionsGetIdForEmail' = PermissionId + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsGetIdForEmail{..} + = go _pgifeEmail _pgifeQuotaUser _pgifePrettyPrint + _pgifeUserIp + _pgifeKey + _pgifeOauthToken + _pgifeFields + _pgifeAlt + where go + = clientWithRoute + (Proxy :: Proxy PermissionsGetIdForEmailAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Insert.hs new file mode 100644 index 000000000..0ca09abc3 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Insert.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a permission for a file. +-- +-- /See:/ for @DrivePermissionsInsert@. +module Drive.Permissions.Insert + ( + -- * REST Resource + PermissionsInsertAPI + + -- * Creating a Request + , permissionsInsert + , PermissionsInsert + + -- * Request Lenses + , perQuotaUser + , perPrettyPrint + , perUserIp + , perKey + , perEmailMessage + , perFileId + , perOauthToken + , perSendNotificationEmails + , perFields + , perAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsInsert@ which the +-- 'PermissionsInsert' request conforms to. +type PermissionsInsertAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> + QueryParam "emailMessage" Text :> + QueryParam "sendNotificationEmails" Bool :> + Post '[JSON] Permission + +-- | Inserts a permission for a file. +-- +-- /See:/ 'permissionsInsert' smart constructor. +data PermissionsInsert = PermissionsInsert + { _perQuotaUser :: !(Maybe Text) + , _perPrettyPrint :: !Bool + , _perUserIp :: !(Maybe Text) + , _perKey :: !(Maybe Text) + , _perEmailMessage :: !(Maybe Text) + , _perFileId :: !Text + , _perOauthToken :: !(Maybe Text) + , _perSendNotificationEmails :: !Bool + , _perFields :: !(Maybe Text) + , _perAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'perQuotaUser' +-- +-- * 'perPrettyPrint' +-- +-- * 'perUserIp' +-- +-- * 'perKey' +-- +-- * 'perEmailMessage' +-- +-- * 'perFileId' +-- +-- * 'perOauthToken' +-- +-- * 'perSendNotificationEmails' +-- +-- * 'perFields' +-- +-- * 'perAlt' +permissionsInsert + :: Text -- ^ 'fileId' + -> PermissionsInsert +permissionsInsert pPerFileId_ = + PermissionsInsert + { _perQuotaUser = Nothing + , _perPrettyPrint = True + , _perUserIp = Nothing + , _perKey = Nothing + , _perEmailMessage = Nothing + , _perFileId = pPerFileId_ + , _perOauthToken = Nothing + , _perSendNotificationEmails = True + , _perFields = Nothing + , _perAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +perQuotaUser :: Lens' PermissionsInsert' (Maybe Text) +perQuotaUser + = lens _perQuotaUser (\ s a -> s{_perQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +perPrettyPrint :: Lens' PermissionsInsert' Bool +perPrettyPrint + = lens _perPrettyPrint + (\ s a -> s{_perPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +perUserIp :: Lens' PermissionsInsert' (Maybe Text) +perUserIp + = lens _perUserIp (\ s a -> s{_perUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +perKey :: Lens' PermissionsInsert' (Maybe Text) +perKey = lens _perKey (\ s a -> s{_perKey = a}) + +-- | A custom message to include in notification emails. +perEmailMessage :: Lens' PermissionsInsert' (Maybe Text) +perEmailMessage + = lens _perEmailMessage + (\ s a -> s{_perEmailMessage = a}) + +-- | The ID for the file. +perFileId :: Lens' PermissionsInsert' Text +perFileId + = lens _perFileId (\ s a -> s{_perFileId = a}) + +-- | OAuth 2.0 token for the current user. +perOauthToken :: Lens' PermissionsInsert' (Maybe Text) +perOauthToken + = lens _perOauthToken + (\ s a -> s{_perOauthToken = a}) + +-- | Whether to send notification emails when sharing to users or groups. +-- This parameter is ignored and an email is sent if the role is owner. +perSendNotificationEmails :: Lens' PermissionsInsert' Bool +perSendNotificationEmails + = lens _perSendNotificationEmails + (\ s a -> s{_perSendNotificationEmails = a}) + +-- | Selector specifying which fields to include in a partial response. +perFields :: Lens' PermissionsInsert' (Maybe Text) +perFields + = lens _perFields (\ s a -> s{_perFields = a}) + +-- | Data format for the response. +perAlt :: Lens' PermissionsInsert' Text +perAlt = lens _perAlt (\ s a -> s{_perAlt = a}) + +instance GoogleRequest PermissionsInsert' where + type Rs PermissionsInsert' = Permission + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsInsert{..} + = go _perQuotaUser _perPrettyPrint _perUserIp _perKey + _perEmailMessage + _perFileId + _perOauthToken + (Just _perSendNotificationEmails) + _perFields + _perAlt + where go + = clientWithRoute + (Proxy :: Proxy PermissionsInsertAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/List.hs new file mode 100644 index 000000000..9629cd9b7 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/List.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a file\'s permissions. +-- +-- /See:/ for @DrivePermissionsList@. +module Drive.Permissions.List + ( + -- * REST Resource + PermissionsListAPI + + -- * Creating a Request + , permissionsList + , PermissionsList + + -- * Request Lenses + , pllQuotaUser + , pllPrettyPrint + , pllUserIp + , pllKey + , pllFileId + , pllOauthToken + , pllFields + , pllAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsList@ which the +-- 'PermissionsList' request conforms to. +type PermissionsListAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> Get '[JSON] PermissionList + +-- | Lists a file\'s permissions. +-- +-- /See:/ 'permissionsList' smart constructor. +data PermissionsList = PermissionsList + { _pllQuotaUser :: !(Maybe Text) + , _pllPrettyPrint :: !Bool + , _pllUserIp :: !(Maybe Text) + , _pllKey :: !(Maybe Text) + , _pllFileId :: !Text + , _pllOauthToken :: !(Maybe Text) + , _pllFields :: !(Maybe Text) + , _pllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllQuotaUser' +-- +-- * 'pllPrettyPrint' +-- +-- * 'pllUserIp' +-- +-- * 'pllKey' +-- +-- * 'pllFileId' +-- +-- * 'pllOauthToken' +-- +-- * 'pllFields' +-- +-- * 'pllAlt' +permissionsList + :: Text -- ^ 'fileId' + -> PermissionsList +permissionsList pPllFileId_ = + PermissionsList + { _pllQuotaUser = Nothing + , _pllPrettyPrint = True + , _pllUserIp = Nothing + , _pllKey = Nothing + , _pllFileId = pPllFileId_ + , _pllOauthToken = Nothing + , _pllFields = Nothing + , _pllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pllQuotaUser :: Lens' PermissionsList' (Maybe Text) +pllQuotaUser + = lens _pllQuotaUser (\ s a -> s{_pllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pllPrettyPrint :: Lens' PermissionsList' Bool +pllPrettyPrint + = lens _pllPrettyPrint + (\ s a -> s{_pllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pllUserIp :: Lens' PermissionsList' (Maybe Text) +pllUserIp + = lens _pllUserIp (\ s a -> s{_pllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pllKey :: Lens' PermissionsList' (Maybe Text) +pllKey = lens _pllKey (\ s a -> s{_pllKey = a}) + +-- | The ID for the file. +pllFileId :: Lens' PermissionsList' Text +pllFileId + = lens _pllFileId (\ s a -> s{_pllFileId = a}) + +-- | OAuth 2.0 token for the current user. +pllOauthToken :: Lens' PermissionsList' (Maybe Text) +pllOauthToken + = lens _pllOauthToken + (\ s a -> s{_pllOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pllFields :: Lens' PermissionsList' (Maybe Text) +pllFields + = lens _pllFields (\ s a -> s{_pllFields = a}) + +-- | Data format for the response. +pllAlt :: Lens' PermissionsList' Text +pllAlt = lens _pllAlt (\ s a -> s{_pllAlt = a}) + +instance GoogleRequest PermissionsList' where + type Rs PermissionsList' = PermissionList + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsList{..} + = go _pllQuotaUser _pllPrettyPrint _pllUserIp _pllKey + _pllFileId + _pllOauthToken + _pllFields + _pllAlt + where go + = clientWithRoute (Proxy :: Proxy PermissionsListAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Patch.hs new file mode 100644 index 000000000..f877e83f5 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Patch.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a permission using patch semantics. +-- +-- /See:/ for @DrivePermissionsPatch@. +module Drive.Permissions.Patch + ( + -- * REST Resource + PermissionsPatchAPI + + -- * Creating a Request + , permissionsPatch + , PermissionsPatch + + -- * Request Lenses + , ppQuotaUser + , ppPrettyPrint + , ppUserIp + , ppKey + , ppTransferOwnership + , ppFileId + , ppOauthToken + , ppPermissionId + , ppFields + , ppAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsPatch@ which the +-- 'PermissionsPatch' request conforms to. +type PermissionsPatchAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> + Capture "permissionId" Text :> + QueryParam "transferOwnership" Bool :> + Patch '[JSON] Permission + +-- | Updates a permission using patch semantics. +-- +-- /See:/ 'permissionsPatch' smart constructor. +data PermissionsPatch = PermissionsPatch + { _ppQuotaUser :: !(Maybe Text) + , _ppPrettyPrint :: !Bool + , _ppUserIp :: !(Maybe Text) + , _ppKey :: !(Maybe Text) + , _ppTransferOwnership :: !Bool + , _ppFileId :: !Text + , _ppOauthToken :: !(Maybe Text) + , _ppPermissionId :: !Text + , _ppFields :: !(Maybe Text) + , _ppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppQuotaUser' +-- +-- * 'ppPrettyPrint' +-- +-- * 'ppUserIp' +-- +-- * 'ppKey' +-- +-- * 'ppTransferOwnership' +-- +-- * 'ppFileId' +-- +-- * 'ppOauthToken' +-- +-- * 'ppPermissionId' +-- +-- * 'ppFields' +-- +-- * 'ppAlt' +permissionsPatch + :: Text -- ^ 'fileId' + -> Text -- ^ 'permissionId' + -> PermissionsPatch +permissionsPatch pPpFileId_ pPpPermissionId_ = + PermissionsPatch + { _ppQuotaUser = Nothing + , _ppPrettyPrint = True + , _ppUserIp = Nothing + , _ppKey = Nothing + , _ppTransferOwnership = False + , _ppFileId = pPpFileId_ + , _ppOauthToken = Nothing + , _ppPermissionId = pPpPermissionId_ + , _ppFields = Nothing + , _ppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ppQuotaUser :: Lens' PermissionsPatch' (Maybe Text) +ppQuotaUser + = lens _ppQuotaUser (\ s a -> s{_ppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ppPrettyPrint :: Lens' PermissionsPatch' Bool +ppPrettyPrint + = lens _ppPrettyPrint + (\ s a -> s{_ppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ppUserIp :: Lens' PermissionsPatch' (Maybe Text) +ppUserIp = lens _ppUserIp (\ s a -> s{_ppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ppKey :: Lens' PermissionsPatch' (Maybe Text) +ppKey = lens _ppKey (\ s a -> s{_ppKey = a}) + +-- | Whether changing a role to \'owner\' downgrades the current owners to +-- writers. Does nothing if the specified role is not \'owner\'. +ppTransferOwnership :: Lens' PermissionsPatch' Bool +ppTransferOwnership + = lens _ppTransferOwnership + (\ s a -> s{_ppTransferOwnership = a}) + +-- | The ID for the file. +ppFileId :: Lens' PermissionsPatch' Text +ppFileId = lens _ppFileId (\ s a -> s{_ppFileId = a}) + +-- | OAuth 2.0 token for the current user. +ppOauthToken :: Lens' PermissionsPatch' (Maybe Text) +ppOauthToken + = lens _ppOauthToken (\ s a -> s{_ppOauthToken = a}) + +-- | The ID for the permission. +ppPermissionId :: Lens' PermissionsPatch' Text +ppPermissionId + = lens _ppPermissionId + (\ s a -> s{_ppPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +ppFields :: Lens' PermissionsPatch' (Maybe Text) +ppFields = lens _ppFields (\ s a -> s{_ppFields = a}) + +-- | Data format for the response. +ppAlt :: Lens' PermissionsPatch' Text +ppAlt = lens _ppAlt (\ s a -> s{_ppAlt = a}) + +instance GoogleRequest PermissionsPatch' where + type Rs PermissionsPatch' = Permission + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsPatch{..} + = go _ppQuotaUser _ppPrettyPrint _ppUserIp _ppKey + (Just _ppTransferOwnership) + _ppFileId + _ppOauthToken + _ppPermissionId + _ppFields + _ppAlt + where go + = clientWithRoute + (Proxy :: Proxy PermissionsPatchAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs new file mode 100644 index 000000000..410702edc --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Permissions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a permission. +-- +-- /See:/ for @DrivePermissionsUpdate@. +module Drive.Permissions.Update + ( + -- * REST Resource + PermissionsUpdateAPI + + -- * Creating a Request + , permissionsUpdate + , PermissionsUpdate + + -- * Request Lenses + , puQuotaUser + , puPrettyPrint + , puUserIp + , puKey + , puTransferOwnership + , puFileId + , puOauthToken + , puPermissionId + , puFields + , puAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePermissionsUpdate@ which the +-- 'PermissionsUpdate' request conforms to. +type PermissionsUpdateAPI = + "files" :> + Capture "fileId" Text :> + "permissions" :> + Capture "permissionId" Text :> + QueryParam "transferOwnership" Bool :> + Put '[JSON] Permission + +-- | Updates a permission. +-- +-- /See:/ 'permissionsUpdate' smart constructor. +data PermissionsUpdate = PermissionsUpdate + { _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puKey :: !(Maybe Text) + , _puTransferOwnership :: !Bool + , _puFileId :: !Text + , _puOauthToken :: !(Maybe Text) + , _puPermissionId :: !Text + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puKey' +-- +-- * 'puTransferOwnership' +-- +-- * 'puFileId' +-- +-- * 'puOauthToken' +-- +-- * 'puPermissionId' +-- +-- * 'puFields' +-- +-- * 'puAlt' +permissionsUpdate + :: Text -- ^ 'fileId' + -> Text -- ^ 'permissionId' + -> PermissionsUpdate +permissionsUpdate pPuFileId_ pPuPermissionId_ = + PermissionsUpdate + { _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puKey = Nothing + , _puTransferOwnership = False + , _puFileId = pPuFileId_ + , _puOauthToken = Nothing + , _puPermissionId = pPuPermissionId_ + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PermissionsUpdate' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PermissionsUpdate' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PermissionsUpdate' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PermissionsUpdate' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | Whether changing a role to \'owner\' downgrades the current owners to +-- writers. Does nothing if the specified role is not \'owner\'. +puTransferOwnership :: Lens' PermissionsUpdate' Bool +puTransferOwnership + = lens _puTransferOwnership + (\ s a -> s{_puTransferOwnership = a}) + +-- | The ID for the file. +puFileId :: Lens' PermissionsUpdate' Text +puFileId = lens _puFileId (\ s a -> s{_puFileId = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PermissionsUpdate' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | The ID for the permission. +puPermissionId :: Lens' PermissionsUpdate' Text +puPermissionId + = lens _puPermissionId + (\ s a -> s{_puPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PermissionsUpdate' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PermissionsUpdate' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PermissionsUpdate' where + type Rs PermissionsUpdate' = Permission + request = requestWithRoute defReq driveURL + requestWithRoute r u PermissionsUpdate{..} + = go _puQuotaUser _puPrettyPrint _puUserIp _puKey + (Just _puTransferOwnership) + _puFileId + _puOauthToken + _puPermissionId + _puFields + _puAlt + where go + = clientWithRoute + (Proxy :: Proxy PermissionsUpdateAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Delete.hs new file mode 100644 index 000000000..b8d732571 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a property. +-- +-- /See:/ for @DrivePropertiesDelete@. +module Drive.Properties.Delete + ( + -- * REST Resource + PropertiesDeleteAPI + + -- * Creating a Request + , propertiesDelete + , PropertiesDelete + + -- * Request Lenses + , pd1QuotaUser + , pd1PrettyPrint + , pd1PropertyKey + , pd1UserIp + , pd1Visibility + , pd1Key + , pd1FileId + , pd1OauthToken + , pd1Fields + , pd1Alt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesDelete@ which the +-- 'PropertiesDelete' request conforms to. +type PropertiesDeleteAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> + Capture "propertyKey" Text :> + QueryParam "visibility" Text :> Delete '[JSON] () + +-- | Deletes a property. +-- +-- /See:/ 'propertiesDelete' smart constructor. +data PropertiesDelete = PropertiesDelete + { _pd1QuotaUser :: !(Maybe Text) + , _pd1PrettyPrint :: !Bool + , _pd1PropertyKey :: !Text + , _pd1UserIp :: !(Maybe Text) + , _pd1Visibility :: !Text + , _pd1Key :: !(Maybe Text) + , _pd1FileId :: !Text + , _pd1OauthToken :: !(Maybe Text) + , _pd1Fields :: !(Maybe Text) + , _pd1Alt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pd1QuotaUser' +-- +-- * 'pd1PrettyPrint' +-- +-- * 'pd1PropertyKey' +-- +-- * 'pd1UserIp' +-- +-- * 'pd1Visibility' +-- +-- * 'pd1Key' +-- +-- * 'pd1FileId' +-- +-- * 'pd1OauthToken' +-- +-- * 'pd1Fields' +-- +-- * 'pd1Alt' +propertiesDelete + :: Text -- ^ 'propertyKey' + -> Text -- ^ 'fileId' + -> PropertiesDelete +propertiesDelete pPd1PropertyKey_ pPd1FileId_ = + PropertiesDelete + { _pd1QuotaUser = Nothing + , _pd1PrettyPrint = True + , _pd1PropertyKey = pPd1PropertyKey_ + , _pd1UserIp = Nothing + , _pd1Visibility = "private" + , _pd1Key = Nothing + , _pd1FileId = pPd1FileId_ + , _pd1OauthToken = Nothing + , _pd1Fields = Nothing + , _pd1Alt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pd1QuotaUser :: Lens' PropertiesDelete' (Maybe Text) +pd1QuotaUser + = lens _pd1QuotaUser (\ s a -> s{_pd1QuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pd1PrettyPrint :: Lens' PropertiesDelete' Bool +pd1PrettyPrint + = lens _pd1PrettyPrint + (\ s a -> s{_pd1PrettyPrint = a}) + +-- | The key of the property. +pd1PropertyKey :: Lens' PropertiesDelete' Text +pd1PropertyKey + = lens _pd1PropertyKey + (\ s a -> s{_pd1PropertyKey = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pd1UserIp :: Lens' PropertiesDelete' (Maybe Text) +pd1UserIp + = lens _pd1UserIp (\ s a -> s{_pd1UserIp = a}) + +-- | The visibility of the property. +pd1Visibility :: Lens' PropertiesDelete' Text +pd1Visibility + = lens _pd1Visibility + (\ s a -> s{_pd1Visibility = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pd1Key :: Lens' PropertiesDelete' (Maybe Text) +pd1Key = lens _pd1Key (\ s a -> s{_pd1Key = a}) + +-- | The ID of the file. +pd1FileId :: Lens' PropertiesDelete' Text +pd1FileId + = lens _pd1FileId (\ s a -> s{_pd1FileId = a}) + +-- | OAuth 2.0 token for the current user. +pd1OauthToken :: Lens' PropertiesDelete' (Maybe Text) +pd1OauthToken + = lens _pd1OauthToken + (\ s a -> s{_pd1OauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pd1Fields :: Lens' PropertiesDelete' (Maybe Text) +pd1Fields + = lens _pd1Fields (\ s a -> s{_pd1Fields = a}) + +-- | Data format for the response. +pd1Alt :: Lens' PropertiesDelete' Text +pd1Alt = lens _pd1Alt (\ s a -> s{_pd1Alt = a}) + +instance GoogleRequest PropertiesDelete' where + type Rs PropertiesDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesDelete{..} + = go _pd1QuotaUser _pd1PrettyPrint _pd1PropertyKey + _pd1UserIp + (Just _pd1Visibility) + _pd1Key + _pd1FileId + _pd1OauthToken + _pd1Fields + _pd1Alt + where go + = clientWithRoute + (Proxy :: Proxy PropertiesDeleteAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Get.hs new file mode 100644 index 000000000..2f8034475 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a property by its key. +-- +-- /See:/ for @DrivePropertiesGet@. +module Drive.Properties.Get + ( + -- * REST Resource + PropertiesGetAPI + + -- * Creating a Request + , propertiesGet + , PropertiesGet + + -- * Request Lenses + , pg1QuotaUser + , pg1PrettyPrint + , pg1PropertyKey + , pg1UserIp + , pg1Visibility + , pg1Key + , pg1FileId + , pg1OauthToken + , pg1Fields + , pg1Alt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesGet@ which the +-- 'PropertiesGet' request conforms to. +type PropertiesGetAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> + Capture "propertyKey" Text :> + QueryParam "visibility" Text :> Get '[JSON] Property + +-- | Gets a property by its key. +-- +-- /See:/ 'propertiesGet' smart constructor. +data PropertiesGet = PropertiesGet + { _pg1QuotaUser :: !(Maybe Text) + , _pg1PrettyPrint :: !Bool + , _pg1PropertyKey :: !Text + , _pg1UserIp :: !(Maybe Text) + , _pg1Visibility :: !Text + , _pg1Key :: !(Maybe Text) + , _pg1FileId :: !Text + , _pg1OauthToken :: !(Maybe Text) + , _pg1Fields :: !(Maybe Text) + , _pg1Alt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pg1QuotaUser' +-- +-- * 'pg1PrettyPrint' +-- +-- * 'pg1PropertyKey' +-- +-- * 'pg1UserIp' +-- +-- * 'pg1Visibility' +-- +-- * 'pg1Key' +-- +-- * 'pg1FileId' +-- +-- * 'pg1OauthToken' +-- +-- * 'pg1Fields' +-- +-- * 'pg1Alt' +propertiesGet + :: Text -- ^ 'propertyKey' + -> Text -- ^ 'fileId' + -> PropertiesGet +propertiesGet pPg1PropertyKey_ pPg1FileId_ = + PropertiesGet + { _pg1QuotaUser = Nothing + , _pg1PrettyPrint = True + , _pg1PropertyKey = pPg1PropertyKey_ + , _pg1UserIp = Nothing + , _pg1Visibility = "private" + , _pg1Key = Nothing + , _pg1FileId = pPg1FileId_ + , _pg1OauthToken = Nothing + , _pg1Fields = Nothing + , _pg1Alt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pg1QuotaUser :: Lens' PropertiesGet' (Maybe Text) +pg1QuotaUser + = lens _pg1QuotaUser (\ s a -> s{_pg1QuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pg1PrettyPrint :: Lens' PropertiesGet' Bool +pg1PrettyPrint + = lens _pg1PrettyPrint + (\ s a -> s{_pg1PrettyPrint = a}) + +-- | The key of the property. +pg1PropertyKey :: Lens' PropertiesGet' Text +pg1PropertyKey + = lens _pg1PropertyKey + (\ s a -> s{_pg1PropertyKey = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pg1UserIp :: Lens' PropertiesGet' (Maybe Text) +pg1UserIp + = lens _pg1UserIp (\ s a -> s{_pg1UserIp = a}) + +-- | The visibility of the property. +pg1Visibility :: Lens' PropertiesGet' Text +pg1Visibility + = lens _pg1Visibility + (\ s a -> s{_pg1Visibility = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pg1Key :: Lens' PropertiesGet' (Maybe Text) +pg1Key = lens _pg1Key (\ s a -> s{_pg1Key = a}) + +-- | The ID of the file. +pg1FileId :: Lens' PropertiesGet' Text +pg1FileId + = lens _pg1FileId (\ s a -> s{_pg1FileId = a}) + +-- | OAuth 2.0 token for the current user. +pg1OauthToken :: Lens' PropertiesGet' (Maybe Text) +pg1OauthToken + = lens _pg1OauthToken + (\ s a -> s{_pg1OauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pg1Fields :: Lens' PropertiesGet' (Maybe Text) +pg1Fields + = lens _pg1Fields (\ s a -> s{_pg1Fields = a}) + +-- | Data format for the response. +pg1Alt :: Lens' PropertiesGet' Text +pg1Alt = lens _pg1Alt (\ s a -> s{_pg1Alt = a}) + +instance GoogleRequest PropertiesGet' where + type Rs PropertiesGet' = Property + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesGet{..} + = go _pg1QuotaUser _pg1PrettyPrint _pg1PropertyKey + _pg1UserIp + (Just _pg1Visibility) + _pg1Key + _pg1FileId + _pg1OauthToken + _pg1Fields + _pg1Alt + where go + = clientWithRoute (Proxy :: Proxy PropertiesGetAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Insert.hs new file mode 100644 index 000000000..f6df1ea63 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Insert.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a property to a file. +-- +-- /See:/ for @DrivePropertiesInsert@. +module Drive.Properties.Insert + ( + -- * REST Resource + PropertiesInsertAPI + + -- * Creating a Request + , propertiesInsert + , PropertiesInsert + + -- * Request Lenses + , proQuotaUser + , proPrettyPrint + , proUserIp + , proKey + , proFileId + , proOauthToken + , proFields + , proAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesInsert@ which the +-- 'PropertiesInsert' request conforms to. +type PropertiesInsertAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> Post '[JSON] Property + +-- | Adds a property to a file. +-- +-- /See:/ 'propertiesInsert' smart constructor. +data PropertiesInsert = PropertiesInsert + { _proQuotaUser :: !(Maybe Text) + , _proPrettyPrint :: !Bool + , _proUserIp :: !(Maybe Text) + , _proKey :: !(Maybe Text) + , _proFileId :: !Text + , _proOauthToken :: !(Maybe Text) + , _proFields :: !(Maybe Text) + , _proAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proQuotaUser' +-- +-- * 'proPrettyPrint' +-- +-- * 'proUserIp' +-- +-- * 'proKey' +-- +-- * 'proFileId' +-- +-- * 'proOauthToken' +-- +-- * 'proFields' +-- +-- * 'proAlt' +propertiesInsert + :: Text -- ^ 'fileId' + -> PropertiesInsert +propertiesInsert pProFileId_ = + PropertiesInsert + { _proQuotaUser = Nothing + , _proPrettyPrint = True + , _proUserIp = Nothing + , _proKey = Nothing + , _proFileId = pProFileId_ + , _proOauthToken = Nothing + , _proFields = Nothing + , _proAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +proQuotaUser :: Lens' PropertiesInsert' (Maybe Text) +proQuotaUser + = lens _proQuotaUser (\ s a -> s{_proQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +proPrettyPrint :: Lens' PropertiesInsert' Bool +proPrettyPrint + = lens _proPrettyPrint + (\ s a -> s{_proPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +proUserIp :: Lens' PropertiesInsert' (Maybe Text) +proUserIp + = lens _proUserIp (\ s a -> s{_proUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +proKey :: Lens' PropertiesInsert' (Maybe Text) +proKey = lens _proKey (\ s a -> s{_proKey = a}) + +-- | The ID of the file. +proFileId :: Lens' PropertiesInsert' Text +proFileId + = lens _proFileId (\ s a -> s{_proFileId = a}) + +-- | OAuth 2.0 token for the current user. +proOauthToken :: Lens' PropertiesInsert' (Maybe Text) +proOauthToken + = lens _proOauthToken + (\ s a -> s{_proOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +proFields :: Lens' PropertiesInsert' (Maybe Text) +proFields + = lens _proFields (\ s a -> s{_proFields = a}) + +-- | Data format for the response. +proAlt :: Lens' PropertiesInsert' Text +proAlt = lens _proAlt (\ s a -> s{_proAlt = a}) + +instance GoogleRequest PropertiesInsert' where + type Rs PropertiesInsert' = Property + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesInsert{..} + = go _proQuotaUser _proPrettyPrint _proUserIp _proKey + _proFileId + _proOauthToken + _proFields + _proAlt + where go + = clientWithRoute + (Proxy :: Proxy PropertiesInsertAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/List.hs new file mode 100644 index 000000000..98d757469 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/List.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a file\'s properties. +-- +-- /See:/ for @DrivePropertiesList@. +module Drive.Properties.List + ( + -- * REST Resource + PropertiesListAPI + + -- * Creating a Request + , propertiesList + , PropertiesList + + -- * Request Lenses + , prorQuotaUser + , prorPrettyPrint + , prorUserIp + , prorKey + , prorFileId + , prorOauthToken + , prorFields + , prorAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesList@ which the +-- 'PropertiesList' request conforms to. +type PropertiesListAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> Get '[JSON] PropertyList + +-- | Lists a file\'s properties. +-- +-- /See:/ 'propertiesList' smart constructor. +data PropertiesList = PropertiesList + { _prorQuotaUser :: !(Maybe Text) + , _prorPrettyPrint :: !Bool + , _prorUserIp :: !(Maybe Text) + , _prorKey :: !(Maybe Text) + , _prorFileId :: !Text + , _prorOauthToken :: !(Maybe Text) + , _prorFields :: !(Maybe Text) + , _prorAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prorQuotaUser' +-- +-- * 'prorPrettyPrint' +-- +-- * 'prorUserIp' +-- +-- * 'prorKey' +-- +-- * 'prorFileId' +-- +-- * 'prorOauthToken' +-- +-- * 'prorFields' +-- +-- * 'prorAlt' +propertiesList + :: Text -- ^ 'fileId' + -> PropertiesList +propertiesList pProrFileId_ = + PropertiesList + { _prorQuotaUser = Nothing + , _prorPrettyPrint = True + , _prorUserIp = Nothing + , _prorKey = Nothing + , _prorFileId = pProrFileId_ + , _prorOauthToken = Nothing + , _prorFields = Nothing + , _prorAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prorQuotaUser :: Lens' PropertiesList' (Maybe Text) +prorQuotaUser + = lens _prorQuotaUser + (\ s a -> s{_prorQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prorPrettyPrint :: Lens' PropertiesList' Bool +prorPrettyPrint + = lens _prorPrettyPrint + (\ s a -> s{_prorPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prorUserIp :: Lens' PropertiesList' (Maybe Text) +prorUserIp + = lens _prorUserIp (\ s a -> s{_prorUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prorKey :: Lens' PropertiesList' (Maybe Text) +prorKey = lens _prorKey (\ s a -> s{_prorKey = a}) + +-- | The ID of the file. +prorFileId :: Lens' PropertiesList' Text +prorFileId + = lens _prorFileId (\ s a -> s{_prorFileId = a}) + +-- | OAuth 2.0 token for the current user. +prorOauthToken :: Lens' PropertiesList' (Maybe Text) +prorOauthToken + = lens _prorOauthToken + (\ s a -> s{_prorOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prorFields :: Lens' PropertiesList' (Maybe Text) +prorFields + = lens _prorFields (\ s a -> s{_prorFields = a}) + +-- | Data format for the response. +prorAlt :: Lens' PropertiesList' Text +prorAlt = lens _prorAlt (\ s a -> s{_prorAlt = a}) + +instance GoogleRequest PropertiesList' where + type Rs PropertiesList' = PropertyList + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesList{..} + = go _prorQuotaUser _prorPrettyPrint _prorUserIp + _prorKey + _prorFileId + _prorOauthToken + _prorFields + _prorAlt + where go + = clientWithRoute (Proxy :: Proxy PropertiesListAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Patch.hs new file mode 100644 index 000000000..6fa308b6c --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Patch.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a property. This method supports patch semantics. +-- +-- /See:/ for @DrivePropertiesPatch@. +module Drive.Properties.Patch + ( + -- * REST Resource + PropertiesPatchAPI + + -- * Creating a Request + , propertiesPatch + , PropertiesPatch + + -- * Request Lenses + , pppQuotaUser + , pppPrettyPrint + , pppPropertyKey + , pppUserIp + , pppVisibility + , pppKey + , pppFileId + , pppOauthToken + , pppFields + , pppAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesPatch@ which the +-- 'PropertiesPatch' request conforms to. +type PropertiesPatchAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> + Capture "propertyKey" Text :> + QueryParam "visibility" Text :> + Patch '[JSON] Property + +-- | Updates a property. This method supports patch semantics. +-- +-- /See:/ 'propertiesPatch' smart constructor. +data PropertiesPatch = PropertiesPatch + { _pppQuotaUser :: !(Maybe Text) + , _pppPrettyPrint :: !Bool + , _pppPropertyKey :: !Text + , _pppUserIp :: !(Maybe Text) + , _pppVisibility :: !Text + , _pppKey :: !(Maybe Text) + , _pppFileId :: !Text + , _pppOauthToken :: !(Maybe Text) + , _pppFields :: !(Maybe Text) + , _pppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pppQuotaUser' +-- +-- * 'pppPrettyPrint' +-- +-- * 'pppPropertyKey' +-- +-- * 'pppUserIp' +-- +-- * 'pppVisibility' +-- +-- * 'pppKey' +-- +-- * 'pppFileId' +-- +-- * 'pppOauthToken' +-- +-- * 'pppFields' +-- +-- * 'pppAlt' +propertiesPatch + :: Text -- ^ 'propertyKey' + -> Text -- ^ 'fileId' + -> PropertiesPatch +propertiesPatch pPppPropertyKey_ pPppFileId_ = + PropertiesPatch + { _pppQuotaUser = Nothing + , _pppPrettyPrint = True + , _pppPropertyKey = pPppPropertyKey_ + , _pppUserIp = Nothing + , _pppVisibility = "private" + , _pppKey = Nothing + , _pppFileId = pPppFileId_ + , _pppOauthToken = Nothing + , _pppFields = Nothing + , _pppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pppQuotaUser :: Lens' PropertiesPatch' (Maybe Text) +pppQuotaUser + = lens _pppQuotaUser (\ s a -> s{_pppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pppPrettyPrint :: Lens' PropertiesPatch' Bool +pppPrettyPrint + = lens _pppPrettyPrint + (\ s a -> s{_pppPrettyPrint = a}) + +-- | The key of the property. +pppPropertyKey :: Lens' PropertiesPatch' Text +pppPropertyKey + = lens _pppPropertyKey + (\ s a -> s{_pppPropertyKey = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pppUserIp :: Lens' PropertiesPatch' (Maybe Text) +pppUserIp + = lens _pppUserIp (\ s a -> s{_pppUserIp = a}) + +-- | The visibility of the property. +pppVisibility :: Lens' PropertiesPatch' Text +pppVisibility + = lens _pppVisibility + (\ s a -> s{_pppVisibility = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pppKey :: Lens' PropertiesPatch' (Maybe Text) +pppKey = lens _pppKey (\ s a -> s{_pppKey = a}) + +-- | The ID of the file. +pppFileId :: Lens' PropertiesPatch' Text +pppFileId + = lens _pppFileId (\ s a -> s{_pppFileId = a}) + +-- | OAuth 2.0 token for the current user. +pppOauthToken :: Lens' PropertiesPatch' (Maybe Text) +pppOauthToken + = lens _pppOauthToken + (\ s a -> s{_pppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pppFields :: Lens' PropertiesPatch' (Maybe Text) +pppFields + = lens _pppFields (\ s a -> s{_pppFields = a}) + +-- | Data format for the response. +pppAlt :: Lens' PropertiesPatch' Text +pppAlt = lens _pppAlt (\ s a -> s{_pppAlt = a}) + +instance GoogleRequest PropertiesPatch' where + type Rs PropertiesPatch' = Property + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesPatch{..} + = go _pppQuotaUser _pppPrettyPrint _pppPropertyKey + _pppUserIp + (Just _pppVisibility) + _pppKey + _pppFileId + _pppOauthToken + _pppFields + _pppAlt + where go + = clientWithRoute (Proxy :: Proxy PropertiesPatchAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Update.hs new file mode 100644 index 000000000..1900ab203 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Properties/Update.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Properties.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a property. +-- +-- /See:/ for @DrivePropertiesUpdate@. +module Drive.Properties.Update + ( + -- * REST Resource + PropertiesUpdateAPI + + -- * Creating a Request + , propertiesUpdate + , PropertiesUpdate + + -- * Request Lenses + , puuQuotaUser + , puuPrettyPrint + , puuPropertyKey + , puuUserIp + , puuVisibility + , puuKey + , puuFileId + , puuOauthToken + , puuFields + , puuAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DrivePropertiesUpdate@ which the +-- 'PropertiesUpdate' request conforms to. +type PropertiesUpdateAPI = + "files" :> + Capture "fileId" Text :> + "properties" :> + Capture "propertyKey" Text :> + QueryParam "visibility" Text :> Put '[JSON] Property + +-- | Updates a property. +-- +-- /See:/ 'propertiesUpdate' smart constructor. +data PropertiesUpdate = PropertiesUpdate + { _puuQuotaUser :: !(Maybe Text) + , _puuPrettyPrint :: !Bool + , _puuPropertyKey :: !Text + , _puuUserIp :: !(Maybe Text) + , _puuVisibility :: !Text + , _puuKey :: !(Maybe Text) + , _puuFileId :: !Text + , _puuOauthToken :: !(Maybe Text) + , _puuFields :: !(Maybe Text) + , _puuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertiesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puuQuotaUser' +-- +-- * 'puuPrettyPrint' +-- +-- * 'puuPropertyKey' +-- +-- * 'puuUserIp' +-- +-- * 'puuVisibility' +-- +-- * 'puuKey' +-- +-- * 'puuFileId' +-- +-- * 'puuOauthToken' +-- +-- * 'puuFields' +-- +-- * 'puuAlt' +propertiesUpdate + :: Text -- ^ 'propertyKey' + -> Text -- ^ 'fileId' + -> PropertiesUpdate +propertiesUpdate pPuuPropertyKey_ pPuuFileId_ = + PropertiesUpdate + { _puuQuotaUser = Nothing + , _puuPrettyPrint = True + , _puuPropertyKey = pPuuPropertyKey_ + , _puuUserIp = Nothing + , _puuVisibility = "private" + , _puuKey = Nothing + , _puuFileId = pPuuFileId_ + , _puuOauthToken = Nothing + , _puuFields = Nothing + , _puuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puuQuotaUser :: Lens' PropertiesUpdate' (Maybe Text) +puuQuotaUser + = lens _puuQuotaUser (\ s a -> s{_puuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puuPrettyPrint :: Lens' PropertiesUpdate' Bool +puuPrettyPrint + = lens _puuPrettyPrint + (\ s a -> s{_puuPrettyPrint = a}) + +-- | The key of the property. +puuPropertyKey :: Lens' PropertiesUpdate' Text +puuPropertyKey + = lens _puuPropertyKey + (\ s a -> s{_puuPropertyKey = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puuUserIp :: Lens' PropertiesUpdate' (Maybe Text) +puuUserIp + = lens _puuUserIp (\ s a -> s{_puuUserIp = a}) + +-- | The visibility of the property. +puuVisibility :: Lens' PropertiesUpdate' Text +puuVisibility + = lens _puuVisibility + (\ s a -> s{_puuVisibility = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puuKey :: Lens' PropertiesUpdate' (Maybe Text) +puuKey = lens _puuKey (\ s a -> s{_puuKey = a}) + +-- | The ID of the file. +puuFileId :: Lens' PropertiesUpdate' Text +puuFileId + = lens _puuFileId (\ s a -> s{_puuFileId = a}) + +-- | OAuth 2.0 token for the current user. +puuOauthToken :: Lens' PropertiesUpdate' (Maybe Text) +puuOauthToken + = lens _puuOauthToken + (\ s a -> s{_puuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puuFields :: Lens' PropertiesUpdate' (Maybe Text) +puuFields + = lens _puuFields (\ s a -> s{_puuFields = a}) + +-- | Data format for the response. +puuAlt :: Lens' PropertiesUpdate' Text +puuAlt = lens _puuAlt (\ s a -> s{_puuAlt = a}) + +instance GoogleRequest PropertiesUpdate' where + type Rs PropertiesUpdate' = Property + request = requestWithRoute defReq driveURL + requestWithRoute r u PropertiesUpdate{..} + = go _puuQuotaUser _puuPrettyPrint _puuPropertyKey + _puuUserIp + (Just _puuVisibility) + _puuKey + _puuFileId + _puuOauthToken + _puuFields + _puuAlt + where go + = clientWithRoute + (Proxy :: Proxy PropertiesUpdateAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Get.hs new file mode 100644 index 000000000..978cc136d --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Realtime.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Exports the contents of the Realtime API data model associated with this +-- file as JSON. +-- +-- /See:/ for @DriveRealtimeGet@. +module Drive.Realtime.Get + ( + -- * REST Resource + RealtimeGetAPI + + -- * Creating a Request + , realtimeGet + , RealtimeGet + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rUserIp + , rKey + , rFileId + , rOauthToken + , rRevision + , rFields + , rAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRealtimeGet@ which the +-- 'RealtimeGet' request conforms to. +type RealtimeGetAPI = + "files" :> + Capture "fileId" Text :> + "realtime" :> + QueryParam "revision" Int32 :> Get '[JSON] () + +-- | Exports the contents of the Realtime API data model associated with this +-- file as JSON. +-- +-- /See:/ 'realtimeGet' smart constructor. +data RealtimeGet = RealtimeGet + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rUserIp :: !(Maybe Text) + , _rKey :: !(Maybe Text) + , _rFileId :: !Text + , _rOauthToken :: !(Maybe Text) + , _rRevision :: !(Maybe Int32) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RealtimeGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rUserIp' +-- +-- * 'rKey' +-- +-- * 'rFileId' +-- +-- * 'rOauthToken' +-- +-- * 'rRevision' +-- +-- * 'rFields' +-- +-- * 'rAlt' +realtimeGet + :: Text -- ^ 'fileId' + -> RealtimeGet +realtimeGet pRFileId_ = + RealtimeGet + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rUserIp = Nothing + , _rKey = Nothing + , _rFileId = pRFileId_ + , _rOauthToken = Nothing + , _rRevision = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' RealtimeGet' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' RealtimeGet' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' RealtimeGet' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' RealtimeGet' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | The ID of the file that the Realtime API data model is associated with. +rFileId :: Lens' RealtimeGet' Text +rFileId = lens _rFileId (\ s a -> s{_rFileId = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' RealtimeGet' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | The revision of the Realtime API data model to export. Revisions start +-- at 1 (the initial empty data model) and are incremented with each +-- change. If this parameter is excluded, the most recent data model will +-- be returned. +rRevision :: Lens' RealtimeGet' (Maybe Int32) +rRevision + = lens _rRevision (\ s a -> s{_rRevision = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' RealtimeGet' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' RealtimeGet' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest RealtimeGet' where + type Rs RealtimeGet' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u RealtimeGet{..} + = go _rQuotaUser _rPrettyPrint _rUserIp _rKey + _rFileId + _rOauthToken + _rRevision + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy RealtimeGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Update.hs new file mode 100644 index 000000000..124c48b67 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Realtime/Update.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Realtime.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Overwrites the Realtime API data model associated with this file with +-- the provided JSON data model. +-- +-- /See:/ for @DriveRealtimeUpdate@. +module Drive.Realtime.Update + ( + -- * REST Resource + RealtimeUpdateAPI + + -- * Creating a Request + , realtimeUpdate + , RealtimeUpdate + + -- * Request Lenses + , reaQuotaUser + , reaPrettyPrint + , reaUserIp + , reaBaseRevision + , reaKey + , reaFileId + , reaOauthToken + , reaFields + , reaAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRealtimeUpdate@ which the +-- 'RealtimeUpdate' request conforms to. +type RealtimeUpdateAPI = + "files" :> + Capture "fileId" Text :> + "realtime" :> + QueryParam "baseRevision" Text :> Put '[JSON] () + +-- | Overwrites the Realtime API data model associated with this file with +-- the provided JSON data model. +-- +-- /See:/ 'realtimeUpdate' smart constructor. +data RealtimeUpdate = RealtimeUpdate + { _reaQuotaUser :: !(Maybe Text) + , _reaPrettyPrint :: !Bool + , _reaUserIp :: !(Maybe Text) + , _reaBaseRevision :: !(Maybe Text) + , _reaKey :: !(Maybe Text) + , _reaFileId :: !Text + , _reaOauthToken :: !(Maybe Text) + , _reaFields :: !(Maybe Text) + , _reaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RealtimeUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'reaQuotaUser' +-- +-- * 'reaPrettyPrint' +-- +-- * 'reaUserIp' +-- +-- * 'reaBaseRevision' +-- +-- * 'reaKey' +-- +-- * 'reaFileId' +-- +-- * 'reaOauthToken' +-- +-- * 'reaFields' +-- +-- * 'reaAlt' +realtimeUpdate + :: Text -- ^ 'fileId' + -> RealtimeUpdate +realtimeUpdate pReaFileId_ = + RealtimeUpdate + { _reaQuotaUser = Nothing + , _reaPrettyPrint = True + , _reaUserIp = Nothing + , _reaBaseRevision = Nothing + , _reaKey = Nothing + , _reaFileId = pReaFileId_ + , _reaOauthToken = Nothing + , _reaFields = Nothing + , _reaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +reaQuotaUser :: Lens' RealtimeUpdate' (Maybe Text) +reaQuotaUser + = lens _reaQuotaUser (\ s a -> s{_reaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +reaPrettyPrint :: Lens' RealtimeUpdate' Bool +reaPrettyPrint + = lens _reaPrettyPrint + (\ s a -> s{_reaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +reaUserIp :: Lens' RealtimeUpdate' (Maybe Text) +reaUserIp + = lens _reaUserIp (\ s a -> s{_reaUserIp = a}) + +-- | The revision of the model to diff the uploaded model against. If set, +-- the uploaded model is diffed against the provided revision and those +-- differences are merged with any changes made to the model after the +-- provided revision. If not set, the uploaded model replaces the current +-- model on the server. +reaBaseRevision :: Lens' RealtimeUpdate' (Maybe Text) +reaBaseRevision + = lens _reaBaseRevision + (\ s a -> s{_reaBaseRevision = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +reaKey :: Lens' RealtimeUpdate' (Maybe Text) +reaKey = lens _reaKey (\ s a -> s{_reaKey = a}) + +-- | The ID of the file that the Realtime API data model is associated with. +reaFileId :: Lens' RealtimeUpdate' Text +reaFileId + = lens _reaFileId (\ s a -> s{_reaFileId = a}) + +-- | OAuth 2.0 token for the current user. +reaOauthToken :: Lens' RealtimeUpdate' (Maybe Text) +reaOauthToken + = lens _reaOauthToken + (\ s a -> s{_reaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +reaFields :: Lens' RealtimeUpdate' (Maybe Text) +reaFields + = lens _reaFields (\ s a -> s{_reaFields = a}) + +-- | Data format for the response. +reaAlt :: Lens' RealtimeUpdate' Text +reaAlt = lens _reaAlt (\ s a -> s{_reaAlt = a}) + +instance GoogleRequest RealtimeUpdate' where + type Rs RealtimeUpdate' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u RealtimeUpdate{..} + = go _reaQuotaUser _reaPrettyPrint _reaUserIp + _reaBaseRevision + _reaKey + _reaFileId + _reaOauthToken + _reaFields + _reaAlt + where go + = clientWithRoute (Proxy :: Proxy RealtimeUpdateAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Delete.hs new file mode 100644 index 000000000..1248472a3 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Delete.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a reply. +-- +-- /See:/ for @DriveRepliesDelete@. +module Drive.Replies.Delete + ( + -- * REST Resource + RepliesDeleteAPI + + -- * Creating a Request + , repliesDelete + , RepliesDelete + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdUserIp + , rdKey + , rdReplyId + , rdFileId + , rdOauthToken + , rdCommentId + , rdFields + , rdAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesDelete@ which the +-- 'RepliesDelete' request conforms to. +type RepliesDeleteAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> + Capture "replyId" Text :> Delete '[JSON] () + +-- | Deletes a reply. +-- +-- /See:/ 'repliesDelete' smart constructor. +data RepliesDelete = RepliesDelete + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdUserIp :: !(Maybe Text) + , _rdKey :: !(Maybe Text) + , _rdReplyId :: !Text + , _rdFileId :: !Text + , _rdOauthToken :: !(Maybe Text) + , _rdCommentId :: !Text + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdUserIp' +-- +-- * 'rdKey' +-- +-- * 'rdReplyId' +-- +-- * 'rdFileId' +-- +-- * 'rdOauthToken' +-- +-- * 'rdCommentId' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +repliesDelete + :: Text -- ^ 'replyId' + -> Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesDelete +repliesDelete pRdReplyId_ pRdFileId_ pRdCommentId_ = + RepliesDelete + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdUserIp = Nothing + , _rdKey = Nothing + , _rdReplyId = pRdReplyId_ + , _rdFileId = pRdFileId_ + , _rdOauthToken = Nothing + , _rdCommentId = pRdCommentId_ + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' RepliesDelete' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' RepliesDelete' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' RepliesDelete' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' RepliesDelete' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | The ID of the reply. +rdReplyId :: Lens' RepliesDelete' Text +rdReplyId + = lens _rdReplyId (\ s a -> s{_rdReplyId = a}) + +-- | The ID of the file. +rdFileId :: Lens' RepliesDelete' Text +rdFileId = lens _rdFileId (\ s a -> s{_rdFileId = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' RepliesDelete' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | The ID of the comment. +rdCommentId :: Lens' RepliesDelete' Text +rdCommentId + = lens _rdCommentId (\ s a -> s{_rdCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' RepliesDelete' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' RepliesDelete' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest RepliesDelete' where + type Rs RepliesDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesDelete{..} + = go _rdQuotaUser _rdPrettyPrint _rdUserIp _rdKey + _rdReplyId + _rdFileId + _rdOauthToken + _rdCommentId + _rdFields + _rdAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesDeleteAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Get.hs new file mode 100644 index 000000000..b92468740 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Get.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a reply. +-- +-- /See:/ for @DriveRepliesGet@. +module Drive.Replies.Get + ( + -- * REST Resource + RepliesGetAPI + + -- * Creating a Request + , repliesGet + , RepliesGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgKey + , rgReplyId + , rgFileId + , rgOauthToken + , rgCommentId + , rgIncludeDeleted + , rgFields + , rgAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesGet@ which the +-- 'RepliesGet' request conforms to. +type RepliesGetAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> + Capture "replyId" Text :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] CommentReply + +-- | Gets a reply. +-- +-- /See:/ 'repliesGet' smart constructor. +data RepliesGet = RepliesGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgReplyId :: !Text + , _rgFileId :: !Text + , _rgOauthToken :: !(Maybe Text) + , _rgCommentId :: !Text + , _rgIncludeDeleted :: !Bool + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgKey' +-- +-- * 'rgReplyId' +-- +-- * 'rgFileId' +-- +-- * 'rgOauthToken' +-- +-- * 'rgCommentId' +-- +-- * 'rgIncludeDeleted' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +repliesGet + :: Text -- ^ 'replyId' + -> Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesGet +repliesGet pRgReplyId_ pRgFileId_ pRgCommentId_ = + RepliesGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgKey = Nothing + , _rgReplyId = pRgReplyId_ + , _rgFileId = pRgFileId_ + , _rgOauthToken = Nothing + , _rgCommentId = pRgCommentId_ + , _rgIncludeDeleted = False + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' RepliesGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' RepliesGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' RepliesGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' RepliesGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | The ID of the reply. +rgReplyId :: Lens' RepliesGet' Text +rgReplyId + = lens _rgReplyId (\ s a -> s{_rgReplyId = a}) + +-- | The ID of the file. +rgFileId :: Lens' RepliesGet' Text +rgFileId = lens _rgFileId (\ s a -> s{_rgFileId = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' RepliesGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | The ID of the comment. +rgCommentId :: Lens' RepliesGet' Text +rgCommentId + = lens _rgCommentId (\ s a -> s{_rgCommentId = a}) + +-- | If set, this will succeed when retrieving a deleted reply. +rgIncludeDeleted :: Lens' RepliesGet' Bool +rgIncludeDeleted + = lens _rgIncludeDeleted + (\ s a -> s{_rgIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' RepliesGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' RepliesGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest RepliesGet' where + type Rs RepliesGet' = CommentReply + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp _rgKey + _rgReplyId + _rgFileId + _rgOauthToken + _rgCommentId + (Just _rgIncludeDeleted) + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesGetAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Insert.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Insert.hs new file mode 100644 index 000000000..38e680d03 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Insert.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new reply to the given comment. +-- +-- /See:/ for @DriveRepliesInsert@. +module Drive.Replies.Insert + ( + -- * REST Resource + RepliesInsertAPI + + -- * Creating a Request + , repliesInsert + , RepliesInsert + + -- * Request Lenses + , riQuotaUser + , riPrettyPrint + , riUserIp + , riKey + , riFileId + , riOauthToken + , riCommentId + , riFields + , riAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesInsert@ which the +-- 'RepliesInsert' request conforms to. +type RepliesInsertAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> Post '[JSON] CommentReply + +-- | Creates a new reply to the given comment. +-- +-- /See:/ 'repliesInsert' smart constructor. +data RepliesInsert = RepliesInsert + { _riQuotaUser :: !(Maybe Text) + , _riPrettyPrint :: !Bool + , _riUserIp :: !(Maybe Text) + , _riKey :: !(Maybe Text) + , _riFileId :: !Text + , _riOauthToken :: !(Maybe Text) + , _riCommentId :: !Text + , _riFields :: !(Maybe Text) + , _riAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riQuotaUser' +-- +-- * 'riPrettyPrint' +-- +-- * 'riUserIp' +-- +-- * 'riKey' +-- +-- * 'riFileId' +-- +-- * 'riOauthToken' +-- +-- * 'riCommentId' +-- +-- * 'riFields' +-- +-- * 'riAlt' +repliesInsert + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesInsert +repliesInsert pRiFileId_ pRiCommentId_ = + RepliesInsert + { _riQuotaUser = Nothing + , _riPrettyPrint = True + , _riUserIp = Nothing + , _riKey = Nothing + , _riFileId = pRiFileId_ + , _riOauthToken = Nothing + , _riCommentId = pRiCommentId_ + , _riFields = Nothing + , _riAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +riQuotaUser :: Lens' RepliesInsert' (Maybe Text) +riQuotaUser + = lens _riQuotaUser (\ s a -> s{_riQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +riPrettyPrint :: Lens' RepliesInsert' Bool +riPrettyPrint + = lens _riPrettyPrint + (\ s a -> s{_riPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +riUserIp :: Lens' RepliesInsert' (Maybe Text) +riUserIp = lens _riUserIp (\ s a -> s{_riUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +riKey :: Lens' RepliesInsert' (Maybe Text) +riKey = lens _riKey (\ s a -> s{_riKey = a}) + +-- | The ID of the file. +riFileId :: Lens' RepliesInsert' Text +riFileId = lens _riFileId (\ s a -> s{_riFileId = a}) + +-- | OAuth 2.0 token for the current user. +riOauthToken :: Lens' RepliesInsert' (Maybe Text) +riOauthToken + = lens _riOauthToken (\ s a -> s{_riOauthToken = a}) + +-- | The ID of the comment. +riCommentId :: Lens' RepliesInsert' Text +riCommentId + = lens _riCommentId (\ s a -> s{_riCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +riFields :: Lens' RepliesInsert' (Maybe Text) +riFields = lens _riFields (\ s a -> s{_riFields = a}) + +-- | Data format for the response. +riAlt :: Lens' RepliesInsert' Text +riAlt = lens _riAlt (\ s a -> s{_riAlt = a}) + +instance GoogleRequest RepliesInsert' where + type Rs RepliesInsert' = CommentReply + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesInsert{..} + = go _riQuotaUser _riPrettyPrint _riUserIp _riKey + _riFileId + _riOauthToken + _riCommentId + _riFields + _riAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesInsertAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/List.hs new file mode 100644 index 000000000..b8554c8cd --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/List.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all of the replies to a comment. +-- +-- /See:/ for @DriveRepliesList@. +module Drive.Replies.List + ( + -- * REST Resource + RepliesListAPI + + -- * Creating a Request + , repliesList + , RepliesList + + -- * Request Lenses + , rlQuotaUser + , rlPrettyPrint + , rlUserIp + , rlKey + , rlPageToken + , rlFileId + , rlOauthToken + , rlCommentId + , rlMaxResults + , rlIncludeDeleted + , rlFields + , rlAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesList@ which the +-- 'RepliesList' request conforms to. +type RepliesListAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] CommentReplyList + +-- | Lists all of the replies to a comment. +-- +-- /See:/ 'repliesList' smart constructor. +data RepliesList = RepliesList + { _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlUserIp :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlPageToken :: !(Maybe Text) + , _rlFileId :: !Text + , _rlOauthToken :: !(Maybe Text) + , _rlCommentId :: !Text + , _rlMaxResults :: !Int32 + , _rlIncludeDeleted :: !Bool + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlUserIp' +-- +-- * 'rlKey' +-- +-- * 'rlPageToken' +-- +-- * 'rlFileId' +-- +-- * 'rlOauthToken' +-- +-- * 'rlCommentId' +-- +-- * 'rlMaxResults' +-- +-- * 'rlIncludeDeleted' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +repliesList + :: Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesList +repliesList pRlFileId_ pRlCommentId_ = + RepliesList + { _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlUserIp = Nothing + , _rlKey = Nothing + , _rlPageToken = Nothing + , _rlFileId = pRlFileId_ + , _rlOauthToken = Nothing + , _rlCommentId = pRlCommentId_ + , _rlMaxResults = 20 + , _rlIncludeDeleted = False + , _rlFields = Nothing + , _rlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' RepliesList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' RepliesList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' RepliesList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' RepliesList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +rlPageToken :: Lens' RepliesList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | The ID of the file. +rlFileId :: Lens' RepliesList' Text +rlFileId = lens _rlFileId (\ s a -> s{_rlFileId = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' RepliesList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | The ID of the comment. +rlCommentId :: Lens' RepliesList' Text +rlCommentId + = lens _rlCommentId (\ s a -> s{_rlCommentId = a}) + +-- | The maximum number of replies to include in the response, used for +-- paging. +rlMaxResults :: Lens' RepliesList' Int32 +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | If set, all replies, including deleted replies (with content stripped) +-- will be returned. +rlIncludeDeleted :: Lens' RepliesList' Bool +rlIncludeDeleted + = lens _rlIncludeDeleted + (\ s a -> s{_rlIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' RepliesList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' RepliesList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest RepliesList' where + type Rs RepliesList' = CommentReplyList + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesList{..} + = go _rlQuotaUser _rlPrettyPrint _rlUserIp _rlKey + _rlPageToken + _rlFileId + _rlOauthToken + _rlCommentId + (Just _rlMaxResults) + (Just _rlIncludeDeleted) + _rlFields + _rlAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesListAPI) r u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Patch.hs new file mode 100644 index 000000000..2ba762ba4 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Patch.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing reply. This method supports patch semantics. +-- +-- /See:/ for @DriveRepliesPatch@. +module Drive.Replies.Patch + ( + -- * REST Resource + RepliesPatchAPI + + -- * Creating a Request + , repliesPatch + , RepliesPatch + + -- * Request Lenses + , rpQuotaUser + , rpPrettyPrint + , rpUserIp + , rpKey + , rpReplyId + , rpFileId + , rpOauthToken + , rpCommentId + , rpFields + , rpAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesPatch@ which the +-- 'RepliesPatch' request conforms to. +type RepliesPatchAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> + Capture "replyId" Text :> Patch '[JSON] CommentReply + +-- | Updates an existing reply. This method supports patch semantics. +-- +-- /See:/ 'repliesPatch' smart constructor. +data RepliesPatch = RepliesPatch + { _rpQuotaUser :: !(Maybe Text) + , _rpPrettyPrint :: !Bool + , _rpUserIp :: !(Maybe Text) + , _rpKey :: !(Maybe Text) + , _rpReplyId :: !Text + , _rpFileId :: !Text + , _rpOauthToken :: !(Maybe Text) + , _rpCommentId :: !Text + , _rpFields :: !(Maybe Text) + , _rpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpQuotaUser' +-- +-- * 'rpPrettyPrint' +-- +-- * 'rpUserIp' +-- +-- * 'rpKey' +-- +-- * 'rpReplyId' +-- +-- * 'rpFileId' +-- +-- * 'rpOauthToken' +-- +-- * 'rpCommentId' +-- +-- * 'rpFields' +-- +-- * 'rpAlt' +repliesPatch + :: Text -- ^ 'replyId' + -> Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesPatch +repliesPatch pRpReplyId_ pRpFileId_ pRpCommentId_ = + RepliesPatch + { _rpQuotaUser = Nothing + , _rpPrettyPrint = True + , _rpUserIp = Nothing + , _rpKey = Nothing + , _rpReplyId = pRpReplyId_ + , _rpFileId = pRpFileId_ + , _rpOauthToken = Nothing + , _rpCommentId = pRpCommentId_ + , _rpFields = Nothing + , _rpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpQuotaUser :: Lens' RepliesPatch' (Maybe Text) +rpQuotaUser + = lens _rpQuotaUser (\ s a -> s{_rpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpPrettyPrint :: Lens' RepliesPatch' Bool +rpPrettyPrint + = lens _rpPrettyPrint + (\ s a -> s{_rpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpUserIp :: Lens' RepliesPatch' (Maybe Text) +rpUserIp = lens _rpUserIp (\ s a -> s{_rpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpKey :: Lens' RepliesPatch' (Maybe Text) +rpKey = lens _rpKey (\ s a -> s{_rpKey = a}) + +-- | The ID of the reply. +rpReplyId :: Lens' RepliesPatch' Text +rpReplyId + = lens _rpReplyId (\ s a -> s{_rpReplyId = a}) + +-- | The ID of the file. +rpFileId :: Lens' RepliesPatch' Text +rpFileId = lens _rpFileId (\ s a -> s{_rpFileId = a}) + +-- | OAuth 2.0 token for the current user. +rpOauthToken :: Lens' RepliesPatch' (Maybe Text) +rpOauthToken + = lens _rpOauthToken (\ s a -> s{_rpOauthToken = a}) + +-- | The ID of the comment. +rpCommentId :: Lens' RepliesPatch' Text +rpCommentId + = lens _rpCommentId (\ s a -> s{_rpCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +rpFields :: Lens' RepliesPatch' (Maybe Text) +rpFields = lens _rpFields (\ s a -> s{_rpFields = a}) + +-- | Data format for the response. +rpAlt :: Lens' RepliesPatch' Text +rpAlt = lens _rpAlt (\ s a -> s{_rpAlt = a}) + +instance GoogleRequest RepliesPatch' where + type Rs RepliesPatch' = CommentReply + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesPatch{..} + = go _rpQuotaUser _rpPrettyPrint _rpUserIp _rpKey + _rpReplyId + _rpFileId + _rpOauthToken + _rpCommentId + _rpFields + _rpAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesPatchAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Update.hs new file mode 100644 index 000000000..f08df4e64 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Replies/Update.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Replies.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing reply. +-- +-- /See:/ for @DriveRepliesUpdate@. +module Drive.Replies.Update + ( + -- * REST Resource + RepliesUpdateAPI + + -- * Creating a Request + , repliesUpdate + , RepliesUpdate + + -- * Request Lenses + , ruQuotaUser + , ruPrettyPrint + , ruUserIp + , ruKey + , ruReplyId + , ruFileId + , ruOauthToken + , ruCommentId + , ruFields + , ruAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRepliesUpdate@ which the +-- 'RepliesUpdate' request conforms to. +type RepliesUpdateAPI = + "files" :> + Capture "fileId" Text :> + "comments" :> + Capture "commentId" Text :> + "replies" :> + Capture "replyId" Text :> Put '[JSON] CommentReply + +-- | Updates an existing reply. +-- +-- /See:/ 'repliesUpdate' smart constructor. +data RepliesUpdate = RepliesUpdate + { _ruQuotaUser :: !(Maybe Text) + , _ruPrettyPrint :: !Bool + , _ruUserIp :: !(Maybe Text) + , _ruKey :: !(Maybe Text) + , _ruReplyId :: !Text + , _ruFileId :: !Text + , _ruOauthToken :: !(Maybe Text) + , _ruCommentId :: !Text + , _ruFields :: !(Maybe Text) + , _ruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RepliesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruQuotaUser' +-- +-- * 'ruPrettyPrint' +-- +-- * 'ruUserIp' +-- +-- * 'ruKey' +-- +-- * 'ruReplyId' +-- +-- * 'ruFileId' +-- +-- * 'ruOauthToken' +-- +-- * 'ruCommentId' +-- +-- * 'ruFields' +-- +-- * 'ruAlt' +repliesUpdate + :: Text -- ^ 'replyId' + -> Text -- ^ 'fileId' + -> Text -- ^ 'commentId' + -> RepliesUpdate +repliesUpdate pRuReplyId_ pRuFileId_ pRuCommentId_ = + RepliesUpdate + { _ruQuotaUser = Nothing + , _ruPrettyPrint = True + , _ruUserIp = Nothing + , _ruKey = Nothing + , _ruReplyId = pRuReplyId_ + , _ruFileId = pRuFileId_ + , _ruOauthToken = Nothing + , _ruCommentId = pRuCommentId_ + , _ruFields = Nothing + , _ruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruQuotaUser :: Lens' RepliesUpdate' (Maybe Text) +ruQuotaUser + = lens _ruQuotaUser (\ s a -> s{_ruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruPrettyPrint :: Lens' RepliesUpdate' Bool +ruPrettyPrint + = lens _ruPrettyPrint + (\ s a -> s{_ruPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruUserIp :: Lens' RepliesUpdate' (Maybe Text) +ruUserIp = lens _ruUserIp (\ s a -> s{_ruUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruKey :: Lens' RepliesUpdate' (Maybe Text) +ruKey = lens _ruKey (\ s a -> s{_ruKey = a}) + +-- | The ID of the reply. +ruReplyId :: Lens' RepliesUpdate' Text +ruReplyId + = lens _ruReplyId (\ s a -> s{_ruReplyId = a}) + +-- | The ID of the file. +ruFileId :: Lens' RepliesUpdate' Text +ruFileId = lens _ruFileId (\ s a -> s{_ruFileId = a}) + +-- | OAuth 2.0 token for the current user. +ruOauthToken :: Lens' RepliesUpdate' (Maybe Text) +ruOauthToken + = lens _ruOauthToken (\ s a -> s{_ruOauthToken = a}) + +-- | The ID of the comment. +ruCommentId :: Lens' RepliesUpdate' Text +ruCommentId + = lens _ruCommentId (\ s a -> s{_ruCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +ruFields :: Lens' RepliesUpdate' (Maybe Text) +ruFields = lens _ruFields (\ s a -> s{_ruFields = a}) + +-- | Data format for the response. +ruAlt :: Lens' RepliesUpdate' Text +ruAlt = lens _ruAlt (\ s a -> s{_ruAlt = a}) + +instance GoogleRequest RepliesUpdate' where + type Rs RepliesUpdate' = CommentReply + request = requestWithRoute defReq driveURL + requestWithRoute r u RepliesUpdate{..} + = go _ruQuotaUser _ruPrettyPrint _ruUserIp _ruKey + _ruReplyId + _ruFileId + _ruOauthToken + _ruCommentId + _ruFields + _ruAlt + where go + = clientWithRoute (Proxy :: Proxy RepliesUpdateAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Delete.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Delete.hs new file mode 100644 index 000000000..39a8c3d65 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Delete.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Revisions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a revision. +-- +-- /See:/ for @DriveRevisionsDelete@. +module Drive.Revisions.Delete + ( + -- * REST Resource + RevisionsDeleteAPI + + -- * Creating a Request + , revisionsDelete + , RevisionsDelete + + -- * Request Lenses + , rddQuotaUser + , rddPrettyPrint + , rddUserIp + , rddKey + , rddFileId + , rddOauthToken + , rddRevisionId + , rddFields + , rddAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRevisionsDelete@ which the +-- 'RevisionsDelete' request conforms to. +type RevisionsDeleteAPI = + "files" :> + Capture "fileId" Text :> + "revisions" :> + Capture "revisionId" Text :> Delete '[JSON] () + +-- | Removes a revision. +-- +-- /See:/ 'revisionsDelete' smart constructor. +data RevisionsDelete = RevisionsDelete + { _rddQuotaUser :: !(Maybe Text) + , _rddPrettyPrint :: !Bool + , _rddUserIp :: !(Maybe Text) + , _rddKey :: !(Maybe Text) + , _rddFileId :: !Text + , _rddOauthToken :: !(Maybe Text) + , _rddRevisionId :: !Text + , _rddFields :: !(Maybe Text) + , _rddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rddQuotaUser' +-- +-- * 'rddPrettyPrint' +-- +-- * 'rddUserIp' +-- +-- * 'rddKey' +-- +-- * 'rddFileId' +-- +-- * 'rddOauthToken' +-- +-- * 'rddRevisionId' +-- +-- * 'rddFields' +-- +-- * 'rddAlt' +revisionsDelete + :: Text -- ^ 'fileId' + -> Text -- ^ 'revisionId' + -> RevisionsDelete +revisionsDelete pRddFileId_ pRddRevisionId_ = + RevisionsDelete + { _rddQuotaUser = Nothing + , _rddPrettyPrint = True + , _rddUserIp = Nothing + , _rddKey = Nothing + , _rddFileId = pRddFileId_ + , _rddOauthToken = Nothing + , _rddRevisionId = pRddRevisionId_ + , _rddFields = Nothing + , _rddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rddQuotaUser :: Lens' RevisionsDelete' (Maybe Text) +rddQuotaUser + = lens _rddQuotaUser (\ s a -> s{_rddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rddPrettyPrint :: Lens' RevisionsDelete' Bool +rddPrettyPrint + = lens _rddPrettyPrint + (\ s a -> s{_rddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rddUserIp :: Lens' RevisionsDelete' (Maybe Text) +rddUserIp + = lens _rddUserIp (\ s a -> s{_rddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rddKey :: Lens' RevisionsDelete' (Maybe Text) +rddKey = lens _rddKey (\ s a -> s{_rddKey = a}) + +-- | The ID of the file. +rddFileId :: Lens' RevisionsDelete' Text +rddFileId + = lens _rddFileId (\ s a -> s{_rddFileId = a}) + +-- | OAuth 2.0 token for the current user. +rddOauthToken :: Lens' RevisionsDelete' (Maybe Text) +rddOauthToken + = lens _rddOauthToken + (\ s a -> s{_rddOauthToken = a}) + +-- | The ID of the revision. +rddRevisionId :: Lens' RevisionsDelete' Text +rddRevisionId + = lens _rddRevisionId + (\ s a -> s{_rddRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +rddFields :: Lens' RevisionsDelete' (Maybe Text) +rddFields + = lens _rddFields (\ s a -> s{_rddFields = a}) + +-- | Data format for the response. +rddAlt :: Lens' RevisionsDelete' Text +rddAlt = lens _rddAlt (\ s a -> s{_rddAlt = a}) + +instance GoogleRequest RevisionsDelete' where + type Rs RevisionsDelete' = () + request = requestWithRoute defReq driveURL + requestWithRoute r u RevisionsDelete{..} + = go _rddQuotaUser _rddPrettyPrint _rddUserIp _rddKey + _rddFileId + _rddOauthToken + _rddRevisionId + _rddFields + _rddAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsDeleteAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Get.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Get.hs new file mode 100644 index 000000000..54db7c8bf --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Revisions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific revision. +-- +-- /See:/ for @DriveRevisionsGet@. +module Drive.Revisions.Get + ( + -- * REST Resource + RevisionsGetAPI + + -- * Creating a Request + , revisionsGet + , RevisionsGet + + -- * Request Lenses + , rggQuotaUser + , rggPrettyPrint + , rggUserIp + , rggKey + , rggFileId + , rggOauthToken + , rggRevisionId + , rggFields + , rggAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRevisionsGet@ which the +-- 'RevisionsGet' request conforms to. +type RevisionsGetAPI = + "files" :> + Capture "fileId" Text :> + "revisions" :> + Capture "revisionId" Text :> Get '[JSON] Revision + +-- | Gets a specific revision. +-- +-- /See:/ 'revisionsGet' smart constructor. +data RevisionsGet = RevisionsGet + { _rggQuotaUser :: !(Maybe Text) + , _rggPrettyPrint :: !Bool + , _rggUserIp :: !(Maybe Text) + , _rggKey :: !(Maybe Text) + , _rggFileId :: !Text + , _rggOauthToken :: !(Maybe Text) + , _rggRevisionId :: !Text + , _rggFields :: !(Maybe Text) + , _rggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rggQuotaUser' +-- +-- * 'rggPrettyPrint' +-- +-- * 'rggUserIp' +-- +-- * 'rggKey' +-- +-- * 'rggFileId' +-- +-- * 'rggOauthToken' +-- +-- * 'rggRevisionId' +-- +-- * 'rggFields' +-- +-- * 'rggAlt' +revisionsGet + :: Text -- ^ 'fileId' + -> Text -- ^ 'revisionId' + -> RevisionsGet +revisionsGet pRggFileId_ pRggRevisionId_ = + RevisionsGet + { _rggQuotaUser = Nothing + , _rggPrettyPrint = True + , _rggUserIp = Nothing + , _rggKey = Nothing + , _rggFileId = pRggFileId_ + , _rggOauthToken = Nothing + , _rggRevisionId = pRggRevisionId_ + , _rggFields = Nothing + , _rggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rggQuotaUser :: Lens' RevisionsGet' (Maybe Text) +rggQuotaUser + = lens _rggQuotaUser (\ s a -> s{_rggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rggPrettyPrint :: Lens' RevisionsGet' Bool +rggPrettyPrint + = lens _rggPrettyPrint + (\ s a -> s{_rggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rggUserIp :: Lens' RevisionsGet' (Maybe Text) +rggUserIp + = lens _rggUserIp (\ s a -> s{_rggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rggKey :: Lens' RevisionsGet' (Maybe Text) +rggKey = lens _rggKey (\ s a -> s{_rggKey = a}) + +-- | The ID of the file. +rggFileId :: Lens' RevisionsGet' Text +rggFileId + = lens _rggFileId (\ s a -> s{_rggFileId = a}) + +-- | OAuth 2.0 token for the current user. +rggOauthToken :: Lens' RevisionsGet' (Maybe Text) +rggOauthToken + = lens _rggOauthToken + (\ s a -> s{_rggOauthToken = a}) + +-- | The ID of the revision. +rggRevisionId :: Lens' RevisionsGet' Text +rggRevisionId + = lens _rggRevisionId + (\ s a -> s{_rggRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +rggFields :: Lens' RevisionsGet' (Maybe Text) +rggFields + = lens _rggFields (\ s a -> s{_rggFields = a}) + +-- | Data format for the response. +rggAlt :: Lens' RevisionsGet' Text +rggAlt = lens _rggAlt (\ s a -> s{_rggAlt = a}) + +instance GoogleRequest RevisionsGet' where + type Rs RevisionsGet' = Revision + request = requestWithRoute defReq driveURL + requestWithRoute r u RevisionsGet{..} + = go _rggQuotaUser _rggPrettyPrint _rggUserIp _rggKey + _rggFileId + _rggOauthToken + _rggRevisionId + _rggFields + _rggAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsGetAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs new file mode 100644 index 000000000..4a55050ad --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Revisions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a file\'s revisions. +-- +-- /See:/ for @DriveRevisionsList@. +module Drive.Revisions.List + ( + -- * REST Resource + RevisionsListAPI + + -- * Creating a Request + , revisionsList + , RevisionsList + + -- * Request Lenses + , revQuotaUser + , revPrettyPrint + , revUserIp + , revKey + , revFileId + , revOauthToken + , revFields + , revAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRevisionsList@ which the +-- 'RevisionsList' request conforms to. +type RevisionsListAPI = + "files" :> + Capture "fileId" Text :> + "revisions" :> Get '[JSON] RevisionList + +-- | Lists a file\'s revisions. +-- +-- /See:/ 'revisionsList' smart constructor. +data RevisionsList = RevisionsList + { _revQuotaUser :: !(Maybe Text) + , _revPrettyPrint :: !Bool + , _revUserIp :: !(Maybe Text) + , _revKey :: !(Maybe Text) + , _revFileId :: !Text + , _revOauthToken :: !(Maybe Text) + , _revFields :: !(Maybe Text) + , _revAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'revQuotaUser' +-- +-- * 'revPrettyPrint' +-- +-- * 'revUserIp' +-- +-- * 'revKey' +-- +-- * 'revFileId' +-- +-- * 'revOauthToken' +-- +-- * 'revFields' +-- +-- * 'revAlt' +revisionsList + :: Text -- ^ 'fileId' + -> RevisionsList +revisionsList pRevFileId_ = + RevisionsList + { _revQuotaUser = Nothing + , _revPrettyPrint = True + , _revUserIp = Nothing + , _revKey = Nothing + , _revFileId = pRevFileId_ + , _revOauthToken = Nothing + , _revFields = Nothing + , _revAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +revQuotaUser :: Lens' RevisionsList' (Maybe Text) +revQuotaUser + = lens _revQuotaUser (\ s a -> s{_revQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +revPrettyPrint :: Lens' RevisionsList' Bool +revPrettyPrint + = lens _revPrettyPrint + (\ s a -> s{_revPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +revUserIp :: Lens' RevisionsList' (Maybe Text) +revUserIp + = lens _revUserIp (\ s a -> s{_revUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +revKey :: Lens' RevisionsList' (Maybe Text) +revKey = lens _revKey (\ s a -> s{_revKey = a}) + +-- | The ID of the file. +revFileId :: Lens' RevisionsList' Text +revFileId + = lens _revFileId (\ s a -> s{_revFileId = a}) + +-- | OAuth 2.0 token for the current user. +revOauthToken :: Lens' RevisionsList' (Maybe Text) +revOauthToken + = lens _revOauthToken + (\ s a -> s{_revOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +revFields :: Lens' RevisionsList' (Maybe Text) +revFields + = lens _revFields (\ s a -> s{_revFields = a}) + +-- | Data format for the response. +revAlt :: Lens' RevisionsList' Text +revAlt = lens _revAlt (\ s a -> s{_revAlt = a}) + +instance GoogleRequest RevisionsList' where + type Rs RevisionsList' = RevisionList + request = requestWithRoute defReq driveURL + requestWithRoute r u RevisionsList{..} + = go _revQuotaUser _revPrettyPrint _revUserIp _revKey + _revFileId + _revOauthToken + _revFields + _revAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsListAPI) r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Patch.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Patch.hs new file mode 100644 index 000000000..126f4b546 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Patch.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Revisions.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a revision. This method supports patch semantics. +-- +-- /See:/ for @DriveRevisionsPatch@. +module Drive.Revisions.Patch + ( + -- * REST Resource + RevisionsPatchAPI + + -- * Creating a Request + , revisionsPatch + , RevisionsPatch + + -- * Request Lenses + , rppQuotaUser + , rppPrettyPrint + , rppUserIp + , rppKey + , rppFileId + , rppOauthToken + , rppRevisionId + , rppFields + , rppAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRevisionsPatch@ which the +-- 'RevisionsPatch' request conforms to. +type RevisionsPatchAPI = + "files" :> + Capture "fileId" Text :> + "revisions" :> + Capture "revisionId" Text :> Patch '[JSON] Revision + +-- | Updates a revision. This method supports patch semantics. +-- +-- /See:/ 'revisionsPatch' smart constructor. +data RevisionsPatch = RevisionsPatch + { _rppQuotaUser :: !(Maybe Text) + , _rppPrettyPrint :: !Bool + , _rppUserIp :: !(Maybe Text) + , _rppKey :: !(Maybe Text) + , _rppFileId :: !Text + , _rppOauthToken :: !(Maybe Text) + , _rppRevisionId :: !Text + , _rppFields :: !(Maybe Text) + , _rppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rppQuotaUser' +-- +-- * 'rppPrettyPrint' +-- +-- * 'rppUserIp' +-- +-- * 'rppKey' +-- +-- * 'rppFileId' +-- +-- * 'rppOauthToken' +-- +-- * 'rppRevisionId' +-- +-- * 'rppFields' +-- +-- * 'rppAlt' +revisionsPatch + :: Text -- ^ 'fileId' + -> Text -- ^ 'revisionId' + -> RevisionsPatch +revisionsPatch pRppFileId_ pRppRevisionId_ = + RevisionsPatch + { _rppQuotaUser = Nothing + , _rppPrettyPrint = True + , _rppUserIp = Nothing + , _rppKey = Nothing + , _rppFileId = pRppFileId_ + , _rppOauthToken = Nothing + , _rppRevisionId = pRppRevisionId_ + , _rppFields = Nothing + , _rppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rppQuotaUser :: Lens' RevisionsPatch' (Maybe Text) +rppQuotaUser + = lens _rppQuotaUser (\ s a -> s{_rppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rppPrettyPrint :: Lens' RevisionsPatch' Bool +rppPrettyPrint + = lens _rppPrettyPrint + (\ s a -> s{_rppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rppUserIp :: Lens' RevisionsPatch' (Maybe Text) +rppUserIp + = lens _rppUserIp (\ s a -> s{_rppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rppKey :: Lens' RevisionsPatch' (Maybe Text) +rppKey = lens _rppKey (\ s a -> s{_rppKey = a}) + +-- | The ID for the file. +rppFileId :: Lens' RevisionsPatch' Text +rppFileId + = lens _rppFileId (\ s a -> s{_rppFileId = a}) + +-- | OAuth 2.0 token for the current user. +rppOauthToken :: Lens' RevisionsPatch' (Maybe Text) +rppOauthToken + = lens _rppOauthToken + (\ s a -> s{_rppOauthToken = a}) + +-- | The ID for the revision. +rppRevisionId :: Lens' RevisionsPatch' Text +rppRevisionId + = lens _rppRevisionId + (\ s a -> s{_rppRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +rppFields :: Lens' RevisionsPatch' (Maybe Text) +rppFields + = lens _rppFields (\ s a -> s{_rppFields = a}) + +-- | Data format for the response. +rppAlt :: Lens' RevisionsPatch' Text +rppAlt = lens _rppAlt (\ s a -> s{_rppAlt = a}) + +instance GoogleRequest RevisionsPatch' where + type Rs RevisionsPatch' = Revision + request = requestWithRoute defReq driveURL + requestWithRoute r u RevisionsPatch{..} + = go _rppQuotaUser _rppPrettyPrint _rppUserIp _rppKey + _rppFileId + _rppOauthToken + _rppRevisionId + _rppFields + _rppAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsPatchAPI) + r + u diff --git a/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Update.hs b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Update.hs new file mode 100644 index 000000000..74a39e566 --- /dev/null +++ b/gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Update.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Drive.Revisions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a revision. +-- +-- /See:/ for @DriveRevisionsUpdate@. +module Drive.Revisions.Update + ( + -- * REST Resource + RevisionsUpdateAPI + + -- * Creating a Request + , revisionsUpdate + , RevisionsUpdate + + -- * Request Lenses + , ruuQuotaUser + , ruuPrettyPrint + , ruuUserIp + , ruuKey + , ruuFileId + , ruuOauthToken + , ruuRevisionId + , ruuFields + , ruuAlt + ) where + +import Network.Google.Drive.Types +import Network.Google.Prelude + +-- | A resource alias for @DriveRevisionsUpdate@ which the +-- 'RevisionsUpdate' request conforms to. +type RevisionsUpdateAPI = + "files" :> + Capture "fileId" Text :> + "revisions" :> + Capture "revisionId" Text :> Put '[JSON] Revision + +-- | Updates a revision. +-- +-- /See:/ 'revisionsUpdate' smart constructor. +data RevisionsUpdate = RevisionsUpdate + { _ruuQuotaUser :: !(Maybe Text) + , _ruuPrettyPrint :: !Bool + , _ruuUserIp :: !(Maybe Text) + , _ruuKey :: !(Maybe Text) + , _ruuFileId :: !Text + , _ruuOauthToken :: !(Maybe Text) + , _ruuRevisionId :: !Text + , _ruuFields :: !(Maybe Text) + , _ruuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruuQuotaUser' +-- +-- * 'ruuPrettyPrint' +-- +-- * 'ruuUserIp' +-- +-- * 'ruuKey' +-- +-- * 'ruuFileId' +-- +-- * 'ruuOauthToken' +-- +-- * 'ruuRevisionId' +-- +-- * 'ruuFields' +-- +-- * 'ruuAlt' +revisionsUpdate + :: Text -- ^ 'fileId' + -> Text -- ^ 'revisionId' + -> RevisionsUpdate +revisionsUpdate pRuuFileId_ pRuuRevisionId_ = + RevisionsUpdate + { _ruuQuotaUser = Nothing + , _ruuPrettyPrint = True + , _ruuUserIp = Nothing + , _ruuKey = Nothing + , _ruuFileId = pRuuFileId_ + , _ruuOauthToken = Nothing + , _ruuRevisionId = pRuuRevisionId_ + , _ruuFields = Nothing + , _ruuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruuQuotaUser :: Lens' RevisionsUpdate' (Maybe Text) +ruuQuotaUser + = lens _ruuQuotaUser (\ s a -> s{_ruuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruuPrettyPrint :: Lens' RevisionsUpdate' Bool +ruuPrettyPrint + = lens _ruuPrettyPrint + (\ s a -> s{_ruuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruuUserIp :: Lens' RevisionsUpdate' (Maybe Text) +ruuUserIp + = lens _ruuUserIp (\ s a -> s{_ruuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruuKey :: Lens' RevisionsUpdate' (Maybe Text) +ruuKey = lens _ruuKey (\ s a -> s{_ruuKey = a}) + +-- | The ID for the file. +ruuFileId :: Lens' RevisionsUpdate' Text +ruuFileId + = lens _ruuFileId (\ s a -> s{_ruuFileId = a}) + +-- | OAuth 2.0 token for the current user. +ruuOauthToken :: Lens' RevisionsUpdate' (Maybe Text) +ruuOauthToken + = lens _ruuOauthToken + (\ s a -> s{_ruuOauthToken = a}) + +-- | The ID for the revision. +ruuRevisionId :: Lens' RevisionsUpdate' Text +ruuRevisionId + = lens _ruuRevisionId + (\ s a -> s{_ruuRevisionId = a}) + +-- | Selector specifying which fields to include in a partial response. +ruuFields :: Lens' RevisionsUpdate' (Maybe Text) +ruuFields + = lens _ruuFields (\ s a -> s{_ruuFields = a}) + +-- | Data format for the response. +ruuAlt :: Lens' RevisionsUpdate' Text +ruuAlt = lens _ruuAlt (\ s a -> s{_ruuAlt = a}) + +instance GoogleRequest RevisionsUpdate' where + type Rs RevisionsUpdate' = Revision + request = requestWithRoute defReq driveURL + requestWithRoute r u RevisionsUpdate{..} + = go _ruuQuotaUser _ruuPrettyPrint _ruuUserIp _ruuKey + _ruuFileId + _ruuOauthToken + _ruuRevisionId + _ruuFields + _ruuAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsUpdateAPI) + r + u diff --git a/gogol-drive/gogol-drive.cabal b/gogol-drive/gogol-drive.cabal new file mode 100644 index 000000000..c56590187 --- /dev/null +++ b/gogol-drive/gogol-drive.cabal @@ -0,0 +1,102 @@ +name: gogol-drive +version: 0.0.1 +synopsis: Drive API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The API to interact with Drive. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Drive + , Network.Google.Drive.Types + , Network.Google.Resource.Drive.About.Get + , Network.Google.Resource.Drive.Apps.Get + , Network.Google.Resource.Drive.Apps.List + , Network.Google.Resource.Drive.Changes.Get + , Network.Google.Resource.Drive.Changes.List + , Network.Google.Resource.Drive.Changes.Watch + , Network.Google.Resource.Drive.Channels.Stop + , Network.Google.Resource.Drive.Children.Delete + , Network.Google.Resource.Drive.Children.Get + , Network.Google.Resource.Drive.Children.Insert + , Network.Google.Resource.Drive.Children.List + , Network.Google.Resource.Drive.Comments.Delete + , Network.Google.Resource.Drive.Comments.Get + , Network.Google.Resource.Drive.Comments.Insert + , Network.Google.Resource.Drive.Comments.List + , Network.Google.Resource.Drive.Comments.Patch + , Network.Google.Resource.Drive.Comments.Update + , Network.Google.Resource.Drive.Files.Copy + , Network.Google.Resource.Drive.Files.Delete + , Network.Google.Resource.Drive.Files.EmptyTrash + , Network.Google.Resource.Drive.Files.GenerateIds + , Network.Google.Resource.Drive.Files.Get + , Network.Google.Resource.Drive.Files.Insert + , Network.Google.Resource.Drive.Files.List + , Network.Google.Resource.Drive.Files.Patch + , Network.Google.Resource.Drive.Files.Touch + , Network.Google.Resource.Drive.Files.Trash + , Network.Google.Resource.Drive.Files.Untrash + , Network.Google.Resource.Drive.Files.Update + , Network.Google.Resource.Drive.Files.Watch + , Network.Google.Resource.Drive.Parents.Delete + , Network.Google.Resource.Drive.Parents.Get + , Network.Google.Resource.Drive.Parents.Insert + , Network.Google.Resource.Drive.Parents.List + , Network.Google.Resource.Drive.Permissions.Delete + , Network.Google.Resource.Drive.Permissions.Get + , Network.Google.Resource.Drive.Permissions.GetIdForEmail + , Network.Google.Resource.Drive.Permissions.Insert + , Network.Google.Resource.Drive.Permissions.List + , Network.Google.Resource.Drive.Permissions.Patch + , Network.Google.Resource.Drive.Permissions.Update + , Network.Google.Resource.Drive.Properties.Delete + , Network.Google.Resource.Drive.Properties.Get + , Network.Google.Resource.Drive.Properties.Insert + , Network.Google.Resource.Drive.Properties.List + , Network.Google.Resource.Drive.Properties.Patch + , Network.Google.Resource.Drive.Properties.Update + , Network.Google.Resource.Drive.Realtime.Get + , Network.Google.Resource.Drive.Realtime.Update + , Network.Google.Resource.Drive.Replies.Delete + , Network.Google.Resource.Drive.Replies.Get + , Network.Google.Resource.Drive.Replies.Insert + , Network.Google.Resource.Drive.Replies.List + , Network.Google.Resource.Drive.Replies.Patch + , Network.Google.Resource.Drive.Replies.Update + , Network.Google.Resource.Drive.Revisions.Delete + , Network.Google.Resource.Drive.Revisions.Get + , Network.Google.Resource.Drive.Revisions.List + , Network.Google.Resource.Drive.Revisions.Patch + , Network.Google.Resource.Drive.Revisions.Update + + other-modules: + Network.Google.Drive.Types.Product + , Network.Google.Drive.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-drive/src/.gitkeep b/gogol-drive/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-fitness/LICENSE b/gogol-fitness/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-fitness/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-fitness/Makefile b/gogol-fitness/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-fitness/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-fitness/README.md b/gogol-fitness/README.md new file mode 100644 index 000000000..6f565cc32 --- /dev/null +++ b/gogol-fitness/README.md @@ -0,0 +1,28 @@ +# gogol-fitness + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Fitness. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-fitness` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-fitness/Setup.hs b/gogol-fitness/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-fitness/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-fitness/gen/Network/Google/Fitness.hs b/gogol-fitness/gen/Network/Google/Fitness.hs new file mode 100644 index 000000000..5c0bf04fa --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Fitness.hs @@ -0,0 +1,248 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Fitness +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Google Fit API +-- +-- /See:/ +module Network.Google.Fitness + ( + -- * API + FitnessAPI + , fitnessAPI + , fitnessURL + + -- * Service Methods + + -- * REST Resources + + -- ** FitnessUsersDataSourcesCreate + , module Fitness.Users.DataSources.Create + + -- ** FitnessUsersDataSourcesDatasetsDelete + , module Fitness.Users.DataSources.Datasets.Delete + + -- ** FitnessUsersDataSourcesDatasetsGet + , module Fitness.Users.DataSources.Datasets.Get + + -- ** FitnessUsersDataSourcesDatasetsPatch + , module Fitness.Users.DataSources.Datasets.Patch + + -- ** FitnessUsersDataSourcesDelete + , module Fitness.Users.DataSources.Delete + + -- ** FitnessUsersDataSourcesGet + , module Fitness.Users.DataSources.Get + + -- ** FitnessUsersDataSourcesList + , module Fitness.Users.DataSources.List + + -- ** FitnessUsersDataSourcesPatch + , module Fitness.Users.DataSources.Patch + + -- ** FitnessUsersDataSourcesUpdate + , module Fitness.Users.DataSources.Update + + -- ** FitnessUsersDatasetAggregate + , module Fitness.Users.Dataset.Aggregate + + -- ** FitnessUsersSessionsDelete + , module Fitness.Users.Sessions.Delete + + -- ** FitnessUsersSessionsList + , module Fitness.Users.Sessions.List + + -- ** FitnessUsersSessionsUpdate + , module Fitness.Users.Sessions.Update + + -- * Types + + -- ** Application + , Application + , application + , aPackageName + , aName + , aVersion + , aDetailsUrl + + -- ** AggregateBy + , AggregateBy + , aggregateBy + , abDataTypeName + , abDataSourceId + + -- ** AggregateResponse + , AggregateResponse + , aggregateResponse + , arBucket + + -- ** Dataset + , Dataset + , dataset + , dNextPageToken + , dDataSourceId + , dPoint + , dMinStartTimeNs + , dMaxEndTimeNs + + -- ** AggregateRequest + , AggregateRequest + , aggregateRequest + , arEndTimeMillis + , arAggregateBy + , arBucketBySession + , arBucketByActivityType + , arBucketByTime + , arStartTimeMillis + , arBucketByActivitySegment + + -- ** BucketByActivity + , BucketByActivity + , bucketByActivity + , bbaMinDurationMillis + , bbaActivityDataSourceId + + -- ** Device + , Device + , device + , dManufacturer + , dUid + , dModel + , dVersion + , dType + + -- ** BucketBySession + , BucketBySession + , bucketBySession + , bbsMinDurationMillis + + -- ** Value + , Value + , value + , vMapVal + , vFpVal + , vIntVal + , vStringVal + + -- ** ListSessionsResponse + , ListSessionsResponse + , listSessionsResponse + , lsrNextPageToken + , lsrDeletedSession + , lsrSession + + -- ** DataPoint + , DataPoint + , dataPoint + , dpOriginDataSourceId + , dpRawTimestampNanos + , dpDataTypeName + , dpValue + , dpComputationTimeMillis + , dpEndTimeNanos + , dpModifiedTimeMillis + , dpStartTimeNanos + + -- ** AggregateBucket + , AggregateBucket + , aggregateBucket + , abEndTimeMillis + , abDataset + , abActivity + , abType + , abStartTimeMillis + , abSession + + -- ** ListDataSourcesResponse + , ListDataSourcesResponse + , listDataSourcesResponse + , ldsrDataSource + + -- ** MapValue + , MapValue + , mapValue + , mvFpVal + + -- ** DataTypeField + , DataTypeField + , dataTypeField + , dtfFormat + , dtfName + , dtfOptional + + -- ** DataSource + , DataSource + , dataSource + , dsApplication + , dsDevice + , dsName + , dsDataType + , dsType + , dsDataStreamName + , dsDataStreamId + + -- ** ValueMapValEntry + , ValueMapValEntry + , valueMapValEntry + , vmveValue + , vmveKey + + -- ** DataType + , DataType + , dataType + , dtField + , dtName + + -- ** BucketByTime + , BucketByTime + , bucketByTime + , bbtDurationMillis + + -- ** Session + , Session + , session + , sEndTimeMillis + , sActiveTimeMillis + , sApplication + , sActivityType + , sName + , sModifiedTimeMillis + , sId + , sStartTimeMillis + , sDescription + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude +import Network.Google.Resource.Fitness.Users.Dataset.Aggregate +import Network.Google.Resource.Fitness.Users.DataSources.Create +import Network.Google.Resource.Fitness.Users.DataSources.Datasets.Delete +import Network.Google.Resource.Fitness.Users.DataSources.Datasets.Get +import Network.Google.Resource.Fitness.Users.DataSources.Datasets.Patch +import Network.Google.Resource.Fitness.Users.DataSources.Delete +import Network.Google.Resource.Fitness.Users.DataSources.Get +import Network.Google.Resource.Fitness.Users.DataSources.List +import Network.Google.Resource.Fitness.Users.DataSources.Patch +import Network.Google.Resource.Fitness.Users.DataSources.Update +import Network.Google.Resource.Fitness.Users.Sessions.Delete +import Network.Google.Resource.Fitness.Users.Sessions.List +import Network.Google.Resource.Fitness.Users.Sessions.Update + +{- $resources +TODO +-} + +type FitnessAPI = Users + +fitnessAPI :: Proxy FitnessAPI +fitnessAPI = Proxy diff --git a/gogol-fitness/gen/Network/Google/Fitness/Types.hs b/gogol-fitness/gen/Network/Google/Fitness/Types.hs new file mode 100644 index 000000000..aad33108a --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Fitness/Types.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fitness.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fitness.Types + ( + -- * Service URL + fitnessURL + + -- * Application + , Application + , application + , aPackageName + , aName + , aVersion + , aDetailsUrl + + -- * AggregateBy + , AggregateBy + , aggregateBy + , abDataTypeName + , abDataSourceId + + -- * AggregateResponse + , AggregateResponse + , aggregateResponse + , arBucket + + -- * Dataset + , Dataset + , dataset + , dNextPageToken + , dDataSourceId + , dPoint + , dMinStartTimeNs + , dMaxEndTimeNs + + -- * AggregateRequest + , AggregateRequest + , aggregateRequest + , arEndTimeMillis + , arAggregateBy + , arBucketBySession + , arBucketByActivityType + , arBucketByTime + , arStartTimeMillis + , arBucketByActivitySegment + + -- * BucketByActivity + , BucketByActivity + , bucketByActivity + , bbaMinDurationMillis + , bbaActivityDataSourceId + + -- * Device + , Device + , device + , dManufacturer + , dUid + , dModel + , dVersion + , dType + + -- * BucketBySession + , BucketBySession + , bucketBySession + , bbsMinDurationMillis + + -- * Value + , Value + , value + , vMapVal + , vFpVal + , vIntVal + , vStringVal + + -- * ListSessionsResponse + , ListSessionsResponse + , listSessionsResponse + , lsrNextPageToken + , lsrDeletedSession + , lsrSession + + -- * DataPoint + , DataPoint + , dataPoint + , dpOriginDataSourceId + , dpRawTimestampNanos + , dpDataTypeName + , dpValue + , dpComputationTimeMillis + , dpEndTimeNanos + , dpModifiedTimeMillis + , dpStartTimeNanos + + -- * AggregateBucket + , AggregateBucket + , aggregateBucket + , abEndTimeMillis + , abDataset + , abActivity + , abType + , abStartTimeMillis + , abSession + + -- * ListDataSourcesResponse + , ListDataSourcesResponse + , listDataSourcesResponse + , ldsrDataSource + + -- * MapValue + , MapValue + , mapValue + , mvFpVal + + -- * DataTypeField + , DataTypeField + , dataTypeField + , dtfFormat + , dtfName + , dtfOptional + + -- * DataSource + , DataSource + , dataSource + , dsApplication + , dsDevice + , dsName + , dsDataType + , dsType + , dsDataStreamName + , dsDataStreamId + + -- * ValueMapValEntry + , ValueMapValEntry + , valueMapValEntry + , vmveValue + , vmveKey + + -- * DataType + , DataType + , dataType + , dtField + , dtName + + -- * BucketByTime + , BucketByTime + , bucketByTime + , bbtDurationMillis + + -- * Session + , Session + , session + , sEndTimeMillis + , sActiveTimeMillis + , sApplication + , sActivityType + , sName + , sModifiedTimeMillis + , sId + , sStartTimeMillis + , sDescription + ) where + +import Network.Google.Fitness.Types.Product +import Network.Google.Fitness.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Fitness. +fitnessURL :: BaseURL +fitnessURL + = BaseUrl Https + "https://www.googleapis.com/fitness/v1/users/" + 443 diff --git a/gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs b/gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs new file mode 100644 index 000000000..116b6c9e4 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs @@ -0,0 +1,1513 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fitness.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fitness.Types.Product where + +import Network.Google.Fitness.Types.Sum +import Network.Google.Prelude + +-- | See: +-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/Application.java +-- +-- /See:/ 'application' smart constructor. +data Application = Application + { _aPackageName :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aVersion :: !(Maybe Text) + , _aDetailsUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Application' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aPackageName' +-- +-- * 'aName' +-- +-- * 'aVersion' +-- +-- * 'aDetailsUrl' +application + :: Application +application = + Application + { _aPackageName = Nothing + , _aName = Nothing + , _aVersion = Nothing + , _aDetailsUrl = Nothing + } + +-- | Package name for this application. This is used as a unique identifier +-- when created by Android applications, but cannot be specified by REST +-- clients. REST clients will have their developer project number reflected +-- into the Data Source data stream IDs, instead of the packageName. +aPackageName :: Lens' Application (Maybe Text) +aPackageName + = lens _aPackageName (\ s a -> s{_aPackageName = a}) + +-- | The name of this application. This is required for REST clients, but we +-- do not enforce uniqueness of this name. It is provided as a matter of +-- convenience for other developers who would like to identify which REST +-- created an Application or Data Source. +aName :: Lens' Application (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | Version of the application. You should update this field whenever the +-- application changes in a way that affects the computation of the data. +aVersion :: Lens' Application (Maybe Text) +aVersion = lens _aVersion (\ s a -> s{_aVersion = a}) + +-- | An optional URI that can be used to link back to the application. +aDetailsUrl :: Lens' Application (Maybe Text) +aDetailsUrl + = lens _aDetailsUrl (\ s a -> s{_aDetailsUrl = a}) + +instance FromJSON Application where + parseJSON + = withObject "Application" + (\ o -> + Application <$> + (o .:? "packageName") <*> (o .:? "name") <*> + (o .:? "version") + <*> (o .:? "detailsUrl")) + +instance ToJSON Application where + toJSON Application{..} + = object + (catMaybes + [("packageName" .=) <$> _aPackageName, + ("name" .=) <$> _aName, ("version" .=) <$> _aVersion, + ("detailsUrl" .=) <$> _aDetailsUrl]) + +-- | The specification of which data to aggregate. +-- +-- /See:/ 'aggregateBy' smart constructor. +data AggregateBy = AggregateBy + { _abDataTypeName :: !(Maybe Text) + , _abDataSourceId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregateBy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'abDataTypeName' +-- +-- * 'abDataSourceId' +aggregateBy + :: AggregateBy +aggregateBy = + AggregateBy + { _abDataTypeName = Nothing + , _abDataSourceId = Nothing + } + +-- | The data type to aggregate. All data sources providing this data type +-- will contribute data to the aggregation. The response will contain a +-- single dataset for this data type name. The dataset will have a data +-- source ID of derived:com.google.:com.google.android.gms:aggregated +abDataTypeName :: Lens' AggregateBy (Maybe Text) +abDataTypeName + = lens _abDataTypeName + (\ s a -> s{_abDataTypeName = a}) + +-- | A data source ID to aggregate. Mutually exclusive of dataTypeName. Only +-- data from the specified data source ID will be included in the +-- aggregation. The dataset in the response will have the same data source +-- ID. +abDataSourceId :: Lens' AggregateBy (Maybe Text) +abDataSourceId + = lens _abDataSourceId + (\ s a -> s{_abDataSourceId = a}) + +instance FromJSON AggregateBy where + parseJSON + = withObject "AggregateBy" + (\ o -> + AggregateBy <$> + (o .:? "dataTypeName") <*> (o .:? "dataSourceId")) + +instance ToJSON AggregateBy where + toJSON AggregateBy{..} + = object + (catMaybes + [("dataTypeName" .=) <$> _abDataTypeName, + ("dataSourceId" .=) <$> _abDataSourceId]) + +-- +-- /See:/ 'aggregateResponse' smart constructor. +newtype AggregateResponse = AggregateResponse + { _arBucket :: Maybe [Maybe AggregateBucket] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arBucket' +aggregateResponse + :: AggregateResponse +aggregateResponse = + AggregateResponse + { _arBucket = Nothing + } + +-- | A list of buckets containing the aggregated data. +arBucket :: Lens' AggregateResponse [Maybe AggregateBucket] +arBucket + = lens _arBucket (\ s a -> s{_arBucket = a}) . + _Default + . _Coerce + +instance FromJSON AggregateResponse where + parseJSON + = withObject "AggregateResponse" + (\ o -> + AggregateResponse <$> (o .:? "bucket" .!= mempty)) + +instance ToJSON AggregateResponse where + toJSON AggregateResponse{..} + = object (catMaybes [("bucket" .=) <$> _arBucket]) + +-- | A dataset represents a projection container for data points. They do not +-- carry any info of their own. Datasets represent a set of data points +-- from a particular data source. A data point can be found in more than +-- one dataset. +-- +-- /See:/ 'dataset' smart constructor. +data Dataset = Dataset + { _dNextPageToken :: !(Maybe Text) + , _dDataSourceId :: !(Maybe Text) + , _dPoint :: !(Maybe [Maybe DataPoint]) + , _dMinStartTimeNs :: !(Maybe Int64) + , _dMaxEndTimeNs :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Dataset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dNextPageToken' +-- +-- * 'dDataSourceId' +-- +-- * 'dPoint' +-- +-- * 'dMinStartTimeNs' +-- +-- * 'dMaxEndTimeNs' +dataset + :: Dataset +dataset = + Dataset + { _dNextPageToken = Nothing + , _dDataSourceId = Nothing + , _dPoint = Nothing + , _dMinStartTimeNs = Nothing + , _dMaxEndTimeNs = Nothing + } + +-- | This token will be set when a dataset is received in response to a GET +-- request and the dataset is too large to be included in a single +-- response. Provide this value in a subsequent GET request to return the +-- next page of data points within this dataset. +dNextPageToken :: Lens' Dataset (Maybe Text) +dNextPageToken + = lens _dNextPageToken + (\ s a -> s{_dNextPageToken = a}) + +-- | The data stream ID of the data source that created the points in this +-- dataset. +dDataSourceId :: Lens' Dataset (Maybe Text) +dDataSourceId + = lens _dDataSourceId + (\ s a -> s{_dDataSourceId = a}) + +-- | A partial list of data points contained in the dataset, ordered by +-- largest endTimeNanos first. This list is considered complete when +-- retrieving a small dataset and partial when patching a dataset or +-- retrieving a dataset that is too large to include in a single response. +dPoint :: Lens' Dataset [Maybe DataPoint] +dPoint + = lens _dPoint (\ s a -> s{_dPoint = a}) . _Default . + _Coerce + +-- | The smallest start time of all data points in this possibly partial +-- representation of the dataset. Time is in nanoseconds from epoch. This +-- should also match the first part of the dataset identifier. +dMinStartTimeNs :: Lens' Dataset (Maybe Int64) +dMinStartTimeNs + = lens _dMinStartTimeNs + (\ s a -> s{_dMinStartTimeNs = a}) + +-- | The largest end time of all data points in this possibly partial +-- representation of the dataset. Time is in nanoseconds from epoch. This +-- should also match the first part of the dataset identifier. +dMaxEndTimeNs :: Lens' Dataset (Maybe Int64) +dMaxEndTimeNs + = lens _dMaxEndTimeNs + (\ s a -> s{_dMaxEndTimeNs = a}) + +instance FromJSON Dataset where + parseJSON + = withObject "Dataset" + (\ o -> + Dataset <$> + (o .:? "nextPageToken") <*> (o .:? "dataSourceId") + <*> (o .:? "point" .!= mempty) + <*> (o .:? "minStartTimeNs") + <*> (o .:? "maxEndTimeNs")) + +instance ToJSON Dataset where + toJSON Dataset{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dNextPageToken, + ("dataSourceId" .=) <$> _dDataSourceId, + ("point" .=) <$> _dPoint, + ("minStartTimeNs" .=) <$> _dMinStartTimeNs, + ("maxEndTimeNs" .=) <$> _dMaxEndTimeNs]) + +-- +-- /See:/ 'aggregateRequest' smart constructor. +data AggregateRequest = AggregateRequest + { _arEndTimeMillis :: !(Maybe Int64) + , _arAggregateBy :: !(Maybe [Maybe AggregateBy]) + , _arBucketBySession :: !(Maybe (Maybe BucketBySession)) + , _arBucketByActivityType :: !(Maybe (Maybe BucketByActivity)) + , _arBucketByTime :: !(Maybe (Maybe BucketByTime)) + , _arStartTimeMillis :: !(Maybe Int64) + , _arBucketByActivitySegment :: !(Maybe (Maybe BucketByActivity)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arEndTimeMillis' +-- +-- * 'arAggregateBy' +-- +-- * 'arBucketBySession' +-- +-- * 'arBucketByActivityType' +-- +-- * 'arBucketByTime' +-- +-- * 'arStartTimeMillis' +-- +-- * 'arBucketByActivitySegment' +aggregateRequest + :: AggregateRequest +aggregateRequest = + AggregateRequest + { _arEndTimeMillis = Nothing + , _arAggregateBy = Nothing + , _arBucketBySession = Nothing + , _arBucketByActivityType = Nothing + , _arBucketByTime = Nothing + , _arStartTimeMillis = Nothing + , _arBucketByActivitySegment = Nothing + } + +-- | The end of a window of time. Data that intersects with this time window +-- will be aggregated. The time is in milliseconds since epoch, inclusive. +arEndTimeMillis :: Lens' AggregateRequest (Maybe Int64) +arEndTimeMillis + = lens _arEndTimeMillis + (\ s a -> s{_arEndTimeMillis = a}) + +-- | The specification of data to be aggregated. At least one aggregateBy +-- spec must be provided. All data that is specified will be aggregated +-- using the same bucketing criteria. There will be one dataset in the +-- response for every aggregateBy spec. +arAggregateBy :: Lens' AggregateRequest [Maybe AggregateBy] +arAggregateBy + = lens _arAggregateBy + (\ s a -> s{_arAggregateBy = a}) + . _Default + . _Coerce + +-- | Specifies that data be aggregated by user sessions. Data that does not +-- fall within the time range of a session will not be included in the +-- response. Mutually exclusive of other bucketing specifications. +arBucketBySession :: Lens' AggregateRequest (Maybe (Maybe BucketBySession)) +arBucketBySession + = lens _arBucketBySession + (\ s a -> s{_arBucketBySession = a}) + +-- | Specifies that data be aggregated by the type of activity being +-- performed when the data was recorded. All data that was recorded during +-- a certain activity type (for the given time range) will be aggregated +-- into the same bucket. Data that was recorded while the user was not +-- active will not be included in the response. Mutually exclusive of other +-- bucketing specifications. +arBucketByActivityType :: Lens' AggregateRequest (Maybe (Maybe BucketByActivity)) +arBucketByActivityType + = lens _arBucketByActivityType + (\ s a -> s{_arBucketByActivityType = a}) + +-- | Specifies that data be aggregated by a single time interval. Mutually +-- exclusive of other bucketing specifications. +arBucketByTime :: Lens' AggregateRequest (Maybe (Maybe BucketByTime)) +arBucketByTime + = lens _arBucketByTime + (\ s a -> s{_arBucketByTime = a}) + +-- | The start of a window of time. Data that intersects with this time +-- window will be aggregated. The time is in milliseconds since epoch, +-- inclusive. +arStartTimeMillis :: Lens' AggregateRequest (Maybe Int64) +arStartTimeMillis + = lens _arStartTimeMillis + (\ s a -> s{_arStartTimeMillis = a}) + +-- | Specifies that data be aggregated each activity segment recored for a +-- user. Similar to bucketByActivitySegment, but bucketing is done for each +-- activity segment rather than all segments of the same type. Mutually +-- exclusive of other bucketing specifications. +arBucketByActivitySegment :: Lens' AggregateRequest (Maybe (Maybe BucketByActivity)) +arBucketByActivitySegment + = lens _arBucketByActivitySegment + (\ s a -> s{_arBucketByActivitySegment = a}) + +instance FromJSON AggregateRequest where + parseJSON + = withObject "AggregateRequest" + (\ o -> + AggregateRequest <$> + (o .:? "endTimeMillis") <*> + (o .:? "aggregateBy" .!= mempty) + <*> (o .:? "bucketBySession") + <*> (o .:? "bucketByActivityType") + <*> (o .:? "bucketByTime") + <*> (o .:? "startTimeMillis") + <*> (o .:? "bucketByActivitySegment")) + +instance ToJSON AggregateRequest where + toJSON AggregateRequest{..} + = object + (catMaybes + [("endTimeMillis" .=) <$> _arEndTimeMillis, + ("aggregateBy" .=) <$> _arAggregateBy, + ("bucketBySession" .=) <$> _arBucketBySession, + ("bucketByActivityType" .=) <$> + _arBucketByActivityType, + ("bucketByTime" .=) <$> _arBucketByTime, + ("startTimeMillis" .=) <$> _arStartTimeMillis, + ("bucketByActivitySegment" .=) <$> + _arBucketByActivitySegment]) + +-- +-- /See:/ 'bucketByActivity' smart constructor. +data BucketByActivity = BucketByActivity + { _bbaMinDurationMillis :: !(Maybe Int64) + , _bbaActivityDataSourceId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketByActivity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bbaMinDurationMillis' +-- +-- * 'bbaActivityDataSourceId' +bucketByActivity + :: BucketByActivity +bucketByActivity = + BucketByActivity + { _bbaMinDurationMillis = Nothing + , _bbaActivityDataSourceId = Nothing + } + +-- | Specifies that only activity segments of duration longer than +-- minDurationMillis are considered and used as a container for aggregated +-- data. +bbaMinDurationMillis :: Lens' BucketByActivity (Maybe Int64) +bbaMinDurationMillis + = lens _bbaMinDurationMillis + (\ s a -> s{_bbaMinDurationMillis = a}) + +-- | The default activity stream will be used if a specific +-- activityDataSourceId is not specified. +bbaActivityDataSourceId :: Lens' BucketByActivity (Maybe Text) +bbaActivityDataSourceId + = lens _bbaActivityDataSourceId + (\ s a -> s{_bbaActivityDataSourceId = a}) + +instance FromJSON BucketByActivity where + parseJSON + = withObject "BucketByActivity" + (\ o -> + BucketByActivity <$> + (o .:? "minDurationMillis") <*> + (o .:? "activityDataSourceId")) + +instance ToJSON BucketByActivity where + toJSON BucketByActivity{..} + = object + (catMaybes + [("minDurationMillis" .=) <$> _bbaMinDurationMillis, + ("activityDataSourceId" .=) <$> + _bbaActivityDataSourceId]) + +-- | Representation of an integrated device (such as a phone or a wearable) +-- that can hold sensors. Each sensor is exposed as a data source. The main +-- purpose of the device information contained in this class is to identify +-- the hardware of a particular data source. This can be useful in +-- different ways, including: - Distinguishing two similar sensors on +-- different devices (the step counter on two nexus 5 phones, for instance) +-- - Display the source of data to the user (by using the device make \/ +-- model) - Treat data differently depending on sensor type (accelerometers +-- on a watch may give different patterns than those on a phone) - Build +-- different analysis models for each device\/version. +-- +-- /See:/ 'device' smart constructor. +data Device = Device + { _dManufacturer :: !(Maybe Text) + , _dUid :: !(Maybe Text) + , _dModel :: !(Maybe Text) + , _dVersion :: !(Maybe Text) + , _dType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Device' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dManufacturer' +-- +-- * 'dUid' +-- +-- * 'dModel' +-- +-- * 'dVersion' +-- +-- * 'dType' +device + :: Device +device = + Device + { _dManufacturer = Nothing + , _dUid = Nothing + , _dModel = Nothing + , _dVersion = Nothing + , _dType = Nothing + } + +-- | Manufacturer of the product\/hardware. +dManufacturer :: Lens' Device (Maybe Text) +dManufacturer + = lens _dManufacturer + (\ s a -> s{_dManufacturer = a}) + +-- | The serial number or other unique ID for the hardware. This field is +-- obfuscated when read by any REST or Android client that did not create +-- the data source. Only the data source creator will see the uid field in +-- clear and normal form. +dUid :: Lens' Device (Maybe Text) +dUid = lens _dUid (\ s a -> s{_dUid = a}) + +-- | End-user visible model name for the device. +dModel :: Lens' Device (Maybe Text) +dModel = lens _dModel (\ s a -> s{_dModel = a}) + +-- | Version string for the device hardware\/software. +dVersion :: Lens' Device (Maybe Text) +dVersion = lens _dVersion (\ s a -> s{_dVersion = a}) + +-- | A constant representing the type of the device. +dType :: Lens' Device (Maybe Text) +dType = lens _dType (\ s a -> s{_dType = a}) + +instance FromJSON Device where + parseJSON + = withObject "Device" + (\ o -> + Device <$> + (o .:? "manufacturer") <*> (o .:? "uid") <*> + (o .:? "model") + <*> (o .:? "version") + <*> (o .:? "type")) + +instance ToJSON Device where + toJSON Device{..} + = object + (catMaybes + [("manufacturer" .=) <$> _dManufacturer, + ("uid" .=) <$> _dUid, ("model" .=) <$> _dModel, + ("version" .=) <$> _dVersion, + ("type" .=) <$> _dType]) + +-- +-- /See:/ 'bucketBySession' smart constructor. +newtype BucketBySession = BucketBySession + { _bbsMinDurationMillis :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketBySession' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bbsMinDurationMillis' +bucketBySession + :: BucketBySession +bucketBySession = + BucketBySession + { _bbsMinDurationMillis = Nothing + } + +-- | Specifies that only sessions of duration longer than minDurationMillis +-- are considered and used as a container for aggregated data. +bbsMinDurationMillis :: Lens' BucketBySession (Maybe Int64) +bbsMinDurationMillis + = lens _bbsMinDurationMillis + (\ s a -> s{_bbsMinDurationMillis = a}) + +instance FromJSON BucketBySession where + parseJSON + = withObject "BucketBySession" + (\ o -> + BucketBySession <$> (o .:? "minDurationMillis")) + +instance ToJSON BucketBySession where + toJSON BucketBySession{..} + = object + (catMaybes + [("minDurationMillis" .=) <$> _bbsMinDurationMillis]) + +-- | Holder object for the value of a single field in a data point. A field +-- value has a particular format and is only ever set to one of an integer +-- or a floating point value. +-- +-- /See:/ 'value' smart constructor. +data Value = Value + { _vMapVal :: !(Maybe [Maybe ValueMapValEntry]) + , _vFpVal :: !(Maybe Double) + , _vIntVal :: !(Maybe Int32) + , _vStringVal :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Value' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vMapVal' +-- +-- * 'vFpVal' +-- +-- * 'vIntVal' +-- +-- * 'vStringVal' +value + :: Value +value = + Value + { _vMapVal = Nothing + , _vFpVal = Nothing + , _vIntVal = Nothing + , _vStringVal = Nothing + } + +-- | Map value. The valid key space and units for the corresponding value of +-- each entry should be documented as part of the data type definition. +-- Keys should be kept small whenever possible. Data streams with large +-- keys and high data frequency may be down sampled. +vMapVal :: Lens' Value [Maybe ValueMapValEntry] +vMapVal + = lens _vMapVal (\ s a -> s{_vMapVal = a}) . _Default + . _Coerce + +-- | Floating point value. When this is set, other values must not be set. +vFpVal :: Lens' Value (Maybe Double) +vFpVal = lens _vFpVal (\ s a -> s{_vFpVal = a}) + +-- | Integer value. When this is set, other values must not be set. +vIntVal :: Lens' Value (Maybe Int32) +vIntVal = lens _vIntVal (\ s a -> s{_vIntVal = a}) + +-- | String value. When this is set, other values must not be set. Strings +-- should be kept small whenever possible. Data streams with large string +-- values and high data frequency may be down sampled. +vStringVal :: Lens' Value (Maybe Text) +vStringVal + = lens _vStringVal (\ s a -> s{_vStringVal = a}) + +instance FromJSON Value where + parseJSON + = withObject "Value" + (\ o -> + Value <$> + (o .:? "mapVal" .!= mempty) <*> (o .:? "fpVal") <*> + (o .:? "intVal") + <*> (o .:? "stringVal")) + +instance ToJSON Value where + toJSON Value{..} + = object + (catMaybes + [("mapVal" .=) <$> _vMapVal, + ("fpVal" .=) <$> _vFpVal, ("intVal" .=) <$> _vIntVal, + ("stringVal" .=) <$> _vStringVal]) + +-- +-- /See:/ 'listSessionsResponse' smart constructor. +data ListSessionsResponse = ListSessionsResponse + { _lsrNextPageToken :: !(Maybe Text) + , _lsrDeletedSession :: !(Maybe [Maybe Session]) + , _lsrSession :: !(Maybe [Maybe Session]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListSessionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsrNextPageToken' +-- +-- * 'lsrDeletedSession' +-- +-- * 'lsrSession' +listSessionsResponse + :: ListSessionsResponse +listSessionsResponse = + ListSessionsResponse + { _lsrNextPageToken = Nothing + , _lsrDeletedSession = Nothing + , _lsrSession = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +lsrNextPageToken :: Lens' ListSessionsResponse (Maybe Text) +lsrNextPageToken + = lens _lsrNextPageToken + (\ s a -> s{_lsrNextPageToken = a}) + +-- | If includeDeleted is set to true in the request, this list will contain +-- sessions deleted with original end times that are within the startTime +-- and endTime frame. +lsrDeletedSession :: Lens' ListSessionsResponse [Maybe Session] +lsrDeletedSession + = lens _lsrDeletedSession + (\ s a -> s{_lsrDeletedSession = a}) + . _Default + . _Coerce + +-- | Sessions with an end time that is between startTime and endTime of the +-- request. +lsrSession :: Lens' ListSessionsResponse [Maybe Session] +lsrSession + = lens _lsrSession (\ s a -> s{_lsrSession = a}) . + _Default + . _Coerce + +instance FromJSON ListSessionsResponse where + parseJSON + = withObject "ListSessionsResponse" + (\ o -> + ListSessionsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "deletedSession" .!= mempty) + <*> (o .:? "session" .!= mempty)) + +instance ToJSON ListSessionsResponse where + toJSON ListSessionsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lsrNextPageToken, + ("deletedSession" .=) <$> _lsrDeletedSession, + ("session" .=) <$> _lsrSession]) + +-- | Represents a single data point, generated by a particular data source. A +-- data point holds a value for each field, an end timestamp and an +-- optional start time. The exact semantics of each of these attributes are +-- specified in the documentation for the particular data type. A data +-- point can represent an instantaneous measurement, reading or input +-- observation, as well as averages or aggregates over a time interval. +-- Check the data type documentation to determine which is the case for a +-- particular data type. Data points always contain one value for each +-- field of the data type. +-- +-- /See:/ 'dataPoint' smart constructor. +data DataPoint = DataPoint + { _dpOriginDataSourceId :: !(Maybe Text) + , _dpRawTimestampNanos :: !(Maybe Int64) + , _dpDataTypeName :: !(Maybe Text) + , _dpValue :: !(Maybe [Maybe Value]) + , _dpComputationTimeMillis :: !(Maybe Int64) + , _dpEndTimeNanos :: !(Maybe Int64) + , _dpModifiedTimeMillis :: !(Maybe Int64) + , _dpStartTimeNanos :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpOriginDataSourceId' +-- +-- * 'dpRawTimestampNanos' +-- +-- * 'dpDataTypeName' +-- +-- * 'dpValue' +-- +-- * 'dpComputationTimeMillis' +-- +-- * 'dpEndTimeNanos' +-- +-- * 'dpModifiedTimeMillis' +-- +-- * 'dpStartTimeNanos' +dataPoint + :: DataPoint +dataPoint = + DataPoint + { _dpOriginDataSourceId = Nothing + , _dpRawTimestampNanos = Nothing + , _dpDataTypeName = Nothing + , _dpValue = Nothing + , _dpComputationTimeMillis = Nothing + , _dpEndTimeNanos = Nothing + , _dpModifiedTimeMillis = Nothing + , _dpStartTimeNanos = Nothing + } + +-- | If the data point is contained in a dataset for a derived data source, +-- this field will be populated with the data source stream ID that created +-- the data point originally. +dpOriginDataSourceId :: Lens' DataPoint (Maybe Text) +dpOriginDataSourceId + = lens _dpOriginDataSourceId + (\ s a -> s{_dpOriginDataSourceId = a}) + +-- | The raw timestamp from the original SensorEvent. +dpRawTimestampNanos :: Lens' DataPoint (Maybe Int64) +dpRawTimestampNanos + = lens _dpRawTimestampNanos + (\ s a -> s{_dpRawTimestampNanos = a}) + +-- | The data type defining the format of the values in this data point. +dpDataTypeName :: Lens' DataPoint (Maybe Text) +dpDataTypeName + = lens _dpDataTypeName + (\ s a -> s{_dpDataTypeName = a}) + +-- | Values of each data type field for the data point. It is expected that +-- each value corresponding to a data type field will occur in the same +-- order that the field is listed with in the data type specified in a data +-- source. Only one of integer and floating point fields will be populated, +-- depending on the format enum value within data source\'s type field. +dpValue :: Lens' DataPoint [Maybe Value] +dpValue + = lens _dpValue (\ s a -> s{_dpValue = a}) . _Default + . _Coerce + +-- | Used for version checking during transformation; that is, a datapoint +-- can only replace another datapoint that has an older computation time +-- stamp. +dpComputationTimeMillis :: Lens' DataPoint (Maybe Int64) +dpComputationTimeMillis + = lens _dpComputationTimeMillis + (\ s a -> s{_dpComputationTimeMillis = a}) + +-- | The end time of the interval represented by this data point, in +-- nanoseconds since epoch. +dpEndTimeNanos :: Lens' DataPoint (Maybe Int64) +dpEndTimeNanos + = lens _dpEndTimeNanos + (\ s a -> s{_dpEndTimeNanos = a}) + +-- | Indicates the last time this data point was modified. Useful only in +-- contexts where we are listing the data changes, rather than representing +-- the current state of the data. +dpModifiedTimeMillis :: Lens' DataPoint (Maybe Int64) +dpModifiedTimeMillis + = lens _dpModifiedTimeMillis + (\ s a -> s{_dpModifiedTimeMillis = a}) + +-- | The start time of the interval represented by this data point, in +-- nanoseconds since epoch. +dpStartTimeNanos :: Lens' DataPoint (Maybe Int64) +dpStartTimeNanos + = lens _dpStartTimeNanos + (\ s a -> s{_dpStartTimeNanos = a}) + +instance FromJSON DataPoint where + parseJSON + = withObject "DataPoint" + (\ o -> + DataPoint <$> + (o .:? "originDataSourceId") <*> + (o .:? "rawTimestampNanos") + <*> (o .:? "dataTypeName") + <*> (o .:? "value" .!= mempty) + <*> (o .:? "computationTimeMillis") + <*> (o .:? "endTimeNanos") + <*> (o .:? "modifiedTimeMillis") + <*> (o .:? "startTimeNanos")) + +instance ToJSON DataPoint where + toJSON DataPoint{..} + = object + (catMaybes + [("originDataSourceId" .=) <$> _dpOriginDataSourceId, + ("rawTimestampNanos" .=) <$> _dpRawTimestampNanos, + ("dataTypeName" .=) <$> _dpDataTypeName, + ("value" .=) <$> _dpValue, + ("computationTimeMillis" .=) <$> + _dpComputationTimeMillis, + ("endTimeNanos" .=) <$> _dpEndTimeNanos, + ("modifiedTimeMillis" .=) <$> _dpModifiedTimeMillis, + ("startTimeNanos" .=) <$> _dpStartTimeNanos]) + +-- +-- /See:/ 'aggregateBucket' smart constructor. +data AggregateBucket = AggregateBucket + { _abEndTimeMillis :: !(Maybe Int64) + , _abDataset :: !(Maybe [Maybe Dataset]) + , _abActivity :: !(Maybe Int32) + , _abType :: !(Maybe Text) + , _abStartTimeMillis :: !(Maybe Int64) + , _abSession :: !(Maybe (Maybe Session)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregateBucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'abEndTimeMillis' +-- +-- * 'abDataset' +-- +-- * 'abActivity' +-- +-- * 'abType' +-- +-- * 'abStartTimeMillis' +-- +-- * 'abSession' +aggregateBucket + :: AggregateBucket +aggregateBucket = + AggregateBucket + { _abEndTimeMillis = Nothing + , _abDataset = Nothing + , _abActivity = Nothing + , _abType = Nothing + , _abStartTimeMillis = Nothing + , _abSession = Nothing + } + +-- | The end time for the aggregated data, in milliseconds since epoch, +-- inclusive. +abEndTimeMillis :: Lens' AggregateBucket (Maybe Int64) +abEndTimeMillis + = lens _abEndTimeMillis + (\ s a -> s{_abEndTimeMillis = a}) + +-- | There will be one dataset per AggregateBy in the request. +abDataset :: Lens' AggregateBucket [Maybe Dataset] +abDataset + = lens _abDataset (\ s a -> s{_abDataset = a}) . + _Default + . _Coerce + +-- | Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT +abActivity :: Lens' AggregateBucket (Maybe Int32) +abActivity + = lens _abActivity (\ s a -> s{_abActivity = a}) + +-- | The type of a bucket signifies how the data aggregation is performed in +-- the bucket. +abType :: Lens' AggregateBucket (Maybe Text) +abType = lens _abType (\ s a -> s{_abType = a}) + +-- | The start time for the aggregated data, in milliseconds since epoch, +-- inclusive. +abStartTimeMillis :: Lens' AggregateBucket (Maybe Int64) +abStartTimeMillis + = lens _abStartTimeMillis + (\ s a -> s{_abStartTimeMillis = a}) + +-- | Available for Bucket.Type.SESSION +abSession :: Lens' AggregateBucket (Maybe (Maybe Session)) +abSession + = lens _abSession (\ s a -> s{_abSession = a}) + +instance FromJSON AggregateBucket where + parseJSON + = withObject "AggregateBucket" + (\ o -> + AggregateBucket <$> + (o .:? "endTimeMillis") <*> + (o .:? "dataset" .!= mempty) + <*> (o .:? "activity") + <*> (o .:? "type") + <*> (o .:? "startTimeMillis") + <*> (o .:? "session")) + +instance ToJSON AggregateBucket where + toJSON AggregateBucket{..} + = object + (catMaybes + [("endTimeMillis" .=) <$> _abEndTimeMillis, + ("dataset" .=) <$> _abDataset, + ("activity" .=) <$> _abActivity, + ("type" .=) <$> _abType, + ("startTimeMillis" .=) <$> _abStartTimeMillis, + ("session" .=) <$> _abSession]) + +-- +-- /See:/ 'listDataSourcesResponse' smart constructor. +newtype ListDataSourcesResponse = ListDataSourcesResponse + { _ldsrDataSource :: Maybe [Maybe DataSource] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListDataSourcesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldsrDataSource' +listDataSourcesResponse + :: ListDataSourcesResponse +listDataSourcesResponse = + ListDataSourcesResponse + { _ldsrDataSource = Nothing + } + +-- | A previously created data source. +ldsrDataSource :: Lens' ListDataSourcesResponse [Maybe DataSource] +ldsrDataSource + = lens _ldsrDataSource + (\ s a -> s{_ldsrDataSource = a}) + . _Default + . _Coerce + +instance FromJSON ListDataSourcesResponse where + parseJSON + = withObject "ListDataSourcesResponse" + (\ o -> + ListDataSourcesResponse <$> + (o .:? "dataSource" .!= mempty)) + +instance ToJSON ListDataSourcesResponse where + toJSON ListDataSourcesResponse{..} + = object + (catMaybes [("dataSource" .=) <$> _ldsrDataSource]) + +-- | Holder object for the value of an entry in a map field of a data point. +-- A map value supports a subset of the formats that the regular Value +-- supports. +-- +-- /See:/ 'mapValue' smart constructor. +newtype MapValue = MapValue + { _mvFpVal :: Maybe Double + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mvFpVal' +mapValue + :: MapValue +mapValue = + MapValue + { _mvFpVal = Nothing + } + +-- | Floating point value. +mvFpVal :: Lens' MapValue (Maybe Double) +mvFpVal = lens _mvFpVal (\ s a -> s{_mvFpVal = a}) + +instance FromJSON MapValue where + parseJSON + = withObject "MapValue" + (\ o -> MapValue <$> (o .:? "fpVal")) + +instance ToJSON MapValue where + toJSON MapValue{..} + = object (catMaybes [("fpVal" .=) <$> _mvFpVal]) + +-- | In case of multi-dimensional data (such as an accelerometer with x, y, +-- and z axes) each field represents one dimension. Each data type field +-- has a unique name which identifies it. The field also defines the format +-- of the data (int, float, etc.). This message is only instantiated in +-- code and not used for wire comms or stored in any way. +-- +-- /See:/ 'dataTypeField' smart constructor. +data DataTypeField = DataTypeField + { _dtfFormat :: !(Maybe Text) + , _dtfName :: !(Maybe Text) + , _dtfOptional :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataTypeField' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtfFormat' +-- +-- * 'dtfName' +-- +-- * 'dtfOptional' +dataTypeField + :: DataTypeField +dataTypeField = + DataTypeField + { _dtfFormat = Nothing + , _dtfName = Nothing + , _dtfOptional = Nothing + } + +-- | The different supported formats for each field in a data type. +dtfFormat :: Lens' DataTypeField (Maybe Text) +dtfFormat + = lens _dtfFormat (\ s a -> s{_dtfFormat = a}) + +-- | Defines the name and format of data. Unlike data type names, field names +-- are not namespaced, and only need to be unique within the data type. +dtfName :: Lens' DataTypeField (Maybe Text) +dtfName = lens _dtfName (\ s a -> s{_dtfName = a}) + +dtfOptional :: Lens' DataTypeField (Maybe Bool) +dtfOptional + = lens _dtfOptional (\ s a -> s{_dtfOptional = a}) + +instance FromJSON DataTypeField where + parseJSON + = withObject "DataTypeField" + (\ o -> + DataTypeField <$> + (o .:? "format") <*> (o .:? "name") <*> + (o .:? "optional")) + +instance ToJSON DataTypeField where + toJSON DataTypeField{..} + = object + (catMaybes + [("format" .=) <$> _dtfFormat, + ("name" .=) <$> _dtfName, + ("optional" .=) <$> _dtfOptional]) + +-- | Definition of a unique source of sensor data. Data sources can expose +-- raw data coming from hardware sensors on local or companion devices. +-- They can also expose derived data, created by transforming or merging +-- other data sources. Multiple data sources can exist for the same data +-- type. Every data point inserted into or read from this service has an +-- associated data source. The data source contains enough information to +-- uniquely identify its data, including the hardware device and the +-- application that collected and\/or transformed the data. It also holds +-- useful metadata, such as the hardware and application versions, and the +-- device type. Each data source produces a unique stream of data, with a +-- unique identifier. Not all changes to data source affect the stream +-- identifier, so that data collected by updated versions of the same +-- application\/device can still be considered to belong to the same data +-- stream. +-- +-- /See:/ 'dataSource' smart constructor. +data DataSource = DataSource + { _dsApplication :: !(Maybe (Maybe Application)) + , _dsDevice :: !(Maybe (Maybe Device)) + , _dsName :: !(Maybe Text) + , _dsDataType :: !(Maybe (Maybe DataType)) + , _dsType :: !(Maybe Text) + , _dsDataStreamName :: !(Maybe Text) + , _dsDataStreamId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsApplication' +-- +-- * 'dsDevice' +-- +-- * 'dsName' +-- +-- * 'dsDataType' +-- +-- * 'dsType' +-- +-- * 'dsDataStreamName' +-- +-- * 'dsDataStreamId' +dataSource + :: DataSource +dataSource = + DataSource + { _dsApplication = Nothing + , _dsDevice = Nothing + , _dsName = Nothing + , _dsDataType = Nothing + , _dsType = Nothing + , _dsDataStreamName = Nothing + , _dsDataStreamId = Nothing + } + +-- | Information about an application which feeds sensor data into the +-- platform. +dsApplication :: Lens' DataSource (Maybe (Maybe Application)) +dsApplication + = lens _dsApplication + (\ s a -> s{_dsApplication = a}) + +-- | Representation of an integrated device (such as a phone or a wearable) +-- that can hold sensors. +dsDevice :: Lens' DataSource (Maybe (Maybe Device)) +dsDevice = lens _dsDevice (\ s a -> s{_dsDevice = a}) + +-- | An end-user visible name for this data source. +dsName :: Lens' DataSource (Maybe Text) +dsName = lens _dsName (\ s a -> s{_dsName = a}) + +-- | The data type defines the schema for a stream of data being collected +-- by, inserted into, or queried from the Fitness API. +dsDataType :: Lens' DataSource (Maybe (Maybe DataType)) +dsDataType + = lens _dsDataType (\ s a -> s{_dsDataType = a}) + +-- | A constant describing the type of this data source. Indicates whether +-- this data source produces raw or derived data. +dsType :: Lens' DataSource (Maybe Text) +dsType = lens _dsType (\ s a -> s{_dsType = a}) + +-- | The stream name uniquely identifies this particular data source among +-- other data sources of the same type from the same underlying producer. +-- Setting the stream name is optional, but should be done whenever an +-- application exposes two streams for the same data type, or when a device +-- has two equivalent sensors. +dsDataStreamName :: Lens' DataSource (Maybe Text) +dsDataStreamName + = lens _dsDataStreamName + (\ s a -> s{_dsDataStreamName = a}) + +-- | A unique identifier for the data stream produced by this data source. +-- The identifier includes: - The physical device\'s manufacturer, model, +-- and serial number (UID). - The application\'s package name or name. +-- Package name is used when the data source was created by an Android +-- application. The developer project number is used when the data source +-- was created by a REST client. - The data source\'s type. - The data +-- source\'s stream name. Note that not all attributes of the data source +-- are used as part of the stream identifier. In particular, the version of +-- the hardware\/the application isn\'t used. This allows us to preserve +-- the same stream through version updates. This also means that two +-- DataSource objects may represent the same data stream even if they\'re +-- not equal. The exact format of the data stream ID created by an Android +-- application is: +-- type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName +-- The exact format of the data stream ID created by a REST client is: +-- type:dataType.name:developer project +-- number:device.manufacturer:device.model:device.uid:dataStreamName When +-- any of the optional fields that comprise of the data stream ID are +-- blank, they will be omitted from the data stream ID. The minnimum viable +-- data stream ID would be: type:dataType.name:developer project number +-- Finally, the developer project number is obfuscated when read by any +-- REST or Android client that did not create the data source. Only the +-- data source creator will see the developer project number in clear and +-- normal form. +dsDataStreamId :: Lens' DataSource (Maybe Text) +dsDataStreamId + = lens _dsDataStreamId + (\ s a -> s{_dsDataStreamId = a}) + +instance FromJSON DataSource where + parseJSON + = withObject "DataSource" + (\ o -> + DataSource <$> + (o .:? "application") <*> (o .:? "device") <*> + (o .:? "name") + <*> (o .:? "dataType") + <*> (o .:? "type") + <*> (o .:? "dataStreamName") + <*> (o .:? "dataStreamId")) + +instance ToJSON DataSource where + toJSON DataSource{..} + = object + (catMaybes + [("application" .=) <$> _dsApplication, + ("device" .=) <$> _dsDevice, ("name" .=) <$> _dsName, + ("dataType" .=) <$> _dsDataType, + ("type" .=) <$> _dsType, + ("dataStreamName" .=) <$> _dsDataStreamName, + ("dataStreamId" .=) <$> _dsDataStreamId]) + +-- +-- /See:/ 'valueMapValEntry' smart constructor. +data ValueMapValEntry = ValueMapValEntry + { _vmveValue :: !(Maybe (Maybe MapValue)) + , _vmveKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ValueMapValEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vmveValue' +-- +-- * 'vmveKey' +valueMapValEntry + :: ValueMapValEntry +valueMapValEntry = + ValueMapValEntry + { _vmveValue = Nothing + , _vmveKey = Nothing + } + +vmveValue :: Lens' ValueMapValEntry (Maybe (Maybe MapValue)) +vmveValue + = lens _vmveValue (\ s a -> s{_vmveValue = a}) + +vmveKey :: Lens' ValueMapValEntry (Maybe Text) +vmveKey = lens _vmveKey (\ s a -> s{_vmveKey = a}) + +instance FromJSON ValueMapValEntry where + parseJSON + = withObject "ValueMapValEntry" + (\ o -> + ValueMapValEntry <$> + (o .:? "value") <*> (o .:? "key")) + +instance ToJSON ValueMapValEntry where + toJSON ValueMapValEntry{..} + = object + (catMaybes + [("value" .=) <$> _vmveValue, + ("key" .=) <$> _vmveKey]) + +-- | See: +-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/DataType.java +-- +-- /See:/ 'dataType' smart constructor. +data DataType = DataType + { _dtField :: !(Maybe [Maybe DataTypeField]) + , _dtName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DataType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dtField' +-- +-- * 'dtName' +dataType + :: DataType +dataType = + DataType + { _dtField = Nothing + , _dtName = Nothing + } + +-- | A field represents one dimension of a data type. +dtField :: Lens' DataType [Maybe DataTypeField] +dtField + = lens _dtField (\ s a -> s{_dtField = a}) . _Default + . _Coerce + +-- | Each data type has a unique, namespaced, name. All data types in the +-- com.google namespace are shared as part of the platform. +dtName :: Lens' DataType (Maybe Text) +dtName = lens _dtName (\ s a -> s{_dtName = a}) + +instance FromJSON DataType where + parseJSON + = withObject "DataType" + (\ o -> + DataType <$> + (o .:? "field" .!= mempty) <*> (o .:? "name")) + +instance ToJSON DataType where + toJSON DataType{..} + = object + (catMaybes + [("field" .=) <$> _dtField, ("name" .=) <$> _dtName]) + +-- +-- /See:/ 'bucketByTime' smart constructor. +newtype BucketByTime = BucketByTime + { _bbtDurationMillis :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketByTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bbtDurationMillis' +bucketByTime + :: BucketByTime +bucketByTime = + BucketByTime + { _bbtDurationMillis = Nothing + } + +-- | Specifies that result buckets aggregate data by exactly durationMillis +-- time frames. Time frames that contain no data will be included in the +-- response with an empty dataset. +bbtDurationMillis :: Lens' BucketByTime (Maybe Int64) +bbtDurationMillis + = lens _bbtDurationMillis + (\ s a -> s{_bbtDurationMillis = a}) + +instance FromJSON BucketByTime where + parseJSON + = withObject "BucketByTime" + (\ o -> BucketByTime <$> (o .:? "durationMillis")) + +instance ToJSON BucketByTime where + toJSON BucketByTime{..} + = object + (catMaybes + [("durationMillis" .=) <$> _bbtDurationMillis]) + +-- | Sessions contain metadata, such as a user-friendly name and time +-- interval information. +-- +-- /See:/ 'session' smart constructor. +data Session = Session + { _sEndTimeMillis :: !(Maybe Int64) + , _sActiveTimeMillis :: !(Maybe Int64) + , _sApplication :: !(Maybe (Maybe Application)) + , _sActivityType :: !(Maybe Int32) + , _sName :: !(Maybe Text) + , _sModifiedTimeMillis :: !(Maybe Int64) + , _sId :: !(Maybe Text) + , _sStartTimeMillis :: !(Maybe Int64) + , _sDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Session' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sEndTimeMillis' +-- +-- * 'sActiveTimeMillis' +-- +-- * 'sApplication' +-- +-- * 'sActivityType' +-- +-- * 'sName' +-- +-- * 'sModifiedTimeMillis' +-- +-- * 'sId' +-- +-- * 'sStartTimeMillis' +-- +-- * 'sDescription' +session + :: Session +session = + Session + { _sEndTimeMillis = Nothing + , _sActiveTimeMillis = Nothing + , _sApplication = Nothing + , _sActivityType = Nothing + , _sName = Nothing + , _sModifiedTimeMillis = Nothing + , _sId = Nothing + , _sStartTimeMillis = Nothing + , _sDescription = Nothing + } + +-- | An end time, in milliseconds since epoch, inclusive. +sEndTimeMillis :: Lens' Session (Maybe Int64) +sEndTimeMillis + = lens _sEndTimeMillis + (\ s a -> s{_sEndTimeMillis = a}) + +-- | Session active time. While start_time_millis and end_time_millis define +-- the full session time, the active time can be shorter and specified by +-- active_time_millis. If the inactive time during the session is known, it +-- should also be inserted via a com.google.activity.segment data point +-- with a STILL activity value +sActiveTimeMillis :: Lens' Session (Maybe Int64) +sActiveTimeMillis + = lens _sActiveTimeMillis + (\ s a -> s{_sActiveTimeMillis = a}) + +-- | The application that created the session. +sApplication :: Lens' Session (Maybe (Maybe Application)) +sApplication + = lens _sApplication (\ s a -> s{_sApplication = a}) + +-- | The type of activity this session represents. +sActivityType :: Lens' Session (Maybe Int32) +sActivityType + = lens _sActivityType + (\ s a -> s{_sActivityType = a}) + +-- | A human readable name of the session. +sName :: Lens' Session (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | A timestamp that indicates when the session was last modified. +sModifiedTimeMillis :: Lens' Session (Maybe Int64) +sModifiedTimeMillis + = lens _sModifiedTimeMillis + (\ s a -> s{_sModifiedTimeMillis = a}) + +-- | A client-generated identifier that is unique across all sessions owned +-- by this particular user. +sId :: Lens' Session (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +-- | A start time, in milliseconds since epoch, inclusive. +sStartTimeMillis :: Lens' Session (Maybe Int64) +sStartTimeMillis + = lens _sStartTimeMillis + (\ s a -> s{_sStartTimeMillis = a}) + +-- | A description for this session. +sDescription :: Lens' Session (Maybe Text) +sDescription + = lens _sDescription (\ s a -> s{_sDescription = a}) + +instance FromJSON Session where + parseJSON + = withObject "Session" + (\ o -> + Session <$> + (o .:? "endTimeMillis") <*> + (o .:? "activeTimeMillis") + <*> (o .:? "application") + <*> (o .:? "activityType") + <*> (o .:? "name") + <*> (o .:? "modifiedTimeMillis") + <*> (o .:? "id") + <*> (o .:? "startTimeMillis") + <*> (o .:? "description")) + +instance ToJSON Session where + toJSON Session{..} + = object + (catMaybes + [("endTimeMillis" .=) <$> _sEndTimeMillis, + ("activeTimeMillis" .=) <$> _sActiveTimeMillis, + ("application" .=) <$> _sApplication, + ("activityType" .=) <$> _sActivityType, + ("name" .=) <$> _sName, + ("modifiedTimeMillis" .=) <$> _sModifiedTimeMillis, + ("id" .=) <$> _sId, + ("startTimeMillis" .=) <$> _sStartTimeMillis, + ("description" .=) <$> _sDescription]) diff --git a/gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs b/gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs new file mode 100644 index 000000000..d5ef94324 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fitness.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fitness.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs new file mode 100644 index 000000000..c87ed578e --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new data source that is unique across all data sources +-- belonging to this user. The data stream ID field can be omitted and will +-- be generated by the server with the correct format. The data stream ID +-- is an ordered combination of some fields from the data source. In +-- addition to the data source fields reflected into the data source ID, +-- the developer project number that is authenticated when creating the +-- data source is included. This developer project number is obfuscated +-- when read by any other developer reading public data types. +-- +-- /See:/ for @FitnessUsersDataSourcesCreate@. +module Fitness.Users.DataSources.Create + ( + -- * REST Resource + UsersDataSourcesCreateAPI + + -- * Creating a Request + , usersDataSourcesCreate + , UsersDataSourcesCreate + + -- * Request Lenses + , udscQuotaUser + , udscPrettyPrint + , udscUserIp + , udscUserId + , udscKey + , udscOauthToken + , udscFields + , udscAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesCreate@ which the +-- 'UsersDataSourcesCreate' request conforms to. +type UsersDataSourcesCreateAPI = + Capture "userId" Text :> + "dataSources" :> Post '[JSON] DataSource + +-- | Creates a new data source that is unique across all data sources +-- belonging to this user. The data stream ID field can be omitted and will +-- be generated by the server with the correct format. The data stream ID +-- is an ordered combination of some fields from the data source. In +-- addition to the data source fields reflected into the data source ID, +-- the developer project number that is authenticated when creating the +-- data source is included. This developer project number is obfuscated +-- when read by any other developer reading public data types. +-- +-- /See:/ 'usersDataSourcesCreate' smart constructor. +data UsersDataSourcesCreate = UsersDataSourcesCreate + { _udscQuotaUser :: !(Maybe Text) + , _udscPrettyPrint :: !Bool + , _udscUserIp :: !(Maybe Text) + , _udscUserId :: !Text + , _udscKey :: !(Maybe Text) + , _udscOauthToken :: !(Maybe Text) + , _udscFields :: !(Maybe Text) + , _udscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udscQuotaUser' +-- +-- * 'udscPrettyPrint' +-- +-- * 'udscUserIp' +-- +-- * 'udscUserId' +-- +-- * 'udscKey' +-- +-- * 'udscOauthToken' +-- +-- * 'udscFields' +-- +-- * 'udscAlt' +usersDataSourcesCreate + :: Text -- ^ 'userId' + -> UsersDataSourcesCreate +usersDataSourcesCreate pUdscUserId_ = + UsersDataSourcesCreate + { _udscQuotaUser = Nothing + , _udscPrettyPrint = True + , _udscUserIp = Nothing + , _udscUserId = pUdscUserId_ + , _udscKey = Nothing + , _udscOauthToken = Nothing + , _udscFields = Nothing + , _udscAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udscQuotaUser :: Lens' UsersDataSourcesCreate' (Maybe Text) +udscQuotaUser + = lens _udscQuotaUser + (\ s a -> s{_udscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udscPrettyPrint :: Lens' UsersDataSourcesCreate' Bool +udscPrettyPrint + = lens _udscPrettyPrint + (\ s a -> s{_udscPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udscUserIp :: Lens' UsersDataSourcesCreate' (Maybe Text) +udscUserIp + = lens _udscUserIp (\ s a -> s{_udscUserIp = a}) + +-- | Create the data source for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udscUserId :: Lens' UsersDataSourcesCreate' Text +udscUserId + = lens _udscUserId (\ s a -> s{_udscUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udscKey :: Lens' UsersDataSourcesCreate' (Maybe Text) +udscKey = lens _udscKey (\ s a -> s{_udscKey = a}) + +-- | OAuth 2.0 token for the current user. +udscOauthToken :: Lens' UsersDataSourcesCreate' (Maybe Text) +udscOauthToken + = lens _udscOauthToken + (\ s a -> s{_udscOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udscFields :: Lens' UsersDataSourcesCreate' (Maybe Text) +udscFields + = lens _udscFields (\ s a -> s{_udscFields = a}) + +-- | Data format for the response. +udscAlt :: Lens' UsersDataSourcesCreate' Text +udscAlt = lens _udscAlt (\ s a -> s{_udscAlt = a}) + +instance GoogleRequest UsersDataSourcesCreate' where + type Rs UsersDataSourcesCreate' = DataSource + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesCreate{..} + = go _udscQuotaUser _udscPrettyPrint _udscUserIp + _udscUserId + _udscKey + _udscOauthToken + _udscFields + _udscAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesCreateAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Delete.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Delete.hs new file mode 100644 index 000000000..b06916cac --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Delete.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Datasets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Performs an inclusive delete of all data points whose start and end +-- times have any overlap with the time range specified by the dataset ID. +-- For most data types, the entire data point will be deleted. For data +-- types where the time span represents a consistent value (such as +-- com.google.activity.segment), and a data point straddles either end +-- point of the dataset, only the overlapping portion of the data point +-- will be deleted. +-- +-- /See:/ for @FitnessUsersDataSourcesDatasetsDelete@. +module Fitness.Users.DataSources.Datasets.Delete + ( + -- * REST Resource + UsersDataSourcesDatasetsDeleteAPI + + -- * Creating a Request + , usersDataSourcesDatasetsDelete + , UsersDataSourcesDatasetsDelete + + -- * Request Lenses + , udsddQuotaUser + , udsddPrettyPrint + , udsddUserIp + , udsddDataSourceId + , udsddUserId + , udsddKey + , udsddDatasetId + , udsddModifiedTimeMillis + , udsddCurrentTimeMillis + , udsddOauthToken + , udsddFields + , udsddAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesDatasetsDelete@ which the +-- 'UsersDataSourcesDatasetsDelete' request conforms to. +type UsersDataSourcesDatasetsDeleteAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> + "datasets" :> + Capture "datasetId" Text :> + QueryParam "modifiedTimeMillis" Int64 :> + QueryParam "currentTimeMillis" Int64 :> + Delete '[JSON] () + +-- | Performs an inclusive delete of all data points whose start and end +-- times have any overlap with the time range specified by the dataset ID. +-- For most data types, the entire data point will be deleted. For data +-- types where the time span represents a consistent value (such as +-- com.google.activity.segment), and a data point straddles either end +-- point of the dataset, only the overlapping portion of the data point +-- will be deleted. +-- +-- /See:/ 'usersDataSourcesDatasetsDelete' smart constructor. +data UsersDataSourcesDatasetsDelete = UsersDataSourcesDatasetsDelete + { _udsddQuotaUser :: !(Maybe Text) + , _udsddPrettyPrint :: !Bool + , _udsddUserIp :: !(Maybe Text) + , _udsddDataSourceId :: !Text + , _udsddUserId :: !Text + , _udsddKey :: !(Maybe Text) + , _udsddDatasetId :: !Text + , _udsddModifiedTimeMillis :: !(Maybe Int64) + , _udsddCurrentTimeMillis :: !(Maybe Int64) + , _udsddOauthToken :: !(Maybe Text) + , _udsddFields :: !(Maybe Text) + , _udsddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesDatasetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsddQuotaUser' +-- +-- * 'udsddPrettyPrint' +-- +-- * 'udsddUserIp' +-- +-- * 'udsddDataSourceId' +-- +-- * 'udsddUserId' +-- +-- * 'udsddKey' +-- +-- * 'udsddDatasetId' +-- +-- * 'udsddModifiedTimeMillis' +-- +-- * 'udsddCurrentTimeMillis' +-- +-- * 'udsddOauthToken' +-- +-- * 'udsddFields' +-- +-- * 'udsddAlt' +usersDataSourcesDatasetsDelete + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> Text -- ^ 'datasetId' + -> UsersDataSourcesDatasetsDelete +usersDataSourcesDatasetsDelete pUdsddDataSourceId_ pUdsddUserId_ pUdsddDatasetId_ = + UsersDataSourcesDatasetsDelete + { _udsddQuotaUser = Nothing + , _udsddPrettyPrint = True + , _udsddUserIp = Nothing + , _udsddDataSourceId = pUdsddDataSourceId_ + , _udsddUserId = pUdsddUserId_ + , _udsddKey = Nothing + , _udsddDatasetId = pUdsddDatasetId_ + , _udsddModifiedTimeMillis = Nothing + , _udsddCurrentTimeMillis = Nothing + , _udsddOauthToken = Nothing + , _udsddFields = Nothing + , _udsddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsddQuotaUser :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Text) +udsddQuotaUser + = lens _udsddQuotaUser + (\ s a -> s{_udsddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsddPrettyPrint :: Lens' UsersDataSourcesDatasetsDelete' Bool +udsddPrettyPrint + = lens _udsddPrettyPrint + (\ s a -> s{_udsddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsddUserIp :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Text) +udsddUserIp + = lens _udsddUserIp (\ s a -> s{_udsddUserIp = a}) + +-- | The data stream ID of the data source that created the dataset. +udsddDataSourceId :: Lens' UsersDataSourcesDatasetsDelete' Text +udsddDataSourceId + = lens _udsddDataSourceId + (\ s a -> s{_udsddDataSourceId = a}) + +-- | Delete a dataset for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsddUserId :: Lens' UsersDataSourcesDatasetsDelete' Text +udsddUserId + = lens _udsddUserId (\ s a -> s{_udsddUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsddKey :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Text) +udsddKey = lens _udsddKey (\ s a -> s{_udsddKey = a}) + +-- | Dataset identifier that is a composite of the minimum data point start +-- time and maximum data point end time represented as nanoseconds from the +-- epoch. The ID is formatted like: \"startTime-endTime\" where startTime +-- and endTime are 64 bit integers. +udsddDatasetId :: Lens' UsersDataSourcesDatasetsDelete' Text +udsddDatasetId + = lens _udsddDatasetId + (\ s a -> s{_udsddDatasetId = a}) + +-- | When the operation was performed on the client. +udsddModifiedTimeMillis :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Int64) +udsddModifiedTimeMillis + = lens _udsddModifiedTimeMillis + (\ s a -> s{_udsddModifiedTimeMillis = a}) + +-- | The client\'s current time in milliseconds since epoch. +udsddCurrentTimeMillis :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Int64) +udsddCurrentTimeMillis + = lens _udsddCurrentTimeMillis + (\ s a -> s{_udsddCurrentTimeMillis = a}) + +-- | OAuth 2.0 token for the current user. +udsddOauthToken :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Text) +udsddOauthToken + = lens _udsddOauthToken + (\ s a -> s{_udsddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsddFields :: Lens' UsersDataSourcesDatasetsDelete' (Maybe Text) +udsddFields + = lens _udsddFields (\ s a -> s{_udsddFields = a}) + +-- | Data format for the response. +udsddAlt :: Lens' UsersDataSourcesDatasetsDelete' Text +udsddAlt = lens _udsddAlt (\ s a -> s{_udsddAlt = a}) + +instance GoogleRequest + UsersDataSourcesDatasetsDelete' where + type Rs UsersDataSourcesDatasetsDelete' = () + request = requestWithRoute defReq fitnessURL + requestWithRoute r u + UsersDataSourcesDatasetsDelete{..} + = go _udsddQuotaUser _udsddPrettyPrint _udsddUserIp + _udsddDataSourceId + _udsddUserId + _udsddKey + _udsddDatasetId + _udsddModifiedTimeMillis + _udsddCurrentTimeMillis + _udsddOauthToken + _udsddFields + _udsddAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesDatasetsDeleteAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Get.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Get.hs new file mode 100644 index 000000000..0ef8569d1 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Get.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Datasets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a dataset containing all data points whose start and end times +-- overlap with the specified range of the dataset minimum start time and +-- maximum end time. Specifically, any data point whose start time is less +-- than or equal to the dataset end time and whose end time is greater than +-- or equal to the dataset start time. +-- +-- /See:/ for @FitnessUsersDataSourcesDatasetsGet@. +module Fitness.Users.DataSources.Datasets.Get + ( + -- * REST Resource + UsersDataSourcesDatasetsGetAPI + + -- * Creating a Request + , usersDataSourcesDatasetsGet + , UsersDataSourcesDatasetsGet + + -- * Request Lenses + , udsdgQuotaUser + , udsdgPrettyPrint + , udsdgUserIp + , udsdgDataSourceId + , udsdgUserId + , udsdgKey + , udsdgDatasetId + , udsdgLimit + , udsdgPageToken + , udsdgOauthToken + , udsdgFields + , udsdgAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesDatasetsGet@ which the +-- 'UsersDataSourcesDatasetsGet' request conforms to. +type UsersDataSourcesDatasetsGetAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> + "datasets" :> + Capture "datasetId" Text :> + QueryParam "limit" Int32 :> + QueryParam "pageToken" Text :> Get '[JSON] Dataset + +-- | Returns a dataset containing all data points whose start and end times +-- overlap with the specified range of the dataset minimum start time and +-- maximum end time. Specifically, any data point whose start time is less +-- than or equal to the dataset end time and whose end time is greater than +-- or equal to the dataset start time. +-- +-- /See:/ 'usersDataSourcesDatasetsGet' smart constructor. +data UsersDataSourcesDatasetsGet = UsersDataSourcesDatasetsGet + { _udsdgQuotaUser :: !(Maybe Text) + , _udsdgPrettyPrint :: !Bool + , _udsdgUserIp :: !(Maybe Text) + , _udsdgDataSourceId :: !Text + , _udsdgUserId :: !Text + , _udsdgKey :: !(Maybe Text) + , _udsdgDatasetId :: !Text + , _udsdgLimit :: !(Maybe Int32) + , _udsdgPageToken :: !(Maybe Text) + , _udsdgOauthToken :: !(Maybe Text) + , _udsdgFields :: !(Maybe Text) + , _udsdgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesDatasetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsdgQuotaUser' +-- +-- * 'udsdgPrettyPrint' +-- +-- * 'udsdgUserIp' +-- +-- * 'udsdgDataSourceId' +-- +-- * 'udsdgUserId' +-- +-- * 'udsdgKey' +-- +-- * 'udsdgDatasetId' +-- +-- * 'udsdgLimit' +-- +-- * 'udsdgPageToken' +-- +-- * 'udsdgOauthToken' +-- +-- * 'udsdgFields' +-- +-- * 'udsdgAlt' +usersDataSourcesDatasetsGet + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> Text -- ^ 'datasetId' + -> UsersDataSourcesDatasetsGet +usersDataSourcesDatasetsGet pUdsdgDataSourceId_ pUdsdgUserId_ pUdsdgDatasetId_ = + UsersDataSourcesDatasetsGet + { _udsdgQuotaUser = Nothing + , _udsdgPrettyPrint = True + , _udsdgUserIp = Nothing + , _udsdgDataSourceId = pUdsdgDataSourceId_ + , _udsdgUserId = pUdsdgUserId_ + , _udsdgKey = Nothing + , _udsdgDatasetId = pUdsdgDatasetId_ + , _udsdgLimit = Nothing + , _udsdgPageToken = Nothing + , _udsdgOauthToken = Nothing + , _udsdgFields = Nothing + , _udsdgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsdgQuotaUser :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgQuotaUser + = lens _udsdgQuotaUser + (\ s a -> s{_udsdgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsdgPrettyPrint :: Lens' UsersDataSourcesDatasetsGet' Bool +udsdgPrettyPrint + = lens _udsdgPrettyPrint + (\ s a -> s{_udsdgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsdgUserIp :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgUserIp + = lens _udsdgUserIp (\ s a -> s{_udsdgUserIp = a}) + +-- | The data stream ID of the data source that created the dataset. +udsdgDataSourceId :: Lens' UsersDataSourcesDatasetsGet' Text +udsdgDataSourceId + = lens _udsdgDataSourceId + (\ s a -> s{_udsdgDataSourceId = a}) + +-- | Retrieve a dataset for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsdgUserId :: Lens' UsersDataSourcesDatasetsGet' Text +udsdgUserId + = lens _udsdgUserId (\ s a -> s{_udsdgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsdgKey :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgKey = lens _udsdgKey (\ s a -> s{_udsdgKey = a}) + +-- | Dataset identifier that is a composite of the minimum data point start +-- time and maximum data point end time represented as nanoseconds from the +-- epoch. The ID is formatted like: \"startTime-endTime\" where startTime +-- and endTime are 64 bit integers. +udsdgDatasetId :: Lens' UsersDataSourcesDatasetsGet' Text +udsdgDatasetId + = lens _udsdgDatasetId + (\ s a -> s{_udsdgDatasetId = a}) + +-- | If specified, no more than this many data points will be included in the +-- dataset. If the there are more data points in the dataset, nextPageToken +-- will be set in the dataset response. +udsdgLimit :: Lens' UsersDataSourcesDatasetsGet' (Maybe Int32) +udsdgLimit + = lens _udsdgLimit (\ s a -> s{_udsdgLimit = a}) + +-- | The continuation token, which is used to page through large datasets. To +-- get the next page of a dataset, set this parameter to the value of +-- nextPageToken from the previous response. Each subsequent call will +-- yield a partial dataset with data point end timestamps that are strictly +-- smaller than those in the previous partial response. +udsdgPageToken :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgPageToken + = lens _udsdgPageToken + (\ s a -> s{_udsdgPageToken = a}) + +-- | OAuth 2.0 token for the current user. +udsdgOauthToken :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgOauthToken + = lens _udsdgOauthToken + (\ s a -> s{_udsdgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsdgFields :: Lens' UsersDataSourcesDatasetsGet' (Maybe Text) +udsdgFields + = lens _udsdgFields (\ s a -> s{_udsdgFields = a}) + +-- | Data format for the response. +udsdgAlt :: Lens' UsersDataSourcesDatasetsGet' Text +udsdgAlt = lens _udsdgAlt (\ s a -> s{_udsdgAlt = a}) + +instance GoogleRequest UsersDataSourcesDatasetsGet' + where + type Rs UsersDataSourcesDatasetsGet' = Dataset + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesDatasetsGet{..} + = go _udsdgQuotaUser _udsdgPrettyPrint _udsdgUserIp + _udsdgDataSourceId + _udsdgUserId + _udsdgKey + _udsdgDatasetId + _udsdgLimit + _udsdgPageToken + _udsdgOauthToken + _udsdgFields + _udsdgAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesDatasetsGetAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Patch.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Patch.hs new file mode 100644 index 000000000..f0e67055c --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Datasets/Patch.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Datasets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds data points to a dataset. The dataset need not be previously +-- created. All points within the given dataset will be returned with +-- subsquent calls to retrieve this dataset. Data points can belong to more +-- than one dataset. This method does not use patch semantics. +-- +-- /See:/ for @FitnessUsersDataSourcesDatasetsPatch@. +module Fitness.Users.DataSources.Datasets.Patch + ( + -- * REST Resource + UsersDataSourcesDatasetsPatchAPI + + -- * Creating a Request + , usersDataSourcesDatasetsPatch + , UsersDataSourcesDatasetsPatch + + -- * Request Lenses + , udsdpQuotaUser + , udsdpPrettyPrint + , udsdpUserIp + , udsdpDataSourceId + , udsdpUserId + , udsdpKey + , udsdpDatasetId + , udsdpCurrentTimeMillis + , udsdpOauthToken + , udsdpFields + , udsdpAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesDatasetsPatch@ which the +-- 'UsersDataSourcesDatasetsPatch' request conforms to. +type UsersDataSourcesDatasetsPatchAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> + "datasets" :> + Capture "datasetId" Text :> + QueryParam "currentTimeMillis" Int64 :> + Patch '[JSON] Dataset + +-- | Adds data points to a dataset. The dataset need not be previously +-- created. All points within the given dataset will be returned with +-- subsquent calls to retrieve this dataset. Data points can belong to more +-- than one dataset. This method does not use patch semantics. +-- +-- /See:/ 'usersDataSourcesDatasetsPatch' smart constructor. +data UsersDataSourcesDatasetsPatch = UsersDataSourcesDatasetsPatch + { _udsdpQuotaUser :: !(Maybe Text) + , _udsdpPrettyPrint :: !Bool + , _udsdpUserIp :: !(Maybe Text) + , _udsdpDataSourceId :: !Text + , _udsdpUserId :: !Text + , _udsdpKey :: !(Maybe Text) + , _udsdpDatasetId :: !Text + , _udsdpCurrentTimeMillis :: !(Maybe Int64) + , _udsdpOauthToken :: !(Maybe Text) + , _udsdpFields :: !(Maybe Text) + , _udsdpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesDatasetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsdpQuotaUser' +-- +-- * 'udsdpPrettyPrint' +-- +-- * 'udsdpUserIp' +-- +-- * 'udsdpDataSourceId' +-- +-- * 'udsdpUserId' +-- +-- * 'udsdpKey' +-- +-- * 'udsdpDatasetId' +-- +-- * 'udsdpCurrentTimeMillis' +-- +-- * 'udsdpOauthToken' +-- +-- * 'udsdpFields' +-- +-- * 'udsdpAlt' +usersDataSourcesDatasetsPatch + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> Text -- ^ 'datasetId' + -> UsersDataSourcesDatasetsPatch +usersDataSourcesDatasetsPatch pUdsdpDataSourceId_ pUdsdpUserId_ pUdsdpDatasetId_ = + UsersDataSourcesDatasetsPatch + { _udsdpQuotaUser = Nothing + , _udsdpPrettyPrint = True + , _udsdpUserIp = Nothing + , _udsdpDataSourceId = pUdsdpDataSourceId_ + , _udsdpUserId = pUdsdpUserId_ + , _udsdpKey = Nothing + , _udsdpDatasetId = pUdsdpDatasetId_ + , _udsdpCurrentTimeMillis = Nothing + , _udsdpOauthToken = Nothing + , _udsdpFields = Nothing + , _udsdpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsdpQuotaUser :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Text) +udsdpQuotaUser + = lens _udsdpQuotaUser + (\ s a -> s{_udsdpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsdpPrettyPrint :: Lens' UsersDataSourcesDatasetsPatch' Bool +udsdpPrettyPrint + = lens _udsdpPrettyPrint + (\ s a -> s{_udsdpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsdpUserIp :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Text) +udsdpUserIp + = lens _udsdpUserIp (\ s a -> s{_udsdpUserIp = a}) + +-- | The data stream ID of the data source that created the dataset. +udsdpDataSourceId :: Lens' UsersDataSourcesDatasetsPatch' Text +udsdpDataSourceId + = lens _udsdpDataSourceId + (\ s a -> s{_udsdpDataSourceId = a}) + +-- | Patch a dataset for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsdpUserId :: Lens' UsersDataSourcesDatasetsPatch' Text +udsdpUserId + = lens _udsdpUserId (\ s a -> s{_udsdpUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsdpKey :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Text) +udsdpKey = lens _udsdpKey (\ s a -> s{_udsdpKey = a}) + +-- | Dataset identifier that is a composite of the minimum data point start +-- time and maximum data point end time represented as nanoseconds from the +-- epoch. The ID is formatted like: \"startTime-endTime\" where startTime +-- and endTime are 64 bit integers. +udsdpDatasetId :: Lens' UsersDataSourcesDatasetsPatch' Text +udsdpDatasetId + = lens _udsdpDatasetId + (\ s a -> s{_udsdpDatasetId = a}) + +-- | The client\'s current time in milliseconds since epoch. Note that the +-- minStartTimeNs and maxEndTimeNs properties in the request body are in +-- nanoseconds instead of milliseconds. +udsdpCurrentTimeMillis :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Int64) +udsdpCurrentTimeMillis + = lens _udsdpCurrentTimeMillis + (\ s a -> s{_udsdpCurrentTimeMillis = a}) + +-- | OAuth 2.0 token for the current user. +udsdpOauthToken :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Text) +udsdpOauthToken + = lens _udsdpOauthToken + (\ s a -> s{_udsdpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsdpFields :: Lens' UsersDataSourcesDatasetsPatch' (Maybe Text) +udsdpFields + = lens _udsdpFields (\ s a -> s{_udsdpFields = a}) + +-- | Data format for the response. +udsdpAlt :: Lens' UsersDataSourcesDatasetsPatch' Text +udsdpAlt = lens _udsdpAlt (\ s a -> s{_udsdpAlt = a}) + +instance GoogleRequest UsersDataSourcesDatasetsPatch' + where + type Rs UsersDataSourcesDatasetsPatch' = Dataset + request = requestWithRoute defReq fitnessURL + requestWithRoute r u + UsersDataSourcesDatasetsPatch{..} + = go _udsdpQuotaUser _udsdpPrettyPrint _udsdpUserIp + _udsdpDataSourceId + _udsdpUserId + _udsdpKey + _udsdpDatasetId + _udsdpCurrentTimeMillis + _udsdpOauthToken + _udsdpFields + _udsdpAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesDatasetsPatchAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs new file mode 100644 index 000000000..9accbf747 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete the data source if there are no datapoints associated with it +-- +-- /See:/ for @FitnessUsersDataSourcesDelete@. +module Fitness.Users.DataSources.Delete + ( + -- * REST Resource + UsersDataSourcesDeleteAPI + + -- * Creating a Request + , usersDataSourcesDelete + , UsersDataSourcesDelete + + -- * Request Lenses + , udsdQuotaUser + , udsdPrettyPrint + , udsdUserIp + , udsdDataSourceId + , udsdUserId + , udsdKey + , udsdOauthToken + , udsdFields + , udsdAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesDelete@ which the +-- 'UsersDataSourcesDelete' request conforms to. +type UsersDataSourcesDeleteAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> + Delete '[JSON] DataSource + +-- | Delete the data source if there are no datapoints associated with it +-- +-- /See:/ 'usersDataSourcesDelete' smart constructor. +data UsersDataSourcesDelete = UsersDataSourcesDelete + { _udsdQuotaUser :: !(Maybe Text) + , _udsdPrettyPrint :: !Bool + , _udsdUserIp :: !(Maybe Text) + , _udsdDataSourceId :: !Text + , _udsdUserId :: !Text + , _udsdKey :: !(Maybe Text) + , _udsdOauthToken :: !(Maybe Text) + , _udsdFields :: !(Maybe Text) + , _udsdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsdQuotaUser' +-- +-- * 'udsdPrettyPrint' +-- +-- * 'udsdUserIp' +-- +-- * 'udsdDataSourceId' +-- +-- * 'udsdUserId' +-- +-- * 'udsdKey' +-- +-- * 'udsdOauthToken' +-- +-- * 'udsdFields' +-- +-- * 'udsdAlt' +usersDataSourcesDelete + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> UsersDataSourcesDelete +usersDataSourcesDelete pUdsdDataSourceId_ pUdsdUserId_ = + UsersDataSourcesDelete + { _udsdQuotaUser = Nothing + , _udsdPrettyPrint = True + , _udsdUserIp = Nothing + , _udsdDataSourceId = pUdsdDataSourceId_ + , _udsdUserId = pUdsdUserId_ + , _udsdKey = Nothing + , _udsdOauthToken = Nothing + , _udsdFields = Nothing + , _udsdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsdQuotaUser :: Lens' UsersDataSourcesDelete' (Maybe Text) +udsdQuotaUser + = lens _udsdQuotaUser + (\ s a -> s{_udsdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsdPrettyPrint :: Lens' UsersDataSourcesDelete' Bool +udsdPrettyPrint + = lens _udsdPrettyPrint + (\ s a -> s{_udsdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsdUserIp :: Lens' UsersDataSourcesDelete' (Maybe Text) +udsdUserIp + = lens _udsdUserIp (\ s a -> s{_udsdUserIp = a}) + +-- | The data stream ID of the data source to delete. +udsdDataSourceId :: Lens' UsersDataSourcesDelete' Text +udsdDataSourceId + = lens _udsdDataSourceId + (\ s a -> s{_udsdDataSourceId = a}) + +-- | Retrieve a data source for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsdUserId :: Lens' UsersDataSourcesDelete' Text +udsdUserId + = lens _udsdUserId (\ s a -> s{_udsdUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsdKey :: Lens' UsersDataSourcesDelete' (Maybe Text) +udsdKey = lens _udsdKey (\ s a -> s{_udsdKey = a}) + +-- | OAuth 2.0 token for the current user. +udsdOauthToken :: Lens' UsersDataSourcesDelete' (Maybe Text) +udsdOauthToken + = lens _udsdOauthToken + (\ s a -> s{_udsdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsdFields :: Lens' UsersDataSourcesDelete' (Maybe Text) +udsdFields + = lens _udsdFields (\ s a -> s{_udsdFields = a}) + +-- | Data format for the response. +udsdAlt :: Lens' UsersDataSourcesDelete' Text +udsdAlt = lens _udsdAlt (\ s a -> s{_udsdAlt = a}) + +instance GoogleRequest UsersDataSourcesDelete' where + type Rs UsersDataSourcesDelete' = DataSource + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesDelete{..} + = go _udsdQuotaUser _udsdPrettyPrint _udsdUserIp + _udsdDataSourceId + _udsdUserId + _udsdKey + _udsdOauthToken + _udsdFields + _udsdAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesDeleteAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs new file mode 100644 index 000000000..38c857c86 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a data source identified by a data stream ID. +-- +-- /See:/ for @FitnessUsersDataSourcesGet@. +module Fitness.Users.DataSources.Get + ( + -- * REST Resource + UsersDataSourcesGetAPI + + -- * Creating a Request + , usersDataSourcesGet + , UsersDataSourcesGet + + -- * Request Lenses + , udsgQuotaUser + , udsgPrettyPrint + , udsgUserIp + , udsgDataSourceId + , udsgUserId + , udsgKey + , udsgOauthToken + , udsgFields + , udsgAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesGet@ which the +-- 'UsersDataSourcesGet' request conforms to. +type UsersDataSourcesGetAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> Get '[JSON] DataSource + +-- | Returns a data source identified by a data stream ID. +-- +-- /See:/ 'usersDataSourcesGet' smart constructor. +data UsersDataSourcesGet = UsersDataSourcesGet + { _udsgQuotaUser :: !(Maybe Text) + , _udsgPrettyPrint :: !Bool + , _udsgUserIp :: !(Maybe Text) + , _udsgDataSourceId :: !Text + , _udsgUserId :: !Text + , _udsgKey :: !(Maybe Text) + , _udsgOauthToken :: !(Maybe Text) + , _udsgFields :: !(Maybe Text) + , _udsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsgQuotaUser' +-- +-- * 'udsgPrettyPrint' +-- +-- * 'udsgUserIp' +-- +-- * 'udsgDataSourceId' +-- +-- * 'udsgUserId' +-- +-- * 'udsgKey' +-- +-- * 'udsgOauthToken' +-- +-- * 'udsgFields' +-- +-- * 'udsgAlt' +usersDataSourcesGet + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> UsersDataSourcesGet +usersDataSourcesGet pUdsgDataSourceId_ pUdsgUserId_ = + UsersDataSourcesGet + { _udsgQuotaUser = Nothing + , _udsgPrettyPrint = True + , _udsgUserIp = Nothing + , _udsgDataSourceId = pUdsgDataSourceId_ + , _udsgUserId = pUdsgUserId_ + , _udsgKey = Nothing + , _udsgOauthToken = Nothing + , _udsgFields = Nothing + , _udsgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsgQuotaUser :: Lens' UsersDataSourcesGet' (Maybe Text) +udsgQuotaUser + = lens _udsgQuotaUser + (\ s a -> s{_udsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsgPrettyPrint :: Lens' UsersDataSourcesGet' Bool +udsgPrettyPrint + = lens _udsgPrettyPrint + (\ s a -> s{_udsgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsgUserIp :: Lens' UsersDataSourcesGet' (Maybe Text) +udsgUserIp + = lens _udsgUserIp (\ s a -> s{_udsgUserIp = a}) + +-- | The data stream ID of the data source to retrieve. +udsgDataSourceId :: Lens' UsersDataSourcesGet' Text +udsgDataSourceId + = lens _udsgDataSourceId + (\ s a -> s{_udsgDataSourceId = a}) + +-- | Retrieve a data source for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsgUserId :: Lens' UsersDataSourcesGet' Text +udsgUserId + = lens _udsgUserId (\ s a -> s{_udsgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsgKey :: Lens' UsersDataSourcesGet' (Maybe Text) +udsgKey = lens _udsgKey (\ s a -> s{_udsgKey = a}) + +-- | OAuth 2.0 token for the current user. +udsgOauthToken :: Lens' UsersDataSourcesGet' (Maybe Text) +udsgOauthToken + = lens _udsgOauthToken + (\ s a -> s{_udsgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsgFields :: Lens' UsersDataSourcesGet' (Maybe Text) +udsgFields + = lens _udsgFields (\ s a -> s{_udsgFields = a}) + +-- | Data format for the response. +udsgAlt :: Lens' UsersDataSourcesGet' Text +udsgAlt = lens _udsgAlt (\ s a -> s{_udsgAlt = a}) + +instance GoogleRequest UsersDataSourcesGet' where + type Rs UsersDataSourcesGet' = DataSource + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesGet{..} + = go _udsgQuotaUser _udsgPrettyPrint _udsgUserIp + _udsgDataSourceId + _udsgUserId + _udsgKey + _udsgOauthToken + _udsgFields + _udsgAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesGetAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs new file mode 100644 index 000000000..c4e43d5d0 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all data sources that are visible to the developer, using the +-- OAuth scopes provided. The list is not exhaustive: the user may have +-- private data sources that are only visible to other developers or calls +-- using other scopes. +-- +-- /See:/ for @FitnessUsersDataSourcesList@. +module Fitness.Users.DataSources.List + ( + -- * REST Resource + UsersDataSourcesListAPI + + -- * Creating a Request + , usersDataSourcesList + , UsersDataSourcesList + + -- * Request Lenses + , udslQuotaUser + , udslPrettyPrint + , udslDataTypeName + , udslUserIp + , udslUserId + , udslKey + , udslOauthToken + , udslFields + , udslAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesList@ which the +-- 'UsersDataSourcesList' request conforms to. +type UsersDataSourcesListAPI = + Capture "userId" Text :> + "dataSources" :> + QueryParams "dataTypeName" Text :> + Get '[JSON] ListDataSourcesResponse + +-- | Lists all data sources that are visible to the developer, using the +-- OAuth scopes provided. The list is not exhaustive: the user may have +-- private data sources that are only visible to other developers or calls +-- using other scopes. +-- +-- /See:/ 'usersDataSourcesList' smart constructor. +data UsersDataSourcesList = UsersDataSourcesList + { _udslQuotaUser :: !(Maybe Text) + , _udslPrettyPrint :: !Bool + , _udslDataTypeName :: !(Maybe Text) + , _udslUserIp :: !(Maybe Text) + , _udslUserId :: !Text + , _udslKey :: !(Maybe Text) + , _udslOauthToken :: !(Maybe Text) + , _udslFields :: !(Maybe Text) + , _udslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udslQuotaUser' +-- +-- * 'udslPrettyPrint' +-- +-- * 'udslDataTypeName' +-- +-- * 'udslUserIp' +-- +-- * 'udslUserId' +-- +-- * 'udslKey' +-- +-- * 'udslOauthToken' +-- +-- * 'udslFields' +-- +-- * 'udslAlt' +usersDataSourcesList + :: Text -- ^ 'userId' + -> UsersDataSourcesList +usersDataSourcesList pUdslUserId_ = + UsersDataSourcesList + { _udslQuotaUser = Nothing + , _udslPrettyPrint = True + , _udslDataTypeName = Nothing + , _udslUserIp = Nothing + , _udslUserId = pUdslUserId_ + , _udslKey = Nothing + , _udslOauthToken = Nothing + , _udslFields = Nothing + , _udslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udslQuotaUser :: Lens' UsersDataSourcesList' (Maybe Text) +udslQuotaUser + = lens _udslQuotaUser + (\ s a -> s{_udslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udslPrettyPrint :: Lens' UsersDataSourcesList' Bool +udslPrettyPrint + = lens _udslPrettyPrint + (\ s a -> s{_udslPrettyPrint = a}) + +-- | The names of data types to include in the list. If not specified, all +-- data sources will be returned. +udslDataTypeName :: Lens' UsersDataSourcesList' (Maybe Text) +udslDataTypeName + = lens _udslDataTypeName + (\ s a -> s{_udslDataTypeName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udslUserIp :: Lens' UsersDataSourcesList' (Maybe Text) +udslUserIp + = lens _udslUserIp (\ s a -> s{_udslUserIp = a}) + +-- | List data sources for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udslUserId :: Lens' UsersDataSourcesList' Text +udslUserId + = lens _udslUserId (\ s a -> s{_udslUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udslKey :: Lens' UsersDataSourcesList' (Maybe Text) +udslKey = lens _udslKey (\ s a -> s{_udslKey = a}) + +-- | OAuth 2.0 token for the current user. +udslOauthToken :: Lens' UsersDataSourcesList' (Maybe Text) +udslOauthToken + = lens _udslOauthToken + (\ s a -> s{_udslOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udslFields :: Lens' UsersDataSourcesList' (Maybe Text) +udslFields + = lens _udslFields (\ s a -> s{_udslFields = a}) + +-- | Data format for the response. +udslAlt :: Lens' UsersDataSourcesList' Text +udslAlt = lens _udslAlt (\ s a -> s{_udslAlt = a}) + +instance GoogleRequest UsersDataSourcesList' where + type Rs UsersDataSourcesList' = + ListDataSourcesResponse + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesList{..} + = go _udslQuotaUser _udslPrettyPrint + _udslDataTypeName + _udslUserIp + _udslUserId + _udslKey + _udslOauthToken + _udslFields + _udslAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesListAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs new file mode 100644 index 000000000..0c30ebcca --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a given data source. It is an error to modify the data source\'s +-- data stream ID, data type, type, stream name or device information apart +-- from the device version. Changing these fields would require a new +-- unique data stream ID and separate data source. Data sources are +-- identified by their data stream ID. This method supports patch +-- semantics. +-- +-- /See:/ for @FitnessUsersDataSourcesPatch@. +module Fitness.Users.DataSources.Patch + ( + -- * REST Resource + UsersDataSourcesPatchAPI + + -- * Creating a Request + , usersDataSourcesPatch + , UsersDataSourcesPatch + + -- * Request Lenses + , udspQuotaUser + , udspPrettyPrint + , udspUserIp + , udspDataSourceId + , udspUserId + , udspKey + , udspOauthToken + , udspFields + , udspAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesPatch@ which the +-- 'UsersDataSourcesPatch' request conforms to. +type UsersDataSourcesPatchAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> + Patch '[JSON] DataSource + +-- | Updates a given data source. It is an error to modify the data source\'s +-- data stream ID, data type, type, stream name or device information apart +-- from the device version. Changing these fields would require a new +-- unique data stream ID and separate data source. Data sources are +-- identified by their data stream ID. This method supports patch +-- semantics. +-- +-- /See:/ 'usersDataSourcesPatch' smart constructor. +data UsersDataSourcesPatch = UsersDataSourcesPatch + { _udspQuotaUser :: !(Maybe Text) + , _udspPrettyPrint :: !Bool + , _udspUserIp :: !(Maybe Text) + , _udspDataSourceId :: !Text + , _udspUserId :: !Text + , _udspKey :: !(Maybe Text) + , _udspOauthToken :: !(Maybe Text) + , _udspFields :: !(Maybe Text) + , _udspAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udspQuotaUser' +-- +-- * 'udspPrettyPrint' +-- +-- * 'udspUserIp' +-- +-- * 'udspDataSourceId' +-- +-- * 'udspUserId' +-- +-- * 'udspKey' +-- +-- * 'udspOauthToken' +-- +-- * 'udspFields' +-- +-- * 'udspAlt' +usersDataSourcesPatch + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> UsersDataSourcesPatch +usersDataSourcesPatch pUdspDataSourceId_ pUdspUserId_ = + UsersDataSourcesPatch + { _udspQuotaUser = Nothing + , _udspPrettyPrint = True + , _udspUserIp = Nothing + , _udspDataSourceId = pUdspDataSourceId_ + , _udspUserId = pUdspUserId_ + , _udspKey = Nothing + , _udspOauthToken = Nothing + , _udspFields = Nothing + , _udspAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udspQuotaUser :: Lens' UsersDataSourcesPatch' (Maybe Text) +udspQuotaUser + = lens _udspQuotaUser + (\ s a -> s{_udspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udspPrettyPrint :: Lens' UsersDataSourcesPatch' Bool +udspPrettyPrint + = lens _udspPrettyPrint + (\ s a -> s{_udspPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udspUserIp :: Lens' UsersDataSourcesPatch' (Maybe Text) +udspUserIp + = lens _udspUserIp (\ s a -> s{_udspUserIp = a}) + +-- | The data stream ID of the data source to update. +udspDataSourceId :: Lens' UsersDataSourcesPatch' Text +udspDataSourceId + = lens _udspDataSourceId + (\ s a -> s{_udspDataSourceId = a}) + +-- | Update the data source for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udspUserId :: Lens' UsersDataSourcesPatch' Text +udspUserId + = lens _udspUserId (\ s a -> s{_udspUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udspKey :: Lens' UsersDataSourcesPatch' (Maybe Text) +udspKey = lens _udspKey (\ s a -> s{_udspKey = a}) + +-- | OAuth 2.0 token for the current user. +udspOauthToken :: Lens' UsersDataSourcesPatch' (Maybe Text) +udspOauthToken + = lens _udspOauthToken + (\ s a -> s{_udspOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udspFields :: Lens' UsersDataSourcesPatch' (Maybe Text) +udspFields + = lens _udspFields (\ s a -> s{_udspFields = a}) + +-- | Data format for the response. +udspAlt :: Lens' UsersDataSourcesPatch' Text +udspAlt = lens _udspAlt (\ s a -> s{_udspAlt = a}) + +instance GoogleRequest UsersDataSourcesPatch' where + type Rs UsersDataSourcesPatch' = DataSource + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesPatch{..} + = go _udspQuotaUser _udspPrettyPrint _udspUserIp + _udspDataSourceId + _udspUserId + _udspKey + _udspOauthToken + _udspFields + _udspAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesPatchAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs new file mode 100644 index 000000000..096103e94 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.DataSources.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a given data source. It is an error to modify the data source\'s +-- data stream ID, data type, type, stream name or device information apart +-- from the device version. Changing these fields would require a new +-- unique data stream ID and separate data source. Data sources are +-- identified by their data stream ID. +-- +-- /See:/ for @FitnessUsersDataSourcesUpdate@. +module Fitness.Users.DataSources.Update + ( + -- * REST Resource + UsersDataSourcesUpdateAPI + + -- * Creating a Request + , usersDataSourcesUpdate + , UsersDataSourcesUpdate + + -- * Request Lenses + , udsuQuotaUser + , udsuPrettyPrint + , udsuUserIp + , udsuDataSourceId + , udsuUserId + , udsuKey + , udsuOauthToken + , udsuFields + , udsuAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDataSourcesUpdate@ which the +-- 'UsersDataSourcesUpdate' request conforms to. +type UsersDataSourcesUpdateAPI = + Capture "userId" Text :> + "dataSources" :> + Capture "dataSourceId" Text :> Put '[JSON] DataSource + +-- | Updates a given data source. It is an error to modify the data source\'s +-- data stream ID, data type, type, stream name or device information apart +-- from the device version. Changing these fields would require a new +-- unique data stream ID and separate data source. Data sources are +-- identified by their data stream ID. +-- +-- /See:/ 'usersDataSourcesUpdate' smart constructor. +data UsersDataSourcesUpdate = UsersDataSourcesUpdate + { _udsuQuotaUser :: !(Maybe Text) + , _udsuPrettyPrint :: !Bool + , _udsuUserIp :: !(Maybe Text) + , _udsuDataSourceId :: !Text + , _udsuUserId :: !Text + , _udsuKey :: !(Maybe Text) + , _udsuOauthToken :: !(Maybe Text) + , _udsuFields :: !(Maybe Text) + , _udsuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDataSourcesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsuQuotaUser' +-- +-- * 'udsuPrettyPrint' +-- +-- * 'udsuUserIp' +-- +-- * 'udsuDataSourceId' +-- +-- * 'udsuUserId' +-- +-- * 'udsuKey' +-- +-- * 'udsuOauthToken' +-- +-- * 'udsuFields' +-- +-- * 'udsuAlt' +usersDataSourcesUpdate + :: Text -- ^ 'dataSourceId' + -> Text -- ^ 'userId' + -> UsersDataSourcesUpdate +usersDataSourcesUpdate pUdsuDataSourceId_ pUdsuUserId_ = + UsersDataSourcesUpdate + { _udsuQuotaUser = Nothing + , _udsuPrettyPrint = True + , _udsuUserIp = Nothing + , _udsuDataSourceId = pUdsuDataSourceId_ + , _udsuUserId = pUdsuUserId_ + , _udsuKey = Nothing + , _udsuOauthToken = Nothing + , _udsuFields = Nothing + , _udsuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsuQuotaUser :: Lens' UsersDataSourcesUpdate' (Maybe Text) +udsuQuotaUser + = lens _udsuQuotaUser + (\ s a -> s{_udsuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsuPrettyPrint :: Lens' UsersDataSourcesUpdate' Bool +udsuPrettyPrint + = lens _udsuPrettyPrint + (\ s a -> s{_udsuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsuUserIp :: Lens' UsersDataSourcesUpdate' (Maybe Text) +udsuUserIp + = lens _udsuUserIp (\ s a -> s{_udsuUserIp = a}) + +-- | The data stream ID of the data source to update. +udsuDataSourceId :: Lens' UsersDataSourcesUpdate' Text +udsuDataSourceId + = lens _udsuDataSourceId + (\ s a -> s{_udsuDataSourceId = a}) + +-- | Update the data source for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udsuUserId :: Lens' UsersDataSourcesUpdate' Text +udsuUserId + = lens _udsuUserId (\ s a -> s{_udsuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsuKey :: Lens' UsersDataSourcesUpdate' (Maybe Text) +udsuKey = lens _udsuKey (\ s a -> s{_udsuKey = a}) + +-- | OAuth 2.0 token for the current user. +udsuOauthToken :: Lens' UsersDataSourcesUpdate' (Maybe Text) +udsuOauthToken + = lens _udsuOauthToken + (\ s a -> s{_udsuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsuFields :: Lens' UsersDataSourcesUpdate' (Maybe Text) +udsuFields + = lens _udsuFields (\ s a -> s{_udsuFields = a}) + +-- | Data format for the response. +udsuAlt :: Lens' UsersDataSourcesUpdate' Text +udsuAlt = lens _udsuAlt (\ s a -> s{_udsuAlt = a}) + +instance GoogleRequest UsersDataSourcesUpdate' where + type Rs UsersDataSourcesUpdate' = DataSource + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDataSourcesUpdate{..} + = go _udsuQuotaUser _udsuPrettyPrint _udsuUserIp + _udsuDataSourceId + _udsuUserId + _udsuKey + _udsuOauthToken + _udsuFields + _udsuAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDataSourcesUpdateAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Dataset/Aggregate.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Dataset/Aggregate.hs new file mode 100644 index 000000000..eb3ef8d44 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Dataset/Aggregate.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.Dataset.Aggregate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Aggregates data of a certain type or stream into buckets divided by a +-- given type of boundary. Multiple data sets of multiple types and from +-- multiple sources can be aggreated into exactly one bucket type per +-- request. +-- +-- /See:/ for @FitnessUsersDatasetAggregate@. +module Fitness.Users.Dataset.Aggregate + ( + -- * REST Resource + UsersDatasetAggregateAPI + + -- * Creating a Request + , usersDatasetAggregate + , UsersDatasetAggregate + + -- * Request Lenses + , udaQuotaUser + , udaPrettyPrint + , udaUserIp + , udaUserId + , udaKey + , udaOauthToken + , udaFields + , udaAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersDatasetAggregate@ which the +-- 'UsersDatasetAggregate' request conforms to. +type UsersDatasetAggregateAPI = + Capture "userId" Text :> + "dataset:aggregate" :> Post '[JSON] AggregateResponse + +-- | Aggregates data of a certain type or stream into buckets divided by a +-- given type of boundary. Multiple data sets of multiple types and from +-- multiple sources can be aggreated into exactly one bucket type per +-- request. +-- +-- /See:/ 'usersDatasetAggregate' smart constructor. +data UsersDatasetAggregate = UsersDatasetAggregate + { _udaQuotaUser :: !(Maybe Text) + , _udaPrettyPrint :: !Bool + , _udaUserIp :: !(Maybe Text) + , _udaUserId :: !Text + , _udaKey :: !(Maybe Text) + , _udaOauthToken :: !(Maybe Text) + , _udaFields :: !(Maybe Text) + , _udaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDatasetAggregate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udaQuotaUser' +-- +-- * 'udaPrettyPrint' +-- +-- * 'udaUserIp' +-- +-- * 'udaUserId' +-- +-- * 'udaKey' +-- +-- * 'udaOauthToken' +-- +-- * 'udaFields' +-- +-- * 'udaAlt' +usersDatasetAggregate + :: Text -- ^ 'userId' + -> UsersDatasetAggregate +usersDatasetAggregate pUdaUserId_ = + UsersDatasetAggregate + { _udaQuotaUser = Nothing + , _udaPrettyPrint = True + , _udaUserIp = Nothing + , _udaUserId = pUdaUserId_ + , _udaKey = Nothing + , _udaOauthToken = Nothing + , _udaFields = Nothing + , _udaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udaQuotaUser :: Lens' UsersDatasetAggregate' (Maybe Text) +udaQuotaUser + = lens _udaQuotaUser (\ s a -> s{_udaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udaPrettyPrint :: Lens' UsersDatasetAggregate' Bool +udaPrettyPrint + = lens _udaPrettyPrint + (\ s a -> s{_udaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udaUserIp :: Lens' UsersDatasetAggregate' (Maybe Text) +udaUserIp + = lens _udaUserIp (\ s a -> s{_udaUserIp = a}) + +-- | Aggregate data for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +udaUserId :: Lens' UsersDatasetAggregate' Text +udaUserId + = lens _udaUserId (\ s a -> s{_udaUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udaKey :: Lens' UsersDatasetAggregate' (Maybe Text) +udaKey = lens _udaKey (\ s a -> s{_udaKey = a}) + +-- | OAuth 2.0 token for the current user. +udaOauthToken :: Lens' UsersDatasetAggregate' (Maybe Text) +udaOauthToken + = lens _udaOauthToken + (\ s a -> s{_udaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udaFields :: Lens' UsersDatasetAggregate' (Maybe Text) +udaFields + = lens _udaFields (\ s a -> s{_udaFields = a}) + +-- | Data format for the response. +udaAlt :: Lens' UsersDatasetAggregate' Text +udaAlt = lens _udaAlt (\ s a -> s{_udaAlt = a}) + +instance GoogleRequest UsersDatasetAggregate' where + type Rs UsersDatasetAggregate' = AggregateResponse + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersDatasetAggregate{..} + = go _udaQuotaUser _udaPrettyPrint _udaUserIp + _udaUserId + _udaKey + _udaOauthToken + _udaFields + _udaAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDatasetAggregateAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs new file mode 100644 index 000000000..4792f2dee --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.Sessions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a session specified by the given session ID. +-- +-- /See:/ for @FitnessUsersSessionsDelete@. +module Fitness.Users.Sessions.Delete + ( + -- * REST Resource + UsersSessionsDeleteAPI + + -- * Creating a Request + , usersSessionsDelete + , UsersSessionsDelete + + -- * Request Lenses + , usdQuotaUser + , usdPrettyPrint + , usdUserIp + , usdUserId + , usdKey + , usdCurrentTimeMillis + , usdOauthToken + , usdSessionId + , usdFields + , usdAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersSessionsDelete@ which the +-- 'UsersSessionsDelete' request conforms to. +type UsersSessionsDeleteAPI = + Capture "userId" Text :> + "sessions" :> + Capture "sessionId" Text :> + QueryParam "currentTimeMillis" Int64 :> + Delete '[JSON] () + +-- | Deletes a session specified by the given session ID. +-- +-- /See:/ 'usersSessionsDelete' smart constructor. +data UsersSessionsDelete = UsersSessionsDelete + { _usdQuotaUser :: !(Maybe Text) + , _usdPrettyPrint :: !Bool + , _usdUserIp :: !(Maybe Text) + , _usdUserId :: !Text + , _usdKey :: !(Maybe Text) + , _usdCurrentTimeMillis :: !(Maybe Int64) + , _usdOauthToken :: !(Maybe Text) + , _usdSessionId :: !Text + , _usdFields :: !(Maybe Text) + , _usdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersSessionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usdQuotaUser' +-- +-- * 'usdPrettyPrint' +-- +-- * 'usdUserIp' +-- +-- * 'usdUserId' +-- +-- * 'usdKey' +-- +-- * 'usdCurrentTimeMillis' +-- +-- * 'usdOauthToken' +-- +-- * 'usdSessionId' +-- +-- * 'usdFields' +-- +-- * 'usdAlt' +usersSessionsDelete + :: Text -- ^ 'userId' + -> Text -- ^ 'sessionId' + -> UsersSessionsDelete +usersSessionsDelete pUsdUserId_ pUsdSessionId_ = + UsersSessionsDelete + { _usdQuotaUser = Nothing + , _usdPrettyPrint = True + , _usdUserIp = Nothing + , _usdUserId = pUsdUserId_ + , _usdKey = Nothing + , _usdCurrentTimeMillis = Nothing + , _usdOauthToken = Nothing + , _usdSessionId = pUsdSessionId_ + , _usdFields = Nothing + , _usdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +usdQuotaUser :: Lens' UsersSessionsDelete' (Maybe Text) +usdQuotaUser + = lens _usdQuotaUser (\ s a -> s{_usdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +usdPrettyPrint :: Lens' UsersSessionsDelete' Bool +usdPrettyPrint + = lens _usdPrettyPrint + (\ s a -> s{_usdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +usdUserIp :: Lens' UsersSessionsDelete' (Maybe Text) +usdUserIp + = lens _usdUserIp (\ s a -> s{_usdUserIp = a}) + +-- | Delete a session for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +usdUserId :: Lens' UsersSessionsDelete' Text +usdUserId + = lens _usdUserId (\ s a -> s{_usdUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +usdKey :: Lens' UsersSessionsDelete' (Maybe Text) +usdKey = lens _usdKey (\ s a -> s{_usdKey = a}) + +-- | The client\'s current time in milliseconds since epoch. +usdCurrentTimeMillis :: Lens' UsersSessionsDelete' (Maybe Int64) +usdCurrentTimeMillis + = lens _usdCurrentTimeMillis + (\ s a -> s{_usdCurrentTimeMillis = a}) + +-- | OAuth 2.0 token for the current user. +usdOauthToken :: Lens' UsersSessionsDelete' (Maybe Text) +usdOauthToken + = lens _usdOauthToken + (\ s a -> s{_usdOauthToken = a}) + +-- | The ID of the session to be deleted. +usdSessionId :: Lens' UsersSessionsDelete' Text +usdSessionId + = lens _usdSessionId (\ s a -> s{_usdSessionId = a}) + +-- | Selector specifying which fields to include in a partial response. +usdFields :: Lens' UsersSessionsDelete' (Maybe Text) +usdFields + = lens _usdFields (\ s a -> s{_usdFields = a}) + +-- | Data format for the response. +usdAlt :: Lens' UsersSessionsDelete' Text +usdAlt = lens _usdAlt (\ s a -> s{_usdAlt = a}) + +instance GoogleRequest UsersSessionsDelete' where + type Rs UsersSessionsDelete' = () + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersSessionsDelete{..} + = go _usdQuotaUser _usdPrettyPrint _usdUserIp + _usdUserId + _usdKey + _usdCurrentTimeMillis + _usdOauthToken + _usdSessionId + _usdFields + _usdAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersSessionsDeleteAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs new file mode 100644 index 000000000..e1f517ad8 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.Sessions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists sessions previously created. +-- +-- /See:/ for @FitnessUsersSessionsList@. +module Fitness.Users.Sessions.List + ( + -- * REST Resource + UsersSessionsListAPI + + -- * Creating a Request + , usersSessionsList + , UsersSessionsList + + -- * Request Lenses + , uslQuotaUser + , uslPrettyPrint + , uslStartTime + , uslUserIp + , uslUserId + , uslKey + , uslEndTime + , uslPageToken + , uslOauthToken + , uslIncludeDeleted + , uslFields + , uslAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersSessionsList@ which the +-- 'UsersSessionsList' request conforms to. +type UsersSessionsListAPI = + Capture "userId" Text :> + "sessions" :> + QueryParam "startTime" Text :> + QueryParam "endTime" Text :> + QueryParam "pageToken" Text :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] ListSessionsResponse + +-- | Lists sessions previously created. +-- +-- /See:/ 'usersSessionsList' smart constructor. +data UsersSessionsList = UsersSessionsList + { _uslQuotaUser :: !(Maybe Text) + , _uslPrettyPrint :: !Bool + , _uslStartTime :: !(Maybe Text) + , _uslUserIp :: !(Maybe Text) + , _uslUserId :: !Text + , _uslKey :: !(Maybe Text) + , _uslEndTime :: !(Maybe Text) + , _uslPageToken :: !(Maybe Text) + , _uslOauthToken :: !(Maybe Text) + , _uslIncludeDeleted :: !(Maybe Bool) + , _uslFields :: !(Maybe Text) + , _uslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersSessionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uslQuotaUser' +-- +-- * 'uslPrettyPrint' +-- +-- * 'uslStartTime' +-- +-- * 'uslUserIp' +-- +-- * 'uslUserId' +-- +-- * 'uslKey' +-- +-- * 'uslEndTime' +-- +-- * 'uslPageToken' +-- +-- * 'uslOauthToken' +-- +-- * 'uslIncludeDeleted' +-- +-- * 'uslFields' +-- +-- * 'uslAlt' +usersSessionsList + :: Text -- ^ 'userId' + -> UsersSessionsList +usersSessionsList pUslUserId_ = + UsersSessionsList + { _uslQuotaUser = Nothing + , _uslPrettyPrint = True + , _uslStartTime = Nothing + , _uslUserIp = Nothing + , _uslUserId = pUslUserId_ + , _uslKey = Nothing + , _uslEndTime = Nothing + , _uslPageToken = Nothing + , _uslOauthToken = Nothing + , _uslIncludeDeleted = Nothing + , _uslFields = Nothing + , _uslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uslQuotaUser :: Lens' UsersSessionsList' (Maybe Text) +uslQuotaUser + = lens _uslQuotaUser (\ s a -> s{_uslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uslPrettyPrint :: Lens' UsersSessionsList' Bool +uslPrettyPrint + = lens _uslPrettyPrint + (\ s a -> s{_uslPrettyPrint = a}) + +-- | An RFC3339 timestamp. Only sessions ending between the start and end +-- times will be included in the response. +uslStartTime :: Lens' UsersSessionsList' (Maybe Text) +uslStartTime + = lens _uslStartTime (\ s a -> s{_uslStartTime = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uslUserIp :: Lens' UsersSessionsList' (Maybe Text) +uslUserIp + = lens _uslUserIp (\ s a -> s{_uslUserIp = a}) + +-- | List sessions for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +uslUserId :: Lens' UsersSessionsList' Text +uslUserId + = lens _uslUserId (\ s a -> s{_uslUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uslKey :: Lens' UsersSessionsList' (Maybe Text) +uslKey = lens _uslKey (\ s a -> s{_uslKey = a}) + +-- | An RFC3339 timestamp. Only sessions ending between the start and end +-- times will be included in the response. +uslEndTime :: Lens' UsersSessionsList' (Maybe Text) +uslEndTime + = lens _uslEndTime (\ s a -> s{_uslEndTime = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +uslPageToken :: Lens' UsersSessionsList' (Maybe Text) +uslPageToken + = lens _uslPageToken (\ s a -> s{_uslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +uslOauthToken :: Lens' UsersSessionsList' (Maybe Text) +uslOauthToken + = lens _uslOauthToken + (\ s a -> s{_uslOauthToken = a}) + +-- | If true, deleted sessions will be returned. When set to true, sessions +-- returned in this response will only have an ID and will not have any +-- other fields. +uslIncludeDeleted :: Lens' UsersSessionsList' (Maybe Bool) +uslIncludeDeleted + = lens _uslIncludeDeleted + (\ s a -> s{_uslIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +uslFields :: Lens' UsersSessionsList' (Maybe Text) +uslFields + = lens _uslFields (\ s a -> s{_uslFields = a}) + +-- | Data format for the response. +uslAlt :: Lens' UsersSessionsList' Text +uslAlt = lens _uslAlt (\ s a -> s{_uslAlt = a}) + +instance GoogleRequest UsersSessionsList' where + type Rs UsersSessionsList' = ListSessionsResponse + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersSessionsList{..} + = go _uslQuotaUser _uslPrettyPrint _uslStartTime + _uslUserIp + _uslUserId + _uslKey + _uslEndTime + _uslPageToken + _uslOauthToken + _uslIncludeDeleted + _uslFields + _uslAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersSessionsListAPI) + r + u diff --git a/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Update.hs b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Update.hs new file mode 100644 index 000000000..bd53db337 --- /dev/null +++ b/gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Update.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Fitness.Users.Sessions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates or insert a given session. +-- +-- /See:/ for @FitnessUsersSessionsUpdate@. +module Fitness.Users.Sessions.Update + ( + -- * REST Resource + UsersSessionsUpdateAPI + + -- * Creating a Request + , usersSessionsUpdate + , UsersSessionsUpdate + + -- * Request Lenses + , usuQuotaUser + , usuPrettyPrint + , usuUserIp + , usuUserId + , usuKey + , usuCurrentTimeMillis + , usuOauthToken + , usuSessionId + , usuFields + , usuAlt + ) where + +import Network.Google.Fitness.Types +import Network.Google.Prelude + +-- | A resource alias for @FitnessUsersSessionsUpdate@ which the +-- 'UsersSessionsUpdate' request conforms to. +type UsersSessionsUpdateAPI = + Capture "userId" Text :> + "sessions" :> + Capture "sessionId" Text :> + QueryParam "currentTimeMillis" Int64 :> + Put '[JSON] Session + +-- | Updates or insert a given session. +-- +-- /See:/ 'usersSessionsUpdate' smart constructor. +data UsersSessionsUpdate = UsersSessionsUpdate + { _usuQuotaUser :: !(Maybe Text) + , _usuPrettyPrint :: !Bool + , _usuUserIp :: !(Maybe Text) + , _usuUserId :: !Text + , _usuKey :: !(Maybe Text) + , _usuCurrentTimeMillis :: !(Maybe Int64) + , _usuOauthToken :: !(Maybe Text) + , _usuSessionId :: !Text + , _usuFields :: !(Maybe Text) + , _usuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersSessionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usuQuotaUser' +-- +-- * 'usuPrettyPrint' +-- +-- * 'usuUserIp' +-- +-- * 'usuUserId' +-- +-- * 'usuKey' +-- +-- * 'usuCurrentTimeMillis' +-- +-- * 'usuOauthToken' +-- +-- * 'usuSessionId' +-- +-- * 'usuFields' +-- +-- * 'usuAlt' +usersSessionsUpdate + :: Text -- ^ 'userId' + -> Text -- ^ 'sessionId' + -> UsersSessionsUpdate +usersSessionsUpdate pUsuUserId_ pUsuSessionId_ = + UsersSessionsUpdate + { _usuQuotaUser = Nothing + , _usuPrettyPrint = True + , _usuUserIp = Nothing + , _usuUserId = pUsuUserId_ + , _usuKey = Nothing + , _usuCurrentTimeMillis = Nothing + , _usuOauthToken = Nothing + , _usuSessionId = pUsuSessionId_ + , _usuFields = Nothing + , _usuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +usuQuotaUser :: Lens' UsersSessionsUpdate' (Maybe Text) +usuQuotaUser + = lens _usuQuotaUser (\ s a -> s{_usuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +usuPrettyPrint :: Lens' UsersSessionsUpdate' Bool +usuPrettyPrint + = lens _usuPrettyPrint + (\ s a -> s{_usuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +usuUserIp :: Lens' UsersSessionsUpdate' (Maybe Text) +usuUserIp + = lens _usuUserIp (\ s a -> s{_usuUserIp = a}) + +-- | Create sessions for the person identified. Use me to indicate the +-- authenticated user. Only me is supported at this time. +usuUserId :: Lens' UsersSessionsUpdate' Text +usuUserId + = lens _usuUserId (\ s a -> s{_usuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +usuKey :: Lens' UsersSessionsUpdate' (Maybe Text) +usuKey = lens _usuKey (\ s a -> s{_usuKey = a}) + +-- | The client\'s current time in milliseconds since epoch. +usuCurrentTimeMillis :: Lens' UsersSessionsUpdate' (Maybe Int64) +usuCurrentTimeMillis + = lens _usuCurrentTimeMillis + (\ s a -> s{_usuCurrentTimeMillis = a}) + +-- | OAuth 2.0 token for the current user. +usuOauthToken :: Lens' UsersSessionsUpdate' (Maybe Text) +usuOauthToken + = lens _usuOauthToken + (\ s a -> s{_usuOauthToken = a}) + +-- | The ID of the session to be created. +usuSessionId :: Lens' UsersSessionsUpdate' Text +usuSessionId + = lens _usuSessionId (\ s a -> s{_usuSessionId = a}) + +-- | Selector specifying which fields to include in a partial response. +usuFields :: Lens' UsersSessionsUpdate' (Maybe Text) +usuFields + = lens _usuFields (\ s a -> s{_usuFields = a}) + +-- | Data format for the response. +usuAlt :: Lens' UsersSessionsUpdate' Text +usuAlt = lens _usuAlt (\ s a -> s{_usuAlt = a}) + +instance GoogleRequest UsersSessionsUpdate' where + type Rs UsersSessionsUpdate' = Session + request = requestWithRoute defReq fitnessURL + requestWithRoute r u UsersSessionsUpdate{..} + = go _usuQuotaUser _usuPrettyPrint _usuUserIp + _usuUserId + _usuKey + _usuCurrentTimeMillis + _usuOauthToken + _usuSessionId + _usuFields + _usuAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersSessionsUpdateAPI) + r + u diff --git a/gogol-fitness/gogol-fitness.cabal b/gogol-fitness/gogol-fitness.cabal new file mode 100644 index 000000000..95c7506cc --- /dev/null +++ b/gogol-fitness/gogol-fitness.cabal @@ -0,0 +1,55 @@ +name: gogol-fitness +version: 0.0.1 +synopsis: Fitness Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Google Fit API + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Fitness + , Network.Google.Fitness.Types + , Network.Google.Resource.Fitness.Users.DataSources.Create + , Network.Google.Resource.Fitness.Users.DataSources.Datasets.Delete + , Network.Google.Resource.Fitness.Users.DataSources.Datasets.Get + , Network.Google.Resource.Fitness.Users.DataSources.Datasets.Patch + , Network.Google.Resource.Fitness.Users.DataSources.Delete + , Network.Google.Resource.Fitness.Users.DataSources.Get + , Network.Google.Resource.Fitness.Users.DataSources.List + , Network.Google.Resource.Fitness.Users.DataSources.Patch + , Network.Google.Resource.Fitness.Users.DataSources.Update + , Network.Google.Resource.Fitness.Users.Dataset.Aggregate + , Network.Google.Resource.Fitness.Users.Sessions.Delete + , Network.Google.Resource.Fitness.Users.Sessions.List + , Network.Google.Resource.Fitness.Users.Sessions.Update + + other-modules: + Network.Google.Fitness.Types.Product + , Network.Google.Fitness.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-fitness/src/.gitkeep b/gogol-fitness/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-fonts/LICENSE b/gogol-fonts/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-fonts/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-fonts/Makefile b/gogol-fonts/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-fonts/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-fonts/README.md b/gogol-fonts/README.md new file mode 100644 index 000000000..f9a44d92d --- /dev/null +++ b/gogol-fonts/README.md @@ -0,0 +1,28 @@ +# gogol-fonts + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Fonts Developer API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-fonts` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-fonts/Setup.hs b/gogol-fonts/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-fonts/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-fonts/gen/Network/Google/Fonts.hs b/gogol-fonts/gen/Network/Google/Fonts.hs new file mode 100644 index 000000000..8ed53d285 --- /dev/null +++ b/gogol-fonts/gen/Network/Google/Fonts.hs @@ -0,0 +1,64 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Fonts +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Fonts Developer API. +-- +-- /See:/ +module Network.Google.Fonts + ( + -- * API + FontsAPI + , fontsAPI + , fontsURL + + -- * Service Methods + + -- * REST Resources + + -- ** WebfontsWebfontsList + , module Webfonts.Webfonts.List + + -- * Types + + -- ** Webfont + , Webfont + , webfont + , wVariants + , wKind + , wCategory + , wFamily + , wVersion + , wFiles + , wSubsets + , wLastModified + + -- ** WebfontList + , WebfontList + , webfontList + , wlKind + , wlItems + ) where + +import Network.Google.Fonts.Types +import Network.Google.Prelude +import Network.Google.Resource.Webfonts.Webfonts.List + +{- $resources +TODO +-} + +type FontsAPI = Webfonts + +fontsAPI :: Proxy FontsAPI +fontsAPI = Proxy diff --git a/gogol-fonts/gen/Network/Google/Fonts/Types.hs b/gogol-fonts/gen/Network/Google/Fonts/Types.hs new file mode 100644 index 000000000..af43e3ead --- /dev/null +++ b/gogol-fonts/gen/Network/Google/Fonts/Types.hs @@ -0,0 +1,48 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fonts.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fonts.Types + ( + -- * Service URL + fontsURL + + -- * Webfont + , Webfont + , webfont + , wVariants + , wKind + , wCategory + , wFamily + , wVersion + , wFiles + , wSubsets + , wLastModified + + -- * WebfontList + , WebfontList + , webfontList + , wlKind + , wlItems + ) where + +import Network.Google.Fonts.Types.Product +import Network.Google.Fonts.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Fonts Developer API. +fontsURL :: BaseURL +fontsURL + = BaseUrl Https + "https://www.googleapis.com/webfonts/v1/" + 443 diff --git a/gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs b/gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs new file mode 100644 index 000000000..1d8ee0944 --- /dev/null +++ b/gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fonts.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fonts.Types.Product where + +import Network.Google.Fonts.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'webfont' smart constructor. +data Webfont = Webfont + { _wVariants :: !(Maybe [Text]) + , _wKind :: !Text + , _wCategory :: !(Maybe Text) + , _wFamily :: !(Maybe Text) + , _wVersion :: !(Maybe Text) + , _wFiles :: !(Maybe WebfontFiles) + , _wSubsets :: !(Maybe [Text]) + , _wLastModified :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Webfont' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wVariants' +-- +-- * 'wKind' +-- +-- * 'wCategory' +-- +-- * 'wFamily' +-- +-- * 'wVersion' +-- +-- * 'wFiles' +-- +-- * 'wSubsets' +-- +-- * 'wLastModified' +webfont + :: Webfont +webfont = + Webfont + { _wVariants = Nothing + , _wKind = "webfonts#webfont" + , _wCategory = Nothing + , _wFamily = Nothing + , _wVersion = Nothing + , _wFiles = Nothing + , _wSubsets = Nothing + , _wLastModified = Nothing + } + +-- | The available variants for the font. +wVariants :: Lens' Webfont [Text] +wVariants + = lens _wVariants (\ s a -> s{_wVariants = a}) . + _Default + . _Coerce + +-- | This kind represents a webfont object in the webfonts service. +wKind :: Lens' Webfont Text +wKind = lens _wKind (\ s a -> s{_wKind = a}) + +-- | The category of the font. +wCategory :: Lens' Webfont (Maybe Text) +wCategory + = lens _wCategory (\ s a -> s{_wCategory = a}) + +-- | The name of the font. +wFamily :: Lens' Webfont (Maybe Text) +wFamily = lens _wFamily (\ s a -> s{_wFamily = a}) + +-- | The font version. +wVersion :: Lens' Webfont (Maybe Text) +wVersion = lens _wVersion (\ s a -> s{_wVersion = a}) + +-- | The font files (with all supported scripts) for each one of the +-- available variants, as a key : value map. +wFiles :: Lens' Webfont (Maybe WebfontFiles) +wFiles = lens _wFiles (\ s a -> s{_wFiles = a}) + +-- | The scripts supported by the font. +wSubsets :: Lens' Webfont [Text] +wSubsets + = lens _wSubsets (\ s a -> s{_wSubsets = a}) . + _Default + . _Coerce + +-- | The date (format \"yyyy-MM-dd\") the font was modified for the last +-- time. +wLastModified :: Lens' Webfont (Maybe UTCTime) +wLastModified + = lens _wLastModified + (\ s a -> s{_wLastModified = a}) + +instance FromJSON Webfont where + parseJSON + = withObject "Webfont" + (\ o -> + Webfont <$> + (o .:? "variants" .!= mempty) <*> + (o .:? "kind" .!= "webfonts#webfont") + <*> (o .:? "category") + <*> (o .:? "family") + <*> (o .:? "version") + <*> (o .:? "files") + <*> (o .:? "subsets" .!= mempty) + <*> (o .:? "lastModified")) + +instance ToJSON Webfont where + toJSON Webfont{..} + = object + (catMaybes + [("variants" .=) <$> _wVariants, + Just ("kind" .= _wKind), + ("category" .=) <$> _wCategory, + ("family" .=) <$> _wFamily, + ("version" .=) <$> _wVersion, + ("files" .=) <$> _wFiles, + ("subsets" .=) <$> _wSubsets, + ("lastModified" .=) <$> _wLastModified]) + +-- +-- /See:/ 'webfontList' smart constructor. +data WebfontList = WebfontList + { _wlKind :: !Text + , _wlItems :: !(Maybe [Maybe Webfont]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebfontList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlKind' +-- +-- * 'wlItems' +webfontList + :: WebfontList +webfontList = + WebfontList + { _wlKind = "webfonts#webfontList" + , _wlItems = Nothing + } + +-- | This kind represents a list of webfont objects in the webfonts service. +wlKind :: Lens' WebfontList Text +wlKind = lens _wlKind (\ s a -> s{_wlKind = a}) + +-- | The list of fonts currently served by the Google Fonts API. +wlItems :: Lens' WebfontList [Maybe Webfont] +wlItems + = lens _wlItems (\ s a -> s{_wlItems = a}) . _Default + . _Coerce + +instance FromJSON WebfontList where + parseJSON + = withObject "WebfontList" + (\ o -> + WebfontList <$> + (o .:? "kind" .!= "webfonts#webfontList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON WebfontList where + toJSON WebfontList{..} + = object + (catMaybes + [Just ("kind" .= _wlKind), + ("items" .=) <$> _wlItems]) diff --git a/gogol-fonts/gen/Network/Google/Fonts/Types/Sum.hs b/gogol-fonts/gen/Network/Google/Fonts/Types/Sum.hs new file mode 100644 index 000000000..6bc792213 --- /dev/null +++ b/gogol-fonts/gen/Network/Google/Fonts/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Fonts.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Fonts.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-fonts/gen/Network/Google/Resource/Webfonts/Webfonts/List.hs b/gogol-fonts/gen/Network/Google/Resource/Webfonts/Webfonts/List.hs new file mode 100644 index 000000000..bb3963728 --- /dev/null +++ b/gogol-fonts/gen/Network/Google/Resource/Webfonts/Webfonts/List.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webfonts.Webfonts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of fonts currently served by the Google Fonts +-- Developer API +-- +-- /See:/ for @WebfontsWebfontsList@. +module Webfonts.Webfonts.List + ( + -- * REST Resource + WebfontsListAPI + + -- * Creating a Request + , webfontsList + , WebfontsList + + -- * Request Lenses + , wlQuotaUser + , wlPrettyPrint + , wlUserIp + , wlKey + , wlSort + , wlOauthToken + , wlFields + , wlAlt + ) where + +import Network.Google.Fonts.Types +import Network.Google.Prelude + +-- | A resource alias for @WebfontsWebfontsList@ which the +-- 'WebfontsList' request conforms to. +type WebfontsListAPI = + "webfonts" :> + QueryParam "sort" Text :> Get '[JSON] WebfontList + +-- | Retrieves the list of fonts currently served by the Google Fonts +-- Developer API +-- +-- /See:/ 'webfontsList' smart constructor. +data WebfontsList = WebfontsList + { _wlQuotaUser :: !(Maybe Text) + , _wlPrettyPrint :: !Bool + , _wlUserIp :: !(Maybe Text) + , _wlKey :: !(Maybe Text) + , _wlSort :: !(Maybe Text) + , _wlOauthToken :: !(Maybe Text) + , _wlFields :: !(Maybe Text) + , _wlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebfontsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlQuotaUser' +-- +-- * 'wlPrettyPrint' +-- +-- * 'wlUserIp' +-- +-- * 'wlKey' +-- +-- * 'wlSort' +-- +-- * 'wlOauthToken' +-- +-- * 'wlFields' +-- +-- * 'wlAlt' +webfontsList + :: WebfontsList +webfontsList = + WebfontsList + { _wlQuotaUser = Nothing + , _wlPrettyPrint = True + , _wlUserIp = Nothing + , _wlKey = Nothing + , _wlSort = Nothing + , _wlOauthToken = Nothing + , _wlFields = Nothing + , _wlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wlQuotaUser :: Lens' WebfontsList' (Maybe Text) +wlQuotaUser + = lens _wlQuotaUser (\ s a -> s{_wlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wlPrettyPrint :: Lens' WebfontsList' Bool +wlPrettyPrint + = lens _wlPrettyPrint + (\ s a -> s{_wlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wlUserIp :: Lens' WebfontsList' (Maybe Text) +wlUserIp = lens _wlUserIp (\ s a -> s{_wlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wlKey :: Lens' WebfontsList' (Maybe Text) +wlKey = lens _wlKey (\ s a -> s{_wlKey = a}) + +-- | Enables sorting of the list +wlSort :: Lens' WebfontsList' (Maybe Text) +wlSort = lens _wlSort (\ s a -> s{_wlSort = a}) + +-- | OAuth 2.0 token for the current user. +wlOauthToken :: Lens' WebfontsList' (Maybe Text) +wlOauthToken + = lens _wlOauthToken (\ s a -> s{_wlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wlFields :: Lens' WebfontsList' (Maybe Text) +wlFields = lens _wlFields (\ s a -> s{_wlFields = a}) + +-- | Data format for the response. +wlAlt :: Lens' WebfontsList' Text +wlAlt = lens _wlAlt (\ s a -> s{_wlAlt = a}) + +instance GoogleRequest WebfontsList' where + type Rs WebfontsList' = WebfontList + request = requestWithRoute defReq fontsURL + requestWithRoute r u WebfontsList{..} + = go _wlQuotaUser _wlPrettyPrint _wlUserIp _wlKey + _wlSort + _wlOauthToken + _wlFields + _wlAlt + where go + = clientWithRoute (Proxy :: Proxy WebfontsListAPI) r + u diff --git a/gogol-fonts/gogol-fonts.cabal b/gogol-fonts/gogol-fonts.cabal new file mode 100644 index 000000000..ad4474b17 --- /dev/null +++ b/gogol-fonts/gogol-fonts.cabal @@ -0,0 +1,43 @@ +name: gogol-fonts +version: 0.0.1 +synopsis: Google Fonts Developer API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Fonts Developer API. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Fonts + , Network.Google.Fonts.Types + , Network.Google.Resource.Webfonts.Webfonts.List + + other-modules: + Network.Google.Fonts.Types.Product + , Network.Google.Fonts.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-fonts/src/.gitkeep b/gogol-fonts/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-freebasesearch/LICENSE b/gogol-freebasesearch/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-freebasesearch/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-freebasesearch/Makefile b/gogol-freebasesearch/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-freebasesearch/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-freebasesearch/README.md b/gogol-freebasesearch/README.md new file mode 100644 index 000000000..f760913e0 --- /dev/null +++ b/gogol-freebasesearch/README.md @@ -0,0 +1,28 @@ +# gogol-freebasesearch + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Freebase Search. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-freebasesearch` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-freebasesearch/Setup.hs b/gogol-freebasesearch/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-freebasesearch/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-freebasesearch/gen/Network/Google/FreebaseSearch.hs b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch.hs new file mode 100644 index 000000000..bca187d78 --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch.hs @@ -0,0 +1,68 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.FreebaseSearch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Find Freebase entities using textual queries and other constraints. +-- +-- /See:/ +module Network.Google.FreebaseSearch + ( + -- * API + FreebaseSearchAPI + , freebaseSearchAPI + , freebaseSearchURL + + -- * Service Methods + + -- ** FreebaseReconcile + , module Freebase.Reconcile + + -- ** FreebaseSearch + , module Freebase.Search + + -- * REST Resources + + -- * Types + + -- ** ReconcileGet + , ReconcileGet + , reconcileGet + , rgCandidate + , rgCosts + , rgWarning + , rgMatch + + -- ** ReconcileCandidate + , ReconcileCandidate + , reconcileCandidate + , rcLang + , rcConfidence + , rcName + , rcNotable + , rcMid + ) where + +import Network.Google.FreebaseSearch.Types +import Network.Google.Method.Freebase.Reconcile +import Network.Google.Method.Freebase.Search +import Network.Google.Prelude + +{- $resources +TODO +-} + +type FreebaseSearchAPI = + FreebaseReconcile :<|> FreebaseSearch + +freebaseSearchAPI :: Proxy FreebaseSearchAPI +freebaseSearchAPI = Proxy diff --git a/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types.hs b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types.hs new file mode 100644 index 000000000..70a41020b --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types.hs @@ -0,0 +1,47 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FreebaseSearch.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FreebaseSearch.Types + ( + -- * Service URL + freebaseSearchURL + + -- * ReconcileGet + , ReconcileGet + , reconcileGet + , rgCandidate + , rgCosts + , rgWarning + , rgMatch + + -- * ReconcileCandidate + , ReconcileCandidate + , reconcileCandidate + , rcLang + , rcConfidence + , rcName + , rcNotable + , rcMid + ) where + +import Network.Google.FreebaseSearch.Types.Product +import Network.Google.FreebaseSearch.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Freebase Search. +freebaseSearchURL :: BaseURL +freebaseSearchURL + = BaseUrl Https + "https://www.googleapis.com/freebase/v1/" + 443 diff --git a/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Product.hs b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Product.hs new file mode 100644 index 000000000..ec4ea0ace --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Product.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FreebaseSearch.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FreebaseSearch.Types.Product where + +import Network.Google.FreebaseSearch.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'reconcileGet' smart constructor. +data ReconcileGet = ReconcileGet + { _rgCandidate :: !(Maybe [Maybe ReconcileCandidate]) + , _rgCosts :: !(Maybe ReconcileGetCosts) + , _rgWarning :: !(Maybe [ReconcileGetWarningItem]) + , _rgMatch :: !(Maybe (Maybe ReconcileCandidate)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReconcileGet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgCandidate' +-- +-- * 'rgCosts' +-- +-- * 'rgWarning' +-- +-- * 'rgMatch' +reconcileGet + :: ReconcileGet +reconcileGet = + ReconcileGet + { _rgCandidate = Nothing + , _rgCosts = Nothing + , _rgWarning = Nothing + , _rgMatch = Nothing + } + +-- | If filled, then the listed candidates are potential matches, and such +-- should be evaluated by a more discerning algorithm or human. The matches +-- are ordered by confidence. +rgCandidate :: Lens' ReconcileGet [Maybe ReconcileCandidate] +rgCandidate + = lens _rgCandidate (\ s a -> s{_rgCandidate = a}) . + _Default + . _Coerce + +-- | Server costs for reconciling. +rgCosts :: Lens' ReconcileGet (Maybe ReconcileGetCosts) +rgCosts = lens _rgCosts (\ s a -> s{_rgCosts = a}) + +-- | If filled, then there were recoverable problems that affected the +-- request. For example, some of the properties were ignored because they +-- either are not valid Freebase predicates or are not indexed for +-- reconciliation. The candidates returned should be considered valid +-- results, with the caveat that sections of the request were ignored as +-- specified by the warning text. +rgWarning :: Lens' ReconcileGet [ReconcileGetWarningItem] +rgWarning + = lens _rgWarning (\ s a -> s{_rgWarning = a}) . + _Default + . _Coerce + +-- | If filled, this entity is guaranteed to match at requested confidence +-- probability (default 99%). +rgMatch :: Lens' ReconcileGet (Maybe (Maybe ReconcileCandidate)) +rgMatch = lens _rgMatch (\ s a -> s{_rgMatch = a}) + +instance FromJSON ReconcileGet where + parseJSON + = withObject "ReconcileGet" + (\ o -> + ReconcileGet <$> + (o .:? "candidate" .!= mempty) <*> (o .:? "costs") + <*> (o .:? "warning" .!= mempty) + <*> (o .:? "match")) + +instance ToJSON ReconcileGet where + toJSON ReconcileGet{..} + = object + (catMaybes + [("candidate" .=) <$> _rgCandidate, + ("costs" .=) <$> _rgCosts, + ("warning" .=) <$> _rgWarning, + ("match" .=) <$> _rgMatch]) + +-- +-- /See:/ 'reconcileCandidate' smart constructor. +data ReconcileCandidate = ReconcileCandidate + { _rcLang :: !(Maybe Text) + , _rcConfidence :: !(Maybe Float) + , _rcName :: !(Maybe Text) + , _rcNotable :: !(Maybe ReconcileCandidateNotable) + , _rcMid :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReconcileCandidate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcLang' +-- +-- * 'rcConfidence' +-- +-- * 'rcName' +-- +-- * 'rcNotable' +-- +-- * 'rcMid' +reconcileCandidate + :: ReconcileCandidate +reconcileCandidate = + ReconcileCandidate + { _rcLang = Nothing + , _rcConfidence = Nothing + , _rcName = Nothing + , _rcNotable = Nothing + , _rcMid = Nothing + } + +-- | Language code that candidate and notable names are displayed in. +rcLang :: Lens' ReconcileCandidate (Maybe Text) +rcLang = lens _rcLang (\ s a -> s{_rcLang = a}) + +-- | Percentage likelihood that this candidate is the unique matching entity. +-- Value will be between 0.0 and 1.0 +rcConfidence :: Lens' ReconcileCandidate (Maybe Float) +rcConfidence + = lens _rcConfidence (\ s a -> s{_rcConfidence = a}) + +-- | Freebase name of matching entity in specified language. +rcName :: Lens' ReconcileCandidate (Maybe Text) +rcName = lens _rcName (\ s a -> s{_rcName = a}) + +-- | Type or profession the candidate is notable for. +rcNotable :: Lens' ReconcileCandidate (Maybe ReconcileCandidateNotable) +rcNotable + = lens _rcNotable (\ s a -> s{_rcNotable = a}) + +-- | Freebase MID of candidate entity. +rcMid :: Lens' ReconcileCandidate (Maybe Text) +rcMid = lens _rcMid (\ s a -> s{_rcMid = a}) + +instance FromJSON ReconcileCandidate where + parseJSON + = withObject "ReconcileCandidate" + (\ o -> + ReconcileCandidate <$> + (o .:? "lang") <*> (o .:? "confidence") <*> + (o .:? "name") + <*> (o .:? "notable") + <*> (o .:? "mid")) + +instance ToJSON ReconcileCandidate where + toJSON ReconcileCandidate{..} + = object + (catMaybes + [("lang" .=) <$> _rcLang, + ("confidence" .=) <$> _rcConfidence, + ("name" .=) <$> _rcName, + ("notable" .=) <$> _rcNotable, + ("mid" .=) <$> _rcMid]) diff --git a/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Sum.hs b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Sum.hs new file mode 100644 index 000000000..341fffd10 --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FreebaseSearch.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FreebaseSearch.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Reconcile.hs b/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Reconcile.hs new file mode 100644 index 000000000..4cb5dfed7 --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Reconcile.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Method.Freebase.Reconcile +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Reconcile entities to Freebase open data. +-- +-- /See:/ for @FreebaseReconcile@. +module Freebase.Reconcile + ( + -- * REST Resource + ReconcileAPI + + -- * Creating a Request + , reconcile + , Reconcile + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rKind + , rUserIp + , rLang + , rConfidence + , rKey + , rName + , rLimit + , rProp + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.FreebaseSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @FreebaseReconcile@ which the +-- 'Reconcile' request conforms to. +type ReconcileAPI = + "reconcile" :> + QueryParams "kind" Text :> + QueryParams "lang" Text :> + QueryParam "confidence" Float :> + QueryParam "name" Text :> + QueryParam "limit" Int32 :> + QueryParams "prop" Text :> Get '[JSON] ReconcileGet + +-- | Reconcile entities to Freebase open data. +-- +-- /See:/ 'reconcile' smart constructor. +data Reconcile = Reconcile + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rKind :: !(Maybe Text) + , _rUserIp :: !(Maybe Text) + , _rLang :: !(Maybe Text) + , _rConfidence :: !Float + , _rKey :: !(Maybe Text) + , _rName :: !(Maybe Text) + , _rLimit :: !Int32 + , _rProp :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Reconcile'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rKind' +-- +-- * 'rUserIp' +-- +-- * 'rLang' +-- +-- * 'rConfidence' +-- +-- * 'rKey' +-- +-- * 'rName' +-- +-- * 'rLimit' +-- +-- * 'rProp' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +reconcile + :: Reconcile +reconcile = + Reconcile + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rKind = Nothing + , _rUserIp = Nothing + , _rLang = Nothing + , _rConfidence = 0.99 + , _rKey = Nothing + , _rName = Nothing + , _rLimit = 3 + , _rProp = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' Reconcile' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' Reconcile' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | Classifications of entity e.g. type, category, title. +rKind :: Lens' Reconcile' (Maybe Text) +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' Reconcile' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | Languages for names and values. First language is used for display. +-- Default is \'en\'. +rLang :: Lens' Reconcile' (Maybe Text) +rLang = lens _rLang (\ s a -> s{_rLang = a}) + +-- | Required confidence for a candidate to match. Must be between .5 and 1.0 +rConfidence :: Lens' Reconcile' Float +rConfidence + = lens _rConfidence (\ s a -> s{_rConfidence = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' Reconcile' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | Name of entity. +rName :: Lens' Reconcile' (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | Maximum number of candidates to return. +rLimit :: Lens' Reconcile' Int32 +rLimit = lens _rLimit (\ s a -> s{_rLimit = a}) + +-- | Property values for entity formatted as : +rProp :: Lens' Reconcile' (Maybe Text) +rProp = lens _rProp (\ s a -> s{_rProp = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' Reconcile' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' Reconcile' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' Reconcile' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest Reconcile' where + type Rs Reconcile' = ReconcileGet + request = requestWithRoute defReq freebaseSearchURL + requestWithRoute r u Reconcile{..} + = go _rQuotaUser _rPrettyPrint _rKind _rUserIp _rLang + (Just _rConfidence) + _rKey + _rName + (Just _rLimit) + _rProp + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy ReconcileAPI) r u diff --git a/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Search.hs b/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Search.hs new file mode 100644 index 000000000..a7d14a7c8 --- /dev/null +++ b/gogol-freebasesearch/gen/Network/Google/Method/Freebase/Search.hs @@ -0,0 +1,396 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Method.Freebase.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Search Freebase open data. +-- +-- /See:/ for @FreebaseSearch@. +module Freebase.Search + ( + -- * REST Resource + SearchAPI + + -- * Creating a Request + , search + , Search + + -- * Request Lenses + , sWithout + , sQuotaUser + , sPrettyPrint + , sCursor + , sWith + , sUserIp + , sDomain + , sFormat + , sHelp + , sLang + , sIndent + , sKey + , sOutput + , sQuery + , sScoring + , sLimit + , sFilter + , sMqlOutput + , sMid + , sType + , sStemmed + , sOauthToken + , sExact + , sSpell + , sAsOfTime + , sEncode + , sPrefixed + , sFields + , sCallback + , sAlt + ) where + +import Network.Google.FreebaseSearch.Types +import Network.Google.Prelude + +-- | A resource alias for @FreebaseSearch@ which the +-- 'Search' request conforms to. +type SearchAPI = + "search" :> + QueryParams "without" Text :> + QueryParam "cursor" Int32 :> + QueryParams "with" Text :> + QueryParams "domain" Text :> + QueryParam "format" Text :> + QueryParam "help" Text :> + QueryParams "lang" Text :> + QueryParam "indent" Bool :> + QueryParam "output" Text :> + QueryParam "query" Text :> + QueryParam "scoring" Text :> + QueryParam "limit" Int32 :> + QueryParams "filter" Text :> + QueryParam "mql_output" Text :> + QueryParams "mid" Text :> + QueryParams "type" Text :> + QueryParam "stemmed" Bool :> + QueryParam "exact" Bool :> + QueryParam "spell" Text :> + QueryParam "as_of_time" Text :> + QueryParam "encode" Text :> + QueryParam "prefixed" Bool :> + QueryParam "callback" Text :> + Get '[JSON] () + +-- | Search Freebase open data. +-- +-- /See:/ 'search' smart constructor. +data Search = Search + { _sWithout :: !(Maybe Text) + , _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sCursor :: !(Maybe Int32) + , _sWith :: !(Maybe Text) + , _sUserIp :: !(Maybe Text) + , _sDomain :: !(Maybe Text) + , _sFormat :: !Text + , _sHelp :: !(Maybe Text) + , _sLang :: !(Maybe Text) + , _sIndent :: !(Maybe Bool) + , _sKey :: !(Maybe Text) + , _sOutput :: !(Maybe Text) + , _sQuery :: !(Maybe Text) + , _sScoring :: !Text + , _sLimit :: !Int32 + , _sFilter :: !(Maybe Text) + , _sMqlOutput :: !(Maybe Text) + , _sMid :: !(Maybe Text) + , _sType :: !(Maybe Text) + , _sStemmed :: !(Maybe Bool) + , _sOauthToken :: !(Maybe Text) + , _sExact :: !(Maybe Bool) + , _sSpell :: !Text + , _sAsOfTime :: !(Maybe Text) + , _sEncode :: !Text + , _sPrefixed :: !(Maybe Bool) + , _sFields :: !(Maybe Text) + , _sCallback :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Search'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sWithout' +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sCursor' +-- +-- * 'sWith' +-- +-- * 'sUserIp' +-- +-- * 'sDomain' +-- +-- * 'sFormat' +-- +-- * 'sHelp' +-- +-- * 'sLang' +-- +-- * 'sIndent' +-- +-- * 'sKey' +-- +-- * 'sOutput' +-- +-- * 'sQuery' +-- +-- * 'sScoring' +-- +-- * 'sLimit' +-- +-- * 'sFilter' +-- +-- * 'sMqlOutput' +-- +-- * 'sMid' +-- +-- * 'sType' +-- +-- * 'sStemmed' +-- +-- * 'sOauthToken' +-- +-- * 'sExact' +-- +-- * 'sSpell' +-- +-- * 'sAsOfTime' +-- +-- * 'sEncode' +-- +-- * 'sPrefixed' +-- +-- * 'sFields' +-- +-- * 'sCallback' +-- +-- * 'sAlt' +search + :: Search +search = + Search + { _sWithout = Nothing + , _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sCursor = Nothing + , _sWith = Nothing + , _sUserIp = Nothing + , _sDomain = Nothing + , _sFormat = "entity" + , _sHelp = Nothing + , _sLang = Nothing + , _sIndent = Nothing + , _sKey = Nothing + , _sOutput = Nothing + , _sQuery = Nothing + , _sScoring = "entity" + , _sLimit = 20 + , _sFilter = Nothing + , _sMqlOutput = Nothing + , _sMid = Nothing + , _sType = Nothing + , _sStemmed = Nothing + , _sOauthToken = Nothing + , _sExact = Nothing + , _sSpell = "no_spelling" + , _sAsOfTime = Nothing + , _sEncode = "off" + , _sPrefixed = Nothing + , _sFields = Nothing + , _sCallback = Nothing + , _sAlt = "json" + } + +-- | A rule to not match against. +sWithout :: Lens' Search' (Maybe Text) +sWithout = lens _sWithout (\ s a -> s{_sWithout = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' Search' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' Search' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | The cursor value to use for the next page of results. +sCursor :: Lens' Search' (Maybe Int32) +sCursor = lens _sCursor (\ s a -> s{_sCursor = a}) + +-- | A rule to match against. +sWith :: Lens' Search' (Maybe Text) +sWith = lens _sWith (\ s a -> s{_sWith = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' Search' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | Restrict to topics with this Freebase domain id. +sDomain :: Lens' Search' (Maybe Text) +sDomain = lens _sDomain (\ s a -> s{_sDomain = a}) + +-- | Structural format of the json response. +sFormat :: Lens' Search' Text +sFormat = lens _sFormat (\ s a -> s{_sFormat = a}) + +-- | The keyword to request help on. +sHelp :: Lens' Search' (Maybe Text) +sHelp = lens _sHelp (\ s a -> s{_sHelp = a}) + +-- | The code of the language to run the query with. Default is \'en\'. +sLang :: Lens' Search' (Maybe Text) +sLang = lens _sLang (\ s a -> s{_sLang = a}) + +-- | Whether to indent the json results or not. +sIndent :: Lens' Search' (Maybe Bool) +sIndent = lens _sIndent (\ s a -> s{_sIndent = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' Search' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | An output expression to request data from matches. +sOutput :: Lens' Search' (Maybe Text) +sOutput = lens _sOutput (\ s a -> s{_sOutput = a}) + +-- | Query term to search for. +sQuery :: Lens' Search' (Maybe Text) +sQuery = lens _sQuery (\ s a -> s{_sQuery = a}) + +-- | Relevance scoring algorithm to use. +sScoring :: Lens' Search' Text +sScoring = lens _sScoring (\ s a -> s{_sScoring = a}) + +-- | Maximum number of results to return. +sLimit :: Lens' Search' Int32 +sLimit = lens _sLimit (\ s a -> s{_sLimit = a}) + +-- | A filter to apply to the query. +sFilter :: Lens' Search' (Maybe Text) +sFilter = lens _sFilter (\ s a -> s{_sFilter = a}) + +-- | The MQL query to run againist the results to extract more data. +sMqlOutput :: Lens' Search' (Maybe Text) +sMqlOutput + = lens _sMqlOutput (\ s a -> s{_sMqlOutput = a}) + +-- | A mid to use instead of a query. +sMid :: Lens' Search' (Maybe Text) +sMid = lens _sMid (\ s a -> s{_sMid = a}) + +-- | Restrict to topics with this Freebase type id. +sType :: Lens' Search' (Maybe Text) +sType = lens _sType (\ s a -> s{_sType = a}) + +-- | Query on stemmed names and aliases. May not be used with prefixed. +sStemmed :: Lens' Search' (Maybe Bool) +sStemmed = lens _sStemmed (\ s a -> s{_sStemmed = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' Search' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | Query on exact name and keys only. +sExact :: Lens' Search' (Maybe Bool) +sExact = lens _sExact (\ s a -> s{_sExact = a}) + +-- | Request \'did you mean\' suggestions +sSpell :: Lens' Search' Text +sSpell = lens _sSpell (\ s a -> s{_sSpell = a}) + +-- | A mql as_of_time value to use with mql_output queries. +sAsOfTime :: Lens' Search' (Maybe Text) +sAsOfTime + = lens _sAsOfTime (\ s a -> s{_sAsOfTime = a}) + +-- | The encoding of the response. You can use this parameter to enable html +-- encoding. +sEncode :: Lens' Search' Text +sEncode = lens _sEncode (\ s a -> s{_sEncode = a}) + +-- | Prefix match against names and aliases. +sPrefixed :: Lens' Search' (Maybe Bool) +sPrefixed + = lens _sPrefixed (\ s a -> s{_sPrefixed = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' Search' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | JS method name for JSONP callbacks. +sCallback :: Lens' Search' (Maybe Text) +sCallback + = lens _sCallback (\ s a -> s{_sCallback = a}) + +-- | Data format for the response. +sAlt :: Lens' Search' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest Search' where + type Rs Search' = () + request = requestWithRoute defReq freebaseSearchURL + requestWithRoute r u Search{..} + = go _sWithout _sQuotaUser _sPrettyPrint _sCursor + _sWith + _sUserIp + _sDomain + (Just _sFormat) + _sHelp + _sLang + _sIndent + _sKey + _sOutput + _sQuery + (Just _sScoring) + (Just _sLimit) + _sFilter + _sMqlOutput + _sMid + _sType + _sStemmed + _sOauthToken + _sExact + (Just _sSpell) + _sAsOfTime + (Just _sEncode) + _sPrefixed + _sFields + _sCallback + _sAlt + where go + = clientWithRoute (Proxy :: Proxy SearchAPI) r u diff --git a/gogol-freebasesearch/gogol-freebasesearch.cabal b/gogol-freebasesearch/gogol-freebasesearch.cabal new file mode 100644 index 000000000..927510459 --- /dev/null +++ b/gogol-freebasesearch/gogol-freebasesearch.cabal @@ -0,0 +1,44 @@ +name: gogol-freebasesearch +version: 0.0.1 +synopsis: Freebase Search Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Find Freebase entities using textual queries and other constraints. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.FreebaseSearch + , Network.Google.FreebaseSearch.Types + , Network.Google.Method.Freebase.Reconcile + , Network.Google.Method.Freebase.Search + + other-modules: + Network.Google.FreebaseSearch.Types.Product + , Network.Google.FreebaseSearch.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-freebasesearch/src/.gitkeep b/gogol-freebasesearch/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-fusiontables/LICENSE b/gogol-fusiontables/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-fusiontables/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-fusiontables/Makefile b/gogol-fusiontables/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-fusiontables/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-fusiontables/README.md b/gogol-fusiontables/README.md new file mode 100644 index 000000000..5a85f574b --- /dev/null +++ b/gogol-fusiontables/README.md @@ -0,0 +1,28 @@ +# gogol-fusiontables + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Fusion Tables API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-fusiontables` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-fusiontables/Setup.hs b/gogol-fusiontables/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-fusiontables/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-fusiontables/gen/Network/Google/FusionTables.hs b/gogol-fusiontables/gen/Network/Google/FusionTables.hs new file mode 100644 index 000000000..f0e86c7b3 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/FusionTables.hs @@ -0,0 +1,361 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.FusionTables +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for working with Fusion Tables data. +-- +-- /See:/ +module Network.Google.FusionTables + ( + -- * API + FusionTablesAPI + , fusionTablesAPI + , fusionTablesURL + + -- * Service Methods + + -- * REST Resources + + -- ** FusiontablesColumnDelete + , module FusionTables.Column.Delete + + -- ** FusiontablesColumnGet + , module FusionTables.Column.Get + + -- ** FusiontablesColumnInsert + , module FusionTables.Column.Insert + + -- ** FusiontablesColumnList + , module FusionTables.Column.List + + -- ** FusiontablesColumnPatch + , module FusionTables.Column.Patch + + -- ** FusiontablesColumnUpdate + , module FusionTables.Column.Update + + -- ** FusiontablesQuerySql + , module FusionTables.Query.Sql + + -- ** FusiontablesQuerySqlGet + , module FusionTables.Query.SqlGet + + -- ** FusiontablesStyleDelete + , module FusionTables.Style.Delete + + -- ** FusiontablesStyleGet + , module FusionTables.Style.Get + + -- ** FusiontablesStyleInsert + , module FusionTables.Style.Insert + + -- ** FusiontablesStyleList + , module FusionTables.Style.List + + -- ** FusiontablesStylePatch + , module FusionTables.Style.Patch + + -- ** FusiontablesStyleUpdate + , module FusionTables.Style.Update + + -- ** FusiontablesTableCopy + , module FusionTables.Table.Copy + + -- ** FusiontablesTableDelete + , module FusionTables.Table.Delete + + -- ** FusiontablesTableGet + , module FusionTables.Table.Get + + -- ** FusiontablesTableImportRows + , module FusionTables.Table.ImportRows + + -- ** FusiontablesTableImportTable + , module FusionTables.Table.ImportTable + + -- ** FusiontablesTableInsert + , module FusionTables.Table.Insert + + -- ** FusiontablesTableList + , module FusionTables.Table.List + + -- ** FusiontablesTablePatch + , module FusionTables.Table.Patch + + -- ** FusiontablesTableReplaceRows + , module FusionTables.Table.ReplaceRows + + -- ** FusiontablesTableUpdate + , module FusionTables.Table.Update + + -- ** FusiontablesTaskDelete + , module FusionTables.Task.Delete + + -- ** FusiontablesTaskGet + , module FusionTables.Task.Get + + -- ** FusiontablesTaskList + , module FusionTables.Task.List + + -- ** FusiontablesTemplateDelete + , module FusionTables.Template.Delete + + -- ** FusiontablesTemplateGet + , module FusionTables.Template.Get + + -- ** FusiontablesTemplateInsert + , module FusionTables.Template.Insert + + -- ** FusiontablesTemplateList + , module FusionTables.Template.List + + -- ** FusiontablesTemplatePatch + , module FusionTables.Template.Patch + + -- ** FusiontablesTemplateUpdate + , module FusionTables.Template.Update + + -- * Types + + -- ** ColumnList + , ColumnList + , columnList + , clTotalItems + , clNextPageToken + , clKind + , clItems + + -- ** TableList + , TableList + , tableList + , tlNextPageToken + , tlKind + , tlItems + + -- ** StyleFunction + , StyleFunction + , styleFunction + , sfBuckets + , sfKind + , sfGradient + , sfColumnName + + -- ** Sqlresponse + , Sqlresponse + , sqlresponse + , sKind + , sRows + , sColumns + + -- ** StyleSettingList + , StyleSettingList + , styleSettingList + , sslTotalItems + , sslNextPageToken + , sslKind + , sslItems + + -- ** Bucket + , Bucket + , bucket + , bMax + , bColor + , bWeight + , bIcon + , bOpacity + , bMin + + -- ** Line + , Line + , line + , lCoordinates + , lType + + -- ** StyleSetting + , StyleSetting + , styleSetting + , ssPolylineOptions + , ssPolygonOptions + , ssMarkerOptions + , ssKind + , ssName + , ssStyleId + , ssTableId + + -- ** Polygon + , Polygon + , polygon + , pCoordinates + , pType + + -- ** Point + , Point + , point + , poiCoordinates + , poiType + + -- ** TaskList + , TaskList + , taskList + , tTotalItems + , tNextPageToken + , tKind + , tItems + + -- ** TemplateList + , TemplateList + , templateList + , temTotalItems + , temNextPageToken + , temKind + , temItems + + -- ** Geometry + , Geometry + , geometry + , gGeometries + , gGeometry + , gType + + -- ** Task + , Task + , task + , tasProgress + , tasTaskId + , tasKind + , tasType + , tasStarted + + -- ** Import + , Import + , import' + , iKind + , iNumRowsReceived + + -- ** Template + , Template + , template + , ttAutomaticColumnNames + , ttTemplateId + , ttKind + , ttBody + , ttName + , ttTableId + + -- ** PointStyle + , PointStyle + , pointStyle + , psIconName + , psIconStyler + + -- ** PolygonStyle + , PolygonStyle + , polygonStyle + , psFillColorStyler + , psFillColor + , psStrokeColorStyler + , psStrokeWeight + , psStrokeOpacity + , psFillOpacity + , psStrokeWeightStyler + , psStrokeColor + + -- ** Table + , Table + , table + , tabIsExportable + , tabKind + , tabColumnPropertiesJsonSchema + , tabTablePropertiesJsonSchema + , tabName + , tabTablePropertiesJson + , tabColumns + , tabBaseTableIds + , tabTableId + , tabSql + , tabDescription + , tabAttribution + , tabAttributionLink + + -- ** Column + , Column + , column + , cColumnJsonSchema + , cGraphPredicate + , cKind + , cBaseColumn + , cColumnPropertiesJson + , cName + , cType + , cFormatPattern + , cColumnId + , cValidValues + , cValidateData + , cDescription + + -- ** LineStyle + , LineStyle + , lineStyle + , lsStrokeColorStyler + , lsStrokeWeight + , lsStrokeOpacity + , lsStrokeWeightStyler + , lsStrokeColor + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude +import Network.Google.Resource.FusionTables.Column.Delete +import Network.Google.Resource.FusionTables.Column.Get +import Network.Google.Resource.FusionTables.Column.Insert +import Network.Google.Resource.FusionTables.Column.List +import Network.Google.Resource.FusionTables.Column.Patch +import Network.Google.Resource.FusionTables.Column.Update +import Network.Google.Resource.FusionTables.Query.Sql +import Network.Google.Resource.FusionTables.Query.SqlGet +import Network.Google.Resource.FusionTables.Style.Delete +import Network.Google.Resource.FusionTables.Style.Get +import Network.Google.Resource.FusionTables.Style.Insert +import Network.Google.Resource.FusionTables.Style.List +import Network.Google.Resource.FusionTables.Style.Patch +import Network.Google.Resource.FusionTables.Style.Update +import Network.Google.Resource.FusionTables.Table.Copy +import Network.Google.Resource.FusionTables.Table.Delete +import Network.Google.Resource.FusionTables.Table.Get +import Network.Google.Resource.FusionTables.Table.ImportRows +import Network.Google.Resource.FusionTables.Table.ImportTable +import Network.Google.Resource.FusionTables.Table.Insert +import Network.Google.Resource.FusionTables.Table.List +import Network.Google.Resource.FusionTables.Table.Patch +import Network.Google.Resource.FusionTables.Table.ReplaceRows +import Network.Google.Resource.FusionTables.Table.Update +import Network.Google.Resource.FusionTables.Task.Delete +import Network.Google.Resource.FusionTables.Task.Get +import Network.Google.Resource.FusionTables.Task.List +import Network.Google.Resource.FusionTables.Template.Delete +import Network.Google.Resource.FusionTables.Template.Get +import Network.Google.Resource.FusionTables.Template.Insert +import Network.Google.Resource.FusionTables.Template.List +import Network.Google.Resource.FusionTables.Template.Patch +import Network.Google.Resource.FusionTables.Template.Update + +{- $resources +TODO +-} + +type FusionTablesAPI = + Style :<|> Query :<|> Task :<|> Template :<|> Column + :<|> Table + +fusionTablesAPI :: Proxy FusionTablesAPI +fusionTablesAPI = Proxy diff --git a/gogol-fusiontables/gen/Network/Google/FusionTables/Types.hs b/gogol-fusiontables/gen/Network/Google/FusionTables/Types.hs new file mode 100644 index 000000000..42dfd04d2 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/FusionTables/Types.hs @@ -0,0 +1,215 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FusionTables.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FusionTables.Types + ( + -- * Service URL + fusionTablesURL + + -- * ColumnList + , ColumnList + , columnList + , clTotalItems + , clNextPageToken + , clKind + , clItems + + -- * TableList + , TableList + , tableList + , tlNextPageToken + , tlKind + , tlItems + + -- * StyleFunction + , StyleFunction + , styleFunction + , sfBuckets + , sfKind + , sfGradient + , sfColumnName + + -- * Sqlresponse + , Sqlresponse + , sqlresponse + , sKind + , sRows + , sColumns + + -- * StyleSettingList + , StyleSettingList + , styleSettingList + , sslTotalItems + , sslNextPageToken + , sslKind + , sslItems + + -- * Bucket + , Bucket + , bucket + , bMax + , bColor + , bWeight + , bIcon + , bOpacity + , bMin + + -- * Line + , Line + , line + , lCoordinates + , lType + + -- * StyleSetting + , StyleSetting + , styleSetting + , ssPolylineOptions + , ssPolygonOptions + , ssMarkerOptions + , ssKind + , ssName + , ssStyleId + , ssTableId + + -- * Polygon + , Polygon + , polygon + , pCoordinates + , pType + + -- * Point + , Point + , point + , poiCoordinates + , poiType + + -- * TaskList + , TaskList + , taskList + , tTotalItems + , tNextPageToken + , tKind + , tItems + + -- * TemplateList + , TemplateList + , templateList + , temTotalItems + , temNextPageToken + , temKind + , temItems + + -- * Geometry + , Geometry + , geometry + , gGeometries + , gGeometry + , gType + + -- * Task + , Task + , task + , tasProgress + , tasTaskId + , tasKind + , tasType + , tasStarted + + -- * Import + , Import + , import' + , iKind + , iNumRowsReceived + + -- * Template + , Template + , template + , ttAutomaticColumnNames + , ttTemplateId + , ttKind + , ttBody + , ttName + , ttTableId + + -- * PointStyle + , PointStyle + , pointStyle + , psIconName + , psIconStyler + + -- * PolygonStyle + , PolygonStyle + , polygonStyle + , psFillColorStyler + , psFillColor + , psStrokeColorStyler + , psStrokeWeight + , psStrokeOpacity + , psFillOpacity + , psStrokeWeightStyler + , psStrokeColor + + -- * Table + , Table + , table + , tabIsExportable + , tabKind + , tabColumnPropertiesJsonSchema + , tabTablePropertiesJsonSchema + , tabName + , tabTablePropertiesJson + , tabColumns + , tabBaseTableIds + , tabTableId + , tabSql + , tabDescription + , tabAttribution + , tabAttributionLink + + -- * Column + , Column + , column + , cColumnJsonSchema + , cGraphPredicate + , cKind + , cBaseColumn + , cColumnPropertiesJson + , cName + , cType + , cFormatPattern + , cColumnId + , cValidValues + , cValidateData + , cDescription + + -- * LineStyle + , LineStyle + , lineStyle + , lsStrokeColorStyler + , lsStrokeWeight + , lsStrokeOpacity + , lsStrokeWeightStyler + , lsStrokeColor + ) where + +import Network.Google.FusionTables.Types.Product +import Network.Google.FusionTables.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Fusion Tables API. +fusionTablesURL :: BaseURL +fusionTablesURL + = BaseUrl Https + "https://www.googleapis.com/fusiontables/v2/" + 443 diff --git a/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs b/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs new file mode 100644 index 000000000..0c7fe5e52 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs @@ -0,0 +1,1767 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FusionTables.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FusionTables.Types.Product where + +import Network.Google.FusionTables.Types.Sum +import Network.Google.Prelude + +-- | Represents a list of columns in a table. +-- +-- /See:/ 'columnList' smart constructor. +data ColumnList = ColumnList + { _clTotalItems :: !(Maybe Int32) + , _clNextPageToken :: !(Maybe Text) + , _clKind :: !Text + , _clItems :: !(Maybe [Maybe Column]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clTotalItems' +-- +-- * 'clNextPageToken' +-- +-- * 'clKind' +-- +-- * 'clItems' +columnList + :: ColumnList +columnList = + ColumnList + { _clTotalItems = Nothing + , _clNextPageToken = Nothing + , _clKind = "fusiontables#columnList" + , _clItems = Nothing + } + +-- | Total number of columns for the table. +clTotalItems :: Lens' ColumnList (Maybe Int32) +clTotalItems + = lens _clTotalItems (\ s a -> s{_clTotalItems = a}) + +-- | Token used to access the next page of this result. No token is displayed +-- if there are no more pages left. +clNextPageToken :: Lens' ColumnList (Maybe Text) +clNextPageToken + = lens _clNextPageToken + (\ s a -> s{_clNextPageToken = a}) + +-- | The kind of item this is. For a column list, this is always +-- fusiontables#columnList. +clKind :: Lens' ColumnList Text +clKind = lens _clKind (\ s a -> s{_clKind = a}) + +-- | List of all requested columns. +clItems :: Lens' ColumnList [Maybe Column] +clItems + = lens _clItems (\ s a -> s{_clItems = a}) . _Default + . _Coerce + +instance FromJSON ColumnList where + parseJSON + = withObject "ColumnList" + (\ o -> + ColumnList <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "fusiontables#columnList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON ColumnList where + toJSON ColumnList{..} + = object + (catMaybes + [("totalItems" .=) <$> _clTotalItems, + ("nextPageToken" .=) <$> _clNextPageToken, + Just ("kind" .= _clKind), ("items" .=) <$> _clItems]) + +-- | Represents a list of tables. +-- +-- /See:/ 'tableList' smart constructor. +data TableList = TableList + { _tlNextPageToken :: !(Maybe Text) + , _tlKind :: !Text + , _tlItems :: !(Maybe [Maybe Table]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlNextPageToken' +-- +-- * 'tlKind' +-- +-- * 'tlItems' +tableList + :: TableList +tableList = + TableList + { _tlNextPageToken = Nothing + , _tlKind = "fusiontables#tableList" + , _tlItems = Nothing + } + +-- | Token used to access the next page of this result. No token is displayed +-- if there are no more pages left. +tlNextPageToken :: Lens' TableList (Maybe Text) +tlNextPageToken + = lens _tlNextPageToken + (\ s a -> s{_tlNextPageToken = a}) + +-- | The kind of item this is. For table list, this is always +-- fusiontables#tableList. +tlKind :: Lens' TableList Text +tlKind = lens _tlKind (\ s a -> s{_tlKind = a}) + +-- | List of all requested tables. +tlItems :: Lens' TableList [Maybe Table] +tlItems + = lens _tlItems (\ s a -> s{_tlItems = a}) . _Default + . _Coerce + +instance FromJSON TableList where + parseJSON + = withObject "TableList" + (\ o -> + TableList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "fusiontables#tableList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TableList where + toJSON TableList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tlNextPageToken, + Just ("kind" .= _tlKind), ("items" .=) <$> _tlItems]) + +-- | Represents a StyleFunction within a StyleSetting +-- +-- /See:/ 'styleFunction' smart constructor. +data StyleFunction = StyleFunction + { _sfBuckets :: !(Maybe [Maybe Bucket]) + , _sfKind :: !(Maybe Text) + , _sfGradient :: !(Maybe StyleFunctionGradient) + , _sfColumnName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleFunction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfBuckets' +-- +-- * 'sfKind' +-- +-- * 'sfGradient' +-- +-- * 'sfColumnName' +styleFunction + :: StyleFunction +styleFunction = + StyleFunction + { _sfBuckets = Nothing + , _sfKind = Nothing + , _sfGradient = Nothing + , _sfColumnName = Nothing + } + +-- | Bucket function that assigns a style based on the range a column value +-- falls into. +sfBuckets :: Lens' StyleFunction [Maybe Bucket] +sfBuckets + = lens _sfBuckets (\ s a -> s{_sfBuckets = a}) . + _Default + . _Coerce + +-- | Stylers can be one of three kinds: \"fusiontables#fromColumn if the +-- column value is to be used as is, i.e., the column values can have +-- colors in #RRGGBBAA format or integer line widths or icon names; +-- fusiontables#gradient if the styling of the row is to be based on +-- applying the gradient function on the column value; or +-- fusiontables#buckets if the styling is to based on the bucket into which +-- the the column value falls. +sfKind :: Lens' StyleFunction (Maybe Text) +sfKind = lens _sfKind (\ s a -> s{_sfKind = a}) + +-- | Gradient function that interpolates a range of colors based on column +-- value. +sfGradient :: Lens' StyleFunction (Maybe StyleFunctionGradient) +sfGradient + = lens _sfGradient (\ s a -> s{_sfGradient = a}) + +-- | Name of the column whose value is used in the style. +sfColumnName :: Lens' StyleFunction (Maybe Text) +sfColumnName + = lens _sfColumnName (\ s a -> s{_sfColumnName = a}) + +instance FromJSON StyleFunction where + parseJSON + = withObject "StyleFunction" + (\ o -> + StyleFunction <$> + (o .:? "buckets" .!= mempty) <*> (o .:? "kind") <*> + (o .:? "gradient") + <*> (o .:? "columnName")) + +instance ToJSON StyleFunction where + toJSON StyleFunction{..} + = object + (catMaybes + [("buckets" .=) <$> _sfBuckets, + ("kind" .=) <$> _sfKind, + ("gradient" .=) <$> _sfGradient, + ("columnName" .=) <$> _sfColumnName]) + +-- | Represents a response to a SQL statement. +-- +-- /See:/ 'sqlresponse' smart constructor. +data Sqlresponse = Sqlresponse + { _sKind :: !Text + , _sRows :: !(Maybe [[JSON]]) + , _sColumns :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Sqlresponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sRows' +-- +-- * 'sColumns' +sqlresponse + :: Sqlresponse +sqlresponse = + Sqlresponse + { _sKind = "fusiontables#sqlresponse" + , _sRows = Nothing + , _sColumns = Nothing + } + +-- | The kind of item this is. For responses to SQL queries, this is always +-- fusiontables#sqlresponse. +sKind :: Lens' Sqlresponse Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | The rows in the table. For each cell we print out whatever cell value +-- (e.g., numeric, string) exists. Thus it is important that each cell +-- contains only one value. +sRows :: Lens' Sqlresponse [[JSON]] +sRows + = lens _sRows (\ s a -> s{_sRows = a}) . _Default . + _Coerce + +-- | Columns in the table. +sColumns :: Lens' Sqlresponse [Text] +sColumns + = lens _sColumns (\ s a -> s{_sColumns = a}) . + _Default + . _Coerce + +instance FromJSON Sqlresponse where + parseJSON + = withObject "Sqlresponse" + (\ o -> + Sqlresponse <$> + (o .:? "kind" .!= "fusiontables#sqlresponse") <*> + (o .:? "rows" .!= mempty) + <*> (o .:? "columns" .!= mempty)) + +instance ToJSON Sqlresponse where + toJSON Sqlresponse{..} + = object + (catMaybes + [Just ("kind" .= _sKind), ("rows" .=) <$> _sRows, + ("columns" .=) <$> _sColumns]) + +-- | Represents a list of styles for a given table. +-- +-- /See:/ 'styleSettingList' smart constructor. +data StyleSettingList = StyleSettingList + { _sslTotalItems :: !(Maybe Int32) + , _sslNextPageToken :: !(Maybe Text) + , _sslKind :: !Text + , _sslItems :: !(Maybe [Maybe StyleSetting]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleSettingList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sslTotalItems' +-- +-- * 'sslNextPageToken' +-- +-- * 'sslKind' +-- +-- * 'sslItems' +styleSettingList + :: StyleSettingList +styleSettingList = + StyleSettingList + { _sslTotalItems = Nothing + , _sslNextPageToken = Nothing + , _sslKind = "fusiontables#styleSettingList" + , _sslItems = Nothing + } + +-- | Total number of styles for the table. +sslTotalItems :: Lens' StyleSettingList (Maybe Int32) +sslTotalItems + = lens _sslTotalItems + (\ s a -> s{_sslTotalItems = a}) + +-- | Token used to access the next page of this result. No token is displayed +-- if there are no more styles left. +sslNextPageToken :: Lens' StyleSettingList (Maybe Text) +sslNextPageToken + = lens _sslNextPageToken + (\ s a -> s{_sslNextPageToken = a}) + +-- | The kind of item this is. For a style list, this is always +-- fusiontables#styleSettingList . +sslKind :: Lens' StyleSettingList Text +sslKind = lens _sslKind (\ s a -> s{_sslKind = a}) + +-- | All requested style settings. +sslItems :: Lens' StyleSettingList [Maybe StyleSetting] +sslItems + = lens _sslItems (\ s a -> s{_sslItems = a}) . + _Default + . _Coerce + +instance FromJSON StyleSettingList where + parseJSON + = withObject "StyleSettingList" + (\ o -> + StyleSettingList <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "fusiontables#styleSettingList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON StyleSettingList where + toJSON StyleSettingList{..} + = object + (catMaybes + [("totalItems" .=) <$> _sslTotalItems, + ("nextPageToken" .=) <$> _sslNextPageToken, + Just ("kind" .= _sslKind), + ("items" .=) <$> _sslItems]) + +-- | Specifies the minimum and maximum values, the color, opacity, icon and +-- weight of a bucket within a StyleSetting. +-- +-- /See:/ 'bucket' smart constructor. +data Bucket = Bucket + { _bMax :: !(Maybe Double) + , _bColor :: !(Maybe Text) + , _bWeight :: !(Maybe Int32) + , _bIcon :: !(Maybe Text) + , _bOpacity :: !(Maybe Double) + , _bMin :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Bucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bMax' +-- +-- * 'bColor' +-- +-- * 'bWeight' +-- +-- * 'bIcon' +-- +-- * 'bOpacity' +-- +-- * 'bMin' +bucket + :: Bucket +bucket = + Bucket + { _bMax = Nothing + , _bColor = Nothing + , _bWeight = Nothing + , _bIcon = Nothing + , _bOpacity = Nothing + , _bMin = Nothing + } + +-- | Maximum value in the selected column for a row to be styled according to +-- the bucket color, opacity, icon, or weight. +bMax :: Lens' Bucket (Maybe Double) +bMax = lens _bMax (\ s a -> s{_bMax = a}) + +-- | Color of line or the interior of a polygon in #RRGGBB format. +bColor :: Lens' Bucket (Maybe Text) +bColor = lens _bColor (\ s a -> s{_bColor = a}) + +-- | Width of a line (in pixels). +bWeight :: Lens' Bucket (Maybe Int32) +bWeight = lens _bWeight (\ s a -> s{_bWeight = a}) + +-- | Icon name used for a point. +bIcon :: Lens' Bucket (Maybe Text) +bIcon = lens _bIcon (\ s a -> s{_bIcon = a}) + +-- | Opacity of the color: 0.0 (transparent) to 1.0 (opaque). +bOpacity :: Lens' Bucket (Maybe Double) +bOpacity = lens _bOpacity (\ s a -> s{_bOpacity = a}) + +-- | Minimum value in the selected column for a row to be styled according to +-- the bucket color, opacity, icon, or weight. +bMin :: Lens' Bucket (Maybe Double) +bMin = lens _bMin (\ s a -> s{_bMin = a}) + +instance FromJSON Bucket where + parseJSON + = withObject "Bucket" + (\ o -> + Bucket <$> + (o .:? "max") <*> (o .:? "color") <*> + (o .:? "weight") + <*> (o .:? "icon") + <*> (o .:? "opacity") + <*> (o .:? "min")) + +instance ToJSON Bucket where + toJSON Bucket{..} + = object + (catMaybes + [("max" .=) <$> _bMax, ("color" .=) <$> _bColor, + ("weight" .=) <$> _bWeight, ("icon" .=) <$> _bIcon, + ("opacity" .=) <$> _bOpacity, ("min" .=) <$> _bMin]) + +-- | Represents a line geometry. +-- +-- /See:/ 'line' smart constructor. +data Line = Line + { _lCoordinates :: !(Maybe [[Double]]) + , _lType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Line' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lCoordinates' +-- +-- * 'lType' +line + :: Line +line = + Line + { _lCoordinates = Nothing + , _lType = "LineString" + } + +-- | The coordinates that define the line. +lCoordinates :: Lens' Line [[Double]] +lCoordinates + = lens _lCoordinates (\ s a -> s{_lCoordinates = a}) + . _Default + . _Coerce + +-- | Type: A line geometry. +lType :: Lens' Line Text +lType = lens _lType (\ s a -> s{_lType = a}) + +instance FromJSON Line where + parseJSON + = withObject "Line" + (\ o -> + Line <$> + (o .:? "coordinates" .!= mempty) <*> + (o .:? "type" .!= "LineString")) + +instance ToJSON Line where + toJSON Line{..} + = object + (catMaybes + [("coordinates" .=) <$> _lCoordinates, + Just ("type" .= _lType)]) + +-- | Represents a complete StyleSettings object. The primary key is a +-- combination of the tableId and a styleId. +-- +-- /See:/ 'styleSetting' smart constructor. +data StyleSetting = StyleSetting + { _ssPolylineOptions :: !(Maybe (Maybe LineStyle)) + , _ssPolygonOptions :: !(Maybe (Maybe PolygonStyle)) + , _ssMarkerOptions :: !(Maybe (Maybe PointStyle)) + , _ssKind :: !Text + , _ssName :: !(Maybe Text) + , _ssStyleId :: !(Maybe Int32) + , _ssTableId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleSetting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssPolylineOptions' +-- +-- * 'ssPolygonOptions' +-- +-- * 'ssMarkerOptions' +-- +-- * 'ssKind' +-- +-- * 'ssName' +-- +-- * 'ssStyleId' +-- +-- * 'ssTableId' +styleSetting + :: StyleSetting +styleSetting = + StyleSetting + { _ssPolylineOptions = Nothing + , _ssPolygonOptions = Nothing + , _ssMarkerOptions = Nothing + , _ssKind = "fusiontables#styleSetting" + , _ssName = Nothing + , _ssStyleId = Nothing + , _ssTableId = Nothing + } + +-- | Style definition for lines in the table. +ssPolylineOptions :: Lens' StyleSetting (Maybe (Maybe LineStyle)) +ssPolylineOptions + = lens _ssPolylineOptions + (\ s a -> s{_ssPolylineOptions = a}) + +-- | Style definition for polygons in the table. +ssPolygonOptions :: Lens' StyleSetting (Maybe (Maybe PolygonStyle)) +ssPolygonOptions + = lens _ssPolygonOptions + (\ s a -> s{_ssPolygonOptions = a}) + +-- | Style definition for points in the table. +ssMarkerOptions :: Lens' StyleSetting (Maybe (Maybe PointStyle)) +ssMarkerOptions + = lens _ssMarkerOptions + (\ s a -> s{_ssMarkerOptions = a}) + +-- | The kind of item this is. A StyleSetting contains the style definitions +-- for points, lines, and polygons in a table. Since a table can have any +-- one or all of them, a style definition can have point, line and polygon +-- style definitions. +ssKind :: Lens' StyleSetting Text +ssKind = lens _ssKind (\ s a -> s{_ssKind = a}) + +-- | Optional name for the style setting. +ssName :: Lens' StyleSetting (Maybe Text) +ssName = lens _ssName (\ s a -> s{_ssName = a}) + +-- | Identifier for the style setting (unique only within tables). +ssStyleId :: Lens' StyleSetting (Maybe Int32) +ssStyleId + = lens _ssStyleId (\ s a -> s{_ssStyleId = a}) + +-- | Identifier for the table. +ssTableId :: Lens' StyleSetting (Maybe Text) +ssTableId + = lens _ssTableId (\ s a -> s{_ssTableId = a}) + +instance FromJSON StyleSetting where + parseJSON + = withObject "StyleSetting" + (\ o -> + StyleSetting <$> + (o .:? "polylineOptions") <*> + (o .:? "polygonOptions") + <*> (o .:? "markerOptions") + <*> (o .:? "kind" .!= "fusiontables#styleSetting") + <*> (o .:? "name") + <*> (o .:? "styleId") + <*> (o .:? "tableId")) + +instance ToJSON StyleSetting where + toJSON StyleSetting{..} + = object + (catMaybes + [("polylineOptions" .=) <$> _ssPolylineOptions, + ("polygonOptions" .=) <$> _ssPolygonOptions, + ("markerOptions" .=) <$> _ssMarkerOptions, + Just ("kind" .= _ssKind), ("name" .=) <$> _ssName, + ("styleId" .=) <$> _ssStyleId, + ("tableId" .=) <$> _ssTableId]) + +-- | Represents a polygon object. +-- +-- /See:/ 'polygon' smart constructor. +data Polygon = Polygon + { _pCoordinates :: !(Maybe [[[Double]]]) + , _pType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Polygon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pCoordinates' +-- +-- * 'pType' +polygon + :: Polygon +polygon = + Polygon + { _pCoordinates = Nothing + , _pType = "Polygon" + } + +-- | The coordinates that define the polygon. +pCoordinates :: Lens' Polygon [[[Double]]] +pCoordinates + = lens _pCoordinates (\ s a -> s{_pCoordinates = a}) + . _Default + . _Coerce + +-- | Type: A polygon geometry. +pType :: Lens' Polygon Text +pType = lens _pType (\ s a -> s{_pType = a}) + +instance FromJSON Polygon where + parseJSON + = withObject "Polygon" + (\ o -> + Polygon <$> + (o .:? "coordinates" .!= mempty) <*> + (o .:? "type" .!= "Polygon")) + +instance ToJSON Polygon where + toJSON Polygon{..} + = object + (catMaybes + [("coordinates" .=) <$> _pCoordinates, + Just ("type" .= _pType)]) + +-- | Represents a point object. +-- +-- /See:/ 'point' smart constructor. +data Point = Point + { _poiCoordinates :: !(Maybe [Double]) + , _poiType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Point' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'poiCoordinates' +-- +-- * 'poiType' +point + :: Point +point = + Point + { _poiCoordinates = Nothing + , _poiType = "Point" + } + +-- | The coordinates that define the point. +poiCoordinates :: Lens' Point [Double] +poiCoordinates + = lens _poiCoordinates + (\ s a -> s{_poiCoordinates = a}) + . _Default + . _Coerce + +-- | Point: A point geometry. +poiType :: Lens' Point Text +poiType = lens _poiType (\ s a -> s{_poiType = a}) + +instance FromJSON Point where + parseJSON + = withObject "Point" + (\ o -> + Point <$> + (o .:? "coordinates" .!= mempty) <*> + (o .:? "type" .!= "Point")) + +instance ToJSON Point where + toJSON Point{..} + = object + (catMaybes + [("coordinates" .=) <$> _poiCoordinates, + Just ("type" .= _poiType)]) + +-- | Represents a list of tasks for a table. +-- +-- /See:/ 'taskList' smart constructor. +data TaskList = TaskList + { _tTotalItems :: !(Maybe Int32) + , _tNextPageToken :: !(Maybe Text) + , _tKind :: !Text + , _tItems :: !(Maybe [Maybe Task]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tTotalItems' +-- +-- * 'tNextPageToken' +-- +-- * 'tKind' +-- +-- * 'tItems' +taskList + :: TaskList +taskList = + TaskList + { _tTotalItems = Nothing + , _tNextPageToken = Nothing + , _tKind = "fusiontables#taskList" + , _tItems = Nothing + } + +-- | Total number of tasks for the table. +tTotalItems :: Lens' TaskList (Maybe Int32) +tTotalItems + = lens _tTotalItems (\ s a -> s{_tTotalItems = a}) + +-- | Token used to access the next page of this result. No token is displayed +-- if there are no more pages left. +tNextPageToken :: Lens' TaskList (Maybe Text) +tNextPageToken + = lens _tNextPageToken + (\ s a -> s{_tNextPageToken = a}) + +-- | Type of the resource. This is always \"fusiontables#taskList\". +tKind :: Lens' TaskList Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | List of all requested tasks. +tItems :: Lens' TaskList [Maybe Task] +tItems + = lens _tItems (\ s a -> s{_tItems = a}) . _Default . + _Coerce + +instance FromJSON TaskList where + parseJSON + = withObject "TaskList" + (\ o -> + TaskList <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "fusiontables#taskList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TaskList where + toJSON TaskList{..} + = object + (catMaybes + [("totalItems" .=) <$> _tTotalItems, + ("nextPageToken" .=) <$> _tNextPageToken, + Just ("kind" .= _tKind), ("items" .=) <$> _tItems]) + +-- | Represents a list of templates for a given table. +-- +-- /See:/ 'templateList' smart constructor. +data TemplateList = TemplateList + { _temTotalItems :: !(Maybe Int32) + , _temNextPageToken :: !(Maybe Text) + , _temKind :: !Text + , _temItems :: !(Maybe [Maybe Template]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'temTotalItems' +-- +-- * 'temNextPageToken' +-- +-- * 'temKind' +-- +-- * 'temItems' +templateList + :: TemplateList +templateList = + TemplateList + { _temTotalItems = Nothing + , _temNextPageToken = Nothing + , _temKind = "fusiontables#templateList" + , _temItems = Nothing + } + +-- | Total number of templates for the table. +temTotalItems :: Lens' TemplateList (Maybe Int32) +temTotalItems + = lens _temTotalItems + (\ s a -> s{_temTotalItems = a}) + +-- | Token used to access the next page of this result. No token is displayed +-- if there are no more pages left. +temNextPageToken :: Lens' TemplateList (Maybe Text) +temNextPageToken + = lens _temNextPageToken + (\ s a -> s{_temNextPageToken = a}) + +-- | The kind of item this is. For a template list, this is always +-- fusiontables#templateList . +temKind :: Lens' TemplateList Text +temKind = lens _temKind (\ s a -> s{_temKind = a}) + +-- | List of all requested templates. +temItems :: Lens' TemplateList [Maybe Template] +temItems + = lens _temItems (\ s a -> s{_temItems = a}) . + _Default + . _Coerce + +instance FromJSON TemplateList where + parseJSON + = withObject "TemplateList" + (\ o -> + TemplateList <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "fusiontables#templateList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TemplateList where + toJSON TemplateList{..} + = object + (catMaybes + [("totalItems" .=) <$> _temTotalItems, + ("nextPageToken" .=) <$> _temNextPageToken, + Just ("kind" .= _temKind), + ("items" .=) <$> _temItems]) + +-- | Represents a Geometry object. +-- +-- /See:/ 'geometry' smart constructor. +data Geometry = Geometry + { _gGeometries :: !(Maybe [JSON]) + , _gGeometry :: !(Maybe JSON) + , _gType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Geometry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gGeometries' +-- +-- * 'gGeometry' +-- +-- * 'gType' +geometry + :: Geometry +geometry = + Geometry + { _gGeometries = Nothing + , _gGeometry = Nothing + , _gType = "GeometryCollection" + } + +-- | The list of geometries in this geometry collection. +gGeometries :: Lens' Geometry [JSON] +gGeometries + = lens _gGeometries (\ s a -> s{_gGeometries = a}) . + _Default + . _Coerce + +gGeometry :: Lens' Geometry (Maybe JSON) +gGeometry + = lens _gGeometry (\ s a -> s{_gGeometry = a}) + +-- | Type: A collection of geometries. +gType :: Lens' Geometry Text +gType = lens _gType (\ s a -> s{_gType = a}) + +instance FromJSON Geometry where + parseJSON + = withObject "Geometry" + (\ o -> + Geometry <$> + (o .:? "geometries" .!= mempty) <*> + (o .:? "geometry") + <*> (o .:? "type" .!= "GeometryCollection")) + +instance ToJSON Geometry where + toJSON Geometry{..} + = object + (catMaybes + [("geometries" .=) <$> _gGeometries, + ("geometry" .=) <$> _gGeometry, + Just ("type" .= _gType)]) + +-- | A background task on a table, initiated for time- or resource-consuming +-- operations such as changing column types or deleting all rows. +-- +-- /See:/ 'task' smart constructor. +data Task = Task + { _tasProgress :: !(Maybe Text) + , _tasTaskId :: !(Maybe Int64) + , _tasKind :: !Text + , _tasType :: !(Maybe Text) + , _tasStarted :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Task' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tasProgress' +-- +-- * 'tasTaskId' +-- +-- * 'tasKind' +-- +-- * 'tasType' +-- +-- * 'tasStarted' +task + :: Task +task = + Task + { _tasProgress = Nothing + , _tasTaskId = Nothing + , _tasKind = "fusiontables#task" + , _tasType = Nothing + , _tasStarted = Nothing + } + +-- | Task percentage completion. +tasProgress :: Lens' Task (Maybe Text) +tasProgress + = lens _tasProgress (\ s a -> s{_tasProgress = a}) + +-- | Identifier for the task. +tasTaskId :: Lens' Task (Maybe Int64) +tasTaskId + = lens _tasTaskId (\ s a -> s{_tasTaskId = a}) + +-- | Type of the resource. This is always \"fusiontables#task\". +tasKind :: Lens' Task Text +tasKind = lens _tasKind (\ s a -> s{_tasKind = a}) + +-- | Type of background task. +tasType :: Lens' Task (Maybe Text) +tasType = lens _tasType (\ s a -> s{_tasType = a}) + +-- | false while the table is busy with some other task. true if this +-- background task is currently running. +tasStarted :: Lens' Task (Maybe Bool) +tasStarted + = lens _tasStarted (\ s a -> s{_tasStarted = a}) + +instance FromJSON Task where + parseJSON + = withObject "Task" + (\ o -> + Task <$> + (o .:? "progress") <*> (o .:? "taskId") <*> + (o .:? "kind" .!= "fusiontables#task") + <*> (o .:? "type") + <*> (o .:? "started")) + +instance ToJSON Task where + toJSON Task{..} + = object + (catMaybes + [("progress" .=) <$> _tasProgress, + ("taskId" .=) <$> _tasTaskId, + Just ("kind" .= _tasKind), ("type" .=) <$> _tasType, + ("started" .=) <$> _tasStarted]) + +-- | Represents an import request. +-- +-- /See:/ 'import'' smart constructor. +data Import = Import + { _iKind :: !Text + , _iNumRowsReceived :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Import' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iKind' +-- +-- * 'iNumRowsReceived' +import' + :: Import +import' = + Import + { _iKind = "fusiontables#import" + , _iNumRowsReceived = Nothing + } + +-- | The kind of item this is. For an import, this is always +-- fusiontables#import. +iKind :: Lens' Import Text +iKind = lens _iKind (\ s a -> s{_iKind = a}) + +-- | The number of rows received from the import request. +iNumRowsReceived :: Lens' Import (Maybe Int64) +iNumRowsReceived + = lens _iNumRowsReceived + (\ s a -> s{_iNumRowsReceived = a}) + +instance FromJSON Import where + parseJSON + = withObject "Import" + (\ o -> + Import <$> + (o .:? "kind" .!= "fusiontables#import") <*> + (o .:? "numRowsReceived")) + +instance ToJSON Import where + toJSON Import{..} + = object + (catMaybes + [Just ("kind" .= _iKind), + ("numRowsReceived" .=) <$> _iNumRowsReceived]) + +-- | Represents the contents of InfoWindow templates. +-- +-- /See:/ 'template' smart constructor. +data Template = Template + { _ttAutomaticColumnNames :: !(Maybe [Text]) + , _ttTemplateId :: !(Maybe Int32) + , _ttKind :: !Text + , _ttBody :: !(Maybe Text) + , _ttName :: !(Maybe Text) + , _ttTableId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Template' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ttAutomaticColumnNames' +-- +-- * 'ttTemplateId' +-- +-- * 'ttKind' +-- +-- * 'ttBody' +-- +-- * 'ttName' +-- +-- * 'ttTableId' +template + :: Template +template = + Template + { _ttAutomaticColumnNames = Nothing + , _ttTemplateId = Nothing + , _ttKind = "fusiontables#template" + , _ttBody = Nothing + , _ttName = Nothing + , _ttTableId = Nothing + } + +-- | List of columns from which the template is to be automatically +-- constructed. Only one of body or automaticColumns can be specified. +ttAutomaticColumnNames :: Lens' Template [Text] +ttAutomaticColumnNames + = lens _ttAutomaticColumnNames + (\ s a -> s{_ttAutomaticColumnNames = a}) + . _Default + . _Coerce + +-- | Identifier for the template, unique within the context of a particular +-- table. +ttTemplateId :: Lens' Template (Maybe Int32) +ttTemplateId + = lens _ttTemplateId (\ s a -> s{_ttTemplateId = a}) + +-- | The kind of item this is. For a template, this is always +-- fusiontables#template. +ttKind :: Lens' Template Text +ttKind = lens _ttKind (\ s a -> s{_ttKind = a}) + +-- | Body of the template. It contains HTML with {column_name} to insert +-- values from a particular column. The body is sanitized to remove certain +-- tags, e.g., script. Only one of body or automaticColumns can be +-- specified. +ttBody :: Lens' Template (Maybe Text) +ttBody = lens _ttBody (\ s a -> s{_ttBody = a}) + +-- | Optional name assigned to a template. +ttName :: Lens' Template (Maybe Text) +ttName = lens _ttName (\ s a -> s{_ttName = a}) + +-- | Identifier for the table for which the template is defined. +ttTableId :: Lens' Template (Maybe Text) +ttTableId + = lens _ttTableId (\ s a -> s{_ttTableId = a}) + +instance FromJSON Template where + parseJSON + = withObject "Template" + (\ o -> + Template <$> + (o .:? "automaticColumnNames" .!= mempty) <*> + (o .:? "templateId") + <*> (o .:? "kind" .!= "fusiontables#template") + <*> (o .:? "body") + <*> (o .:? "name") + <*> (o .:? "tableId")) + +instance ToJSON Template where + toJSON Template{..} + = object + (catMaybes + [("automaticColumnNames" .=) <$> + _ttAutomaticColumnNames, + ("templateId" .=) <$> _ttTemplateId, + Just ("kind" .= _ttKind), ("body" .=) <$> _ttBody, + ("name" .=) <$> _ttName, + ("tableId" .=) <$> _ttTableId]) + +-- | Represents a PointStyle within a StyleSetting +-- +-- /See:/ 'pointStyle' smart constructor. +data PointStyle = PointStyle + { _psIconName :: !(Maybe Text) + , _psIconStyler :: !(Maybe (Maybe StyleFunction)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psIconName' +-- +-- * 'psIconStyler' +pointStyle + :: PointStyle +pointStyle = + PointStyle + { _psIconName = Nothing + , _psIconStyler = Nothing + } + +-- | Name of the icon. Use values defined in +-- http:\/\/www.google.com\/fusiontables\/DataSource?dsrcid=308519 +psIconName :: Lens' PointStyle (Maybe Text) +psIconName + = lens _psIconName (\ s a -> s{_psIconName = a}) + +-- | Column or a bucket value from which the icon name is to be determined. +psIconStyler :: Lens' PointStyle (Maybe (Maybe StyleFunction)) +psIconStyler + = lens _psIconStyler (\ s a -> s{_psIconStyler = a}) + +instance FromJSON PointStyle where + parseJSON + = withObject "PointStyle" + (\ o -> + PointStyle <$> + (o .:? "iconName") <*> (o .:? "iconStyler")) + +instance ToJSON PointStyle where + toJSON PointStyle{..} + = object + (catMaybes + [("iconName" .=) <$> _psIconName, + ("iconStyler" .=) <$> _psIconStyler]) + +-- | Represents a PolygonStyle within a StyleSetting +-- +-- /See:/ 'polygonStyle' smart constructor. +data PolygonStyle = PolygonStyle + { _psFillColorStyler :: !(Maybe (Maybe StyleFunction)) + , _psFillColor :: !(Maybe Text) + , _psStrokeColorStyler :: !(Maybe (Maybe StyleFunction)) + , _psStrokeWeight :: !(Maybe Int32) + , _psStrokeOpacity :: !(Maybe Double) + , _psFillOpacity :: !(Maybe Double) + , _psStrokeWeightStyler :: !(Maybe (Maybe StyleFunction)) + , _psStrokeColor :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PolygonStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psFillColorStyler' +-- +-- * 'psFillColor' +-- +-- * 'psStrokeColorStyler' +-- +-- * 'psStrokeWeight' +-- +-- * 'psStrokeOpacity' +-- +-- * 'psFillOpacity' +-- +-- * 'psStrokeWeightStyler' +-- +-- * 'psStrokeColor' +polygonStyle + :: PolygonStyle +polygonStyle = + PolygonStyle + { _psFillColorStyler = Nothing + , _psFillColor = Nothing + , _psStrokeColorStyler = Nothing + , _psStrokeWeight = Nothing + , _psStrokeOpacity = Nothing + , _psFillOpacity = Nothing + , _psStrokeWeightStyler = Nothing + , _psStrokeColor = Nothing + } + +-- | Column-value, gradient, or bucket styler that is used to determine the +-- interior color and opacity of the polygon. +psFillColorStyler :: Lens' PolygonStyle (Maybe (Maybe StyleFunction)) +psFillColorStyler + = lens _psFillColorStyler + (\ s a -> s{_psFillColorStyler = a}) + +-- | Color of the interior of the polygon in #RRGGBB format. +psFillColor :: Lens' PolygonStyle (Maybe Text) +psFillColor + = lens _psFillColor (\ s a -> s{_psFillColor = a}) + +-- | Column-value, gradient or buckets styler that is used to determine the +-- border color and opacity. +psStrokeColorStyler :: Lens' PolygonStyle (Maybe (Maybe StyleFunction)) +psStrokeColorStyler + = lens _psStrokeColorStyler + (\ s a -> s{_psStrokeColorStyler = a}) + +-- | Width of the polyon border in pixels. +psStrokeWeight :: Lens' PolygonStyle (Maybe Int32) +psStrokeWeight + = lens _psStrokeWeight + (\ s a -> s{_psStrokeWeight = a}) + +-- | Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque). +psStrokeOpacity :: Lens' PolygonStyle (Maybe Double) +psStrokeOpacity + = lens _psStrokeOpacity + (\ s a -> s{_psStrokeOpacity = a}) + +-- | Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 +-- (opaque). +psFillOpacity :: Lens' PolygonStyle (Maybe Double) +psFillOpacity + = lens _psFillOpacity + (\ s a -> s{_psFillOpacity = a}) + +-- | Column-value or bucket styler that is used to determine the width of the +-- polygon border. +psStrokeWeightStyler :: Lens' PolygonStyle (Maybe (Maybe StyleFunction)) +psStrokeWeightStyler + = lens _psStrokeWeightStyler + (\ s a -> s{_psStrokeWeightStyler = a}) + +-- | Color of the polygon border in #RRGGBB format. +psStrokeColor :: Lens' PolygonStyle (Maybe Text) +psStrokeColor + = lens _psStrokeColor + (\ s a -> s{_psStrokeColor = a}) + +instance FromJSON PolygonStyle where + parseJSON + = withObject "PolygonStyle" + (\ o -> + PolygonStyle <$> + (o .:? "fillColorStyler") <*> (o .:? "fillColor") <*> + (o .:? "strokeColorStyler") + <*> (o .:? "strokeWeight") + <*> (o .:? "strokeOpacity") + <*> (o .:? "fillOpacity") + <*> (o .:? "strokeWeightStyler") + <*> (o .:? "strokeColor")) + +instance ToJSON PolygonStyle where + toJSON PolygonStyle{..} + = object + (catMaybes + [("fillColorStyler" .=) <$> _psFillColorStyler, + ("fillColor" .=) <$> _psFillColor, + ("strokeColorStyler" .=) <$> _psStrokeColorStyler, + ("strokeWeight" .=) <$> _psStrokeWeight, + ("strokeOpacity" .=) <$> _psStrokeOpacity, + ("fillOpacity" .=) <$> _psFillOpacity, + ("strokeWeightStyler" .=) <$> _psStrokeWeightStyler, + ("strokeColor" .=) <$> _psStrokeColor]) + +-- | Represents a table. +-- +-- /See:/ 'table' smart constructor. +data Table = Table + { _tabIsExportable :: !(Maybe Bool) + , _tabKind :: !Text + , _tabColumnPropertiesJsonSchema :: !(Maybe Text) + , _tabTablePropertiesJsonSchema :: !(Maybe Text) + , _tabName :: !(Maybe Text) + , _tabTablePropertiesJson :: !(Maybe Text) + , _tabColumns :: !(Maybe [Maybe Column]) + , _tabBaseTableIds :: !(Maybe [Text]) + , _tabTableId :: !(Maybe Text) + , _tabSql :: !(Maybe Text) + , _tabDescription :: !(Maybe Text) + , _tabAttribution :: !(Maybe Text) + , _tabAttributionLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Table' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tabIsExportable' +-- +-- * 'tabKind' +-- +-- * 'tabColumnPropertiesJsonSchema' +-- +-- * 'tabTablePropertiesJsonSchema' +-- +-- * 'tabName' +-- +-- * 'tabTablePropertiesJson' +-- +-- * 'tabColumns' +-- +-- * 'tabBaseTableIds' +-- +-- * 'tabTableId' +-- +-- * 'tabSql' +-- +-- * 'tabDescription' +-- +-- * 'tabAttribution' +-- +-- * 'tabAttributionLink' +table + :: Table +table = + Table + { _tabIsExportable = Nothing + , _tabKind = "fusiontables#table" + , _tabColumnPropertiesJsonSchema = Nothing + , _tabTablePropertiesJsonSchema = Nothing + , _tabName = Nothing + , _tabTablePropertiesJson = Nothing + , _tabColumns = Nothing + , _tabBaseTableIds = Nothing + , _tabTableId = Nothing + , _tabSql = Nothing + , _tabDescription = Nothing + , _tabAttribution = Nothing + , _tabAttributionLink = Nothing + } + +-- | Variable for whether table is exportable. +tabIsExportable :: Lens' Table (Maybe Bool) +tabIsExportable + = lens _tabIsExportable + (\ s a -> s{_tabIsExportable = a}) + +-- | The kind of item this is. For a table, this is always +-- fusiontables#table. +tabKind :: Lens' Table Text +tabKind = lens _tabKind (\ s a -> s{_tabKind = a}) + +-- | Default JSON schema for validating all JSON column properties. +tabColumnPropertiesJsonSchema :: Lens' Table (Maybe Text) +tabColumnPropertiesJsonSchema + = lens _tabColumnPropertiesJsonSchema + (\ s a -> s{_tabColumnPropertiesJsonSchema = a}) + +-- | JSON schema for validating the JSON table properties. +tabTablePropertiesJsonSchema :: Lens' Table (Maybe Text) +tabTablePropertiesJsonSchema + = lens _tabTablePropertiesJsonSchema + (\ s a -> s{_tabTablePropertiesJsonSchema = a}) + +-- | Name assigned to a table. +tabName :: Lens' Table (Maybe Text) +tabName = lens _tabName (\ s a -> s{_tabName = a}) + +-- | JSON object containing custom table properties. +tabTablePropertiesJson :: Lens' Table (Maybe Text) +tabTablePropertiesJson + = lens _tabTablePropertiesJson + (\ s a -> s{_tabTablePropertiesJson = a}) + +-- | Columns in the table. +tabColumns :: Lens' Table [Maybe Column] +tabColumns + = lens _tabColumns (\ s a -> s{_tabColumns = a}) . + _Default + . _Coerce + +-- | Base table identifier if this table is a view or merged table. +tabBaseTableIds :: Lens' Table [Text] +tabBaseTableIds + = lens _tabBaseTableIds + (\ s a -> s{_tabBaseTableIds = a}) + . _Default + . _Coerce + +-- | Encrypted unique alphanumeric identifier for the table. +tabTableId :: Lens' Table (Maybe Text) +tabTableId + = lens _tabTableId (\ s a -> s{_tabTableId = a}) + +-- | SQL that encodes the table definition for derived tables. +tabSql :: Lens' Table (Maybe Text) +tabSql = lens _tabSql (\ s a -> s{_tabSql = a}) + +-- | Description assigned to the table. +tabDescription :: Lens' Table (Maybe Text) +tabDescription + = lens _tabDescription + (\ s a -> s{_tabDescription = a}) + +-- | Attribution assigned to the table. +tabAttribution :: Lens' Table (Maybe Text) +tabAttribution + = lens _tabAttribution + (\ s a -> s{_tabAttribution = a}) + +-- | Optional link for attribution. +tabAttributionLink :: Lens' Table (Maybe Text) +tabAttributionLink + = lens _tabAttributionLink + (\ s a -> s{_tabAttributionLink = a}) + +instance FromJSON Table where + parseJSON + = withObject "Table" + (\ o -> + Table <$> + (o .:? "isExportable") <*> + (o .:? "kind" .!= "fusiontables#table") + <*> (o .:? "columnPropertiesJsonSchema") + <*> (o .:? "tablePropertiesJsonSchema") + <*> (o .:? "name") + <*> (o .:? "tablePropertiesJson") + <*> (o .:? "columns" .!= mempty) + <*> (o .:? "baseTableIds" .!= mempty) + <*> (o .:? "tableId") + <*> (o .:? "sql") + <*> (o .:? "description") + <*> (o .:? "attribution") + <*> (o .:? "attributionLink")) + +instance ToJSON Table where + toJSON Table{..} + = object + (catMaybes + [("isExportable" .=) <$> _tabIsExportable, + Just ("kind" .= _tabKind), + ("columnPropertiesJsonSchema" .=) <$> + _tabColumnPropertiesJsonSchema, + ("tablePropertiesJsonSchema" .=) <$> + _tabTablePropertiesJsonSchema, + ("name" .=) <$> _tabName, + ("tablePropertiesJson" .=) <$> + _tabTablePropertiesJson, + ("columns" .=) <$> _tabColumns, + ("baseTableIds" .=) <$> _tabBaseTableIds, + ("tableId" .=) <$> _tabTableId, + ("sql" .=) <$> _tabSql, + ("description" .=) <$> _tabDescription, + ("attribution" .=) <$> _tabAttribution, + ("attributionLink" .=) <$> _tabAttributionLink]) + +-- | Specifies the details of a column in a table. +-- +-- /See:/ 'column' smart constructor. +data Column = Column + { _cColumnJsonSchema :: !(Maybe Text) + , _cGraphPredicate :: !(Maybe Text) + , _cKind :: !Text + , _cBaseColumn :: !(Maybe ColumnBaseColumn) + , _cColumnPropertiesJson :: !(Maybe Text) + , _cName :: !(Maybe Text) + , _cType :: !(Maybe Text) + , _cFormatPattern :: !(Maybe Text) + , _cColumnId :: !(Maybe Int32) + , _cValidValues :: !(Maybe [Text]) + , _cValidateData :: !(Maybe Bool) + , _cDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Column' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cColumnJsonSchema' +-- +-- * 'cGraphPredicate' +-- +-- * 'cKind' +-- +-- * 'cBaseColumn' +-- +-- * 'cColumnPropertiesJson' +-- +-- * 'cName' +-- +-- * 'cType' +-- +-- * 'cFormatPattern' +-- +-- * 'cColumnId' +-- +-- * 'cValidValues' +-- +-- * 'cValidateData' +-- +-- * 'cDescription' +column + :: Column +column = + Column + { _cColumnJsonSchema = Nothing + , _cGraphPredicate = Nothing + , _cKind = "fusiontables#column" + , _cBaseColumn = Nothing + , _cColumnPropertiesJson = Nothing + , _cName = Nothing + , _cType = Nothing + , _cFormatPattern = Nothing + , _cColumnId = Nothing + , _cValidValues = Nothing + , _cValidateData = Nothing + , _cDescription = Nothing + } + +-- | JSON schema for interpreting JSON in this column. +cColumnJsonSchema :: Lens' Column (Maybe Text) +cColumnJsonSchema + = lens _cColumnJsonSchema + (\ s a -> s{_cColumnJsonSchema = a}) + +-- | Column graph predicate. Used to map table to graph data model +-- (subject,predicate,object) See W3C Graph-based Data Model. +cGraphPredicate :: Lens' Column (Maybe Text) +cGraphPredicate + = lens _cGraphPredicate + (\ s a -> s{_cGraphPredicate = a}) + +-- | The kind of item this is. For a column, this is always +-- fusiontables#column. +cKind :: Lens' Column Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Identifier of the base column. If present, this column is derived from +-- the specified base column. +cBaseColumn :: Lens' Column (Maybe ColumnBaseColumn) +cBaseColumn + = lens _cBaseColumn (\ s a -> s{_cBaseColumn = a}) + +-- | JSON object containing custom column properties. +cColumnPropertiesJson :: Lens' Column (Maybe Text) +cColumnPropertiesJson + = lens _cColumnPropertiesJson + (\ s a -> s{_cColumnPropertiesJson = a}) + +-- | Name of the column. +cName :: Lens' Column (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Type of the column. +cType :: Lens' Column (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +-- | Format pattern. Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 +-- DT_DATE_SHORTfor example 12\/24\/08 DT_DATE_TIME_MEDIUMfor example Dec +-- 24, 2008 8:30:45 PM DT_DATE_TIME_SHORTfor example 12\/24\/08 8:30 PM +-- DT_DAY_MONTH_2_DIGIT_YEARfor example 24\/12\/08 +-- DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24\/12\/08 20:30 +-- DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24\/12\/08 8:30 PM +-- DT_DAY_MONTH_4_DIGIT_YEARfor example 24\/12\/2008 +-- DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24\/12\/2008 20:30 +-- DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24\/12\/2008 8:30 PM +-- DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24 +-- DT_ISO_YEAR_MONTH_DAY_TIMEfor example 2008-12-24 20:30:45 +-- DT_MONTH_DAY_4_DIGIT_YEARfor example 12\/24\/2008 DT_TIME_LONGfor +-- example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 PM +-- DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008 +-- HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match the data +-- type NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 +-- NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example 1235 +-- NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example +-- 123,456% NUMBER_SCIENTIFICfor example 1E3 +-- STRING_EIGHT_LINE_IMAGEDisplays thumbnail images as tall as eight lines +-- of text STRING_FOUR_LINE_IMAGEDisplays thumbnail images as tall as four +-- lines of text STRING_JSON_TEXTAllows JSON editing of text in UI +-- STRING_LINKTreats cell as a link (must start with http:\/\/ or +-- https:\/\/) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall as +-- one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail +cFormatPattern :: Lens' Column (Maybe Text) +cFormatPattern + = lens _cFormatPattern + (\ s a -> s{_cFormatPattern = a}) + +-- | Identifier for the column. +cColumnId :: Lens' Column (Maybe Int32) +cColumnId + = lens _cColumnId (\ s a -> s{_cColumnId = a}) + +-- | List of valid values used to validate data and supply a drop-down list +-- of values in the web application. +cValidValues :: Lens' Column [Text] +cValidValues + = lens _cValidValues (\ s a -> s{_cValidValues = a}) + . _Default + . _Coerce + +-- | If true, data entered via the web application is validated. +cValidateData :: Lens' Column (Maybe Bool) +cValidateData + = lens _cValidateData + (\ s a -> s{_cValidateData = a}) + +-- | Column description. +cDescription :: Lens' Column (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +instance FromJSON Column where + parseJSON + = withObject "Column" + (\ o -> + Column <$> + (o .:? "columnJsonSchema") <*> + (o .:? "graphPredicate") + <*> (o .:? "kind" .!= "fusiontables#column") + <*> (o .:? "baseColumn") + <*> (o .:? "columnPropertiesJson") + <*> (o .:? "name") + <*> (o .:? "type") + <*> (o .:? "formatPattern") + <*> (o .:? "columnId") + <*> (o .:? "validValues" .!= mempty) + <*> (o .:? "validateData") + <*> (o .:? "description")) + +instance ToJSON Column where + toJSON Column{..} + = object + (catMaybes + [("columnJsonSchema" .=) <$> _cColumnJsonSchema, + ("graphPredicate" .=) <$> _cGraphPredicate, + Just ("kind" .= _cKind), + ("baseColumn" .=) <$> _cBaseColumn, + ("columnPropertiesJson" .=) <$> + _cColumnPropertiesJson, + ("name" .=) <$> _cName, ("type" .=) <$> _cType, + ("formatPattern" .=) <$> _cFormatPattern, + ("columnId" .=) <$> _cColumnId, + ("validValues" .=) <$> _cValidValues, + ("validateData" .=) <$> _cValidateData, + ("description" .=) <$> _cDescription]) + +-- | Represents a LineStyle within a StyleSetting +-- +-- /See:/ 'lineStyle' smart constructor. +data LineStyle = LineStyle + { _lsStrokeColorStyler :: !(Maybe (Maybe StyleFunction)) + , _lsStrokeWeight :: !(Maybe Int32) + , _lsStrokeOpacity :: !(Maybe Double) + , _lsStrokeWeightStyler :: !(Maybe (Maybe StyleFunction)) + , _lsStrokeColor :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LineStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsStrokeColorStyler' +-- +-- * 'lsStrokeWeight' +-- +-- * 'lsStrokeOpacity' +-- +-- * 'lsStrokeWeightStyler' +-- +-- * 'lsStrokeColor' +lineStyle + :: LineStyle +lineStyle = + LineStyle + { _lsStrokeColorStyler = Nothing + , _lsStrokeWeight = Nothing + , _lsStrokeOpacity = Nothing + , _lsStrokeWeightStyler = Nothing + , _lsStrokeColor = Nothing + } + +-- | Column-value, gradient or buckets styler that is used to determine the +-- line color and opacity. +lsStrokeColorStyler :: Lens' LineStyle (Maybe (Maybe StyleFunction)) +lsStrokeColorStyler + = lens _lsStrokeColorStyler + (\ s a -> s{_lsStrokeColorStyler = a}) + +-- | Width of the line in pixels. +lsStrokeWeight :: Lens' LineStyle (Maybe Int32) +lsStrokeWeight + = lens _lsStrokeWeight + (\ s a -> s{_lsStrokeWeight = a}) + +-- | Opacity of the line : 0.0 (transparent) to 1.0 (opaque). +lsStrokeOpacity :: Lens' LineStyle (Maybe Double) +lsStrokeOpacity + = lens _lsStrokeOpacity + (\ s a -> s{_lsStrokeOpacity = a}) + +-- | Column-value or bucket styler that is used to determine the width of the +-- line. +lsStrokeWeightStyler :: Lens' LineStyle (Maybe (Maybe StyleFunction)) +lsStrokeWeightStyler + = lens _lsStrokeWeightStyler + (\ s a -> s{_lsStrokeWeightStyler = a}) + +-- | Color of the line in #RRGGBB format. +lsStrokeColor :: Lens' LineStyle (Maybe Text) +lsStrokeColor + = lens _lsStrokeColor + (\ s a -> s{_lsStrokeColor = a}) + +instance FromJSON LineStyle where + parseJSON + = withObject "LineStyle" + (\ o -> + LineStyle <$> + (o .:? "strokeColorStyler") <*> + (o .:? "strokeWeight") + <*> (o .:? "strokeOpacity") + <*> (o .:? "strokeWeightStyler") + <*> (o .:? "strokeColor")) + +instance ToJSON LineStyle where + toJSON LineStyle{..} + = object + (catMaybes + [("strokeColorStyler" .=) <$> _lsStrokeColorStyler, + ("strokeWeight" .=) <$> _lsStrokeWeight, + ("strokeOpacity" .=) <$> _lsStrokeOpacity, + ("strokeWeightStyler" .=) <$> _lsStrokeWeightStyler, + ("strokeColor" .=) <$> _lsStrokeColor]) diff --git a/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Sum.hs b/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Sum.hs new file mode 100644 index 000000000..5325afab3 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/FusionTables/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.FusionTables.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.FusionTables.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Delete.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Delete.hs new file mode 100644 index 000000000..85e8e74fe --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Delete.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified column. +-- +-- /See:/ for @FusiontablesColumnDelete@. +module FusionTables.Column.Delete + ( + -- * REST Resource + ColumnDeleteAPI + + -- * Creating a Request + , columnDelete + , ColumnDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdKey + , cdOauthToken + , cdTableId + , cdColumnId + , cdFields + , cdAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnDelete@ which the +-- 'ColumnDelete' request conforms to. +type ColumnDeleteAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> + Capture "columnId" Text :> Delete '[JSON] () + +-- | Deletes the specified column. +-- +-- /See:/ 'columnDelete' smart constructor. +data ColumnDelete = ColumnDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdOauthToken :: !(Maybe Text) + , _cdTableId :: !Text + , _cdColumnId :: !Text + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdKey' +-- +-- * 'cdOauthToken' +-- +-- * 'cdTableId' +-- +-- * 'cdColumnId' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +columnDelete + :: Text -- ^ 'tableId' + -> Text -- ^ 'columnId' + -> ColumnDelete +columnDelete pCdTableId_ pCdColumnId_ = + ColumnDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdKey = Nothing + , _cdOauthToken = Nothing + , _cdTableId = pCdTableId_ + , _cdColumnId = pCdColumnId_ + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' ColumnDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' ColumnDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' ColumnDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' ColumnDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' ColumnDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Table from which the column is being deleted. +cdTableId :: Lens' ColumnDelete' Text +cdTableId + = lens _cdTableId (\ s a -> s{_cdTableId = a}) + +-- | Name or identifier for the column being deleted. +cdColumnId :: Lens' ColumnDelete' Text +cdColumnId + = lens _cdColumnId (\ s a -> s{_cdColumnId = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' ColumnDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' ColumnDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest ColumnDelete' where + type Rs ColumnDelete' = () + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp _cdKey + _cdOauthToken + _cdTableId + _cdColumnId + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnDeleteAPI) r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Get.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Get.hs new file mode 100644 index 000000000..e3ceed01e --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a specific column by its ID. +-- +-- /See:/ for @FusiontablesColumnGet@. +module FusionTables.Column.Get + ( + -- * REST Resource + ColumnGetAPI + + -- * Creating a Request + , columnGet + , ColumnGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgKey + , cgOauthToken + , cgTableId + , cgColumnId + , cgFields + , cgAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnGet@ which the +-- 'ColumnGet' request conforms to. +type ColumnGetAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> + Capture "columnId" Text :> Get '[JSON] Column + +-- | Retrieves a specific column by its ID. +-- +-- /See:/ 'columnGet' smart constructor. +data ColumnGet = ColumnGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgTableId :: !Text + , _cgColumnId :: !Text + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgTableId' +-- +-- * 'cgColumnId' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +columnGet + :: Text -- ^ 'tableId' + -> Text -- ^ 'columnId' + -> ColumnGet +columnGet pCgTableId_ pCgColumnId_ = + ColumnGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgTableId = pCgTableId_ + , _cgColumnId = pCgColumnId_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ColumnGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ColumnGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ColumnGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ColumnGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ColumnGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Table to which the column belongs. +cgTableId :: Lens' ColumnGet' Text +cgTableId + = lens _cgTableId (\ s a -> s{_cgTableId = a}) + +-- | Name or identifier for the column that is being requested. +cgColumnId :: Lens' ColumnGet' Text +cgColumnId + = lens _cgColumnId (\ s a -> s{_cgColumnId = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ColumnGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ColumnGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ColumnGet' where + type Rs ColumnGet' = Column + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgKey + _cgOauthToken + _cgTableId + _cgColumnId + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Insert.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Insert.hs new file mode 100644 index 000000000..a7ed09471 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Insert.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new column to the table. +-- +-- /See:/ for @FusiontablesColumnInsert@. +module FusionTables.Column.Insert + ( + -- * REST Resource + ColumnInsertAPI + + -- * Creating a Request + , columnInsert + , ColumnInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciOauthToken + , ciTableId + , ciFields + , ciAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnInsert@ which the +-- 'ColumnInsert' request conforms to. +type ColumnInsertAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> Post '[JSON] Column + +-- | Adds a new column to the table. +-- +-- /See:/ 'columnInsert' smart constructor. +data ColumnInsert = ColumnInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciTableId :: !Text + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciTableId' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +columnInsert + :: Text -- ^ 'tableId' + -> ColumnInsert +columnInsert pCiTableId_ = + ColumnInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciTableId = pCiTableId_ + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' ColumnInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' ColumnInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' ColumnInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' ColumnInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' ColumnInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Table for which a new column is being added. +ciTableId :: Lens' ColumnInsert' Text +ciTableId + = lens _ciTableId (\ s a -> s{_ciTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' ColumnInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' ColumnInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest ColumnInsert' where + type Rs ColumnInsert' = Column + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciOauthToken + _ciTableId + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnInsertAPI) r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/List.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/List.hs new file mode 100644 index 000000000..fa31c4f9d --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/List.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of columns. +-- +-- /See:/ for @FusiontablesColumnList@. +module FusionTables.Column.List + ( + -- * REST Resource + ColumnListAPI + + -- * Creating a Request + , columnList + , ColumnList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clKey + , clPageToken + , clOauthToken + , clTableId + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnList@ which the +-- 'ColumnList' request conforms to. +type ColumnListAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ColumnList + +-- | Retrieves a list of columns. +-- +-- /See:/ 'columnList' smart constructor. +data ColumnList = ColumnList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clTableId :: !Text + , _clMaxResults :: !(Maybe Word32) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clTableId' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +columnList + :: Text -- ^ 'tableId' + -> ColumnList +columnList pClTableId_ = + ColumnList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clTableId = pClTableId_ + , _clMaxResults = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' ColumnList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' ColumnList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' ColumnList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' ColumnList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Continuation token specifying which result page to return. +clPageToken :: Lens' ColumnList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' ColumnList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Table whose columns are being listed. +clTableId :: Lens' ColumnList' Text +clTableId + = lens _clTableId (\ s a -> s{_clTableId = a}) + +-- | Maximum number of columns to return. Default is 5. +clMaxResults :: Lens' ColumnList' (Maybe Word32) +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' ColumnList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' ColumnList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest ColumnList' where + type Rs ColumnList' = ColumnList + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp _clKey + _clPageToken + _clOauthToken + _clTableId + _clMaxResults + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnListAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Patch.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Patch.hs new file mode 100644 index 000000000..979da41ba --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the name or type of an existing column. This method supports +-- patch semantics. +-- +-- /See:/ for @FusiontablesColumnPatch@. +module FusionTables.Column.Patch + ( + -- * REST Resource + ColumnPatchAPI + + -- * Creating a Request + , columnPatch + , ColumnPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpKey + , cpOauthToken + , cpTableId + , cpColumnId + , cpFields + , cpAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnPatch@ which the +-- 'ColumnPatch' request conforms to. +type ColumnPatchAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> + Capture "columnId" Text :> Patch '[JSON] Column + +-- | Updates the name or type of an existing column. This method supports +-- patch semantics. +-- +-- /See:/ 'columnPatch' smart constructor. +data ColumnPatch = ColumnPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpTableId :: !Text + , _cpColumnId :: !Text + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpOauthToken' +-- +-- * 'cpTableId' +-- +-- * 'cpColumnId' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +columnPatch + :: Text -- ^ 'tableId' + -> Text -- ^ 'columnId' + -> ColumnPatch +columnPatch pCpTableId_ pCpColumnId_ = + ColumnPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpOauthToken = Nothing + , _cpTableId = pCpTableId_ + , _cpColumnId = pCpColumnId_ + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' ColumnPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' ColumnPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' ColumnPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' ColumnPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' ColumnPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Table for which the column is being updated. +cpTableId :: Lens' ColumnPatch' Text +cpTableId + = lens _cpTableId (\ s a -> s{_cpTableId = a}) + +-- | Name or identifier for the column that is being updated. +cpColumnId :: Lens' ColumnPatch' Text +cpColumnId + = lens _cpColumnId (\ s a -> s{_cpColumnId = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' ColumnPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' ColumnPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest ColumnPatch' where + type Rs ColumnPatch' = Column + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp _cpKey + _cpOauthToken + _cpTableId + _cpColumnId + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnPatchAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Update.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Update.hs new file mode 100644 index 000000000..e7f908d31 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Update.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Column.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the name or type of an existing column. +-- +-- /See:/ for @FusiontablesColumnUpdate@. +module FusionTables.Column.Update + ( + -- * REST Resource + ColumnUpdateAPI + + -- * Creating a Request + , columnUpdate + , ColumnUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuOauthToken + , cuTableId + , cuColumnId + , cuFields + , cuAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesColumnUpdate@ which the +-- 'ColumnUpdate' request conforms to. +type ColumnUpdateAPI = + "tables" :> + Capture "tableId" Text :> + "columns" :> + Capture "columnId" Text :> Put '[JSON] Column + +-- | Updates the name or type of an existing column. +-- +-- /See:/ 'columnUpdate' smart constructor. +data ColumnUpdate = ColumnUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuTableId :: !Text + , _cuColumnId :: !Text + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ColumnUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuTableId' +-- +-- * 'cuColumnId' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +columnUpdate + :: Text -- ^ 'tableId' + -> Text -- ^ 'columnId' + -> ColumnUpdate +columnUpdate pCuTableId_ pCuColumnId_ = + ColumnUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuTableId = pCuTableId_ + , _cuColumnId = pCuColumnId_ + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' ColumnUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' ColumnUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' ColumnUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' ColumnUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' ColumnUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Table for which the column is being updated. +cuTableId :: Lens' ColumnUpdate' Text +cuTableId + = lens _cuTableId (\ s a -> s{_cuTableId = a}) + +-- | Name or identifier for the column that is being updated. +cuColumnId :: Lens' ColumnUpdate' Text +cuColumnId + = lens _cuColumnId (\ s a -> s{_cuColumnId = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' ColumnUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' ColumnUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest ColumnUpdate' where + type Rs ColumnUpdate' = Column + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u ColumnUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuOauthToken + _cuTableId + _cuColumnId + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy ColumnUpdateAPI) r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/Sql.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/Sql.hs new file mode 100644 index 000000000..d5a57f678 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/Sql.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Query.Sql +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Executes a Fusion Tables SQL statement, which can be any of - SELECT - +-- INSERT - UPDATE - DELETE - SHOW - DESCRIBE - CREATE statement. +-- +-- /See:/ for @FusiontablesQuerySql@. +module FusionTables.Query.Sql + ( + -- * REST Resource + QuerySqlAPI + + -- * Creating a Request + , querySql + , QuerySql + + -- * Request Lenses + , qsTyped + , qsQuotaUser + , qsPrettyPrint + , qsHdrs + , qsUserIp + , qsKey + , qsOauthToken + , qsSql + , qsFields + , qsAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesQuerySql@ which the +-- 'QuerySql' request conforms to. +type QuerySqlAPI = + "query" :> + QueryParam "typed" Bool :> + QueryParam "hdrs" Bool :> + QueryParam "sql" Text :> Post '[JSON] Sqlresponse + +-- | Executes a Fusion Tables SQL statement, which can be any of - SELECT - +-- INSERT - UPDATE - DELETE - SHOW - DESCRIBE - CREATE statement. +-- +-- /See:/ 'querySql' smart constructor. +data QuerySql = QuerySql + { _qsTyped :: !(Maybe Bool) + , _qsQuotaUser :: !(Maybe Text) + , _qsPrettyPrint :: !Bool + , _qsHdrs :: !(Maybe Bool) + , _qsUserIp :: !(Maybe Text) + , _qsKey :: !(Maybe Text) + , _qsOauthToken :: !(Maybe Text) + , _qsSql :: !Text + , _qsFields :: !(Maybe Text) + , _qsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuerySql'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qsTyped' +-- +-- * 'qsQuotaUser' +-- +-- * 'qsPrettyPrint' +-- +-- * 'qsHdrs' +-- +-- * 'qsUserIp' +-- +-- * 'qsKey' +-- +-- * 'qsOauthToken' +-- +-- * 'qsSql' +-- +-- * 'qsFields' +-- +-- * 'qsAlt' +querySql + :: Text -- ^ 'sql' + -> QuerySql +querySql pQsSql_ = + QuerySql + { _qsTyped = Nothing + , _qsQuotaUser = Nothing + , _qsPrettyPrint = True + , _qsHdrs = Nothing + , _qsUserIp = Nothing + , _qsKey = Nothing + , _qsOauthToken = Nothing + , _qsSql = pQsSql_ + , _qsFields = Nothing + , _qsAlt = "json" + } + +-- | Whether typed values are returned in the (JSON) response: numbers for +-- numeric values and parsed geometries for KML values. Default is true. +qsTyped :: Lens' QuerySql' (Maybe Bool) +qsTyped = lens _qsTyped (\ s a -> s{_qsTyped = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qsQuotaUser :: Lens' QuerySql' (Maybe Text) +qsQuotaUser + = lens _qsQuotaUser (\ s a -> s{_qsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qsPrettyPrint :: Lens' QuerySql' Bool +qsPrettyPrint + = lens _qsPrettyPrint + (\ s a -> s{_qsPrettyPrint = a}) + +-- | Whether column names are included in the first row. Default is true. +qsHdrs :: Lens' QuerySql' (Maybe Bool) +qsHdrs = lens _qsHdrs (\ s a -> s{_qsHdrs = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qsUserIp :: Lens' QuerySql' (Maybe Text) +qsUserIp = lens _qsUserIp (\ s a -> s{_qsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qsKey :: Lens' QuerySql' (Maybe Text) +qsKey = lens _qsKey (\ s a -> s{_qsKey = a}) + +-- | OAuth 2.0 token for the current user. +qsOauthToken :: Lens' QuerySql' (Maybe Text) +qsOauthToken + = lens _qsOauthToken (\ s a -> s{_qsOauthToken = a}) + +-- | A Fusion Tables SQL statement, which can be any of - SELECT - INSERT - +-- UPDATE - DELETE - SHOW - DESCRIBE - CREATE +qsSql :: Lens' QuerySql' Text +qsSql = lens _qsSql (\ s a -> s{_qsSql = a}) + +-- | Selector specifying which fields to include in a partial response. +qsFields :: Lens' QuerySql' (Maybe Text) +qsFields = lens _qsFields (\ s a -> s{_qsFields = a}) + +-- | Data format for the response. +qsAlt :: Lens' QuerySql' Text +qsAlt = lens _qsAlt (\ s a -> s{_qsAlt = a}) + +instance GoogleRequest QuerySql' where + type Rs QuerySql' = Sqlresponse + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u QuerySql{..} + = go _qsTyped _qsQuotaUser _qsPrettyPrint _qsHdrs + _qsUserIp + _qsKey + _qsOauthToken + (Just _qsSql) + _qsFields + _qsAlt + where go + = clientWithRoute (Proxy :: Proxy QuerySqlAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/SqlGet.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/SqlGet.hs new file mode 100644 index 000000000..d428781fe --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Query/SqlGet.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Query.SqlGet +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Executes a SQL statement which can be any of - SELECT - SHOW - DESCRIBE +-- +-- /See:/ for @FusiontablesQuerySqlGet@. +module FusionTables.Query.SqlGet + ( + -- * REST Resource + QuerySqlGetAPI + + -- * Creating a Request + , querySqlGet + , QuerySqlGet + + -- * Request Lenses + , qsgTyped + , qsgQuotaUser + , qsgPrettyPrint + , qsgHdrs + , qsgUserIp + , qsgKey + , qsgOauthToken + , qsgSql + , qsgFields + , qsgAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesQuerySqlGet@ which the +-- 'QuerySqlGet' request conforms to. +type QuerySqlGetAPI = + "query" :> + QueryParam "typed" Bool :> + QueryParam "hdrs" Bool :> + QueryParam "sql" Text :> Get '[JSON] Sqlresponse + +-- | Executes a SQL statement which can be any of - SELECT - SHOW - DESCRIBE +-- +-- /See:/ 'querySqlGet' smart constructor. +data QuerySqlGet = QuerySqlGet + { _qsgTyped :: !(Maybe Bool) + , _qsgQuotaUser :: !(Maybe Text) + , _qsgPrettyPrint :: !Bool + , _qsgHdrs :: !(Maybe Bool) + , _qsgUserIp :: !(Maybe Text) + , _qsgKey :: !(Maybe Text) + , _qsgOauthToken :: !(Maybe Text) + , _qsgSql :: !Text + , _qsgFields :: !(Maybe Text) + , _qsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuerySqlGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qsgTyped' +-- +-- * 'qsgQuotaUser' +-- +-- * 'qsgPrettyPrint' +-- +-- * 'qsgHdrs' +-- +-- * 'qsgUserIp' +-- +-- * 'qsgKey' +-- +-- * 'qsgOauthToken' +-- +-- * 'qsgSql' +-- +-- * 'qsgFields' +-- +-- * 'qsgAlt' +querySqlGet + :: Text -- ^ 'sql' + -> QuerySqlGet +querySqlGet pQsgSql_ = + QuerySqlGet + { _qsgTyped = Nothing + , _qsgQuotaUser = Nothing + , _qsgPrettyPrint = True + , _qsgHdrs = Nothing + , _qsgUserIp = Nothing + , _qsgKey = Nothing + , _qsgOauthToken = Nothing + , _qsgSql = pQsgSql_ + , _qsgFields = Nothing + , _qsgAlt = "json" + } + +-- | Whether typed values are returned in the (JSON) response: numbers for +-- numeric values and parsed geometries for KML values. Default is true. +qsgTyped :: Lens' QuerySqlGet' (Maybe Bool) +qsgTyped = lens _qsgTyped (\ s a -> s{_qsgTyped = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qsgQuotaUser :: Lens' QuerySqlGet' (Maybe Text) +qsgQuotaUser + = lens _qsgQuotaUser (\ s a -> s{_qsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qsgPrettyPrint :: Lens' QuerySqlGet' Bool +qsgPrettyPrint + = lens _qsgPrettyPrint + (\ s a -> s{_qsgPrettyPrint = a}) + +-- | Whether column names are included (in the first row). Default is true. +qsgHdrs :: Lens' QuerySqlGet' (Maybe Bool) +qsgHdrs = lens _qsgHdrs (\ s a -> s{_qsgHdrs = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qsgUserIp :: Lens' QuerySqlGet' (Maybe Text) +qsgUserIp + = lens _qsgUserIp (\ s a -> s{_qsgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qsgKey :: Lens' QuerySqlGet' (Maybe Text) +qsgKey = lens _qsgKey (\ s a -> s{_qsgKey = a}) + +-- | OAuth 2.0 token for the current user. +qsgOauthToken :: Lens' QuerySqlGet' (Maybe Text) +qsgOauthToken + = lens _qsgOauthToken + (\ s a -> s{_qsgOauthToken = a}) + +-- | A SQL statement which can be any of - SELECT - SHOW - DESCRIBE +qsgSql :: Lens' QuerySqlGet' Text +qsgSql = lens _qsgSql (\ s a -> s{_qsgSql = a}) + +-- | Selector specifying which fields to include in a partial response. +qsgFields :: Lens' QuerySqlGet' (Maybe Text) +qsgFields + = lens _qsgFields (\ s a -> s{_qsgFields = a}) + +-- | Data format for the response. +qsgAlt :: Lens' QuerySqlGet' Text +qsgAlt = lens _qsgAlt (\ s a -> s{_qsgAlt = a}) + +instance GoogleRequest QuerySqlGet' where + type Rs QuerySqlGet' = Sqlresponse + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u QuerySqlGet{..} + = go _qsgTyped _qsgQuotaUser _qsgPrettyPrint _qsgHdrs + _qsgUserIp + _qsgKey + _qsgOauthToken + (Just _qsgSql) + _qsgFields + _qsgAlt + where go + = clientWithRoute (Proxy :: Proxy QuerySqlGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Delete.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Delete.hs new file mode 100644 index 000000000..4ab242e79 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Delete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a style. +-- +-- /See:/ for @FusiontablesStyleDelete@. +module FusionTables.Style.Delete + ( + -- * REST Resource + StyleDeleteAPI + + -- * Creating a Request + , styleDelete + , StyleDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdKey + , sdStyleId + , sdOauthToken + , sdTableId + , sdFields + , sdAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStyleDelete@ which the +-- 'StyleDelete' request conforms to. +type StyleDeleteAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> + Capture "styleId" Int32 :> Delete '[JSON] () + +-- | Deletes a style. +-- +-- /See:/ 'styleDelete' smart constructor. +data StyleDelete = StyleDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdKey :: !(Maybe Text) + , _sdStyleId :: !Int32 + , _sdOauthToken :: !(Maybe Text) + , _sdTableId :: !Text + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdKey' +-- +-- * 'sdStyleId' +-- +-- * 'sdOauthToken' +-- +-- * 'sdTableId' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +styleDelete + :: Int32 -- ^ 'styleId' + -> Text -- ^ 'tableId' + -> StyleDelete +styleDelete pSdStyleId_ pSdTableId_ = + StyleDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdKey = Nothing + , _sdStyleId = pSdStyleId_ + , _sdOauthToken = Nothing + , _sdTableId = pSdTableId_ + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' StyleDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' StyleDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' StyleDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' StyleDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | Identifier (within a table) for the style being deleted +sdStyleId :: Lens' StyleDelete' Int32 +sdStyleId + = lens _sdStyleId (\ s a -> s{_sdStyleId = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' StyleDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Table from which the style is being deleted +sdTableId :: Lens' StyleDelete' Text +sdTableId + = lens _sdTableId (\ s a -> s{_sdTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' StyleDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' StyleDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest StyleDelete' where + type Rs StyleDelete' = () + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StyleDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp _sdKey + _sdStyleId + _sdOauthToken + _sdTableId + _sdFields + _sdAlt + where go + = clientWithRoute (Proxy :: Proxy StyleDeleteAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Get.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Get.hs new file mode 100644 index 000000000..9e3b453a5 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a specific style. +-- +-- /See:/ for @FusiontablesStyleGet@. +module FusionTables.Style.Get + ( + -- * REST Resource + StyleGetAPI + + -- * Creating a Request + , styleGet + , StyleGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgKey + , sgStyleId + , sgOauthToken + , sgTableId + , sgFields + , sgAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStyleGet@ which the +-- 'StyleGet' request conforms to. +type StyleGetAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> + Capture "styleId" Int32 :> Get '[JSON] StyleSetting + +-- | Gets a specific style. +-- +-- /See:/ 'styleGet' smart constructor. +data StyleGet = StyleGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgKey :: !(Maybe Text) + , _sgStyleId :: !Int32 + , _sgOauthToken :: !(Maybe Text) + , _sgTableId :: !Text + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgKey' +-- +-- * 'sgStyleId' +-- +-- * 'sgOauthToken' +-- +-- * 'sgTableId' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +styleGet + :: Int32 -- ^ 'styleId' + -> Text -- ^ 'tableId' + -> StyleGet +styleGet pSgStyleId_ pSgTableId_ = + StyleGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgKey = Nothing + , _sgStyleId = pSgStyleId_ + , _sgOauthToken = Nothing + , _sgTableId = pSgTableId_ + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' StyleGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' StyleGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' StyleGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' StyleGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | Identifier (integer) for a specific style in a table +sgStyleId :: Lens' StyleGet' Int32 +sgStyleId + = lens _sgStyleId (\ s a -> s{_sgStyleId = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' StyleGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Table to which the requested style belongs +sgTableId :: Lens' StyleGet' Text +sgTableId + = lens _sgTableId (\ s a -> s{_sgTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' StyleGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' StyleGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest StyleGet' where + type Rs StyleGet' = StyleSetting + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StyleGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp _sgKey + _sgStyleId + _sgOauthToken + _sgTableId + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy StyleGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Insert.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Insert.hs new file mode 100644 index 000000000..91a396ca8 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Insert.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new style for the table. +-- +-- /See:/ for @FusiontablesStyleInsert@. +module FusionTables.Style.Insert + ( + -- * REST Resource + StyleInsertAPI + + -- * Creating a Request + , styleInsert + , StyleInsert + + -- * Request Lenses + , siQuotaUser + , siPrettyPrint + , siUserIp + , siKey + , siOauthToken + , siTableId + , siFields + , siAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStyleInsert@ which the +-- 'StyleInsert' request conforms to. +type StyleInsertAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> Post '[JSON] StyleSetting + +-- | Adds a new style for the table. +-- +-- /See:/ 'styleInsert' smart constructor. +data StyleInsert = StyleInsert + { _siQuotaUser :: !(Maybe Text) + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siKey :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siTableId :: !Text + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siKey' +-- +-- * 'siOauthToken' +-- +-- * 'siTableId' +-- +-- * 'siFields' +-- +-- * 'siAlt' +styleInsert + :: Text -- ^ 'tableId' + -> StyleInsert +styleInsert pSiTableId_ = + StyleInsert + { _siQuotaUser = Nothing + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siKey = Nothing + , _siOauthToken = Nothing + , _siTableId = pSiTableId_ + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' StyleInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' StyleInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' StyleInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' StyleInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' StyleInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Table for which a new style is being added +siTableId :: Lens' StyleInsert' Text +siTableId + = lens _siTableId (\ s a -> s{_siTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' StyleInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' StyleInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest StyleInsert' where + type Rs StyleInsert' = StyleSetting + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StyleInsert{..} + = go _siQuotaUser _siPrettyPrint _siUserIp _siKey + _siOauthToken + _siTableId + _siFields + _siAlt + where go + = clientWithRoute (Proxy :: Proxy StyleInsertAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/List.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/List.hs new file mode 100644 index 000000000..3679bee17 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/List.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of styles. +-- +-- /See:/ for @FusiontablesStyleList@. +module FusionTables.Style.List + ( + -- * REST Resource + StyleListAPI + + -- * Creating a Request + , styleList + , StyleList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slPageToken + , slOauthToken + , slTableId + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStyleList@ which the +-- 'StyleList' request conforms to. +type StyleListAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] StyleSettingList + +-- | Retrieves a list of styles. +-- +-- /See:/ 'styleList' smart constructor. +data StyleList = StyleList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slTableId :: !Text + , _slMaxResults :: !(Maybe Word32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slTableId' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +styleList + :: Text -- ^ 'tableId' + -> StyleList +styleList pSlTableId_ = + StyleList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slTableId = pSlTableId_ + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' StyleList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' StyleList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' StyleList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' StyleList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | Continuation token specifying which result page to return. Optional. +slPageToken :: Lens' StyleList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' StyleList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Table whose styles are being listed +slTableId :: Lens' StyleList' Text +slTableId + = lens _slTableId (\ s a -> s{_slTableId = a}) + +-- | Maximum number of styles to return. Optional. Default is 5. +slMaxResults :: Lens' StyleList' (Maybe Word32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' StyleList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' StyleList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest StyleList' where + type Rs StyleList' = StyleSettingList + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StyleList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp _slKey + _slPageToken + _slOauthToken + _slTableId + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy StyleListAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Patch.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Patch.hs new file mode 100644 index 000000000..3cb15d71b --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Patch.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing style. This method supports patch semantics. +-- +-- /See:/ for @FusiontablesStylePatch@. +module FusionTables.Style.Patch + ( + -- * REST Resource + StylePatchAPI + + -- * Creating a Request + , stylePatch + , StylePatch + + -- * Request Lenses + , spQuotaUser + , spPrettyPrint + , spUserIp + , spKey + , spStyleId + , spOauthToken + , spTableId + , spFields + , spAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStylePatch@ which the +-- 'StylePatch' request conforms to. +type StylePatchAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> + Capture "styleId" Int32 :> Patch '[JSON] StyleSetting + +-- | Updates an existing style. This method supports patch semantics. +-- +-- /See:/ 'stylePatch' smart constructor. +data StylePatch = StylePatch + { _spQuotaUser :: !(Maybe Text) + , _spPrettyPrint :: !Bool + , _spUserIp :: !(Maybe Text) + , _spKey :: !(Maybe Text) + , _spStyleId :: !Int32 + , _spOauthToken :: !(Maybe Text) + , _spTableId :: !Text + , _spFields :: !(Maybe Text) + , _spAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StylePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spQuotaUser' +-- +-- * 'spPrettyPrint' +-- +-- * 'spUserIp' +-- +-- * 'spKey' +-- +-- * 'spStyleId' +-- +-- * 'spOauthToken' +-- +-- * 'spTableId' +-- +-- * 'spFields' +-- +-- * 'spAlt' +stylePatch + :: Int32 -- ^ 'styleId' + -> Text -- ^ 'tableId' + -> StylePatch +stylePatch pSpStyleId_ pSpTableId_ = + StylePatch + { _spQuotaUser = Nothing + , _spPrettyPrint = True + , _spUserIp = Nothing + , _spKey = Nothing + , _spStyleId = pSpStyleId_ + , _spOauthToken = Nothing + , _spTableId = pSpTableId_ + , _spFields = Nothing + , _spAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +spQuotaUser :: Lens' StylePatch' (Maybe Text) +spQuotaUser + = lens _spQuotaUser (\ s a -> s{_spQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +spPrettyPrint :: Lens' StylePatch' Bool +spPrettyPrint + = lens _spPrettyPrint + (\ s a -> s{_spPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +spUserIp :: Lens' StylePatch' (Maybe Text) +spUserIp = lens _spUserIp (\ s a -> s{_spUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +spKey :: Lens' StylePatch' (Maybe Text) +spKey = lens _spKey (\ s a -> s{_spKey = a}) + +-- | Identifier (within a table) for the style being updated. +spStyleId :: Lens' StylePatch' Int32 +spStyleId + = lens _spStyleId (\ s a -> s{_spStyleId = a}) + +-- | OAuth 2.0 token for the current user. +spOauthToken :: Lens' StylePatch' (Maybe Text) +spOauthToken + = lens _spOauthToken (\ s a -> s{_spOauthToken = a}) + +-- | Table whose style is being updated. +spTableId :: Lens' StylePatch' Text +spTableId + = lens _spTableId (\ s a -> s{_spTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +spFields :: Lens' StylePatch' (Maybe Text) +spFields = lens _spFields (\ s a -> s{_spFields = a}) + +-- | Data format for the response. +spAlt :: Lens' StylePatch' Text +spAlt = lens _spAlt (\ s a -> s{_spAlt = a}) + +instance GoogleRequest StylePatch' where + type Rs StylePatch' = StyleSetting + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StylePatch{..} + = go _spQuotaUser _spPrettyPrint _spUserIp _spKey + _spStyleId + _spOauthToken + _spTableId + _spFields + _spAlt + where go + = clientWithRoute (Proxy :: Proxy StylePatchAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Update.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Update.hs new file mode 100644 index 000000000..e34995eaf --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Style/Update.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Style.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing style. +-- +-- /See:/ for @FusiontablesStyleUpdate@. +module FusionTables.Style.Update + ( + -- * REST Resource + StyleUpdateAPI + + -- * Creating a Request + , styleUpdate + , StyleUpdate + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suUserIp + , suKey + , suStyleId + , suOauthToken + , suTableId + , suFields + , suAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesStyleUpdate@ which the +-- 'StyleUpdate' request conforms to. +type StyleUpdateAPI = + "tables" :> + Capture "tableId" Text :> + "styles" :> + Capture "styleId" Int32 :> Put '[JSON] StyleSetting + +-- | Updates an existing style. +-- +-- /See:/ 'styleUpdate' smart constructor. +data StyleUpdate = StyleUpdate + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suKey :: !(Maybe Text) + , _suStyleId :: !Int32 + , _suOauthToken :: !(Maybe Text) + , _suTableId :: !Text + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StyleUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suKey' +-- +-- * 'suStyleId' +-- +-- * 'suOauthToken' +-- +-- * 'suTableId' +-- +-- * 'suFields' +-- +-- * 'suAlt' +styleUpdate + :: Int32 -- ^ 'styleId' + -> Text -- ^ 'tableId' + -> StyleUpdate +styleUpdate pSuStyleId_ pSuTableId_ = + StyleUpdate + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suKey = Nothing + , _suStyleId = pSuStyleId_ + , _suOauthToken = Nothing + , _suTableId = pSuTableId_ + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' StyleUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' StyleUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' StyleUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' StyleUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | Identifier (within a table) for the style being updated. +suStyleId :: Lens' StyleUpdate' Int32 +suStyleId + = lens _suStyleId (\ s a -> s{_suStyleId = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' StyleUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Table whose style is being updated. +suTableId :: Lens' StyleUpdate' Text +suTableId + = lens _suTableId (\ s a -> s{_suTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' StyleUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' StyleUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest StyleUpdate' where + type Rs StyleUpdate' = StyleSetting + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u StyleUpdate{..} + = go _suQuotaUser _suPrettyPrint _suUserIp _suKey + _suStyleId + _suOauthToken + _suTableId + _suFields + _suAlt + where go + = clientWithRoute (Proxy :: Proxy StyleUpdateAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Copy.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Copy.hs new file mode 100644 index 000000000..adae0bee8 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Copy.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Copy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Copies a table. +-- +-- /See:/ for @FusiontablesTableCopy@. +module FusionTables.Table.Copy + ( + -- * REST Resource + TableCopyAPI + + -- * Creating a Request + , tableCopy + , TableCopy + + -- * Request Lenses + , tcQuotaUser + , tcPrettyPrint + , tcUserIp + , tcKey + , tcOauthToken + , tcTableId + , tcCopyPresentation + , tcFields + , tcAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableCopy@ which the +-- 'TableCopy' request conforms to. +type TableCopyAPI = + "tables" :> + Capture "tableId" Text :> + "copy" :> + QueryParam "copyPresentation" Bool :> + Post '[JSON] Table + +-- | Copies a table. +-- +-- /See:/ 'tableCopy' smart constructor. +data TableCopy = TableCopy + { _tcQuotaUser :: !(Maybe Text) + , _tcPrettyPrint :: !Bool + , _tcUserIp :: !(Maybe Text) + , _tcKey :: !(Maybe Text) + , _tcOauthToken :: !(Maybe Text) + , _tcTableId :: !Text + , _tcCopyPresentation :: !(Maybe Bool) + , _tcFields :: !(Maybe Text) + , _tcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableCopy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcQuotaUser' +-- +-- * 'tcPrettyPrint' +-- +-- * 'tcUserIp' +-- +-- * 'tcKey' +-- +-- * 'tcOauthToken' +-- +-- * 'tcTableId' +-- +-- * 'tcCopyPresentation' +-- +-- * 'tcFields' +-- +-- * 'tcAlt' +tableCopy + :: Text -- ^ 'tableId' + -> TableCopy +tableCopy pTcTableId_ = + TableCopy + { _tcQuotaUser = Nothing + , _tcPrettyPrint = True + , _tcUserIp = Nothing + , _tcKey = Nothing + , _tcOauthToken = Nothing + , _tcTableId = pTcTableId_ + , _tcCopyPresentation = Nothing + , _tcFields = Nothing + , _tcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tcQuotaUser :: Lens' TableCopy' (Maybe Text) +tcQuotaUser + = lens _tcQuotaUser (\ s a -> s{_tcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tcPrettyPrint :: Lens' TableCopy' Bool +tcPrettyPrint + = lens _tcPrettyPrint + (\ s a -> s{_tcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tcUserIp :: Lens' TableCopy' (Maybe Text) +tcUserIp = lens _tcUserIp (\ s a -> s{_tcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tcKey :: Lens' TableCopy' (Maybe Text) +tcKey = lens _tcKey (\ s a -> s{_tcKey = a}) + +-- | OAuth 2.0 token for the current user. +tcOauthToken :: Lens' TableCopy' (Maybe Text) +tcOauthToken + = lens _tcOauthToken (\ s a -> s{_tcOauthToken = a}) + +-- | ID of the table that is being copied. +tcTableId :: Lens' TableCopy' Text +tcTableId + = lens _tcTableId (\ s a -> s{_tcTableId = a}) + +-- | Whether to also copy tabs, styles, and templates. Default is false. +tcCopyPresentation :: Lens' TableCopy' (Maybe Bool) +tcCopyPresentation + = lens _tcCopyPresentation + (\ s a -> s{_tcCopyPresentation = a}) + +-- | Selector specifying which fields to include in a partial response. +tcFields :: Lens' TableCopy' (Maybe Text) +tcFields = lens _tcFields (\ s a -> s{_tcFields = a}) + +-- | Data format for the response. +tcAlt :: Lens' TableCopy' Text +tcAlt = lens _tcAlt (\ s a -> s{_tcAlt = a}) + +instance GoogleRequest TableCopy' where + type Rs TableCopy' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableCopy{..} + = go _tcQuotaUser _tcPrettyPrint _tcUserIp _tcKey + _tcOauthToken + _tcTableId + _tcCopyPresentation + _tcFields + _tcAlt + where go + = clientWithRoute (Proxy :: Proxy TableCopyAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Delete.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Delete.hs new file mode 100644 index 000000000..01266ca96 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Delete.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a table. +-- +-- /See:/ for @FusiontablesTableDelete@. +module FusionTables.Table.Delete + ( + -- * REST Resource + TableDeleteAPI + + -- * Creating a Request + , tableDelete + , TableDelete + + -- * Request Lenses + , tabaQuotaUser + , tabaPrettyPrint + , tabaUserIp + , tabaKey + , tabaOauthToken + , tabaTableId + , tabaFields + , tabaAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableDelete@ which the +-- 'TableDelete' request conforms to. +type TableDeleteAPI = + "tables" :> + Capture "tableId" Text :> Delete '[JSON] () + +-- | Deletes a table. +-- +-- /See:/ 'tableDelete' smart constructor. +data TableDelete = TableDelete + { _tabaQuotaUser :: !(Maybe Text) + , _tabaPrettyPrint :: !Bool + , _tabaUserIp :: !(Maybe Text) + , _tabaKey :: !(Maybe Text) + , _tabaOauthToken :: !(Maybe Text) + , _tabaTableId :: !Text + , _tabaFields :: !(Maybe Text) + , _tabaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tabaQuotaUser' +-- +-- * 'tabaPrettyPrint' +-- +-- * 'tabaUserIp' +-- +-- * 'tabaKey' +-- +-- * 'tabaOauthToken' +-- +-- * 'tabaTableId' +-- +-- * 'tabaFields' +-- +-- * 'tabaAlt' +tableDelete + :: Text -- ^ 'tableId' + -> TableDelete +tableDelete pTabaTableId_ = + TableDelete + { _tabaQuotaUser = Nothing + , _tabaPrettyPrint = True + , _tabaUserIp = Nothing + , _tabaKey = Nothing + , _tabaOauthToken = Nothing + , _tabaTableId = pTabaTableId_ + , _tabaFields = Nothing + , _tabaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tabaQuotaUser :: Lens' TableDelete' (Maybe Text) +tabaQuotaUser + = lens _tabaQuotaUser + (\ s a -> s{_tabaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tabaPrettyPrint :: Lens' TableDelete' Bool +tabaPrettyPrint + = lens _tabaPrettyPrint + (\ s a -> s{_tabaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tabaUserIp :: Lens' TableDelete' (Maybe Text) +tabaUserIp + = lens _tabaUserIp (\ s a -> s{_tabaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tabaKey :: Lens' TableDelete' (Maybe Text) +tabaKey = lens _tabaKey (\ s a -> s{_tabaKey = a}) + +-- | OAuth 2.0 token for the current user. +tabaOauthToken :: Lens' TableDelete' (Maybe Text) +tabaOauthToken + = lens _tabaOauthToken + (\ s a -> s{_tabaOauthToken = a}) + +-- | ID of the table to be deleted. +tabaTableId :: Lens' TableDelete' Text +tabaTableId + = lens _tabaTableId (\ s a -> s{_tabaTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tabaFields :: Lens' TableDelete' (Maybe Text) +tabaFields + = lens _tabaFields (\ s a -> s{_tabaFields = a}) + +-- | Data format for the response. +tabaAlt :: Lens' TableDelete' Text +tabaAlt = lens _tabaAlt (\ s a -> s{_tabaAlt = a}) + +instance GoogleRequest TableDelete' where + type Rs TableDelete' = () + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableDelete{..} + = go _tabaQuotaUser _tabaPrettyPrint _tabaUserIp + _tabaKey + _tabaOauthToken + _tabaTableId + _tabaFields + _tabaAlt + where go + = clientWithRoute (Proxy :: Proxy TableDeleteAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Get.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Get.hs new file mode 100644 index 000000000..f9b4fa455 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a specific table by its ID. +-- +-- /See:/ for @FusiontablesTableGet@. +module FusionTables.Table.Get + ( + -- * REST Resource + TableGetAPI + + -- * Creating a Request + , tableGet + , TableGet + + -- * Request Lenses + , tggQuotaUser + , tggPrettyPrint + , tggUserIp + , tggKey + , tggOauthToken + , tggTableId + , tggFields + , tggAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableGet@ which the +-- 'TableGet' request conforms to. +type TableGetAPI = + "tables" :> + Capture "tableId" Text :> Get '[JSON] Table + +-- | Retrieves a specific table by its ID. +-- +-- /See:/ 'tableGet' smart constructor. +data TableGet = TableGet + { _tggQuotaUser :: !(Maybe Text) + , _tggPrettyPrint :: !Bool + , _tggUserIp :: !(Maybe Text) + , _tggKey :: !(Maybe Text) + , _tggOauthToken :: !(Maybe Text) + , _tggTableId :: !Text + , _tggFields :: !(Maybe Text) + , _tggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tggQuotaUser' +-- +-- * 'tggPrettyPrint' +-- +-- * 'tggUserIp' +-- +-- * 'tggKey' +-- +-- * 'tggOauthToken' +-- +-- * 'tggTableId' +-- +-- * 'tggFields' +-- +-- * 'tggAlt' +tableGet + :: Text -- ^ 'tableId' + -> TableGet +tableGet pTggTableId_ = + TableGet + { _tggQuotaUser = Nothing + , _tggPrettyPrint = True + , _tggUserIp = Nothing + , _tggKey = Nothing + , _tggOauthToken = Nothing + , _tggTableId = pTggTableId_ + , _tggFields = Nothing + , _tggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tggQuotaUser :: Lens' TableGet' (Maybe Text) +tggQuotaUser + = lens _tggQuotaUser (\ s a -> s{_tggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tggPrettyPrint :: Lens' TableGet' Bool +tggPrettyPrint + = lens _tggPrettyPrint + (\ s a -> s{_tggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tggUserIp :: Lens' TableGet' (Maybe Text) +tggUserIp + = lens _tggUserIp (\ s a -> s{_tggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tggKey :: Lens' TableGet' (Maybe Text) +tggKey = lens _tggKey (\ s a -> s{_tggKey = a}) + +-- | OAuth 2.0 token for the current user. +tggOauthToken :: Lens' TableGet' (Maybe Text) +tggOauthToken + = lens _tggOauthToken + (\ s a -> s{_tggOauthToken = a}) + +-- | Identifier for the table being requested. +tggTableId :: Lens' TableGet' Text +tggTableId + = lens _tggTableId (\ s a -> s{_tggTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tggFields :: Lens' TableGet' (Maybe Text) +tggFields + = lens _tggFields (\ s a -> s{_tggFields = a}) + +-- | Data format for the response. +tggAlt :: Lens' TableGet' Text +tggAlt = lens _tggAlt (\ s a -> s{_tggAlt = a}) + +instance GoogleRequest TableGet' where + type Rs TableGet' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableGet{..} + = go _tggQuotaUser _tggPrettyPrint _tggUserIp _tggKey + _tggOauthToken + _tggTableId + _tggFields + _tggAlt + where go + = clientWithRoute (Proxy :: Proxy TableGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportRows.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportRows.hs new file mode 100644 index 000000000..1f58635c1 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportRows.hs @@ -0,0 +1,226 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.ImportRows +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Imports more rows into a table. +-- +-- /See:/ for @FusiontablesTableImportRows@. +module FusionTables.Table.ImportRows + ( + -- * REST Resource + TableImportRowsAPI + + -- * Creating a Request + , tableImportRows + , TableImportRows + + -- * Request Lenses + , tirQuotaUser + , tirPrettyPrint + , tirUserIp + , tirStartLine + , tirEndLine + , tirKey + , tirOauthToken + , tirTableId + , tirDelimiter + , tirEncoding + , tirIsStrict + , tirFields + , tirAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableImportRows@ which the +-- 'TableImportRows' request conforms to. +type TableImportRowsAPI = + "tables" :> + Capture "tableId" Text :> + "import" :> + QueryParam "startLine" Int32 :> + QueryParam "endLine" Int32 :> + QueryParam "delimiter" Text :> + QueryParam "encoding" Text :> + QueryParam "isStrict" Bool :> Post '[JSON] Import + +-- | Imports more rows into a table. +-- +-- /See:/ 'tableImportRows' smart constructor. +data TableImportRows = TableImportRows + { _tirQuotaUser :: !(Maybe Text) + , _tirPrettyPrint :: !Bool + , _tirUserIp :: !(Maybe Text) + , _tirStartLine :: !(Maybe Int32) + , _tirEndLine :: !(Maybe Int32) + , _tirKey :: !(Maybe Text) + , _tirOauthToken :: !(Maybe Text) + , _tirTableId :: !Text + , _tirDelimiter :: !(Maybe Text) + , _tirEncoding :: !(Maybe Text) + , _tirIsStrict :: !(Maybe Bool) + , _tirFields :: !(Maybe Text) + , _tirAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableImportRows'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tirQuotaUser' +-- +-- * 'tirPrettyPrint' +-- +-- * 'tirUserIp' +-- +-- * 'tirStartLine' +-- +-- * 'tirEndLine' +-- +-- * 'tirKey' +-- +-- * 'tirOauthToken' +-- +-- * 'tirTableId' +-- +-- * 'tirDelimiter' +-- +-- * 'tirEncoding' +-- +-- * 'tirIsStrict' +-- +-- * 'tirFields' +-- +-- * 'tirAlt' +tableImportRows + :: Text -- ^ 'tableId' + -> TableImportRows +tableImportRows pTirTableId_ = + TableImportRows + { _tirQuotaUser = Nothing + , _tirPrettyPrint = True + , _tirUserIp = Nothing + , _tirStartLine = Nothing + , _tirEndLine = Nothing + , _tirKey = Nothing + , _tirOauthToken = Nothing + , _tirTableId = pTirTableId_ + , _tirDelimiter = Nothing + , _tirEncoding = Nothing + , _tirIsStrict = Nothing + , _tirFields = Nothing + , _tirAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tirQuotaUser :: Lens' TableImportRows' (Maybe Text) +tirQuotaUser + = lens _tirQuotaUser (\ s a -> s{_tirQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tirPrettyPrint :: Lens' TableImportRows' Bool +tirPrettyPrint + = lens _tirPrettyPrint + (\ s a -> s{_tirPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tirUserIp :: Lens' TableImportRows' (Maybe Text) +tirUserIp + = lens _tirUserIp (\ s a -> s{_tirUserIp = a}) + +-- | The index of the first line from which to start importing, inclusive. +-- Default is 0. +tirStartLine :: Lens' TableImportRows' (Maybe Int32) +tirStartLine + = lens _tirStartLine (\ s a -> s{_tirStartLine = a}) + +-- | The index of the line up to which data will be imported. Default is to +-- import the entire file. If endLine is negative, it is an offset from the +-- end of the file; the imported content will exclude the last endLine +-- lines. +tirEndLine :: Lens' TableImportRows' (Maybe Int32) +tirEndLine + = lens _tirEndLine (\ s a -> s{_tirEndLine = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tirKey :: Lens' TableImportRows' (Maybe Text) +tirKey = lens _tirKey (\ s a -> s{_tirKey = a}) + +-- | OAuth 2.0 token for the current user. +tirOauthToken :: Lens' TableImportRows' (Maybe Text) +tirOauthToken + = lens _tirOauthToken + (\ s a -> s{_tirOauthToken = a}) + +-- | The table into which new rows are being imported. +tirTableId :: Lens' TableImportRows' Text +tirTableId + = lens _tirTableId (\ s a -> s{_tirTableId = a}) + +-- | The delimiter used to separate cell values. This can only consist of a +-- single character. Default is ,. +tirDelimiter :: Lens' TableImportRows' (Maybe Text) +tirDelimiter + = lens _tirDelimiter (\ s a -> s{_tirDelimiter = a}) + +-- | The encoding of the content. Default is UTF-8. Use auto-detect if you +-- are unsure of the encoding. +tirEncoding :: Lens' TableImportRows' (Maybe Text) +tirEncoding + = lens _tirEncoding (\ s a -> s{_tirEncoding = a}) + +-- | Whether the imported CSV must have the same number of values for each +-- row. If false, rows with fewer values will be padded with empty values. +-- Default is true. +tirIsStrict :: Lens' TableImportRows' (Maybe Bool) +tirIsStrict + = lens _tirIsStrict (\ s a -> s{_tirIsStrict = a}) + +-- | Selector specifying which fields to include in a partial response. +tirFields :: Lens' TableImportRows' (Maybe Text) +tirFields + = lens _tirFields (\ s a -> s{_tirFields = a}) + +-- | Data format for the response. +tirAlt :: Lens' TableImportRows' Text +tirAlt = lens _tirAlt (\ s a -> s{_tirAlt = a}) + +instance GoogleRequest TableImportRows' where + type Rs TableImportRows' = Import + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableImportRows{..} + = go _tirQuotaUser _tirPrettyPrint _tirUserIp + _tirStartLine + _tirEndLine + _tirKey + _tirOauthToken + _tirTableId + _tirDelimiter + _tirEncoding + _tirIsStrict + _tirFields + _tirAlt + where go + = clientWithRoute (Proxy :: Proxy TableImportRowsAPI) + r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportTable.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportTable.hs new file mode 100644 index 000000000..0c84e6d4b --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ImportTable.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.ImportTable +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Imports a new table. +-- +-- /See:/ for @FusiontablesTableImportTable@. +module FusionTables.Table.ImportTable + ( + -- * REST Resource + TableImportTableAPI + + -- * Creating a Request + , tableImportTable + , TableImportTable + + -- * Request Lenses + , titQuotaUser + , titPrettyPrint + , titUserIp + , titKey + , titName + , titOauthToken + , titDelimiter + , titEncoding + , titFields + , titAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableImportTable@ which the +-- 'TableImportTable' request conforms to. +type TableImportTableAPI = + "tables" :> + "import" :> + QueryParam "name" Text :> + QueryParam "delimiter" Text :> + QueryParam "encoding" Text :> Post '[JSON] Table + +-- | Imports a new table. +-- +-- /See:/ 'tableImportTable' smart constructor. +data TableImportTable = TableImportTable + { _titQuotaUser :: !(Maybe Text) + , _titPrettyPrint :: !Bool + , _titUserIp :: !(Maybe Text) + , _titKey :: !(Maybe Text) + , _titName :: !Text + , _titOauthToken :: !(Maybe Text) + , _titDelimiter :: !(Maybe Text) + , _titEncoding :: !(Maybe Text) + , _titFields :: !(Maybe Text) + , _titAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableImportTable'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'titQuotaUser' +-- +-- * 'titPrettyPrint' +-- +-- * 'titUserIp' +-- +-- * 'titKey' +-- +-- * 'titName' +-- +-- * 'titOauthToken' +-- +-- * 'titDelimiter' +-- +-- * 'titEncoding' +-- +-- * 'titFields' +-- +-- * 'titAlt' +tableImportTable + :: Text -- ^ 'name' + -> TableImportTable +tableImportTable pTitName_ = + TableImportTable + { _titQuotaUser = Nothing + , _titPrettyPrint = True + , _titUserIp = Nothing + , _titKey = Nothing + , _titName = pTitName_ + , _titOauthToken = Nothing + , _titDelimiter = Nothing + , _titEncoding = Nothing + , _titFields = Nothing + , _titAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +titQuotaUser :: Lens' TableImportTable' (Maybe Text) +titQuotaUser + = lens _titQuotaUser (\ s a -> s{_titQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +titPrettyPrint :: Lens' TableImportTable' Bool +titPrettyPrint + = lens _titPrettyPrint + (\ s a -> s{_titPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +titUserIp :: Lens' TableImportTable' (Maybe Text) +titUserIp + = lens _titUserIp (\ s a -> s{_titUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +titKey :: Lens' TableImportTable' (Maybe Text) +titKey = lens _titKey (\ s a -> s{_titKey = a}) + +-- | The name to be assigned to the new table. +titName :: Lens' TableImportTable' Text +titName = lens _titName (\ s a -> s{_titName = a}) + +-- | OAuth 2.0 token for the current user. +titOauthToken :: Lens' TableImportTable' (Maybe Text) +titOauthToken + = lens _titOauthToken + (\ s a -> s{_titOauthToken = a}) + +-- | The delimiter used to separate cell values. This can only consist of a +-- single character. Default is ,. +titDelimiter :: Lens' TableImportTable' (Maybe Text) +titDelimiter + = lens _titDelimiter (\ s a -> s{_titDelimiter = a}) + +-- | The encoding of the content. Default is UTF-8. Use auto-detect if you +-- are unsure of the encoding. +titEncoding :: Lens' TableImportTable' (Maybe Text) +titEncoding + = lens _titEncoding (\ s a -> s{_titEncoding = a}) + +-- | Selector specifying which fields to include in a partial response. +titFields :: Lens' TableImportTable' (Maybe Text) +titFields + = lens _titFields (\ s a -> s{_titFields = a}) + +-- | Data format for the response. +titAlt :: Lens' TableImportTable' Text +titAlt = lens _titAlt (\ s a -> s{_titAlt = a}) + +instance GoogleRequest TableImportTable' where + type Rs TableImportTable' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableImportTable{..} + = go _titQuotaUser _titPrettyPrint _titUserIp _titKey + (Just _titName) + _titOauthToken + _titDelimiter + _titEncoding + _titFields + _titAlt + where go + = clientWithRoute + (Proxy :: Proxy TableImportTableAPI) + r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Insert.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Insert.hs new file mode 100644 index 000000000..ea713b108 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new table. +-- +-- /See:/ for @FusiontablesTableInsert@. +module FusionTables.Table.Insert + ( + -- * REST Resource + TableInsertAPI + + -- * Creating a Request + , tableInsert + , TableInsert + + -- * Request Lenses + , tabQuotaUser + , tabPrettyPrint + , tabUserIp + , tabKey + , tabOauthToken + , tabFields + , tabAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableInsert@ which the +-- 'TableInsert' request conforms to. +type TableInsertAPI = "tables" :> Post '[JSON] Table + +-- | Creates a new table. +-- +-- /See:/ 'tableInsert' smart constructor. +data TableInsert = TableInsert + { _tabQuotaUser :: !(Maybe Text) + , _tabPrettyPrint :: !Bool + , _tabUserIp :: !(Maybe Text) + , _tabKey :: !(Maybe Text) + , _tabOauthToken :: !(Maybe Text) + , _tabFields :: !(Maybe Text) + , _tabAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tabQuotaUser' +-- +-- * 'tabPrettyPrint' +-- +-- * 'tabUserIp' +-- +-- * 'tabKey' +-- +-- * 'tabOauthToken' +-- +-- * 'tabFields' +-- +-- * 'tabAlt' +tableInsert + :: TableInsert +tableInsert = + TableInsert + { _tabQuotaUser = Nothing + , _tabPrettyPrint = True + , _tabUserIp = Nothing + , _tabKey = Nothing + , _tabOauthToken = Nothing + , _tabFields = Nothing + , _tabAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tabQuotaUser :: Lens' TableInsert' (Maybe Text) +tabQuotaUser + = lens _tabQuotaUser (\ s a -> s{_tabQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tabPrettyPrint :: Lens' TableInsert' Bool +tabPrettyPrint + = lens _tabPrettyPrint + (\ s a -> s{_tabPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tabUserIp :: Lens' TableInsert' (Maybe Text) +tabUserIp + = lens _tabUserIp (\ s a -> s{_tabUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tabKey :: Lens' TableInsert' (Maybe Text) +tabKey = lens _tabKey (\ s a -> s{_tabKey = a}) + +-- | OAuth 2.0 token for the current user. +tabOauthToken :: Lens' TableInsert' (Maybe Text) +tabOauthToken + = lens _tabOauthToken + (\ s a -> s{_tabOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tabFields :: Lens' TableInsert' (Maybe Text) +tabFields + = lens _tabFields (\ s a -> s{_tabFields = a}) + +-- | Data format for the response. +tabAlt :: Lens' TableInsert' Text +tabAlt = lens _tabAlt (\ s a -> s{_tabAlt = a}) + +instance GoogleRequest TableInsert' where + type Rs TableInsert' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableInsert{..} + = go _tabQuotaUser _tabPrettyPrint _tabUserIp _tabKey + _tabOauthToken + _tabFields + _tabAlt + where go + = clientWithRoute (Proxy :: Proxy TableInsertAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/List.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/List.hs new file mode 100644 index 000000000..6e6194b89 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of tables a user owns. +-- +-- /See:/ for @FusiontablesTableList@. +module FusionTables.Table.List + ( + -- * REST Resource + TableListAPI + + -- * Creating a Request + , tableList + , TableList + + -- * Request Lenses + , tllQuotaUser + , tllPrettyPrint + , tllUserIp + , tllKey + , tllPageToken + , tllOauthToken + , tllMaxResults + , tllFields + , tllAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableList@ which the +-- 'TableList' request conforms to. +type TableListAPI = + "tables" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TableList + +-- | Retrieves a list of tables a user owns. +-- +-- /See:/ 'tableList' smart constructor. +data TableList = TableList + { _tllQuotaUser :: !(Maybe Text) + , _tllPrettyPrint :: !Bool + , _tllUserIp :: !(Maybe Text) + , _tllKey :: !(Maybe Text) + , _tllPageToken :: !(Maybe Text) + , _tllOauthToken :: !(Maybe Text) + , _tllMaxResults :: !(Maybe Word32) + , _tllFields :: !(Maybe Text) + , _tllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tllQuotaUser' +-- +-- * 'tllPrettyPrint' +-- +-- * 'tllUserIp' +-- +-- * 'tllKey' +-- +-- * 'tllPageToken' +-- +-- * 'tllOauthToken' +-- +-- * 'tllMaxResults' +-- +-- * 'tllFields' +-- +-- * 'tllAlt' +tableList + :: TableList +tableList = + TableList + { _tllQuotaUser = Nothing + , _tllPrettyPrint = True + , _tllUserIp = Nothing + , _tllKey = Nothing + , _tllPageToken = Nothing + , _tllOauthToken = Nothing + , _tllMaxResults = Nothing + , _tllFields = Nothing + , _tllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tllQuotaUser :: Lens' TableList' (Maybe Text) +tllQuotaUser + = lens _tllQuotaUser (\ s a -> s{_tllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tllPrettyPrint :: Lens' TableList' Bool +tllPrettyPrint + = lens _tllPrettyPrint + (\ s a -> s{_tllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tllUserIp :: Lens' TableList' (Maybe Text) +tllUserIp + = lens _tllUserIp (\ s a -> s{_tllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tllKey :: Lens' TableList' (Maybe Text) +tllKey = lens _tllKey (\ s a -> s{_tllKey = a}) + +-- | Continuation token specifying which result page to return. +tllPageToken :: Lens' TableList' (Maybe Text) +tllPageToken + = lens _tllPageToken (\ s a -> s{_tllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tllOauthToken :: Lens' TableList' (Maybe Text) +tllOauthToken + = lens _tllOauthToken + (\ s a -> s{_tllOauthToken = a}) + +-- | Maximum number of tables to return. Default is 5. +tllMaxResults :: Lens' TableList' (Maybe Word32) +tllMaxResults + = lens _tllMaxResults + (\ s a -> s{_tllMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tllFields :: Lens' TableList' (Maybe Text) +tllFields + = lens _tllFields (\ s a -> s{_tllFields = a}) + +-- | Data format for the response. +tllAlt :: Lens' TableList' Text +tllAlt = lens _tllAlt (\ s a -> s{_tllAlt = a}) + +instance GoogleRequest TableList' where + type Rs TableList' = TableList + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableList{..} + = go _tllQuotaUser _tllPrettyPrint _tllUserIp _tllKey + _tllPageToken + _tllOauthToken + _tllMaxResults + _tllFields + _tllAlt + where go + = clientWithRoute (Proxy :: Proxy TableListAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Patch.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Patch.hs new file mode 100644 index 000000000..424b0215c --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Patch.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing table. Unless explicitly requested, only the name, +-- description, and attribution will be updated. This method supports patch +-- semantics. +-- +-- /See:/ for @FusiontablesTablePatch@. +module FusionTables.Table.Patch + ( + -- * REST Resource + TablePatchAPI + + -- * Creating a Request + , tablePatch + , TablePatch + + -- * Request Lenses + , tppQuotaUser + , tppPrettyPrint + , tppUserIp + , tppReplaceViewDefinition + , tppKey + , tppOauthToken + , tppTableId + , tppFields + , tppAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTablePatch@ which the +-- 'TablePatch' request conforms to. +type TablePatchAPI = + "tables" :> + Capture "tableId" Text :> + QueryParam "replaceViewDefinition" Bool :> + Patch '[JSON] Table + +-- | Updates an existing table. Unless explicitly requested, only the name, +-- description, and attribution will be updated. This method supports patch +-- semantics. +-- +-- /See:/ 'tablePatch' smart constructor. +data TablePatch = TablePatch + { _tppQuotaUser :: !(Maybe Text) + , _tppPrettyPrint :: !Bool + , _tppUserIp :: !(Maybe Text) + , _tppReplaceViewDefinition :: !(Maybe Bool) + , _tppKey :: !(Maybe Text) + , _tppOauthToken :: !(Maybe Text) + , _tppTableId :: !Text + , _tppFields :: !(Maybe Text) + , _tppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tppQuotaUser' +-- +-- * 'tppPrettyPrint' +-- +-- * 'tppUserIp' +-- +-- * 'tppReplaceViewDefinition' +-- +-- * 'tppKey' +-- +-- * 'tppOauthToken' +-- +-- * 'tppTableId' +-- +-- * 'tppFields' +-- +-- * 'tppAlt' +tablePatch + :: Text -- ^ 'tableId' + -> TablePatch +tablePatch pTppTableId_ = + TablePatch + { _tppQuotaUser = Nothing + , _tppPrettyPrint = True + , _tppUserIp = Nothing + , _tppReplaceViewDefinition = Nothing + , _tppKey = Nothing + , _tppOauthToken = Nothing + , _tppTableId = pTppTableId_ + , _tppFields = Nothing + , _tppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tppQuotaUser :: Lens' TablePatch' (Maybe Text) +tppQuotaUser + = lens _tppQuotaUser (\ s a -> s{_tppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tppPrettyPrint :: Lens' TablePatch' Bool +tppPrettyPrint + = lens _tppPrettyPrint + (\ s a -> s{_tppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tppUserIp :: Lens' TablePatch' (Maybe Text) +tppUserIp + = lens _tppUserIp (\ s a -> s{_tppUserIp = a}) + +-- | Whether the view definition is also updated. The specified view +-- definition replaces the existing one. Only a view can be updated with a +-- new definition. +tppReplaceViewDefinition :: Lens' TablePatch' (Maybe Bool) +tppReplaceViewDefinition + = lens _tppReplaceViewDefinition + (\ s a -> s{_tppReplaceViewDefinition = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tppKey :: Lens' TablePatch' (Maybe Text) +tppKey = lens _tppKey (\ s a -> s{_tppKey = a}) + +-- | OAuth 2.0 token for the current user. +tppOauthToken :: Lens' TablePatch' (Maybe Text) +tppOauthToken + = lens _tppOauthToken + (\ s a -> s{_tppOauthToken = a}) + +-- | ID of the table that is being updated. +tppTableId :: Lens' TablePatch' Text +tppTableId + = lens _tppTableId (\ s a -> s{_tppTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tppFields :: Lens' TablePatch' (Maybe Text) +tppFields + = lens _tppFields (\ s a -> s{_tppFields = a}) + +-- | Data format for the response. +tppAlt :: Lens' TablePatch' Text +tppAlt = lens _tppAlt (\ s a -> s{_tppAlt = a}) + +instance GoogleRequest TablePatch' where + type Rs TablePatch' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TablePatch{..} + = go _tppQuotaUser _tppPrettyPrint _tppUserIp + _tppReplaceViewDefinition + _tppKey + _tppOauthToken + _tppTableId + _tppFields + _tppAlt + where go + = clientWithRoute (Proxy :: Proxy TablePatchAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ReplaceRows.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ReplaceRows.hs new file mode 100644 index 000000000..5fdbe423d --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/ReplaceRows.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.ReplaceRows +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Replaces rows of an existing table. Current rows remain visible until +-- all replacement rows are ready. +-- +-- /See:/ for @FusiontablesTableReplaceRows@. +module FusionTables.Table.ReplaceRows + ( + -- * REST Resource + TableReplaceRowsAPI + + -- * Creating a Request + , tableReplaceRows + , TableReplaceRows + + -- * Request Lenses + , trrQuotaUser + , trrPrettyPrint + , trrUserIp + , trrStartLine + , trrEndLine + , trrKey + , trrOauthToken + , trrTableId + , trrDelimiter + , trrEncoding + , trrIsStrict + , trrFields + , trrAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableReplaceRows@ which the +-- 'TableReplaceRows' request conforms to. +type TableReplaceRowsAPI = + "tables" :> + Capture "tableId" Text :> + "replace" :> + QueryParam "startLine" Int32 :> + QueryParam "endLine" Int32 :> + QueryParam "delimiter" Text :> + QueryParam "encoding" Text :> + QueryParam "isStrict" Bool :> Post '[JSON] Task + +-- | Replaces rows of an existing table. Current rows remain visible until +-- all replacement rows are ready. +-- +-- /See:/ 'tableReplaceRows' smart constructor. +data TableReplaceRows = TableReplaceRows + { _trrQuotaUser :: !(Maybe Text) + , _trrPrettyPrint :: !Bool + , _trrUserIp :: !(Maybe Text) + , _trrStartLine :: !(Maybe Int32) + , _trrEndLine :: !(Maybe Int32) + , _trrKey :: !(Maybe Text) + , _trrOauthToken :: !(Maybe Text) + , _trrTableId :: !Text + , _trrDelimiter :: !(Maybe Text) + , _trrEncoding :: !(Maybe Text) + , _trrIsStrict :: !(Maybe Bool) + , _trrFields :: !(Maybe Text) + , _trrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableReplaceRows'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trrQuotaUser' +-- +-- * 'trrPrettyPrint' +-- +-- * 'trrUserIp' +-- +-- * 'trrStartLine' +-- +-- * 'trrEndLine' +-- +-- * 'trrKey' +-- +-- * 'trrOauthToken' +-- +-- * 'trrTableId' +-- +-- * 'trrDelimiter' +-- +-- * 'trrEncoding' +-- +-- * 'trrIsStrict' +-- +-- * 'trrFields' +-- +-- * 'trrAlt' +tableReplaceRows + :: Text -- ^ 'tableId' + -> TableReplaceRows +tableReplaceRows pTrrTableId_ = + TableReplaceRows + { _trrQuotaUser = Nothing + , _trrPrettyPrint = True + , _trrUserIp = Nothing + , _trrStartLine = Nothing + , _trrEndLine = Nothing + , _trrKey = Nothing + , _trrOauthToken = Nothing + , _trrTableId = pTrrTableId_ + , _trrDelimiter = Nothing + , _trrEncoding = Nothing + , _trrIsStrict = Nothing + , _trrFields = Nothing + , _trrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +trrQuotaUser :: Lens' TableReplaceRows' (Maybe Text) +trrQuotaUser + = lens _trrQuotaUser (\ s a -> s{_trrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +trrPrettyPrint :: Lens' TableReplaceRows' Bool +trrPrettyPrint + = lens _trrPrettyPrint + (\ s a -> s{_trrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +trrUserIp :: Lens' TableReplaceRows' (Maybe Text) +trrUserIp + = lens _trrUserIp (\ s a -> s{_trrUserIp = a}) + +-- | The index of the first line from which to start importing, inclusive. +-- Default is 0. +trrStartLine :: Lens' TableReplaceRows' (Maybe Int32) +trrStartLine + = lens _trrStartLine (\ s a -> s{_trrStartLine = a}) + +-- | The index of the line up to which data will be imported. Default is to +-- import the entire file. If endLine is negative, it is an offset from the +-- end of the file; the imported content will exclude the last endLine +-- lines. +trrEndLine :: Lens' TableReplaceRows' (Maybe Int32) +trrEndLine + = lens _trrEndLine (\ s a -> s{_trrEndLine = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +trrKey :: Lens' TableReplaceRows' (Maybe Text) +trrKey = lens _trrKey (\ s a -> s{_trrKey = a}) + +-- | OAuth 2.0 token for the current user. +trrOauthToken :: Lens' TableReplaceRows' (Maybe Text) +trrOauthToken + = lens _trrOauthToken + (\ s a -> s{_trrOauthToken = a}) + +-- | Table whose rows will be replaced. +trrTableId :: Lens' TableReplaceRows' Text +trrTableId + = lens _trrTableId (\ s a -> s{_trrTableId = a}) + +-- | The delimiter used to separate cell values. This can only consist of a +-- single character. Default is ,. +trrDelimiter :: Lens' TableReplaceRows' (Maybe Text) +trrDelimiter + = lens _trrDelimiter (\ s a -> s{_trrDelimiter = a}) + +-- | The encoding of the content. Default is UTF-8. Use \'auto-detect\' if +-- you are unsure of the encoding. +trrEncoding :: Lens' TableReplaceRows' (Maybe Text) +trrEncoding + = lens _trrEncoding (\ s a -> s{_trrEncoding = a}) + +-- | Whether the imported CSV must have the same number of column values for +-- each row. If true, throws an exception if the CSV does not have the same +-- number of columns. If false, rows with fewer column values will be +-- padded with empty values. Default is true. +trrIsStrict :: Lens' TableReplaceRows' (Maybe Bool) +trrIsStrict + = lens _trrIsStrict (\ s a -> s{_trrIsStrict = a}) + +-- | Selector specifying which fields to include in a partial response. +trrFields :: Lens' TableReplaceRows' (Maybe Text) +trrFields + = lens _trrFields (\ s a -> s{_trrFields = a}) + +-- | Data format for the response. +trrAlt :: Lens' TableReplaceRows' Text +trrAlt = lens _trrAlt (\ s a -> s{_trrAlt = a}) + +instance GoogleRequest TableReplaceRows' where + type Rs TableReplaceRows' = Task + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableReplaceRows{..} + = go _trrQuotaUser _trrPrettyPrint _trrUserIp + _trrStartLine + _trrEndLine + _trrKey + _trrOauthToken + _trrTableId + _trrDelimiter + _trrEncoding + _trrIsStrict + _trrFields + _trrAlt + where go + = clientWithRoute + (Proxy :: Proxy TableReplaceRowsAPI) + r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Update.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Update.hs new file mode 100644 index 000000000..ece7acc93 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Table/Update.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Table.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing table. Unless explicitly requested, only the name, +-- description, and attribution will be updated. +-- +-- /See:/ for @FusiontablesTableUpdate@. +module FusionTables.Table.Update + ( + -- * REST Resource + TableUpdateAPI + + -- * Creating a Request + , tableUpdate + , TableUpdate + + -- * Request Lenses + , tuuQuotaUser + , tuuPrettyPrint + , tuuUserIp + , tuuReplaceViewDefinition + , tuuKey + , tuuOauthToken + , tuuTableId + , tuuFields + , tuuAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTableUpdate@ which the +-- 'TableUpdate' request conforms to. +type TableUpdateAPI = + "tables" :> + Capture "tableId" Text :> + QueryParam "replaceViewDefinition" Bool :> + Put '[JSON] Table + +-- | Updates an existing table. Unless explicitly requested, only the name, +-- description, and attribution will be updated. +-- +-- /See:/ 'tableUpdate' smart constructor. +data TableUpdate = TableUpdate + { _tuuQuotaUser :: !(Maybe Text) + , _tuuPrettyPrint :: !Bool + , _tuuUserIp :: !(Maybe Text) + , _tuuReplaceViewDefinition :: !(Maybe Bool) + , _tuuKey :: !(Maybe Text) + , _tuuOauthToken :: !(Maybe Text) + , _tuuTableId :: !Text + , _tuuFields :: !(Maybe Text) + , _tuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuuQuotaUser' +-- +-- * 'tuuPrettyPrint' +-- +-- * 'tuuUserIp' +-- +-- * 'tuuReplaceViewDefinition' +-- +-- * 'tuuKey' +-- +-- * 'tuuOauthToken' +-- +-- * 'tuuTableId' +-- +-- * 'tuuFields' +-- +-- * 'tuuAlt' +tableUpdate + :: Text -- ^ 'tableId' + -> TableUpdate +tableUpdate pTuuTableId_ = + TableUpdate + { _tuuQuotaUser = Nothing + , _tuuPrettyPrint = True + , _tuuUserIp = Nothing + , _tuuReplaceViewDefinition = Nothing + , _tuuKey = Nothing + , _tuuOauthToken = Nothing + , _tuuTableId = pTuuTableId_ + , _tuuFields = Nothing + , _tuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuuQuotaUser :: Lens' TableUpdate' (Maybe Text) +tuuQuotaUser + = lens _tuuQuotaUser (\ s a -> s{_tuuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuuPrettyPrint :: Lens' TableUpdate' Bool +tuuPrettyPrint + = lens _tuuPrettyPrint + (\ s a -> s{_tuuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuuUserIp :: Lens' TableUpdate' (Maybe Text) +tuuUserIp + = lens _tuuUserIp (\ s a -> s{_tuuUserIp = a}) + +-- | Whether the view definition is also updated. The specified view +-- definition replaces the existing one. Only a view can be updated with a +-- new definition. +tuuReplaceViewDefinition :: Lens' TableUpdate' (Maybe Bool) +tuuReplaceViewDefinition + = lens _tuuReplaceViewDefinition + (\ s a -> s{_tuuReplaceViewDefinition = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuuKey :: Lens' TableUpdate' (Maybe Text) +tuuKey = lens _tuuKey (\ s a -> s{_tuuKey = a}) + +-- | OAuth 2.0 token for the current user. +tuuOauthToken :: Lens' TableUpdate' (Maybe Text) +tuuOauthToken + = lens _tuuOauthToken + (\ s a -> s{_tuuOauthToken = a}) + +-- | ID of the table that is being updated. +tuuTableId :: Lens' TableUpdate' Text +tuuTableId + = lens _tuuTableId (\ s a -> s{_tuuTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tuuFields :: Lens' TableUpdate' (Maybe Text) +tuuFields + = lens _tuuFields (\ s a -> s{_tuuFields = a}) + +-- | Data format for the response. +tuuAlt :: Lens' TableUpdate' Text +tuuAlt = lens _tuuAlt (\ s a -> s{_tuuAlt = a}) + +instance GoogleRequest TableUpdate' where + type Rs TableUpdate' = Table + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TableUpdate{..} + = go _tuuQuotaUser _tuuPrettyPrint _tuuUserIp + _tuuReplaceViewDefinition + _tuuKey + _tuuOauthToken + _tuuTableId + _tuuFields + _tuuAlt + where go + = clientWithRoute (Proxy :: Proxy TableUpdateAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Delete.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Delete.hs new file mode 100644 index 000000000..a8e467337 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Delete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Task.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a specific task by its ID, unless that task has already started +-- running. +-- +-- /See:/ for @FusiontablesTaskDelete@. +module FusionTables.Task.Delete + ( + -- * REST Resource + TaskDeleteAPI + + -- * Creating a Request + , taskDelete + , TaskDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdTaskId + , tdUserIp + , tdKey + , tdOauthToken + , tdTableId + , tdFields + , tdAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTaskDelete@ which the +-- 'TaskDelete' request conforms to. +type TaskDeleteAPI = + "tables" :> + Capture "tableId" Text :> + "tasks" :> Capture "taskId" Text :> Delete '[JSON] () + +-- | Deletes a specific task by its ID, unless that task has already started +-- running. +-- +-- /See:/ 'taskDelete' smart constructor. +data TaskDelete = TaskDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdTaskId :: !Text + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdOauthToken :: !(Maybe Text) + , _tdTableId :: !Text + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdTaskId' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdOauthToken' +-- +-- * 'tdTableId' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +taskDelete + :: Text -- ^ 'taskId' + -> Text -- ^ 'tableId' + -> TaskDelete +taskDelete pTdTaskId_ pTdTableId_ = + TaskDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdTaskId = pTdTaskId_ + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdOauthToken = Nothing + , _tdTableId = pTdTableId_ + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TaskDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TaskDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | The identifier of the task to delete. +tdTaskId :: Lens' TaskDelete' Text +tdTaskId = lens _tdTaskId (\ s a -> s{_tdTaskId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TaskDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TaskDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TaskDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Table from which the task is being deleted. +tdTableId :: Lens' TaskDelete' Text +tdTableId + = lens _tdTableId (\ s a -> s{_tdTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TaskDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TaskDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TaskDelete' where + type Rs TaskDelete' = () + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TaskDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdTaskId _tdUserIp + _tdKey + _tdOauthToken + _tdTableId + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TaskDeleteAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Get.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Get.hs new file mode 100644 index 000000000..7f762e766 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Task.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a specific task by its ID. +-- +-- /See:/ for @FusiontablesTaskGet@. +module FusionTables.Task.Get + ( + -- * REST Resource + TaskGetAPI + + -- * Creating a Request + , taskGet + , TaskGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgTaskId + , tgUserIp + , tgKey + , tgOauthToken + , tgTableId + , tgFields + , tgAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTaskGet@ which the +-- 'TaskGet' request conforms to. +type TaskGetAPI = + "tables" :> + Capture "tableId" Text :> + "tasks" :> Capture "taskId" Text :> Get '[JSON] Task + +-- | Retrieves a specific task by its ID. +-- +-- /See:/ 'taskGet' smart constructor. +data TaskGet = TaskGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgTaskId :: !Text + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgOauthToken :: !(Maybe Text) + , _tgTableId :: !Text + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgTaskId' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgOauthToken' +-- +-- * 'tgTableId' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +taskGet + :: Text -- ^ 'taskId' + -> Text -- ^ 'tableId' + -> TaskGet +taskGet pTgTaskId_ pTgTableId_ = + TaskGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgTaskId = pTgTaskId_ + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgOauthToken = Nothing + , _tgTableId = pTgTableId_ + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TaskGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TaskGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | The identifier of the task to get. +tgTaskId :: Lens' TaskGet' Text +tgTaskId = lens _tgTaskId (\ s a -> s{_tgTaskId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TaskGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TaskGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TaskGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Table to which the task belongs. +tgTableId :: Lens' TaskGet' Text +tgTableId + = lens _tgTableId (\ s a -> s{_tgTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TaskGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TaskGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TaskGet' where + type Rs TaskGet' = Task + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TaskGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgTaskId _tgUserIp + _tgKey + _tgOauthToken + _tgTableId + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TaskGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/List.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/List.hs new file mode 100644 index 000000000..309ecce78 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Task/List.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Task.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of tasks. +-- +-- /See:/ for @FusiontablesTaskList@. +module FusionTables.Task.List + ( + -- * REST Resource + TaskListAPI + + -- * Creating a Request + , taskList + , TaskList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlKey + , tlPageToken + , tlOauthToken + , tlTableId + , tlStartIndex + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTaskList@ which the +-- 'TaskList' request conforms to. +type TaskListAPI = + "tables" :> + Capture "tableId" Text :> + "tasks" :> + QueryParam "pageToken" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TaskList + +-- | Retrieves a list of tasks. +-- +-- /See:/ 'taskList' smart constructor. +data TaskList = TaskList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlTableId :: !Text + , _tlStartIndex :: !(Maybe Word32) + , _tlMaxResults :: !(Maybe Word32) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaskList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlTableId' +-- +-- * 'tlStartIndex' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +taskList + :: Text -- ^ 'tableId' + -> TaskList +taskList pTlTableId_ = + TaskList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlTableId = pTlTableId_ + , _tlStartIndex = Nothing + , _tlMaxResults = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TaskList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TaskList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TaskList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TaskList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Continuation token specifying which result page to return. +tlPageToken :: Lens' TaskList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TaskList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Table whose tasks are being listed. +tlTableId :: Lens' TaskList' Text +tlTableId + = lens _tlTableId (\ s a -> s{_tlTableId = a}) + +-- | Index of the first result returned in the current page. +tlStartIndex :: Lens' TaskList' (Maybe Word32) +tlStartIndex + = lens _tlStartIndex (\ s a -> s{_tlStartIndex = a}) + +-- | Maximum number of tasks to return. Default is 5. +tlMaxResults :: Lens' TaskList' (Maybe Word32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TaskList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TaskList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TaskList' where + type Rs TaskList' = TaskList + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TaskList{..} + = go _tlQuotaUser _tlPrettyPrint _tlUserIp _tlKey + _tlPageToken + _tlOauthToken + _tlTableId + _tlStartIndex + _tlMaxResults + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TaskListAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Delete.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Delete.hs new file mode 100644 index 000000000..4475d566a --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a template +-- +-- /See:/ for @FusiontablesTemplateDelete@. +module FusionTables.Template.Delete + ( + -- * REST Resource + TemplateDeleteAPI + + -- * Creating a Request + , templateDelete + , TemplateDelete + + -- * Request Lenses + , tddQuotaUser + , tddPrettyPrint + , tddTemplateId + , tddUserIp + , tddKey + , tddOauthToken + , tddTableId + , tddFields + , tddAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplateDelete@ which the +-- 'TemplateDelete' request conforms to. +type TemplateDeleteAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> + Capture "templateId" Int32 :> Delete '[JSON] () + +-- | Deletes a template +-- +-- /See:/ 'templateDelete' smart constructor. +data TemplateDelete = TemplateDelete + { _tddQuotaUser :: !(Maybe Text) + , _tddPrettyPrint :: !Bool + , _tddTemplateId :: !Int32 + , _tddUserIp :: !(Maybe Text) + , _tddKey :: !(Maybe Text) + , _tddOauthToken :: !(Maybe Text) + , _tddTableId :: !Text + , _tddFields :: !(Maybe Text) + , _tddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tddQuotaUser' +-- +-- * 'tddPrettyPrint' +-- +-- * 'tddTemplateId' +-- +-- * 'tddUserIp' +-- +-- * 'tddKey' +-- +-- * 'tddOauthToken' +-- +-- * 'tddTableId' +-- +-- * 'tddFields' +-- +-- * 'tddAlt' +templateDelete + :: Int32 -- ^ 'templateId' + -> Text -- ^ 'tableId' + -> TemplateDelete +templateDelete pTddTemplateId_ pTddTableId_ = + TemplateDelete + { _tddQuotaUser = Nothing + , _tddPrettyPrint = True + , _tddTemplateId = pTddTemplateId_ + , _tddUserIp = Nothing + , _tddKey = Nothing + , _tddOauthToken = Nothing + , _tddTableId = pTddTableId_ + , _tddFields = Nothing + , _tddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tddQuotaUser :: Lens' TemplateDelete' (Maybe Text) +tddQuotaUser + = lens _tddQuotaUser (\ s a -> s{_tddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tddPrettyPrint :: Lens' TemplateDelete' Bool +tddPrettyPrint + = lens _tddPrettyPrint + (\ s a -> s{_tddPrettyPrint = a}) + +-- | Identifier for the template which is being deleted +tddTemplateId :: Lens' TemplateDelete' Int32 +tddTemplateId + = lens _tddTemplateId + (\ s a -> s{_tddTemplateId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tddUserIp :: Lens' TemplateDelete' (Maybe Text) +tddUserIp + = lens _tddUserIp (\ s a -> s{_tddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tddKey :: Lens' TemplateDelete' (Maybe Text) +tddKey = lens _tddKey (\ s a -> s{_tddKey = a}) + +-- | OAuth 2.0 token for the current user. +tddOauthToken :: Lens' TemplateDelete' (Maybe Text) +tddOauthToken + = lens _tddOauthToken + (\ s a -> s{_tddOauthToken = a}) + +-- | Table from which the template is being deleted +tddTableId :: Lens' TemplateDelete' Text +tddTableId + = lens _tddTableId (\ s a -> s{_tddTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tddFields :: Lens' TemplateDelete' (Maybe Text) +tddFields + = lens _tddFields (\ s a -> s{_tddFields = a}) + +-- | Data format for the response. +tddAlt :: Lens' TemplateDelete' Text +tddAlt = lens _tddAlt (\ s a -> s{_tddAlt = a}) + +instance GoogleRequest TemplateDelete' where + type Rs TemplateDelete' = () + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplateDelete{..} + = go _tddQuotaUser _tddPrettyPrint _tddTemplateId + _tddUserIp + _tddKey + _tddOauthToken + _tddTableId + _tddFields + _tddAlt + where go + = clientWithRoute (Proxy :: Proxy TemplateDeleteAPI) + r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Get.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Get.hs new file mode 100644 index 000000000..5bbf05003 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Get.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a specific template by its id +-- +-- /See:/ for @FusiontablesTemplateGet@. +module FusionTables.Template.Get + ( + -- * REST Resource + TemplateGetAPI + + -- * Creating a Request + , templateGet + , TemplateGet + + -- * Request Lenses + , temQuotaUser + , temPrettyPrint + , temTemplateId + , temUserIp + , temKey + , temOauthToken + , temTableId + , temFields + , temAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplateGet@ which the +-- 'TemplateGet' request conforms to. +type TemplateGetAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> + Capture "templateId" Int32 :> Get '[JSON] Template + +-- | Retrieves a specific template by its id +-- +-- /See:/ 'templateGet' smart constructor. +data TemplateGet = TemplateGet + { _temQuotaUser :: !(Maybe Text) + , _temPrettyPrint :: !Bool + , _temTemplateId :: !Int32 + , _temUserIp :: !(Maybe Text) + , _temKey :: !(Maybe Text) + , _temOauthToken :: !(Maybe Text) + , _temTableId :: !Text + , _temFields :: !(Maybe Text) + , _temAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'temQuotaUser' +-- +-- * 'temPrettyPrint' +-- +-- * 'temTemplateId' +-- +-- * 'temUserIp' +-- +-- * 'temKey' +-- +-- * 'temOauthToken' +-- +-- * 'temTableId' +-- +-- * 'temFields' +-- +-- * 'temAlt' +templateGet + :: Int32 -- ^ 'templateId' + -> Text -- ^ 'tableId' + -> TemplateGet +templateGet pTemTemplateId_ pTemTableId_ = + TemplateGet + { _temQuotaUser = Nothing + , _temPrettyPrint = True + , _temTemplateId = pTemTemplateId_ + , _temUserIp = Nothing + , _temKey = Nothing + , _temOauthToken = Nothing + , _temTableId = pTemTableId_ + , _temFields = Nothing + , _temAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +temQuotaUser :: Lens' TemplateGet' (Maybe Text) +temQuotaUser + = lens _temQuotaUser (\ s a -> s{_temQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +temPrettyPrint :: Lens' TemplateGet' Bool +temPrettyPrint + = lens _temPrettyPrint + (\ s a -> s{_temPrettyPrint = a}) + +-- | Identifier for the template that is being requested +temTemplateId :: Lens' TemplateGet' Int32 +temTemplateId + = lens _temTemplateId + (\ s a -> s{_temTemplateId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +temUserIp :: Lens' TemplateGet' (Maybe Text) +temUserIp + = lens _temUserIp (\ s a -> s{_temUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +temKey :: Lens' TemplateGet' (Maybe Text) +temKey = lens _temKey (\ s a -> s{_temKey = a}) + +-- | OAuth 2.0 token for the current user. +temOauthToken :: Lens' TemplateGet' (Maybe Text) +temOauthToken + = lens _temOauthToken + (\ s a -> s{_temOauthToken = a}) + +-- | Table to which the template belongs +temTableId :: Lens' TemplateGet' Text +temTableId + = lens _temTableId (\ s a -> s{_temTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +temFields :: Lens' TemplateGet' (Maybe Text) +temFields + = lens _temFields (\ s a -> s{_temFields = a}) + +-- | Data format for the response. +temAlt :: Lens' TemplateGet' Text +temAlt = lens _temAlt (\ s a -> s{_temAlt = a}) + +instance GoogleRequest TemplateGet' where + type Rs TemplateGet' = Template + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplateGet{..} + = go _temQuotaUser _temPrettyPrint _temTemplateId + _temUserIp + _temKey + _temOauthToken + _temTableId + _temFields + _temAlt + where go + = clientWithRoute (Proxy :: Proxy TemplateGetAPI) r u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Insert.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Insert.hs new file mode 100644 index 000000000..3ea087c8d --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new template for the table. +-- +-- /See:/ for @FusiontablesTemplateInsert@. +module FusionTables.Template.Insert + ( + -- * REST Resource + TemplateInsertAPI + + -- * Creating a Request + , templateInsert + , TemplateInsert + + -- * Request Lenses + , tiQuotaUser + , tiPrettyPrint + , tiUserIp + , tiKey + , tiOauthToken + , tiTableId + , tiFields + , tiAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplateInsert@ which the +-- 'TemplateInsert' request conforms to. +type TemplateInsertAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> Post '[JSON] Template + +-- | Creates a new template for the table. +-- +-- /See:/ 'templateInsert' smart constructor. +data TemplateInsert = TemplateInsert + { _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiOauthToken :: !(Maybe Text) + , _tiTableId :: !Text + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiOauthToken' +-- +-- * 'tiTableId' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +templateInsert + :: Text -- ^ 'tableId' + -> TemplateInsert +templateInsert pTiTableId_ = + TemplateInsert + { _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiOauthToken = Nothing + , _tiTableId = pTiTableId_ + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TemplateInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TemplateInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TemplateInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TemplateInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TemplateInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Table for which a new template is being created +tiTableId :: Lens' TemplateInsert' Text +tiTableId + = lens _tiTableId (\ s a -> s{_tiTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TemplateInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TemplateInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TemplateInsert' where + type Rs TemplateInsert' = Template + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplateInsert{..} + = go _tiQuotaUser _tiPrettyPrint _tiUserIp _tiKey + _tiOauthToken + _tiTableId + _tiFields + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TemplateInsertAPI) + r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/List.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/List.hs new file mode 100644 index 000000000..a98cce4d9 --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/List.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of templates. +-- +-- /See:/ for @FusiontablesTemplateList@. +module FusionTables.Template.List + ( + -- * REST Resource + TemplateListAPI + + -- * Creating a Request + , templateList + , TemplateList + + -- * Request Lenses + , tQuotaUser + , tPrettyPrint + , tUserIp + , tKey + , tPageToken + , tOauthToken + , tTableId + , tMaxResults + , tFields + , tAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplateList@ which the +-- 'TemplateList' request conforms to. +type TemplateListAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] TemplateList + +-- | Retrieves a list of templates. +-- +-- /See:/ 'templateList' smart constructor. +data TemplateList = TemplateList + { _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tUserIp :: !(Maybe Text) + , _tKey :: !(Maybe Text) + , _tPageToken :: !(Maybe Text) + , _tOauthToken :: !(Maybe Text) + , _tTableId :: !Text + , _tMaxResults :: !(Maybe Word32) + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tUserIp' +-- +-- * 'tKey' +-- +-- * 'tPageToken' +-- +-- * 'tOauthToken' +-- +-- * 'tTableId' +-- +-- * 'tMaxResults' +-- +-- * 'tFields' +-- +-- * 'tAlt' +templateList + :: Text -- ^ 'tableId' + -> TemplateList +templateList pTTableId_ = + TemplateList + { _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tUserIp = Nothing + , _tKey = Nothing + , _tPageToken = Nothing + , _tOauthToken = Nothing + , _tTableId = pTTableId_ + , _tMaxResults = Nothing + , _tFields = Nothing + , _tAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TemplateList' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TemplateList' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TemplateList' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TemplateList' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | Continuation token specifying which results page to return. Optional. +tPageToken :: Lens' TemplateList' (Maybe Text) +tPageToken + = lens _tPageToken (\ s a -> s{_tPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TemplateList' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | Identifier for the table whose templates are being requested +tTableId :: Lens' TemplateList' Text +tTableId = lens _tTableId (\ s a -> s{_tTableId = a}) + +-- | Maximum number of templates to return. Optional. Default is 5. +tMaxResults :: Lens' TemplateList' (Maybe Word32) +tMaxResults + = lens _tMaxResults (\ s a -> s{_tMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TemplateList' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TemplateList' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TemplateList' where + type Rs TemplateList' = TemplateList + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplateList{..} + = go _tQuotaUser _tPrettyPrint _tUserIp _tKey + _tPageToken + _tOauthToken + _tTableId + _tMaxResults + _tFields + _tAlt + where go + = clientWithRoute (Proxy :: Proxy TemplateListAPI) r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Patch.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Patch.hs new file mode 100644 index 000000000..1e24e8e3e --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing template. This method supports patch semantics. +-- +-- /See:/ for @FusiontablesTemplatePatch@. +module FusionTables.Template.Patch + ( + -- * REST Resource + TemplatePatchAPI + + -- * Creating a Request + , templatePatch + , TemplatePatch + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpTemplateId + , tpUserIp + , tpKey + , tpOauthToken + , tpTableId + , tpFields + , tpAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplatePatch@ which the +-- 'TemplatePatch' request conforms to. +type TemplatePatchAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> + Capture "templateId" Int32 :> Patch '[JSON] Template + +-- | Updates an existing template. This method supports patch semantics. +-- +-- /See:/ 'templatePatch' smart constructor. +data TemplatePatch = TemplatePatch + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpTemplateId :: !Int32 + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpOauthToken :: !(Maybe Text) + , _tpTableId :: !Text + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplatePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpTemplateId' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpOauthToken' +-- +-- * 'tpTableId' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +templatePatch + :: Int32 -- ^ 'templateId' + -> Text -- ^ 'tableId' + -> TemplatePatch +templatePatch pTpTemplateId_ pTpTableId_ = + TemplatePatch + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpTemplateId = pTpTemplateId_ + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpOauthToken = Nothing + , _tpTableId = pTpTableId_ + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TemplatePatch' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TemplatePatch' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | Identifier for the template that is being updated +tpTemplateId :: Lens' TemplatePatch' Int32 +tpTemplateId + = lens _tpTemplateId (\ s a -> s{_tpTemplateId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TemplatePatch' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TemplatePatch' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TemplatePatch' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Table to which the updated template belongs +tpTableId :: Lens' TemplatePatch' Text +tpTableId + = lens _tpTableId (\ s a -> s{_tpTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TemplatePatch' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TemplatePatch' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TemplatePatch' where + type Rs TemplatePatch' = Template + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplatePatch{..} + = go _tpQuotaUser _tpPrettyPrint _tpTemplateId + _tpUserIp + _tpKey + _tpOauthToken + _tpTableId + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TemplatePatchAPI) r + u diff --git a/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Update.hs b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Update.hs new file mode 100644 index 000000000..534371a8f --- /dev/null +++ b/gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Update.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.FusionTables.Template.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing template +-- +-- /See:/ for @FusiontablesTemplateUpdate@. +module FusionTables.Template.Update + ( + -- * REST Resource + TemplateUpdateAPI + + -- * Creating a Request + , templateUpdate + , TemplateUpdate + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuTemplateId + , tuUserIp + , tuKey + , tuOauthToken + , tuTableId + , tuFields + , tuAlt + ) where + +import Network.Google.FusionTables.Types +import Network.Google.Prelude + +-- | A resource alias for @FusiontablesTemplateUpdate@ which the +-- 'TemplateUpdate' request conforms to. +type TemplateUpdateAPI = + "tables" :> + Capture "tableId" Text :> + "templates" :> + Capture "templateId" Int32 :> Put '[JSON] Template + +-- | Updates an existing template +-- +-- /See:/ 'templateUpdate' smart constructor. +data TemplateUpdate = TemplateUpdate + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuTemplateId :: !Int32 + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuOauthToken :: !(Maybe Text) + , _tuTableId :: !Text + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TemplateUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuTemplateId' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuOauthToken' +-- +-- * 'tuTableId' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +templateUpdate + :: Int32 -- ^ 'templateId' + -> Text -- ^ 'tableId' + -> TemplateUpdate +templateUpdate pTuTemplateId_ pTuTableId_ = + TemplateUpdate + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuTemplateId = pTuTemplateId_ + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuOauthToken = Nothing + , _tuTableId = pTuTableId_ + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TemplateUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TemplateUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | Identifier for the template that is being updated +tuTemplateId :: Lens' TemplateUpdate' Int32 +tuTemplateId + = lens _tuTemplateId (\ s a -> s{_tuTemplateId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TemplateUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TemplateUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TemplateUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Table to which the updated template belongs +tuTableId :: Lens' TemplateUpdate' Text +tuTableId + = lens _tuTableId (\ s a -> s{_tuTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TemplateUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TemplateUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TemplateUpdate' where + type Rs TemplateUpdate' = Template + request = requestWithRoute defReq fusionTablesURL + requestWithRoute r u TemplateUpdate{..} + = go _tuQuotaUser _tuPrettyPrint _tuTemplateId + _tuUserIp + _tuKey + _tuOauthToken + _tuTableId + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TemplateUpdateAPI) + r + u diff --git a/gogol-fusiontables/gogol-fusiontables.cabal b/gogol-fusiontables/gogol-fusiontables.cabal new file mode 100644 index 000000000..f3e81f6a6 --- /dev/null +++ b/gogol-fusiontables/gogol-fusiontables.cabal @@ -0,0 +1,75 @@ +name: gogol-fusiontables +version: 0.0.1 +synopsis: Fusion Tables API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for working with Fusion Tables data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.FusionTables + , Network.Google.FusionTables.Types + , Network.Google.Resource.FusionTables.Column.Delete + , Network.Google.Resource.FusionTables.Column.Get + , Network.Google.Resource.FusionTables.Column.Insert + , Network.Google.Resource.FusionTables.Column.List + , Network.Google.Resource.FusionTables.Column.Patch + , Network.Google.Resource.FusionTables.Column.Update + , Network.Google.Resource.FusionTables.Query.Sql + , Network.Google.Resource.FusionTables.Query.SqlGet + , Network.Google.Resource.FusionTables.Style.Delete + , Network.Google.Resource.FusionTables.Style.Get + , Network.Google.Resource.FusionTables.Style.Insert + , Network.Google.Resource.FusionTables.Style.List + , Network.Google.Resource.FusionTables.Style.Patch + , Network.Google.Resource.FusionTables.Style.Update + , Network.Google.Resource.FusionTables.Table.Copy + , Network.Google.Resource.FusionTables.Table.Delete + , Network.Google.Resource.FusionTables.Table.Get + , Network.Google.Resource.FusionTables.Table.ImportRows + , Network.Google.Resource.FusionTables.Table.ImportTable + , Network.Google.Resource.FusionTables.Table.Insert + , Network.Google.Resource.FusionTables.Table.List + , Network.Google.Resource.FusionTables.Table.Patch + , Network.Google.Resource.FusionTables.Table.ReplaceRows + , Network.Google.Resource.FusionTables.Table.Update + , Network.Google.Resource.FusionTables.Task.Delete + , Network.Google.Resource.FusionTables.Task.Get + , Network.Google.Resource.FusionTables.Task.List + , Network.Google.Resource.FusionTables.Template.Delete + , Network.Google.Resource.FusionTables.Template.Get + , Network.Google.Resource.FusionTables.Template.Insert + , Network.Google.Resource.FusionTables.Template.List + , Network.Google.Resource.FusionTables.Template.Patch + , Network.Google.Resource.FusionTables.Template.Update + + other-modules: + Network.Google.FusionTables.Types.Product + , Network.Google.FusionTables.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-fusiontables/src/.gitkeep b/gogol-fusiontables/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-games-appstate/LICENSE b/gogol-games-appstate/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-games-appstate/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-games-appstate/Makefile b/gogol-games-appstate/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-games-appstate/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-games-appstate/README.md b/gogol-games-appstate/README.md new file mode 100644 index 000000000..452a8f53b --- /dev/null +++ b/gogol-games-appstate/README.md @@ -0,0 +1,28 @@ +# gogol-games-appstate + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google App State API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-games-appstate` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-games-appstate/Setup.hs b/gogol-games-appstate/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-games-appstate/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-games-appstate/gen/Network/Google/GamesAppState.hs b/gogol-games-appstate/gen/Network/Google/GamesAppState.hs new file mode 100644 index 000000000..2dc172589 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/GamesAppState.hs @@ -0,0 +1,90 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.GamesAppState +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google App State API. +-- +-- /See:/ +module Network.Google.GamesAppState + ( + -- * API + GamesAppStateAPI + , gamesAppStateAPI + , gamesAppStateURL + + -- * Service Methods + + -- * REST Resources + + -- ** AppstateStatesClear + , module Appstate.States.Clear + + -- ** AppstateStatesDelete + , module Appstate.States.Delete + + -- ** AppstateStatesGet + , module Appstate.States.Get + + -- ** AppstateStatesList + , module Appstate.States.List + + -- ** AppstateStatesUpdate + , module Appstate.States.Update + + -- * Types + + -- ** WriteResult + , WriteResult + , writeResult + , wrCurrentStateVersion + , wrKind + , wrStateKey + + -- ** ListResponse + , ListResponse + , listResponse + , lrMaximumKeyCount + , lrKind + , lrItems + + -- ** GetResponse + , GetResponse + , getResponse + , grCurrentStateVersion + , grKind + , grData + , grStateKey + + -- ** UpdateRequest + , UpdateRequest + , updateRequest + , urKind + , urData + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude +import Network.Google.Resource.Appstate.States.Clear +import Network.Google.Resource.Appstate.States.Delete +import Network.Google.Resource.Appstate.States.Get +import Network.Google.Resource.Appstate.States.List +import Network.Google.Resource.Appstate.States.Update + +{- $resources +TODO +-} + +type GamesAppStateAPI = States + +gamesAppStateAPI :: Proxy GamesAppStateAPI +gamesAppStateAPI = Proxy diff --git a/gogol-games-appstate/gen/Network/Google/GamesAppState/Types.hs b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types.hs new file mode 100644 index 000000000..c7b01f09e --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types.hs @@ -0,0 +1,58 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesAppState.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesAppState.Types + ( + -- * Service URL + gamesAppStateURL + + -- * WriteResult + , WriteResult + , writeResult + , wrCurrentStateVersion + , wrKind + , wrStateKey + + -- * ListResponse + , ListResponse + , listResponse + , lrMaximumKeyCount + , lrKind + , lrItems + + -- * GetResponse + , GetResponse + , getResponse + , grCurrentStateVersion + , grKind + , grData + , grStateKey + + -- * UpdateRequest + , UpdateRequest + , updateRequest + , urKind + , urData + ) where + +import Network.Google.GamesAppState.Types.Product +import Network.Google.GamesAppState.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google App State API. +gamesAppStateURL :: BaseURL +gamesAppStateURL + = BaseUrl Https + "https://www.googleapis.com/appstate/v1/" + 443 diff --git a/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Product.hs b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Product.hs new file mode 100644 index 000000000..fa048fd68 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Product.hs @@ -0,0 +1,256 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesAppState.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesAppState.Types.Product where + +import Network.Google.GamesAppState.Types.Sum +import Network.Google.Prelude + +-- | This is a JSON template for an app state write result. +-- +-- /See:/ 'writeResult' smart constructor. +data WriteResult = WriteResult + { _wrCurrentStateVersion :: !(Maybe Text) + , _wrKind :: !Text + , _wrStateKey :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrCurrentStateVersion' +-- +-- * 'wrKind' +-- +-- * 'wrStateKey' +writeResult + :: WriteResult +writeResult = + WriteResult + { _wrCurrentStateVersion = Nothing + , _wrKind = "appstate#writeResult" + , _wrStateKey = Nothing + } + +-- | The version of the data for this key on the server. +wrCurrentStateVersion :: Lens' WriteResult (Maybe Text) +wrCurrentStateVersion + = lens _wrCurrentStateVersion + (\ s a -> s{_wrCurrentStateVersion = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string appstate#writeResult. +wrKind :: Lens' WriteResult Text +wrKind = lens _wrKind (\ s a -> s{_wrKind = a}) + +-- | The written key. +wrStateKey :: Lens' WriteResult (Maybe Int32) +wrStateKey + = lens _wrStateKey (\ s a -> s{_wrStateKey = a}) + +instance FromJSON WriteResult where + parseJSON + = withObject "WriteResult" + (\ o -> + WriteResult <$> + (o .:? "currentStateVersion") <*> + (o .:? "kind" .!= "appstate#writeResult") + <*> (o .:? "stateKey")) + +instance ToJSON WriteResult where + toJSON WriteResult{..} + = object + (catMaybes + [("currentStateVersion" .=) <$> + _wrCurrentStateVersion, + Just ("kind" .= _wrKind), + ("stateKey" .=) <$> _wrStateKey]) + +-- | This is a JSON template to convert a list-response for app state. +-- +-- /See:/ 'listResponse' smart constructor. +data ListResponse = ListResponse + { _lrMaximumKeyCount :: !(Maybe Int32) + , _lrKind :: !Text + , _lrItems :: !(Maybe [Maybe GetResponse]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrMaximumKeyCount' +-- +-- * 'lrKind' +-- +-- * 'lrItems' +listResponse + :: ListResponse +listResponse = + ListResponse + { _lrMaximumKeyCount = Nothing + , _lrKind = "appstate#listResponse" + , _lrItems = Nothing + } + +-- | The maximum number of keys allowed for this user. +lrMaximumKeyCount :: Lens' ListResponse (Maybe Int32) +lrMaximumKeyCount + = lens _lrMaximumKeyCount + (\ s a -> s{_lrMaximumKeyCount = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string appstate#listResponse. +lrKind :: Lens' ListResponse Text +lrKind = lens _lrKind (\ s a -> s{_lrKind = a}) + +-- | The app state data. +lrItems :: Lens' ListResponse [Maybe GetResponse] +lrItems + = lens _lrItems (\ s a -> s{_lrItems = a}) . _Default + . _Coerce + +instance FromJSON ListResponse where + parseJSON + = withObject "ListResponse" + (\ o -> + ListResponse <$> + (o .:? "maximumKeyCount") <*> + (o .:? "kind" .!= "appstate#listResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON ListResponse where + toJSON ListResponse{..} + = object + (catMaybes + [("maximumKeyCount" .=) <$> _lrMaximumKeyCount, + Just ("kind" .= _lrKind), ("items" .=) <$> _lrItems]) + +-- | This is a JSON template for an app state resource. +-- +-- /See:/ 'getResponse' smart constructor. +data GetResponse = GetResponse + { _grCurrentStateVersion :: !(Maybe Text) + , _grKind :: !Text + , _grData :: !(Maybe Text) + , _grStateKey :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'grCurrentStateVersion' +-- +-- * 'grKind' +-- +-- * 'grData' +-- +-- * 'grStateKey' +getResponse + :: GetResponse +getResponse = + GetResponse + { _grCurrentStateVersion = Nothing + , _grKind = "appstate#getResponse" + , _grData = Nothing + , _grStateKey = Nothing + } + +-- | The current app state version. +grCurrentStateVersion :: Lens' GetResponse (Maybe Text) +grCurrentStateVersion + = lens _grCurrentStateVersion + (\ s a -> s{_grCurrentStateVersion = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string appstate#getResponse. +grKind :: Lens' GetResponse Text +grKind = lens _grKind (\ s a -> s{_grKind = a}) + +-- | The requested data. +grData :: Lens' GetResponse (Maybe Text) +grData = lens _grData (\ s a -> s{_grData = a}) + +-- | The key for the data. +grStateKey :: Lens' GetResponse (Maybe Int32) +grStateKey + = lens _grStateKey (\ s a -> s{_grStateKey = a}) + +instance FromJSON GetResponse where + parseJSON + = withObject "GetResponse" + (\ o -> + GetResponse <$> + (o .:? "currentStateVersion") <*> + (o .:? "kind" .!= "appstate#getResponse") + <*> (o .:? "data") + <*> (o .:? "stateKey")) + +instance ToJSON GetResponse where + toJSON GetResponse{..} + = object + (catMaybes + [("currentStateVersion" .=) <$> + _grCurrentStateVersion, + Just ("kind" .= _grKind), ("data" .=) <$> _grData, + ("stateKey" .=) <$> _grStateKey]) + +-- | This is a JSON template for a requests which update app state +-- +-- /See:/ 'updateRequest' smart constructor. +data UpdateRequest = UpdateRequest + { _urKind :: !Text + , _urData :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urKind' +-- +-- * 'urData' +updateRequest + :: UpdateRequest +updateRequest = + UpdateRequest + { _urKind = "appstate#updateRequest" + , _urData = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string appstate#updateRequest. +urKind :: Lens' UpdateRequest Text +urKind = lens _urKind (\ s a -> s{_urKind = a}) + +-- | The new app state data that your application is trying to update with. +urData :: Lens' UpdateRequest (Maybe Text) +urData = lens _urData (\ s a -> s{_urData = a}) + +instance FromJSON UpdateRequest where + parseJSON + = withObject "UpdateRequest" + (\ o -> + UpdateRequest <$> + (o .:? "kind" .!= "appstate#updateRequest") <*> + (o .:? "data")) + +instance ToJSON UpdateRequest where + toJSON UpdateRequest{..} + = object + (catMaybes + [Just ("kind" .= _urKind), ("data" .=) <$> _urData]) diff --git a/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Sum.hs b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Sum.hs new file mode 100644 index 000000000..d28771513 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/GamesAppState/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesAppState.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesAppState.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Clear.hs b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Clear.hs new file mode 100644 index 000000000..9c6761f1d --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Clear.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Appstate.States.Clear +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Clears (sets to empty) the data for the passed key if and only if the +-- passed version matches the currently stored version. This method results +-- in a conflict error on version mismatch. +-- +-- /See:/ for @AppstateStatesClear@. +module Appstate.States.Clear + ( + -- * REST Resource + StatesClearAPI + + -- * Creating a Request + , statesClear + , StatesClear + + -- * Request Lenses + , scQuotaUser + , scPrettyPrint + , scUserIp + , scStateKey + , scCurrentDataVersion + , scKey + , scOauthToken + , scFields + , scAlt + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude + +-- | A resource alias for @AppstateStatesClear@ which the +-- 'StatesClear' request conforms to. +type StatesClearAPI = + "states" :> + Capture "stateKey" Int32 :> + "clear" :> + QueryParam "currentDataVersion" Text :> + Post '[JSON] WriteResult + +-- | Clears (sets to empty) the data for the passed key if and only if the +-- passed version matches the currently stored version. This method results +-- in a conflict error on version mismatch. +-- +-- /See:/ 'statesClear' smart constructor. +data StatesClear = StatesClear + { _scQuotaUser :: !(Maybe Text) + , _scPrettyPrint :: !Bool + , _scUserIp :: !(Maybe Text) + , _scStateKey :: !Int32 + , _scCurrentDataVersion :: !(Maybe Text) + , _scKey :: !(Maybe Text) + , _scOauthToken :: !(Maybe Text) + , _scFields :: !(Maybe Text) + , _scAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatesClear'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scQuotaUser' +-- +-- * 'scPrettyPrint' +-- +-- * 'scUserIp' +-- +-- * 'scStateKey' +-- +-- * 'scCurrentDataVersion' +-- +-- * 'scKey' +-- +-- * 'scOauthToken' +-- +-- * 'scFields' +-- +-- * 'scAlt' +statesClear + :: Int32 -- ^ 'stateKey' + -> StatesClear +statesClear pScStateKey_ = + StatesClear + { _scQuotaUser = Nothing + , _scPrettyPrint = True + , _scUserIp = Nothing + , _scStateKey = pScStateKey_ + , _scCurrentDataVersion = Nothing + , _scKey = Nothing + , _scOauthToken = Nothing + , _scFields = Nothing + , _scAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scQuotaUser :: Lens' StatesClear' (Maybe Text) +scQuotaUser + = lens _scQuotaUser (\ s a -> s{_scQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scPrettyPrint :: Lens' StatesClear' Bool +scPrettyPrint + = lens _scPrettyPrint + (\ s a -> s{_scPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scUserIp :: Lens' StatesClear' (Maybe Text) +scUserIp = lens _scUserIp (\ s a -> s{_scUserIp = a}) + +-- | The key for the data to be retrieved. +scStateKey :: Lens' StatesClear' Int32 +scStateKey + = lens _scStateKey (\ s a -> s{_scStateKey = a}) + +-- | The version of the data to be cleared. Version strings are returned by +-- the server. +scCurrentDataVersion :: Lens' StatesClear' (Maybe Text) +scCurrentDataVersion + = lens _scCurrentDataVersion + (\ s a -> s{_scCurrentDataVersion = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scKey :: Lens' StatesClear' (Maybe Text) +scKey = lens _scKey (\ s a -> s{_scKey = a}) + +-- | OAuth 2.0 token for the current user. +scOauthToken :: Lens' StatesClear' (Maybe Text) +scOauthToken + = lens _scOauthToken (\ s a -> s{_scOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +scFields :: Lens' StatesClear' (Maybe Text) +scFields = lens _scFields (\ s a -> s{_scFields = a}) + +-- | Data format for the response. +scAlt :: Lens' StatesClear' Text +scAlt = lens _scAlt (\ s a -> s{_scAlt = a}) + +instance GoogleRequest StatesClear' where + type Rs StatesClear' = WriteResult + request = requestWithRoute defReq gamesAppStateURL + requestWithRoute r u StatesClear{..} + = go _scQuotaUser _scPrettyPrint _scUserIp + _scStateKey + _scCurrentDataVersion + _scKey + _scOauthToken + _scFields + _scAlt + where go + = clientWithRoute (Proxy :: Proxy StatesClearAPI) r u diff --git a/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Delete.hs b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Delete.hs new file mode 100644 index 000000000..15b7e04b9 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Delete.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Appstate.States.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a key and the data associated with it. The key is removed and no +-- longer counts against the key quota. Note that since this method is not +-- safe in the face of concurrent modifications, it should only be used for +-- development and testing purposes. Invoking this method in shipping code +-- can result in data loss and data corruption. +-- +-- /See:/ for @AppstateStatesDelete@. +module Appstate.States.Delete + ( + -- * REST Resource + StatesDeleteAPI + + -- * Creating a Request + , statesDelete + , StatesDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdStateKey + , sdKey + , sdOauthToken + , sdFields + , sdAlt + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude + +-- | A resource alias for @AppstateStatesDelete@ which the +-- 'StatesDelete' request conforms to. +type StatesDeleteAPI = + "states" :> + Capture "stateKey" Int32 :> Delete '[JSON] () + +-- | Deletes a key and the data associated with it. The key is removed and no +-- longer counts against the key quota. Note that since this method is not +-- safe in the face of concurrent modifications, it should only be used for +-- development and testing purposes. Invoking this method in shipping code +-- can result in data loss and data corruption. +-- +-- /See:/ 'statesDelete' smart constructor. +data StatesDelete = StatesDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdStateKey :: !Int32 + , _sdKey :: !(Maybe Text) + , _sdOauthToken :: !(Maybe Text) + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdStateKey' +-- +-- * 'sdKey' +-- +-- * 'sdOauthToken' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +statesDelete + :: Int32 -- ^ 'stateKey' + -> StatesDelete +statesDelete pSdStateKey_ = + StatesDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdStateKey = pSdStateKey_ + , _sdKey = Nothing + , _sdOauthToken = Nothing + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' StatesDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' StatesDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' StatesDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | The key for the data to be retrieved. +sdStateKey :: Lens' StatesDelete' Int32 +sdStateKey + = lens _sdStateKey (\ s a -> s{_sdStateKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' StatesDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' StatesDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' StatesDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' StatesDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest StatesDelete' where + type Rs StatesDelete' = () + request = requestWithRoute defReq gamesAppStateURL + requestWithRoute r u StatesDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp + _sdStateKey + _sdKey + _sdOauthToken + _sdFields + _sdAlt + where go + = clientWithRoute (Proxy :: Proxy StatesDeleteAPI) r + u diff --git a/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Get.hs b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Get.hs new file mode 100644 index 000000000..0df3e832c --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Appstate.States.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the data corresponding to the passed key. If the key does not +-- exist on the server, an HTTP 404 will be returned. +-- +-- /See:/ for @AppstateStatesGet@. +module Appstate.States.Get + ( + -- * REST Resource + StatesGetAPI + + -- * Creating a Request + , statesGet + , StatesGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgStateKey + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude + +-- | A resource alias for @AppstateStatesGet@ which the +-- 'StatesGet' request conforms to. +type StatesGetAPI = + "states" :> + Capture "stateKey" Int32 :> Get '[JSON] GetResponse + +-- | Retrieves the data corresponding to the passed key. If the key does not +-- exist on the server, an HTTP 404 will be returned. +-- +-- /See:/ 'statesGet' smart constructor. +data StatesGet = StatesGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgStateKey :: !Int32 + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgStateKey' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +statesGet + :: Int32 -- ^ 'stateKey' + -> StatesGet +statesGet pSgStateKey_ = + StatesGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgStateKey = pSgStateKey_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' StatesGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' StatesGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' StatesGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | The key for the data to be retrieved. +sgStateKey :: Lens' StatesGet' Int32 +sgStateKey + = lens _sgStateKey (\ s a -> s{_sgStateKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' StatesGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' StatesGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' StatesGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' StatesGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest StatesGet' where + type Rs StatesGet' = GetResponse + request = requestWithRoute defReq gamesAppStateURL + requestWithRoute r u StatesGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp + _sgStateKey + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy StatesGetAPI) r u diff --git a/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/List.hs b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/List.hs new file mode 100644 index 000000000..6987ecf30 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/List.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Appstate.States.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the states keys, and optionally the state data. +-- +-- /See:/ for @AppstateStatesList@. +module Appstate.States.List + ( + -- * REST Resource + StatesListAPI + + -- * Creating a Request + , statesList + , StatesList + + -- * Request Lenses + , slIncludeData + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slOauthToken + , slFields + , slAlt + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude + +-- | A resource alias for @AppstateStatesList@ which the +-- 'StatesList' request conforms to. +type StatesListAPI = + "states" :> + QueryParam "includeData" Bool :> + Get '[JSON] ListResponse + +-- | Lists all the states keys, and optionally the state data. +-- +-- /See:/ 'statesList' smart constructor. +data StatesList = StatesList + { _slIncludeData :: !Bool + , _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slIncludeData' +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slOauthToken' +-- +-- * 'slFields' +-- +-- * 'slAlt' +statesList + :: StatesList +statesList = + StatesList + { _slIncludeData = False + , _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slOauthToken = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Whether to include the full data in addition to the version number +slIncludeData :: Lens' StatesList' Bool +slIncludeData + = lens _slIncludeData + (\ s a -> s{_slIncludeData = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' StatesList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' StatesList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' StatesList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' StatesList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' StatesList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' StatesList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' StatesList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest StatesList' where + type Rs StatesList' = ListResponse + request = requestWithRoute defReq gamesAppStateURL + requestWithRoute r u StatesList{..} + = go (Just _slIncludeData) _slQuotaUser + _slPrettyPrint + _slUserIp + _slKey + _slOauthToken + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy StatesListAPI) r u diff --git a/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Update.hs b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Update.hs new file mode 100644 index 000000000..d53419e48 --- /dev/null +++ b/gogol-games-appstate/gen/Network/Google/Resource/Appstate/States/Update.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Appstate.States.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the data associated with the input key if and only if the passed +-- version matches the currently stored version. This method is safe in the +-- face of concurrent writes. Maximum per-key size is 128KB. +-- +-- /See:/ for @AppstateStatesUpdate@. +module Appstate.States.Update + ( + -- * REST Resource + StatesUpdateAPI + + -- * Creating a Request + , statesUpdate + , StatesUpdate + + -- * Request Lenses + , suCurrentStateVersion + , suQuotaUser + , suPrettyPrint + , suUserIp + , suStateKey + , suKey + , suOauthToken + , suFields + , suAlt + ) where + +import Network.Google.GamesAppState.Types +import Network.Google.Prelude + +-- | A resource alias for @AppstateStatesUpdate@ which the +-- 'StatesUpdate' request conforms to. +type StatesUpdateAPI = + "states" :> + Capture "stateKey" Int32 :> + QueryParam "currentStateVersion" Text :> + Put '[JSON] WriteResult + +-- | Update the data associated with the input key if and only if the passed +-- version matches the currently stored version. This method is safe in the +-- face of concurrent writes. Maximum per-key size is 128KB. +-- +-- /See:/ 'statesUpdate' smart constructor. +data StatesUpdate = StatesUpdate + { _suCurrentStateVersion :: !(Maybe Text) + , _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suStateKey :: !Int32 + , _suKey :: !(Maybe Text) + , _suOauthToken :: !(Maybe Text) + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suCurrentStateVersion' +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suStateKey' +-- +-- * 'suKey' +-- +-- * 'suOauthToken' +-- +-- * 'suFields' +-- +-- * 'suAlt' +statesUpdate + :: Int32 -- ^ 'stateKey' + -> StatesUpdate +statesUpdate pSuStateKey_ = + StatesUpdate + { _suCurrentStateVersion = Nothing + , _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suStateKey = pSuStateKey_ + , _suKey = Nothing + , _suOauthToken = Nothing + , _suFields = Nothing + , _suAlt = "json" + } + +-- | The version of the app state your application is attempting to update. +-- If this does not match the current version, this method will return a +-- conflict error. If there is no data stored on the server for this key, +-- the update will succeed irrespective of the value of this parameter. +suCurrentStateVersion :: Lens' StatesUpdate' (Maybe Text) +suCurrentStateVersion + = lens _suCurrentStateVersion + (\ s a -> s{_suCurrentStateVersion = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' StatesUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' StatesUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' StatesUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | The key for the data to be retrieved. +suStateKey :: Lens' StatesUpdate' Int32 +suStateKey + = lens _suStateKey (\ s a -> s{_suStateKey = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' StatesUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' StatesUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' StatesUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' StatesUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest StatesUpdate' where + type Rs StatesUpdate' = WriteResult + request = requestWithRoute defReq gamesAppStateURL + requestWithRoute r u StatesUpdate{..} + = go _suCurrentStateVersion _suQuotaUser + _suPrettyPrint + _suUserIp + _suStateKey + _suKey + _suOauthToken + _suFields + _suAlt + where go + = clientWithRoute (Proxy :: Proxy StatesUpdateAPI) r + u diff --git a/gogol-games-appstate/gogol-games-appstate.cabal b/gogol-games-appstate/gogol-games-appstate.cabal new file mode 100644 index 000000000..df1a366ff --- /dev/null +++ b/gogol-games-appstate/gogol-games-appstate.cabal @@ -0,0 +1,47 @@ +name: gogol-games-appstate +version: 0.0.1 +synopsis: Google App State API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google App State API. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.GamesAppState + , Network.Google.GamesAppState.Types + , Network.Google.Resource.Appstate.States.Clear + , Network.Google.Resource.Appstate.States.Delete + , Network.Google.Resource.Appstate.States.Get + , Network.Google.Resource.Appstate.States.List + , Network.Google.Resource.Appstate.States.Update + + other-modules: + Network.Google.GamesAppState.Types.Product + , Network.Google.GamesAppState.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-games-appstate/src/.gitkeep b/gogol-games-appstate/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-games-configuration/LICENSE b/gogol-games-configuration/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-games-configuration/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-games-configuration/Makefile b/gogol-games-configuration/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-games-configuration/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-games-configuration/README.md b/gogol-games-configuration/README.md new file mode 100644 index 000000000..7fdc4b870 --- /dev/null +++ b/gogol-games-configuration/README.md @@ -0,0 +1,28 @@ +# gogol-games-configuration + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play Game Services Publishing API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-games-configuration` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-games-configuration/Setup.hs b/gogol-games-configuration/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-games-configuration/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-games-configuration/gen/Network/Google/GamesConfiguration.hs b/gogol-games-configuration/gen/Network/Google/GamesConfiguration.hs new file mode 100644 index 000000000..842ca1cbf --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/GamesConfiguration.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.GamesConfiguration +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Publishing API for Google Play Game Services. +-- +-- /See:/ +module Network.Google.GamesConfiguration + ( + -- * API + GamesConfigurationAPI + , gamesConfigurationAPI + , gamesConfigurationURL + + -- * Service Methods + + -- * REST Resources + + -- ** GamesConfigurationAchievementConfigurationsDelete + , module GamesConfiguration.AchievementConfigurations.Delete + + -- ** GamesConfigurationAchievementConfigurationsGet + , module GamesConfiguration.AchievementConfigurations.Get + + -- ** GamesConfigurationAchievementConfigurationsInsert + , module GamesConfiguration.AchievementConfigurations.Insert + + -- ** GamesConfigurationAchievementConfigurationsList + , module GamesConfiguration.AchievementConfigurations.List + + -- ** GamesConfigurationAchievementConfigurationsPatch + , module GamesConfiguration.AchievementConfigurations.Patch + + -- ** GamesConfigurationAchievementConfigurationsUpdate + , module GamesConfiguration.AchievementConfigurations.Update + + -- ** GamesConfigurationImageConfigurationsUpload + , module GamesConfiguration.ImageConfigurations.Upload + + -- ** GamesConfigurationLeaderboardConfigurationsDelete + , module GamesConfiguration.LeaderboardConfigurations.Delete + + -- ** GamesConfigurationLeaderboardConfigurationsGet + , module GamesConfiguration.LeaderboardConfigurations.Get + + -- ** GamesConfigurationLeaderboardConfigurationsInsert + , module GamesConfiguration.LeaderboardConfigurations.Insert + + -- ** GamesConfigurationLeaderboardConfigurationsList + , module GamesConfiguration.LeaderboardConfigurations.List + + -- ** GamesConfigurationLeaderboardConfigurationsPatch + , module GamesConfiguration.LeaderboardConfigurations.Patch + + -- ** GamesConfigurationLeaderboardConfigurationsUpdate + , module GamesConfiguration.LeaderboardConfigurations.Update + + -- * Types + + -- ** ImageConfiguration + , ImageConfiguration + , imageConfiguration + , icResourceId + , icKind + , icUrl + , icImageType + + -- ** LeaderboardConfigurationListResponse + , LeaderboardConfigurationListResponse + , leaderboardConfigurationListResponse + , lclrNextPageToken + , lclrKind + , lclrItems + + -- ** GamesNumberAffixConfiguration + , GamesNumberAffixConfiguration + , gamesNumberAffixConfiguration + , gnacFew + , gnacOther + , gnacTwo + , gnacOne + , gnacZero + , gnacMany + + -- ** AchievementConfigurationListResponse + , AchievementConfigurationListResponse + , achievementConfigurationListResponse + , aclrNextPageToken + , aclrKind + , aclrItems + + -- ** LeaderboardConfiguration + , LeaderboardConfiguration + , leaderboardConfiguration + , lcScoreMax + , lcKind + , lcPublished + , lcToken + , lcScoreMin + , lcDraft + , lcId + , lcScoreOrder + + -- ** AchievementConfiguration + , AchievementConfiguration + , achievementConfiguration + , acAchievementType + , acStepsToUnlock + , acKind + , acPublished + , acToken + , acInitialState + , acDraft + , acId + + -- ** LocalizedString + , LocalizedString + , localizedString + , lsKind + , lsLocale + , lsValue + + -- ** GamesNumberFormatConfiguration + , GamesNumberFormatConfiguration + , gamesNumberFormatConfiguration + , gnfcSuffix + , gnfcCurrencyCode + , gnfcNumberFormatType + , gnfcNumDecimalPlaces + + -- ** LeaderboardConfigurationDetail + , LeaderboardConfigurationDetail + , leaderboardConfigurationDetail + , lcdKind + , lcdScoreFormat + , lcdSortRank + , lcdName + , lcdIconUrl + + -- ** LocalizedStringBundle + , LocalizedStringBundle + , localizedStringBundle + , lsbKind + , lsbTranslations + + -- ** AchievementConfigurationDetail + , AchievementConfigurationDetail + , achievementConfigurationDetail + , acdKind + , acdSortRank + , acdName + , acdPointValue + , acdIconUrl + , acdDescription + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Delete +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Get +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Insert +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.List +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Patch +import Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Update +import Network.Google.Resource.GamesConfiguration.ImageConfigurations.Upload +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Delete +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Get +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Insert +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.List +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Patch +import Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Update + +{- $resources +TODO +-} + +type GamesConfigurationAPI = + ImageConfigurations :<|> LeaderboardConfigurations + :<|> AchievementConfigurations + +gamesConfigurationAPI :: Proxy GamesConfigurationAPI +gamesConfigurationAPI = Proxy diff --git a/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types.hs b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types.hs new file mode 100644 index 000000000..3d9d61814 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types.hs @@ -0,0 +1,126 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesConfiguration.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesConfiguration.Types + ( + -- * Service URL + gamesConfigurationURL + + -- * ImageConfiguration + , ImageConfiguration + , imageConfiguration + , icResourceId + , icKind + , icUrl + , icImageType + + -- * LeaderboardConfigurationListResponse + , LeaderboardConfigurationListResponse + , leaderboardConfigurationListResponse + , lclrNextPageToken + , lclrKind + , lclrItems + + -- * GamesNumberAffixConfiguration + , GamesNumberAffixConfiguration + , gamesNumberAffixConfiguration + , gnacFew + , gnacOther + , gnacTwo + , gnacOne + , gnacZero + , gnacMany + + -- * AchievementConfigurationListResponse + , AchievementConfigurationListResponse + , achievementConfigurationListResponse + , aclrNextPageToken + , aclrKind + , aclrItems + + -- * LeaderboardConfiguration + , LeaderboardConfiguration + , leaderboardConfiguration + , lcScoreMax + , lcKind + , lcPublished + , lcToken + , lcScoreMin + , lcDraft + , lcId + , lcScoreOrder + + -- * AchievementConfiguration + , AchievementConfiguration + , achievementConfiguration + , acAchievementType + , acStepsToUnlock + , acKind + , acPublished + , acToken + , acInitialState + , acDraft + , acId + + -- * LocalizedString + , LocalizedString + , localizedString + , lsKind + , lsLocale + , lsValue + + -- * GamesNumberFormatConfiguration + , GamesNumberFormatConfiguration + , gamesNumberFormatConfiguration + , gnfcSuffix + , gnfcCurrencyCode + , gnfcNumberFormatType + , gnfcNumDecimalPlaces + + -- * LeaderboardConfigurationDetail + , LeaderboardConfigurationDetail + , leaderboardConfigurationDetail + , lcdKind + , lcdScoreFormat + , lcdSortRank + , lcdName + , lcdIconUrl + + -- * LocalizedStringBundle + , LocalizedStringBundle + , localizedStringBundle + , lsbKind + , lsbTranslations + + -- * AchievementConfigurationDetail + , AchievementConfigurationDetail + , achievementConfigurationDetail + , acdKind + , acdSortRank + , acdName + , acdPointValue + , acdIconUrl + , acdDescription + ) where + +import Network.Google.GamesConfiguration.Types.Product +import Network.Google.GamesConfiguration.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1configuration' of the Google Play Game Services Publishing API. +gamesConfigurationURL :: BaseURL +gamesConfigurationURL + = BaseUrl Https + "https://www.googleapis.com/games/v1configuration/" + 443 diff --git a/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs new file mode 100644 index 000000000..108fa5c57 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs @@ -0,0 +1,908 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesConfiguration.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesConfiguration.Types.Product where + +import Network.Google.GamesConfiguration.Types.Sum +import Network.Google.Prelude + +-- | This is a JSON template for an image configuration resource. +-- +-- /See:/ 'imageConfiguration' smart constructor. +data ImageConfiguration = ImageConfiguration + { _icResourceId :: !(Maybe Text) + , _icKind :: !Text + , _icUrl :: !(Maybe Text) + , _icImageType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImageConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icResourceId' +-- +-- * 'icKind' +-- +-- * 'icUrl' +-- +-- * 'icImageType' +imageConfiguration + :: ImageConfiguration +imageConfiguration = + ImageConfiguration + { _icResourceId = Nothing + , _icKind = "gamesConfiguration#imageConfiguration" + , _icUrl = Nothing + , _icImageType = Nothing + } + +-- | The resource ID of resource which the image belongs to. +icResourceId :: Lens' ImageConfiguration (Maybe Text) +icResourceId + = lens _icResourceId (\ s a -> s{_icResourceId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#imageConfiguration. +icKind :: Lens' ImageConfiguration Text +icKind = lens _icKind (\ s a -> s{_icKind = a}) + +-- | The url for this image. +icUrl :: Lens' ImageConfiguration (Maybe Text) +icUrl = lens _icUrl (\ s a -> s{_icUrl = a}) + +-- | The image type for the image. +icImageType :: Lens' ImageConfiguration (Maybe Text) +icImageType + = lens _icImageType (\ s a -> s{_icImageType = a}) + +instance FromJSON ImageConfiguration where + parseJSON + = withObject "ImageConfiguration" + (\ o -> + ImageConfiguration <$> + (o .:? "resourceId") <*> + (o .:? "kind" .!= + "gamesConfiguration#imageConfiguration") + <*> (o .:? "url") + <*> (o .:? "imageType")) + +instance ToJSON ImageConfiguration where + toJSON ImageConfiguration{..} + = object + (catMaybes + [("resourceId" .=) <$> _icResourceId, + Just ("kind" .= _icKind), ("url" .=) <$> _icUrl, + ("imageType" .=) <$> _icImageType]) + +-- | This is a JSON template for a ListConfigurations response. +-- +-- /See:/ 'leaderboardConfigurationListResponse' smart constructor. +data LeaderboardConfigurationListResponse = LeaderboardConfigurationListResponse + { _lclrNextPageToken :: !(Maybe Text) + , _lclrKind :: !Text + , _lclrItems :: !(Maybe [Maybe LeaderboardConfiguration]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lclrNextPageToken' +-- +-- * 'lclrKind' +-- +-- * 'lclrItems' +leaderboardConfigurationListResponse + :: LeaderboardConfigurationListResponse +leaderboardConfigurationListResponse = + LeaderboardConfigurationListResponse + { _lclrNextPageToken = Nothing + , _lclrKind = "gamesConfiguration#leaderboardConfigurationListResponse" + , _lclrItems = Nothing + } + +-- | The pagination token for the next page of results. +lclrNextPageToken :: Lens' LeaderboardConfigurationListResponse (Maybe Text) +lclrNextPageToken + = lens _lclrNextPageToken + (\ s a -> s{_lclrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboardConfigurationListResponse. +lclrKind :: Lens' LeaderboardConfigurationListResponse Text +lclrKind = lens _lclrKind (\ s a -> s{_lclrKind = a}) + +-- | The leaderboard configurations. +lclrItems :: Lens' LeaderboardConfigurationListResponse [Maybe LeaderboardConfiguration] +lclrItems + = lens _lclrItems (\ s a -> s{_lclrItems = a}) . + _Default + . _Coerce + +instance FromJSON + LeaderboardConfigurationListResponse where + parseJSON + = withObject "LeaderboardConfigurationListResponse" + (\ o -> + LeaderboardConfigurationListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "gamesConfiguration#leaderboardConfigurationListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON LeaderboardConfigurationListResponse + where + toJSON LeaderboardConfigurationListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lclrNextPageToken, + Just ("kind" .= _lclrKind), + ("items" .=) <$> _lclrItems]) + +-- | This is a JSON template for a number affix resource. +-- +-- /See:/ 'gamesNumberAffixConfiguration' smart constructor. +data GamesNumberAffixConfiguration = GamesNumberAffixConfiguration + { _gnacFew :: !(Maybe (Maybe LocalizedStringBundle)) + , _gnacOther :: !(Maybe (Maybe LocalizedStringBundle)) + , _gnacTwo :: !(Maybe (Maybe LocalizedStringBundle)) + , _gnacOne :: !(Maybe (Maybe LocalizedStringBundle)) + , _gnacZero :: !(Maybe (Maybe LocalizedStringBundle)) + , _gnacMany :: !(Maybe (Maybe LocalizedStringBundle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesNumberAffixConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gnacFew' +-- +-- * 'gnacOther' +-- +-- * 'gnacTwo' +-- +-- * 'gnacOne' +-- +-- * 'gnacZero' +-- +-- * 'gnacMany' +gamesNumberAffixConfiguration + :: GamesNumberAffixConfiguration +gamesNumberAffixConfiguration = + GamesNumberAffixConfiguration + { _gnacFew = Nothing + , _gnacOther = Nothing + , _gnacTwo = Nothing + , _gnacOne = Nothing + , _gnacZero = Nothing + , _gnacMany = Nothing + } + +-- | When the language requires special treatment of \"small\" numbers (as +-- with 2, 3, and 4 in Czech; or numbers ending 2, 3, or 4 but not 12, 13, +-- or 14 in Polish). +gnacFew :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacFew = lens _gnacFew (\ s a -> s{_gnacFew = a}) + +-- | When the language does not require special treatment of the given +-- quantity (as with all numbers in Chinese, or 42 in English). +gnacOther :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacOther + = lens _gnacOther (\ s a -> s{_gnacOther = a}) + +-- | When the language requires special treatment of numbers like two (as +-- with 2 in Welsh, or 102 in Slovenian). +gnacTwo :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacTwo = lens _gnacTwo (\ s a -> s{_gnacTwo = a}) + +-- | When the language requires special treatment of numbers like one (as +-- with the number 1 in English and most other languages; in Russian, any +-- number ending in 1 but not ending in 11 is in this class). +gnacOne :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacOne = lens _gnacOne (\ s a -> s{_gnacOne = a}) + +-- | When the language requires special treatment of the number 0 (as in +-- Arabic). +gnacZero :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacZero = lens _gnacZero (\ s a -> s{_gnacZero = a}) + +-- | When the language requires special treatment of \"large\" numbers (as +-- with numbers ending 11-99 in Maltese). +gnacMany :: Lens' GamesNumberAffixConfiguration (Maybe (Maybe LocalizedStringBundle)) +gnacMany = lens _gnacMany (\ s a -> s{_gnacMany = a}) + +instance FromJSON GamesNumberAffixConfiguration where + parseJSON + = withObject "GamesNumberAffixConfiguration" + (\ o -> + GamesNumberAffixConfiguration <$> + (o .:? "few") <*> (o .:? "other") <*> (o .:? "two") + <*> (o .:? "one") + <*> (o .:? "zero") + <*> (o .:? "many")) + +instance ToJSON GamesNumberAffixConfiguration where + toJSON GamesNumberAffixConfiguration{..} + = object + (catMaybes + [("few" .=) <$> _gnacFew, + ("other" .=) <$> _gnacOther, ("two" .=) <$> _gnacTwo, + ("one" .=) <$> _gnacOne, ("zero" .=) <$> _gnacZero, + ("many" .=) <$> _gnacMany]) + +-- | This is a JSON template for a ListConfigurations response. +-- +-- /See:/ 'achievementConfigurationListResponse' smart constructor. +data AchievementConfigurationListResponse = AchievementConfigurationListResponse + { _aclrNextPageToken :: !(Maybe Text) + , _aclrKind :: !Text + , _aclrItems :: !(Maybe [Maybe AchievementConfiguration]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclrNextPageToken' +-- +-- * 'aclrKind' +-- +-- * 'aclrItems' +achievementConfigurationListResponse + :: AchievementConfigurationListResponse +achievementConfigurationListResponse = + AchievementConfigurationListResponse + { _aclrNextPageToken = Nothing + , _aclrKind = "gamesConfiguration#achievementConfigurationListResponse" + , _aclrItems = Nothing + } + +-- | The pagination token for the next page of results. +aclrNextPageToken :: Lens' AchievementConfigurationListResponse (Maybe Text) +aclrNextPageToken + = lens _aclrNextPageToken + (\ s a -> s{_aclrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementConfigurationListResponse. +aclrKind :: Lens' AchievementConfigurationListResponse Text +aclrKind = lens _aclrKind (\ s a -> s{_aclrKind = a}) + +-- | The achievement configurations. +aclrItems :: Lens' AchievementConfigurationListResponse [Maybe AchievementConfiguration] +aclrItems + = lens _aclrItems (\ s a -> s{_aclrItems = a}) . + _Default + . _Coerce + +instance FromJSON + AchievementConfigurationListResponse where + parseJSON + = withObject "AchievementConfigurationListResponse" + (\ o -> + AchievementConfigurationListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "gamesConfiguration#achievementConfigurationListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AchievementConfigurationListResponse + where + toJSON AchievementConfigurationListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _aclrNextPageToken, + Just ("kind" .= _aclrKind), + ("items" .=) <$> _aclrItems]) + +-- | This is a JSON template for an leaderboard configuration resource. +-- +-- /See:/ 'leaderboardConfiguration' smart constructor. +data LeaderboardConfiguration = LeaderboardConfiguration + { _lcScoreMax :: !(Maybe Int64) + , _lcKind :: !Text + , _lcPublished :: !(Maybe (Maybe LeaderboardConfigurationDetail)) + , _lcToken :: !(Maybe Text) + , _lcScoreMin :: !(Maybe Int64) + , _lcDraft :: !(Maybe (Maybe LeaderboardConfigurationDetail)) + , _lcId :: !(Maybe Text) + , _lcScoreOrder :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcScoreMax' +-- +-- * 'lcKind' +-- +-- * 'lcPublished' +-- +-- * 'lcToken' +-- +-- * 'lcScoreMin' +-- +-- * 'lcDraft' +-- +-- * 'lcId' +-- +-- * 'lcScoreOrder' +leaderboardConfiguration + :: LeaderboardConfiguration +leaderboardConfiguration = + LeaderboardConfiguration + { _lcScoreMax = Nothing + , _lcKind = "gamesConfiguration#leaderboardConfiguration" + , _lcPublished = Nothing + , _lcToken = Nothing + , _lcScoreMin = Nothing + , _lcDraft = Nothing + , _lcId = Nothing + , _lcScoreOrder = Nothing + } + +-- | Maximum score that can be posted to this leaderboard. +lcScoreMax :: Lens' LeaderboardConfiguration (Maybe Int64) +lcScoreMax + = lens _lcScoreMax (\ s a -> s{_lcScoreMax = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#leaderboardConfiguration. +lcKind :: Lens' LeaderboardConfiguration Text +lcKind = lens _lcKind (\ s a -> s{_lcKind = a}) + +-- | The read-only published data of the leaderboard. +lcPublished :: Lens' LeaderboardConfiguration (Maybe (Maybe LeaderboardConfigurationDetail)) +lcPublished + = lens _lcPublished (\ s a -> s{_lcPublished = a}) + +-- | The token for this resource. +lcToken :: Lens' LeaderboardConfiguration (Maybe Text) +lcToken = lens _lcToken (\ s a -> s{_lcToken = a}) + +-- | Minimum score that can be posted to this leaderboard. +lcScoreMin :: Lens' LeaderboardConfiguration (Maybe Int64) +lcScoreMin + = lens _lcScoreMin (\ s a -> s{_lcScoreMin = a}) + +-- | The draft data of the leaderboard. +lcDraft :: Lens' LeaderboardConfiguration (Maybe (Maybe LeaderboardConfigurationDetail)) +lcDraft = lens _lcDraft (\ s a -> s{_lcDraft = a}) + +-- | The ID of the leaderboard. +lcId :: Lens' LeaderboardConfiguration (Maybe Text) +lcId = lens _lcId (\ s a -> s{_lcId = a}) + +-- | The type of the leaderboard. Possible values are: - \"LARGER_IS_BETTER\" +-- - Larger scores posted are ranked higher. - \"SMALLER_IS_BETTER\" - +-- Smaller scores posted are ranked higher. +lcScoreOrder :: Lens' LeaderboardConfiguration (Maybe Text) +lcScoreOrder + = lens _lcScoreOrder (\ s a -> s{_lcScoreOrder = a}) + +instance FromJSON LeaderboardConfiguration where + parseJSON + = withObject "LeaderboardConfiguration" + (\ o -> + LeaderboardConfiguration <$> + (o .:? "scoreMax") <*> + (o .:? "kind" .!= + "gamesConfiguration#leaderboardConfiguration") + <*> (o .:? "published") + <*> (o .:? "token") + <*> (o .:? "scoreMin") + <*> (o .:? "draft") + <*> (o .:? "id") + <*> (o .:? "scoreOrder")) + +instance ToJSON LeaderboardConfiguration where + toJSON LeaderboardConfiguration{..} + = object + (catMaybes + [("scoreMax" .=) <$> _lcScoreMax, + Just ("kind" .= _lcKind), + ("published" .=) <$> _lcPublished, + ("token" .=) <$> _lcToken, + ("scoreMin" .=) <$> _lcScoreMin, + ("draft" .=) <$> _lcDraft, ("id" .=) <$> _lcId, + ("scoreOrder" .=) <$> _lcScoreOrder]) + +-- | This is a JSON template for an achievement configuration resource. +-- +-- /See:/ 'achievementConfiguration' smart constructor. +data AchievementConfiguration = AchievementConfiguration + { _acAchievementType :: !(Maybe Text) + , _acStepsToUnlock :: !(Maybe Int32) + , _acKind :: !Text + , _acPublished :: !(Maybe (Maybe AchievementConfigurationDetail)) + , _acToken :: !(Maybe Text) + , _acInitialState :: !(Maybe Text) + , _acDraft :: !(Maybe (Maybe AchievementConfigurationDetail)) + , _acId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acAchievementType' +-- +-- * 'acStepsToUnlock' +-- +-- * 'acKind' +-- +-- * 'acPublished' +-- +-- * 'acToken' +-- +-- * 'acInitialState' +-- +-- * 'acDraft' +-- +-- * 'acId' +achievementConfiguration + :: AchievementConfiguration +achievementConfiguration = + AchievementConfiguration + { _acAchievementType = Nothing + , _acStepsToUnlock = Nothing + , _acKind = "gamesConfiguration#achievementConfiguration" + , _acPublished = Nothing + , _acToken = Nothing + , _acInitialState = Nothing + , _acDraft = Nothing + , _acId = Nothing + } + +-- | The type of the achievement. Possible values are: - \"STANDARD\" - +-- Achievement is either locked or unlocked. - \"INCREMENTAL\" - +-- Achievement is incremental. +acAchievementType :: Lens' AchievementConfiguration (Maybe Text) +acAchievementType + = lens _acAchievementType + (\ s a -> s{_acAchievementType = a}) + +-- | Steps to unlock. Only applicable to incremental achievements. +acStepsToUnlock :: Lens' AchievementConfiguration (Maybe Int32) +acStepsToUnlock + = lens _acStepsToUnlock + (\ s a -> s{_acStepsToUnlock = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#achievementConfiguration. +acKind :: Lens' AchievementConfiguration Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | The read-only published data of the achievement. +acPublished :: Lens' AchievementConfiguration (Maybe (Maybe AchievementConfigurationDetail)) +acPublished + = lens _acPublished (\ s a -> s{_acPublished = a}) + +-- | The token for this resource. +acToken :: Lens' AchievementConfiguration (Maybe Text) +acToken = lens _acToken (\ s a -> s{_acToken = a}) + +-- | The initial state of the achievement. Possible values are: - \"HIDDEN\" +-- - Achievement is hidden. - \"REVEALED\" - Achievement is revealed. - +-- \"UNLOCKED\" - Achievement is unlocked. +acInitialState :: Lens' AchievementConfiguration (Maybe Text) +acInitialState + = lens _acInitialState + (\ s a -> s{_acInitialState = a}) + +-- | The draft data of the achievement. +acDraft :: Lens' AchievementConfiguration (Maybe (Maybe AchievementConfigurationDetail)) +acDraft = lens _acDraft (\ s a -> s{_acDraft = a}) + +-- | The ID of the achievement. +acId :: Lens' AchievementConfiguration (Maybe Text) +acId = lens _acId (\ s a -> s{_acId = a}) + +instance FromJSON AchievementConfiguration where + parseJSON + = withObject "AchievementConfiguration" + (\ o -> + AchievementConfiguration <$> + (o .:? "achievementType") <*> (o .:? "stepsToUnlock") + <*> + (o .:? "kind" .!= + "gamesConfiguration#achievementConfiguration") + <*> (o .:? "published") + <*> (o .:? "token") + <*> (o .:? "initialState") + <*> (o .:? "draft") + <*> (o .:? "id")) + +instance ToJSON AchievementConfiguration where + toJSON AchievementConfiguration{..} + = object + (catMaybes + [("achievementType" .=) <$> _acAchievementType, + ("stepsToUnlock" .=) <$> _acStepsToUnlock, + Just ("kind" .= _acKind), + ("published" .=) <$> _acPublished, + ("token" .=) <$> _acToken, + ("initialState" .=) <$> _acInitialState, + ("draft" .=) <$> _acDraft, ("id" .=) <$> _acId]) + +-- | This is a JSON template for a localized string resource. +-- +-- /See:/ 'localizedString' smart constructor. +data LocalizedString = LocalizedString + { _lsKind :: !Text + , _lsLocale :: !(Maybe Text) + , _lsValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocalizedString' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsKind' +-- +-- * 'lsLocale' +-- +-- * 'lsValue' +localizedString + :: LocalizedString +localizedString = + LocalizedString + { _lsKind = "gamesConfiguration#localizedString" + , _lsLocale = Nothing + , _lsValue = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#localizedString. +lsKind :: Lens' LocalizedString Text +lsKind = lens _lsKind (\ s a -> s{_lsKind = a}) + +-- | The locale string. +lsLocale :: Lens' LocalizedString (Maybe Text) +lsLocale = lens _lsLocale (\ s a -> s{_lsLocale = a}) + +-- | The string value. +lsValue :: Lens' LocalizedString (Maybe Text) +lsValue = lens _lsValue (\ s a -> s{_lsValue = a}) + +instance FromJSON LocalizedString where + parseJSON + = withObject "LocalizedString" + (\ o -> + LocalizedString <$> + (o .:? "kind" .!= + "gamesConfiguration#localizedString") + <*> (o .:? "locale") + <*> (o .:? "value")) + +instance ToJSON LocalizedString where + toJSON LocalizedString{..} + = object + (catMaybes + [Just ("kind" .= _lsKind), + ("locale" .=) <$> _lsLocale, + ("value" .=) <$> _lsValue]) + +-- | This is a JSON template for a number format resource. +-- +-- /See:/ 'gamesNumberFormatConfiguration' smart constructor. +data GamesNumberFormatConfiguration = GamesNumberFormatConfiguration + { _gnfcSuffix :: !(Maybe (Maybe GamesNumberAffixConfiguration)) + , _gnfcCurrencyCode :: !(Maybe Text) + , _gnfcNumberFormatType :: !(Maybe Text) + , _gnfcNumDecimalPlaces :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesNumberFormatConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gnfcSuffix' +-- +-- * 'gnfcCurrencyCode' +-- +-- * 'gnfcNumberFormatType' +-- +-- * 'gnfcNumDecimalPlaces' +gamesNumberFormatConfiguration + :: GamesNumberFormatConfiguration +gamesNumberFormatConfiguration = + GamesNumberFormatConfiguration + { _gnfcSuffix = Nothing + , _gnfcCurrencyCode = Nothing + , _gnfcNumberFormatType = Nothing + , _gnfcNumDecimalPlaces = Nothing + } + +-- | An optional suffix for the NUMERIC format type. These strings follow the +-- same plural rules as all Android string resources. +gnfcSuffix :: Lens' GamesNumberFormatConfiguration (Maybe (Maybe GamesNumberAffixConfiguration)) +gnfcSuffix + = lens _gnfcSuffix (\ s a -> s{_gnfcSuffix = a}) + +-- | The curreny code string. Only used for CURRENCY format type. +gnfcCurrencyCode :: Lens' GamesNumberFormatConfiguration (Maybe Text) +gnfcCurrencyCode + = lens _gnfcCurrencyCode + (\ s a -> s{_gnfcCurrencyCode = a}) + +-- | The formatting for the number. Possible values are: - \"NUMERIC\" - +-- Numbers are formatted to have no digits or a fixed number of digits +-- after the decimal point according to locale. An optional custom unit can +-- be added. - \"TIME_DURATION\" - Numbers are formatted to hours, minutes +-- and seconds. - \"CURRENCY\" - Numbers are formatted to currency +-- according to locale. +gnfcNumberFormatType :: Lens' GamesNumberFormatConfiguration (Maybe Text) +gnfcNumberFormatType + = lens _gnfcNumberFormatType + (\ s a -> s{_gnfcNumberFormatType = a}) + +-- | The number of decimal places for number. Only used for NUMERIC format +-- type. +gnfcNumDecimalPlaces :: Lens' GamesNumberFormatConfiguration (Maybe Int32) +gnfcNumDecimalPlaces + = lens _gnfcNumDecimalPlaces + (\ s a -> s{_gnfcNumDecimalPlaces = a}) + +instance FromJSON GamesNumberFormatConfiguration + where + parseJSON + = withObject "GamesNumberFormatConfiguration" + (\ o -> + GamesNumberFormatConfiguration <$> + (o .:? "suffix") <*> (o .:? "currencyCode") <*> + (o .:? "numberFormatType") + <*> (o .:? "numDecimalPlaces")) + +instance ToJSON GamesNumberFormatConfiguration where + toJSON GamesNumberFormatConfiguration{..} + = object + (catMaybes + [("suffix" .=) <$> _gnfcSuffix, + ("currencyCode" .=) <$> _gnfcCurrencyCode, + ("numberFormatType" .=) <$> _gnfcNumberFormatType, + ("numDecimalPlaces" .=) <$> _gnfcNumDecimalPlaces]) + +-- | This is a JSON template for a leaderboard configuration detail. +-- +-- /See:/ 'leaderboardConfigurationDetail' smart constructor. +data LeaderboardConfigurationDetail = LeaderboardConfigurationDetail + { _lcdKind :: !Text + , _lcdScoreFormat :: !(Maybe (Maybe GamesNumberFormatConfiguration)) + , _lcdSortRank :: !(Maybe Int32) + , _lcdName :: !(Maybe (Maybe LocalizedStringBundle)) + , _lcdIconUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationDetail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcdKind' +-- +-- * 'lcdScoreFormat' +-- +-- * 'lcdSortRank' +-- +-- * 'lcdName' +-- +-- * 'lcdIconUrl' +leaderboardConfigurationDetail + :: LeaderboardConfigurationDetail +leaderboardConfigurationDetail = + LeaderboardConfigurationDetail + { _lcdKind = "gamesConfiguration#leaderboardConfigurationDetail" + , _lcdScoreFormat = Nothing + , _lcdSortRank = Nothing + , _lcdName = Nothing + , _lcdIconUrl = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#leaderboardConfigurationDetail. +lcdKind :: Lens' LeaderboardConfigurationDetail Text +lcdKind = lens _lcdKind (\ s a -> s{_lcdKind = a}) + +-- | The score formatting for the leaderboard. +lcdScoreFormat :: Lens' LeaderboardConfigurationDetail (Maybe (Maybe GamesNumberFormatConfiguration)) +lcdScoreFormat + = lens _lcdScoreFormat + (\ s a -> s{_lcdScoreFormat = a}) + +-- | The sort rank of this leaderboard. Writes to this field are ignored. +lcdSortRank :: Lens' LeaderboardConfigurationDetail (Maybe Int32) +lcdSortRank + = lens _lcdSortRank (\ s a -> s{_lcdSortRank = a}) + +-- | Localized strings for the leaderboard name. +lcdName :: Lens' LeaderboardConfigurationDetail (Maybe (Maybe LocalizedStringBundle)) +lcdName = lens _lcdName (\ s a -> s{_lcdName = a}) + +-- | The icon url of this leaderboard. Writes to this field are ignored. +lcdIconUrl :: Lens' LeaderboardConfigurationDetail (Maybe Text) +lcdIconUrl + = lens _lcdIconUrl (\ s a -> s{_lcdIconUrl = a}) + +instance FromJSON LeaderboardConfigurationDetail + where + parseJSON + = withObject "LeaderboardConfigurationDetail" + (\ o -> + LeaderboardConfigurationDetail <$> + (o .:? "kind" .!= + "gamesConfiguration#leaderboardConfigurationDetail") + <*> (o .:? "scoreFormat") + <*> (o .:? "sortRank") + <*> (o .:? "name") + <*> (o .:? "iconUrl")) + +instance ToJSON LeaderboardConfigurationDetail where + toJSON LeaderboardConfigurationDetail{..} + = object + (catMaybes + [Just ("kind" .= _lcdKind), + ("scoreFormat" .=) <$> _lcdScoreFormat, + ("sortRank" .=) <$> _lcdSortRank, + ("name" .=) <$> _lcdName, + ("iconUrl" .=) <$> _lcdIconUrl]) + +-- | This is a JSON template for a localized string bundle resource. +-- +-- /See:/ 'localizedStringBundle' smart constructor. +data LocalizedStringBundle = LocalizedStringBundle + { _lsbKind :: !Text + , _lsbTranslations :: !(Maybe [Maybe LocalizedString]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocalizedStringBundle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsbKind' +-- +-- * 'lsbTranslations' +localizedStringBundle + :: LocalizedStringBundle +localizedStringBundle = + LocalizedStringBundle + { _lsbKind = "gamesConfiguration#localizedStringBundle" + , _lsbTranslations = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#localizedStringBundle. +lsbKind :: Lens' LocalizedStringBundle Text +lsbKind = lens _lsbKind (\ s a -> s{_lsbKind = a}) + +-- | The locale strings. +lsbTranslations :: Lens' LocalizedStringBundle [Maybe LocalizedString] +lsbTranslations + = lens _lsbTranslations + (\ s a -> s{_lsbTranslations = a}) + . _Default + . _Coerce + +instance FromJSON LocalizedStringBundle where + parseJSON + = withObject "LocalizedStringBundle" + (\ o -> + LocalizedStringBundle <$> + (o .:? "kind" .!= + "gamesConfiguration#localizedStringBundle") + <*> (o .:? "translations" .!= mempty)) + +instance ToJSON LocalizedStringBundle where + toJSON LocalizedStringBundle{..} + = object + (catMaybes + [Just ("kind" .= _lsbKind), + ("translations" .=) <$> _lsbTranslations]) + +-- | This is a JSON template for an achievement configuration detail. +-- +-- /See:/ 'achievementConfigurationDetail' smart constructor. +data AchievementConfigurationDetail = AchievementConfigurationDetail + { _acdKind :: !Text + , _acdSortRank :: !(Maybe Int32) + , _acdName :: !(Maybe (Maybe LocalizedStringBundle)) + , _acdPointValue :: !(Maybe Int32) + , _acdIconUrl :: !(Maybe Text) + , _acdDescription :: !(Maybe (Maybe LocalizedStringBundle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationDetail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdKind' +-- +-- * 'acdSortRank' +-- +-- * 'acdName' +-- +-- * 'acdPointValue' +-- +-- * 'acdIconUrl' +-- +-- * 'acdDescription' +achievementConfigurationDetail + :: AchievementConfigurationDetail +achievementConfigurationDetail = + AchievementConfigurationDetail + { _acdKind = "gamesConfiguration#achievementConfigurationDetail" + , _acdSortRank = Nothing + , _acdName = Nothing + , _acdPointValue = Nothing + , _acdIconUrl = Nothing + , _acdDescription = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesConfiguration#achievementConfigurationDetail. +acdKind :: Lens' AchievementConfigurationDetail Text +acdKind = lens _acdKind (\ s a -> s{_acdKind = a}) + +-- | The sort rank of this achievement. Writes to this field are ignored. +acdSortRank :: Lens' AchievementConfigurationDetail (Maybe Int32) +acdSortRank + = lens _acdSortRank (\ s a -> s{_acdSortRank = a}) + +-- | Localized strings for the achievement name. +acdName :: Lens' AchievementConfigurationDetail (Maybe (Maybe LocalizedStringBundle)) +acdName = lens _acdName (\ s a -> s{_acdName = a}) + +-- | Point value for the achievement. +acdPointValue :: Lens' AchievementConfigurationDetail (Maybe Int32) +acdPointValue + = lens _acdPointValue + (\ s a -> s{_acdPointValue = a}) + +-- | The icon url of this achievement. Writes to this field are ignored. +acdIconUrl :: Lens' AchievementConfigurationDetail (Maybe Text) +acdIconUrl + = lens _acdIconUrl (\ s a -> s{_acdIconUrl = a}) + +-- | Localized strings for the achievement description. +acdDescription :: Lens' AchievementConfigurationDetail (Maybe (Maybe LocalizedStringBundle)) +acdDescription + = lens _acdDescription + (\ s a -> s{_acdDescription = a}) + +instance FromJSON AchievementConfigurationDetail + where + parseJSON + = withObject "AchievementConfigurationDetail" + (\ o -> + AchievementConfigurationDetail <$> + (o .:? "kind" .!= + "gamesConfiguration#achievementConfigurationDetail") + <*> (o .:? "sortRank") + <*> (o .:? "name") + <*> (o .:? "pointValue") + <*> (o .:? "iconUrl") + <*> (o .:? "description")) + +instance ToJSON AchievementConfigurationDetail where + toJSON AchievementConfigurationDetail{..} + = object + (catMaybes + [Just ("kind" .= _acdKind), + ("sortRank" .=) <$> _acdSortRank, + ("name" .=) <$> _acdName, + ("pointValue" .=) <$> _acdPointValue, + ("iconUrl" .=) <$> _acdIconUrl, + ("description" .=) <$> _acdDescription]) diff --git a/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Sum.hs b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Sum.hs new file mode 100644 index 000000000..31dc3110a --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesConfiguration.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesConfiguration.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Delete.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Delete.hs new file mode 100644 index 000000000..3d139c21f --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Delete.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete the achievement configuration with the given ID. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsDelete@. +module GamesConfiguration.AchievementConfigurations.Delete + ( + -- * REST Resource + AchievementConfigurationsDeleteAPI + + -- * Creating a Request + , achievementConfigurationsDelete + , AchievementConfigurationsDelete + + -- * Request Lenses + , acdQuotaUser + , acdPrettyPrint + , acdAchievementId + , acdUserIp + , acdKey + , acdOauthToken + , acdFields + , acdAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsDelete@ which the +-- 'AchievementConfigurationsDelete' request conforms to. +type AchievementConfigurationsDeleteAPI = + "achievements" :> + Capture "achievementId" Text :> Delete '[JSON] () + +-- | Delete the achievement configuration with the given ID. +-- +-- /See:/ 'achievementConfigurationsDelete' smart constructor. +data AchievementConfigurationsDelete = AchievementConfigurationsDelete + { _acdQuotaUser :: !(Maybe Text) + , _acdPrettyPrint :: !Bool + , _acdAchievementId :: !Text + , _acdUserIp :: !(Maybe Text) + , _acdKey :: !(Maybe Text) + , _acdOauthToken :: !(Maybe Text) + , _acdFields :: !(Maybe Text) + , _acdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdQuotaUser' +-- +-- * 'acdPrettyPrint' +-- +-- * 'acdAchievementId' +-- +-- * 'acdUserIp' +-- +-- * 'acdKey' +-- +-- * 'acdOauthToken' +-- +-- * 'acdFields' +-- +-- * 'acdAlt' +achievementConfigurationsDelete + :: Text -- ^ 'achievementId' + -> AchievementConfigurationsDelete +achievementConfigurationsDelete pAcdAchievementId_ = + AchievementConfigurationsDelete + { _acdQuotaUser = Nothing + , _acdPrettyPrint = True + , _acdAchievementId = pAcdAchievementId_ + , _acdUserIp = Nothing + , _acdKey = Nothing + , _acdOauthToken = Nothing + , _acdFields = Nothing + , _acdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acdQuotaUser :: Lens' AchievementConfigurationsDelete' (Maybe Text) +acdQuotaUser + = lens _acdQuotaUser (\ s a -> s{_acdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acdPrettyPrint :: Lens' AchievementConfigurationsDelete' Bool +acdPrettyPrint + = lens _acdPrettyPrint + (\ s a -> s{_acdPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +acdAchievementId :: Lens' AchievementConfigurationsDelete' Text +acdAchievementId + = lens _acdAchievementId + (\ s a -> s{_acdAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acdUserIp :: Lens' AchievementConfigurationsDelete' (Maybe Text) +acdUserIp + = lens _acdUserIp (\ s a -> s{_acdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acdKey :: Lens' AchievementConfigurationsDelete' (Maybe Text) +acdKey = lens _acdKey (\ s a -> s{_acdKey = a}) + +-- | OAuth 2.0 token for the current user. +acdOauthToken :: Lens' AchievementConfigurationsDelete' (Maybe Text) +acdOauthToken + = lens _acdOauthToken + (\ s a -> s{_acdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acdFields :: Lens' AchievementConfigurationsDelete' (Maybe Text) +acdFields + = lens _acdFields (\ s a -> s{_acdFields = a}) + +-- | Data format for the response. +acdAlt :: Lens' AchievementConfigurationsDelete' Text +acdAlt = lens _acdAlt (\ s a -> s{_acdAlt = a}) + +instance GoogleRequest + AchievementConfigurationsDelete' where + type Rs AchievementConfigurationsDelete' = () + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + AchievementConfigurationsDelete{..} + = go _acdQuotaUser _acdPrettyPrint _acdAchievementId + _acdUserIp + _acdKey + _acdOauthToken + _acdFields + _acdAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsDeleteAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs new file mode 100644 index 000000000..29efea6ec --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the metadata of the achievement configuration with the given +-- ID. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsGet@. +module GamesConfiguration.AchievementConfigurations.Get + ( + -- * REST Resource + AchievementConfigurationsGetAPI + + -- * Creating a Request + , achievementConfigurationsGet + , AchievementConfigurationsGet + + -- * Request Lenses + , acgQuotaUser + , acgPrettyPrint + , acgAchievementId + , acgUserIp + , acgKey + , acgOauthToken + , acgFields + , acgAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsGet@ which the +-- 'AchievementConfigurationsGet' request conforms to. +type AchievementConfigurationsGetAPI = + "achievements" :> + Capture "achievementId" Text :> + Get '[JSON] AchievementConfiguration + +-- | Retrieves the metadata of the achievement configuration with the given +-- ID. +-- +-- /See:/ 'achievementConfigurationsGet' smart constructor. +data AchievementConfigurationsGet = AchievementConfigurationsGet + { _acgQuotaUser :: !(Maybe Text) + , _acgPrettyPrint :: !Bool + , _acgAchievementId :: !Text + , _acgUserIp :: !(Maybe Text) + , _acgKey :: !(Maybe Text) + , _acgOauthToken :: !(Maybe Text) + , _acgFields :: !(Maybe Text) + , _acgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acgQuotaUser' +-- +-- * 'acgPrettyPrint' +-- +-- * 'acgAchievementId' +-- +-- * 'acgUserIp' +-- +-- * 'acgKey' +-- +-- * 'acgOauthToken' +-- +-- * 'acgFields' +-- +-- * 'acgAlt' +achievementConfigurationsGet + :: Text -- ^ 'achievementId' + -> AchievementConfigurationsGet +achievementConfigurationsGet pAcgAchievementId_ = + AchievementConfigurationsGet + { _acgQuotaUser = Nothing + , _acgPrettyPrint = True + , _acgAchievementId = pAcgAchievementId_ + , _acgUserIp = Nothing + , _acgKey = Nothing + , _acgOauthToken = Nothing + , _acgFields = Nothing + , _acgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acgQuotaUser :: Lens' AchievementConfigurationsGet' (Maybe Text) +acgQuotaUser + = lens _acgQuotaUser (\ s a -> s{_acgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acgPrettyPrint :: Lens' AchievementConfigurationsGet' Bool +acgPrettyPrint + = lens _acgPrettyPrint + (\ s a -> s{_acgPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +acgAchievementId :: Lens' AchievementConfigurationsGet' Text +acgAchievementId + = lens _acgAchievementId + (\ s a -> s{_acgAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acgUserIp :: Lens' AchievementConfigurationsGet' (Maybe Text) +acgUserIp + = lens _acgUserIp (\ s a -> s{_acgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acgKey :: Lens' AchievementConfigurationsGet' (Maybe Text) +acgKey = lens _acgKey (\ s a -> s{_acgKey = a}) + +-- | OAuth 2.0 token for the current user. +acgOauthToken :: Lens' AchievementConfigurationsGet' (Maybe Text) +acgOauthToken + = lens _acgOauthToken + (\ s a -> s{_acgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acgFields :: Lens' AchievementConfigurationsGet' (Maybe Text) +acgFields + = lens _acgFields (\ s a -> s{_acgFields = a}) + +-- | Data format for the response. +acgAlt :: Lens' AchievementConfigurationsGet' Text +acgAlt = lens _acgAlt (\ s a -> s{_acgAlt = a}) + +instance GoogleRequest AchievementConfigurationsGet' + where + type Rs AchievementConfigurationsGet' = + AchievementConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u AchievementConfigurationsGet{..} + = go _acgQuotaUser _acgPrettyPrint _acgAchievementId + _acgUserIp + _acgKey + _acgOauthToken + _acgFields + _acgAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsGetAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Insert.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Insert.hs new file mode 100644 index 000000000..81a29fdd3 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Insert.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert a new achievement configuration in this application. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsInsert@. +module GamesConfiguration.AchievementConfigurations.Insert + ( + -- * REST Resource + AchievementConfigurationsInsertAPI + + -- * Creating a Request + , achievementConfigurationsInsert + , AchievementConfigurationsInsert + + -- * Request Lenses + , aciQuotaUser + , aciPrettyPrint + , aciUserIp + , aciApplicationId + , aciKey + , aciOauthToken + , aciFields + , aciAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsInsert@ which the +-- 'AchievementConfigurationsInsert' request conforms to. +type AchievementConfigurationsInsertAPI = + "applications" :> + Capture "applicationId" Text :> + "achievements" :> + Post '[JSON] AchievementConfiguration + +-- | Insert a new achievement configuration in this application. +-- +-- /See:/ 'achievementConfigurationsInsert' smart constructor. +data AchievementConfigurationsInsert = AchievementConfigurationsInsert + { _aciQuotaUser :: !(Maybe Text) + , _aciPrettyPrint :: !Bool + , _aciUserIp :: !(Maybe Text) + , _aciApplicationId :: !Text + , _aciKey :: !(Maybe Text) + , _aciOauthToken :: !(Maybe Text) + , _aciFields :: !(Maybe Text) + , _aciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aciQuotaUser' +-- +-- * 'aciPrettyPrint' +-- +-- * 'aciUserIp' +-- +-- * 'aciApplicationId' +-- +-- * 'aciKey' +-- +-- * 'aciOauthToken' +-- +-- * 'aciFields' +-- +-- * 'aciAlt' +achievementConfigurationsInsert + :: Text -- ^ 'applicationId' + -> AchievementConfigurationsInsert +achievementConfigurationsInsert pAciApplicationId_ = + AchievementConfigurationsInsert + { _aciQuotaUser = Nothing + , _aciPrettyPrint = True + , _aciUserIp = Nothing + , _aciApplicationId = pAciApplicationId_ + , _aciKey = Nothing + , _aciOauthToken = Nothing + , _aciFields = Nothing + , _aciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aciQuotaUser :: Lens' AchievementConfigurationsInsert' (Maybe Text) +aciQuotaUser + = lens _aciQuotaUser (\ s a -> s{_aciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aciPrettyPrint :: Lens' AchievementConfigurationsInsert' Bool +aciPrettyPrint + = lens _aciPrettyPrint + (\ s a -> s{_aciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aciUserIp :: Lens' AchievementConfigurationsInsert' (Maybe Text) +aciUserIp + = lens _aciUserIp (\ s a -> s{_aciUserIp = a}) + +-- | The application ID from the Google Play developer console. +aciApplicationId :: Lens' AchievementConfigurationsInsert' Text +aciApplicationId + = lens _aciApplicationId + (\ s a -> s{_aciApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aciKey :: Lens' AchievementConfigurationsInsert' (Maybe Text) +aciKey = lens _aciKey (\ s a -> s{_aciKey = a}) + +-- | OAuth 2.0 token for the current user. +aciOauthToken :: Lens' AchievementConfigurationsInsert' (Maybe Text) +aciOauthToken + = lens _aciOauthToken + (\ s a -> s{_aciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aciFields :: Lens' AchievementConfigurationsInsert' (Maybe Text) +aciFields + = lens _aciFields (\ s a -> s{_aciFields = a}) + +-- | Data format for the response. +aciAlt :: Lens' AchievementConfigurationsInsert' Text +aciAlt = lens _aciAlt (\ s a -> s{_aciAlt = a}) + +instance GoogleRequest + AchievementConfigurationsInsert' where + type Rs AchievementConfigurationsInsert' = + AchievementConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + AchievementConfigurationsInsert{..} + = go _aciQuotaUser _aciPrettyPrint _aciUserIp + _aciApplicationId + _aciKey + _aciOauthToken + _aciFields + _aciAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsInsertAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/List.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/List.hs new file mode 100644 index 000000000..3cf71c3c0 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/List.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of the achievement configurations in this application. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsList@. +module GamesConfiguration.AchievementConfigurations.List + ( + -- * REST Resource + AchievementConfigurationsListAPI + + -- * Creating a Request + , achievementConfigurationsList + , AchievementConfigurationsList + + -- * Request Lenses + , aclQuotaUser + , aclPrettyPrint + , aclUserIp + , aclApplicationId + , aclKey + , aclPageToken + , aclOauthToken + , aclMaxResults + , aclFields + , aclAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsList@ which the +-- 'AchievementConfigurationsList' request conforms to. +type AchievementConfigurationsListAPI = + "applications" :> + Capture "applicationId" Text :> + "achievements" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AchievementConfigurationListResponse + +-- | Returns a list of the achievement configurations in this application. +-- +-- /See:/ 'achievementConfigurationsList' smart constructor. +data AchievementConfigurationsList = AchievementConfigurationsList + { _aclQuotaUser :: !(Maybe Text) + , _aclPrettyPrint :: !Bool + , _aclUserIp :: !(Maybe Text) + , _aclApplicationId :: !Text + , _aclKey :: !(Maybe Text) + , _aclPageToken :: !(Maybe Text) + , _aclOauthToken :: !(Maybe Text) + , _aclMaxResults :: !(Maybe Int32) + , _aclFields :: !(Maybe Text) + , _aclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclQuotaUser' +-- +-- * 'aclPrettyPrint' +-- +-- * 'aclUserIp' +-- +-- * 'aclApplicationId' +-- +-- * 'aclKey' +-- +-- * 'aclPageToken' +-- +-- * 'aclOauthToken' +-- +-- * 'aclMaxResults' +-- +-- * 'aclFields' +-- +-- * 'aclAlt' +achievementConfigurationsList + :: Text -- ^ 'applicationId' + -> AchievementConfigurationsList +achievementConfigurationsList pAclApplicationId_ = + AchievementConfigurationsList + { _aclQuotaUser = Nothing + , _aclPrettyPrint = True + , _aclUserIp = Nothing + , _aclApplicationId = pAclApplicationId_ + , _aclKey = Nothing + , _aclPageToken = Nothing + , _aclOauthToken = Nothing + , _aclMaxResults = Nothing + , _aclFields = Nothing + , _aclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aclQuotaUser :: Lens' AchievementConfigurationsList' (Maybe Text) +aclQuotaUser + = lens _aclQuotaUser (\ s a -> s{_aclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aclPrettyPrint :: Lens' AchievementConfigurationsList' Bool +aclPrettyPrint + = lens _aclPrettyPrint + (\ s a -> s{_aclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aclUserIp :: Lens' AchievementConfigurationsList' (Maybe Text) +aclUserIp + = lens _aclUserIp (\ s a -> s{_aclUserIp = a}) + +-- | The application ID from the Google Play developer console. +aclApplicationId :: Lens' AchievementConfigurationsList' Text +aclApplicationId + = lens _aclApplicationId + (\ s a -> s{_aclApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aclKey :: Lens' AchievementConfigurationsList' (Maybe Text) +aclKey = lens _aclKey (\ s a -> s{_aclKey = a}) + +-- | The token returned by the previous request. +aclPageToken :: Lens' AchievementConfigurationsList' (Maybe Text) +aclPageToken + = lens _aclPageToken (\ s a -> s{_aclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aclOauthToken :: Lens' AchievementConfigurationsList' (Maybe Text) +aclOauthToken + = lens _aclOauthToken + (\ s a -> s{_aclOauthToken = a}) + +-- | The maximum number of resource configurations to return in the response, +-- used for paging. For any response, the actual number of resources +-- returned may be less than the specified maxResults. +aclMaxResults :: Lens' AchievementConfigurationsList' (Maybe Int32) +aclMaxResults + = lens _aclMaxResults + (\ s a -> s{_aclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aclFields :: Lens' AchievementConfigurationsList' (Maybe Text) +aclFields + = lens _aclFields (\ s a -> s{_aclFields = a}) + +-- | Data format for the response. +aclAlt :: Lens' AchievementConfigurationsList' Text +aclAlt = lens _aclAlt (\ s a -> s{_aclAlt = a}) + +instance GoogleRequest AchievementConfigurationsList' + where + type Rs AchievementConfigurationsList' = + AchievementConfigurationListResponse + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + AchievementConfigurationsList{..} + = go _aclQuotaUser _aclPrettyPrint _aclUserIp + _aclApplicationId + _aclKey + _aclPageToken + _aclOauthToken + _aclMaxResults + _aclFields + _aclAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsListAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Patch.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Patch.hs new file mode 100644 index 000000000..38efe49ae --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Patch.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the metadata of the achievement configuration with the given ID. +-- This method supports patch semantics. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsPatch@. +module GamesConfiguration.AchievementConfigurations.Patch + ( + -- * REST Resource + AchievementConfigurationsPatchAPI + + -- * Creating a Request + , achievementConfigurationsPatch + , AchievementConfigurationsPatch + + -- * Request Lenses + , acpQuotaUser + , acpPrettyPrint + , acpAchievementId + , acpUserIp + , acpKey + , acpOauthToken + , acpFields + , acpAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsPatch@ which the +-- 'AchievementConfigurationsPatch' request conforms to. +type AchievementConfigurationsPatchAPI = + "achievements" :> + Capture "achievementId" Text :> + Patch '[JSON] AchievementConfiguration + +-- | Update the metadata of the achievement configuration with the given ID. +-- This method supports patch semantics. +-- +-- /See:/ 'achievementConfigurationsPatch' smart constructor. +data AchievementConfigurationsPatch = AchievementConfigurationsPatch + { _acpQuotaUser :: !(Maybe Text) + , _acpPrettyPrint :: !Bool + , _acpAchievementId :: !Text + , _acpUserIp :: !(Maybe Text) + , _acpKey :: !(Maybe Text) + , _acpOauthToken :: !(Maybe Text) + , _acpFields :: !(Maybe Text) + , _acpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acpQuotaUser' +-- +-- * 'acpPrettyPrint' +-- +-- * 'acpAchievementId' +-- +-- * 'acpUserIp' +-- +-- * 'acpKey' +-- +-- * 'acpOauthToken' +-- +-- * 'acpFields' +-- +-- * 'acpAlt' +achievementConfigurationsPatch + :: Text -- ^ 'achievementId' + -> AchievementConfigurationsPatch +achievementConfigurationsPatch pAcpAchievementId_ = + AchievementConfigurationsPatch + { _acpQuotaUser = Nothing + , _acpPrettyPrint = True + , _acpAchievementId = pAcpAchievementId_ + , _acpUserIp = Nothing + , _acpKey = Nothing + , _acpOauthToken = Nothing + , _acpFields = Nothing + , _acpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acpQuotaUser :: Lens' AchievementConfigurationsPatch' (Maybe Text) +acpQuotaUser + = lens _acpQuotaUser (\ s a -> s{_acpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acpPrettyPrint :: Lens' AchievementConfigurationsPatch' Bool +acpPrettyPrint + = lens _acpPrettyPrint + (\ s a -> s{_acpPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +acpAchievementId :: Lens' AchievementConfigurationsPatch' Text +acpAchievementId + = lens _acpAchievementId + (\ s a -> s{_acpAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acpUserIp :: Lens' AchievementConfigurationsPatch' (Maybe Text) +acpUserIp + = lens _acpUserIp (\ s a -> s{_acpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acpKey :: Lens' AchievementConfigurationsPatch' (Maybe Text) +acpKey = lens _acpKey (\ s a -> s{_acpKey = a}) + +-- | OAuth 2.0 token for the current user. +acpOauthToken :: Lens' AchievementConfigurationsPatch' (Maybe Text) +acpOauthToken + = lens _acpOauthToken + (\ s a -> s{_acpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acpFields :: Lens' AchievementConfigurationsPatch' (Maybe Text) +acpFields + = lens _acpFields (\ s a -> s{_acpFields = a}) + +-- | Data format for the response. +acpAlt :: Lens' AchievementConfigurationsPatch' Text +acpAlt = lens _acpAlt (\ s a -> s{_acpAlt = a}) + +instance GoogleRequest + AchievementConfigurationsPatch' where + type Rs AchievementConfigurationsPatch' = + AchievementConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + AchievementConfigurationsPatch{..} + = go _acpQuotaUser _acpPrettyPrint _acpAchievementId + _acpUserIp + _acpKey + _acpOauthToken + _acpFields + _acpAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsPatchAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Update.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Update.hs new file mode 100644 index 000000000..dab4df44b --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Update.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the metadata of the achievement configuration with the given ID. +-- +-- /See:/ for @GamesConfigurationAchievementConfigurationsUpdate@. +module GamesConfiguration.AchievementConfigurations.Update + ( + -- * REST Resource + AchievementConfigurationsUpdateAPI + + -- * Creating a Request + , achievementConfigurationsUpdate + , AchievementConfigurationsUpdate + + -- * Request Lenses + , acuQuotaUser + , acuPrettyPrint + , acuAchievementId + , acuUserIp + , acuKey + , acuOauthToken + , acuFields + , acuAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationAchievementConfigurationsUpdate@ which the +-- 'AchievementConfigurationsUpdate' request conforms to. +type AchievementConfigurationsUpdateAPI = + "achievements" :> + Capture "achievementId" Text :> + Put '[JSON] AchievementConfiguration + +-- | Update the metadata of the achievement configuration with the given ID. +-- +-- /See:/ 'achievementConfigurationsUpdate' smart constructor. +data AchievementConfigurationsUpdate = AchievementConfigurationsUpdate + { _acuQuotaUser :: !(Maybe Text) + , _acuPrettyPrint :: !Bool + , _acuAchievementId :: !Text + , _acuUserIp :: !(Maybe Text) + , _acuKey :: !(Maybe Text) + , _acuOauthToken :: !(Maybe Text) + , _acuFields :: !(Maybe Text) + , _acuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementConfigurationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acuQuotaUser' +-- +-- * 'acuPrettyPrint' +-- +-- * 'acuAchievementId' +-- +-- * 'acuUserIp' +-- +-- * 'acuKey' +-- +-- * 'acuOauthToken' +-- +-- * 'acuFields' +-- +-- * 'acuAlt' +achievementConfigurationsUpdate + :: Text -- ^ 'achievementId' + -> AchievementConfigurationsUpdate +achievementConfigurationsUpdate pAcuAchievementId_ = + AchievementConfigurationsUpdate + { _acuQuotaUser = Nothing + , _acuPrettyPrint = True + , _acuAchievementId = pAcuAchievementId_ + , _acuUserIp = Nothing + , _acuKey = Nothing + , _acuOauthToken = Nothing + , _acuFields = Nothing + , _acuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acuQuotaUser :: Lens' AchievementConfigurationsUpdate' (Maybe Text) +acuQuotaUser + = lens _acuQuotaUser (\ s a -> s{_acuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acuPrettyPrint :: Lens' AchievementConfigurationsUpdate' Bool +acuPrettyPrint + = lens _acuPrettyPrint + (\ s a -> s{_acuPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +acuAchievementId :: Lens' AchievementConfigurationsUpdate' Text +acuAchievementId + = lens _acuAchievementId + (\ s a -> s{_acuAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acuUserIp :: Lens' AchievementConfigurationsUpdate' (Maybe Text) +acuUserIp + = lens _acuUserIp (\ s a -> s{_acuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acuKey :: Lens' AchievementConfigurationsUpdate' (Maybe Text) +acuKey = lens _acuKey (\ s a -> s{_acuKey = a}) + +-- | OAuth 2.0 token for the current user. +acuOauthToken :: Lens' AchievementConfigurationsUpdate' (Maybe Text) +acuOauthToken + = lens _acuOauthToken + (\ s a -> s{_acuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acuFields :: Lens' AchievementConfigurationsUpdate' (Maybe Text) +acuFields + = lens _acuFields (\ s a -> s{_acuFields = a}) + +-- | Data format for the response. +acuAlt :: Lens' AchievementConfigurationsUpdate' Text +acuAlt = lens _acuAlt (\ s a -> s{_acuAlt = a}) + +instance GoogleRequest + AchievementConfigurationsUpdate' where + type Rs AchievementConfigurationsUpdate' = + AchievementConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + AchievementConfigurationsUpdate{..} + = go _acuQuotaUser _acuPrettyPrint _acuAchievementId + _acuUserIp + _acuKey + _acuOauthToken + _acuFields + _acuAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementConfigurationsUpdateAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/ImageConfigurations/Upload.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/ImageConfigurations/Upload.hs new file mode 100644 index 000000000..c4750f2b6 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/ImageConfigurations/Upload.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.ImageConfigurations.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads an image for a resource with the given ID and image type. +-- +-- /See:/ for @GamesConfigurationImageConfigurationsUpload@. +module GamesConfiguration.ImageConfigurations.Upload + ( + -- * REST Resource + ImageConfigurationsUploadAPI + + -- * Creating a Request + , imageConfigurationsUpload + , ImageConfigurationsUpload + + -- * Request Lenses + , icuQuotaUser + , icuResourceId + , icuPrettyPrint + , icuUserIp + , icuImageType + , icuKey + , icuOauthToken + , icuFields + , icuAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationImageConfigurationsUpload@ which the +-- 'ImageConfigurationsUpload' request conforms to. +type ImageConfigurationsUploadAPI = + "images" :> + Capture "resourceId" Text :> + "imageType" :> + Capture "imageType" Text :> + Post '[JSON] ImageConfiguration + +-- | Uploads an image for a resource with the given ID and image type. +-- +-- /See:/ 'imageConfigurationsUpload' smart constructor. +data ImageConfigurationsUpload = ImageConfigurationsUpload + { _icuQuotaUser :: !(Maybe Text) + , _icuResourceId :: !Text + , _icuPrettyPrint :: !Bool + , _icuUserIp :: !(Maybe Text) + , _icuImageType :: !Text + , _icuKey :: !(Maybe Text) + , _icuOauthToken :: !(Maybe Text) + , _icuFields :: !(Maybe Text) + , _icuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImageConfigurationsUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icuQuotaUser' +-- +-- * 'icuResourceId' +-- +-- * 'icuPrettyPrint' +-- +-- * 'icuUserIp' +-- +-- * 'icuImageType' +-- +-- * 'icuKey' +-- +-- * 'icuOauthToken' +-- +-- * 'icuFields' +-- +-- * 'icuAlt' +imageConfigurationsUpload + :: Text -- ^ 'resourceId' + -> Text -- ^ 'imageType' + -> ImageConfigurationsUpload +imageConfigurationsUpload pIcuResourceId_ pIcuImageType_ = + ImageConfigurationsUpload + { _icuQuotaUser = Nothing + , _icuResourceId = pIcuResourceId_ + , _icuPrettyPrint = True + , _icuUserIp = Nothing + , _icuImageType = pIcuImageType_ + , _icuKey = Nothing + , _icuOauthToken = Nothing + , _icuFields = Nothing + , _icuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +icuQuotaUser :: Lens' ImageConfigurationsUpload' (Maybe Text) +icuQuotaUser + = lens _icuQuotaUser (\ s a -> s{_icuQuotaUser = a}) + +-- | The ID of the resource used by this method. +icuResourceId :: Lens' ImageConfigurationsUpload' Text +icuResourceId + = lens _icuResourceId + (\ s a -> s{_icuResourceId = a}) + +-- | Returns response with indentations and line breaks. +icuPrettyPrint :: Lens' ImageConfigurationsUpload' Bool +icuPrettyPrint + = lens _icuPrettyPrint + (\ s a -> s{_icuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +icuUserIp :: Lens' ImageConfigurationsUpload' (Maybe Text) +icuUserIp + = lens _icuUserIp (\ s a -> s{_icuUserIp = a}) + +-- | Selects which image in a resource for this method. +icuImageType :: Lens' ImageConfigurationsUpload' Text +icuImageType + = lens _icuImageType (\ s a -> s{_icuImageType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +icuKey :: Lens' ImageConfigurationsUpload' (Maybe Text) +icuKey = lens _icuKey (\ s a -> s{_icuKey = a}) + +-- | OAuth 2.0 token for the current user. +icuOauthToken :: Lens' ImageConfigurationsUpload' (Maybe Text) +icuOauthToken + = lens _icuOauthToken + (\ s a -> s{_icuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +icuFields :: Lens' ImageConfigurationsUpload' (Maybe Text) +icuFields + = lens _icuFields (\ s a -> s{_icuFields = a}) + +-- | Data format for the response. +icuAlt :: Lens' ImageConfigurationsUpload' Text +icuAlt = lens _icuAlt (\ s a -> s{_icuAlt = a}) + +instance GoogleRequest ImageConfigurationsUpload' + where + type Rs ImageConfigurationsUpload' = + ImageConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u ImageConfigurationsUpload{..} + = go _icuQuotaUser _icuResourceId _icuPrettyPrint + _icuUserIp + _icuImageType + _icuKey + _icuOauthToken + _icuFields + _icuAlt + where go + = clientWithRoute + (Proxy :: Proxy ImageConfigurationsUploadAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Delete.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Delete.hs new file mode 100644 index 000000000..08734e49e --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Delete.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete the leaderboard configuration with the given ID. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsDelete@. +module GamesConfiguration.LeaderboardConfigurations.Delete + ( + -- * REST Resource + LeaderboardConfigurationsDeleteAPI + + -- * Creating a Request + , leaderboardConfigurationsDelete + , LeaderboardConfigurationsDelete + + -- * Request Lenses + , lcdQuotaUser + , lcdPrettyPrint + , lcdUserIp + , lcdLeaderboardId + , lcdKey + , lcdOauthToken + , lcdFields + , lcdAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsDelete@ which the +-- 'LeaderboardConfigurationsDelete' request conforms to. +type LeaderboardConfigurationsDeleteAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> Delete '[JSON] () + +-- | Delete the leaderboard configuration with the given ID. +-- +-- /See:/ 'leaderboardConfigurationsDelete' smart constructor. +data LeaderboardConfigurationsDelete = LeaderboardConfigurationsDelete + { _lcdQuotaUser :: !(Maybe Text) + , _lcdPrettyPrint :: !Bool + , _lcdUserIp :: !(Maybe Text) + , _lcdLeaderboardId :: !Text + , _lcdKey :: !(Maybe Text) + , _lcdOauthToken :: !(Maybe Text) + , _lcdFields :: !(Maybe Text) + , _lcdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcdQuotaUser' +-- +-- * 'lcdPrettyPrint' +-- +-- * 'lcdUserIp' +-- +-- * 'lcdLeaderboardId' +-- +-- * 'lcdKey' +-- +-- * 'lcdOauthToken' +-- +-- * 'lcdFields' +-- +-- * 'lcdAlt' +leaderboardConfigurationsDelete + :: Text -- ^ 'leaderboardId' + -> LeaderboardConfigurationsDelete +leaderboardConfigurationsDelete pLcdLeaderboardId_ = + LeaderboardConfigurationsDelete + { _lcdQuotaUser = Nothing + , _lcdPrettyPrint = True + , _lcdUserIp = Nothing + , _lcdLeaderboardId = pLcdLeaderboardId_ + , _lcdKey = Nothing + , _lcdOauthToken = Nothing + , _lcdFields = Nothing + , _lcdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcdQuotaUser :: Lens' LeaderboardConfigurationsDelete' (Maybe Text) +lcdQuotaUser + = lens _lcdQuotaUser (\ s a -> s{_lcdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcdPrettyPrint :: Lens' LeaderboardConfigurationsDelete' Bool +lcdPrettyPrint + = lens _lcdPrettyPrint + (\ s a -> s{_lcdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcdUserIp :: Lens' LeaderboardConfigurationsDelete' (Maybe Text) +lcdUserIp + = lens _lcdUserIp (\ s a -> s{_lcdUserIp = a}) + +-- | The ID of the leaderboard. +lcdLeaderboardId :: Lens' LeaderboardConfigurationsDelete' Text +lcdLeaderboardId + = lens _lcdLeaderboardId + (\ s a -> s{_lcdLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcdKey :: Lens' LeaderboardConfigurationsDelete' (Maybe Text) +lcdKey = lens _lcdKey (\ s a -> s{_lcdKey = a}) + +-- | OAuth 2.0 token for the current user. +lcdOauthToken :: Lens' LeaderboardConfigurationsDelete' (Maybe Text) +lcdOauthToken + = lens _lcdOauthToken + (\ s a -> s{_lcdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcdFields :: Lens' LeaderboardConfigurationsDelete' (Maybe Text) +lcdFields + = lens _lcdFields (\ s a -> s{_lcdFields = a}) + +-- | Data format for the response. +lcdAlt :: Lens' LeaderboardConfigurationsDelete' Text +lcdAlt = lens _lcdAlt (\ s a -> s{_lcdAlt = a}) + +instance GoogleRequest + LeaderboardConfigurationsDelete' where + type Rs LeaderboardConfigurationsDelete' = () + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + LeaderboardConfigurationsDelete{..} + = go _lcdQuotaUser _lcdPrettyPrint _lcdUserIp + _lcdLeaderboardId + _lcdKey + _lcdOauthToken + _lcdFields + _lcdAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsDeleteAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Get.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Get.hs new file mode 100644 index 000000000..d7327413b --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the metadata of the leaderboard configuration with the given +-- ID. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsGet@. +module GamesConfiguration.LeaderboardConfigurations.Get + ( + -- * REST Resource + LeaderboardConfigurationsGetAPI + + -- * Creating a Request + , leaderboardConfigurationsGet + , LeaderboardConfigurationsGet + + -- * Request Lenses + , lcgQuotaUser + , lcgPrettyPrint + , lcgUserIp + , lcgLeaderboardId + , lcgKey + , lcgOauthToken + , lcgFields + , lcgAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsGet@ which the +-- 'LeaderboardConfigurationsGet' request conforms to. +type LeaderboardConfigurationsGetAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + Get '[JSON] LeaderboardConfiguration + +-- | Retrieves the metadata of the leaderboard configuration with the given +-- ID. +-- +-- /See:/ 'leaderboardConfigurationsGet' smart constructor. +data LeaderboardConfigurationsGet = LeaderboardConfigurationsGet + { _lcgQuotaUser :: !(Maybe Text) + , _lcgPrettyPrint :: !Bool + , _lcgUserIp :: !(Maybe Text) + , _lcgLeaderboardId :: !Text + , _lcgKey :: !(Maybe Text) + , _lcgOauthToken :: !(Maybe Text) + , _lcgFields :: !(Maybe Text) + , _lcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcgQuotaUser' +-- +-- * 'lcgPrettyPrint' +-- +-- * 'lcgUserIp' +-- +-- * 'lcgLeaderboardId' +-- +-- * 'lcgKey' +-- +-- * 'lcgOauthToken' +-- +-- * 'lcgFields' +-- +-- * 'lcgAlt' +leaderboardConfigurationsGet + :: Text -- ^ 'leaderboardId' + -> LeaderboardConfigurationsGet +leaderboardConfigurationsGet pLcgLeaderboardId_ = + LeaderboardConfigurationsGet + { _lcgQuotaUser = Nothing + , _lcgPrettyPrint = True + , _lcgUserIp = Nothing + , _lcgLeaderboardId = pLcgLeaderboardId_ + , _lcgKey = Nothing + , _lcgOauthToken = Nothing + , _lcgFields = Nothing + , _lcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcgQuotaUser :: Lens' LeaderboardConfigurationsGet' (Maybe Text) +lcgQuotaUser + = lens _lcgQuotaUser (\ s a -> s{_lcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcgPrettyPrint :: Lens' LeaderboardConfigurationsGet' Bool +lcgPrettyPrint + = lens _lcgPrettyPrint + (\ s a -> s{_lcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcgUserIp :: Lens' LeaderboardConfigurationsGet' (Maybe Text) +lcgUserIp + = lens _lcgUserIp (\ s a -> s{_lcgUserIp = a}) + +-- | The ID of the leaderboard. +lcgLeaderboardId :: Lens' LeaderboardConfigurationsGet' Text +lcgLeaderboardId + = lens _lcgLeaderboardId + (\ s a -> s{_lcgLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcgKey :: Lens' LeaderboardConfigurationsGet' (Maybe Text) +lcgKey = lens _lcgKey (\ s a -> s{_lcgKey = a}) + +-- | OAuth 2.0 token for the current user. +lcgOauthToken :: Lens' LeaderboardConfigurationsGet' (Maybe Text) +lcgOauthToken + = lens _lcgOauthToken + (\ s a -> s{_lcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcgFields :: Lens' LeaderboardConfigurationsGet' (Maybe Text) +lcgFields + = lens _lcgFields (\ s a -> s{_lcgFields = a}) + +-- | Data format for the response. +lcgAlt :: Lens' LeaderboardConfigurationsGet' Text +lcgAlt = lens _lcgAlt (\ s a -> s{_lcgAlt = a}) + +instance GoogleRequest LeaderboardConfigurationsGet' + where + type Rs LeaderboardConfigurationsGet' = + LeaderboardConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u LeaderboardConfigurationsGet{..} + = go _lcgQuotaUser _lcgPrettyPrint _lcgUserIp + _lcgLeaderboardId + _lcgKey + _lcgOauthToken + _lcgFields + _lcgAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsGetAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Insert.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Insert.hs new file mode 100644 index 000000000..e42e66464 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Insert.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Insert a new leaderboard configuration in this application. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsInsert@. +module GamesConfiguration.LeaderboardConfigurations.Insert + ( + -- * REST Resource + LeaderboardConfigurationsInsertAPI + + -- * Creating a Request + , leaderboardConfigurationsInsert + , LeaderboardConfigurationsInsert + + -- * Request Lenses + , lciQuotaUser + , lciPrettyPrint + , lciUserIp + , lciApplicationId + , lciKey + , lciOauthToken + , lciFields + , lciAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsInsert@ which the +-- 'LeaderboardConfigurationsInsert' request conforms to. +type LeaderboardConfigurationsInsertAPI = + "applications" :> + Capture "applicationId" Text :> + "leaderboards" :> + Post '[JSON] LeaderboardConfiguration + +-- | Insert a new leaderboard configuration in this application. +-- +-- /See:/ 'leaderboardConfigurationsInsert' smart constructor. +data LeaderboardConfigurationsInsert = LeaderboardConfigurationsInsert + { _lciQuotaUser :: !(Maybe Text) + , _lciPrettyPrint :: !Bool + , _lciUserIp :: !(Maybe Text) + , _lciApplicationId :: !Text + , _lciKey :: !(Maybe Text) + , _lciOauthToken :: !(Maybe Text) + , _lciFields :: !(Maybe Text) + , _lciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lciQuotaUser' +-- +-- * 'lciPrettyPrint' +-- +-- * 'lciUserIp' +-- +-- * 'lciApplicationId' +-- +-- * 'lciKey' +-- +-- * 'lciOauthToken' +-- +-- * 'lciFields' +-- +-- * 'lciAlt' +leaderboardConfigurationsInsert + :: Text -- ^ 'applicationId' + -> LeaderboardConfigurationsInsert +leaderboardConfigurationsInsert pLciApplicationId_ = + LeaderboardConfigurationsInsert + { _lciQuotaUser = Nothing + , _lciPrettyPrint = True + , _lciUserIp = Nothing + , _lciApplicationId = pLciApplicationId_ + , _lciKey = Nothing + , _lciOauthToken = Nothing + , _lciFields = Nothing + , _lciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lciQuotaUser :: Lens' LeaderboardConfigurationsInsert' (Maybe Text) +lciQuotaUser + = lens _lciQuotaUser (\ s a -> s{_lciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lciPrettyPrint :: Lens' LeaderboardConfigurationsInsert' Bool +lciPrettyPrint + = lens _lciPrettyPrint + (\ s a -> s{_lciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lciUserIp :: Lens' LeaderboardConfigurationsInsert' (Maybe Text) +lciUserIp + = lens _lciUserIp (\ s a -> s{_lciUserIp = a}) + +-- | The application ID from the Google Play developer console. +lciApplicationId :: Lens' LeaderboardConfigurationsInsert' Text +lciApplicationId + = lens _lciApplicationId + (\ s a -> s{_lciApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lciKey :: Lens' LeaderboardConfigurationsInsert' (Maybe Text) +lciKey = lens _lciKey (\ s a -> s{_lciKey = a}) + +-- | OAuth 2.0 token for the current user. +lciOauthToken :: Lens' LeaderboardConfigurationsInsert' (Maybe Text) +lciOauthToken + = lens _lciOauthToken + (\ s a -> s{_lciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lciFields :: Lens' LeaderboardConfigurationsInsert' (Maybe Text) +lciFields + = lens _lciFields (\ s a -> s{_lciFields = a}) + +-- | Data format for the response. +lciAlt :: Lens' LeaderboardConfigurationsInsert' Text +lciAlt = lens _lciAlt (\ s a -> s{_lciAlt = a}) + +instance GoogleRequest + LeaderboardConfigurationsInsert' where + type Rs LeaderboardConfigurationsInsert' = + LeaderboardConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + LeaderboardConfigurationsInsert{..} + = go _lciQuotaUser _lciPrettyPrint _lciUserIp + _lciApplicationId + _lciKey + _lciOauthToken + _lciFields + _lciAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsInsertAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/List.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/List.hs new file mode 100644 index 000000000..021d90371 --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/List.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of the leaderboard configurations in this application. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsList@. +module GamesConfiguration.LeaderboardConfigurations.List + ( + -- * REST Resource + LeaderboardConfigurationsListAPI + + -- * Creating a Request + , leaderboardConfigurationsList + , LeaderboardConfigurationsList + + -- * Request Lenses + , lclQuotaUser + , lclPrettyPrint + , lclUserIp + , lclApplicationId + , lclKey + , lclPageToken + , lclOauthToken + , lclMaxResults + , lclFields + , lclAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsList@ which the +-- 'LeaderboardConfigurationsList' request conforms to. +type LeaderboardConfigurationsListAPI = + "applications" :> + Capture "applicationId" Text :> + "leaderboards" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] LeaderboardConfigurationListResponse + +-- | Returns a list of the leaderboard configurations in this application. +-- +-- /See:/ 'leaderboardConfigurationsList' smart constructor. +data LeaderboardConfigurationsList = LeaderboardConfigurationsList + { _lclQuotaUser :: !(Maybe Text) + , _lclPrettyPrint :: !Bool + , _lclUserIp :: !(Maybe Text) + , _lclApplicationId :: !Text + , _lclKey :: !(Maybe Text) + , _lclPageToken :: !(Maybe Text) + , _lclOauthToken :: !(Maybe Text) + , _lclMaxResults :: !(Maybe Int32) + , _lclFields :: !(Maybe Text) + , _lclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lclQuotaUser' +-- +-- * 'lclPrettyPrint' +-- +-- * 'lclUserIp' +-- +-- * 'lclApplicationId' +-- +-- * 'lclKey' +-- +-- * 'lclPageToken' +-- +-- * 'lclOauthToken' +-- +-- * 'lclMaxResults' +-- +-- * 'lclFields' +-- +-- * 'lclAlt' +leaderboardConfigurationsList + :: Text -- ^ 'applicationId' + -> LeaderboardConfigurationsList +leaderboardConfigurationsList pLclApplicationId_ = + LeaderboardConfigurationsList + { _lclQuotaUser = Nothing + , _lclPrettyPrint = True + , _lclUserIp = Nothing + , _lclApplicationId = pLclApplicationId_ + , _lclKey = Nothing + , _lclPageToken = Nothing + , _lclOauthToken = Nothing + , _lclMaxResults = Nothing + , _lclFields = Nothing + , _lclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lclQuotaUser :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclQuotaUser + = lens _lclQuotaUser (\ s a -> s{_lclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lclPrettyPrint :: Lens' LeaderboardConfigurationsList' Bool +lclPrettyPrint + = lens _lclPrettyPrint + (\ s a -> s{_lclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lclUserIp :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclUserIp + = lens _lclUserIp (\ s a -> s{_lclUserIp = a}) + +-- | The application ID from the Google Play developer console. +lclApplicationId :: Lens' LeaderboardConfigurationsList' Text +lclApplicationId + = lens _lclApplicationId + (\ s a -> s{_lclApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lclKey :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclKey = lens _lclKey (\ s a -> s{_lclKey = a}) + +-- | The token returned by the previous request. +lclPageToken :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclPageToken + = lens _lclPageToken (\ s a -> s{_lclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lclOauthToken :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclOauthToken + = lens _lclOauthToken + (\ s a -> s{_lclOauthToken = a}) + +-- | The maximum number of resource configurations to return in the response, +-- used for paging. For any response, the actual number of resources +-- returned may be less than the specified maxResults. +lclMaxResults :: Lens' LeaderboardConfigurationsList' (Maybe Int32) +lclMaxResults + = lens _lclMaxResults + (\ s a -> s{_lclMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lclFields :: Lens' LeaderboardConfigurationsList' (Maybe Text) +lclFields + = lens _lclFields (\ s a -> s{_lclFields = a}) + +-- | Data format for the response. +lclAlt :: Lens' LeaderboardConfigurationsList' Text +lclAlt = lens _lclAlt (\ s a -> s{_lclAlt = a}) + +instance GoogleRequest LeaderboardConfigurationsList' + where + type Rs LeaderboardConfigurationsList' = + LeaderboardConfigurationListResponse + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + LeaderboardConfigurationsList{..} + = go _lclQuotaUser _lclPrettyPrint _lclUserIp + _lclApplicationId + _lclKey + _lclPageToken + _lclOauthToken + _lclMaxResults + _lclFields + _lclAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsListAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Patch.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Patch.hs new file mode 100644 index 000000000..05f5040bf --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Patch.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the metadata of the leaderboard configuration with the given ID. +-- This method supports patch semantics. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsPatch@. +module GamesConfiguration.LeaderboardConfigurations.Patch + ( + -- * REST Resource + LeaderboardConfigurationsPatchAPI + + -- * Creating a Request + , leaderboardConfigurationsPatch + , LeaderboardConfigurationsPatch + + -- * Request Lenses + , lcpQuotaUser + , lcpPrettyPrint + , lcpUserIp + , lcpLeaderboardId + , lcpKey + , lcpOauthToken + , lcpFields + , lcpAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsPatch@ which the +-- 'LeaderboardConfigurationsPatch' request conforms to. +type LeaderboardConfigurationsPatchAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + Patch '[JSON] LeaderboardConfiguration + +-- | Update the metadata of the leaderboard configuration with the given ID. +-- This method supports patch semantics. +-- +-- /See:/ 'leaderboardConfigurationsPatch' smart constructor. +data LeaderboardConfigurationsPatch = LeaderboardConfigurationsPatch + { _lcpQuotaUser :: !(Maybe Text) + , _lcpPrettyPrint :: !Bool + , _lcpUserIp :: !(Maybe Text) + , _lcpLeaderboardId :: !Text + , _lcpKey :: !(Maybe Text) + , _lcpOauthToken :: !(Maybe Text) + , _lcpFields :: !(Maybe Text) + , _lcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcpQuotaUser' +-- +-- * 'lcpPrettyPrint' +-- +-- * 'lcpUserIp' +-- +-- * 'lcpLeaderboardId' +-- +-- * 'lcpKey' +-- +-- * 'lcpOauthToken' +-- +-- * 'lcpFields' +-- +-- * 'lcpAlt' +leaderboardConfigurationsPatch + :: Text -- ^ 'leaderboardId' + -> LeaderboardConfigurationsPatch +leaderboardConfigurationsPatch pLcpLeaderboardId_ = + LeaderboardConfigurationsPatch + { _lcpQuotaUser = Nothing + , _lcpPrettyPrint = True + , _lcpUserIp = Nothing + , _lcpLeaderboardId = pLcpLeaderboardId_ + , _lcpKey = Nothing + , _lcpOauthToken = Nothing + , _lcpFields = Nothing + , _lcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcpQuotaUser :: Lens' LeaderboardConfigurationsPatch' (Maybe Text) +lcpQuotaUser + = lens _lcpQuotaUser (\ s a -> s{_lcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcpPrettyPrint :: Lens' LeaderboardConfigurationsPatch' Bool +lcpPrettyPrint + = lens _lcpPrettyPrint + (\ s a -> s{_lcpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcpUserIp :: Lens' LeaderboardConfigurationsPatch' (Maybe Text) +lcpUserIp + = lens _lcpUserIp (\ s a -> s{_lcpUserIp = a}) + +-- | The ID of the leaderboard. +lcpLeaderboardId :: Lens' LeaderboardConfigurationsPatch' Text +lcpLeaderboardId + = lens _lcpLeaderboardId + (\ s a -> s{_lcpLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcpKey :: Lens' LeaderboardConfigurationsPatch' (Maybe Text) +lcpKey = lens _lcpKey (\ s a -> s{_lcpKey = a}) + +-- | OAuth 2.0 token for the current user. +lcpOauthToken :: Lens' LeaderboardConfigurationsPatch' (Maybe Text) +lcpOauthToken + = lens _lcpOauthToken + (\ s a -> s{_lcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcpFields :: Lens' LeaderboardConfigurationsPatch' (Maybe Text) +lcpFields + = lens _lcpFields (\ s a -> s{_lcpFields = a}) + +-- | Data format for the response. +lcpAlt :: Lens' LeaderboardConfigurationsPatch' Text +lcpAlt = lens _lcpAlt (\ s a -> s{_lcpAlt = a}) + +instance GoogleRequest + LeaderboardConfigurationsPatch' where + type Rs LeaderboardConfigurationsPatch' = + LeaderboardConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + LeaderboardConfigurationsPatch{..} + = go _lcpQuotaUser _lcpPrettyPrint _lcpUserIp + _lcpLeaderboardId + _lcpKey + _lcpOauthToken + _lcpFields + _lcpAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsPatchAPI) + r + u diff --git a/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Update.hs b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Update.hs new file mode 100644 index 000000000..b3c0f10cc --- /dev/null +++ b/gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Update.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the metadata of the leaderboard configuration with the given ID. +-- +-- /See:/ for @GamesConfigurationLeaderboardConfigurationsUpdate@. +module GamesConfiguration.LeaderboardConfigurations.Update + ( + -- * REST Resource + LeaderboardConfigurationsUpdateAPI + + -- * Creating a Request + , leaderboardConfigurationsUpdate + , LeaderboardConfigurationsUpdate + + -- * Request Lenses + , lcuQuotaUser + , lcuPrettyPrint + , lcuUserIp + , lcuLeaderboardId + , lcuKey + , lcuOauthToken + , lcuFields + , lcuAlt + ) where + +import Network.Google.GamesConfiguration.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesConfigurationLeaderboardConfigurationsUpdate@ which the +-- 'LeaderboardConfigurationsUpdate' request conforms to. +type LeaderboardConfigurationsUpdateAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + Put '[JSON] LeaderboardConfiguration + +-- | Update the metadata of the leaderboard configuration with the given ID. +-- +-- /See:/ 'leaderboardConfigurationsUpdate' smart constructor. +data LeaderboardConfigurationsUpdate = LeaderboardConfigurationsUpdate + { _lcuQuotaUser :: !(Maybe Text) + , _lcuPrettyPrint :: !Bool + , _lcuUserIp :: !(Maybe Text) + , _lcuLeaderboardId :: !Text + , _lcuKey :: !(Maybe Text) + , _lcuOauthToken :: !(Maybe Text) + , _lcuFields :: !(Maybe Text) + , _lcuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardConfigurationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcuQuotaUser' +-- +-- * 'lcuPrettyPrint' +-- +-- * 'lcuUserIp' +-- +-- * 'lcuLeaderboardId' +-- +-- * 'lcuKey' +-- +-- * 'lcuOauthToken' +-- +-- * 'lcuFields' +-- +-- * 'lcuAlt' +leaderboardConfigurationsUpdate + :: Text -- ^ 'leaderboardId' + -> LeaderboardConfigurationsUpdate +leaderboardConfigurationsUpdate pLcuLeaderboardId_ = + LeaderboardConfigurationsUpdate + { _lcuQuotaUser = Nothing + , _lcuPrettyPrint = True + , _lcuUserIp = Nothing + , _lcuLeaderboardId = pLcuLeaderboardId_ + , _lcuKey = Nothing + , _lcuOauthToken = Nothing + , _lcuFields = Nothing + , _lcuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcuQuotaUser :: Lens' LeaderboardConfigurationsUpdate' (Maybe Text) +lcuQuotaUser + = lens _lcuQuotaUser (\ s a -> s{_lcuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcuPrettyPrint :: Lens' LeaderboardConfigurationsUpdate' Bool +lcuPrettyPrint + = lens _lcuPrettyPrint + (\ s a -> s{_lcuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcuUserIp :: Lens' LeaderboardConfigurationsUpdate' (Maybe Text) +lcuUserIp + = lens _lcuUserIp (\ s a -> s{_lcuUserIp = a}) + +-- | The ID of the leaderboard. +lcuLeaderboardId :: Lens' LeaderboardConfigurationsUpdate' Text +lcuLeaderboardId + = lens _lcuLeaderboardId + (\ s a -> s{_lcuLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcuKey :: Lens' LeaderboardConfigurationsUpdate' (Maybe Text) +lcuKey = lens _lcuKey (\ s a -> s{_lcuKey = a}) + +-- | OAuth 2.0 token for the current user. +lcuOauthToken :: Lens' LeaderboardConfigurationsUpdate' (Maybe Text) +lcuOauthToken + = lens _lcuOauthToken + (\ s a -> s{_lcuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcuFields :: Lens' LeaderboardConfigurationsUpdate' (Maybe Text) +lcuFields + = lens _lcuFields (\ s a -> s{_lcuFields = a}) + +-- | Data format for the response. +lcuAlt :: Lens' LeaderboardConfigurationsUpdate' Text +lcuAlt = lens _lcuAlt (\ s a -> s{_lcuAlt = a}) + +instance GoogleRequest + LeaderboardConfigurationsUpdate' where + type Rs LeaderboardConfigurationsUpdate' = + LeaderboardConfiguration + request + = requestWithRoute defReq gamesConfigurationURL + requestWithRoute r u + LeaderboardConfigurationsUpdate{..} + = go _lcuQuotaUser _lcuPrettyPrint _lcuUserIp + _lcuLeaderboardId + _lcuKey + _lcuOauthToken + _lcuFields + _lcuAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardConfigurationsUpdateAPI) + r + u diff --git a/gogol-games-configuration/gogol-games-configuration.cabal b/gogol-games-configuration/gogol-games-configuration.cabal new file mode 100644 index 000000000..a9ac713ed --- /dev/null +++ b/gogol-games-configuration/gogol-games-configuration.cabal @@ -0,0 +1,55 @@ +name: gogol-games-configuration +version: 0.0.1 +synopsis: Google Play Game Services Publishing API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Publishing API for Google Play Game Services. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.GamesConfiguration + , Network.Google.GamesConfiguration.Types + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Delete + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Get + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Insert + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.List + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Patch + , Network.Google.Resource.GamesConfiguration.AchievementConfigurations.Update + , Network.Google.Resource.GamesConfiguration.ImageConfigurations.Upload + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Delete + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Get + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Insert + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.List + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Patch + , Network.Google.Resource.GamesConfiguration.LeaderboardConfigurations.Update + + other-modules: + Network.Google.GamesConfiguration.Types.Product + , Network.Google.GamesConfiguration.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-games-configuration/src/.gitkeep b/gogol-games-configuration/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-games-management/LICENSE b/gogol-games-management/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-games-management/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-games-management/Makefile b/gogol-games-management/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-games-management/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-games-management/README.md b/gogol-games-management/README.md new file mode 100644 index 000000000..eb300eb6c --- /dev/null +++ b/gogol-games-management/README.md @@ -0,0 +1,28 @@ +# gogol-games-management + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play Game Services Management API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-games-management` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-games-management/Setup.hs b/gogol-games-management/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-games-management/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-games-management/gen/Network/Google/GamesManagement.hs b/gogol-games-management/gen/Network/Google/GamesManagement.hs new file mode 100644 index 000000000..8c4ac6d86 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/GamesManagement.hs @@ -0,0 +1,253 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.GamesManagement +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Management API for Google Play Game Services. +-- +-- /See:/ +module Network.Google.GamesManagement + ( + -- * API + GamesManagementAPI + , gamesManagementAPI + , gamesManagementURL + + -- * Service Methods + + -- * REST Resources + + -- ** GamesManagementAchievementsReset + , module GamesManagement.Achievements.Reset + + -- ** GamesManagementAchievementsResetAll + , module GamesManagement.Achievements.ResetAll + + -- ** GamesManagementAchievementsResetAllForAllPlayers + , module GamesManagement.Achievements.ResetAllForAllPlayers + + -- ** GamesManagementAchievementsResetForAllPlayers + , module GamesManagement.Achievements.ResetForAllPlayers + + -- ** GamesManagementAchievementsResetMultipleForAllPlayers + , module GamesManagement.Achievements.ResetMultipleForAllPlayers + + -- ** GamesManagementApplicationsListHidden + , module GamesManagement.Applications.ListHidden + + -- ** GamesManagementEventsReset + , module GamesManagement.Events.Reset + + -- ** GamesManagementEventsResetAll + , module GamesManagement.Events.ResetAll + + -- ** GamesManagementEventsResetAllForAllPlayers + , module GamesManagement.Events.ResetAllForAllPlayers + + -- ** GamesManagementEventsResetForAllPlayers + , module GamesManagement.Events.ResetForAllPlayers + + -- ** GamesManagementEventsResetMultipleForAllPlayers + , module GamesManagement.Events.ResetMultipleForAllPlayers + + -- ** GamesManagementPlayersHide + , module GamesManagement.Players.Hide + + -- ** GamesManagementPlayersUnhide + , module GamesManagement.Players.Unhide + + -- ** GamesManagementQuestsReset + , module GamesManagement.Quests.Reset + + -- ** GamesManagementQuestsResetAll + , module GamesManagement.Quests.ResetAll + + -- ** GamesManagementQuestsResetAllForAllPlayers + , module GamesManagement.Quests.ResetAllForAllPlayers + + -- ** GamesManagementQuestsResetForAllPlayers + , module GamesManagement.Quests.ResetForAllPlayers + + -- ** GamesManagementQuestsResetMultipleForAllPlayers + , module GamesManagement.Quests.ResetMultipleForAllPlayers + + -- ** GamesManagementRoomsReset + , module GamesManagement.Rooms.Reset + + -- ** GamesManagementRoomsResetForAllPlayers + , module GamesManagement.Rooms.ResetForAllPlayers + + -- ** GamesManagementScoresReset + , module GamesManagement.Scores.Reset + + -- ** GamesManagementScoresResetAll + , module GamesManagement.Scores.ResetAll + + -- ** GamesManagementScoresResetAllForAllPlayers + , module GamesManagement.Scores.ResetAllForAllPlayers + + -- ** GamesManagementScoresResetForAllPlayers + , module GamesManagement.Scores.ResetForAllPlayers + + -- ** GamesManagementScoresResetMultipleForAllPlayers + , module GamesManagement.Scores.ResetMultipleForAllPlayers + + -- ** GamesManagementTurnBasedMatchesReset + , module GamesManagement.TurnBasedMatches.Reset + + -- ** GamesManagementTurnBasedMatchesResetForAllPlayers + , module GamesManagement.TurnBasedMatches.ResetForAllPlayers + + -- * Types + + -- ** GamesPlayerExperienceInfoResource + , GamesPlayerExperienceInfoResource + , gamesPlayerExperienceInfoResource + , gpeirCurrentExperiencePoints + , gpeirCurrentLevel + , gpeirNextLevel + , gpeirLastLevelUpTimestampMillis + + -- ** PlayerScoreResetAllResponse + , PlayerScoreResetAllResponse + , playerScoreResetAllResponse + , psrarResults + , psrarKind + + -- ** GamesPlayedResource + , GamesPlayedResource + , gamesPlayedResource + , gprAutoMatched + , gprTimeMillis + + -- ** GamesPlayerLevelResource + , GamesPlayerLevelResource + , gamesPlayerLevelResource + , gplrMaxExperiencePoints + , gplrMinExperiencePoints + , gplrLevel + + -- ** PlayerScoreResetResponse + , PlayerScoreResetResponse + , playerScoreResetResponse + , psrrKind + , psrrResetScoreTimeSpans + , psrrDefinitionId + + -- ** ScoresResetMultipleForAllRequest + , ScoresResetMultipleForAllRequest + , scoresResetMultipleForAllRequest + , srmfarKind + , srmfarLeaderboardIds + + -- ** HiddenPlayerList + , HiddenPlayerList + , hiddenPlayerList + , hplNextPageToken + , hplKind + , hplItems + + -- ** QuestsResetMultipleForAllRequest + , QuestsResetMultipleForAllRequest + , questsResetMultipleForAllRequest + , qrmfarKind + , qrmfarQuestIds + + -- ** EventsResetMultipleForAllRequest + , EventsResetMultipleForAllRequest + , eventsResetMultipleForAllRequest + , ermfarKind + , ermfarEventIds + + -- ** AchievementResetMultipleForAllRequest + , AchievementResetMultipleForAllRequest + , achievementResetMultipleForAllRequest + , armfarKind + , armfarAchievementIds + + -- ** HiddenPlayer + , HiddenPlayer + , hiddenPlayer + , hpKind + , hpHiddenTimeMillis + , hpPlayer + + -- ** AchievementResetAllResponse + , AchievementResetAllResponse + , achievementResetAllResponse + , ararResults + , ararKind + + -- ** Player + , Player + , player + , pLastPlayedWith + , pAvatarImageUrl + , pKind + , pExperienceInfo + , pName + , pDisplayName + , pTitle + , pPlayerId + + -- ** AchievementResetResponse + , AchievementResetResponse + , achievementResetResponse + , arrUpdateOccurred + , arrKind + , arrCurrentState + , arrDefinitionId + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude +import Network.Google.Resource.GamesManagement.Achievements.Reset +import Network.Google.Resource.GamesManagement.Achievements.ResetAll +import Network.Google.Resource.GamesManagement.Achievements.ResetAllForAllPlayers +import Network.Google.Resource.GamesManagement.Achievements.ResetForAllPlayers +import Network.Google.Resource.GamesManagement.Achievements.ResetMultipleForAllPlayers +import Network.Google.Resource.GamesManagement.Applications.ListHidden +import Network.Google.Resource.GamesManagement.Events.Reset +import Network.Google.Resource.GamesManagement.Events.ResetAll +import Network.Google.Resource.GamesManagement.Events.ResetAllForAllPlayers +import Network.Google.Resource.GamesManagement.Events.ResetForAllPlayers +import Network.Google.Resource.GamesManagement.Events.ResetMultipleForAllPlayers +import Network.Google.Resource.GamesManagement.Players.Hide +import Network.Google.Resource.GamesManagement.Players.Unhide +import Network.Google.Resource.GamesManagement.Quests.Reset +import Network.Google.Resource.GamesManagement.Quests.ResetAll +import Network.Google.Resource.GamesManagement.Quests.ResetAllForAllPlayers +import Network.Google.Resource.GamesManagement.Quests.ResetForAllPlayers +import Network.Google.Resource.GamesManagement.Quests.ResetMultipleForAllPlayers +import Network.Google.Resource.GamesManagement.Rooms.Reset +import Network.Google.Resource.GamesManagement.Rooms.ResetForAllPlayers +import Network.Google.Resource.GamesManagement.Scores.Reset +import Network.Google.Resource.GamesManagement.Scores.ResetAll +import Network.Google.Resource.GamesManagement.Scores.ResetAllForAllPlayers +import Network.Google.Resource.GamesManagement.Scores.ResetForAllPlayers +import Network.Google.Resource.GamesManagement.Scores.ResetMultipleForAllPlayers +import Network.Google.Resource.GamesManagement.TurnBasedMatches.Reset +import Network.Google.Resource.GamesManagement.TurnBasedMatches.ResetForAllPlayers + +{- $resources +TODO +-} + +type GamesManagementAPI = + Rooms :<|> Achievements :<|> Events :<|> Quests :<|> + Players + :<|> Scores + :<|> TurnBasedMatches + :<|> Applications + +gamesManagementAPI :: Proxy GamesManagementAPI +gamesManagementAPI = Proxy diff --git a/gogol-games-management/gen/Network/Google/GamesManagement/Types.hs b/gogol-games-management/gen/Network/Google/GamesManagement/Types.hs new file mode 100644 index 000000000..d0effb6a7 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/GamesManagement/Types.hs @@ -0,0 +1,128 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesManagement.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesManagement.Types + ( + -- * Service URL + gamesManagementURL + + -- * GamesPlayerExperienceInfoResource + , GamesPlayerExperienceInfoResource + , gamesPlayerExperienceInfoResource + , gpeirCurrentExperiencePoints + , gpeirCurrentLevel + , gpeirNextLevel + , gpeirLastLevelUpTimestampMillis + + -- * PlayerScoreResetAllResponse + , PlayerScoreResetAllResponse + , playerScoreResetAllResponse + , psrarResults + , psrarKind + + -- * GamesPlayedResource + , GamesPlayedResource + , gamesPlayedResource + , gprAutoMatched + , gprTimeMillis + + -- * GamesPlayerLevelResource + , GamesPlayerLevelResource + , gamesPlayerLevelResource + , gplrMaxExperiencePoints + , gplrMinExperiencePoints + , gplrLevel + + -- * PlayerScoreResetResponse + , PlayerScoreResetResponse + , playerScoreResetResponse + , psrrKind + , psrrResetScoreTimeSpans + , psrrDefinitionId + + -- * ScoresResetMultipleForAllRequest + , ScoresResetMultipleForAllRequest + , scoresResetMultipleForAllRequest + , srmfarKind + , srmfarLeaderboardIds + + -- * HiddenPlayerList + , HiddenPlayerList + , hiddenPlayerList + , hplNextPageToken + , hplKind + , hplItems + + -- * QuestsResetMultipleForAllRequest + , QuestsResetMultipleForAllRequest + , questsResetMultipleForAllRequest + , qrmfarKind + , qrmfarQuestIds + + -- * EventsResetMultipleForAllRequest + , EventsResetMultipleForAllRequest + , eventsResetMultipleForAllRequest + , ermfarKind + , ermfarEventIds + + -- * AchievementResetMultipleForAllRequest + , AchievementResetMultipleForAllRequest + , achievementResetMultipleForAllRequest + , armfarKind + , armfarAchievementIds + + -- * HiddenPlayer + , HiddenPlayer + , hiddenPlayer + , hpKind + , hpHiddenTimeMillis + , hpPlayer + + -- * AchievementResetAllResponse + , AchievementResetAllResponse + , achievementResetAllResponse + , ararResults + , ararKind + + -- * Player + , Player + , player + , pLastPlayedWith + , pAvatarImageUrl + , pKind + , pExperienceInfo + , pName + , pDisplayName + , pTitle + , pPlayerId + + -- * AchievementResetResponse + , AchievementResetResponse + , achievementResetResponse + , arrUpdateOccurred + , arrKind + , arrCurrentState + , arrDefinitionId + ) where + +import Network.Google.GamesManagement.Types.Product +import Network.Google.GamesManagement.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1management' of the Google Play Game Services Management API. +gamesManagementURL :: BaseURL +gamesManagementURL + = BaseUrl Https + "https://www.googleapis.com/games/v1management/" + 443 diff --git a/gogol-games-management/gen/Network/Google/GamesManagement/Types/Product.hs b/gogol-games-management/gen/Network/Google/GamesManagement/Types/Product.hs new file mode 100644 index 000000000..a43d445eb --- /dev/null +++ b/gogol-games-management/gen/Network/Google/GamesManagement/Types/Product.hs @@ -0,0 +1,920 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesManagement.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesManagement.Types.Product where + +import Network.Google.GamesManagement.Types.Sum +import Network.Google.Prelude + +-- | This is a JSON template for 1P\/3P metadata about the player\'s +-- experience. +-- +-- /See:/ 'gamesPlayerExperienceInfoResource' smart constructor. +data GamesPlayerExperienceInfoResource = GamesPlayerExperienceInfoResource + { _gpeirCurrentExperiencePoints :: !(Maybe Int64) + , _gpeirCurrentLevel :: !(Maybe (Maybe GamesPlayerLevelResource)) + , _gpeirNextLevel :: !(Maybe (Maybe GamesPlayerLevelResource)) + , _gpeirLastLevelUpTimestampMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesPlayerExperienceInfoResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gpeirCurrentExperiencePoints' +-- +-- * 'gpeirCurrentLevel' +-- +-- * 'gpeirNextLevel' +-- +-- * 'gpeirLastLevelUpTimestampMillis' +gamesPlayerExperienceInfoResource + :: GamesPlayerExperienceInfoResource +gamesPlayerExperienceInfoResource = + GamesPlayerExperienceInfoResource + { _gpeirCurrentExperiencePoints = Nothing + , _gpeirCurrentLevel = Nothing + , _gpeirNextLevel = Nothing + , _gpeirLastLevelUpTimestampMillis = Nothing + } + +-- | The current number of experience points for the player. +gpeirCurrentExperiencePoints :: Lens' GamesPlayerExperienceInfoResource (Maybe Int64) +gpeirCurrentExperiencePoints + = lens _gpeirCurrentExperiencePoints + (\ s a -> s{_gpeirCurrentExperiencePoints = a}) + +-- | The current level of the player. +gpeirCurrentLevel :: Lens' GamesPlayerExperienceInfoResource (Maybe (Maybe GamesPlayerLevelResource)) +gpeirCurrentLevel + = lens _gpeirCurrentLevel + (\ s a -> s{_gpeirCurrentLevel = a}) + +-- | The next level of the player. If the current level is the maximum level, +-- this should be same as the current level. +gpeirNextLevel :: Lens' GamesPlayerExperienceInfoResource (Maybe (Maybe GamesPlayerLevelResource)) +gpeirNextLevel + = lens _gpeirNextLevel + (\ s a -> s{_gpeirNextLevel = a}) + +-- | The timestamp when the player was leveled up, in millis since Unix epoch +-- UTC. +gpeirLastLevelUpTimestampMillis :: Lens' GamesPlayerExperienceInfoResource (Maybe Int64) +gpeirLastLevelUpTimestampMillis + = lens _gpeirLastLevelUpTimestampMillis + (\ s a -> s{_gpeirLastLevelUpTimestampMillis = a}) + +instance FromJSON GamesPlayerExperienceInfoResource + where + parseJSON + = withObject "GamesPlayerExperienceInfoResource" + (\ o -> + GamesPlayerExperienceInfoResource <$> + (o .:? "currentExperiencePoints") <*> + (o .:? "currentLevel") + <*> (o .:? "nextLevel") + <*> (o .:? "lastLevelUpTimestampMillis")) + +instance ToJSON GamesPlayerExperienceInfoResource + where + toJSON GamesPlayerExperienceInfoResource{..} + = object + (catMaybes + [("currentExperiencePoints" .=) <$> + _gpeirCurrentExperiencePoints, + ("currentLevel" .=) <$> _gpeirCurrentLevel, + ("nextLevel" .=) <$> _gpeirNextLevel, + ("lastLevelUpTimestampMillis" .=) <$> + _gpeirLastLevelUpTimestampMillis]) + +-- | This is a JSON template for a list of leaderboard reset resources. +-- +-- /See:/ 'playerScoreResetAllResponse' smart constructor. +data PlayerScoreResetAllResponse = PlayerScoreResetAllResponse + { _psrarResults :: !(Maybe [Maybe PlayerScoreResetResponse]) + , _psrarKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScoreResetAllResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psrarResults' +-- +-- * 'psrarKind' +playerScoreResetAllResponse + :: PlayerScoreResetAllResponse +playerScoreResetAllResponse = + PlayerScoreResetAllResponse + { _psrarResults = Nothing + , _psrarKind = "gamesManagement#playerScoreResetAllResponse" + } + +-- | The leaderboard reset results. +psrarResults :: Lens' PlayerScoreResetAllResponse [Maybe PlayerScoreResetResponse] +psrarResults + = lens _psrarResults (\ s a -> s{_psrarResults = a}) + . _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#playerScoreResetResponse. +psrarKind :: Lens' PlayerScoreResetAllResponse Text +psrarKind + = lens _psrarKind (\ s a -> s{_psrarKind = a}) + +instance FromJSON PlayerScoreResetAllResponse where + parseJSON + = withObject "PlayerScoreResetAllResponse" + (\ o -> + PlayerScoreResetAllResponse <$> + (o .:? "results" .!= mempty) <*> + (o .:? "kind" .!= + "gamesManagement#playerScoreResetAllResponse")) + +instance ToJSON PlayerScoreResetAllResponse where + toJSON PlayerScoreResetAllResponse{..} + = object + (catMaybes + [("results" .=) <$> _psrarResults, + Just ("kind" .= _psrarKind)]) + +-- | This is a JSON template for metadata about a player playing a game with +-- the currently authenticated user. +-- +-- /See:/ 'gamesPlayedResource' smart constructor. +data GamesPlayedResource = GamesPlayedResource + { _gprAutoMatched :: !(Maybe Bool) + , _gprTimeMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesPlayedResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gprAutoMatched' +-- +-- * 'gprTimeMillis' +gamesPlayedResource + :: GamesPlayedResource +gamesPlayedResource = + GamesPlayedResource + { _gprAutoMatched = Nothing + , _gprTimeMillis = Nothing + } + +-- | True if the player was auto-matched with the currently authenticated +-- user. +gprAutoMatched :: Lens' GamesPlayedResource (Maybe Bool) +gprAutoMatched + = lens _gprAutoMatched + (\ s a -> s{_gprAutoMatched = a}) + +-- | The last time the player played the game in milliseconds since the epoch +-- in UTC. +gprTimeMillis :: Lens' GamesPlayedResource (Maybe Int64) +gprTimeMillis + = lens _gprTimeMillis + (\ s a -> s{_gprTimeMillis = a}) + +instance FromJSON GamesPlayedResource where + parseJSON + = withObject "GamesPlayedResource" + (\ o -> + GamesPlayedResource <$> + (o .:? "autoMatched") <*> (o .:? "timeMillis")) + +instance ToJSON GamesPlayedResource where + toJSON GamesPlayedResource{..} + = object + (catMaybes + [("autoMatched" .=) <$> _gprAutoMatched, + ("timeMillis" .=) <$> _gprTimeMillis]) + +-- | This is a JSON template for 1P\/3P metadata about a user\'s level. +-- +-- /See:/ 'gamesPlayerLevelResource' smart constructor. +data GamesPlayerLevelResource = GamesPlayerLevelResource + { _gplrMaxExperiencePoints :: !(Maybe Int64) + , _gplrMinExperiencePoints :: !(Maybe Int64) + , _gplrLevel :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesPlayerLevelResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gplrMaxExperiencePoints' +-- +-- * 'gplrMinExperiencePoints' +-- +-- * 'gplrLevel' +gamesPlayerLevelResource + :: GamesPlayerLevelResource +gamesPlayerLevelResource = + GamesPlayerLevelResource + { _gplrMaxExperiencePoints = Nothing + , _gplrMinExperiencePoints = Nothing + , _gplrLevel = Nothing + } + +-- | The maximum experience points for this level. +gplrMaxExperiencePoints :: Lens' GamesPlayerLevelResource (Maybe Int64) +gplrMaxExperiencePoints + = lens _gplrMaxExperiencePoints + (\ s a -> s{_gplrMaxExperiencePoints = a}) + +-- | The minimum experience points for this level. +gplrMinExperiencePoints :: Lens' GamesPlayerLevelResource (Maybe Int64) +gplrMinExperiencePoints + = lens _gplrMinExperiencePoints + (\ s a -> s{_gplrMinExperiencePoints = a}) + +-- | The level for the user. +gplrLevel :: Lens' GamesPlayerLevelResource (Maybe Int32) +gplrLevel + = lens _gplrLevel (\ s a -> s{_gplrLevel = a}) + +instance FromJSON GamesPlayerLevelResource where + parseJSON + = withObject "GamesPlayerLevelResource" + (\ o -> + GamesPlayerLevelResource <$> + (o .:? "maxExperiencePoints") <*> + (o .:? "minExperiencePoints") + <*> (o .:? "level")) + +instance ToJSON GamesPlayerLevelResource where + toJSON GamesPlayerLevelResource{..} + = object + (catMaybes + [("maxExperiencePoints" .=) <$> + _gplrMaxExperiencePoints, + ("minExperiencePoints" .=) <$> + _gplrMinExperiencePoints, + ("level" .=) <$> _gplrLevel]) + +-- | This is a JSON template for a list of reset leaderboard entry resources. +-- +-- /See:/ 'playerScoreResetResponse' smart constructor. +data PlayerScoreResetResponse = PlayerScoreResetResponse + { _psrrKind :: !Text + , _psrrResetScoreTimeSpans :: !(Maybe [Text]) + , _psrrDefinitionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScoreResetResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psrrKind' +-- +-- * 'psrrResetScoreTimeSpans' +-- +-- * 'psrrDefinitionId' +playerScoreResetResponse + :: PlayerScoreResetResponse +playerScoreResetResponse = + PlayerScoreResetResponse + { _psrrKind = "gamesManagement#playerScoreResetResponse" + , _psrrResetScoreTimeSpans = Nothing + , _psrrDefinitionId = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#playerScoreResetResponse. +psrrKind :: Lens' PlayerScoreResetResponse Text +psrrKind = lens _psrrKind (\ s a -> s{_psrrKind = a}) + +-- | The time spans of the updated score. Possible values are: - \"ALL_TIME\" +-- - The score is an all-time score. - \"WEEKLY\" - The score is a weekly +-- score. - \"DAILY\" - The score is a daily score. +psrrResetScoreTimeSpans :: Lens' PlayerScoreResetResponse [Text] +psrrResetScoreTimeSpans + = lens _psrrResetScoreTimeSpans + (\ s a -> s{_psrrResetScoreTimeSpans = a}) + . _Default + . _Coerce + +-- | The ID of an leaderboard for which player state has been updated. +psrrDefinitionId :: Lens' PlayerScoreResetResponse (Maybe Text) +psrrDefinitionId + = lens _psrrDefinitionId + (\ s a -> s{_psrrDefinitionId = a}) + +instance FromJSON PlayerScoreResetResponse where + parseJSON + = withObject "PlayerScoreResetResponse" + (\ o -> + PlayerScoreResetResponse <$> + (o .:? "kind" .!= + "gamesManagement#playerScoreResetResponse") + <*> (o .:? "resetScoreTimeSpans" .!= mempty) + <*> (o .:? "definitionId")) + +instance ToJSON PlayerScoreResetResponse where + toJSON PlayerScoreResetResponse{..} + = object + (catMaybes + [Just ("kind" .= _psrrKind), + ("resetScoreTimeSpans" .=) <$> + _psrrResetScoreTimeSpans, + ("definitionId" .=) <$> _psrrDefinitionId]) + +-- | This is a JSON template for multiple scores reset all request. +-- +-- /See:/ 'scoresResetMultipleForAllRequest' smart constructor. +data ScoresResetMultipleForAllRequest = ScoresResetMultipleForAllRequest + { _srmfarKind :: !Text + , _srmfarLeaderboardIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresResetMultipleForAllRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srmfarKind' +-- +-- * 'srmfarLeaderboardIds' +scoresResetMultipleForAllRequest + :: ScoresResetMultipleForAllRequest +scoresResetMultipleForAllRequest = + ScoresResetMultipleForAllRequest + { _srmfarKind = "gamesManagement#scoresResetMultipleForAllRequest" + , _srmfarLeaderboardIds = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#scoresResetMultipleForAllRequest. +srmfarKind :: Lens' ScoresResetMultipleForAllRequest Text +srmfarKind + = lens _srmfarKind (\ s a -> s{_srmfarKind = a}) + +-- | The IDs of leaderboards to reset. +srmfarLeaderboardIds :: Lens' ScoresResetMultipleForAllRequest [Text] +srmfarLeaderboardIds + = lens _srmfarLeaderboardIds + (\ s a -> s{_srmfarLeaderboardIds = a}) + . _Default + . _Coerce + +instance FromJSON ScoresResetMultipleForAllRequest + where + parseJSON + = withObject "ScoresResetMultipleForAllRequest" + (\ o -> + ScoresResetMultipleForAllRequest <$> + (o .:? "kind" .!= + "gamesManagement#scoresResetMultipleForAllRequest") + <*> (o .:? "leaderboard_ids" .!= mempty)) + +instance ToJSON ScoresResetMultipleForAllRequest + where + toJSON ScoresResetMultipleForAllRequest{..} + = object + (catMaybes + [Just ("kind" .= _srmfarKind), + ("leaderboard_ids" .=) <$> _srmfarLeaderboardIds]) + +-- | This is a JSON template for a list of hidden players. +-- +-- /See:/ 'hiddenPlayerList' smart constructor. +data HiddenPlayerList = HiddenPlayerList + { _hplNextPageToken :: !(Maybe Text) + , _hplKind :: !Text + , _hplItems :: !(Maybe [Maybe HiddenPlayer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HiddenPlayerList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hplNextPageToken' +-- +-- * 'hplKind' +-- +-- * 'hplItems' +hiddenPlayerList + :: HiddenPlayerList +hiddenPlayerList = + HiddenPlayerList + { _hplNextPageToken = Nothing + , _hplKind = "gamesManagement#hiddenPlayerList" + , _hplItems = Nothing + } + +-- | The pagination token for the next page of results. +hplNextPageToken :: Lens' HiddenPlayerList (Maybe Text) +hplNextPageToken + = lens _hplNextPageToken + (\ s a -> s{_hplNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#hiddenPlayerList. +hplKind :: Lens' HiddenPlayerList Text +hplKind = lens _hplKind (\ s a -> s{_hplKind = a}) + +-- | The players. +hplItems :: Lens' HiddenPlayerList [Maybe HiddenPlayer] +hplItems + = lens _hplItems (\ s a -> s{_hplItems = a}) . + _Default + . _Coerce + +instance FromJSON HiddenPlayerList where + parseJSON + = withObject "HiddenPlayerList" + (\ o -> + HiddenPlayerList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "gamesManagement#hiddenPlayerList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON HiddenPlayerList where + toJSON HiddenPlayerList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _hplNextPageToken, + Just ("kind" .= _hplKind), + ("items" .=) <$> _hplItems]) + +-- | This is a JSON template for multiple quests reset all request. +-- +-- /See:/ 'questsResetMultipleForAllRequest' smart constructor. +data QuestsResetMultipleForAllRequest = QuestsResetMultipleForAllRequest + { _qrmfarKind :: !Text + , _qrmfarQuestIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsResetMultipleForAllRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrmfarKind' +-- +-- * 'qrmfarQuestIds' +questsResetMultipleForAllRequest + :: QuestsResetMultipleForAllRequest +questsResetMultipleForAllRequest = + QuestsResetMultipleForAllRequest + { _qrmfarKind = "gamesManagement#questsResetMultipleForAllRequest" + , _qrmfarQuestIds = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#questsResetMultipleForAllRequest. +qrmfarKind :: Lens' QuestsResetMultipleForAllRequest Text +qrmfarKind + = lens _qrmfarKind (\ s a -> s{_qrmfarKind = a}) + +-- | The IDs of quests to reset. +qrmfarQuestIds :: Lens' QuestsResetMultipleForAllRequest [Text] +qrmfarQuestIds + = lens _qrmfarQuestIds + (\ s a -> s{_qrmfarQuestIds = a}) + . _Default + . _Coerce + +instance FromJSON QuestsResetMultipleForAllRequest + where + parseJSON + = withObject "QuestsResetMultipleForAllRequest" + (\ o -> + QuestsResetMultipleForAllRequest <$> + (o .:? "kind" .!= + "gamesManagement#questsResetMultipleForAllRequest") + <*> (o .:? "quest_ids" .!= mempty)) + +instance ToJSON QuestsResetMultipleForAllRequest + where + toJSON QuestsResetMultipleForAllRequest{..} + = object + (catMaybes + [Just ("kind" .= _qrmfarKind), + ("quest_ids" .=) <$> _qrmfarQuestIds]) + +-- | This is a JSON template for multiple events reset all request. +-- +-- /See:/ 'eventsResetMultipleForAllRequest' smart constructor. +data EventsResetMultipleForAllRequest = EventsResetMultipleForAllRequest + { _ermfarKind :: !Text + , _ermfarEventIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsResetMultipleForAllRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ermfarKind' +-- +-- * 'ermfarEventIds' +eventsResetMultipleForAllRequest + :: EventsResetMultipleForAllRequest +eventsResetMultipleForAllRequest = + EventsResetMultipleForAllRequest + { _ermfarKind = "gamesManagement#eventsResetMultipleForAllRequest" + , _ermfarEventIds = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#eventsResetMultipleForAllRequest. +ermfarKind :: Lens' EventsResetMultipleForAllRequest Text +ermfarKind + = lens _ermfarKind (\ s a -> s{_ermfarKind = a}) + +-- | The IDs of events to reset. +ermfarEventIds :: Lens' EventsResetMultipleForAllRequest [Text] +ermfarEventIds + = lens _ermfarEventIds + (\ s a -> s{_ermfarEventIds = a}) + . _Default + . _Coerce + +instance FromJSON EventsResetMultipleForAllRequest + where + parseJSON + = withObject "EventsResetMultipleForAllRequest" + (\ o -> + EventsResetMultipleForAllRequest <$> + (o .:? "kind" .!= + "gamesManagement#eventsResetMultipleForAllRequest") + <*> (o .:? "event_ids" .!= mempty)) + +instance ToJSON EventsResetMultipleForAllRequest + where + toJSON EventsResetMultipleForAllRequest{..} + = object + (catMaybes + [Just ("kind" .= _ermfarKind), + ("event_ids" .=) <$> _ermfarEventIds]) + +-- | This is a JSON template for multiple achievements reset all request. +-- +-- /See:/ 'achievementResetMultipleForAllRequest' smart constructor. +data AchievementResetMultipleForAllRequest = AchievementResetMultipleForAllRequest + { _armfarKind :: !Text + , _armfarAchievementIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementResetMultipleForAllRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'armfarKind' +-- +-- * 'armfarAchievementIds' +achievementResetMultipleForAllRequest + :: AchievementResetMultipleForAllRequest +achievementResetMultipleForAllRequest = + AchievementResetMultipleForAllRequest + { _armfarKind = "gamesManagement#achievementResetMultipleForAllRequest" + , _armfarAchievementIds = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#achievementResetMultipleForAllRequest. +armfarKind :: Lens' AchievementResetMultipleForAllRequest Text +armfarKind + = lens _armfarKind (\ s a -> s{_armfarKind = a}) + +-- | The IDs of achievements to reset. +armfarAchievementIds :: Lens' AchievementResetMultipleForAllRequest [Text] +armfarAchievementIds + = lens _armfarAchievementIds + (\ s a -> s{_armfarAchievementIds = a}) + . _Default + . _Coerce + +instance FromJSON + AchievementResetMultipleForAllRequest where + parseJSON + = withObject "AchievementResetMultipleForAllRequest" + (\ o -> + AchievementResetMultipleForAllRequest <$> + (o .:? "kind" .!= + "gamesManagement#achievementResetMultipleForAllRequest") + <*> (o .:? "achievement_ids" .!= mempty)) + +instance ToJSON AchievementResetMultipleForAllRequest + where + toJSON AchievementResetMultipleForAllRequest{..} + = object + (catMaybes + [Just ("kind" .= _armfarKind), + ("achievement_ids" .=) <$> _armfarAchievementIds]) + +-- | This is a JSON template for the HiddenPlayer resource. +-- +-- /See:/ 'hiddenPlayer' smart constructor. +data HiddenPlayer = HiddenPlayer + { _hpKind :: !Text + , _hpHiddenTimeMillis :: !(Maybe Int64) + , _hpPlayer :: !(Maybe (Maybe Player)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HiddenPlayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hpKind' +-- +-- * 'hpHiddenTimeMillis' +-- +-- * 'hpPlayer' +hiddenPlayer + :: HiddenPlayer +hiddenPlayer = + HiddenPlayer + { _hpKind = "gamesManagement#hiddenPlayer" + , _hpHiddenTimeMillis = Nothing + , _hpPlayer = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#hiddenPlayer. +hpKind :: Lens' HiddenPlayer Text +hpKind = lens _hpKind (\ s a -> s{_hpKind = a}) + +-- | The time this player was hidden. +hpHiddenTimeMillis :: Lens' HiddenPlayer (Maybe Int64) +hpHiddenTimeMillis + = lens _hpHiddenTimeMillis + (\ s a -> s{_hpHiddenTimeMillis = a}) + +-- | The player information. +hpPlayer :: Lens' HiddenPlayer (Maybe (Maybe Player)) +hpPlayer = lens _hpPlayer (\ s a -> s{_hpPlayer = a}) + +instance FromJSON HiddenPlayer where + parseJSON + = withObject "HiddenPlayer" + (\ o -> + HiddenPlayer <$> + (o .:? "kind" .!= "gamesManagement#hiddenPlayer") <*> + (o .:? "hiddenTimeMillis") + <*> (o .:? "player")) + +instance ToJSON HiddenPlayer where + toJSON HiddenPlayer{..} + = object + (catMaybes + [Just ("kind" .= _hpKind), + ("hiddenTimeMillis" .=) <$> _hpHiddenTimeMillis, + ("player" .=) <$> _hpPlayer]) + +-- | This is a JSON template for achievement reset all response. +-- +-- /See:/ 'achievementResetAllResponse' smart constructor. +data AchievementResetAllResponse = AchievementResetAllResponse + { _ararResults :: !(Maybe [Maybe AchievementResetResponse]) + , _ararKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementResetAllResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ararResults' +-- +-- * 'ararKind' +achievementResetAllResponse + :: AchievementResetAllResponse +achievementResetAllResponse = + AchievementResetAllResponse + { _ararResults = Nothing + , _ararKind = "gamesManagement#achievementResetAllResponse" + } + +-- | The achievement reset results. +ararResults :: Lens' AchievementResetAllResponse [Maybe AchievementResetResponse] +ararResults + = lens _ararResults (\ s a -> s{_ararResults = a}) . + _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#achievementResetAllResponse. +ararKind :: Lens' AchievementResetAllResponse Text +ararKind = lens _ararKind (\ s a -> s{_ararKind = a}) + +instance FromJSON AchievementResetAllResponse where + parseJSON + = withObject "AchievementResetAllResponse" + (\ o -> + AchievementResetAllResponse <$> + (o .:? "results" .!= mempty) <*> + (o .:? "kind" .!= + "gamesManagement#achievementResetAllResponse")) + +instance ToJSON AchievementResetAllResponse where + toJSON AchievementResetAllResponse{..} + = object + (catMaybes + [("results" .=) <$> _ararResults, + Just ("kind" .= _ararKind)]) + +-- | This is a JSON template for a Player resource. +-- +-- /See:/ 'player' smart constructor. +data Player = Player + { _pLastPlayedWith :: !(Maybe (Maybe GamesPlayedResource)) + , _pAvatarImageUrl :: !(Maybe Text) + , _pKind :: !Text + , _pExperienceInfo :: !(Maybe (Maybe GamesPlayerExperienceInfoResource)) + , _pName :: !(Maybe PlayerName) + , _pDisplayName :: !(Maybe Text) + , _pTitle :: !(Maybe Text) + , _pPlayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Player' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pLastPlayedWith' +-- +-- * 'pAvatarImageUrl' +-- +-- * 'pKind' +-- +-- * 'pExperienceInfo' +-- +-- * 'pName' +-- +-- * 'pDisplayName' +-- +-- * 'pTitle' +-- +-- * 'pPlayerId' +player + :: Player +player = + Player + { _pLastPlayedWith = Nothing + , _pAvatarImageUrl = Nothing + , _pKind = "gamesManagement#player" + , _pExperienceInfo = Nothing + , _pName = Nothing + , _pDisplayName = Nothing + , _pTitle = Nothing + , _pPlayerId = Nothing + } + +-- | Details about the last time this player played a multiplayer game with +-- the currently authenticated player. Populated for PLAYED_WITH player +-- collection members. +pLastPlayedWith :: Lens' Player (Maybe (Maybe GamesPlayedResource)) +pLastPlayedWith + = lens _pLastPlayedWith + (\ s a -> s{_pLastPlayedWith = a}) + +-- | The base URL for the image that represents the player. +pAvatarImageUrl :: Lens' Player (Maybe Text) +pAvatarImageUrl + = lens _pAvatarImageUrl + (\ s a -> s{_pAvatarImageUrl = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#player. +pKind :: Lens' Player Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | An object to represent Play Game experience information for the player. +pExperienceInfo :: Lens' Player (Maybe (Maybe GamesPlayerExperienceInfoResource)) +pExperienceInfo + = lens _pExperienceInfo + (\ s a -> s{_pExperienceInfo = a}) + +-- | An object representation of the individual components of the player\'s +-- name. For some players, these fields may not be present. +pName :: Lens' Player (Maybe PlayerName) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | The name to display for the player. +pDisplayName :: Lens' Player (Maybe Text) +pDisplayName + = lens _pDisplayName (\ s a -> s{_pDisplayName = a}) + +-- | The player\'s title rewarded for their game activities. +pTitle :: Lens' Player (Maybe Text) +pTitle = lens _pTitle (\ s a -> s{_pTitle = a}) + +-- | The ID of the player. +pPlayerId :: Lens' Player (Maybe Text) +pPlayerId + = lens _pPlayerId (\ s a -> s{_pPlayerId = a}) + +instance FromJSON Player where + parseJSON + = withObject "Player" + (\ o -> + Player <$> + (o .:? "lastPlayedWith") <*> (o .:? "avatarImageUrl") + <*> (o .:? "kind" .!= "gamesManagement#player") + <*> (o .:? "experienceInfo") + <*> (o .:? "name") + <*> (o .:? "displayName") + <*> (o .:? "title") + <*> (o .:? "playerId")) + +instance ToJSON Player where + toJSON Player{..} + = object + (catMaybes + [("lastPlayedWith" .=) <$> _pLastPlayedWith, + ("avatarImageUrl" .=) <$> _pAvatarImageUrl, + Just ("kind" .= _pKind), + ("experienceInfo" .=) <$> _pExperienceInfo, + ("name" .=) <$> _pName, + ("displayName" .=) <$> _pDisplayName, + ("title" .=) <$> _pTitle, + ("playerId" .=) <$> _pPlayerId]) + +-- | This is a JSON template for an achievement reset response. +-- +-- /See:/ 'achievementResetResponse' smart constructor. +data AchievementResetResponse = AchievementResetResponse + { _arrUpdateOccurred :: !(Maybe Bool) + , _arrKind :: !Text + , _arrCurrentState :: !(Maybe Text) + , _arrDefinitionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementResetResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arrUpdateOccurred' +-- +-- * 'arrKind' +-- +-- * 'arrCurrentState' +-- +-- * 'arrDefinitionId' +achievementResetResponse + :: AchievementResetResponse +achievementResetResponse = + AchievementResetResponse + { _arrUpdateOccurred = Nothing + , _arrKind = "gamesManagement#achievementResetResponse" + , _arrCurrentState = Nothing + , _arrDefinitionId = Nothing + } + +-- | Flag to indicate if the requested update actually occurred. +arrUpdateOccurred :: Lens' AchievementResetResponse (Maybe Bool) +arrUpdateOccurred + = lens _arrUpdateOccurred + (\ s a -> s{_arrUpdateOccurred = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string gamesManagement#achievementResetResponse. +arrKind :: Lens' AchievementResetResponse Text +arrKind = lens _arrKind (\ s a -> s{_arrKind = a}) + +-- | The current state of the achievement. This is the same as the initial +-- state of the achievement. Possible values are: - \"HIDDEN\"- Achievement +-- is hidden. - \"REVEALED\" - Achievement is revealed. - \"UNLOCKED\" - +-- Achievement is unlocked. +arrCurrentState :: Lens' AchievementResetResponse (Maybe Text) +arrCurrentState + = lens _arrCurrentState + (\ s a -> s{_arrCurrentState = a}) + +-- | The ID of an achievement for which player state has been updated. +arrDefinitionId :: Lens' AchievementResetResponse (Maybe Text) +arrDefinitionId + = lens _arrDefinitionId + (\ s a -> s{_arrDefinitionId = a}) + +instance FromJSON AchievementResetResponse where + parseJSON + = withObject "AchievementResetResponse" + (\ o -> + AchievementResetResponse <$> + (o .:? "updateOccurred") <*> + (o .:? "kind" .!= + "gamesManagement#achievementResetResponse") + <*> (o .:? "currentState") + <*> (o .:? "definitionId")) + +instance ToJSON AchievementResetResponse where + toJSON AchievementResetResponse{..} + = object + (catMaybes + [("updateOccurred" .=) <$> _arrUpdateOccurred, + Just ("kind" .= _arrKind), + ("currentState" .=) <$> _arrCurrentState, + ("definitionId" .=) <$> _arrDefinitionId]) diff --git a/gogol-games-management/gen/Network/Google/GamesManagement/Types/Sum.hs b/gogol-games-management/gen/Network/Google/GamesManagement/Types/Sum.hs new file mode 100644 index 000000000..12d65a018 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/GamesManagement/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GamesManagement.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GamesManagement.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/Reset.hs new file mode 100644 index 000000000..6a2faff11 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/Reset.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Achievements.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets the achievement with the given ID for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ for @GamesManagementAchievementsReset@. +module GamesManagement.Achievements.Reset + ( + -- * REST Resource + AchievementsResetAPI + + -- * Creating a Request + , achievementsReset + , AchievementsReset + + -- * Request Lenses + , arQuotaUser + , arPrettyPrint + , arAchievementId + , arUserIp + , arKey + , arOauthToken + , arFields + , arAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementAchievementsReset@ which the +-- 'AchievementsReset' request conforms to. +type AchievementsResetAPI = + "achievements" :> + Capture "achievementId" Text :> + "reset" :> Post '[JSON] AchievementResetResponse + +-- | Resets the achievement with the given ID for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ 'achievementsReset' smart constructor. +data AchievementsReset = AchievementsReset + { _arQuotaUser :: !(Maybe Text) + , _arPrettyPrint :: !Bool + , _arAchievementId :: !Text + , _arUserIp :: !(Maybe Text) + , _arKey :: !(Maybe Text) + , _arOauthToken :: !(Maybe Text) + , _arFields :: !(Maybe Text) + , _arAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arQuotaUser' +-- +-- * 'arPrettyPrint' +-- +-- * 'arAchievementId' +-- +-- * 'arUserIp' +-- +-- * 'arKey' +-- +-- * 'arOauthToken' +-- +-- * 'arFields' +-- +-- * 'arAlt' +achievementsReset + :: Text -- ^ 'achievementId' + -> AchievementsReset +achievementsReset pArAchievementId_ = + AchievementsReset + { _arQuotaUser = Nothing + , _arPrettyPrint = True + , _arAchievementId = pArAchievementId_ + , _arUserIp = Nothing + , _arKey = Nothing + , _arOauthToken = Nothing + , _arFields = Nothing + , _arAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arQuotaUser :: Lens' AchievementsReset' (Maybe Text) +arQuotaUser + = lens _arQuotaUser (\ s a -> s{_arQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arPrettyPrint :: Lens' AchievementsReset' Bool +arPrettyPrint + = lens _arPrettyPrint + (\ s a -> s{_arPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +arAchievementId :: Lens' AchievementsReset' Text +arAchievementId + = lens _arAchievementId + (\ s a -> s{_arAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arUserIp :: Lens' AchievementsReset' (Maybe Text) +arUserIp = lens _arUserIp (\ s a -> s{_arUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arKey :: Lens' AchievementsReset' (Maybe Text) +arKey = lens _arKey (\ s a -> s{_arKey = a}) + +-- | OAuth 2.0 token for the current user. +arOauthToken :: Lens' AchievementsReset' (Maybe Text) +arOauthToken + = lens _arOauthToken (\ s a -> s{_arOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +arFields :: Lens' AchievementsReset' (Maybe Text) +arFields = lens _arFields (\ s a -> s{_arFields = a}) + +-- | Data format for the response. +arAlt :: Lens' AchievementsReset' Text +arAlt = lens _arAlt (\ s a -> s{_arAlt = a}) + +instance GoogleRequest AchievementsReset' where + type Rs AchievementsReset' = AchievementResetResponse + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u AchievementsReset{..} + = go _arQuotaUser _arPrettyPrint _arAchievementId + _arUserIp + _arKey + _arOauthToken + _arFields + _arAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsResetAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAll.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAll.hs new file mode 100644 index 000000000..772a5c830 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAll.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Achievements.ResetAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all achievements for the currently authenticated player for your +-- application. This method is only accessible to whitelisted tester +-- accounts for your application. +-- +-- /See:/ for @GamesManagementAchievementsResetAll@. +module GamesManagement.Achievements.ResetAll + ( + -- * REST Resource + AchievementsResetAllAPI + + -- * Creating a Request + , achievementsResetAll + , AchievementsResetAll + + -- * Request Lenses + , araQuotaUser + , araPrettyPrint + , araUserIp + , araKey + , araOauthToken + , araFields + , araAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementAchievementsResetAll@ which the +-- 'AchievementsResetAll' request conforms to. +type AchievementsResetAllAPI = + "achievements" :> + "reset" :> Post '[JSON] AchievementResetAllResponse + +-- | Resets all achievements for the currently authenticated player for your +-- application. This method is only accessible to whitelisted tester +-- accounts for your application. +-- +-- /See:/ 'achievementsResetAll' smart constructor. +data AchievementsResetAll = AchievementsResetAll + { _araQuotaUser :: !(Maybe Text) + , _araPrettyPrint :: !Bool + , _araUserIp :: !(Maybe Text) + , _araKey :: !(Maybe Text) + , _araOauthToken :: !(Maybe Text) + , _araFields :: !(Maybe Text) + , _araAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsResetAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'araQuotaUser' +-- +-- * 'araPrettyPrint' +-- +-- * 'araUserIp' +-- +-- * 'araKey' +-- +-- * 'araOauthToken' +-- +-- * 'araFields' +-- +-- * 'araAlt' +achievementsResetAll + :: AchievementsResetAll +achievementsResetAll = + AchievementsResetAll + { _araQuotaUser = Nothing + , _araPrettyPrint = True + , _araUserIp = Nothing + , _araKey = Nothing + , _araOauthToken = Nothing + , _araFields = Nothing + , _araAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +araQuotaUser :: Lens' AchievementsResetAll' (Maybe Text) +araQuotaUser + = lens _araQuotaUser (\ s a -> s{_araQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +araPrettyPrint :: Lens' AchievementsResetAll' Bool +araPrettyPrint + = lens _araPrettyPrint + (\ s a -> s{_araPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +araUserIp :: Lens' AchievementsResetAll' (Maybe Text) +araUserIp + = lens _araUserIp (\ s a -> s{_araUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +araKey :: Lens' AchievementsResetAll' (Maybe Text) +araKey = lens _araKey (\ s a -> s{_araKey = a}) + +-- | OAuth 2.0 token for the current user. +araOauthToken :: Lens' AchievementsResetAll' (Maybe Text) +araOauthToken + = lens _araOauthToken + (\ s a -> s{_araOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +araFields :: Lens' AchievementsResetAll' (Maybe Text) +araFields + = lens _araFields (\ s a -> s{_araFields = a}) + +-- | Data format for the response. +araAlt :: Lens' AchievementsResetAll' Text +araAlt = lens _araAlt (\ s a -> s{_araAlt = a}) + +instance GoogleRequest AchievementsResetAll' where + type Rs AchievementsResetAll' = + AchievementResetAllResponse + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u AchievementsResetAll{..} + = go _araQuotaUser _araPrettyPrint _araUserIp _araKey + _araOauthToken + _araFields + _araAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsResetAllAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAllForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAllForAllPlayers.hs new file mode 100644 index 000000000..2be185dc1 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAllForAllPlayers.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Achievements.ResetAllForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all draft achievements for all players. This method is only +-- available to user accounts for your developer console. +-- +-- /See:/ for @GamesManagementAchievementsResetAllForAllPlayers@. +module GamesManagement.Achievements.ResetAllForAllPlayers + ( + -- * REST Resource + AchievementsResetAllForAllPlayersAPI + + -- * Creating a Request + , achievementsResetAllForAllPlayers + , AchievementsResetAllForAllPlayers + + -- * Request Lenses + , arafapQuotaUser + , arafapPrettyPrint + , arafapUserIp + , arafapKey + , arafapOauthToken + , arafapFields + , arafapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementAchievementsResetAllForAllPlayers@ which the +-- 'AchievementsResetAllForAllPlayers' request conforms to. +type AchievementsResetAllForAllPlayersAPI = + "achievements" :> + "resetAllForAllPlayers" :> Post '[JSON] () + +-- | Resets all draft achievements for all players. This method is only +-- available to user accounts for your developer console. +-- +-- /See:/ 'achievementsResetAllForAllPlayers' smart constructor. +data AchievementsResetAllForAllPlayers = AchievementsResetAllForAllPlayers + { _arafapQuotaUser :: !(Maybe Text) + , _arafapPrettyPrint :: !Bool + , _arafapUserIp :: !(Maybe Text) + , _arafapKey :: !(Maybe Text) + , _arafapOauthToken :: !(Maybe Text) + , _arafapFields :: !(Maybe Text) + , _arafapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsResetAllForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arafapQuotaUser' +-- +-- * 'arafapPrettyPrint' +-- +-- * 'arafapUserIp' +-- +-- * 'arafapKey' +-- +-- * 'arafapOauthToken' +-- +-- * 'arafapFields' +-- +-- * 'arafapAlt' +achievementsResetAllForAllPlayers + :: AchievementsResetAllForAllPlayers +achievementsResetAllForAllPlayers = + AchievementsResetAllForAllPlayers + { _arafapQuotaUser = Nothing + , _arafapPrettyPrint = True + , _arafapUserIp = Nothing + , _arafapKey = Nothing + , _arafapOauthToken = Nothing + , _arafapFields = Nothing + , _arafapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arafapQuotaUser :: Lens' AchievementsResetAllForAllPlayers' (Maybe Text) +arafapQuotaUser + = lens _arafapQuotaUser + (\ s a -> s{_arafapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arafapPrettyPrint :: Lens' AchievementsResetAllForAllPlayers' Bool +arafapPrettyPrint + = lens _arafapPrettyPrint + (\ s a -> s{_arafapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arafapUserIp :: Lens' AchievementsResetAllForAllPlayers' (Maybe Text) +arafapUserIp + = lens _arafapUserIp (\ s a -> s{_arafapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arafapKey :: Lens' AchievementsResetAllForAllPlayers' (Maybe Text) +arafapKey + = lens _arafapKey (\ s a -> s{_arafapKey = a}) + +-- | OAuth 2.0 token for the current user. +arafapOauthToken :: Lens' AchievementsResetAllForAllPlayers' (Maybe Text) +arafapOauthToken + = lens _arafapOauthToken + (\ s a -> s{_arafapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +arafapFields :: Lens' AchievementsResetAllForAllPlayers' (Maybe Text) +arafapFields + = lens _arafapFields (\ s a -> s{_arafapFields = a}) + +-- | Data format for the response. +arafapAlt :: Lens' AchievementsResetAllForAllPlayers' Text +arafapAlt + = lens _arafapAlt (\ s a -> s{_arafapAlt = a}) + +instance GoogleRequest + AchievementsResetAllForAllPlayers' where + type Rs AchievementsResetAllForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + AchievementsResetAllForAllPlayers{..} + = go _arafapQuotaUser _arafapPrettyPrint + _arafapUserIp + _arafapKey + _arafapOauthToken + _arafapFields + _arafapAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsResetAllForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetForAllPlayers.hs new file mode 100644 index 000000000..a60017c2f --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetForAllPlayers.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Achievements.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets the achievement with the given ID for all players. This method is +-- only available to user accounts for your developer console. Only draft +-- achievements can be reset. +-- +-- /See:/ for @GamesManagementAchievementsResetForAllPlayers@. +module GamesManagement.Achievements.ResetForAllPlayers + ( + -- * REST Resource + AchievementsResetForAllPlayersAPI + + -- * Creating a Request + , achievementsResetForAllPlayers + , AchievementsResetForAllPlayers + + -- * Request Lenses + , arfapQuotaUser + , arfapPrettyPrint + , arfapAchievementId + , arfapUserIp + , arfapKey + , arfapOauthToken + , arfapFields + , arfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementAchievementsResetForAllPlayers@ which the +-- 'AchievementsResetForAllPlayers' request conforms to. +type AchievementsResetForAllPlayersAPI = + "achievements" :> + Capture "achievementId" Text :> + "resetForAllPlayers" :> Post '[JSON] () + +-- | Resets the achievement with the given ID for all players. This method is +-- only available to user accounts for your developer console. Only draft +-- achievements can be reset. +-- +-- /See:/ 'achievementsResetForAllPlayers' smart constructor. +data AchievementsResetForAllPlayers = AchievementsResetForAllPlayers + { _arfapQuotaUser :: !(Maybe Text) + , _arfapPrettyPrint :: !Bool + , _arfapAchievementId :: !Text + , _arfapUserIp :: !(Maybe Text) + , _arfapKey :: !(Maybe Text) + , _arfapOauthToken :: !(Maybe Text) + , _arfapFields :: !(Maybe Text) + , _arfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arfapQuotaUser' +-- +-- * 'arfapPrettyPrint' +-- +-- * 'arfapAchievementId' +-- +-- * 'arfapUserIp' +-- +-- * 'arfapKey' +-- +-- * 'arfapOauthToken' +-- +-- * 'arfapFields' +-- +-- * 'arfapAlt' +achievementsResetForAllPlayers + :: Text -- ^ 'achievementId' + -> AchievementsResetForAllPlayers +achievementsResetForAllPlayers pArfapAchievementId_ = + AchievementsResetForAllPlayers + { _arfapQuotaUser = Nothing + , _arfapPrettyPrint = True + , _arfapAchievementId = pArfapAchievementId_ + , _arfapUserIp = Nothing + , _arfapKey = Nothing + , _arfapOauthToken = Nothing + , _arfapFields = Nothing + , _arfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arfapQuotaUser :: Lens' AchievementsResetForAllPlayers' (Maybe Text) +arfapQuotaUser + = lens _arfapQuotaUser + (\ s a -> s{_arfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arfapPrettyPrint :: Lens' AchievementsResetForAllPlayers' Bool +arfapPrettyPrint + = lens _arfapPrettyPrint + (\ s a -> s{_arfapPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +arfapAchievementId :: Lens' AchievementsResetForAllPlayers' Text +arfapAchievementId + = lens _arfapAchievementId + (\ s a -> s{_arfapAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arfapUserIp :: Lens' AchievementsResetForAllPlayers' (Maybe Text) +arfapUserIp + = lens _arfapUserIp (\ s a -> s{_arfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arfapKey :: Lens' AchievementsResetForAllPlayers' (Maybe Text) +arfapKey = lens _arfapKey (\ s a -> s{_arfapKey = a}) + +-- | OAuth 2.0 token for the current user. +arfapOauthToken :: Lens' AchievementsResetForAllPlayers' (Maybe Text) +arfapOauthToken + = lens _arfapOauthToken + (\ s a -> s{_arfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +arfapFields :: Lens' AchievementsResetForAllPlayers' (Maybe Text) +arfapFields + = lens _arfapFields (\ s a -> s{_arfapFields = a}) + +-- | Data format for the response. +arfapAlt :: Lens' AchievementsResetForAllPlayers' Text +arfapAlt = lens _arfapAlt (\ s a -> s{_arfapAlt = a}) + +instance GoogleRequest + AchievementsResetForAllPlayers' where + type Rs AchievementsResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + AchievementsResetForAllPlayers{..} + = go _arfapQuotaUser _arfapPrettyPrint + _arfapAchievementId + _arfapUserIp + _arfapKey + _arfapOauthToken + _arfapFields + _arfapAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetMultipleForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetMultipleForAllPlayers.hs new file mode 100644 index 000000000..c45cf4107 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetMultipleForAllPlayers.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Achievements.ResetMultipleForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets achievements with the given IDs for all players. This method is +-- only available to user accounts for your developer console. Only draft +-- achievements may be reset. +-- +-- /See:/ for @GamesManagementAchievementsResetMultipleForAllPlayers@. +module GamesManagement.Achievements.ResetMultipleForAllPlayers + ( + -- * REST Resource + AchievementsResetMultipleForAllPlayersAPI + + -- * Creating a Request + , achievementsResetMultipleForAllPlayers + , AchievementsResetMultipleForAllPlayers + + -- * Request Lenses + , armfapQuotaUser + , armfapPrettyPrint + , armfapUserIp + , armfapKey + , armfapOauthToken + , armfapFields + , armfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementAchievementsResetMultipleForAllPlayers@ which the +-- 'AchievementsResetMultipleForAllPlayers' request conforms to. +type AchievementsResetMultipleForAllPlayersAPI = + "achievements" :> + "resetMultipleForAllPlayers" :> Post '[JSON] () + +-- | Resets achievements with the given IDs for all players. This method is +-- only available to user accounts for your developer console. Only draft +-- achievements may be reset. +-- +-- /See:/ 'achievementsResetMultipleForAllPlayers' smart constructor. +data AchievementsResetMultipleForAllPlayers = AchievementsResetMultipleForAllPlayers + { _armfapQuotaUser :: !(Maybe Text) + , _armfapPrettyPrint :: !Bool + , _armfapUserIp :: !(Maybe Text) + , _armfapKey :: !(Maybe Text) + , _armfapOauthToken :: !(Maybe Text) + , _armfapFields :: !(Maybe Text) + , _armfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsResetMultipleForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'armfapQuotaUser' +-- +-- * 'armfapPrettyPrint' +-- +-- * 'armfapUserIp' +-- +-- * 'armfapKey' +-- +-- * 'armfapOauthToken' +-- +-- * 'armfapFields' +-- +-- * 'armfapAlt' +achievementsResetMultipleForAllPlayers + :: AchievementsResetMultipleForAllPlayers +achievementsResetMultipleForAllPlayers = + AchievementsResetMultipleForAllPlayers + { _armfapQuotaUser = Nothing + , _armfapPrettyPrint = True + , _armfapUserIp = Nothing + , _armfapKey = Nothing + , _armfapOauthToken = Nothing + , _armfapFields = Nothing + , _armfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +armfapQuotaUser :: Lens' AchievementsResetMultipleForAllPlayers' (Maybe Text) +armfapQuotaUser + = lens _armfapQuotaUser + (\ s a -> s{_armfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +armfapPrettyPrint :: Lens' AchievementsResetMultipleForAllPlayers' Bool +armfapPrettyPrint + = lens _armfapPrettyPrint + (\ s a -> s{_armfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +armfapUserIp :: Lens' AchievementsResetMultipleForAllPlayers' (Maybe Text) +armfapUserIp + = lens _armfapUserIp (\ s a -> s{_armfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +armfapKey :: Lens' AchievementsResetMultipleForAllPlayers' (Maybe Text) +armfapKey + = lens _armfapKey (\ s a -> s{_armfapKey = a}) + +-- | OAuth 2.0 token for the current user. +armfapOauthToken :: Lens' AchievementsResetMultipleForAllPlayers' (Maybe Text) +armfapOauthToken + = lens _armfapOauthToken + (\ s a -> s{_armfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +armfapFields :: Lens' AchievementsResetMultipleForAllPlayers' (Maybe Text) +armfapFields + = lens _armfapFields (\ s a -> s{_armfapFields = a}) + +-- | Data format for the response. +armfapAlt :: Lens' AchievementsResetMultipleForAllPlayers' Text +armfapAlt + = lens _armfapAlt (\ s a -> s{_armfapAlt = a}) + +instance GoogleRequest + AchievementsResetMultipleForAllPlayers' where + type Rs AchievementsResetMultipleForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + AchievementsResetMultipleForAllPlayers{..} + = go _armfapQuotaUser _armfapPrettyPrint + _armfapUserIp + _armfapKey + _armfapOauthToken + _armfapFields + _armfapAlt + where go + = clientWithRoute + (Proxy :: + Proxy AchievementsResetMultipleForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Applications/ListHidden.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Applications/ListHidden.hs new file mode 100644 index 000000000..e862007ba --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Applications/ListHidden.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Applications.ListHidden +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the list of players hidden from the given application. This method +-- is only available to user accounts for your developer console. +-- +-- /See:/ for @GamesManagementApplicationsListHidden@. +module GamesManagement.Applications.ListHidden + ( + -- * REST Resource + ApplicationsListHiddenAPI + + -- * Creating a Request + , applicationsListHidden + , ApplicationsListHidden + + -- * Request Lenses + , alhQuotaUser + , alhPrettyPrint + , alhUserIp + , alhApplicationId + , alhKey + , alhPageToken + , alhOauthToken + , alhMaxResults + , alhFields + , alhAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementApplicationsListHidden@ which the +-- 'ApplicationsListHidden' request conforms to. +type ApplicationsListHiddenAPI = + "applications" :> + Capture "applicationId" Text :> + "players" :> + "hidden" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] HiddenPlayerList + +-- | Get the list of players hidden from the given application. This method +-- is only available to user accounts for your developer console. +-- +-- /See:/ 'applicationsListHidden' smart constructor. +data ApplicationsListHidden = ApplicationsListHidden + { _alhQuotaUser :: !(Maybe Text) + , _alhPrettyPrint :: !Bool + , _alhUserIp :: !(Maybe Text) + , _alhApplicationId :: !Text + , _alhKey :: !(Maybe Text) + , _alhPageToken :: !(Maybe Text) + , _alhOauthToken :: !(Maybe Text) + , _alhMaxResults :: !(Maybe Int32) + , _alhFields :: !(Maybe Text) + , _alhAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsListHidden'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alhQuotaUser' +-- +-- * 'alhPrettyPrint' +-- +-- * 'alhUserIp' +-- +-- * 'alhApplicationId' +-- +-- * 'alhKey' +-- +-- * 'alhPageToken' +-- +-- * 'alhOauthToken' +-- +-- * 'alhMaxResults' +-- +-- * 'alhFields' +-- +-- * 'alhAlt' +applicationsListHidden + :: Text -- ^ 'applicationId' + -> ApplicationsListHidden +applicationsListHidden pAlhApplicationId_ = + ApplicationsListHidden + { _alhQuotaUser = Nothing + , _alhPrettyPrint = True + , _alhUserIp = Nothing + , _alhApplicationId = pAlhApplicationId_ + , _alhKey = Nothing + , _alhPageToken = Nothing + , _alhOauthToken = Nothing + , _alhMaxResults = Nothing + , _alhFields = Nothing + , _alhAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alhQuotaUser :: Lens' ApplicationsListHidden' (Maybe Text) +alhQuotaUser + = lens _alhQuotaUser (\ s a -> s{_alhQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alhPrettyPrint :: Lens' ApplicationsListHidden' Bool +alhPrettyPrint + = lens _alhPrettyPrint + (\ s a -> s{_alhPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alhUserIp :: Lens' ApplicationsListHidden' (Maybe Text) +alhUserIp + = lens _alhUserIp (\ s a -> s{_alhUserIp = a}) + +-- | The application ID from the Google Play developer console. +alhApplicationId :: Lens' ApplicationsListHidden' Text +alhApplicationId + = lens _alhApplicationId + (\ s a -> s{_alhApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alhKey :: Lens' ApplicationsListHidden' (Maybe Text) +alhKey = lens _alhKey (\ s a -> s{_alhKey = a}) + +-- | The token returned by the previous request. +alhPageToken :: Lens' ApplicationsListHidden' (Maybe Text) +alhPageToken + = lens _alhPageToken (\ s a -> s{_alhPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alhOauthToken :: Lens' ApplicationsListHidden' (Maybe Text) +alhOauthToken + = lens _alhOauthToken + (\ s a -> s{_alhOauthToken = a}) + +-- | The maximum number of player resources to return in the response, used +-- for paging. For any response, the actual number of player resources +-- returned may be less than the specified maxResults. +alhMaxResults :: Lens' ApplicationsListHidden' (Maybe Int32) +alhMaxResults + = lens _alhMaxResults + (\ s a -> s{_alhMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alhFields :: Lens' ApplicationsListHidden' (Maybe Text) +alhFields + = lens _alhFields (\ s a -> s{_alhFields = a}) + +-- | Data format for the response. +alhAlt :: Lens' ApplicationsListHidden' Text +alhAlt = lens _alhAlt (\ s a -> s{_alhAlt = a}) + +instance GoogleRequest ApplicationsListHidden' where + type Rs ApplicationsListHidden' = HiddenPlayerList + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u ApplicationsListHidden{..} + = go _alhQuotaUser _alhPrettyPrint _alhUserIp + _alhApplicationId + _alhKey + _alhPageToken + _alhOauthToken + _alhMaxResults + _alhFields + _alhAlt + where go + = clientWithRoute + (Proxy :: Proxy ApplicationsListHiddenAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/Reset.hs new file mode 100644 index 000000000..c12a95a42 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/Reset.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Events.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all player progress on the event with the given ID for the +-- currently authenticated player. This method is only accessible to +-- whitelisted tester accounts for your application. All quests for this +-- player that use the event will also be reset. +-- +-- /See:/ for @GamesManagementEventsReset@. +module GamesManagement.Events.Reset + ( + -- * REST Resource + EventsResetAPI + + -- * Creating a Request + , eventsReset + , EventsReset + + -- * Request Lenses + , erQuotaUser + , erPrettyPrint + , erUserIp + , erKey + , erOauthToken + , erEventId + , erFields + , erAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementEventsReset@ which the +-- 'EventsReset' request conforms to. +type EventsResetAPI = + "events" :> + Capture "eventId" Text :> "reset" :> Post '[JSON] () + +-- | Resets all player progress on the event with the given ID for the +-- currently authenticated player. This method is only accessible to +-- whitelisted tester accounts for your application. All quests for this +-- player that use the event will also be reset. +-- +-- /See:/ 'eventsReset' smart constructor. +data EventsReset = EventsReset + { _erQuotaUser :: !(Maybe Text) + , _erPrettyPrint :: !Bool + , _erUserIp :: !(Maybe Text) + , _erKey :: !(Maybe Text) + , _erOauthToken :: !(Maybe Text) + , _erEventId :: !Text + , _erFields :: !(Maybe Text) + , _erAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erQuotaUser' +-- +-- * 'erPrettyPrint' +-- +-- * 'erUserIp' +-- +-- * 'erKey' +-- +-- * 'erOauthToken' +-- +-- * 'erEventId' +-- +-- * 'erFields' +-- +-- * 'erAlt' +eventsReset + :: Text -- ^ 'eventId' + -> EventsReset +eventsReset pErEventId_ = + EventsReset + { _erQuotaUser = Nothing + , _erPrettyPrint = True + , _erUserIp = Nothing + , _erKey = Nothing + , _erOauthToken = Nothing + , _erEventId = pErEventId_ + , _erFields = Nothing + , _erAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +erQuotaUser :: Lens' EventsReset' (Maybe Text) +erQuotaUser + = lens _erQuotaUser (\ s a -> s{_erQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +erPrettyPrint :: Lens' EventsReset' Bool +erPrettyPrint + = lens _erPrettyPrint + (\ s a -> s{_erPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +erUserIp :: Lens' EventsReset' (Maybe Text) +erUserIp = lens _erUserIp (\ s a -> s{_erUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +erKey :: Lens' EventsReset' (Maybe Text) +erKey = lens _erKey (\ s a -> s{_erKey = a}) + +-- | OAuth 2.0 token for the current user. +erOauthToken :: Lens' EventsReset' (Maybe Text) +erOauthToken + = lens _erOauthToken (\ s a -> s{_erOauthToken = a}) + +-- | The ID of the event. +erEventId :: Lens' EventsReset' Text +erEventId + = lens _erEventId (\ s a -> s{_erEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +erFields :: Lens' EventsReset' (Maybe Text) +erFields = lens _erFields (\ s a -> s{_erFields = a}) + +-- | Data format for the response. +erAlt :: Lens' EventsReset' Text +erAlt = lens _erAlt (\ s a -> s{_erAlt = a}) + +instance GoogleRequest EventsReset' where + type Rs EventsReset' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u EventsReset{..} + = go _erQuotaUser _erPrettyPrint _erUserIp _erKey + _erOauthToken + _erEventId + _erFields + _erAlt + where go + = clientWithRoute (Proxy :: Proxy EventsResetAPI) r u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAll.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAll.hs new file mode 100644 index 000000000..e827449bf --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAll.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Events.ResetAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all player progress on all events for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. All quests for this player will also be reset. +-- +-- /See:/ for @GamesManagementEventsResetAll@. +module GamesManagement.Events.ResetAll + ( + -- * REST Resource + EventsResetAllAPI + + -- * Creating a Request + , eventsResetAll + , EventsResetAll + + -- * Request Lenses + , eraQuotaUser + , eraPrettyPrint + , eraUserIp + , eraKey + , eraOauthToken + , eraFields + , eraAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementEventsResetAll@ which the +-- 'EventsResetAll' request conforms to. +type EventsResetAllAPI = + "events" :> "reset" :> Post '[JSON] () + +-- | Resets all player progress on all events for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. All quests for this player will also be reset. +-- +-- /See:/ 'eventsResetAll' smart constructor. +data EventsResetAll = EventsResetAll + { _eraQuotaUser :: !(Maybe Text) + , _eraPrettyPrint :: !Bool + , _eraUserIp :: !(Maybe Text) + , _eraKey :: !(Maybe Text) + , _eraOauthToken :: !(Maybe Text) + , _eraFields :: !(Maybe Text) + , _eraAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsResetAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eraQuotaUser' +-- +-- * 'eraPrettyPrint' +-- +-- * 'eraUserIp' +-- +-- * 'eraKey' +-- +-- * 'eraOauthToken' +-- +-- * 'eraFields' +-- +-- * 'eraAlt' +eventsResetAll + :: EventsResetAll +eventsResetAll = + EventsResetAll + { _eraQuotaUser = Nothing + , _eraPrettyPrint = True + , _eraUserIp = Nothing + , _eraKey = Nothing + , _eraOauthToken = Nothing + , _eraFields = Nothing + , _eraAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eraQuotaUser :: Lens' EventsResetAll' (Maybe Text) +eraQuotaUser + = lens _eraQuotaUser (\ s a -> s{_eraQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eraPrettyPrint :: Lens' EventsResetAll' Bool +eraPrettyPrint + = lens _eraPrettyPrint + (\ s a -> s{_eraPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eraUserIp :: Lens' EventsResetAll' (Maybe Text) +eraUserIp + = lens _eraUserIp (\ s a -> s{_eraUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eraKey :: Lens' EventsResetAll' (Maybe Text) +eraKey = lens _eraKey (\ s a -> s{_eraKey = a}) + +-- | OAuth 2.0 token for the current user. +eraOauthToken :: Lens' EventsResetAll' (Maybe Text) +eraOauthToken + = lens _eraOauthToken + (\ s a -> s{_eraOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eraFields :: Lens' EventsResetAll' (Maybe Text) +eraFields + = lens _eraFields (\ s a -> s{_eraFields = a}) + +-- | Data format for the response. +eraAlt :: Lens' EventsResetAll' Text +eraAlt = lens _eraAlt (\ s a -> s{_eraAlt = a}) + +instance GoogleRequest EventsResetAll' where + type Rs EventsResetAll' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u EventsResetAll{..} + = go _eraQuotaUser _eraPrettyPrint _eraUserIp _eraKey + _eraOauthToken + _eraFields + _eraAlt + where go + = clientWithRoute (Proxy :: Proxy EventsResetAllAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAllForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAllForAllPlayers.hs new file mode 100644 index 000000000..e955b3610 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAllForAllPlayers.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Events.ResetAllForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all draft events for all players. This method is only available +-- to user accounts for your developer console. All quests that use any of +-- these events will also be reset. +-- +-- /See:/ for @GamesManagementEventsResetAllForAllPlayers@. +module GamesManagement.Events.ResetAllForAllPlayers + ( + -- * REST Resource + EventsResetAllForAllPlayersAPI + + -- * Creating a Request + , eventsResetAllForAllPlayers + , EventsResetAllForAllPlayers + + -- * Request Lenses + , erafapQuotaUser + , erafapPrettyPrint + , erafapUserIp + , erafapKey + , erafapOauthToken + , erafapFields + , erafapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementEventsResetAllForAllPlayers@ which the +-- 'EventsResetAllForAllPlayers' request conforms to. +type EventsResetAllForAllPlayersAPI = + "events" :> + "resetAllForAllPlayers" :> Post '[JSON] () + +-- | Resets all draft events for all players. This method is only available +-- to user accounts for your developer console. All quests that use any of +-- these events will also be reset. +-- +-- /See:/ 'eventsResetAllForAllPlayers' smart constructor. +data EventsResetAllForAllPlayers = EventsResetAllForAllPlayers + { _erafapQuotaUser :: !(Maybe Text) + , _erafapPrettyPrint :: !Bool + , _erafapUserIp :: !(Maybe Text) + , _erafapKey :: !(Maybe Text) + , _erafapOauthToken :: !(Maybe Text) + , _erafapFields :: !(Maybe Text) + , _erafapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsResetAllForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erafapQuotaUser' +-- +-- * 'erafapPrettyPrint' +-- +-- * 'erafapUserIp' +-- +-- * 'erafapKey' +-- +-- * 'erafapOauthToken' +-- +-- * 'erafapFields' +-- +-- * 'erafapAlt' +eventsResetAllForAllPlayers + :: EventsResetAllForAllPlayers +eventsResetAllForAllPlayers = + EventsResetAllForAllPlayers + { _erafapQuotaUser = Nothing + , _erafapPrettyPrint = True + , _erafapUserIp = Nothing + , _erafapKey = Nothing + , _erafapOauthToken = Nothing + , _erafapFields = Nothing + , _erafapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +erafapQuotaUser :: Lens' EventsResetAllForAllPlayers' (Maybe Text) +erafapQuotaUser + = lens _erafapQuotaUser + (\ s a -> s{_erafapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +erafapPrettyPrint :: Lens' EventsResetAllForAllPlayers' Bool +erafapPrettyPrint + = lens _erafapPrettyPrint + (\ s a -> s{_erafapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +erafapUserIp :: Lens' EventsResetAllForAllPlayers' (Maybe Text) +erafapUserIp + = lens _erafapUserIp (\ s a -> s{_erafapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +erafapKey :: Lens' EventsResetAllForAllPlayers' (Maybe Text) +erafapKey + = lens _erafapKey (\ s a -> s{_erafapKey = a}) + +-- | OAuth 2.0 token for the current user. +erafapOauthToken :: Lens' EventsResetAllForAllPlayers' (Maybe Text) +erafapOauthToken + = lens _erafapOauthToken + (\ s a -> s{_erafapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +erafapFields :: Lens' EventsResetAllForAllPlayers' (Maybe Text) +erafapFields + = lens _erafapFields (\ s a -> s{_erafapFields = a}) + +-- | Data format for the response. +erafapAlt :: Lens' EventsResetAllForAllPlayers' Text +erafapAlt + = lens _erafapAlt (\ s a -> s{_erafapAlt = a}) + +instance GoogleRequest EventsResetAllForAllPlayers' + where + type Rs EventsResetAllForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u EventsResetAllForAllPlayers{..} + = go _erafapQuotaUser _erafapPrettyPrint + _erafapUserIp + _erafapKey + _erafapOauthToken + _erafapFields + _erafapAlt + where go + = clientWithRoute + (Proxy :: Proxy EventsResetAllForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetForAllPlayers.hs new file mode 100644 index 000000000..1daa01c12 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetForAllPlayers.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Events.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets the event with the given ID for all players. This method is only +-- available to user accounts for your developer console. Only draft events +-- can be reset. All quests that use the event will also be reset. +-- +-- /See:/ for @GamesManagementEventsResetForAllPlayers@. +module GamesManagement.Events.ResetForAllPlayers + ( + -- * REST Resource + EventsResetForAllPlayersAPI + + -- * Creating a Request + , eventsResetForAllPlayers + , EventsResetForAllPlayers + + -- * Request Lenses + , erfapQuotaUser + , erfapPrettyPrint + , erfapUserIp + , erfapKey + , erfapOauthToken + , erfapEventId + , erfapFields + , erfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementEventsResetForAllPlayers@ which the +-- 'EventsResetForAllPlayers' request conforms to. +type EventsResetForAllPlayersAPI = + "events" :> + Capture "eventId" Text :> + "resetForAllPlayers" :> Post '[JSON] () + +-- | Resets the event with the given ID for all players. This method is only +-- available to user accounts for your developer console. Only draft events +-- can be reset. All quests that use the event will also be reset. +-- +-- /See:/ 'eventsResetForAllPlayers' smart constructor. +data EventsResetForAllPlayers = EventsResetForAllPlayers + { _erfapQuotaUser :: !(Maybe Text) + , _erfapPrettyPrint :: !Bool + , _erfapUserIp :: !(Maybe Text) + , _erfapKey :: !(Maybe Text) + , _erfapOauthToken :: !(Maybe Text) + , _erfapEventId :: !Text + , _erfapFields :: !(Maybe Text) + , _erfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erfapQuotaUser' +-- +-- * 'erfapPrettyPrint' +-- +-- * 'erfapUserIp' +-- +-- * 'erfapKey' +-- +-- * 'erfapOauthToken' +-- +-- * 'erfapEventId' +-- +-- * 'erfapFields' +-- +-- * 'erfapAlt' +eventsResetForAllPlayers + :: Text -- ^ 'eventId' + -> EventsResetForAllPlayers +eventsResetForAllPlayers pErfapEventId_ = + EventsResetForAllPlayers + { _erfapQuotaUser = Nothing + , _erfapPrettyPrint = True + , _erfapUserIp = Nothing + , _erfapKey = Nothing + , _erfapOauthToken = Nothing + , _erfapEventId = pErfapEventId_ + , _erfapFields = Nothing + , _erfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +erfapQuotaUser :: Lens' EventsResetForAllPlayers' (Maybe Text) +erfapQuotaUser + = lens _erfapQuotaUser + (\ s a -> s{_erfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +erfapPrettyPrint :: Lens' EventsResetForAllPlayers' Bool +erfapPrettyPrint + = lens _erfapPrettyPrint + (\ s a -> s{_erfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +erfapUserIp :: Lens' EventsResetForAllPlayers' (Maybe Text) +erfapUserIp + = lens _erfapUserIp (\ s a -> s{_erfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +erfapKey :: Lens' EventsResetForAllPlayers' (Maybe Text) +erfapKey = lens _erfapKey (\ s a -> s{_erfapKey = a}) + +-- | OAuth 2.0 token for the current user. +erfapOauthToken :: Lens' EventsResetForAllPlayers' (Maybe Text) +erfapOauthToken + = lens _erfapOauthToken + (\ s a -> s{_erfapOauthToken = a}) + +-- | The ID of the event. +erfapEventId :: Lens' EventsResetForAllPlayers' Text +erfapEventId + = lens _erfapEventId (\ s a -> s{_erfapEventId = a}) + +-- | Selector specifying which fields to include in a partial response. +erfapFields :: Lens' EventsResetForAllPlayers' (Maybe Text) +erfapFields + = lens _erfapFields (\ s a -> s{_erfapFields = a}) + +-- | Data format for the response. +erfapAlt :: Lens' EventsResetForAllPlayers' Text +erfapAlt = lens _erfapAlt (\ s a -> s{_erfapAlt = a}) + +instance GoogleRequest EventsResetForAllPlayers' + where + type Rs EventsResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u EventsResetForAllPlayers{..} + = go _erfapQuotaUser _erfapPrettyPrint _erfapUserIp + _erfapKey + _erfapOauthToken + _erfapEventId + _erfapFields + _erfapAlt + where go + = clientWithRoute + (Proxy :: Proxy EventsResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetMultipleForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetMultipleForAllPlayers.hs new file mode 100644 index 000000000..5bca95442 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetMultipleForAllPlayers.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Events.ResetMultipleForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets events with the given IDs for all players. This method is only +-- available to user accounts for your developer console. Only draft events +-- may be reset. All quests that use any of the events will also be reset. +-- +-- /See:/ for @GamesManagementEventsResetMultipleForAllPlayers@. +module GamesManagement.Events.ResetMultipleForAllPlayers + ( + -- * REST Resource + EventsResetMultipleForAllPlayersAPI + + -- * Creating a Request + , eventsResetMultipleForAllPlayers + , EventsResetMultipleForAllPlayers + + -- * Request Lenses + , ermfapQuotaUser + , ermfapPrettyPrint + , ermfapUserIp + , ermfapKey + , ermfapOauthToken + , ermfapFields + , ermfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementEventsResetMultipleForAllPlayers@ which the +-- 'EventsResetMultipleForAllPlayers' request conforms to. +type EventsResetMultipleForAllPlayersAPI = + "events" :> + "resetMultipleForAllPlayers" :> Post '[JSON] () + +-- | Resets events with the given IDs for all players. This method is only +-- available to user accounts for your developer console. Only draft events +-- may be reset. All quests that use any of the events will also be reset. +-- +-- /See:/ 'eventsResetMultipleForAllPlayers' smart constructor. +data EventsResetMultipleForAllPlayers = EventsResetMultipleForAllPlayers + { _ermfapQuotaUser :: !(Maybe Text) + , _ermfapPrettyPrint :: !Bool + , _ermfapUserIp :: !(Maybe Text) + , _ermfapKey :: !(Maybe Text) + , _ermfapOauthToken :: !(Maybe Text) + , _ermfapFields :: !(Maybe Text) + , _ermfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsResetMultipleForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ermfapQuotaUser' +-- +-- * 'ermfapPrettyPrint' +-- +-- * 'ermfapUserIp' +-- +-- * 'ermfapKey' +-- +-- * 'ermfapOauthToken' +-- +-- * 'ermfapFields' +-- +-- * 'ermfapAlt' +eventsResetMultipleForAllPlayers + :: EventsResetMultipleForAllPlayers +eventsResetMultipleForAllPlayers = + EventsResetMultipleForAllPlayers + { _ermfapQuotaUser = Nothing + , _ermfapPrettyPrint = True + , _ermfapUserIp = Nothing + , _ermfapKey = Nothing + , _ermfapOauthToken = Nothing + , _ermfapFields = Nothing + , _ermfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ermfapQuotaUser :: Lens' EventsResetMultipleForAllPlayers' (Maybe Text) +ermfapQuotaUser + = lens _ermfapQuotaUser + (\ s a -> s{_ermfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ermfapPrettyPrint :: Lens' EventsResetMultipleForAllPlayers' Bool +ermfapPrettyPrint + = lens _ermfapPrettyPrint + (\ s a -> s{_ermfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ermfapUserIp :: Lens' EventsResetMultipleForAllPlayers' (Maybe Text) +ermfapUserIp + = lens _ermfapUserIp (\ s a -> s{_ermfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ermfapKey :: Lens' EventsResetMultipleForAllPlayers' (Maybe Text) +ermfapKey + = lens _ermfapKey (\ s a -> s{_ermfapKey = a}) + +-- | OAuth 2.0 token for the current user. +ermfapOauthToken :: Lens' EventsResetMultipleForAllPlayers' (Maybe Text) +ermfapOauthToken + = lens _ermfapOauthToken + (\ s a -> s{_ermfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ermfapFields :: Lens' EventsResetMultipleForAllPlayers' (Maybe Text) +ermfapFields + = lens _ermfapFields (\ s a -> s{_ermfapFields = a}) + +-- | Data format for the response. +ermfapAlt :: Lens' EventsResetMultipleForAllPlayers' Text +ermfapAlt + = lens _ermfapAlt (\ s a -> s{_ermfapAlt = a}) + +instance GoogleRequest + EventsResetMultipleForAllPlayers' where + type Rs EventsResetMultipleForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + EventsResetMultipleForAllPlayers{..} + = go _ermfapQuotaUser _ermfapPrettyPrint + _ermfapUserIp + _ermfapKey + _ermfapOauthToken + _ermfapFields + _ermfapAlt + where go + = clientWithRoute + (Proxy :: Proxy EventsResetMultipleForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Hide.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Hide.hs new file mode 100644 index 000000000..322b5270e --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Hide.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Players.Hide +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Hide the given player\'s leaderboard scores from the given application. +-- This method is only available to user accounts for your developer +-- console. +-- +-- /See:/ for @GamesManagementPlayersHide@. +module GamesManagement.Players.Hide + ( + -- * REST Resource + PlayersHideAPI + + -- * Creating a Request + , playersHide + , PlayersHide + + -- * Request Lenses + , phQuotaUser + , phPrettyPrint + , phUserIp + , phApplicationId + , phKey + , phOauthToken + , phPlayerId + , phFields + , phAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementPlayersHide@ which the +-- 'PlayersHide' request conforms to. +type PlayersHideAPI = + "applications" :> + Capture "applicationId" Text :> + "players" :> + "hidden" :> + Capture "playerId" Text :> Post '[JSON] () + +-- | Hide the given player\'s leaderboard scores from the given application. +-- This method is only available to user accounts for your developer +-- console. +-- +-- /See:/ 'playersHide' smart constructor. +data PlayersHide = PlayersHide + { _phQuotaUser :: !(Maybe Text) + , _phPrettyPrint :: !Bool + , _phUserIp :: !(Maybe Text) + , _phApplicationId :: !Text + , _phKey :: !(Maybe Text) + , _phOauthToken :: !(Maybe Text) + , _phPlayerId :: !Text + , _phFields :: !(Maybe Text) + , _phAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayersHide'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'phQuotaUser' +-- +-- * 'phPrettyPrint' +-- +-- * 'phUserIp' +-- +-- * 'phApplicationId' +-- +-- * 'phKey' +-- +-- * 'phOauthToken' +-- +-- * 'phPlayerId' +-- +-- * 'phFields' +-- +-- * 'phAlt' +playersHide + :: Text -- ^ 'applicationId' + -> Text -- ^ 'playerId' + -> PlayersHide +playersHide pPhApplicationId_ pPhPlayerId_ = + PlayersHide + { _phQuotaUser = Nothing + , _phPrettyPrint = True + , _phUserIp = Nothing + , _phApplicationId = pPhApplicationId_ + , _phKey = Nothing + , _phOauthToken = Nothing + , _phPlayerId = pPhPlayerId_ + , _phFields = Nothing + , _phAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +phQuotaUser :: Lens' PlayersHide' (Maybe Text) +phQuotaUser + = lens _phQuotaUser (\ s a -> s{_phQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +phPrettyPrint :: Lens' PlayersHide' Bool +phPrettyPrint + = lens _phPrettyPrint + (\ s a -> s{_phPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +phUserIp :: Lens' PlayersHide' (Maybe Text) +phUserIp = lens _phUserIp (\ s a -> s{_phUserIp = a}) + +-- | The application ID from the Google Play developer console. +phApplicationId :: Lens' PlayersHide' Text +phApplicationId + = lens _phApplicationId + (\ s a -> s{_phApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +phKey :: Lens' PlayersHide' (Maybe Text) +phKey = lens _phKey (\ s a -> s{_phKey = a}) + +-- | OAuth 2.0 token for the current user. +phOauthToken :: Lens' PlayersHide' (Maybe Text) +phOauthToken + = lens _phOauthToken (\ s a -> s{_phOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +phPlayerId :: Lens' PlayersHide' Text +phPlayerId + = lens _phPlayerId (\ s a -> s{_phPlayerId = a}) + +-- | Selector specifying which fields to include in a partial response. +phFields :: Lens' PlayersHide' (Maybe Text) +phFields = lens _phFields (\ s a -> s{_phFields = a}) + +-- | Data format for the response. +phAlt :: Lens' PlayersHide' Text +phAlt = lens _phAlt (\ s a -> s{_phAlt = a}) + +instance GoogleRequest PlayersHide' where + type Rs PlayersHide' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u PlayersHide{..} + = go _phQuotaUser _phPrettyPrint _phUserIp + _phApplicationId + _phKey + _phOauthToken + _phPlayerId + _phFields + _phAlt + where go + = clientWithRoute (Proxy :: Proxy PlayersHideAPI) r u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Unhide.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Unhide.hs new file mode 100644 index 000000000..478a144da --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Players/Unhide.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Players.Unhide +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Unhide the given player\'s leaderboard scores from the given +-- application. This method is only available to user accounts for your +-- developer console. +-- +-- /See:/ for @GamesManagementPlayersUnhide@. +module GamesManagement.Players.Unhide + ( + -- * REST Resource + PlayersUnhideAPI + + -- * Creating a Request + , playersUnhide + , PlayersUnhide + + -- * Request Lenses + , puQuotaUser + , puPrettyPrint + , puUserIp + , puApplicationId + , puKey + , puOauthToken + , puPlayerId + , puFields + , puAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementPlayersUnhide@ which the +-- 'PlayersUnhide' request conforms to. +type PlayersUnhideAPI = + "applications" :> + Capture "applicationId" Text :> + "players" :> + "hidden" :> + Capture "playerId" Text :> Delete '[JSON] () + +-- | Unhide the given player\'s leaderboard scores from the given +-- application. This method is only available to user accounts for your +-- developer console. +-- +-- /See:/ 'playersUnhide' smart constructor. +data PlayersUnhide = PlayersUnhide + { _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puApplicationId :: !Text + , _puKey :: !(Maybe Text) + , _puOauthToken :: !(Maybe Text) + , _puPlayerId :: !Text + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayersUnhide'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puApplicationId' +-- +-- * 'puKey' +-- +-- * 'puOauthToken' +-- +-- * 'puPlayerId' +-- +-- * 'puFields' +-- +-- * 'puAlt' +playersUnhide + :: Text -- ^ 'applicationId' + -> Text -- ^ 'playerId' + -> PlayersUnhide +playersUnhide pPuApplicationId_ pPuPlayerId_ = + PlayersUnhide + { _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puApplicationId = pPuApplicationId_ + , _puKey = Nothing + , _puOauthToken = Nothing + , _puPlayerId = pPuPlayerId_ + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PlayersUnhide' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PlayersUnhide' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PlayersUnhide' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | The application ID from the Google Play developer console. +puApplicationId :: Lens' PlayersUnhide' Text +puApplicationId + = lens _puApplicationId + (\ s a -> s{_puApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PlayersUnhide' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PlayersUnhide' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +puPlayerId :: Lens' PlayersUnhide' Text +puPlayerId + = lens _puPlayerId (\ s a -> s{_puPlayerId = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PlayersUnhide' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PlayersUnhide' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PlayersUnhide' where + type Rs PlayersUnhide' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u PlayersUnhide{..} + = go _puQuotaUser _puPrettyPrint _puUserIp + _puApplicationId + _puKey + _puOauthToken + _puPlayerId + _puFields + _puAlt + where go + = clientWithRoute (Proxy :: Proxy PlayersUnhideAPI) r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/Reset.hs new file mode 100644 index 000000000..cc6c61a5e --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/Reset.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Quests.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all player progress on the quest with the given ID for the +-- currently authenticated player. This method is only accessible to +-- whitelisted tester accounts for your application. +-- +-- /See:/ for @GamesManagementQuestsReset@. +module GamesManagement.Quests.Reset + ( + -- * REST Resource + QuestsResetAPI + + -- * Creating a Request + , questsReset + , QuestsReset + + -- * Request Lenses + , qrQuotaUser + , qrPrettyPrint + , qrUserIp + , qrKey + , qrOauthToken + , qrQuestId + , qrFields + , qrAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementQuestsReset@ which the +-- 'QuestsReset' request conforms to. +type QuestsResetAPI = + "quests" :> + Capture "questId" Text :> "reset" :> Post '[JSON] () + +-- | Resets all player progress on the quest with the given ID for the +-- currently authenticated player. This method is only accessible to +-- whitelisted tester accounts for your application. +-- +-- /See:/ 'questsReset' smart constructor. +data QuestsReset = QuestsReset + { _qrQuotaUser :: !(Maybe Text) + , _qrPrettyPrint :: !Bool + , _qrUserIp :: !(Maybe Text) + , _qrKey :: !(Maybe Text) + , _qrOauthToken :: !(Maybe Text) + , _qrQuestId :: !Text + , _qrFields :: !(Maybe Text) + , _qrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrQuotaUser' +-- +-- * 'qrPrettyPrint' +-- +-- * 'qrUserIp' +-- +-- * 'qrKey' +-- +-- * 'qrOauthToken' +-- +-- * 'qrQuestId' +-- +-- * 'qrFields' +-- +-- * 'qrAlt' +questsReset + :: Text -- ^ 'questId' + -> QuestsReset +questsReset pQrQuestId_ = + QuestsReset + { _qrQuotaUser = Nothing + , _qrPrettyPrint = True + , _qrUserIp = Nothing + , _qrKey = Nothing + , _qrOauthToken = Nothing + , _qrQuestId = pQrQuestId_ + , _qrFields = Nothing + , _qrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qrQuotaUser :: Lens' QuestsReset' (Maybe Text) +qrQuotaUser + = lens _qrQuotaUser (\ s a -> s{_qrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qrPrettyPrint :: Lens' QuestsReset' Bool +qrPrettyPrint + = lens _qrPrettyPrint + (\ s a -> s{_qrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qrUserIp :: Lens' QuestsReset' (Maybe Text) +qrUserIp = lens _qrUserIp (\ s a -> s{_qrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qrKey :: Lens' QuestsReset' (Maybe Text) +qrKey = lens _qrKey (\ s a -> s{_qrKey = a}) + +-- | OAuth 2.0 token for the current user. +qrOauthToken :: Lens' QuestsReset' (Maybe Text) +qrOauthToken + = lens _qrOauthToken (\ s a -> s{_qrOauthToken = a}) + +-- | The ID of the quest. +qrQuestId :: Lens' QuestsReset' Text +qrQuestId + = lens _qrQuestId (\ s a -> s{_qrQuestId = a}) + +-- | Selector specifying which fields to include in a partial response. +qrFields :: Lens' QuestsReset' (Maybe Text) +qrFields = lens _qrFields (\ s a -> s{_qrFields = a}) + +-- | Data format for the response. +qrAlt :: Lens' QuestsReset' Text +qrAlt = lens _qrAlt (\ s a -> s{_qrAlt = a}) + +instance GoogleRequest QuestsReset' where + type Rs QuestsReset' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u QuestsReset{..} + = go _qrQuotaUser _qrPrettyPrint _qrUserIp _qrKey + _qrOauthToken + _qrQuestId + _qrFields + _qrAlt + where go + = clientWithRoute (Proxy :: Proxy QuestsResetAPI) r u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAll.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAll.hs new file mode 100644 index 000000000..d3fa8ac24 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAll.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Quests.ResetAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all player progress on all quests for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ for @GamesManagementQuestsResetAll@. +module GamesManagement.Quests.ResetAll + ( + -- * REST Resource + QuestsResetAllAPI + + -- * Creating a Request + , questsResetAll + , QuestsResetAll + + -- * Request Lenses + , qraQuotaUser + , qraPrettyPrint + , qraUserIp + , qraKey + , qraOauthToken + , qraFields + , qraAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementQuestsResetAll@ which the +-- 'QuestsResetAll' request conforms to. +type QuestsResetAllAPI = + "quests" :> "reset" :> Post '[JSON] () + +-- | Resets all player progress on all quests for the currently authenticated +-- player. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ 'questsResetAll' smart constructor. +data QuestsResetAll = QuestsResetAll + { _qraQuotaUser :: !(Maybe Text) + , _qraPrettyPrint :: !Bool + , _qraUserIp :: !(Maybe Text) + , _qraKey :: !(Maybe Text) + , _qraOauthToken :: !(Maybe Text) + , _qraFields :: !(Maybe Text) + , _qraAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsResetAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qraQuotaUser' +-- +-- * 'qraPrettyPrint' +-- +-- * 'qraUserIp' +-- +-- * 'qraKey' +-- +-- * 'qraOauthToken' +-- +-- * 'qraFields' +-- +-- * 'qraAlt' +questsResetAll + :: QuestsResetAll +questsResetAll = + QuestsResetAll + { _qraQuotaUser = Nothing + , _qraPrettyPrint = True + , _qraUserIp = Nothing + , _qraKey = Nothing + , _qraOauthToken = Nothing + , _qraFields = Nothing + , _qraAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qraQuotaUser :: Lens' QuestsResetAll' (Maybe Text) +qraQuotaUser + = lens _qraQuotaUser (\ s a -> s{_qraQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qraPrettyPrint :: Lens' QuestsResetAll' Bool +qraPrettyPrint + = lens _qraPrettyPrint + (\ s a -> s{_qraPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qraUserIp :: Lens' QuestsResetAll' (Maybe Text) +qraUserIp + = lens _qraUserIp (\ s a -> s{_qraUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qraKey :: Lens' QuestsResetAll' (Maybe Text) +qraKey = lens _qraKey (\ s a -> s{_qraKey = a}) + +-- | OAuth 2.0 token for the current user. +qraOauthToken :: Lens' QuestsResetAll' (Maybe Text) +qraOauthToken + = lens _qraOauthToken + (\ s a -> s{_qraOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qraFields :: Lens' QuestsResetAll' (Maybe Text) +qraFields + = lens _qraFields (\ s a -> s{_qraFields = a}) + +-- | Data format for the response. +qraAlt :: Lens' QuestsResetAll' Text +qraAlt = lens _qraAlt (\ s a -> s{_qraAlt = a}) + +instance GoogleRequest QuestsResetAll' where + type Rs QuestsResetAll' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u QuestsResetAll{..} + = go _qraQuotaUser _qraPrettyPrint _qraUserIp _qraKey + _qraOauthToken + _qraFields + _qraAlt + where go + = clientWithRoute (Proxy :: Proxy QuestsResetAllAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAllForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAllForAllPlayers.hs new file mode 100644 index 000000000..e007ef84b --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetAllForAllPlayers.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Quests.ResetAllForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all draft quests for all players. This method is only available +-- to user accounts for your developer console. +-- +-- /See:/ for @GamesManagementQuestsResetAllForAllPlayers@. +module GamesManagement.Quests.ResetAllForAllPlayers + ( + -- * REST Resource + QuestsResetAllForAllPlayersAPI + + -- * Creating a Request + , questsResetAllForAllPlayers + , QuestsResetAllForAllPlayers + + -- * Request Lenses + , qrafapQuotaUser + , qrafapPrettyPrint + , qrafapUserIp + , qrafapKey + , qrafapOauthToken + , qrafapFields + , qrafapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementQuestsResetAllForAllPlayers@ which the +-- 'QuestsResetAllForAllPlayers' request conforms to. +type QuestsResetAllForAllPlayersAPI = + "quests" :> + "resetAllForAllPlayers" :> Post '[JSON] () + +-- | Resets all draft quests for all players. This method is only available +-- to user accounts for your developer console. +-- +-- /See:/ 'questsResetAllForAllPlayers' smart constructor. +data QuestsResetAllForAllPlayers = QuestsResetAllForAllPlayers + { _qrafapQuotaUser :: !(Maybe Text) + , _qrafapPrettyPrint :: !Bool + , _qrafapUserIp :: !(Maybe Text) + , _qrafapKey :: !(Maybe Text) + , _qrafapOauthToken :: !(Maybe Text) + , _qrafapFields :: !(Maybe Text) + , _qrafapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsResetAllForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrafapQuotaUser' +-- +-- * 'qrafapPrettyPrint' +-- +-- * 'qrafapUserIp' +-- +-- * 'qrafapKey' +-- +-- * 'qrafapOauthToken' +-- +-- * 'qrafapFields' +-- +-- * 'qrafapAlt' +questsResetAllForAllPlayers + :: QuestsResetAllForAllPlayers +questsResetAllForAllPlayers = + QuestsResetAllForAllPlayers + { _qrafapQuotaUser = Nothing + , _qrafapPrettyPrint = True + , _qrafapUserIp = Nothing + , _qrafapKey = Nothing + , _qrafapOauthToken = Nothing + , _qrafapFields = Nothing + , _qrafapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qrafapQuotaUser :: Lens' QuestsResetAllForAllPlayers' (Maybe Text) +qrafapQuotaUser + = lens _qrafapQuotaUser + (\ s a -> s{_qrafapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qrafapPrettyPrint :: Lens' QuestsResetAllForAllPlayers' Bool +qrafapPrettyPrint + = lens _qrafapPrettyPrint + (\ s a -> s{_qrafapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qrafapUserIp :: Lens' QuestsResetAllForAllPlayers' (Maybe Text) +qrafapUserIp + = lens _qrafapUserIp (\ s a -> s{_qrafapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qrafapKey :: Lens' QuestsResetAllForAllPlayers' (Maybe Text) +qrafapKey + = lens _qrafapKey (\ s a -> s{_qrafapKey = a}) + +-- | OAuth 2.0 token for the current user. +qrafapOauthToken :: Lens' QuestsResetAllForAllPlayers' (Maybe Text) +qrafapOauthToken + = lens _qrafapOauthToken + (\ s a -> s{_qrafapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qrafapFields :: Lens' QuestsResetAllForAllPlayers' (Maybe Text) +qrafapFields + = lens _qrafapFields (\ s a -> s{_qrafapFields = a}) + +-- | Data format for the response. +qrafapAlt :: Lens' QuestsResetAllForAllPlayers' Text +qrafapAlt + = lens _qrafapAlt (\ s a -> s{_qrafapAlt = a}) + +instance GoogleRequest QuestsResetAllForAllPlayers' + where + type Rs QuestsResetAllForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u QuestsResetAllForAllPlayers{..} + = go _qrafapQuotaUser _qrafapPrettyPrint + _qrafapUserIp + _qrafapKey + _qrafapOauthToken + _qrafapFields + _qrafapAlt + where go + = clientWithRoute + (Proxy :: Proxy QuestsResetAllForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetForAllPlayers.hs new file mode 100644 index 000000000..08fda0f1d --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetForAllPlayers.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Quests.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all player progress on the quest with the given ID for all +-- players. This method is only available to user accounts for your +-- developer console. Only draft quests can be reset. +-- +-- /See:/ for @GamesManagementQuestsResetForAllPlayers@. +module GamesManagement.Quests.ResetForAllPlayers + ( + -- * REST Resource + QuestsResetForAllPlayersAPI + + -- * Creating a Request + , questsResetForAllPlayers + , QuestsResetForAllPlayers + + -- * Request Lenses + , qrfapQuotaUser + , qrfapPrettyPrint + , qrfapUserIp + , qrfapKey + , qrfapOauthToken + , qrfapQuestId + , qrfapFields + , qrfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementQuestsResetForAllPlayers@ which the +-- 'QuestsResetForAllPlayers' request conforms to. +type QuestsResetForAllPlayersAPI = + "quests" :> + Capture "questId" Text :> + "resetForAllPlayers" :> Post '[JSON] () + +-- | Resets all player progress on the quest with the given ID for all +-- players. This method is only available to user accounts for your +-- developer console. Only draft quests can be reset. +-- +-- /See:/ 'questsResetForAllPlayers' smart constructor. +data QuestsResetForAllPlayers = QuestsResetForAllPlayers + { _qrfapQuotaUser :: !(Maybe Text) + , _qrfapPrettyPrint :: !Bool + , _qrfapUserIp :: !(Maybe Text) + , _qrfapKey :: !(Maybe Text) + , _qrfapOauthToken :: !(Maybe Text) + , _qrfapQuestId :: !Text + , _qrfapFields :: !(Maybe Text) + , _qrfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrfapQuotaUser' +-- +-- * 'qrfapPrettyPrint' +-- +-- * 'qrfapUserIp' +-- +-- * 'qrfapKey' +-- +-- * 'qrfapOauthToken' +-- +-- * 'qrfapQuestId' +-- +-- * 'qrfapFields' +-- +-- * 'qrfapAlt' +questsResetForAllPlayers + :: Text -- ^ 'questId' + -> QuestsResetForAllPlayers +questsResetForAllPlayers pQrfapQuestId_ = + QuestsResetForAllPlayers + { _qrfapQuotaUser = Nothing + , _qrfapPrettyPrint = True + , _qrfapUserIp = Nothing + , _qrfapKey = Nothing + , _qrfapOauthToken = Nothing + , _qrfapQuestId = pQrfapQuestId_ + , _qrfapFields = Nothing + , _qrfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qrfapQuotaUser :: Lens' QuestsResetForAllPlayers' (Maybe Text) +qrfapQuotaUser + = lens _qrfapQuotaUser + (\ s a -> s{_qrfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qrfapPrettyPrint :: Lens' QuestsResetForAllPlayers' Bool +qrfapPrettyPrint + = lens _qrfapPrettyPrint + (\ s a -> s{_qrfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qrfapUserIp :: Lens' QuestsResetForAllPlayers' (Maybe Text) +qrfapUserIp + = lens _qrfapUserIp (\ s a -> s{_qrfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qrfapKey :: Lens' QuestsResetForAllPlayers' (Maybe Text) +qrfapKey = lens _qrfapKey (\ s a -> s{_qrfapKey = a}) + +-- | OAuth 2.0 token for the current user. +qrfapOauthToken :: Lens' QuestsResetForAllPlayers' (Maybe Text) +qrfapOauthToken + = lens _qrfapOauthToken + (\ s a -> s{_qrfapOauthToken = a}) + +-- | The ID of the quest. +qrfapQuestId :: Lens' QuestsResetForAllPlayers' Text +qrfapQuestId + = lens _qrfapQuestId (\ s a -> s{_qrfapQuestId = a}) + +-- | Selector specifying which fields to include in a partial response. +qrfapFields :: Lens' QuestsResetForAllPlayers' (Maybe Text) +qrfapFields + = lens _qrfapFields (\ s a -> s{_qrfapFields = a}) + +-- | Data format for the response. +qrfapAlt :: Lens' QuestsResetForAllPlayers' Text +qrfapAlt = lens _qrfapAlt (\ s a -> s{_qrfapAlt = a}) + +instance GoogleRequest QuestsResetForAllPlayers' + where + type Rs QuestsResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u QuestsResetForAllPlayers{..} + = go _qrfapQuotaUser _qrfapPrettyPrint _qrfapUserIp + _qrfapKey + _qrfapOauthToken + _qrfapQuestId + _qrfapFields + _qrfapAlt + where go + = clientWithRoute + (Proxy :: Proxy QuestsResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetMultipleForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetMultipleForAllPlayers.hs new file mode 100644 index 000000000..fa09375bd --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetMultipleForAllPlayers.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Quests.ResetMultipleForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets quests with the given IDs for all players. This method is only +-- available to user accounts for your developer console. Only draft quests +-- may be reset. +-- +-- /See:/ for @GamesManagementQuestsResetMultipleForAllPlayers@. +module GamesManagement.Quests.ResetMultipleForAllPlayers + ( + -- * REST Resource + QuestsResetMultipleForAllPlayersAPI + + -- * Creating a Request + , questsResetMultipleForAllPlayers + , QuestsResetMultipleForAllPlayers + + -- * Request Lenses + , qrmfapQuotaUser + , qrmfapPrettyPrint + , qrmfapUserIp + , qrmfapKey + , qrmfapOauthToken + , qrmfapFields + , qrmfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementQuestsResetMultipleForAllPlayers@ which the +-- 'QuestsResetMultipleForAllPlayers' request conforms to. +type QuestsResetMultipleForAllPlayersAPI = + "quests" :> + "resetMultipleForAllPlayers" :> Post '[JSON] () + +-- | Resets quests with the given IDs for all players. This method is only +-- available to user accounts for your developer console. Only draft quests +-- may be reset. +-- +-- /See:/ 'questsResetMultipleForAllPlayers' smart constructor. +data QuestsResetMultipleForAllPlayers = QuestsResetMultipleForAllPlayers + { _qrmfapQuotaUser :: !(Maybe Text) + , _qrmfapPrettyPrint :: !Bool + , _qrmfapUserIp :: !(Maybe Text) + , _qrmfapKey :: !(Maybe Text) + , _qrmfapOauthToken :: !(Maybe Text) + , _qrmfapFields :: !(Maybe Text) + , _qrmfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsResetMultipleForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrmfapQuotaUser' +-- +-- * 'qrmfapPrettyPrint' +-- +-- * 'qrmfapUserIp' +-- +-- * 'qrmfapKey' +-- +-- * 'qrmfapOauthToken' +-- +-- * 'qrmfapFields' +-- +-- * 'qrmfapAlt' +questsResetMultipleForAllPlayers + :: QuestsResetMultipleForAllPlayers +questsResetMultipleForAllPlayers = + QuestsResetMultipleForAllPlayers + { _qrmfapQuotaUser = Nothing + , _qrmfapPrettyPrint = True + , _qrmfapUserIp = Nothing + , _qrmfapKey = Nothing + , _qrmfapOauthToken = Nothing + , _qrmfapFields = Nothing + , _qrmfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qrmfapQuotaUser :: Lens' QuestsResetMultipleForAllPlayers' (Maybe Text) +qrmfapQuotaUser + = lens _qrmfapQuotaUser + (\ s a -> s{_qrmfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qrmfapPrettyPrint :: Lens' QuestsResetMultipleForAllPlayers' Bool +qrmfapPrettyPrint + = lens _qrmfapPrettyPrint + (\ s a -> s{_qrmfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qrmfapUserIp :: Lens' QuestsResetMultipleForAllPlayers' (Maybe Text) +qrmfapUserIp + = lens _qrmfapUserIp (\ s a -> s{_qrmfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qrmfapKey :: Lens' QuestsResetMultipleForAllPlayers' (Maybe Text) +qrmfapKey + = lens _qrmfapKey (\ s a -> s{_qrmfapKey = a}) + +-- | OAuth 2.0 token for the current user. +qrmfapOauthToken :: Lens' QuestsResetMultipleForAllPlayers' (Maybe Text) +qrmfapOauthToken + = lens _qrmfapOauthToken + (\ s a -> s{_qrmfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +qrmfapFields :: Lens' QuestsResetMultipleForAllPlayers' (Maybe Text) +qrmfapFields + = lens _qrmfapFields (\ s a -> s{_qrmfapFields = a}) + +-- | Data format for the response. +qrmfapAlt :: Lens' QuestsResetMultipleForAllPlayers' Text +qrmfapAlt + = lens _qrmfapAlt (\ s a -> s{_qrmfapAlt = a}) + +instance GoogleRequest + QuestsResetMultipleForAllPlayers' where + type Rs QuestsResetMultipleForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + QuestsResetMultipleForAllPlayers{..} + = go _qrmfapQuotaUser _qrmfapPrettyPrint + _qrmfapUserIp + _qrmfapKey + _qrmfapOauthToken + _qrmfapFields + _qrmfapAlt + where go + = clientWithRoute + (Proxy :: Proxy QuestsResetMultipleForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/Reset.hs new file mode 100644 index 000000000..d51a5416d --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/Reset.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Rooms.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Reset all rooms for the currently authenticated player for your +-- application. This method is only accessible to whitelisted tester +-- accounts for your application. +-- +-- /See:/ for @GamesManagementRoomsReset@. +module GamesManagement.Rooms.Reset + ( + -- * REST Resource + RoomsResetAPI + + -- * Creating a Request + , roomsReset + , RoomsReset + + -- * Request Lenses + , rrQuotaUser + , rrPrettyPrint + , rrUserIp + , rrKey + , rrOauthToken + , rrFields + , rrAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementRoomsReset@ which the +-- 'RoomsReset' request conforms to. +type RoomsResetAPI = + "rooms" :> "reset" :> Post '[JSON] () + +-- | Reset all rooms for the currently authenticated player for your +-- application. This method is only accessible to whitelisted tester +-- accounts for your application. +-- +-- /See:/ 'roomsReset' smart constructor. +data RoomsReset = RoomsReset + { _rrQuotaUser :: !(Maybe Text) + , _rrPrettyPrint :: !Bool + , _rrUserIp :: !(Maybe Text) + , _rrKey :: !(Maybe Text) + , _rrOauthToken :: !(Maybe Text) + , _rrFields :: !(Maybe Text) + , _rrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrQuotaUser' +-- +-- * 'rrPrettyPrint' +-- +-- * 'rrUserIp' +-- +-- * 'rrKey' +-- +-- * 'rrOauthToken' +-- +-- * 'rrFields' +-- +-- * 'rrAlt' +roomsReset + :: RoomsReset +roomsReset = + RoomsReset + { _rrQuotaUser = Nothing + , _rrPrettyPrint = True + , _rrUserIp = Nothing + , _rrKey = Nothing + , _rrOauthToken = Nothing + , _rrFields = Nothing + , _rrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrQuotaUser :: Lens' RoomsReset' (Maybe Text) +rrQuotaUser + = lens _rrQuotaUser (\ s a -> s{_rrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrPrettyPrint :: Lens' RoomsReset' Bool +rrPrettyPrint + = lens _rrPrettyPrint + (\ s a -> s{_rrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrUserIp :: Lens' RoomsReset' (Maybe Text) +rrUserIp = lens _rrUserIp (\ s a -> s{_rrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrKey :: Lens' RoomsReset' (Maybe Text) +rrKey = lens _rrKey (\ s a -> s{_rrKey = a}) + +-- | OAuth 2.0 token for the current user. +rrOauthToken :: Lens' RoomsReset' (Maybe Text) +rrOauthToken + = lens _rrOauthToken (\ s a -> s{_rrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrFields :: Lens' RoomsReset' (Maybe Text) +rrFields = lens _rrFields (\ s a -> s{_rrFields = a}) + +-- | Data format for the response. +rrAlt :: Lens' RoomsReset' Text +rrAlt = lens _rrAlt (\ s a -> s{_rrAlt = a}) + +instance GoogleRequest RoomsReset' where + type Rs RoomsReset' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u RoomsReset{..} + = go _rrQuotaUser _rrPrettyPrint _rrUserIp _rrKey + _rrOauthToken + _rrFields + _rrAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsResetAPI) r u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/ResetForAllPlayers.hs new file mode 100644 index 000000000..845821e15 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Rooms/ResetForAllPlayers.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Rooms.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes rooms where the only room participants are from whitelisted +-- tester accounts for your application. This method is only available to +-- user accounts for your developer console. +-- +-- /See:/ for @GamesManagementRoomsResetForAllPlayers@. +module GamesManagement.Rooms.ResetForAllPlayers + ( + -- * REST Resource + RoomsResetForAllPlayersAPI + + -- * Creating a Request + , roomsResetForAllPlayers + , RoomsResetForAllPlayers + + -- * Request Lenses + , rrfapQuotaUser + , rrfapPrettyPrint + , rrfapUserIp + , rrfapKey + , rrfapOauthToken + , rrfapFields + , rrfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementRoomsResetForAllPlayers@ which the +-- 'RoomsResetForAllPlayers' request conforms to. +type RoomsResetForAllPlayersAPI = + "rooms" :> "resetForAllPlayers" :> Post '[JSON] () + +-- | Deletes rooms where the only room participants are from whitelisted +-- tester accounts for your application. This method is only available to +-- user accounts for your developer console. +-- +-- /See:/ 'roomsResetForAllPlayers' smart constructor. +data RoomsResetForAllPlayers = RoomsResetForAllPlayers + { _rrfapQuotaUser :: !(Maybe Text) + , _rrfapPrettyPrint :: !Bool + , _rrfapUserIp :: !(Maybe Text) + , _rrfapKey :: !(Maybe Text) + , _rrfapOauthToken :: !(Maybe Text) + , _rrfapFields :: !(Maybe Text) + , _rrfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrfapQuotaUser' +-- +-- * 'rrfapPrettyPrint' +-- +-- * 'rrfapUserIp' +-- +-- * 'rrfapKey' +-- +-- * 'rrfapOauthToken' +-- +-- * 'rrfapFields' +-- +-- * 'rrfapAlt' +roomsResetForAllPlayers + :: RoomsResetForAllPlayers +roomsResetForAllPlayers = + RoomsResetForAllPlayers + { _rrfapQuotaUser = Nothing + , _rrfapPrettyPrint = True + , _rrfapUserIp = Nothing + , _rrfapKey = Nothing + , _rrfapOauthToken = Nothing + , _rrfapFields = Nothing + , _rrfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrfapQuotaUser :: Lens' RoomsResetForAllPlayers' (Maybe Text) +rrfapQuotaUser + = lens _rrfapQuotaUser + (\ s a -> s{_rrfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrfapPrettyPrint :: Lens' RoomsResetForAllPlayers' Bool +rrfapPrettyPrint + = lens _rrfapPrettyPrint + (\ s a -> s{_rrfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrfapUserIp :: Lens' RoomsResetForAllPlayers' (Maybe Text) +rrfapUserIp + = lens _rrfapUserIp (\ s a -> s{_rrfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrfapKey :: Lens' RoomsResetForAllPlayers' (Maybe Text) +rrfapKey = lens _rrfapKey (\ s a -> s{_rrfapKey = a}) + +-- | OAuth 2.0 token for the current user. +rrfapOauthToken :: Lens' RoomsResetForAllPlayers' (Maybe Text) +rrfapOauthToken + = lens _rrfapOauthToken + (\ s a -> s{_rrfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrfapFields :: Lens' RoomsResetForAllPlayers' (Maybe Text) +rrfapFields + = lens _rrfapFields (\ s a -> s{_rrfapFields = a}) + +-- | Data format for the response. +rrfapAlt :: Lens' RoomsResetForAllPlayers' Text +rrfapAlt = lens _rrfapAlt (\ s a -> s{_rrfapAlt = a}) + +instance GoogleRequest RoomsResetForAllPlayers' where + type Rs RoomsResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u RoomsResetForAllPlayers{..} + = go _rrfapQuotaUser _rrfapPrettyPrint _rrfapUserIp + _rrfapKey + _rrfapOauthToken + _rrfapFields + _rrfapAlt + where go + = clientWithRoute + (Proxy :: Proxy RoomsResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/Reset.hs new file mode 100644 index 000000000..89cd6cd25 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/Reset.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Scores.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets scores for the leaderboard with the given ID for the currently +-- authenticated player. This method is only accessible to whitelisted +-- tester accounts for your application. +-- +-- /See:/ for @GamesManagementScoresReset@. +module GamesManagement.Scores.Reset + ( + -- * REST Resource + ScoresResetAPI + + -- * Creating a Request + , scoresReset + , ScoresReset + + -- * Request Lenses + , srQuotaUser + , srPrettyPrint + , srUserIp + , srLeaderboardId + , srKey + , srOauthToken + , srFields + , srAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementScoresReset@ which the +-- 'ScoresReset' request conforms to. +type ScoresResetAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + "scores" :> + "reset" :> Post '[JSON] PlayerScoreResetResponse + +-- | Resets scores for the leaderboard with the given ID for the currently +-- authenticated player. This method is only accessible to whitelisted +-- tester accounts for your application. +-- +-- /See:/ 'scoresReset' smart constructor. +data ScoresReset = ScoresReset + { _srQuotaUser :: !(Maybe Text) + , _srPrettyPrint :: !Bool + , _srUserIp :: !(Maybe Text) + , _srLeaderboardId :: !Text + , _srKey :: !(Maybe Text) + , _srOauthToken :: !(Maybe Text) + , _srFields :: !(Maybe Text) + , _srAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srQuotaUser' +-- +-- * 'srPrettyPrint' +-- +-- * 'srUserIp' +-- +-- * 'srLeaderboardId' +-- +-- * 'srKey' +-- +-- * 'srOauthToken' +-- +-- * 'srFields' +-- +-- * 'srAlt' +scoresReset + :: Text -- ^ 'leaderboardId' + -> ScoresReset +scoresReset pSrLeaderboardId_ = + ScoresReset + { _srQuotaUser = Nothing + , _srPrettyPrint = True + , _srUserIp = Nothing + , _srLeaderboardId = pSrLeaderboardId_ + , _srKey = Nothing + , _srOauthToken = Nothing + , _srFields = Nothing + , _srAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +srQuotaUser :: Lens' ScoresReset' (Maybe Text) +srQuotaUser + = lens _srQuotaUser (\ s a -> s{_srQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +srPrettyPrint :: Lens' ScoresReset' Bool +srPrettyPrint + = lens _srPrettyPrint + (\ s a -> s{_srPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +srUserIp :: Lens' ScoresReset' (Maybe Text) +srUserIp = lens _srUserIp (\ s a -> s{_srUserIp = a}) + +-- | The ID of the leaderboard. +srLeaderboardId :: Lens' ScoresReset' Text +srLeaderboardId + = lens _srLeaderboardId + (\ s a -> s{_srLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +srKey :: Lens' ScoresReset' (Maybe Text) +srKey = lens _srKey (\ s a -> s{_srKey = a}) + +-- | OAuth 2.0 token for the current user. +srOauthToken :: Lens' ScoresReset' (Maybe Text) +srOauthToken + = lens _srOauthToken (\ s a -> s{_srOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +srFields :: Lens' ScoresReset' (Maybe Text) +srFields = lens _srFields (\ s a -> s{_srFields = a}) + +-- | Data format for the response. +srAlt :: Lens' ScoresReset' Text +srAlt = lens _srAlt (\ s a -> s{_srAlt = a}) + +instance GoogleRequest ScoresReset' where + type Rs ScoresReset' = PlayerScoreResetResponse + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u ScoresReset{..} + = go _srQuotaUser _srPrettyPrint _srUserIp + _srLeaderboardId + _srKey + _srOauthToken + _srFields + _srAlt + where go + = clientWithRoute (Proxy :: Proxy ScoresResetAPI) r u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAll.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAll.hs new file mode 100644 index 000000000..d83af3ee2 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAll.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Scores.ResetAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets all scores for all leaderboards for the currently authenticated +-- players. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ for @GamesManagementScoresResetAll@. +module GamesManagement.Scores.ResetAll + ( + -- * REST Resource + ScoresResetAllAPI + + -- * Creating a Request + , scoresResetAll + , ScoresResetAll + + -- * Request Lenses + , sraQuotaUser + , sraPrettyPrint + , sraUserIp + , sraKey + , sraOauthToken + , sraFields + , sraAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementScoresResetAll@ which the +-- 'ScoresResetAll' request conforms to. +type ScoresResetAllAPI = + "scores" :> + "reset" :> Post '[JSON] PlayerScoreResetAllResponse + +-- | Resets all scores for all leaderboards for the currently authenticated +-- players. This method is only accessible to whitelisted tester accounts +-- for your application. +-- +-- /See:/ 'scoresResetAll' smart constructor. +data ScoresResetAll = ScoresResetAll + { _sraQuotaUser :: !(Maybe Text) + , _sraPrettyPrint :: !Bool + , _sraUserIp :: !(Maybe Text) + , _sraKey :: !(Maybe Text) + , _sraOauthToken :: !(Maybe Text) + , _sraFields :: !(Maybe Text) + , _sraAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresResetAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sraQuotaUser' +-- +-- * 'sraPrettyPrint' +-- +-- * 'sraUserIp' +-- +-- * 'sraKey' +-- +-- * 'sraOauthToken' +-- +-- * 'sraFields' +-- +-- * 'sraAlt' +scoresResetAll + :: ScoresResetAll +scoresResetAll = + ScoresResetAll + { _sraQuotaUser = Nothing + , _sraPrettyPrint = True + , _sraUserIp = Nothing + , _sraKey = Nothing + , _sraOauthToken = Nothing + , _sraFields = Nothing + , _sraAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sraQuotaUser :: Lens' ScoresResetAll' (Maybe Text) +sraQuotaUser + = lens _sraQuotaUser (\ s a -> s{_sraQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sraPrettyPrint :: Lens' ScoresResetAll' Bool +sraPrettyPrint + = lens _sraPrettyPrint + (\ s a -> s{_sraPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sraUserIp :: Lens' ScoresResetAll' (Maybe Text) +sraUserIp + = lens _sraUserIp (\ s a -> s{_sraUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sraKey :: Lens' ScoresResetAll' (Maybe Text) +sraKey = lens _sraKey (\ s a -> s{_sraKey = a}) + +-- | OAuth 2.0 token for the current user. +sraOauthToken :: Lens' ScoresResetAll' (Maybe Text) +sraOauthToken + = lens _sraOauthToken + (\ s a -> s{_sraOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sraFields :: Lens' ScoresResetAll' (Maybe Text) +sraFields + = lens _sraFields (\ s a -> s{_sraFields = a}) + +-- | Data format for the response. +sraAlt :: Lens' ScoresResetAll' Text +sraAlt = lens _sraAlt (\ s a -> s{_sraAlt = a}) + +instance GoogleRequest ScoresResetAll' where + type Rs ScoresResetAll' = PlayerScoreResetAllResponse + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u ScoresResetAll{..} + = go _sraQuotaUser _sraPrettyPrint _sraUserIp _sraKey + _sraOauthToken + _sraFields + _sraAlt + where go + = clientWithRoute (Proxy :: Proxy ScoresResetAllAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAllForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAllForAllPlayers.hs new file mode 100644 index 000000000..465519f8d --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetAllForAllPlayers.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Scores.ResetAllForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets scores for all draft leaderboards for all players. This method is +-- only available to user accounts for your developer console. +-- +-- /See:/ for @GamesManagementScoresResetAllForAllPlayers@. +module GamesManagement.Scores.ResetAllForAllPlayers + ( + -- * REST Resource + ScoresResetAllForAllPlayersAPI + + -- * Creating a Request + , scoresResetAllForAllPlayers + , ScoresResetAllForAllPlayers + + -- * Request Lenses + , srafapQuotaUser + , srafapPrettyPrint + , srafapUserIp + , srafapKey + , srafapOauthToken + , srafapFields + , srafapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementScoresResetAllForAllPlayers@ which the +-- 'ScoresResetAllForAllPlayers' request conforms to. +type ScoresResetAllForAllPlayersAPI = + "scores" :> + "resetAllForAllPlayers" :> Post '[JSON] () + +-- | Resets scores for all draft leaderboards for all players. This method is +-- only available to user accounts for your developer console. +-- +-- /See:/ 'scoresResetAllForAllPlayers' smart constructor. +data ScoresResetAllForAllPlayers = ScoresResetAllForAllPlayers + { _srafapQuotaUser :: !(Maybe Text) + , _srafapPrettyPrint :: !Bool + , _srafapUserIp :: !(Maybe Text) + , _srafapKey :: !(Maybe Text) + , _srafapOauthToken :: !(Maybe Text) + , _srafapFields :: !(Maybe Text) + , _srafapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresResetAllForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srafapQuotaUser' +-- +-- * 'srafapPrettyPrint' +-- +-- * 'srafapUserIp' +-- +-- * 'srafapKey' +-- +-- * 'srafapOauthToken' +-- +-- * 'srafapFields' +-- +-- * 'srafapAlt' +scoresResetAllForAllPlayers + :: ScoresResetAllForAllPlayers +scoresResetAllForAllPlayers = + ScoresResetAllForAllPlayers + { _srafapQuotaUser = Nothing + , _srafapPrettyPrint = True + , _srafapUserIp = Nothing + , _srafapKey = Nothing + , _srafapOauthToken = Nothing + , _srafapFields = Nothing + , _srafapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +srafapQuotaUser :: Lens' ScoresResetAllForAllPlayers' (Maybe Text) +srafapQuotaUser + = lens _srafapQuotaUser + (\ s a -> s{_srafapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +srafapPrettyPrint :: Lens' ScoresResetAllForAllPlayers' Bool +srafapPrettyPrint + = lens _srafapPrettyPrint + (\ s a -> s{_srafapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +srafapUserIp :: Lens' ScoresResetAllForAllPlayers' (Maybe Text) +srafapUserIp + = lens _srafapUserIp (\ s a -> s{_srafapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +srafapKey :: Lens' ScoresResetAllForAllPlayers' (Maybe Text) +srafapKey + = lens _srafapKey (\ s a -> s{_srafapKey = a}) + +-- | OAuth 2.0 token for the current user. +srafapOauthToken :: Lens' ScoresResetAllForAllPlayers' (Maybe Text) +srafapOauthToken + = lens _srafapOauthToken + (\ s a -> s{_srafapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +srafapFields :: Lens' ScoresResetAllForAllPlayers' (Maybe Text) +srafapFields + = lens _srafapFields (\ s a -> s{_srafapFields = a}) + +-- | Data format for the response. +srafapAlt :: Lens' ScoresResetAllForAllPlayers' Text +srafapAlt + = lens _srafapAlt (\ s a -> s{_srafapAlt = a}) + +instance GoogleRequest ScoresResetAllForAllPlayers' + where + type Rs ScoresResetAllForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u ScoresResetAllForAllPlayers{..} + = go _srafapQuotaUser _srafapPrettyPrint + _srafapUserIp + _srafapKey + _srafapOauthToken + _srafapFields + _srafapAlt + where go + = clientWithRoute + (Proxy :: Proxy ScoresResetAllForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetForAllPlayers.hs new file mode 100644 index 000000000..0cb17aa16 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetForAllPlayers.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Scores.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets scores for the leaderboard with the given ID for all players. +-- This method is only available to user accounts for your developer +-- console. Only draft leaderboards can be reset. +-- +-- /See:/ for @GamesManagementScoresResetForAllPlayers@. +module GamesManagement.Scores.ResetForAllPlayers + ( + -- * REST Resource + ScoresResetForAllPlayersAPI + + -- * Creating a Request + , scoresResetForAllPlayers + , ScoresResetForAllPlayers + + -- * Request Lenses + , srfapQuotaUser + , srfapPrettyPrint + , srfapUserIp + , srfapLeaderboardId + , srfapKey + , srfapOauthToken + , srfapFields + , srfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementScoresResetForAllPlayers@ which the +-- 'ScoresResetForAllPlayers' request conforms to. +type ScoresResetForAllPlayersAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + "scores" :> "resetForAllPlayers" :> Post '[JSON] () + +-- | Resets scores for the leaderboard with the given ID for all players. +-- This method is only available to user accounts for your developer +-- console. Only draft leaderboards can be reset. +-- +-- /See:/ 'scoresResetForAllPlayers' smart constructor. +data ScoresResetForAllPlayers = ScoresResetForAllPlayers + { _srfapQuotaUser :: !(Maybe Text) + , _srfapPrettyPrint :: !Bool + , _srfapUserIp :: !(Maybe Text) + , _srfapLeaderboardId :: !Text + , _srfapKey :: !(Maybe Text) + , _srfapOauthToken :: !(Maybe Text) + , _srfapFields :: !(Maybe Text) + , _srfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srfapQuotaUser' +-- +-- * 'srfapPrettyPrint' +-- +-- * 'srfapUserIp' +-- +-- * 'srfapLeaderboardId' +-- +-- * 'srfapKey' +-- +-- * 'srfapOauthToken' +-- +-- * 'srfapFields' +-- +-- * 'srfapAlt' +scoresResetForAllPlayers + :: Text -- ^ 'leaderboardId' + -> ScoresResetForAllPlayers +scoresResetForAllPlayers pSrfapLeaderboardId_ = + ScoresResetForAllPlayers + { _srfapQuotaUser = Nothing + , _srfapPrettyPrint = True + , _srfapUserIp = Nothing + , _srfapLeaderboardId = pSrfapLeaderboardId_ + , _srfapKey = Nothing + , _srfapOauthToken = Nothing + , _srfapFields = Nothing + , _srfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +srfapQuotaUser :: Lens' ScoresResetForAllPlayers' (Maybe Text) +srfapQuotaUser + = lens _srfapQuotaUser + (\ s a -> s{_srfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +srfapPrettyPrint :: Lens' ScoresResetForAllPlayers' Bool +srfapPrettyPrint + = lens _srfapPrettyPrint + (\ s a -> s{_srfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +srfapUserIp :: Lens' ScoresResetForAllPlayers' (Maybe Text) +srfapUserIp + = lens _srfapUserIp (\ s a -> s{_srfapUserIp = a}) + +-- | The ID of the leaderboard. +srfapLeaderboardId :: Lens' ScoresResetForAllPlayers' Text +srfapLeaderboardId + = lens _srfapLeaderboardId + (\ s a -> s{_srfapLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +srfapKey :: Lens' ScoresResetForAllPlayers' (Maybe Text) +srfapKey = lens _srfapKey (\ s a -> s{_srfapKey = a}) + +-- | OAuth 2.0 token for the current user. +srfapOauthToken :: Lens' ScoresResetForAllPlayers' (Maybe Text) +srfapOauthToken + = lens _srfapOauthToken + (\ s a -> s{_srfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +srfapFields :: Lens' ScoresResetForAllPlayers' (Maybe Text) +srfapFields + = lens _srfapFields (\ s a -> s{_srfapFields = a}) + +-- | Data format for the response. +srfapAlt :: Lens' ScoresResetForAllPlayers' Text +srfapAlt = lens _srfapAlt (\ s a -> s{_srfapAlt = a}) + +instance GoogleRequest ScoresResetForAllPlayers' + where + type Rs ScoresResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u ScoresResetForAllPlayers{..} + = go _srfapQuotaUser _srfapPrettyPrint _srfapUserIp + _srfapLeaderboardId + _srfapKey + _srfapOauthToken + _srfapFields + _srfapAlt + where go + = clientWithRoute + (Proxy :: Proxy ScoresResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetMultipleForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetMultipleForAllPlayers.hs new file mode 100644 index 000000000..09ce936ee --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetMultipleForAllPlayers.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.Scores.ResetMultipleForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resets scores for the leaderboards with the given IDs for all players. +-- This method is only available to user accounts for your developer +-- console. Only draft leaderboards may be reset. +-- +-- /See:/ for @GamesManagementScoresResetMultipleForAllPlayers@. +module GamesManagement.Scores.ResetMultipleForAllPlayers + ( + -- * REST Resource + ScoresResetMultipleForAllPlayersAPI + + -- * Creating a Request + , scoresResetMultipleForAllPlayers + , ScoresResetMultipleForAllPlayers + + -- * Request Lenses + , srmfapQuotaUser + , srmfapPrettyPrint + , srmfapUserIp + , srmfapKey + , srmfapOauthToken + , srmfapFields + , srmfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementScoresResetMultipleForAllPlayers@ which the +-- 'ScoresResetMultipleForAllPlayers' request conforms to. +type ScoresResetMultipleForAllPlayersAPI = + "scores" :> + "resetMultipleForAllPlayers" :> Post '[JSON] () + +-- | Resets scores for the leaderboards with the given IDs for all players. +-- This method is only available to user accounts for your developer +-- console. Only draft leaderboards may be reset. +-- +-- /See:/ 'scoresResetMultipleForAllPlayers' smart constructor. +data ScoresResetMultipleForAllPlayers = ScoresResetMultipleForAllPlayers + { _srmfapQuotaUser :: !(Maybe Text) + , _srmfapPrettyPrint :: !Bool + , _srmfapUserIp :: !(Maybe Text) + , _srmfapKey :: !(Maybe Text) + , _srmfapOauthToken :: !(Maybe Text) + , _srmfapFields :: !(Maybe Text) + , _srmfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresResetMultipleForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srmfapQuotaUser' +-- +-- * 'srmfapPrettyPrint' +-- +-- * 'srmfapUserIp' +-- +-- * 'srmfapKey' +-- +-- * 'srmfapOauthToken' +-- +-- * 'srmfapFields' +-- +-- * 'srmfapAlt' +scoresResetMultipleForAllPlayers + :: ScoresResetMultipleForAllPlayers +scoresResetMultipleForAllPlayers = + ScoresResetMultipleForAllPlayers + { _srmfapQuotaUser = Nothing + , _srmfapPrettyPrint = True + , _srmfapUserIp = Nothing + , _srmfapKey = Nothing + , _srmfapOauthToken = Nothing + , _srmfapFields = Nothing + , _srmfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +srmfapQuotaUser :: Lens' ScoresResetMultipleForAllPlayers' (Maybe Text) +srmfapQuotaUser + = lens _srmfapQuotaUser + (\ s a -> s{_srmfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +srmfapPrettyPrint :: Lens' ScoresResetMultipleForAllPlayers' Bool +srmfapPrettyPrint + = lens _srmfapPrettyPrint + (\ s a -> s{_srmfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +srmfapUserIp :: Lens' ScoresResetMultipleForAllPlayers' (Maybe Text) +srmfapUserIp + = lens _srmfapUserIp (\ s a -> s{_srmfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +srmfapKey :: Lens' ScoresResetMultipleForAllPlayers' (Maybe Text) +srmfapKey + = lens _srmfapKey (\ s a -> s{_srmfapKey = a}) + +-- | OAuth 2.0 token for the current user. +srmfapOauthToken :: Lens' ScoresResetMultipleForAllPlayers' (Maybe Text) +srmfapOauthToken + = lens _srmfapOauthToken + (\ s a -> s{_srmfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +srmfapFields :: Lens' ScoresResetMultipleForAllPlayers' (Maybe Text) +srmfapFields + = lens _srmfapFields (\ s a -> s{_srmfapFields = a}) + +-- | Data format for the response. +srmfapAlt :: Lens' ScoresResetMultipleForAllPlayers' Text +srmfapAlt + = lens _srmfapAlt (\ s a -> s{_srmfapAlt = a}) + +instance GoogleRequest + ScoresResetMultipleForAllPlayers' where + type Rs ScoresResetMultipleForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + ScoresResetMultipleForAllPlayers{..} + = go _srmfapQuotaUser _srmfapPrettyPrint + _srmfapUserIp + _srmfapKey + _srmfapOauthToken + _srmfapFields + _srmfapAlt + where go + = clientWithRoute + (Proxy :: Proxy ScoresResetMultipleForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/Reset.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/Reset.hs new file mode 100644 index 000000000..5cf476501 --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/Reset.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.TurnBasedMatches.Reset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Reset all turn-based match data for a user. This method is only +-- accessible to whitelisted tester accounts for your application. +-- +-- /See:/ for @GamesManagementTurnBasedMatchesReset@. +module GamesManagement.TurnBasedMatches.Reset + ( + -- * REST Resource + TurnBasedMatchesResetAPI + + -- * Creating a Request + , turnBasedMatchesReset + , TurnBasedMatchesReset + + -- * Request Lenses + , tbmrQuotaUser + , tbmrPrettyPrint + , tbmrUserIp + , tbmrKey + , tbmrOauthToken + , tbmrFields + , tbmrAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementTurnBasedMatchesReset@ which the +-- 'TurnBasedMatchesReset' request conforms to. +type TurnBasedMatchesResetAPI = + "turnbasedmatches" :> "reset" :> Post '[JSON] () + +-- | Reset all turn-based match data for a user. This method is only +-- accessible to whitelisted tester accounts for your application. +-- +-- /See:/ 'turnBasedMatchesReset' smart constructor. +data TurnBasedMatchesReset = TurnBasedMatchesReset + { _tbmrQuotaUser :: !(Maybe Text) + , _tbmrPrettyPrint :: !Bool + , _tbmrUserIp :: !(Maybe Text) + , _tbmrKey :: !(Maybe Text) + , _tbmrOauthToken :: !(Maybe Text) + , _tbmrFields :: !(Maybe Text) + , _tbmrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesReset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmrQuotaUser' +-- +-- * 'tbmrPrettyPrint' +-- +-- * 'tbmrUserIp' +-- +-- * 'tbmrKey' +-- +-- * 'tbmrOauthToken' +-- +-- * 'tbmrFields' +-- +-- * 'tbmrAlt' +turnBasedMatchesReset + :: TurnBasedMatchesReset +turnBasedMatchesReset = + TurnBasedMatchesReset + { _tbmrQuotaUser = Nothing + , _tbmrPrettyPrint = True + , _tbmrUserIp = Nothing + , _tbmrKey = Nothing + , _tbmrOauthToken = Nothing + , _tbmrFields = Nothing + , _tbmrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmrQuotaUser :: Lens' TurnBasedMatchesReset' (Maybe Text) +tbmrQuotaUser + = lens _tbmrQuotaUser + (\ s a -> s{_tbmrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmrPrettyPrint :: Lens' TurnBasedMatchesReset' Bool +tbmrPrettyPrint + = lens _tbmrPrettyPrint + (\ s a -> s{_tbmrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmrUserIp :: Lens' TurnBasedMatchesReset' (Maybe Text) +tbmrUserIp + = lens _tbmrUserIp (\ s a -> s{_tbmrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmrKey :: Lens' TurnBasedMatchesReset' (Maybe Text) +tbmrKey = lens _tbmrKey (\ s a -> s{_tbmrKey = a}) + +-- | OAuth 2.0 token for the current user. +tbmrOauthToken :: Lens' TurnBasedMatchesReset' (Maybe Text) +tbmrOauthToken + = lens _tbmrOauthToken + (\ s a -> s{_tbmrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmrFields :: Lens' TurnBasedMatchesReset' (Maybe Text) +tbmrFields + = lens _tbmrFields (\ s a -> s{_tbmrFields = a}) + +-- | Data format for the response. +tbmrAlt :: Lens' TurnBasedMatchesReset' Text +tbmrAlt = lens _tbmrAlt (\ s a -> s{_tbmrAlt = a}) + +instance GoogleRequest TurnBasedMatchesReset' where + type Rs TurnBasedMatchesReset' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u TurnBasedMatchesReset{..} + = go _tbmrQuotaUser _tbmrPrettyPrint _tbmrUserIp + _tbmrKey + _tbmrOauthToken + _tbmrFields + _tbmrAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesResetAPI) + r + u diff --git a/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/ResetForAllPlayers.hs b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/ResetForAllPlayers.hs new file mode 100644 index 000000000..a16a5e17d --- /dev/null +++ b/gogol-games-management/gen/Network/Google/Resource/GamesManagement/TurnBasedMatches/ResetForAllPlayers.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GamesManagement.TurnBasedMatches.ResetForAllPlayers +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes turn-based matches where the only match participants are from +-- whitelisted tester accounts for your application. This method is only +-- available to user accounts for your developer console. +-- +-- /See:/ for @GamesManagementTurnBasedMatchesResetForAllPlayers@. +module GamesManagement.TurnBasedMatches.ResetForAllPlayers + ( + -- * REST Resource + TurnBasedMatchesResetForAllPlayersAPI + + -- * Creating a Request + , turnBasedMatchesResetForAllPlayers + , TurnBasedMatchesResetForAllPlayers + + -- * Request Lenses + , tbmrfapQuotaUser + , tbmrfapPrettyPrint + , tbmrfapUserIp + , tbmrfapKey + , tbmrfapOauthToken + , tbmrfapFields + , tbmrfapAlt + ) where + +import Network.Google.GamesManagement.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesManagementTurnBasedMatchesResetForAllPlayers@ which the +-- 'TurnBasedMatchesResetForAllPlayers' request conforms to. +type TurnBasedMatchesResetForAllPlayersAPI = + "turnbasedmatches" :> + "resetForAllPlayers" :> Post '[JSON] () + +-- | Deletes turn-based matches where the only match participants are from +-- whitelisted tester accounts for your application. This method is only +-- available to user accounts for your developer console. +-- +-- /See:/ 'turnBasedMatchesResetForAllPlayers' smart constructor. +data TurnBasedMatchesResetForAllPlayers = TurnBasedMatchesResetForAllPlayers + { _tbmrfapQuotaUser :: !(Maybe Text) + , _tbmrfapPrettyPrint :: !Bool + , _tbmrfapUserIp :: !(Maybe Text) + , _tbmrfapKey :: !(Maybe Text) + , _tbmrfapOauthToken :: !(Maybe Text) + , _tbmrfapFields :: !(Maybe Text) + , _tbmrfapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesResetForAllPlayers'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmrfapQuotaUser' +-- +-- * 'tbmrfapPrettyPrint' +-- +-- * 'tbmrfapUserIp' +-- +-- * 'tbmrfapKey' +-- +-- * 'tbmrfapOauthToken' +-- +-- * 'tbmrfapFields' +-- +-- * 'tbmrfapAlt' +turnBasedMatchesResetForAllPlayers + :: TurnBasedMatchesResetForAllPlayers +turnBasedMatchesResetForAllPlayers = + TurnBasedMatchesResetForAllPlayers + { _tbmrfapQuotaUser = Nothing + , _tbmrfapPrettyPrint = True + , _tbmrfapUserIp = Nothing + , _tbmrfapKey = Nothing + , _tbmrfapOauthToken = Nothing + , _tbmrfapFields = Nothing + , _tbmrfapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmrfapQuotaUser :: Lens' TurnBasedMatchesResetForAllPlayers' (Maybe Text) +tbmrfapQuotaUser + = lens _tbmrfapQuotaUser + (\ s a -> s{_tbmrfapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmrfapPrettyPrint :: Lens' TurnBasedMatchesResetForAllPlayers' Bool +tbmrfapPrettyPrint + = lens _tbmrfapPrettyPrint + (\ s a -> s{_tbmrfapPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmrfapUserIp :: Lens' TurnBasedMatchesResetForAllPlayers' (Maybe Text) +tbmrfapUserIp + = lens _tbmrfapUserIp + (\ s a -> s{_tbmrfapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmrfapKey :: Lens' TurnBasedMatchesResetForAllPlayers' (Maybe Text) +tbmrfapKey + = lens _tbmrfapKey (\ s a -> s{_tbmrfapKey = a}) + +-- | OAuth 2.0 token for the current user. +tbmrfapOauthToken :: Lens' TurnBasedMatchesResetForAllPlayers' (Maybe Text) +tbmrfapOauthToken + = lens _tbmrfapOauthToken + (\ s a -> s{_tbmrfapOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmrfapFields :: Lens' TurnBasedMatchesResetForAllPlayers' (Maybe Text) +tbmrfapFields + = lens _tbmrfapFields + (\ s a -> s{_tbmrfapFields = a}) + +-- | Data format for the response. +tbmrfapAlt :: Lens' TurnBasedMatchesResetForAllPlayers' Text +tbmrfapAlt + = lens _tbmrfapAlt (\ s a -> s{_tbmrfapAlt = a}) + +instance GoogleRequest + TurnBasedMatchesResetForAllPlayers' where + type Rs TurnBasedMatchesResetForAllPlayers' = () + request = requestWithRoute defReq gamesManagementURL + requestWithRoute r u + TurnBasedMatchesResetForAllPlayers{..} + = go _tbmrfapQuotaUser _tbmrfapPrettyPrint + _tbmrfapUserIp + _tbmrfapKey + _tbmrfapOauthToken + _tbmrfapFields + _tbmrfapAlt + where go + = clientWithRoute + (Proxy :: + Proxy TurnBasedMatchesResetForAllPlayersAPI) + r + u diff --git a/gogol-games-management/gogol-games-management.cabal b/gogol-games-management/gogol-games-management.cabal new file mode 100644 index 000000000..9251437c0 --- /dev/null +++ b/gogol-games-management/gogol-games-management.cabal @@ -0,0 +1,69 @@ +name: gogol-games-management +version: 0.0.1 +synopsis: Google Play Game Services Management API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Management API for Google Play Game Services. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.GamesManagement + , Network.Google.GamesManagement.Types + , Network.Google.Resource.GamesManagement.Achievements.Reset + , Network.Google.Resource.GamesManagement.Achievements.ResetAll + , Network.Google.Resource.GamesManagement.Achievements.ResetAllForAllPlayers + , Network.Google.Resource.GamesManagement.Achievements.ResetForAllPlayers + , Network.Google.Resource.GamesManagement.Achievements.ResetMultipleForAllPlayers + , Network.Google.Resource.GamesManagement.Applications.ListHidden + , Network.Google.Resource.GamesManagement.Events.Reset + , Network.Google.Resource.GamesManagement.Events.ResetAll + , Network.Google.Resource.GamesManagement.Events.ResetAllForAllPlayers + , Network.Google.Resource.GamesManagement.Events.ResetForAllPlayers + , Network.Google.Resource.GamesManagement.Events.ResetMultipleForAllPlayers + , Network.Google.Resource.GamesManagement.Players.Hide + , Network.Google.Resource.GamesManagement.Players.Unhide + , Network.Google.Resource.GamesManagement.Quests.Reset + , Network.Google.Resource.GamesManagement.Quests.ResetAll + , Network.Google.Resource.GamesManagement.Quests.ResetAllForAllPlayers + , Network.Google.Resource.GamesManagement.Quests.ResetForAllPlayers + , Network.Google.Resource.GamesManagement.Quests.ResetMultipleForAllPlayers + , Network.Google.Resource.GamesManagement.Rooms.Reset + , Network.Google.Resource.GamesManagement.Rooms.ResetForAllPlayers + , Network.Google.Resource.GamesManagement.Scores.Reset + , Network.Google.Resource.GamesManagement.Scores.ResetAll + , Network.Google.Resource.GamesManagement.Scores.ResetAllForAllPlayers + , Network.Google.Resource.GamesManagement.Scores.ResetForAllPlayers + , Network.Google.Resource.GamesManagement.Scores.ResetMultipleForAllPlayers + , Network.Google.Resource.GamesManagement.TurnBasedMatches.Reset + , Network.Google.Resource.GamesManagement.TurnBasedMatches.ResetForAllPlayers + + other-modules: + Network.Google.GamesManagement.Types.Product + , Network.Google.GamesManagement.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-games-management/src/.gitkeep b/gogol-games-management/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-games/LICENSE b/gogol-games/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-games/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-games/Makefile b/gogol-games/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-games/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-games/README.md b/gogol-games/README.md new file mode 100644 index 000000000..c0699beb3 --- /dev/null +++ b/gogol-games/README.md @@ -0,0 +1,28 @@ +# gogol-games + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play Game Services API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-games` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-games/Setup.hs b/gogol-games/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-games/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-games/gen/Network/Google/Games.hs b/gogol-games/gen/Network/Google/Games.hs new file mode 100644 index 000000000..95440c526 --- /dev/null +++ b/gogol-games/gen/Network/Google/Games.hs @@ -0,0 +1,1114 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Games +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The API for Google Play Game Services. +-- +-- /See:/ +module Network.Google.Games + ( + -- * API + GamesAPI + , gamesAPI + , gamesURL + + -- * Service Methods + + -- * REST Resources + + -- ** GamesAchievementDefinitionsList + , module Games.AchievementDefinitions.List + + -- ** GamesAchievementsIncrement + , module Games.Achievements.Increment + + -- ** GamesAchievementsList + , module Games.Achievements.List + + -- ** GamesAchievementsReveal + , module Games.Achievements.Reveal + + -- ** GamesAchievementsSetStepsAtLeast + , module Games.Achievements.SetStepsAtLeast + + -- ** GamesAchievementsUnlock + , module Games.Achievements.Unlock + + -- ** GamesAchievementsUpdateMultiple + , module Games.Achievements.UpdateMultiple + + -- ** GamesApplicationsGet + , module Games.Applications.Get + + -- ** GamesApplicationsPlayed + , module Games.Applications.Played + + -- ** GamesEventsListByPlayer + , module Games.Events.ListByPlayer + + -- ** GamesEventsListDefinitions + , module Games.Events.ListDefinitions + + -- ** GamesEventsRecord + , module Games.Events.Record + + -- ** GamesLeaderboardsGet + , module Games.Leaderboards.Get + + -- ** GamesLeaderboardsList + , module Games.Leaderboards.List + + -- ** GamesMetagameGetMetagameConfig + , module Games.Metagame.GetMetagameConfig + + -- ** GamesMetagameListCategoriesByPlayer + , module Games.Metagame.ListCategoriesByPlayer + + -- ** GamesPlayersGet + , module Games.Players.Get + + -- ** GamesPlayersList + , module Games.Players.List + + -- ** GamesPushtokensRemove + , module Games.Pushtokens.Remove + + -- ** GamesPushtokensUpdate + , module Games.Pushtokens.Update + + -- ** GamesQuestMilestonesClaim + , module Games.QuestMilestones.Claim + + -- ** GamesQuestsAccept + , module Games.Quests.Accept + + -- ** GamesQuestsList + , module Games.Quests.List + + -- ** GamesRevisionsCheck + , module Games.Revisions.Check + + -- ** GamesRoomsCreate + , module Games.Rooms.Create + + -- ** GamesRoomsDecline + , module Games.Rooms.Decline + + -- ** GamesRoomsDismiss + , module Games.Rooms.Dismiss + + -- ** GamesRoomsGet + , module Games.Rooms.Get + + -- ** GamesRoomsJoin + , module Games.Rooms.Join + + -- ** GamesRoomsLeave + , module Games.Rooms.Leave + + -- ** GamesRoomsList + , module Games.Rooms.List + + -- ** GamesRoomsReportStatus + , module Games.Rooms.ReportStatus + + -- ** GamesScoresGet + , module Games.Scores.Get + + -- ** GamesScoresList + , module Games.Scores.List + + -- ** GamesScoresListWindow + , module Games.Scores.ListWindow + + -- ** GamesScoresSubmit + , module Games.Scores.Submit + + -- ** GamesScoresSubmitMultiple + , module Games.Scores.SubmitMultiple + + -- ** GamesSnapshotsGet + , module Games.Snapshots.Get + + -- ** GamesSnapshotsList + , module Games.Snapshots.List + + -- ** GamesTurnBasedMatchesCancel + , module Games.TurnBasedMatches.Cancel + + -- ** GamesTurnBasedMatchesCreate + , module Games.TurnBasedMatches.Create + + -- ** GamesTurnBasedMatchesDecline + , module Games.TurnBasedMatches.Decline + + -- ** GamesTurnBasedMatchesDismiss + , module Games.TurnBasedMatches.Dismiss + + -- ** GamesTurnBasedMatchesFinish + , module Games.TurnBasedMatches.Finish + + -- ** GamesTurnBasedMatchesGet + , module Games.TurnBasedMatches.Get + + -- ** GamesTurnBasedMatchesJoin + , module Games.TurnBasedMatches.Join + + -- ** GamesTurnBasedMatchesLeave + , module Games.TurnBasedMatches.Leave + + -- ** GamesTurnBasedMatchesLeaveTurn + , module Games.TurnBasedMatches.LeaveTurn + + -- ** GamesTurnBasedMatchesList + , module Games.TurnBasedMatches.List + + -- ** GamesTurnBasedMatchesRematch + , module Games.TurnBasedMatches.Rematch + + -- ** GamesTurnBasedMatchesSync + , module Games.TurnBasedMatches.Sync + + -- ** GamesTurnBasedMatchesTakeTurn + , module Games.TurnBasedMatches.TakeTurn + + -- * Types + + -- ** RoomJoinRequest + , RoomJoinRequest + , roomJoinRequest + , rjrNetworkDiagnostics + , rjrKind + , rjrClientAddress + , rjrCapabilities + + -- ** Snapshot + , Snapshot + , snapshot + , sLastModifiedMillis + , sKind + , sProgressValue + , sUniqueName + , sCoverImage + , sId + , sDurationMillis + , sTitle + , sType + , sDescription + , sDriveId + + -- ** TurnBasedMatchData + , TurnBasedMatchData + , turnBasedMatchData + , tbmdKind + , tbmdData + , tbmdDataAvailable + + -- ** TurnBasedMatch + , TurnBasedMatch + , turnBasedMatch + , tbmStatus + , tbmVariant + , tbmResults + , tbmMatchNumber + , tbmKind + , tbmData + , tbmWithParticipantId + , tbmCreationDetails + , tbmInviterId + , tbmLastUpdateDetails + , tbmParticipants + , tbmApplicationId + , tbmAutoMatchingCriteria + , tbmPreviousMatchData + , tbmPendingParticipantId + , tbmUserMatchStatus + , tbmMatchId + , tbmDescription + , tbmRematchId + , tbmMatchVersion + + -- ** PlayerEvent + , PlayerEvent + , playerEvent + , peKind + , peNumEvents + , peFormattedNumEvents + , peDefinitionId + , pePlayerId + + -- ** Room + , Room + , room + , rStatus + , rVariant + , rKind + , rAutoMatchingStatus + , rCreationDetails + , rInviterId + , rLastUpdateDetails + , rRoomStatusVersion + , rParticipants + , rApplicationId + , rAutoMatchingCriteria + , rRoomId + , rDescription + + -- ** QuestListResponse + , QuestListResponse + , questListResponse + , qlrNextPageToken + , qlrKind + , qlrItems + + -- ** Application + , Application + , application + , aThemeColor + , aLeaderboardCount + , aKind + , aCategory + , aName + , aEnabledFeatures + , aInstances + , aAuthor + , aId + , aAchievementCount + , aAssets + , aDescription + , aLastUpdatedTimestamp + + -- ** TurnBasedMatchTurn + , TurnBasedMatchTurn + , turnBasedMatchTurn + , tbmtResults + , tbmtKind + , tbmtData + , tbmtPendingParticipantId + , tbmtMatchVersion + + -- ** ApplicationCategory + , ApplicationCategory + , applicationCategory + , acSecondary + , acKind + , acPrimary + + -- ** PlayerScoreListResponse + , PlayerScoreListResponse + , playerScoreListResponse + , pslrSubmittedScores + , pslrKind + + -- ** NetworkDiagnostics + , NetworkDiagnostics + , networkDiagnostics + , ndAndroidNetworkType + , ndKind + , ndNetworkOperatorCode + , ndNetworkOperatorName + , ndRegistrationLatencyMillis + , ndIosNetworkType + , ndAndroidNetworkSubtype + + -- ** PlayerLeaderboardScore + , PlayerLeaderboardScore + , playerLeaderboardScore + , plsScoreTag + , plsScoreString + , plsKind + , plsScoreValue + , plsTimeSpan + , plsPublicRank + , plsSocialRank + , plsLeaderboardId + , plsWriteTimestamp + + -- ** QuestCriterion + , QuestCriterion + , questCriterion + , qcCurrentContribution + , qcCompletionContribution + , qcKind + , qcInitialPlayerProgress + , qcEventId + + -- ** AchievementUpdateResponse + , AchievementUpdateResponse + , achievementUpdateResponse + , aurUpdateOccurred + , aurAchievementId + , aurKind + , aurCurrentState + , aurNewlyUnlocked + , aurCurrentSteps + + -- ** SnapshotListResponse + , SnapshotListResponse + , snapshotListResponse + , slrNextPageToken + , slrKind + , slrItems + + -- ** PushToken + , PushToken + , pushToken + , ptClientRevision + , ptKind + , ptLanguage + , ptId + + -- ** TurnBasedMatchList + , TurnBasedMatchList + , turnBasedMatchList + , tbmlNextPageToken + , tbmlKind + , tbmlItems + + -- ** PlayerLevel + , PlayerLevel + , playerLevel + , plMaxExperiencePoints + , plKind + , plMinExperiencePoints + , plLevel + + -- ** RoomList + , RoomList + , roomList + , rlNextPageToken + , rlKind + , rlItems + + -- ** PeerChannelDiagnostics + , PeerChannelDiagnostics + , peerChannelDiagnostics + , pcdNumMessagesLost + , pcdBytesSent + , pcdKind + , pcdRoundtripLatencyMillis + , pcdBytesReceived + , pcdNumMessagesReceived + , pcdNumSendFailures + , pcdNumMessagesSent + + -- ** LeaderboardEntry + , LeaderboardEntry + , leaderboardEntry + , leScoreTag + , leWriteTimestampMillis + , leKind + , leScoreValue + , leFormattedScore + , leTimeSpan + , leFormattedScoreRank + , lePlayer + , leScoreRank + + -- ** AchievementUpdateMultipleResponse + , AchievementUpdateMultipleResponse + , achievementUpdateMultipleResponse + , aumrKind + , aumrUpdatedAchievements + + -- ** PlayerScoreResponse + , PlayerScoreResponse + , playerScoreResponse + , psrScoreTag + , psrKind + , psrFormattedScore + , psrLeaderboardId + , psrBeatenScoreTimeSpans + , psrUnbeatenScores + + -- ** TurnBasedMatchParticipant + , TurnBasedMatchParticipant + , turnBasedMatchParticipant + , tbmpStatus + , tbmpKind + , tbmpId + , tbmpAutoMatched + , tbmpPlayer + , tbmpAutoMatchedPlayer + + -- ** RoomClientAddress + , RoomClientAddress + , roomClientAddress + , rcaKind + , rcaXmppAddress + + -- ** InstanceAndroidDetails + , InstanceAndroidDetails + , instanceAndroidDetails + , iadPackageName + , iadPreferred + , iadKind + , iadEnablePiracyCheck + + -- ** LeaderboardListResponse + , LeaderboardListResponse + , leaderboardListResponse + , llrNextPageToken + , llrKind + , llrItems + + -- ** Category + , Category + , category + , cKind + , cCategory + , cExperiencePoints + + -- ** EventDefinitionListResponse + , EventDefinitionListResponse + , eventDefinitionListResponse + , edlrNextPageToken + , edlrKind + , edlrItems + + -- ** RoomParticipant + , RoomParticipant + , roomParticipant + , rpStatus + , rpConnected + , rpLeaveReason + , rpKind + , rpClientAddress + , rpId + , rpAutoMatched + , rpPlayer + , rpCapabilities + , rpAutoMatchedPlayer + + -- ** AnonymousPlayer + , AnonymousPlayer + , anonymousPlayer + , apAvatarImageUrl + , apKind + , apDisplayName + + -- ** AchievementDefinitionsListResponse + , AchievementDefinitionsListResponse + , achievementDefinitionsListResponse + , adlrNextPageToken + , adlrKind + , adlrItems + + -- ** QuestContribution + , QuestContribution + , questContribution + , qKind + , qValue + , qFormattedValue + + -- ** PlayerLeaderboardScoreListResponse + , PlayerLeaderboardScoreListResponse + , playerLeaderboardScoreListResponse + , plslrNextPageToken + , plslrKind + , plslrItems + , plslrPlayer + + -- ** SnapshotImage + , SnapshotImage + , snapshotImage + , siHeight + , siKind + , siUrl + , siMimeType + , siWidth + + -- ** RoomStatus + , RoomStatus + , roomStatus + , rsStatus + , rsKind + , rsAutoMatchingStatus + , rsStatusVersion + , rsParticipants + , rsRoomId + + -- ** TurnBasedAutoMatchingCriteria + , TurnBasedAutoMatchingCriteria + , turnBasedAutoMatchingCriteria + , tbamcKind + , tbamcExclusiveBitmask + , tbamcMaxAutoMatchingPlayers + , tbamcMinAutoMatchingPlayers + + -- ** PlayerScore + , PlayerScore + , playerScore + , psScoreTag + , psScore + , psKind + , psFormattedScore + , psTimeSpan + + -- ** InstanceIosDetails + , InstanceIosDetails + , instanceIosDetails + , iidItunesAppId + , iidPreferredForIpad + , iidSupportIphone + , iidKind + , iidSupportIpad + , iidPreferredForIphone + , iidBundleIdentifier + + -- ** EventUpdateResponse + , EventUpdateResponse + , eventUpdateResponse + , eurPlayerEvents + , eurBatchFailures + , eurEventFailures + , eurKind + + -- ** RevisionCheckResponse + , RevisionCheckResponse + , revisionCheckResponse + , rcrApiVersion + , rcrKind + , rcrRevisionStatus + + -- ** ParticipantResult + , ParticipantResult + , participantResult + , prParticipantId + , prKind + , prResult + , prPlacing + + -- ** CategoryListResponse + , CategoryListResponse + , categoryListResponse + , clrNextPageToken + , clrKind + , clrItems + + -- ** TurnBasedMatchModification + , TurnBasedMatchModification + , turnBasedMatchModification + , tbmmParticipantId + , tbmmKind + , tbmmModifiedTimestampMillis + + -- ** RoomP2PStatus + , RoomP2PStatus + , roomP2PStatus + , rppsStatus + , rppsParticipantId + , rppsKind + , rppsError + , rppsErrorReason + , rppsConnectionSetupLatencyMillis + , rppsUnreliableRoundtripLatencyMillis + + -- ** MetagameConfig + , MetagameConfig + , metagameConfig + , mcKind + , mcCurrentVersion + , mcPlayerLevels + + -- ** Leaderboard + , Leaderboard + , leaderboard + , lKind + , lIsIconUrlDefault + , lName + , lId + , lIconUrl + , lOrder + + -- ** EventDefinition + , EventDefinition + , eventDefinition + , edIsDefaultImageUrl + , edKind + , edVisibility + , edImageUrl + , edDisplayName + , edId + , edChildEvents + , edDescription + + -- ** RoomModification + , RoomModification + , roomModification + , rmParticipantId + , rmKind + , rmModifiedTimestampMillis + + -- ** AchievementUnlockResponse + , AchievementUnlockResponse + , achievementUnlockResponse + , achKind + , achNewlyUnlocked + + -- ** EventUpdateRequest + , EventUpdateRequest + , eventUpdateRequest + , eUpdateCount + , eKind + , eDefinitionId + + -- ** PlayerAchievement + , PlayerAchievement + , playerAchievement + , paKind + , paAchievementState + , paFormattedCurrentStepsString + , paExperiencePoints + , paId + , paCurrentSteps + , paLastUpdatedTimestamp + + -- ** RoomP2PStatuses + , RoomP2PStatuses + , roomP2PStatuses + , rppssKind + , rppssUpdates + + -- ** AchievementUpdateRequest + , AchievementUpdateRequest + , achievementUpdateRequest + , auruAchievementId + , auruKind + , auruUpdateType + , auruSetStepsAtLeastPayload + , auruIncrementPayload + + -- ** ImageAsset + , ImageAsset + , imageAsset + , iaHeight + , iaKind + , iaUrl + , iaWidth + , iaName + + -- ** LeaderboardScoreRank + , LeaderboardScoreRank + , leaderboardScoreRank + , lsrNumScores + , lsrKind + , lsrFormattedRank + , lsrFormattedNumScores + , lsrRank + + -- ** AchievementUpdateMultipleRequest + , AchievementUpdateMultipleRequest + , achievementUpdateMultipleRequest + , aumruKind + , aumruUpdates + + -- ** RoomAutoMatchStatus + , RoomAutoMatchStatus + , roomAutoMatchStatus + , ramsKind + , ramsWaitEstimateSeconds + + -- ** RoomCreateRequest + , RoomCreateRequest + , roomCreateRequest + , rooRequestId + , rooVariant + , rooNetworkDiagnostics + , rooKind + , rooInvitedPlayerIds + , rooClientAddress + , rooAutoMatchingCriteria + , rooCapabilities + + -- ** LeaderboardScores + , LeaderboardScores + , leaderboardScores + , lsNextPageToken + , lsNumScores + , lsKind + , lsPlayerScore + , lsItems + , lsPrevPageToken + + -- ** PlayerListResponse + , PlayerListResponse + , playerListResponse + , plrNextPageToken + , plrKind + , plrItems + + -- ** TurnBasedMatchCreateRequest + , TurnBasedMatchCreateRequest + , turnBasedMatchCreateRequest + , tbmcrRequestId + , tbmcrVariant + , tbmcrKind + , tbmcrInvitedPlayerIds + , tbmcrAutoMatchingCriteria + + -- ** AchievementDefinition + , AchievementDefinition + , achievementDefinition + , adAchievementType + , adFormattedTotalSteps + , adRevealedIconUrl + , adKind + , adExperiencePoints + , adInitialState + , adName + , adId + , adIsUnlockedIconUrlDefault + , adTotalSteps + , adDescription + , adIsRevealedIconUrlDefault + , adUnlockedIconUrl + + -- ** PlayerAchievementListResponse + , PlayerAchievementListResponse + , playerAchievementListResponse + , palrNextPageToken + , palrKind + , palrItems + + -- ** AchievementSetStepsAtLeastResponse + , AchievementSetStepsAtLeastResponse + , achievementSetStepsAtLeastResponse + , assalrKind + , assalrNewlyUnlocked + , assalrCurrentSteps + + -- ** EventBatchRecordFailure + , EventBatchRecordFailure + , eventBatchRecordFailure + , ebrfKind + , ebrfRange + , ebrfFailureCause + + -- ** TurnBasedMatchResults + , TurnBasedMatchResults + , turnBasedMatchResults + , tbmrResults + , tbmrKind + , tbmrData + , tbmrMatchVersion + + -- ** RoomLeaveRequest + , RoomLeaveRequest + , roomLeaveRequest + , rlrKind + , rlrReason + , rlrLeaveDiagnostics + + -- ** AchievementIncrementResponse + , AchievementIncrementResponse + , achievementIncrementResponse + , airKind + , airNewlyUnlocked + , airCurrentSteps + + -- ** AchievementRevealResponse + , AchievementRevealResponse + , achievementRevealResponse + , arrKind + , arrCurrentState + + -- ** Played + , Played + , played + , pKind + , pAutoMatched + , pTimeMillis + + -- ** RoomAutoMatchingCriteria + , RoomAutoMatchingCriteria + , roomAutoMatchingCriteria + , ramcKind + , ramcExclusiveBitmask + , ramcMaxAutoMatchingPlayers + , ramcMinAutoMatchingPlayers + + -- ** AggregateStats + , AggregateStats + , aggregateStats + , asMax + , asKind + , asCount + , asMin + , asSum + + -- ** RoomLeaveDiagnostics + , RoomLeaveDiagnostics + , roomLeaveDiagnostics + , rldPeerSession + , rldAndroidNetworkType + , rldKind + , rldNetworkOperatorCode + , rldNetworkOperatorName + , rldSocketsUsed + , rldIosNetworkType + , rldAndroidNetworkSubtype + + -- ** TurnBasedMatchSync + , TurnBasedMatchSync + , turnBasedMatchSync + , tbmsMoreAvailable + , tbmsNextPageToken + , tbmsKind + , tbmsItems + + -- ** QuestMilestone + , QuestMilestone + , questMilestone + , qmState + , qmKind + , qmId + , qmCompletionRewardData + , qmCriteria + + -- ** PushTokenId + , PushTokenId + , pushTokenId + , ptiIos + , ptiKind + + -- ** EventRecordRequest + , EventRecordRequest + , eventRecordRequest + , errRequestId + , errKind + , errCurrentTimeMillis + , errTimePeriods + + -- ** ScoreSubmission + , ScoreSubmission + , scoreSubmission + , ssSignature + , ssScoreTag + , ssScore + , ssKind + , ssLeaderboardId + + -- ** PeerSessionDiagnostics + , PeerSessionDiagnostics + , peerSessionDiagnostics + , psdConnectedTimestampMillis + , psdParticipantId + , psdKind + , psdUnreliableChannel + , psdReliableChannel + + -- ** EventPeriodUpdate + , EventPeriodUpdate + , eventPeriodUpdate + , epuKind + , epuTimePeriod + , epuUpdates + + -- ** GamesAchievementIncrement + , GamesAchievementIncrement + , gamesAchievementIncrement + , gaiRequestId + , gaiKind + , gaiSteps + + -- ** GamesAchievementSetStepsAtLeast + , GamesAchievementSetStepsAtLeast + , gamesAchievementSetStepsAtLeast + , gassalKind + , gassalSteps + + -- ** PlayerExperienceInfo + , PlayerExperienceInfo + , playerExperienceInfo + , peiKind + , peiCurrentExperiencePoints + , peiCurrentLevel + , peiNextLevel + , peiLastLevelUpTimestampMillis + + -- ** Player + , Player + , player + , plaLastPlayedWith + , plaAvatarImageUrl + , plaKind + , plaExperienceInfo + , plaName + , plaDisplayName + , plaTitle + , plaPlayerId + + -- ** TurnBasedMatchRematch + , TurnBasedMatchRematch + , turnBasedMatchRematch + , tRematch + , tKind + , tPreviousMatch + + -- ** InstanceWebDetails + , InstanceWebDetails + , instanceWebDetails + , iwdPreferred + , iwdKind + , iwdLaunchUrl + + -- ** EventChild + , EventChild + , eventChild + , ecKind + , ecChildId + + -- ** TurnBasedMatchDataRequest + , TurnBasedMatchDataRequest + , turnBasedMatchDataRequest + , tbmdrKind + , tbmdrData + + -- ** PlayerEventListResponse + , PlayerEventListResponse + , playerEventListResponse + , pelrNextPageToken + , pelrKind + , pelrItems + + -- ** EventPeriodRange + , EventPeriodRange + , eventPeriodRange + , eprKind + , eprPeriodStartMillis + , eprPeriodEndMillis + + -- ** Quest + , Quest + , quest + , queLastUpdatedTimestampMillis + , queBannerUrl + , queState + , queMilestones + , queKind + , queApplicationId + , queEndTimestampMillis + , queName + , queId + , queIconUrl + , queStartTimestampMillis + , queNotifyTimestampMillis + , queDescription + , queIsDefaultBannerUrl + , queIsDefaultIconUrl + , queAcceptedTimestampMillis + + -- ** EventRecordFailure + , EventRecordFailure + , eventRecordFailure + , erfKind + , erfFailureCause + , erfEventId + + -- ** Instance + , Instance + , instance' + , iAndroidInstance + , iKind + , iWebInstance + , iIosInstance + , iName + , iAcquisitionUri + , iPlatformType + , iTurnBasedPlay + , iRealtimePlay + + -- ** PlayerScoreSubmissionList + , PlayerScoreSubmissionList + , playerScoreSubmissionList + , psslKind + , psslScores + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude +import Network.Google.Resource.Games.AchievementDefinitions.List +import Network.Google.Resource.Games.Achievements.Increment +import Network.Google.Resource.Games.Achievements.List +import Network.Google.Resource.Games.Achievements.Reveal +import Network.Google.Resource.Games.Achievements.SetStepsAtLeast +import Network.Google.Resource.Games.Achievements.Unlock +import Network.Google.Resource.Games.Achievements.UpdateMultiple +import Network.Google.Resource.Games.Applications.Get +import Network.Google.Resource.Games.Applications.Played +import Network.Google.Resource.Games.Events.ListByPlayer +import Network.Google.Resource.Games.Events.ListDefinitions +import Network.Google.Resource.Games.Events.Record +import Network.Google.Resource.Games.Leaderboards.Get +import Network.Google.Resource.Games.Leaderboards.List +import Network.Google.Resource.Games.Metagame.GetMetagameConfig +import Network.Google.Resource.Games.Metagame.ListCategoriesByPlayer +import Network.Google.Resource.Games.Players.Get +import Network.Google.Resource.Games.Players.List +import Network.Google.Resource.Games.Pushtokens.Remove +import Network.Google.Resource.Games.Pushtokens.Update +import Network.Google.Resource.Games.QuestMilestones.Claim +import Network.Google.Resource.Games.Quests.Accept +import Network.Google.Resource.Games.Quests.List +import Network.Google.Resource.Games.Revisions.Check +import Network.Google.Resource.Games.Rooms.Create +import Network.Google.Resource.Games.Rooms.Decline +import Network.Google.Resource.Games.Rooms.Dismiss +import Network.Google.Resource.Games.Rooms.Get +import Network.Google.Resource.Games.Rooms.Join +import Network.Google.Resource.Games.Rooms.Leave +import Network.Google.Resource.Games.Rooms.List +import Network.Google.Resource.Games.Rooms.ReportStatus +import Network.Google.Resource.Games.Scores.Get +import Network.Google.Resource.Games.Scores.List +import Network.Google.Resource.Games.Scores.ListWindow +import Network.Google.Resource.Games.Scores.Submit +import Network.Google.Resource.Games.Scores.SubmitMultiple +import Network.Google.Resource.Games.Snapshots.Get +import Network.Google.Resource.Games.Snapshots.List +import Network.Google.Resource.Games.TurnBasedMatches.Cancel +import Network.Google.Resource.Games.TurnBasedMatches.Create +import Network.Google.Resource.Games.TurnBasedMatches.Decline +import Network.Google.Resource.Games.TurnBasedMatches.Dismiss +import Network.Google.Resource.Games.TurnBasedMatches.Finish +import Network.Google.Resource.Games.TurnBasedMatches.Get +import Network.Google.Resource.Games.TurnBasedMatches.Join +import Network.Google.Resource.Games.TurnBasedMatches.Leave +import Network.Google.Resource.Games.TurnBasedMatches.LeaveTurn +import Network.Google.Resource.Games.TurnBasedMatches.List +import Network.Google.Resource.Games.TurnBasedMatches.Rematch +import Network.Google.Resource.Games.TurnBasedMatches.Sync +import Network.Google.Resource.Games.TurnBasedMatches.TakeTurn + +{- $resources +TODO +-} + +type GamesAPI = + Rooms :<|> Leaderboards :<|> QuestMilestones :<|> + Metagame + :<|> AchievementDefinitions + :<|> Achievements + :<|> Snapshots + :<|> Events + :<|> Quests + :<|> Players + :<|> Revisions + :<|> Scores + :<|> Pushtokens + :<|> TurnBasedMatches + :<|> Applications + +gamesAPI :: Proxy GamesAPI +gamesAPI = Proxy diff --git a/gogol-games/gen/Network/Google/Games/Types.hs b/gogol-games/gen/Network/Google/Games/Types.hs new file mode 100644 index 000000000..8d1bfd77b --- /dev/null +++ b/gogol-games/gen/Network/Google/Games/Types.hs @@ -0,0 +1,881 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Games.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Games.Types + ( + -- * Service URL + gamesURL + + -- * RoomJoinRequest + , RoomJoinRequest + , roomJoinRequest + , rjrNetworkDiagnostics + , rjrKind + , rjrClientAddress + , rjrCapabilities + + -- * Snapshot + , Snapshot + , snapshot + , sLastModifiedMillis + , sKind + , sProgressValue + , sUniqueName + , sCoverImage + , sId + , sDurationMillis + , sTitle + , sType + , sDescription + , sDriveId + + -- * TurnBasedMatchData + , TurnBasedMatchData + , turnBasedMatchData + , tbmdKind + , tbmdData + , tbmdDataAvailable + + -- * TurnBasedMatch + , TurnBasedMatch + , turnBasedMatch + , tbmStatus + , tbmVariant + , tbmResults + , tbmMatchNumber + , tbmKind + , tbmData + , tbmWithParticipantId + , tbmCreationDetails + , tbmInviterId + , tbmLastUpdateDetails + , tbmParticipants + , tbmApplicationId + , tbmAutoMatchingCriteria + , tbmPreviousMatchData + , tbmPendingParticipantId + , tbmUserMatchStatus + , tbmMatchId + , tbmDescription + , tbmRematchId + , tbmMatchVersion + + -- * PlayerEvent + , PlayerEvent + , playerEvent + , peKind + , peNumEvents + , peFormattedNumEvents + , peDefinitionId + , pePlayerId + + -- * Room + , Room + , room + , rStatus + , rVariant + , rKind + , rAutoMatchingStatus + , rCreationDetails + , rInviterId + , rLastUpdateDetails + , rRoomStatusVersion + , rParticipants + , rApplicationId + , rAutoMatchingCriteria + , rRoomId + , rDescription + + -- * QuestListResponse + , QuestListResponse + , questListResponse + , qlrNextPageToken + , qlrKind + , qlrItems + + -- * Application + , Application + , application + , aThemeColor + , aLeaderboardCount + , aKind + , aCategory + , aName + , aEnabledFeatures + , aInstances + , aAuthor + , aId + , aAchievementCount + , aAssets + , aDescription + , aLastUpdatedTimestamp + + -- * TurnBasedMatchTurn + , TurnBasedMatchTurn + , turnBasedMatchTurn + , tbmtResults + , tbmtKind + , tbmtData + , tbmtPendingParticipantId + , tbmtMatchVersion + + -- * ApplicationCategory + , ApplicationCategory + , applicationCategory + , acSecondary + , acKind + , acPrimary + + -- * PlayerScoreListResponse + , PlayerScoreListResponse + , playerScoreListResponse + , pslrSubmittedScores + , pslrKind + + -- * NetworkDiagnostics + , NetworkDiagnostics + , networkDiagnostics + , ndAndroidNetworkType + , ndKind + , ndNetworkOperatorCode + , ndNetworkOperatorName + , ndRegistrationLatencyMillis + , ndIosNetworkType + , ndAndroidNetworkSubtype + + -- * PlayerLeaderboardScore + , PlayerLeaderboardScore + , playerLeaderboardScore + , plsScoreTag + , plsScoreString + , plsKind + , plsScoreValue + , plsTimeSpan + , plsPublicRank + , plsSocialRank + , plsLeaderboardId + , plsWriteTimestamp + + -- * QuestCriterion + , QuestCriterion + , questCriterion + , qcCurrentContribution + , qcCompletionContribution + , qcKind + , qcInitialPlayerProgress + , qcEventId + + -- * AchievementUpdateResponse + , AchievementUpdateResponse + , achievementUpdateResponse + , aurUpdateOccurred + , aurAchievementId + , aurKind + , aurCurrentState + , aurNewlyUnlocked + , aurCurrentSteps + + -- * SnapshotListResponse + , SnapshotListResponse + , snapshotListResponse + , slrNextPageToken + , slrKind + , slrItems + + -- * PushToken + , PushToken + , pushToken + , ptClientRevision + , ptKind + , ptLanguage + , ptId + + -- * TurnBasedMatchList + , TurnBasedMatchList + , turnBasedMatchList + , tbmlNextPageToken + , tbmlKind + , tbmlItems + + -- * PlayerLevel + , PlayerLevel + , playerLevel + , plMaxExperiencePoints + , plKind + , plMinExperiencePoints + , plLevel + + -- * RoomList + , RoomList + , roomList + , rlNextPageToken + , rlKind + , rlItems + + -- * PeerChannelDiagnostics + , PeerChannelDiagnostics + , peerChannelDiagnostics + , pcdNumMessagesLost + , pcdBytesSent + , pcdKind + , pcdRoundtripLatencyMillis + , pcdBytesReceived + , pcdNumMessagesReceived + , pcdNumSendFailures + , pcdNumMessagesSent + + -- * LeaderboardEntry + , LeaderboardEntry + , leaderboardEntry + , leScoreTag + , leWriteTimestampMillis + , leKind + , leScoreValue + , leFormattedScore + , leTimeSpan + , leFormattedScoreRank + , lePlayer + , leScoreRank + + -- * AchievementUpdateMultipleResponse + , AchievementUpdateMultipleResponse + , achievementUpdateMultipleResponse + , aumrKind + , aumrUpdatedAchievements + + -- * PlayerScoreResponse + , PlayerScoreResponse + , playerScoreResponse + , psrScoreTag + , psrKind + , psrFormattedScore + , psrLeaderboardId + , psrBeatenScoreTimeSpans + , psrUnbeatenScores + + -- * TurnBasedMatchParticipant + , TurnBasedMatchParticipant + , turnBasedMatchParticipant + , tbmpStatus + , tbmpKind + , tbmpId + , tbmpAutoMatched + , tbmpPlayer + , tbmpAutoMatchedPlayer + + -- * RoomClientAddress + , RoomClientAddress + , roomClientAddress + , rcaKind + , rcaXmppAddress + + -- * InstanceAndroidDetails + , InstanceAndroidDetails + , instanceAndroidDetails + , iadPackageName + , iadPreferred + , iadKind + , iadEnablePiracyCheck + + -- * LeaderboardListResponse + , LeaderboardListResponse + , leaderboardListResponse + , llrNextPageToken + , llrKind + , llrItems + + -- * Category + , Category + , category + , cKind + , cCategory + , cExperiencePoints + + -- * EventDefinitionListResponse + , EventDefinitionListResponse + , eventDefinitionListResponse + , edlrNextPageToken + , edlrKind + , edlrItems + + -- * RoomParticipant + , RoomParticipant + , roomParticipant + , rpStatus + , rpConnected + , rpLeaveReason + , rpKind + , rpClientAddress + , rpId + , rpAutoMatched + , rpPlayer + , rpCapabilities + , rpAutoMatchedPlayer + + -- * AnonymousPlayer + , AnonymousPlayer + , anonymousPlayer + , apAvatarImageUrl + , apKind + , apDisplayName + + -- * AchievementDefinitionsListResponse + , AchievementDefinitionsListResponse + , achievementDefinitionsListResponse + , adlrNextPageToken + , adlrKind + , adlrItems + + -- * QuestContribution + , QuestContribution + , questContribution + , qKind + , qValue + , qFormattedValue + + -- * PlayerLeaderboardScoreListResponse + , PlayerLeaderboardScoreListResponse + , playerLeaderboardScoreListResponse + , plslrNextPageToken + , plslrKind + , plslrItems + , plslrPlayer + + -- * SnapshotImage + , SnapshotImage + , snapshotImage + , siHeight + , siKind + , siUrl + , siMimeType + , siWidth + + -- * RoomStatus + , RoomStatus + , roomStatus + , rsStatus + , rsKind + , rsAutoMatchingStatus + , rsStatusVersion + , rsParticipants + , rsRoomId + + -- * TurnBasedAutoMatchingCriteria + , TurnBasedAutoMatchingCriteria + , turnBasedAutoMatchingCriteria + , tbamcKind + , tbamcExclusiveBitmask + , tbamcMaxAutoMatchingPlayers + , tbamcMinAutoMatchingPlayers + + -- * PlayerScore + , PlayerScore + , playerScore + , psScoreTag + , psScore + , psKind + , psFormattedScore + , psTimeSpan + + -- * InstanceIosDetails + , InstanceIosDetails + , instanceIosDetails + , iidItunesAppId + , iidPreferredForIpad + , iidSupportIphone + , iidKind + , iidSupportIpad + , iidPreferredForIphone + , iidBundleIdentifier + + -- * EventUpdateResponse + , EventUpdateResponse + , eventUpdateResponse + , eurPlayerEvents + , eurBatchFailures + , eurEventFailures + , eurKind + + -- * RevisionCheckResponse + , RevisionCheckResponse + , revisionCheckResponse + , rcrApiVersion + , rcrKind + , rcrRevisionStatus + + -- * ParticipantResult + , ParticipantResult + , participantResult + , prParticipantId + , prKind + , prResult + , prPlacing + + -- * CategoryListResponse + , CategoryListResponse + , categoryListResponse + , clrNextPageToken + , clrKind + , clrItems + + -- * TurnBasedMatchModification + , TurnBasedMatchModification + , turnBasedMatchModification + , tbmmParticipantId + , tbmmKind + , tbmmModifiedTimestampMillis + + -- * RoomP2PStatus + , RoomP2PStatus + , roomP2PStatus + , rppsStatus + , rppsParticipantId + , rppsKind + , rppsError + , rppsErrorReason + , rppsConnectionSetupLatencyMillis + , rppsUnreliableRoundtripLatencyMillis + + -- * MetagameConfig + , MetagameConfig + , metagameConfig + , mcKind + , mcCurrentVersion + , mcPlayerLevels + + -- * Leaderboard + , Leaderboard + , leaderboard + , lKind + , lIsIconUrlDefault + , lName + , lId + , lIconUrl + , lOrder + + -- * EventDefinition + , EventDefinition + , eventDefinition + , edIsDefaultImageUrl + , edKind + , edVisibility + , edImageUrl + , edDisplayName + , edId + , edChildEvents + , edDescription + + -- * RoomModification + , RoomModification + , roomModification + , rmParticipantId + , rmKind + , rmModifiedTimestampMillis + + -- * AchievementUnlockResponse + , AchievementUnlockResponse + , achievementUnlockResponse + , achKind + , achNewlyUnlocked + + -- * EventUpdateRequest + , EventUpdateRequest + , eventUpdateRequest + , eUpdateCount + , eKind + , eDefinitionId + + -- * PlayerAchievement + , PlayerAchievement + , playerAchievement + , paKind + , paAchievementState + , paFormattedCurrentStepsString + , paExperiencePoints + , paId + , paCurrentSteps + , paLastUpdatedTimestamp + + -- * RoomP2PStatuses + , RoomP2PStatuses + , roomP2PStatuses + , rppssKind + , rppssUpdates + + -- * AchievementUpdateRequest + , AchievementUpdateRequest + , achievementUpdateRequest + , auruAchievementId + , auruKind + , auruUpdateType + , auruSetStepsAtLeastPayload + , auruIncrementPayload + + -- * ImageAsset + , ImageAsset + , imageAsset + , iaHeight + , iaKind + , iaUrl + , iaWidth + , iaName + + -- * LeaderboardScoreRank + , LeaderboardScoreRank + , leaderboardScoreRank + , lsrNumScores + , lsrKind + , lsrFormattedRank + , lsrFormattedNumScores + , lsrRank + + -- * AchievementUpdateMultipleRequest + , AchievementUpdateMultipleRequest + , achievementUpdateMultipleRequest + , aumruKind + , aumruUpdates + + -- * RoomAutoMatchStatus + , RoomAutoMatchStatus + , roomAutoMatchStatus + , ramsKind + , ramsWaitEstimateSeconds + + -- * RoomCreateRequest + , RoomCreateRequest + , roomCreateRequest + , rooRequestId + , rooVariant + , rooNetworkDiagnostics + , rooKind + , rooInvitedPlayerIds + , rooClientAddress + , rooAutoMatchingCriteria + , rooCapabilities + + -- * LeaderboardScores + , LeaderboardScores + , leaderboardScores + , lsNextPageToken + , lsNumScores + , lsKind + , lsPlayerScore + , lsItems + , lsPrevPageToken + + -- * PlayerListResponse + , PlayerListResponse + , playerListResponse + , plrNextPageToken + , plrKind + , plrItems + + -- * TurnBasedMatchCreateRequest + , TurnBasedMatchCreateRequest + , turnBasedMatchCreateRequest + , tbmcrRequestId + , tbmcrVariant + , tbmcrKind + , tbmcrInvitedPlayerIds + , tbmcrAutoMatchingCriteria + + -- * AchievementDefinition + , AchievementDefinition + , achievementDefinition + , adAchievementType + , adFormattedTotalSteps + , adRevealedIconUrl + , adKind + , adExperiencePoints + , adInitialState + , adName + , adId + , adIsUnlockedIconUrlDefault + , adTotalSteps + , adDescription + , adIsRevealedIconUrlDefault + , adUnlockedIconUrl + + -- * PlayerAchievementListResponse + , PlayerAchievementListResponse + , playerAchievementListResponse + , palrNextPageToken + , palrKind + , palrItems + + -- * AchievementSetStepsAtLeastResponse + , AchievementSetStepsAtLeastResponse + , achievementSetStepsAtLeastResponse + , assalrKind + , assalrNewlyUnlocked + , assalrCurrentSteps + + -- * EventBatchRecordFailure + , EventBatchRecordFailure + , eventBatchRecordFailure + , ebrfKind + , ebrfRange + , ebrfFailureCause + + -- * TurnBasedMatchResults + , TurnBasedMatchResults + , turnBasedMatchResults + , tbmrResults + , tbmrKind + , tbmrData + , tbmrMatchVersion + + -- * RoomLeaveRequest + , RoomLeaveRequest + , roomLeaveRequest + , rlrKind + , rlrReason + , rlrLeaveDiagnostics + + -- * AchievementIncrementResponse + , AchievementIncrementResponse + , achievementIncrementResponse + , airKind + , airNewlyUnlocked + , airCurrentSteps + + -- * AchievementRevealResponse + , AchievementRevealResponse + , achievementRevealResponse + , arrKind + , arrCurrentState + + -- * Played + , Played + , played + , pKind + , pAutoMatched + , pTimeMillis + + -- * RoomAutoMatchingCriteria + , RoomAutoMatchingCriteria + , roomAutoMatchingCriteria + , ramcKind + , ramcExclusiveBitmask + , ramcMaxAutoMatchingPlayers + , ramcMinAutoMatchingPlayers + + -- * AggregateStats + , AggregateStats + , aggregateStats + , asMax + , asKind + , asCount + , asMin + , asSum + + -- * RoomLeaveDiagnostics + , RoomLeaveDiagnostics + , roomLeaveDiagnostics + , rldPeerSession + , rldAndroidNetworkType + , rldKind + , rldNetworkOperatorCode + , rldNetworkOperatorName + , rldSocketsUsed + , rldIosNetworkType + , rldAndroidNetworkSubtype + + -- * TurnBasedMatchSync + , TurnBasedMatchSync + , turnBasedMatchSync + , tbmsMoreAvailable + , tbmsNextPageToken + , tbmsKind + , tbmsItems + + -- * QuestMilestone + , QuestMilestone + , questMilestone + , qmState + , qmKind + , qmId + , qmCompletionRewardData + , qmCriteria + + -- * PushTokenId + , PushTokenId + , pushTokenId + , ptiIos + , ptiKind + + -- * EventRecordRequest + , EventRecordRequest + , eventRecordRequest + , errRequestId + , errKind + , errCurrentTimeMillis + , errTimePeriods + + -- * ScoreSubmission + , ScoreSubmission + , scoreSubmission + , ssSignature + , ssScoreTag + , ssScore + , ssKind + , ssLeaderboardId + + -- * PeerSessionDiagnostics + , PeerSessionDiagnostics + , peerSessionDiagnostics + , psdConnectedTimestampMillis + , psdParticipantId + , psdKind + , psdUnreliableChannel + , psdReliableChannel + + -- * EventPeriodUpdate + , EventPeriodUpdate + , eventPeriodUpdate + , epuKind + , epuTimePeriod + , epuUpdates + + -- * GamesAchievementIncrement + , GamesAchievementIncrement + , gamesAchievementIncrement + , gaiRequestId + , gaiKind + , gaiSteps + + -- * GamesAchievementSetStepsAtLeast + , GamesAchievementSetStepsAtLeast + , gamesAchievementSetStepsAtLeast + , gassalKind + , gassalSteps + + -- * PlayerExperienceInfo + , PlayerExperienceInfo + , playerExperienceInfo + , peiKind + , peiCurrentExperiencePoints + , peiCurrentLevel + , peiNextLevel + , peiLastLevelUpTimestampMillis + + -- * Player + , Player + , player + , plaLastPlayedWith + , plaAvatarImageUrl + , plaKind + , plaExperienceInfo + , plaName + , plaDisplayName + , plaTitle + , plaPlayerId + + -- * TurnBasedMatchRematch + , TurnBasedMatchRematch + , turnBasedMatchRematch + , tRematch + , tKind + , tPreviousMatch + + -- * InstanceWebDetails + , InstanceWebDetails + , instanceWebDetails + , iwdPreferred + , iwdKind + , iwdLaunchUrl + + -- * EventChild + , EventChild + , eventChild + , ecKind + , ecChildId + + -- * TurnBasedMatchDataRequest + , TurnBasedMatchDataRequest + , turnBasedMatchDataRequest + , tbmdrKind + , tbmdrData + + -- * PlayerEventListResponse + , PlayerEventListResponse + , playerEventListResponse + , pelrNextPageToken + , pelrKind + , pelrItems + + -- * EventPeriodRange + , EventPeriodRange + , eventPeriodRange + , eprKind + , eprPeriodStartMillis + , eprPeriodEndMillis + + -- * Quest + , Quest + , quest + , queLastUpdatedTimestampMillis + , queBannerUrl + , queState + , queMilestones + , queKind + , queApplicationId + , queEndTimestampMillis + , queName + , queId + , queIconUrl + , queStartTimestampMillis + , queNotifyTimestampMillis + , queDescription + , queIsDefaultBannerUrl + , queIsDefaultIconUrl + , queAcceptedTimestampMillis + + -- * EventRecordFailure + , EventRecordFailure + , eventRecordFailure + , erfKind + , erfFailureCause + , erfEventId + + -- * Instance + , Instance + , instance' + , iAndroidInstance + , iKind + , iWebInstance + , iIosInstance + , iName + , iAcquisitionUri + , iPlatformType + , iTurnBasedPlay + , iRealtimePlay + + -- * PlayerScoreSubmissionList + , PlayerScoreSubmissionList + , playerScoreSubmissionList + , psslKind + , psslScores + ) where + +import Network.Google.Games.Types.Product +import Network.Google.Games.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Play Game Services API. +gamesURL :: BaseURL +gamesURL + = BaseUrl Https + "https://www.googleapis.com/games/v1/" + 443 diff --git a/gogol-games/gen/Network/Google/Games/Types/Product.hs b/gogol-games/gen/Network/Google/Games/Types/Product.hs new file mode 100644 index 000000000..310b62f1d --- /dev/null +++ b/gogol-games/gen/Network/Google/Games/Types/Product.hs @@ -0,0 +1,8255 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Games.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Games.Types.Product where + +import Network.Google.Games.Types.Sum +import Network.Google.Prelude + +-- | This is a JSON template for a join room request. +-- +-- /See:/ 'roomJoinRequest' smart constructor. +data RoomJoinRequest = RoomJoinRequest + { _rjrNetworkDiagnostics :: !(Maybe (Maybe NetworkDiagnostics)) + , _rjrKind :: !Text + , _rjrClientAddress :: !(Maybe (Maybe RoomClientAddress)) + , _rjrCapabilities :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomJoinRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rjrNetworkDiagnostics' +-- +-- * 'rjrKind' +-- +-- * 'rjrClientAddress' +-- +-- * 'rjrCapabilities' +roomJoinRequest + :: RoomJoinRequest +roomJoinRequest = + RoomJoinRequest + { _rjrNetworkDiagnostics = Nothing + , _rjrKind = "games#roomJoinRequest" + , _rjrClientAddress = Nothing + , _rjrCapabilities = Nothing + } + +-- | Network diagnostics for the client joining the room. +rjrNetworkDiagnostics :: Lens' RoomJoinRequest (Maybe (Maybe NetworkDiagnostics)) +rjrNetworkDiagnostics + = lens _rjrNetworkDiagnostics + (\ s a -> s{_rjrNetworkDiagnostics = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomJoinRequest. +rjrKind :: Lens' RoomJoinRequest Text +rjrKind = lens _rjrKind (\ s a -> s{_rjrKind = a}) + +-- | Client address for the player joining the room. +rjrClientAddress :: Lens' RoomJoinRequest (Maybe (Maybe RoomClientAddress)) +rjrClientAddress + = lens _rjrClientAddress + (\ s a -> s{_rjrClientAddress = a}) + +-- | The capabilities that this client supports for realtime communication. +rjrCapabilities :: Lens' RoomJoinRequest [Text] +rjrCapabilities + = lens _rjrCapabilities + (\ s a -> s{_rjrCapabilities = a}) + . _Default + . _Coerce + +instance FromJSON RoomJoinRequest where + parseJSON + = withObject "RoomJoinRequest" + (\ o -> + RoomJoinRequest <$> + (o .:? "networkDiagnostics") <*> + (o .:? "kind" .!= "games#roomJoinRequest") + <*> (o .:? "clientAddress") + <*> (o .:? "capabilities" .!= mempty)) + +instance ToJSON RoomJoinRequest where + toJSON RoomJoinRequest{..} + = object + (catMaybes + [("networkDiagnostics" .=) <$> + _rjrNetworkDiagnostics, + Just ("kind" .= _rjrKind), + ("clientAddress" .=) <$> _rjrClientAddress, + ("capabilities" .=) <$> _rjrCapabilities]) + +-- | This is a JSON template for an snapshot object. +-- +-- /See:/ 'snapshot' smart constructor. +data Snapshot = Snapshot + { _sLastModifiedMillis :: !(Maybe Int64) + , _sKind :: !Text + , _sProgressValue :: !(Maybe Int64) + , _sUniqueName :: !(Maybe Text) + , _sCoverImage :: !(Maybe (Maybe SnapshotImage)) + , _sId :: !(Maybe Text) + , _sDurationMillis :: !(Maybe Int64) + , _sTitle :: !(Maybe Text) + , _sType :: !(Maybe Text) + , _sDescription :: !(Maybe Text) + , _sDriveId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Snapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sLastModifiedMillis' +-- +-- * 'sKind' +-- +-- * 'sProgressValue' +-- +-- * 'sUniqueName' +-- +-- * 'sCoverImage' +-- +-- * 'sId' +-- +-- * 'sDurationMillis' +-- +-- * 'sTitle' +-- +-- * 'sType' +-- +-- * 'sDescription' +-- +-- * 'sDriveId' +snapshot + :: Snapshot +snapshot = + Snapshot + { _sLastModifiedMillis = Nothing + , _sKind = "games#snapshot" + , _sProgressValue = Nothing + , _sUniqueName = Nothing + , _sCoverImage = Nothing + , _sId = Nothing + , _sDurationMillis = Nothing + , _sTitle = Nothing + , _sType = Nothing + , _sDescription = Nothing + , _sDriveId = Nothing + } + +-- | The timestamp (in millis since Unix epoch) of the last modification to +-- this snapshot. +sLastModifiedMillis :: Lens' Snapshot (Maybe Int64) +sLastModifiedMillis + = lens _sLastModifiedMillis + (\ s a -> s{_sLastModifiedMillis = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#snapshot. +sKind :: Lens' Snapshot Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | The progress value (64-bit integer set by developer) associated with +-- this snapshot. +sProgressValue :: Lens' Snapshot (Maybe Int64) +sProgressValue + = lens _sProgressValue + (\ s a -> s{_sProgressValue = a}) + +-- | The unique name provided when the snapshot was created. +sUniqueName :: Lens' Snapshot (Maybe Text) +sUniqueName + = lens _sUniqueName (\ s a -> s{_sUniqueName = a}) + +-- | The cover image of this snapshot. May be absent if there is no image. +sCoverImage :: Lens' Snapshot (Maybe (Maybe SnapshotImage)) +sCoverImage + = lens _sCoverImage (\ s a -> s{_sCoverImage = a}) + +-- | The ID of the snapshot. +sId :: Lens' Snapshot (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +-- | The duration associated with this snapshot, in millis. +sDurationMillis :: Lens' Snapshot (Maybe Int64) +sDurationMillis + = lens _sDurationMillis + (\ s a -> s{_sDurationMillis = a}) + +-- | The title of this snapshot. +sTitle :: Lens' Snapshot (Maybe Text) +sTitle = lens _sTitle (\ s a -> s{_sTitle = a}) + +-- | The type of this snapshot. Possible values are: - \"SAVE_GAME\" - A +-- snapshot representing a save game. +sType :: Lens' Snapshot (Maybe Text) +sType = lens _sType (\ s a -> s{_sType = a}) + +-- | The description of this snapshot. +sDescription :: Lens' Snapshot (Maybe Text) +sDescription + = lens _sDescription (\ s a -> s{_sDescription = a}) + +-- | The ID of the file underlying this snapshot in the Drive API. Only +-- present if the snapshot is a view on a Drive file and the file is owned +-- by the caller. +sDriveId :: Lens' Snapshot (Maybe Text) +sDriveId = lens _sDriveId (\ s a -> s{_sDriveId = a}) + +instance FromJSON Snapshot where + parseJSON + = withObject "Snapshot" + (\ o -> + Snapshot <$> + (o .:? "lastModifiedMillis") <*> + (o .:? "kind" .!= "games#snapshot") + <*> (o .:? "progressValue") + <*> (o .:? "uniqueName") + <*> (o .:? "coverImage") + <*> (o .:? "id") + <*> (o .:? "durationMillis") + <*> (o .:? "title") + <*> (o .:? "type") + <*> (o .:? "description") + <*> (o .:? "driveId")) + +instance ToJSON Snapshot where + toJSON Snapshot{..} + = object + (catMaybes + [("lastModifiedMillis" .=) <$> _sLastModifiedMillis, + Just ("kind" .= _sKind), + ("progressValue" .=) <$> _sProgressValue, + ("uniqueName" .=) <$> _sUniqueName, + ("coverImage" .=) <$> _sCoverImage, + ("id" .=) <$> _sId, + ("durationMillis" .=) <$> _sDurationMillis, + ("title" .=) <$> _sTitle, ("type" .=) <$> _sType, + ("description" .=) <$> _sDescription, + ("driveId" .=) <$> _sDriveId]) + +-- | This is a JSON template for a turn-based match data object. +-- +-- /See:/ 'turnBasedMatchData' smart constructor. +data TurnBasedMatchData = TurnBasedMatchData + { _tbmdKind :: !Text + , _tbmdData :: !(Maybe Word8) + , _tbmdDataAvailable :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmdKind' +-- +-- * 'tbmdData' +-- +-- * 'tbmdDataAvailable' +turnBasedMatchData + :: TurnBasedMatchData +turnBasedMatchData = + TurnBasedMatchData + { _tbmdKind = "games#turnBasedMatchData" + , _tbmdData = Nothing + , _tbmdDataAvailable = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchData. +tbmdKind :: Lens' TurnBasedMatchData Text +tbmdKind = lens _tbmdKind (\ s a -> s{_tbmdKind = a}) + +-- | The byte representation of the data (limited to 128 kB), as a +-- Base64-encoded string with the URL_SAFE encoding option. +tbmdData :: Lens' TurnBasedMatchData (Maybe Word8) +tbmdData = lens _tbmdData (\ s a -> s{_tbmdData = a}) + +-- | True if this match has data available but it wasn\'t returned in a list +-- response; fetching the match individually will retrieve this data. +tbmdDataAvailable :: Lens' TurnBasedMatchData (Maybe Bool) +tbmdDataAvailable + = lens _tbmdDataAvailable + (\ s a -> s{_tbmdDataAvailable = a}) + +instance FromJSON TurnBasedMatchData where + parseJSON + = withObject "TurnBasedMatchData" + (\ o -> + TurnBasedMatchData <$> + (o .:? "kind" .!= "games#turnBasedMatchData") <*> + (o .:? "data") + <*> (o .:? "dataAvailable")) + +instance ToJSON TurnBasedMatchData where + toJSON TurnBasedMatchData{..} + = object + (catMaybes + [Just ("kind" .= _tbmdKind), + ("data" .=) <$> _tbmdData, + ("dataAvailable" .=) <$> _tbmdDataAvailable]) + +-- | This is a JSON template for a turn-based match resource object. +-- +-- /See:/ 'turnBasedMatch' smart constructor. +data TurnBasedMatch = TurnBasedMatch + { _tbmStatus :: !(Maybe Text) + , _tbmVariant :: !(Maybe Int32) + , _tbmResults :: !(Maybe [Maybe ParticipantResult]) + , _tbmMatchNumber :: !(Maybe Int32) + , _tbmKind :: !Text + , _tbmData :: !(Maybe (Maybe TurnBasedMatchData)) + , _tbmWithParticipantId :: !(Maybe Text) + , _tbmCreationDetails :: !(Maybe (Maybe TurnBasedMatchModification)) + , _tbmInviterId :: !(Maybe Text) + , _tbmLastUpdateDetails :: !(Maybe (Maybe TurnBasedMatchModification)) + , _tbmParticipants :: !(Maybe [Maybe TurnBasedMatchParticipant]) + , _tbmApplicationId :: !(Maybe Text) + , _tbmAutoMatchingCriteria :: !(Maybe (Maybe TurnBasedAutoMatchingCriteria)) + , _tbmPreviousMatchData :: !(Maybe (Maybe TurnBasedMatchData)) + , _tbmPendingParticipantId :: !(Maybe Text) + , _tbmUserMatchStatus :: !(Maybe Text) + , _tbmMatchId :: !(Maybe Text) + , _tbmDescription :: !(Maybe Text) + , _tbmRematchId :: !(Maybe Text) + , _tbmMatchVersion :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatch' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmStatus' +-- +-- * 'tbmVariant' +-- +-- * 'tbmResults' +-- +-- * 'tbmMatchNumber' +-- +-- * 'tbmKind' +-- +-- * 'tbmData' +-- +-- * 'tbmWithParticipantId' +-- +-- * 'tbmCreationDetails' +-- +-- * 'tbmInviterId' +-- +-- * 'tbmLastUpdateDetails' +-- +-- * 'tbmParticipants' +-- +-- * 'tbmApplicationId' +-- +-- * 'tbmAutoMatchingCriteria' +-- +-- * 'tbmPreviousMatchData' +-- +-- * 'tbmPendingParticipantId' +-- +-- * 'tbmUserMatchStatus' +-- +-- * 'tbmMatchId' +-- +-- * 'tbmDescription' +-- +-- * 'tbmRematchId' +-- +-- * 'tbmMatchVersion' +turnBasedMatch + :: TurnBasedMatch +turnBasedMatch = + TurnBasedMatch + { _tbmStatus = Nothing + , _tbmVariant = Nothing + , _tbmResults = Nothing + , _tbmMatchNumber = Nothing + , _tbmKind = "games#turnBasedMatch" + , _tbmData = Nothing + , _tbmWithParticipantId = Nothing + , _tbmCreationDetails = Nothing + , _tbmInviterId = Nothing + , _tbmLastUpdateDetails = Nothing + , _tbmParticipants = Nothing + , _tbmApplicationId = Nothing + , _tbmAutoMatchingCriteria = Nothing + , _tbmPreviousMatchData = Nothing + , _tbmPendingParticipantId = Nothing + , _tbmUserMatchStatus = Nothing + , _tbmMatchId = Nothing + , _tbmDescription = Nothing + , _tbmRematchId = Nothing + , _tbmMatchVersion = Nothing + } + +-- | The status of the match. Possible values are: - \"MATCH_AUTO_MATCHING\" +-- - One or more slots need to be filled by auto-matching; the match cannot +-- be established until they are filled. - \"MATCH_ACTIVE\" - The match has +-- started. - \"MATCH_COMPLETE\" - The match has finished. - +-- \"MATCH_CANCELED\" - The match was canceled. - \"MATCH_EXPIRED\" - The +-- match expired due to inactivity. - \"MATCH_DELETED\" - The match should +-- no longer be shown on the client. Returned only for tombstones for +-- matches when sync is called. +tbmStatus :: Lens' TurnBasedMatch (Maybe Text) +tbmStatus + = lens _tbmStatus (\ s a -> s{_tbmStatus = a}) + +-- | The variant \/ mode of the application being played; can be any integer +-- value, or left blank. +tbmVariant :: Lens' TurnBasedMatch (Maybe Int32) +tbmVariant + = lens _tbmVariant (\ s a -> s{_tbmVariant = a}) + +-- | The results reported for this match. +tbmResults :: Lens' TurnBasedMatch [Maybe ParticipantResult] +tbmResults + = lens _tbmResults (\ s a -> s{_tbmResults = a}) . + _Default + . _Coerce + +-- | The number of the match in a chain of rematches. Will be set to 1 for +-- the first match and incremented by 1 for each rematch. +tbmMatchNumber :: Lens' TurnBasedMatch (Maybe Int32) +tbmMatchNumber + = lens _tbmMatchNumber + (\ s a -> s{_tbmMatchNumber = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatch. +tbmKind :: Lens' TurnBasedMatch Text +tbmKind = lens _tbmKind (\ s a -> s{_tbmKind = a}) + +-- | The data \/ game state for this match. +tbmData :: Lens' TurnBasedMatch (Maybe (Maybe TurnBasedMatchData)) +tbmData = lens _tbmData (\ s a -> s{_tbmData = a}) + +-- | The ID of another participant in the match that can be used when +-- describing the participants the user is playing with. +tbmWithParticipantId :: Lens' TurnBasedMatch (Maybe Text) +tbmWithParticipantId + = lens _tbmWithParticipantId + (\ s a -> s{_tbmWithParticipantId = a}) + +-- | Details about the match creation. +tbmCreationDetails :: Lens' TurnBasedMatch (Maybe (Maybe TurnBasedMatchModification)) +tbmCreationDetails + = lens _tbmCreationDetails + (\ s a -> s{_tbmCreationDetails = a}) + +-- | The ID of the participant that invited the user to the match. Not set if +-- the user was not invited to the match. +tbmInviterId :: Lens' TurnBasedMatch (Maybe Text) +tbmInviterId + = lens _tbmInviterId (\ s a -> s{_tbmInviterId = a}) + +-- | Details about the last update to the match. +tbmLastUpdateDetails :: Lens' TurnBasedMatch (Maybe (Maybe TurnBasedMatchModification)) +tbmLastUpdateDetails + = lens _tbmLastUpdateDetails + (\ s a -> s{_tbmLastUpdateDetails = a}) + +-- | The participants involved in the match, along with their statuses. +-- Includes participants who have left or declined invitations. +tbmParticipants :: Lens' TurnBasedMatch [Maybe TurnBasedMatchParticipant] +tbmParticipants + = lens _tbmParticipants + (\ s a -> s{_tbmParticipants = a}) + . _Default + . _Coerce + +-- | The ID of the application being played. +tbmApplicationId :: Lens' TurnBasedMatch (Maybe Text) +tbmApplicationId + = lens _tbmApplicationId + (\ s a -> s{_tbmApplicationId = a}) + +-- | Criteria for auto-matching players into this match. +tbmAutoMatchingCriteria :: Lens' TurnBasedMatch (Maybe (Maybe TurnBasedAutoMatchingCriteria)) +tbmAutoMatchingCriteria + = lens _tbmAutoMatchingCriteria + (\ s a -> s{_tbmAutoMatchingCriteria = a}) + +-- | The data \/ game state for the previous match; set for the first turn of +-- rematches only. +tbmPreviousMatchData :: Lens' TurnBasedMatch (Maybe (Maybe TurnBasedMatchData)) +tbmPreviousMatchData + = lens _tbmPreviousMatchData + (\ s a -> s{_tbmPreviousMatchData = a}) + +-- | The ID of the participant that is taking a turn. +tbmPendingParticipantId :: Lens' TurnBasedMatch (Maybe Text) +tbmPendingParticipantId + = lens _tbmPendingParticipantId + (\ s a -> s{_tbmPendingParticipantId = a}) + +-- | The status of the current user in the match. Derived from the match +-- type, match status, the user\'s participant status, and the pending +-- participant for the match. Possible values are: - \"USER_INVITED\" - The +-- user has been invited to join the match and has not responded yet. - +-- \"USER_AWAITING_TURN\" - The user is waiting for their turn. - +-- \"USER_TURN\" - The user has an action to take in the match. - +-- \"USER_MATCH_COMPLETED\" - The match has ended (it is completed, +-- canceled, or expired.) +tbmUserMatchStatus :: Lens' TurnBasedMatch (Maybe Text) +tbmUserMatchStatus + = lens _tbmUserMatchStatus + (\ s a -> s{_tbmUserMatchStatus = a}) + +-- | Globally unique ID for a turn-based match. +tbmMatchId :: Lens' TurnBasedMatch (Maybe Text) +tbmMatchId + = lens _tbmMatchId (\ s a -> s{_tbmMatchId = a}) + +-- | This short description is generated by our servers based on turn state +-- and is localized and worded relative to the player requesting the match. +-- It is intended to be displayed when the match is shown in a list. +tbmDescription :: Lens' TurnBasedMatch (Maybe Text) +tbmDescription + = lens _tbmDescription + (\ s a -> s{_tbmDescription = a}) + +-- | The ID of a rematch of this match. Only set for completed matches that +-- have been rematched. +tbmRematchId :: Lens' TurnBasedMatch (Maybe Text) +tbmRematchId + = lens _tbmRematchId (\ s a -> s{_tbmRematchId = a}) + +-- | The version of this match: an increasing counter, used to avoid +-- out-of-date updates to the match. +tbmMatchVersion :: Lens' TurnBasedMatch (Maybe Int32) +tbmMatchVersion + = lens _tbmMatchVersion + (\ s a -> s{_tbmMatchVersion = a}) + +instance FromJSON TurnBasedMatch where + parseJSON + = withObject "TurnBasedMatch" + (\ o -> + TurnBasedMatch <$> + (o .:? "status") <*> (o .:? "variant") <*> + (o .:? "results" .!= mempty) + <*> (o .:? "matchNumber") + <*> (o .:? "kind" .!= "games#turnBasedMatch") + <*> (o .:? "data") + <*> (o .:? "withParticipantId") + <*> (o .:? "creationDetails") + <*> (o .:? "inviterId") + <*> (o .:? "lastUpdateDetails") + <*> (o .:? "participants" .!= mempty) + <*> (o .:? "applicationId") + <*> (o .:? "autoMatchingCriteria") + <*> (o .:? "previousMatchData") + <*> (o .:? "pendingParticipantId") + <*> (o .:? "userMatchStatus") + <*> (o .:? "matchId") + <*> (o .:? "description") + <*> (o .:? "rematchId") + <*> (o .:? "matchVersion")) + +instance ToJSON TurnBasedMatch where + toJSON TurnBasedMatch{..} + = object + (catMaybes + [("status" .=) <$> _tbmStatus, + ("variant" .=) <$> _tbmVariant, + ("results" .=) <$> _tbmResults, + ("matchNumber" .=) <$> _tbmMatchNumber, + Just ("kind" .= _tbmKind), ("data" .=) <$> _tbmData, + ("withParticipantId" .=) <$> _tbmWithParticipantId, + ("creationDetails" .=) <$> _tbmCreationDetails, + ("inviterId" .=) <$> _tbmInviterId, + ("lastUpdateDetails" .=) <$> _tbmLastUpdateDetails, + ("participants" .=) <$> _tbmParticipants, + ("applicationId" .=) <$> _tbmApplicationId, + ("autoMatchingCriteria" .=) <$> + _tbmAutoMatchingCriteria, + ("previousMatchData" .=) <$> _tbmPreviousMatchData, + ("pendingParticipantId" .=) <$> + _tbmPendingParticipantId, + ("userMatchStatus" .=) <$> _tbmUserMatchStatus, + ("matchId" .=) <$> _tbmMatchId, + ("description" .=) <$> _tbmDescription, + ("rematchId" .=) <$> _tbmRematchId, + ("matchVersion" .=) <$> _tbmMatchVersion]) + +-- | This is a JSON template for an event status resource. +-- +-- /See:/ 'playerEvent' smart constructor. +data PlayerEvent = PlayerEvent + { _peKind :: !Text + , _peNumEvents :: !(Maybe Int64) + , _peFormattedNumEvents :: !(Maybe Text) + , _peDefinitionId :: !(Maybe Text) + , _pePlayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerEvent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'peKind' +-- +-- * 'peNumEvents' +-- +-- * 'peFormattedNumEvents' +-- +-- * 'peDefinitionId' +-- +-- * 'pePlayerId' +playerEvent + :: PlayerEvent +playerEvent = + PlayerEvent + { _peKind = "games#playerEvent" + , _peNumEvents = Nothing + , _peFormattedNumEvents = Nothing + , _peDefinitionId = Nothing + , _pePlayerId = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerEvent. +peKind :: Lens' PlayerEvent Text +peKind = lens _peKind (\ s a -> s{_peKind = a}) + +-- | The current number of times this event has occurred. +peNumEvents :: Lens' PlayerEvent (Maybe Int64) +peNumEvents + = lens _peNumEvents (\ s a -> s{_peNumEvents = a}) + +-- | The current number of times this event has occurred, as a string. The +-- formatting of this string depends on the configuration of your event in +-- the Play Games Developer Console. +peFormattedNumEvents :: Lens' PlayerEvent (Maybe Text) +peFormattedNumEvents + = lens _peFormattedNumEvents + (\ s a -> s{_peFormattedNumEvents = a}) + +-- | The ID of the event definition. +peDefinitionId :: Lens' PlayerEvent (Maybe Text) +peDefinitionId + = lens _peDefinitionId + (\ s a -> s{_peDefinitionId = a}) + +-- | The ID of the player. +pePlayerId :: Lens' PlayerEvent (Maybe Text) +pePlayerId + = lens _pePlayerId (\ s a -> s{_pePlayerId = a}) + +instance FromJSON PlayerEvent where + parseJSON + = withObject "PlayerEvent" + (\ o -> + PlayerEvent <$> + (o .:? "kind" .!= "games#playerEvent") <*> + (o .:? "numEvents") + <*> (o .:? "formattedNumEvents") + <*> (o .:? "definitionId") + <*> (o .:? "playerId")) + +instance ToJSON PlayerEvent where + toJSON PlayerEvent{..} + = object + (catMaybes + [Just ("kind" .= _peKind), + ("numEvents" .=) <$> _peNumEvents, + ("formattedNumEvents" .=) <$> _peFormattedNumEvents, + ("definitionId" .=) <$> _peDefinitionId, + ("playerId" .=) <$> _pePlayerId]) + +-- | This is a JSON template for a room resource object. +-- +-- /See:/ 'room' smart constructor. +data Room = Room + { _rStatus :: !(Maybe Text) + , _rVariant :: !(Maybe Int32) + , _rKind :: !Text + , _rAutoMatchingStatus :: !(Maybe (Maybe RoomAutoMatchStatus)) + , _rCreationDetails :: !(Maybe (Maybe RoomModification)) + , _rInviterId :: !(Maybe Text) + , _rLastUpdateDetails :: !(Maybe (Maybe RoomModification)) + , _rRoomStatusVersion :: !(Maybe Int32) + , _rParticipants :: !(Maybe [Maybe RoomParticipant]) + , _rApplicationId :: !(Maybe Text) + , _rAutoMatchingCriteria :: !(Maybe (Maybe RoomAutoMatchingCriteria)) + , _rRoomId :: !(Maybe Text) + , _rDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Room' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rStatus' +-- +-- * 'rVariant' +-- +-- * 'rKind' +-- +-- * 'rAutoMatchingStatus' +-- +-- * 'rCreationDetails' +-- +-- * 'rInviterId' +-- +-- * 'rLastUpdateDetails' +-- +-- * 'rRoomStatusVersion' +-- +-- * 'rParticipants' +-- +-- * 'rApplicationId' +-- +-- * 'rAutoMatchingCriteria' +-- +-- * 'rRoomId' +-- +-- * 'rDescription' +room + :: Room +room = + Room + { _rStatus = Nothing + , _rVariant = Nothing + , _rKind = "games#room" + , _rAutoMatchingStatus = Nothing + , _rCreationDetails = Nothing + , _rInviterId = Nothing + , _rLastUpdateDetails = Nothing + , _rRoomStatusVersion = Nothing + , _rParticipants = Nothing + , _rApplicationId = Nothing + , _rAutoMatchingCriteria = Nothing + , _rRoomId = Nothing + , _rDescription = Nothing + } + +-- | The status of the room. Possible values are: - \"ROOM_INVITING\" - One +-- or more players have been invited and not responded. - +-- \"ROOM_AUTO_MATCHING\" - One or more slots need to be filled by +-- auto-matching. - \"ROOM_CONNECTING\" - Players have joined and are +-- connecting to each other (either before or after auto-matching). - +-- \"ROOM_ACTIVE\" - All players have joined and connected to each other. - +-- \"ROOM_DELETED\" - The room should no longer be shown on the client. +-- Returned in sync calls when a player joins a room (as a tombstone), or +-- for rooms where all joined participants have left. +rStatus :: Lens' Room (Maybe Text) +rStatus = lens _rStatus (\ s a -> s{_rStatus = a}) + +-- | The variant \/ mode of the application being played; can be any integer +-- value, or left blank. +rVariant :: Lens' Room (Maybe Int32) +rVariant = lens _rVariant (\ s a -> s{_rVariant = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#room. +rKind :: Lens' Room Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | Auto-matching status for this room. Not set if the room is not currently +-- in the auto-matching queue. +rAutoMatchingStatus :: Lens' Room (Maybe (Maybe RoomAutoMatchStatus)) +rAutoMatchingStatus + = lens _rAutoMatchingStatus + (\ s a -> s{_rAutoMatchingStatus = a}) + +-- | Details about the room creation. +rCreationDetails :: Lens' Room (Maybe (Maybe RoomModification)) +rCreationDetails + = lens _rCreationDetails + (\ s a -> s{_rCreationDetails = a}) + +-- | The ID of the participant that invited the user to the room. Not set if +-- the user was not invited to the room. +rInviterId :: Lens' Room (Maybe Text) +rInviterId + = lens _rInviterId (\ s a -> s{_rInviterId = a}) + +-- | Details about the last update to the room. +rLastUpdateDetails :: Lens' Room (Maybe (Maybe RoomModification)) +rLastUpdateDetails + = lens _rLastUpdateDetails + (\ s a -> s{_rLastUpdateDetails = a}) + +-- | The version of the room status: an increasing counter, used by the +-- client to ignore out-of-order updates to room status. +rRoomStatusVersion :: Lens' Room (Maybe Int32) +rRoomStatusVersion + = lens _rRoomStatusVersion + (\ s a -> s{_rRoomStatusVersion = a}) + +-- | The participants involved in the room, along with their statuses. +-- Includes participants who have left or declined invitations. +rParticipants :: Lens' Room [Maybe RoomParticipant] +rParticipants + = lens _rParticipants + (\ s a -> s{_rParticipants = a}) + . _Default + . _Coerce + +-- | The ID of the application being played. +rApplicationId :: Lens' Room (Maybe Text) +rApplicationId + = lens _rApplicationId + (\ s a -> s{_rApplicationId = a}) + +-- | Criteria for auto-matching players into this room. +rAutoMatchingCriteria :: Lens' Room (Maybe (Maybe RoomAutoMatchingCriteria)) +rAutoMatchingCriteria + = lens _rAutoMatchingCriteria + (\ s a -> s{_rAutoMatchingCriteria = a}) + +-- | Globally unique ID for a room. +rRoomId :: Lens' Room (Maybe Text) +rRoomId = lens _rRoomId (\ s a -> s{_rRoomId = a}) + +-- | This short description is generated by our servers and worded relative +-- to the player requesting the room. It is intended to be displayed when +-- the room is shown in a list (that is, an invitation to a room.) +rDescription :: Lens' Room (Maybe Text) +rDescription + = lens _rDescription (\ s a -> s{_rDescription = a}) + +instance FromJSON Room where + parseJSON + = withObject "Room" + (\ o -> + Room <$> + (o .:? "status") <*> (o .:? "variant") <*> + (o .:? "kind" .!= "games#room") + <*> (o .:? "autoMatchingStatus") + <*> (o .:? "creationDetails") + <*> (o .:? "inviterId") + <*> (o .:? "lastUpdateDetails") + <*> (o .:? "roomStatusVersion") + <*> (o .:? "participants" .!= mempty) + <*> (o .:? "applicationId") + <*> (o .:? "autoMatchingCriteria") + <*> (o .:? "roomId") + <*> (o .:? "description")) + +instance ToJSON Room where + toJSON Room{..} + = object + (catMaybes + [("status" .=) <$> _rStatus, + ("variant" .=) <$> _rVariant, + Just ("kind" .= _rKind), + ("autoMatchingStatus" .=) <$> _rAutoMatchingStatus, + ("creationDetails" .=) <$> _rCreationDetails, + ("inviterId" .=) <$> _rInviterId, + ("lastUpdateDetails" .=) <$> _rLastUpdateDetails, + ("roomStatusVersion" .=) <$> _rRoomStatusVersion, + ("participants" .=) <$> _rParticipants, + ("applicationId" .=) <$> _rApplicationId, + ("autoMatchingCriteria" .=) <$> + _rAutoMatchingCriteria, + ("roomId" .=) <$> _rRoomId, + ("description" .=) <$> _rDescription]) + +-- | This is a JSON template for a list of quest objects. +-- +-- /See:/ 'questListResponse' smart constructor. +data QuestListResponse = QuestListResponse + { _qlrNextPageToken :: !(Maybe Text) + , _qlrKind :: !Text + , _qlrItems :: !(Maybe [Maybe Quest]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qlrNextPageToken' +-- +-- * 'qlrKind' +-- +-- * 'qlrItems' +questListResponse + :: QuestListResponse +questListResponse = + QuestListResponse + { _qlrNextPageToken = Nothing + , _qlrKind = "games#questListResponse" + , _qlrItems = Nothing + } + +-- | Token corresponding to the next page of results. +qlrNextPageToken :: Lens' QuestListResponse (Maybe Text) +qlrNextPageToken + = lens _qlrNextPageToken + (\ s a -> s{_qlrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#questListResponse. +qlrKind :: Lens' QuestListResponse Text +qlrKind = lens _qlrKind (\ s a -> s{_qlrKind = a}) + +-- | The quests. +qlrItems :: Lens' QuestListResponse [Maybe Quest] +qlrItems + = lens _qlrItems (\ s a -> s{_qlrItems = a}) . + _Default + . _Coerce + +instance FromJSON QuestListResponse where + parseJSON + = withObject "QuestListResponse" + (\ o -> + QuestListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#questListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON QuestListResponse where + toJSON QuestListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _qlrNextPageToken, + Just ("kind" .= _qlrKind), + ("items" .=) <$> _qlrItems]) + +-- | This is a JSON template for the Application resource. +-- +-- /See:/ 'application' smart constructor. +data Application = Application + { _aThemeColor :: !(Maybe Text) + , _aLeaderboardCount :: !(Maybe Int32) + , _aKind :: !Text + , _aCategory :: !(Maybe (Maybe ApplicationCategory)) + , _aName :: !(Maybe Text) + , _aEnabledFeatures :: !(Maybe [Text]) + , _aInstances :: !(Maybe [Maybe Instance]) + , _aAuthor :: !(Maybe Text) + , _aId :: !(Maybe Text) + , _aAchievementCount :: !(Maybe Int32) + , _aAssets :: !(Maybe [Maybe ImageAsset]) + , _aDescription :: !(Maybe Text) + , _aLastUpdatedTimestamp :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Application' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aThemeColor' +-- +-- * 'aLeaderboardCount' +-- +-- * 'aKind' +-- +-- * 'aCategory' +-- +-- * 'aName' +-- +-- * 'aEnabledFeatures' +-- +-- * 'aInstances' +-- +-- * 'aAuthor' +-- +-- * 'aId' +-- +-- * 'aAchievementCount' +-- +-- * 'aAssets' +-- +-- * 'aDescription' +-- +-- * 'aLastUpdatedTimestamp' +application + :: Application +application = + Application + { _aThemeColor = Nothing + , _aLeaderboardCount = Nothing + , _aKind = "games#application" + , _aCategory = Nothing + , _aName = Nothing + , _aEnabledFeatures = Nothing + , _aInstances = Nothing + , _aAuthor = Nothing + , _aId = Nothing + , _aAchievementCount = Nothing + , _aAssets = Nothing + , _aDescription = Nothing + , _aLastUpdatedTimestamp = Nothing + } + +-- | A hint to the client UI for what color to use as an app-themed color. +-- The color is given as an RGB triplet (e.g. \"E0E0E0\"). +aThemeColor :: Lens' Application (Maybe Text) +aThemeColor + = lens _aThemeColor (\ s a -> s{_aThemeColor = a}) + +-- | The number of leaderboards visible to the currently authenticated +-- player. +aLeaderboardCount :: Lens' Application (Maybe Int32) +aLeaderboardCount + = lens _aLeaderboardCount + (\ s a -> s{_aLeaderboardCount = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#application. +aKind :: Lens' Application Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The category of the application. +aCategory :: Lens' Application (Maybe (Maybe ApplicationCategory)) +aCategory + = lens _aCategory (\ s a -> s{_aCategory = a}) + +-- | The name of the application. +aName :: Lens' Application (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | A list of features that have been enabled for the application. Possible +-- values are: - \"SNAPSHOTS\" - Snapshots has been enabled +aEnabledFeatures :: Lens' Application [Text] +aEnabledFeatures + = lens _aEnabledFeatures + (\ s a -> s{_aEnabledFeatures = a}) + . _Default + . _Coerce + +-- | The instances of the application. +aInstances :: Lens' Application [Maybe Instance] +aInstances + = lens _aInstances (\ s a -> s{_aInstances = a}) . + _Default + . _Coerce + +-- | The author of the application. +aAuthor :: Lens' Application (Maybe Text) +aAuthor = lens _aAuthor (\ s a -> s{_aAuthor = a}) + +-- | The ID of the application. +aId :: Lens' Application (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | The number of achievements visible to the currently authenticated +-- player. +aAchievementCount :: Lens' Application (Maybe Int32) +aAchievementCount + = lens _aAchievementCount + (\ s a -> s{_aAchievementCount = a}) + +-- | The assets of the application. +aAssets :: Lens' Application [Maybe ImageAsset] +aAssets + = lens _aAssets (\ s a -> s{_aAssets = a}) . _Default + . _Coerce + +-- | The description of the application. +aDescription :: Lens' Application (Maybe Text) +aDescription + = lens _aDescription (\ s a -> s{_aDescription = a}) + +-- | The last updated timestamp of the application. +aLastUpdatedTimestamp :: Lens' Application (Maybe Int64) +aLastUpdatedTimestamp + = lens _aLastUpdatedTimestamp + (\ s a -> s{_aLastUpdatedTimestamp = a}) + +instance FromJSON Application where + parseJSON + = withObject "Application" + (\ o -> + Application <$> + (o .:? "themeColor") <*> (o .:? "leaderboard_count") + <*> (o .:? "kind" .!= "games#application") + <*> (o .:? "category") + <*> (o .:? "name") + <*> (o .:? "enabledFeatures" .!= mempty) + <*> (o .:? "instances" .!= mempty) + <*> (o .:? "author") + <*> (o .:? "id") + <*> (o .:? "achievement_count") + <*> (o .:? "assets" .!= mempty) + <*> (o .:? "description") + <*> (o .:? "lastUpdatedTimestamp")) + +instance ToJSON Application where + toJSON Application{..} + = object + (catMaybes + [("themeColor" .=) <$> _aThemeColor, + ("leaderboard_count" .=) <$> _aLeaderboardCount, + Just ("kind" .= _aKind), + ("category" .=) <$> _aCategory, + ("name" .=) <$> _aName, + ("enabledFeatures" .=) <$> _aEnabledFeatures, + ("instances" .=) <$> _aInstances, + ("author" .=) <$> _aAuthor, ("id" .=) <$> _aId, + ("achievement_count" .=) <$> _aAchievementCount, + ("assets" .=) <$> _aAssets, + ("description" .=) <$> _aDescription, + ("lastUpdatedTimestamp" .=) <$> + _aLastUpdatedTimestamp]) + +-- | This is a JSON template for the object representing a turn. +-- +-- /See:/ 'turnBasedMatchTurn' smart constructor. +data TurnBasedMatchTurn = TurnBasedMatchTurn + { _tbmtResults :: !(Maybe [Maybe ParticipantResult]) + , _tbmtKind :: !Text + , _tbmtData :: !(Maybe (Maybe TurnBasedMatchDataRequest)) + , _tbmtPendingParticipantId :: !(Maybe Text) + , _tbmtMatchVersion :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchTurn' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmtResults' +-- +-- * 'tbmtKind' +-- +-- * 'tbmtData' +-- +-- * 'tbmtPendingParticipantId' +-- +-- * 'tbmtMatchVersion' +turnBasedMatchTurn + :: TurnBasedMatchTurn +turnBasedMatchTurn = + TurnBasedMatchTurn + { _tbmtResults = Nothing + , _tbmtKind = "games#turnBasedMatchTurn" + , _tbmtData = Nothing + , _tbmtPendingParticipantId = Nothing + , _tbmtMatchVersion = Nothing + } + +-- | The match results for the participants in the match. +tbmtResults :: Lens' TurnBasedMatchTurn [Maybe ParticipantResult] +tbmtResults + = lens _tbmtResults (\ s a -> s{_tbmtResults = a}) . + _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchTurn. +tbmtKind :: Lens' TurnBasedMatchTurn Text +tbmtKind = lens _tbmtKind (\ s a -> s{_tbmtKind = a}) + +-- | The shared game state data after the turn is over. +tbmtData :: Lens' TurnBasedMatchTurn (Maybe (Maybe TurnBasedMatchDataRequest)) +tbmtData = lens _tbmtData (\ s a -> s{_tbmtData = a}) + +-- | The ID of the participant who should take their turn next. May be set to +-- the current player\'s participant ID to update match state without +-- changing the turn. If not set, the match will wait for other player(s) +-- to join via automatching; this is only valid if automatch criteria is +-- set on the match with remaining slots for automatched players. +tbmtPendingParticipantId :: Lens' TurnBasedMatchTurn (Maybe Text) +tbmtPendingParticipantId + = lens _tbmtPendingParticipantId + (\ s a -> s{_tbmtPendingParticipantId = a}) + +-- | The version of this match: an increasing counter, used to avoid +-- out-of-date updates to the match. +tbmtMatchVersion :: Lens' TurnBasedMatchTurn (Maybe Int32) +tbmtMatchVersion + = lens _tbmtMatchVersion + (\ s a -> s{_tbmtMatchVersion = a}) + +instance FromJSON TurnBasedMatchTurn where + parseJSON + = withObject "TurnBasedMatchTurn" + (\ o -> + TurnBasedMatchTurn <$> + (o .:? "results" .!= mempty) <*> + (o .:? "kind" .!= "games#turnBasedMatchTurn") + <*> (o .:? "data") + <*> (o .:? "pendingParticipantId") + <*> (o .:? "matchVersion")) + +instance ToJSON TurnBasedMatchTurn where + toJSON TurnBasedMatchTurn{..} + = object + (catMaybes + [("results" .=) <$> _tbmtResults, + Just ("kind" .= _tbmtKind), + ("data" .=) <$> _tbmtData, + ("pendingParticipantId" .=) <$> + _tbmtPendingParticipantId, + ("matchVersion" .=) <$> _tbmtMatchVersion]) + +-- | This is a JSON template for an application category object. +-- +-- /See:/ 'applicationCategory' smart constructor. +data ApplicationCategory = ApplicationCategory + { _acSecondary :: !(Maybe Text) + , _acKind :: !Text + , _acPrimary :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationCategory' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acSecondary' +-- +-- * 'acKind' +-- +-- * 'acPrimary' +applicationCategory + :: ApplicationCategory +applicationCategory = + ApplicationCategory + { _acSecondary = Nothing + , _acKind = "games#applicationCategory" + , _acPrimary = Nothing + } + +-- | The secondary category. +acSecondary :: Lens' ApplicationCategory (Maybe Text) +acSecondary + = lens _acSecondary (\ s a -> s{_acSecondary = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#applicationCategory. +acKind :: Lens' ApplicationCategory Text +acKind = lens _acKind (\ s a -> s{_acKind = a}) + +-- | The primary category. +acPrimary :: Lens' ApplicationCategory (Maybe Text) +acPrimary + = lens _acPrimary (\ s a -> s{_acPrimary = a}) + +instance FromJSON ApplicationCategory where + parseJSON + = withObject "ApplicationCategory" + (\ o -> + ApplicationCategory <$> + (o .:? "secondary") <*> + (o .:? "kind" .!= "games#applicationCategory") + <*> (o .:? "primary")) + +instance ToJSON ApplicationCategory where + toJSON ApplicationCategory{..} + = object + (catMaybes + [("secondary" .=) <$> _acSecondary, + Just ("kind" .= _acKind), + ("primary" .=) <$> _acPrimary]) + +-- | This is a JSON template for a list of score submission statuses. +-- +-- /See:/ 'playerScoreListResponse' smart constructor. +data PlayerScoreListResponse = PlayerScoreListResponse + { _pslrSubmittedScores :: !(Maybe [Maybe PlayerScoreResponse]) + , _pslrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScoreListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslrSubmittedScores' +-- +-- * 'pslrKind' +playerScoreListResponse + :: PlayerScoreListResponse +playerScoreListResponse = + PlayerScoreListResponse + { _pslrSubmittedScores = Nothing + , _pslrKind = "games#playerScoreListResponse" + } + +-- | The score submissions statuses. +pslrSubmittedScores :: Lens' PlayerScoreListResponse [Maybe PlayerScoreResponse] +pslrSubmittedScores + = lens _pslrSubmittedScores + (\ s a -> s{_pslrSubmittedScores = a}) + . _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerScoreListResponse. +pslrKind :: Lens' PlayerScoreListResponse Text +pslrKind = lens _pslrKind (\ s a -> s{_pslrKind = a}) + +instance FromJSON PlayerScoreListResponse where + parseJSON + = withObject "PlayerScoreListResponse" + (\ o -> + PlayerScoreListResponse <$> + (o .:? "submittedScores" .!= mempty) <*> + (o .:? "kind" .!= "games#playerScoreListResponse")) + +instance ToJSON PlayerScoreListResponse where + toJSON PlayerScoreListResponse{..} + = object + (catMaybes + [("submittedScores" .=) <$> _pslrSubmittedScores, + Just ("kind" .= _pslrKind)]) + +-- | This is a JSON template for network diagnostics reported for a client. +-- +-- /See:/ 'networkDiagnostics' smart constructor. +data NetworkDiagnostics = NetworkDiagnostics + { _ndAndroidNetworkType :: !(Maybe Int32) + , _ndKind :: !Text + , _ndNetworkOperatorCode :: !(Maybe Text) + , _ndNetworkOperatorName :: !(Maybe Text) + , _ndRegistrationLatencyMillis :: !(Maybe Int32) + , _ndIosNetworkType :: !(Maybe Int32) + , _ndAndroidNetworkSubtype :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NetworkDiagnostics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ndAndroidNetworkType' +-- +-- * 'ndKind' +-- +-- * 'ndNetworkOperatorCode' +-- +-- * 'ndNetworkOperatorName' +-- +-- * 'ndRegistrationLatencyMillis' +-- +-- * 'ndIosNetworkType' +-- +-- * 'ndAndroidNetworkSubtype' +networkDiagnostics + :: NetworkDiagnostics +networkDiagnostics = + NetworkDiagnostics + { _ndAndroidNetworkType = Nothing + , _ndKind = "games#networkDiagnostics" + , _ndNetworkOperatorCode = Nothing + , _ndNetworkOperatorName = Nothing + , _ndRegistrationLatencyMillis = Nothing + , _ndIosNetworkType = Nothing + , _ndAndroidNetworkSubtype = Nothing + } + +-- | The Android network type. +ndAndroidNetworkType :: Lens' NetworkDiagnostics (Maybe Int32) +ndAndroidNetworkType + = lens _ndAndroidNetworkType + (\ s a -> s{_ndAndroidNetworkType = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#networkDiagnostics. +ndKind :: Lens' NetworkDiagnostics Text +ndKind = lens _ndKind (\ s a -> s{_ndKind = a}) + +-- | The MCC+MNC code for the client\'s network connection. On Android: +-- http:\/\/developer.android.com\/reference\/android\/telephony\/TelephonyManager.html#getNetworkOperator() +-- On iOS, see: +-- https:\/\/developer.apple.com\/library\/ios\/documentation\/NetworkingInternet\/Reference\/CTCarrier\/Reference\/Reference.html +ndNetworkOperatorCode :: Lens' NetworkDiagnostics (Maybe Text) +ndNetworkOperatorCode + = lens _ndNetworkOperatorCode + (\ s a -> s{_ndNetworkOperatorCode = a}) + +-- | The name of the carrier of the client\'s network connection. On Android: +-- http:\/\/developer.android.com\/reference\/android\/telephony\/TelephonyManager.html#getNetworkOperatorName() +-- On iOS: +-- https:\/\/developer.apple.com\/library\/ios\/documentation\/NetworkingInternet\/Reference\/CTCarrier\/Reference\/Reference.html#\/\/apple_ref\/occ\/instp\/CTCarrier\/carrierName +ndNetworkOperatorName :: Lens' NetworkDiagnostics (Maybe Text) +ndNetworkOperatorName + = lens _ndNetworkOperatorName + (\ s a -> s{_ndNetworkOperatorName = a}) + +-- | The amount of time in milliseconds it took for the client to establish a +-- connection with the XMPP server. +ndRegistrationLatencyMillis :: Lens' NetworkDiagnostics (Maybe Int32) +ndRegistrationLatencyMillis + = lens _ndRegistrationLatencyMillis + (\ s a -> s{_ndRegistrationLatencyMillis = a}) + +-- | iOS network type as defined in Reachability.h. +ndIosNetworkType :: Lens' NetworkDiagnostics (Maybe Int32) +ndIosNetworkType + = lens _ndIosNetworkType + (\ s a -> s{_ndIosNetworkType = a}) + +-- | The Android network subtype. +ndAndroidNetworkSubtype :: Lens' NetworkDiagnostics (Maybe Int32) +ndAndroidNetworkSubtype + = lens _ndAndroidNetworkSubtype + (\ s a -> s{_ndAndroidNetworkSubtype = a}) + +instance FromJSON NetworkDiagnostics where + parseJSON + = withObject "NetworkDiagnostics" + (\ o -> + NetworkDiagnostics <$> + (o .:? "androidNetworkType") <*> + (o .:? "kind" .!= "games#networkDiagnostics") + <*> (o .:? "networkOperatorCode") + <*> (o .:? "networkOperatorName") + <*> (o .:? "registrationLatencyMillis") + <*> (o .:? "iosNetworkType") + <*> (o .:? "androidNetworkSubtype")) + +instance ToJSON NetworkDiagnostics where + toJSON NetworkDiagnostics{..} + = object + (catMaybes + [("androidNetworkType" .=) <$> _ndAndroidNetworkType, + Just ("kind" .= _ndKind), + ("networkOperatorCode" .=) <$> + _ndNetworkOperatorCode, + ("networkOperatorName" .=) <$> + _ndNetworkOperatorName, + ("registrationLatencyMillis" .=) <$> + _ndRegistrationLatencyMillis, + ("iosNetworkType" .=) <$> _ndIosNetworkType, + ("androidNetworkSubtype" .=) <$> + _ndAndroidNetworkSubtype]) + +-- | This is a JSON template for a player leaderboard score object. +-- +-- /See:/ 'playerLeaderboardScore' smart constructor. +data PlayerLeaderboardScore = PlayerLeaderboardScore + { _plsScoreTag :: !(Maybe Text) + , _plsScoreString :: !(Maybe Text) + , _plsKind :: !Text + , _plsScoreValue :: !(Maybe Int64) + , _plsTimeSpan :: !(Maybe Text) + , _plsPublicRank :: !(Maybe (Maybe LeaderboardScoreRank)) + , _plsSocialRank :: !(Maybe (Maybe LeaderboardScoreRank)) + , _plsLeaderboardId :: !(Maybe Text) + , _plsWriteTimestamp :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerLeaderboardScore' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsScoreTag' +-- +-- * 'plsScoreString' +-- +-- * 'plsKind' +-- +-- * 'plsScoreValue' +-- +-- * 'plsTimeSpan' +-- +-- * 'plsPublicRank' +-- +-- * 'plsSocialRank' +-- +-- * 'plsLeaderboardId' +-- +-- * 'plsWriteTimestamp' +playerLeaderboardScore + :: PlayerLeaderboardScore +playerLeaderboardScore = + PlayerLeaderboardScore + { _plsScoreTag = Nothing + , _plsScoreString = Nothing + , _plsKind = "games#playerLeaderboardScore" + , _plsScoreValue = Nothing + , _plsTimeSpan = Nothing + , _plsPublicRank = Nothing + , _plsSocialRank = Nothing + , _plsLeaderboardId = Nothing + , _plsWriteTimestamp = Nothing + } + +-- | Additional information about the score. Values must contain no more than +-- 64 URI-safe characters as defined by section 2.3 of RFC 3986. +plsScoreTag :: Lens' PlayerLeaderboardScore (Maybe Text) +plsScoreTag + = lens _plsScoreTag (\ s a -> s{_plsScoreTag = a}) + +-- | The formatted value of this score. +plsScoreString :: Lens' PlayerLeaderboardScore (Maybe Text) +plsScoreString + = lens _plsScoreString + (\ s a -> s{_plsScoreString = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerLeaderboardScore. +plsKind :: Lens' PlayerLeaderboardScore Text +plsKind = lens _plsKind (\ s a -> s{_plsKind = a}) + +-- | The numerical value of this score. +plsScoreValue :: Lens' PlayerLeaderboardScore (Maybe Int64) +plsScoreValue + = lens _plsScoreValue + (\ s a -> s{_plsScoreValue = a}) + +-- | The time span of this score. Possible values are: - \"ALL_TIME\" - The +-- score is an all-time score. - \"WEEKLY\" - The score is a weekly score. +-- - \"DAILY\" - The score is a daily score. +plsTimeSpan :: Lens' PlayerLeaderboardScore (Maybe Text) +plsTimeSpan + = lens _plsTimeSpan (\ s a -> s{_plsTimeSpan = a}) + +-- | The public rank of the score in this leaderboard. This object will not +-- be present if the user is not sharing their scores publicly. +plsPublicRank :: Lens' PlayerLeaderboardScore (Maybe (Maybe LeaderboardScoreRank)) +plsPublicRank + = lens _plsPublicRank + (\ s a -> s{_plsPublicRank = a}) + +-- | The social rank of the score in this leaderboard. +plsSocialRank :: Lens' PlayerLeaderboardScore (Maybe (Maybe LeaderboardScoreRank)) +plsSocialRank + = lens _plsSocialRank + (\ s a -> s{_plsSocialRank = a}) + +-- | The ID of the leaderboard this score is in. +plsLeaderboardId :: Lens' PlayerLeaderboardScore (Maybe Text) +plsLeaderboardId + = lens _plsLeaderboardId + (\ s a -> s{_plsLeaderboardId = a}) + +-- | The timestamp at which this score was recorded, in milliseconds since +-- the epoch in UTC. +plsWriteTimestamp :: Lens' PlayerLeaderboardScore (Maybe Int64) +plsWriteTimestamp + = lens _plsWriteTimestamp + (\ s a -> s{_plsWriteTimestamp = a}) + +instance FromJSON PlayerLeaderboardScore where + parseJSON + = withObject "PlayerLeaderboardScore" + (\ o -> + PlayerLeaderboardScore <$> + (o .:? "scoreTag") <*> (o .:? "scoreString") <*> + (o .:? "kind" .!= "games#playerLeaderboardScore") + <*> (o .:? "scoreValue") + <*> (o .:? "timeSpan") + <*> (o .:? "publicRank") + <*> (o .:? "socialRank") + <*> (o .:? "leaderboard_id") + <*> (o .:? "writeTimestamp")) + +instance ToJSON PlayerLeaderboardScore where + toJSON PlayerLeaderboardScore{..} + = object + (catMaybes + [("scoreTag" .=) <$> _plsScoreTag, + ("scoreString" .=) <$> _plsScoreString, + Just ("kind" .= _plsKind), + ("scoreValue" .=) <$> _plsScoreValue, + ("timeSpan" .=) <$> _plsTimeSpan, + ("publicRank" .=) <$> _plsPublicRank, + ("socialRank" .=) <$> _plsSocialRank, + ("leaderboard_id" .=) <$> _plsLeaderboardId, + ("writeTimestamp" .=) <$> _plsWriteTimestamp]) + +-- | This is a JSON template for a Quest Criterion resource. +-- +-- /See:/ 'questCriterion' smart constructor. +data QuestCriterion = QuestCriterion + { _qcCurrentContribution :: !(Maybe (Maybe QuestContribution)) + , _qcCompletionContribution :: !(Maybe (Maybe QuestContribution)) + , _qcKind :: !Text + , _qcInitialPlayerProgress :: !(Maybe (Maybe QuestContribution)) + , _qcEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestCriterion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qcCurrentContribution' +-- +-- * 'qcCompletionContribution' +-- +-- * 'qcKind' +-- +-- * 'qcInitialPlayerProgress' +-- +-- * 'qcEventId' +questCriterion + :: QuestCriterion +questCriterion = + QuestCriterion + { _qcCurrentContribution = Nothing + , _qcCompletionContribution = Nothing + , _qcKind = "games#questCriterion" + , _qcInitialPlayerProgress = Nothing + , _qcEventId = Nothing + } + +-- | The number of increments the player has made toward the completion count +-- event increments required to complete the quest. This value will not +-- exceed the completion contribution. There will be no currentContribution +-- until the player has accepted the quest. +qcCurrentContribution :: Lens' QuestCriterion (Maybe (Maybe QuestContribution)) +qcCurrentContribution + = lens _qcCurrentContribution + (\ s a -> s{_qcCurrentContribution = a}) + +-- | The total number of times the associated event must be incremented for +-- the player to complete this quest. +qcCompletionContribution :: Lens' QuestCriterion (Maybe (Maybe QuestContribution)) +qcCompletionContribution + = lens _qcCompletionContribution + (\ s a -> s{_qcCompletionContribution = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#questCriterion. +qcKind :: Lens' QuestCriterion Text +qcKind = lens _qcKind (\ s a -> s{_qcKind = a}) + +-- | The value of the event associated with this quest at the time that the +-- quest was accepted. This value may change if event increments that took +-- place before the start of quest are uploaded after the quest starts. +-- There will be no initialPlayerProgress until the player has accepted the +-- quest. +qcInitialPlayerProgress :: Lens' QuestCriterion (Maybe (Maybe QuestContribution)) +qcInitialPlayerProgress + = lens _qcInitialPlayerProgress + (\ s a -> s{_qcInitialPlayerProgress = a}) + +-- | The ID of the event the criterion corresponds to. +qcEventId :: Lens' QuestCriterion (Maybe Text) +qcEventId + = lens _qcEventId (\ s a -> s{_qcEventId = a}) + +instance FromJSON QuestCriterion where + parseJSON + = withObject "QuestCriterion" + (\ o -> + QuestCriterion <$> + (o .:? "currentContribution") <*> + (o .:? "completionContribution") + <*> (o .:? "kind" .!= "games#questCriterion") + <*> (o .:? "initialPlayerProgress") + <*> (o .:? "eventId")) + +instance ToJSON QuestCriterion where + toJSON QuestCriterion{..} + = object + (catMaybes + [("currentContribution" .=) <$> + _qcCurrentContribution, + ("completionContribution" .=) <$> + _qcCompletionContribution, + Just ("kind" .= _qcKind), + ("initialPlayerProgress" .=) <$> + _qcInitialPlayerProgress, + ("eventId" .=) <$> _qcEventId]) + +-- | This is a JSON template for an achievement update response. +-- +-- /See:/ 'achievementUpdateResponse' smart constructor. +data AchievementUpdateResponse = AchievementUpdateResponse + { _aurUpdateOccurred :: !(Maybe Bool) + , _aurAchievementId :: !(Maybe Text) + , _aurKind :: !Text + , _aurCurrentState :: !(Maybe Text) + , _aurNewlyUnlocked :: !(Maybe Bool) + , _aurCurrentSteps :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementUpdateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aurUpdateOccurred' +-- +-- * 'aurAchievementId' +-- +-- * 'aurKind' +-- +-- * 'aurCurrentState' +-- +-- * 'aurNewlyUnlocked' +-- +-- * 'aurCurrentSteps' +achievementUpdateResponse + :: AchievementUpdateResponse +achievementUpdateResponse = + AchievementUpdateResponse + { _aurUpdateOccurred = Nothing + , _aurAchievementId = Nothing + , _aurKind = "games#achievementUpdateResponse" + , _aurCurrentState = Nothing + , _aurNewlyUnlocked = Nothing + , _aurCurrentSteps = Nothing + } + +-- | Whether the requested updates actually affected the achievement. +aurUpdateOccurred :: Lens' AchievementUpdateResponse (Maybe Bool) +aurUpdateOccurred + = lens _aurUpdateOccurred + (\ s a -> s{_aurUpdateOccurred = a}) + +-- | The achievement this update is was applied to. +aurAchievementId :: Lens' AchievementUpdateResponse (Maybe Text) +aurAchievementId + = lens _aurAchievementId + (\ s a -> s{_aurAchievementId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementUpdateResponse. +aurKind :: Lens' AchievementUpdateResponse Text +aurKind = lens _aurKind (\ s a -> s{_aurKind = a}) + +-- | The current state of the achievement. Possible values are: - \"HIDDEN\" +-- - Achievement is hidden. - \"REVEALED\" - Achievement is revealed. - +-- \"UNLOCKED\" - Achievement is unlocked. +aurCurrentState :: Lens' AchievementUpdateResponse (Maybe Text) +aurCurrentState + = lens _aurCurrentState + (\ s a -> s{_aurCurrentState = a}) + +-- | Whether this achievement was newly unlocked (that is, whether the unlock +-- request for the achievement was the first for the player). +aurNewlyUnlocked :: Lens' AchievementUpdateResponse (Maybe Bool) +aurNewlyUnlocked + = lens _aurNewlyUnlocked + (\ s a -> s{_aurNewlyUnlocked = a}) + +-- | The current steps recorded for this achievement if it is incremental. +aurCurrentSteps :: Lens' AchievementUpdateResponse (Maybe Int32) +aurCurrentSteps + = lens _aurCurrentSteps + (\ s a -> s{_aurCurrentSteps = a}) + +instance FromJSON AchievementUpdateResponse where + parseJSON + = withObject "AchievementUpdateResponse" + (\ o -> + AchievementUpdateResponse <$> + (o .:? "updateOccurred") <*> (o .:? "achievementId") + <*> + (o .:? "kind" .!= "games#achievementUpdateResponse") + <*> (o .:? "currentState") + <*> (o .:? "newlyUnlocked") + <*> (o .:? "currentSteps")) + +instance ToJSON AchievementUpdateResponse where + toJSON AchievementUpdateResponse{..} + = object + (catMaybes + [("updateOccurred" .=) <$> _aurUpdateOccurred, + ("achievementId" .=) <$> _aurAchievementId, + Just ("kind" .= _aurKind), + ("currentState" .=) <$> _aurCurrentState, + ("newlyUnlocked" .=) <$> _aurNewlyUnlocked, + ("currentSteps" .=) <$> _aurCurrentSteps]) + +-- | This is a JSON template for a list of snapshot objects. +-- +-- /See:/ 'snapshotListResponse' smart constructor. +data SnapshotListResponse = SnapshotListResponse + { _slrNextPageToken :: !(Maybe Text) + , _slrKind :: !Text + , _slrItems :: !(Maybe [Maybe Snapshot]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrNextPageToken' +-- +-- * 'slrKind' +-- +-- * 'slrItems' +snapshotListResponse + :: SnapshotListResponse +snapshotListResponse = + SnapshotListResponse + { _slrNextPageToken = Nothing + , _slrKind = "games#snapshotListResponse" + , _slrItems = Nothing + } + +-- | Token corresponding to the next page of results. If there are no more +-- results, the token is omitted. +slrNextPageToken :: Lens' SnapshotListResponse (Maybe Text) +slrNextPageToken + = lens _slrNextPageToken + (\ s a -> s{_slrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#snapshotListResponse. +slrKind :: Lens' SnapshotListResponse Text +slrKind = lens _slrKind (\ s a -> s{_slrKind = a}) + +-- | The snapshots. +slrItems :: Lens' SnapshotListResponse [Maybe Snapshot] +slrItems + = lens _slrItems (\ s a -> s{_slrItems = a}) . + _Default + . _Coerce + +instance FromJSON SnapshotListResponse where + parseJSON + = withObject "SnapshotListResponse" + (\ o -> + SnapshotListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#snapshotListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON SnapshotListResponse where + toJSON SnapshotListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _slrNextPageToken, + Just ("kind" .= _slrKind), + ("items" .=) <$> _slrItems]) + +-- | This is a JSON template for a push token resource. +-- +-- /See:/ 'pushToken' smart constructor. +data PushToken = PushToken + { _ptClientRevision :: !(Maybe Text) + , _ptKind :: !Text + , _ptLanguage :: !(Maybe Text) + , _ptId :: !(Maybe (Maybe PushTokenId)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PushToken' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptClientRevision' +-- +-- * 'ptKind' +-- +-- * 'ptLanguage' +-- +-- * 'ptId' +pushToken + :: PushToken +pushToken = + PushToken + { _ptClientRevision = Nothing + , _ptKind = "games#pushToken" + , _ptLanguage = Nothing + , _ptId = Nothing + } + +-- | The revision of the client SDK used by your application, in the same +-- format that\'s used by revisions.check. Used to send backward compatible +-- messages. Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of +-- PLATFORM_TYPE are: - IOS - Push token is for iOS +ptClientRevision :: Lens' PushToken (Maybe Text) +ptClientRevision + = lens _ptClientRevision + (\ s a -> s{_ptClientRevision = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#pushToken. +ptKind :: Lens' PushToken Text +ptKind = lens _ptKind (\ s a -> s{_ptKind = a}) + +-- | The preferred language for notifications that are sent using this token. +ptLanguage :: Lens' PushToken (Maybe Text) +ptLanguage + = lens _ptLanguage (\ s a -> s{_ptLanguage = a}) + +-- | Unique identifier for this push token. +ptId :: Lens' PushToken (Maybe (Maybe PushTokenId)) +ptId = lens _ptId (\ s a -> s{_ptId = a}) + +instance FromJSON PushToken where + parseJSON + = withObject "PushToken" + (\ o -> + PushToken <$> + (o .:? "clientRevision") <*> + (o .:? "kind" .!= "games#pushToken") + <*> (o .:? "language") + <*> (o .:? "id")) + +instance ToJSON PushToken where + toJSON PushToken{..} + = object + (catMaybes + [("clientRevision" .=) <$> _ptClientRevision, + Just ("kind" .= _ptKind), + ("language" .=) <$> _ptLanguage, + ("id" .=) <$> _ptId]) + +-- | This is a JSON template for a list of turn-based matches. +-- +-- /See:/ 'turnBasedMatchList' smart constructor. +data TurnBasedMatchList = TurnBasedMatchList + { _tbmlNextPageToken :: !(Maybe Text) + , _tbmlKind :: !Text + , _tbmlItems :: !(Maybe [Maybe TurnBasedMatch]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmlNextPageToken' +-- +-- * 'tbmlKind' +-- +-- * 'tbmlItems' +turnBasedMatchList + :: TurnBasedMatchList +turnBasedMatchList = + TurnBasedMatchList + { _tbmlNextPageToken = Nothing + , _tbmlKind = "games#turnBasedMatchList" + , _tbmlItems = Nothing + } + +-- | The pagination token for the next page of results. +tbmlNextPageToken :: Lens' TurnBasedMatchList (Maybe Text) +tbmlNextPageToken + = lens _tbmlNextPageToken + (\ s a -> s{_tbmlNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchList. +tbmlKind :: Lens' TurnBasedMatchList Text +tbmlKind = lens _tbmlKind (\ s a -> s{_tbmlKind = a}) + +-- | The matches. +tbmlItems :: Lens' TurnBasedMatchList [Maybe TurnBasedMatch] +tbmlItems + = lens _tbmlItems (\ s a -> s{_tbmlItems = a}) . + _Default + . _Coerce + +instance FromJSON TurnBasedMatchList where + parseJSON + = withObject "TurnBasedMatchList" + (\ o -> + TurnBasedMatchList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#turnBasedMatchList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TurnBasedMatchList where + toJSON TurnBasedMatchList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tbmlNextPageToken, + Just ("kind" .= _tbmlKind), + ("items" .=) <$> _tbmlItems]) + +-- | This is a JSON template for 1P\/3P metadata about a user\'s level. +-- +-- /See:/ 'playerLevel' smart constructor. +data PlayerLevel = PlayerLevel + { _plMaxExperiencePoints :: !(Maybe Int64) + , _plKind :: !Text + , _plMinExperiencePoints :: !(Maybe Int64) + , _plLevel :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerLevel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plMaxExperiencePoints' +-- +-- * 'plKind' +-- +-- * 'plMinExperiencePoints' +-- +-- * 'plLevel' +playerLevel + :: PlayerLevel +playerLevel = + PlayerLevel + { _plMaxExperiencePoints = Nothing + , _plKind = "games#playerLevel" + , _plMinExperiencePoints = Nothing + , _plLevel = Nothing + } + +-- | The maximum experience points for this level. +plMaxExperiencePoints :: Lens' PlayerLevel (Maybe Int64) +plMaxExperiencePoints + = lens _plMaxExperiencePoints + (\ s a -> s{_plMaxExperiencePoints = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerLevel. +plKind :: Lens' PlayerLevel Text +plKind = lens _plKind (\ s a -> s{_plKind = a}) + +-- | The minimum experience points for this level. +plMinExperiencePoints :: Lens' PlayerLevel (Maybe Int64) +plMinExperiencePoints + = lens _plMinExperiencePoints + (\ s a -> s{_plMinExperiencePoints = a}) + +-- | The level for the user. +plLevel :: Lens' PlayerLevel (Maybe Int32) +plLevel = lens _plLevel (\ s a -> s{_plLevel = a}) + +instance FromJSON PlayerLevel where + parseJSON + = withObject "PlayerLevel" + (\ o -> + PlayerLevel <$> + (o .:? "maxExperiencePoints") <*> + (o .:? "kind" .!= "games#playerLevel") + <*> (o .:? "minExperiencePoints") + <*> (o .:? "level")) + +instance ToJSON PlayerLevel where + toJSON PlayerLevel{..} + = object + (catMaybes + [("maxExperiencePoints" .=) <$> + _plMaxExperiencePoints, + Just ("kind" .= _plKind), + ("minExperiencePoints" .=) <$> + _plMinExperiencePoints, + ("level" .=) <$> _plLevel]) + +-- | This is a JSON template for a list of rooms. +-- +-- /See:/ 'roomList' smart constructor. +data RoomList = RoomList + { _rlNextPageToken :: !(Maybe Text) + , _rlKind :: !Text + , _rlItems :: !(Maybe [Maybe Room]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlNextPageToken' +-- +-- * 'rlKind' +-- +-- * 'rlItems' +roomList + :: RoomList +roomList = + RoomList + { _rlNextPageToken = Nothing + , _rlKind = "games#roomList" + , _rlItems = Nothing + } + +-- | The pagination token for the next page of results. +rlNextPageToken :: Lens' RoomList (Maybe Text) +rlNextPageToken + = lens _rlNextPageToken + (\ s a -> s{_rlNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomList. +rlKind :: Lens' RoomList Text +rlKind = lens _rlKind (\ s a -> s{_rlKind = a}) + +-- | The rooms. +rlItems :: Lens' RoomList [Maybe Room] +rlItems + = lens _rlItems (\ s a -> s{_rlItems = a}) . _Default + . _Coerce + +instance FromJSON RoomList where + parseJSON + = withObject "RoomList" + (\ o -> + RoomList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#roomList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON RoomList where + toJSON RoomList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rlNextPageToken, + Just ("kind" .= _rlKind), ("items" .=) <$> _rlItems]) + +-- | This is a JSON template for peer channel diagnostics. +-- +-- /See:/ 'peerChannelDiagnostics' smart constructor. +data PeerChannelDiagnostics = PeerChannelDiagnostics + { _pcdNumMessagesLost :: !(Maybe Int32) + , _pcdBytesSent :: !(Maybe (Maybe AggregateStats)) + , _pcdKind :: !Text + , _pcdRoundtripLatencyMillis :: !(Maybe (Maybe AggregateStats)) + , _pcdBytesReceived :: !(Maybe (Maybe AggregateStats)) + , _pcdNumMessagesReceived :: !(Maybe Int32) + , _pcdNumSendFailures :: !(Maybe Int32) + , _pcdNumMessagesSent :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeerChannelDiagnostics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcdNumMessagesLost' +-- +-- * 'pcdBytesSent' +-- +-- * 'pcdKind' +-- +-- * 'pcdRoundtripLatencyMillis' +-- +-- * 'pcdBytesReceived' +-- +-- * 'pcdNumMessagesReceived' +-- +-- * 'pcdNumSendFailures' +-- +-- * 'pcdNumMessagesSent' +peerChannelDiagnostics + :: PeerChannelDiagnostics +peerChannelDiagnostics = + PeerChannelDiagnostics + { _pcdNumMessagesLost = Nothing + , _pcdBytesSent = Nothing + , _pcdKind = "games#peerChannelDiagnostics" + , _pcdRoundtripLatencyMillis = Nothing + , _pcdBytesReceived = Nothing + , _pcdNumMessagesReceived = Nothing + , _pcdNumSendFailures = Nothing + , _pcdNumMessagesSent = Nothing + } + +-- | Number of messages lost. +pcdNumMessagesLost :: Lens' PeerChannelDiagnostics (Maybe Int32) +pcdNumMessagesLost + = lens _pcdNumMessagesLost + (\ s a -> s{_pcdNumMessagesLost = a}) + +-- | Number of bytes sent. +pcdBytesSent :: Lens' PeerChannelDiagnostics (Maybe (Maybe AggregateStats)) +pcdBytesSent + = lens _pcdBytesSent (\ s a -> s{_pcdBytesSent = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#peerChannelDiagnostics. +pcdKind :: Lens' PeerChannelDiagnostics Text +pcdKind = lens _pcdKind (\ s a -> s{_pcdKind = a}) + +-- | Roundtrip latency stats in milliseconds. +pcdRoundtripLatencyMillis :: Lens' PeerChannelDiagnostics (Maybe (Maybe AggregateStats)) +pcdRoundtripLatencyMillis + = lens _pcdRoundtripLatencyMillis + (\ s a -> s{_pcdRoundtripLatencyMillis = a}) + +-- | Number of bytes received. +pcdBytesReceived :: Lens' PeerChannelDiagnostics (Maybe (Maybe AggregateStats)) +pcdBytesReceived + = lens _pcdBytesReceived + (\ s a -> s{_pcdBytesReceived = a}) + +-- | Number of messages received. +pcdNumMessagesReceived :: Lens' PeerChannelDiagnostics (Maybe Int32) +pcdNumMessagesReceived + = lens _pcdNumMessagesReceived + (\ s a -> s{_pcdNumMessagesReceived = a}) + +-- | Number of send failures. +pcdNumSendFailures :: Lens' PeerChannelDiagnostics (Maybe Int32) +pcdNumSendFailures + = lens _pcdNumSendFailures + (\ s a -> s{_pcdNumSendFailures = a}) + +-- | Number of messages sent. +pcdNumMessagesSent :: Lens' PeerChannelDiagnostics (Maybe Int32) +pcdNumMessagesSent + = lens _pcdNumMessagesSent + (\ s a -> s{_pcdNumMessagesSent = a}) + +instance FromJSON PeerChannelDiagnostics where + parseJSON + = withObject "PeerChannelDiagnostics" + (\ o -> + PeerChannelDiagnostics <$> + (o .:? "numMessagesLost") <*> (o .:? "bytesSent") <*> + (o .:? "kind" .!= "games#peerChannelDiagnostics") + <*> (o .:? "roundtripLatencyMillis") + <*> (o .:? "bytesReceived") + <*> (o .:? "numMessagesReceived") + <*> (o .:? "numSendFailures") + <*> (o .:? "numMessagesSent")) + +instance ToJSON PeerChannelDiagnostics where + toJSON PeerChannelDiagnostics{..} + = object + (catMaybes + [("numMessagesLost" .=) <$> _pcdNumMessagesLost, + ("bytesSent" .=) <$> _pcdBytesSent, + Just ("kind" .= _pcdKind), + ("roundtripLatencyMillis" .=) <$> + _pcdRoundtripLatencyMillis, + ("bytesReceived" .=) <$> _pcdBytesReceived, + ("numMessagesReceived" .=) <$> + _pcdNumMessagesReceived, + ("numSendFailures" .=) <$> _pcdNumSendFailures, + ("numMessagesSent" .=) <$> _pcdNumMessagesSent]) + +-- | This is a JSON template for the Leaderboard Entry resource. +-- +-- /See:/ 'leaderboardEntry' smart constructor. +data LeaderboardEntry = LeaderboardEntry + { _leScoreTag :: !(Maybe Text) + , _leWriteTimestampMillis :: !(Maybe Int64) + , _leKind :: !Text + , _leScoreValue :: !(Maybe Int64) + , _leFormattedScore :: !(Maybe Text) + , _leTimeSpan :: !(Maybe Text) + , _leFormattedScoreRank :: !(Maybe Text) + , _lePlayer :: !(Maybe (Maybe Player)) + , _leScoreRank :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'leScoreTag' +-- +-- * 'leWriteTimestampMillis' +-- +-- * 'leKind' +-- +-- * 'leScoreValue' +-- +-- * 'leFormattedScore' +-- +-- * 'leTimeSpan' +-- +-- * 'leFormattedScoreRank' +-- +-- * 'lePlayer' +-- +-- * 'leScoreRank' +leaderboardEntry + :: LeaderboardEntry +leaderboardEntry = + LeaderboardEntry + { _leScoreTag = Nothing + , _leWriteTimestampMillis = Nothing + , _leKind = "games#leaderboardEntry" + , _leScoreValue = Nothing + , _leFormattedScore = Nothing + , _leTimeSpan = Nothing + , _leFormattedScoreRank = Nothing + , _lePlayer = Nothing + , _leScoreRank = Nothing + } + +-- | Additional information about the score. Values must contain no more than +-- 64 URI-safe characters as defined by section 2.3 of RFC 3986. +leScoreTag :: Lens' LeaderboardEntry (Maybe Text) +leScoreTag + = lens _leScoreTag (\ s a -> s{_leScoreTag = a}) + +-- | The timestamp at which this score was recorded, in milliseconds since +-- the epoch in UTC. +leWriteTimestampMillis :: Lens' LeaderboardEntry (Maybe Int64) +leWriteTimestampMillis + = lens _leWriteTimestampMillis + (\ s a -> s{_leWriteTimestampMillis = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboardEntry. +leKind :: Lens' LeaderboardEntry Text +leKind = lens _leKind (\ s a -> s{_leKind = a}) + +-- | The numerical value of this score. +leScoreValue :: Lens' LeaderboardEntry (Maybe Int64) +leScoreValue + = lens _leScoreValue (\ s a -> s{_leScoreValue = a}) + +-- | The localized string for the numerical value of this score. +leFormattedScore :: Lens' LeaderboardEntry (Maybe Text) +leFormattedScore + = lens _leFormattedScore + (\ s a -> s{_leFormattedScore = a}) + +-- | The time span of this high score. Possible values are: - \"ALL_TIME\" - +-- The score is an all-time high score. - \"WEEKLY\" - The score is a +-- weekly high score. - \"DAILY\" - The score is a daily high score. +leTimeSpan :: Lens' LeaderboardEntry (Maybe Text) +leTimeSpan + = lens _leTimeSpan (\ s a -> s{_leTimeSpan = a}) + +-- | The localized string for the rank of this score for this leaderboard. +leFormattedScoreRank :: Lens' LeaderboardEntry (Maybe Text) +leFormattedScoreRank + = lens _leFormattedScoreRank + (\ s a -> s{_leFormattedScoreRank = a}) + +-- | The player who holds this score. +lePlayer :: Lens' LeaderboardEntry (Maybe (Maybe Player)) +lePlayer = lens _lePlayer (\ s a -> s{_lePlayer = a}) + +-- | The rank of this score for this leaderboard. +leScoreRank :: Lens' LeaderboardEntry (Maybe Int64) +leScoreRank + = lens _leScoreRank (\ s a -> s{_leScoreRank = a}) + +instance FromJSON LeaderboardEntry where + parseJSON + = withObject "LeaderboardEntry" + (\ o -> + LeaderboardEntry <$> + (o .:? "scoreTag") <*> (o .:? "writeTimestampMillis") + <*> (o .:? "kind" .!= "games#leaderboardEntry") + <*> (o .:? "scoreValue") + <*> (o .:? "formattedScore") + <*> (o .:? "timeSpan") + <*> (o .:? "formattedScoreRank") + <*> (o .:? "player") + <*> (o .:? "scoreRank")) + +instance ToJSON LeaderboardEntry where + toJSON LeaderboardEntry{..} + = object + (catMaybes + [("scoreTag" .=) <$> _leScoreTag, + ("writeTimestampMillis" .=) <$> + _leWriteTimestampMillis, + Just ("kind" .= _leKind), + ("scoreValue" .=) <$> _leScoreValue, + ("formattedScore" .=) <$> _leFormattedScore, + ("timeSpan" .=) <$> _leTimeSpan, + ("formattedScoreRank" .=) <$> _leFormattedScoreRank, + ("player" .=) <$> _lePlayer, + ("scoreRank" .=) <$> _leScoreRank]) + +-- | This is a JSON template for an achievement unlock response. +-- +-- /See:/ 'achievementUpdateMultipleResponse' smart constructor. +data AchievementUpdateMultipleResponse = AchievementUpdateMultipleResponse + { _aumrKind :: !Text + , _aumrUpdatedAchievements :: !(Maybe [Maybe AchievementUpdateResponse]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementUpdateMultipleResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aumrKind' +-- +-- * 'aumrUpdatedAchievements' +achievementUpdateMultipleResponse + :: AchievementUpdateMultipleResponse +achievementUpdateMultipleResponse = + AchievementUpdateMultipleResponse + { _aumrKind = "games#achievementUpdateMultipleResponse" + , _aumrUpdatedAchievements = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementUpdateListResponse. +aumrKind :: Lens' AchievementUpdateMultipleResponse Text +aumrKind = lens _aumrKind (\ s a -> s{_aumrKind = a}) + +-- | The updated state of the achievements. +aumrUpdatedAchievements :: Lens' AchievementUpdateMultipleResponse [Maybe AchievementUpdateResponse] +aumrUpdatedAchievements + = lens _aumrUpdatedAchievements + (\ s a -> s{_aumrUpdatedAchievements = a}) + . _Default + . _Coerce + +instance FromJSON AchievementUpdateMultipleResponse + where + parseJSON + = withObject "AchievementUpdateMultipleResponse" + (\ o -> + AchievementUpdateMultipleResponse <$> + (o .:? "kind" .!= + "games#achievementUpdateMultipleResponse") + <*> (o .:? "updatedAchievements" .!= mempty)) + +instance ToJSON AchievementUpdateMultipleResponse + where + toJSON AchievementUpdateMultipleResponse{..} + = object + (catMaybes + [Just ("kind" .= _aumrKind), + ("updatedAchievements" .=) <$> + _aumrUpdatedAchievements]) + +-- | This is a JSON template for a list of leaderboard entry resources. +-- +-- /See:/ 'playerScoreResponse' smart constructor. +data PlayerScoreResponse = PlayerScoreResponse + { _psrScoreTag :: !(Maybe Text) + , _psrKind :: !Text + , _psrFormattedScore :: !(Maybe Text) + , _psrLeaderboardId :: !(Maybe Text) + , _psrBeatenScoreTimeSpans :: !(Maybe [Text]) + , _psrUnbeatenScores :: !(Maybe [Maybe PlayerScore]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScoreResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psrScoreTag' +-- +-- * 'psrKind' +-- +-- * 'psrFormattedScore' +-- +-- * 'psrLeaderboardId' +-- +-- * 'psrBeatenScoreTimeSpans' +-- +-- * 'psrUnbeatenScores' +playerScoreResponse + :: PlayerScoreResponse +playerScoreResponse = + PlayerScoreResponse + { _psrScoreTag = Nothing + , _psrKind = "games#playerScoreResponse" + , _psrFormattedScore = Nothing + , _psrLeaderboardId = Nothing + , _psrBeatenScoreTimeSpans = Nothing + , _psrUnbeatenScores = Nothing + } + +-- | Additional information about this score. Values will contain no more +-- than 64 URI-safe characters as defined by section 2.3 of RFC 3986. +psrScoreTag :: Lens' PlayerScoreResponse (Maybe Text) +psrScoreTag + = lens _psrScoreTag (\ s a -> s{_psrScoreTag = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerScoreResponse. +psrKind :: Lens' PlayerScoreResponse Text +psrKind = lens _psrKind (\ s a -> s{_psrKind = a}) + +-- | The formatted value of the submitted score. +psrFormattedScore :: Lens' PlayerScoreResponse (Maybe Text) +psrFormattedScore + = lens _psrFormattedScore + (\ s a -> s{_psrFormattedScore = a}) + +-- | The leaderboard ID that this score was submitted to. +psrLeaderboardId :: Lens' PlayerScoreResponse (Maybe Text) +psrLeaderboardId + = lens _psrLeaderboardId + (\ s a -> s{_psrLeaderboardId = a}) + +-- | The time spans where the submitted score is better than the existing +-- score for that time span. Possible values are: - \"ALL_TIME\" - The +-- score is an all-time score. - \"WEEKLY\" - The score is a weekly score. +-- - \"DAILY\" - The score is a daily score. +psrBeatenScoreTimeSpans :: Lens' PlayerScoreResponse [Text] +psrBeatenScoreTimeSpans + = lens _psrBeatenScoreTimeSpans + (\ s a -> s{_psrBeatenScoreTimeSpans = a}) + . _Default + . _Coerce + +-- | The scores in time spans that have not been beaten. As an example, the +-- submitted score may be better than the player\'s DAILY score, but not +-- better than the player\'s scores for the WEEKLY or ALL_TIME time spans. +psrUnbeatenScores :: Lens' PlayerScoreResponse [Maybe PlayerScore] +psrUnbeatenScores + = lens _psrUnbeatenScores + (\ s a -> s{_psrUnbeatenScores = a}) + . _Default + . _Coerce + +instance FromJSON PlayerScoreResponse where + parseJSON + = withObject "PlayerScoreResponse" + (\ o -> + PlayerScoreResponse <$> + (o .:? "scoreTag") <*> + (o .:? "kind" .!= "games#playerScoreResponse") + <*> (o .:? "formattedScore") + <*> (o .:? "leaderboardId") + <*> (o .:? "beatenScoreTimeSpans" .!= mempty) + <*> (o .:? "unbeatenScores" .!= mempty)) + +instance ToJSON PlayerScoreResponse where + toJSON PlayerScoreResponse{..} + = object + (catMaybes + [("scoreTag" .=) <$> _psrScoreTag, + Just ("kind" .= _psrKind), + ("formattedScore" .=) <$> _psrFormattedScore, + ("leaderboardId" .=) <$> _psrLeaderboardId, + ("beatenScoreTimeSpans" .=) <$> + _psrBeatenScoreTimeSpans, + ("unbeatenScores" .=) <$> _psrUnbeatenScores]) + +-- | This is a JSON template for a participant in a turn-based match. +-- +-- /See:/ 'turnBasedMatchParticipant' smart constructor. +data TurnBasedMatchParticipant = TurnBasedMatchParticipant + { _tbmpStatus :: !(Maybe Text) + , _tbmpKind :: !Text + , _tbmpId :: !(Maybe Text) + , _tbmpAutoMatched :: !(Maybe Bool) + , _tbmpPlayer :: !(Maybe (Maybe Player)) + , _tbmpAutoMatchedPlayer :: !(Maybe (Maybe AnonymousPlayer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchParticipant' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmpStatus' +-- +-- * 'tbmpKind' +-- +-- * 'tbmpId' +-- +-- * 'tbmpAutoMatched' +-- +-- * 'tbmpPlayer' +-- +-- * 'tbmpAutoMatchedPlayer' +turnBasedMatchParticipant + :: TurnBasedMatchParticipant +turnBasedMatchParticipant = + TurnBasedMatchParticipant + { _tbmpStatus = Nothing + , _tbmpKind = "games#turnBasedMatchParticipant" + , _tbmpId = Nothing + , _tbmpAutoMatched = Nothing + , _tbmpPlayer = Nothing + , _tbmpAutoMatchedPlayer = Nothing + } + +-- | The status of the participant with respect to the match. Possible values +-- are: - \"PARTICIPANT_NOT_INVITED_YET\" - The participant is slated to be +-- invited to the match, but the invitation has not been sent; the invite +-- will be sent when it becomes their turn. - \"PARTICIPANT_INVITED\" - The +-- participant has been invited to join the match, but has not yet +-- responded. - \"PARTICIPANT_JOINED\" - The participant has joined the +-- match (either after creating it or accepting an invitation.) - +-- \"PARTICIPANT_DECLINED\" - The participant declined an invitation to +-- join the match. - \"PARTICIPANT_LEFT\" - The participant joined the +-- match and then left it. - \"PARTICIPANT_FINISHED\" - The participant +-- finished playing in the match. - \"PARTICIPANT_UNRESPONSIVE\" - The +-- participant did not take their turn in the allotted time. +tbmpStatus :: Lens' TurnBasedMatchParticipant (Maybe Text) +tbmpStatus + = lens _tbmpStatus (\ s a -> s{_tbmpStatus = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchParticipant. +tbmpKind :: Lens' TurnBasedMatchParticipant Text +tbmpKind = lens _tbmpKind (\ s a -> s{_tbmpKind = a}) + +-- | An identifier for the participant in the scope of the match. Cannot be +-- used to identify a player across matches or in other contexts. +tbmpId :: Lens' TurnBasedMatchParticipant (Maybe Text) +tbmpId = lens _tbmpId (\ s a -> s{_tbmpId = a}) + +-- | True if this participant was auto-matched with the requesting player. +tbmpAutoMatched :: Lens' TurnBasedMatchParticipant (Maybe Bool) +tbmpAutoMatched + = lens _tbmpAutoMatched + (\ s a -> s{_tbmpAutoMatched = a}) + +-- | Information about the player. Not populated if this player was +-- anonymously auto-matched against the requesting player. (Either player +-- or autoMatchedPlayer will be set.) +tbmpPlayer :: Lens' TurnBasedMatchParticipant (Maybe (Maybe Player)) +tbmpPlayer + = lens _tbmpPlayer (\ s a -> s{_tbmpPlayer = a}) + +-- | Information about a player that has been anonymously auto-matched +-- against the requesting player. (Either player or autoMatchedPlayer will +-- be set.) +tbmpAutoMatchedPlayer :: Lens' TurnBasedMatchParticipant (Maybe (Maybe AnonymousPlayer)) +tbmpAutoMatchedPlayer + = lens _tbmpAutoMatchedPlayer + (\ s a -> s{_tbmpAutoMatchedPlayer = a}) + +instance FromJSON TurnBasedMatchParticipant where + parseJSON + = withObject "TurnBasedMatchParticipant" + (\ o -> + TurnBasedMatchParticipant <$> + (o .:? "status") <*> + (o .:? "kind" .!= "games#turnBasedMatchParticipant") + <*> (o .:? "id") + <*> (o .:? "autoMatched") + <*> (o .:? "player") + <*> (o .:? "autoMatchedPlayer")) + +instance ToJSON TurnBasedMatchParticipant where + toJSON TurnBasedMatchParticipant{..} + = object + (catMaybes + [("status" .=) <$> _tbmpStatus, + Just ("kind" .= _tbmpKind), ("id" .=) <$> _tbmpId, + ("autoMatched" .=) <$> _tbmpAutoMatched, + ("player" .=) <$> _tbmpPlayer, + ("autoMatchedPlayer" .=) <$> _tbmpAutoMatchedPlayer]) + +-- | This is a JSON template for the client address when setting up a room. +-- +-- /See:/ 'roomClientAddress' smart constructor. +data RoomClientAddress = RoomClientAddress + { _rcaKind :: !Text + , _rcaXmppAddress :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomClientAddress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcaKind' +-- +-- * 'rcaXmppAddress' +roomClientAddress + :: RoomClientAddress +roomClientAddress = + RoomClientAddress + { _rcaKind = "games#roomClientAddress" + , _rcaXmppAddress = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomClientAddress. +rcaKind :: Lens' RoomClientAddress Text +rcaKind = lens _rcaKind (\ s a -> s{_rcaKind = a}) + +-- | The XMPP address of the client on the Google Games XMPP network. +rcaXmppAddress :: Lens' RoomClientAddress (Maybe Text) +rcaXmppAddress + = lens _rcaXmppAddress + (\ s a -> s{_rcaXmppAddress = a}) + +instance FromJSON RoomClientAddress where + parseJSON + = withObject "RoomClientAddress" + (\ o -> + RoomClientAddress <$> + (o .:? "kind" .!= "games#roomClientAddress") <*> + (o .:? "xmppAddress")) + +instance ToJSON RoomClientAddress where + toJSON RoomClientAddress{..} + = object + (catMaybes + [Just ("kind" .= _rcaKind), + ("xmppAddress" .=) <$> _rcaXmppAddress]) + +-- | This is a JSON template for the Android instance details resource. +-- +-- /See:/ 'instanceAndroidDetails' smart constructor. +data InstanceAndroidDetails = InstanceAndroidDetails + { _iadPackageName :: !(Maybe Text) + , _iadPreferred :: !(Maybe Bool) + , _iadKind :: !Text + , _iadEnablePiracyCheck :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceAndroidDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iadPackageName' +-- +-- * 'iadPreferred' +-- +-- * 'iadKind' +-- +-- * 'iadEnablePiracyCheck' +instanceAndroidDetails + :: InstanceAndroidDetails +instanceAndroidDetails = + InstanceAndroidDetails + { _iadPackageName = Nothing + , _iadPreferred = Nothing + , _iadKind = "games#instanceAndroidDetails" + , _iadEnablePiracyCheck = Nothing + } + +-- | Android package name which maps to Google Play URL. +iadPackageName :: Lens' InstanceAndroidDetails (Maybe Text) +iadPackageName + = lens _iadPackageName + (\ s a -> s{_iadPackageName = a}) + +-- | Indicates that this instance is the default for new installations. +iadPreferred :: Lens' InstanceAndroidDetails (Maybe Bool) +iadPreferred + = lens _iadPreferred (\ s a -> s{_iadPreferred = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#instanceAndroidDetails. +iadKind :: Lens' InstanceAndroidDetails Text +iadKind = lens _iadKind (\ s a -> s{_iadKind = a}) + +-- | Flag indicating whether the anti-piracy check is enabled. +iadEnablePiracyCheck :: Lens' InstanceAndroidDetails (Maybe Bool) +iadEnablePiracyCheck + = lens _iadEnablePiracyCheck + (\ s a -> s{_iadEnablePiracyCheck = a}) + +instance FromJSON InstanceAndroidDetails where + parseJSON + = withObject "InstanceAndroidDetails" + (\ o -> + InstanceAndroidDetails <$> + (o .:? "packageName") <*> (o .:? "preferred") <*> + (o .:? "kind" .!= "games#instanceAndroidDetails") + <*> (o .:? "enablePiracyCheck")) + +instance ToJSON InstanceAndroidDetails where + toJSON InstanceAndroidDetails{..} + = object + (catMaybes + [("packageName" .=) <$> _iadPackageName, + ("preferred" .=) <$> _iadPreferred, + Just ("kind" .= _iadKind), + ("enablePiracyCheck" .=) <$> _iadEnablePiracyCheck]) + +-- | This is a JSON template for a list of leaderboard objects. +-- +-- /See:/ 'leaderboardListResponse' smart constructor. +data LeaderboardListResponse = LeaderboardListResponse + { _llrNextPageToken :: !(Maybe Text) + , _llrKind :: !Text + , _llrItems :: !(Maybe [Maybe Leaderboard]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrNextPageToken' +-- +-- * 'llrKind' +-- +-- * 'llrItems' +leaderboardListResponse + :: LeaderboardListResponse +leaderboardListResponse = + LeaderboardListResponse + { _llrNextPageToken = Nothing + , _llrKind = "games#leaderboardListResponse" + , _llrItems = Nothing + } + +-- | Token corresponding to the next page of results. +llrNextPageToken :: Lens' LeaderboardListResponse (Maybe Text) +llrNextPageToken + = lens _llrNextPageToken + (\ s a -> s{_llrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboardListResponse. +llrKind :: Lens' LeaderboardListResponse Text +llrKind = lens _llrKind (\ s a -> s{_llrKind = a}) + +-- | The leaderboards. +llrItems :: Lens' LeaderboardListResponse [Maybe Leaderboard] +llrItems + = lens _llrItems (\ s a -> s{_llrItems = a}) . + _Default + . _Coerce + +instance FromJSON LeaderboardListResponse where + parseJSON + = withObject "LeaderboardListResponse" + (\ o -> + LeaderboardListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#leaderboardListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON LeaderboardListResponse where + toJSON LeaderboardListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _llrNextPageToken, + Just ("kind" .= _llrKind), + ("items" .=) <$> _llrItems]) + +-- | This is a JSON template for data related to individual game categories. +-- +-- /See:/ 'category' smart constructor. +data Category = Category + { _cKind :: !Text + , _cCategory :: !(Maybe Text) + , _cExperiencePoints :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Category' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cKind' +-- +-- * 'cCategory' +-- +-- * 'cExperiencePoints' +category + :: Category +category = + Category + { _cKind = "games#category" + , _cCategory = Nothing + , _cExperiencePoints = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#category. +cKind :: Lens' Category Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The category name. +cCategory :: Lens' Category (Maybe Text) +cCategory + = lens _cCategory (\ s a -> s{_cCategory = a}) + +-- | Experience points earned in this category. +cExperiencePoints :: Lens' Category (Maybe Int64) +cExperiencePoints + = lens _cExperiencePoints + (\ s a -> s{_cExperiencePoints = a}) + +instance FromJSON Category where + parseJSON + = withObject "Category" + (\ o -> + Category <$> + (o .:? "kind" .!= "games#category") <*> + (o .:? "category") + <*> (o .:? "experiencePoints")) + +instance ToJSON Category where + toJSON Category{..} + = object + (catMaybes + [Just ("kind" .= _cKind), + ("category" .=) <$> _cCategory, + ("experiencePoints" .=) <$> _cExperiencePoints]) + +-- | This is a JSON template for a ListDefinitions response. +-- +-- /See:/ 'eventDefinitionListResponse' smart constructor. +data EventDefinitionListResponse = EventDefinitionListResponse + { _edlrNextPageToken :: !(Maybe Text) + , _edlrKind :: !Text + , _edlrItems :: !(Maybe [Maybe EventDefinition]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventDefinitionListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edlrNextPageToken' +-- +-- * 'edlrKind' +-- +-- * 'edlrItems' +eventDefinitionListResponse + :: EventDefinitionListResponse +eventDefinitionListResponse = + EventDefinitionListResponse + { _edlrNextPageToken = Nothing + , _edlrKind = "games#eventDefinitionListResponse" + , _edlrItems = Nothing + } + +-- | The pagination token for the next page of results. +edlrNextPageToken :: Lens' EventDefinitionListResponse (Maybe Text) +edlrNextPageToken + = lens _edlrNextPageToken + (\ s a -> s{_edlrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventDefinitionListResponse. +edlrKind :: Lens' EventDefinitionListResponse Text +edlrKind = lens _edlrKind (\ s a -> s{_edlrKind = a}) + +-- | The event definitions. +edlrItems :: Lens' EventDefinitionListResponse [Maybe EventDefinition] +edlrItems + = lens _edlrItems (\ s a -> s{_edlrItems = a}) . + _Default + . _Coerce + +instance FromJSON EventDefinitionListResponse where + parseJSON + = withObject "EventDefinitionListResponse" + (\ o -> + EventDefinitionListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "games#eventDefinitionListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON EventDefinitionListResponse where + toJSON EventDefinitionListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _edlrNextPageToken, + Just ("kind" .= _edlrKind), + ("items" .=) <$> _edlrItems]) + +-- | This is a JSON template for a participant in a room. +-- +-- /See:/ 'roomParticipant' smart constructor. +data RoomParticipant = RoomParticipant + { _rpStatus :: !(Maybe Text) + , _rpConnected :: !(Maybe Bool) + , _rpLeaveReason :: !(Maybe Text) + , _rpKind :: !Text + , _rpClientAddress :: !(Maybe (Maybe RoomClientAddress)) + , _rpId :: !(Maybe Text) + , _rpAutoMatched :: !(Maybe Bool) + , _rpPlayer :: !(Maybe (Maybe Player)) + , _rpCapabilities :: !(Maybe [Text]) + , _rpAutoMatchedPlayer :: !(Maybe (Maybe AnonymousPlayer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomParticipant' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpStatus' +-- +-- * 'rpConnected' +-- +-- * 'rpLeaveReason' +-- +-- * 'rpKind' +-- +-- * 'rpClientAddress' +-- +-- * 'rpId' +-- +-- * 'rpAutoMatched' +-- +-- * 'rpPlayer' +-- +-- * 'rpCapabilities' +-- +-- * 'rpAutoMatchedPlayer' +roomParticipant + :: RoomParticipant +roomParticipant = + RoomParticipant + { _rpStatus = Nothing + , _rpConnected = Nothing + , _rpLeaveReason = Nothing + , _rpKind = "games#roomParticipant" + , _rpClientAddress = Nothing + , _rpId = Nothing + , _rpAutoMatched = Nothing + , _rpPlayer = Nothing + , _rpCapabilities = Nothing + , _rpAutoMatchedPlayer = Nothing + } + +-- | The status of the participant with respect to the room. Possible values +-- are: - \"PARTICIPANT_INVITED\" - The participant has been invited to +-- join the room, but has not yet responded. - \"PARTICIPANT_JOINED\" - The +-- participant has joined the room (either after creating it or accepting +-- an invitation.) - \"PARTICIPANT_DECLINED\" - The participant declined an +-- invitation to join the room. - \"PARTICIPANT_LEFT\" - The participant +-- joined the room and then left it. +rpStatus :: Lens' RoomParticipant (Maybe Text) +rpStatus = lens _rpStatus (\ s a -> s{_rpStatus = a}) + +-- | True if this participant is in the fully connected set of peers in the +-- room. +rpConnected :: Lens' RoomParticipant (Maybe Bool) +rpConnected + = lens _rpConnected (\ s a -> s{_rpConnected = a}) + +-- | The reason the participant left the room; populated if the participant +-- status is PARTICIPANT_LEFT. Possible values are: - \"PLAYER_LEFT\" - The +-- player explicitly chose to leave the room. - \"GAME_LEFT\" - The game +-- chose to remove the player from the room. - \"ABANDONED\" - The player +-- switched to another application and abandoned the room. - +-- \"PEER_CONNECTION_FAILURE\" - The client was unable to establish or +-- maintain a connection to other peer(s) in the room. - \"SERVER_ERROR\" - +-- The client received an error response when it tried to communicate with +-- the server. - \"TIMEOUT\" - The client timed out while waiting for +-- players to join and connect. - \"PRESENCE_FAILURE\" - The client\'s XMPP +-- connection ended abruptly. +rpLeaveReason :: Lens' RoomParticipant (Maybe Text) +rpLeaveReason + = lens _rpLeaveReason + (\ s a -> s{_rpLeaveReason = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomParticipant. +rpKind :: Lens' RoomParticipant Text +rpKind = lens _rpKind (\ s a -> s{_rpKind = a}) + +-- | Client address for the participant. +rpClientAddress :: Lens' RoomParticipant (Maybe (Maybe RoomClientAddress)) +rpClientAddress + = lens _rpClientAddress + (\ s a -> s{_rpClientAddress = a}) + +-- | An identifier for the participant in the scope of the room. Cannot be +-- used to identify a player across rooms or in other contexts. +rpId :: Lens' RoomParticipant (Maybe Text) +rpId = lens _rpId (\ s a -> s{_rpId = a}) + +-- | True if this participant was auto-matched with the requesting player. +rpAutoMatched :: Lens' RoomParticipant (Maybe Bool) +rpAutoMatched + = lens _rpAutoMatched + (\ s a -> s{_rpAutoMatched = a}) + +-- | Information about the player. Not populated if this player was +-- anonymously auto-matched against the requesting player. (Either player +-- or autoMatchedPlayer will be set.) +rpPlayer :: Lens' RoomParticipant (Maybe (Maybe Player)) +rpPlayer = lens _rpPlayer (\ s a -> s{_rpPlayer = a}) + +-- | The capabilities which can be used when communicating with this +-- participant. +rpCapabilities :: Lens' RoomParticipant [Text] +rpCapabilities + = lens _rpCapabilities + (\ s a -> s{_rpCapabilities = a}) + . _Default + . _Coerce + +-- | Information about a player that has been anonymously auto-matched +-- against the requesting player. (Either player or autoMatchedPlayer will +-- be set.) +rpAutoMatchedPlayer :: Lens' RoomParticipant (Maybe (Maybe AnonymousPlayer)) +rpAutoMatchedPlayer + = lens _rpAutoMatchedPlayer + (\ s a -> s{_rpAutoMatchedPlayer = a}) + +instance FromJSON RoomParticipant where + parseJSON + = withObject "RoomParticipant" + (\ o -> + RoomParticipant <$> + (o .:? "status") <*> (o .:? "connected") <*> + (o .:? "leaveReason") + <*> (o .:? "kind" .!= "games#roomParticipant") + <*> (o .:? "clientAddress") + <*> (o .:? "id") + <*> (o .:? "autoMatched") + <*> (o .:? "player") + <*> (o .:? "capabilities" .!= mempty) + <*> (o .:? "autoMatchedPlayer")) + +instance ToJSON RoomParticipant where + toJSON RoomParticipant{..} + = object + (catMaybes + [("status" .=) <$> _rpStatus, + ("connected" .=) <$> _rpConnected, + ("leaveReason" .=) <$> _rpLeaveReason, + Just ("kind" .= _rpKind), + ("clientAddress" .=) <$> _rpClientAddress, + ("id" .=) <$> _rpId, + ("autoMatched" .=) <$> _rpAutoMatched, + ("player" .=) <$> _rpPlayer, + ("capabilities" .=) <$> _rpCapabilities, + ("autoMatchedPlayer" .=) <$> _rpAutoMatchedPlayer]) + +-- | This is a JSON template for an anonymous player +-- +-- /See:/ 'anonymousPlayer' smart constructor. +data AnonymousPlayer = AnonymousPlayer + { _apAvatarImageUrl :: !(Maybe Text) + , _apKind :: !Text + , _apDisplayName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnonymousPlayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apAvatarImageUrl' +-- +-- * 'apKind' +-- +-- * 'apDisplayName' +anonymousPlayer + :: AnonymousPlayer +anonymousPlayer = + AnonymousPlayer + { _apAvatarImageUrl = Nothing + , _apKind = "games#anonymousPlayer" + , _apDisplayName = Nothing + } + +-- | The base URL for the image to display for the anonymous player. +apAvatarImageUrl :: Lens' AnonymousPlayer (Maybe Text) +apAvatarImageUrl + = lens _apAvatarImageUrl + (\ s a -> s{_apAvatarImageUrl = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#anonymousPlayer. +apKind :: Lens' AnonymousPlayer Text +apKind = lens _apKind (\ s a -> s{_apKind = a}) + +-- | The name to display for the anonymous player. +apDisplayName :: Lens' AnonymousPlayer (Maybe Text) +apDisplayName + = lens _apDisplayName + (\ s a -> s{_apDisplayName = a}) + +instance FromJSON AnonymousPlayer where + parseJSON + = withObject "AnonymousPlayer" + (\ o -> + AnonymousPlayer <$> + (o .:? "avatarImageUrl") <*> + (o .:? "kind" .!= "games#anonymousPlayer") + <*> (o .:? "displayName")) + +instance ToJSON AnonymousPlayer where + toJSON AnonymousPlayer{..} + = object + (catMaybes + [("avatarImageUrl" .=) <$> _apAvatarImageUrl, + Just ("kind" .= _apKind), + ("displayName" .=) <$> _apDisplayName]) + +-- | This is a JSON template for a list of achievement definition objects. +-- +-- /See:/ 'achievementDefinitionsListResponse' smart constructor. +data AchievementDefinitionsListResponse = AchievementDefinitionsListResponse + { _adlrNextPageToken :: !(Maybe Text) + , _adlrKind :: !Text + , _adlrItems :: !(Maybe [Maybe AchievementDefinition]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementDefinitionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adlrNextPageToken' +-- +-- * 'adlrKind' +-- +-- * 'adlrItems' +achievementDefinitionsListResponse + :: AchievementDefinitionsListResponse +achievementDefinitionsListResponse = + AchievementDefinitionsListResponse + { _adlrNextPageToken = Nothing + , _adlrKind = "games#achievementDefinitionsListResponse" + , _adlrItems = Nothing + } + +-- | Token corresponding to the next page of results. +adlrNextPageToken :: Lens' AchievementDefinitionsListResponse (Maybe Text) +adlrNextPageToken + = lens _adlrNextPageToken + (\ s a -> s{_adlrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementDefinitionsListResponse. +adlrKind :: Lens' AchievementDefinitionsListResponse Text +adlrKind = lens _adlrKind (\ s a -> s{_adlrKind = a}) + +-- | The achievement definitions. +adlrItems :: Lens' AchievementDefinitionsListResponse [Maybe AchievementDefinition] +adlrItems + = lens _adlrItems (\ s a -> s{_adlrItems = a}) . + _Default + . _Coerce + +instance FromJSON AchievementDefinitionsListResponse + where + parseJSON + = withObject "AchievementDefinitionsListResponse" + (\ o -> + AchievementDefinitionsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "games#achievementDefinitionsListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AchievementDefinitionsListResponse + where + toJSON AchievementDefinitionsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _adlrNextPageToken, + Just ("kind" .= _adlrKind), + ("items" .=) <$> _adlrItems]) + +-- | This is a JSON template for a Quest Criterion Contribution resource. +-- +-- /See:/ 'questContribution' smart constructor. +data QuestContribution = QuestContribution + { _qKind :: !Text + , _qValue :: !(Maybe Int64) + , _qFormattedValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestContribution' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qKind' +-- +-- * 'qValue' +-- +-- * 'qFormattedValue' +questContribution + :: QuestContribution +questContribution = + QuestContribution + { _qKind = "games#questContribution" + , _qValue = Nothing + , _qFormattedValue = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#questContribution. +qKind :: Lens' QuestContribution Text +qKind = lens _qKind (\ s a -> s{_qKind = a}) + +-- | The value of the contribution. +qValue :: Lens' QuestContribution (Maybe Int64) +qValue = lens _qValue (\ s a -> s{_qValue = a}) + +-- | The formatted value of the contribution as a string. Format depends on +-- the configuration for the associated event definition in the Play Games +-- Developer Console. +qFormattedValue :: Lens' QuestContribution (Maybe Text) +qFormattedValue + = lens _qFormattedValue + (\ s a -> s{_qFormattedValue = a}) + +instance FromJSON QuestContribution where + parseJSON + = withObject "QuestContribution" + (\ o -> + QuestContribution <$> + (o .:? "kind" .!= "games#questContribution") <*> + (o .:? "value") + <*> (o .:? "formattedValue")) + +instance ToJSON QuestContribution where + toJSON QuestContribution{..} + = object + (catMaybes + [Just ("kind" .= _qKind), ("value" .=) <$> _qValue, + ("formattedValue" .=) <$> _qFormattedValue]) + +-- | This is a JSON template for a list of player leaderboard scores. +-- +-- /See:/ 'playerLeaderboardScoreListResponse' smart constructor. +data PlayerLeaderboardScoreListResponse = PlayerLeaderboardScoreListResponse + { _plslrNextPageToken :: !(Maybe Text) + , _plslrKind :: !Text + , _plslrItems :: !(Maybe [Maybe PlayerLeaderboardScore]) + , _plslrPlayer :: !(Maybe (Maybe Player)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerLeaderboardScoreListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plslrNextPageToken' +-- +-- * 'plslrKind' +-- +-- * 'plslrItems' +-- +-- * 'plslrPlayer' +playerLeaderboardScoreListResponse + :: PlayerLeaderboardScoreListResponse +playerLeaderboardScoreListResponse = + PlayerLeaderboardScoreListResponse + { _plslrNextPageToken = Nothing + , _plslrKind = "games#playerLeaderboardScoreListResponse" + , _plslrItems = Nothing + , _plslrPlayer = Nothing + } + +-- | The pagination token for the next page of results. +plslrNextPageToken :: Lens' PlayerLeaderboardScoreListResponse (Maybe Text) +plslrNextPageToken + = lens _plslrNextPageToken + (\ s a -> s{_plslrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerLeaderboardScoreListResponse. +plslrKind :: Lens' PlayerLeaderboardScoreListResponse Text +plslrKind + = lens _plslrKind (\ s a -> s{_plslrKind = a}) + +-- | The leaderboard scores. +plslrItems :: Lens' PlayerLeaderboardScoreListResponse [Maybe PlayerLeaderboardScore] +plslrItems + = lens _plslrItems (\ s a -> s{_plslrItems = a}) . + _Default + . _Coerce + +-- | The Player resources for the owner of this score. +plslrPlayer :: Lens' PlayerLeaderboardScoreListResponse (Maybe (Maybe Player)) +plslrPlayer + = lens _plslrPlayer (\ s a -> s{_plslrPlayer = a}) + +instance FromJSON PlayerLeaderboardScoreListResponse + where + parseJSON + = withObject "PlayerLeaderboardScoreListResponse" + (\ o -> + PlayerLeaderboardScoreListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "games#playerLeaderboardScoreListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "player")) + +instance ToJSON PlayerLeaderboardScoreListResponse + where + toJSON PlayerLeaderboardScoreListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _plslrNextPageToken, + Just ("kind" .= _plslrKind), + ("items" .=) <$> _plslrItems, + ("player" .=) <$> _plslrPlayer]) + +-- | This is a JSON template for an image of a snapshot. +-- +-- /See:/ 'snapshotImage' smart constructor. +data SnapshotImage = SnapshotImage + { _siHeight :: !(Maybe Int32) + , _siKind :: !Text + , _siUrl :: !(Maybe Text) + , _siMimeType :: !(Maybe Text) + , _siWidth :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotImage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siHeight' +-- +-- * 'siKind' +-- +-- * 'siUrl' +-- +-- * 'siMimeType' +-- +-- * 'siWidth' +snapshotImage + :: SnapshotImage +snapshotImage = + SnapshotImage + { _siHeight = Nothing + , _siKind = "games#snapshotImage" + , _siUrl = Nothing + , _siMimeType = Nothing + , _siWidth = Nothing + } + +-- | The height of the image. +siHeight :: Lens' SnapshotImage (Maybe Int32) +siHeight = lens _siHeight (\ s a -> s{_siHeight = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#snapshotImage. +siKind :: Lens' SnapshotImage Text +siKind = lens _siKind (\ s a -> s{_siKind = a}) + +-- | The URL of the image. This URL may be invalidated at any time and should +-- not be cached. +siUrl :: Lens' SnapshotImage (Maybe Text) +siUrl = lens _siUrl (\ s a -> s{_siUrl = a}) + +-- | The MIME type of the image. +siMimeType :: Lens' SnapshotImage (Maybe Text) +siMimeType + = lens _siMimeType (\ s a -> s{_siMimeType = a}) + +-- | The width of the image. +siWidth :: Lens' SnapshotImage (Maybe Int32) +siWidth = lens _siWidth (\ s a -> s{_siWidth = a}) + +instance FromJSON SnapshotImage where + parseJSON + = withObject "SnapshotImage" + (\ o -> + SnapshotImage <$> + (o .:? "height") <*> + (o .:? "kind" .!= "games#snapshotImage") + <*> (o .:? "url") + <*> (o .:? "mime_type") + <*> (o .:? "width")) + +instance ToJSON SnapshotImage where + toJSON SnapshotImage{..} + = object + (catMaybes + [("height" .=) <$> _siHeight, + Just ("kind" .= _siKind), ("url" .=) <$> _siUrl, + ("mime_type" .=) <$> _siMimeType, + ("width" .=) <$> _siWidth]) + +-- | This is a JSON template for the status of a room that the player has +-- joined. +-- +-- /See:/ 'roomStatus' smart constructor. +data RoomStatus = RoomStatus + { _rsStatus :: !(Maybe Text) + , _rsKind :: !Text + , _rsAutoMatchingStatus :: !(Maybe (Maybe RoomAutoMatchStatus)) + , _rsStatusVersion :: !(Maybe Int32) + , _rsParticipants :: !(Maybe [Maybe RoomParticipant]) + , _rsRoomId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsStatus' +-- +-- * 'rsKind' +-- +-- * 'rsAutoMatchingStatus' +-- +-- * 'rsStatusVersion' +-- +-- * 'rsParticipants' +-- +-- * 'rsRoomId' +roomStatus + :: RoomStatus +roomStatus = + RoomStatus + { _rsStatus = Nothing + , _rsKind = "games#roomStatus" + , _rsAutoMatchingStatus = Nothing + , _rsStatusVersion = Nothing + , _rsParticipants = Nothing + , _rsRoomId = Nothing + } + +-- | The status of the room. Possible values are: - \"ROOM_INVITING\" - One +-- or more players have been invited and not responded. - +-- \"ROOM_AUTO_MATCHING\" - One or more slots need to be filled by +-- auto-matching. - \"ROOM_CONNECTING\" - Players have joined are +-- connecting to each other (either before or after auto-matching). - +-- \"ROOM_ACTIVE\" - All players have joined and connected to each other. - +-- \"ROOM_DELETED\" - All joined players have left. +rsStatus :: Lens' RoomStatus (Maybe Text) +rsStatus = lens _rsStatus (\ s a -> s{_rsStatus = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomStatus. +rsKind :: Lens' RoomStatus Text +rsKind = lens _rsKind (\ s a -> s{_rsKind = a}) + +-- | Auto-matching status for this room. Not set if the room is not currently +-- in the automatching queue. +rsAutoMatchingStatus :: Lens' RoomStatus (Maybe (Maybe RoomAutoMatchStatus)) +rsAutoMatchingStatus + = lens _rsAutoMatchingStatus + (\ s a -> s{_rsAutoMatchingStatus = a}) + +-- | The version of the status for the room: an increasing counter, used by +-- the client to ignore out-of-order updates to room status. +rsStatusVersion :: Lens' RoomStatus (Maybe Int32) +rsStatusVersion + = lens _rsStatusVersion + (\ s a -> s{_rsStatusVersion = a}) + +-- | The participants involved in the room, along with their statuses. +-- Includes participants who have left or declined invitations. +rsParticipants :: Lens' RoomStatus [Maybe RoomParticipant] +rsParticipants + = lens _rsParticipants + (\ s a -> s{_rsParticipants = a}) + . _Default + . _Coerce + +-- | Globally unique ID for a room. +rsRoomId :: Lens' RoomStatus (Maybe Text) +rsRoomId = lens _rsRoomId (\ s a -> s{_rsRoomId = a}) + +instance FromJSON RoomStatus where + parseJSON + = withObject "RoomStatus" + (\ o -> + RoomStatus <$> + (o .:? "status") <*> + (o .:? "kind" .!= "games#roomStatus") + <*> (o .:? "autoMatchingStatus") + <*> (o .:? "statusVersion") + <*> (o .:? "participants" .!= mempty) + <*> (o .:? "roomId")) + +instance ToJSON RoomStatus where + toJSON RoomStatus{..} + = object + (catMaybes + [("status" .=) <$> _rsStatus, + Just ("kind" .= _rsKind), + ("autoMatchingStatus" .=) <$> _rsAutoMatchingStatus, + ("statusVersion" .=) <$> _rsStatusVersion, + ("participants" .=) <$> _rsParticipants, + ("roomId" .=) <$> _rsRoomId]) + +-- | This is a JSON template for an turn-based auto-match criteria object. +-- +-- /See:/ 'turnBasedAutoMatchingCriteria' smart constructor. +data TurnBasedAutoMatchingCriteria = TurnBasedAutoMatchingCriteria + { _tbamcKind :: !Text + , _tbamcExclusiveBitmask :: !(Maybe Int64) + , _tbamcMaxAutoMatchingPlayers :: !(Maybe Int32) + , _tbamcMinAutoMatchingPlayers :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedAutoMatchingCriteria' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbamcKind' +-- +-- * 'tbamcExclusiveBitmask' +-- +-- * 'tbamcMaxAutoMatchingPlayers' +-- +-- * 'tbamcMinAutoMatchingPlayers' +turnBasedAutoMatchingCriteria + :: TurnBasedAutoMatchingCriteria +turnBasedAutoMatchingCriteria = + TurnBasedAutoMatchingCriteria + { _tbamcKind = "games#turnBasedAutoMatchingCriteria" + , _tbamcExclusiveBitmask = Nothing + , _tbamcMaxAutoMatchingPlayers = Nothing + , _tbamcMinAutoMatchingPlayers = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedAutoMatchingCriteria. +tbamcKind :: Lens' TurnBasedAutoMatchingCriteria Text +tbamcKind + = lens _tbamcKind (\ s a -> s{_tbamcKind = a}) + +-- | A bitmask indicating when auto-matches are valid. When ANDed with other +-- exclusive bitmasks, the result must be zero. Can be used to support +-- exclusive roles within a game. +tbamcExclusiveBitmask :: Lens' TurnBasedAutoMatchingCriteria (Maybe Int64) +tbamcExclusiveBitmask + = lens _tbamcExclusiveBitmask + (\ s a -> s{_tbamcExclusiveBitmask = a}) + +-- | The maximum number of players that should be added to the match by +-- auto-matching. +tbamcMaxAutoMatchingPlayers :: Lens' TurnBasedAutoMatchingCriteria (Maybe Int32) +tbamcMaxAutoMatchingPlayers + = lens _tbamcMaxAutoMatchingPlayers + (\ s a -> s{_tbamcMaxAutoMatchingPlayers = a}) + +-- | The minimum number of players that should be added to the match by +-- auto-matching. +tbamcMinAutoMatchingPlayers :: Lens' TurnBasedAutoMatchingCriteria (Maybe Int32) +tbamcMinAutoMatchingPlayers + = lens _tbamcMinAutoMatchingPlayers + (\ s a -> s{_tbamcMinAutoMatchingPlayers = a}) + +instance FromJSON TurnBasedAutoMatchingCriteria where + parseJSON + = withObject "TurnBasedAutoMatchingCriteria" + (\ o -> + TurnBasedAutoMatchingCriteria <$> + (o .:? "kind" .!= + "games#turnBasedAutoMatchingCriteria") + <*> (o .:? "exclusiveBitmask") + <*> (o .:? "maxAutoMatchingPlayers") + <*> (o .:? "minAutoMatchingPlayers")) + +instance ToJSON TurnBasedAutoMatchingCriteria where + toJSON TurnBasedAutoMatchingCriteria{..} + = object + (catMaybes + [Just ("kind" .= _tbamcKind), + ("exclusiveBitmask" .=) <$> _tbamcExclusiveBitmask, + ("maxAutoMatchingPlayers" .=) <$> + _tbamcMaxAutoMatchingPlayers, + ("minAutoMatchingPlayers" .=) <$> + _tbamcMinAutoMatchingPlayers]) + +-- | This is a JSON template for a player score. +-- +-- /See:/ 'playerScore' smart constructor. +data PlayerScore = PlayerScore + { _psScoreTag :: !(Maybe Text) + , _psScore :: !(Maybe Int64) + , _psKind :: !Text + , _psFormattedScore :: !(Maybe Text) + , _psTimeSpan :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScore' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psScoreTag' +-- +-- * 'psScore' +-- +-- * 'psKind' +-- +-- * 'psFormattedScore' +-- +-- * 'psTimeSpan' +playerScore + :: PlayerScore +playerScore = + PlayerScore + { _psScoreTag = Nothing + , _psScore = Nothing + , _psKind = "games#playerScore" + , _psFormattedScore = Nothing + , _psTimeSpan = Nothing + } + +-- | Additional information about this score. Values will contain no more +-- than 64 URI-safe characters as defined by section 2.3 of RFC 3986. +psScoreTag :: Lens' PlayerScore (Maybe Text) +psScoreTag + = lens _psScoreTag (\ s a -> s{_psScoreTag = a}) + +-- | The numerical value for this player score. +psScore :: Lens' PlayerScore (Maybe Int64) +psScore = lens _psScore (\ s a -> s{_psScore = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerScore. +psKind :: Lens' PlayerScore Text +psKind = lens _psKind (\ s a -> s{_psKind = a}) + +-- | The formatted score for this player score. +psFormattedScore :: Lens' PlayerScore (Maybe Text) +psFormattedScore + = lens _psFormattedScore + (\ s a -> s{_psFormattedScore = a}) + +-- | The time span for this player score. Possible values are: - \"ALL_TIME\" +-- - The score is an all-time score. - \"WEEKLY\" - The score is a weekly +-- score. - \"DAILY\" - The score is a daily score. +psTimeSpan :: Lens' PlayerScore (Maybe Text) +psTimeSpan + = lens _psTimeSpan (\ s a -> s{_psTimeSpan = a}) + +instance FromJSON PlayerScore where + parseJSON + = withObject "PlayerScore" + (\ o -> + PlayerScore <$> + (o .:? "scoreTag") <*> (o .:? "score") <*> + (o .:? "kind" .!= "games#playerScore") + <*> (o .:? "formattedScore") + <*> (o .:? "timeSpan")) + +instance ToJSON PlayerScore where + toJSON PlayerScore{..} + = object + (catMaybes + [("scoreTag" .=) <$> _psScoreTag, + ("score" .=) <$> _psScore, Just ("kind" .= _psKind), + ("formattedScore" .=) <$> _psFormattedScore, + ("timeSpan" .=) <$> _psTimeSpan]) + +-- | This is a JSON template for the iOS details resource. +-- +-- /See:/ 'instanceIosDetails' smart constructor. +data InstanceIosDetails = InstanceIosDetails + { _iidItunesAppId :: !(Maybe Text) + , _iidPreferredForIpad :: !(Maybe Bool) + , _iidSupportIphone :: !(Maybe Bool) + , _iidKind :: !Text + , _iidSupportIpad :: !(Maybe Bool) + , _iidPreferredForIphone :: !(Maybe Bool) + , _iidBundleIdentifier :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceIosDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iidItunesAppId' +-- +-- * 'iidPreferredForIpad' +-- +-- * 'iidSupportIphone' +-- +-- * 'iidKind' +-- +-- * 'iidSupportIpad' +-- +-- * 'iidPreferredForIphone' +-- +-- * 'iidBundleIdentifier' +instanceIosDetails + :: InstanceIosDetails +instanceIosDetails = + InstanceIosDetails + { _iidItunesAppId = Nothing + , _iidPreferredForIpad = Nothing + , _iidSupportIphone = Nothing + , _iidKind = "games#instanceIosDetails" + , _iidSupportIpad = Nothing + , _iidPreferredForIphone = Nothing + , _iidBundleIdentifier = Nothing + } + +-- | iTunes App ID. +iidItunesAppId :: Lens' InstanceIosDetails (Maybe Text) +iidItunesAppId + = lens _iidItunesAppId + (\ s a -> s{_iidItunesAppId = a}) + +-- | Indicates that this instance is the default for new installations on +-- iPad devices. +iidPreferredForIpad :: Lens' InstanceIosDetails (Maybe Bool) +iidPreferredForIpad + = lens _iidPreferredForIpad + (\ s a -> s{_iidPreferredForIpad = a}) + +-- | Flag to indicate if this instance supports iPhone. +iidSupportIphone :: Lens' InstanceIosDetails (Maybe Bool) +iidSupportIphone + = lens _iidSupportIphone + (\ s a -> s{_iidSupportIphone = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#instanceIosDetails. +iidKind :: Lens' InstanceIosDetails Text +iidKind = lens _iidKind (\ s a -> s{_iidKind = a}) + +-- | Flag to indicate if this instance supports iPad. +iidSupportIpad :: Lens' InstanceIosDetails (Maybe Bool) +iidSupportIpad + = lens _iidSupportIpad + (\ s a -> s{_iidSupportIpad = a}) + +-- | Indicates that this instance is the default for new installations on +-- iPhone devices. +iidPreferredForIphone :: Lens' InstanceIosDetails (Maybe Bool) +iidPreferredForIphone + = lens _iidPreferredForIphone + (\ s a -> s{_iidPreferredForIphone = a}) + +-- | Bundle identifier. +iidBundleIdentifier :: Lens' InstanceIosDetails (Maybe Text) +iidBundleIdentifier + = lens _iidBundleIdentifier + (\ s a -> s{_iidBundleIdentifier = a}) + +instance FromJSON InstanceIosDetails where + parseJSON + = withObject "InstanceIosDetails" + (\ o -> + InstanceIosDetails <$> + (o .:? "itunesAppId") <*> (o .:? "preferredForIpad") + <*> (o .:? "supportIphone") + <*> (o .:? "kind" .!= "games#instanceIosDetails") + <*> (o .:? "supportIpad") + <*> (o .:? "preferredForIphone") + <*> (o .:? "bundleIdentifier")) + +instance ToJSON InstanceIosDetails where + toJSON InstanceIosDetails{..} + = object + (catMaybes + [("itunesAppId" .=) <$> _iidItunesAppId, + ("preferredForIpad" .=) <$> _iidPreferredForIpad, + ("supportIphone" .=) <$> _iidSupportIphone, + Just ("kind" .= _iidKind), + ("supportIpad" .=) <$> _iidSupportIpad, + ("preferredForIphone" .=) <$> _iidPreferredForIphone, + ("bundleIdentifier" .=) <$> _iidBundleIdentifier]) + +-- | This is a JSON template for an event period update resource. +-- +-- /See:/ 'eventUpdateResponse' smart constructor. +data EventUpdateResponse = EventUpdateResponse + { _eurPlayerEvents :: !(Maybe [Maybe PlayerEvent]) + , _eurBatchFailures :: !(Maybe [Maybe EventBatchRecordFailure]) + , _eurEventFailures :: !(Maybe [Maybe EventRecordFailure]) + , _eurKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventUpdateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eurPlayerEvents' +-- +-- * 'eurBatchFailures' +-- +-- * 'eurEventFailures' +-- +-- * 'eurKind' +eventUpdateResponse + :: EventUpdateResponse +eventUpdateResponse = + EventUpdateResponse + { _eurPlayerEvents = Nothing + , _eurBatchFailures = Nothing + , _eurEventFailures = Nothing + , _eurKind = "games#eventUpdateResponse" + } + +-- | The current status of any updated events +eurPlayerEvents :: Lens' EventUpdateResponse [Maybe PlayerEvent] +eurPlayerEvents + = lens _eurPlayerEvents + (\ s a -> s{_eurPlayerEvents = a}) + . _Default + . _Coerce + +-- | Any batch-wide failures which occurred applying updates. +eurBatchFailures :: Lens' EventUpdateResponse [Maybe EventBatchRecordFailure] +eurBatchFailures + = lens _eurBatchFailures + (\ s a -> s{_eurBatchFailures = a}) + . _Default + . _Coerce + +-- | Any failures updating a particular event. +eurEventFailures :: Lens' EventUpdateResponse [Maybe EventRecordFailure] +eurEventFailures + = lens _eurEventFailures + (\ s a -> s{_eurEventFailures = a}) + . _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventUpdateResponse. +eurKind :: Lens' EventUpdateResponse Text +eurKind = lens _eurKind (\ s a -> s{_eurKind = a}) + +instance FromJSON EventUpdateResponse where + parseJSON + = withObject "EventUpdateResponse" + (\ o -> + EventUpdateResponse <$> + (o .:? "playerEvents" .!= mempty) <*> + (o .:? "batchFailures" .!= mempty) + <*> (o .:? "eventFailures" .!= mempty) + <*> (o .:? "kind" .!= "games#eventUpdateResponse")) + +instance ToJSON EventUpdateResponse where + toJSON EventUpdateResponse{..} + = object + (catMaybes + [("playerEvents" .=) <$> _eurPlayerEvents, + ("batchFailures" .=) <$> _eurBatchFailures, + ("eventFailures" .=) <$> _eurEventFailures, + Just ("kind" .= _eurKind)]) + +-- | This is a JSON template for the result of checking a revision. +-- +-- /See:/ 'revisionCheckResponse' smart constructor. +data RevisionCheckResponse = RevisionCheckResponse + { _rcrApiVersion :: !(Maybe Text) + , _rcrKind :: !Text + , _rcrRevisionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionCheckResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrApiVersion' +-- +-- * 'rcrKind' +-- +-- * 'rcrRevisionStatus' +revisionCheckResponse + :: RevisionCheckResponse +revisionCheckResponse = + RevisionCheckResponse + { _rcrApiVersion = Nothing + , _rcrKind = "games#revisionCheckResponse" + , _rcrRevisionStatus = Nothing + } + +-- | The version of the API this client revision should use when calling API +-- methods. +rcrApiVersion :: Lens' RevisionCheckResponse (Maybe Text) +rcrApiVersion + = lens _rcrApiVersion + (\ s a -> s{_rcrApiVersion = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#revisionCheckResponse. +rcrKind :: Lens' RevisionCheckResponse Text +rcrKind = lens _rcrKind (\ s a -> s{_rcrKind = a}) + +-- | The result of the revision check. Possible values are: - \"OK\" - The +-- revision being used is current. - \"DEPRECATED\" - There is currently a +-- newer version available, but the revision being used still works. - +-- \"INVALID\" - The revision being used is not supported in any released +-- version. +rcrRevisionStatus :: Lens' RevisionCheckResponse (Maybe Text) +rcrRevisionStatus + = lens _rcrRevisionStatus + (\ s a -> s{_rcrRevisionStatus = a}) + +instance FromJSON RevisionCheckResponse where + parseJSON + = withObject "RevisionCheckResponse" + (\ o -> + RevisionCheckResponse <$> + (o .:? "apiVersion") <*> + (o .:? "kind" .!= "games#revisionCheckResponse") + <*> (o .:? "revisionStatus")) + +instance ToJSON RevisionCheckResponse where + toJSON RevisionCheckResponse{..} + = object + (catMaybes + [("apiVersion" .=) <$> _rcrApiVersion, + Just ("kind" .= _rcrKind), + ("revisionStatus" .=) <$> _rcrRevisionStatus]) + +-- | This is a JSON template for a result for a match participant. +-- +-- /See:/ 'participantResult' smart constructor. +data ParticipantResult = ParticipantResult + { _prParticipantId :: !(Maybe Text) + , _prKind :: !Text + , _prResult :: !(Maybe Text) + , _prPlacing :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParticipantResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prParticipantId' +-- +-- * 'prKind' +-- +-- * 'prResult' +-- +-- * 'prPlacing' +participantResult + :: ParticipantResult +participantResult = + ParticipantResult + { _prParticipantId = Nothing + , _prKind = "games#participantResult" + , _prResult = Nothing + , _prPlacing = Nothing + } + +-- | The ID of the participant. +prParticipantId :: Lens' ParticipantResult (Maybe Text) +prParticipantId + = lens _prParticipantId + (\ s a -> s{_prParticipantId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#participantResult. +prKind :: Lens' ParticipantResult Text +prKind = lens _prKind (\ s a -> s{_prKind = a}) + +-- | The result of the participant for this match. Possible values are: - +-- \"MATCH_RESULT_WIN\" - The participant won the match. - +-- \"MATCH_RESULT_LOSS\" - The participant lost the match. - +-- \"MATCH_RESULT_TIE\" - The participant tied the match. - +-- \"MATCH_RESULT_NONE\" - There was no winner for the match (nobody wins +-- or loses this kind of game.) - \"MATCH_RESULT_DISCONNECT\" - The +-- participant disconnected \/ left during the match. - +-- \"MATCH_RESULT_DISAGREED\" - Different clients reported different +-- results for this participant. +prResult :: Lens' ParticipantResult (Maybe Text) +prResult = lens _prResult (\ s a -> s{_prResult = a}) + +-- | The placement or ranking of the participant in the match results; a +-- number from one to the number of participants in the match. Multiple +-- participants may have the same placing value in case of a type. +prPlacing :: Lens' ParticipantResult (Maybe Int32) +prPlacing + = lens _prPlacing (\ s a -> s{_prPlacing = a}) + +instance FromJSON ParticipantResult where + parseJSON + = withObject "ParticipantResult" + (\ o -> + ParticipantResult <$> + (o .:? "participantId") <*> + (o .:? "kind" .!= "games#participantResult") + <*> (o .:? "result") + <*> (o .:? "placing")) + +instance ToJSON ParticipantResult where + toJSON ParticipantResult{..} + = object + (catMaybes + [("participantId" .=) <$> _prParticipantId, + Just ("kind" .= _prKind), + ("result" .=) <$> _prResult, + ("placing" .=) <$> _prPlacing]) + +-- | This is a JSON template for a list of category data objects. +-- +-- /See:/ 'categoryListResponse' smart constructor. +data CategoryListResponse = CategoryListResponse + { _clrNextPageToken :: !(Maybe Text) + , _clrKind :: !Text + , _clrItems :: !(Maybe [Maybe Category]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CategoryListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrNextPageToken' +-- +-- * 'clrKind' +-- +-- * 'clrItems' +categoryListResponse + :: CategoryListResponse +categoryListResponse = + CategoryListResponse + { _clrNextPageToken = Nothing + , _clrKind = "games#categoryListResponse" + , _clrItems = Nothing + } + +-- | Token corresponding to the next page of results. +clrNextPageToken :: Lens' CategoryListResponse (Maybe Text) +clrNextPageToken + = lens _clrNextPageToken + (\ s a -> s{_clrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#categoryListResponse. +clrKind :: Lens' CategoryListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +-- | The list of categories with usage data. +clrItems :: Lens' CategoryListResponse [Maybe Category] +clrItems + = lens _clrItems (\ s a -> s{_clrItems = a}) . + _Default + . _Coerce + +instance FromJSON CategoryListResponse where + parseJSON + = withObject "CategoryListResponse" + (\ o -> + CategoryListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#categoryListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CategoryListResponse where + toJSON CategoryListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _clrNextPageToken, + Just ("kind" .= _clrKind), + ("items" .=) <$> _clrItems]) + +-- | This is a JSON template for turn-based match modification metadata. +-- +-- /See:/ 'turnBasedMatchModification' smart constructor. +data TurnBasedMatchModification = TurnBasedMatchModification + { _tbmmParticipantId :: !(Maybe Text) + , _tbmmKind :: !Text + , _tbmmModifiedTimestampMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchModification' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmmParticipantId' +-- +-- * 'tbmmKind' +-- +-- * 'tbmmModifiedTimestampMillis' +turnBasedMatchModification + :: TurnBasedMatchModification +turnBasedMatchModification = + TurnBasedMatchModification + { _tbmmParticipantId = Nothing + , _tbmmKind = "games#turnBasedMatchModification" + , _tbmmModifiedTimestampMillis = Nothing + } + +-- | The ID of the participant that modified the match. +tbmmParticipantId :: Lens' TurnBasedMatchModification (Maybe Text) +tbmmParticipantId + = lens _tbmmParticipantId + (\ s a -> s{_tbmmParticipantId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchModification. +tbmmKind :: Lens' TurnBasedMatchModification Text +tbmmKind = lens _tbmmKind (\ s a -> s{_tbmmKind = a}) + +-- | The timestamp at which they modified the match, in milliseconds since +-- the epoch in UTC. +tbmmModifiedTimestampMillis :: Lens' TurnBasedMatchModification (Maybe Int64) +tbmmModifiedTimestampMillis + = lens _tbmmModifiedTimestampMillis + (\ s a -> s{_tbmmModifiedTimestampMillis = a}) + +instance FromJSON TurnBasedMatchModification where + parseJSON + = withObject "TurnBasedMatchModification" + (\ o -> + TurnBasedMatchModification <$> + (o .:? "participantId") <*> + (o .:? "kind" .!= "games#turnBasedMatchModification") + <*> (o .:? "modifiedTimestampMillis")) + +instance ToJSON TurnBasedMatchModification where + toJSON TurnBasedMatchModification{..} + = object + (catMaybes + [("participantId" .=) <$> _tbmmParticipantId, + Just ("kind" .= _tbmmKind), + ("modifiedTimestampMillis" .=) <$> + _tbmmModifiedTimestampMillis]) + +-- | This is a JSON template for an update on the status of a peer in a room. +-- +-- /See:/ 'roomP2PStatus' smart constructor. +data RoomP2PStatus = RoomP2PStatus + { _rppsStatus :: !(Maybe Text) + , _rppsParticipantId :: !(Maybe Text) + , _rppsKind :: !Text + , _rppsError :: !(Maybe Text) + , _rppsErrorReason :: !(Maybe Text) + , _rppsConnectionSetupLatencyMillis :: !(Maybe Int32) + , _rppsUnreliableRoundtripLatencyMillis :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomP2PStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rppsStatus' +-- +-- * 'rppsParticipantId' +-- +-- * 'rppsKind' +-- +-- * 'rppsError' +-- +-- * 'rppsErrorReason' +-- +-- * 'rppsConnectionSetupLatencyMillis' +-- +-- * 'rppsUnreliableRoundtripLatencyMillis' +roomP2PStatus + :: RoomP2PStatus +roomP2PStatus = + RoomP2PStatus + { _rppsStatus = Nothing + , _rppsParticipantId = Nothing + , _rppsKind = "games#roomP2PStatus" + , _rppsError = Nothing + , _rppsErrorReason = Nothing + , _rppsConnectionSetupLatencyMillis = Nothing + , _rppsUnreliableRoundtripLatencyMillis = Nothing + } + +-- | The status of the peer in the room. Possible values are: - +-- \"CONNECTION_ESTABLISHED\" - The client established a P2P connection +-- with the peer. - \"CONNECTION_FAILED\" - The client failed to establish +-- directed presence with the peer. +rppsStatus :: Lens' RoomP2PStatus (Maybe Text) +rppsStatus + = lens _rppsStatus (\ s a -> s{_rppsStatus = a}) + +-- | The ID of the participant. +rppsParticipantId :: Lens' RoomP2PStatus (Maybe Text) +rppsParticipantId + = lens _rppsParticipantId + (\ s a -> s{_rppsParticipantId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomP2PStatus. +rppsKind :: Lens' RoomP2PStatus Text +rppsKind = lens _rppsKind (\ s a -> s{_rppsKind = a}) + +-- | The error code in event of a failure. Possible values are: - +-- \"P2P_FAILED\" - The client failed to establish a P2P connection with +-- the peer. - \"PRESENCE_FAILED\" - The client failed to register to +-- receive P2P connections. - \"RELAY_SERVER_FAILED\" - The client received +-- an error when trying to use the relay server to establish a P2P +-- connection with the peer. +rppsError :: Lens' RoomP2PStatus (Maybe Text) +rppsError + = lens _rppsError (\ s a -> s{_rppsError = a}) + +-- | More detailed diagnostic message returned in event of a failure. +rppsErrorReason :: Lens' RoomP2PStatus (Maybe Text) +rppsErrorReason + = lens _rppsErrorReason + (\ s a -> s{_rppsErrorReason = a}) + +-- | The amount of time in milliseconds it took to establish connections with +-- this peer. +rppsConnectionSetupLatencyMillis :: Lens' RoomP2PStatus (Maybe Int32) +rppsConnectionSetupLatencyMillis + = lens _rppsConnectionSetupLatencyMillis + (\ s a -> s{_rppsConnectionSetupLatencyMillis = a}) + +-- | The amount of time in milliseconds it took to send packets back and +-- forth on the unreliable channel with this peer. +rppsUnreliableRoundtripLatencyMillis :: Lens' RoomP2PStatus (Maybe Int32) +rppsUnreliableRoundtripLatencyMillis + = lens _rppsUnreliableRoundtripLatencyMillis + (\ s a -> + s{_rppsUnreliableRoundtripLatencyMillis = a}) + +instance FromJSON RoomP2PStatus where + parseJSON + = withObject "RoomP2PStatus" + (\ o -> + RoomP2PStatus <$> + (o .:? "status") <*> (o .:? "participantId") <*> + (o .:? "kind" .!= "games#roomP2PStatus") + <*> (o .:? "error") + <*> (o .:? "error_reason") + <*> (o .:? "connectionSetupLatencyMillis") + <*> (o .:? "unreliableRoundtripLatencyMillis")) + +instance ToJSON RoomP2PStatus where + toJSON RoomP2PStatus{..} + = object + (catMaybes + [("status" .=) <$> _rppsStatus, + ("participantId" .=) <$> _rppsParticipantId, + Just ("kind" .= _rppsKind), + ("error" .=) <$> _rppsError, + ("error_reason" .=) <$> _rppsErrorReason, + ("connectionSetupLatencyMillis" .=) <$> + _rppsConnectionSetupLatencyMillis, + ("unreliableRoundtripLatencyMillis" .=) <$> + _rppsUnreliableRoundtripLatencyMillis]) + +-- | This is a JSON template for the metagame config resource +-- +-- /See:/ 'metagameConfig' smart constructor. +data MetagameConfig = MetagameConfig + { _mcKind :: !Text + , _mcCurrentVersion :: !(Maybe Int32) + , _mcPlayerLevels :: !(Maybe [Maybe PlayerLevel]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetagameConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcKind' +-- +-- * 'mcCurrentVersion' +-- +-- * 'mcPlayerLevels' +metagameConfig + :: MetagameConfig +metagameConfig = + MetagameConfig + { _mcKind = "games#metagameConfig" + , _mcCurrentVersion = Nothing + , _mcPlayerLevels = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#metagameConfig. +mcKind :: Lens' MetagameConfig Text +mcKind = lens _mcKind (\ s a -> s{_mcKind = a}) + +-- | Current version of the metagame configuration data. When this data is +-- updated, the version number will be increased by one. +mcCurrentVersion :: Lens' MetagameConfig (Maybe Int32) +mcCurrentVersion + = lens _mcCurrentVersion + (\ s a -> s{_mcCurrentVersion = a}) + +-- | The list of player levels. +mcPlayerLevels :: Lens' MetagameConfig [Maybe PlayerLevel] +mcPlayerLevels + = lens _mcPlayerLevels + (\ s a -> s{_mcPlayerLevels = a}) + . _Default + . _Coerce + +instance FromJSON MetagameConfig where + parseJSON + = withObject "MetagameConfig" + (\ o -> + MetagameConfig <$> + (o .:? "kind" .!= "games#metagameConfig") <*> + (o .:? "currentVersion") + <*> (o .:? "playerLevels" .!= mempty)) + +instance ToJSON MetagameConfig where + toJSON MetagameConfig{..} + = object + (catMaybes + [Just ("kind" .= _mcKind), + ("currentVersion" .=) <$> _mcCurrentVersion, + ("playerLevels" .=) <$> _mcPlayerLevels]) + +-- | This is a JSON template for the Leaderboard resource. +-- +-- /See:/ 'leaderboard' smart constructor. +data Leaderboard = Leaderboard + { _lKind :: !Text + , _lIsIconUrlDefault :: !(Maybe Bool) + , _lName :: !(Maybe Text) + , _lId :: !(Maybe Text) + , _lIconUrl :: !(Maybe Text) + , _lOrder :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Leaderboard' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lKind' +-- +-- * 'lIsIconUrlDefault' +-- +-- * 'lName' +-- +-- * 'lId' +-- +-- * 'lIconUrl' +-- +-- * 'lOrder' +leaderboard + :: Leaderboard +leaderboard = + Leaderboard + { _lKind = "games#leaderboard" + , _lIsIconUrlDefault = Nothing + , _lName = Nothing + , _lId = Nothing + , _lIconUrl = Nothing + , _lOrder = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboard. +lKind :: Lens' Leaderboard Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | Indicates whether the icon image being returned is a default image, or +-- is game-provided. +lIsIconUrlDefault :: Lens' Leaderboard (Maybe Bool) +lIsIconUrlDefault + = lens _lIsIconUrlDefault + (\ s a -> s{_lIsIconUrlDefault = a}) + +-- | The name of the leaderboard. +lName :: Lens' Leaderboard (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | The leaderboard ID. +lId :: Lens' Leaderboard (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | The icon for the leaderboard. +lIconUrl :: Lens' Leaderboard (Maybe Text) +lIconUrl = lens _lIconUrl (\ s a -> s{_lIconUrl = a}) + +-- | How scores are ordered. Possible values are: - \"LARGER_IS_BETTER\" - +-- Larger values are better; scores are sorted in descending order. - +-- \"SMALLER_IS_BETTER\" - Smaller values are better; scores are sorted in +-- ascending order. +lOrder :: Lens' Leaderboard (Maybe Text) +lOrder = lens _lOrder (\ s a -> s{_lOrder = a}) + +instance FromJSON Leaderboard where + parseJSON + = withObject "Leaderboard" + (\ o -> + Leaderboard <$> + (o .:? "kind" .!= "games#leaderboard") <*> + (o .:? "isIconUrlDefault") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "iconUrl") + <*> (o .:? "order")) + +instance ToJSON Leaderboard where + toJSON Leaderboard{..} + = object + (catMaybes + [Just ("kind" .= _lKind), + ("isIconUrlDefault" .=) <$> _lIsIconUrlDefault, + ("name" .=) <$> _lName, ("id" .=) <$> _lId, + ("iconUrl" .=) <$> _lIconUrl, + ("order" .=) <$> _lOrder]) + +-- | This is a JSON template for an event definition resource. +-- +-- /See:/ 'eventDefinition' smart constructor. +data EventDefinition = EventDefinition + { _edIsDefaultImageUrl :: !(Maybe Bool) + , _edKind :: !Text + , _edVisibility :: !(Maybe Text) + , _edImageUrl :: !(Maybe Text) + , _edDisplayName :: !(Maybe Text) + , _edId :: !(Maybe Text) + , _edChildEvents :: !(Maybe [Maybe EventChild]) + , _edDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventDefinition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edIsDefaultImageUrl' +-- +-- * 'edKind' +-- +-- * 'edVisibility' +-- +-- * 'edImageUrl' +-- +-- * 'edDisplayName' +-- +-- * 'edId' +-- +-- * 'edChildEvents' +-- +-- * 'edDescription' +eventDefinition + :: EventDefinition +eventDefinition = + EventDefinition + { _edIsDefaultImageUrl = Nothing + , _edKind = "games#eventDefinition" + , _edVisibility = Nothing + , _edImageUrl = Nothing + , _edDisplayName = Nothing + , _edId = Nothing + , _edChildEvents = Nothing + , _edDescription = Nothing + } + +-- | Indicates whether the icon image being returned is a default image, or +-- is game-provided. +edIsDefaultImageUrl :: Lens' EventDefinition (Maybe Bool) +edIsDefaultImageUrl + = lens _edIsDefaultImageUrl + (\ s a -> s{_edIsDefaultImageUrl = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventDefinition. +edKind :: Lens' EventDefinition Text +edKind = lens _edKind (\ s a -> s{_edKind = a}) + +-- | The visibility of event being tracked in this definition. Possible +-- values are: - \"REVEALED\": This event should be visible to all users. - +-- \"HIDDEN\": This event should only be shown to users that have recorded +-- this event at least once. +edVisibility :: Lens' EventDefinition (Maybe Text) +edVisibility + = lens _edVisibility (\ s a -> s{_edVisibility = a}) + +-- | The base URL for the image that represents the event. +edImageUrl :: Lens' EventDefinition (Maybe Text) +edImageUrl + = lens _edImageUrl (\ s a -> s{_edImageUrl = a}) + +-- | The name to display for the event. +edDisplayName :: Lens' EventDefinition (Maybe Text) +edDisplayName + = lens _edDisplayName + (\ s a -> s{_edDisplayName = a}) + +-- | The ID of the event. +edId :: Lens' EventDefinition (Maybe Text) +edId = lens _edId (\ s a -> s{_edId = a}) + +-- | A list of events that are a child of this event. +edChildEvents :: Lens' EventDefinition [Maybe EventChild] +edChildEvents + = lens _edChildEvents + (\ s a -> s{_edChildEvents = a}) + . _Default + . _Coerce + +-- | Description of what this event represents. +edDescription :: Lens' EventDefinition (Maybe Text) +edDescription + = lens _edDescription + (\ s a -> s{_edDescription = a}) + +instance FromJSON EventDefinition where + parseJSON + = withObject "EventDefinition" + (\ o -> + EventDefinition <$> + (o .:? "isDefaultImageUrl") <*> + (o .:? "kind" .!= "games#eventDefinition") + <*> (o .:? "visibility") + <*> (o .:? "imageUrl") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "childEvents" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON EventDefinition where + toJSON EventDefinition{..} + = object + (catMaybes + [("isDefaultImageUrl" .=) <$> _edIsDefaultImageUrl, + Just ("kind" .= _edKind), + ("visibility" .=) <$> _edVisibility, + ("imageUrl" .=) <$> _edImageUrl, + ("displayName" .=) <$> _edDisplayName, + ("id" .=) <$> _edId, + ("childEvents" .=) <$> _edChildEvents, + ("description" .=) <$> _edDescription]) + +-- | This is a JSON template for room modification metadata. +-- +-- /See:/ 'roomModification' smart constructor. +data RoomModification = RoomModification + { _rmParticipantId :: !(Maybe Text) + , _rmKind :: !Text + , _rmModifiedTimestampMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomModification' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmParticipantId' +-- +-- * 'rmKind' +-- +-- * 'rmModifiedTimestampMillis' +roomModification + :: RoomModification +roomModification = + RoomModification + { _rmParticipantId = Nothing + , _rmKind = "games#roomModification" + , _rmModifiedTimestampMillis = Nothing + } + +-- | The ID of the participant that modified the room. +rmParticipantId :: Lens' RoomModification (Maybe Text) +rmParticipantId + = lens _rmParticipantId + (\ s a -> s{_rmParticipantId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomModification. +rmKind :: Lens' RoomModification Text +rmKind = lens _rmKind (\ s a -> s{_rmKind = a}) + +-- | The timestamp at which they modified the room, in milliseconds since the +-- epoch in UTC. +rmModifiedTimestampMillis :: Lens' RoomModification (Maybe Int64) +rmModifiedTimestampMillis + = lens _rmModifiedTimestampMillis + (\ s a -> s{_rmModifiedTimestampMillis = a}) + +instance FromJSON RoomModification where + parseJSON + = withObject "RoomModification" + (\ o -> + RoomModification <$> + (o .:? "participantId") <*> + (o .:? "kind" .!= "games#roomModification") + <*> (o .:? "modifiedTimestampMillis")) + +instance ToJSON RoomModification where + toJSON RoomModification{..} + = object + (catMaybes + [("participantId" .=) <$> _rmParticipantId, + Just ("kind" .= _rmKind), + ("modifiedTimestampMillis" .=) <$> + _rmModifiedTimestampMillis]) + +-- | This is a JSON template for an achievement unlock response +-- +-- /See:/ 'achievementUnlockResponse' smart constructor. +data AchievementUnlockResponse = AchievementUnlockResponse + { _achKind :: !Text + , _achNewlyUnlocked :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementUnlockResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'achKind' +-- +-- * 'achNewlyUnlocked' +achievementUnlockResponse + :: AchievementUnlockResponse +achievementUnlockResponse = + AchievementUnlockResponse + { _achKind = "games#achievementUnlockResponse" + , _achNewlyUnlocked = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementUnlockResponse. +achKind :: Lens' AchievementUnlockResponse Text +achKind = lens _achKind (\ s a -> s{_achKind = a}) + +-- | Whether this achievement was newly unlocked (that is, whether the unlock +-- request for the achievement was the first for the player). +achNewlyUnlocked :: Lens' AchievementUnlockResponse (Maybe Bool) +achNewlyUnlocked + = lens _achNewlyUnlocked + (\ s a -> s{_achNewlyUnlocked = a}) + +instance FromJSON AchievementUnlockResponse where + parseJSON + = withObject "AchievementUnlockResponse" + (\ o -> + AchievementUnlockResponse <$> + (o .:? "kind" .!= "games#achievementUnlockResponse") + <*> (o .:? "newlyUnlocked")) + +instance ToJSON AchievementUnlockResponse where + toJSON AchievementUnlockResponse{..} + = object + (catMaybes + [Just ("kind" .= _achKind), + ("newlyUnlocked" .=) <$> _achNewlyUnlocked]) + +-- | This is a JSON template for an event period update resource. +-- +-- /See:/ 'eventUpdateRequest' smart constructor. +data EventUpdateRequest = EventUpdateRequest + { _eUpdateCount :: !(Maybe Int64) + , _eKind :: !Text + , _eDefinitionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventUpdateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eUpdateCount' +-- +-- * 'eKind' +-- +-- * 'eDefinitionId' +eventUpdateRequest + :: EventUpdateRequest +eventUpdateRequest = + EventUpdateRequest + { _eUpdateCount = Nothing + , _eKind = "games#eventUpdateRequest" + , _eDefinitionId = Nothing + } + +-- | The number of times this event occurred in this time period. +eUpdateCount :: Lens' EventUpdateRequest (Maybe Int64) +eUpdateCount + = lens _eUpdateCount (\ s a -> s{_eUpdateCount = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventUpdateRequest. +eKind :: Lens' EventUpdateRequest Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | The ID of the event being modified in this update. +eDefinitionId :: Lens' EventUpdateRequest (Maybe Text) +eDefinitionId + = lens _eDefinitionId + (\ s a -> s{_eDefinitionId = a}) + +instance FromJSON EventUpdateRequest where + parseJSON + = withObject "EventUpdateRequest" + (\ o -> + EventUpdateRequest <$> + (o .:? "updateCount") <*> + (o .:? "kind" .!= "games#eventUpdateRequest") + <*> (o .:? "definitionId")) + +instance ToJSON EventUpdateRequest where + toJSON EventUpdateRequest{..} + = object + (catMaybes + [("updateCount" .=) <$> _eUpdateCount, + Just ("kind" .= _eKind), + ("definitionId" .=) <$> _eDefinitionId]) + +-- | This is a JSON template for an achievement object. +-- +-- /See:/ 'playerAchievement' smart constructor. +data PlayerAchievement = PlayerAchievement + { _paKind :: !Text + , _paAchievementState :: !(Maybe Text) + , _paFormattedCurrentStepsString :: !(Maybe Text) + , _paExperiencePoints :: !(Maybe Int64) + , _paId :: !(Maybe Text) + , _paCurrentSteps :: !(Maybe Int32) + , _paLastUpdatedTimestamp :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerAchievement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'paKind' +-- +-- * 'paAchievementState' +-- +-- * 'paFormattedCurrentStepsString' +-- +-- * 'paExperiencePoints' +-- +-- * 'paId' +-- +-- * 'paCurrentSteps' +-- +-- * 'paLastUpdatedTimestamp' +playerAchievement + :: PlayerAchievement +playerAchievement = + PlayerAchievement + { _paKind = "games#playerAchievement" + , _paAchievementState = Nothing + , _paFormattedCurrentStepsString = Nothing + , _paExperiencePoints = Nothing + , _paId = Nothing + , _paCurrentSteps = Nothing + , _paLastUpdatedTimestamp = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerAchievement. +paKind :: Lens' PlayerAchievement Text +paKind = lens _paKind (\ s a -> s{_paKind = a}) + +-- | The state of the achievement. Possible values are: - \"HIDDEN\" - +-- Achievement is hidden. - \"REVEALED\" - Achievement is revealed. - +-- \"UNLOCKED\" - Achievement is unlocked. +paAchievementState :: Lens' PlayerAchievement (Maybe Text) +paAchievementState + = lens _paAchievementState + (\ s a -> s{_paAchievementState = a}) + +-- | The current steps for an incremental achievement as a string. +paFormattedCurrentStepsString :: Lens' PlayerAchievement (Maybe Text) +paFormattedCurrentStepsString + = lens _paFormattedCurrentStepsString + (\ s a -> s{_paFormattedCurrentStepsString = a}) + +-- | Experience points earned for the achievement. This field is absent for +-- achievements that have not yet been unlocked and 0 for achievements that +-- have been unlocked by testers but that are unpublished. +paExperiencePoints :: Lens' PlayerAchievement (Maybe Int64) +paExperiencePoints + = lens _paExperiencePoints + (\ s a -> s{_paExperiencePoints = a}) + +-- | The ID of the achievement. +paId :: Lens' PlayerAchievement (Maybe Text) +paId = lens _paId (\ s a -> s{_paId = a}) + +-- | The current steps for an incremental achievement. +paCurrentSteps :: Lens' PlayerAchievement (Maybe Int32) +paCurrentSteps + = lens _paCurrentSteps + (\ s a -> s{_paCurrentSteps = a}) + +-- | The timestamp of the last modification to this achievement\'s state. +paLastUpdatedTimestamp :: Lens' PlayerAchievement (Maybe Int64) +paLastUpdatedTimestamp + = lens _paLastUpdatedTimestamp + (\ s a -> s{_paLastUpdatedTimestamp = a}) + +instance FromJSON PlayerAchievement where + parseJSON + = withObject "PlayerAchievement" + (\ o -> + PlayerAchievement <$> + (o .:? "kind" .!= "games#playerAchievement") <*> + (o .:? "achievementState") + <*> (o .:? "formattedCurrentStepsString") + <*> (o .:? "experiencePoints") + <*> (o .:? "id") + <*> (o .:? "currentSteps") + <*> (o .:? "lastUpdatedTimestamp")) + +instance ToJSON PlayerAchievement where + toJSON PlayerAchievement{..} + = object + (catMaybes + [Just ("kind" .= _paKind), + ("achievementState" .=) <$> _paAchievementState, + ("formattedCurrentStepsString" .=) <$> + _paFormattedCurrentStepsString, + ("experiencePoints" .=) <$> _paExperiencePoints, + ("id" .=) <$> _paId, + ("currentSteps" .=) <$> _paCurrentSteps, + ("lastUpdatedTimestamp" .=) <$> + _paLastUpdatedTimestamp]) + +-- | This is a JSON template for an update on the status of peers in a room. +-- +-- /See:/ 'roomP2PStatuses' smart constructor. +data RoomP2PStatuses = RoomP2PStatuses + { _rppssKind :: !Text + , _rppssUpdates :: !(Maybe [Maybe RoomP2PStatus]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomP2PStatuses' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rppssKind' +-- +-- * 'rppssUpdates' +roomP2PStatuses + :: RoomP2PStatuses +roomP2PStatuses = + RoomP2PStatuses + { _rppssKind = "games#roomP2PStatuses" + , _rppssUpdates = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomP2PStatuses. +rppssKind :: Lens' RoomP2PStatuses Text +rppssKind + = lens _rppssKind (\ s a -> s{_rppssKind = a}) + +-- | The updates for the peers. +rppssUpdates :: Lens' RoomP2PStatuses [Maybe RoomP2PStatus] +rppssUpdates + = lens _rppssUpdates (\ s a -> s{_rppssUpdates = a}) + . _Default + . _Coerce + +instance FromJSON RoomP2PStatuses where + parseJSON + = withObject "RoomP2PStatuses" + (\ o -> + RoomP2PStatuses <$> + (o .:? "kind" .!= "games#roomP2PStatuses") <*> + (o .:? "updates" .!= mempty)) + +instance ToJSON RoomP2PStatuses where + toJSON RoomP2PStatuses{..} + = object + (catMaybes + [Just ("kind" .= _rppssKind), + ("updates" .=) <$> _rppssUpdates]) + +-- | This is a JSON template for a request to update an achievement. +-- +-- /See:/ 'achievementUpdateRequest' smart constructor. +data AchievementUpdateRequest = AchievementUpdateRequest + { _auruAchievementId :: !(Maybe Text) + , _auruKind :: !Text + , _auruUpdateType :: !(Maybe Text) + , _auruSetStepsAtLeastPayload :: !(Maybe (Maybe GamesAchievementSetStepsAtLeast)) + , _auruIncrementPayload :: !(Maybe (Maybe GamesAchievementIncrement)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementUpdateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auruAchievementId' +-- +-- * 'auruKind' +-- +-- * 'auruUpdateType' +-- +-- * 'auruSetStepsAtLeastPayload' +-- +-- * 'auruIncrementPayload' +achievementUpdateRequest + :: AchievementUpdateRequest +achievementUpdateRequest = + AchievementUpdateRequest + { _auruAchievementId = Nothing + , _auruKind = "games#achievementUpdateRequest" + , _auruUpdateType = Nothing + , _auruSetStepsAtLeastPayload = Nothing + , _auruIncrementPayload = Nothing + } + +-- | The achievement this update is being applied to. +auruAchievementId :: Lens' AchievementUpdateRequest (Maybe Text) +auruAchievementId + = lens _auruAchievementId + (\ s a -> s{_auruAchievementId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementUpdateRequest. +auruKind :: Lens' AchievementUpdateRequest Text +auruKind = lens _auruKind (\ s a -> s{_auruKind = a}) + +-- | The type of update being applied. Possible values are: - \"REVEAL\" - +-- Achievement is revealed. - \"UNLOCK\" - Achievement is unlocked. - +-- \"INCREMENT\" - Achievement is incremented. - \"SET_STEPS_AT_LEAST\" - +-- Achievement progress is set to at least the passed value. +auruUpdateType :: Lens' AchievementUpdateRequest (Maybe Text) +auruUpdateType + = lens _auruUpdateType + (\ s a -> s{_auruUpdateType = a}) + +-- | The payload if an update of type SET_STEPS_AT_LEAST was requested for +-- the achievement. +auruSetStepsAtLeastPayload :: Lens' AchievementUpdateRequest (Maybe (Maybe GamesAchievementSetStepsAtLeast)) +auruSetStepsAtLeastPayload + = lens _auruSetStepsAtLeastPayload + (\ s a -> s{_auruSetStepsAtLeastPayload = a}) + +-- | The payload if an update of type INCREMENT was requested for the +-- achievement. +auruIncrementPayload :: Lens' AchievementUpdateRequest (Maybe (Maybe GamesAchievementIncrement)) +auruIncrementPayload + = lens _auruIncrementPayload + (\ s a -> s{_auruIncrementPayload = a}) + +instance FromJSON AchievementUpdateRequest where + parseJSON + = withObject "AchievementUpdateRequest" + (\ o -> + AchievementUpdateRequest <$> + (o .:? "achievementId") <*> + (o .:? "kind" .!= "games#achievementUpdateRequest") + <*> (o .:? "updateType") + <*> (o .:? "setStepsAtLeastPayload") + <*> (o .:? "incrementPayload")) + +instance ToJSON AchievementUpdateRequest where + toJSON AchievementUpdateRequest{..} + = object + (catMaybes + [("achievementId" .=) <$> _auruAchievementId, + Just ("kind" .= _auruKind), + ("updateType" .=) <$> _auruUpdateType, + ("setStepsAtLeastPayload" .=) <$> + _auruSetStepsAtLeastPayload, + ("incrementPayload" .=) <$> _auruIncrementPayload]) + +-- | This is a JSON template for an image asset object. +-- +-- /See:/ 'imageAsset' smart constructor. +data ImageAsset = ImageAsset + { _iaHeight :: !(Maybe Int32) + , _iaKind :: !Text + , _iaUrl :: !(Maybe Text) + , _iaWidth :: !(Maybe Int32) + , _iaName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImageAsset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iaHeight' +-- +-- * 'iaKind' +-- +-- * 'iaUrl' +-- +-- * 'iaWidth' +-- +-- * 'iaName' +imageAsset + :: ImageAsset +imageAsset = + ImageAsset + { _iaHeight = Nothing + , _iaKind = "games#imageAsset" + , _iaUrl = Nothing + , _iaWidth = Nothing + , _iaName = Nothing + } + +-- | The height of the asset. +iaHeight :: Lens' ImageAsset (Maybe Int32) +iaHeight = lens _iaHeight (\ s a -> s{_iaHeight = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#imageAsset. +iaKind :: Lens' ImageAsset Text +iaKind = lens _iaKind (\ s a -> s{_iaKind = a}) + +-- | The URL of the asset. +iaUrl :: Lens' ImageAsset (Maybe Text) +iaUrl = lens _iaUrl (\ s a -> s{_iaUrl = a}) + +-- | The width of the asset. +iaWidth :: Lens' ImageAsset (Maybe Int32) +iaWidth = lens _iaWidth (\ s a -> s{_iaWidth = a}) + +-- | The name of the asset. +iaName :: Lens' ImageAsset (Maybe Text) +iaName = lens _iaName (\ s a -> s{_iaName = a}) + +instance FromJSON ImageAsset where + parseJSON + = withObject "ImageAsset" + (\ o -> + ImageAsset <$> + (o .:? "height") <*> + (o .:? "kind" .!= "games#imageAsset") + <*> (o .:? "url") + <*> (o .:? "width") + <*> (o .:? "name")) + +instance ToJSON ImageAsset where + toJSON ImageAsset{..} + = object + (catMaybes + [("height" .=) <$> _iaHeight, + Just ("kind" .= _iaKind), ("url" .=) <$> _iaUrl, + ("width" .=) <$> _iaWidth, ("name" .=) <$> _iaName]) + +-- | This is a JSON template for a score rank in a leaderboard. +-- +-- /See:/ 'leaderboardScoreRank' smart constructor. +data LeaderboardScoreRank = LeaderboardScoreRank + { _lsrNumScores :: !(Maybe Int64) + , _lsrKind :: !Text + , _lsrFormattedRank :: !(Maybe Text) + , _lsrFormattedNumScores :: !(Maybe Text) + , _lsrRank :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardScoreRank' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsrNumScores' +-- +-- * 'lsrKind' +-- +-- * 'lsrFormattedRank' +-- +-- * 'lsrFormattedNumScores' +-- +-- * 'lsrRank' +leaderboardScoreRank + :: LeaderboardScoreRank +leaderboardScoreRank = + LeaderboardScoreRank + { _lsrNumScores = Nothing + , _lsrKind = "games#leaderboardScoreRank" + , _lsrFormattedRank = Nothing + , _lsrFormattedNumScores = Nothing + , _lsrRank = Nothing + } + +-- | The number of scores in the leaderboard. +lsrNumScores :: Lens' LeaderboardScoreRank (Maybe Int64) +lsrNumScores + = lens _lsrNumScores (\ s a -> s{_lsrNumScores = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboardScoreRank. +lsrKind :: Lens' LeaderboardScoreRank Text +lsrKind = lens _lsrKind (\ s a -> s{_lsrKind = a}) + +-- | The rank in the leaderboard as a string. +lsrFormattedRank :: Lens' LeaderboardScoreRank (Maybe Text) +lsrFormattedRank + = lens _lsrFormattedRank + (\ s a -> s{_lsrFormattedRank = a}) + +-- | The number of scores in the leaderboard as a string. +lsrFormattedNumScores :: Lens' LeaderboardScoreRank (Maybe Text) +lsrFormattedNumScores + = lens _lsrFormattedNumScores + (\ s a -> s{_lsrFormattedNumScores = a}) + +-- | The rank in the leaderboard. +lsrRank :: Lens' LeaderboardScoreRank (Maybe Int64) +lsrRank = lens _lsrRank (\ s a -> s{_lsrRank = a}) + +instance FromJSON LeaderboardScoreRank where + parseJSON + = withObject "LeaderboardScoreRank" + (\ o -> + LeaderboardScoreRank <$> + (o .:? "numScores") <*> + (o .:? "kind" .!= "games#leaderboardScoreRank") + <*> (o .:? "formattedRank") + <*> (o .:? "formattedNumScores") + <*> (o .:? "rank")) + +instance ToJSON LeaderboardScoreRank where + toJSON LeaderboardScoreRank{..} + = object + (catMaybes + [("numScores" .=) <$> _lsrNumScores, + Just ("kind" .= _lsrKind), + ("formattedRank" .=) <$> _lsrFormattedRank, + ("formattedNumScores" .=) <$> _lsrFormattedNumScores, + ("rank" .=) <$> _lsrRank]) + +-- | This is a JSON template for a list of achievement update requests. +-- +-- /See:/ 'achievementUpdateMultipleRequest' smart constructor. +data AchievementUpdateMultipleRequest = AchievementUpdateMultipleRequest + { _aumruKind :: !Text + , _aumruUpdates :: !(Maybe [Maybe AchievementUpdateRequest]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementUpdateMultipleRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aumruKind' +-- +-- * 'aumruUpdates' +achievementUpdateMultipleRequest + :: AchievementUpdateMultipleRequest +achievementUpdateMultipleRequest = + AchievementUpdateMultipleRequest + { _aumruKind = "games#achievementUpdateMultipleRequest" + , _aumruUpdates = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementUpdateMultipleRequest. +aumruKind :: Lens' AchievementUpdateMultipleRequest Text +aumruKind + = lens _aumruKind (\ s a -> s{_aumruKind = a}) + +-- | The individual achievement update requests. +aumruUpdates :: Lens' AchievementUpdateMultipleRequest [Maybe AchievementUpdateRequest] +aumruUpdates + = lens _aumruUpdates (\ s a -> s{_aumruUpdates = a}) + . _Default + . _Coerce + +instance FromJSON AchievementUpdateMultipleRequest + where + parseJSON + = withObject "AchievementUpdateMultipleRequest" + (\ o -> + AchievementUpdateMultipleRequest <$> + (o .:? "kind" .!= + "games#achievementUpdateMultipleRequest") + <*> (o .:? "updates" .!= mempty)) + +instance ToJSON AchievementUpdateMultipleRequest + where + toJSON AchievementUpdateMultipleRequest{..} + = object + (catMaybes + [Just ("kind" .= _aumruKind), + ("updates" .=) <$> _aumruUpdates]) + +-- | This is a JSON template for status of room automatching that is in +-- progress. +-- +-- /See:/ 'roomAutoMatchStatus' smart constructor. +data RoomAutoMatchStatus = RoomAutoMatchStatus + { _ramsKind :: !Text + , _ramsWaitEstimateSeconds :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomAutoMatchStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ramsKind' +-- +-- * 'ramsWaitEstimateSeconds' +roomAutoMatchStatus + :: RoomAutoMatchStatus +roomAutoMatchStatus = + RoomAutoMatchStatus + { _ramsKind = "games#roomAutoMatchStatus" + , _ramsWaitEstimateSeconds = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomAutoMatchStatus. +ramsKind :: Lens' RoomAutoMatchStatus Text +ramsKind = lens _ramsKind (\ s a -> s{_ramsKind = a}) + +-- | An estimate for the amount of time (in seconds) that auto-matching is +-- expected to take to complete. +ramsWaitEstimateSeconds :: Lens' RoomAutoMatchStatus (Maybe Int32) +ramsWaitEstimateSeconds + = lens _ramsWaitEstimateSeconds + (\ s a -> s{_ramsWaitEstimateSeconds = a}) + +instance FromJSON RoomAutoMatchStatus where + parseJSON + = withObject "RoomAutoMatchStatus" + (\ o -> + RoomAutoMatchStatus <$> + (o .:? "kind" .!= "games#roomAutoMatchStatus") <*> + (o .:? "waitEstimateSeconds")) + +instance ToJSON RoomAutoMatchStatus where + toJSON RoomAutoMatchStatus{..} + = object + (catMaybes + [Just ("kind" .= _ramsKind), + ("waitEstimateSeconds" .=) <$> + _ramsWaitEstimateSeconds]) + +-- | This is a JSON template for a room creation request. +-- +-- /See:/ 'roomCreateRequest' smart constructor. +data RoomCreateRequest = RoomCreateRequest + { _rooRequestId :: !(Maybe Int64) + , _rooVariant :: !(Maybe Int32) + , _rooNetworkDiagnostics :: !(Maybe (Maybe NetworkDiagnostics)) + , _rooKind :: !Text + , _rooInvitedPlayerIds :: !(Maybe [Text]) + , _rooClientAddress :: !(Maybe (Maybe RoomClientAddress)) + , _rooAutoMatchingCriteria :: !(Maybe (Maybe RoomAutoMatchingCriteria)) + , _rooCapabilities :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomCreateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rooRequestId' +-- +-- * 'rooVariant' +-- +-- * 'rooNetworkDiagnostics' +-- +-- * 'rooKind' +-- +-- * 'rooInvitedPlayerIds' +-- +-- * 'rooClientAddress' +-- +-- * 'rooAutoMatchingCriteria' +-- +-- * 'rooCapabilities' +roomCreateRequest + :: RoomCreateRequest +roomCreateRequest = + RoomCreateRequest + { _rooRequestId = Nothing + , _rooVariant = Nothing + , _rooNetworkDiagnostics = Nothing + , _rooKind = "games#roomCreateRequest" + , _rooInvitedPlayerIds = Nothing + , _rooClientAddress = Nothing + , _rooAutoMatchingCriteria = Nothing + , _rooCapabilities = Nothing + } + +-- | A randomly generated numeric ID. This number is used at the server to +-- ensure that the request is handled correctly across retries. +rooRequestId :: Lens' RoomCreateRequest (Maybe Int64) +rooRequestId + = lens _rooRequestId (\ s a -> s{_rooRequestId = a}) + +-- | The variant \/ mode of the application to be played. This can be any +-- integer value, or left blank. You should use a small number of variants +-- to keep the auto-matching pool as large as possible. +rooVariant :: Lens' RoomCreateRequest (Maybe Int32) +rooVariant + = lens _rooVariant (\ s a -> s{_rooVariant = a}) + +-- | Network diagnostics for the client creating the room. +rooNetworkDiagnostics :: Lens' RoomCreateRequest (Maybe (Maybe NetworkDiagnostics)) +rooNetworkDiagnostics + = lens _rooNetworkDiagnostics + (\ s a -> s{_rooNetworkDiagnostics = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomCreateRequest. +rooKind :: Lens' RoomCreateRequest Text +rooKind = lens _rooKind (\ s a -> s{_rooKind = a}) + +-- | The player IDs to invite to the room. +rooInvitedPlayerIds :: Lens' RoomCreateRequest [Text] +rooInvitedPlayerIds + = lens _rooInvitedPlayerIds + (\ s a -> s{_rooInvitedPlayerIds = a}) + . _Default + . _Coerce + +-- | Client address for the player creating the room. +rooClientAddress :: Lens' RoomCreateRequest (Maybe (Maybe RoomClientAddress)) +rooClientAddress + = lens _rooClientAddress + (\ s a -> s{_rooClientAddress = a}) + +-- | Criteria for auto-matching players into this room. +rooAutoMatchingCriteria :: Lens' RoomCreateRequest (Maybe (Maybe RoomAutoMatchingCriteria)) +rooAutoMatchingCriteria + = lens _rooAutoMatchingCriteria + (\ s a -> s{_rooAutoMatchingCriteria = a}) + +-- | The capabilities that this client supports for realtime communication. +rooCapabilities :: Lens' RoomCreateRequest [Text] +rooCapabilities + = lens _rooCapabilities + (\ s a -> s{_rooCapabilities = a}) + . _Default + . _Coerce + +instance FromJSON RoomCreateRequest where + parseJSON + = withObject "RoomCreateRequest" + (\ o -> + RoomCreateRequest <$> + (o .:? "requestId") <*> (o .:? "variant") <*> + (o .:? "networkDiagnostics") + <*> (o .:? "kind" .!= "games#roomCreateRequest") + <*> (o .:? "invitedPlayerIds" .!= mempty) + <*> (o .:? "clientAddress") + <*> (o .:? "autoMatchingCriteria") + <*> (o .:? "capabilities" .!= mempty)) + +instance ToJSON RoomCreateRequest where + toJSON RoomCreateRequest{..} + = object + (catMaybes + [("requestId" .=) <$> _rooRequestId, + ("variant" .=) <$> _rooVariant, + ("networkDiagnostics" .=) <$> _rooNetworkDiagnostics, + Just ("kind" .= _rooKind), + ("invitedPlayerIds" .=) <$> _rooInvitedPlayerIds, + ("clientAddress" .=) <$> _rooClientAddress, + ("autoMatchingCriteria" .=) <$> + _rooAutoMatchingCriteria, + ("capabilities" .=) <$> _rooCapabilities]) + +-- | This is a JSON template for a ListScores response. +-- +-- /See:/ 'leaderboardScores' smart constructor. +data LeaderboardScores = LeaderboardScores + { _lsNextPageToken :: !(Maybe Text) + , _lsNumScores :: !(Maybe Int64) + , _lsKind :: !Text + , _lsPlayerScore :: !(Maybe (Maybe LeaderboardEntry)) + , _lsItems :: !(Maybe [Maybe LeaderboardEntry]) + , _lsPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardScores' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsNextPageToken' +-- +-- * 'lsNumScores' +-- +-- * 'lsKind' +-- +-- * 'lsPlayerScore' +-- +-- * 'lsItems' +-- +-- * 'lsPrevPageToken' +leaderboardScores + :: LeaderboardScores +leaderboardScores = + LeaderboardScores + { _lsNextPageToken = Nothing + , _lsNumScores = Nothing + , _lsKind = "games#leaderboardScores" + , _lsPlayerScore = Nothing + , _lsItems = Nothing + , _lsPrevPageToken = Nothing + } + +-- | The pagination token for the next page of results. +lsNextPageToken :: Lens' LeaderboardScores (Maybe Text) +lsNextPageToken + = lens _lsNextPageToken + (\ s a -> s{_lsNextPageToken = a}) + +-- | The total number of scores in the leaderboard. +lsNumScores :: Lens' LeaderboardScores (Maybe Int64) +lsNumScores + = lens _lsNumScores (\ s a -> s{_lsNumScores = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#leaderboardScores. +lsKind :: Lens' LeaderboardScores Text +lsKind = lens _lsKind (\ s a -> s{_lsKind = a}) + +-- | The score of the requesting player on the leaderboard. The player\'s +-- score may appear both here and in the list of scores above. If you are +-- viewing a public leaderboard and the player is not sharing their +-- gameplay information publicly, the scoreRank and formattedScoreRank +-- values will not be present. +lsPlayerScore :: Lens' LeaderboardScores (Maybe (Maybe LeaderboardEntry)) +lsPlayerScore + = lens _lsPlayerScore + (\ s a -> s{_lsPlayerScore = a}) + +-- | The scores in the leaderboard. +lsItems :: Lens' LeaderboardScores [Maybe LeaderboardEntry] +lsItems + = lens _lsItems (\ s a -> s{_lsItems = a}) . _Default + . _Coerce + +-- | The pagination token for the previous page of results. +lsPrevPageToken :: Lens' LeaderboardScores (Maybe Text) +lsPrevPageToken + = lens _lsPrevPageToken + (\ s a -> s{_lsPrevPageToken = a}) + +instance FromJSON LeaderboardScores where + parseJSON + = withObject "LeaderboardScores" + (\ o -> + LeaderboardScores <$> + (o .:? "nextPageToken") <*> (o .:? "numScores") <*> + (o .:? "kind" .!= "games#leaderboardScores") + <*> (o .:? "playerScore") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "prevPageToken")) + +instance ToJSON LeaderboardScores where + toJSON LeaderboardScores{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lsNextPageToken, + ("numScores" .=) <$> _lsNumScores, + Just ("kind" .= _lsKind), + ("playerScore" .=) <$> _lsPlayerScore, + ("items" .=) <$> _lsItems, + ("prevPageToken" .=) <$> _lsPrevPageToken]) + +-- | This is a JSON template for a third party player list response. +-- +-- /See:/ 'playerListResponse' smart constructor. +data PlayerListResponse = PlayerListResponse + { _plrNextPageToken :: !(Maybe Text) + , _plrKind :: !Text + , _plrItems :: !(Maybe [Maybe Player]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrNextPageToken' +-- +-- * 'plrKind' +-- +-- * 'plrItems' +playerListResponse + :: PlayerListResponse +playerListResponse = + PlayerListResponse + { _plrNextPageToken = Nothing + , _plrKind = "games#playerListResponse" + , _plrItems = Nothing + } + +-- | Token corresponding to the next page of results. +plrNextPageToken :: Lens' PlayerListResponse (Maybe Text) +plrNextPageToken + = lens _plrNextPageToken + (\ s a -> s{_plrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerListResponse. +plrKind :: Lens' PlayerListResponse Text +plrKind = lens _plrKind (\ s a -> s{_plrKind = a}) + +-- | The players. +plrItems :: Lens' PlayerListResponse [Maybe Player] +plrItems + = lens _plrItems (\ s a -> s{_plrItems = a}) . + _Default + . _Coerce + +instance FromJSON PlayerListResponse where + parseJSON + = withObject "PlayerListResponse" + (\ o -> + PlayerListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#playerListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PlayerListResponse where + toJSON PlayerListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _plrNextPageToken, + Just ("kind" .= _plrKind), + ("items" .=) <$> _plrItems]) + +-- | This is a JSON template for a turn-based match creation request. +-- +-- /See:/ 'turnBasedMatchCreateRequest' smart constructor. +data TurnBasedMatchCreateRequest = TurnBasedMatchCreateRequest + { _tbmcrRequestId :: !(Maybe Int64) + , _tbmcrVariant :: !(Maybe Int32) + , _tbmcrKind :: !Text + , _tbmcrInvitedPlayerIds :: !(Maybe [Text]) + , _tbmcrAutoMatchingCriteria :: !(Maybe (Maybe TurnBasedAutoMatchingCriteria)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchCreateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmcrRequestId' +-- +-- * 'tbmcrVariant' +-- +-- * 'tbmcrKind' +-- +-- * 'tbmcrInvitedPlayerIds' +-- +-- * 'tbmcrAutoMatchingCriteria' +turnBasedMatchCreateRequest + :: TurnBasedMatchCreateRequest +turnBasedMatchCreateRequest = + TurnBasedMatchCreateRequest + { _tbmcrRequestId = Nothing + , _tbmcrVariant = Nothing + , _tbmcrKind = "games#turnBasedMatchCreateRequest" + , _tbmcrInvitedPlayerIds = Nothing + , _tbmcrAutoMatchingCriteria = Nothing + } + +-- | A randomly generated numeric ID. This number is used at the server to +-- ensure that the request is handled correctly across retries. +tbmcrRequestId :: Lens' TurnBasedMatchCreateRequest (Maybe Int64) +tbmcrRequestId + = lens _tbmcrRequestId + (\ s a -> s{_tbmcrRequestId = a}) + +-- | The variant \/ mode of the application to be played. This can be any +-- integer value, or left blank. You should use a small number of variants +-- to keep the auto-matching pool as large as possible. +tbmcrVariant :: Lens' TurnBasedMatchCreateRequest (Maybe Int32) +tbmcrVariant + = lens _tbmcrVariant (\ s a -> s{_tbmcrVariant = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchCreateRequest. +tbmcrKind :: Lens' TurnBasedMatchCreateRequest Text +tbmcrKind + = lens _tbmcrKind (\ s a -> s{_tbmcrKind = a}) + +-- | The player ids to invite to the match. +tbmcrInvitedPlayerIds :: Lens' TurnBasedMatchCreateRequest [Text] +tbmcrInvitedPlayerIds + = lens _tbmcrInvitedPlayerIds + (\ s a -> s{_tbmcrInvitedPlayerIds = a}) + . _Default + . _Coerce + +-- | Criteria for auto-matching players into this match. +tbmcrAutoMatchingCriteria :: Lens' TurnBasedMatchCreateRequest (Maybe (Maybe TurnBasedAutoMatchingCriteria)) +tbmcrAutoMatchingCriteria + = lens _tbmcrAutoMatchingCriteria + (\ s a -> s{_tbmcrAutoMatchingCriteria = a}) + +instance FromJSON TurnBasedMatchCreateRequest where + parseJSON + = withObject "TurnBasedMatchCreateRequest" + (\ o -> + TurnBasedMatchCreateRequest <$> + (o .:? "requestId") <*> (o .:? "variant") <*> + (o .:? "kind" .!= + "games#turnBasedMatchCreateRequest") + <*> (o .:? "invitedPlayerIds" .!= mempty) + <*> (o .:? "autoMatchingCriteria")) + +instance ToJSON TurnBasedMatchCreateRequest where + toJSON TurnBasedMatchCreateRequest{..} + = object + (catMaybes + [("requestId" .=) <$> _tbmcrRequestId, + ("variant" .=) <$> _tbmcrVariant, + Just ("kind" .= _tbmcrKind), + ("invitedPlayerIds" .=) <$> _tbmcrInvitedPlayerIds, + ("autoMatchingCriteria" .=) <$> + _tbmcrAutoMatchingCriteria]) + +-- | This is a JSON template for an achievement definition object. +-- +-- /See:/ 'achievementDefinition' smart constructor. +data AchievementDefinition = AchievementDefinition + { _adAchievementType :: !(Maybe Text) + , _adFormattedTotalSteps :: !(Maybe Text) + , _adRevealedIconUrl :: !(Maybe Text) + , _adKind :: !Text + , _adExperiencePoints :: !(Maybe Int64) + , _adInitialState :: !(Maybe Text) + , _adName :: !(Maybe Text) + , _adId :: !(Maybe Text) + , _adIsUnlockedIconUrlDefault :: !(Maybe Bool) + , _adTotalSteps :: !(Maybe Int32) + , _adDescription :: !(Maybe Text) + , _adIsRevealedIconUrlDefault :: !(Maybe Bool) + , _adUnlockedIconUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementDefinition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adAchievementType' +-- +-- * 'adFormattedTotalSteps' +-- +-- * 'adRevealedIconUrl' +-- +-- * 'adKind' +-- +-- * 'adExperiencePoints' +-- +-- * 'adInitialState' +-- +-- * 'adName' +-- +-- * 'adId' +-- +-- * 'adIsUnlockedIconUrlDefault' +-- +-- * 'adTotalSteps' +-- +-- * 'adDescription' +-- +-- * 'adIsRevealedIconUrlDefault' +-- +-- * 'adUnlockedIconUrl' +achievementDefinition + :: AchievementDefinition +achievementDefinition = + AchievementDefinition + { _adAchievementType = Nothing + , _adFormattedTotalSteps = Nothing + , _adRevealedIconUrl = Nothing + , _adKind = "games#achievementDefinition" + , _adExperiencePoints = Nothing + , _adInitialState = Nothing + , _adName = Nothing + , _adId = Nothing + , _adIsUnlockedIconUrlDefault = Nothing + , _adTotalSteps = Nothing + , _adDescription = Nothing + , _adIsRevealedIconUrlDefault = Nothing + , _adUnlockedIconUrl = Nothing + } + +-- | The type of the achievement. Possible values are: - \"STANDARD\" - +-- Achievement is either locked or unlocked. - \"INCREMENTAL\" - +-- Achievement is incremental. +adAchievementType :: Lens' AchievementDefinition (Maybe Text) +adAchievementType + = lens _adAchievementType + (\ s a -> s{_adAchievementType = a}) + +-- | The total steps for an incremental achievement as a string. +adFormattedTotalSteps :: Lens' AchievementDefinition (Maybe Text) +adFormattedTotalSteps + = lens _adFormattedTotalSteps + (\ s a -> s{_adFormattedTotalSteps = a}) + +-- | The image URL for the revealed achievement icon. +adRevealedIconUrl :: Lens' AchievementDefinition (Maybe Text) +adRevealedIconUrl + = lens _adRevealedIconUrl + (\ s a -> s{_adRevealedIconUrl = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementDefinition. +adKind :: Lens' AchievementDefinition Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | Experience points which will be earned when unlocking this achievement. +adExperiencePoints :: Lens' AchievementDefinition (Maybe Int64) +adExperiencePoints + = lens _adExperiencePoints + (\ s a -> s{_adExperiencePoints = a}) + +-- | The initial state of the achievement. Possible values are: - \"HIDDEN\" +-- - Achievement is hidden. - \"REVEALED\" - Achievement is revealed. - +-- \"UNLOCKED\" - Achievement is unlocked. +adInitialState :: Lens' AchievementDefinition (Maybe Text) +adInitialState + = lens _adInitialState + (\ s a -> s{_adInitialState = a}) + +-- | The name of the achievement. +adName :: Lens' AchievementDefinition (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +-- | The ID of the achievement. +adId :: Lens' AchievementDefinition (Maybe Text) +adId = lens _adId (\ s a -> s{_adId = a}) + +-- | Indicates whether the unlocked icon image being returned is a default +-- image, or is game-provided. +adIsUnlockedIconUrlDefault :: Lens' AchievementDefinition (Maybe Bool) +adIsUnlockedIconUrlDefault + = lens _adIsUnlockedIconUrlDefault + (\ s a -> s{_adIsUnlockedIconUrlDefault = a}) + +-- | The total steps for an incremental achievement. +adTotalSteps :: Lens' AchievementDefinition (Maybe Int32) +adTotalSteps + = lens _adTotalSteps (\ s a -> s{_adTotalSteps = a}) + +-- | The description of the achievement. +adDescription :: Lens' AchievementDefinition (Maybe Text) +adDescription + = lens _adDescription + (\ s a -> s{_adDescription = a}) + +-- | Indicates whether the revealed icon image being returned is a default +-- image, or is provided by the game. +adIsRevealedIconUrlDefault :: Lens' AchievementDefinition (Maybe Bool) +adIsRevealedIconUrlDefault + = lens _adIsRevealedIconUrlDefault + (\ s a -> s{_adIsRevealedIconUrlDefault = a}) + +-- | The image URL for the unlocked achievement icon. +adUnlockedIconUrl :: Lens' AchievementDefinition (Maybe Text) +adUnlockedIconUrl + = lens _adUnlockedIconUrl + (\ s a -> s{_adUnlockedIconUrl = a}) + +instance FromJSON AchievementDefinition where + parseJSON + = withObject "AchievementDefinition" + (\ o -> + AchievementDefinition <$> + (o .:? "achievementType") <*> + (o .:? "formattedTotalSteps") + <*> (o .:? "revealedIconUrl") + <*> (o .:? "kind" .!= "games#achievementDefinition") + <*> (o .:? "experiencePoints") + <*> (o .:? "initialState") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "isUnlockedIconUrlDefault") + <*> (o .:? "totalSteps") + <*> (o .:? "description") + <*> (o .:? "isRevealedIconUrlDefault") + <*> (o .:? "unlockedIconUrl")) + +instance ToJSON AchievementDefinition where + toJSON AchievementDefinition{..} + = object + (catMaybes + [("achievementType" .=) <$> _adAchievementType, + ("formattedTotalSteps" .=) <$> + _adFormattedTotalSteps, + ("revealedIconUrl" .=) <$> _adRevealedIconUrl, + Just ("kind" .= _adKind), + ("experiencePoints" .=) <$> _adExperiencePoints, + ("initialState" .=) <$> _adInitialState, + ("name" .=) <$> _adName, ("id" .=) <$> _adId, + ("isUnlockedIconUrlDefault" .=) <$> + _adIsUnlockedIconUrlDefault, + ("totalSteps" .=) <$> _adTotalSteps, + ("description" .=) <$> _adDescription, + ("isRevealedIconUrlDefault" .=) <$> + _adIsRevealedIconUrlDefault, + ("unlockedIconUrl" .=) <$> _adUnlockedIconUrl]) + +-- | This is a JSON template for a list of achievement objects. +-- +-- /See:/ 'playerAchievementListResponse' smart constructor. +data PlayerAchievementListResponse = PlayerAchievementListResponse + { _palrNextPageToken :: !(Maybe Text) + , _palrKind :: !Text + , _palrItems :: !(Maybe [Maybe PlayerAchievement]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerAchievementListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'palrNextPageToken' +-- +-- * 'palrKind' +-- +-- * 'palrItems' +playerAchievementListResponse + :: PlayerAchievementListResponse +playerAchievementListResponse = + PlayerAchievementListResponse + { _palrNextPageToken = Nothing + , _palrKind = "games#playerAchievementListResponse" + , _palrItems = Nothing + } + +-- | Token corresponding to the next page of results. +palrNextPageToken :: Lens' PlayerAchievementListResponse (Maybe Text) +palrNextPageToken + = lens _palrNextPageToken + (\ s a -> s{_palrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerAchievementListResponse. +palrKind :: Lens' PlayerAchievementListResponse Text +palrKind = lens _palrKind (\ s a -> s{_palrKind = a}) + +-- | The achievements. +palrItems :: Lens' PlayerAchievementListResponse [Maybe PlayerAchievement] +palrItems + = lens _palrItems (\ s a -> s{_palrItems = a}) . + _Default + . _Coerce + +instance FromJSON PlayerAchievementListResponse where + parseJSON + = withObject "PlayerAchievementListResponse" + (\ o -> + PlayerAchievementListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "games#playerAchievementListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PlayerAchievementListResponse where + toJSON PlayerAchievementListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _palrNextPageToken, + Just ("kind" .= _palrKind), + ("items" .=) <$> _palrItems]) + +-- | This is a JSON template for an achievement set steps at least response. +-- +-- /See:/ 'achievementSetStepsAtLeastResponse' smart constructor. +data AchievementSetStepsAtLeastResponse = AchievementSetStepsAtLeastResponse + { _assalrKind :: !Text + , _assalrNewlyUnlocked :: !(Maybe Bool) + , _assalrCurrentSteps :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementSetStepsAtLeastResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assalrKind' +-- +-- * 'assalrNewlyUnlocked' +-- +-- * 'assalrCurrentSteps' +achievementSetStepsAtLeastResponse + :: AchievementSetStepsAtLeastResponse +achievementSetStepsAtLeastResponse = + AchievementSetStepsAtLeastResponse + { _assalrKind = "games#achievementSetStepsAtLeastResponse" + , _assalrNewlyUnlocked = Nothing + , _assalrCurrentSteps = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementSetStepsAtLeastResponse. +assalrKind :: Lens' AchievementSetStepsAtLeastResponse Text +assalrKind + = lens _assalrKind (\ s a -> s{_assalrKind = a}) + +-- | Whether the the current steps for the achievement has reached the number +-- of steps required to unlock. +assalrNewlyUnlocked :: Lens' AchievementSetStepsAtLeastResponse (Maybe Bool) +assalrNewlyUnlocked + = lens _assalrNewlyUnlocked + (\ s a -> s{_assalrNewlyUnlocked = a}) + +-- | The current steps recorded for this incremental achievement. +assalrCurrentSteps :: Lens' AchievementSetStepsAtLeastResponse (Maybe Int32) +assalrCurrentSteps + = lens _assalrCurrentSteps + (\ s a -> s{_assalrCurrentSteps = a}) + +instance FromJSON AchievementSetStepsAtLeastResponse + where + parseJSON + = withObject "AchievementSetStepsAtLeastResponse" + (\ o -> + AchievementSetStepsAtLeastResponse <$> + (o .:? "kind" .!= + "games#achievementSetStepsAtLeastResponse") + <*> (o .:? "newlyUnlocked") + <*> (o .:? "currentSteps")) + +instance ToJSON AchievementSetStepsAtLeastResponse + where + toJSON AchievementSetStepsAtLeastResponse{..} + = object + (catMaybes + [Just ("kind" .= _assalrKind), + ("newlyUnlocked" .=) <$> _assalrNewlyUnlocked, + ("currentSteps" .=) <$> _assalrCurrentSteps]) + +-- | This is a JSON template for a batch update failure resource. +-- +-- /See:/ 'eventBatchRecordFailure' smart constructor. +data EventBatchRecordFailure = EventBatchRecordFailure + { _ebrfKind :: !Text + , _ebrfRange :: !(Maybe (Maybe EventPeriodRange)) + , _ebrfFailureCause :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventBatchRecordFailure' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ebrfKind' +-- +-- * 'ebrfRange' +-- +-- * 'ebrfFailureCause' +eventBatchRecordFailure + :: EventBatchRecordFailure +eventBatchRecordFailure = + EventBatchRecordFailure + { _ebrfKind = "games#eventBatchRecordFailure" + , _ebrfRange = Nothing + , _ebrfFailureCause = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventBatchRecordFailure. +ebrfKind :: Lens' EventBatchRecordFailure Text +ebrfKind = lens _ebrfKind (\ s a -> s{_ebrfKind = a}) + +-- | The time range which was rejected; empty for a request-wide failure. +ebrfRange :: Lens' EventBatchRecordFailure (Maybe (Maybe EventPeriodRange)) +ebrfRange + = lens _ebrfRange (\ s a -> s{_ebrfRange = a}) + +-- | The cause for the update failure. Possible values are: - \"TOO_LARGE\": +-- A batch request was issued with more events than are allowed in a single +-- batch. - \"TIME_PERIOD_EXPIRED\": A batch was sent with data too far in +-- the past to record. - \"TIME_PERIOD_SHORT\": A batch was sent with a +-- time range that was too short. - \"TIME_PERIOD_LONG\": A batch was sent +-- with a time range that was too long. - \"ALREADY_UPDATED\": An attempt +-- was made to record a batch of data which was already seen. - +-- \"RECORD_RATE_HIGH\": An attempt was made to record data faster than the +-- server will apply updates. +ebrfFailureCause :: Lens' EventBatchRecordFailure (Maybe Text) +ebrfFailureCause + = lens _ebrfFailureCause + (\ s a -> s{_ebrfFailureCause = a}) + +instance FromJSON EventBatchRecordFailure where + parseJSON + = withObject "EventBatchRecordFailure" + (\ o -> + EventBatchRecordFailure <$> + (o .:? "kind" .!= "games#eventBatchRecordFailure") + <*> (o .:? "range") + <*> (o .:? "failureCause")) + +instance ToJSON EventBatchRecordFailure where + toJSON EventBatchRecordFailure{..} + = object + (catMaybes + [Just ("kind" .= _ebrfKind), + ("range" .=) <$> _ebrfRange, + ("failureCause" .=) <$> _ebrfFailureCause]) + +-- | This is a JSON template for a turn-based match results object. +-- +-- /See:/ 'turnBasedMatchResults' smart constructor. +data TurnBasedMatchResults = TurnBasedMatchResults + { _tbmrResults :: !(Maybe [Maybe ParticipantResult]) + , _tbmrKind :: !Text + , _tbmrData :: !(Maybe (Maybe TurnBasedMatchDataRequest)) + , _tbmrMatchVersion :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchResults' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmrResults' +-- +-- * 'tbmrKind' +-- +-- * 'tbmrData' +-- +-- * 'tbmrMatchVersion' +turnBasedMatchResults + :: TurnBasedMatchResults +turnBasedMatchResults = + TurnBasedMatchResults + { _tbmrResults = Nothing + , _tbmrKind = "games#turnBasedMatchResults" + , _tbmrData = Nothing + , _tbmrMatchVersion = Nothing + } + +-- | The match results for the participants in the match. +tbmrResults :: Lens' TurnBasedMatchResults [Maybe ParticipantResult] +tbmrResults + = lens _tbmrResults (\ s a -> s{_tbmrResults = a}) . + _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchResults. +tbmrKind :: Lens' TurnBasedMatchResults Text +tbmrKind = lens _tbmrKind (\ s a -> s{_tbmrKind = a}) + +-- | The final match data. +tbmrData :: Lens' TurnBasedMatchResults (Maybe (Maybe TurnBasedMatchDataRequest)) +tbmrData = lens _tbmrData (\ s a -> s{_tbmrData = a}) + +-- | The version of the match being updated. +tbmrMatchVersion :: Lens' TurnBasedMatchResults (Maybe Int32) +tbmrMatchVersion + = lens _tbmrMatchVersion + (\ s a -> s{_tbmrMatchVersion = a}) + +instance FromJSON TurnBasedMatchResults where + parseJSON + = withObject "TurnBasedMatchResults" + (\ o -> + TurnBasedMatchResults <$> + (o .:? "results" .!= mempty) <*> + (o .:? "kind" .!= "games#turnBasedMatchResults") + <*> (o .:? "data") + <*> (o .:? "matchVersion")) + +instance ToJSON TurnBasedMatchResults where + toJSON TurnBasedMatchResults{..} + = object + (catMaybes + [("results" .=) <$> _tbmrResults, + Just ("kind" .= _tbmrKind), + ("data" .=) <$> _tbmrData, + ("matchVersion" .=) <$> _tbmrMatchVersion]) + +-- | This is a JSON template for a leave room request. +-- +-- /See:/ 'roomLeaveRequest' smart constructor. +data RoomLeaveRequest = RoomLeaveRequest + { _rlrKind :: !Text + , _rlrReason :: !(Maybe Text) + , _rlrLeaveDiagnostics :: !(Maybe (Maybe RoomLeaveDiagnostics)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomLeaveRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlrKind' +-- +-- * 'rlrReason' +-- +-- * 'rlrLeaveDiagnostics' +roomLeaveRequest + :: RoomLeaveRequest +roomLeaveRequest = + RoomLeaveRequest + { _rlrKind = "games#roomLeaveRequest" + , _rlrReason = Nothing + , _rlrLeaveDiagnostics = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomLeaveRequest. +rlrKind :: Lens' RoomLeaveRequest Text +rlrKind = lens _rlrKind (\ s a -> s{_rlrKind = a}) + +-- | Reason for leaving the match. Possible values are: - \"PLAYER_LEFT\" - +-- The player chose to leave the room.. - \"GAME_LEFT\" - The game chose to +-- remove the player from the room. - \"REALTIME_ABANDONED\" - The player +-- switched to another application and abandoned the room. - +-- \"REALTIME_PEER_CONNECTION_FAILURE\" - The client was unable to +-- establish a connection to other peer(s). - +-- \"REALTIME_SERVER_CONNECTION_FAILURE\" - The client was unable to +-- communicate with the server. - \"REALTIME_SERVER_ERROR\" - The client +-- received an error response when it tried to communicate with the server. +-- - \"REALTIME_TIMEOUT\" - The client timed out while waiting for a room. +-- - \"REALTIME_CLIENT_DISCONNECTING\" - The client disconnects without +-- first calling Leave. - \"REALTIME_SIGN_OUT\" - The user signed out of G+ +-- while in the room. - \"REALTIME_GAME_CRASHED\" - The game crashed. - +-- \"REALTIME_ROOM_SERVICE_CRASHED\" - RoomAndroidService crashed. - +-- \"REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION\" - Another client is trying +-- to enter a room. - \"REALTIME_SAME_CLIENT_ROOM_OPERATION\" - The same +-- client is trying to enter a new room. +rlrReason :: Lens' RoomLeaveRequest (Maybe Text) +rlrReason + = lens _rlrReason (\ s a -> s{_rlrReason = a}) + +-- | Diagnostics for a player leaving the room. +rlrLeaveDiagnostics :: Lens' RoomLeaveRequest (Maybe (Maybe RoomLeaveDiagnostics)) +rlrLeaveDiagnostics + = lens _rlrLeaveDiagnostics + (\ s a -> s{_rlrLeaveDiagnostics = a}) + +instance FromJSON RoomLeaveRequest where + parseJSON + = withObject "RoomLeaveRequest" + (\ o -> + RoomLeaveRequest <$> + (o .:? "kind" .!= "games#roomLeaveRequest") <*> + (o .:? "reason") + <*> (o .:? "leaveDiagnostics")) + +instance ToJSON RoomLeaveRequest where + toJSON RoomLeaveRequest{..} + = object + (catMaybes + [Just ("kind" .= _rlrKind), + ("reason" .=) <$> _rlrReason, + ("leaveDiagnostics" .=) <$> _rlrLeaveDiagnostics]) + +-- | This is a JSON template for an achievement increment response +-- +-- /See:/ 'achievementIncrementResponse' smart constructor. +data AchievementIncrementResponse = AchievementIncrementResponse + { _airKind :: !Text + , _airNewlyUnlocked :: !(Maybe Bool) + , _airCurrentSteps :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementIncrementResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'airKind' +-- +-- * 'airNewlyUnlocked' +-- +-- * 'airCurrentSteps' +achievementIncrementResponse + :: AchievementIncrementResponse +achievementIncrementResponse = + AchievementIncrementResponse + { _airKind = "games#achievementIncrementResponse" + , _airNewlyUnlocked = Nothing + , _airCurrentSteps = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementIncrementResponse. +airKind :: Lens' AchievementIncrementResponse Text +airKind = lens _airKind (\ s a -> s{_airKind = a}) + +-- | Whether the the current steps for the achievement has reached the number +-- of steps required to unlock. +airNewlyUnlocked :: Lens' AchievementIncrementResponse (Maybe Bool) +airNewlyUnlocked + = lens _airNewlyUnlocked + (\ s a -> s{_airNewlyUnlocked = a}) + +-- | The current steps recorded for this incremental achievement. +airCurrentSteps :: Lens' AchievementIncrementResponse (Maybe Int32) +airCurrentSteps + = lens _airCurrentSteps + (\ s a -> s{_airCurrentSteps = a}) + +instance FromJSON AchievementIncrementResponse where + parseJSON + = withObject "AchievementIncrementResponse" + (\ o -> + AchievementIncrementResponse <$> + (o .:? "kind" .!= + "games#achievementIncrementResponse") + <*> (o .:? "newlyUnlocked") + <*> (o .:? "currentSteps")) + +instance ToJSON AchievementIncrementResponse where + toJSON AchievementIncrementResponse{..} + = object + (catMaybes + [Just ("kind" .= _airKind), + ("newlyUnlocked" .=) <$> _airNewlyUnlocked, + ("currentSteps" .=) <$> _airCurrentSteps]) + +-- | This is a JSON template for an achievement reveal response +-- +-- /See:/ 'achievementRevealResponse' smart constructor. +data AchievementRevealResponse = AchievementRevealResponse + { _arrKind :: !Text + , _arrCurrentState :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementRevealResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arrKind' +-- +-- * 'arrCurrentState' +achievementRevealResponse + :: AchievementRevealResponse +achievementRevealResponse = + AchievementRevealResponse + { _arrKind = "games#achievementRevealResponse" + , _arrCurrentState = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#achievementRevealResponse. +arrKind :: Lens' AchievementRevealResponse Text +arrKind = lens _arrKind (\ s a -> s{_arrKind = a}) + +-- | The current state of the achievement for which a reveal was attempted. +-- This might be UNLOCKED if the achievement was already unlocked. Possible +-- values are: - \"REVEALED\" - Achievement is revealed. - \"UNLOCKED\" - +-- Achievement is unlocked. +arrCurrentState :: Lens' AchievementRevealResponse (Maybe Text) +arrCurrentState + = lens _arrCurrentState + (\ s a -> s{_arrCurrentState = a}) + +instance FromJSON AchievementRevealResponse where + parseJSON + = withObject "AchievementRevealResponse" + (\ o -> + AchievementRevealResponse <$> + (o .:? "kind" .!= "games#achievementRevealResponse") + <*> (o .:? "currentState")) + +instance ToJSON AchievementRevealResponse where + toJSON AchievementRevealResponse{..} + = object + (catMaybes + [Just ("kind" .= _arrKind), + ("currentState" .=) <$> _arrCurrentState]) + +-- | This is a JSON template for metadata about a player playing a game with +-- the currently authenticated user. +-- +-- /See:/ 'played' smart constructor. +data Played = Played + { _pKind :: !Text + , _pAutoMatched :: !(Maybe Bool) + , _pTimeMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Played' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKind' +-- +-- * 'pAutoMatched' +-- +-- * 'pTimeMillis' +played + :: Played +played = + Played + { _pKind = "games#played" + , _pAutoMatched = Nothing + , _pTimeMillis = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#played. +pKind :: Lens' Played Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | True if the player was auto-matched with the currently authenticated +-- user. +pAutoMatched :: Lens' Played (Maybe Bool) +pAutoMatched + = lens _pAutoMatched (\ s a -> s{_pAutoMatched = a}) + +-- | The last time the player played the game in milliseconds since the epoch +-- in UTC. +pTimeMillis :: Lens' Played (Maybe Int64) +pTimeMillis + = lens _pTimeMillis (\ s a -> s{_pTimeMillis = a}) + +instance FromJSON Played where + parseJSON + = withObject "Played" + (\ o -> + Played <$> + (o .:? "kind" .!= "games#played") <*> + (o .:? "autoMatched") + <*> (o .:? "timeMillis")) + +instance ToJSON Played where + toJSON Played{..} + = object + (catMaybes + [Just ("kind" .= _pKind), + ("autoMatched" .=) <$> _pAutoMatched, + ("timeMillis" .=) <$> _pTimeMillis]) + +-- | This is a JSON template for a room auto-match criteria object. +-- +-- /See:/ 'roomAutoMatchingCriteria' smart constructor. +data RoomAutoMatchingCriteria = RoomAutoMatchingCriteria + { _ramcKind :: !Text + , _ramcExclusiveBitmask :: !(Maybe Int64) + , _ramcMaxAutoMatchingPlayers :: !(Maybe Int32) + , _ramcMinAutoMatchingPlayers :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomAutoMatchingCriteria' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ramcKind' +-- +-- * 'ramcExclusiveBitmask' +-- +-- * 'ramcMaxAutoMatchingPlayers' +-- +-- * 'ramcMinAutoMatchingPlayers' +roomAutoMatchingCriteria + :: RoomAutoMatchingCriteria +roomAutoMatchingCriteria = + RoomAutoMatchingCriteria + { _ramcKind = "games#roomAutoMatchingCriteria" + , _ramcExclusiveBitmask = Nothing + , _ramcMaxAutoMatchingPlayers = Nothing + , _ramcMinAutoMatchingPlayers = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomAutoMatchingCriteria. +ramcKind :: Lens' RoomAutoMatchingCriteria Text +ramcKind = lens _ramcKind (\ s a -> s{_ramcKind = a}) + +-- | A bitmask indicating when auto-matches are valid. When ANDed with other +-- exclusive bitmasks, the result must be zero. Can be used to support +-- exclusive roles within a game. +ramcExclusiveBitmask :: Lens' RoomAutoMatchingCriteria (Maybe Int64) +ramcExclusiveBitmask + = lens _ramcExclusiveBitmask + (\ s a -> s{_ramcExclusiveBitmask = a}) + +-- | The maximum number of players that should be added to the room by +-- auto-matching. +ramcMaxAutoMatchingPlayers :: Lens' RoomAutoMatchingCriteria (Maybe Int32) +ramcMaxAutoMatchingPlayers + = lens _ramcMaxAutoMatchingPlayers + (\ s a -> s{_ramcMaxAutoMatchingPlayers = a}) + +-- | The minimum number of players that should be added to the room by +-- auto-matching. +ramcMinAutoMatchingPlayers :: Lens' RoomAutoMatchingCriteria (Maybe Int32) +ramcMinAutoMatchingPlayers + = lens _ramcMinAutoMatchingPlayers + (\ s a -> s{_ramcMinAutoMatchingPlayers = a}) + +instance FromJSON RoomAutoMatchingCriteria where + parseJSON + = withObject "RoomAutoMatchingCriteria" + (\ o -> + RoomAutoMatchingCriteria <$> + (o .:? "kind" .!= "games#roomAutoMatchingCriteria") + <*> (o .:? "exclusiveBitmask") + <*> (o .:? "maxAutoMatchingPlayers") + <*> (o .:? "minAutoMatchingPlayers")) + +instance ToJSON RoomAutoMatchingCriteria where + toJSON RoomAutoMatchingCriteria{..} + = object + (catMaybes + [Just ("kind" .= _ramcKind), + ("exclusiveBitmask" .=) <$> _ramcExclusiveBitmask, + ("maxAutoMatchingPlayers" .=) <$> + _ramcMaxAutoMatchingPlayers, + ("minAutoMatchingPlayers" .=) <$> + _ramcMinAutoMatchingPlayers]) + +-- | This is a JSON template for aggregate stats. +-- +-- /See:/ 'aggregateStats' smart constructor. +data AggregateStats = AggregateStats + { _asMax :: !(Maybe Int64) + , _asKind :: !Text + , _asCount :: !(Maybe Int64) + , _asMin :: !(Maybe Int64) + , _asSum :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregateStats' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asMax' +-- +-- * 'asKind' +-- +-- * 'asCount' +-- +-- * 'asMin' +-- +-- * 'asSum' +aggregateStats + :: AggregateStats +aggregateStats = + AggregateStats + { _asMax = Nothing + , _asKind = "games#aggregateStats" + , _asCount = Nothing + , _asMin = Nothing + , _asSum = Nothing + } + +-- | The maximum amount. +asMax :: Lens' AggregateStats (Maybe Int64) +asMax = lens _asMax (\ s a -> s{_asMax = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#aggregateStats. +asKind :: Lens' AggregateStats Text +asKind = lens _asKind (\ s a -> s{_asKind = a}) + +-- | The number of messages sent between a pair of peers. +asCount :: Lens' AggregateStats (Maybe Int64) +asCount = lens _asCount (\ s a -> s{_asCount = a}) + +-- | The minimum amount. +asMin :: Lens' AggregateStats (Maybe Int64) +asMin = lens _asMin (\ s a -> s{_asMin = a}) + +-- | The total number of bytes sent for messages between a pair of peers. +asSum :: Lens' AggregateStats (Maybe Int64) +asSum = lens _asSum (\ s a -> s{_asSum = a}) + +instance FromJSON AggregateStats where + parseJSON + = withObject "AggregateStats" + (\ o -> + AggregateStats <$> + (o .:? "max") <*> + (o .:? "kind" .!= "games#aggregateStats") + <*> (o .:? "count") + <*> (o .:? "min") + <*> (o .:? "sum")) + +instance ToJSON AggregateStats where + toJSON AggregateStats{..} + = object + (catMaybes + [("max" .=) <$> _asMax, Just ("kind" .= _asKind), + ("count" .=) <$> _asCount, ("min" .=) <$> _asMin, + ("sum" .=) <$> _asSum]) + +-- | This is a JSON template for room leave diagnostics. +-- +-- /See:/ 'roomLeaveDiagnostics' smart constructor. +data RoomLeaveDiagnostics = RoomLeaveDiagnostics + { _rldPeerSession :: !(Maybe [Maybe PeerSessionDiagnostics]) + , _rldAndroidNetworkType :: !(Maybe Int32) + , _rldKind :: !Text + , _rldNetworkOperatorCode :: !(Maybe Text) + , _rldNetworkOperatorName :: !(Maybe Text) + , _rldSocketsUsed :: !(Maybe Bool) + , _rldIosNetworkType :: !(Maybe Int32) + , _rldAndroidNetworkSubtype :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomLeaveDiagnostics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rldPeerSession' +-- +-- * 'rldAndroidNetworkType' +-- +-- * 'rldKind' +-- +-- * 'rldNetworkOperatorCode' +-- +-- * 'rldNetworkOperatorName' +-- +-- * 'rldSocketsUsed' +-- +-- * 'rldIosNetworkType' +-- +-- * 'rldAndroidNetworkSubtype' +roomLeaveDiagnostics + :: RoomLeaveDiagnostics +roomLeaveDiagnostics = + RoomLeaveDiagnostics + { _rldPeerSession = Nothing + , _rldAndroidNetworkType = Nothing + , _rldKind = "games#roomLeaveDiagnostics" + , _rldNetworkOperatorCode = Nothing + , _rldNetworkOperatorName = Nothing + , _rldSocketsUsed = Nothing + , _rldIosNetworkType = Nothing + , _rldAndroidNetworkSubtype = Nothing + } + +-- | Diagnostics about all peer sessions. +rldPeerSession :: Lens' RoomLeaveDiagnostics [Maybe PeerSessionDiagnostics] +rldPeerSession + = lens _rldPeerSession + (\ s a -> s{_rldPeerSession = a}) + . _Default + . _Coerce + +-- | Android network type. +-- http:\/\/developer.android.com\/reference\/android\/net\/NetworkInfo.html#getType() +rldAndroidNetworkType :: Lens' RoomLeaveDiagnostics (Maybe Int32) +rldAndroidNetworkType + = lens _rldAndroidNetworkType + (\ s a -> s{_rldAndroidNetworkType = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#roomLeaveDiagnostics. +rldKind :: Lens' RoomLeaveDiagnostics Text +rldKind = lens _rldKind (\ s a -> s{_rldKind = a}) + +-- | The MCC+MNC code for the client\'s network connection. On Android: +-- http:\/\/developer.android.com\/reference\/android\/telephony\/TelephonyManager.html#getNetworkOperator() +-- On iOS, see: +-- https:\/\/developer.apple.com\/library\/ios\/documentation\/NetworkingInternet\/Reference\/CTCarrier\/Reference\/Reference.html +rldNetworkOperatorCode :: Lens' RoomLeaveDiagnostics (Maybe Text) +rldNetworkOperatorCode + = lens _rldNetworkOperatorCode + (\ s a -> s{_rldNetworkOperatorCode = a}) + +-- | The name of the carrier of the client\'s network connection. On Android: +-- http:\/\/developer.android.com\/reference\/android\/telephony\/TelephonyManager.html#getNetworkOperatorName() +-- On iOS: +-- https:\/\/developer.apple.com\/library\/ios\/documentation\/NetworkingInternet\/Reference\/CTCarrier\/Reference\/Reference.html#\/\/apple_ref\/occ\/instp\/CTCarrier\/carrierName +rldNetworkOperatorName :: Lens' RoomLeaveDiagnostics (Maybe Text) +rldNetworkOperatorName + = lens _rldNetworkOperatorName + (\ s a -> s{_rldNetworkOperatorName = a}) + +-- | Whether or not sockets were used. +rldSocketsUsed :: Lens' RoomLeaveDiagnostics (Maybe Bool) +rldSocketsUsed + = lens _rldSocketsUsed + (\ s a -> s{_rldSocketsUsed = a}) + +-- | iOS network type as defined in Reachability.h. +rldIosNetworkType :: Lens' RoomLeaveDiagnostics (Maybe Int32) +rldIosNetworkType + = lens _rldIosNetworkType + (\ s a -> s{_rldIosNetworkType = a}) + +-- | Android network subtype. +-- http:\/\/developer.android.com\/reference\/android\/net\/NetworkInfo.html#getSubtype() +rldAndroidNetworkSubtype :: Lens' RoomLeaveDiagnostics (Maybe Int32) +rldAndroidNetworkSubtype + = lens _rldAndroidNetworkSubtype + (\ s a -> s{_rldAndroidNetworkSubtype = a}) + +instance FromJSON RoomLeaveDiagnostics where + parseJSON + = withObject "RoomLeaveDiagnostics" + (\ o -> + RoomLeaveDiagnostics <$> + (o .:? "peerSession" .!= mempty) <*> + (o .:? "androidNetworkType") + <*> (o .:? "kind" .!= "games#roomLeaveDiagnostics") + <*> (o .:? "networkOperatorCode") + <*> (o .:? "networkOperatorName") + <*> (o .:? "socketsUsed") + <*> (o .:? "iosNetworkType") + <*> (o .:? "androidNetworkSubtype")) + +instance ToJSON RoomLeaveDiagnostics where + toJSON RoomLeaveDiagnostics{..} + = object + (catMaybes + [("peerSession" .=) <$> _rldPeerSession, + ("androidNetworkType" .=) <$> _rldAndroidNetworkType, + Just ("kind" .= _rldKind), + ("networkOperatorCode" .=) <$> + _rldNetworkOperatorCode, + ("networkOperatorName" .=) <$> + _rldNetworkOperatorName, + ("socketsUsed" .=) <$> _rldSocketsUsed, + ("iosNetworkType" .=) <$> _rldIosNetworkType, + ("androidNetworkSubtype" .=) <$> + _rldAndroidNetworkSubtype]) + +-- | This is a JSON template for a list of turn-based matches returned from a +-- sync. +-- +-- /See:/ 'turnBasedMatchSync' smart constructor. +data TurnBasedMatchSync = TurnBasedMatchSync + { _tbmsMoreAvailable :: !(Maybe Bool) + , _tbmsNextPageToken :: !(Maybe Text) + , _tbmsKind :: !Text + , _tbmsItems :: !(Maybe [Maybe TurnBasedMatch]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchSync' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmsMoreAvailable' +-- +-- * 'tbmsNextPageToken' +-- +-- * 'tbmsKind' +-- +-- * 'tbmsItems' +turnBasedMatchSync + :: TurnBasedMatchSync +turnBasedMatchSync = + TurnBasedMatchSync + { _tbmsMoreAvailable = Nothing + , _tbmsNextPageToken = Nothing + , _tbmsKind = "games#turnBasedMatchSync" + , _tbmsItems = Nothing + } + +-- | True if there were more matches available to fetch at the time the +-- response was generated (which were not returned due to page size +-- limits.) +tbmsMoreAvailable :: Lens' TurnBasedMatchSync (Maybe Bool) +tbmsMoreAvailable + = lens _tbmsMoreAvailable + (\ s a -> s{_tbmsMoreAvailable = a}) + +-- | The pagination token for the next page of results. +tbmsNextPageToken :: Lens' TurnBasedMatchSync (Maybe Text) +tbmsNextPageToken + = lens _tbmsNextPageToken + (\ s a -> s{_tbmsNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchSync. +tbmsKind :: Lens' TurnBasedMatchSync Text +tbmsKind = lens _tbmsKind (\ s a -> s{_tbmsKind = a}) + +-- | The matches. +tbmsItems :: Lens' TurnBasedMatchSync [Maybe TurnBasedMatch] +tbmsItems + = lens _tbmsItems (\ s a -> s{_tbmsItems = a}) . + _Default + . _Coerce + +instance FromJSON TurnBasedMatchSync where + parseJSON + = withObject "TurnBasedMatchSync" + (\ o -> + TurnBasedMatchSync <$> + (o .:? "moreAvailable") <*> (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "games#turnBasedMatchSync") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TurnBasedMatchSync where + toJSON TurnBasedMatchSync{..} + = object + (catMaybes + [("moreAvailable" .=) <$> _tbmsMoreAvailable, + ("nextPageToken" .=) <$> _tbmsNextPageToken, + Just ("kind" .= _tbmsKind), + ("items" .=) <$> _tbmsItems]) + +-- | This is a JSON template for a Quest Milestone resource. +-- +-- /See:/ 'questMilestone' smart constructor. +data QuestMilestone = QuestMilestone + { _qmState :: !(Maybe Text) + , _qmKind :: !Text + , _qmId :: !(Maybe Text) + , _qmCompletionRewardData :: !(Maybe Word8) + , _qmCriteria :: !(Maybe [Maybe QuestCriterion]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestMilestone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qmState' +-- +-- * 'qmKind' +-- +-- * 'qmId' +-- +-- * 'qmCompletionRewardData' +-- +-- * 'qmCriteria' +questMilestone + :: QuestMilestone +questMilestone = + QuestMilestone + { _qmState = Nothing + , _qmKind = "games#questMilestone" + , _qmId = Nothing + , _qmCompletionRewardData = Nothing + , _qmCriteria = Nothing + } + +-- | The current state of the milestone. Possible values are: - +-- \"COMPLETED_NOT_CLAIMED\" - The milestone is complete, but has not yet +-- been claimed. - \"CLAIMED\" - The milestone is complete and has been +-- claimed. - \"NOT_COMPLETED\" - The milestone has not yet been completed. +-- - \"NOT_STARTED\" - The milestone is for a quest that has not yet been +-- accepted. +qmState :: Lens' QuestMilestone (Maybe Text) +qmState = lens _qmState (\ s a -> s{_qmState = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#questMilestone. +qmKind :: Lens' QuestMilestone Text +qmKind = lens _qmKind (\ s a -> s{_qmKind = a}) + +-- | The milestone ID. +qmId :: Lens' QuestMilestone (Maybe Text) +qmId = lens _qmId (\ s a -> s{_qmId = a}) + +-- | The completion reward data of the milestone, represented as a +-- Base64-encoded string. This is a developer-specified binary blob with +-- size between 0 and 2 KB before encoding. +qmCompletionRewardData :: Lens' QuestMilestone (Maybe Word8) +qmCompletionRewardData + = lens _qmCompletionRewardData + (\ s a -> s{_qmCompletionRewardData = a}) + +-- | The criteria of the milestone. +qmCriteria :: Lens' QuestMilestone [Maybe QuestCriterion] +qmCriteria + = lens _qmCriteria (\ s a -> s{_qmCriteria = a}) . + _Default + . _Coerce + +instance FromJSON QuestMilestone where + parseJSON + = withObject "QuestMilestone" + (\ o -> + QuestMilestone <$> + (o .:? "state") <*> + (o .:? "kind" .!= "games#questMilestone") + <*> (o .:? "id") + <*> (o .:? "completionRewardData") + <*> (o .:? "criteria" .!= mempty)) + +instance ToJSON QuestMilestone where + toJSON QuestMilestone{..} + = object + (catMaybes + [("state" .=) <$> _qmState, Just ("kind" .= _qmKind), + ("id" .=) <$> _qmId, + ("completionRewardData" .=) <$> + _qmCompletionRewardData, + ("criteria" .=) <$> _qmCriteria]) + +-- | This is a JSON template for a push token ID resource. +-- +-- /See:/ 'pushTokenId' smart constructor. +data PushTokenId = PushTokenId + { _ptiIos :: !(Maybe PushTokenIdIos) + , _ptiKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PushTokenId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptiIos' +-- +-- * 'ptiKind' +pushTokenId + :: PushTokenId +pushTokenId = + PushTokenId + { _ptiIos = Nothing + , _ptiKind = "games#pushTokenId" + } + +-- | A push token ID for iOS devices. +ptiIos :: Lens' PushTokenId (Maybe PushTokenIdIos) +ptiIos = lens _ptiIos (\ s a -> s{_ptiIos = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#pushTokenId. +ptiKind :: Lens' PushTokenId Text +ptiKind = lens _ptiKind (\ s a -> s{_ptiKind = a}) + +instance FromJSON PushTokenId where + parseJSON + = withObject "PushTokenId" + (\ o -> + PushTokenId <$> + (o .:? "ios") <*> + (o .:? "kind" .!= "games#pushTokenId")) + +instance ToJSON PushTokenId where + toJSON PushTokenId{..} + = object + (catMaybes + [("ios" .=) <$> _ptiIos, Just ("kind" .= _ptiKind)]) + +-- | This is a JSON template for an event period update resource. +-- +-- /See:/ 'eventRecordRequest' smart constructor. +data EventRecordRequest = EventRecordRequest + { _errRequestId :: !(Maybe Int64) + , _errKind :: !Text + , _errCurrentTimeMillis :: !(Maybe Int64) + , _errTimePeriods :: !(Maybe [Maybe EventPeriodUpdate]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventRecordRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'errRequestId' +-- +-- * 'errKind' +-- +-- * 'errCurrentTimeMillis' +-- +-- * 'errTimePeriods' +eventRecordRequest + :: EventRecordRequest +eventRecordRequest = + EventRecordRequest + { _errRequestId = Nothing + , _errKind = "games#eventRecordRequest" + , _errCurrentTimeMillis = Nothing + , _errTimePeriods = Nothing + } + +-- | The request ID used to identify this attempt to record events. +errRequestId :: Lens' EventRecordRequest (Maybe Int64) +errRequestId + = lens _errRequestId (\ s a -> s{_errRequestId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventRecordRequest. +errKind :: Lens' EventRecordRequest Text +errKind = lens _errKind (\ s a -> s{_errKind = a}) + +-- | The current time when this update was sent, in milliseconds, since 1970 +-- UTC (Unix Epoch). +errCurrentTimeMillis :: Lens' EventRecordRequest (Maybe Int64) +errCurrentTimeMillis + = lens _errCurrentTimeMillis + (\ s a -> s{_errCurrentTimeMillis = a}) + +-- | A list of the time period updates being made in this request. +errTimePeriods :: Lens' EventRecordRequest [Maybe EventPeriodUpdate] +errTimePeriods + = lens _errTimePeriods + (\ s a -> s{_errTimePeriods = a}) + . _Default + . _Coerce + +instance FromJSON EventRecordRequest where + parseJSON + = withObject "EventRecordRequest" + (\ o -> + EventRecordRequest <$> + (o .:? "requestId") <*> + (o .:? "kind" .!= "games#eventRecordRequest") + <*> (o .:? "currentTimeMillis") + <*> (o .:? "timePeriods" .!= mempty)) + +instance ToJSON EventRecordRequest where + toJSON EventRecordRequest{..} + = object + (catMaybes + [("requestId" .=) <$> _errRequestId, + Just ("kind" .= _errKind), + ("currentTimeMillis" .=) <$> _errCurrentTimeMillis, + ("timePeriods" .=) <$> _errTimePeriods]) + +-- | This is a JSON template for a request to submit a score to leaderboards. +-- +-- /See:/ 'scoreSubmission' smart constructor. +data ScoreSubmission = ScoreSubmission + { _ssSignature :: !(Maybe Text) + , _ssScoreTag :: !(Maybe Text) + , _ssScore :: !(Maybe Int64) + , _ssKind :: !Text + , _ssLeaderboardId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoreSubmission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssSignature' +-- +-- * 'ssScoreTag' +-- +-- * 'ssScore' +-- +-- * 'ssKind' +-- +-- * 'ssLeaderboardId' +scoreSubmission + :: ScoreSubmission +scoreSubmission = + ScoreSubmission + { _ssSignature = Nothing + , _ssScoreTag = Nothing + , _ssScore = Nothing + , _ssKind = "games#scoreSubmission" + , _ssLeaderboardId = Nothing + } + +-- | Signature Values will contain URI-safe characters as defined by section +-- 2.3 of RFC 3986. +ssSignature :: Lens' ScoreSubmission (Maybe Text) +ssSignature + = lens _ssSignature (\ s a -> s{_ssSignature = a}) + +-- | Additional information about this score. Values will contain no more +-- than 64 URI-safe characters as defined by section 2.3 of RFC 3986. +ssScoreTag :: Lens' ScoreSubmission (Maybe Text) +ssScoreTag + = lens _ssScoreTag (\ s a -> s{_ssScoreTag = a}) + +-- | The new score being submitted. +ssScore :: Lens' ScoreSubmission (Maybe Int64) +ssScore = lens _ssScore (\ s a -> s{_ssScore = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#scoreSubmission. +ssKind :: Lens' ScoreSubmission Text +ssKind = lens _ssKind (\ s a -> s{_ssKind = a}) + +-- | The leaderboard this score is being submitted to. +ssLeaderboardId :: Lens' ScoreSubmission (Maybe Text) +ssLeaderboardId + = lens _ssLeaderboardId + (\ s a -> s{_ssLeaderboardId = a}) + +instance FromJSON ScoreSubmission where + parseJSON + = withObject "ScoreSubmission" + (\ o -> + ScoreSubmission <$> + (o .:? "signature") <*> (o .:? "scoreTag") <*> + (o .:? "score") + <*> (o .:? "kind" .!= "games#scoreSubmission") + <*> (o .:? "leaderboardId")) + +instance ToJSON ScoreSubmission where + toJSON ScoreSubmission{..} + = object + (catMaybes + [("signature" .=) <$> _ssSignature, + ("scoreTag" .=) <$> _ssScoreTag, + ("score" .=) <$> _ssScore, Just ("kind" .= _ssKind), + ("leaderboardId" .=) <$> _ssLeaderboardId]) + +-- | This is a JSON template for peer session diagnostics. +-- +-- /See:/ 'peerSessionDiagnostics' smart constructor. +data PeerSessionDiagnostics = PeerSessionDiagnostics + { _psdConnectedTimestampMillis :: !(Maybe Int64) + , _psdParticipantId :: !(Maybe Text) + , _psdKind :: !Text + , _psdUnreliableChannel :: !(Maybe (Maybe PeerChannelDiagnostics)) + , _psdReliableChannel :: !(Maybe (Maybe PeerChannelDiagnostics)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeerSessionDiagnostics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psdConnectedTimestampMillis' +-- +-- * 'psdParticipantId' +-- +-- * 'psdKind' +-- +-- * 'psdUnreliableChannel' +-- +-- * 'psdReliableChannel' +peerSessionDiagnostics + :: PeerSessionDiagnostics +peerSessionDiagnostics = + PeerSessionDiagnostics + { _psdConnectedTimestampMillis = Nothing + , _psdParticipantId = Nothing + , _psdKind = "games#peerSessionDiagnostics" + , _psdUnreliableChannel = Nothing + , _psdReliableChannel = Nothing + } + +-- | Connected time in milliseconds. +psdConnectedTimestampMillis :: Lens' PeerSessionDiagnostics (Maybe Int64) +psdConnectedTimestampMillis + = lens _psdConnectedTimestampMillis + (\ s a -> s{_psdConnectedTimestampMillis = a}) + +-- | The participant ID of the peer. +psdParticipantId :: Lens' PeerSessionDiagnostics (Maybe Text) +psdParticipantId + = lens _psdParticipantId + (\ s a -> s{_psdParticipantId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#peerSessionDiagnostics. +psdKind :: Lens' PeerSessionDiagnostics Text +psdKind = lens _psdKind (\ s a -> s{_psdKind = a}) + +-- | Unreliable channel diagnostics. +psdUnreliableChannel :: Lens' PeerSessionDiagnostics (Maybe (Maybe PeerChannelDiagnostics)) +psdUnreliableChannel + = lens _psdUnreliableChannel + (\ s a -> s{_psdUnreliableChannel = a}) + +-- | Reliable channel diagnostics. +psdReliableChannel :: Lens' PeerSessionDiagnostics (Maybe (Maybe PeerChannelDiagnostics)) +psdReliableChannel + = lens _psdReliableChannel + (\ s a -> s{_psdReliableChannel = a}) + +instance FromJSON PeerSessionDiagnostics where + parseJSON + = withObject "PeerSessionDiagnostics" + (\ o -> + PeerSessionDiagnostics <$> + (o .:? "connectedTimestampMillis") <*> + (o .:? "participantId") + <*> (o .:? "kind" .!= "games#peerSessionDiagnostics") + <*> (o .:? "unreliableChannel") + <*> (o .:? "reliableChannel")) + +instance ToJSON PeerSessionDiagnostics where + toJSON PeerSessionDiagnostics{..} + = object + (catMaybes + [("connectedTimestampMillis" .=) <$> + _psdConnectedTimestampMillis, + ("participantId" .=) <$> _psdParticipantId, + Just ("kind" .= _psdKind), + ("unreliableChannel" .=) <$> _psdUnreliableChannel, + ("reliableChannel" .=) <$> _psdReliableChannel]) + +-- | This is a JSON template for an event period update resource. +-- +-- /See:/ 'eventPeriodUpdate' smart constructor. +data EventPeriodUpdate = EventPeriodUpdate + { _epuKind :: !Text + , _epuTimePeriod :: !(Maybe (Maybe EventPeriodRange)) + , _epuUpdates :: !(Maybe [Maybe EventUpdateRequest]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventPeriodUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'epuKind' +-- +-- * 'epuTimePeriod' +-- +-- * 'epuUpdates' +eventPeriodUpdate + :: EventPeriodUpdate +eventPeriodUpdate = + EventPeriodUpdate + { _epuKind = "games#eventPeriodUpdate" + , _epuTimePeriod = Nothing + , _epuUpdates = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventPeriodUpdate. +epuKind :: Lens' EventPeriodUpdate Text +epuKind = lens _epuKind (\ s a -> s{_epuKind = a}) + +-- | The time period being covered by this update. +epuTimePeriod :: Lens' EventPeriodUpdate (Maybe (Maybe EventPeriodRange)) +epuTimePeriod + = lens _epuTimePeriod + (\ s a -> s{_epuTimePeriod = a}) + +-- | The updates being made for this time period. +epuUpdates :: Lens' EventPeriodUpdate [Maybe EventUpdateRequest] +epuUpdates + = lens _epuUpdates (\ s a -> s{_epuUpdates = a}) . + _Default + . _Coerce + +instance FromJSON EventPeriodUpdate where + parseJSON + = withObject "EventPeriodUpdate" + (\ o -> + EventPeriodUpdate <$> + (o .:? "kind" .!= "games#eventPeriodUpdate") <*> + (o .:? "timePeriod") + <*> (o .:? "updates" .!= mempty)) + +instance ToJSON EventPeriodUpdate where + toJSON EventPeriodUpdate{..} + = object + (catMaybes + [Just ("kind" .= _epuKind), + ("timePeriod" .=) <$> _epuTimePeriod, + ("updates" .=) <$> _epuUpdates]) + +-- | This is a JSON template for the payload to request to increment an +-- achievement. +-- +-- /See:/ 'gamesAchievementIncrement' smart constructor. +data GamesAchievementIncrement = GamesAchievementIncrement + { _gaiRequestId :: !(Maybe Int64) + , _gaiKind :: !Text + , _gaiSteps :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesAchievementIncrement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gaiRequestId' +-- +-- * 'gaiKind' +-- +-- * 'gaiSteps' +gamesAchievementIncrement + :: GamesAchievementIncrement +gamesAchievementIncrement = + GamesAchievementIncrement + { _gaiRequestId = Nothing + , _gaiKind = "games#GamesAchievementIncrement" + , _gaiSteps = Nothing + } + +-- | The requestId associated with an increment to an achievement. +gaiRequestId :: Lens' GamesAchievementIncrement (Maybe Int64) +gaiRequestId + = lens _gaiRequestId (\ s a -> s{_gaiRequestId = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#GamesAchievementIncrement. +gaiKind :: Lens' GamesAchievementIncrement Text +gaiKind = lens _gaiKind (\ s a -> s{_gaiKind = a}) + +-- | The number of steps to be incremented. +gaiSteps :: Lens' GamesAchievementIncrement (Maybe Int32) +gaiSteps = lens _gaiSteps (\ s a -> s{_gaiSteps = a}) + +instance FromJSON GamesAchievementIncrement where + parseJSON + = withObject "GamesAchievementIncrement" + (\ o -> + GamesAchievementIncrement <$> + (o .:? "requestId") <*> + (o .:? "kind" .!= "games#GamesAchievementIncrement") + <*> (o .:? "steps")) + +instance ToJSON GamesAchievementIncrement where + toJSON GamesAchievementIncrement{..} + = object + (catMaybes + [("requestId" .=) <$> _gaiRequestId, + Just ("kind" .= _gaiKind), + ("steps" .=) <$> _gaiSteps]) + +-- | This is a JSON template for the payload to request to increment an +-- achievement. +-- +-- /See:/ 'gamesAchievementSetStepsAtLeast' smart constructor. +data GamesAchievementSetStepsAtLeast = GamesAchievementSetStepsAtLeast + { _gassalKind :: !Text + , _gassalSteps :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GamesAchievementSetStepsAtLeast' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gassalKind' +-- +-- * 'gassalSteps' +gamesAchievementSetStepsAtLeast + :: GamesAchievementSetStepsAtLeast +gamesAchievementSetStepsAtLeast = + GamesAchievementSetStepsAtLeast + { _gassalKind = "games#GamesAchievementSetStepsAtLeast" + , _gassalSteps = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#GamesAchievementSetStepsAtLeast. +gassalKind :: Lens' GamesAchievementSetStepsAtLeast Text +gassalKind + = lens _gassalKind (\ s a -> s{_gassalKind = a}) + +-- | The minimum number of steps for the achievement to be set to. +gassalSteps :: Lens' GamesAchievementSetStepsAtLeast (Maybe Int32) +gassalSteps + = lens _gassalSteps (\ s a -> s{_gassalSteps = a}) + +instance FromJSON GamesAchievementSetStepsAtLeast + where + parseJSON + = withObject "GamesAchievementSetStepsAtLeast" + (\ o -> + GamesAchievementSetStepsAtLeast <$> + (o .:? "kind" .!= + "games#GamesAchievementSetStepsAtLeast") + <*> (o .:? "steps")) + +instance ToJSON GamesAchievementSetStepsAtLeast where + toJSON GamesAchievementSetStepsAtLeast{..} + = object + (catMaybes + [Just ("kind" .= _gassalKind), + ("steps" .=) <$> _gassalSteps]) + +-- | This is a JSON template for 1P\/3P metadata about the player\'s +-- experience. +-- +-- /See:/ 'playerExperienceInfo' smart constructor. +data PlayerExperienceInfo = PlayerExperienceInfo + { _peiKind :: !Text + , _peiCurrentExperiencePoints :: !(Maybe Int64) + , _peiCurrentLevel :: !(Maybe (Maybe PlayerLevel)) + , _peiNextLevel :: !(Maybe (Maybe PlayerLevel)) + , _peiLastLevelUpTimestampMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerExperienceInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'peiKind' +-- +-- * 'peiCurrentExperiencePoints' +-- +-- * 'peiCurrentLevel' +-- +-- * 'peiNextLevel' +-- +-- * 'peiLastLevelUpTimestampMillis' +playerExperienceInfo + :: PlayerExperienceInfo +playerExperienceInfo = + PlayerExperienceInfo + { _peiKind = "games#playerExperienceInfo" + , _peiCurrentExperiencePoints = Nothing + , _peiCurrentLevel = Nothing + , _peiNextLevel = Nothing + , _peiLastLevelUpTimestampMillis = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerExperienceInfo. +peiKind :: Lens' PlayerExperienceInfo Text +peiKind = lens _peiKind (\ s a -> s{_peiKind = a}) + +-- | The current number of experience points for the player. +peiCurrentExperiencePoints :: Lens' PlayerExperienceInfo (Maybe Int64) +peiCurrentExperiencePoints + = lens _peiCurrentExperiencePoints + (\ s a -> s{_peiCurrentExperiencePoints = a}) + +-- | The current level of the player. +peiCurrentLevel :: Lens' PlayerExperienceInfo (Maybe (Maybe PlayerLevel)) +peiCurrentLevel + = lens _peiCurrentLevel + (\ s a -> s{_peiCurrentLevel = a}) + +-- | The next level of the player. If the current level is the maximum level, +-- this should be same as the current level. +peiNextLevel :: Lens' PlayerExperienceInfo (Maybe (Maybe PlayerLevel)) +peiNextLevel + = lens _peiNextLevel (\ s a -> s{_peiNextLevel = a}) + +-- | The timestamp when the player was leveled up, in millis since Unix epoch +-- UTC. +peiLastLevelUpTimestampMillis :: Lens' PlayerExperienceInfo (Maybe Int64) +peiLastLevelUpTimestampMillis + = lens _peiLastLevelUpTimestampMillis + (\ s a -> s{_peiLastLevelUpTimestampMillis = a}) + +instance FromJSON PlayerExperienceInfo where + parseJSON + = withObject "PlayerExperienceInfo" + (\ o -> + PlayerExperienceInfo <$> + (o .:? "kind" .!= "games#playerExperienceInfo") <*> + (o .:? "currentExperiencePoints") + <*> (o .:? "currentLevel") + <*> (o .:? "nextLevel") + <*> (o .:? "lastLevelUpTimestampMillis")) + +instance ToJSON PlayerExperienceInfo where + toJSON PlayerExperienceInfo{..} + = object + (catMaybes + [Just ("kind" .= _peiKind), + ("currentExperiencePoints" .=) <$> + _peiCurrentExperiencePoints, + ("currentLevel" .=) <$> _peiCurrentLevel, + ("nextLevel" .=) <$> _peiNextLevel, + ("lastLevelUpTimestampMillis" .=) <$> + _peiLastLevelUpTimestampMillis]) + +-- | This is a JSON template for a Player resource. +-- +-- /See:/ 'player' smart constructor. +data Player = Player + { _plaLastPlayedWith :: !(Maybe (Maybe Played)) + , _plaAvatarImageUrl :: !(Maybe Text) + , _plaKind :: !Text + , _plaExperienceInfo :: !(Maybe (Maybe PlayerExperienceInfo)) + , _plaName :: !(Maybe PlayerName) + , _plaDisplayName :: !(Maybe Text) + , _plaTitle :: !(Maybe Text) + , _plaPlayerId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Player' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaLastPlayedWith' +-- +-- * 'plaAvatarImageUrl' +-- +-- * 'plaKind' +-- +-- * 'plaExperienceInfo' +-- +-- * 'plaName' +-- +-- * 'plaDisplayName' +-- +-- * 'plaTitle' +-- +-- * 'plaPlayerId' +player + :: Player +player = + Player + { _plaLastPlayedWith = Nothing + , _plaAvatarImageUrl = Nothing + , _plaKind = "games#player" + , _plaExperienceInfo = Nothing + , _plaName = Nothing + , _plaDisplayName = Nothing + , _plaTitle = Nothing + , _plaPlayerId = Nothing + } + +-- | Details about the last time this player played a multiplayer game with +-- the currently authenticated player. Populated for PLAYED_WITH player +-- collection members. +plaLastPlayedWith :: Lens' Player (Maybe (Maybe Played)) +plaLastPlayedWith + = lens _plaLastPlayedWith + (\ s a -> s{_plaLastPlayedWith = a}) + +-- | The base URL for the image that represents the player. +plaAvatarImageUrl :: Lens' Player (Maybe Text) +plaAvatarImageUrl + = lens _plaAvatarImageUrl + (\ s a -> s{_plaAvatarImageUrl = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#player. +plaKind :: Lens' Player Text +plaKind = lens _plaKind (\ s a -> s{_plaKind = a}) + +-- | An object to represent Play Game experience information for the player. +plaExperienceInfo :: Lens' Player (Maybe (Maybe PlayerExperienceInfo)) +plaExperienceInfo + = lens _plaExperienceInfo + (\ s a -> s{_plaExperienceInfo = a}) + +-- | An object representation of the individual components of the player\'s +-- name. For some players, these fields may not be present. +plaName :: Lens' Player (Maybe PlayerName) +plaName = lens _plaName (\ s a -> s{_plaName = a}) + +-- | The name to display for the player. +plaDisplayName :: Lens' Player (Maybe Text) +plaDisplayName + = lens _plaDisplayName + (\ s a -> s{_plaDisplayName = a}) + +-- | The player\'s title rewarded for their game activities. +plaTitle :: Lens' Player (Maybe Text) +plaTitle = lens _plaTitle (\ s a -> s{_plaTitle = a}) + +-- | The ID of the player. +plaPlayerId :: Lens' Player (Maybe Text) +plaPlayerId + = lens _plaPlayerId (\ s a -> s{_plaPlayerId = a}) + +instance FromJSON Player where + parseJSON + = withObject "Player" + (\ o -> + Player <$> + (o .:? "lastPlayedWith") <*> (o .:? "avatarImageUrl") + <*> (o .:? "kind" .!= "games#player") + <*> (o .:? "experienceInfo") + <*> (o .:? "name") + <*> (o .:? "displayName") + <*> (o .:? "title") + <*> (o .:? "playerId")) + +instance ToJSON Player where + toJSON Player{..} + = object + (catMaybes + [("lastPlayedWith" .=) <$> _plaLastPlayedWith, + ("avatarImageUrl" .=) <$> _plaAvatarImageUrl, + Just ("kind" .= _plaKind), + ("experienceInfo" .=) <$> _plaExperienceInfo, + ("name" .=) <$> _plaName, + ("displayName" .=) <$> _plaDisplayName, + ("title" .=) <$> _plaTitle, + ("playerId" .=) <$> _plaPlayerId]) + +-- | This is a JSON template for a rematch response. +-- +-- /See:/ 'turnBasedMatchRematch' smart constructor. +data TurnBasedMatchRematch = TurnBasedMatchRematch + { _tRematch :: !(Maybe (Maybe TurnBasedMatch)) + , _tKind :: !Text + , _tPreviousMatch :: !(Maybe (Maybe TurnBasedMatch)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchRematch' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tRematch' +-- +-- * 'tKind' +-- +-- * 'tPreviousMatch' +turnBasedMatchRematch + :: TurnBasedMatchRematch +turnBasedMatchRematch = + TurnBasedMatchRematch + { _tRematch = Nothing + , _tKind = "games#turnBasedMatchRematch" + , _tPreviousMatch = Nothing + } + +-- | The newly created match; a rematch of the old match with the same +-- participants. +tRematch :: Lens' TurnBasedMatchRematch (Maybe (Maybe TurnBasedMatch)) +tRematch = lens _tRematch (\ s a -> s{_tRematch = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchRematch. +tKind :: Lens' TurnBasedMatchRematch Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | The old match that the rematch was created from; will be updated such +-- that the rematchId field will point at the new match. +tPreviousMatch :: Lens' TurnBasedMatchRematch (Maybe (Maybe TurnBasedMatch)) +tPreviousMatch + = lens _tPreviousMatch + (\ s a -> s{_tPreviousMatch = a}) + +instance FromJSON TurnBasedMatchRematch where + parseJSON + = withObject "TurnBasedMatchRematch" + (\ o -> + TurnBasedMatchRematch <$> + (o .:? "rematch") <*> + (o .:? "kind" .!= "games#turnBasedMatchRematch") + <*> (o .:? "previousMatch")) + +instance ToJSON TurnBasedMatchRematch where + toJSON TurnBasedMatchRematch{..} + = object + (catMaybes + [("rematch" .=) <$> _tRematch, + Just ("kind" .= _tKind), + ("previousMatch" .=) <$> _tPreviousMatch]) + +-- | This is a JSON template for the Web details resource. +-- +-- /See:/ 'instanceWebDetails' smart constructor. +data InstanceWebDetails = InstanceWebDetails + { _iwdPreferred :: !(Maybe Bool) + , _iwdKind :: !Text + , _iwdLaunchUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceWebDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iwdPreferred' +-- +-- * 'iwdKind' +-- +-- * 'iwdLaunchUrl' +instanceWebDetails + :: InstanceWebDetails +instanceWebDetails = + InstanceWebDetails + { _iwdPreferred = Nothing + , _iwdKind = "games#instanceWebDetails" + , _iwdLaunchUrl = Nothing + } + +-- | Indicates that this instance is the default for new installations. +iwdPreferred :: Lens' InstanceWebDetails (Maybe Bool) +iwdPreferred + = lens _iwdPreferred (\ s a -> s{_iwdPreferred = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#instanceWebDetails. +iwdKind :: Lens' InstanceWebDetails Text +iwdKind = lens _iwdKind (\ s a -> s{_iwdKind = a}) + +-- | Launch URL for the game. +iwdLaunchUrl :: Lens' InstanceWebDetails (Maybe Text) +iwdLaunchUrl + = lens _iwdLaunchUrl (\ s a -> s{_iwdLaunchUrl = a}) + +instance FromJSON InstanceWebDetails where + parseJSON + = withObject "InstanceWebDetails" + (\ o -> + InstanceWebDetails <$> + (o .:? "preferred") <*> + (o .:? "kind" .!= "games#instanceWebDetails") + <*> (o .:? "launchUrl")) + +instance ToJSON InstanceWebDetails where + toJSON InstanceWebDetails{..} + = object + (catMaybes + [("preferred" .=) <$> _iwdPreferred, + Just ("kind" .= _iwdKind), + ("launchUrl" .=) <$> _iwdLaunchUrl]) + +-- | This is a JSON template for an event child relationship resource. +-- +-- /See:/ 'eventChild' smart constructor. +data EventChild = EventChild + { _ecKind :: !Text + , _ecChildId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventChild' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ecKind' +-- +-- * 'ecChildId' +eventChild + :: EventChild +eventChild = + EventChild + { _ecKind = "games#eventChild" + , _ecChildId = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventChild. +ecKind :: Lens' EventChild Text +ecKind = lens _ecKind (\ s a -> s{_ecKind = a}) + +-- | The ID of the child event. +ecChildId :: Lens' EventChild (Maybe Text) +ecChildId + = lens _ecChildId (\ s a -> s{_ecChildId = a}) + +instance FromJSON EventChild where + parseJSON + = withObject "EventChild" + (\ o -> + EventChild <$> + (o .:? "kind" .!= "games#eventChild") <*> + (o .:? "childId")) + +instance ToJSON EventChild where + toJSON EventChild{..} + = object + (catMaybes + [Just ("kind" .= _ecKind), + ("childId" .=) <$> _ecChildId]) + +-- | This is a JSON template for sending a turn-based match data object. +-- +-- /See:/ 'turnBasedMatchDataRequest' smart constructor. +data TurnBasedMatchDataRequest = TurnBasedMatchDataRequest + { _tbmdrKind :: !Text + , _tbmdrData :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchDataRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmdrKind' +-- +-- * 'tbmdrData' +turnBasedMatchDataRequest + :: TurnBasedMatchDataRequest +turnBasedMatchDataRequest = + TurnBasedMatchDataRequest + { _tbmdrKind = "games#turnBasedMatchDataRequest" + , _tbmdrData = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#turnBasedMatchDataRequest. +tbmdrKind :: Lens' TurnBasedMatchDataRequest Text +tbmdrKind + = lens _tbmdrKind (\ s a -> s{_tbmdrKind = a}) + +-- | The byte representation of the data (limited to 128 kB), as a +-- Base64-encoded string with the URL_SAFE encoding option. +tbmdrData :: Lens' TurnBasedMatchDataRequest (Maybe Word8) +tbmdrData + = lens _tbmdrData (\ s a -> s{_tbmdrData = a}) + +instance FromJSON TurnBasedMatchDataRequest where + parseJSON + = withObject "TurnBasedMatchDataRequest" + (\ o -> + TurnBasedMatchDataRequest <$> + (o .:? "kind" .!= "games#turnBasedMatchDataRequest") + <*> (o .:? "data")) + +instance ToJSON TurnBasedMatchDataRequest where + toJSON TurnBasedMatchDataRequest{..} + = object + (catMaybes + [Just ("kind" .= _tbmdrKind), + ("data" .=) <$> _tbmdrData]) + +-- | This is a JSON template for a ListByPlayer response. +-- +-- /See:/ 'playerEventListResponse' smart constructor. +data PlayerEventListResponse = PlayerEventListResponse + { _pelrNextPageToken :: !(Maybe Text) + , _pelrKind :: !Text + , _pelrItems :: !(Maybe [Maybe PlayerEvent]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerEventListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pelrNextPageToken' +-- +-- * 'pelrKind' +-- +-- * 'pelrItems' +playerEventListResponse + :: PlayerEventListResponse +playerEventListResponse = + PlayerEventListResponse + { _pelrNextPageToken = Nothing + , _pelrKind = "games#playerEventListResponse" + , _pelrItems = Nothing + } + +-- | The pagination token for the next page of results. +pelrNextPageToken :: Lens' PlayerEventListResponse (Maybe Text) +pelrNextPageToken + = lens _pelrNextPageToken + (\ s a -> s{_pelrNextPageToken = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerEventListResponse. +pelrKind :: Lens' PlayerEventListResponse Text +pelrKind = lens _pelrKind (\ s a -> s{_pelrKind = a}) + +-- | The player events. +pelrItems :: Lens' PlayerEventListResponse [Maybe PlayerEvent] +pelrItems + = lens _pelrItems (\ s a -> s{_pelrItems = a}) . + _Default + . _Coerce + +instance FromJSON PlayerEventListResponse where + parseJSON + = withObject "PlayerEventListResponse" + (\ o -> + PlayerEventListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "games#playerEventListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON PlayerEventListResponse where + toJSON PlayerEventListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _pelrNextPageToken, + Just ("kind" .= _pelrKind), + ("items" .=) <$> _pelrItems]) + +-- | This is a JSON template for an event period time range. +-- +-- /See:/ 'eventPeriodRange' smart constructor. +data EventPeriodRange = EventPeriodRange + { _eprKind :: !Text + , _eprPeriodStartMillis :: !(Maybe Int64) + , _eprPeriodEndMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventPeriodRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eprKind' +-- +-- * 'eprPeriodStartMillis' +-- +-- * 'eprPeriodEndMillis' +eventPeriodRange + :: EventPeriodRange +eventPeriodRange = + EventPeriodRange + { _eprKind = "games#eventPeriodRange" + , _eprPeriodStartMillis = Nothing + , _eprPeriodEndMillis = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventPeriodRange. +eprKind :: Lens' EventPeriodRange Text +eprKind = lens _eprKind (\ s a -> s{_eprKind = a}) + +-- | The time when this update period begins, in millis, since 1970 UTC (Unix +-- Epoch). +eprPeriodStartMillis :: Lens' EventPeriodRange (Maybe Int64) +eprPeriodStartMillis + = lens _eprPeriodStartMillis + (\ s a -> s{_eprPeriodStartMillis = a}) + +-- | The time when this update period ends, in millis, since 1970 UTC (Unix +-- Epoch). +eprPeriodEndMillis :: Lens' EventPeriodRange (Maybe Int64) +eprPeriodEndMillis + = lens _eprPeriodEndMillis + (\ s a -> s{_eprPeriodEndMillis = a}) + +instance FromJSON EventPeriodRange where + parseJSON + = withObject "EventPeriodRange" + (\ o -> + EventPeriodRange <$> + (o .:? "kind" .!= "games#eventPeriodRange") <*> + (o .:? "periodStartMillis") + <*> (o .:? "periodEndMillis")) + +instance ToJSON EventPeriodRange where + toJSON EventPeriodRange{..} + = object + (catMaybes + [Just ("kind" .= _eprKind), + ("periodStartMillis" .=) <$> _eprPeriodStartMillis, + ("periodEndMillis" .=) <$> _eprPeriodEndMillis]) + +-- | This is a JSON template for a Quest resource. +-- +-- /See:/ 'quest' smart constructor. +data Quest = Quest + { _queLastUpdatedTimestampMillis :: !(Maybe Int64) + , _queBannerUrl :: !(Maybe Text) + , _queState :: !(Maybe Text) + , _queMilestones :: !(Maybe [Maybe QuestMilestone]) + , _queKind :: !Text + , _queApplicationId :: !(Maybe Text) + , _queEndTimestampMillis :: !(Maybe Int64) + , _queName :: !(Maybe Text) + , _queId :: !(Maybe Text) + , _queIconUrl :: !(Maybe Text) + , _queStartTimestampMillis :: !(Maybe Int64) + , _queNotifyTimestampMillis :: !(Maybe Int64) + , _queDescription :: !(Maybe Text) + , _queIsDefaultBannerUrl :: !(Maybe Bool) + , _queIsDefaultIconUrl :: !(Maybe Bool) + , _queAcceptedTimestampMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Quest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'queLastUpdatedTimestampMillis' +-- +-- * 'queBannerUrl' +-- +-- * 'queState' +-- +-- * 'queMilestones' +-- +-- * 'queKind' +-- +-- * 'queApplicationId' +-- +-- * 'queEndTimestampMillis' +-- +-- * 'queName' +-- +-- * 'queId' +-- +-- * 'queIconUrl' +-- +-- * 'queStartTimestampMillis' +-- +-- * 'queNotifyTimestampMillis' +-- +-- * 'queDescription' +-- +-- * 'queIsDefaultBannerUrl' +-- +-- * 'queIsDefaultIconUrl' +-- +-- * 'queAcceptedTimestampMillis' +quest + :: Quest +quest = + Quest + { _queLastUpdatedTimestampMillis = Nothing + , _queBannerUrl = Nothing + , _queState = Nothing + , _queMilestones = Nothing + , _queKind = "games#quest" + , _queApplicationId = Nothing + , _queEndTimestampMillis = Nothing + , _queName = Nothing + , _queId = Nothing + , _queIconUrl = Nothing + , _queStartTimestampMillis = Nothing + , _queNotifyTimestampMillis = Nothing + , _queDescription = Nothing + , _queIsDefaultBannerUrl = Nothing + , _queIsDefaultIconUrl = Nothing + , _queAcceptedTimestampMillis = Nothing + } + +-- | The timestamp at which the quest was last updated by the user in +-- milliseconds since the epoch in UTC. Only present if the player has +-- accepted the quest. +queLastUpdatedTimestampMillis :: Lens' Quest (Maybe Int64) +queLastUpdatedTimestampMillis + = lens _queLastUpdatedTimestampMillis + (\ s a -> s{_queLastUpdatedTimestampMillis = a}) + +-- | The banner image URL for the quest. +queBannerUrl :: Lens' Quest (Maybe Text) +queBannerUrl + = lens _queBannerUrl (\ s a -> s{_queBannerUrl = a}) + +-- | The state of the quest. Possible values are: - \"UPCOMING\": The quest +-- is upcoming. The user can see the quest, but cannot accept it until it +-- is open. - \"OPEN\": The quest is currently open and may be accepted at +-- this time. - \"ACCEPTED\": The user is currently participating in this +-- quest. - \"COMPLETED\": The user has completed the quest. - \"FAILED\": +-- The quest was attempted but was not completed before the deadline +-- expired. - \"EXPIRED\": The quest has expired and was not accepted. - +-- \"DELETED\": The quest should be deleted from the local database. +queState :: Lens' Quest (Maybe Text) +queState = lens _queState (\ s a -> s{_queState = a}) + +-- | The quest milestones. +queMilestones :: Lens' Quest [Maybe QuestMilestone] +queMilestones + = lens _queMilestones + (\ s a -> s{_queMilestones = a}) + . _Default + . _Coerce + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#quest. +queKind :: Lens' Quest Text +queKind = lens _queKind (\ s a -> s{_queKind = a}) + +-- | The ID of the application this quest is part of. +queApplicationId :: Lens' Quest (Maybe Text) +queApplicationId + = lens _queApplicationId + (\ s a -> s{_queApplicationId = a}) + +-- | The timestamp at which the quest ceases to be active in milliseconds +-- since the epoch in UTC. +queEndTimestampMillis :: Lens' Quest (Maybe Int64) +queEndTimestampMillis + = lens _queEndTimestampMillis + (\ s a -> s{_queEndTimestampMillis = a}) + +-- | The name of the quest. +queName :: Lens' Quest (Maybe Text) +queName = lens _queName (\ s a -> s{_queName = a}) + +-- | The ID of the quest. +queId :: Lens' Quest (Maybe Text) +queId = lens _queId (\ s a -> s{_queId = a}) + +-- | The icon image URL for the quest. +queIconUrl :: Lens' Quest (Maybe Text) +queIconUrl + = lens _queIconUrl (\ s a -> s{_queIconUrl = a}) + +-- | The timestamp at which the quest becomes active in milliseconds since +-- the epoch in UTC. +queStartTimestampMillis :: Lens' Quest (Maybe Int64) +queStartTimestampMillis + = lens _queStartTimestampMillis + (\ s a -> s{_queStartTimestampMillis = a}) + +-- | The timestamp at which the user should be notified that the quest will +-- end soon in milliseconds since the epoch in UTC. +queNotifyTimestampMillis :: Lens' Quest (Maybe Int64) +queNotifyTimestampMillis + = lens _queNotifyTimestampMillis + (\ s a -> s{_queNotifyTimestampMillis = a}) + +-- | The description of the quest. +queDescription :: Lens' Quest (Maybe Text) +queDescription + = lens _queDescription + (\ s a -> s{_queDescription = a}) + +-- | Indicates whether the banner image being returned is a default image, or +-- is game-provided. +queIsDefaultBannerUrl :: Lens' Quest (Maybe Bool) +queIsDefaultBannerUrl + = lens _queIsDefaultBannerUrl + (\ s a -> s{_queIsDefaultBannerUrl = a}) + +-- | Indicates whether the icon image being returned is a default image, or +-- is game-provided. +queIsDefaultIconUrl :: Lens' Quest (Maybe Bool) +queIsDefaultIconUrl + = lens _queIsDefaultIconUrl + (\ s a -> s{_queIsDefaultIconUrl = a}) + +-- | The timestamp at which the user accepted the quest in milliseconds since +-- the epoch in UTC. Only present if the player has accepted the quest. +queAcceptedTimestampMillis :: Lens' Quest (Maybe Int64) +queAcceptedTimestampMillis + = lens _queAcceptedTimestampMillis + (\ s a -> s{_queAcceptedTimestampMillis = a}) + +instance FromJSON Quest where + parseJSON + = withObject "Quest" + (\ o -> + Quest <$> + (o .:? "lastUpdatedTimestampMillis") <*> + (o .:? "bannerUrl") + <*> (o .:? "state") + <*> (o .:? "milestones" .!= mempty) + <*> (o .:? "kind" .!= "games#quest") + <*> (o .:? "applicationId") + <*> (o .:? "endTimestampMillis") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "iconUrl") + <*> (o .:? "startTimestampMillis") + <*> (o .:? "notifyTimestampMillis") + <*> (o .:? "description") + <*> (o .:? "isDefaultBannerUrl") + <*> (o .:? "isDefaultIconUrl") + <*> (o .:? "acceptedTimestampMillis")) + +instance ToJSON Quest where + toJSON Quest{..} + = object + (catMaybes + [("lastUpdatedTimestampMillis" .=) <$> + _queLastUpdatedTimestampMillis, + ("bannerUrl" .=) <$> _queBannerUrl, + ("state" .=) <$> _queState, + ("milestones" .=) <$> _queMilestones, + Just ("kind" .= _queKind), + ("applicationId" .=) <$> _queApplicationId, + ("endTimestampMillis" .=) <$> _queEndTimestampMillis, + ("name" .=) <$> _queName, ("id" .=) <$> _queId, + ("iconUrl" .=) <$> _queIconUrl, + ("startTimestampMillis" .=) <$> + _queStartTimestampMillis, + ("notifyTimestampMillis" .=) <$> + _queNotifyTimestampMillis, + ("description" .=) <$> _queDescription, + ("isDefaultBannerUrl" .=) <$> _queIsDefaultBannerUrl, + ("isDefaultIconUrl" .=) <$> _queIsDefaultIconUrl, + ("acceptedTimestampMillis" .=) <$> + _queAcceptedTimestampMillis]) + +-- | This is a JSON template for an event update failure resource. +-- +-- /See:/ 'eventRecordFailure' smart constructor. +data EventRecordFailure = EventRecordFailure + { _erfKind :: !Text + , _erfFailureCause :: !(Maybe Text) + , _erfEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventRecordFailure' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erfKind' +-- +-- * 'erfFailureCause' +-- +-- * 'erfEventId' +eventRecordFailure + :: EventRecordFailure +eventRecordFailure = + EventRecordFailure + { _erfKind = "games#eventRecordFailure" + , _erfFailureCause = Nothing + , _erfEventId = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#eventRecordFailure. +erfKind :: Lens' EventRecordFailure Text +erfKind = lens _erfKind (\ s a -> s{_erfKind = a}) + +-- | The cause for the update failure. Possible values are: - \"NOT_FOUND\" - +-- An attempt was made to set an event that was not defined. - +-- \"INVALID_UPDATE_VALUE\" - An attempt was made to increment an event by +-- a non-positive value. +erfFailureCause :: Lens' EventRecordFailure (Maybe Text) +erfFailureCause + = lens _erfFailureCause + (\ s a -> s{_erfFailureCause = a}) + +-- | The ID of the event that was not updated. +erfEventId :: Lens' EventRecordFailure (Maybe Text) +erfEventId + = lens _erfEventId (\ s a -> s{_erfEventId = a}) + +instance FromJSON EventRecordFailure where + parseJSON + = withObject "EventRecordFailure" + (\ o -> + EventRecordFailure <$> + (o .:? "kind" .!= "games#eventRecordFailure") <*> + (o .:? "failureCause") + <*> (o .:? "eventId")) + +instance ToJSON EventRecordFailure where + toJSON EventRecordFailure{..} + = object + (catMaybes + [Just ("kind" .= _erfKind), + ("failureCause" .=) <$> _erfFailureCause, + ("eventId" .=) <$> _erfEventId]) + +-- | This is a JSON template for the Instance resource. +-- +-- /See:/ 'instance'' smart constructor. +data Instance = Instance + { _iAndroidInstance :: !(Maybe (Maybe InstanceAndroidDetails)) + , _iKind :: !Text + , _iWebInstance :: !(Maybe (Maybe InstanceWebDetails)) + , _iIosInstance :: !(Maybe (Maybe InstanceIosDetails)) + , _iName :: !(Maybe Text) + , _iAcquisitionUri :: !(Maybe Text) + , _iPlatformType :: !(Maybe Text) + , _iTurnBasedPlay :: !(Maybe Bool) + , _iRealtimePlay :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Instance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iAndroidInstance' +-- +-- * 'iKind' +-- +-- * 'iWebInstance' +-- +-- * 'iIosInstance' +-- +-- * 'iName' +-- +-- * 'iAcquisitionUri' +-- +-- * 'iPlatformType' +-- +-- * 'iTurnBasedPlay' +-- +-- * 'iRealtimePlay' +instance' + :: Instance +instance' = + Instance + { _iAndroidInstance = Nothing + , _iKind = "games#instance" + , _iWebInstance = Nothing + , _iIosInstance = Nothing + , _iName = Nothing + , _iAcquisitionUri = Nothing + , _iPlatformType = Nothing + , _iTurnBasedPlay = Nothing + , _iRealtimePlay = Nothing + } + +-- | Platform dependent details for Android. +iAndroidInstance :: Lens' Instance (Maybe (Maybe InstanceAndroidDetails)) +iAndroidInstance + = lens _iAndroidInstance + (\ s a -> s{_iAndroidInstance = a}) + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#instance. +iKind :: Lens' Instance Text +iKind = lens _iKind (\ s a -> s{_iKind = a}) + +-- | Platform dependent details for Web. +iWebInstance :: Lens' Instance (Maybe (Maybe InstanceWebDetails)) +iWebInstance + = lens _iWebInstance (\ s a -> s{_iWebInstance = a}) + +-- | Platform dependent details for iOS. +iIosInstance :: Lens' Instance (Maybe (Maybe InstanceIosDetails)) +iIosInstance + = lens _iIosInstance (\ s a -> s{_iIosInstance = a}) + +-- | Localized display name. +iName :: Lens' Instance (Maybe Text) +iName = lens _iName (\ s a -> s{_iName = a}) + +-- | URI which shows where a user can acquire this instance. +iAcquisitionUri :: Lens' Instance (Maybe Text) +iAcquisitionUri + = lens _iAcquisitionUri + (\ s a -> s{_iAcquisitionUri = a}) + +-- | The platform type. Possible values are: - \"ANDROID\" - Instance is for +-- Android. - \"IOS\" - Instance is for iOS - \"WEB_APP\" - Instance is for +-- Web App. +iPlatformType :: Lens' Instance (Maybe Text) +iPlatformType + = lens _iPlatformType + (\ s a -> s{_iPlatformType = a}) + +-- | Flag to show if this game instance supports turn based play. +iTurnBasedPlay :: Lens' Instance (Maybe Bool) +iTurnBasedPlay + = lens _iTurnBasedPlay + (\ s a -> s{_iTurnBasedPlay = a}) + +-- | Flag to show if this game instance supports realtime play. +iRealtimePlay :: Lens' Instance (Maybe Bool) +iRealtimePlay + = lens _iRealtimePlay + (\ s a -> s{_iRealtimePlay = a}) + +instance FromJSON Instance where + parseJSON + = withObject "Instance" + (\ o -> + Instance <$> + (o .:? "androidInstance") <*> + (o .:? "kind" .!= "games#instance") + <*> (o .:? "webInstance") + <*> (o .:? "iosInstance") + <*> (o .:? "name") + <*> (o .:? "acquisitionUri") + <*> (o .:? "platformType") + <*> (o .:? "turnBasedPlay") + <*> (o .:? "realtimePlay")) + +instance ToJSON Instance where + toJSON Instance{..} + = object + (catMaybes + [("androidInstance" .=) <$> _iAndroidInstance, + Just ("kind" .= _iKind), + ("webInstance" .=) <$> _iWebInstance, + ("iosInstance" .=) <$> _iIosInstance, + ("name" .=) <$> _iName, + ("acquisitionUri" .=) <$> _iAcquisitionUri, + ("platformType" .=) <$> _iPlatformType, + ("turnBasedPlay" .=) <$> _iTurnBasedPlay, + ("realtimePlay" .=) <$> _iRealtimePlay]) + +-- | This is a JSON template for a list of score submission requests +-- +-- /See:/ 'playerScoreSubmissionList' smart constructor. +data PlayerScoreSubmissionList = PlayerScoreSubmissionList + { _psslKind :: !Text + , _psslScores :: !(Maybe [Maybe ScoreSubmission]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayerScoreSubmissionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psslKind' +-- +-- * 'psslScores' +playerScoreSubmissionList + :: PlayerScoreSubmissionList +playerScoreSubmissionList = + PlayerScoreSubmissionList + { _psslKind = "games#playerScoreSubmissionList" + , _psslScores = Nothing + } + +-- | Uniquely identifies the type of this resource. Value is always the fixed +-- string games#playerScoreSubmissionList. +psslKind :: Lens' PlayerScoreSubmissionList Text +psslKind = lens _psslKind (\ s a -> s{_psslKind = a}) + +-- | The score submissions. +psslScores :: Lens' PlayerScoreSubmissionList [Maybe ScoreSubmission] +psslScores + = lens _psslScores (\ s a -> s{_psslScores = a}) . + _Default + . _Coerce + +instance FromJSON PlayerScoreSubmissionList where + parseJSON + = withObject "PlayerScoreSubmissionList" + (\ o -> + PlayerScoreSubmissionList <$> + (o .:? "kind" .!= "games#playerScoreSubmissionList") + <*> (o .:? "scores" .!= mempty)) + +instance ToJSON PlayerScoreSubmissionList where + toJSON PlayerScoreSubmissionList{..} + = object + (catMaybes + [Just ("kind" .= _psslKind), + ("scores" .=) <$> _psslScores]) diff --git a/gogol-games/gen/Network/Google/Games/Types/Sum.hs b/gogol-games/gen/Network/Google/Games/Types/Sum.hs new file mode 100644 index 000000000..472bb95ba --- /dev/null +++ b/gogol-games/gen/Network/Google/Games/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Games.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Games.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-games/gen/Network/Google/Resource/Games/AchievementDefinitions/List.hs b/gogol-games/gen/Network/Google/Resource/Games/AchievementDefinitions/List.hs new file mode 100644 index 000000000..7f12e4de0 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/AchievementDefinitions/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.AchievementDefinitions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the achievement definitions for your application. +-- +-- /See:/ for @GamesAchievementDefinitionsList@. +module Games.AchievementDefinitions.List + ( + -- * REST Resource + AchievementDefinitionsListAPI + + -- * Creating a Request + , achievementDefinitionsList + , AchievementDefinitionsList + + -- * Request Lenses + , adlQuotaUser + , adlPrettyPrint + , adlUserIp + , adlKey + , adlLanguage + , adlPageToken + , adlOauthToken + , adlMaxResults + , adlFields + , adlAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementDefinitionsList@ which the +-- 'AchievementDefinitionsList' request conforms to. +type AchievementDefinitionsListAPI = + "achievements" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] AchievementDefinitionsListResponse + +-- | Lists all the achievement definitions for your application. +-- +-- /See:/ 'achievementDefinitionsList' smart constructor. +data AchievementDefinitionsList = AchievementDefinitionsList + { _adlQuotaUser :: !(Maybe Text) + , _adlPrettyPrint :: !Bool + , _adlUserIp :: !(Maybe Text) + , _adlKey :: !(Maybe Text) + , _adlLanguage :: !(Maybe Text) + , _adlPageToken :: !(Maybe Text) + , _adlOauthToken :: !(Maybe Text) + , _adlMaxResults :: !(Maybe Int32) + , _adlFields :: !(Maybe Text) + , _adlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementDefinitionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adlQuotaUser' +-- +-- * 'adlPrettyPrint' +-- +-- * 'adlUserIp' +-- +-- * 'adlKey' +-- +-- * 'adlLanguage' +-- +-- * 'adlPageToken' +-- +-- * 'adlOauthToken' +-- +-- * 'adlMaxResults' +-- +-- * 'adlFields' +-- +-- * 'adlAlt' +achievementDefinitionsList + :: AchievementDefinitionsList +achievementDefinitionsList = + AchievementDefinitionsList + { _adlQuotaUser = Nothing + , _adlPrettyPrint = True + , _adlUserIp = Nothing + , _adlKey = Nothing + , _adlLanguage = Nothing + , _adlPageToken = Nothing + , _adlOauthToken = Nothing + , _adlMaxResults = Nothing + , _adlFields = Nothing + , _adlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adlQuotaUser :: Lens' AchievementDefinitionsList' (Maybe Text) +adlQuotaUser + = lens _adlQuotaUser (\ s a -> s{_adlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adlPrettyPrint :: Lens' AchievementDefinitionsList' Bool +adlPrettyPrint + = lens _adlPrettyPrint + (\ s a -> s{_adlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adlUserIp :: Lens' AchievementDefinitionsList' (Maybe Text) +adlUserIp + = lens _adlUserIp (\ s a -> s{_adlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adlKey :: Lens' AchievementDefinitionsList' (Maybe Text) +adlKey = lens _adlKey (\ s a -> s{_adlKey = a}) + +-- | The preferred language to use for strings returned by this method. +adlLanguage :: Lens' AchievementDefinitionsList' (Maybe Text) +adlLanguage + = lens _adlLanguage (\ s a -> s{_adlLanguage = a}) + +-- | The token returned by the previous request. +adlPageToken :: Lens' AchievementDefinitionsList' (Maybe Text) +adlPageToken + = lens _adlPageToken (\ s a -> s{_adlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +adlOauthToken :: Lens' AchievementDefinitionsList' (Maybe Text) +adlOauthToken + = lens _adlOauthToken + (\ s a -> s{_adlOauthToken = a}) + +-- | The maximum number of achievement resources to return in the response, +-- used for paging. For any response, the actual number of achievement +-- resources returned may be less than the specified maxResults. +adlMaxResults :: Lens' AchievementDefinitionsList' (Maybe Int32) +adlMaxResults + = lens _adlMaxResults + (\ s a -> s{_adlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +adlFields :: Lens' AchievementDefinitionsList' (Maybe Text) +adlFields + = lens _adlFields (\ s a -> s{_adlFields = a}) + +-- | Data format for the response. +adlAlt :: Lens' AchievementDefinitionsList' Text +adlAlt = lens _adlAlt (\ s a -> s{_adlAlt = a}) + +instance GoogleRequest AchievementDefinitionsList' + where + type Rs AchievementDefinitionsList' = + AchievementDefinitionsListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementDefinitionsList{..} + = go _adlQuotaUser _adlPrettyPrint _adlUserIp _adlKey + _adlLanguage + _adlPageToken + _adlOauthToken + _adlMaxResults + _adlFields + _adlAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementDefinitionsListAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/Increment.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Increment.hs new file mode 100644 index 000000000..d97fc859c --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Increment.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.Increment +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Increments the steps of the achievement with the given ID for the +-- currently authenticated player. +-- +-- /See:/ for @GamesAchievementsIncrement@. +module Games.Achievements.Increment + ( + -- * REST Resource + AchievementsIncrementAPI + + -- * Creating a Request + , achievementsIncrement + , AchievementsIncrement + + -- * Request Lenses + , aiRequestId + , aiQuotaUser + , aiPrettyPrint + , aiAchievementId + , aiUserIp + , aiKey + , aiOauthToken + , aiStepsToIncrement + , aiFields + , aiAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsIncrement@ which the +-- 'AchievementsIncrement' request conforms to. +type AchievementsIncrementAPI = + "achievements" :> + Capture "achievementId" Text :> + "increment" :> + QueryParam "requestId" Int64 :> + QueryParam "stepsToIncrement" Int32 :> + Post '[JSON] AchievementIncrementResponse + +-- | Increments the steps of the achievement with the given ID for the +-- currently authenticated player. +-- +-- /See:/ 'achievementsIncrement' smart constructor. +data AchievementsIncrement = AchievementsIncrement + { _aiRequestId :: !(Maybe Int64) + , _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiAchievementId :: !Text + , _aiUserIp :: !(Maybe Text) + , _aiKey :: !(Maybe Text) + , _aiOauthToken :: !(Maybe Text) + , _aiStepsToIncrement :: !Int32 + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsIncrement'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiRequestId' +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiAchievementId' +-- +-- * 'aiUserIp' +-- +-- * 'aiKey' +-- +-- * 'aiOauthToken' +-- +-- * 'aiStepsToIncrement' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +achievementsIncrement + :: Text -- ^ 'achievementId' + -> Int32 -- ^ 'stepsToIncrement' + -> AchievementsIncrement +achievementsIncrement pAiAchievementId_ pAiStepsToIncrement_ = + AchievementsIncrement + { _aiRequestId = Nothing + , _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiAchievementId = pAiAchievementId_ + , _aiUserIp = Nothing + , _aiKey = Nothing + , _aiOauthToken = Nothing + , _aiStepsToIncrement = pAiStepsToIncrement_ + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | A randomly generated numeric ID for each request specified by the +-- caller. This number is used at the server to ensure that the request is +-- handled correctly across retries. +aiRequestId :: Lens' AchievementsIncrement' (Maybe Int64) +aiRequestId + = lens _aiRequestId (\ s a -> s{_aiRequestId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' AchievementsIncrement' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' AchievementsIncrement' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +aiAchievementId :: Lens' AchievementsIncrement' Text +aiAchievementId + = lens _aiAchievementId + (\ s a -> s{_aiAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' AchievementsIncrement' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' AchievementsIncrement' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' AchievementsIncrement' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | The number of steps to increment. +aiStepsToIncrement :: Lens' AchievementsIncrement' Int32 +aiStepsToIncrement + = lens _aiStepsToIncrement + (\ s a -> s{_aiStepsToIncrement = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' AchievementsIncrement' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' AchievementsIncrement' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest AchievementsIncrement' where + type Rs AchievementsIncrement' = + AchievementIncrementResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsIncrement{..} + = go _aiRequestId _aiQuotaUser _aiPrettyPrint + _aiAchievementId + _aiUserIp + _aiKey + _aiOauthToken + (Just _aiStepsToIncrement) + _aiFields + _aiAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsIncrementAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/List.hs new file mode 100644 index 000000000..ad0d8d1c8 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/List.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the progress for all your application\'s achievements for the +-- currently authenticated player. +-- +-- /See:/ for @GamesAchievementsList@. +module Games.Achievements.List + ( + -- * REST Resource + AchievementsListAPI + + -- * Creating a Request + , achievementsList + , AchievementsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alState + , alUserIp + , alKey + , alLanguage + , alPageToken + , alOauthToken + , alPlayerId + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsList@ which the +-- 'AchievementsList' request conforms to. +type AchievementsListAPI = + "players" :> + Capture "playerId" Text :> + "achievements" :> + QueryParam "state" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] PlayerAchievementListResponse + +-- | Lists the progress for all your application\'s achievements for the +-- currently authenticated player. +-- +-- /See:/ 'achievementsList' smart constructor. +data AchievementsList = AchievementsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alState :: !(Maybe Text) + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alLanguage :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alPlayerId :: !Text + , _alMaxResults :: !(Maybe Int32) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alState' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alLanguage' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alPlayerId' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +achievementsList + :: Text -- ^ 'playerId' + -> AchievementsList +achievementsList pAlPlayerId_ = + AchievementsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alState = Nothing + , _alUserIp = Nothing + , _alKey = Nothing + , _alLanguage = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alPlayerId = pAlPlayerId_ + , _alMaxResults = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AchievementsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AchievementsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Tells the server to return only achievements with the specified state. +-- If this parameter isn\'t specified, all achievements are returned. +alState :: Lens' AchievementsList' (Maybe Text) +alState = lens _alState (\ s a -> s{_alState = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AchievementsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AchievementsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | The preferred language to use for strings returned by this method. +alLanguage :: Lens' AchievementsList' (Maybe Text) +alLanguage + = lens _alLanguage (\ s a -> s{_alLanguage = a}) + +-- | The token returned by the previous request. +alPageToken :: Lens' AchievementsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AchievementsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +alPlayerId :: Lens' AchievementsList' Text +alPlayerId + = lens _alPlayerId (\ s a -> s{_alPlayerId = a}) + +-- | The maximum number of achievement resources to return in the response, +-- used for paging. For any response, the actual number of achievement +-- resources returned may be less than the specified maxResults. +alMaxResults :: Lens' AchievementsList' (Maybe Int32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AchievementsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AchievementsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AchievementsList' where + type Rs AchievementsList' = + PlayerAchievementListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsList{..} + = go _alQuotaUser _alPrettyPrint _alState _alUserIp + _alKey + _alLanguage + _alPageToken + _alOauthToken + _alPlayerId + _alMaxResults + _alFields + _alAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsListAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/Reveal.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Reveal.hs new file mode 100644 index 000000000..bf0806b5a --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Reveal.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.Reveal +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the state of the achievement with the given ID to REVEALED for the +-- currently authenticated player. +-- +-- /See:/ for @GamesAchievementsReveal@. +module Games.Achievements.Reveal + ( + -- * REST Resource + AchievementsRevealAPI + + -- * Creating a Request + , achievementsReveal + , AchievementsReveal + + -- * Request Lenses + , arQuotaUser + , arPrettyPrint + , arAchievementId + , arUserIp + , arKey + , arOauthToken + , arFields + , arAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsReveal@ which the +-- 'AchievementsReveal' request conforms to. +type AchievementsRevealAPI = + "achievements" :> + Capture "achievementId" Text :> + "reveal" :> Post '[JSON] AchievementRevealResponse + +-- | Sets the state of the achievement with the given ID to REVEALED for the +-- currently authenticated player. +-- +-- /See:/ 'achievementsReveal' smart constructor. +data AchievementsReveal = AchievementsReveal + { _arQuotaUser :: !(Maybe Text) + , _arPrettyPrint :: !Bool + , _arAchievementId :: !Text + , _arUserIp :: !(Maybe Text) + , _arKey :: !(Maybe Text) + , _arOauthToken :: !(Maybe Text) + , _arFields :: !(Maybe Text) + , _arAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsReveal'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arQuotaUser' +-- +-- * 'arPrettyPrint' +-- +-- * 'arAchievementId' +-- +-- * 'arUserIp' +-- +-- * 'arKey' +-- +-- * 'arOauthToken' +-- +-- * 'arFields' +-- +-- * 'arAlt' +achievementsReveal + :: Text -- ^ 'achievementId' + -> AchievementsReveal +achievementsReveal pArAchievementId_ = + AchievementsReveal + { _arQuotaUser = Nothing + , _arPrettyPrint = True + , _arAchievementId = pArAchievementId_ + , _arUserIp = Nothing + , _arKey = Nothing + , _arOauthToken = Nothing + , _arFields = Nothing + , _arAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +arQuotaUser :: Lens' AchievementsReveal' (Maybe Text) +arQuotaUser + = lens _arQuotaUser (\ s a -> s{_arQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +arPrettyPrint :: Lens' AchievementsReveal' Bool +arPrettyPrint + = lens _arPrettyPrint + (\ s a -> s{_arPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +arAchievementId :: Lens' AchievementsReveal' Text +arAchievementId + = lens _arAchievementId + (\ s a -> s{_arAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +arUserIp :: Lens' AchievementsReveal' (Maybe Text) +arUserIp = lens _arUserIp (\ s a -> s{_arUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +arKey :: Lens' AchievementsReveal' (Maybe Text) +arKey = lens _arKey (\ s a -> s{_arKey = a}) + +-- | OAuth 2.0 token for the current user. +arOauthToken :: Lens' AchievementsReveal' (Maybe Text) +arOauthToken + = lens _arOauthToken (\ s a -> s{_arOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +arFields :: Lens' AchievementsReveal' (Maybe Text) +arFields = lens _arFields (\ s a -> s{_arFields = a}) + +-- | Data format for the response. +arAlt :: Lens' AchievementsReveal' Text +arAlt = lens _arAlt (\ s a -> s{_arAlt = a}) + +instance GoogleRequest AchievementsReveal' where + type Rs AchievementsReveal' = + AchievementRevealResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsReveal{..} + = go _arQuotaUser _arPrettyPrint _arAchievementId + _arUserIp + _arKey + _arOauthToken + _arFields + _arAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsRevealAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/SetStepsAtLeast.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/SetStepsAtLeast.hs new file mode 100644 index 000000000..7632db9ee --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/SetStepsAtLeast.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.SetStepsAtLeast +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the steps for the currently authenticated player towards unlocking +-- an achievement. If the steps parameter is less than the current number +-- of steps that the player already gained for the achievement, the +-- achievement is not modified. +-- +-- /See:/ for @GamesAchievementsSetStepsAtLeast@. +module Games.Achievements.SetStepsAtLeast + ( + -- * REST Resource + AchievementsSetStepsAtLeastAPI + + -- * Creating a Request + , achievementsSetStepsAtLeast + , AchievementsSetStepsAtLeast + + -- * Request Lenses + , assalQuotaUser + , assalPrettyPrint + , assalAchievementId + , assalUserIp + , assalSteps + , assalKey + , assalOauthToken + , assalFields + , assalAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsSetStepsAtLeast@ which the +-- 'AchievementsSetStepsAtLeast' request conforms to. +type AchievementsSetStepsAtLeastAPI = + "achievements" :> + Capture "achievementId" Text :> + "setStepsAtLeast" :> + QueryParam "steps" Int32 :> + Post '[JSON] AchievementSetStepsAtLeastResponse + +-- | Sets the steps for the currently authenticated player towards unlocking +-- an achievement. If the steps parameter is less than the current number +-- of steps that the player already gained for the achievement, the +-- achievement is not modified. +-- +-- /See:/ 'achievementsSetStepsAtLeast' smart constructor. +data AchievementsSetStepsAtLeast = AchievementsSetStepsAtLeast + { _assalQuotaUser :: !(Maybe Text) + , _assalPrettyPrint :: !Bool + , _assalAchievementId :: !Text + , _assalUserIp :: !(Maybe Text) + , _assalSteps :: !Int32 + , _assalKey :: !(Maybe Text) + , _assalOauthToken :: !(Maybe Text) + , _assalFields :: !(Maybe Text) + , _assalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsSetStepsAtLeast'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assalQuotaUser' +-- +-- * 'assalPrettyPrint' +-- +-- * 'assalAchievementId' +-- +-- * 'assalUserIp' +-- +-- * 'assalSteps' +-- +-- * 'assalKey' +-- +-- * 'assalOauthToken' +-- +-- * 'assalFields' +-- +-- * 'assalAlt' +achievementsSetStepsAtLeast + :: Text -- ^ 'achievementId' + -> Int32 -- ^ 'steps' + -> AchievementsSetStepsAtLeast +achievementsSetStepsAtLeast pAssalAchievementId_ pAssalSteps_ = + AchievementsSetStepsAtLeast + { _assalQuotaUser = Nothing + , _assalPrettyPrint = True + , _assalAchievementId = pAssalAchievementId_ + , _assalUserIp = Nothing + , _assalSteps = pAssalSteps_ + , _assalKey = Nothing + , _assalOauthToken = Nothing + , _assalFields = Nothing + , _assalAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +assalQuotaUser :: Lens' AchievementsSetStepsAtLeast' (Maybe Text) +assalQuotaUser + = lens _assalQuotaUser + (\ s a -> s{_assalQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +assalPrettyPrint :: Lens' AchievementsSetStepsAtLeast' Bool +assalPrettyPrint + = lens _assalPrettyPrint + (\ s a -> s{_assalPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +assalAchievementId :: Lens' AchievementsSetStepsAtLeast' Text +assalAchievementId + = lens _assalAchievementId + (\ s a -> s{_assalAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +assalUserIp :: Lens' AchievementsSetStepsAtLeast' (Maybe Text) +assalUserIp + = lens _assalUserIp (\ s a -> s{_assalUserIp = a}) + +-- | The minimum value to set the steps to. +assalSteps :: Lens' AchievementsSetStepsAtLeast' Int32 +assalSteps + = lens _assalSteps (\ s a -> s{_assalSteps = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +assalKey :: Lens' AchievementsSetStepsAtLeast' (Maybe Text) +assalKey = lens _assalKey (\ s a -> s{_assalKey = a}) + +-- | OAuth 2.0 token for the current user. +assalOauthToken :: Lens' AchievementsSetStepsAtLeast' (Maybe Text) +assalOauthToken + = lens _assalOauthToken + (\ s a -> s{_assalOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +assalFields :: Lens' AchievementsSetStepsAtLeast' (Maybe Text) +assalFields + = lens _assalFields (\ s a -> s{_assalFields = a}) + +-- | Data format for the response. +assalAlt :: Lens' AchievementsSetStepsAtLeast' Text +assalAlt = lens _assalAlt (\ s a -> s{_assalAlt = a}) + +instance GoogleRequest AchievementsSetStepsAtLeast' + where + type Rs AchievementsSetStepsAtLeast' = + AchievementSetStepsAtLeastResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsSetStepsAtLeast{..} + = go _assalQuotaUser _assalPrettyPrint + _assalAchievementId + _assalUserIp + (Just _assalSteps) + _assalKey + _assalOauthToken + _assalFields + _assalAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsSetStepsAtLeastAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/Unlock.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Unlock.hs new file mode 100644 index 000000000..8f25e67d6 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/Unlock.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.Unlock +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Unlocks this achievement for the currently authenticated player. +-- +-- /See:/ for @GamesAchievementsUnlock@. +module Games.Achievements.Unlock + ( + -- * REST Resource + AchievementsUnlockAPI + + -- * Creating a Request + , achievementsUnlock + , AchievementsUnlock + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auAchievementId + , auUserIp + , auKey + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsUnlock@ which the +-- 'AchievementsUnlock' request conforms to. +type AchievementsUnlockAPI = + "achievements" :> + Capture "achievementId" Text :> + "unlock" :> Post '[JSON] AchievementUnlockResponse + +-- | Unlocks this achievement for the currently authenticated player. +-- +-- /See:/ 'achievementsUnlock' smart constructor. +data AchievementsUnlock = AchievementsUnlock + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auAchievementId :: !Text + , _auUserIp :: !(Maybe Text) + , _auKey :: !(Maybe Text) + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsUnlock'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auAchievementId' +-- +-- * 'auUserIp' +-- +-- * 'auKey' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +achievementsUnlock + :: Text -- ^ 'achievementId' + -> AchievementsUnlock +achievementsUnlock pAuAchievementId_ = + AchievementsUnlock + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auAchievementId = pAuAchievementId_ + , _auUserIp = Nothing + , _auKey = Nothing + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AchievementsUnlock' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AchievementsUnlock' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | The ID of the achievement used by this method. +auAchievementId :: Lens' AchievementsUnlock' Text +auAchievementId + = lens _auAchievementId + (\ s a -> s{_auAchievementId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AchievementsUnlock' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AchievementsUnlock' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AchievementsUnlock' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AchievementsUnlock' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AchievementsUnlock' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AchievementsUnlock' where + type Rs AchievementsUnlock' = + AchievementUnlockResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsUnlock{..} + = go _auQuotaUser _auPrettyPrint _auAchievementId + _auUserIp + _auKey + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsUnlockAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs b/gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs new file mode 100644 index 000000000..ea4fccc4c --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Achievements.UpdateMultiple +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates multiple achievements for the currently authenticated player. +-- +-- /See:/ for @GamesAchievementsUpdateMultiple@. +module Games.Achievements.UpdateMultiple + ( + -- * REST Resource + AchievementsUpdateMultipleAPI + + -- * Creating a Request + , achievementsUpdateMultiple + , AchievementsUpdateMultiple + + -- * Request Lenses + , aumQuotaUser + , aumPrettyPrint + , aumUserIp + , aumKey + , aumOauthToken + , aumFields + , aumAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesAchievementsUpdateMultiple@ which the +-- 'AchievementsUpdateMultiple' request conforms to. +type AchievementsUpdateMultipleAPI = + "achievements" :> + "updateMultiple" :> + Post '[JSON] AchievementUpdateMultipleResponse + +-- | Updates multiple achievements for the currently authenticated player. +-- +-- /See:/ 'achievementsUpdateMultiple' smart constructor. +data AchievementsUpdateMultiple = AchievementsUpdateMultiple + { _aumQuotaUser :: !(Maybe Text) + , _aumPrettyPrint :: !Bool + , _aumUserIp :: !(Maybe Text) + , _aumKey :: !(Maybe Text) + , _aumOauthToken :: !(Maybe Text) + , _aumFields :: !(Maybe Text) + , _aumAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AchievementsUpdateMultiple'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aumQuotaUser' +-- +-- * 'aumPrettyPrint' +-- +-- * 'aumUserIp' +-- +-- * 'aumKey' +-- +-- * 'aumOauthToken' +-- +-- * 'aumFields' +-- +-- * 'aumAlt' +achievementsUpdateMultiple + :: AchievementsUpdateMultiple +achievementsUpdateMultiple = + AchievementsUpdateMultiple + { _aumQuotaUser = Nothing + , _aumPrettyPrint = True + , _aumUserIp = Nothing + , _aumKey = Nothing + , _aumOauthToken = Nothing + , _aumFields = Nothing + , _aumAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aumQuotaUser :: Lens' AchievementsUpdateMultiple' (Maybe Text) +aumQuotaUser + = lens _aumQuotaUser (\ s a -> s{_aumQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aumPrettyPrint :: Lens' AchievementsUpdateMultiple' Bool +aumPrettyPrint + = lens _aumPrettyPrint + (\ s a -> s{_aumPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aumUserIp :: Lens' AchievementsUpdateMultiple' (Maybe Text) +aumUserIp + = lens _aumUserIp (\ s a -> s{_aumUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aumKey :: Lens' AchievementsUpdateMultiple' (Maybe Text) +aumKey = lens _aumKey (\ s a -> s{_aumKey = a}) + +-- | OAuth 2.0 token for the current user. +aumOauthToken :: Lens' AchievementsUpdateMultiple' (Maybe Text) +aumOauthToken + = lens _aumOauthToken + (\ s a -> s{_aumOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aumFields :: Lens' AchievementsUpdateMultiple' (Maybe Text) +aumFields + = lens _aumFields (\ s a -> s{_aumFields = a}) + +-- | Data format for the response. +aumAlt :: Lens' AchievementsUpdateMultiple' Text +aumAlt = lens _aumAlt (\ s a -> s{_aumAlt = a}) + +instance GoogleRequest AchievementsUpdateMultiple' + where + type Rs AchievementsUpdateMultiple' = + AchievementUpdateMultipleResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u AchievementsUpdateMultiple{..} + = go _aumQuotaUser _aumPrettyPrint _aumUserIp _aumKey + _aumOauthToken + _aumFields + _aumAlt + where go + = clientWithRoute + (Proxy :: Proxy AchievementsUpdateMultipleAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Applications/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Applications/Get.hs new file mode 100644 index 000000000..a783ada7b --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Applications/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Applications.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the metadata of the application with the given ID. If the +-- requested application is not available for the specified platformType, +-- the returned response will not include any instance data. +-- +-- /See:/ for @GamesApplicationsGet@. +module Games.Applications.Get + ( + -- * REST Resource + ApplicationsGetAPI + + -- * Creating a Request + , applicationsGet + , ApplicationsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agApplicationId + , agKey + , agPlatformType + , agLanguage + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesApplicationsGet@ which the +-- 'ApplicationsGet' request conforms to. +type ApplicationsGetAPI = + "applications" :> + Capture "applicationId" Text :> + QueryParam "platformType" Text :> + QueryParam "language" Text :> Get '[JSON] Application + +-- | Retrieves the metadata of the application with the given ID. If the +-- requested application is not available for the specified platformType, +-- the returned response will not include any instance data. +-- +-- /See:/ 'applicationsGet' smart constructor. +data ApplicationsGet = ApplicationsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agApplicationId :: !Text + , _agKey :: !(Maybe Text) + , _agPlatformType :: !(Maybe Text) + , _agLanguage :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agApplicationId' +-- +-- * 'agKey' +-- +-- * 'agPlatformType' +-- +-- * 'agLanguage' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +applicationsGet + :: Text -- ^ 'applicationId' + -> ApplicationsGet +applicationsGet pAgApplicationId_ = + ApplicationsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agApplicationId = pAgApplicationId_ + , _agKey = Nothing + , _agPlatformType = Nothing + , _agLanguage = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' ApplicationsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' ApplicationsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' ApplicationsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The application ID from the Google Play developer console. +agApplicationId :: Lens' ApplicationsGet' Text +agApplicationId + = lens _agApplicationId + (\ s a -> s{_agApplicationId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' ApplicationsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | Restrict application details returned to the specific platform. +agPlatformType :: Lens' ApplicationsGet' (Maybe Text) +agPlatformType + = lens _agPlatformType + (\ s a -> s{_agPlatformType = a}) + +-- | The preferred language to use for strings returned by this method. +agLanguage :: Lens' ApplicationsGet' (Maybe Text) +agLanguage + = lens _agLanguage (\ s a -> s{_agLanguage = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' ApplicationsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' ApplicationsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' ApplicationsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest ApplicationsGet' where + type Rs ApplicationsGet' = Application + request = requestWithRoute defReq gamesURL + requestWithRoute r u ApplicationsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agApplicationId + _agKey + _agPlatformType + _agLanguage + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy ApplicationsGetAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Applications/Played.hs b/gogol-games/gen/Network/Google/Resource/Games/Applications/Played.hs new file mode 100644 index 000000000..67d95c234 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Applications/Played.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Applications.Played +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Indicate that the the currently authenticated user is playing your +-- application. +-- +-- /See:/ for @GamesApplicationsPlayed@. +module Games.Applications.Played + ( + -- * REST Resource + ApplicationsPlayedAPI + + -- * Creating a Request + , applicationsPlayed + , ApplicationsPlayed + + -- * Request Lenses + , apQuotaUser + , apPrettyPrint + , apUserIp + , apKey + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesApplicationsPlayed@ which the +-- 'ApplicationsPlayed' request conforms to. +type ApplicationsPlayedAPI = + "applications" :> "played" :> Post '[JSON] () + +-- | Indicate that the the currently authenticated user is playing your +-- application. +-- +-- /See:/ 'applicationsPlayed' smart constructor. +data ApplicationsPlayed = ApplicationsPlayed + { _apQuotaUser :: !(Maybe Text) + , _apPrettyPrint :: !Bool + , _apUserIp :: !(Maybe Text) + , _apKey :: !(Maybe Text) + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApplicationsPlayed'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apPrettyPrint' +-- +-- * 'apUserIp' +-- +-- * 'apKey' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +applicationsPlayed + :: ApplicationsPlayed +applicationsPlayed = + ApplicationsPlayed + { _apQuotaUser = Nothing + , _apPrettyPrint = True + , _apUserIp = Nothing + , _apKey = Nothing + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' ApplicationsPlayed' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' ApplicationsPlayed' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' ApplicationsPlayed' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' ApplicationsPlayed' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' ApplicationsPlayed' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' ApplicationsPlayed' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' ApplicationsPlayed' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest ApplicationsPlayed' where + type Rs ApplicationsPlayed' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u ApplicationsPlayed{..} + = go _apQuotaUser _apPrettyPrint _apUserIp _apKey + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute + (Proxy :: Proxy ApplicationsPlayedAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Events/ListByPlayer.hs b/gogol-games/gen/Network/Google/Resource/Games/Events/ListByPlayer.hs new file mode 100644 index 000000000..bcc4369d2 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Events/ListByPlayer.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Events.ListByPlayer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list showing the current progress on events in this +-- application for the currently authenticated user. +-- +-- /See:/ for @GamesEventsListByPlayer@. +module Games.Events.ListByPlayer + ( + -- * REST Resource + EventsListByPlayerAPI + + -- * Creating a Request + , eventsListByPlayer + , EventsListByPlayer + + -- * Request Lenses + , elbpQuotaUser + , elbpPrettyPrint + , elbpUserIp + , elbpKey + , elbpLanguage + , elbpPageToken + , elbpOauthToken + , elbpMaxResults + , elbpFields + , elbpAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesEventsListByPlayer@ which the +-- 'EventsListByPlayer' request conforms to. +type EventsListByPlayerAPI = + "events" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] PlayerEventListResponse + +-- | Returns a list showing the current progress on events in this +-- application for the currently authenticated user. +-- +-- /See:/ 'eventsListByPlayer' smart constructor. +data EventsListByPlayer = EventsListByPlayer + { _elbpQuotaUser :: !(Maybe Text) + , _elbpPrettyPrint :: !Bool + , _elbpUserIp :: !(Maybe Text) + , _elbpKey :: !(Maybe Text) + , _elbpLanguage :: !(Maybe Text) + , _elbpPageToken :: !(Maybe Text) + , _elbpOauthToken :: !(Maybe Text) + , _elbpMaxResults :: !(Maybe Int32) + , _elbpFields :: !(Maybe Text) + , _elbpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsListByPlayer'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elbpQuotaUser' +-- +-- * 'elbpPrettyPrint' +-- +-- * 'elbpUserIp' +-- +-- * 'elbpKey' +-- +-- * 'elbpLanguage' +-- +-- * 'elbpPageToken' +-- +-- * 'elbpOauthToken' +-- +-- * 'elbpMaxResults' +-- +-- * 'elbpFields' +-- +-- * 'elbpAlt' +eventsListByPlayer + :: EventsListByPlayer +eventsListByPlayer = + EventsListByPlayer + { _elbpQuotaUser = Nothing + , _elbpPrettyPrint = True + , _elbpUserIp = Nothing + , _elbpKey = Nothing + , _elbpLanguage = Nothing + , _elbpPageToken = Nothing + , _elbpOauthToken = Nothing + , _elbpMaxResults = Nothing + , _elbpFields = Nothing + , _elbpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elbpQuotaUser :: Lens' EventsListByPlayer' (Maybe Text) +elbpQuotaUser + = lens _elbpQuotaUser + (\ s a -> s{_elbpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elbpPrettyPrint :: Lens' EventsListByPlayer' Bool +elbpPrettyPrint + = lens _elbpPrettyPrint + (\ s a -> s{_elbpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elbpUserIp :: Lens' EventsListByPlayer' (Maybe Text) +elbpUserIp + = lens _elbpUserIp (\ s a -> s{_elbpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elbpKey :: Lens' EventsListByPlayer' (Maybe Text) +elbpKey = lens _elbpKey (\ s a -> s{_elbpKey = a}) + +-- | The preferred language to use for strings returned by this method. +elbpLanguage :: Lens' EventsListByPlayer' (Maybe Text) +elbpLanguage + = lens _elbpLanguage (\ s a -> s{_elbpLanguage = a}) + +-- | The token returned by the previous request. +elbpPageToken :: Lens' EventsListByPlayer' (Maybe Text) +elbpPageToken + = lens _elbpPageToken + (\ s a -> s{_elbpPageToken = a}) + +-- | OAuth 2.0 token for the current user. +elbpOauthToken :: Lens' EventsListByPlayer' (Maybe Text) +elbpOauthToken + = lens _elbpOauthToken + (\ s a -> s{_elbpOauthToken = a}) + +-- | The maximum number of events to return in the response, used for paging. +-- For any response, the actual number of events to return may be less than +-- the specified maxResults. +elbpMaxResults :: Lens' EventsListByPlayer' (Maybe Int32) +elbpMaxResults + = lens _elbpMaxResults + (\ s a -> s{_elbpMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +elbpFields :: Lens' EventsListByPlayer' (Maybe Text) +elbpFields + = lens _elbpFields (\ s a -> s{_elbpFields = a}) + +-- | Data format for the response. +elbpAlt :: Lens' EventsListByPlayer' Text +elbpAlt = lens _elbpAlt (\ s a -> s{_elbpAlt = a}) + +instance GoogleRequest EventsListByPlayer' where + type Rs EventsListByPlayer' = PlayerEventListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u EventsListByPlayer{..} + = go _elbpQuotaUser _elbpPrettyPrint _elbpUserIp + _elbpKey + _elbpLanguage + _elbpPageToken + _elbpOauthToken + _elbpMaxResults + _elbpFields + _elbpAlt + where go + = clientWithRoute + (Proxy :: Proxy EventsListByPlayerAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Events/ListDefinitions.hs b/gogol-games/gen/Network/Google/Resource/Games/Events/ListDefinitions.hs new file mode 100644 index 000000000..70a97240b --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Events/ListDefinitions.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Events.ListDefinitions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of the event definitions in this application. +-- +-- /See:/ for @GamesEventsListDefinitions@. +module Games.Events.ListDefinitions + ( + -- * REST Resource + EventsListDefinitionsAPI + + -- * Creating a Request + , eventsListDefinitions + , EventsListDefinitions + + -- * Request Lenses + , eldQuotaUser + , eldPrettyPrint + , eldUserIp + , eldKey + , eldLanguage + , eldPageToken + , eldOauthToken + , eldMaxResults + , eldFields + , eldAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesEventsListDefinitions@ which the +-- 'EventsListDefinitions' request conforms to. +type EventsListDefinitionsAPI = + "eventDefinitions" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] EventDefinitionListResponse + +-- | Returns a list of the event definitions in this application. +-- +-- /See:/ 'eventsListDefinitions' smart constructor. +data EventsListDefinitions = EventsListDefinitions + { _eldQuotaUser :: !(Maybe Text) + , _eldPrettyPrint :: !Bool + , _eldUserIp :: !(Maybe Text) + , _eldKey :: !(Maybe Text) + , _eldLanguage :: !(Maybe Text) + , _eldPageToken :: !(Maybe Text) + , _eldOauthToken :: !(Maybe Text) + , _eldMaxResults :: !(Maybe Int32) + , _eldFields :: !(Maybe Text) + , _eldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsListDefinitions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eldQuotaUser' +-- +-- * 'eldPrettyPrint' +-- +-- * 'eldUserIp' +-- +-- * 'eldKey' +-- +-- * 'eldLanguage' +-- +-- * 'eldPageToken' +-- +-- * 'eldOauthToken' +-- +-- * 'eldMaxResults' +-- +-- * 'eldFields' +-- +-- * 'eldAlt' +eventsListDefinitions + :: EventsListDefinitions +eventsListDefinitions = + EventsListDefinitions + { _eldQuotaUser = Nothing + , _eldPrettyPrint = True + , _eldUserIp = Nothing + , _eldKey = Nothing + , _eldLanguage = Nothing + , _eldPageToken = Nothing + , _eldOauthToken = Nothing + , _eldMaxResults = Nothing + , _eldFields = Nothing + , _eldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eldQuotaUser :: Lens' EventsListDefinitions' (Maybe Text) +eldQuotaUser + = lens _eldQuotaUser (\ s a -> s{_eldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eldPrettyPrint :: Lens' EventsListDefinitions' Bool +eldPrettyPrint + = lens _eldPrettyPrint + (\ s a -> s{_eldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eldUserIp :: Lens' EventsListDefinitions' (Maybe Text) +eldUserIp + = lens _eldUserIp (\ s a -> s{_eldUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eldKey :: Lens' EventsListDefinitions' (Maybe Text) +eldKey = lens _eldKey (\ s a -> s{_eldKey = a}) + +-- | The preferred language to use for strings returned by this method. +eldLanguage :: Lens' EventsListDefinitions' (Maybe Text) +eldLanguage + = lens _eldLanguage (\ s a -> s{_eldLanguage = a}) + +-- | The token returned by the previous request. +eldPageToken :: Lens' EventsListDefinitions' (Maybe Text) +eldPageToken + = lens _eldPageToken (\ s a -> s{_eldPageToken = a}) + +-- | OAuth 2.0 token for the current user. +eldOauthToken :: Lens' EventsListDefinitions' (Maybe Text) +eldOauthToken + = lens _eldOauthToken + (\ s a -> s{_eldOauthToken = a}) + +-- | The maximum number of event definitions to return in the response, used +-- for paging. For any response, the actual number of event definitions to +-- return may be less than the specified maxResults. +eldMaxResults :: Lens' EventsListDefinitions' (Maybe Int32) +eldMaxResults + = lens _eldMaxResults + (\ s a -> s{_eldMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +eldFields :: Lens' EventsListDefinitions' (Maybe Text) +eldFields + = lens _eldFields (\ s a -> s{_eldFields = a}) + +-- | Data format for the response. +eldAlt :: Lens' EventsListDefinitions' Text +eldAlt = lens _eldAlt (\ s a -> s{_eldAlt = a}) + +instance GoogleRequest EventsListDefinitions' where + type Rs EventsListDefinitions' = + EventDefinitionListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u EventsListDefinitions{..} + = go _eldQuotaUser _eldPrettyPrint _eldUserIp _eldKey + _eldLanguage + _eldPageToken + _eldOauthToken + _eldMaxResults + _eldFields + _eldAlt + where go + = clientWithRoute + (Proxy :: Proxy EventsListDefinitionsAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Events/Record.hs b/gogol-games/gen/Network/Google/Resource/Games/Events/Record.hs new file mode 100644 index 000000000..c0e6e3e3b --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Events/Record.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Events.Record +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Records a batch of changes to the number of times events have occurred +-- for the currently authenticated user of this application. +-- +-- /See:/ for @GamesEventsRecord@. +module Games.Events.Record + ( + -- * REST Resource + EventsRecordAPI + + -- * Creating a Request + , eventsRecord + , EventsRecord + + -- * Request Lenses + , erQuotaUser + , erPrettyPrint + , erUserIp + , erKey + , erLanguage + , erOauthToken + , erFields + , erAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesEventsRecord@ which the +-- 'EventsRecord' request conforms to. +type EventsRecordAPI = + "events" :> + QueryParam "language" Text :> + Post '[JSON] EventUpdateResponse + +-- | Records a batch of changes to the number of times events have occurred +-- for the currently authenticated user of this application. +-- +-- /See:/ 'eventsRecord' smart constructor. +data EventsRecord = EventsRecord + { _erQuotaUser :: !(Maybe Text) + , _erPrettyPrint :: !Bool + , _erUserIp :: !(Maybe Text) + , _erKey :: !(Maybe Text) + , _erLanguage :: !(Maybe Text) + , _erOauthToken :: !(Maybe Text) + , _erFields :: !(Maybe Text) + , _erAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventsRecord'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'erQuotaUser' +-- +-- * 'erPrettyPrint' +-- +-- * 'erUserIp' +-- +-- * 'erKey' +-- +-- * 'erLanguage' +-- +-- * 'erOauthToken' +-- +-- * 'erFields' +-- +-- * 'erAlt' +eventsRecord + :: EventsRecord +eventsRecord = + EventsRecord + { _erQuotaUser = Nothing + , _erPrettyPrint = True + , _erUserIp = Nothing + , _erKey = Nothing + , _erLanguage = Nothing + , _erOauthToken = Nothing + , _erFields = Nothing + , _erAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +erQuotaUser :: Lens' EventsRecord' (Maybe Text) +erQuotaUser + = lens _erQuotaUser (\ s a -> s{_erQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +erPrettyPrint :: Lens' EventsRecord' Bool +erPrettyPrint + = lens _erPrettyPrint + (\ s a -> s{_erPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +erUserIp :: Lens' EventsRecord' (Maybe Text) +erUserIp = lens _erUserIp (\ s a -> s{_erUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +erKey :: Lens' EventsRecord' (Maybe Text) +erKey = lens _erKey (\ s a -> s{_erKey = a}) + +-- | The preferred language to use for strings returned by this method. +erLanguage :: Lens' EventsRecord' (Maybe Text) +erLanguage + = lens _erLanguage (\ s a -> s{_erLanguage = a}) + +-- | OAuth 2.0 token for the current user. +erOauthToken :: Lens' EventsRecord' (Maybe Text) +erOauthToken + = lens _erOauthToken (\ s a -> s{_erOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +erFields :: Lens' EventsRecord' (Maybe Text) +erFields = lens _erFields (\ s a -> s{_erFields = a}) + +-- | Data format for the response. +erAlt :: Lens' EventsRecord' Text +erAlt = lens _erAlt (\ s a -> s{_erAlt = a}) + +instance GoogleRequest EventsRecord' where + type Rs EventsRecord' = EventUpdateResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u EventsRecord{..} + = go _erQuotaUser _erPrettyPrint _erUserIp _erKey + _erLanguage + _erOauthToken + _erFields + _erAlt + where go + = clientWithRoute (Proxy :: Proxy EventsRecordAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/Get.hs new file mode 100644 index 000000000..a630cd6f1 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Leaderboards.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the metadata of the leaderboard with the given ID. +-- +-- /See:/ for @GamesLeaderboardsGet@. +module Games.Leaderboards.Get + ( + -- * REST Resource + LeaderboardsGetAPI + + -- * Creating a Request + , leaderboardsGet + , LeaderboardsGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgUserIp + , lgLeaderboardId + , lgKey + , lgLanguage + , lgOauthToken + , lgFields + , lgAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesLeaderboardsGet@ which the +-- 'LeaderboardsGet' request conforms to. +type LeaderboardsGetAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + QueryParam "language" Text :> Get '[JSON] Leaderboard + +-- | Retrieves the metadata of the leaderboard with the given ID. +-- +-- /See:/ 'leaderboardsGet' smart constructor. +data LeaderboardsGet = LeaderboardsGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgUserIp :: !(Maybe Text) + , _lgLeaderboardId :: !Text + , _lgKey :: !(Maybe Text) + , _lgLanguage :: !(Maybe Text) + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgUserIp' +-- +-- * 'lgLeaderboardId' +-- +-- * 'lgKey' +-- +-- * 'lgLanguage' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgAlt' +leaderboardsGet + :: Text -- ^ 'leaderboardId' + -> LeaderboardsGet +leaderboardsGet pLgLeaderboardId_ = + LeaderboardsGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgUserIp = Nothing + , _lgLeaderboardId = pLgLeaderboardId_ + , _lgKey = Nothing + , _lgLanguage = Nothing + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LeaderboardsGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LeaderboardsGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LeaderboardsGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | The ID of the leaderboard. +lgLeaderboardId :: Lens' LeaderboardsGet' Text +lgLeaderboardId + = lens _lgLeaderboardId + (\ s a -> s{_lgLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LeaderboardsGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | The preferred language to use for strings returned by this method. +lgLanguage :: Lens' LeaderboardsGet' (Maybe Text) +lgLanguage + = lens _lgLanguage (\ s a -> s{_lgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LeaderboardsGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LeaderboardsGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | Data format for the response. +lgAlt :: Lens' LeaderboardsGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LeaderboardsGet' where + type Rs LeaderboardsGet' = Leaderboard + request = requestWithRoute defReq gamesURL + requestWithRoute r u LeaderboardsGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgUserIp + _lgLeaderboardId + _lgKey + _lgLanguage + _lgOauthToken + _lgFields + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LeaderboardsGetAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/List.hs new file mode 100644 index 000000000..b5a3ce2c9 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Leaderboards/List.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Leaderboards.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the leaderboard metadata for your application. +-- +-- /See:/ for @GamesLeaderboardsList@. +module Games.Leaderboards.List + ( + -- * REST Resource + LeaderboardsListAPI + + -- * Creating a Request + , leaderboardsList + , LeaderboardsList + + -- * Request Lenses + , llQuotaUser + , llPrettyPrint + , llUserIp + , llKey + , llLanguage + , llPageToken + , llOauthToken + , llMaxResults + , llFields + , llAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesLeaderboardsList@ which the +-- 'LeaderboardsList' request conforms to. +type LeaderboardsListAPI = + "leaderboards" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] LeaderboardListResponse + +-- | Lists all the leaderboard metadata for your application. +-- +-- /See:/ 'leaderboardsList' smart constructor. +data LeaderboardsList = LeaderboardsList + { _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llUserIp :: !(Maybe Text) + , _llKey :: !(Maybe Text) + , _llLanguage :: !(Maybe Text) + , _llPageToken :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llMaxResults :: !(Maybe Int32) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LeaderboardsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llUserIp' +-- +-- * 'llKey' +-- +-- * 'llLanguage' +-- +-- * 'llPageToken' +-- +-- * 'llOauthToken' +-- +-- * 'llMaxResults' +-- +-- * 'llFields' +-- +-- * 'llAlt' +leaderboardsList + :: LeaderboardsList +leaderboardsList = + LeaderboardsList + { _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llUserIp = Nothing + , _llKey = Nothing + , _llLanguage = Nothing + , _llPageToken = Nothing + , _llOauthToken = Nothing + , _llMaxResults = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LeaderboardsList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LeaderboardsList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LeaderboardsList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LeaderboardsList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | The preferred language to use for strings returned by this method. +llLanguage :: Lens' LeaderboardsList' (Maybe Text) +llLanguage + = lens _llLanguage (\ s a -> s{_llLanguage = a}) + +-- | The token returned by the previous request. +llPageToken :: Lens' LeaderboardsList' (Maybe Text) +llPageToken + = lens _llPageToken (\ s a -> s{_llPageToken = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LeaderboardsList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | The maximum number of leaderboards to return in the response. For any +-- response, the actual number of leaderboards returned may be less than +-- the specified maxResults. +llMaxResults :: Lens' LeaderboardsList' (Maybe Int32) +llMaxResults + = lens _llMaxResults (\ s a -> s{_llMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LeaderboardsList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LeaderboardsList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LeaderboardsList' where + type Rs LeaderboardsList' = LeaderboardListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u LeaderboardsList{..} + = go _llQuotaUser _llPrettyPrint _llUserIp _llKey + _llLanguage + _llPageToken + _llOauthToken + _llMaxResults + _llFields + _llAlt + where go + = clientWithRoute + (Proxy :: Proxy LeaderboardsListAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Metagame/GetMetagameConfig.hs b/gogol-games/gen/Network/Google/Resource/Games/Metagame/GetMetagameConfig.hs new file mode 100644 index 000000000..3a96d17c5 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Metagame/GetMetagameConfig.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Metagame.GetMetagameConfig +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return the metagame configuration data for the calling application. +-- +-- /See:/ for @GamesMetagameGetMetagameConfig@. +module Games.Metagame.GetMetagameConfig + ( + -- * REST Resource + MetagameGetMetagameConfigAPI + + -- * Creating a Request + , metagameGetMetagameConfig + , MetagameGetMetagameConfig + + -- * Request Lenses + , mgmcQuotaUser + , mgmcPrettyPrint + , mgmcUserIp + , mgmcKey + , mgmcOauthToken + , mgmcFields + , mgmcAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesMetagameGetMetagameConfig@ which the +-- 'MetagameGetMetagameConfig' request conforms to. +type MetagameGetMetagameConfigAPI = + "metagameConfig" :> Get '[JSON] MetagameConfig + +-- | Return the metagame configuration data for the calling application. +-- +-- /See:/ 'metagameGetMetagameConfig' smart constructor. +data MetagameGetMetagameConfig = MetagameGetMetagameConfig + { _mgmcQuotaUser :: !(Maybe Text) + , _mgmcPrettyPrint :: !Bool + , _mgmcUserIp :: !(Maybe Text) + , _mgmcKey :: !(Maybe Text) + , _mgmcOauthToken :: !(Maybe Text) + , _mgmcFields :: !(Maybe Text) + , _mgmcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetagameGetMetagameConfig'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgmcQuotaUser' +-- +-- * 'mgmcPrettyPrint' +-- +-- * 'mgmcUserIp' +-- +-- * 'mgmcKey' +-- +-- * 'mgmcOauthToken' +-- +-- * 'mgmcFields' +-- +-- * 'mgmcAlt' +metagameGetMetagameConfig + :: MetagameGetMetagameConfig +metagameGetMetagameConfig = + MetagameGetMetagameConfig + { _mgmcQuotaUser = Nothing + , _mgmcPrettyPrint = True + , _mgmcUserIp = Nothing + , _mgmcKey = Nothing + , _mgmcOauthToken = Nothing + , _mgmcFields = Nothing + , _mgmcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgmcQuotaUser :: Lens' MetagameGetMetagameConfig' (Maybe Text) +mgmcQuotaUser + = lens _mgmcQuotaUser + (\ s a -> s{_mgmcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgmcPrettyPrint :: Lens' MetagameGetMetagameConfig' Bool +mgmcPrettyPrint + = lens _mgmcPrettyPrint + (\ s a -> s{_mgmcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgmcUserIp :: Lens' MetagameGetMetagameConfig' (Maybe Text) +mgmcUserIp + = lens _mgmcUserIp (\ s a -> s{_mgmcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgmcKey :: Lens' MetagameGetMetagameConfig' (Maybe Text) +mgmcKey = lens _mgmcKey (\ s a -> s{_mgmcKey = a}) + +-- | OAuth 2.0 token for the current user. +mgmcOauthToken :: Lens' MetagameGetMetagameConfig' (Maybe Text) +mgmcOauthToken + = lens _mgmcOauthToken + (\ s a -> s{_mgmcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgmcFields :: Lens' MetagameGetMetagameConfig' (Maybe Text) +mgmcFields + = lens _mgmcFields (\ s a -> s{_mgmcFields = a}) + +-- | Data format for the response. +mgmcAlt :: Lens' MetagameGetMetagameConfig' Text +mgmcAlt = lens _mgmcAlt (\ s a -> s{_mgmcAlt = a}) + +instance GoogleRequest MetagameGetMetagameConfig' + where + type Rs MetagameGetMetagameConfig' = MetagameConfig + request = requestWithRoute defReq gamesURL + requestWithRoute r u MetagameGetMetagameConfig{..} + = go _mgmcQuotaUser _mgmcPrettyPrint _mgmcUserIp + _mgmcKey + _mgmcOauthToken + _mgmcFields + _mgmcAlt + where go + = clientWithRoute + (Proxy :: Proxy MetagameGetMetagameConfigAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Metagame/ListCategoriesByPlayer.hs b/gogol-games/gen/Network/Google/Resource/Games/Metagame/ListCategoriesByPlayer.hs new file mode 100644 index 000000000..4e7aaba82 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Metagame/ListCategoriesByPlayer.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Metagame.ListCategoriesByPlayer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List play data aggregated per category for the player corresponding to +-- playerId. +-- +-- /See:/ for @GamesMetagameListCategoriesByPlayer@. +module Games.Metagame.ListCategoriesByPlayer + ( + -- * REST Resource + MetagameListCategoriesByPlayerAPI + + -- * Creating a Request + , metagameListCategoriesByPlayer + , MetagameListCategoriesByPlayer + + -- * Request Lenses + , mlcbpQuotaUser + , mlcbpPrettyPrint + , mlcbpUserIp + , mlcbpCollection + , mlcbpKey + , mlcbpLanguage + , mlcbpPageToken + , mlcbpOauthToken + , mlcbpPlayerId + , mlcbpMaxResults + , mlcbpFields + , mlcbpAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesMetagameListCategoriesByPlayer@ which the +-- 'MetagameListCategoriesByPlayer' request conforms to. +type MetagameListCategoriesByPlayerAPI = + "players" :> + Capture "playerId" Text :> + "categories" :> + Capture "collection" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] CategoryListResponse + +-- | List play data aggregated per category for the player corresponding to +-- playerId. +-- +-- /See:/ 'metagameListCategoriesByPlayer' smart constructor. +data MetagameListCategoriesByPlayer = MetagameListCategoriesByPlayer + { _mlcbpQuotaUser :: !(Maybe Text) + , _mlcbpPrettyPrint :: !Bool + , _mlcbpUserIp :: !(Maybe Text) + , _mlcbpCollection :: !Text + , _mlcbpKey :: !(Maybe Text) + , _mlcbpLanguage :: !(Maybe Text) + , _mlcbpPageToken :: !(Maybe Text) + , _mlcbpOauthToken :: !(Maybe Text) + , _mlcbpPlayerId :: !Text + , _mlcbpMaxResults :: !(Maybe Int32) + , _mlcbpFields :: !(Maybe Text) + , _mlcbpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetagameListCategoriesByPlayer'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlcbpQuotaUser' +-- +-- * 'mlcbpPrettyPrint' +-- +-- * 'mlcbpUserIp' +-- +-- * 'mlcbpCollection' +-- +-- * 'mlcbpKey' +-- +-- * 'mlcbpLanguage' +-- +-- * 'mlcbpPageToken' +-- +-- * 'mlcbpOauthToken' +-- +-- * 'mlcbpPlayerId' +-- +-- * 'mlcbpMaxResults' +-- +-- * 'mlcbpFields' +-- +-- * 'mlcbpAlt' +metagameListCategoriesByPlayer + :: Text -- ^ 'collection' + -> Text -- ^ 'playerId' + -> MetagameListCategoriesByPlayer +metagameListCategoriesByPlayer pMlcbpCollection_ pMlcbpPlayerId_ = + MetagameListCategoriesByPlayer + { _mlcbpQuotaUser = Nothing + , _mlcbpPrettyPrint = True + , _mlcbpUserIp = Nothing + , _mlcbpCollection = pMlcbpCollection_ + , _mlcbpKey = Nothing + , _mlcbpLanguage = Nothing + , _mlcbpPageToken = Nothing + , _mlcbpOauthToken = Nothing + , _mlcbpPlayerId = pMlcbpPlayerId_ + , _mlcbpMaxResults = Nothing + , _mlcbpFields = Nothing + , _mlcbpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlcbpQuotaUser :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpQuotaUser + = lens _mlcbpQuotaUser + (\ s a -> s{_mlcbpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlcbpPrettyPrint :: Lens' MetagameListCategoriesByPlayer' Bool +mlcbpPrettyPrint + = lens _mlcbpPrettyPrint + (\ s a -> s{_mlcbpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlcbpUserIp :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpUserIp + = lens _mlcbpUserIp (\ s a -> s{_mlcbpUserIp = a}) + +-- | The collection of categories for which data will be returned. +mlcbpCollection :: Lens' MetagameListCategoriesByPlayer' Text +mlcbpCollection + = lens _mlcbpCollection + (\ s a -> s{_mlcbpCollection = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlcbpKey :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpKey = lens _mlcbpKey (\ s a -> s{_mlcbpKey = a}) + +-- | The preferred language to use for strings returned by this method. +mlcbpLanguage :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpLanguage + = lens _mlcbpLanguage + (\ s a -> s{_mlcbpLanguage = a}) + +-- | The token returned by the previous request. +mlcbpPageToken :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpPageToken + = lens _mlcbpPageToken + (\ s a -> s{_mlcbpPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mlcbpOauthToken :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpOauthToken + = lens _mlcbpOauthToken + (\ s a -> s{_mlcbpOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +mlcbpPlayerId :: Lens' MetagameListCategoriesByPlayer' Text +mlcbpPlayerId + = lens _mlcbpPlayerId + (\ s a -> s{_mlcbpPlayerId = a}) + +-- | The maximum number of category resources to return in the response, used +-- for paging. For any response, the actual number of category resources +-- returned may be less than the specified maxResults. +mlcbpMaxResults :: Lens' MetagameListCategoriesByPlayer' (Maybe Int32) +mlcbpMaxResults + = lens _mlcbpMaxResults + (\ s a -> s{_mlcbpMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mlcbpFields :: Lens' MetagameListCategoriesByPlayer' (Maybe Text) +mlcbpFields + = lens _mlcbpFields (\ s a -> s{_mlcbpFields = a}) + +-- | Data format for the response. +mlcbpAlt :: Lens' MetagameListCategoriesByPlayer' Text +mlcbpAlt = lens _mlcbpAlt (\ s a -> s{_mlcbpAlt = a}) + +instance GoogleRequest + MetagameListCategoriesByPlayer' where + type Rs MetagameListCategoriesByPlayer' = + CategoryListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u + MetagameListCategoriesByPlayer{..} + = go _mlcbpQuotaUser _mlcbpPrettyPrint _mlcbpUserIp + _mlcbpCollection + _mlcbpKey + _mlcbpLanguage + _mlcbpPageToken + _mlcbpOauthToken + _mlcbpPlayerId + _mlcbpMaxResults + _mlcbpFields + _mlcbpAlt + where go + = clientWithRoute + (Proxy :: Proxy MetagameListCategoriesByPlayerAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Players/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Players/Get.hs new file mode 100644 index 000000000..b5645e156 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Players/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Players.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the Player resource with the given ID. To retrieve the player +-- for the currently authenticated user, set playerId to me. +-- +-- /See:/ for @GamesPlayersGet@. +module Games.Players.Get + ( + -- * REST Resource + PlayersGetAPI + + -- * Creating a Request + , playersGet + , PlayersGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgKey + , pgLanguage + , pgOauthToken + , pgPlayerId + , pgFields + , pgAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesPlayersGet@ which the +-- 'PlayersGet' request conforms to. +type PlayersGetAPI = + "players" :> + Capture "playerId" Text :> + QueryParam "language" Text :> Get '[JSON] Player + +-- | Retrieves the Player resource with the given ID. To retrieve the player +-- for the currently authenticated user, set playerId to me. +-- +-- /See:/ 'playersGet' smart constructor. +data PlayersGet = PlayersGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgLanguage :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgPlayerId :: !Text + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgKey' +-- +-- * 'pgLanguage' +-- +-- * 'pgOauthToken' +-- +-- * 'pgPlayerId' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +playersGet + :: Text -- ^ 'playerId' + -> PlayersGet +playersGet pPgPlayerId_ = + PlayersGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgKey = Nothing + , _pgLanguage = Nothing + , _pgOauthToken = Nothing + , _pgPlayerId = pPgPlayerId_ + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PlayersGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PlayersGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PlayersGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PlayersGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | The preferred language to use for strings returned by this method. +pgLanguage :: Lens' PlayersGet' (Maybe Text) +pgLanguage + = lens _pgLanguage (\ s a -> s{_pgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PlayersGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +pgPlayerId :: Lens' PlayersGet' Text +pgPlayerId + = lens _pgPlayerId (\ s a -> s{_pgPlayerId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PlayersGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PlayersGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PlayersGet' where + type Rs PlayersGet' = Player + request = requestWithRoute defReq gamesURL + requestWithRoute r u PlayersGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgKey + _pgLanguage + _pgOauthToken + _pgPlayerId + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PlayersGetAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Players/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Players/List.hs new file mode 100644 index 000000000..3fec993be --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Players/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Players.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the collection of players for the currently authenticated user. +-- +-- /See:/ for @GamesPlayersList@. +module Games.Players.List + ( + -- * REST Resource + PlayersListAPI + + -- * Creating a Request + , playersList + , PlayersList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plCollection + , plKey + , plLanguage + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesPlayersList@ which the +-- 'PlayersList' request conforms to. +type PlayersListAPI = + "players" :> + "me" :> + "players" :> + Capture "collection" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] PlayerListResponse + +-- | Get the collection of players for the currently authenticated user. +-- +-- /See:/ 'playersList' smart constructor. +data PlayersList = PlayersList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plCollection :: !Text + , _plKey :: !(Maybe Text) + , _plLanguage :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !(Maybe Int32) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlayersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plCollection' +-- +-- * 'plKey' +-- +-- * 'plLanguage' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +playersList + :: Text -- ^ 'collection' + -> PlayersList +playersList pPlCollection_ = + PlayersList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plCollection = pPlCollection_ + , _plKey = Nothing + , _plLanguage = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PlayersList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PlayersList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PlayersList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | Collection of players being retrieved +plCollection :: Lens' PlayersList' Text +plCollection + = lens _plCollection (\ s a -> s{_plCollection = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PlayersList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | The preferred language to use for strings returned by this method. +plLanguage :: Lens' PlayersList' (Maybe Text) +plLanguage + = lens _plLanguage (\ s a -> s{_plLanguage = a}) + +-- | The token returned by the previous request. +plPageToken :: Lens' PlayersList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PlayersList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | The maximum number of player resources to return in the response, used +-- for paging. For any response, the actual number of player resources +-- returned may be less than the specified maxResults. +plMaxResults :: Lens' PlayersList' (Maybe Int32) +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PlayersList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PlayersList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PlayersList' where + type Rs PlayersList' = PlayerListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u PlayersList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp + _plCollection + _plKey + _plLanguage + _plPageToken + _plOauthToken + _plMaxResults + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PlayersListAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Remove.hs b/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Remove.hs new file mode 100644 index 000000000..b5d88403f --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Remove.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Pushtokens.Remove +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a push token for the current user and application. Removing a +-- non-existent push token will report success. +-- +-- /See:/ for @GamesPushtokensRemove@. +module Games.Pushtokens.Remove + ( + -- * REST Resource + PushtokensRemoveAPI + + -- * Creating a Request + , pushtokensRemove + , PushtokensRemove + + -- * Request Lenses + , prQuotaUser + , prPrettyPrint + , prUserIp + , prKey + , prOauthToken + , prFields + , prAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesPushtokensRemove@ which the +-- 'PushtokensRemove' request conforms to. +type PushtokensRemoveAPI = + "pushtokens" :> "remove" :> Post '[JSON] () + +-- | Removes a push token for the current user and application. Removing a +-- non-existent push token will report success. +-- +-- /See:/ 'pushtokensRemove' smart constructor. +data PushtokensRemove = PushtokensRemove + { _prQuotaUser :: !(Maybe Text) + , _prPrettyPrint :: !Bool + , _prUserIp :: !(Maybe Text) + , _prKey :: !(Maybe Text) + , _prOauthToken :: !(Maybe Text) + , _prFields :: !(Maybe Text) + , _prAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PushtokensRemove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prQuotaUser' +-- +-- * 'prPrettyPrint' +-- +-- * 'prUserIp' +-- +-- * 'prKey' +-- +-- * 'prOauthToken' +-- +-- * 'prFields' +-- +-- * 'prAlt' +pushtokensRemove + :: PushtokensRemove +pushtokensRemove = + PushtokensRemove + { _prQuotaUser = Nothing + , _prPrettyPrint = True + , _prUserIp = Nothing + , _prKey = Nothing + , _prOauthToken = Nothing + , _prFields = Nothing + , _prAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prQuotaUser :: Lens' PushtokensRemove' (Maybe Text) +prQuotaUser + = lens _prQuotaUser (\ s a -> s{_prQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prPrettyPrint :: Lens' PushtokensRemove' Bool +prPrettyPrint + = lens _prPrettyPrint + (\ s a -> s{_prPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prUserIp :: Lens' PushtokensRemove' (Maybe Text) +prUserIp = lens _prUserIp (\ s a -> s{_prUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prKey :: Lens' PushtokensRemove' (Maybe Text) +prKey = lens _prKey (\ s a -> s{_prKey = a}) + +-- | OAuth 2.0 token for the current user. +prOauthToken :: Lens' PushtokensRemove' (Maybe Text) +prOauthToken + = lens _prOauthToken (\ s a -> s{_prOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prFields :: Lens' PushtokensRemove' (Maybe Text) +prFields = lens _prFields (\ s a -> s{_prFields = a}) + +-- | Data format for the response. +prAlt :: Lens' PushtokensRemove' Text +prAlt = lens _prAlt (\ s a -> s{_prAlt = a}) + +instance GoogleRequest PushtokensRemove' where + type Rs PushtokensRemove' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u PushtokensRemove{..} + = go _prQuotaUser _prPrettyPrint _prUserIp _prKey + _prOauthToken + _prFields + _prAlt + where go + = clientWithRoute + (Proxy :: Proxy PushtokensRemoveAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Update.hs b/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Update.hs new file mode 100644 index 000000000..0fd5f6f7f --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Pushtokens/Update.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Pushtokens.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Registers a push token for the current user and application. +-- +-- /See:/ for @GamesPushtokensUpdate@. +module Games.Pushtokens.Update + ( + -- * REST Resource + PushtokensUpdateAPI + + -- * Creating a Request + , pushtokensUpdate + , PushtokensUpdate + + -- * Request Lenses + , puQuotaUser + , puPrettyPrint + , puUserIp + , puKey + , puOauthToken + , puFields + , puAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesPushtokensUpdate@ which the +-- 'PushtokensUpdate' request conforms to. +type PushtokensUpdateAPI = + "pushtokens" :> Put '[JSON] () + +-- | Registers a push token for the current user and application. +-- +-- /See:/ 'pushtokensUpdate' smart constructor. +data PushtokensUpdate = PushtokensUpdate + { _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puKey :: !(Maybe Text) + , _puOauthToken :: !(Maybe Text) + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PushtokensUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puKey' +-- +-- * 'puOauthToken' +-- +-- * 'puFields' +-- +-- * 'puAlt' +pushtokensUpdate + :: PushtokensUpdate +pushtokensUpdate = + PushtokensUpdate + { _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puKey = Nothing + , _puOauthToken = Nothing + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PushtokensUpdate' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PushtokensUpdate' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PushtokensUpdate' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PushtokensUpdate' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PushtokensUpdate' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PushtokensUpdate' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PushtokensUpdate' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PushtokensUpdate' where + type Rs PushtokensUpdate' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u PushtokensUpdate{..} + = go _puQuotaUser _puPrettyPrint _puUserIp _puKey + _puOauthToken + _puFields + _puAlt + where go + = clientWithRoute + (Proxy :: Proxy PushtokensUpdateAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/QuestMilestones/Claim.hs b/gogol-games/gen/Network/Google/Resource/Games/QuestMilestones/Claim.hs new file mode 100644 index 000000000..d601f1521 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/QuestMilestones/Claim.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.QuestMilestones.Claim +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Report that a reward for the milestone corresponding to milestoneId for +-- the quest corresponding to questId has been claimed by the currently +-- authorized user. +-- +-- /See:/ for @GamesQuestMilestonesClaim@. +module Games.QuestMilestones.Claim + ( + -- * REST Resource + QuestMilestonesClaimAPI + + -- * Creating a Request + , questMilestonesClaim + , QuestMilestonesClaim + + -- * Request Lenses + , qmcRequestId + , qmcQuotaUser + , qmcPrettyPrint + , qmcUserIp + , qmcMilestoneId + , qmcKey + , qmcOauthToken + , qmcQuestId + , qmcFields + , qmcAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesQuestMilestonesClaim@ which the +-- 'QuestMilestonesClaim' request conforms to. +type QuestMilestonesClaimAPI = + "quests" :> + Capture "questId" Text :> + "milestones" :> + Capture "milestoneId" Text :> + "claim" :> + QueryParam "requestId" Int64 :> Put '[JSON] () + +-- | Report that a reward for the milestone corresponding to milestoneId for +-- the quest corresponding to questId has been claimed by the currently +-- authorized user. +-- +-- /See:/ 'questMilestonesClaim' smart constructor. +data QuestMilestonesClaim = QuestMilestonesClaim + { _qmcRequestId :: !Int64 + , _qmcQuotaUser :: !(Maybe Text) + , _qmcPrettyPrint :: !Bool + , _qmcUserIp :: !(Maybe Text) + , _qmcMilestoneId :: !Text + , _qmcKey :: !(Maybe Text) + , _qmcOauthToken :: !(Maybe Text) + , _qmcQuestId :: !Text + , _qmcFields :: !(Maybe Text) + , _qmcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestMilestonesClaim'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qmcRequestId' +-- +-- * 'qmcQuotaUser' +-- +-- * 'qmcPrettyPrint' +-- +-- * 'qmcUserIp' +-- +-- * 'qmcMilestoneId' +-- +-- * 'qmcKey' +-- +-- * 'qmcOauthToken' +-- +-- * 'qmcQuestId' +-- +-- * 'qmcFields' +-- +-- * 'qmcAlt' +questMilestonesClaim + :: Int64 -- ^ 'requestId' + -> Text -- ^ 'milestoneId' + -> Text -- ^ 'questId' + -> QuestMilestonesClaim +questMilestonesClaim pQmcRequestId_ pQmcMilestoneId_ pQmcQuestId_ = + QuestMilestonesClaim + { _qmcRequestId = pQmcRequestId_ + , _qmcQuotaUser = Nothing + , _qmcPrettyPrint = True + , _qmcUserIp = Nothing + , _qmcMilestoneId = pQmcMilestoneId_ + , _qmcKey = Nothing + , _qmcOauthToken = Nothing + , _qmcQuestId = pQmcQuestId_ + , _qmcFields = Nothing + , _qmcAlt = "json" + } + +-- | A numeric ID to ensure that the request is handled correctly across +-- retries. Your client application must generate this ID randomly. +qmcRequestId :: Lens' QuestMilestonesClaim' Int64 +qmcRequestId + = lens _qmcRequestId (\ s a -> s{_qmcRequestId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qmcQuotaUser :: Lens' QuestMilestonesClaim' (Maybe Text) +qmcQuotaUser + = lens _qmcQuotaUser (\ s a -> s{_qmcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qmcPrettyPrint :: Lens' QuestMilestonesClaim' Bool +qmcPrettyPrint + = lens _qmcPrettyPrint + (\ s a -> s{_qmcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qmcUserIp :: Lens' QuestMilestonesClaim' (Maybe Text) +qmcUserIp + = lens _qmcUserIp (\ s a -> s{_qmcUserIp = a}) + +-- | The ID of the milestone. +qmcMilestoneId :: Lens' QuestMilestonesClaim' Text +qmcMilestoneId + = lens _qmcMilestoneId + (\ s a -> s{_qmcMilestoneId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qmcKey :: Lens' QuestMilestonesClaim' (Maybe Text) +qmcKey = lens _qmcKey (\ s a -> s{_qmcKey = a}) + +-- | OAuth 2.0 token for the current user. +qmcOauthToken :: Lens' QuestMilestonesClaim' (Maybe Text) +qmcOauthToken + = lens _qmcOauthToken + (\ s a -> s{_qmcOauthToken = a}) + +-- | The ID of the quest. +qmcQuestId :: Lens' QuestMilestonesClaim' Text +qmcQuestId + = lens _qmcQuestId (\ s a -> s{_qmcQuestId = a}) + +-- | Selector specifying which fields to include in a partial response. +qmcFields :: Lens' QuestMilestonesClaim' (Maybe Text) +qmcFields + = lens _qmcFields (\ s a -> s{_qmcFields = a}) + +-- | Data format for the response. +qmcAlt :: Lens' QuestMilestonesClaim' Text +qmcAlt = lens _qmcAlt (\ s a -> s{_qmcAlt = a}) + +instance GoogleRequest QuestMilestonesClaim' where + type Rs QuestMilestonesClaim' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u QuestMilestonesClaim{..} + = go (Just _qmcRequestId) _qmcQuotaUser + _qmcPrettyPrint + _qmcUserIp + _qmcMilestoneId + _qmcKey + _qmcOauthToken + _qmcQuestId + _qmcFields + _qmcAlt + where go + = clientWithRoute + (Proxy :: Proxy QuestMilestonesClaimAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Quests/Accept.hs b/gogol-games/gen/Network/Google/Resource/Games/Quests/Accept.hs new file mode 100644 index 000000000..99782623e --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Quests/Accept.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Quests.Accept +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Indicates that the currently authorized user will participate in the +-- quest. +-- +-- /See:/ for @GamesQuestsAccept@. +module Games.Quests.Accept + ( + -- * REST Resource + QuestsAcceptAPI + + -- * Creating a Request + , questsAccept + , QuestsAccept + + -- * Request Lenses + , qaQuotaUser + , qaPrettyPrint + , qaUserIp + , qaKey + , qaLanguage + , qaOauthToken + , qaQuestId + , qaFields + , qaAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesQuestsAccept@ which the +-- 'QuestsAccept' request conforms to. +type QuestsAcceptAPI = + "quests" :> + Capture "questId" Text :> + "accept" :> + QueryParam "language" Text :> Post '[JSON] Quest + +-- | Indicates that the currently authorized user will participate in the +-- quest. +-- +-- /See:/ 'questsAccept' smart constructor. +data QuestsAccept = QuestsAccept + { _qaQuotaUser :: !(Maybe Text) + , _qaPrettyPrint :: !Bool + , _qaUserIp :: !(Maybe Text) + , _qaKey :: !(Maybe Text) + , _qaLanguage :: !(Maybe Text) + , _qaOauthToken :: !(Maybe Text) + , _qaQuestId :: !Text + , _qaFields :: !(Maybe Text) + , _qaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsAccept'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qaQuotaUser' +-- +-- * 'qaPrettyPrint' +-- +-- * 'qaUserIp' +-- +-- * 'qaKey' +-- +-- * 'qaLanguage' +-- +-- * 'qaOauthToken' +-- +-- * 'qaQuestId' +-- +-- * 'qaFields' +-- +-- * 'qaAlt' +questsAccept + :: Text -- ^ 'questId' + -> QuestsAccept +questsAccept pQaQuestId_ = + QuestsAccept + { _qaQuotaUser = Nothing + , _qaPrettyPrint = True + , _qaUserIp = Nothing + , _qaKey = Nothing + , _qaLanguage = Nothing + , _qaOauthToken = Nothing + , _qaQuestId = pQaQuestId_ + , _qaFields = Nothing + , _qaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qaQuotaUser :: Lens' QuestsAccept' (Maybe Text) +qaQuotaUser + = lens _qaQuotaUser (\ s a -> s{_qaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qaPrettyPrint :: Lens' QuestsAccept' Bool +qaPrettyPrint + = lens _qaPrettyPrint + (\ s a -> s{_qaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qaUserIp :: Lens' QuestsAccept' (Maybe Text) +qaUserIp = lens _qaUserIp (\ s a -> s{_qaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qaKey :: Lens' QuestsAccept' (Maybe Text) +qaKey = lens _qaKey (\ s a -> s{_qaKey = a}) + +-- | The preferred language to use for strings returned by this method. +qaLanguage :: Lens' QuestsAccept' (Maybe Text) +qaLanguage + = lens _qaLanguage (\ s a -> s{_qaLanguage = a}) + +-- | OAuth 2.0 token for the current user. +qaOauthToken :: Lens' QuestsAccept' (Maybe Text) +qaOauthToken + = lens _qaOauthToken (\ s a -> s{_qaOauthToken = a}) + +-- | The ID of the quest. +qaQuestId :: Lens' QuestsAccept' Text +qaQuestId + = lens _qaQuestId (\ s a -> s{_qaQuestId = a}) + +-- | Selector specifying which fields to include in a partial response. +qaFields :: Lens' QuestsAccept' (Maybe Text) +qaFields = lens _qaFields (\ s a -> s{_qaFields = a}) + +-- | Data format for the response. +qaAlt :: Lens' QuestsAccept' Text +qaAlt = lens _qaAlt (\ s a -> s{_qaAlt = a}) + +instance GoogleRequest QuestsAccept' where + type Rs QuestsAccept' = Quest + request = requestWithRoute defReq gamesURL + requestWithRoute r u QuestsAccept{..} + = go _qaQuotaUser _qaPrettyPrint _qaUserIp _qaKey + _qaLanguage + _qaOauthToken + _qaQuestId + _qaFields + _qaAlt + where go + = clientWithRoute (Proxy :: Proxy QuestsAcceptAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Quests/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Quests/List.hs new file mode 100644 index 000000000..b76a6b7ba --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Quests/List.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Quests.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a list of quests for your application and the currently +-- authenticated player. +-- +-- /See:/ for @GamesQuestsList@. +module Games.Quests.List + ( + -- * REST Resource + QuestsListAPI + + -- * Creating a Request + , questsList + , QuestsList + + -- * Request Lenses + , qlQuotaUser + , qlPrettyPrint + , qlUserIp + , qlKey + , qlLanguage + , qlPageToken + , qlOauthToken + , qlPlayerId + , qlMaxResults + , qlFields + , qlAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesQuestsList@ which the +-- 'QuestsList' request conforms to. +type QuestsListAPI = + "players" :> + Capture "playerId" Text :> + "quests" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] QuestListResponse + +-- | Get a list of quests for your application and the currently +-- authenticated player. +-- +-- /See:/ 'questsList' smart constructor. +data QuestsList = QuestsList + { _qlQuotaUser :: !(Maybe Text) + , _qlPrettyPrint :: !Bool + , _qlUserIp :: !(Maybe Text) + , _qlKey :: !(Maybe Text) + , _qlLanguage :: !(Maybe Text) + , _qlPageToken :: !(Maybe Text) + , _qlOauthToken :: !(Maybe Text) + , _qlPlayerId :: !Text + , _qlMaxResults :: !(Maybe Int32) + , _qlFields :: !(Maybe Text) + , _qlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QuestsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qlQuotaUser' +-- +-- * 'qlPrettyPrint' +-- +-- * 'qlUserIp' +-- +-- * 'qlKey' +-- +-- * 'qlLanguage' +-- +-- * 'qlPageToken' +-- +-- * 'qlOauthToken' +-- +-- * 'qlPlayerId' +-- +-- * 'qlMaxResults' +-- +-- * 'qlFields' +-- +-- * 'qlAlt' +questsList + :: Text -- ^ 'playerId' + -> QuestsList +questsList pQlPlayerId_ = + QuestsList + { _qlQuotaUser = Nothing + , _qlPrettyPrint = True + , _qlUserIp = Nothing + , _qlKey = Nothing + , _qlLanguage = Nothing + , _qlPageToken = Nothing + , _qlOauthToken = Nothing + , _qlPlayerId = pQlPlayerId_ + , _qlMaxResults = Nothing + , _qlFields = Nothing + , _qlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +qlQuotaUser :: Lens' QuestsList' (Maybe Text) +qlQuotaUser + = lens _qlQuotaUser (\ s a -> s{_qlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +qlPrettyPrint :: Lens' QuestsList' Bool +qlPrettyPrint + = lens _qlPrettyPrint + (\ s a -> s{_qlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +qlUserIp :: Lens' QuestsList' (Maybe Text) +qlUserIp = lens _qlUserIp (\ s a -> s{_qlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +qlKey :: Lens' QuestsList' (Maybe Text) +qlKey = lens _qlKey (\ s a -> s{_qlKey = a}) + +-- | The preferred language to use for strings returned by this method. +qlLanguage :: Lens' QuestsList' (Maybe Text) +qlLanguage + = lens _qlLanguage (\ s a -> s{_qlLanguage = a}) + +-- | The token returned by the previous request. +qlPageToken :: Lens' QuestsList' (Maybe Text) +qlPageToken + = lens _qlPageToken (\ s a -> s{_qlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +qlOauthToken :: Lens' QuestsList' (Maybe Text) +qlOauthToken + = lens _qlOauthToken (\ s a -> s{_qlOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +qlPlayerId :: Lens' QuestsList' Text +qlPlayerId + = lens _qlPlayerId (\ s a -> s{_qlPlayerId = a}) + +-- | The maximum number of quest resources to return in the response, used +-- for paging. For any response, the actual number of quest resources +-- returned may be less than the specified maxResults. Acceptable values +-- are 1 to 50, inclusive. (Default: 50). +qlMaxResults :: Lens' QuestsList' (Maybe Int32) +qlMaxResults + = lens _qlMaxResults (\ s a -> s{_qlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +qlFields :: Lens' QuestsList' (Maybe Text) +qlFields = lens _qlFields (\ s a -> s{_qlFields = a}) + +-- | Data format for the response. +qlAlt :: Lens' QuestsList' Text +qlAlt = lens _qlAlt (\ s a -> s{_qlAlt = a}) + +instance GoogleRequest QuestsList' where + type Rs QuestsList' = QuestListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u QuestsList{..} + = go _qlQuotaUser _qlPrettyPrint _qlUserIp _qlKey + _qlLanguage + _qlPageToken + _qlOauthToken + _qlPlayerId + _qlMaxResults + _qlFields + _qlAlt + where go + = clientWithRoute (Proxy :: Proxy QuestsListAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Revisions/Check.hs b/gogol-games/gen/Network/Google/Resource/Games/Revisions/Check.hs new file mode 100644 index 000000000..68d45360b --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Revisions/Check.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Revisions.Check +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Checks whether the games client is out of date. +-- +-- /See:/ for @GamesRevisionsCheck@. +module Games.Revisions.Check + ( + -- * REST Resource + RevisionsCheckAPI + + -- * Creating a Request + , revisionsCheck + , RevisionsCheck + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rClientRevision + , rUserIp + , rKey + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRevisionsCheck@ which the +-- 'RevisionsCheck' request conforms to. +type RevisionsCheckAPI = + "revisions" :> + "check" :> + QueryParam "clientRevision" Text :> + Get '[JSON] RevisionCheckResponse + +-- | Checks whether the games client is out of date. +-- +-- /See:/ 'revisionsCheck' smart constructor. +data RevisionsCheck = RevisionsCheck + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rClientRevision :: !Text + , _rUserIp :: !(Maybe Text) + , _rKey :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RevisionsCheck'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rClientRevision' +-- +-- * 'rUserIp' +-- +-- * 'rKey' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +revisionsCheck + :: Text -- ^ 'clientRevision' + -> RevisionsCheck +revisionsCheck pRClientRevision_ = + RevisionsCheck + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rClientRevision = pRClientRevision_ + , _rUserIp = Nothing + , _rKey = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' RevisionsCheck' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' RevisionsCheck' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | The revision of the client SDK used by your application. Format: +-- [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: +-- - \"ANDROID\" - Client is running the Android SDK. - \"IOS\" - Client is +-- running the iOS SDK. - \"WEB_APP\" - Client is running as a Web App. +rClientRevision :: Lens' RevisionsCheck' Text +rClientRevision + = lens _rClientRevision + (\ s a -> s{_rClientRevision = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' RevisionsCheck' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' RevisionsCheck' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' RevisionsCheck' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' RevisionsCheck' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' RevisionsCheck' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest RevisionsCheck' where + type Rs RevisionsCheck' = RevisionCheckResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u RevisionsCheck{..} + = go _rQuotaUser _rPrettyPrint + (Just _rClientRevision) + _rUserIp + _rKey + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute (Proxy :: Proxy RevisionsCheckAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Create.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Create.hs new file mode 100644 index 000000000..aa2488826 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Create.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a room. For internal use by the Games SDK only. Calling this +-- method directly is unsupported. +-- +-- /See:/ for @GamesRoomsCreate@. +module Games.Rooms.Create + ( + -- * REST Resource + RoomsCreateAPI + + -- * Creating a Request + , roomsCreate + , RoomsCreate + + -- * Request Lenses + , rcQuotaUser + , rcPrettyPrint + , rcUserIp + , rcKey + , rcLanguage + , rcOauthToken + , rcFields + , rcAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsCreate@ which the +-- 'RoomsCreate' request conforms to. +type RoomsCreateAPI = + "rooms" :> + "create" :> + QueryParam "language" Text :> Post '[JSON] Room + +-- | Create a room. For internal use by the Games SDK only. Calling this +-- method directly is unsupported. +-- +-- /See:/ 'roomsCreate' smart constructor. +data RoomsCreate = RoomsCreate + { _rcQuotaUser :: !(Maybe Text) + , _rcPrettyPrint :: !Bool + , _rcUserIp :: !(Maybe Text) + , _rcKey :: !(Maybe Text) + , _rcLanguage :: !(Maybe Text) + , _rcOauthToken :: !(Maybe Text) + , _rcFields :: !(Maybe Text) + , _rcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcQuotaUser' +-- +-- * 'rcPrettyPrint' +-- +-- * 'rcUserIp' +-- +-- * 'rcKey' +-- +-- * 'rcLanguage' +-- +-- * 'rcOauthToken' +-- +-- * 'rcFields' +-- +-- * 'rcAlt' +roomsCreate + :: RoomsCreate +roomsCreate = + RoomsCreate + { _rcQuotaUser = Nothing + , _rcPrettyPrint = True + , _rcUserIp = Nothing + , _rcKey = Nothing + , _rcLanguage = Nothing + , _rcOauthToken = Nothing + , _rcFields = Nothing + , _rcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcQuotaUser :: Lens' RoomsCreate' (Maybe Text) +rcQuotaUser + = lens _rcQuotaUser (\ s a -> s{_rcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcPrettyPrint :: Lens' RoomsCreate' Bool +rcPrettyPrint + = lens _rcPrettyPrint + (\ s a -> s{_rcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcUserIp :: Lens' RoomsCreate' (Maybe Text) +rcUserIp = lens _rcUserIp (\ s a -> s{_rcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcKey :: Lens' RoomsCreate' (Maybe Text) +rcKey = lens _rcKey (\ s a -> s{_rcKey = a}) + +-- | The preferred language to use for strings returned by this method. +rcLanguage :: Lens' RoomsCreate' (Maybe Text) +rcLanguage + = lens _rcLanguage (\ s a -> s{_rcLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rcOauthToken :: Lens' RoomsCreate' (Maybe Text) +rcOauthToken + = lens _rcOauthToken (\ s a -> s{_rcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcFields :: Lens' RoomsCreate' (Maybe Text) +rcFields = lens _rcFields (\ s a -> s{_rcFields = a}) + +-- | Data format for the response. +rcAlt :: Lens' RoomsCreate' Text +rcAlt = lens _rcAlt (\ s a -> s{_rcAlt = a}) + +instance GoogleRequest RoomsCreate' where + type Rs RoomsCreate' = Room + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsCreate{..} + = go _rcQuotaUser _rcPrettyPrint _rcUserIp _rcKey + _rcLanguage + _rcOauthToken + _rcFields + _rcAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsCreateAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Decline.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Decline.hs new file mode 100644 index 000000000..f167f7676 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Decline.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Decline +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Decline an invitation to join a room. For internal use by the Games SDK +-- only. Calling this method directly is unsupported. +-- +-- /See:/ for @GamesRoomsDecline@. +module Games.Rooms.Decline + ( + -- * REST Resource + RoomsDeclineAPI + + -- * Creating a Request + , roomsDecline + , RoomsDecline + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdUserIp + , rdKey + , rdRoomId + , rdLanguage + , rdOauthToken + , rdFields + , rdAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsDecline@ which the +-- 'RoomsDecline' request conforms to. +type RoomsDeclineAPI = + "rooms" :> + Capture "roomId" Text :> + "decline" :> + QueryParam "language" Text :> Post '[JSON] Room + +-- | Decline an invitation to join a room. For internal use by the Games SDK +-- only. Calling this method directly is unsupported. +-- +-- /See:/ 'roomsDecline' smart constructor. +data RoomsDecline = RoomsDecline + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdUserIp :: !(Maybe Text) + , _rdKey :: !(Maybe Text) + , _rdRoomId :: !Text + , _rdLanguage :: !(Maybe Text) + , _rdOauthToken :: !(Maybe Text) + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsDecline'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdUserIp' +-- +-- * 'rdKey' +-- +-- * 'rdRoomId' +-- +-- * 'rdLanguage' +-- +-- * 'rdOauthToken' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +roomsDecline + :: Text -- ^ 'roomId' + -> RoomsDecline +roomsDecline pRdRoomId_ = + RoomsDecline + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdUserIp = Nothing + , _rdKey = Nothing + , _rdRoomId = pRdRoomId_ + , _rdLanguage = Nothing + , _rdOauthToken = Nothing + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' RoomsDecline' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' RoomsDecline' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' RoomsDecline' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' RoomsDecline' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | The ID of the room. +rdRoomId :: Lens' RoomsDecline' Text +rdRoomId = lens _rdRoomId (\ s a -> s{_rdRoomId = a}) + +-- | The preferred language to use for strings returned by this method. +rdLanguage :: Lens' RoomsDecline' (Maybe Text) +rdLanguage + = lens _rdLanguage (\ s a -> s{_rdLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' RoomsDecline' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' RoomsDecline' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' RoomsDecline' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest RoomsDecline' where + type Rs RoomsDecline' = Room + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsDecline{..} + = go _rdQuotaUser _rdPrettyPrint _rdUserIp _rdKey + _rdRoomId + _rdLanguage + _rdOauthToken + _rdFields + _rdAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsDeclineAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Dismiss.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Dismiss.hs new file mode 100644 index 000000000..4376623b3 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Dismiss.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Dismiss +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Dismiss an invitation to join a room. For internal use by the Games SDK +-- only. Calling this method directly is unsupported. +-- +-- /See:/ for @GamesRoomsDismiss@. +module Games.Rooms.Dismiss + ( + -- * REST Resource + RoomsDismissAPI + + -- * Creating a Request + , roomsDismiss + , RoomsDismiss + + -- * Request Lenses + , rooQuotaUser + , rooPrettyPrint + , rooUserIp + , rooKey + , rooRoomId + , rooOauthToken + , rooFields + , rooAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsDismiss@ which the +-- 'RoomsDismiss' request conforms to. +type RoomsDismissAPI = + "rooms" :> + Capture "roomId" Text :> "dismiss" :> Post '[JSON] () + +-- | Dismiss an invitation to join a room. For internal use by the Games SDK +-- only. Calling this method directly is unsupported. +-- +-- /See:/ 'roomsDismiss' smart constructor. +data RoomsDismiss = RoomsDismiss + { _rooQuotaUser :: !(Maybe Text) + , _rooPrettyPrint :: !Bool + , _rooUserIp :: !(Maybe Text) + , _rooKey :: !(Maybe Text) + , _rooRoomId :: !Text + , _rooOauthToken :: !(Maybe Text) + , _rooFields :: !(Maybe Text) + , _rooAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsDismiss'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rooQuotaUser' +-- +-- * 'rooPrettyPrint' +-- +-- * 'rooUserIp' +-- +-- * 'rooKey' +-- +-- * 'rooRoomId' +-- +-- * 'rooOauthToken' +-- +-- * 'rooFields' +-- +-- * 'rooAlt' +roomsDismiss + :: Text -- ^ 'roomId' + -> RoomsDismiss +roomsDismiss pRooRoomId_ = + RoomsDismiss + { _rooQuotaUser = Nothing + , _rooPrettyPrint = True + , _rooUserIp = Nothing + , _rooKey = Nothing + , _rooRoomId = pRooRoomId_ + , _rooOauthToken = Nothing + , _rooFields = Nothing + , _rooAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rooQuotaUser :: Lens' RoomsDismiss' (Maybe Text) +rooQuotaUser + = lens _rooQuotaUser (\ s a -> s{_rooQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rooPrettyPrint :: Lens' RoomsDismiss' Bool +rooPrettyPrint + = lens _rooPrettyPrint + (\ s a -> s{_rooPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rooUserIp :: Lens' RoomsDismiss' (Maybe Text) +rooUserIp + = lens _rooUserIp (\ s a -> s{_rooUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rooKey :: Lens' RoomsDismiss' (Maybe Text) +rooKey = lens _rooKey (\ s a -> s{_rooKey = a}) + +-- | The ID of the room. +rooRoomId :: Lens' RoomsDismiss' Text +rooRoomId + = lens _rooRoomId (\ s a -> s{_rooRoomId = a}) + +-- | OAuth 2.0 token for the current user. +rooOauthToken :: Lens' RoomsDismiss' (Maybe Text) +rooOauthToken + = lens _rooOauthToken + (\ s a -> s{_rooOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rooFields :: Lens' RoomsDismiss' (Maybe Text) +rooFields + = lens _rooFields (\ s a -> s{_rooFields = a}) + +-- | Data format for the response. +rooAlt :: Lens' RoomsDismiss' Text +rooAlt = lens _rooAlt (\ s a -> s{_rooAlt = a}) + +instance GoogleRequest RoomsDismiss' where + type Rs RoomsDismiss' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsDismiss{..} + = go _rooQuotaUser _rooPrettyPrint _rooUserIp _rooKey + _rooRoomId + _rooOauthToken + _rooFields + _rooAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsDismissAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Get.hs new file mode 100644 index 000000000..f47a21dfb --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Get.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the data for a room. +-- +-- /See:/ for @GamesRoomsGet@. +module Games.Rooms.Get + ( + -- * REST Resource + RoomsGetAPI + + -- * Creating a Request + , roomsGet + , RoomsGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgKey + , rgRoomId + , rgLanguage + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsGet@ which the +-- 'RoomsGet' request conforms to. +type RoomsGetAPI = + "rooms" :> + Capture "roomId" Text :> + QueryParam "language" Text :> Get '[JSON] Room + +-- | Get the data for a room. +-- +-- /See:/ 'roomsGet' smart constructor. +data RoomsGet = RoomsGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgRoomId :: !Text + , _rgLanguage :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgKey' +-- +-- * 'rgRoomId' +-- +-- * 'rgLanguage' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +roomsGet + :: Text -- ^ 'roomId' + -> RoomsGet +roomsGet pRgRoomId_ = + RoomsGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgKey = Nothing + , _rgRoomId = pRgRoomId_ + , _rgLanguage = Nothing + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' RoomsGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' RoomsGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' RoomsGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' RoomsGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | The ID of the room. +rgRoomId :: Lens' RoomsGet' Text +rgRoomId = lens _rgRoomId (\ s a -> s{_rgRoomId = a}) + +-- | The preferred language to use for strings returned by this method. +rgLanguage :: Lens' RoomsGet' (Maybe Text) +rgLanguage + = lens _rgLanguage (\ s a -> s{_rgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' RoomsGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' RoomsGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' RoomsGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest RoomsGet' where + type Rs RoomsGet' = Room + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp _rgKey + _rgRoomId + _rgLanguage + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsGetAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Join.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Join.hs new file mode 100644 index 000000000..e84e0f836 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Join.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Join +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Join a room. For internal use by the Games SDK only. Calling this method +-- directly is unsupported. +-- +-- /See:/ for @GamesRoomsJoin@. +module Games.Rooms.Join + ( + -- * REST Resource + RoomsJoinAPI + + -- * Creating a Request + , roomsJoin + , RoomsJoin + + -- * Request Lenses + , rjQuotaUser + , rjPrettyPrint + , rjUserIp + , rjKey + , rjRoomId + , rjLanguage + , rjOauthToken + , rjFields + , rjAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsJoin@ which the +-- 'RoomsJoin' request conforms to. +type RoomsJoinAPI = + "rooms" :> + Capture "roomId" Text :> + "join" :> + QueryParam "language" Text :> Post '[JSON] Room + +-- | Join a room. For internal use by the Games SDK only. Calling this method +-- directly is unsupported. +-- +-- /See:/ 'roomsJoin' smart constructor. +data RoomsJoin = RoomsJoin + { _rjQuotaUser :: !(Maybe Text) + , _rjPrettyPrint :: !Bool + , _rjUserIp :: !(Maybe Text) + , _rjKey :: !(Maybe Text) + , _rjRoomId :: !Text + , _rjLanguage :: !(Maybe Text) + , _rjOauthToken :: !(Maybe Text) + , _rjFields :: !(Maybe Text) + , _rjAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsJoin'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rjQuotaUser' +-- +-- * 'rjPrettyPrint' +-- +-- * 'rjUserIp' +-- +-- * 'rjKey' +-- +-- * 'rjRoomId' +-- +-- * 'rjLanguage' +-- +-- * 'rjOauthToken' +-- +-- * 'rjFields' +-- +-- * 'rjAlt' +roomsJoin + :: Text -- ^ 'roomId' + -> RoomsJoin +roomsJoin pRjRoomId_ = + RoomsJoin + { _rjQuotaUser = Nothing + , _rjPrettyPrint = True + , _rjUserIp = Nothing + , _rjKey = Nothing + , _rjRoomId = pRjRoomId_ + , _rjLanguage = Nothing + , _rjOauthToken = Nothing + , _rjFields = Nothing + , _rjAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rjQuotaUser :: Lens' RoomsJoin' (Maybe Text) +rjQuotaUser + = lens _rjQuotaUser (\ s a -> s{_rjQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rjPrettyPrint :: Lens' RoomsJoin' Bool +rjPrettyPrint + = lens _rjPrettyPrint + (\ s a -> s{_rjPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rjUserIp :: Lens' RoomsJoin' (Maybe Text) +rjUserIp = lens _rjUserIp (\ s a -> s{_rjUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rjKey :: Lens' RoomsJoin' (Maybe Text) +rjKey = lens _rjKey (\ s a -> s{_rjKey = a}) + +-- | The ID of the room. +rjRoomId :: Lens' RoomsJoin' Text +rjRoomId = lens _rjRoomId (\ s a -> s{_rjRoomId = a}) + +-- | The preferred language to use for strings returned by this method. +rjLanguage :: Lens' RoomsJoin' (Maybe Text) +rjLanguage + = lens _rjLanguage (\ s a -> s{_rjLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rjOauthToken :: Lens' RoomsJoin' (Maybe Text) +rjOauthToken + = lens _rjOauthToken (\ s a -> s{_rjOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rjFields :: Lens' RoomsJoin' (Maybe Text) +rjFields = lens _rjFields (\ s a -> s{_rjFields = a}) + +-- | Data format for the response. +rjAlt :: Lens' RoomsJoin' Text +rjAlt = lens _rjAlt (\ s a -> s{_rjAlt = a}) + +instance GoogleRequest RoomsJoin' where + type Rs RoomsJoin' = Room + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsJoin{..} + = go _rjQuotaUser _rjPrettyPrint _rjUserIp _rjKey + _rjRoomId + _rjLanguage + _rjOauthToken + _rjFields + _rjAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsJoinAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/Leave.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Leave.hs new file mode 100644 index 000000000..95bc71a6f --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/Leave.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.Leave +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Leave a room. For internal use by the Games SDK only. Calling this +-- method directly is unsupported. +-- +-- /See:/ for @GamesRoomsLeave@. +module Games.Rooms.Leave + ( + -- * REST Resource + RoomsLeaveAPI + + -- * Creating a Request + , roomsLeave + , RoomsLeave + + -- * Request Lenses + , rllQuotaUser + , rllPrettyPrint + , rllUserIp + , rllKey + , rllRoomId + , rllLanguage + , rllOauthToken + , rllFields + , rllAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsLeave@ which the +-- 'RoomsLeave' request conforms to. +type RoomsLeaveAPI = + "rooms" :> + Capture "roomId" Text :> + "leave" :> + QueryParam "language" Text :> Post '[JSON] Room + +-- | Leave a room. For internal use by the Games SDK only. Calling this +-- method directly is unsupported. +-- +-- /See:/ 'roomsLeave' smart constructor. +data RoomsLeave = RoomsLeave + { _rllQuotaUser :: !(Maybe Text) + , _rllPrettyPrint :: !Bool + , _rllUserIp :: !(Maybe Text) + , _rllKey :: !(Maybe Text) + , _rllRoomId :: !Text + , _rllLanguage :: !(Maybe Text) + , _rllOauthToken :: !(Maybe Text) + , _rllFields :: !(Maybe Text) + , _rllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsLeave'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rllQuotaUser' +-- +-- * 'rllPrettyPrint' +-- +-- * 'rllUserIp' +-- +-- * 'rllKey' +-- +-- * 'rllRoomId' +-- +-- * 'rllLanguage' +-- +-- * 'rllOauthToken' +-- +-- * 'rllFields' +-- +-- * 'rllAlt' +roomsLeave + :: Text -- ^ 'roomId' + -> RoomsLeave +roomsLeave pRllRoomId_ = + RoomsLeave + { _rllQuotaUser = Nothing + , _rllPrettyPrint = True + , _rllUserIp = Nothing + , _rllKey = Nothing + , _rllRoomId = pRllRoomId_ + , _rllLanguage = Nothing + , _rllOauthToken = Nothing + , _rllFields = Nothing + , _rllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rllQuotaUser :: Lens' RoomsLeave' (Maybe Text) +rllQuotaUser + = lens _rllQuotaUser (\ s a -> s{_rllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rllPrettyPrint :: Lens' RoomsLeave' Bool +rllPrettyPrint + = lens _rllPrettyPrint + (\ s a -> s{_rllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rllUserIp :: Lens' RoomsLeave' (Maybe Text) +rllUserIp + = lens _rllUserIp (\ s a -> s{_rllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rllKey :: Lens' RoomsLeave' (Maybe Text) +rllKey = lens _rllKey (\ s a -> s{_rllKey = a}) + +-- | The ID of the room. +rllRoomId :: Lens' RoomsLeave' Text +rllRoomId + = lens _rllRoomId (\ s a -> s{_rllRoomId = a}) + +-- | The preferred language to use for strings returned by this method. +rllLanguage :: Lens' RoomsLeave' (Maybe Text) +rllLanguage + = lens _rllLanguage (\ s a -> s{_rllLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rllOauthToken :: Lens' RoomsLeave' (Maybe Text) +rllOauthToken + = lens _rllOauthToken + (\ s a -> s{_rllOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rllFields :: Lens' RoomsLeave' (Maybe Text) +rllFields + = lens _rllFields (\ s a -> s{_rllFields = a}) + +-- | Data format for the response. +rllAlt :: Lens' RoomsLeave' Text +rllAlt = lens _rllAlt (\ s a -> s{_rllAlt = a}) + +instance GoogleRequest RoomsLeave' where + type Rs RoomsLeave' = Room + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsLeave{..} + = go _rllQuotaUser _rllPrettyPrint _rllUserIp _rllKey + _rllRoomId + _rllLanguage + _rllOauthToken + _rllFields + _rllAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsLeaveAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/List.hs new file mode 100644 index 000000000..c86fc9638 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/List.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns invitations to join rooms. +-- +-- /See:/ for @GamesRoomsList@. +module Games.Rooms.List + ( + -- * REST Resource + RoomsListAPI + + -- * Creating a Request + , roomsList + , RoomsList + + -- * Request Lenses + , rlQuotaUser + , rlPrettyPrint + , rlUserIp + , rlKey + , rlLanguage + , rlPageToken + , rlOauthToken + , rlMaxResults + , rlFields + , rlAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsList@ which the +-- 'RoomsList' request conforms to. +type RoomsListAPI = + "rooms" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> Get '[JSON] RoomList + +-- | Returns invitations to join rooms. +-- +-- /See:/ 'roomsList' smart constructor. +data RoomsList = RoomsList + { _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlUserIp :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlLanguage :: !(Maybe Text) + , _rlPageToken :: !(Maybe Text) + , _rlOauthToken :: !(Maybe Text) + , _rlMaxResults :: !(Maybe Int32) + , _rlFields :: !(Maybe Text) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlUserIp' +-- +-- * 'rlKey' +-- +-- * 'rlLanguage' +-- +-- * 'rlPageToken' +-- +-- * 'rlOauthToken' +-- +-- * 'rlMaxResults' +-- +-- * 'rlFields' +-- +-- * 'rlAlt' +roomsList + :: RoomsList +roomsList = + RoomsList + { _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlUserIp = Nothing + , _rlKey = Nothing + , _rlLanguage = Nothing + , _rlPageToken = Nothing + , _rlOauthToken = Nothing + , _rlMaxResults = Nothing + , _rlFields = Nothing + , _rlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' RoomsList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' RoomsList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' RoomsList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' RoomsList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | The preferred language to use for strings returned by this method. +rlLanguage :: Lens' RoomsList' (Maybe Text) +rlLanguage + = lens _rlLanguage (\ s a -> s{_rlLanguage = a}) + +-- | The token returned by the previous request. +rlPageToken :: Lens' RoomsList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' RoomsList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | The maximum number of rooms to return in the response, used for paging. +-- For any response, the actual number of rooms to return may be less than +-- the specified maxResults. +rlMaxResults :: Lens' RoomsList' (Maybe Int32) +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' RoomsList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | Data format for the response. +rlAlt :: Lens' RoomsList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest RoomsList' where + type Rs RoomsList' = RoomList + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsList{..} + = go _rlQuotaUser _rlPrettyPrint _rlUserIp _rlKey + _rlLanguage + _rlPageToken + _rlOauthToken + _rlMaxResults + _rlFields + _rlAlt + where go + = clientWithRoute (Proxy :: Proxy RoomsListAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Rooms/ReportStatus.hs b/gogol-games/gen/Network/Google/Resource/Games/Rooms/ReportStatus.hs new file mode 100644 index 000000000..25cf78c84 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Rooms/ReportStatus.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Rooms.ReportStatus +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates sent by a client reporting the status of peers in a room. For +-- internal use by the Games SDK only. Calling this method directly is +-- unsupported. +-- +-- /See:/ for @GamesRoomsReportStatus@. +module Games.Rooms.ReportStatus + ( + -- * REST Resource + RoomsReportStatusAPI + + -- * Creating a Request + , roomsReportStatus + , RoomsReportStatus + + -- * Request Lenses + , rrsQuotaUser + , rrsPrettyPrint + , rrsUserIp + , rrsKey + , rrsRoomId + , rrsLanguage + , rrsOauthToken + , rrsFields + , rrsAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesRoomsReportStatus@ which the +-- 'RoomsReportStatus' request conforms to. +type RoomsReportStatusAPI = + "rooms" :> + Capture "roomId" Text :> + "reportstatus" :> + QueryParam "language" Text :> Post '[JSON] RoomStatus + +-- | Updates sent by a client reporting the status of peers in a room. For +-- internal use by the Games SDK only. Calling this method directly is +-- unsupported. +-- +-- /See:/ 'roomsReportStatus' smart constructor. +data RoomsReportStatus = RoomsReportStatus + { _rrsQuotaUser :: !(Maybe Text) + , _rrsPrettyPrint :: !Bool + , _rrsUserIp :: !(Maybe Text) + , _rrsKey :: !(Maybe Text) + , _rrsRoomId :: !Text + , _rrsLanguage :: !(Maybe Text) + , _rrsOauthToken :: !(Maybe Text) + , _rrsFields :: !(Maybe Text) + , _rrsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RoomsReportStatus'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrsQuotaUser' +-- +-- * 'rrsPrettyPrint' +-- +-- * 'rrsUserIp' +-- +-- * 'rrsKey' +-- +-- * 'rrsRoomId' +-- +-- * 'rrsLanguage' +-- +-- * 'rrsOauthToken' +-- +-- * 'rrsFields' +-- +-- * 'rrsAlt' +roomsReportStatus + :: Text -- ^ 'roomId' + -> RoomsReportStatus +roomsReportStatus pRrsRoomId_ = + RoomsReportStatus + { _rrsQuotaUser = Nothing + , _rrsPrettyPrint = True + , _rrsUserIp = Nothing + , _rrsKey = Nothing + , _rrsRoomId = pRrsRoomId_ + , _rrsLanguage = Nothing + , _rrsOauthToken = Nothing + , _rrsFields = Nothing + , _rrsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrsQuotaUser :: Lens' RoomsReportStatus' (Maybe Text) +rrsQuotaUser + = lens _rrsQuotaUser (\ s a -> s{_rrsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrsPrettyPrint :: Lens' RoomsReportStatus' Bool +rrsPrettyPrint + = lens _rrsPrettyPrint + (\ s a -> s{_rrsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrsUserIp :: Lens' RoomsReportStatus' (Maybe Text) +rrsUserIp + = lens _rrsUserIp (\ s a -> s{_rrsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrsKey :: Lens' RoomsReportStatus' (Maybe Text) +rrsKey = lens _rrsKey (\ s a -> s{_rrsKey = a}) + +-- | The ID of the room. +rrsRoomId :: Lens' RoomsReportStatus' Text +rrsRoomId + = lens _rrsRoomId (\ s a -> s{_rrsRoomId = a}) + +-- | The preferred language to use for strings returned by this method. +rrsLanguage :: Lens' RoomsReportStatus' (Maybe Text) +rrsLanguage + = lens _rrsLanguage (\ s a -> s{_rrsLanguage = a}) + +-- | OAuth 2.0 token for the current user. +rrsOauthToken :: Lens' RoomsReportStatus' (Maybe Text) +rrsOauthToken + = lens _rrsOauthToken + (\ s a -> s{_rrsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrsFields :: Lens' RoomsReportStatus' (Maybe Text) +rrsFields + = lens _rrsFields (\ s a -> s{_rrsFields = a}) + +-- | Data format for the response. +rrsAlt :: Lens' RoomsReportStatus' Text +rrsAlt = lens _rrsAlt (\ s a -> s{_rrsAlt = a}) + +instance GoogleRequest RoomsReportStatus' where + type Rs RoomsReportStatus' = RoomStatus + request = requestWithRoute defReq gamesURL + requestWithRoute r u RoomsReportStatus{..} + = go _rrsQuotaUser _rrsPrettyPrint _rrsUserIp _rrsKey + _rrsRoomId + _rrsLanguage + _rrsOauthToken + _rrsFields + _rrsAlt + where go + = clientWithRoute + (Proxy :: Proxy RoomsReportStatusAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs new file mode 100644 index 000000000..d4085873e --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Scores.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get high scores, and optionally ranks, in leaderboards for the currently +-- authenticated player. For a specific time span, leaderboardId can be set +-- to ALL to retrieve data for all leaderboards in a given time span. NOTE: +-- You cannot ask for \'ALL\' leaderboards and \'ALL\' timeSpans in the +-- same request; only one parameter may be set to \'ALL\'. +-- +-- /See:/ for @GamesScoresGet@. +module Games.Scores.Get + ( + -- * REST Resource + ScoresGetAPI + + -- * Creating a Request + , scoresGet + , ScoresGet + + -- * Request Lenses + , scoQuotaUser + , scoPrettyPrint + , scoUserIp + , scoTimeSpan + , scoLeaderboardId + , scoKey + , scoIncludeRankType + , scoLanguage + , scoPageToken + , scoOauthToken + , scoPlayerId + , scoMaxResults + , scoFields + , scoAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesScoresGet@ which the +-- 'ScoresGet' request conforms to. +type ScoresGetAPI = + "players" :> + Capture "playerId" Text :> + "leaderboards" :> + Capture "leaderboardId" Text :> + "scores" :> + Capture "timeSpan" Text :> + QueryParam "includeRankType" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] PlayerLeaderboardScoreListResponse + +-- | Get high scores, and optionally ranks, in leaderboards for the currently +-- authenticated player. For a specific time span, leaderboardId can be set +-- to ALL to retrieve data for all leaderboards in a given time span. NOTE: +-- You cannot ask for \'ALL\' leaderboards and \'ALL\' timeSpans in the +-- same request; only one parameter may be set to \'ALL\'. +-- +-- /See:/ 'scoresGet' smart constructor. +data ScoresGet = ScoresGet + { _scoQuotaUser :: !(Maybe Text) + , _scoPrettyPrint :: !Bool + , _scoUserIp :: !(Maybe Text) + , _scoTimeSpan :: !Text + , _scoLeaderboardId :: !Text + , _scoKey :: !(Maybe Text) + , _scoIncludeRankType :: !(Maybe Text) + , _scoLanguage :: !(Maybe Text) + , _scoPageToken :: !(Maybe Text) + , _scoOauthToken :: !(Maybe Text) + , _scoPlayerId :: !Text + , _scoMaxResults :: !(Maybe Int32) + , _scoFields :: !(Maybe Text) + , _scoAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scoQuotaUser' +-- +-- * 'scoPrettyPrint' +-- +-- * 'scoUserIp' +-- +-- * 'scoTimeSpan' +-- +-- * 'scoLeaderboardId' +-- +-- * 'scoKey' +-- +-- * 'scoIncludeRankType' +-- +-- * 'scoLanguage' +-- +-- * 'scoPageToken' +-- +-- * 'scoOauthToken' +-- +-- * 'scoPlayerId' +-- +-- * 'scoMaxResults' +-- +-- * 'scoFields' +-- +-- * 'scoAlt' +scoresGet + :: Text -- ^ 'timeSpan' + -> Text -- ^ 'leaderboardId' + -> Text -- ^ 'playerId' + -> ScoresGet +scoresGet pScoTimeSpan_ pScoLeaderboardId_ pScoPlayerId_ = + ScoresGet + { _scoQuotaUser = Nothing + , _scoPrettyPrint = True + , _scoUserIp = Nothing + , _scoTimeSpan = pScoTimeSpan_ + , _scoLeaderboardId = pScoLeaderboardId_ + , _scoKey = Nothing + , _scoIncludeRankType = Nothing + , _scoLanguage = Nothing + , _scoPageToken = Nothing + , _scoOauthToken = Nothing + , _scoPlayerId = pScoPlayerId_ + , _scoMaxResults = Nothing + , _scoFields = Nothing + , _scoAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scoQuotaUser :: Lens' ScoresGet' (Maybe Text) +scoQuotaUser + = lens _scoQuotaUser (\ s a -> s{_scoQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scoPrettyPrint :: Lens' ScoresGet' Bool +scoPrettyPrint + = lens _scoPrettyPrint + (\ s a -> s{_scoPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scoUserIp :: Lens' ScoresGet' (Maybe Text) +scoUserIp + = lens _scoUserIp (\ s a -> s{_scoUserIp = a}) + +-- | The time span for the scores and ranks you\'re requesting. +scoTimeSpan :: Lens' ScoresGet' Text +scoTimeSpan + = lens _scoTimeSpan (\ s a -> s{_scoTimeSpan = a}) + +-- | The ID of the leaderboard. Can be set to \'ALL\' to retrieve data for +-- all leaderboards for this application. +scoLeaderboardId :: Lens' ScoresGet' Text +scoLeaderboardId + = lens _scoLeaderboardId + (\ s a -> s{_scoLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scoKey :: Lens' ScoresGet' (Maybe Text) +scoKey = lens _scoKey (\ s a -> s{_scoKey = a}) + +-- | The types of ranks to return. If the parameter is omitted, no ranks will +-- be returned. +scoIncludeRankType :: Lens' ScoresGet' (Maybe Text) +scoIncludeRankType + = lens _scoIncludeRankType + (\ s a -> s{_scoIncludeRankType = a}) + +-- | The preferred language to use for strings returned by this method. +scoLanguage :: Lens' ScoresGet' (Maybe Text) +scoLanguage + = lens _scoLanguage (\ s a -> s{_scoLanguage = a}) + +-- | The token returned by the previous request. +scoPageToken :: Lens' ScoresGet' (Maybe Text) +scoPageToken + = lens _scoPageToken (\ s a -> s{_scoPageToken = a}) + +-- | OAuth 2.0 token for the current user. +scoOauthToken :: Lens' ScoresGet' (Maybe Text) +scoOauthToken + = lens _scoOauthToken + (\ s a -> s{_scoOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +scoPlayerId :: Lens' ScoresGet' Text +scoPlayerId + = lens _scoPlayerId (\ s a -> s{_scoPlayerId = a}) + +-- | The maximum number of leaderboard scores to return in the response. For +-- any response, the actual number of leaderboard scores returned may be +-- less than the specified maxResults. +scoMaxResults :: Lens' ScoresGet' (Maybe Int32) +scoMaxResults + = lens _scoMaxResults + (\ s a -> s{_scoMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +scoFields :: Lens' ScoresGet' (Maybe Text) +scoFields + = lens _scoFields (\ s a -> s{_scoFields = a}) + +-- | Data format for the response. +scoAlt :: Lens' ScoresGet' Text +scoAlt = lens _scoAlt (\ s a -> s{_scoAlt = a}) + +instance GoogleRequest ScoresGet' where + type Rs ScoresGet' = + PlayerLeaderboardScoreListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u ScoresGet{..} + = go _scoQuotaUser _scoPrettyPrint _scoUserIp + _scoTimeSpan + _scoLeaderboardId + _scoKey + _scoIncludeRankType + _scoLanguage + _scoPageToken + _scoOauthToken + _scoPlayerId + _scoMaxResults + _scoFields + _scoAlt + where go + = clientWithRoute (Proxy :: Proxy ScoresGetAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Scores/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Scores/List.hs new file mode 100644 index 000000000..6a5c10971 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Scores/List.hs @@ -0,0 +1,217 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Scores.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the scores in a leaderboard, starting from the top. +-- +-- /See:/ for @GamesScoresList@. +module Games.Scores.List + ( + -- * REST Resource + ScoresListAPI + + -- * Creating a Request + , scoresList + , ScoresList + + -- * Request Lenses + , sQuotaUser + , sPrettyPrint + , sUserIp + , sCollection + , sTimeSpan + , sLeaderboardId + , sKey + , sLanguage + , sPageToken + , sOauthToken + , sMaxResults + , sFields + , sAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesScoresList@ which the +-- 'ScoresList' request conforms to. +type ScoresListAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + "scores" :> + Capture "collection" Text :> + QueryParam "timeSpan" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] LeaderboardScores + +-- | Lists the scores in a leaderboard, starting from the top. +-- +-- /See:/ 'scoresList' smart constructor. +data ScoresList = ScoresList + { _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sUserIp :: !(Maybe Text) + , _sCollection :: !Text + , _sTimeSpan :: !Text + , _sLeaderboardId :: !Text + , _sKey :: !(Maybe Text) + , _sLanguage :: !(Maybe Text) + , _sPageToken :: !(Maybe Text) + , _sOauthToken :: !(Maybe Text) + , _sMaxResults :: !(Maybe Int32) + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sUserIp' +-- +-- * 'sCollection' +-- +-- * 'sTimeSpan' +-- +-- * 'sLeaderboardId' +-- +-- * 'sKey' +-- +-- * 'sLanguage' +-- +-- * 'sPageToken' +-- +-- * 'sOauthToken' +-- +-- * 'sMaxResults' +-- +-- * 'sFields' +-- +-- * 'sAlt' +scoresList + :: Text -- ^ 'collection' + -> Text -- ^ 'timeSpan' + -> Text -- ^ 'leaderboardId' + -> ScoresList +scoresList pSCollection_ pSTimeSpan_ pSLeaderboardId_ = + ScoresList + { _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sUserIp = Nothing + , _sCollection = pSCollection_ + , _sTimeSpan = pSTimeSpan_ + , _sLeaderboardId = pSLeaderboardId_ + , _sKey = Nothing + , _sLanguage = Nothing + , _sPageToken = Nothing + , _sOauthToken = Nothing + , _sMaxResults = Nothing + , _sFields = Nothing + , _sAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' ScoresList' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' ScoresList' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' ScoresList' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | The collection of scores you\'re requesting. +sCollection :: Lens' ScoresList' Text +sCollection + = lens _sCollection (\ s a -> s{_sCollection = a}) + +-- | The time span for the scores and ranks you\'re requesting. +sTimeSpan :: Lens' ScoresList' Text +sTimeSpan + = lens _sTimeSpan (\ s a -> s{_sTimeSpan = a}) + +-- | The ID of the leaderboard. +sLeaderboardId :: Lens' ScoresList' Text +sLeaderboardId + = lens _sLeaderboardId + (\ s a -> s{_sLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' ScoresList' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | The preferred language to use for strings returned by this method. +sLanguage :: Lens' ScoresList' (Maybe Text) +sLanguage + = lens _sLanguage (\ s a -> s{_sLanguage = a}) + +-- | The token returned by the previous request. +sPageToken :: Lens' ScoresList' (Maybe Text) +sPageToken + = lens _sPageToken (\ s a -> s{_sPageToken = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' ScoresList' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | The maximum number of leaderboard scores to return in the response. For +-- any response, the actual number of leaderboard scores returned may be +-- less than the specified maxResults. +sMaxResults :: Lens' ScoresList' (Maybe Int32) +sMaxResults + = lens _sMaxResults (\ s a -> s{_sMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' ScoresList' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' ScoresList' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest ScoresList' where + type Rs ScoresList' = LeaderboardScores + request = requestWithRoute defReq gamesURL + requestWithRoute r u ScoresList{..} + = go _sQuotaUser _sPrettyPrint _sUserIp _sCollection + (Just _sTimeSpan) + _sLeaderboardId + _sKey + _sLanguage + _sPageToken + _sOauthToken + _sMaxResults + _sFields + _sAlt + where go + = clientWithRoute (Proxy :: Proxy ScoresListAPI) r u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Scores/ListWindow.hs b/gogol-games/gen/Network/Google/Resource/Games/Scores/ListWindow.hs new file mode 100644 index 000000000..5e124b23c --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Scores/ListWindow.hs @@ -0,0 +1,259 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Scores.ListWindow +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the scores in a leaderboard around (and including) a player\'s +-- score. +-- +-- /See:/ for @GamesScoresListWindow@. +module Games.Scores.ListWindow + ( + -- * REST Resource + ScoresListWindowAPI + + -- * Creating a Request + , scoresListWindow + , ScoresListWindow + + -- * Request Lenses + , slwQuotaUser + , slwPrettyPrint + , slwUserIp + , slwCollection + , slwTimeSpan + , slwReturnTopIfAbsent + , slwLeaderboardId + , slwKey + , slwLanguage + , slwResultsAbove + , slwPageToken + , slwOauthToken + , slwMaxResults + , slwFields + , slwAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesScoresListWindow@ which the +-- 'ScoresListWindow' request conforms to. +type ScoresListWindowAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + "window" :> + Capture "collection" Text :> + QueryParam "timeSpan" Text :> + QueryParam "returnTopIfAbsent" Bool :> + QueryParam "language" Text :> + QueryParam "resultsAbove" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] LeaderboardScores + +-- | Lists the scores in a leaderboard around (and including) a player\'s +-- score. +-- +-- /See:/ 'scoresListWindow' smart constructor. +data ScoresListWindow = ScoresListWindow + { _slwQuotaUser :: !(Maybe Text) + , _slwPrettyPrint :: !Bool + , _slwUserIp :: !(Maybe Text) + , _slwCollection :: !Text + , _slwTimeSpan :: !Text + , _slwReturnTopIfAbsent :: !(Maybe Bool) + , _slwLeaderboardId :: !Text + , _slwKey :: !(Maybe Text) + , _slwLanguage :: !(Maybe Text) + , _slwResultsAbove :: !(Maybe Int32) + , _slwPageToken :: !(Maybe Text) + , _slwOauthToken :: !(Maybe Text) + , _slwMaxResults :: !(Maybe Int32) + , _slwFields :: !(Maybe Text) + , _slwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresListWindow'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slwQuotaUser' +-- +-- * 'slwPrettyPrint' +-- +-- * 'slwUserIp' +-- +-- * 'slwCollection' +-- +-- * 'slwTimeSpan' +-- +-- * 'slwReturnTopIfAbsent' +-- +-- * 'slwLeaderboardId' +-- +-- * 'slwKey' +-- +-- * 'slwLanguage' +-- +-- * 'slwResultsAbove' +-- +-- * 'slwPageToken' +-- +-- * 'slwOauthToken' +-- +-- * 'slwMaxResults' +-- +-- * 'slwFields' +-- +-- * 'slwAlt' +scoresListWindow + :: Text -- ^ 'collection' + -> Text -- ^ 'timeSpan' + -> Text -- ^ 'leaderboardId' + -> ScoresListWindow +scoresListWindow pSlwCollection_ pSlwTimeSpan_ pSlwLeaderboardId_ = + ScoresListWindow + { _slwQuotaUser = Nothing + , _slwPrettyPrint = True + , _slwUserIp = Nothing + , _slwCollection = pSlwCollection_ + , _slwTimeSpan = pSlwTimeSpan_ + , _slwReturnTopIfAbsent = Nothing + , _slwLeaderboardId = pSlwLeaderboardId_ + , _slwKey = Nothing + , _slwLanguage = Nothing + , _slwResultsAbove = Nothing + , _slwPageToken = Nothing + , _slwOauthToken = Nothing + , _slwMaxResults = Nothing + , _slwFields = Nothing + , _slwAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slwQuotaUser :: Lens' ScoresListWindow' (Maybe Text) +slwQuotaUser + = lens _slwQuotaUser (\ s a -> s{_slwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slwPrettyPrint :: Lens' ScoresListWindow' Bool +slwPrettyPrint + = lens _slwPrettyPrint + (\ s a -> s{_slwPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slwUserIp :: Lens' ScoresListWindow' (Maybe Text) +slwUserIp + = lens _slwUserIp (\ s a -> s{_slwUserIp = a}) + +-- | The collection of scores you\'re requesting. +slwCollection :: Lens' ScoresListWindow' Text +slwCollection + = lens _slwCollection + (\ s a -> s{_slwCollection = a}) + +-- | The time span for the scores and ranks you\'re requesting. +slwTimeSpan :: Lens' ScoresListWindow' Text +slwTimeSpan + = lens _slwTimeSpan (\ s a -> s{_slwTimeSpan = a}) + +-- | True if the top scores should be returned when the player is not in the +-- leaderboard. Defaults to true. +slwReturnTopIfAbsent :: Lens' ScoresListWindow' (Maybe Bool) +slwReturnTopIfAbsent + = lens _slwReturnTopIfAbsent + (\ s a -> s{_slwReturnTopIfAbsent = a}) + +-- | The ID of the leaderboard. +slwLeaderboardId :: Lens' ScoresListWindow' Text +slwLeaderboardId + = lens _slwLeaderboardId + (\ s a -> s{_slwLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slwKey :: Lens' ScoresListWindow' (Maybe Text) +slwKey = lens _slwKey (\ s a -> s{_slwKey = a}) + +-- | The preferred language to use for strings returned by this method. +slwLanguage :: Lens' ScoresListWindow' (Maybe Text) +slwLanguage + = lens _slwLanguage (\ s a -> s{_slwLanguage = a}) + +-- | The preferred number of scores to return above the player\'s score. More +-- scores may be returned if the player is at the bottom of the +-- leaderboard; fewer may be returned if the player is at the top. Must be +-- less than or equal to maxResults. +slwResultsAbove :: Lens' ScoresListWindow' (Maybe Int32) +slwResultsAbove + = lens _slwResultsAbove + (\ s a -> s{_slwResultsAbove = a}) + +-- | The token returned by the previous request. +slwPageToken :: Lens' ScoresListWindow' (Maybe Text) +slwPageToken + = lens _slwPageToken (\ s a -> s{_slwPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slwOauthToken :: Lens' ScoresListWindow' (Maybe Text) +slwOauthToken + = lens _slwOauthToken + (\ s a -> s{_slwOauthToken = a}) + +-- | The maximum number of leaderboard scores to return in the response. For +-- any response, the actual number of leaderboard scores returned may be +-- less than the specified maxResults. +slwMaxResults :: Lens' ScoresListWindow' (Maybe Int32) +slwMaxResults + = lens _slwMaxResults + (\ s a -> s{_slwMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slwFields :: Lens' ScoresListWindow' (Maybe Text) +slwFields + = lens _slwFields (\ s a -> s{_slwFields = a}) + +-- | Data format for the response. +slwAlt :: Lens' ScoresListWindow' Text +slwAlt = lens _slwAlt (\ s a -> s{_slwAlt = a}) + +instance GoogleRequest ScoresListWindow' where + type Rs ScoresListWindow' = LeaderboardScores + request = requestWithRoute defReq gamesURL + requestWithRoute r u ScoresListWindow{..} + = go _slwQuotaUser _slwPrettyPrint _slwUserIp + _slwCollection + (Just _slwTimeSpan) + _slwReturnTopIfAbsent + _slwLeaderboardId + _slwKey + _slwLanguage + _slwResultsAbove + _slwPageToken + _slwOauthToken + _slwMaxResults + _slwFields + _slwAlt + where go + = clientWithRoute + (Proxy :: Proxy ScoresListWindowAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Scores/Submit.hs b/gogol-games/gen/Network/Google/Resource/Games/Scores/Submit.hs new file mode 100644 index 000000000..8b37fbb40 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Scores/Submit.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Scores.Submit +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submits a score to the specified leaderboard. +-- +-- /See:/ for @GamesScoresSubmit@. +module Games.Scores.Submit + ( + -- * REST Resource + ScoresSubmitAPI + + -- * Creating a Request + , scoresSubmit + , ScoresSubmit + + -- * Request Lenses + , sssQuotaUser + , sssPrettyPrint + , sssScoreTag + , sssScore + , sssUserIp + , sssLeaderboardId + , sssKey + , sssLanguage + , sssOauthToken + , sssFields + , sssAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesScoresSubmit@ which the +-- 'ScoresSubmit' request conforms to. +type ScoresSubmitAPI = + "leaderboards" :> + Capture "leaderboardId" Text :> + "scores" :> + QueryParam "scoreTag" Text :> + QueryParam "score" Int64 :> + QueryParam "language" Text :> + Post '[JSON] PlayerScoreResponse + +-- | Submits a score to the specified leaderboard. +-- +-- /See:/ 'scoresSubmit' smart constructor. +data ScoresSubmit = ScoresSubmit + { _sssQuotaUser :: !(Maybe Text) + , _sssPrettyPrint :: !Bool + , _sssScoreTag :: !(Maybe Text) + , _sssScore :: !Int64 + , _sssUserIp :: !(Maybe Text) + , _sssLeaderboardId :: !Text + , _sssKey :: !(Maybe Text) + , _sssLanguage :: !(Maybe Text) + , _sssOauthToken :: !(Maybe Text) + , _sssFields :: !(Maybe Text) + , _sssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresSubmit'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sssQuotaUser' +-- +-- * 'sssPrettyPrint' +-- +-- * 'sssScoreTag' +-- +-- * 'sssScore' +-- +-- * 'sssUserIp' +-- +-- * 'sssLeaderboardId' +-- +-- * 'sssKey' +-- +-- * 'sssLanguage' +-- +-- * 'sssOauthToken' +-- +-- * 'sssFields' +-- +-- * 'sssAlt' +scoresSubmit + :: Int64 -- ^ 'score' + -> Text -- ^ 'leaderboardId' + -> ScoresSubmit +scoresSubmit pSssScore_ pSssLeaderboardId_ = + ScoresSubmit + { _sssQuotaUser = Nothing + , _sssPrettyPrint = True + , _sssScoreTag = Nothing + , _sssScore = pSssScore_ + , _sssUserIp = Nothing + , _sssLeaderboardId = pSssLeaderboardId_ + , _sssKey = Nothing + , _sssLanguage = Nothing + , _sssOauthToken = Nothing + , _sssFields = Nothing + , _sssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sssQuotaUser :: Lens' ScoresSubmit' (Maybe Text) +sssQuotaUser + = lens _sssQuotaUser (\ s a -> s{_sssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sssPrettyPrint :: Lens' ScoresSubmit' Bool +sssPrettyPrint + = lens _sssPrettyPrint + (\ s a -> s{_sssPrettyPrint = a}) + +-- | Additional information about the score you\'re submitting. Values must +-- contain no more than 64 URI-safe characters as defined by section 2.3 of +-- RFC 3986. +sssScoreTag :: Lens' ScoresSubmit' (Maybe Text) +sssScoreTag + = lens _sssScoreTag (\ s a -> s{_sssScoreTag = a}) + +-- | The score you\'re submitting. The submitted score is ignored if it is +-- worse than a previously submitted score, where worse depends on the +-- leaderboard sort order. The meaning of the score value depends on the +-- leaderboard format type. For fixed-point, the score represents the raw +-- value. For time, the score represents elapsed time in milliseconds. For +-- currency, the score represents a value in micro units. +sssScore :: Lens' ScoresSubmit' Int64 +sssScore = lens _sssScore (\ s a -> s{_sssScore = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sssUserIp :: Lens' ScoresSubmit' (Maybe Text) +sssUserIp + = lens _sssUserIp (\ s a -> s{_sssUserIp = a}) + +-- | The ID of the leaderboard. +sssLeaderboardId :: Lens' ScoresSubmit' Text +sssLeaderboardId + = lens _sssLeaderboardId + (\ s a -> s{_sssLeaderboardId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sssKey :: Lens' ScoresSubmit' (Maybe Text) +sssKey = lens _sssKey (\ s a -> s{_sssKey = a}) + +-- | The preferred language to use for strings returned by this method. +sssLanguage :: Lens' ScoresSubmit' (Maybe Text) +sssLanguage + = lens _sssLanguage (\ s a -> s{_sssLanguage = a}) + +-- | OAuth 2.0 token for the current user. +sssOauthToken :: Lens' ScoresSubmit' (Maybe Text) +sssOauthToken + = lens _sssOauthToken + (\ s a -> s{_sssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sssFields :: Lens' ScoresSubmit' (Maybe Text) +sssFields + = lens _sssFields (\ s a -> s{_sssFields = a}) + +-- | Data format for the response. +sssAlt :: Lens' ScoresSubmit' Text +sssAlt = lens _sssAlt (\ s a -> s{_sssAlt = a}) + +instance GoogleRequest ScoresSubmit' where + type Rs ScoresSubmit' = PlayerScoreResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u ScoresSubmit{..} + = go _sssQuotaUser _sssPrettyPrint _sssScoreTag + (Just _sssScore) + _sssUserIp + _sssLeaderboardId + _sssKey + _sssLanguage + _sssOauthToken + _sssFields + _sssAlt + where go + = clientWithRoute (Proxy :: Proxy ScoresSubmitAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Scores/SubmitMultiple.hs b/gogol-games/gen/Network/Google/Resource/Games/Scores/SubmitMultiple.hs new file mode 100644 index 000000000..ab5de8025 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Scores/SubmitMultiple.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Scores.SubmitMultiple +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submits multiple scores to leaderboards. +-- +-- /See:/ for @GamesScoresSubmitMultiple@. +module Games.Scores.SubmitMultiple + ( + -- * REST Resource + ScoresSubmitMultipleAPI + + -- * Creating a Request + , scoresSubmitMultiple + , ScoresSubmitMultiple + + -- * Request Lenses + , ssmQuotaUser + , ssmPrettyPrint + , ssmUserIp + , ssmKey + , ssmLanguage + , ssmOauthToken + , ssmFields + , ssmAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesScoresSubmitMultiple@ which the +-- 'ScoresSubmitMultiple' request conforms to. +type ScoresSubmitMultipleAPI = + "leaderboards" :> + "scores" :> + QueryParam "language" Text :> + Post '[JSON] PlayerScoreListResponse + +-- | Submits multiple scores to leaderboards. +-- +-- /See:/ 'scoresSubmitMultiple' smart constructor. +data ScoresSubmitMultiple = ScoresSubmitMultiple + { _ssmQuotaUser :: !(Maybe Text) + , _ssmPrettyPrint :: !Bool + , _ssmUserIp :: !(Maybe Text) + , _ssmKey :: !(Maybe Text) + , _ssmLanguage :: !(Maybe Text) + , _ssmOauthToken :: !(Maybe Text) + , _ssmFields :: !(Maybe Text) + , _ssmAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScoresSubmitMultiple'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssmQuotaUser' +-- +-- * 'ssmPrettyPrint' +-- +-- * 'ssmUserIp' +-- +-- * 'ssmKey' +-- +-- * 'ssmLanguage' +-- +-- * 'ssmOauthToken' +-- +-- * 'ssmFields' +-- +-- * 'ssmAlt' +scoresSubmitMultiple + :: ScoresSubmitMultiple +scoresSubmitMultiple = + ScoresSubmitMultiple + { _ssmQuotaUser = Nothing + , _ssmPrettyPrint = True + , _ssmUserIp = Nothing + , _ssmKey = Nothing + , _ssmLanguage = Nothing + , _ssmOauthToken = Nothing + , _ssmFields = Nothing + , _ssmAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ssmQuotaUser :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmQuotaUser + = lens _ssmQuotaUser (\ s a -> s{_ssmQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ssmPrettyPrint :: Lens' ScoresSubmitMultiple' Bool +ssmPrettyPrint + = lens _ssmPrettyPrint + (\ s a -> s{_ssmPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ssmUserIp :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmUserIp + = lens _ssmUserIp (\ s a -> s{_ssmUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ssmKey :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmKey = lens _ssmKey (\ s a -> s{_ssmKey = a}) + +-- | The preferred language to use for strings returned by this method. +ssmLanguage :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmLanguage + = lens _ssmLanguage (\ s a -> s{_ssmLanguage = a}) + +-- | OAuth 2.0 token for the current user. +ssmOauthToken :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmOauthToken + = lens _ssmOauthToken + (\ s a -> s{_ssmOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ssmFields :: Lens' ScoresSubmitMultiple' (Maybe Text) +ssmFields + = lens _ssmFields (\ s a -> s{_ssmFields = a}) + +-- | Data format for the response. +ssmAlt :: Lens' ScoresSubmitMultiple' Text +ssmAlt = lens _ssmAlt (\ s a -> s{_ssmAlt = a}) + +instance GoogleRequest ScoresSubmitMultiple' where + type Rs ScoresSubmitMultiple' = + PlayerScoreListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u ScoresSubmitMultiple{..} + = go _ssmQuotaUser _ssmPrettyPrint _ssmUserIp _ssmKey + _ssmLanguage + _ssmOauthToken + _ssmFields + _ssmAlt + where go + = clientWithRoute + (Proxy :: Proxy ScoresSubmitMultipleAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Snapshots/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/Snapshots/Get.hs new file mode 100644 index 000000000..3b8eb2f05 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Snapshots/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Snapshots.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the metadata for a given snapshot ID. +-- +-- /See:/ for @GamesSnapshotsGet@. +module Games.Snapshots.Get + ( + -- * REST Resource + SnapshotsGetAPI + + -- * Creating a Request + , snapshotsGet + , SnapshotsGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgKey + , sgLanguage + , sgOauthToken + , sgFields + , sgSnapshotId + , sgAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesSnapshotsGet@ which the +-- 'SnapshotsGet' request conforms to. +type SnapshotsGetAPI = + "snapshots" :> + Capture "snapshotId" Text :> + QueryParam "language" Text :> Get '[JSON] Snapshot + +-- | Retrieves the metadata for a given snapshot ID. +-- +-- /See:/ 'snapshotsGet' smart constructor. +data SnapshotsGet = SnapshotsGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgKey :: !(Maybe Text) + , _sgLanguage :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgSnapshotId :: !Text + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgKey' +-- +-- * 'sgLanguage' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgSnapshotId' +-- +-- * 'sgAlt' +snapshotsGet + :: Text -- ^ 'snapshotId' + -> SnapshotsGet +snapshotsGet pSgSnapshotId_ = + SnapshotsGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgKey = Nothing + , _sgLanguage = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgSnapshotId = pSgSnapshotId_ + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SnapshotsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SnapshotsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SnapshotsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SnapshotsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | The preferred language to use for strings returned by this method. +sgLanguage :: Lens' SnapshotsGet' (Maybe Text) +sgLanguage + = lens _sgLanguage (\ s a -> s{_sgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SnapshotsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SnapshotsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | The ID of the snapshot. +sgSnapshotId :: Lens' SnapshotsGet' Text +sgSnapshotId + = lens _sgSnapshotId (\ s a -> s{_sgSnapshotId = a}) + +-- | Data format for the response. +sgAlt :: Lens' SnapshotsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SnapshotsGet' where + type Rs SnapshotsGet' = Snapshot + request = requestWithRoute defReq gamesURL + requestWithRoute r u SnapshotsGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp _sgKey + _sgLanguage + _sgOauthToken + _sgFields + _sgSnapshotId + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SnapshotsGetAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/Snapshots/List.hs b/gogol-games/gen/Network/Google/Resource/Games/Snapshots/List.hs new file mode 100644 index 000000000..b290691e9 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/Snapshots/List.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.Snapshots.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of snapshots created by your application for the player +-- corresponding to the player ID. +-- +-- /See:/ for @GamesSnapshotsList@. +module Games.Snapshots.List + ( + -- * REST Resource + SnapshotsListAPI + + -- * Creating a Request + , snapshotsList + , SnapshotsList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slLanguage + , slPageToken + , slOauthToken + , slPlayerId + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesSnapshotsList@ which the +-- 'SnapshotsList' request conforms to. +type SnapshotsListAPI = + "players" :> + Capture "playerId" Text :> + "snapshots" :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] SnapshotListResponse + +-- | Retrieves a list of snapshots created by your application for the player +-- corresponding to the player ID. +-- +-- /See:/ 'snapshotsList' smart constructor. +data SnapshotsList = SnapshotsList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slLanguage :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slPlayerId :: !Text + , _slMaxResults :: !(Maybe Int32) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SnapshotsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slLanguage' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slPlayerId' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +snapshotsList + :: Text -- ^ 'playerId' + -> SnapshotsList +snapshotsList pSlPlayerId_ = + SnapshotsList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slLanguage = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slPlayerId = pSlPlayerId_ + , _slMaxResults = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SnapshotsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SnapshotsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SnapshotsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SnapshotsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | The preferred language to use for strings returned by this method. +slLanguage :: Lens' SnapshotsList' (Maybe Text) +slLanguage + = lens _slLanguage (\ s a -> s{_slLanguage = a}) + +-- | The token returned by the previous request. +slPageToken :: Lens' SnapshotsList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SnapshotsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | A player ID. A value of me may be used in place of the authenticated +-- player\'s ID. +slPlayerId :: Lens' SnapshotsList' Text +slPlayerId + = lens _slPlayerId (\ s a -> s{_slPlayerId = a}) + +-- | The maximum number of snapshot resources to return in the response, used +-- for paging. For any response, the actual number of snapshot resources +-- returned may be less than the specified maxResults. +slMaxResults :: Lens' SnapshotsList' (Maybe Int32) +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SnapshotsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SnapshotsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SnapshotsList' where + type Rs SnapshotsList' = SnapshotListResponse + request = requestWithRoute defReq gamesURL + requestWithRoute r u SnapshotsList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp _slKey + _slLanguage + _slPageToken + _slOauthToken + _slPlayerId + _slMaxResults + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SnapshotsListAPI) r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Cancel.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Cancel.hs new file mode 100644 index 000000000..fd163fab3 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Cancel.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancel a turn-based match. +-- +-- /See:/ for @GamesTurnBasedMatchesCancel@. +module Games.TurnBasedMatches.Cancel + ( + -- * REST Resource + TurnBasedMatchesCancelAPI + + -- * Creating a Request + , turnBasedMatchesCancel + , TurnBasedMatchesCancel + + -- * Request Lenses + , tbmcbQuotaUser + , tbmcbPrettyPrint + , tbmcbUserIp + , tbmcbKey + , tbmcbOauthToken + , tbmcbMatchId + , tbmcbFields + , tbmcbAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesCancel@ which the +-- 'TurnBasedMatchesCancel' request conforms to. +type TurnBasedMatchesCancelAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> "cancel" :> Put '[JSON] () + +-- | Cancel a turn-based match. +-- +-- /See:/ 'turnBasedMatchesCancel' smart constructor. +data TurnBasedMatchesCancel = TurnBasedMatchesCancel + { _tbmcbQuotaUser :: !(Maybe Text) + , _tbmcbPrettyPrint :: !Bool + , _tbmcbUserIp :: !(Maybe Text) + , _tbmcbKey :: !(Maybe Text) + , _tbmcbOauthToken :: !(Maybe Text) + , _tbmcbMatchId :: !Text + , _tbmcbFields :: !(Maybe Text) + , _tbmcbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmcbQuotaUser' +-- +-- * 'tbmcbPrettyPrint' +-- +-- * 'tbmcbUserIp' +-- +-- * 'tbmcbKey' +-- +-- * 'tbmcbOauthToken' +-- +-- * 'tbmcbMatchId' +-- +-- * 'tbmcbFields' +-- +-- * 'tbmcbAlt' +turnBasedMatchesCancel + :: Text -- ^ 'matchId' + -> TurnBasedMatchesCancel +turnBasedMatchesCancel pTbmcbMatchId_ = + TurnBasedMatchesCancel + { _tbmcbQuotaUser = Nothing + , _tbmcbPrettyPrint = True + , _tbmcbUserIp = Nothing + , _tbmcbKey = Nothing + , _tbmcbOauthToken = Nothing + , _tbmcbMatchId = pTbmcbMatchId_ + , _tbmcbFields = Nothing + , _tbmcbAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmcbQuotaUser :: Lens' TurnBasedMatchesCancel' (Maybe Text) +tbmcbQuotaUser + = lens _tbmcbQuotaUser + (\ s a -> s{_tbmcbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmcbPrettyPrint :: Lens' TurnBasedMatchesCancel' Bool +tbmcbPrettyPrint + = lens _tbmcbPrettyPrint + (\ s a -> s{_tbmcbPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmcbUserIp :: Lens' TurnBasedMatchesCancel' (Maybe Text) +tbmcbUserIp + = lens _tbmcbUserIp (\ s a -> s{_tbmcbUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmcbKey :: Lens' TurnBasedMatchesCancel' (Maybe Text) +tbmcbKey = lens _tbmcbKey (\ s a -> s{_tbmcbKey = a}) + +-- | OAuth 2.0 token for the current user. +tbmcbOauthToken :: Lens' TurnBasedMatchesCancel' (Maybe Text) +tbmcbOauthToken + = lens _tbmcbOauthToken + (\ s a -> s{_tbmcbOauthToken = a}) + +-- | The ID of the match. +tbmcbMatchId :: Lens' TurnBasedMatchesCancel' Text +tbmcbMatchId + = lens _tbmcbMatchId (\ s a -> s{_tbmcbMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmcbFields :: Lens' TurnBasedMatchesCancel' (Maybe Text) +tbmcbFields + = lens _tbmcbFields (\ s a -> s{_tbmcbFields = a}) + +-- | Data format for the response. +tbmcbAlt :: Lens' TurnBasedMatchesCancel' Text +tbmcbAlt = lens _tbmcbAlt (\ s a -> s{_tbmcbAlt = a}) + +instance GoogleRequest TurnBasedMatchesCancel' where + type Rs TurnBasedMatchesCancel' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesCancel{..} + = go _tbmcbQuotaUser _tbmcbPrettyPrint _tbmcbUserIp + _tbmcbKey + _tbmcbOauthToken + _tbmcbMatchId + _tbmcbFields + _tbmcbAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesCancelAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Create.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Create.hs new file mode 100644 index 000000000..4de2ae0ab --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Create.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a turn-based match. +-- +-- /See:/ for @GamesTurnBasedMatchesCreate@. +module Games.TurnBasedMatches.Create + ( + -- * REST Resource + TurnBasedMatchesCreateAPI + + -- * Creating a Request + , turnBasedMatchesCreate + , TurnBasedMatchesCreate + + -- * Request Lenses + , tbmcQuotaUser + , tbmcPrettyPrint + , tbmcUserIp + , tbmcKey + , tbmcLanguage + , tbmcOauthToken + , tbmcFields + , tbmcAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesCreate@ which the +-- 'TurnBasedMatchesCreate' request conforms to. +type TurnBasedMatchesCreateAPI = + "turnbasedmatches" :> + "create" :> + QueryParam "language" Text :> + Post '[JSON] TurnBasedMatch + +-- | Create a turn-based match. +-- +-- /See:/ 'turnBasedMatchesCreate' smart constructor. +data TurnBasedMatchesCreate = TurnBasedMatchesCreate + { _tbmcQuotaUser :: !(Maybe Text) + , _tbmcPrettyPrint :: !Bool + , _tbmcUserIp :: !(Maybe Text) + , _tbmcKey :: !(Maybe Text) + , _tbmcLanguage :: !(Maybe Text) + , _tbmcOauthToken :: !(Maybe Text) + , _tbmcFields :: !(Maybe Text) + , _tbmcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmcQuotaUser' +-- +-- * 'tbmcPrettyPrint' +-- +-- * 'tbmcUserIp' +-- +-- * 'tbmcKey' +-- +-- * 'tbmcLanguage' +-- +-- * 'tbmcOauthToken' +-- +-- * 'tbmcFields' +-- +-- * 'tbmcAlt' +turnBasedMatchesCreate + :: TurnBasedMatchesCreate +turnBasedMatchesCreate = + TurnBasedMatchesCreate + { _tbmcQuotaUser = Nothing + , _tbmcPrettyPrint = True + , _tbmcUserIp = Nothing + , _tbmcKey = Nothing + , _tbmcLanguage = Nothing + , _tbmcOauthToken = Nothing + , _tbmcFields = Nothing + , _tbmcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmcQuotaUser :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcQuotaUser + = lens _tbmcQuotaUser + (\ s a -> s{_tbmcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmcPrettyPrint :: Lens' TurnBasedMatchesCreate' Bool +tbmcPrettyPrint + = lens _tbmcPrettyPrint + (\ s a -> s{_tbmcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmcUserIp :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcUserIp + = lens _tbmcUserIp (\ s a -> s{_tbmcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmcKey :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcKey = lens _tbmcKey (\ s a -> s{_tbmcKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmcLanguage :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcLanguage + = lens _tbmcLanguage (\ s a -> s{_tbmcLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmcOauthToken :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcOauthToken + = lens _tbmcOauthToken + (\ s a -> s{_tbmcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmcFields :: Lens' TurnBasedMatchesCreate' (Maybe Text) +tbmcFields + = lens _tbmcFields (\ s a -> s{_tbmcFields = a}) + +-- | Data format for the response. +tbmcAlt :: Lens' TurnBasedMatchesCreate' Text +tbmcAlt = lens _tbmcAlt (\ s a -> s{_tbmcAlt = a}) + +instance GoogleRequest TurnBasedMatchesCreate' where + type Rs TurnBasedMatchesCreate' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesCreate{..} + = go _tbmcQuotaUser _tbmcPrettyPrint _tbmcUserIp + _tbmcKey + _tbmcLanguage + _tbmcOauthToken + _tbmcFields + _tbmcAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesCreateAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Decline.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Decline.hs new file mode 100644 index 000000000..ffad817c0 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Decline.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Decline +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Decline an invitation to play a turn-based match. +-- +-- /See:/ for @GamesTurnBasedMatchesDecline@. +module Games.TurnBasedMatches.Decline + ( + -- * REST Resource + TurnBasedMatchesDeclineAPI + + -- * Creating a Request + , turnBasedMatchesDecline + , TurnBasedMatchesDecline + + -- * Request Lenses + , tbmdQuotaUser + , tbmdPrettyPrint + , tbmdUserIp + , tbmdKey + , tbmdLanguage + , tbmdOauthToken + , tbmdMatchId + , tbmdFields + , tbmdAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesDecline@ which the +-- 'TurnBasedMatchesDecline' request conforms to. +type TurnBasedMatchesDeclineAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "decline" :> + QueryParam "language" Text :> + Put '[JSON] TurnBasedMatch + +-- | Decline an invitation to play a turn-based match. +-- +-- /See:/ 'turnBasedMatchesDecline' smart constructor. +data TurnBasedMatchesDecline = TurnBasedMatchesDecline + { _tbmdQuotaUser :: !(Maybe Text) + , _tbmdPrettyPrint :: !Bool + , _tbmdUserIp :: !(Maybe Text) + , _tbmdKey :: !(Maybe Text) + , _tbmdLanguage :: !(Maybe Text) + , _tbmdOauthToken :: !(Maybe Text) + , _tbmdMatchId :: !Text + , _tbmdFields :: !(Maybe Text) + , _tbmdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesDecline'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmdQuotaUser' +-- +-- * 'tbmdPrettyPrint' +-- +-- * 'tbmdUserIp' +-- +-- * 'tbmdKey' +-- +-- * 'tbmdLanguage' +-- +-- * 'tbmdOauthToken' +-- +-- * 'tbmdMatchId' +-- +-- * 'tbmdFields' +-- +-- * 'tbmdAlt' +turnBasedMatchesDecline + :: Text -- ^ 'matchId' + -> TurnBasedMatchesDecline +turnBasedMatchesDecline pTbmdMatchId_ = + TurnBasedMatchesDecline + { _tbmdQuotaUser = Nothing + , _tbmdPrettyPrint = True + , _tbmdUserIp = Nothing + , _tbmdKey = Nothing + , _tbmdLanguage = Nothing + , _tbmdOauthToken = Nothing + , _tbmdMatchId = pTbmdMatchId_ + , _tbmdFields = Nothing + , _tbmdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmdQuotaUser :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdQuotaUser + = lens _tbmdQuotaUser + (\ s a -> s{_tbmdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmdPrettyPrint :: Lens' TurnBasedMatchesDecline' Bool +tbmdPrettyPrint + = lens _tbmdPrettyPrint + (\ s a -> s{_tbmdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmdUserIp :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdUserIp + = lens _tbmdUserIp (\ s a -> s{_tbmdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmdKey :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdKey = lens _tbmdKey (\ s a -> s{_tbmdKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmdLanguage :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdLanguage + = lens _tbmdLanguage (\ s a -> s{_tbmdLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmdOauthToken :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdOauthToken + = lens _tbmdOauthToken + (\ s a -> s{_tbmdOauthToken = a}) + +-- | The ID of the match. +tbmdMatchId :: Lens' TurnBasedMatchesDecline' Text +tbmdMatchId + = lens _tbmdMatchId (\ s a -> s{_tbmdMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmdFields :: Lens' TurnBasedMatchesDecline' (Maybe Text) +tbmdFields + = lens _tbmdFields (\ s a -> s{_tbmdFields = a}) + +-- | Data format for the response. +tbmdAlt :: Lens' TurnBasedMatchesDecline' Text +tbmdAlt = lens _tbmdAlt (\ s a -> s{_tbmdAlt = a}) + +instance GoogleRequest TurnBasedMatchesDecline' where + type Rs TurnBasedMatchesDecline' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesDecline{..} + = go _tbmdQuotaUser _tbmdPrettyPrint _tbmdUserIp + _tbmdKey + _tbmdLanguage + _tbmdOauthToken + _tbmdMatchId + _tbmdFields + _tbmdAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesDeclineAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Dismiss.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Dismiss.hs new file mode 100644 index 000000000..c3c87c1bc --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Dismiss.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Dismiss +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Dismiss a turn-based match from the match list. The match will no longer +-- show up in the list and will not generate notifications. +-- +-- /See:/ for @GamesTurnBasedMatchesDismiss@. +module Games.TurnBasedMatches.Dismiss + ( + -- * REST Resource + TurnBasedMatchesDismissAPI + + -- * Creating a Request + , turnBasedMatchesDismiss + , TurnBasedMatchesDismiss + + -- * Request Lenses + , tQuotaUser + , tPrettyPrint + , tUserIp + , tKey + , tOauthToken + , tMatchId + , tFields + , tAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesDismiss@ which the +-- 'TurnBasedMatchesDismiss' request conforms to. +type TurnBasedMatchesDismissAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> "dismiss" :> Put '[JSON] () + +-- | Dismiss a turn-based match from the match list. The match will no longer +-- show up in the list and will not generate notifications. +-- +-- /See:/ 'turnBasedMatchesDismiss' smart constructor. +data TurnBasedMatchesDismiss = TurnBasedMatchesDismiss + { _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tUserIp :: !(Maybe Text) + , _tKey :: !(Maybe Text) + , _tOauthToken :: !(Maybe Text) + , _tMatchId :: !Text + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesDismiss'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tUserIp' +-- +-- * 'tKey' +-- +-- * 'tOauthToken' +-- +-- * 'tMatchId' +-- +-- * 'tFields' +-- +-- * 'tAlt' +turnBasedMatchesDismiss + :: Text -- ^ 'matchId' + -> TurnBasedMatchesDismiss +turnBasedMatchesDismiss pTMatchId_ = + TurnBasedMatchesDismiss + { _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tUserIp = Nothing + , _tKey = Nothing + , _tOauthToken = Nothing + , _tMatchId = pTMatchId_ + , _tFields = Nothing + , _tAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TurnBasedMatchesDismiss' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TurnBasedMatchesDismiss' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TurnBasedMatchesDismiss' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TurnBasedMatchesDismiss' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TurnBasedMatchesDismiss' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | The ID of the match. +tMatchId :: Lens' TurnBasedMatchesDismiss' Text +tMatchId = lens _tMatchId (\ s a -> s{_tMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TurnBasedMatchesDismiss' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TurnBasedMatchesDismiss' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TurnBasedMatchesDismiss' where + type Rs TurnBasedMatchesDismiss' = () + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesDismiss{..} + = go _tQuotaUser _tPrettyPrint _tUserIp _tKey + _tOauthToken + _tMatchId + _tFields + _tAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesDismissAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Finish.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Finish.hs new file mode 100644 index 000000000..b562aec7f --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Finish.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Finish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Finish a turn-based match. Each player should make this call once, after +-- all results are in. Only the player whose turn it is may make the first +-- call to Finish, and can pass in the final match state. +-- +-- /See:/ for @GamesTurnBasedMatchesFinish@. +module Games.TurnBasedMatches.Finish + ( + -- * REST Resource + TurnBasedMatchesFinishAPI + + -- * Creating a Request + , turnBasedMatchesFinish + , TurnBasedMatchesFinish + + -- * Request Lenses + , tbmfQuotaUser + , tbmfPrettyPrint + , tbmfUserIp + , tbmfKey + , tbmfLanguage + , tbmfOauthToken + , tbmfMatchId + , tbmfFields + , tbmfAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesFinish@ which the +-- 'TurnBasedMatchesFinish' request conforms to. +type TurnBasedMatchesFinishAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "finish" :> + QueryParam "language" Text :> + Put '[JSON] TurnBasedMatch + +-- | Finish a turn-based match. Each player should make this call once, after +-- all results are in. Only the player whose turn it is may make the first +-- call to Finish, and can pass in the final match state. +-- +-- /See:/ 'turnBasedMatchesFinish' smart constructor. +data TurnBasedMatchesFinish = TurnBasedMatchesFinish + { _tbmfQuotaUser :: !(Maybe Text) + , _tbmfPrettyPrint :: !Bool + , _tbmfUserIp :: !(Maybe Text) + , _tbmfKey :: !(Maybe Text) + , _tbmfLanguage :: !(Maybe Text) + , _tbmfOauthToken :: !(Maybe Text) + , _tbmfMatchId :: !Text + , _tbmfFields :: !(Maybe Text) + , _tbmfAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesFinish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmfQuotaUser' +-- +-- * 'tbmfPrettyPrint' +-- +-- * 'tbmfUserIp' +-- +-- * 'tbmfKey' +-- +-- * 'tbmfLanguage' +-- +-- * 'tbmfOauthToken' +-- +-- * 'tbmfMatchId' +-- +-- * 'tbmfFields' +-- +-- * 'tbmfAlt' +turnBasedMatchesFinish + :: Text -- ^ 'matchId' + -> TurnBasedMatchesFinish +turnBasedMatchesFinish pTbmfMatchId_ = + TurnBasedMatchesFinish + { _tbmfQuotaUser = Nothing + , _tbmfPrettyPrint = True + , _tbmfUserIp = Nothing + , _tbmfKey = Nothing + , _tbmfLanguage = Nothing + , _tbmfOauthToken = Nothing + , _tbmfMatchId = pTbmfMatchId_ + , _tbmfFields = Nothing + , _tbmfAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmfQuotaUser :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfQuotaUser + = lens _tbmfQuotaUser + (\ s a -> s{_tbmfQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmfPrettyPrint :: Lens' TurnBasedMatchesFinish' Bool +tbmfPrettyPrint + = lens _tbmfPrettyPrint + (\ s a -> s{_tbmfPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmfUserIp :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfUserIp + = lens _tbmfUserIp (\ s a -> s{_tbmfUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmfKey :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfKey = lens _tbmfKey (\ s a -> s{_tbmfKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmfLanguage :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfLanguage + = lens _tbmfLanguage (\ s a -> s{_tbmfLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmfOauthToken :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfOauthToken + = lens _tbmfOauthToken + (\ s a -> s{_tbmfOauthToken = a}) + +-- | The ID of the match. +tbmfMatchId :: Lens' TurnBasedMatchesFinish' Text +tbmfMatchId + = lens _tbmfMatchId (\ s a -> s{_tbmfMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmfFields :: Lens' TurnBasedMatchesFinish' (Maybe Text) +tbmfFields + = lens _tbmfFields (\ s a -> s{_tbmfFields = a}) + +-- | Data format for the response. +tbmfAlt :: Lens' TurnBasedMatchesFinish' Text +tbmfAlt = lens _tbmfAlt (\ s a -> s{_tbmfAlt = a}) + +instance GoogleRequest TurnBasedMatchesFinish' where + type Rs TurnBasedMatchesFinish' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesFinish{..} + = go _tbmfQuotaUser _tbmfPrettyPrint _tbmfUserIp + _tbmfKey + _tbmfLanguage + _tbmfOauthToken + _tbmfMatchId + _tbmfFields + _tbmfAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesFinishAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Get.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Get.hs new file mode 100644 index 000000000..265c129d4 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the data for a turn-based match. +-- +-- /See:/ for @GamesTurnBasedMatchesGet@. +module Games.TurnBasedMatches.Get + ( + -- * REST Resource + TurnBasedMatchesGetAPI + + -- * Creating a Request + , turnBasedMatchesGet + , TurnBasedMatchesGet + + -- * Request Lenses + , tbmgQuotaUser + , tbmgPrettyPrint + , tbmgUserIp + , tbmgKey + , tbmgIncludeMatchData + , tbmgLanguage + , tbmgOauthToken + , tbmgMatchId + , tbmgFields + , tbmgAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesGet@ which the +-- 'TurnBasedMatchesGet' request conforms to. +type TurnBasedMatchesGetAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + QueryParam "includeMatchData" Bool :> + QueryParam "language" Text :> + Get '[JSON] TurnBasedMatch + +-- | Get the data for a turn-based match. +-- +-- /See:/ 'turnBasedMatchesGet' smart constructor. +data TurnBasedMatchesGet = TurnBasedMatchesGet + { _tbmgQuotaUser :: !(Maybe Text) + , _tbmgPrettyPrint :: !Bool + , _tbmgUserIp :: !(Maybe Text) + , _tbmgKey :: !(Maybe Text) + , _tbmgIncludeMatchData :: !(Maybe Bool) + , _tbmgLanguage :: !(Maybe Text) + , _tbmgOauthToken :: !(Maybe Text) + , _tbmgMatchId :: !Text + , _tbmgFields :: !(Maybe Text) + , _tbmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmgQuotaUser' +-- +-- * 'tbmgPrettyPrint' +-- +-- * 'tbmgUserIp' +-- +-- * 'tbmgKey' +-- +-- * 'tbmgIncludeMatchData' +-- +-- * 'tbmgLanguage' +-- +-- * 'tbmgOauthToken' +-- +-- * 'tbmgMatchId' +-- +-- * 'tbmgFields' +-- +-- * 'tbmgAlt' +turnBasedMatchesGet + :: Text -- ^ 'matchId' + -> TurnBasedMatchesGet +turnBasedMatchesGet pTbmgMatchId_ = + TurnBasedMatchesGet + { _tbmgQuotaUser = Nothing + , _tbmgPrettyPrint = True + , _tbmgUserIp = Nothing + , _tbmgKey = Nothing + , _tbmgIncludeMatchData = Nothing + , _tbmgLanguage = Nothing + , _tbmgOauthToken = Nothing + , _tbmgMatchId = pTbmgMatchId_ + , _tbmgFields = Nothing + , _tbmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmgQuotaUser :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgQuotaUser + = lens _tbmgQuotaUser + (\ s a -> s{_tbmgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmgPrettyPrint :: Lens' TurnBasedMatchesGet' Bool +tbmgPrettyPrint + = lens _tbmgPrettyPrint + (\ s a -> s{_tbmgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmgUserIp :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgUserIp + = lens _tbmgUserIp (\ s a -> s{_tbmgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmgKey :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgKey = lens _tbmgKey (\ s a -> s{_tbmgKey = a}) + +-- | Get match data along with metadata. +tbmgIncludeMatchData :: Lens' TurnBasedMatchesGet' (Maybe Bool) +tbmgIncludeMatchData + = lens _tbmgIncludeMatchData + (\ s a -> s{_tbmgIncludeMatchData = a}) + +-- | The preferred language to use for strings returned by this method. +tbmgLanguage :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgLanguage + = lens _tbmgLanguage (\ s a -> s{_tbmgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmgOauthToken :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgOauthToken + = lens _tbmgOauthToken + (\ s a -> s{_tbmgOauthToken = a}) + +-- | The ID of the match. +tbmgMatchId :: Lens' TurnBasedMatchesGet' Text +tbmgMatchId + = lens _tbmgMatchId (\ s a -> s{_tbmgMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmgFields :: Lens' TurnBasedMatchesGet' (Maybe Text) +tbmgFields + = lens _tbmgFields (\ s a -> s{_tbmgFields = a}) + +-- | Data format for the response. +tbmgAlt :: Lens' TurnBasedMatchesGet' Text +tbmgAlt = lens _tbmgAlt (\ s a -> s{_tbmgAlt = a}) + +instance GoogleRequest TurnBasedMatchesGet' where + type Rs TurnBasedMatchesGet' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesGet{..} + = go _tbmgQuotaUser _tbmgPrettyPrint _tbmgUserIp + _tbmgKey + _tbmgIncludeMatchData + _tbmgLanguage + _tbmgOauthToken + _tbmgMatchId + _tbmgFields + _tbmgAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesGetAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Join.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Join.hs new file mode 100644 index 000000000..035d125fa --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Join.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Join +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Join a turn-based match. +-- +-- /See:/ for @GamesTurnBasedMatchesJoin@. +module Games.TurnBasedMatches.Join + ( + -- * REST Resource + TurnBasedMatchesJoinAPI + + -- * Creating a Request + , turnBasedMatchesJoin + , TurnBasedMatchesJoin + + -- * Request Lenses + , tbmjQuotaUser + , tbmjPrettyPrint + , tbmjUserIp + , tbmjKey + , tbmjLanguage + , tbmjOauthToken + , tbmjMatchId + , tbmjFields + , tbmjAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesJoin@ which the +-- 'TurnBasedMatchesJoin' request conforms to. +type TurnBasedMatchesJoinAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "join" :> + QueryParam "language" Text :> + Put '[JSON] TurnBasedMatch + +-- | Join a turn-based match. +-- +-- /See:/ 'turnBasedMatchesJoin' smart constructor. +data TurnBasedMatchesJoin = TurnBasedMatchesJoin + { _tbmjQuotaUser :: !(Maybe Text) + , _tbmjPrettyPrint :: !Bool + , _tbmjUserIp :: !(Maybe Text) + , _tbmjKey :: !(Maybe Text) + , _tbmjLanguage :: !(Maybe Text) + , _tbmjOauthToken :: !(Maybe Text) + , _tbmjMatchId :: !Text + , _tbmjFields :: !(Maybe Text) + , _tbmjAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesJoin'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmjQuotaUser' +-- +-- * 'tbmjPrettyPrint' +-- +-- * 'tbmjUserIp' +-- +-- * 'tbmjKey' +-- +-- * 'tbmjLanguage' +-- +-- * 'tbmjOauthToken' +-- +-- * 'tbmjMatchId' +-- +-- * 'tbmjFields' +-- +-- * 'tbmjAlt' +turnBasedMatchesJoin + :: Text -- ^ 'matchId' + -> TurnBasedMatchesJoin +turnBasedMatchesJoin pTbmjMatchId_ = + TurnBasedMatchesJoin + { _tbmjQuotaUser = Nothing + , _tbmjPrettyPrint = True + , _tbmjUserIp = Nothing + , _tbmjKey = Nothing + , _tbmjLanguage = Nothing + , _tbmjOauthToken = Nothing + , _tbmjMatchId = pTbmjMatchId_ + , _tbmjFields = Nothing + , _tbmjAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmjQuotaUser :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjQuotaUser + = lens _tbmjQuotaUser + (\ s a -> s{_tbmjQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmjPrettyPrint :: Lens' TurnBasedMatchesJoin' Bool +tbmjPrettyPrint + = lens _tbmjPrettyPrint + (\ s a -> s{_tbmjPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmjUserIp :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjUserIp + = lens _tbmjUserIp (\ s a -> s{_tbmjUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmjKey :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjKey = lens _tbmjKey (\ s a -> s{_tbmjKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmjLanguage :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjLanguage + = lens _tbmjLanguage (\ s a -> s{_tbmjLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmjOauthToken :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjOauthToken + = lens _tbmjOauthToken + (\ s a -> s{_tbmjOauthToken = a}) + +-- | The ID of the match. +tbmjMatchId :: Lens' TurnBasedMatchesJoin' Text +tbmjMatchId + = lens _tbmjMatchId (\ s a -> s{_tbmjMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmjFields :: Lens' TurnBasedMatchesJoin' (Maybe Text) +tbmjFields + = lens _tbmjFields (\ s a -> s{_tbmjFields = a}) + +-- | Data format for the response. +tbmjAlt :: Lens' TurnBasedMatchesJoin' Text +tbmjAlt = lens _tbmjAlt (\ s a -> s{_tbmjAlt = a}) + +instance GoogleRequest TurnBasedMatchesJoin' where + type Rs TurnBasedMatchesJoin' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesJoin{..} + = go _tbmjQuotaUser _tbmjPrettyPrint _tbmjUserIp + _tbmjKey + _tbmjLanguage + _tbmjOauthToken + _tbmjMatchId + _tbmjFields + _tbmjAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesJoinAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Leave.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Leave.hs new file mode 100644 index 000000000..b969a9f0a --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Leave.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Leave +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Leave a turn-based match when it is not the current player\'s turn, +-- without canceling the match. +-- +-- /See:/ for @GamesTurnBasedMatchesLeave@. +module Games.TurnBasedMatches.Leave + ( + -- * REST Resource + TurnBasedMatchesLeaveAPI + + -- * Creating a Request + , turnBasedMatchesLeave + , TurnBasedMatchesLeave + + -- * Request Lenses + , turQuotaUser + , turPrettyPrint + , turUserIp + , turKey + , turLanguage + , turOauthToken + , turMatchId + , turFields + , turAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesLeave@ which the +-- 'TurnBasedMatchesLeave' request conforms to. +type TurnBasedMatchesLeaveAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "leave" :> + QueryParam "language" Text :> + Put '[JSON] TurnBasedMatch + +-- | Leave a turn-based match when it is not the current player\'s turn, +-- without canceling the match. +-- +-- /See:/ 'turnBasedMatchesLeave' smart constructor. +data TurnBasedMatchesLeave = TurnBasedMatchesLeave + { _turQuotaUser :: !(Maybe Text) + , _turPrettyPrint :: !Bool + , _turUserIp :: !(Maybe Text) + , _turKey :: !(Maybe Text) + , _turLanguage :: !(Maybe Text) + , _turOauthToken :: !(Maybe Text) + , _turMatchId :: !Text + , _turFields :: !(Maybe Text) + , _turAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesLeave'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'turQuotaUser' +-- +-- * 'turPrettyPrint' +-- +-- * 'turUserIp' +-- +-- * 'turKey' +-- +-- * 'turLanguage' +-- +-- * 'turOauthToken' +-- +-- * 'turMatchId' +-- +-- * 'turFields' +-- +-- * 'turAlt' +turnBasedMatchesLeave + :: Text -- ^ 'matchId' + -> TurnBasedMatchesLeave +turnBasedMatchesLeave pTurMatchId_ = + TurnBasedMatchesLeave + { _turQuotaUser = Nothing + , _turPrettyPrint = True + , _turUserIp = Nothing + , _turKey = Nothing + , _turLanguage = Nothing + , _turOauthToken = Nothing + , _turMatchId = pTurMatchId_ + , _turFields = Nothing + , _turAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +turQuotaUser :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turQuotaUser + = lens _turQuotaUser (\ s a -> s{_turQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +turPrettyPrint :: Lens' TurnBasedMatchesLeave' Bool +turPrettyPrint + = lens _turPrettyPrint + (\ s a -> s{_turPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +turUserIp :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turUserIp + = lens _turUserIp (\ s a -> s{_turUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +turKey :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turKey = lens _turKey (\ s a -> s{_turKey = a}) + +-- | The preferred language to use for strings returned by this method. +turLanguage :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turLanguage + = lens _turLanguage (\ s a -> s{_turLanguage = a}) + +-- | OAuth 2.0 token for the current user. +turOauthToken :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turOauthToken + = lens _turOauthToken + (\ s a -> s{_turOauthToken = a}) + +-- | The ID of the match. +turMatchId :: Lens' TurnBasedMatchesLeave' Text +turMatchId + = lens _turMatchId (\ s a -> s{_turMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +turFields :: Lens' TurnBasedMatchesLeave' (Maybe Text) +turFields + = lens _turFields (\ s a -> s{_turFields = a}) + +-- | Data format for the response. +turAlt :: Lens' TurnBasedMatchesLeave' Text +turAlt = lens _turAlt (\ s a -> s{_turAlt = a}) + +instance GoogleRequest TurnBasedMatchesLeave' where + type Rs TurnBasedMatchesLeave' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesLeave{..} + = go _turQuotaUser _turPrettyPrint _turUserIp _turKey + _turLanguage + _turOauthToken + _turMatchId + _turFields + _turAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesLeaveAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/LeaveTurn.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/LeaveTurn.hs new file mode 100644 index 000000000..d97cd4dc2 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/LeaveTurn.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.LeaveTurn +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Leave a turn-based match during the current player\'s turn, without +-- canceling the match. +-- +-- /See:/ for @GamesTurnBasedMatchesLeaveTurn@. +module Games.TurnBasedMatches.LeaveTurn + ( + -- * REST Resource + TurnBasedMatchesLeaveTurnAPI + + -- * Creating a Request + , turnBasedMatchesLeaveTurn + , TurnBasedMatchesLeaveTurn + + -- * Request Lenses + , tbmltQuotaUser + , tbmltPrettyPrint + , tbmltUserIp + , tbmltKey + , tbmltLanguage + , tbmltPendingParticipantId + , tbmltOauthToken + , tbmltMatchId + , tbmltMatchVersion + , tbmltFields + , tbmltAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesLeaveTurn@ which the +-- 'TurnBasedMatchesLeaveTurn' request conforms to. +type TurnBasedMatchesLeaveTurnAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "leaveTurn" :> + QueryParam "language" Text :> + QueryParam "pendingParticipantId" Text :> + QueryParam "matchVersion" Int32 :> + Put '[JSON] TurnBasedMatch + +-- | Leave a turn-based match during the current player\'s turn, without +-- canceling the match. +-- +-- /See:/ 'turnBasedMatchesLeaveTurn' smart constructor. +data TurnBasedMatchesLeaveTurn = TurnBasedMatchesLeaveTurn + { _tbmltQuotaUser :: !(Maybe Text) + , _tbmltPrettyPrint :: !Bool + , _tbmltUserIp :: !(Maybe Text) + , _tbmltKey :: !(Maybe Text) + , _tbmltLanguage :: !(Maybe Text) + , _tbmltPendingParticipantId :: !(Maybe Text) + , _tbmltOauthToken :: !(Maybe Text) + , _tbmltMatchId :: !Text + , _tbmltMatchVersion :: !Int32 + , _tbmltFields :: !(Maybe Text) + , _tbmltAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesLeaveTurn'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmltQuotaUser' +-- +-- * 'tbmltPrettyPrint' +-- +-- * 'tbmltUserIp' +-- +-- * 'tbmltKey' +-- +-- * 'tbmltLanguage' +-- +-- * 'tbmltPendingParticipantId' +-- +-- * 'tbmltOauthToken' +-- +-- * 'tbmltMatchId' +-- +-- * 'tbmltMatchVersion' +-- +-- * 'tbmltFields' +-- +-- * 'tbmltAlt' +turnBasedMatchesLeaveTurn + :: Text -- ^ 'matchId' + -> Int32 -- ^ 'matchVersion' + -> TurnBasedMatchesLeaveTurn +turnBasedMatchesLeaveTurn pTbmltMatchId_ pTbmltMatchVersion_ = + TurnBasedMatchesLeaveTurn + { _tbmltQuotaUser = Nothing + , _tbmltPrettyPrint = True + , _tbmltUserIp = Nothing + , _tbmltKey = Nothing + , _tbmltLanguage = Nothing + , _tbmltPendingParticipantId = Nothing + , _tbmltOauthToken = Nothing + , _tbmltMatchId = pTbmltMatchId_ + , _tbmltMatchVersion = pTbmltMatchVersion_ + , _tbmltFields = Nothing + , _tbmltAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmltQuotaUser :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltQuotaUser + = lens _tbmltQuotaUser + (\ s a -> s{_tbmltQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmltPrettyPrint :: Lens' TurnBasedMatchesLeaveTurn' Bool +tbmltPrettyPrint + = lens _tbmltPrettyPrint + (\ s a -> s{_tbmltPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmltUserIp :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltUserIp + = lens _tbmltUserIp (\ s a -> s{_tbmltUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmltKey :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltKey = lens _tbmltKey (\ s a -> s{_tbmltKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmltLanguage :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltLanguage + = lens _tbmltLanguage + (\ s a -> s{_tbmltLanguage = a}) + +-- | The ID of another participant who should take their turn next. If not +-- set, the match will wait for other player(s) to join via automatching; +-- this is only valid if automatch criteria is set on the match with +-- remaining slots for automatched players. +tbmltPendingParticipantId :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltPendingParticipantId + = lens _tbmltPendingParticipantId + (\ s a -> s{_tbmltPendingParticipantId = a}) + +-- | OAuth 2.0 token for the current user. +tbmltOauthToken :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltOauthToken + = lens _tbmltOauthToken + (\ s a -> s{_tbmltOauthToken = a}) + +-- | The ID of the match. +tbmltMatchId :: Lens' TurnBasedMatchesLeaveTurn' Text +tbmltMatchId + = lens _tbmltMatchId (\ s a -> s{_tbmltMatchId = a}) + +-- | The version of the match being updated. +tbmltMatchVersion :: Lens' TurnBasedMatchesLeaveTurn' Int32 +tbmltMatchVersion + = lens _tbmltMatchVersion + (\ s a -> s{_tbmltMatchVersion = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmltFields :: Lens' TurnBasedMatchesLeaveTurn' (Maybe Text) +tbmltFields + = lens _tbmltFields (\ s a -> s{_tbmltFields = a}) + +-- | Data format for the response. +tbmltAlt :: Lens' TurnBasedMatchesLeaveTurn' Text +tbmltAlt = lens _tbmltAlt (\ s a -> s{_tbmltAlt = a}) + +instance GoogleRequest TurnBasedMatchesLeaveTurn' + where + type Rs TurnBasedMatchesLeaveTurn' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesLeaveTurn{..} + = go _tbmltQuotaUser _tbmltPrettyPrint _tbmltUserIp + _tbmltKey + _tbmltLanguage + _tbmltPendingParticipantId + _tbmltOauthToken + _tbmltMatchId + (Just _tbmltMatchVersion) + _tbmltFields + _tbmltAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesLeaveTurnAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/List.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/List.hs new file mode 100644 index 000000000..861be9933 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/List.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns turn-based matches the player is or was involved in. +-- +-- /See:/ for @GamesTurnBasedMatchesList@. +module Games.TurnBasedMatches.List + ( + -- * REST Resource + TurnBasedMatchesListAPI + + -- * Creating a Request + , turnBasedMatchesList + , TurnBasedMatchesList + + -- * Request Lenses + , tbmlMaxCompletedMatches + , tbmlQuotaUser + , tbmlPrettyPrint + , tbmlUserIp + , tbmlKey + , tbmlIncludeMatchData + , tbmlLanguage + , tbmlPageToken + , tbmlOauthToken + , tbmlMaxResults + , tbmlFields + , tbmlAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesList@ which the +-- 'TurnBasedMatchesList' request conforms to. +type TurnBasedMatchesListAPI = + "turnbasedmatches" :> + QueryParam "maxCompletedMatches" Int32 :> + QueryParam "includeMatchData" Bool :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] TurnBasedMatchList + +-- | Returns turn-based matches the player is or was involved in. +-- +-- /See:/ 'turnBasedMatchesList' smart constructor. +data TurnBasedMatchesList = TurnBasedMatchesList + { _tbmlMaxCompletedMatches :: !(Maybe Int32) + , _tbmlQuotaUser :: !(Maybe Text) + , _tbmlPrettyPrint :: !Bool + , _tbmlUserIp :: !(Maybe Text) + , _tbmlKey :: !(Maybe Text) + , _tbmlIncludeMatchData :: !(Maybe Bool) + , _tbmlLanguage :: !(Maybe Text) + , _tbmlPageToken :: !(Maybe Text) + , _tbmlOauthToken :: !(Maybe Text) + , _tbmlMaxResults :: !(Maybe Int32) + , _tbmlFields :: !(Maybe Text) + , _tbmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmlMaxCompletedMatches' +-- +-- * 'tbmlQuotaUser' +-- +-- * 'tbmlPrettyPrint' +-- +-- * 'tbmlUserIp' +-- +-- * 'tbmlKey' +-- +-- * 'tbmlIncludeMatchData' +-- +-- * 'tbmlLanguage' +-- +-- * 'tbmlPageToken' +-- +-- * 'tbmlOauthToken' +-- +-- * 'tbmlMaxResults' +-- +-- * 'tbmlFields' +-- +-- * 'tbmlAlt' +turnBasedMatchesList + :: TurnBasedMatchesList +turnBasedMatchesList = + TurnBasedMatchesList + { _tbmlMaxCompletedMatches = Nothing + , _tbmlQuotaUser = Nothing + , _tbmlPrettyPrint = True + , _tbmlUserIp = Nothing + , _tbmlKey = Nothing + , _tbmlIncludeMatchData = Nothing + , _tbmlLanguage = Nothing + , _tbmlPageToken = Nothing + , _tbmlOauthToken = Nothing + , _tbmlMaxResults = Nothing + , _tbmlFields = Nothing + , _tbmlAlt = "json" + } + +-- | The maximum number of completed or canceled matches to return in the +-- response. If not set, all matches returned could be completed or +-- canceled. +tbmlMaxCompletedMatches :: Lens' TurnBasedMatchesList' (Maybe Int32) +tbmlMaxCompletedMatches + = lens _tbmlMaxCompletedMatches + (\ s a -> s{_tbmlMaxCompletedMatches = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmlQuotaUser :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlQuotaUser + = lens _tbmlQuotaUser + (\ s a -> s{_tbmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmlPrettyPrint :: Lens' TurnBasedMatchesList' Bool +tbmlPrettyPrint + = lens _tbmlPrettyPrint + (\ s a -> s{_tbmlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmlUserIp :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlUserIp + = lens _tbmlUserIp (\ s a -> s{_tbmlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmlKey :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlKey = lens _tbmlKey (\ s a -> s{_tbmlKey = a}) + +-- | True if match data should be returned in the response. Note that not all +-- data will necessarily be returned if include_match_data is true; the +-- server may decide to only return data for some of the matches to limit +-- download size for the client. The remainder of the data for these +-- matches will be retrievable on request. +tbmlIncludeMatchData :: Lens' TurnBasedMatchesList' (Maybe Bool) +tbmlIncludeMatchData + = lens _tbmlIncludeMatchData + (\ s a -> s{_tbmlIncludeMatchData = a}) + +-- | The preferred language to use for strings returned by this method. +tbmlLanguage :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlLanguage + = lens _tbmlLanguage (\ s a -> s{_tbmlLanguage = a}) + +-- | The token returned by the previous request. +tbmlPageToken :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlPageToken + = lens _tbmlPageToken + (\ s a -> s{_tbmlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tbmlOauthToken :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlOauthToken + = lens _tbmlOauthToken + (\ s a -> s{_tbmlOauthToken = a}) + +-- | The maximum number of matches to return in the response, used for +-- paging. For any response, the actual number of matches to return may be +-- less than the specified maxResults. +tbmlMaxResults :: Lens' TurnBasedMatchesList' (Maybe Int32) +tbmlMaxResults + = lens _tbmlMaxResults + (\ s a -> s{_tbmlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmlFields :: Lens' TurnBasedMatchesList' (Maybe Text) +tbmlFields + = lens _tbmlFields (\ s a -> s{_tbmlFields = a}) + +-- | Data format for the response. +tbmlAlt :: Lens' TurnBasedMatchesList' Text +tbmlAlt = lens _tbmlAlt (\ s a -> s{_tbmlAlt = a}) + +instance GoogleRequest TurnBasedMatchesList' where + type Rs TurnBasedMatchesList' = TurnBasedMatchList + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesList{..} + = go _tbmlMaxCompletedMatches _tbmlQuotaUser + _tbmlPrettyPrint + _tbmlUserIp + _tbmlKey + _tbmlIncludeMatchData + _tbmlLanguage + _tbmlPageToken + _tbmlOauthToken + _tbmlMaxResults + _tbmlFields + _tbmlAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesListAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Rematch.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Rematch.hs new file mode 100644 index 000000000..10bb0e585 --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Rematch.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Rematch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a rematch of a match that was previously completed, with the same +-- participants. This can be called by only one player on a match still in +-- their list; the player must have called Finish first. Returns the newly +-- created match; it will be the caller\'s turn. +-- +-- /See:/ for @GamesTurnBasedMatchesRematch@. +module Games.TurnBasedMatches.Rematch + ( + -- * REST Resource + TurnBasedMatchesRematchAPI + + -- * Creating a Request + , turnBasedMatchesRematch + , TurnBasedMatchesRematch + + -- * Request Lenses + , tbmrRequestId + , tbmrQuotaUser + , tbmrPrettyPrint + , tbmrUserIp + , tbmrKey + , tbmrLanguage + , tbmrOauthToken + , tbmrMatchId + , tbmrFields + , tbmrAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesRematch@ which the +-- 'TurnBasedMatchesRematch' request conforms to. +type TurnBasedMatchesRematchAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "rematch" :> + QueryParam "requestId" Int64 :> + QueryParam "language" Text :> + Post '[JSON] TurnBasedMatchRematch + +-- | Create a rematch of a match that was previously completed, with the same +-- participants. This can be called by only one player on a match still in +-- their list; the player must have called Finish first. Returns the newly +-- created match; it will be the caller\'s turn. +-- +-- /See:/ 'turnBasedMatchesRematch' smart constructor. +data TurnBasedMatchesRematch = TurnBasedMatchesRematch + { _tbmrRequestId :: !(Maybe Int64) + , _tbmrQuotaUser :: !(Maybe Text) + , _tbmrPrettyPrint :: !Bool + , _tbmrUserIp :: !(Maybe Text) + , _tbmrKey :: !(Maybe Text) + , _tbmrLanguage :: !(Maybe Text) + , _tbmrOauthToken :: !(Maybe Text) + , _tbmrMatchId :: !Text + , _tbmrFields :: !(Maybe Text) + , _tbmrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesRematch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmrRequestId' +-- +-- * 'tbmrQuotaUser' +-- +-- * 'tbmrPrettyPrint' +-- +-- * 'tbmrUserIp' +-- +-- * 'tbmrKey' +-- +-- * 'tbmrLanguage' +-- +-- * 'tbmrOauthToken' +-- +-- * 'tbmrMatchId' +-- +-- * 'tbmrFields' +-- +-- * 'tbmrAlt' +turnBasedMatchesRematch + :: Text -- ^ 'matchId' + -> TurnBasedMatchesRematch +turnBasedMatchesRematch pTbmrMatchId_ = + TurnBasedMatchesRematch + { _tbmrRequestId = Nothing + , _tbmrQuotaUser = Nothing + , _tbmrPrettyPrint = True + , _tbmrUserIp = Nothing + , _tbmrKey = Nothing + , _tbmrLanguage = Nothing + , _tbmrOauthToken = Nothing + , _tbmrMatchId = pTbmrMatchId_ + , _tbmrFields = Nothing + , _tbmrAlt = "json" + } + +-- | A randomly generated numeric ID for each request specified by the +-- caller. This number is used at the server to ensure that the request is +-- handled correctly across retries. +tbmrRequestId :: Lens' TurnBasedMatchesRematch' (Maybe Int64) +tbmrRequestId + = lens _tbmrRequestId + (\ s a -> s{_tbmrRequestId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmrQuotaUser :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrQuotaUser + = lens _tbmrQuotaUser + (\ s a -> s{_tbmrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmrPrettyPrint :: Lens' TurnBasedMatchesRematch' Bool +tbmrPrettyPrint + = lens _tbmrPrettyPrint + (\ s a -> s{_tbmrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmrUserIp :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrUserIp + = lens _tbmrUserIp (\ s a -> s{_tbmrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmrKey :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrKey = lens _tbmrKey (\ s a -> s{_tbmrKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmrLanguage :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrLanguage + = lens _tbmrLanguage (\ s a -> s{_tbmrLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmrOauthToken :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrOauthToken + = lens _tbmrOauthToken + (\ s a -> s{_tbmrOauthToken = a}) + +-- | The ID of the match. +tbmrMatchId :: Lens' TurnBasedMatchesRematch' Text +tbmrMatchId + = lens _tbmrMatchId (\ s a -> s{_tbmrMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmrFields :: Lens' TurnBasedMatchesRematch' (Maybe Text) +tbmrFields + = lens _tbmrFields (\ s a -> s{_tbmrFields = a}) + +-- | Data format for the response. +tbmrAlt :: Lens' TurnBasedMatchesRematch' Text +tbmrAlt = lens _tbmrAlt (\ s a -> s{_tbmrAlt = a}) + +instance GoogleRequest TurnBasedMatchesRematch' where + type Rs TurnBasedMatchesRematch' = + TurnBasedMatchRematch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesRematch{..} + = go _tbmrRequestId _tbmrQuotaUser _tbmrPrettyPrint + _tbmrUserIp + _tbmrKey + _tbmrLanguage + _tbmrOauthToken + _tbmrMatchId + _tbmrFields + _tbmrAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesRematchAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Sync.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Sync.hs new file mode 100644 index 000000000..b9ada071a --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/Sync.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.Sync +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns turn-based matches the player is or was involved in that changed +-- since the last sync call, with the least recent changes coming first. +-- Matches that should be removed from the local cache will have a status +-- of MATCH_DELETED. +-- +-- /See:/ for @GamesTurnBasedMatchesSync@. +module Games.TurnBasedMatches.Sync + ( + -- * REST Resource + TurnBasedMatchesSyncAPI + + -- * Creating a Request + , turnBasedMatchesSync + , TurnBasedMatchesSync + + -- * Request Lenses + , tbmsMaxCompletedMatches + , tbmsQuotaUser + , tbmsPrettyPrint + , tbmsUserIp + , tbmsKey + , tbmsIncludeMatchData + , tbmsLanguage + , tbmsPageToken + , tbmsOauthToken + , tbmsMaxResults + , tbmsFields + , tbmsAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesSync@ which the +-- 'TurnBasedMatchesSync' request conforms to. +type TurnBasedMatchesSyncAPI = + "turnbasedmatches" :> + "sync" :> + QueryParam "maxCompletedMatches" Int32 :> + QueryParam "includeMatchData" Bool :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] TurnBasedMatchSync + +-- | Returns turn-based matches the player is or was involved in that changed +-- since the last sync call, with the least recent changes coming first. +-- Matches that should be removed from the local cache will have a status +-- of MATCH_DELETED. +-- +-- /See:/ 'turnBasedMatchesSync' smart constructor. +data TurnBasedMatchesSync = TurnBasedMatchesSync + { _tbmsMaxCompletedMatches :: !(Maybe Int32) + , _tbmsQuotaUser :: !(Maybe Text) + , _tbmsPrettyPrint :: !Bool + , _tbmsUserIp :: !(Maybe Text) + , _tbmsKey :: !(Maybe Text) + , _tbmsIncludeMatchData :: !(Maybe Bool) + , _tbmsLanguage :: !(Maybe Text) + , _tbmsPageToken :: !(Maybe Text) + , _tbmsOauthToken :: !(Maybe Text) + , _tbmsMaxResults :: !(Maybe Int32) + , _tbmsFields :: !(Maybe Text) + , _tbmsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesSync'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmsMaxCompletedMatches' +-- +-- * 'tbmsQuotaUser' +-- +-- * 'tbmsPrettyPrint' +-- +-- * 'tbmsUserIp' +-- +-- * 'tbmsKey' +-- +-- * 'tbmsIncludeMatchData' +-- +-- * 'tbmsLanguage' +-- +-- * 'tbmsPageToken' +-- +-- * 'tbmsOauthToken' +-- +-- * 'tbmsMaxResults' +-- +-- * 'tbmsFields' +-- +-- * 'tbmsAlt' +turnBasedMatchesSync + :: TurnBasedMatchesSync +turnBasedMatchesSync = + TurnBasedMatchesSync + { _tbmsMaxCompletedMatches = Nothing + , _tbmsQuotaUser = Nothing + , _tbmsPrettyPrint = True + , _tbmsUserIp = Nothing + , _tbmsKey = Nothing + , _tbmsIncludeMatchData = Nothing + , _tbmsLanguage = Nothing + , _tbmsPageToken = Nothing + , _tbmsOauthToken = Nothing + , _tbmsMaxResults = Nothing + , _tbmsFields = Nothing + , _tbmsAlt = "json" + } + +-- | The maximum number of completed or canceled matches to return in the +-- response. If not set, all matches returned could be completed or +-- canceled. +tbmsMaxCompletedMatches :: Lens' TurnBasedMatchesSync' (Maybe Int32) +tbmsMaxCompletedMatches + = lens _tbmsMaxCompletedMatches + (\ s a -> s{_tbmsMaxCompletedMatches = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmsQuotaUser :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsQuotaUser + = lens _tbmsQuotaUser + (\ s a -> s{_tbmsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmsPrettyPrint :: Lens' TurnBasedMatchesSync' Bool +tbmsPrettyPrint + = lens _tbmsPrettyPrint + (\ s a -> s{_tbmsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmsUserIp :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsUserIp + = lens _tbmsUserIp (\ s a -> s{_tbmsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmsKey :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsKey = lens _tbmsKey (\ s a -> s{_tbmsKey = a}) + +-- | True if match data should be returned in the response. Note that not all +-- data will necessarily be returned if include_match_data is true; the +-- server may decide to only return data for some of the matches to limit +-- download size for the client. The remainder of the data for these +-- matches will be retrievable on request. +tbmsIncludeMatchData :: Lens' TurnBasedMatchesSync' (Maybe Bool) +tbmsIncludeMatchData + = lens _tbmsIncludeMatchData + (\ s a -> s{_tbmsIncludeMatchData = a}) + +-- | The preferred language to use for strings returned by this method. +tbmsLanguage :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsLanguage + = lens _tbmsLanguage (\ s a -> s{_tbmsLanguage = a}) + +-- | The token returned by the previous request. +tbmsPageToken :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsPageToken + = lens _tbmsPageToken + (\ s a -> s{_tbmsPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tbmsOauthToken :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsOauthToken + = lens _tbmsOauthToken + (\ s a -> s{_tbmsOauthToken = a}) + +-- | The maximum number of matches to return in the response, used for +-- paging. For any response, the actual number of matches to return may be +-- less than the specified maxResults. +tbmsMaxResults :: Lens' TurnBasedMatchesSync' (Maybe Int32) +tbmsMaxResults + = lens _tbmsMaxResults + (\ s a -> s{_tbmsMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmsFields :: Lens' TurnBasedMatchesSync' (Maybe Text) +tbmsFields + = lens _tbmsFields (\ s a -> s{_tbmsFields = a}) + +-- | Data format for the response. +tbmsAlt :: Lens' TurnBasedMatchesSync' Text +tbmsAlt = lens _tbmsAlt (\ s a -> s{_tbmsAlt = a}) + +instance GoogleRequest TurnBasedMatchesSync' where + type Rs TurnBasedMatchesSync' = TurnBasedMatchSync + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesSync{..} + = go _tbmsMaxCompletedMatches _tbmsQuotaUser + _tbmsPrettyPrint + _tbmsUserIp + _tbmsKey + _tbmsIncludeMatchData + _tbmsLanguage + _tbmsPageToken + _tbmsOauthToken + _tbmsMaxResults + _tbmsFields + _tbmsAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesSyncAPI) + r + u diff --git a/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/TakeTurn.hs b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/TakeTurn.hs new file mode 100644 index 000000000..5823a3a6c --- /dev/null +++ b/gogol-games/gen/Network/Google/Resource/Games/TurnBasedMatches/TakeTurn.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Games.TurnBasedMatches.TakeTurn +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Commit the results of a player turn. +-- +-- /See:/ for @GamesTurnBasedMatchesTakeTurn@. +module Games.TurnBasedMatches.TakeTurn + ( + -- * REST Resource + TurnBasedMatchesTakeTurnAPI + + -- * Creating a Request + , turnBasedMatchesTakeTurn + , TurnBasedMatchesTakeTurn + + -- * Request Lenses + , tbmttQuotaUser + , tbmttPrettyPrint + , tbmttUserIp + , tbmttKey + , tbmttLanguage + , tbmttOauthToken + , tbmttMatchId + , tbmttFields + , tbmttAlt + ) where + +import Network.Google.Games.Types +import Network.Google.Prelude + +-- | A resource alias for @GamesTurnBasedMatchesTakeTurn@ which the +-- 'TurnBasedMatchesTakeTurn' request conforms to. +type TurnBasedMatchesTakeTurnAPI = + "turnbasedmatches" :> + Capture "matchId" Text :> + "turn" :> + QueryParam "language" Text :> + Put '[JSON] TurnBasedMatch + +-- | Commit the results of a player turn. +-- +-- /See:/ 'turnBasedMatchesTakeTurn' smart constructor. +data TurnBasedMatchesTakeTurn = TurnBasedMatchesTakeTurn + { _tbmttQuotaUser :: !(Maybe Text) + , _tbmttPrettyPrint :: !Bool + , _tbmttUserIp :: !(Maybe Text) + , _tbmttKey :: !(Maybe Text) + , _tbmttLanguage :: !(Maybe Text) + , _tbmttOauthToken :: !(Maybe Text) + , _tbmttMatchId :: !Text + , _tbmttFields :: !(Maybe Text) + , _tbmttAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TurnBasedMatchesTakeTurn'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tbmttQuotaUser' +-- +-- * 'tbmttPrettyPrint' +-- +-- * 'tbmttUserIp' +-- +-- * 'tbmttKey' +-- +-- * 'tbmttLanguage' +-- +-- * 'tbmttOauthToken' +-- +-- * 'tbmttMatchId' +-- +-- * 'tbmttFields' +-- +-- * 'tbmttAlt' +turnBasedMatchesTakeTurn + :: Text -- ^ 'matchId' + -> TurnBasedMatchesTakeTurn +turnBasedMatchesTakeTurn pTbmttMatchId_ = + TurnBasedMatchesTakeTurn + { _tbmttQuotaUser = Nothing + , _tbmttPrettyPrint = True + , _tbmttUserIp = Nothing + , _tbmttKey = Nothing + , _tbmttLanguage = Nothing + , _tbmttOauthToken = Nothing + , _tbmttMatchId = pTbmttMatchId_ + , _tbmttFields = Nothing + , _tbmttAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tbmttQuotaUser :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttQuotaUser + = lens _tbmttQuotaUser + (\ s a -> s{_tbmttQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tbmttPrettyPrint :: Lens' TurnBasedMatchesTakeTurn' Bool +tbmttPrettyPrint + = lens _tbmttPrettyPrint + (\ s a -> s{_tbmttPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tbmttUserIp :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttUserIp + = lens _tbmttUserIp (\ s a -> s{_tbmttUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tbmttKey :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttKey = lens _tbmttKey (\ s a -> s{_tbmttKey = a}) + +-- | The preferred language to use for strings returned by this method. +tbmttLanguage :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttLanguage + = lens _tbmttLanguage + (\ s a -> s{_tbmttLanguage = a}) + +-- | OAuth 2.0 token for the current user. +tbmttOauthToken :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttOauthToken + = lens _tbmttOauthToken + (\ s a -> s{_tbmttOauthToken = a}) + +-- | The ID of the match. +tbmttMatchId :: Lens' TurnBasedMatchesTakeTurn' Text +tbmttMatchId + = lens _tbmttMatchId (\ s a -> s{_tbmttMatchId = a}) + +-- | Selector specifying which fields to include in a partial response. +tbmttFields :: Lens' TurnBasedMatchesTakeTurn' (Maybe Text) +tbmttFields + = lens _tbmttFields (\ s a -> s{_tbmttFields = a}) + +-- | Data format for the response. +tbmttAlt :: Lens' TurnBasedMatchesTakeTurn' Text +tbmttAlt = lens _tbmttAlt (\ s a -> s{_tbmttAlt = a}) + +instance GoogleRequest TurnBasedMatchesTakeTurn' + where + type Rs TurnBasedMatchesTakeTurn' = TurnBasedMatch + request = requestWithRoute defReq gamesURL + requestWithRoute r u TurnBasedMatchesTakeTurn{..} + = go _tbmttQuotaUser _tbmttPrettyPrint _tbmttUserIp + _tbmttKey + _tbmttLanguage + _tbmttOauthToken + _tbmttMatchId + _tbmttFields + _tbmttAlt + where go + = clientWithRoute + (Proxy :: Proxy TurnBasedMatchesTakeTurnAPI) + r + u diff --git a/gogol-games/gogol-games.cabal b/gogol-games/gogol-games.cabal new file mode 100644 index 000000000..9db8dbb7a --- /dev/null +++ b/gogol-games/gogol-games.cabal @@ -0,0 +1,94 @@ +name: gogol-games +version: 0.0.1 +synopsis: Google Play Game Services API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The API for Google Play Game Services. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Games + , Network.Google.Games.Types + , Network.Google.Resource.Games.AchievementDefinitions.List + , Network.Google.Resource.Games.Achievements.Increment + , Network.Google.Resource.Games.Achievements.List + , Network.Google.Resource.Games.Achievements.Reveal + , Network.Google.Resource.Games.Achievements.SetStepsAtLeast + , Network.Google.Resource.Games.Achievements.Unlock + , Network.Google.Resource.Games.Achievements.UpdateMultiple + , Network.Google.Resource.Games.Applications.Get + , Network.Google.Resource.Games.Applications.Played + , Network.Google.Resource.Games.Events.ListByPlayer + , Network.Google.Resource.Games.Events.ListDefinitions + , Network.Google.Resource.Games.Events.Record + , Network.Google.Resource.Games.Leaderboards.Get + , Network.Google.Resource.Games.Leaderboards.List + , Network.Google.Resource.Games.Metagame.GetMetagameConfig + , Network.Google.Resource.Games.Metagame.ListCategoriesByPlayer + , Network.Google.Resource.Games.Players.Get + , Network.Google.Resource.Games.Players.List + , Network.Google.Resource.Games.Pushtokens.Remove + , Network.Google.Resource.Games.Pushtokens.Update + , Network.Google.Resource.Games.QuestMilestones.Claim + , Network.Google.Resource.Games.Quests.Accept + , Network.Google.Resource.Games.Quests.List + , Network.Google.Resource.Games.Revisions.Check + , Network.Google.Resource.Games.Rooms.Create + , Network.Google.Resource.Games.Rooms.Decline + , Network.Google.Resource.Games.Rooms.Dismiss + , Network.Google.Resource.Games.Rooms.Get + , Network.Google.Resource.Games.Rooms.Join + , Network.Google.Resource.Games.Rooms.Leave + , Network.Google.Resource.Games.Rooms.List + , Network.Google.Resource.Games.Rooms.ReportStatus + , Network.Google.Resource.Games.Scores.Get + , Network.Google.Resource.Games.Scores.List + , Network.Google.Resource.Games.Scores.ListWindow + , Network.Google.Resource.Games.Scores.Submit + , Network.Google.Resource.Games.Scores.SubmitMultiple + , Network.Google.Resource.Games.Snapshots.Get + , Network.Google.Resource.Games.Snapshots.List + , Network.Google.Resource.Games.TurnBasedMatches.Cancel + , Network.Google.Resource.Games.TurnBasedMatches.Create + , Network.Google.Resource.Games.TurnBasedMatches.Decline + , Network.Google.Resource.Games.TurnBasedMatches.Dismiss + , Network.Google.Resource.Games.TurnBasedMatches.Finish + , Network.Google.Resource.Games.TurnBasedMatches.Get + , Network.Google.Resource.Games.TurnBasedMatches.Join + , Network.Google.Resource.Games.TurnBasedMatches.Leave + , Network.Google.Resource.Games.TurnBasedMatches.LeaveTurn + , Network.Google.Resource.Games.TurnBasedMatches.List + , Network.Google.Resource.Games.TurnBasedMatches.Rematch + , Network.Google.Resource.Games.TurnBasedMatches.Sync + , Network.Google.Resource.Games.TurnBasedMatches.TakeTurn + + other-modules: + Network.Google.Games.Types.Product + , Network.Google.Games.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-games/src/.gitkeep b/gogol-games/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-genomics/LICENSE b/gogol-genomics/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-genomics/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-genomics/Makefile b/gogol-genomics/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-genomics/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-genomics/README.md b/gogol-genomics/README.md new file mode 100644 index 000000000..e258712bf --- /dev/null +++ b/gogol-genomics/README.md @@ -0,0 +1,28 @@ +# gogol-genomics + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Genomics API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-genomics` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-genomics/Setup.hs b/gogol-genomics/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-genomics/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-genomics/gen/Network/Google/Genomics.hs b/gogol-genomics/gen/Network/Google/Genomics.hs new file mode 100644 index 000000000..b557630dd --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Genomics.hs @@ -0,0 +1,914 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Genomics +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Provides access to Genomics data. +-- +-- /See:/ +module Network.Google.Genomics + ( + -- * API + GenomicsAPI + , genomicsAPI + , genomicsURL + + -- * Service Methods + + -- * REST Resources + + -- ** GenomicsAnnotationSetsCreate + , module Genomics.AnnotationSets.Create + + -- ** GenomicsAnnotationSetsDelete + , module Genomics.AnnotationSets.Delete + + -- ** GenomicsAnnotationSetsGet + , module Genomics.AnnotationSets.Get + + -- ** GenomicsAnnotationSetsPatch + , module Genomics.AnnotationSets.Patch + + -- ** GenomicsAnnotationSetsSearch + , module Genomics.AnnotationSets.Search + + -- ** GenomicsAnnotationSetsUpdate + , module Genomics.AnnotationSets.Update + + -- ** GenomicsAnnotationsBatchCreate + , module Genomics.Annotations.BatchCreate + + -- ** GenomicsAnnotationsCreate + , module Genomics.Annotations.Create + + -- ** GenomicsAnnotationsDelete + , module Genomics.Annotations.Delete + + -- ** GenomicsAnnotationsGet + , module Genomics.Annotations.Get + + -- ** GenomicsAnnotationsPatch + , module Genomics.Annotations.Patch + + -- ** GenomicsAnnotationsSearch + , module Genomics.Annotations.Search + + -- ** GenomicsAnnotationsUpdate + , module Genomics.Annotations.Update + + -- ** GenomicsCallsetsCreate + , module Genomics.Callsets.Create + + -- ** GenomicsCallsetsDelete + , module Genomics.Callsets.Delete + + -- ** GenomicsCallsetsGet + , module Genomics.Callsets.Get + + -- ** GenomicsCallsetsPatch + , module Genomics.Callsets.Patch + + -- ** GenomicsCallsetsSearch + , module Genomics.Callsets.Search + + -- ** GenomicsCallsetsUpdate + , module Genomics.Callsets.Update + + -- ** GenomicsDatasetsCreate + , module Genomics.Datasets.Create + + -- ** GenomicsDatasetsDelete + , module Genomics.Datasets.Delete + + -- ** GenomicsDatasetsGet + , module Genomics.Datasets.Get + + -- ** GenomicsDatasetsList + , module Genomics.Datasets.List + + -- ** GenomicsDatasetsPatch + , module Genomics.Datasets.Patch + + -- ** GenomicsDatasetsUndelete + , module Genomics.Datasets.Undelete + + -- ** GenomicsDatasetsUpdate + , module Genomics.Datasets.Update + + -- ** GenomicsExperimentalJobsCreate + , module Genomics.Experimental.Jobs.Create + + -- ** GenomicsJobsCancel + , module Genomics.Jobs.Cancel + + -- ** GenomicsJobsGet + , module Genomics.Jobs.Get + + -- ** GenomicsJobsSearch + , module Genomics.Jobs.Search + + -- ** GenomicsReadgroupsetsAlign + , module Genomics.Readgroupsets.Align + + -- ** GenomicsReadgroupsetsCall + , module Genomics.Readgroupsets.Call + + -- ** GenomicsReadgroupsetsCoveragebucketsList + , module Genomics.Readgroupsets.Coveragebuckets.List + + -- ** GenomicsReadgroupsetsDelete + , module Genomics.Readgroupsets.Delete + + -- ** GenomicsReadgroupsetsExport + , module Genomics.Readgroupsets.Export + + -- ** GenomicsReadgroupsetsGet + , module Genomics.Readgroupsets.Get + + -- ** GenomicsReadgroupsetsImport + , module Genomics.Readgroupsets.Import + + -- ** GenomicsReadgroupsetsPatch + , module Genomics.Readgroupsets.Patch + + -- ** GenomicsReadgroupsetsSearch + , module Genomics.Readgroupsets.Search + + -- ** GenomicsReadgroupsetsUpdate + , module Genomics.Readgroupsets.Update + + -- ** GenomicsReadsSearch + , module Genomics.Reads.Search + + -- ** GenomicsReferencesBasesList + , module Genomics.References.Bases.List + + -- ** GenomicsReferencesGet + , module Genomics.References.Get + + -- ** GenomicsReferencesSearch + , module Genomics.References.Search + + -- ** GenomicsReferencesetsGet + , module Genomics.Referencesets.Get + + -- ** GenomicsReferencesetsSearch + , module Genomics.Referencesets.Search + + -- ** GenomicsVariantsCreate + , module Genomics.Variants.Create + + -- ** GenomicsVariantsDelete + , module Genomics.Variants.Delete + + -- ** GenomicsVariantsGet + , module Genomics.Variants.Get + + -- ** GenomicsVariantsSearch + , module Genomics.Variants.Search + + -- ** GenomicsVariantsUpdate + , module Genomics.Variants.Update + + -- ** GenomicsVariantsetsCreate + , module Genomics.Variantsets.Create + + -- ** GenomicsVariantsetsDelete + , module Genomics.Variantsets.Delete + + -- ** GenomicsVariantsetsExport + , module Genomics.Variantsets.Export + + -- ** GenomicsVariantsetsGet + , module Genomics.Variantsets.Get + + -- ** GenomicsVariantsetsImportVariants + , module Genomics.Variantsets.ImportVariants + + -- ** GenomicsVariantsetsMergeVariants + , module Genomics.Variantsets.MergeVariants + + -- ** GenomicsVariantsetsPatch + , module Genomics.Variantsets.Patch + + -- ** GenomicsVariantsetsSearch + , module Genomics.Variantsets.Search + + -- ** GenomicsVariantsetsUpdate + , module Genomics.Variantsets.Update + + -- * Types + + -- ** FastqMetadata + , FastqMetadata + , fastqMetadata + , fmPlatformUnit + , fmReadGroupName + , fmLibraryName + , fmPlatformName + , fmSampleName + + -- ** KeyValue + , KeyValue + , keyValue + , kvValue + , kvKey + + -- ** ReadGroupExperiment + , ReadGroupExperiment + , readGroupExperiment + , rgeInstrumentModel + , rgePlatformUnit + , rgeSequencingCenter + , rgeLibraryId + + -- ** ListBasesResponse + , ListBasesResponse + , listBasesResponse + , lbrNextPageToken + , lbrOffset + , lbrSequence + + -- ** InterleavedFastqSource + , InterleavedFastqSource + , interleavedFastqSource + , ifsMetadata + , ifsSourceUris + + -- ** Annotation + , Annotation + , annotation + , aVariant + , aAnnotationSetId + , aName + , aId + , aType + , aTranscript + , aInfo + , aPosition + + -- ** BatchAnnotationsResponseEntry + , BatchAnnotationsResponseEntry + , batchAnnotationsResponseEntry + , bareStatus + , bareAnnotation + + -- ** Variant + , Variant + , variant + , vVariantSetId + , vCreated + , vStart + , vAlternateBases + , vReferenceName + , vNames + , vEnd + , vReferenceBases + , vId + , vQuality + , vFilter + , vInfo + , vCalls + + -- ** CallReadGroupSetsRequest + , CallReadGroupSetsRequest + , callReadGroupSetsRequest + , crgsrReadGroupSetId + , crgsrDatasetId + , crgsrSourceUris + + -- ** Read + , Read + , read + , rFragmentLength + , rDuplicateFragment + , rReadGroupSetId + , rNextMatePosition + , rFailedVendorQualityChecks + , rAlignment + , rFragmentName + , rNumberReads + , rId + , rSecondaryAlignment + , rReadGroupId + , rSupplementaryAlignment + , rAlignedSequence + , rProperPlacement + , rInfo + , rReadNumber + , rAlignedQuality + + -- ** Call + , Call + , call + , cGenotypeLikelihood + , cCallSetName + , cPhaseset + , cCallSetId + , cGenotype + , cInfo + + -- ** Dataset + , Dataset + , dataset + , dIsPublic + , dProjectNumber + , dName + , dId + , dCreateTime + + -- ** TranscriptExon + , TranscriptExon + , transcriptExon + , teStart + , teEnd + , teFrame + + -- ** QueryRange + , QueryRange + , queryRange + , qrStart + , qrReferenceId + , qrReferenceName + , qrEnd + + -- ** ReadGroup + , ReadGroup + , readGroup + , rgReferenceSetId + , rgPrograms + , rgExperiment + , rgName + , rgDatasetId + , rgId + , rgSampleId + , rgPredictedInsertSize + , rgDescription + , rgInfo + + -- ** SearchReferencesResponse + , SearchReferencesResponse + , searchReferencesResponse + , srrNextPageToken + , srrReferences + + -- ** MergeVariantsRequest + , MergeVariantsRequest + , mergeVariantsRequest + , mvrVariants + + -- ** SearchReferenceSetsRequest + , SearchReferenceSetsRequest + , searchReferenceSetsRequest + , srsrMd5checksums + , srsrAccessions + , srsrPageToken + , srsrAssemblyId + , srsrPageSize + + -- ** BatchCreateAnnotationsRequest + , BatchCreateAnnotationsRequest + , batchCreateAnnotationsRequest + , bcarAnnotations + + -- ** CallSet + , CallSet + , callSet + , csCreated + , csName + , csId + , csSampleId + , csVariantSetIds + , csInfo + + -- ** CoverageBucket + , CoverageBucket + , coverageBucket + , cbRange + , cbMeanCoverage + + -- ** VariantAnnotation + , VariantAnnotation + , variantAnnotation + , vaEffect + , vaClinicalSignificance + , vaAlternateBases + , vaGeneId + , vaConditions + , vaType + , vaTranscriptIds + + -- ** BatchAnnotationsResponseEntryStatus + , BatchAnnotationsResponseEntryStatus + , batchAnnotationsResponseEntryStatus + , baresCode + , baresMessage + + -- ** BatchAnnotationsResponse + , BatchAnnotationsResponse + , batchAnnotationsResponse + , barEntries + + -- ** Reference + , Reference + , reference + , refLength + , refSourceAccessions + , refMd5checksum + , refName + , refNcbiTaxonId + , refId + , refSourceURI + + -- ** SearchReadGroupSetsRequest + , SearchReadGroupSetsRequest + , searchReadGroupSetsRequest + , srgsrDatasetIds + , srgsrName + , srgsrPageToken + , srgsrPageSize + + -- ** SearchJobsRequest + , SearchJobsRequest + , searchJobsRequest + , sjrCreatedAfter + , sjrStatus + , sjrProjectNumber + , sjrPageToken + , sjrPageSize + , sjrCreatedBefore + + -- ** SearchReadsRequest + , SearchReadsRequest + , searchReadsRequest + , srrStart + , srrReadGroupIds + , srrReferenceName + , srrEnd + , srrPageToken + , srrPageSize + , srrReadGroupSetIds + + -- ** SearchCallSetsResponse + , SearchCallSetsResponse + , searchCallSetsResponse + , scsrNextPageToken + , scsrCallSets + + -- ** JobRequest + , JobRequest + , jobRequest + , jrDestination + , jrSource + , jrType + + -- ** ExperimentalCreateJobRequest + , ExperimentalCreateJobRequest + , experimentalCreateJobRequest + , ecjrGcsOutputPath + , ecjrProjectNumber + , ecjrAlign + , ecjrSourceUris + , ecjrPairedSourceUris + , ecjrCallVariants + + -- ** ReadGroupProgram + , ReadGroupProgram + , readGroupProgram + , rgpPrevProgramId + , rgpName + , rgpVersion + , rgpId + , rgpCommandLine + + -- ** SearchAnnotationsResponse + , SearchAnnotationsResponse + , searchAnnotationsResponse + , sarAnnotations + , sarNextPageToken + + -- ** SearchVariantSetsRequest + , SearchVariantSetsRequest + , searchVariantSetsRequest + , svsrDatasetIds + , svsrPageToken + , svsrPageSize + + -- ** SearchAnnotationSetsRequest + , SearchAnnotationSetsRequest + , searchAnnotationSetsRequest + , sasrReferenceSetId + , sasrTypes + , sasrDatasetIds + , sasrName + , sasrPageToken + , sasrPageSize + + -- ** SearchVariantsResponse + , SearchVariantsResponse + , searchVariantsResponse + , svrVariants + , svrNextPageToken + + -- ** ExportReadGroupSetsRequest + , ExportReadGroupSetsRequest + , exportReadGroupSetsRequest + , ergsrReferenceNames + , ergsrProjectNumber + , ergsrExportUri + , ergsrReadGroupSetIds + + -- ** Int32Value + , Int32Value + , int32Value + , ivValue + + -- ** SearchReadsResponse + , SearchReadsResponse + , searchReadsResponse + , sNextPageToken + , sAlignments + + -- ** SearchCallSetsRequest + , SearchCallSetsRequest + , searchCallSetsRequest + , scsrName + , scsrPageToken + , scsrVariantSetIds + , scsrPageSize + + -- ** ExperimentalCreateJobResponse + , ExperimentalCreateJobResponse + , experimentalCreateJobResponse + , ecjrJobId + + -- ** Range + , Range + , range + , rStart + , rReferenceName + , rEnd + + -- ** Job + , Job + , job + , jobDetailedStatus + , jobStatus + , jobCreated + , jobProjectNumber + , jobWarnings + , jobImportedIds + , jobId + , jobErrors + , jobRequest + + -- ** SearchReferenceSetsResponse + , SearchReferenceSetsResponse + , searchReferenceSetsResponse + , srsrNextPageToken + , srsrReferenceSets + + -- ** ReadGroupSet + , ReadGroupSet + , readGroupSet + , rgsReferenceSetId + , rgsName + , rgsDatasetId + , rgsId + , rgsInfo + , rgsReadGroups + , rgsFilename + + -- ** PairedFastqSource + , PairedFastqSource + , pairedFastqSource + , pfsFirstSourceUris + , pfsMetadata + , pfsSecondSourceUris + + -- ** SearchReferencesRequest + , SearchReferencesRequest + , searchReferencesRequest + , sReferenceSetId + , sMd5checksums + , sAccessions + , sPageToken + , sPageSize + + -- ** ImportReadGroupSetsResponse + , ImportReadGroupSetsResponse + , importReadGroupSetsResponse + , irgsrJobId + + -- ** ExportVariantSetResponse + , ExportVariantSetResponse + , exportVariantSetResponse + , evsrJobId + + -- ** ImportVariantsResponse + , ImportVariantsResponse + , importVariantsResponse + , ivrJobId + + -- ** LinearAlignment + , LinearAlignment + , linearAlignment + , laCigar + , laMappingQuality + , laPosition + + -- ** AlignReadGroupSetsResponse + , AlignReadGroupSetsResponse + , alignReadGroupSetsResponse + , argsrJobId + + -- ** ListCoverageBucketsResponse + , ListCoverageBucketsResponse + , listCoverageBucketsResponse + , lcbrNextPageToken + , lcbrBucketWidth + , lcbrCoverageBuckets + + -- ** CallReadGroupSetsResponse + , CallReadGroupSetsResponse + , callReadGroupSetsResponse + , crgsrJobId + + -- ** AnnotationSet + , AnnotationSet + , annotationSet + , asReferenceSetId + , asName + , asDatasetId + , asId + , asType + , asSourceUri + , asInfo + + -- ** Metadata + , Metadata + , metadata + , mValue + , mKey + , mId + , mType + , mNumber + , mDescription + , mInfo + + -- ** VariantSet + , VariantSet + , variantSet + , vsDatasetId + , vsReferenceBounds + , vsMetadata + , vsId + + -- ** CigarUnit + , CigarUnit + , cigarUnit + , cuOperation + , cuOperationLength + , cuReferenceSequence + + -- ** AlignReadGroupSetsRequest + , AlignReadGroupSetsRequest + , alignReadGroupSetsRequest + , argsrInterleavedFastqSource + , argsrReadGroupSetId + , argsrBamSourceUris + , argsrPairedFastqSource + , argsrDatasetId + + -- ** ExportVariantSetRequest + , ExportVariantSetRequest + , exportVariantSetRequest + , evsrBigqueryDataset + , evsrBigqueryTable + , evsrFormat + , evsrProjectNumber + , evsrCallSetIds + + -- ** ImportVariantsRequest + , ImportVariantsRequest + , importVariantsRequest + , ivrFormat + , ivrNormalizeReferenceNames + , ivrSourceUris + + -- ** ExternalId + , ExternalId + , externalId + , eiSourceName + , eiId + + -- ** ImportReadGroupSetsRequest + , ImportReadGroupSetsRequest + , importReadGroupSetsRequest + , irgsrReferenceSetId + , irgsrDatasetId + , irgsrSourceUris + , irgsrPartitionStrategy + + -- ** ListDatasetsResponse + , ListDatasetsResponse + , listDatasetsResponse + , ldrNextPageToken + , ldrDatasets + + -- ** VariantAnnotationCondition + , VariantAnnotationCondition + , variantAnnotationCondition + , vacExternalIds + , vacNames + , vacConceptId + , vacOmimId + + -- ** SearchVariantSetsResponse + , SearchVariantSetsResponse + , searchVariantSetsResponse + , svsrNextPageToken + , svsrVariantSets + + -- ** SearchVariantsRequest + , SearchVariantsRequest + , searchVariantsRequest + , svrStart + , svrCallSetIds + , svrReferenceName + , svrEnd + , svrMaxCalls + , svrPageToken + , svrVariantName + , svrVariantSetIds + , svrPageSize + + -- ** SearchAnnotationsRequest + , SearchAnnotationsRequest + , searchAnnotationsRequest + , sarRange + , sarPageToken + , sarAnnotationSetIds + , sarPageSize + + -- ** ExportReadGroupSetsResponse + , ExportReadGroupSetsResponse + , exportReadGroupSetsResponse + , ergsrJobId + + -- ** SearchAnnotationSetsResponse + , SearchAnnotationSetsResponse + , searchAnnotationSetsResponse + , sasrNextPageToken + , sasrAnnotationSets + + -- ** RangePosition + , RangePosition + , rangePosition + , rpStart + , rpReverseStrand + , rpReferenceId + , rpReferenceName + , rpEnd + + -- ** Transcript + , Transcript + , transcript + , tGeneId + , tCodingSequence + , tExons + + -- ** SearchReadGroupSetsResponse + , SearchReadGroupSetsResponse + , searchReadGroupSetsResponse + , srgsrNextPageToken + , srgsrReadGroupSets + + -- ** SearchJobsResponse + , SearchJobsResponse + , searchJobsResponse + , sjrNextPageToken + , sjrJobs + + -- ** TranscriptCodingSequence + , TranscriptCodingSequence + , transcriptCodingSequence + , tcsStart + , tcsEnd + + -- ** Position + , Position + , position + , pReverseStrand + , pReferenceName + , pPosition + + -- ** ReferenceBound + , ReferenceBound + , referenceBound + , rbUpperBound + , rbReferenceName + + -- ** ReferenceSet + , ReferenceSet + , referenceSet + , rsSourceAccessions + , rsReferenceIds + , rsMd5checksum + , rsNcbiTaxonId + , rsId + , rsAssemblyId + , rsSourceURI + , rsDescription + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude +import Network.Google.Resource.Genomics.Annotations.BatchCreate +import Network.Google.Resource.Genomics.Annotations.Create +import Network.Google.Resource.Genomics.Annotations.Delete +import Network.Google.Resource.Genomics.Annotations.Get +import Network.Google.Resource.Genomics.Annotations.Patch +import Network.Google.Resource.Genomics.Annotations.Search +import Network.Google.Resource.Genomics.Annotations.Update +import Network.Google.Resource.Genomics.AnnotationSets.Create +import Network.Google.Resource.Genomics.AnnotationSets.Delete +import Network.Google.Resource.Genomics.AnnotationSets.Get +import Network.Google.Resource.Genomics.AnnotationSets.Patch +import Network.Google.Resource.Genomics.AnnotationSets.Search +import Network.Google.Resource.Genomics.AnnotationSets.Update +import Network.Google.Resource.Genomics.Callsets.Create +import Network.Google.Resource.Genomics.Callsets.Delete +import Network.Google.Resource.Genomics.Callsets.Get +import Network.Google.Resource.Genomics.Callsets.Patch +import Network.Google.Resource.Genomics.Callsets.Search +import Network.Google.Resource.Genomics.Callsets.Update +import Network.Google.Resource.Genomics.Datasets.Create +import Network.Google.Resource.Genomics.Datasets.Delete +import Network.Google.Resource.Genomics.Datasets.Get +import Network.Google.Resource.Genomics.Datasets.List +import Network.Google.Resource.Genomics.Datasets.Patch +import Network.Google.Resource.Genomics.Datasets.Undelete +import Network.Google.Resource.Genomics.Datasets.Update +import Network.Google.Resource.Genomics.Experimental.Jobs.Create +import Network.Google.Resource.Genomics.Jobs.Cancel +import Network.Google.Resource.Genomics.Jobs.Get +import Network.Google.Resource.Genomics.Jobs.Search +import Network.Google.Resource.Genomics.Readgroupsets.Align +import Network.Google.Resource.Genomics.Readgroupsets.Call +import Network.Google.Resource.Genomics.Readgroupsets.Coveragebuckets.List +import Network.Google.Resource.Genomics.Readgroupsets.Delete +import Network.Google.Resource.Genomics.Readgroupsets.Export +import Network.Google.Resource.Genomics.Readgroupsets.Get +import Network.Google.Resource.Genomics.Readgroupsets.Import +import Network.Google.Resource.Genomics.Readgroupsets.Patch +import Network.Google.Resource.Genomics.Readgroupsets.Search +import Network.Google.Resource.Genomics.Readgroupsets.Update +import Network.Google.Resource.Genomics.Reads.Search +import Network.Google.Resource.Genomics.References.Bases.List +import Network.Google.Resource.Genomics.References.Get +import Network.Google.Resource.Genomics.References.Search +import Network.Google.Resource.Genomics.Referencesets.Get +import Network.Google.Resource.Genomics.Referencesets.Search +import Network.Google.Resource.Genomics.Variants.Create +import Network.Google.Resource.Genomics.Variants.Delete +import Network.Google.Resource.Genomics.Variants.Get +import Network.Google.Resource.Genomics.Variants.Search +import Network.Google.Resource.Genomics.Variants.Update +import Network.Google.Resource.Genomics.Variantsets.Create +import Network.Google.Resource.Genomics.Variantsets.Delete +import Network.Google.Resource.Genomics.Variantsets.Export +import Network.Google.Resource.Genomics.Variantsets.Get +import Network.Google.Resource.Genomics.Variantsets.ImportVariants +import Network.Google.Resource.Genomics.Variantsets.MergeVariants +import Network.Google.Resource.Genomics.Variantsets.Patch +import Network.Google.Resource.Genomics.Variantsets.Search +import Network.Google.Resource.Genomics.Variantsets.Update + +{- $resources +TODO +-} + +type GenomicsAPI = + Annotations :<|> Variants :<|> References :<|> + Variantsets + :<|> AnnotationSets + :<|> Experimental + :<|> Jobs + :<|> Readgroupsets + :<|> Referencesets + :<|> Callsets + :<|> Reads + :<|> Datasets + +genomicsAPI :: Proxy GenomicsAPI +genomicsAPI = Proxy diff --git a/gogol-genomics/gen/Network/Google/Genomics/Types.hs b/gogol-genomics/gen/Network/Google/Genomics/Types.hs new file mode 100644 index 000000000..db57c0dfa --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Genomics/Types.hs @@ -0,0 +1,652 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Genomics.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Genomics.Types + ( + -- * Service URL + genomicsURL + + -- * FastqMetadata + , FastqMetadata + , fastqMetadata + , fmPlatformUnit + , fmReadGroupName + , fmLibraryName + , fmPlatformName + , fmSampleName + + -- * KeyValue + , KeyValue + , keyValue + , kvValue + , kvKey + + -- * ReadGroupExperiment + , ReadGroupExperiment + , readGroupExperiment + , rgeInstrumentModel + , rgePlatformUnit + , rgeSequencingCenter + , rgeLibraryId + + -- * ListBasesResponse + , ListBasesResponse + , listBasesResponse + , lbrNextPageToken + , lbrOffset + , lbrSequence + + -- * InterleavedFastqSource + , InterleavedFastqSource + , interleavedFastqSource + , ifsMetadata + , ifsSourceUris + + -- * Annotation + , Annotation + , annotation + , aVariant + , aAnnotationSetId + , aName + , aId + , aType + , aTranscript + , aInfo + , aPosition + + -- * BatchAnnotationsResponseEntry + , BatchAnnotationsResponseEntry + , batchAnnotationsResponseEntry + , bareStatus + , bareAnnotation + + -- * Variant + , Variant + , variant + , vVariantSetId + , vCreated + , vStart + , vAlternateBases + , vReferenceName + , vNames + , vEnd + , vReferenceBases + , vId + , vQuality + , vFilter + , vInfo + , vCalls + + -- * CallReadGroupSetsRequest + , CallReadGroupSetsRequest + , callReadGroupSetsRequest + , crgsrReadGroupSetId + , crgsrDatasetId + , crgsrSourceUris + + -- * Read + , Read + , read + , rFragmentLength + , rDuplicateFragment + , rReadGroupSetId + , rNextMatePosition + , rFailedVendorQualityChecks + , rAlignment + , rFragmentName + , rNumberReads + , rId + , rSecondaryAlignment + , rReadGroupId + , rSupplementaryAlignment + , rAlignedSequence + , rProperPlacement + , rInfo + , rReadNumber + , rAlignedQuality + + -- * Call + , Call + , call + , cGenotypeLikelihood + , cCallSetName + , cPhaseset + , cCallSetId + , cGenotype + , cInfo + + -- * Dataset + , Dataset + , dataset + , dIsPublic + , dProjectNumber + , dName + , dId + , dCreateTime + + -- * TranscriptExon + , TranscriptExon + , transcriptExon + , teStart + , teEnd + , teFrame + + -- * QueryRange + , QueryRange + , queryRange + , qrStart + , qrReferenceId + , qrReferenceName + , qrEnd + + -- * ReadGroup + , ReadGroup + , readGroup + , rgReferenceSetId + , rgPrograms + , rgExperiment + , rgName + , rgDatasetId + , rgId + , rgSampleId + , rgPredictedInsertSize + , rgDescription + , rgInfo + + -- * SearchReferencesResponse + , SearchReferencesResponse + , searchReferencesResponse + , srrNextPageToken + , srrReferences + + -- * MergeVariantsRequest + , MergeVariantsRequest + , mergeVariantsRequest + , mvrVariants + + -- * SearchReferenceSetsRequest + , SearchReferenceSetsRequest + , searchReferenceSetsRequest + , srsrMd5checksums + , srsrAccessions + , srsrPageToken + , srsrAssemblyId + , srsrPageSize + + -- * BatchCreateAnnotationsRequest + , BatchCreateAnnotationsRequest + , batchCreateAnnotationsRequest + , bcarAnnotations + + -- * CallSet + , CallSet + , callSet + , csCreated + , csName + , csId + , csSampleId + , csVariantSetIds + , csInfo + + -- * CoverageBucket + , CoverageBucket + , coverageBucket + , cbRange + , cbMeanCoverage + + -- * VariantAnnotation + , VariantAnnotation + , variantAnnotation + , vaEffect + , vaClinicalSignificance + , vaAlternateBases + , vaGeneId + , vaConditions + , vaType + , vaTranscriptIds + + -- * BatchAnnotationsResponseEntryStatus + , BatchAnnotationsResponseEntryStatus + , batchAnnotationsResponseEntryStatus + , baresCode + , baresMessage + + -- * BatchAnnotationsResponse + , BatchAnnotationsResponse + , batchAnnotationsResponse + , barEntries + + -- * Reference + , Reference + , reference + , refLength + , refSourceAccessions + , refMd5checksum + , refName + , refNcbiTaxonId + , refId + , refSourceURI + + -- * SearchReadGroupSetsRequest + , SearchReadGroupSetsRequest + , searchReadGroupSetsRequest + , srgsrDatasetIds + , srgsrName + , srgsrPageToken + , srgsrPageSize + + -- * SearchJobsRequest + , SearchJobsRequest + , searchJobsRequest + , sjrCreatedAfter + , sjrStatus + , sjrProjectNumber + , sjrPageToken + , sjrPageSize + , sjrCreatedBefore + + -- * SearchReadsRequest + , SearchReadsRequest + , searchReadsRequest + , srrStart + , srrReadGroupIds + , srrReferenceName + , srrEnd + , srrPageToken + , srrPageSize + , srrReadGroupSetIds + + -- * SearchCallSetsResponse + , SearchCallSetsResponse + , searchCallSetsResponse + , scsrNextPageToken + , scsrCallSets + + -- * JobRequest + , JobRequest + , jobRequest + , jrDestination + , jrSource + , jrType + + -- * ExperimentalCreateJobRequest + , ExperimentalCreateJobRequest + , experimentalCreateJobRequest + , ecjrGcsOutputPath + , ecjrProjectNumber + , ecjrAlign + , ecjrSourceUris + , ecjrPairedSourceUris + , ecjrCallVariants + + -- * ReadGroupProgram + , ReadGroupProgram + , readGroupProgram + , rgpPrevProgramId + , rgpName + , rgpVersion + , rgpId + , rgpCommandLine + + -- * SearchAnnotationsResponse + , SearchAnnotationsResponse + , searchAnnotationsResponse + , sarAnnotations + , sarNextPageToken + + -- * SearchVariantSetsRequest + , SearchVariantSetsRequest + , searchVariantSetsRequest + , svsrDatasetIds + , svsrPageToken + , svsrPageSize + + -- * SearchAnnotationSetsRequest + , SearchAnnotationSetsRequest + , searchAnnotationSetsRequest + , sasrReferenceSetId + , sasrTypes + , sasrDatasetIds + , sasrName + , sasrPageToken + , sasrPageSize + + -- * SearchVariantsResponse + , SearchVariantsResponse + , searchVariantsResponse + , svrVariants + , svrNextPageToken + + -- * ExportReadGroupSetsRequest + , ExportReadGroupSetsRequest + , exportReadGroupSetsRequest + , ergsrReferenceNames + , ergsrProjectNumber + , ergsrExportUri + , ergsrReadGroupSetIds + + -- * Int32Value + , Int32Value + , int32Value + , ivValue + + -- * SearchReadsResponse + , SearchReadsResponse + , searchReadsResponse + , sNextPageToken + , sAlignments + + -- * SearchCallSetsRequest + , SearchCallSetsRequest + , searchCallSetsRequest + , scsrName + , scsrPageToken + , scsrVariantSetIds + , scsrPageSize + + -- * ExperimentalCreateJobResponse + , ExperimentalCreateJobResponse + , experimentalCreateJobResponse + , ecjrJobId + + -- * Range + , Range + , range + , rStart + , rReferenceName + , rEnd + + -- * Job + , Job + , job + , jobDetailedStatus + , jobStatus + , jobCreated + , jobProjectNumber + , jobWarnings + , jobImportedIds + , jobId + , jobErrors + , jobRequest + + -- * SearchReferenceSetsResponse + , SearchReferenceSetsResponse + , searchReferenceSetsResponse + , srsrNextPageToken + , srsrReferenceSets + + -- * ReadGroupSet + , ReadGroupSet + , readGroupSet + , rgsReferenceSetId + , rgsName + , rgsDatasetId + , rgsId + , rgsInfo + , rgsReadGroups + , rgsFilename + + -- * PairedFastqSource + , PairedFastqSource + , pairedFastqSource + , pfsFirstSourceUris + , pfsMetadata + , pfsSecondSourceUris + + -- * SearchReferencesRequest + , SearchReferencesRequest + , searchReferencesRequest + , sReferenceSetId + , sMd5checksums + , sAccessions + , sPageToken + , sPageSize + + -- * ImportReadGroupSetsResponse + , ImportReadGroupSetsResponse + , importReadGroupSetsResponse + , irgsrJobId + + -- * ExportVariantSetResponse + , ExportVariantSetResponse + , exportVariantSetResponse + , evsrJobId + + -- * ImportVariantsResponse + , ImportVariantsResponse + , importVariantsResponse + , ivrJobId + + -- * LinearAlignment + , LinearAlignment + , linearAlignment + , laCigar + , laMappingQuality + , laPosition + + -- * AlignReadGroupSetsResponse + , AlignReadGroupSetsResponse + , alignReadGroupSetsResponse + , argsrJobId + + -- * ListCoverageBucketsResponse + , ListCoverageBucketsResponse + , listCoverageBucketsResponse + , lcbrNextPageToken + , lcbrBucketWidth + , lcbrCoverageBuckets + + -- * CallReadGroupSetsResponse + , CallReadGroupSetsResponse + , callReadGroupSetsResponse + , crgsrJobId + + -- * AnnotationSet + , AnnotationSet + , annotationSet + , asReferenceSetId + , asName + , asDatasetId + , asId + , asType + , asSourceUri + , asInfo + + -- * Metadata + , Metadata + , metadata + , mValue + , mKey + , mId + , mType + , mNumber + , mDescription + , mInfo + + -- * VariantSet + , VariantSet + , variantSet + , vsDatasetId + , vsReferenceBounds + , vsMetadata + , vsId + + -- * CigarUnit + , CigarUnit + , cigarUnit + , cuOperation + , cuOperationLength + , cuReferenceSequence + + -- * AlignReadGroupSetsRequest + , AlignReadGroupSetsRequest + , alignReadGroupSetsRequest + , argsrInterleavedFastqSource + , argsrReadGroupSetId + , argsrBamSourceUris + , argsrPairedFastqSource + , argsrDatasetId + + -- * ExportVariantSetRequest + , ExportVariantSetRequest + , exportVariantSetRequest + , evsrBigqueryDataset + , evsrBigqueryTable + , evsrFormat + , evsrProjectNumber + , evsrCallSetIds + + -- * ImportVariantsRequest + , ImportVariantsRequest + , importVariantsRequest + , ivrFormat + , ivrNormalizeReferenceNames + , ivrSourceUris + + -- * ExternalId + , ExternalId + , externalId + , eiSourceName + , eiId + + -- * ImportReadGroupSetsRequest + , ImportReadGroupSetsRequest + , importReadGroupSetsRequest + , irgsrReferenceSetId + , irgsrDatasetId + , irgsrSourceUris + , irgsrPartitionStrategy + + -- * ListDatasetsResponse + , ListDatasetsResponse + , listDatasetsResponse + , ldrNextPageToken + , ldrDatasets + + -- * VariantAnnotationCondition + , VariantAnnotationCondition + , variantAnnotationCondition + , vacExternalIds + , vacNames + , vacConceptId + , vacOmimId + + -- * SearchVariantSetsResponse + , SearchVariantSetsResponse + , searchVariantSetsResponse + , svsrNextPageToken + , svsrVariantSets + + -- * SearchVariantsRequest + , SearchVariantsRequest + , searchVariantsRequest + , svrStart + , svrCallSetIds + , svrReferenceName + , svrEnd + , svrMaxCalls + , svrPageToken + , svrVariantName + , svrVariantSetIds + , svrPageSize + + -- * SearchAnnotationsRequest + , SearchAnnotationsRequest + , searchAnnotationsRequest + , sarRange + , sarPageToken + , sarAnnotationSetIds + , sarPageSize + + -- * ExportReadGroupSetsResponse + , ExportReadGroupSetsResponse + , exportReadGroupSetsResponse + , ergsrJobId + + -- * SearchAnnotationSetsResponse + , SearchAnnotationSetsResponse + , searchAnnotationSetsResponse + , sasrNextPageToken + , sasrAnnotationSets + + -- * RangePosition + , RangePosition + , rangePosition + , rpStart + , rpReverseStrand + , rpReferenceId + , rpReferenceName + , rpEnd + + -- * Transcript + , Transcript + , transcript + , tGeneId + , tCodingSequence + , tExons + + -- * SearchReadGroupSetsResponse + , SearchReadGroupSetsResponse + , searchReadGroupSetsResponse + , srgsrNextPageToken + , srgsrReadGroupSets + + -- * SearchJobsResponse + , SearchJobsResponse + , searchJobsResponse + , sjrNextPageToken + , sjrJobs + + -- * TranscriptCodingSequence + , TranscriptCodingSequence + , transcriptCodingSequence + , tcsStart + , tcsEnd + + -- * Position + , Position + , position + , pReverseStrand + , pReferenceName + , pPosition + + -- * ReferenceBound + , ReferenceBound + , referenceBound + , rbUpperBound + , rbReferenceName + + -- * ReferenceSet + , ReferenceSet + , referenceSet + , rsSourceAccessions + , rsReferenceIds + , rsMd5checksum + , rsNcbiTaxonId + , rsId + , rsAssemblyId + , rsSourceURI + , rsDescription + ) where + +import Network.Google.Genomics.Types.Product +import Network.Google.Genomics.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the Genomics API. +genomicsURL :: BaseURL +genomicsURL + = BaseUrl Https + "https://www.googleapis.com/genomics/v1beta2/" + 443 diff --git a/gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs b/gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs new file mode 100644 index 000000000..ceded69d0 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs @@ -0,0 +1,6004 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Genomics.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Genomics.Types.Product where + +import Network.Google.Genomics.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'fastqMetadata' smart constructor. +data FastqMetadata = FastqMetadata + { _fmPlatformUnit :: !(Maybe Text) + , _fmReadGroupName :: !(Maybe Text) + , _fmLibraryName :: !(Maybe Text) + , _fmPlatformName :: !(Maybe Text) + , _fmSampleName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FastqMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fmPlatformUnit' +-- +-- * 'fmReadGroupName' +-- +-- * 'fmLibraryName' +-- +-- * 'fmPlatformName' +-- +-- * 'fmSampleName' +fastqMetadata + :: FastqMetadata +fastqMetadata = + FastqMetadata + { _fmPlatformUnit = Nothing + , _fmReadGroupName = Nothing + , _fmLibraryName = Nothing + , _fmPlatformName = Nothing + , _fmSampleName = Nothing + } + +-- | Optionally specifies the platform unit for alignment from FASTQ. For +-- example: flowcell-barcode.lane for Illumina or slide for SOLID. +fmPlatformUnit :: Lens' FastqMetadata (Maybe Text) +fmPlatformUnit + = lens _fmPlatformUnit + (\ s a -> s{_fmPlatformUnit = a}) + +-- | Optionally specifies the read group name for alignment from FASTQ. +fmReadGroupName :: Lens' FastqMetadata (Maybe Text) +fmReadGroupName + = lens _fmReadGroupName + (\ s a -> s{_fmReadGroupName = a}) + +-- | Optionally specifies the library name for alignment from FASTQ. +fmLibraryName :: Lens' FastqMetadata (Maybe Text) +fmLibraryName + = lens _fmLibraryName + (\ s a -> s{_fmLibraryName = a}) + +-- | Optionally specifies the platform name for alignment from FASTQ. For +-- example: CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT, PACBIO. +fmPlatformName :: Lens' FastqMetadata (Maybe Text) +fmPlatformName + = lens _fmPlatformName + (\ s a -> s{_fmPlatformName = a}) + +-- | Optionally specifies the sample name for alignment from FASTQ. +fmSampleName :: Lens' FastqMetadata (Maybe Text) +fmSampleName + = lens _fmSampleName (\ s a -> s{_fmSampleName = a}) + +instance FromJSON FastqMetadata where + parseJSON + = withObject "FastqMetadata" + (\ o -> + FastqMetadata <$> + (o .:? "platformUnit") <*> (o .:? "readGroupName") + <*> (o .:? "libraryName") + <*> (o .:? "platformName") + <*> (o .:? "sampleName")) + +instance ToJSON FastqMetadata where + toJSON FastqMetadata{..} + = object + (catMaybes + [("platformUnit" .=) <$> _fmPlatformUnit, + ("readGroupName" .=) <$> _fmReadGroupName, + ("libraryName" .=) <$> _fmLibraryName, + ("platformName" .=) <$> _fmPlatformName, + ("sampleName" .=) <$> _fmSampleName]) + +-- | Used to hold basic key value information. +-- +-- /See:/ 'keyValue' smart constructor. +data KeyValue = KeyValue + { _kvValue :: !(Maybe [Text]) + , _kvKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'KeyValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'kvValue' +-- +-- * 'kvKey' +keyValue + :: KeyValue +keyValue = + KeyValue + { _kvValue = Nothing + , _kvKey = Nothing + } + +-- | The string values. +kvValue :: Lens' KeyValue [Text] +kvValue + = lens _kvValue (\ s a -> s{_kvValue = a}) . _Default + . _Coerce + +-- | A string which maps to an array of values. +kvKey :: Lens' KeyValue (Maybe Text) +kvKey = lens _kvKey (\ s a -> s{_kvKey = a}) + +instance FromJSON KeyValue where + parseJSON + = withObject "KeyValue" + (\ o -> + KeyValue <$> + (o .:? "value" .!= mempty) <*> (o .:? "key")) + +instance ToJSON KeyValue where + toJSON KeyValue{..} + = object + (catMaybes + [("value" .=) <$> _kvValue, ("key" .=) <$> _kvKey]) + +-- +-- /See:/ 'readGroupExperiment' smart constructor. +data ReadGroupExperiment = ReadGroupExperiment + { _rgeInstrumentModel :: !(Maybe Text) + , _rgePlatformUnit :: !(Maybe Text) + , _rgeSequencingCenter :: !(Maybe Text) + , _rgeLibraryId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadGroupExperiment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgeInstrumentModel' +-- +-- * 'rgePlatformUnit' +-- +-- * 'rgeSequencingCenter' +-- +-- * 'rgeLibraryId' +readGroupExperiment + :: ReadGroupExperiment +readGroupExperiment = + ReadGroupExperiment + { _rgeInstrumentModel = Nothing + , _rgePlatformUnit = Nothing + , _rgeSequencingCenter = Nothing + , _rgeLibraryId = Nothing + } + +-- | The instrument model used as part of this experiment. This maps to +-- sequencing technology in BAM. +rgeInstrumentModel :: Lens' ReadGroupExperiment (Maybe Text) +rgeInstrumentModel + = lens _rgeInstrumentModel + (\ s a -> s{_rgeInstrumentModel = a}) + +-- | The platform unit used as part of this experiment e.g. +-- flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to +-- the +rgePlatformUnit :: Lens' ReadGroupExperiment (Maybe Text) +rgePlatformUnit + = lens _rgePlatformUnit + (\ s a -> s{_rgePlatformUnit = a}) + +-- | The sequencing center used as part of this experiment. +rgeSequencingCenter :: Lens' ReadGroupExperiment (Maybe Text) +rgeSequencingCenter + = lens _rgeSequencingCenter + (\ s a -> s{_rgeSequencingCenter = a}) + +-- | The library used as part of this experiment. Note: This is not an actual +-- ID within this repository, but rather an identifier for a library which +-- may be meaningful to some external system. +rgeLibraryId :: Lens' ReadGroupExperiment (Maybe Text) +rgeLibraryId + = lens _rgeLibraryId (\ s a -> s{_rgeLibraryId = a}) + +instance FromJSON ReadGroupExperiment where + parseJSON + = withObject "ReadGroupExperiment" + (\ o -> + ReadGroupExperiment <$> + (o .:? "instrumentModel") <*> (o .:? "platformUnit") + <*> (o .:? "sequencingCenter") + <*> (o .:? "libraryId")) + +instance ToJSON ReadGroupExperiment where + toJSON ReadGroupExperiment{..} + = object + (catMaybes + [("instrumentModel" .=) <$> _rgeInstrumentModel, + ("platformUnit" .=) <$> _rgePlatformUnit, + ("sequencingCenter" .=) <$> _rgeSequencingCenter, + ("libraryId" .=) <$> _rgeLibraryId]) + +-- +-- /See:/ 'listBasesResponse' smart constructor. +data ListBasesResponse = ListBasesResponse + { _lbrNextPageToken :: !(Maybe Text) + , _lbrOffset :: !(Maybe Int64) + , _lbrSequence :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListBasesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbrNextPageToken' +-- +-- * 'lbrOffset' +-- +-- * 'lbrSequence' +listBasesResponse + :: ListBasesResponse +listBasesResponse = + ListBasesResponse + { _lbrNextPageToken = Nothing + , _lbrOffset = Nothing + , _lbrSequence = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +lbrNextPageToken :: Lens' ListBasesResponse (Maybe Text) +lbrNextPageToken + = lens _lbrNextPageToken + (\ s a -> s{_lbrNextPageToken = a}) + +-- | The offset position (0-based) of the given sequence from the start of +-- this Reference. This value will differ for each page in a paginated +-- request. +lbrOffset :: Lens' ListBasesResponse (Maybe Int64) +lbrOffset + = lens _lbrOffset (\ s a -> s{_lbrOffset = a}) + +-- | A substring of the bases that make up this reference. +lbrSequence :: Lens' ListBasesResponse (Maybe Text) +lbrSequence + = lens _lbrSequence (\ s a -> s{_lbrSequence = a}) + +instance FromJSON ListBasesResponse where + parseJSON + = withObject "ListBasesResponse" + (\ o -> + ListBasesResponse <$> + (o .:? "nextPageToken") <*> (o .:? "offset") <*> + (o .:? "sequence")) + +instance ToJSON ListBasesResponse where + toJSON ListBasesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lbrNextPageToken, + ("offset" .=) <$> _lbrOffset, + ("sequence" .=) <$> _lbrSequence]) + +-- | Describes an interleaved FASTQ file source for alignment. +-- +-- /See:/ 'interleavedFastqSource' smart constructor. +data InterleavedFastqSource = InterleavedFastqSource + { _ifsMetadata :: !(Maybe (Maybe FastqMetadata)) + , _ifsSourceUris :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InterleavedFastqSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ifsMetadata' +-- +-- * 'ifsSourceUris' +interleavedFastqSource + :: InterleavedFastqSource +interleavedFastqSource = + InterleavedFastqSource + { _ifsMetadata = Nothing + , _ifsSourceUris = Nothing + } + +-- | Optionally specifies the metadata to be associated with the final +-- aligned read group set. +ifsMetadata :: Lens' InterleavedFastqSource (Maybe (Maybe FastqMetadata)) +ifsMetadata + = lens _ifsMetadata (\ s a -> s{_ifsMetadata = a}) + +-- | A list of URIs pointing at interleaved FASTQ files in Google Cloud +-- Storage which will be aligned. The caller must have READ permissions for +-- these files. +ifsSourceUris :: Lens' InterleavedFastqSource [Text] +ifsSourceUris + = lens _ifsSourceUris + (\ s a -> s{_ifsSourceUris = a}) + . _Default + . _Coerce + +instance FromJSON InterleavedFastqSource where + parseJSON + = withObject "InterleavedFastqSource" + (\ o -> + InterleavedFastqSource <$> + (o .:? "metadata") <*> + (o .:? "sourceUris" .!= mempty)) + +instance ToJSON InterleavedFastqSource where + toJSON InterleavedFastqSource{..} + = object + (catMaybes + [("metadata" .=) <$> _ifsMetadata, + ("sourceUris" .=) <$> _ifsSourceUris]) + +-- | An annotation describes a region of reference genome. The value of an +-- annotation may be one of several canonical types, supplemented by +-- arbitrary info tags. A variant annotation is represented by one or more +-- of these canonical types. An annotation is not inherently associated +-- with a specific sample or individual (though a client could choose to +-- use annotations in this way). Example canonical annotation types are +-- \'Gene\' and \'Variant\'. +-- +-- /See:/ 'annotation' smart constructor. +data Annotation = Annotation + { _aVariant :: !(Maybe (Maybe VariantAnnotation)) + , _aAnnotationSetId :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aId :: !(Maybe Text) + , _aType :: !(Maybe Text) + , _aTranscript :: !(Maybe (Maybe Transcript)) + , _aInfo :: !(Maybe AnnotationInfo) + , _aPosition :: !(Maybe (Maybe RangePosition)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Annotation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aVariant' +-- +-- * 'aAnnotationSetId' +-- +-- * 'aName' +-- +-- * 'aId' +-- +-- * 'aType' +-- +-- * 'aTranscript' +-- +-- * 'aInfo' +-- +-- * 'aPosition' +annotation + :: Annotation +annotation = + Annotation + { _aVariant = Nothing + , _aAnnotationSetId = Nothing + , _aName = Nothing + , _aId = Nothing + , _aType = Nothing + , _aTranscript = Nothing + , _aInfo = Nothing + , _aPosition = Nothing + } + +-- | A variant annotation, which describes the effect of a variant on the +-- genome, the coding sequence, and\/or higher level consequences at the +-- organism level e.g. pathogenicity. This field is only set for +-- annotations of type VARIANT. +aVariant :: Lens' Annotation (Maybe (Maybe VariantAnnotation)) +aVariant = lens _aVariant (\ s a -> s{_aVariant = a}) + +-- | The ID of the containing annotation set. +aAnnotationSetId :: Lens' Annotation (Maybe Text) +aAnnotationSetId + = lens _aAnnotationSetId + (\ s a -> s{_aAnnotationSetId = a}) + +-- | The display name of this annotation. +aName :: Lens' Annotation (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | The generated unique ID for this annotation. +aId :: Lens' Annotation (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | The data type for this annotation. Must match the containing annotation +-- set\'s type. +aType :: Lens' Annotation (Maybe Text) +aType = lens _aType (\ s a -> s{_aType = a}) + +-- | A transcript value represents the assertion that a particular region of +-- the reference genome may be transcribed as RNA. An alternative splicing +-- pattern would be represented as a separate transcript object. This field +-- is only set for annotations of type TRANSCRIPT. +aTranscript :: Lens' Annotation (Maybe (Maybe Transcript)) +aTranscript + = lens _aTranscript (\ s a -> s{_aTranscript = a}) + +-- | A string which maps to an array of values. +aInfo :: Lens' Annotation (Maybe AnnotationInfo) +aInfo = lens _aInfo (\ s a -> s{_aInfo = a}) + +-- | The position of this annotation on the reference sequence. +aPosition :: Lens' Annotation (Maybe (Maybe RangePosition)) +aPosition + = lens _aPosition (\ s a -> s{_aPosition = a}) + +instance FromJSON Annotation where + parseJSON + = withObject "Annotation" + (\ o -> + Annotation <$> + (o .:? "variant") <*> (o .:? "annotationSetId") <*> + (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "transcript") + <*> (o .:? "info") + <*> (o .:? "position")) + +instance ToJSON Annotation where + toJSON Annotation{..} + = object + (catMaybes + [("variant" .=) <$> _aVariant, + ("annotationSetId" .=) <$> _aAnnotationSetId, + ("name" .=) <$> _aName, ("id" .=) <$> _aId, + ("type" .=) <$> _aType, + ("transcript" .=) <$> _aTranscript, + ("info" .=) <$> _aInfo, + ("position" .=) <$> _aPosition]) + +-- +-- /See:/ 'batchAnnotationsResponseEntry' smart constructor. +data BatchAnnotationsResponseEntry = BatchAnnotationsResponseEntry + { _bareStatus :: !(Maybe (Maybe BatchAnnotationsResponseEntryStatus)) + , _bareAnnotation :: !(Maybe (Maybe Annotation)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchAnnotationsResponseEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bareStatus' +-- +-- * 'bareAnnotation' +batchAnnotationsResponseEntry + :: BatchAnnotationsResponseEntry +batchAnnotationsResponseEntry = + BatchAnnotationsResponseEntry + { _bareStatus = Nothing + , _bareAnnotation = Nothing + } + +-- | The resulting status for this annotation operation. +bareStatus :: Lens' BatchAnnotationsResponseEntry (Maybe (Maybe BatchAnnotationsResponseEntryStatus)) +bareStatus + = lens _bareStatus (\ s a -> s{_bareStatus = a}) + +-- | The annotation, if any. +bareAnnotation :: Lens' BatchAnnotationsResponseEntry (Maybe (Maybe Annotation)) +bareAnnotation + = lens _bareAnnotation + (\ s a -> s{_bareAnnotation = a}) + +instance FromJSON BatchAnnotationsResponseEntry where + parseJSON + = withObject "BatchAnnotationsResponseEntry" + (\ o -> + BatchAnnotationsResponseEntry <$> + (o .:? "status") <*> (o .:? "annotation")) + +instance ToJSON BatchAnnotationsResponseEntry where + toJSON BatchAnnotationsResponseEntry{..} + = object + (catMaybes + [("status" .=) <$> _bareStatus, + ("annotation" .=) <$> _bareAnnotation]) + +-- | A variant represents a change in DNA sequence relative to a reference +-- sequence. For example, a variant could represent a SNP or an insertion. +-- Variants belong to a variant set. Each of the calls on a variant +-- represent a determination of genotype with respect to that variant. For +-- example, a call might assign probability of 0.32 to the occurrence of a +-- SNP named rs1234 in a sample named NA12345. A call belongs to a call +-- set, which contains related calls typically from one sample. +-- +-- /See:/ 'variant' smart constructor. +data Variant = Variant + { _vVariantSetId :: !(Maybe Text) + , _vCreated :: !(Maybe Int64) + , _vStart :: !(Maybe Int64) + , _vAlternateBases :: !(Maybe [Text]) + , _vReferenceName :: !(Maybe Text) + , _vNames :: !(Maybe [Text]) + , _vEnd :: !(Maybe Int64) + , _vReferenceBases :: !(Maybe Text) + , _vId :: !(Maybe Text) + , _vQuality :: !(Maybe Double) + , _vFilter :: !(Maybe [Text]) + , _vInfo :: !(Maybe VariantInfo) + , _vCalls :: !(Maybe [Maybe Call]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Variant' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vVariantSetId' +-- +-- * 'vCreated' +-- +-- * 'vStart' +-- +-- * 'vAlternateBases' +-- +-- * 'vReferenceName' +-- +-- * 'vNames' +-- +-- * 'vEnd' +-- +-- * 'vReferenceBases' +-- +-- * 'vId' +-- +-- * 'vQuality' +-- +-- * 'vFilter' +-- +-- * 'vInfo' +-- +-- * 'vCalls' +variant + :: Variant +variant = + Variant + { _vVariantSetId = Nothing + , _vCreated = Nothing + , _vStart = Nothing + , _vAlternateBases = Nothing + , _vReferenceName = Nothing + , _vNames = Nothing + , _vEnd = Nothing + , _vReferenceBases = Nothing + , _vId = Nothing + , _vQuality = Nothing + , _vFilter = Nothing + , _vInfo = Nothing + , _vCalls = Nothing + } + +-- | The ID of the variant set this variant belongs to. +vVariantSetId :: Lens' Variant (Maybe Text) +vVariantSetId + = lens _vVariantSetId + (\ s a -> s{_vVariantSetId = a}) + +-- | The date this variant was created, in milliseconds from the epoch. +vCreated :: Lens' Variant (Maybe Int64) +vCreated = lens _vCreated (\ s a -> s{_vCreated = a}) + +-- | The position at which this variant occurs (0-based). This corresponds to +-- the first base of the string of reference bases. +vStart :: Lens' Variant (Maybe Int64) +vStart = lens _vStart (\ s a -> s{_vStart = a}) + +-- | The bases that appear instead of the reference bases. +vAlternateBases :: Lens' Variant [Text] +vAlternateBases + = lens _vAlternateBases + (\ s a -> s{_vAlternateBases = a}) + . _Default + . _Coerce + +-- | The reference on which this variant occurs. (such as chr20 or X) +vReferenceName :: Lens' Variant (Maybe Text) +vReferenceName + = lens _vReferenceName + (\ s a -> s{_vReferenceName = a}) + +-- | Names for the variant, for example a RefSNP ID. +vNames :: Lens' Variant [Text] +vNames + = lens _vNames (\ s a -> s{_vNames = a}) . _Default . + _Coerce + +-- | The end position (0-based) of this variant. This corresponds to the +-- first base after the last base in the reference allele. So, the length +-- of the reference allele is (end - start). This is useful for variants +-- that don\'t explicitly give alternate bases, for example large +-- deletions. +vEnd :: Lens' Variant (Maybe Int64) +vEnd = lens _vEnd (\ s a -> s{_vEnd = a}) + +-- | The reference bases for this variant. They start at the given position. +vReferenceBases :: Lens' Variant (Maybe Text) +vReferenceBases + = lens _vReferenceBases + (\ s a -> s{_vReferenceBases = a}) + +-- | The Google generated ID of the variant, immutable. +vId :: Lens' Variant (Maybe Text) +vId = lens _vId (\ s a -> s{_vId = a}) + +-- | A measure of how likely this variant is to be real. A higher value is +-- better. +vQuality :: Lens' Variant (Maybe Double) +vQuality = lens _vQuality (\ s a -> s{_vQuality = a}) + +-- | A list of filters (normally quality filters) this variant has failed. +-- PASS indicates this variant has passed all filters. +vFilter :: Lens' Variant [Text] +vFilter + = lens _vFilter (\ s a -> s{_vFilter = a}) . _Default + . _Coerce + +-- | A string which maps to an array of values. +vInfo :: Lens' Variant (Maybe VariantInfo) +vInfo = lens _vInfo (\ s a -> s{_vInfo = a}) + +-- | The variant calls for this particular variant. Each one represents the +-- determination of genotype with respect to this variant. +vCalls :: Lens' Variant [Maybe Call] +vCalls + = lens _vCalls (\ s a -> s{_vCalls = a}) . _Default . + _Coerce + +instance FromJSON Variant where + parseJSON + = withObject "Variant" + (\ o -> + Variant <$> + (o .:? "variantSetId") <*> (o .:? "created") <*> + (o .:? "start") + <*> (o .:? "alternateBases" .!= mempty) + <*> (o .:? "referenceName") + <*> (o .:? "names" .!= mempty) + <*> (o .:? "end") + <*> (o .:? "referenceBases") + <*> (o .:? "id") + <*> (o .:? "quality") + <*> (o .:? "filter" .!= mempty) + <*> (o .:? "info") + <*> (o .:? "calls" .!= mempty)) + +instance ToJSON Variant where + toJSON Variant{..} + = object + (catMaybes + [("variantSetId" .=) <$> _vVariantSetId, + ("created" .=) <$> _vCreated, + ("start" .=) <$> _vStart, + ("alternateBases" .=) <$> _vAlternateBases, + ("referenceName" .=) <$> _vReferenceName, + ("names" .=) <$> _vNames, ("end" .=) <$> _vEnd, + ("referenceBases" .=) <$> _vReferenceBases, + ("id" .=) <$> _vId, ("quality" .=) <$> _vQuality, + ("filter" .=) <$> _vFilter, ("info" .=) <$> _vInfo, + ("calls" .=) <$> _vCalls]) + +-- | The read group set call request. +-- +-- /See:/ 'callReadGroupSetsRequest' smart constructor. +data CallReadGroupSetsRequest = CallReadGroupSetsRequest + { _crgsrReadGroupSetId :: !(Maybe Text) + , _crgsrDatasetId :: !(Maybe Text) + , _crgsrSourceUris :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallReadGroupSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crgsrReadGroupSetId' +-- +-- * 'crgsrDatasetId' +-- +-- * 'crgsrSourceUris' +callReadGroupSetsRequest + :: CallReadGroupSetsRequest +callReadGroupSetsRequest = + CallReadGroupSetsRequest + { _crgsrReadGroupSetId = Nothing + , _crgsrDatasetId = Nothing + , _crgsrSourceUris = Nothing + } + +-- | The IDs of the read group sets which will be called. The caller must +-- have READ permissions for these read group sets. One of readGroupSetId +-- or sourceUris must be provided. +crgsrReadGroupSetId :: Lens' CallReadGroupSetsRequest (Maybe Text) +crgsrReadGroupSetId + = lens _crgsrReadGroupSetId + (\ s a -> s{_crgsrReadGroupSetId = a}) + +-- | Required. The ID of the dataset the called variants will belong to. The +-- caller must have WRITE permissions to this dataset. +crgsrDatasetId :: Lens' CallReadGroupSetsRequest (Maybe Text) +crgsrDatasetId + = lens _crgsrDatasetId + (\ s a -> s{_crgsrDatasetId = a}) + +-- | A list of URIs pointing at BAM files in Google Cloud Storage which will +-- be called. FASTQ files are not allowed. The caller must have READ +-- permissions for these files. One of readGroupSetId or sourceUris must be +-- provided. +crgsrSourceUris :: Lens' CallReadGroupSetsRequest [Text] +crgsrSourceUris + = lens _crgsrSourceUris + (\ s a -> s{_crgsrSourceUris = a}) + . _Default + . _Coerce + +instance FromJSON CallReadGroupSetsRequest where + parseJSON + = withObject "CallReadGroupSetsRequest" + (\ o -> + CallReadGroupSetsRequest <$> + (o .:? "readGroupSetId") <*> (o .:? "datasetId") <*> + (o .:? "sourceUris" .!= mempty)) + +instance ToJSON CallReadGroupSetsRequest where + toJSON CallReadGroupSetsRequest{..} + = object + (catMaybes + [("readGroupSetId" .=) <$> _crgsrReadGroupSetId, + ("datasetId" .=) <$> _crgsrDatasetId, + ("sourceUris" .=) <$> _crgsrSourceUris]) + +-- | A read alignment describes a linear alignment of a string of DNA to a +-- reference sequence, in addition to metadata about the fragment (the +-- molecule of DNA sequenced) and the read (the bases which were read by +-- the sequencer). A read is equivalent to a line in a SAM file. A read +-- belongs to exactly one read group and exactly one read group set. +-- Generating a reference-aligned sequence string When interacting with +-- mapped reads, it\'s often useful to produce a string representing the +-- local alignment of the read to reference. The following pseudocode +-- demonstrates one way of doing this: out = \"\" offset = 0 for c in +-- read.alignment.cigar { switch c.operation { case \"ALIGNMENT_MATCH\", +-- \"SEQUENCE_MATCH\", \"SEQUENCE_MISMATCH\": out += +-- read.alignedSequence[offset:offset+c.operationLength] offset += +-- c.operationLength break case \"CLIP_SOFT\", \"INSERT\": offset += +-- c.operationLength break case \"PAD\": out += repeat(\"*\", +-- c.operationLength) break case \"DELETE\": out += repeat(\"-\", +-- c.operationLength) break case \"SKIP\": out += repeat(\" \", +-- c.operationLength) break case \"CLIP_HARD\": break } } return out +-- Converting to SAM\'s CIGAR string The following pseudocode generates a +-- SAM CIGAR string from the cigar field. Note that this is a lossy +-- conversion (cigar.referenceSequence is lost). cigarMap = { +-- \"ALIGNMENT_MATCH\": \"M\", \"INSERT\": \"I\", \"DELETE\": \"D\", +-- \"SKIP\": \"N\", \"CLIP_SOFT\": \"S\", \"CLIP_HARD\": \"H\", \"PAD\": +-- \"P\", \"SEQUENCE_MATCH\": \"=\", \"SEQUENCE_MISMATCH\": \"X\", } +-- cigarStr = \"\" for c in read.alignment.cigar { cigarStr += +-- c.operationLength + cigarMap[c.operation] } return cigarStr +-- +-- /See:/ 'read' smart constructor. +data Read = Read + { _rFragmentLength :: !(Maybe Int32) + , _rDuplicateFragment :: !(Maybe Bool) + , _rReadGroupSetId :: !(Maybe Text) + , _rNextMatePosition :: !(Maybe (Maybe Position)) + , _rFailedVendorQualityChecks :: !(Maybe Bool) + , _rAlignment :: !(Maybe (Maybe LinearAlignment)) + , _rFragmentName :: !(Maybe Text) + , _rNumberReads :: !(Maybe Int32) + , _rId :: !(Maybe Text) + , _rSecondaryAlignment :: !(Maybe Bool) + , _rReadGroupId :: !(Maybe Text) + , _rSupplementaryAlignment :: !(Maybe Bool) + , _rAlignedSequence :: !(Maybe Text) + , _rProperPlacement :: !(Maybe Bool) + , _rInfo :: !(Maybe ReadInfo) + , _rReadNumber :: !(Maybe Int32) + , _rAlignedQuality :: !(Maybe [Int32]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Read' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rFragmentLength' +-- +-- * 'rDuplicateFragment' +-- +-- * 'rReadGroupSetId' +-- +-- * 'rNextMatePosition' +-- +-- * 'rFailedVendorQualityChecks' +-- +-- * 'rAlignment' +-- +-- * 'rFragmentName' +-- +-- * 'rNumberReads' +-- +-- * 'rId' +-- +-- * 'rSecondaryAlignment' +-- +-- * 'rReadGroupId' +-- +-- * 'rSupplementaryAlignment' +-- +-- * 'rAlignedSequence' +-- +-- * 'rProperPlacement' +-- +-- * 'rInfo' +-- +-- * 'rReadNumber' +-- +-- * 'rAlignedQuality' +read + :: Read +read = + Read + { _rFragmentLength = Nothing + , _rDuplicateFragment = Nothing + , _rReadGroupSetId = Nothing + , _rNextMatePosition = Nothing + , _rFailedVendorQualityChecks = Nothing + , _rAlignment = Nothing + , _rFragmentName = Nothing + , _rNumberReads = Nothing + , _rId = Nothing + , _rSecondaryAlignment = Nothing + , _rReadGroupId = Nothing + , _rSupplementaryAlignment = Nothing + , _rAlignedSequence = Nothing + , _rProperPlacement = Nothing + , _rInfo = Nothing + , _rReadNumber = Nothing + , _rAlignedQuality = Nothing + } + +-- | The observed length of the fragment, equivalent to TLEN in SAM. +rFragmentLength :: Lens' Read (Maybe Int32) +rFragmentLength + = lens _rFragmentLength + (\ s a -> s{_rFragmentLength = a}) + +-- | The fragment is a PCR or optical duplicate (SAM flag 0x400) +rDuplicateFragment :: Lens' Read (Maybe Bool) +rDuplicateFragment + = lens _rDuplicateFragment + (\ s a -> s{_rDuplicateFragment = a}) + +-- | The ID of the read group set this read belongs to. (Every read must +-- belong to exactly one read group set.) +rReadGroupSetId :: Lens' Read (Maybe Text) +rReadGroupSetId + = lens _rReadGroupSetId + (\ s a -> s{_rReadGroupSetId = a}) + +-- | The position of the primary alignment of the (readNumber+1)%numberReads +-- read in the fragment. It replaces mate position and mate strand in SAM. +-- This field will be unset if that read is unmapped or if the fragment +-- only has a single read. +rNextMatePosition :: Lens' Read (Maybe (Maybe Position)) +rNextMatePosition + = lens _rNextMatePosition + (\ s a -> s{_rNextMatePosition = a}) + +-- | SAM flag 0x200 +rFailedVendorQualityChecks :: Lens' Read (Maybe Bool) +rFailedVendorQualityChecks + = lens _rFailedVendorQualityChecks + (\ s a -> s{_rFailedVendorQualityChecks = a}) + +-- | The linear alignment for this alignment record. This field will be unset +-- if the read is unmapped. +rAlignment :: Lens' Read (Maybe (Maybe LinearAlignment)) +rAlignment + = lens _rAlignment (\ s a -> s{_rAlignment = a}) + +-- | The fragment name. Equivalent to QNAME (query template name) in SAM. +rFragmentName :: Lens' Read (Maybe Text) +rFragmentName + = lens _rFragmentName + (\ s a -> s{_rFragmentName = a}) + +-- | The number of reads in the fragment (extension to SAM flag 0x1). +rNumberReads :: Lens' Read (Maybe Int32) +rNumberReads + = lens _rNumberReads (\ s a -> s{_rNumberReads = a}) + +-- | The unique ID for this read. This is a generated unique ID, not to be +-- confused with fragmentName. +rId :: Lens' Read (Maybe Text) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | Whether this alignment is secondary. Equivalent to SAM flag 0x100. A +-- secondary alignment represents an alternative to the primary alignment +-- for this read. Aligners may return secondary alignments if a read can +-- map ambiguously to multiple coordinates in the genome. By convention, +-- each read has one and only one alignment where both secondaryAlignment +-- and supplementaryAlignment are false. +rSecondaryAlignment :: Lens' Read (Maybe Bool) +rSecondaryAlignment + = lens _rSecondaryAlignment + (\ s a -> s{_rSecondaryAlignment = a}) + +-- | The ID of the read group this read belongs to. (Every read must belong +-- to exactly one read group.) +rReadGroupId :: Lens' Read (Maybe Text) +rReadGroupId + = lens _rReadGroupId (\ s a -> s{_rReadGroupId = a}) + +-- | Whether this alignment is supplementary. Equivalent to SAM flag 0x800. +-- Supplementary alignments are used in the representation of a chimeric +-- alignment. In a chimeric alignment, a read is split into multiple linear +-- alignments that map to different reference contigs. The first linear +-- alignment in the read will be designated as the representative +-- alignment; the remaining linear alignments will be designated as +-- supplementary alignments. These alignments may have different mapping +-- quality scores. In each linear alignment in a chimeric alignment, the +-- read will be hard clipped. The alignedSequence and alignedQuality fields +-- in the alignment record will only represent the bases for its respective +-- linear alignment. +rSupplementaryAlignment :: Lens' Read (Maybe Bool) +rSupplementaryAlignment + = lens _rSupplementaryAlignment + (\ s a -> s{_rSupplementaryAlignment = a}) + +-- | The bases of the read sequence contained in this alignment record, +-- without CIGAR operations applied. alignedSequence and alignedQuality may +-- be shorter than the full read sequence and quality. This will occur if +-- the alignment is part of a chimeric alignment, or if the read was +-- trimmed. When this occurs, the CIGAR for this read will begin\/end with +-- a hard clip operator that will indicate the length of the excised +-- sequence. +rAlignedSequence :: Lens' Read (Maybe Text) +rAlignedSequence + = lens _rAlignedSequence + (\ s a -> s{_rAlignedSequence = a}) + +-- | The orientation and the distance between reads from the fragment are +-- consistent with the sequencing protocol (SAM flag 0x2) +rProperPlacement :: Lens' Read (Maybe Bool) +rProperPlacement + = lens _rProperPlacement + (\ s a -> s{_rProperPlacement = a}) + +-- | A string which maps to an array of values. +rInfo :: Lens' Read (Maybe ReadInfo) +rInfo = lens _rInfo (\ s a -> s{_rInfo = a}) + +-- | The read number in sequencing. 0-based and less than numberReads. This +-- field replaces SAM flag 0x40 and 0x80. +rReadNumber :: Lens' Read (Maybe Int32) +rReadNumber + = lens _rReadNumber (\ s a -> s{_rReadNumber = a}) + +-- | The quality of the read sequence contained in this alignment record. +-- alignedSequence and alignedQuality may be shorter than the full read +-- sequence and quality. This will occur if the alignment is part of a +-- chimeric alignment, or if the read was trimmed. When this occurs, the +-- CIGAR for this read will begin\/end with a hard clip operator that will +-- indicate the length of the excised sequence. +rAlignedQuality :: Lens' Read [Int32] +rAlignedQuality + = lens _rAlignedQuality + (\ s a -> s{_rAlignedQuality = a}) + . _Default + . _Coerce + +instance FromJSON Read where + parseJSON + = withObject "Read" + (\ o -> + Read <$> + (o .:? "fragmentLength") <*> + (o .:? "duplicateFragment") + <*> (o .:? "readGroupSetId") + <*> (o .:? "nextMatePosition") + <*> (o .:? "failedVendorQualityChecks") + <*> (o .:? "alignment") + <*> (o .:? "fragmentName") + <*> (o .:? "numberReads") + <*> (o .:? "id") + <*> (o .:? "secondaryAlignment") + <*> (o .:? "readGroupId") + <*> (o .:? "supplementaryAlignment") + <*> (o .:? "alignedSequence") + <*> (o .:? "properPlacement") + <*> (o .:? "info") + <*> (o .:? "readNumber") + <*> (o .:? "alignedQuality" .!= mempty)) + +instance ToJSON Read where + toJSON Read{..} + = object + (catMaybes + [("fragmentLength" .=) <$> _rFragmentLength, + ("duplicateFragment" .=) <$> _rDuplicateFragment, + ("readGroupSetId" .=) <$> _rReadGroupSetId, + ("nextMatePosition" .=) <$> _rNextMatePosition, + ("failedVendorQualityChecks" .=) <$> + _rFailedVendorQualityChecks, + ("alignment" .=) <$> _rAlignment, + ("fragmentName" .=) <$> _rFragmentName, + ("numberReads" .=) <$> _rNumberReads, + ("id" .=) <$> _rId, + ("secondaryAlignment" .=) <$> _rSecondaryAlignment, + ("readGroupId" .=) <$> _rReadGroupId, + ("supplementaryAlignment" .=) <$> + _rSupplementaryAlignment, + ("alignedSequence" .=) <$> _rAlignedSequence, + ("properPlacement" .=) <$> _rProperPlacement, + ("info" .=) <$> _rInfo, + ("readNumber" .=) <$> _rReadNumber, + ("alignedQuality" .=) <$> _rAlignedQuality]) + +-- | A call represents the determination of genotype with respect to a +-- particular variant. It may include associated information such as +-- quality and phasing. For example, a call might assign a probability of +-- 0.32 to the occurrence of a SNP named rs1234 in a call set with the name +-- NA12345. +-- +-- /See:/ 'call' smart constructor. +data Call = Call + { _cGenotypeLikelihood :: !(Maybe [Double]) + , _cCallSetName :: !(Maybe Text) + , _cPhaseset :: !(Maybe Text) + , _cCallSetId :: !(Maybe Text) + , _cGenotype :: !(Maybe [Int32]) + , _cInfo :: !(Maybe CallInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Call' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cGenotypeLikelihood' +-- +-- * 'cCallSetName' +-- +-- * 'cPhaseset' +-- +-- * 'cCallSetId' +-- +-- * 'cGenotype' +-- +-- * 'cInfo' +call + :: Call +call = + Call + { _cGenotypeLikelihood = Nothing + , _cCallSetName = Nothing + , _cPhaseset = Nothing + , _cCallSetId = Nothing + , _cGenotype = Nothing + , _cInfo = Nothing + } + +-- | The genotype likelihoods for this variant call. Each array entry +-- represents how likely a specific genotype is for this call. The value +-- ordering is defined by the GL tag in the VCF spec. If Phred-scaled +-- genotype likelihood scores (PL) are available and log10(P) genotype +-- likelihood scores (GL) are not, PL scores are converted to GL scores. If +-- both are available, PL scores are stored in info. +cGenotypeLikelihood :: Lens' Call [Double] +cGenotypeLikelihood + = lens _cGenotypeLikelihood + (\ s a -> s{_cGenotypeLikelihood = a}) + . _Default + . _Coerce + +-- | The name of the call set this variant call belongs to. +cCallSetName :: Lens' Call (Maybe Text) +cCallSetName + = lens _cCallSetName (\ s a -> s{_cCallSetName = a}) + +-- | If this field is present, this variant call\'s genotype ordering implies +-- the phase of the bases and is consistent with any other variant calls in +-- the same reference sequence which have the same phaseset value. When +-- importing data from VCF, if the genotype data was phased but no phase +-- set was specified this field will be set to *. +cPhaseset :: Lens' Call (Maybe Text) +cPhaseset + = lens _cPhaseset (\ s a -> s{_cPhaseset = a}) + +-- | The ID of the call set this variant call belongs to. +cCallSetId :: Lens' Call (Maybe Text) +cCallSetId + = lens _cCallSetId (\ s a -> s{_cCallSetId = a}) + +-- | The genotype of this variant call. Each value represents either the +-- value of the referenceBases field or a 1-based index into +-- alternateBases. If a variant had a referenceBases value of T and an +-- alternateBases value of [\"A\", \"C\"], and the genotype was [2, 1], +-- that would mean the call represented the heterozygous value CA for this +-- variant. If the genotype was instead [0, 1], the represented value would +-- be TA. Ordering of the genotype values is important if the phaseset is +-- present. If a genotype is not called (that is, a . is present in the GT +-- string) -1 is returned. +cGenotype :: Lens' Call [Int32] +cGenotype + = lens _cGenotype (\ s a -> s{_cGenotype = a}) . + _Default + . _Coerce + +-- | A string which maps to an array of values. +cInfo :: Lens' Call (Maybe CallInfo) +cInfo = lens _cInfo (\ s a -> s{_cInfo = a}) + +instance FromJSON Call where + parseJSON + = withObject "Call" + (\ o -> + Call <$> + (o .:? "genotypeLikelihood" .!= mempty) <*> + (o .:? "callSetName") + <*> (o .:? "phaseset") + <*> (o .:? "callSetId") + <*> (o .:? "genotype" .!= mempty) + <*> (o .:? "info")) + +instance ToJSON Call where + toJSON Call{..} + = object + (catMaybes + [("genotypeLikelihood" .=) <$> _cGenotypeLikelihood, + ("callSetName" .=) <$> _cCallSetName, + ("phaseset" .=) <$> _cPhaseset, + ("callSetId" .=) <$> _cCallSetId, + ("genotype" .=) <$> _cGenotype, + ("info" .=) <$> _cInfo]) + +-- | A Dataset is a collection of genomic data. +-- +-- /See:/ 'dataset' smart constructor. +data Dataset = Dataset + { _dIsPublic :: !(Maybe Bool) + , _dProjectNumber :: !(Maybe Int64) + , _dName :: !(Maybe Text) + , _dId :: !(Maybe Text) + , _dCreateTime :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Dataset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dIsPublic' +-- +-- * 'dProjectNumber' +-- +-- * 'dName' +-- +-- * 'dId' +-- +-- * 'dCreateTime' +dataset + :: Dataset +dataset = + Dataset + { _dIsPublic = Nothing + , _dProjectNumber = Nothing + , _dName = Nothing + , _dId = Nothing + , _dCreateTime = Nothing + } + +-- | Flag indicating whether or not a dataset is publicly viewable. If a +-- dataset is not public, it inherits viewing permissions from its project. +dIsPublic :: Lens' Dataset (Maybe Bool) +dIsPublic + = lens _dIsPublic (\ s a -> s{_dIsPublic = a}) + +-- | The Google Developers Console project number that this dataset belongs +-- to. +dProjectNumber :: Lens' Dataset (Maybe Int64) +dProjectNumber + = lens _dProjectNumber + (\ s a -> s{_dProjectNumber = a}) + +-- | The dataset name. +dName :: Lens' Dataset (Maybe Text) +dName = lens _dName (\ s a -> s{_dName = a}) + +-- | The Google generated ID of the dataset, immutable. +dId :: Lens' Dataset (Maybe Text) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | The time this dataset was created, in seconds from the epoch. +dCreateTime :: Lens' Dataset (Maybe Int64) +dCreateTime + = lens _dCreateTime (\ s a -> s{_dCreateTime = a}) + +instance FromJSON Dataset where + parseJSON + = withObject "Dataset" + (\ o -> + Dataset <$> + (o .:? "isPublic") <*> (o .:? "projectNumber") <*> + (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "createTime")) + +instance ToJSON Dataset where + toJSON Dataset{..} + = object + (catMaybes + [("isPublic" .=) <$> _dIsPublic, + ("projectNumber" .=) <$> _dProjectNumber, + ("name" .=) <$> _dName, ("id" .=) <$> _dId, + ("createTime" .=) <$> _dCreateTime]) + +-- +-- /See:/ 'transcriptExon' smart constructor. +data TranscriptExon = TranscriptExon + { _teStart :: !(Maybe Int64) + , _teEnd :: !(Maybe Int64) + , _teFrame :: !(Maybe (Maybe Int32Value)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TranscriptExon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'teStart' +-- +-- * 'teEnd' +-- +-- * 'teFrame' +transcriptExon + :: TranscriptExon +transcriptExon = + TranscriptExon + { _teStart = Nothing + , _teEnd = Nothing + , _teFrame = Nothing + } + +-- | The start position of the exon on this annotation\'s reference sequence, +-- 0-based inclusive. Note that this is relative to the reference start, +-- and not the containing annotation start. +teStart :: Lens' TranscriptExon (Maybe Int64) +teStart = lens _teStart (\ s a -> s{_teStart = a}) + +-- | The end position of the exon on this annotation\'s reference sequence, +-- 0-based exclusive. Note that this is relative to the reference start, +-- and not the containing annotation start. +teEnd :: Lens' TranscriptExon (Maybe Int64) +teEnd = lens _teEnd (\ s a -> s{_teEnd = a}) + +-- | The frame of this exon. Contains a value of 0, 1, or 2, which indicates +-- the offset of the first coding base of the exon within the reading frame +-- of the coding DNA sequence, if any. This field is dependent on the +-- strandedness of this annotation (see Annotation.position.reverseStrand). +-- For forward stranded annotations, this offset is relative to the +-- exon.start. For reverse strand annotations, this offset is relative to +-- the exon.end-1. Unset if this exon does not intersect the coding +-- sequence. Upon creation of a transcript, the frame must be populated for +-- all or none of the coding exons. +teFrame :: Lens' TranscriptExon (Maybe (Maybe Int32Value)) +teFrame = lens _teFrame (\ s a -> s{_teFrame = a}) + +instance FromJSON TranscriptExon where + parseJSON + = withObject "TranscriptExon" + (\ o -> + TranscriptExon <$> + (o .:? "start") <*> (o .:? "end") <*> + (o .:? "frame")) + +instance ToJSON TranscriptExon where + toJSON TranscriptExon{..} + = object + (catMaybes + [("start" .=) <$> _teStart, ("end" .=) <$> _teEnd, + ("frame" .=) <$> _teFrame]) + +-- | A 0-based half-open genomic coordinate range for search requests. +-- +-- /See:/ 'queryRange' smart constructor. +data QueryRange = QueryRange + { _qrStart :: !(Maybe Int64) + , _qrReferenceId :: !(Maybe Text) + , _qrReferenceName :: !(Maybe Text) + , _qrEnd :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'QueryRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'qrStart' +-- +-- * 'qrReferenceId' +-- +-- * 'qrReferenceName' +-- +-- * 'qrEnd' +queryRange + :: QueryRange +queryRange = + QueryRange + { _qrStart = Nothing + , _qrReferenceId = Nothing + , _qrReferenceName = Nothing + , _qrEnd = Nothing + } + +-- | The start position of the range on the reference, 0-based inclusive. If +-- specified, referenceId or referenceName must also be specified. Defaults +-- to 0. +qrStart :: Lens' QueryRange (Maybe Int64) +qrStart = lens _qrStart (\ s a -> s{_qrStart = a}) + +-- | The ID of the reference to query. At most one of referenceId and +-- referenceName should be specified. +qrReferenceId :: Lens' QueryRange (Maybe Text) +qrReferenceId + = lens _qrReferenceId + (\ s a -> s{_qrReferenceId = a}) + +-- | The name of the reference to query, within the reference set associated +-- with this query. At most one of referenceId and referenceName pshould be +-- specified. +qrReferenceName :: Lens' QueryRange (Maybe Text) +qrReferenceName + = lens _qrReferenceName + (\ s a -> s{_qrReferenceName = a}) + +-- | The end position of the range on the reference, 0-based exclusive. If +-- specified, referenceId or referenceName must also be specified. If unset +-- or 0, defaults to the length of the reference. +qrEnd :: Lens' QueryRange (Maybe Int64) +qrEnd = lens _qrEnd (\ s a -> s{_qrEnd = a}) + +instance FromJSON QueryRange where + parseJSON + = withObject "QueryRange" + (\ o -> + QueryRange <$> + (o .:? "start") <*> (o .:? "referenceId") <*> + (o .:? "referenceName") + <*> (o .:? "end")) + +instance ToJSON QueryRange where + toJSON QueryRange{..} + = object + (catMaybes + [("start" .=) <$> _qrStart, + ("referenceId" .=) <$> _qrReferenceId, + ("referenceName" .=) <$> _qrReferenceName, + ("end" .=) <$> _qrEnd]) + +-- | A read group is all the data that\'s processed the same way by the +-- sequencer. +-- +-- /See:/ 'readGroup' smart constructor. +data ReadGroup = ReadGroup + { _rgReferenceSetId :: !(Maybe Text) + , _rgPrograms :: !(Maybe [Maybe ReadGroupProgram]) + , _rgExperiment :: !(Maybe (Maybe ReadGroupExperiment)) + , _rgName :: !(Maybe Text) + , _rgDatasetId :: !(Maybe Text) + , _rgId :: !(Maybe Text) + , _rgSampleId :: !(Maybe Text) + , _rgPredictedInsertSize :: !(Maybe Int32) + , _rgDescription :: !(Maybe Text) + , _rgInfo :: !(Maybe ReadGroupInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgReferenceSetId' +-- +-- * 'rgPrograms' +-- +-- * 'rgExperiment' +-- +-- * 'rgName' +-- +-- * 'rgDatasetId' +-- +-- * 'rgId' +-- +-- * 'rgSampleId' +-- +-- * 'rgPredictedInsertSize' +-- +-- * 'rgDescription' +-- +-- * 'rgInfo' +readGroup + :: ReadGroup +readGroup = + ReadGroup + { _rgReferenceSetId = Nothing + , _rgPrograms = Nothing + , _rgExperiment = Nothing + , _rgName = Nothing + , _rgDatasetId = Nothing + , _rgId = Nothing + , _rgSampleId = Nothing + , _rgPredictedInsertSize = Nothing + , _rgDescription = Nothing + , _rgInfo = Nothing + } + +-- | The reference set the reads in this read group are aligned to. Required +-- if there are any read alignments. +rgReferenceSetId :: Lens' ReadGroup (Maybe Text) +rgReferenceSetId + = lens _rgReferenceSetId + (\ s a -> s{_rgReferenceSetId = a}) + +-- | The programs used to generate this read group. Programs are always +-- identical for all read groups within a read group set. For this reason, +-- only the first read group in a returned set will have this field +-- populated. +rgPrograms :: Lens' ReadGroup [Maybe ReadGroupProgram] +rgPrograms + = lens _rgPrograms (\ s a -> s{_rgPrograms = a}) . + _Default + . _Coerce + +-- | The experiment used to generate this read group. +rgExperiment :: Lens' ReadGroup (Maybe (Maybe ReadGroupExperiment)) +rgExperiment + = lens _rgExperiment (\ s a -> s{_rgExperiment = a}) + +-- | The read group name. This corresponds to the \'RG ID field in the SAM +-- spec. +rgName :: Lens' ReadGroup (Maybe Text) +rgName = lens _rgName (\ s a -> s{_rgName = a}) + +-- | The ID of the dataset this read group belongs to. +rgDatasetId :: Lens' ReadGroup (Maybe Text) +rgDatasetId + = lens _rgDatasetId (\ s a -> s{_rgDatasetId = a}) + +-- | The generated unique read group ID. Note: This is different than the +-- \'RG ID field in the SAM spec. For that value, see the name field. +rgId :: Lens' ReadGroup (Maybe Text) +rgId = lens _rgId (\ s a -> s{_rgId = a}) + +-- | The sample this read group\'s data was generated from. Note: This is not +-- an actual ID within this repository, but rather an identifier for a +-- sample which may be meaningful to some external system. +rgSampleId :: Lens' ReadGroup (Maybe Text) +rgSampleId + = lens _rgSampleId (\ s a -> s{_rgSampleId = a}) + +-- | The predicted insert size of this read group. The insert size is the +-- length the sequenced DNA fragment from end-to-end, not including the +-- adapters. +rgPredictedInsertSize :: Lens' ReadGroup (Maybe Int32) +rgPredictedInsertSize + = lens _rgPredictedInsertSize + (\ s a -> s{_rgPredictedInsertSize = a}) + +-- | A free-form text description of this read group. +rgDescription :: Lens' ReadGroup (Maybe Text) +rgDescription + = lens _rgDescription + (\ s a -> s{_rgDescription = a}) + +-- | A string which maps to an array of values. +rgInfo :: Lens' ReadGroup (Maybe ReadGroupInfo) +rgInfo = lens _rgInfo (\ s a -> s{_rgInfo = a}) + +instance FromJSON ReadGroup where + parseJSON + = withObject "ReadGroup" + (\ o -> + ReadGroup <$> + (o .:? "referenceSetId") <*> + (o .:? "programs" .!= mempty) + <*> (o .:? "experiment") + <*> (o .:? "name") + <*> (o .:? "datasetId") + <*> (o .:? "id") + <*> (o .:? "sampleId") + <*> (o .:? "predictedInsertSize") + <*> (o .:? "description") + <*> (o .:? "info")) + +instance ToJSON ReadGroup where + toJSON ReadGroup{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _rgReferenceSetId, + ("programs" .=) <$> _rgPrograms, + ("experiment" .=) <$> _rgExperiment, + ("name" .=) <$> _rgName, + ("datasetId" .=) <$> _rgDatasetId, + ("id" .=) <$> _rgId, ("sampleId" .=) <$> _rgSampleId, + ("predictedInsertSize" .=) <$> + _rgPredictedInsertSize, + ("description" .=) <$> _rgDescription, + ("info" .=) <$> _rgInfo]) + +-- +-- /See:/ 'searchReferencesResponse' smart constructor. +data SearchReferencesResponse = SearchReferencesResponse + { _srrNextPageToken :: !(Maybe Text) + , _srrReferences :: !(Maybe [Maybe Reference]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReferencesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srrNextPageToken' +-- +-- * 'srrReferences' +searchReferencesResponse + :: SearchReferencesResponse +searchReferencesResponse = + SearchReferencesResponse + { _srrNextPageToken = Nothing + , _srrReferences = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +srrNextPageToken :: Lens' SearchReferencesResponse (Maybe Text) +srrNextPageToken + = lens _srrNextPageToken + (\ s a -> s{_srrNextPageToken = a}) + +-- | The matching references. +srrReferences :: Lens' SearchReferencesResponse [Maybe Reference] +srrReferences + = lens _srrReferences + (\ s a -> s{_srrReferences = a}) + . _Default + . _Coerce + +instance FromJSON SearchReferencesResponse where + parseJSON + = withObject "SearchReferencesResponse" + (\ o -> + SearchReferencesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "references" .!= mempty)) + +instance ToJSON SearchReferencesResponse where + toJSON SearchReferencesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _srrNextPageToken, + ("references" .=) <$> _srrReferences]) + +-- +-- /See:/ 'mergeVariantsRequest' smart constructor. +newtype MergeVariantsRequest = MergeVariantsRequest + { _mvrVariants :: Maybe [Maybe Variant] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MergeVariantsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mvrVariants' +mergeVariantsRequest + :: MergeVariantsRequest +mergeVariantsRequest = + MergeVariantsRequest + { _mvrVariants = Nothing + } + +-- | The variants to be merged with existing variants. +mvrVariants :: Lens' MergeVariantsRequest [Maybe Variant] +mvrVariants + = lens _mvrVariants (\ s a -> s{_mvrVariants = a}) . + _Default + . _Coerce + +instance FromJSON MergeVariantsRequest where + parseJSON + = withObject "MergeVariantsRequest" + (\ o -> + MergeVariantsRequest <$> + (o .:? "variants" .!= mempty)) + +instance ToJSON MergeVariantsRequest where + toJSON MergeVariantsRequest{..} + = object + (catMaybes [("variants" .=) <$> _mvrVariants]) + +-- | +-- +-- /See:/ 'searchReferenceSetsRequest' smart constructor. +data SearchReferenceSetsRequest = SearchReferenceSetsRequest + { _srsrMd5checksums :: !(Maybe [Text]) + , _srsrAccessions :: !(Maybe [Text]) + , _srsrPageToken :: !(Maybe Text) + , _srsrAssemblyId :: !(Maybe Text) + , _srsrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReferenceSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srsrMd5checksums' +-- +-- * 'srsrAccessions' +-- +-- * 'srsrPageToken' +-- +-- * 'srsrAssemblyId' +-- +-- * 'srsrPageSize' +searchReferenceSetsRequest + :: SearchReferenceSetsRequest +searchReferenceSetsRequest = + SearchReferenceSetsRequest + { _srsrMd5checksums = Nothing + , _srsrAccessions = Nothing + , _srsrPageToken = Nothing + , _srsrAssemblyId = Nothing + , _srsrPageSize = Nothing + } + +-- | If present, return references for which the md5checksum matches. See +-- ReferenceSet.md5checksum for details. +srsrMd5checksums :: Lens' SearchReferenceSetsRequest [Text] +srsrMd5checksums + = lens _srsrMd5checksums + (\ s a -> s{_srsrMd5checksums = a}) + . _Default + . _Coerce + +-- | If present, return references for which the accession matches any of +-- these strings. Best to give a version number, for example +-- GCF_000001405.26. If only the main accession number is given then all +-- records with that main accession will be returned, whichever version. +-- Note that different versions will have different sequences. +srsrAccessions :: Lens' SearchReferenceSetsRequest [Text] +srsrAccessions + = lens _srsrAccessions + (\ s a -> s{_srsrAccessions = a}) + . _Default + . _Coerce + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +srsrPageToken :: Lens' SearchReferenceSetsRequest (Maybe Text) +srsrPageToken + = lens _srsrPageToken + (\ s a -> s{_srsrPageToken = a}) + +-- | If present, return reference sets for which a substring of their +-- assemblyId matches this string (case insensitive). +srsrAssemblyId :: Lens' SearchReferenceSetsRequest (Maybe Text) +srsrAssemblyId + = lens _srsrAssemblyId + (\ s a -> s{_srsrAssemblyId = a}) + +-- | Specifies the maximum number of results to return in a single page. +srsrPageSize :: Lens' SearchReferenceSetsRequest (Maybe Int32) +srsrPageSize + = lens _srsrPageSize (\ s a -> s{_srsrPageSize = a}) + +instance FromJSON SearchReferenceSetsRequest where + parseJSON + = withObject "SearchReferenceSetsRequest" + (\ o -> + SearchReferenceSetsRequest <$> + (o .:? "md5checksums" .!= mempty) <*> + (o .:? "accessions" .!= mempty) + <*> (o .:? "pageToken") + <*> (o .:? "assemblyId") + <*> (o .:? "pageSize")) + +instance ToJSON SearchReferenceSetsRequest where + toJSON SearchReferenceSetsRequest{..} + = object + (catMaybes + [("md5checksums" .=) <$> _srsrMd5checksums, + ("accessions" .=) <$> _srsrAccessions, + ("pageToken" .=) <$> _srsrPageToken, + ("assemblyId" .=) <$> _srsrAssemblyId, + ("pageSize" .=) <$> _srsrPageSize]) + +-- +-- /See:/ 'batchCreateAnnotationsRequest' smart constructor. +newtype BatchCreateAnnotationsRequest = BatchCreateAnnotationsRequest + { _bcarAnnotations :: Maybe [Maybe Annotation] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchCreateAnnotationsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bcarAnnotations' +batchCreateAnnotationsRequest + :: BatchCreateAnnotationsRequest +batchCreateAnnotationsRequest = + BatchCreateAnnotationsRequest + { _bcarAnnotations = Nothing + } + +-- | The annotations to be created. At most 4096 can be specified in a single +-- request. +bcarAnnotations :: Lens' BatchCreateAnnotationsRequest [Maybe Annotation] +bcarAnnotations + = lens _bcarAnnotations + (\ s a -> s{_bcarAnnotations = a}) + . _Default + . _Coerce + +instance FromJSON BatchCreateAnnotationsRequest where + parseJSON + = withObject "BatchCreateAnnotationsRequest" + (\ o -> + BatchCreateAnnotationsRequest <$> + (o .:? "annotations" .!= mempty)) + +instance ToJSON BatchCreateAnnotationsRequest where + toJSON BatchCreateAnnotationsRequest{..} + = object + (catMaybes [("annotations" .=) <$> _bcarAnnotations]) + +-- | A call set is a collection of variant calls, typically for one sample. +-- It belongs to a variant set. +-- +-- /See:/ 'callSet' smart constructor. +data CallSet = CallSet + { _csCreated :: !(Maybe Int64) + , _csName :: !(Maybe Text) + , _csId :: !(Maybe Text) + , _csSampleId :: !(Maybe Text) + , _csVariantSetIds :: !(Maybe [Text]) + , _csInfo :: !(Maybe CallSetInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csCreated' +-- +-- * 'csName' +-- +-- * 'csId' +-- +-- * 'csSampleId' +-- +-- * 'csVariantSetIds' +-- +-- * 'csInfo' +callSet + :: CallSet +callSet = + CallSet + { _csCreated = Nothing + , _csName = Nothing + , _csId = Nothing + , _csSampleId = Nothing + , _csVariantSetIds = Nothing + , _csInfo = Nothing + } + +-- | The date this call set was created in milliseconds from the epoch. +csCreated :: Lens' CallSet (Maybe Int64) +csCreated + = lens _csCreated (\ s a -> s{_csCreated = a}) + +-- | The call set name. +csName :: Lens' CallSet (Maybe Text) +csName = lens _csName (\ s a -> s{_csName = a}) + +-- | The Google generated ID of the call set, immutable. +csId :: Lens' CallSet (Maybe Text) +csId = lens _csId (\ s a -> s{_csId = a}) + +-- | The sample ID this call set corresponds to. +csSampleId :: Lens' CallSet (Maybe Text) +csSampleId + = lens _csSampleId (\ s a -> s{_csSampleId = a}) + +-- | The IDs of the variant sets this call set belongs to. +csVariantSetIds :: Lens' CallSet [Text] +csVariantSetIds + = lens _csVariantSetIds + (\ s a -> s{_csVariantSetIds = a}) + . _Default + . _Coerce + +-- | A string which maps to an array of values. +csInfo :: Lens' CallSet (Maybe CallSetInfo) +csInfo = lens _csInfo (\ s a -> s{_csInfo = a}) + +instance FromJSON CallSet where + parseJSON + = withObject "CallSet" + (\ o -> + CallSet <$> + (o .:? "created") <*> (o .:? "name") <*> (o .:? "id") + <*> (o .:? "sampleId") + <*> (o .:? "variantSetIds" .!= mempty) + <*> (o .:? "info")) + +instance ToJSON CallSet where + toJSON CallSet{..} + = object + (catMaybes + [("created" .=) <$> _csCreated, + ("name" .=) <$> _csName, ("id" .=) <$> _csId, + ("sampleId" .=) <$> _csSampleId, + ("variantSetIds" .=) <$> _csVariantSetIds, + ("info" .=) <$> _csInfo]) + +-- | A bucket over which read coverage has been precomputed. A bucket +-- corresponds to a specific range of the reference sequence. +-- +-- /See:/ 'coverageBucket' smart constructor. +data CoverageBucket = CoverageBucket + { _cbRange :: !(Maybe (Maybe Range)) + , _cbMeanCoverage :: !(Maybe Float) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CoverageBucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cbRange' +-- +-- * 'cbMeanCoverage' +coverageBucket + :: CoverageBucket +coverageBucket = + CoverageBucket + { _cbRange = Nothing + , _cbMeanCoverage = Nothing + } + +-- | The genomic coordinate range spanned by this bucket. +cbRange :: Lens' CoverageBucket (Maybe (Maybe Range)) +cbRange = lens _cbRange (\ s a -> s{_cbRange = a}) + +-- | The average number of reads which are aligned to each individual +-- reference base in this bucket. +cbMeanCoverage :: Lens' CoverageBucket (Maybe Float) +cbMeanCoverage + = lens _cbMeanCoverage + (\ s a -> s{_cbMeanCoverage = a}) + +instance FromJSON CoverageBucket where + parseJSON + = withObject "CoverageBucket" + (\ o -> + CoverageBucket <$> + (o .:? "range") <*> (o .:? "meanCoverage")) + +instance ToJSON CoverageBucket where + toJSON CoverageBucket{..} + = object + (catMaybes + [("range" .=) <$> _cbRange, + ("meanCoverage" .=) <$> _cbMeanCoverage]) + +-- | A Variant annotation. +-- +-- /See:/ 'variantAnnotation' smart constructor. +data VariantAnnotation = VariantAnnotation + { _vaEffect :: !(Maybe Text) + , _vaClinicalSignificance :: !(Maybe Text) + , _vaAlternateBases :: !(Maybe Text) + , _vaGeneId :: !(Maybe Text) + , _vaConditions :: !(Maybe [Maybe VariantAnnotationCondition]) + , _vaType :: !(Maybe Text) + , _vaTranscriptIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantAnnotation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vaEffect' +-- +-- * 'vaClinicalSignificance' +-- +-- * 'vaAlternateBases' +-- +-- * 'vaGeneId' +-- +-- * 'vaConditions' +-- +-- * 'vaType' +-- +-- * 'vaTranscriptIds' +variantAnnotation + :: VariantAnnotation +variantAnnotation = + VariantAnnotation + { _vaEffect = Nothing + , _vaClinicalSignificance = Nothing + , _vaAlternateBases = Nothing + , _vaGeneId = Nothing + , _vaConditions = Nothing + , _vaType = Nothing + , _vaTranscriptIds = Nothing + } + +-- | Effect of the variant on the coding sequence. +vaEffect :: Lens' VariantAnnotation (Maybe Text) +vaEffect = lens _vaEffect (\ s a -> s{_vaEffect = a}) + +-- | Describes the clinical significance of a variant. It is adapted from the +-- ClinVar controlled vocabulary for clinical significance described at: +-- http:\/\/www.ncbi.nlm.nih.gov\/clinvar\/docs\/clinsig\/ +vaClinicalSignificance :: Lens' VariantAnnotation (Maybe Text) +vaClinicalSignificance + = lens _vaClinicalSignificance + (\ s a -> s{_vaClinicalSignificance = a}) + +-- | The alternate allele for this variant. If multiple alternate alleles +-- exist at this location, create a separate variant for each one, as they +-- may represent distinct conditions. +vaAlternateBases :: Lens' VariantAnnotation (Maybe Text) +vaAlternateBases + = lens _vaAlternateBases + (\ s a -> s{_vaAlternateBases = a}) + +-- | Google annotation ID of the gene affected by this variant. This should +-- be provided when the variant is created. +vaGeneId :: Lens' VariantAnnotation (Maybe Text) +vaGeneId = lens _vaGeneId (\ s a -> s{_vaGeneId = a}) + +-- | The set of conditions associated with this variant. A condition +-- describes the way a variant influences human health. +vaConditions :: Lens' VariantAnnotation [Maybe VariantAnnotationCondition] +vaConditions + = lens _vaConditions (\ s a -> s{_vaConditions = a}) + . _Default + . _Coerce + +-- | Type has been adapted from ClinVar\'s list of variant types. +vaType :: Lens' VariantAnnotation (Maybe Text) +vaType = lens _vaType (\ s a -> s{_vaType = a}) + +-- | Google annotation IDs of the transcripts affected by this variant. These +-- should be provided when the variant is created. +vaTranscriptIds :: Lens' VariantAnnotation [Text] +vaTranscriptIds + = lens _vaTranscriptIds + (\ s a -> s{_vaTranscriptIds = a}) + . _Default + . _Coerce + +instance FromJSON VariantAnnotation where + parseJSON + = withObject "VariantAnnotation" + (\ o -> + VariantAnnotation <$> + (o .:? "effect") <*> (o .:? "clinicalSignificance") + <*> (o .:? "alternateBases") + <*> (o .:? "geneId") + <*> (o .:? "conditions" .!= mempty) + <*> (o .:? "type") + <*> (o .:? "transcriptIds" .!= mempty)) + +instance ToJSON VariantAnnotation where + toJSON VariantAnnotation{..} + = object + (catMaybes + [("effect" .=) <$> _vaEffect, + ("clinicalSignificance" .=) <$> + _vaClinicalSignificance, + ("alternateBases" .=) <$> _vaAlternateBases, + ("geneId" .=) <$> _vaGeneId, + ("conditions" .=) <$> _vaConditions, + ("type" .=) <$> _vaType, + ("transcriptIds" .=) <$> _vaTranscriptIds]) + +-- | +-- +-- /See:/ 'batchAnnotationsResponseEntryStatus' smart constructor. +data BatchAnnotationsResponseEntryStatus = BatchAnnotationsResponseEntryStatus + { _baresCode :: !(Maybe Int32) + , _baresMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchAnnotationsResponseEntryStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baresCode' +-- +-- * 'baresMessage' +batchAnnotationsResponseEntryStatus + :: BatchAnnotationsResponseEntryStatus +batchAnnotationsResponseEntryStatus = + BatchAnnotationsResponseEntryStatus + { _baresCode = Nothing + , _baresMessage = Nothing + } + +-- | The HTTP status code for this operation. +baresCode :: Lens' BatchAnnotationsResponseEntryStatus (Maybe Int32) +baresCode + = lens _baresCode (\ s a -> s{_baresCode = a}) + +-- | Error message for this status, if any. +baresMessage :: Lens' BatchAnnotationsResponseEntryStatus (Maybe Text) +baresMessage + = lens _baresMessage (\ s a -> s{_baresMessage = a}) + +instance FromJSON BatchAnnotationsResponseEntryStatus + where + parseJSON + = withObject "BatchAnnotationsResponseEntryStatus" + (\ o -> + BatchAnnotationsResponseEntryStatus <$> + (o .:? "code") <*> (o .:? "message")) + +instance ToJSON BatchAnnotationsResponseEntryStatus + where + toJSON BatchAnnotationsResponseEntryStatus{..} + = object + (catMaybes + [("code" .=) <$> _baresCode, + ("message" .=) <$> _baresMessage]) + +-- +-- /See:/ 'batchAnnotationsResponse' smart constructor. +newtype BatchAnnotationsResponse = BatchAnnotationsResponse + { _barEntries :: Maybe [Maybe BatchAnnotationsResponseEntry] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchAnnotationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'barEntries' +batchAnnotationsResponse + :: BatchAnnotationsResponse +batchAnnotationsResponse = + BatchAnnotationsResponse + { _barEntries = Nothing + } + +-- | The resulting per-annotation entries, ordered consistently with the +-- original request. +barEntries :: Lens' BatchAnnotationsResponse [Maybe BatchAnnotationsResponseEntry] +barEntries + = lens _barEntries (\ s a -> s{_barEntries = a}) . + _Default + . _Coerce + +instance FromJSON BatchAnnotationsResponse where + parseJSON + = withObject "BatchAnnotationsResponse" + (\ o -> + BatchAnnotationsResponse <$> + (o .:? "entries" .!= mempty)) + +instance ToJSON BatchAnnotationsResponse where + toJSON BatchAnnotationsResponse{..} + = object (catMaybes [("entries" .=) <$> _barEntries]) + +-- | A reference is a canonical assembled DNA sequence, intended to act as a +-- reference coordinate space for other genomic annotations. A single +-- reference might represent the human chromosome 1 or mitochandrial DNA, +-- for instance. A reference belongs to one or more reference sets. +-- +-- /See:/ 'reference' smart constructor. +data Reference = Reference + { _refLength :: !(Maybe Int64) + , _refSourceAccessions :: !(Maybe [Text]) + , _refMd5checksum :: !(Maybe Text) + , _refName :: !(Maybe Text) + , _refNcbiTaxonId :: !(Maybe Int32) + , _refId :: !(Maybe Text) + , _refSourceURI :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Reference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'refLength' +-- +-- * 'refSourceAccessions' +-- +-- * 'refMd5checksum' +-- +-- * 'refName' +-- +-- * 'refNcbiTaxonId' +-- +-- * 'refId' +-- +-- * 'refSourceURI' +reference + :: Reference +reference = + Reference + { _refLength = Nothing + , _refSourceAccessions = Nothing + , _refMd5checksum = Nothing + , _refName = Nothing + , _refNcbiTaxonId = Nothing + , _refId = Nothing + , _refSourceURI = Nothing + } + +-- | The length of this reference\'s sequence. +refLength :: Lens' Reference (Maybe Int64) +refLength + = lens _refLength (\ s a -> s{_refLength = a}) + +-- | All known corresponding accession IDs in INSDC (GenBank\/ENA\/DDBJ) +-- ideally with a version number, for example GCF_000001405.26. +refSourceAccessions :: Lens' Reference [Text] +refSourceAccessions + = lens _refSourceAccessions + (\ s a -> s{_refSourceAccessions = a}) + . _Default + . _Coerce + +-- | MD5 of the upper-case sequence excluding all whitespace characters (this +-- is equivalent to SQ:M5 in SAM). This value is represented in lower case +-- hexadecimal format. +refMd5checksum :: Lens' Reference (Maybe Text) +refMd5checksum + = lens _refMd5checksum + (\ s a -> s{_refMd5checksum = a}) + +-- | The name of this reference, for example 22. +refName :: Lens' Reference (Maybe Text) +refName = lens _refName (\ s a -> s{_refName = a}) + +-- | ID from http:\/\/www.ncbi.nlm.nih.gov\/taxonomy (e.g. 9606->human) if +-- not specified by the containing reference set. +refNcbiTaxonId :: Lens' Reference (Maybe Int32) +refNcbiTaxonId + = lens _refNcbiTaxonId + (\ s a -> s{_refNcbiTaxonId = a}) + +-- | The Google generated immutable ID of the reference. +refId :: Lens' Reference (Maybe Text) +refId = lens _refId (\ s a -> s{_refId = a}) + +-- | The URI from which the sequence was obtained. Specifies a FASTA format +-- file\/string with one name, sequence pair. +refSourceURI :: Lens' Reference (Maybe Text) +refSourceURI + = lens _refSourceURI (\ s a -> s{_refSourceURI = a}) + +instance FromJSON Reference where + parseJSON + = withObject "Reference" + (\ o -> + Reference <$> + (o .:? "length") <*> + (o .:? "sourceAccessions" .!= mempty) + <*> (o .:? "md5checksum") + <*> (o .:? "name") + <*> (o .:? "ncbiTaxonId") + <*> (o .:? "id") + <*> (o .:? "sourceURI")) + +instance ToJSON Reference where + toJSON Reference{..} + = object + (catMaybes + [("length" .=) <$> _refLength, + ("sourceAccessions" .=) <$> _refSourceAccessions, + ("md5checksum" .=) <$> _refMd5checksum, + ("name" .=) <$> _refName, + ("ncbiTaxonId" .=) <$> _refNcbiTaxonId, + ("id" .=) <$> _refId, + ("sourceURI" .=) <$> _refSourceURI]) + +-- | The read group set search request. +-- +-- /See:/ 'searchReadGroupSetsRequest' smart constructor. +data SearchReadGroupSetsRequest = SearchReadGroupSetsRequest + { _srgsrDatasetIds :: !(Maybe [Text]) + , _srgsrName :: !(Maybe Text) + , _srgsrPageToken :: !(Maybe Text) + , _srgsrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReadGroupSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srgsrDatasetIds' +-- +-- * 'srgsrName' +-- +-- * 'srgsrPageToken' +-- +-- * 'srgsrPageSize' +searchReadGroupSetsRequest + :: SearchReadGroupSetsRequest +searchReadGroupSetsRequest = + SearchReadGroupSetsRequest + { _srgsrDatasetIds = Nothing + , _srgsrName = Nothing + , _srgsrPageToken = Nothing + , _srgsrPageSize = Nothing + } + +-- | Restricts this query to read group sets within the given datasets. At +-- least one ID must be provided. +srgsrDatasetIds :: Lens' SearchReadGroupSetsRequest [Text] +srgsrDatasetIds + = lens _srgsrDatasetIds + (\ s a -> s{_srgsrDatasetIds = a}) + . _Default + . _Coerce + +-- | Only return read group sets for which a substring of the name matches +-- this string. +srgsrName :: Lens' SearchReadGroupSetsRequest (Maybe Text) +srgsrName + = lens _srgsrName (\ s a -> s{_srgsrName = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +srgsrPageToken :: Lens' SearchReadGroupSetsRequest (Maybe Text) +srgsrPageToken + = lens _srgsrPageToken + (\ s a -> s{_srgsrPageToken = a}) + +-- | Specifies number of results to return in a single page. If unspecified, +-- it will default to 256. The maximum value is 1024. +srgsrPageSize :: Lens' SearchReadGroupSetsRequest (Maybe Int32) +srgsrPageSize + = lens _srgsrPageSize + (\ s a -> s{_srgsrPageSize = a}) + +instance FromJSON SearchReadGroupSetsRequest where + parseJSON + = withObject "SearchReadGroupSetsRequest" + (\ o -> + SearchReadGroupSetsRequest <$> + (o .:? "datasetIds" .!= mempty) <*> (o .:? "name") + <*> (o .:? "pageToken") + <*> (o .:? "pageSize")) + +instance ToJSON SearchReadGroupSetsRequest where + toJSON SearchReadGroupSetsRequest{..} + = object + (catMaybes + [("datasetIds" .=) <$> _srgsrDatasetIds, + ("name" .=) <$> _srgsrName, + ("pageToken" .=) <$> _srgsrPageToken, + ("pageSize" .=) <$> _srgsrPageSize]) + +-- | The jobs search request. +-- +-- /See:/ 'searchJobsRequest' smart constructor. +data SearchJobsRequest = SearchJobsRequest + { _sjrCreatedAfter :: !(Maybe Int64) + , _sjrStatus :: !(Maybe [Text]) + , _sjrProjectNumber :: !(Maybe Int64) + , _sjrPageToken :: !(Maybe Text) + , _sjrPageSize :: !(Maybe Int32) + , _sjrCreatedBefore :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchJobsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sjrCreatedAfter' +-- +-- * 'sjrStatus' +-- +-- * 'sjrProjectNumber' +-- +-- * 'sjrPageToken' +-- +-- * 'sjrPageSize' +-- +-- * 'sjrCreatedBefore' +searchJobsRequest + :: SearchJobsRequest +searchJobsRequest = + SearchJobsRequest + { _sjrCreatedAfter = Nothing + , _sjrStatus = Nothing + , _sjrProjectNumber = Nothing + , _sjrPageToken = Nothing + , _sjrPageSize = Nothing + , _sjrCreatedBefore = Nothing + } + +-- | If specified, only jobs created on or after this date, given in +-- milliseconds since Unix epoch, will be returned. +sjrCreatedAfter :: Lens' SearchJobsRequest (Maybe Int64) +sjrCreatedAfter + = lens _sjrCreatedAfter + (\ s a -> s{_sjrCreatedAfter = a}) + +-- | Only return jobs which have a matching status. +sjrStatus :: Lens' SearchJobsRequest [Text] +sjrStatus + = lens _sjrStatus (\ s a -> s{_sjrStatus = a}) . + _Default + . _Coerce + +-- | Required. Only return jobs which belong to this Google Developers +-- Console project. +sjrProjectNumber :: Lens' SearchJobsRequest (Maybe Int64) +sjrProjectNumber + = lens _sjrProjectNumber + (\ s a -> s{_sjrProjectNumber = a}) + +-- | The continuation token which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of the +-- nextPageToken from the previous response. +sjrPageToken :: Lens' SearchJobsRequest (Maybe Text) +sjrPageToken + = lens _sjrPageToken (\ s a -> s{_sjrPageToken = a}) + +-- | Specifies the number of results to return in a single page. Defaults to +-- 128. The maximum value is 256. +sjrPageSize :: Lens' SearchJobsRequest (Maybe Int32) +sjrPageSize + = lens _sjrPageSize (\ s a -> s{_sjrPageSize = a}) + +-- | If specified, only jobs created prior to this date, given in +-- milliseconds since Unix epoch, will be returned. +sjrCreatedBefore :: Lens' SearchJobsRequest (Maybe Int64) +sjrCreatedBefore + = lens _sjrCreatedBefore + (\ s a -> s{_sjrCreatedBefore = a}) + +instance FromJSON SearchJobsRequest where + parseJSON + = withObject "SearchJobsRequest" + (\ o -> + SearchJobsRequest <$> + (o .:? "createdAfter") <*> + (o .:? "status" .!= mempty) + <*> (o .:? "projectNumber") + <*> (o .:? "pageToken") + <*> (o .:? "pageSize") + <*> (o .:? "createdBefore")) + +instance ToJSON SearchJobsRequest where + toJSON SearchJobsRequest{..} + = object + (catMaybes + [("createdAfter" .=) <$> _sjrCreatedAfter, + ("status" .=) <$> _sjrStatus, + ("projectNumber" .=) <$> _sjrProjectNumber, + ("pageToken" .=) <$> _sjrPageToken, + ("pageSize" .=) <$> _sjrPageSize, + ("createdBefore" .=) <$> _sjrCreatedBefore]) + +-- | The read search request. +-- +-- /See:/ 'searchReadsRequest' smart constructor. +data SearchReadsRequest = SearchReadsRequest + { _srrStart :: !(Maybe Int64) + , _srrReadGroupIds :: !(Maybe [Text]) + , _srrReferenceName :: !(Maybe Text) + , _srrEnd :: !(Maybe Int64) + , _srrPageToken :: !(Maybe Text) + , _srrPageSize :: !(Maybe Int32) + , _srrReadGroupSetIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReadsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srrStart' +-- +-- * 'srrReadGroupIds' +-- +-- * 'srrReferenceName' +-- +-- * 'srrEnd' +-- +-- * 'srrPageToken' +-- +-- * 'srrPageSize' +-- +-- * 'srrReadGroupSetIds' +searchReadsRequest + :: SearchReadsRequest +searchReadsRequest = + SearchReadsRequest + { _srrStart = Nothing + , _srrReadGroupIds = Nothing + , _srrReferenceName = Nothing + , _srrEnd = Nothing + , _srrPageToken = Nothing + , _srrPageSize = Nothing + , _srrReadGroupSetIds = Nothing + } + +-- | The start position of the range on the reference, 0-based inclusive. If +-- specified, referenceName must also be specified. +srrStart :: Lens' SearchReadsRequest (Maybe Int64) +srrStart = lens _srrStart (\ s a -> s{_srrStart = a}) + +-- | The IDs of the read groups within which to search for reads. All +-- specified read groups must belong to the same read group sets. Must +-- specify one of readGroupSetIds or readGroupIds. +srrReadGroupIds :: Lens' SearchReadsRequest [Text] +srrReadGroupIds + = lens _srrReadGroupIds + (\ s a -> s{_srrReadGroupIds = a}) + . _Default + . _Coerce + +-- | The reference sequence name, for example chr1, 1, or chrX. If set to *, +-- only unmapped reads are returned. +srrReferenceName :: Lens' SearchReadsRequest (Maybe Text) +srrReferenceName + = lens _srrReferenceName + (\ s a -> s{_srrReferenceName = a}) + +-- | The end position of the range on the reference, 0-based exclusive. If +-- specified, referenceName must also be specified. +srrEnd :: Lens' SearchReadsRequest (Maybe Int64) +srrEnd = lens _srrEnd (\ s a -> s{_srrEnd = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +srrPageToken :: Lens' SearchReadsRequest (Maybe Text) +srrPageToken + = lens _srrPageToken (\ s a -> s{_srrPageToken = a}) + +-- | Specifies number of results to return in a single page. If unspecified, +-- it will default to 256. The maximum value is 2048. +srrPageSize :: Lens' SearchReadsRequest (Maybe Int32) +srrPageSize + = lens _srrPageSize (\ s a -> s{_srrPageSize = a}) + +-- | The IDs of the read groups sets within which to search for reads. All +-- specified read group sets must be aligned against a common set of +-- reference sequences; this defines the genomic coordinates for the query. +-- Must specify one of readGroupSetIds or readGroupIds. +srrReadGroupSetIds :: Lens' SearchReadsRequest [Text] +srrReadGroupSetIds + = lens _srrReadGroupSetIds + (\ s a -> s{_srrReadGroupSetIds = a}) + . _Default + . _Coerce + +instance FromJSON SearchReadsRequest where + parseJSON + = withObject "SearchReadsRequest" + (\ o -> + SearchReadsRequest <$> + (o .:? "start") <*> (o .:? "readGroupIds" .!= mempty) + <*> (o .:? "referenceName") + <*> (o .:? "end") + <*> (o .:? "pageToken") + <*> (o .:? "pageSize") + <*> (o .:? "readGroupSetIds" .!= mempty)) + +instance ToJSON SearchReadsRequest where + toJSON SearchReadsRequest{..} + = object + (catMaybes + [("start" .=) <$> _srrStart, + ("readGroupIds" .=) <$> _srrReadGroupIds, + ("referenceName" .=) <$> _srrReferenceName, + ("end" .=) <$> _srrEnd, + ("pageToken" .=) <$> _srrPageToken, + ("pageSize" .=) <$> _srrPageSize, + ("readGroupSetIds" .=) <$> _srrReadGroupSetIds]) + +-- | The call set search response. +-- +-- /See:/ 'searchCallSetsResponse' smart constructor. +data SearchCallSetsResponse = SearchCallSetsResponse + { _scsrNextPageToken :: !(Maybe Text) + , _scsrCallSets :: !(Maybe [Maybe CallSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchCallSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scsrNextPageToken' +-- +-- * 'scsrCallSets' +searchCallSetsResponse + :: SearchCallSetsResponse +searchCallSetsResponse = + SearchCallSetsResponse + { _scsrNextPageToken = Nothing + , _scsrCallSets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +scsrNextPageToken :: Lens' SearchCallSetsResponse (Maybe Text) +scsrNextPageToken + = lens _scsrNextPageToken + (\ s a -> s{_scsrNextPageToken = a}) + +-- | The list of matching call sets. +scsrCallSets :: Lens' SearchCallSetsResponse [Maybe CallSet] +scsrCallSets + = lens _scsrCallSets (\ s a -> s{_scsrCallSets = a}) + . _Default + . _Coerce + +instance FromJSON SearchCallSetsResponse where + parseJSON + = withObject "SearchCallSetsResponse" + (\ o -> + SearchCallSetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "callSets" .!= mempty)) + +instance ToJSON SearchCallSetsResponse where + toJSON SearchCallSetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _scsrNextPageToken, + ("callSets" .=) <$> _scsrCallSets]) + +-- | A summary representation of the service request that spawned the job. +-- +-- /See:/ 'jobRequest' smart constructor. +data JobRequest = JobRequest + { _jrDestination :: !(Maybe [Text]) + , _jrSource :: !(Maybe [Text]) + , _jrType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jrDestination' +-- +-- * 'jrSource' +-- +-- * 'jrType' +jobRequest + :: JobRequest +jobRequest = + JobRequest + { _jrDestination = Nothing + , _jrSource = Nothing + , _jrType = Nothing + } + +-- | The data destination of the request, for example, a Google BigQuery +-- Table or Dataset ID. +jrDestination :: Lens' JobRequest [Text] +jrDestination + = lens _jrDestination + (\ s a -> s{_jrDestination = a}) + . _Default + . _Coerce + +-- | The data source of the request, for example, a Google Cloud Storage +-- object path or Readset ID. +jrSource :: Lens' JobRequest [Text] +jrSource + = lens _jrSource (\ s a -> s{_jrSource = a}) . + _Default + . _Coerce + +-- | The original request type. +jrType :: Lens' JobRequest (Maybe Text) +jrType = lens _jrType (\ s a -> s{_jrType = a}) + +instance FromJSON JobRequest where + parseJSON + = withObject "JobRequest" + (\ o -> + JobRequest <$> + (o .:? "destination" .!= mempty) <*> + (o .:? "source" .!= mempty) + <*> (o .:? "type")) + +instance ToJSON JobRequest where + toJSON JobRequest{..} + = object + (catMaybes + [("destination" .=) <$> _jrDestination, + ("source" .=) <$> _jrSource, + ("type" .=) <$> _jrType]) + +-- | The job creation request. +-- +-- /See:/ 'experimentalCreateJobRequest' smart constructor. +data ExperimentalCreateJobRequest = ExperimentalCreateJobRequest + { _ecjrGcsOutputPath :: !(Maybe Text) + , _ecjrProjectNumber :: !(Maybe Int64) + , _ecjrAlign :: !(Maybe Bool) + , _ecjrSourceUris :: !(Maybe [Text]) + , _ecjrPairedSourceUris :: !(Maybe [Text]) + , _ecjrCallVariants :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExperimentalCreateJobRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ecjrGcsOutputPath' +-- +-- * 'ecjrProjectNumber' +-- +-- * 'ecjrAlign' +-- +-- * 'ecjrSourceUris' +-- +-- * 'ecjrPairedSourceUris' +-- +-- * 'ecjrCallVariants' +experimentalCreateJobRequest + :: ExperimentalCreateJobRequest +experimentalCreateJobRequest = + ExperimentalCreateJobRequest + { _ecjrGcsOutputPath = Nothing + , _ecjrProjectNumber = Nothing + , _ecjrAlign = Nothing + , _ecjrSourceUris = Nothing + , _ecjrPairedSourceUris = Nothing + , _ecjrCallVariants = Nothing + } + +-- | Specifies where to copy the results of certain pipelines. This should be +-- in the form of gs:\/\/bucket\/path. +ecjrGcsOutputPath :: Lens' ExperimentalCreateJobRequest (Maybe Text) +ecjrGcsOutputPath + = lens _ecjrGcsOutputPath + (\ s a -> s{_ecjrGcsOutputPath = a}) + +-- | Required. The Google Cloud Project ID with which to associate the +-- request. +ecjrProjectNumber :: Lens' ExperimentalCreateJobRequest (Maybe Int64) +ecjrProjectNumber + = lens _ecjrProjectNumber + (\ s a -> s{_ecjrProjectNumber = a}) + +-- | Specifies whether or not to run the alignment pipeline. Either align or +-- callVariants must be set. +ecjrAlign :: Lens' ExperimentalCreateJobRequest (Maybe Bool) +ecjrAlign + = lens _ecjrAlign (\ s a -> s{_ecjrAlign = a}) + +-- | A list of Google Cloud Storage URIs of data files to operate upon. These +-- can be .bam, interleaved .fastq, or paired .fastq. If specifying paired +-- .fastq files, the first of each pair of files should be listed here, and +-- the second of each pair should be listed in pairedSourceUris. +ecjrSourceUris :: Lens' ExperimentalCreateJobRequest [Text] +ecjrSourceUris + = lens _ecjrSourceUris + (\ s a -> s{_ecjrSourceUris = a}) + . _Default + . _Coerce + +-- | A list of Google Cloud Storage URIs of paired end .fastq files to +-- operate upon. If specified, this represents the second file of each +-- paired .fastq file. The first file of each pair should be specified in +-- sourceUris. +ecjrPairedSourceUris :: Lens' ExperimentalCreateJobRequest [Text] +ecjrPairedSourceUris + = lens _ecjrPairedSourceUris + (\ s a -> s{_ecjrPairedSourceUris = a}) + . _Default + . _Coerce + +-- | Specifies whether or not to run the variant calling pipeline. Either +-- align or callVariants must be set. +ecjrCallVariants :: Lens' ExperimentalCreateJobRequest (Maybe Bool) +ecjrCallVariants + = lens _ecjrCallVariants + (\ s a -> s{_ecjrCallVariants = a}) + +instance FromJSON ExperimentalCreateJobRequest where + parseJSON + = withObject "ExperimentalCreateJobRequest" + (\ o -> + ExperimentalCreateJobRequest <$> + (o .:? "gcsOutputPath") <*> (o .:? "projectNumber") + <*> (o .:? "align") + <*> (o .:? "sourceUris" .!= mempty) + <*> (o .:? "pairedSourceUris" .!= mempty) + <*> (o .:? "callVariants")) + +instance ToJSON ExperimentalCreateJobRequest where + toJSON ExperimentalCreateJobRequest{..} + = object + (catMaybes + [("gcsOutputPath" .=) <$> _ecjrGcsOutputPath, + ("projectNumber" .=) <$> _ecjrProjectNumber, + ("align" .=) <$> _ecjrAlign, + ("sourceUris" .=) <$> _ecjrSourceUris, + ("pairedSourceUris" .=) <$> _ecjrPairedSourceUris, + ("callVariants" .=) <$> _ecjrCallVariants]) + +-- +-- /See:/ 'readGroupProgram' smart constructor. +data ReadGroupProgram = ReadGroupProgram + { _rgpPrevProgramId :: !(Maybe Text) + , _rgpName :: !(Maybe Text) + , _rgpVersion :: !(Maybe Text) + , _rgpId :: !(Maybe Text) + , _rgpCommandLine :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadGroupProgram' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgpPrevProgramId' +-- +-- * 'rgpName' +-- +-- * 'rgpVersion' +-- +-- * 'rgpId' +-- +-- * 'rgpCommandLine' +readGroupProgram + :: ReadGroupProgram +readGroupProgram = + ReadGroupProgram + { _rgpPrevProgramId = Nothing + , _rgpName = Nothing + , _rgpVersion = Nothing + , _rgpId = Nothing + , _rgpCommandLine = Nothing + } + +-- | The ID of the program run before this one. +rgpPrevProgramId :: Lens' ReadGroupProgram (Maybe Text) +rgpPrevProgramId + = lens _rgpPrevProgramId + (\ s a -> s{_rgpPrevProgramId = a}) + +-- | The name of the program. +rgpName :: Lens' ReadGroupProgram (Maybe Text) +rgpName = lens _rgpName (\ s a -> s{_rgpName = a}) + +-- | The version of the program run. +rgpVersion :: Lens' ReadGroupProgram (Maybe Text) +rgpVersion + = lens _rgpVersion (\ s a -> s{_rgpVersion = a}) + +-- | The user specified locally unique ID of the program. Used along with +-- prevProgramId to define an ordering between programs. +rgpId :: Lens' ReadGroupProgram (Maybe Text) +rgpId = lens _rgpId (\ s a -> s{_rgpId = a}) + +-- | The command line used to run this program. +rgpCommandLine :: Lens' ReadGroupProgram (Maybe Text) +rgpCommandLine + = lens _rgpCommandLine + (\ s a -> s{_rgpCommandLine = a}) + +instance FromJSON ReadGroupProgram where + parseJSON + = withObject "ReadGroupProgram" + (\ o -> + ReadGroupProgram <$> + (o .:? "prevProgramId") <*> (o .:? "name") <*> + (o .:? "version") + <*> (o .:? "id") + <*> (o .:? "commandLine")) + +instance ToJSON ReadGroupProgram where + toJSON ReadGroupProgram{..} + = object + (catMaybes + [("prevProgramId" .=) <$> _rgpPrevProgramId, + ("name" .=) <$> _rgpName, + ("version" .=) <$> _rgpVersion, ("id" .=) <$> _rgpId, + ("commandLine" .=) <$> _rgpCommandLine]) + +-- +-- /See:/ 'searchAnnotationsResponse' smart constructor. +data SearchAnnotationsResponse = SearchAnnotationsResponse + { _sarAnnotations :: !(Maybe [Maybe Annotation]) + , _sarNextPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnnotationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sarAnnotations' +-- +-- * 'sarNextPageToken' +searchAnnotationsResponse + :: SearchAnnotationsResponse +searchAnnotationsResponse = + SearchAnnotationsResponse + { _sarAnnotations = Nothing + , _sarNextPageToken = Nothing + } + +-- | The matching annotations. +sarAnnotations :: Lens' SearchAnnotationsResponse [Maybe Annotation] +sarAnnotations + = lens _sarAnnotations + (\ s a -> s{_sarAnnotations = a}) + . _Default + . _Coerce + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +sarNextPageToken :: Lens' SearchAnnotationsResponse (Maybe Text) +sarNextPageToken + = lens _sarNextPageToken + (\ s a -> s{_sarNextPageToken = a}) + +instance FromJSON SearchAnnotationsResponse where + parseJSON + = withObject "SearchAnnotationsResponse" + (\ o -> + SearchAnnotationsResponse <$> + (o .:? "annotations" .!= mempty) <*> + (o .:? "nextPageToken")) + +instance ToJSON SearchAnnotationsResponse where + toJSON SearchAnnotationsResponse{..} + = object + (catMaybes + [("annotations" .=) <$> _sarAnnotations, + ("nextPageToken" .=) <$> _sarNextPageToken]) + +-- | The search variant sets request. +-- +-- /See:/ 'searchVariantSetsRequest' smart constructor. +data SearchVariantSetsRequest = SearchVariantSetsRequest + { _svsrDatasetIds :: !(Maybe [Text]) + , _svsrPageToken :: !(Maybe Text) + , _svsrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchVariantSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svsrDatasetIds' +-- +-- * 'svsrPageToken' +-- +-- * 'svsrPageSize' +searchVariantSetsRequest + :: SearchVariantSetsRequest +searchVariantSetsRequest = + SearchVariantSetsRequest + { _svsrDatasetIds = Nothing + , _svsrPageToken = Nothing + , _svsrPageSize = Nothing + } + +-- | Exactly one dataset ID must be provided here. Only variant sets which +-- belong to this dataset will be returned. +svsrDatasetIds :: Lens' SearchVariantSetsRequest [Text] +svsrDatasetIds + = lens _svsrDatasetIds + (\ s a -> s{_svsrDatasetIds = a}) + . _Default + . _Coerce + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +svsrPageToken :: Lens' SearchVariantSetsRequest (Maybe Text) +svsrPageToken + = lens _svsrPageToken + (\ s a -> s{_svsrPageToken = a}) + +-- | The maximum number of variant sets to return in a request. +svsrPageSize :: Lens' SearchVariantSetsRequest (Maybe Int32) +svsrPageSize + = lens _svsrPageSize (\ s a -> s{_svsrPageSize = a}) + +instance FromJSON SearchVariantSetsRequest where + parseJSON + = withObject "SearchVariantSetsRequest" + (\ o -> + SearchVariantSetsRequest <$> + (o .:? "datasetIds" .!= mempty) <*> + (o .:? "pageToken") + <*> (o .:? "pageSize")) + +instance ToJSON SearchVariantSetsRequest where + toJSON SearchVariantSetsRequest{..} + = object + (catMaybes + [("datasetIds" .=) <$> _svsrDatasetIds, + ("pageToken" .=) <$> _svsrPageToken, + ("pageSize" .=) <$> _svsrPageSize]) + +-- +-- /See:/ 'searchAnnotationSetsRequest' smart constructor. +data SearchAnnotationSetsRequest = SearchAnnotationSetsRequest + { _sasrReferenceSetId :: !(Maybe Text) + , _sasrTypes :: !(Maybe [Text]) + , _sasrDatasetIds :: !(Maybe [Text]) + , _sasrName :: !(Maybe Text) + , _sasrPageToken :: !(Maybe Text) + , _sasrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnnotationSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sasrReferenceSetId' +-- +-- * 'sasrTypes' +-- +-- * 'sasrDatasetIds' +-- +-- * 'sasrName' +-- +-- * 'sasrPageToken' +-- +-- * 'sasrPageSize' +searchAnnotationSetsRequest + :: SearchAnnotationSetsRequest +searchAnnotationSetsRequest = + SearchAnnotationSetsRequest + { _sasrReferenceSetId = Nothing + , _sasrTypes = Nothing + , _sasrDatasetIds = Nothing + , _sasrName = Nothing + , _sasrPageToken = Nothing + , _sasrPageSize = Nothing + } + +-- | If specified, only annotation sets associated with the given reference +-- set are returned. +sasrReferenceSetId :: Lens' SearchAnnotationSetsRequest (Maybe Text) +sasrReferenceSetId + = lens _sasrReferenceSetId + (\ s a -> s{_sasrReferenceSetId = a}) + +-- | If specified, only annotation sets that have any of these types are +-- returned. +sasrTypes :: Lens' SearchAnnotationSetsRequest [Text] +sasrTypes + = lens _sasrTypes (\ s a -> s{_sasrTypes = a}) . + _Default + . _Coerce + +-- | The dataset IDs to search within. Caller must have READ access to these +-- datasets. +sasrDatasetIds :: Lens' SearchAnnotationSetsRequest [Text] +sasrDatasetIds + = lens _sasrDatasetIds + (\ s a -> s{_sasrDatasetIds = a}) + . _Default + . _Coerce + +-- | Only return annotations sets for which a substring of the name matches +-- this string (case insensitive). +sasrName :: Lens' SearchAnnotationSetsRequest (Maybe Text) +sasrName = lens _sasrName (\ s a -> s{_sasrName = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +sasrPageToken :: Lens' SearchAnnotationSetsRequest (Maybe Text) +sasrPageToken + = lens _sasrPageToken + (\ s a -> s{_sasrPageToken = a}) + +-- | Specifies number of results to return in a single page. If unspecified, +-- it will default to 128. The maximum value is 1024. +sasrPageSize :: Lens' SearchAnnotationSetsRequest (Maybe Int32) +sasrPageSize + = lens _sasrPageSize (\ s a -> s{_sasrPageSize = a}) + +instance FromJSON SearchAnnotationSetsRequest where + parseJSON + = withObject "SearchAnnotationSetsRequest" + (\ o -> + SearchAnnotationSetsRequest <$> + (o .:? "referenceSetId") <*> + (o .:? "types" .!= mempty) + <*> (o .:? "datasetIds" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "pageToken") + <*> (o .:? "pageSize")) + +instance ToJSON SearchAnnotationSetsRequest where + toJSON SearchAnnotationSetsRequest{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _sasrReferenceSetId, + ("types" .=) <$> _sasrTypes, + ("datasetIds" .=) <$> _sasrDatasetIds, + ("name" .=) <$> _sasrName, + ("pageToken" .=) <$> _sasrPageToken, + ("pageSize" .=) <$> _sasrPageSize]) + +-- | The variant search response. +-- +-- /See:/ 'searchVariantsResponse' smart constructor. +data SearchVariantsResponse = SearchVariantsResponse + { _svrVariants :: !(Maybe [Maybe Variant]) + , _svrNextPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchVariantsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svrVariants' +-- +-- * 'svrNextPageToken' +searchVariantsResponse + :: SearchVariantsResponse +searchVariantsResponse = + SearchVariantsResponse + { _svrVariants = Nothing + , _svrNextPageToken = Nothing + } + +-- | The list of matching Variants. +svrVariants :: Lens' SearchVariantsResponse [Maybe Variant] +svrVariants + = lens _svrVariants (\ s a -> s{_svrVariants = a}) . + _Default + . _Coerce + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +svrNextPageToken :: Lens' SearchVariantsResponse (Maybe Text) +svrNextPageToken + = lens _svrNextPageToken + (\ s a -> s{_svrNextPageToken = a}) + +instance FromJSON SearchVariantsResponse where + parseJSON + = withObject "SearchVariantsResponse" + (\ o -> + SearchVariantsResponse <$> + (o .:? "variants" .!= mempty) <*> + (o .:? "nextPageToken")) + +instance ToJSON SearchVariantsResponse where + toJSON SearchVariantsResponse{..} + = object + (catMaybes + [("variants" .=) <$> _svrVariants, + ("nextPageToken" .=) <$> _svrNextPageToken]) + +-- | The read group set export request. +-- +-- /See:/ 'exportReadGroupSetsRequest' smart constructor. +data ExportReadGroupSetsRequest = ExportReadGroupSetsRequest + { _ergsrReferenceNames :: !(Maybe [Text]) + , _ergsrProjectNumber :: !(Maybe Int64) + , _ergsrExportUri :: !(Maybe Text) + , _ergsrReadGroupSetIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExportReadGroupSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ergsrReferenceNames' +-- +-- * 'ergsrProjectNumber' +-- +-- * 'ergsrExportUri' +-- +-- * 'ergsrReadGroupSetIds' +exportReadGroupSetsRequest + :: ExportReadGroupSetsRequest +exportReadGroupSetsRequest = + ExportReadGroupSetsRequest + { _ergsrReferenceNames = Nothing + , _ergsrProjectNumber = Nothing + , _ergsrExportUri = Nothing + , _ergsrReadGroupSetIds = Nothing + } + +-- | The reference names to export. If this is not specified, all reference +-- sequences, including unmapped reads, are exported. Use * to export only +-- unmapped reads. +ergsrReferenceNames :: Lens' ExportReadGroupSetsRequest [Text] +ergsrReferenceNames + = lens _ergsrReferenceNames + (\ s a -> s{_ergsrReferenceNames = a}) + . _Default + . _Coerce + +-- | Required. The Google Developers Console project number that owns this +-- export. +ergsrProjectNumber :: Lens' ExportReadGroupSetsRequest (Maybe Int64) +ergsrProjectNumber + = lens _ergsrProjectNumber + (\ s a -> s{_ergsrProjectNumber = a}) + +-- | Required. A Google Cloud Storage URI for the exported BAM file. The +-- currently authenticated user must have write access to the new file. An +-- error will be returned if the URI already contains data. +ergsrExportUri :: Lens' ExportReadGroupSetsRequest (Maybe Text) +ergsrExportUri + = lens _ergsrExportUri + (\ s a -> s{_ergsrExportUri = a}) + +-- | Required. The IDs of the read group sets to export. +ergsrReadGroupSetIds :: Lens' ExportReadGroupSetsRequest [Text] +ergsrReadGroupSetIds + = lens _ergsrReadGroupSetIds + (\ s a -> s{_ergsrReadGroupSetIds = a}) + . _Default + . _Coerce + +instance FromJSON ExportReadGroupSetsRequest where + parseJSON + = withObject "ExportReadGroupSetsRequest" + (\ o -> + ExportReadGroupSetsRequest <$> + (o .:? "referenceNames" .!= mempty) <*> + (o .:? "projectNumber") + <*> (o .:? "exportUri") + <*> (o .:? "readGroupSetIds" .!= mempty)) + +instance ToJSON ExportReadGroupSetsRequest where + toJSON ExportReadGroupSetsRequest{..} + = object + (catMaybes + [("referenceNames" .=) <$> _ergsrReferenceNames, + ("projectNumber" .=) <$> _ergsrProjectNumber, + ("exportUri" .=) <$> _ergsrExportUri, + ("readGroupSetIds" .=) <$> _ergsrReadGroupSetIds]) + +-- | Wrapper message for \`int32\`. The JSON representation for +-- \`Int32Value\` is JSON number. +-- +-- /See:/ 'int32Value' smart constructor. +newtype Int32Value = Int32Value + { _ivValue :: Maybe Int32 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Int32Value' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ivValue' +int32Value + :: Int32Value +int32Value = + Int32Value + { _ivValue = Nothing + } + +-- | The int32 value. +ivValue :: Lens' Int32Value (Maybe Int32) +ivValue = lens _ivValue (\ s a -> s{_ivValue = a}) + +instance FromJSON Int32Value where + parseJSON + = withObject "Int32Value" + (\ o -> Int32Value <$> (o .:? "value")) + +instance ToJSON Int32Value where + toJSON Int32Value{..} + = object (catMaybes [("value" .=) <$> _ivValue]) + +-- | The read search response. +-- +-- /See:/ 'searchReadsResponse' smart constructor. +data SearchReadsResponse = SearchReadsResponse + { _sNextPageToken :: !(Maybe Text) + , _sAlignments :: !(Maybe [Maybe Read]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReadsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sNextPageToken' +-- +-- * 'sAlignments' +searchReadsResponse + :: SearchReadsResponse +searchReadsResponse = + SearchReadsResponse + { _sNextPageToken = Nothing + , _sAlignments = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +sNextPageToken :: Lens' SearchReadsResponse (Maybe Text) +sNextPageToken + = lens _sNextPageToken + (\ s a -> s{_sNextPageToken = a}) + +-- | The list of matching alignments sorted by mapped genomic coordinate, if +-- any, ascending in position within the same reference. Unmapped reads, +-- which have no position, are returned contiguously and are sorted in +-- ascending lexicographic order by fragment name. +sAlignments :: Lens' SearchReadsResponse [Maybe Read] +sAlignments + = lens _sAlignments (\ s a -> s{_sAlignments = a}) . + _Default + . _Coerce + +instance FromJSON SearchReadsResponse where + parseJSON + = withObject "SearchReadsResponse" + (\ o -> + SearchReadsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "alignments" .!= mempty)) + +instance ToJSON SearchReadsResponse where + toJSON SearchReadsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _sNextPageToken, + ("alignments" .=) <$> _sAlignments]) + +-- | The call set search request. +-- +-- /See:/ 'searchCallSetsRequest' smart constructor. +data SearchCallSetsRequest = SearchCallSetsRequest + { _scsrName :: !(Maybe Text) + , _scsrPageToken :: !(Maybe Text) + , _scsrVariantSetIds :: !(Maybe [Text]) + , _scsrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchCallSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scsrName' +-- +-- * 'scsrPageToken' +-- +-- * 'scsrVariantSetIds' +-- +-- * 'scsrPageSize' +searchCallSetsRequest + :: SearchCallSetsRequest +searchCallSetsRequest = + SearchCallSetsRequest + { _scsrName = Nothing + , _scsrPageToken = Nothing + , _scsrVariantSetIds = Nothing + , _scsrPageSize = Nothing + } + +-- | Only return call sets for which a substring of the name matches this +-- string. +scsrName :: Lens' SearchCallSetsRequest (Maybe Text) +scsrName = lens _scsrName (\ s a -> s{_scsrName = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +scsrPageToken :: Lens' SearchCallSetsRequest (Maybe Text) +scsrPageToken + = lens _scsrPageToken + (\ s a -> s{_scsrPageToken = a}) + +-- | Restrict the query to call sets within the given variant sets. At least +-- one ID must be provided. +scsrVariantSetIds :: Lens' SearchCallSetsRequest [Text] +scsrVariantSetIds + = lens _scsrVariantSetIds + (\ s a -> s{_scsrVariantSetIds = a}) + . _Default + . _Coerce + +-- | The maximum number of call sets to return. If unspecified, defaults to +-- 1000. +scsrPageSize :: Lens' SearchCallSetsRequest (Maybe Int32) +scsrPageSize + = lens _scsrPageSize (\ s a -> s{_scsrPageSize = a}) + +instance FromJSON SearchCallSetsRequest where + parseJSON + = withObject "SearchCallSetsRequest" + (\ o -> + SearchCallSetsRequest <$> + (o .:? "name") <*> (o .:? "pageToken") <*> + (o .:? "variantSetIds" .!= mempty) + <*> (o .:? "pageSize")) + +instance ToJSON SearchCallSetsRequest where + toJSON SearchCallSetsRequest{..} + = object + (catMaybes + [("name" .=) <$> _scsrName, + ("pageToken" .=) <$> _scsrPageToken, + ("variantSetIds" .=) <$> _scsrVariantSetIds, + ("pageSize" .=) <$> _scsrPageSize]) + +-- | The job creation response. +-- +-- /See:/ 'experimentalCreateJobResponse' smart constructor. +newtype ExperimentalCreateJobResponse = ExperimentalCreateJobResponse + { _ecjrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExperimentalCreateJobResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ecjrJobId' +experimentalCreateJobResponse + :: ExperimentalCreateJobResponse +experimentalCreateJobResponse = + ExperimentalCreateJobResponse + { _ecjrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +ecjrJobId :: Lens' ExperimentalCreateJobResponse (Maybe Text) +ecjrJobId + = lens _ecjrJobId (\ s a -> s{_ecjrJobId = a}) + +instance FromJSON ExperimentalCreateJobResponse where + parseJSON + = withObject "ExperimentalCreateJobResponse" + (\ o -> + ExperimentalCreateJobResponse <$> (o .:? "jobId")) + +instance ToJSON ExperimentalCreateJobResponse where + toJSON ExperimentalCreateJobResponse{..} + = object (catMaybes [("jobId" .=) <$> _ecjrJobId]) + +-- | A 0-based half-open genomic coordinate range over a reference sequence. +-- +-- /See:/ 'range' smart constructor. +data Range = Range + { _rStart :: !(Maybe Int64) + , _rReferenceName :: !(Maybe Text) + , _rEnd :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Range' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rStart' +-- +-- * 'rReferenceName' +-- +-- * 'rEnd' +range + :: Range +range = + Range + { _rStart = Nothing + , _rReferenceName = Nothing + , _rEnd = Nothing + } + +-- | The start position of the range on the reference, 0-based inclusive. If +-- specified, referenceName must also be specified. +rStart :: Lens' Range (Maybe Int64) +rStart = lens _rStart (\ s a -> s{_rStart = a}) + +-- | The reference sequence name, for example chr1, 1, or chrX. +rReferenceName :: Lens' Range (Maybe Text) +rReferenceName + = lens _rReferenceName + (\ s a -> s{_rReferenceName = a}) + +-- | The end position of the range on the reference, 0-based exclusive. If +-- specified, referenceName must also be specified. +rEnd :: Lens' Range (Maybe Int64) +rEnd = lens _rEnd (\ s a -> s{_rEnd = a}) + +instance FromJSON Range where + parseJSON + = withObject "Range" + (\ o -> + Range <$> + (o .:? "start") <*> (o .:? "referenceName") <*> + (o .:? "end")) + +instance ToJSON Range where + toJSON Range{..} + = object + (catMaybes + [("start" .=) <$> _rStart, + ("referenceName" .=) <$> _rReferenceName, + ("end" .=) <$> _rEnd]) + +-- | A Job represents an ongoing process that can be monitored for status +-- information. +-- +-- /See:/ 'job' smart constructor. +data Job = Job + { _jobDetailedStatus :: !(Maybe Text) + , _jobStatus :: !(Maybe Text) + , _jobCreated :: !(Maybe Int64) + , _jobProjectNumber :: !(Maybe Int64) + , _jobWarnings :: !(Maybe [Text]) + , _jobImportedIds :: !(Maybe [Text]) + , _jobId :: !(Maybe Text) + , _jobErrors :: !(Maybe [Text]) + , _jobRequest :: !(Maybe (Maybe JobRequest)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Job' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jobDetailedStatus' +-- +-- * 'jobStatus' +-- +-- * 'jobCreated' +-- +-- * 'jobProjectNumber' +-- +-- * 'jobWarnings' +-- +-- * 'jobImportedIds' +-- +-- * 'jobId' +-- +-- * 'jobErrors' +-- +-- * 'jobRequest' +job + :: Job +job = + Job + { _jobDetailedStatus = Nothing + , _jobStatus = Nothing + , _jobCreated = Nothing + , _jobProjectNumber = Nothing + , _jobWarnings = Nothing + , _jobImportedIds = Nothing + , _jobId = Nothing + , _jobErrors = Nothing + , _jobRequest = Nothing + } + +-- | A more detailed description of this job\'s current status. +jobDetailedStatus :: Lens' Job (Maybe Text) +jobDetailedStatus + = lens _jobDetailedStatus + (\ s a -> s{_jobDetailedStatus = a}) + +-- | The status of this job. +jobStatus :: Lens' Job (Maybe Text) +jobStatus + = lens _jobStatus (\ s a -> s{_jobStatus = a}) + +-- | The date this job was created, in milliseconds from the epoch. +jobCreated :: Lens' Job (Maybe Int64) +jobCreated + = lens _jobCreated (\ s a -> s{_jobCreated = a}) + +-- | The Google Developers Console project number to which this job belongs. +jobProjectNumber :: Lens' Job (Maybe Int64) +jobProjectNumber + = lens _jobProjectNumber + (\ s a -> s{_jobProjectNumber = a}) + +-- | Any warnings that occurred during processing. +jobWarnings :: Lens' Job [Text] +jobWarnings + = lens _jobWarnings (\ s a -> s{_jobWarnings = a}) . + _Default + . _Coerce + +-- | If this Job represents an import, this field will contain the IDs of the +-- objects that were successfully imported. +jobImportedIds :: Lens' Job [Text] +jobImportedIds + = lens _jobImportedIds + (\ s a -> s{_jobImportedIds = a}) + . _Default + . _Coerce + +-- | The job ID. +jobId :: Lens' Job (Maybe Text) +jobId = lens _jobId (\ s a -> s{_jobId = a}) + +-- | Any errors that occurred during processing. +jobErrors :: Lens' Job [Text] +jobErrors + = lens _jobErrors (\ s a -> s{_jobErrors = a}) . + _Default + . _Coerce + +-- | A summarized representation of the original service request. +jobRequest :: Lens' Job (Maybe (Maybe JobRequest)) +jobRequest + = lens _jobRequest (\ s a -> s{_jobRequest = a}) + +instance FromJSON Job where + parseJSON + = withObject "Job" + (\ o -> + Job <$> + (o .:? "detailedStatus") <*> (o .:? "status") <*> + (o .:? "created") + <*> (o .:? "projectNumber") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "importedIds" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "request")) + +instance ToJSON Job where + toJSON Job{..} + = object + (catMaybes + [("detailedStatus" .=) <$> _jobDetailedStatus, + ("status" .=) <$> _jobStatus, + ("created" .=) <$> _jobCreated, + ("projectNumber" .=) <$> _jobProjectNumber, + ("warnings" .=) <$> _jobWarnings, + ("importedIds" .=) <$> _jobImportedIds, + ("id" .=) <$> _jobId, ("errors" .=) <$> _jobErrors, + ("request" .=) <$> _jobRequest]) + +-- +-- /See:/ 'searchReferenceSetsResponse' smart constructor. +data SearchReferenceSetsResponse = SearchReferenceSetsResponse + { _srsrNextPageToken :: !(Maybe Text) + , _srsrReferenceSets :: !(Maybe [Maybe ReferenceSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReferenceSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srsrNextPageToken' +-- +-- * 'srsrReferenceSets' +searchReferenceSetsResponse + :: SearchReferenceSetsResponse +searchReferenceSetsResponse = + SearchReferenceSetsResponse + { _srsrNextPageToken = Nothing + , _srsrReferenceSets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +srsrNextPageToken :: Lens' SearchReferenceSetsResponse (Maybe Text) +srsrNextPageToken + = lens _srsrNextPageToken + (\ s a -> s{_srsrNextPageToken = a}) + +-- | The matching references sets. +srsrReferenceSets :: Lens' SearchReferenceSetsResponse [Maybe ReferenceSet] +srsrReferenceSets + = lens _srsrReferenceSets + (\ s a -> s{_srsrReferenceSets = a}) + . _Default + . _Coerce + +instance FromJSON SearchReferenceSetsResponse where + parseJSON + = withObject "SearchReferenceSetsResponse" + (\ o -> + SearchReferenceSetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "referenceSets" .!= mempty)) + +instance ToJSON SearchReferenceSetsResponse where + toJSON SearchReferenceSetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _srsrNextPageToken, + ("referenceSets" .=) <$> _srsrReferenceSets]) + +-- | A read group set is a logical collection of read groups, which are +-- collections of reads produced by a sequencer. A read group set typically +-- models reads corresponding to one sample, sequenced one way, and aligned +-- one way. - A read group set belongs to one dataset. - A read group +-- belongs to one read group set. - A read belongs to one read group. +-- +-- /See:/ 'readGroupSet' smart constructor. +data ReadGroupSet = ReadGroupSet + { _rgsReferenceSetId :: !(Maybe Text) + , _rgsName :: !(Maybe Text) + , _rgsDatasetId :: !(Maybe Text) + , _rgsId :: !(Maybe Text) + , _rgsInfo :: !(Maybe ReadGroupSetInfo) + , _rgsReadGroups :: !(Maybe [Maybe ReadGroup]) + , _rgsFilename :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadGroupSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgsReferenceSetId' +-- +-- * 'rgsName' +-- +-- * 'rgsDatasetId' +-- +-- * 'rgsId' +-- +-- * 'rgsInfo' +-- +-- * 'rgsReadGroups' +-- +-- * 'rgsFilename' +readGroupSet + :: ReadGroupSet +readGroupSet = + ReadGroupSet + { _rgsReferenceSetId = Nothing + , _rgsName = Nothing + , _rgsDatasetId = Nothing + , _rgsId = Nothing + , _rgsInfo = Nothing + , _rgsReadGroups = Nothing + , _rgsFilename = Nothing + } + +-- | The reference set the reads in this read group set are aligned to. +rgsReferenceSetId :: Lens' ReadGroupSet (Maybe Text) +rgsReferenceSetId + = lens _rgsReferenceSetId + (\ s a -> s{_rgsReferenceSetId = a}) + +-- | The read group set name. By default this will be initialized to the +-- sample name of the sequenced data contained in this set. +rgsName :: Lens' ReadGroupSet (Maybe Text) +rgsName = lens _rgsName (\ s a -> s{_rgsName = a}) + +-- | The dataset ID. +rgsDatasetId :: Lens' ReadGroupSet (Maybe Text) +rgsDatasetId + = lens _rgsDatasetId (\ s a -> s{_rgsDatasetId = a}) + +-- | The read group set ID. +rgsId :: Lens' ReadGroupSet (Maybe Text) +rgsId = lens _rgsId (\ s a -> s{_rgsId = a}) + +-- | A string which maps to an array of values. +rgsInfo :: Lens' ReadGroupSet (Maybe ReadGroupSetInfo) +rgsInfo = lens _rgsInfo (\ s a -> s{_rgsInfo = a}) + +-- | The read groups in this set. There are typically 1-10 read groups in a +-- read group set. +rgsReadGroups :: Lens' ReadGroupSet [Maybe ReadGroup] +rgsReadGroups + = lens _rgsReadGroups + (\ s a -> s{_rgsReadGroups = a}) + . _Default + . _Coerce + +-- | The filename of the original source file for this read group set, if +-- any. +rgsFilename :: Lens' ReadGroupSet (Maybe Text) +rgsFilename + = lens _rgsFilename (\ s a -> s{_rgsFilename = a}) + +instance FromJSON ReadGroupSet where + parseJSON + = withObject "ReadGroupSet" + (\ o -> + ReadGroupSet <$> + (o .:? "referenceSetId") <*> (o .:? "name") <*> + (o .:? "datasetId") + <*> (o .:? "id") + <*> (o .:? "info") + <*> (o .:? "readGroups" .!= mempty) + <*> (o .:? "filename")) + +instance ToJSON ReadGroupSet where + toJSON ReadGroupSet{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _rgsReferenceSetId, + ("name" .=) <$> _rgsName, + ("datasetId" .=) <$> _rgsDatasetId, + ("id" .=) <$> _rgsId, ("info" .=) <$> _rgsInfo, + ("readGroups" .=) <$> _rgsReadGroups, + ("filename" .=) <$> _rgsFilename]) + +-- | Describes a paired-end FASTQ file source for alignment. +-- +-- /See:/ 'pairedFastqSource' smart constructor. +data PairedFastqSource = PairedFastqSource + { _pfsFirstSourceUris :: !(Maybe [Text]) + , _pfsMetadata :: !(Maybe (Maybe FastqMetadata)) + , _pfsSecondSourceUris :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PairedFastqSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pfsFirstSourceUris' +-- +-- * 'pfsMetadata' +-- +-- * 'pfsSecondSourceUris' +pairedFastqSource + :: PairedFastqSource +pairedFastqSource = + PairedFastqSource + { _pfsFirstSourceUris = Nothing + , _pfsMetadata = Nothing + , _pfsSecondSourceUris = Nothing + } + +-- | A list of URIs pointing at paired end FASTQ files in Google Cloud +-- Storage which will be aligned. The first of each paired file should be +-- specified here, in an order that matches the second of each paired file +-- specified in secondSourceUris. For example: firstSourceUris: +-- [file1_1.fq, file2_1.fq], secondSourceUris: [file1_2.fq, file2_2.fq]. +-- The caller must have READ permissions for these files. +pfsFirstSourceUris :: Lens' PairedFastqSource [Text] +pfsFirstSourceUris + = lens _pfsFirstSourceUris + (\ s a -> s{_pfsFirstSourceUris = a}) + . _Default + . _Coerce + +-- | Optionally specifies the metadata to be associated with the final +-- aligned read group set. +pfsMetadata :: Lens' PairedFastqSource (Maybe (Maybe FastqMetadata)) +pfsMetadata + = lens _pfsMetadata (\ s a -> s{_pfsMetadata = a}) + +-- | A list of URIs pointing at paired end FASTQ files in Google Cloud +-- Storage which will be aligned. The second of each paired file should be +-- specified here, in an order that matches the first of each paired file +-- specified in firstSourceUris. For example: firstSourceUris: [file1_1.fq, +-- file2_1.fq], secondSourceUris: [file1_2.fq, file2_2.fq]. The caller must +-- have READ permissions for these files. +pfsSecondSourceUris :: Lens' PairedFastqSource [Text] +pfsSecondSourceUris + = lens _pfsSecondSourceUris + (\ s a -> s{_pfsSecondSourceUris = a}) + . _Default + . _Coerce + +instance FromJSON PairedFastqSource where + parseJSON + = withObject "PairedFastqSource" + (\ o -> + PairedFastqSource <$> + (o .:? "firstSourceUris" .!= mempty) <*> + (o .:? "metadata") + <*> (o .:? "secondSourceUris" .!= mempty)) + +instance ToJSON PairedFastqSource where + toJSON PairedFastqSource{..} + = object + (catMaybes + [("firstSourceUris" .=) <$> _pfsFirstSourceUris, + ("metadata" .=) <$> _pfsMetadata, + ("secondSourceUris" .=) <$> _pfsSecondSourceUris]) + +-- | +-- +-- /See:/ 'searchReferencesRequest' smart constructor. +data SearchReferencesRequest = SearchReferencesRequest + { _sReferenceSetId :: !(Maybe Text) + , _sMd5checksums :: !(Maybe [Text]) + , _sAccessions :: !(Maybe [Text]) + , _sPageToken :: !(Maybe Text) + , _sPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReferencesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sReferenceSetId' +-- +-- * 'sMd5checksums' +-- +-- * 'sAccessions' +-- +-- * 'sPageToken' +-- +-- * 'sPageSize' +searchReferencesRequest + :: SearchReferencesRequest +searchReferencesRequest = + SearchReferencesRequest + { _sReferenceSetId = Nothing + , _sMd5checksums = Nothing + , _sAccessions = Nothing + , _sPageToken = Nothing + , _sPageSize = Nothing + } + +-- | If present, return only references which belong to this reference set. +sReferenceSetId :: Lens' SearchReferencesRequest (Maybe Text) +sReferenceSetId + = lens _sReferenceSetId + (\ s a -> s{_sReferenceSetId = a}) + +-- | If present, return references for which the md5checksum matches. See +-- Reference.md5checksum for construction details. +sMd5checksums :: Lens' SearchReferencesRequest [Text] +sMd5checksums + = lens _sMd5checksums + (\ s a -> s{_sMd5checksums = a}) + . _Default + . _Coerce + +-- | If present, return references for which the accession matches this +-- string. Best to give a version number, for example GCF_000001405.26. If +-- only the main accession number is given then all records with that main +-- accession will be returned, whichever version. Note that different +-- versions will have different sequences. +sAccessions :: Lens' SearchReferencesRequest [Text] +sAccessions + = lens _sAccessions (\ s a -> s{_sAccessions = a}) . + _Default + . _Coerce + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +sPageToken :: Lens' SearchReferencesRequest (Maybe Text) +sPageToken + = lens _sPageToken (\ s a -> s{_sPageToken = a}) + +-- | Specifies the maximum number of results to return in a single page. +sPageSize :: Lens' SearchReferencesRequest (Maybe Int32) +sPageSize + = lens _sPageSize (\ s a -> s{_sPageSize = a}) + +instance FromJSON SearchReferencesRequest where + parseJSON + = withObject "SearchReferencesRequest" + (\ o -> + SearchReferencesRequest <$> + (o .:? "referenceSetId") <*> + (o .:? "md5checksums" .!= mempty) + <*> (o .:? "accessions" .!= mempty) + <*> (o .:? "pageToken") + <*> (o .:? "pageSize")) + +instance ToJSON SearchReferencesRequest where + toJSON SearchReferencesRequest{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _sReferenceSetId, + ("md5checksums" .=) <$> _sMd5checksums, + ("accessions" .=) <$> _sAccessions, + ("pageToken" .=) <$> _sPageToken, + ("pageSize" .=) <$> _sPageSize]) + +-- | The read group set import response. +-- +-- /See:/ 'importReadGroupSetsResponse' smart constructor. +newtype ImportReadGroupSetsResponse = ImportReadGroupSetsResponse + { _irgsrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportReadGroupSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irgsrJobId' +importReadGroupSetsResponse + :: ImportReadGroupSetsResponse +importReadGroupSetsResponse = + ImportReadGroupSetsResponse + { _irgsrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +irgsrJobId :: Lens' ImportReadGroupSetsResponse (Maybe Text) +irgsrJobId + = lens _irgsrJobId (\ s a -> s{_irgsrJobId = a}) + +instance FromJSON ImportReadGroupSetsResponse where + parseJSON + = withObject "ImportReadGroupSetsResponse" + (\ o -> + ImportReadGroupSetsResponse <$> (o .:? "jobId")) + +instance ToJSON ImportReadGroupSetsResponse where + toJSON ImportReadGroupSetsResponse{..} + = object (catMaybes [("jobId" .=) <$> _irgsrJobId]) + +-- | The variant data export response. +-- +-- /See:/ 'exportVariantSetResponse' smart constructor. +newtype ExportVariantSetResponse = ExportVariantSetResponse + { _evsrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExportVariantSetResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'evsrJobId' +exportVariantSetResponse + :: ExportVariantSetResponse +exportVariantSetResponse = + ExportVariantSetResponse + { _evsrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +evsrJobId :: Lens' ExportVariantSetResponse (Maybe Text) +evsrJobId + = lens _evsrJobId (\ s a -> s{_evsrJobId = a}) + +instance FromJSON ExportVariantSetResponse where + parseJSON + = withObject "ExportVariantSetResponse" + (\ o -> ExportVariantSetResponse <$> (o .:? "jobId")) + +instance ToJSON ExportVariantSetResponse where + toJSON ExportVariantSetResponse{..} + = object (catMaybes [("jobId" .=) <$> _evsrJobId]) + +-- | The variant data import response. +-- +-- /See:/ 'importVariantsResponse' smart constructor. +newtype ImportVariantsResponse = ImportVariantsResponse + { _ivrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportVariantsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ivrJobId' +importVariantsResponse + :: ImportVariantsResponse +importVariantsResponse = + ImportVariantsResponse + { _ivrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +ivrJobId :: Lens' ImportVariantsResponse (Maybe Text) +ivrJobId = lens _ivrJobId (\ s a -> s{_ivrJobId = a}) + +instance FromJSON ImportVariantsResponse where + parseJSON + = withObject "ImportVariantsResponse" + (\ o -> ImportVariantsResponse <$> (o .:? "jobId")) + +instance ToJSON ImportVariantsResponse where + toJSON ImportVariantsResponse{..} + = object (catMaybes [("jobId" .=) <$> _ivrJobId]) + +-- | A linear alignment can be represented by one CIGAR string. Describes the +-- mapped position and local alignment of the read to the reference. +-- +-- /See:/ 'linearAlignment' smart constructor. +data LinearAlignment = LinearAlignment + { _laCigar :: !(Maybe [Maybe CigarUnit]) + , _laMappingQuality :: !(Maybe Int32) + , _laPosition :: !(Maybe (Maybe Position)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LinearAlignment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laCigar' +-- +-- * 'laMappingQuality' +-- +-- * 'laPosition' +linearAlignment + :: LinearAlignment +linearAlignment = + LinearAlignment + { _laCigar = Nothing + , _laMappingQuality = Nothing + , _laPosition = Nothing + } + +-- | Represents the local alignment of this sequence (alignment matches, +-- indels, etc) against the reference. +laCigar :: Lens' LinearAlignment [Maybe CigarUnit] +laCigar + = lens _laCigar (\ s a -> s{_laCigar = a}) . _Default + . _Coerce + +-- | The mapping quality of this alignment. Represents how likely the read +-- maps to this position as opposed to other locations. +laMappingQuality :: Lens' LinearAlignment (Maybe Int32) +laMappingQuality + = lens _laMappingQuality + (\ s a -> s{_laMappingQuality = a}) + +-- | The position of this alignment. +laPosition :: Lens' LinearAlignment (Maybe (Maybe Position)) +laPosition + = lens _laPosition (\ s a -> s{_laPosition = a}) + +instance FromJSON LinearAlignment where + parseJSON + = withObject "LinearAlignment" + (\ o -> + LinearAlignment <$> + (o .:? "cigar" .!= mempty) <*> + (o .:? "mappingQuality") + <*> (o .:? "position")) + +instance ToJSON LinearAlignment where + toJSON LinearAlignment{..} + = object + (catMaybes + [("cigar" .=) <$> _laCigar, + ("mappingQuality" .=) <$> _laMappingQuality, + ("position" .=) <$> _laPosition]) + +-- | The read group set align response. +-- +-- /See:/ 'alignReadGroupSetsResponse' smart constructor. +newtype AlignReadGroupSetsResponse = AlignReadGroupSetsResponse + { _argsrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AlignReadGroupSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argsrJobId' +alignReadGroupSetsResponse + :: AlignReadGroupSetsResponse +alignReadGroupSetsResponse = + AlignReadGroupSetsResponse + { _argsrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +argsrJobId :: Lens' AlignReadGroupSetsResponse (Maybe Text) +argsrJobId + = lens _argsrJobId (\ s a -> s{_argsrJobId = a}) + +instance FromJSON AlignReadGroupSetsResponse where + parseJSON + = withObject "AlignReadGroupSetsResponse" + (\ o -> + AlignReadGroupSetsResponse <$> (o .:? "jobId")) + +instance ToJSON AlignReadGroupSetsResponse where + toJSON AlignReadGroupSetsResponse{..} + = object (catMaybes [("jobId" .=) <$> _argsrJobId]) + +-- +-- /See:/ 'listCoverageBucketsResponse' smart constructor. +data ListCoverageBucketsResponse = ListCoverageBucketsResponse + { _lcbrNextPageToken :: !(Maybe Text) + , _lcbrBucketWidth :: !(Maybe Int64) + , _lcbrCoverageBuckets :: !(Maybe [Maybe CoverageBucket]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListCoverageBucketsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcbrNextPageToken' +-- +-- * 'lcbrBucketWidth' +-- +-- * 'lcbrCoverageBuckets' +listCoverageBucketsResponse + :: ListCoverageBucketsResponse +listCoverageBucketsResponse = + ListCoverageBucketsResponse + { _lcbrNextPageToken = Nothing + , _lcbrBucketWidth = Nothing + , _lcbrCoverageBuckets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +lcbrNextPageToken :: Lens' ListCoverageBucketsResponse (Maybe Text) +lcbrNextPageToken + = lens _lcbrNextPageToken + (\ s a -> s{_lcbrNextPageToken = a}) + +-- | The length of each coverage bucket in base pairs. Note that buckets at +-- the end of a reference sequence may be shorter. This value is omitted if +-- the bucket width is infinity (the default behaviour, with no range or +-- targetBucketWidth). +lcbrBucketWidth :: Lens' ListCoverageBucketsResponse (Maybe Int64) +lcbrBucketWidth + = lens _lcbrBucketWidth + (\ s a -> s{_lcbrBucketWidth = a}) + +-- | The coverage buckets. The list of buckets is sparse; a bucket with 0 +-- overlapping reads is not returned. A bucket never crosses more than one +-- reference sequence. Each bucket has width bucketWidth, unless its end is +-- the end of the reference sequence. +lcbrCoverageBuckets :: Lens' ListCoverageBucketsResponse [Maybe CoverageBucket] +lcbrCoverageBuckets + = lens _lcbrCoverageBuckets + (\ s a -> s{_lcbrCoverageBuckets = a}) + . _Default + . _Coerce + +instance FromJSON ListCoverageBucketsResponse where + parseJSON + = withObject "ListCoverageBucketsResponse" + (\ o -> + ListCoverageBucketsResponse <$> + (o .:? "nextPageToken") <*> (o .:? "bucketWidth") <*> + (o .:? "coverageBuckets" .!= mempty)) + +instance ToJSON ListCoverageBucketsResponse where + toJSON ListCoverageBucketsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lcbrNextPageToken, + ("bucketWidth" .=) <$> _lcbrBucketWidth, + ("coverageBuckets" .=) <$> _lcbrCoverageBuckets]) + +-- | The read group set call response. +-- +-- /See:/ 'callReadGroupSetsResponse' smart constructor. +newtype CallReadGroupSetsResponse = CallReadGroupSetsResponse + { _crgsrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallReadGroupSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crgsrJobId' +callReadGroupSetsResponse + :: CallReadGroupSetsResponse +callReadGroupSetsResponse = + CallReadGroupSetsResponse + { _crgsrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +crgsrJobId :: Lens' CallReadGroupSetsResponse (Maybe Text) +crgsrJobId + = lens _crgsrJobId (\ s a -> s{_crgsrJobId = a}) + +instance FromJSON CallReadGroupSetsResponse where + parseJSON + = withObject "CallReadGroupSetsResponse" + (\ o -> + CallReadGroupSetsResponse <$> (o .:? "jobId")) + +instance ToJSON CallReadGroupSetsResponse where + toJSON CallReadGroupSetsResponse{..} + = object (catMaybes [("jobId" .=) <$> _crgsrJobId]) + +-- | An annotation set is a logical grouping of annotations that share +-- consistent type information and provenance. Examples of annotation sets +-- include \'all genes from refseq\', and \'all variant annotations from +-- ClinVar\'. +-- +-- /See:/ 'annotationSet' smart constructor. +data AnnotationSet = AnnotationSet + { _asReferenceSetId :: !(Maybe Text) + , _asName :: !(Maybe Text) + , _asDatasetId :: !(Maybe Text) + , _asId :: !(Maybe Text) + , _asType :: !(Maybe Text) + , _asSourceUri :: !(Maybe Text) + , _asInfo :: !(Maybe AnnotationSetInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asReferenceSetId' +-- +-- * 'asName' +-- +-- * 'asDatasetId' +-- +-- * 'asId' +-- +-- * 'asType' +-- +-- * 'asSourceUri' +-- +-- * 'asInfo' +annotationSet + :: AnnotationSet +annotationSet = + AnnotationSet + { _asReferenceSetId = Nothing + , _asName = Nothing + , _asDatasetId = Nothing + , _asId = Nothing + , _asType = Nothing + , _asSourceUri = Nothing + , _asInfo = Nothing + } + +-- | The ID of the reference set that defines the coordinate space for this +-- set\'s annotations. +asReferenceSetId :: Lens' AnnotationSet (Maybe Text) +asReferenceSetId + = lens _asReferenceSetId + (\ s a -> s{_asReferenceSetId = a}) + +-- | The display name for this annotation set. +asName :: Lens' AnnotationSet (Maybe Text) +asName = lens _asName (\ s a -> s{_asName = a}) + +-- | The ID of the containing dataset. +asDatasetId :: Lens' AnnotationSet (Maybe Text) +asDatasetId + = lens _asDatasetId (\ s a -> s{_asDatasetId = a}) + +-- | The generated unique ID for this annotation set. +asId :: Lens' AnnotationSet (Maybe Text) +asId = lens _asId (\ s a -> s{_asId = a}) + +-- | The type of annotations contained within this set. +asType :: Lens' AnnotationSet (Maybe Text) +asType = lens _asType (\ s a -> s{_asType = a}) + +-- | The source URI describing the file from which this annotation set was +-- generated, if any. +asSourceUri :: Lens' AnnotationSet (Maybe Text) +asSourceUri + = lens _asSourceUri (\ s a -> s{_asSourceUri = a}) + +-- | A string which maps to an array of values. +asInfo :: Lens' AnnotationSet (Maybe AnnotationSetInfo) +asInfo = lens _asInfo (\ s a -> s{_asInfo = a}) + +instance FromJSON AnnotationSet where + parseJSON + = withObject "AnnotationSet" + (\ o -> + AnnotationSet <$> + (o .:? "referenceSetId") <*> (o .:? "name") <*> + (o .:? "datasetId") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "sourceUri") + <*> (o .:? "info")) + +instance ToJSON AnnotationSet where + toJSON AnnotationSet{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _asReferenceSetId, + ("name" .=) <$> _asName, + ("datasetId" .=) <$> _asDatasetId, + ("id" .=) <$> _asId, ("type" .=) <$> _asType, + ("sourceUri" .=) <$> _asSourceUri, + ("info" .=) <$> _asInfo]) + +-- | Metadata describes a single piece of variant call metadata. These data +-- include a top level key and either a single value string (value) or a +-- list of key-value pairs (info.) Value and info are mutually exclusive. +-- +-- /See:/ 'metadata' smart constructor. +data Metadata = Metadata + { _mValue :: !(Maybe Text) + , _mKey :: !(Maybe Text) + , _mId :: !(Maybe Text) + , _mType :: !(Maybe Text) + , _mNumber :: !(Maybe Text) + , _mDescription :: !(Maybe Text) + , _mInfo :: !(Maybe MetadataInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Metadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mValue' +-- +-- * 'mKey' +-- +-- * 'mId' +-- +-- * 'mType' +-- +-- * 'mNumber' +-- +-- * 'mDescription' +-- +-- * 'mInfo' +metadata + :: Metadata +metadata = + Metadata + { _mValue = Nothing + , _mKey = Nothing + , _mId = Nothing + , _mType = Nothing + , _mNumber = Nothing + , _mDescription = Nothing + , _mInfo = Nothing + } + +-- | The value field for simple metadata +mValue :: Lens' Metadata (Maybe Text) +mValue = lens _mValue (\ s a -> s{_mValue = a}) + +-- | The top-level key. +mKey :: Lens' Metadata (Maybe Text) +mKey = lens _mKey (\ s a -> s{_mKey = a}) + +-- | User-provided ID field, not enforced by this API. Two or more pieces of +-- structured metadata with identical id and key fields are considered +-- equivalent. +mId :: Lens' Metadata (Maybe Text) +mId = lens _mId (\ s a -> s{_mId = a}) + +-- | The type of data. Possible types include: Integer, Float, Flag, +-- Character, and String. +mType :: Lens' Metadata (Maybe Text) +mType = lens _mType (\ s a -> s{_mType = a}) + +-- | The number of values that can be included in a field described by this +-- metadata. +mNumber :: Lens' Metadata (Maybe Text) +mNumber = lens _mNumber (\ s a -> s{_mNumber = a}) + +-- | A textual description of this metadata. +mDescription :: Lens' Metadata (Maybe Text) +mDescription + = lens _mDescription (\ s a -> s{_mDescription = a}) + +-- | A string which maps to an array of values. +mInfo :: Lens' Metadata (Maybe MetadataInfo) +mInfo = lens _mInfo (\ s a -> s{_mInfo = a}) + +instance FromJSON Metadata where + parseJSON + = withObject "Metadata" + (\ o -> + Metadata <$> + (o .:? "value") <*> (o .:? "key") <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "number") + <*> (o .:? "description") + <*> (o .:? "info")) + +instance ToJSON Metadata where + toJSON Metadata{..} + = object + (catMaybes + [("value" .=) <$> _mValue, ("key" .=) <$> _mKey, + ("id" .=) <$> _mId, ("type" .=) <$> _mType, + ("number" .=) <$> _mNumber, + ("description" .=) <$> _mDescription, + ("info" .=) <$> _mInfo]) + +-- | A variant set is a collection of call sets and variants. It contains +-- summary statistics of those contents. A variant set belongs to a +-- dataset. +-- +-- /See:/ 'variantSet' smart constructor. +data VariantSet = VariantSet + { _vsDatasetId :: !(Maybe Text) + , _vsReferenceBounds :: !(Maybe [Maybe ReferenceBound]) + , _vsMetadata :: !(Maybe [Maybe Metadata]) + , _vsId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsDatasetId' +-- +-- * 'vsReferenceBounds' +-- +-- * 'vsMetadata' +-- +-- * 'vsId' +variantSet + :: VariantSet +variantSet = + VariantSet + { _vsDatasetId = Nothing + , _vsReferenceBounds = Nothing + , _vsMetadata = Nothing + , _vsId = Nothing + } + +-- | The dataset to which this variant set belongs. Immutable. +vsDatasetId :: Lens' VariantSet (Maybe Text) +vsDatasetId + = lens _vsDatasetId (\ s a -> s{_vsDatasetId = a}) + +-- | A list of all references used by the variants in a variant set with +-- associated coordinate upper bounds for each one. +vsReferenceBounds :: Lens' VariantSet [Maybe ReferenceBound] +vsReferenceBounds + = lens _vsReferenceBounds + (\ s a -> s{_vsReferenceBounds = a}) + . _Default + . _Coerce + +-- | The metadata associated with this variant set. +vsMetadata :: Lens' VariantSet [Maybe Metadata] +vsMetadata + = lens _vsMetadata (\ s a -> s{_vsMetadata = a}) . + _Default + . _Coerce + +-- | The Google-generated ID of the variant set. Immutable. +vsId :: Lens' VariantSet (Maybe Text) +vsId = lens _vsId (\ s a -> s{_vsId = a}) + +instance FromJSON VariantSet where + parseJSON + = withObject "VariantSet" + (\ o -> + VariantSet <$> + (o .:? "datasetId") <*> + (o .:? "referenceBounds" .!= mempty) + <*> (o .:? "metadata" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON VariantSet where + toJSON VariantSet{..} + = object + (catMaybes + [("datasetId" .=) <$> _vsDatasetId, + ("referenceBounds" .=) <$> _vsReferenceBounds, + ("metadata" .=) <$> _vsMetadata, + ("id" .=) <$> _vsId]) + +-- | A single CIGAR operation. +-- +-- /See:/ 'cigarUnit' smart constructor. +data CigarUnit = CigarUnit + { _cuOperation :: !(Maybe Text) + , _cuOperationLength :: !(Maybe Int64) + , _cuReferenceSequence :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CigarUnit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuOperation' +-- +-- * 'cuOperationLength' +-- +-- * 'cuReferenceSequence' +cigarUnit + :: CigarUnit +cigarUnit = + CigarUnit + { _cuOperation = Nothing + , _cuOperationLength = Nothing + , _cuReferenceSequence = Nothing + } + +cuOperation :: Lens' CigarUnit (Maybe Text) +cuOperation + = lens _cuOperation (\ s a -> s{_cuOperation = a}) + +-- | The number of bases that the operation runs for. Required. +cuOperationLength :: Lens' CigarUnit (Maybe Int64) +cuOperationLength + = lens _cuOperationLength + (\ s a -> s{_cuOperationLength = a}) + +-- | referenceSequence is only used at mismatches (SEQUENCE_MISMATCH) and +-- deletions (DELETE). Filling this field replaces SAM\'s MD tag. If the +-- relevant information is not available, this field is unset. +cuReferenceSequence :: Lens' CigarUnit (Maybe Text) +cuReferenceSequence + = lens _cuReferenceSequence + (\ s a -> s{_cuReferenceSequence = a}) + +instance FromJSON CigarUnit where + parseJSON + = withObject "CigarUnit" + (\ o -> + CigarUnit <$> + (o .:? "operation") <*> (o .:? "operationLength") <*> + (o .:? "referenceSequence")) + +instance ToJSON CigarUnit where + toJSON CigarUnit{..} + = object + (catMaybes + [("operation" .=) <$> _cuOperation, + ("operationLength" .=) <$> _cuOperationLength, + ("referenceSequence" .=) <$> _cuReferenceSequence]) + +-- | The read group set align request. +-- +-- /See:/ 'alignReadGroupSetsRequest' smart constructor. +data AlignReadGroupSetsRequest = AlignReadGroupSetsRequest + { _argsrInterleavedFastqSource :: !(Maybe (Maybe InterleavedFastqSource)) + , _argsrReadGroupSetId :: !(Maybe Text) + , _argsrBamSourceUris :: !(Maybe [Text]) + , _argsrPairedFastqSource :: !(Maybe (Maybe PairedFastqSource)) + , _argsrDatasetId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AlignReadGroupSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'argsrInterleavedFastqSource' +-- +-- * 'argsrReadGroupSetId' +-- +-- * 'argsrBamSourceUris' +-- +-- * 'argsrPairedFastqSource' +-- +-- * 'argsrDatasetId' +alignReadGroupSetsRequest + :: AlignReadGroupSetsRequest +alignReadGroupSetsRequest = + AlignReadGroupSetsRequest + { _argsrInterleavedFastqSource = Nothing + , _argsrReadGroupSetId = Nothing + , _argsrBamSourceUris = Nothing + , _argsrPairedFastqSource = Nothing + , _argsrDatasetId = Nothing + } + +-- | The interleaved FASTQ source files for alignment, where both members of +-- each pair of reads are found on consecutive records within the same +-- FASTQ file. Exactly one of readGroupSetId, bamSourceUris, +-- interleavedFastqSource or pairedFastqSource must be provided. +argsrInterleavedFastqSource :: Lens' AlignReadGroupSetsRequest (Maybe (Maybe InterleavedFastqSource)) +argsrInterleavedFastqSource + = lens _argsrInterleavedFastqSource + (\ s a -> s{_argsrInterleavedFastqSource = a}) + +-- | The ID of the read group set which will be aligned. A new read group set +-- will be generated to hold the aligned data, the originals will not be +-- modified. The caller must have READ permissions for this read group set. +-- Exactly one of readGroupSetId, bamSourceUris, interleavedFastqSource or +-- pairedFastqSource must be provided. +argsrReadGroupSetId :: Lens' AlignReadGroupSetsRequest (Maybe Text) +argsrReadGroupSetId + = lens _argsrReadGroupSetId + (\ s a -> s{_argsrReadGroupSetId = a}) + +-- | The BAM source files for alignment. Exactly one of readGroupSetId, +-- bamSourceUris, interleavedFastqSource or pairedFastqSource must be +-- provided. The caller must have READ permissions for these files. +argsrBamSourceUris :: Lens' AlignReadGroupSetsRequest [Text] +argsrBamSourceUris + = lens _argsrBamSourceUris + (\ s a -> s{_argsrBamSourceUris = a}) + . _Default + . _Coerce + +-- | The paired end FASTQ source files for alignment, where each member of a +-- pair of reads are found in separate files. Exactly one of +-- readGroupSetId, bamSourceUris, interleavedFastqSource or +-- pairedFastqSource must be provided. +argsrPairedFastqSource :: Lens' AlignReadGroupSetsRequest (Maybe (Maybe PairedFastqSource)) +argsrPairedFastqSource + = lens _argsrPairedFastqSource + (\ s a -> s{_argsrPairedFastqSource = a}) + +-- | Required. The ID of the dataset the newly aligned read group sets will +-- belong to. The caller must have WRITE permissions to this dataset. +argsrDatasetId :: Lens' AlignReadGroupSetsRequest (Maybe Text) +argsrDatasetId + = lens _argsrDatasetId + (\ s a -> s{_argsrDatasetId = a}) + +instance FromJSON AlignReadGroupSetsRequest where + parseJSON + = withObject "AlignReadGroupSetsRequest" + (\ o -> + AlignReadGroupSetsRequest <$> + (o .:? "interleavedFastqSource") <*> + (o .:? "readGroupSetId") + <*> (o .:? "bamSourceUris" .!= mempty) + <*> (o .:? "pairedFastqSource") + <*> (o .:? "datasetId")) + +instance ToJSON AlignReadGroupSetsRequest where + toJSON AlignReadGroupSetsRequest{..} + = object + (catMaybes + [("interleavedFastqSource" .=) <$> + _argsrInterleavedFastqSource, + ("readGroupSetId" .=) <$> _argsrReadGroupSetId, + ("bamSourceUris" .=) <$> _argsrBamSourceUris, + ("pairedFastqSource" .=) <$> _argsrPairedFastqSource, + ("datasetId" .=) <$> _argsrDatasetId]) + +-- | The variant data export request. +-- +-- /See:/ 'exportVariantSetRequest' smart constructor. +data ExportVariantSetRequest = ExportVariantSetRequest + { _evsrBigqueryDataset :: !(Maybe Text) + , _evsrBigqueryTable :: !(Maybe Text) + , _evsrFormat :: !(Maybe Text) + , _evsrProjectNumber :: !(Maybe Int64) + , _evsrCallSetIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExportVariantSetRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'evsrBigqueryDataset' +-- +-- * 'evsrBigqueryTable' +-- +-- * 'evsrFormat' +-- +-- * 'evsrProjectNumber' +-- +-- * 'evsrCallSetIds' +exportVariantSetRequest + :: ExportVariantSetRequest +exportVariantSetRequest = + ExportVariantSetRequest + { _evsrBigqueryDataset = Nothing + , _evsrBigqueryTable = Nothing + , _evsrFormat = Nothing + , _evsrProjectNumber = Nothing + , _evsrCallSetIds = Nothing + } + +-- | Required. The BigQuery dataset to export data to. This dataset must +-- already exist. Note that this is distinct from the Genomics concept of +-- \"dataset\". +evsrBigqueryDataset :: Lens' ExportVariantSetRequest (Maybe Text) +evsrBigqueryDataset + = lens _evsrBigqueryDataset + (\ s a -> s{_evsrBigqueryDataset = a}) + +-- | Required. The BigQuery table to export data to. If the table doesn\'t +-- exist, it will be created. If it already exists, it will be overwritten. +evsrBigqueryTable :: Lens' ExportVariantSetRequest (Maybe Text) +evsrBigqueryTable + = lens _evsrBigqueryTable + (\ s a -> s{_evsrBigqueryTable = a}) + +-- | The format for the exported data. +evsrFormat :: Lens' ExportVariantSetRequest (Maybe Text) +evsrFormat + = lens _evsrFormat (\ s a -> s{_evsrFormat = a}) + +-- | Required. The Google Cloud project number that owns the destination +-- BigQuery dataset. The caller must have WRITE access to this project. +-- This project will also own the resulting export job. +evsrProjectNumber :: Lens' ExportVariantSetRequest (Maybe Int64) +evsrProjectNumber + = lens _evsrProjectNumber + (\ s a -> s{_evsrProjectNumber = a}) + +-- | If provided, only variant call information from the specified call sets +-- will be exported. By default all variant calls are exported. +evsrCallSetIds :: Lens' ExportVariantSetRequest [Text] +evsrCallSetIds + = lens _evsrCallSetIds + (\ s a -> s{_evsrCallSetIds = a}) + . _Default + . _Coerce + +instance FromJSON ExportVariantSetRequest where + parseJSON + = withObject "ExportVariantSetRequest" + (\ o -> + ExportVariantSetRequest <$> + (o .:? "bigqueryDataset") <*> (o .:? "bigqueryTable") + <*> (o .:? "format") + <*> (o .:? "projectNumber") + <*> (o .:? "callSetIds" .!= mempty)) + +instance ToJSON ExportVariantSetRequest where + toJSON ExportVariantSetRequest{..} + = object + (catMaybes + [("bigqueryDataset" .=) <$> _evsrBigqueryDataset, + ("bigqueryTable" .=) <$> _evsrBigqueryTable, + ("format" .=) <$> _evsrFormat, + ("projectNumber" .=) <$> _evsrProjectNumber, + ("callSetIds" .=) <$> _evsrCallSetIds]) + +-- | The variant data import request. +-- +-- /See:/ 'importVariantsRequest' smart constructor. +data ImportVariantsRequest = ImportVariantsRequest + { _ivrFormat :: !(Maybe Text) + , _ivrNormalizeReferenceNames :: !(Maybe Bool) + , _ivrSourceUris :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportVariantsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ivrFormat' +-- +-- * 'ivrNormalizeReferenceNames' +-- +-- * 'ivrSourceUris' +importVariantsRequest + :: ImportVariantsRequest +importVariantsRequest = + ImportVariantsRequest + { _ivrFormat = Nothing + , _ivrNormalizeReferenceNames = Nothing + , _ivrSourceUris = Nothing + } + +-- | The format of the variant data being imported. If unspecified, defaults +-- to to \"VCF\". +ivrFormat :: Lens' ImportVariantsRequest (Maybe Text) +ivrFormat + = lens _ivrFormat (\ s a -> s{_ivrFormat = a}) + +-- | Convert reference names to the canonical representation. hg19 +-- haploytypes (those reference names containing \"_hap\") are not modified +-- in any way. All other reference names are modified according to the +-- following rules: The reference name is capitalized. The \"chr\" prefix +-- is dropped for all autosomes and sex chromsomes. For example \"chr17\" +-- becomes \"17\" and \"chrX\" becomes \"X\". All mitochondrial chromosomes +-- (\"chrM\", \"chrMT\", etc) become \"MT\". +ivrNormalizeReferenceNames :: Lens' ImportVariantsRequest (Maybe Bool) +ivrNormalizeReferenceNames + = lens _ivrNormalizeReferenceNames + (\ s a -> s{_ivrNormalizeReferenceNames = a}) + +-- | A list of URIs referencing variant files in Google Cloud Storage. URIs +-- can include wildcards as described here. Note that recursive wildcards +-- (\'**\') are not supported. +ivrSourceUris :: Lens' ImportVariantsRequest [Text] +ivrSourceUris + = lens _ivrSourceUris + (\ s a -> s{_ivrSourceUris = a}) + . _Default + . _Coerce + +instance FromJSON ImportVariantsRequest where + parseJSON + = withObject "ImportVariantsRequest" + (\ o -> + ImportVariantsRequest <$> + (o .:? "format") <*> + (o .:? "normalizeReferenceNames") + <*> (o .:? "sourceUris" .!= mempty)) + +instance ToJSON ImportVariantsRequest where + toJSON ImportVariantsRequest{..} + = object + (catMaybes + [("format" .=) <$> _ivrFormat, + ("normalizeReferenceNames" .=) <$> + _ivrNormalizeReferenceNames, + ("sourceUris" .=) <$> _ivrSourceUris]) + +-- | +-- +-- /See:/ 'externalId' smart constructor. +data ExternalId = ExternalId + { _eiSourceName :: !(Maybe Text) + , _eiId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExternalId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eiSourceName' +-- +-- * 'eiId' +externalId + :: ExternalId +externalId = + ExternalId + { _eiSourceName = Nothing + , _eiId = Nothing + } + +-- | The name of the source of this data. +eiSourceName :: Lens' ExternalId (Maybe Text) +eiSourceName + = lens _eiSourceName (\ s a -> s{_eiSourceName = a}) + +-- | The id used by the source of this data. +eiId :: Lens' ExternalId (Maybe Text) +eiId = lens _eiId (\ s a -> s{_eiId = a}) + +instance FromJSON ExternalId where + parseJSON + = withObject "ExternalId" + (\ o -> + ExternalId <$> (o .:? "sourceName") <*> (o .:? "id")) + +instance ToJSON ExternalId where + toJSON ExternalId{..} + = object + (catMaybes + [("sourceName" .=) <$> _eiSourceName, + ("id" .=) <$> _eiId]) + +-- | The read group set import request. +-- +-- /See:/ 'importReadGroupSetsRequest' smart constructor. +data ImportReadGroupSetsRequest = ImportReadGroupSetsRequest + { _irgsrReferenceSetId :: !(Maybe Text) + , _irgsrDatasetId :: !(Maybe Text) + , _irgsrSourceUris :: !(Maybe [Text]) + , _irgsrPartitionStrategy :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportReadGroupSetsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irgsrReferenceSetId' +-- +-- * 'irgsrDatasetId' +-- +-- * 'irgsrSourceUris' +-- +-- * 'irgsrPartitionStrategy' +importReadGroupSetsRequest + :: ImportReadGroupSetsRequest +importReadGroupSetsRequest = + ImportReadGroupSetsRequest + { _irgsrReferenceSetId = Nothing + , _irgsrDatasetId = Nothing + , _irgsrSourceUris = Nothing + , _irgsrPartitionStrategy = Nothing + } + +-- | The reference set to which the imported read group sets are aligned to, +-- if any. The reference names of this reference set must be a superset of +-- those found in the imported file headers. If no reference set id is +-- provided, a best effort is made to associate with a matching reference +-- set. +irgsrReferenceSetId :: Lens' ImportReadGroupSetsRequest (Maybe Text) +irgsrReferenceSetId + = lens _irgsrReferenceSetId + (\ s a -> s{_irgsrReferenceSetId = a}) + +-- | Required. The ID of the dataset these read group sets will belong to. +-- The caller must have WRITE permissions to this dataset. +irgsrDatasetId :: Lens' ImportReadGroupSetsRequest (Maybe Text) +irgsrDatasetId + = lens _irgsrDatasetId + (\ s a -> s{_irgsrDatasetId = a}) + +-- | A list of URIs pointing at BAM files in Google Cloud Storage. +irgsrSourceUris :: Lens' ImportReadGroupSetsRequest [Text] +irgsrSourceUris + = lens _irgsrSourceUris + (\ s a -> s{_irgsrSourceUris = a}) + . _Default + . _Coerce + +-- | The partition strategy describes how read groups are partitioned into +-- read group sets. +irgsrPartitionStrategy :: Lens' ImportReadGroupSetsRequest (Maybe Text) +irgsrPartitionStrategy + = lens _irgsrPartitionStrategy + (\ s a -> s{_irgsrPartitionStrategy = a}) + +instance FromJSON ImportReadGroupSetsRequest where + parseJSON + = withObject "ImportReadGroupSetsRequest" + (\ o -> + ImportReadGroupSetsRequest <$> + (o .:? "referenceSetId") <*> (o .:? "datasetId") <*> + (o .:? "sourceUris" .!= mempty) + <*> (o .:? "partitionStrategy")) + +instance ToJSON ImportReadGroupSetsRequest where + toJSON ImportReadGroupSetsRequest{..} + = object + (catMaybes + [("referenceSetId" .=) <$> _irgsrReferenceSetId, + ("datasetId" .=) <$> _irgsrDatasetId, + ("sourceUris" .=) <$> _irgsrSourceUris, + ("partitionStrategy" .=) <$> + _irgsrPartitionStrategy]) + +-- | The dataset list response. +-- +-- /See:/ 'listDatasetsResponse' smart constructor. +data ListDatasetsResponse = ListDatasetsResponse + { _ldrNextPageToken :: !(Maybe Text) + , _ldrDatasets :: !(Maybe [Maybe Dataset]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListDatasetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldrNextPageToken' +-- +-- * 'ldrDatasets' +listDatasetsResponse + :: ListDatasetsResponse +listDatasetsResponse = + ListDatasetsResponse + { _ldrNextPageToken = Nothing + , _ldrDatasets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +ldrNextPageToken :: Lens' ListDatasetsResponse (Maybe Text) +ldrNextPageToken + = lens _ldrNextPageToken + (\ s a -> s{_ldrNextPageToken = a}) + +-- | The list of matching Datasets. +ldrDatasets :: Lens' ListDatasetsResponse [Maybe Dataset] +ldrDatasets + = lens _ldrDatasets (\ s a -> s{_ldrDatasets = a}) . + _Default + . _Coerce + +instance FromJSON ListDatasetsResponse where + parseJSON + = withObject "ListDatasetsResponse" + (\ o -> + ListDatasetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "datasets" .!= mempty)) + +instance ToJSON ListDatasetsResponse where + toJSON ListDatasetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ldrNextPageToken, + ("datasets" .=) <$> _ldrDatasets]) + +-- | +-- +-- /See:/ 'variantAnnotationCondition' smart constructor. +data VariantAnnotationCondition = VariantAnnotationCondition + { _vacExternalIds :: !(Maybe [Maybe ExternalId]) + , _vacNames :: !(Maybe [Text]) + , _vacConceptId :: !(Maybe Text) + , _vacOmimId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantAnnotationCondition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vacExternalIds' +-- +-- * 'vacNames' +-- +-- * 'vacConceptId' +-- +-- * 'vacOmimId' +variantAnnotationCondition + :: VariantAnnotationCondition +variantAnnotationCondition = + VariantAnnotationCondition + { _vacExternalIds = Nothing + , _vacNames = Nothing + , _vacConceptId = Nothing + , _vacOmimId = Nothing + } + +-- | The set of external IDs for this condition. +vacExternalIds :: Lens' VariantAnnotationCondition [Maybe ExternalId] +vacExternalIds + = lens _vacExternalIds + (\ s a -> s{_vacExternalIds = a}) + . _Default + . _Coerce + +-- | A set of names for the condition. +vacNames :: Lens' VariantAnnotationCondition [Text] +vacNames + = lens _vacNames (\ s a -> s{_vacNames = a}) . + _Default + . _Coerce + +-- | The MedGen concept id associated with this gene. Search for these IDs at +-- http:\/\/www.ncbi.nlm.nih.gov\/medgen\/ +vacConceptId :: Lens' VariantAnnotationCondition (Maybe Text) +vacConceptId + = lens _vacConceptId (\ s a -> s{_vacConceptId = a}) + +-- | The OMIM id for this condition. Search for these IDs at +-- http:\/\/omim.org\/ +vacOmimId :: Lens' VariantAnnotationCondition (Maybe Text) +vacOmimId + = lens _vacOmimId (\ s a -> s{_vacOmimId = a}) + +instance FromJSON VariantAnnotationCondition where + parseJSON + = withObject "VariantAnnotationCondition" + (\ o -> + VariantAnnotationCondition <$> + (o .:? "externalIds" .!= mempty) <*> + (o .:? "names" .!= mempty) + <*> (o .:? "conceptId") + <*> (o .:? "omimId")) + +instance ToJSON VariantAnnotationCondition where + toJSON VariantAnnotationCondition{..} + = object + (catMaybes + [("externalIds" .=) <$> _vacExternalIds, + ("names" .=) <$> _vacNames, + ("conceptId" .=) <$> _vacConceptId, + ("omimId" .=) <$> _vacOmimId]) + +-- | The search variant sets response. +-- +-- /See:/ 'searchVariantSetsResponse' smart constructor. +data SearchVariantSetsResponse = SearchVariantSetsResponse + { _svsrNextPageToken :: !(Maybe Text) + , _svsrVariantSets :: !(Maybe [Maybe VariantSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchVariantSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svsrNextPageToken' +-- +-- * 'svsrVariantSets' +searchVariantSetsResponse + :: SearchVariantSetsResponse +searchVariantSetsResponse = + SearchVariantSetsResponse + { _svsrNextPageToken = Nothing + , _svsrVariantSets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +svsrNextPageToken :: Lens' SearchVariantSetsResponse (Maybe Text) +svsrNextPageToken + = lens _svsrNextPageToken + (\ s a -> s{_svsrNextPageToken = a}) + +-- | The variant sets belonging to the requested dataset. +svsrVariantSets :: Lens' SearchVariantSetsResponse [Maybe VariantSet] +svsrVariantSets + = lens _svsrVariantSets + (\ s a -> s{_svsrVariantSets = a}) + . _Default + . _Coerce + +instance FromJSON SearchVariantSetsResponse where + parseJSON + = withObject "SearchVariantSetsResponse" + (\ o -> + SearchVariantSetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "variantSets" .!= mempty)) + +instance ToJSON SearchVariantSetsResponse where + toJSON SearchVariantSetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _svsrNextPageToken, + ("variantSets" .=) <$> _svsrVariantSets]) + +-- | The variant search request. +-- +-- /See:/ 'searchVariantsRequest' smart constructor. +data SearchVariantsRequest = SearchVariantsRequest + { _svrStart :: !(Maybe Int64) + , _svrCallSetIds :: !(Maybe [Text]) + , _svrReferenceName :: !(Maybe Text) + , _svrEnd :: !(Maybe Int64) + , _svrMaxCalls :: !(Maybe Int32) + , _svrPageToken :: !(Maybe Text) + , _svrVariantName :: !(Maybe Text) + , _svrVariantSetIds :: !(Maybe [Text]) + , _svrPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchVariantsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svrStart' +-- +-- * 'svrCallSetIds' +-- +-- * 'svrReferenceName' +-- +-- * 'svrEnd' +-- +-- * 'svrMaxCalls' +-- +-- * 'svrPageToken' +-- +-- * 'svrVariantName' +-- +-- * 'svrVariantSetIds' +-- +-- * 'svrPageSize' +searchVariantsRequest + :: SearchVariantsRequest +searchVariantsRequest = + SearchVariantsRequest + { _svrStart = Nothing + , _svrCallSetIds = Nothing + , _svrReferenceName = Nothing + , _svrEnd = Nothing + , _svrMaxCalls = Nothing + , _svrPageToken = Nothing + , _svrVariantName = Nothing + , _svrVariantSetIds = Nothing + , _svrPageSize = Nothing + } + +-- | The beginning of the window (0-based, inclusive) for which overlapping +-- variants should be returned. If unspecified, defaults to 0. +svrStart :: Lens' SearchVariantsRequest (Maybe Int64) +svrStart = lens _svrStart (\ s a -> s{_svrStart = a}) + +-- | Only return variant calls which belong to call sets with these ids. +-- Leaving this blank returns all variant calls. If a variant has no calls +-- belonging to any of these call sets, it won\'t be returned at all. +-- Currently, variants with no calls from any call set will never be +-- returned. +svrCallSetIds :: Lens' SearchVariantsRequest [Text] +svrCallSetIds + = lens _svrCallSetIds + (\ s a -> s{_svrCallSetIds = a}) + . _Default + . _Coerce + +-- | Required. Only return variants in this reference sequence. +svrReferenceName :: Lens' SearchVariantsRequest (Maybe Text) +svrReferenceName + = lens _svrReferenceName + (\ s a -> s{_svrReferenceName = a}) + +-- | The end of the window, 0-based exclusive. If unspecified or 0, defaults +-- to the length of the reference. +svrEnd :: Lens' SearchVariantsRequest (Maybe Int64) +svrEnd = lens _svrEnd (\ s a -> s{_svrEnd = a}) + +-- | The maximum number of calls to return. However, at least one variant +-- will always be returned, even if it has more calls than this limit. If +-- unspecified, defaults to 5000. +svrMaxCalls :: Lens' SearchVariantsRequest (Maybe Int32) +svrMaxCalls + = lens _svrMaxCalls (\ s a -> s{_svrMaxCalls = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +svrPageToken :: Lens' SearchVariantsRequest (Maybe Text) +svrPageToken + = lens _svrPageToken (\ s a -> s{_svrPageToken = a}) + +-- | Only return variants which have exactly this name. +svrVariantName :: Lens' SearchVariantsRequest (Maybe Text) +svrVariantName + = lens _svrVariantName + (\ s a -> s{_svrVariantName = a}) + +-- | At most one variant set ID must be provided. Only variants from this +-- variant set will be returned. If omitted, a call set id must be included +-- in the request. +svrVariantSetIds :: Lens' SearchVariantsRequest [Text] +svrVariantSetIds + = lens _svrVariantSetIds + (\ s a -> s{_svrVariantSetIds = a}) + . _Default + . _Coerce + +-- | The maximum number of variants to return. If unspecified, defaults to +-- 5000. +svrPageSize :: Lens' SearchVariantsRequest (Maybe Int32) +svrPageSize + = lens _svrPageSize (\ s a -> s{_svrPageSize = a}) + +instance FromJSON SearchVariantsRequest where + parseJSON + = withObject "SearchVariantsRequest" + (\ o -> + SearchVariantsRequest <$> + (o .:? "start") <*> (o .:? "callSetIds" .!= mempty) + <*> (o .:? "referenceName") + <*> (o .:? "end") + <*> (o .:? "maxCalls") + <*> (o .:? "pageToken") + <*> (o .:? "variantName") + <*> (o .:? "variantSetIds" .!= mempty) + <*> (o .:? "pageSize")) + +instance ToJSON SearchVariantsRequest where + toJSON SearchVariantsRequest{..} + = object + (catMaybes + [("start" .=) <$> _svrStart, + ("callSetIds" .=) <$> _svrCallSetIds, + ("referenceName" .=) <$> _svrReferenceName, + ("end" .=) <$> _svrEnd, + ("maxCalls" .=) <$> _svrMaxCalls, + ("pageToken" .=) <$> _svrPageToken, + ("variantName" .=) <$> _svrVariantName, + ("variantSetIds" .=) <$> _svrVariantSetIds, + ("pageSize" .=) <$> _svrPageSize]) + +-- +-- /See:/ 'searchAnnotationsRequest' smart constructor. +data SearchAnnotationsRequest = SearchAnnotationsRequest + { _sarRange :: !(Maybe (Maybe QueryRange)) + , _sarPageToken :: !(Maybe Text) + , _sarAnnotationSetIds :: !(Maybe [Text]) + , _sarPageSize :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnnotationsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sarRange' +-- +-- * 'sarPageToken' +-- +-- * 'sarAnnotationSetIds' +-- +-- * 'sarPageSize' +searchAnnotationsRequest + :: SearchAnnotationsRequest +searchAnnotationsRequest = + SearchAnnotationsRequest + { _sarRange = Nothing + , _sarPageToken = Nothing + , _sarAnnotationSetIds = Nothing + , _sarPageSize = Nothing + } + +-- | If specified, this query matches only annotations that overlap this +-- range. +sarRange :: Lens' SearchAnnotationsRequest (Maybe (Maybe QueryRange)) +sarRange = lens _sarRange (\ s a -> s{_sarRange = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +sarPageToken :: Lens' SearchAnnotationsRequest (Maybe Text) +sarPageToken + = lens _sarPageToken (\ s a -> s{_sarPageToken = a}) + +-- | The annotation sets to search within. The caller must have READ access +-- to these annotation sets. Required. All queried annotation sets must +-- have the same type. +sarAnnotationSetIds :: Lens' SearchAnnotationsRequest [Text] +sarAnnotationSetIds + = lens _sarAnnotationSetIds + (\ s a -> s{_sarAnnotationSetIds = a}) + . _Default + . _Coerce + +-- | Specifies number of results to return in a single page. If unspecified, +-- it will default to 256. The maximum value is 2048. +sarPageSize :: Lens' SearchAnnotationsRequest (Maybe Int32) +sarPageSize + = lens _sarPageSize (\ s a -> s{_sarPageSize = a}) + +instance FromJSON SearchAnnotationsRequest where + parseJSON + = withObject "SearchAnnotationsRequest" + (\ o -> + SearchAnnotationsRequest <$> + (o .:? "range") <*> (o .:? "pageToken") <*> + (o .:? "annotationSetIds" .!= mempty) + <*> (o .:? "pageSize")) + +instance ToJSON SearchAnnotationsRequest where + toJSON SearchAnnotationsRequest{..} + = object + (catMaybes + [("range" .=) <$> _sarRange, + ("pageToken" .=) <$> _sarPageToken, + ("annotationSetIds" .=) <$> _sarAnnotationSetIds, + ("pageSize" .=) <$> _sarPageSize]) + +-- | The read group set export response. +-- +-- /See:/ 'exportReadGroupSetsResponse' smart constructor. +newtype ExportReadGroupSetsResponse = ExportReadGroupSetsResponse + { _ergsrJobId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExportReadGroupSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ergsrJobId' +exportReadGroupSetsResponse + :: ExportReadGroupSetsResponse +exportReadGroupSetsResponse = + ExportReadGroupSetsResponse + { _ergsrJobId = Nothing + } + +-- | A job ID that can be used to get status information. +ergsrJobId :: Lens' ExportReadGroupSetsResponse (Maybe Text) +ergsrJobId + = lens _ergsrJobId (\ s a -> s{_ergsrJobId = a}) + +instance FromJSON ExportReadGroupSetsResponse where + parseJSON + = withObject "ExportReadGroupSetsResponse" + (\ o -> + ExportReadGroupSetsResponse <$> (o .:? "jobId")) + +instance ToJSON ExportReadGroupSetsResponse where + toJSON ExportReadGroupSetsResponse{..} + = object (catMaybes [("jobId" .=) <$> _ergsrJobId]) + +-- +-- /See:/ 'searchAnnotationSetsResponse' smart constructor. +data SearchAnnotationSetsResponse = SearchAnnotationSetsResponse + { _sasrNextPageToken :: !(Maybe Text) + , _sasrAnnotationSets :: !(Maybe [Maybe AnnotationSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnnotationSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sasrNextPageToken' +-- +-- * 'sasrAnnotationSets' +searchAnnotationSetsResponse + :: SearchAnnotationSetsResponse +searchAnnotationSetsResponse = + SearchAnnotationSetsResponse + { _sasrNextPageToken = Nothing + , _sasrAnnotationSets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +sasrNextPageToken :: Lens' SearchAnnotationSetsResponse (Maybe Text) +sasrNextPageToken + = lens _sasrNextPageToken + (\ s a -> s{_sasrNextPageToken = a}) + +-- | The matching annotation sets. +sasrAnnotationSets :: Lens' SearchAnnotationSetsResponse [Maybe AnnotationSet] +sasrAnnotationSets + = lens _sasrAnnotationSets + (\ s a -> s{_sasrAnnotationSets = a}) + . _Default + . _Coerce + +instance FromJSON SearchAnnotationSetsResponse where + parseJSON + = withObject "SearchAnnotationSetsResponse" + (\ o -> + SearchAnnotationSetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "annotationSets" .!= mempty)) + +instance ToJSON SearchAnnotationSetsResponse where + toJSON SearchAnnotationSetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _sasrNextPageToken, + ("annotationSets" .=) <$> _sasrAnnotationSets]) + +-- | A 0-based half-open genomic coordinate range over a reference sequence, +-- for representing the position of a genomic resource. +-- +-- /See:/ 'rangePosition' smart constructor. +data RangePosition = RangePosition + { _rpStart :: !(Maybe Int64) + , _rpReverseStrand :: !(Maybe Bool) + , _rpReferenceId :: !(Maybe Text) + , _rpReferenceName :: !(Maybe Text) + , _rpEnd :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RangePosition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpStart' +-- +-- * 'rpReverseStrand' +-- +-- * 'rpReferenceId' +-- +-- * 'rpReferenceName' +-- +-- * 'rpEnd' +rangePosition + :: RangePosition +rangePosition = + RangePosition + { _rpStart = Nothing + , _rpReverseStrand = Nothing + , _rpReferenceId = Nothing + , _rpReferenceName = Nothing + , _rpEnd = Nothing + } + +-- | The start position of the range on the reference, 0-based inclusive. +rpStart :: Lens' RangePosition (Maybe Int64) +rpStart = lens _rpStart (\ s a -> s{_rpStart = a}) + +-- | Whether this range refers to the reverse strand, as opposed to the +-- forward strand. Note that regardless of this field, the start\/end +-- position of the range always refer to the forward strand. +rpReverseStrand :: Lens' RangePosition (Maybe Bool) +rpReverseStrand + = lens _rpReverseStrand + (\ s a -> s{_rpReverseStrand = a}) + +-- | The ID of the Google Genomics reference associated with this range. +rpReferenceId :: Lens' RangePosition (Maybe Text) +rpReferenceId + = lens _rpReferenceId + (\ s a -> s{_rpReferenceId = a}) + +-- | The display name corresponding to the reference specified by +-- referenceId, for example chr1, 1, or chrX. +rpReferenceName :: Lens' RangePosition (Maybe Text) +rpReferenceName + = lens _rpReferenceName + (\ s a -> s{_rpReferenceName = a}) + +-- | The end position of the range on the reference, 0-based exclusive. +rpEnd :: Lens' RangePosition (Maybe Int64) +rpEnd = lens _rpEnd (\ s a -> s{_rpEnd = a}) + +instance FromJSON RangePosition where + parseJSON + = withObject "RangePosition" + (\ o -> + RangePosition <$> + (o .:? "start") <*> (o .:? "reverseStrand") <*> + (o .:? "referenceId") + <*> (o .:? "referenceName") + <*> (o .:? "end")) + +instance ToJSON RangePosition where + toJSON RangePosition{..} + = object + (catMaybes + [("start" .=) <$> _rpStart, + ("reverseStrand" .=) <$> _rpReverseStrand, + ("referenceId" .=) <$> _rpReferenceId, + ("referenceName" .=) <$> _rpReferenceName, + ("end" .=) <$> _rpEnd]) + +-- | A transcript represents the assertion that a particular region of the +-- reference genome may be transcribed as RNA. +-- +-- /See:/ 'transcript' smart constructor. +data Transcript = Transcript + { _tGeneId :: !(Maybe Text) + , _tCodingSequence :: !(Maybe (Maybe TranscriptCodingSequence)) + , _tExons :: !(Maybe [Maybe TranscriptExon]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Transcript' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tGeneId' +-- +-- * 'tCodingSequence' +-- +-- * 'tExons' +transcript + :: Transcript +transcript = + Transcript + { _tGeneId = Nothing + , _tCodingSequence = Nothing + , _tExons = Nothing + } + +-- | The annotation ID of the gene from which this transcript is transcribed. +tGeneId :: Lens' Transcript (Maybe Text) +tGeneId = lens _tGeneId (\ s a -> s{_tGeneId = a}) + +-- | The range of the coding sequence for this transcript, if any. To +-- determine the exact ranges of coding sequence, intersect this range with +-- those of the exons, if any. If there are any exons, the codingSequence +-- must start and end within them. Note that in some cases, the reference +-- genome will not exactly match the observed mRNA transcript e.g. due to +-- variance in the source genome from reference. In these cases, exon.frame +-- will not necessarily match the expected reference reading frame and +-- coding exon reference bases cannot necessarily be concatenated to +-- produce the original transcript mRNA. +tCodingSequence :: Lens' Transcript (Maybe (Maybe TranscriptCodingSequence)) +tCodingSequence + = lens _tCodingSequence + (\ s a -> s{_tCodingSequence = a}) + +-- | The exons that compose this transcript. This field should be unset for +-- genomes where transcript splicing does not occur, for example +-- prokaryotes. Introns are regions of the transcript that are not included +-- in the spliced RNA product. Though not explicitly modeled here, intron +-- ranges can be deduced; all regions of this transcript that are not exons +-- are introns. Exonic sequences do not necessarily code for a +-- translational product (amino acids). Only the regions of exons bounded +-- by the codingSequence correspond to coding DNA sequence. Exons are +-- ordered by start position and may not overlap. +tExons :: Lens' Transcript [Maybe TranscriptExon] +tExons + = lens _tExons (\ s a -> s{_tExons = a}) . _Default . + _Coerce + +instance FromJSON Transcript where + parseJSON + = withObject "Transcript" + (\ o -> + Transcript <$> + (o .:? "geneId") <*> (o .:? "codingSequence") <*> + (o .:? "exons" .!= mempty)) + +instance ToJSON Transcript where + toJSON Transcript{..} + = object + (catMaybes + [("geneId" .=) <$> _tGeneId, + ("codingSequence" .=) <$> _tCodingSequence, + ("exons" .=) <$> _tExons]) + +-- | The read group set search response. +-- +-- /See:/ 'searchReadGroupSetsResponse' smart constructor. +data SearchReadGroupSetsResponse = SearchReadGroupSetsResponse + { _srgsrNextPageToken :: !(Maybe Text) + , _srgsrReadGroupSets :: !(Maybe [Maybe ReadGroupSet]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchReadGroupSetsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srgsrNextPageToken' +-- +-- * 'srgsrReadGroupSets' +searchReadGroupSetsResponse + :: SearchReadGroupSetsResponse +searchReadGroupSetsResponse = + SearchReadGroupSetsResponse + { _srgsrNextPageToken = Nothing + , _srgsrReadGroupSets = Nothing + } + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. This field will be empty if there aren\'t any additional +-- results. +srgsrNextPageToken :: Lens' SearchReadGroupSetsResponse (Maybe Text) +srgsrNextPageToken + = lens _srgsrNextPageToken + (\ s a -> s{_srgsrNextPageToken = a}) + +-- | The list of matching read group sets. +srgsrReadGroupSets :: Lens' SearchReadGroupSetsResponse [Maybe ReadGroupSet] +srgsrReadGroupSets + = lens _srgsrReadGroupSets + (\ s a -> s{_srgsrReadGroupSets = a}) + . _Default + . _Coerce + +instance FromJSON SearchReadGroupSetsResponse where + parseJSON + = withObject "SearchReadGroupSetsResponse" + (\ o -> + SearchReadGroupSetsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "readGroupSets" .!= mempty)) + +instance ToJSON SearchReadGroupSetsResponse where + toJSON SearchReadGroupSetsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _srgsrNextPageToken, + ("readGroupSets" .=) <$> _srgsrReadGroupSets]) + +-- | The job search response. +-- +-- /See:/ 'searchJobsResponse' smart constructor. +data SearchJobsResponse = SearchJobsResponse + { _sjrNextPageToken :: !(Maybe Text) + , _sjrJobs :: !(Maybe [Maybe Job]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchJobsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sjrNextPageToken' +-- +-- * 'sjrJobs' +searchJobsResponse + :: SearchJobsResponse +searchJobsResponse = + SearchJobsResponse + { _sjrNextPageToken = Nothing + , _sjrJobs = Nothing + } + +-- | The continuation token which is used to page through large result sets. +-- Provide this value is a subsequent request to return the next page of +-- results. This field will be empty if there are no more results. +sjrNextPageToken :: Lens' SearchJobsResponse (Maybe Text) +sjrNextPageToken + = lens _sjrNextPageToken + (\ s a -> s{_sjrNextPageToken = a}) + +-- | The list of jobs results, ordered newest to oldest. +sjrJobs :: Lens' SearchJobsResponse [Maybe Job] +sjrJobs + = lens _sjrJobs (\ s a -> s{_sjrJobs = a}) . _Default + . _Coerce + +instance FromJSON SearchJobsResponse where + parseJSON + = withObject "SearchJobsResponse" + (\ o -> + SearchJobsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "jobs" .!= mempty)) + +instance ToJSON SearchJobsResponse where + toJSON SearchJobsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _sjrNextPageToken, + ("jobs" .=) <$> _sjrJobs]) + +-- +-- /See:/ 'transcriptCodingSequence' smart constructor. +data TranscriptCodingSequence = TranscriptCodingSequence + { _tcsStart :: !(Maybe Int64) + , _tcsEnd :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TranscriptCodingSequence' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcsStart' +-- +-- * 'tcsEnd' +transcriptCodingSequence + :: TranscriptCodingSequence +transcriptCodingSequence = + TranscriptCodingSequence + { _tcsStart = Nothing + , _tcsEnd = Nothing + } + +-- | The start of the coding sequence on this annotation\'s reference +-- sequence, 0-based inclusive. Note that this position is relative to the +-- reference start, and not the containing annotation start. +tcsStart :: Lens' TranscriptCodingSequence (Maybe Int64) +tcsStart = lens _tcsStart (\ s a -> s{_tcsStart = a}) + +-- | The end of the coding sequence on this annotation\'s reference sequence, +-- 0-based exclusive. Note that this position is relative to the reference +-- start, and not the containing annotation start. +tcsEnd :: Lens' TranscriptCodingSequence (Maybe Int64) +tcsEnd = lens _tcsEnd (\ s a -> s{_tcsEnd = a}) + +instance FromJSON TranscriptCodingSequence where + parseJSON + = withObject "TranscriptCodingSequence" + (\ o -> + TranscriptCodingSequence <$> + (o .:? "start") <*> (o .:? "end")) + +instance ToJSON TranscriptCodingSequence where + toJSON TranscriptCodingSequence{..} + = object + (catMaybes + [("start" .=) <$> _tcsStart, ("end" .=) <$> _tcsEnd]) + +-- | An abstraction for referring to a genomic position, in relation to some +-- already known reference. For now, represents a genomic position as a +-- reference name, a base number on that reference (0-based), and a +-- determination of forward or reverse strand. +-- +-- /See:/ 'position' smart constructor. +data Position = Position + { _pReverseStrand :: !(Maybe Bool) + , _pReferenceName :: !(Maybe Text) + , _pPosition :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Position' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pReverseStrand' +-- +-- * 'pReferenceName' +-- +-- * 'pPosition' +position + :: Position +position = + Position + { _pReverseStrand = Nothing + , _pReferenceName = Nothing + , _pPosition = Nothing + } + +-- | Whether this position is on the reverse strand, as opposed to the +-- forward strand. +pReverseStrand :: Lens' Position (Maybe Bool) +pReverseStrand + = lens _pReverseStrand + (\ s a -> s{_pReverseStrand = a}) + +-- | The name of the reference in whatever reference set is being used. +pReferenceName :: Lens' Position (Maybe Text) +pReferenceName + = lens _pReferenceName + (\ s a -> s{_pReferenceName = a}) + +-- | The 0-based offset from the start of the forward strand for that +-- reference. +pPosition :: Lens' Position (Maybe Int64) +pPosition + = lens _pPosition (\ s a -> s{_pPosition = a}) + +instance FromJSON Position where + parseJSON + = withObject "Position" + (\ o -> + Position <$> + (o .:? "reverseStrand") <*> (o .:? "referenceName") + <*> (o .:? "position")) + +instance ToJSON Position where + toJSON Position{..} + = object + (catMaybes + [("reverseStrand" .=) <$> _pReverseStrand, + ("referenceName" .=) <$> _pReferenceName, + ("position" .=) <$> _pPosition]) + +-- | ReferenceBound records an upper bound for the starting coordinate of +-- variants in a particular reference. +-- +-- /See:/ 'referenceBound' smart constructor. +data ReferenceBound = ReferenceBound + { _rbUpperBound :: !(Maybe Int64) + , _rbReferenceName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferenceBound' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rbUpperBound' +-- +-- * 'rbReferenceName' +referenceBound + :: ReferenceBound +referenceBound = + ReferenceBound + { _rbUpperBound = Nothing + , _rbReferenceName = Nothing + } + +-- | An upper bound (inclusive) on the starting coordinate of any variant in +-- the reference sequence. +rbUpperBound :: Lens' ReferenceBound (Maybe Int64) +rbUpperBound + = lens _rbUpperBound (\ s a -> s{_rbUpperBound = a}) + +-- | The reference the bound is associate with. +rbReferenceName :: Lens' ReferenceBound (Maybe Text) +rbReferenceName + = lens _rbReferenceName + (\ s a -> s{_rbReferenceName = a}) + +instance FromJSON ReferenceBound where + parseJSON + = withObject "ReferenceBound" + (\ o -> + ReferenceBound <$> + (o .:? "upperBound") <*> (o .:? "referenceName")) + +instance ToJSON ReferenceBound where + toJSON ReferenceBound{..} + = object + (catMaybes + [("upperBound" .=) <$> _rbUpperBound, + ("referenceName" .=) <$> _rbReferenceName]) + +-- | A reference set is a set of references which typically comprise a +-- reference assembly for a species, such as GRCh38 which is representative +-- of the human genome. A reference set defines a common coordinate space +-- for comparing reference-aligned experimental data. A reference set +-- contains 1 or more references. +-- +-- /See:/ 'referenceSet' smart constructor. +data ReferenceSet = ReferenceSet + { _rsSourceAccessions :: !(Maybe [Text]) + , _rsReferenceIds :: !(Maybe [Text]) + , _rsMd5checksum :: !(Maybe Text) + , _rsNcbiTaxonId :: !(Maybe Int32) + , _rsId :: !(Maybe Text) + , _rsAssemblyId :: !(Maybe Text) + , _rsSourceURI :: !(Maybe Text) + , _rsDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferenceSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsSourceAccessions' +-- +-- * 'rsReferenceIds' +-- +-- * 'rsMd5checksum' +-- +-- * 'rsNcbiTaxonId' +-- +-- * 'rsId' +-- +-- * 'rsAssemblyId' +-- +-- * 'rsSourceURI' +-- +-- * 'rsDescription' +referenceSet + :: ReferenceSet +referenceSet = + ReferenceSet + { _rsSourceAccessions = Nothing + , _rsReferenceIds = Nothing + , _rsMd5checksum = Nothing + , _rsNcbiTaxonId = Nothing + , _rsId = Nothing + , _rsAssemblyId = Nothing + , _rsSourceURI = Nothing + , _rsDescription = Nothing + } + +-- | All known corresponding accession IDs in INSDC (GenBank\/ENA\/DDBJ) +-- ideally with a version number, for example NC_000001.11. +rsSourceAccessions :: Lens' ReferenceSet [Text] +rsSourceAccessions + = lens _rsSourceAccessions + (\ s a -> s{_rsSourceAccessions = a}) + . _Default + . _Coerce + +-- | The IDs of the reference objects that are part of this set. +-- Reference.md5checksum must be unique within this set. +rsReferenceIds :: Lens' ReferenceSet [Text] +rsReferenceIds + = lens _rsReferenceIds + (\ s a -> s{_rsReferenceIds = a}) + . _Default + . _Coerce + +-- | Order-independent MD5 checksum which identifies this reference set. The +-- checksum is computed by sorting all lower case hexidecimal string +-- reference.md5checksum (for all reference in this set) in ascending +-- lexicographic order, concatenating, and taking the MD5 of that value. +-- The resulting value is represented in lower case hexadecimal format. +rsMd5checksum :: Lens' ReferenceSet (Maybe Text) +rsMd5checksum + = lens _rsMd5checksum + (\ s a -> s{_rsMd5checksum = a}) + +-- | ID from http:\/\/www.ncbi.nlm.nih.gov\/taxonomy (e.g. 9606->human) +-- indicating the species which this assembly is intended to model. Note +-- that contained references may specify a different ncbiTaxonId, as +-- assemblies may contain reference sequences which do not belong to the +-- modeled species, e.g. EBV in a human reference genome. +rsNcbiTaxonId :: Lens' ReferenceSet (Maybe Int32) +rsNcbiTaxonId + = lens _rsNcbiTaxonId + (\ s a -> s{_rsNcbiTaxonId = a}) + +-- | The Google generated immutable ID of the reference set. +rsId :: Lens' ReferenceSet (Maybe Text) +rsId = lens _rsId (\ s a -> s{_rsId = a}) + +-- | Public id of this reference set, such as GRCh37. +rsAssemblyId :: Lens' ReferenceSet (Maybe Text) +rsAssemblyId + = lens _rsAssemblyId (\ s a -> s{_rsAssemblyId = a}) + +-- | The URI from which the references were obtained. +rsSourceURI :: Lens' ReferenceSet (Maybe Text) +rsSourceURI + = lens _rsSourceURI (\ s a -> s{_rsSourceURI = a}) + +-- | Free text description of this reference set. +rsDescription :: Lens' ReferenceSet (Maybe Text) +rsDescription + = lens _rsDescription + (\ s a -> s{_rsDescription = a}) + +instance FromJSON ReferenceSet where + parseJSON + = withObject "ReferenceSet" + (\ o -> + ReferenceSet <$> + (o .:? "sourceAccessions" .!= mempty) <*> + (o .:? "referenceIds" .!= mempty) + <*> (o .:? "md5checksum") + <*> (o .:? "ncbiTaxonId") + <*> (o .:? "id") + <*> (o .:? "assemblyId") + <*> (o .:? "sourceURI") + <*> (o .:? "description")) + +instance ToJSON ReferenceSet where + toJSON ReferenceSet{..} + = object + (catMaybes + [("sourceAccessions" .=) <$> _rsSourceAccessions, + ("referenceIds" .=) <$> _rsReferenceIds, + ("md5checksum" .=) <$> _rsMd5checksum, + ("ncbiTaxonId" .=) <$> _rsNcbiTaxonId, + ("id" .=) <$> _rsId, + ("assemblyId" .=) <$> _rsAssemblyId, + ("sourceURI" .=) <$> _rsSourceURI, + ("description" .=) <$> _rsDescription]) diff --git a/gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs b/gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs new file mode 100644 index 000000000..b7ede3e48 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Genomics.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Genomics.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Create.hs new file mode 100644 index 000000000..a9748efbe --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Create.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new annotation set. Caller must have WRITE permission for the +-- associated dataset. +-- +-- /See:/ for @GenomicsAnnotationSetsCreate@. +module Genomics.AnnotationSets.Create + ( + -- * REST Resource + AnnotationSetsCreateAPI + + -- * Creating a Request + , annotationSetsCreate + , AnnotationSetsCreate + + -- * Request Lenses + , ascQuotaUser + , ascPrettyPrint + , ascUserIp + , ascKey + , ascOauthToken + , ascFields + , ascAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsCreate@ which the +-- 'AnnotationSetsCreate' request conforms to. +type AnnotationSetsCreateAPI = + "annotationSets" :> Post '[JSON] AnnotationSet + +-- | Creates a new annotation set. Caller must have WRITE permission for the +-- associated dataset. +-- +-- /See:/ 'annotationSetsCreate' smart constructor. +data AnnotationSetsCreate = AnnotationSetsCreate + { _ascQuotaUser :: !(Maybe Text) + , _ascPrettyPrint :: !Bool + , _ascUserIp :: !(Maybe Text) + , _ascKey :: !(Maybe Text) + , _ascOauthToken :: !(Maybe Text) + , _ascFields :: !(Maybe Text) + , _ascAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ascQuotaUser' +-- +-- * 'ascPrettyPrint' +-- +-- * 'ascUserIp' +-- +-- * 'ascKey' +-- +-- * 'ascOauthToken' +-- +-- * 'ascFields' +-- +-- * 'ascAlt' +annotationSetsCreate + :: AnnotationSetsCreate +annotationSetsCreate = + AnnotationSetsCreate + { _ascQuotaUser = Nothing + , _ascPrettyPrint = True + , _ascUserIp = Nothing + , _ascKey = Nothing + , _ascOauthToken = Nothing + , _ascFields = Nothing + , _ascAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ascQuotaUser :: Lens' AnnotationSetsCreate' (Maybe Text) +ascQuotaUser + = lens _ascQuotaUser (\ s a -> s{_ascQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ascPrettyPrint :: Lens' AnnotationSetsCreate' Bool +ascPrettyPrint + = lens _ascPrettyPrint + (\ s a -> s{_ascPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ascUserIp :: Lens' AnnotationSetsCreate' (Maybe Text) +ascUserIp + = lens _ascUserIp (\ s a -> s{_ascUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ascKey :: Lens' AnnotationSetsCreate' (Maybe Text) +ascKey = lens _ascKey (\ s a -> s{_ascKey = a}) + +-- | OAuth 2.0 token for the current user. +ascOauthToken :: Lens' AnnotationSetsCreate' (Maybe Text) +ascOauthToken + = lens _ascOauthToken + (\ s a -> s{_ascOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ascFields :: Lens' AnnotationSetsCreate' (Maybe Text) +ascFields + = lens _ascFields (\ s a -> s{_ascFields = a}) + +-- | Data format for the response. +ascAlt :: Lens' AnnotationSetsCreate' Text +ascAlt = lens _ascAlt (\ s a -> s{_ascAlt = a}) + +instance GoogleRequest AnnotationSetsCreate' where + type Rs AnnotationSetsCreate' = AnnotationSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsCreate{..} + = go _ascQuotaUser _ascPrettyPrint _ascUserIp _ascKey + _ascOauthToken + _ascFields + _ascAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Delete.hs new file mode 100644 index 000000000..6de0167f2 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Delete.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an annotation set. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ for @GenomicsAnnotationSetsDelete@. +module Genomics.AnnotationSets.Delete + ( + -- * REST Resource + AnnotationSetsDeleteAPI + + -- * Creating a Request + , annotationSetsDelete + , AnnotationSetsDelete + + -- * Request Lenses + , asdQuotaUser + , asdPrettyPrint + , asdAnnotationSetId + , asdUserIp + , asdKey + , asdOauthToken + , asdFields + , asdAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsDelete@ which the +-- 'AnnotationSetsDelete' request conforms to. +type AnnotationSetsDeleteAPI = + "annotationSets" :> + Capture "annotationSetId" Text :> Delete '[JSON] () + +-- | Deletes an annotation set. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ 'annotationSetsDelete' smart constructor. +data AnnotationSetsDelete = AnnotationSetsDelete + { _asdQuotaUser :: !(Maybe Text) + , _asdPrettyPrint :: !Bool + , _asdAnnotationSetId :: !Text + , _asdUserIp :: !(Maybe Text) + , _asdKey :: !(Maybe Text) + , _asdOauthToken :: !(Maybe Text) + , _asdFields :: !(Maybe Text) + , _asdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asdQuotaUser' +-- +-- * 'asdPrettyPrint' +-- +-- * 'asdAnnotationSetId' +-- +-- * 'asdUserIp' +-- +-- * 'asdKey' +-- +-- * 'asdOauthToken' +-- +-- * 'asdFields' +-- +-- * 'asdAlt' +annotationSetsDelete + :: Text -- ^ 'annotationSetId' + -> AnnotationSetsDelete +annotationSetsDelete pAsdAnnotationSetId_ = + AnnotationSetsDelete + { _asdQuotaUser = Nothing + , _asdPrettyPrint = True + , _asdAnnotationSetId = pAsdAnnotationSetId_ + , _asdUserIp = Nothing + , _asdKey = Nothing + , _asdOauthToken = Nothing + , _asdFields = Nothing + , _asdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asdQuotaUser :: Lens' AnnotationSetsDelete' (Maybe Text) +asdQuotaUser + = lens _asdQuotaUser (\ s a -> s{_asdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asdPrettyPrint :: Lens' AnnotationSetsDelete' Bool +asdPrettyPrint + = lens _asdPrettyPrint + (\ s a -> s{_asdPrettyPrint = a}) + +-- | The ID of the annotation set to be deleted. +asdAnnotationSetId :: Lens' AnnotationSetsDelete' Text +asdAnnotationSetId + = lens _asdAnnotationSetId + (\ s a -> s{_asdAnnotationSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asdUserIp :: Lens' AnnotationSetsDelete' (Maybe Text) +asdUserIp + = lens _asdUserIp (\ s a -> s{_asdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asdKey :: Lens' AnnotationSetsDelete' (Maybe Text) +asdKey = lens _asdKey (\ s a -> s{_asdKey = a}) + +-- | OAuth 2.0 token for the current user. +asdOauthToken :: Lens' AnnotationSetsDelete' (Maybe Text) +asdOauthToken + = lens _asdOauthToken + (\ s a -> s{_asdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asdFields :: Lens' AnnotationSetsDelete' (Maybe Text) +asdFields + = lens _asdFields (\ s a -> s{_asdFields = a}) + +-- | Data format for the response. +asdAlt :: Lens' AnnotationSetsDelete' Text +asdAlt = lens _asdAlt (\ s a -> s{_asdAlt = a}) + +instance GoogleRequest AnnotationSetsDelete' where + type Rs AnnotationSetsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsDelete{..} + = go _asdQuotaUser _asdPrettyPrint + _asdAnnotationSetId + _asdUserIp + _asdKey + _asdOauthToken + _asdFields + _asdAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Get.hs new file mode 100644 index 000000000..3a6287807 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets an annotation set. Caller must have READ permission for the +-- associated dataset. +-- +-- /See:/ for @GenomicsAnnotationSetsGet@. +module Genomics.AnnotationSets.Get + ( + -- * REST Resource + AnnotationSetsGetAPI + + -- * Creating a Request + , annotationSetsGet + , AnnotationSetsGet + + -- * Request Lenses + , asgQuotaUser + , asgPrettyPrint + , asgAnnotationSetId + , asgUserIp + , asgKey + , asgOauthToken + , asgFields + , asgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsGet@ which the +-- 'AnnotationSetsGet' request conforms to. +type AnnotationSetsGetAPI = + "annotationSets" :> + Capture "annotationSetId" Text :> + Get '[JSON] AnnotationSet + +-- | Gets an annotation set. Caller must have READ permission for the +-- associated dataset. +-- +-- /See:/ 'annotationSetsGet' smart constructor. +data AnnotationSetsGet = AnnotationSetsGet + { _asgQuotaUser :: !(Maybe Text) + , _asgPrettyPrint :: !Bool + , _asgAnnotationSetId :: !Text + , _asgUserIp :: !(Maybe Text) + , _asgKey :: !(Maybe Text) + , _asgOauthToken :: !(Maybe Text) + , _asgFields :: !(Maybe Text) + , _asgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asgQuotaUser' +-- +-- * 'asgPrettyPrint' +-- +-- * 'asgAnnotationSetId' +-- +-- * 'asgUserIp' +-- +-- * 'asgKey' +-- +-- * 'asgOauthToken' +-- +-- * 'asgFields' +-- +-- * 'asgAlt' +annotationSetsGet + :: Text -- ^ 'annotationSetId' + -> AnnotationSetsGet +annotationSetsGet pAsgAnnotationSetId_ = + AnnotationSetsGet + { _asgQuotaUser = Nothing + , _asgPrettyPrint = True + , _asgAnnotationSetId = pAsgAnnotationSetId_ + , _asgUserIp = Nothing + , _asgKey = Nothing + , _asgOauthToken = Nothing + , _asgFields = Nothing + , _asgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asgQuotaUser :: Lens' AnnotationSetsGet' (Maybe Text) +asgQuotaUser + = lens _asgQuotaUser (\ s a -> s{_asgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asgPrettyPrint :: Lens' AnnotationSetsGet' Bool +asgPrettyPrint + = lens _asgPrettyPrint + (\ s a -> s{_asgPrettyPrint = a}) + +-- | The ID of the annotation set to be retrieved. +asgAnnotationSetId :: Lens' AnnotationSetsGet' Text +asgAnnotationSetId + = lens _asgAnnotationSetId + (\ s a -> s{_asgAnnotationSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asgUserIp :: Lens' AnnotationSetsGet' (Maybe Text) +asgUserIp + = lens _asgUserIp (\ s a -> s{_asgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asgKey :: Lens' AnnotationSetsGet' (Maybe Text) +asgKey = lens _asgKey (\ s a -> s{_asgKey = a}) + +-- | OAuth 2.0 token for the current user. +asgOauthToken :: Lens' AnnotationSetsGet' (Maybe Text) +asgOauthToken + = lens _asgOauthToken + (\ s a -> s{_asgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asgFields :: Lens' AnnotationSetsGet' (Maybe Text) +asgFields + = lens _asgFields (\ s a -> s{_asgFields = a}) + +-- | Data format for the response. +asgAlt :: Lens' AnnotationSetsGet' Text +asgAlt = lens _asgAlt (\ s a -> s{_asgAlt = a}) + +instance GoogleRequest AnnotationSetsGet' where + type Rs AnnotationSetsGet' = AnnotationSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsGet{..} + = go _asgQuotaUser _asgPrettyPrint + _asgAnnotationSetId + _asgUserIp + _asgKey + _asgOauthToken + _asgFields + _asgAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsGetAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Patch.hs new file mode 100644 index 000000000..5443b8d40 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Patch.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an annotation set. The update must respect all mutability +-- restrictions and other invariants described on the annotation set +-- resource. Caller must have WRITE permission for the associated dataset. +-- This method supports patch semantics. +-- +-- /See:/ for @GenomicsAnnotationSetsPatch@. +module Genomics.AnnotationSets.Patch + ( + -- * REST Resource + AnnotationSetsPatchAPI + + -- * Creating a Request + , annotationSetsPatch + , AnnotationSetsPatch + + -- * Request Lenses + , aspQuotaUser + , aspPrettyPrint + , aspAnnotationSetId + , aspUserIp + , aspKey + , aspOauthToken + , aspFields + , aspAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsPatch@ which the +-- 'AnnotationSetsPatch' request conforms to. +type AnnotationSetsPatchAPI = + "annotationSets" :> + Capture "annotationSetId" Text :> + Patch '[JSON] AnnotationSet + +-- | Updates an annotation set. The update must respect all mutability +-- restrictions and other invariants described on the annotation set +-- resource. Caller must have WRITE permission for the associated dataset. +-- This method supports patch semantics. +-- +-- /See:/ 'annotationSetsPatch' smart constructor. +data AnnotationSetsPatch = AnnotationSetsPatch + { _aspQuotaUser :: !(Maybe Text) + , _aspPrettyPrint :: !Bool + , _aspAnnotationSetId :: !Text + , _aspUserIp :: !(Maybe Text) + , _aspKey :: !(Maybe Text) + , _aspOauthToken :: !(Maybe Text) + , _aspFields :: !(Maybe Text) + , _aspAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aspQuotaUser' +-- +-- * 'aspPrettyPrint' +-- +-- * 'aspAnnotationSetId' +-- +-- * 'aspUserIp' +-- +-- * 'aspKey' +-- +-- * 'aspOauthToken' +-- +-- * 'aspFields' +-- +-- * 'aspAlt' +annotationSetsPatch + :: Text -- ^ 'annotationSetId' + -> AnnotationSetsPatch +annotationSetsPatch pAspAnnotationSetId_ = + AnnotationSetsPatch + { _aspQuotaUser = Nothing + , _aspPrettyPrint = True + , _aspAnnotationSetId = pAspAnnotationSetId_ + , _aspUserIp = Nothing + , _aspKey = Nothing + , _aspOauthToken = Nothing + , _aspFields = Nothing + , _aspAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aspQuotaUser :: Lens' AnnotationSetsPatch' (Maybe Text) +aspQuotaUser + = lens _aspQuotaUser (\ s a -> s{_aspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aspPrettyPrint :: Lens' AnnotationSetsPatch' Bool +aspPrettyPrint + = lens _aspPrettyPrint + (\ s a -> s{_aspPrettyPrint = a}) + +-- | The ID of the annotation set to be updated. +aspAnnotationSetId :: Lens' AnnotationSetsPatch' Text +aspAnnotationSetId + = lens _aspAnnotationSetId + (\ s a -> s{_aspAnnotationSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aspUserIp :: Lens' AnnotationSetsPatch' (Maybe Text) +aspUserIp + = lens _aspUserIp (\ s a -> s{_aspUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aspKey :: Lens' AnnotationSetsPatch' (Maybe Text) +aspKey = lens _aspKey (\ s a -> s{_aspKey = a}) + +-- | OAuth 2.0 token for the current user. +aspOauthToken :: Lens' AnnotationSetsPatch' (Maybe Text) +aspOauthToken + = lens _aspOauthToken + (\ s a -> s{_aspOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aspFields :: Lens' AnnotationSetsPatch' (Maybe Text) +aspFields + = lens _aspFields (\ s a -> s{_aspFields = a}) + +-- | Data format for the response. +aspAlt :: Lens' AnnotationSetsPatch' Text +aspAlt = lens _aspAlt (\ s a -> s{_aspAlt = a}) + +instance GoogleRequest AnnotationSetsPatch' where + type Rs AnnotationSetsPatch' = AnnotationSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsPatch{..} + = go _aspQuotaUser _aspPrettyPrint + _aspAnnotationSetId + _aspUserIp + _aspKey + _aspOauthToken + _aspFields + _aspAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsPatchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Search.hs new file mode 100644 index 000000000..1e13b5f8c --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Search.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for annotation sets that match the given criteria. Results are +-- returned in a deterministic order. Caller must have READ permission for +-- the queried datasets. +-- +-- /See:/ for @GenomicsAnnotationSetsSearch@. +module Genomics.AnnotationSets.Search + ( + -- * REST Resource + AnnotationSetsSearchAPI + + -- * Creating a Request + , annotationSetsSearch + , AnnotationSetsSearch + + -- * Request Lenses + , assQuotaUser + , assPrettyPrint + , assUserIp + , assKey + , assOauthToken + , assFields + , assAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsSearch@ which the +-- 'AnnotationSetsSearch' request conforms to. +type AnnotationSetsSearchAPI = + "annotationSets" :> + "search" :> Post '[JSON] SearchAnnotationSetsResponse + +-- | Searches for annotation sets that match the given criteria. Results are +-- returned in a deterministic order. Caller must have READ permission for +-- the queried datasets. +-- +-- /See:/ 'annotationSetsSearch' smart constructor. +data AnnotationSetsSearch = AnnotationSetsSearch + { _assQuotaUser :: !(Maybe Text) + , _assPrettyPrint :: !Bool + , _assUserIp :: !(Maybe Text) + , _assKey :: !(Maybe Text) + , _assOauthToken :: !(Maybe Text) + , _assFields :: !(Maybe Text) + , _assAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assQuotaUser' +-- +-- * 'assPrettyPrint' +-- +-- * 'assUserIp' +-- +-- * 'assKey' +-- +-- * 'assOauthToken' +-- +-- * 'assFields' +-- +-- * 'assAlt' +annotationSetsSearch + :: AnnotationSetsSearch +annotationSetsSearch = + AnnotationSetsSearch + { _assQuotaUser = Nothing + , _assPrettyPrint = True + , _assUserIp = Nothing + , _assKey = Nothing + , _assOauthToken = Nothing + , _assFields = Nothing + , _assAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +assQuotaUser :: Lens' AnnotationSetsSearch' (Maybe Text) +assQuotaUser + = lens _assQuotaUser (\ s a -> s{_assQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +assPrettyPrint :: Lens' AnnotationSetsSearch' Bool +assPrettyPrint + = lens _assPrettyPrint + (\ s a -> s{_assPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +assUserIp :: Lens' AnnotationSetsSearch' (Maybe Text) +assUserIp + = lens _assUserIp (\ s a -> s{_assUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +assKey :: Lens' AnnotationSetsSearch' (Maybe Text) +assKey = lens _assKey (\ s a -> s{_assKey = a}) + +-- | OAuth 2.0 token for the current user. +assOauthToken :: Lens' AnnotationSetsSearch' (Maybe Text) +assOauthToken + = lens _assOauthToken + (\ s a -> s{_assOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +assFields :: Lens' AnnotationSetsSearch' (Maybe Text) +assFields + = lens _assFields (\ s a -> s{_assFields = a}) + +-- | Data format for the response. +assAlt :: Lens' AnnotationSetsSearch' Text +assAlt = lens _assAlt (\ s a -> s{_assAlt = a}) + +instance GoogleRequest AnnotationSetsSearch' where + type Rs AnnotationSetsSearch' = + SearchAnnotationSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsSearch{..} + = go _assQuotaUser _assPrettyPrint _assUserIp _assKey + _assOauthToken + _assFields + _assAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Update.hs new file mode 100644 index 000000000..ee3503af4 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Update.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.AnnotationSets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an annotation set. The update must respect all mutability +-- restrictions and other invariants described on the annotation set +-- resource. Caller must have WRITE permission for the associated dataset. +-- +-- /See:/ for @GenomicsAnnotationSetsUpdate@. +module Genomics.AnnotationSets.Update + ( + -- * REST Resource + AnnotationSetsUpdateAPI + + -- * Creating a Request + , annotationSetsUpdate + , AnnotationSetsUpdate + + -- * Request Lenses + , asuQuotaUser + , asuPrettyPrint + , asuAnnotationSetId + , asuUserIp + , asuKey + , asuOauthToken + , asuFields + , asuAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationSetsUpdate@ which the +-- 'AnnotationSetsUpdate' request conforms to. +type AnnotationSetsUpdateAPI = + "annotationSets" :> + Capture "annotationSetId" Text :> + Put '[JSON] AnnotationSet + +-- | Updates an annotation set. The update must respect all mutability +-- restrictions and other invariants described on the annotation set +-- resource. Caller must have WRITE permission for the associated dataset. +-- +-- /See:/ 'annotationSetsUpdate' smart constructor. +data AnnotationSetsUpdate = AnnotationSetsUpdate + { _asuQuotaUser :: !(Maybe Text) + , _asuPrettyPrint :: !Bool + , _asuAnnotationSetId :: !Text + , _asuUserIp :: !(Maybe Text) + , _asuKey :: !(Maybe Text) + , _asuOauthToken :: !(Maybe Text) + , _asuFields :: !(Maybe Text) + , _asuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationSetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asuQuotaUser' +-- +-- * 'asuPrettyPrint' +-- +-- * 'asuAnnotationSetId' +-- +-- * 'asuUserIp' +-- +-- * 'asuKey' +-- +-- * 'asuOauthToken' +-- +-- * 'asuFields' +-- +-- * 'asuAlt' +annotationSetsUpdate + :: Text -- ^ 'annotationSetId' + -> AnnotationSetsUpdate +annotationSetsUpdate pAsuAnnotationSetId_ = + AnnotationSetsUpdate + { _asuQuotaUser = Nothing + , _asuPrettyPrint = True + , _asuAnnotationSetId = pAsuAnnotationSetId_ + , _asuUserIp = Nothing + , _asuKey = Nothing + , _asuOauthToken = Nothing + , _asuFields = Nothing + , _asuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asuQuotaUser :: Lens' AnnotationSetsUpdate' (Maybe Text) +asuQuotaUser + = lens _asuQuotaUser (\ s a -> s{_asuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asuPrettyPrint :: Lens' AnnotationSetsUpdate' Bool +asuPrettyPrint + = lens _asuPrettyPrint + (\ s a -> s{_asuPrettyPrint = a}) + +-- | The ID of the annotation set to be updated. +asuAnnotationSetId :: Lens' AnnotationSetsUpdate' Text +asuAnnotationSetId + = lens _asuAnnotationSetId + (\ s a -> s{_asuAnnotationSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asuUserIp :: Lens' AnnotationSetsUpdate' (Maybe Text) +asuUserIp + = lens _asuUserIp (\ s a -> s{_asuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asuKey :: Lens' AnnotationSetsUpdate' (Maybe Text) +asuKey = lens _asuKey (\ s a -> s{_asuKey = a}) + +-- | OAuth 2.0 token for the current user. +asuOauthToken :: Lens' AnnotationSetsUpdate' (Maybe Text) +asuOauthToken + = lens _asuOauthToken + (\ s a -> s{_asuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asuFields :: Lens' AnnotationSetsUpdate' (Maybe Text) +asuFields + = lens _asuFields (\ s a -> s{_asuFields = a}) + +-- | Data format for the response. +asuAlt :: Lens' AnnotationSetsUpdate' Text +asuAlt = lens _asuAlt (\ s a -> s{_asuAlt = a}) + +instance GoogleRequest AnnotationSetsUpdate' where + type Rs AnnotationSetsUpdate' = AnnotationSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationSetsUpdate{..} + = go _asuQuotaUser _asuPrettyPrint + _asuAnnotationSetId + _asuUserIp + _asuKey + _asuOauthToken + _asuFields + _asuAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationSetsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/BatchCreate.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/BatchCreate.hs new file mode 100644 index 000000000..bcbbd7829 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/BatchCreate.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.BatchCreate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates one or more new annotations atomically. All annotations must +-- belong to the same annotation set. Caller must have WRITE permission for +-- this annotation set. For optimal performance, batch positionally +-- adjacent annotations together. If the request has a systemic issue, such +-- as an attempt to write to an inaccessible annotation set, the entire RPC +-- will fail accordingly. For lesser data issues, when possible an error +-- will be isolated to the corresponding batch entry in the response; the +-- remaining well formed annotations will be created normally. +-- +-- /See:/ for @GenomicsAnnotationsBatchCreate@. +module Genomics.Annotations.BatchCreate + ( + -- * REST Resource + AnnotationsBatchCreateAPI + + -- * Creating a Request + , annotationsBatchCreate + , AnnotationsBatchCreate + + -- * Request Lenses + , abcQuotaUser + , abcPrettyPrint + , abcUserIp + , abcKey + , abcOauthToken + , abcFields + , abcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsBatchCreate@ which the +-- 'AnnotationsBatchCreate' request conforms to. +type AnnotationsBatchCreateAPI = + "annotations:batchCreate" :> + Post '[JSON] BatchAnnotationsResponse + +-- | Creates one or more new annotations atomically. All annotations must +-- belong to the same annotation set. Caller must have WRITE permission for +-- this annotation set. For optimal performance, batch positionally +-- adjacent annotations together. If the request has a systemic issue, such +-- as an attempt to write to an inaccessible annotation set, the entire RPC +-- will fail accordingly. For lesser data issues, when possible an error +-- will be isolated to the corresponding batch entry in the response; the +-- remaining well formed annotations will be created normally. +-- +-- /See:/ 'annotationsBatchCreate' smart constructor. +data AnnotationsBatchCreate = AnnotationsBatchCreate + { _abcQuotaUser :: !(Maybe Text) + , _abcPrettyPrint :: !Bool + , _abcUserIp :: !(Maybe Text) + , _abcKey :: !(Maybe Text) + , _abcOauthToken :: !(Maybe Text) + , _abcFields :: !(Maybe Text) + , _abcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsBatchCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'abcQuotaUser' +-- +-- * 'abcPrettyPrint' +-- +-- * 'abcUserIp' +-- +-- * 'abcKey' +-- +-- * 'abcOauthToken' +-- +-- * 'abcFields' +-- +-- * 'abcAlt' +annotationsBatchCreate + :: AnnotationsBatchCreate +annotationsBatchCreate = + AnnotationsBatchCreate + { _abcQuotaUser = Nothing + , _abcPrettyPrint = True + , _abcUserIp = Nothing + , _abcKey = Nothing + , _abcOauthToken = Nothing + , _abcFields = Nothing + , _abcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +abcQuotaUser :: Lens' AnnotationsBatchCreate' (Maybe Text) +abcQuotaUser + = lens _abcQuotaUser (\ s a -> s{_abcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +abcPrettyPrint :: Lens' AnnotationsBatchCreate' Bool +abcPrettyPrint + = lens _abcPrettyPrint + (\ s a -> s{_abcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +abcUserIp :: Lens' AnnotationsBatchCreate' (Maybe Text) +abcUserIp + = lens _abcUserIp (\ s a -> s{_abcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +abcKey :: Lens' AnnotationsBatchCreate' (Maybe Text) +abcKey = lens _abcKey (\ s a -> s{_abcKey = a}) + +-- | OAuth 2.0 token for the current user. +abcOauthToken :: Lens' AnnotationsBatchCreate' (Maybe Text) +abcOauthToken + = lens _abcOauthToken + (\ s a -> s{_abcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +abcFields :: Lens' AnnotationsBatchCreate' (Maybe Text) +abcFields + = lens _abcFields (\ s a -> s{_abcFields = a}) + +-- | Data format for the response. +abcAlt :: Lens' AnnotationsBatchCreate' Text +abcAlt = lens _abcAlt (\ s a -> s{_abcAlt = a}) + +instance GoogleRequest AnnotationsBatchCreate' where + type Rs AnnotationsBatchCreate' = + BatchAnnotationsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsBatchCreate{..} + = go _abcQuotaUser _abcPrettyPrint _abcUserIp _abcKey + _abcOauthToken + _abcFields + _abcAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsBatchCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Create.hs new file mode 100644 index 000000000..c1d8e0d98 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Create.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new annotation. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ for @GenomicsAnnotationsCreate@. +module Genomics.Annotations.Create + ( + -- * REST Resource + AnnotationsCreateAPI + + -- * Creating a Request + , annotationsCreate + , AnnotationsCreate + + -- * Request Lenses + , acQuotaUser + , acPrettyPrint + , acUserIp + , acKey + , acOauthToken + , acFields + , acAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsCreate@ which the +-- 'AnnotationsCreate' request conforms to. +type AnnotationsCreateAPI = + "annotations" :> Post '[JSON] Annotation + +-- | Creates a new annotation. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ 'annotationsCreate' smart constructor. +data AnnotationsCreate = AnnotationsCreate + { _acQuotaUser :: !(Maybe Text) + , _acPrettyPrint :: !Bool + , _acUserIp :: !(Maybe Text) + , _acKey :: !(Maybe Text) + , _acOauthToken :: !(Maybe Text) + , _acFields :: !(Maybe Text) + , _acAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acQuotaUser' +-- +-- * 'acPrettyPrint' +-- +-- * 'acUserIp' +-- +-- * 'acKey' +-- +-- * 'acOauthToken' +-- +-- * 'acFields' +-- +-- * 'acAlt' +annotationsCreate + :: AnnotationsCreate +annotationsCreate = + AnnotationsCreate + { _acQuotaUser = Nothing + , _acPrettyPrint = True + , _acUserIp = Nothing + , _acKey = Nothing + , _acOauthToken = Nothing + , _acFields = Nothing + , _acAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acQuotaUser :: Lens' AnnotationsCreate' (Maybe Text) +acQuotaUser + = lens _acQuotaUser (\ s a -> s{_acQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acPrettyPrint :: Lens' AnnotationsCreate' Bool +acPrettyPrint + = lens _acPrettyPrint + (\ s a -> s{_acPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acUserIp :: Lens' AnnotationsCreate' (Maybe Text) +acUserIp = lens _acUserIp (\ s a -> s{_acUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acKey :: Lens' AnnotationsCreate' (Maybe Text) +acKey = lens _acKey (\ s a -> s{_acKey = a}) + +-- | OAuth 2.0 token for the current user. +acOauthToken :: Lens' AnnotationsCreate' (Maybe Text) +acOauthToken + = lens _acOauthToken (\ s a -> s{_acOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acFields :: Lens' AnnotationsCreate' (Maybe Text) +acFields = lens _acFields (\ s a -> s{_acFields = a}) + +-- | Data format for the response. +acAlt :: Lens' AnnotationsCreate' Text +acAlt = lens _acAlt (\ s a -> s{_acAlt = a}) + +instance GoogleRequest AnnotationsCreate' where + type Rs AnnotationsCreate' = Annotation + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsCreate{..} + = go _acQuotaUser _acPrettyPrint _acUserIp _acKey + _acOauthToken + _acFields + _acAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Delete.hs new file mode 100644 index 000000000..6be74898b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Delete.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an annotation. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ for @GenomicsAnnotationsDelete@. +module Genomics.Annotations.Delete + ( + -- * REST Resource + AnnotationsDeleteAPI + + -- * Creating a Request + , annotationsDelete + , AnnotationsDelete + + -- * Request Lenses + , adQuotaUser + , adPrettyPrint + , adUserIp + , adKey + , adAnnotationId + , adOauthToken + , adFields + , adAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsDelete@ which the +-- 'AnnotationsDelete' request conforms to. +type AnnotationsDeleteAPI = + "annotations" :> + Capture "annotationId" Text :> Delete '[JSON] () + +-- | Deletes an annotation. Caller must have WRITE permission for the +-- associated annotation set. +-- +-- /See:/ 'annotationsDelete' smart constructor. +data AnnotationsDelete = AnnotationsDelete + { _adQuotaUser :: !(Maybe Text) + , _adPrettyPrint :: !Bool + , _adUserIp :: !(Maybe Text) + , _adKey :: !(Maybe Text) + , _adAnnotationId :: !Text + , _adOauthToken :: !(Maybe Text) + , _adFields :: !(Maybe Text) + , _adAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adQuotaUser' +-- +-- * 'adPrettyPrint' +-- +-- * 'adUserIp' +-- +-- * 'adKey' +-- +-- * 'adAnnotationId' +-- +-- * 'adOauthToken' +-- +-- * 'adFields' +-- +-- * 'adAlt' +annotationsDelete + :: Text -- ^ 'annotationId' + -> AnnotationsDelete +annotationsDelete pAdAnnotationId_ = + AnnotationsDelete + { _adQuotaUser = Nothing + , _adPrettyPrint = True + , _adUserIp = Nothing + , _adKey = Nothing + , _adAnnotationId = pAdAnnotationId_ + , _adOauthToken = Nothing + , _adFields = Nothing + , _adAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +adQuotaUser :: Lens' AnnotationsDelete' (Maybe Text) +adQuotaUser + = lens _adQuotaUser (\ s a -> s{_adQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +adPrettyPrint :: Lens' AnnotationsDelete' Bool +adPrettyPrint + = lens _adPrettyPrint + (\ s a -> s{_adPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +adUserIp :: Lens' AnnotationsDelete' (Maybe Text) +adUserIp = lens _adUserIp (\ s a -> s{_adUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +adKey :: Lens' AnnotationsDelete' (Maybe Text) +adKey = lens _adKey (\ s a -> s{_adKey = a}) + +-- | The ID of the annotation set to be deleted. +adAnnotationId :: Lens' AnnotationsDelete' Text +adAnnotationId + = lens _adAnnotationId + (\ s a -> s{_adAnnotationId = a}) + +-- | OAuth 2.0 token for the current user. +adOauthToken :: Lens' AnnotationsDelete' (Maybe Text) +adOauthToken + = lens _adOauthToken (\ s a -> s{_adOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +adFields :: Lens' AnnotationsDelete' (Maybe Text) +adFields = lens _adFields (\ s a -> s{_adFields = a}) + +-- | Data format for the response. +adAlt :: Lens' AnnotationsDelete' Text +adAlt = lens _adAlt (\ s a -> s{_adAlt = a}) + +instance GoogleRequest AnnotationsDelete' where + type Rs AnnotationsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsDelete{..} + = go _adQuotaUser _adPrettyPrint _adUserIp _adKey + _adAnnotationId + _adOauthToken + _adFields + _adAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Get.hs new file mode 100644 index 000000000..0c378f552 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Get.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets an annotation. Caller must have READ permission for the associated +-- annotation set. +-- +-- /See:/ for @GenomicsAnnotationsGet@. +module Genomics.Annotations.Get + ( + -- * REST Resource + AnnotationsGetAPI + + -- * Creating a Request + , annotationsGet + , AnnotationsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agKey + , agAnnotationId + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsGet@ which the +-- 'AnnotationsGet' request conforms to. +type AnnotationsGetAPI = + "annotations" :> + Capture "annotationId" Text :> Get '[JSON] Annotation + +-- | Gets an annotation. Caller must have READ permission for the associated +-- annotation set. +-- +-- /See:/ 'annotationsGet' smart constructor. +data AnnotationsGet = AnnotationsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agKey :: !(Maybe Text) + , _agAnnotationId :: !Text + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agKey' +-- +-- * 'agAnnotationId' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +annotationsGet + :: Text -- ^ 'annotationId' + -> AnnotationsGet +annotationsGet pAgAnnotationId_ = + AnnotationsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agKey = Nothing + , _agAnnotationId = pAgAnnotationId_ + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AnnotationsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AnnotationsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AnnotationsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AnnotationsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | The ID of the annotation set to be retrieved. +agAnnotationId :: Lens' AnnotationsGet' Text +agAnnotationId + = lens _agAnnotationId + (\ s a -> s{_agAnnotationId = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AnnotationsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AnnotationsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AnnotationsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AnnotationsGet' where + type Rs AnnotationsGet' = Annotation + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp _agKey + _agAnnotationId + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AnnotationsGetAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Patch.hs new file mode 100644 index 000000000..3ea51723d --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Patch.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an annotation. The update must respect all mutability +-- restrictions and other invariants described on the annotation resource. +-- Caller must have WRITE permission for the associated dataset. This +-- method supports patch semantics. +-- +-- /See:/ for @GenomicsAnnotationsPatch@. +module Genomics.Annotations.Patch + ( + -- * REST Resource + AnnotationsPatchAPI + + -- * Creating a Request + , annotationsPatch + , AnnotationsPatch + + -- * Request Lenses + , apQuotaUser + , apPrettyPrint + , apUserIp + , apKey + , apAnnotationId + , apOauthToken + , apFields + , apAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsPatch@ which the +-- 'AnnotationsPatch' request conforms to. +type AnnotationsPatchAPI = + "annotations" :> + Capture "annotationId" Text :> + Patch '[JSON] Annotation + +-- | Updates an annotation. The update must respect all mutability +-- restrictions and other invariants described on the annotation resource. +-- Caller must have WRITE permission for the associated dataset. This +-- method supports patch semantics. +-- +-- /See:/ 'annotationsPatch' smart constructor. +data AnnotationsPatch = AnnotationsPatch + { _apQuotaUser :: !(Maybe Text) + , _apPrettyPrint :: !Bool + , _apUserIp :: !(Maybe Text) + , _apKey :: !(Maybe Text) + , _apAnnotationId :: !Text + , _apOauthToken :: !(Maybe Text) + , _apFields :: !(Maybe Text) + , _apAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apQuotaUser' +-- +-- * 'apPrettyPrint' +-- +-- * 'apUserIp' +-- +-- * 'apKey' +-- +-- * 'apAnnotationId' +-- +-- * 'apOauthToken' +-- +-- * 'apFields' +-- +-- * 'apAlt' +annotationsPatch + :: Text -- ^ 'annotationId' + -> AnnotationsPatch +annotationsPatch pApAnnotationId_ = + AnnotationsPatch + { _apQuotaUser = Nothing + , _apPrettyPrint = True + , _apUserIp = Nothing + , _apKey = Nothing + , _apAnnotationId = pApAnnotationId_ + , _apOauthToken = Nothing + , _apFields = Nothing + , _apAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apQuotaUser :: Lens' AnnotationsPatch' (Maybe Text) +apQuotaUser + = lens _apQuotaUser (\ s a -> s{_apQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apPrettyPrint :: Lens' AnnotationsPatch' Bool +apPrettyPrint + = lens _apPrettyPrint + (\ s a -> s{_apPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apUserIp :: Lens' AnnotationsPatch' (Maybe Text) +apUserIp = lens _apUserIp (\ s a -> s{_apUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apKey :: Lens' AnnotationsPatch' (Maybe Text) +apKey = lens _apKey (\ s a -> s{_apKey = a}) + +-- | The ID of the annotation set to be updated. +apAnnotationId :: Lens' AnnotationsPatch' Text +apAnnotationId + = lens _apAnnotationId + (\ s a -> s{_apAnnotationId = a}) + +-- | OAuth 2.0 token for the current user. +apOauthToken :: Lens' AnnotationsPatch' (Maybe Text) +apOauthToken + = lens _apOauthToken (\ s a -> s{_apOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apFields :: Lens' AnnotationsPatch' (Maybe Text) +apFields = lens _apFields (\ s a -> s{_apFields = a}) + +-- | Data format for the response. +apAlt :: Lens' AnnotationsPatch' Text +apAlt = lens _apAlt (\ s a -> s{_apAlt = a}) + +instance GoogleRequest AnnotationsPatch' where + type Rs AnnotationsPatch' = Annotation + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsPatch{..} + = go _apQuotaUser _apPrettyPrint _apUserIp _apKey + _apAnnotationId + _apOauthToken + _apFields + _apAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsPatchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Search.hs new file mode 100644 index 000000000..c539f7c29 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Search.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for annotations that match the given criteria. Results are +-- returned ordered by start position. Annotations that have matching start +-- positions are ordered deterministically. Caller must have READ +-- permission for the queried annotation sets. +-- +-- /See:/ for @GenomicsAnnotationsSearch@. +module Genomics.Annotations.Search + ( + -- * REST Resource + AnnotationsSearchAPI + + -- * Creating a Request + , annotationsSearch + , AnnotationsSearch + + -- * Request Lenses + , asQuotaUser + , asPrettyPrint + , asUserIp + , asKey + , asOauthToken + , asFields + , asAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsSearch@ which the +-- 'AnnotationsSearch' request conforms to. +type AnnotationsSearchAPI = + "annotations" :> + "search" :> Post '[JSON] SearchAnnotationsResponse + +-- | Searches for annotations that match the given criteria. Results are +-- returned ordered by start position. Annotations that have matching start +-- positions are ordered deterministically. Caller must have READ +-- permission for the queried annotation sets. +-- +-- /See:/ 'annotationsSearch' smart constructor. +data AnnotationsSearch = AnnotationsSearch + { _asQuotaUser :: !(Maybe Text) + , _asPrettyPrint :: !Bool + , _asUserIp :: !(Maybe Text) + , _asKey :: !(Maybe Text) + , _asOauthToken :: !(Maybe Text) + , _asFields :: !(Maybe Text) + , _asAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asQuotaUser' +-- +-- * 'asPrettyPrint' +-- +-- * 'asUserIp' +-- +-- * 'asKey' +-- +-- * 'asOauthToken' +-- +-- * 'asFields' +-- +-- * 'asAlt' +annotationsSearch + :: AnnotationsSearch +annotationsSearch = + AnnotationsSearch + { _asQuotaUser = Nothing + , _asPrettyPrint = True + , _asUserIp = Nothing + , _asKey = Nothing + , _asOauthToken = Nothing + , _asFields = Nothing + , _asAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asQuotaUser :: Lens' AnnotationsSearch' (Maybe Text) +asQuotaUser + = lens _asQuotaUser (\ s a -> s{_asQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asPrettyPrint :: Lens' AnnotationsSearch' Bool +asPrettyPrint + = lens _asPrettyPrint + (\ s a -> s{_asPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asUserIp :: Lens' AnnotationsSearch' (Maybe Text) +asUserIp = lens _asUserIp (\ s a -> s{_asUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asKey :: Lens' AnnotationsSearch' (Maybe Text) +asKey = lens _asKey (\ s a -> s{_asKey = a}) + +-- | OAuth 2.0 token for the current user. +asOauthToken :: Lens' AnnotationsSearch' (Maybe Text) +asOauthToken + = lens _asOauthToken (\ s a -> s{_asOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asFields :: Lens' AnnotationsSearch' (Maybe Text) +asFields = lens _asFields (\ s a -> s{_asFields = a}) + +-- | Data format for the response. +asAlt :: Lens' AnnotationsSearch' Text +asAlt = lens _asAlt (\ s a -> s{_asAlt = a}) + +instance GoogleRequest AnnotationsSearch' where + type Rs AnnotationsSearch' = + SearchAnnotationsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsSearch{..} + = go _asQuotaUser _asPrettyPrint _asUserIp _asKey + _asOauthToken + _asFields + _asAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Update.hs new file mode 100644 index 000000000..11f91689a --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Annotations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an annotation. The update must respect all mutability +-- restrictions and other invariants described on the annotation resource. +-- Caller must have WRITE permission for the associated dataset. +-- +-- /See:/ for @GenomicsAnnotationsUpdate@. +module Genomics.Annotations.Update + ( + -- * REST Resource + AnnotationsUpdateAPI + + -- * Creating a Request + , annotationsUpdate + , AnnotationsUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auUserIp + , auKey + , auAnnotationId + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsAnnotationsUpdate@ which the +-- 'AnnotationsUpdate' request conforms to. +type AnnotationsUpdateAPI = + "annotations" :> + Capture "annotationId" Text :> Put '[JSON] Annotation + +-- | Updates an annotation. The update must respect all mutability +-- restrictions and other invariants described on the annotation resource. +-- Caller must have WRITE permission for the associated dataset. +-- +-- /See:/ 'annotationsUpdate' smart constructor. +data AnnotationsUpdate = AnnotationsUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auUserIp :: !(Maybe Text) + , _auKey :: !(Maybe Text) + , _auAnnotationId :: !Text + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnnotationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auUserIp' +-- +-- * 'auKey' +-- +-- * 'auAnnotationId' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +annotationsUpdate + :: Text -- ^ 'annotationId' + -> AnnotationsUpdate +annotationsUpdate pAuAnnotationId_ = + AnnotationsUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auUserIp = Nothing + , _auKey = Nothing + , _auAnnotationId = pAuAnnotationId_ + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AnnotationsUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AnnotationsUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AnnotationsUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AnnotationsUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | The ID of the annotation set to be updated. +auAnnotationId :: Lens' AnnotationsUpdate' Text +auAnnotationId + = lens _auAnnotationId + (\ s a -> s{_auAnnotationId = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AnnotationsUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AnnotationsUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AnnotationsUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AnnotationsUpdate' where + type Rs AnnotationsUpdate' = Annotation + request = requestWithRoute defReq genomicsURL + requestWithRoute r u AnnotationsUpdate{..} + = go _auQuotaUser _auPrettyPrint _auUserIp _auKey + _auAnnotationId + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute + (Proxy :: Proxy AnnotationsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Create.hs new file mode 100644 index 000000000..76a4d8aac --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Create.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new call set. +-- +-- /See:/ for @GenomicsCallsetsCreate@. +module Genomics.Callsets.Create + ( + -- * REST Resource + CallsetsCreateAPI + + -- * Creating a Request + , callsetsCreate + , CallsetsCreate + + -- * Request Lenses + , ccQuotaUser + , ccPrettyPrint + , ccUserIp + , ccKey + , ccOauthToken + , ccFields + , ccAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsCreate@ which the +-- 'CallsetsCreate' request conforms to. +type CallsetsCreateAPI = + "callsets" :> Post '[JSON] CallSet + +-- | Creates a new call set. +-- +-- /See:/ 'callsetsCreate' smart constructor. +data CallsetsCreate = CallsetsCreate + { _ccQuotaUser :: !(Maybe Text) + , _ccPrettyPrint :: !Bool + , _ccUserIp :: !(Maybe Text) + , _ccKey :: !(Maybe Text) + , _ccOauthToken :: !(Maybe Text) + , _ccFields :: !(Maybe Text) + , _ccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccQuotaUser' +-- +-- * 'ccPrettyPrint' +-- +-- * 'ccUserIp' +-- +-- * 'ccKey' +-- +-- * 'ccOauthToken' +-- +-- * 'ccFields' +-- +-- * 'ccAlt' +callsetsCreate + :: CallsetsCreate +callsetsCreate = + CallsetsCreate + { _ccQuotaUser = Nothing + , _ccPrettyPrint = True + , _ccUserIp = Nothing + , _ccKey = Nothing + , _ccOauthToken = Nothing + , _ccFields = Nothing + , _ccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ccQuotaUser :: Lens' CallsetsCreate' (Maybe Text) +ccQuotaUser + = lens _ccQuotaUser (\ s a -> s{_ccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ccPrettyPrint :: Lens' CallsetsCreate' Bool +ccPrettyPrint + = lens _ccPrettyPrint + (\ s a -> s{_ccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ccUserIp :: Lens' CallsetsCreate' (Maybe Text) +ccUserIp = lens _ccUserIp (\ s a -> s{_ccUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ccKey :: Lens' CallsetsCreate' (Maybe Text) +ccKey = lens _ccKey (\ s a -> s{_ccKey = a}) + +-- | OAuth 2.0 token for the current user. +ccOauthToken :: Lens' CallsetsCreate' (Maybe Text) +ccOauthToken + = lens _ccOauthToken (\ s a -> s{_ccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ccFields :: Lens' CallsetsCreate' (Maybe Text) +ccFields = lens _ccFields (\ s a -> s{_ccFields = a}) + +-- | Data format for the response. +ccAlt :: Lens' CallsetsCreate' Text +ccAlt = lens _ccAlt (\ s a -> s{_ccAlt = a}) + +instance GoogleRequest CallsetsCreate' where + type Rs CallsetsCreate' = CallSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsCreate{..} + = go _ccQuotaUser _ccPrettyPrint _ccUserIp _ccKey + _ccOauthToken + _ccFields + _ccAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Delete.hs new file mode 100644 index 000000000..51e3fbba7 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a call set. +-- +-- /See:/ for @GenomicsCallsetsDelete@. +module Genomics.Callsets.Delete + ( + -- * REST Resource + CallsetsDeleteAPI + + -- * Creating a Request + , callsetsDelete + , CallsetsDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdKey + , cdCallSetId + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsDelete@ which the +-- 'CallsetsDelete' request conforms to. +type CallsetsDeleteAPI = + "callsets" :> + Capture "callSetId" Text :> Delete '[JSON] () + +-- | Deletes a call set. +-- +-- /See:/ 'callsetsDelete' smart constructor. +data CallsetsDelete = CallsetsDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdCallSetId :: !Text + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdKey' +-- +-- * 'cdCallSetId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +callsetsDelete + :: Text -- ^ 'callSetId' + -> CallsetsDelete +callsetsDelete pCdCallSetId_ = + CallsetsDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdKey = Nothing + , _cdCallSetId = pCdCallSetId_ + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CallsetsDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CallsetsDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CallsetsDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CallsetsDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | The ID of the call set to be deleted. +cdCallSetId :: Lens' CallsetsDelete' Text +cdCallSetId + = lens _cdCallSetId (\ s a -> s{_cdCallSetId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CallsetsDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CallsetsDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CallsetsDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CallsetsDelete' where + type Rs CallsetsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp _cdKey + _cdCallSetId + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Get.hs new file mode 100644 index 000000000..efb9c5a2b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a call set by ID. +-- +-- /See:/ for @GenomicsCallsetsGet@. +module Genomics.Callsets.Get + ( + -- * REST Resource + CallsetsGetAPI + + -- * Creating a Request + , callsetsGet + , CallsetsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgKey + , cgCallSetId + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsGet@ which the +-- 'CallsetsGet' request conforms to. +type CallsetsGetAPI = + "callsets" :> + Capture "callSetId" Text :> Get '[JSON] CallSet + +-- | Gets a call set by ID. +-- +-- /See:/ 'callsetsGet' smart constructor. +data CallsetsGet = CallsetsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgCallSetId :: !Text + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgCallSetId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +callsetsGet + :: Text -- ^ 'callSetId' + -> CallsetsGet +callsetsGet pCgCallSetId_ = + CallsetsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgCallSetId = pCgCallSetId_ + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CallsetsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CallsetsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CallsetsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CallsetsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | The ID of the call set. +cgCallSetId :: Lens' CallsetsGet' Text +cgCallSetId + = lens _cgCallSetId (\ s a -> s{_cgCallSetId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CallsetsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CallsetsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CallsetsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CallsetsGet' where + type Rs CallsetsGet' = CallSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgKey + _cgCallSetId + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsGetAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Patch.hs new file mode 100644 index 000000000..997df804b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a call set. This method supports patch semantics. +-- +-- /See:/ for @GenomicsCallsetsPatch@. +module Genomics.Callsets.Patch + ( + -- * REST Resource + CallsetsPatchAPI + + -- * Creating a Request + , callsetsPatch + , CallsetsPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpKey + , cpCallSetId + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsPatch@ which the +-- 'CallsetsPatch' request conforms to. +type CallsetsPatchAPI = + "callsets" :> + Capture "callSetId" Text :> Patch '[JSON] CallSet + +-- | Updates a call set. This method supports patch semantics. +-- +-- /See:/ 'callsetsPatch' smart constructor. +data CallsetsPatch = CallsetsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpCallSetId :: !Text + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpCallSetId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +callsetsPatch + :: Text -- ^ 'callSetId' + -> CallsetsPatch +callsetsPatch pCpCallSetId_ = + CallsetsPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpCallSetId = pCpCallSetId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CallsetsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CallsetsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CallsetsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CallsetsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | The ID of the call set to be updated. +cpCallSetId :: Lens' CallsetsPatch' Text +cpCallSetId + = lens _cpCallSetId (\ s a -> s{_cpCallSetId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CallsetsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CallsetsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CallsetsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CallsetsPatch' where + type Rs CallsetsPatch' = CallSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp _cpKey + _cpCallSetId + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsPatchAPI) r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Search.hs new file mode 100644 index 000000000..dbbe06c4f --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Search.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of call sets matching the criteria. Implements +-- GlobalAllianceApi.searchCallSets. +-- +-- /See:/ for @GenomicsCallsetsSearch@. +module Genomics.Callsets.Search + ( + -- * REST Resource + CallsetsSearchAPI + + -- * Creating a Request + , callsetsSearch + , CallsetsSearch + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsSearch@ which the +-- 'CallsetsSearch' request conforms to. +type CallsetsSearchAPI = + "callsets" :> + "search" :> Post '[JSON] SearchCallSetsResponse + +-- | Gets a list of call sets matching the criteria. Implements +-- GlobalAllianceApi.searchCallSets. +-- +-- /See:/ 'callsetsSearch' smart constructor. +data CallsetsSearch = CallsetsSearch + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +callsetsSearch + :: CallsetsSearch +callsetsSearch = + CallsetsSearch + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' CallsetsSearch' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' CallsetsSearch' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' CallsetsSearch' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' CallsetsSearch' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' CallsetsSearch' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' CallsetsSearch' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' CallsetsSearch' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest CallsetsSearch' where + type Rs CallsetsSearch' = SearchCallSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsSearch{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Update.hs new file mode 100644 index 000000000..d3c7250c9 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Callsets/Update.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Callsets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a call set. +-- +-- /See:/ for @GenomicsCallsetsUpdate@. +module Genomics.Callsets.Update + ( + -- * REST Resource + CallsetsUpdateAPI + + -- * Creating a Request + , callsetsUpdate + , CallsetsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuCallSetId + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsCallsetsUpdate@ which the +-- 'CallsetsUpdate' request conforms to. +type CallsetsUpdateAPI = + "callsets" :> + Capture "callSetId" Text :> Put '[JSON] CallSet + +-- | Updates a call set. +-- +-- /See:/ 'callsetsUpdate' smart constructor. +data CallsetsUpdate = CallsetsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuCallSetId :: !Text + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CallsetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuCallSetId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +callsetsUpdate + :: Text -- ^ 'callSetId' + -> CallsetsUpdate +callsetsUpdate pCuCallSetId_ = + CallsetsUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuCallSetId = pCuCallSetId_ + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CallsetsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CallsetsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CallsetsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CallsetsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | The ID of the call set to be updated. +cuCallSetId :: Lens' CallsetsUpdate' Text +cuCallSetId + = lens _cuCallSetId (\ s a -> s{_cuCallSetId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CallsetsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CallsetsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CallsetsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CallsetsUpdate' where + type Rs CallsetsUpdate' = CallSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u CallsetsUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuCallSetId + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CallsetsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Create.hs new file mode 100644 index 000000000..033e15846 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Create.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new dataset. +-- +-- /See:/ for @GenomicsDatasetsCreate@. +module Genomics.Datasets.Create + ( + -- * REST Resource + DatasetsCreateAPI + + -- * Creating a Request + , datasetsCreate + , DatasetsCreate + + -- * Request Lenses + , dcQuotaUser + , dcPrettyPrint + , dcUserIp + , dcKey + , dcOauthToken + , dcFields + , dcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsCreate@ which the +-- 'DatasetsCreate' request conforms to. +type DatasetsCreateAPI = + "datasets" :> Post '[JSON] Dataset + +-- | Creates a new dataset. +-- +-- /See:/ 'datasetsCreate' smart constructor. +data DatasetsCreate = DatasetsCreate + { _dcQuotaUser :: !(Maybe Text) + , _dcPrettyPrint :: !Bool + , _dcUserIp :: !(Maybe Text) + , _dcKey :: !(Maybe Text) + , _dcOauthToken :: !(Maybe Text) + , _dcFields :: !(Maybe Text) + , _dcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcQuotaUser' +-- +-- * 'dcPrettyPrint' +-- +-- * 'dcUserIp' +-- +-- * 'dcKey' +-- +-- * 'dcOauthToken' +-- +-- * 'dcFields' +-- +-- * 'dcAlt' +datasetsCreate + :: DatasetsCreate +datasetsCreate = + DatasetsCreate + { _dcQuotaUser = Nothing + , _dcPrettyPrint = True + , _dcUserIp = Nothing + , _dcKey = Nothing + , _dcOauthToken = Nothing + , _dcFields = Nothing + , _dcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dcQuotaUser :: Lens' DatasetsCreate' (Maybe Text) +dcQuotaUser + = lens _dcQuotaUser (\ s a -> s{_dcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dcPrettyPrint :: Lens' DatasetsCreate' Bool +dcPrettyPrint + = lens _dcPrettyPrint + (\ s a -> s{_dcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dcUserIp :: Lens' DatasetsCreate' (Maybe Text) +dcUserIp = lens _dcUserIp (\ s a -> s{_dcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dcKey :: Lens' DatasetsCreate' (Maybe Text) +dcKey = lens _dcKey (\ s a -> s{_dcKey = a}) + +-- | OAuth 2.0 token for the current user. +dcOauthToken :: Lens' DatasetsCreate' (Maybe Text) +dcOauthToken + = lens _dcOauthToken (\ s a -> s{_dcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dcFields :: Lens' DatasetsCreate' (Maybe Text) +dcFields = lens _dcFields (\ s a -> s{_dcFields = a}) + +-- | Data format for the response. +dcAlt :: Lens' DatasetsCreate' Text +dcAlt = lens _dcAlt (\ s a -> s{_dcAlt = a}) + +instance GoogleRequest DatasetsCreate' where + type Rs DatasetsCreate' = Dataset + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsCreate{..} + = go _dcQuotaUser _dcPrettyPrint _dcUserIp _dcKey + _dcOauthToken + _dcFields + _dcAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Delete.hs new file mode 100644 index 000000000..4df61bc4e --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a dataset. +-- +-- /See:/ for @GenomicsDatasetsDelete@. +module Genomics.Datasets.Delete + ( + -- * REST Resource + DatasetsDeleteAPI + + -- * Creating a Request + , datasetsDelete + , DatasetsDelete + + -- * Request Lenses + , ddQuotaUser + , ddPrettyPrint + , ddUserIp + , ddKey + , ddDatasetId + , ddOauthToken + , ddFields + , ddAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsDelete@ which the +-- 'DatasetsDelete' request conforms to. +type DatasetsDeleteAPI = + "datasets" :> + Capture "datasetId" Text :> Delete '[JSON] () + +-- | Deletes a dataset. +-- +-- /See:/ 'datasetsDelete' smart constructor. +data DatasetsDelete = DatasetsDelete + { _ddQuotaUser :: !(Maybe Text) + , _ddPrettyPrint :: !Bool + , _ddUserIp :: !(Maybe Text) + , _ddKey :: !(Maybe Text) + , _ddDatasetId :: !Text + , _ddOauthToken :: !(Maybe Text) + , _ddFields :: !(Maybe Text) + , _ddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddQuotaUser' +-- +-- * 'ddPrettyPrint' +-- +-- * 'ddUserIp' +-- +-- * 'ddKey' +-- +-- * 'ddDatasetId' +-- +-- * 'ddOauthToken' +-- +-- * 'ddFields' +-- +-- * 'ddAlt' +datasetsDelete + :: Text -- ^ 'datasetId' + -> DatasetsDelete +datasetsDelete pDdDatasetId_ = + DatasetsDelete + { _ddQuotaUser = Nothing + , _ddPrettyPrint = True + , _ddUserIp = Nothing + , _ddKey = Nothing + , _ddDatasetId = pDdDatasetId_ + , _ddOauthToken = Nothing + , _ddFields = Nothing + , _ddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ddQuotaUser :: Lens' DatasetsDelete' (Maybe Text) +ddQuotaUser + = lens _ddQuotaUser (\ s a -> s{_ddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddPrettyPrint :: Lens' DatasetsDelete' Bool +ddPrettyPrint + = lens _ddPrettyPrint + (\ s a -> s{_ddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ddUserIp :: Lens' DatasetsDelete' (Maybe Text) +ddUserIp = lens _ddUserIp (\ s a -> s{_ddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddKey :: Lens' DatasetsDelete' (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | The ID of the dataset to be deleted. +ddDatasetId :: Lens' DatasetsDelete' Text +ddDatasetId + = lens _ddDatasetId (\ s a -> s{_ddDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +ddOauthToken :: Lens' DatasetsDelete' (Maybe Text) +ddOauthToken + = lens _ddOauthToken (\ s a -> s{_ddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddFields :: Lens' DatasetsDelete' (Maybe Text) +ddFields = lens _ddFields (\ s a -> s{_ddFields = a}) + +-- | Data format for the response. +ddAlt :: Lens' DatasetsDelete' Text +ddAlt = lens _ddAlt (\ s a -> s{_ddAlt = a}) + +instance GoogleRequest DatasetsDelete' where + type Rs DatasetsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsDelete{..} + = go _ddQuotaUser _ddPrettyPrint _ddUserIp _ddKey + _ddDatasetId + _ddOauthToken + _ddFields + _ddAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Get.hs new file mode 100644 index 000000000..d5f8e2f67 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a dataset by ID. +-- +-- /See:/ for @GenomicsDatasetsGet@. +module Genomics.Datasets.Get + ( + -- * REST Resource + DatasetsGetAPI + + -- * Creating a Request + , datasetsGet + , DatasetsGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgUserIp + , dgKey + , dgDatasetId + , dgOauthToken + , dgFields + , dgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsGet@ which the +-- 'DatasetsGet' request conforms to. +type DatasetsGetAPI = + "datasets" :> + Capture "datasetId" Text :> Get '[JSON] Dataset + +-- | Gets a dataset by ID. +-- +-- /See:/ 'datasetsGet' smart constructor. +data DatasetsGet = DatasetsGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgUserIp :: !(Maybe Text) + , _dgKey :: !(Maybe Text) + , _dgDatasetId :: !Text + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgUserIp' +-- +-- * 'dgKey' +-- +-- * 'dgDatasetId' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +datasetsGet + :: Text -- ^ 'datasetId' + -> DatasetsGet +datasetsGet pDgDatasetId_ = + DatasetsGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgUserIp = Nothing + , _dgKey = Nothing + , _dgDatasetId = pDgDatasetId_ + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DatasetsGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DatasetsGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DatasetsGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DatasetsGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | The ID of the dataset. +dgDatasetId :: Lens' DatasetsGet' Text +dgDatasetId + = lens _dgDatasetId (\ s a -> s{_dgDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DatasetsGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DatasetsGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DatasetsGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +instance GoogleRequest DatasetsGet' where + type Rs DatasetsGet' = Dataset + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgUserIp _dgKey + _dgDatasetId + _dgOauthToken + _dgFields + _dgAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsGetAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/List.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/List.hs new file mode 100644 index 000000000..94d34e778 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/List.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists datasets within a project. +-- +-- /See:/ for @GenomicsDatasetsList@. +module Genomics.Datasets.List + ( + -- * REST Resource + DatasetsListAPI + + -- * Creating a Request + , datasetsList + , DatasetsList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlUserIp + , dlProjectNumber + , dlKey + , dlPageToken + , dlOauthToken + , dlPageSize + , dlFields + , dlAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsList@ which the +-- 'DatasetsList' request conforms to. +type DatasetsListAPI = + "datasets" :> + QueryParam "projectNumber" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListDatasetsResponse + +-- | Lists datasets within a project. +-- +-- /See:/ 'datasetsList' smart constructor. +data DatasetsList = DatasetsList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlUserIp :: !(Maybe Text) + , _dlProjectNumber :: !(Maybe Int64) + , _dlKey :: !(Maybe Text) + , _dlPageToken :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlPageSize :: !(Maybe Int32) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlUserIp' +-- +-- * 'dlProjectNumber' +-- +-- * 'dlKey' +-- +-- * 'dlPageToken' +-- +-- * 'dlOauthToken' +-- +-- * 'dlPageSize' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +datasetsList + :: DatasetsList +datasetsList = + DatasetsList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlUserIp = Nothing + , _dlProjectNumber = Nothing + , _dlKey = Nothing + , _dlPageToken = Nothing + , _dlOauthToken = Nothing + , _dlPageSize = Nothing + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DatasetsList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DatasetsList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DatasetsList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | Required. The project to list datasets for. +dlProjectNumber :: Lens' DatasetsList' (Maybe Int64) +dlProjectNumber + = lens _dlProjectNumber + (\ s a -> s{_dlProjectNumber = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DatasetsList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +dlPageToken :: Lens' DatasetsList' (Maybe Text) +dlPageToken + = lens _dlPageToken (\ s a -> s{_dlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DatasetsList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | The maximum number of results returned by this request. If unspecified, +-- defaults to 50. +dlPageSize :: Lens' DatasetsList' (Maybe Int32) +dlPageSize + = lens _dlPageSize (\ s a -> s{_dlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DatasetsList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DatasetsList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DatasetsList' where + type Rs DatasetsList' = ListDatasetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsList{..} + = go _dlQuotaUser _dlPrettyPrint _dlUserIp + _dlProjectNumber + _dlKey + _dlPageToken + _dlOauthToken + _dlPageSize + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsListAPI) r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Patch.hs new file mode 100644 index 000000000..0e2dfe025 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a dataset. This method supports patch semantics. +-- +-- /See:/ for @GenomicsDatasetsPatch@. +module Genomics.Datasets.Patch + ( + -- * REST Resource + DatasetsPatchAPI + + -- * Creating a Request + , datasetsPatch + , DatasetsPatch + + -- * Request Lenses + , dpQuotaUser + , dpPrettyPrint + , dpUserIp + , dpKey + , dpDatasetId + , dpOauthToken + , dpFields + , dpAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsPatch@ which the +-- 'DatasetsPatch' request conforms to. +type DatasetsPatchAPI = + "datasets" :> + Capture "datasetId" Text :> Patch '[JSON] Dataset + +-- | Updates a dataset. This method supports patch semantics. +-- +-- /See:/ 'datasetsPatch' smart constructor. +data DatasetsPatch = DatasetsPatch + { _dpQuotaUser :: !(Maybe Text) + , _dpPrettyPrint :: !Bool + , _dpUserIp :: !(Maybe Text) + , _dpKey :: !(Maybe Text) + , _dpDatasetId :: !Text + , _dpOauthToken :: !(Maybe Text) + , _dpFields :: !(Maybe Text) + , _dpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpQuotaUser' +-- +-- * 'dpPrettyPrint' +-- +-- * 'dpUserIp' +-- +-- * 'dpKey' +-- +-- * 'dpDatasetId' +-- +-- * 'dpOauthToken' +-- +-- * 'dpFields' +-- +-- * 'dpAlt' +datasetsPatch + :: Text -- ^ 'datasetId' + -> DatasetsPatch +datasetsPatch pDpDatasetId_ = + DatasetsPatch + { _dpQuotaUser = Nothing + , _dpPrettyPrint = True + , _dpUserIp = Nothing + , _dpKey = Nothing + , _dpDatasetId = pDpDatasetId_ + , _dpOauthToken = Nothing + , _dpFields = Nothing + , _dpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dpQuotaUser :: Lens' DatasetsPatch' (Maybe Text) +dpQuotaUser + = lens _dpQuotaUser (\ s a -> s{_dpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dpPrettyPrint :: Lens' DatasetsPatch' Bool +dpPrettyPrint + = lens _dpPrettyPrint + (\ s a -> s{_dpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dpUserIp :: Lens' DatasetsPatch' (Maybe Text) +dpUserIp = lens _dpUserIp (\ s a -> s{_dpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dpKey :: Lens' DatasetsPatch' (Maybe Text) +dpKey = lens _dpKey (\ s a -> s{_dpKey = a}) + +-- | The ID of the dataset to be updated. +dpDatasetId :: Lens' DatasetsPatch' Text +dpDatasetId + = lens _dpDatasetId (\ s a -> s{_dpDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dpOauthToken :: Lens' DatasetsPatch' (Maybe Text) +dpOauthToken + = lens _dpOauthToken (\ s a -> s{_dpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dpFields :: Lens' DatasetsPatch' (Maybe Text) +dpFields = lens _dpFields (\ s a -> s{_dpFields = a}) + +-- | Data format for the response. +dpAlt :: Lens' DatasetsPatch' Text +dpAlt = lens _dpAlt (\ s a -> s{_dpAlt = a}) + +instance GoogleRequest DatasetsPatch' where + type Rs DatasetsPatch' = Dataset + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsPatch{..} + = go _dpQuotaUser _dpPrettyPrint _dpUserIp _dpKey + _dpDatasetId + _dpOauthToken + _dpFields + _dpAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsPatchAPI) r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Undelete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Undelete.hs new file mode 100644 index 000000000..397f41c83 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Undelete.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Undelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Undeletes a dataset by restoring a dataset which was deleted via this +-- API. This operation is only possible for a week after the deletion +-- occurred. +-- +-- /See:/ for @GenomicsDatasetsUndelete@. +module Genomics.Datasets.Undelete + ( + -- * REST Resource + DatasetsUndeleteAPI + + -- * Creating a Request + , datasetsUndelete + , DatasetsUndelete + + -- * Request Lenses + , duQuotaUser + , duPrettyPrint + , duUserIp + , duKey + , duDatasetId + , duOauthToken + , duFields + , duAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsUndelete@ which the +-- 'DatasetsUndelete' request conforms to. +type DatasetsUndeleteAPI = + "datasets" :> + Capture "datasetId" Text :> + "undelete" :> Post '[JSON] Dataset + +-- | Undeletes a dataset by restoring a dataset which was deleted via this +-- API. This operation is only possible for a week after the deletion +-- occurred. +-- +-- /See:/ 'datasetsUndelete' smart constructor. +data DatasetsUndelete = DatasetsUndelete + { _duQuotaUser :: !(Maybe Text) + , _duPrettyPrint :: !Bool + , _duUserIp :: !(Maybe Text) + , _duKey :: !(Maybe Text) + , _duDatasetId :: !Text + , _duOauthToken :: !(Maybe Text) + , _duFields :: !(Maybe Text) + , _duAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsUndelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'duQuotaUser' +-- +-- * 'duPrettyPrint' +-- +-- * 'duUserIp' +-- +-- * 'duKey' +-- +-- * 'duDatasetId' +-- +-- * 'duOauthToken' +-- +-- * 'duFields' +-- +-- * 'duAlt' +datasetsUndelete + :: Text -- ^ 'datasetId' + -> DatasetsUndelete +datasetsUndelete pDuDatasetId_ = + DatasetsUndelete + { _duQuotaUser = Nothing + , _duPrettyPrint = True + , _duUserIp = Nothing + , _duKey = Nothing + , _duDatasetId = pDuDatasetId_ + , _duOauthToken = Nothing + , _duFields = Nothing + , _duAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +duQuotaUser :: Lens' DatasetsUndelete' (Maybe Text) +duQuotaUser + = lens _duQuotaUser (\ s a -> s{_duQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +duPrettyPrint :: Lens' DatasetsUndelete' Bool +duPrettyPrint + = lens _duPrettyPrint + (\ s a -> s{_duPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +duUserIp :: Lens' DatasetsUndelete' (Maybe Text) +duUserIp = lens _duUserIp (\ s a -> s{_duUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +duKey :: Lens' DatasetsUndelete' (Maybe Text) +duKey = lens _duKey (\ s a -> s{_duKey = a}) + +-- | The ID of the dataset to be undeleted. +duDatasetId :: Lens' DatasetsUndelete' Text +duDatasetId + = lens _duDatasetId (\ s a -> s{_duDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +duOauthToken :: Lens' DatasetsUndelete' (Maybe Text) +duOauthToken + = lens _duOauthToken (\ s a -> s{_duOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +duFields :: Lens' DatasetsUndelete' (Maybe Text) +duFields = lens _duFields (\ s a -> s{_duFields = a}) + +-- | Data format for the response. +duAlt :: Lens' DatasetsUndelete' Text +duAlt = lens _duAlt (\ s a -> s{_duAlt = a}) + +instance GoogleRequest DatasetsUndelete' where + type Rs DatasetsUndelete' = Dataset + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsUndelete{..} + = go _duQuotaUser _duPrettyPrint _duUserIp _duKey + _duDatasetId + _duOauthToken + _duFields + _duAlt + where go + = clientWithRoute + (Proxy :: Proxy DatasetsUndeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Update.hs new file mode 100644 index 000000000..d62eacbed --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Datasets/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Datasets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a dataset. +-- +-- /See:/ for @GenomicsDatasetsUpdate@. +module Genomics.Datasets.Update + ( + -- * REST Resource + DatasetsUpdateAPI + + -- * Creating a Request + , datasetsUpdate + , DatasetsUpdate + + -- * Request Lenses + , dQuotaUser + , dPrettyPrint + , dUserIp + , dKey + , dDatasetId + , dOauthToken + , dFields + , dAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsDatasetsUpdate@ which the +-- 'DatasetsUpdate' request conforms to. +type DatasetsUpdateAPI = + "datasets" :> + Capture "datasetId" Text :> Put '[JSON] Dataset + +-- | Updates a dataset. +-- +-- /See:/ 'datasetsUpdate' smart constructor. +data DatasetsUpdate = DatasetsUpdate + { _dQuotaUser :: !(Maybe Text) + , _dPrettyPrint :: !Bool + , _dUserIp :: !(Maybe Text) + , _dKey :: !(Maybe Text) + , _dDatasetId :: !Text + , _dOauthToken :: !(Maybe Text) + , _dFields :: !(Maybe Text) + , _dAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatasetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dQuotaUser' +-- +-- * 'dPrettyPrint' +-- +-- * 'dUserIp' +-- +-- * 'dKey' +-- +-- * 'dDatasetId' +-- +-- * 'dOauthToken' +-- +-- * 'dFields' +-- +-- * 'dAlt' +datasetsUpdate + :: Text -- ^ 'datasetId' + -> DatasetsUpdate +datasetsUpdate pDDatasetId_ = + DatasetsUpdate + { _dQuotaUser = Nothing + , _dPrettyPrint = True + , _dUserIp = Nothing + , _dKey = Nothing + , _dDatasetId = pDDatasetId_ + , _dOauthToken = Nothing + , _dFields = Nothing + , _dAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dQuotaUser :: Lens' DatasetsUpdate' (Maybe Text) +dQuotaUser + = lens _dQuotaUser (\ s a -> s{_dQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dPrettyPrint :: Lens' DatasetsUpdate' Bool +dPrettyPrint + = lens _dPrettyPrint (\ s a -> s{_dPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dUserIp :: Lens' DatasetsUpdate' (Maybe Text) +dUserIp = lens _dUserIp (\ s a -> s{_dUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dKey :: Lens' DatasetsUpdate' (Maybe Text) +dKey = lens _dKey (\ s a -> s{_dKey = a}) + +-- | The ID of the dataset to be updated. +dDatasetId :: Lens' DatasetsUpdate' Text +dDatasetId + = lens _dDatasetId (\ s a -> s{_dDatasetId = a}) + +-- | OAuth 2.0 token for the current user. +dOauthToken :: Lens' DatasetsUpdate' (Maybe Text) +dOauthToken + = lens _dOauthToken (\ s a -> s{_dOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dFields :: Lens' DatasetsUpdate' (Maybe Text) +dFields = lens _dFields (\ s a -> s{_dFields = a}) + +-- | Data format for the response. +dAlt :: Lens' DatasetsUpdate' Text +dAlt = lens _dAlt (\ s a -> s{_dAlt = a}) + +instance GoogleRequest DatasetsUpdate' where + type Rs DatasetsUpdate' = Dataset + request = requestWithRoute defReq genomicsURL + requestWithRoute r u DatasetsUpdate{..} + = go _dQuotaUser _dPrettyPrint _dUserIp _dKey + _dDatasetId + _dOauthToken + _dFields + _dAlt + where go + = clientWithRoute (Proxy :: Proxy DatasetsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Experimental/Jobs/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Experimental/Jobs/Create.hs new file mode 100644 index 000000000..17429d3ef --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Experimental/Jobs/Create.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Experimental.Jobs.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates and asynchronously runs an ad-hoc job. This is an experimental +-- call and may be removed or changed at any time. +-- +-- /See:/ for @GenomicsExperimentalJobsCreate@. +module Genomics.Experimental.Jobs.Create + ( + -- * REST Resource + ExperimentalJobsCreateAPI + + -- * Creating a Request + , experimentalJobsCreate + , ExperimentalJobsCreate + + -- * Request Lenses + , ejcQuotaUser + , ejcPrettyPrint + , ejcUserIp + , ejcKey + , ejcOauthToken + , ejcFields + , ejcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsExperimentalJobsCreate@ which the +-- 'ExperimentalJobsCreate' request conforms to. +type ExperimentalJobsCreateAPI = + "experimental" :> + "jobs" :> + "create" :> + Post '[JSON] ExperimentalCreateJobResponse + +-- | Creates and asynchronously runs an ad-hoc job. This is an experimental +-- call and may be removed or changed at any time. +-- +-- /See:/ 'experimentalJobsCreate' smart constructor. +data ExperimentalJobsCreate = ExperimentalJobsCreate + { _ejcQuotaUser :: !(Maybe Text) + , _ejcPrettyPrint :: !Bool + , _ejcUserIp :: !(Maybe Text) + , _ejcKey :: !(Maybe Text) + , _ejcOauthToken :: !(Maybe Text) + , _ejcFields :: !(Maybe Text) + , _ejcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExperimentalJobsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ejcQuotaUser' +-- +-- * 'ejcPrettyPrint' +-- +-- * 'ejcUserIp' +-- +-- * 'ejcKey' +-- +-- * 'ejcOauthToken' +-- +-- * 'ejcFields' +-- +-- * 'ejcAlt' +experimentalJobsCreate + :: ExperimentalJobsCreate +experimentalJobsCreate = + ExperimentalJobsCreate + { _ejcQuotaUser = Nothing + , _ejcPrettyPrint = True + , _ejcUserIp = Nothing + , _ejcKey = Nothing + , _ejcOauthToken = Nothing + , _ejcFields = Nothing + , _ejcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ejcQuotaUser :: Lens' ExperimentalJobsCreate' (Maybe Text) +ejcQuotaUser + = lens _ejcQuotaUser (\ s a -> s{_ejcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ejcPrettyPrint :: Lens' ExperimentalJobsCreate' Bool +ejcPrettyPrint + = lens _ejcPrettyPrint + (\ s a -> s{_ejcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ejcUserIp :: Lens' ExperimentalJobsCreate' (Maybe Text) +ejcUserIp + = lens _ejcUserIp (\ s a -> s{_ejcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ejcKey :: Lens' ExperimentalJobsCreate' (Maybe Text) +ejcKey = lens _ejcKey (\ s a -> s{_ejcKey = a}) + +-- | OAuth 2.0 token for the current user. +ejcOauthToken :: Lens' ExperimentalJobsCreate' (Maybe Text) +ejcOauthToken + = lens _ejcOauthToken + (\ s a -> s{_ejcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ejcFields :: Lens' ExperimentalJobsCreate' (Maybe Text) +ejcFields + = lens _ejcFields (\ s a -> s{_ejcFields = a}) + +-- | Data format for the response. +ejcAlt :: Lens' ExperimentalJobsCreate' Text +ejcAlt = lens _ejcAlt (\ s a -> s{_ejcAlt = a}) + +instance GoogleRequest ExperimentalJobsCreate' where + type Rs ExperimentalJobsCreate' = + ExperimentalCreateJobResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ExperimentalJobsCreate{..} + = go _ejcQuotaUser _ejcPrettyPrint _ejcUserIp _ejcKey + _ejcOauthToken + _ejcFields + _ejcAlt + where go + = clientWithRoute + (Proxy :: Proxy ExperimentalJobsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Cancel.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Cancel.hs new file mode 100644 index 000000000..008947509 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Cancel.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Jobs.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels a job by ID. Note that it is possible for partial results to be +-- generated and stored for cancelled jobs. +-- +-- /See:/ for @GenomicsJobsCancel@. +module Genomics.Jobs.Cancel + ( + -- * REST Resource + JobsCancelAPI + + -- * Creating a Request + , jobsCancel + , JobsCancel + + -- * Request Lenses + , jcQuotaUser + , jcPrettyPrint + , jcJobId + , jcUserIp + , jcKey + , jcOauthToken + , jcFields + , jcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsJobsCancel@ which the +-- 'JobsCancel' request conforms to. +type JobsCancelAPI = + "jobs" :> + Capture "jobId" Text :> "cancel" :> Post '[JSON] () + +-- | Cancels a job by ID. Note that it is possible for partial results to be +-- generated and stored for cancelled jobs. +-- +-- /See:/ 'jobsCancel' smart constructor. +data JobsCancel = JobsCancel + { _jcQuotaUser :: !(Maybe Text) + , _jcPrettyPrint :: !Bool + , _jcJobId :: !Text + , _jcUserIp :: !(Maybe Text) + , _jcKey :: !(Maybe Text) + , _jcOauthToken :: !(Maybe Text) + , _jcFields :: !(Maybe Text) + , _jcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcQuotaUser' +-- +-- * 'jcPrettyPrint' +-- +-- * 'jcJobId' +-- +-- * 'jcUserIp' +-- +-- * 'jcKey' +-- +-- * 'jcOauthToken' +-- +-- * 'jcFields' +-- +-- * 'jcAlt' +jobsCancel + :: Text -- ^ 'jobId' + -> JobsCancel +jobsCancel pJcJobId_ = + JobsCancel + { _jcQuotaUser = Nothing + , _jcPrettyPrint = True + , _jcJobId = pJcJobId_ + , _jcUserIp = Nothing + , _jcKey = Nothing + , _jcOauthToken = Nothing + , _jcFields = Nothing + , _jcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jcQuotaUser :: Lens' JobsCancel' (Maybe Text) +jcQuotaUser + = lens _jcQuotaUser (\ s a -> s{_jcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jcPrettyPrint :: Lens' JobsCancel' Bool +jcPrettyPrint + = lens _jcPrettyPrint + (\ s a -> s{_jcPrettyPrint = a}) + +-- | Required. The ID of the job. +jcJobId :: Lens' JobsCancel' Text +jcJobId = lens _jcJobId (\ s a -> s{_jcJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jcUserIp :: Lens' JobsCancel' (Maybe Text) +jcUserIp = lens _jcUserIp (\ s a -> s{_jcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jcKey :: Lens' JobsCancel' (Maybe Text) +jcKey = lens _jcKey (\ s a -> s{_jcKey = a}) + +-- | OAuth 2.0 token for the current user. +jcOauthToken :: Lens' JobsCancel' (Maybe Text) +jcOauthToken + = lens _jcOauthToken (\ s a -> s{_jcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jcFields :: Lens' JobsCancel' (Maybe Text) +jcFields = lens _jcFields (\ s a -> s{_jcFields = a}) + +-- | Data format for the response. +jcAlt :: Lens' JobsCancel' Text +jcAlt = lens _jcAlt (\ s a -> s{_jcAlt = a}) + +instance GoogleRequest JobsCancel' where + type Rs JobsCancel' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u JobsCancel{..} + = go _jcQuotaUser _jcPrettyPrint _jcJobId _jcUserIp + _jcKey + _jcOauthToken + _jcFields + _jcAlt + where go + = clientWithRoute (Proxy :: Proxy JobsCancelAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Get.hs new file mode 100644 index 000000000..83cac6b97 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Jobs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a job by ID. +-- +-- /See:/ for @GenomicsJobsGet@. +module Genomics.Jobs.Get + ( + -- * REST Resource + JobsGetAPI + + -- * Creating a Request + , jobsGet + , JobsGet + + -- * Request Lenses + , jgQuotaUser + , jgPrettyPrint + , jgJobId + , jgUserIp + , jgKey + , jgOauthToken + , jgFields + , jgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsJobsGet@ which the +-- 'JobsGet' request conforms to. +type JobsGetAPI = + "jobs" :> Capture "jobId" Text :> Get '[JSON] Job + +-- | Gets a job by ID. +-- +-- /See:/ 'jobsGet' smart constructor. +data JobsGet = JobsGet + { _jgQuotaUser :: !(Maybe Text) + , _jgPrettyPrint :: !Bool + , _jgJobId :: !Text + , _jgUserIp :: !(Maybe Text) + , _jgKey :: !(Maybe Text) + , _jgOauthToken :: !(Maybe Text) + , _jgFields :: !(Maybe Text) + , _jgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jgQuotaUser' +-- +-- * 'jgPrettyPrint' +-- +-- * 'jgJobId' +-- +-- * 'jgUserIp' +-- +-- * 'jgKey' +-- +-- * 'jgOauthToken' +-- +-- * 'jgFields' +-- +-- * 'jgAlt' +jobsGet + :: Text -- ^ 'jobId' + -> JobsGet +jobsGet pJgJobId_ = + JobsGet + { _jgQuotaUser = Nothing + , _jgPrettyPrint = True + , _jgJobId = pJgJobId_ + , _jgUserIp = Nothing + , _jgKey = Nothing + , _jgOauthToken = Nothing + , _jgFields = Nothing + , _jgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jgQuotaUser :: Lens' JobsGet' (Maybe Text) +jgQuotaUser + = lens _jgQuotaUser (\ s a -> s{_jgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jgPrettyPrint :: Lens' JobsGet' Bool +jgPrettyPrint + = lens _jgPrettyPrint + (\ s a -> s{_jgPrettyPrint = a}) + +-- | Required. The ID of the job. +jgJobId :: Lens' JobsGet' Text +jgJobId = lens _jgJobId (\ s a -> s{_jgJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jgUserIp :: Lens' JobsGet' (Maybe Text) +jgUserIp = lens _jgUserIp (\ s a -> s{_jgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jgKey :: Lens' JobsGet' (Maybe Text) +jgKey = lens _jgKey (\ s a -> s{_jgKey = a}) + +-- | OAuth 2.0 token for the current user. +jgOauthToken :: Lens' JobsGet' (Maybe Text) +jgOauthToken + = lens _jgOauthToken (\ s a -> s{_jgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jgFields :: Lens' JobsGet' (Maybe Text) +jgFields = lens _jgFields (\ s a -> s{_jgFields = a}) + +-- | Data format for the response. +jgAlt :: Lens' JobsGet' Text +jgAlt = lens _jgAlt (\ s a -> s{_jgAlt = a}) + +instance GoogleRequest JobsGet' where + type Rs JobsGet' = Job + request = requestWithRoute defReq genomicsURL + requestWithRoute r u JobsGet{..} + = go _jgQuotaUser _jgPrettyPrint _jgJobId _jgUserIp + _jgKey + _jgOauthToken + _jgFields + _jgAlt + where go + = clientWithRoute (Proxy :: Proxy JobsGetAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Search.hs new file mode 100644 index 000000000..7df4c0bd7 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Jobs/Search.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Jobs.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of jobs matching the criteria. +-- +-- /See:/ for @GenomicsJobsSearch@. +module Genomics.Jobs.Search + ( + -- * REST Resource + JobsSearchAPI + + -- * Creating a Request + , jobsSearch + , JobsSearch + + -- * Request Lenses + , jsQuotaUser + , jsPrettyPrint + , jsUserIp + , jsKey + , jsOauthToken + , jsFields + , jsAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsJobsSearch@ which the +-- 'JobsSearch' request conforms to. +type JobsSearchAPI = + "jobs" :> "search" :> Post '[JSON] SearchJobsResponse + +-- | Gets a list of jobs matching the criteria. +-- +-- /See:/ 'jobsSearch' smart constructor. +data JobsSearch = JobsSearch + { _jsQuotaUser :: !(Maybe Text) + , _jsPrettyPrint :: !Bool + , _jsUserIp :: !(Maybe Text) + , _jsKey :: !(Maybe Text) + , _jsOauthToken :: !(Maybe Text) + , _jsFields :: !(Maybe Text) + , _jsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsQuotaUser' +-- +-- * 'jsPrettyPrint' +-- +-- * 'jsUserIp' +-- +-- * 'jsKey' +-- +-- * 'jsOauthToken' +-- +-- * 'jsFields' +-- +-- * 'jsAlt' +jobsSearch + :: JobsSearch +jobsSearch = + JobsSearch + { _jsQuotaUser = Nothing + , _jsPrettyPrint = True + , _jsUserIp = Nothing + , _jsKey = Nothing + , _jsOauthToken = Nothing + , _jsFields = Nothing + , _jsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jsQuotaUser :: Lens' JobsSearch' (Maybe Text) +jsQuotaUser + = lens _jsQuotaUser (\ s a -> s{_jsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jsPrettyPrint :: Lens' JobsSearch' Bool +jsPrettyPrint + = lens _jsPrettyPrint + (\ s a -> s{_jsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jsUserIp :: Lens' JobsSearch' (Maybe Text) +jsUserIp = lens _jsUserIp (\ s a -> s{_jsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jsKey :: Lens' JobsSearch' (Maybe Text) +jsKey = lens _jsKey (\ s a -> s{_jsKey = a}) + +-- | OAuth 2.0 token for the current user. +jsOauthToken :: Lens' JobsSearch' (Maybe Text) +jsOauthToken + = lens _jsOauthToken (\ s a -> s{_jsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jsFields :: Lens' JobsSearch' (Maybe Text) +jsFields = lens _jsFields (\ s a -> s{_jsFields = a}) + +-- | Data format for the response. +jsAlt :: Lens' JobsSearch' Text +jsAlt = lens _jsAlt (\ s a -> s{_jsAlt = a}) + +instance GoogleRequest JobsSearch' where + type Rs JobsSearch' = SearchJobsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u JobsSearch{..} + = go _jsQuotaUser _jsPrettyPrint _jsUserIp _jsKey + _jsOauthToken + _jsFields + _jsAlt + where go + = clientWithRoute (Proxy :: Proxy JobsSearchAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Align.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Align.hs new file mode 100644 index 000000000..41ba2ad39 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Align.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Align +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Aligns read data from existing read group sets or files from Google +-- Cloud Storage. See the alignment and variant calling documentation for +-- more details. +-- +-- /See:/ for @GenomicsReadgroupsetsAlign@. +module Genomics.Readgroupsets.Align + ( + -- * REST Resource + ReadgroupsetsAlignAPI + + -- * Creating a Request + , readgroupsetsAlign + , ReadgroupsetsAlign + + -- * Request Lenses + , raQuotaUser + , raPrettyPrint + , raUserIp + , raKey + , raOauthToken + , raFields + , raAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsAlign@ which the +-- 'ReadgroupsetsAlign' request conforms to. +type ReadgroupsetsAlignAPI = + "readgroupsets" :> + "align" :> Post '[JSON] AlignReadGroupSetsResponse + +-- | Aligns read data from existing read group sets or files from Google +-- Cloud Storage. See the alignment and variant calling documentation for +-- more details. +-- +-- /See:/ 'readgroupsetsAlign' smart constructor. +data ReadgroupsetsAlign = ReadgroupsetsAlign + { _raQuotaUser :: !(Maybe Text) + , _raPrettyPrint :: !Bool + , _raUserIp :: !(Maybe Text) + , _raKey :: !(Maybe Text) + , _raOauthToken :: !(Maybe Text) + , _raFields :: !(Maybe Text) + , _raAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsAlign'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'raQuotaUser' +-- +-- * 'raPrettyPrint' +-- +-- * 'raUserIp' +-- +-- * 'raKey' +-- +-- * 'raOauthToken' +-- +-- * 'raFields' +-- +-- * 'raAlt' +readgroupsetsAlign + :: ReadgroupsetsAlign +readgroupsetsAlign = + ReadgroupsetsAlign + { _raQuotaUser = Nothing + , _raPrettyPrint = True + , _raUserIp = Nothing + , _raKey = Nothing + , _raOauthToken = Nothing + , _raFields = Nothing + , _raAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +raQuotaUser :: Lens' ReadgroupsetsAlign' (Maybe Text) +raQuotaUser + = lens _raQuotaUser (\ s a -> s{_raQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +raPrettyPrint :: Lens' ReadgroupsetsAlign' Bool +raPrettyPrint + = lens _raPrettyPrint + (\ s a -> s{_raPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +raUserIp :: Lens' ReadgroupsetsAlign' (Maybe Text) +raUserIp = lens _raUserIp (\ s a -> s{_raUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +raKey :: Lens' ReadgroupsetsAlign' (Maybe Text) +raKey = lens _raKey (\ s a -> s{_raKey = a}) + +-- | OAuth 2.0 token for the current user. +raOauthToken :: Lens' ReadgroupsetsAlign' (Maybe Text) +raOauthToken + = lens _raOauthToken (\ s a -> s{_raOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +raFields :: Lens' ReadgroupsetsAlign' (Maybe Text) +raFields = lens _raFields (\ s a -> s{_raFields = a}) + +-- | Data format for the response. +raAlt :: Lens' ReadgroupsetsAlign' Text +raAlt = lens _raAlt (\ s a -> s{_raAlt = a}) + +instance GoogleRequest ReadgroupsetsAlign' where + type Rs ReadgroupsetsAlign' = + AlignReadGroupSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsAlign{..} + = go _raQuotaUser _raPrettyPrint _raUserIp _raKey + _raOauthToken + _raFields + _raAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsAlignAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Call.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Call.hs new file mode 100644 index 000000000..88f02d1a1 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Call.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Call +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Calls variants on read data from existing read group sets or files from +-- Google Cloud Storage. See the alignment and variant calling +-- documentation for more details. +-- +-- /See:/ for @GenomicsReadgroupsetsCall@. +module Genomics.Readgroupsets.Call + ( + -- * REST Resource + ReadgroupsetsCallAPI + + -- * Creating a Request + , readgroupsetsCall + , ReadgroupsetsCall + + -- * Request Lenses + , rcQuotaUser + , rcPrettyPrint + , rcUserIp + , rcKey + , rcOauthToken + , rcFields + , rcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsCall@ which the +-- 'ReadgroupsetsCall' request conforms to. +type ReadgroupsetsCallAPI = + "readgroupsets" :> + "call" :> Post '[JSON] CallReadGroupSetsResponse + +-- | Calls variants on read data from existing read group sets or files from +-- Google Cloud Storage. See the alignment and variant calling +-- documentation for more details. +-- +-- /See:/ 'readgroupsetsCall' smart constructor. +data ReadgroupsetsCall = ReadgroupsetsCall + { _rcQuotaUser :: !(Maybe Text) + , _rcPrettyPrint :: !Bool + , _rcUserIp :: !(Maybe Text) + , _rcKey :: !(Maybe Text) + , _rcOauthToken :: !(Maybe Text) + , _rcFields :: !(Maybe Text) + , _rcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsCall'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcQuotaUser' +-- +-- * 'rcPrettyPrint' +-- +-- * 'rcUserIp' +-- +-- * 'rcKey' +-- +-- * 'rcOauthToken' +-- +-- * 'rcFields' +-- +-- * 'rcAlt' +readgroupsetsCall + :: ReadgroupsetsCall +readgroupsetsCall = + ReadgroupsetsCall + { _rcQuotaUser = Nothing + , _rcPrettyPrint = True + , _rcUserIp = Nothing + , _rcKey = Nothing + , _rcOauthToken = Nothing + , _rcFields = Nothing + , _rcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcQuotaUser :: Lens' ReadgroupsetsCall' (Maybe Text) +rcQuotaUser + = lens _rcQuotaUser (\ s a -> s{_rcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcPrettyPrint :: Lens' ReadgroupsetsCall' Bool +rcPrettyPrint + = lens _rcPrettyPrint + (\ s a -> s{_rcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcUserIp :: Lens' ReadgroupsetsCall' (Maybe Text) +rcUserIp = lens _rcUserIp (\ s a -> s{_rcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcKey :: Lens' ReadgroupsetsCall' (Maybe Text) +rcKey = lens _rcKey (\ s a -> s{_rcKey = a}) + +-- | OAuth 2.0 token for the current user. +rcOauthToken :: Lens' ReadgroupsetsCall' (Maybe Text) +rcOauthToken + = lens _rcOauthToken (\ s a -> s{_rcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcFields :: Lens' ReadgroupsetsCall' (Maybe Text) +rcFields = lens _rcFields (\ s a -> s{_rcFields = a}) + +-- | Data format for the response. +rcAlt :: Lens' ReadgroupsetsCall' Text +rcAlt = lens _rcAlt (\ s a -> s{_rcAlt = a}) + +instance GoogleRequest ReadgroupsetsCall' where + type Rs ReadgroupsetsCall' = + CallReadGroupSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsCall{..} + = go _rcQuotaUser _rcPrettyPrint _rcUserIp _rcKey + _rcOauthToken + _rcFields + _rcAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsCallAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Coveragebuckets/List.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Coveragebuckets/List.hs new file mode 100644 index 000000000..3a85b5d9f --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Coveragebuckets/List.hs @@ -0,0 +1,263 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Coveragebuckets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists fixed width coverage buckets for a read group set, each of which +-- correspond to a range of a reference sequence. Each bucket summarizes +-- coverage information across its corresponding genomic range. Coverage is +-- defined as the number of reads which are aligned to a given base in the +-- reference sequence. Coverage buckets are available at several +-- precomputed bucket widths, enabling retrieval of various coverage \'zoom +-- levels\'. The caller must have READ permissions for the target read +-- group set. +-- +-- /See:/ for @GenomicsReadgroupsetsCoveragebucketsList@. +module Genomics.Readgroupsets.Coveragebuckets.List + ( + -- * REST Resource + ReadgroupsetsCoveragebucketsListAPI + + -- * Creating a Request + , readgroupsetsCoveragebucketsList + , ReadgroupsetsCoveragebucketsList + + -- * Request Lenses + , rclQuotaUser + , rclPrettyPrint + , rclReadGroupSetId + , rclUserIp + , rclRangeEnd + , rclRangeStart + , rclTargetBucketWidth + , rclKey + , rclRangeReferenceName + , rclPageToken + , rclOauthToken + , rclPageSize + , rclFields + , rclAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsCoveragebucketsList@ which the +-- 'ReadgroupsetsCoveragebucketsList' request conforms to. +type ReadgroupsetsCoveragebucketsListAPI = + "readgroupsets" :> + Capture "readGroupSetId" Text :> + "coveragebuckets" :> + QueryParam "range.end" Int64 :> + QueryParam "range.start" Int64 :> + QueryParam "targetBucketWidth" Int64 :> + QueryParam "range.referenceName" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListCoverageBucketsResponse + +-- | Lists fixed width coverage buckets for a read group set, each of which +-- correspond to a range of a reference sequence. Each bucket summarizes +-- coverage information across its corresponding genomic range. Coverage is +-- defined as the number of reads which are aligned to a given base in the +-- reference sequence. Coverage buckets are available at several +-- precomputed bucket widths, enabling retrieval of various coverage \'zoom +-- levels\'. The caller must have READ permissions for the target read +-- group set. +-- +-- /See:/ 'readgroupsetsCoveragebucketsList' smart constructor. +data ReadgroupsetsCoveragebucketsList = ReadgroupsetsCoveragebucketsList + { _rclQuotaUser :: !(Maybe Text) + , _rclPrettyPrint :: !Bool + , _rclReadGroupSetId :: !Text + , _rclUserIp :: !(Maybe Text) + , _rclRangeEnd :: !(Maybe Int64) + , _rclRangeStart :: !(Maybe Int64) + , _rclTargetBucketWidth :: !(Maybe Int64) + , _rclKey :: !(Maybe Text) + , _rclRangeReferenceName :: !(Maybe Text) + , _rclPageToken :: !(Maybe Text) + , _rclOauthToken :: !(Maybe Text) + , _rclPageSize :: !(Maybe Int32) + , _rclFields :: !(Maybe Text) + , _rclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsCoveragebucketsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rclQuotaUser' +-- +-- * 'rclPrettyPrint' +-- +-- * 'rclReadGroupSetId' +-- +-- * 'rclUserIp' +-- +-- * 'rclRangeEnd' +-- +-- * 'rclRangeStart' +-- +-- * 'rclTargetBucketWidth' +-- +-- * 'rclKey' +-- +-- * 'rclRangeReferenceName' +-- +-- * 'rclPageToken' +-- +-- * 'rclOauthToken' +-- +-- * 'rclPageSize' +-- +-- * 'rclFields' +-- +-- * 'rclAlt' +readgroupsetsCoveragebucketsList + :: Text -- ^ 'readGroupSetId' + -> ReadgroupsetsCoveragebucketsList +readgroupsetsCoveragebucketsList pRclReadGroupSetId_ = + ReadgroupsetsCoveragebucketsList + { _rclQuotaUser = Nothing + , _rclPrettyPrint = True + , _rclReadGroupSetId = pRclReadGroupSetId_ + , _rclUserIp = Nothing + , _rclRangeEnd = Nothing + , _rclRangeStart = Nothing + , _rclTargetBucketWidth = Nothing + , _rclKey = Nothing + , _rclRangeReferenceName = Nothing + , _rclPageToken = Nothing + , _rclOauthToken = Nothing + , _rclPageSize = Nothing + , _rclFields = Nothing + , _rclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rclQuotaUser :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclQuotaUser + = lens _rclQuotaUser (\ s a -> s{_rclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rclPrettyPrint :: Lens' ReadgroupsetsCoveragebucketsList' Bool +rclPrettyPrint + = lens _rclPrettyPrint + (\ s a -> s{_rclPrettyPrint = a}) + +-- | Required. The ID of the read group set over which coverage is requested. +rclReadGroupSetId :: Lens' ReadgroupsetsCoveragebucketsList' Text +rclReadGroupSetId + = lens _rclReadGroupSetId + (\ s a -> s{_rclReadGroupSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rclUserIp :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclUserIp + = lens _rclUserIp (\ s a -> s{_rclUserIp = a}) + +-- | The end position of the range on the reference, 0-based exclusive. If +-- specified, referenceName must also be specified. +rclRangeEnd :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Int64) +rclRangeEnd + = lens _rclRangeEnd (\ s a -> s{_rclRangeEnd = a}) + +-- | The start position of the range on the reference, 0-based inclusive. If +-- specified, referenceName must also be specified. +rclRangeStart :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Int64) +rclRangeStart + = lens _rclRangeStart + (\ s a -> s{_rclRangeStart = a}) + +-- | The desired width of each reported coverage bucket in base pairs. This +-- will be rounded down to the nearest precomputed bucket width; the value +-- of which is returned as bucketWidth in the response. Defaults to +-- infinity (each bucket spans an entire reference sequence) or the length +-- of the target range, if specified. The smallest precomputed bucketWidth +-- is currently 2048 base pairs; this is subject to change. +rclTargetBucketWidth :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Int64) +rclTargetBucketWidth + = lens _rclTargetBucketWidth + (\ s a -> s{_rclTargetBucketWidth = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rclKey :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclKey = lens _rclKey (\ s a -> s{_rclKey = a}) + +-- | The reference sequence name, for example chr1, 1, or chrX. +rclRangeReferenceName :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclRangeReferenceName + = lens _rclRangeReferenceName + (\ s a -> s{_rclRangeReferenceName = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rclPageToken :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclPageToken + = lens _rclPageToken (\ s a -> s{_rclPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rclOauthToken :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclOauthToken + = lens _rclOauthToken + (\ s a -> s{_rclOauthToken = a}) + +-- | The maximum number of results to return in a single page. If +-- unspecified, defaults to 1024. The maximum value is 2048. +rclPageSize :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Int32) +rclPageSize + = lens _rclPageSize (\ s a -> s{_rclPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +rclFields :: Lens' ReadgroupsetsCoveragebucketsList' (Maybe Text) +rclFields + = lens _rclFields (\ s a -> s{_rclFields = a}) + +-- | Data format for the response. +rclAlt :: Lens' ReadgroupsetsCoveragebucketsList' Text +rclAlt = lens _rclAlt (\ s a -> s{_rclAlt = a}) + +instance GoogleRequest + ReadgroupsetsCoveragebucketsList' where + type Rs ReadgroupsetsCoveragebucketsList' = + ListCoverageBucketsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u + ReadgroupsetsCoveragebucketsList{..} + = go _rclQuotaUser _rclPrettyPrint _rclReadGroupSetId + _rclUserIp + _rclRangeEnd + _rclRangeStart + _rclTargetBucketWidth + _rclKey + _rclRangeReferenceName + _rclPageToken + _rclOauthToken + _rclPageSize + _rclFields + _rclAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsCoveragebucketsListAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Delete.hs new file mode 100644 index 000000000..631855c15 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Delete.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a read group set. +-- +-- /See:/ for @GenomicsReadgroupsetsDelete@. +module Genomics.Readgroupsets.Delete + ( + -- * REST Resource + ReadgroupsetsDeleteAPI + + -- * Creating a Request + , readgroupsetsDelete + , ReadgroupsetsDelete + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdReadGroupSetId + , rdUserIp + , rdKey + , rdOauthToken + , rdFields + , rdAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsDelete@ which the +-- 'ReadgroupsetsDelete' request conforms to. +type ReadgroupsetsDeleteAPI = + "readgroupsets" :> + Capture "readGroupSetId" Text :> Delete '[JSON] () + +-- | Deletes a read group set. +-- +-- /See:/ 'readgroupsetsDelete' smart constructor. +data ReadgroupsetsDelete = ReadgroupsetsDelete + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdReadGroupSetId :: !Text + , _rdUserIp :: !(Maybe Text) + , _rdKey :: !(Maybe Text) + , _rdOauthToken :: !(Maybe Text) + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdReadGroupSetId' +-- +-- * 'rdUserIp' +-- +-- * 'rdKey' +-- +-- * 'rdOauthToken' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +readgroupsetsDelete + :: Text -- ^ 'readGroupSetId' + -> ReadgroupsetsDelete +readgroupsetsDelete pRdReadGroupSetId_ = + ReadgroupsetsDelete + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdReadGroupSetId = pRdReadGroupSetId_ + , _rdUserIp = Nothing + , _rdKey = Nothing + , _rdOauthToken = Nothing + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' ReadgroupsetsDelete' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' ReadgroupsetsDelete' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | The ID of the read group set to be deleted. The caller must have WRITE +-- permissions to the dataset associated with this read group set. +rdReadGroupSetId :: Lens' ReadgroupsetsDelete' Text +rdReadGroupSetId + = lens _rdReadGroupSetId + (\ s a -> s{_rdReadGroupSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' ReadgroupsetsDelete' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' ReadgroupsetsDelete' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' ReadgroupsetsDelete' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' ReadgroupsetsDelete' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' ReadgroupsetsDelete' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest ReadgroupsetsDelete' where + type Rs ReadgroupsetsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsDelete{..} + = go _rdQuotaUser _rdPrettyPrint _rdReadGroupSetId + _rdUserIp + _rdKey + _rdOauthToken + _rdFields + _rdAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Export.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Export.hs new file mode 100644 index 000000000..e7b4a139b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Export.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Export +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Exports read group sets to a BAM file in Google Cloud Storage. Note that +-- currently there may be some differences between exported BAM files and +-- the original BAM file at the time of import. See ImportReadGroupSets for +-- details. +-- +-- /See:/ for @GenomicsReadgroupsetsExport@. +module Genomics.Readgroupsets.Export + ( + -- * REST Resource + ReadgroupsetsExportAPI + + -- * Creating a Request + , readgroupsetsExport + , ReadgroupsetsExport + + -- * Request Lenses + , reQuotaUser + , rePrettyPrint + , reUserIp + , reKey + , reOauthToken + , reFields + , reAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsExport@ which the +-- 'ReadgroupsetsExport' request conforms to. +type ReadgroupsetsExportAPI = + "readgroupsets" :> + "export" :> Post '[JSON] ExportReadGroupSetsResponse + +-- | Exports read group sets to a BAM file in Google Cloud Storage. Note that +-- currently there may be some differences between exported BAM files and +-- the original BAM file at the time of import. See ImportReadGroupSets for +-- details. +-- +-- /See:/ 'readgroupsetsExport' smart constructor. +data ReadgroupsetsExport = ReadgroupsetsExport + { _reQuotaUser :: !(Maybe Text) + , _rePrettyPrint :: !Bool + , _reUserIp :: !(Maybe Text) + , _reKey :: !(Maybe Text) + , _reOauthToken :: !(Maybe Text) + , _reFields :: !(Maybe Text) + , _reAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsExport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'reQuotaUser' +-- +-- * 'rePrettyPrint' +-- +-- * 'reUserIp' +-- +-- * 'reKey' +-- +-- * 'reOauthToken' +-- +-- * 'reFields' +-- +-- * 'reAlt' +readgroupsetsExport + :: ReadgroupsetsExport +readgroupsetsExport = + ReadgroupsetsExport + { _reQuotaUser = Nothing + , _rePrettyPrint = True + , _reUserIp = Nothing + , _reKey = Nothing + , _reOauthToken = Nothing + , _reFields = Nothing + , _reAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +reQuotaUser :: Lens' ReadgroupsetsExport' (Maybe Text) +reQuotaUser + = lens _reQuotaUser (\ s a -> s{_reQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rePrettyPrint :: Lens' ReadgroupsetsExport' Bool +rePrettyPrint + = lens _rePrettyPrint + (\ s a -> s{_rePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +reUserIp :: Lens' ReadgroupsetsExport' (Maybe Text) +reUserIp = lens _reUserIp (\ s a -> s{_reUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +reKey :: Lens' ReadgroupsetsExport' (Maybe Text) +reKey = lens _reKey (\ s a -> s{_reKey = a}) + +-- | OAuth 2.0 token for the current user. +reOauthToken :: Lens' ReadgroupsetsExport' (Maybe Text) +reOauthToken + = lens _reOauthToken (\ s a -> s{_reOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +reFields :: Lens' ReadgroupsetsExport' (Maybe Text) +reFields = lens _reFields (\ s a -> s{_reFields = a}) + +-- | Data format for the response. +reAlt :: Lens' ReadgroupsetsExport' Text +reAlt = lens _reAlt (\ s a -> s{_reAlt = a}) + +instance GoogleRequest ReadgroupsetsExport' where + type Rs ReadgroupsetsExport' = + ExportReadGroupSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsExport{..} + = go _reQuotaUser _rePrettyPrint _reUserIp _reKey + _reOauthToken + _reFields + _reAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsExportAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Get.hs new file mode 100644 index 000000000..c29e30f2d --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Get.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a read group set by ID. +-- +-- /See:/ for @GenomicsReadgroupsetsGet@. +module Genomics.Readgroupsets.Get + ( + -- * REST Resource + ReadgroupsetsGetAPI + + -- * Creating a Request + , readgroupsetsGet + , ReadgroupsetsGet + + -- * Request Lenses + , reaQuotaUser + , reaPrettyPrint + , reaReadGroupSetId + , reaUserIp + , reaKey + , reaOauthToken + , reaFields + , reaAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsGet@ which the +-- 'ReadgroupsetsGet' request conforms to. +type ReadgroupsetsGetAPI = + "readgroupsets" :> + Capture "readGroupSetId" Text :> + Get '[JSON] ReadGroupSet + +-- | Gets a read group set by ID. +-- +-- /See:/ 'readgroupsetsGet' smart constructor. +data ReadgroupsetsGet = ReadgroupsetsGet + { _reaQuotaUser :: !(Maybe Text) + , _reaPrettyPrint :: !Bool + , _reaReadGroupSetId :: !Text + , _reaUserIp :: !(Maybe Text) + , _reaKey :: !(Maybe Text) + , _reaOauthToken :: !(Maybe Text) + , _reaFields :: !(Maybe Text) + , _reaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'reaQuotaUser' +-- +-- * 'reaPrettyPrint' +-- +-- * 'reaReadGroupSetId' +-- +-- * 'reaUserIp' +-- +-- * 'reaKey' +-- +-- * 'reaOauthToken' +-- +-- * 'reaFields' +-- +-- * 'reaAlt' +readgroupsetsGet + :: Text -- ^ 'readGroupSetId' + -> ReadgroupsetsGet +readgroupsetsGet pReaReadGroupSetId_ = + ReadgroupsetsGet + { _reaQuotaUser = Nothing + , _reaPrettyPrint = True + , _reaReadGroupSetId = pReaReadGroupSetId_ + , _reaUserIp = Nothing + , _reaKey = Nothing + , _reaOauthToken = Nothing + , _reaFields = Nothing + , _reaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +reaQuotaUser :: Lens' ReadgroupsetsGet' (Maybe Text) +reaQuotaUser + = lens _reaQuotaUser (\ s a -> s{_reaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +reaPrettyPrint :: Lens' ReadgroupsetsGet' Bool +reaPrettyPrint + = lens _reaPrettyPrint + (\ s a -> s{_reaPrettyPrint = a}) + +-- | The ID of the read group set. +reaReadGroupSetId :: Lens' ReadgroupsetsGet' Text +reaReadGroupSetId + = lens _reaReadGroupSetId + (\ s a -> s{_reaReadGroupSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +reaUserIp :: Lens' ReadgroupsetsGet' (Maybe Text) +reaUserIp + = lens _reaUserIp (\ s a -> s{_reaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +reaKey :: Lens' ReadgroupsetsGet' (Maybe Text) +reaKey = lens _reaKey (\ s a -> s{_reaKey = a}) + +-- | OAuth 2.0 token for the current user. +reaOauthToken :: Lens' ReadgroupsetsGet' (Maybe Text) +reaOauthToken + = lens _reaOauthToken + (\ s a -> s{_reaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +reaFields :: Lens' ReadgroupsetsGet' (Maybe Text) +reaFields + = lens _reaFields (\ s a -> s{_reaFields = a}) + +-- | Data format for the response. +reaAlt :: Lens' ReadgroupsetsGet' Text +reaAlt = lens _reaAlt (\ s a -> s{_reaAlt = a}) + +instance GoogleRequest ReadgroupsetsGet' where + type Rs ReadgroupsetsGet' = ReadGroupSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsGet{..} + = go _reaQuotaUser _reaPrettyPrint _reaReadGroupSetId + _reaUserIp + _reaKey + _reaOauthToken + _reaFields + _reaAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsGetAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Import.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Import.hs new file mode 100644 index 000000000..166cf6e59 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Import.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Import +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates read group sets by asynchronously importing the provided +-- information. The caller must have WRITE permissions to the dataset. +-- Notes on BAM import: - Tags will be converted to strings - tag types are +-- not preserved - Comments (\'CO) in the input file header are not +-- imported - Original order of reference headers is not preserved - Any +-- reverse stranded unmapped reads will be reverse complemented, and their +-- qualities (and \"BQ\" tag, if any) will be reversed - Unmapped reads +-- will be stripped of positional information (referenceName and position) +-- +-- /See:/ for @GenomicsReadgroupsetsImport@. +module Genomics.Readgroupsets.Import + ( + -- * REST Resource + ReadgroupsetsImportAPI + + -- * Creating a Request + , readgroupsetsImport + , ReadgroupsetsImport + + -- * Request Lenses + , riQuotaUser + , riPrettyPrint + , riUserIp + , riKey + , riOauthToken + , riFields + , riAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsImport@ which the +-- 'ReadgroupsetsImport' request conforms to. +type ReadgroupsetsImportAPI = + "readgroupsets" :> + "import" :> Post '[JSON] ImportReadGroupSetsResponse + +-- | Creates read group sets by asynchronously importing the provided +-- information. The caller must have WRITE permissions to the dataset. +-- Notes on BAM import: - Tags will be converted to strings - tag types are +-- not preserved - Comments (\'CO) in the input file header are not +-- imported - Original order of reference headers is not preserved - Any +-- reverse stranded unmapped reads will be reverse complemented, and their +-- qualities (and \"BQ\" tag, if any) will be reversed - Unmapped reads +-- will be stripped of positional information (referenceName and position) +-- +-- /See:/ 'readgroupsetsImport' smart constructor. +data ReadgroupsetsImport = ReadgroupsetsImport + { _riQuotaUser :: !(Maybe Text) + , _riPrettyPrint :: !Bool + , _riUserIp :: !(Maybe Text) + , _riKey :: !(Maybe Text) + , _riOauthToken :: !(Maybe Text) + , _riFields :: !(Maybe Text) + , _riAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsImport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riQuotaUser' +-- +-- * 'riPrettyPrint' +-- +-- * 'riUserIp' +-- +-- * 'riKey' +-- +-- * 'riOauthToken' +-- +-- * 'riFields' +-- +-- * 'riAlt' +readgroupsetsImport + :: ReadgroupsetsImport +readgroupsetsImport = + ReadgroupsetsImport + { _riQuotaUser = Nothing + , _riPrettyPrint = True + , _riUserIp = Nothing + , _riKey = Nothing + , _riOauthToken = Nothing + , _riFields = Nothing + , _riAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +riQuotaUser :: Lens' ReadgroupsetsImport' (Maybe Text) +riQuotaUser + = lens _riQuotaUser (\ s a -> s{_riQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +riPrettyPrint :: Lens' ReadgroupsetsImport' Bool +riPrettyPrint + = lens _riPrettyPrint + (\ s a -> s{_riPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +riUserIp :: Lens' ReadgroupsetsImport' (Maybe Text) +riUserIp = lens _riUserIp (\ s a -> s{_riUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +riKey :: Lens' ReadgroupsetsImport' (Maybe Text) +riKey = lens _riKey (\ s a -> s{_riKey = a}) + +-- | OAuth 2.0 token for the current user. +riOauthToken :: Lens' ReadgroupsetsImport' (Maybe Text) +riOauthToken + = lens _riOauthToken (\ s a -> s{_riOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +riFields :: Lens' ReadgroupsetsImport' (Maybe Text) +riFields = lens _riFields (\ s a -> s{_riFields = a}) + +-- | Data format for the response. +riAlt :: Lens' ReadgroupsetsImport' Text +riAlt = lens _riAlt (\ s a -> s{_riAlt = a}) + +instance GoogleRequest ReadgroupsetsImport' where + type Rs ReadgroupsetsImport' = + ImportReadGroupSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsImport{..} + = go _riQuotaUser _riPrettyPrint _riUserIp _riKey + _riOauthToken + _riFields + _riAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsImportAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Patch.hs new file mode 100644 index 000000000..7b1c9122f --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Patch.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a read group set. This method supports patch semantics. +-- +-- /See:/ for @GenomicsReadgroupsetsPatch@. +module Genomics.Readgroupsets.Patch + ( + -- * REST Resource + ReadgroupsetsPatchAPI + + -- * Creating a Request + , readgroupsetsPatch + , ReadgroupsetsPatch + + -- * Request Lenses + , rpQuotaUser + , rpPrettyPrint + , rpReadGroupSetId + , rpUserIp + , rpKey + , rpOauthToken + , rpFields + , rpAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsPatch@ which the +-- 'ReadgroupsetsPatch' request conforms to. +type ReadgroupsetsPatchAPI = + "readgroupsets" :> + Capture "readGroupSetId" Text :> + Patch '[JSON] ReadGroupSet + +-- | Updates a read group set. This method supports patch semantics. +-- +-- /See:/ 'readgroupsetsPatch' smart constructor. +data ReadgroupsetsPatch = ReadgroupsetsPatch + { _rpQuotaUser :: !(Maybe Text) + , _rpPrettyPrint :: !Bool + , _rpReadGroupSetId :: !Text + , _rpUserIp :: !(Maybe Text) + , _rpKey :: !(Maybe Text) + , _rpOauthToken :: !(Maybe Text) + , _rpFields :: !(Maybe Text) + , _rpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpQuotaUser' +-- +-- * 'rpPrettyPrint' +-- +-- * 'rpReadGroupSetId' +-- +-- * 'rpUserIp' +-- +-- * 'rpKey' +-- +-- * 'rpOauthToken' +-- +-- * 'rpFields' +-- +-- * 'rpAlt' +readgroupsetsPatch + :: Text -- ^ 'readGroupSetId' + -> ReadgroupsetsPatch +readgroupsetsPatch pRpReadGroupSetId_ = + ReadgroupsetsPatch + { _rpQuotaUser = Nothing + , _rpPrettyPrint = True + , _rpReadGroupSetId = pRpReadGroupSetId_ + , _rpUserIp = Nothing + , _rpKey = Nothing + , _rpOauthToken = Nothing + , _rpFields = Nothing + , _rpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpQuotaUser :: Lens' ReadgroupsetsPatch' (Maybe Text) +rpQuotaUser + = lens _rpQuotaUser (\ s a -> s{_rpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpPrettyPrint :: Lens' ReadgroupsetsPatch' Bool +rpPrettyPrint + = lens _rpPrettyPrint + (\ s a -> s{_rpPrettyPrint = a}) + +-- | The ID of the read group set to be updated. The caller must have WRITE +-- permissions to the dataset associated with this read group set. +rpReadGroupSetId :: Lens' ReadgroupsetsPatch' Text +rpReadGroupSetId + = lens _rpReadGroupSetId + (\ s a -> s{_rpReadGroupSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpUserIp :: Lens' ReadgroupsetsPatch' (Maybe Text) +rpUserIp = lens _rpUserIp (\ s a -> s{_rpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpKey :: Lens' ReadgroupsetsPatch' (Maybe Text) +rpKey = lens _rpKey (\ s a -> s{_rpKey = a}) + +-- | OAuth 2.0 token for the current user. +rpOauthToken :: Lens' ReadgroupsetsPatch' (Maybe Text) +rpOauthToken + = lens _rpOauthToken (\ s a -> s{_rpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rpFields :: Lens' ReadgroupsetsPatch' (Maybe Text) +rpFields = lens _rpFields (\ s a -> s{_rpFields = a}) + +-- | Data format for the response. +rpAlt :: Lens' ReadgroupsetsPatch' Text +rpAlt = lens _rpAlt (\ s a -> s{_rpAlt = a}) + +instance GoogleRequest ReadgroupsetsPatch' where + type Rs ReadgroupsetsPatch' = ReadGroupSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsPatch{..} + = go _rpQuotaUser _rpPrettyPrint _rpReadGroupSetId + _rpUserIp + _rpKey + _rpOauthToken + _rpFields + _rpAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsPatchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Search.hs new file mode 100644 index 000000000..6fe676b66 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Search.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for read group sets matching the criteria. Implements +-- GlobalAllianceApi.searchReadGroupSets. +-- +-- /See:/ for @GenomicsReadgroupsetsSearch@. +module Genomics.Readgroupsets.Search + ( + -- * REST Resource + ReadgroupsetsSearchAPI + + -- * Creating a Request + , readgroupsetsSearch + , ReadgroupsetsSearch + + -- * Request Lenses + , rQuotaUser + , rPrettyPrint + , rUserIp + , rKey + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsSearch@ which the +-- 'ReadgroupsetsSearch' request conforms to. +type ReadgroupsetsSearchAPI = + "readgroupsets" :> + "search" :> Post '[JSON] SearchReadGroupSetsResponse + +-- | Searches for read group sets matching the criteria. Implements +-- GlobalAllianceApi.searchReadGroupSets. +-- +-- /See:/ 'readgroupsetsSearch' smart constructor. +data ReadgroupsetsSearch = ReadgroupsetsSearch + { _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rUserIp :: !(Maybe Text) + , _rKey :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rUserIp' +-- +-- * 'rKey' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +readgroupsetsSearch + :: ReadgroupsetsSearch +readgroupsetsSearch = + ReadgroupsetsSearch + { _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rUserIp = Nothing + , _rKey = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' ReadgroupsetsSearch' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' ReadgroupsetsSearch' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' ReadgroupsetsSearch' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' ReadgroupsetsSearch' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' ReadgroupsetsSearch' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' ReadgroupsetsSearch' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' ReadgroupsetsSearch' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest ReadgroupsetsSearch' where + type Rs ReadgroupsetsSearch' = + SearchReadGroupSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsSearch{..} + = go _rQuotaUser _rPrettyPrint _rUserIp _rKey + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Update.hs new file mode 100644 index 000000000..2252bb07e --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Readgroupsets/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Readgroupsets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a read group set. +-- +-- /See:/ for @GenomicsReadgroupsetsUpdate@. +module Genomics.Readgroupsets.Update + ( + -- * REST Resource + ReadgroupsetsUpdateAPI + + -- * Creating a Request + , readgroupsetsUpdate + , ReadgroupsetsUpdate + + -- * Request Lenses + , ruQuotaUser + , ruPrettyPrint + , ruReadGroupSetId + , ruUserIp + , ruKey + , ruOauthToken + , ruFields + , ruAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadgroupsetsUpdate@ which the +-- 'ReadgroupsetsUpdate' request conforms to. +type ReadgroupsetsUpdateAPI = + "readgroupsets" :> + Capture "readGroupSetId" Text :> + Put '[JSON] ReadGroupSet + +-- | Updates a read group set. +-- +-- /See:/ 'readgroupsetsUpdate' smart constructor. +data ReadgroupsetsUpdate = ReadgroupsetsUpdate + { _ruQuotaUser :: !(Maybe Text) + , _ruPrettyPrint :: !Bool + , _ruReadGroupSetId :: !Text + , _ruUserIp :: !(Maybe Text) + , _ruKey :: !(Maybe Text) + , _ruOauthToken :: !(Maybe Text) + , _ruFields :: !(Maybe Text) + , _ruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadgroupsetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruQuotaUser' +-- +-- * 'ruPrettyPrint' +-- +-- * 'ruReadGroupSetId' +-- +-- * 'ruUserIp' +-- +-- * 'ruKey' +-- +-- * 'ruOauthToken' +-- +-- * 'ruFields' +-- +-- * 'ruAlt' +readgroupsetsUpdate + :: Text -- ^ 'readGroupSetId' + -> ReadgroupsetsUpdate +readgroupsetsUpdate pRuReadGroupSetId_ = + ReadgroupsetsUpdate + { _ruQuotaUser = Nothing + , _ruPrettyPrint = True + , _ruReadGroupSetId = pRuReadGroupSetId_ + , _ruUserIp = Nothing + , _ruKey = Nothing + , _ruOauthToken = Nothing + , _ruFields = Nothing + , _ruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruQuotaUser :: Lens' ReadgroupsetsUpdate' (Maybe Text) +ruQuotaUser + = lens _ruQuotaUser (\ s a -> s{_ruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruPrettyPrint :: Lens' ReadgroupsetsUpdate' Bool +ruPrettyPrint + = lens _ruPrettyPrint + (\ s a -> s{_ruPrettyPrint = a}) + +-- | The ID of the read group set to be updated. The caller must have WRITE +-- permissions to the dataset associated with this read group set. +ruReadGroupSetId :: Lens' ReadgroupsetsUpdate' Text +ruReadGroupSetId + = lens _ruReadGroupSetId + (\ s a -> s{_ruReadGroupSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruUserIp :: Lens' ReadgroupsetsUpdate' (Maybe Text) +ruUserIp = lens _ruUserIp (\ s a -> s{_ruUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruKey :: Lens' ReadgroupsetsUpdate' (Maybe Text) +ruKey = lens _ruKey (\ s a -> s{_ruKey = a}) + +-- | OAuth 2.0 token for the current user. +ruOauthToken :: Lens' ReadgroupsetsUpdate' (Maybe Text) +ruOauthToken + = lens _ruOauthToken (\ s a -> s{_ruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ruFields :: Lens' ReadgroupsetsUpdate' (Maybe Text) +ruFields = lens _ruFields (\ s a -> s{_ruFields = a}) + +-- | Data format for the response. +ruAlt :: Lens' ReadgroupsetsUpdate' Text +ruAlt = lens _ruAlt (\ s a -> s{_ruAlt = a}) + +instance GoogleRequest ReadgroupsetsUpdate' where + type Rs ReadgroupsetsUpdate' = ReadGroupSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadgroupsetsUpdate{..} + = go _ruQuotaUser _ruPrettyPrint _ruReadGroupSetId + _ruUserIp + _ruKey + _ruOauthToken + _ruFields + _ruAlt + where go + = clientWithRoute + (Proxy :: Proxy ReadgroupsetsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Reads/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Reads/Search.hs new file mode 100644 index 000000000..8e1adbd0e --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Reads/Search.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Reads.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of reads for one or more read group sets. Reads search +-- operates over a genomic coordinate space of reference sequence & +-- position defined over the reference sequences to which the requested +-- read group sets are aligned. If a target positional range is specified, +-- search returns all reads whose alignment to the reference genome overlap +-- the range. A query which specifies only read group set IDs yields all +-- reads in those read group sets, including unmapped reads. All reads +-- returned (including reads on subsequent pages) are ordered by genomic +-- coordinate (reference sequence & position). Reads with equivalent +-- genomic coordinates are returned in a deterministic order. Implements +-- GlobalAllianceApi.searchReads. +-- +-- /See:/ for @GenomicsReadsSearch@. +module Genomics.Reads.Search + ( + -- * REST Resource + ReadsSearchAPI + + -- * Creating a Request + , readsSearch + , ReadsSearch + + -- * Request Lenses + , rrQuotaUser + , rrPrettyPrint + , rrUserIp + , rrKey + , rrOauthToken + , rrFields + , rrAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReadsSearch@ which the +-- 'ReadsSearch' request conforms to. +type ReadsSearchAPI = + "reads" :> + "search" :> Post '[JSON] SearchReadsResponse + +-- | Gets a list of reads for one or more read group sets. Reads search +-- operates over a genomic coordinate space of reference sequence & +-- position defined over the reference sequences to which the requested +-- read group sets are aligned. If a target positional range is specified, +-- search returns all reads whose alignment to the reference genome overlap +-- the range. A query which specifies only read group set IDs yields all +-- reads in those read group sets, including unmapped reads. All reads +-- returned (including reads on subsequent pages) are ordered by genomic +-- coordinate (reference sequence & position). Reads with equivalent +-- genomic coordinates are returned in a deterministic order. Implements +-- GlobalAllianceApi.searchReads. +-- +-- /See:/ 'readsSearch' smart constructor. +data ReadsSearch = ReadsSearch + { _rrQuotaUser :: !(Maybe Text) + , _rrPrettyPrint :: !Bool + , _rrUserIp :: !(Maybe Text) + , _rrKey :: !(Maybe Text) + , _rrOauthToken :: !(Maybe Text) + , _rrFields :: !(Maybe Text) + , _rrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReadsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrQuotaUser' +-- +-- * 'rrPrettyPrint' +-- +-- * 'rrUserIp' +-- +-- * 'rrKey' +-- +-- * 'rrOauthToken' +-- +-- * 'rrFields' +-- +-- * 'rrAlt' +readsSearch + :: ReadsSearch +readsSearch = + ReadsSearch + { _rrQuotaUser = Nothing + , _rrPrettyPrint = True + , _rrUserIp = Nothing + , _rrKey = Nothing + , _rrOauthToken = Nothing + , _rrFields = Nothing + , _rrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrQuotaUser :: Lens' ReadsSearch' (Maybe Text) +rrQuotaUser + = lens _rrQuotaUser (\ s a -> s{_rrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrPrettyPrint :: Lens' ReadsSearch' Bool +rrPrettyPrint + = lens _rrPrettyPrint + (\ s a -> s{_rrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrUserIp :: Lens' ReadsSearch' (Maybe Text) +rrUserIp = lens _rrUserIp (\ s a -> s{_rrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrKey :: Lens' ReadsSearch' (Maybe Text) +rrKey = lens _rrKey (\ s a -> s{_rrKey = a}) + +-- | OAuth 2.0 token for the current user. +rrOauthToken :: Lens' ReadsSearch' (Maybe Text) +rrOauthToken + = lens _rrOauthToken (\ s a -> s{_rrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrFields :: Lens' ReadsSearch' (Maybe Text) +rrFields = lens _rrFields (\ s a -> s{_rrFields = a}) + +-- | Data format for the response. +rrAlt :: Lens' ReadsSearch' Text +rrAlt = lens _rrAlt (\ s a -> s{_rrAlt = a}) + +instance GoogleRequest ReadsSearch' where + type Rs ReadsSearch' = SearchReadsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReadsSearch{..} + = go _rrQuotaUser _rrPrettyPrint _rrUserIp _rrKey + _rrOauthToken + _rrFields + _rrAlt + where go + = clientWithRoute (Proxy :: Proxy ReadsSearchAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Bases/List.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Bases/List.hs new file mode 100644 index 000000000..fbbded99d --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Bases/List.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.References.Bases.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the bases in a reference, optionally restricted to a range. +-- Implements GlobalAllianceApi.getReferenceBases. +-- +-- /See:/ for @GenomicsReferencesBasesList@. +module Genomics.References.Bases.List + ( + -- * REST Resource + ReferencesBasesListAPI + + -- * Creating a Request + , referencesBasesList + , ReferencesBasesList + + -- * Request Lenses + , rblQuotaUser + , rblPrettyPrint + , rblUserIp + , rblStart + , rblReferenceId + , rblKey + , rblEnd + , rblPageToken + , rblOauthToken + , rblPageSize + , rblFields + , rblAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReferencesBasesList@ which the +-- 'ReferencesBasesList' request conforms to. +type ReferencesBasesListAPI = + "references" :> + Capture "referenceId" Text :> + "bases" :> + QueryParam "start" Int64 :> + QueryParam "end" Int64 :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListBasesResponse + +-- | Lists the bases in a reference, optionally restricted to a range. +-- Implements GlobalAllianceApi.getReferenceBases. +-- +-- /See:/ 'referencesBasesList' smart constructor. +data ReferencesBasesList = ReferencesBasesList + { _rblQuotaUser :: !(Maybe Text) + , _rblPrettyPrint :: !Bool + , _rblUserIp :: !(Maybe Text) + , _rblStart :: !(Maybe Int64) + , _rblReferenceId :: !Text + , _rblKey :: !(Maybe Text) + , _rblEnd :: !(Maybe Int64) + , _rblPageToken :: !(Maybe Text) + , _rblOauthToken :: !(Maybe Text) + , _rblPageSize :: !(Maybe Int32) + , _rblFields :: !(Maybe Text) + , _rblAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferencesBasesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rblQuotaUser' +-- +-- * 'rblPrettyPrint' +-- +-- * 'rblUserIp' +-- +-- * 'rblStart' +-- +-- * 'rblReferenceId' +-- +-- * 'rblKey' +-- +-- * 'rblEnd' +-- +-- * 'rblPageToken' +-- +-- * 'rblOauthToken' +-- +-- * 'rblPageSize' +-- +-- * 'rblFields' +-- +-- * 'rblAlt' +referencesBasesList + :: Text -- ^ 'referenceId' + -> ReferencesBasesList +referencesBasesList pRblReferenceId_ = + ReferencesBasesList + { _rblQuotaUser = Nothing + , _rblPrettyPrint = True + , _rblUserIp = Nothing + , _rblStart = Nothing + , _rblReferenceId = pRblReferenceId_ + , _rblKey = Nothing + , _rblEnd = Nothing + , _rblPageToken = Nothing + , _rblOauthToken = Nothing + , _rblPageSize = Nothing + , _rblFields = Nothing + , _rblAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rblQuotaUser :: Lens' ReferencesBasesList' (Maybe Text) +rblQuotaUser + = lens _rblQuotaUser (\ s a -> s{_rblQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rblPrettyPrint :: Lens' ReferencesBasesList' Bool +rblPrettyPrint + = lens _rblPrettyPrint + (\ s a -> s{_rblPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rblUserIp :: Lens' ReferencesBasesList' (Maybe Text) +rblUserIp + = lens _rblUserIp (\ s a -> s{_rblUserIp = a}) + +-- | The start position (0-based) of this query. Defaults to 0. +rblStart :: Lens' ReferencesBasesList' (Maybe Int64) +rblStart = lens _rblStart (\ s a -> s{_rblStart = a}) + +-- | The ID of the reference. +rblReferenceId :: Lens' ReferencesBasesList' Text +rblReferenceId + = lens _rblReferenceId + (\ s a -> s{_rblReferenceId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rblKey :: Lens' ReferencesBasesList' (Maybe Text) +rblKey = lens _rblKey (\ s a -> s{_rblKey = a}) + +-- | The end position (0-based, exclusive) of this query. Defaults to the +-- length of this reference. +rblEnd :: Lens' ReferencesBasesList' (Maybe Int64) +rblEnd = lens _rblEnd (\ s a -> s{_rblEnd = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rblPageToken :: Lens' ReferencesBasesList' (Maybe Text) +rblPageToken + = lens _rblPageToken (\ s a -> s{_rblPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rblOauthToken :: Lens' ReferencesBasesList' (Maybe Text) +rblOauthToken + = lens _rblOauthToken + (\ s a -> s{_rblOauthToken = a}) + +-- | Specifies the maximum number of bases to return in a single page. +rblPageSize :: Lens' ReferencesBasesList' (Maybe Int32) +rblPageSize + = lens _rblPageSize (\ s a -> s{_rblPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +rblFields :: Lens' ReferencesBasesList' (Maybe Text) +rblFields + = lens _rblFields (\ s a -> s{_rblFields = a}) + +-- | Data format for the response. +rblAlt :: Lens' ReferencesBasesList' Text +rblAlt = lens _rblAlt (\ s a -> s{_rblAlt = a}) + +instance GoogleRequest ReferencesBasesList' where + type Rs ReferencesBasesList' = ListBasesResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReferencesBasesList{..} + = go _rblQuotaUser _rblPrettyPrint _rblUserIp + _rblStart + _rblReferenceId + _rblKey + _rblEnd + _rblPageToken + _rblOauthToken + _rblPageSize + _rblFields + _rblAlt + where go + = clientWithRoute + (Proxy :: Proxy ReferencesBasesListAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Get.hs new file mode 100644 index 000000000..e053a501b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.References.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a reference. Implements GlobalAllianceApi.getReference. +-- +-- /See:/ for @GenomicsReferencesGet@. +module Genomics.References.Get + ( + -- * REST Resource + ReferencesGetAPI + + -- * Creating a Request + , referencesGet + , ReferencesGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgReferenceId + , rgKey + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReferencesGet@ which the +-- 'ReferencesGet' request conforms to. +type ReferencesGetAPI = + "references" :> + Capture "referenceId" Text :> Get '[JSON] Reference + +-- | Gets a reference. Implements GlobalAllianceApi.getReference. +-- +-- /See:/ 'referencesGet' smart constructor. +data ReferencesGet = ReferencesGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgReferenceId :: !Text + , _rgKey :: !(Maybe Text) + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferencesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgReferenceId' +-- +-- * 'rgKey' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +referencesGet + :: Text -- ^ 'referenceId' + -> ReferencesGet +referencesGet pRgReferenceId_ = + ReferencesGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgReferenceId = pRgReferenceId_ + , _rgKey = Nothing + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' ReferencesGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' ReferencesGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' ReferencesGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | The ID of the reference. +rgReferenceId :: Lens' ReferencesGet' Text +rgReferenceId + = lens _rgReferenceId + (\ s a -> s{_rgReferenceId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' ReferencesGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' ReferencesGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' ReferencesGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' ReferencesGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest ReferencesGet' where + type Rs ReferencesGet' = Reference + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReferencesGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp + _rgReferenceId + _rgKey + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy ReferencesGetAPI) r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Search.hs new file mode 100644 index 000000000..6621b7da8 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/References/Search.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.References.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for references which match the given criteria. Implements +-- GlobalAllianceApi.searchReferences. +-- +-- /See:/ for @GenomicsReferencesSearch@. +module Genomics.References.Search + ( + -- * REST Resource + ReferencesSearchAPI + + -- * Creating a Request + , referencesSearch + , ReferencesSearch + + -- * Request Lenses + , rsQuotaUser + , rsPrettyPrint + , rsUserIp + , rsKey + , rsOauthToken + , rsFields + , rsAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReferencesSearch@ which the +-- 'ReferencesSearch' request conforms to. +type ReferencesSearchAPI = + "references" :> + "search" :> Post '[JSON] SearchReferencesResponse + +-- | Searches for references which match the given criteria. Implements +-- GlobalAllianceApi.searchReferences. +-- +-- /See:/ 'referencesSearch' smart constructor. +data ReferencesSearch = ReferencesSearch + { _rsQuotaUser :: !(Maybe Text) + , _rsPrettyPrint :: !Bool + , _rsUserIp :: !(Maybe Text) + , _rsKey :: !(Maybe Text) + , _rsOauthToken :: !(Maybe Text) + , _rsFields :: !(Maybe Text) + , _rsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferencesSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsQuotaUser' +-- +-- * 'rsPrettyPrint' +-- +-- * 'rsUserIp' +-- +-- * 'rsKey' +-- +-- * 'rsOauthToken' +-- +-- * 'rsFields' +-- +-- * 'rsAlt' +referencesSearch + :: ReferencesSearch +referencesSearch = + ReferencesSearch + { _rsQuotaUser = Nothing + , _rsPrettyPrint = True + , _rsUserIp = Nothing + , _rsKey = Nothing + , _rsOauthToken = Nothing + , _rsFields = Nothing + , _rsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rsQuotaUser :: Lens' ReferencesSearch' (Maybe Text) +rsQuotaUser + = lens _rsQuotaUser (\ s a -> s{_rsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rsPrettyPrint :: Lens' ReferencesSearch' Bool +rsPrettyPrint + = lens _rsPrettyPrint + (\ s a -> s{_rsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rsUserIp :: Lens' ReferencesSearch' (Maybe Text) +rsUserIp = lens _rsUserIp (\ s a -> s{_rsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rsKey :: Lens' ReferencesSearch' (Maybe Text) +rsKey = lens _rsKey (\ s a -> s{_rsKey = a}) + +-- | OAuth 2.0 token for the current user. +rsOauthToken :: Lens' ReferencesSearch' (Maybe Text) +rsOauthToken + = lens _rsOauthToken (\ s a -> s{_rsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rsFields :: Lens' ReferencesSearch' (Maybe Text) +rsFields = lens _rsFields (\ s a -> s{_rsFields = a}) + +-- | Data format for the response. +rsAlt :: Lens' ReferencesSearch' Text +rsAlt = lens _rsAlt (\ s a -> s{_rsAlt = a}) + +instance GoogleRequest ReferencesSearch' where + type Rs ReferencesSearch' = SearchReferencesResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReferencesSearch{..} + = go _rsQuotaUser _rsPrettyPrint _rsUserIp _rsKey + _rsOauthToken + _rsFields + _rsAlt + where go + = clientWithRoute + (Proxy :: Proxy ReferencesSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Get.hs new file mode 100644 index 000000000..6f06ece20 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Get.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Referencesets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a reference set. Implements GlobalAllianceApi.getReferenceSet. +-- +-- /See:/ for @GenomicsReferencesetsGet@. +module Genomics.Referencesets.Get + ( + -- * REST Resource + ReferencesetsGetAPI + + -- * Creating a Request + , referencesetsGet + , ReferencesetsGet + + -- * Request Lenses + , refReferenceSetId + , refQuotaUser + , refPrettyPrint + , refUserIp + , refKey + , refOauthToken + , refFields + , refAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReferencesetsGet@ which the +-- 'ReferencesetsGet' request conforms to. +type ReferencesetsGetAPI = + "referencesets" :> + Capture "referenceSetId" Text :> + Get '[JSON] ReferenceSet + +-- | Gets a reference set. Implements GlobalAllianceApi.getReferenceSet. +-- +-- /See:/ 'referencesetsGet' smart constructor. +data ReferencesetsGet = ReferencesetsGet + { _refReferenceSetId :: !Text + , _refQuotaUser :: !(Maybe Text) + , _refPrettyPrint :: !Bool + , _refUserIp :: !(Maybe Text) + , _refKey :: !(Maybe Text) + , _refOauthToken :: !(Maybe Text) + , _refFields :: !(Maybe Text) + , _refAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferencesetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'refReferenceSetId' +-- +-- * 'refQuotaUser' +-- +-- * 'refPrettyPrint' +-- +-- * 'refUserIp' +-- +-- * 'refKey' +-- +-- * 'refOauthToken' +-- +-- * 'refFields' +-- +-- * 'refAlt' +referencesetsGet + :: Text -- ^ 'referenceSetId' + -> ReferencesetsGet +referencesetsGet pRefReferenceSetId_ = + ReferencesetsGet + { _refReferenceSetId = pRefReferenceSetId_ + , _refQuotaUser = Nothing + , _refPrettyPrint = True + , _refUserIp = Nothing + , _refKey = Nothing + , _refOauthToken = Nothing + , _refFields = Nothing + , _refAlt = "json" + } + +-- | The ID of the reference set. +refReferenceSetId :: Lens' ReferencesetsGet' Text +refReferenceSetId + = lens _refReferenceSetId + (\ s a -> s{_refReferenceSetId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +refQuotaUser :: Lens' ReferencesetsGet' (Maybe Text) +refQuotaUser + = lens _refQuotaUser (\ s a -> s{_refQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +refPrettyPrint :: Lens' ReferencesetsGet' Bool +refPrettyPrint + = lens _refPrettyPrint + (\ s a -> s{_refPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +refUserIp :: Lens' ReferencesetsGet' (Maybe Text) +refUserIp + = lens _refUserIp (\ s a -> s{_refUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +refKey :: Lens' ReferencesetsGet' (Maybe Text) +refKey = lens _refKey (\ s a -> s{_refKey = a}) + +-- | OAuth 2.0 token for the current user. +refOauthToken :: Lens' ReferencesetsGet' (Maybe Text) +refOauthToken + = lens _refOauthToken + (\ s a -> s{_refOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +refFields :: Lens' ReferencesetsGet' (Maybe Text) +refFields + = lens _refFields (\ s a -> s{_refFields = a}) + +-- | Data format for the response. +refAlt :: Lens' ReferencesetsGet' Text +refAlt = lens _refAlt (\ s a -> s{_refAlt = a}) + +instance GoogleRequest ReferencesetsGet' where + type Rs ReferencesetsGet' = ReferenceSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReferencesetsGet{..} + = go _refReferenceSetId _refQuotaUser _refPrettyPrint + _refUserIp + _refKey + _refOauthToken + _refFields + _refAlt + where go + = clientWithRoute + (Proxy :: Proxy ReferencesetsGetAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Search.hs new file mode 100644 index 000000000..2ea522a36 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Search.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Referencesets.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches for reference sets which match the given criteria. Implements +-- GlobalAllianceApi.searchReferenceSets. +-- +-- /See:/ for @GenomicsReferencesetsSearch@. +module Genomics.Referencesets.Search + ( + -- * REST Resource + ReferencesetsSearchAPI + + -- * Creating a Request + , referencesetsSearch + , ReferencesetsSearch + + -- * Request Lenses + , rssQuotaUser + , rssPrettyPrint + , rssUserIp + , rssKey + , rssOauthToken + , rssFields + , rssAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsReferencesetsSearch@ which the +-- 'ReferencesetsSearch' request conforms to. +type ReferencesetsSearchAPI = + "referencesets" :> + "search" :> Post '[JSON] SearchReferenceSetsResponse + +-- | Searches for reference sets which match the given criteria. Implements +-- GlobalAllianceApi.searchReferenceSets. +-- +-- /See:/ 'referencesetsSearch' smart constructor. +data ReferencesetsSearch = ReferencesetsSearch + { _rssQuotaUser :: !(Maybe Text) + , _rssPrettyPrint :: !Bool + , _rssUserIp :: !(Maybe Text) + , _rssKey :: !(Maybe Text) + , _rssOauthToken :: !(Maybe Text) + , _rssFields :: !(Maybe Text) + , _rssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReferencesetsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rssQuotaUser' +-- +-- * 'rssPrettyPrint' +-- +-- * 'rssUserIp' +-- +-- * 'rssKey' +-- +-- * 'rssOauthToken' +-- +-- * 'rssFields' +-- +-- * 'rssAlt' +referencesetsSearch + :: ReferencesetsSearch +referencesetsSearch = + ReferencesetsSearch + { _rssQuotaUser = Nothing + , _rssPrettyPrint = True + , _rssUserIp = Nothing + , _rssKey = Nothing + , _rssOauthToken = Nothing + , _rssFields = Nothing + , _rssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rssQuotaUser :: Lens' ReferencesetsSearch' (Maybe Text) +rssQuotaUser + = lens _rssQuotaUser (\ s a -> s{_rssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rssPrettyPrint :: Lens' ReferencesetsSearch' Bool +rssPrettyPrint + = lens _rssPrettyPrint + (\ s a -> s{_rssPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rssUserIp :: Lens' ReferencesetsSearch' (Maybe Text) +rssUserIp + = lens _rssUserIp (\ s a -> s{_rssUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rssKey :: Lens' ReferencesetsSearch' (Maybe Text) +rssKey = lens _rssKey (\ s a -> s{_rssKey = a}) + +-- | OAuth 2.0 token for the current user. +rssOauthToken :: Lens' ReferencesetsSearch' (Maybe Text) +rssOauthToken + = lens _rssOauthToken + (\ s a -> s{_rssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rssFields :: Lens' ReferencesetsSearch' (Maybe Text) +rssFields + = lens _rssFields (\ s a -> s{_rssFields = a}) + +-- | Data format for the response. +rssAlt :: Lens' ReferencesetsSearch' Text +rssAlt = lens _rssAlt (\ s a -> s{_rssAlt = a}) + +instance GoogleRequest ReferencesetsSearch' where + type Rs ReferencesetsSearch' = + SearchReferenceSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u ReferencesetsSearch{..} + = go _rssQuotaUser _rssPrettyPrint _rssUserIp _rssKey + _rssOauthToken + _rssFields + _rssAlt + where go + = clientWithRoute + (Proxy :: Proxy ReferencesetsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Create.hs new file mode 100644 index 000000000..e8888bf6b --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Create.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variants.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new variant. +-- +-- /See:/ for @GenomicsVariantsCreate@. +module Genomics.Variants.Create + ( + -- * REST Resource + VariantsCreateAPI + + -- * Creating a Request + , variantsCreate + , VariantsCreate + + -- * Request Lenses + , vcQuotaUser + , vcPrettyPrint + , vcUserIp + , vcKey + , vcOauthToken + , vcFields + , vcAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsCreate@ which the +-- 'VariantsCreate' request conforms to. +type VariantsCreateAPI = + "variants" :> Post '[JSON] Variant + +-- | Creates a new variant. +-- +-- /See:/ 'variantsCreate' smart constructor. +data VariantsCreate = VariantsCreate + { _vcQuotaUser :: !(Maybe Text) + , _vcPrettyPrint :: !Bool + , _vcUserIp :: !(Maybe Text) + , _vcKey :: !(Maybe Text) + , _vcOauthToken :: !(Maybe Text) + , _vcFields :: !(Maybe Text) + , _vcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcQuotaUser' +-- +-- * 'vcPrettyPrint' +-- +-- * 'vcUserIp' +-- +-- * 'vcKey' +-- +-- * 'vcOauthToken' +-- +-- * 'vcFields' +-- +-- * 'vcAlt' +variantsCreate + :: VariantsCreate +variantsCreate = + VariantsCreate + { _vcQuotaUser = Nothing + , _vcPrettyPrint = True + , _vcUserIp = Nothing + , _vcKey = Nothing + , _vcOauthToken = Nothing + , _vcFields = Nothing + , _vcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vcQuotaUser :: Lens' VariantsCreate' (Maybe Text) +vcQuotaUser + = lens _vcQuotaUser (\ s a -> s{_vcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vcPrettyPrint :: Lens' VariantsCreate' Bool +vcPrettyPrint + = lens _vcPrettyPrint + (\ s a -> s{_vcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vcUserIp :: Lens' VariantsCreate' (Maybe Text) +vcUserIp = lens _vcUserIp (\ s a -> s{_vcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vcKey :: Lens' VariantsCreate' (Maybe Text) +vcKey = lens _vcKey (\ s a -> s{_vcKey = a}) + +-- | OAuth 2.0 token for the current user. +vcOauthToken :: Lens' VariantsCreate' (Maybe Text) +vcOauthToken + = lens _vcOauthToken (\ s a -> s{_vcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vcFields :: Lens' VariantsCreate' (Maybe Text) +vcFields = lens _vcFields (\ s a -> s{_vcFields = a}) + +-- | Data format for the response. +vcAlt :: Lens' VariantsCreate' Text +vcAlt = lens _vcAlt (\ s a -> s{_vcAlt = a}) + +instance GoogleRequest VariantsCreate' where + type Rs VariantsCreate' = Variant + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsCreate{..} + = go _vcQuotaUser _vcPrettyPrint _vcUserIp _vcKey + _vcOauthToken + _vcFields + _vcAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Delete.hs new file mode 100644 index 000000000..caa9fdf78 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variants.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a variant. +-- +-- /See:/ for @GenomicsVariantsDelete@. +module Genomics.Variants.Delete + ( + -- * REST Resource + VariantsDeleteAPI + + -- * Creating a Request + , variantsDelete + , VariantsDelete + + -- * Request Lenses + , vdQuotaUser + , vdPrettyPrint + , vdUserIp + , vdKey + , vdVariantId + , vdOauthToken + , vdFields + , vdAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsDelete@ which the +-- 'VariantsDelete' request conforms to. +type VariantsDeleteAPI = + "variants" :> + Capture "variantId" Text :> Delete '[JSON] () + +-- | Deletes a variant. +-- +-- /See:/ 'variantsDelete' smart constructor. +data VariantsDelete = VariantsDelete + { _vdQuotaUser :: !(Maybe Text) + , _vdPrettyPrint :: !Bool + , _vdUserIp :: !(Maybe Text) + , _vdKey :: !(Maybe Text) + , _vdVariantId :: !Text + , _vdOauthToken :: !(Maybe Text) + , _vdFields :: !(Maybe Text) + , _vdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vdQuotaUser' +-- +-- * 'vdPrettyPrint' +-- +-- * 'vdUserIp' +-- +-- * 'vdKey' +-- +-- * 'vdVariantId' +-- +-- * 'vdOauthToken' +-- +-- * 'vdFields' +-- +-- * 'vdAlt' +variantsDelete + :: Text -- ^ 'variantId' + -> VariantsDelete +variantsDelete pVdVariantId_ = + VariantsDelete + { _vdQuotaUser = Nothing + , _vdPrettyPrint = True + , _vdUserIp = Nothing + , _vdKey = Nothing + , _vdVariantId = pVdVariantId_ + , _vdOauthToken = Nothing + , _vdFields = Nothing + , _vdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vdQuotaUser :: Lens' VariantsDelete' (Maybe Text) +vdQuotaUser + = lens _vdQuotaUser (\ s a -> s{_vdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vdPrettyPrint :: Lens' VariantsDelete' Bool +vdPrettyPrint + = lens _vdPrettyPrint + (\ s a -> s{_vdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vdUserIp :: Lens' VariantsDelete' (Maybe Text) +vdUserIp = lens _vdUserIp (\ s a -> s{_vdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vdKey :: Lens' VariantsDelete' (Maybe Text) +vdKey = lens _vdKey (\ s a -> s{_vdKey = a}) + +-- | The ID of the variant to be deleted. +vdVariantId :: Lens' VariantsDelete' Text +vdVariantId + = lens _vdVariantId (\ s a -> s{_vdVariantId = a}) + +-- | OAuth 2.0 token for the current user. +vdOauthToken :: Lens' VariantsDelete' (Maybe Text) +vdOauthToken + = lens _vdOauthToken (\ s a -> s{_vdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vdFields :: Lens' VariantsDelete' (Maybe Text) +vdFields = lens _vdFields (\ s a -> s{_vdFields = a}) + +-- | Data format for the response. +vdAlt :: Lens' VariantsDelete' Text +vdAlt = lens _vdAlt (\ s a -> s{_vdAlt = a}) + +instance GoogleRequest VariantsDelete' where + type Rs VariantsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsDelete{..} + = go _vdQuotaUser _vdPrettyPrint _vdUserIp _vdKey + _vdVariantId + _vdOauthToken + _vdFields + _vdAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Get.hs new file mode 100644 index 000000000..79bbfc504 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variants.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a variant by ID. +-- +-- /See:/ for @GenomicsVariantsGet@. +module Genomics.Variants.Get + ( + -- * REST Resource + VariantsGetAPI + + -- * Creating a Request + , variantsGet + , VariantsGet + + -- * Request Lenses + , vgQuotaUser + , vgPrettyPrint + , vgUserIp + , vgKey + , vgVariantId + , vgOauthToken + , vgFields + , vgAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsGet@ which the +-- 'VariantsGet' request conforms to. +type VariantsGetAPI = + "variants" :> + Capture "variantId" Text :> Get '[JSON] Variant + +-- | Gets a variant by ID. +-- +-- /See:/ 'variantsGet' smart constructor. +data VariantsGet = VariantsGet + { _vgQuotaUser :: !(Maybe Text) + , _vgPrettyPrint :: !Bool + , _vgUserIp :: !(Maybe Text) + , _vgKey :: !(Maybe Text) + , _vgVariantId :: !Text + , _vgOauthToken :: !(Maybe Text) + , _vgFields :: !(Maybe Text) + , _vgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vgQuotaUser' +-- +-- * 'vgPrettyPrint' +-- +-- * 'vgUserIp' +-- +-- * 'vgKey' +-- +-- * 'vgVariantId' +-- +-- * 'vgOauthToken' +-- +-- * 'vgFields' +-- +-- * 'vgAlt' +variantsGet + :: Text -- ^ 'variantId' + -> VariantsGet +variantsGet pVgVariantId_ = + VariantsGet + { _vgQuotaUser = Nothing + , _vgPrettyPrint = True + , _vgUserIp = Nothing + , _vgKey = Nothing + , _vgVariantId = pVgVariantId_ + , _vgOauthToken = Nothing + , _vgFields = Nothing + , _vgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vgQuotaUser :: Lens' VariantsGet' (Maybe Text) +vgQuotaUser + = lens _vgQuotaUser (\ s a -> s{_vgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vgPrettyPrint :: Lens' VariantsGet' Bool +vgPrettyPrint + = lens _vgPrettyPrint + (\ s a -> s{_vgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vgUserIp :: Lens' VariantsGet' (Maybe Text) +vgUserIp = lens _vgUserIp (\ s a -> s{_vgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vgKey :: Lens' VariantsGet' (Maybe Text) +vgKey = lens _vgKey (\ s a -> s{_vgKey = a}) + +-- | The ID of the variant. +vgVariantId :: Lens' VariantsGet' Text +vgVariantId + = lens _vgVariantId (\ s a -> s{_vgVariantId = a}) + +-- | OAuth 2.0 token for the current user. +vgOauthToken :: Lens' VariantsGet' (Maybe Text) +vgOauthToken + = lens _vgOauthToken (\ s a -> s{_vgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vgFields :: Lens' VariantsGet' (Maybe Text) +vgFields = lens _vgFields (\ s a -> s{_vgFields = a}) + +-- | Data format for the response. +vgAlt :: Lens' VariantsGet' Text +vgAlt = lens _vgAlt (\ s a -> s{_vgAlt = a}) + +instance GoogleRequest VariantsGet' where + type Rs VariantsGet' = Variant + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsGet{..} + = go _vgQuotaUser _vgPrettyPrint _vgUserIp _vgKey + _vgVariantId + _vgOauthToken + _vgFields + _vgAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsGetAPI) r u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Search.hs new file mode 100644 index 000000000..8fcce2a92 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Search.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variants.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a list of variants matching the criteria. Implements +-- GlobalAllianceApi.searchVariants. +-- +-- /See:/ for @GenomicsVariantsSearch@. +module Genomics.Variants.Search + ( + -- * REST Resource + VariantsSearchAPI + + -- * Creating a Request + , variantsSearch + , VariantsSearch + + -- * Request Lenses + , vsQuotaUser + , vsPrettyPrint + , vsUserIp + , vsKey + , vsOauthToken + , vsFields + , vsAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsSearch@ which the +-- 'VariantsSearch' request conforms to. +type VariantsSearchAPI = + "variants" :> + "search" :> Post '[JSON] SearchVariantsResponse + +-- | Gets a list of variants matching the criteria. Implements +-- GlobalAllianceApi.searchVariants. +-- +-- /See:/ 'variantsSearch' smart constructor. +data VariantsSearch = VariantsSearch + { _vsQuotaUser :: !(Maybe Text) + , _vsPrettyPrint :: !Bool + , _vsUserIp :: !(Maybe Text) + , _vsKey :: !(Maybe Text) + , _vsOauthToken :: !(Maybe Text) + , _vsFields :: !(Maybe Text) + , _vsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsQuotaUser' +-- +-- * 'vsPrettyPrint' +-- +-- * 'vsUserIp' +-- +-- * 'vsKey' +-- +-- * 'vsOauthToken' +-- +-- * 'vsFields' +-- +-- * 'vsAlt' +variantsSearch + :: VariantsSearch +variantsSearch = + VariantsSearch + { _vsQuotaUser = Nothing + , _vsPrettyPrint = True + , _vsUserIp = Nothing + , _vsKey = Nothing + , _vsOauthToken = Nothing + , _vsFields = Nothing + , _vsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vsQuotaUser :: Lens' VariantsSearch' (Maybe Text) +vsQuotaUser + = lens _vsQuotaUser (\ s a -> s{_vsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vsPrettyPrint :: Lens' VariantsSearch' Bool +vsPrettyPrint + = lens _vsPrettyPrint + (\ s a -> s{_vsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vsUserIp :: Lens' VariantsSearch' (Maybe Text) +vsUserIp = lens _vsUserIp (\ s a -> s{_vsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vsKey :: Lens' VariantsSearch' (Maybe Text) +vsKey = lens _vsKey (\ s a -> s{_vsKey = a}) + +-- | OAuth 2.0 token for the current user. +vsOauthToken :: Lens' VariantsSearch' (Maybe Text) +vsOauthToken + = lens _vsOauthToken (\ s a -> s{_vsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vsFields :: Lens' VariantsSearch' (Maybe Text) +vsFields = lens _vsFields (\ s a -> s{_vsFields = a}) + +-- | Data format for the response. +vsAlt :: Lens' VariantsSearch' Text +vsAlt = lens _vsAlt (\ s a -> s{_vsAlt = a}) + +instance GoogleRequest VariantsSearch' where + type Rs VariantsSearch' = SearchVariantsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsSearch{..} + = go _vsQuotaUser _vsPrettyPrint _vsUserIp _vsKey + _vsOauthToken + _vsFields + _vsAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Update.hs new file mode 100644 index 000000000..9f1b57884 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variants/Update.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variants.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a variant\'s names and info fields. All other modifications are +-- silently ignored. Returns the modified variant without its calls. +-- +-- /See:/ for @GenomicsVariantsUpdate@. +module Genomics.Variants.Update + ( + -- * REST Resource + VariantsUpdateAPI + + -- * Creating a Request + , variantsUpdate + , VariantsUpdate + + -- * Request Lenses + , vuQuotaUser + , vuPrettyPrint + , vuUserIp + , vuKey + , vuVariantId + , vuOauthToken + , vuFields + , vuAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsUpdate@ which the +-- 'VariantsUpdate' request conforms to. +type VariantsUpdateAPI = + "variants" :> + Capture "variantId" Text :> Put '[JSON] Variant + +-- | Updates a variant\'s names and info fields. All other modifications are +-- silently ignored. Returns the modified variant without its calls. +-- +-- /See:/ 'variantsUpdate' smart constructor. +data VariantsUpdate = VariantsUpdate + { _vuQuotaUser :: !(Maybe Text) + , _vuPrettyPrint :: !Bool + , _vuUserIp :: !(Maybe Text) + , _vuKey :: !(Maybe Text) + , _vuVariantId :: !Text + , _vuOauthToken :: !(Maybe Text) + , _vuFields :: !(Maybe Text) + , _vuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vuQuotaUser' +-- +-- * 'vuPrettyPrint' +-- +-- * 'vuUserIp' +-- +-- * 'vuKey' +-- +-- * 'vuVariantId' +-- +-- * 'vuOauthToken' +-- +-- * 'vuFields' +-- +-- * 'vuAlt' +variantsUpdate + :: Text -- ^ 'variantId' + -> VariantsUpdate +variantsUpdate pVuVariantId_ = + VariantsUpdate + { _vuQuotaUser = Nothing + , _vuPrettyPrint = True + , _vuUserIp = Nothing + , _vuKey = Nothing + , _vuVariantId = pVuVariantId_ + , _vuOauthToken = Nothing + , _vuFields = Nothing + , _vuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vuQuotaUser :: Lens' VariantsUpdate' (Maybe Text) +vuQuotaUser + = lens _vuQuotaUser (\ s a -> s{_vuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vuPrettyPrint :: Lens' VariantsUpdate' Bool +vuPrettyPrint + = lens _vuPrettyPrint + (\ s a -> s{_vuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vuUserIp :: Lens' VariantsUpdate' (Maybe Text) +vuUserIp = lens _vuUserIp (\ s a -> s{_vuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vuKey :: Lens' VariantsUpdate' (Maybe Text) +vuKey = lens _vuKey (\ s a -> s{_vuKey = a}) + +-- | The ID of the variant to be updated. +vuVariantId :: Lens' VariantsUpdate' Text +vuVariantId + = lens _vuVariantId (\ s a -> s{_vuVariantId = a}) + +-- | OAuth 2.0 token for the current user. +vuOauthToken :: Lens' VariantsUpdate' (Maybe Text) +vuOauthToken + = lens _vuOauthToken (\ s a -> s{_vuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vuFields :: Lens' VariantsUpdate' (Maybe Text) +vuFields = lens _vuFields (\ s a -> s{_vuFields = a}) + +-- | Data format for the response. +vuAlt :: Lens' VariantsUpdate' Text +vuAlt = lens _vuAlt (\ s a -> s{_vuAlt = a}) + +instance GoogleRequest VariantsUpdate' where + type Rs VariantsUpdate' = Variant + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsUpdate{..} + = go _vuQuotaUser _vuPrettyPrint _vuUserIp _vuKey + _vuVariantId + _vuOauthToken + _vuFields + _vuAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsUpdateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Create.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Create.hs new file mode 100644 index 000000000..6d7397cce --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Create.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new variant set (only necessary in v1). The provided variant +-- set must have a valid datasetId set - all other fields are optional. +-- Note that the id field will be ignored, as this is assigned by the +-- server. +-- +-- /See:/ for @GenomicsVariantsetsCreate@. +module Genomics.Variantsets.Create + ( + -- * REST Resource + VariantsetsCreateAPI + + -- * Creating a Request + , variantsetsCreate + , VariantsetsCreate + + -- * Request Lenses + , vQuotaUser + , vPrettyPrint + , vUserIp + , vKey + , vOauthToken + , vFields + , vAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsCreate@ which the +-- 'VariantsetsCreate' request conforms to. +type VariantsetsCreateAPI = + "variantsets" :> Post '[JSON] VariantSet + +-- | Creates a new variant set (only necessary in v1). The provided variant +-- set must have a valid datasetId set - all other fields are optional. +-- Note that the id field will be ignored, as this is assigned by the +-- server. +-- +-- /See:/ 'variantsetsCreate' smart constructor. +data VariantsetsCreate = VariantsetsCreate + { _vQuotaUser :: !(Maybe Text) + , _vPrettyPrint :: !Bool + , _vUserIp :: !(Maybe Text) + , _vKey :: !(Maybe Text) + , _vOauthToken :: !(Maybe Text) + , _vFields :: !(Maybe Text) + , _vAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vQuotaUser' +-- +-- * 'vPrettyPrint' +-- +-- * 'vUserIp' +-- +-- * 'vKey' +-- +-- * 'vOauthToken' +-- +-- * 'vFields' +-- +-- * 'vAlt' +variantsetsCreate + :: VariantsetsCreate +variantsetsCreate = + VariantsetsCreate + { _vQuotaUser = Nothing + , _vPrettyPrint = True + , _vUserIp = Nothing + , _vKey = Nothing + , _vOauthToken = Nothing + , _vFields = Nothing + , _vAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vQuotaUser :: Lens' VariantsetsCreate' (Maybe Text) +vQuotaUser + = lens _vQuotaUser (\ s a -> s{_vQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vPrettyPrint :: Lens' VariantsetsCreate' Bool +vPrettyPrint + = lens _vPrettyPrint (\ s a -> s{_vPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vUserIp :: Lens' VariantsetsCreate' (Maybe Text) +vUserIp = lens _vUserIp (\ s a -> s{_vUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vKey :: Lens' VariantsetsCreate' (Maybe Text) +vKey = lens _vKey (\ s a -> s{_vKey = a}) + +-- | OAuth 2.0 token for the current user. +vOauthToken :: Lens' VariantsetsCreate' (Maybe Text) +vOauthToken + = lens _vOauthToken (\ s a -> s{_vOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vFields :: Lens' VariantsetsCreate' (Maybe Text) +vFields = lens _vFields (\ s a -> s{_vFields = a}) + +-- | Data format for the response. +vAlt :: Lens' VariantsetsCreate' Text +vAlt = lens _vAlt (\ s a -> s{_vAlt = a}) + +instance GoogleRequest VariantsetsCreate' where + type Rs VariantsetsCreate' = VariantSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsCreate{..} + = go _vQuotaUser _vPrettyPrint _vUserIp _vKey + _vOauthToken + _vFields + _vAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsCreateAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Delete.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Delete.hs new file mode 100644 index 000000000..9ee2bc895 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Delete.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the contents of a variant set. The variant set object is not +-- deleted. +-- +-- /See:/ for @GenomicsVariantsetsDelete@. +module Genomics.Variantsets.Delete + ( + -- * REST Resource + VariantsetsDeleteAPI + + -- * Creating a Request + , variantsetsDelete + , VariantsetsDelete + + -- * Request Lenses + , vddQuotaUser + , vddPrettyPrint + , vddVariantSetId + , vddUserIp + , vddKey + , vddOauthToken + , vddFields + , vddAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsDelete@ which the +-- 'VariantsetsDelete' request conforms to. +type VariantsetsDeleteAPI = + "variantsets" :> + Capture "variantSetId" Text :> Delete '[JSON] () + +-- | Deletes the contents of a variant set. The variant set object is not +-- deleted. +-- +-- /See:/ 'variantsetsDelete' smart constructor. +data VariantsetsDelete = VariantsetsDelete + { _vddQuotaUser :: !(Maybe Text) + , _vddPrettyPrint :: !Bool + , _vddVariantSetId :: !Text + , _vddUserIp :: !(Maybe Text) + , _vddKey :: !(Maybe Text) + , _vddOauthToken :: !(Maybe Text) + , _vddFields :: !(Maybe Text) + , _vddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vddQuotaUser' +-- +-- * 'vddPrettyPrint' +-- +-- * 'vddVariantSetId' +-- +-- * 'vddUserIp' +-- +-- * 'vddKey' +-- +-- * 'vddOauthToken' +-- +-- * 'vddFields' +-- +-- * 'vddAlt' +variantsetsDelete + :: Text -- ^ 'variantSetId' + -> VariantsetsDelete +variantsetsDelete pVddVariantSetId_ = + VariantsetsDelete + { _vddQuotaUser = Nothing + , _vddPrettyPrint = True + , _vddVariantSetId = pVddVariantSetId_ + , _vddUserIp = Nothing + , _vddKey = Nothing + , _vddOauthToken = Nothing + , _vddFields = Nothing + , _vddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vddQuotaUser :: Lens' VariantsetsDelete' (Maybe Text) +vddQuotaUser + = lens _vddQuotaUser (\ s a -> s{_vddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vddPrettyPrint :: Lens' VariantsetsDelete' Bool +vddPrettyPrint + = lens _vddPrettyPrint + (\ s a -> s{_vddPrettyPrint = a}) + +-- | The ID of the variant set to be deleted. +vddVariantSetId :: Lens' VariantsetsDelete' Text +vddVariantSetId + = lens _vddVariantSetId + (\ s a -> s{_vddVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vddUserIp :: Lens' VariantsetsDelete' (Maybe Text) +vddUserIp + = lens _vddUserIp (\ s a -> s{_vddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vddKey :: Lens' VariantsetsDelete' (Maybe Text) +vddKey = lens _vddKey (\ s a -> s{_vddKey = a}) + +-- | OAuth 2.0 token for the current user. +vddOauthToken :: Lens' VariantsetsDelete' (Maybe Text) +vddOauthToken + = lens _vddOauthToken + (\ s a -> s{_vddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vddFields :: Lens' VariantsetsDelete' (Maybe Text) +vddFields + = lens _vddFields (\ s a -> s{_vddFields = a}) + +-- | Data format for the response. +vddAlt :: Lens' VariantsetsDelete' Text +vddAlt = lens _vddAlt (\ s a -> s{_vddAlt = a}) + +instance GoogleRequest VariantsetsDelete' where + type Rs VariantsetsDelete' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsDelete{..} + = go _vddQuotaUser _vddPrettyPrint _vddVariantSetId + _vddUserIp + _vddKey + _vddOauthToken + _vddFields + _vddAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsDeleteAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Export.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Export.hs new file mode 100644 index 000000000..bf40537ec --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Export.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Export +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Exports variant set data to an external destination. +-- +-- /See:/ for @GenomicsVariantsetsExport@. +module Genomics.Variantsets.Export + ( + -- * REST Resource + VariantsetsExportAPI + + -- * Creating a Request + , variantsetsExport + , VariantsetsExport + + -- * Request Lenses + , veQuotaUser + , vePrettyPrint + , veVariantSetId + , veUserIp + , veKey + , veOauthToken + , veFields + , veAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsExport@ which the +-- 'VariantsetsExport' request conforms to. +type VariantsetsExportAPI = + "variantsets" :> + Capture "variantSetId" Text :> + "export" :> Post '[JSON] ExportVariantSetResponse + +-- | Exports variant set data to an external destination. +-- +-- /See:/ 'variantsetsExport' smart constructor. +data VariantsetsExport = VariantsetsExport + { _veQuotaUser :: !(Maybe Text) + , _vePrettyPrint :: !Bool + , _veVariantSetId :: !Text + , _veUserIp :: !(Maybe Text) + , _veKey :: !(Maybe Text) + , _veOauthToken :: !(Maybe Text) + , _veFields :: !(Maybe Text) + , _veAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsExport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'veQuotaUser' +-- +-- * 'vePrettyPrint' +-- +-- * 'veVariantSetId' +-- +-- * 'veUserIp' +-- +-- * 'veKey' +-- +-- * 'veOauthToken' +-- +-- * 'veFields' +-- +-- * 'veAlt' +variantsetsExport + :: Text -- ^ 'variantSetId' + -> VariantsetsExport +variantsetsExport pVeVariantSetId_ = + VariantsetsExport + { _veQuotaUser = Nothing + , _vePrettyPrint = True + , _veVariantSetId = pVeVariantSetId_ + , _veUserIp = Nothing + , _veKey = Nothing + , _veOauthToken = Nothing + , _veFields = Nothing + , _veAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +veQuotaUser :: Lens' VariantsetsExport' (Maybe Text) +veQuotaUser + = lens _veQuotaUser (\ s a -> s{_veQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vePrettyPrint :: Lens' VariantsetsExport' Bool +vePrettyPrint + = lens _vePrettyPrint + (\ s a -> s{_vePrettyPrint = a}) + +-- | Required. The ID of the variant set that contains variant data which +-- should be exported. The caller must have READ access to this variant +-- set. +veVariantSetId :: Lens' VariantsetsExport' Text +veVariantSetId + = lens _veVariantSetId + (\ s a -> s{_veVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +veUserIp :: Lens' VariantsetsExport' (Maybe Text) +veUserIp = lens _veUserIp (\ s a -> s{_veUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +veKey :: Lens' VariantsetsExport' (Maybe Text) +veKey = lens _veKey (\ s a -> s{_veKey = a}) + +-- | OAuth 2.0 token for the current user. +veOauthToken :: Lens' VariantsetsExport' (Maybe Text) +veOauthToken + = lens _veOauthToken (\ s a -> s{_veOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +veFields :: Lens' VariantsetsExport' (Maybe Text) +veFields = lens _veFields (\ s a -> s{_veFields = a}) + +-- | Data format for the response. +veAlt :: Lens' VariantsetsExport' Text +veAlt = lens _veAlt (\ s a -> s{_veAlt = a}) + +instance GoogleRequest VariantsetsExport' where + type Rs VariantsetsExport' = ExportVariantSetResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsExport{..} + = go _veQuotaUser _vePrettyPrint _veVariantSetId + _veUserIp + _veKey + _veOauthToken + _veFields + _veAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsExportAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Get.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Get.hs new file mode 100644 index 000000000..90354cd64 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Get.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a variant set by ID. +-- +-- /See:/ for @GenomicsVariantsetsGet@. +module Genomics.Variantsets.Get + ( + -- * REST Resource + VariantsetsGetAPI + + -- * Creating a Request + , variantsetsGet + , VariantsetsGet + + -- * Request Lenses + , varQuotaUser + , varPrettyPrint + , varVariantSetId + , varUserIp + , varKey + , varOauthToken + , varFields + , varAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsGet@ which the +-- 'VariantsetsGet' request conforms to. +type VariantsetsGetAPI = + "variantsets" :> + Capture "variantSetId" Text :> Get '[JSON] VariantSet + +-- | Gets a variant set by ID. +-- +-- /See:/ 'variantsetsGet' smart constructor. +data VariantsetsGet = VariantsetsGet + { _varQuotaUser :: !(Maybe Text) + , _varPrettyPrint :: !Bool + , _varVariantSetId :: !Text + , _varUserIp :: !(Maybe Text) + , _varKey :: !(Maybe Text) + , _varOauthToken :: !(Maybe Text) + , _varFields :: !(Maybe Text) + , _varAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varQuotaUser' +-- +-- * 'varPrettyPrint' +-- +-- * 'varVariantSetId' +-- +-- * 'varUserIp' +-- +-- * 'varKey' +-- +-- * 'varOauthToken' +-- +-- * 'varFields' +-- +-- * 'varAlt' +variantsetsGet + :: Text -- ^ 'variantSetId' + -> VariantsetsGet +variantsetsGet pVarVariantSetId_ = + VariantsetsGet + { _varQuotaUser = Nothing + , _varPrettyPrint = True + , _varVariantSetId = pVarVariantSetId_ + , _varUserIp = Nothing + , _varKey = Nothing + , _varOauthToken = Nothing + , _varFields = Nothing + , _varAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +varQuotaUser :: Lens' VariantsetsGet' (Maybe Text) +varQuotaUser + = lens _varQuotaUser (\ s a -> s{_varQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +varPrettyPrint :: Lens' VariantsetsGet' Bool +varPrettyPrint + = lens _varPrettyPrint + (\ s a -> s{_varPrettyPrint = a}) + +-- | Required. The ID of the variant set. +varVariantSetId :: Lens' VariantsetsGet' Text +varVariantSetId + = lens _varVariantSetId + (\ s a -> s{_varVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +varUserIp :: Lens' VariantsetsGet' (Maybe Text) +varUserIp + = lens _varUserIp (\ s a -> s{_varUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +varKey :: Lens' VariantsetsGet' (Maybe Text) +varKey = lens _varKey (\ s a -> s{_varKey = a}) + +-- | OAuth 2.0 token for the current user. +varOauthToken :: Lens' VariantsetsGet' (Maybe Text) +varOauthToken + = lens _varOauthToken + (\ s a -> s{_varOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +varFields :: Lens' VariantsetsGet' (Maybe Text) +varFields + = lens _varFields (\ s a -> s{_varFields = a}) + +-- | Data format for the response. +varAlt :: Lens' VariantsetsGet' Text +varAlt = lens _varAlt (\ s a -> s{_varAlt = a}) + +instance GoogleRequest VariantsetsGet' where + type Rs VariantsetsGet' = VariantSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsGet{..} + = go _varQuotaUser _varPrettyPrint _varVariantSetId + _varUserIp + _varKey + _varOauthToken + _varFields + _varAlt + where go + = clientWithRoute (Proxy :: Proxy VariantsetsGetAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/ImportVariants.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/ImportVariants.hs new file mode 100644 index 000000000..cfcad4c78 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/ImportVariants.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.ImportVariants +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates variant data by asynchronously importing the provided +-- information. The variants for import will be merged with any existing +-- data and each other according to the behavior of mergeVariants. In +-- particular, this means for merged VCF variants that have conflicting +-- INFO fields, some data will be arbitrarily discarded. As a special case, +-- for single-sample VCF files, QUAL and FILTER fields will be moved to the +-- call level; these are sometimes interpreted in a call-specific context. +-- Imported VCF headers are appended to the metadata already in a variant +-- set. +-- +-- /See:/ for @GenomicsVariantsetsImportVariants@. +module Genomics.Variantsets.ImportVariants + ( + -- * REST Resource + VariantsetsImportVariantsAPI + + -- * Creating a Request + , variantsetsImportVariants + , VariantsetsImportVariants + + -- * Request Lenses + , vivQuotaUser + , vivPrettyPrint + , vivVariantSetId + , vivUserIp + , vivKey + , vivOauthToken + , vivFields + , vivAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsImportVariants@ which the +-- 'VariantsetsImportVariants' request conforms to. +type VariantsetsImportVariantsAPI = + "variantsets" :> + Capture "variantSetId" Text :> + "importVariants" :> + Post '[JSON] ImportVariantsResponse + +-- | Creates variant data by asynchronously importing the provided +-- information. The variants for import will be merged with any existing +-- data and each other according to the behavior of mergeVariants. In +-- particular, this means for merged VCF variants that have conflicting +-- INFO fields, some data will be arbitrarily discarded. As a special case, +-- for single-sample VCF files, QUAL and FILTER fields will be moved to the +-- call level; these are sometimes interpreted in a call-specific context. +-- Imported VCF headers are appended to the metadata already in a variant +-- set. +-- +-- /See:/ 'variantsetsImportVariants' smart constructor. +data VariantsetsImportVariants = VariantsetsImportVariants + { _vivQuotaUser :: !(Maybe Text) + , _vivPrettyPrint :: !Bool + , _vivVariantSetId :: !Text + , _vivUserIp :: !(Maybe Text) + , _vivKey :: !(Maybe Text) + , _vivOauthToken :: !(Maybe Text) + , _vivFields :: !(Maybe Text) + , _vivAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsImportVariants'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vivQuotaUser' +-- +-- * 'vivPrettyPrint' +-- +-- * 'vivVariantSetId' +-- +-- * 'vivUserIp' +-- +-- * 'vivKey' +-- +-- * 'vivOauthToken' +-- +-- * 'vivFields' +-- +-- * 'vivAlt' +variantsetsImportVariants + :: Text -- ^ 'variantSetId' + -> VariantsetsImportVariants +variantsetsImportVariants pVivVariantSetId_ = + VariantsetsImportVariants + { _vivQuotaUser = Nothing + , _vivPrettyPrint = True + , _vivVariantSetId = pVivVariantSetId_ + , _vivUserIp = Nothing + , _vivKey = Nothing + , _vivOauthToken = Nothing + , _vivFields = Nothing + , _vivAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vivQuotaUser :: Lens' VariantsetsImportVariants' (Maybe Text) +vivQuotaUser + = lens _vivQuotaUser (\ s a -> s{_vivQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vivPrettyPrint :: Lens' VariantsetsImportVariants' Bool +vivPrettyPrint + = lens _vivPrettyPrint + (\ s a -> s{_vivPrettyPrint = a}) + +-- | Required. The variant set to which variant data should be imported. +vivVariantSetId :: Lens' VariantsetsImportVariants' Text +vivVariantSetId + = lens _vivVariantSetId + (\ s a -> s{_vivVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vivUserIp :: Lens' VariantsetsImportVariants' (Maybe Text) +vivUserIp + = lens _vivUserIp (\ s a -> s{_vivUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vivKey :: Lens' VariantsetsImportVariants' (Maybe Text) +vivKey = lens _vivKey (\ s a -> s{_vivKey = a}) + +-- | OAuth 2.0 token for the current user. +vivOauthToken :: Lens' VariantsetsImportVariants' (Maybe Text) +vivOauthToken + = lens _vivOauthToken + (\ s a -> s{_vivOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vivFields :: Lens' VariantsetsImportVariants' (Maybe Text) +vivFields + = lens _vivFields (\ s a -> s{_vivFields = a}) + +-- | Data format for the response. +vivAlt :: Lens' VariantsetsImportVariants' Text +vivAlt = lens _vivAlt (\ s a -> s{_vivAlt = a}) + +instance GoogleRequest VariantsetsImportVariants' + where + type Rs VariantsetsImportVariants' = + ImportVariantsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsImportVariants{..} + = go _vivQuotaUser _vivPrettyPrint _vivVariantSetId + _vivUserIp + _vivKey + _vivOauthToken + _vivFields + _vivAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsImportVariantsAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/MergeVariants.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/MergeVariants.hs new file mode 100644 index 000000000..77e149741 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/MergeVariants.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.MergeVariants +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Merges the given variants with existing variants. Each variant will be +-- merged with an existing variant that matches its reference sequence, +-- start, end, reference bases, and alternative bases. If no such variant +-- exists, a new one will be created. When variants are merged, the call +-- information from the new variant is added to the existing variant, and +-- other fields (such as key\/value pairs) are discarded. +-- +-- /See:/ for @GenomicsVariantsetsMergeVariants@. +module Genomics.Variantsets.MergeVariants + ( + -- * REST Resource + VariantsetsMergeVariantsAPI + + -- * Creating a Request + , variantsetsMergeVariants + , VariantsetsMergeVariants + + -- * Request Lenses + , vmvQuotaUser + , vmvPrettyPrint + , vmvVariantSetId + , vmvUserIp + , vmvKey + , vmvOauthToken + , vmvFields + , vmvAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsMergeVariants@ which the +-- 'VariantsetsMergeVariants' request conforms to. +type VariantsetsMergeVariantsAPI = + "variantsets" :> + Capture "variantSetId" Text :> + "mergeVariants" :> Post '[JSON] () + +-- | Merges the given variants with existing variants. Each variant will be +-- merged with an existing variant that matches its reference sequence, +-- start, end, reference bases, and alternative bases. If no such variant +-- exists, a new one will be created. When variants are merged, the call +-- information from the new variant is added to the existing variant, and +-- other fields (such as key\/value pairs) are discarded. +-- +-- /See:/ 'variantsetsMergeVariants' smart constructor. +data VariantsetsMergeVariants = VariantsetsMergeVariants + { _vmvQuotaUser :: !(Maybe Text) + , _vmvPrettyPrint :: !Bool + , _vmvVariantSetId :: !Text + , _vmvUserIp :: !(Maybe Text) + , _vmvKey :: !(Maybe Text) + , _vmvOauthToken :: !(Maybe Text) + , _vmvFields :: !(Maybe Text) + , _vmvAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsMergeVariants'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vmvQuotaUser' +-- +-- * 'vmvPrettyPrint' +-- +-- * 'vmvVariantSetId' +-- +-- * 'vmvUserIp' +-- +-- * 'vmvKey' +-- +-- * 'vmvOauthToken' +-- +-- * 'vmvFields' +-- +-- * 'vmvAlt' +variantsetsMergeVariants + :: Text -- ^ 'variantSetId' + -> VariantsetsMergeVariants +variantsetsMergeVariants pVmvVariantSetId_ = + VariantsetsMergeVariants + { _vmvQuotaUser = Nothing + , _vmvPrettyPrint = True + , _vmvVariantSetId = pVmvVariantSetId_ + , _vmvUserIp = Nothing + , _vmvKey = Nothing + , _vmvOauthToken = Nothing + , _vmvFields = Nothing + , _vmvAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vmvQuotaUser :: Lens' VariantsetsMergeVariants' (Maybe Text) +vmvQuotaUser + = lens _vmvQuotaUser (\ s a -> s{_vmvQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vmvPrettyPrint :: Lens' VariantsetsMergeVariants' Bool +vmvPrettyPrint + = lens _vmvPrettyPrint + (\ s a -> s{_vmvPrettyPrint = a}) + +-- | The destination variant set. +vmvVariantSetId :: Lens' VariantsetsMergeVariants' Text +vmvVariantSetId + = lens _vmvVariantSetId + (\ s a -> s{_vmvVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vmvUserIp :: Lens' VariantsetsMergeVariants' (Maybe Text) +vmvUserIp + = lens _vmvUserIp (\ s a -> s{_vmvUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vmvKey :: Lens' VariantsetsMergeVariants' (Maybe Text) +vmvKey = lens _vmvKey (\ s a -> s{_vmvKey = a}) + +-- | OAuth 2.0 token for the current user. +vmvOauthToken :: Lens' VariantsetsMergeVariants' (Maybe Text) +vmvOauthToken + = lens _vmvOauthToken + (\ s a -> s{_vmvOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vmvFields :: Lens' VariantsetsMergeVariants' (Maybe Text) +vmvFields + = lens _vmvFields (\ s a -> s{_vmvFields = a}) + +-- | Data format for the response. +vmvAlt :: Lens' VariantsetsMergeVariants' Text +vmvAlt = lens _vmvAlt (\ s a -> s{_vmvAlt = a}) + +instance GoogleRequest VariantsetsMergeVariants' + where + type Rs VariantsetsMergeVariants' = () + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsMergeVariants{..} + = go _vmvQuotaUser _vmvPrettyPrint _vmvVariantSetId + _vmvUserIp + _vmvKey + _vmvOauthToken + _vmvFields + _vmvAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsMergeVariantsAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Patch.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Patch.hs new file mode 100644 index 000000000..a3b22e055 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Patch.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a variant set\'s metadata. All other modifications are silently +-- ignored. This method supports patch semantics. +-- +-- /See:/ for @GenomicsVariantsetsPatch@. +module Genomics.Variantsets.Patch + ( + -- * REST Resource + VariantsetsPatchAPI + + -- * Creating a Request + , variantsetsPatch + , VariantsetsPatch + + -- * Request Lenses + , vpQuotaUser + , vpPrettyPrint + , vpVariantSetId + , vpUserIp + , vpKey + , vpOauthToken + , vpFields + , vpAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsPatch@ which the +-- 'VariantsetsPatch' request conforms to. +type VariantsetsPatchAPI = + "variantsets" :> + Capture "variantSetId" Text :> + Patch '[JSON] VariantSet + +-- | Updates a variant set\'s metadata. All other modifications are silently +-- ignored. This method supports patch semantics. +-- +-- /See:/ 'variantsetsPatch' smart constructor. +data VariantsetsPatch = VariantsetsPatch + { _vpQuotaUser :: !(Maybe Text) + , _vpPrettyPrint :: !Bool + , _vpVariantSetId :: !Text + , _vpUserIp :: !(Maybe Text) + , _vpKey :: !(Maybe Text) + , _vpOauthToken :: !(Maybe Text) + , _vpFields :: !(Maybe Text) + , _vpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vpQuotaUser' +-- +-- * 'vpPrettyPrint' +-- +-- * 'vpVariantSetId' +-- +-- * 'vpUserIp' +-- +-- * 'vpKey' +-- +-- * 'vpOauthToken' +-- +-- * 'vpFields' +-- +-- * 'vpAlt' +variantsetsPatch + :: Text -- ^ 'variantSetId' + -> VariantsetsPatch +variantsetsPatch pVpVariantSetId_ = + VariantsetsPatch + { _vpQuotaUser = Nothing + , _vpPrettyPrint = True + , _vpVariantSetId = pVpVariantSetId_ + , _vpUserIp = Nothing + , _vpKey = Nothing + , _vpOauthToken = Nothing + , _vpFields = Nothing + , _vpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vpQuotaUser :: Lens' VariantsetsPatch' (Maybe Text) +vpQuotaUser + = lens _vpQuotaUser (\ s a -> s{_vpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vpPrettyPrint :: Lens' VariantsetsPatch' Bool +vpPrettyPrint + = lens _vpPrettyPrint + (\ s a -> s{_vpPrettyPrint = a}) + +-- | The ID of the variant to be updated (must already exist). +vpVariantSetId :: Lens' VariantsetsPatch' Text +vpVariantSetId + = lens _vpVariantSetId + (\ s a -> s{_vpVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vpUserIp :: Lens' VariantsetsPatch' (Maybe Text) +vpUserIp = lens _vpUserIp (\ s a -> s{_vpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vpKey :: Lens' VariantsetsPatch' (Maybe Text) +vpKey = lens _vpKey (\ s a -> s{_vpKey = a}) + +-- | OAuth 2.0 token for the current user. +vpOauthToken :: Lens' VariantsetsPatch' (Maybe Text) +vpOauthToken + = lens _vpOauthToken (\ s a -> s{_vpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vpFields :: Lens' VariantsetsPatch' (Maybe Text) +vpFields = lens _vpFields (\ s a -> s{_vpFields = a}) + +-- | Data format for the response. +vpAlt :: Lens' VariantsetsPatch' Text +vpAlt = lens _vpAlt (\ s a -> s{_vpAlt = a}) + +instance GoogleRequest VariantsetsPatch' where + type Rs VariantsetsPatch' = VariantSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsPatch{..} + = go _vpQuotaUser _vpPrettyPrint _vpVariantSetId + _vpUserIp + _vpKey + _vpOauthToken + _vpFields + _vpAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsPatchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Search.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Search.hs new file mode 100644 index 000000000..4950626d1 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Search.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of all variant sets matching search criteria. Implements +-- GlobalAllianceApi.searchVariantSets. +-- +-- /See:/ for @GenomicsVariantsetsSearch@. +module Genomics.Variantsets.Search + ( + -- * REST Resource + VariantsetsSearchAPI + + -- * Creating a Request + , variantsetsSearch + , VariantsetsSearch + + -- * Request Lenses + , vssQuotaUser + , vssPrettyPrint + , vssUserIp + , vssKey + , vssOauthToken + , vssFields + , vssAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsSearch@ which the +-- 'VariantsetsSearch' request conforms to. +type VariantsetsSearchAPI = + "variantsets" :> + "search" :> Post '[JSON] SearchVariantSetsResponse + +-- | Returns a list of all variant sets matching search criteria. Implements +-- GlobalAllianceApi.searchVariantSets. +-- +-- /See:/ 'variantsetsSearch' smart constructor. +data VariantsetsSearch = VariantsetsSearch + { _vssQuotaUser :: !(Maybe Text) + , _vssPrettyPrint :: !Bool + , _vssUserIp :: !(Maybe Text) + , _vssKey :: !(Maybe Text) + , _vssOauthToken :: !(Maybe Text) + , _vssFields :: !(Maybe Text) + , _vssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vssQuotaUser' +-- +-- * 'vssPrettyPrint' +-- +-- * 'vssUserIp' +-- +-- * 'vssKey' +-- +-- * 'vssOauthToken' +-- +-- * 'vssFields' +-- +-- * 'vssAlt' +variantsetsSearch + :: VariantsetsSearch +variantsetsSearch = + VariantsetsSearch + { _vssQuotaUser = Nothing + , _vssPrettyPrint = True + , _vssUserIp = Nothing + , _vssKey = Nothing + , _vssOauthToken = Nothing + , _vssFields = Nothing + , _vssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vssQuotaUser :: Lens' VariantsetsSearch' (Maybe Text) +vssQuotaUser + = lens _vssQuotaUser (\ s a -> s{_vssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vssPrettyPrint :: Lens' VariantsetsSearch' Bool +vssPrettyPrint + = lens _vssPrettyPrint + (\ s a -> s{_vssPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vssUserIp :: Lens' VariantsetsSearch' (Maybe Text) +vssUserIp + = lens _vssUserIp (\ s a -> s{_vssUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vssKey :: Lens' VariantsetsSearch' (Maybe Text) +vssKey = lens _vssKey (\ s a -> s{_vssKey = a}) + +-- | OAuth 2.0 token for the current user. +vssOauthToken :: Lens' VariantsetsSearch' (Maybe Text) +vssOauthToken + = lens _vssOauthToken + (\ s a -> s{_vssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vssFields :: Lens' VariantsetsSearch' (Maybe Text) +vssFields + = lens _vssFields (\ s a -> s{_vssFields = a}) + +-- | Data format for the response. +vssAlt :: Lens' VariantsetsSearch' Text +vssAlt = lens _vssAlt (\ s a -> s{_vssAlt = a}) + +instance GoogleRequest VariantsetsSearch' where + type Rs VariantsetsSearch' = + SearchVariantSetsResponse + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsSearch{..} + = go _vssQuotaUser _vssPrettyPrint _vssUserIp _vssKey + _vssOauthToken + _vssFields + _vssAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsSearchAPI) + r + u diff --git a/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Update.hs b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Update.hs new file mode 100644 index 000000000..7d5b15172 --- /dev/null +++ b/gogol-genomics/gen/Network/Google/Resource/Genomics/Variantsets/Update.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Genomics.Variantsets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a variant set\'s metadata. All other modifications are silently +-- ignored. +-- +-- /See:/ for @GenomicsVariantsetsUpdate@. +module Genomics.Variantsets.Update + ( + -- * REST Resource + VariantsetsUpdateAPI + + -- * Creating a Request + , variantsetsUpdate + , VariantsetsUpdate + + -- * Request Lenses + , vuuQuotaUser + , vuuPrettyPrint + , vuuVariantSetId + , vuuUserIp + , vuuKey + , vuuOauthToken + , vuuFields + , vuuAlt + ) where + +import Network.Google.Genomics.Types +import Network.Google.Prelude + +-- | A resource alias for @GenomicsVariantsetsUpdate@ which the +-- 'VariantsetsUpdate' request conforms to. +type VariantsetsUpdateAPI = + "variantsets" :> + Capture "variantSetId" Text :> Put '[JSON] VariantSet + +-- | Updates a variant set\'s metadata. All other modifications are silently +-- ignored. +-- +-- /See:/ 'variantsetsUpdate' smart constructor. +data VariantsetsUpdate = VariantsetsUpdate + { _vuuQuotaUser :: !(Maybe Text) + , _vuuPrettyPrint :: !Bool + , _vuuVariantSetId :: !Text + , _vuuUserIp :: !(Maybe Text) + , _vuuKey :: !(Maybe Text) + , _vuuOauthToken :: !(Maybe Text) + , _vuuFields :: !(Maybe Text) + , _vuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VariantsetsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vuuQuotaUser' +-- +-- * 'vuuPrettyPrint' +-- +-- * 'vuuVariantSetId' +-- +-- * 'vuuUserIp' +-- +-- * 'vuuKey' +-- +-- * 'vuuOauthToken' +-- +-- * 'vuuFields' +-- +-- * 'vuuAlt' +variantsetsUpdate + :: Text -- ^ 'variantSetId' + -> VariantsetsUpdate +variantsetsUpdate pVuuVariantSetId_ = + VariantsetsUpdate + { _vuuQuotaUser = Nothing + , _vuuPrettyPrint = True + , _vuuVariantSetId = pVuuVariantSetId_ + , _vuuUserIp = Nothing + , _vuuKey = Nothing + , _vuuOauthToken = Nothing + , _vuuFields = Nothing + , _vuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vuuQuotaUser :: Lens' VariantsetsUpdate' (Maybe Text) +vuuQuotaUser + = lens _vuuQuotaUser (\ s a -> s{_vuuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vuuPrettyPrint :: Lens' VariantsetsUpdate' Bool +vuuPrettyPrint + = lens _vuuPrettyPrint + (\ s a -> s{_vuuPrettyPrint = a}) + +-- | The ID of the variant to be updated (must already exist). +vuuVariantSetId :: Lens' VariantsetsUpdate' Text +vuuVariantSetId + = lens _vuuVariantSetId + (\ s a -> s{_vuuVariantSetId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vuuUserIp :: Lens' VariantsetsUpdate' (Maybe Text) +vuuUserIp + = lens _vuuUserIp (\ s a -> s{_vuuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vuuKey :: Lens' VariantsetsUpdate' (Maybe Text) +vuuKey = lens _vuuKey (\ s a -> s{_vuuKey = a}) + +-- | OAuth 2.0 token for the current user. +vuuOauthToken :: Lens' VariantsetsUpdate' (Maybe Text) +vuuOauthToken + = lens _vuuOauthToken + (\ s a -> s{_vuuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vuuFields :: Lens' VariantsetsUpdate' (Maybe Text) +vuuFields + = lens _vuuFields (\ s a -> s{_vuuFields = a}) + +-- | Data format for the response. +vuuAlt :: Lens' VariantsetsUpdate' Text +vuuAlt = lens _vuuAlt (\ s a -> s{_vuuAlt = a}) + +instance GoogleRequest VariantsetsUpdate' where + type Rs VariantsetsUpdate' = VariantSet + request = requestWithRoute defReq genomicsURL + requestWithRoute r u VariantsetsUpdate{..} + = go _vuuQuotaUser _vuuPrettyPrint _vuuVariantSetId + _vuuUserIp + _vuuKey + _vuuOauthToken + _vuuFields + _vuuAlt + where go + = clientWithRoute + (Proxy :: Proxy VariantsetsUpdateAPI) + r + u diff --git a/gogol-genomics/gogol-genomics.cabal b/gogol-genomics/gogol-genomics.cabal new file mode 100644 index 000000000..7dac5c913 --- /dev/null +++ b/gogol-genomics/gogol-genomics.cabal @@ -0,0 +1,102 @@ +name: gogol-genomics +version: 0.0.1 +synopsis: Genomics API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Provides access to Genomics data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Genomics + , Network.Google.Genomics.Types + , Network.Google.Resource.Genomics.AnnotationSets.Create + , Network.Google.Resource.Genomics.AnnotationSets.Delete + , Network.Google.Resource.Genomics.AnnotationSets.Get + , Network.Google.Resource.Genomics.AnnotationSets.Patch + , Network.Google.Resource.Genomics.AnnotationSets.Search + , Network.Google.Resource.Genomics.AnnotationSets.Update + , Network.Google.Resource.Genomics.Annotations.BatchCreate + , Network.Google.Resource.Genomics.Annotations.Create + , Network.Google.Resource.Genomics.Annotations.Delete + , Network.Google.Resource.Genomics.Annotations.Get + , Network.Google.Resource.Genomics.Annotations.Patch + , Network.Google.Resource.Genomics.Annotations.Search + , Network.Google.Resource.Genomics.Annotations.Update + , Network.Google.Resource.Genomics.Callsets.Create + , Network.Google.Resource.Genomics.Callsets.Delete + , Network.Google.Resource.Genomics.Callsets.Get + , Network.Google.Resource.Genomics.Callsets.Patch + , Network.Google.Resource.Genomics.Callsets.Search + , Network.Google.Resource.Genomics.Callsets.Update + , Network.Google.Resource.Genomics.Datasets.Create + , Network.Google.Resource.Genomics.Datasets.Delete + , Network.Google.Resource.Genomics.Datasets.Get + , Network.Google.Resource.Genomics.Datasets.List + , Network.Google.Resource.Genomics.Datasets.Patch + , Network.Google.Resource.Genomics.Datasets.Undelete + , Network.Google.Resource.Genomics.Datasets.Update + , Network.Google.Resource.Genomics.Experimental.Jobs.Create + , Network.Google.Resource.Genomics.Jobs.Cancel + , Network.Google.Resource.Genomics.Jobs.Get + , Network.Google.Resource.Genomics.Jobs.Search + , Network.Google.Resource.Genomics.Readgroupsets.Align + , Network.Google.Resource.Genomics.Readgroupsets.Call + , Network.Google.Resource.Genomics.Readgroupsets.Coveragebuckets.List + , Network.Google.Resource.Genomics.Readgroupsets.Delete + , Network.Google.Resource.Genomics.Readgroupsets.Export + , Network.Google.Resource.Genomics.Readgroupsets.Get + , Network.Google.Resource.Genomics.Readgroupsets.Import + , Network.Google.Resource.Genomics.Readgroupsets.Patch + , Network.Google.Resource.Genomics.Readgroupsets.Search + , Network.Google.Resource.Genomics.Readgroupsets.Update + , Network.Google.Resource.Genomics.Reads.Search + , Network.Google.Resource.Genomics.References.Bases.List + , Network.Google.Resource.Genomics.References.Get + , Network.Google.Resource.Genomics.References.Search + , Network.Google.Resource.Genomics.Referencesets.Get + , Network.Google.Resource.Genomics.Referencesets.Search + , Network.Google.Resource.Genomics.Variants.Create + , Network.Google.Resource.Genomics.Variants.Delete + , Network.Google.Resource.Genomics.Variants.Get + , Network.Google.Resource.Genomics.Variants.Search + , Network.Google.Resource.Genomics.Variants.Update + , Network.Google.Resource.Genomics.Variantsets.Create + , Network.Google.Resource.Genomics.Variantsets.Delete + , Network.Google.Resource.Genomics.Variantsets.Export + , Network.Google.Resource.Genomics.Variantsets.Get + , Network.Google.Resource.Genomics.Variantsets.ImportVariants + , Network.Google.Resource.Genomics.Variantsets.MergeVariants + , Network.Google.Resource.Genomics.Variantsets.Patch + , Network.Google.Resource.Genomics.Variantsets.Search + , Network.Google.Resource.Genomics.Variantsets.Update + + other-modules: + Network.Google.Genomics.Types.Product + , Network.Google.Genomics.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-genomics/src/.gitkeep b/gogol-genomics/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-gmail/LICENSE b/gogol-gmail/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-gmail/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-gmail/Makefile b/gogol-gmail/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-gmail/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-gmail/README.md b/gogol-gmail/README.md new file mode 100644 index 000000000..f2779193c --- /dev/null +++ b/gogol-gmail/README.md @@ -0,0 +1,28 @@ +# gogol-gmail + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Gmail API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-gmail` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-gmail/Setup.hs b/gogol-gmail/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-gmail/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-gmail/gen/Network/Google/Gmail.hs b/gogol-gmail/gen/Network/Google/Gmail.hs new file mode 100644 index 000000000..b80dc8477 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Gmail.hs @@ -0,0 +1,331 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Gmail +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Gmail REST API. +-- +-- /See:/ +module Network.Google.Gmail + ( + -- * API + GmailAPI + , gmailAPI + , gmailURL + + -- * Service Methods + + -- * REST Resources + + -- ** GmailUsersDraftsCreate + , module Gmail.Users.Drafts.Create + + -- ** GmailUsersDraftsDelete + , module Gmail.Users.Drafts.Delete + + -- ** GmailUsersDraftsGet + , module Gmail.Users.Drafts.Get + + -- ** GmailUsersDraftsList + , module Gmail.Users.Drafts.List + + -- ** GmailUsersDraftsSend + , module Gmail.Users.Drafts.Send + + -- ** GmailUsersDraftsUpdate + , module Gmail.Users.Drafts.Update + + -- ** GmailUsersGetProfile + , module Gmail.Users.GetProfile + + -- ** GmailUsersHistoryList + , module Gmail.Users.History.List + + -- ** GmailUsersLabelsCreate + , module Gmail.Users.Labels.Create + + -- ** GmailUsersLabelsDelete + , module Gmail.Users.Labels.Delete + + -- ** GmailUsersLabelsGet + , module Gmail.Users.Labels.Get + + -- ** GmailUsersLabelsList + , module Gmail.Users.Labels.List + + -- ** GmailUsersLabelsPatch + , module Gmail.Users.Labels.Patch + + -- ** GmailUsersLabelsUpdate + , module Gmail.Users.Labels.Update + + -- ** GmailUsersMessagesAttachmentsGet + , module Gmail.Users.Messages.Attachments.Get + + -- ** GmailUsersMessagesDelete + , module Gmail.Users.Messages.Delete + + -- ** GmailUsersMessagesGet + , module Gmail.Users.Messages.Get + + -- ** GmailUsersMessagesImport + , module Gmail.Users.Messages.Import + + -- ** GmailUsersMessagesInsert + , module Gmail.Users.Messages.Insert + + -- ** GmailUsersMessagesList + , module Gmail.Users.Messages.List + + -- ** GmailUsersMessagesModify + , module Gmail.Users.Messages.Modify + + -- ** GmailUsersMessagesSend + , module Gmail.Users.Messages.Send + + -- ** GmailUsersMessagesTrash + , module Gmail.Users.Messages.Trash + + -- ** GmailUsersMessagesUntrash + , module Gmail.Users.Messages.Untrash + + -- ** GmailUsersStop + , module Gmail.Users.Stop + + -- ** GmailUsersThreadsDelete + , module Gmail.Users.Threads.Delete + + -- ** GmailUsersThreadsGet + , module Gmail.Users.Threads.Get + + -- ** GmailUsersThreadsList + , module Gmail.Users.Threads.List + + -- ** GmailUsersThreadsModify + , module Gmail.Users.Threads.Modify + + -- ** GmailUsersThreadsTrash + , module Gmail.Users.Threads.Trash + + -- ** GmailUsersThreadsUntrash + , module Gmail.Users.Threads.Untrash + + -- ** GmailUsersWatch + , module Gmail.Users.Watch + + -- * Types + + -- ** ModifyThreadRequest + , ModifyThreadRequest + , modifyThreadRequest + , mtrRemoveLabelIds + , mtrAddLabelIds + + -- ** History + , History + , history + , hLabelsRemoved + , hMessagesDeleted + , hMessagesAdded + , hLabelsAdded + , hId + , hMessages + + -- ** ModifyMessageRequest + , ModifyMessageRequest + , modifyMessageRequest + , mmrRemoveLabelIds + , mmrAddLabelIds + + -- ** ListHistoryResponse + , ListHistoryResponse + , listHistoryResponse + , lhrNextPageToken + , lhrHistory + , lhrHistoryId + + -- ** MessagePartHeader + , MessagePartHeader + , messagePartHeader + , mphValue + , mphName + + -- ** Profile + , Profile + , profile + , pMessagesTotal + , pThreadsTotal + , pHistoryId + , pEmailAddress + + -- ** HistoryMessageDeleted + , HistoryMessageDeleted + , historyMessageDeleted + , hmdMessage + + -- ** ListThreadsResponse + , ListThreadsResponse + , listThreadsResponse + , ltrNextPageToken + , ltrResultSizeEstimate + , ltrThreads + + -- ** HistoryLabelAdded + , HistoryLabelAdded + , historyLabelAdded + , hlaLabelIds + , hlaMessage + + -- ** ListLabelsResponse + , ListLabelsResponse + , listLabelsResponse + , llrLabels + + -- ** MessagePart + , MessagePart + , messagePart + , mpParts + , mpBody + , mpMimeType + , mpHeaders + , mpPartId + , mpFilename + + -- ** MessagePartBody + , MessagePartBody + , messagePartBody + , mpbSize + , mpbData + , mpbAttachmentId + + -- ** ListDraftsResponse + , ListDraftsResponse + , listDraftsResponse + , ldrNextPageToken + , ldrResultSizeEstimate + , ldrDrafts + + -- ** WatchResponse + , WatchResponse + , watchResponse + , wrExpiration + , wrHistoryId + + -- ** Draft + , Draft + , draft + , dId + , dMessage + + -- ** WatchRequest + , WatchRequest + , watchRequest + , wrLabelFilterAction + , wrTopicName + , wrLabelIds + + -- ** Message + , Message + , message + , mRaw + , mSnippet + , mSizeEstimate + , mPayload + , mHistoryId + , mId + , mLabelIds + , mThreadId + , mInternalDate + + -- ** Thread + , Thread + , thread + , tSnippet + , tHistoryId + , tId + , tMessages + + -- ** Label + , Label + , label + , lThreadsUnread + , lMessageListVisibility + , lMessagesTotal + , lMessagesUnread + , lName + , lThreadsTotal + , lLabelListVisibility + , lId + , lType + + -- ** HistoryLabelRemoved + , HistoryLabelRemoved + , historyLabelRemoved + , hlrLabelIds + , hlrMessage + + -- ** HistoryMessageAdded + , HistoryMessageAdded + , historyMessageAdded + , hmaMessage + + -- ** ListMessagesResponse + , ListMessagesResponse + , listMessagesResponse + , lmrNextPageToken + , lmrResultSizeEstimate + , lmrMessages + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude +import Network.Google.Resource.Gmail.Users.Drafts.Create +import Network.Google.Resource.Gmail.Users.Drafts.Delete +import Network.Google.Resource.Gmail.Users.Drafts.Get +import Network.Google.Resource.Gmail.Users.Drafts.List +import Network.Google.Resource.Gmail.Users.Drafts.Send +import Network.Google.Resource.Gmail.Users.Drafts.Update +import Network.Google.Resource.Gmail.Users.GetProfile +import Network.Google.Resource.Gmail.Users.History.List +import Network.Google.Resource.Gmail.Users.Labels.Create +import Network.Google.Resource.Gmail.Users.Labels.Delete +import Network.Google.Resource.Gmail.Users.Labels.Get +import Network.Google.Resource.Gmail.Users.Labels.List +import Network.Google.Resource.Gmail.Users.Labels.Patch +import Network.Google.Resource.Gmail.Users.Labels.Update +import Network.Google.Resource.Gmail.Users.Messages.Attachments.Get +import Network.Google.Resource.Gmail.Users.Messages.Delete +import Network.Google.Resource.Gmail.Users.Messages.Get +import Network.Google.Resource.Gmail.Users.Messages.Import +import Network.Google.Resource.Gmail.Users.Messages.Insert +import Network.Google.Resource.Gmail.Users.Messages.List +import Network.Google.Resource.Gmail.Users.Messages.Modify +import Network.Google.Resource.Gmail.Users.Messages.Send +import Network.Google.Resource.Gmail.Users.Messages.Trash +import Network.Google.Resource.Gmail.Users.Messages.Untrash +import Network.Google.Resource.Gmail.Users.Stop +import Network.Google.Resource.Gmail.Users.Threads.Delete +import Network.Google.Resource.Gmail.Users.Threads.Get +import Network.Google.Resource.Gmail.Users.Threads.List +import Network.Google.Resource.Gmail.Users.Threads.Modify +import Network.Google.Resource.Gmail.Users.Threads.Trash +import Network.Google.Resource.Gmail.Users.Threads.Untrash +import Network.Google.Resource.Gmail.Users.Watch + +{- $resources +TODO +-} + +type GmailAPI = Users + +gmailAPI :: Proxy GmailAPI +gmailAPI = Proxy diff --git a/gogol-gmail/gen/Network/Google/Gmail/Types.hs b/gogol-gmail/gen/Network/Google/Gmail/Types.hs new file mode 100644 index 000000000..c37d9a531 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Gmail/Types.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Gmail.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Gmail.Types + ( + -- * Service URL + gmailURL + + -- * ModifyThreadRequest + , ModifyThreadRequest + , modifyThreadRequest + , mtrRemoveLabelIds + , mtrAddLabelIds + + -- * History + , History + , history + , hLabelsRemoved + , hMessagesDeleted + , hMessagesAdded + , hLabelsAdded + , hId + , hMessages + + -- * ModifyMessageRequest + , ModifyMessageRequest + , modifyMessageRequest + , mmrRemoveLabelIds + , mmrAddLabelIds + + -- * ListHistoryResponse + , ListHistoryResponse + , listHistoryResponse + , lhrNextPageToken + , lhrHistory + , lhrHistoryId + + -- * MessagePartHeader + , MessagePartHeader + , messagePartHeader + , mphValue + , mphName + + -- * Profile + , Profile + , profile + , pMessagesTotal + , pThreadsTotal + , pHistoryId + , pEmailAddress + + -- * HistoryMessageDeleted + , HistoryMessageDeleted + , historyMessageDeleted + , hmdMessage + + -- * ListThreadsResponse + , ListThreadsResponse + , listThreadsResponse + , ltrNextPageToken + , ltrResultSizeEstimate + , ltrThreads + + -- * HistoryLabelAdded + , HistoryLabelAdded + , historyLabelAdded + , hlaLabelIds + , hlaMessage + + -- * ListLabelsResponse + , ListLabelsResponse + , listLabelsResponse + , llrLabels + + -- * MessagePart + , MessagePart + , messagePart + , mpParts + , mpBody + , mpMimeType + , mpHeaders + , mpPartId + , mpFilename + + -- * MessagePartBody + , MessagePartBody + , messagePartBody + , mpbSize + , mpbData + , mpbAttachmentId + + -- * ListDraftsResponse + , ListDraftsResponse + , listDraftsResponse + , ldrNextPageToken + , ldrResultSizeEstimate + , ldrDrafts + + -- * WatchResponse + , WatchResponse + , watchResponse + , wrExpiration + , wrHistoryId + + -- * Draft + , Draft + , draft + , dId + , dMessage + + -- * WatchRequest + , WatchRequest + , watchRequest + , wrLabelFilterAction + , wrTopicName + , wrLabelIds + + -- * Message + , Message + , message + , mRaw + , mSnippet + , mSizeEstimate + , mPayload + , mHistoryId + , mId + , mLabelIds + , mThreadId + , mInternalDate + + -- * Thread + , Thread + , thread + , tSnippet + , tHistoryId + , tId + , tMessages + + -- * Label + , Label + , label + , lThreadsUnread + , lMessageListVisibility + , lMessagesTotal + , lMessagesUnread + , lName + , lThreadsTotal + , lLabelListVisibility + , lId + , lType + + -- * HistoryLabelRemoved + , HistoryLabelRemoved + , historyLabelRemoved + , hlrLabelIds + , hlrMessage + + -- * HistoryMessageAdded + , HistoryMessageAdded + , historyMessageAdded + , hmaMessage + + -- * ListMessagesResponse + , ListMessagesResponse + , listMessagesResponse + , lmrNextPageToken + , lmrResultSizeEstimate + , lmrMessages + ) where + +import Network.Google.Gmail.Types.Product +import Network.Google.Gmail.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Gmail API. +gmailURL :: BaseURL +gmailURL + = BaseUrl Https + "https://www.googleapis.com/gmail/v1/users/" + 443 diff --git a/gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs b/gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs new file mode 100644 index 000000000..06ebb3c26 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs @@ -0,0 +1,1446 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Gmail.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Gmail.Types.Product where + +import Network.Google.Gmail.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'modifyThreadRequest' smart constructor. +data ModifyThreadRequest = ModifyThreadRequest + { _mtrRemoveLabelIds :: !(Maybe [Text]) + , _mtrAddLabelIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ModifyThreadRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mtrRemoveLabelIds' +-- +-- * 'mtrAddLabelIds' +modifyThreadRequest + :: ModifyThreadRequest +modifyThreadRequest = + ModifyThreadRequest + { _mtrRemoveLabelIds = Nothing + , _mtrAddLabelIds = Nothing + } + +-- | A list of IDs of labels to remove from this thread. +mtrRemoveLabelIds :: Lens' ModifyThreadRequest [Text] +mtrRemoveLabelIds + = lens _mtrRemoveLabelIds + (\ s a -> s{_mtrRemoveLabelIds = a}) + . _Default + . _Coerce + +-- | A list of IDs of labels to add to this thread. +mtrAddLabelIds :: Lens' ModifyThreadRequest [Text] +mtrAddLabelIds + = lens _mtrAddLabelIds + (\ s a -> s{_mtrAddLabelIds = a}) + . _Default + . _Coerce + +instance FromJSON ModifyThreadRequest where + parseJSON + = withObject "ModifyThreadRequest" + (\ o -> + ModifyThreadRequest <$> + (o .:? "removeLabelIds" .!= mempty) <*> + (o .:? "addLabelIds" .!= mempty)) + +instance ToJSON ModifyThreadRequest where + toJSON ModifyThreadRequest{..} + = object + (catMaybes + [("removeLabelIds" .=) <$> _mtrRemoveLabelIds, + ("addLabelIds" .=) <$> _mtrAddLabelIds]) + +-- | A record of a change to the user\'s mailbox. Each history change may +-- affect multiple messages in multiple ways. +-- +-- /See:/ 'history' smart constructor. +data History = History + { _hLabelsRemoved :: !(Maybe [Maybe HistoryLabelRemoved]) + , _hMessagesDeleted :: !(Maybe [Maybe HistoryMessageDeleted]) + , _hMessagesAdded :: !(Maybe [Maybe HistoryMessageAdded]) + , _hLabelsAdded :: !(Maybe [Maybe HistoryLabelAdded]) + , _hId :: !(Maybe Word64) + , _hMessages :: !(Maybe [Maybe Message]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'History' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hLabelsRemoved' +-- +-- * 'hMessagesDeleted' +-- +-- * 'hMessagesAdded' +-- +-- * 'hLabelsAdded' +-- +-- * 'hId' +-- +-- * 'hMessages' +history + :: History +history = + History + { _hLabelsRemoved = Nothing + , _hMessagesDeleted = Nothing + , _hMessagesAdded = Nothing + , _hLabelsAdded = Nothing + , _hId = Nothing + , _hMessages = Nothing + } + +-- | Labels removed from messages in this history record. +hLabelsRemoved :: Lens' History [Maybe HistoryLabelRemoved] +hLabelsRemoved + = lens _hLabelsRemoved + (\ s a -> s{_hLabelsRemoved = a}) + . _Default + . _Coerce + +-- | Messages deleted (not Trashed) from the mailbox in this history record. +hMessagesDeleted :: Lens' History [Maybe HistoryMessageDeleted] +hMessagesDeleted + = lens _hMessagesDeleted + (\ s a -> s{_hMessagesDeleted = a}) + . _Default + . _Coerce + +-- | Messages added to the mailbox in this history record. +hMessagesAdded :: Lens' History [Maybe HistoryMessageAdded] +hMessagesAdded + = lens _hMessagesAdded + (\ s a -> s{_hMessagesAdded = a}) + . _Default + . _Coerce + +-- | Labels added to messages in this history record. +hLabelsAdded :: Lens' History [Maybe HistoryLabelAdded] +hLabelsAdded + = lens _hLabelsAdded (\ s a -> s{_hLabelsAdded = a}) + . _Default + . _Coerce + +-- | The mailbox sequence ID. +hId :: Lens' History (Maybe Word64) +hId = lens _hId (\ s a -> s{_hId = a}) + +-- | List of messages changed in this history record. The fields for specific +-- change types, such as messagesAdded may duplicate messages in this +-- field. We recommend using the specific change-type fields instead of +-- this. +hMessages :: Lens' History [Maybe Message] +hMessages + = lens _hMessages (\ s a -> s{_hMessages = a}) . + _Default + . _Coerce + +instance FromJSON History where + parseJSON + = withObject "History" + (\ o -> + History <$> + (o .:? "labelsRemoved" .!= mempty) <*> + (o .:? "messagesDeleted" .!= mempty) + <*> (o .:? "messagesAdded" .!= mempty) + <*> (o .:? "labelsAdded" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "messages" .!= mempty)) + +instance ToJSON History where + toJSON History{..} + = object + (catMaybes + [("labelsRemoved" .=) <$> _hLabelsRemoved, + ("messagesDeleted" .=) <$> _hMessagesDeleted, + ("messagesAdded" .=) <$> _hMessagesAdded, + ("labelsAdded" .=) <$> _hLabelsAdded, + ("id" .=) <$> _hId, ("messages" .=) <$> _hMessages]) + +-- +-- /See:/ 'modifyMessageRequest' smart constructor. +data ModifyMessageRequest = ModifyMessageRequest + { _mmrRemoveLabelIds :: !(Maybe [Text]) + , _mmrAddLabelIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ModifyMessageRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mmrRemoveLabelIds' +-- +-- * 'mmrAddLabelIds' +modifyMessageRequest + :: ModifyMessageRequest +modifyMessageRequest = + ModifyMessageRequest + { _mmrRemoveLabelIds = Nothing + , _mmrAddLabelIds = Nothing + } + +-- | A list IDs of labels to remove from this message. +mmrRemoveLabelIds :: Lens' ModifyMessageRequest [Text] +mmrRemoveLabelIds + = lens _mmrRemoveLabelIds + (\ s a -> s{_mmrRemoveLabelIds = a}) + . _Default + . _Coerce + +-- | A list of IDs of labels to add to this message. +mmrAddLabelIds :: Lens' ModifyMessageRequest [Text] +mmrAddLabelIds + = lens _mmrAddLabelIds + (\ s a -> s{_mmrAddLabelIds = a}) + . _Default + . _Coerce + +instance FromJSON ModifyMessageRequest where + parseJSON + = withObject "ModifyMessageRequest" + (\ o -> + ModifyMessageRequest <$> + (o .:? "removeLabelIds" .!= mempty) <*> + (o .:? "addLabelIds" .!= mempty)) + +instance ToJSON ModifyMessageRequest where + toJSON ModifyMessageRequest{..} + = object + (catMaybes + [("removeLabelIds" .=) <$> _mmrRemoveLabelIds, + ("addLabelIds" .=) <$> _mmrAddLabelIds]) + +-- +-- /See:/ 'listHistoryResponse' smart constructor. +data ListHistoryResponse = ListHistoryResponse + { _lhrNextPageToken :: !(Maybe Text) + , _lhrHistory :: !(Maybe [Maybe History]) + , _lhrHistoryId :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListHistoryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lhrNextPageToken' +-- +-- * 'lhrHistory' +-- +-- * 'lhrHistoryId' +listHistoryResponse + :: ListHistoryResponse +listHistoryResponse = + ListHistoryResponse + { _lhrNextPageToken = Nothing + , _lhrHistory = Nothing + , _lhrHistoryId = Nothing + } + +-- | Page token to retrieve the next page of results in the list. +lhrNextPageToken :: Lens' ListHistoryResponse (Maybe Text) +lhrNextPageToken + = lens _lhrNextPageToken + (\ s a -> s{_lhrNextPageToken = a}) + +-- | List of history records. Any messages contained in the response will +-- typically only have id and threadId fields populated. +lhrHistory :: Lens' ListHistoryResponse [Maybe History] +lhrHistory + = lens _lhrHistory (\ s a -> s{_lhrHistory = a}) . + _Default + . _Coerce + +-- | The ID of the mailbox\'s current history record. +lhrHistoryId :: Lens' ListHistoryResponse (Maybe Word64) +lhrHistoryId + = lens _lhrHistoryId (\ s a -> s{_lhrHistoryId = a}) + +instance FromJSON ListHistoryResponse where + parseJSON + = withObject "ListHistoryResponse" + (\ o -> + ListHistoryResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "history" .!= mempty) + <*> (o .:? "historyId")) + +instance ToJSON ListHistoryResponse where + toJSON ListHistoryResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lhrNextPageToken, + ("history" .=) <$> _lhrHistory, + ("historyId" .=) <$> _lhrHistoryId]) + +-- +-- /See:/ 'messagePartHeader' smart constructor. +data MessagePartHeader = MessagePartHeader + { _mphValue :: !(Maybe Text) + , _mphName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MessagePartHeader' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mphValue' +-- +-- * 'mphName' +messagePartHeader + :: MessagePartHeader +messagePartHeader = + MessagePartHeader + { _mphValue = Nothing + , _mphName = Nothing + } + +-- | The value of the header after the : separator. For example, +-- someuser\'example.com. +mphValue :: Lens' MessagePartHeader (Maybe Text) +mphValue = lens _mphValue (\ s a -> s{_mphValue = a}) + +-- | The name of the header before the : separator. For example, To. +mphName :: Lens' MessagePartHeader (Maybe Text) +mphName = lens _mphName (\ s a -> s{_mphName = a}) + +instance FromJSON MessagePartHeader where + parseJSON + = withObject "MessagePartHeader" + (\ o -> + MessagePartHeader <$> + (o .:? "value") <*> (o .:? "name")) + +instance ToJSON MessagePartHeader where + toJSON MessagePartHeader{..} + = object + (catMaybes + [("value" .=) <$> _mphValue, + ("name" .=) <$> _mphName]) + +-- | Profile for a Gmail user. +-- +-- /See:/ 'profile' smart constructor. +data Profile = Profile + { _pMessagesTotal :: !(Maybe Int32) + , _pThreadsTotal :: !(Maybe Int32) + , _pHistoryId :: !(Maybe Word64) + , _pEmailAddress :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Profile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pMessagesTotal' +-- +-- * 'pThreadsTotal' +-- +-- * 'pHistoryId' +-- +-- * 'pEmailAddress' +profile + :: Profile +profile = + Profile + { _pMessagesTotal = Nothing + , _pThreadsTotal = Nothing + , _pHistoryId = Nothing + , _pEmailAddress = Nothing + } + +-- | The total number of messages in the mailbox. +pMessagesTotal :: Lens' Profile (Maybe Int32) +pMessagesTotal + = lens _pMessagesTotal + (\ s a -> s{_pMessagesTotal = a}) + +-- | The total number of threads in the mailbox. +pThreadsTotal :: Lens' Profile (Maybe Int32) +pThreadsTotal + = lens _pThreadsTotal + (\ s a -> s{_pThreadsTotal = a}) + +-- | The ID of the mailbox\'s current history record. +pHistoryId :: Lens' Profile (Maybe Word64) +pHistoryId + = lens _pHistoryId (\ s a -> s{_pHistoryId = a}) + +-- | The user\'s email address. +pEmailAddress :: Lens' Profile (Maybe Text) +pEmailAddress + = lens _pEmailAddress + (\ s a -> s{_pEmailAddress = a}) + +instance FromJSON Profile where + parseJSON + = withObject "Profile" + (\ o -> + Profile <$> + (o .:? "messagesTotal") <*> (o .:? "threadsTotal") + <*> (o .:? "historyId") + <*> (o .:? "emailAddress")) + +instance ToJSON Profile where + toJSON Profile{..} + = object + (catMaybes + [("messagesTotal" .=) <$> _pMessagesTotal, + ("threadsTotal" .=) <$> _pThreadsTotal, + ("historyId" .=) <$> _pHistoryId, + ("emailAddress" .=) <$> _pEmailAddress]) + +-- +-- /See:/ 'historyMessageDeleted' smart constructor. +newtype HistoryMessageDeleted = HistoryMessageDeleted + { _hmdMessage :: Maybe (Maybe Message) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HistoryMessageDeleted' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hmdMessage' +historyMessageDeleted + :: HistoryMessageDeleted +historyMessageDeleted = + HistoryMessageDeleted + { _hmdMessage = Nothing + } + +hmdMessage :: Lens' HistoryMessageDeleted (Maybe (Maybe Message)) +hmdMessage + = lens _hmdMessage (\ s a -> s{_hmdMessage = a}) + +instance FromJSON HistoryMessageDeleted where + parseJSON + = withObject "HistoryMessageDeleted" + (\ o -> HistoryMessageDeleted <$> (o .:? "message")) + +instance ToJSON HistoryMessageDeleted where + toJSON HistoryMessageDeleted{..} + = object (catMaybes [("message" .=) <$> _hmdMessage]) + +-- +-- /See:/ 'listThreadsResponse' smart constructor. +data ListThreadsResponse = ListThreadsResponse + { _ltrNextPageToken :: !(Maybe Text) + , _ltrResultSizeEstimate :: !(Maybe Word32) + , _ltrThreads :: !(Maybe [Maybe Thread]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListThreadsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrNextPageToken' +-- +-- * 'ltrResultSizeEstimate' +-- +-- * 'ltrThreads' +listThreadsResponse + :: ListThreadsResponse +listThreadsResponse = + ListThreadsResponse + { _ltrNextPageToken = Nothing + , _ltrResultSizeEstimate = Nothing + , _ltrThreads = Nothing + } + +-- | Page token to retrieve the next page of results in the list. +ltrNextPageToken :: Lens' ListThreadsResponse (Maybe Text) +ltrNextPageToken + = lens _ltrNextPageToken + (\ s a -> s{_ltrNextPageToken = a}) + +-- | Estimated total number of results. +ltrResultSizeEstimate :: Lens' ListThreadsResponse (Maybe Word32) +ltrResultSizeEstimate + = lens _ltrResultSizeEstimate + (\ s a -> s{_ltrResultSizeEstimate = a}) + +-- | List of threads. +ltrThreads :: Lens' ListThreadsResponse [Maybe Thread] +ltrThreads + = lens _ltrThreads (\ s a -> s{_ltrThreads = a}) . + _Default + . _Coerce + +instance FromJSON ListThreadsResponse where + parseJSON + = withObject "ListThreadsResponse" + (\ o -> + ListThreadsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "resultSizeEstimate") + <*> (o .:? "threads" .!= mempty)) + +instance ToJSON ListThreadsResponse where + toJSON ListThreadsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltrNextPageToken, + ("resultSizeEstimate" .=) <$> _ltrResultSizeEstimate, + ("threads" .=) <$> _ltrThreads]) + +-- +-- /See:/ 'historyLabelAdded' smart constructor. +data HistoryLabelAdded = HistoryLabelAdded + { _hlaLabelIds :: !(Maybe [Text]) + , _hlaMessage :: !(Maybe (Maybe Message)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HistoryLabelAdded' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hlaLabelIds' +-- +-- * 'hlaMessage' +historyLabelAdded + :: HistoryLabelAdded +historyLabelAdded = + HistoryLabelAdded + { _hlaLabelIds = Nothing + , _hlaMessage = Nothing + } + +-- | Label IDs added to the message. +hlaLabelIds :: Lens' HistoryLabelAdded [Text] +hlaLabelIds + = lens _hlaLabelIds (\ s a -> s{_hlaLabelIds = a}) . + _Default + . _Coerce + +hlaMessage :: Lens' HistoryLabelAdded (Maybe (Maybe Message)) +hlaMessage + = lens _hlaMessage (\ s a -> s{_hlaMessage = a}) + +instance FromJSON HistoryLabelAdded where + parseJSON + = withObject "HistoryLabelAdded" + (\ o -> + HistoryLabelAdded <$> + (o .:? "labelIds" .!= mempty) <*> (o .:? "message")) + +instance ToJSON HistoryLabelAdded where + toJSON HistoryLabelAdded{..} + = object + (catMaybes + [("labelIds" .=) <$> _hlaLabelIds, + ("message" .=) <$> _hlaMessage]) + +-- +-- /See:/ 'listLabelsResponse' smart constructor. +newtype ListLabelsResponse = ListLabelsResponse + { _llrLabels :: Maybe [Maybe Label] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLabelsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrLabels' +listLabelsResponse + :: ListLabelsResponse +listLabelsResponse = + ListLabelsResponse + { _llrLabels = Nothing + } + +-- | List of labels. +llrLabels :: Lens' ListLabelsResponse [Maybe Label] +llrLabels + = lens _llrLabels (\ s a -> s{_llrLabels = a}) . + _Default + . _Coerce + +instance FromJSON ListLabelsResponse where + parseJSON + = withObject "ListLabelsResponse" + (\ o -> + ListLabelsResponse <$> (o .:? "labels" .!= mempty)) + +instance ToJSON ListLabelsResponse where + toJSON ListLabelsResponse{..} + = object (catMaybes [("labels" .=) <$> _llrLabels]) + +-- | A single MIME message part. +-- +-- /See:/ 'messagePart' smart constructor. +data MessagePart = MessagePart + { _mpParts :: !(Maybe [Maybe MessagePart]) + , _mpBody :: !(Maybe (Maybe MessagePartBody)) + , _mpMimeType :: !(Maybe Text) + , _mpHeaders :: !(Maybe [Maybe MessagePartHeader]) + , _mpPartId :: !(Maybe Text) + , _mpFilename :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MessagePart' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpParts' +-- +-- * 'mpBody' +-- +-- * 'mpMimeType' +-- +-- * 'mpHeaders' +-- +-- * 'mpPartId' +-- +-- * 'mpFilename' +messagePart + :: MessagePart +messagePart = + MessagePart + { _mpParts = Nothing + , _mpBody = Nothing + , _mpMimeType = Nothing + , _mpHeaders = Nothing + , _mpPartId = Nothing + , _mpFilename = Nothing + } + +-- | The child MIME message parts of this part. This only applies to +-- container MIME message parts, for example multipart\/*. For non- +-- container MIME message part types, such as text\/plain, this field is +-- empty. For more information, see RFC 1521. +mpParts :: Lens' MessagePart [Maybe MessagePart] +mpParts + = lens _mpParts (\ s a -> s{_mpParts = a}) . _Default + . _Coerce + +-- | The message part body for this part, which may be empty for container +-- MIME message parts. +mpBody :: Lens' MessagePart (Maybe (Maybe MessagePartBody)) +mpBody = lens _mpBody (\ s a -> s{_mpBody = a}) + +-- | The MIME type of the message part. +mpMimeType :: Lens' MessagePart (Maybe Text) +mpMimeType + = lens _mpMimeType (\ s a -> s{_mpMimeType = a}) + +-- | List of headers on this message part. For the top-level message part, +-- representing the entire message payload, it will contain the standard +-- RFC 2822 email headers such as To, From, and Subject. +mpHeaders :: Lens' MessagePart [Maybe MessagePartHeader] +mpHeaders + = lens _mpHeaders (\ s a -> s{_mpHeaders = a}) . + _Default + . _Coerce + +-- | The immutable ID of the message part. +mpPartId :: Lens' MessagePart (Maybe Text) +mpPartId = lens _mpPartId (\ s a -> s{_mpPartId = a}) + +-- | The filename of the attachment. Only present if this message part +-- represents an attachment. +mpFilename :: Lens' MessagePart (Maybe Text) +mpFilename + = lens _mpFilename (\ s a -> s{_mpFilename = a}) + +instance FromJSON MessagePart where + parseJSON + = withObject "MessagePart" + (\ o -> + MessagePart <$> + (o .:? "parts" .!= mempty) <*> (o .:? "body") <*> + (o .:? "mimeType") + <*> (o .:? "headers" .!= mempty) + <*> (o .:? "partId") + <*> (o .:? "filename")) + +instance ToJSON MessagePart where + toJSON MessagePart{..} + = object + (catMaybes + [("parts" .=) <$> _mpParts, ("body" .=) <$> _mpBody, + ("mimeType" .=) <$> _mpMimeType, + ("headers" .=) <$> _mpHeaders, + ("partId" .=) <$> _mpPartId, + ("filename" .=) <$> _mpFilename]) + +-- | The body of a single MIME message part. +-- +-- /See:/ 'messagePartBody' smart constructor. +data MessagePartBody = MessagePartBody + { _mpbSize :: !(Maybe Int32) + , _mpbData :: !(Maybe Word8) + , _mpbAttachmentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MessagePartBody' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpbSize' +-- +-- * 'mpbData' +-- +-- * 'mpbAttachmentId' +messagePartBody + :: MessagePartBody +messagePartBody = + MessagePartBody + { _mpbSize = Nothing + , _mpbData = Nothing + , _mpbAttachmentId = Nothing + } + +-- | Total number of bytes in the body of the message part. +mpbSize :: Lens' MessagePartBody (Maybe Int32) +mpbSize = lens _mpbSize (\ s a -> s{_mpbSize = a}) + +-- | The body data of a MIME message part. May be empty for MIME container +-- types that have no message body or when the body data is sent as a +-- separate attachment. An attachment ID is present if the body data is +-- contained in a separate attachment. +mpbData :: Lens' MessagePartBody (Maybe Word8) +mpbData = lens _mpbData (\ s a -> s{_mpbData = a}) + +-- | When present, contains the ID of an external attachment that can be +-- retrieved in a separate messages.attachments.get request. When not +-- present, the entire content of the message part body is contained in the +-- data field. +mpbAttachmentId :: Lens' MessagePartBody (Maybe Text) +mpbAttachmentId + = lens _mpbAttachmentId + (\ s a -> s{_mpbAttachmentId = a}) + +instance FromJSON MessagePartBody where + parseJSON + = withObject "MessagePartBody" + (\ o -> + MessagePartBody <$> + (o .:? "size") <*> (o .:? "data") <*> + (o .:? "attachmentId")) + +instance ToJSON MessagePartBody where + toJSON MessagePartBody{..} + = object + (catMaybes + [("size" .=) <$> _mpbSize, ("data" .=) <$> _mpbData, + ("attachmentId" .=) <$> _mpbAttachmentId]) + +-- +-- /See:/ 'listDraftsResponse' smart constructor. +data ListDraftsResponse = ListDraftsResponse + { _ldrNextPageToken :: !(Maybe Text) + , _ldrResultSizeEstimate :: !(Maybe Word32) + , _ldrDrafts :: !(Maybe [Maybe Draft]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListDraftsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldrNextPageToken' +-- +-- * 'ldrResultSizeEstimate' +-- +-- * 'ldrDrafts' +listDraftsResponse + :: ListDraftsResponse +listDraftsResponse = + ListDraftsResponse + { _ldrNextPageToken = Nothing + , _ldrResultSizeEstimate = Nothing + , _ldrDrafts = Nothing + } + +-- | Token to retrieve the next page of results in the list. +ldrNextPageToken :: Lens' ListDraftsResponse (Maybe Text) +ldrNextPageToken + = lens _ldrNextPageToken + (\ s a -> s{_ldrNextPageToken = a}) + +-- | Estimated total number of results. +ldrResultSizeEstimate :: Lens' ListDraftsResponse (Maybe Word32) +ldrResultSizeEstimate + = lens _ldrResultSizeEstimate + (\ s a -> s{_ldrResultSizeEstimate = a}) + +-- | List of drafts. +ldrDrafts :: Lens' ListDraftsResponse [Maybe Draft] +ldrDrafts + = lens _ldrDrafts (\ s a -> s{_ldrDrafts = a}) . + _Default + . _Coerce + +instance FromJSON ListDraftsResponse where + parseJSON + = withObject "ListDraftsResponse" + (\ o -> + ListDraftsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "resultSizeEstimate") + <*> (o .:? "drafts" .!= mempty)) + +instance ToJSON ListDraftsResponse where + toJSON ListDraftsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ldrNextPageToken, + ("resultSizeEstimate" .=) <$> _ldrResultSizeEstimate, + ("drafts" .=) <$> _ldrDrafts]) + +-- | Push notification watch response. +-- +-- /See:/ 'watchResponse' smart constructor. +data WatchResponse = WatchResponse + { _wrExpiration :: !(Maybe Int64) + , _wrHistoryId :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WatchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrExpiration' +-- +-- * 'wrHistoryId' +watchResponse + :: WatchResponse +watchResponse = + WatchResponse + { _wrExpiration = Nothing + , _wrHistoryId = Nothing + } + +-- | When Gmail will stop sending notifications for mailbox updates (epoch +-- millis). Call watch again before this time to renew the watch. +wrExpiration :: Lens' WatchResponse (Maybe Int64) +wrExpiration + = lens _wrExpiration (\ s a -> s{_wrExpiration = a}) + +-- | The ID of the mailbox\'s current history record. +wrHistoryId :: Lens' WatchResponse (Maybe Word64) +wrHistoryId + = lens _wrHistoryId (\ s a -> s{_wrHistoryId = a}) + +instance FromJSON WatchResponse where + parseJSON + = withObject "WatchResponse" + (\ o -> + WatchResponse <$> + (o .:? "expiration") <*> (o .:? "historyId")) + +instance ToJSON WatchResponse where + toJSON WatchResponse{..} + = object + (catMaybes + [("expiration" .=) <$> _wrExpiration, + ("historyId" .=) <$> _wrHistoryId]) + +-- | A draft email in the user\'s mailbox. +-- +-- /See:/ 'draft' smart constructor. +data Draft = Draft + { _dId :: !(Maybe Text) + , _dMessage :: !(Maybe (Maybe Message)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Draft' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dId' +-- +-- * 'dMessage' +draft + :: Draft +draft = + Draft + { _dId = Nothing + , _dMessage = Nothing + } + +-- | The immutable ID of the draft. +dId :: Lens' Draft (Maybe Text) +dId = lens _dId (\ s a -> s{_dId = a}) + +-- | The message content of the draft. +dMessage :: Lens' Draft (Maybe (Maybe Message)) +dMessage = lens _dMessage (\ s a -> s{_dMessage = a}) + +instance FromJSON Draft where + parseJSON + = withObject "Draft" + (\ o -> Draft <$> (o .:? "id") <*> (o .:? "message")) + +instance ToJSON Draft where + toJSON Draft{..} + = object + (catMaybes + [("id" .=) <$> _dId, ("message" .=) <$> _dMessage]) + +-- | Set up or update a new push notification watch on this user\'s mailbox. +-- +-- /See:/ 'watchRequest' smart constructor. +data WatchRequest = WatchRequest + { _wrLabelFilterAction :: !(Maybe Text) + , _wrTopicName :: !(Maybe Text) + , _wrLabelIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WatchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrLabelFilterAction' +-- +-- * 'wrTopicName' +-- +-- * 'wrLabelIds' +watchRequest + :: WatchRequest +watchRequest = + WatchRequest + { _wrLabelFilterAction = Nothing + , _wrTopicName = Nothing + , _wrLabelIds = Nothing + } + +-- | Filtering behavior of labelIds list specified. +wrLabelFilterAction :: Lens' WatchRequest (Maybe Text) +wrLabelFilterAction + = lens _wrLabelFilterAction + (\ s a -> s{_wrLabelFilterAction = a}) + +-- | A fully qualified Google Cloud Pub\/Sub API topic name to publish the +-- events to. This topic name **must** already exist in Cloud Pub\/Sub and +-- you **must** have already granted gmail \"publish\" permission on it. +-- For example, \"projects\/my-project-identifier\/topics\/my-topic-name\" +-- (using the new Cloud Pub\/Sub \"v1beta2\" topic naming format). Note +-- that the \"my-project-identifier\" portion must exactly match your +-- Google developer project id (the one executing this watch request). +wrTopicName :: Lens' WatchRequest (Maybe Text) +wrTopicName + = lens _wrTopicName (\ s a -> s{_wrTopicName = a}) + +-- | List of label_ids to restrict notifications about. By default, if +-- unspecified, all changes are pushed out. If specified then dictates +-- which labels are required for a push notification to be generated. +wrLabelIds :: Lens' WatchRequest [Text] +wrLabelIds + = lens _wrLabelIds (\ s a -> s{_wrLabelIds = a}) . + _Default + . _Coerce + +instance FromJSON WatchRequest where + parseJSON + = withObject "WatchRequest" + (\ o -> + WatchRequest <$> + (o .:? "labelFilterAction") <*> (o .:? "topicName") + <*> (o .:? "labelIds" .!= mempty)) + +instance ToJSON WatchRequest where + toJSON WatchRequest{..} + = object + (catMaybes + [("labelFilterAction" .=) <$> _wrLabelFilterAction, + ("topicName" .=) <$> _wrTopicName, + ("labelIds" .=) <$> _wrLabelIds]) + +-- | An email message. +-- +-- /See:/ 'message' smart constructor. +data Message = Message + { _mRaw :: !(Maybe Word8) + , _mSnippet :: !(Maybe Text) + , _mSizeEstimate :: !(Maybe Int32) + , _mPayload :: !(Maybe (Maybe MessagePart)) + , _mHistoryId :: !(Maybe Word64) + , _mId :: !(Maybe Text) + , _mLabelIds :: !(Maybe [Text]) + , _mThreadId :: !(Maybe Text) + , _mInternalDate :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Message' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mRaw' +-- +-- * 'mSnippet' +-- +-- * 'mSizeEstimate' +-- +-- * 'mPayload' +-- +-- * 'mHistoryId' +-- +-- * 'mId' +-- +-- * 'mLabelIds' +-- +-- * 'mThreadId' +-- +-- * 'mInternalDate' +message + :: Message +message = + Message + { _mRaw = Nothing + , _mSnippet = Nothing + , _mSizeEstimate = Nothing + , _mPayload = Nothing + , _mHistoryId = Nothing + , _mId = Nothing + , _mLabelIds = Nothing + , _mThreadId = Nothing + , _mInternalDate = Nothing + } + +-- | The entire email message in an RFC 2822 formatted and base64url encoded +-- string. Returned in messages.get and drafts.get responses when the +-- format=RAW parameter is supplied. +mRaw :: Lens' Message (Maybe Word8) +mRaw = lens _mRaw (\ s a -> s{_mRaw = a}) + +-- | A short part of the message text. +mSnippet :: Lens' Message (Maybe Text) +mSnippet = lens _mSnippet (\ s a -> s{_mSnippet = a}) + +-- | Estimated size in bytes of the message. +mSizeEstimate :: Lens' Message (Maybe Int32) +mSizeEstimate + = lens _mSizeEstimate + (\ s a -> s{_mSizeEstimate = a}) + +-- | The parsed email structure in the message parts. +mPayload :: Lens' Message (Maybe (Maybe MessagePart)) +mPayload = lens _mPayload (\ s a -> s{_mPayload = a}) + +-- | The ID of the last history record that modified this message. +mHistoryId :: Lens' Message (Maybe Word64) +mHistoryId + = lens _mHistoryId (\ s a -> s{_mHistoryId = a}) + +-- | The immutable ID of the message. +mId :: Lens' Message (Maybe Text) +mId = lens _mId (\ s a -> s{_mId = a}) + +-- | List of IDs of labels applied to this message. +mLabelIds :: Lens' Message [Text] +mLabelIds + = lens _mLabelIds (\ s a -> s{_mLabelIds = a}) . + _Default + . _Coerce + +-- | The ID of the thread the message belongs to. To add a message or draft +-- to a thread, the following criteria must be met: - The requested +-- threadId must be specified on the Message or Draft.Message you supply +-- with your request. - The References and In-Reply-To headers must be set +-- in compliance with the RFC 2822 standard. - The Subject headers must +-- match. +mThreadId :: Lens' Message (Maybe Text) +mThreadId + = lens _mThreadId (\ s a -> s{_mThreadId = a}) + +-- | The internal message creation timestamp (epoch ms), which determines +-- ordering in the inbox. For normal SMTP-received email, this represents +-- the time the message was originally accepted by Google, which is more +-- reliable than the Date header. However, for API-migrated mail, it can be +-- configured by client to be based on the Date header. +mInternalDate :: Lens' Message (Maybe Int64) +mInternalDate + = lens _mInternalDate + (\ s a -> s{_mInternalDate = a}) + +instance FromJSON Message where + parseJSON + = withObject "Message" + (\ o -> + Message <$> + (o .:? "raw") <*> (o .:? "snippet") <*> + (o .:? "sizeEstimate") + <*> (o .:? "payload") + <*> (o .:? "historyId") + <*> (o .:? "id") + <*> (o .:? "labelIds" .!= mempty) + <*> (o .:? "threadId") + <*> (o .:? "internalDate")) + +instance ToJSON Message where + toJSON Message{..} + = object + (catMaybes + [("raw" .=) <$> _mRaw, ("snippet" .=) <$> _mSnippet, + ("sizeEstimate" .=) <$> _mSizeEstimate, + ("payload" .=) <$> _mPayload, + ("historyId" .=) <$> _mHistoryId, ("id" .=) <$> _mId, + ("labelIds" .=) <$> _mLabelIds, + ("threadId" .=) <$> _mThreadId, + ("internalDate" .=) <$> _mInternalDate]) + +-- | A collection of messages representing a conversation. +-- +-- /See:/ 'thread' smart constructor. +data Thread = Thread + { _tSnippet :: !(Maybe Text) + , _tHistoryId :: !(Maybe Word64) + , _tId :: !(Maybe Text) + , _tMessages :: !(Maybe [Maybe Message]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Thread' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tSnippet' +-- +-- * 'tHistoryId' +-- +-- * 'tId' +-- +-- * 'tMessages' +thread + :: Thread +thread = + Thread + { _tSnippet = Nothing + , _tHistoryId = Nothing + , _tId = Nothing + , _tMessages = Nothing + } + +-- | A short part of the message text. +tSnippet :: Lens' Thread (Maybe Text) +tSnippet = lens _tSnippet (\ s a -> s{_tSnippet = a}) + +-- | The ID of the last history record that modified this thread. +tHistoryId :: Lens' Thread (Maybe Word64) +tHistoryId + = lens _tHistoryId (\ s a -> s{_tHistoryId = a}) + +-- | The unique ID of the thread. +tId :: Lens' Thread (Maybe Text) +tId = lens _tId (\ s a -> s{_tId = a}) + +-- | The list of messages in the thread. +tMessages :: Lens' Thread [Maybe Message] +tMessages + = lens _tMessages (\ s a -> s{_tMessages = a}) . + _Default + . _Coerce + +instance FromJSON Thread where + parseJSON + = withObject "Thread" + (\ o -> + Thread <$> + (o .:? "snippet") <*> (o .:? "historyId") <*> + (o .:? "id") + <*> (o .:? "messages" .!= mempty)) + +instance ToJSON Thread where + toJSON Thread{..} + = object + (catMaybes + [("snippet" .=) <$> _tSnippet, + ("historyId" .=) <$> _tHistoryId, ("id" .=) <$> _tId, + ("messages" .=) <$> _tMessages]) + +-- | Labels are used to categorize messages and threads within the user\'s +-- mailbox. +-- +-- /See:/ 'label' smart constructor. +data Label = Label + { _lThreadsUnread :: !(Maybe Int32) + , _lMessageListVisibility :: !(Maybe Text) + , _lMessagesTotal :: !(Maybe Int32) + , _lMessagesUnread :: !(Maybe Int32) + , _lName :: !(Maybe Text) + , _lThreadsTotal :: !(Maybe Int32) + , _lLabelListVisibility :: !(Maybe Text) + , _lId :: !(Maybe Text) + , _lType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Label' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lThreadsUnread' +-- +-- * 'lMessageListVisibility' +-- +-- * 'lMessagesTotal' +-- +-- * 'lMessagesUnread' +-- +-- * 'lName' +-- +-- * 'lThreadsTotal' +-- +-- * 'lLabelListVisibility' +-- +-- * 'lId' +-- +-- * 'lType' +label + :: Label +label = + Label + { _lThreadsUnread = Nothing + , _lMessageListVisibility = Nothing + , _lMessagesTotal = Nothing + , _lMessagesUnread = Nothing + , _lName = Nothing + , _lThreadsTotal = Nothing + , _lLabelListVisibility = Nothing + , _lId = Nothing + , _lType = Nothing + } + +-- | The number of unread threads with the label. +lThreadsUnread :: Lens' Label (Maybe Int32) +lThreadsUnread + = lens _lThreadsUnread + (\ s a -> s{_lThreadsUnread = a}) + +-- | The visibility of the label in the message list in the Gmail web +-- interface. +lMessageListVisibility :: Lens' Label (Maybe Text) +lMessageListVisibility + = lens _lMessageListVisibility + (\ s a -> s{_lMessageListVisibility = a}) + +-- | The total number of messages with the label. +lMessagesTotal :: Lens' Label (Maybe Int32) +lMessagesTotal + = lens _lMessagesTotal + (\ s a -> s{_lMessagesTotal = a}) + +-- | The number of unread messages with the label. +lMessagesUnread :: Lens' Label (Maybe Int32) +lMessagesUnread + = lens _lMessagesUnread + (\ s a -> s{_lMessagesUnread = a}) + +-- | The display name of the label. +lName :: Lens' Label (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | The total number of threads with the label. +lThreadsTotal :: Lens' Label (Maybe Int32) +lThreadsTotal + = lens _lThreadsTotal + (\ s a -> s{_lThreadsTotal = a}) + +-- | The visibility of the label in the label list in the Gmail web +-- interface. +lLabelListVisibility :: Lens' Label (Maybe Text) +lLabelListVisibility + = lens _lLabelListVisibility + (\ s a -> s{_lLabelListVisibility = a}) + +-- | The immutable ID of the label. +lId :: Lens' Label (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | The owner type for the label. User labels are created by the user and +-- can be modified and deleted by the user and can be applied to any +-- message or thread. System labels are internally created and cannot be +-- added, modified, or deleted. System labels may be able to be applied to +-- or removed from messages and threads under some circumstances but this +-- is not guaranteed. For example, users can apply and remove the INBOX and +-- UNREAD labels from messages and threads, but cannot apply or remove the +-- DRAFTS or SENT labels from messages or threads. +lType :: Lens' Label (Maybe Text) +lType = lens _lType (\ s a -> s{_lType = a}) + +instance FromJSON Label where + parseJSON + = withObject "Label" + (\ o -> + Label <$> + (o .:? "threadsUnread") <*> + (o .:? "messageListVisibility") + <*> (o .:? "messagesTotal") + <*> (o .:? "messagesUnread") + <*> (o .:? "name") + <*> (o .:? "threadsTotal") + <*> (o .:? "labelListVisibility") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Label where + toJSON Label{..} + = object + (catMaybes + [("threadsUnread" .=) <$> _lThreadsUnread, + ("messageListVisibility" .=) <$> + _lMessageListVisibility, + ("messagesTotal" .=) <$> _lMessagesTotal, + ("messagesUnread" .=) <$> _lMessagesUnread, + ("name" .=) <$> _lName, + ("threadsTotal" .=) <$> _lThreadsTotal, + ("labelListVisibility" .=) <$> _lLabelListVisibility, + ("id" .=) <$> _lId, ("type" .=) <$> _lType]) + +-- +-- /See:/ 'historyLabelRemoved' smart constructor. +data HistoryLabelRemoved = HistoryLabelRemoved + { _hlrLabelIds :: !(Maybe [Text]) + , _hlrMessage :: !(Maybe (Maybe Message)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HistoryLabelRemoved' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hlrLabelIds' +-- +-- * 'hlrMessage' +historyLabelRemoved + :: HistoryLabelRemoved +historyLabelRemoved = + HistoryLabelRemoved + { _hlrLabelIds = Nothing + , _hlrMessage = Nothing + } + +-- | Label IDs removed from the message. +hlrLabelIds :: Lens' HistoryLabelRemoved [Text] +hlrLabelIds + = lens _hlrLabelIds (\ s a -> s{_hlrLabelIds = a}) . + _Default + . _Coerce + +hlrMessage :: Lens' HistoryLabelRemoved (Maybe (Maybe Message)) +hlrMessage + = lens _hlrMessage (\ s a -> s{_hlrMessage = a}) + +instance FromJSON HistoryLabelRemoved where + parseJSON + = withObject "HistoryLabelRemoved" + (\ o -> + HistoryLabelRemoved <$> + (o .:? "labelIds" .!= mempty) <*> (o .:? "message")) + +instance ToJSON HistoryLabelRemoved where + toJSON HistoryLabelRemoved{..} + = object + (catMaybes + [("labelIds" .=) <$> _hlrLabelIds, + ("message" .=) <$> _hlrMessage]) + +-- +-- /See:/ 'historyMessageAdded' smart constructor. +newtype HistoryMessageAdded = HistoryMessageAdded + { _hmaMessage :: Maybe (Maybe Message) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HistoryMessageAdded' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hmaMessage' +historyMessageAdded + :: HistoryMessageAdded +historyMessageAdded = + HistoryMessageAdded + { _hmaMessage = Nothing + } + +hmaMessage :: Lens' HistoryMessageAdded (Maybe (Maybe Message)) +hmaMessage + = lens _hmaMessage (\ s a -> s{_hmaMessage = a}) + +instance FromJSON HistoryMessageAdded where + parseJSON + = withObject "HistoryMessageAdded" + (\ o -> HistoryMessageAdded <$> (o .:? "message")) + +instance ToJSON HistoryMessageAdded where + toJSON HistoryMessageAdded{..} + = object (catMaybes [("message" .=) <$> _hmaMessage]) + +-- +-- /See:/ 'listMessagesResponse' smart constructor. +data ListMessagesResponse = ListMessagesResponse + { _lmrNextPageToken :: !(Maybe Text) + , _lmrResultSizeEstimate :: !(Maybe Word32) + , _lmrMessages :: !(Maybe [Maybe Message]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListMessagesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmrNextPageToken' +-- +-- * 'lmrResultSizeEstimate' +-- +-- * 'lmrMessages' +listMessagesResponse + :: ListMessagesResponse +listMessagesResponse = + ListMessagesResponse + { _lmrNextPageToken = Nothing + , _lmrResultSizeEstimate = Nothing + , _lmrMessages = Nothing + } + +-- | Token to retrieve the next page of results in the list. +lmrNextPageToken :: Lens' ListMessagesResponse (Maybe Text) +lmrNextPageToken + = lens _lmrNextPageToken + (\ s a -> s{_lmrNextPageToken = a}) + +-- | Estimated total number of results. +lmrResultSizeEstimate :: Lens' ListMessagesResponse (Maybe Word32) +lmrResultSizeEstimate + = lens _lmrResultSizeEstimate + (\ s a -> s{_lmrResultSizeEstimate = a}) + +-- | List of messages. +lmrMessages :: Lens' ListMessagesResponse [Maybe Message] +lmrMessages + = lens _lmrMessages (\ s a -> s{_lmrMessages = a}) . + _Default + . _Coerce + +instance FromJSON ListMessagesResponse where + parseJSON + = withObject "ListMessagesResponse" + (\ o -> + ListMessagesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "resultSizeEstimate") + <*> (o .:? "messages" .!= mempty)) + +instance ToJSON ListMessagesResponse where + toJSON ListMessagesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lmrNextPageToken, + ("resultSizeEstimate" .=) <$> _lmrResultSizeEstimate, + ("messages" .=) <$> _lmrMessages]) diff --git a/gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs b/gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs new file mode 100644 index 000000000..b780e4178 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Gmail.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Gmail.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Create.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Create.hs new file mode 100644 index 000000000..616d5e563 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Create.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new draft with the DRAFT label. +-- +-- /See:/ for @GmailUsersDraftsCreate@. +module Gmail.Users.Drafts.Create + ( + -- * REST Resource + UsersDraftsCreateAPI + + -- * Creating a Request + , usersDraftsCreate + , UsersDraftsCreate + + -- * Request Lenses + , udcQuotaUser + , udcPrettyPrint + , udcUserIp + , udcUserId + , udcKey + , udcOauthToken + , udcFields + , udcAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsCreate@ which the +-- 'UsersDraftsCreate' request conforms to. +type UsersDraftsCreateAPI = + Capture "userId" Text :> + "drafts" :> Post '[JSON] Draft + +-- | Creates a new draft with the DRAFT label. +-- +-- /See:/ 'usersDraftsCreate' smart constructor. +data UsersDraftsCreate = UsersDraftsCreate + { _udcQuotaUser :: !(Maybe Text) + , _udcPrettyPrint :: !Bool + , _udcUserIp :: !(Maybe Text) + , _udcUserId :: !Text + , _udcKey :: !(Maybe Text) + , _udcOauthToken :: !(Maybe Text) + , _udcFields :: !(Maybe Text) + , _udcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udcQuotaUser' +-- +-- * 'udcPrettyPrint' +-- +-- * 'udcUserIp' +-- +-- * 'udcUserId' +-- +-- * 'udcKey' +-- +-- * 'udcOauthToken' +-- +-- * 'udcFields' +-- +-- * 'udcAlt' +usersDraftsCreate + :: Text + -> UsersDraftsCreate +usersDraftsCreate pUdcUserId_ = + UsersDraftsCreate + { _udcQuotaUser = Nothing + , _udcPrettyPrint = True + , _udcUserIp = Nothing + , _udcUserId = pUdcUserId_ + , _udcKey = Nothing + , _udcOauthToken = Nothing + , _udcFields = Nothing + , _udcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udcQuotaUser :: Lens' UsersDraftsCreate' (Maybe Text) +udcQuotaUser + = lens _udcQuotaUser (\ s a -> s{_udcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udcPrettyPrint :: Lens' UsersDraftsCreate' Bool +udcPrettyPrint + = lens _udcPrettyPrint + (\ s a -> s{_udcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udcUserIp :: Lens' UsersDraftsCreate' (Maybe Text) +udcUserIp + = lens _udcUserIp (\ s a -> s{_udcUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +udcUserId :: Lens' UsersDraftsCreate' Text +udcUserId + = lens _udcUserId (\ s a -> s{_udcUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udcKey :: Lens' UsersDraftsCreate' (Maybe Text) +udcKey = lens _udcKey (\ s a -> s{_udcKey = a}) + +-- | OAuth 2.0 token for the current user. +udcOauthToken :: Lens' UsersDraftsCreate' (Maybe Text) +udcOauthToken + = lens _udcOauthToken + (\ s a -> s{_udcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udcFields :: Lens' UsersDraftsCreate' (Maybe Text) +udcFields + = lens _udcFields (\ s a -> s{_udcFields = a}) + +-- | Data format for the response. +udcAlt :: Lens' UsersDraftsCreate' Text +udcAlt = lens _udcAlt (\ s a -> s{_udcAlt = a}) + +instance GoogleRequest UsersDraftsCreate' where + type Rs UsersDraftsCreate' = Draft + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsCreate{..} + = go _udcQuotaUser _udcPrettyPrint _udcUserIp + _udcUserId + _udcKey + _udcOauthToken + _udcFields + _udcAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDraftsCreateAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Delete.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Delete.hs new file mode 100644 index 000000000..e7ceae7af --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Immediately and permanently deletes the specified draft. Does not simply +-- trash it. +-- +-- /See:/ for @GmailUsersDraftsDelete@. +module Gmail.Users.Drafts.Delete + ( + -- * REST Resource + UsersDraftsDeleteAPI + + -- * Creating a Request + , usersDraftsDelete + , UsersDraftsDelete + + -- * Request Lenses + , uddQuotaUser + , uddPrettyPrint + , uddUserIp + , uddUserId + , uddKey + , uddId + , uddOauthToken + , uddFields + , uddAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsDelete@ which the +-- 'UsersDraftsDelete' request conforms to. +type UsersDraftsDeleteAPI = + Capture "userId" Text :> + "drafts" :> Capture "id" Text :> Delete '[JSON] () + +-- | Immediately and permanently deletes the specified draft. Does not simply +-- trash it. +-- +-- /See:/ 'usersDraftsDelete' smart constructor. +data UsersDraftsDelete = UsersDraftsDelete + { _uddQuotaUser :: !(Maybe Text) + , _uddPrettyPrint :: !Bool + , _uddUserIp :: !(Maybe Text) + , _uddUserId :: !Text + , _uddKey :: !(Maybe Text) + , _uddId :: !Text + , _uddOauthToken :: !(Maybe Text) + , _uddFields :: !(Maybe Text) + , _uddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uddQuotaUser' +-- +-- * 'uddPrettyPrint' +-- +-- * 'uddUserIp' +-- +-- * 'uddUserId' +-- +-- * 'uddKey' +-- +-- * 'uddId' +-- +-- * 'uddOauthToken' +-- +-- * 'uddFields' +-- +-- * 'uddAlt' +usersDraftsDelete + :: Text -- ^ 'id' + -> Text + -> UsersDraftsDelete +usersDraftsDelete pUddUserId_ pUddId_ = + UsersDraftsDelete + { _uddQuotaUser = Nothing + , _uddPrettyPrint = True + , _uddUserIp = Nothing + , _uddUserId = pUddUserId_ + , _uddKey = Nothing + , _uddId = pUddId_ + , _uddOauthToken = Nothing + , _uddFields = Nothing + , _uddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uddQuotaUser :: Lens' UsersDraftsDelete' (Maybe Text) +uddQuotaUser + = lens _uddQuotaUser (\ s a -> s{_uddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uddPrettyPrint :: Lens' UsersDraftsDelete' Bool +uddPrettyPrint + = lens _uddPrettyPrint + (\ s a -> s{_uddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uddUserIp :: Lens' UsersDraftsDelete' (Maybe Text) +uddUserIp + = lens _uddUserIp (\ s a -> s{_uddUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uddUserId :: Lens' UsersDraftsDelete' Text +uddUserId + = lens _uddUserId (\ s a -> s{_uddUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uddKey :: Lens' UsersDraftsDelete' (Maybe Text) +uddKey = lens _uddKey (\ s a -> s{_uddKey = a}) + +-- | The ID of the draft to delete. +uddId :: Lens' UsersDraftsDelete' Text +uddId = lens _uddId (\ s a -> s{_uddId = a}) + +-- | OAuth 2.0 token for the current user. +uddOauthToken :: Lens' UsersDraftsDelete' (Maybe Text) +uddOauthToken + = lens _uddOauthToken + (\ s a -> s{_uddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uddFields :: Lens' UsersDraftsDelete' (Maybe Text) +uddFields + = lens _uddFields (\ s a -> s{_uddFields = a}) + +-- | Data format for the response. +uddAlt :: Lens' UsersDraftsDelete' Text +uddAlt = lens _uddAlt (\ s a -> s{_uddAlt = a}) + +instance GoogleRequest UsersDraftsDelete' where + type Rs UsersDraftsDelete' = () + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsDelete{..} + = go _uddQuotaUser _uddPrettyPrint _uddUserIp + _uddUserId + _uddKey + _uddId + _uddOauthToken + _uddFields + _uddAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDraftsDeleteAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Get.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Get.hs new file mode 100644 index 000000000..40bf70b47 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Get.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified draft. +-- +-- /See:/ for @GmailUsersDraftsGet@. +module Gmail.Users.Drafts.Get + ( + -- * REST Resource + UsersDraftsGetAPI + + -- * Creating a Request + , usersDraftsGet + , UsersDraftsGet + + -- * Request Lenses + , udgQuotaUser + , udgPrettyPrint + , udgUserIp + , udgFormat + , udgUserId + , udgKey + , udgId + , udgOauthToken + , udgFields + , udgAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsGet@ which the +-- 'UsersDraftsGet' request conforms to. +type UsersDraftsGetAPI = + Capture "userId" Text :> + "drafts" :> + Capture "id" Text :> + QueryParam "format" Text :> Get '[JSON] Draft + +-- | Gets the specified draft. +-- +-- /See:/ 'usersDraftsGet' smart constructor. +data UsersDraftsGet = UsersDraftsGet + { _udgQuotaUser :: !(Maybe Text) + , _udgPrettyPrint :: !Bool + , _udgUserIp :: !(Maybe Text) + , _udgFormat :: !Text + , _udgUserId :: !Text + , _udgKey :: !(Maybe Text) + , _udgId :: !Text + , _udgOauthToken :: !(Maybe Text) + , _udgFields :: !(Maybe Text) + , _udgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udgQuotaUser' +-- +-- * 'udgPrettyPrint' +-- +-- * 'udgUserIp' +-- +-- * 'udgFormat' +-- +-- * 'udgUserId' +-- +-- * 'udgKey' +-- +-- * 'udgId' +-- +-- * 'udgOauthToken' +-- +-- * 'udgFields' +-- +-- * 'udgAlt' +usersDraftsGet + :: Text -- ^ 'id' + -> Text + -> UsersDraftsGet +usersDraftsGet pUdgUserId_ pUdgId_ = + UsersDraftsGet + { _udgQuotaUser = Nothing + , _udgPrettyPrint = True + , _udgUserIp = Nothing + , _udgFormat = "full" + , _udgUserId = pUdgUserId_ + , _udgKey = Nothing + , _udgId = pUdgId_ + , _udgOauthToken = Nothing + , _udgFields = Nothing + , _udgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udgQuotaUser :: Lens' UsersDraftsGet' (Maybe Text) +udgQuotaUser + = lens _udgQuotaUser (\ s a -> s{_udgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udgPrettyPrint :: Lens' UsersDraftsGet' Bool +udgPrettyPrint + = lens _udgPrettyPrint + (\ s a -> s{_udgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udgUserIp :: Lens' UsersDraftsGet' (Maybe Text) +udgUserIp + = lens _udgUserIp (\ s a -> s{_udgUserIp = a}) + +-- | The format to return the draft in. +udgFormat :: Lens' UsersDraftsGet' Text +udgFormat + = lens _udgFormat (\ s a -> s{_udgFormat = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +udgUserId :: Lens' UsersDraftsGet' Text +udgUserId + = lens _udgUserId (\ s a -> s{_udgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udgKey :: Lens' UsersDraftsGet' (Maybe Text) +udgKey = lens _udgKey (\ s a -> s{_udgKey = a}) + +-- | The ID of the draft to retrieve. +udgId :: Lens' UsersDraftsGet' Text +udgId = lens _udgId (\ s a -> s{_udgId = a}) + +-- | OAuth 2.0 token for the current user. +udgOauthToken :: Lens' UsersDraftsGet' (Maybe Text) +udgOauthToken + = lens _udgOauthToken + (\ s a -> s{_udgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udgFields :: Lens' UsersDraftsGet' (Maybe Text) +udgFields + = lens _udgFields (\ s a -> s{_udgFields = a}) + +-- | Data format for the response. +udgAlt :: Lens' UsersDraftsGet' Text +udgAlt = lens _udgAlt (\ s a -> s{_udgAlt = a}) + +instance GoogleRequest UsersDraftsGet' where + type Rs UsersDraftsGet' = Draft + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsGet{..} + = go _udgQuotaUser _udgPrettyPrint _udgUserIp + (Just _udgFormat) + _udgUserId + _udgKey + _udgId + _udgOauthToken + _udgFields + _udgAlt + where go + = clientWithRoute (Proxy :: Proxy UsersDraftsGetAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/List.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/List.hs new file mode 100644 index 000000000..8b24d316f --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/List.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the drafts in the user\'s mailbox. +-- +-- /See:/ for @GmailUsersDraftsList@. +module Gmail.Users.Drafts.List + ( + -- * REST Resource + UsersDraftsListAPI + + -- * Creating a Request + , usersDraftsList + , UsersDraftsList + + -- * Request Lenses + , udlQuotaUser + , udlPrettyPrint + , udlUserIp + , udlUserId + , udlKey + , udlPageToken + , udlOauthToken + , udlMaxResults + , udlFields + , udlAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsList@ which the +-- 'UsersDraftsList' request conforms to. +type UsersDraftsListAPI = + Capture "userId" Text :> + "drafts" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ListDraftsResponse + +-- | Lists the drafts in the user\'s mailbox. +-- +-- /See:/ 'usersDraftsList' smart constructor. +data UsersDraftsList = UsersDraftsList + { _udlQuotaUser :: !(Maybe Text) + , _udlPrettyPrint :: !Bool + , _udlUserIp :: !(Maybe Text) + , _udlUserId :: !Text + , _udlKey :: !(Maybe Text) + , _udlPageToken :: !(Maybe Text) + , _udlOauthToken :: !(Maybe Text) + , _udlMaxResults :: !Word32 + , _udlFields :: !(Maybe Text) + , _udlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udlQuotaUser' +-- +-- * 'udlPrettyPrint' +-- +-- * 'udlUserIp' +-- +-- * 'udlUserId' +-- +-- * 'udlKey' +-- +-- * 'udlPageToken' +-- +-- * 'udlOauthToken' +-- +-- * 'udlMaxResults' +-- +-- * 'udlFields' +-- +-- * 'udlAlt' +usersDraftsList + :: Text + -> UsersDraftsList +usersDraftsList pUdlUserId_ = + UsersDraftsList + { _udlQuotaUser = Nothing + , _udlPrettyPrint = True + , _udlUserIp = Nothing + , _udlUserId = pUdlUserId_ + , _udlKey = Nothing + , _udlPageToken = Nothing + , _udlOauthToken = Nothing + , _udlMaxResults = 100 + , _udlFields = Nothing + , _udlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udlQuotaUser :: Lens' UsersDraftsList' (Maybe Text) +udlQuotaUser + = lens _udlQuotaUser (\ s a -> s{_udlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udlPrettyPrint :: Lens' UsersDraftsList' Bool +udlPrettyPrint + = lens _udlPrettyPrint + (\ s a -> s{_udlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udlUserIp :: Lens' UsersDraftsList' (Maybe Text) +udlUserIp + = lens _udlUserIp (\ s a -> s{_udlUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +udlUserId :: Lens' UsersDraftsList' Text +udlUserId + = lens _udlUserId (\ s a -> s{_udlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udlKey :: Lens' UsersDraftsList' (Maybe Text) +udlKey = lens _udlKey (\ s a -> s{_udlKey = a}) + +-- | Page token to retrieve a specific page of results in the list. +udlPageToken :: Lens' UsersDraftsList' (Maybe Text) +udlPageToken + = lens _udlPageToken (\ s a -> s{_udlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +udlOauthToken :: Lens' UsersDraftsList' (Maybe Text) +udlOauthToken + = lens _udlOauthToken + (\ s a -> s{_udlOauthToken = a}) + +-- | Maximum number of drafts to return. +udlMaxResults :: Lens' UsersDraftsList' Word32 +udlMaxResults + = lens _udlMaxResults + (\ s a -> s{_udlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +udlFields :: Lens' UsersDraftsList' (Maybe Text) +udlFields + = lens _udlFields (\ s a -> s{_udlFields = a}) + +-- | Data format for the response. +udlAlt :: Lens' UsersDraftsList' Text +udlAlt = lens _udlAlt (\ s a -> s{_udlAlt = a}) + +instance GoogleRequest UsersDraftsList' where + type Rs UsersDraftsList' = ListDraftsResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsList{..} + = go _udlQuotaUser _udlPrettyPrint _udlUserIp + _udlUserId + _udlKey + _udlPageToken + _udlOauthToken + (Just _udlMaxResults) + _udlFields + _udlAlt + where go + = clientWithRoute (Proxy :: Proxy UsersDraftsListAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Send.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Send.hs new file mode 100644 index 000000000..8969d7947 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Send.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.Send +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sends the specified, existing draft to the recipients in the To, Cc, and +-- Bcc headers. +-- +-- /See:/ for @GmailUsersDraftsSend@. +module Gmail.Users.Drafts.Send + ( + -- * REST Resource + UsersDraftsSendAPI + + -- * Creating a Request + , usersDraftsSend + , UsersDraftsSend + + -- * Request Lenses + , udsQuotaUser + , udsPrettyPrint + , udsUserIp + , udsUserId + , udsKey + , udsOauthToken + , udsFields + , udsAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsSend@ which the +-- 'UsersDraftsSend' request conforms to. +type UsersDraftsSendAPI = + Capture "userId" Text :> + "drafts" :> "send" :> Post '[JSON] Message + +-- | Sends the specified, existing draft to the recipients in the To, Cc, and +-- Bcc headers. +-- +-- /See:/ 'usersDraftsSend' smart constructor. +data UsersDraftsSend = UsersDraftsSend + { _udsQuotaUser :: !(Maybe Text) + , _udsPrettyPrint :: !Bool + , _udsUserIp :: !(Maybe Text) + , _udsUserId :: !Text + , _udsKey :: !(Maybe Text) + , _udsOauthToken :: !(Maybe Text) + , _udsFields :: !(Maybe Text) + , _udsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsSend'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udsQuotaUser' +-- +-- * 'udsPrettyPrint' +-- +-- * 'udsUserIp' +-- +-- * 'udsUserId' +-- +-- * 'udsKey' +-- +-- * 'udsOauthToken' +-- +-- * 'udsFields' +-- +-- * 'udsAlt' +usersDraftsSend + :: Text + -> UsersDraftsSend +usersDraftsSend pUdsUserId_ = + UsersDraftsSend + { _udsQuotaUser = Nothing + , _udsPrettyPrint = True + , _udsUserIp = Nothing + , _udsUserId = pUdsUserId_ + , _udsKey = Nothing + , _udsOauthToken = Nothing + , _udsFields = Nothing + , _udsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udsQuotaUser :: Lens' UsersDraftsSend' (Maybe Text) +udsQuotaUser + = lens _udsQuotaUser (\ s a -> s{_udsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udsPrettyPrint :: Lens' UsersDraftsSend' Bool +udsPrettyPrint + = lens _udsPrettyPrint + (\ s a -> s{_udsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udsUserIp :: Lens' UsersDraftsSend' (Maybe Text) +udsUserIp + = lens _udsUserIp (\ s a -> s{_udsUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +udsUserId :: Lens' UsersDraftsSend' Text +udsUserId + = lens _udsUserId (\ s a -> s{_udsUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udsKey :: Lens' UsersDraftsSend' (Maybe Text) +udsKey = lens _udsKey (\ s a -> s{_udsKey = a}) + +-- | OAuth 2.0 token for the current user. +udsOauthToken :: Lens' UsersDraftsSend' (Maybe Text) +udsOauthToken + = lens _udsOauthToken + (\ s a -> s{_udsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udsFields :: Lens' UsersDraftsSend' (Maybe Text) +udsFields + = lens _udsFields (\ s a -> s{_udsFields = a}) + +-- | Data format for the response. +udsAlt :: Lens' UsersDraftsSend' Text +udsAlt = lens _udsAlt (\ s a -> s{_udsAlt = a}) + +instance GoogleRequest UsersDraftsSend' where + type Rs UsersDraftsSend' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsSend{..} + = go _udsQuotaUser _udsPrettyPrint _udsUserIp + _udsUserId + _udsKey + _udsOauthToken + _udsFields + _udsAlt + where go + = clientWithRoute (Proxy :: Proxy UsersDraftsSendAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Update.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Update.hs new file mode 100644 index 000000000..d2dc5fa79 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Update.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Drafts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Replaces a draft\'s content. +-- +-- /See:/ for @GmailUsersDraftsUpdate@. +module Gmail.Users.Drafts.Update + ( + -- * REST Resource + UsersDraftsUpdateAPI + + -- * Creating a Request + , usersDraftsUpdate + , UsersDraftsUpdate + + -- * Request Lenses + , uduQuotaUser + , uduPrettyPrint + , uduUserIp + , uduUserId + , uduKey + , uduId + , uduOauthToken + , uduFields + , uduAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersDraftsUpdate@ which the +-- 'UsersDraftsUpdate' request conforms to. +type UsersDraftsUpdateAPI = + Capture "userId" Text :> + "drafts" :> Capture "id" Text :> Put '[JSON] Draft + +-- | Replaces a draft\'s content. +-- +-- /See:/ 'usersDraftsUpdate' smart constructor. +data UsersDraftsUpdate = UsersDraftsUpdate + { _uduQuotaUser :: !(Maybe Text) + , _uduPrettyPrint :: !Bool + , _uduUserIp :: !(Maybe Text) + , _uduUserId :: !Text + , _uduKey :: !(Maybe Text) + , _uduId :: !Text + , _uduOauthToken :: !(Maybe Text) + , _uduFields :: !(Maybe Text) + , _uduAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDraftsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uduQuotaUser' +-- +-- * 'uduPrettyPrint' +-- +-- * 'uduUserIp' +-- +-- * 'uduUserId' +-- +-- * 'uduKey' +-- +-- * 'uduId' +-- +-- * 'uduOauthToken' +-- +-- * 'uduFields' +-- +-- * 'uduAlt' +usersDraftsUpdate + :: Text -- ^ 'id' + -> Text + -> UsersDraftsUpdate +usersDraftsUpdate pUduUserId_ pUduId_ = + UsersDraftsUpdate + { _uduQuotaUser = Nothing + , _uduPrettyPrint = True + , _uduUserIp = Nothing + , _uduUserId = pUduUserId_ + , _uduKey = Nothing + , _uduId = pUduId_ + , _uduOauthToken = Nothing + , _uduFields = Nothing + , _uduAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uduQuotaUser :: Lens' UsersDraftsUpdate' (Maybe Text) +uduQuotaUser + = lens _uduQuotaUser (\ s a -> s{_uduQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uduPrettyPrint :: Lens' UsersDraftsUpdate' Bool +uduPrettyPrint + = lens _uduPrettyPrint + (\ s a -> s{_uduPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uduUserIp :: Lens' UsersDraftsUpdate' (Maybe Text) +uduUserIp + = lens _uduUserIp (\ s a -> s{_uduUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uduUserId :: Lens' UsersDraftsUpdate' Text +uduUserId + = lens _uduUserId (\ s a -> s{_uduUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uduKey :: Lens' UsersDraftsUpdate' (Maybe Text) +uduKey = lens _uduKey (\ s a -> s{_uduKey = a}) + +-- | The ID of the draft to update. +uduId :: Lens' UsersDraftsUpdate' Text +uduId = lens _uduId (\ s a -> s{_uduId = a}) + +-- | OAuth 2.0 token for the current user. +uduOauthToken :: Lens' UsersDraftsUpdate' (Maybe Text) +uduOauthToken + = lens _uduOauthToken + (\ s a -> s{_uduOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uduFields :: Lens' UsersDraftsUpdate' (Maybe Text) +uduFields + = lens _uduFields (\ s a -> s{_uduFields = a}) + +-- | Data format for the response. +uduAlt :: Lens' UsersDraftsUpdate' Text +uduAlt = lens _uduAlt (\ s a -> s{_uduAlt = a}) + +instance GoogleRequest UsersDraftsUpdate' where + type Rs UsersDraftsUpdate' = Draft + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersDraftsUpdate{..} + = go _uduQuotaUser _uduPrettyPrint _uduUserIp + _uduUserId + _uduKey + _uduId + _uduOauthToken + _uduFields + _uduAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersDraftsUpdateAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/GetProfile.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/GetProfile.hs new file mode 100644 index 000000000..e8ba2dff3 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/GetProfile.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.GetProfile +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the current user\'s Gmail profile. +-- +-- /See:/ for @GmailUsersGetProfile@. +module Gmail.Users.GetProfile + ( + -- * REST Resource + UsersGetProfileAPI + + -- * Creating a Request + , usersGetProfile + , UsersGetProfile + + -- * Request Lenses + , ugpQuotaUser + , ugpPrettyPrint + , ugpUserIp + , ugpUserId + , ugpKey + , ugpOauthToken + , ugpFields + , ugpAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersGetProfile@ which the +-- 'UsersGetProfile' request conforms to. +type UsersGetProfileAPI = + Capture "userId" Text :> + "profile" :> Get '[JSON] Profile + +-- | Gets the current user\'s Gmail profile. +-- +-- /See:/ 'usersGetProfile' smart constructor. +data UsersGetProfile = UsersGetProfile + { _ugpQuotaUser :: !(Maybe Text) + , _ugpPrettyPrint :: !Bool + , _ugpUserIp :: !(Maybe Text) + , _ugpUserId :: !Text + , _ugpKey :: !(Maybe Text) + , _ugpOauthToken :: !(Maybe Text) + , _ugpFields :: !(Maybe Text) + , _ugpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGetProfile'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugpQuotaUser' +-- +-- * 'ugpPrettyPrint' +-- +-- * 'ugpUserIp' +-- +-- * 'ugpUserId' +-- +-- * 'ugpKey' +-- +-- * 'ugpOauthToken' +-- +-- * 'ugpFields' +-- +-- * 'ugpAlt' +usersGetProfile + :: Text + -> UsersGetProfile +usersGetProfile pUgpUserId_ = + UsersGetProfile + { _ugpQuotaUser = Nothing + , _ugpPrettyPrint = True + , _ugpUserIp = Nothing + , _ugpUserId = pUgpUserId_ + , _ugpKey = Nothing + , _ugpOauthToken = Nothing + , _ugpFields = Nothing + , _ugpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugpQuotaUser :: Lens' UsersGetProfile' (Maybe Text) +ugpQuotaUser + = lens _ugpQuotaUser (\ s a -> s{_ugpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugpPrettyPrint :: Lens' UsersGetProfile' Bool +ugpPrettyPrint + = lens _ugpPrettyPrint + (\ s a -> s{_ugpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugpUserIp :: Lens' UsersGetProfile' (Maybe Text) +ugpUserIp + = lens _ugpUserIp (\ s a -> s{_ugpUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ugpUserId :: Lens' UsersGetProfile' Text +ugpUserId + = lens _ugpUserId (\ s a -> s{_ugpUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugpKey :: Lens' UsersGetProfile' (Maybe Text) +ugpKey = lens _ugpKey (\ s a -> s{_ugpKey = a}) + +-- | OAuth 2.0 token for the current user. +ugpOauthToken :: Lens' UsersGetProfile' (Maybe Text) +ugpOauthToken + = lens _ugpOauthToken + (\ s a -> s{_ugpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugpFields :: Lens' UsersGetProfile' (Maybe Text) +ugpFields + = lens _ugpFields (\ s a -> s{_ugpFields = a}) + +-- | Data format for the response. +ugpAlt :: Lens' UsersGetProfile' Text +ugpAlt = lens _ugpAlt (\ s a -> s{_ugpAlt = a}) + +instance GoogleRequest UsersGetProfile' where + type Rs UsersGetProfile' = Profile + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersGetProfile{..} + = go _ugpQuotaUser _ugpPrettyPrint _ugpUserIp + _ugpUserId + _ugpKey + _ugpOauthToken + _ugpFields + _ugpAlt + where go + = clientWithRoute (Proxy :: Proxy UsersGetProfileAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/History/List.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/History/List.hs new file mode 100644 index 000000000..3766cf74f --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/History/List.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.History.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the history of all changes to the given mailbox. History results +-- are returned in chronological order (increasing historyId). +-- +-- /See:/ for @GmailUsersHistoryList@. +module Gmail.Users.History.List + ( + -- * REST Resource + UsersHistoryListAPI + + -- * Creating a Request + , usersHistoryList + , UsersHistoryList + + -- * Request Lenses + , uhlQuotaUser + , uhlPrettyPrint + , uhlUserIp + , uhlUserId + , uhlKey + , uhlStartHistoryId + , uhlPageToken + , uhlOauthToken + , uhlLabelId + , uhlMaxResults + , uhlFields + , uhlAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersHistoryList@ which the +-- 'UsersHistoryList' request conforms to. +type UsersHistoryListAPI = + Capture "userId" Text :> + "history" :> + QueryParam "startHistoryId" Word64 :> + QueryParam "pageToken" Text :> + QueryParam "labelId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ListHistoryResponse + +-- | Lists the history of all changes to the given mailbox. History results +-- are returned in chronological order (increasing historyId). +-- +-- /See:/ 'usersHistoryList' smart constructor. +data UsersHistoryList = UsersHistoryList + { _uhlQuotaUser :: !(Maybe Text) + , _uhlPrettyPrint :: !Bool + , _uhlUserIp :: !(Maybe Text) + , _uhlUserId :: !Text + , _uhlKey :: !(Maybe Text) + , _uhlStartHistoryId :: !(Maybe Word64) + , _uhlPageToken :: !(Maybe Text) + , _uhlOauthToken :: !(Maybe Text) + , _uhlLabelId :: !(Maybe Text) + , _uhlMaxResults :: !Word32 + , _uhlFields :: !(Maybe Text) + , _uhlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersHistoryList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uhlQuotaUser' +-- +-- * 'uhlPrettyPrint' +-- +-- * 'uhlUserIp' +-- +-- * 'uhlUserId' +-- +-- * 'uhlKey' +-- +-- * 'uhlStartHistoryId' +-- +-- * 'uhlPageToken' +-- +-- * 'uhlOauthToken' +-- +-- * 'uhlLabelId' +-- +-- * 'uhlMaxResults' +-- +-- * 'uhlFields' +-- +-- * 'uhlAlt' +usersHistoryList + :: Text + -> UsersHistoryList +usersHistoryList pUhlUserId_ = + UsersHistoryList + { _uhlQuotaUser = Nothing + , _uhlPrettyPrint = True + , _uhlUserIp = Nothing + , _uhlUserId = pUhlUserId_ + , _uhlKey = Nothing + , _uhlStartHistoryId = Nothing + , _uhlPageToken = Nothing + , _uhlOauthToken = Nothing + , _uhlLabelId = Nothing + , _uhlMaxResults = 100 + , _uhlFields = Nothing + , _uhlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uhlQuotaUser :: Lens' UsersHistoryList' (Maybe Text) +uhlQuotaUser + = lens _uhlQuotaUser (\ s a -> s{_uhlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uhlPrettyPrint :: Lens' UsersHistoryList' Bool +uhlPrettyPrint + = lens _uhlPrettyPrint + (\ s a -> s{_uhlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uhlUserIp :: Lens' UsersHistoryList' (Maybe Text) +uhlUserIp + = lens _uhlUserIp (\ s a -> s{_uhlUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uhlUserId :: Lens' UsersHistoryList' Text +uhlUserId + = lens _uhlUserId (\ s a -> s{_uhlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uhlKey :: Lens' UsersHistoryList' (Maybe Text) +uhlKey = lens _uhlKey (\ s a -> s{_uhlKey = a}) + +-- | Required. Returns history records after the specified startHistoryId. +-- The supplied startHistoryId should be obtained from the historyId of a +-- message, thread, or previous list response. History IDs increase +-- chronologically but are not contiguous with random gaps in between valid +-- IDs. Supplying an invalid or out of date startHistoryId typically +-- returns an HTTP 404 error code. A historyId is typically valid for at +-- least a week, but in some rare circumstances may be valid for only a few +-- hours. If you receive an HTTP 404 error response, your application +-- should perform a full sync. If you receive no nextPageToken in the +-- response, there are no updates to retrieve and you can store the +-- returned historyId for a future request. +uhlStartHistoryId :: Lens' UsersHistoryList' (Maybe Word64) +uhlStartHistoryId + = lens _uhlStartHistoryId + (\ s a -> s{_uhlStartHistoryId = a}) + +-- | Page token to retrieve a specific page of results in the list. +uhlPageToken :: Lens' UsersHistoryList' (Maybe Text) +uhlPageToken + = lens _uhlPageToken (\ s a -> s{_uhlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +uhlOauthToken :: Lens' UsersHistoryList' (Maybe Text) +uhlOauthToken + = lens _uhlOauthToken + (\ s a -> s{_uhlOauthToken = a}) + +-- | Only return messages with a label matching the ID. +uhlLabelId :: Lens' UsersHistoryList' (Maybe Text) +uhlLabelId + = lens _uhlLabelId (\ s a -> s{_uhlLabelId = a}) + +-- | The maximum number of history records to return. +uhlMaxResults :: Lens' UsersHistoryList' Word32 +uhlMaxResults + = lens _uhlMaxResults + (\ s a -> s{_uhlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +uhlFields :: Lens' UsersHistoryList' (Maybe Text) +uhlFields + = lens _uhlFields (\ s a -> s{_uhlFields = a}) + +-- | Data format for the response. +uhlAlt :: Lens' UsersHistoryList' Text +uhlAlt = lens _uhlAlt (\ s a -> s{_uhlAlt = a}) + +instance GoogleRequest UsersHistoryList' where + type Rs UsersHistoryList' = ListHistoryResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersHistoryList{..} + = go _uhlQuotaUser _uhlPrettyPrint _uhlUserIp + _uhlUserId + _uhlKey + _uhlStartHistoryId + _uhlPageToken + _uhlOauthToken + _uhlLabelId + (Just _uhlMaxResults) + _uhlFields + _uhlAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersHistoryListAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Create.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Create.hs new file mode 100644 index 000000000..5d822427d --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Create.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new label. +-- +-- /See:/ for @GmailUsersLabelsCreate@. +module Gmail.Users.Labels.Create + ( + -- * REST Resource + UsersLabelsCreateAPI + + -- * Creating a Request + , usersLabelsCreate + , UsersLabelsCreate + + -- * Request Lenses + , ulcQuotaUser + , ulcPrettyPrint + , ulcUserIp + , ulcUserId + , ulcKey + , ulcOauthToken + , ulcFields + , ulcAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsCreate@ which the +-- 'UsersLabelsCreate' request conforms to. +type UsersLabelsCreateAPI = + Capture "userId" Text :> + "labels" :> Post '[JSON] Label + +-- | Creates a new label. +-- +-- /See:/ 'usersLabelsCreate' smart constructor. +data UsersLabelsCreate = UsersLabelsCreate + { _ulcQuotaUser :: !(Maybe Text) + , _ulcPrettyPrint :: !Bool + , _ulcUserIp :: !(Maybe Text) + , _ulcUserId :: !Text + , _ulcKey :: !(Maybe Text) + , _ulcOauthToken :: !(Maybe Text) + , _ulcFields :: !(Maybe Text) + , _ulcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulcQuotaUser' +-- +-- * 'ulcPrettyPrint' +-- +-- * 'ulcUserIp' +-- +-- * 'ulcUserId' +-- +-- * 'ulcKey' +-- +-- * 'ulcOauthToken' +-- +-- * 'ulcFields' +-- +-- * 'ulcAlt' +usersLabelsCreate + :: Text + -> UsersLabelsCreate +usersLabelsCreate pUlcUserId_ = + UsersLabelsCreate + { _ulcQuotaUser = Nothing + , _ulcPrettyPrint = True + , _ulcUserIp = Nothing + , _ulcUserId = pUlcUserId_ + , _ulcKey = Nothing + , _ulcOauthToken = Nothing + , _ulcFields = Nothing + , _ulcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulcQuotaUser :: Lens' UsersLabelsCreate' (Maybe Text) +ulcQuotaUser + = lens _ulcQuotaUser (\ s a -> s{_ulcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulcPrettyPrint :: Lens' UsersLabelsCreate' Bool +ulcPrettyPrint + = lens _ulcPrettyPrint + (\ s a -> s{_ulcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulcUserIp :: Lens' UsersLabelsCreate' (Maybe Text) +ulcUserIp + = lens _ulcUserIp (\ s a -> s{_ulcUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ulcUserId :: Lens' UsersLabelsCreate' Text +ulcUserId + = lens _ulcUserId (\ s a -> s{_ulcUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulcKey :: Lens' UsersLabelsCreate' (Maybe Text) +ulcKey = lens _ulcKey (\ s a -> s{_ulcKey = a}) + +-- | OAuth 2.0 token for the current user. +ulcOauthToken :: Lens' UsersLabelsCreate' (Maybe Text) +ulcOauthToken + = lens _ulcOauthToken + (\ s a -> s{_ulcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulcFields :: Lens' UsersLabelsCreate' (Maybe Text) +ulcFields + = lens _ulcFields (\ s a -> s{_ulcFields = a}) + +-- | Data format for the response. +ulcAlt :: Lens' UsersLabelsCreate' Text +ulcAlt = lens _ulcAlt (\ s a -> s{_ulcAlt = a}) + +instance GoogleRequest UsersLabelsCreate' where + type Rs UsersLabelsCreate' = Label + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsCreate{..} + = go _ulcQuotaUser _ulcPrettyPrint _ulcUserIp + _ulcUserId + _ulcKey + _ulcOauthToken + _ulcFields + _ulcAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersLabelsCreateAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Delete.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Delete.hs new file mode 100644 index 000000000..f409b7d51 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Immediately and permanently deletes the specified label and removes it +-- from any messages and threads that it is applied to. +-- +-- /See:/ for @GmailUsersLabelsDelete@. +module Gmail.Users.Labels.Delete + ( + -- * REST Resource + UsersLabelsDeleteAPI + + -- * Creating a Request + , usersLabelsDelete + , UsersLabelsDelete + + -- * Request Lenses + , uldQuotaUser + , uldPrettyPrint + , uldUserIp + , uldUserId + , uldKey + , uldId + , uldOauthToken + , uldFields + , uldAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsDelete@ which the +-- 'UsersLabelsDelete' request conforms to. +type UsersLabelsDeleteAPI = + Capture "userId" Text :> + "labels" :> Capture "id" Text :> Delete '[JSON] () + +-- | Immediately and permanently deletes the specified label and removes it +-- from any messages and threads that it is applied to. +-- +-- /See:/ 'usersLabelsDelete' smart constructor. +data UsersLabelsDelete = UsersLabelsDelete + { _uldQuotaUser :: !(Maybe Text) + , _uldPrettyPrint :: !Bool + , _uldUserIp :: !(Maybe Text) + , _uldUserId :: !Text + , _uldKey :: !(Maybe Text) + , _uldId :: !Text + , _uldOauthToken :: !(Maybe Text) + , _uldFields :: !(Maybe Text) + , _uldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uldQuotaUser' +-- +-- * 'uldPrettyPrint' +-- +-- * 'uldUserIp' +-- +-- * 'uldUserId' +-- +-- * 'uldKey' +-- +-- * 'uldId' +-- +-- * 'uldOauthToken' +-- +-- * 'uldFields' +-- +-- * 'uldAlt' +usersLabelsDelete + :: Text -- ^ 'id' + -> Text + -> UsersLabelsDelete +usersLabelsDelete pUldUserId_ pUldId_ = + UsersLabelsDelete + { _uldQuotaUser = Nothing + , _uldPrettyPrint = True + , _uldUserIp = Nothing + , _uldUserId = pUldUserId_ + , _uldKey = Nothing + , _uldId = pUldId_ + , _uldOauthToken = Nothing + , _uldFields = Nothing + , _uldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uldQuotaUser :: Lens' UsersLabelsDelete' (Maybe Text) +uldQuotaUser + = lens _uldQuotaUser (\ s a -> s{_uldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uldPrettyPrint :: Lens' UsersLabelsDelete' Bool +uldPrettyPrint + = lens _uldPrettyPrint + (\ s a -> s{_uldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uldUserIp :: Lens' UsersLabelsDelete' (Maybe Text) +uldUserIp + = lens _uldUserIp (\ s a -> s{_uldUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uldUserId :: Lens' UsersLabelsDelete' Text +uldUserId + = lens _uldUserId (\ s a -> s{_uldUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uldKey :: Lens' UsersLabelsDelete' (Maybe Text) +uldKey = lens _uldKey (\ s a -> s{_uldKey = a}) + +-- | The ID of the label to delete. +uldId :: Lens' UsersLabelsDelete' Text +uldId = lens _uldId (\ s a -> s{_uldId = a}) + +-- | OAuth 2.0 token for the current user. +uldOauthToken :: Lens' UsersLabelsDelete' (Maybe Text) +uldOauthToken + = lens _uldOauthToken + (\ s a -> s{_uldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uldFields :: Lens' UsersLabelsDelete' (Maybe Text) +uldFields + = lens _uldFields (\ s a -> s{_uldFields = a}) + +-- | Data format for the response. +uldAlt :: Lens' UsersLabelsDelete' Text +uldAlt = lens _uldAlt (\ s a -> s{_uldAlt = a}) + +instance GoogleRequest UsersLabelsDelete' where + type Rs UsersLabelsDelete' = () + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsDelete{..} + = go _uldQuotaUser _uldPrettyPrint _uldUserIp + _uldUserId + _uldKey + _uldId + _uldOauthToken + _uldFields + _uldAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersLabelsDeleteAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Get.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Get.hs new file mode 100644 index 000000000..11b678213 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified label. +-- +-- /See:/ for @GmailUsersLabelsGet@. +module Gmail.Users.Labels.Get + ( + -- * REST Resource + UsersLabelsGetAPI + + -- * Creating a Request + , usersLabelsGet + , UsersLabelsGet + + -- * Request Lenses + , ulgQuotaUser + , ulgPrettyPrint + , ulgUserIp + , ulgUserId + , ulgKey + , ulgId + , ulgOauthToken + , ulgFields + , ulgAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsGet@ which the +-- 'UsersLabelsGet' request conforms to. +type UsersLabelsGetAPI = + Capture "userId" Text :> + "labels" :> Capture "id" Text :> Get '[JSON] Label + +-- | Gets the specified label. +-- +-- /See:/ 'usersLabelsGet' smart constructor. +data UsersLabelsGet = UsersLabelsGet + { _ulgQuotaUser :: !(Maybe Text) + , _ulgPrettyPrint :: !Bool + , _ulgUserIp :: !(Maybe Text) + , _ulgUserId :: !Text + , _ulgKey :: !(Maybe Text) + , _ulgId :: !Text + , _ulgOauthToken :: !(Maybe Text) + , _ulgFields :: !(Maybe Text) + , _ulgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulgQuotaUser' +-- +-- * 'ulgPrettyPrint' +-- +-- * 'ulgUserIp' +-- +-- * 'ulgUserId' +-- +-- * 'ulgKey' +-- +-- * 'ulgId' +-- +-- * 'ulgOauthToken' +-- +-- * 'ulgFields' +-- +-- * 'ulgAlt' +usersLabelsGet + :: Text -- ^ 'id' + -> Text + -> UsersLabelsGet +usersLabelsGet pUlgUserId_ pUlgId_ = + UsersLabelsGet + { _ulgQuotaUser = Nothing + , _ulgPrettyPrint = True + , _ulgUserIp = Nothing + , _ulgUserId = pUlgUserId_ + , _ulgKey = Nothing + , _ulgId = pUlgId_ + , _ulgOauthToken = Nothing + , _ulgFields = Nothing + , _ulgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulgQuotaUser :: Lens' UsersLabelsGet' (Maybe Text) +ulgQuotaUser + = lens _ulgQuotaUser (\ s a -> s{_ulgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulgPrettyPrint :: Lens' UsersLabelsGet' Bool +ulgPrettyPrint + = lens _ulgPrettyPrint + (\ s a -> s{_ulgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulgUserIp :: Lens' UsersLabelsGet' (Maybe Text) +ulgUserIp + = lens _ulgUserIp (\ s a -> s{_ulgUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ulgUserId :: Lens' UsersLabelsGet' Text +ulgUserId + = lens _ulgUserId (\ s a -> s{_ulgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulgKey :: Lens' UsersLabelsGet' (Maybe Text) +ulgKey = lens _ulgKey (\ s a -> s{_ulgKey = a}) + +-- | The ID of the label to retrieve. +ulgId :: Lens' UsersLabelsGet' Text +ulgId = lens _ulgId (\ s a -> s{_ulgId = a}) + +-- | OAuth 2.0 token for the current user. +ulgOauthToken :: Lens' UsersLabelsGet' (Maybe Text) +ulgOauthToken + = lens _ulgOauthToken + (\ s a -> s{_ulgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulgFields :: Lens' UsersLabelsGet' (Maybe Text) +ulgFields + = lens _ulgFields (\ s a -> s{_ulgFields = a}) + +-- | Data format for the response. +ulgAlt :: Lens' UsersLabelsGet' Text +ulgAlt = lens _ulgAlt (\ s a -> s{_ulgAlt = a}) + +instance GoogleRequest UsersLabelsGet' where + type Rs UsersLabelsGet' = Label + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsGet{..} + = go _ulgQuotaUser _ulgPrettyPrint _ulgUserIp + _ulgUserId + _ulgKey + _ulgId + _ulgOauthToken + _ulgFields + _ulgAlt + where go + = clientWithRoute (Proxy :: Proxy UsersLabelsGetAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/List.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/List.hs new file mode 100644 index 000000000..4aba065f8 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all labels in the user\'s mailbox. +-- +-- /See:/ for @GmailUsersLabelsList@. +module Gmail.Users.Labels.List + ( + -- * REST Resource + UsersLabelsListAPI + + -- * Creating a Request + , usersLabelsList + , UsersLabelsList + + -- * Request Lenses + , ullQuotaUser + , ullPrettyPrint + , ullUserIp + , ullUserId + , ullKey + , ullOauthToken + , ullFields + , ullAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsList@ which the +-- 'UsersLabelsList' request conforms to. +type UsersLabelsListAPI = + Capture "userId" Text :> + "labels" :> Get '[JSON] ListLabelsResponse + +-- | Lists all labels in the user\'s mailbox. +-- +-- /See:/ 'usersLabelsList' smart constructor. +data UsersLabelsList = UsersLabelsList + { _ullQuotaUser :: !(Maybe Text) + , _ullPrettyPrint :: !Bool + , _ullUserIp :: !(Maybe Text) + , _ullUserId :: !Text + , _ullKey :: !(Maybe Text) + , _ullOauthToken :: !(Maybe Text) + , _ullFields :: !(Maybe Text) + , _ullAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ullQuotaUser' +-- +-- * 'ullPrettyPrint' +-- +-- * 'ullUserIp' +-- +-- * 'ullUserId' +-- +-- * 'ullKey' +-- +-- * 'ullOauthToken' +-- +-- * 'ullFields' +-- +-- * 'ullAlt' +usersLabelsList + :: Text + -> UsersLabelsList +usersLabelsList pUllUserId_ = + UsersLabelsList + { _ullQuotaUser = Nothing + , _ullPrettyPrint = True + , _ullUserIp = Nothing + , _ullUserId = pUllUserId_ + , _ullKey = Nothing + , _ullOauthToken = Nothing + , _ullFields = Nothing + , _ullAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ullQuotaUser :: Lens' UsersLabelsList' (Maybe Text) +ullQuotaUser + = lens _ullQuotaUser (\ s a -> s{_ullQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ullPrettyPrint :: Lens' UsersLabelsList' Bool +ullPrettyPrint + = lens _ullPrettyPrint + (\ s a -> s{_ullPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ullUserIp :: Lens' UsersLabelsList' (Maybe Text) +ullUserIp + = lens _ullUserIp (\ s a -> s{_ullUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ullUserId :: Lens' UsersLabelsList' Text +ullUserId + = lens _ullUserId (\ s a -> s{_ullUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ullKey :: Lens' UsersLabelsList' (Maybe Text) +ullKey = lens _ullKey (\ s a -> s{_ullKey = a}) + +-- | OAuth 2.0 token for the current user. +ullOauthToken :: Lens' UsersLabelsList' (Maybe Text) +ullOauthToken + = lens _ullOauthToken + (\ s a -> s{_ullOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ullFields :: Lens' UsersLabelsList' (Maybe Text) +ullFields + = lens _ullFields (\ s a -> s{_ullFields = a}) + +-- | Data format for the response. +ullAlt :: Lens' UsersLabelsList' Text +ullAlt = lens _ullAlt (\ s a -> s{_ullAlt = a}) + +instance GoogleRequest UsersLabelsList' where + type Rs UsersLabelsList' = ListLabelsResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsList{..} + = go _ullQuotaUser _ullPrettyPrint _ullUserIp + _ullUserId + _ullKey + _ullOauthToken + _ullFields + _ullAlt + where go + = clientWithRoute (Proxy :: Proxy UsersLabelsListAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Patch.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Patch.hs new file mode 100644 index 000000000..7b2ff545e --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Patch.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified label. This method supports patch semantics. +-- +-- /See:/ for @GmailUsersLabelsPatch@. +module Gmail.Users.Labels.Patch + ( + -- * REST Resource + UsersLabelsPatchAPI + + -- * Creating a Request + , usersLabelsPatch + , UsersLabelsPatch + + -- * Request Lenses + , ulpQuotaUser + , ulpPrettyPrint + , ulpUserIp + , ulpUserId + , ulpKey + , ulpId + , ulpOauthToken + , ulpFields + , ulpAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsPatch@ which the +-- 'UsersLabelsPatch' request conforms to. +type UsersLabelsPatchAPI = + Capture "userId" Text :> + "labels" :> Capture "id" Text :> Patch '[JSON] Label + +-- | Updates the specified label. This method supports patch semantics. +-- +-- /See:/ 'usersLabelsPatch' smart constructor. +data UsersLabelsPatch = UsersLabelsPatch + { _ulpQuotaUser :: !(Maybe Text) + , _ulpPrettyPrint :: !Bool + , _ulpUserIp :: !(Maybe Text) + , _ulpUserId :: !Text + , _ulpKey :: !(Maybe Text) + , _ulpId :: !Text + , _ulpOauthToken :: !(Maybe Text) + , _ulpFields :: !(Maybe Text) + , _ulpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulpQuotaUser' +-- +-- * 'ulpPrettyPrint' +-- +-- * 'ulpUserIp' +-- +-- * 'ulpUserId' +-- +-- * 'ulpKey' +-- +-- * 'ulpId' +-- +-- * 'ulpOauthToken' +-- +-- * 'ulpFields' +-- +-- * 'ulpAlt' +usersLabelsPatch + :: Text -- ^ 'id' + -> Text + -> UsersLabelsPatch +usersLabelsPatch pUlpUserId_ pUlpId_ = + UsersLabelsPatch + { _ulpQuotaUser = Nothing + , _ulpPrettyPrint = True + , _ulpUserIp = Nothing + , _ulpUserId = pUlpUserId_ + , _ulpKey = Nothing + , _ulpId = pUlpId_ + , _ulpOauthToken = Nothing + , _ulpFields = Nothing + , _ulpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulpQuotaUser :: Lens' UsersLabelsPatch' (Maybe Text) +ulpQuotaUser + = lens _ulpQuotaUser (\ s a -> s{_ulpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulpPrettyPrint :: Lens' UsersLabelsPatch' Bool +ulpPrettyPrint + = lens _ulpPrettyPrint + (\ s a -> s{_ulpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulpUserIp :: Lens' UsersLabelsPatch' (Maybe Text) +ulpUserIp + = lens _ulpUserIp (\ s a -> s{_ulpUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ulpUserId :: Lens' UsersLabelsPatch' Text +ulpUserId + = lens _ulpUserId (\ s a -> s{_ulpUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulpKey :: Lens' UsersLabelsPatch' (Maybe Text) +ulpKey = lens _ulpKey (\ s a -> s{_ulpKey = a}) + +-- | The ID of the label to update. +ulpId :: Lens' UsersLabelsPatch' Text +ulpId = lens _ulpId (\ s a -> s{_ulpId = a}) + +-- | OAuth 2.0 token for the current user. +ulpOauthToken :: Lens' UsersLabelsPatch' (Maybe Text) +ulpOauthToken + = lens _ulpOauthToken + (\ s a -> s{_ulpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulpFields :: Lens' UsersLabelsPatch' (Maybe Text) +ulpFields + = lens _ulpFields (\ s a -> s{_ulpFields = a}) + +-- | Data format for the response. +ulpAlt :: Lens' UsersLabelsPatch' Text +ulpAlt = lens _ulpAlt (\ s a -> s{_ulpAlt = a}) + +instance GoogleRequest UsersLabelsPatch' where + type Rs UsersLabelsPatch' = Label + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsPatch{..} + = go _ulpQuotaUser _ulpPrettyPrint _ulpUserIp + _ulpUserId + _ulpKey + _ulpId + _ulpOauthToken + _ulpFields + _ulpAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersLabelsPatchAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Update.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Update.hs new file mode 100644 index 000000000..025d1f4f5 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Update.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Labels.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the specified label. +-- +-- /See:/ for @GmailUsersLabelsUpdate@. +module Gmail.Users.Labels.Update + ( + -- * REST Resource + UsersLabelsUpdateAPI + + -- * Creating a Request + , usersLabelsUpdate + , UsersLabelsUpdate + + -- * Request Lenses + , uluQuotaUser + , uluPrettyPrint + , uluUserIp + , uluUserId + , uluKey + , uluId + , uluOauthToken + , uluFields + , uluAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersLabelsUpdate@ which the +-- 'UsersLabelsUpdate' request conforms to. +type UsersLabelsUpdateAPI = + Capture "userId" Text :> + "labels" :> Capture "id" Text :> Put '[JSON] Label + +-- | Updates the specified label. +-- +-- /See:/ 'usersLabelsUpdate' smart constructor. +data UsersLabelsUpdate = UsersLabelsUpdate + { _uluQuotaUser :: !(Maybe Text) + , _uluPrettyPrint :: !Bool + , _uluUserIp :: !(Maybe Text) + , _uluUserId :: !Text + , _uluKey :: !(Maybe Text) + , _uluId :: !Text + , _uluOauthToken :: !(Maybe Text) + , _uluFields :: !(Maybe Text) + , _uluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersLabelsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uluQuotaUser' +-- +-- * 'uluPrettyPrint' +-- +-- * 'uluUserIp' +-- +-- * 'uluUserId' +-- +-- * 'uluKey' +-- +-- * 'uluId' +-- +-- * 'uluOauthToken' +-- +-- * 'uluFields' +-- +-- * 'uluAlt' +usersLabelsUpdate + :: Text -- ^ 'id' + -> Text + -> UsersLabelsUpdate +usersLabelsUpdate pUluUserId_ pUluId_ = + UsersLabelsUpdate + { _uluQuotaUser = Nothing + , _uluPrettyPrint = True + , _uluUserIp = Nothing + , _uluUserId = pUluUserId_ + , _uluKey = Nothing + , _uluId = pUluId_ + , _uluOauthToken = Nothing + , _uluFields = Nothing + , _uluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uluQuotaUser :: Lens' UsersLabelsUpdate' (Maybe Text) +uluQuotaUser + = lens _uluQuotaUser (\ s a -> s{_uluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uluPrettyPrint :: Lens' UsersLabelsUpdate' Bool +uluPrettyPrint + = lens _uluPrettyPrint + (\ s a -> s{_uluPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uluUserIp :: Lens' UsersLabelsUpdate' (Maybe Text) +uluUserIp + = lens _uluUserIp (\ s a -> s{_uluUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uluUserId :: Lens' UsersLabelsUpdate' Text +uluUserId + = lens _uluUserId (\ s a -> s{_uluUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uluKey :: Lens' UsersLabelsUpdate' (Maybe Text) +uluKey = lens _uluKey (\ s a -> s{_uluKey = a}) + +-- | The ID of the label to update. +uluId :: Lens' UsersLabelsUpdate' Text +uluId = lens _uluId (\ s a -> s{_uluId = a}) + +-- | OAuth 2.0 token for the current user. +uluOauthToken :: Lens' UsersLabelsUpdate' (Maybe Text) +uluOauthToken + = lens _uluOauthToken + (\ s a -> s{_uluOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uluFields :: Lens' UsersLabelsUpdate' (Maybe Text) +uluFields + = lens _uluFields (\ s a -> s{_uluFields = a}) + +-- | Data format for the response. +uluAlt :: Lens' UsersLabelsUpdate' Text +uluAlt = lens _uluAlt (\ s a -> s{_uluAlt = a}) + +instance GoogleRequest UsersLabelsUpdate' where + type Rs UsersLabelsUpdate' = Label + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersLabelsUpdate{..} + = go _uluQuotaUser _uluPrettyPrint _uluUserIp + _uluUserId + _uluKey + _uluId + _uluOauthToken + _uluFields + _uluAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersLabelsUpdateAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Attachments/Get.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Attachments/Get.hs new file mode 100644 index 000000000..95c27da5a --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Attachments/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Attachments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified message attachment. +-- +-- /See:/ for @GmailUsersMessagesAttachmentsGet@. +module Gmail.Users.Messages.Attachments.Get + ( + -- * REST Resource + UsersMessagesAttachmentsGetAPI + + -- * Creating a Request + , usersMessagesAttachmentsGet + , UsersMessagesAttachmentsGet + + -- * Request Lenses + , umagQuotaUser + , umagPrettyPrint + , umagUserIp + , umagUserId + , umagKey + , umagId + , umagOauthToken + , umagMessageId + , umagFields + , umagAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesAttachmentsGet@ which the +-- 'UsersMessagesAttachmentsGet' request conforms to. +type UsersMessagesAttachmentsGetAPI = + Capture "userId" Text :> + "messages" :> + Capture "messageId" Text :> + "attachments" :> + Capture "id" Text :> Get '[JSON] MessagePartBody + +-- | Gets the specified message attachment. +-- +-- /See:/ 'usersMessagesAttachmentsGet' smart constructor. +data UsersMessagesAttachmentsGet = UsersMessagesAttachmentsGet + { _umagQuotaUser :: !(Maybe Text) + , _umagPrettyPrint :: !Bool + , _umagUserIp :: !(Maybe Text) + , _umagUserId :: !Text + , _umagKey :: !(Maybe Text) + , _umagId :: !Text + , _umagOauthToken :: !(Maybe Text) + , _umagMessageId :: !Text + , _umagFields :: !(Maybe Text) + , _umagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesAttachmentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umagQuotaUser' +-- +-- * 'umagPrettyPrint' +-- +-- * 'umagUserIp' +-- +-- * 'umagUserId' +-- +-- * 'umagKey' +-- +-- * 'umagId' +-- +-- * 'umagOauthToken' +-- +-- * 'umagMessageId' +-- +-- * 'umagFields' +-- +-- * 'umagAlt' +usersMessagesAttachmentsGet + :: Text -- ^ 'id' + -> Text -- ^ 'messageId' + -> Text + -> UsersMessagesAttachmentsGet +usersMessagesAttachmentsGet pUmagUserId_ pUmagId_ pUmagMessageId_ = + UsersMessagesAttachmentsGet + { _umagQuotaUser = Nothing + , _umagPrettyPrint = True + , _umagUserIp = Nothing + , _umagUserId = pUmagUserId_ + , _umagKey = Nothing + , _umagId = pUmagId_ + , _umagOauthToken = Nothing + , _umagMessageId = pUmagMessageId_ + , _umagFields = Nothing + , _umagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umagQuotaUser :: Lens' UsersMessagesAttachmentsGet' (Maybe Text) +umagQuotaUser + = lens _umagQuotaUser + (\ s a -> s{_umagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umagPrettyPrint :: Lens' UsersMessagesAttachmentsGet' Bool +umagPrettyPrint + = lens _umagPrettyPrint + (\ s a -> s{_umagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umagUserIp :: Lens' UsersMessagesAttachmentsGet' (Maybe Text) +umagUserIp + = lens _umagUserIp (\ s a -> s{_umagUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umagUserId :: Lens' UsersMessagesAttachmentsGet' Text +umagUserId + = lens _umagUserId (\ s a -> s{_umagUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umagKey :: Lens' UsersMessagesAttachmentsGet' (Maybe Text) +umagKey = lens _umagKey (\ s a -> s{_umagKey = a}) + +-- | The ID of the attachment. +umagId :: Lens' UsersMessagesAttachmentsGet' Text +umagId = lens _umagId (\ s a -> s{_umagId = a}) + +-- | OAuth 2.0 token for the current user. +umagOauthToken :: Lens' UsersMessagesAttachmentsGet' (Maybe Text) +umagOauthToken + = lens _umagOauthToken + (\ s a -> s{_umagOauthToken = a}) + +-- | The ID of the message containing the attachment. +umagMessageId :: Lens' UsersMessagesAttachmentsGet' Text +umagMessageId + = lens _umagMessageId + (\ s a -> s{_umagMessageId = a}) + +-- | Selector specifying which fields to include in a partial response. +umagFields :: Lens' UsersMessagesAttachmentsGet' (Maybe Text) +umagFields + = lens _umagFields (\ s a -> s{_umagFields = a}) + +-- | Data format for the response. +umagAlt :: Lens' UsersMessagesAttachmentsGet' Text +umagAlt = lens _umagAlt (\ s a -> s{_umagAlt = a}) + +instance GoogleRequest UsersMessagesAttachmentsGet' + where + type Rs UsersMessagesAttachmentsGet' = + MessagePartBody + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesAttachmentsGet{..} + = go _umagQuotaUser _umagPrettyPrint _umagUserIp + _umagUserId + _umagKey + _umagId + _umagOauthToken + _umagMessageId + _umagFields + _umagAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesAttachmentsGetAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Delete.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Delete.hs new file mode 100644 index 000000000..f280779e7 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Immediately and permanently deletes the specified message. This +-- operation cannot be undone. Prefer messages.trash instead. +-- +-- /See:/ for @GmailUsersMessagesDelete@. +module Gmail.Users.Messages.Delete + ( + -- * REST Resource + UsersMessagesDeleteAPI + + -- * Creating a Request + , usersMessagesDelete + , UsersMessagesDelete + + -- * Request Lenses + , umdQuotaUser + , umdPrettyPrint + , umdUserIp + , umdUserId + , umdKey + , umdId + , umdOauthToken + , umdFields + , umdAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesDelete@ which the +-- 'UsersMessagesDelete' request conforms to. +type UsersMessagesDeleteAPI = + Capture "userId" Text :> + "messages" :> Capture "id" Text :> Delete '[JSON] () + +-- | Immediately and permanently deletes the specified message. This +-- operation cannot be undone. Prefer messages.trash instead. +-- +-- /See:/ 'usersMessagesDelete' smart constructor. +data UsersMessagesDelete = UsersMessagesDelete + { _umdQuotaUser :: !(Maybe Text) + , _umdPrettyPrint :: !Bool + , _umdUserIp :: !(Maybe Text) + , _umdUserId :: !Text + , _umdKey :: !(Maybe Text) + , _umdId :: !Text + , _umdOauthToken :: !(Maybe Text) + , _umdFields :: !(Maybe Text) + , _umdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umdQuotaUser' +-- +-- * 'umdPrettyPrint' +-- +-- * 'umdUserIp' +-- +-- * 'umdUserId' +-- +-- * 'umdKey' +-- +-- * 'umdId' +-- +-- * 'umdOauthToken' +-- +-- * 'umdFields' +-- +-- * 'umdAlt' +usersMessagesDelete + :: Text -- ^ 'id' + -> Text + -> UsersMessagesDelete +usersMessagesDelete pUmdUserId_ pUmdId_ = + UsersMessagesDelete + { _umdQuotaUser = Nothing + , _umdPrettyPrint = True + , _umdUserIp = Nothing + , _umdUserId = pUmdUserId_ + , _umdKey = Nothing + , _umdId = pUmdId_ + , _umdOauthToken = Nothing + , _umdFields = Nothing + , _umdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umdQuotaUser :: Lens' UsersMessagesDelete' (Maybe Text) +umdQuotaUser + = lens _umdQuotaUser (\ s a -> s{_umdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umdPrettyPrint :: Lens' UsersMessagesDelete' Bool +umdPrettyPrint + = lens _umdPrettyPrint + (\ s a -> s{_umdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umdUserIp :: Lens' UsersMessagesDelete' (Maybe Text) +umdUserIp + = lens _umdUserIp (\ s a -> s{_umdUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umdUserId :: Lens' UsersMessagesDelete' Text +umdUserId + = lens _umdUserId (\ s a -> s{_umdUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umdKey :: Lens' UsersMessagesDelete' (Maybe Text) +umdKey = lens _umdKey (\ s a -> s{_umdKey = a}) + +-- | The ID of the message to delete. +umdId :: Lens' UsersMessagesDelete' Text +umdId = lens _umdId (\ s a -> s{_umdId = a}) + +-- | OAuth 2.0 token for the current user. +umdOauthToken :: Lens' UsersMessagesDelete' (Maybe Text) +umdOauthToken + = lens _umdOauthToken + (\ s a -> s{_umdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umdFields :: Lens' UsersMessagesDelete' (Maybe Text) +umdFields + = lens _umdFields (\ s a -> s{_umdFields = a}) + +-- | Data format for the response. +umdAlt :: Lens' UsersMessagesDelete' Text +umdAlt = lens _umdAlt (\ s a -> s{_umdAlt = a}) + +instance GoogleRequest UsersMessagesDelete' where + type Rs UsersMessagesDelete' = () + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesDelete{..} + = go _umdQuotaUser _umdPrettyPrint _umdUserIp + _umdUserId + _umdKey + _umdId + _umdOauthToken + _umdFields + _umdAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesDeleteAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Get.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Get.hs new file mode 100644 index 000000000..b70246ff3 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Get.hs @@ -0,0 +1,197 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified message. +-- +-- /See:/ for @GmailUsersMessagesGet@. +module Gmail.Users.Messages.Get + ( + -- * REST Resource + UsersMessagesGetAPI + + -- * Creating a Request + , usersMessagesGet + , UsersMessagesGet + + -- * Request Lenses + , umgQuotaUser + , umgPrettyPrint + , umgUserIp + , umgFormat + , umgUserId + , umgKey + , umgId + , umgOauthToken + , umgMetadataHeaders + , umgFields + , umgAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesGet@ which the +-- 'UsersMessagesGet' request conforms to. +type UsersMessagesGetAPI = + Capture "userId" Text :> + "messages" :> + Capture "id" Text :> + QueryParam "format" Text :> + QueryParams "metadataHeaders" Text :> + Get '[JSON] Message + +-- | Gets the specified message. +-- +-- /See:/ 'usersMessagesGet' smart constructor. +data UsersMessagesGet = UsersMessagesGet + { _umgQuotaUser :: !(Maybe Text) + , _umgPrettyPrint :: !Bool + , _umgUserIp :: !(Maybe Text) + , _umgFormat :: !Text + , _umgUserId :: !Text + , _umgKey :: !(Maybe Text) + , _umgId :: !Text + , _umgOauthToken :: !(Maybe Text) + , _umgMetadataHeaders :: !(Maybe Text) + , _umgFields :: !(Maybe Text) + , _umgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umgQuotaUser' +-- +-- * 'umgPrettyPrint' +-- +-- * 'umgUserIp' +-- +-- * 'umgFormat' +-- +-- * 'umgUserId' +-- +-- * 'umgKey' +-- +-- * 'umgId' +-- +-- * 'umgOauthToken' +-- +-- * 'umgMetadataHeaders' +-- +-- * 'umgFields' +-- +-- * 'umgAlt' +usersMessagesGet + :: Text -- ^ 'id' + -> Text + -> UsersMessagesGet +usersMessagesGet pUmgUserId_ pUmgId_ = + UsersMessagesGet + { _umgQuotaUser = Nothing + , _umgPrettyPrint = True + , _umgUserIp = Nothing + , _umgFormat = "full" + , _umgUserId = pUmgUserId_ + , _umgKey = Nothing + , _umgId = pUmgId_ + , _umgOauthToken = Nothing + , _umgMetadataHeaders = Nothing + , _umgFields = Nothing + , _umgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umgQuotaUser :: Lens' UsersMessagesGet' (Maybe Text) +umgQuotaUser + = lens _umgQuotaUser (\ s a -> s{_umgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umgPrettyPrint :: Lens' UsersMessagesGet' Bool +umgPrettyPrint + = lens _umgPrettyPrint + (\ s a -> s{_umgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umgUserIp :: Lens' UsersMessagesGet' (Maybe Text) +umgUserIp + = lens _umgUserIp (\ s a -> s{_umgUserIp = a}) + +-- | The format to return the message in. +umgFormat :: Lens' UsersMessagesGet' Text +umgFormat + = lens _umgFormat (\ s a -> s{_umgFormat = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umgUserId :: Lens' UsersMessagesGet' Text +umgUserId + = lens _umgUserId (\ s a -> s{_umgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umgKey :: Lens' UsersMessagesGet' (Maybe Text) +umgKey = lens _umgKey (\ s a -> s{_umgKey = a}) + +-- | The ID of the message to retrieve. +umgId :: Lens' UsersMessagesGet' Text +umgId = lens _umgId (\ s a -> s{_umgId = a}) + +-- | OAuth 2.0 token for the current user. +umgOauthToken :: Lens' UsersMessagesGet' (Maybe Text) +umgOauthToken + = lens _umgOauthToken + (\ s a -> s{_umgOauthToken = a}) + +-- | When given and format is METADATA, only include headers specified. +umgMetadataHeaders :: Lens' UsersMessagesGet' (Maybe Text) +umgMetadataHeaders + = lens _umgMetadataHeaders + (\ s a -> s{_umgMetadataHeaders = a}) + +-- | Selector specifying which fields to include in a partial response. +umgFields :: Lens' UsersMessagesGet' (Maybe Text) +umgFields + = lens _umgFields (\ s a -> s{_umgFields = a}) + +-- | Data format for the response. +umgAlt :: Lens' UsersMessagesGet' Text +umgAlt = lens _umgAlt (\ s a -> s{_umgAlt = a}) + +instance GoogleRequest UsersMessagesGet' where + type Rs UsersMessagesGet' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesGet{..} + = go _umgQuotaUser _umgPrettyPrint _umgUserIp + (Just _umgFormat) + _umgUserId + _umgKey + _umgId + _umgOauthToken + _umgMetadataHeaders + _umgFields + _umgAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesGetAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Import.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Import.hs new file mode 100644 index 000000000..6103f66d3 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Import.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Import +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Imports a message into only this user\'s mailbox, with standard email +-- delivery scanning and classification similar to receiving via SMTP. Does +-- not send a message. +-- +-- /See:/ for @GmailUsersMessagesImport@. +module Gmail.Users.Messages.Import + ( + -- * REST Resource + UsersMessagesImportAPI + + -- * Creating a Request + , usersMessagesImport + , UsersMessagesImport + + -- * Request Lenses + , uQuotaUser + , uPrettyPrint + , uUserIp + , uUserId + , uKey + , uProcessForCalendar + , uDeleted + , uNeverMarkSpam + , uOauthToken + , uInternalDateSource + , uFields + , uAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesImport@ which the +-- 'UsersMessagesImport' request conforms to. +type UsersMessagesImportAPI = + Capture "userId" Text :> + "messages" :> + "import" :> + QueryParam "processForCalendar" Bool :> + QueryParam "deleted" Bool :> + QueryParam "neverMarkSpam" Bool :> + QueryParam "internalDateSource" Text :> + Post '[JSON] Message + +-- | Imports a message into only this user\'s mailbox, with standard email +-- delivery scanning and classification similar to receiving via SMTP. Does +-- not send a message. +-- +-- /See:/ 'usersMessagesImport' smart constructor. +data UsersMessagesImport = UsersMessagesImport + { _uQuotaUser :: !(Maybe Text) + , _uPrettyPrint :: !Bool + , _uUserIp :: !(Maybe Text) + , _uUserId :: !Text + , _uKey :: !(Maybe Text) + , _uProcessForCalendar :: !Bool + , _uDeleted :: !Bool + , _uNeverMarkSpam :: !Bool + , _uOauthToken :: !(Maybe Text) + , _uInternalDateSource :: !Text + , _uFields :: !(Maybe Text) + , _uAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesImport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uQuotaUser' +-- +-- * 'uPrettyPrint' +-- +-- * 'uUserIp' +-- +-- * 'uUserId' +-- +-- * 'uKey' +-- +-- * 'uProcessForCalendar' +-- +-- * 'uDeleted' +-- +-- * 'uNeverMarkSpam' +-- +-- * 'uOauthToken' +-- +-- * 'uInternalDateSource' +-- +-- * 'uFields' +-- +-- * 'uAlt' +usersMessagesImport + :: Text + -> UsersMessagesImport +usersMessagesImport pUUserId_ = + UsersMessagesImport + { _uQuotaUser = Nothing + , _uPrettyPrint = True + , _uUserIp = Nothing + , _uUserId = pUUserId_ + , _uKey = Nothing + , _uProcessForCalendar = False + , _uDeleted = False + , _uNeverMarkSpam = False + , _uOauthToken = Nothing + , _uInternalDateSource = "dateHeader" + , _uFields = Nothing + , _uAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uQuotaUser :: Lens' UsersMessagesImport' (Maybe Text) +uQuotaUser + = lens _uQuotaUser (\ s a -> s{_uQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uPrettyPrint :: Lens' UsersMessagesImport' Bool +uPrettyPrint + = lens _uPrettyPrint (\ s a -> s{_uPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uUserIp :: Lens' UsersMessagesImport' (Maybe Text) +uUserIp = lens _uUserIp (\ s a -> s{_uUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uUserId :: Lens' UsersMessagesImport' Text +uUserId = lens _uUserId (\ s a -> s{_uUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uKey :: Lens' UsersMessagesImport' (Maybe Text) +uKey = lens _uKey (\ s a -> s{_uKey = a}) + +-- | Process calendar invites in the email and add any extracted meetings to +-- the Google Calendar for this user. +uProcessForCalendar :: Lens' UsersMessagesImport' Bool +uProcessForCalendar + = lens _uProcessForCalendar + (\ s a -> s{_uProcessForCalendar = a}) + +-- | Mark the email as permanently deleted (not TRASH) and only visible in +-- Google Apps Vault to a Vault administrator. Only used for Google Apps +-- for Work accounts. +uDeleted :: Lens' UsersMessagesImport' Bool +uDeleted = lens _uDeleted (\ s a -> s{_uDeleted = a}) + +-- | Ignore the Gmail spam classifier decision and never mark this email as +-- SPAM in the mailbox. +uNeverMarkSpam :: Lens' UsersMessagesImport' Bool +uNeverMarkSpam + = lens _uNeverMarkSpam + (\ s a -> s{_uNeverMarkSpam = a}) + +-- | OAuth 2.0 token for the current user. +uOauthToken :: Lens' UsersMessagesImport' (Maybe Text) +uOauthToken + = lens _uOauthToken (\ s a -> s{_uOauthToken = a}) + +-- | Source for Gmail\'s internal date of the message. +uInternalDateSource :: Lens' UsersMessagesImport' Text +uInternalDateSource + = lens _uInternalDateSource + (\ s a -> s{_uInternalDateSource = a}) + +-- | Selector specifying which fields to include in a partial response. +uFields :: Lens' UsersMessagesImport' (Maybe Text) +uFields = lens _uFields (\ s a -> s{_uFields = a}) + +-- | Data format for the response. +uAlt :: Lens' UsersMessagesImport' Text +uAlt = lens _uAlt (\ s a -> s{_uAlt = a}) + +instance GoogleRequest UsersMessagesImport' where + type Rs UsersMessagesImport' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesImport{..} + = go _uQuotaUser _uPrettyPrint _uUserIp _uUserId + _uKey + (Just _uProcessForCalendar) + (Just _uDeleted) + (Just _uNeverMarkSpam) + _uOauthToken + (Just _uInternalDateSource) + _uFields + _uAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesImportAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Insert.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Insert.hs new file mode 100644 index 000000000..1625f5ef9 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Insert.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Directly inserts a message into only this user\'s mailbox similar to +-- IMAP APPEND, bypassing most scanning and classification. Does not send a +-- message. +-- +-- /See:/ for @GmailUsersMessagesInsert@. +module Gmail.Users.Messages.Insert + ( + -- * REST Resource + UsersMessagesInsertAPI + + -- * Creating a Request + , usersMessagesInsert + , UsersMessagesInsert + + -- * Request Lenses + , umiQuotaUser + , umiPrettyPrint + , umiUserIp + , umiUserId + , umiKey + , umiDeleted + , umiOauthToken + , umiInternalDateSource + , umiFields + , umiAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesInsert@ which the +-- 'UsersMessagesInsert' request conforms to. +type UsersMessagesInsertAPI = + Capture "userId" Text :> + "messages" :> + QueryParam "deleted" Bool :> + QueryParam "internalDateSource" Text :> + Post '[JSON] Message + +-- | Directly inserts a message into only this user\'s mailbox similar to +-- IMAP APPEND, bypassing most scanning and classification. Does not send a +-- message. +-- +-- /See:/ 'usersMessagesInsert' smart constructor. +data UsersMessagesInsert = UsersMessagesInsert + { _umiQuotaUser :: !(Maybe Text) + , _umiPrettyPrint :: !Bool + , _umiUserIp :: !(Maybe Text) + , _umiUserId :: !Text + , _umiKey :: !(Maybe Text) + , _umiDeleted :: !Bool + , _umiOauthToken :: !(Maybe Text) + , _umiInternalDateSource :: !Text + , _umiFields :: !(Maybe Text) + , _umiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umiQuotaUser' +-- +-- * 'umiPrettyPrint' +-- +-- * 'umiUserIp' +-- +-- * 'umiUserId' +-- +-- * 'umiKey' +-- +-- * 'umiDeleted' +-- +-- * 'umiOauthToken' +-- +-- * 'umiInternalDateSource' +-- +-- * 'umiFields' +-- +-- * 'umiAlt' +usersMessagesInsert + :: Text + -> UsersMessagesInsert +usersMessagesInsert pUmiUserId_ = + UsersMessagesInsert + { _umiQuotaUser = Nothing + , _umiPrettyPrint = True + , _umiUserIp = Nothing + , _umiUserId = pUmiUserId_ + , _umiKey = Nothing + , _umiDeleted = False + , _umiOauthToken = Nothing + , _umiInternalDateSource = "receivedTime" + , _umiFields = Nothing + , _umiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umiQuotaUser :: Lens' UsersMessagesInsert' (Maybe Text) +umiQuotaUser + = lens _umiQuotaUser (\ s a -> s{_umiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umiPrettyPrint :: Lens' UsersMessagesInsert' Bool +umiPrettyPrint + = lens _umiPrettyPrint + (\ s a -> s{_umiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umiUserIp :: Lens' UsersMessagesInsert' (Maybe Text) +umiUserIp + = lens _umiUserIp (\ s a -> s{_umiUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umiUserId :: Lens' UsersMessagesInsert' Text +umiUserId + = lens _umiUserId (\ s a -> s{_umiUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umiKey :: Lens' UsersMessagesInsert' (Maybe Text) +umiKey = lens _umiKey (\ s a -> s{_umiKey = a}) + +-- | Mark the email as permanently deleted (not TRASH) and only visible in +-- Google Apps Vault to a Vault administrator. Only used for Google Apps +-- for Work accounts. +umiDeleted :: Lens' UsersMessagesInsert' Bool +umiDeleted + = lens _umiDeleted (\ s a -> s{_umiDeleted = a}) + +-- | OAuth 2.0 token for the current user. +umiOauthToken :: Lens' UsersMessagesInsert' (Maybe Text) +umiOauthToken + = lens _umiOauthToken + (\ s a -> s{_umiOauthToken = a}) + +-- | Source for Gmail\'s internal date of the message. +umiInternalDateSource :: Lens' UsersMessagesInsert' Text +umiInternalDateSource + = lens _umiInternalDateSource + (\ s a -> s{_umiInternalDateSource = a}) + +-- | Selector specifying which fields to include in a partial response. +umiFields :: Lens' UsersMessagesInsert' (Maybe Text) +umiFields + = lens _umiFields (\ s a -> s{_umiFields = a}) + +-- | Data format for the response. +umiAlt :: Lens' UsersMessagesInsert' Text +umiAlt = lens _umiAlt (\ s a -> s{_umiAlt = a}) + +instance GoogleRequest UsersMessagesInsert' where + type Rs UsersMessagesInsert' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesInsert{..} + = go _umiQuotaUser _umiPrettyPrint _umiUserIp + _umiUserId + _umiKey + (Just _umiDeleted) + _umiOauthToken + (Just _umiInternalDateSource) + _umiFields + _umiAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesInsertAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/List.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/List.hs new file mode 100644 index 000000000..e35902442 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the messages in the user\'s mailbox. +-- +-- /See:/ for @GmailUsersMessagesList@. +module Gmail.Users.Messages.List + ( + -- * REST Resource + UsersMessagesListAPI + + -- * Creating a Request + , usersMessagesList + , UsersMessagesList + + -- * Request Lenses + , umlQuotaUser + , umlPrettyPrint + , umlUserIp + , umlQ + , umlUserId + , umlKey + , umlIncludeSpamTrash + , umlLabelIds + , umlPageToken + , umlOauthToken + , umlMaxResults + , umlFields + , umlAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesList@ which the +-- 'UsersMessagesList' request conforms to. +type UsersMessagesListAPI = + Capture "userId" Text :> + "messages" :> + QueryParam "q" Text :> + QueryParam "includeSpamTrash" Bool :> + QueryParams "labelIds" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ListMessagesResponse + +-- | Lists the messages in the user\'s mailbox. +-- +-- /See:/ 'usersMessagesList' smart constructor. +data UsersMessagesList = UsersMessagesList + { _umlQuotaUser :: !(Maybe Text) + , _umlPrettyPrint :: !Bool + , _umlUserIp :: !(Maybe Text) + , _umlQ :: !(Maybe Text) + , _umlUserId :: !Text + , _umlKey :: !(Maybe Text) + , _umlIncludeSpamTrash :: !Bool + , _umlLabelIds :: !(Maybe Text) + , _umlPageToken :: !(Maybe Text) + , _umlOauthToken :: !(Maybe Text) + , _umlMaxResults :: !Word32 + , _umlFields :: !(Maybe Text) + , _umlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umlQuotaUser' +-- +-- * 'umlPrettyPrint' +-- +-- * 'umlUserIp' +-- +-- * 'umlQ' +-- +-- * 'umlUserId' +-- +-- * 'umlKey' +-- +-- * 'umlIncludeSpamTrash' +-- +-- * 'umlLabelIds' +-- +-- * 'umlPageToken' +-- +-- * 'umlOauthToken' +-- +-- * 'umlMaxResults' +-- +-- * 'umlFields' +-- +-- * 'umlAlt' +usersMessagesList + :: Text + -> UsersMessagesList +usersMessagesList pUmlUserId_ = + UsersMessagesList + { _umlQuotaUser = Nothing + , _umlPrettyPrint = True + , _umlUserIp = Nothing + , _umlQ = Nothing + , _umlUserId = pUmlUserId_ + , _umlKey = Nothing + , _umlIncludeSpamTrash = False + , _umlLabelIds = Nothing + , _umlPageToken = Nothing + , _umlOauthToken = Nothing + , _umlMaxResults = 100 + , _umlFields = Nothing + , _umlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umlQuotaUser :: Lens' UsersMessagesList' (Maybe Text) +umlQuotaUser + = lens _umlQuotaUser (\ s a -> s{_umlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umlPrettyPrint :: Lens' UsersMessagesList' Bool +umlPrettyPrint + = lens _umlPrettyPrint + (\ s a -> s{_umlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umlUserIp :: Lens' UsersMessagesList' (Maybe Text) +umlUserIp + = lens _umlUserIp (\ s a -> s{_umlUserIp = a}) + +-- | Only return messages matching the specified query. Supports the same +-- query format as the Gmail search box. For example, +-- \"from:someuser\'example.com rfc822msgid: is:unread\". +umlQ :: Lens' UsersMessagesList' (Maybe Text) +umlQ = lens _umlQ (\ s a -> s{_umlQ = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umlUserId :: Lens' UsersMessagesList' Text +umlUserId + = lens _umlUserId (\ s a -> s{_umlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umlKey :: Lens' UsersMessagesList' (Maybe Text) +umlKey = lens _umlKey (\ s a -> s{_umlKey = a}) + +-- | Include messages from SPAM and TRASH in the results. +umlIncludeSpamTrash :: Lens' UsersMessagesList' Bool +umlIncludeSpamTrash + = lens _umlIncludeSpamTrash + (\ s a -> s{_umlIncludeSpamTrash = a}) + +-- | Only return messages with labels that match all of the specified label +-- IDs. +umlLabelIds :: Lens' UsersMessagesList' (Maybe Text) +umlLabelIds + = lens _umlLabelIds (\ s a -> s{_umlLabelIds = a}) + +-- | Page token to retrieve a specific page of results in the list. +umlPageToken :: Lens' UsersMessagesList' (Maybe Text) +umlPageToken + = lens _umlPageToken (\ s a -> s{_umlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +umlOauthToken :: Lens' UsersMessagesList' (Maybe Text) +umlOauthToken + = lens _umlOauthToken + (\ s a -> s{_umlOauthToken = a}) + +-- | Maximum number of messages to return. +umlMaxResults :: Lens' UsersMessagesList' Word32 +umlMaxResults + = lens _umlMaxResults + (\ s a -> s{_umlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +umlFields :: Lens' UsersMessagesList' (Maybe Text) +umlFields + = lens _umlFields (\ s a -> s{_umlFields = a}) + +-- | Data format for the response. +umlAlt :: Lens' UsersMessagesList' Text +umlAlt = lens _umlAlt (\ s a -> s{_umlAlt = a}) + +instance GoogleRequest UsersMessagesList' where + type Rs UsersMessagesList' = ListMessagesResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesList{..} + = go _umlQuotaUser _umlPrettyPrint _umlUserIp _umlQ + _umlUserId + _umlKey + (Just _umlIncludeSpamTrash) + _umlLabelIds + _umlPageToken + _umlOauthToken + (Just _umlMaxResults) + _umlFields + _umlAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesListAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Modify.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Modify.hs new file mode 100644 index 000000000..0c2af1a87 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Modify.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Modify +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the labels on the specified message. +-- +-- /See:/ for @GmailUsersMessagesModify@. +module Gmail.Users.Messages.Modify + ( + -- * REST Resource + UsersMessagesModifyAPI + + -- * Creating a Request + , usersMessagesModify + , UsersMessagesModify + + -- * Request Lenses + , ummQuotaUser + , ummPrettyPrint + , ummUserIp + , ummUserId + , ummKey + , ummId + , ummOauthToken + , ummFields + , ummAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesModify@ which the +-- 'UsersMessagesModify' request conforms to. +type UsersMessagesModifyAPI = + Capture "userId" Text :> + "messages" :> + Capture "id" Text :> "modify" :> Post '[JSON] Message + +-- | Modifies the labels on the specified message. +-- +-- /See:/ 'usersMessagesModify' smart constructor. +data UsersMessagesModify = UsersMessagesModify + { _ummQuotaUser :: !(Maybe Text) + , _ummPrettyPrint :: !Bool + , _ummUserIp :: !(Maybe Text) + , _ummUserId :: !Text + , _ummKey :: !(Maybe Text) + , _ummId :: !Text + , _ummOauthToken :: !(Maybe Text) + , _ummFields :: !(Maybe Text) + , _ummAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesModify'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ummQuotaUser' +-- +-- * 'ummPrettyPrint' +-- +-- * 'ummUserIp' +-- +-- * 'ummUserId' +-- +-- * 'ummKey' +-- +-- * 'ummId' +-- +-- * 'ummOauthToken' +-- +-- * 'ummFields' +-- +-- * 'ummAlt' +usersMessagesModify + :: Text -- ^ 'id' + -> Text + -> UsersMessagesModify +usersMessagesModify pUmmUserId_ pUmmId_ = + UsersMessagesModify + { _ummQuotaUser = Nothing + , _ummPrettyPrint = True + , _ummUserIp = Nothing + , _ummUserId = pUmmUserId_ + , _ummKey = Nothing + , _ummId = pUmmId_ + , _ummOauthToken = Nothing + , _ummFields = Nothing + , _ummAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ummQuotaUser :: Lens' UsersMessagesModify' (Maybe Text) +ummQuotaUser + = lens _ummQuotaUser (\ s a -> s{_ummQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ummPrettyPrint :: Lens' UsersMessagesModify' Bool +ummPrettyPrint + = lens _ummPrettyPrint + (\ s a -> s{_ummPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ummUserIp :: Lens' UsersMessagesModify' (Maybe Text) +ummUserIp + = lens _ummUserIp (\ s a -> s{_ummUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +ummUserId :: Lens' UsersMessagesModify' Text +ummUserId + = lens _ummUserId (\ s a -> s{_ummUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ummKey :: Lens' UsersMessagesModify' (Maybe Text) +ummKey = lens _ummKey (\ s a -> s{_ummKey = a}) + +-- | The ID of the message to modify. +ummId :: Lens' UsersMessagesModify' Text +ummId = lens _ummId (\ s a -> s{_ummId = a}) + +-- | OAuth 2.0 token for the current user. +ummOauthToken :: Lens' UsersMessagesModify' (Maybe Text) +ummOauthToken + = lens _ummOauthToken + (\ s a -> s{_ummOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ummFields :: Lens' UsersMessagesModify' (Maybe Text) +ummFields + = lens _ummFields (\ s a -> s{_ummFields = a}) + +-- | Data format for the response. +ummAlt :: Lens' UsersMessagesModify' Text +ummAlt = lens _ummAlt (\ s a -> s{_ummAlt = a}) + +instance GoogleRequest UsersMessagesModify' where + type Rs UsersMessagesModify' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesModify{..} + = go _ummQuotaUser _ummPrettyPrint _ummUserIp + _ummUserId + _ummKey + _ummId + _ummOauthToken + _ummFields + _ummAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesModifyAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Send.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Send.hs new file mode 100644 index 000000000..7cb2751e4 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Send.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Send +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sends the specified message to the recipients in the To, Cc, and Bcc +-- headers. +-- +-- /See:/ for @GmailUsersMessagesSend@. +module Gmail.Users.Messages.Send + ( + -- * REST Resource + UsersMessagesSendAPI + + -- * Creating a Request + , usersMessagesSend + , UsersMessagesSend + + -- * Request Lenses + , umsQuotaUser + , umsPrettyPrint + , umsUserIp + , umsUserId + , umsKey + , umsOauthToken + , umsFields + , umsAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesSend@ which the +-- 'UsersMessagesSend' request conforms to. +type UsersMessagesSendAPI = + Capture "userId" Text :> + "messages" :> "send" :> Post '[JSON] Message + +-- | Sends the specified message to the recipients in the To, Cc, and Bcc +-- headers. +-- +-- /See:/ 'usersMessagesSend' smart constructor. +data UsersMessagesSend = UsersMessagesSend + { _umsQuotaUser :: !(Maybe Text) + , _umsPrettyPrint :: !Bool + , _umsUserIp :: !(Maybe Text) + , _umsUserId :: !Text + , _umsKey :: !(Maybe Text) + , _umsOauthToken :: !(Maybe Text) + , _umsFields :: !(Maybe Text) + , _umsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesSend'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umsQuotaUser' +-- +-- * 'umsPrettyPrint' +-- +-- * 'umsUserIp' +-- +-- * 'umsUserId' +-- +-- * 'umsKey' +-- +-- * 'umsOauthToken' +-- +-- * 'umsFields' +-- +-- * 'umsAlt' +usersMessagesSend + :: Text + -> UsersMessagesSend +usersMessagesSend pUmsUserId_ = + UsersMessagesSend + { _umsQuotaUser = Nothing + , _umsPrettyPrint = True + , _umsUserIp = Nothing + , _umsUserId = pUmsUserId_ + , _umsKey = Nothing + , _umsOauthToken = Nothing + , _umsFields = Nothing + , _umsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umsQuotaUser :: Lens' UsersMessagesSend' (Maybe Text) +umsQuotaUser + = lens _umsQuotaUser (\ s a -> s{_umsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umsPrettyPrint :: Lens' UsersMessagesSend' Bool +umsPrettyPrint + = lens _umsPrettyPrint + (\ s a -> s{_umsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umsUserIp :: Lens' UsersMessagesSend' (Maybe Text) +umsUserIp + = lens _umsUserIp (\ s a -> s{_umsUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umsUserId :: Lens' UsersMessagesSend' Text +umsUserId + = lens _umsUserId (\ s a -> s{_umsUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umsKey :: Lens' UsersMessagesSend' (Maybe Text) +umsKey = lens _umsKey (\ s a -> s{_umsKey = a}) + +-- | OAuth 2.0 token for the current user. +umsOauthToken :: Lens' UsersMessagesSend' (Maybe Text) +umsOauthToken + = lens _umsOauthToken + (\ s a -> s{_umsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umsFields :: Lens' UsersMessagesSend' (Maybe Text) +umsFields + = lens _umsFields (\ s a -> s{_umsFields = a}) + +-- | Data format for the response. +umsAlt :: Lens' UsersMessagesSend' Text +umsAlt = lens _umsAlt (\ s a -> s{_umsAlt = a}) + +instance GoogleRequest UsersMessagesSend' where + type Rs UsersMessagesSend' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesSend{..} + = go _umsQuotaUser _umsPrettyPrint _umsUserIp + _umsUserId + _umsKey + _umsOauthToken + _umsFields + _umsAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesSendAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Trash.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Trash.hs new file mode 100644 index 000000000..9d15c249a --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Trash.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Trash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves the specified message to the trash. +-- +-- /See:/ for @GmailUsersMessagesTrash@. +module Gmail.Users.Messages.Trash + ( + -- * REST Resource + UsersMessagesTrashAPI + + -- * Creating a Request + , usersMessagesTrash + , UsersMessagesTrash + + -- * Request Lenses + , umtQuotaUser + , umtPrettyPrint + , umtUserIp + , umtUserId + , umtKey + , umtId + , umtOauthToken + , umtFields + , umtAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesTrash@ which the +-- 'UsersMessagesTrash' request conforms to. +type UsersMessagesTrashAPI = + Capture "userId" Text :> + "messages" :> + Capture "id" Text :> "trash" :> Post '[JSON] Message + +-- | Moves the specified message to the trash. +-- +-- /See:/ 'usersMessagesTrash' smart constructor. +data UsersMessagesTrash = UsersMessagesTrash + { _umtQuotaUser :: !(Maybe Text) + , _umtPrettyPrint :: !Bool + , _umtUserIp :: !(Maybe Text) + , _umtUserId :: !Text + , _umtKey :: !(Maybe Text) + , _umtId :: !Text + , _umtOauthToken :: !(Maybe Text) + , _umtFields :: !(Maybe Text) + , _umtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesTrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umtQuotaUser' +-- +-- * 'umtPrettyPrint' +-- +-- * 'umtUserIp' +-- +-- * 'umtUserId' +-- +-- * 'umtKey' +-- +-- * 'umtId' +-- +-- * 'umtOauthToken' +-- +-- * 'umtFields' +-- +-- * 'umtAlt' +usersMessagesTrash + :: Text -- ^ 'id' + -> Text + -> UsersMessagesTrash +usersMessagesTrash pUmtUserId_ pUmtId_ = + UsersMessagesTrash + { _umtQuotaUser = Nothing + , _umtPrettyPrint = True + , _umtUserIp = Nothing + , _umtUserId = pUmtUserId_ + , _umtKey = Nothing + , _umtId = pUmtId_ + , _umtOauthToken = Nothing + , _umtFields = Nothing + , _umtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umtQuotaUser :: Lens' UsersMessagesTrash' (Maybe Text) +umtQuotaUser + = lens _umtQuotaUser (\ s a -> s{_umtQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umtPrettyPrint :: Lens' UsersMessagesTrash' Bool +umtPrettyPrint + = lens _umtPrettyPrint + (\ s a -> s{_umtPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umtUserIp :: Lens' UsersMessagesTrash' (Maybe Text) +umtUserIp + = lens _umtUserIp (\ s a -> s{_umtUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umtUserId :: Lens' UsersMessagesTrash' Text +umtUserId + = lens _umtUserId (\ s a -> s{_umtUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umtKey :: Lens' UsersMessagesTrash' (Maybe Text) +umtKey = lens _umtKey (\ s a -> s{_umtKey = a}) + +-- | The ID of the message to Trash. +umtId :: Lens' UsersMessagesTrash' Text +umtId = lens _umtId (\ s a -> s{_umtId = a}) + +-- | OAuth 2.0 token for the current user. +umtOauthToken :: Lens' UsersMessagesTrash' (Maybe Text) +umtOauthToken + = lens _umtOauthToken + (\ s a -> s{_umtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umtFields :: Lens' UsersMessagesTrash' (Maybe Text) +umtFields + = lens _umtFields (\ s a -> s{_umtFields = a}) + +-- | Data format for the response. +umtAlt :: Lens' UsersMessagesTrash' Text +umtAlt = lens _umtAlt (\ s a -> s{_umtAlt = a}) + +instance GoogleRequest UsersMessagesTrash' where + type Rs UsersMessagesTrash' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesTrash{..} + = go _umtQuotaUser _umtPrettyPrint _umtUserIp + _umtUserId + _umtKey + _umtId + _umtOauthToken + _umtFields + _umtAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesTrashAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Untrash.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Untrash.hs new file mode 100644 index 000000000..86fb77a2d --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Messages/Untrash.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Messages.Untrash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the specified message from the trash. +-- +-- /See:/ for @GmailUsersMessagesUntrash@. +module Gmail.Users.Messages.Untrash + ( + -- * REST Resource + UsersMessagesUntrashAPI + + -- * Creating a Request + , usersMessagesUntrash + , UsersMessagesUntrash + + -- * Request Lenses + , umuQuotaUser + , umuPrettyPrint + , umuUserIp + , umuUserId + , umuKey + , umuId + , umuOauthToken + , umuFields + , umuAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersMessagesUntrash@ which the +-- 'UsersMessagesUntrash' request conforms to. +type UsersMessagesUntrashAPI = + Capture "userId" Text :> + "messages" :> + Capture "id" Text :> + "untrash" :> Post '[JSON] Message + +-- | Removes the specified message from the trash. +-- +-- /See:/ 'usersMessagesUntrash' smart constructor. +data UsersMessagesUntrash = UsersMessagesUntrash + { _umuQuotaUser :: !(Maybe Text) + , _umuPrettyPrint :: !Bool + , _umuUserIp :: !(Maybe Text) + , _umuUserId :: !Text + , _umuKey :: !(Maybe Text) + , _umuId :: !Text + , _umuOauthToken :: !(Maybe Text) + , _umuFields :: !(Maybe Text) + , _umuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersMessagesUntrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umuQuotaUser' +-- +-- * 'umuPrettyPrint' +-- +-- * 'umuUserIp' +-- +-- * 'umuUserId' +-- +-- * 'umuKey' +-- +-- * 'umuId' +-- +-- * 'umuOauthToken' +-- +-- * 'umuFields' +-- +-- * 'umuAlt' +usersMessagesUntrash + :: Text -- ^ 'id' + -> Text + -> UsersMessagesUntrash +usersMessagesUntrash pUmuUserId_ pUmuId_ = + UsersMessagesUntrash + { _umuQuotaUser = Nothing + , _umuPrettyPrint = True + , _umuUserIp = Nothing + , _umuUserId = pUmuUserId_ + , _umuKey = Nothing + , _umuId = pUmuId_ + , _umuOauthToken = Nothing + , _umuFields = Nothing + , _umuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umuQuotaUser :: Lens' UsersMessagesUntrash' (Maybe Text) +umuQuotaUser + = lens _umuQuotaUser (\ s a -> s{_umuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umuPrettyPrint :: Lens' UsersMessagesUntrash' Bool +umuPrettyPrint + = lens _umuPrettyPrint + (\ s a -> s{_umuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umuUserIp :: Lens' UsersMessagesUntrash' (Maybe Text) +umuUserIp + = lens _umuUserIp (\ s a -> s{_umuUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +umuUserId :: Lens' UsersMessagesUntrash' Text +umuUserId + = lens _umuUserId (\ s a -> s{_umuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umuKey :: Lens' UsersMessagesUntrash' (Maybe Text) +umuKey = lens _umuKey (\ s a -> s{_umuKey = a}) + +-- | The ID of the message to remove from Trash. +umuId :: Lens' UsersMessagesUntrash' Text +umuId = lens _umuId (\ s a -> s{_umuId = a}) + +-- | OAuth 2.0 token for the current user. +umuOauthToken :: Lens' UsersMessagesUntrash' (Maybe Text) +umuOauthToken + = lens _umuOauthToken + (\ s a -> s{_umuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umuFields :: Lens' UsersMessagesUntrash' (Maybe Text) +umuFields + = lens _umuFields (\ s a -> s{_umuFields = a}) + +-- | Data format for the response. +umuAlt :: Lens' UsersMessagesUntrash' Text +umuAlt = lens _umuAlt (\ s a -> s{_umuAlt = a}) + +instance GoogleRequest UsersMessagesUntrash' where + type Rs UsersMessagesUntrash' = Message + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersMessagesUntrash{..} + = go _umuQuotaUser _umuPrettyPrint _umuUserIp + _umuUserId + _umuKey + _umuId + _umuOauthToken + _umuFields + _umuAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersMessagesUntrashAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Stop.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Stop.hs new file mode 100644 index 000000000..193ee2e84 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Stop.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop receiving push notifications for the given user mailbox. +-- +-- /See:/ for @GmailUsersStop@. +module Gmail.Users.Stop + ( + -- * REST Resource + UsersStopAPI + + -- * Creating a Request + , usersStop + , UsersStop + + -- * Request Lenses + , usQuotaUser + , usPrettyPrint + , usUserIp + , usUserId + , usKey + , usOauthToken + , usFields + , usAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersStop@ which the +-- 'UsersStop' request conforms to. +type UsersStopAPI = + Capture "userId" Text :> "stop" :> Post '[JSON] () + +-- | Stop receiving push notifications for the given user mailbox. +-- +-- /See:/ 'usersStop' smart constructor. +data UsersStop = UsersStop + { _usQuotaUser :: !(Maybe Text) + , _usPrettyPrint :: !Bool + , _usUserIp :: !(Maybe Text) + , _usUserId :: !Text + , _usKey :: !(Maybe Text) + , _usOauthToken :: !(Maybe Text) + , _usFields :: !(Maybe Text) + , _usAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usQuotaUser' +-- +-- * 'usPrettyPrint' +-- +-- * 'usUserIp' +-- +-- * 'usUserId' +-- +-- * 'usKey' +-- +-- * 'usOauthToken' +-- +-- * 'usFields' +-- +-- * 'usAlt' +usersStop + :: Text + -> UsersStop +usersStop pUsUserId_ = + UsersStop + { _usQuotaUser = Nothing + , _usPrettyPrint = True + , _usUserIp = Nothing + , _usUserId = pUsUserId_ + , _usKey = Nothing + , _usOauthToken = Nothing + , _usFields = Nothing + , _usAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +usQuotaUser :: Lens' UsersStop' (Maybe Text) +usQuotaUser + = lens _usQuotaUser (\ s a -> s{_usQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +usPrettyPrint :: Lens' UsersStop' Bool +usPrettyPrint + = lens _usPrettyPrint + (\ s a -> s{_usPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +usUserIp :: Lens' UsersStop' (Maybe Text) +usUserIp = lens _usUserIp (\ s a -> s{_usUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +usUserId :: Lens' UsersStop' Text +usUserId = lens _usUserId (\ s a -> s{_usUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +usKey :: Lens' UsersStop' (Maybe Text) +usKey = lens _usKey (\ s a -> s{_usKey = a}) + +-- | OAuth 2.0 token for the current user. +usOauthToken :: Lens' UsersStop' (Maybe Text) +usOauthToken + = lens _usOauthToken (\ s a -> s{_usOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +usFields :: Lens' UsersStop' (Maybe Text) +usFields = lens _usFields (\ s a -> s{_usFields = a}) + +-- | Data format for the response. +usAlt :: Lens' UsersStop' Text +usAlt = lens _usAlt (\ s a -> s{_usAlt = a}) + +instance GoogleRequest UsersStop' where + type Rs UsersStop' = () + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersStop{..} + = go _usQuotaUser _usPrettyPrint _usUserIp _usUserId + _usKey + _usOauthToken + _usFields + _usAlt + where go + = clientWithRoute (Proxy :: Proxy UsersStopAPI) r u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Delete.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Delete.hs new file mode 100644 index 000000000..ddd6b9e55 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Delete.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Immediately and permanently deletes the specified thread. This operation +-- cannot be undone. Prefer threads.trash instead. +-- +-- /See:/ for @GmailUsersThreadsDelete@. +module Gmail.Users.Threads.Delete + ( + -- * REST Resource + UsersThreadsDeleteAPI + + -- * Creating a Request + , usersThreadsDelete + , UsersThreadsDelete + + -- * Request Lenses + , utdQuotaUser + , utdPrettyPrint + , utdUserIp + , utdUserId + , utdKey + , utdId + , utdOauthToken + , utdFields + , utdAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsDelete@ which the +-- 'UsersThreadsDelete' request conforms to. +type UsersThreadsDeleteAPI = + Capture "userId" Text :> + "threads" :> Capture "id" Text :> Delete '[JSON] () + +-- | Immediately and permanently deletes the specified thread. This operation +-- cannot be undone. Prefer threads.trash instead. +-- +-- /See:/ 'usersThreadsDelete' smart constructor. +data UsersThreadsDelete = UsersThreadsDelete + { _utdQuotaUser :: !(Maybe Text) + , _utdPrettyPrint :: !Bool + , _utdUserIp :: !(Maybe Text) + , _utdUserId :: !Text + , _utdKey :: !(Maybe Text) + , _utdId :: !Text + , _utdOauthToken :: !(Maybe Text) + , _utdFields :: !(Maybe Text) + , _utdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utdQuotaUser' +-- +-- * 'utdPrettyPrint' +-- +-- * 'utdUserIp' +-- +-- * 'utdUserId' +-- +-- * 'utdKey' +-- +-- * 'utdId' +-- +-- * 'utdOauthToken' +-- +-- * 'utdFields' +-- +-- * 'utdAlt' +usersThreadsDelete + :: Text -- ^ 'id' + -> Text + -> UsersThreadsDelete +usersThreadsDelete pUtdUserId_ pUtdId_ = + UsersThreadsDelete + { _utdQuotaUser = Nothing + , _utdPrettyPrint = True + , _utdUserIp = Nothing + , _utdUserId = pUtdUserId_ + , _utdKey = Nothing + , _utdId = pUtdId_ + , _utdOauthToken = Nothing + , _utdFields = Nothing + , _utdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +utdQuotaUser :: Lens' UsersThreadsDelete' (Maybe Text) +utdQuotaUser + = lens _utdQuotaUser (\ s a -> s{_utdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +utdPrettyPrint :: Lens' UsersThreadsDelete' Bool +utdPrettyPrint + = lens _utdPrettyPrint + (\ s a -> s{_utdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +utdUserIp :: Lens' UsersThreadsDelete' (Maybe Text) +utdUserIp + = lens _utdUserIp (\ s a -> s{_utdUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +utdUserId :: Lens' UsersThreadsDelete' Text +utdUserId + = lens _utdUserId (\ s a -> s{_utdUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +utdKey :: Lens' UsersThreadsDelete' (Maybe Text) +utdKey = lens _utdKey (\ s a -> s{_utdKey = a}) + +-- | ID of the Thread to delete. +utdId :: Lens' UsersThreadsDelete' Text +utdId = lens _utdId (\ s a -> s{_utdId = a}) + +-- | OAuth 2.0 token for the current user. +utdOauthToken :: Lens' UsersThreadsDelete' (Maybe Text) +utdOauthToken + = lens _utdOauthToken + (\ s a -> s{_utdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +utdFields :: Lens' UsersThreadsDelete' (Maybe Text) +utdFields + = lens _utdFields (\ s a -> s{_utdFields = a}) + +-- | Data format for the response. +utdAlt :: Lens' UsersThreadsDelete' Text +utdAlt = lens _utdAlt (\ s a -> s{_utdAlt = a}) + +instance GoogleRequest UsersThreadsDelete' where + type Rs UsersThreadsDelete' = () + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsDelete{..} + = go _utdQuotaUser _utdPrettyPrint _utdUserIp + _utdUserId + _utdKey + _utdId + _utdOauthToken + _utdFields + _utdAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersThreadsDeleteAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Get.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Get.hs new file mode 100644 index 000000000..6754e67da --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Get.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the specified thread. +-- +-- /See:/ for @GmailUsersThreadsGet@. +module Gmail.Users.Threads.Get + ( + -- * REST Resource + UsersThreadsGetAPI + + -- * Creating a Request + , usersThreadsGet + , UsersThreadsGet + + -- * Request Lenses + , utgQuotaUser + , utgPrettyPrint + , utgUserIp + , utgFormat + , utgUserId + , utgKey + , utgId + , utgOauthToken + , utgMetadataHeaders + , utgFields + , utgAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsGet@ which the +-- 'UsersThreadsGet' request conforms to. +type UsersThreadsGetAPI = + Capture "userId" Text :> + "threads" :> + Capture "id" Text :> + QueryParam "format" Text :> + QueryParams "metadataHeaders" Text :> + Get '[JSON] Thread + +-- | Gets the specified thread. +-- +-- /See:/ 'usersThreadsGet' smart constructor. +data UsersThreadsGet = UsersThreadsGet + { _utgQuotaUser :: !(Maybe Text) + , _utgPrettyPrint :: !Bool + , _utgUserIp :: !(Maybe Text) + , _utgFormat :: !Text + , _utgUserId :: !Text + , _utgKey :: !(Maybe Text) + , _utgId :: !Text + , _utgOauthToken :: !(Maybe Text) + , _utgMetadataHeaders :: !(Maybe Text) + , _utgFields :: !(Maybe Text) + , _utgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utgQuotaUser' +-- +-- * 'utgPrettyPrint' +-- +-- * 'utgUserIp' +-- +-- * 'utgFormat' +-- +-- * 'utgUserId' +-- +-- * 'utgKey' +-- +-- * 'utgId' +-- +-- * 'utgOauthToken' +-- +-- * 'utgMetadataHeaders' +-- +-- * 'utgFields' +-- +-- * 'utgAlt' +usersThreadsGet + :: Text -- ^ 'id' + -> Text + -> UsersThreadsGet +usersThreadsGet pUtgUserId_ pUtgId_ = + UsersThreadsGet + { _utgQuotaUser = Nothing + , _utgPrettyPrint = True + , _utgUserIp = Nothing + , _utgFormat = "full" + , _utgUserId = pUtgUserId_ + , _utgKey = Nothing + , _utgId = pUtgId_ + , _utgOauthToken = Nothing + , _utgMetadataHeaders = Nothing + , _utgFields = Nothing + , _utgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +utgQuotaUser :: Lens' UsersThreadsGet' (Maybe Text) +utgQuotaUser + = lens _utgQuotaUser (\ s a -> s{_utgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +utgPrettyPrint :: Lens' UsersThreadsGet' Bool +utgPrettyPrint + = lens _utgPrettyPrint + (\ s a -> s{_utgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +utgUserIp :: Lens' UsersThreadsGet' (Maybe Text) +utgUserIp + = lens _utgUserIp (\ s a -> s{_utgUserIp = a}) + +-- | The format to return the messages in. +utgFormat :: Lens' UsersThreadsGet' Text +utgFormat + = lens _utgFormat (\ s a -> s{_utgFormat = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +utgUserId :: Lens' UsersThreadsGet' Text +utgUserId + = lens _utgUserId (\ s a -> s{_utgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +utgKey :: Lens' UsersThreadsGet' (Maybe Text) +utgKey = lens _utgKey (\ s a -> s{_utgKey = a}) + +-- | The ID of the thread to retrieve. +utgId :: Lens' UsersThreadsGet' Text +utgId = lens _utgId (\ s a -> s{_utgId = a}) + +-- | OAuth 2.0 token for the current user. +utgOauthToken :: Lens' UsersThreadsGet' (Maybe Text) +utgOauthToken + = lens _utgOauthToken + (\ s a -> s{_utgOauthToken = a}) + +-- | When given and format is METADATA, only include headers specified. +utgMetadataHeaders :: Lens' UsersThreadsGet' (Maybe Text) +utgMetadataHeaders + = lens _utgMetadataHeaders + (\ s a -> s{_utgMetadataHeaders = a}) + +-- | Selector specifying which fields to include in a partial response. +utgFields :: Lens' UsersThreadsGet' (Maybe Text) +utgFields + = lens _utgFields (\ s a -> s{_utgFields = a}) + +-- | Data format for the response. +utgAlt :: Lens' UsersThreadsGet' Text +utgAlt = lens _utgAlt (\ s a -> s{_utgAlt = a}) + +instance GoogleRequest UsersThreadsGet' where + type Rs UsersThreadsGet' = Thread + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsGet{..} + = go _utgQuotaUser _utgPrettyPrint _utgUserIp + (Just _utgFormat) + _utgUserId + _utgKey + _utgId + _utgOauthToken + _utgMetadataHeaders + _utgFields + _utgAlt + where go + = clientWithRoute (Proxy :: Proxy UsersThreadsGetAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/List.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/List.hs new file mode 100644 index 000000000..b12042128 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/List.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the threads in the user\'s mailbox. +-- +-- /See:/ for @GmailUsersThreadsList@. +module Gmail.Users.Threads.List + ( + -- * REST Resource + UsersThreadsListAPI + + -- * Creating a Request + , usersThreadsList + , UsersThreadsList + + -- * Request Lenses + , utlQuotaUser + , utlPrettyPrint + , utlUserIp + , utlQ + , utlUserId + , utlKey + , utlIncludeSpamTrash + , utlLabelIds + , utlPageToken + , utlOauthToken + , utlMaxResults + , utlFields + , utlAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsList@ which the +-- 'UsersThreadsList' request conforms to. +type UsersThreadsListAPI = + Capture "userId" Text :> + "threads" :> + QueryParam "q" Text :> + QueryParam "includeSpamTrash" Bool :> + QueryParams "labelIds" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ListThreadsResponse + +-- | Lists the threads in the user\'s mailbox. +-- +-- /See:/ 'usersThreadsList' smart constructor. +data UsersThreadsList = UsersThreadsList + { _utlQuotaUser :: !(Maybe Text) + , _utlPrettyPrint :: !Bool + , _utlUserIp :: !(Maybe Text) + , _utlQ :: !(Maybe Text) + , _utlUserId :: !Text + , _utlKey :: !(Maybe Text) + , _utlIncludeSpamTrash :: !Bool + , _utlLabelIds :: !(Maybe Text) + , _utlPageToken :: !(Maybe Text) + , _utlOauthToken :: !(Maybe Text) + , _utlMaxResults :: !Word32 + , _utlFields :: !(Maybe Text) + , _utlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utlQuotaUser' +-- +-- * 'utlPrettyPrint' +-- +-- * 'utlUserIp' +-- +-- * 'utlQ' +-- +-- * 'utlUserId' +-- +-- * 'utlKey' +-- +-- * 'utlIncludeSpamTrash' +-- +-- * 'utlLabelIds' +-- +-- * 'utlPageToken' +-- +-- * 'utlOauthToken' +-- +-- * 'utlMaxResults' +-- +-- * 'utlFields' +-- +-- * 'utlAlt' +usersThreadsList + :: Text + -> UsersThreadsList +usersThreadsList pUtlUserId_ = + UsersThreadsList + { _utlQuotaUser = Nothing + , _utlPrettyPrint = True + , _utlUserIp = Nothing + , _utlQ = Nothing + , _utlUserId = pUtlUserId_ + , _utlKey = Nothing + , _utlIncludeSpamTrash = False + , _utlLabelIds = Nothing + , _utlPageToken = Nothing + , _utlOauthToken = Nothing + , _utlMaxResults = 100 + , _utlFields = Nothing + , _utlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +utlQuotaUser :: Lens' UsersThreadsList' (Maybe Text) +utlQuotaUser + = lens _utlQuotaUser (\ s a -> s{_utlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +utlPrettyPrint :: Lens' UsersThreadsList' Bool +utlPrettyPrint + = lens _utlPrettyPrint + (\ s a -> s{_utlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +utlUserIp :: Lens' UsersThreadsList' (Maybe Text) +utlUserIp + = lens _utlUserIp (\ s a -> s{_utlUserIp = a}) + +-- | Only return threads matching the specified query. Supports the same +-- query format as the Gmail search box. For example, +-- \"from:someuser\'example.com rfc822msgid: is:unread\". +utlQ :: Lens' UsersThreadsList' (Maybe Text) +utlQ = lens _utlQ (\ s a -> s{_utlQ = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +utlUserId :: Lens' UsersThreadsList' Text +utlUserId + = lens _utlUserId (\ s a -> s{_utlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +utlKey :: Lens' UsersThreadsList' (Maybe Text) +utlKey = lens _utlKey (\ s a -> s{_utlKey = a}) + +-- | Include threads from SPAM and TRASH in the results. +utlIncludeSpamTrash :: Lens' UsersThreadsList' Bool +utlIncludeSpamTrash + = lens _utlIncludeSpamTrash + (\ s a -> s{_utlIncludeSpamTrash = a}) + +-- | Only return threads with labels that match all of the specified label +-- IDs. +utlLabelIds :: Lens' UsersThreadsList' (Maybe Text) +utlLabelIds + = lens _utlLabelIds (\ s a -> s{_utlLabelIds = a}) + +-- | Page token to retrieve a specific page of results in the list. +utlPageToken :: Lens' UsersThreadsList' (Maybe Text) +utlPageToken + = lens _utlPageToken (\ s a -> s{_utlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +utlOauthToken :: Lens' UsersThreadsList' (Maybe Text) +utlOauthToken + = lens _utlOauthToken + (\ s a -> s{_utlOauthToken = a}) + +-- | Maximum number of threads to return. +utlMaxResults :: Lens' UsersThreadsList' Word32 +utlMaxResults + = lens _utlMaxResults + (\ s a -> s{_utlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +utlFields :: Lens' UsersThreadsList' (Maybe Text) +utlFields + = lens _utlFields (\ s a -> s{_utlFields = a}) + +-- | Data format for the response. +utlAlt :: Lens' UsersThreadsList' Text +utlAlt = lens _utlAlt (\ s a -> s{_utlAlt = a}) + +instance GoogleRequest UsersThreadsList' where + type Rs UsersThreadsList' = ListThreadsResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsList{..} + = go _utlQuotaUser _utlPrettyPrint _utlUserIp _utlQ + _utlUserId + _utlKey + (Just _utlIncludeSpamTrash) + _utlLabelIds + _utlPageToken + _utlOauthToken + (Just _utlMaxResults) + _utlFields + _utlAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersThreadsListAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Modify.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Modify.hs new file mode 100644 index 000000000..0c79676fd --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Modify.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.Modify +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the labels applied to the thread. This applies to all messages +-- in the thread. +-- +-- /See:/ for @GmailUsersThreadsModify@. +module Gmail.Users.Threads.Modify + ( + -- * REST Resource + UsersThreadsModifyAPI + + -- * Creating a Request + , usersThreadsModify + , UsersThreadsModify + + -- * Request Lenses + , utmQuotaUser + , utmPrettyPrint + , utmUserIp + , utmUserId + , utmKey + , utmId + , utmOauthToken + , utmFields + , utmAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsModify@ which the +-- 'UsersThreadsModify' request conforms to. +type UsersThreadsModifyAPI = + Capture "userId" Text :> + "threads" :> + Capture "id" Text :> "modify" :> Post '[JSON] Thread + +-- | Modifies the labels applied to the thread. This applies to all messages +-- in the thread. +-- +-- /See:/ 'usersThreadsModify' smart constructor. +data UsersThreadsModify = UsersThreadsModify + { _utmQuotaUser :: !(Maybe Text) + , _utmPrettyPrint :: !Bool + , _utmUserIp :: !(Maybe Text) + , _utmUserId :: !Text + , _utmKey :: !(Maybe Text) + , _utmId :: !Text + , _utmOauthToken :: !(Maybe Text) + , _utmFields :: !(Maybe Text) + , _utmAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsModify'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utmQuotaUser' +-- +-- * 'utmPrettyPrint' +-- +-- * 'utmUserIp' +-- +-- * 'utmUserId' +-- +-- * 'utmKey' +-- +-- * 'utmId' +-- +-- * 'utmOauthToken' +-- +-- * 'utmFields' +-- +-- * 'utmAlt' +usersThreadsModify + :: Text -- ^ 'id' + -> Text + -> UsersThreadsModify +usersThreadsModify pUtmUserId_ pUtmId_ = + UsersThreadsModify + { _utmQuotaUser = Nothing + , _utmPrettyPrint = True + , _utmUserIp = Nothing + , _utmUserId = pUtmUserId_ + , _utmKey = Nothing + , _utmId = pUtmId_ + , _utmOauthToken = Nothing + , _utmFields = Nothing + , _utmAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +utmQuotaUser :: Lens' UsersThreadsModify' (Maybe Text) +utmQuotaUser + = lens _utmQuotaUser (\ s a -> s{_utmQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +utmPrettyPrint :: Lens' UsersThreadsModify' Bool +utmPrettyPrint + = lens _utmPrettyPrint + (\ s a -> s{_utmPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +utmUserIp :: Lens' UsersThreadsModify' (Maybe Text) +utmUserIp + = lens _utmUserIp (\ s a -> s{_utmUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +utmUserId :: Lens' UsersThreadsModify' Text +utmUserId + = lens _utmUserId (\ s a -> s{_utmUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +utmKey :: Lens' UsersThreadsModify' (Maybe Text) +utmKey = lens _utmKey (\ s a -> s{_utmKey = a}) + +-- | The ID of the thread to modify. +utmId :: Lens' UsersThreadsModify' Text +utmId = lens _utmId (\ s a -> s{_utmId = a}) + +-- | OAuth 2.0 token for the current user. +utmOauthToken :: Lens' UsersThreadsModify' (Maybe Text) +utmOauthToken + = lens _utmOauthToken + (\ s a -> s{_utmOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +utmFields :: Lens' UsersThreadsModify' (Maybe Text) +utmFields + = lens _utmFields (\ s a -> s{_utmFields = a}) + +-- | Data format for the response. +utmAlt :: Lens' UsersThreadsModify' Text +utmAlt = lens _utmAlt (\ s a -> s{_utmAlt = a}) + +instance GoogleRequest UsersThreadsModify' where + type Rs UsersThreadsModify' = Thread + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsModify{..} + = go _utmQuotaUser _utmPrettyPrint _utmUserIp + _utmUserId + _utmKey + _utmId + _utmOauthToken + _utmFields + _utmAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersThreadsModifyAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Trash.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Trash.hs new file mode 100644 index 000000000..db820c53e --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Trash.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.Trash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves the specified thread to the trash. +-- +-- /See:/ for @GmailUsersThreadsTrash@. +module Gmail.Users.Threads.Trash + ( + -- * REST Resource + UsersThreadsTrashAPI + + -- * Creating a Request + , usersThreadsTrash + , UsersThreadsTrash + + -- * Request Lenses + , uttQuotaUser + , uttPrettyPrint + , uttUserIp + , uttUserId + , uttKey + , uttId + , uttOauthToken + , uttFields + , uttAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsTrash@ which the +-- 'UsersThreadsTrash' request conforms to. +type UsersThreadsTrashAPI = + Capture "userId" Text :> + "threads" :> + Capture "id" Text :> "trash" :> Post '[JSON] Thread + +-- | Moves the specified thread to the trash. +-- +-- /See:/ 'usersThreadsTrash' smart constructor. +data UsersThreadsTrash = UsersThreadsTrash + { _uttQuotaUser :: !(Maybe Text) + , _uttPrettyPrint :: !Bool + , _uttUserIp :: !(Maybe Text) + , _uttUserId :: !Text + , _uttKey :: !(Maybe Text) + , _uttId :: !Text + , _uttOauthToken :: !(Maybe Text) + , _uttFields :: !(Maybe Text) + , _uttAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsTrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uttQuotaUser' +-- +-- * 'uttPrettyPrint' +-- +-- * 'uttUserIp' +-- +-- * 'uttUserId' +-- +-- * 'uttKey' +-- +-- * 'uttId' +-- +-- * 'uttOauthToken' +-- +-- * 'uttFields' +-- +-- * 'uttAlt' +usersThreadsTrash + :: Text -- ^ 'id' + -> Text + -> UsersThreadsTrash +usersThreadsTrash pUttUserId_ pUttId_ = + UsersThreadsTrash + { _uttQuotaUser = Nothing + , _uttPrettyPrint = True + , _uttUserIp = Nothing + , _uttUserId = pUttUserId_ + , _uttKey = Nothing + , _uttId = pUttId_ + , _uttOauthToken = Nothing + , _uttFields = Nothing + , _uttAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uttQuotaUser :: Lens' UsersThreadsTrash' (Maybe Text) +uttQuotaUser + = lens _uttQuotaUser (\ s a -> s{_uttQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uttPrettyPrint :: Lens' UsersThreadsTrash' Bool +uttPrettyPrint + = lens _uttPrettyPrint + (\ s a -> s{_uttPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uttUserIp :: Lens' UsersThreadsTrash' (Maybe Text) +uttUserIp + = lens _uttUserIp (\ s a -> s{_uttUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uttUserId :: Lens' UsersThreadsTrash' Text +uttUserId + = lens _uttUserId (\ s a -> s{_uttUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uttKey :: Lens' UsersThreadsTrash' (Maybe Text) +uttKey = lens _uttKey (\ s a -> s{_uttKey = a}) + +-- | The ID of the thread to Trash. +uttId :: Lens' UsersThreadsTrash' Text +uttId = lens _uttId (\ s a -> s{_uttId = a}) + +-- | OAuth 2.0 token for the current user. +uttOauthToken :: Lens' UsersThreadsTrash' (Maybe Text) +uttOauthToken + = lens _uttOauthToken + (\ s a -> s{_uttOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uttFields :: Lens' UsersThreadsTrash' (Maybe Text) +uttFields + = lens _uttFields (\ s a -> s{_uttFields = a}) + +-- | Data format for the response. +uttAlt :: Lens' UsersThreadsTrash' Text +uttAlt = lens _uttAlt (\ s a -> s{_uttAlt = a}) + +instance GoogleRequest UsersThreadsTrash' where + type Rs UsersThreadsTrash' = Thread + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsTrash{..} + = go _uttQuotaUser _uttPrettyPrint _uttUserIp + _uttUserId + _uttKey + _uttId + _uttOauthToken + _uttFields + _uttAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersThreadsTrashAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Untrash.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Untrash.hs new file mode 100644 index 000000000..57c1f7057 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Untrash.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Threads.Untrash +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the specified thread from the trash. +-- +-- /See:/ for @GmailUsersThreadsUntrash@. +module Gmail.Users.Threads.Untrash + ( + -- * REST Resource + UsersThreadsUntrashAPI + + -- * Creating a Request + , usersThreadsUntrash + , UsersThreadsUntrash + + -- * Request Lenses + , utuQuotaUser + , utuPrettyPrint + , utuUserIp + , utuUserId + , utuKey + , utuId + , utuOauthToken + , utuFields + , utuAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersThreadsUntrash@ which the +-- 'UsersThreadsUntrash' request conforms to. +type UsersThreadsUntrashAPI = + Capture "userId" Text :> + "threads" :> + Capture "id" Text :> "untrash" :> Post '[JSON] Thread + +-- | Removes the specified thread from the trash. +-- +-- /See:/ 'usersThreadsUntrash' smart constructor. +data UsersThreadsUntrash = UsersThreadsUntrash + { _utuQuotaUser :: !(Maybe Text) + , _utuPrettyPrint :: !Bool + , _utuUserIp :: !(Maybe Text) + , _utuUserId :: !Text + , _utuKey :: !(Maybe Text) + , _utuId :: !Text + , _utuOauthToken :: !(Maybe Text) + , _utuFields :: !(Maybe Text) + , _utuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersThreadsUntrash'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utuQuotaUser' +-- +-- * 'utuPrettyPrint' +-- +-- * 'utuUserIp' +-- +-- * 'utuUserId' +-- +-- * 'utuKey' +-- +-- * 'utuId' +-- +-- * 'utuOauthToken' +-- +-- * 'utuFields' +-- +-- * 'utuAlt' +usersThreadsUntrash + :: Text -- ^ 'id' + -> Text + -> UsersThreadsUntrash +usersThreadsUntrash pUtuUserId_ pUtuId_ = + UsersThreadsUntrash + { _utuQuotaUser = Nothing + , _utuPrettyPrint = True + , _utuUserIp = Nothing + , _utuUserId = pUtuUserId_ + , _utuKey = Nothing + , _utuId = pUtuId_ + , _utuOauthToken = Nothing + , _utuFields = Nothing + , _utuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +utuQuotaUser :: Lens' UsersThreadsUntrash' (Maybe Text) +utuQuotaUser + = lens _utuQuotaUser (\ s a -> s{_utuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +utuPrettyPrint :: Lens' UsersThreadsUntrash' Bool +utuPrettyPrint + = lens _utuPrettyPrint + (\ s a -> s{_utuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +utuUserIp :: Lens' UsersThreadsUntrash' (Maybe Text) +utuUserIp + = lens _utuUserIp (\ s a -> s{_utuUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +utuUserId :: Lens' UsersThreadsUntrash' Text +utuUserId + = lens _utuUserId (\ s a -> s{_utuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +utuKey :: Lens' UsersThreadsUntrash' (Maybe Text) +utuKey = lens _utuKey (\ s a -> s{_utuKey = a}) + +-- | The ID of the thread to remove from Trash. +utuId :: Lens' UsersThreadsUntrash' Text +utuId = lens _utuId (\ s a -> s{_utuId = a}) + +-- | OAuth 2.0 token for the current user. +utuOauthToken :: Lens' UsersThreadsUntrash' (Maybe Text) +utuOauthToken + = lens _utuOauthToken + (\ s a -> s{_utuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +utuFields :: Lens' UsersThreadsUntrash' (Maybe Text) +utuFields + = lens _utuFields (\ s a -> s{_utuFields = a}) + +-- | Data format for the response. +utuAlt :: Lens' UsersThreadsUntrash' Text +utuAlt = lens _utuAlt (\ s a -> s{_utuAlt = a}) + +instance GoogleRequest UsersThreadsUntrash' where + type Rs UsersThreadsUntrash' = Thread + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersThreadsUntrash{..} + = go _utuQuotaUser _utuPrettyPrint _utuUserIp + _utuUserId + _utuKey + _utuId + _utuOauthToken + _utuFields + _utuAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersThreadsUntrashAPI) + r + u diff --git a/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Watch.hs b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Watch.hs new file mode 100644 index 000000000..9aba66157 --- /dev/null +++ b/gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Watch.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Gmail.Users.Watch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Set up or update a push notification watch on the given user mailbox. +-- +-- /See:/ for @GmailUsersWatch@. +module Gmail.Users.Watch + ( + -- * REST Resource + UsersWatchAPI + + -- * Creating a Request + , usersWatch + , UsersWatch + + -- * Request Lenses + , uwQuotaUser + , uwPrettyPrint + , uwUserIp + , uwUserId + , uwKey + , uwOauthToken + , uwFields + , uwAlt + ) where + +import Network.Google.Gmail.Types +import Network.Google.Prelude + +-- | A resource alias for @GmailUsersWatch@ which the +-- 'UsersWatch' request conforms to. +type UsersWatchAPI = + Capture "userId" Text :> + "watch" :> Post '[JSON] WatchResponse + +-- | Set up or update a push notification watch on the given user mailbox. +-- +-- /See:/ 'usersWatch' smart constructor. +data UsersWatch = UsersWatch + { _uwQuotaUser :: !(Maybe Text) + , _uwPrettyPrint :: !Bool + , _uwUserIp :: !(Maybe Text) + , _uwUserId :: !Text + , _uwKey :: !(Maybe Text) + , _uwOauthToken :: !(Maybe Text) + , _uwFields :: !(Maybe Text) + , _uwAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersWatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uwQuotaUser' +-- +-- * 'uwPrettyPrint' +-- +-- * 'uwUserIp' +-- +-- * 'uwUserId' +-- +-- * 'uwKey' +-- +-- * 'uwOauthToken' +-- +-- * 'uwFields' +-- +-- * 'uwAlt' +usersWatch + :: Text + -> UsersWatch +usersWatch pUwUserId_ = + UsersWatch + { _uwQuotaUser = Nothing + , _uwPrettyPrint = True + , _uwUserIp = Nothing + , _uwUserId = pUwUserId_ + , _uwKey = Nothing + , _uwOauthToken = Nothing + , _uwFields = Nothing + , _uwAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uwQuotaUser :: Lens' UsersWatch' (Maybe Text) +uwQuotaUser + = lens _uwQuotaUser (\ s a -> s{_uwQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uwPrettyPrint :: Lens' UsersWatch' Bool +uwPrettyPrint + = lens _uwPrettyPrint + (\ s a -> s{_uwPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uwUserIp :: Lens' UsersWatch' (Maybe Text) +uwUserIp = lens _uwUserIp (\ s a -> s{_uwUserIp = a}) + +-- | The user\'s email address. The special value me can be used to indicate +-- the authenticated user. +uwUserId :: Lens' UsersWatch' Text +uwUserId = lens _uwUserId (\ s a -> s{_uwUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uwKey :: Lens' UsersWatch' (Maybe Text) +uwKey = lens _uwKey (\ s a -> s{_uwKey = a}) + +-- | OAuth 2.0 token for the current user. +uwOauthToken :: Lens' UsersWatch' (Maybe Text) +uwOauthToken + = lens _uwOauthToken (\ s a -> s{_uwOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uwFields :: Lens' UsersWatch' (Maybe Text) +uwFields = lens _uwFields (\ s a -> s{_uwFields = a}) + +-- | Data format for the response. +uwAlt :: Lens' UsersWatch' Text +uwAlt = lens _uwAlt (\ s a -> s{_uwAlt = a}) + +instance GoogleRequest UsersWatch' where + type Rs UsersWatch' = WatchResponse + request = requestWithRoute defReq gmailURL + requestWithRoute r u UsersWatch{..} + = go _uwQuotaUser _uwPrettyPrint _uwUserIp _uwUserId + _uwKey + _uwOauthToken + _uwFields + _uwAlt + where go + = clientWithRoute (Proxy :: Proxy UsersWatchAPI) r u diff --git a/gogol-gmail/gogol-gmail.cabal b/gogol-gmail/gogol-gmail.cabal new file mode 100644 index 000000000..432745bd5 --- /dev/null +++ b/gogol-gmail/gogol-gmail.cabal @@ -0,0 +1,74 @@ +name: gogol-gmail +version: 0.0.1 +synopsis: Gmail API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Gmail REST API. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Gmail + , Network.Google.Gmail.Types + , Network.Google.Resource.Gmail.Users.Drafts.Create + , Network.Google.Resource.Gmail.Users.Drafts.Delete + , Network.Google.Resource.Gmail.Users.Drafts.Get + , Network.Google.Resource.Gmail.Users.Drafts.List + , Network.Google.Resource.Gmail.Users.Drafts.Send + , Network.Google.Resource.Gmail.Users.Drafts.Update + , Network.Google.Resource.Gmail.Users.GetProfile + , Network.Google.Resource.Gmail.Users.History.List + , Network.Google.Resource.Gmail.Users.Labels.Create + , Network.Google.Resource.Gmail.Users.Labels.Delete + , Network.Google.Resource.Gmail.Users.Labels.Get + , Network.Google.Resource.Gmail.Users.Labels.List + , Network.Google.Resource.Gmail.Users.Labels.Patch + , Network.Google.Resource.Gmail.Users.Labels.Update + , Network.Google.Resource.Gmail.Users.Messages.Attachments.Get + , Network.Google.Resource.Gmail.Users.Messages.Delete + , Network.Google.Resource.Gmail.Users.Messages.Get + , Network.Google.Resource.Gmail.Users.Messages.Import + , Network.Google.Resource.Gmail.Users.Messages.Insert + , Network.Google.Resource.Gmail.Users.Messages.List + , Network.Google.Resource.Gmail.Users.Messages.Modify + , Network.Google.Resource.Gmail.Users.Messages.Send + , Network.Google.Resource.Gmail.Users.Messages.Trash + , Network.Google.Resource.Gmail.Users.Messages.Untrash + , Network.Google.Resource.Gmail.Users.Stop + , Network.Google.Resource.Gmail.Users.Threads.Delete + , Network.Google.Resource.Gmail.Users.Threads.Get + , Network.Google.Resource.Gmail.Users.Threads.List + , Network.Google.Resource.Gmail.Users.Threads.Modify + , Network.Google.Resource.Gmail.Users.Threads.Trash + , Network.Google.Resource.Gmail.Users.Threads.Untrash + , Network.Google.Resource.Gmail.Users.Watch + + other-modules: + Network.Google.Gmail.Types.Product + , Network.Google.Gmail.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-gmail/src/.gitkeep b/gogol-gmail/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-groups-migration/LICENSE b/gogol-groups-migration/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-groups-migration/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-groups-migration/Makefile b/gogol-groups-migration/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-groups-migration/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-groups-migration/README.md b/gogol-groups-migration/README.md new file mode 100644 index 000000000..79a7e83dd --- /dev/null +++ b/gogol-groups-migration/README.md @@ -0,0 +1,28 @@ +# gogol-groups-migration + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Groups Settings API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-groups-migration` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-groups-migration/Setup.hs b/gogol-groups-migration/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-groups-migration/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-groups-migration/gen/Network/Google/GroupsMigration.hs b/gogol-groups-migration/gen/Network/Google/GroupsMigration.hs new file mode 100644 index 000000000..b10fbc1b2 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsMigration.hs @@ -0,0 +1,52 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.GroupsMigration +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Groups Migration Api. +-- +-- /See:/ +module Network.Google.GroupsMigration + ( + -- * API + GroupsMigrationAPI + , groupsMigrationAPI + , groupsMigrationURL + + -- * Service Methods + + -- * REST Resources + + -- ** GroupsmigrationArchiveInsert + , module GroupsMigration.Archive.Insert + + -- * Types + + -- ** Groups + , Groups + , groups + , gKind + , gResponseCode + ) where + +import Network.Google.GroupsMigration.Types +import Network.Google.Prelude +import Network.Google.Resource.GroupsMigration.Archive.Insert + +{- $resources +TODO +-} + +type GroupsMigrationAPI = Archive + +groupsMigrationAPI :: Proxy GroupsMigrationAPI +groupsMigrationAPI = Proxy diff --git a/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types.hs b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types.hs new file mode 100644 index 000000000..b33d9aac0 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types.hs @@ -0,0 +1,36 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsMigration.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsMigration.Types + ( + -- * Service URL + groupsMigrationURL + + -- * Groups + , Groups + , groups + , gKind + , gResponseCode + ) where + +import Network.Google.GroupsMigration.Types.Product +import Network.Google.GroupsMigration.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Groups Migration API. +groupsMigrationURL :: BaseURL +groupsMigrationURL + = BaseUrl Https + "https://www.googleapis.com/groups/v1/groups/" + 443 diff --git a/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Product.hs b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Product.hs new file mode 100644 index 000000000..72d467935 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Product.hs @@ -0,0 +1,67 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsMigration.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsMigration.Types.Product where + +import Network.Google.GroupsMigration.Types.Sum +import Network.Google.Prelude + +-- | JSON response template for groups migration API. +-- +-- /See:/ 'groups' smart constructor. +data Groups = Groups + { _gKind :: !Text + , _gResponseCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Groups' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gKind' +-- +-- * 'gResponseCode' +groups + :: Groups +groups = + Groups + { _gKind = "groupsmigration#groups" + , _gResponseCode = Nothing + } + +-- | The kind of insert resource this is. +gKind :: Lens' Groups Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +-- | The status of the insert request. +gResponseCode :: Lens' Groups (Maybe Text) +gResponseCode + = lens _gResponseCode + (\ s a -> s{_gResponseCode = a}) + +instance FromJSON Groups where + parseJSON + = withObject "Groups" + (\ o -> + Groups <$> + (o .:? "kind" .!= "groupsmigration#groups") <*> + (o .:? "responseCode")) + +instance ToJSON Groups where + toJSON Groups{..} + = object + (catMaybes + [Just ("kind" .= _gKind), + ("responseCode" .=) <$> _gResponseCode]) diff --git a/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Sum.hs b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Sum.hs new file mode 100644 index 000000000..5abc5dfc2 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsMigration/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsMigration.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsMigration.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-groups-migration/gen/Network/Google/GroupsSettings.hs b/gogol-groups-migration/gen/Network/Google/GroupsSettings.hs new file mode 100644 index 000000000..43df1dc62 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsSettings.hs @@ -0,0 +1,86 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.GroupsSettings +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you manage permission levels and related settings of a group. +-- +-- /See:/ +module Network.Google.GroupsSettings + ( + -- * API + GroupsSettingsAPI + , groupsSettingsAPI + , groupsSettingsURL + + -- * Service Methods + + -- * REST Resources + + -- ** GroupsSettingsGroupsGet + , module GroupsSettings.Groups.Get + + -- ** GroupsSettingsGroupsPatch + , module GroupsSettings.Groups.Patch + + -- ** GroupsSettingsGroupsUpdate + , module GroupsSettings.Groups.Update + + -- * Types + + -- ** Groups + , Groups + , groups + , gEmail + , gSendMessageDenyNotification + , gWhoCanPostMessage + , gAllowExternalMembers + , gShowInGroupDirectory + , gSpamModerationLevel + , gKind + , gWhoCanViewMembership + , gMembersCanPostAsTheGroup + , gWhoCanViewGroup + , gWhoCanJoin + , gArchiveOnly + , gMaxMessageBytes + , gReplyTo + , gMessageModerationLevel + , gIncludeInGlobalAddressList + , gIsArchived + , gName + , gMessageDisplayFont + , gCustomReplyTo + , gWhoCanContactOwner + , gWhoCanInvite + , gWhoCanLeaveGroup + , gAllowGoogleCommunication + , gPrimaryLanguage + , gDescription + , gDefaultMessageDenyNotificationText + , gAllowWebPosting + ) where + +import Network.Google.GroupsSettings.Types +import Network.Google.Prelude +import Network.Google.Resource.GroupsSettings.Groups.Get +import Network.Google.Resource.GroupsSettings.Groups.Patch +import Network.Google.Resource.GroupsSettings.Groups.Update + +{- $resources +TODO +-} + +type GroupsSettingsAPI = Groups + +groupsSettingsAPI :: Proxy GroupsSettingsAPI +groupsSettingsAPI = Proxy diff --git a/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types.hs b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types.hs new file mode 100644 index 000000000..cb3f976a7 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types.hs @@ -0,0 +1,62 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsSettings.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsSettings.Types + ( + -- * Service URL + groupsSettingsURL + + -- * Groups + , Groups + , groups + , gEmail + , gSendMessageDenyNotification + , gWhoCanPostMessage + , gAllowExternalMembers + , gShowInGroupDirectory + , gSpamModerationLevel + , gKind + , gWhoCanViewMembership + , gMembersCanPostAsTheGroup + , gWhoCanViewGroup + , gWhoCanJoin + , gArchiveOnly + , gMaxMessageBytes + , gReplyTo + , gMessageModerationLevel + , gIncludeInGlobalAddressList + , gIsArchived + , gName + , gMessageDisplayFont + , gCustomReplyTo + , gWhoCanContactOwner + , gWhoCanInvite + , gWhoCanLeaveGroup + , gAllowGoogleCommunication + , gPrimaryLanguage + , gDescription + , gDefaultMessageDenyNotificationText + , gAllowWebPosting + ) where + +import Network.Google.GroupsSettings.Types.Product +import Network.Google.GroupsSettings.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Groups Settings API. +groupsSettingsURL :: BaseURL +groupsSettingsURL + = BaseUrl Https + "https://www.googleapis.com/groups/v1/groups/" + 443 diff --git a/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Product.hs b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Product.hs new file mode 100644 index 000000000..424201ffc --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Product.hs @@ -0,0 +1,394 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsSettings.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsSettings.Types.Product where + +import Network.Google.GroupsSettings.Types.Sum +import Network.Google.Prelude + +-- | JSON template for Group resource +-- +-- /See:/ 'groups' smart constructor. +data Groups = Groups + { _gEmail :: !(Maybe Text) + , _gSendMessageDenyNotification :: !(Maybe Text) + , _gWhoCanPostMessage :: !(Maybe Text) + , _gAllowExternalMembers :: !(Maybe Text) + , _gShowInGroupDirectory :: !(Maybe Text) + , _gSpamModerationLevel :: !(Maybe Text) + , _gKind :: !Text + , _gWhoCanViewMembership :: !(Maybe Text) + , _gMembersCanPostAsTheGroup :: !(Maybe Text) + , _gWhoCanViewGroup :: !(Maybe Text) + , _gWhoCanJoin :: !(Maybe Text) + , _gArchiveOnly :: !(Maybe Text) + , _gMaxMessageBytes :: !(Maybe Int32) + , _gReplyTo :: !(Maybe Text) + , _gMessageModerationLevel :: !(Maybe Text) + , _gIncludeInGlobalAddressList :: !(Maybe Text) + , _gIsArchived :: !(Maybe Text) + , _gName :: !(Maybe Text) + , _gMessageDisplayFont :: !(Maybe Text) + , _gCustomReplyTo :: !(Maybe Text) + , _gWhoCanContactOwner :: !(Maybe Text) + , _gWhoCanInvite :: !(Maybe Text) + , _gWhoCanLeaveGroup :: !(Maybe Text) + , _gAllowGoogleCommunication :: !(Maybe Text) + , _gPrimaryLanguage :: !(Maybe Text) + , _gDescription :: !(Maybe Text) + , _gDefaultMessageDenyNotificationText :: !(Maybe Text) + , _gAllowWebPosting :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Groups' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gEmail' +-- +-- * 'gSendMessageDenyNotification' +-- +-- * 'gWhoCanPostMessage' +-- +-- * 'gAllowExternalMembers' +-- +-- * 'gShowInGroupDirectory' +-- +-- * 'gSpamModerationLevel' +-- +-- * 'gKind' +-- +-- * 'gWhoCanViewMembership' +-- +-- * 'gMembersCanPostAsTheGroup' +-- +-- * 'gWhoCanViewGroup' +-- +-- * 'gWhoCanJoin' +-- +-- * 'gArchiveOnly' +-- +-- * 'gMaxMessageBytes' +-- +-- * 'gReplyTo' +-- +-- * 'gMessageModerationLevel' +-- +-- * 'gIncludeInGlobalAddressList' +-- +-- * 'gIsArchived' +-- +-- * 'gName' +-- +-- * 'gMessageDisplayFont' +-- +-- * 'gCustomReplyTo' +-- +-- * 'gWhoCanContactOwner' +-- +-- * 'gWhoCanInvite' +-- +-- * 'gWhoCanLeaveGroup' +-- +-- * 'gAllowGoogleCommunication' +-- +-- * 'gPrimaryLanguage' +-- +-- * 'gDescription' +-- +-- * 'gDefaultMessageDenyNotificationText' +-- +-- * 'gAllowWebPosting' +groups + :: Groups +groups = + Groups + { _gEmail = Nothing + , _gSendMessageDenyNotification = Nothing + , _gWhoCanPostMessage = Nothing + , _gAllowExternalMembers = Nothing + , _gShowInGroupDirectory = Nothing + , _gSpamModerationLevel = Nothing + , _gKind = "groupsSettings#groups" + , _gWhoCanViewMembership = Nothing + , _gMembersCanPostAsTheGroup = Nothing + , _gWhoCanViewGroup = Nothing + , _gWhoCanJoin = Nothing + , _gArchiveOnly = Nothing + , _gMaxMessageBytes = Nothing + , _gReplyTo = Nothing + , _gMessageModerationLevel = Nothing + , _gIncludeInGlobalAddressList = Nothing + , _gIsArchived = Nothing + , _gName = Nothing + , _gMessageDisplayFont = Nothing + , _gCustomReplyTo = Nothing + , _gWhoCanContactOwner = Nothing + , _gWhoCanInvite = Nothing + , _gWhoCanLeaveGroup = Nothing + , _gAllowGoogleCommunication = Nothing + , _gPrimaryLanguage = Nothing + , _gDescription = Nothing + , _gDefaultMessageDenyNotificationText = Nothing + , _gAllowWebPosting = Nothing + } + +-- | Email id of the group +gEmail :: Lens' Groups (Maybe Text) +gEmail = lens _gEmail (\ s a -> s{_gEmail = a}) + +-- | Should the member be notified if his message is denied by owner. +gSendMessageDenyNotification :: Lens' Groups (Maybe Text) +gSendMessageDenyNotification + = lens _gSendMessageDenyNotification + (\ s a -> s{_gSendMessageDenyNotification = a}) + +-- | Permissions to post messages to the group. Possible values are: +-- NONE_CAN_POST ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST +-- ALL_IN_DOMAIN_CAN_POST ANYONE_CAN_POST +gWhoCanPostMessage :: Lens' Groups (Maybe Text) +gWhoCanPostMessage + = lens _gWhoCanPostMessage + (\ s a -> s{_gWhoCanPostMessage = a}) + +-- | Are external members allowed to join the group. +gAllowExternalMembers :: Lens' Groups (Maybe Text) +gAllowExternalMembers + = lens _gAllowExternalMembers + (\ s a -> s{_gAllowExternalMembers = a}) + +-- | Is the group listed in groups directory +gShowInGroupDirectory :: Lens' Groups (Maybe Text) +gShowInGroupDirectory + = lens _gShowInGroupDirectory + (\ s a -> s{_gShowInGroupDirectory = a}) + +-- | Moderation level for messages detected as spam. Possible values are: +-- ALLOW MODERATE SILENTLY_MODERATE REJECT +gSpamModerationLevel :: Lens' Groups (Maybe Text) +gSpamModerationLevel + = lens _gSpamModerationLevel + (\ s a -> s{_gSpamModerationLevel = a}) + +-- | The type of the resource. +gKind :: Lens' Groups Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +-- | Permissions to view membership. Possbile values are: +-- ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +gWhoCanViewMembership :: Lens' Groups (Maybe Text) +gWhoCanViewMembership + = lens _gWhoCanViewMembership + (\ s a -> s{_gWhoCanViewMembership = a}) + +-- | Can members post using the group email address. +gMembersCanPostAsTheGroup :: Lens' Groups (Maybe Text) +gMembersCanPostAsTheGroup + = lens _gMembersCanPostAsTheGroup + (\ s a -> s{_gMembersCanPostAsTheGroup = a}) + +-- | Permissions to view group. Possbile values are: ANYONE_CAN_VIEW +-- ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW +gWhoCanViewGroup :: Lens' Groups (Maybe Text) +gWhoCanViewGroup + = lens _gWhoCanViewGroup + (\ s a -> s{_gWhoCanViewGroup = a}) + +-- | Permissions to join the group. Possible values are: ANYONE_CAN_JOIN +-- ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN +gWhoCanJoin :: Lens' Groups (Maybe Text) +gWhoCanJoin + = lens _gWhoCanJoin (\ s a -> s{_gWhoCanJoin = a}) + +-- | If the group is archive only +gArchiveOnly :: Lens' Groups (Maybe Text) +gArchiveOnly + = lens _gArchiveOnly (\ s a -> s{_gArchiveOnly = a}) + +-- | Maximum message size allowed. +gMaxMessageBytes :: Lens' Groups (Maybe Int32) +gMaxMessageBytes + = lens _gMaxMessageBytes + (\ s a -> s{_gMaxMessageBytes = a}) + +-- | Whome should the default reply to a message go to. Possible values are: +-- REPLY_TO_CUSTOM REPLY_TO_SENDER REPLY_TO_LIST REPLY_TO_OWNER +-- REPLY_TO_IGNORE REPLY_TO_MANAGERS +gReplyTo :: Lens' Groups (Maybe Text) +gReplyTo = lens _gReplyTo (\ s a -> s{_gReplyTo = a}) + +-- | Moderation level for messages. Possible values are: +-- MODERATE_ALL_MESSAGES MODERATE_NON_MEMBERS MODERATE_NEW_MEMBERS +-- MODERATE_NONE +gMessageModerationLevel :: Lens' Groups (Maybe Text) +gMessageModerationLevel + = lens _gMessageModerationLevel + (\ s a -> s{_gMessageModerationLevel = a}) + +-- | If this groups should be included in global address list or not. +gIncludeInGlobalAddressList :: Lens' Groups (Maybe Text) +gIncludeInGlobalAddressList + = lens _gIncludeInGlobalAddressList + (\ s a -> s{_gIncludeInGlobalAddressList = a}) + +-- | If the contents of the group are archived. +gIsArchived :: Lens' Groups (Maybe Text) +gIsArchived + = lens _gIsArchived (\ s a -> s{_gIsArchived = a}) + +-- | Name of the Group +gName :: Lens' Groups (Maybe Text) +gName = lens _gName (\ s a -> s{_gName = a}) + +-- | Default message display font. Possible values are: DEFAULT_FONT +-- FIXED_WIDTH_FONT +gMessageDisplayFont :: Lens' Groups (Maybe Text) +gMessageDisplayFont + = lens _gMessageDisplayFont + (\ s a -> s{_gMessageDisplayFont = a}) + +-- | Default email to which reply to any message should go. +gCustomReplyTo :: Lens' Groups (Maybe Text) +gCustomReplyTo + = lens _gCustomReplyTo + (\ s a -> s{_gCustomReplyTo = a}) + +-- | Permission to contact owner of the group via web UI. Possbile values +-- are: ANYONE_CAN_CONTACT ALL_IN_DOMAIN_CAN_CONTACT +-- ALL_MEMBERS_CAN_CONTACT ALL_MANAGERS_CAN_CONTACT +gWhoCanContactOwner :: Lens' Groups (Maybe Text) +gWhoCanContactOwner + = lens _gWhoCanContactOwner + (\ s a -> s{_gWhoCanContactOwner = a}) + +-- | Permissions to invite members. Possbile values are: +-- ALL_MEMBERS_CAN_INVITE ALL_MANAGERS_CAN_INVITE +gWhoCanInvite :: Lens' Groups (Maybe Text) +gWhoCanInvite + = lens _gWhoCanInvite + (\ s a -> s{_gWhoCanInvite = a}) + +-- | Permission to leave the group. Possible values are: +-- ALL_MANAGERS_CAN_LEAVE ALL_MEMBERS_CAN_LEAVE +gWhoCanLeaveGroup :: Lens' Groups (Maybe Text) +gWhoCanLeaveGroup + = lens _gWhoCanLeaveGroup + (\ s a -> s{_gWhoCanLeaveGroup = a}) + +-- | Is google allowed to contact admins. +gAllowGoogleCommunication :: Lens' Groups (Maybe Text) +gAllowGoogleCommunication + = lens _gAllowGoogleCommunication + (\ s a -> s{_gAllowGoogleCommunication = a}) + +-- | Primary language for the group. +gPrimaryLanguage :: Lens' Groups (Maybe Text) +gPrimaryLanguage + = lens _gPrimaryLanguage + (\ s a -> s{_gPrimaryLanguage = a}) + +-- | Description of the group +gDescription :: Lens' Groups (Maybe Text) +gDescription + = lens _gDescription (\ s a -> s{_gDescription = a}) + +-- | Default message deny notification message +gDefaultMessageDenyNotificationText :: Lens' Groups (Maybe Text) +gDefaultMessageDenyNotificationText + = lens _gDefaultMessageDenyNotificationText + (\ s a -> + s{_gDefaultMessageDenyNotificationText = a}) + +-- | If posting from web is allowed. +gAllowWebPosting :: Lens' Groups (Maybe Text) +gAllowWebPosting + = lens _gAllowWebPosting + (\ s a -> s{_gAllowWebPosting = a}) + +instance FromJSON Groups where + parseJSON + = withObject "Groups" + (\ o -> + Groups <$> + (o .:? "email") <*> + (o .:? "sendMessageDenyNotification") + <*> (o .:? "whoCanPostMessage") + <*> (o .:? "allowExternalMembers") + <*> (o .:? "showInGroupDirectory") + <*> (o .:? "spamModerationLevel") + <*> (o .:? "kind" .!= "groupsSettings#groups") + <*> (o .:? "whoCanViewMembership") + <*> (o .:? "membersCanPostAsTheGroup") + <*> (o .:? "whoCanViewGroup") + <*> (o .:? "whoCanJoin") + <*> (o .:? "archiveOnly") + <*> (o .:? "maxMessageBytes") + <*> (o .:? "replyTo") + <*> (o .:? "messageModerationLevel") + <*> (o .:? "includeInGlobalAddressList") + <*> (o .:? "isArchived") + <*> (o .:? "name") + <*> (o .:? "messageDisplayFont") + <*> (o .:? "customReplyTo") + <*> (o .:? "whoCanContactOwner") + <*> (o .:? "whoCanInvite") + <*> (o .:? "whoCanLeaveGroup") + <*> (o .:? "allowGoogleCommunication") + <*> (o .:? "primaryLanguage") + <*> (o .:? "description") + <*> (o .:? "defaultMessageDenyNotificationText") + <*> (o .:? "allowWebPosting")) + +instance ToJSON Groups where + toJSON Groups{..} + = object + (catMaybes + [("email" .=) <$> _gEmail, + ("sendMessageDenyNotification" .=) <$> + _gSendMessageDenyNotification, + ("whoCanPostMessage" .=) <$> _gWhoCanPostMessage, + ("allowExternalMembers" .=) <$> + _gAllowExternalMembers, + ("showInGroupDirectory" .=) <$> + _gShowInGroupDirectory, + ("spamModerationLevel" .=) <$> _gSpamModerationLevel, + Just ("kind" .= _gKind), + ("whoCanViewMembership" .=) <$> + _gWhoCanViewMembership, + ("membersCanPostAsTheGroup" .=) <$> + _gMembersCanPostAsTheGroup, + ("whoCanViewGroup" .=) <$> _gWhoCanViewGroup, + ("whoCanJoin" .=) <$> _gWhoCanJoin, + ("archiveOnly" .=) <$> _gArchiveOnly, + ("maxMessageBytes" .=) <$> _gMaxMessageBytes, + ("replyTo" .=) <$> _gReplyTo, + ("messageModerationLevel" .=) <$> + _gMessageModerationLevel, + ("includeInGlobalAddressList" .=) <$> + _gIncludeInGlobalAddressList, + ("isArchived" .=) <$> _gIsArchived, + ("name" .=) <$> _gName, + ("messageDisplayFont" .=) <$> _gMessageDisplayFont, + ("customReplyTo" .=) <$> _gCustomReplyTo, + ("whoCanContactOwner" .=) <$> _gWhoCanContactOwner, + ("whoCanInvite" .=) <$> _gWhoCanInvite, + ("whoCanLeaveGroup" .=) <$> _gWhoCanLeaveGroup, + ("allowGoogleCommunication" .=) <$> + _gAllowGoogleCommunication, + ("primaryLanguage" .=) <$> _gPrimaryLanguage, + ("description" .=) <$> _gDescription, + ("defaultMessageDenyNotificationText" .=) <$> + _gDefaultMessageDenyNotificationText, + ("allowWebPosting" .=) <$> _gAllowWebPosting]) diff --git a/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Sum.hs b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Sum.hs new file mode 100644 index 000000000..f66e0034e --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/GroupsSettings/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.GroupsSettings.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.GroupsSettings.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-groups-migration/gen/Network/Google/Resource/GroupsMigration/Archive/Insert.hs b/gogol-groups-migration/gen/Network/Google/Resource/GroupsMigration/Archive/Insert.hs new file mode 100644 index 000000000..c490b738b --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/Resource/GroupsMigration/Archive/Insert.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GroupsMigration.Archive.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new mail into the archive of the Google group. +-- +-- /See:/ for @GroupsmigrationArchiveInsert@. +module GroupsMigration.Archive.Insert + ( + -- * REST Resource + ArchiveInsertAPI + + -- * Creating a Request + , archiveInsert + , ArchiveInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiUserIp + , aiKey + , aiGroupId + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.GroupsMigration.Types +import Network.Google.Prelude + +-- | A resource alias for @GroupsmigrationArchiveInsert@ which the +-- 'ArchiveInsert' request conforms to. +type ArchiveInsertAPI = + Capture "groupId" Text :> + "archive" :> Post '[JSON] Groups + +-- | Inserts a new mail into the archive of the Google group. +-- +-- /See:/ 'archiveInsert' smart constructor. +data ArchiveInsert = ArchiveInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiKey :: !(Maybe Text) + , _aiGroupId :: !Text + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ArchiveInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiKey' +-- +-- * 'aiGroupId' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +archiveInsert + :: Text -- ^ 'groupId' + -> ArchiveInsert +archiveInsert pAiGroupId_ = + ArchiveInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiKey = Nothing + , _aiGroupId = pAiGroupId_ + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' ArchiveInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' ArchiveInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' ArchiveInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' ArchiveInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | The group ID +aiGroupId :: Lens' ArchiveInsert' Text +aiGroupId + = lens _aiGroupId (\ s a -> s{_aiGroupId = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' ArchiveInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' ArchiveInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' ArchiveInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest ArchiveInsert' where + type Rs ArchiveInsert' = Groups + request = requestWithRoute defReq groupsMigrationURL + requestWithRoute r u ArchiveInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiUserIp _aiKey + _aiGroupId + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute (Proxy :: Proxy ArchiveInsertAPI) r + u diff --git a/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Get.hs b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Get.hs new file mode 100644 index 000000000..8cea341b6 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GroupsSettings.Groups.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets one resource by id. +-- +-- /See:/ for @GroupsSettingsGroupsGet@. +module GroupsSettings.Groups.Get + ( + -- * REST Resource + GroupsGetAPI + + -- * Creating a Request + , groupsGet + , GroupsGet + + -- * Request Lenses + , ggQuotaUser + , ggPrettyPrint + , ggUserIp + , ggKey + , ggOauthToken + , ggGroupUniqueId + , ggFields + , ggAlt + ) where + +import Network.Google.GroupsSettings.Types +import Network.Google.Prelude + +-- | A resource alias for @GroupsSettingsGroupsGet@ which the +-- 'GroupsGet' request conforms to. +type GroupsGetAPI = + Capture "groupUniqueId" Text :> Get '[JSON] Groups + +-- | Gets one resource by id. +-- +-- /See:/ 'groupsGet' smart constructor. +data GroupsGet = GroupsGet + { _ggQuotaUser :: !(Maybe Text) + , _ggPrettyPrint :: !Bool + , _ggUserIp :: !(Maybe Text) + , _ggKey :: !(Maybe Text) + , _ggOauthToken :: !(Maybe Text) + , _ggGroupUniqueId :: !Text + , _ggFields :: !(Maybe Text) + , _ggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ggQuotaUser' +-- +-- * 'ggPrettyPrint' +-- +-- * 'ggUserIp' +-- +-- * 'ggKey' +-- +-- * 'ggOauthToken' +-- +-- * 'ggGroupUniqueId' +-- +-- * 'ggFields' +-- +-- * 'ggAlt' +groupsGet + :: Text -- ^ 'groupUniqueId' + -> GroupsGet +groupsGet pGgGroupUniqueId_ = + GroupsGet + { _ggQuotaUser = Nothing + , _ggPrettyPrint = True + , _ggUserIp = Nothing + , _ggKey = Nothing + , _ggOauthToken = Nothing + , _ggGroupUniqueId = pGgGroupUniqueId_ + , _ggFields = Nothing + , _ggAlt = "atom" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ggQuotaUser :: Lens' GroupsGet' (Maybe Text) +ggQuotaUser + = lens _ggQuotaUser (\ s a -> s{_ggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ggPrettyPrint :: Lens' GroupsGet' Bool +ggPrettyPrint + = lens _ggPrettyPrint + (\ s a -> s{_ggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ggUserIp :: Lens' GroupsGet' (Maybe Text) +ggUserIp = lens _ggUserIp (\ s a -> s{_ggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ggKey :: Lens' GroupsGet' (Maybe Text) +ggKey = lens _ggKey (\ s a -> s{_ggKey = a}) + +-- | OAuth 2.0 token for the current user. +ggOauthToken :: Lens' GroupsGet' (Maybe Text) +ggOauthToken + = lens _ggOauthToken (\ s a -> s{_ggOauthToken = a}) + +-- | The resource ID +ggGroupUniqueId :: Lens' GroupsGet' Text +ggGroupUniqueId + = lens _ggGroupUniqueId + (\ s a -> s{_ggGroupUniqueId = a}) + +-- | Selector specifying which fields to include in a partial response. +ggFields :: Lens' GroupsGet' (Maybe Text) +ggFields = lens _ggFields (\ s a -> s{_ggFields = a}) + +-- | Data format for the response. +ggAlt :: Lens' GroupsGet' Text +ggAlt = lens _ggAlt (\ s a -> s{_ggAlt = a}) + +instance GoogleRequest GroupsGet' where + type Rs GroupsGet' = Groups + request = requestWithRoute defReq groupsSettingsURL + requestWithRoute r u GroupsGet{..} + = go _ggQuotaUser _ggPrettyPrint _ggUserIp _ggKey + _ggOauthToken + _ggGroupUniqueId + _ggFields + _ggAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsGetAPI) r u diff --git a/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Patch.hs b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Patch.hs new file mode 100644 index 000000000..93b08d714 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Patch.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GroupsSettings.Groups.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing resource. This method supports patch semantics. +-- +-- /See:/ for @GroupsSettingsGroupsPatch@. +module GroupsSettings.Groups.Patch + ( + -- * REST Resource + GroupsPatchAPI + + -- * Creating a Request + , groupsPatch + , GroupsPatch + + -- * Request Lenses + , gpQuotaUser + , gpPrettyPrint + , gpUserIp + , gpKey + , gpOauthToken + , gpGroupUniqueId + , gpFields + , gpAlt + ) where + +import Network.Google.GroupsSettings.Types +import Network.Google.Prelude + +-- | A resource alias for @GroupsSettingsGroupsPatch@ which the +-- 'GroupsPatch' request conforms to. +type GroupsPatchAPI = + Capture "groupUniqueId" Text :> Patch '[JSON] Groups + +-- | Updates an existing resource. This method supports patch semantics. +-- +-- /See:/ 'groupsPatch' smart constructor. +data GroupsPatch = GroupsPatch + { _gpQuotaUser :: !(Maybe Text) + , _gpPrettyPrint :: !Bool + , _gpUserIp :: !(Maybe Text) + , _gpKey :: !(Maybe Text) + , _gpOauthToken :: !(Maybe Text) + , _gpGroupUniqueId :: !Text + , _gpFields :: !(Maybe Text) + , _gpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gpQuotaUser' +-- +-- * 'gpPrettyPrint' +-- +-- * 'gpUserIp' +-- +-- * 'gpKey' +-- +-- * 'gpOauthToken' +-- +-- * 'gpGroupUniqueId' +-- +-- * 'gpFields' +-- +-- * 'gpAlt' +groupsPatch + :: Text -- ^ 'groupUniqueId' + -> GroupsPatch +groupsPatch pGpGroupUniqueId_ = + GroupsPatch + { _gpQuotaUser = Nothing + , _gpPrettyPrint = True + , _gpUserIp = Nothing + , _gpKey = Nothing + , _gpOauthToken = Nothing + , _gpGroupUniqueId = pGpGroupUniqueId_ + , _gpFields = Nothing + , _gpAlt = "atom" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gpQuotaUser :: Lens' GroupsPatch' (Maybe Text) +gpQuotaUser + = lens _gpQuotaUser (\ s a -> s{_gpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gpPrettyPrint :: Lens' GroupsPatch' Bool +gpPrettyPrint + = lens _gpPrettyPrint + (\ s a -> s{_gpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gpUserIp :: Lens' GroupsPatch' (Maybe Text) +gpUserIp = lens _gpUserIp (\ s a -> s{_gpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gpKey :: Lens' GroupsPatch' (Maybe Text) +gpKey = lens _gpKey (\ s a -> s{_gpKey = a}) + +-- | OAuth 2.0 token for the current user. +gpOauthToken :: Lens' GroupsPatch' (Maybe Text) +gpOauthToken + = lens _gpOauthToken (\ s a -> s{_gpOauthToken = a}) + +-- | The resource ID +gpGroupUniqueId :: Lens' GroupsPatch' Text +gpGroupUniqueId + = lens _gpGroupUniqueId + (\ s a -> s{_gpGroupUniqueId = a}) + +-- | Selector specifying which fields to include in a partial response. +gpFields :: Lens' GroupsPatch' (Maybe Text) +gpFields = lens _gpFields (\ s a -> s{_gpFields = a}) + +-- | Data format for the response. +gpAlt :: Lens' GroupsPatch' Text +gpAlt = lens _gpAlt (\ s a -> s{_gpAlt = a}) + +instance GoogleRequest GroupsPatch' where + type Rs GroupsPatch' = Groups + request = requestWithRoute defReq groupsSettingsURL + requestWithRoute r u GroupsPatch{..} + = go _gpQuotaUser _gpPrettyPrint _gpUserIp _gpKey + _gpOauthToken + _gpGroupUniqueId + _gpFields + _gpAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsPatchAPI) r u diff --git a/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Update.hs b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Update.hs new file mode 100644 index 000000000..0bf4ea066 --- /dev/null +++ b/gogol-groups-migration/gen/Network/Google/Resource/GroupsSettings/Groups/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.GroupsSettings.Groups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing resource. +-- +-- /See:/ for @GroupsSettingsGroupsUpdate@. +module GroupsSettings.Groups.Update + ( + -- * REST Resource + GroupsUpdateAPI + + -- * Creating a Request + , groupsUpdate + , GroupsUpdate + + -- * Request Lenses + , guQuotaUser + , guPrettyPrint + , guUserIp + , guKey + , guOauthToken + , guGroupUniqueId + , guFields + , guAlt + ) where + +import Network.Google.GroupsSettings.Types +import Network.Google.Prelude + +-- | A resource alias for @GroupsSettingsGroupsUpdate@ which the +-- 'GroupsUpdate' request conforms to. +type GroupsUpdateAPI = + Capture "groupUniqueId" Text :> Put '[JSON] Groups + +-- | Updates an existing resource. +-- +-- /See:/ 'groupsUpdate' smart constructor. +data GroupsUpdate = GroupsUpdate + { _guQuotaUser :: !(Maybe Text) + , _guPrettyPrint :: !Bool + , _guUserIp :: !(Maybe Text) + , _guKey :: !(Maybe Text) + , _guOauthToken :: !(Maybe Text) + , _guGroupUniqueId :: !Text + , _guFields :: !(Maybe Text) + , _guAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'guQuotaUser' +-- +-- * 'guPrettyPrint' +-- +-- * 'guUserIp' +-- +-- * 'guKey' +-- +-- * 'guOauthToken' +-- +-- * 'guGroupUniqueId' +-- +-- * 'guFields' +-- +-- * 'guAlt' +groupsUpdate + :: Text -- ^ 'groupUniqueId' + -> GroupsUpdate +groupsUpdate pGuGroupUniqueId_ = + GroupsUpdate + { _guQuotaUser = Nothing + , _guPrettyPrint = True + , _guUserIp = Nothing + , _guKey = Nothing + , _guOauthToken = Nothing + , _guGroupUniqueId = pGuGroupUniqueId_ + , _guFields = Nothing + , _guAlt = "atom" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +guQuotaUser :: Lens' GroupsUpdate' (Maybe Text) +guQuotaUser + = lens _guQuotaUser (\ s a -> s{_guQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +guPrettyPrint :: Lens' GroupsUpdate' Bool +guPrettyPrint + = lens _guPrettyPrint + (\ s a -> s{_guPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +guUserIp :: Lens' GroupsUpdate' (Maybe Text) +guUserIp = lens _guUserIp (\ s a -> s{_guUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +guKey :: Lens' GroupsUpdate' (Maybe Text) +guKey = lens _guKey (\ s a -> s{_guKey = a}) + +-- | OAuth 2.0 token for the current user. +guOauthToken :: Lens' GroupsUpdate' (Maybe Text) +guOauthToken + = lens _guOauthToken (\ s a -> s{_guOauthToken = a}) + +-- | The resource ID +guGroupUniqueId :: Lens' GroupsUpdate' Text +guGroupUniqueId + = lens _guGroupUniqueId + (\ s a -> s{_guGroupUniqueId = a}) + +-- | Selector specifying which fields to include in a partial response. +guFields :: Lens' GroupsUpdate' (Maybe Text) +guFields = lens _guFields (\ s a -> s{_guFields = a}) + +-- | Data format for the response. +guAlt :: Lens' GroupsUpdate' Text +guAlt = lens _guAlt (\ s a -> s{_guAlt = a}) + +instance GoogleRequest GroupsUpdate' where + type Rs GroupsUpdate' = Groups + request = requestWithRoute defReq groupsSettingsURL + requestWithRoute r u GroupsUpdate{..} + = go _guQuotaUser _guPrettyPrint _guUserIp _guKey + _guOauthToken + _guGroupUniqueId + _guFields + _guAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsUpdateAPI) r + u diff --git a/gogol-groups-migration/gogol-groups-migration.cabal b/gogol-groups-migration/gogol-groups-migration.cabal new file mode 100644 index 000000000..e924c51ce --- /dev/null +++ b/gogol-groups-migration/gogol-groups-migration.cabal @@ -0,0 +1,45 @@ +name: gogol-groups-migration +version: 0.0.1 +synopsis: Groups Settings API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you manage permission levels and related settings of a group. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.GroupsSettings + , Network.Google.GroupsSettings.Types + , Network.Google.Resource.GroupsSettings.Groups.Get + , Network.Google.Resource.GroupsSettings.Groups.Patch + , Network.Google.Resource.GroupsSettings.Groups.Update + + other-modules: + Network.Google.GroupsSettings.Types.Product + , Network.Google.GroupsSettings.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-groups-migration/src/.gitkeep b/gogol-groups-migration/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-identity-toolkit/LICENSE b/gogol-identity-toolkit/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-identity-toolkit/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-identity-toolkit/Makefile b/gogol-identity-toolkit/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-identity-toolkit/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-identity-toolkit/README.md b/gogol-identity-toolkit/README.md new file mode 100644 index 000000000..9f1a95214 --- /dev/null +++ b/gogol-identity-toolkit/README.md @@ -0,0 +1,28 @@ +# gogol-identity-toolkit + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Identity Toolkit API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-identity-toolkit` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-identity-toolkit/Setup.hs b/gogol-identity-toolkit/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-identity-toolkit/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs new file mode 100644 index 000000000..dc61f6ff7 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs @@ -0,0 +1,317 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.IdentityToolkit +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Help the third party sites to implement federated login. +-- +-- /See:/ +module Network.Google.IdentityToolkit + ( + -- * API + IdentityToolkitAPI + , identityToolkitAPI + , identityToolkitURL + + -- * Service Methods + + -- * REST Resources + + -- ** IdentitytoolkitRelyingpartyCreateAuthURI + , module IdentityToolkit.Relyingparty.CreateAuthURI + + -- ** IdentitytoolkitRelyingpartyDeleteAccount + , module IdentityToolkit.Relyingparty.DeleteAccount + + -- ** IdentitytoolkitRelyingpartyDownloadAccount + , module IdentityToolkit.Relyingparty.DownloadAccount + + -- ** IdentitytoolkitRelyingpartyGetAccountInfo + , module IdentityToolkit.Relyingparty.GetAccountInfo + + -- ** IdentitytoolkitRelyingpartyGetOobConfirmationCode + , module IdentityToolkit.Relyingparty.GetOobConfirmationCode + + -- ** IdentitytoolkitRelyingpartyGetPublicKeys + , module IdentityToolkit.Relyingparty.GetPublicKeys + + -- ** IdentitytoolkitRelyingpartyGetRecaptchaParam + , module IdentityToolkit.Relyingparty.GetRecaptchaParam + + -- ** IdentitytoolkitRelyingpartyResetPassword + , module IdentityToolkit.Relyingparty.ResetPassword + + -- ** IdentitytoolkitRelyingpartySetAccountInfo + , module IdentityToolkit.Relyingparty.SetAccountInfo + + -- ** IdentitytoolkitRelyingpartyUploadAccount + , module IdentityToolkit.Relyingparty.UploadAccount + + -- ** IdentitytoolkitRelyingpartyVerifyAssertion + , module IdentityToolkit.Relyingparty.VerifyAssertion + + -- ** IdentitytoolkitRelyingpartyVerifyPassword + , module IdentityToolkit.Relyingparty.VerifyPassword + + -- * Types + + -- ** UserInfo + , UserInfo + , userInfo + , uiEmail + , uiPhotoUrl + , uiDisabled + , uiProviderUserInfo + , uiValidSince + , uiPasswordUpdatedAt + , uiVersion + , uiEmailVerified + , uiSalt + , uiDisplayName + , uiPasswordHash + , uiLocalId + + -- ** IdentitytoolkitRelyingpartyVerifyPasswordRequest + , IdentitytoolkitRelyingpartyVerifyPasswordRequest + , identitytoolkitRelyingpartyVerifyPasswordRequest + , irvprEmail + , irvprCaptchaChallenge + , irvprPassword + , irvprCaptchaResponse + , irvprPendingIdToken + + -- ** IdentitytoolkitRelyingpartyVerifyAssertionRequest + , IdentitytoolkitRelyingpartyVerifyAssertionRequest + , identitytoolkitRelyingpartyVerifyAssertionRequest + , irvarPostBody + , irvarReturnRefreshToken + , irvarRequestUri + , irvarPendingIdToken + + -- ** IdentitytoolkitRelyingpartySetAccountInfoRequest + , IdentitytoolkitRelyingpartySetAccountInfoRequest + , identitytoolkitRelyingpartySetAccountInfoRequest + , irsairUpgradeToFederatedLogin + , irsairEmail + , irsairCaptchaChallenge + , irsairValidSince + , irsairOobCode + , irsairPassword + , irsairCaptchaResponse + , irsairEmailVerified + , irsairDisplayName + , irsairDisableUser + , irsairLocalId + , irsairIdToken + , irsairProvider + + -- ** DeleteAccountResponse + , DeleteAccountResponse + , deleteAccountResponse + , darKind + + -- ** DownloadAccountResponse + , DownloadAccountResponse + , downloadAccountResponse + , dNextPageToken + , dUsers + , dKind + + -- ** ResetPasswordResponse + , ResetPasswordResponse + , resetPasswordResponse + , rprEmail + , rprKind + + -- ** UploadAccountResponse + , UploadAccountResponse + , uploadAccountResponse + , uarKind + , uarError + + -- ** CreateAuthURIResponse + , CreateAuthURIResponse + , createAuthURIResponse + , caurProviderId + , caurKind + , caurAuthUri + , caurCaptchaRequired + , caurRegistered + , caurForExistingProvider + + -- ** Relyingparty + , Relyingparty + , relyingparty + , rEmail + , rKind + , rUserIp + , rRequestType + , rCaptchaResp + , rNewEmail + , rChallenge + , rIdToken + + -- ** IdentitytoolkitRelyingpartyGetAccountInfoRequest + , IdentitytoolkitRelyingpartyGetAccountInfoRequest + , identitytoolkitRelyingpartyGetAccountInfoRequest + , irgairEmail + , irgairLocalId + , irgairIdToken + + -- ** IdentitytoolkitRelyingpartyGetPublicKeysResponse + , IdentitytoolkitRelyingpartyGetPublicKeysResponse + , identitytoolkitRelyingpartyGetPublicKeysResponse + + -- ** IdentitytoolkitRelyingpartyCreateAuthURIRequest + , IdentitytoolkitRelyingpartyCreateAuthURIRequest + , identitytoolkitRelyingpartyCreateAuthURIRequest + , ircaurProviderId + , ircaurClientId + , ircaurContext + , ircaurIdentifier + , ircaurOtaApp + , ircaurOauthConsumerKey + , ircaurAppId + , ircaurContinueUri + , ircaurOauthScope + , ircaurOpenidRealm + + -- ** IdentitytoolkitRelyingpartyUploadAccountRequest + , IdentitytoolkitRelyingpartyUploadAccountRequest + , identitytoolkitRelyingpartyUploadAccountRequest + , iruarUsers + , iruarMemoryCost + , iruarSaltSeparator + , iruarHashAlgorithm + , iruarSignerKey + , iruarRounds + + -- ** IdentitytoolkitRelyingpartyResetPasswordRequest + , IdentitytoolkitRelyingpartyResetPasswordRequest + , identitytoolkitRelyingpartyResetPasswordRequest + , irrprEmail + , irrprNewPassword + , irrprOobCode + , irrprOldPassword + + -- ** GetAccountInfoResponse + , GetAccountInfoResponse + , getAccountInfoResponse + , gairUsers + , gairKind + + -- ** GetOobConfirmationCodeResponse + , GetOobConfirmationCodeResponse + , getOobConfirmationCodeResponse + , goccrKind + , goccrOobCode + + -- ** IdentitytoolkitRelyingpartyDeleteAccountRequest + , IdentitytoolkitRelyingpartyDeleteAccountRequest + , identitytoolkitRelyingpartyDeleteAccountRequest + , irdarLocalId + + -- ** IdentitytoolkitRelyingpartyDownloadAccountRequest + , IdentitytoolkitRelyingpartyDownloadAccountRequest + , identitytoolkitRelyingpartyDownloadAccountRequest + , irdarNextPageToken + , irdarMaxResults + + -- ** VerifyPasswordResponse + , VerifyPasswordResponse + , verifyPasswordResponse + , vprEmail + , vprPhotoUrl + , vprOauthAccessToken + , vprKind + , vprOauthExpireIn + , vprDisplayName + , vprLocalId + , vprRegistered + , vprIdToken + , vprOauthAuthorizationCode + + -- ** VerifyAssertionResponse + , VerifyAssertionResponse + , verifyAssertionResponse + , varProviderId + , varFullName + , varEmail + , varEmailRecycled + , varPhotoUrl + , varVerifiedProvider + , varContext + , varNeedConfirmation + , varOriginalEmail + , varLastName + , varOauthAccessToken + , varDateOfBirth + , varKind + , varOauthExpireIn + , varAppInstallationUrl + , varAction + , varFederatedId + , varAppScheme + , varInputEmail + , varEmailVerified + , varLanguage + , varFirstName + , varDisplayName + , varOauthRequestToken + , varOauthScope + , varNickName + , varLocalId + , varTimeZone + , varIdToken + , varOauthAuthorizationCode + + -- ** SetAccountInfoResponse + , SetAccountInfoResponse + , setAccountInfoResponse + , sairEmail + , sairKind + , sairProviderUserInfo + , sairDisplayName + , sairNewEmail + , sairIdToken + + -- ** GetRecaptchaParamResponse + , GetRecaptchaParamResponse + , getRecaptchaParamResponse + , grprRecaptchaSiteKey + , grprKind + , grprRecaptchaStoken + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude +import Network.Google.Resource.IdentityToolkit.Relyingparty.CreateAuthURI +import Network.Google.Resource.IdentityToolkit.Relyingparty.DeleteAccount +import Network.Google.Resource.IdentityToolkit.Relyingparty.DownloadAccount +import Network.Google.Resource.IdentityToolkit.Relyingparty.GetAccountInfo +import Network.Google.Resource.IdentityToolkit.Relyingparty.GetOobConfirmationCode +import Network.Google.Resource.IdentityToolkit.Relyingparty.GetPublicKeys +import Network.Google.Resource.IdentityToolkit.Relyingparty.GetRecaptchaParam +import Network.Google.Resource.IdentityToolkit.Relyingparty.ResetPassword +import Network.Google.Resource.IdentityToolkit.Relyingparty.SetAccountInfo +import Network.Google.Resource.IdentityToolkit.Relyingparty.UploadAccount +import Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyAssertion +import Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyPassword + +{- $resources +TODO +-} + +type IdentityToolkitAPI = Relyingparty + +identityToolkitAPI :: Proxy IdentityToolkitAPI +identityToolkitAPI = Proxy diff --git a/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types.hs b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types.hs new file mode 100644 index 000000000..a95bd9f7a --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.IdentityToolkit.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.IdentityToolkit.Types + ( + -- * Service URL + identityToolkitURL + + -- * UserInfo + , UserInfo + , userInfo + , uiEmail + , uiPhotoUrl + , uiDisabled + , uiProviderUserInfo + , uiValidSince + , uiPasswordUpdatedAt + , uiVersion + , uiEmailVerified + , uiSalt + , uiDisplayName + , uiPasswordHash + , uiLocalId + + -- * IdentitytoolkitRelyingpartyVerifyPasswordRequest + , IdentitytoolkitRelyingpartyVerifyPasswordRequest + , identitytoolkitRelyingpartyVerifyPasswordRequest + , irvprEmail + , irvprCaptchaChallenge + , irvprPassword + , irvprCaptchaResponse + , irvprPendingIdToken + + -- * IdentitytoolkitRelyingpartyVerifyAssertionRequest + , IdentitytoolkitRelyingpartyVerifyAssertionRequest + , identitytoolkitRelyingpartyVerifyAssertionRequest + , irvarPostBody + , irvarReturnRefreshToken + , irvarRequestUri + , irvarPendingIdToken + + -- * IdentitytoolkitRelyingpartySetAccountInfoRequest + , IdentitytoolkitRelyingpartySetAccountInfoRequest + , identitytoolkitRelyingpartySetAccountInfoRequest + , irsairUpgradeToFederatedLogin + , irsairEmail + , irsairCaptchaChallenge + , irsairValidSince + , irsairOobCode + , irsairPassword + , irsairCaptchaResponse + , irsairEmailVerified + , irsairDisplayName + , irsairDisableUser + , irsairLocalId + , irsairIdToken + , irsairProvider + + -- * DeleteAccountResponse + , DeleteAccountResponse + , deleteAccountResponse + , darKind + + -- * DownloadAccountResponse + , DownloadAccountResponse + , downloadAccountResponse + , dNextPageToken + , dUsers + , dKind + + -- * ResetPasswordResponse + , ResetPasswordResponse + , resetPasswordResponse + , rprEmail + , rprKind + + -- * UploadAccountResponse + , UploadAccountResponse + , uploadAccountResponse + , uarKind + , uarError + + -- * CreateAuthURIResponse + , CreateAuthURIResponse + , createAuthURIResponse + , caurProviderId + , caurKind + , caurAuthUri + , caurCaptchaRequired + , caurRegistered + , caurForExistingProvider + + -- * Relyingparty + , Relyingparty + , relyingparty + , rEmail + , rKind + , rUserIp + , rRequestType + , rCaptchaResp + , rNewEmail + , rChallenge + , rIdToken + + -- * IdentitytoolkitRelyingpartyGetAccountInfoRequest + , IdentitytoolkitRelyingpartyGetAccountInfoRequest + , identitytoolkitRelyingpartyGetAccountInfoRequest + , irgairEmail + , irgairLocalId + , irgairIdToken + + -- * IdentitytoolkitRelyingpartyGetPublicKeysResponse + , IdentitytoolkitRelyingpartyGetPublicKeysResponse + , identitytoolkitRelyingpartyGetPublicKeysResponse + + -- * IdentitytoolkitRelyingpartyCreateAuthURIRequest + , IdentitytoolkitRelyingpartyCreateAuthURIRequest + , identitytoolkitRelyingpartyCreateAuthURIRequest + , ircaurProviderId + , ircaurClientId + , ircaurContext + , ircaurIdentifier + , ircaurOtaApp + , ircaurOauthConsumerKey + , ircaurAppId + , ircaurContinueUri + , ircaurOauthScope + , ircaurOpenidRealm + + -- * IdentitytoolkitRelyingpartyUploadAccountRequest + , IdentitytoolkitRelyingpartyUploadAccountRequest + , identitytoolkitRelyingpartyUploadAccountRequest + , iruarUsers + , iruarMemoryCost + , iruarSaltSeparator + , iruarHashAlgorithm + , iruarSignerKey + , iruarRounds + + -- * IdentitytoolkitRelyingpartyResetPasswordRequest + , IdentitytoolkitRelyingpartyResetPasswordRequest + , identitytoolkitRelyingpartyResetPasswordRequest + , irrprEmail + , irrprNewPassword + , irrprOobCode + , irrprOldPassword + + -- * GetAccountInfoResponse + , GetAccountInfoResponse + , getAccountInfoResponse + , gairUsers + , gairKind + + -- * GetOobConfirmationCodeResponse + , GetOobConfirmationCodeResponse + , getOobConfirmationCodeResponse + , goccrKind + , goccrOobCode + + -- * IdentitytoolkitRelyingpartyDeleteAccountRequest + , IdentitytoolkitRelyingpartyDeleteAccountRequest + , identitytoolkitRelyingpartyDeleteAccountRequest + , irdarLocalId + + -- * IdentitytoolkitRelyingpartyDownloadAccountRequest + , IdentitytoolkitRelyingpartyDownloadAccountRequest + , identitytoolkitRelyingpartyDownloadAccountRequest + , irdarNextPageToken + , irdarMaxResults + + -- * VerifyPasswordResponse + , VerifyPasswordResponse + , verifyPasswordResponse + , vprEmail + , vprPhotoUrl + , vprOauthAccessToken + , vprKind + , vprOauthExpireIn + , vprDisplayName + , vprLocalId + , vprRegistered + , vprIdToken + , vprOauthAuthorizationCode + + -- * VerifyAssertionResponse + , VerifyAssertionResponse + , verifyAssertionResponse + , varProviderId + , varFullName + , varEmail + , varEmailRecycled + , varPhotoUrl + , varVerifiedProvider + , varContext + , varNeedConfirmation + , varOriginalEmail + , varLastName + , varOauthAccessToken + , varDateOfBirth + , varKind + , varOauthExpireIn + , varAppInstallationUrl + , varAction + , varFederatedId + , varAppScheme + , varInputEmail + , varEmailVerified + , varLanguage + , varFirstName + , varDisplayName + , varOauthRequestToken + , varOauthScope + , varNickName + , varLocalId + , varTimeZone + , varIdToken + , varOauthAuthorizationCode + + -- * SetAccountInfoResponse + , SetAccountInfoResponse + , setAccountInfoResponse + , sairEmail + , sairKind + , sairProviderUserInfo + , sairDisplayName + , sairNewEmail + , sairIdToken + + -- * GetRecaptchaParamResponse + , GetRecaptchaParamResponse + , getRecaptchaParamResponse + , grprRecaptchaSiteKey + , grprKind + , grprRecaptchaStoken + ) where + +import Network.Google.IdentityToolkit.Types.Product +import Network.Google.IdentityToolkit.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v3' of the Google Identity Toolkit API. +identityToolkitURL :: BaseURL +identityToolkitURL + = BaseUrl Https + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/" + 443 diff --git a/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs new file mode 100644 index 000000000..91b3b7fc7 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs @@ -0,0 +1,2261 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.IdentityToolkit.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.IdentityToolkit.Types.Product where + +import Network.Google.IdentityToolkit.Types.Sum +import Network.Google.Prelude + +-- | Template for an individual account info. +-- +-- /See:/ 'userInfo' smart constructor. +data UserInfo = UserInfo + { _uiEmail :: !(Maybe Text) + , _uiPhotoUrl :: !(Maybe Text) + , _uiDisabled :: !(Maybe Bool) + , _uiProviderUserInfo :: !(Maybe [UserInfoProviderUserInfoItem]) + , _uiValidSince :: !(Maybe Int64) + , _uiPasswordUpdatedAt :: !(Maybe Double) + , _uiVersion :: !(Maybe Int32) + , _uiEmailVerified :: !(Maybe Bool) + , _uiSalt :: !(Maybe Word8) + , _uiDisplayName :: !(Maybe Text) + , _uiPasswordHash :: !(Maybe Word8) + , _uiLocalId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiEmail' +-- +-- * 'uiPhotoUrl' +-- +-- * 'uiDisabled' +-- +-- * 'uiProviderUserInfo' +-- +-- * 'uiValidSince' +-- +-- * 'uiPasswordUpdatedAt' +-- +-- * 'uiVersion' +-- +-- * 'uiEmailVerified' +-- +-- * 'uiSalt' +-- +-- * 'uiDisplayName' +-- +-- * 'uiPasswordHash' +-- +-- * 'uiLocalId' +userInfo + :: UserInfo +userInfo = + UserInfo + { _uiEmail = Nothing + , _uiPhotoUrl = Nothing + , _uiDisabled = Nothing + , _uiProviderUserInfo = Nothing + , _uiValidSince = Nothing + , _uiPasswordUpdatedAt = Nothing + , _uiVersion = Nothing + , _uiEmailVerified = Nothing + , _uiSalt = Nothing + , _uiDisplayName = Nothing + , _uiPasswordHash = Nothing + , _uiLocalId = Nothing + } + +-- | The email of the user. +uiEmail :: Lens' UserInfo (Maybe Text) +uiEmail = lens _uiEmail (\ s a -> s{_uiEmail = a}) + +-- | The URL of the user profile photo. +uiPhotoUrl :: Lens' UserInfo (Maybe Text) +uiPhotoUrl + = lens _uiPhotoUrl (\ s a -> s{_uiPhotoUrl = a}) + +-- | Whether the user is disabled. +uiDisabled :: Lens' UserInfo (Maybe Bool) +uiDisabled + = lens _uiDisabled (\ s a -> s{_uiDisabled = a}) + +-- | The IDP of the user. +uiProviderUserInfo :: Lens' UserInfo [UserInfoProviderUserInfoItem] +uiProviderUserInfo + = lens _uiProviderUserInfo + (\ s a -> s{_uiProviderUserInfo = a}) + . _Default + . _Coerce + +-- | Timestamp in seconds for valid login token. +uiValidSince :: Lens' UserInfo (Maybe Int64) +uiValidSince + = lens _uiValidSince (\ s a -> s{_uiValidSince = a}) + +-- | The timestamp when the password was last updated. +uiPasswordUpdatedAt :: Lens' UserInfo (Maybe Double) +uiPasswordUpdatedAt + = lens _uiPasswordUpdatedAt + (\ s a -> s{_uiPasswordUpdatedAt = a}) + +-- | Version of the user\'s password. +uiVersion :: Lens' UserInfo (Maybe Int32) +uiVersion + = lens _uiVersion (\ s a -> s{_uiVersion = a}) + +-- | Whether the email has been verified. +uiEmailVerified :: Lens' UserInfo (Maybe Bool) +uiEmailVerified + = lens _uiEmailVerified + (\ s a -> s{_uiEmailVerified = a}) + +-- | The user\'s password salt. +uiSalt :: Lens' UserInfo (Maybe Word8) +uiSalt = lens _uiSalt (\ s a -> s{_uiSalt = a}) + +-- | The name of the user. +uiDisplayName :: Lens' UserInfo (Maybe Text) +uiDisplayName + = lens _uiDisplayName + (\ s a -> s{_uiDisplayName = a}) + +-- | The user\'s hashed password. +uiPasswordHash :: Lens' UserInfo (Maybe Word8) +uiPasswordHash + = lens _uiPasswordHash + (\ s a -> s{_uiPasswordHash = a}) + +-- | The local ID of the user. +uiLocalId :: Lens' UserInfo (Maybe Text) +uiLocalId + = lens _uiLocalId (\ s a -> s{_uiLocalId = a}) + +instance FromJSON UserInfo where + parseJSON + = withObject "UserInfo" + (\ o -> + UserInfo <$> + (o .:? "email") <*> (o .:? "photoUrl") <*> + (o .:? "disabled") + <*> (o .:? "providerUserInfo" .!= mempty) + <*> (o .:? "validSince") + <*> (o .:? "passwordUpdatedAt") + <*> (o .:? "version") + <*> (o .:? "emailVerified") + <*> (o .:? "salt") + <*> (o .:? "displayName") + <*> (o .:? "passwordHash") + <*> (o .:? "localId")) + +instance ToJSON UserInfo where + toJSON UserInfo{..} + = object + (catMaybes + [("email" .=) <$> _uiEmail, + ("photoUrl" .=) <$> _uiPhotoUrl, + ("disabled" .=) <$> _uiDisabled, + ("providerUserInfo" .=) <$> _uiProviderUserInfo, + ("validSince" .=) <$> _uiValidSince, + ("passwordUpdatedAt" .=) <$> _uiPasswordUpdatedAt, + ("version" .=) <$> _uiVersion, + ("emailVerified" .=) <$> _uiEmailVerified, + ("salt" .=) <$> _uiSalt, + ("displayName" .=) <$> _uiDisplayName, + ("passwordHash" .=) <$> _uiPasswordHash, + ("localId" .=) <$> _uiLocalId]) + +-- | Request to verify the password. +-- +-- /See:/ 'identitytoolkitRelyingpartyVerifyPasswordRequest' smart constructor. +data IdentitytoolkitRelyingpartyVerifyPasswordRequest = IdentitytoolkitRelyingpartyVerifyPasswordRequest + { _irvprEmail :: !(Maybe Text) + , _irvprCaptchaChallenge :: !(Maybe Text) + , _irvprPassword :: !(Maybe Text) + , _irvprCaptchaResponse :: !(Maybe Text) + , _irvprPendingIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyVerifyPasswordRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irvprEmail' +-- +-- * 'irvprCaptchaChallenge' +-- +-- * 'irvprPassword' +-- +-- * 'irvprCaptchaResponse' +-- +-- * 'irvprPendingIdToken' +identitytoolkitRelyingpartyVerifyPasswordRequest + :: IdentitytoolkitRelyingpartyVerifyPasswordRequest +identitytoolkitRelyingpartyVerifyPasswordRequest = + IdentitytoolkitRelyingpartyVerifyPasswordRequest + { _irvprEmail = Nothing + , _irvprCaptchaChallenge = Nothing + , _irvprPassword = Nothing + , _irvprCaptchaResponse = Nothing + , _irvprPendingIdToken = Nothing + } + +-- | The email of the user. +irvprEmail :: Lens' IdentitytoolkitRelyingpartyVerifyPasswordRequest (Maybe Text) +irvprEmail + = lens _irvprEmail (\ s a -> s{_irvprEmail = a}) + +-- | The captcha challenge. +irvprCaptchaChallenge :: Lens' IdentitytoolkitRelyingpartyVerifyPasswordRequest (Maybe Text) +irvprCaptchaChallenge + = lens _irvprCaptchaChallenge + (\ s a -> s{_irvprCaptchaChallenge = a}) + +-- | The password inputed by the user. +irvprPassword :: Lens' IdentitytoolkitRelyingpartyVerifyPasswordRequest (Maybe Text) +irvprPassword + = lens _irvprPassword + (\ s a -> s{_irvprPassword = a}) + +-- | Response to the captcha. +irvprCaptchaResponse :: Lens' IdentitytoolkitRelyingpartyVerifyPasswordRequest (Maybe Text) +irvprCaptchaResponse + = lens _irvprCaptchaResponse + (\ s a -> s{_irvprCaptchaResponse = a}) + +-- | The GITKit token for the non-trusted IDP, which is to be confirmed by +-- the user. +irvprPendingIdToken :: Lens' IdentitytoolkitRelyingpartyVerifyPasswordRequest (Maybe Text) +irvprPendingIdToken + = lens _irvprPendingIdToken + (\ s a -> s{_irvprPendingIdToken = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyVerifyPasswordRequest + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyVerifyPasswordRequest" + (\ o -> + IdentitytoolkitRelyingpartyVerifyPasswordRequest <$> + (o .:? "email") <*> (o .:? "captchaChallenge") <*> + (o .:? "password") + <*> (o .:? "captchaResponse") + <*> (o .:? "pendingIdToken")) + +instance ToJSON + IdentitytoolkitRelyingpartyVerifyPasswordRequest + where + toJSON + IdentitytoolkitRelyingpartyVerifyPasswordRequest{..} + = object + (catMaybes + [("email" .=) <$> _irvprEmail, + ("captchaChallenge" .=) <$> _irvprCaptchaChallenge, + ("password" .=) <$> _irvprPassword, + ("captchaResponse" .=) <$> _irvprCaptchaResponse, + ("pendingIdToken" .=) <$> _irvprPendingIdToken]) + +-- | Request to verify the IDP assertion. +-- +-- /See:/ 'identitytoolkitRelyingpartyVerifyAssertionRequest' smart constructor. +data IdentitytoolkitRelyingpartyVerifyAssertionRequest = IdentitytoolkitRelyingpartyVerifyAssertionRequest + { _irvarPostBody :: !(Maybe Text) + , _irvarReturnRefreshToken :: !(Maybe Bool) + , _irvarRequestUri :: !(Maybe Text) + , _irvarPendingIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyVerifyAssertionRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irvarPostBody' +-- +-- * 'irvarReturnRefreshToken' +-- +-- * 'irvarRequestUri' +-- +-- * 'irvarPendingIdToken' +identitytoolkitRelyingpartyVerifyAssertionRequest + :: IdentitytoolkitRelyingpartyVerifyAssertionRequest +identitytoolkitRelyingpartyVerifyAssertionRequest = + IdentitytoolkitRelyingpartyVerifyAssertionRequest + { _irvarPostBody = Nothing + , _irvarReturnRefreshToken = Nothing + , _irvarRequestUri = Nothing + , _irvarPendingIdToken = Nothing + } + +-- | The post body if the request is a HTTP POST. +irvarPostBody :: Lens' IdentitytoolkitRelyingpartyVerifyAssertionRequest (Maybe Text) +irvarPostBody + = lens _irvarPostBody + (\ s a -> s{_irvarPostBody = a}) + +-- | Whether to return refresh tokens. +irvarReturnRefreshToken :: Lens' IdentitytoolkitRelyingpartyVerifyAssertionRequest (Maybe Bool) +irvarReturnRefreshToken + = lens _irvarReturnRefreshToken + (\ s a -> s{_irvarReturnRefreshToken = a}) + +-- | The URI to which the IDP redirects the user back. It may contain +-- federated login result params added by the IDP. +irvarRequestUri :: Lens' IdentitytoolkitRelyingpartyVerifyAssertionRequest (Maybe Text) +irvarRequestUri + = lens _irvarRequestUri + (\ s a -> s{_irvarRequestUri = a}) + +-- | The GITKit token for the non-trusted IDP pending to be confirmed by the +-- user. +irvarPendingIdToken :: Lens' IdentitytoolkitRelyingpartyVerifyAssertionRequest (Maybe Text) +irvarPendingIdToken + = lens _irvarPendingIdToken + (\ s a -> s{_irvarPendingIdToken = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyVerifyAssertionRequest + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyVerifyAssertionRequest" + (\ o -> + IdentitytoolkitRelyingpartyVerifyAssertionRequest <$> + (o .:? "postBody") <*> (o .:? "returnRefreshToken") + <*> (o .:? "requestUri") + <*> (o .:? "pendingIdToken")) + +instance ToJSON + IdentitytoolkitRelyingpartyVerifyAssertionRequest + where + toJSON + IdentitytoolkitRelyingpartyVerifyAssertionRequest{..} + = object + (catMaybes + [("postBody" .=) <$> _irvarPostBody, + ("returnRefreshToken" .=) <$> + _irvarReturnRefreshToken, + ("requestUri" .=) <$> _irvarRequestUri, + ("pendingIdToken" .=) <$> _irvarPendingIdToken]) + +-- | Request to set the account information. +-- +-- /See:/ 'identitytoolkitRelyingpartySetAccountInfoRequest' smart constructor. +data IdentitytoolkitRelyingpartySetAccountInfoRequest = IdentitytoolkitRelyingpartySetAccountInfoRequest + { _irsairUpgradeToFederatedLogin :: !(Maybe Bool) + , _irsairEmail :: !(Maybe Text) + , _irsairCaptchaChallenge :: !(Maybe Text) + , _irsairValidSince :: !(Maybe Int64) + , _irsairOobCode :: !(Maybe Text) + , _irsairPassword :: !(Maybe Text) + , _irsairCaptchaResponse :: !(Maybe Text) + , _irsairEmailVerified :: !(Maybe Bool) + , _irsairDisplayName :: !(Maybe Text) + , _irsairDisableUser :: !(Maybe Bool) + , _irsairLocalId :: !(Maybe Text) + , _irsairIdToken :: !(Maybe Text) + , _irsairProvider :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartySetAccountInfoRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irsairUpgradeToFederatedLogin' +-- +-- * 'irsairEmail' +-- +-- * 'irsairCaptchaChallenge' +-- +-- * 'irsairValidSince' +-- +-- * 'irsairOobCode' +-- +-- * 'irsairPassword' +-- +-- * 'irsairCaptchaResponse' +-- +-- * 'irsairEmailVerified' +-- +-- * 'irsairDisplayName' +-- +-- * 'irsairDisableUser' +-- +-- * 'irsairLocalId' +-- +-- * 'irsairIdToken' +-- +-- * 'irsairProvider' +identitytoolkitRelyingpartySetAccountInfoRequest + :: IdentitytoolkitRelyingpartySetAccountInfoRequest +identitytoolkitRelyingpartySetAccountInfoRequest = + IdentitytoolkitRelyingpartySetAccountInfoRequest + { _irsairUpgradeToFederatedLogin = Nothing + , _irsairEmail = Nothing + , _irsairCaptchaChallenge = Nothing + , _irsairValidSince = Nothing + , _irsairOobCode = Nothing + , _irsairPassword = Nothing + , _irsairCaptchaResponse = Nothing + , _irsairEmailVerified = Nothing + , _irsairDisplayName = Nothing + , _irsairDisableUser = Nothing + , _irsairLocalId = Nothing + , _irsairIdToken = Nothing + , _irsairProvider = Nothing + } + +-- | Mark the user to upgrade to federated login. +irsairUpgradeToFederatedLogin :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Bool) +irsairUpgradeToFederatedLogin + = lens _irsairUpgradeToFederatedLogin + (\ s a -> s{_irsairUpgradeToFederatedLogin = a}) + +-- | The email of the user. +irsairEmail :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairEmail + = lens _irsairEmail (\ s a -> s{_irsairEmail = a}) + +-- | The captcha challenge. +irsairCaptchaChallenge :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairCaptchaChallenge + = lens _irsairCaptchaChallenge + (\ s a -> s{_irsairCaptchaChallenge = a}) + +-- | Timestamp in seconds for valid login token. +irsairValidSince :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Int64) +irsairValidSince + = lens _irsairValidSince + (\ s a -> s{_irsairValidSince = a}) + +-- | The out-of-band code of the change email request. +irsairOobCode :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairOobCode + = lens _irsairOobCode + (\ s a -> s{_irsairOobCode = a}) + +-- | The new password of the user. +irsairPassword :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairPassword + = lens _irsairPassword + (\ s a -> s{_irsairPassword = a}) + +-- | Response to the captcha. +irsairCaptchaResponse :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairCaptchaResponse + = lens _irsairCaptchaResponse + (\ s a -> s{_irsairCaptchaResponse = a}) + +-- | Mark the email as verified or not. +irsairEmailVerified :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Bool) +irsairEmailVerified + = lens _irsairEmailVerified + (\ s a -> s{_irsairEmailVerified = a}) + +-- | The name of the user. +irsairDisplayName :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairDisplayName + = lens _irsairDisplayName + (\ s a -> s{_irsairDisplayName = a}) + +-- | Whether to disable the user. +irsairDisableUser :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Bool) +irsairDisableUser + = lens _irsairDisableUser + (\ s a -> s{_irsairDisableUser = a}) + +-- | The local ID of the user. +irsairLocalId :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairLocalId + = lens _irsairLocalId + (\ s a -> s{_irsairLocalId = a}) + +-- | The GITKit token of the authenticated user. +irsairIdToken :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest (Maybe Text) +irsairIdToken + = lens _irsairIdToken + (\ s a -> s{_irsairIdToken = a}) + +-- | The associated IDPs of the user. +irsairProvider :: Lens' IdentitytoolkitRelyingpartySetAccountInfoRequest [Text] +irsairProvider + = lens _irsairProvider + (\ s a -> s{_irsairProvider = a}) + . _Default + . _Coerce + +instance FromJSON + IdentitytoolkitRelyingpartySetAccountInfoRequest + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartySetAccountInfoRequest" + (\ o -> + IdentitytoolkitRelyingpartySetAccountInfoRequest <$> + (o .:? "upgradeToFederatedLogin") <*> (o .:? "email") + <*> (o .:? "captchaChallenge") + <*> (o .:? "validSince") + <*> (o .:? "oobCode") + <*> (o .:? "password") + <*> (o .:? "captchaResponse") + <*> (o .:? "emailVerified") + <*> (o .:? "displayName") + <*> (o .:? "disableUser") + <*> (o .:? "localId") + <*> (o .:? "idToken") + <*> (o .:? "provider" .!= mempty)) + +instance ToJSON + IdentitytoolkitRelyingpartySetAccountInfoRequest + where + toJSON + IdentitytoolkitRelyingpartySetAccountInfoRequest{..} + = object + (catMaybes + [("upgradeToFederatedLogin" .=) <$> + _irsairUpgradeToFederatedLogin, + ("email" .=) <$> _irsairEmail, + ("captchaChallenge" .=) <$> _irsairCaptchaChallenge, + ("validSince" .=) <$> _irsairValidSince, + ("oobCode" .=) <$> _irsairOobCode, + ("password" .=) <$> _irsairPassword, + ("captchaResponse" .=) <$> _irsairCaptchaResponse, + ("emailVerified" .=) <$> _irsairEmailVerified, + ("displayName" .=) <$> _irsairDisplayName, + ("disableUser" .=) <$> _irsairDisableUser, + ("localId" .=) <$> _irsairLocalId, + ("idToken" .=) <$> _irsairIdToken, + ("provider" .=) <$> _irsairProvider]) + +-- | Respone of deleting account. +-- +-- /See:/ 'deleteAccountResponse' smart constructor. +newtype DeleteAccountResponse = DeleteAccountResponse + { _darKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeleteAccountResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'darKind' +deleteAccountResponse + :: DeleteAccountResponse +deleteAccountResponse = + DeleteAccountResponse + { _darKind = "identitytoolkit#DeleteAccountResponse" + } + +-- | The fixed string \"identitytoolkit#DeleteAccountResponse\". +darKind :: Lens' DeleteAccountResponse Text +darKind = lens _darKind (\ s a -> s{_darKind = a}) + +instance FromJSON DeleteAccountResponse where + parseJSON + = withObject "DeleteAccountResponse" + (\ o -> + DeleteAccountResponse <$> + (o .:? "kind" .!= + "identitytoolkit#DeleteAccountResponse")) + +instance ToJSON DeleteAccountResponse where + toJSON DeleteAccountResponse{..} + = object (catMaybes [Just ("kind" .= _darKind)]) + +-- | Respone of downloading accounts in batch. +-- +-- /See:/ 'downloadAccountResponse' smart constructor. +data DownloadAccountResponse = DownloadAccountResponse + { _dNextPageToken :: !(Maybe Text) + , _dUsers :: !(Maybe [Maybe UserInfo]) + , _dKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DownloadAccountResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dNextPageToken' +-- +-- * 'dUsers' +-- +-- * 'dKind' +downloadAccountResponse + :: DownloadAccountResponse +downloadAccountResponse = + DownloadAccountResponse + { _dNextPageToken = Nothing + , _dUsers = Nothing + , _dKind = "identitytoolkit#DownloadAccountResponse" + } + +-- | The next page token. To be used in a subsequent request to return the +-- next page of results. +dNextPageToken :: Lens' DownloadAccountResponse (Maybe Text) +dNextPageToken + = lens _dNextPageToken + (\ s a -> s{_dNextPageToken = a}) + +-- | The user accounts data. +dUsers :: Lens' DownloadAccountResponse [Maybe UserInfo] +dUsers + = lens _dUsers (\ s a -> s{_dUsers = a}) . _Default . + _Coerce + +-- | The fixed string \"identitytoolkit#DownloadAccountResponse\". +dKind :: Lens' DownloadAccountResponse Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +instance FromJSON DownloadAccountResponse where + parseJSON + = withObject "DownloadAccountResponse" + (\ o -> + DownloadAccountResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "users" .!= mempty) + <*> + (o .:? "kind" .!= + "identitytoolkit#DownloadAccountResponse")) + +instance ToJSON DownloadAccountResponse where + toJSON DownloadAccountResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _dNextPageToken, + ("users" .=) <$> _dUsers, Just ("kind" .= _dKind)]) + +-- | Response of resetting the password. +-- +-- /See:/ 'resetPasswordResponse' smart constructor. +data ResetPasswordResponse = ResetPasswordResponse + { _rprEmail :: !(Maybe Text) + , _rprKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResetPasswordResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rprEmail' +-- +-- * 'rprKind' +resetPasswordResponse + :: ResetPasswordResponse +resetPasswordResponse = + ResetPasswordResponse + { _rprEmail = Nothing + , _rprKind = "identitytoolkit#ResetPasswordResponse" + } + +-- | The user\'s email. +rprEmail :: Lens' ResetPasswordResponse (Maybe Text) +rprEmail = lens _rprEmail (\ s a -> s{_rprEmail = a}) + +-- | The fixed string \"identitytoolkit#ResetPasswordResponse\". +rprKind :: Lens' ResetPasswordResponse Text +rprKind = lens _rprKind (\ s a -> s{_rprKind = a}) + +instance FromJSON ResetPasswordResponse where + parseJSON + = withObject "ResetPasswordResponse" + (\ o -> + ResetPasswordResponse <$> + (o .:? "email") <*> + (o .:? "kind" .!= + "identitytoolkit#ResetPasswordResponse")) + +instance ToJSON ResetPasswordResponse where + toJSON ResetPasswordResponse{..} + = object + (catMaybes + [("email" .=) <$> _rprEmail, + Just ("kind" .= _rprKind)]) + +-- | Respone of uploading accounts in batch. +-- +-- /See:/ 'uploadAccountResponse' smart constructor. +data UploadAccountResponse = UploadAccountResponse + { _uarKind :: !Text + , _uarError :: !(Maybe [UploadAccountResponseErrorItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UploadAccountResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uarKind' +-- +-- * 'uarError' +uploadAccountResponse + :: UploadAccountResponse +uploadAccountResponse = + UploadAccountResponse + { _uarKind = "identitytoolkit#UploadAccountResponse" + , _uarError = Nothing + } + +-- | The fixed string \"identitytoolkit#UploadAccountResponse\". +uarKind :: Lens' UploadAccountResponse Text +uarKind = lens _uarKind (\ s a -> s{_uarKind = a}) + +-- | The error encountered while processing the account info. +uarError :: Lens' UploadAccountResponse [UploadAccountResponseErrorItem] +uarError + = lens _uarError (\ s a -> s{_uarError = a}) . + _Default + . _Coerce + +instance FromJSON UploadAccountResponse where + parseJSON + = withObject "UploadAccountResponse" + (\ o -> + UploadAccountResponse <$> + (o .:? "kind" .!= + "identitytoolkit#UploadAccountResponse") + <*> (o .:? "error" .!= mempty)) + +instance ToJSON UploadAccountResponse where + toJSON UploadAccountResponse{..} + = object + (catMaybes + [Just ("kind" .= _uarKind), + ("error" .=) <$> _uarError]) + +-- | Response of creating the IDP authentication URL. +-- +-- /See:/ 'createAuthURIResponse' smart constructor. +data CreateAuthURIResponse = CreateAuthURIResponse + { _caurProviderId :: !(Maybe Text) + , _caurKind :: !Text + , _caurAuthUri :: !(Maybe Text) + , _caurCaptchaRequired :: !(Maybe Bool) + , _caurRegistered :: !(Maybe Bool) + , _caurForExistingProvider :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateAuthURIResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caurProviderId' +-- +-- * 'caurKind' +-- +-- * 'caurAuthUri' +-- +-- * 'caurCaptchaRequired' +-- +-- * 'caurRegistered' +-- +-- * 'caurForExistingProvider' +createAuthURIResponse + :: CreateAuthURIResponse +createAuthURIResponse = + CreateAuthURIResponse + { _caurProviderId = Nothing + , _caurKind = "identitytoolkit#CreateAuthUriResponse" + , _caurAuthUri = Nothing + , _caurCaptchaRequired = Nothing + , _caurRegistered = Nothing + , _caurForExistingProvider = Nothing + } + +-- | The provider ID of the auth URI. +caurProviderId :: Lens' CreateAuthURIResponse (Maybe Text) +caurProviderId + = lens _caurProviderId + (\ s a -> s{_caurProviderId = a}) + +-- | The fixed string identitytoolkit#CreateAuthUriResponse\". +caurKind :: Lens' CreateAuthURIResponse Text +caurKind = lens _caurKind (\ s a -> s{_caurKind = a}) + +-- | The URI used by the IDP to authenticate the user. +caurAuthUri :: Lens' CreateAuthURIResponse (Maybe Text) +caurAuthUri + = lens _caurAuthUri (\ s a -> s{_caurAuthUri = a}) + +-- | True if captcha is required. +caurCaptchaRequired :: Lens' CreateAuthURIResponse (Maybe Bool) +caurCaptchaRequired + = lens _caurCaptchaRequired + (\ s a -> s{_caurCaptchaRequired = a}) + +-- | Whether the user is registered if the identifier is an email. +caurRegistered :: Lens' CreateAuthURIResponse (Maybe Bool) +caurRegistered + = lens _caurRegistered + (\ s a -> s{_caurRegistered = a}) + +-- | True if the authUri is for user\'s existing provider. +caurForExistingProvider :: Lens' CreateAuthURIResponse (Maybe Bool) +caurForExistingProvider + = lens _caurForExistingProvider + (\ s a -> s{_caurForExistingProvider = a}) + +instance FromJSON CreateAuthURIResponse where + parseJSON + = withObject "CreateAuthURIResponse" + (\ o -> + CreateAuthURIResponse <$> + (o .:? "providerId") <*> + (o .:? "kind" .!= + "identitytoolkit#CreateAuthUriResponse") + <*> (o .:? "authUri") + <*> (o .:? "captchaRequired") + <*> (o .:? "registered") + <*> (o .:? "forExistingProvider")) + +instance ToJSON CreateAuthURIResponse where + toJSON CreateAuthURIResponse{..} + = object + (catMaybes + [("providerId" .=) <$> _caurProviderId, + Just ("kind" .= _caurKind), + ("authUri" .=) <$> _caurAuthUri, + ("captchaRequired" .=) <$> _caurCaptchaRequired, + ("registered" .=) <$> _caurRegistered, + ("forExistingProvider" .=) <$> + _caurForExistingProvider]) + +-- | Request of getting a code for user confirmation (reset password, change +-- email etc.) +-- +-- /See:/ 'relyingparty' smart constructor. +data Relyingparty = Relyingparty + { _rEmail :: !(Maybe Text) + , _rKind :: !Text + , _rUserIp :: !(Maybe Text) + , _rRequestType :: !(Maybe Text) + , _rCaptchaResp :: !(Maybe Text) + , _rNewEmail :: !(Maybe Text) + , _rChallenge :: !(Maybe Text) + , _rIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Relyingparty' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rEmail' +-- +-- * 'rKind' +-- +-- * 'rUserIp' +-- +-- * 'rRequestType' +-- +-- * 'rCaptchaResp' +-- +-- * 'rNewEmail' +-- +-- * 'rChallenge' +-- +-- * 'rIdToken' +relyingparty + :: Relyingparty +relyingparty = + Relyingparty + { _rEmail = Nothing + , _rKind = "identitytoolkit#relyingparty" + , _rUserIp = Nothing + , _rRequestType = Nothing + , _rCaptchaResp = Nothing + , _rNewEmail = Nothing + , _rChallenge = Nothing + , _rIdToken = Nothing + } + +-- | The email of the user. +rEmail :: Lens' Relyingparty (Maybe Text) +rEmail = lens _rEmail (\ s a -> s{_rEmail = a}) + +-- | The fixed string \"identitytoolkit#relyingparty\". +rKind :: Lens' Relyingparty Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | The IP address of the user. +rUserIp :: Lens' Relyingparty (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | The request type. +rRequestType :: Lens' Relyingparty (Maybe Text) +rRequestType + = lens _rRequestType (\ s a -> s{_rRequestType = a}) + +-- | The recaptcha response from the user. +rCaptchaResp :: Lens' Relyingparty (Maybe Text) +rCaptchaResp + = lens _rCaptchaResp (\ s a -> s{_rCaptchaResp = a}) + +-- | The new email if the code is for email change. +rNewEmail :: Lens' Relyingparty (Maybe Text) +rNewEmail + = lens _rNewEmail (\ s a -> s{_rNewEmail = a}) + +-- | The recaptcha challenge presented to the user. +rChallenge :: Lens' Relyingparty (Maybe Text) +rChallenge + = lens _rChallenge (\ s a -> s{_rChallenge = a}) + +-- | The user\'s Gitkit login token for email change. +rIdToken :: Lens' Relyingparty (Maybe Text) +rIdToken = lens _rIdToken (\ s a -> s{_rIdToken = a}) + +instance FromJSON Relyingparty where + parseJSON + = withObject "Relyingparty" + (\ o -> + Relyingparty <$> + (o .:? "email") <*> + (o .:? "kind" .!= "identitytoolkit#relyingparty") + <*> (o .:? "userIp") + <*> (o .:? "requestType") + <*> (o .:? "captchaResp") + <*> (o .:? "newEmail") + <*> (o .:? "challenge") + <*> (o .:? "idToken")) + +instance ToJSON Relyingparty where + toJSON Relyingparty{..} + = object + (catMaybes + [("email" .=) <$> _rEmail, Just ("kind" .= _rKind), + ("userIp" .=) <$> _rUserIp, + ("requestType" .=) <$> _rRequestType, + ("captchaResp" .=) <$> _rCaptchaResp, + ("newEmail" .=) <$> _rNewEmail, + ("challenge" .=) <$> _rChallenge, + ("idToken" .=) <$> _rIdToken]) + +-- | Request to get the account information. +-- +-- /See:/ 'identitytoolkitRelyingpartyGetAccountInfoRequest' smart constructor. +data IdentitytoolkitRelyingpartyGetAccountInfoRequest = IdentitytoolkitRelyingpartyGetAccountInfoRequest + { _irgairEmail :: !(Maybe [Text]) + , _irgairLocalId :: !(Maybe [Text]) + , _irgairIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyGetAccountInfoRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irgairEmail' +-- +-- * 'irgairLocalId' +-- +-- * 'irgairIdToken' +identitytoolkitRelyingpartyGetAccountInfoRequest + :: IdentitytoolkitRelyingpartyGetAccountInfoRequest +identitytoolkitRelyingpartyGetAccountInfoRequest = + IdentitytoolkitRelyingpartyGetAccountInfoRequest + { _irgairEmail = Nothing + , _irgairLocalId = Nothing + , _irgairIdToken = Nothing + } + +-- | The list of emails of the users to inquiry. +irgairEmail :: Lens' IdentitytoolkitRelyingpartyGetAccountInfoRequest [Text] +irgairEmail + = lens _irgairEmail (\ s a -> s{_irgairEmail = a}) . + _Default + . _Coerce + +-- | The list of local ID\'s of the users to inquiry. +irgairLocalId :: Lens' IdentitytoolkitRelyingpartyGetAccountInfoRequest [Text] +irgairLocalId + = lens _irgairLocalId + (\ s a -> s{_irgairLocalId = a}) + . _Default + . _Coerce + +-- | The GITKit token of the authenticated user. +irgairIdToken :: Lens' IdentitytoolkitRelyingpartyGetAccountInfoRequest (Maybe Text) +irgairIdToken + = lens _irgairIdToken + (\ s a -> s{_irgairIdToken = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyGetAccountInfoRequest + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyGetAccountInfoRequest" + (\ o -> + IdentitytoolkitRelyingpartyGetAccountInfoRequest <$> + (o .:? "email" .!= mempty) <*> + (o .:? "localId" .!= mempty) + <*> (o .:? "idToken")) + +instance ToJSON + IdentitytoolkitRelyingpartyGetAccountInfoRequest + where + toJSON + IdentitytoolkitRelyingpartyGetAccountInfoRequest{..} + = object + (catMaybes + [("email" .=) <$> _irgairEmail, + ("localId" .=) <$> _irgairLocalId, + ("idToken" .=) <$> _irgairIdToken]) + +-- | Respone of getting public keys. +-- +-- /See:/ 'identitytoolkitRelyingpartyGetPublicKeysResponse' smart constructor. +data IdentitytoolkitRelyingpartyGetPublicKeysResponse = + IdentitytoolkitRelyingpartyGetPublicKeysResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyGetPublicKeysResponse' with the minimum fields required to make a request. +-- +identitytoolkitRelyingpartyGetPublicKeysResponse + :: IdentitytoolkitRelyingpartyGetPublicKeysResponse +identitytoolkitRelyingpartyGetPublicKeysResponse = + IdentitytoolkitRelyingpartyGetPublicKeysResponse + +instance FromJSON + IdentitytoolkitRelyingpartyGetPublicKeysResponse + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyGetPublicKeysResponse" + (\ o -> + pure + IdentitytoolkitRelyingpartyGetPublicKeysResponse) + +instance ToJSON + IdentitytoolkitRelyingpartyGetPublicKeysResponse + where + toJSON = const (Object mempty) + +-- | Request to get the IDP authentication URL. +-- +-- /See:/ 'identitytoolkitRelyingpartyCreateAuthURIRequest' smart constructor. +data IdentitytoolkitRelyingpartyCreateAuthURIRequest = IdentitytoolkitRelyingpartyCreateAuthURIRequest + { _ircaurProviderId :: !(Maybe Text) + , _ircaurClientId :: !(Maybe Text) + , _ircaurContext :: !(Maybe Text) + , _ircaurIdentifier :: !(Maybe Text) + , _ircaurOtaApp :: !(Maybe Text) + , _ircaurOauthConsumerKey :: !(Maybe Text) + , _ircaurAppId :: !(Maybe Text) + , _ircaurContinueUri :: !(Maybe Text) + , _ircaurOauthScope :: !(Maybe Text) + , _ircaurOpenidRealm :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyCreateAuthURIRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ircaurProviderId' +-- +-- * 'ircaurClientId' +-- +-- * 'ircaurContext' +-- +-- * 'ircaurIdentifier' +-- +-- * 'ircaurOtaApp' +-- +-- * 'ircaurOauthConsumerKey' +-- +-- * 'ircaurAppId' +-- +-- * 'ircaurContinueUri' +-- +-- * 'ircaurOauthScope' +-- +-- * 'ircaurOpenidRealm' +identitytoolkitRelyingpartyCreateAuthURIRequest + :: IdentitytoolkitRelyingpartyCreateAuthURIRequest +identitytoolkitRelyingpartyCreateAuthURIRequest = + IdentitytoolkitRelyingpartyCreateAuthURIRequest + { _ircaurProviderId = Nothing + , _ircaurClientId = Nothing + , _ircaurContext = Nothing + , _ircaurIdentifier = Nothing + , _ircaurOtaApp = Nothing + , _ircaurOauthConsumerKey = Nothing + , _ircaurAppId = Nothing + , _ircaurContinueUri = Nothing + , _ircaurOauthScope = Nothing + , _ircaurOpenidRealm = Nothing + } + +-- | The IdP ID. For white listed IdPs it\'s a short domain name e.g. +-- google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it\'s +-- the OP identifier. +ircaurProviderId :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurProviderId + = lens _ircaurProviderId + (\ s a -> s{_ircaurProviderId = a}) + +-- | The relying party OAuth client ID. +ircaurClientId :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurClientId + = lens _ircaurClientId + (\ s a -> s{_ircaurClientId = a}) + +-- | The opaque value used by the client to maintain context info between the +-- authentication request and the IDP callback. +ircaurContext :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurContext + = lens _ircaurContext + (\ s a -> s{_ircaurContext = a}) + +-- | The email or federated ID of the user. +ircaurIdentifier :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurIdentifier + = lens _ircaurIdentifier + (\ s a -> s{_ircaurIdentifier = a}) + +-- | The native app package for OTA installation. +ircaurOtaApp :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurOtaApp + = lens _ircaurOtaApp (\ s a -> s{_ircaurOtaApp = a}) + +-- | The developer\'s consumer key for OpenId OAuth Extension +ircaurOauthConsumerKey :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurOauthConsumerKey + = lens _ircaurOauthConsumerKey + (\ s a -> s{_ircaurOauthConsumerKey = a}) + +-- | The app ID of the mobile app, base64(CERT_SHA1):PACKAGE_NAME for +-- Android, BUNDLE_ID for iOS. +ircaurAppId :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurAppId + = lens _ircaurAppId (\ s a -> s{_ircaurAppId = a}) + +-- | The URI to which the IDP redirects the user after the federated login +-- flow. +ircaurContinueUri :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurContinueUri + = lens _ircaurContinueUri + (\ s a -> s{_ircaurContinueUri = a}) + +-- | Additional oauth scopes, beyond the basid user profile, that the user +-- would be prompted to grant +ircaurOauthScope :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurOauthScope + = lens _ircaurOauthScope + (\ s a -> s{_ircaurOauthScope = a}) + +-- | Optional realm for OpenID protocol. The sub string +-- \"scheme:\/\/domain:port\" of the param \"continueUri\" is used if this +-- is not set. +ircaurOpenidRealm :: Lens' IdentitytoolkitRelyingpartyCreateAuthURIRequest (Maybe Text) +ircaurOpenidRealm + = lens _ircaurOpenidRealm + (\ s a -> s{_ircaurOpenidRealm = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyCreateAuthURIRequest where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyCreateAuthURIRequest" + (\ o -> + IdentitytoolkitRelyingpartyCreateAuthURIRequest <$> + (o .:? "providerId") <*> (o .:? "clientId") <*> + (o .:? "context") + <*> (o .:? "identifier") + <*> (o .:? "otaApp") + <*> (o .:? "oauthConsumerKey") + <*> (o .:? "appId") + <*> (o .:? "continueUri") + <*> (o .:? "oauthScope") + <*> (o .:? "openidRealm")) + +instance ToJSON + IdentitytoolkitRelyingpartyCreateAuthURIRequest where + toJSON + IdentitytoolkitRelyingpartyCreateAuthURIRequest{..} + = object + (catMaybes + [("providerId" .=) <$> _ircaurProviderId, + ("clientId" .=) <$> _ircaurClientId, + ("context" .=) <$> _ircaurContext, + ("identifier" .=) <$> _ircaurIdentifier, + ("otaApp" .=) <$> _ircaurOtaApp, + ("oauthConsumerKey" .=) <$> _ircaurOauthConsumerKey, + ("appId" .=) <$> _ircaurAppId, + ("continueUri" .=) <$> _ircaurContinueUri, + ("oauthScope" .=) <$> _ircaurOauthScope, + ("openidRealm" .=) <$> _ircaurOpenidRealm]) + +-- | Request to upload user account in batch. +-- +-- /See:/ 'identitytoolkitRelyingpartyUploadAccountRequest' smart constructor. +data IdentitytoolkitRelyingpartyUploadAccountRequest = IdentitytoolkitRelyingpartyUploadAccountRequest + { _iruarUsers :: !(Maybe [Maybe UserInfo]) + , _iruarMemoryCost :: !(Maybe Int32) + , _iruarSaltSeparator :: !(Maybe Word8) + , _iruarHashAlgorithm :: !(Maybe Text) + , _iruarSignerKey :: !(Maybe Word8) + , _iruarRounds :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyUploadAccountRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iruarUsers' +-- +-- * 'iruarMemoryCost' +-- +-- * 'iruarSaltSeparator' +-- +-- * 'iruarHashAlgorithm' +-- +-- * 'iruarSignerKey' +-- +-- * 'iruarRounds' +identitytoolkitRelyingpartyUploadAccountRequest + :: IdentitytoolkitRelyingpartyUploadAccountRequest +identitytoolkitRelyingpartyUploadAccountRequest = + IdentitytoolkitRelyingpartyUploadAccountRequest + { _iruarUsers = Nothing + , _iruarMemoryCost = Nothing + , _iruarSaltSeparator = Nothing + , _iruarHashAlgorithm = Nothing + , _iruarSignerKey = Nothing + , _iruarRounds = Nothing + } + +-- | The account info to be stored. +iruarUsers :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest [Maybe UserInfo] +iruarUsers + = lens _iruarUsers (\ s a -> s{_iruarUsers = a}) . + _Default + . _Coerce + +-- | Memory cost for hash calculation. Used by scrypt similar algorithms. +iruarMemoryCost :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest (Maybe Int32) +iruarMemoryCost + = lens _iruarMemoryCost + (\ s a -> s{_iruarMemoryCost = a}) + +-- | The salt separator. +iruarSaltSeparator :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest (Maybe Word8) +iruarSaltSeparator + = lens _iruarSaltSeparator + (\ s a -> s{_iruarSaltSeparator = a}) + +-- | The password hash algorithm. +iruarHashAlgorithm :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest (Maybe Text) +iruarHashAlgorithm + = lens _iruarHashAlgorithm + (\ s a -> s{_iruarHashAlgorithm = a}) + +-- | The key for to hash the password. +iruarSignerKey :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest (Maybe Word8) +iruarSignerKey + = lens _iruarSignerKey + (\ s a -> s{_iruarSignerKey = a}) + +-- | Rounds for hash calculation. Used by scrypt and similar algorithms. +iruarRounds :: Lens' IdentitytoolkitRelyingpartyUploadAccountRequest (Maybe Int32) +iruarRounds + = lens _iruarRounds (\ s a -> s{_iruarRounds = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyUploadAccountRequest where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyUploadAccountRequest" + (\ o -> + IdentitytoolkitRelyingpartyUploadAccountRequest <$> + (o .:? "users" .!= mempty) <*> (o .:? "memoryCost") + <*> (o .:? "saltSeparator") + <*> (o .:? "hashAlgorithm") + <*> (o .:? "signerKey") + <*> (o .:? "rounds")) + +instance ToJSON + IdentitytoolkitRelyingpartyUploadAccountRequest where + toJSON + IdentitytoolkitRelyingpartyUploadAccountRequest{..} + = object + (catMaybes + [("users" .=) <$> _iruarUsers, + ("memoryCost" .=) <$> _iruarMemoryCost, + ("saltSeparator" .=) <$> _iruarSaltSeparator, + ("hashAlgorithm" .=) <$> _iruarHashAlgorithm, + ("signerKey" .=) <$> _iruarSignerKey, + ("rounds" .=) <$> _iruarRounds]) + +-- | Request to reset the password. +-- +-- /See:/ 'identitytoolkitRelyingpartyResetPasswordRequest' smart constructor. +data IdentitytoolkitRelyingpartyResetPasswordRequest = IdentitytoolkitRelyingpartyResetPasswordRequest + { _irrprEmail :: !(Maybe Text) + , _irrprNewPassword :: !(Maybe Text) + , _irrprOobCode :: !(Maybe Text) + , _irrprOldPassword :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyResetPasswordRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irrprEmail' +-- +-- * 'irrprNewPassword' +-- +-- * 'irrprOobCode' +-- +-- * 'irrprOldPassword' +identitytoolkitRelyingpartyResetPasswordRequest + :: IdentitytoolkitRelyingpartyResetPasswordRequest +identitytoolkitRelyingpartyResetPasswordRequest = + IdentitytoolkitRelyingpartyResetPasswordRequest + { _irrprEmail = Nothing + , _irrprNewPassword = Nothing + , _irrprOobCode = Nothing + , _irrprOldPassword = Nothing + } + +-- | The email address of the user. +irrprEmail :: Lens' IdentitytoolkitRelyingpartyResetPasswordRequest (Maybe Text) +irrprEmail + = lens _irrprEmail (\ s a -> s{_irrprEmail = a}) + +-- | The new password inputted by the user. +irrprNewPassword :: Lens' IdentitytoolkitRelyingpartyResetPasswordRequest (Maybe Text) +irrprNewPassword + = lens _irrprNewPassword + (\ s a -> s{_irrprNewPassword = a}) + +-- | The confirmation code. +irrprOobCode :: Lens' IdentitytoolkitRelyingpartyResetPasswordRequest (Maybe Text) +irrprOobCode + = lens _irrprOobCode (\ s a -> s{_irrprOobCode = a}) + +-- | The old password inputted by the user. +irrprOldPassword :: Lens' IdentitytoolkitRelyingpartyResetPasswordRequest (Maybe Text) +irrprOldPassword + = lens _irrprOldPassword + (\ s a -> s{_irrprOldPassword = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyResetPasswordRequest where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyResetPasswordRequest" + (\ o -> + IdentitytoolkitRelyingpartyResetPasswordRequest <$> + (o .:? "email") <*> (o .:? "newPassword") <*> + (o .:? "oobCode") + <*> (o .:? "oldPassword")) + +instance ToJSON + IdentitytoolkitRelyingpartyResetPasswordRequest where + toJSON + IdentitytoolkitRelyingpartyResetPasswordRequest{..} + = object + (catMaybes + [("email" .=) <$> _irrprEmail, + ("newPassword" .=) <$> _irrprNewPassword, + ("oobCode" .=) <$> _irrprOobCode, + ("oldPassword" .=) <$> _irrprOldPassword]) + +-- | Response of getting account information. +-- +-- /See:/ 'getAccountInfoResponse' smart constructor. +data GetAccountInfoResponse = GetAccountInfoResponse + { _gairUsers :: !(Maybe [Maybe UserInfo]) + , _gairKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetAccountInfoResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gairUsers' +-- +-- * 'gairKind' +getAccountInfoResponse + :: GetAccountInfoResponse +getAccountInfoResponse = + GetAccountInfoResponse + { _gairUsers = Nothing + , _gairKind = "identitytoolkit#GetAccountInfoResponse" + } + +-- | The info of the users. +gairUsers :: Lens' GetAccountInfoResponse [Maybe UserInfo] +gairUsers + = lens _gairUsers (\ s a -> s{_gairUsers = a}) . + _Default + . _Coerce + +-- | The fixed string \"identitytoolkit#GetAccountInfoResponse\". +gairKind :: Lens' GetAccountInfoResponse Text +gairKind = lens _gairKind (\ s a -> s{_gairKind = a}) + +instance FromJSON GetAccountInfoResponse where + parseJSON + = withObject "GetAccountInfoResponse" + (\ o -> + GetAccountInfoResponse <$> + (o .:? "users" .!= mempty) <*> + (o .:? "kind" .!= + "identitytoolkit#GetAccountInfoResponse")) + +instance ToJSON GetAccountInfoResponse where + toJSON GetAccountInfoResponse{..} + = object + (catMaybes + [("users" .=) <$> _gairUsers, + Just ("kind" .= _gairKind)]) + +-- | Response of getting a code for user confirmation (reset password, change +-- email etc.). +-- +-- /See:/ 'getOobConfirmationCodeResponse' smart constructor. +data GetOobConfirmationCodeResponse = GetOobConfirmationCodeResponse + { _goccrKind :: !Text + , _goccrOobCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetOobConfirmationCodeResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'goccrKind' +-- +-- * 'goccrOobCode' +getOobConfirmationCodeResponse + :: GetOobConfirmationCodeResponse +getOobConfirmationCodeResponse = + GetOobConfirmationCodeResponse + { _goccrKind = "identitytoolkit#GetOobConfirmationCodeResponse" + , _goccrOobCode = Nothing + } + +-- | The fixed string \"identitytoolkit#GetOobConfirmationCodeResponse\". +goccrKind :: Lens' GetOobConfirmationCodeResponse Text +goccrKind + = lens _goccrKind (\ s a -> s{_goccrKind = a}) + +-- | The code to be send to the user. +goccrOobCode :: Lens' GetOobConfirmationCodeResponse (Maybe Text) +goccrOobCode + = lens _goccrOobCode (\ s a -> s{_goccrOobCode = a}) + +instance FromJSON GetOobConfirmationCodeResponse + where + parseJSON + = withObject "GetOobConfirmationCodeResponse" + (\ o -> + GetOobConfirmationCodeResponse <$> + (o .:? "kind" .!= + "identitytoolkit#GetOobConfirmationCodeResponse") + <*> (o .:? "oobCode")) + +instance ToJSON GetOobConfirmationCodeResponse where + toJSON GetOobConfirmationCodeResponse{..} + = object + (catMaybes + [Just ("kind" .= _goccrKind), + ("oobCode" .=) <$> _goccrOobCode]) + +-- | Request to delete account. +-- +-- /See:/ 'identitytoolkitRelyingpartyDeleteAccountRequest' smart constructor. +newtype IdentitytoolkitRelyingpartyDeleteAccountRequest = IdentitytoolkitRelyingpartyDeleteAccountRequest + { _irdarLocalId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyDeleteAccountRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irdarLocalId' +identitytoolkitRelyingpartyDeleteAccountRequest + :: IdentitytoolkitRelyingpartyDeleteAccountRequest +identitytoolkitRelyingpartyDeleteAccountRequest = + IdentitytoolkitRelyingpartyDeleteAccountRequest + { _irdarLocalId = Nothing + } + +-- | The local ID of the user. +irdarLocalId :: Lens' IdentitytoolkitRelyingpartyDeleteAccountRequest (Maybe Text) +irdarLocalId + = lens _irdarLocalId (\ s a -> s{_irdarLocalId = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyDeleteAccountRequest where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyDeleteAccountRequest" + (\ o -> + IdentitytoolkitRelyingpartyDeleteAccountRequest <$> + (o .:? "localId")) + +instance ToJSON + IdentitytoolkitRelyingpartyDeleteAccountRequest where + toJSON + IdentitytoolkitRelyingpartyDeleteAccountRequest{..} + = object + (catMaybes [("localId" .=) <$> _irdarLocalId]) + +-- | Request to download user account in batch. +-- +-- /See:/ 'identitytoolkitRelyingpartyDownloadAccountRequest' smart constructor. +data IdentitytoolkitRelyingpartyDownloadAccountRequest = IdentitytoolkitRelyingpartyDownloadAccountRequest + { _irdarNextPageToken :: !(Maybe Text) + , _irdarMaxResults :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IdentitytoolkitRelyingpartyDownloadAccountRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irdarNextPageToken' +-- +-- * 'irdarMaxResults' +identitytoolkitRelyingpartyDownloadAccountRequest + :: IdentitytoolkitRelyingpartyDownloadAccountRequest +identitytoolkitRelyingpartyDownloadAccountRequest = + IdentitytoolkitRelyingpartyDownloadAccountRequest + { _irdarNextPageToken = Nothing + , _irdarMaxResults = Nothing + } + +-- | The token for the next page. This should be taken from the previous +-- response. +irdarNextPageToken :: Lens' IdentitytoolkitRelyingpartyDownloadAccountRequest (Maybe Text) +irdarNextPageToken + = lens _irdarNextPageToken + (\ s a -> s{_irdarNextPageToken = a}) + +-- | The max number of results to return in the response. +irdarMaxResults :: Lens' IdentitytoolkitRelyingpartyDownloadAccountRequest (Maybe Word32) +irdarMaxResults + = lens _irdarMaxResults + (\ s a -> s{_irdarMaxResults = a}) + +instance FromJSON + IdentitytoolkitRelyingpartyDownloadAccountRequest + where + parseJSON + = withObject + "IdentitytoolkitRelyingpartyDownloadAccountRequest" + (\ o -> + IdentitytoolkitRelyingpartyDownloadAccountRequest <$> + (o .:? "nextPageToken") <*> (o .:? "maxResults")) + +instance ToJSON + IdentitytoolkitRelyingpartyDownloadAccountRequest + where + toJSON + IdentitytoolkitRelyingpartyDownloadAccountRequest{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _irdarNextPageToken, + ("maxResults" .=) <$> _irdarMaxResults]) + +-- | Request of verifying the password. +-- +-- /See:/ 'verifyPasswordResponse' smart constructor. +data VerifyPasswordResponse = VerifyPasswordResponse + { _vprEmail :: !(Maybe Text) + , _vprPhotoUrl :: !(Maybe Text) + , _vprOauthAccessToken :: !(Maybe Text) + , _vprKind :: !Text + , _vprOauthExpireIn :: !(Maybe Int32) + , _vprDisplayName :: !(Maybe Text) + , _vprLocalId :: !(Maybe Text) + , _vprRegistered :: !(Maybe Bool) + , _vprIdToken :: !(Maybe Text) + , _vprOauthAuthorizationCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerifyPasswordResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vprEmail' +-- +-- * 'vprPhotoUrl' +-- +-- * 'vprOauthAccessToken' +-- +-- * 'vprKind' +-- +-- * 'vprOauthExpireIn' +-- +-- * 'vprDisplayName' +-- +-- * 'vprLocalId' +-- +-- * 'vprRegistered' +-- +-- * 'vprIdToken' +-- +-- * 'vprOauthAuthorizationCode' +verifyPasswordResponse + :: VerifyPasswordResponse +verifyPasswordResponse = + VerifyPasswordResponse + { _vprEmail = Nothing + , _vprPhotoUrl = Nothing + , _vprOauthAccessToken = Nothing + , _vprKind = "identitytoolkit#VerifyPasswordResponse" + , _vprOauthExpireIn = Nothing + , _vprDisplayName = Nothing + , _vprLocalId = Nothing + , _vprRegistered = Nothing + , _vprIdToken = Nothing + , _vprOauthAuthorizationCode = Nothing + } + +-- | The email returned by the IdP. NOTE: The federated login user may not +-- own the email. +vprEmail :: Lens' VerifyPasswordResponse (Maybe Text) +vprEmail = lens _vprEmail (\ s a -> s{_vprEmail = a}) + +-- | The URI of the user\'s photo at IdP +vprPhotoUrl :: Lens' VerifyPasswordResponse (Maybe Text) +vprPhotoUrl + = lens _vprPhotoUrl (\ s a -> s{_vprPhotoUrl = a}) + +-- | The OAuth2 access token. +vprOauthAccessToken :: Lens' VerifyPasswordResponse (Maybe Text) +vprOauthAccessToken + = lens _vprOauthAccessToken + (\ s a -> s{_vprOauthAccessToken = a}) + +-- | The fixed string \"identitytoolkit#VerifyPasswordResponse\". +vprKind :: Lens' VerifyPasswordResponse Text +vprKind = lens _vprKind (\ s a -> s{_vprKind = a}) + +-- | The lifetime in seconds of the OAuth2 access token. +vprOauthExpireIn :: Lens' VerifyPasswordResponse (Maybe Int32) +vprOauthExpireIn + = lens _vprOauthExpireIn + (\ s a -> s{_vprOauthExpireIn = a}) + +-- | The name of the user. +vprDisplayName :: Lens' VerifyPasswordResponse (Maybe Text) +vprDisplayName + = lens _vprDisplayName + (\ s a -> s{_vprDisplayName = a}) + +-- | The RP local ID if it\'s already been mapped to the IdP account +-- identified by the federated ID. +vprLocalId :: Lens' VerifyPasswordResponse (Maybe Text) +vprLocalId + = lens _vprLocalId (\ s a -> s{_vprLocalId = a}) + +-- | Whether the email is registered. +vprRegistered :: Lens' VerifyPasswordResponse (Maybe Bool) +vprRegistered + = lens _vprRegistered + (\ s a -> s{_vprRegistered = a}) + +-- | The GITKit token for authenticated user. +vprIdToken :: Lens' VerifyPasswordResponse (Maybe Text) +vprIdToken + = lens _vprIdToken (\ s a -> s{_vprIdToken = a}) + +-- | The OAuth2 authorization code. +vprOauthAuthorizationCode :: Lens' VerifyPasswordResponse (Maybe Text) +vprOauthAuthorizationCode + = lens _vprOauthAuthorizationCode + (\ s a -> s{_vprOauthAuthorizationCode = a}) + +instance FromJSON VerifyPasswordResponse where + parseJSON + = withObject "VerifyPasswordResponse" + (\ o -> + VerifyPasswordResponse <$> + (o .:? "email") <*> (o .:? "photoUrl") <*> + (o .:? "oauthAccessToken") + <*> + (o .:? "kind" .!= + "identitytoolkit#VerifyPasswordResponse") + <*> (o .:? "oauthExpireIn") + <*> (o .:? "displayName") + <*> (o .:? "localId") + <*> (o .:? "registered") + <*> (o .:? "idToken") + <*> (o .:? "oauthAuthorizationCode")) + +instance ToJSON VerifyPasswordResponse where + toJSON VerifyPasswordResponse{..} + = object + (catMaybes + [("email" .=) <$> _vprEmail, + ("photoUrl" .=) <$> _vprPhotoUrl, + ("oauthAccessToken" .=) <$> _vprOauthAccessToken, + Just ("kind" .= _vprKind), + ("oauthExpireIn" .=) <$> _vprOauthExpireIn, + ("displayName" .=) <$> _vprDisplayName, + ("localId" .=) <$> _vprLocalId, + ("registered" .=) <$> _vprRegistered, + ("idToken" .=) <$> _vprIdToken, + ("oauthAuthorizationCode" .=) <$> + _vprOauthAuthorizationCode]) + +-- | Response of verifying the IDP assertion. +-- +-- /See:/ 'verifyAssertionResponse' smart constructor. +data VerifyAssertionResponse = VerifyAssertionResponse + { _varProviderId :: !(Maybe Text) + , _varFullName :: !(Maybe Text) + , _varEmail :: !(Maybe Text) + , _varEmailRecycled :: !(Maybe Bool) + , _varPhotoUrl :: !(Maybe Text) + , _varVerifiedProvider :: !(Maybe [Text]) + , _varContext :: !(Maybe Text) + , _varNeedConfirmation :: !(Maybe Bool) + , _varOriginalEmail :: !(Maybe Text) + , _varLastName :: !(Maybe Text) + , _varOauthAccessToken :: !(Maybe Text) + , _varDateOfBirth :: !(Maybe Text) + , _varKind :: !Text + , _varOauthExpireIn :: !(Maybe Int32) + , _varAppInstallationUrl :: !(Maybe Text) + , _varAction :: !(Maybe Text) + , _varFederatedId :: !(Maybe Text) + , _varAppScheme :: !(Maybe Text) + , _varInputEmail :: !(Maybe Text) + , _varEmailVerified :: !(Maybe Bool) + , _varLanguage :: !(Maybe Text) + , _varFirstName :: !(Maybe Text) + , _varDisplayName :: !(Maybe Text) + , _varOauthRequestToken :: !(Maybe Text) + , _varOauthScope :: !(Maybe Text) + , _varNickName :: !(Maybe Text) + , _varLocalId :: !(Maybe Text) + , _varTimeZone :: !(Maybe Text) + , _varIdToken :: !(Maybe Text) + , _varOauthAuthorizationCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VerifyAssertionResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varProviderId' +-- +-- * 'varFullName' +-- +-- * 'varEmail' +-- +-- * 'varEmailRecycled' +-- +-- * 'varPhotoUrl' +-- +-- * 'varVerifiedProvider' +-- +-- * 'varContext' +-- +-- * 'varNeedConfirmation' +-- +-- * 'varOriginalEmail' +-- +-- * 'varLastName' +-- +-- * 'varOauthAccessToken' +-- +-- * 'varDateOfBirth' +-- +-- * 'varKind' +-- +-- * 'varOauthExpireIn' +-- +-- * 'varAppInstallationUrl' +-- +-- * 'varAction' +-- +-- * 'varFederatedId' +-- +-- * 'varAppScheme' +-- +-- * 'varInputEmail' +-- +-- * 'varEmailVerified' +-- +-- * 'varLanguage' +-- +-- * 'varFirstName' +-- +-- * 'varDisplayName' +-- +-- * 'varOauthRequestToken' +-- +-- * 'varOauthScope' +-- +-- * 'varNickName' +-- +-- * 'varLocalId' +-- +-- * 'varTimeZone' +-- +-- * 'varIdToken' +-- +-- * 'varOauthAuthorizationCode' +verifyAssertionResponse + :: VerifyAssertionResponse +verifyAssertionResponse = + VerifyAssertionResponse + { _varProviderId = Nothing + , _varFullName = Nothing + , _varEmail = Nothing + , _varEmailRecycled = Nothing + , _varPhotoUrl = Nothing + , _varVerifiedProvider = Nothing + , _varContext = Nothing + , _varNeedConfirmation = Nothing + , _varOriginalEmail = Nothing + , _varLastName = Nothing + , _varOauthAccessToken = Nothing + , _varDateOfBirth = Nothing + , _varKind = "identitytoolkit#VerifyAssertionResponse" + , _varOauthExpireIn = Nothing + , _varAppInstallationUrl = Nothing + , _varAction = Nothing + , _varFederatedId = Nothing + , _varAppScheme = Nothing + , _varInputEmail = Nothing + , _varEmailVerified = Nothing + , _varLanguage = Nothing + , _varFirstName = Nothing + , _varDisplayName = Nothing + , _varOauthRequestToken = Nothing + , _varOauthScope = Nothing + , _varNickName = Nothing + , _varLocalId = Nothing + , _varTimeZone = Nothing + , _varIdToken = Nothing + , _varOauthAuthorizationCode = Nothing + } + +-- | The IdP ID. For white listed IdPs it\'s a short domain name e.g. +-- google.com, aol.com, live.net and yahoo.com. If the \"providerId\" param +-- is set to OpenID OP identifer other than the whilte listed IdPs the OP +-- identifier is returned. If the \"identifier\" param is federated ID in +-- the createAuthUri request. The domain part of the federated ID is +-- returned. +varProviderId :: Lens' VerifyAssertionResponse (Maybe Text) +varProviderId + = lens _varProviderId + (\ s a -> s{_varProviderId = a}) + +-- | The full name of the user. +varFullName :: Lens' VerifyAssertionResponse (Maybe Text) +varFullName + = lens _varFullName (\ s a -> s{_varFullName = a}) + +-- | The email returned by the IdP. NOTE: The federated login user may not +-- own the email. +varEmail :: Lens' VerifyAssertionResponse (Maybe Text) +varEmail = lens _varEmail (\ s a -> s{_varEmail = a}) + +-- | It\'s true if the email is recycled. +varEmailRecycled :: Lens' VerifyAssertionResponse (Maybe Bool) +varEmailRecycled + = lens _varEmailRecycled + (\ s a -> s{_varEmailRecycled = a}) + +-- | The URI of the public accessible profiel picture. +varPhotoUrl :: Lens' VerifyAssertionResponse (Maybe Text) +varPhotoUrl + = lens _varPhotoUrl (\ s a -> s{_varPhotoUrl = a}) + +-- | When action is \'map\', contains the idps which can be used for +-- confirmation. +varVerifiedProvider :: Lens' VerifyAssertionResponse [Text] +varVerifiedProvider + = lens _varVerifiedProvider + (\ s a -> s{_varVerifiedProvider = a}) + . _Default + . _Coerce + +-- | The opaque value used by the client to maintain context info between the +-- authentication request and the IDP callback. +varContext :: Lens' VerifyAssertionResponse (Maybe Text) +varContext + = lens _varContext (\ s a -> s{_varContext = a}) + +-- | Whether the assertion is from a non-trusted IDP and need account linking +-- confirmation. +varNeedConfirmation :: Lens' VerifyAssertionResponse (Maybe Bool) +varNeedConfirmation + = lens _varNeedConfirmation + (\ s a -> s{_varNeedConfirmation = a}) + +-- | The original email stored in the mapping storage. It\'s returned when +-- the federated ID is associated to a different email. +varOriginalEmail :: Lens' VerifyAssertionResponse (Maybe Text) +varOriginalEmail + = lens _varOriginalEmail + (\ s a -> s{_varOriginalEmail = a}) + +-- | The last name of the user. +varLastName :: Lens' VerifyAssertionResponse (Maybe Text) +varLastName + = lens _varLastName (\ s a -> s{_varLastName = a}) + +-- | The OAuth2 access token. +varOauthAccessToken :: Lens' VerifyAssertionResponse (Maybe Text) +varOauthAccessToken + = lens _varOauthAccessToken + (\ s a -> s{_varOauthAccessToken = a}) + +-- | The birth date of the IdP account. +varDateOfBirth :: Lens' VerifyAssertionResponse (Maybe Text) +varDateOfBirth + = lens _varDateOfBirth + (\ s a -> s{_varDateOfBirth = a}) + +-- | The fixed string \"identitytoolkit#VerifyAssertionResponse\". +varKind :: Lens' VerifyAssertionResponse Text +varKind = lens _varKind (\ s a -> s{_varKind = a}) + +-- | The lifetime in seconds of the OAuth2 access token. +varOauthExpireIn :: Lens' VerifyAssertionResponse (Maybe Int32) +varOauthExpireIn + = lens _varOauthExpireIn + (\ s a -> s{_varOauthExpireIn = a}) + +-- | URL for OTA app installation. +varAppInstallationUrl :: Lens' VerifyAssertionResponse (Maybe Text) +varAppInstallationUrl + = lens _varAppInstallationUrl + (\ s a -> s{_varAppInstallationUrl = a}) + +-- | The action code. +varAction :: Lens' VerifyAssertionResponse (Maybe Text) +varAction + = lens _varAction (\ s a -> s{_varAction = a}) + +-- | The unique ID identifies the IdP account. +varFederatedId :: Lens' VerifyAssertionResponse (Maybe Text) +varFederatedId + = lens _varFederatedId + (\ s a -> s{_varFederatedId = a}) + +-- | The custom scheme used by mobile app. +varAppScheme :: Lens' VerifyAssertionResponse (Maybe Text) +varAppScheme + = lens _varAppScheme (\ s a -> s{_varAppScheme = a}) + +-- | It\'s the identifier param in the createAuthUri request if the +-- identifier is an email. It can be used to check whether the user input +-- email is different from the asserted email. +varInputEmail :: Lens' VerifyAssertionResponse (Maybe Text) +varInputEmail + = lens _varInputEmail + (\ s a -> s{_varInputEmail = a}) + +-- | The value is true if the IDP is also the email provider. It means the +-- user owns the email. +varEmailVerified :: Lens' VerifyAssertionResponse (Maybe Bool) +varEmailVerified + = lens _varEmailVerified + (\ s a -> s{_varEmailVerified = a}) + +-- | The language preference of the user. +varLanguage :: Lens' VerifyAssertionResponse (Maybe Text) +varLanguage + = lens _varLanguage (\ s a -> s{_varLanguage = a}) + +-- | The first name of the user. +varFirstName :: Lens' VerifyAssertionResponse (Maybe Text) +varFirstName + = lens _varFirstName (\ s a -> s{_varFirstName = a}) + +-- | The display name of the user. +varDisplayName :: Lens' VerifyAssertionResponse (Maybe Text) +varDisplayName + = lens _varDisplayName + (\ s a -> s{_varDisplayName = a}) + +-- | The user approved request token for the OpenID OAuth extension. +varOauthRequestToken :: Lens' VerifyAssertionResponse (Maybe Text) +varOauthRequestToken + = lens _varOauthRequestToken + (\ s a -> s{_varOauthRequestToken = a}) + +-- | The scope for the OpenID OAuth extension. +varOauthScope :: Lens' VerifyAssertionResponse (Maybe Text) +varOauthScope + = lens _varOauthScope + (\ s a -> s{_varOauthScope = a}) + +-- | The nick name of the user. +varNickName :: Lens' VerifyAssertionResponse (Maybe Text) +varNickName + = lens _varNickName (\ s a -> s{_varNickName = a}) + +-- | The RP local ID if it\'s already been mapped to the IdP account +-- identified by the federated ID. +varLocalId :: Lens' VerifyAssertionResponse (Maybe Text) +varLocalId + = lens _varLocalId (\ s a -> s{_varLocalId = a}) + +-- | The timezone of the user. +varTimeZone :: Lens' VerifyAssertionResponse (Maybe Text) +varTimeZone + = lens _varTimeZone (\ s a -> s{_varTimeZone = a}) + +-- | The ID token. +varIdToken :: Lens' VerifyAssertionResponse (Maybe Text) +varIdToken + = lens _varIdToken (\ s a -> s{_varIdToken = a}) + +-- | The OAuth2 authorization code. +varOauthAuthorizationCode :: Lens' VerifyAssertionResponse (Maybe Text) +varOauthAuthorizationCode + = lens _varOauthAuthorizationCode + (\ s a -> s{_varOauthAuthorizationCode = a}) + +instance FromJSON VerifyAssertionResponse where + parseJSON + = withObject "VerifyAssertionResponse" + (\ o -> + VerifyAssertionResponse <$> + (o .:? "providerId") <*> (o .:? "fullName") <*> + (o .:? "email") + <*> (o .:? "emailRecycled") + <*> (o .:? "photoUrl") + <*> (o .:? "verifiedProvider" .!= mempty) + <*> (o .:? "context") + <*> (o .:? "needConfirmation") + <*> (o .:? "originalEmail") + <*> (o .:? "lastName") + <*> (o .:? "oauthAccessToken") + <*> (o .:? "dateOfBirth") + <*> + (o .:? "kind" .!= + "identitytoolkit#VerifyAssertionResponse") + <*> (o .:? "oauthExpireIn") + <*> (o .:? "appInstallationUrl") + <*> (o .:? "action") + <*> (o .:? "federatedId") + <*> (o .:? "appScheme") + <*> (o .:? "inputEmail") + <*> (o .:? "emailVerified") + <*> (o .:? "language") + <*> (o .:? "firstName") + <*> (o .:? "displayName") + <*> (o .:? "oauthRequestToken") + <*> (o .:? "oauthScope") + <*> (o .:? "nickName") + <*> (o .:? "localId") + <*> (o .:? "timeZone") + <*> (o .:? "idToken") + <*> (o .:? "oauthAuthorizationCode")) + +instance ToJSON VerifyAssertionResponse where + toJSON VerifyAssertionResponse{..} + = object + (catMaybes + [("providerId" .=) <$> _varProviderId, + ("fullName" .=) <$> _varFullName, + ("email" .=) <$> _varEmail, + ("emailRecycled" .=) <$> _varEmailRecycled, + ("photoUrl" .=) <$> _varPhotoUrl, + ("verifiedProvider" .=) <$> _varVerifiedProvider, + ("context" .=) <$> _varContext, + ("needConfirmation" .=) <$> _varNeedConfirmation, + ("originalEmail" .=) <$> _varOriginalEmail, + ("lastName" .=) <$> _varLastName, + ("oauthAccessToken" .=) <$> _varOauthAccessToken, + ("dateOfBirth" .=) <$> _varDateOfBirth, + Just ("kind" .= _varKind), + ("oauthExpireIn" .=) <$> _varOauthExpireIn, + ("appInstallationUrl" .=) <$> _varAppInstallationUrl, + ("action" .=) <$> _varAction, + ("federatedId" .=) <$> _varFederatedId, + ("appScheme" .=) <$> _varAppScheme, + ("inputEmail" .=) <$> _varInputEmail, + ("emailVerified" .=) <$> _varEmailVerified, + ("language" .=) <$> _varLanguage, + ("firstName" .=) <$> _varFirstName, + ("displayName" .=) <$> _varDisplayName, + ("oauthRequestToken" .=) <$> _varOauthRequestToken, + ("oauthScope" .=) <$> _varOauthScope, + ("nickName" .=) <$> _varNickName, + ("localId" .=) <$> _varLocalId, + ("timeZone" .=) <$> _varTimeZone, + ("idToken" .=) <$> _varIdToken, + ("oauthAuthorizationCode" .=) <$> + _varOauthAuthorizationCode]) + +-- | Respone of setting the account information. +-- +-- /See:/ 'setAccountInfoResponse' smart constructor. +data SetAccountInfoResponse = SetAccountInfoResponse + { _sairEmail :: !(Maybe Text) + , _sairKind :: !Text + , _sairProviderUserInfo :: !(Maybe [SetAccountInfoResponseProviderUserInfoItem]) + , _sairDisplayName :: !(Maybe Text) + , _sairNewEmail :: !(Maybe Text) + , _sairIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SetAccountInfoResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sairEmail' +-- +-- * 'sairKind' +-- +-- * 'sairProviderUserInfo' +-- +-- * 'sairDisplayName' +-- +-- * 'sairNewEmail' +-- +-- * 'sairIdToken' +setAccountInfoResponse + :: SetAccountInfoResponse +setAccountInfoResponse = + SetAccountInfoResponse + { _sairEmail = Nothing + , _sairKind = "identitytoolkit#SetAccountInfoResponse" + , _sairProviderUserInfo = Nothing + , _sairDisplayName = Nothing + , _sairNewEmail = Nothing + , _sairIdToken = Nothing + } + +-- | The email of the user. +sairEmail :: Lens' SetAccountInfoResponse (Maybe Text) +sairEmail + = lens _sairEmail (\ s a -> s{_sairEmail = a}) + +-- | The fixed string \"identitytoolkit#SetAccountInfoResponse\". +sairKind :: Lens' SetAccountInfoResponse Text +sairKind = lens _sairKind (\ s a -> s{_sairKind = a}) + +-- | The user\'s profiles at the associated IdPs. +sairProviderUserInfo :: Lens' SetAccountInfoResponse [SetAccountInfoResponseProviderUserInfoItem] +sairProviderUserInfo + = lens _sairProviderUserInfo + (\ s a -> s{_sairProviderUserInfo = a}) + . _Default + . _Coerce + +-- | The name of the user. +sairDisplayName :: Lens' SetAccountInfoResponse (Maybe Text) +sairDisplayName + = lens _sairDisplayName + (\ s a -> s{_sairDisplayName = a}) + +-- | The new email the user attempts to change to. +sairNewEmail :: Lens' SetAccountInfoResponse (Maybe Text) +sairNewEmail + = lens _sairNewEmail (\ s a -> s{_sairNewEmail = a}) + +-- | The Gitkit id token to login the newly sign up user. +sairIdToken :: Lens' SetAccountInfoResponse (Maybe Text) +sairIdToken + = lens _sairIdToken (\ s a -> s{_sairIdToken = a}) + +instance FromJSON SetAccountInfoResponse where + parseJSON + = withObject "SetAccountInfoResponse" + (\ o -> + SetAccountInfoResponse <$> + (o .:? "email") <*> + (o .:? "kind" .!= + "identitytoolkit#SetAccountInfoResponse") + <*> (o .:? "providerUserInfo" .!= mempty) + <*> (o .:? "displayName") + <*> (o .:? "newEmail") + <*> (o .:? "idToken")) + +instance ToJSON SetAccountInfoResponse where + toJSON SetAccountInfoResponse{..} + = object + (catMaybes + [("email" .=) <$> _sairEmail, + Just ("kind" .= _sairKind), + ("providerUserInfo" .=) <$> _sairProviderUserInfo, + ("displayName" .=) <$> _sairDisplayName, + ("newEmail" .=) <$> _sairNewEmail, + ("idToken" .=) <$> _sairIdToken]) + +-- | Response of getting recaptcha param. +-- +-- /See:/ 'getRecaptchaParamResponse' smart constructor. +data GetRecaptchaParamResponse = GetRecaptchaParamResponse + { _grprRecaptchaSiteKey :: !(Maybe Text) + , _grprKind :: !Text + , _grprRecaptchaStoken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetRecaptchaParamResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'grprRecaptchaSiteKey' +-- +-- * 'grprKind' +-- +-- * 'grprRecaptchaStoken' +getRecaptchaParamResponse + :: GetRecaptchaParamResponse +getRecaptchaParamResponse = + GetRecaptchaParamResponse + { _grprRecaptchaSiteKey = Nothing + , _grprKind = "identitytoolkit#GetRecaptchaParamResponse" + , _grprRecaptchaStoken = Nothing + } + +-- | Site key registered at recaptcha. +grprRecaptchaSiteKey :: Lens' GetRecaptchaParamResponse (Maybe Text) +grprRecaptchaSiteKey + = lens _grprRecaptchaSiteKey + (\ s a -> s{_grprRecaptchaSiteKey = a}) + +-- | The fixed string \"identitytoolkit#GetRecaptchaParamResponse\". +grprKind :: Lens' GetRecaptchaParamResponse Text +grprKind = lens _grprKind (\ s a -> s{_grprKind = a}) + +-- | The stoken field for the recaptcha widget, used to request captcha +-- challenge. +grprRecaptchaStoken :: Lens' GetRecaptchaParamResponse (Maybe Text) +grprRecaptchaStoken + = lens _grprRecaptchaStoken + (\ s a -> s{_grprRecaptchaStoken = a}) + +instance FromJSON GetRecaptchaParamResponse where + parseJSON + = withObject "GetRecaptchaParamResponse" + (\ o -> + GetRecaptchaParamResponse <$> + (o .:? "recaptchaSiteKey") <*> + (o .:? "kind" .!= + "identitytoolkit#GetRecaptchaParamResponse") + <*> (o .:? "recaptchaStoken")) + +instance ToJSON GetRecaptchaParamResponse where + toJSON GetRecaptchaParamResponse{..} + = object + (catMaybes + [("recaptchaSiteKey" .=) <$> _grprRecaptchaSiteKey, + Just ("kind" .= _grprKind), + ("recaptchaStoken" .=) <$> _grprRecaptchaStoken]) diff --git a/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Sum.hs b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Sum.hs new file mode 100644 index 000000000..b9232b9b5 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.IdentityToolkit.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.IdentityToolkit.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/CreateAuthURI.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/CreateAuthURI.hs new file mode 100644 index 000000000..a1c557b72 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/CreateAuthURI.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.CreateAuthURI +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates the URI used by the IdP to authenticate the user. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyCreateAuthURI@. +module IdentityToolkit.Relyingparty.CreateAuthURI + ( + -- * REST Resource + RelyingpartyCreateAuthURIAPI + + -- * Creating a Request + , relyingpartyCreateAuthURI + , RelyingpartyCreateAuthURI + + -- * Request Lenses + , rcauQuotaUser + , rcauPrettyPrint + , rcauUserIp + , rcauKey + , rcauOauthToken + , rcauFields + , rcauAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyCreateAuthURI@ which the +-- 'RelyingpartyCreateAuthURI' request conforms to. +type RelyingpartyCreateAuthURIAPI = + "createAuthUri" :> Post '[JSON] CreateAuthURIResponse + +-- | Creates the URI used by the IdP to authenticate the user. +-- +-- /See:/ 'relyingpartyCreateAuthURI' smart constructor. +data RelyingpartyCreateAuthURI = RelyingpartyCreateAuthURI + { _rcauQuotaUser :: !(Maybe Text) + , _rcauPrettyPrint :: !Bool + , _rcauUserIp :: !(Maybe Text) + , _rcauKey :: !(Maybe Text) + , _rcauOauthToken :: !(Maybe Text) + , _rcauFields :: !(Maybe Text) + , _rcauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyCreateAuthURI'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcauQuotaUser' +-- +-- * 'rcauPrettyPrint' +-- +-- * 'rcauUserIp' +-- +-- * 'rcauKey' +-- +-- * 'rcauOauthToken' +-- +-- * 'rcauFields' +-- +-- * 'rcauAlt' +relyingpartyCreateAuthURI + :: RelyingpartyCreateAuthURI +relyingpartyCreateAuthURI = + RelyingpartyCreateAuthURI + { _rcauQuotaUser = Nothing + , _rcauPrettyPrint = True + , _rcauUserIp = Nothing + , _rcauKey = Nothing + , _rcauOauthToken = Nothing + , _rcauFields = Nothing + , _rcauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcauQuotaUser :: Lens' RelyingpartyCreateAuthURI' (Maybe Text) +rcauQuotaUser + = lens _rcauQuotaUser + (\ s a -> s{_rcauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcauPrettyPrint :: Lens' RelyingpartyCreateAuthURI' Bool +rcauPrettyPrint + = lens _rcauPrettyPrint + (\ s a -> s{_rcauPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcauUserIp :: Lens' RelyingpartyCreateAuthURI' (Maybe Text) +rcauUserIp + = lens _rcauUserIp (\ s a -> s{_rcauUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcauKey :: Lens' RelyingpartyCreateAuthURI' (Maybe Text) +rcauKey = lens _rcauKey (\ s a -> s{_rcauKey = a}) + +-- | OAuth 2.0 token for the current user. +rcauOauthToken :: Lens' RelyingpartyCreateAuthURI' (Maybe Text) +rcauOauthToken + = lens _rcauOauthToken + (\ s a -> s{_rcauOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcauFields :: Lens' RelyingpartyCreateAuthURI' (Maybe Text) +rcauFields + = lens _rcauFields (\ s a -> s{_rcauFields = a}) + +-- | Data format for the response. +rcauAlt :: Lens' RelyingpartyCreateAuthURI' Text +rcauAlt = lens _rcauAlt (\ s a -> s{_rcauAlt = a}) + +instance GoogleRequest RelyingpartyCreateAuthURI' + where + type Rs RelyingpartyCreateAuthURI' = + CreateAuthURIResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyCreateAuthURI{..} + = go _rcauQuotaUser _rcauPrettyPrint _rcauUserIp + _rcauKey + _rcauOauthToken + _rcauFields + _rcauAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyCreateAuthURIAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DeleteAccount.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DeleteAccount.hs new file mode 100644 index 000000000..525d243b3 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DeleteAccount.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.DeleteAccount +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete user account. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyDeleteAccount@. +module IdentityToolkit.Relyingparty.DeleteAccount + ( + -- * REST Resource + RelyingpartyDeleteAccountAPI + + -- * Creating a Request + , relyingpartyDeleteAccount + , RelyingpartyDeleteAccount + + -- * Request Lenses + , rdaQuotaUser + , rdaPrettyPrint + , rdaUserIp + , rdaKey + , rdaOauthToken + , rdaFields + , rdaAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyDeleteAccount@ which the +-- 'RelyingpartyDeleteAccount' request conforms to. +type RelyingpartyDeleteAccountAPI = + "deleteAccount" :> Post '[JSON] DeleteAccountResponse + +-- | Delete user account. +-- +-- /See:/ 'relyingpartyDeleteAccount' smart constructor. +data RelyingpartyDeleteAccount = RelyingpartyDeleteAccount + { _rdaQuotaUser :: !(Maybe Text) + , _rdaPrettyPrint :: !Bool + , _rdaUserIp :: !(Maybe Text) + , _rdaKey :: !(Maybe Text) + , _rdaOauthToken :: !(Maybe Text) + , _rdaFields :: !(Maybe Text) + , _rdaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyDeleteAccount'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdaQuotaUser' +-- +-- * 'rdaPrettyPrint' +-- +-- * 'rdaUserIp' +-- +-- * 'rdaKey' +-- +-- * 'rdaOauthToken' +-- +-- * 'rdaFields' +-- +-- * 'rdaAlt' +relyingpartyDeleteAccount + :: RelyingpartyDeleteAccount +relyingpartyDeleteAccount = + RelyingpartyDeleteAccount + { _rdaQuotaUser = Nothing + , _rdaPrettyPrint = True + , _rdaUserIp = Nothing + , _rdaKey = Nothing + , _rdaOauthToken = Nothing + , _rdaFields = Nothing + , _rdaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdaQuotaUser :: Lens' RelyingpartyDeleteAccount' (Maybe Text) +rdaQuotaUser + = lens _rdaQuotaUser (\ s a -> s{_rdaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdaPrettyPrint :: Lens' RelyingpartyDeleteAccount' Bool +rdaPrettyPrint + = lens _rdaPrettyPrint + (\ s a -> s{_rdaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdaUserIp :: Lens' RelyingpartyDeleteAccount' (Maybe Text) +rdaUserIp + = lens _rdaUserIp (\ s a -> s{_rdaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdaKey :: Lens' RelyingpartyDeleteAccount' (Maybe Text) +rdaKey = lens _rdaKey (\ s a -> s{_rdaKey = a}) + +-- | OAuth 2.0 token for the current user. +rdaOauthToken :: Lens' RelyingpartyDeleteAccount' (Maybe Text) +rdaOauthToken + = lens _rdaOauthToken + (\ s a -> s{_rdaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdaFields :: Lens' RelyingpartyDeleteAccount' (Maybe Text) +rdaFields + = lens _rdaFields (\ s a -> s{_rdaFields = a}) + +-- | Data format for the response. +rdaAlt :: Lens' RelyingpartyDeleteAccount' Text +rdaAlt = lens _rdaAlt (\ s a -> s{_rdaAlt = a}) + +instance GoogleRequest RelyingpartyDeleteAccount' + where + type Rs RelyingpartyDeleteAccount' = + DeleteAccountResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyDeleteAccount{..} + = go _rdaQuotaUser _rdaPrettyPrint _rdaUserIp _rdaKey + _rdaOauthToken + _rdaFields + _rdaAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyDeleteAccountAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DownloadAccount.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DownloadAccount.hs new file mode 100644 index 000000000..6b486bb36 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/DownloadAccount.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.DownloadAccount +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Batch download user accounts. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyDownloadAccount@. +module IdentityToolkit.Relyingparty.DownloadAccount + ( + -- * REST Resource + RelyingpartyDownloadAccountAPI + + -- * Creating a Request + , relyingpartyDownloadAccount + , RelyingpartyDownloadAccount + + -- * Request Lenses + , relQuotaUser + , relPrettyPrint + , relUserIp + , relKey + , relOauthToken + , relFields + , relAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyDownloadAccount@ which the +-- 'RelyingpartyDownloadAccount' request conforms to. +type RelyingpartyDownloadAccountAPI = + "downloadAccount" :> + Post '[JSON] DownloadAccountResponse + +-- | Batch download user accounts. +-- +-- /See:/ 'relyingpartyDownloadAccount' smart constructor. +data RelyingpartyDownloadAccount = RelyingpartyDownloadAccount + { _relQuotaUser :: !(Maybe Text) + , _relPrettyPrint :: !Bool + , _relUserIp :: !(Maybe Text) + , _relKey :: !(Maybe Text) + , _relOauthToken :: !(Maybe Text) + , _relFields :: !(Maybe Text) + , _relAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyDownloadAccount'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'relQuotaUser' +-- +-- * 'relPrettyPrint' +-- +-- * 'relUserIp' +-- +-- * 'relKey' +-- +-- * 'relOauthToken' +-- +-- * 'relFields' +-- +-- * 'relAlt' +relyingpartyDownloadAccount + :: RelyingpartyDownloadAccount +relyingpartyDownloadAccount = + RelyingpartyDownloadAccount + { _relQuotaUser = Nothing + , _relPrettyPrint = True + , _relUserIp = Nothing + , _relKey = Nothing + , _relOauthToken = Nothing + , _relFields = Nothing + , _relAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +relQuotaUser :: Lens' RelyingpartyDownloadAccount' (Maybe Text) +relQuotaUser + = lens _relQuotaUser (\ s a -> s{_relQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +relPrettyPrint :: Lens' RelyingpartyDownloadAccount' Bool +relPrettyPrint + = lens _relPrettyPrint + (\ s a -> s{_relPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +relUserIp :: Lens' RelyingpartyDownloadAccount' (Maybe Text) +relUserIp + = lens _relUserIp (\ s a -> s{_relUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +relKey :: Lens' RelyingpartyDownloadAccount' (Maybe Text) +relKey = lens _relKey (\ s a -> s{_relKey = a}) + +-- | OAuth 2.0 token for the current user. +relOauthToken :: Lens' RelyingpartyDownloadAccount' (Maybe Text) +relOauthToken + = lens _relOauthToken + (\ s a -> s{_relOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +relFields :: Lens' RelyingpartyDownloadAccount' (Maybe Text) +relFields + = lens _relFields (\ s a -> s{_relFields = a}) + +-- | Data format for the response. +relAlt :: Lens' RelyingpartyDownloadAccount' Text +relAlt = lens _relAlt (\ s a -> s{_relAlt = a}) + +instance GoogleRequest RelyingpartyDownloadAccount' + where + type Rs RelyingpartyDownloadAccount' = + DownloadAccountResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyDownloadAccount{..} + = go _relQuotaUser _relPrettyPrint _relUserIp _relKey + _relOauthToken + _relFields + _relAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyDownloadAccountAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetAccountInfo.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetAccountInfo.hs new file mode 100644 index 000000000..245fe7c09 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetAccountInfo.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.GetAccountInfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the account info. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyGetAccountInfo@. +module IdentityToolkit.Relyingparty.GetAccountInfo + ( + -- * REST Resource + RelyingpartyGetAccountInfoAPI + + -- * Creating a Request + , relyingpartyGetAccountInfo + , RelyingpartyGetAccountInfo + + -- * Request Lenses + , rgaiQuotaUser + , rgaiPrettyPrint + , rgaiUserIp + , rgaiKey + , rgaiOauthToken + , rgaiFields + , rgaiAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyGetAccountInfo@ which the +-- 'RelyingpartyGetAccountInfo' request conforms to. +type RelyingpartyGetAccountInfoAPI = + "getAccountInfo" :> + Post '[JSON] GetAccountInfoResponse + +-- | Returns the account info. +-- +-- /See:/ 'relyingpartyGetAccountInfo' smart constructor. +data RelyingpartyGetAccountInfo = RelyingpartyGetAccountInfo + { _rgaiQuotaUser :: !(Maybe Text) + , _rgaiPrettyPrint :: !Bool + , _rgaiUserIp :: !(Maybe Text) + , _rgaiKey :: !(Maybe Text) + , _rgaiOauthToken :: !(Maybe Text) + , _rgaiFields :: !(Maybe Text) + , _rgaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyGetAccountInfo'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgaiQuotaUser' +-- +-- * 'rgaiPrettyPrint' +-- +-- * 'rgaiUserIp' +-- +-- * 'rgaiKey' +-- +-- * 'rgaiOauthToken' +-- +-- * 'rgaiFields' +-- +-- * 'rgaiAlt' +relyingpartyGetAccountInfo + :: RelyingpartyGetAccountInfo +relyingpartyGetAccountInfo = + RelyingpartyGetAccountInfo + { _rgaiQuotaUser = Nothing + , _rgaiPrettyPrint = True + , _rgaiUserIp = Nothing + , _rgaiKey = Nothing + , _rgaiOauthToken = Nothing + , _rgaiFields = Nothing + , _rgaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgaiQuotaUser :: Lens' RelyingpartyGetAccountInfo' (Maybe Text) +rgaiQuotaUser + = lens _rgaiQuotaUser + (\ s a -> s{_rgaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgaiPrettyPrint :: Lens' RelyingpartyGetAccountInfo' Bool +rgaiPrettyPrint + = lens _rgaiPrettyPrint + (\ s a -> s{_rgaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgaiUserIp :: Lens' RelyingpartyGetAccountInfo' (Maybe Text) +rgaiUserIp + = lens _rgaiUserIp (\ s a -> s{_rgaiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgaiKey :: Lens' RelyingpartyGetAccountInfo' (Maybe Text) +rgaiKey = lens _rgaiKey (\ s a -> s{_rgaiKey = a}) + +-- | OAuth 2.0 token for the current user. +rgaiOauthToken :: Lens' RelyingpartyGetAccountInfo' (Maybe Text) +rgaiOauthToken + = lens _rgaiOauthToken + (\ s a -> s{_rgaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgaiFields :: Lens' RelyingpartyGetAccountInfo' (Maybe Text) +rgaiFields + = lens _rgaiFields (\ s a -> s{_rgaiFields = a}) + +-- | Data format for the response. +rgaiAlt :: Lens' RelyingpartyGetAccountInfo' Text +rgaiAlt = lens _rgaiAlt (\ s a -> s{_rgaiAlt = a}) + +instance GoogleRequest RelyingpartyGetAccountInfo' + where + type Rs RelyingpartyGetAccountInfo' = + GetAccountInfoResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyGetAccountInfo{..} + = go _rgaiQuotaUser _rgaiPrettyPrint _rgaiUserIp + _rgaiKey + _rgaiOauthToken + _rgaiFields + _rgaiAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyGetAccountInfoAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetOobConfirmationCode.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetOobConfirmationCode.hs new file mode 100644 index 000000000..570cce146 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetOobConfirmationCode.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.GetOobConfirmationCode +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a code for user action confirmation. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyGetOobConfirmationCode@. +module IdentityToolkit.Relyingparty.GetOobConfirmationCode + ( + -- * REST Resource + RelyingpartyGetOobConfirmationCodeAPI + + -- * Creating a Request + , relyingpartyGetOobConfirmationCode + , RelyingpartyGetOobConfirmationCode + + -- * Request Lenses + , rgoccQuotaUser + , rgoccPrettyPrint + , rgoccUserIp + , rgoccKey + , rgoccOauthToken + , rgoccFields + , rgoccAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyGetOobConfirmationCode@ which the +-- 'RelyingpartyGetOobConfirmationCode' request conforms to. +type RelyingpartyGetOobConfirmationCodeAPI = + "getOobConfirmationCode" :> + Post '[JSON] GetOobConfirmationCodeResponse + +-- | Get a code for user action confirmation. +-- +-- /See:/ 'relyingpartyGetOobConfirmationCode' smart constructor. +data RelyingpartyGetOobConfirmationCode = RelyingpartyGetOobConfirmationCode + { _rgoccQuotaUser :: !(Maybe Text) + , _rgoccPrettyPrint :: !Bool + , _rgoccUserIp :: !(Maybe Text) + , _rgoccKey :: !(Maybe Text) + , _rgoccOauthToken :: !(Maybe Text) + , _rgoccFields :: !(Maybe Text) + , _rgoccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyGetOobConfirmationCode'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgoccQuotaUser' +-- +-- * 'rgoccPrettyPrint' +-- +-- * 'rgoccUserIp' +-- +-- * 'rgoccKey' +-- +-- * 'rgoccOauthToken' +-- +-- * 'rgoccFields' +-- +-- * 'rgoccAlt' +relyingpartyGetOobConfirmationCode + :: RelyingpartyGetOobConfirmationCode +relyingpartyGetOobConfirmationCode = + RelyingpartyGetOobConfirmationCode + { _rgoccQuotaUser = Nothing + , _rgoccPrettyPrint = True + , _rgoccUserIp = Nothing + , _rgoccKey = Nothing + , _rgoccOauthToken = Nothing + , _rgoccFields = Nothing + , _rgoccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgoccQuotaUser :: Lens' RelyingpartyGetOobConfirmationCode' (Maybe Text) +rgoccQuotaUser + = lens _rgoccQuotaUser + (\ s a -> s{_rgoccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgoccPrettyPrint :: Lens' RelyingpartyGetOobConfirmationCode' Bool +rgoccPrettyPrint + = lens _rgoccPrettyPrint + (\ s a -> s{_rgoccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgoccUserIp :: Lens' RelyingpartyGetOobConfirmationCode' (Maybe Text) +rgoccUserIp + = lens _rgoccUserIp (\ s a -> s{_rgoccUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgoccKey :: Lens' RelyingpartyGetOobConfirmationCode' (Maybe Text) +rgoccKey = lens _rgoccKey (\ s a -> s{_rgoccKey = a}) + +-- | OAuth 2.0 token for the current user. +rgoccOauthToken :: Lens' RelyingpartyGetOobConfirmationCode' (Maybe Text) +rgoccOauthToken + = lens _rgoccOauthToken + (\ s a -> s{_rgoccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgoccFields :: Lens' RelyingpartyGetOobConfirmationCode' (Maybe Text) +rgoccFields + = lens _rgoccFields (\ s a -> s{_rgoccFields = a}) + +-- | Data format for the response. +rgoccAlt :: Lens' RelyingpartyGetOobConfirmationCode' Text +rgoccAlt = lens _rgoccAlt (\ s a -> s{_rgoccAlt = a}) + +instance GoogleRequest + RelyingpartyGetOobConfirmationCode' where + type Rs RelyingpartyGetOobConfirmationCode' = + GetOobConfirmationCodeResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u + RelyingpartyGetOobConfirmationCode{..} + = go _rgoccQuotaUser _rgoccPrettyPrint _rgoccUserIp + _rgoccKey + _rgoccOauthToken + _rgoccFields + _rgoccAlt + where go + = clientWithRoute + (Proxy :: + Proxy RelyingpartyGetOobConfirmationCodeAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetPublicKeys.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetPublicKeys.hs new file mode 100644 index 000000000..6bd83386d --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetPublicKeys.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.GetPublicKeys +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get token signing public key. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyGetPublicKeys@. +module IdentityToolkit.Relyingparty.GetPublicKeys + ( + -- * REST Resource + RelyingpartyGetPublicKeysAPI + + -- * Creating a Request + , relyingpartyGetPublicKeys + , RelyingpartyGetPublicKeys + + -- * Request Lenses + , rgpkQuotaUser + , rgpkPrettyPrint + , rgpkUserIp + , rgpkKey + , rgpkOauthToken + , rgpkFields + , rgpkAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyGetPublicKeys@ which the +-- 'RelyingpartyGetPublicKeys' request conforms to. +type RelyingpartyGetPublicKeysAPI = + "publicKeys" :> + Get '[JSON] + IdentitytoolkitRelyingpartyGetPublicKeysResponse + +-- | Get token signing public key. +-- +-- /See:/ 'relyingpartyGetPublicKeys' smart constructor. +data RelyingpartyGetPublicKeys = RelyingpartyGetPublicKeys + { _rgpkQuotaUser :: !(Maybe Text) + , _rgpkPrettyPrint :: !Bool + , _rgpkUserIp :: !(Maybe Text) + , _rgpkKey :: !(Maybe Text) + , _rgpkOauthToken :: !(Maybe Text) + , _rgpkFields :: !(Maybe Text) + , _rgpkAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyGetPublicKeys'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgpkQuotaUser' +-- +-- * 'rgpkPrettyPrint' +-- +-- * 'rgpkUserIp' +-- +-- * 'rgpkKey' +-- +-- * 'rgpkOauthToken' +-- +-- * 'rgpkFields' +-- +-- * 'rgpkAlt' +relyingpartyGetPublicKeys + :: RelyingpartyGetPublicKeys +relyingpartyGetPublicKeys = + RelyingpartyGetPublicKeys + { _rgpkQuotaUser = Nothing + , _rgpkPrettyPrint = True + , _rgpkUserIp = Nothing + , _rgpkKey = Nothing + , _rgpkOauthToken = Nothing + , _rgpkFields = Nothing + , _rgpkAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgpkQuotaUser :: Lens' RelyingpartyGetPublicKeys' (Maybe Text) +rgpkQuotaUser + = lens _rgpkQuotaUser + (\ s a -> s{_rgpkQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgpkPrettyPrint :: Lens' RelyingpartyGetPublicKeys' Bool +rgpkPrettyPrint + = lens _rgpkPrettyPrint + (\ s a -> s{_rgpkPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgpkUserIp :: Lens' RelyingpartyGetPublicKeys' (Maybe Text) +rgpkUserIp + = lens _rgpkUserIp (\ s a -> s{_rgpkUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgpkKey :: Lens' RelyingpartyGetPublicKeys' (Maybe Text) +rgpkKey = lens _rgpkKey (\ s a -> s{_rgpkKey = a}) + +-- | OAuth 2.0 token for the current user. +rgpkOauthToken :: Lens' RelyingpartyGetPublicKeys' (Maybe Text) +rgpkOauthToken + = lens _rgpkOauthToken + (\ s a -> s{_rgpkOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgpkFields :: Lens' RelyingpartyGetPublicKeys' (Maybe Text) +rgpkFields + = lens _rgpkFields (\ s a -> s{_rgpkFields = a}) + +-- | Data format for the response. +rgpkAlt :: Lens' RelyingpartyGetPublicKeys' Text +rgpkAlt = lens _rgpkAlt (\ s a -> s{_rgpkAlt = a}) + +instance GoogleRequest RelyingpartyGetPublicKeys' + where + type Rs RelyingpartyGetPublicKeys' = + IdentitytoolkitRelyingpartyGetPublicKeysResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyGetPublicKeys{..} + = go _rgpkQuotaUser _rgpkPrettyPrint _rgpkUserIp + _rgpkKey + _rgpkOauthToken + _rgpkFields + _rgpkAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyGetPublicKeysAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetRecaptchaParam.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetRecaptchaParam.hs new file mode 100644 index 000000000..d8b2bf516 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/GetRecaptchaParam.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.GetRecaptchaParam +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get recaptcha secure param. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyGetRecaptchaParam@. +module IdentityToolkit.Relyingparty.GetRecaptchaParam + ( + -- * REST Resource + RelyingpartyGetRecaptchaParamAPI + + -- * Creating a Request + , relyingpartyGetRecaptchaParam + , RelyingpartyGetRecaptchaParam + + -- * Request Lenses + , rgrpQuotaUser + , rgrpPrettyPrint + , rgrpUserIp + , rgrpKey + , rgrpOauthToken + , rgrpFields + , rgrpAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyGetRecaptchaParam@ which the +-- 'RelyingpartyGetRecaptchaParam' request conforms to. +type RelyingpartyGetRecaptchaParamAPI = + "getRecaptchaParam" :> + Get '[JSON] GetRecaptchaParamResponse + +-- | Get recaptcha secure param. +-- +-- /See:/ 'relyingpartyGetRecaptchaParam' smart constructor. +data RelyingpartyGetRecaptchaParam = RelyingpartyGetRecaptchaParam + { _rgrpQuotaUser :: !(Maybe Text) + , _rgrpPrettyPrint :: !Bool + , _rgrpUserIp :: !(Maybe Text) + , _rgrpKey :: !(Maybe Text) + , _rgrpOauthToken :: !(Maybe Text) + , _rgrpFields :: !(Maybe Text) + , _rgrpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyGetRecaptchaParam'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgrpQuotaUser' +-- +-- * 'rgrpPrettyPrint' +-- +-- * 'rgrpUserIp' +-- +-- * 'rgrpKey' +-- +-- * 'rgrpOauthToken' +-- +-- * 'rgrpFields' +-- +-- * 'rgrpAlt' +relyingpartyGetRecaptchaParam + :: RelyingpartyGetRecaptchaParam +relyingpartyGetRecaptchaParam = + RelyingpartyGetRecaptchaParam + { _rgrpQuotaUser = Nothing + , _rgrpPrettyPrint = True + , _rgrpUserIp = Nothing + , _rgrpKey = Nothing + , _rgrpOauthToken = Nothing + , _rgrpFields = Nothing + , _rgrpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgrpQuotaUser :: Lens' RelyingpartyGetRecaptchaParam' (Maybe Text) +rgrpQuotaUser + = lens _rgrpQuotaUser + (\ s a -> s{_rgrpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgrpPrettyPrint :: Lens' RelyingpartyGetRecaptchaParam' Bool +rgrpPrettyPrint + = lens _rgrpPrettyPrint + (\ s a -> s{_rgrpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgrpUserIp :: Lens' RelyingpartyGetRecaptchaParam' (Maybe Text) +rgrpUserIp + = lens _rgrpUserIp (\ s a -> s{_rgrpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgrpKey :: Lens' RelyingpartyGetRecaptchaParam' (Maybe Text) +rgrpKey = lens _rgrpKey (\ s a -> s{_rgrpKey = a}) + +-- | OAuth 2.0 token for the current user. +rgrpOauthToken :: Lens' RelyingpartyGetRecaptchaParam' (Maybe Text) +rgrpOauthToken + = lens _rgrpOauthToken + (\ s a -> s{_rgrpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgrpFields :: Lens' RelyingpartyGetRecaptchaParam' (Maybe Text) +rgrpFields + = lens _rgrpFields (\ s a -> s{_rgrpFields = a}) + +-- | Data format for the response. +rgrpAlt :: Lens' RelyingpartyGetRecaptchaParam' Text +rgrpAlt = lens _rgrpAlt (\ s a -> s{_rgrpAlt = a}) + +instance GoogleRequest RelyingpartyGetRecaptchaParam' + where + type Rs RelyingpartyGetRecaptchaParam' = + GetRecaptchaParamResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u + RelyingpartyGetRecaptchaParam{..} + = go _rgrpQuotaUser _rgrpPrettyPrint _rgrpUserIp + _rgrpKey + _rgrpOauthToken + _rgrpFields + _rgrpAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyGetRecaptchaParamAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/ResetPassword.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/ResetPassword.hs new file mode 100644 index 000000000..bf69638fa --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/ResetPassword.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.ResetPassword +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Reset password for a user. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyResetPassword@. +module IdentityToolkit.Relyingparty.ResetPassword + ( + -- * REST Resource + RelyingpartyResetPasswordAPI + + -- * Creating a Request + , relyingpartyResetPassword + , RelyingpartyResetPassword + + -- * Request Lenses + , rrpQuotaUser + , rrpPrettyPrint + , rrpUserIp + , rrpKey + , rrpOauthToken + , rrpFields + , rrpAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyResetPassword@ which the +-- 'RelyingpartyResetPassword' request conforms to. +type RelyingpartyResetPasswordAPI = + "resetPassword" :> Post '[JSON] ResetPasswordResponse + +-- | Reset password for a user. +-- +-- /See:/ 'relyingpartyResetPassword' smart constructor. +data RelyingpartyResetPassword = RelyingpartyResetPassword + { _rrpQuotaUser :: !(Maybe Text) + , _rrpPrettyPrint :: !Bool + , _rrpUserIp :: !(Maybe Text) + , _rrpKey :: !(Maybe Text) + , _rrpOauthToken :: !(Maybe Text) + , _rrpFields :: !(Maybe Text) + , _rrpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyResetPassword'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rrpQuotaUser' +-- +-- * 'rrpPrettyPrint' +-- +-- * 'rrpUserIp' +-- +-- * 'rrpKey' +-- +-- * 'rrpOauthToken' +-- +-- * 'rrpFields' +-- +-- * 'rrpAlt' +relyingpartyResetPassword + :: RelyingpartyResetPassword +relyingpartyResetPassword = + RelyingpartyResetPassword + { _rrpQuotaUser = Nothing + , _rrpPrettyPrint = True + , _rrpUserIp = Nothing + , _rrpKey = Nothing + , _rrpOauthToken = Nothing + , _rrpFields = Nothing + , _rrpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rrpQuotaUser :: Lens' RelyingpartyResetPassword' (Maybe Text) +rrpQuotaUser + = lens _rrpQuotaUser (\ s a -> s{_rrpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rrpPrettyPrint :: Lens' RelyingpartyResetPassword' Bool +rrpPrettyPrint + = lens _rrpPrettyPrint + (\ s a -> s{_rrpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rrpUserIp :: Lens' RelyingpartyResetPassword' (Maybe Text) +rrpUserIp + = lens _rrpUserIp (\ s a -> s{_rrpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rrpKey :: Lens' RelyingpartyResetPassword' (Maybe Text) +rrpKey = lens _rrpKey (\ s a -> s{_rrpKey = a}) + +-- | OAuth 2.0 token for the current user. +rrpOauthToken :: Lens' RelyingpartyResetPassword' (Maybe Text) +rrpOauthToken + = lens _rrpOauthToken + (\ s a -> s{_rrpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rrpFields :: Lens' RelyingpartyResetPassword' (Maybe Text) +rrpFields + = lens _rrpFields (\ s a -> s{_rrpFields = a}) + +-- | Data format for the response. +rrpAlt :: Lens' RelyingpartyResetPassword' Text +rrpAlt = lens _rrpAlt (\ s a -> s{_rrpAlt = a}) + +instance GoogleRequest RelyingpartyResetPassword' + where + type Rs RelyingpartyResetPassword' = + ResetPasswordResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyResetPassword{..} + = go _rrpQuotaUser _rrpPrettyPrint _rrpUserIp _rrpKey + _rrpOauthToken + _rrpFields + _rrpAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyResetPasswordAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/SetAccountInfo.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/SetAccountInfo.hs new file mode 100644 index 000000000..d72062885 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/SetAccountInfo.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.SetAccountInfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Set account info for a user. +-- +-- /See:/ for @IdentitytoolkitRelyingpartySetAccountInfo@. +module IdentityToolkit.Relyingparty.SetAccountInfo + ( + -- * REST Resource + RelyingpartySetAccountInfoAPI + + -- * Creating a Request + , relyingpartySetAccountInfo + , RelyingpartySetAccountInfo + + -- * Request Lenses + , rsaiQuotaUser + , rsaiPrettyPrint + , rsaiUserIp + , rsaiKey + , rsaiOauthToken + , rsaiFields + , rsaiAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartySetAccountInfo@ which the +-- 'RelyingpartySetAccountInfo' request conforms to. +type RelyingpartySetAccountInfoAPI = + "setAccountInfo" :> + Post '[JSON] SetAccountInfoResponse + +-- | Set account info for a user. +-- +-- /See:/ 'relyingpartySetAccountInfo' smart constructor. +data RelyingpartySetAccountInfo = RelyingpartySetAccountInfo + { _rsaiQuotaUser :: !(Maybe Text) + , _rsaiPrettyPrint :: !Bool + , _rsaiUserIp :: !(Maybe Text) + , _rsaiKey :: !(Maybe Text) + , _rsaiOauthToken :: !(Maybe Text) + , _rsaiFields :: !(Maybe Text) + , _rsaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartySetAccountInfo'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rsaiQuotaUser' +-- +-- * 'rsaiPrettyPrint' +-- +-- * 'rsaiUserIp' +-- +-- * 'rsaiKey' +-- +-- * 'rsaiOauthToken' +-- +-- * 'rsaiFields' +-- +-- * 'rsaiAlt' +relyingpartySetAccountInfo + :: RelyingpartySetAccountInfo +relyingpartySetAccountInfo = + RelyingpartySetAccountInfo + { _rsaiQuotaUser = Nothing + , _rsaiPrettyPrint = True + , _rsaiUserIp = Nothing + , _rsaiKey = Nothing + , _rsaiOauthToken = Nothing + , _rsaiFields = Nothing + , _rsaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rsaiQuotaUser :: Lens' RelyingpartySetAccountInfo' (Maybe Text) +rsaiQuotaUser + = lens _rsaiQuotaUser + (\ s a -> s{_rsaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rsaiPrettyPrint :: Lens' RelyingpartySetAccountInfo' Bool +rsaiPrettyPrint + = lens _rsaiPrettyPrint + (\ s a -> s{_rsaiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rsaiUserIp :: Lens' RelyingpartySetAccountInfo' (Maybe Text) +rsaiUserIp + = lens _rsaiUserIp (\ s a -> s{_rsaiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rsaiKey :: Lens' RelyingpartySetAccountInfo' (Maybe Text) +rsaiKey = lens _rsaiKey (\ s a -> s{_rsaiKey = a}) + +-- | OAuth 2.0 token for the current user. +rsaiOauthToken :: Lens' RelyingpartySetAccountInfo' (Maybe Text) +rsaiOauthToken + = lens _rsaiOauthToken + (\ s a -> s{_rsaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rsaiFields :: Lens' RelyingpartySetAccountInfo' (Maybe Text) +rsaiFields + = lens _rsaiFields (\ s a -> s{_rsaiFields = a}) + +-- | Data format for the response. +rsaiAlt :: Lens' RelyingpartySetAccountInfo' Text +rsaiAlt = lens _rsaiAlt (\ s a -> s{_rsaiAlt = a}) + +instance GoogleRequest RelyingpartySetAccountInfo' + where + type Rs RelyingpartySetAccountInfo' = + SetAccountInfoResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartySetAccountInfo{..} + = go _rsaiQuotaUser _rsaiPrettyPrint _rsaiUserIp + _rsaiKey + _rsaiOauthToken + _rsaiFields + _rsaiAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartySetAccountInfoAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/UploadAccount.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/UploadAccount.hs new file mode 100644 index 000000000..6332a12f0 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/UploadAccount.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.UploadAccount +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Batch upload existing user accounts. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyUploadAccount@. +module IdentityToolkit.Relyingparty.UploadAccount + ( + -- * REST Resource + RelyingpartyUploadAccountAPI + + -- * Creating a Request + , relyingpartyUploadAccount + , RelyingpartyUploadAccount + + -- * Request Lenses + , ruaQuotaUser + , ruaPrettyPrint + , ruaUserIp + , ruaKey + , ruaOauthToken + , ruaFields + , ruaAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyUploadAccount@ which the +-- 'RelyingpartyUploadAccount' request conforms to. +type RelyingpartyUploadAccountAPI = + "uploadAccount" :> Post '[JSON] UploadAccountResponse + +-- | Batch upload existing user accounts. +-- +-- /See:/ 'relyingpartyUploadAccount' smart constructor. +data RelyingpartyUploadAccount = RelyingpartyUploadAccount + { _ruaQuotaUser :: !(Maybe Text) + , _ruaPrettyPrint :: !Bool + , _ruaUserIp :: !(Maybe Text) + , _ruaKey :: !(Maybe Text) + , _ruaOauthToken :: !(Maybe Text) + , _ruaFields :: !(Maybe Text) + , _ruaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyUploadAccount'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruaQuotaUser' +-- +-- * 'ruaPrettyPrint' +-- +-- * 'ruaUserIp' +-- +-- * 'ruaKey' +-- +-- * 'ruaOauthToken' +-- +-- * 'ruaFields' +-- +-- * 'ruaAlt' +relyingpartyUploadAccount + :: RelyingpartyUploadAccount +relyingpartyUploadAccount = + RelyingpartyUploadAccount + { _ruaQuotaUser = Nothing + , _ruaPrettyPrint = True + , _ruaUserIp = Nothing + , _ruaKey = Nothing + , _ruaOauthToken = Nothing + , _ruaFields = Nothing + , _ruaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruaQuotaUser :: Lens' RelyingpartyUploadAccount' (Maybe Text) +ruaQuotaUser + = lens _ruaQuotaUser (\ s a -> s{_ruaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruaPrettyPrint :: Lens' RelyingpartyUploadAccount' Bool +ruaPrettyPrint + = lens _ruaPrettyPrint + (\ s a -> s{_ruaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruaUserIp :: Lens' RelyingpartyUploadAccount' (Maybe Text) +ruaUserIp + = lens _ruaUserIp (\ s a -> s{_ruaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruaKey :: Lens' RelyingpartyUploadAccount' (Maybe Text) +ruaKey = lens _ruaKey (\ s a -> s{_ruaKey = a}) + +-- | OAuth 2.0 token for the current user. +ruaOauthToken :: Lens' RelyingpartyUploadAccount' (Maybe Text) +ruaOauthToken + = lens _ruaOauthToken + (\ s a -> s{_ruaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ruaFields :: Lens' RelyingpartyUploadAccount' (Maybe Text) +ruaFields + = lens _ruaFields (\ s a -> s{_ruaFields = a}) + +-- | Data format for the response. +ruaAlt :: Lens' RelyingpartyUploadAccount' Text +ruaAlt = lens _ruaAlt (\ s a -> s{_ruaAlt = a}) + +instance GoogleRequest RelyingpartyUploadAccount' + where + type Rs RelyingpartyUploadAccount' = + UploadAccountResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyUploadAccount{..} + = go _ruaQuotaUser _ruaPrettyPrint _ruaUserIp _ruaKey + _ruaOauthToken + _ruaFields + _ruaAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyUploadAccountAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyAssertion.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyAssertion.hs new file mode 100644 index 000000000..b3560503e --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyAssertion.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyAssertion +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Verifies the assertion returned by the IdP. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyVerifyAssertion@. +module IdentityToolkit.Relyingparty.VerifyAssertion + ( + -- * REST Resource + RelyingpartyVerifyAssertionAPI + + -- * Creating a Request + , relyingpartyVerifyAssertion + , RelyingpartyVerifyAssertion + + -- * Request Lenses + , rvaQuotaUser + , rvaPrettyPrint + , rvaUserIp + , rvaKey + , rvaOauthToken + , rvaFields + , rvaAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyVerifyAssertion@ which the +-- 'RelyingpartyVerifyAssertion' request conforms to. +type RelyingpartyVerifyAssertionAPI = + "verifyAssertion" :> + Post '[JSON] VerifyAssertionResponse + +-- | Verifies the assertion returned by the IdP. +-- +-- /See:/ 'relyingpartyVerifyAssertion' smart constructor. +data RelyingpartyVerifyAssertion = RelyingpartyVerifyAssertion + { _rvaQuotaUser :: !(Maybe Text) + , _rvaPrettyPrint :: !Bool + , _rvaUserIp :: !(Maybe Text) + , _rvaKey :: !(Maybe Text) + , _rvaOauthToken :: !(Maybe Text) + , _rvaFields :: !(Maybe Text) + , _rvaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyVerifyAssertion'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rvaQuotaUser' +-- +-- * 'rvaPrettyPrint' +-- +-- * 'rvaUserIp' +-- +-- * 'rvaKey' +-- +-- * 'rvaOauthToken' +-- +-- * 'rvaFields' +-- +-- * 'rvaAlt' +relyingpartyVerifyAssertion + :: RelyingpartyVerifyAssertion +relyingpartyVerifyAssertion = + RelyingpartyVerifyAssertion + { _rvaQuotaUser = Nothing + , _rvaPrettyPrint = True + , _rvaUserIp = Nothing + , _rvaKey = Nothing + , _rvaOauthToken = Nothing + , _rvaFields = Nothing + , _rvaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rvaQuotaUser :: Lens' RelyingpartyVerifyAssertion' (Maybe Text) +rvaQuotaUser + = lens _rvaQuotaUser (\ s a -> s{_rvaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rvaPrettyPrint :: Lens' RelyingpartyVerifyAssertion' Bool +rvaPrettyPrint + = lens _rvaPrettyPrint + (\ s a -> s{_rvaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rvaUserIp :: Lens' RelyingpartyVerifyAssertion' (Maybe Text) +rvaUserIp + = lens _rvaUserIp (\ s a -> s{_rvaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rvaKey :: Lens' RelyingpartyVerifyAssertion' (Maybe Text) +rvaKey = lens _rvaKey (\ s a -> s{_rvaKey = a}) + +-- | OAuth 2.0 token for the current user. +rvaOauthToken :: Lens' RelyingpartyVerifyAssertion' (Maybe Text) +rvaOauthToken + = lens _rvaOauthToken + (\ s a -> s{_rvaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rvaFields :: Lens' RelyingpartyVerifyAssertion' (Maybe Text) +rvaFields + = lens _rvaFields (\ s a -> s{_rvaFields = a}) + +-- | Data format for the response. +rvaAlt :: Lens' RelyingpartyVerifyAssertion' Text +rvaAlt = lens _rvaAlt (\ s a -> s{_rvaAlt = a}) + +instance GoogleRequest RelyingpartyVerifyAssertion' + where + type Rs RelyingpartyVerifyAssertion' = + VerifyAssertionResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyVerifyAssertion{..} + = go _rvaQuotaUser _rvaPrettyPrint _rvaUserIp _rvaKey + _rvaOauthToken + _rvaFields + _rvaAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyVerifyAssertionAPI) + r + u diff --git a/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyPassword.hs b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyPassword.hs new file mode 100644 index 000000000..5fe4372e2 --- /dev/null +++ b/gogol-identity-toolkit/gen/Network/Google/Resource/IdentityToolkit/Relyingparty/VerifyPassword.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyPassword +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Verifies the user entered password. +-- +-- /See:/ for @IdentitytoolkitRelyingpartyVerifyPassword@. +module IdentityToolkit.Relyingparty.VerifyPassword + ( + -- * REST Resource + RelyingpartyVerifyPasswordAPI + + -- * Creating a Request + , relyingpartyVerifyPassword + , RelyingpartyVerifyPassword + + -- * Request Lenses + , rvpQuotaUser + , rvpPrettyPrint + , rvpUserIp + , rvpKey + , rvpOauthToken + , rvpFields + , rvpAlt + ) where + +import Network.Google.IdentityToolkit.Types +import Network.Google.Prelude + +-- | A resource alias for @IdentitytoolkitRelyingpartyVerifyPassword@ which the +-- 'RelyingpartyVerifyPassword' request conforms to. +type RelyingpartyVerifyPasswordAPI = + "verifyPassword" :> + Post '[JSON] VerifyPasswordResponse + +-- | Verifies the user entered password. +-- +-- /See:/ 'relyingpartyVerifyPassword' smart constructor. +data RelyingpartyVerifyPassword = RelyingpartyVerifyPassword + { _rvpQuotaUser :: !(Maybe Text) + , _rvpPrettyPrint :: !Bool + , _rvpUserIp :: !(Maybe Text) + , _rvpKey :: !(Maybe Text) + , _rvpOauthToken :: !(Maybe Text) + , _rvpFields :: !(Maybe Text) + , _rvpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RelyingpartyVerifyPassword'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rvpQuotaUser' +-- +-- * 'rvpPrettyPrint' +-- +-- * 'rvpUserIp' +-- +-- * 'rvpKey' +-- +-- * 'rvpOauthToken' +-- +-- * 'rvpFields' +-- +-- * 'rvpAlt' +relyingpartyVerifyPassword + :: RelyingpartyVerifyPassword +relyingpartyVerifyPassword = + RelyingpartyVerifyPassword + { _rvpQuotaUser = Nothing + , _rvpPrettyPrint = True + , _rvpUserIp = Nothing + , _rvpKey = Nothing + , _rvpOauthToken = Nothing + , _rvpFields = Nothing + , _rvpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rvpQuotaUser :: Lens' RelyingpartyVerifyPassword' (Maybe Text) +rvpQuotaUser + = lens _rvpQuotaUser (\ s a -> s{_rvpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rvpPrettyPrint :: Lens' RelyingpartyVerifyPassword' Bool +rvpPrettyPrint + = lens _rvpPrettyPrint + (\ s a -> s{_rvpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rvpUserIp :: Lens' RelyingpartyVerifyPassword' (Maybe Text) +rvpUserIp + = lens _rvpUserIp (\ s a -> s{_rvpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rvpKey :: Lens' RelyingpartyVerifyPassword' (Maybe Text) +rvpKey = lens _rvpKey (\ s a -> s{_rvpKey = a}) + +-- | OAuth 2.0 token for the current user. +rvpOauthToken :: Lens' RelyingpartyVerifyPassword' (Maybe Text) +rvpOauthToken + = lens _rvpOauthToken + (\ s a -> s{_rvpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rvpFields :: Lens' RelyingpartyVerifyPassword' (Maybe Text) +rvpFields + = lens _rvpFields (\ s a -> s{_rvpFields = a}) + +-- | Data format for the response. +rvpAlt :: Lens' RelyingpartyVerifyPassword' Text +rvpAlt = lens _rvpAlt (\ s a -> s{_rvpAlt = a}) + +instance GoogleRequest RelyingpartyVerifyPassword' + where + type Rs RelyingpartyVerifyPassword' = + VerifyPasswordResponse + request = requestWithRoute defReq identityToolkitURL + requestWithRoute r u RelyingpartyVerifyPassword{..} + = go _rvpQuotaUser _rvpPrettyPrint _rvpUserIp _rvpKey + _rvpOauthToken + _rvpFields + _rvpAlt + where go + = clientWithRoute + (Proxy :: Proxy RelyingpartyVerifyPasswordAPI) + r + u diff --git a/gogol-identity-toolkit/gogol-identity-toolkit.cabal b/gogol-identity-toolkit/gogol-identity-toolkit.cabal new file mode 100644 index 000000000..5fca09e0b --- /dev/null +++ b/gogol-identity-toolkit/gogol-identity-toolkit.cabal @@ -0,0 +1,54 @@ +name: gogol-identity-toolkit +version: 0.0.1 +synopsis: Google Identity Toolkit API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Help the third party sites to implement federated login. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.IdentityToolkit + , Network.Google.IdentityToolkit.Types + , Network.Google.Resource.IdentityToolkit.Relyingparty.CreateAuthURI + , Network.Google.Resource.IdentityToolkit.Relyingparty.DeleteAccount + , Network.Google.Resource.IdentityToolkit.Relyingparty.DownloadAccount + , Network.Google.Resource.IdentityToolkit.Relyingparty.GetAccountInfo + , Network.Google.Resource.IdentityToolkit.Relyingparty.GetOobConfirmationCode + , Network.Google.Resource.IdentityToolkit.Relyingparty.GetPublicKeys + , Network.Google.Resource.IdentityToolkit.Relyingparty.GetRecaptchaParam + , Network.Google.Resource.IdentityToolkit.Relyingparty.ResetPassword + , Network.Google.Resource.IdentityToolkit.Relyingparty.SetAccountInfo + , Network.Google.Resource.IdentityToolkit.Relyingparty.UploadAccount + , Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyAssertion + , Network.Google.Resource.IdentityToolkit.Relyingparty.VerifyPassword + + other-modules: + Network.Google.IdentityToolkit.Types.Product + , Network.Google.IdentityToolkit.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-identity-toolkit/src/.gitkeep b/gogol-identity-toolkit/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-latencytest/LICENSE b/gogol-latencytest/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-latencytest/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-latencytest/Makefile b/gogol-latencytest/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-latencytest/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-latencytest/README.md b/gogol-latencytest/README.md new file mode 100644 index 000000000..4288272a8 --- /dev/null +++ b/gogol-latencytest/README.md @@ -0,0 +1,28 @@ +# gogol-latencytest + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Network Performance Monitoring API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-latencytest` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-latencytest/Setup.hs b/gogol-latencytest/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-latencytest/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-latencytest/gen/Network/Google/LatencyTest.hs b/gogol-latencytest/gen/Network/Google/LatencyTest.hs new file mode 100644 index 000000000..b48956809 --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/LatencyTest.hs @@ -0,0 +1,91 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.LatencyTest +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | A Test API to report latency data. +-- +-- /See:/ < Google Cloud Network Performance Monitoring API Reference> +module Network.Google.LatencyTest + ( + -- * API + LatencyTestAPI + , latencyTestAPI + , latencyTestURL + + -- * Service Methods + + -- * REST Resources + + -- ** CloudlatencytestStatscollectionUpdateaggregatedstats + , module Cloudlatencytest.Statscollection.Updateaggregatedstats + + -- ** CloudlatencytestStatscollectionUpdatestats + , module Cloudlatencytest.Statscollection.Updatestats + + -- * Types + + -- ** IntValue + , IntValue + , intValue + , ivValue + , ivLabel + + -- ** AggregatedStatsReply + , AggregatedStatsReply + , aggregatedStatsReply + , asrTestValue + + -- ** DoubleValue + , DoubleValue + , doubleValue + , dvValue + , dvLabel + + -- ** StringValue + , StringValue + , stringValue + , svValue + , svLabel + + -- ** Stats + , Stats + , stats + , sTime + , sDoubleValues + , sStringValues + , sIntValues + + -- ** AggregatedStats + , AggregatedStats + , aggregatedStats + , asStats + + -- ** StatsReply + , StatsReply + , statsReply + , srTestValue + ) where + +import Network.Google.LatencyTest.Types +import Network.Google.Prelude +import Network.Google.Resource.Cloudlatencytest.Statscollection.Updateaggregatedstats +import Network.Google.Resource.Cloudlatencytest.Statscollection.Updatestats + +{- $resources +TODO +-} + +type LatencyTestAPI = Statscollection + +latencyTestAPI :: Proxy LatencyTestAPI +latencyTestAPI = Proxy diff --git a/gogol-latencytest/gen/Network/Google/LatencyTest/Types.hs b/gogol-latencytest/gen/Network/Google/LatencyTest/Types.hs new file mode 100644 index 000000000..483743e16 --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/LatencyTest/Types.hs @@ -0,0 +1,71 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.LatencyTest.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.LatencyTest.Types + ( + -- * Service URL + latencyTestURL + + -- * IntValue + , IntValue + , intValue + , ivValue + , ivLabel + + -- * AggregatedStatsReply + , AggregatedStatsReply + , aggregatedStatsReply + , asrTestValue + + -- * DoubleValue + , DoubleValue + , doubleValue + , dvValue + , dvLabel + + -- * StringValue + , StringValue + , stringValue + , svValue + , svLabel + + -- * Stats + , Stats + , stats + , sTime + , sDoubleValues + , sStringValues + , sIntValues + + -- * AggregatedStats + , AggregatedStats + , aggregatedStats + , asStats + + -- * StatsReply + , StatsReply + , statsReply + , srTestValue + ) where + +import Network.Google.LatencyTest.Types.Product +import Network.Google.LatencyTest.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google Cloud Network Performance Monitoring API. +latencyTestURL :: BaseURL +latencyTestURL + = BaseUrl Https + "https://cloudlatencytest-pa.googleapis.com/v2/statscollection/" + 443 diff --git a/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs b/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs new file mode 100644 index 000000000..21ace50e0 --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs @@ -0,0 +1,310 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.LatencyTest.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.LatencyTest.Types.Product where + +import Network.Google.LatencyTest.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'intValue' smart constructor. +data IntValue = IntValue + { _ivValue :: !(Maybe Int64) + , _ivLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IntValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ivValue' +-- +-- * 'ivLabel' +intValue + :: IntValue +intValue = + IntValue + { _ivValue = Nothing + , _ivLabel = Nothing + } + +ivValue :: Lens' IntValue (Maybe Int64) +ivValue = lens _ivValue (\ s a -> s{_ivValue = a}) + +ivLabel :: Lens' IntValue (Maybe Text) +ivLabel = lens _ivLabel (\ s a -> s{_ivLabel = a}) + +instance FromJSON IntValue where + parseJSON + = withObject "IntValue" + (\ o -> + IntValue <$> (o .:? "value") <*> (o .:? "label")) + +instance ToJSON IntValue where + toJSON IntValue{..} + = object + (catMaybes + [("value" .=) <$> _ivValue, + ("label" .=) <$> _ivLabel]) + +-- +-- /See:/ 'aggregatedStatsReply' smart constructor. +newtype AggregatedStatsReply = AggregatedStatsReply + { _asrTestValue :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregatedStatsReply' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asrTestValue' +aggregatedStatsReply + :: AggregatedStatsReply +aggregatedStatsReply = + AggregatedStatsReply + { _asrTestValue = Nothing + } + +asrTestValue :: Lens' AggregatedStatsReply (Maybe Text) +asrTestValue + = lens _asrTestValue (\ s a -> s{_asrTestValue = a}) + +instance FromJSON AggregatedStatsReply where + parseJSON + = withObject "AggregatedStatsReply" + (\ o -> AggregatedStatsReply <$> (o .:? "testValue")) + +instance ToJSON AggregatedStatsReply where + toJSON AggregatedStatsReply{..} + = object + (catMaybes [("testValue" .=) <$> _asrTestValue]) + +-- +-- /See:/ 'doubleValue' smart constructor. +data DoubleValue = DoubleValue + { _dvValue :: !(Maybe Float) + , _dvLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DoubleValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvValue' +-- +-- * 'dvLabel' +doubleValue + :: DoubleValue +doubleValue = + DoubleValue + { _dvValue = Nothing + , _dvLabel = Nothing + } + +dvValue :: Lens' DoubleValue (Maybe Float) +dvValue = lens _dvValue (\ s a -> s{_dvValue = a}) + +dvLabel :: Lens' DoubleValue (Maybe Text) +dvLabel = lens _dvLabel (\ s a -> s{_dvLabel = a}) + +instance FromJSON DoubleValue where + parseJSON + = withObject "DoubleValue" + (\ o -> + DoubleValue <$> (o .:? "value") <*> (o .:? "label")) + +instance ToJSON DoubleValue where + toJSON DoubleValue{..} + = object + (catMaybes + [("value" .=) <$> _dvValue, + ("label" .=) <$> _dvLabel]) + +-- +-- /See:/ 'stringValue' smart constructor. +data StringValue = StringValue + { _svValue :: !(Maybe Text) + , _svLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StringValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svValue' +-- +-- * 'svLabel' +stringValue + :: StringValue +stringValue = + StringValue + { _svValue = Nothing + , _svLabel = Nothing + } + +svValue :: Lens' StringValue (Maybe Text) +svValue = lens _svValue (\ s a -> s{_svValue = a}) + +svLabel :: Lens' StringValue (Maybe Text) +svLabel = lens _svLabel (\ s a -> s{_svLabel = a}) + +instance FromJSON StringValue where + parseJSON + = withObject "StringValue" + (\ o -> + StringValue <$> (o .:? "value") <*> (o .:? "label")) + +instance ToJSON StringValue where + toJSON StringValue{..} + = object + (catMaybes + [("value" .=) <$> _svValue, + ("label" .=) <$> _svLabel]) + +-- +-- /See:/ 'stats' smart constructor. +data Stats = Stats + { _sTime :: !(Maybe Double) + , _sDoubleValues :: !(Maybe [Maybe DoubleValue]) + , _sStringValues :: !(Maybe [Maybe StringValue]) + , _sIntValues :: !(Maybe [Maybe IntValue]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Stats' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sTime' +-- +-- * 'sDoubleValues' +-- +-- * 'sStringValues' +-- +-- * 'sIntValues' +stats + :: Stats +stats = + Stats + { _sTime = Nothing + , _sDoubleValues = Nothing + , _sStringValues = Nothing + , _sIntValues = Nothing + } + +sTime :: Lens' Stats (Maybe Double) +sTime = lens _sTime (\ s a -> s{_sTime = a}) + +sDoubleValues :: Lens' Stats [Maybe DoubleValue] +sDoubleValues + = lens _sDoubleValues + (\ s a -> s{_sDoubleValues = a}) + . _Default + . _Coerce + +sStringValues :: Lens' Stats [Maybe StringValue] +sStringValues + = lens _sStringValues + (\ s a -> s{_sStringValues = a}) + . _Default + . _Coerce + +sIntValues :: Lens' Stats [Maybe IntValue] +sIntValues + = lens _sIntValues (\ s a -> s{_sIntValues = a}) . + _Default + . _Coerce + +instance FromJSON Stats where + parseJSON + = withObject "Stats" + (\ o -> + Stats <$> + (o .:? "time") <*> (o .:? "doubleValues" .!= mempty) + <*> (o .:? "stringValues" .!= mempty) + <*> (o .:? "intValues" .!= mempty)) + +instance ToJSON Stats where + toJSON Stats{..} + = object + (catMaybes + [("time" .=) <$> _sTime, + ("doubleValues" .=) <$> _sDoubleValues, + ("stringValues" .=) <$> _sStringValues, + ("intValues" .=) <$> _sIntValues]) + +-- +-- /See:/ 'aggregatedStats' smart constructor. +newtype AggregatedStats = AggregatedStats + { _asStats :: Maybe [Maybe Stats] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AggregatedStats' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asStats' +aggregatedStats + :: AggregatedStats +aggregatedStats = + AggregatedStats + { _asStats = Nothing + } + +asStats :: Lens' AggregatedStats [Maybe Stats] +asStats + = lens _asStats (\ s a -> s{_asStats = a}) . _Default + . _Coerce + +instance FromJSON AggregatedStats where + parseJSON + = withObject "AggregatedStats" + (\ o -> + AggregatedStats <$> (o .:? "stats" .!= mempty)) + +instance ToJSON AggregatedStats where + toJSON AggregatedStats{..} + = object (catMaybes [("stats" .=) <$> _asStats]) + +-- +-- /See:/ 'statsReply' smart constructor. +newtype StatsReply = StatsReply + { _srTestValue :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatsReply' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srTestValue' +statsReply + :: StatsReply +statsReply = + StatsReply + { _srTestValue = Nothing + } + +srTestValue :: Lens' StatsReply (Maybe Text) +srTestValue + = lens _srTestValue (\ s a -> s{_srTestValue = a}) + +instance FromJSON StatsReply where + parseJSON + = withObject "StatsReply" + (\ o -> StatsReply <$> (o .:? "testValue")) + +instance ToJSON StatsReply where + toJSON StatsReply{..} + = object + (catMaybes [("testValue" .=) <$> _srTestValue]) diff --git a/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Sum.hs b/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Sum.hs new file mode 100644 index 000000000..e5c1783e7 --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/LatencyTest/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.LatencyTest.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.LatencyTest.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updateaggregatedstats.hs b/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updateaggregatedstats.hs new file mode 100644 index 000000000..17b9b40b8 --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updateaggregatedstats.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudlatencytest.Statscollection.Updateaggregatedstats +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | RPC to update the new TCP stats. +-- +-- /See:/ < Google Cloud Network Performance Monitoring API Reference> for @CloudlatencytestStatscollectionUpdateaggregatedstats@. +module Cloudlatencytest.Statscollection.Updateaggregatedstats + ( + -- * REST Resource + StatscollectionUpdateaggregatedstatsAPI + + -- * Creating a Request + , statscollectionUpdateaggregatedstats + , StatscollectionUpdateaggregatedstats + + -- * Request Lenses + , sQuotaUser + , sPrettyPrint + , sUserIp + , sKey + , sOauthToken + , sFields + , sAlt + ) where + +import Network.Google.LatencyTest.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudlatencytestStatscollectionUpdateaggregatedstats@ which the +-- 'StatscollectionUpdateaggregatedstats' request conforms to. +type StatscollectionUpdateaggregatedstatsAPI = + "updateaggregatedstats" :> + Post '[JSON] AggregatedStatsReply + +-- | RPC to update the new TCP stats. +-- +-- /See:/ 'statscollectionUpdateaggregatedstats' smart constructor. +data StatscollectionUpdateaggregatedstats = StatscollectionUpdateaggregatedstats + { _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sUserIp :: !(Maybe Text) + , _sKey :: !(Maybe Text) + , _sOauthToken :: !(Maybe Text) + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatscollectionUpdateaggregatedstats'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sUserIp' +-- +-- * 'sKey' +-- +-- * 'sOauthToken' +-- +-- * 'sFields' +-- +-- * 'sAlt' +statscollectionUpdateaggregatedstats + :: StatscollectionUpdateaggregatedstats +statscollectionUpdateaggregatedstats = + StatscollectionUpdateaggregatedstats + { _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sUserIp = Nothing + , _sKey = Nothing + , _sOauthToken = Nothing + , _sFields = Nothing + , _sAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' StatscollectionUpdateaggregatedstats' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' StatscollectionUpdateaggregatedstats' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' StatscollectionUpdateaggregatedstats' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' StatscollectionUpdateaggregatedstats' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' StatscollectionUpdateaggregatedstats' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' StatscollectionUpdateaggregatedstats' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' StatscollectionUpdateaggregatedstats' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest + StatscollectionUpdateaggregatedstats' where + type Rs StatscollectionUpdateaggregatedstats' = + AggregatedStatsReply + request = requestWithRoute defReq latencyTestURL + requestWithRoute r u + StatscollectionUpdateaggregatedstats{..} + = go _sQuotaUser _sPrettyPrint _sUserIp _sKey + _sOauthToken + _sFields + _sAlt + where go + = clientWithRoute + (Proxy :: + Proxy StatscollectionUpdateaggregatedstatsAPI) + r + u diff --git a/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updatestats.hs b/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updatestats.hs new file mode 100644 index 000000000..de33d3aef --- /dev/null +++ b/gogol-latencytest/gen/Network/Google/Resource/Cloudlatencytest/Statscollection/Updatestats.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudlatencytest.Statscollection.Updatestats +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | RPC to update the new TCP stats. +-- +-- /See:/ < Google Cloud Network Performance Monitoring API Reference> for @CloudlatencytestStatscollectionUpdatestats@. +module Cloudlatencytest.Statscollection.Updatestats + ( + -- * REST Resource + StatscollectionUpdatestatsAPI + + -- * Creating a Request + , statscollectionUpdatestats + , StatscollectionUpdatestats + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suUserIp + , suKey + , suOauthToken + , suFields + , suAlt + ) where + +import Network.Google.LatencyTest.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudlatencytestStatscollectionUpdatestats@ which the +-- 'StatscollectionUpdatestats' request conforms to. +type StatscollectionUpdatestatsAPI = + "updatestats" :> Post '[JSON] StatsReply + +-- | RPC to update the new TCP stats. +-- +-- /See:/ 'statscollectionUpdatestats' smart constructor. +data StatscollectionUpdatestats = StatscollectionUpdatestats + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suKey :: !(Maybe Text) + , _suOauthToken :: !(Maybe Text) + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StatscollectionUpdatestats'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suKey' +-- +-- * 'suOauthToken' +-- +-- * 'suFields' +-- +-- * 'suAlt' +statscollectionUpdatestats + :: StatscollectionUpdatestats +statscollectionUpdatestats = + StatscollectionUpdatestats + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suKey = Nothing + , _suOauthToken = Nothing + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' StatscollectionUpdatestats' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' StatscollectionUpdatestats' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' StatscollectionUpdatestats' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' StatscollectionUpdatestats' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' StatscollectionUpdatestats' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' StatscollectionUpdatestats' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' StatscollectionUpdatestats' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest StatscollectionUpdatestats' + where + type Rs StatscollectionUpdatestats' = StatsReply + request = requestWithRoute defReq latencyTestURL + requestWithRoute r u StatscollectionUpdatestats{..} + = go _suQuotaUser _suPrettyPrint _suUserIp _suKey + _suOauthToken + _suFields + _suAlt + where go + = clientWithRoute + (Proxy :: Proxy StatscollectionUpdatestatsAPI) + r + u diff --git a/gogol-latencytest/gogol-latencytest.cabal b/gogol-latencytest/gogol-latencytest.cabal new file mode 100644 index 000000000..f4d451dcb --- /dev/null +++ b/gogol-latencytest/gogol-latencytest.cabal @@ -0,0 +1,44 @@ +name: gogol-latencytest +version: 0.0.1 +synopsis: Google Cloud Network Performance Monitoring API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + A Test API to report latency data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.LatencyTest + , Network.Google.LatencyTest.Types + , Network.Google.Resource.Cloudlatencytest.Statscollection.Updateaggregatedstats + , Network.Google.Resource.Cloudlatencytest.Statscollection.Updatestats + + other-modules: + Network.Google.LatencyTest.Types.Product + , Network.Google.LatencyTest.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-latencytest/src/.gitkeep b/gogol-latencytest/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-logging/LICENSE b/gogol-logging/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-logging/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-logging/Makefile b/gogol-logging/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-logging/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-logging/README.md b/gogol-logging/README.md new file mode 100644 index 000000000..131a2a9e0 --- /dev/null +++ b/gogol-logging/README.md @@ -0,0 +1,28 @@ +# gogol-logging + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Logging API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-logging` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-logging/Setup.hs b/gogol-logging/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-logging/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-logging/gen/Network/Google/Logging.hs b/gogol-logging/gen/Network/Google/Logging.hs new file mode 100644 index 000000000..6273fc15b --- /dev/null +++ b/gogol-logging/gen/Network/Google/Logging.hs @@ -0,0 +1,296 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Logging +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Google Cloud Logging API lets you create logs, ingest log entries, and +-- manage log sinks. +-- +-- /See:/ +module Network.Google.Logging + ( + -- * API + LoggingAPI + , loggingAPI + , loggingURL + + -- * Service Methods + + -- * REST Resources + + -- ** LoggingProjectsLogServicesIndexesList + , module Logging.Projects.LogServices.Indexes.List + + -- ** LoggingProjectsLogServicesList + , module Logging.Projects.LogServices.List + + -- ** LoggingProjectsLogServicesSinksCreate + , module Logging.Projects.LogServices.Sinks.Create + + -- ** LoggingProjectsLogServicesSinksDelete + , module Logging.Projects.LogServices.Sinks.Delete + + -- ** LoggingProjectsLogServicesSinksGet + , module Logging.Projects.LogServices.Sinks.Get + + -- ** LoggingProjectsLogServicesSinksList + , module Logging.Projects.LogServices.Sinks.List + + -- ** LoggingProjectsLogServicesSinksUpdate + , module Logging.Projects.LogServices.Sinks.Update + + -- ** LoggingProjectsLogsDelete + , module Logging.Projects.Logs.Delete + + -- ** LoggingProjectsLogsEntriesWrite + , module Logging.Projects.Logs.Entries.Write + + -- ** LoggingProjectsLogsList + , module Logging.Projects.Logs.List + + -- ** LoggingProjectsLogsSinksCreate + , module Logging.Projects.Logs.Sinks.Create + + -- ** LoggingProjectsLogsSinksDelete + , module Logging.Projects.Logs.Sinks.Delete + + -- ** LoggingProjectsLogsSinksGet + , module Logging.Projects.Logs.Sinks.Get + + -- ** LoggingProjectsLogsSinksList + , module Logging.Projects.Logs.Sinks.List + + -- ** LoggingProjectsLogsSinksUpdate + , module Logging.Projects.Logs.Sinks.Update + + -- ** LoggingProjectsSinksCreate + , module Logging.Projects.Sinks.Create + + -- ** LoggingProjectsSinksDelete + , module Logging.Projects.Sinks.Delete + + -- ** LoggingProjectsSinksGet + , module Logging.Projects.Sinks.Get + + -- ** LoggingProjectsSinksList + , module Logging.Projects.Sinks.List + + -- ** LoggingProjectsSinksUpdate + , module Logging.Projects.Sinks.Update + + -- * Types + + -- ** Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- ** Log + , Log + , log + , logName + , logDisplayName + , logPayloadType + + -- ** LogError + , LogError + , logError + , leStatus + , leResource + , leTimeNanos + + -- ** WriteLogEntriesRequest + , WriteLogEntriesRequest + , writeLogEntriesRequest + , wlerEntries + , wlerCommonLabels + + -- ** RequestLog + , RequestLog + , requestLog + , rlTraceId + , rlInstanceId + , rlStatus + , rlRequestId + , rlInstanceIndex + , rlModuleId + , rlVersionId + , rlHttpVersion + , rlTaskName + , rlPendingTime + , rlWasLoadingRequest + , rlStartTime + , rlLatency + , rlUrlMapEntry + , rlCost + , rlReferrer + , rlLine + , rlIp + , rlAppId + , rlMethod + , rlResource + , rlEndTime + , rlFinished + , rlMegaCycles + , rlUserAgent + , rlNickname + , rlHost + , rlTaskQueueName + , rlResponseSize + , rlSourceReference + , rlAppEngineRelease + + -- ** Empty + , Empty + , empty + + -- ** LogEntryMetadata + , LogEntryMetadata + , logEntryMetadata + , lemSeverity + , lemZone + , lemUserId + , lemServiceName + , lemLabels + , lemRegion + , lemProjectId + , lemTimestamp + + -- ** ListSinksResponse + , ListSinksResponse + , listSinksResponse + , lsrSinks + + -- ** ListLogServiceIndexesResponse + , ListLogServiceIndexesResponse + , listLogServiceIndexesResponse + , llsirNextPageToken + , llsirServiceIndexPrefixes + + -- ** WriteLogEntriesResponse + , WriteLogEntriesResponse + , writeLogEntriesResponse + + -- ** LogSink + , LogSink + , logSink + , lsDestination + , lsName + , lsFilter + , lsErrors + + -- ** ListLogServicesResponse + , ListLogServicesResponse + , listLogServicesResponse + , llsrNextPageToken + , llsrLogServices + + -- ** ListLogsResponse + , ListLogsResponse + , listLogsResponse + , llrNextPageToken + , llrLogs + + -- ** HTTPRequest + , HTTPRequest + , hTTPRequest + , httprStatus + , httprRequestUrl + , httprRemoteIp + , httprRequestSize + , httprUserAgent + , httprResponseSize + , httprRequestMethod + , httprReferer + + -- ** ListLogSinksResponse + , ListLogSinksResponse + , listLogSinksResponse + , llsrSinks + + -- ** LogService + , LogService + , logService + , lName + , lIndexKeys + + -- ** ListLogServiceSinksResponse + , ListLogServiceSinksResponse + , listLogServiceSinksResponse + , llssrSinks + + -- ** LogLine + , LogLine + , logLine + , llTime + , llSeverity + , llLogMessage + , llSourceLocation + + -- ** LogEntry + , LogEntry + , logEntry + , leLog + , leTextPayload + , leHttpRequest + , leStructPayload + , leInsertId + , leMetadata + , leProtoPayload + + -- ** SourceLocation + , SourceLocation + , sourceLocation + , slLine + , slFunctionName + , slFile + + -- ** SourceReference + , SourceReference + , sourceReference + , srRepository + , srRevisionId + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude +import Network.Google.Resource.Logging.Projects.Logs.Delete +import Network.Google.Resource.Logging.Projects.Logs.Entries.Write +import Network.Google.Resource.Logging.Projects.Logs.List +import Network.Google.Resource.Logging.Projects.Logs.Sinks.Create +import Network.Google.Resource.Logging.Projects.Logs.Sinks.Delete +import Network.Google.Resource.Logging.Projects.Logs.Sinks.Get +import Network.Google.Resource.Logging.Projects.Logs.Sinks.List +import Network.Google.Resource.Logging.Projects.Logs.Sinks.Update +import Network.Google.Resource.Logging.Projects.LogServices.Indexes.List +import Network.Google.Resource.Logging.Projects.LogServices.List +import Network.Google.Resource.Logging.Projects.LogServices.Sinks.Create +import Network.Google.Resource.Logging.Projects.LogServices.Sinks.Delete +import Network.Google.Resource.Logging.Projects.LogServices.Sinks.Get +import Network.Google.Resource.Logging.Projects.LogServices.Sinks.List +import Network.Google.Resource.Logging.Projects.LogServices.Sinks.Update +import Network.Google.Resource.Logging.Projects.Sinks.Create +import Network.Google.Resource.Logging.Projects.Sinks.Delete +import Network.Google.Resource.Logging.Projects.Sinks.Get +import Network.Google.Resource.Logging.Projects.Sinks.List +import Network.Google.Resource.Logging.Projects.Sinks.Update + +{- $resources +TODO +-} + +type LoggingAPI = Projects + +loggingAPI :: Proxy LoggingAPI +loggingAPI = Proxy diff --git a/gogol-logging/gen/Network/Google/Logging/Types.hs b/gogol-logging/gen/Network/Google/Logging/Types.hs new file mode 100644 index 000000000..1287c7052 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Logging/Types.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Logging.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Logging.Types + ( + -- * Service URL + loggingURL + + -- * Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- * Log + , Log + , log + , logName + , logDisplayName + , logPayloadType + + -- * LogError + , LogError + , logError + , leStatus + , leResource + , leTimeNanos + + -- * WriteLogEntriesRequest + , WriteLogEntriesRequest + , writeLogEntriesRequest + , wlerEntries + , wlerCommonLabels + + -- * RequestLog + , RequestLog + , requestLog + , rlTraceId + , rlInstanceId + , rlStatus + , rlRequestId + , rlInstanceIndex + , rlModuleId + , rlVersionId + , rlHttpVersion + , rlTaskName + , rlPendingTime + , rlWasLoadingRequest + , rlStartTime + , rlLatency + , rlUrlMapEntry + , rlCost + , rlReferrer + , rlLine + , rlIp + , rlAppId + , rlMethod + , rlResource + , rlEndTime + , rlFinished + , rlMegaCycles + , rlUserAgent + , rlNickname + , rlHost + , rlTaskQueueName + , rlResponseSize + , rlSourceReference + , rlAppEngineRelease + + -- * Empty + , Empty + , empty + + -- * LogEntryMetadata + , LogEntryMetadata + , logEntryMetadata + , lemSeverity + , lemZone + , lemUserId + , lemServiceName + , lemLabels + , lemRegion + , lemProjectId + , lemTimestamp + + -- * ListSinksResponse + , ListSinksResponse + , listSinksResponse + , lsrSinks + + -- * ListLogServiceIndexesResponse + , ListLogServiceIndexesResponse + , listLogServiceIndexesResponse + , llsirNextPageToken + , llsirServiceIndexPrefixes + + -- * WriteLogEntriesResponse + , WriteLogEntriesResponse + , writeLogEntriesResponse + + -- * LogSink + , LogSink + , logSink + , lsDestination + , lsName + , lsFilter + , lsErrors + + -- * ListLogServicesResponse + , ListLogServicesResponse + , listLogServicesResponse + , llsrNextPageToken + , llsrLogServices + + -- * ListLogsResponse + , ListLogsResponse + , listLogsResponse + , llrNextPageToken + , llrLogs + + -- * HTTPRequest + , HTTPRequest + , hTTPRequest + , httprStatus + , httprRequestUrl + , httprRemoteIp + , httprRequestSize + , httprUserAgent + , httprResponseSize + , httprRequestMethod + , httprReferer + + -- * ListLogSinksResponse + , ListLogSinksResponse + , listLogSinksResponse + , llsrSinks + + -- * LogService + , LogService + , logService + , lName + , lIndexKeys + + -- * ListLogServiceSinksResponse + , ListLogServiceSinksResponse + , listLogServiceSinksResponse + , llssrSinks + + -- * LogLine + , LogLine + , logLine + , llTime + , llSeverity + , llLogMessage + , llSourceLocation + + -- * LogEntry + , LogEntry + , logEntry + , leLog + , leTextPayload + , leHttpRequest + , leStructPayload + , leInsertId + , leMetadata + , leProtoPayload + + -- * SourceLocation + , SourceLocation + , sourceLocation + , slLine + , slFunctionName + , slFile + + -- * SourceReference + , SourceReference + , sourceReference + , srRepository + , srRevisionId + ) where + +import Network.Google.Logging.Types.Product +import Network.Google.Logging.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta3' of the Google Cloud Logging API. +loggingURL :: BaseURL +loggingURL + = BaseUrl Https "https://logging.googleapis.com/" 443 diff --git a/gogol-logging/gen/Network/Google/Logging/Types/Product.hs b/gogol-logging/gen/Network/Google/Logging/Types/Product.hs new file mode 100644 index 000000000..a95ecdf54 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Logging/Types/Product.hs @@ -0,0 +1,1699 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Logging.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Logging.Types.Product where + +import Network.Google.Logging.Types.Sum +import Network.Google.Prelude + +-- | The \`Status\` type defines a logical error model that is suitable for +-- different programming environments, including REST APIs and RPC APIs. It +-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is +-- designed to be: - Simple to use and understand for most users - Flexible +-- enough to meet unexpected needs # Overview The \`Status\` message +-- contains three pieces of data: error code, error message, and error +-- details. The error code should be an enum value of [google.rpc.Code][], +-- but it may accept additional error codes if needed. The error message +-- should be a developer-facing English message that helps developers +-- *understand* and *resolve* the error. If a localized user-facing error +-- message is needed, put the localized message in the error details or +-- localize it in the client. The optional error details may contain +-- arbitrary information about the error. There is a predefined set of +-- error detail types in the package \`google.rpc\` which can be used for +-- common error conditions. # Language mapping The \`Status\` message is +-- the logical representation of the error model, but it is not necessarily +-- the actual wire format. When the \`Status\` message is exposed in +-- different client libraries and different wire protocols, it can be +-- mapped differently. For example, it will likely be mapped to some +-- exceptions in Java, but more likely mapped to some error codes in C. # +-- Other uses The error model and the \`Status\` message can be used in a +-- variety of environments, either with or without APIs, to provide a +-- consistent developer experience across different environments. Example +-- uses of this error model include: - Partial errors. If a service needs +-- to return partial errors to the client, it may embed the \`Status\` in +-- the normal response to indicate the partial errors. - Workflow errors. A +-- typical workflow has multiple steps. Each step may have a \`Status\` +-- message for error reporting purpose. - Batch operations. If a client +-- uses batch request and batch response, the \`Status\` message should be +-- used directly inside batch response, one for each error sub-response. - +-- Asynchronous operations. If an API call embeds asynchronous operation +-- results in its response, the status of those operations should be +-- represented directly using the \`Status\` message. - Logging. If some +-- API errors are stored in logs, the message \`Status\` could be used +-- directly after any stripping needed for security\/privacy reasons. +-- +-- /See:/ 'status' smart constructor. +data Status = Status + { _sDetails :: !(Maybe [StatusDetailsItem]) + , _sCode :: !(Maybe Int32) + , _sMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Status' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sDetails' +-- +-- * 'sCode' +-- +-- * 'sMessage' +status + :: Status +status = + Status + { _sDetails = Nothing + , _sCode = Nothing + , _sMessage = Nothing + } + +-- | A list of messages that carry the error details. There will be a common +-- set of message types for APIs to use. +sDetails :: Lens' Status [StatusDetailsItem] +sDetails + = lens _sDetails (\ s a -> s{_sDetails = a}) . + _Default + . _Coerce + +-- | The status code, which should be an enum value of [google.rpc.Code][]. +sCode :: Lens' Status (Maybe Int32) +sCode = lens _sCode (\ s a -> s{_sCode = a}) + +-- | A developer-facing error message, which should be in English. Any +-- user-facing error message should be localized and sent in the +-- [google.rpc.Status.details][google.rpc.Status.details] field, or +-- localized by the client. +sMessage :: Lens' Status (Maybe Text) +sMessage = lens _sMessage (\ s a -> s{_sMessage = a}) + +instance FromJSON Status where + parseJSON + = withObject "Status" + (\ o -> + Status <$> + (o .:? "details" .!= mempty) <*> (o .:? "code") <*> + (o .:? "message")) + +instance ToJSON Status where + toJSON Status{..} + = object + (catMaybes + [("details" .=) <$> _sDetails, + ("code" .=) <$> _sCode, + ("message" .=) <$> _sMessage]) + +-- | _Output only._ Describes a log, which is a named stream of log entries. +-- +-- /See:/ 'log' smart constructor. +data Log = Log + { _logName :: !(Maybe Text) + , _logDisplayName :: !(Maybe Text) + , _logPayloadType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Log' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'logName' +-- +-- * 'logDisplayName' +-- +-- * 'logPayloadType' +log + :: Log +log = + Log + { _logName = Nothing + , _logDisplayName = Nothing + , _logPayloadType = Nothing + } + +-- | The resource name of the log. Example: +-- \`\"\/projects\/my-gcp-project-id\/logs\/LOG_NAME\"\`, where +-- \`LOG_NAME\` is the URL-encoded given name of the log. The log includes +-- those log entries whose \`LogEntry.log\` field contains this given name. +-- To avoid name collisions, it is a best practice to prefix the given log +-- name with the service name, but this is not required. Examples of log +-- given names: \`\"appengine.googleapis.com\/request_log\"\`, +-- \`\"apache-access\"\`. +logName :: Lens' Log (Maybe Text) +logName = lens _logName (\ s a -> s{_logName = a}) + +-- | _Optional._ The common name of the log. Example: \`\"request_log\"\`. +logDisplayName :: Lens' Log (Maybe Text) +logDisplayName + = lens _logDisplayName + (\ s a -> s{_logDisplayName = a}) + +-- | _Optional_. A URI representing the expected payload type for log +-- entries. +logPayloadType :: Lens' Log (Maybe Text) +logPayloadType + = lens _logPayloadType + (\ s a -> s{_logPayloadType = a}) + +instance FromJSON Log where + parseJSON + = withObject "Log" + (\ o -> + Log <$> + (o .:? "name") <*> (o .:? "displayName") <*> + (o .:? "payloadType")) + +instance ToJSON Log where + toJSON Log{..} + = object + (catMaybes + [("name" .=) <$> _logName, + ("displayName" .=) <$> _logDisplayName, + ("payloadType" .=) <$> _logPayloadType]) + +-- | Describes a problem with a logging resource or operation. +-- +-- /See:/ 'logError' smart constructor. +data LogError = LogError + { _leStatus :: !(Maybe (Maybe Status)) + , _leResource :: !(Maybe Text) + , _leTimeNanos :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogError' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'leStatus' +-- +-- * 'leResource' +-- +-- * 'leTimeNanos' +logError + :: LogError +logError = + LogError + { _leStatus = Nothing + , _leResource = Nothing + , _leTimeNanos = Nothing + } + +-- | The error description, including a classification code, an error +-- message, and other details. +leStatus :: Lens' LogError (Maybe (Maybe Status)) +leStatus = lens _leStatus (\ s a -> s{_leStatus = a}) + +-- | A resource name associated with this error. For example, the name of a +-- Cloud Storage bucket that has insufficient permissions to be a +-- destination for log entries. +leResource :: Lens' LogError (Maybe Text) +leResource + = lens _leResource (\ s a -> s{_leResource = a}) + +-- | The time the error was observed, in nanoseconds since the Unix epoch. +leTimeNanos :: Lens' LogError (Maybe Int64) +leTimeNanos + = lens _leTimeNanos (\ s a -> s{_leTimeNanos = a}) + +instance FromJSON LogError where + parseJSON + = withObject "LogError" + (\ o -> + LogError <$> + (o .:? "status") <*> (o .:? "resource") <*> + (o .:? "timeNanos")) + +instance ToJSON LogError where + toJSON LogError{..} + = object + (catMaybes + [("status" .=) <$> _leStatus, + ("resource" .=) <$> _leResource, + ("timeNanos" .=) <$> _leTimeNanos]) + +-- | The parameters to WriteLogEntries. +-- +-- /See:/ 'writeLogEntriesRequest' smart constructor. +data WriteLogEntriesRequest = WriteLogEntriesRequest + { _wlerEntries :: !(Maybe [Maybe LogEntry]) + , _wlerCommonLabels :: !(Maybe WriteLogEntriesRequestCommonLabels) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteLogEntriesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlerEntries' +-- +-- * 'wlerCommonLabels' +writeLogEntriesRequest + :: WriteLogEntriesRequest +writeLogEntriesRequest = + WriteLogEntriesRequest + { _wlerEntries = Nothing + , _wlerCommonLabels = Nothing + } + +-- | Log entries to insert. +wlerEntries :: Lens' WriteLogEntriesRequest [Maybe LogEntry] +wlerEntries + = lens _wlerEntries (\ s a -> s{_wlerEntries = a}) . + _Default + . _Coerce + +-- | Metadata labels that apply to all log entries in this request, so that +-- you don\'t have to repeat them in each log entry\'s \`metadata.labels\` +-- field. If any of the log entries contains a (key, value) with the same +-- key that is in \`commonLabels\`, then the entry\'s (key, value) +-- overrides the one in \`commonLabels\`. +wlerCommonLabels :: Lens' WriteLogEntriesRequest (Maybe WriteLogEntriesRequestCommonLabels) +wlerCommonLabels + = lens _wlerCommonLabels + (\ s a -> s{_wlerCommonLabels = a}) + +instance FromJSON WriteLogEntriesRequest where + parseJSON + = withObject "WriteLogEntriesRequest" + (\ o -> + WriteLogEntriesRequest <$> + (o .:? "entries" .!= mempty) <*> + (o .:? "commonLabels")) + +instance ToJSON WriteLogEntriesRequest where + toJSON WriteLogEntriesRequest{..} + = object + (catMaybes + [("entries" .=) <$> _wlerEntries, + ("commonLabels" .=) <$> _wlerCommonLabels]) + +-- | Complete log information about a single request to an application. +-- +-- /See:/ 'requestLog' smart constructor. +data RequestLog = RequestLog + { _rlTraceId :: !(Maybe Text) + , _rlInstanceId :: !(Maybe Word8) + , _rlStatus :: !(Maybe Int32) + , _rlRequestId :: !(Maybe Word8) + , _rlInstanceIndex :: !(Maybe Int32) + , _rlModuleId :: !(Maybe Text) + , _rlVersionId :: !(Maybe Text) + , _rlHttpVersion :: !(Maybe Text) + , _rlTaskName :: !(Maybe Text) + , _rlPendingTime :: !(Maybe Text) + , _rlWasLoadingRequest :: !(Maybe Bool) + , _rlStartTime :: !(Maybe Text) + , _rlLatency :: !(Maybe Text) + , _rlUrlMapEntry :: !(Maybe Text) + , _rlCost :: !(Maybe Double) + , _rlReferrer :: !(Maybe Text) + , _rlLine :: !(Maybe [Maybe LogLine]) + , _rlIp :: !(Maybe Text) + , _rlAppId :: !(Maybe Text) + , _rlMethod :: !(Maybe Text) + , _rlResource :: !(Maybe Text) + , _rlEndTime :: !(Maybe Text) + , _rlFinished :: !(Maybe Bool) + , _rlMegaCycles :: !(Maybe Int64) + , _rlUserAgent :: !(Maybe Text) + , _rlNickname :: !(Maybe Text) + , _rlHost :: !(Maybe Text) + , _rlTaskQueueName :: !(Maybe Text) + , _rlResponseSize :: !(Maybe Int64) + , _rlSourceReference :: !(Maybe [Maybe SourceReference]) + , _rlAppEngineRelease :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RequestLog' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlTraceId' +-- +-- * 'rlInstanceId' +-- +-- * 'rlStatus' +-- +-- * 'rlRequestId' +-- +-- * 'rlInstanceIndex' +-- +-- * 'rlModuleId' +-- +-- * 'rlVersionId' +-- +-- * 'rlHttpVersion' +-- +-- * 'rlTaskName' +-- +-- * 'rlPendingTime' +-- +-- * 'rlWasLoadingRequest' +-- +-- * 'rlStartTime' +-- +-- * 'rlLatency' +-- +-- * 'rlUrlMapEntry' +-- +-- * 'rlCost' +-- +-- * 'rlReferrer' +-- +-- * 'rlLine' +-- +-- * 'rlIp' +-- +-- * 'rlAppId' +-- +-- * 'rlMethod' +-- +-- * 'rlResource' +-- +-- * 'rlEndTime' +-- +-- * 'rlFinished' +-- +-- * 'rlMegaCycles' +-- +-- * 'rlUserAgent' +-- +-- * 'rlNickname' +-- +-- * 'rlHost' +-- +-- * 'rlTaskQueueName' +-- +-- * 'rlResponseSize' +-- +-- * 'rlSourceReference' +-- +-- * 'rlAppEngineRelease' +requestLog + :: RequestLog +requestLog = + RequestLog + { _rlTraceId = Nothing + , _rlInstanceId = Nothing + , _rlStatus = Nothing + , _rlRequestId = Nothing + , _rlInstanceIndex = Nothing + , _rlModuleId = Nothing + , _rlVersionId = Nothing + , _rlHttpVersion = Nothing + , _rlTaskName = Nothing + , _rlPendingTime = Nothing + , _rlWasLoadingRequest = Nothing + , _rlStartTime = Nothing + , _rlLatency = Nothing + , _rlUrlMapEntry = Nothing + , _rlCost = Nothing + , _rlReferrer = Nothing + , _rlLine = Nothing + , _rlIp = Nothing + , _rlAppId = Nothing + , _rlMethod = Nothing + , _rlResource = Nothing + , _rlEndTime = Nothing + , _rlFinished = Nothing + , _rlMegaCycles = Nothing + , _rlUserAgent = Nothing + , _rlNickname = Nothing + , _rlHost = Nothing + , _rlTaskQueueName = Nothing + , _rlResponseSize = Nothing + , _rlSourceReference = Nothing + , _rlAppEngineRelease = Nothing + } + +-- | Cloud Trace identifier of the trace for this request. +rlTraceId :: Lens' RequestLog (Maybe Text) +rlTraceId + = lens _rlTraceId (\ s a -> s{_rlTraceId = a}) + +-- | An opaque identifier for the instance that handled the request. +rlInstanceId :: Lens' RequestLog (Maybe Word8) +rlInstanceId + = lens _rlInstanceId (\ s a -> s{_rlInstanceId = a}) + +-- | Response status of request. +rlStatus :: Lens' RequestLog (Maybe Int32) +rlStatus = lens _rlStatus (\ s a -> s{_rlStatus = a}) + +-- | Globally unique identifier for a request, based on request start time. +-- Request IDs for requests which started later will compare greater as +-- binary strings than those for requests which started earlier. +rlRequestId :: Lens' RequestLog (Maybe Word8) +rlRequestId + = lens _rlRequestId (\ s a -> s{_rlRequestId = a}) + +-- | If the instance that processed this request was individually addressable +-- (i.e. belongs to a manually scaled module), this is the index of the +-- instance. +rlInstanceIndex :: Lens' RequestLog (Maybe Int32) +rlInstanceIndex + = lens _rlInstanceIndex + (\ s a -> s{_rlInstanceIndex = a}) + +-- | Identifies the module of the application that handled this request. +rlModuleId :: Lens' RequestLog (Maybe Text) +rlModuleId + = lens _rlModuleId (\ s a -> s{_rlModuleId = a}) + +-- | Version of the application that handled this request. +rlVersionId :: Lens' RequestLog (Maybe Text) +rlVersionId + = lens _rlVersionId (\ s a -> s{_rlVersionId = a}) + +-- | HTTP version of request. +rlHttpVersion :: Lens' RequestLog (Maybe Text) +rlHttpVersion + = lens _rlHttpVersion + (\ s a -> s{_rlHttpVersion = a}) + +-- | Task name of the request (for an offline request). +rlTaskName :: Lens' RequestLog (Maybe Text) +rlTaskName + = lens _rlTaskName (\ s a -> s{_rlTaskName = a}) + +-- | Time this request spent in the pending request queue, if it was pending +-- at all. +rlPendingTime :: Lens' RequestLog (Maybe Text) +rlPendingTime + = lens _rlPendingTime + (\ s a -> s{_rlPendingTime = a}) + +-- | Was this request a loading request for this instance? +rlWasLoadingRequest :: Lens' RequestLog (Maybe Bool) +rlWasLoadingRequest + = lens _rlWasLoadingRequest + (\ s a -> s{_rlWasLoadingRequest = a}) + +-- | Time at which request was known to have begun processing. +rlStartTime :: Lens' RequestLog (Maybe Text) +rlStartTime + = lens _rlStartTime (\ s a -> s{_rlStartTime = a}) + +-- | Latency of the request. +rlLatency :: Lens' RequestLog (Maybe Text) +rlLatency + = lens _rlLatency (\ s a -> s{_rlLatency = a}) + +-- | File or class within URL mapping used for request. Useful for tracking +-- down the source code which was responsible for managing request. +-- Especially for multiply mapped handlers. +rlUrlMapEntry :: Lens' RequestLog (Maybe Text) +rlUrlMapEntry + = lens _rlUrlMapEntry + (\ s a -> s{_rlUrlMapEntry = a}) + +-- | An indication of the relative cost of serving this request. +rlCost :: Lens' RequestLog (Maybe Double) +rlCost = lens _rlCost (\ s a -> s{_rlCost = a}) + +-- | Referrer URL of request. +rlReferrer :: Lens' RequestLog (Maybe Text) +rlReferrer + = lens _rlReferrer (\ s a -> s{_rlReferrer = a}) + +-- | List of log lines emitted by the application while serving this request, +-- if requested. +rlLine :: Lens' RequestLog [Maybe LogLine] +rlLine + = lens _rlLine (\ s a -> s{_rlLine = a}) . _Default . + _Coerce + +-- | Origin IP address. +rlIp :: Lens' RequestLog (Maybe Text) +rlIp = lens _rlIp (\ s a -> s{_rlIp = a}) + +-- | Identifies the application that handled this request. +rlAppId :: Lens' RequestLog (Maybe Text) +rlAppId = lens _rlAppId (\ s a -> s{_rlAppId = a}) + +-- | Request method, such as \`GET\`, \`HEAD\`, \`PUT\`, \`POST\`, or +-- \`DELETE\`. +rlMethod :: Lens' RequestLog (Maybe Text) +rlMethod = lens _rlMethod (\ s a -> s{_rlMethod = a}) + +-- | Contains the path and query portion of the URL that was requested. For +-- example, if the URL was \"http:\/\/example.com\/app?name=val\", the +-- resource would be \"\/app?name=val\". Any trailing fragment (separated +-- by a \'#\' character) will not be included. +rlResource :: Lens' RequestLog (Maybe Text) +rlResource + = lens _rlResource (\ s a -> s{_rlResource = a}) + +-- | Time at which request was known to end processing. +rlEndTime :: Lens' RequestLog (Maybe Text) +rlEndTime + = lens _rlEndTime (\ s a -> s{_rlEndTime = a}) + +-- | If true, represents a finished request. Otherwise, the request is +-- active. +rlFinished :: Lens' RequestLog (Maybe Bool) +rlFinished + = lens _rlFinished (\ s a -> s{_rlFinished = a}) + +-- | Number of CPU megacycles used to process request. +rlMegaCycles :: Lens' RequestLog (Maybe Int64) +rlMegaCycles + = lens _rlMegaCycles (\ s a -> s{_rlMegaCycles = a}) + +-- | User agent used for making request. +rlUserAgent :: Lens' RequestLog (Maybe Text) +rlUserAgent + = lens _rlUserAgent (\ s a -> s{_rlUserAgent = a}) + +-- | A string that identifies a logged-in user who made this request, or +-- empty if the user is not logged in. Most likely, this is the part of the +-- user\'s email before the \'\'\' sign. The field value is the same for +-- different requests from the same user, but different users may have a +-- similar name. This information is also available to the application via +-- Users API. This field will be populated starting with App Engine 1.9.21. +rlNickname :: Lens' RequestLog (Maybe Text) +rlNickname + = lens _rlNickname (\ s a -> s{_rlNickname = a}) + +-- | The Internet host and port number of the resource being requested. +rlHost :: Lens' RequestLog (Maybe Text) +rlHost = lens _rlHost (\ s a -> s{_rlHost = a}) + +-- | Queue name of the request (for an offline request). +rlTaskQueueName :: Lens' RequestLog (Maybe Text) +rlTaskQueueName + = lens _rlTaskQueueName + (\ s a -> s{_rlTaskQueueName = a}) + +-- | Size in bytes sent back to client by request. +rlResponseSize :: Lens' RequestLog (Maybe Int64) +rlResponseSize + = lens _rlResponseSize + (\ s a -> s{_rlResponseSize = a}) + +-- | Source code for the application that handled this request. There can be +-- more than one source reference per deployed application if source code +-- is distributed among multiple repositories. +rlSourceReference :: Lens' RequestLog [Maybe SourceReference] +rlSourceReference + = lens _rlSourceReference + (\ s a -> s{_rlSourceReference = a}) + . _Default + . _Coerce + +-- | App Engine release version string. +rlAppEngineRelease :: Lens' RequestLog (Maybe Text) +rlAppEngineRelease + = lens _rlAppEngineRelease + (\ s a -> s{_rlAppEngineRelease = a}) + +instance FromJSON RequestLog where + parseJSON + = withObject "RequestLog" + (\ o -> + RequestLog <$> + (o .:? "traceId") <*> (o .:? "instanceId") <*> + (o .:? "status") + <*> (o .:? "requestId") + <*> (o .:? "instanceIndex") + <*> (o .:? "moduleId") + <*> (o .:? "versionId") + <*> (o .:? "httpVersion") + <*> (o .:? "taskName") + <*> (o .:? "pendingTime") + <*> (o .:? "wasLoadingRequest") + <*> (o .:? "startTime") + <*> (o .:? "latency") + <*> (o .:? "urlMapEntry") + <*> (o .:? "cost") + <*> (o .:? "referrer") + <*> (o .:? "line" .!= mempty) + <*> (o .:? "ip") + <*> (o .:? "appId") + <*> (o .:? "method") + <*> (o .:? "resource") + <*> (o .:? "endTime") + <*> (o .:? "finished") + <*> (o .:? "megaCycles") + <*> (o .:? "userAgent") + <*> (o .:? "nickname") + <*> (o .:? "host") + <*> (o .:? "taskQueueName") + <*> (o .:? "responseSize") + <*> (o .:? "sourceReference" .!= mempty) + <*> (o .:? "appEngineRelease")) + +instance ToJSON RequestLog where + toJSON RequestLog{..} + = object + (catMaybes + [("traceId" .=) <$> _rlTraceId, + ("instanceId" .=) <$> _rlInstanceId, + ("status" .=) <$> _rlStatus, + ("requestId" .=) <$> _rlRequestId, + ("instanceIndex" .=) <$> _rlInstanceIndex, + ("moduleId" .=) <$> _rlModuleId, + ("versionId" .=) <$> _rlVersionId, + ("httpVersion" .=) <$> _rlHttpVersion, + ("taskName" .=) <$> _rlTaskName, + ("pendingTime" .=) <$> _rlPendingTime, + ("wasLoadingRequest" .=) <$> _rlWasLoadingRequest, + ("startTime" .=) <$> _rlStartTime, + ("latency" .=) <$> _rlLatency, + ("urlMapEntry" .=) <$> _rlUrlMapEntry, + ("cost" .=) <$> _rlCost, + ("referrer" .=) <$> _rlReferrer, + ("line" .=) <$> _rlLine, ("ip" .=) <$> _rlIp, + ("appId" .=) <$> _rlAppId, + ("method" .=) <$> _rlMethod, + ("resource" .=) <$> _rlResource, + ("endTime" .=) <$> _rlEndTime, + ("finished" .=) <$> _rlFinished, + ("megaCycles" .=) <$> _rlMegaCycles, + ("userAgent" .=) <$> _rlUserAgent, + ("nickname" .=) <$> _rlNickname, + ("host" .=) <$> _rlHost, + ("taskQueueName" .=) <$> _rlTaskQueueName, + ("responseSize" .=) <$> _rlResponseSize, + ("sourceReference" .=) <$> _rlSourceReference, + ("appEngineRelease" .=) <$> _rlAppEngineRelease]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Additional data that is associated with a log entry, set by the service +-- creating the log entry. +-- +-- /See:/ 'logEntryMetadata' smart constructor. +data LogEntryMetadata = LogEntryMetadata + { _lemSeverity :: !(Maybe Text) + , _lemZone :: !(Maybe Text) + , _lemUserId :: !(Maybe Text) + , _lemServiceName :: !(Maybe Text) + , _lemLabels :: !(Maybe LogEntryMetadataLabels) + , _lemRegion :: !(Maybe Text) + , _lemProjectId :: !(Maybe Text) + , _lemTimestamp :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogEntryMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lemSeverity' +-- +-- * 'lemZone' +-- +-- * 'lemUserId' +-- +-- * 'lemServiceName' +-- +-- * 'lemLabels' +-- +-- * 'lemRegion' +-- +-- * 'lemProjectId' +-- +-- * 'lemTimestamp' +logEntryMetadata + :: LogEntryMetadata +logEntryMetadata = + LogEntryMetadata + { _lemSeverity = Nothing + , _lemZone = Nothing + , _lemUserId = Nothing + , _lemServiceName = Nothing + , _lemLabels = Nothing + , _lemRegion = Nothing + , _lemProjectId = Nothing + , _lemTimestamp = Nothing + } + +-- | The severity of the log entry. +lemSeverity :: Lens' LogEntryMetadata (Maybe Text) +lemSeverity + = lens _lemSeverity (\ s a -> s{_lemSeverity = a}) + +-- | The zone of the Google Cloud Platform service that created the log +-- entry. For example, \`\"us-central1-a\"\`. +lemZone :: Lens' LogEntryMetadata (Maybe Text) +lemZone = lens _lemZone (\ s a -> s{_lemZone = a}) + +-- | The fully-qualified email address of the authenticated user that +-- performed or requested the action represented by the log entry. If the +-- log entry does not apply to an action taken by an authenticated user, +-- then the field should be empty. +lemUserId :: Lens' LogEntryMetadata (Maybe Text) +lemUserId + = lens _lemUserId (\ s a -> s{_lemUserId = a}) + +-- | The API name of the Google Cloud Platform service that created the log +-- entry. For example, \`\"compute.googleapis.com\"\`. +lemServiceName :: Lens' LogEntryMetadata (Maybe Text) +lemServiceName + = lens _lemServiceName + (\ s a -> s{_lemServiceName = a}) + +-- | A set of (key, value) data that provides additional information about +-- the log entry. If the log entry is from one of the Google Cloud Platform +-- sources listed below, the indicated (key, value) information must be +-- provided: Google App Engine, service_name \`appengine.googleapis.com\`: +-- \"appengine.googleapis.com\/module_id\", +-- \"appengine.googleapis.com\/version_id\", and one of: +-- \"appengine.googleapis.com\/replica_index\", +-- \"appengine.googleapis.com\/clone_id\", or else provide the following +-- Compute Engine labels: Google Compute Engine, service_name +-- \`compute.googleapis.com\`: \"compute.googleapis.com\/resource_type\", +-- \"instance\" \"compute.googleapis.com\/resource_id\", +lemLabels :: Lens' LogEntryMetadata (Maybe LogEntryMetadataLabels) +lemLabels + = lens _lemLabels (\ s a -> s{_lemLabels = a}) + +-- | The region name of the Google Cloud Platform service that created the +-- log entry. For example, \`\"us-central1\"\`. +lemRegion :: Lens' LogEntryMetadata (Maybe Text) +lemRegion + = lens _lemRegion (\ s a -> s{_lemRegion = a}) + +-- | The project ID of the Google Cloud Platform service that created the log +-- entry. +lemProjectId :: Lens' LogEntryMetadata (Maybe Text) +lemProjectId + = lens _lemProjectId (\ s a -> s{_lemProjectId = a}) + +-- | The time the event described by the log entry occurred. Timestamps must +-- be later than January 1, 1970. +lemTimestamp :: Lens' LogEntryMetadata (Maybe Text) +lemTimestamp + = lens _lemTimestamp (\ s a -> s{_lemTimestamp = a}) + +instance FromJSON LogEntryMetadata where + parseJSON + = withObject "LogEntryMetadata" + (\ o -> + LogEntryMetadata <$> + (o .:? "severity") <*> (o .:? "zone") <*> + (o .:? "userId") + <*> (o .:? "serviceName") + <*> (o .:? "labels") + <*> (o .:? "region") + <*> (o .:? "projectId") + <*> (o .:? "timestamp")) + +instance ToJSON LogEntryMetadata where + toJSON LogEntryMetadata{..} + = object + (catMaybes + [("severity" .=) <$> _lemSeverity, + ("zone" .=) <$> _lemZone, + ("userId" .=) <$> _lemUserId, + ("serviceName" .=) <$> _lemServiceName, + ("labels" .=) <$> _lemLabels, + ("region" .=) <$> _lemRegion, + ("projectId" .=) <$> _lemProjectId, + ("timestamp" .=) <$> _lemTimestamp]) + +-- | Result returned from \`ListSinks\`. +-- +-- /See:/ 'listSinksResponse' smart constructor. +newtype ListSinksResponse = ListSinksResponse + { _lsrSinks :: Maybe [Maybe LogSink] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListSinksResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsrSinks' +listSinksResponse + :: ListSinksResponse +listSinksResponse = + ListSinksResponse + { _lsrSinks = Nothing + } + +-- | The requested sinks. If a returned \`LogSink\` object has an empty +-- \`destination\` field, the client can retrieve the complete \`LogSink\` +-- object by calling \`projects.sinks.get\`. +lsrSinks :: Lens' ListSinksResponse [Maybe LogSink] +lsrSinks + = lens _lsrSinks (\ s a -> s{_lsrSinks = a}) . + _Default + . _Coerce + +instance FromJSON ListSinksResponse where + parseJSON + = withObject "ListSinksResponse" + (\ o -> + ListSinksResponse <$> (o .:? "sinks" .!= mempty)) + +instance ToJSON ListSinksResponse where + toJSON ListSinksResponse{..} + = object (catMaybes [("sinks" .=) <$> _lsrSinks]) + +-- | Result returned from ListLogServiceIndexesRequest. +-- +-- /See:/ 'listLogServiceIndexesResponse' smart constructor. +data ListLogServiceIndexesResponse = ListLogServiceIndexesResponse + { _llsirNextPageToken :: !(Maybe Text) + , _llsirServiceIndexPrefixes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLogServiceIndexesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llsirNextPageToken' +-- +-- * 'llsirServiceIndexPrefixes' +listLogServiceIndexesResponse + :: ListLogServiceIndexesResponse +listLogServiceIndexesResponse = + ListLogServiceIndexesResponse + { _llsirNextPageToken = Nothing + , _llsirServiceIndexPrefixes = Nothing + } + +-- | If there are more results, then \`nextPageToken\` is returned in the +-- response. To get the next batch of indexes, use the value of +-- \`nextPageToken\` as \`pageToken\` in the next call of +-- \`ListLogServiceIndexes\`. If \`nextPageToken\` is empty, then there are +-- no more results. +llsirNextPageToken :: Lens' ListLogServiceIndexesResponse (Maybe Text) +llsirNextPageToken + = lens _llsirNextPageToken + (\ s a -> s{_llsirNextPageToken = a}) + +-- | A list of log service index values. Each index value has the form +-- \`\"\/value1\/value2\/...\"\`, where \`value1\` is a value in the +-- primary index, \`value2\` is a value in the secondary index, and so +-- forth. +llsirServiceIndexPrefixes :: Lens' ListLogServiceIndexesResponse [Text] +llsirServiceIndexPrefixes + = lens _llsirServiceIndexPrefixes + (\ s a -> s{_llsirServiceIndexPrefixes = a}) + . _Default + . _Coerce + +instance FromJSON ListLogServiceIndexesResponse where + parseJSON + = withObject "ListLogServiceIndexesResponse" + (\ o -> + ListLogServiceIndexesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "serviceIndexPrefixes" .!= mempty)) + +instance ToJSON ListLogServiceIndexesResponse where + toJSON ListLogServiceIndexesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _llsirNextPageToken, + ("serviceIndexPrefixes" .=) <$> + _llsirServiceIndexPrefixes]) + +-- | Result returned from WriteLogEntries. empty +-- +-- /See:/ 'writeLogEntriesResponse' smart constructor. +data WriteLogEntriesResponse = + WriteLogEntriesResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteLogEntriesResponse' with the minimum fields required to make a request. +-- +writeLogEntriesResponse + :: WriteLogEntriesResponse +writeLogEntriesResponse = WriteLogEntriesResponse + +instance FromJSON WriteLogEntriesResponse where + parseJSON + = withObject "WriteLogEntriesResponse" + (\ o -> pure WriteLogEntriesResponse) + +instance ToJSON WriteLogEntriesResponse where + toJSON = const (Object mempty) + +-- | Describes where log entries are written outside of Cloud Logging. +-- +-- /See:/ 'logSink' smart constructor. +data LogSink = LogSink + { _lsDestination :: !(Maybe Text) + , _lsName :: !(Maybe Text) + , _lsFilter :: !(Maybe Text) + , _lsErrors :: !(Maybe [Maybe LogError]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogSink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsDestination' +-- +-- * 'lsName' +-- +-- * 'lsFilter' +-- +-- * 'lsErrors' +logSink + :: LogSink +logSink = + LogSink + { _lsDestination = Nothing + , _lsName = Nothing + , _lsFilter = Nothing + , _lsErrors = Nothing + } + +-- | The resource name of the destination. Cloud Logging writes designated +-- log entries to this destination. For example, +-- \`\"storage.googleapis.com\/my-output-bucket\"\`. +lsDestination :: Lens' LogSink (Maybe Text) +lsDestination + = lens _lsDestination + (\ s a -> s{_lsDestination = a}) + +-- | The client-assigned name of this sink. For example, +-- \`\"my-syslog-sink\"\`. The name must be unique among the sinks of a +-- similar kind in the project. +lsName :: Lens' LogSink (Maybe Text) +lsName = lens _lsName (\ s a -> s{_lsName = a}) + +-- | An advanced logs filter. If present, only log entries matching the +-- filter are written. Only project sinks use this field; log sinks and log +-- service sinks must not include a filter. +lsFilter :: Lens' LogSink (Maybe Text) +lsFilter = lens _lsFilter (\ s a -> s{_lsFilter = a}) + +-- | _Output only._ If any errors occur when invoking a sink method, then +-- this field contains descriptions of the errors. +lsErrors :: Lens' LogSink [Maybe LogError] +lsErrors + = lens _lsErrors (\ s a -> s{_lsErrors = a}) . + _Default + . _Coerce + +instance FromJSON LogSink where + parseJSON + = withObject "LogSink" + (\ o -> + LogSink <$> + (o .:? "destination") <*> (o .:? "name") <*> + (o .:? "filter") + <*> (o .:? "errors" .!= mempty)) + +instance ToJSON LogSink where + toJSON LogSink{..} + = object + (catMaybes + [("destination" .=) <$> _lsDestination, + ("name" .=) <$> _lsName, ("filter" .=) <$> _lsFilter, + ("errors" .=) <$> _lsErrors]) + +-- | Result returned from \`ListLogServicesRequest\`. +-- +-- /See:/ 'listLogServicesResponse' smart constructor. +data ListLogServicesResponse = ListLogServicesResponse + { _llsrNextPageToken :: !(Maybe Text) + , _llsrLogServices :: !(Maybe [Maybe LogService]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLogServicesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llsrNextPageToken' +-- +-- * 'llsrLogServices' +listLogServicesResponse + :: ListLogServicesResponse +listLogServicesResponse = + ListLogServicesResponse + { _llsrNextPageToken = Nothing + , _llsrLogServices = Nothing + } + +-- | If there are more results, then \`nextPageToken\` is returned in the +-- response. To get the next batch of services, use the value of +-- \`nextPageToken\` as \`pageToken\` in the next call of +-- \`ListLogServices\`. If \`nextPageToken\` is empty, then there are no +-- more results. +llsrNextPageToken :: Lens' ListLogServicesResponse (Maybe Text) +llsrNextPageToken + = lens _llsrNextPageToken + (\ s a -> s{_llsrNextPageToken = a}) + +-- | A list of log services. +llsrLogServices :: Lens' ListLogServicesResponse [Maybe LogService] +llsrLogServices + = lens _llsrLogServices + (\ s a -> s{_llsrLogServices = a}) + . _Default + . _Coerce + +instance FromJSON ListLogServicesResponse where + parseJSON + = withObject "ListLogServicesResponse" + (\ o -> + ListLogServicesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "logServices" .!= mempty)) + +instance ToJSON ListLogServicesResponse where + toJSON ListLogServicesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _llsrNextPageToken, + ("logServices" .=) <$> _llsrLogServices]) + +-- | Result returned from ListLogs. +-- +-- /See:/ 'listLogsResponse' smart constructor. +data ListLogsResponse = ListLogsResponse + { _llrNextPageToken :: !(Maybe Text) + , _llrLogs :: !(Maybe [Maybe Log]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLogsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrNextPageToken' +-- +-- * 'llrLogs' +listLogsResponse + :: ListLogsResponse +listLogsResponse = + ListLogsResponse + { _llrNextPageToken = Nothing + , _llrLogs = Nothing + } + +-- | If there are more results, then \`nextPageToken\` is returned in the +-- response. To get the next batch of logs, use the value of +-- \`nextPageToken\` as \`pageToken\` in the next call of \`ListLogs\`. If +-- \`nextPageToken\` is empty, then there are no more results. +llrNextPageToken :: Lens' ListLogsResponse (Maybe Text) +llrNextPageToken + = lens _llrNextPageToken + (\ s a -> s{_llrNextPageToken = a}) + +-- | A list of log descriptions matching the criteria. +llrLogs :: Lens' ListLogsResponse [Maybe Log] +llrLogs + = lens _llrLogs (\ s a -> s{_llrLogs = a}) . _Default + . _Coerce + +instance FromJSON ListLogsResponse where + parseJSON + = withObject "ListLogsResponse" + (\ o -> + ListLogsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "logs" .!= mempty)) + +instance ToJSON ListLogsResponse where + toJSON ListLogsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _llrNextPageToken, + ("logs" .=) <$> _llrLogs]) + +-- | A common proto for logging HTTP requests. +-- +-- /See:/ 'hTTPRequest' smart constructor. +data HTTPRequest = HTTPRequest + { _httprStatus :: !(Maybe Int32) + , _httprRequestUrl :: !(Maybe Text) + , _httprRemoteIp :: !(Maybe Text) + , _httprRequestSize :: !(Maybe Int64) + , _httprUserAgent :: !(Maybe Text) + , _httprResponseSize :: !(Maybe Int64) + , _httprRequestMethod :: !(Maybe Text) + , _httprReferer :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httprStatus' +-- +-- * 'httprRequestUrl' +-- +-- * 'httprRemoteIp' +-- +-- * 'httprRequestSize' +-- +-- * 'httprUserAgent' +-- +-- * 'httprResponseSize' +-- +-- * 'httprRequestMethod' +-- +-- * 'httprReferer' +hTTPRequest + :: HTTPRequest +hTTPRequest = + HTTPRequest + { _httprStatus = Nothing + , _httprRequestUrl = Nothing + , _httprRemoteIp = Nothing + , _httprRequestSize = Nothing + , _httprUserAgent = Nothing + , _httprResponseSize = Nothing + , _httprRequestMethod = Nothing + , _httprReferer = Nothing + } + +-- | A response code indicates the status of response, e.g., 200. +httprStatus :: Lens' HTTPRequest (Maybe Int32) +httprStatus + = lens _httprStatus (\ s a -> s{_httprStatus = a}) + +-- | Contains the scheme (http|https), the host name, the path and the query +-- portion of the URL that was requested. +httprRequestUrl :: Lens' HTTPRequest (Maybe Text) +httprRequestUrl + = lens _httprRequestUrl + (\ s a -> s{_httprRequestUrl = a}) + +-- | IP address of the client who issues the HTTP request. Could be either +-- IPv4 or IPv6. +httprRemoteIp :: Lens' HTTPRequest (Maybe Text) +httprRemoteIp + = lens _httprRemoteIp + (\ s a -> s{_httprRemoteIp = a}) + +-- | Size of the HTTP request message in bytes, including request headers and +-- the request body. +httprRequestSize :: Lens' HTTPRequest (Maybe Int64) +httprRequestSize + = lens _httprRequestSize + (\ s a -> s{_httprRequestSize = a}) + +-- | User agent sent by the client, e.g., \"Mozilla\/4.0 (compatible; MSIE +-- 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\". +httprUserAgent :: Lens' HTTPRequest (Maybe Text) +httprUserAgent + = lens _httprUserAgent + (\ s a -> s{_httprUserAgent = a}) + +-- | Size of the HTTP response message in bytes sent back to the client, +-- including response headers and response body. +httprResponseSize :: Lens' HTTPRequest (Maybe Int64) +httprResponseSize + = lens _httprResponseSize + (\ s a -> s{_httprResponseSize = a}) + +-- | Request method, such as \`GET\`, \`HEAD\`, \`PUT\` or \`POST\`. +httprRequestMethod :: Lens' HTTPRequest (Maybe Text) +httprRequestMethod + = lens _httprRequestMethod + (\ s a -> s{_httprRequestMethod = a}) + +-- | Referer (a.k.a. referrer) URL of request, as defined in +-- http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html. +httprReferer :: Lens' HTTPRequest (Maybe Text) +httprReferer + = lens _httprReferer (\ s a -> s{_httprReferer = a}) + +instance FromJSON HTTPRequest where + parseJSON + = withObject "HTTPRequest" + (\ o -> + HTTPRequest <$> + (o .:? "status") <*> (o .:? "requestUrl") <*> + (o .:? "remoteIp") + <*> (o .:? "requestSize") + <*> (o .:? "userAgent") + <*> (o .:? "responseSize") + <*> (o .:? "requestMethod") + <*> (o .:? "referer")) + +instance ToJSON HTTPRequest where + toJSON HTTPRequest{..} + = object + (catMaybes + [("status" .=) <$> _httprStatus, + ("requestUrl" .=) <$> _httprRequestUrl, + ("remoteIp" .=) <$> _httprRemoteIp, + ("requestSize" .=) <$> _httprRequestSize, + ("userAgent" .=) <$> _httprUserAgent, + ("responseSize" .=) <$> _httprResponseSize, + ("requestMethod" .=) <$> _httprRequestMethod, + ("referer" .=) <$> _httprReferer]) + +-- | Result returned from \`ListLogSinks\`. +-- +-- /See:/ 'listLogSinksResponse' smart constructor. +newtype ListLogSinksResponse = ListLogSinksResponse + { _llsrSinks :: Maybe [Maybe LogSink] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLogSinksResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llsrSinks' +listLogSinksResponse + :: ListLogSinksResponse +listLogSinksResponse = + ListLogSinksResponse + { _llsrSinks = Nothing + } + +-- | The requested log sinks. If a returned \`LogSink\` object has an empty +-- \`destination\` field, the client can retrieve the complete \`LogSink\` +-- object by calling \`log.sinks.get\`. +llsrSinks :: Lens' ListLogSinksResponse [Maybe LogSink] +llsrSinks + = lens _llsrSinks (\ s a -> s{_llsrSinks = a}) . + _Default + . _Coerce + +instance FromJSON ListLogSinksResponse where + parseJSON + = withObject "ListLogSinksResponse" + (\ o -> + ListLogSinksResponse <$> (o .:? "sinks" .!= mempty)) + +instance ToJSON ListLogSinksResponse where + toJSON ListLogSinksResponse{..} + = object (catMaybes [("sinks" .=) <$> _llsrSinks]) + +-- | _Output only._ Describes a service that writes log entries. +-- +-- /See:/ 'logService' smart constructor. +data LogService = LogService + { _lName :: !(Maybe Text) + , _lIndexKeys :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogService' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lName' +-- +-- * 'lIndexKeys' +logService + :: LogService +logService = + LogService + { _lName = Nothing + , _lIndexKeys = Nothing + } + +-- | The service\'s name. Example: \`\"appengine.googleapis.com\"\`. Log +-- names beginning with this string are reserved for this service. This +-- value can appear in the \`LogEntry.metadata.serviceName\` field of log +-- entries associated with this log service. +lName :: Lens' LogService (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | A list of the names of the keys used to index and label individual log +-- entries from this service. The first two keys are used as the primary +-- and secondary index, respectively. Additional keys may be used to label +-- the entries. For example, App Engine indexes its entries by module and +-- by version, so its \`indexKeys\` field is the following: [ +-- \"appengine.googleapis.com\/module_id\", +-- \"appengine.googleapis.com\/version_id\" ] +lIndexKeys :: Lens' LogService [Text] +lIndexKeys + = lens _lIndexKeys (\ s a -> s{_lIndexKeys = a}) . + _Default + . _Coerce + +instance FromJSON LogService where + parseJSON + = withObject "LogService" + (\ o -> + LogService <$> + (o .:? "name") <*> (o .:? "indexKeys" .!= mempty)) + +instance ToJSON LogService where + toJSON LogService{..} + = object + (catMaybes + [("name" .=) <$> _lName, + ("indexKeys" .=) <$> _lIndexKeys]) + +-- | Result returned from \`ListLogServiceSinks\`. +-- +-- /See:/ 'listLogServiceSinksResponse' smart constructor. +newtype ListLogServiceSinksResponse = ListLogServiceSinksResponse + { _llssrSinks :: Maybe [Maybe LogSink] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListLogServiceSinksResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llssrSinks' +listLogServiceSinksResponse + :: ListLogServiceSinksResponse +listLogServiceSinksResponse = + ListLogServiceSinksResponse + { _llssrSinks = Nothing + } + +-- | The requested log service sinks. If a returned \`LogSink\` object has an +-- empty \`destination\` field, the client can retrieve the complete +-- \`LogSink\` object by calling \`logServices.sinks.get\`. +llssrSinks :: Lens' ListLogServiceSinksResponse [Maybe LogSink] +llssrSinks + = lens _llssrSinks (\ s a -> s{_llssrSinks = a}) . + _Default + . _Coerce + +instance FromJSON ListLogServiceSinksResponse where + parseJSON + = withObject "ListLogServiceSinksResponse" + (\ o -> + ListLogServiceSinksResponse <$> + (o .:? "sinks" .!= mempty)) + +instance ToJSON ListLogServiceSinksResponse where + toJSON ListLogServiceSinksResponse{..} + = object (catMaybes [("sinks" .=) <$> _llssrSinks]) + +-- | Application log line emitted while processing a request. +-- +-- /See:/ 'logLine' smart constructor. +data LogLine = LogLine + { _llTime :: !(Maybe Text) + , _llSeverity :: !(Maybe Text) + , _llLogMessage :: !(Maybe Text) + , _llSourceLocation :: !(Maybe (Maybe SourceLocation)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogLine' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llTime' +-- +-- * 'llSeverity' +-- +-- * 'llLogMessage' +-- +-- * 'llSourceLocation' +logLine + :: LogLine +logLine = + LogLine + { _llTime = Nothing + , _llSeverity = Nothing + , _llLogMessage = Nothing + , _llSourceLocation = Nothing + } + +-- | Time when log entry was made. May be inaccurate. +llTime :: Lens' LogLine (Maybe Text) +llTime = lens _llTime (\ s a -> s{_llTime = a}) + +-- | Severity of log. +llSeverity :: Lens' LogLine (Maybe Text) +llSeverity + = lens _llSeverity (\ s a -> s{_llSeverity = a}) + +-- | App provided log message. +llLogMessage :: Lens' LogLine (Maybe Text) +llLogMessage + = lens _llLogMessage (\ s a -> s{_llLogMessage = a}) + +-- | Line of code that generated this log message. +llSourceLocation :: Lens' LogLine (Maybe (Maybe SourceLocation)) +llSourceLocation + = lens _llSourceLocation + (\ s a -> s{_llSourceLocation = a}) + +instance FromJSON LogLine where + parseJSON + = withObject "LogLine" + (\ o -> + LogLine <$> + (o .:? "time") <*> (o .:? "severity") <*> + (o .:? "logMessage") + <*> (o .:? "sourceLocation")) + +instance ToJSON LogLine where + toJSON LogLine{..} + = object + (catMaybes + [("time" .=) <$> _llTime, + ("severity" .=) <$> _llSeverity, + ("logMessage" .=) <$> _llLogMessage, + ("sourceLocation" .=) <$> _llSourceLocation]) + +-- | An individual entry in a log. +-- +-- /See:/ 'logEntry' smart constructor. +data LogEntry = LogEntry + { _leLog :: !(Maybe Text) + , _leTextPayload :: !(Maybe Text) + , _leHttpRequest :: !(Maybe (Maybe HTTPRequest)) + , _leStructPayload :: !(Maybe LogEntryStructPayload) + , _leInsertId :: !(Maybe Text) + , _leMetadata :: !(Maybe (Maybe LogEntryMetadata)) + , _leProtoPayload :: !(Maybe LogEntryProtoPayload) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'leLog' +-- +-- * 'leTextPayload' +-- +-- * 'leHttpRequest' +-- +-- * 'leStructPayload' +-- +-- * 'leInsertId' +-- +-- * 'leMetadata' +-- +-- * 'leProtoPayload' +logEntry + :: LogEntry +logEntry = + LogEntry + { _leLog = Nothing + , _leTextPayload = Nothing + , _leHttpRequest = Nothing + , _leStructPayload = Nothing + , _leInsertId = Nothing + , _leMetadata = Nothing + , _leProtoPayload = Nothing + } + +-- | The log to which this entry belongs. When a log entry is ingested, the +-- value of this field is set by the logging system. +leLog :: Lens' LogEntry (Maybe Text) +leLog = lens _leLog (\ s a -> s{_leLog = a}) + +-- | The log entry payload, represented as a text string. +leTextPayload :: Lens' LogEntry (Maybe Text) +leTextPayload + = lens _leTextPayload + (\ s a -> s{_leTextPayload = a}) + +-- | Information about the HTTP request associated with this log entry, if +-- applicable. +leHttpRequest :: Lens' LogEntry (Maybe (Maybe HTTPRequest)) +leHttpRequest + = lens _leHttpRequest + (\ s a -> s{_leHttpRequest = a}) + +-- | The log entry payload, represented as a structure that is expressed as a +-- JSON object. +leStructPayload :: Lens' LogEntry (Maybe LogEntryStructPayload) +leStructPayload + = lens _leStructPayload + (\ s a -> s{_leStructPayload = a}) + +-- | A unique ID for the log entry. If you provide this field, the logging +-- service considers other log entries in the same log with the same ID as +-- duplicates which can be removed. +leInsertId :: Lens' LogEntry (Maybe Text) +leInsertId + = lens _leInsertId (\ s a -> s{_leInsertId = a}) + +-- | Information about the log entry. +leMetadata :: Lens' LogEntry (Maybe (Maybe LogEntryMetadata)) +leMetadata + = lens _leMetadata (\ s a -> s{_leMetadata = a}) + +-- | The log entry payload, represented as a protocol buffer that is +-- expressed as a JSON object. You can only pass \`protoPayload\` values +-- that belong to a set of approved types. +leProtoPayload :: Lens' LogEntry (Maybe LogEntryProtoPayload) +leProtoPayload + = lens _leProtoPayload + (\ s a -> s{_leProtoPayload = a}) + +instance FromJSON LogEntry where + parseJSON + = withObject "LogEntry" + (\ o -> + LogEntry <$> + (o .:? "log") <*> (o .:? "textPayload") <*> + (o .:? "httpRequest") + <*> (o .:? "structPayload") + <*> (o .:? "insertId") + <*> (o .:? "metadata") + <*> (o .:? "protoPayload")) + +instance ToJSON LogEntry where + toJSON LogEntry{..} + = object + (catMaybes + [("log" .=) <$> _leLog, + ("textPayload" .=) <$> _leTextPayload, + ("httpRequest" .=) <$> _leHttpRequest, + ("structPayload" .=) <$> _leStructPayload, + ("insertId" .=) <$> _leInsertId, + ("metadata" .=) <$> _leMetadata, + ("protoPayload" .=) <$> _leProtoPayload]) + +-- | Specifies a location in a source file. +-- +-- /See:/ 'sourceLocation' smart constructor. +data SourceLocation = SourceLocation + { _slLine :: !(Maybe Int64) + , _slFunctionName :: !(Maybe Text) + , _slFile :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slLine' +-- +-- * 'slFunctionName' +-- +-- * 'slFile' +sourceLocation + :: SourceLocation +sourceLocation = + SourceLocation + { _slLine = Nothing + , _slFunctionName = Nothing + , _slFile = Nothing + } + +-- | Line within the source file. +slLine :: Lens' SourceLocation (Maybe Int64) +slLine = lens _slLine (\ s a -> s{_slLine = a}) + +-- | Human-readable name of the function or method being invoked, with +-- optional context such as the class or package name, for use in contexts +-- such as the logs viewer where file:line number is less meaningful. This +-- may vary by language, for example: in Java: qual.if.ied.Class.method in +-- Go: dir\/package.func in Python: function ... +slFunctionName :: Lens' SourceLocation (Maybe Text) +slFunctionName + = lens _slFunctionName + (\ s a -> s{_slFunctionName = a}) + +-- | Source file name. May or may not be a fully qualified name, depending on +-- the runtime environment. +slFile :: Lens' SourceLocation (Maybe Text) +slFile = lens _slFile (\ s a -> s{_slFile = a}) + +instance FromJSON SourceLocation where + parseJSON + = withObject "SourceLocation" + (\ o -> + SourceLocation <$> + (o .:? "line") <*> (o .:? "functionName") <*> + (o .:? "file")) + +instance ToJSON SourceLocation where + toJSON SourceLocation{..} + = object + (catMaybes + [("line" .=) <$> _slLine, + ("functionName" .=) <$> _slFunctionName, + ("file" .=) <$> _slFile]) + +-- | A reference to a particular snapshot of the source tree used to build +-- and deploy an application. +-- +-- /See:/ 'sourceReference' smart constructor. +data SourceReference = SourceReference + { _srRepository :: !(Maybe Text) + , _srRevisionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SourceReference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srRepository' +-- +-- * 'srRevisionId' +sourceReference + :: SourceReference +sourceReference = + SourceReference + { _srRepository = Nothing + , _srRevisionId = Nothing + } + +-- | Optional. A URI string identifying the repository. Example: +-- \"https:\/\/github.com\/GoogleCloudPlatform\/kubernetes.git\" +srRepository :: Lens' SourceReference (Maybe Text) +srRepository + = lens _srRepository (\ s a -> s{_srRepository = a}) + +-- | The canonical (and persistent) identifier of the deployed revision. +-- Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\" +srRevisionId :: Lens' SourceReference (Maybe Text) +srRevisionId + = lens _srRevisionId (\ s a -> s{_srRevisionId = a}) + +instance FromJSON SourceReference where + parseJSON + = withObject "SourceReference" + (\ o -> + SourceReference <$> + (o .:? "repository") <*> (o .:? "revisionId")) + +instance ToJSON SourceReference where + toJSON SourceReference{..} + = object + (catMaybes + [("repository" .=) <$> _srRepository, + ("revisionId" .=) <$> _srRevisionId]) diff --git a/gogol-logging/gen/Network/Google/Logging/Types/Sum.hs b/gogol-logging/gen/Network/Google/Logging/Types/Sum.hs new file mode 100644 index 000000000..e44401e3c --- /dev/null +++ b/gogol-logging/gen/Network/Google/Logging/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Logging.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Logging.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Indexes/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Indexes/List.hs new file mode 100644 index 000000000..144c5b350 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Indexes/List.hs @@ -0,0 +1,340 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Indexes.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the current index values for a log service. +-- +-- /See:/ for @LoggingProjectsLogServicesIndexesList@. +module Logging.Projects.LogServices.Indexes.List + ( + -- * REST Resource + ProjectsLogServicesIndexesListAPI + + -- * Creating a Request + , projectsLogServicesIndexesList + , ProjectsLogServicesIndexesList + + -- * Request Lenses + , plsilLog + , plsilXgafv + , plsilQuotaUser + , plsilPrettyPrint + , plsilUploadProtocol + , plsilPp + , plsilAccessToken + , plsilUploadType + , plsilBearerToken + , plsilKey + , plsilLogServicesId + , plsilDepth + , plsilPageToken + , plsilOauthToken + , plsilProjectsId + , plsilPageSize + , plsilIndexPrefix + , plsilFields + , plsilCallback + , plsilAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesIndexesList@ which the +-- 'ProjectsLogServicesIndexesList' request conforms to. +type ProjectsLogServicesIndexesListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "indexes" :> + QueryParam "log" Text :> + QueryParam "depth" Int32 :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + QueryParam "indexPrefix" Text :> + Get '[JSON] ListLogServiceIndexesResponse + +-- | Lists the current index values for a log service. +-- +-- /See:/ 'projectsLogServicesIndexesList' smart constructor. +data ProjectsLogServicesIndexesList = ProjectsLogServicesIndexesList + { _plsilLog :: !(Maybe Text) + , _plsilXgafv :: !(Maybe Text) + , _plsilQuotaUser :: !(Maybe Text) + , _plsilPrettyPrint :: !Bool + , _plsilUploadProtocol :: !(Maybe Text) + , _plsilPp :: !Bool + , _plsilAccessToken :: !(Maybe Text) + , _plsilUploadType :: !(Maybe Text) + , _plsilBearerToken :: !(Maybe Text) + , _plsilKey :: !(Maybe Text) + , _plsilLogServicesId :: !Text + , _plsilDepth :: !(Maybe Int32) + , _plsilPageToken :: !(Maybe Text) + , _plsilOauthToken :: !(Maybe Text) + , _plsilProjectsId :: !Text + , _plsilPageSize :: !(Maybe Int32) + , _plsilIndexPrefix :: !(Maybe Text) + , _plsilFields :: !(Maybe Text) + , _plsilCallback :: !(Maybe Text) + , _plsilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesIndexesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsilLog' +-- +-- * 'plsilXgafv' +-- +-- * 'plsilQuotaUser' +-- +-- * 'plsilPrettyPrint' +-- +-- * 'plsilUploadProtocol' +-- +-- * 'plsilPp' +-- +-- * 'plsilAccessToken' +-- +-- * 'plsilUploadType' +-- +-- * 'plsilBearerToken' +-- +-- * 'plsilKey' +-- +-- * 'plsilLogServicesId' +-- +-- * 'plsilDepth' +-- +-- * 'plsilPageToken' +-- +-- * 'plsilOauthToken' +-- +-- * 'plsilProjectsId' +-- +-- * 'plsilPageSize' +-- +-- * 'plsilIndexPrefix' +-- +-- * 'plsilFields' +-- +-- * 'plsilCallback' +-- +-- * 'plsilAlt' +projectsLogServicesIndexesList + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> ProjectsLogServicesIndexesList +projectsLogServicesIndexesList pPlsilLogServicesId_ pPlsilProjectsId_ = + ProjectsLogServicesIndexesList + { _plsilLog = Nothing + , _plsilXgafv = Nothing + , _plsilQuotaUser = Nothing + , _plsilPrettyPrint = True + , _plsilUploadProtocol = Nothing + , _plsilPp = True + , _plsilAccessToken = Nothing + , _plsilUploadType = Nothing + , _plsilBearerToken = Nothing + , _plsilKey = Nothing + , _plsilLogServicesId = pPlsilLogServicesId_ + , _plsilDepth = Nothing + , _plsilPageToken = Nothing + , _plsilOauthToken = Nothing + , _plsilProjectsId = pPlsilProjectsId_ + , _plsilPageSize = Nothing + , _plsilIndexPrefix = Nothing + , _plsilFields = Nothing + , _plsilCallback = Nothing + , _plsilAlt = "json" + } + +-- | _Optional_. The resource name of a log, such as +-- \`\"projects\/project_id\/logs\/log_name\"\`. If present, indexes are +-- returned for any service associated with entries in the log. +plsilLog :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilLog = lens _plsilLog (\ s a -> s{_plsilLog = a}) + +-- | V1 error format. +plsilXgafv :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilXgafv + = lens _plsilXgafv (\ s a -> s{_plsilXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsilQuotaUser :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilQuotaUser + = lens _plsilQuotaUser + (\ s a -> s{_plsilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsilPrettyPrint :: Lens' ProjectsLogServicesIndexesList' Bool +plsilPrettyPrint + = lens _plsilPrettyPrint + (\ s a -> s{_plsilPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsilUploadProtocol :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilUploadProtocol + = lens _plsilUploadProtocol + (\ s a -> s{_plsilUploadProtocol = a}) + +-- | Pretty-print response. +plsilPp :: Lens' ProjectsLogServicesIndexesList' Bool +plsilPp = lens _plsilPp (\ s a -> s{_plsilPp = a}) + +-- | OAuth access token. +plsilAccessToken :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilAccessToken + = lens _plsilAccessToken + (\ s a -> s{_plsilAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsilUploadType :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilUploadType + = lens _plsilUploadType + (\ s a -> s{_plsilUploadType = a}) + +-- | OAuth bearer token. +plsilBearerToken :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilBearerToken + = lens _plsilBearerToken + (\ s a -> s{_plsilBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsilKey :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilKey = lens _plsilKey (\ s a -> s{_plsilKey = a}) + +-- | Part of \`serviceName\`. See documentation of \`projectsId\`. +plsilLogServicesId :: Lens' ProjectsLogServicesIndexesList' Text +plsilLogServicesId + = lens _plsilLogServicesId + (\ s a -> s{_plsilLogServicesId = a}) + +-- | A non-negative integer that limits the number of levels of the index +-- hierarchy that are returned. If \`depth\` is 1 (default), only the first +-- index key value is returned. If \`depth\` is 2, both primary and +-- secondary key values are returned. If \`depth\` is 0, the depth is the +-- number of slash-separators in the \`indexPrefix\` field, not counting a +-- slash appearing as the last character of the prefix. If the +-- \`indexPrefix\` field is empty, the default depth is 1. It is an error +-- for \`depth\` to be any positive value less than the number of +-- components in \`indexPrefix\`. +plsilDepth :: Lens' ProjectsLogServicesIndexesList' (Maybe Int32) +plsilDepth + = lens _plsilDepth (\ s a -> s{_plsilDepth = a}) + +-- | An opaque token, returned as \`nextPageToken\` by a prior +-- \`ListLogServiceIndexes\` operation. If \`pageToken\` is supplied, then +-- the other fields of this request are ignored, and instead the previous +-- \`ListLogServiceIndexes\` operation is continued. +plsilPageToken :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilPageToken + = lens _plsilPageToken + (\ s a -> s{_plsilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plsilOauthToken :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilOauthToken + = lens _plsilOauthToken + (\ s a -> s{_plsilOauthToken = a}) + +-- | Part of \`serviceName\`. The resource name of a log service whose +-- service indexes are requested. Example: +-- \`\"projects\/my-project-id\/logServices\/appengine.googleapis.com\"\`. +plsilProjectsId :: Lens' ProjectsLogServicesIndexesList' Text +plsilProjectsId + = lens _plsilProjectsId + (\ s a -> s{_plsilProjectsId = a}) + +-- | The maximum number of log service index resources to return in one +-- operation. +plsilPageSize :: Lens' ProjectsLogServicesIndexesList' (Maybe Int32) +plsilPageSize + = lens _plsilPageSize + (\ s a -> s{_plsilPageSize = a}) + +-- | Restricts the index values returned to be those with a specified prefix +-- for each index key. This field has the form +-- \`\"\/prefix1\/prefix2\/...\"\`, in order corresponding to the +-- [\`LogService indexKeys\`][google.logging.v1.LogService.index_keys]. +-- Non-empty prefixes must begin with \`\/\`. For example, App Engine\'s +-- two keys are the module ID and the version ID. Following is the effect +-- of using various values for \`indexPrefix\`: + \`\"\/Mod\/\"\` retrieves +-- \`\/Mod\/10\` and \`\/Mod\/11\` but not \`\/ModA\/10\`. + \`\"\/Mod\` +-- retrieves \`\/Mod\/10\`, \`\/Mod\/11\` and \`\/ModA\/10\` but not +-- \`\/XXX\/33\`. + \`\"\/Mod\/1\"\` retrieves \`\/Mod\/10\` and +-- \`\/Mod\/11\` but not \`\/ModA\/10\`. + \`\"\/Mod\/10\/\"\` retrieves +-- \`\/Mod\/10\` only. + An empty prefix or \`\"\/\"\` retrieves all +-- values. +plsilIndexPrefix :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilIndexPrefix + = lens _plsilIndexPrefix + (\ s a -> s{_plsilIndexPrefix = a}) + +-- | Selector specifying which fields to include in a partial response. +plsilFields :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilFields + = lens _plsilFields (\ s a -> s{_plsilFields = a}) + +-- | JSONP +plsilCallback :: Lens' ProjectsLogServicesIndexesList' (Maybe Text) +plsilCallback + = lens _plsilCallback + (\ s a -> s{_plsilCallback = a}) + +-- | Data format for response. +plsilAlt :: Lens' ProjectsLogServicesIndexesList' Text +plsilAlt = lens _plsilAlt (\ s a -> s{_plsilAlt = a}) + +instance GoogleRequest + ProjectsLogServicesIndexesList' where + type Rs ProjectsLogServicesIndexesList' = + ListLogServiceIndexesResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u + ProjectsLogServicesIndexesList{..} + = go _plsilLog _plsilXgafv _plsilQuotaUser + _plsilPrettyPrint + _plsilUploadProtocol + _plsilPp + _plsilAccessToken + _plsilUploadType + _plsilBearerToken + _plsilKey + _plsilLogServicesId + _plsilDepth + _plsilPageToken + _plsilOauthToken + _plsilProjectsId + _plsilPageSize + _plsilIndexPrefix + _plsilFields + _plsilCallback + _plsilAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesIndexesListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/List.hs new file mode 100644 index 000000000..c0bfc34aa --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/List.hs @@ -0,0 +1,277 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the log services that have log entries in this project. +-- +-- /See:/ for @LoggingProjectsLogServicesList@. +module Logging.Projects.LogServices.List + ( + -- * REST Resource + ProjectsLogServicesListAPI + + -- * Creating a Request + , projectsLogServicesList + , ProjectsLogServicesList + + -- * Request Lenses + , plslLog + , plslXgafv + , plslQuotaUser + , plslPrettyPrint + , plslUploadProtocol + , plslPp + , plslAccessToken + , plslUploadType + , plslBearerToken + , plslKey + , plslPageToken + , plslOauthToken + , plslProjectsId + , plslPageSize + , plslFields + , plslCallback + , plslAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesList@ which the +-- 'ProjectsLogServicesList' request conforms to. +type ProjectsLogServicesListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + QueryParam "log" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListLogServicesResponse + +-- | Lists the log services that have log entries in this project. +-- +-- /See:/ 'projectsLogServicesList' smart constructor. +data ProjectsLogServicesList = ProjectsLogServicesList + { _plslLog :: !(Maybe Text) + , _plslXgafv :: !(Maybe Text) + , _plslQuotaUser :: !(Maybe Text) + , _plslPrettyPrint :: !Bool + , _plslUploadProtocol :: !(Maybe Text) + , _plslPp :: !Bool + , _plslAccessToken :: !(Maybe Text) + , _plslUploadType :: !(Maybe Text) + , _plslBearerToken :: !(Maybe Text) + , _plslKey :: !(Maybe Text) + , _plslPageToken :: !(Maybe Text) + , _plslOauthToken :: !(Maybe Text) + , _plslProjectsId :: !Text + , _plslPageSize :: !(Maybe Int32) + , _plslFields :: !(Maybe Text) + , _plslCallback :: !(Maybe Text) + , _plslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plslLog' +-- +-- * 'plslXgafv' +-- +-- * 'plslQuotaUser' +-- +-- * 'plslPrettyPrint' +-- +-- * 'plslUploadProtocol' +-- +-- * 'plslPp' +-- +-- * 'plslAccessToken' +-- +-- * 'plslUploadType' +-- +-- * 'plslBearerToken' +-- +-- * 'plslKey' +-- +-- * 'plslPageToken' +-- +-- * 'plslOauthToken' +-- +-- * 'plslProjectsId' +-- +-- * 'plslPageSize' +-- +-- * 'plslFields' +-- +-- * 'plslCallback' +-- +-- * 'plslAlt' +projectsLogServicesList + :: Text -- ^ 'projectsId' + -> ProjectsLogServicesList +projectsLogServicesList pPlslProjectsId_ = + ProjectsLogServicesList + { _plslLog = Nothing + , _plslXgafv = Nothing + , _plslQuotaUser = Nothing + , _plslPrettyPrint = True + , _plslUploadProtocol = Nothing + , _plslPp = True + , _plslAccessToken = Nothing + , _plslUploadType = Nothing + , _plslBearerToken = Nothing + , _plslKey = Nothing + , _plslPageToken = Nothing + , _plslOauthToken = Nothing + , _plslProjectsId = pPlslProjectsId_ + , _plslPageSize = Nothing + , _plslFields = Nothing + , _plslCallback = Nothing + , _plslAlt = "json" + } + +-- | If empty, all log services contributing log entries to the project are +-- listed. Otherwise, this field must be the resource name of a log, such +-- as \`\"projects\/my-project\/appengine.googleapis.com%2Frequest_log\"\`, +-- and then the only services listed are those associated with entries in +-- the log. A service is associated with an entry if its name is in the +-- entry\'s \`LogEntryMetadata.serviceName\` field. +plslLog :: Lens' ProjectsLogServicesList' (Maybe Text) +plslLog = lens _plslLog (\ s a -> s{_plslLog = a}) + +-- | V1 error format. +plslXgafv :: Lens' ProjectsLogServicesList' (Maybe Text) +plslXgafv + = lens _plslXgafv (\ s a -> s{_plslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plslQuotaUser :: Lens' ProjectsLogServicesList' (Maybe Text) +plslQuotaUser + = lens _plslQuotaUser + (\ s a -> s{_plslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plslPrettyPrint :: Lens' ProjectsLogServicesList' Bool +plslPrettyPrint + = lens _plslPrettyPrint + (\ s a -> s{_plslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plslUploadProtocol :: Lens' ProjectsLogServicesList' (Maybe Text) +plslUploadProtocol + = lens _plslUploadProtocol + (\ s a -> s{_plslUploadProtocol = a}) + +-- | Pretty-print response. +plslPp :: Lens' ProjectsLogServicesList' Bool +plslPp = lens _plslPp (\ s a -> s{_plslPp = a}) + +-- | OAuth access token. +plslAccessToken :: Lens' ProjectsLogServicesList' (Maybe Text) +plslAccessToken + = lens _plslAccessToken + (\ s a -> s{_plslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plslUploadType :: Lens' ProjectsLogServicesList' (Maybe Text) +plslUploadType + = lens _plslUploadType + (\ s a -> s{_plslUploadType = a}) + +-- | OAuth bearer token. +plslBearerToken :: Lens' ProjectsLogServicesList' (Maybe Text) +plslBearerToken + = lens _plslBearerToken + (\ s a -> s{_plslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plslKey :: Lens' ProjectsLogServicesList' (Maybe Text) +plslKey = lens _plslKey (\ s a -> s{_plslKey = a}) + +-- | An opaque token, returned as \`nextPageToken\` by a prior +-- \`ListLogServices\` operation. If \`pageToken\` is supplied, then the +-- other fields of this request are ignored, and instead the previous +-- \`ListLogServices\` operation is continued. +plslPageToken :: Lens' ProjectsLogServicesList' (Maybe Text) +plslPageToken + = lens _plslPageToken + (\ s a -> s{_plslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plslOauthToken :: Lens' ProjectsLogServicesList' (Maybe Text) +plslOauthToken + = lens _plslOauthToken + (\ s a -> s{_plslOauthToken = a}) + +-- | Part of \`projectName\`. The resource name of the project whose services +-- are to be listed. +plslProjectsId :: Lens' ProjectsLogServicesList' Text +plslProjectsId + = lens _plslProjectsId + (\ s a -> s{_plslProjectsId = a}) + +-- | The maximum number of \`LogService\` objects to return in one operation. +plslPageSize :: Lens' ProjectsLogServicesList' (Maybe Int32) +plslPageSize + = lens _plslPageSize (\ s a -> s{_plslPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +plslFields :: Lens' ProjectsLogServicesList' (Maybe Text) +plslFields + = lens _plslFields (\ s a -> s{_plslFields = a}) + +-- | JSONP +plslCallback :: Lens' ProjectsLogServicesList' (Maybe Text) +plslCallback + = lens _plslCallback (\ s a -> s{_plslCallback = a}) + +-- | Data format for response. +plslAlt :: Lens' ProjectsLogServicesList' Text +plslAlt = lens _plslAlt (\ s a -> s{_plslAlt = a}) + +instance GoogleRequest ProjectsLogServicesList' where + type Rs ProjectsLogServicesList' = + ListLogServicesResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogServicesList{..} + = go _plslLog _plslXgafv _plslQuotaUser + _plslPrettyPrint + _plslUploadProtocol + _plslPp + _plslAccessToken + _plslUploadType + _plslBearerToken + _plslKey + _plslPageToken + _plslOauthToken + _plslProjectsId + _plslPageSize + _plslFields + _plslCallback + _plslAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Create.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Create.hs new file mode 100644 index 000000000..452a5b6ae --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Create.hs @@ -0,0 +1,251 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Sinks.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a log service sink. All log entries from a specified log service +-- are written to the destination. +-- +-- /See:/ for @LoggingProjectsLogServicesSinksCreate@. +module Logging.Projects.LogServices.Sinks.Create + ( + -- * REST Resource + ProjectsLogServicesSinksCreateAPI + + -- * Creating a Request + , projectsLogServicesSinksCreate + , ProjectsLogServicesSinksCreate + + -- * Request Lenses + , plsscXgafv + , plsscQuotaUser + , plsscPrettyPrint + , plsscUploadProtocol + , plsscPp + , plsscAccessToken + , plsscUploadType + , plsscBearerToken + , plsscKey + , plsscLogServicesId + , plsscOauthToken + , plsscProjectsId + , plsscFields + , plsscCallback + , plsscAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesSinksCreate@ which the +-- 'ProjectsLogServicesSinksCreate' request conforms to. +type ProjectsLogServicesSinksCreateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "sinks" :> Post '[JSON] LogSink + +-- | Creates a log service sink. All log entries from a specified log service +-- are written to the destination. +-- +-- /See:/ 'projectsLogServicesSinksCreate' smart constructor. +data ProjectsLogServicesSinksCreate = ProjectsLogServicesSinksCreate + { _plsscXgafv :: !(Maybe Text) + , _plsscQuotaUser :: !(Maybe Text) + , _plsscPrettyPrint :: !Bool + , _plsscUploadProtocol :: !(Maybe Text) + , _plsscPp :: !Bool + , _plsscAccessToken :: !(Maybe Text) + , _plsscUploadType :: !(Maybe Text) + , _plsscBearerToken :: !(Maybe Text) + , _plsscKey :: !(Maybe Text) + , _plsscLogServicesId :: !Text + , _plsscOauthToken :: !(Maybe Text) + , _plsscProjectsId :: !Text + , _plsscFields :: !(Maybe Text) + , _plsscCallback :: !(Maybe Text) + , _plsscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesSinksCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsscXgafv' +-- +-- * 'plsscQuotaUser' +-- +-- * 'plsscPrettyPrint' +-- +-- * 'plsscUploadProtocol' +-- +-- * 'plsscPp' +-- +-- * 'plsscAccessToken' +-- +-- * 'plsscUploadType' +-- +-- * 'plsscBearerToken' +-- +-- * 'plsscKey' +-- +-- * 'plsscLogServicesId' +-- +-- * 'plsscOauthToken' +-- +-- * 'plsscProjectsId' +-- +-- * 'plsscFields' +-- +-- * 'plsscCallback' +-- +-- * 'plsscAlt' +projectsLogServicesSinksCreate + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> ProjectsLogServicesSinksCreate +projectsLogServicesSinksCreate pPlsscLogServicesId_ pPlsscProjectsId_ = + ProjectsLogServicesSinksCreate + { _plsscXgafv = Nothing + , _plsscQuotaUser = Nothing + , _plsscPrettyPrint = True + , _plsscUploadProtocol = Nothing + , _plsscPp = True + , _plsscAccessToken = Nothing + , _plsscUploadType = Nothing + , _plsscBearerToken = Nothing + , _plsscKey = Nothing + , _plsscLogServicesId = pPlsscLogServicesId_ + , _plsscOauthToken = Nothing + , _plsscProjectsId = pPlsscProjectsId_ + , _plsscFields = Nothing + , _plsscCallback = Nothing + , _plsscAlt = "json" + } + +-- | V1 error format. +plsscXgafv :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscXgafv + = lens _plsscXgafv (\ s a -> s{_plsscXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsscQuotaUser :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscQuotaUser + = lens _plsscQuotaUser + (\ s a -> s{_plsscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsscPrettyPrint :: Lens' ProjectsLogServicesSinksCreate' Bool +plsscPrettyPrint + = lens _plsscPrettyPrint + (\ s a -> s{_plsscPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsscUploadProtocol :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscUploadProtocol + = lens _plsscUploadProtocol + (\ s a -> s{_plsscUploadProtocol = a}) + +-- | Pretty-print response. +plsscPp :: Lens' ProjectsLogServicesSinksCreate' Bool +plsscPp = lens _plsscPp (\ s a -> s{_plsscPp = a}) + +-- | OAuth access token. +plsscAccessToken :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscAccessToken + = lens _plsscAccessToken + (\ s a -> s{_plsscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsscUploadType :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscUploadType + = lens _plsscUploadType + (\ s a -> s{_plsscUploadType = a}) + +-- | OAuth bearer token. +plsscBearerToken :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscBearerToken + = lens _plsscBearerToken + (\ s a -> s{_plsscBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsscKey :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscKey = lens _plsscKey (\ s a -> s{_plsscKey = a}) + +-- | Part of \`serviceName\`. See documentation of \`projectsId\`. +plsscLogServicesId :: Lens' ProjectsLogServicesSinksCreate' Text +plsscLogServicesId + = lens _plsscLogServicesId + (\ s a -> s{_plsscLogServicesId = a}) + +-- | OAuth 2.0 token for the current user. +plsscOauthToken :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscOauthToken + = lens _plsscOauthToken + (\ s a -> s{_plsscOauthToken = a}) + +-- | Part of \`serviceName\`. The resource name of the log service to which +-- the sink is bound. +plsscProjectsId :: Lens' ProjectsLogServicesSinksCreate' Text +plsscProjectsId + = lens _plsscProjectsId + (\ s a -> s{_plsscProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +plsscFields :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscFields + = lens _plsscFields (\ s a -> s{_plsscFields = a}) + +-- | JSONP +plsscCallback :: Lens' ProjectsLogServicesSinksCreate' (Maybe Text) +plsscCallback + = lens _plsscCallback + (\ s a -> s{_plsscCallback = a}) + +-- | Data format for response. +plsscAlt :: Lens' ProjectsLogServicesSinksCreate' Text +plsscAlt = lens _plsscAlt (\ s a -> s{_plsscAlt = a}) + +instance GoogleRequest + ProjectsLogServicesSinksCreate' where + type Rs ProjectsLogServicesSinksCreate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u + ProjectsLogServicesSinksCreate{..} + = go _plsscXgafv _plsscQuotaUser _plsscPrettyPrint + _plsscUploadProtocol + _plsscPp + _plsscAccessToken + _plsscUploadType + _plsscBearerToken + _plsscKey + _plsscLogServicesId + _plsscOauthToken + _plsscProjectsId + _plsscFields + _plsscCallback + _plsscAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesSinksCreateAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Delete.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Delete.hs new file mode 100644 index 000000000..c92cf5b7f --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Delete.hs @@ -0,0 +1,264 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Sinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a log service sink. After deletion, no new log entries are +-- written to the destination. +-- +-- /See:/ for @LoggingProjectsLogServicesSinksDelete@. +module Logging.Projects.LogServices.Sinks.Delete + ( + -- * REST Resource + ProjectsLogServicesSinksDeleteAPI + + -- * Creating a Request + , projectsLogServicesSinksDelete + , ProjectsLogServicesSinksDelete + + -- * Request Lenses + , plssdXgafv + , plssdQuotaUser + , plssdPrettyPrint + , plssdUploadProtocol + , plssdPp + , plssdAccessToken + , plssdUploadType + , plssdBearerToken + , plssdKey + , plssdLogServicesId + , plssdOauthToken + , plssdProjectsId + , plssdSinksId + , plssdFields + , plssdCallback + , plssdAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesSinksDelete@ which the +-- 'ProjectsLogServicesSinksDelete' request conforms to. +type ProjectsLogServicesSinksDeleteAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "sinks" :> + Capture "sinksId" Text :> Delete '[JSON] Empty + +-- | Deletes a log service sink. After deletion, no new log entries are +-- written to the destination. +-- +-- /See:/ 'projectsLogServicesSinksDelete' smart constructor. +data ProjectsLogServicesSinksDelete = ProjectsLogServicesSinksDelete + { _plssdXgafv :: !(Maybe Text) + , _plssdQuotaUser :: !(Maybe Text) + , _plssdPrettyPrint :: !Bool + , _plssdUploadProtocol :: !(Maybe Text) + , _plssdPp :: !Bool + , _plssdAccessToken :: !(Maybe Text) + , _plssdUploadType :: !(Maybe Text) + , _plssdBearerToken :: !(Maybe Text) + , _plssdKey :: !(Maybe Text) + , _plssdLogServicesId :: !Text + , _plssdOauthToken :: !(Maybe Text) + , _plssdProjectsId :: !Text + , _plssdSinksId :: !Text + , _plssdFields :: !(Maybe Text) + , _plssdCallback :: !(Maybe Text) + , _plssdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesSinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plssdXgafv' +-- +-- * 'plssdQuotaUser' +-- +-- * 'plssdPrettyPrint' +-- +-- * 'plssdUploadProtocol' +-- +-- * 'plssdPp' +-- +-- * 'plssdAccessToken' +-- +-- * 'plssdUploadType' +-- +-- * 'plssdBearerToken' +-- +-- * 'plssdKey' +-- +-- * 'plssdLogServicesId' +-- +-- * 'plssdOauthToken' +-- +-- * 'plssdProjectsId' +-- +-- * 'plssdSinksId' +-- +-- * 'plssdFields' +-- +-- * 'plssdCallback' +-- +-- * 'plssdAlt' +projectsLogServicesSinksDelete + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogServicesSinksDelete +projectsLogServicesSinksDelete pPlssdLogServicesId_ pPlssdProjectsId_ pPlssdSinksId_ = + ProjectsLogServicesSinksDelete + { _plssdXgafv = Nothing + , _plssdQuotaUser = Nothing + , _plssdPrettyPrint = True + , _plssdUploadProtocol = Nothing + , _plssdPp = True + , _plssdAccessToken = Nothing + , _plssdUploadType = Nothing + , _plssdBearerToken = Nothing + , _plssdKey = Nothing + , _plssdLogServicesId = pPlssdLogServicesId_ + , _plssdOauthToken = Nothing + , _plssdProjectsId = pPlssdProjectsId_ + , _plssdSinksId = pPlssdSinksId_ + , _plssdFields = Nothing + , _plssdCallback = Nothing + , _plssdAlt = "json" + } + +-- | V1 error format. +plssdXgafv :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdXgafv + = lens _plssdXgafv (\ s a -> s{_plssdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plssdQuotaUser :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdQuotaUser + = lens _plssdQuotaUser + (\ s a -> s{_plssdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plssdPrettyPrint :: Lens' ProjectsLogServicesSinksDelete' Bool +plssdPrettyPrint + = lens _plssdPrettyPrint + (\ s a -> s{_plssdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plssdUploadProtocol :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdUploadProtocol + = lens _plssdUploadProtocol + (\ s a -> s{_plssdUploadProtocol = a}) + +-- | Pretty-print response. +plssdPp :: Lens' ProjectsLogServicesSinksDelete' Bool +plssdPp = lens _plssdPp (\ s a -> s{_plssdPp = a}) + +-- | OAuth access token. +plssdAccessToken :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdAccessToken + = lens _plssdAccessToken + (\ s a -> s{_plssdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plssdUploadType :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdUploadType + = lens _plssdUploadType + (\ s a -> s{_plssdUploadType = a}) + +-- | OAuth bearer token. +plssdBearerToken :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdBearerToken + = lens _plssdBearerToken + (\ s a -> s{_plssdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plssdKey :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdKey = lens _plssdKey (\ s a -> s{_plssdKey = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssdLogServicesId :: Lens' ProjectsLogServicesSinksDelete' Text +plssdLogServicesId + = lens _plssdLogServicesId + (\ s a -> s{_plssdLogServicesId = a}) + +-- | OAuth 2.0 token for the current user. +plssdOauthToken :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdOauthToken + = lens _plssdOauthToken + (\ s a -> s{_plssdOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the log service sink to +-- delete. +plssdProjectsId :: Lens' ProjectsLogServicesSinksDelete' Text +plssdProjectsId + = lens _plssdProjectsId + (\ s a -> s{_plssdProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssdSinksId :: Lens' ProjectsLogServicesSinksDelete' Text +plssdSinksId + = lens _plssdSinksId (\ s a -> s{_plssdSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plssdFields :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdFields + = lens _plssdFields (\ s a -> s{_plssdFields = a}) + +-- | JSONP +plssdCallback :: Lens' ProjectsLogServicesSinksDelete' (Maybe Text) +plssdCallback + = lens _plssdCallback + (\ s a -> s{_plssdCallback = a}) + +-- | Data format for response. +plssdAlt :: Lens' ProjectsLogServicesSinksDelete' Text +plssdAlt = lens _plssdAlt (\ s a -> s{_plssdAlt = a}) + +instance GoogleRequest + ProjectsLogServicesSinksDelete' where + type Rs ProjectsLogServicesSinksDelete' = Empty + request = requestWithRoute defReq loggingURL + requestWithRoute r u + ProjectsLogServicesSinksDelete{..} + = go _plssdXgafv _plssdQuotaUser _plssdPrettyPrint + _plssdUploadProtocol + _plssdPp + _plssdAccessToken + _plssdUploadType + _plssdBearerToken + _plssdKey + _plssdLogServicesId + _plssdOauthToken + _plssdProjectsId + _plssdSinksId + _plssdFields + _plssdCallback + _plssdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesSinksDeleteAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Get.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Get.hs new file mode 100644 index 000000000..e58bd4e88 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Get.hs @@ -0,0 +1,261 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Sinks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a log service sink. +-- +-- /See:/ for @LoggingProjectsLogServicesSinksGet@. +module Logging.Projects.LogServices.Sinks.Get + ( + -- * REST Resource + ProjectsLogServicesSinksGetAPI + + -- * Creating a Request + , projectsLogServicesSinksGet + , ProjectsLogServicesSinksGet + + -- * Request Lenses + , plssgXgafv + , plssgQuotaUser + , plssgPrettyPrint + , plssgUploadProtocol + , plssgPp + , plssgAccessToken + , plssgUploadType + , plssgBearerToken + , plssgKey + , plssgLogServicesId + , plssgOauthToken + , plssgProjectsId + , plssgSinksId + , plssgFields + , plssgCallback + , plssgAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesSinksGet@ which the +-- 'ProjectsLogServicesSinksGet' request conforms to. +type ProjectsLogServicesSinksGetAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "sinks" :> + Capture "sinksId" Text :> Get '[JSON] LogSink + +-- | Gets a log service sink. +-- +-- /See:/ 'projectsLogServicesSinksGet' smart constructor. +data ProjectsLogServicesSinksGet = ProjectsLogServicesSinksGet + { _plssgXgafv :: !(Maybe Text) + , _plssgQuotaUser :: !(Maybe Text) + , _plssgPrettyPrint :: !Bool + , _plssgUploadProtocol :: !(Maybe Text) + , _plssgPp :: !Bool + , _plssgAccessToken :: !(Maybe Text) + , _plssgUploadType :: !(Maybe Text) + , _plssgBearerToken :: !(Maybe Text) + , _plssgKey :: !(Maybe Text) + , _plssgLogServicesId :: !Text + , _plssgOauthToken :: !(Maybe Text) + , _plssgProjectsId :: !Text + , _plssgSinksId :: !Text + , _plssgFields :: !(Maybe Text) + , _plssgCallback :: !(Maybe Text) + , _plssgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesSinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plssgXgafv' +-- +-- * 'plssgQuotaUser' +-- +-- * 'plssgPrettyPrint' +-- +-- * 'plssgUploadProtocol' +-- +-- * 'plssgPp' +-- +-- * 'plssgAccessToken' +-- +-- * 'plssgUploadType' +-- +-- * 'plssgBearerToken' +-- +-- * 'plssgKey' +-- +-- * 'plssgLogServicesId' +-- +-- * 'plssgOauthToken' +-- +-- * 'plssgProjectsId' +-- +-- * 'plssgSinksId' +-- +-- * 'plssgFields' +-- +-- * 'plssgCallback' +-- +-- * 'plssgAlt' +projectsLogServicesSinksGet + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogServicesSinksGet +projectsLogServicesSinksGet pPlssgLogServicesId_ pPlssgProjectsId_ pPlssgSinksId_ = + ProjectsLogServicesSinksGet + { _plssgXgafv = Nothing + , _plssgQuotaUser = Nothing + , _plssgPrettyPrint = True + , _plssgUploadProtocol = Nothing + , _plssgPp = True + , _plssgAccessToken = Nothing + , _plssgUploadType = Nothing + , _plssgBearerToken = Nothing + , _plssgKey = Nothing + , _plssgLogServicesId = pPlssgLogServicesId_ + , _plssgOauthToken = Nothing + , _plssgProjectsId = pPlssgProjectsId_ + , _plssgSinksId = pPlssgSinksId_ + , _plssgFields = Nothing + , _plssgCallback = Nothing + , _plssgAlt = "json" + } + +-- | V1 error format. +plssgXgafv :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgXgafv + = lens _plssgXgafv (\ s a -> s{_plssgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plssgQuotaUser :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgQuotaUser + = lens _plssgQuotaUser + (\ s a -> s{_plssgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plssgPrettyPrint :: Lens' ProjectsLogServicesSinksGet' Bool +plssgPrettyPrint + = lens _plssgPrettyPrint + (\ s a -> s{_plssgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plssgUploadProtocol :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgUploadProtocol + = lens _plssgUploadProtocol + (\ s a -> s{_plssgUploadProtocol = a}) + +-- | Pretty-print response. +plssgPp :: Lens' ProjectsLogServicesSinksGet' Bool +plssgPp = lens _plssgPp (\ s a -> s{_plssgPp = a}) + +-- | OAuth access token. +plssgAccessToken :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgAccessToken + = lens _plssgAccessToken + (\ s a -> s{_plssgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plssgUploadType :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgUploadType + = lens _plssgUploadType + (\ s a -> s{_plssgUploadType = a}) + +-- | OAuth bearer token. +plssgBearerToken :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgBearerToken + = lens _plssgBearerToken + (\ s a -> s{_plssgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plssgKey :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgKey = lens _plssgKey (\ s a -> s{_plssgKey = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssgLogServicesId :: Lens' ProjectsLogServicesSinksGet' Text +plssgLogServicesId + = lens _plssgLogServicesId + (\ s a -> s{_plssgLogServicesId = a}) + +-- | OAuth 2.0 token for the current user. +plssgOauthToken :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgOauthToken + = lens _plssgOauthToken + (\ s a -> s{_plssgOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the log service sink to +-- return. +plssgProjectsId :: Lens' ProjectsLogServicesSinksGet' Text +plssgProjectsId + = lens _plssgProjectsId + (\ s a -> s{_plssgProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssgSinksId :: Lens' ProjectsLogServicesSinksGet' Text +plssgSinksId + = lens _plssgSinksId (\ s a -> s{_plssgSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plssgFields :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgFields + = lens _plssgFields (\ s a -> s{_plssgFields = a}) + +-- | JSONP +plssgCallback :: Lens' ProjectsLogServicesSinksGet' (Maybe Text) +plssgCallback + = lens _plssgCallback + (\ s a -> s{_plssgCallback = a}) + +-- | Data format for response. +plssgAlt :: Lens' ProjectsLogServicesSinksGet' Text +plssgAlt = lens _plssgAlt (\ s a -> s{_plssgAlt = a}) + +instance GoogleRequest ProjectsLogServicesSinksGet' + where + type Rs ProjectsLogServicesSinksGet' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogServicesSinksGet{..} + = go _plssgXgafv _plssgQuotaUser _plssgPrettyPrint + _plssgUploadProtocol + _plssgPp + _plssgAccessToken + _plssgUploadType + _plssgBearerToken + _plssgKey + _plssgLogServicesId + _plssgOauthToken + _plssgProjectsId + _plssgSinksId + _plssgFields + _plssgCallback + _plssgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesSinksGetAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/List.hs new file mode 100644 index 000000000..dad71603b --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/List.hs @@ -0,0 +1,248 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Sinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists log service sinks associated with a log service. +-- +-- /See:/ for @LoggingProjectsLogServicesSinksList@. +module Logging.Projects.LogServices.Sinks.List + ( + -- * REST Resource + ProjectsLogServicesSinksListAPI + + -- * Creating a Request + , projectsLogServicesSinksList + , ProjectsLogServicesSinksList + + -- * Request Lenses + , plsslXgafv + , plsslQuotaUser + , plsslPrettyPrint + , plsslUploadProtocol + , plsslPp + , plsslAccessToken + , plsslUploadType + , plsslBearerToken + , plsslKey + , plsslLogServicesId + , plsslOauthToken + , plsslProjectsId + , plsslFields + , plsslCallback + , plsslAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesSinksList@ which the +-- 'ProjectsLogServicesSinksList' request conforms to. +type ProjectsLogServicesSinksListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "sinks" :> Get '[JSON] ListLogServiceSinksResponse + +-- | Lists log service sinks associated with a log service. +-- +-- /See:/ 'projectsLogServicesSinksList' smart constructor. +data ProjectsLogServicesSinksList = ProjectsLogServicesSinksList + { _plsslXgafv :: !(Maybe Text) + , _plsslQuotaUser :: !(Maybe Text) + , _plsslPrettyPrint :: !Bool + , _plsslUploadProtocol :: !(Maybe Text) + , _plsslPp :: !Bool + , _plsslAccessToken :: !(Maybe Text) + , _plsslUploadType :: !(Maybe Text) + , _plsslBearerToken :: !(Maybe Text) + , _plsslKey :: !(Maybe Text) + , _plsslLogServicesId :: !Text + , _plsslOauthToken :: !(Maybe Text) + , _plsslProjectsId :: !Text + , _plsslFields :: !(Maybe Text) + , _plsslCallback :: !(Maybe Text) + , _plsslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesSinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsslXgafv' +-- +-- * 'plsslQuotaUser' +-- +-- * 'plsslPrettyPrint' +-- +-- * 'plsslUploadProtocol' +-- +-- * 'plsslPp' +-- +-- * 'plsslAccessToken' +-- +-- * 'plsslUploadType' +-- +-- * 'plsslBearerToken' +-- +-- * 'plsslKey' +-- +-- * 'plsslLogServicesId' +-- +-- * 'plsslOauthToken' +-- +-- * 'plsslProjectsId' +-- +-- * 'plsslFields' +-- +-- * 'plsslCallback' +-- +-- * 'plsslAlt' +projectsLogServicesSinksList + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> ProjectsLogServicesSinksList +projectsLogServicesSinksList pPlsslLogServicesId_ pPlsslProjectsId_ = + ProjectsLogServicesSinksList + { _plsslXgafv = Nothing + , _plsslQuotaUser = Nothing + , _plsslPrettyPrint = True + , _plsslUploadProtocol = Nothing + , _plsslPp = True + , _plsslAccessToken = Nothing + , _plsslUploadType = Nothing + , _plsslBearerToken = Nothing + , _plsslKey = Nothing + , _plsslLogServicesId = pPlsslLogServicesId_ + , _plsslOauthToken = Nothing + , _plsslProjectsId = pPlsslProjectsId_ + , _plsslFields = Nothing + , _plsslCallback = Nothing + , _plsslAlt = "json" + } + +-- | V1 error format. +plsslXgafv :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslXgafv + = lens _plsslXgafv (\ s a -> s{_plsslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsslQuotaUser :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslQuotaUser + = lens _plsslQuotaUser + (\ s a -> s{_plsslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsslPrettyPrint :: Lens' ProjectsLogServicesSinksList' Bool +plsslPrettyPrint + = lens _plsslPrettyPrint + (\ s a -> s{_plsslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsslUploadProtocol :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslUploadProtocol + = lens _plsslUploadProtocol + (\ s a -> s{_plsslUploadProtocol = a}) + +-- | Pretty-print response. +plsslPp :: Lens' ProjectsLogServicesSinksList' Bool +plsslPp = lens _plsslPp (\ s a -> s{_plsslPp = a}) + +-- | OAuth access token. +plsslAccessToken :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslAccessToken + = lens _plsslAccessToken + (\ s a -> s{_plsslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsslUploadType :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslUploadType + = lens _plsslUploadType + (\ s a -> s{_plsslUploadType = a}) + +-- | OAuth bearer token. +plsslBearerToken :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslBearerToken + = lens _plsslBearerToken + (\ s a -> s{_plsslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsslKey :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslKey = lens _plsslKey (\ s a -> s{_plsslKey = a}) + +-- | Part of \`serviceName\`. See documentation of \`projectsId\`. +plsslLogServicesId :: Lens' ProjectsLogServicesSinksList' Text +plsslLogServicesId + = lens _plsslLogServicesId + (\ s a -> s{_plsslLogServicesId = a}) + +-- | OAuth 2.0 token for the current user. +plsslOauthToken :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslOauthToken + = lens _plsslOauthToken + (\ s a -> s{_plsslOauthToken = a}) + +-- | Part of \`serviceName\`. The log service whose sinks are wanted. +plsslProjectsId :: Lens' ProjectsLogServicesSinksList' Text +plsslProjectsId + = lens _plsslProjectsId + (\ s a -> s{_plsslProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +plsslFields :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslFields + = lens _plsslFields (\ s a -> s{_plsslFields = a}) + +-- | JSONP +plsslCallback :: Lens' ProjectsLogServicesSinksList' (Maybe Text) +plsslCallback + = lens _plsslCallback + (\ s a -> s{_plsslCallback = a}) + +-- | Data format for response. +plsslAlt :: Lens' ProjectsLogServicesSinksList' Text +plsslAlt = lens _plsslAlt (\ s a -> s{_plsslAlt = a}) + +instance GoogleRequest ProjectsLogServicesSinksList' + where + type Rs ProjectsLogServicesSinksList' = + ListLogServiceSinksResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogServicesSinksList{..} + = go _plsslXgafv _plsslQuotaUser _plsslPrettyPrint + _plsslUploadProtocol + _plsslPp + _plsslAccessToken + _plsslUploadType + _plsslBearerToken + _plsslKey + _plsslLogServicesId + _plsslOauthToken + _plsslProjectsId + _plsslFields + _plsslCallback + _plsslAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesSinksListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Update.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Update.hs new file mode 100644 index 000000000..a1a501c2b --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/LogServices/Sinks/Update.hs @@ -0,0 +1,262 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.LogServices.Sinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a log service sink. If the sink does not exist, it is created. +-- +-- /See:/ for @LoggingProjectsLogServicesSinksUpdate@. +module Logging.Projects.LogServices.Sinks.Update + ( + -- * REST Resource + ProjectsLogServicesSinksUpdateAPI + + -- * Creating a Request + , projectsLogServicesSinksUpdate + , ProjectsLogServicesSinksUpdate + + -- * Request Lenses + , plssuXgafv + , plssuQuotaUser + , plssuPrettyPrint + , plssuUploadProtocol + , plssuPp + , plssuAccessToken + , plssuUploadType + , plssuBearerToken + , plssuKey + , plssuLogServicesId + , plssuOauthToken + , plssuProjectsId + , plssuSinksId + , plssuFields + , plssuCallback + , plssuAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogServicesSinksUpdate@ which the +-- 'ProjectsLogServicesSinksUpdate' request conforms to. +type ProjectsLogServicesSinksUpdateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logServices" :> + Capture "logServicesId" Text :> + "sinks" :> + Capture "sinksId" Text :> Put '[JSON] LogSink + +-- | Updates a log service sink. If the sink does not exist, it is created. +-- +-- /See:/ 'projectsLogServicesSinksUpdate' smart constructor. +data ProjectsLogServicesSinksUpdate = ProjectsLogServicesSinksUpdate + { _plssuXgafv :: !(Maybe Text) + , _plssuQuotaUser :: !(Maybe Text) + , _plssuPrettyPrint :: !Bool + , _plssuUploadProtocol :: !(Maybe Text) + , _plssuPp :: !Bool + , _plssuAccessToken :: !(Maybe Text) + , _plssuUploadType :: !(Maybe Text) + , _plssuBearerToken :: !(Maybe Text) + , _plssuKey :: !(Maybe Text) + , _plssuLogServicesId :: !Text + , _plssuOauthToken :: !(Maybe Text) + , _plssuProjectsId :: !Text + , _plssuSinksId :: !Text + , _plssuFields :: !(Maybe Text) + , _plssuCallback :: !(Maybe Text) + , _plssuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogServicesSinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plssuXgafv' +-- +-- * 'plssuQuotaUser' +-- +-- * 'plssuPrettyPrint' +-- +-- * 'plssuUploadProtocol' +-- +-- * 'plssuPp' +-- +-- * 'plssuAccessToken' +-- +-- * 'plssuUploadType' +-- +-- * 'plssuBearerToken' +-- +-- * 'plssuKey' +-- +-- * 'plssuLogServicesId' +-- +-- * 'plssuOauthToken' +-- +-- * 'plssuProjectsId' +-- +-- * 'plssuSinksId' +-- +-- * 'plssuFields' +-- +-- * 'plssuCallback' +-- +-- * 'plssuAlt' +projectsLogServicesSinksUpdate + :: Text -- ^ 'logServicesId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogServicesSinksUpdate +projectsLogServicesSinksUpdate pPlssuLogServicesId_ pPlssuProjectsId_ pPlssuSinksId_ = + ProjectsLogServicesSinksUpdate + { _plssuXgafv = Nothing + , _plssuQuotaUser = Nothing + , _plssuPrettyPrint = True + , _plssuUploadProtocol = Nothing + , _plssuPp = True + , _plssuAccessToken = Nothing + , _plssuUploadType = Nothing + , _plssuBearerToken = Nothing + , _plssuKey = Nothing + , _plssuLogServicesId = pPlssuLogServicesId_ + , _plssuOauthToken = Nothing + , _plssuProjectsId = pPlssuProjectsId_ + , _plssuSinksId = pPlssuSinksId_ + , _plssuFields = Nothing + , _plssuCallback = Nothing + , _plssuAlt = "json" + } + +-- | V1 error format. +plssuXgafv :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuXgafv + = lens _plssuXgafv (\ s a -> s{_plssuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plssuQuotaUser :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuQuotaUser + = lens _plssuQuotaUser + (\ s a -> s{_plssuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plssuPrettyPrint :: Lens' ProjectsLogServicesSinksUpdate' Bool +plssuPrettyPrint + = lens _plssuPrettyPrint + (\ s a -> s{_plssuPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plssuUploadProtocol :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuUploadProtocol + = lens _plssuUploadProtocol + (\ s a -> s{_plssuUploadProtocol = a}) + +-- | Pretty-print response. +plssuPp :: Lens' ProjectsLogServicesSinksUpdate' Bool +plssuPp = lens _plssuPp (\ s a -> s{_plssuPp = a}) + +-- | OAuth access token. +plssuAccessToken :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuAccessToken + = lens _plssuAccessToken + (\ s a -> s{_plssuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plssuUploadType :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuUploadType + = lens _plssuUploadType + (\ s a -> s{_plssuUploadType = a}) + +-- | OAuth bearer token. +plssuBearerToken :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuBearerToken + = lens _plssuBearerToken + (\ s a -> s{_plssuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plssuKey :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuKey = lens _plssuKey (\ s a -> s{_plssuKey = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssuLogServicesId :: Lens' ProjectsLogServicesSinksUpdate' Text +plssuLogServicesId + = lens _plssuLogServicesId + (\ s a -> s{_plssuLogServicesId = a}) + +-- | OAuth 2.0 token for the current user. +plssuOauthToken :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuOauthToken + = lens _plssuOauthToken + (\ s a -> s{_plssuOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the log service sink to +-- update. +plssuProjectsId :: Lens' ProjectsLogServicesSinksUpdate' Text +plssuProjectsId + = lens _plssuProjectsId + (\ s a -> s{_plssuProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plssuSinksId :: Lens' ProjectsLogServicesSinksUpdate' Text +plssuSinksId + = lens _plssuSinksId (\ s a -> s{_plssuSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plssuFields :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuFields + = lens _plssuFields (\ s a -> s{_plssuFields = a}) + +-- | JSONP +plssuCallback :: Lens' ProjectsLogServicesSinksUpdate' (Maybe Text) +plssuCallback + = lens _plssuCallback + (\ s a -> s{_plssuCallback = a}) + +-- | Data format for response. +plssuAlt :: Lens' ProjectsLogServicesSinksUpdate' Text +plssuAlt = lens _plssuAlt (\ s a -> s{_plssuAlt = a}) + +instance GoogleRequest + ProjectsLogServicesSinksUpdate' where + type Rs ProjectsLogServicesSinksUpdate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u + ProjectsLogServicesSinksUpdate{..} + = go _plssuXgafv _plssuQuotaUser _plssuPrettyPrint + _plssuUploadProtocol + _plssuPp + _plssuAccessToken + _plssuUploadType + _plssuBearerToken + _plssuKey + _plssuLogServicesId + _plssuOauthToken + _plssuProjectsId + _plssuSinksId + _plssuFields + _plssuCallback + _plssuAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogServicesSinksUpdateAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs new file mode 100644 index 000000000..4e332550f --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a log and all its log entries. The log will reappear if it +-- receives new entries. +-- +-- /See:/ for @LoggingProjectsLogsDelete@. +module Logging.Projects.Logs.Delete + ( + -- * REST Resource + ProjectsLogsDeleteAPI + + -- * Creating a Request + , projectsLogsDelete + , ProjectsLogsDelete + + -- * Request Lenses + , pldXgafv + , pldQuotaUser + , pldPrettyPrint + , pldUploadProtocol + , pldLogsId + , pldPp + , pldAccessToken + , pldUploadType + , pldBearerToken + , pldKey + , pldOauthToken + , pldProjectsId + , pldFields + , pldCallback + , pldAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsDelete@ which the +-- 'ProjectsLogsDelete' request conforms to. +type ProjectsLogsDeleteAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> Delete '[JSON] Empty + +-- | Deletes a log and all its log entries. The log will reappear if it +-- receives new entries. +-- +-- /See:/ 'projectsLogsDelete' smart constructor. +data ProjectsLogsDelete = ProjectsLogsDelete + { _pldXgafv :: !(Maybe Text) + , _pldQuotaUser :: !(Maybe Text) + , _pldPrettyPrint :: !Bool + , _pldUploadProtocol :: !(Maybe Text) + , _pldLogsId :: !Text + , _pldPp :: !Bool + , _pldAccessToken :: !(Maybe Text) + , _pldUploadType :: !(Maybe Text) + , _pldBearerToken :: !(Maybe Text) + , _pldKey :: !(Maybe Text) + , _pldOauthToken :: !(Maybe Text) + , _pldProjectsId :: !Text + , _pldFields :: !(Maybe Text) + , _pldCallback :: !(Maybe Text) + , _pldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pldXgafv' +-- +-- * 'pldQuotaUser' +-- +-- * 'pldPrettyPrint' +-- +-- * 'pldUploadProtocol' +-- +-- * 'pldLogsId' +-- +-- * 'pldPp' +-- +-- * 'pldAccessToken' +-- +-- * 'pldUploadType' +-- +-- * 'pldBearerToken' +-- +-- * 'pldKey' +-- +-- * 'pldOauthToken' +-- +-- * 'pldProjectsId' +-- +-- * 'pldFields' +-- +-- * 'pldCallback' +-- +-- * 'pldAlt' +projectsLogsDelete + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> ProjectsLogsDelete +projectsLogsDelete pPldLogsId_ pPldProjectsId_ = + ProjectsLogsDelete + { _pldXgafv = Nothing + , _pldQuotaUser = Nothing + , _pldPrettyPrint = True + , _pldUploadProtocol = Nothing + , _pldLogsId = pPldLogsId_ + , _pldPp = True + , _pldAccessToken = Nothing + , _pldUploadType = Nothing + , _pldBearerToken = Nothing + , _pldKey = Nothing + , _pldOauthToken = Nothing + , _pldProjectsId = pPldProjectsId_ + , _pldFields = Nothing + , _pldCallback = Nothing + , _pldAlt = "json" + } + +-- | V1 error format. +pldXgafv :: Lens' ProjectsLogsDelete' (Maybe Text) +pldXgafv = lens _pldXgafv (\ s a -> s{_pldXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pldQuotaUser :: Lens' ProjectsLogsDelete' (Maybe Text) +pldQuotaUser + = lens _pldQuotaUser (\ s a -> s{_pldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pldPrettyPrint :: Lens' ProjectsLogsDelete' Bool +pldPrettyPrint + = lens _pldPrettyPrint + (\ s a -> s{_pldPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pldUploadProtocol :: Lens' ProjectsLogsDelete' (Maybe Text) +pldUploadProtocol + = lens _pldUploadProtocol + (\ s a -> s{_pldUploadProtocol = a}) + +-- | Part of \`logName\`. See documentation of \`projectsId\`. +pldLogsId :: Lens' ProjectsLogsDelete' Text +pldLogsId + = lens _pldLogsId (\ s a -> s{_pldLogsId = a}) + +-- | Pretty-print response. +pldPp :: Lens' ProjectsLogsDelete' Bool +pldPp = lens _pldPp (\ s a -> s{_pldPp = a}) + +-- | OAuth access token. +pldAccessToken :: Lens' ProjectsLogsDelete' (Maybe Text) +pldAccessToken + = lens _pldAccessToken + (\ s a -> s{_pldAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pldUploadType :: Lens' ProjectsLogsDelete' (Maybe Text) +pldUploadType + = lens _pldUploadType + (\ s a -> s{_pldUploadType = a}) + +-- | OAuth bearer token. +pldBearerToken :: Lens' ProjectsLogsDelete' (Maybe Text) +pldBearerToken + = lens _pldBearerToken + (\ s a -> s{_pldBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pldKey :: Lens' ProjectsLogsDelete' (Maybe Text) +pldKey = lens _pldKey (\ s a -> s{_pldKey = a}) + +-- | OAuth 2.0 token for the current user. +pldOauthToken :: Lens' ProjectsLogsDelete' (Maybe Text) +pldOauthToken + = lens _pldOauthToken + (\ s a -> s{_pldOauthToken = a}) + +-- | Part of \`logName\`. The resource name of the log to be deleted. +pldProjectsId :: Lens' ProjectsLogsDelete' Text +pldProjectsId + = lens _pldProjectsId + (\ s a -> s{_pldProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +pldFields :: Lens' ProjectsLogsDelete' (Maybe Text) +pldFields + = lens _pldFields (\ s a -> s{_pldFields = a}) + +-- | JSONP +pldCallback :: Lens' ProjectsLogsDelete' (Maybe Text) +pldCallback + = lens _pldCallback (\ s a -> s{_pldCallback = a}) + +-- | Data format for response. +pldAlt :: Lens' ProjectsLogsDelete' Text +pldAlt = lens _pldAlt (\ s a -> s{_pldAlt = a}) + +instance GoogleRequest ProjectsLogsDelete' where + type Rs ProjectsLogsDelete' = Empty + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsDelete{..} + = go _pldXgafv _pldQuotaUser _pldPrettyPrint + _pldUploadProtocol + _pldLogsId + _pldPp + _pldAccessToken + _pldUploadType + _pldBearerToken + _pldKey + _pldOauthToken + _pldProjectsId + _pldFields + _pldCallback + _pldAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsDeleteAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Entries/Write.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Entries/Write.hs new file mode 100644 index 000000000..1fefe1c4c --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Entries/Write.hs @@ -0,0 +1,258 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Entries.Write +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Writes log entries to Cloud Logging. Each entry consists of a +-- \`LogEntry\` object. You must fill in all the fields of the object, +-- including one of the payload fields. You may supply a map, +-- \`commonLabels\`, that holds default (key, value) data for the +-- \`entries[].metadata.labels\` map in each entry, saving you the trouble +-- of creating identical copies for each entry. +-- +-- /See:/ for @LoggingProjectsLogsEntriesWrite@. +module Logging.Projects.Logs.Entries.Write + ( + -- * REST Resource + ProjectsLogsEntriesWriteAPI + + -- * Creating a Request + , projectsLogsEntriesWrite + , ProjectsLogsEntriesWrite + + -- * Request Lenses + , plewXgafv + , plewQuotaUser + , plewPrettyPrint + , plewUploadProtocol + , plewLogsId + , plewPp + , plewAccessToken + , plewUploadType + , plewBearerToken + , plewKey + , plewOauthToken + , plewProjectsId + , plewFields + , plewCallback + , plewAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsEntriesWrite@ which the +-- 'ProjectsLogsEntriesWrite' request conforms to. +type ProjectsLogsEntriesWriteAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "entries:write" :> + Post '[JSON] WriteLogEntriesResponse + +-- | Writes log entries to Cloud Logging. Each entry consists of a +-- \`LogEntry\` object. You must fill in all the fields of the object, +-- including one of the payload fields. You may supply a map, +-- \`commonLabels\`, that holds default (key, value) data for the +-- \`entries[].metadata.labels\` map in each entry, saving you the trouble +-- of creating identical copies for each entry. +-- +-- /See:/ 'projectsLogsEntriesWrite' smart constructor. +data ProjectsLogsEntriesWrite = ProjectsLogsEntriesWrite + { _plewXgafv :: !(Maybe Text) + , _plewQuotaUser :: !(Maybe Text) + , _plewPrettyPrint :: !Bool + , _plewUploadProtocol :: !(Maybe Text) + , _plewLogsId :: !Text + , _plewPp :: !Bool + , _plewAccessToken :: !(Maybe Text) + , _plewUploadType :: !(Maybe Text) + , _plewBearerToken :: !(Maybe Text) + , _plewKey :: !(Maybe Text) + , _plewOauthToken :: !(Maybe Text) + , _plewProjectsId :: !Text + , _plewFields :: !(Maybe Text) + , _plewCallback :: !(Maybe Text) + , _plewAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsEntriesWrite'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plewXgafv' +-- +-- * 'plewQuotaUser' +-- +-- * 'plewPrettyPrint' +-- +-- * 'plewUploadProtocol' +-- +-- * 'plewLogsId' +-- +-- * 'plewPp' +-- +-- * 'plewAccessToken' +-- +-- * 'plewUploadType' +-- +-- * 'plewBearerToken' +-- +-- * 'plewKey' +-- +-- * 'plewOauthToken' +-- +-- * 'plewProjectsId' +-- +-- * 'plewFields' +-- +-- * 'plewCallback' +-- +-- * 'plewAlt' +projectsLogsEntriesWrite + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> ProjectsLogsEntriesWrite +projectsLogsEntriesWrite pPlewLogsId_ pPlewProjectsId_ = + ProjectsLogsEntriesWrite + { _plewXgafv = Nothing + , _plewQuotaUser = Nothing + , _plewPrettyPrint = True + , _plewUploadProtocol = Nothing + , _plewLogsId = pPlewLogsId_ + , _plewPp = True + , _plewAccessToken = Nothing + , _plewUploadType = Nothing + , _plewBearerToken = Nothing + , _plewKey = Nothing + , _plewOauthToken = Nothing + , _plewProjectsId = pPlewProjectsId_ + , _plewFields = Nothing + , _plewCallback = Nothing + , _plewAlt = "json" + } + +-- | V1 error format. +plewXgafv :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewXgafv + = lens _plewXgafv (\ s a -> s{_plewXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plewQuotaUser :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewQuotaUser + = lens _plewQuotaUser + (\ s a -> s{_plewQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plewPrettyPrint :: Lens' ProjectsLogsEntriesWrite' Bool +plewPrettyPrint + = lens _plewPrettyPrint + (\ s a -> s{_plewPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plewUploadProtocol :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewUploadProtocol + = lens _plewUploadProtocol + (\ s a -> s{_plewUploadProtocol = a}) + +-- | Part of \`logName\`. See documentation of \`projectsId\`. +plewLogsId :: Lens' ProjectsLogsEntriesWrite' Text +plewLogsId + = lens _plewLogsId (\ s a -> s{_plewLogsId = a}) + +-- | Pretty-print response. +plewPp :: Lens' ProjectsLogsEntriesWrite' Bool +plewPp = lens _plewPp (\ s a -> s{_plewPp = a}) + +-- | OAuth access token. +plewAccessToken :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewAccessToken + = lens _plewAccessToken + (\ s a -> s{_plewAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plewUploadType :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewUploadType + = lens _plewUploadType + (\ s a -> s{_plewUploadType = a}) + +-- | OAuth bearer token. +plewBearerToken :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewBearerToken + = lens _plewBearerToken + (\ s a -> s{_plewBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plewKey :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewKey = lens _plewKey (\ s a -> s{_plewKey = a}) + +-- | OAuth 2.0 token for the current user. +plewOauthToken :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewOauthToken + = lens _plewOauthToken + (\ s a -> s{_plewOauthToken = a}) + +-- | Part of \`logName\`. The resource name of the log that will receive the +-- log entries. +plewProjectsId :: Lens' ProjectsLogsEntriesWrite' Text +plewProjectsId + = lens _plewProjectsId + (\ s a -> s{_plewProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +plewFields :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewFields + = lens _plewFields (\ s a -> s{_plewFields = a}) + +-- | JSONP +plewCallback :: Lens' ProjectsLogsEntriesWrite' (Maybe Text) +plewCallback + = lens _plewCallback (\ s a -> s{_plewCallback = a}) + +-- | Data format for response. +plewAlt :: Lens' ProjectsLogsEntriesWrite' Text +plewAlt = lens _plewAlt (\ s a -> s{_plewAlt = a}) + +instance GoogleRequest ProjectsLogsEntriesWrite' + where + type Rs ProjectsLogsEntriesWrite' = + WriteLogEntriesResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsEntriesWrite{..} + = go _plewXgafv _plewQuotaUser _plewPrettyPrint + _plewUploadProtocol + _plewLogsId + _plewPp + _plewAccessToken + _plewUploadType + _plewBearerToken + _plewKey + _plewOauthToken + _plewProjectsId + _plewFields + _plewCallback + _plewAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsEntriesWriteAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs new file mode 100644 index 000000000..a35331c6d --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs @@ -0,0 +1,293 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the logs in the project. Only logs that have entries are listed. +-- +-- /See:/ for @LoggingProjectsLogsList@. +module Logging.Projects.Logs.List + ( + -- * REST Resource + ProjectsLogsListAPI + + -- * Creating a Request + , projectsLogsList + , ProjectsLogsList + + -- * Request Lenses + , pllXgafv + , pllQuotaUser + , pllPrettyPrint + , pllUploadProtocol + , pllPp + , pllAccessToken + , pllUploadType + , pllBearerToken + , pllKey + , pllServiceName + , pllPageToken + , pllOauthToken + , pllServiceIndexPrefix + , pllProjectsId + , pllPageSize + , pllFields + , pllCallback + , pllAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsList@ which the +-- 'ProjectsLogsList' request conforms to. +type ProjectsLogsListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + QueryParam "serviceName" Text :> + QueryParam "pageToken" Text :> + QueryParam "serviceIndexPrefix" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListLogsResponse + +-- | Lists the logs in the project. Only logs that have entries are listed. +-- +-- /See:/ 'projectsLogsList' smart constructor. +data ProjectsLogsList = ProjectsLogsList + { _pllXgafv :: !(Maybe Text) + , _pllQuotaUser :: !(Maybe Text) + , _pllPrettyPrint :: !Bool + , _pllUploadProtocol :: !(Maybe Text) + , _pllPp :: !Bool + , _pllAccessToken :: !(Maybe Text) + , _pllUploadType :: !(Maybe Text) + , _pllBearerToken :: !(Maybe Text) + , _pllKey :: !(Maybe Text) + , _pllServiceName :: !(Maybe Text) + , _pllPageToken :: !(Maybe Text) + , _pllOauthToken :: !(Maybe Text) + , _pllServiceIndexPrefix :: !(Maybe Text) + , _pllProjectsId :: !Text + , _pllPageSize :: !(Maybe Int32) + , _pllFields :: !(Maybe Text) + , _pllCallback :: !(Maybe Text) + , _pllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllXgafv' +-- +-- * 'pllQuotaUser' +-- +-- * 'pllPrettyPrint' +-- +-- * 'pllUploadProtocol' +-- +-- * 'pllPp' +-- +-- * 'pllAccessToken' +-- +-- * 'pllUploadType' +-- +-- * 'pllBearerToken' +-- +-- * 'pllKey' +-- +-- * 'pllServiceName' +-- +-- * 'pllPageToken' +-- +-- * 'pllOauthToken' +-- +-- * 'pllServiceIndexPrefix' +-- +-- * 'pllProjectsId' +-- +-- * 'pllPageSize' +-- +-- * 'pllFields' +-- +-- * 'pllCallback' +-- +-- * 'pllAlt' +projectsLogsList + :: Text -- ^ 'projectsId' + -> ProjectsLogsList +projectsLogsList pPllProjectsId_ = + ProjectsLogsList + { _pllXgafv = Nothing + , _pllQuotaUser = Nothing + , _pllPrettyPrint = True + , _pllUploadProtocol = Nothing + , _pllPp = True + , _pllAccessToken = Nothing + , _pllUploadType = Nothing + , _pllBearerToken = Nothing + , _pllKey = Nothing + , _pllServiceName = Nothing + , _pllPageToken = Nothing + , _pllOauthToken = Nothing + , _pllServiceIndexPrefix = Nothing + , _pllProjectsId = pPllProjectsId_ + , _pllPageSize = Nothing + , _pllFields = Nothing + , _pllCallback = Nothing + , _pllAlt = "json" + } + +-- | V1 error format. +pllXgafv :: Lens' ProjectsLogsList' (Maybe Text) +pllXgafv = lens _pllXgafv (\ s a -> s{_pllXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pllQuotaUser :: Lens' ProjectsLogsList' (Maybe Text) +pllQuotaUser + = lens _pllQuotaUser (\ s a -> s{_pllQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pllPrettyPrint :: Lens' ProjectsLogsList' Bool +pllPrettyPrint + = lens _pllPrettyPrint + (\ s a -> s{_pllPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pllUploadProtocol :: Lens' ProjectsLogsList' (Maybe Text) +pllUploadProtocol + = lens _pllUploadProtocol + (\ s a -> s{_pllUploadProtocol = a}) + +-- | Pretty-print response. +pllPp :: Lens' ProjectsLogsList' Bool +pllPp = lens _pllPp (\ s a -> s{_pllPp = a}) + +-- | OAuth access token. +pllAccessToken :: Lens' ProjectsLogsList' (Maybe Text) +pllAccessToken + = lens _pllAccessToken + (\ s a -> s{_pllAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pllUploadType :: Lens' ProjectsLogsList' (Maybe Text) +pllUploadType + = lens _pllUploadType + (\ s a -> s{_pllUploadType = a}) + +-- | OAuth bearer token. +pllBearerToken :: Lens' ProjectsLogsList' (Maybe Text) +pllBearerToken + = lens _pllBearerToken + (\ s a -> s{_pllBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pllKey :: Lens' ProjectsLogsList' (Maybe Text) +pllKey = lens _pllKey (\ s a -> s{_pllKey = a}) + +-- | If not empty, this field must be a log service name such as +-- \`\"compute.googleapis.com\"\`. Only logs associated with that that log +-- service are listed. +pllServiceName :: Lens' ProjectsLogsList' (Maybe Text) +pllServiceName + = lens _pllServiceName + (\ s a -> s{_pllServiceName = a}) + +-- | An opaque token, returned as \`nextPageToken\` by a prior \`ListLogs\` +-- operation. If \`pageToken\` is supplied, then the other fields of this +-- request are ignored, and instead the previous \`ListLogs\` operation is +-- continued. +pllPageToken :: Lens' ProjectsLogsList' (Maybe Text) +pllPageToken + = lens _pllPageToken (\ s a -> s{_pllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +pllOauthToken :: Lens' ProjectsLogsList' (Maybe Text) +pllOauthToken + = lens _pllOauthToken + (\ s a -> s{_pllOauthToken = a}) + +-- | The purpose of this field is to restrict the listed logs to those with +-- entries of a certain kind. If \`serviceName\` is the name of a log +-- service, then this field may contain values for the log service\'s +-- indexes. Only logs that have entries whose indexes include the values +-- are listed. The format for this field is \`\"\/val1\/val2...\/valN\"\`, +-- where \`val1\` is a value for the first index, \`val2\` for the second +-- index, etc. An empty value (a single slash) for an index matches all +-- values, and you can omit values for later indexes entirely. +pllServiceIndexPrefix :: Lens' ProjectsLogsList' (Maybe Text) +pllServiceIndexPrefix + = lens _pllServiceIndexPrefix + (\ s a -> s{_pllServiceIndexPrefix = a}) + +-- | Part of \`projectName\`. The resource name of the project whose logs are +-- requested. If both \`serviceName\` and \`serviceIndexPrefix\` are empty, +-- then all logs with entries in this project are listed. +pllProjectsId :: Lens' ProjectsLogsList' Text +pllProjectsId + = lens _pllProjectsId + (\ s a -> s{_pllProjectsId = a}) + +-- | The maximum number of results to return. +pllPageSize :: Lens' ProjectsLogsList' (Maybe Int32) +pllPageSize + = lens _pllPageSize (\ s a -> s{_pllPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +pllFields :: Lens' ProjectsLogsList' (Maybe Text) +pllFields + = lens _pllFields (\ s a -> s{_pllFields = a}) + +-- | JSONP +pllCallback :: Lens' ProjectsLogsList' (Maybe Text) +pllCallback + = lens _pllCallback (\ s a -> s{_pllCallback = a}) + +-- | Data format for response. +pllAlt :: Lens' ProjectsLogsList' Text +pllAlt = lens _pllAlt (\ s a -> s{_pllAlt = a}) + +instance GoogleRequest ProjectsLogsList' where + type Rs ProjectsLogsList' = ListLogsResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsList{..} + = go _pllXgafv _pllQuotaUser _pllPrettyPrint + _pllUploadProtocol + _pllPp + _pllAccessToken + _pllUploadType + _pllBearerToken + _pllKey + _pllServiceName + _pllPageToken + _pllOauthToken + _pllServiceIndexPrefix + _pllProjectsId + _pllPageSize + _pllFields + _pllCallback + _pllAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Create.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Create.hs new file mode 100644 index 000000000..9b63078ce --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Create.hs @@ -0,0 +1,247 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Sinks.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a log sink. All log entries for a specified log are written to +-- the destination. +-- +-- /See:/ for @LoggingProjectsLogsSinksCreate@. +module Logging.Projects.Logs.Sinks.Create + ( + -- * REST Resource + ProjectsLogsSinksCreateAPI + + -- * Creating a Request + , projectsLogsSinksCreate + , ProjectsLogsSinksCreate + + -- * Request Lenses + , plscXgafv + , plscQuotaUser + , plscPrettyPrint + , plscUploadProtocol + , plscLogsId + , plscPp + , plscAccessToken + , plscUploadType + , plscBearerToken + , plscKey + , plscOauthToken + , plscProjectsId + , plscFields + , plscCallback + , plscAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsSinksCreate@ which the +-- 'ProjectsLogsSinksCreate' request conforms to. +type ProjectsLogsSinksCreateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "sinks" :> Post '[JSON] LogSink + +-- | Creates a log sink. All log entries for a specified log are written to +-- the destination. +-- +-- /See:/ 'projectsLogsSinksCreate' smart constructor. +data ProjectsLogsSinksCreate = ProjectsLogsSinksCreate + { _plscXgafv :: !(Maybe Text) + , _plscQuotaUser :: !(Maybe Text) + , _plscPrettyPrint :: !Bool + , _plscUploadProtocol :: !(Maybe Text) + , _plscLogsId :: !Text + , _plscPp :: !Bool + , _plscAccessToken :: !(Maybe Text) + , _plscUploadType :: !(Maybe Text) + , _plscBearerToken :: !(Maybe Text) + , _plscKey :: !(Maybe Text) + , _plscOauthToken :: !(Maybe Text) + , _plscProjectsId :: !Text + , _plscFields :: !(Maybe Text) + , _plscCallback :: !(Maybe Text) + , _plscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsSinksCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plscXgafv' +-- +-- * 'plscQuotaUser' +-- +-- * 'plscPrettyPrint' +-- +-- * 'plscUploadProtocol' +-- +-- * 'plscLogsId' +-- +-- * 'plscPp' +-- +-- * 'plscAccessToken' +-- +-- * 'plscUploadType' +-- +-- * 'plscBearerToken' +-- +-- * 'plscKey' +-- +-- * 'plscOauthToken' +-- +-- * 'plscProjectsId' +-- +-- * 'plscFields' +-- +-- * 'plscCallback' +-- +-- * 'plscAlt' +projectsLogsSinksCreate + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> ProjectsLogsSinksCreate +projectsLogsSinksCreate pPlscLogsId_ pPlscProjectsId_ = + ProjectsLogsSinksCreate + { _plscXgafv = Nothing + , _plscQuotaUser = Nothing + , _plscPrettyPrint = True + , _plscUploadProtocol = Nothing + , _plscLogsId = pPlscLogsId_ + , _plscPp = True + , _plscAccessToken = Nothing + , _plscUploadType = Nothing + , _plscBearerToken = Nothing + , _plscKey = Nothing + , _plscOauthToken = Nothing + , _plscProjectsId = pPlscProjectsId_ + , _plscFields = Nothing + , _plscCallback = Nothing + , _plscAlt = "json" + } + +-- | V1 error format. +plscXgafv :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscXgafv + = lens _plscXgafv (\ s a -> s{_plscXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plscQuotaUser :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscQuotaUser + = lens _plscQuotaUser + (\ s a -> s{_plscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plscPrettyPrint :: Lens' ProjectsLogsSinksCreate' Bool +plscPrettyPrint + = lens _plscPrettyPrint + (\ s a -> s{_plscPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plscUploadProtocol :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscUploadProtocol + = lens _plscUploadProtocol + (\ s a -> s{_plscUploadProtocol = a}) + +-- | Part of \`logName\`. See documentation of \`projectsId\`. +plscLogsId :: Lens' ProjectsLogsSinksCreate' Text +plscLogsId + = lens _plscLogsId (\ s a -> s{_plscLogsId = a}) + +-- | Pretty-print response. +plscPp :: Lens' ProjectsLogsSinksCreate' Bool +plscPp = lens _plscPp (\ s a -> s{_plscPp = a}) + +-- | OAuth access token. +plscAccessToken :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscAccessToken + = lens _plscAccessToken + (\ s a -> s{_plscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plscUploadType :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscUploadType + = lens _plscUploadType + (\ s a -> s{_plscUploadType = a}) + +-- | OAuth bearer token. +plscBearerToken :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscBearerToken + = lens _plscBearerToken + (\ s a -> s{_plscBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plscKey :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscKey = lens _plscKey (\ s a -> s{_plscKey = a}) + +-- | OAuth 2.0 token for the current user. +plscOauthToken :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscOauthToken + = lens _plscOauthToken + (\ s a -> s{_plscOauthToken = a}) + +-- | Part of \`logName\`. The resource name of the log to which to the sink +-- is bound. +plscProjectsId :: Lens' ProjectsLogsSinksCreate' Text +plscProjectsId + = lens _plscProjectsId + (\ s a -> s{_plscProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +plscFields :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscFields + = lens _plscFields (\ s a -> s{_plscFields = a}) + +-- | JSONP +plscCallback :: Lens' ProjectsLogsSinksCreate' (Maybe Text) +plscCallback + = lens _plscCallback (\ s a -> s{_plscCallback = a}) + +-- | Data format for response. +plscAlt :: Lens' ProjectsLogsSinksCreate' Text +plscAlt = lens _plscAlt (\ s a -> s{_plscAlt = a}) + +instance GoogleRequest ProjectsLogsSinksCreate' where + type Rs ProjectsLogsSinksCreate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsSinksCreate{..} + = go _plscXgafv _plscQuotaUser _plscPrettyPrint + _plscUploadProtocol + _plscLogsId + _plscPp + _plscAccessToken + _plscUploadType + _plscBearerToken + _plscKey + _plscOauthToken + _plscProjectsId + _plscFields + _plscCallback + _plscAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsSinksCreateAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Delete.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Delete.hs new file mode 100644 index 000000000..7ebb2bce8 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Delete.hs @@ -0,0 +1,259 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Sinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a log sink. After deletion, no new log entries are written to +-- the destination. +-- +-- /See:/ for @LoggingProjectsLogsSinksDelete@. +module Logging.Projects.Logs.Sinks.Delete + ( + -- * REST Resource + ProjectsLogsSinksDeleteAPI + + -- * Creating a Request + , projectsLogsSinksDelete + , ProjectsLogsSinksDelete + + -- * Request Lenses + , plsdXgafv + , plsdQuotaUser + , plsdPrettyPrint + , plsdUploadProtocol + , plsdLogsId + , plsdPp + , plsdAccessToken + , plsdUploadType + , plsdBearerToken + , plsdKey + , plsdOauthToken + , plsdProjectsId + , plsdSinksId + , plsdFields + , plsdCallback + , plsdAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsSinksDelete@ which the +-- 'ProjectsLogsSinksDelete' request conforms to. +type ProjectsLogsSinksDeleteAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Delete '[JSON] Empty + +-- | Deletes a log sink. After deletion, no new log entries are written to +-- the destination. +-- +-- /See:/ 'projectsLogsSinksDelete' smart constructor. +data ProjectsLogsSinksDelete = ProjectsLogsSinksDelete + { _plsdXgafv :: !(Maybe Text) + , _plsdQuotaUser :: !(Maybe Text) + , _plsdPrettyPrint :: !Bool + , _plsdUploadProtocol :: !(Maybe Text) + , _plsdLogsId :: !Text + , _plsdPp :: !Bool + , _plsdAccessToken :: !(Maybe Text) + , _plsdUploadType :: !(Maybe Text) + , _plsdBearerToken :: !(Maybe Text) + , _plsdKey :: !(Maybe Text) + , _plsdOauthToken :: !(Maybe Text) + , _plsdProjectsId :: !Text + , _plsdSinksId :: !Text + , _plsdFields :: !(Maybe Text) + , _plsdCallback :: !(Maybe Text) + , _plsdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsSinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsdXgafv' +-- +-- * 'plsdQuotaUser' +-- +-- * 'plsdPrettyPrint' +-- +-- * 'plsdUploadProtocol' +-- +-- * 'plsdLogsId' +-- +-- * 'plsdPp' +-- +-- * 'plsdAccessToken' +-- +-- * 'plsdUploadType' +-- +-- * 'plsdBearerToken' +-- +-- * 'plsdKey' +-- +-- * 'plsdOauthToken' +-- +-- * 'plsdProjectsId' +-- +-- * 'plsdSinksId' +-- +-- * 'plsdFields' +-- +-- * 'plsdCallback' +-- +-- * 'plsdAlt' +projectsLogsSinksDelete + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogsSinksDelete +projectsLogsSinksDelete pPlsdLogsId_ pPlsdProjectsId_ pPlsdSinksId_ = + ProjectsLogsSinksDelete + { _plsdXgafv = Nothing + , _plsdQuotaUser = Nothing + , _plsdPrettyPrint = True + , _plsdUploadProtocol = Nothing + , _plsdLogsId = pPlsdLogsId_ + , _plsdPp = True + , _plsdAccessToken = Nothing + , _plsdUploadType = Nothing + , _plsdBearerToken = Nothing + , _plsdKey = Nothing + , _plsdOauthToken = Nothing + , _plsdProjectsId = pPlsdProjectsId_ + , _plsdSinksId = pPlsdSinksId_ + , _plsdFields = Nothing + , _plsdCallback = Nothing + , _plsdAlt = "json" + } + +-- | V1 error format. +plsdXgafv :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdXgafv + = lens _plsdXgafv (\ s a -> s{_plsdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsdQuotaUser :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdQuotaUser + = lens _plsdQuotaUser + (\ s a -> s{_plsdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsdPrettyPrint :: Lens' ProjectsLogsSinksDelete' Bool +plsdPrettyPrint + = lens _plsdPrettyPrint + (\ s a -> s{_plsdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsdUploadProtocol :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdUploadProtocol + = lens _plsdUploadProtocol + (\ s a -> s{_plsdUploadProtocol = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsdLogsId :: Lens' ProjectsLogsSinksDelete' Text +plsdLogsId + = lens _plsdLogsId (\ s a -> s{_plsdLogsId = a}) + +-- | Pretty-print response. +plsdPp :: Lens' ProjectsLogsSinksDelete' Bool +plsdPp = lens _plsdPp (\ s a -> s{_plsdPp = a}) + +-- | OAuth access token. +plsdAccessToken :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdAccessToken + = lens _plsdAccessToken + (\ s a -> s{_plsdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsdUploadType :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdUploadType + = lens _plsdUploadType + (\ s a -> s{_plsdUploadType = a}) + +-- | OAuth bearer token. +plsdBearerToken :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdBearerToken + = lens _plsdBearerToken + (\ s a -> s{_plsdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsdKey :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdKey = lens _plsdKey (\ s a -> s{_plsdKey = a}) + +-- | OAuth 2.0 token for the current user. +plsdOauthToken :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdOauthToken + = lens _plsdOauthToken + (\ s a -> s{_plsdOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the log sink to delete. +plsdProjectsId :: Lens' ProjectsLogsSinksDelete' Text +plsdProjectsId + = lens _plsdProjectsId + (\ s a -> s{_plsdProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsdSinksId :: Lens' ProjectsLogsSinksDelete' Text +plsdSinksId + = lens _plsdSinksId (\ s a -> s{_plsdSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plsdFields :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdFields + = lens _plsdFields (\ s a -> s{_plsdFields = a}) + +-- | JSONP +plsdCallback :: Lens' ProjectsLogsSinksDelete' (Maybe Text) +plsdCallback + = lens _plsdCallback (\ s a -> s{_plsdCallback = a}) + +-- | Data format for response. +plsdAlt :: Lens' ProjectsLogsSinksDelete' Text +plsdAlt = lens _plsdAlt (\ s a -> s{_plsdAlt = a}) + +instance GoogleRequest ProjectsLogsSinksDelete' where + type Rs ProjectsLogsSinksDelete' = Empty + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsSinksDelete{..} + = go _plsdXgafv _plsdQuotaUser _plsdPrettyPrint + _plsdUploadProtocol + _plsdLogsId + _plsdPp + _plsdAccessToken + _plsdUploadType + _plsdBearerToken + _plsdKey + _plsdOauthToken + _plsdProjectsId + _plsdSinksId + _plsdFields + _plsdCallback + _plsdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsSinksDeleteAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Get.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Get.hs new file mode 100644 index 000000000..57e15f109 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Get.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Sinks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a log sink. +-- +-- /See:/ for @LoggingProjectsLogsSinksGet@. +module Logging.Projects.Logs.Sinks.Get + ( + -- * REST Resource + ProjectsLogsSinksGetAPI + + -- * Creating a Request + , projectsLogsSinksGet + , ProjectsLogsSinksGet + + -- * Request Lenses + , plsgXgafv + , plsgQuotaUser + , plsgPrettyPrint + , plsgUploadProtocol + , plsgLogsId + , plsgPp + , plsgAccessToken + , plsgUploadType + , plsgBearerToken + , plsgKey + , plsgOauthToken + , plsgProjectsId + , plsgSinksId + , plsgFields + , plsgCallback + , plsgAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsSinksGet@ which the +-- 'ProjectsLogsSinksGet' request conforms to. +type ProjectsLogsSinksGetAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Get '[JSON] LogSink + +-- | Gets a log sink. +-- +-- /See:/ 'projectsLogsSinksGet' smart constructor. +data ProjectsLogsSinksGet = ProjectsLogsSinksGet + { _plsgXgafv :: !(Maybe Text) + , _plsgQuotaUser :: !(Maybe Text) + , _plsgPrettyPrint :: !Bool + , _plsgUploadProtocol :: !(Maybe Text) + , _plsgLogsId :: !Text + , _plsgPp :: !Bool + , _plsgAccessToken :: !(Maybe Text) + , _plsgUploadType :: !(Maybe Text) + , _plsgBearerToken :: !(Maybe Text) + , _plsgKey :: !(Maybe Text) + , _plsgOauthToken :: !(Maybe Text) + , _plsgProjectsId :: !Text + , _plsgSinksId :: !Text + , _plsgFields :: !(Maybe Text) + , _plsgCallback :: !(Maybe Text) + , _plsgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsSinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsgXgafv' +-- +-- * 'plsgQuotaUser' +-- +-- * 'plsgPrettyPrint' +-- +-- * 'plsgUploadProtocol' +-- +-- * 'plsgLogsId' +-- +-- * 'plsgPp' +-- +-- * 'plsgAccessToken' +-- +-- * 'plsgUploadType' +-- +-- * 'plsgBearerToken' +-- +-- * 'plsgKey' +-- +-- * 'plsgOauthToken' +-- +-- * 'plsgProjectsId' +-- +-- * 'plsgSinksId' +-- +-- * 'plsgFields' +-- +-- * 'plsgCallback' +-- +-- * 'plsgAlt' +projectsLogsSinksGet + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogsSinksGet +projectsLogsSinksGet pPlsgLogsId_ pPlsgProjectsId_ pPlsgSinksId_ = + ProjectsLogsSinksGet + { _plsgXgafv = Nothing + , _plsgQuotaUser = Nothing + , _plsgPrettyPrint = True + , _plsgUploadProtocol = Nothing + , _plsgLogsId = pPlsgLogsId_ + , _plsgPp = True + , _plsgAccessToken = Nothing + , _plsgUploadType = Nothing + , _plsgBearerToken = Nothing + , _plsgKey = Nothing + , _plsgOauthToken = Nothing + , _plsgProjectsId = pPlsgProjectsId_ + , _plsgSinksId = pPlsgSinksId_ + , _plsgFields = Nothing + , _plsgCallback = Nothing + , _plsgAlt = "json" + } + +-- | V1 error format. +plsgXgafv :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgXgafv + = lens _plsgXgafv (\ s a -> s{_plsgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsgQuotaUser :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgQuotaUser + = lens _plsgQuotaUser + (\ s a -> s{_plsgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsgPrettyPrint :: Lens' ProjectsLogsSinksGet' Bool +plsgPrettyPrint + = lens _plsgPrettyPrint + (\ s a -> s{_plsgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsgUploadProtocol :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgUploadProtocol + = lens _plsgUploadProtocol + (\ s a -> s{_plsgUploadProtocol = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsgLogsId :: Lens' ProjectsLogsSinksGet' Text +plsgLogsId + = lens _plsgLogsId (\ s a -> s{_plsgLogsId = a}) + +-- | Pretty-print response. +plsgPp :: Lens' ProjectsLogsSinksGet' Bool +plsgPp = lens _plsgPp (\ s a -> s{_plsgPp = a}) + +-- | OAuth access token. +plsgAccessToken :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgAccessToken + = lens _plsgAccessToken + (\ s a -> s{_plsgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsgUploadType :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgUploadType + = lens _plsgUploadType + (\ s a -> s{_plsgUploadType = a}) + +-- | OAuth bearer token. +plsgBearerToken :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgBearerToken + = lens _plsgBearerToken + (\ s a -> s{_plsgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsgKey :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgKey = lens _plsgKey (\ s a -> s{_plsgKey = a}) + +-- | OAuth 2.0 token for the current user. +plsgOauthToken :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgOauthToken + = lens _plsgOauthToken + (\ s a -> s{_plsgOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the log sink to return. +plsgProjectsId :: Lens' ProjectsLogsSinksGet' Text +plsgProjectsId + = lens _plsgProjectsId + (\ s a -> s{_plsgProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsgSinksId :: Lens' ProjectsLogsSinksGet' Text +plsgSinksId + = lens _plsgSinksId (\ s a -> s{_plsgSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plsgFields :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgFields + = lens _plsgFields (\ s a -> s{_plsgFields = a}) + +-- | JSONP +plsgCallback :: Lens' ProjectsLogsSinksGet' (Maybe Text) +plsgCallback + = lens _plsgCallback (\ s a -> s{_plsgCallback = a}) + +-- | Data format for response. +plsgAlt :: Lens' ProjectsLogsSinksGet' Text +plsgAlt = lens _plsgAlt (\ s a -> s{_plsgAlt = a}) + +instance GoogleRequest ProjectsLogsSinksGet' where + type Rs ProjectsLogsSinksGet' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsSinksGet{..} + = go _plsgXgafv _plsgQuotaUser _plsgPrettyPrint + _plsgUploadProtocol + _plsgLogsId + _plsgPp + _plsgAccessToken + _plsgUploadType + _plsgBearerToken + _plsgKey + _plsgOauthToken + _plsgProjectsId + _plsgSinksId + _plsgFields + _plsgCallback + _plsgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsSinksGetAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/List.hs new file mode 100644 index 000000000..0503770c3 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/List.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Sinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists log sinks associated with a log. +-- +-- /See:/ for @LoggingProjectsLogsSinksList@. +module Logging.Projects.Logs.Sinks.List + ( + -- * REST Resource + ProjectsLogsSinksListAPI + + -- * Creating a Request + , projectsLogsSinksList + , ProjectsLogsSinksList + + -- * Request Lenses + , pXgafv + , pQuotaUser + , pPrettyPrint + , pUploadProtocol + , pLogsId + , pPp + , pAccessToken + , pUploadType + , pBearerToken + , pKey + , pOauthToken + , pProjectsId + , pFields + , pCallback + , pAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsSinksList@ which the +-- 'ProjectsLogsSinksList' request conforms to. +type ProjectsLogsSinksListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "sinks" :> Get '[JSON] ListLogSinksResponse + +-- | Lists log sinks associated with a log. +-- +-- /See:/ 'projectsLogsSinksList' smart constructor. +data ProjectsLogsSinksList = ProjectsLogsSinksList + { _pXgafv :: !(Maybe Text) + , _pQuotaUser :: !(Maybe Text) + , _pPrettyPrint :: !Bool + , _pUploadProtocol :: !(Maybe Text) + , _pLogsId :: !Text + , _pPp :: !Bool + , _pAccessToken :: !(Maybe Text) + , _pUploadType :: !(Maybe Text) + , _pBearerToken :: !(Maybe Text) + , _pKey :: !(Maybe Text) + , _pOauthToken :: !(Maybe Text) + , _pProjectsId :: !Text + , _pFields :: !(Maybe Text) + , _pCallback :: !(Maybe Text) + , _pAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsSinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pXgafv' +-- +-- * 'pQuotaUser' +-- +-- * 'pPrettyPrint' +-- +-- * 'pUploadProtocol' +-- +-- * 'pLogsId' +-- +-- * 'pPp' +-- +-- * 'pAccessToken' +-- +-- * 'pUploadType' +-- +-- * 'pBearerToken' +-- +-- * 'pKey' +-- +-- * 'pOauthToken' +-- +-- * 'pProjectsId' +-- +-- * 'pFields' +-- +-- * 'pCallback' +-- +-- * 'pAlt' +projectsLogsSinksList + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> ProjectsLogsSinksList +projectsLogsSinksList pPLogsId_ pPProjectsId_ = + ProjectsLogsSinksList + { _pXgafv = Nothing + , _pQuotaUser = Nothing + , _pPrettyPrint = True + , _pUploadProtocol = Nothing + , _pLogsId = pPLogsId_ + , _pPp = True + , _pAccessToken = Nothing + , _pUploadType = Nothing + , _pBearerToken = Nothing + , _pKey = Nothing + , _pOauthToken = Nothing + , _pProjectsId = pPProjectsId_ + , _pFields = Nothing + , _pCallback = Nothing + , _pAlt = "json" + } + +-- | V1 error format. +pXgafv :: Lens' ProjectsLogsSinksList' (Maybe Text) +pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pQuotaUser :: Lens' ProjectsLogsSinksList' (Maybe Text) +pQuotaUser + = lens _pQuotaUser (\ s a -> s{_pQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pPrettyPrint :: Lens' ProjectsLogsSinksList' Bool +pPrettyPrint + = lens _pPrettyPrint (\ s a -> s{_pPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pUploadProtocol :: Lens' ProjectsLogsSinksList' (Maybe Text) +pUploadProtocol + = lens _pUploadProtocol + (\ s a -> s{_pUploadProtocol = a}) + +-- | Part of \`logName\`. See documentation of \`projectsId\`. +pLogsId :: Lens' ProjectsLogsSinksList' Text +pLogsId = lens _pLogsId (\ s a -> s{_pLogsId = a}) + +-- | Pretty-print response. +pPp :: Lens' ProjectsLogsSinksList' Bool +pPp = lens _pPp (\ s a -> s{_pPp = a}) + +-- | OAuth access token. +pAccessToken :: Lens' ProjectsLogsSinksList' (Maybe Text) +pAccessToken + = lens _pAccessToken (\ s a -> s{_pAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pUploadType :: Lens' ProjectsLogsSinksList' (Maybe Text) +pUploadType + = lens _pUploadType (\ s a -> s{_pUploadType = a}) + +-- | OAuth bearer token. +pBearerToken :: Lens' ProjectsLogsSinksList' (Maybe Text) +pBearerToken + = lens _pBearerToken (\ s a -> s{_pBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pKey :: Lens' ProjectsLogsSinksList' (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | OAuth 2.0 token for the current user. +pOauthToken :: Lens' ProjectsLogsSinksList' (Maybe Text) +pOauthToken + = lens _pOauthToken (\ s a -> s{_pOauthToken = a}) + +-- | Part of \`logName\`. The log whose sinks are wanted. For example, +-- \`\"compute.google.com\/syslog\"\`. +pProjectsId :: Lens' ProjectsLogsSinksList' Text +pProjectsId + = lens _pProjectsId (\ s a -> s{_pProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +pFields :: Lens' ProjectsLogsSinksList' (Maybe Text) +pFields = lens _pFields (\ s a -> s{_pFields = a}) + +-- | JSONP +pCallback :: Lens' ProjectsLogsSinksList' (Maybe Text) +pCallback + = lens _pCallback (\ s a -> s{_pCallback = a}) + +-- | Data format for response. +pAlt :: Lens' ProjectsLogsSinksList' Text +pAlt = lens _pAlt (\ s a -> s{_pAlt = a}) + +instance GoogleRequest ProjectsLogsSinksList' where + type Rs ProjectsLogsSinksList' = ListLogSinksResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsSinksList{..} + = go _pXgafv _pQuotaUser _pPrettyPrint + _pUploadProtocol + _pLogsId + _pPp + _pAccessToken + _pUploadType + _pBearerToken + _pKey + _pOauthToken + _pProjectsId + _pFields + _pCallback + _pAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsSinksListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Update.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Update.hs new file mode 100644 index 000000000..41bcdc7f7 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Sinks/Update.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Logs.Sinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a log sink. If the sink does not exist, it is created. +-- +-- /See:/ for @LoggingProjectsLogsSinksUpdate@. +module Logging.Projects.Logs.Sinks.Update + ( + -- * REST Resource + ProjectsLogsSinksUpdateAPI + + -- * Creating a Request + , projectsLogsSinksUpdate + , ProjectsLogsSinksUpdate + + -- * Request Lenses + , plsuXgafv + , plsuQuotaUser + , plsuPrettyPrint + , plsuUploadProtocol + , plsuLogsId + , plsuPp + , plsuAccessToken + , plsuUploadType + , plsuBearerToken + , plsuKey + , plsuOauthToken + , plsuProjectsId + , plsuSinksId + , plsuFields + , plsuCallback + , plsuAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsLogsSinksUpdate@ which the +-- 'ProjectsLogsSinksUpdate' request conforms to. +type ProjectsLogsSinksUpdateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "logs" :> + Capture "logsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Put '[JSON] LogSink + +-- | Updates a log sink. If the sink does not exist, it is created. +-- +-- /See:/ 'projectsLogsSinksUpdate' smart constructor. +data ProjectsLogsSinksUpdate = ProjectsLogsSinksUpdate + { _plsuXgafv :: !(Maybe Text) + , _plsuQuotaUser :: !(Maybe Text) + , _plsuPrettyPrint :: !Bool + , _plsuUploadProtocol :: !(Maybe Text) + , _plsuLogsId :: !Text + , _plsuPp :: !Bool + , _plsuAccessToken :: !(Maybe Text) + , _plsuUploadType :: !(Maybe Text) + , _plsuBearerToken :: !(Maybe Text) + , _plsuKey :: !(Maybe Text) + , _plsuOauthToken :: !(Maybe Text) + , _plsuProjectsId :: !Text + , _plsuSinksId :: !Text + , _plsuFields :: !(Maybe Text) + , _plsuCallback :: !(Maybe Text) + , _plsuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsLogsSinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plsuXgafv' +-- +-- * 'plsuQuotaUser' +-- +-- * 'plsuPrettyPrint' +-- +-- * 'plsuUploadProtocol' +-- +-- * 'plsuLogsId' +-- +-- * 'plsuPp' +-- +-- * 'plsuAccessToken' +-- +-- * 'plsuUploadType' +-- +-- * 'plsuBearerToken' +-- +-- * 'plsuKey' +-- +-- * 'plsuOauthToken' +-- +-- * 'plsuProjectsId' +-- +-- * 'plsuSinksId' +-- +-- * 'plsuFields' +-- +-- * 'plsuCallback' +-- +-- * 'plsuAlt' +projectsLogsSinksUpdate + :: Text -- ^ 'logsId' + -> Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsLogsSinksUpdate +projectsLogsSinksUpdate pPlsuLogsId_ pPlsuProjectsId_ pPlsuSinksId_ = + ProjectsLogsSinksUpdate + { _plsuXgafv = Nothing + , _plsuQuotaUser = Nothing + , _plsuPrettyPrint = True + , _plsuUploadProtocol = Nothing + , _plsuLogsId = pPlsuLogsId_ + , _plsuPp = True + , _plsuAccessToken = Nothing + , _plsuUploadType = Nothing + , _plsuBearerToken = Nothing + , _plsuKey = Nothing + , _plsuOauthToken = Nothing + , _plsuProjectsId = pPlsuProjectsId_ + , _plsuSinksId = pPlsuSinksId_ + , _plsuFields = Nothing + , _plsuCallback = Nothing + , _plsuAlt = "json" + } + +-- | V1 error format. +plsuXgafv :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuXgafv + = lens _plsuXgafv (\ s a -> s{_plsuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plsuQuotaUser :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuQuotaUser + = lens _plsuQuotaUser + (\ s a -> s{_plsuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plsuPrettyPrint :: Lens' ProjectsLogsSinksUpdate' Bool +plsuPrettyPrint + = lens _plsuPrettyPrint + (\ s a -> s{_plsuPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plsuUploadProtocol :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuUploadProtocol + = lens _plsuUploadProtocol + (\ s a -> s{_plsuUploadProtocol = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsuLogsId :: Lens' ProjectsLogsSinksUpdate' Text +plsuLogsId + = lens _plsuLogsId (\ s a -> s{_plsuLogsId = a}) + +-- | Pretty-print response. +plsuPp :: Lens' ProjectsLogsSinksUpdate' Bool +plsuPp = lens _plsuPp (\ s a -> s{_plsuPp = a}) + +-- | OAuth access token. +plsuAccessToken :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuAccessToken + = lens _plsuAccessToken + (\ s a -> s{_plsuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plsuUploadType :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuUploadType + = lens _plsuUploadType + (\ s a -> s{_plsuUploadType = a}) + +-- | OAuth bearer token. +plsuBearerToken :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuBearerToken + = lens _plsuBearerToken + (\ s a -> s{_plsuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plsuKey :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuKey = lens _plsuKey (\ s a -> s{_plsuKey = a}) + +-- | OAuth 2.0 token for the current user. +plsuOauthToken :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuOauthToken + = lens _plsuOauthToken + (\ s a -> s{_plsuOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the sink to update. +plsuProjectsId :: Lens' ProjectsLogsSinksUpdate' Text +plsuProjectsId + = lens _plsuProjectsId + (\ s a -> s{_plsuProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +plsuSinksId :: Lens' ProjectsLogsSinksUpdate' Text +plsuSinksId + = lens _plsuSinksId (\ s a -> s{_plsuSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +plsuFields :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuFields + = lens _plsuFields (\ s a -> s{_plsuFields = a}) + +-- | JSONP +plsuCallback :: Lens' ProjectsLogsSinksUpdate' (Maybe Text) +plsuCallback + = lens _plsuCallback (\ s a -> s{_plsuCallback = a}) + +-- | Data format for response. +plsuAlt :: Lens' ProjectsLogsSinksUpdate' Text +plsuAlt = lens _plsuAlt (\ s a -> s{_plsuAlt = a}) + +instance GoogleRequest ProjectsLogsSinksUpdate' where + type Rs ProjectsLogsSinksUpdate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsLogsSinksUpdate{..} + = go _plsuXgafv _plsuQuotaUser _plsuPrettyPrint + _plsuUploadProtocol + _plsuLogsId + _plsuPp + _plsuAccessToken + _plsuUploadType + _plsuBearerToken + _plsuKey + _plsuOauthToken + _plsuProjectsId + _plsuSinksId + _plsuFields + _plsuCallback + _plsuAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsLogsSinksUpdateAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs new file mode 100644 index 000000000..e378cac32 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs @@ -0,0 +1,231 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Sinks.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a project sink. A logs filter determines which log entries are +-- written to the destination. +-- +-- /See:/ for @LoggingProjectsSinksCreate@. +module Logging.Projects.Sinks.Create + ( + -- * REST Resource + ProjectsSinksCreateAPI + + -- * Creating a Request + , projectsSinksCreate + , ProjectsSinksCreate + + -- * Request Lenses + , pscXgafv + , pscQuotaUser + , pscPrettyPrint + , pscUploadProtocol + , pscPp + , pscAccessToken + , pscUploadType + , pscBearerToken + , pscKey + , pscOauthToken + , pscProjectsId + , pscFields + , pscCallback + , pscAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsSinksCreate@ which the +-- 'ProjectsSinksCreate' request conforms to. +type ProjectsSinksCreateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "sinks" :> Post '[JSON] LogSink + +-- | Creates a project sink. A logs filter determines which log entries are +-- written to the destination. +-- +-- /See:/ 'projectsSinksCreate' smart constructor. +data ProjectsSinksCreate = ProjectsSinksCreate + { _pscXgafv :: !(Maybe Text) + , _pscQuotaUser :: !(Maybe Text) + , _pscPrettyPrint :: !Bool + , _pscUploadProtocol :: !(Maybe Text) + , _pscPp :: !Bool + , _pscAccessToken :: !(Maybe Text) + , _pscUploadType :: !(Maybe Text) + , _pscBearerToken :: !(Maybe Text) + , _pscKey :: !(Maybe Text) + , _pscOauthToken :: !(Maybe Text) + , _pscProjectsId :: !Text + , _pscFields :: !(Maybe Text) + , _pscCallback :: !(Maybe Text) + , _pscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSinksCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pscXgafv' +-- +-- * 'pscQuotaUser' +-- +-- * 'pscPrettyPrint' +-- +-- * 'pscUploadProtocol' +-- +-- * 'pscPp' +-- +-- * 'pscAccessToken' +-- +-- * 'pscUploadType' +-- +-- * 'pscBearerToken' +-- +-- * 'pscKey' +-- +-- * 'pscOauthToken' +-- +-- * 'pscProjectsId' +-- +-- * 'pscFields' +-- +-- * 'pscCallback' +-- +-- * 'pscAlt' +projectsSinksCreate + :: Text -- ^ 'projectsId' + -> ProjectsSinksCreate +projectsSinksCreate pPscProjectsId_ = + ProjectsSinksCreate + { _pscXgafv = Nothing + , _pscQuotaUser = Nothing + , _pscPrettyPrint = True + , _pscUploadProtocol = Nothing + , _pscPp = True + , _pscAccessToken = Nothing + , _pscUploadType = Nothing + , _pscBearerToken = Nothing + , _pscKey = Nothing + , _pscOauthToken = Nothing + , _pscProjectsId = pPscProjectsId_ + , _pscFields = Nothing + , _pscCallback = Nothing + , _pscAlt = "json" + } + +-- | V1 error format. +pscXgafv :: Lens' ProjectsSinksCreate' (Maybe Text) +pscXgafv = lens _pscXgafv (\ s a -> s{_pscXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pscQuotaUser :: Lens' ProjectsSinksCreate' (Maybe Text) +pscQuotaUser + = lens _pscQuotaUser (\ s a -> s{_pscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pscPrettyPrint :: Lens' ProjectsSinksCreate' Bool +pscPrettyPrint + = lens _pscPrettyPrint + (\ s a -> s{_pscPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pscUploadProtocol :: Lens' ProjectsSinksCreate' (Maybe Text) +pscUploadProtocol + = lens _pscUploadProtocol + (\ s a -> s{_pscUploadProtocol = a}) + +-- | Pretty-print response. +pscPp :: Lens' ProjectsSinksCreate' Bool +pscPp = lens _pscPp (\ s a -> s{_pscPp = a}) + +-- | OAuth access token. +pscAccessToken :: Lens' ProjectsSinksCreate' (Maybe Text) +pscAccessToken + = lens _pscAccessToken + (\ s a -> s{_pscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pscUploadType :: Lens' ProjectsSinksCreate' (Maybe Text) +pscUploadType + = lens _pscUploadType + (\ s a -> s{_pscUploadType = a}) + +-- | OAuth bearer token. +pscBearerToken :: Lens' ProjectsSinksCreate' (Maybe Text) +pscBearerToken + = lens _pscBearerToken + (\ s a -> s{_pscBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pscKey :: Lens' ProjectsSinksCreate' (Maybe Text) +pscKey = lens _pscKey (\ s a -> s{_pscKey = a}) + +-- | OAuth 2.0 token for the current user. +pscOauthToken :: Lens' ProjectsSinksCreate' (Maybe Text) +pscOauthToken + = lens _pscOauthToken + (\ s a -> s{_pscOauthToken = a}) + +-- | Part of \`projectName\`. The resource name of the project to which the +-- sink is bound. +pscProjectsId :: Lens' ProjectsSinksCreate' Text +pscProjectsId + = lens _pscProjectsId + (\ s a -> s{_pscProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +pscFields :: Lens' ProjectsSinksCreate' (Maybe Text) +pscFields + = lens _pscFields (\ s a -> s{_pscFields = a}) + +-- | JSONP +pscCallback :: Lens' ProjectsSinksCreate' (Maybe Text) +pscCallback + = lens _pscCallback (\ s a -> s{_pscCallback = a}) + +-- | Data format for response. +pscAlt :: Lens' ProjectsSinksCreate' Text +pscAlt = lens _pscAlt (\ s a -> s{_pscAlt = a}) + +instance GoogleRequest ProjectsSinksCreate' where + type Rs ProjectsSinksCreate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsSinksCreate{..} + = go _pscXgafv _pscQuotaUser _pscPrettyPrint + _pscUploadProtocol + _pscPp + _pscAccessToken + _pscUploadType + _pscBearerToken + _pscKey + _pscOauthToken + _pscProjectsId + _pscFields + _pscCallback + _pscAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSinksCreateAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs new file mode 100644 index 000000000..79ef9aed3 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Sinks.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a project sink. After deletion, no new log entries are written +-- to the destination. +-- +-- /See:/ for @LoggingProjectsSinksDelete@. +module Logging.Projects.Sinks.Delete + ( + -- * REST Resource + ProjectsSinksDeleteAPI + + -- * Creating a Request + , projectsSinksDelete + , ProjectsSinksDelete + + -- * Request Lenses + , psdXgafv + , psdQuotaUser + , psdPrettyPrint + , psdUploadProtocol + , psdPp + , psdAccessToken + , psdUploadType + , psdBearerToken + , psdKey + , psdOauthToken + , psdProjectsId + , psdSinksId + , psdFields + , psdCallback + , psdAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsSinksDelete@ which the +-- 'ProjectsSinksDelete' request conforms to. +type ProjectsSinksDeleteAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Delete '[JSON] Empty + +-- | Deletes a project sink. After deletion, no new log entries are written +-- to the destination. +-- +-- /See:/ 'projectsSinksDelete' smart constructor. +data ProjectsSinksDelete = ProjectsSinksDelete + { _psdXgafv :: !(Maybe Text) + , _psdQuotaUser :: !(Maybe Text) + , _psdPrettyPrint :: !Bool + , _psdUploadProtocol :: !(Maybe Text) + , _psdPp :: !Bool + , _psdAccessToken :: !(Maybe Text) + , _psdUploadType :: !(Maybe Text) + , _psdBearerToken :: !(Maybe Text) + , _psdKey :: !(Maybe Text) + , _psdOauthToken :: !(Maybe Text) + , _psdProjectsId :: !Text + , _psdSinksId :: !Text + , _psdFields :: !(Maybe Text) + , _psdCallback :: !(Maybe Text) + , _psdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSinksDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psdXgafv' +-- +-- * 'psdQuotaUser' +-- +-- * 'psdPrettyPrint' +-- +-- * 'psdUploadProtocol' +-- +-- * 'psdPp' +-- +-- * 'psdAccessToken' +-- +-- * 'psdUploadType' +-- +-- * 'psdBearerToken' +-- +-- * 'psdKey' +-- +-- * 'psdOauthToken' +-- +-- * 'psdProjectsId' +-- +-- * 'psdSinksId' +-- +-- * 'psdFields' +-- +-- * 'psdCallback' +-- +-- * 'psdAlt' +projectsSinksDelete + :: Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsSinksDelete +projectsSinksDelete pPsdProjectsId_ pPsdSinksId_ = + ProjectsSinksDelete + { _psdXgafv = Nothing + , _psdQuotaUser = Nothing + , _psdPrettyPrint = True + , _psdUploadProtocol = Nothing + , _psdPp = True + , _psdAccessToken = Nothing + , _psdUploadType = Nothing + , _psdBearerToken = Nothing + , _psdKey = Nothing + , _psdOauthToken = Nothing + , _psdProjectsId = pPsdProjectsId_ + , _psdSinksId = pPsdSinksId_ + , _psdFields = Nothing + , _psdCallback = Nothing + , _psdAlt = "json" + } + +-- | V1 error format. +psdXgafv :: Lens' ProjectsSinksDelete' (Maybe Text) +psdXgafv = lens _psdXgafv (\ s a -> s{_psdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psdQuotaUser :: Lens' ProjectsSinksDelete' (Maybe Text) +psdQuotaUser + = lens _psdQuotaUser (\ s a -> s{_psdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psdPrettyPrint :: Lens' ProjectsSinksDelete' Bool +psdPrettyPrint + = lens _psdPrettyPrint + (\ s a -> s{_psdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psdUploadProtocol :: Lens' ProjectsSinksDelete' (Maybe Text) +psdUploadProtocol + = lens _psdUploadProtocol + (\ s a -> s{_psdUploadProtocol = a}) + +-- | Pretty-print response. +psdPp :: Lens' ProjectsSinksDelete' Bool +psdPp = lens _psdPp (\ s a -> s{_psdPp = a}) + +-- | OAuth access token. +psdAccessToken :: Lens' ProjectsSinksDelete' (Maybe Text) +psdAccessToken + = lens _psdAccessToken + (\ s a -> s{_psdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psdUploadType :: Lens' ProjectsSinksDelete' (Maybe Text) +psdUploadType + = lens _psdUploadType + (\ s a -> s{_psdUploadType = a}) + +-- | OAuth bearer token. +psdBearerToken :: Lens' ProjectsSinksDelete' (Maybe Text) +psdBearerToken + = lens _psdBearerToken + (\ s a -> s{_psdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psdKey :: Lens' ProjectsSinksDelete' (Maybe Text) +psdKey = lens _psdKey (\ s a -> s{_psdKey = a}) + +-- | OAuth 2.0 token for the current user. +psdOauthToken :: Lens' ProjectsSinksDelete' (Maybe Text) +psdOauthToken + = lens _psdOauthToken + (\ s a -> s{_psdOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the project sink to delete. +psdProjectsId :: Lens' ProjectsSinksDelete' Text +psdProjectsId + = lens _psdProjectsId + (\ s a -> s{_psdProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +psdSinksId :: Lens' ProjectsSinksDelete' Text +psdSinksId + = lens _psdSinksId (\ s a -> s{_psdSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +psdFields :: Lens' ProjectsSinksDelete' (Maybe Text) +psdFields + = lens _psdFields (\ s a -> s{_psdFields = a}) + +-- | JSONP +psdCallback :: Lens' ProjectsSinksDelete' (Maybe Text) +psdCallback + = lens _psdCallback (\ s a -> s{_psdCallback = a}) + +-- | Data format for response. +psdAlt :: Lens' ProjectsSinksDelete' Text +psdAlt = lens _psdAlt (\ s a -> s{_psdAlt = a}) + +instance GoogleRequest ProjectsSinksDelete' where + type Rs ProjectsSinksDelete' = Empty + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsSinksDelete{..} + = go _psdXgafv _psdQuotaUser _psdPrettyPrint + _psdUploadProtocol + _psdPp + _psdAccessToken + _psdUploadType + _psdBearerToken + _psdKey + _psdOauthToken + _psdProjectsId + _psdSinksId + _psdFields + _psdCallback + _psdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSinksDeleteAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs new file mode 100644 index 000000000..178211b22 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs @@ -0,0 +1,241 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Sinks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a project sink. +-- +-- /See:/ for @LoggingProjectsSinksGet@. +module Logging.Projects.Sinks.Get + ( + -- * REST Resource + ProjectsSinksGetAPI + + -- * Creating a Request + , projectsSinksGet + , ProjectsSinksGet + + -- * Request Lenses + , psgXgafv + , psgQuotaUser + , psgPrettyPrint + , psgUploadProtocol + , psgPp + , psgAccessToken + , psgUploadType + , psgBearerToken + , psgKey + , psgOauthToken + , psgProjectsId + , psgSinksId + , psgFields + , psgCallback + , psgAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsSinksGet@ which the +-- 'ProjectsSinksGet' request conforms to. +type ProjectsSinksGetAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Get '[JSON] LogSink + +-- | Gets a project sink. +-- +-- /See:/ 'projectsSinksGet' smart constructor. +data ProjectsSinksGet = ProjectsSinksGet + { _psgXgafv :: !(Maybe Text) + , _psgQuotaUser :: !(Maybe Text) + , _psgPrettyPrint :: !Bool + , _psgUploadProtocol :: !(Maybe Text) + , _psgPp :: !Bool + , _psgAccessToken :: !(Maybe Text) + , _psgUploadType :: !(Maybe Text) + , _psgBearerToken :: !(Maybe Text) + , _psgKey :: !(Maybe Text) + , _psgOauthToken :: !(Maybe Text) + , _psgProjectsId :: !Text + , _psgSinksId :: !Text + , _psgFields :: !(Maybe Text) + , _psgCallback :: !(Maybe Text) + , _psgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSinksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgXgafv' +-- +-- * 'psgQuotaUser' +-- +-- * 'psgPrettyPrint' +-- +-- * 'psgUploadProtocol' +-- +-- * 'psgPp' +-- +-- * 'psgAccessToken' +-- +-- * 'psgUploadType' +-- +-- * 'psgBearerToken' +-- +-- * 'psgKey' +-- +-- * 'psgOauthToken' +-- +-- * 'psgProjectsId' +-- +-- * 'psgSinksId' +-- +-- * 'psgFields' +-- +-- * 'psgCallback' +-- +-- * 'psgAlt' +projectsSinksGet + :: Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsSinksGet +projectsSinksGet pPsgProjectsId_ pPsgSinksId_ = + ProjectsSinksGet + { _psgXgafv = Nothing + , _psgQuotaUser = Nothing + , _psgPrettyPrint = True + , _psgUploadProtocol = Nothing + , _psgPp = True + , _psgAccessToken = Nothing + , _psgUploadType = Nothing + , _psgBearerToken = Nothing + , _psgKey = Nothing + , _psgOauthToken = Nothing + , _psgProjectsId = pPsgProjectsId_ + , _psgSinksId = pPsgSinksId_ + , _psgFields = Nothing + , _psgCallback = Nothing + , _psgAlt = "json" + } + +-- | V1 error format. +psgXgafv :: Lens' ProjectsSinksGet' (Maybe Text) +psgXgafv = lens _psgXgafv (\ s a -> s{_psgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psgQuotaUser :: Lens' ProjectsSinksGet' (Maybe Text) +psgQuotaUser + = lens _psgQuotaUser (\ s a -> s{_psgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psgPrettyPrint :: Lens' ProjectsSinksGet' Bool +psgPrettyPrint + = lens _psgPrettyPrint + (\ s a -> s{_psgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psgUploadProtocol :: Lens' ProjectsSinksGet' (Maybe Text) +psgUploadProtocol + = lens _psgUploadProtocol + (\ s a -> s{_psgUploadProtocol = a}) + +-- | Pretty-print response. +psgPp :: Lens' ProjectsSinksGet' Bool +psgPp = lens _psgPp (\ s a -> s{_psgPp = a}) + +-- | OAuth access token. +psgAccessToken :: Lens' ProjectsSinksGet' (Maybe Text) +psgAccessToken + = lens _psgAccessToken + (\ s a -> s{_psgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psgUploadType :: Lens' ProjectsSinksGet' (Maybe Text) +psgUploadType + = lens _psgUploadType + (\ s a -> s{_psgUploadType = a}) + +-- | OAuth bearer token. +psgBearerToken :: Lens' ProjectsSinksGet' (Maybe Text) +psgBearerToken + = lens _psgBearerToken + (\ s a -> s{_psgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psgKey :: Lens' ProjectsSinksGet' (Maybe Text) +psgKey = lens _psgKey (\ s a -> s{_psgKey = a}) + +-- | OAuth 2.0 token for the current user. +psgOauthToken :: Lens' ProjectsSinksGet' (Maybe Text) +psgOauthToken + = lens _psgOauthToken + (\ s a -> s{_psgOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the project sink to return. +psgProjectsId :: Lens' ProjectsSinksGet' Text +psgProjectsId + = lens _psgProjectsId + (\ s a -> s{_psgProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +psgSinksId :: Lens' ProjectsSinksGet' Text +psgSinksId + = lens _psgSinksId (\ s a -> s{_psgSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +psgFields :: Lens' ProjectsSinksGet' (Maybe Text) +psgFields + = lens _psgFields (\ s a -> s{_psgFields = a}) + +-- | JSONP +psgCallback :: Lens' ProjectsSinksGet' (Maybe Text) +psgCallback + = lens _psgCallback (\ s a -> s{_psgCallback = a}) + +-- | Data format for response. +psgAlt :: Lens' ProjectsSinksGet' Text +psgAlt = lens _psgAlt (\ s a -> s{_psgAlt = a}) + +instance GoogleRequest ProjectsSinksGet' where + type Rs ProjectsSinksGet' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsSinksGet{..} + = go _psgXgafv _psgQuotaUser _psgPrettyPrint + _psgUploadProtocol + _psgPp + _psgAccessToken + _psgUploadType + _psgBearerToken + _psgKey + _psgOauthToken + _psgProjectsId + _psgSinksId + _psgFields + _psgCallback + _psgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSinksGetAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs new file mode 100644 index 000000000..2e54637c7 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Sinks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists project sinks associated with a project. +-- +-- /See:/ for @LoggingProjectsSinksList@. +module Logging.Projects.Sinks.List + ( + -- * REST Resource + ProjectsSinksListAPI + + -- * Creating a Request + , projectsSinksList + , ProjectsSinksList + + -- * Request Lenses + , pslXgafv + , pslQuotaUser + , pslPrettyPrint + , pslUploadProtocol + , pslPp + , pslAccessToken + , pslUploadType + , pslBearerToken + , pslKey + , pslOauthToken + , pslProjectsId + , pslFields + , pslCallback + , pslAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsSinksList@ which the +-- 'ProjectsSinksList' request conforms to. +type ProjectsSinksListAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "sinks" :> Get '[JSON] ListSinksResponse + +-- | Lists project sinks associated with a project. +-- +-- /See:/ 'projectsSinksList' smart constructor. +data ProjectsSinksList = ProjectsSinksList + { _pslXgafv :: !(Maybe Text) + , _pslQuotaUser :: !(Maybe Text) + , _pslPrettyPrint :: !Bool + , _pslUploadProtocol :: !(Maybe Text) + , _pslPp :: !Bool + , _pslAccessToken :: !(Maybe Text) + , _pslUploadType :: !(Maybe Text) + , _pslBearerToken :: !(Maybe Text) + , _pslKey :: !(Maybe Text) + , _pslOauthToken :: !(Maybe Text) + , _pslProjectsId :: !Text + , _pslFields :: !(Maybe Text) + , _pslCallback :: !(Maybe Text) + , _pslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSinksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslXgafv' +-- +-- * 'pslQuotaUser' +-- +-- * 'pslPrettyPrint' +-- +-- * 'pslUploadProtocol' +-- +-- * 'pslPp' +-- +-- * 'pslAccessToken' +-- +-- * 'pslUploadType' +-- +-- * 'pslBearerToken' +-- +-- * 'pslKey' +-- +-- * 'pslOauthToken' +-- +-- * 'pslProjectsId' +-- +-- * 'pslFields' +-- +-- * 'pslCallback' +-- +-- * 'pslAlt' +projectsSinksList + :: Text -- ^ 'projectsId' + -> ProjectsSinksList +projectsSinksList pPslProjectsId_ = + ProjectsSinksList + { _pslXgafv = Nothing + , _pslQuotaUser = Nothing + , _pslPrettyPrint = True + , _pslUploadProtocol = Nothing + , _pslPp = True + , _pslAccessToken = Nothing + , _pslUploadType = Nothing + , _pslBearerToken = Nothing + , _pslKey = Nothing + , _pslOauthToken = Nothing + , _pslProjectsId = pPslProjectsId_ + , _pslFields = Nothing + , _pslCallback = Nothing + , _pslAlt = "json" + } + +-- | V1 error format. +pslXgafv :: Lens' ProjectsSinksList' (Maybe Text) +pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pslQuotaUser :: Lens' ProjectsSinksList' (Maybe Text) +pslQuotaUser + = lens _pslQuotaUser (\ s a -> s{_pslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pslPrettyPrint :: Lens' ProjectsSinksList' Bool +pslPrettyPrint + = lens _pslPrettyPrint + (\ s a -> s{_pslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pslUploadProtocol :: Lens' ProjectsSinksList' (Maybe Text) +pslUploadProtocol + = lens _pslUploadProtocol + (\ s a -> s{_pslUploadProtocol = a}) + +-- | Pretty-print response. +pslPp :: Lens' ProjectsSinksList' Bool +pslPp = lens _pslPp (\ s a -> s{_pslPp = a}) + +-- | OAuth access token. +pslAccessToken :: Lens' ProjectsSinksList' (Maybe Text) +pslAccessToken + = lens _pslAccessToken + (\ s a -> s{_pslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pslUploadType :: Lens' ProjectsSinksList' (Maybe Text) +pslUploadType + = lens _pslUploadType + (\ s a -> s{_pslUploadType = a}) + +-- | OAuth bearer token. +pslBearerToken :: Lens' ProjectsSinksList' (Maybe Text) +pslBearerToken + = lens _pslBearerToken + (\ s a -> s{_pslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pslKey :: Lens' ProjectsSinksList' (Maybe Text) +pslKey = lens _pslKey (\ s a -> s{_pslKey = a}) + +-- | OAuth 2.0 token for the current user. +pslOauthToken :: Lens' ProjectsSinksList' (Maybe Text) +pslOauthToken + = lens _pslOauthToken + (\ s a -> s{_pslOauthToken = a}) + +-- | Part of \`projectName\`. The project whose sinks are wanted. +pslProjectsId :: Lens' ProjectsSinksList' Text +pslProjectsId + = lens _pslProjectsId + (\ s a -> s{_pslProjectsId = a}) + +-- | Selector specifying which fields to include in a partial response. +pslFields :: Lens' ProjectsSinksList' (Maybe Text) +pslFields + = lens _pslFields (\ s a -> s{_pslFields = a}) + +-- | JSONP +pslCallback :: Lens' ProjectsSinksList' (Maybe Text) +pslCallback + = lens _pslCallback (\ s a -> s{_pslCallback = a}) + +-- | Data format for response. +pslAlt :: Lens' ProjectsSinksList' Text +pslAlt = lens _pslAlt (\ s a -> s{_pslAlt = a}) + +instance GoogleRequest ProjectsSinksList' where + type Rs ProjectsSinksList' = ListSinksResponse + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsSinksList{..} + = go _pslXgafv _pslQuotaUser _pslPrettyPrint + _pslUploadProtocol + _pslPp + _pslAccessToken + _pslUploadType + _pslBearerToken + _pslKey + _pslOauthToken + _pslProjectsId + _pslFields + _pslCallback + _pslAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSinksListAPI) + r + u diff --git a/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs new file mode 100644 index 000000000..420bd66d8 --- /dev/null +++ b/gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Logging.Projects.Sinks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a project sink. If the sink does not exist, it is created. The +-- destination, filter, or both may be updated. +-- +-- /See:/ for @LoggingProjectsSinksUpdate@. +module Logging.Projects.Sinks.Update + ( + -- * REST Resource + ProjectsSinksUpdateAPI + + -- * Creating a Request + , projectsSinksUpdate + , ProjectsSinksUpdate + + -- * Request Lenses + , psuXgafv + , psuQuotaUser + , psuPrettyPrint + , psuUploadProtocol + , psuPp + , psuAccessToken + , psuUploadType + , psuBearerToken + , psuKey + , psuOauthToken + , psuProjectsId + , psuSinksId + , psuFields + , psuCallback + , psuAlt + ) where + +import Network.Google.Logging.Types +import Network.Google.Prelude + +-- | A resource alias for @LoggingProjectsSinksUpdate@ which the +-- 'ProjectsSinksUpdate' request conforms to. +type ProjectsSinksUpdateAPI = + "v1beta3" :> + "projects" :> + Capture "projectsId" Text :> + "sinks" :> + Capture "sinksId" Text :> Put '[JSON] LogSink + +-- | Updates a project sink. If the sink does not exist, it is created. The +-- destination, filter, or both may be updated. +-- +-- /See:/ 'projectsSinksUpdate' smart constructor. +data ProjectsSinksUpdate = ProjectsSinksUpdate + { _psuXgafv :: !(Maybe Text) + , _psuQuotaUser :: !(Maybe Text) + , _psuPrettyPrint :: !Bool + , _psuUploadProtocol :: !(Maybe Text) + , _psuPp :: !Bool + , _psuAccessToken :: !(Maybe Text) + , _psuUploadType :: !(Maybe Text) + , _psuBearerToken :: !(Maybe Text) + , _psuKey :: !(Maybe Text) + , _psuOauthToken :: !(Maybe Text) + , _psuProjectsId :: !Text + , _psuSinksId :: !Text + , _psuFields :: !(Maybe Text) + , _psuCallback :: !(Maybe Text) + , _psuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSinksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psuXgafv' +-- +-- * 'psuQuotaUser' +-- +-- * 'psuPrettyPrint' +-- +-- * 'psuUploadProtocol' +-- +-- * 'psuPp' +-- +-- * 'psuAccessToken' +-- +-- * 'psuUploadType' +-- +-- * 'psuBearerToken' +-- +-- * 'psuKey' +-- +-- * 'psuOauthToken' +-- +-- * 'psuProjectsId' +-- +-- * 'psuSinksId' +-- +-- * 'psuFields' +-- +-- * 'psuCallback' +-- +-- * 'psuAlt' +projectsSinksUpdate + :: Text -- ^ 'projectsId' + -> Text -- ^ 'sinksId' + -> ProjectsSinksUpdate +projectsSinksUpdate pPsuProjectsId_ pPsuSinksId_ = + ProjectsSinksUpdate + { _psuXgafv = Nothing + , _psuQuotaUser = Nothing + , _psuPrettyPrint = True + , _psuUploadProtocol = Nothing + , _psuPp = True + , _psuAccessToken = Nothing + , _psuUploadType = Nothing + , _psuBearerToken = Nothing + , _psuKey = Nothing + , _psuOauthToken = Nothing + , _psuProjectsId = pPsuProjectsId_ + , _psuSinksId = pPsuSinksId_ + , _psuFields = Nothing + , _psuCallback = Nothing + , _psuAlt = "json" + } + +-- | V1 error format. +psuXgafv :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuXgafv = lens _psuXgafv (\ s a -> s{_psuXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psuQuotaUser :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuQuotaUser + = lens _psuQuotaUser (\ s a -> s{_psuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psuPrettyPrint :: Lens' ProjectsSinksUpdate' Bool +psuPrettyPrint + = lens _psuPrettyPrint + (\ s a -> s{_psuPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psuUploadProtocol :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuUploadProtocol + = lens _psuUploadProtocol + (\ s a -> s{_psuUploadProtocol = a}) + +-- | Pretty-print response. +psuPp :: Lens' ProjectsSinksUpdate' Bool +psuPp = lens _psuPp (\ s a -> s{_psuPp = a}) + +-- | OAuth access token. +psuAccessToken :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuAccessToken + = lens _psuAccessToken + (\ s a -> s{_psuAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psuUploadType :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuUploadType + = lens _psuUploadType + (\ s a -> s{_psuUploadType = a}) + +-- | OAuth bearer token. +psuBearerToken :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuBearerToken + = lens _psuBearerToken + (\ s a -> s{_psuBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psuKey :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuKey = lens _psuKey (\ s a -> s{_psuKey = a}) + +-- | OAuth 2.0 token for the current user. +psuOauthToken :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuOauthToken + = lens _psuOauthToken + (\ s a -> s{_psuOauthToken = a}) + +-- | Part of \`sinkName\`. The resource name of the project sink to update. +psuProjectsId :: Lens' ProjectsSinksUpdate' Text +psuProjectsId + = lens _psuProjectsId + (\ s a -> s{_psuProjectsId = a}) + +-- | Part of \`sinkName\`. See documentation of \`projectsId\`. +psuSinksId :: Lens' ProjectsSinksUpdate' Text +psuSinksId + = lens _psuSinksId (\ s a -> s{_psuSinksId = a}) + +-- | Selector specifying which fields to include in a partial response. +psuFields :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuFields + = lens _psuFields (\ s a -> s{_psuFields = a}) + +-- | JSONP +psuCallback :: Lens' ProjectsSinksUpdate' (Maybe Text) +psuCallback + = lens _psuCallback (\ s a -> s{_psuCallback = a}) + +-- | Data format for response. +psuAlt :: Lens' ProjectsSinksUpdate' Text +psuAlt = lens _psuAlt (\ s a -> s{_psuAlt = a}) + +instance GoogleRequest ProjectsSinksUpdate' where + type Rs ProjectsSinksUpdate' = LogSink + request = requestWithRoute defReq loggingURL + requestWithRoute r u ProjectsSinksUpdate{..} + = go _psuXgafv _psuQuotaUser _psuPrettyPrint + _psuUploadProtocol + _psuPp + _psuAccessToken + _psuUploadType + _psuBearerToken + _psuKey + _psuOauthToken + _psuProjectsId + _psuSinksId + _psuFields + _psuCallback + _psuAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSinksUpdateAPI) + r + u diff --git a/gogol-logging/gogol-logging.cabal b/gogol-logging/gogol-logging.cabal new file mode 100644 index 000000000..fcf5a626d --- /dev/null +++ b/gogol-logging/gogol-logging.cabal @@ -0,0 +1,63 @@ +name: gogol-logging +version: 0.0.1 +synopsis: Google Cloud Logging API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Google Cloud Logging API lets you create logs, ingest log entries, and + manage log sinks. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Logging + , Network.Google.Logging.Types + , Network.Google.Resource.Logging.Projects.LogServices.Indexes.List + , Network.Google.Resource.Logging.Projects.LogServices.List + , Network.Google.Resource.Logging.Projects.LogServices.Sinks.Create + , Network.Google.Resource.Logging.Projects.LogServices.Sinks.Delete + , Network.Google.Resource.Logging.Projects.LogServices.Sinks.Get + , Network.Google.Resource.Logging.Projects.LogServices.Sinks.List + , Network.Google.Resource.Logging.Projects.LogServices.Sinks.Update + , Network.Google.Resource.Logging.Projects.Logs.Delete + , Network.Google.Resource.Logging.Projects.Logs.Entries.Write + , Network.Google.Resource.Logging.Projects.Logs.List + , Network.Google.Resource.Logging.Projects.Logs.Sinks.Create + , Network.Google.Resource.Logging.Projects.Logs.Sinks.Delete + , Network.Google.Resource.Logging.Projects.Logs.Sinks.Get + , Network.Google.Resource.Logging.Projects.Logs.Sinks.List + , Network.Google.Resource.Logging.Projects.Logs.Sinks.Update + , Network.Google.Resource.Logging.Projects.Sinks.Create + , Network.Google.Resource.Logging.Projects.Sinks.Delete + , Network.Google.Resource.Logging.Projects.Sinks.Get + , Network.Google.Resource.Logging.Projects.Sinks.List + , Network.Google.Resource.Logging.Projects.Sinks.Update + + other-modules: + Network.Google.Logging.Types.Product + , Network.Google.Logging.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-logging/src/.gitkeep b/gogol-logging/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-maps-coordinate/LICENSE b/gogol-maps-coordinate/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-maps-coordinate/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-maps-coordinate/Makefile b/gogol-maps-coordinate/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-maps-coordinate/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-maps-coordinate/README.md b/gogol-maps-coordinate/README.md new file mode 100644 index 000000000..f4f9fb53e --- /dev/null +++ b/gogol-maps-coordinate/README.md @@ -0,0 +1,28 @@ +# gogol-maps-coordinate + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Maps Coordinate API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-maps-coordinate` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-maps-coordinate/Setup.hs b/gogol-maps-coordinate/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-maps-coordinate/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate.hs b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate.hs new file mode 100644 index 000000000..df4129140 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate.hs @@ -0,0 +1,231 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.MapsCoordinate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you view and manage jobs in a Coordinate team. +-- +-- /See:/ +module Network.Google.MapsCoordinate + ( + -- * API + MapsCoordinateAPI + , mapsCoordinateAPI + , mapsCoordinateURL + + -- * Service Methods + + -- * REST Resources + + -- ** CoordinateCustomFieldDefList + , module Coordinate.CustomFieldDef.List + + -- ** CoordinateJobsGet + , module Coordinate.Jobs.Get + + -- ** CoordinateJobsInsert + , module Coordinate.Jobs.Insert + + -- ** CoordinateJobsList + , module Coordinate.Jobs.List + + -- ** CoordinateJobsPatch + , module Coordinate.Jobs.Patch + + -- ** CoordinateJobsUpdate + , module Coordinate.Jobs.Update + + -- ** CoordinateLocationList + , module Coordinate.Location.List + + -- ** CoordinateScheduleGet + , module Coordinate.Schedule.Get + + -- ** CoordinateSchedulePatch + , module Coordinate.Schedule.Patch + + -- ** CoordinateScheduleUpdate + , module Coordinate.Schedule.Update + + -- ** CoordinateTeamList + , module Coordinate.Team.List + + -- ** CoordinateWorkerList + , module Coordinate.Worker.List + + -- * Types + + -- ** LocationListResponse + , LocationListResponse + , locationListResponse + , llrTokenPagination + , llrNextPageToken + , llrKind + , llrItems + + -- ** WorkerListResponse + , WorkerListResponse + , workerListResponse + , wlrKind + , wlrItems + + -- ** TokenPagination + , TokenPagination + , tokenPagination + , tpNextPageToken + , tpKind + , tpPreviousPageToken + + -- ** Location + , Location + , location + , lAddressLine + , lKind + , lLat + , lLng + + -- ** Schedule + , Schedule + , schedule + , sAllDay + , sStartTime + , sKind + , sEndTime + , sDuration + + -- ** JobState + , JobState + , jobState + , jsLocation + , jsProgress + , jsNote + , jsKind + , jsCustomerPhoneNumber + , jsCustomerName + , jsAssignee + , jsCustomFields + , jsTitle + + -- ** CustomFieldDef + , CustomFieldDef + , customFieldDef + , cfdEnabled + , cfdKind + , cfdName + , cfdRequiredForCheckout + , cfdId + , cfdEnumitems + , cfdType + + -- ** JobListResponse + , JobListResponse + , jobListResponse + , jlrNextPageToken + , jlrKind + , jlrItems + + -- ** JobChange + , JobChange + , jobChange + , jcState + , jcKind + , jcTimestamp + + -- ** TeamListResponse + , TeamListResponse + , teamListResponse + , tlrKind + , tlrItems + + -- ** CustomFieldDefListResponse + , CustomFieldDefListResponse + , customFieldDefListResponse + , cfdlrKind + , cfdlrItems + + -- ** Job + , Job + , job + , jobState + , jobKind + , jobJobChange + , jobId + + -- ** CustomFields + , CustomFields + , customFields + , cfKind + , cfCustomField + + -- ** Team + , Team + , team + , tKind + , tName + , tId + + -- ** LocationRecord + , LocationRecord + , locationRecord + , lrKind + , lrLatitude + , lrConfidenceRadius + , lrLongitude + , lrCollectionTime + + -- ** Worker + , Worker + , worker + , wKind + , wId + + -- ** CustomField + , CustomField + , customField + , cCustomFieldId + , cKind + , cValue + + -- ** EnumItemDef + , EnumItemDef + , enumItemDef + , eidKind + , eidValue + , eidActive + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude +import Network.Google.Resource.Coordinate.CustomFieldDef.List +import Network.Google.Resource.Coordinate.Jobs.Get +import Network.Google.Resource.Coordinate.Jobs.Insert +import Network.Google.Resource.Coordinate.Jobs.List +import Network.Google.Resource.Coordinate.Jobs.Patch +import Network.Google.Resource.Coordinate.Jobs.Update +import Network.Google.Resource.Coordinate.Location.List +import Network.Google.Resource.Coordinate.Schedule.Get +import Network.Google.Resource.Coordinate.Schedule.Patch +import Network.Google.Resource.Coordinate.Schedule.Update +import Network.Google.Resource.Coordinate.Team.List +import Network.Google.Resource.Coordinate.Worker.List + +{- $resources +TODO +-} + +type MapsCoordinateAPI = + Schedule :<|> Location :<|> CustomFieldDef :<|> Jobs + :<|> Team + :<|> Worker + +mapsCoordinateAPI :: Proxy MapsCoordinateAPI +mapsCoordinateAPI = Proxy diff --git a/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types.hs b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types.hs new file mode 100644 index 000000000..ac3c46056 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapsCoordinate.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapsCoordinate.Types + ( + -- * Service URL + mapsCoordinateURL + + -- * LocationListResponse + , LocationListResponse + , locationListResponse + , llrTokenPagination + , llrNextPageToken + , llrKind + , llrItems + + -- * WorkerListResponse + , WorkerListResponse + , workerListResponse + , wlrKind + , wlrItems + + -- * TokenPagination + , TokenPagination + , tokenPagination + , tpNextPageToken + , tpKind + , tpPreviousPageToken + + -- * Location + , Location + , location + , lAddressLine + , lKind + , lLat + , lLng + + -- * Schedule + , Schedule + , schedule + , sAllDay + , sStartTime + , sKind + , sEndTime + , sDuration + + -- * JobState + , JobState + , jobState + , jsLocation + , jsProgress + , jsNote + , jsKind + , jsCustomerPhoneNumber + , jsCustomerName + , jsAssignee + , jsCustomFields + , jsTitle + + -- * CustomFieldDef + , CustomFieldDef + , customFieldDef + , cfdEnabled + , cfdKind + , cfdName + , cfdRequiredForCheckout + , cfdId + , cfdEnumitems + , cfdType + + -- * JobListResponse + , JobListResponse + , jobListResponse + , jlrNextPageToken + , jlrKind + , jlrItems + + -- * JobChange + , JobChange + , jobChange + , jcState + , jcKind + , jcTimestamp + + -- * TeamListResponse + , TeamListResponse + , teamListResponse + , tlrKind + , tlrItems + + -- * CustomFieldDefListResponse + , CustomFieldDefListResponse + , customFieldDefListResponse + , cfdlrKind + , cfdlrItems + + -- * Job + , Job + , job + , jobState + , jobKind + , jobJobChange + , jobId + + -- * CustomFields + , CustomFields + , customFields + , cfKind + , cfCustomField + + -- * Team + , Team + , team + , tKind + , tName + , tId + + -- * LocationRecord + , LocationRecord + , locationRecord + , lrKind + , lrLatitude + , lrConfidenceRadius + , lrLongitude + , lrCollectionTime + + -- * Worker + , Worker + , worker + , wKind + , wId + + -- * CustomField + , CustomField + , customField + , cCustomFieldId + , cKind + , cValue + + -- * EnumItemDef + , EnumItemDef + , enumItemDef + , eidKind + , eidValue + , eidActive + ) where + +import Network.Google.MapsCoordinate.Types.Product +import Network.Google.MapsCoordinate.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Maps Coordinate API. +mapsCoordinateURL :: BaseURL +mapsCoordinateURL + = BaseUrl Https + "https://www.googleapis.com/coordinate/v1/" + 443 diff --git a/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs new file mode 100644 index 000000000..383bb0304 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs @@ -0,0 +1,1215 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapsCoordinate.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapsCoordinate.Types.Product where + +import Network.Google.MapsCoordinate.Types.Sum +import Network.Google.Prelude + +-- | Response from a List Locations request. +-- +-- /See:/ 'locationListResponse' smart constructor. +data LocationListResponse = LocationListResponse + { _llrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _llrNextPageToken :: !(Maybe Text) + , _llrKind :: !Text + , _llrItems :: !(Maybe [Maybe LocationRecord]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrTokenPagination' +-- +-- * 'llrNextPageToken' +-- +-- * 'llrKind' +-- +-- * 'llrItems' +locationListResponse + :: LocationListResponse +locationListResponse = + LocationListResponse + { _llrTokenPagination = Nothing + , _llrNextPageToken = Nothing + , _llrKind = "coordinate#locationList" + , _llrItems = Nothing + } + +-- | Pagination information for token pagination. +llrTokenPagination :: Lens' LocationListResponse (Maybe (Maybe TokenPagination)) +llrTokenPagination + = lens _llrTokenPagination + (\ s a -> s{_llrTokenPagination = a}) + +-- | A token to provide to get the next page of results. +llrNextPageToken :: Lens' LocationListResponse (Maybe Text) +llrNextPageToken + = lens _llrNextPageToken + (\ s a -> s{_llrNextPageToken = a}) + +-- | Identifies this object as a list of locations. +llrKind :: Lens' LocationListResponse Text +llrKind = lens _llrKind (\ s a -> s{_llrKind = a}) + +-- | Locations in the collection. +llrItems :: Lens' LocationListResponse [Maybe LocationRecord] +llrItems + = lens _llrItems (\ s a -> s{_llrItems = a}) . + _Default + . _Coerce + +instance FromJSON LocationListResponse where + parseJSON + = withObject "LocationListResponse" + (\ o -> + LocationListResponse <$> + (o .:? "tokenPagination") <*> (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "coordinate#locationList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON LocationListResponse where + toJSON LocationListResponse{..} + = object + (catMaybes + [("tokenPagination" .=) <$> _llrTokenPagination, + ("nextPageToken" .=) <$> _llrNextPageToken, + Just ("kind" .= _llrKind), + ("items" .=) <$> _llrItems]) + +-- | Response from a List Workers request. +-- +-- /See:/ 'workerListResponse' smart constructor. +data WorkerListResponse = WorkerListResponse + { _wlrKind :: !Text + , _wlrItems :: !(Maybe [Maybe Worker]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlrKind' +-- +-- * 'wlrItems' +workerListResponse + :: WorkerListResponse +workerListResponse = + WorkerListResponse + { _wlrKind = "coordinate#workerList" + , _wlrItems = Nothing + } + +-- | Identifies this object as a list of workers. +wlrKind :: Lens' WorkerListResponse Text +wlrKind = lens _wlrKind (\ s a -> s{_wlrKind = a}) + +-- | Workers in the collection. +wlrItems :: Lens' WorkerListResponse [Maybe Worker] +wlrItems + = lens _wlrItems (\ s a -> s{_wlrItems = a}) . + _Default + . _Coerce + +instance FromJSON WorkerListResponse where + parseJSON + = withObject "WorkerListResponse" + (\ o -> + WorkerListResponse <$> + (o .:? "kind" .!= "coordinate#workerList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON WorkerListResponse where + toJSON WorkerListResponse{..} + = object + (catMaybes + [Just ("kind" .= _wlrKind), + ("items" .=) <$> _wlrItems]) + +-- | Pagination information. +-- +-- /See:/ 'tokenPagination' smart constructor. +data TokenPagination = TokenPagination + { _tpNextPageToken :: !(Maybe Text) + , _tpKind :: !Text + , _tpPreviousPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpNextPageToken' +-- +-- * 'tpKind' +-- +-- * 'tpPreviousPageToken' +tokenPagination + :: TokenPagination +tokenPagination = + TokenPagination + { _tpNextPageToken = Nothing + , _tpKind = "coordinate#tokenPagination" + , _tpPreviousPageToken = Nothing + } + +-- | A token to provide to get the next page of results. +tpNextPageToken :: Lens' TokenPagination (Maybe Text) +tpNextPageToken + = lens _tpNextPageToken + (\ s a -> s{_tpNextPageToken = a}) + +-- | Identifies this object as pagination information. +tpKind :: Lens' TokenPagination Text +tpKind = lens _tpKind (\ s a -> s{_tpKind = a}) + +-- | A token to provide to get the previous page of results. +tpPreviousPageToken :: Lens' TokenPagination (Maybe Text) +tpPreviousPageToken + = lens _tpPreviousPageToken + (\ s a -> s{_tpPreviousPageToken = a}) + +instance FromJSON TokenPagination where + parseJSON + = withObject "TokenPagination" + (\ o -> + TokenPagination <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "coordinate#tokenPagination") + <*> (o .:? "previousPageToken")) + +instance ToJSON TokenPagination where + toJSON TokenPagination{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tpNextPageToken, + Just ("kind" .= _tpKind), + ("previousPageToken" .=) <$> _tpPreviousPageToken]) + +-- | Location of a job. +-- +-- /See:/ 'location' smart constructor. +data Location = Location + { _lAddressLine :: !(Maybe [Text]) + , _lKind :: !Text + , _lLat :: !(Maybe Double) + , _lLng :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Location' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lAddressLine' +-- +-- * 'lKind' +-- +-- * 'lLat' +-- +-- * 'lLng' +location + :: Location +location = + Location + { _lAddressLine = Nothing + , _lKind = "coordinate#location" + , _lLat = Nothing + , _lLng = Nothing + } + +-- | Address. +lAddressLine :: Lens' Location [Text] +lAddressLine + = lens _lAddressLine (\ s a -> s{_lAddressLine = a}) + . _Default + . _Coerce + +-- | Identifies this object as a location. +lKind :: Lens' Location Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | Latitude. +lLat :: Lens' Location (Maybe Double) +lLat = lens _lLat (\ s a -> s{_lLat = a}) + +-- | Longitude. +lLng :: Lens' Location (Maybe Double) +lLng = lens _lLng (\ s a -> s{_lLng = a}) + +instance FromJSON Location where + parseJSON + = withObject "Location" + (\ o -> + Location <$> + (o .:? "addressLine" .!= mempty) <*> + (o .:? "kind" .!= "coordinate#location") + <*> (o .:? "lat") + <*> (o .:? "lng")) + +instance ToJSON Location where + toJSON Location{..} + = object + (catMaybes + [("addressLine" .=) <$> _lAddressLine, + Just ("kind" .= _lKind), ("lat" .=) <$> _lLat, + ("lng" .=) <$> _lLng]) + +-- | Job schedule. +-- +-- /See:/ 'schedule' smart constructor. +data Schedule = Schedule + { _sAllDay :: !(Maybe Bool) + , _sStartTime :: !(Maybe Word64) + , _sKind :: !Text + , _sEndTime :: !(Maybe Word64) + , _sDuration :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Schedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sAllDay' +-- +-- * 'sStartTime' +-- +-- * 'sKind' +-- +-- * 'sEndTime' +-- +-- * 'sDuration' +schedule + :: Schedule +schedule = + Schedule + { _sAllDay = Nothing + , _sStartTime = Nothing + , _sKind = "coordinate#schedule" + , _sEndTime = Nothing + , _sDuration = Nothing + } + +-- | Whether the job is scheduled for the whole day. Time of day in +-- start\/end times is ignored if this is true. +sAllDay :: Lens' Schedule (Maybe Bool) +sAllDay = lens _sAllDay (\ s a -> s{_sAllDay = a}) + +-- | Scheduled start time in milliseconds since epoch. +sStartTime :: Lens' Schedule (Maybe Word64) +sStartTime + = lens _sStartTime (\ s a -> s{_sStartTime = a}) + +-- | Identifies this object as a job schedule. +sKind :: Lens' Schedule Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | Scheduled end time in milliseconds since epoch. +sEndTime :: Lens' Schedule (Maybe Word64) +sEndTime = lens _sEndTime (\ s a -> s{_sEndTime = a}) + +-- | Job duration in milliseconds. +sDuration :: Lens' Schedule (Maybe Word64) +sDuration + = lens _sDuration (\ s a -> s{_sDuration = a}) + +instance FromJSON Schedule where + parseJSON + = withObject "Schedule" + (\ o -> + Schedule <$> + (o .:? "allDay") <*> (o .:? "startTime") <*> + (o .:? "kind" .!= "coordinate#schedule") + <*> (o .:? "endTime") + <*> (o .:? "duration")) + +instance ToJSON Schedule where + toJSON Schedule{..} + = object + (catMaybes + [("allDay" .=) <$> _sAllDay, + ("startTime" .=) <$> _sStartTime, + Just ("kind" .= _sKind), + ("endTime" .=) <$> _sEndTime, + ("duration" .=) <$> _sDuration]) + +-- | Current state of a job. +-- +-- /See:/ 'jobState' smart constructor. +data JobState = JobState + { _jsLocation :: !(Maybe (Maybe Location)) + , _jsProgress :: !(Maybe Text) + , _jsNote :: !(Maybe [Text]) + , _jsKind :: !Text + , _jsCustomerPhoneNumber :: !(Maybe Text) + , _jsCustomerName :: !(Maybe Text) + , _jsAssignee :: !(Maybe Text) + , _jsCustomFields :: !(Maybe (Maybe CustomFields)) + , _jsTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobState' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jsLocation' +-- +-- * 'jsProgress' +-- +-- * 'jsNote' +-- +-- * 'jsKind' +-- +-- * 'jsCustomerPhoneNumber' +-- +-- * 'jsCustomerName' +-- +-- * 'jsAssignee' +-- +-- * 'jsCustomFields' +-- +-- * 'jsTitle' +jobState + :: JobState +jobState = + JobState + { _jsLocation = Nothing + , _jsProgress = Nothing + , _jsNote = Nothing + , _jsKind = "coordinate#jobState" + , _jsCustomerPhoneNumber = Nothing + , _jsCustomerName = Nothing + , _jsAssignee = Nothing + , _jsCustomFields = Nothing + , _jsTitle = Nothing + } + +-- | Job location. +jsLocation :: Lens' JobState (Maybe (Maybe Location)) +jsLocation + = lens _jsLocation (\ s a -> s{_jsLocation = a}) + +-- | Job progress. +jsProgress :: Lens' JobState (Maybe Text) +jsProgress + = lens _jsProgress (\ s a -> s{_jsProgress = a}) + +-- | Note added to the job. +jsNote :: Lens' JobState [Text] +jsNote + = lens _jsNote (\ s a -> s{_jsNote = a}) . _Default . + _Coerce + +-- | Identifies this object as a job state. +jsKind :: Lens' JobState Text +jsKind = lens _jsKind (\ s a -> s{_jsKind = a}) + +-- | Customer phone number. +jsCustomerPhoneNumber :: Lens' JobState (Maybe Text) +jsCustomerPhoneNumber + = lens _jsCustomerPhoneNumber + (\ s a -> s{_jsCustomerPhoneNumber = a}) + +-- | Customer name. +jsCustomerName :: Lens' JobState (Maybe Text) +jsCustomerName + = lens _jsCustomerName + (\ s a -> s{_jsCustomerName = a}) + +-- | Email address of the assignee, or the string \"DELETED_USER\" if the +-- account is no longer available. +jsAssignee :: Lens' JobState (Maybe Text) +jsAssignee + = lens _jsAssignee (\ s a -> s{_jsAssignee = a}) + +-- | Custom fields. +jsCustomFields :: Lens' JobState (Maybe (Maybe CustomFields)) +jsCustomFields + = lens _jsCustomFields + (\ s a -> s{_jsCustomFields = a}) + +-- | Job title. +jsTitle :: Lens' JobState (Maybe Text) +jsTitle = lens _jsTitle (\ s a -> s{_jsTitle = a}) + +instance FromJSON JobState where + parseJSON + = withObject "JobState" + (\ o -> + JobState <$> + (o .:? "location") <*> (o .:? "progress") <*> + (o .:? "note" .!= mempty) + <*> (o .:? "kind" .!= "coordinate#jobState") + <*> (o .:? "customerPhoneNumber") + <*> (o .:? "customerName") + <*> (o .:? "assignee") + <*> (o .:? "customFields") + <*> (o .:? "title")) + +instance ToJSON JobState where + toJSON JobState{..} + = object + (catMaybes + [("location" .=) <$> _jsLocation, + ("progress" .=) <$> _jsProgress, + ("note" .=) <$> _jsNote, Just ("kind" .= _jsKind), + ("customerPhoneNumber" .=) <$> + _jsCustomerPhoneNumber, + ("customerName" .=) <$> _jsCustomerName, + ("assignee" .=) <$> _jsAssignee, + ("customFields" .=) <$> _jsCustomFields, + ("title" .=) <$> _jsTitle]) + +-- | Custom field definition. +-- +-- /See:/ 'customFieldDef' smart constructor. +data CustomFieldDef = CustomFieldDef + { _cfdEnabled :: !(Maybe Bool) + , _cfdKind :: !Text + , _cfdName :: !(Maybe Text) + , _cfdRequiredForCheckout :: !(Maybe Bool) + , _cfdId :: !(Maybe Int64) + , _cfdEnumitems :: !(Maybe [Maybe EnumItemDef]) + , _cfdType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomFieldDef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfdEnabled' +-- +-- * 'cfdKind' +-- +-- * 'cfdName' +-- +-- * 'cfdRequiredForCheckout' +-- +-- * 'cfdId' +-- +-- * 'cfdEnumitems' +-- +-- * 'cfdType' +customFieldDef + :: CustomFieldDef +customFieldDef = + CustomFieldDef + { _cfdEnabled = Nothing + , _cfdKind = "coordinate#customFieldDef" + , _cfdName = Nothing + , _cfdRequiredForCheckout = Nothing + , _cfdId = Nothing + , _cfdEnumitems = Nothing + , _cfdType = Nothing + } + +-- | Whether the field is enabled. +cfdEnabled :: Lens' CustomFieldDef (Maybe Bool) +cfdEnabled + = lens _cfdEnabled (\ s a -> s{_cfdEnabled = a}) + +-- | Identifies this object as a custom field definition. +cfdKind :: Lens' CustomFieldDef Text +cfdKind = lens _cfdKind (\ s a -> s{_cfdKind = a}) + +-- | Custom field name. +cfdName :: Lens' CustomFieldDef (Maybe Text) +cfdName = lens _cfdName (\ s a -> s{_cfdName = a}) + +-- | Whether the field is required for checkout. +cfdRequiredForCheckout :: Lens' CustomFieldDef (Maybe Bool) +cfdRequiredForCheckout + = lens _cfdRequiredForCheckout + (\ s a -> s{_cfdRequiredForCheckout = a}) + +-- | Custom field id. +cfdId :: Lens' CustomFieldDef (Maybe Int64) +cfdId = lens _cfdId (\ s a -> s{_cfdId = a}) + +-- | List of enum items for this custom field. Populated only if the field +-- type is enum. Enum fields appear as \'lists\' in the Coordinate web and +-- mobile UI. +cfdEnumitems :: Lens' CustomFieldDef [Maybe EnumItemDef] +cfdEnumitems + = lens _cfdEnumitems (\ s a -> s{_cfdEnumitems = a}) + . _Default + . _Coerce + +-- | Custom field type. +cfdType :: Lens' CustomFieldDef (Maybe Text) +cfdType = lens _cfdType (\ s a -> s{_cfdType = a}) + +instance FromJSON CustomFieldDef where + parseJSON + = withObject "CustomFieldDef" + (\ o -> + CustomFieldDef <$> + (o .:? "enabled") <*> + (o .:? "kind" .!= "coordinate#customFieldDef") + <*> (o .:? "name") + <*> (o .:? "requiredForCheckout") + <*> (o .:? "id") + <*> (o .:? "enumitems" .!= mempty) + <*> (o .:? "type")) + +instance ToJSON CustomFieldDef where + toJSON CustomFieldDef{..} + = object + (catMaybes + [("enabled" .=) <$> _cfdEnabled, + Just ("kind" .= _cfdKind), ("name" .=) <$> _cfdName, + ("requiredForCheckout" .=) <$> + _cfdRequiredForCheckout, + ("id" .=) <$> _cfdId, + ("enumitems" .=) <$> _cfdEnumitems, + ("type" .=) <$> _cfdType]) + +-- | Response from a List Jobs request. +-- +-- /See:/ 'jobListResponse' smart constructor. +data JobListResponse = JobListResponse + { _jlrNextPageToken :: !(Maybe Text) + , _jlrKind :: !Text + , _jlrItems :: !(Maybe [Maybe Job]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jlrNextPageToken' +-- +-- * 'jlrKind' +-- +-- * 'jlrItems' +jobListResponse + :: JobListResponse +jobListResponse = + JobListResponse + { _jlrNextPageToken = Nothing + , _jlrKind = "coordinate#jobList" + , _jlrItems = Nothing + } + +-- | A token to provide to get the next page of results. +jlrNextPageToken :: Lens' JobListResponse (Maybe Text) +jlrNextPageToken + = lens _jlrNextPageToken + (\ s a -> s{_jlrNextPageToken = a}) + +-- | Identifies this object as a list of jobs. +jlrKind :: Lens' JobListResponse Text +jlrKind = lens _jlrKind (\ s a -> s{_jlrKind = a}) + +-- | Jobs in the collection. +jlrItems :: Lens' JobListResponse [Maybe Job] +jlrItems + = lens _jlrItems (\ s a -> s{_jlrItems = a}) . + _Default + . _Coerce + +instance FromJSON JobListResponse where + parseJSON + = withObject "JobListResponse" + (\ o -> + JobListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "coordinate#jobList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON JobListResponse where + toJSON JobListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _jlrNextPageToken, + Just ("kind" .= _jlrKind), + ("items" .=) <$> _jlrItems]) + +-- | Change to a job. For example assigning the job to a different worker. +-- +-- /See:/ 'jobChange' smart constructor. +data JobChange = JobChange + { _jcState :: !(Maybe (Maybe JobState)) + , _jcKind :: !Text + , _jcTimestamp :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobChange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jcState' +-- +-- * 'jcKind' +-- +-- * 'jcTimestamp' +jobChange + :: JobChange +jobChange = + JobChange + { _jcState = Nothing + , _jcKind = "coordinate#jobChange" + , _jcTimestamp = Nothing + } + +-- | Change applied to the job. Only the fields that were changed are set. +jcState :: Lens' JobChange (Maybe (Maybe JobState)) +jcState = lens _jcState (\ s a -> s{_jcState = a}) + +-- | Identifies this object as a job change. +jcKind :: Lens' JobChange Text +jcKind = lens _jcKind (\ s a -> s{_jcKind = a}) + +-- | Time at which this change was applied. +jcTimestamp :: Lens' JobChange (Maybe Word64) +jcTimestamp + = lens _jcTimestamp (\ s a -> s{_jcTimestamp = a}) + +instance FromJSON JobChange where + parseJSON + = withObject "JobChange" + (\ o -> + JobChange <$> + (o .:? "state") <*> + (o .:? "kind" .!= "coordinate#jobChange") + <*> (o .:? "timestamp")) + +instance ToJSON JobChange where + toJSON JobChange{..} + = object + (catMaybes + [("state" .=) <$> _jcState, Just ("kind" .= _jcKind), + ("timestamp" .=) <$> _jcTimestamp]) + +-- | Response from a List Teams request. +-- +-- /See:/ 'teamListResponse' smart constructor. +data TeamListResponse = TeamListResponse + { _tlrKind :: !Text + , _tlrItems :: !(Maybe [Maybe Team]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TeamListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrKind' +-- +-- * 'tlrItems' +teamListResponse + :: TeamListResponse +teamListResponse = + TeamListResponse + { _tlrKind = "coordinate#teamList" + , _tlrItems = Nothing + } + +-- | Identifies this object as a list of teams. +tlrKind :: Lens' TeamListResponse Text +tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a}) + +-- | Teams in the collection. +tlrItems :: Lens' TeamListResponse [Maybe Team] +tlrItems + = lens _tlrItems (\ s a -> s{_tlrItems = a}) . + _Default + . _Coerce + +instance FromJSON TeamListResponse where + parseJSON + = withObject "TeamListResponse" + (\ o -> + TeamListResponse <$> + (o .:? "kind" .!= "coordinate#teamList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON TeamListResponse where + toJSON TeamListResponse{..} + = object + (catMaybes + [Just ("kind" .= _tlrKind), + ("items" .=) <$> _tlrItems]) + +-- | Collection of custom field definitions for a team. +-- +-- /See:/ 'customFieldDefListResponse' smart constructor. +data CustomFieldDefListResponse = CustomFieldDefListResponse + { _cfdlrKind :: !Text + , _cfdlrItems :: !(Maybe [Maybe CustomFieldDef]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomFieldDefListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfdlrKind' +-- +-- * 'cfdlrItems' +customFieldDefListResponse + :: CustomFieldDefListResponse +customFieldDefListResponse = + CustomFieldDefListResponse + { _cfdlrKind = "coordinate#customFieldDefList" + , _cfdlrItems = Nothing + } + +-- | Identifies this object as a collection of custom field definitions in a +-- team. +cfdlrKind :: Lens' CustomFieldDefListResponse Text +cfdlrKind + = lens _cfdlrKind (\ s a -> s{_cfdlrKind = a}) + +-- | Collection of custom field definitions in a team. +cfdlrItems :: Lens' CustomFieldDefListResponse [Maybe CustomFieldDef] +cfdlrItems + = lens _cfdlrItems (\ s a -> s{_cfdlrItems = a}) . + _Default + . _Coerce + +instance FromJSON CustomFieldDefListResponse where + parseJSON + = withObject "CustomFieldDefListResponse" + (\ o -> + CustomFieldDefListResponse <$> + (o .:? "kind" .!= "coordinate#customFieldDefList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON CustomFieldDefListResponse where + toJSON CustomFieldDefListResponse{..} + = object + (catMaybes + [Just ("kind" .= _cfdlrKind), + ("items" .=) <$> _cfdlrItems]) + +-- | A job. +-- +-- /See:/ 'job' smart constructor. +data Job = Job + { _jobState :: !(Maybe (Maybe JobState)) + , _jobKind :: !Text + , _jobJobChange :: !(Maybe [Maybe JobChange]) + , _jobId :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Job' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jobState' +-- +-- * 'jobKind' +-- +-- * 'jobJobChange' +-- +-- * 'jobId' +job + :: Job +job = + Job + { _jobState = Nothing + , _jobKind = "coordinate#job" + , _jobJobChange = Nothing + , _jobId = Nothing + } + +-- | Current job state. +jobState :: Lens' Job (Maybe (Maybe JobState)) +jobState = lens _jobState (\ s a -> s{_jobState = a}) + +-- | Identifies this object as a job. +jobKind :: Lens' Job Text +jobKind = lens _jobKind (\ s a -> s{_jobKind = a}) + +-- | List of job changes since it was created. The first change corresponds +-- to the state of the job when it was created. +jobJobChange :: Lens' Job [Maybe JobChange] +jobJobChange + = lens _jobJobChange (\ s a -> s{_jobJobChange = a}) + . _Default + . _Coerce + +-- | Job id. +jobId :: Lens' Job (Maybe Word64) +jobId = lens _jobId (\ s a -> s{_jobId = a}) + +instance FromJSON Job where + parseJSON + = withObject "Job" + (\ o -> + Job <$> + (o .:? "state") <*> + (o .:? "kind" .!= "coordinate#job") + <*> (o .:? "jobChange" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON Job where + toJSON Job{..} + = object + (catMaybes + [("state" .=) <$> _jobState, + Just ("kind" .= _jobKind), + ("jobChange" .=) <$> _jobJobChange, + ("id" .=) <$> _jobId]) + +-- | Collection of custom fields. +-- +-- /See:/ 'customFields' smart constructor. +data CustomFields = CustomFields + { _cfKind :: !Text + , _cfCustomField :: !(Maybe [Maybe CustomField]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomFields' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfKind' +-- +-- * 'cfCustomField' +customFields + :: CustomFields +customFields = + CustomFields + { _cfKind = "coordinate#customFields" + , _cfCustomField = Nothing + } + +-- | Identifies this object as a collection of custom fields. +cfKind :: Lens' CustomFields Text +cfKind = lens _cfKind (\ s a -> s{_cfKind = a}) + +-- | Collection of custom fields. +cfCustomField :: Lens' CustomFields [Maybe CustomField] +cfCustomField + = lens _cfCustomField + (\ s a -> s{_cfCustomField = a}) + . _Default + . _Coerce + +instance FromJSON CustomFields where + parseJSON + = withObject "CustomFields" + (\ o -> + CustomFields <$> + (o .:? "kind" .!= "coordinate#customFields") <*> + (o .:? "customField" .!= mempty)) + +instance ToJSON CustomFields where + toJSON CustomFields{..} + = object + (catMaybes + [Just ("kind" .= _cfKind), + ("customField" .=) <$> _cfCustomField]) + +-- | A Coordinate team. +-- +-- /See:/ 'team' smart constructor. +data Team = Team + { _tKind :: !Text + , _tName :: !(Maybe Text) + , _tId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Team' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tKind' +-- +-- * 'tName' +-- +-- * 'tId' +team + :: Team +team = + Team + { _tKind = "coordinate#team" + , _tName = Nothing + , _tId = Nothing + } + +-- | Identifies this object as a team. +tKind :: Lens' Team Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | Team name +tName :: Lens' Team (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +-- | Team id, as found in a coordinate team url e.g. +-- https:\/\/coordinate.google.com\/f\/xyz where \"xyz\" is the team id. +tId :: Lens' Team (Maybe Text) +tId = lens _tId (\ s a -> s{_tId = a}) + +instance FromJSON Team where + parseJSON + = withObject "Team" + (\ o -> + Team <$> + (o .:? "kind" .!= "coordinate#team") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Team where + toJSON Team{..} + = object + (catMaybes + [Just ("kind" .= _tKind), ("name" .=) <$> _tName, + ("id" .=) <$> _tId]) + +-- | Recorded location of a worker. +-- +-- /See:/ 'locationRecord' smart constructor. +data LocationRecord = LocationRecord + { _lrKind :: !Text + , _lrLatitude :: !(Maybe Double) + , _lrConfidenceRadius :: !(Maybe Double) + , _lrLongitude :: !(Maybe Double) + , _lrCollectionTime :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationRecord' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrKind' +-- +-- * 'lrLatitude' +-- +-- * 'lrConfidenceRadius' +-- +-- * 'lrLongitude' +-- +-- * 'lrCollectionTime' +locationRecord + :: LocationRecord +locationRecord = + LocationRecord + { _lrKind = "coordinate#locationRecord" + , _lrLatitude = Nothing + , _lrConfidenceRadius = Nothing + , _lrLongitude = Nothing + , _lrCollectionTime = Nothing + } + +-- | Identifies this object as a location. +lrKind :: Lens' LocationRecord Text +lrKind = lens _lrKind (\ s a -> s{_lrKind = a}) + +-- | Latitude. +lrLatitude :: Lens' LocationRecord (Maybe Double) +lrLatitude + = lens _lrLatitude (\ s a -> s{_lrLatitude = a}) + +-- | The location accuracy in meters. This is the radius of a 95% confidence +-- interval around the location measurement. +lrConfidenceRadius :: Lens' LocationRecord (Maybe Double) +lrConfidenceRadius + = lens _lrConfidenceRadius + (\ s a -> s{_lrConfidenceRadius = a}) + +-- | Longitude. +lrLongitude :: Lens' LocationRecord (Maybe Double) +lrLongitude + = lens _lrLongitude (\ s a -> s{_lrLongitude = a}) + +-- | The collection time in milliseconds since the epoch. +lrCollectionTime :: Lens' LocationRecord (Maybe Int64) +lrCollectionTime + = lens _lrCollectionTime + (\ s a -> s{_lrCollectionTime = a}) + +instance FromJSON LocationRecord where + parseJSON + = withObject "LocationRecord" + (\ o -> + LocationRecord <$> + (o .:? "kind" .!= "coordinate#locationRecord") <*> + (o .:? "latitude") + <*> (o .:? "confidenceRadius") + <*> (o .:? "longitude") + <*> (o .:? "collectionTime")) + +instance ToJSON LocationRecord where + toJSON LocationRecord{..} + = object + (catMaybes + [Just ("kind" .= _lrKind), + ("latitude" .=) <$> _lrLatitude, + ("confidenceRadius" .=) <$> _lrConfidenceRadius, + ("longitude" .=) <$> _lrLongitude, + ("collectionTime" .=) <$> _lrCollectionTime]) + +-- | A worker in a Coordinate team. +-- +-- /See:/ 'worker' smart constructor. +data Worker = Worker + { _wKind :: !Text + , _wId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Worker' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wKind' +-- +-- * 'wId' +worker + :: Worker +worker = + Worker + { _wKind = "coordinate#worker" + , _wId = Nothing + } + +-- | Identifies this object as a worker. +wKind :: Lens' Worker Text +wKind = lens _wKind (\ s a -> s{_wKind = a}) + +-- | Worker email address. If a worker has been deleted from your team, the +-- email address will appear as DELETED_USER. +wId :: Lens' Worker (Maybe Text) +wId = lens _wId (\ s a -> s{_wId = a}) + +instance FromJSON Worker where + parseJSON + = withObject "Worker" + (\ o -> + Worker <$> + (o .:? "kind" .!= "coordinate#worker") <*> + (o .:? "id")) + +instance ToJSON Worker where + toJSON Worker{..} + = object + (catMaybes + [Just ("kind" .= _wKind), ("id" .=) <$> _wId]) + +-- | Custom field. +-- +-- /See:/ 'customField' smart constructor. +data CustomField = CustomField + { _cCustomFieldId :: !(Maybe Int64) + , _cKind :: !Text + , _cValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomField' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cCustomFieldId' +-- +-- * 'cKind' +-- +-- * 'cValue' +customField + :: CustomField +customField = + CustomField + { _cCustomFieldId = Nothing + , _cKind = "coordinate#customField" + , _cValue = Nothing + } + +-- | Custom field id. +cCustomFieldId :: Lens' CustomField (Maybe Int64) +cCustomFieldId + = lens _cCustomFieldId + (\ s a -> s{_cCustomFieldId = a}) + +-- | Identifies this object as a custom field. +cKind :: Lens' CustomField Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Custom field value. +cValue :: Lens' CustomField (Maybe Text) +cValue = lens _cValue (\ s a -> s{_cValue = a}) + +instance FromJSON CustomField where + parseJSON + = withObject "CustomField" + (\ o -> + CustomField <$> + (o .:? "customFieldId") <*> + (o .:? "kind" .!= "coordinate#customField") + <*> (o .:? "value")) + +instance ToJSON CustomField where + toJSON CustomField{..} + = object + (catMaybes + [("customFieldId" .=) <$> _cCustomFieldId, + Just ("kind" .= _cKind), ("value" .=) <$> _cValue]) + +-- | Enum Item definition. +-- +-- /See:/ 'enumItemDef' smart constructor. +data EnumItemDef = EnumItemDef + { _eidKind :: !Text + , _eidValue :: !(Maybe Text) + , _eidActive :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnumItemDef' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eidKind' +-- +-- * 'eidValue' +-- +-- * 'eidActive' +enumItemDef + :: EnumItemDef +enumItemDef = + EnumItemDef + { _eidKind = "coordinate#enumItemDef" + , _eidValue = Nothing + , _eidActive = Nothing + } + +-- | Identifies this object as an enum item definition. +eidKind :: Lens' EnumItemDef Text +eidKind = lens _eidKind (\ s a -> s{_eidKind = a}) + +-- | Custom field value. +eidValue :: Lens' EnumItemDef (Maybe Text) +eidValue = lens _eidValue (\ s a -> s{_eidValue = a}) + +-- | Whether the enum item is active. Jobs may contain inactive enum values; +-- however, setting an enum to an inactive value when creating or updating +-- a job will result in a 500 error. +eidActive :: Lens' EnumItemDef (Maybe Bool) +eidActive + = lens _eidActive (\ s a -> s{_eidActive = a}) + +instance FromJSON EnumItemDef where + parseJSON + = withObject "EnumItemDef" + (\ o -> + EnumItemDef <$> + (o .:? "kind" .!= "coordinate#enumItemDef") <*> + (o .:? "value") + <*> (o .:? "active")) + +instance ToJSON EnumItemDef where + toJSON EnumItemDef{..} + = object + (catMaybes + [Just ("kind" .= _eidKind), + ("value" .=) <$> _eidValue, + ("active" .=) <$> _eidActive]) diff --git a/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Sum.hs b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Sum.hs new file mode 100644 index 000000000..12cb93b33 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapsCoordinate.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapsCoordinate.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs new file mode 100644 index 000000000..618467e34 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.CustomFieldDef.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of custom field definitions for a team. +-- +-- /See:/ for @CoordinateCustomFieldDefList@. +module Coordinate.CustomFieldDef.List + ( + -- * REST Resource + CustomFieldDefListAPI + + -- * Creating a Request + , customFieldDefList + , CustomFieldDefList + + -- * Request Lenses + , cfdlQuotaUser + , cfdlPrettyPrint + , cfdlUserIp + , cfdlTeamId + , cfdlKey + , cfdlOauthToken + , cfdlFields + , cfdlAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateCustomFieldDefList@ which the +-- 'CustomFieldDefList' request conforms to. +type CustomFieldDefListAPI = + "teams" :> + Capture "teamId" Text :> + "custom_fields" :> + Get '[JSON] CustomFieldDefListResponse + +-- | Retrieves a list of custom field definitions for a team. +-- +-- /See:/ 'customFieldDefList' smart constructor. +data CustomFieldDefList = CustomFieldDefList + { _cfdlQuotaUser :: !(Maybe Text) + , _cfdlPrettyPrint :: !Bool + , _cfdlUserIp :: !(Maybe Text) + , _cfdlTeamId :: !Text + , _cfdlKey :: !(Maybe Text) + , _cfdlOauthToken :: !(Maybe Text) + , _cfdlFields :: !(Maybe Text) + , _cfdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CustomFieldDefList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfdlQuotaUser' +-- +-- * 'cfdlPrettyPrint' +-- +-- * 'cfdlUserIp' +-- +-- * 'cfdlTeamId' +-- +-- * 'cfdlKey' +-- +-- * 'cfdlOauthToken' +-- +-- * 'cfdlFields' +-- +-- * 'cfdlAlt' +customFieldDefList + :: Text -- ^ 'teamId' + -> CustomFieldDefList +customFieldDefList pCfdlTeamId_ = + CustomFieldDefList + { _cfdlQuotaUser = Nothing + , _cfdlPrettyPrint = True + , _cfdlUserIp = Nothing + , _cfdlTeamId = pCfdlTeamId_ + , _cfdlKey = Nothing + , _cfdlOauthToken = Nothing + , _cfdlFields = Nothing + , _cfdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cfdlQuotaUser :: Lens' CustomFieldDefList' (Maybe Text) +cfdlQuotaUser + = lens _cfdlQuotaUser + (\ s a -> s{_cfdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cfdlPrettyPrint :: Lens' CustomFieldDefList' Bool +cfdlPrettyPrint + = lens _cfdlPrettyPrint + (\ s a -> s{_cfdlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cfdlUserIp :: Lens' CustomFieldDefList' (Maybe Text) +cfdlUserIp + = lens _cfdlUserIp (\ s a -> s{_cfdlUserIp = a}) + +-- | Team ID +cfdlTeamId :: Lens' CustomFieldDefList' Text +cfdlTeamId + = lens _cfdlTeamId (\ s a -> s{_cfdlTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cfdlKey :: Lens' CustomFieldDefList' (Maybe Text) +cfdlKey = lens _cfdlKey (\ s a -> s{_cfdlKey = a}) + +-- | OAuth 2.0 token for the current user. +cfdlOauthToken :: Lens' CustomFieldDefList' (Maybe Text) +cfdlOauthToken + = lens _cfdlOauthToken + (\ s a -> s{_cfdlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cfdlFields :: Lens' CustomFieldDefList' (Maybe Text) +cfdlFields + = lens _cfdlFields (\ s a -> s{_cfdlFields = a}) + +-- | Data format for the response. +cfdlAlt :: Lens' CustomFieldDefList' Text +cfdlAlt = lens _cfdlAlt (\ s a -> s{_cfdlAlt = a}) + +instance GoogleRequest CustomFieldDefList' where + type Rs CustomFieldDefList' = + CustomFieldDefListResponse + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u CustomFieldDefList{..} + = go _cfdlQuotaUser _cfdlPrettyPrint _cfdlUserIp + _cfdlTeamId + _cfdlKey + _cfdlOauthToken + _cfdlFields + _cfdlAlt + where go + = clientWithRoute + (Proxy :: Proxy CustomFieldDefListAPI) + r + u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Get.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Get.hs new file mode 100644 index 000000000..d7d6faac2 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Get.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Jobs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a job, including all the changes made to the job. +-- +-- /See:/ for @CoordinateJobsGet@. +module Coordinate.Jobs.Get + ( + -- * REST Resource + JobsGetAPI + + -- * Creating a Request + , jobsGet + , JobsGet + + -- * Request Lenses + , jgQuotaUser + , jgPrettyPrint + , jgJobId + , jgUserIp + , jgTeamId + , jgKey + , jgOauthToken + , jgFields + , jgAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateJobsGet@ which the +-- 'JobsGet' request conforms to. +type JobsGetAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> Capture "jobId" Word64 :> Get '[JSON] Job + +-- | Retrieves a job, including all the changes made to the job. +-- +-- /See:/ 'jobsGet' smart constructor. +data JobsGet = JobsGet + { _jgQuotaUser :: !(Maybe Text) + , _jgPrettyPrint :: !Bool + , _jgJobId :: !Word64 + , _jgUserIp :: !(Maybe Text) + , _jgTeamId :: !Text + , _jgKey :: !(Maybe Text) + , _jgOauthToken :: !(Maybe Text) + , _jgFields :: !(Maybe Text) + , _jgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jgQuotaUser' +-- +-- * 'jgPrettyPrint' +-- +-- * 'jgJobId' +-- +-- * 'jgUserIp' +-- +-- * 'jgTeamId' +-- +-- * 'jgKey' +-- +-- * 'jgOauthToken' +-- +-- * 'jgFields' +-- +-- * 'jgAlt' +jobsGet + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> JobsGet +jobsGet pJgJobId_ pJgTeamId_ = + JobsGet + { _jgQuotaUser = Nothing + , _jgPrettyPrint = True + , _jgJobId = pJgJobId_ + , _jgUserIp = Nothing + , _jgTeamId = pJgTeamId_ + , _jgKey = Nothing + , _jgOauthToken = Nothing + , _jgFields = Nothing + , _jgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jgQuotaUser :: Lens' JobsGet' (Maybe Text) +jgQuotaUser + = lens _jgQuotaUser (\ s a -> s{_jgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jgPrettyPrint :: Lens' JobsGet' Bool +jgPrettyPrint + = lens _jgPrettyPrint + (\ s a -> s{_jgPrettyPrint = a}) + +-- | Job number +jgJobId :: Lens' JobsGet' Word64 +jgJobId = lens _jgJobId (\ s a -> s{_jgJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jgUserIp :: Lens' JobsGet' (Maybe Text) +jgUserIp = lens _jgUserIp (\ s a -> s{_jgUserIp = a}) + +-- | Team ID +jgTeamId :: Lens' JobsGet' Text +jgTeamId = lens _jgTeamId (\ s a -> s{_jgTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jgKey :: Lens' JobsGet' (Maybe Text) +jgKey = lens _jgKey (\ s a -> s{_jgKey = a}) + +-- | OAuth 2.0 token for the current user. +jgOauthToken :: Lens' JobsGet' (Maybe Text) +jgOauthToken + = lens _jgOauthToken (\ s a -> s{_jgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jgFields :: Lens' JobsGet' (Maybe Text) +jgFields = lens _jgFields (\ s a -> s{_jgFields = a}) + +-- | Data format for the response. +jgAlt :: Lens' JobsGet' Text +jgAlt = lens _jgAlt (\ s a -> s{_jgAlt = a}) + +instance GoogleRequest JobsGet' where + type Rs JobsGet' = Job + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u JobsGet{..} + = go _jgQuotaUser _jgPrettyPrint _jgJobId _jgUserIp + _jgTeamId + _jgKey + _jgOauthToken + _jgFields + _jgAlt + where go + = clientWithRoute (Proxy :: Proxy JobsGetAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs new file mode 100644 index 000000000..9eef01efc --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs @@ -0,0 +1,267 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Jobs.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new job. Only the state field of the job should be set. +-- +-- /See:/ for @CoordinateJobsInsert@. +module Coordinate.Jobs.Insert + ( + -- * REST Resource + JobsInsertAPI + + -- * Creating a Request + , jobsInsert + , JobsInsert + + -- * Request Lenses + , jiQuotaUser + , jiPrettyPrint + , jiNote + , jiUserIp + , jiTeamId + , jiCustomerPhoneNumber + , jiCustomerName + , jiAddress + , jiAssignee + , jiLat + , jiKey + , jiLng + , jiTitle + , jiOauthToken + , jiFields + , jiCustomField + , jiAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateJobsInsert@ which the +-- 'JobsInsert' request conforms to. +type JobsInsertAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + QueryParam "note" Text :> + QueryParam "customerPhoneNumber" Text :> + QueryParam "customerName" Text :> + QueryParam "address" Text :> + QueryParam "assignee" Text :> + QueryParam "lat" Double :> + QueryParam "lng" Double :> + QueryParam "title" Text :> + QueryParams "customField" Text :> Post '[JSON] Job + +-- | Inserts a new job. Only the state field of the job should be set. +-- +-- /See:/ 'jobsInsert' smart constructor. +data JobsInsert = JobsInsert + { _jiQuotaUser :: !(Maybe Text) + , _jiPrettyPrint :: !Bool + , _jiNote :: !(Maybe Text) + , _jiUserIp :: !(Maybe Text) + , _jiTeamId :: !Text + , _jiCustomerPhoneNumber :: !(Maybe Text) + , _jiCustomerName :: !(Maybe Text) + , _jiAddress :: !Text + , _jiAssignee :: !(Maybe Text) + , _jiLat :: !Double + , _jiKey :: !(Maybe Text) + , _jiLng :: !Double + , _jiTitle :: !Text + , _jiOauthToken :: !(Maybe Text) + , _jiFields :: !(Maybe Text) + , _jiCustomField :: !(Maybe Text) + , _jiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jiQuotaUser' +-- +-- * 'jiPrettyPrint' +-- +-- * 'jiNote' +-- +-- * 'jiUserIp' +-- +-- * 'jiTeamId' +-- +-- * 'jiCustomerPhoneNumber' +-- +-- * 'jiCustomerName' +-- +-- * 'jiAddress' +-- +-- * 'jiAssignee' +-- +-- * 'jiLat' +-- +-- * 'jiKey' +-- +-- * 'jiLng' +-- +-- * 'jiTitle' +-- +-- * 'jiOauthToken' +-- +-- * 'jiFields' +-- +-- * 'jiCustomField' +-- +-- * 'jiAlt' +jobsInsert + :: Text -- ^ 'teamId' + -> Text -- ^ 'address' + -> Double -- ^ 'lat' + -> Double -- ^ 'lng' + -> Text -- ^ 'title' + -> JobsInsert +jobsInsert pJiTeamId_ pJiAddress_ pJiLat_ pJiLng_ pJiTitle_ = + JobsInsert + { _jiQuotaUser = Nothing + , _jiPrettyPrint = True + , _jiNote = Nothing + , _jiUserIp = Nothing + , _jiTeamId = pJiTeamId_ + , _jiCustomerPhoneNumber = Nothing + , _jiCustomerName = Nothing + , _jiAddress = pJiAddress_ + , _jiAssignee = Nothing + , _jiLat = pJiLat_ + , _jiKey = Nothing + , _jiLng = pJiLng_ + , _jiTitle = pJiTitle_ + , _jiOauthToken = Nothing + , _jiFields = Nothing + , _jiCustomField = Nothing + , _jiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jiQuotaUser :: Lens' JobsInsert' (Maybe Text) +jiQuotaUser + = lens _jiQuotaUser (\ s a -> s{_jiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jiPrettyPrint :: Lens' JobsInsert' Bool +jiPrettyPrint + = lens _jiPrettyPrint + (\ s a -> s{_jiPrettyPrint = a}) + +-- | Job note as newline (Unix) separated string +jiNote :: Lens' JobsInsert' (Maybe Text) +jiNote = lens _jiNote (\ s a -> s{_jiNote = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jiUserIp :: Lens' JobsInsert' (Maybe Text) +jiUserIp = lens _jiUserIp (\ s a -> s{_jiUserIp = a}) + +-- | Team ID +jiTeamId :: Lens' JobsInsert' Text +jiTeamId = lens _jiTeamId (\ s a -> s{_jiTeamId = a}) + +-- | Customer phone number +jiCustomerPhoneNumber :: Lens' JobsInsert' (Maybe Text) +jiCustomerPhoneNumber + = lens _jiCustomerPhoneNumber + (\ s a -> s{_jiCustomerPhoneNumber = a}) + +-- | Customer name +jiCustomerName :: Lens' JobsInsert' (Maybe Text) +jiCustomerName + = lens _jiCustomerName + (\ s a -> s{_jiCustomerName = a}) + +-- | Job address as newline (Unix) separated string +jiAddress :: Lens' JobsInsert' Text +jiAddress + = lens _jiAddress (\ s a -> s{_jiAddress = a}) + +-- | Assignee email address, or empty string to unassign. +jiAssignee :: Lens' JobsInsert' (Maybe Text) +jiAssignee + = lens _jiAssignee (\ s a -> s{_jiAssignee = a}) + +-- | The latitude coordinate of this job\'s location. +jiLat :: Lens' JobsInsert' Double +jiLat = lens _jiLat (\ s a -> s{_jiLat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jiKey :: Lens' JobsInsert' (Maybe Text) +jiKey = lens _jiKey (\ s a -> s{_jiKey = a}) + +-- | The longitude coordinate of this job\'s location. +jiLng :: Lens' JobsInsert' Double +jiLng = lens _jiLng (\ s a -> s{_jiLng = a}) + +-- | Job title +jiTitle :: Lens' JobsInsert' Text +jiTitle = lens _jiTitle (\ s a -> s{_jiTitle = a}) + +-- | OAuth 2.0 token for the current user. +jiOauthToken :: Lens' JobsInsert' (Maybe Text) +jiOauthToken + = lens _jiOauthToken (\ s a -> s{_jiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jiFields :: Lens' JobsInsert' (Maybe Text) +jiFields = lens _jiFields (\ s a -> s{_jiFields = a}) + +-- | Sets the value of custom fields. To set a custom field, pass the field +-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character, +-- and the desired value as a parameter. For example, +-- customField=12%3DAlice. Repeat the parameter for each custom field. Note +-- that \'=\' cannot appear in the parameter value. Specifying an invalid, +-- or inactive enum field will result in an error 500. +jiCustomField :: Lens' JobsInsert' (Maybe Text) +jiCustomField + = lens _jiCustomField + (\ s a -> s{_jiCustomField = a}) + +-- | Data format for the response. +jiAlt :: Lens' JobsInsert' Text +jiAlt = lens _jiAlt (\ s a -> s{_jiAlt = a}) + +instance GoogleRequest JobsInsert' where + type Rs JobsInsert' = Job + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u JobsInsert{..} + = go _jiQuotaUser _jiPrettyPrint _jiNote _jiUserIp + _jiTeamId + _jiCustomerPhoneNumber + _jiCustomerName + (Just _jiAddress) + _jiAssignee + (Just _jiLat) + _jiKey + (Just _jiLng) + (Just _jiTitle) + _jiOauthToken + _jiFields + _jiCustomField + _jiAlt + where go + = clientWithRoute (Proxy :: Proxy JobsInsertAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/List.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/List.hs new file mode 100644 index 000000000..510d3374c --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/List.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Jobs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves jobs created or modified since the given timestamp. +-- +-- /See:/ for @CoordinateJobsList@. +module Coordinate.Jobs.List + ( + -- * REST Resource + JobsListAPI + + -- * Creating a Request + , jobsList + , JobsList + + -- * Request Lenses + , jlQuotaUser + , jlPrettyPrint + , jlUserIp + , jlTeamId + , jlMinModifiedTimestampMs + , jlKey + , jlOmitJobChanges + , jlPageToken + , jlOauthToken + , jlMaxResults + , jlFields + , jlAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateJobsList@ which the +-- 'JobsList' request conforms to. +type JobsListAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + QueryParam "minModifiedTimestampMs" Word64 :> + QueryParam "omitJobChanges" Bool :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] JobListResponse + +-- | Retrieves jobs created or modified since the given timestamp. +-- +-- /See:/ 'jobsList' smart constructor. +data JobsList = JobsList + { _jlQuotaUser :: !(Maybe Text) + , _jlPrettyPrint :: !Bool + , _jlUserIp :: !(Maybe Text) + , _jlTeamId :: !Text + , _jlMinModifiedTimestampMs :: !(Maybe Word64) + , _jlKey :: !(Maybe Text) + , _jlOmitJobChanges :: !(Maybe Bool) + , _jlPageToken :: !(Maybe Text) + , _jlOauthToken :: !(Maybe Text) + , _jlMaxResults :: !(Maybe Word32) + , _jlFields :: !(Maybe Text) + , _jlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jlQuotaUser' +-- +-- * 'jlPrettyPrint' +-- +-- * 'jlUserIp' +-- +-- * 'jlTeamId' +-- +-- * 'jlMinModifiedTimestampMs' +-- +-- * 'jlKey' +-- +-- * 'jlOmitJobChanges' +-- +-- * 'jlPageToken' +-- +-- * 'jlOauthToken' +-- +-- * 'jlMaxResults' +-- +-- * 'jlFields' +-- +-- * 'jlAlt' +jobsList + :: Text -- ^ 'teamId' + -> JobsList +jobsList pJlTeamId_ = + JobsList + { _jlQuotaUser = Nothing + , _jlPrettyPrint = True + , _jlUserIp = Nothing + , _jlTeamId = pJlTeamId_ + , _jlMinModifiedTimestampMs = Nothing + , _jlKey = Nothing + , _jlOmitJobChanges = Nothing + , _jlPageToken = Nothing + , _jlOauthToken = Nothing + , _jlMaxResults = Nothing + , _jlFields = Nothing + , _jlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jlQuotaUser :: Lens' JobsList' (Maybe Text) +jlQuotaUser + = lens _jlQuotaUser (\ s a -> s{_jlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jlPrettyPrint :: Lens' JobsList' Bool +jlPrettyPrint + = lens _jlPrettyPrint + (\ s a -> s{_jlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jlUserIp :: Lens' JobsList' (Maybe Text) +jlUserIp = lens _jlUserIp (\ s a -> s{_jlUserIp = a}) + +-- | Team ID +jlTeamId :: Lens' JobsList' Text +jlTeamId = lens _jlTeamId (\ s a -> s{_jlTeamId = a}) + +-- | Minimum time a job was modified in milliseconds since epoch. +jlMinModifiedTimestampMs :: Lens' JobsList' (Maybe Word64) +jlMinModifiedTimestampMs + = lens _jlMinModifiedTimestampMs + (\ s a -> s{_jlMinModifiedTimestampMs = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jlKey :: Lens' JobsList' (Maybe Text) +jlKey = lens _jlKey (\ s a -> s{_jlKey = a}) + +-- | Whether to omit detail job history information. +jlOmitJobChanges :: Lens' JobsList' (Maybe Bool) +jlOmitJobChanges + = lens _jlOmitJobChanges + (\ s a -> s{_jlOmitJobChanges = a}) + +-- | Continuation token +jlPageToken :: Lens' JobsList' (Maybe Text) +jlPageToken + = lens _jlPageToken (\ s a -> s{_jlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +jlOauthToken :: Lens' JobsList' (Maybe Text) +jlOauthToken + = lens _jlOauthToken (\ s a -> s{_jlOauthToken = a}) + +-- | Maximum number of results to return in one page. +jlMaxResults :: Lens' JobsList' (Maybe Word32) +jlMaxResults + = lens _jlMaxResults (\ s a -> s{_jlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +jlFields :: Lens' JobsList' (Maybe Text) +jlFields = lens _jlFields (\ s a -> s{_jlFields = a}) + +-- | Data format for the response. +jlAlt :: Lens' JobsList' Text +jlAlt = lens _jlAlt (\ s a -> s{_jlAlt = a}) + +instance GoogleRequest JobsList' where + type Rs JobsList' = JobListResponse + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u JobsList{..} + = go _jlQuotaUser _jlPrettyPrint _jlUserIp _jlTeamId + _jlMinModifiedTimestampMs + _jlKey + _jlOmitJobChanges + _jlPageToken + _jlOauthToken + _jlMaxResults + _jlFields + _jlAlt + where go + = clientWithRoute (Proxy :: Proxy JobsListAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs new file mode 100644 index 000000000..669146985 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs @@ -0,0 +1,290 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Jobs.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a job. Fields that are set in the job state will be updated. +-- This method supports patch semantics. +-- +-- /See:/ for @CoordinateJobsPatch@. +module Coordinate.Jobs.Patch + ( + -- * REST Resource + JobsPatchAPI + + -- * Creating a Request + , jobsPatch + , JobsPatch + + -- * Request Lenses + , jpQuotaUser + , jpPrettyPrint + , jpJobId + , jpProgress + , jpNote + , jpUserIp + , jpTeamId + , jpCustomerPhoneNumber + , jpCustomerName + , jpAddress + , jpAssignee + , jpLat + , jpKey + , jpLng + , jpTitle + , jpOauthToken + , jpFields + , jpCustomField + , jpAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateJobsPatch@ which the +-- 'JobsPatch' request conforms to. +type JobsPatchAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + Capture "jobId" Word64 :> + QueryParam "progress" Text :> + QueryParam "note" Text :> + QueryParam "customerPhoneNumber" Text :> + QueryParam "customerName" Text :> + QueryParam "address" Text :> + QueryParam "assignee" Text :> + QueryParam "lat" Double :> + QueryParam "lng" Double :> + QueryParam "title" Text :> + QueryParams "customField" Text :> + Patch '[JSON] Job + +-- | Updates a job. Fields that are set in the job state will be updated. +-- This method supports patch semantics. +-- +-- /See:/ 'jobsPatch' smart constructor. +data JobsPatch = JobsPatch + { _jpQuotaUser :: !(Maybe Text) + , _jpPrettyPrint :: !Bool + , _jpJobId :: !Word64 + , _jpProgress :: !(Maybe Text) + , _jpNote :: !(Maybe Text) + , _jpUserIp :: !(Maybe Text) + , _jpTeamId :: !Text + , _jpCustomerPhoneNumber :: !(Maybe Text) + , _jpCustomerName :: !(Maybe Text) + , _jpAddress :: !(Maybe Text) + , _jpAssignee :: !(Maybe Text) + , _jpLat :: !(Maybe Double) + , _jpKey :: !(Maybe Text) + , _jpLng :: !(Maybe Double) + , _jpTitle :: !(Maybe Text) + , _jpOauthToken :: !(Maybe Text) + , _jpFields :: !(Maybe Text) + , _jpCustomField :: !(Maybe Text) + , _jpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jpQuotaUser' +-- +-- * 'jpPrettyPrint' +-- +-- * 'jpJobId' +-- +-- * 'jpProgress' +-- +-- * 'jpNote' +-- +-- * 'jpUserIp' +-- +-- * 'jpTeamId' +-- +-- * 'jpCustomerPhoneNumber' +-- +-- * 'jpCustomerName' +-- +-- * 'jpAddress' +-- +-- * 'jpAssignee' +-- +-- * 'jpLat' +-- +-- * 'jpKey' +-- +-- * 'jpLng' +-- +-- * 'jpTitle' +-- +-- * 'jpOauthToken' +-- +-- * 'jpFields' +-- +-- * 'jpCustomField' +-- +-- * 'jpAlt' +jobsPatch + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> JobsPatch +jobsPatch pJpJobId_ pJpTeamId_ = + JobsPatch + { _jpQuotaUser = Nothing + , _jpPrettyPrint = True + , _jpJobId = pJpJobId_ + , _jpProgress = Nothing + , _jpNote = Nothing + , _jpUserIp = Nothing + , _jpTeamId = pJpTeamId_ + , _jpCustomerPhoneNumber = Nothing + , _jpCustomerName = Nothing + , _jpAddress = Nothing + , _jpAssignee = Nothing + , _jpLat = Nothing + , _jpKey = Nothing + , _jpLng = Nothing + , _jpTitle = Nothing + , _jpOauthToken = Nothing + , _jpFields = Nothing + , _jpCustomField = Nothing + , _jpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +jpQuotaUser :: Lens' JobsPatch' (Maybe Text) +jpQuotaUser + = lens _jpQuotaUser (\ s a -> s{_jpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +jpPrettyPrint :: Lens' JobsPatch' Bool +jpPrettyPrint + = lens _jpPrettyPrint + (\ s a -> s{_jpPrettyPrint = a}) + +-- | Job number +jpJobId :: Lens' JobsPatch' Word64 +jpJobId = lens _jpJobId (\ s a -> s{_jpJobId = a}) + +-- | Job progress +jpProgress :: Lens' JobsPatch' (Maybe Text) +jpProgress + = lens _jpProgress (\ s a -> s{_jpProgress = a}) + +-- | Job note as newline (Unix) separated string +jpNote :: Lens' JobsPatch' (Maybe Text) +jpNote = lens _jpNote (\ s a -> s{_jpNote = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +jpUserIp :: Lens' JobsPatch' (Maybe Text) +jpUserIp = lens _jpUserIp (\ s a -> s{_jpUserIp = a}) + +-- | Team ID +jpTeamId :: Lens' JobsPatch' Text +jpTeamId = lens _jpTeamId (\ s a -> s{_jpTeamId = a}) + +-- | Customer phone number +jpCustomerPhoneNumber :: Lens' JobsPatch' (Maybe Text) +jpCustomerPhoneNumber + = lens _jpCustomerPhoneNumber + (\ s a -> s{_jpCustomerPhoneNumber = a}) + +-- | Customer name +jpCustomerName :: Lens' JobsPatch' (Maybe Text) +jpCustomerName + = lens _jpCustomerName + (\ s a -> s{_jpCustomerName = a}) + +-- | Job address as newline (Unix) separated string +jpAddress :: Lens' JobsPatch' (Maybe Text) +jpAddress + = lens _jpAddress (\ s a -> s{_jpAddress = a}) + +-- | Assignee email address, or empty string to unassign. +jpAssignee :: Lens' JobsPatch' (Maybe Text) +jpAssignee + = lens _jpAssignee (\ s a -> s{_jpAssignee = a}) + +-- | The latitude coordinate of this job\'s location. +jpLat :: Lens' JobsPatch' (Maybe Double) +jpLat = lens _jpLat (\ s a -> s{_jpLat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +jpKey :: Lens' JobsPatch' (Maybe Text) +jpKey = lens _jpKey (\ s a -> s{_jpKey = a}) + +-- | The longitude coordinate of this job\'s location. +jpLng :: Lens' JobsPatch' (Maybe Double) +jpLng = lens _jpLng (\ s a -> s{_jpLng = a}) + +-- | Job title +jpTitle :: Lens' JobsPatch' (Maybe Text) +jpTitle = lens _jpTitle (\ s a -> s{_jpTitle = a}) + +-- | OAuth 2.0 token for the current user. +jpOauthToken :: Lens' JobsPatch' (Maybe Text) +jpOauthToken + = lens _jpOauthToken (\ s a -> s{_jpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +jpFields :: Lens' JobsPatch' (Maybe Text) +jpFields = lens _jpFields (\ s a -> s{_jpFields = a}) + +-- | Sets the value of custom fields. To set a custom field, pass the field +-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character, +-- and the desired value as a parameter. For example, +-- customField=12%3DAlice. Repeat the parameter for each custom field. Note +-- that \'=\' cannot appear in the parameter value. Specifying an invalid, +-- or inactive enum field will result in an error 500. +jpCustomField :: Lens' JobsPatch' (Maybe Text) +jpCustomField + = lens _jpCustomField + (\ s a -> s{_jpCustomField = a}) + +-- | Data format for the response. +jpAlt :: Lens' JobsPatch' Text +jpAlt = lens _jpAlt (\ s a -> s{_jpAlt = a}) + +instance GoogleRequest JobsPatch' where + type Rs JobsPatch' = Job + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u JobsPatch{..} + = go _jpQuotaUser _jpPrettyPrint _jpJobId _jpProgress + _jpNote + _jpUserIp + _jpTeamId + _jpCustomerPhoneNumber + _jpCustomerName + _jpAddress + _jpAssignee + _jpLat + _jpKey + _jpLng + _jpTitle + _jpOauthToken + _jpFields + _jpCustomField + _jpAlt + where go + = clientWithRoute (Proxy :: Proxy JobsPatchAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Update.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Update.hs new file mode 100644 index 000000000..6ecd64733 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/Update.hs @@ -0,0 +1,287 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Jobs.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a job. Fields that are set in the job state will be updated. +-- +-- /See:/ for @CoordinateJobsUpdate@. +module Coordinate.Jobs.Update + ( + -- * REST Resource + JobsUpdateAPI + + -- * Creating a Request + , jobsUpdate + , JobsUpdate + + -- * Request Lenses + , juQuotaUser + , juPrettyPrint + , juJobId + , juProgress + , juNote + , juUserIp + , juTeamId + , juCustomerPhoneNumber + , juCustomerName + , juAddress + , juAssignee + , juLat + , juKey + , juLng + , juTitle + , juOauthToken + , juFields + , juCustomField + , juAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateJobsUpdate@ which the +-- 'JobsUpdate' request conforms to. +type JobsUpdateAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + Capture "jobId" Word64 :> + QueryParam "progress" Text :> + QueryParam "note" Text :> + QueryParam "customerPhoneNumber" Text :> + QueryParam "customerName" Text :> + QueryParam "address" Text :> + QueryParam "assignee" Text :> + QueryParam "lat" Double :> + QueryParam "lng" Double :> + QueryParam "title" Text :> + QueryParams "customField" Text :> Put '[JSON] Job + +-- | Updates a job. Fields that are set in the job state will be updated. +-- +-- /See:/ 'jobsUpdate' smart constructor. +data JobsUpdate = JobsUpdate + { _juQuotaUser :: !(Maybe Text) + , _juPrettyPrint :: !Bool + , _juJobId :: !Word64 + , _juProgress :: !(Maybe Text) + , _juNote :: !(Maybe Text) + , _juUserIp :: !(Maybe Text) + , _juTeamId :: !Text + , _juCustomerPhoneNumber :: !(Maybe Text) + , _juCustomerName :: !(Maybe Text) + , _juAddress :: !(Maybe Text) + , _juAssignee :: !(Maybe Text) + , _juLat :: !(Maybe Double) + , _juKey :: !(Maybe Text) + , _juLng :: !(Maybe Double) + , _juTitle :: !(Maybe Text) + , _juOauthToken :: !(Maybe Text) + , _juFields :: !(Maybe Text) + , _juCustomField :: !(Maybe Text) + , _juAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'JobsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'juQuotaUser' +-- +-- * 'juPrettyPrint' +-- +-- * 'juJobId' +-- +-- * 'juProgress' +-- +-- * 'juNote' +-- +-- * 'juUserIp' +-- +-- * 'juTeamId' +-- +-- * 'juCustomerPhoneNumber' +-- +-- * 'juCustomerName' +-- +-- * 'juAddress' +-- +-- * 'juAssignee' +-- +-- * 'juLat' +-- +-- * 'juKey' +-- +-- * 'juLng' +-- +-- * 'juTitle' +-- +-- * 'juOauthToken' +-- +-- * 'juFields' +-- +-- * 'juCustomField' +-- +-- * 'juAlt' +jobsUpdate + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> JobsUpdate +jobsUpdate pJuJobId_ pJuTeamId_ = + JobsUpdate + { _juQuotaUser = Nothing + , _juPrettyPrint = True + , _juJobId = pJuJobId_ + , _juProgress = Nothing + , _juNote = Nothing + , _juUserIp = Nothing + , _juTeamId = pJuTeamId_ + , _juCustomerPhoneNumber = Nothing + , _juCustomerName = Nothing + , _juAddress = Nothing + , _juAssignee = Nothing + , _juLat = Nothing + , _juKey = Nothing + , _juLng = Nothing + , _juTitle = Nothing + , _juOauthToken = Nothing + , _juFields = Nothing + , _juCustomField = Nothing + , _juAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +juQuotaUser :: Lens' JobsUpdate' (Maybe Text) +juQuotaUser + = lens _juQuotaUser (\ s a -> s{_juQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +juPrettyPrint :: Lens' JobsUpdate' Bool +juPrettyPrint + = lens _juPrettyPrint + (\ s a -> s{_juPrettyPrint = a}) + +-- | Job number +juJobId :: Lens' JobsUpdate' Word64 +juJobId = lens _juJobId (\ s a -> s{_juJobId = a}) + +-- | Job progress +juProgress :: Lens' JobsUpdate' (Maybe Text) +juProgress + = lens _juProgress (\ s a -> s{_juProgress = a}) + +-- | Job note as newline (Unix) separated string +juNote :: Lens' JobsUpdate' (Maybe Text) +juNote = lens _juNote (\ s a -> s{_juNote = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +juUserIp :: Lens' JobsUpdate' (Maybe Text) +juUserIp = lens _juUserIp (\ s a -> s{_juUserIp = a}) + +-- | Team ID +juTeamId :: Lens' JobsUpdate' Text +juTeamId = lens _juTeamId (\ s a -> s{_juTeamId = a}) + +-- | Customer phone number +juCustomerPhoneNumber :: Lens' JobsUpdate' (Maybe Text) +juCustomerPhoneNumber + = lens _juCustomerPhoneNumber + (\ s a -> s{_juCustomerPhoneNumber = a}) + +-- | Customer name +juCustomerName :: Lens' JobsUpdate' (Maybe Text) +juCustomerName + = lens _juCustomerName + (\ s a -> s{_juCustomerName = a}) + +-- | Job address as newline (Unix) separated string +juAddress :: Lens' JobsUpdate' (Maybe Text) +juAddress + = lens _juAddress (\ s a -> s{_juAddress = a}) + +-- | Assignee email address, or empty string to unassign. +juAssignee :: Lens' JobsUpdate' (Maybe Text) +juAssignee + = lens _juAssignee (\ s a -> s{_juAssignee = a}) + +-- | The latitude coordinate of this job\'s location. +juLat :: Lens' JobsUpdate' (Maybe Double) +juLat = lens _juLat (\ s a -> s{_juLat = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +juKey :: Lens' JobsUpdate' (Maybe Text) +juKey = lens _juKey (\ s a -> s{_juKey = a}) + +-- | The longitude coordinate of this job\'s location. +juLng :: Lens' JobsUpdate' (Maybe Double) +juLng = lens _juLng (\ s a -> s{_juLng = a}) + +-- | Job title +juTitle :: Lens' JobsUpdate' (Maybe Text) +juTitle = lens _juTitle (\ s a -> s{_juTitle = a}) + +-- | OAuth 2.0 token for the current user. +juOauthToken :: Lens' JobsUpdate' (Maybe Text) +juOauthToken + = lens _juOauthToken (\ s a -> s{_juOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +juFields :: Lens' JobsUpdate' (Maybe Text) +juFields = lens _juFields (\ s a -> s{_juFields = a}) + +-- | Sets the value of custom fields. To set a custom field, pass the field +-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character, +-- and the desired value as a parameter. For example, +-- customField=12%3DAlice. Repeat the parameter for each custom field. Note +-- that \'=\' cannot appear in the parameter value. Specifying an invalid, +-- or inactive enum field will result in an error 500. +juCustomField :: Lens' JobsUpdate' (Maybe Text) +juCustomField + = lens _juCustomField + (\ s a -> s{_juCustomField = a}) + +-- | Data format for the response. +juAlt :: Lens' JobsUpdate' Text +juAlt = lens _juAlt (\ s a -> s{_juAlt = a}) + +instance GoogleRequest JobsUpdate' where + type Rs JobsUpdate' = Job + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u JobsUpdate{..} + = go _juQuotaUser _juPrettyPrint _juJobId _juProgress + _juNote + _juUserIp + _juTeamId + _juCustomerPhoneNumber + _juCustomerName + _juAddress + _juAssignee + _juLat + _juKey + _juLng + _juTitle + _juOauthToken + _juFields + _juCustomField + _juAlt + where go + = clientWithRoute (Proxy :: Proxy JobsUpdateAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Location/List.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Location/List.hs new file mode 100644 index 000000000..a1de25c56 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Location/List.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Location.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of locations for a worker. +-- +-- /See:/ for @CoordinateLocationList@. +module Coordinate.Location.List + ( + -- * REST Resource + LocationListAPI + + -- * Creating a Request + , locationList + , LocationList + + -- * Request Lenses + , llQuotaUser + , llPrettyPrint + , llWorkerEmail + , llUserIp + , llStartTimestampMs + , llTeamId + , llKey + , llPageToken + , llOauthToken + , llMaxResults + , llFields + , llAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateLocationList@ which the +-- 'LocationList' request conforms to. +type LocationListAPI = + "teams" :> + Capture "teamId" Text :> + "workers" :> + Capture "workerEmail" Text :> + "locations" :> + QueryParam "startTimestampMs" Word64 :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] LocationListResponse + +-- | Retrieves a list of locations for a worker. +-- +-- /See:/ 'locationList' smart constructor. +data LocationList = LocationList + { _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llWorkerEmail :: !Text + , _llUserIp :: !(Maybe Text) + , _llStartTimestampMs :: !Word64 + , _llTeamId :: !Text + , _llKey :: !(Maybe Text) + , _llPageToken :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llMaxResults :: !(Maybe Word32) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llWorkerEmail' +-- +-- * 'llUserIp' +-- +-- * 'llStartTimestampMs' +-- +-- * 'llTeamId' +-- +-- * 'llKey' +-- +-- * 'llPageToken' +-- +-- * 'llOauthToken' +-- +-- * 'llMaxResults' +-- +-- * 'llFields' +-- +-- * 'llAlt' +locationList + :: Text -- ^ 'workerEmail' + -> Word64 -- ^ 'startTimestampMs' + -> Text -- ^ 'teamId' + -> LocationList +locationList pLlWorkerEmail_ pLlStartTimestampMs_ pLlTeamId_ = + LocationList + { _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llWorkerEmail = pLlWorkerEmail_ + , _llUserIp = Nothing + , _llStartTimestampMs = pLlStartTimestampMs_ + , _llTeamId = pLlTeamId_ + , _llKey = Nothing + , _llPageToken = Nothing + , _llOauthToken = Nothing + , _llMaxResults = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LocationList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LocationList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | Worker email address. +llWorkerEmail :: Lens' LocationList' Text +llWorkerEmail + = lens _llWorkerEmail + (\ s a -> s{_llWorkerEmail = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LocationList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | Start timestamp in milliseconds since the epoch. +llStartTimestampMs :: Lens' LocationList' Word64 +llStartTimestampMs + = lens _llStartTimestampMs + (\ s a -> s{_llStartTimestampMs = a}) + +-- | Team ID +llTeamId :: Lens' LocationList' Text +llTeamId = lens _llTeamId (\ s a -> s{_llTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LocationList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | Continuation token +llPageToken :: Lens' LocationList' (Maybe Text) +llPageToken + = lens _llPageToken (\ s a -> s{_llPageToken = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LocationList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | Maximum number of results to return in one page. +llMaxResults :: Lens' LocationList' (Maybe Word32) +llMaxResults + = lens _llMaxResults (\ s a -> s{_llMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LocationList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LocationList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LocationList' where + type Rs LocationList' = LocationListResponse + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u LocationList{..} + = go _llQuotaUser _llPrettyPrint _llWorkerEmail + _llUserIp + (Just _llStartTimestampMs) + _llTeamId + _llKey + _llPageToken + _llOauthToken + _llMaxResults + _llFields + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LocationListAPI) r + u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Get.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Get.hs new file mode 100644 index 000000000..6467dd5ba --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Get.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Schedule.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the schedule for a job. +-- +-- /See:/ for @CoordinateScheduleGet@. +module Coordinate.Schedule.Get + ( + -- * REST Resource + ScheduleGetAPI + + -- * Creating a Request + , scheduleGet + , ScheduleGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgJobId + , sgUserIp + , sgTeamId + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateScheduleGet@ which the +-- 'ScheduleGet' request conforms to. +type ScheduleGetAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + Capture "jobId" Word64 :> + "schedule" :> Get '[JSON] Schedule + +-- | Retrieves the schedule for a job. +-- +-- /See:/ 'scheduleGet' smart constructor. +data ScheduleGet = ScheduleGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgJobId :: !Word64 + , _sgUserIp :: !(Maybe Text) + , _sgTeamId :: !Text + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScheduleGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgJobId' +-- +-- * 'sgUserIp' +-- +-- * 'sgTeamId' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +scheduleGet + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> ScheduleGet +scheduleGet pSgJobId_ pSgTeamId_ = + ScheduleGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgJobId = pSgJobId_ + , _sgUserIp = Nothing + , _sgTeamId = pSgTeamId_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' ScheduleGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' ScheduleGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | Job number +sgJobId :: Lens' ScheduleGet' Word64 +sgJobId = lens _sgJobId (\ s a -> s{_sgJobId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' ScheduleGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | Team ID +sgTeamId :: Lens' ScheduleGet' Text +sgTeamId = lens _sgTeamId (\ s a -> s{_sgTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' ScheduleGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' ScheduleGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' ScheduleGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' ScheduleGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest ScheduleGet' where + type Rs ScheduleGet' = Schedule + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u ScheduleGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgJobId _sgUserIp + _sgTeamId + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy ScheduleGetAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs new file mode 100644 index 000000000..20a1d062c --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs @@ -0,0 +1,216 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Schedule.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Replaces the schedule of a job with the provided schedule. This method +-- supports patch semantics. +-- +-- /See:/ for @CoordinateSchedulePatch@. +module Coordinate.Schedule.Patch + ( + -- * REST Resource + SchedulePatchAPI + + -- * Creating a Request + , schedulePatch + , SchedulePatch + + -- * Request Lenses + , spQuotaUser + , spPrettyPrint + , spJobId + , spAllDay + , spStartTime + , spUserIp + , spTeamId + , spKey + , spEndTime + , spOauthToken + , spDuration + , spFields + , spAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateSchedulePatch@ which the +-- 'SchedulePatch' request conforms to. +type SchedulePatchAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + Capture "jobId" Word64 :> + "schedule" :> + QueryParam "allDay" Bool :> + QueryParam "startTime" Word64 :> + QueryParam "endTime" Word64 :> + QueryParam "duration" Word64 :> + Patch '[JSON] Schedule + +-- | Replaces the schedule of a job with the provided schedule. This method +-- supports patch semantics. +-- +-- /See:/ 'schedulePatch' smart constructor. +data SchedulePatch = SchedulePatch + { _spQuotaUser :: !(Maybe Text) + , _spPrettyPrint :: !Bool + , _spJobId :: !Word64 + , _spAllDay :: !(Maybe Bool) + , _spStartTime :: !(Maybe Word64) + , _spUserIp :: !(Maybe Text) + , _spTeamId :: !Text + , _spKey :: !(Maybe Text) + , _spEndTime :: !(Maybe Word64) + , _spOauthToken :: !(Maybe Text) + , _spDuration :: !(Maybe Word64) + , _spFields :: !(Maybe Text) + , _spAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SchedulePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spQuotaUser' +-- +-- * 'spPrettyPrint' +-- +-- * 'spJobId' +-- +-- * 'spAllDay' +-- +-- * 'spStartTime' +-- +-- * 'spUserIp' +-- +-- * 'spTeamId' +-- +-- * 'spKey' +-- +-- * 'spEndTime' +-- +-- * 'spOauthToken' +-- +-- * 'spDuration' +-- +-- * 'spFields' +-- +-- * 'spAlt' +schedulePatch + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> SchedulePatch +schedulePatch pSpJobId_ pSpTeamId_ = + SchedulePatch + { _spQuotaUser = Nothing + , _spPrettyPrint = True + , _spJobId = pSpJobId_ + , _spAllDay = Nothing + , _spStartTime = Nothing + , _spUserIp = Nothing + , _spTeamId = pSpTeamId_ + , _spKey = Nothing + , _spEndTime = Nothing + , _spOauthToken = Nothing + , _spDuration = Nothing + , _spFields = Nothing + , _spAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +spQuotaUser :: Lens' SchedulePatch' (Maybe Text) +spQuotaUser + = lens _spQuotaUser (\ s a -> s{_spQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +spPrettyPrint :: Lens' SchedulePatch' Bool +spPrettyPrint + = lens _spPrettyPrint + (\ s a -> s{_spPrettyPrint = a}) + +-- | Job number +spJobId :: Lens' SchedulePatch' Word64 +spJobId = lens _spJobId (\ s a -> s{_spJobId = a}) + +-- | Whether the job is scheduled for the whole day. Time of day in +-- start\/end times is ignored if this is true. +spAllDay :: Lens' SchedulePatch' (Maybe Bool) +spAllDay = lens _spAllDay (\ s a -> s{_spAllDay = a}) + +-- | Scheduled start time in milliseconds since epoch. +spStartTime :: Lens' SchedulePatch' (Maybe Word64) +spStartTime + = lens _spStartTime (\ s a -> s{_spStartTime = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +spUserIp :: Lens' SchedulePatch' (Maybe Text) +spUserIp = lens _spUserIp (\ s a -> s{_spUserIp = a}) + +-- | Team ID +spTeamId :: Lens' SchedulePatch' Text +spTeamId = lens _spTeamId (\ s a -> s{_spTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +spKey :: Lens' SchedulePatch' (Maybe Text) +spKey = lens _spKey (\ s a -> s{_spKey = a}) + +-- | Scheduled end time in milliseconds since epoch. +spEndTime :: Lens' SchedulePatch' (Maybe Word64) +spEndTime + = lens _spEndTime (\ s a -> s{_spEndTime = a}) + +-- | OAuth 2.0 token for the current user. +spOauthToken :: Lens' SchedulePatch' (Maybe Text) +spOauthToken + = lens _spOauthToken (\ s a -> s{_spOauthToken = a}) + +-- | Job duration in milliseconds. +spDuration :: Lens' SchedulePatch' (Maybe Word64) +spDuration + = lens _spDuration (\ s a -> s{_spDuration = a}) + +-- | Selector specifying which fields to include in a partial response. +spFields :: Lens' SchedulePatch' (Maybe Text) +spFields = lens _spFields (\ s a -> s{_spFields = a}) + +-- | Data format for the response. +spAlt :: Lens' SchedulePatch' Text +spAlt = lens _spAlt (\ s a -> s{_spAlt = a}) + +instance GoogleRequest SchedulePatch' where + type Rs SchedulePatch' = Schedule + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u SchedulePatch{..} + = go _spQuotaUser _spPrettyPrint _spJobId _spAllDay + _spStartTime + _spUserIp + _spTeamId + _spKey + _spEndTime + _spOauthToken + _spDuration + _spFields + _spAlt + where go + = clientWithRoute (Proxy :: Proxy SchedulePatchAPI) r + u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Update.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Update.hs new file mode 100644 index 000000000..8e70a6925 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Schedule/Update.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Schedule.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Replaces the schedule of a job with the provided schedule. +-- +-- /See:/ for @CoordinateScheduleUpdate@. +module Coordinate.Schedule.Update + ( + -- * REST Resource + ScheduleUpdateAPI + + -- * Creating a Request + , scheduleUpdate + , ScheduleUpdate + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suJobId + , suAllDay + , suStartTime + , suUserIp + , suTeamId + , suKey + , suEndTime + , suOauthToken + , suDuration + , suFields + , suAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateScheduleUpdate@ which the +-- 'ScheduleUpdate' request conforms to. +type ScheduleUpdateAPI = + "teams" :> + Capture "teamId" Text :> + "jobs" :> + Capture "jobId" Word64 :> + "schedule" :> + QueryParam "allDay" Bool :> + QueryParam "startTime" Word64 :> + QueryParam "endTime" Word64 :> + QueryParam "duration" Word64 :> Put '[JSON] Schedule + +-- | Replaces the schedule of a job with the provided schedule. +-- +-- /See:/ 'scheduleUpdate' smart constructor. +data ScheduleUpdate = ScheduleUpdate + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suJobId :: !Word64 + , _suAllDay :: !(Maybe Bool) + , _suStartTime :: !(Maybe Word64) + , _suUserIp :: !(Maybe Text) + , _suTeamId :: !Text + , _suKey :: !(Maybe Text) + , _suEndTime :: !(Maybe Word64) + , _suOauthToken :: !(Maybe Text) + , _suDuration :: !(Maybe Word64) + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScheduleUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suJobId' +-- +-- * 'suAllDay' +-- +-- * 'suStartTime' +-- +-- * 'suUserIp' +-- +-- * 'suTeamId' +-- +-- * 'suKey' +-- +-- * 'suEndTime' +-- +-- * 'suOauthToken' +-- +-- * 'suDuration' +-- +-- * 'suFields' +-- +-- * 'suAlt' +scheduleUpdate + :: Word64 -- ^ 'jobId' + -> Text -- ^ 'teamId' + -> ScheduleUpdate +scheduleUpdate pSuJobId_ pSuTeamId_ = + ScheduleUpdate + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suJobId = pSuJobId_ + , _suAllDay = Nothing + , _suStartTime = Nothing + , _suUserIp = Nothing + , _suTeamId = pSuTeamId_ + , _suKey = Nothing + , _suEndTime = Nothing + , _suOauthToken = Nothing + , _suDuration = Nothing + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' ScheduleUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' ScheduleUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | Job number +suJobId :: Lens' ScheduleUpdate' Word64 +suJobId = lens _suJobId (\ s a -> s{_suJobId = a}) + +-- | Whether the job is scheduled for the whole day. Time of day in +-- start\/end times is ignored if this is true. +suAllDay :: Lens' ScheduleUpdate' (Maybe Bool) +suAllDay = lens _suAllDay (\ s a -> s{_suAllDay = a}) + +-- | Scheduled start time in milliseconds since epoch. +suStartTime :: Lens' ScheduleUpdate' (Maybe Word64) +suStartTime + = lens _suStartTime (\ s a -> s{_suStartTime = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' ScheduleUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | Team ID +suTeamId :: Lens' ScheduleUpdate' Text +suTeamId = lens _suTeamId (\ s a -> s{_suTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' ScheduleUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | Scheduled end time in milliseconds since epoch. +suEndTime :: Lens' ScheduleUpdate' (Maybe Word64) +suEndTime + = lens _suEndTime (\ s a -> s{_suEndTime = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' ScheduleUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Job duration in milliseconds. +suDuration :: Lens' ScheduleUpdate' (Maybe Word64) +suDuration + = lens _suDuration (\ s a -> s{_suDuration = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' ScheduleUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' ScheduleUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest ScheduleUpdate' where + type Rs ScheduleUpdate' = Schedule + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u ScheduleUpdate{..} + = go _suQuotaUser _suPrettyPrint _suJobId _suAllDay + _suStartTime + _suUserIp + _suTeamId + _suKey + _suEndTime + _suOauthToken + _suDuration + _suFields + _suAlt + where go + = clientWithRoute (Proxy :: Proxy ScheduleUpdateAPI) + r + u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Team/List.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Team/List.hs new file mode 100644 index 000000000..9dd033ee1 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Team/List.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Team.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of teams for a user. +-- +-- /See:/ for @CoordinateTeamList@. +module Coordinate.Team.List + ( + -- * REST Resource + TeamListAPI + + -- * Creating a Request + , teamList + , TeamList + + -- * Request Lenses + , tlQuotaUser + , tlDispatcher + , tlPrettyPrint + , tlAdmin + , tlUserIp + , tlKey + , tlOauthToken + , tlWorker + , tlFields + , tlAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateTeamList@ which the +-- 'TeamList' request conforms to. +type TeamListAPI = + "teams" :> + QueryParam "dispatcher" Bool :> + QueryParam "admin" Bool :> + QueryParam "worker" Bool :> + Get '[JSON] TeamListResponse + +-- | Retrieves a list of teams for a user. +-- +-- /See:/ 'teamList' smart constructor. +data TeamList = TeamList + { _tlQuotaUser :: !(Maybe Text) + , _tlDispatcher :: !(Maybe Bool) + , _tlPrettyPrint :: !Bool + , _tlAdmin :: !(Maybe Bool) + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlWorker :: !(Maybe Bool) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TeamList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlDispatcher' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlAdmin' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlOauthToken' +-- +-- * 'tlWorker' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +teamList + :: TeamList +teamList = + TeamList + { _tlQuotaUser = Nothing + , _tlDispatcher = Nothing + , _tlPrettyPrint = True + , _tlAdmin = Nothing + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlOauthToken = Nothing + , _tlWorker = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TeamList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Whether to include teams for which the user has the Dispatcher role. +tlDispatcher :: Lens' TeamList' (Maybe Bool) +tlDispatcher + = lens _tlDispatcher (\ s a -> s{_tlDispatcher = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TeamList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | Whether to include teams for which the user has the Admin role. +tlAdmin :: Lens' TeamList' (Maybe Bool) +tlAdmin = lens _tlAdmin (\ s a -> s{_tlAdmin = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TeamList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TeamList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TeamList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Whether to include teams for which the user has the Worker role. +tlWorker :: Lens' TeamList' (Maybe Bool) +tlWorker = lens _tlWorker (\ s a -> s{_tlWorker = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TeamList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TeamList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TeamList' where + type Rs TeamList' = TeamListResponse + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u TeamList{..} + = go _tlQuotaUser _tlDispatcher _tlPrettyPrint + _tlAdmin + _tlUserIp + _tlKey + _tlOauthToken + _tlWorker + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TeamListAPI) r u diff --git a/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Worker/List.hs b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Worker/List.hs new file mode 100644 index 000000000..540dcd916 --- /dev/null +++ b/gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Worker/List.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Coordinate.Worker.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of workers in a team. +-- +-- /See:/ for @CoordinateWorkerList@. +module Coordinate.Worker.List + ( + -- * REST Resource + WorkerListAPI + + -- * Creating a Request + , workerList + , WorkerList + + -- * Request Lenses + , wlQuotaUser + , wlPrettyPrint + , wlUserIp + , wlTeamId + , wlKey + , wlOauthToken + , wlFields + , wlAlt + ) where + +import Network.Google.MapsCoordinate.Types +import Network.Google.Prelude + +-- | A resource alias for @CoordinateWorkerList@ which the +-- 'WorkerList' request conforms to. +type WorkerListAPI = + "teams" :> + Capture "teamId" Text :> + "workers" :> Get '[JSON] WorkerListResponse + +-- | Retrieves a list of workers in a team. +-- +-- /See:/ 'workerList' smart constructor. +data WorkerList = WorkerList + { _wlQuotaUser :: !(Maybe Text) + , _wlPrettyPrint :: !Bool + , _wlUserIp :: !(Maybe Text) + , _wlTeamId :: !Text + , _wlKey :: !(Maybe Text) + , _wlOauthToken :: !(Maybe Text) + , _wlFields :: !(Maybe Text) + , _wlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WorkerList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wlQuotaUser' +-- +-- * 'wlPrettyPrint' +-- +-- * 'wlUserIp' +-- +-- * 'wlTeamId' +-- +-- * 'wlKey' +-- +-- * 'wlOauthToken' +-- +-- * 'wlFields' +-- +-- * 'wlAlt' +workerList + :: Text -- ^ 'teamId' + -> WorkerList +workerList pWlTeamId_ = + WorkerList + { _wlQuotaUser = Nothing + , _wlPrettyPrint = True + , _wlUserIp = Nothing + , _wlTeamId = pWlTeamId_ + , _wlKey = Nothing + , _wlOauthToken = Nothing + , _wlFields = Nothing + , _wlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wlQuotaUser :: Lens' WorkerList' (Maybe Text) +wlQuotaUser + = lens _wlQuotaUser (\ s a -> s{_wlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wlPrettyPrint :: Lens' WorkerList' Bool +wlPrettyPrint + = lens _wlPrettyPrint + (\ s a -> s{_wlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wlUserIp :: Lens' WorkerList' (Maybe Text) +wlUserIp = lens _wlUserIp (\ s a -> s{_wlUserIp = a}) + +-- | Team ID +wlTeamId :: Lens' WorkerList' Text +wlTeamId = lens _wlTeamId (\ s a -> s{_wlTeamId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wlKey :: Lens' WorkerList' (Maybe Text) +wlKey = lens _wlKey (\ s a -> s{_wlKey = a}) + +-- | OAuth 2.0 token for the current user. +wlOauthToken :: Lens' WorkerList' (Maybe Text) +wlOauthToken + = lens _wlOauthToken (\ s a -> s{_wlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wlFields :: Lens' WorkerList' (Maybe Text) +wlFields = lens _wlFields (\ s a -> s{_wlFields = a}) + +-- | Data format for the response. +wlAlt :: Lens' WorkerList' Text +wlAlt = lens _wlAlt (\ s a -> s{_wlAlt = a}) + +instance GoogleRequest WorkerList' where + type Rs WorkerList' = WorkerListResponse + request = requestWithRoute defReq mapsCoordinateURL + requestWithRoute r u WorkerList{..} + = go _wlQuotaUser _wlPrettyPrint _wlUserIp _wlTeamId + _wlKey + _wlOauthToken + _wlFields + _wlAlt + where go + = clientWithRoute (Proxy :: Proxy WorkerListAPI) r u diff --git a/gogol-maps-coordinate/gogol-maps-coordinate.cabal b/gogol-maps-coordinate/gogol-maps-coordinate.cabal new file mode 100644 index 000000000..d8a36270f --- /dev/null +++ b/gogol-maps-coordinate/gogol-maps-coordinate.cabal @@ -0,0 +1,54 @@ +name: gogol-maps-coordinate +version: 0.0.1 +synopsis: Google Maps Coordinate API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you view and manage jobs in a Coordinate team. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.MapsCoordinate + , Network.Google.MapsCoordinate.Types + , Network.Google.Resource.Coordinate.CustomFieldDef.List + , Network.Google.Resource.Coordinate.Jobs.Get + , Network.Google.Resource.Coordinate.Jobs.Insert + , Network.Google.Resource.Coordinate.Jobs.List + , Network.Google.Resource.Coordinate.Jobs.Patch + , Network.Google.Resource.Coordinate.Jobs.Update + , Network.Google.Resource.Coordinate.Location.List + , Network.Google.Resource.Coordinate.Schedule.Get + , Network.Google.Resource.Coordinate.Schedule.Patch + , Network.Google.Resource.Coordinate.Schedule.Update + , Network.Google.Resource.Coordinate.Team.List + , Network.Google.Resource.Coordinate.Worker.List + + other-modules: + Network.Google.MapsCoordinate.Types.Product + , Network.Google.MapsCoordinate.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-maps-coordinate/src/.gitkeep b/gogol-maps-coordinate/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-maps-engine/LICENSE b/gogol-maps-engine/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-maps-engine/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-maps-engine/Makefile b/gogol-maps-engine/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-maps-engine/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-maps-engine/README.md b/gogol-maps-engine/README.md new file mode 100644 index 000000000..96ec322ee --- /dev/null +++ b/gogol-maps-engine/README.md @@ -0,0 +1,28 @@ +# gogol-maps-engine + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Maps Engine API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-maps-engine` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-maps-engine/Setup.hs b/gogol-maps-engine/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-maps-engine/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-maps-engine/gen/Network/Google/MapEngine.hs b/gogol-maps-engine/gen/Network/Google/MapEngine.hs new file mode 100644 index 000000000..3ced4e469 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/MapEngine.hs @@ -0,0 +1,928 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.MapEngine +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Maps Engine API allows developers to store and query +-- geospatial vector and raster data. +-- +-- /See:/ +module Network.Google.MapEngine + ( + -- * API + MapEngineAPI + , mapEngineAPI + , mapEngineURL + + -- * Service Methods + + -- * REST Resources + + -- ** MapsengineAssetsGet + , module Mapsengine.Assets.Get + + -- ** MapsengineAssetsList + , module Mapsengine.Assets.List + + -- ** MapsengineAssetsParentsList + , module Mapsengine.Assets.Parents.List + + -- ** MapsengineAssetsPermissionsList + , module Mapsengine.Assets.Permissions.List + + -- ** MapsengineLayersCancelProcessing + , module Mapsengine.Layers.CancelProcessing + + -- ** MapsengineLayersCreate + , module Mapsengine.Layers.Create + + -- ** MapsengineLayersDelete + , module Mapsengine.Layers.Delete + + -- ** MapsengineLayersGet + , module Mapsengine.Layers.Get + + -- ** MapsengineLayersGetPublished + , module Mapsengine.Layers.GetPublished + + -- ** MapsengineLayersList + , module Mapsengine.Layers.List + + -- ** MapsengineLayersListPublished + , module Mapsengine.Layers.ListPublished + + -- ** MapsengineLayersParentsList + , module Mapsengine.Layers.Parents.List + + -- ** MapsengineLayersPatch + , module Mapsengine.Layers.Patch + + -- ** MapsengineLayersPermissionsBatchDelete + , module Mapsengine.Layers.Permissions.BatchDelete + + -- ** MapsengineLayersPermissionsBatchUpdate + , module Mapsengine.Layers.Permissions.BatchUpdate + + -- ** MapsengineLayersPermissionsList + , module Mapsengine.Layers.Permissions.List + + -- ** MapsengineLayersProcess + , module Mapsengine.Layers.Process + + -- ** MapsengineLayersPublish + , module Mapsengine.Layers.Publish + + -- ** MapsengineLayersUnpublish + , module Mapsengine.Layers.Unpublish + + -- ** MapsengineMapsCreate + , module Mapsengine.Maps.Create + + -- ** MapsengineMapsDelete + , module Mapsengine.Maps.Delete + + -- ** MapsengineMapsGet + , module Mapsengine.Maps.Get + + -- ** MapsengineMapsGetPublished + , module Mapsengine.Maps.GetPublished + + -- ** MapsengineMapsList + , module Mapsengine.Maps.List + + -- ** MapsengineMapsListPublished + , module Mapsengine.Maps.ListPublished + + -- ** MapsengineMapsPatch + , module Mapsengine.Maps.Patch + + -- ** MapsengineMapsPermissionsBatchDelete + , module Mapsengine.Maps.Permissions.BatchDelete + + -- ** MapsengineMapsPermissionsBatchUpdate + , module Mapsengine.Maps.Permissions.BatchUpdate + + -- ** MapsengineMapsPermissionsList + , module Mapsengine.Maps.Permissions.List + + -- ** MapsengineMapsPublish + , module Mapsengine.Maps.Publish + + -- ** MapsengineMapsUnpublish + , module Mapsengine.Maps.Unpublish + + -- ** MapsengineProjectsIconsCreate + , module Mapsengine.Projects.Icons.Create + + -- ** MapsengineProjectsIconsGet + , module Mapsengine.Projects.Icons.Get + + -- ** MapsengineProjectsIconsList + , module Mapsengine.Projects.Icons.List + + -- ** MapsengineProjectsList + , module Mapsengine.Projects.List + + -- ** MapsengineRasterCollectionsCancelProcessing + , module Mapsengine.RasterCollections.CancelProcessing + + -- ** MapsengineRasterCollectionsCreate + , module Mapsengine.RasterCollections.Create + + -- ** MapsengineRasterCollectionsDelete + , module Mapsengine.RasterCollections.Delete + + -- ** MapsengineRasterCollectionsGet + , module Mapsengine.RasterCollections.Get + + -- ** MapsengineRasterCollectionsList + , module Mapsengine.RasterCollections.List + + -- ** MapsengineRasterCollectionsParentsList + , module Mapsengine.RasterCollections.Parents.List + + -- ** MapsengineRasterCollectionsPatch + , module Mapsengine.RasterCollections.Patch + + -- ** MapsengineRasterCollectionsPermissionsBatchDelete + , module Mapsengine.RasterCollections.Permissions.BatchDelete + + -- ** MapsengineRasterCollectionsPermissionsBatchUpdate + , module Mapsengine.RasterCollections.Permissions.BatchUpdate + + -- ** MapsengineRasterCollectionsPermissionsList + , module Mapsengine.RasterCollections.Permissions.List + + -- ** MapsengineRasterCollectionsProcess + , module Mapsengine.RasterCollections.Process + + -- ** MapsengineRasterCollectionsRastersBatchDelete + , module Mapsengine.RasterCollections.Rasters.BatchDelete + + -- ** MapsengineRasterCollectionsRastersBatchInsert + , module Mapsengine.RasterCollections.Rasters.BatchInsert + + -- ** MapsengineRasterCollectionsRastersList + , module Mapsengine.RasterCollections.Rasters.List + + -- ** MapsengineRastersDelete + , module Mapsengine.Rasters.Delete + + -- ** MapsengineRastersFilesInsert + , module Mapsengine.Rasters.Files.Insert + + -- ** MapsengineRastersGet + , module Mapsengine.Rasters.Get + + -- ** MapsengineRastersList + , module Mapsengine.Rasters.List + + -- ** MapsengineRastersParentsList + , module Mapsengine.Rasters.Parents.List + + -- ** MapsengineRastersPatch + , module Mapsengine.Rasters.Patch + + -- ** MapsengineRastersPermissionsBatchDelete + , module Mapsengine.Rasters.Permissions.BatchDelete + + -- ** MapsengineRastersPermissionsBatchUpdate + , module Mapsengine.Rasters.Permissions.BatchUpdate + + -- ** MapsengineRastersPermissionsList + , module Mapsengine.Rasters.Permissions.List + + -- ** MapsengineRastersProcess + , module Mapsengine.Rasters.Process + + -- ** MapsengineRastersUpload + , module Mapsengine.Rasters.Upload + + -- ** MapsengineTablesCreate + , module Mapsengine.Tables.Create + + -- ** MapsengineTablesDelete + , module Mapsengine.Tables.Delete + + -- ** MapsengineTablesFeaturesBatchDelete + , module Mapsengine.Tables.Features.BatchDelete + + -- ** MapsengineTablesFeaturesBatchInsert + , module Mapsengine.Tables.Features.BatchInsert + + -- ** MapsengineTablesFeaturesBatchPatch + , module Mapsengine.Tables.Features.BatchPatch + + -- ** MapsengineTablesFeaturesGet + , module Mapsengine.Tables.Features.Get + + -- ** MapsengineTablesFeaturesList + , module Mapsengine.Tables.Features.List + + -- ** MapsengineTablesFilesInsert + , module Mapsengine.Tables.Files.Insert + + -- ** MapsengineTablesGet + , module Mapsengine.Tables.Get + + -- ** MapsengineTablesList + , module Mapsengine.Tables.List + + -- ** MapsengineTablesParentsList + , module Mapsengine.Tables.Parents.List + + -- ** MapsengineTablesPatch + , module Mapsengine.Tables.Patch + + -- ** MapsengineTablesPermissionsBatchDelete + , module Mapsengine.Tables.Permissions.BatchDelete + + -- ** MapsengineTablesPermissionsBatchUpdate + , module Mapsengine.Tables.Permissions.BatchUpdate + + -- ** MapsengineTablesPermissionsList + , module Mapsengine.Tables.Permissions.List + + -- ** MapsengineTablesProcess + , module Mapsengine.Tables.Process + + -- ** MapsengineTablesUpload + , module Mapsengine.Tables.Upload + + -- * Types + + -- ** Parent + , Parent + , parent + , pId + + -- ** PermissionsBatchUpdateRequest + , PermissionsBatchUpdateRequest + , permissionsBatchUpdateRequest + , pburPermissions + + -- ** GeoJSONProperties + , GeoJSONProperties + , geoJSONProperties + + -- ** FeaturesBatchPatchRequest + , FeaturesBatchPatchRequest + , featuresBatchPatchRequest + , fbprFeatures + , fbprNormalizeGeometries + + -- ** ValueRange + , ValueRange + , valueRange + , vrMax + , vrMin + + -- ** Feature + , Feature + , feature + , fGeometry + , fType + , fProperties + + -- ** PermissionsBatchDeleteRequest + , PermissionsBatchDeleteRequest + , permissionsBatchDeleteRequest + , pbdrIds + + -- ** GeoJSONGeometry + , GeoJSONGeometry + , geoJSONGeometry + + -- ** MapLayer + , MapLayer + , mapLayer + , mlDefaultViewport + , mlVisibility + , mlKey + , mlName + , mlId + , mlType + + -- ** RasterCollectionsListResponse + , RasterCollectionsListResponse + , rasterCollectionsListResponse + , rclrNextPageToken + , rclrRasterCollections + + -- ** ProjectsListResponse + , ProjectsListResponse + , projectsListResponse + , plrProjects + + -- ** ZoomLevels + , ZoomLevels + , zoomLevels + , zlMax + , zlMin + + -- ** FeatureInfo + , FeatureInfo + , featureInfo + , fiContent + + -- ** SizeRange + , SizeRange + , sizeRange + , srMax + , srMin + + -- ** MapFolder + , MapFolder + , mapFolder + , mfExpandable + , mfDefaultViewport + , mfContents + , mfVisibility + , mfKey + , mfName + , mfType + + -- ** RasterCollection + , RasterCollection + , rasterCollection + , rcCreationTime + , rcWritersCanEditPermissions + , rcEtag + , rcCreatorEmail + , rcRasterType + , rcLastModifiedTime + , rcLastModifierEmail + , rcName + , rcBbox + , rcProcessingStatus + , rcMosaic + , rcId + , rcProjectId + , rcDraftAccessList + , rcDescription + , rcAttribution + , rcTags + + -- ** Project + , Project + , project + , proName + , proId + + -- ** Color + , Color + , color + , cColor + , cOpacity + + -- ** Asset + , Asset + , asset + , aCreationTime + , aWritersCanEditPermissions + , aEtag + , aCreatorEmail + , aLastModifiedTime + , aLastModifierEmail + , aName + , aBbox + , aResource + , aId + , aProjectId + , aType + , aDescription + , aTags + + -- ** ProcessResponse + , ProcessResponse + , processResponse + + -- ** TableColumn + , TableColumn + , tableColumn + , tcName + , tcType + + -- ** RasterCollectionsRastersBatchDeleteResponse + , RasterCollectionsRastersBatchDeleteResponse + , rasterCollectionsRastersBatchDeleteResponse + + -- ** ScaledShape + , ScaledShape + , scaledShape + , ssBorder + , ssFill + , ssShape + + -- ** Icon + , Icon + , icon + , iName + , iId + , iDescription + + -- ** FeaturesBatchDeleteRequest + , FeaturesBatchDeleteRequest + , featuresBatchDeleteRequest + , fbdrPrimaryKeys + , fbdrGxIds + + -- ** RasterCollectionsRastersBatchInsertResponse + , RasterCollectionsRastersBatchInsertResponse + , rasterCollectionsRastersBatchInsertResponse + + -- ** FeaturesListResponse + , FeaturesListResponse + , featuresListResponse + , flrNextPageToken + , flrAllowedQueriesPerSecond + , flrSchema + , flrFeatures + , flrType + + -- ** ParentsListResponse + , ParentsListResponse + , parentsListResponse + , plrNextPageToken + , plrParents + + -- ** RasterCollectionsRasterBatchDeleteRequest + , RasterCollectionsRasterBatchDeleteRequest + , rasterCollectionsRasterBatchDeleteRequest + , rcrbdrIds + + -- ** LabelStyle + , LabelStyle + , labelStyle + , lsFontStyle + , lsColor + , lsSize + , lsOpacity + , lsOutline + , lsFontWeight + , lsColumn + + -- ** MapItem + , MapItem + , mapItem + + -- ** IconsListResponse + , IconsListResponse + , iconsListResponse + , ilrNextPageToken + , ilrIcons + + -- ** Schema + , Schema + , schema + , sPrimaryKey + , sColumns + , sPrimaryGeometry + + -- ** AcquisitionTime + , AcquisitionTime + , acquisitionTime + , atStart + , atPrecision + , atEnd + + -- ** TablesListResponse + , TablesListResponse + , tablesListResponse + , tlrNextPageToken + , tlrTables + + -- ** Map + , Map + , map' + , mapCreationTime + , mapWritersCanEditPermissions + , mapEtag + , mapDefaultViewport + , mapContents + , mapPublishingStatus + , mapCreatorEmail + , mapLastModifiedTime + , mapLastModifierEmail + , mapVersions + , mapName + , mapBbox + , mapProcessingStatus + , mapId + , mapProjectId + , mapDraftAccessList + , mapPublishedAccessList + , mapDescription + , mapTags + + -- ** IconStyle + , IconStyle + , iconStyle + , isScaledShape + , isScalingFunction + , isName + , isId + + -- ** Border + , Border + , border + , bColor + , bWidth + , bOpacity + + -- ** DisplayRule + , DisplayRule + , displayRule + , drPointOptions + , drPolygonOptions + , drZoomLevels + , drFilters + , drName + , drLineOptions + + -- ** PublishedMap + , PublishedMap + , publishedMap + , pmDefaultViewport + , pmContents + , pmName + , pmId + , pmProjectId + , pmDescription + + -- ** RasterCollectionsRastersBatchInsertRequest + , RasterCollectionsRastersBatchInsertRequest + , rasterCollectionsRastersBatchInsertRequest + , rcrbirIds + + -- ** RasterCollectionsRastersListResponse + , RasterCollectionsRastersListResponse + , rasterCollectionsRastersListResponse + , rcrlrNextPageToken + , rcrlrRasters + + -- ** GeoJSONMultiLineString + , GeoJSONMultiLineString + , geoJSONMultiLineString + , gjmlsCoordinates + , gjmlsType + + -- ** ScalingFunction + , ScalingFunction + , scalingFunction + , sfValueRange + , sfSizeRange + , sfScalingType + , sfColumn + + -- ** AssetsListResponse + , AssetsListResponse + , assetsListResponse + , alrNextPageToken + , alrAssets + + -- ** PublishResponse + , PublishResponse + , publishResponse + + -- ** RasterCollectionsRaster + , RasterCollectionsRaster + , rasterCollectionsRaster + , rcrCreationTime + , rcrRasterType + , rcrLastModifiedTime + , rcrName + , rcrBbox + , rcrId + , rcrProjectId + , rcrDescription + , rcrTags + + -- ** Datasource + , Datasource + , datasource + , dId + + -- ** FeaturesBatchInsertRequest + , FeaturesBatchInsertRequest + , featuresBatchInsertRequest + , fbirFeatures + , fbirNormalizeGeometries + + -- ** Filter + , Filter + , filter' + , fOperator + , fValue + , fColumn + + -- ** GeoJSONMultiPolygon + , GeoJSONMultiPolygon + , geoJSONMultiPolygon + , gjmpCoordinates + , gjmpType + + -- ** GeoJSONMultiPoint + , GeoJSONMultiPoint + , geoJSONMultiPoint + , gjsonmpCoordinates + , gjsonmpType + + -- ** Raster + , Raster + , raster + , rCreationTime + , rWritersCanEditPermissions + , rMaskType + , rEtag + , rCreatorEmail + , rRasterType + , rLastModifiedTime + , rLastModifierEmail + , rAcquisitionTime + , rName + , rBbox + , rProcessingStatus + , rFiles + , rId + , rProjectId + , rDraftAccessList + , rDescription + , rAttribution + , rTags + + -- ** PublishedLayer + , PublishedLayer + , publishedLayer + , plLayerType + , plName + , plId + , plProjectId + , plDescription + + -- ** PointStyle + , PointStyle + , pointStyle + , psIcon + , psLabel + + -- ** Permission + , Permission + , permission + , perRole + , perId + , perType + , perDiscoverable + + -- ** Layer + , Layer + , layer + , lCreationTime + , lWritersCanEditPermissions + , lStyle + , lEtag + , lDatasourceType + , lPublishingStatus + , lCreatorEmail + , lLayerType + , lLastModifiedTime + , lDatasources + , lLastModifierEmail + , lName + , lBbox + , lProcessingStatus + , lId + , lProjectId + , lDraftAccessList + , lPublishedAccessList + , lDescription + , lTags + + -- ** PolygonStyle + , PolygonStyle + , polygonStyle + , pStroke + , pFill + , pLabel + + -- ** PermissionsBatchUpdateResponse + , PermissionsBatchUpdateResponse + , permissionsBatchUpdateResponse + + -- ** MapKmlLink + , MapKmlLink + , mapKmlLink + , mklDefaultViewport + , mklVisibility + , mklName + , mklType + , mklKmlUrl + + -- ** VectorStyle + , VectorStyle + , vectorStyle + , vsDisplayRules + , vsFeatureInfo + , vsType + + -- ** PublishedMapsListResponse + , PublishedMapsListResponse + , publishedMapsListResponse + , pmlrMaps + , pmlrNextPageToken + + -- ** PermissionsBatchDeleteResponse + , PermissionsBatchDeleteResponse + , permissionsBatchDeleteResponse + + -- ** Table + , Table + , table + , tCreationTime + , tWritersCanEditPermissions + , tEtag + , tCreatorEmail + , tLastModifiedTime + , tSchema + , tLastModifierEmail + , tName + , tBbox + , tProcessingStatus + , tFiles + , tId + , tProjectId + , tDraftAccessList + , tPublishedAccessList + , tSourceEncoding + , tDescription + , tTags + + -- ** GeoJSONLineString + , GeoJSONLineString + , geoJSONLineString + , gjlsCoordinates + , gjlsType + + -- ** MapsListResponse + , MapsListResponse + , mapsListResponse + , mlrMaps + , mlrNextPageToken + + -- ** File + , File + , file + , fSize + , fUploadStatus + , fFilename + + -- ** LayersListResponse + , LayersListResponse + , layersListResponse + , llrNextPageToken + , llrLayers + + -- ** GeoJSONPolygon + , GeoJSONPolygon + , geoJSONPolygon + , gjpCoordinates + , gjpType + + -- ** GeoJSONPoint + , GeoJSONPoint + , geoJSONPoint + , gjsonpCoordinates + , gjsonpType + + -- ** PermissionsListResponse + , PermissionsListResponse + , permissionsListResponse + , plrPermissions + + -- ** LineStyle + , LineStyle + , lineStyle + , lsStroke + , lsBorder + , lsDash + , lsLabel + + -- ** PublishedLayersListResponse + , PublishedLayersListResponse + , publishedLayersListResponse + , pllrNextPageToken + , pllrLayers + + -- ** GeoJSONGeometryCollection + , GeoJSONGeometryCollection + , geoJSONGeometryCollection + , gjgcGeometries + , gjgcType + + -- ** RastersListResponse + , RastersListResponse + , rastersListResponse + , rlrNextPageToken + , rlrRasters + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude +import Network.Google.Resource.Mapsengine.Assets.Get +import Network.Google.Resource.Mapsengine.Assets.List +import Network.Google.Resource.Mapsengine.Assets.Parents.List +import Network.Google.Resource.Mapsengine.Assets.Permissions.List +import Network.Google.Resource.Mapsengine.Layers.CancelProcessing +import Network.Google.Resource.Mapsengine.Layers.Create +import Network.Google.Resource.Mapsengine.Layers.Delete +import Network.Google.Resource.Mapsengine.Layers.Get +import Network.Google.Resource.Mapsengine.Layers.GetPublished +import Network.Google.Resource.Mapsengine.Layers.List +import Network.Google.Resource.Mapsengine.Layers.ListPublished +import Network.Google.Resource.Mapsengine.Layers.Parents.List +import Network.Google.Resource.Mapsengine.Layers.Patch +import Network.Google.Resource.Mapsengine.Layers.Permissions.BatchDelete +import Network.Google.Resource.Mapsengine.Layers.Permissions.BatchUpdate +import Network.Google.Resource.Mapsengine.Layers.Permissions.List +import Network.Google.Resource.Mapsengine.Layers.Process +import Network.Google.Resource.Mapsengine.Layers.Publish +import Network.Google.Resource.Mapsengine.Layers.Unpublish +import Network.Google.Resource.Mapsengine.Maps.Create +import Network.Google.Resource.Mapsengine.Maps.Delete +import Network.Google.Resource.Mapsengine.Maps.Get +import Network.Google.Resource.Mapsengine.Maps.GetPublished +import Network.Google.Resource.Mapsengine.Maps.List +import Network.Google.Resource.Mapsengine.Maps.ListPublished +import Network.Google.Resource.Mapsengine.Maps.Patch +import Network.Google.Resource.Mapsengine.Maps.Permissions.BatchDelete +import Network.Google.Resource.Mapsengine.Maps.Permissions.BatchUpdate +import Network.Google.Resource.Mapsengine.Maps.Permissions.List +import Network.Google.Resource.Mapsengine.Maps.Publish +import Network.Google.Resource.Mapsengine.Maps.Unpublish +import Network.Google.Resource.Mapsengine.Projects.Icons.Create +import Network.Google.Resource.Mapsengine.Projects.Icons.Get +import Network.Google.Resource.Mapsengine.Projects.Icons.List +import Network.Google.Resource.Mapsengine.Projects.List +import Network.Google.Resource.Mapsengine.RasterCollections.CancelProcessing +import Network.Google.Resource.Mapsengine.RasterCollections.Create +import Network.Google.Resource.Mapsengine.RasterCollections.Delete +import Network.Google.Resource.Mapsengine.RasterCollections.Get +import Network.Google.Resource.Mapsengine.RasterCollections.List +import Network.Google.Resource.Mapsengine.RasterCollections.Parents.List +import Network.Google.Resource.Mapsengine.RasterCollections.Patch +import Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchDelete +import Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchUpdate +import Network.Google.Resource.Mapsengine.RasterCollections.Permissions.List +import Network.Google.Resource.Mapsengine.RasterCollections.Process +import Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchDelete +import Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchInsert +import Network.Google.Resource.Mapsengine.RasterCollections.Rasters.List +import Network.Google.Resource.Mapsengine.Rasters.Delete +import Network.Google.Resource.Mapsengine.Rasters.Files.Insert +import Network.Google.Resource.Mapsengine.Rasters.Get +import Network.Google.Resource.Mapsengine.Rasters.List +import Network.Google.Resource.Mapsengine.Rasters.Parents.List +import Network.Google.Resource.Mapsengine.Rasters.Patch +import Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchDelete +import Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchUpdate +import Network.Google.Resource.Mapsengine.Rasters.Permissions.List +import Network.Google.Resource.Mapsengine.Rasters.Process +import Network.Google.Resource.Mapsengine.Rasters.Upload +import Network.Google.Resource.Mapsengine.Tables.Create +import Network.Google.Resource.Mapsengine.Tables.Delete +import Network.Google.Resource.Mapsengine.Tables.Features.BatchDelete +import Network.Google.Resource.Mapsengine.Tables.Features.BatchInsert +import Network.Google.Resource.Mapsengine.Tables.Features.BatchPatch +import Network.Google.Resource.Mapsengine.Tables.Features.Get +import Network.Google.Resource.Mapsengine.Tables.Features.List +import Network.Google.Resource.Mapsengine.Tables.Files.Insert +import Network.Google.Resource.Mapsengine.Tables.Get +import Network.Google.Resource.Mapsengine.Tables.List +import Network.Google.Resource.Mapsengine.Tables.Parents.List +import Network.Google.Resource.Mapsengine.Tables.Patch +import Network.Google.Resource.Mapsengine.Tables.Permissions.BatchDelete +import Network.Google.Resource.Mapsengine.Tables.Permissions.BatchUpdate +import Network.Google.Resource.Mapsengine.Tables.Permissions.List +import Network.Google.Resource.Mapsengine.Tables.Process +import Network.Google.Resource.Mapsengine.Tables.Upload + +{- $resources +TODO +-} + +type MapEngineAPI = + Maps :<|> Tables :<|> Layers :<|> Rasters :<|> Assets + :<|> Projects + :<|> RasterCollections + +mapEngineAPI :: Proxy MapEngineAPI +mapEngineAPI = Proxy diff --git a/gogol-maps-engine/gen/Network/Google/MapEngine/Types.hs b/gogol-maps-engine/gen/Network/Google/MapEngine/Types.hs new file mode 100644 index 000000000..d19cb70f3 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/MapEngine/Types.hs @@ -0,0 +1,604 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapEngine.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapEngine.Types + ( + -- * Service URL + mapEngineURL + + -- * Parent + , Parent + , parent + , pId + + -- * PermissionsBatchUpdateRequest + , PermissionsBatchUpdateRequest + , permissionsBatchUpdateRequest + , pburPermissions + + -- * GeoJSONProperties + , GeoJSONProperties + , geoJSONProperties + + -- * FeaturesBatchPatchRequest + , FeaturesBatchPatchRequest + , featuresBatchPatchRequest + , fbprFeatures + , fbprNormalizeGeometries + + -- * ValueRange + , ValueRange + , valueRange + , vrMax + , vrMin + + -- * Feature + , Feature + , feature + , fGeometry + , fType + , fProperties + + -- * PermissionsBatchDeleteRequest + , PermissionsBatchDeleteRequest + , permissionsBatchDeleteRequest + , pbdrIds + + -- * GeoJSONGeometry + , GeoJSONGeometry + , geoJSONGeometry + + -- * MapLayer + , MapLayer + , mapLayer + , mlDefaultViewport + , mlVisibility + , mlKey + , mlName + , mlId + , mlType + + -- * RasterCollectionsListResponse + , RasterCollectionsListResponse + , rasterCollectionsListResponse + , rclrNextPageToken + , rclrRasterCollections + + -- * ProjectsListResponse + , ProjectsListResponse + , projectsListResponse + , plrProjects + + -- * ZoomLevels + , ZoomLevels + , zoomLevels + , zlMax + , zlMin + + -- * FeatureInfo + , FeatureInfo + , featureInfo + , fiContent + + -- * SizeRange + , SizeRange + , sizeRange + , srMax + , srMin + + -- * MapFolder + , MapFolder + , mapFolder + , mfExpandable + , mfDefaultViewport + , mfContents + , mfVisibility + , mfKey + , mfName + , mfType + + -- * RasterCollection + , RasterCollection + , rasterCollection + , rcCreationTime + , rcWritersCanEditPermissions + , rcEtag + , rcCreatorEmail + , rcRasterType + , rcLastModifiedTime + , rcLastModifierEmail + , rcName + , rcBbox + , rcProcessingStatus + , rcMosaic + , rcId + , rcProjectId + , rcDraftAccessList + , rcDescription + , rcAttribution + , rcTags + + -- * Project + , Project + , project + , proName + , proId + + -- * Color + , Color + , color + , cColor + , cOpacity + + -- * Asset + , Asset + , asset + , aCreationTime + , aWritersCanEditPermissions + , aEtag + , aCreatorEmail + , aLastModifiedTime + , aLastModifierEmail + , aName + , aBbox + , aResource + , aId + , aProjectId + , aType + , aDescription + , aTags + + -- * ProcessResponse + , ProcessResponse + , processResponse + + -- * TableColumn + , TableColumn + , tableColumn + , tcName + , tcType + + -- * RasterCollectionsRastersBatchDeleteResponse + , RasterCollectionsRastersBatchDeleteResponse + , rasterCollectionsRastersBatchDeleteResponse + + -- * ScaledShape + , ScaledShape + , scaledShape + , ssBorder + , ssFill + , ssShape + + -- * Icon + , Icon + , icon + , iName + , iId + , iDescription + + -- * FeaturesBatchDeleteRequest + , FeaturesBatchDeleteRequest + , featuresBatchDeleteRequest + , fbdrPrimaryKeys + , fbdrGxIds + + -- * RasterCollectionsRastersBatchInsertResponse + , RasterCollectionsRastersBatchInsertResponse + , rasterCollectionsRastersBatchInsertResponse + + -- * FeaturesListResponse + , FeaturesListResponse + , featuresListResponse + , flrNextPageToken + , flrAllowedQueriesPerSecond + , flrSchema + , flrFeatures + , flrType + + -- * ParentsListResponse + , ParentsListResponse + , parentsListResponse + , plrNextPageToken + , plrParents + + -- * RasterCollectionsRasterBatchDeleteRequest + , RasterCollectionsRasterBatchDeleteRequest + , rasterCollectionsRasterBatchDeleteRequest + , rcrbdrIds + + -- * LabelStyle + , LabelStyle + , labelStyle + , lsFontStyle + , lsColor + , lsSize + , lsOpacity + , lsOutline + , lsFontWeight + , lsColumn + + -- * MapItem + , MapItem + , mapItem + + -- * IconsListResponse + , IconsListResponse + , iconsListResponse + , ilrNextPageToken + , ilrIcons + + -- * Schema + , Schema + , schema + , sPrimaryKey + , sColumns + , sPrimaryGeometry + + -- * AcquisitionTime + , AcquisitionTime + , acquisitionTime + , atStart + , atPrecision + , atEnd + + -- * TablesListResponse + , TablesListResponse + , tablesListResponse + , tlrNextPageToken + , tlrTables + + -- * Map + , Map + , map' + , mapCreationTime + , mapWritersCanEditPermissions + , mapEtag + , mapDefaultViewport + , mapContents + , mapPublishingStatus + , mapCreatorEmail + , mapLastModifiedTime + , mapLastModifierEmail + , mapVersions + , mapName + , mapBbox + , mapProcessingStatus + , mapId + , mapProjectId + , mapDraftAccessList + , mapPublishedAccessList + , mapDescription + , mapTags + + -- * IconStyle + , IconStyle + , iconStyle + , isScaledShape + , isScalingFunction + , isName + , isId + + -- * Border + , Border + , border + , bColor + , bWidth + , bOpacity + + -- * DisplayRule + , DisplayRule + , displayRule + , drPointOptions + , drPolygonOptions + , drZoomLevels + , drFilters + , drName + , drLineOptions + + -- * PublishedMap + , PublishedMap + , publishedMap + , pmDefaultViewport + , pmContents + , pmName + , pmId + , pmProjectId + , pmDescription + + -- * RasterCollectionsRastersBatchInsertRequest + , RasterCollectionsRastersBatchInsertRequest + , rasterCollectionsRastersBatchInsertRequest + , rcrbirIds + + -- * RasterCollectionsRastersListResponse + , RasterCollectionsRastersListResponse + , rasterCollectionsRastersListResponse + , rcrlrNextPageToken + , rcrlrRasters + + -- * GeoJSONMultiLineString + , GeoJSONMultiLineString + , geoJSONMultiLineString + , gjmlsCoordinates + , gjmlsType + + -- * ScalingFunction + , ScalingFunction + , scalingFunction + , sfValueRange + , sfSizeRange + , sfScalingType + , sfColumn + + -- * AssetsListResponse + , AssetsListResponse + , assetsListResponse + , alrNextPageToken + , alrAssets + + -- * PublishResponse + , PublishResponse + , publishResponse + + -- * RasterCollectionsRaster + , RasterCollectionsRaster + , rasterCollectionsRaster + , rcrCreationTime + , rcrRasterType + , rcrLastModifiedTime + , rcrName + , rcrBbox + , rcrId + , rcrProjectId + , rcrDescription + , rcrTags + + -- * Datasource + , Datasource + , datasource + , dId + + -- * FeaturesBatchInsertRequest + , FeaturesBatchInsertRequest + , featuresBatchInsertRequest + , fbirFeatures + , fbirNormalizeGeometries + + -- * Filter + , Filter + , filter' + , fOperator + , fValue + , fColumn + + -- * GeoJSONMultiPolygon + , GeoJSONMultiPolygon + , geoJSONMultiPolygon + , gjmpCoordinates + , gjmpType + + -- * GeoJSONMultiPoint + , GeoJSONMultiPoint + , geoJSONMultiPoint + , gjsonmpCoordinates + , gjsonmpType + + -- * Raster + , Raster + , raster + , rCreationTime + , rWritersCanEditPermissions + , rMaskType + , rEtag + , rCreatorEmail + , rRasterType + , rLastModifiedTime + , rLastModifierEmail + , rAcquisitionTime + , rName + , rBbox + , rProcessingStatus + , rFiles + , rId + , rProjectId + , rDraftAccessList + , rDescription + , rAttribution + , rTags + + -- * PublishedLayer + , PublishedLayer + , publishedLayer + , plLayerType + , plName + , plId + , plProjectId + , plDescription + + -- * PointStyle + , PointStyle + , pointStyle + , psIcon + , psLabel + + -- * Permission + , Permission + , permission + , perRole + , perId + , perType + , perDiscoverable + + -- * Layer + , Layer + , layer + , lCreationTime + , lWritersCanEditPermissions + , lStyle + , lEtag + , lDatasourceType + , lPublishingStatus + , lCreatorEmail + , lLayerType + , lLastModifiedTime + , lDatasources + , lLastModifierEmail + , lName + , lBbox + , lProcessingStatus + , lId + , lProjectId + , lDraftAccessList + , lPublishedAccessList + , lDescription + , lTags + + -- * PolygonStyle + , PolygonStyle + , polygonStyle + , pStroke + , pFill + , pLabel + + -- * PermissionsBatchUpdateResponse + , PermissionsBatchUpdateResponse + , permissionsBatchUpdateResponse + + -- * MapKmlLink + , MapKmlLink + , mapKmlLink + , mklDefaultViewport + , mklVisibility + , mklName + , mklType + , mklKmlUrl + + -- * VectorStyle + , VectorStyle + , vectorStyle + , vsDisplayRules + , vsFeatureInfo + , vsType + + -- * PublishedMapsListResponse + , PublishedMapsListResponse + , publishedMapsListResponse + , pmlrMaps + , pmlrNextPageToken + + -- * PermissionsBatchDeleteResponse + , PermissionsBatchDeleteResponse + , permissionsBatchDeleteResponse + + -- * Table + , Table + , table + , tCreationTime + , tWritersCanEditPermissions + , tEtag + , tCreatorEmail + , tLastModifiedTime + , tSchema + , tLastModifierEmail + , tName + , tBbox + , tProcessingStatus + , tFiles + , tId + , tProjectId + , tDraftAccessList + , tPublishedAccessList + , tSourceEncoding + , tDescription + , tTags + + -- * GeoJSONLineString + , GeoJSONLineString + , geoJSONLineString + , gjlsCoordinates + , gjlsType + + -- * MapsListResponse + , MapsListResponse + , mapsListResponse + , mlrMaps + , mlrNextPageToken + + -- * File + , File + , file + , fSize + , fUploadStatus + , fFilename + + -- * LayersListResponse + , LayersListResponse + , layersListResponse + , llrNextPageToken + , llrLayers + + -- * GeoJSONPolygon + , GeoJSONPolygon + , geoJSONPolygon + , gjpCoordinates + , gjpType + + -- * GeoJSONPoint + , GeoJSONPoint + , geoJSONPoint + , gjsonpCoordinates + , gjsonpType + + -- * PermissionsListResponse + , PermissionsListResponse + , permissionsListResponse + , plrPermissions + + -- * LineStyle + , LineStyle + , lineStyle + , lsStroke + , lsBorder + , lsDash + , lsLabel + + -- * PublishedLayersListResponse + , PublishedLayersListResponse + , publishedLayersListResponse + , pllrNextPageToken + , pllrLayers + + -- * GeoJSONGeometryCollection + , GeoJSONGeometryCollection + , geoJSONGeometryCollection + , gjgcGeometries + , gjgcType + + -- * RastersListResponse + , RastersListResponse + , rastersListResponse + , rlrNextPageToken + , rlrRasters + ) where + +import Network.Google.MapEngine.Types.Product +import Network.Google.MapEngine.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Maps Engine API. +mapEngineURL :: BaseURL +mapEngineURL + = BaseUrl Https + "https://www.googleapis.com/mapsengine/v1/" + 443 diff --git a/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Product.hs b/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Product.hs new file mode 100644 index 000000000..4e37a7a44 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Product.hs @@ -0,0 +1,5180 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapEngine.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapEngine.Types.Product where + +import Network.Google.MapEngine.Types.Sum +import Network.Google.Prelude + +-- | A list of the parents of an asset. +-- +-- /See:/ 'parent' smart constructor. +newtype Parent = Parent + { _pId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Parent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pId' +parent + :: Parent +parent = + Parent + { _pId = Nothing + } + +-- | The ID of this parent. +pId :: Lens' Parent (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +instance FromJSON Parent where + parseJSON + = withObject "Parent" + (\ o -> Parent <$> (o .:? "id")) + +instance ToJSON Parent where + toJSON Parent{..} + = object (catMaybes [("id" .=) <$> _pId]) + +-- | The request sent to mapsengine.permissions.batchUpdate. +-- +-- /See:/ 'permissionsBatchUpdateRequest' smart constructor. +newtype PermissionsBatchUpdateRequest = PermissionsBatchUpdateRequest + { _pburPermissions :: Maybe [Maybe Permission] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsBatchUpdateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pburPermissions' +permissionsBatchUpdateRequest + :: PermissionsBatchUpdateRequest +permissionsBatchUpdateRequest = + PermissionsBatchUpdateRequest + { _pburPermissions = Nothing + } + +-- | The permissions to be inserted or updated. +pburPermissions :: Lens' PermissionsBatchUpdateRequest [Maybe Permission] +pburPermissions + = lens _pburPermissions + (\ s a -> s{_pburPermissions = a}) + . _Default + . _Coerce + +instance FromJSON PermissionsBatchUpdateRequest where + parseJSON + = withObject "PermissionsBatchUpdateRequest" + (\ o -> + PermissionsBatchUpdateRequest <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON PermissionsBatchUpdateRequest where + toJSON PermissionsBatchUpdateRequest{..} + = object + (catMaybes [("permissions" .=) <$> _pburPermissions]) + +-- | The properties associated with a feature. +-- +-- /See:/ 'geoJSONProperties' smart constructor. +data GeoJSONProperties = + GeoJSONProperties + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONProperties' with the minimum fields required to make a request. +-- +geoJSONProperties + :: GeoJSONProperties +geoJSONProperties = GeoJSONProperties + +instance FromJSON GeoJSONProperties where + parseJSON + = withObject "GeoJSONProperties" + (\ o -> pure GeoJSONProperties) + +instance ToJSON GeoJSONProperties where + toJSON = const (Object mempty) + +-- | The request sent to features.BatchPatch. +-- +-- /See:/ 'featuresBatchPatchRequest' smart constructor. +data FeaturesBatchPatchRequest = FeaturesBatchPatchRequest + { _fbprFeatures :: !(Maybe [Maybe Feature]) + , _fbprNormalizeGeometries :: !Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FeaturesBatchPatchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbprFeatures' +-- +-- * 'fbprNormalizeGeometries' +featuresBatchPatchRequest + :: FeaturesBatchPatchRequest +featuresBatchPatchRequest = + FeaturesBatchPatchRequest + { _fbprFeatures = Nothing + , _fbprNormalizeGeometries = True + } + +fbprFeatures :: Lens' FeaturesBatchPatchRequest [Maybe Feature] +fbprFeatures + = lens _fbprFeatures (\ s a -> s{_fbprFeatures = a}) + . _Default + . _Coerce + +-- | If true, the server will normalize feature geometries. It is assumed +-- that the South Pole is exterior to any polygons given. See here for a +-- list of normalizations. If false, all feature geometries must be given +-- already normalized. The points in all LinearRings must be listed in +-- counter-clockwise order, and LinearRings may not intersect. +fbprNormalizeGeometries :: Lens' FeaturesBatchPatchRequest Bool +fbprNormalizeGeometries + = lens _fbprNormalizeGeometries + (\ s a -> s{_fbprNormalizeGeometries = a}) + +instance FromJSON FeaturesBatchPatchRequest where + parseJSON + = withObject "FeaturesBatchPatchRequest" + (\ o -> + FeaturesBatchPatchRequest <$> + (o .:? "features" .!= mempty) <*> + (o .:? "normalizeGeometries" .!= True)) + +instance ToJSON FeaturesBatchPatchRequest where + toJSON FeaturesBatchPatchRequest{..} + = object + (catMaybes + [("features" .=) <$> _fbprFeatures, + Just + ("normalizeGeometries" .= _fbprNormalizeGeometries)]) + +-- | Range of values used for scaling shapes. The min\/max values will be +-- drawn as shapes with the min\/max size. +-- +-- /See:/ 'valueRange' smart constructor. +data ValueRange = ValueRange + { _vrMax :: !(Maybe Double) + , _vrMin :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ValueRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vrMax' +-- +-- * 'vrMin' +valueRange + :: ValueRange +valueRange = + ValueRange + { _vrMax = Nothing + , _vrMin = Nothing + } + +-- | Maximum value. +vrMax :: Lens' ValueRange (Maybe Double) +vrMax = lens _vrMax (\ s a -> s{_vrMax = a}) + +-- | Minimum value. +vrMin :: Lens' ValueRange (Maybe Double) +vrMin = lens _vrMin (\ s a -> s{_vrMin = a}) + +instance FromJSON ValueRange where + parseJSON + = withObject "ValueRange" + (\ o -> + ValueRange <$> (o .:? "max") <*> (o .:? "min")) + +instance ToJSON ValueRange where + toJSON ValueRange{..} + = object + (catMaybes + [("max" .=) <$> _vrMax, ("min" .=) <$> _vrMin]) + +-- | A feature within a table. +-- +-- /See:/ 'feature' smart constructor. +data Feature = Feature + { _fGeometry :: !(Maybe (Maybe GeoJSONGeometry)) + , _fType :: !Text + , _fProperties :: !(Maybe (Maybe GeoJSONProperties)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Feature' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fGeometry' +-- +-- * 'fType' +-- +-- * 'fProperties' +feature + :: Feature +feature = + Feature + { _fGeometry = Nothing + , _fType = "Feature" + , _fProperties = Nothing + } + +-- | The geometry member of this Feature. +fGeometry :: Lens' Feature (Maybe (Maybe GeoJSONGeometry)) +fGeometry + = lens _fGeometry (\ s a -> s{_fGeometry = a}) + +-- | Identifies this object as a feature. +fType :: Lens' Feature Text +fType = lens _fType (\ s a -> s{_fType = a}) + +-- | Key\/value pairs of this Feature. +fProperties :: Lens' Feature (Maybe (Maybe GeoJSONProperties)) +fProperties + = lens _fProperties (\ s a -> s{_fProperties = a}) + +instance FromJSON Feature where + parseJSON + = withObject "Feature" + (\ o -> + Feature <$> + (o .:? "geometry") <*> (o .:? "type" .!= "Feature") + <*> (o .:? "properties")) + +instance ToJSON Feature where + toJSON Feature{..} + = object + (catMaybes + [("geometry" .=) <$> _fGeometry, + Just ("type" .= _fType), + ("properties" .=) <$> _fProperties]) + +-- | The request sent to mapsengine.permissions.batchDelete. +-- +-- /See:/ 'permissionsBatchDeleteRequest' smart constructor. +newtype PermissionsBatchDeleteRequest = PermissionsBatchDeleteRequest + { _pbdrIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsBatchDeleteRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pbdrIds' +permissionsBatchDeleteRequest + :: PermissionsBatchDeleteRequest +permissionsBatchDeleteRequest = + PermissionsBatchDeleteRequest + { _pbdrIds = Nothing + } + +-- | An array of permission ids to be removed. This could be the email +-- address of the user or group this permission refers to, or the string +-- \"anyone\" for public permissions. +pbdrIds :: Lens' PermissionsBatchDeleteRequest [Text] +pbdrIds + = lens _pbdrIds (\ s a -> s{_pbdrIds = a}) . _Default + . _Coerce + +instance FromJSON PermissionsBatchDeleteRequest where + parseJSON + = withObject "PermissionsBatchDeleteRequest" + (\ o -> + PermissionsBatchDeleteRequest <$> + (o .:? "ids" .!= mempty)) + +instance ToJSON PermissionsBatchDeleteRequest where + toJSON PermissionsBatchDeleteRequest{..} + = object (catMaybes [("ids" .=) <$> _pbdrIds]) + +-- +-- /See:/ 'geoJSONGeometry' smart constructor. +data GeoJSONGeometry = + GeoJSONGeometry + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONGeometry' with the minimum fields required to make a request. +-- +geoJSONGeometry + :: GeoJSONGeometry +geoJSONGeometry = GeoJSONGeometry + +instance FromJSON GeoJSONGeometry where + parseJSON + = withObject "GeoJSONGeometry" + (\ o -> pure GeoJSONGeometry) + +instance ToJSON GeoJSONGeometry where + toJSON = const (Object mempty) + +-- +-- /See:/ 'mapLayer' smart constructor. +data MapLayer = MapLayer + { _mlDefaultViewport :: !(Maybe [Double]) + , _mlVisibility :: !(Maybe Text) + , _mlKey :: !(Maybe Text) + , _mlName :: !(Maybe Text) + , _mlId :: !(Maybe Text) + , _mlType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapLayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlDefaultViewport' +-- +-- * 'mlVisibility' +-- +-- * 'mlKey' +-- +-- * 'mlName' +-- +-- * 'mlId' +-- +-- * 'mlType' +mapLayer + :: MapLayer +mapLayer = + MapLayer + { _mlDefaultViewport = Nothing + , _mlVisibility = Nothing + , _mlKey = Nothing + , _mlName = Nothing + , _mlId = Nothing + , _mlType = Nothing + } + +-- | An array of four numbers (west, south, east, north) which defines the +-- rectangular bounding box of the default viewport. The numbers represent +-- latitude and longitude in decimal degrees. +mlDefaultViewport :: Lens' MapLayer [Double] +mlDefaultViewport + = lens _mlDefaultViewport + (\ s a -> s{_mlDefaultViewport = a}) + . _Default + . _Coerce + +-- | The visibility setting of this MapLayer. One of \"defaultOn\" or +-- \"defaultOff\". +mlVisibility :: Lens' MapLayer (Maybe Text) +mlVisibility + = lens _mlVisibility (\ s a -> s{_mlVisibility = a}) + +-- | A user defined alias for this MapLayer, specific to this Map. +mlKey :: Lens' MapLayer (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | The name of this MapLayer. +mlName :: Lens' MapLayer (Maybe Text) +mlName = lens _mlName (\ s a -> s{_mlName = a}) + +-- | The ID of this MapLayer. This ID can be used to request more details +-- about the layer. +mlId :: Lens' MapLayer (Maybe Text) +mlId = lens _mlId (\ s a -> s{_mlId = a}) + +-- | Identifies this object as a MapLayer. +mlType :: Lens' MapLayer (Maybe Text) +mlType = lens _mlType (\ s a -> s{_mlType = a}) + +instance FromJSON MapLayer where + parseJSON + = withObject "MapLayer" + (\ o -> + MapLayer <$> + (o .:? "defaultViewport" .!= mempty) <*> + (o .:? "visibility") + <*> (o .:? "key") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON MapLayer where + toJSON MapLayer{..} + = object + (catMaybes + [("defaultViewport" .=) <$> _mlDefaultViewport, + ("visibility" .=) <$> _mlVisibility, + ("key" .=) <$> _mlKey, ("name" .=) <$> _mlName, + ("id" .=) <$> _mlId, ("type" .=) <$> _mlType]) + +-- | The response returned by a call to raster_collections.List. Note: The +-- list response does not include all the fields available in a raster +-- collection. Refer to the RasterCollection resource description for +-- details of the fields that are not included. You\'ll need to send a get +-- request to retrieve the additional fields for each raster collection. +-- +-- /See:/ 'rasterCollectionsListResponse' smart constructor. +data RasterCollectionsListResponse = RasterCollectionsListResponse + { _rclrNextPageToken :: !(Maybe Word8) + , _rclrRasterCollections :: !(Maybe [Maybe RasterCollection]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rclrNextPageToken' +-- +-- * 'rclrRasterCollections' +rasterCollectionsListResponse + :: RasterCollectionsListResponse +rasterCollectionsListResponse = + RasterCollectionsListResponse + { _rclrNextPageToken = Nothing + , _rclrRasterCollections = Nothing + } + +-- | Next page token. +rclrNextPageToken :: Lens' RasterCollectionsListResponse (Maybe Word8) +rclrNextPageToken + = lens _rclrNextPageToken + (\ s a -> s{_rclrNextPageToken = a}) + +-- | Resources returned. +rclrRasterCollections :: Lens' RasterCollectionsListResponse [Maybe RasterCollection] +rclrRasterCollections + = lens _rclrRasterCollections + (\ s a -> s{_rclrRasterCollections = a}) + . _Default + . _Coerce + +instance FromJSON RasterCollectionsListResponse where + parseJSON + = withObject "RasterCollectionsListResponse" + (\ o -> + RasterCollectionsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "rasterCollections" .!= mempty)) + +instance ToJSON RasterCollectionsListResponse where + toJSON RasterCollectionsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rclrNextPageToken, + ("rasterCollections" .=) <$> _rclrRasterCollections]) + +-- | The response returned by a call to projects.List. +-- +-- /See:/ 'projectsListResponse' smart constructor. +newtype ProjectsListResponse = ProjectsListResponse + { _plrProjects :: Maybe [Maybe Project] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrProjects' +projectsListResponse + :: ProjectsListResponse +projectsListResponse = + ProjectsListResponse + { _plrProjects = Nothing + } + +-- | Projects returned. +plrProjects :: Lens' ProjectsListResponse [Maybe Project] +plrProjects + = lens _plrProjects (\ s a -> s{_plrProjects = a}) . + _Default + . _Coerce + +instance FromJSON ProjectsListResponse where + parseJSON + = withObject "ProjectsListResponse" + (\ o -> + ProjectsListResponse <$> + (o .:? "projects" .!= mempty)) + +instance ToJSON ProjectsListResponse where + toJSON ProjectsListResponse{..} + = object + (catMaybes [("projects" .=) <$> _plrProjects]) + +-- | Zoom level range. Zoom levels are restricted between 0 and 24, +-- inclusive. +-- +-- /See:/ 'zoomLevels' smart constructor. +data ZoomLevels = ZoomLevels + { _zlMax :: !(Maybe Int32) + , _zlMin :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoomLevels' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zlMax' +-- +-- * 'zlMin' +zoomLevels + :: ZoomLevels +zoomLevels = + ZoomLevels + { _zlMax = Nothing + , _zlMin = Nothing + } + +-- | Maximum zoom level. +zlMax :: Lens' ZoomLevels (Maybe Int32) +zlMax = lens _zlMax (\ s a -> s{_zlMax = a}) + +-- | Minimum zoom level. +zlMin :: Lens' ZoomLevels (Maybe Int32) +zlMin = lens _zlMin (\ s a -> s{_zlMin = a}) + +instance FromJSON ZoomLevels where + parseJSON + = withObject "ZoomLevels" + (\ o -> + ZoomLevels <$> (o .:? "max") <*> (o .:? "min")) + +instance ToJSON ZoomLevels where + toJSON ZoomLevels{..} + = object + (catMaybes + [("max" .=) <$> _zlMax, ("min" .=) <$> _zlMin]) + +-- | A feature info contains information about individual feature. +-- +-- /See:/ 'featureInfo' smart constructor. +newtype FeatureInfo = FeatureInfo + { _fiContent :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FeatureInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiContent' +featureInfo + :: FeatureInfo +featureInfo = + FeatureInfo + { _fiContent = Nothing + } + +-- | HTML template of the info window. If not provided, a default template +-- with all attributes will be generated. +fiContent :: Lens' FeatureInfo (Maybe Text) +fiContent + = lens _fiContent (\ s a -> s{_fiContent = a}) + +instance FromJSON FeatureInfo where + parseJSON + = withObject "FeatureInfo" + (\ o -> FeatureInfo <$> (o .:? "content")) + +instance ToJSON FeatureInfo where + toJSON FeatureInfo{..} + = object (catMaybes [("content" .=) <$> _fiContent]) + +-- | Scaled shape size range in pixels. For circles, size corresponds to +-- diameter. +-- +-- /See:/ 'sizeRange' smart constructor. +data SizeRange = SizeRange + { _srMax :: !(Maybe Double) + , _srMin :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SizeRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srMax' +-- +-- * 'srMin' +sizeRange + :: SizeRange +sizeRange = + SizeRange + { _srMax = Nothing + , _srMin = Nothing + } + +-- | Maximum size, in pixels. +srMax :: Lens' SizeRange (Maybe Double) +srMax = lens _srMax (\ s a -> s{_srMax = a}) + +-- | Minimum size, in pixels. +srMin :: Lens' SizeRange (Maybe Double) +srMin = lens _srMin (\ s a -> s{_srMin = a}) + +instance FromJSON SizeRange where + parseJSON + = withObject "SizeRange" + (\ o -> + SizeRange <$> (o .:? "max") <*> (o .:? "min")) + +instance ToJSON SizeRange where + toJSON SizeRange{..} + = object + (catMaybes + [("max" .=) <$> _srMax, ("min" .=) <$> _srMin]) + +-- +-- /See:/ 'mapFolder' smart constructor. +data MapFolder = MapFolder + { _mfExpandable :: !(Maybe Bool) + , _mfDefaultViewport :: !(Maybe [Double]) + , _mfContents :: !(Maybe [Maybe MapItem]) + , _mfVisibility :: !(Maybe Text) + , _mfKey :: !(Maybe Text) + , _mfName :: !(Maybe Text) + , _mfType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapFolder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfExpandable' +-- +-- * 'mfDefaultViewport' +-- +-- * 'mfContents' +-- +-- * 'mfVisibility' +-- +-- * 'mfKey' +-- +-- * 'mfName' +-- +-- * 'mfType' +mapFolder + :: MapFolder +mapFolder = + MapFolder + { _mfExpandable = Nothing + , _mfDefaultViewport = Nothing + , _mfContents = Nothing + , _mfVisibility = Nothing + , _mfKey = Nothing + , _mfName = Nothing + , _mfType = Nothing + } + +-- | The expandability setting of this MapFolder. If true, the folder can be +-- expanded. +mfExpandable :: Lens' MapFolder (Maybe Bool) +mfExpandable + = lens _mfExpandable (\ s a -> s{_mfExpandable = a}) + +-- | An array of four numbers (west, south, east, north) which defines the +-- rectangular bounding box of the default viewport. The numbers represent +-- latitude and longitude in decimal degrees. +mfDefaultViewport :: Lens' MapFolder [Double] +mfDefaultViewport + = lens _mfDefaultViewport + (\ s a -> s{_mfDefaultViewport = a}) + . _Default + . _Coerce + +mfContents :: Lens' MapFolder [Maybe MapItem] +mfContents + = lens _mfContents (\ s a -> s{_mfContents = a}) . + _Default + . _Coerce + +-- | The visibility setting of this MapFolder. One of \"defaultOn\" or +-- \"defaultOff\". +mfVisibility :: Lens' MapFolder (Maybe Text) +mfVisibility + = lens _mfVisibility (\ s a -> s{_mfVisibility = a}) + +-- | A user defined alias for this MapFolder, specific to this Map. +mfKey :: Lens' MapFolder (Maybe Text) +mfKey = lens _mfKey (\ s a -> s{_mfKey = a}) + +-- | The name of this MapFolder. +mfName :: Lens' MapFolder (Maybe Text) +mfName = lens _mfName (\ s a -> s{_mfName = a}) + +-- | Identifies this object as a MapFolder. +mfType :: Lens' MapFolder (Maybe Text) +mfType = lens _mfType (\ s a -> s{_mfType = a}) + +instance FromJSON MapFolder where + parseJSON + = withObject "MapFolder" + (\ o -> + MapFolder <$> + (o .:? "expandable") <*> + (o .:? "defaultViewport" .!= mempty) + <*> (o .:? "contents" .!= mempty) + <*> (o .:? "visibility") + <*> (o .:? "key") + <*> (o .:? "name") + <*> (o .:? "type")) + +instance ToJSON MapFolder where + toJSON MapFolder{..} + = object + (catMaybes + [("expandable" .=) <$> _mfExpandable, + ("defaultViewport" .=) <$> _mfDefaultViewport, + ("contents" .=) <$> _mfContents, + ("visibility" .=) <$> _mfVisibility, + ("key" .=) <$> _mfKey, ("name" .=) <$> _mfName, + ("type" .=) <$> _mfType]) + +-- | A raster collection groups multiple Raster resources for inclusion in a +-- Layer. +-- +-- /See:/ 'rasterCollection' smart constructor. +data RasterCollection = RasterCollection + { _rcCreationTime :: !(Maybe UTCTime) + , _rcWritersCanEditPermissions :: !(Maybe Bool) + , _rcEtag :: !(Maybe Text) + , _rcCreatorEmail :: !(Maybe Text) + , _rcRasterType :: !(Maybe Text) + , _rcLastModifiedTime :: !(Maybe UTCTime) + , _rcLastModifierEmail :: !(Maybe Text) + , _rcName :: !(Maybe Text) + , _rcBbox :: !(Maybe [Double]) + , _rcProcessingStatus :: !(Maybe Text) + , _rcMosaic :: !(Maybe Bool) + , _rcId :: !(Maybe Text) + , _rcProjectId :: !(Maybe Text) + , _rcDraftAccessList :: !(Maybe Text) + , _rcDescription :: !(Maybe Text) + , _rcAttribution :: !(Maybe Text) + , _rcTags :: !(Maybe (Maybe [Text])) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollection' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcCreationTime' +-- +-- * 'rcWritersCanEditPermissions' +-- +-- * 'rcEtag' +-- +-- * 'rcCreatorEmail' +-- +-- * 'rcRasterType' +-- +-- * 'rcLastModifiedTime' +-- +-- * 'rcLastModifierEmail' +-- +-- * 'rcName' +-- +-- * 'rcBbox' +-- +-- * 'rcProcessingStatus' +-- +-- * 'rcMosaic' +-- +-- * 'rcId' +-- +-- * 'rcProjectId' +-- +-- * 'rcDraftAccessList' +-- +-- * 'rcDescription' +-- +-- * 'rcAttribution' +-- +-- * 'rcTags' +rasterCollection + :: RasterCollection +rasterCollection = + RasterCollection + { _rcCreationTime = Nothing + , _rcWritersCanEditPermissions = Nothing + , _rcEtag = Nothing + , _rcCreatorEmail = Nothing + , _rcRasterType = Nothing + , _rcLastModifiedTime = Nothing + , _rcLastModifierEmail = Nothing + , _rcName = Nothing + , _rcBbox = Nothing + , _rcProcessingStatus = Nothing + , _rcMosaic = Nothing + , _rcId = Nothing + , _rcProjectId = Nothing + , _rcDraftAccessList = Nothing + , _rcDescription = Nothing + , _rcAttribution = Nothing + , _rcTags = Nothing + } + +-- | The creation time of this RasterCollection. The value is an RFC 3339 +-- formatted date-time value (e.g. 1970-01-01T00:00:00Z). +rcCreationTime :: Lens' RasterCollection (Maybe UTCTime) +rcCreationTime + = lens _rcCreationTime + (\ s a -> s{_rcCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +rcWritersCanEditPermissions :: Lens' RasterCollection (Maybe Bool) +rcWritersCanEditPermissions + = lens _rcWritersCanEditPermissions + (\ s a -> s{_rcWritersCanEditPermissions = a}) + +-- | The ETag, used to refer to the current version of the asset. +rcEtag :: Lens' RasterCollection (Maybe Text) +rcEtag = lens _rcEtag (\ s a -> s{_rcEtag = a}) + +-- | The email address of the creator of this raster collection. This is only +-- returned on GET requests and not LIST requests. +rcCreatorEmail :: Lens' RasterCollection (Maybe Text) +rcCreatorEmail + = lens _rcCreatorEmail + (\ s a -> s{_rcCreatorEmail = a}) + +-- | The type of rasters contained within this RasterCollection. +rcRasterType :: Lens' RasterCollection (Maybe Text) +rcRasterType + = lens _rcRasterType (\ s a -> s{_rcRasterType = a}) + +-- | The last modified time of this RasterCollection. The value is an RFC +-- 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +rcLastModifiedTime :: Lens' RasterCollection (Maybe UTCTime) +rcLastModifiedTime + = lens _rcLastModifiedTime + (\ s a -> s{_rcLastModifiedTime = a}) + +-- | The email address of the last modifier of this raster collection. This +-- is only returned on GET requests and not LIST requests. +rcLastModifierEmail :: Lens' RasterCollection (Maybe Text) +rcLastModifierEmail + = lens _rcLastModifierEmail + (\ s a -> s{_rcLastModifierEmail = a}) + +-- | The name of this RasterCollection, supplied by the author. +rcName :: Lens' RasterCollection (Maybe Text) +rcName = lens _rcName (\ s a -> s{_rcName = a}) + +-- | A rectangular bounding box which contains all of the data in this +-- RasterCollection. The box is expressed as \\\"west, south, east, +-- north\\\". The numbers represent latitude and longitude in decimal +-- degrees. +rcBbox :: Lens' RasterCollection [Double] +rcBbox + = lens _rcBbox (\ s a -> s{_rcBbox = a}) . _Default . + _Coerce + +-- | The processing status of this RasterCollection. +rcProcessingStatus :: Lens' RasterCollection (Maybe Text) +rcProcessingStatus + = lens _rcProcessingStatus + (\ s a -> s{_rcProcessingStatus = a}) + +-- | True if this RasterCollection is a mosaic. +rcMosaic :: Lens' RasterCollection (Maybe Bool) +rcMosaic = lens _rcMosaic (\ s a -> s{_rcMosaic = a}) + +-- | A globally unique ID, used to refer to this RasterCollection. +rcId :: Lens' RasterCollection (Maybe Text) +rcId = lens _rcId (\ s a -> s{_rcId = a}) + +-- | The ID of the project that this RasterCollection is in. +rcProjectId :: Lens' RasterCollection (Maybe Text) +rcProjectId + = lens _rcProjectId (\ s a -> s{_rcProjectId = a}) + +-- | Deprecated: The name of an access list of the Map Editor type. The user +-- on whose behalf the request is being sent must be an editor on that +-- access list. Note: Google Maps Engine no longer uses access lists. +-- Instead, each asset has its own list of permissions. For backward +-- compatibility, the API still accepts access lists for projects that are +-- already using access lists. If you created a GME account\/project after +-- July 14th, 2014, you will not be able to send API requests that include +-- access lists. Note: This is an input field only. It is not returned in +-- response to a list or get request. +rcDraftAccessList :: Lens' RasterCollection (Maybe Text) +rcDraftAccessList + = lens _rcDraftAccessList + (\ s a -> s{_rcDraftAccessList = a}) + +-- | The description of this RasterCollection, supplied by the author. +rcDescription :: Lens' RasterCollection (Maybe Text) +rcDescription + = lens _rcDescription + (\ s a -> s{_rcDescription = a}) + +-- | The name of the attribution to be used for this RasterCollection. Note: +-- Attribution is returned in response to a get request but not a list +-- request. After requesting a list of raster collections, you\'ll need to +-- send a get request to retrieve the attribution for each raster +-- collection. +rcAttribution :: Lens' RasterCollection (Maybe Text) +rcAttribution + = lens _rcAttribution + (\ s a -> s{_rcAttribution = a}) + +-- | Tags of this RasterCollection. +rcTags :: Lens' RasterCollection (Maybe [Text]) +rcTags + = lens _rcTags (\ s a -> s{_rcTags = a}) . + mapping (_Default . _Coerce) + +instance FromJSON RasterCollection where + parseJSON + = withObject "RasterCollection" + (\ o -> + RasterCollection <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "etag") + <*> (o .:? "creatorEmail") + <*> (o .:? "rasterType") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "processingStatus") + <*> (o .:? "mosaic") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "draftAccessList") + <*> (o .:? "description") + <*> (o .:? "attribution") + <*> (o .:? "tags")) + +instance ToJSON RasterCollection where + toJSON RasterCollection{..} + = object + (catMaybes + [("creationTime" .=) <$> _rcCreationTime, + ("writersCanEditPermissions" .=) <$> + _rcWritersCanEditPermissions, + ("etag" .=) <$> _rcEtag, + ("creatorEmail" .=) <$> _rcCreatorEmail, + ("rasterType" .=) <$> _rcRasterType, + ("lastModifiedTime" .=) <$> _rcLastModifiedTime, + ("lastModifierEmail" .=) <$> _rcLastModifierEmail, + ("name" .=) <$> _rcName, ("bbox" .=) <$> _rcBbox, + ("processingStatus" .=) <$> _rcProcessingStatus, + ("mosaic" .=) <$> _rcMosaic, ("id" .=) <$> _rcId, + ("projectId" .=) <$> _rcProjectId, + ("draftAccessList" .=) <$> _rcDraftAccessList, + ("description" .=) <$> _rcDescription, + ("attribution" .=) <$> _rcAttribution, + ("tags" .=) <$> _rcTags]) + +-- | A Maps Engine project groups a collection of resources. +-- +-- /See:/ 'project' smart constructor. +data Project = Project + { _proName :: !(Maybe Text) + , _proId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Project' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proName' +-- +-- * 'proId' +project + :: Project +project = + Project + { _proName = Nothing + , _proId = Nothing + } + +-- | A user provided name for this Maps Engine project. +proName :: Lens' Project (Maybe Text) +proName = lens _proName (\ s a -> s{_proName = a}) + +-- | An ID used to refer to this Maps Engine project. +proId :: Lens' Project (Maybe Text) +proId = lens _proId (\ s a -> s{_proId = a}) + +instance FromJSON Project where + parseJSON + = withObject "Project" + (\ o -> Project <$> (o .:? "name") <*> (o .:? "id")) + +instance ToJSON Project where + toJSON Project{..} + = object + (catMaybes + [("name" .=) <$> _proName, ("id" .=) <$> _proId]) + +-- | Basic color used in styling. +-- +-- /See:/ 'color' smart constructor. +data Color = Color + { _cColor :: !(Maybe Text) + , _cOpacity :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Color' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cColor' +-- +-- * 'cOpacity' +color + :: Color +color = + Color + { _cColor = Nothing + , _cOpacity = Nothing + } + +-- | The CSS style color, can be in format of \"red\" or \"#7733EE\". +cColor :: Lens' Color (Maybe Text) +cColor = lens _cColor (\ s a -> s{_cColor = a}) + +-- | Opacity ranges from 0 to 1, inclusive. If not provided, default to 1. +cOpacity :: Lens' Color (Maybe Double) +cOpacity = lens _cOpacity (\ s a -> s{_cOpacity = a}) + +instance FromJSON Color where + parseJSON + = withObject "Color" + (\ o -> + Color <$> (o .:? "color") <*> (o .:? "opacity")) + +instance ToJSON Color where + toJSON Color{..} + = object + (catMaybes + [("color" .=) <$> _cColor, + ("opacity" .=) <$> _cOpacity]) + +-- | An asset is any Google Maps Engine resource that has a globally unique +-- ID. Assets include maps, layers, vector tables, raster collections, and +-- rasters. Projects and features are not considered assets. More detailed +-- information about an asset can be obtained by querying the asset\'s +-- particular endpoint. +-- +-- /See:/ 'asset' smart constructor. +data Asset = Asset + { _aCreationTime :: !(Maybe UTCTime) + , _aWritersCanEditPermissions :: !(Maybe Bool) + , _aEtag :: !(Maybe Text) + , _aCreatorEmail :: !(Maybe Text) + , _aLastModifiedTime :: !(Maybe UTCTime) + , _aLastModifierEmail :: !(Maybe Text) + , _aName :: !(Maybe Text) + , _aBbox :: !(Maybe [Double]) + , _aResource :: !(Maybe Text) + , _aId :: !(Maybe Text) + , _aProjectId :: !(Maybe Text) + , _aType :: !(Maybe Text) + , _aDescription :: !(Maybe Text) + , _aTags :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Asset' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aCreationTime' +-- +-- * 'aWritersCanEditPermissions' +-- +-- * 'aEtag' +-- +-- * 'aCreatorEmail' +-- +-- * 'aLastModifiedTime' +-- +-- * 'aLastModifierEmail' +-- +-- * 'aName' +-- +-- * 'aBbox' +-- +-- * 'aResource' +-- +-- * 'aId' +-- +-- * 'aProjectId' +-- +-- * 'aType' +-- +-- * 'aDescription' +-- +-- * 'aTags' +asset + :: Asset +asset = + Asset + { _aCreationTime = Nothing + , _aWritersCanEditPermissions = Nothing + , _aEtag = Nothing + , _aCreatorEmail = Nothing + , _aLastModifiedTime = Nothing + , _aLastModifierEmail = Nothing + , _aName = Nothing + , _aBbox = Nothing + , _aResource = Nothing + , _aId = Nothing + , _aProjectId = Nothing + , _aType = Nothing + , _aDescription = Nothing + , _aTags = Nothing + } + +-- | The creation time of this asset. The value is an RFC 3339-formatted +-- date-time value (for example, 1970-01-01T00:00:00Z). +aCreationTime :: Lens' Asset (Maybe UTCTime) +aCreationTime + = lens _aCreationTime + (\ s a -> s{_aCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +aWritersCanEditPermissions :: Lens' Asset (Maybe Bool) +aWritersCanEditPermissions + = lens _aWritersCanEditPermissions + (\ s a -> s{_aWritersCanEditPermissions = a}) + +-- | The ETag, used to refer to the current version of the asset. +aEtag :: Lens' Asset (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | The email address of the creator of this asset. This is only returned on +-- GET requests and not LIST requests. +aCreatorEmail :: Lens' Asset (Maybe Text) +aCreatorEmail + = lens _aCreatorEmail + (\ s a -> s{_aCreatorEmail = a}) + +-- | The last modified time of this asset. The value is an RFC 3339-formatted +-- date-time value (for example, 1970-01-01T00:00:00Z). +aLastModifiedTime :: Lens' Asset (Maybe UTCTime) +aLastModifiedTime + = lens _aLastModifiedTime + (\ s a -> s{_aLastModifiedTime = a}) + +-- | The email address of the last modifier of this asset. This is only +-- returned on GET requests and not LIST requests. +aLastModifierEmail :: Lens' Asset (Maybe Text) +aLastModifierEmail + = lens _aLastModifierEmail + (\ s a -> s{_aLastModifierEmail = a}) + +-- | The asset\'s name. +aName :: Lens' Asset (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | A rectangular bounding box which contains all of the data in this asset. +-- The box is expressed as \\\"west, south, east, north\\\". The numbers +-- represent latitude and longitude in decimal degrees. +aBbox :: Lens' Asset [Double] +aBbox + = lens _aBbox (\ s a -> s{_aBbox = a}) . _Default . + _Coerce + +-- | The URL to query to retrieve the asset\'s complete object. The assets +-- endpoint only returns high-level information about a resource. +aResource :: Lens' Asset (Maybe Text) +aResource + = lens _aResource (\ s a -> s{_aResource = a}) + +-- | The asset\'s globally unique ID. +aId :: Lens' Asset (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | The ID of the project to which the asset belongs. +aProjectId :: Lens' Asset (Maybe Text) +aProjectId + = lens _aProjectId (\ s a -> s{_aProjectId = a}) + +-- | The type of asset. One of raster, rasterCollection, table, map, or +-- layer. +aType :: Lens' Asset (Maybe Text) +aType = lens _aType (\ s a -> s{_aType = a}) + +-- | The asset\'s description. +aDescription :: Lens' Asset (Maybe Text) +aDescription + = lens _aDescription (\ s a -> s{_aDescription = a}) + +-- | An array of text strings, with each string representing a tag. More +-- information about tags can be found in the Tagging data article of the +-- Maps Engine help center. +aTags :: Lens' Asset [Text] +aTags + = lens _aTags (\ s a -> s{_aTags = a}) . _Default . + _Coerce + +instance FromJSON Asset where + parseJSON + = withObject "Asset" + (\ o -> + Asset <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "etag") + <*> (o .:? "creatorEmail") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "resource") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "type") + <*> (o .:? "description") + <*> (o .:? "tags" .!= mempty)) + +instance ToJSON Asset where + toJSON Asset{..} + = object + (catMaybes + [("creationTime" .=) <$> _aCreationTime, + ("writersCanEditPermissions" .=) <$> + _aWritersCanEditPermissions, + ("etag" .=) <$> _aEtag, + ("creatorEmail" .=) <$> _aCreatorEmail, + ("lastModifiedTime" .=) <$> _aLastModifiedTime, + ("lastModifierEmail" .=) <$> _aLastModifierEmail, + ("name" .=) <$> _aName, ("bbox" .=) <$> _aBbox, + ("resource" .=) <$> _aResource, ("id" .=) <$> _aId, + ("projectId" .=) <$> _aProjectId, + ("type" .=) <$> _aType, + ("description" .=) <$> _aDescription, + ("tags" .=) <$> _aTags]) + +-- | The response returned by a call to any asset\'s Process method. +-- +-- /See:/ 'processResponse' smart constructor. +data ProcessResponse = + ProcessResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProcessResponse' with the minimum fields required to make a request. +-- +processResponse + :: ProcessResponse +processResponse = ProcessResponse + +instance FromJSON ProcessResponse where + parseJSON + = withObject "ProcessResponse" + (\ o -> pure ProcessResponse) + +instance ToJSON ProcessResponse where + toJSON = const (Object mempty) + +-- +-- /See:/ 'tableColumn' smart constructor. +data TableColumn = TableColumn + { _tcName :: !(Maybe Text) + , _tcType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TableColumn' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcName' +-- +-- * 'tcType' +tableColumn + :: TableColumn +tableColumn = + TableColumn + { _tcName = Nothing + , _tcType = Nothing + } + +-- | The column name. +tcName :: Lens' TableColumn (Maybe Text) +tcName = lens _tcName (\ s a -> s{_tcName = a}) + +-- | The type of data stored in this column. +tcType :: Lens' TableColumn (Maybe Text) +tcType = lens _tcType (\ s a -> s{_tcType = a}) + +instance FromJSON TableColumn where + parseJSON + = withObject "TableColumn" + (\ o -> + TableColumn <$> (o .:? "name") <*> (o .:? "type")) + +instance ToJSON TableColumn where + toJSON TableColumn{..} + = object + (catMaybes + [("name" .=) <$> _tcName, ("type" .=) <$> _tcType]) + +-- | The response returned by a call to +-- rasterCollections.rasters.batchDelete. +-- +-- /See:/ 'rasterCollectionsRastersBatchDeleteResponse' smart constructor. +data RasterCollectionsRastersBatchDeleteResponse = + RasterCollectionsRastersBatchDeleteResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersBatchDeleteResponse' with the minimum fields required to make a request. +-- +rasterCollectionsRastersBatchDeleteResponse + :: RasterCollectionsRastersBatchDeleteResponse +rasterCollectionsRastersBatchDeleteResponse = + RasterCollectionsRastersBatchDeleteResponse + +instance FromJSON + RasterCollectionsRastersBatchDeleteResponse where + parseJSON + = withObject + "RasterCollectionsRastersBatchDeleteResponse" + (\ o -> + pure RasterCollectionsRastersBatchDeleteResponse) + +instance ToJSON + RasterCollectionsRastersBatchDeleteResponse where + toJSON = const (Object mempty) + +-- | Parameters for styling points as scaled shapes. +-- +-- /See:/ 'scaledShape' smart constructor. +data ScaledShape = ScaledShape + { _ssBorder :: !(Maybe (Maybe Border)) + , _ssFill :: !(Maybe (Maybe Color)) + , _ssShape :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScaledShape' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssBorder' +-- +-- * 'ssFill' +-- +-- * 'ssShape' +scaledShape + :: ScaledShape +scaledShape = + ScaledShape + { _ssBorder = Nothing + , _ssFill = Nothing + , _ssShape = Nothing + } + +-- | Border color\/width of the shape. If not specified the shape won\'t have +-- a border. +ssBorder :: Lens' ScaledShape (Maybe (Maybe Border)) +ssBorder = lens _ssBorder (\ s a -> s{_ssBorder = a}) + +-- | The fill color of the shape. If not specified the shape will be +-- transparent (although the borders may not be). +ssFill :: Lens' ScaledShape (Maybe (Maybe Color)) +ssFill = lens _ssFill (\ s a -> s{_ssFill = a}) + +-- | Name of the shape. +ssShape :: Lens' ScaledShape (Maybe Text) +ssShape = lens _ssShape (\ s a -> s{_ssShape = a}) + +instance FromJSON ScaledShape where + parseJSON + = withObject "ScaledShape" + (\ o -> + ScaledShape <$> + (o .:? "border") <*> (o .:? "fill") <*> + (o .:? "shape")) + +instance ToJSON ScaledShape where + toJSON ScaledShape{..} + = object + (catMaybes + [("border" .=) <$> _ssBorder, + ("fill" .=) <$> _ssFill, ("shape" .=) <$> _ssShape]) + +-- | An icon is a user-uploaded image that can be used to style point +-- geometries. +-- +-- /See:/ 'icon' smart constructor. +data Icon = Icon + { _iName :: !(Maybe Text) + , _iId :: !(Maybe Text) + , _iDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Icon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iName' +-- +-- * 'iId' +-- +-- * 'iDescription' +icon + :: Icon +icon = + Icon + { _iName = Nothing + , _iId = Nothing + , _iDescription = Nothing + } + +-- | The name of this Icon, supplied by the author. +iName :: Lens' Icon (Maybe Text) +iName = lens _iName (\ s a -> s{_iName = a}) + +-- | An ID used to refer to this Icon. +iId :: Lens' Icon (Maybe Text) +iId = lens _iId (\ s a -> s{_iId = a}) + +-- | The description of this Icon, supplied by the author. +iDescription :: Lens' Icon (Maybe Text) +iDescription + = lens _iDescription (\ s a -> s{_iDescription = a}) + +instance FromJSON Icon where + parseJSON + = withObject "Icon" + (\ o -> + Icon <$> + (o .:? "name") <*> (o .:? "id") <*> + (o .:? "description")) + +instance ToJSON Icon where + toJSON Icon{..} + = object + (catMaybes + [("name" .=) <$> _iName, ("id" .=) <$> _iId, + ("description" .=) <$> _iDescription]) + +-- | The request sent to features.BatchDelete. +-- +-- /See:/ 'featuresBatchDeleteRequest' smart constructor. +data FeaturesBatchDeleteRequest = FeaturesBatchDeleteRequest + { _fbdrPrimaryKeys :: !(Maybe [Text]) + , _fbdrGxIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FeaturesBatchDeleteRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbdrPrimaryKeys' +-- +-- * 'fbdrGxIds' +featuresBatchDeleteRequest + :: FeaturesBatchDeleteRequest +featuresBatchDeleteRequest = + FeaturesBatchDeleteRequest + { _fbdrPrimaryKeys = Nothing + , _fbdrGxIds = Nothing + } + +fbdrPrimaryKeys :: Lens' FeaturesBatchDeleteRequest [Text] +fbdrPrimaryKeys + = lens _fbdrPrimaryKeys + (\ s a -> s{_fbdrPrimaryKeys = a}) + . _Default + . _Coerce + +fbdrGxIds :: Lens' FeaturesBatchDeleteRequest [Text] +fbdrGxIds + = lens _fbdrGxIds (\ s a -> s{_fbdrGxIds = a}) . + _Default + . _Coerce + +instance FromJSON FeaturesBatchDeleteRequest where + parseJSON + = withObject "FeaturesBatchDeleteRequest" + (\ o -> + FeaturesBatchDeleteRequest <$> + (o .:? "primaryKeys" .!= mempty) <*> + (o .:? "gx_ids" .!= mempty)) + +instance ToJSON FeaturesBatchDeleteRequest where + toJSON FeaturesBatchDeleteRequest{..} + = object + (catMaybes + [("primaryKeys" .=) <$> _fbdrPrimaryKeys, + ("gx_ids" .=) <$> _fbdrGxIds]) + +-- | The response returned by a call to +-- rasterCollections.rasters.batchInsert. +-- +-- /See:/ 'rasterCollectionsRastersBatchInsertResponse' smart constructor. +data RasterCollectionsRastersBatchInsertResponse = + RasterCollectionsRastersBatchInsertResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersBatchInsertResponse' with the minimum fields required to make a request. +-- +rasterCollectionsRastersBatchInsertResponse + :: RasterCollectionsRastersBatchInsertResponse +rasterCollectionsRastersBatchInsertResponse = + RasterCollectionsRastersBatchInsertResponse + +instance FromJSON + RasterCollectionsRastersBatchInsertResponse where + parseJSON + = withObject + "RasterCollectionsRastersBatchInsertResponse" + (\ o -> + pure RasterCollectionsRastersBatchInsertResponse) + +instance ToJSON + RasterCollectionsRastersBatchInsertResponse where + toJSON = const (Object mempty) + +-- | The response returned by a call to features.List. +-- +-- /See:/ 'featuresListResponse' smart constructor. +data FeaturesListResponse = FeaturesListResponse + { _flrNextPageToken :: !(Maybe Text) + , _flrAllowedQueriesPerSecond :: !(Maybe Double) + , _flrSchema :: !(Maybe (Maybe Schema)) + , _flrFeatures :: !(Maybe [Maybe Feature]) + , _flrType :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FeaturesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flrNextPageToken' +-- +-- * 'flrAllowedQueriesPerSecond' +-- +-- * 'flrSchema' +-- +-- * 'flrFeatures' +-- +-- * 'flrType' +featuresListResponse + :: FeaturesListResponse +featuresListResponse = + FeaturesListResponse + { _flrNextPageToken = Nothing + , _flrAllowedQueriesPerSecond = Nothing + , _flrSchema = Nothing + , _flrFeatures = Nothing + , _flrType = "FeatureCollection" + } + +-- | Next page token. +flrNextPageToken :: Lens' FeaturesListResponse (Maybe Text) +flrNextPageToken + = lens _flrNextPageToken + (\ s a -> s{_flrNextPageToken = a}) + +-- | An indicator of the maximum rate at which queries may be made, if all +-- queries were as expensive as this query. +flrAllowedQueriesPerSecond :: Lens' FeaturesListResponse (Maybe Double) +flrAllowedQueriesPerSecond + = lens _flrAllowedQueriesPerSecond + (\ s a -> s{_flrAllowedQueriesPerSecond = a}) + +-- | The feature schema. +flrSchema :: Lens' FeaturesListResponse (Maybe (Maybe Schema)) +flrSchema + = lens _flrSchema (\ s a -> s{_flrSchema = a}) + +-- | Resources returned. +flrFeatures :: Lens' FeaturesListResponse [Maybe Feature] +flrFeatures + = lens _flrFeatures (\ s a -> s{_flrFeatures = a}) . + _Default + . _Coerce + +flrType :: Lens' FeaturesListResponse Text +flrType = lens _flrType (\ s a -> s{_flrType = a}) + +instance FromJSON FeaturesListResponse where + parseJSON + = withObject "FeaturesListResponse" + (\ o -> + FeaturesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "allowedQueriesPerSecond") + <*> (o .:? "schema") + <*> (o .:? "features" .!= mempty) + <*> (o .:? "type" .!= "FeatureCollection")) + +instance ToJSON FeaturesListResponse where + toJSON FeaturesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _flrNextPageToken, + ("allowedQueriesPerSecond" .=) <$> + _flrAllowedQueriesPerSecond, + ("schema" .=) <$> _flrSchema, + ("features" .=) <$> _flrFeatures, + Just ("type" .= _flrType)]) + +-- | The response returned by a call to parents.List. +-- +-- /See:/ 'parentsListResponse' smart constructor. +data ParentsListResponse = ParentsListResponse + { _plrNextPageToken :: !(Maybe Text) + , _plrParents :: !(Maybe [Maybe Parent]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ParentsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrNextPageToken' +-- +-- * 'plrParents' +parentsListResponse + :: ParentsListResponse +parentsListResponse = + ParentsListResponse + { _plrNextPageToken = Nothing + , _plrParents = Nothing + } + +-- | Next page token. +plrNextPageToken :: Lens' ParentsListResponse (Maybe Text) +plrNextPageToken + = lens _plrNextPageToken + (\ s a -> s{_plrNextPageToken = a}) + +-- | The parent assets. +plrParents :: Lens' ParentsListResponse [Maybe Parent] +plrParents + = lens _plrParents (\ s a -> s{_plrParents = a}) . + _Default + . _Coerce + +instance FromJSON ParentsListResponse where + parseJSON + = withObject "ParentsListResponse" + (\ o -> + ParentsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "parents" .!= mempty)) + +instance ToJSON ParentsListResponse where + toJSON ParentsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _plrNextPageToken, + ("parents" .=) <$> _plrParents]) + +-- | The request sent to rasterCollections.Rasters.BatchDelete. +-- +-- /See:/ 'rasterCollectionsRasterBatchDeleteRequest' smart constructor. +newtype RasterCollectionsRasterBatchDeleteRequest = RasterCollectionsRasterBatchDeleteRequest + { _rcrbdrIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRasterBatchDeleteRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrbdrIds' +rasterCollectionsRasterBatchDeleteRequest + :: RasterCollectionsRasterBatchDeleteRequest +rasterCollectionsRasterBatchDeleteRequest = + RasterCollectionsRasterBatchDeleteRequest + { _rcrbdrIds = Nothing + } + +-- | An array of Raster asset IDs to be removed from this RasterCollection. +rcrbdrIds :: Lens' RasterCollectionsRasterBatchDeleteRequest [Text] +rcrbdrIds + = lens _rcrbdrIds (\ s a -> s{_rcrbdrIds = a}) . + _Default + . _Coerce + +instance FromJSON + RasterCollectionsRasterBatchDeleteRequest where + parseJSON + = withObject + "RasterCollectionsRasterBatchDeleteRequest" + (\ o -> + RasterCollectionsRasterBatchDeleteRequest <$> + (o .:? "ids" .!= mempty)) + +instance ToJSON + RasterCollectionsRasterBatchDeleteRequest where + toJSON RasterCollectionsRasterBatchDeleteRequest{..} + = object (catMaybes [("ids" .=) <$> _rcrbdrIds]) + +-- | Text label style. +-- +-- /See:/ 'labelStyle' smart constructor. +data LabelStyle = LabelStyle + { _lsFontStyle :: !(Maybe Text) + , _lsColor :: !(Maybe Text) + , _lsSize :: !(Maybe Double) + , _lsOpacity :: !(Maybe Double) + , _lsOutline :: !(Maybe (Maybe Color)) + , _lsFontWeight :: !(Maybe Text) + , _lsColumn :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LabelStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsFontStyle' +-- +-- * 'lsColor' +-- +-- * 'lsSize' +-- +-- * 'lsOpacity' +-- +-- * 'lsOutline' +-- +-- * 'lsFontWeight' +-- +-- * 'lsColumn' +labelStyle + :: LabelStyle +labelStyle = + LabelStyle + { _lsFontStyle = Nothing + , _lsColor = Nothing + , _lsSize = Nothing + , _lsOpacity = Nothing + , _lsOutline = Nothing + , _lsFontWeight = Nothing + , _lsColumn = Nothing + } + +-- | Font style of the label, defaults to \'normal\'. +lsFontStyle :: Lens' LabelStyle (Maybe Text) +lsFontStyle + = lens _lsFontStyle (\ s a -> s{_lsFontStyle = a}) + +-- | Color of the text. If not provided, default to black. +lsColor :: Lens' LabelStyle (Maybe Text) +lsColor = lens _lsColor (\ s a -> s{_lsColor = a}) + +-- | Font size of the label, in pixels. 8 \<= size \<= 15. If not provided, a +-- default size will be provided. +lsSize :: Lens' LabelStyle (Maybe Double) +lsSize = lens _lsSize (\ s a -> s{_lsSize = a}) + +-- | Opacity of the text. +lsOpacity :: Lens' LabelStyle (Maybe Double) +lsOpacity + = lens _lsOpacity (\ s a -> s{_lsOpacity = a}) + +-- | Outline color of the text. +lsOutline :: Lens' LabelStyle (Maybe (Maybe Color)) +lsOutline + = lens _lsOutline (\ s a -> s{_lsOutline = a}) + +-- | Font weight of the label, defaults to \'normal\'. +lsFontWeight :: Lens' LabelStyle (Maybe Text) +lsFontWeight + = lens _lsFontWeight (\ s a -> s{_lsFontWeight = a}) + +-- | The column value of the feature to be displayed. +lsColumn :: Lens' LabelStyle (Maybe Text) +lsColumn = lens _lsColumn (\ s a -> s{_lsColumn = a}) + +instance FromJSON LabelStyle where + parseJSON + = withObject "LabelStyle" + (\ o -> + LabelStyle <$> + (o .:? "fontStyle") <*> (o .:? "color") <*> + (o .:? "size") + <*> (o .:? "opacity") + <*> (o .:? "outline") + <*> (o .:? "fontWeight") + <*> (o .:? "column")) + +instance ToJSON LabelStyle where + toJSON LabelStyle{..} + = object + (catMaybes + [("fontStyle" .=) <$> _lsFontStyle, + ("color" .=) <$> _lsColor, ("size" .=) <$> _lsSize, + ("opacity" .=) <$> _lsOpacity, + ("outline" .=) <$> _lsOutline, + ("fontWeight" .=) <$> _lsFontWeight, + ("column" .=) <$> _lsColumn]) + +-- +-- /See:/ 'mapItem' smart constructor. +data MapItem = + MapItem + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapItem' with the minimum fields required to make a request. +-- +mapItem + :: MapItem +mapItem = MapItem + +instance FromJSON MapItem where + parseJSON + = withObject "MapItem" (\ o -> pure MapItem) + +instance ToJSON MapItem where + toJSON = const (Object mempty) + +-- | The response returned by a call to icons.List. +-- +-- /See:/ 'iconsListResponse' smart constructor. +data IconsListResponse = IconsListResponse + { _ilrNextPageToken :: !(Maybe Text) + , _ilrIcons :: !(Maybe [Maybe Icon]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IconsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilrNextPageToken' +-- +-- * 'ilrIcons' +iconsListResponse + :: IconsListResponse +iconsListResponse = + IconsListResponse + { _ilrNextPageToken = Nothing + , _ilrIcons = Nothing + } + +-- | Next page token. +ilrNextPageToken :: Lens' IconsListResponse (Maybe Text) +ilrNextPageToken + = lens _ilrNextPageToken + (\ s a -> s{_ilrNextPageToken = a}) + +-- | Resources returned. +ilrIcons :: Lens' IconsListResponse [Maybe Icon] +ilrIcons + = lens _ilrIcons (\ s a -> s{_ilrIcons = a}) . + _Default + . _Coerce + +instance FromJSON IconsListResponse where + parseJSON + = withObject "IconsListResponse" + (\ o -> + IconsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "icons" .!= mempty)) + +instance ToJSON IconsListResponse where + toJSON IconsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ilrNextPageToken, + ("icons" .=) <$> _ilrIcons]) + +-- | A schema indicating the properties which may be associated with features +-- within a Table, and the types of those properties. +-- +-- /See:/ 'schema' smart constructor. +data Schema = Schema + { _sPrimaryKey :: !(Maybe Text) + , _sColumns :: !(Maybe [Maybe TableColumn]) + , _sPrimaryGeometry :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Schema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sPrimaryKey' +-- +-- * 'sColumns' +-- +-- * 'sPrimaryGeometry' +schema + :: Schema +schema = + Schema + { _sPrimaryKey = Nothing + , _sColumns = Nothing + , _sPrimaryGeometry = Nothing + } + +-- | The name of the column that contains the unique identifier of a Feature. +sPrimaryKey :: Lens' Schema (Maybe Text) +sPrimaryKey + = lens _sPrimaryKey (\ s a -> s{_sPrimaryKey = a}) + +-- | An array of TableColumn objects. The first object in the array must be +-- named geometry and be of type points, lineStrings, polygons, or +-- mixedGeometry. +sColumns :: Lens' Schema [Maybe TableColumn] +sColumns + = lens _sColumns (\ s a -> s{_sColumns = a}) . + _Default + . _Coerce + +-- | The name of the column that contains a feature\'s geometry. This field +-- can be omitted during table create; Google Maps Engine supports only a +-- single geometry column, which must be named geometry and be the first +-- object in the columns array. +sPrimaryGeometry :: Lens' Schema (Maybe Text) +sPrimaryGeometry + = lens _sPrimaryGeometry + (\ s a -> s{_sPrimaryGeometry = a}) + +instance FromJSON Schema where + parseJSON + = withObject "Schema" + (\ o -> + Schema <$> + (o .:? "primaryKey") <*> (o .:? "columns" .!= mempty) + <*> (o .:? "primaryGeometry")) + +instance ToJSON Schema where + toJSON Schema{..} + = object + (catMaybes + [("primaryKey" .=) <$> _sPrimaryKey, + ("columns" .=) <$> _sColumns, + ("primaryGeometry" .=) <$> _sPrimaryGeometry]) + +-- | Acquisition time represents acquired time of a raster. +-- +-- /See:/ 'acquisitionTime' smart constructor. +data AcquisitionTime = AcquisitionTime + { _atStart :: !(Maybe UTCTime) + , _atPrecision :: !(Maybe Text) + , _atEnd :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AcquisitionTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'atStart' +-- +-- * 'atPrecision' +-- +-- * 'atEnd' +acquisitionTime + :: AcquisitionTime +acquisitionTime = + AcquisitionTime + { _atStart = Nothing + , _atPrecision = Nothing + , _atEnd = Nothing + } + +-- | The acquisition time, or start time if acquisition time is a range. The +-- value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). +atStart :: Lens' AcquisitionTime (Maybe UTCTime) +atStart = lens _atStart (\ s a -> s{_atStart = a}) + +-- | The precision of acquisition time. +atPrecision :: Lens' AcquisitionTime (Maybe Text) +atPrecision + = lens _atPrecision (\ s a -> s{_atPrecision = a}) + +-- | The end time if acquisition time is a range. The value is an RFC 3339 +-- formatted date-time value (1970-01-01T00:00:00Z). +atEnd :: Lens' AcquisitionTime (Maybe UTCTime) +atEnd = lens _atEnd (\ s a -> s{_atEnd = a}) + +instance FromJSON AcquisitionTime where + parseJSON + = withObject "AcquisitionTime" + (\ o -> + AcquisitionTime <$> + (o .:? "start") <*> (o .:? "precision") <*> + (o .:? "end")) + +instance ToJSON AcquisitionTime where + toJSON AcquisitionTime{..} + = object + (catMaybes + [("start" .=) <$> _atStart, + ("precision" .=) <$> _atPrecision, + ("end" .=) <$> _atEnd]) + +-- | The response returned by a call to tables.List. Note: The list response +-- does not include all the fields available in a table. Refer to the table +-- resource description for details of the fields that are not included. +-- You\'ll need to send a get request to retrieve the additional fields for +-- each table. +-- +-- /See:/ 'tablesListResponse' smart constructor. +data TablesListResponse = TablesListResponse + { _tlrNextPageToken :: !(Maybe Word8) + , _tlrTables :: !(Maybe [Maybe Table]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrNextPageToken' +-- +-- * 'tlrTables' +tablesListResponse + :: TablesListResponse +tablesListResponse = + TablesListResponse + { _tlrNextPageToken = Nothing + , _tlrTables = Nothing + } + +-- | Next page token. +tlrNextPageToken :: Lens' TablesListResponse (Maybe Word8) +tlrNextPageToken + = lens _tlrNextPageToken + (\ s a -> s{_tlrNextPageToken = a}) + +-- | Resources returned. +tlrTables :: Lens' TablesListResponse [Maybe Table] +tlrTables + = lens _tlrTables (\ s a -> s{_tlrTables = a}) . + _Default + . _Coerce + +instance FromJSON TablesListResponse where + parseJSON + = withObject "TablesListResponse" + (\ o -> + TablesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "tables" .!= mempty)) + +instance ToJSON TablesListResponse where + toJSON TablesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tlrNextPageToken, + ("tables" .=) <$> _tlrTables]) + +-- | A Map is a collection of Layers, optionally contained within folders. +-- +-- /See:/ 'map'' smart constructor. +data Map = Map + { _mapCreationTime :: !(Maybe UTCTime) + , _mapWritersCanEditPermissions :: !(Maybe Bool) + , _mapEtag :: !(Maybe Text) + , _mapDefaultViewport :: !(Maybe (Maybe [Double])) + , _mapContents :: !(Maybe (Maybe [Maybe MapItem])) + , _mapPublishingStatus :: !(Maybe Text) + , _mapCreatorEmail :: !(Maybe Text) + , _mapLastModifiedTime :: !(Maybe UTCTime) + , _mapLastModifierEmail :: !(Maybe Text) + , _mapVersions :: !(Maybe [Text]) + , _mapName :: !(Maybe Text) + , _mapBbox :: !(Maybe [Double]) + , _mapProcessingStatus :: !(Maybe Text) + , _mapId :: !(Maybe Text) + , _mapProjectId :: !(Maybe Text) + , _mapDraftAccessList :: !(Maybe Text) + , _mapPublishedAccessList :: !(Maybe Text) + , _mapDescription :: !(Maybe Text) + , _mapTags :: !(Maybe (Maybe [Text])) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Map' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mapCreationTime' +-- +-- * 'mapWritersCanEditPermissions' +-- +-- * 'mapEtag' +-- +-- * 'mapDefaultViewport' +-- +-- * 'mapContents' +-- +-- * 'mapPublishingStatus' +-- +-- * 'mapCreatorEmail' +-- +-- * 'mapLastModifiedTime' +-- +-- * 'mapLastModifierEmail' +-- +-- * 'mapVersions' +-- +-- * 'mapName' +-- +-- * 'mapBbox' +-- +-- * 'mapProcessingStatus' +-- +-- * 'mapId' +-- +-- * 'mapProjectId' +-- +-- * 'mapDraftAccessList' +-- +-- * 'mapPublishedAccessList' +-- +-- * 'mapDescription' +-- +-- * 'mapTags' +map' + :: Map +map' = + Map + { _mapCreationTime = Nothing + , _mapWritersCanEditPermissions = Nothing + , _mapEtag = Nothing + , _mapDefaultViewport = Nothing + , _mapContents = Nothing + , _mapPublishingStatus = Nothing + , _mapCreatorEmail = Nothing + , _mapLastModifiedTime = Nothing + , _mapLastModifierEmail = Nothing + , _mapVersions = Nothing + , _mapName = Nothing + , _mapBbox = Nothing + , _mapProcessingStatus = Nothing + , _mapId = Nothing + , _mapProjectId = Nothing + , _mapDraftAccessList = Nothing + , _mapPublishedAccessList = Nothing + , _mapDescription = Nothing + , _mapTags = Nothing + } + +-- | The creation time of this map. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +mapCreationTime :: Lens' Map (Maybe UTCTime) +mapCreationTime + = lens _mapCreationTime + (\ s a -> s{_mapCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +mapWritersCanEditPermissions :: Lens' Map (Maybe Bool) +mapWritersCanEditPermissions + = lens _mapWritersCanEditPermissions + (\ s a -> s{_mapWritersCanEditPermissions = a}) + +-- | The ETag, used to refer to the current version of the asset. +mapEtag :: Lens' Map (Maybe Text) +mapEtag = lens _mapEtag (\ s a -> s{_mapEtag = a}) + +-- | An array of four numbers (west, south, east, north) which defines the +-- rectangular bounding box of the default viewport. The numbers represent +-- latitude and longitude in decimal degrees. +mapDefaultViewport :: Lens' Map (Maybe [Double]) +mapDefaultViewport + = lens _mapDefaultViewport + (\ s a -> s{_mapDefaultViewport = a}) + . mapping (_Default . _Coerce) + +-- | The contents of this Map. +mapContents :: Lens' Map (Maybe [Maybe MapItem]) +mapContents + = lens _mapContents (\ s a -> s{_mapContents = a}) . + mapping (_Default . _Coerce) + +-- | The publishing status of this map. +mapPublishingStatus :: Lens' Map (Maybe Text) +mapPublishingStatus + = lens _mapPublishingStatus + (\ s a -> s{_mapPublishingStatus = a}) + +-- | The email address of the creator of this map. This is only returned on +-- GET requests and not LIST requests. +mapCreatorEmail :: Lens' Map (Maybe Text) +mapCreatorEmail + = lens _mapCreatorEmail + (\ s a -> s{_mapCreatorEmail = a}) + +-- | The last modified time of this map. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +mapLastModifiedTime :: Lens' Map (Maybe UTCTime) +mapLastModifiedTime + = lens _mapLastModifiedTime + (\ s a -> s{_mapLastModifiedTime = a}) + +-- | The email address of the last modifier of this map. This is only +-- returned on GET requests and not LIST requests. +mapLastModifierEmail :: Lens' Map (Maybe Text) +mapLastModifierEmail + = lens _mapLastModifierEmail + (\ s a -> s{_mapLastModifierEmail = a}) + +-- | Deprecated: An array containing the available versions of this Map. +-- Currently may only contain \"published\". The publishingStatus field +-- should be used instead. +mapVersions :: Lens' Map [Text] +mapVersions + = lens _mapVersions (\ s a -> s{_mapVersions = a}) . + _Default + . _Coerce + +-- | The name of this Map, supplied by the author. +mapName :: Lens' Map (Maybe Text) +mapName = lens _mapName (\ s a -> s{_mapName = a}) + +-- | A rectangular bounding box which contains all of the data in this Map. +-- The box is expressed as \\\"west, south, east, north\\\". The numbers +-- represent latitude and longitude in decimal degrees. +mapBbox :: Lens' Map [Double] +mapBbox + = lens _mapBbox (\ s a -> s{_mapBbox = a}) . _Default + . _Coerce + +-- | The processing status of this map. Map processing is automatically +-- started once a map becomes ready for processing. +mapProcessingStatus :: Lens' Map (Maybe Text) +mapProcessingStatus + = lens _mapProcessingStatus + (\ s a -> s{_mapProcessingStatus = a}) + +-- | A globally unique ID, used to refer to this Map. +mapId :: Lens' Map (Maybe Text) +mapId = lens _mapId (\ s a -> s{_mapId = a}) + +-- | The ID of the project that this Map is in. +mapProjectId :: Lens' Map (Maybe Text) +mapProjectId + = lens _mapProjectId (\ s a -> s{_mapProjectId = a}) + +-- | Deprecated: The name of an access list of the Map Editor type. The user +-- on whose behalf the request is being sent must be an editor on that +-- access list. Note: Google Maps Engine no longer uses access lists. +-- Instead, each asset has its own list of permissions. For backward +-- compatibility, the API still accepts access lists for projects that are +-- already using access lists. If you created a GME account\/project after +-- July 14th, 2014, you will not be able to send API requests that include +-- access lists. Note: This is an input field only. It is not returned in +-- response to a list or get request. +mapDraftAccessList :: Lens' Map (Maybe Text) +mapDraftAccessList + = lens _mapDraftAccessList + (\ s a -> s{_mapDraftAccessList = a}) + +-- | Deprecated: The access list to whom view permissions are granted. The +-- value must be the name of a Maps Engine access list of the Map Viewer +-- type, and the user must be a viewer on that list. Note: Google Maps +-- Engine no longer uses access lists. Instead, each asset has its own list +-- of permissions. For backward compatibility, the API still accepts access +-- lists for projects that are already using access lists. If you created a +-- GME account\/project after July 14th, 2014, you will not be able to send +-- API requests that include access lists. This is an input field only. It +-- is not returned in response to a list or get request. +mapPublishedAccessList :: Lens' Map (Maybe Text) +mapPublishedAccessList + = lens _mapPublishedAccessList + (\ s a -> s{_mapPublishedAccessList = a}) + +-- | The description of this Map, supplied by the author. +mapDescription :: Lens' Map (Maybe Text) +mapDescription + = lens _mapDescription + (\ s a -> s{_mapDescription = a}) + +-- | Tags of this Map. +mapTags :: Lens' Map (Maybe [Text]) +mapTags + = lens _mapTags (\ s a -> s{_mapTags = a}) . + mapping (_Default . _Coerce) + +instance FromJSON Map where + parseJSON + = withObject "Map" + (\ o -> + Map <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "etag") + <*> (o .:? "defaultViewport") + <*> (o .:? "contents") + <*> (o .:? "publishingStatus") + <*> (o .:? "creatorEmail") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "versions" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "processingStatus") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "draftAccessList") + <*> (o .:? "publishedAccessList") + <*> (o .:? "description") + <*> (o .:? "tags")) + +instance ToJSON Map where + toJSON Map{..} + = object + (catMaybes + [("creationTime" .=) <$> _mapCreationTime, + ("writersCanEditPermissions" .=) <$> + _mapWritersCanEditPermissions, + ("etag" .=) <$> _mapEtag, + ("defaultViewport" .=) <$> _mapDefaultViewport, + ("contents" .=) <$> _mapContents, + ("publishingStatus" .=) <$> _mapPublishingStatus, + ("creatorEmail" .=) <$> _mapCreatorEmail, + ("lastModifiedTime" .=) <$> _mapLastModifiedTime, + ("lastModifierEmail" .=) <$> _mapLastModifierEmail, + ("versions" .=) <$> _mapVersions, + ("name" .=) <$> _mapName, ("bbox" .=) <$> _mapBbox, + ("processingStatus" .=) <$> _mapProcessingStatus, + ("id" .=) <$> _mapId, + ("projectId" .=) <$> _mapProjectId, + ("draftAccessList" .=) <$> _mapDraftAccessList, + ("publishedAccessList" .=) <$> + _mapPublishedAccessList, + ("description" .=) <$> _mapDescription, + ("tags" .=) <$> _mapTags]) + +-- | Style for icon, this is part of point style. +-- +-- /See:/ 'iconStyle' smart constructor. +data IconStyle = IconStyle + { _isScaledShape :: !(Maybe (Maybe ScaledShape)) + , _isScalingFunction :: !(Maybe (Maybe ScalingFunction)) + , _isName :: !(Maybe Text) + , _isId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IconStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isScaledShape' +-- +-- * 'isScalingFunction' +-- +-- * 'isName' +-- +-- * 'isId' +iconStyle + :: IconStyle +iconStyle = + IconStyle + { _isScaledShape = Nothing + , _isScalingFunction = Nothing + , _isName = Nothing + , _isId = Nothing + } + +-- | A scalable shape. +isScaledShape :: Lens' IconStyle (Maybe (Maybe ScaledShape)) +isScaledShape + = lens _isScaledShape + (\ s a -> s{_isScaledShape = a}) + +-- | The function used to scale shapes. Required when a scaledShape is +-- specified. +isScalingFunction :: Lens' IconStyle (Maybe (Maybe ScalingFunction)) +isScalingFunction + = lens _isScalingFunction + (\ s a -> s{_isScalingFunction = a}) + +-- | Stock icon name. To use a stock icon, prefix it with \'gx_\'. See Stock +-- icon names for valid icon names. For example, to specify small_red, set +-- name to \'gx_small_red\'. +isName :: Lens' IconStyle (Maybe Text) +isName = lens _isName (\ s a -> s{_isName = a}) + +-- | Custom icon id. +isId :: Lens' IconStyle (Maybe Text) +isId = lens _isId (\ s a -> s{_isId = a}) + +instance FromJSON IconStyle where + parseJSON + = withObject "IconStyle" + (\ o -> + IconStyle <$> + (o .:? "scaledShape") <*> (o .:? "scalingFunction") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON IconStyle where + toJSON IconStyle{..} + = object + (catMaybes + [("scaledShape" .=) <$> _isScaledShape, + ("scalingFunction" .=) <$> _isScalingFunction, + ("name" .=) <$> _isName, ("id" .=) <$> _isId]) + +-- | Border in line style. Both color and width are required. +-- +-- /See:/ 'border' smart constructor. +data Border = Border + { _bColor :: !(Maybe Text) + , _bWidth :: !(Maybe Double) + , _bOpacity :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Border' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bColor' +-- +-- * 'bWidth' +-- +-- * 'bOpacity' +border + :: Border +border = + Border + { _bColor = Nothing + , _bWidth = Nothing + , _bOpacity = Nothing + } + +-- | Color of the border. +bColor :: Lens' Border (Maybe Text) +bColor = lens _bColor (\ s a -> s{_bColor = a}) + +-- | Width of the border, in pixels. +bWidth :: Lens' Border (Maybe Double) +bWidth = lens _bWidth (\ s a -> s{_bWidth = a}) + +-- | Opacity of the border. +bOpacity :: Lens' Border (Maybe Double) +bOpacity = lens _bOpacity (\ s a -> s{_bOpacity = a}) + +instance FromJSON Border where + parseJSON + = withObject "Border" + (\ o -> + Border <$> + (o .:? "color") <*> (o .:? "width") <*> + (o .:? "opacity")) + +instance ToJSON Border where + toJSON Border{..} + = object + (catMaybes + [("color" .=) <$> _bColor, ("width" .=) <$> _bWidth, + ("opacity" .=) <$> _bOpacity]) + +-- | A display rule of the vector style. +-- +-- /See:/ 'displayRule' smart constructor. +data DisplayRule = DisplayRule + { _drPointOptions :: !(Maybe (Maybe PointStyle)) + , _drPolygonOptions :: !(Maybe (Maybe PolygonStyle)) + , _drZoomLevels :: !(Maybe (Maybe ZoomLevels)) + , _drFilters :: !(Maybe [Maybe Filter]) + , _drName :: !(Maybe Text) + , _drLineOptions :: !(Maybe (Maybe LineStyle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DisplayRule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'drPointOptions' +-- +-- * 'drPolygonOptions' +-- +-- * 'drZoomLevels' +-- +-- * 'drFilters' +-- +-- * 'drName' +-- +-- * 'drLineOptions' +displayRule + :: DisplayRule +displayRule = + DisplayRule + { _drPointOptions = Nothing + , _drPolygonOptions = Nothing + , _drZoomLevels = Nothing + , _drFilters = Nothing + , _drName = Nothing + , _drLineOptions = Nothing + } + +-- | Style applied to points. Required for Point Geometry. +drPointOptions :: Lens' DisplayRule (Maybe (Maybe PointStyle)) +drPointOptions + = lens _drPointOptions + (\ s a -> s{_drPointOptions = a}) + +-- | Style applied to polygons. Required for Polygon Geometry. +drPolygonOptions :: Lens' DisplayRule (Maybe (Maybe PolygonStyle)) +drPolygonOptions + = lens _drPolygonOptions + (\ s a -> s{_drPolygonOptions = a}) + +-- | The zoom levels that this display rule apply. +drZoomLevels :: Lens' DisplayRule (Maybe (Maybe ZoomLevels)) +drZoomLevels + = lens _drZoomLevels (\ s a -> s{_drZoomLevels = a}) + +-- | This display rule will only be applied to features that match all of the +-- filters here. If filters is empty, then the rule applies to all +-- features. +drFilters :: Lens' DisplayRule [Maybe Filter] +drFilters + = lens _drFilters (\ s a -> s{_drFilters = a}) . + _Default + . _Coerce + +-- | Display rule name. Name is not unique and cannot be used for +-- identification purpose. +drName :: Lens' DisplayRule (Maybe Text) +drName = lens _drName (\ s a -> s{_drName = a}) + +-- | Style applied to lines. Required for LineString Geometry. +drLineOptions :: Lens' DisplayRule (Maybe (Maybe LineStyle)) +drLineOptions + = lens _drLineOptions + (\ s a -> s{_drLineOptions = a}) + +instance FromJSON DisplayRule where + parseJSON + = withObject "DisplayRule" + (\ o -> + DisplayRule <$> + (o .:? "pointOptions") <*> (o .:? "polygonOptions") + <*> (o .:? "zoomLevels") + <*> (o .:? "filters" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "lineOptions")) + +instance ToJSON DisplayRule where + toJSON DisplayRule{..} + = object + (catMaybes + [("pointOptions" .=) <$> _drPointOptions, + ("polygonOptions" .=) <$> _drPolygonOptions, + ("zoomLevels" .=) <$> _drZoomLevels, + ("filters" .=) <$> _drFilters, + ("name" .=) <$> _drName, + ("lineOptions" .=) <$> _drLineOptions]) + +-- | The published version of a map asset. +-- +-- /See:/ 'publishedMap' smart constructor. +data PublishedMap = PublishedMap + { _pmDefaultViewport :: !(Maybe (Maybe [Double])) + , _pmContents :: !(Maybe (Maybe [Maybe MapItem])) + , _pmName :: !(Maybe Text) + , _pmId :: !(Maybe Text) + , _pmProjectId :: !(Maybe Text) + , _pmDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishedMap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmDefaultViewport' +-- +-- * 'pmContents' +-- +-- * 'pmName' +-- +-- * 'pmId' +-- +-- * 'pmProjectId' +-- +-- * 'pmDescription' +publishedMap + :: PublishedMap +publishedMap = + PublishedMap + { _pmDefaultViewport = Nothing + , _pmContents = Nothing + , _pmName = Nothing + , _pmId = Nothing + , _pmProjectId = Nothing + , _pmDescription = Nothing + } + +-- | An array of four numbers (west, south, east, north) which defines the +-- rectangular bounding box of the default viewport. The numbers represent +-- latitude and longitude in decimal degrees. +pmDefaultViewport :: Lens' PublishedMap (Maybe [Double]) +pmDefaultViewport + = lens _pmDefaultViewport + (\ s a -> s{_pmDefaultViewport = a}) + . mapping (_Default . _Coerce) + +-- | The contents of this Map. +pmContents :: Lens' PublishedMap (Maybe [Maybe MapItem]) +pmContents + = lens _pmContents (\ s a -> s{_pmContents = a}) . + mapping (_Default . _Coerce) + +-- | The name of this Map, supplied by the author. +pmName :: Lens' PublishedMap (Maybe Text) +pmName = lens _pmName (\ s a -> s{_pmName = a}) + +-- | A globally unique ID, used to refer to this Map. +pmId :: Lens' PublishedMap (Maybe Text) +pmId = lens _pmId (\ s a -> s{_pmId = a}) + +-- | The ID of the project that this Map is in. +pmProjectId :: Lens' PublishedMap (Maybe Text) +pmProjectId + = lens _pmProjectId (\ s a -> s{_pmProjectId = a}) + +-- | The description of this Map, supplied by the author. +pmDescription :: Lens' PublishedMap (Maybe Text) +pmDescription + = lens _pmDescription + (\ s a -> s{_pmDescription = a}) + +instance FromJSON PublishedMap where + parseJSON + = withObject "PublishedMap" + (\ o -> + PublishedMap <$> + (o .:? "defaultViewport") <*> (o .:? "contents") <*> + (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "description")) + +instance ToJSON PublishedMap where + toJSON PublishedMap{..} + = object + (catMaybes + [("defaultViewport" .=) <$> _pmDefaultViewport, + ("contents" .=) <$> _pmContents, + ("name" .=) <$> _pmName, ("id" .=) <$> _pmId, + ("projectId" .=) <$> _pmProjectId, + ("description" .=) <$> _pmDescription]) + +-- | The request sent to rasterCollections.Rasters.BatchInsert. +-- +-- /See:/ 'rasterCollectionsRastersBatchInsertRequest' smart constructor. +newtype RasterCollectionsRastersBatchInsertRequest = RasterCollectionsRastersBatchInsertRequest + { _rcrbirIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersBatchInsertRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrbirIds' +rasterCollectionsRastersBatchInsertRequest + :: RasterCollectionsRastersBatchInsertRequest +rasterCollectionsRastersBatchInsertRequest = + RasterCollectionsRastersBatchInsertRequest + { _rcrbirIds = Nothing + } + +-- | An array of Raster asset IDs to be added to this RasterCollection. +rcrbirIds :: Lens' RasterCollectionsRastersBatchInsertRequest [Text] +rcrbirIds + = lens _rcrbirIds (\ s a -> s{_rcrbirIds = a}) . + _Default + . _Coerce + +instance FromJSON + RasterCollectionsRastersBatchInsertRequest where + parseJSON + = withObject + "RasterCollectionsRastersBatchInsertRequest" + (\ o -> + RasterCollectionsRastersBatchInsertRequest <$> + (o .:? "ids" .!= mempty)) + +instance ToJSON + RasterCollectionsRastersBatchInsertRequest where + toJSON RasterCollectionsRastersBatchInsertRequest{..} + = object (catMaybes [("ids" .=) <$> _rcrbirIds]) + +-- | The response returned by a call to rasterCollections.rasters.List. +-- +-- /See:/ 'rasterCollectionsRastersListResponse' smart constructor. +data RasterCollectionsRastersListResponse = RasterCollectionsRastersListResponse + { _rcrlrNextPageToken :: !(Maybe Text) + , _rcrlrRasters :: !(Maybe [Maybe RasterCollectionsRaster]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrlrNextPageToken' +-- +-- * 'rcrlrRasters' +rasterCollectionsRastersListResponse + :: RasterCollectionsRastersListResponse +rasterCollectionsRastersListResponse = + RasterCollectionsRastersListResponse + { _rcrlrNextPageToken = Nothing + , _rcrlrRasters = Nothing + } + +-- | Next page token. +rcrlrNextPageToken :: Lens' RasterCollectionsRastersListResponse (Maybe Text) +rcrlrNextPageToken + = lens _rcrlrNextPageToken + (\ s a -> s{_rcrlrNextPageToken = a}) + +-- | Resources returned. +rcrlrRasters :: Lens' RasterCollectionsRastersListResponse [Maybe RasterCollectionsRaster] +rcrlrRasters + = lens _rcrlrRasters (\ s a -> s{_rcrlrRasters = a}) + . _Default + . _Coerce + +instance FromJSON + RasterCollectionsRastersListResponse where + parseJSON + = withObject "RasterCollectionsRastersListResponse" + (\ o -> + RasterCollectionsRastersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "rasters" .!= mempty)) + +instance ToJSON RasterCollectionsRastersListResponse + where + toJSON RasterCollectionsRastersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rcrlrNextPageToken, + ("rasters" .=) <$> _rcrlrRasters]) + +-- | Multi Line String +-- +-- /See:/ 'geoJSONMultiLineString' smart constructor. +data GeoJSONMultiLineString = GeoJSONMultiLineString + { _gjmlsCoordinates :: !(Maybe [[Maybe [Double]]]) + , _gjmlsType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONMultiLineString' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjmlsCoordinates' +-- +-- * 'gjmlsType' +geoJSONMultiLineString + :: GeoJSONMultiLineString +geoJSONMultiLineString = + GeoJSONMultiLineString + { _gjmlsCoordinates = Nothing + , _gjmlsType = Nothing + } + +-- | An array of at least two GeoJsonLineString coordinate arrays. +gjmlsCoordinates :: Lens' GeoJSONMultiLineString [[[Double]]] +gjmlsCoordinates + = lens _gjmlsCoordinates + (\ s a -> s{_gjmlsCoordinates = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonMultiLineString. +gjmlsType :: Lens' GeoJSONMultiLineString (Maybe Text) +gjmlsType + = lens _gjmlsType (\ s a -> s{_gjmlsType = a}) + +instance FromJSON GeoJSONMultiLineString where + parseJSON + = withObject "GeoJSONMultiLineString" + (\ o -> + GeoJSONMultiLineString <$> + (o .:? "coordinates" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONMultiLineString where + toJSON GeoJSONMultiLineString{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjmlsCoordinates, + ("type" .=) <$> _gjmlsType]) + +-- | Parameters for scaling scaled shapes. +-- +-- /See:/ 'scalingFunction' smart constructor. +data ScalingFunction = ScalingFunction + { _sfValueRange :: !(Maybe (Maybe ValueRange)) + , _sfSizeRange :: !(Maybe (Maybe SizeRange)) + , _sfScalingType :: !(Maybe Text) + , _sfColumn :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ScalingFunction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sfValueRange' +-- +-- * 'sfSizeRange' +-- +-- * 'sfScalingType' +-- +-- * 'sfColumn' +scalingFunction + :: ScalingFunction +scalingFunction = + ScalingFunction + { _sfValueRange = Nothing + , _sfSizeRange = Nothing + , _sfScalingType = Nothing + , _sfColumn = Nothing + } + +-- | The range of values to display across the size range. +sfValueRange :: Lens' ScalingFunction (Maybe (Maybe ValueRange)) +sfValueRange + = lens _sfValueRange (\ s a -> s{_sfValueRange = a}) + +-- | The range of shape sizes, in pixels. For circles, the size corresponds +-- to the diameter. +sfSizeRange :: Lens' ScalingFunction (Maybe (Maybe SizeRange)) +sfSizeRange + = lens _sfSizeRange (\ s a -> s{_sfSizeRange = a}) + +-- | The type of scaling function to use. Defaults to SQRT. Currently only +-- linear and square root scaling are supported. +sfScalingType :: Lens' ScalingFunction (Maybe Text) +sfScalingType + = lens _sfScalingType + (\ s a -> s{_sfScalingType = a}) + +-- | Name of the numeric column used to scale a shape. +sfColumn :: Lens' ScalingFunction (Maybe Text) +sfColumn = lens _sfColumn (\ s a -> s{_sfColumn = a}) + +instance FromJSON ScalingFunction where + parseJSON + = withObject "ScalingFunction" + (\ o -> + ScalingFunction <$> + (o .:? "valueRange") <*> (o .:? "sizeRange") <*> + (o .:? "scalingType") + <*> (o .:? "column")) + +instance ToJSON ScalingFunction where + toJSON ScalingFunction{..} + = object + (catMaybes + [("valueRange" .=) <$> _sfValueRange, + ("sizeRange" .=) <$> _sfSizeRange, + ("scalingType" .=) <$> _sfScalingType, + ("column" .=) <$> _sfColumn]) + +-- | The response returned by a call to resources.List. +-- +-- /See:/ 'assetsListResponse' smart constructor. +data AssetsListResponse = AssetsListResponse + { _alrNextPageToken :: !(Maybe Word8) + , _alrAssets :: !(Maybe [Maybe Asset]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssetsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrNextPageToken' +-- +-- * 'alrAssets' +assetsListResponse + :: AssetsListResponse +assetsListResponse = + AssetsListResponse + { _alrNextPageToken = Nothing + , _alrAssets = Nothing + } + +-- | Next page token. +alrNextPageToken :: Lens' AssetsListResponse (Maybe Word8) +alrNextPageToken + = lens _alrNextPageToken + (\ s a -> s{_alrNextPageToken = a}) + +-- | Assets returned. +alrAssets :: Lens' AssetsListResponse [Maybe Asset] +alrAssets + = lens _alrAssets (\ s a -> s{_alrAssets = a}) . + _Default + . _Coerce + +instance FromJSON AssetsListResponse where + parseJSON + = withObject "AssetsListResponse" + (\ o -> + AssetsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "assets" .!= mempty)) + +instance ToJSON AssetsListResponse where + toJSON AssetsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _alrNextPageToken, + ("assets" .=) <$> _alrAssets]) + +-- | The response returned by a call to any asset\'s Publish method. +-- +-- /See:/ 'publishResponse' smart constructor. +data PublishResponse = + PublishResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishResponse' with the minimum fields required to make a request. +-- +publishResponse + :: PublishResponse +publishResponse = PublishResponse + +instance FromJSON PublishResponse where + parseJSON + = withObject "PublishResponse" + (\ o -> pure PublishResponse) + +instance ToJSON PublishResponse where + toJSON = const (Object mempty) + +-- | A raster resource. +-- +-- /See:/ 'rasterCollectionsRaster' smart constructor. +data RasterCollectionsRaster = RasterCollectionsRaster + { _rcrCreationTime :: !(Maybe UTCTime) + , _rcrRasterType :: !Text + , _rcrLastModifiedTime :: !(Maybe UTCTime) + , _rcrName :: !(Maybe Text) + , _rcrBbox :: !(Maybe [Double]) + , _rcrId :: !(Maybe Text) + , _rcrProjectId :: !(Maybe Text) + , _rcrDescription :: !(Maybe Text) + , _rcrTags :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRaster' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrCreationTime' +-- +-- * 'rcrRasterType' +-- +-- * 'rcrLastModifiedTime' +-- +-- * 'rcrName' +-- +-- * 'rcrBbox' +-- +-- * 'rcrId' +-- +-- * 'rcrProjectId' +-- +-- * 'rcrDescription' +-- +-- * 'rcrTags' +rasterCollectionsRaster + :: RasterCollectionsRaster +rasterCollectionsRaster = + RasterCollectionsRaster + { _rcrCreationTime = Nothing + , _rcrRasterType = "image" + , _rcrLastModifiedTime = Nothing + , _rcrName = Nothing + , _rcrBbox = Nothing + , _rcrId = Nothing + , _rcrProjectId = Nothing + , _rcrDescription = Nothing + , _rcrTags = Nothing + } + +-- | The creation time of this raster. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +rcrCreationTime :: Lens' RasterCollectionsRaster (Maybe UTCTime) +rcrCreationTime + = lens _rcrCreationTime + (\ s a -> s{_rcrCreationTime = a}) + +-- | The type of this Raster. Always \"image\" today. +rcrRasterType :: Lens' RasterCollectionsRaster Text +rcrRasterType + = lens _rcrRasterType + (\ s a -> s{_rcrRasterType = a}) + +-- | The last modified time of this raster. The value is an RFC 3339 +-- formatted date-time value (e.g. 1970-01-01T00:00:00Z). +rcrLastModifiedTime :: Lens' RasterCollectionsRaster (Maybe UTCTime) +rcrLastModifiedTime + = lens _rcrLastModifiedTime + (\ s a -> s{_rcrLastModifiedTime = a}) + +-- | The name of this Raster, supplied by the author. +rcrName :: Lens' RasterCollectionsRaster (Maybe Text) +rcrName = lens _rcrName (\ s a -> s{_rcrName = a}) + +-- | A rectangular bounding box which contains all of the data in this +-- Raster. The box is expressed as \\\"west, south, east, north\\\". The +-- numbers represent latitudes and longitudes in decimal degrees. +rcrBbox :: Lens' RasterCollectionsRaster [Double] +rcrBbox + = lens _rcrBbox (\ s a -> s{_rcrBbox = a}) . _Default + . _Coerce + +-- | A globally unique ID, used to refer to this Raster. +rcrId :: Lens' RasterCollectionsRaster (Maybe Text) +rcrId = lens _rcrId (\ s a -> s{_rcrId = a}) + +-- | The ID of the project that this Raster is in. +rcrProjectId :: Lens' RasterCollectionsRaster (Maybe Text) +rcrProjectId + = lens _rcrProjectId (\ s a -> s{_rcrProjectId = a}) + +-- | The description of this Raster, supplied by the author. +rcrDescription :: Lens' RasterCollectionsRaster (Maybe Text) +rcrDescription + = lens _rcrDescription + (\ s a -> s{_rcrDescription = a}) + +-- | Tags of this Raster. +rcrTags :: Lens' RasterCollectionsRaster [Text] +rcrTags + = lens _rcrTags (\ s a -> s{_rcrTags = a}) . _Default + . _Coerce + +instance FromJSON RasterCollectionsRaster where + parseJSON + = withObject "RasterCollectionsRaster" + (\ o -> + RasterCollectionsRaster <$> + (o .:? "creationTime") <*> + (o .:? "rasterType" .!= "image") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "description") + <*> (o .:? "tags" .!= mempty)) + +instance ToJSON RasterCollectionsRaster where + toJSON RasterCollectionsRaster{..} + = object + (catMaybes + [("creationTime" .=) <$> _rcrCreationTime, + Just ("rasterType" .= _rcrRasterType), + ("lastModifiedTime" .=) <$> _rcrLastModifiedTime, + ("name" .=) <$> _rcrName, ("bbox" .=) <$> _rcrBbox, + ("id" .=) <$> _rcrId, + ("projectId" .=) <$> _rcrProjectId, + ("description" .=) <$> _rcrDescription, + ("tags" .=) <$> _rcrTags]) + +-- +-- /See:/ 'datasource' smart constructor. +newtype Datasource = Datasource + { _dId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Datasource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dId' +datasource + :: Datasource +datasource = + Datasource + { _dId = Nothing + } + +-- | The ID of a datasource. +dId :: Lens' Datasource (Maybe Text) +dId = lens _dId (\ s a -> s{_dId = a}) + +instance FromJSON Datasource where + parseJSON + = withObject "Datasource" + (\ o -> Datasource <$> (o .:? "id")) + +instance ToJSON Datasource where + toJSON Datasource{..} + = object (catMaybes [("id" .=) <$> _dId]) + +-- | The request sent to features.Insert. +-- +-- /See:/ 'featuresBatchInsertRequest' smart constructor. +data FeaturesBatchInsertRequest = FeaturesBatchInsertRequest + { _fbirFeatures :: !(Maybe [Maybe Feature]) + , _fbirNormalizeGeometries :: !Bool + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FeaturesBatchInsertRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbirFeatures' +-- +-- * 'fbirNormalizeGeometries' +featuresBatchInsertRequest + :: FeaturesBatchInsertRequest +featuresBatchInsertRequest = + FeaturesBatchInsertRequest + { _fbirFeatures = Nothing + , _fbirNormalizeGeometries = True + } + +fbirFeatures :: Lens' FeaturesBatchInsertRequest [Maybe Feature] +fbirFeatures + = lens _fbirFeatures (\ s a -> s{_fbirFeatures = a}) + . _Default + . _Coerce + +-- | If true, the server will normalize feature geometries. It is assumed +-- that the South Pole is exterior to any polygons given. See here for a +-- list of normalizations. If false, all feature geometries must be given +-- already normalized. The points in all LinearRings must be listed in +-- counter-clockwise order, and LinearRings may not intersect. +fbirNormalizeGeometries :: Lens' FeaturesBatchInsertRequest Bool +fbirNormalizeGeometries + = lens _fbirNormalizeGeometries + (\ s a -> s{_fbirNormalizeGeometries = a}) + +instance FromJSON FeaturesBatchInsertRequest where + parseJSON + = withObject "FeaturesBatchInsertRequest" + (\ o -> + FeaturesBatchInsertRequest <$> + (o .:? "features" .!= mempty) <*> + (o .:? "normalizeGeometries" .!= True)) + +instance ToJSON FeaturesBatchInsertRequest where + toJSON FeaturesBatchInsertRequest{..} + = object + (catMaybes + [("features" .=) <$> _fbirFeatures, + Just + ("normalizeGeometries" .= _fbirNormalizeGeometries)]) + +-- | Conditions for filtering features. +-- +-- /See:/ 'filter'' smart constructor. +data Filter = Filter + { _fOperator :: !(Maybe Text) + , _fValue :: !(Maybe JSON) + , _fColumn :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Filter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fOperator' +-- +-- * 'fValue' +-- +-- * 'fColumn' +filter' + :: Filter +filter' = + Filter + { _fOperator = Nothing + , _fValue = Nothing + , _fColumn = Nothing + } + +-- | Operation used to evaluate the filter. +fOperator :: Lens' Filter (Maybe Text) +fOperator + = lens _fOperator (\ s a -> s{_fOperator = a}) + +-- | Value to be evaluated against attribute. +fValue :: Lens' Filter (Maybe JSON) +fValue = lens _fValue (\ s a -> s{_fValue = a}) + +-- | The column name to filter on. +fColumn :: Lens' Filter (Maybe Text) +fColumn = lens _fColumn (\ s a -> s{_fColumn = a}) + +instance FromJSON Filter where + parseJSON + = withObject "Filter" + (\ o -> + Filter <$> + (o .:? "operator") <*> (o .:? "value") <*> + (o .:? "column")) + +instance ToJSON Filter where + toJSON Filter{..} + = object + (catMaybes + [("operator" .=) <$> _fOperator, + ("value" .=) <$> _fValue, + ("column" .=) <$> _fColumn]) + +-- +-- /See:/ 'geoJSONMultiPolygon' smart constructor. +data GeoJSONMultiPolygon = GeoJSONMultiPolygon + { _gjmpCoordinates :: !(Maybe [[[Maybe [Double]]]]) + , _gjmpType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONMultiPolygon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjmpCoordinates' +-- +-- * 'gjmpType' +geoJSONMultiPolygon + :: GeoJSONMultiPolygon +geoJSONMultiPolygon = + GeoJSONMultiPolygon + { _gjmpCoordinates = Nothing + , _gjmpType = Nothing + } + +-- | An array of at least two GeoJsonPolygon coordinate arrays. +gjmpCoordinates :: Lens' GeoJSONMultiPolygon [[[[Double]]]] +gjmpCoordinates + = lens _gjmpCoordinates + (\ s a -> s{_gjmpCoordinates = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonMultiPolygon. +gjmpType :: Lens' GeoJSONMultiPolygon (Maybe Text) +gjmpType = lens _gjmpType (\ s a -> s{_gjmpType = a}) + +instance FromJSON GeoJSONMultiPolygon where + parseJSON + = withObject "GeoJSONMultiPolygon" + (\ o -> + GeoJSONMultiPolygon <$> + (o .:? "coordinates" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONMultiPolygon where + toJSON GeoJSONMultiPolygon{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjmpCoordinates, + ("type" .=) <$> _gjmpType]) + +-- +-- /See:/ 'geoJSONMultiPoint' smart constructor. +data GeoJSONMultiPoint = GeoJSONMultiPoint + { _gjsonmpCoordinates :: !(Maybe [Maybe [Double]]) + , _gjsonmpType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONMultiPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjsonmpCoordinates' +-- +-- * 'gjsonmpType' +geoJSONMultiPoint + :: GeoJSONMultiPoint +geoJSONMultiPoint = + GeoJSONMultiPoint + { _gjsonmpCoordinates = Nothing + , _gjsonmpType = Nothing + } + +-- | An array of at least two GeoJsonPoint coordinate arrays. +gjsonmpCoordinates :: Lens' GeoJSONMultiPoint [[Double]] +gjsonmpCoordinates + = lens _gjsonmpCoordinates + (\ s a -> s{_gjsonmpCoordinates = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonMultiPoint. +gjsonmpType :: Lens' GeoJSONMultiPoint (Maybe Text) +gjsonmpType + = lens _gjsonmpType (\ s a -> s{_gjsonmpType = a}) + +instance FromJSON GeoJSONMultiPoint where + parseJSON + = withObject "GeoJSONMultiPoint" + (\ o -> + GeoJSONMultiPoint <$> + (o .:? "coordinates" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONMultiPoint where + toJSON GeoJSONMultiPoint{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjsonmpCoordinates, + ("type" .=) <$> _gjsonmpType]) + +-- | A geo-referenced raster. +-- +-- /See:/ 'raster' smart constructor. +data Raster = Raster + { _rCreationTime :: !(Maybe UTCTime) + , _rWritersCanEditPermissions :: !(Maybe Bool) + , _rMaskType :: !Text + , _rEtag :: !(Maybe Text) + , _rCreatorEmail :: !(Maybe Text) + , _rRasterType :: !(Maybe Text) + , _rLastModifiedTime :: !(Maybe UTCTime) + , _rLastModifierEmail :: !(Maybe Text) + , _rAcquisitionTime :: !(Maybe (Maybe AcquisitionTime)) + , _rName :: !(Maybe Text) + , _rBbox :: !(Maybe [Double]) + , _rProcessingStatus :: !(Maybe Text) + , _rFiles :: !(Maybe [Maybe File]) + , _rId :: !(Maybe Text) + , _rProjectId :: !(Maybe Text) + , _rDraftAccessList :: !(Maybe Text) + , _rDescription :: !(Maybe Text) + , _rAttribution :: !(Maybe Text) + , _rTags :: !(Maybe (Maybe [Text])) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Raster' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rCreationTime' +-- +-- * 'rWritersCanEditPermissions' +-- +-- * 'rMaskType' +-- +-- * 'rEtag' +-- +-- * 'rCreatorEmail' +-- +-- * 'rRasterType' +-- +-- * 'rLastModifiedTime' +-- +-- * 'rLastModifierEmail' +-- +-- * 'rAcquisitionTime' +-- +-- * 'rName' +-- +-- * 'rBbox' +-- +-- * 'rProcessingStatus' +-- +-- * 'rFiles' +-- +-- * 'rId' +-- +-- * 'rProjectId' +-- +-- * 'rDraftAccessList' +-- +-- * 'rDescription' +-- +-- * 'rAttribution' +-- +-- * 'rTags' +raster + :: Raster +raster = + Raster + { _rCreationTime = Nothing + , _rWritersCanEditPermissions = Nothing + , _rMaskType = "autoMask" + , _rEtag = Nothing + , _rCreatorEmail = Nothing + , _rRasterType = Nothing + , _rLastModifiedTime = Nothing + , _rLastModifierEmail = Nothing + , _rAcquisitionTime = Nothing + , _rName = Nothing + , _rBbox = Nothing + , _rProcessingStatus = Nothing + , _rFiles = Nothing + , _rId = Nothing + , _rProjectId = Nothing + , _rDraftAccessList = Nothing + , _rDescription = Nothing + , _rAttribution = Nothing + , _rTags = Nothing + } + +-- | The creation time of this raster. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +rCreationTime :: Lens' Raster (Maybe UTCTime) +rCreationTime + = lens _rCreationTime + (\ s a -> s{_rCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +rWritersCanEditPermissions :: Lens' Raster (Maybe Bool) +rWritersCanEditPermissions + = lens _rWritersCanEditPermissions + (\ s a -> s{_rWritersCanEditPermissions = a}) + +-- | The mask processing type of this Raster. +rMaskType :: Lens' Raster Text +rMaskType + = lens _rMaskType (\ s a -> s{_rMaskType = a}) + +-- | The ETag, used to refer to the current version of the asset. +rEtag :: Lens' Raster (Maybe Text) +rEtag = lens _rEtag (\ s a -> s{_rEtag = a}) + +-- | The email address of the creator of this raster. This is only returned +-- on GET requests and not LIST requests. +rCreatorEmail :: Lens' Raster (Maybe Text) +rCreatorEmail + = lens _rCreatorEmail + (\ s a -> s{_rCreatorEmail = a}) + +-- | The type of this Raster. Always \"image\" today. +rRasterType :: Lens' Raster (Maybe Text) +rRasterType + = lens _rRasterType (\ s a -> s{_rRasterType = a}) + +-- | The last modified time of this raster. The value is an RFC 3339 +-- formatted date-time value (e.g. 1970-01-01T00:00:00Z). +rLastModifiedTime :: Lens' Raster (Maybe UTCTime) +rLastModifiedTime + = lens _rLastModifiedTime + (\ s a -> s{_rLastModifiedTime = a}) + +-- | The email address of the last modifier of this raster. This is only +-- returned on GET requests and not LIST requests. +rLastModifierEmail :: Lens' Raster (Maybe Text) +rLastModifierEmail + = lens _rLastModifierEmail + (\ s a -> s{_rLastModifierEmail = a}) + +-- | The acquisition time of this Raster. +rAcquisitionTime :: Lens' Raster (Maybe (Maybe AcquisitionTime)) +rAcquisitionTime + = lens _rAcquisitionTime + (\ s a -> s{_rAcquisitionTime = a}) + +-- | The name of this Raster, supplied by the author. +rName :: Lens' Raster (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | A rectangular bounding box which contains all of the data in this +-- Raster. The box is expressed as \\\"west, south, east, north\\\". The +-- numbers represent latitudes and longitudes in decimal degrees. +rBbox :: Lens' Raster [Double] +rBbox + = lens _rBbox (\ s a -> s{_rBbox = a}) . _Default . + _Coerce + +-- | The processing status of this Raster. +rProcessingStatus :: Lens' Raster (Maybe Text) +rProcessingStatus + = lens _rProcessingStatus + (\ s a -> s{_rProcessingStatus = a}) + +-- | The files associated with this Raster. +rFiles :: Lens' Raster [Maybe File] +rFiles + = lens _rFiles (\ s a -> s{_rFiles = a}) . _Default . + _Coerce + +-- | A globally unique ID, used to refer to this Raster. +rId :: Lens' Raster (Maybe Text) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | The ID of the project that this Raster is in. +rProjectId :: Lens' Raster (Maybe Text) +rProjectId + = lens _rProjectId (\ s a -> s{_rProjectId = a}) + +-- | Deprecated: The name of an access list of the Map Editor type. The user +-- on whose behalf the request is being sent must be an editor on that +-- access list. Note: Google Maps Engine no longer uses access lists. +-- Instead, each asset has its own list of permissions. For backward +-- compatibility, the API still accepts access lists for projects that are +-- already using access lists. If you created a GME account\/project after +-- July 14th, 2014, you will not be able to send API requests that include +-- access lists. Note: This is an input field only. It is not returned in +-- response to a list or get request. +rDraftAccessList :: Lens' Raster (Maybe Text) +rDraftAccessList + = lens _rDraftAccessList + (\ s a -> s{_rDraftAccessList = a}) + +-- | The description of this Raster, supplied by the author. +rDescription :: Lens' Raster (Maybe Text) +rDescription + = lens _rDescription (\ s a -> s{_rDescription = a}) + +-- | The name of the attribution to be used for this Raster. +rAttribution :: Lens' Raster (Maybe Text) +rAttribution + = lens _rAttribution (\ s a -> s{_rAttribution = a}) + +-- | Tags of this Raster. +rTags :: Lens' Raster (Maybe [Text]) +rTags + = lens _rTags (\ s a -> s{_rTags = a}) . + mapping (_Default . _Coerce) + +instance FromJSON Raster where + parseJSON + = withObject "Raster" + (\ o -> + Raster <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "maskType" .!= "autoMask") + <*> (o .:? "etag") + <*> (o .:? "creatorEmail") + <*> (o .:? "rasterType") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "acquisitionTime") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "processingStatus") + <*> (o .:? "files" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "draftAccessList") + <*> (o .:? "description") + <*> (o .:? "attribution") + <*> (o .:? "tags")) + +instance ToJSON Raster where + toJSON Raster{..} + = object + (catMaybes + [("creationTime" .=) <$> _rCreationTime, + ("writersCanEditPermissions" .=) <$> + _rWritersCanEditPermissions, + Just ("maskType" .= _rMaskType), + ("etag" .=) <$> _rEtag, + ("creatorEmail" .=) <$> _rCreatorEmail, + ("rasterType" .=) <$> _rRasterType, + ("lastModifiedTime" .=) <$> _rLastModifiedTime, + ("lastModifierEmail" .=) <$> _rLastModifierEmail, + ("acquisitionTime" .=) <$> _rAcquisitionTime, + ("name" .=) <$> _rName, ("bbox" .=) <$> _rBbox, + ("processingStatus" .=) <$> _rProcessingStatus, + ("files" .=) <$> _rFiles, ("id" .=) <$> _rId, + ("projectId" .=) <$> _rProjectId, + ("draftAccessList" .=) <$> _rDraftAccessList, + ("description" .=) <$> _rDescription, + ("attribution" .=) <$> _rAttribution, + ("tags" .=) <$> _rTags]) + +-- | The published version of a layer. +-- +-- /See:/ 'publishedLayer' smart constructor. +data PublishedLayer = PublishedLayer + { _plLayerType :: !(Maybe Text) + , _plName :: !(Maybe Text) + , _plId :: !(Maybe Text) + , _plProjectId :: !(Maybe Text) + , _plDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishedLayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plLayerType' +-- +-- * 'plName' +-- +-- * 'plId' +-- +-- * 'plProjectId' +-- +-- * 'plDescription' +publishedLayer + :: PublishedLayer +publishedLayer = + PublishedLayer + { _plLayerType = Nothing + , _plName = Nothing + , _plId = Nothing + , _plProjectId = Nothing + , _plDescription = Nothing + } + +-- | The type of the datasources used to build this Layer. This should be +-- used instead of datasourceType. At least one of layerType and +-- datasourceType and must be specified, but layerType takes precedence. +plLayerType :: Lens' PublishedLayer (Maybe Text) +plLayerType + = lens _plLayerType (\ s a -> s{_plLayerType = a}) + +-- | The name of this Layer, supplied by the author. +plName :: Lens' PublishedLayer (Maybe Text) +plName = lens _plName (\ s a -> s{_plName = a}) + +-- | A globally unique ID, used to refer to this Layer. +plId :: Lens' PublishedLayer (Maybe Text) +plId = lens _plId (\ s a -> s{_plId = a}) + +-- | The ID of the project that this Layer is in. +plProjectId :: Lens' PublishedLayer (Maybe Text) +plProjectId + = lens _plProjectId (\ s a -> s{_plProjectId = a}) + +-- | The description of this Layer, supplied by the author. +plDescription :: Lens' PublishedLayer (Maybe Text) +plDescription + = lens _plDescription + (\ s a -> s{_plDescription = a}) + +instance FromJSON PublishedLayer where + parseJSON + = withObject "PublishedLayer" + (\ o -> + PublishedLayer <$> + (o .:? "layerType") <*> (o .:? "name") <*> + (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "description")) + +instance ToJSON PublishedLayer where + toJSON PublishedLayer{..} + = object + (catMaybes + [("layerType" .=) <$> _plLayerType, + ("name" .=) <$> _plName, ("id" .=) <$> _plId, + ("projectId" .=) <$> _plProjectId, + ("description" .=) <$> _plDescription]) + +-- | Style for points. +-- +-- /See:/ 'pointStyle' smart constructor. +data PointStyle = PointStyle + { _psIcon :: !(Maybe (Maybe IconStyle)) + , _psLabel :: !(Maybe (Maybe LabelStyle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psIcon' +-- +-- * 'psLabel' +pointStyle + :: PointStyle +pointStyle = + PointStyle + { _psIcon = Nothing + , _psLabel = Nothing + } + +-- | Icon for the point; if it isn\'t null, exactly one of \'name\', \'id\' +-- or \'scaledShape\' must be set. +psIcon :: Lens' PointStyle (Maybe (Maybe IconStyle)) +psIcon = lens _psIcon (\ s a -> s{_psIcon = a}) + +-- | Label style for the point. +psLabel :: Lens' PointStyle (Maybe (Maybe LabelStyle)) +psLabel = lens _psLabel (\ s a -> s{_psLabel = a}) + +instance FromJSON PointStyle where + parseJSON + = withObject "PointStyle" + (\ o -> + PointStyle <$> (o .:? "icon") <*> (o .:? "label")) + +instance ToJSON PointStyle where + toJSON PointStyle{..} + = object + (catMaybes + [("icon" .=) <$> _psIcon, ("label" .=) <$> _psLabel]) + +-- | A permission defines the user or group that has access to an asset, and +-- the type of access they have. +-- +-- /See:/ 'permission' smart constructor. +data Permission = Permission + { _perRole :: !(Maybe Text) + , _perId :: !(Maybe Text) + , _perType :: !(Maybe Text) + , _perDiscoverable :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Permission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'perRole' +-- +-- * 'perId' +-- +-- * 'perType' +-- +-- * 'perDiscoverable' +permission + :: Permission +permission = + Permission + { _perRole = Nothing + , _perId = Nothing + , _perType = Nothing + , _perDiscoverable = Nothing + } + +-- | The type of access granted to this user or group. +perRole :: Lens' Permission (Maybe Text) +perRole = lens _perRole (\ s a -> s{_perRole = a}) + +-- | The unique identifier of the permission. This could be the email address +-- of the user or group this permission refers to, or the string \"anyone\" +-- for public permissions. +perId :: Lens' Permission (Maybe Text) +perId = lens _perId (\ s a -> s{_perId = a}) + +-- | The account type. +perType :: Lens' Permission (Maybe Text) +perType = lens _perType (\ s a -> s{_perType = a}) + +-- | Indicates whether a public asset is listed and can be found via a web +-- search (value true), or is visible only to people who have a link to the +-- asset (value false). +perDiscoverable :: Lens' Permission (Maybe Bool) +perDiscoverable + = lens _perDiscoverable + (\ s a -> s{_perDiscoverable = a}) + +instance FromJSON Permission where + parseJSON + = withObject "Permission" + (\ o -> + Permission <$> + (o .:? "role") <*> (o .:? "id") <*> (o .:? "type") + <*> (o .:? "discoverable")) + +instance ToJSON Permission where + toJSON Permission{..} + = object + (catMaybes + [("role" .=) <$> _perRole, ("id" .=) <$> _perId, + ("type" .=) <$> _perType, + ("discoverable" .=) <$> _perDiscoverable]) + +-- | A Layer combines multiple datasources, with styling information, for +-- presentation on a map. +-- +-- /See:/ 'layer' smart constructor. +data Layer = Layer + { _lCreationTime :: !(Maybe UTCTime) + , _lWritersCanEditPermissions :: !(Maybe Bool) + , _lStyle :: !(Maybe (Maybe VectorStyle)) + , _lEtag :: !(Maybe Text) + , _lDatasourceType :: !(Maybe Text) + , _lPublishingStatus :: !(Maybe Text) + , _lCreatorEmail :: !(Maybe Text) + , _lLayerType :: !(Maybe Text) + , _lLastModifiedTime :: !(Maybe UTCTime) + , _lDatasources :: !(Maybe (Maybe [Maybe Datasource])) + , _lLastModifierEmail :: !(Maybe Text) + , _lName :: !(Maybe Text) + , _lBbox :: !(Maybe [Double]) + , _lProcessingStatus :: !(Maybe Text) + , _lId :: !(Maybe Text) + , _lProjectId :: !(Maybe Text) + , _lDraftAccessList :: !(Maybe Text) + , _lPublishedAccessList :: !(Maybe Text) + , _lDescription :: !(Maybe Text) + , _lTags :: !(Maybe (Maybe [Text])) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Layer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lCreationTime' +-- +-- * 'lWritersCanEditPermissions' +-- +-- * 'lStyle' +-- +-- * 'lEtag' +-- +-- * 'lDatasourceType' +-- +-- * 'lPublishingStatus' +-- +-- * 'lCreatorEmail' +-- +-- * 'lLayerType' +-- +-- * 'lLastModifiedTime' +-- +-- * 'lDatasources' +-- +-- * 'lLastModifierEmail' +-- +-- * 'lName' +-- +-- * 'lBbox' +-- +-- * 'lProcessingStatus' +-- +-- * 'lId' +-- +-- * 'lProjectId' +-- +-- * 'lDraftAccessList' +-- +-- * 'lPublishedAccessList' +-- +-- * 'lDescription' +-- +-- * 'lTags' +layer + :: Layer +layer = + Layer + { _lCreationTime = Nothing + , _lWritersCanEditPermissions = Nothing + , _lStyle = Nothing + , _lEtag = Nothing + , _lDatasourceType = Nothing + , _lPublishingStatus = Nothing + , _lCreatorEmail = Nothing + , _lLayerType = Nothing + , _lLastModifiedTime = Nothing + , _lDatasources = Nothing + , _lLastModifierEmail = Nothing + , _lName = Nothing + , _lBbox = Nothing + , _lProcessingStatus = Nothing + , _lId = Nothing + , _lProjectId = Nothing + , _lDraftAccessList = Nothing + , _lPublishedAccessList = Nothing + , _lDescription = Nothing + , _lTags = Nothing + } + +-- | The creation time of this layer. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +lCreationTime :: Lens' Layer (Maybe UTCTime) +lCreationTime + = lens _lCreationTime + (\ s a -> s{_lCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +lWritersCanEditPermissions :: Lens' Layer (Maybe Bool) +lWritersCanEditPermissions + = lens _lWritersCanEditPermissions + (\ s a -> s{_lWritersCanEditPermissions = a}) + +-- | The styling information for a vector layer. Note: Style information is +-- returned in response to a get request but not a list request. After +-- requesting a list of layers, you\'ll need to send a get request to +-- retrieve the VectorStyles for each layer. +lStyle :: Lens' Layer (Maybe (Maybe VectorStyle)) +lStyle = lens _lStyle (\ s a -> s{_lStyle = a}) + +-- | The ETag, used to refer to the current version of the asset. +lEtag :: Lens' Layer (Maybe Text) +lEtag = lens _lEtag (\ s a -> s{_lEtag = a}) + +-- | Deprecated: The type of the datasources used to build this Layer. Note: +-- This has been replaced by layerType, but is still available for now to +-- maintain backward compatibility. +lDatasourceType :: Lens' Layer (Maybe Text) +lDatasourceType + = lens _lDatasourceType + (\ s a -> s{_lDatasourceType = a}) + +-- | The publishing status of this layer. +lPublishingStatus :: Lens' Layer (Maybe Text) +lPublishingStatus + = lens _lPublishingStatus + (\ s a -> s{_lPublishingStatus = a}) + +-- | The email address of the creator of this layer. This is only returned on +-- GET requests and not LIST requests. +lCreatorEmail :: Lens' Layer (Maybe Text) +lCreatorEmail + = lens _lCreatorEmail + (\ s a -> s{_lCreatorEmail = a}) + +-- | The type of the datasources used to build this Layer. This should be +-- used instead of datasourceType. At least one of layerType and +-- datasourceType and must be specified, but layerType takes precedence. +lLayerType :: Lens' Layer (Maybe Text) +lLayerType + = lens _lLayerType (\ s a -> s{_lLayerType = a}) + +-- | The last modified time of this layer. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +lLastModifiedTime :: Lens' Layer (Maybe UTCTime) +lLastModifiedTime + = lens _lLastModifiedTime + (\ s a -> s{_lLastModifiedTime = a}) + +-- | An array of datasources used to build this layer. If layerType is +-- \"image\", or layerType is not specified and datasourceType is +-- \"image\", then each element in this array is a reference to an Image or +-- RasterCollection. If layerType is \"vector\", or layerType is not +-- specified and datasourceType is \"table\" then each element in this +-- array is a reference to a Vector Table. +lDatasources :: Lens' Layer (Maybe [Maybe Datasource]) +lDatasources + = lens _lDatasources (\ s a -> s{_lDatasources = a}) + . mapping (_Default . _Coerce) + +-- | The email address of the last modifier of this layer. This is only +-- returned on GET requests and not LIST requests. +lLastModifierEmail :: Lens' Layer (Maybe Text) +lLastModifierEmail + = lens _lLastModifierEmail + (\ s a -> s{_lLastModifierEmail = a}) + +-- | The name of this Layer, supplied by the author. +lName :: Lens' Layer (Maybe Text) +lName = lens _lName (\ s a -> s{_lName = a}) + +-- | A rectangular bounding box which contains all of the data in this Layer. +-- The box is expressed as \\\"west, south, east, north\\\". The numbers +-- represent latitude and longitude in decimal degrees. +lBbox :: Lens' Layer [Double] +lBbox + = lens _lBbox (\ s a -> s{_lBbox = a}) . _Default . + _Coerce + +-- | The processing status of this layer. +lProcessingStatus :: Lens' Layer (Maybe Text) +lProcessingStatus + = lens _lProcessingStatus + (\ s a -> s{_lProcessingStatus = a}) + +-- | A globally unique ID, used to refer to this Layer. +lId :: Lens' Layer (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | The ID of the project that this Layer is in. +lProjectId :: Lens' Layer (Maybe Text) +lProjectId + = lens _lProjectId (\ s a -> s{_lProjectId = a}) + +-- | Deprecated: The name of an access list of the Map Editor type. The user +-- on whose behalf the request is being sent must be an editor on that +-- access list. Note: Google Maps Engine no longer uses access lists. +-- Instead, each asset has its own list of permissions. For backward +-- compatibility, the API still accepts access lists for projects that are +-- already using access lists. If you created a GME account\/project after +-- July 14th, 2014, you will not be able to send API requests that include +-- access lists. Note: This is an input field only. It is not returned in +-- response to a list or get request. +lDraftAccessList :: Lens' Layer (Maybe Text) +lDraftAccessList + = lens _lDraftAccessList + (\ s a -> s{_lDraftAccessList = a}) + +-- | Deprecated: The access list to whom view permissions are granted. The +-- value must be the name of a Maps Engine access list of the Map Viewer +-- type, and the user must be a viewer on that list. Note: Google Maps +-- Engine no longer uses access lists. Instead, each asset has its own list +-- of permissions. For backward compatibility, the API still accepts access +-- lists for projects that are already using access lists. If you created a +-- GME account\/project after July 14th, 2014, you will not be able to send +-- API requests that include access lists. Note: This is an input field +-- only. It is not returned in response to a list or get request. +lPublishedAccessList :: Lens' Layer (Maybe Text) +lPublishedAccessList + = lens _lPublishedAccessList + (\ s a -> s{_lPublishedAccessList = a}) + +-- | The description of this Layer, supplied by the author. +lDescription :: Lens' Layer (Maybe Text) +lDescription + = lens _lDescription (\ s a -> s{_lDescription = a}) + +-- | Tags of this Layer. +lTags :: Lens' Layer (Maybe [Text]) +lTags + = lens _lTags (\ s a -> s{_lTags = a}) . + mapping (_Default . _Coerce) + +instance FromJSON Layer where + parseJSON + = withObject "Layer" + (\ o -> + Layer <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "style") + <*> (o .:? "etag") + <*> (o .:? "datasourceType") + <*> (o .:? "publishingStatus") + <*> (o .:? "creatorEmail") + <*> (o .:? "layerType") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "datasources") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "processingStatus") + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "draftAccessList") + <*> (o .:? "publishedAccessList") + <*> (o .:? "description") + <*> (o .:? "tags")) + +instance ToJSON Layer where + toJSON Layer{..} + = object + (catMaybes + [("creationTime" .=) <$> _lCreationTime, + ("writersCanEditPermissions" .=) <$> + _lWritersCanEditPermissions, + ("style" .=) <$> _lStyle, ("etag" .=) <$> _lEtag, + ("datasourceType" .=) <$> _lDatasourceType, + ("publishingStatus" .=) <$> _lPublishingStatus, + ("creatorEmail" .=) <$> _lCreatorEmail, + ("layerType" .=) <$> _lLayerType, + ("lastModifiedTime" .=) <$> _lLastModifiedTime, + ("datasources" .=) <$> _lDatasources, + ("lastModifierEmail" .=) <$> _lLastModifierEmail, + ("name" .=) <$> _lName, ("bbox" .=) <$> _lBbox, + ("processingStatus" .=) <$> _lProcessingStatus, + ("id" .=) <$> _lId, ("projectId" .=) <$> _lProjectId, + ("draftAccessList" .=) <$> _lDraftAccessList, + ("publishedAccessList" .=) <$> _lPublishedAccessList, + ("description" .=) <$> _lDescription, + ("tags" .=) <$> _lTags]) + +-- | Style for polygons. +-- +-- /See:/ 'polygonStyle' smart constructor. +data PolygonStyle = PolygonStyle + { _pStroke :: !(Maybe (Maybe Border)) + , _pFill :: !(Maybe (Maybe Color)) + , _pLabel :: !(Maybe (Maybe LabelStyle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PolygonStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pStroke' +-- +-- * 'pFill' +-- +-- * 'pLabel' +polygonStyle + :: PolygonStyle +polygonStyle = + PolygonStyle + { _pStroke = Nothing + , _pFill = Nothing + , _pLabel = Nothing + } + +-- | Border of the polygon. 0 \< border.width \<= 10. +pStroke :: Lens' PolygonStyle (Maybe (Maybe Border)) +pStroke = lens _pStroke (\ s a -> s{_pStroke = a}) + +-- | Fill color of the polygon. If not provided, the polygon will be +-- transparent and not visible if there is no border. +pFill :: Lens' PolygonStyle (Maybe (Maybe Color)) +pFill = lens _pFill (\ s a -> s{_pFill = a}) + +-- | Label style for the polygon. +pLabel :: Lens' PolygonStyle (Maybe (Maybe LabelStyle)) +pLabel = lens _pLabel (\ s a -> s{_pLabel = a}) + +instance FromJSON PolygonStyle where + parseJSON + = withObject "PolygonStyle" + (\ o -> + PolygonStyle <$> + (o .:? "stroke") <*> (o .:? "fill") <*> + (o .:? "label")) + +instance ToJSON PolygonStyle where + toJSON PolygonStyle{..} + = object + (catMaybes + [("stroke" .=) <$> _pStroke, ("fill" .=) <$> _pFill, + ("label" .=) <$> _pLabel]) + +-- | The response returned by a call to mapsengine.permissions.batchUpdate. +-- +-- /See:/ 'permissionsBatchUpdateResponse' smart constructor. +data PermissionsBatchUpdateResponse = + PermissionsBatchUpdateResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsBatchUpdateResponse' with the minimum fields required to make a request. +-- +permissionsBatchUpdateResponse + :: PermissionsBatchUpdateResponse +permissionsBatchUpdateResponse = PermissionsBatchUpdateResponse + +instance FromJSON PermissionsBatchUpdateResponse + where + parseJSON + = withObject "PermissionsBatchUpdateResponse" + (\ o -> pure PermissionsBatchUpdateResponse) + +instance ToJSON PermissionsBatchUpdateResponse where + toJSON = const (Object mempty) + +-- +-- /See:/ 'mapKmlLink' smart constructor. +data MapKmlLink = MapKmlLink + { _mklDefaultViewport :: !(Maybe [Double]) + , _mklVisibility :: !(Maybe Text) + , _mklName :: !(Maybe Text) + , _mklType :: !(Maybe Text) + , _mklKmlUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapKmlLink' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mklDefaultViewport' +-- +-- * 'mklVisibility' +-- +-- * 'mklName' +-- +-- * 'mklType' +-- +-- * 'mklKmlUrl' +mapKmlLink + :: MapKmlLink +mapKmlLink = + MapKmlLink + { _mklDefaultViewport = Nothing + , _mklVisibility = Nothing + , _mklName = Nothing + , _mklType = Nothing + , _mklKmlUrl = Nothing + } + +-- | An array of four numbers (west, south, east, north) which defines the +-- rectangular bounding box of the default viewport. The numbers represent +-- latitude and longitude in decimal degrees. +mklDefaultViewport :: Lens' MapKmlLink [Double] +mklDefaultViewport + = lens _mklDefaultViewport + (\ s a -> s{_mklDefaultViewport = a}) + . _Default + . _Coerce + +-- | The visibility setting of this MapKmlLink. One of \"defaultOn\" or +-- \"defaultOff\". +mklVisibility :: Lens' MapKmlLink (Maybe Text) +mklVisibility + = lens _mklVisibility + (\ s a -> s{_mklVisibility = a}) + +-- | The name of this MapKmlLink. +mklName :: Lens' MapKmlLink (Maybe Text) +mklName = lens _mklName (\ s a -> s{_mklName = a}) + +-- | Identifies this object as a MapKmlLink. +mklType :: Lens' MapKmlLink (Maybe Text) +mklType = lens _mklType (\ s a -> s{_mklType = a}) + +-- | The URL to the KML file represented by this MapKmlLink. +mklKmlUrl :: Lens' MapKmlLink (Maybe Text) +mklKmlUrl + = lens _mklKmlUrl (\ s a -> s{_mklKmlUrl = a}) + +instance FromJSON MapKmlLink where + parseJSON + = withObject "MapKmlLink" + (\ o -> + MapKmlLink <$> + (o .:? "defaultViewport" .!= mempty) <*> + (o .:? "visibility") + <*> (o .:? "name") + <*> (o .:? "type") + <*> (o .:? "kmlUrl")) + +instance ToJSON MapKmlLink where + toJSON MapKmlLink{..} + = object + (catMaybes + [("defaultViewport" .=) <$> _mklDefaultViewport, + ("visibility" .=) <$> _mklVisibility, + ("name" .=) <$> _mklName, ("type" .=) <$> _mklType, + ("kmlUrl" .=) <$> _mklKmlUrl]) + +-- | A vector style contains styling information for vector layer. +-- +-- /See:/ 'vectorStyle' smart constructor. +data VectorStyle = VectorStyle + { _vsDisplayRules :: !(Maybe [Maybe DisplayRule]) + , _vsFeatureInfo :: !(Maybe (Maybe FeatureInfo)) + , _vsType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VectorStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsDisplayRules' +-- +-- * 'vsFeatureInfo' +-- +-- * 'vsType' +vectorStyle + :: VectorStyle +vectorStyle = + VectorStyle + { _vsDisplayRules = Nothing + , _vsFeatureInfo = Nothing + , _vsType = Nothing + } + +vsDisplayRules :: Lens' VectorStyle [Maybe DisplayRule] +vsDisplayRules + = lens _vsDisplayRules + (\ s a -> s{_vsDisplayRules = a}) + . _Default + . _Coerce + +-- | Individual feature info, this is called Info Window in Maps Engine UI. +-- If not provided, a default template with all attributes will be +-- generated. +vsFeatureInfo :: Lens' VectorStyle (Maybe (Maybe FeatureInfo)) +vsFeatureInfo + = lens _vsFeatureInfo + (\ s a -> s{_vsFeatureInfo = a}) + +-- | The type of the vector style. Currently, only displayRule is supported. +vsType :: Lens' VectorStyle (Maybe Text) +vsType = lens _vsType (\ s a -> s{_vsType = a}) + +instance FromJSON VectorStyle where + parseJSON + = withObject "VectorStyle" + (\ o -> + VectorStyle <$> + (o .:? "displayRules" .!= mempty) <*> + (o .:? "featureInfo") + <*> (o .:? "type")) + +instance ToJSON VectorStyle where + toJSON VectorStyle{..} + = object + (catMaybes + [("displayRules" .=) <$> _vsDisplayRules, + ("featureInfo" .=) <$> _vsFeatureInfo, + ("type" .=) <$> _vsType]) + +-- | The response returned by a call to maps.List.published. +-- +-- /See:/ 'publishedMapsListResponse' smart constructor. +data PublishedMapsListResponse = PublishedMapsListResponse + { _pmlrMaps :: !(Maybe [Maybe PublishedMap]) + , _pmlrNextPageToken :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishedMapsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmlrMaps' +-- +-- * 'pmlrNextPageToken' +publishedMapsListResponse + :: PublishedMapsListResponse +publishedMapsListResponse = + PublishedMapsListResponse + { _pmlrMaps = Nothing + , _pmlrNextPageToken = Nothing + } + +-- | Resources returned. +pmlrMaps :: Lens' PublishedMapsListResponse [Maybe PublishedMap] +pmlrMaps + = lens _pmlrMaps (\ s a -> s{_pmlrMaps = a}) . + _Default + . _Coerce + +-- | Next page token. +pmlrNextPageToken :: Lens' PublishedMapsListResponse (Maybe Word8) +pmlrNextPageToken + = lens _pmlrNextPageToken + (\ s a -> s{_pmlrNextPageToken = a}) + +instance FromJSON PublishedMapsListResponse where + parseJSON + = withObject "PublishedMapsListResponse" + (\ o -> + PublishedMapsListResponse <$> + (o .:? "maps" .!= mempty) <*> + (o .:? "nextPageToken")) + +instance ToJSON PublishedMapsListResponse where + toJSON PublishedMapsListResponse{..} + = object + (catMaybes + [("maps" .=) <$> _pmlrMaps, + ("nextPageToken" .=) <$> _pmlrNextPageToken]) + +-- | The response returned by a call to mapsengine.permissions.batchDelete. +-- +-- /See:/ 'permissionsBatchDeleteResponse' smart constructor. +data PermissionsBatchDeleteResponse = + PermissionsBatchDeleteResponse + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsBatchDeleteResponse' with the minimum fields required to make a request. +-- +permissionsBatchDeleteResponse + :: PermissionsBatchDeleteResponse +permissionsBatchDeleteResponse = PermissionsBatchDeleteResponse + +instance FromJSON PermissionsBatchDeleteResponse + where + parseJSON + = withObject "PermissionsBatchDeleteResponse" + (\ o -> pure PermissionsBatchDeleteResponse) + +instance ToJSON PermissionsBatchDeleteResponse where + toJSON = const (Object mempty) + +-- | A collection of geographic features, and associated metadata. +-- +-- /See:/ 'table' smart constructor. +data Table = Table + { _tCreationTime :: !(Maybe UTCTime) + , _tWritersCanEditPermissions :: !(Maybe Bool) + , _tEtag :: !(Maybe Text) + , _tCreatorEmail :: !(Maybe Text) + , _tLastModifiedTime :: !(Maybe UTCTime) + , _tSchema :: !(Maybe (Maybe Schema)) + , _tLastModifierEmail :: !(Maybe Text) + , _tName :: !(Maybe Text) + , _tBbox :: !(Maybe [Double]) + , _tProcessingStatus :: !(Maybe Text) + , _tFiles :: !(Maybe [Maybe File]) + , _tId :: !(Maybe Text) + , _tProjectId :: !(Maybe Text) + , _tDraftAccessList :: !(Maybe Text) + , _tPublishedAccessList :: !(Maybe Text) + , _tSourceEncoding :: !Text + , _tDescription :: !(Maybe Text) + , _tTags :: !(Maybe (Maybe [Text])) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Table' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tCreationTime' +-- +-- * 'tWritersCanEditPermissions' +-- +-- * 'tEtag' +-- +-- * 'tCreatorEmail' +-- +-- * 'tLastModifiedTime' +-- +-- * 'tSchema' +-- +-- * 'tLastModifierEmail' +-- +-- * 'tName' +-- +-- * 'tBbox' +-- +-- * 'tProcessingStatus' +-- +-- * 'tFiles' +-- +-- * 'tId' +-- +-- * 'tProjectId' +-- +-- * 'tDraftAccessList' +-- +-- * 'tPublishedAccessList' +-- +-- * 'tSourceEncoding' +-- +-- * 'tDescription' +-- +-- * 'tTags' +table + :: Table +table = + Table + { _tCreationTime = Nothing + , _tWritersCanEditPermissions = Nothing + , _tEtag = Nothing + , _tCreatorEmail = Nothing + , _tLastModifiedTime = Nothing + , _tSchema = Nothing + , _tLastModifierEmail = Nothing + , _tName = Nothing + , _tBbox = Nothing + , _tProcessingStatus = Nothing + , _tFiles = Nothing + , _tId = Nothing + , _tProjectId = Nothing + , _tDraftAccessList = Nothing + , _tPublishedAccessList = Nothing + , _tSourceEncoding = "UTF-8" + , _tDescription = Nothing + , _tTags = Nothing + } + +-- | The creation time of this table. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +tCreationTime :: Lens' Table (Maybe UTCTime) +tCreationTime + = lens _tCreationTime + (\ s a -> s{_tCreationTime = a}) + +-- | If true, WRITERs of the asset are able to edit the asset permissions. +tWritersCanEditPermissions :: Lens' Table (Maybe Bool) +tWritersCanEditPermissions + = lens _tWritersCanEditPermissions + (\ s a -> s{_tWritersCanEditPermissions = a}) + +-- | The ETag, used to refer to the current version of the asset. +tEtag :: Lens' Table (Maybe Text) +tEtag = lens _tEtag (\ s a -> s{_tEtag = a}) + +-- | The email address of the creator of this table. This is only returned on +-- GET requests and not LIST requests. +tCreatorEmail :: Lens' Table (Maybe Text) +tCreatorEmail + = lens _tCreatorEmail + (\ s a -> s{_tCreatorEmail = a}) + +-- | The last modified time of this table. The value is an RFC 3339 formatted +-- date-time value (e.g. 1970-01-01T00:00:00Z). +tLastModifiedTime :: Lens' Table (Maybe UTCTime) +tLastModifiedTime + = lens _tLastModifiedTime + (\ s a -> s{_tLastModifiedTime = a}) + +-- | The schema for this table. Note: The schema is returned in response to a +-- get request but not a list request. After requesting a list of tables, +-- you\'ll need to send a get request to retrieve the schema for each +-- table. +tSchema :: Lens' Table (Maybe (Maybe Schema)) +tSchema = lens _tSchema (\ s a -> s{_tSchema = a}) + +-- | The email address of the last modifier of this table. This is only +-- returned on GET requests and not LIST requests. +tLastModifierEmail :: Lens' Table (Maybe Text) +tLastModifierEmail + = lens _tLastModifierEmail + (\ s a -> s{_tLastModifierEmail = a}) + +-- | The name of this table, supplied by the author. +tName :: Lens' Table (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +-- | A rectangular bounding box which contains all of the data in this Table. +-- The box is expressed as \\\"west, south, east, north\\\". The numbers +-- represent latitude and longitude in decimal degrees. +tBbox :: Lens' Table [Double] +tBbox + = lens _tBbox (\ s a -> s{_tBbox = a}) . _Default . + _Coerce + +-- | The processing status of this table. +tProcessingStatus :: Lens' Table (Maybe Text) +tProcessingStatus + = lens _tProcessingStatus + (\ s a -> s{_tProcessingStatus = a}) + +-- | The files associated with this table. +tFiles :: Lens' Table [Maybe File] +tFiles + = lens _tFiles (\ s a -> s{_tFiles = a}) . _Default . + _Coerce + +-- | A globally unique ID, used to refer to this table. +tId :: Lens' Table (Maybe Text) +tId = lens _tId (\ s a -> s{_tId = a}) + +-- | The ID of the project to which the table belongs. +tProjectId :: Lens' Table (Maybe Text) +tProjectId + = lens _tProjectId (\ s a -> s{_tProjectId = a}) + +-- | Deprecated: The name of an access list of the Map Editor type. The user +-- on whose behalf the request is being sent must be an editor on that +-- access list. Note: Google Maps Engine no longer uses access lists. +-- Instead, each asset has its own list of permissions. For backward +-- compatibility, the API still accepts access lists for projects that are +-- already using access lists. If you created a GME account\/project after +-- July 14th, 2014, you will not be able to send API requests that include +-- access lists. Note: This is an input field only. It is not returned in +-- response to a list or get request. +tDraftAccessList :: Lens' Table (Maybe Text) +tDraftAccessList + = lens _tDraftAccessList + (\ s a -> s{_tDraftAccessList = a}) + +-- | Deprecated: The access list to whom view permissions are granted. The +-- value must be the name of a Maps Engine access list of the Map Viewer +-- type, and the user must be a viewer on that list. Note: Google Maps +-- Engine no longer uses access lists. Instead, each asset has its own list +-- of permissions. For backward compatibility, the API still accepts access +-- lists for projects that are already using access lists. If you created a +-- GME account\/project after July 14th, 2014, you will not be able to send +-- API requests that include access lists. Note: This is an input field +-- only. It is not returned in response to a list or get request. +tPublishedAccessList :: Lens' Table (Maybe Text) +tPublishedAccessList + = lens _tPublishedAccessList + (\ s a -> s{_tPublishedAccessList = a}) + +-- | Encoding of the uploaded files. Valid values include UTF-8, CP1251, ISO +-- 8859-1, and Shift_JIS. +tSourceEncoding :: Lens' Table Text +tSourceEncoding + = lens _tSourceEncoding + (\ s a -> s{_tSourceEncoding = a}) + +-- | The description of this table, supplied by the author. +tDescription :: Lens' Table (Maybe Text) +tDescription + = lens _tDescription (\ s a -> s{_tDescription = a}) + +-- | An array of text strings, with each string representing a tag. More +-- information about tags can be found in the Tagging data article of the +-- Maps Engine help center. +tTags :: Lens' Table (Maybe [Text]) +tTags + = lens _tTags (\ s a -> s{_tTags = a}) . + mapping (_Default . _Coerce) + +instance FromJSON Table where + parseJSON + = withObject "Table" + (\ o -> + Table <$> + (o .:? "creationTime") <*> + (o .:? "writersCanEditPermissions") + <*> (o .:? "etag") + <*> (o .:? "creatorEmail") + <*> (o .:? "lastModifiedTime") + <*> (o .:? "schema") + <*> (o .:? "lastModifierEmail") + <*> (o .:? "name") + <*> (o .:? "bbox" .!= mempty) + <*> (o .:? "processingStatus") + <*> (o .:? "files" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "projectId") + <*> (o .:? "draftAccessList") + <*> (o .:? "publishedAccessList") + <*> (o .:? "sourceEncoding" .!= "UTF-8") + <*> (o .:? "description") + <*> (o .:? "tags")) + +instance ToJSON Table where + toJSON Table{..} + = object + (catMaybes + [("creationTime" .=) <$> _tCreationTime, + ("writersCanEditPermissions" .=) <$> + _tWritersCanEditPermissions, + ("etag" .=) <$> _tEtag, + ("creatorEmail" .=) <$> _tCreatorEmail, + ("lastModifiedTime" .=) <$> _tLastModifiedTime, + ("schema" .=) <$> _tSchema, + ("lastModifierEmail" .=) <$> _tLastModifierEmail, + ("name" .=) <$> _tName, ("bbox" .=) <$> _tBbox, + ("processingStatus" .=) <$> _tProcessingStatus, + ("files" .=) <$> _tFiles, ("id" .=) <$> _tId, + ("projectId" .=) <$> _tProjectId, + ("draftAccessList" .=) <$> _tDraftAccessList, + ("publishedAccessList" .=) <$> _tPublishedAccessList, + Just ("sourceEncoding" .= _tSourceEncoding), + ("description" .=) <$> _tDescription, + ("tags" .=) <$> _tTags]) + +-- +-- /See:/ 'geoJSONLineString' smart constructor. +data GeoJSONLineString = GeoJSONLineString + { _gjlsCoordinates :: !(Maybe [Maybe [Double]]) + , _gjlsType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONLineString' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjlsCoordinates' +-- +-- * 'gjlsType' +geoJSONLineString + :: GeoJSONLineString +geoJSONLineString = + GeoJSONLineString + { _gjlsCoordinates = Nothing + , _gjlsType = Nothing + } + +-- | An array of two or more positions, representing a line. +gjlsCoordinates :: Lens' GeoJSONLineString [[Double]] +gjlsCoordinates + = lens _gjlsCoordinates + (\ s a -> s{_gjlsCoordinates = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonLineString. +gjlsType :: Lens' GeoJSONLineString (Maybe Text) +gjlsType = lens _gjlsType (\ s a -> s{_gjlsType = a}) + +instance FromJSON GeoJSONLineString where + parseJSON + = withObject "GeoJSONLineString" + (\ o -> + GeoJSONLineString <$> + (o .:? "coordinates" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONLineString where + toJSON GeoJSONLineString{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjlsCoordinates, + ("type" .=) <$> _gjlsType]) + +-- | The response returned by a call to maps.List. +-- +-- /See:/ 'mapsListResponse' smart constructor. +data MapsListResponse = MapsListResponse + { _mlrMaps :: !(Maybe [Maybe Map]) + , _mlrNextPageToken :: !(Maybe Word8) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlrMaps' +-- +-- * 'mlrNextPageToken' +mapsListResponse + :: MapsListResponse +mapsListResponse = + MapsListResponse + { _mlrMaps = Nothing + , _mlrNextPageToken = Nothing + } + +-- | Resources returned. +mlrMaps :: Lens' MapsListResponse [Maybe Map] +mlrMaps + = lens _mlrMaps (\ s a -> s{_mlrMaps = a}) . _Default + . _Coerce + +-- | Next page token. +mlrNextPageToken :: Lens' MapsListResponse (Maybe Word8) +mlrNextPageToken + = lens _mlrNextPageToken + (\ s a -> s{_mlrNextPageToken = a}) + +instance FromJSON MapsListResponse where + parseJSON + = withObject "MapsListResponse" + (\ o -> + MapsListResponse <$> + (o .:? "maps" .!= mempty) <*> + (o .:? "nextPageToken")) + +instance ToJSON MapsListResponse where + toJSON MapsListResponse{..} + = object + (catMaybes + [("maps" .=) <$> _mlrMaps, + ("nextPageToken" .=) <$> _mlrNextPageToken]) + +-- | A single File, which is a component of an Asset. +-- +-- /See:/ 'file' smart constructor. +data File = File + { _fSize :: !(Maybe Int64) + , _fUploadStatus :: !(Maybe Text) + , _fFilename :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'File' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fSize' +-- +-- * 'fUploadStatus' +-- +-- * 'fFilename' +file + :: File +file = + File + { _fSize = Nothing + , _fUploadStatus = Nothing + , _fFilename = Nothing + } + +-- | The size of the file in bytes. +fSize :: Lens' File (Maybe Int64) +fSize = lens _fSize (\ s a -> s{_fSize = a}) + +-- | The upload status of the file. +fUploadStatus :: Lens' File (Maybe Text) +fUploadStatus + = lens _fUploadStatus + (\ s a -> s{_fUploadStatus = a}) + +-- | The name of the file. +fFilename :: Lens' File (Maybe Text) +fFilename + = lens _fFilename (\ s a -> s{_fFilename = a}) + +instance FromJSON File where + parseJSON + = withObject "File" + (\ o -> + File <$> + (o .:? "size") <*> (o .:? "uploadStatus") <*> + (o .:? "filename")) + +instance ToJSON File where + toJSON File{..} + = object + (catMaybes + [("size" .=) <$> _fSize, + ("uploadStatus" .=) <$> _fUploadStatus, + ("filename" .=) <$> _fFilename]) + +-- | The response returned by a call to layers.List. Note: The list response +-- does not include all the fields available in a layer. Refer to the layer +-- resource description for details of the fields that are not included. +-- You\'ll need to send a get request to retrieve the additional fields for +-- each layer. +-- +-- /See:/ 'layersListResponse' smart constructor. +data LayersListResponse = LayersListResponse + { _llrNextPageToken :: !(Maybe Word8) + , _llrLayers :: !(Maybe [Maybe Layer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrNextPageToken' +-- +-- * 'llrLayers' +layersListResponse + :: LayersListResponse +layersListResponse = + LayersListResponse + { _llrNextPageToken = Nothing + , _llrLayers = Nothing + } + +-- | Next page token. +llrNextPageToken :: Lens' LayersListResponse (Maybe Word8) +llrNextPageToken + = lens _llrNextPageToken + (\ s a -> s{_llrNextPageToken = a}) + +-- | Resources returned. +llrLayers :: Lens' LayersListResponse [Maybe Layer] +llrLayers + = lens _llrLayers (\ s a -> s{_llrLayers = a}) . + _Default + . _Coerce + +instance FromJSON LayersListResponse where + parseJSON + = withObject "LayersListResponse" + (\ o -> + LayersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "layers" .!= mempty)) + +instance ToJSON LayersListResponse where + toJSON LayersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _llrNextPageToken, + ("layers" .=) <$> _llrLayers]) + +-- +-- /See:/ 'geoJSONPolygon' smart constructor. +data GeoJSONPolygon = GeoJSONPolygon + { _gjpCoordinates :: !(Maybe [[Maybe [Double]]]) + , _gjpType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONPolygon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjpCoordinates' +-- +-- * 'gjpType' +geoJSONPolygon + :: GeoJSONPolygon +geoJSONPolygon = + GeoJSONPolygon + { _gjpCoordinates = Nothing + , _gjpType = Nothing + } + +-- | An array of LinearRings. A LinearRing is a GeoJsonLineString which is +-- closed (that is, the first and last GeoJsonPositions are equal), and +-- which contains at least four GeoJsonPositions. For polygons with +-- multiple rings, the first LinearRing is the exterior ring, and any +-- subsequent rings are interior rings (that is, holes). +gjpCoordinates :: Lens' GeoJSONPolygon [[[Double]]] +gjpCoordinates + = lens _gjpCoordinates + (\ s a -> s{_gjpCoordinates = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonPolygon. +gjpType :: Lens' GeoJSONPolygon (Maybe Text) +gjpType = lens _gjpType (\ s a -> s{_gjpType = a}) + +instance FromJSON GeoJSONPolygon where + parseJSON + = withObject "GeoJSONPolygon" + (\ o -> + GeoJSONPolygon <$> + (o .:? "coordinates" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONPolygon where + toJSON GeoJSONPolygon{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjpCoordinates, + ("type" .=) <$> _gjpType]) + +-- +-- /See:/ 'geoJSONPoint' smart constructor. +data GeoJSONPoint = GeoJSONPoint + { _gjsonpCoordinates :: !(Maybe (Maybe [Double])) + , _gjsonpType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjsonpCoordinates' +-- +-- * 'gjsonpType' +geoJSONPoint + :: GeoJSONPoint +geoJSONPoint = + GeoJSONPoint + { _gjsonpCoordinates = Nothing + , _gjsonpType = Nothing + } + +-- | A single GeoJsonPosition, specifying the location of the point. +gjsonpCoordinates :: Lens' GeoJSONPoint (Maybe [Double]) +gjsonpCoordinates + = lens _gjsonpCoordinates + (\ s a -> s{_gjsonpCoordinates = a}) + . mapping (_Default . _Coerce) + +-- | Identifies this object as a GeoJsonPoint. +gjsonpType :: Lens' GeoJSONPoint (Maybe Text) +gjsonpType + = lens _gjsonpType (\ s a -> s{_gjsonpType = a}) + +instance FromJSON GeoJSONPoint where + parseJSON + = withObject "GeoJSONPoint" + (\ o -> + GeoJSONPoint <$> + (o .:? "coordinates") <*> (o .:? "type")) + +instance ToJSON GeoJSONPoint where + toJSON GeoJSONPoint{..} + = object + (catMaybes + [("coordinates" .=) <$> _gjsonpCoordinates, + ("type" .=) <$> _gjsonpType]) + +-- +-- /See:/ 'permissionsListResponse' smart constructor. +newtype PermissionsListResponse = PermissionsListResponse + { _plrPermissions :: Maybe [Maybe Permission] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrPermissions' +permissionsListResponse + :: PermissionsListResponse +permissionsListResponse = + PermissionsListResponse + { _plrPermissions = Nothing + } + +-- | The set of permissions associated with this asset. +plrPermissions :: Lens' PermissionsListResponse [Maybe Permission] +plrPermissions + = lens _plrPermissions + (\ s a -> s{_plrPermissions = a}) + . _Default + . _Coerce + +instance FromJSON PermissionsListResponse where + parseJSON + = withObject "PermissionsListResponse" + (\ o -> + PermissionsListResponse <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON PermissionsListResponse where + toJSON PermissionsListResponse{..} + = object + (catMaybes [("permissions" .=) <$> _plrPermissions]) + +-- | Style for lines. +-- +-- /See:/ 'lineStyle' smart constructor. +data LineStyle = LineStyle + { _lsStroke :: !(Maybe LineStyleStroke) + , _lsBorder :: !(Maybe (Maybe Border)) + , _lsDash :: !(Maybe [Double]) + , _lsLabel :: !(Maybe (Maybe LabelStyle)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LineStyle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsStroke' +-- +-- * 'lsBorder' +-- +-- * 'lsDash' +-- +-- * 'lsLabel' +lineStyle + :: LineStyle +lineStyle = + LineStyle + { _lsStroke = Nothing + , _lsBorder = Nothing + , _lsDash = Nothing + , _lsLabel = Nothing + } + +-- | Stroke of the line. +lsStroke :: Lens' LineStyle (Maybe LineStyleStroke) +lsStroke = lens _lsStroke (\ s a -> s{_lsStroke = a}) + +-- | Border of the line. 0 \< border.width \<= 5. +lsBorder :: Lens' LineStyle (Maybe (Maybe Border)) +lsBorder = lens _lsBorder (\ s a -> s{_lsBorder = a}) + +-- | Dash defines the pattern of the line, the values are pixel lengths of +-- alternating dash and gap. If dash is not provided, then it means a solid +-- line. Dash can contain up to 10 values and must contain even number of +-- values. +lsDash :: Lens' LineStyle [Double] +lsDash + = lens _lsDash (\ s a -> s{_lsDash = a}) . _Default . + _Coerce + +-- | Label style for the line. +lsLabel :: Lens' LineStyle (Maybe (Maybe LabelStyle)) +lsLabel = lens _lsLabel (\ s a -> s{_lsLabel = a}) + +instance FromJSON LineStyle where + parseJSON + = withObject "LineStyle" + (\ o -> + LineStyle <$> + (o .:? "stroke") <*> (o .:? "border") <*> + (o .:? "dash" .!= mempty) + <*> (o .:? "label")) + +instance ToJSON LineStyle where + toJSON LineStyle{..} + = object + (catMaybes + [("stroke" .=) <$> _lsStroke, + ("border" .=) <$> _lsBorder, ("dash" .=) <$> _lsDash, + ("label" .=) <$> _lsLabel]) + +-- | The response returned by a call to layers.List.published. +-- +-- /See:/ 'publishedLayersListResponse' smart constructor. +data PublishedLayersListResponse = PublishedLayersListResponse + { _pllrNextPageToken :: !(Maybe Word8) + , _pllrLayers :: !(Maybe [Maybe PublishedLayer]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishedLayersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pllrNextPageToken' +-- +-- * 'pllrLayers' +publishedLayersListResponse + :: PublishedLayersListResponse +publishedLayersListResponse = + PublishedLayersListResponse + { _pllrNextPageToken = Nothing + , _pllrLayers = Nothing + } + +-- | Next page token. +pllrNextPageToken :: Lens' PublishedLayersListResponse (Maybe Word8) +pllrNextPageToken + = lens _pllrNextPageToken + (\ s a -> s{_pllrNextPageToken = a}) + +-- | Resources returned. +pllrLayers :: Lens' PublishedLayersListResponse [Maybe PublishedLayer] +pllrLayers + = lens _pllrLayers (\ s a -> s{_pllrLayers = a}) . + _Default + . _Coerce + +instance FromJSON PublishedLayersListResponse where + parseJSON + = withObject "PublishedLayersListResponse" + (\ o -> + PublishedLayersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "layers" .!= mempty)) + +instance ToJSON PublishedLayersListResponse where + toJSON PublishedLayersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _pllrNextPageToken, + ("layers" .=) <$> _pllrLayers]) + +-- | A heterogenous collection of GeoJsonGeometry objects. +-- +-- /See:/ 'geoJSONGeometryCollection' smart constructor. +data GeoJSONGeometryCollection = GeoJSONGeometryCollection + { _gjgcGeometries :: !(Maybe [Maybe GeoJSONGeometry]) + , _gjgcType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoJSONGeometryCollection' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gjgcGeometries' +-- +-- * 'gjgcType' +geoJSONGeometryCollection + :: GeoJSONGeometryCollection +geoJSONGeometryCollection = + GeoJSONGeometryCollection + { _gjgcGeometries = Nothing + , _gjgcType = Nothing + } + +-- | An array of geometry objects. There must be at least 2 different types +-- of geometries in the array. +gjgcGeometries :: Lens' GeoJSONGeometryCollection [Maybe GeoJSONGeometry] +gjgcGeometries + = lens _gjgcGeometries + (\ s a -> s{_gjgcGeometries = a}) + . _Default + . _Coerce + +-- | Identifies this object as a GeoJsonGeometryCollection. +gjgcType :: Lens' GeoJSONGeometryCollection (Maybe Text) +gjgcType = lens _gjgcType (\ s a -> s{_gjgcType = a}) + +instance FromJSON GeoJSONGeometryCollection where + parseJSON + = withObject "GeoJSONGeometryCollection" + (\ o -> + GeoJSONGeometryCollection <$> + (o .:? "geometries" .!= mempty) <*> (o .:? "type")) + +instance ToJSON GeoJSONGeometryCollection where + toJSON GeoJSONGeometryCollection{..} + = object + (catMaybes + [("geometries" .=) <$> _gjgcGeometries, + ("type" .=) <$> _gjgcType]) + +-- | The response returned by a call to rasters.List. +-- +-- /See:/ 'rastersListResponse' smart constructor. +data RastersListResponse = RastersListResponse + { _rlrNextPageToken :: !(Maybe Text) + , _rlrRasters :: !(Maybe [Maybe Raster]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlrNextPageToken' +-- +-- * 'rlrRasters' +rastersListResponse + :: RastersListResponse +rastersListResponse = + RastersListResponse + { _rlrNextPageToken = Nothing + , _rlrRasters = Nothing + } + +-- | Next page token. +rlrNextPageToken :: Lens' RastersListResponse (Maybe Text) +rlrNextPageToken + = lens _rlrNextPageToken + (\ s a -> s{_rlrNextPageToken = a}) + +-- | Resources returned. +rlrRasters :: Lens' RastersListResponse [Maybe Raster] +rlrRasters + = lens _rlrRasters (\ s a -> s{_rlrRasters = a}) . + _Default + . _Coerce + +instance FromJSON RastersListResponse where + parseJSON + = withObject "RastersListResponse" + (\ o -> + RastersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "rasters" .!= mempty)) + +instance ToJSON RastersListResponse where + toJSON RastersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rlrNextPageToken, + ("rasters" .=) <$> _rlrRasters]) diff --git a/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Sum.hs b/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Sum.hs new file mode 100644 index 000000000..950c750f5 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/MapEngine/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.MapEngine.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.MapEngine.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Get.hs new file mode 100644 index 000000000..48f27c4ef --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Assets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a particular asset. +-- +-- /See:/ for @MapsengineAssetsGet@. +module Mapsengine.Assets.Get + ( + -- * REST Resource + AssetsGetAPI + + -- * Creating a Request + , assetsGet + , AssetsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agKey + , agId + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineAssetsGet@ which the +-- 'AssetsGet' request conforms to. +type AssetsGetAPI = + "assets" :> Capture "id" Text :> Get '[JSON] Asset + +-- | Return metadata for a particular asset. +-- +-- /See:/ 'assetsGet' smart constructor. +data AssetsGet = AssetsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agKey :: !(Maybe Text) + , _agId :: !Text + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssetsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agKey' +-- +-- * 'agId' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +assetsGet + :: Text -- ^ 'id' + -> AssetsGet +assetsGet pAgId_ = + AssetsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agKey = Nothing + , _agId = pAgId_ + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AssetsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AssetsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AssetsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AssetsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | The ID of the asset. +agId :: Lens' AssetsGet' Text +agId = lens _agId (\ s a -> s{_agId = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AssetsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AssetsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AssetsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AssetsGet' where + type Rs AssetsGet' = Asset + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u AssetsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp _agKey + _agId + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AssetsGetAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/List.hs new file mode 100644 index 000000000..f69fc03ab --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/List.hs @@ -0,0 +1,313 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Assets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all assets readable by the current user. +-- +-- /See:/ for @MapsengineAssetsList@. +module Mapsengine.Assets.List + ( + -- * REST Resource + AssetsListAPI + + -- * Creating a Request + , assetsList + , AssetsList + + -- * Request Lenses + , alCreatedAfter + , alQuotaUser + , alPrettyPrint + , alUserIp + , alCreatorEmail + , alRole + , alKey + , alBbox + , alModifiedAfter + , alModifiedBefore + , alPageToken + , alProjectId + , alType + , alOauthToken + , alSearch + , alMaxResults + , alTags + , alFields + , alCreatedBefore + , alAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineAssetsList@ which the +-- 'AssetsList' request conforms to. +type AssetsListAPI = + "assets" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "type" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] AssetsListResponse + +-- | Return all assets readable by the current user. +-- +-- /See:/ 'assetsList' smart constructor. +data AssetsList = AssetsList + { _alCreatedAfter :: !(Maybe UTCTime) + , _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alCreatorEmail :: !(Maybe Text) + , _alRole :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alBbox :: !(Maybe Text) + , _alModifiedAfter :: !(Maybe UTCTime) + , _alModifiedBefore :: !(Maybe UTCTime) + , _alPageToken :: !(Maybe Text) + , _alProjectId :: !(Maybe Text) + , _alType :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alSearch :: !(Maybe Text) + , _alMaxResults :: !(Maybe Word32) + , _alTags :: !(Maybe Text) + , _alFields :: !(Maybe Text) + , _alCreatedBefore :: !(Maybe UTCTime) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssetsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alCreatedAfter' +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alCreatorEmail' +-- +-- * 'alRole' +-- +-- * 'alKey' +-- +-- * 'alBbox' +-- +-- * 'alModifiedAfter' +-- +-- * 'alModifiedBefore' +-- +-- * 'alPageToken' +-- +-- * 'alProjectId' +-- +-- * 'alType' +-- +-- * 'alOauthToken' +-- +-- * 'alSearch' +-- +-- * 'alMaxResults' +-- +-- * 'alTags' +-- +-- * 'alFields' +-- +-- * 'alCreatedBefore' +-- +-- * 'alAlt' +assetsList + :: AssetsList +assetsList = + AssetsList + { _alCreatedAfter = Nothing + , _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alCreatorEmail = Nothing + , _alRole = Nothing + , _alKey = Nothing + , _alBbox = Nothing + , _alModifiedAfter = Nothing + , _alModifiedBefore = Nothing + , _alPageToken = Nothing + , _alProjectId = Nothing + , _alType = Nothing + , _alOauthToken = Nothing + , _alSearch = Nothing + , _alMaxResults = Nothing + , _alTags = Nothing + , _alFields = Nothing + , _alCreatedBefore = Nothing + , _alAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +alCreatedAfter :: Lens' AssetsList' (Maybe UTCTime) +alCreatedAfter + = lens _alCreatedAfter + (\ s a -> s{_alCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AssetsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AssetsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AssetsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +alCreatorEmail :: Lens' AssetsList' (Maybe Text) +alCreatorEmail + = lens _alCreatorEmail + (\ s a -> s{_alCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +alRole :: Lens' AssetsList' (Maybe Text) +alRole = lens _alRole (\ s a -> s{_alRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AssetsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +alBbox :: Lens' AssetsList' (Maybe Text) +alBbox = lens _alBbox (\ s a -> s{_alBbox = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +alModifiedAfter :: Lens' AssetsList' (Maybe UTCTime) +alModifiedAfter + = lens _alModifiedAfter + (\ s a -> s{_alModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +alModifiedBefore :: Lens' AssetsList' (Maybe UTCTime) +alModifiedBefore + = lens _alModifiedBefore + (\ s a -> s{_alModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +alPageToken :: Lens' AssetsList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +alProjectId :: Lens' AssetsList' (Maybe Text) +alProjectId + = lens _alProjectId (\ s a -> s{_alProjectId = a}) + +-- | A comma separated list of asset types. Returned assets will have one of +-- the types from the provided list. Supported values are \'map\', +-- \'layer\', \'rasterCollection\' and \'table\'. +alType :: Lens' AssetsList' (Maybe Text) +alType = lens _alType (\ s a -> s{_alType = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AssetsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +alSearch :: Lens' AssetsList' (Maybe Text) +alSearch = lens _alSearch (\ s a -> s{_alSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +alMaxResults :: Lens' AssetsList' (Maybe Word32) +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +alTags :: Lens' AssetsList' (Maybe Text) +alTags = lens _alTags (\ s a -> s{_alTags = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AssetsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +alCreatedBefore :: Lens' AssetsList' (Maybe UTCTime) +alCreatedBefore + = lens _alCreatedBefore + (\ s a -> s{_alCreatedBefore = a}) + +-- | Data format for the response. +alAlt :: Lens' AssetsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AssetsList' where + type Rs AssetsList' = AssetsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u AssetsList{..} + = go _alCreatedAfter _alQuotaUser _alPrettyPrint + _alUserIp + _alCreatorEmail + _alRole + _alKey + _alBbox + _alModifiedAfter + _alModifiedBefore + _alPageToken + _alProjectId + _alType + _alOauthToken + _alSearch + _alMaxResults + _alTags + _alFields + _alCreatedBefore + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AssetsListAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Parents/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Parents/List.hs new file mode 100644 index 000000000..35c5d617b --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Parents/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Assets.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all parent ids of the specified asset. +-- +-- /See:/ for @MapsengineAssetsParentsList@. +module Mapsengine.Assets.Parents.List + ( + -- * REST Resource + AssetsParentsListAPI + + -- * Creating a Request + , assetsParentsList + , AssetsParentsList + + -- * Request Lenses + , aplQuotaUser + , aplPrettyPrint + , aplUserIp + , aplKey + , aplId + , aplPageToken + , aplOauthToken + , aplMaxResults + , aplFields + , aplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineAssetsParentsList@ which the +-- 'AssetsParentsList' request conforms to. +type AssetsParentsListAPI = + "assets" :> + Capture "id" Text :> + "parents" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ParentsListResponse + +-- | Return all parent ids of the specified asset. +-- +-- /See:/ 'assetsParentsList' smart constructor. +data AssetsParentsList = AssetsParentsList + { _aplQuotaUser :: !(Maybe Text) + , _aplPrettyPrint :: !Bool + , _aplUserIp :: !(Maybe Text) + , _aplKey :: !(Maybe Text) + , _aplId :: !Text + , _aplPageToken :: !(Maybe Text) + , _aplOauthToken :: !(Maybe Text) + , _aplMaxResults :: !(Maybe Word32) + , _aplFields :: !(Maybe Text) + , _aplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssetsParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplQuotaUser' +-- +-- * 'aplPrettyPrint' +-- +-- * 'aplUserIp' +-- +-- * 'aplKey' +-- +-- * 'aplId' +-- +-- * 'aplPageToken' +-- +-- * 'aplOauthToken' +-- +-- * 'aplMaxResults' +-- +-- * 'aplFields' +-- +-- * 'aplAlt' +assetsParentsList + :: Text -- ^ 'id' + -> AssetsParentsList +assetsParentsList pAplId_ = + AssetsParentsList + { _aplQuotaUser = Nothing + , _aplPrettyPrint = True + , _aplUserIp = Nothing + , _aplKey = Nothing + , _aplId = pAplId_ + , _aplPageToken = Nothing + , _aplOauthToken = Nothing + , _aplMaxResults = Nothing + , _aplFields = Nothing + , _aplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aplQuotaUser :: Lens' AssetsParentsList' (Maybe Text) +aplQuotaUser + = lens _aplQuotaUser (\ s a -> s{_aplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aplPrettyPrint :: Lens' AssetsParentsList' Bool +aplPrettyPrint + = lens _aplPrettyPrint + (\ s a -> s{_aplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aplUserIp :: Lens' AssetsParentsList' (Maybe Text) +aplUserIp + = lens _aplUserIp (\ s a -> s{_aplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aplKey :: Lens' AssetsParentsList' (Maybe Text) +aplKey = lens _aplKey (\ s a -> s{_aplKey = a}) + +-- | The ID of the asset whose parents will be listed. +aplId :: Lens' AssetsParentsList' Text +aplId = lens _aplId (\ s a -> s{_aplId = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +aplPageToken :: Lens' AssetsParentsList' (Maybe Text) +aplPageToken + = lens _aplPageToken (\ s a -> s{_aplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aplOauthToken :: Lens' AssetsParentsList' (Maybe Text) +aplOauthToken + = lens _aplOauthToken + (\ s a -> s{_aplOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +aplMaxResults :: Lens' AssetsParentsList' (Maybe Word32) +aplMaxResults + = lens _aplMaxResults + (\ s a -> s{_aplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aplFields :: Lens' AssetsParentsList' (Maybe Text) +aplFields + = lens _aplFields (\ s a -> s{_aplFields = a}) + +-- | Data format for the response. +aplAlt :: Lens' AssetsParentsList' Text +aplAlt = lens _aplAlt (\ s a -> s{_aplAlt = a}) + +instance GoogleRequest AssetsParentsList' where + type Rs AssetsParentsList' = ParentsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u AssetsParentsList{..} + = go _aplQuotaUser _aplPrettyPrint _aplUserIp _aplKey + _aplId + _aplPageToken + _aplOauthToken + _aplMaxResults + _aplFields + _aplAlt + where go + = clientWithRoute + (Proxy :: Proxy AssetsParentsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Permissions/List.hs new file mode 100644 index 000000000..cde9b5733 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Assets/Permissions/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Assets.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineAssetsPermissionsList@. +module Mapsengine.Assets.Permissions.List + ( + -- * REST Resource + AssetsPermissionsListAPI + + -- * Creating a Request + , assetsPermissionsList + , AssetsPermissionsList + + -- * Request Lenses + , assQuotaUser + , assPrettyPrint + , assUserIp + , assKey + , assId + , assOauthToken + , assFields + , assAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineAssetsPermissionsList@ which the +-- 'AssetsPermissionsList' request conforms to. +type AssetsPermissionsListAPI = + "assets" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'assetsPermissionsList' smart constructor. +data AssetsPermissionsList = AssetsPermissionsList + { _assQuotaUser :: !(Maybe Text) + , _assPrettyPrint :: !Bool + , _assUserIp :: !(Maybe Text) + , _assKey :: !(Maybe Text) + , _assId :: !Text + , _assOauthToken :: !(Maybe Text) + , _assFields :: !(Maybe Text) + , _assAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AssetsPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'assQuotaUser' +-- +-- * 'assPrettyPrint' +-- +-- * 'assUserIp' +-- +-- * 'assKey' +-- +-- * 'assId' +-- +-- * 'assOauthToken' +-- +-- * 'assFields' +-- +-- * 'assAlt' +assetsPermissionsList + :: Text -- ^ 'id' + -> AssetsPermissionsList +assetsPermissionsList pAssId_ = + AssetsPermissionsList + { _assQuotaUser = Nothing + , _assPrettyPrint = True + , _assUserIp = Nothing + , _assKey = Nothing + , _assId = pAssId_ + , _assOauthToken = Nothing + , _assFields = Nothing + , _assAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +assQuotaUser :: Lens' AssetsPermissionsList' (Maybe Text) +assQuotaUser + = lens _assQuotaUser (\ s a -> s{_assQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +assPrettyPrint :: Lens' AssetsPermissionsList' Bool +assPrettyPrint + = lens _assPrettyPrint + (\ s a -> s{_assPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +assUserIp :: Lens' AssetsPermissionsList' (Maybe Text) +assUserIp + = lens _assUserIp (\ s a -> s{_assUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +assKey :: Lens' AssetsPermissionsList' (Maybe Text) +assKey = lens _assKey (\ s a -> s{_assKey = a}) + +-- | The ID of the asset whose permissions will be listed. +assId :: Lens' AssetsPermissionsList' Text +assId = lens _assId (\ s a -> s{_assId = a}) + +-- | OAuth 2.0 token for the current user. +assOauthToken :: Lens' AssetsPermissionsList' (Maybe Text) +assOauthToken + = lens _assOauthToken + (\ s a -> s{_assOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +assFields :: Lens' AssetsPermissionsList' (Maybe Text) +assFields + = lens _assFields (\ s a -> s{_assFields = a}) + +-- | Data format for the response. +assAlt :: Lens' AssetsPermissionsList' Text +assAlt = lens _assAlt (\ s a -> s{_assAlt = a}) + +instance GoogleRequest AssetsPermissionsList' where + type Rs AssetsPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u AssetsPermissionsList{..} + = go _assQuotaUser _assPrettyPrint _assUserIp _assKey + _assId + _assOauthToken + _assFields + _assAlt + where go + = clientWithRoute + (Proxy :: Proxy AssetsPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/CancelProcessing.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/CancelProcessing.hs new file mode 100644 index 000000000..d7afa452d --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/CancelProcessing.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.CancelProcessing +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancel processing on a layer asset. +-- +-- /See:/ for @MapsengineLayersCancelProcessing@. +module Mapsengine.Layers.CancelProcessing + ( + -- * REST Resource + LayersCancelProcessingAPI + + -- * Creating a Request + , layersCancelProcessing + , LayersCancelProcessing + + -- * Request Lenses + , lcpQuotaUser + , lcpPrettyPrint + , lcpUserIp + , lcpKey + , lcpId + , lcpOauthToken + , lcpFields + , lcpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersCancelProcessing@ which the +-- 'LayersCancelProcessing' request conforms to. +type LayersCancelProcessingAPI = + "layers" :> + Capture "id" Text :> + "cancelProcessing" :> Post '[JSON] ProcessResponse + +-- | Cancel processing on a layer asset. +-- +-- /See:/ 'layersCancelProcessing' smart constructor. +data LayersCancelProcessing = LayersCancelProcessing + { _lcpQuotaUser :: !(Maybe Text) + , _lcpPrettyPrint :: !Bool + , _lcpUserIp :: !(Maybe Text) + , _lcpKey :: !(Maybe Text) + , _lcpId :: !Text + , _lcpOauthToken :: !(Maybe Text) + , _lcpFields :: !(Maybe Text) + , _lcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersCancelProcessing'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcpQuotaUser' +-- +-- * 'lcpPrettyPrint' +-- +-- * 'lcpUserIp' +-- +-- * 'lcpKey' +-- +-- * 'lcpId' +-- +-- * 'lcpOauthToken' +-- +-- * 'lcpFields' +-- +-- * 'lcpAlt' +layersCancelProcessing + :: Text -- ^ 'id' + -> LayersCancelProcessing +layersCancelProcessing pLcpId_ = + LayersCancelProcessing + { _lcpQuotaUser = Nothing + , _lcpPrettyPrint = True + , _lcpUserIp = Nothing + , _lcpKey = Nothing + , _lcpId = pLcpId_ + , _lcpOauthToken = Nothing + , _lcpFields = Nothing + , _lcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcpQuotaUser :: Lens' LayersCancelProcessing' (Maybe Text) +lcpQuotaUser + = lens _lcpQuotaUser (\ s a -> s{_lcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcpPrettyPrint :: Lens' LayersCancelProcessing' Bool +lcpPrettyPrint + = lens _lcpPrettyPrint + (\ s a -> s{_lcpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcpUserIp :: Lens' LayersCancelProcessing' (Maybe Text) +lcpUserIp + = lens _lcpUserIp (\ s a -> s{_lcpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcpKey :: Lens' LayersCancelProcessing' (Maybe Text) +lcpKey = lens _lcpKey (\ s a -> s{_lcpKey = a}) + +-- | The ID of the layer. +lcpId :: Lens' LayersCancelProcessing' Text +lcpId = lens _lcpId (\ s a -> s{_lcpId = a}) + +-- | OAuth 2.0 token for the current user. +lcpOauthToken :: Lens' LayersCancelProcessing' (Maybe Text) +lcpOauthToken + = lens _lcpOauthToken + (\ s a -> s{_lcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcpFields :: Lens' LayersCancelProcessing' (Maybe Text) +lcpFields + = lens _lcpFields (\ s a -> s{_lcpFields = a}) + +-- | Data format for the response. +lcpAlt :: Lens' LayersCancelProcessing' Text +lcpAlt = lens _lcpAlt (\ s a -> s{_lcpAlt = a}) + +instance GoogleRequest LayersCancelProcessing' where + type Rs LayersCancelProcessing' = ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersCancelProcessing{..} + = go _lcpQuotaUser _lcpPrettyPrint _lcpUserIp _lcpKey + _lcpId + _lcpOauthToken + _lcpFields + _lcpAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersCancelProcessingAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Create.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Create.hs new file mode 100644 index 000000000..3ac454706 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Create.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a layer asset. +-- +-- /See:/ for @MapsengineLayersCreate@. +module Mapsengine.Layers.Create + ( + -- * REST Resource + LayersCreateAPI + + -- * Creating a Request + , layersCreate + , LayersCreate + + -- * Request Lenses + , lcQuotaUser + , lcPrettyPrint + , lcUserIp + , lcProcess + , lcKey + , lcOauthToken + , lcFields + , lcAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersCreate@ which the +-- 'LayersCreate' request conforms to. +type LayersCreateAPI = + "layers" :> + QueryParam "process" Bool :> Post '[JSON] Layer + +-- | Create a layer asset. +-- +-- /See:/ 'layersCreate' smart constructor. +data LayersCreate = LayersCreate + { _lcQuotaUser :: !(Maybe Text) + , _lcPrettyPrint :: !Bool + , _lcUserIp :: !(Maybe Text) + , _lcProcess :: !(Maybe Bool) + , _lcKey :: !(Maybe Text) + , _lcOauthToken :: !(Maybe Text) + , _lcFields :: !(Maybe Text) + , _lcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcQuotaUser' +-- +-- * 'lcPrettyPrint' +-- +-- * 'lcUserIp' +-- +-- * 'lcProcess' +-- +-- * 'lcKey' +-- +-- * 'lcOauthToken' +-- +-- * 'lcFields' +-- +-- * 'lcAlt' +layersCreate + :: LayersCreate +layersCreate = + LayersCreate + { _lcQuotaUser = Nothing + , _lcPrettyPrint = True + , _lcUserIp = Nothing + , _lcProcess = Nothing + , _lcKey = Nothing + , _lcOauthToken = Nothing + , _lcFields = Nothing + , _lcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lcQuotaUser :: Lens' LayersCreate' (Maybe Text) +lcQuotaUser + = lens _lcQuotaUser (\ s a -> s{_lcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lcPrettyPrint :: Lens' LayersCreate' Bool +lcPrettyPrint + = lens _lcPrettyPrint + (\ s a -> s{_lcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lcUserIp :: Lens' LayersCreate' (Maybe Text) +lcUserIp = lens _lcUserIp (\ s a -> s{_lcUserIp = a}) + +-- | Whether to queue the created layer for processing. +lcProcess :: Lens' LayersCreate' (Maybe Bool) +lcProcess + = lens _lcProcess (\ s a -> s{_lcProcess = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lcKey :: Lens' LayersCreate' (Maybe Text) +lcKey = lens _lcKey (\ s a -> s{_lcKey = a}) + +-- | OAuth 2.0 token for the current user. +lcOauthToken :: Lens' LayersCreate' (Maybe Text) +lcOauthToken + = lens _lcOauthToken (\ s a -> s{_lcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lcFields :: Lens' LayersCreate' (Maybe Text) +lcFields = lens _lcFields (\ s a -> s{_lcFields = a}) + +-- | Data format for the response. +lcAlt :: Lens' LayersCreate' Text +lcAlt = lens _lcAlt (\ s a -> s{_lcAlt = a}) + +instance GoogleRequest LayersCreate' where + type Rs LayersCreate' = Layer + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersCreate{..} + = go _lcQuotaUser _lcPrettyPrint _lcUserIp _lcProcess + _lcKey + _lcOauthToken + _lcFields + _lcAlt + where go + = clientWithRoute (Proxy :: Proxy LayersCreateAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Delete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Delete.hs new file mode 100644 index 000000000..9c9abac16 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a layer. +-- +-- /See:/ for @MapsengineLayersDelete@. +module Mapsengine.Layers.Delete + ( + -- * REST Resource + LayersDeleteAPI + + -- * Creating a Request + , layersDelete + , LayersDelete + + -- * Request Lenses + , ldQuotaUser + , ldPrettyPrint + , ldUserIp + , ldKey + , ldId + , ldOauthToken + , ldFields + , ldAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersDelete@ which the +-- 'LayersDelete' request conforms to. +type LayersDeleteAPI = + "layers" :> Capture "id" Text :> Delete '[JSON] () + +-- | Delete a layer. +-- +-- /See:/ 'layersDelete' smart constructor. +data LayersDelete = LayersDelete + { _ldQuotaUser :: !(Maybe Text) + , _ldPrettyPrint :: !Bool + , _ldUserIp :: !(Maybe Text) + , _ldKey :: !(Maybe Text) + , _ldId :: !Text + , _ldOauthToken :: !(Maybe Text) + , _ldFields :: !(Maybe Text) + , _ldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldQuotaUser' +-- +-- * 'ldPrettyPrint' +-- +-- * 'ldUserIp' +-- +-- * 'ldKey' +-- +-- * 'ldId' +-- +-- * 'ldOauthToken' +-- +-- * 'ldFields' +-- +-- * 'ldAlt' +layersDelete + :: Text -- ^ 'id' + -> LayersDelete +layersDelete pLdId_ = + LayersDelete + { _ldQuotaUser = Nothing + , _ldPrettyPrint = True + , _ldUserIp = Nothing + , _ldKey = Nothing + , _ldId = pLdId_ + , _ldOauthToken = Nothing + , _ldFields = Nothing + , _ldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ldQuotaUser :: Lens' LayersDelete' (Maybe Text) +ldQuotaUser + = lens _ldQuotaUser (\ s a -> s{_ldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ldPrettyPrint :: Lens' LayersDelete' Bool +ldPrettyPrint + = lens _ldPrettyPrint + (\ s a -> s{_ldPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ldUserIp :: Lens' LayersDelete' (Maybe Text) +ldUserIp = lens _ldUserIp (\ s a -> s{_ldUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ldKey :: Lens' LayersDelete' (Maybe Text) +ldKey = lens _ldKey (\ s a -> s{_ldKey = a}) + +-- | The ID of the layer. Only the layer creator or project owner are +-- permitted to delete. If the layer is published, or included in a map, +-- the request will fail. Unpublish the layer, and remove it from all maps +-- prior to deleting. +ldId :: Lens' LayersDelete' Text +ldId = lens _ldId (\ s a -> s{_ldId = a}) + +-- | OAuth 2.0 token for the current user. +ldOauthToken :: Lens' LayersDelete' (Maybe Text) +ldOauthToken + = lens _ldOauthToken (\ s a -> s{_ldOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ldFields :: Lens' LayersDelete' (Maybe Text) +ldFields = lens _ldFields (\ s a -> s{_ldFields = a}) + +-- | Data format for the response. +ldAlt :: Lens' LayersDelete' Text +ldAlt = lens _ldAlt (\ s a -> s{_ldAlt = a}) + +instance GoogleRequest LayersDelete' where + type Rs LayersDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersDelete{..} + = go _ldQuotaUser _ldPrettyPrint _ldUserIp _ldKey + _ldId + _ldOauthToken + _ldFields + _ldAlt + where go + = clientWithRoute (Proxy :: Proxy LayersDeleteAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Get.hs new file mode 100644 index 000000000..cd51fa3a3 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a particular layer. +-- +-- /See:/ for @MapsengineLayersGet@. +module Mapsengine.Layers.Get + ( + -- * REST Resource + LayersGetAPI + + -- * Creating a Request + , layersGet + , LayersGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgUserIp + , lgKey + , lgVersion + , lgId + , lgOauthToken + , lgFields + , lgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersGet@ which the +-- 'LayersGet' request conforms to. +type LayersGetAPI = + "layers" :> + Capture "id" Text :> + QueryParam "version" Text :> Get '[JSON] Layer + +-- | Return metadata for a particular layer. +-- +-- /See:/ 'layersGet' smart constructor. +data LayersGet = LayersGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgUserIp :: !(Maybe Text) + , _lgKey :: !(Maybe Text) + , _lgVersion :: !(Maybe Text) + , _lgId :: !Text + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgUserIp' +-- +-- * 'lgKey' +-- +-- * 'lgVersion' +-- +-- * 'lgId' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgAlt' +layersGet + :: Text -- ^ 'id' + -> LayersGet +layersGet pLgId_ = + LayersGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgUserIp = Nothing + , _lgKey = Nothing + , _lgVersion = Nothing + , _lgId = pLgId_ + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LayersGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LayersGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LayersGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LayersGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | Deprecated: The version parameter indicates which version of the layer +-- should be returned. When version is set to published, the published +-- version of the layer will be returned. Please use the +-- layers.getPublished endpoint instead. +lgVersion :: Lens' LayersGet' (Maybe Text) +lgVersion + = lens _lgVersion (\ s a -> s{_lgVersion = a}) + +-- | The ID of the layer. +lgId :: Lens' LayersGet' Text +lgId = lens _lgId (\ s a -> s{_lgId = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LayersGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LayersGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | Data format for the response. +lgAlt :: Lens' LayersGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LayersGet' where + type Rs LayersGet' = Layer + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgUserIp _lgKey + _lgVersion + _lgId + _lgOauthToken + _lgFields + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LayersGetAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/GetPublished.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/GetPublished.hs new file mode 100644 index 000000000..525c03f8e --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/GetPublished.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.GetPublished +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return the published metadata for a particular layer. +-- +-- /See:/ for @MapsengineLayersGetPublished@. +module Mapsengine.Layers.GetPublished + ( + -- * REST Resource + LayersGetPublishedAPI + + -- * Creating a Request + , layersGetPublished + , LayersGetPublished + + -- * Request Lenses + , lgpQuotaUser + , lgpPrettyPrint + , lgpUserIp + , lgpKey + , lgpId + , lgpOauthToken + , lgpFields + , lgpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersGetPublished@ which the +-- 'LayersGetPublished' request conforms to. +type LayersGetPublishedAPI = + "layers" :> + Capture "id" Text :> + "published" :> Get '[JSON] PublishedLayer + +-- | Return the published metadata for a particular layer. +-- +-- /See:/ 'layersGetPublished' smart constructor. +data LayersGetPublished = LayersGetPublished + { _lgpQuotaUser :: !(Maybe Text) + , _lgpPrettyPrint :: !Bool + , _lgpUserIp :: !(Maybe Text) + , _lgpKey :: !(Maybe Text) + , _lgpId :: !Text + , _lgpOauthToken :: !(Maybe Text) + , _lgpFields :: !(Maybe Text) + , _lgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersGetPublished'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgpQuotaUser' +-- +-- * 'lgpPrettyPrint' +-- +-- * 'lgpUserIp' +-- +-- * 'lgpKey' +-- +-- * 'lgpId' +-- +-- * 'lgpOauthToken' +-- +-- * 'lgpFields' +-- +-- * 'lgpAlt' +layersGetPublished + :: Text -- ^ 'id' + -> LayersGetPublished +layersGetPublished pLgpId_ = + LayersGetPublished + { _lgpQuotaUser = Nothing + , _lgpPrettyPrint = True + , _lgpUserIp = Nothing + , _lgpKey = Nothing + , _lgpId = pLgpId_ + , _lgpOauthToken = Nothing + , _lgpFields = Nothing + , _lgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgpQuotaUser :: Lens' LayersGetPublished' (Maybe Text) +lgpQuotaUser + = lens _lgpQuotaUser (\ s a -> s{_lgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgpPrettyPrint :: Lens' LayersGetPublished' Bool +lgpPrettyPrint + = lens _lgpPrettyPrint + (\ s a -> s{_lgpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgpUserIp :: Lens' LayersGetPublished' (Maybe Text) +lgpUserIp + = lens _lgpUserIp (\ s a -> s{_lgpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgpKey :: Lens' LayersGetPublished' (Maybe Text) +lgpKey = lens _lgpKey (\ s a -> s{_lgpKey = a}) + +-- | The ID of the layer. +lgpId :: Lens' LayersGetPublished' Text +lgpId = lens _lgpId (\ s a -> s{_lgpId = a}) + +-- | OAuth 2.0 token for the current user. +lgpOauthToken :: Lens' LayersGetPublished' (Maybe Text) +lgpOauthToken + = lens _lgpOauthToken + (\ s a -> s{_lgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgpFields :: Lens' LayersGetPublished' (Maybe Text) +lgpFields + = lens _lgpFields (\ s a -> s{_lgpFields = a}) + +-- | Data format for the response. +lgpAlt :: Lens' LayersGetPublished' Text +lgpAlt = lens _lgpAlt (\ s a -> s{_lgpAlt = a}) + +instance GoogleRequest LayersGetPublished' where + type Rs LayersGetPublished' = PublishedLayer + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersGetPublished{..} + = go _lgpQuotaUser _lgpPrettyPrint _lgpUserIp _lgpKey + _lgpId + _lgpOauthToken + _lgpFields + _lgpAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersGetPublishedAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/List.hs new file mode 100644 index 000000000..d490ff5e0 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/List.hs @@ -0,0 +1,312 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all layers readable by the current user. +-- +-- /See:/ for @MapsengineLayersList@. +module Mapsengine.Layers.List + ( + -- * REST Resource + LayersListAPI + + -- * Creating a Request + , layersList + , LayersList + + -- * Request Lenses + , llCreatedAfter + , llQuotaUser + , llPrettyPrint + , llUserIp + , llCreatorEmail + , llRole + , llKey + , llBbox + , llProcessingStatus + , llModifiedAfter + , llModifiedBefore + , llPageToken + , llProjectId + , llOauthToken + , llSearch + , llMaxResults + , llTags + , llFields + , llCreatedBefore + , llAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersList@ which the +-- 'LayersList' request conforms to. +type LayersListAPI = + "layers" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "processingStatus" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] LayersListResponse + +-- | Return all layers readable by the current user. +-- +-- /See:/ 'layersList' smart constructor. +data LayersList = LayersList + { _llCreatedAfter :: !(Maybe UTCTime) + , _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llUserIp :: !(Maybe Text) + , _llCreatorEmail :: !(Maybe Text) + , _llRole :: !(Maybe Text) + , _llKey :: !(Maybe Text) + , _llBbox :: !(Maybe Text) + , _llProcessingStatus :: !(Maybe Text) + , _llModifiedAfter :: !(Maybe UTCTime) + , _llModifiedBefore :: !(Maybe UTCTime) + , _llPageToken :: !(Maybe Text) + , _llProjectId :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llSearch :: !(Maybe Text) + , _llMaxResults :: !(Maybe Word32) + , _llTags :: !(Maybe Text) + , _llFields :: !(Maybe Text) + , _llCreatedBefore :: !(Maybe UTCTime) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llCreatedAfter' +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llUserIp' +-- +-- * 'llCreatorEmail' +-- +-- * 'llRole' +-- +-- * 'llKey' +-- +-- * 'llBbox' +-- +-- * 'llProcessingStatus' +-- +-- * 'llModifiedAfter' +-- +-- * 'llModifiedBefore' +-- +-- * 'llPageToken' +-- +-- * 'llProjectId' +-- +-- * 'llOauthToken' +-- +-- * 'llSearch' +-- +-- * 'llMaxResults' +-- +-- * 'llTags' +-- +-- * 'llFields' +-- +-- * 'llCreatedBefore' +-- +-- * 'llAlt' +layersList + :: LayersList +layersList = + LayersList + { _llCreatedAfter = Nothing + , _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llUserIp = Nothing + , _llCreatorEmail = Nothing + , _llRole = Nothing + , _llKey = Nothing + , _llBbox = Nothing + , _llProcessingStatus = Nothing + , _llModifiedAfter = Nothing + , _llModifiedBefore = Nothing + , _llPageToken = Nothing + , _llProjectId = Nothing + , _llOauthToken = Nothing + , _llSearch = Nothing + , _llMaxResults = Nothing + , _llTags = Nothing + , _llFields = Nothing + , _llCreatedBefore = Nothing + , _llAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +llCreatedAfter :: Lens' LayersList' (Maybe UTCTime) +llCreatedAfter + = lens _llCreatedAfter + (\ s a -> s{_llCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LayersList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LayersList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LayersList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +llCreatorEmail :: Lens' LayersList' (Maybe Text) +llCreatorEmail + = lens _llCreatorEmail + (\ s a -> s{_llCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +llRole :: Lens' LayersList' (Maybe Text) +llRole = lens _llRole (\ s a -> s{_llRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LayersList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +llBbox :: Lens' LayersList' (Maybe Text) +llBbox = lens _llBbox (\ s a -> s{_llBbox = a}) + +llProcessingStatus :: Lens' LayersList' (Maybe Text) +llProcessingStatus + = lens _llProcessingStatus + (\ s a -> s{_llProcessingStatus = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +llModifiedAfter :: Lens' LayersList' (Maybe UTCTime) +llModifiedAfter + = lens _llModifiedAfter + (\ s a -> s{_llModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +llModifiedBefore :: Lens' LayersList' (Maybe UTCTime) +llModifiedBefore + = lens _llModifiedBefore + (\ s a -> s{_llModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +llPageToken :: Lens' LayersList' (Maybe Text) +llPageToken + = lens _llPageToken (\ s a -> s{_llPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +llProjectId :: Lens' LayersList' (Maybe Text) +llProjectId + = lens _llProjectId (\ s a -> s{_llProjectId = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LayersList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +llSearch :: Lens' LayersList' (Maybe Text) +llSearch = lens _llSearch (\ s a -> s{_llSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +llMaxResults :: Lens' LayersList' (Maybe Word32) +llMaxResults + = lens _llMaxResults (\ s a -> s{_llMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +llTags :: Lens' LayersList' (Maybe Text) +llTags = lens _llTags (\ s a -> s{_llTags = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LayersList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +llCreatedBefore :: Lens' LayersList' (Maybe UTCTime) +llCreatedBefore + = lens _llCreatedBefore + (\ s a -> s{_llCreatedBefore = a}) + +-- | Data format for the response. +llAlt :: Lens' LayersList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LayersList' where + type Rs LayersList' = LayersListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersList{..} + = go _llCreatedAfter _llQuotaUser _llPrettyPrint + _llUserIp + _llCreatorEmail + _llRole + _llKey + _llBbox + _llProcessingStatus + _llModifiedAfter + _llModifiedBefore + _llPageToken + _llProjectId + _llOauthToken + _llSearch + _llMaxResults + _llTags + _llFields + _llCreatedBefore + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LayersListAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/ListPublished.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/ListPublished.hs new file mode 100644 index 000000000..c32092bc2 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/ListPublished.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.ListPublished +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all published layers readable by the current user. +-- +-- /See:/ for @MapsengineLayersListPublished@. +module Mapsengine.Layers.ListPublished + ( + -- * REST Resource + LayersListPublishedAPI + + -- * Creating a Request + , layersListPublished + , LayersListPublished + + -- * Request Lenses + , llpQuotaUser + , llpPrettyPrint + , llpUserIp + , llpKey + , llpPageToken + , llpProjectId + , llpOauthToken + , llpMaxResults + , llpFields + , llpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersListPublished@ which the +-- 'LayersListPublished' request conforms to. +type LayersListPublishedAPI = + "layers" :> + "published" :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PublishedLayersListResponse + +-- | Return all published layers readable by the current user. +-- +-- /See:/ 'layersListPublished' smart constructor. +data LayersListPublished = LayersListPublished + { _llpQuotaUser :: !(Maybe Text) + , _llpPrettyPrint :: !Bool + , _llpUserIp :: !(Maybe Text) + , _llpKey :: !(Maybe Text) + , _llpPageToken :: !(Maybe Text) + , _llpProjectId :: !(Maybe Text) + , _llpOauthToken :: !(Maybe Text) + , _llpMaxResults :: !(Maybe Word32) + , _llpFields :: !(Maybe Text) + , _llpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersListPublished'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llpQuotaUser' +-- +-- * 'llpPrettyPrint' +-- +-- * 'llpUserIp' +-- +-- * 'llpKey' +-- +-- * 'llpPageToken' +-- +-- * 'llpProjectId' +-- +-- * 'llpOauthToken' +-- +-- * 'llpMaxResults' +-- +-- * 'llpFields' +-- +-- * 'llpAlt' +layersListPublished + :: LayersListPublished +layersListPublished = + LayersListPublished + { _llpQuotaUser = Nothing + , _llpPrettyPrint = True + , _llpUserIp = Nothing + , _llpKey = Nothing + , _llpPageToken = Nothing + , _llpProjectId = Nothing + , _llpOauthToken = Nothing + , _llpMaxResults = Nothing + , _llpFields = Nothing + , _llpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llpQuotaUser :: Lens' LayersListPublished' (Maybe Text) +llpQuotaUser + = lens _llpQuotaUser (\ s a -> s{_llpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llpPrettyPrint :: Lens' LayersListPublished' Bool +llpPrettyPrint + = lens _llpPrettyPrint + (\ s a -> s{_llpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llpUserIp :: Lens' LayersListPublished' (Maybe Text) +llpUserIp + = lens _llpUserIp (\ s a -> s{_llpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llpKey :: Lens' LayersListPublished' (Maybe Text) +llpKey = lens _llpKey (\ s a -> s{_llpKey = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +llpPageToken :: Lens' LayersListPublished' (Maybe Text) +llpPageToken + = lens _llpPageToken (\ s a -> s{_llpPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +llpProjectId :: Lens' LayersListPublished' (Maybe Text) +llpProjectId + = lens _llpProjectId (\ s a -> s{_llpProjectId = a}) + +-- | OAuth 2.0 token for the current user. +llpOauthToken :: Lens' LayersListPublished' (Maybe Text) +llpOauthToken + = lens _llpOauthToken + (\ s a -> s{_llpOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +llpMaxResults :: Lens' LayersListPublished' (Maybe Word32) +llpMaxResults + = lens _llpMaxResults + (\ s a -> s{_llpMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +llpFields :: Lens' LayersListPublished' (Maybe Text) +llpFields + = lens _llpFields (\ s a -> s{_llpFields = a}) + +-- | Data format for the response. +llpAlt :: Lens' LayersListPublished' Text +llpAlt = lens _llpAlt (\ s a -> s{_llpAlt = a}) + +instance GoogleRequest LayersListPublished' where + type Rs LayersListPublished' = + PublishedLayersListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersListPublished{..} + = go _llpQuotaUser _llpPrettyPrint _llpUserIp _llpKey + _llpPageToken + _llpProjectId + _llpOauthToken + _llpMaxResults + _llpFields + _llpAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersListPublishedAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Parents/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Parents/List.hs new file mode 100644 index 000000000..318911b26 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Parents/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all parent ids of the specified layer. +-- +-- /See:/ for @MapsengineLayersParentsList@. +module Mapsengine.Layers.Parents.List + ( + -- * REST Resource + LayersParentsListAPI + + -- * Creating a Request + , layersParentsList + , LayersParentsList + + -- * Request Lenses + , lplQuotaUser + , lplPrettyPrint + , lplUserIp + , lplKey + , lplId + , lplPageToken + , lplOauthToken + , lplMaxResults + , lplFields + , lplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersParentsList@ which the +-- 'LayersParentsList' request conforms to. +type LayersParentsListAPI = + "layers" :> + Capture "id" Text :> + "parents" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ParentsListResponse + +-- | Return all parent ids of the specified layer. +-- +-- /See:/ 'layersParentsList' smart constructor. +data LayersParentsList = LayersParentsList + { _lplQuotaUser :: !(Maybe Text) + , _lplPrettyPrint :: !Bool + , _lplUserIp :: !(Maybe Text) + , _lplKey :: !(Maybe Text) + , _lplId :: !Text + , _lplPageToken :: !(Maybe Text) + , _lplOauthToken :: !(Maybe Text) + , _lplMaxResults :: !(Maybe Word32) + , _lplFields :: !(Maybe Text) + , _lplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lplQuotaUser' +-- +-- * 'lplPrettyPrint' +-- +-- * 'lplUserIp' +-- +-- * 'lplKey' +-- +-- * 'lplId' +-- +-- * 'lplPageToken' +-- +-- * 'lplOauthToken' +-- +-- * 'lplMaxResults' +-- +-- * 'lplFields' +-- +-- * 'lplAlt' +layersParentsList + :: Text -- ^ 'id' + -> LayersParentsList +layersParentsList pLplId_ = + LayersParentsList + { _lplQuotaUser = Nothing + , _lplPrettyPrint = True + , _lplUserIp = Nothing + , _lplKey = Nothing + , _lplId = pLplId_ + , _lplPageToken = Nothing + , _lplOauthToken = Nothing + , _lplMaxResults = Nothing + , _lplFields = Nothing + , _lplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lplQuotaUser :: Lens' LayersParentsList' (Maybe Text) +lplQuotaUser + = lens _lplQuotaUser (\ s a -> s{_lplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lplPrettyPrint :: Lens' LayersParentsList' Bool +lplPrettyPrint + = lens _lplPrettyPrint + (\ s a -> s{_lplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lplUserIp :: Lens' LayersParentsList' (Maybe Text) +lplUserIp + = lens _lplUserIp (\ s a -> s{_lplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lplKey :: Lens' LayersParentsList' (Maybe Text) +lplKey = lens _lplKey (\ s a -> s{_lplKey = a}) + +-- | The ID of the layer whose parents will be listed. +lplId :: Lens' LayersParentsList' Text +lplId = lens _lplId (\ s a -> s{_lplId = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +lplPageToken :: Lens' LayersParentsList' (Maybe Text) +lplPageToken + = lens _lplPageToken (\ s a -> s{_lplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lplOauthToken :: Lens' LayersParentsList' (Maybe Text) +lplOauthToken + = lens _lplOauthToken + (\ s a -> s{_lplOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +lplMaxResults :: Lens' LayersParentsList' (Maybe Word32) +lplMaxResults + = lens _lplMaxResults + (\ s a -> s{_lplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lplFields :: Lens' LayersParentsList' (Maybe Text) +lplFields + = lens _lplFields (\ s a -> s{_lplFields = a}) + +-- | Data format for the response. +lplAlt :: Lens' LayersParentsList' Text +lplAlt = lens _lplAlt (\ s a -> s{_lplAlt = a}) + +instance GoogleRequest LayersParentsList' where + type Rs LayersParentsList' = ParentsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersParentsList{..} + = go _lplQuotaUser _lplPrettyPrint _lplUserIp _lplKey + _lplId + _lplPageToken + _lplOauthToken + _lplMaxResults + _lplFields + _lplAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersParentsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Patch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Patch.hs new file mode 100644 index 000000000..ae5b1f1a7 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Mutate a layer asset. +-- +-- /See:/ for @MapsengineLayersPatch@. +module Mapsengine.Layers.Patch + ( + -- * REST Resource + LayersPatchAPI + + -- * Creating a Request + , layersPatch + , LayersPatch + + -- * Request Lenses + , lppQuotaUser + , lppPrettyPrint + , lppUserIp + , lppKey + , lppId + , lppOauthToken + , lppFields + , lppAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersPatch@ which the +-- 'LayersPatch' request conforms to. +type LayersPatchAPI = + "layers" :> Capture "id" Text :> Patch '[JSON] () + +-- | Mutate a layer asset. +-- +-- /See:/ 'layersPatch' smart constructor. +data LayersPatch = LayersPatch + { _lppQuotaUser :: !(Maybe Text) + , _lppPrettyPrint :: !Bool + , _lppUserIp :: !(Maybe Text) + , _lppKey :: !(Maybe Text) + , _lppId :: !Text + , _lppOauthToken :: !(Maybe Text) + , _lppFields :: !(Maybe Text) + , _lppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lppQuotaUser' +-- +-- * 'lppPrettyPrint' +-- +-- * 'lppUserIp' +-- +-- * 'lppKey' +-- +-- * 'lppId' +-- +-- * 'lppOauthToken' +-- +-- * 'lppFields' +-- +-- * 'lppAlt' +layersPatch + :: Text -- ^ 'id' + -> LayersPatch +layersPatch pLppId_ = + LayersPatch + { _lppQuotaUser = Nothing + , _lppPrettyPrint = True + , _lppUserIp = Nothing + , _lppKey = Nothing + , _lppId = pLppId_ + , _lppOauthToken = Nothing + , _lppFields = Nothing + , _lppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lppQuotaUser :: Lens' LayersPatch' (Maybe Text) +lppQuotaUser + = lens _lppQuotaUser (\ s a -> s{_lppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lppPrettyPrint :: Lens' LayersPatch' Bool +lppPrettyPrint + = lens _lppPrettyPrint + (\ s a -> s{_lppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lppUserIp :: Lens' LayersPatch' (Maybe Text) +lppUserIp + = lens _lppUserIp (\ s a -> s{_lppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lppKey :: Lens' LayersPatch' (Maybe Text) +lppKey = lens _lppKey (\ s a -> s{_lppKey = a}) + +-- | The ID of the layer. +lppId :: Lens' LayersPatch' Text +lppId = lens _lppId (\ s a -> s{_lppId = a}) + +-- | OAuth 2.0 token for the current user. +lppOauthToken :: Lens' LayersPatch' (Maybe Text) +lppOauthToken + = lens _lppOauthToken + (\ s a -> s{_lppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lppFields :: Lens' LayersPatch' (Maybe Text) +lppFields + = lens _lppFields (\ s a -> s{_lppFields = a}) + +-- | Data format for the response. +lppAlt :: Lens' LayersPatch' Text +lppAlt = lens _lppAlt (\ s a -> s{_lppAlt = a}) + +instance GoogleRequest LayersPatch' where + type Rs LayersPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersPatch{..} + = go _lppQuotaUser _lppPrettyPrint _lppUserIp _lppKey + _lppId + _lppOauthToken + _lppFields + _lppAlt + where go + = clientWithRoute (Proxy :: Proxy LayersPatchAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchDelete.hs new file mode 100644 index 000000000..fa89ffdd3 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchDelete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Permissions.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ for @MapsengineLayersPermissionsBatchDelete@. +module Mapsengine.Layers.Permissions.BatchDelete + ( + -- * REST Resource + LayersPermissionsBatchDeleteAPI + + -- * Creating a Request + , layersPermissionsBatchDelete + , LayersPermissionsBatchDelete + + -- * Request Lenses + , lpbdQuotaUser + , lpbdPrettyPrint + , lpbdUserIp + , lpbdKey + , lpbdId + , lpbdOauthToken + , lpbdFields + , lpbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersPermissionsBatchDelete@ which the +-- 'LayersPermissionsBatchDelete' request conforms to. +type LayersPermissionsBatchDeleteAPI = + "layers" :> + Capture "id" Text :> + "permissions" :> + "batchDelete" :> + Post '[JSON] PermissionsBatchDeleteResponse + +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ 'layersPermissionsBatchDelete' smart constructor. +data LayersPermissionsBatchDelete = LayersPermissionsBatchDelete + { _lpbdQuotaUser :: !(Maybe Text) + , _lpbdPrettyPrint :: !Bool + , _lpbdUserIp :: !(Maybe Text) + , _lpbdKey :: !(Maybe Text) + , _lpbdId :: !Text + , _lpbdOauthToken :: !(Maybe Text) + , _lpbdFields :: !(Maybe Text) + , _lpbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersPermissionsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpbdQuotaUser' +-- +-- * 'lpbdPrettyPrint' +-- +-- * 'lpbdUserIp' +-- +-- * 'lpbdKey' +-- +-- * 'lpbdId' +-- +-- * 'lpbdOauthToken' +-- +-- * 'lpbdFields' +-- +-- * 'lpbdAlt' +layersPermissionsBatchDelete + :: Text -- ^ 'id' + -> LayersPermissionsBatchDelete +layersPermissionsBatchDelete pLpbdId_ = + LayersPermissionsBatchDelete + { _lpbdQuotaUser = Nothing + , _lpbdPrettyPrint = True + , _lpbdUserIp = Nothing + , _lpbdKey = Nothing + , _lpbdId = pLpbdId_ + , _lpbdOauthToken = Nothing + , _lpbdFields = Nothing + , _lpbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpbdQuotaUser :: Lens' LayersPermissionsBatchDelete' (Maybe Text) +lpbdQuotaUser + = lens _lpbdQuotaUser + (\ s a -> s{_lpbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpbdPrettyPrint :: Lens' LayersPermissionsBatchDelete' Bool +lpbdPrettyPrint + = lens _lpbdPrettyPrint + (\ s a -> s{_lpbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpbdUserIp :: Lens' LayersPermissionsBatchDelete' (Maybe Text) +lpbdUserIp + = lens _lpbdUserIp (\ s a -> s{_lpbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpbdKey :: Lens' LayersPermissionsBatchDelete' (Maybe Text) +lpbdKey = lens _lpbdKey (\ s a -> s{_lpbdKey = a}) + +-- | The ID of the asset from which permissions will be removed. +lpbdId :: Lens' LayersPermissionsBatchDelete' Text +lpbdId = lens _lpbdId (\ s a -> s{_lpbdId = a}) + +-- | OAuth 2.0 token for the current user. +lpbdOauthToken :: Lens' LayersPermissionsBatchDelete' (Maybe Text) +lpbdOauthToken + = lens _lpbdOauthToken + (\ s a -> s{_lpbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpbdFields :: Lens' LayersPermissionsBatchDelete' (Maybe Text) +lpbdFields + = lens _lpbdFields (\ s a -> s{_lpbdFields = a}) + +-- | Data format for the response. +lpbdAlt :: Lens' LayersPermissionsBatchDelete' Text +lpbdAlt = lens _lpbdAlt (\ s a -> s{_lpbdAlt = a}) + +instance GoogleRequest LayersPermissionsBatchDelete' + where + type Rs LayersPermissionsBatchDelete' = + PermissionsBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersPermissionsBatchDelete{..} + = go _lpbdQuotaUser _lpbdPrettyPrint _lpbdUserIp + _lpbdKey + _lpbdId + _lpbdOauthToken + _lpbdFields + _lpbdAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersPermissionsBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchUpdate.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchUpdate.hs new file mode 100644 index 000000000..2566e21e0 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/BatchUpdate.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Permissions.BatchUpdate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ for @MapsengineLayersPermissionsBatchUpdate@. +module Mapsengine.Layers.Permissions.BatchUpdate + ( + -- * REST Resource + LayersPermissionsBatchUpdateAPI + + -- * Creating a Request + , layersPermissionsBatchUpdate + , LayersPermissionsBatchUpdate + + -- * Request Lenses + , lpbuQuotaUser + , lpbuPrettyPrint + , lpbuUserIp + , lpbuKey + , lpbuId + , lpbuOauthToken + , lpbuFields + , lpbuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersPermissionsBatchUpdate@ which the +-- 'LayersPermissionsBatchUpdate' request conforms to. +type LayersPermissionsBatchUpdateAPI = + "layers" :> + Capture "id" Text :> + "permissions" :> + "batchUpdate" :> + Post '[JSON] PermissionsBatchUpdateResponse + +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ 'layersPermissionsBatchUpdate' smart constructor. +data LayersPermissionsBatchUpdate = LayersPermissionsBatchUpdate + { _lpbuQuotaUser :: !(Maybe Text) + , _lpbuPrettyPrint :: !Bool + , _lpbuUserIp :: !(Maybe Text) + , _lpbuKey :: !(Maybe Text) + , _lpbuId :: !Text + , _lpbuOauthToken :: !(Maybe Text) + , _lpbuFields :: !(Maybe Text) + , _lpbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersPermissionsBatchUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpbuQuotaUser' +-- +-- * 'lpbuPrettyPrint' +-- +-- * 'lpbuUserIp' +-- +-- * 'lpbuKey' +-- +-- * 'lpbuId' +-- +-- * 'lpbuOauthToken' +-- +-- * 'lpbuFields' +-- +-- * 'lpbuAlt' +layersPermissionsBatchUpdate + :: Text -- ^ 'id' + -> LayersPermissionsBatchUpdate +layersPermissionsBatchUpdate pLpbuId_ = + LayersPermissionsBatchUpdate + { _lpbuQuotaUser = Nothing + , _lpbuPrettyPrint = True + , _lpbuUserIp = Nothing + , _lpbuKey = Nothing + , _lpbuId = pLpbuId_ + , _lpbuOauthToken = Nothing + , _lpbuFields = Nothing + , _lpbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpbuQuotaUser :: Lens' LayersPermissionsBatchUpdate' (Maybe Text) +lpbuQuotaUser + = lens _lpbuQuotaUser + (\ s a -> s{_lpbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpbuPrettyPrint :: Lens' LayersPermissionsBatchUpdate' Bool +lpbuPrettyPrint + = lens _lpbuPrettyPrint + (\ s a -> s{_lpbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpbuUserIp :: Lens' LayersPermissionsBatchUpdate' (Maybe Text) +lpbuUserIp + = lens _lpbuUserIp (\ s a -> s{_lpbuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpbuKey :: Lens' LayersPermissionsBatchUpdate' (Maybe Text) +lpbuKey = lens _lpbuKey (\ s a -> s{_lpbuKey = a}) + +-- | The ID of the asset to which permissions will be added. +lpbuId :: Lens' LayersPermissionsBatchUpdate' Text +lpbuId = lens _lpbuId (\ s a -> s{_lpbuId = a}) + +-- | OAuth 2.0 token for the current user. +lpbuOauthToken :: Lens' LayersPermissionsBatchUpdate' (Maybe Text) +lpbuOauthToken + = lens _lpbuOauthToken + (\ s a -> s{_lpbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpbuFields :: Lens' LayersPermissionsBatchUpdate' (Maybe Text) +lpbuFields + = lens _lpbuFields (\ s a -> s{_lpbuFields = a}) + +-- | Data format for the response. +lpbuAlt :: Lens' LayersPermissionsBatchUpdate' Text +lpbuAlt = lens _lpbuAlt (\ s a -> s{_lpbuAlt = a}) + +instance GoogleRequest LayersPermissionsBatchUpdate' + where + type Rs LayersPermissionsBatchUpdate' = + PermissionsBatchUpdateResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersPermissionsBatchUpdate{..} + = go _lpbuQuotaUser _lpbuPrettyPrint _lpbuUserIp + _lpbuKey + _lpbuId + _lpbuOauthToken + _lpbuFields + _lpbuAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersPermissionsBatchUpdateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/List.hs new file mode 100644 index 000000000..7b107b27e --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Permissions/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineLayersPermissionsList@. +module Mapsengine.Layers.Permissions.List + ( + -- * REST Resource + LayersPermissionsListAPI + + -- * Creating a Request + , layersPermissionsList + , LayersPermissionsList + + -- * Request Lenses + , layQuotaUser + , layPrettyPrint + , layUserIp + , layKey + , layId + , layOauthToken + , layFields + , layAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersPermissionsList@ which the +-- 'LayersPermissionsList' request conforms to. +type LayersPermissionsListAPI = + "layers" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'layersPermissionsList' smart constructor. +data LayersPermissionsList = LayersPermissionsList + { _layQuotaUser :: !(Maybe Text) + , _layPrettyPrint :: !Bool + , _layUserIp :: !(Maybe Text) + , _layKey :: !(Maybe Text) + , _layId :: !Text + , _layOauthToken :: !(Maybe Text) + , _layFields :: !(Maybe Text) + , _layAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'layQuotaUser' +-- +-- * 'layPrettyPrint' +-- +-- * 'layUserIp' +-- +-- * 'layKey' +-- +-- * 'layId' +-- +-- * 'layOauthToken' +-- +-- * 'layFields' +-- +-- * 'layAlt' +layersPermissionsList + :: Text -- ^ 'id' + -> LayersPermissionsList +layersPermissionsList pLayId_ = + LayersPermissionsList + { _layQuotaUser = Nothing + , _layPrettyPrint = True + , _layUserIp = Nothing + , _layKey = Nothing + , _layId = pLayId_ + , _layOauthToken = Nothing + , _layFields = Nothing + , _layAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +layQuotaUser :: Lens' LayersPermissionsList' (Maybe Text) +layQuotaUser + = lens _layQuotaUser (\ s a -> s{_layQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +layPrettyPrint :: Lens' LayersPermissionsList' Bool +layPrettyPrint + = lens _layPrettyPrint + (\ s a -> s{_layPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +layUserIp :: Lens' LayersPermissionsList' (Maybe Text) +layUserIp + = lens _layUserIp (\ s a -> s{_layUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +layKey :: Lens' LayersPermissionsList' (Maybe Text) +layKey = lens _layKey (\ s a -> s{_layKey = a}) + +-- | The ID of the asset whose permissions will be listed. +layId :: Lens' LayersPermissionsList' Text +layId = lens _layId (\ s a -> s{_layId = a}) + +-- | OAuth 2.0 token for the current user. +layOauthToken :: Lens' LayersPermissionsList' (Maybe Text) +layOauthToken + = lens _layOauthToken + (\ s a -> s{_layOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +layFields :: Lens' LayersPermissionsList' (Maybe Text) +layFields + = lens _layFields (\ s a -> s{_layFields = a}) + +-- | Data format for the response. +layAlt :: Lens' LayersPermissionsList' Text +layAlt = lens _layAlt (\ s a -> s{_layAlt = a}) + +instance GoogleRequest LayersPermissionsList' where + type Rs LayersPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersPermissionsList{..} + = go _layQuotaUser _layPrettyPrint _layUserIp _layKey + _layId + _layOauthToken + _layFields + _layAlt + where go + = clientWithRoute + (Proxy :: Proxy LayersPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Process.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Process.hs new file mode 100644 index 000000000..f55cc5b71 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Process.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Process +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Process a layer asset. +-- +-- /See:/ for @MapsengineLayersProcess@. +module Mapsengine.Layers.Process + ( + -- * REST Resource + LayersProcessAPI + + -- * Creating a Request + , layersProcess + , LayersProcess + + -- * Request Lenses + , lpQuotaUser + , lpPrettyPrint + , lpUserIp + , lpKey + , lpId + , lpOauthToken + , lpFields + , lpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersProcess@ which the +-- 'LayersProcess' request conforms to. +type LayersProcessAPI = + "layers" :> + Capture "id" Text :> + "process" :> Post '[JSON] ProcessResponse + +-- | Process a layer asset. +-- +-- /See:/ 'layersProcess' smart constructor. +data LayersProcess = LayersProcess + { _lpQuotaUser :: !(Maybe Text) + , _lpPrettyPrint :: !Bool + , _lpUserIp :: !(Maybe Text) + , _lpKey :: !(Maybe Text) + , _lpId :: !Text + , _lpOauthToken :: !(Maybe Text) + , _lpFields :: !(Maybe Text) + , _lpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersProcess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpQuotaUser' +-- +-- * 'lpPrettyPrint' +-- +-- * 'lpUserIp' +-- +-- * 'lpKey' +-- +-- * 'lpId' +-- +-- * 'lpOauthToken' +-- +-- * 'lpFields' +-- +-- * 'lpAlt' +layersProcess + :: Text -- ^ 'id' + -> LayersProcess +layersProcess pLpId_ = + LayersProcess + { _lpQuotaUser = Nothing + , _lpPrettyPrint = True + , _lpUserIp = Nothing + , _lpKey = Nothing + , _lpId = pLpId_ + , _lpOauthToken = Nothing + , _lpFields = Nothing + , _lpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lpQuotaUser :: Lens' LayersProcess' (Maybe Text) +lpQuotaUser + = lens _lpQuotaUser (\ s a -> s{_lpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lpPrettyPrint :: Lens' LayersProcess' Bool +lpPrettyPrint + = lens _lpPrettyPrint + (\ s a -> s{_lpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lpUserIp :: Lens' LayersProcess' (Maybe Text) +lpUserIp = lens _lpUserIp (\ s a -> s{_lpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lpKey :: Lens' LayersProcess' (Maybe Text) +lpKey = lens _lpKey (\ s a -> s{_lpKey = a}) + +-- | The ID of the layer. +lpId :: Lens' LayersProcess' Text +lpId = lens _lpId (\ s a -> s{_lpId = a}) + +-- | OAuth 2.0 token for the current user. +lpOauthToken :: Lens' LayersProcess' (Maybe Text) +lpOauthToken + = lens _lpOauthToken (\ s a -> s{_lpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lpFields :: Lens' LayersProcess' (Maybe Text) +lpFields = lens _lpFields (\ s a -> s{_lpFields = a}) + +-- | Data format for the response. +lpAlt :: Lens' LayersProcess' Text +lpAlt = lens _lpAlt (\ s a -> s{_lpAlt = a}) + +instance GoogleRequest LayersProcess' where + type Rs LayersProcess' = ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersProcess{..} + = go _lpQuotaUser _lpPrettyPrint _lpUserIp _lpKey + _lpId + _lpOauthToken + _lpFields + _lpAlt + where go + = clientWithRoute (Proxy :: Proxy LayersProcessAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Publish.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Publish.hs new file mode 100644 index 000000000..61925bef2 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Publish.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Publish a layer asset. +-- +-- /See:/ for @MapsengineLayersPublish@. +module Mapsengine.Layers.Publish + ( + -- * REST Resource + LayersPublishAPI + + -- * Creating a Request + , layersPublish + , LayersPublish + + -- * Request Lenses + , layaQuotaUser + , layaPrettyPrint + , layaForce + , layaUserIp + , layaKey + , layaId + , layaOauthToken + , layaFields + , layaAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersPublish@ which the +-- 'LayersPublish' request conforms to. +type LayersPublishAPI = + "layers" :> + Capture "id" Text :> + "publish" :> + QueryParam "force" Bool :> + Post '[JSON] PublishResponse + +-- | Publish a layer asset. +-- +-- /See:/ 'layersPublish' smart constructor. +data LayersPublish = LayersPublish + { _layaQuotaUser :: !(Maybe Text) + , _layaPrettyPrint :: !Bool + , _layaForce :: !(Maybe Bool) + , _layaUserIp :: !(Maybe Text) + , _layaKey :: !(Maybe Text) + , _layaId :: !Text + , _layaOauthToken :: !(Maybe Text) + , _layaFields :: !(Maybe Text) + , _layaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'layaQuotaUser' +-- +-- * 'layaPrettyPrint' +-- +-- * 'layaForce' +-- +-- * 'layaUserIp' +-- +-- * 'layaKey' +-- +-- * 'layaId' +-- +-- * 'layaOauthToken' +-- +-- * 'layaFields' +-- +-- * 'layaAlt' +layersPublish + :: Text -- ^ 'id' + -> LayersPublish +layersPublish pLayaId_ = + LayersPublish + { _layaQuotaUser = Nothing + , _layaPrettyPrint = True + , _layaForce = Nothing + , _layaUserIp = Nothing + , _layaKey = Nothing + , _layaId = pLayaId_ + , _layaOauthToken = Nothing + , _layaFields = Nothing + , _layaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +layaQuotaUser :: Lens' LayersPublish' (Maybe Text) +layaQuotaUser + = lens _layaQuotaUser + (\ s a -> s{_layaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +layaPrettyPrint :: Lens' LayersPublish' Bool +layaPrettyPrint + = lens _layaPrettyPrint + (\ s a -> s{_layaPrettyPrint = a}) + +-- | If set to true, the API will allow publication of the layer even if +-- it\'s out of date. If not true, you\'ll need to reprocess any +-- out-of-date layer before publishing. +layaForce :: Lens' LayersPublish' (Maybe Bool) +layaForce + = lens _layaForce (\ s a -> s{_layaForce = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +layaUserIp :: Lens' LayersPublish' (Maybe Text) +layaUserIp + = lens _layaUserIp (\ s a -> s{_layaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +layaKey :: Lens' LayersPublish' (Maybe Text) +layaKey = lens _layaKey (\ s a -> s{_layaKey = a}) + +-- | The ID of the layer. +layaId :: Lens' LayersPublish' Text +layaId = lens _layaId (\ s a -> s{_layaId = a}) + +-- | OAuth 2.0 token for the current user. +layaOauthToken :: Lens' LayersPublish' (Maybe Text) +layaOauthToken + = lens _layaOauthToken + (\ s a -> s{_layaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +layaFields :: Lens' LayersPublish' (Maybe Text) +layaFields + = lens _layaFields (\ s a -> s{_layaFields = a}) + +-- | Data format for the response. +layaAlt :: Lens' LayersPublish' Text +layaAlt = lens _layaAlt (\ s a -> s{_layaAlt = a}) + +instance GoogleRequest LayersPublish' where + type Rs LayersPublish' = PublishResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersPublish{..} + = go _layaQuotaUser _layaPrettyPrint _layaForce + _layaUserIp + _layaKey + _layaId + _layaOauthToken + _layaFields + _layaAlt + where go + = clientWithRoute (Proxy :: Proxy LayersPublishAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Unpublish.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Unpublish.hs new file mode 100644 index 000000000..c2f16b574 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Layers/Unpublish.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Layers.Unpublish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Unpublish a layer asset. +-- +-- /See:/ for @MapsengineLayersUnpublish@. +module Mapsengine.Layers.Unpublish + ( + -- * REST Resource + LayersUnpublishAPI + + -- * Creating a Request + , layersUnpublish + , LayersUnpublish + + -- * Request Lenses + , luQuotaUser + , luPrettyPrint + , luUserIp + , luKey + , luId + , luOauthToken + , luFields + , luAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineLayersUnpublish@ which the +-- 'LayersUnpublish' request conforms to. +type LayersUnpublishAPI = + "layers" :> + Capture "id" Text :> + "unpublish" :> Post '[JSON] PublishResponse + +-- | Unpublish a layer asset. +-- +-- /See:/ 'layersUnpublish' smart constructor. +data LayersUnpublish = LayersUnpublish + { _luQuotaUser :: !(Maybe Text) + , _luPrettyPrint :: !Bool + , _luUserIp :: !(Maybe Text) + , _luKey :: !(Maybe Text) + , _luId :: !Text + , _luOauthToken :: !(Maybe Text) + , _luFields :: !(Maybe Text) + , _luAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LayersUnpublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'luQuotaUser' +-- +-- * 'luPrettyPrint' +-- +-- * 'luUserIp' +-- +-- * 'luKey' +-- +-- * 'luId' +-- +-- * 'luOauthToken' +-- +-- * 'luFields' +-- +-- * 'luAlt' +layersUnpublish + :: Text -- ^ 'id' + -> LayersUnpublish +layersUnpublish pLuId_ = + LayersUnpublish + { _luQuotaUser = Nothing + , _luPrettyPrint = True + , _luUserIp = Nothing + , _luKey = Nothing + , _luId = pLuId_ + , _luOauthToken = Nothing + , _luFields = Nothing + , _luAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +luQuotaUser :: Lens' LayersUnpublish' (Maybe Text) +luQuotaUser + = lens _luQuotaUser (\ s a -> s{_luQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +luPrettyPrint :: Lens' LayersUnpublish' Bool +luPrettyPrint + = lens _luPrettyPrint + (\ s a -> s{_luPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +luUserIp :: Lens' LayersUnpublish' (Maybe Text) +luUserIp = lens _luUserIp (\ s a -> s{_luUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +luKey :: Lens' LayersUnpublish' (Maybe Text) +luKey = lens _luKey (\ s a -> s{_luKey = a}) + +-- | The ID of the layer. +luId :: Lens' LayersUnpublish' Text +luId = lens _luId (\ s a -> s{_luId = a}) + +-- | OAuth 2.0 token for the current user. +luOauthToken :: Lens' LayersUnpublish' (Maybe Text) +luOauthToken + = lens _luOauthToken (\ s a -> s{_luOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +luFields :: Lens' LayersUnpublish' (Maybe Text) +luFields = lens _luFields (\ s a -> s{_luFields = a}) + +-- | Data format for the response. +luAlt :: Lens' LayersUnpublish' Text +luAlt = lens _luAlt (\ s a -> s{_luAlt = a}) + +instance GoogleRequest LayersUnpublish' where + type Rs LayersUnpublish' = PublishResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u LayersUnpublish{..} + = go _luQuotaUser _luPrettyPrint _luUserIp _luKey + _luId + _luOauthToken + _luFields + _luAlt + where go + = clientWithRoute (Proxy :: Proxy LayersUnpublishAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Create.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Create.hs new file mode 100644 index 000000000..bb9103c48 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Create.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a map asset. +-- +-- /See:/ for @MapsengineMapsCreate@. +module Mapsengine.Maps.Create + ( + -- * REST Resource + MapsCreateAPI + + -- * Creating a Request + , mapsCreate + , MapsCreate + + -- * Request Lenses + , mcQuotaUser + , mcPrettyPrint + , mcUserIp + , mcKey + , mcOauthToken + , mcFields + , mcAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsCreate@ which the +-- 'MapsCreate' request conforms to. +type MapsCreateAPI = "maps" :> Post '[JSON] Map + +-- | Create a map asset. +-- +-- /See:/ 'mapsCreate' smart constructor. +data MapsCreate = MapsCreate + { _mcQuotaUser :: !(Maybe Text) + , _mcPrettyPrint :: !Bool + , _mcUserIp :: !(Maybe Text) + , _mcKey :: !(Maybe Text) + , _mcOauthToken :: !(Maybe Text) + , _mcFields :: !(Maybe Text) + , _mcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mcQuotaUser' +-- +-- * 'mcPrettyPrint' +-- +-- * 'mcUserIp' +-- +-- * 'mcKey' +-- +-- * 'mcOauthToken' +-- +-- * 'mcFields' +-- +-- * 'mcAlt' +mapsCreate + :: MapsCreate +mapsCreate = + MapsCreate + { _mcQuotaUser = Nothing + , _mcPrettyPrint = True + , _mcUserIp = Nothing + , _mcKey = Nothing + , _mcOauthToken = Nothing + , _mcFields = Nothing + , _mcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mcQuotaUser :: Lens' MapsCreate' (Maybe Text) +mcQuotaUser + = lens _mcQuotaUser (\ s a -> s{_mcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mcPrettyPrint :: Lens' MapsCreate' Bool +mcPrettyPrint + = lens _mcPrettyPrint + (\ s a -> s{_mcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mcUserIp :: Lens' MapsCreate' (Maybe Text) +mcUserIp = lens _mcUserIp (\ s a -> s{_mcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mcKey :: Lens' MapsCreate' (Maybe Text) +mcKey = lens _mcKey (\ s a -> s{_mcKey = a}) + +-- | OAuth 2.0 token for the current user. +mcOauthToken :: Lens' MapsCreate' (Maybe Text) +mcOauthToken + = lens _mcOauthToken (\ s a -> s{_mcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mcFields :: Lens' MapsCreate' (Maybe Text) +mcFields = lens _mcFields (\ s a -> s{_mcFields = a}) + +-- | Data format for the response. +mcAlt :: Lens' MapsCreate' Text +mcAlt = lens _mcAlt (\ s a -> s{_mcAlt = a}) + +instance GoogleRequest MapsCreate' where + type Rs MapsCreate' = Map + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsCreate{..} + = go _mcQuotaUser _mcPrettyPrint _mcUserIp _mcKey + _mcOauthToken + _mcFields + _mcAlt + where go + = clientWithRoute (Proxy :: Proxy MapsCreateAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Delete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Delete.hs new file mode 100644 index 000000000..5117cc73b --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Delete.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a map. +-- +-- /See:/ for @MapsengineMapsDelete@. +module Mapsengine.Maps.Delete + ( + -- * REST Resource + MapsDeleteAPI + + -- * Creating a Request + , mapsDelete + , MapsDelete + + -- * Request Lenses + , mdQuotaUser + , mdPrettyPrint + , mdUserIp + , mdKey + , mdId + , mdOauthToken + , mdFields + , mdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsDelete@ which the +-- 'MapsDelete' request conforms to. +type MapsDeleteAPI = + "maps" :> Capture "id" Text :> Delete '[JSON] () + +-- | Delete a map. +-- +-- /See:/ 'mapsDelete' smart constructor. +data MapsDelete = MapsDelete + { _mdQuotaUser :: !(Maybe Text) + , _mdPrettyPrint :: !Bool + , _mdUserIp :: !(Maybe Text) + , _mdKey :: !(Maybe Text) + , _mdId :: !Text + , _mdOauthToken :: !(Maybe Text) + , _mdFields :: !(Maybe Text) + , _mdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdQuotaUser' +-- +-- * 'mdPrettyPrint' +-- +-- * 'mdUserIp' +-- +-- * 'mdKey' +-- +-- * 'mdId' +-- +-- * 'mdOauthToken' +-- +-- * 'mdFields' +-- +-- * 'mdAlt' +mapsDelete + :: Text -- ^ 'id' + -> MapsDelete +mapsDelete pMdId_ = + MapsDelete + { _mdQuotaUser = Nothing + , _mdPrettyPrint = True + , _mdUserIp = Nothing + , _mdKey = Nothing + , _mdId = pMdId_ + , _mdOauthToken = Nothing + , _mdFields = Nothing + , _mdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mdQuotaUser :: Lens' MapsDelete' (Maybe Text) +mdQuotaUser + = lens _mdQuotaUser (\ s a -> s{_mdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mdPrettyPrint :: Lens' MapsDelete' Bool +mdPrettyPrint + = lens _mdPrettyPrint + (\ s a -> s{_mdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mdUserIp :: Lens' MapsDelete' (Maybe Text) +mdUserIp = lens _mdUserIp (\ s a -> s{_mdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mdKey :: Lens' MapsDelete' (Maybe Text) +mdKey = lens _mdKey (\ s a -> s{_mdKey = a}) + +-- | The ID of the map. Only the map creator or project owner are permitted +-- to delete. If the map is published the request will fail. Unpublish the +-- map prior to deleting. +mdId :: Lens' MapsDelete' Text +mdId = lens _mdId (\ s a -> s{_mdId = a}) + +-- | OAuth 2.0 token for the current user. +mdOauthToken :: Lens' MapsDelete' (Maybe Text) +mdOauthToken + = lens _mdOauthToken (\ s a -> s{_mdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mdFields :: Lens' MapsDelete' (Maybe Text) +mdFields = lens _mdFields (\ s a -> s{_mdFields = a}) + +-- | Data format for the response. +mdAlt :: Lens' MapsDelete' Text +mdAlt = lens _mdAlt (\ s a -> s{_mdAlt = a}) + +instance GoogleRequest MapsDelete' where + type Rs MapsDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsDelete{..} + = go _mdQuotaUser _mdPrettyPrint _mdUserIp _mdKey + _mdId + _mdOauthToken + _mdFields + _mdAlt + where go + = clientWithRoute (Proxy :: Proxy MapsDeleteAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Get.hs new file mode 100644 index 000000000..6707d71d2 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a particular map. +-- +-- /See:/ for @MapsengineMapsGet@. +module Mapsengine.Maps.Get + ( + -- * REST Resource + MapsGetAPI + + -- * Creating a Request + , mapsGet + , MapsGet + + -- * Request Lenses + , mgQuotaUser + , mgPrettyPrint + , mgUserIp + , mgKey + , mgVersion + , mgId + , mgOauthToken + , mgFields + , mgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsGet@ which the +-- 'MapsGet' request conforms to. +type MapsGetAPI = + "maps" :> + Capture "id" Text :> + QueryParam "version" Text :> Get '[JSON] Map + +-- | Return metadata for a particular map. +-- +-- /See:/ 'mapsGet' smart constructor. +data MapsGet = MapsGet + { _mgQuotaUser :: !(Maybe Text) + , _mgPrettyPrint :: !Bool + , _mgUserIp :: !(Maybe Text) + , _mgKey :: !(Maybe Text) + , _mgVersion :: !(Maybe Text) + , _mgId :: !Text + , _mgOauthToken :: !(Maybe Text) + , _mgFields :: !(Maybe Text) + , _mgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgQuotaUser' +-- +-- * 'mgPrettyPrint' +-- +-- * 'mgUserIp' +-- +-- * 'mgKey' +-- +-- * 'mgVersion' +-- +-- * 'mgId' +-- +-- * 'mgOauthToken' +-- +-- * 'mgFields' +-- +-- * 'mgAlt' +mapsGet + :: Text -- ^ 'id' + -> MapsGet +mapsGet pMgId_ = + MapsGet + { _mgQuotaUser = Nothing + , _mgPrettyPrint = True + , _mgUserIp = Nothing + , _mgKey = Nothing + , _mgVersion = Nothing + , _mgId = pMgId_ + , _mgOauthToken = Nothing + , _mgFields = Nothing + , _mgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgQuotaUser :: Lens' MapsGet' (Maybe Text) +mgQuotaUser + = lens _mgQuotaUser (\ s a -> s{_mgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgPrettyPrint :: Lens' MapsGet' Bool +mgPrettyPrint + = lens _mgPrettyPrint + (\ s a -> s{_mgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgUserIp :: Lens' MapsGet' (Maybe Text) +mgUserIp = lens _mgUserIp (\ s a -> s{_mgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgKey :: Lens' MapsGet' (Maybe Text) +mgKey = lens _mgKey (\ s a -> s{_mgKey = a}) + +-- | Deprecated: The version parameter indicates which version of the map +-- should be returned. When version is set to published, the published +-- version of the map will be returned. Please use the maps.getPublished +-- endpoint instead. +mgVersion :: Lens' MapsGet' (Maybe Text) +mgVersion + = lens _mgVersion (\ s a -> s{_mgVersion = a}) + +-- | The ID of the map. +mgId :: Lens' MapsGet' Text +mgId = lens _mgId (\ s a -> s{_mgId = a}) + +-- | OAuth 2.0 token for the current user. +mgOauthToken :: Lens' MapsGet' (Maybe Text) +mgOauthToken + = lens _mgOauthToken (\ s a -> s{_mgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgFields :: Lens' MapsGet' (Maybe Text) +mgFields = lens _mgFields (\ s a -> s{_mgFields = a}) + +-- | Data format for the response. +mgAlt :: Lens' MapsGet' Text +mgAlt = lens _mgAlt (\ s a -> s{_mgAlt = a}) + +instance GoogleRequest MapsGet' where + type Rs MapsGet' = Map + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsGet{..} + = go _mgQuotaUser _mgPrettyPrint _mgUserIp _mgKey + _mgVersion + _mgId + _mgOauthToken + _mgFields + _mgAlt + where go + = clientWithRoute (Proxy :: Proxy MapsGetAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/GetPublished.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/GetPublished.hs new file mode 100644 index 000000000..8a89b87a0 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/GetPublished.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.GetPublished +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return the published metadata for a particular map. +-- +-- /See:/ for @MapsengineMapsGetPublished@. +module Mapsengine.Maps.GetPublished + ( + -- * REST Resource + MapsGetPublishedAPI + + -- * Creating a Request + , mapsGetPublished + , MapsGetPublished + + -- * Request Lenses + , mgpQuotaUser + , mgpPrettyPrint + , mgpUserIp + , mgpKey + , mgpId + , mgpOauthToken + , mgpFields + , mgpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsGetPublished@ which the +-- 'MapsGetPublished' request conforms to. +type MapsGetPublishedAPI = + "maps" :> + Capture "id" Text :> + "published" :> Get '[JSON] PublishedMap + +-- | Return the published metadata for a particular map. +-- +-- /See:/ 'mapsGetPublished' smart constructor. +data MapsGetPublished = MapsGetPublished + { _mgpQuotaUser :: !(Maybe Text) + , _mgpPrettyPrint :: !Bool + , _mgpUserIp :: !(Maybe Text) + , _mgpKey :: !(Maybe Text) + , _mgpId :: !Text + , _mgpOauthToken :: !(Maybe Text) + , _mgpFields :: !(Maybe Text) + , _mgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsGetPublished'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mgpQuotaUser' +-- +-- * 'mgpPrettyPrint' +-- +-- * 'mgpUserIp' +-- +-- * 'mgpKey' +-- +-- * 'mgpId' +-- +-- * 'mgpOauthToken' +-- +-- * 'mgpFields' +-- +-- * 'mgpAlt' +mapsGetPublished + :: Text -- ^ 'id' + -> MapsGetPublished +mapsGetPublished pMgpId_ = + MapsGetPublished + { _mgpQuotaUser = Nothing + , _mgpPrettyPrint = True + , _mgpUserIp = Nothing + , _mgpKey = Nothing + , _mgpId = pMgpId_ + , _mgpOauthToken = Nothing + , _mgpFields = Nothing + , _mgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mgpQuotaUser :: Lens' MapsGetPublished' (Maybe Text) +mgpQuotaUser + = lens _mgpQuotaUser (\ s a -> s{_mgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mgpPrettyPrint :: Lens' MapsGetPublished' Bool +mgpPrettyPrint + = lens _mgpPrettyPrint + (\ s a -> s{_mgpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mgpUserIp :: Lens' MapsGetPublished' (Maybe Text) +mgpUserIp + = lens _mgpUserIp (\ s a -> s{_mgpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mgpKey :: Lens' MapsGetPublished' (Maybe Text) +mgpKey = lens _mgpKey (\ s a -> s{_mgpKey = a}) + +-- | The ID of the map. +mgpId :: Lens' MapsGetPublished' Text +mgpId = lens _mgpId (\ s a -> s{_mgpId = a}) + +-- | OAuth 2.0 token for the current user. +mgpOauthToken :: Lens' MapsGetPublished' (Maybe Text) +mgpOauthToken + = lens _mgpOauthToken + (\ s a -> s{_mgpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mgpFields :: Lens' MapsGetPublished' (Maybe Text) +mgpFields + = lens _mgpFields (\ s a -> s{_mgpFields = a}) + +-- | Data format for the response. +mgpAlt :: Lens' MapsGetPublished' Text +mgpAlt = lens _mgpAlt (\ s a -> s{_mgpAlt = a}) + +instance GoogleRequest MapsGetPublished' where + type Rs MapsGetPublished' = PublishedMap + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsGetPublished{..} + = go _mgpQuotaUser _mgpPrettyPrint _mgpUserIp _mgpKey + _mgpId + _mgpOauthToken + _mgpFields + _mgpAlt + where go + = clientWithRoute + (Proxy :: Proxy MapsGetPublishedAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/List.hs new file mode 100644 index 000000000..e079f430a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/List.hs @@ -0,0 +1,311 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all maps readable by the current user. +-- +-- /See:/ for @MapsengineMapsList@. +module Mapsengine.Maps.List + ( + -- * REST Resource + MapsListAPI + + -- * Creating a Request + , mapsList + , MapsList + + -- * Request Lenses + , mCreatedAfter + , mQuotaUser + , mPrettyPrint + , mUserIp + , mCreatorEmail + , mRole + , mKey + , mBbox + , mProcessingStatus + , mModifiedAfter + , mModifiedBefore + , mPageToken + , mProjectId + , mOauthToken + , mSearch + , mMaxResults + , mTags + , mFields + , mCreatedBefore + , mAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsList@ which the +-- 'MapsList' request conforms to. +type MapsListAPI = + "maps" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "processingStatus" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] MapsListResponse + +-- | Return all maps readable by the current user. +-- +-- /See:/ 'mapsList' smart constructor. +data MapsList = MapsList + { _mCreatedAfter :: !(Maybe UTCTime) + , _mQuotaUser :: !(Maybe Text) + , _mPrettyPrint :: !Bool + , _mUserIp :: !(Maybe Text) + , _mCreatorEmail :: !(Maybe Text) + , _mRole :: !(Maybe Text) + , _mKey :: !(Maybe Text) + , _mBbox :: !(Maybe Text) + , _mProcessingStatus :: !(Maybe Text) + , _mModifiedAfter :: !(Maybe UTCTime) + , _mModifiedBefore :: !(Maybe UTCTime) + , _mPageToken :: !(Maybe Text) + , _mProjectId :: !(Maybe Text) + , _mOauthToken :: !(Maybe Text) + , _mSearch :: !(Maybe Text) + , _mMaxResults :: !(Maybe Word32) + , _mTags :: !(Maybe Text) + , _mFields :: !(Maybe Text) + , _mCreatedBefore :: !(Maybe UTCTime) + , _mAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mCreatedAfter' +-- +-- * 'mQuotaUser' +-- +-- * 'mPrettyPrint' +-- +-- * 'mUserIp' +-- +-- * 'mCreatorEmail' +-- +-- * 'mRole' +-- +-- * 'mKey' +-- +-- * 'mBbox' +-- +-- * 'mProcessingStatus' +-- +-- * 'mModifiedAfter' +-- +-- * 'mModifiedBefore' +-- +-- * 'mPageToken' +-- +-- * 'mProjectId' +-- +-- * 'mOauthToken' +-- +-- * 'mSearch' +-- +-- * 'mMaxResults' +-- +-- * 'mTags' +-- +-- * 'mFields' +-- +-- * 'mCreatedBefore' +-- +-- * 'mAlt' +mapsList + :: MapsList +mapsList = + MapsList + { _mCreatedAfter = Nothing + , _mQuotaUser = Nothing + , _mPrettyPrint = True + , _mUserIp = Nothing + , _mCreatorEmail = Nothing + , _mRole = Nothing + , _mKey = Nothing + , _mBbox = Nothing + , _mProcessingStatus = Nothing + , _mModifiedAfter = Nothing + , _mModifiedBefore = Nothing + , _mPageToken = Nothing + , _mProjectId = Nothing + , _mOauthToken = Nothing + , _mSearch = Nothing + , _mMaxResults = Nothing + , _mTags = Nothing + , _mFields = Nothing + , _mCreatedBefore = Nothing + , _mAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +mCreatedAfter :: Lens' MapsList' (Maybe UTCTime) +mCreatedAfter + = lens _mCreatedAfter + (\ s a -> s{_mCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mQuotaUser :: Lens' MapsList' (Maybe Text) +mQuotaUser + = lens _mQuotaUser (\ s a -> s{_mQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mPrettyPrint :: Lens' MapsList' Bool +mPrettyPrint + = lens _mPrettyPrint (\ s a -> s{_mPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mUserIp :: Lens' MapsList' (Maybe Text) +mUserIp = lens _mUserIp (\ s a -> s{_mUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +mCreatorEmail :: Lens' MapsList' (Maybe Text) +mCreatorEmail + = lens _mCreatorEmail + (\ s a -> s{_mCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +mRole :: Lens' MapsList' (Maybe Text) +mRole = lens _mRole (\ s a -> s{_mRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mKey :: Lens' MapsList' (Maybe Text) +mKey = lens _mKey (\ s a -> s{_mKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +mBbox :: Lens' MapsList' (Maybe Text) +mBbox = lens _mBbox (\ s a -> s{_mBbox = a}) + +mProcessingStatus :: Lens' MapsList' (Maybe Text) +mProcessingStatus + = lens _mProcessingStatus + (\ s a -> s{_mProcessingStatus = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +mModifiedAfter :: Lens' MapsList' (Maybe UTCTime) +mModifiedAfter + = lens _mModifiedAfter + (\ s a -> s{_mModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +mModifiedBefore :: Lens' MapsList' (Maybe UTCTime) +mModifiedBefore + = lens _mModifiedBefore + (\ s a -> s{_mModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +mPageToken :: Lens' MapsList' (Maybe Text) +mPageToken + = lens _mPageToken (\ s a -> s{_mPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +mProjectId :: Lens' MapsList' (Maybe Text) +mProjectId + = lens _mProjectId (\ s a -> s{_mProjectId = a}) + +-- | OAuth 2.0 token for the current user. +mOauthToken :: Lens' MapsList' (Maybe Text) +mOauthToken + = lens _mOauthToken (\ s a -> s{_mOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +mSearch :: Lens' MapsList' (Maybe Text) +mSearch = lens _mSearch (\ s a -> s{_mSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +mMaxResults :: Lens' MapsList' (Maybe Word32) +mMaxResults + = lens _mMaxResults (\ s a -> s{_mMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +mTags :: Lens' MapsList' (Maybe Text) +mTags = lens _mTags (\ s a -> s{_mTags = a}) + +-- | Selector specifying which fields to include in a partial response. +mFields :: Lens' MapsList' (Maybe Text) +mFields = lens _mFields (\ s a -> s{_mFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +mCreatedBefore :: Lens' MapsList' (Maybe UTCTime) +mCreatedBefore + = lens _mCreatedBefore + (\ s a -> s{_mCreatedBefore = a}) + +-- | Data format for the response. +mAlt :: Lens' MapsList' Text +mAlt = lens _mAlt (\ s a -> s{_mAlt = a}) + +instance GoogleRequest MapsList' where + type Rs MapsList' = MapsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsList{..} + = go _mCreatedAfter _mQuotaUser _mPrettyPrint + _mUserIp + _mCreatorEmail + _mRole + _mKey + _mBbox + _mProcessingStatus + _mModifiedAfter + _mModifiedBefore + _mPageToken + _mProjectId + _mOauthToken + _mSearch + _mMaxResults + _mTags + _mFields + _mCreatedBefore + _mAlt + where go + = clientWithRoute (Proxy :: Proxy MapsListAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/ListPublished.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/ListPublished.hs new file mode 100644 index 000000000..5ebf798e9 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/ListPublished.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.ListPublished +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all published maps readable by the current user. +-- +-- /See:/ for @MapsengineMapsListPublished@. +module Mapsengine.Maps.ListPublished + ( + -- * REST Resource + MapsListPublishedAPI + + -- * Creating a Request + , mapsListPublished + , MapsListPublished + + -- * Request Lenses + , mlpQuotaUser + , mlpPrettyPrint + , mlpUserIp + , mlpKey + , mlpPageToken + , mlpProjectId + , mlpOauthToken + , mlpMaxResults + , mlpFields + , mlpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsListPublished@ which the +-- 'MapsListPublished' request conforms to. +type MapsListPublishedAPI = + "maps" :> + "published" :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PublishedMapsListResponse + +-- | Return all published maps readable by the current user. +-- +-- /See:/ 'mapsListPublished' smart constructor. +data MapsListPublished = MapsListPublished + { _mlpQuotaUser :: !(Maybe Text) + , _mlpPrettyPrint :: !Bool + , _mlpUserIp :: !(Maybe Text) + , _mlpKey :: !(Maybe Text) + , _mlpPageToken :: !(Maybe Text) + , _mlpProjectId :: !(Maybe Text) + , _mlpOauthToken :: !(Maybe Text) + , _mlpMaxResults :: !(Maybe Word32) + , _mlpFields :: !(Maybe Text) + , _mlpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsListPublished'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlpQuotaUser' +-- +-- * 'mlpPrettyPrint' +-- +-- * 'mlpUserIp' +-- +-- * 'mlpKey' +-- +-- * 'mlpPageToken' +-- +-- * 'mlpProjectId' +-- +-- * 'mlpOauthToken' +-- +-- * 'mlpMaxResults' +-- +-- * 'mlpFields' +-- +-- * 'mlpAlt' +mapsListPublished + :: MapsListPublished +mapsListPublished = + MapsListPublished + { _mlpQuotaUser = Nothing + , _mlpPrettyPrint = True + , _mlpUserIp = Nothing + , _mlpKey = Nothing + , _mlpPageToken = Nothing + , _mlpProjectId = Nothing + , _mlpOauthToken = Nothing + , _mlpMaxResults = Nothing + , _mlpFields = Nothing + , _mlpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlpQuotaUser :: Lens' MapsListPublished' (Maybe Text) +mlpQuotaUser + = lens _mlpQuotaUser (\ s a -> s{_mlpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlpPrettyPrint :: Lens' MapsListPublished' Bool +mlpPrettyPrint + = lens _mlpPrettyPrint + (\ s a -> s{_mlpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlpUserIp :: Lens' MapsListPublished' (Maybe Text) +mlpUserIp + = lens _mlpUserIp (\ s a -> s{_mlpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlpKey :: Lens' MapsListPublished' (Maybe Text) +mlpKey = lens _mlpKey (\ s a -> s{_mlpKey = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +mlpPageToken :: Lens' MapsListPublished' (Maybe Text) +mlpPageToken + = lens _mlpPageToken (\ s a -> s{_mlpPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +mlpProjectId :: Lens' MapsListPublished' (Maybe Text) +mlpProjectId + = lens _mlpProjectId (\ s a -> s{_mlpProjectId = a}) + +-- | OAuth 2.0 token for the current user. +mlpOauthToken :: Lens' MapsListPublished' (Maybe Text) +mlpOauthToken + = lens _mlpOauthToken + (\ s a -> s{_mlpOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +mlpMaxResults :: Lens' MapsListPublished' (Maybe Word32) +mlpMaxResults + = lens _mlpMaxResults + (\ s a -> s{_mlpMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mlpFields :: Lens' MapsListPublished' (Maybe Text) +mlpFields + = lens _mlpFields (\ s a -> s{_mlpFields = a}) + +-- | Data format for the response. +mlpAlt :: Lens' MapsListPublished' Text +mlpAlt = lens _mlpAlt (\ s a -> s{_mlpAlt = a}) + +instance GoogleRequest MapsListPublished' where + type Rs MapsListPublished' = + PublishedMapsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsListPublished{..} + = go _mlpQuotaUser _mlpPrettyPrint _mlpUserIp _mlpKey + _mlpPageToken + _mlpProjectId + _mlpOauthToken + _mlpMaxResults + _mlpFields + _mlpAlt + where go + = clientWithRoute + (Proxy :: Proxy MapsListPublishedAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Patch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Patch.hs new file mode 100644 index 000000000..ec05d18ee --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Patch.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Mutate a map asset. +-- +-- /See:/ for @MapsengineMapsPatch@. +module Mapsengine.Maps.Patch + ( + -- * REST Resource + MapsPatchAPI + + -- * Creating a Request + , mapsPatch + , MapsPatch + + -- * Request Lenses + , mpQuotaUser + , mpPrettyPrint + , mpUserIp + , mpKey + , mpId + , mpOauthToken + , mpFields + , mpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsPatch@ which the +-- 'MapsPatch' request conforms to. +type MapsPatchAPI = + "maps" :> Capture "id" Text :> Patch '[JSON] () + +-- | Mutate a map asset. +-- +-- /See:/ 'mapsPatch' smart constructor. +data MapsPatch = MapsPatch + { _mpQuotaUser :: !(Maybe Text) + , _mpPrettyPrint :: !Bool + , _mpUserIp :: !(Maybe Text) + , _mpKey :: !(Maybe Text) + , _mpId :: !Text + , _mpOauthToken :: !(Maybe Text) + , _mpFields :: !(Maybe Text) + , _mpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpQuotaUser' +-- +-- * 'mpPrettyPrint' +-- +-- * 'mpUserIp' +-- +-- * 'mpKey' +-- +-- * 'mpId' +-- +-- * 'mpOauthToken' +-- +-- * 'mpFields' +-- +-- * 'mpAlt' +mapsPatch + :: Text -- ^ 'id' + -> MapsPatch +mapsPatch pMpId_ = + MapsPatch + { _mpQuotaUser = Nothing + , _mpPrettyPrint = True + , _mpUserIp = Nothing + , _mpKey = Nothing + , _mpId = pMpId_ + , _mpOauthToken = Nothing + , _mpFields = Nothing + , _mpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpQuotaUser :: Lens' MapsPatch' (Maybe Text) +mpQuotaUser + = lens _mpQuotaUser (\ s a -> s{_mpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpPrettyPrint :: Lens' MapsPatch' Bool +mpPrettyPrint + = lens _mpPrettyPrint + (\ s a -> s{_mpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpUserIp :: Lens' MapsPatch' (Maybe Text) +mpUserIp = lens _mpUserIp (\ s a -> s{_mpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpKey :: Lens' MapsPatch' (Maybe Text) +mpKey = lens _mpKey (\ s a -> s{_mpKey = a}) + +-- | The ID of the map. +mpId :: Lens' MapsPatch' Text +mpId = lens _mpId (\ s a -> s{_mpId = a}) + +-- | OAuth 2.0 token for the current user. +mpOauthToken :: Lens' MapsPatch' (Maybe Text) +mpOauthToken + = lens _mpOauthToken (\ s a -> s{_mpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpFields :: Lens' MapsPatch' (Maybe Text) +mpFields = lens _mpFields (\ s a -> s{_mpFields = a}) + +-- | Data format for the response. +mpAlt :: Lens' MapsPatch' Text +mpAlt = lens _mpAlt (\ s a -> s{_mpAlt = a}) + +instance GoogleRequest MapsPatch' where + type Rs MapsPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsPatch{..} + = go _mpQuotaUser _mpPrettyPrint _mpUserIp _mpKey + _mpId + _mpOauthToken + _mpFields + _mpAlt + where go + = clientWithRoute (Proxy :: Proxy MapsPatchAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchDelete.hs new file mode 100644 index 000000000..bc922e14a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchDelete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Permissions.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ for @MapsengineMapsPermissionsBatchDelete@. +module Mapsengine.Maps.Permissions.BatchDelete + ( + -- * REST Resource + MapsPermissionsBatchDeleteAPI + + -- * Creating a Request + , mapsPermissionsBatchDelete + , MapsPermissionsBatchDelete + + -- * Request Lenses + , mpbdQuotaUser + , mpbdPrettyPrint + , mpbdUserIp + , mpbdKey + , mpbdId + , mpbdOauthToken + , mpbdFields + , mpbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsPermissionsBatchDelete@ which the +-- 'MapsPermissionsBatchDelete' request conforms to. +type MapsPermissionsBatchDeleteAPI = + "maps" :> + Capture "id" Text :> + "permissions" :> + "batchDelete" :> + Post '[JSON] PermissionsBatchDeleteResponse + +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ 'mapsPermissionsBatchDelete' smart constructor. +data MapsPermissionsBatchDelete = MapsPermissionsBatchDelete + { _mpbdQuotaUser :: !(Maybe Text) + , _mpbdPrettyPrint :: !Bool + , _mpbdUserIp :: !(Maybe Text) + , _mpbdKey :: !(Maybe Text) + , _mpbdId :: !Text + , _mpbdOauthToken :: !(Maybe Text) + , _mpbdFields :: !(Maybe Text) + , _mpbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsPermissionsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpbdQuotaUser' +-- +-- * 'mpbdPrettyPrint' +-- +-- * 'mpbdUserIp' +-- +-- * 'mpbdKey' +-- +-- * 'mpbdId' +-- +-- * 'mpbdOauthToken' +-- +-- * 'mpbdFields' +-- +-- * 'mpbdAlt' +mapsPermissionsBatchDelete + :: Text -- ^ 'id' + -> MapsPermissionsBatchDelete +mapsPermissionsBatchDelete pMpbdId_ = + MapsPermissionsBatchDelete + { _mpbdQuotaUser = Nothing + , _mpbdPrettyPrint = True + , _mpbdUserIp = Nothing + , _mpbdKey = Nothing + , _mpbdId = pMpbdId_ + , _mpbdOauthToken = Nothing + , _mpbdFields = Nothing + , _mpbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpbdQuotaUser :: Lens' MapsPermissionsBatchDelete' (Maybe Text) +mpbdQuotaUser + = lens _mpbdQuotaUser + (\ s a -> s{_mpbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpbdPrettyPrint :: Lens' MapsPermissionsBatchDelete' Bool +mpbdPrettyPrint + = lens _mpbdPrettyPrint + (\ s a -> s{_mpbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpbdUserIp :: Lens' MapsPermissionsBatchDelete' (Maybe Text) +mpbdUserIp + = lens _mpbdUserIp (\ s a -> s{_mpbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpbdKey :: Lens' MapsPermissionsBatchDelete' (Maybe Text) +mpbdKey = lens _mpbdKey (\ s a -> s{_mpbdKey = a}) + +-- | The ID of the asset from which permissions will be removed. +mpbdId :: Lens' MapsPermissionsBatchDelete' Text +mpbdId = lens _mpbdId (\ s a -> s{_mpbdId = a}) + +-- | OAuth 2.0 token for the current user. +mpbdOauthToken :: Lens' MapsPermissionsBatchDelete' (Maybe Text) +mpbdOauthToken + = lens _mpbdOauthToken + (\ s a -> s{_mpbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpbdFields :: Lens' MapsPermissionsBatchDelete' (Maybe Text) +mpbdFields + = lens _mpbdFields (\ s a -> s{_mpbdFields = a}) + +-- | Data format for the response. +mpbdAlt :: Lens' MapsPermissionsBatchDelete' Text +mpbdAlt = lens _mpbdAlt (\ s a -> s{_mpbdAlt = a}) + +instance GoogleRequest MapsPermissionsBatchDelete' + where + type Rs MapsPermissionsBatchDelete' = + PermissionsBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsPermissionsBatchDelete{..} + = go _mpbdQuotaUser _mpbdPrettyPrint _mpbdUserIp + _mpbdKey + _mpbdId + _mpbdOauthToken + _mpbdFields + _mpbdAlt + where go + = clientWithRoute + (Proxy :: Proxy MapsPermissionsBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchUpdate.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchUpdate.hs new file mode 100644 index 000000000..7f90fbd38 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/BatchUpdate.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Permissions.BatchUpdate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ for @MapsengineMapsPermissionsBatchUpdate@. +module Mapsengine.Maps.Permissions.BatchUpdate + ( + -- * REST Resource + MapsPermissionsBatchUpdateAPI + + -- * Creating a Request + , mapsPermissionsBatchUpdate + , MapsPermissionsBatchUpdate + + -- * Request Lenses + , mpbuQuotaUser + , mpbuPrettyPrint + , mpbuUserIp + , mpbuKey + , mpbuId + , mpbuOauthToken + , mpbuFields + , mpbuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsPermissionsBatchUpdate@ which the +-- 'MapsPermissionsBatchUpdate' request conforms to. +type MapsPermissionsBatchUpdateAPI = + "maps" :> + Capture "id" Text :> + "permissions" :> + "batchUpdate" :> + Post '[JSON] PermissionsBatchUpdateResponse + +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ 'mapsPermissionsBatchUpdate' smart constructor. +data MapsPermissionsBatchUpdate = MapsPermissionsBatchUpdate + { _mpbuQuotaUser :: !(Maybe Text) + , _mpbuPrettyPrint :: !Bool + , _mpbuUserIp :: !(Maybe Text) + , _mpbuKey :: !(Maybe Text) + , _mpbuId :: !Text + , _mpbuOauthToken :: !(Maybe Text) + , _mpbuFields :: !(Maybe Text) + , _mpbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsPermissionsBatchUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpbuQuotaUser' +-- +-- * 'mpbuPrettyPrint' +-- +-- * 'mpbuUserIp' +-- +-- * 'mpbuKey' +-- +-- * 'mpbuId' +-- +-- * 'mpbuOauthToken' +-- +-- * 'mpbuFields' +-- +-- * 'mpbuAlt' +mapsPermissionsBatchUpdate + :: Text -- ^ 'id' + -> MapsPermissionsBatchUpdate +mapsPermissionsBatchUpdate pMpbuId_ = + MapsPermissionsBatchUpdate + { _mpbuQuotaUser = Nothing + , _mpbuPrettyPrint = True + , _mpbuUserIp = Nothing + , _mpbuKey = Nothing + , _mpbuId = pMpbuId_ + , _mpbuOauthToken = Nothing + , _mpbuFields = Nothing + , _mpbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mpbuQuotaUser :: Lens' MapsPermissionsBatchUpdate' (Maybe Text) +mpbuQuotaUser + = lens _mpbuQuotaUser + (\ s a -> s{_mpbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mpbuPrettyPrint :: Lens' MapsPermissionsBatchUpdate' Bool +mpbuPrettyPrint + = lens _mpbuPrettyPrint + (\ s a -> s{_mpbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mpbuUserIp :: Lens' MapsPermissionsBatchUpdate' (Maybe Text) +mpbuUserIp + = lens _mpbuUserIp (\ s a -> s{_mpbuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mpbuKey :: Lens' MapsPermissionsBatchUpdate' (Maybe Text) +mpbuKey = lens _mpbuKey (\ s a -> s{_mpbuKey = a}) + +-- | The ID of the asset to which permissions will be added. +mpbuId :: Lens' MapsPermissionsBatchUpdate' Text +mpbuId = lens _mpbuId (\ s a -> s{_mpbuId = a}) + +-- | OAuth 2.0 token for the current user. +mpbuOauthToken :: Lens' MapsPermissionsBatchUpdate' (Maybe Text) +mpbuOauthToken + = lens _mpbuOauthToken + (\ s a -> s{_mpbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mpbuFields :: Lens' MapsPermissionsBatchUpdate' (Maybe Text) +mpbuFields + = lens _mpbuFields (\ s a -> s{_mpbuFields = a}) + +-- | Data format for the response. +mpbuAlt :: Lens' MapsPermissionsBatchUpdate' Text +mpbuAlt = lens _mpbuAlt (\ s a -> s{_mpbuAlt = a}) + +instance GoogleRequest MapsPermissionsBatchUpdate' + where + type Rs MapsPermissionsBatchUpdate' = + PermissionsBatchUpdateResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsPermissionsBatchUpdate{..} + = go _mpbuQuotaUser _mpbuPrettyPrint _mpbuUserIp + _mpbuKey + _mpbuId + _mpbuOauthToken + _mpbuFields + _mpbuAlt + where go + = clientWithRoute + (Proxy :: Proxy MapsPermissionsBatchUpdateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/List.hs new file mode 100644 index 000000000..216929dc1 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Permissions/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineMapsPermissionsList@. +module Mapsengine.Maps.Permissions.List + ( + -- * REST Resource + MapsPermissionsListAPI + + -- * Creating a Request + , mapsPermissionsList + , MapsPermissionsList + + -- * Request Lenses + , mplQuotaUser + , mplPrettyPrint + , mplUserIp + , mplKey + , mplId + , mplOauthToken + , mplFields + , mplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsPermissionsList@ which the +-- 'MapsPermissionsList' request conforms to. +type MapsPermissionsListAPI = + "maps" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'mapsPermissionsList' smart constructor. +data MapsPermissionsList = MapsPermissionsList + { _mplQuotaUser :: !(Maybe Text) + , _mplPrettyPrint :: !Bool + , _mplUserIp :: !(Maybe Text) + , _mplKey :: !(Maybe Text) + , _mplId :: !Text + , _mplOauthToken :: !(Maybe Text) + , _mplFields :: !(Maybe Text) + , _mplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mplQuotaUser' +-- +-- * 'mplPrettyPrint' +-- +-- * 'mplUserIp' +-- +-- * 'mplKey' +-- +-- * 'mplId' +-- +-- * 'mplOauthToken' +-- +-- * 'mplFields' +-- +-- * 'mplAlt' +mapsPermissionsList + :: Text -- ^ 'id' + -> MapsPermissionsList +mapsPermissionsList pMplId_ = + MapsPermissionsList + { _mplQuotaUser = Nothing + , _mplPrettyPrint = True + , _mplUserIp = Nothing + , _mplKey = Nothing + , _mplId = pMplId_ + , _mplOauthToken = Nothing + , _mplFields = Nothing + , _mplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mplQuotaUser :: Lens' MapsPermissionsList' (Maybe Text) +mplQuotaUser + = lens _mplQuotaUser (\ s a -> s{_mplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mplPrettyPrint :: Lens' MapsPermissionsList' Bool +mplPrettyPrint + = lens _mplPrettyPrint + (\ s a -> s{_mplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mplUserIp :: Lens' MapsPermissionsList' (Maybe Text) +mplUserIp + = lens _mplUserIp (\ s a -> s{_mplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mplKey :: Lens' MapsPermissionsList' (Maybe Text) +mplKey = lens _mplKey (\ s a -> s{_mplKey = a}) + +-- | The ID of the asset whose permissions will be listed. +mplId :: Lens' MapsPermissionsList' Text +mplId = lens _mplId (\ s a -> s{_mplId = a}) + +-- | OAuth 2.0 token for the current user. +mplOauthToken :: Lens' MapsPermissionsList' (Maybe Text) +mplOauthToken + = lens _mplOauthToken + (\ s a -> s{_mplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mplFields :: Lens' MapsPermissionsList' (Maybe Text) +mplFields + = lens _mplFields (\ s a -> s{_mplFields = a}) + +-- | Data format for the response. +mplAlt :: Lens' MapsPermissionsList' Text +mplAlt = lens _mplAlt (\ s a -> s{_mplAlt = a}) + +instance GoogleRequest MapsPermissionsList' where + type Rs MapsPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsPermissionsList{..} + = go _mplQuotaUser _mplPrettyPrint _mplUserIp _mplKey + _mplId + _mplOauthToken + _mplFields + _mplAlt + where go + = clientWithRoute + (Proxy :: Proxy MapsPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Publish.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Publish.hs new file mode 100644 index 000000000..81ace2ecd --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Publish.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Publish a map asset. +-- +-- /See:/ for @MapsengineMapsPublish@. +module Mapsengine.Maps.Publish + ( + -- * REST Resource + MapsPublishAPI + + -- * Creating a Request + , mapsPublish + , MapsPublish + + -- * Request Lenses + , mppQuotaUser + , mppPrettyPrint + , mppForce + , mppUserIp + , mppKey + , mppId + , mppOauthToken + , mppFields + , mppAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsPublish@ which the +-- 'MapsPublish' request conforms to. +type MapsPublishAPI = + "maps" :> + Capture "id" Text :> + "publish" :> + QueryParam "force" Bool :> + Post '[JSON] PublishResponse + +-- | Publish a map asset. +-- +-- /See:/ 'mapsPublish' smart constructor. +data MapsPublish = MapsPublish + { _mppQuotaUser :: !(Maybe Text) + , _mppPrettyPrint :: !Bool + , _mppForce :: !(Maybe Bool) + , _mppUserIp :: !(Maybe Text) + , _mppKey :: !(Maybe Text) + , _mppId :: !Text + , _mppOauthToken :: !(Maybe Text) + , _mppFields :: !(Maybe Text) + , _mppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mppQuotaUser' +-- +-- * 'mppPrettyPrint' +-- +-- * 'mppForce' +-- +-- * 'mppUserIp' +-- +-- * 'mppKey' +-- +-- * 'mppId' +-- +-- * 'mppOauthToken' +-- +-- * 'mppFields' +-- +-- * 'mppAlt' +mapsPublish + :: Text -- ^ 'id' + -> MapsPublish +mapsPublish pMppId_ = + MapsPublish + { _mppQuotaUser = Nothing + , _mppPrettyPrint = True + , _mppForce = Nothing + , _mppUserIp = Nothing + , _mppKey = Nothing + , _mppId = pMppId_ + , _mppOauthToken = Nothing + , _mppFields = Nothing + , _mppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mppQuotaUser :: Lens' MapsPublish' (Maybe Text) +mppQuotaUser + = lens _mppQuotaUser (\ s a -> s{_mppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mppPrettyPrint :: Lens' MapsPublish' Bool +mppPrettyPrint + = lens _mppPrettyPrint + (\ s a -> s{_mppPrettyPrint = a}) + +-- | If set to true, the API will allow publication of the map even if it\'s +-- out of date. If false, the map must have a processingStatus of complete +-- before publishing. +mppForce :: Lens' MapsPublish' (Maybe Bool) +mppForce = lens _mppForce (\ s a -> s{_mppForce = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mppUserIp :: Lens' MapsPublish' (Maybe Text) +mppUserIp + = lens _mppUserIp (\ s a -> s{_mppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mppKey :: Lens' MapsPublish' (Maybe Text) +mppKey = lens _mppKey (\ s a -> s{_mppKey = a}) + +-- | The ID of the map. +mppId :: Lens' MapsPublish' Text +mppId = lens _mppId (\ s a -> s{_mppId = a}) + +-- | OAuth 2.0 token for the current user. +mppOauthToken :: Lens' MapsPublish' (Maybe Text) +mppOauthToken + = lens _mppOauthToken + (\ s a -> s{_mppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mppFields :: Lens' MapsPublish' (Maybe Text) +mppFields + = lens _mppFields (\ s a -> s{_mppFields = a}) + +-- | Data format for the response. +mppAlt :: Lens' MapsPublish' Text +mppAlt = lens _mppAlt (\ s a -> s{_mppAlt = a}) + +instance GoogleRequest MapsPublish' where + type Rs MapsPublish' = PublishResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsPublish{..} + = go _mppQuotaUser _mppPrettyPrint _mppForce + _mppUserIp + _mppKey + _mppId + _mppOauthToken + _mppFields + _mppAlt + where go + = clientWithRoute (Proxy :: Proxy MapsPublishAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Unpublish.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Unpublish.hs new file mode 100644 index 000000000..04be78c12 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Maps/Unpublish.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Maps.Unpublish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Unpublish a map asset. +-- +-- /See:/ for @MapsengineMapsUnpublish@. +module Mapsengine.Maps.Unpublish + ( + -- * REST Resource + MapsUnpublishAPI + + -- * Creating a Request + , mapsUnpublish + , MapsUnpublish + + -- * Request Lenses + , muQuotaUser + , muPrettyPrint + , muUserIp + , muKey + , muId + , muOauthToken + , muFields + , muAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineMapsUnpublish@ which the +-- 'MapsUnpublish' request conforms to. +type MapsUnpublishAPI = + "maps" :> + Capture "id" Text :> + "unpublish" :> Post '[JSON] PublishResponse + +-- | Unpublish a map asset. +-- +-- /See:/ 'mapsUnpublish' smart constructor. +data MapsUnpublish = MapsUnpublish + { _muQuotaUser :: !(Maybe Text) + , _muPrettyPrint :: !Bool + , _muUserIp :: !(Maybe Text) + , _muKey :: !(Maybe Text) + , _muId :: !Text + , _muOauthToken :: !(Maybe Text) + , _muFields :: !(Maybe Text) + , _muAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MapsUnpublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'muQuotaUser' +-- +-- * 'muPrettyPrint' +-- +-- * 'muUserIp' +-- +-- * 'muKey' +-- +-- * 'muId' +-- +-- * 'muOauthToken' +-- +-- * 'muFields' +-- +-- * 'muAlt' +mapsUnpublish + :: Text -- ^ 'id' + -> MapsUnpublish +mapsUnpublish pMuId_ = + MapsUnpublish + { _muQuotaUser = Nothing + , _muPrettyPrint = True + , _muUserIp = Nothing + , _muKey = Nothing + , _muId = pMuId_ + , _muOauthToken = Nothing + , _muFields = Nothing + , _muAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +muQuotaUser :: Lens' MapsUnpublish' (Maybe Text) +muQuotaUser + = lens _muQuotaUser (\ s a -> s{_muQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +muPrettyPrint :: Lens' MapsUnpublish' Bool +muPrettyPrint + = lens _muPrettyPrint + (\ s a -> s{_muPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +muUserIp :: Lens' MapsUnpublish' (Maybe Text) +muUserIp = lens _muUserIp (\ s a -> s{_muUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +muKey :: Lens' MapsUnpublish' (Maybe Text) +muKey = lens _muKey (\ s a -> s{_muKey = a}) + +-- | The ID of the map. +muId :: Lens' MapsUnpublish' Text +muId = lens _muId (\ s a -> s{_muId = a}) + +-- | OAuth 2.0 token for the current user. +muOauthToken :: Lens' MapsUnpublish' (Maybe Text) +muOauthToken + = lens _muOauthToken (\ s a -> s{_muOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +muFields :: Lens' MapsUnpublish' (Maybe Text) +muFields = lens _muFields (\ s a -> s{_muFields = a}) + +-- | Data format for the response. +muAlt :: Lens' MapsUnpublish' Text +muAlt = lens _muAlt (\ s a -> s{_muAlt = a}) + +instance GoogleRequest MapsUnpublish' where + type Rs MapsUnpublish' = PublishResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u MapsUnpublish{..} + = go _muQuotaUser _muPrettyPrint _muUserIp _muKey + _muId + _muOauthToken + _muFields + _muAlt + where go + = clientWithRoute (Proxy :: Proxy MapsUnpublishAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Create.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Create.hs new file mode 100644 index 000000000..2c2369b80 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Create.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Projects.Icons.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create an icon. +-- +-- /See:/ for @MapsengineProjectsIconsCreate@. +module Mapsengine.Projects.Icons.Create + ( + -- * REST Resource + ProjectsIconsCreateAPI + + -- * Creating a Request + , projectsIconsCreate + , ProjectsIconsCreate + + -- * Request Lenses + , picQuotaUser + , picPrettyPrint + , picUserIp + , picKey + , picProjectId + , picOauthToken + , picFields + , picAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineProjectsIconsCreate@ which the +-- 'ProjectsIconsCreate' request conforms to. +type ProjectsIconsCreateAPI = + "projects" :> + Capture "projectId" Text :> + "icons" :> Post '[JSON] Icon + +-- | Create an icon. +-- +-- /See:/ 'projectsIconsCreate' smart constructor. +data ProjectsIconsCreate = ProjectsIconsCreate + { _picQuotaUser :: !(Maybe Text) + , _picPrettyPrint :: !Bool + , _picUserIp :: !(Maybe Text) + , _picKey :: !(Maybe Text) + , _picProjectId :: !Text + , _picOauthToken :: !(Maybe Text) + , _picFields :: !(Maybe Text) + , _picAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsIconsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'picQuotaUser' +-- +-- * 'picPrettyPrint' +-- +-- * 'picUserIp' +-- +-- * 'picKey' +-- +-- * 'picProjectId' +-- +-- * 'picOauthToken' +-- +-- * 'picFields' +-- +-- * 'picAlt' +projectsIconsCreate + :: Text -- ^ 'projectId' + -> ProjectsIconsCreate +projectsIconsCreate pPicProjectId_ = + ProjectsIconsCreate + { _picQuotaUser = Nothing + , _picPrettyPrint = True + , _picUserIp = Nothing + , _picKey = Nothing + , _picProjectId = pPicProjectId_ + , _picOauthToken = Nothing + , _picFields = Nothing + , _picAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +picQuotaUser :: Lens' ProjectsIconsCreate' (Maybe Text) +picQuotaUser + = lens _picQuotaUser (\ s a -> s{_picQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +picPrettyPrint :: Lens' ProjectsIconsCreate' Bool +picPrettyPrint + = lens _picPrettyPrint + (\ s a -> s{_picPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +picUserIp :: Lens' ProjectsIconsCreate' (Maybe Text) +picUserIp + = lens _picUserIp (\ s a -> s{_picUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +picKey :: Lens' ProjectsIconsCreate' (Maybe Text) +picKey = lens _picKey (\ s a -> s{_picKey = a}) + +-- | The ID of the project. +picProjectId :: Lens' ProjectsIconsCreate' Text +picProjectId + = lens _picProjectId (\ s a -> s{_picProjectId = a}) + +-- | OAuth 2.0 token for the current user. +picOauthToken :: Lens' ProjectsIconsCreate' (Maybe Text) +picOauthToken + = lens _picOauthToken + (\ s a -> s{_picOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +picFields :: Lens' ProjectsIconsCreate' (Maybe Text) +picFields + = lens _picFields (\ s a -> s{_picFields = a}) + +-- | Data format for the response. +picAlt :: Lens' ProjectsIconsCreate' Text +picAlt = lens _picAlt (\ s a -> s{_picAlt = a}) + +instance GoogleRequest ProjectsIconsCreate' where + type Rs ProjectsIconsCreate' = Icon + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u ProjectsIconsCreate{..} + = go _picQuotaUser _picPrettyPrint _picUserIp _picKey + _picProjectId + _picOauthToken + _picFields + _picAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsIconsCreateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Get.hs new file mode 100644 index 000000000..05c153559 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Projects.Icons.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return an icon or its associated metadata +-- +-- /See:/ for @MapsengineProjectsIconsGet@. +module Mapsengine.Projects.Icons.Get + ( + -- * REST Resource + ProjectsIconsGetAPI + + -- * Creating a Request + , projectsIconsGet + , ProjectsIconsGet + + -- * Request Lenses + , pigQuotaUser + , pigPrettyPrint + , pigUserIp + , pigKey + , pigId + , pigProjectId + , pigOauthToken + , pigFields + , pigAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineProjectsIconsGet@ which the +-- 'ProjectsIconsGet' request conforms to. +type ProjectsIconsGetAPI = + "projects" :> + Capture "projectId" Text :> + "icons" :> Capture "id" Text :> Get '[JSON] Icon + +-- | Return an icon or its associated metadata +-- +-- /See:/ 'projectsIconsGet' smart constructor. +data ProjectsIconsGet = ProjectsIconsGet + { _pigQuotaUser :: !(Maybe Text) + , _pigPrettyPrint :: !Bool + , _pigUserIp :: !(Maybe Text) + , _pigKey :: !(Maybe Text) + , _pigId :: !Text + , _pigProjectId :: !Text + , _pigOauthToken :: !(Maybe Text) + , _pigFields :: !(Maybe Text) + , _pigAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsIconsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pigQuotaUser' +-- +-- * 'pigPrettyPrint' +-- +-- * 'pigUserIp' +-- +-- * 'pigKey' +-- +-- * 'pigId' +-- +-- * 'pigProjectId' +-- +-- * 'pigOauthToken' +-- +-- * 'pigFields' +-- +-- * 'pigAlt' +projectsIconsGet + :: Text -- ^ 'id' + -> Text -- ^ 'projectId' + -> ProjectsIconsGet +projectsIconsGet pPigId_ pPigProjectId_ = + ProjectsIconsGet + { _pigQuotaUser = Nothing + , _pigPrettyPrint = True + , _pigUserIp = Nothing + , _pigKey = Nothing + , _pigId = pPigId_ + , _pigProjectId = pPigProjectId_ + , _pigOauthToken = Nothing + , _pigFields = Nothing + , _pigAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pigQuotaUser :: Lens' ProjectsIconsGet' (Maybe Text) +pigQuotaUser + = lens _pigQuotaUser (\ s a -> s{_pigQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pigPrettyPrint :: Lens' ProjectsIconsGet' Bool +pigPrettyPrint + = lens _pigPrettyPrint + (\ s a -> s{_pigPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pigUserIp :: Lens' ProjectsIconsGet' (Maybe Text) +pigUserIp + = lens _pigUserIp (\ s a -> s{_pigUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pigKey :: Lens' ProjectsIconsGet' (Maybe Text) +pigKey = lens _pigKey (\ s a -> s{_pigKey = a}) + +-- | The ID of the icon. +pigId :: Lens' ProjectsIconsGet' Text +pigId = lens _pigId (\ s a -> s{_pigId = a}) + +-- | The ID of the project. +pigProjectId :: Lens' ProjectsIconsGet' Text +pigProjectId + = lens _pigProjectId (\ s a -> s{_pigProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pigOauthToken :: Lens' ProjectsIconsGet' (Maybe Text) +pigOauthToken + = lens _pigOauthToken + (\ s a -> s{_pigOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pigFields :: Lens' ProjectsIconsGet' (Maybe Text) +pigFields + = lens _pigFields (\ s a -> s{_pigFields = a}) + +-- | Data format for the response. +pigAlt :: Lens' ProjectsIconsGet' Text +pigAlt = lens _pigAlt (\ s a -> s{_pigAlt = a}) + +instance GoogleRequest ProjectsIconsGet' where + type Rs ProjectsIconsGet' = Icon + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u ProjectsIconsGet{..} + = go _pigQuotaUser _pigPrettyPrint _pigUserIp _pigKey + _pigId + _pigProjectId + _pigOauthToken + _pigFields + _pigAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsIconsGetAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/List.hs new file mode 100644 index 000000000..30c9bf407 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/Icons/List.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Projects.Icons.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all icons in the current project +-- +-- /See:/ for @MapsengineProjectsIconsList@. +module Mapsengine.Projects.Icons.List + ( + -- * REST Resource + ProjectsIconsListAPI + + -- * Creating a Request + , projectsIconsList + , ProjectsIconsList + + -- * Request Lenses + , pilQuotaUser + , pilPrettyPrint + , pilUserIp + , pilKey + , pilPageToken + , pilProjectId + , pilOauthToken + , pilMaxResults + , pilFields + , pilAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineProjectsIconsList@ which the +-- 'ProjectsIconsList' request conforms to. +type ProjectsIconsListAPI = + "projects" :> + Capture "projectId" Text :> + "icons" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] IconsListResponse + +-- | Return all icons in the current project +-- +-- /See:/ 'projectsIconsList' smart constructor. +data ProjectsIconsList = ProjectsIconsList + { _pilQuotaUser :: !(Maybe Text) + , _pilPrettyPrint :: !Bool + , _pilUserIp :: !(Maybe Text) + , _pilKey :: !(Maybe Text) + , _pilPageToken :: !(Maybe Text) + , _pilProjectId :: !Text + , _pilOauthToken :: !(Maybe Text) + , _pilMaxResults :: !(Maybe Word32) + , _pilFields :: !(Maybe Text) + , _pilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsIconsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pilQuotaUser' +-- +-- * 'pilPrettyPrint' +-- +-- * 'pilUserIp' +-- +-- * 'pilKey' +-- +-- * 'pilPageToken' +-- +-- * 'pilProjectId' +-- +-- * 'pilOauthToken' +-- +-- * 'pilMaxResults' +-- +-- * 'pilFields' +-- +-- * 'pilAlt' +projectsIconsList + :: Text -- ^ 'projectId' + -> ProjectsIconsList +projectsIconsList pPilProjectId_ = + ProjectsIconsList + { _pilQuotaUser = Nothing + , _pilPrettyPrint = True + , _pilUserIp = Nothing + , _pilKey = Nothing + , _pilPageToken = Nothing + , _pilProjectId = pPilProjectId_ + , _pilOauthToken = Nothing + , _pilMaxResults = Nothing + , _pilFields = Nothing + , _pilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pilQuotaUser :: Lens' ProjectsIconsList' (Maybe Text) +pilQuotaUser + = lens _pilQuotaUser (\ s a -> s{_pilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pilPrettyPrint :: Lens' ProjectsIconsList' Bool +pilPrettyPrint + = lens _pilPrettyPrint + (\ s a -> s{_pilPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pilUserIp :: Lens' ProjectsIconsList' (Maybe Text) +pilUserIp + = lens _pilUserIp (\ s a -> s{_pilUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pilKey :: Lens' ProjectsIconsList' (Maybe Text) +pilKey = lens _pilKey (\ s a -> s{_pilKey = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +pilPageToken :: Lens' ProjectsIconsList' (Maybe Text) +pilPageToken + = lens _pilPageToken (\ s a -> s{_pilPageToken = a}) + +-- | The ID of the project. +pilProjectId :: Lens' ProjectsIconsList' Text +pilProjectId + = lens _pilProjectId (\ s a -> s{_pilProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pilOauthToken :: Lens' ProjectsIconsList' (Maybe Text) +pilOauthToken + = lens _pilOauthToken + (\ s a -> s{_pilOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +pilMaxResults :: Lens' ProjectsIconsList' (Maybe Word32) +pilMaxResults + = lens _pilMaxResults + (\ s a -> s{_pilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +pilFields :: Lens' ProjectsIconsList' (Maybe Text) +pilFields + = lens _pilFields (\ s a -> s{_pilFields = a}) + +-- | Data format for the response. +pilAlt :: Lens' ProjectsIconsList' Text +pilAlt = lens _pilAlt (\ s a -> s{_pilAlt = a}) + +instance GoogleRequest ProjectsIconsList' where + type Rs ProjectsIconsList' = IconsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u ProjectsIconsList{..} + = go _pilQuotaUser _pilPrettyPrint _pilUserIp _pilKey + _pilPageToken + _pilProjectId + _pilOauthToken + _pilMaxResults + _pilFields + _pilAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsIconsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/List.hs new file mode 100644 index 000000000..7f076660d --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Projects/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Projects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all projects readable by the current user. +-- +-- /See:/ for @MapsengineProjectsList@. +module Mapsengine.Projects.List + ( + -- * REST Resource + ProjectsListAPI + + -- * Creating a Request + , projectsList + , ProjectsList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plUserIp + , plKey + , plOauthToken + , plFields + , plAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineProjectsList@ which the +-- 'ProjectsList' request conforms to. +type ProjectsListAPI = + "projects" :> Get '[JSON] ProjectsListResponse + +-- | Return all projects readable by the current user. +-- +-- /See:/ 'projectsList' smart constructor. +data ProjectsList = ProjectsList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUserIp :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUserIp' +-- +-- * 'plKey' +-- +-- * 'plOauthToken' +-- +-- * 'plFields' +-- +-- * 'plAlt' +projectsList + :: ProjectsList +projectsList = + ProjectsList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUserIp = Nothing + , _plKey = Nothing + , _plOauthToken = Nothing + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' ProjectsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' ProjectsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' ProjectsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' ProjectsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' ProjectsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' ProjectsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' ProjectsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest ProjectsList' where + type Rs ProjectsList' = ProjectsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u ProjectsList{..} + = go _plQuotaUser _plPrettyPrint _plUserIp _plKey + _plOauthToken + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsListAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/CancelProcessing.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/CancelProcessing.hs new file mode 100644 index 000000000..602ac63ac --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/CancelProcessing.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.CancelProcessing +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancel processing on a raster collection asset. +-- +-- /See:/ for @MapsengineRasterCollectionsCancelProcessing@. +module Mapsengine.RasterCollections.CancelProcessing + ( + -- * REST Resource + RasterCollectionsCancelProcessingAPI + + -- * Creating a Request + , rasterCollectionsCancelProcessing + , RasterCollectionsCancelProcessing + + -- * Request Lenses + , rccpQuotaUser + , rccpPrettyPrint + , rccpUserIp + , rccpKey + , rccpId + , rccpOauthToken + , rccpFields + , rccpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsCancelProcessing@ which the +-- 'RasterCollectionsCancelProcessing' request conforms to. +type RasterCollectionsCancelProcessingAPI = + "rasterCollections" :> + Capture "id" Text :> + "cancelProcessing" :> Post '[JSON] ProcessResponse + +-- | Cancel processing on a raster collection asset. +-- +-- /See:/ 'rasterCollectionsCancelProcessing' smart constructor. +data RasterCollectionsCancelProcessing = RasterCollectionsCancelProcessing + { _rccpQuotaUser :: !(Maybe Text) + , _rccpPrettyPrint :: !Bool + , _rccpUserIp :: !(Maybe Text) + , _rccpKey :: !(Maybe Text) + , _rccpId :: !Text + , _rccpOauthToken :: !(Maybe Text) + , _rccpFields :: !(Maybe Text) + , _rccpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsCancelProcessing'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rccpQuotaUser' +-- +-- * 'rccpPrettyPrint' +-- +-- * 'rccpUserIp' +-- +-- * 'rccpKey' +-- +-- * 'rccpId' +-- +-- * 'rccpOauthToken' +-- +-- * 'rccpFields' +-- +-- * 'rccpAlt' +rasterCollectionsCancelProcessing + :: Text -- ^ 'id' + -> RasterCollectionsCancelProcessing +rasterCollectionsCancelProcessing pRccpId_ = + RasterCollectionsCancelProcessing + { _rccpQuotaUser = Nothing + , _rccpPrettyPrint = True + , _rccpUserIp = Nothing + , _rccpKey = Nothing + , _rccpId = pRccpId_ + , _rccpOauthToken = Nothing + , _rccpFields = Nothing + , _rccpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rccpQuotaUser :: Lens' RasterCollectionsCancelProcessing' (Maybe Text) +rccpQuotaUser + = lens _rccpQuotaUser + (\ s a -> s{_rccpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rccpPrettyPrint :: Lens' RasterCollectionsCancelProcessing' Bool +rccpPrettyPrint + = lens _rccpPrettyPrint + (\ s a -> s{_rccpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rccpUserIp :: Lens' RasterCollectionsCancelProcessing' (Maybe Text) +rccpUserIp + = lens _rccpUserIp (\ s a -> s{_rccpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rccpKey :: Lens' RasterCollectionsCancelProcessing' (Maybe Text) +rccpKey = lens _rccpKey (\ s a -> s{_rccpKey = a}) + +-- | The ID of the raster collection. +rccpId :: Lens' RasterCollectionsCancelProcessing' Text +rccpId = lens _rccpId (\ s a -> s{_rccpId = a}) + +-- | OAuth 2.0 token for the current user. +rccpOauthToken :: Lens' RasterCollectionsCancelProcessing' (Maybe Text) +rccpOauthToken + = lens _rccpOauthToken + (\ s a -> s{_rccpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rccpFields :: Lens' RasterCollectionsCancelProcessing' (Maybe Text) +rccpFields + = lens _rccpFields (\ s a -> s{_rccpFields = a}) + +-- | Data format for the response. +rccpAlt :: Lens' RasterCollectionsCancelProcessing' Text +rccpAlt = lens _rccpAlt (\ s a -> s{_rccpAlt = a}) + +instance GoogleRequest + RasterCollectionsCancelProcessing' where + type Rs RasterCollectionsCancelProcessing' = + ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsCancelProcessing{..} + = go _rccpQuotaUser _rccpPrettyPrint _rccpUserIp + _rccpKey + _rccpId + _rccpOauthToken + _rccpFields + _rccpAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsCancelProcessingAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Create.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Create.hs new file mode 100644 index 000000000..70d38687a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Create.hs @@ -0,0 +1,144 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a raster collection asset. +-- +-- /See:/ for @MapsengineRasterCollectionsCreate@. +module Mapsengine.RasterCollections.Create + ( + -- * REST Resource + RasterCollectionsCreateAPI + + -- * Creating a Request + , rasterCollectionsCreate + , RasterCollectionsCreate + + -- * Request Lenses + , rccQuotaUser + , rccPrettyPrint + , rccUserIp + , rccKey + , rccOauthToken + , rccFields + , rccAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsCreate@ which the +-- 'RasterCollectionsCreate' request conforms to. +type RasterCollectionsCreateAPI = + "rasterCollections" :> Post '[JSON] RasterCollection + +-- | Create a raster collection asset. +-- +-- /See:/ 'rasterCollectionsCreate' smart constructor. +data RasterCollectionsCreate = RasterCollectionsCreate + { _rccQuotaUser :: !(Maybe Text) + , _rccPrettyPrint :: !Bool + , _rccUserIp :: !(Maybe Text) + , _rccKey :: !(Maybe Text) + , _rccOauthToken :: !(Maybe Text) + , _rccFields :: !(Maybe Text) + , _rccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rccQuotaUser' +-- +-- * 'rccPrettyPrint' +-- +-- * 'rccUserIp' +-- +-- * 'rccKey' +-- +-- * 'rccOauthToken' +-- +-- * 'rccFields' +-- +-- * 'rccAlt' +rasterCollectionsCreate + :: RasterCollectionsCreate +rasterCollectionsCreate = + RasterCollectionsCreate + { _rccQuotaUser = Nothing + , _rccPrettyPrint = True + , _rccUserIp = Nothing + , _rccKey = Nothing + , _rccOauthToken = Nothing + , _rccFields = Nothing + , _rccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rccQuotaUser :: Lens' RasterCollectionsCreate' (Maybe Text) +rccQuotaUser + = lens _rccQuotaUser (\ s a -> s{_rccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rccPrettyPrint :: Lens' RasterCollectionsCreate' Bool +rccPrettyPrint + = lens _rccPrettyPrint + (\ s a -> s{_rccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rccUserIp :: Lens' RasterCollectionsCreate' (Maybe Text) +rccUserIp + = lens _rccUserIp (\ s a -> s{_rccUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rccKey :: Lens' RasterCollectionsCreate' (Maybe Text) +rccKey = lens _rccKey (\ s a -> s{_rccKey = a}) + +-- | OAuth 2.0 token for the current user. +rccOauthToken :: Lens' RasterCollectionsCreate' (Maybe Text) +rccOauthToken + = lens _rccOauthToken + (\ s a -> s{_rccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rccFields :: Lens' RasterCollectionsCreate' (Maybe Text) +rccFields + = lens _rccFields (\ s a -> s{_rccFields = a}) + +-- | Data format for the response. +rccAlt :: Lens' RasterCollectionsCreate' Text +rccAlt = lens _rccAlt (\ s a -> s{_rccAlt = a}) + +instance GoogleRequest RasterCollectionsCreate' where + type Rs RasterCollectionsCreate' = RasterCollection + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsCreate{..} + = go _rccQuotaUser _rccPrettyPrint _rccUserIp _rccKey + _rccOauthToken + _rccFields + _rccAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsCreateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Delete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Delete.hs new file mode 100644 index 000000000..1c62d2af7 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Delete.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a raster collection. +-- +-- /See:/ for @MapsengineRasterCollectionsDelete@. +module Mapsengine.RasterCollections.Delete + ( + -- * REST Resource + RasterCollectionsDeleteAPI + + -- * Creating a Request + , rasterCollectionsDelete + , RasterCollectionsDelete + + -- * Request Lenses + , rcdQuotaUser + , rcdPrettyPrint + , rcdUserIp + , rcdKey + , rcdId + , rcdOauthToken + , rcdFields + , rcdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsDelete@ which the +-- 'RasterCollectionsDelete' request conforms to. +type RasterCollectionsDeleteAPI = + "rasterCollections" :> + Capture "id" Text :> Delete '[JSON] () + +-- | Delete a raster collection. +-- +-- /See:/ 'rasterCollectionsDelete' smart constructor. +data RasterCollectionsDelete = RasterCollectionsDelete + { _rcdQuotaUser :: !(Maybe Text) + , _rcdPrettyPrint :: !Bool + , _rcdUserIp :: !(Maybe Text) + , _rcdKey :: !(Maybe Text) + , _rcdId :: !Text + , _rcdOauthToken :: !(Maybe Text) + , _rcdFields :: !(Maybe Text) + , _rcdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcdQuotaUser' +-- +-- * 'rcdPrettyPrint' +-- +-- * 'rcdUserIp' +-- +-- * 'rcdKey' +-- +-- * 'rcdId' +-- +-- * 'rcdOauthToken' +-- +-- * 'rcdFields' +-- +-- * 'rcdAlt' +rasterCollectionsDelete + :: Text -- ^ 'id' + -> RasterCollectionsDelete +rasterCollectionsDelete pRcdId_ = + RasterCollectionsDelete + { _rcdQuotaUser = Nothing + , _rcdPrettyPrint = True + , _rcdUserIp = Nothing + , _rcdKey = Nothing + , _rcdId = pRcdId_ + , _rcdOauthToken = Nothing + , _rcdFields = Nothing + , _rcdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcdQuotaUser :: Lens' RasterCollectionsDelete' (Maybe Text) +rcdQuotaUser + = lens _rcdQuotaUser (\ s a -> s{_rcdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcdPrettyPrint :: Lens' RasterCollectionsDelete' Bool +rcdPrettyPrint + = lens _rcdPrettyPrint + (\ s a -> s{_rcdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcdUserIp :: Lens' RasterCollectionsDelete' (Maybe Text) +rcdUserIp + = lens _rcdUserIp (\ s a -> s{_rcdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcdKey :: Lens' RasterCollectionsDelete' (Maybe Text) +rcdKey = lens _rcdKey (\ s a -> s{_rcdKey = a}) + +-- | The ID of the raster collection. Only the raster collection creator or +-- project owner are permitted to delete. If the rastor collection is +-- included in a layer, the request will fail. Remove the raster collection +-- from all layers prior to deleting. +rcdId :: Lens' RasterCollectionsDelete' Text +rcdId = lens _rcdId (\ s a -> s{_rcdId = a}) + +-- | OAuth 2.0 token for the current user. +rcdOauthToken :: Lens' RasterCollectionsDelete' (Maybe Text) +rcdOauthToken + = lens _rcdOauthToken + (\ s a -> s{_rcdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcdFields :: Lens' RasterCollectionsDelete' (Maybe Text) +rcdFields + = lens _rcdFields (\ s a -> s{_rcdFields = a}) + +-- | Data format for the response. +rcdAlt :: Lens' RasterCollectionsDelete' Text +rcdAlt = lens _rcdAlt (\ s a -> s{_rcdAlt = a}) + +instance GoogleRequest RasterCollectionsDelete' where + type Rs RasterCollectionsDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsDelete{..} + = go _rcdQuotaUser _rcdPrettyPrint _rcdUserIp _rcdKey + _rcdId + _rcdOauthToken + _rcdFields + _rcdAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Get.hs new file mode 100644 index 000000000..c36914285 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Get.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a particular raster collection. +-- +-- /See:/ for @MapsengineRasterCollectionsGet@. +module Mapsengine.RasterCollections.Get + ( + -- * REST Resource + RasterCollectionsGetAPI + + -- * Creating a Request + , rasterCollectionsGet + , RasterCollectionsGet + + -- * Request Lenses + , rcgQuotaUser + , rcgPrettyPrint + , rcgUserIp + , rcgKey + , rcgId + , rcgOauthToken + , rcgFields + , rcgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsGet@ which the +-- 'RasterCollectionsGet' request conforms to. +type RasterCollectionsGetAPI = + "rasterCollections" :> + Capture "id" Text :> Get '[JSON] RasterCollection + +-- | Return metadata for a particular raster collection. +-- +-- /See:/ 'rasterCollectionsGet' smart constructor. +data RasterCollectionsGet = RasterCollectionsGet + { _rcgQuotaUser :: !(Maybe Text) + , _rcgPrettyPrint :: !Bool + , _rcgUserIp :: !(Maybe Text) + , _rcgKey :: !(Maybe Text) + , _rcgId :: !Text + , _rcgOauthToken :: !(Maybe Text) + , _rcgFields :: !(Maybe Text) + , _rcgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcgQuotaUser' +-- +-- * 'rcgPrettyPrint' +-- +-- * 'rcgUserIp' +-- +-- * 'rcgKey' +-- +-- * 'rcgId' +-- +-- * 'rcgOauthToken' +-- +-- * 'rcgFields' +-- +-- * 'rcgAlt' +rasterCollectionsGet + :: Text -- ^ 'id' + -> RasterCollectionsGet +rasterCollectionsGet pRcgId_ = + RasterCollectionsGet + { _rcgQuotaUser = Nothing + , _rcgPrettyPrint = True + , _rcgUserIp = Nothing + , _rcgKey = Nothing + , _rcgId = pRcgId_ + , _rcgOauthToken = Nothing + , _rcgFields = Nothing + , _rcgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcgQuotaUser :: Lens' RasterCollectionsGet' (Maybe Text) +rcgQuotaUser + = lens _rcgQuotaUser (\ s a -> s{_rcgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcgPrettyPrint :: Lens' RasterCollectionsGet' Bool +rcgPrettyPrint + = lens _rcgPrettyPrint + (\ s a -> s{_rcgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcgUserIp :: Lens' RasterCollectionsGet' (Maybe Text) +rcgUserIp + = lens _rcgUserIp (\ s a -> s{_rcgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcgKey :: Lens' RasterCollectionsGet' (Maybe Text) +rcgKey = lens _rcgKey (\ s a -> s{_rcgKey = a}) + +-- | The ID of the raster collection. +rcgId :: Lens' RasterCollectionsGet' Text +rcgId = lens _rcgId (\ s a -> s{_rcgId = a}) + +-- | OAuth 2.0 token for the current user. +rcgOauthToken :: Lens' RasterCollectionsGet' (Maybe Text) +rcgOauthToken + = lens _rcgOauthToken + (\ s a -> s{_rcgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcgFields :: Lens' RasterCollectionsGet' (Maybe Text) +rcgFields + = lens _rcgFields (\ s a -> s{_rcgFields = a}) + +-- | Data format for the response. +rcgAlt :: Lens' RasterCollectionsGet' Text +rcgAlt = lens _rcgAlt (\ s a -> s{_rcgAlt = a}) + +instance GoogleRequest RasterCollectionsGet' where + type Rs RasterCollectionsGet' = RasterCollection + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsGet{..} + = go _rcgQuotaUser _rcgPrettyPrint _rcgUserIp _rcgKey + _rcgId + _rcgOauthToken + _rcgFields + _rcgAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsGetAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/List.hs new file mode 100644 index 000000000..d8d247daa --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/List.hs @@ -0,0 +1,321 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all raster collections readable by the current user. +-- +-- /See:/ for @MapsengineRasterCollectionsList@. +module Mapsengine.RasterCollections.List + ( + -- * REST Resource + RasterCollectionsListAPI + + -- * Creating a Request + , rasterCollectionsList + , RasterCollectionsList + + -- * Request Lenses + , rclCreatedAfter + , rclQuotaUser + , rclPrettyPrint + , rclUserIp + , rclCreatorEmail + , rclRole + , rclKey + , rclBbox + , rclProcessingStatus + , rclModifiedAfter + , rclModifiedBefore + , rclPageToken + , rclProjectId + , rclOauthToken + , rclSearch + , rclMaxResults + , rclTags + , rclFields + , rclCreatedBefore + , rclAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsList@ which the +-- 'RasterCollectionsList' request conforms to. +type RasterCollectionsListAPI = + "rasterCollections" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "processingStatus" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] RasterCollectionsListResponse + +-- | Return all raster collections readable by the current user. +-- +-- /See:/ 'rasterCollectionsList' smart constructor. +data RasterCollectionsList = RasterCollectionsList + { _rclCreatedAfter :: !(Maybe UTCTime) + , _rclQuotaUser :: !(Maybe Text) + , _rclPrettyPrint :: !Bool + , _rclUserIp :: !(Maybe Text) + , _rclCreatorEmail :: !(Maybe Text) + , _rclRole :: !(Maybe Text) + , _rclKey :: !(Maybe Text) + , _rclBbox :: !(Maybe Text) + , _rclProcessingStatus :: !(Maybe Text) + , _rclModifiedAfter :: !(Maybe UTCTime) + , _rclModifiedBefore :: !(Maybe UTCTime) + , _rclPageToken :: !(Maybe Text) + , _rclProjectId :: !(Maybe Text) + , _rclOauthToken :: !(Maybe Text) + , _rclSearch :: !(Maybe Text) + , _rclMaxResults :: !(Maybe Word32) + , _rclTags :: !(Maybe Text) + , _rclFields :: !(Maybe Text) + , _rclCreatedBefore :: !(Maybe UTCTime) + , _rclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rclCreatedAfter' +-- +-- * 'rclQuotaUser' +-- +-- * 'rclPrettyPrint' +-- +-- * 'rclUserIp' +-- +-- * 'rclCreatorEmail' +-- +-- * 'rclRole' +-- +-- * 'rclKey' +-- +-- * 'rclBbox' +-- +-- * 'rclProcessingStatus' +-- +-- * 'rclModifiedAfter' +-- +-- * 'rclModifiedBefore' +-- +-- * 'rclPageToken' +-- +-- * 'rclProjectId' +-- +-- * 'rclOauthToken' +-- +-- * 'rclSearch' +-- +-- * 'rclMaxResults' +-- +-- * 'rclTags' +-- +-- * 'rclFields' +-- +-- * 'rclCreatedBefore' +-- +-- * 'rclAlt' +rasterCollectionsList + :: RasterCollectionsList +rasterCollectionsList = + RasterCollectionsList + { _rclCreatedAfter = Nothing + , _rclQuotaUser = Nothing + , _rclPrettyPrint = True + , _rclUserIp = Nothing + , _rclCreatorEmail = Nothing + , _rclRole = Nothing + , _rclKey = Nothing + , _rclBbox = Nothing + , _rclProcessingStatus = Nothing + , _rclModifiedAfter = Nothing + , _rclModifiedBefore = Nothing + , _rclPageToken = Nothing + , _rclProjectId = Nothing + , _rclOauthToken = Nothing + , _rclSearch = Nothing + , _rclMaxResults = Nothing + , _rclTags = Nothing + , _rclFields = Nothing + , _rclCreatedBefore = Nothing + , _rclAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +rclCreatedAfter :: Lens' RasterCollectionsList' (Maybe UTCTime) +rclCreatedAfter + = lens _rclCreatedAfter + (\ s a -> s{_rclCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rclQuotaUser :: Lens' RasterCollectionsList' (Maybe Text) +rclQuotaUser + = lens _rclQuotaUser (\ s a -> s{_rclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rclPrettyPrint :: Lens' RasterCollectionsList' Bool +rclPrettyPrint + = lens _rclPrettyPrint + (\ s a -> s{_rclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rclUserIp :: Lens' RasterCollectionsList' (Maybe Text) +rclUserIp + = lens _rclUserIp (\ s a -> s{_rclUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +rclCreatorEmail :: Lens' RasterCollectionsList' (Maybe Text) +rclCreatorEmail + = lens _rclCreatorEmail + (\ s a -> s{_rclCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +rclRole :: Lens' RasterCollectionsList' (Maybe Text) +rclRole = lens _rclRole (\ s a -> s{_rclRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rclKey :: Lens' RasterCollectionsList' (Maybe Text) +rclKey = lens _rclKey (\ s a -> s{_rclKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +rclBbox :: Lens' RasterCollectionsList' (Maybe Text) +rclBbox = lens _rclBbox (\ s a -> s{_rclBbox = a}) + +rclProcessingStatus :: Lens' RasterCollectionsList' (Maybe Text) +rclProcessingStatus + = lens _rclProcessingStatus + (\ s a -> s{_rclProcessingStatus = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +rclModifiedAfter :: Lens' RasterCollectionsList' (Maybe UTCTime) +rclModifiedAfter + = lens _rclModifiedAfter + (\ s a -> s{_rclModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +rclModifiedBefore :: Lens' RasterCollectionsList' (Maybe UTCTime) +rclModifiedBefore + = lens _rclModifiedBefore + (\ s a -> s{_rclModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rclPageToken :: Lens' RasterCollectionsList' (Maybe Text) +rclPageToken + = lens _rclPageToken (\ s a -> s{_rclPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +rclProjectId :: Lens' RasterCollectionsList' (Maybe Text) +rclProjectId + = lens _rclProjectId (\ s a -> s{_rclProjectId = a}) + +-- | OAuth 2.0 token for the current user. +rclOauthToken :: Lens' RasterCollectionsList' (Maybe Text) +rclOauthToken + = lens _rclOauthToken + (\ s a -> s{_rclOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +rclSearch :: Lens' RasterCollectionsList' (Maybe Text) +rclSearch + = lens _rclSearch (\ s a -> s{_rclSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +rclMaxResults :: Lens' RasterCollectionsList' (Maybe Word32) +rclMaxResults + = lens _rclMaxResults + (\ s a -> s{_rclMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +rclTags :: Lens' RasterCollectionsList' (Maybe Text) +rclTags = lens _rclTags (\ s a -> s{_rclTags = a}) + +-- | Selector specifying which fields to include in a partial response. +rclFields :: Lens' RasterCollectionsList' (Maybe Text) +rclFields + = lens _rclFields (\ s a -> s{_rclFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +rclCreatedBefore :: Lens' RasterCollectionsList' (Maybe UTCTime) +rclCreatedBefore + = lens _rclCreatedBefore + (\ s a -> s{_rclCreatedBefore = a}) + +-- | Data format for the response. +rclAlt :: Lens' RasterCollectionsList' Text +rclAlt = lens _rclAlt (\ s a -> s{_rclAlt = a}) + +instance GoogleRequest RasterCollectionsList' where + type Rs RasterCollectionsList' = + RasterCollectionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsList{..} + = go _rclCreatedAfter _rclQuotaUser _rclPrettyPrint + _rclUserIp + _rclCreatorEmail + _rclRole + _rclKey + _rclBbox + _rclProcessingStatus + _rclModifiedAfter + _rclModifiedBefore + _rclPageToken + _rclProjectId + _rclOauthToken + _rclSearch + _rclMaxResults + _rclTags + _rclFields + _rclCreatedBefore + _rclAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Parents/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Parents/List.hs new file mode 100644 index 000000000..6bd37b85b --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Parents/List.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all parent ids of the specified raster collection. +-- +-- /See:/ for @MapsengineRasterCollectionsParentsList@. +module Mapsengine.RasterCollections.Parents.List + ( + -- * REST Resource + RasterCollectionsParentsListAPI + + -- * Creating a Request + , rasterCollectionsParentsList + , RasterCollectionsParentsList + + -- * Request Lenses + , rcplQuotaUser + , rcplPrettyPrint + , rcplUserIp + , rcplKey + , rcplId + , rcplPageToken + , rcplOauthToken + , rcplMaxResults + , rcplFields + , rcplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsParentsList@ which the +-- 'RasterCollectionsParentsList' request conforms to. +type RasterCollectionsParentsListAPI = + "rasterCollections" :> + Capture "id" Text :> + "parents" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ParentsListResponse + +-- | Return all parent ids of the specified raster collection. +-- +-- /See:/ 'rasterCollectionsParentsList' smart constructor. +data RasterCollectionsParentsList = RasterCollectionsParentsList + { _rcplQuotaUser :: !(Maybe Text) + , _rcplPrettyPrint :: !Bool + , _rcplUserIp :: !(Maybe Text) + , _rcplKey :: !(Maybe Text) + , _rcplId :: !Text + , _rcplPageToken :: !(Maybe Text) + , _rcplOauthToken :: !(Maybe Text) + , _rcplMaxResults :: !(Maybe Word32) + , _rcplFields :: !(Maybe Text) + , _rcplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcplQuotaUser' +-- +-- * 'rcplPrettyPrint' +-- +-- * 'rcplUserIp' +-- +-- * 'rcplKey' +-- +-- * 'rcplId' +-- +-- * 'rcplPageToken' +-- +-- * 'rcplOauthToken' +-- +-- * 'rcplMaxResults' +-- +-- * 'rcplFields' +-- +-- * 'rcplAlt' +rasterCollectionsParentsList + :: Text -- ^ 'id' + -> RasterCollectionsParentsList +rasterCollectionsParentsList pRcplId_ = + RasterCollectionsParentsList + { _rcplQuotaUser = Nothing + , _rcplPrettyPrint = True + , _rcplUserIp = Nothing + , _rcplKey = Nothing + , _rcplId = pRcplId_ + , _rcplPageToken = Nothing + , _rcplOauthToken = Nothing + , _rcplMaxResults = Nothing + , _rcplFields = Nothing + , _rcplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcplQuotaUser :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplQuotaUser + = lens _rcplQuotaUser + (\ s a -> s{_rcplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcplPrettyPrint :: Lens' RasterCollectionsParentsList' Bool +rcplPrettyPrint + = lens _rcplPrettyPrint + (\ s a -> s{_rcplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcplUserIp :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplUserIp + = lens _rcplUserIp (\ s a -> s{_rcplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcplKey :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplKey = lens _rcplKey (\ s a -> s{_rcplKey = a}) + +-- | The ID of the raster collection whose parents will be listed. +rcplId :: Lens' RasterCollectionsParentsList' Text +rcplId = lens _rcplId (\ s a -> s{_rcplId = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rcplPageToken :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplPageToken + = lens _rcplPageToken + (\ s a -> s{_rcplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rcplOauthToken :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplOauthToken + = lens _rcplOauthToken + (\ s a -> s{_rcplOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +rcplMaxResults :: Lens' RasterCollectionsParentsList' (Maybe Word32) +rcplMaxResults + = lens _rcplMaxResults + (\ s a -> s{_rcplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rcplFields :: Lens' RasterCollectionsParentsList' (Maybe Text) +rcplFields + = lens _rcplFields (\ s a -> s{_rcplFields = a}) + +-- | Data format for the response. +rcplAlt :: Lens' RasterCollectionsParentsList' Text +rcplAlt = lens _rcplAlt (\ s a -> s{_rcplAlt = a}) + +instance GoogleRequest RasterCollectionsParentsList' + where + type Rs RasterCollectionsParentsList' = + ParentsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsParentsList{..} + = go _rcplQuotaUser _rcplPrettyPrint _rcplUserIp + _rcplKey + _rcplId + _rcplPageToken + _rcplOauthToken + _rcplMaxResults + _rcplFields + _rcplAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsParentsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Patch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Patch.hs new file mode 100644 index 000000000..fac3bc675 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Patch.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Mutate a raster collection asset. +-- +-- /See:/ for @MapsengineRasterCollectionsPatch@. +module Mapsengine.RasterCollections.Patch + ( + -- * REST Resource + RasterCollectionsPatchAPI + + -- * Creating a Request + , rasterCollectionsPatch + , RasterCollectionsPatch + + -- * Request Lenses + , rcpcQuotaUser + , rcpcPrettyPrint + , rcpcUserIp + , rcpcKey + , rcpcId + , rcpcOauthToken + , rcpcFields + , rcpcAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsPatch@ which the +-- 'RasterCollectionsPatch' request conforms to. +type RasterCollectionsPatchAPI = + "rasterCollections" :> + Capture "id" Text :> Patch '[JSON] () + +-- | Mutate a raster collection asset. +-- +-- /See:/ 'rasterCollectionsPatch' smart constructor. +data RasterCollectionsPatch = RasterCollectionsPatch + { _rcpcQuotaUser :: !(Maybe Text) + , _rcpcPrettyPrint :: !Bool + , _rcpcUserIp :: !(Maybe Text) + , _rcpcKey :: !(Maybe Text) + , _rcpcId :: !Text + , _rcpcOauthToken :: !(Maybe Text) + , _rcpcFields :: !(Maybe Text) + , _rcpcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcpcQuotaUser' +-- +-- * 'rcpcPrettyPrint' +-- +-- * 'rcpcUserIp' +-- +-- * 'rcpcKey' +-- +-- * 'rcpcId' +-- +-- * 'rcpcOauthToken' +-- +-- * 'rcpcFields' +-- +-- * 'rcpcAlt' +rasterCollectionsPatch + :: Text -- ^ 'id' + -> RasterCollectionsPatch +rasterCollectionsPatch pRcpcId_ = + RasterCollectionsPatch + { _rcpcQuotaUser = Nothing + , _rcpcPrettyPrint = True + , _rcpcUserIp = Nothing + , _rcpcKey = Nothing + , _rcpcId = pRcpcId_ + , _rcpcOauthToken = Nothing + , _rcpcFields = Nothing + , _rcpcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcpcQuotaUser :: Lens' RasterCollectionsPatch' (Maybe Text) +rcpcQuotaUser + = lens _rcpcQuotaUser + (\ s a -> s{_rcpcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcpcPrettyPrint :: Lens' RasterCollectionsPatch' Bool +rcpcPrettyPrint + = lens _rcpcPrettyPrint + (\ s a -> s{_rcpcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcpcUserIp :: Lens' RasterCollectionsPatch' (Maybe Text) +rcpcUserIp + = lens _rcpcUserIp (\ s a -> s{_rcpcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcpcKey :: Lens' RasterCollectionsPatch' (Maybe Text) +rcpcKey = lens _rcpcKey (\ s a -> s{_rcpcKey = a}) + +-- | The ID of the raster collection. +rcpcId :: Lens' RasterCollectionsPatch' Text +rcpcId = lens _rcpcId (\ s a -> s{_rcpcId = a}) + +-- | OAuth 2.0 token for the current user. +rcpcOauthToken :: Lens' RasterCollectionsPatch' (Maybe Text) +rcpcOauthToken + = lens _rcpcOauthToken + (\ s a -> s{_rcpcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcpcFields :: Lens' RasterCollectionsPatch' (Maybe Text) +rcpcFields + = lens _rcpcFields (\ s a -> s{_rcpcFields = a}) + +-- | Data format for the response. +rcpcAlt :: Lens' RasterCollectionsPatch' Text +rcpcAlt = lens _rcpcAlt (\ s a -> s{_rcpcAlt = a}) + +instance GoogleRequest RasterCollectionsPatch' where + type Rs RasterCollectionsPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsPatch{..} + = go _rcpcQuotaUser _rcpcPrettyPrint _rcpcUserIp + _rcpcKey + _rcpcId + _rcpcOauthToken + _rcpcFields + _rcpcAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsPatchAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchDelete.hs new file mode 100644 index 000000000..2211ec09b --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchDelete.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ for @MapsengineRasterCollectionsPermissionsBatchDelete@. +module Mapsengine.RasterCollections.Permissions.BatchDelete + ( + -- * REST Resource + RasterCollectionsPermissionsBatchDeleteAPI + + -- * Creating a Request + , rasterCollectionsPermissionsBatchDelete + , RasterCollectionsPermissionsBatchDelete + + -- * Request Lenses + , rcpbdQuotaUser + , rcpbdPrettyPrint + , rcpbdUserIp + , rcpbdKey + , rcpbdId + , rcpbdOauthToken + , rcpbdFields + , rcpbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsPermissionsBatchDelete@ which the +-- 'RasterCollectionsPermissionsBatchDelete' request conforms to. +type RasterCollectionsPermissionsBatchDeleteAPI = + "rasterCollections" :> + Capture "id" Text :> + "permissions" :> + "batchDelete" :> + Post '[JSON] PermissionsBatchDeleteResponse + +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ 'rasterCollectionsPermissionsBatchDelete' smart constructor. +data RasterCollectionsPermissionsBatchDelete = RasterCollectionsPermissionsBatchDelete + { _rcpbdQuotaUser :: !(Maybe Text) + , _rcpbdPrettyPrint :: !Bool + , _rcpbdUserIp :: !(Maybe Text) + , _rcpbdKey :: !(Maybe Text) + , _rcpbdId :: !Text + , _rcpbdOauthToken :: !(Maybe Text) + , _rcpbdFields :: !(Maybe Text) + , _rcpbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsPermissionsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcpbdQuotaUser' +-- +-- * 'rcpbdPrettyPrint' +-- +-- * 'rcpbdUserIp' +-- +-- * 'rcpbdKey' +-- +-- * 'rcpbdId' +-- +-- * 'rcpbdOauthToken' +-- +-- * 'rcpbdFields' +-- +-- * 'rcpbdAlt' +rasterCollectionsPermissionsBatchDelete + :: Text -- ^ 'id' + -> RasterCollectionsPermissionsBatchDelete +rasterCollectionsPermissionsBatchDelete pRcpbdId_ = + RasterCollectionsPermissionsBatchDelete + { _rcpbdQuotaUser = Nothing + , _rcpbdPrettyPrint = True + , _rcpbdUserIp = Nothing + , _rcpbdKey = Nothing + , _rcpbdId = pRcpbdId_ + , _rcpbdOauthToken = Nothing + , _rcpbdFields = Nothing + , _rcpbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcpbdQuotaUser :: Lens' RasterCollectionsPermissionsBatchDelete' (Maybe Text) +rcpbdQuotaUser + = lens _rcpbdQuotaUser + (\ s a -> s{_rcpbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcpbdPrettyPrint :: Lens' RasterCollectionsPermissionsBatchDelete' Bool +rcpbdPrettyPrint + = lens _rcpbdPrettyPrint + (\ s a -> s{_rcpbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcpbdUserIp :: Lens' RasterCollectionsPermissionsBatchDelete' (Maybe Text) +rcpbdUserIp + = lens _rcpbdUserIp (\ s a -> s{_rcpbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcpbdKey :: Lens' RasterCollectionsPermissionsBatchDelete' (Maybe Text) +rcpbdKey = lens _rcpbdKey (\ s a -> s{_rcpbdKey = a}) + +-- | The ID of the asset from which permissions will be removed. +rcpbdId :: Lens' RasterCollectionsPermissionsBatchDelete' Text +rcpbdId = lens _rcpbdId (\ s a -> s{_rcpbdId = a}) + +-- | OAuth 2.0 token for the current user. +rcpbdOauthToken :: Lens' RasterCollectionsPermissionsBatchDelete' (Maybe Text) +rcpbdOauthToken + = lens _rcpbdOauthToken + (\ s a -> s{_rcpbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcpbdFields :: Lens' RasterCollectionsPermissionsBatchDelete' (Maybe Text) +rcpbdFields + = lens _rcpbdFields (\ s a -> s{_rcpbdFields = a}) + +-- | Data format for the response. +rcpbdAlt :: Lens' RasterCollectionsPermissionsBatchDelete' Text +rcpbdAlt = lens _rcpbdAlt (\ s a -> s{_rcpbdAlt = a}) + +instance GoogleRequest + RasterCollectionsPermissionsBatchDelete' where + type Rs RasterCollectionsPermissionsBatchDelete' = + PermissionsBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsPermissionsBatchDelete{..} + = go _rcpbdQuotaUser _rcpbdPrettyPrint _rcpbdUserIp + _rcpbdKey + _rcpbdId + _rcpbdOauthToken + _rcpbdFields + _rcpbdAlt + where go + = clientWithRoute + (Proxy :: + Proxy RasterCollectionsPermissionsBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchUpdate.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchUpdate.hs new file mode 100644 index 000000000..1d350f039 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/BatchUpdate.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchUpdate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ for @MapsengineRasterCollectionsPermissionsBatchUpdate@. +module Mapsengine.RasterCollections.Permissions.BatchUpdate + ( + -- * REST Resource + RasterCollectionsPermissionsBatchUpdateAPI + + -- * Creating a Request + , rasterCollectionsPermissionsBatchUpdate + , RasterCollectionsPermissionsBatchUpdate + + -- * Request Lenses + , rcpbuQuotaUser + , rcpbuPrettyPrint + , rcpbuUserIp + , rcpbuKey + , rcpbuId + , rcpbuOauthToken + , rcpbuFields + , rcpbuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsPermissionsBatchUpdate@ which the +-- 'RasterCollectionsPermissionsBatchUpdate' request conforms to. +type RasterCollectionsPermissionsBatchUpdateAPI = + "rasterCollections" :> + Capture "id" Text :> + "permissions" :> + "batchUpdate" :> + Post '[JSON] PermissionsBatchUpdateResponse + +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ 'rasterCollectionsPermissionsBatchUpdate' smart constructor. +data RasterCollectionsPermissionsBatchUpdate = RasterCollectionsPermissionsBatchUpdate + { _rcpbuQuotaUser :: !(Maybe Text) + , _rcpbuPrettyPrint :: !Bool + , _rcpbuUserIp :: !(Maybe Text) + , _rcpbuKey :: !(Maybe Text) + , _rcpbuId :: !Text + , _rcpbuOauthToken :: !(Maybe Text) + , _rcpbuFields :: !(Maybe Text) + , _rcpbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsPermissionsBatchUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcpbuQuotaUser' +-- +-- * 'rcpbuPrettyPrint' +-- +-- * 'rcpbuUserIp' +-- +-- * 'rcpbuKey' +-- +-- * 'rcpbuId' +-- +-- * 'rcpbuOauthToken' +-- +-- * 'rcpbuFields' +-- +-- * 'rcpbuAlt' +rasterCollectionsPermissionsBatchUpdate + :: Text -- ^ 'id' + -> RasterCollectionsPermissionsBatchUpdate +rasterCollectionsPermissionsBatchUpdate pRcpbuId_ = + RasterCollectionsPermissionsBatchUpdate + { _rcpbuQuotaUser = Nothing + , _rcpbuPrettyPrint = True + , _rcpbuUserIp = Nothing + , _rcpbuKey = Nothing + , _rcpbuId = pRcpbuId_ + , _rcpbuOauthToken = Nothing + , _rcpbuFields = Nothing + , _rcpbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcpbuQuotaUser :: Lens' RasterCollectionsPermissionsBatchUpdate' (Maybe Text) +rcpbuQuotaUser + = lens _rcpbuQuotaUser + (\ s a -> s{_rcpbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcpbuPrettyPrint :: Lens' RasterCollectionsPermissionsBatchUpdate' Bool +rcpbuPrettyPrint + = lens _rcpbuPrettyPrint + (\ s a -> s{_rcpbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcpbuUserIp :: Lens' RasterCollectionsPermissionsBatchUpdate' (Maybe Text) +rcpbuUserIp + = lens _rcpbuUserIp (\ s a -> s{_rcpbuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcpbuKey :: Lens' RasterCollectionsPermissionsBatchUpdate' (Maybe Text) +rcpbuKey = lens _rcpbuKey (\ s a -> s{_rcpbuKey = a}) + +-- | The ID of the asset to which permissions will be added. +rcpbuId :: Lens' RasterCollectionsPermissionsBatchUpdate' Text +rcpbuId = lens _rcpbuId (\ s a -> s{_rcpbuId = a}) + +-- | OAuth 2.0 token for the current user. +rcpbuOauthToken :: Lens' RasterCollectionsPermissionsBatchUpdate' (Maybe Text) +rcpbuOauthToken + = lens _rcpbuOauthToken + (\ s a -> s{_rcpbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcpbuFields :: Lens' RasterCollectionsPermissionsBatchUpdate' (Maybe Text) +rcpbuFields + = lens _rcpbuFields (\ s a -> s{_rcpbuFields = a}) + +-- | Data format for the response. +rcpbuAlt :: Lens' RasterCollectionsPermissionsBatchUpdate' Text +rcpbuAlt = lens _rcpbuAlt (\ s a -> s{_rcpbuAlt = a}) + +instance GoogleRequest + RasterCollectionsPermissionsBatchUpdate' where + type Rs RasterCollectionsPermissionsBatchUpdate' = + PermissionsBatchUpdateResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsPermissionsBatchUpdate{..} + = go _rcpbuQuotaUser _rcpbuPrettyPrint _rcpbuUserIp + _rcpbuKey + _rcpbuId + _rcpbuOauthToken + _rcpbuFields + _rcpbuAlt + where go + = clientWithRoute + (Proxy :: + Proxy RasterCollectionsPermissionsBatchUpdateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/List.hs new file mode 100644 index 000000000..445ba6584 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Permissions/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineRasterCollectionsPermissionsList@. +module Mapsengine.RasterCollections.Permissions.List + ( + -- * REST Resource + RasterCollectionsPermissionsListAPI + + -- * Creating a Request + , rasterCollectionsPermissionsList + , RasterCollectionsPermissionsList + + -- * Request Lenses + , rcplcQuotaUser + , rcplcPrettyPrint + , rcplcUserIp + , rcplcKey + , rcplcId + , rcplcOauthToken + , rcplcFields + , rcplcAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsPermissionsList@ which the +-- 'RasterCollectionsPermissionsList' request conforms to. +type RasterCollectionsPermissionsListAPI = + "rasterCollections" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'rasterCollectionsPermissionsList' smart constructor. +data RasterCollectionsPermissionsList = RasterCollectionsPermissionsList + { _rcplcQuotaUser :: !(Maybe Text) + , _rcplcPrettyPrint :: !Bool + , _rcplcUserIp :: !(Maybe Text) + , _rcplcKey :: !(Maybe Text) + , _rcplcId :: !Text + , _rcplcOauthToken :: !(Maybe Text) + , _rcplcFields :: !(Maybe Text) + , _rcplcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcplcQuotaUser' +-- +-- * 'rcplcPrettyPrint' +-- +-- * 'rcplcUserIp' +-- +-- * 'rcplcKey' +-- +-- * 'rcplcId' +-- +-- * 'rcplcOauthToken' +-- +-- * 'rcplcFields' +-- +-- * 'rcplcAlt' +rasterCollectionsPermissionsList + :: Text -- ^ 'id' + -> RasterCollectionsPermissionsList +rasterCollectionsPermissionsList pRcplcId_ = + RasterCollectionsPermissionsList + { _rcplcQuotaUser = Nothing + , _rcplcPrettyPrint = True + , _rcplcUserIp = Nothing + , _rcplcKey = Nothing + , _rcplcId = pRcplcId_ + , _rcplcOauthToken = Nothing + , _rcplcFields = Nothing + , _rcplcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcplcQuotaUser :: Lens' RasterCollectionsPermissionsList' (Maybe Text) +rcplcQuotaUser + = lens _rcplcQuotaUser + (\ s a -> s{_rcplcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcplcPrettyPrint :: Lens' RasterCollectionsPermissionsList' Bool +rcplcPrettyPrint + = lens _rcplcPrettyPrint + (\ s a -> s{_rcplcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcplcUserIp :: Lens' RasterCollectionsPermissionsList' (Maybe Text) +rcplcUserIp + = lens _rcplcUserIp (\ s a -> s{_rcplcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcplcKey :: Lens' RasterCollectionsPermissionsList' (Maybe Text) +rcplcKey = lens _rcplcKey (\ s a -> s{_rcplcKey = a}) + +-- | The ID of the asset whose permissions will be listed. +rcplcId :: Lens' RasterCollectionsPermissionsList' Text +rcplcId = lens _rcplcId (\ s a -> s{_rcplcId = a}) + +-- | OAuth 2.0 token for the current user. +rcplcOauthToken :: Lens' RasterCollectionsPermissionsList' (Maybe Text) +rcplcOauthToken + = lens _rcplcOauthToken + (\ s a -> s{_rcplcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcplcFields :: Lens' RasterCollectionsPermissionsList' (Maybe Text) +rcplcFields + = lens _rcplcFields (\ s a -> s{_rcplcFields = a}) + +-- | Data format for the response. +rcplcAlt :: Lens' RasterCollectionsPermissionsList' Text +rcplcAlt = lens _rcplcAlt (\ s a -> s{_rcplcAlt = a}) + +instance GoogleRequest + RasterCollectionsPermissionsList' where + type Rs RasterCollectionsPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsPermissionsList{..} + = go _rcplcQuotaUser _rcplcPrettyPrint _rcplcUserIp + _rcplcKey + _rcplcId + _rcplcOauthToken + _rcplcFields + _rcplcAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Process.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Process.hs new file mode 100644 index 000000000..5eeb8498a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Process.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Process +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Process a raster collection asset. +-- +-- /See:/ for @MapsengineRasterCollectionsProcess@. +module Mapsengine.RasterCollections.Process + ( + -- * REST Resource + RasterCollectionsProcessAPI + + -- * Creating a Request + , rasterCollectionsProcess + , RasterCollectionsProcess + + -- * Request Lenses + , rcpQuotaUser + , rcpPrettyPrint + , rcpUserIp + , rcpKey + , rcpId + , rcpOauthToken + , rcpFields + , rcpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsProcess@ which the +-- 'RasterCollectionsProcess' request conforms to. +type RasterCollectionsProcessAPI = + "rasterCollections" :> + Capture "id" Text :> + "process" :> Post '[JSON] ProcessResponse + +-- | Process a raster collection asset. +-- +-- /See:/ 'rasterCollectionsProcess' smart constructor. +data RasterCollectionsProcess = RasterCollectionsProcess + { _rcpQuotaUser :: !(Maybe Text) + , _rcpPrettyPrint :: !Bool + , _rcpUserIp :: !(Maybe Text) + , _rcpKey :: !(Maybe Text) + , _rcpId :: !Text + , _rcpOauthToken :: !(Maybe Text) + , _rcpFields :: !(Maybe Text) + , _rcpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsProcess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcpQuotaUser' +-- +-- * 'rcpPrettyPrint' +-- +-- * 'rcpUserIp' +-- +-- * 'rcpKey' +-- +-- * 'rcpId' +-- +-- * 'rcpOauthToken' +-- +-- * 'rcpFields' +-- +-- * 'rcpAlt' +rasterCollectionsProcess + :: Text -- ^ 'id' + -> RasterCollectionsProcess +rasterCollectionsProcess pRcpId_ = + RasterCollectionsProcess + { _rcpQuotaUser = Nothing + , _rcpPrettyPrint = True + , _rcpUserIp = Nothing + , _rcpKey = Nothing + , _rcpId = pRcpId_ + , _rcpOauthToken = Nothing + , _rcpFields = Nothing + , _rcpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcpQuotaUser :: Lens' RasterCollectionsProcess' (Maybe Text) +rcpQuotaUser + = lens _rcpQuotaUser (\ s a -> s{_rcpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcpPrettyPrint :: Lens' RasterCollectionsProcess' Bool +rcpPrettyPrint + = lens _rcpPrettyPrint + (\ s a -> s{_rcpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcpUserIp :: Lens' RasterCollectionsProcess' (Maybe Text) +rcpUserIp + = lens _rcpUserIp (\ s a -> s{_rcpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcpKey :: Lens' RasterCollectionsProcess' (Maybe Text) +rcpKey = lens _rcpKey (\ s a -> s{_rcpKey = a}) + +-- | The ID of the raster collection. +rcpId :: Lens' RasterCollectionsProcess' Text +rcpId = lens _rcpId (\ s a -> s{_rcpId = a}) + +-- | OAuth 2.0 token for the current user. +rcpOauthToken :: Lens' RasterCollectionsProcess' (Maybe Text) +rcpOauthToken + = lens _rcpOauthToken + (\ s a -> s{_rcpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcpFields :: Lens' RasterCollectionsProcess' (Maybe Text) +rcpFields + = lens _rcpFields (\ s a -> s{_rcpFields = a}) + +-- | Data format for the response. +rcpAlt :: Lens' RasterCollectionsProcess' Text +rcpAlt = lens _rcpAlt (\ s a -> s{_rcpAlt = a}) + +instance GoogleRequest RasterCollectionsProcess' + where + type Rs RasterCollectionsProcess' = ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsProcess{..} + = go _rcpQuotaUser _rcpPrettyPrint _rcpUserIp _rcpKey + _rcpId + _rcpOauthToken + _rcpFields + _rcpAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsProcessAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchDelete.hs new file mode 100644 index 000000000..dc2f4628b --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchDelete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove rasters from an existing raster collection. Up to 50 rasters can +-- be included in a single batchDelete request. Each batchDelete request is +-- atomic. +-- +-- /See:/ for @MapsengineRasterCollectionsRastersBatchDelete@. +module Mapsengine.RasterCollections.Rasters.BatchDelete + ( + -- * REST Resource + RasterCollectionsRastersBatchDeleteAPI + + -- * Creating a Request + , rasterCollectionsRastersBatchDelete + , RasterCollectionsRastersBatchDelete + + -- * Request Lenses + , rcrbdQuotaUser + , rcrbdPrettyPrint + , rcrbdUserIp + , rcrbdKey + , rcrbdId + , rcrbdOauthToken + , rcrbdFields + , rcrbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsRastersBatchDelete@ which the +-- 'RasterCollectionsRastersBatchDelete' request conforms to. +type RasterCollectionsRastersBatchDeleteAPI = + "rasterCollections" :> + Capture "id" Text :> + "rasters" :> + "batchDelete" :> + Post '[JSON] + RasterCollectionsRastersBatchDeleteResponse + +-- | Remove rasters from an existing raster collection. Up to 50 rasters can +-- be included in a single batchDelete request. Each batchDelete request is +-- atomic. +-- +-- /See:/ 'rasterCollectionsRastersBatchDelete' smart constructor. +data RasterCollectionsRastersBatchDelete = RasterCollectionsRastersBatchDelete + { _rcrbdQuotaUser :: !(Maybe Text) + , _rcrbdPrettyPrint :: !Bool + , _rcrbdUserIp :: !(Maybe Text) + , _rcrbdKey :: !(Maybe Text) + , _rcrbdId :: !Text + , _rcrbdOauthToken :: !(Maybe Text) + , _rcrbdFields :: !(Maybe Text) + , _rcrbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrbdQuotaUser' +-- +-- * 'rcrbdPrettyPrint' +-- +-- * 'rcrbdUserIp' +-- +-- * 'rcrbdKey' +-- +-- * 'rcrbdId' +-- +-- * 'rcrbdOauthToken' +-- +-- * 'rcrbdFields' +-- +-- * 'rcrbdAlt' +rasterCollectionsRastersBatchDelete + :: Text -- ^ 'id' + -> RasterCollectionsRastersBatchDelete +rasterCollectionsRastersBatchDelete pRcrbdId_ = + RasterCollectionsRastersBatchDelete + { _rcrbdQuotaUser = Nothing + , _rcrbdPrettyPrint = True + , _rcrbdUserIp = Nothing + , _rcrbdKey = Nothing + , _rcrbdId = pRcrbdId_ + , _rcrbdOauthToken = Nothing + , _rcrbdFields = Nothing + , _rcrbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcrbdQuotaUser :: Lens' RasterCollectionsRastersBatchDelete' (Maybe Text) +rcrbdQuotaUser + = lens _rcrbdQuotaUser + (\ s a -> s{_rcrbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcrbdPrettyPrint :: Lens' RasterCollectionsRastersBatchDelete' Bool +rcrbdPrettyPrint + = lens _rcrbdPrettyPrint + (\ s a -> s{_rcrbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcrbdUserIp :: Lens' RasterCollectionsRastersBatchDelete' (Maybe Text) +rcrbdUserIp + = lens _rcrbdUserIp (\ s a -> s{_rcrbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcrbdKey :: Lens' RasterCollectionsRastersBatchDelete' (Maybe Text) +rcrbdKey = lens _rcrbdKey (\ s a -> s{_rcrbdKey = a}) + +-- | The ID of the raster collection to which these rasters belong. +rcrbdId :: Lens' RasterCollectionsRastersBatchDelete' Text +rcrbdId = lens _rcrbdId (\ s a -> s{_rcrbdId = a}) + +-- | OAuth 2.0 token for the current user. +rcrbdOauthToken :: Lens' RasterCollectionsRastersBatchDelete' (Maybe Text) +rcrbdOauthToken + = lens _rcrbdOauthToken + (\ s a -> s{_rcrbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcrbdFields :: Lens' RasterCollectionsRastersBatchDelete' (Maybe Text) +rcrbdFields + = lens _rcrbdFields (\ s a -> s{_rcrbdFields = a}) + +-- | Data format for the response. +rcrbdAlt :: Lens' RasterCollectionsRastersBatchDelete' Text +rcrbdAlt = lens _rcrbdAlt (\ s a -> s{_rcrbdAlt = a}) + +instance GoogleRequest + RasterCollectionsRastersBatchDelete' where + type Rs RasterCollectionsRastersBatchDelete' = + RasterCollectionsRastersBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsRastersBatchDelete{..} + = go _rcrbdQuotaUser _rcrbdPrettyPrint _rcrbdUserIp + _rcrbdKey + _rcrbdId + _rcrbdOauthToken + _rcrbdFields + _rcrbdAlt + where go + = clientWithRoute + (Proxy :: + Proxy RasterCollectionsRastersBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchInsert.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchInsert.hs new file mode 100644 index 000000000..0818f303c --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/BatchInsert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchInsert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add rasters to an existing raster collection. Rasters must be +-- successfully processed in order to be added to a raster collection. Up +-- to 50 rasters can be included in a single batchInsert request. Each +-- batchInsert request is atomic. +-- +-- /See:/ for @MapsengineRasterCollectionsRastersBatchInsert@. +module Mapsengine.RasterCollections.Rasters.BatchInsert + ( + -- * REST Resource + RasterCollectionsRastersBatchInsertAPI + + -- * Creating a Request + , rasterCollectionsRastersBatchInsert + , RasterCollectionsRastersBatchInsert + + -- * Request Lenses + , rcrbiQuotaUser + , rcrbiPrettyPrint + , rcrbiUserIp + , rcrbiKey + , rcrbiId + , rcrbiOauthToken + , rcrbiFields + , rcrbiAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsRastersBatchInsert@ which the +-- 'RasterCollectionsRastersBatchInsert' request conforms to. +type RasterCollectionsRastersBatchInsertAPI = + "rasterCollections" :> + Capture "id" Text :> + "rasters" :> + "batchInsert" :> + Post '[JSON] + RasterCollectionsRastersBatchInsertResponse + +-- | Add rasters to an existing raster collection. Rasters must be +-- successfully processed in order to be added to a raster collection. Up +-- to 50 rasters can be included in a single batchInsert request. Each +-- batchInsert request is atomic. +-- +-- /See:/ 'rasterCollectionsRastersBatchInsert' smart constructor. +data RasterCollectionsRastersBatchInsert = RasterCollectionsRastersBatchInsert + { _rcrbiQuotaUser :: !(Maybe Text) + , _rcrbiPrettyPrint :: !Bool + , _rcrbiUserIp :: !(Maybe Text) + , _rcrbiKey :: !(Maybe Text) + , _rcrbiId :: !Text + , _rcrbiOauthToken :: !(Maybe Text) + , _rcrbiFields :: !(Maybe Text) + , _rcrbiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersBatchInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrbiQuotaUser' +-- +-- * 'rcrbiPrettyPrint' +-- +-- * 'rcrbiUserIp' +-- +-- * 'rcrbiKey' +-- +-- * 'rcrbiId' +-- +-- * 'rcrbiOauthToken' +-- +-- * 'rcrbiFields' +-- +-- * 'rcrbiAlt' +rasterCollectionsRastersBatchInsert + :: Text -- ^ 'id' + -> RasterCollectionsRastersBatchInsert +rasterCollectionsRastersBatchInsert pRcrbiId_ = + RasterCollectionsRastersBatchInsert + { _rcrbiQuotaUser = Nothing + , _rcrbiPrettyPrint = True + , _rcrbiUserIp = Nothing + , _rcrbiKey = Nothing + , _rcrbiId = pRcrbiId_ + , _rcrbiOauthToken = Nothing + , _rcrbiFields = Nothing + , _rcrbiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcrbiQuotaUser :: Lens' RasterCollectionsRastersBatchInsert' (Maybe Text) +rcrbiQuotaUser + = lens _rcrbiQuotaUser + (\ s a -> s{_rcrbiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcrbiPrettyPrint :: Lens' RasterCollectionsRastersBatchInsert' Bool +rcrbiPrettyPrint + = lens _rcrbiPrettyPrint + (\ s a -> s{_rcrbiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcrbiUserIp :: Lens' RasterCollectionsRastersBatchInsert' (Maybe Text) +rcrbiUserIp + = lens _rcrbiUserIp (\ s a -> s{_rcrbiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcrbiKey :: Lens' RasterCollectionsRastersBatchInsert' (Maybe Text) +rcrbiKey = lens _rcrbiKey (\ s a -> s{_rcrbiKey = a}) + +-- | The ID of the raster collection to which these rasters belong. +rcrbiId :: Lens' RasterCollectionsRastersBatchInsert' Text +rcrbiId = lens _rcrbiId (\ s a -> s{_rcrbiId = a}) + +-- | OAuth 2.0 token for the current user. +rcrbiOauthToken :: Lens' RasterCollectionsRastersBatchInsert' (Maybe Text) +rcrbiOauthToken + = lens _rcrbiOauthToken + (\ s a -> s{_rcrbiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rcrbiFields :: Lens' RasterCollectionsRastersBatchInsert' (Maybe Text) +rcrbiFields + = lens _rcrbiFields (\ s a -> s{_rcrbiFields = a}) + +-- | Data format for the response. +rcrbiAlt :: Lens' RasterCollectionsRastersBatchInsert' Text +rcrbiAlt = lens _rcrbiAlt (\ s a -> s{_rcrbiAlt = a}) + +instance GoogleRequest + RasterCollectionsRastersBatchInsert' where + type Rs RasterCollectionsRastersBatchInsert' = + RasterCollectionsRastersBatchInsertResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RasterCollectionsRastersBatchInsert{..} + = go _rcrbiQuotaUser _rcrbiPrettyPrint _rcrbiUserIp + _rcrbiKey + _rcrbiId + _rcrbiOauthToken + _rcrbiFields + _rcrbiAlt + where go + = clientWithRoute + (Proxy :: + Proxy RasterCollectionsRastersBatchInsertAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/List.hs new file mode 100644 index 000000000..fe9ce7541 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/RasterCollections/Rasters/List.hs @@ -0,0 +1,312 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.RasterCollections.Rasters.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all rasters within a raster collection. +-- +-- /See:/ for @MapsengineRasterCollectionsRastersList@. +module Mapsengine.RasterCollections.Rasters.List + ( + -- * REST Resource + RasterCollectionsRastersListAPI + + -- * Creating a Request + , rasterCollectionsRastersList + , RasterCollectionsRastersList + + -- * Request Lenses + , rcrlCreatedAfter + , rcrlQuotaUser + , rcrlPrettyPrint + , rcrlUserIp + , rcrlCreatorEmail + , rcrlRole + , rcrlKey + , rcrlBbox + , rcrlId + , rcrlModifiedAfter + , rcrlModifiedBefore + , rcrlPageToken + , rcrlOauthToken + , rcrlSearch + , rcrlMaxResults + , rcrlTags + , rcrlFields + , rcrlCreatedBefore + , rcrlAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRasterCollectionsRastersList@ which the +-- 'RasterCollectionsRastersList' request conforms to. +type RasterCollectionsRastersListAPI = + "rasterCollections" :> + Capture "id" Text :> + "rasters" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] + RasterCollectionsRastersListResponse + +-- | Return all rasters within a raster collection. +-- +-- /See:/ 'rasterCollectionsRastersList' smart constructor. +data RasterCollectionsRastersList = RasterCollectionsRastersList + { _rcrlCreatedAfter :: !(Maybe UTCTime) + , _rcrlQuotaUser :: !(Maybe Text) + , _rcrlPrettyPrint :: !Bool + , _rcrlUserIp :: !(Maybe Text) + , _rcrlCreatorEmail :: !(Maybe Text) + , _rcrlRole :: !(Maybe Text) + , _rcrlKey :: !(Maybe Text) + , _rcrlBbox :: !(Maybe Text) + , _rcrlId :: !Text + , _rcrlModifiedAfter :: !(Maybe UTCTime) + , _rcrlModifiedBefore :: !(Maybe UTCTime) + , _rcrlPageToken :: !(Maybe Text) + , _rcrlOauthToken :: !(Maybe Text) + , _rcrlSearch :: !(Maybe Text) + , _rcrlMaxResults :: !(Maybe Word32) + , _rcrlTags :: !(Maybe Text) + , _rcrlFields :: !(Maybe Text) + , _rcrlCreatedBefore :: !(Maybe UTCTime) + , _rcrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RasterCollectionsRastersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcrlCreatedAfter' +-- +-- * 'rcrlQuotaUser' +-- +-- * 'rcrlPrettyPrint' +-- +-- * 'rcrlUserIp' +-- +-- * 'rcrlCreatorEmail' +-- +-- * 'rcrlRole' +-- +-- * 'rcrlKey' +-- +-- * 'rcrlBbox' +-- +-- * 'rcrlId' +-- +-- * 'rcrlModifiedAfter' +-- +-- * 'rcrlModifiedBefore' +-- +-- * 'rcrlPageToken' +-- +-- * 'rcrlOauthToken' +-- +-- * 'rcrlSearch' +-- +-- * 'rcrlMaxResults' +-- +-- * 'rcrlTags' +-- +-- * 'rcrlFields' +-- +-- * 'rcrlCreatedBefore' +-- +-- * 'rcrlAlt' +rasterCollectionsRastersList + :: Text -- ^ 'id' + -> RasterCollectionsRastersList +rasterCollectionsRastersList pRcrlId_ = + RasterCollectionsRastersList + { _rcrlCreatedAfter = Nothing + , _rcrlQuotaUser = Nothing + , _rcrlPrettyPrint = True + , _rcrlUserIp = Nothing + , _rcrlCreatorEmail = Nothing + , _rcrlRole = Nothing + , _rcrlKey = Nothing + , _rcrlBbox = Nothing + , _rcrlId = pRcrlId_ + , _rcrlModifiedAfter = Nothing + , _rcrlModifiedBefore = Nothing + , _rcrlPageToken = Nothing + , _rcrlOauthToken = Nothing + , _rcrlSearch = Nothing + , _rcrlMaxResults = Nothing + , _rcrlTags = Nothing + , _rcrlFields = Nothing + , _rcrlCreatedBefore = Nothing + , _rcrlAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +rcrlCreatedAfter :: Lens' RasterCollectionsRastersList' (Maybe UTCTime) +rcrlCreatedAfter + = lens _rcrlCreatedAfter + (\ s a -> s{_rcrlCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rcrlQuotaUser :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlQuotaUser + = lens _rcrlQuotaUser + (\ s a -> s{_rcrlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rcrlPrettyPrint :: Lens' RasterCollectionsRastersList' Bool +rcrlPrettyPrint + = lens _rcrlPrettyPrint + (\ s a -> s{_rcrlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rcrlUserIp :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlUserIp + = lens _rcrlUserIp (\ s a -> s{_rcrlUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +rcrlCreatorEmail :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlCreatorEmail + = lens _rcrlCreatorEmail + (\ s a -> s{_rcrlCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +rcrlRole :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlRole = lens _rcrlRole (\ s a -> s{_rcrlRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rcrlKey :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlKey = lens _rcrlKey (\ s a -> s{_rcrlKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +rcrlBbox :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlBbox = lens _rcrlBbox (\ s a -> s{_rcrlBbox = a}) + +-- | The ID of the raster collection to which these rasters belong. +rcrlId :: Lens' RasterCollectionsRastersList' Text +rcrlId = lens _rcrlId (\ s a -> s{_rcrlId = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +rcrlModifiedAfter :: Lens' RasterCollectionsRastersList' (Maybe UTCTime) +rcrlModifiedAfter + = lens _rcrlModifiedAfter + (\ s a -> s{_rcrlModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +rcrlModifiedBefore :: Lens' RasterCollectionsRastersList' (Maybe UTCTime) +rcrlModifiedBefore + = lens _rcrlModifiedBefore + (\ s a -> s{_rcrlModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rcrlPageToken :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlPageToken + = lens _rcrlPageToken + (\ s a -> s{_rcrlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rcrlOauthToken :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlOauthToken + = lens _rcrlOauthToken + (\ s a -> s{_rcrlOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +rcrlSearch :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlSearch + = lens _rcrlSearch (\ s a -> s{_rcrlSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +rcrlMaxResults :: Lens' RasterCollectionsRastersList' (Maybe Word32) +rcrlMaxResults + = lens _rcrlMaxResults + (\ s a -> s{_rcrlMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +rcrlTags :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlTags = lens _rcrlTags (\ s a -> s{_rcrlTags = a}) + +-- | Selector specifying which fields to include in a partial response. +rcrlFields :: Lens' RasterCollectionsRastersList' (Maybe Text) +rcrlFields + = lens _rcrlFields (\ s a -> s{_rcrlFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +rcrlCreatedBefore :: Lens' RasterCollectionsRastersList' (Maybe UTCTime) +rcrlCreatedBefore + = lens _rcrlCreatedBefore + (\ s a -> s{_rcrlCreatedBefore = a}) + +-- | Data format for the response. +rcrlAlt :: Lens' RasterCollectionsRastersList' Text +rcrlAlt = lens _rcrlAlt (\ s a -> s{_rcrlAlt = a}) + +instance GoogleRequest RasterCollectionsRastersList' + where + type Rs RasterCollectionsRastersList' = + RasterCollectionsRastersListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RasterCollectionsRastersList{..} + = go _rcrlCreatedAfter _rcrlQuotaUser + _rcrlPrettyPrint + _rcrlUserIp + _rcrlCreatorEmail + _rcrlRole + _rcrlKey + _rcrlBbox + _rcrlId + _rcrlModifiedAfter + _rcrlModifiedBefore + _rcrlPageToken + _rcrlOauthToken + _rcrlSearch + _rcrlMaxResults + _rcrlTags + _rcrlFields + _rcrlCreatedBefore + _rcrlAlt + where go + = clientWithRoute + (Proxy :: Proxy RasterCollectionsRastersListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Delete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Delete.hs new file mode 100644 index 000000000..679d7b5f4 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Delete.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a raster. +-- +-- /See:/ for @MapsengineRastersDelete@. +module Mapsengine.Rasters.Delete + ( + -- * REST Resource + RastersDeleteAPI + + -- * Creating a Request + , rastersDelete + , RastersDelete + + -- * Request Lenses + , rdQuotaUser + , rdPrettyPrint + , rdUserIp + , rdKey + , rdId + , rdOauthToken + , rdFields + , rdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersDelete@ which the +-- 'RastersDelete' request conforms to. +type RastersDeleteAPI = + "rasters" :> Capture "id" Text :> Delete '[JSON] () + +-- | Delete a raster. +-- +-- /See:/ 'rastersDelete' smart constructor. +data RastersDelete = RastersDelete + { _rdQuotaUser :: !(Maybe Text) + , _rdPrettyPrint :: !Bool + , _rdUserIp :: !(Maybe Text) + , _rdKey :: !(Maybe Text) + , _rdId :: !Text + , _rdOauthToken :: !(Maybe Text) + , _rdFields :: !(Maybe Text) + , _rdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rdQuotaUser' +-- +-- * 'rdPrettyPrint' +-- +-- * 'rdUserIp' +-- +-- * 'rdKey' +-- +-- * 'rdId' +-- +-- * 'rdOauthToken' +-- +-- * 'rdFields' +-- +-- * 'rdAlt' +rastersDelete + :: Text -- ^ 'id' + -> RastersDelete +rastersDelete pRdId_ = + RastersDelete + { _rdQuotaUser = Nothing + , _rdPrettyPrint = True + , _rdUserIp = Nothing + , _rdKey = Nothing + , _rdId = pRdId_ + , _rdOauthToken = Nothing + , _rdFields = Nothing + , _rdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rdQuotaUser :: Lens' RastersDelete' (Maybe Text) +rdQuotaUser + = lens _rdQuotaUser (\ s a -> s{_rdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rdPrettyPrint :: Lens' RastersDelete' Bool +rdPrettyPrint + = lens _rdPrettyPrint + (\ s a -> s{_rdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rdUserIp :: Lens' RastersDelete' (Maybe Text) +rdUserIp = lens _rdUserIp (\ s a -> s{_rdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rdKey :: Lens' RastersDelete' (Maybe Text) +rdKey = lens _rdKey (\ s a -> s{_rdKey = a}) + +-- | The ID of the raster. Only the raster creator or project owner are +-- permitted to delete. If the raster is included in a layer or mosaic, the +-- request will fail. Remove it from all parents prior to deleting. +rdId :: Lens' RastersDelete' Text +rdId = lens _rdId (\ s a -> s{_rdId = a}) + +-- | OAuth 2.0 token for the current user. +rdOauthToken :: Lens' RastersDelete' (Maybe Text) +rdOauthToken + = lens _rdOauthToken (\ s a -> s{_rdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rdFields :: Lens' RastersDelete' (Maybe Text) +rdFields = lens _rdFields (\ s a -> s{_rdFields = a}) + +-- | Data format for the response. +rdAlt :: Lens' RastersDelete' Text +rdAlt = lens _rdAlt (\ s a -> s{_rdAlt = a}) + +instance GoogleRequest RastersDelete' where + type Rs RastersDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersDelete{..} + = go _rdQuotaUser _rdPrettyPrint _rdUserIp _rdKey + _rdId + _rdOauthToken + _rdFields + _rdAlt + where go + = clientWithRoute (Proxy :: Proxy RastersDeleteAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Files/Insert.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Files/Insert.hs new file mode 100644 index 000000000..930697b7d --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Files/Insert.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Files.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Upload a file to a raster asset. +-- +-- /See:/ for @MapsengineRastersFilesInsert@. +module Mapsengine.Rasters.Files.Insert + ( + -- * REST Resource + RastersFilesInsertAPI + + -- * Creating a Request + , rastersFilesInsert + , RastersFilesInsert + + -- * Request Lenses + , rfiQuotaUser + , rfiPrettyPrint + , rfiUserIp + , rfiKey + , rfiId + , rfiOauthToken + , rfiFilename + , rfiFields + , rfiAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersFilesInsert@ which the +-- 'RastersFilesInsert' request conforms to. +type RastersFilesInsertAPI = + "rasters" :> + Capture "id" Text :> + "files" :> + QueryParam "filename" Text :> Post '[JSON] () + +-- | Upload a file to a raster asset. +-- +-- /See:/ 'rastersFilesInsert' smart constructor. +data RastersFilesInsert = RastersFilesInsert + { _rfiQuotaUser :: !(Maybe Text) + , _rfiPrettyPrint :: !Bool + , _rfiUserIp :: !(Maybe Text) + , _rfiKey :: !(Maybe Text) + , _rfiId :: !Text + , _rfiOauthToken :: !(Maybe Text) + , _rfiFilename :: !Text + , _rfiFields :: !(Maybe Text) + , _rfiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersFilesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rfiQuotaUser' +-- +-- * 'rfiPrettyPrint' +-- +-- * 'rfiUserIp' +-- +-- * 'rfiKey' +-- +-- * 'rfiId' +-- +-- * 'rfiOauthToken' +-- +-- * 'rfiFilename' +-- +-- * 'rfiFields' +-- +-- * 'rfiAlt' +rastersFilesInsert + :: Text -- ^ 'id' + -> Text -- ^ 'filename' + -> RastersFilesInsert +rastersFilesInsert pRfiId_ pRfiFilename_ = + RastersFilesInsert + { _rfiQuotaUser = Nothing + , _rfiPrettyPrint = True + , _rfiUserIp = Nothing + , _rfiKey = Nothing + , _rfiId = pRfiId_ + , _rfiOauthToken = Nothing + , _rfiFilename = pRfiFilename_ + , _rfiFields = Nothing + , _rfiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rfiQuotaUser :: Lens' RastersFilesInsert' (Maybe Text) +rfiQuotaUser + = lens _rfiQuotaUser (\ s a -> s{_rfiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rfiPrettyPrint :: Lens' RastersFilesInsert' Bool +rfiPrettyPrint + = lens _rfiPrettyPrint + (\ s a -> s{_rfiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rfiUserIp :: Lens' RastersFilesInsert' (Maybe Text) +rfiUserIp + = lens _rfiUserIp (\ s a -> s{_rfiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rfiKey :: Lens' RastersFilesInsert' (Maybe Text) +rfiKey = lens _rfiKey (\ s a -> s{_rfiKey = a}) + +-- | The ID of the raster asset. +rfiId :: Lens' RastersFilesInsert' Text +rfiId = lens _rfiId (\ s a -> s{_rfiId = a}) + +-- | OAuth 2.0 token for the current user. +rfiOauthToken :: Lens' RastersFilesInsert' (Maybe Text) +rfiOauthToken + = lens _rfiOauthToken + (\ s a -> s{_rfiOauthToken = a}) + +-- | The file name of this uploaded file. +rfiFilename :: Lens' RastersFilesInsert' Text +rfiFilename + = lens _rfiFilename (\ s a -> s{_rfiFilename = a}) + +-- | Selector specifying which fields to include in a partial response. +rfiFields :: Lens' RastersFilesInsert' (Maybe Text) +rfiFields + = lens _rfiFields (\ s a -> s{_rfiFields = a}) + +-- | Data format for the response. +rfiAlt :: Lens' RastersFilesInsert' Text +rfiAlt = lens _rfiAlt (\ s a -> s{_rfiAlt = a}) + +instance GoogleRequest RastersFilesInsert' where + type Rs RastersFilesInsert' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersFilesInsert{..} + = go _rfiQuotaUser _rfiPrettyPrint _rfiUserIp _rfiKey + _rfiId + _rfiOauthToken + (Just _rfiFilename) + _rfiFields + _rfiAlt + where go + = clientWithRoute + (Proxy :: Proxy RastersFilesInsertAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Get.hs new file mode 100644 index 000000000..ba6ac4a9a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Get.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a single raster. +-- +-- /See:/ for @MapsengineRastersGet@. +module Mapsengine.Rasters.Get + ( + -- * REST Resource + RastersGetAPI + + -- * Creating a Request + , rastersGet + , RastersGet + + -- * Request Lenses + , rgQuotaUser + , rgPrettyPrint + , rgUserIp + , rgKey + , rgId + , rgOauthToken + , rgFields + , rgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersGet@ which the +-- 'RastersGet' request conforms to. +type RastersGetAPI = + "rasters" :> Capture "id" Text :> Get '[JSON] Raster + +-- | Return metadata for a single raster. +-- +-- /See:/ 'rastersGet' smart constructor. +data RastersGet = RastersGet + { _rgQuotaUser :: !(Maybe Text) + , _rgPrettyPrint :: !Bool + , _rgUserIp :: !(Maybe Text) + , _rgKey :: !(Maybe Text) + , _rgId :: !Text + , _rgOauthToken :: !(Maybe Text) + , _rgFields :: !(Maybe Text) + , _rgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rgQuotaUser' +-- +-- * 'rgPrettyPrint' +-- +-- * 'rgUserIp' +-- +-- * 'rgKey' +-- +-- * 'rgId' +-- +-- * 'rgOauthToken' +-- +-- * 'rgFields' +-- +-- * 'rgAlt' +rastersGet + :: Text -- ^ 'id' + -> RastersGet +rastersGet pRgId_ = + RastersGet + { _rgQuotaUser = Nothing + , _rgPrettyPrint = True + , _rgUserIp = Nothing + , _rgKey = Nothing + , _rgId = pRgId_ + , _rgOauthToken = Nothing + , _rgFields = Nothing + , _rgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rgQuotaUser :: Lens' RastersGet' (Maybe Text) +rgQuotaUser + = lens _rgQuotaUser (\ s a -> s{_rgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rgPrettyPrint :: Lens' RastersGet' Bool +rgPrettyPrint + = lens _rgPrettyPrint + (\ s a -> s{_rgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rgUserIp :: Lens' RastersGet' (Maybe Text) +rgUserIp = lens _rgUserIp (\ s a -> s{_rgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rgKey :: Lens' RastersGet' (Maybe Text) +rgKey = lens _rgKey (\ s a -> s{_rgKey = a}) + +-- | The ID of the raster. +rgId :: Lens' RastersGet' Text +rgId = lens _rgId (\ s a -> s{_rgId = a}) + +-- | OAuth 2.0 token for the current user. +rgOauthToken :: Lens' RastersGet' (Maybe Text) +rgOauthToken + = lens _rgOauthToken (\ s a -> s{_rgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rgFields :: Lens' RastersGet' (Maybe Text) +rgFields = lens _rgFields (\ s a -> s{_rgFields = a}) + +-- | Data format for the response. +rgAlt :: Lens' RastersGet' Text +rgAlt = lens _rgAlt (\ s a -> s{_rgAlt = a}) + +instance GoogleRequest RastersGet' where + type Rs RastersGet' = Raster + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersGet{..} + = go _rgQuotaUser _rgPrettyPrint _rgUserIp _rgKey + _rgId + _rgOauthToken + _rgFields + _rgAlt + where go + = clientWithRoute (Proxy :: Proxy RastersGetAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/List.hs new file mode 100644 index 000000000..e101946ce --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/List.hs @@ -0,0 +1,313 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all rasters readable by the current user. +-- +-- /See:/ for @MapsengineRastersList@. +module Mapsengine.Rasters.List + ( + -- * REST Resource + RastersListAPI + + -- * Creating a Request + , rastersList + , RastersList + + -- * Request Lenses + , rlCreatedAfter + , rlQuotaUser + , rlPrettyPrint + , rlUserIp + , rlCreatorEmail + , rlRole + , rlKey + , rlBbox + , rlProcessingStatus + , rlModifiedAfter + , rlModifiedBefore + , rlPageToken + , rlProjectId + , rlOauthToken + , rlSearch + , rlMaxResults + , rlTags + , rlFields + , rlCreatedBefore + , rlAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersList@ which the +-- 'RastersList' request conforms to. +type RastersListAPI = + "rasters" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "processingStatus" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] RastersListResponse + +-- | Return all rasters readable by the current user. +-- +-- /See:/ 'rastersList' smart constructor. +data RastersList = RastersList + { _rlCreatedAfter :: !(Maybe UTCTime) + , _rlQuotaUser :: !(Maybe Text) + , _rlPrettyPrint :: !Bool + , _rlUserIp :: !(Maybe Text) + , _rlCreatorEmail :: !(Maybe Text) + , _rlRole :: !(Maybe Text) + , _rlKey :: !(Maybe Text) + , _rlBbox :: !(Maybe Text) + , _rlProcessingStatus :: !(Maybe Text) + , _rlModifiedAfter :: !(Maybe UTCTime) + , _rlModifiedBefore :: !(Maybe UTCTime) + , _rlPageToken :: !(Maybe Text) + , _rlProjectId :: !Text + , _rlOauthToken :: !(Maybe Text) + , _rlSearch :: !(Maybe Text) + , _rlMaxResults :: !(Maybe Word32) + , _rlTags :: !(Maybe Text) + , _rlFields :: !(Maybe Text) + , _rlCreatedBefore :: !(Maybe UTCTime) + , _rlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rlCreatedAfter' +-- +-- * 'rlQuotaUser' +-- +-- * 'rlPrettyPrint' +-- +-- * 'rlUserIp' +-- +-- * 'rlCreatorEmail' +-- +-- * 'rlRole' +-- +-- * 'rlKey' +-- +-- * 'rlBbox' +-- +-- * 'rlProcessingStatus' +-- +-- * 'rlModifiedAfter' +-- +-- * 'rlModifiedBefore' +-- +-- * 'rlPageToken' +-- +-- * 'rlProjectId' +-- +-- * 'rlOauthToken' +-- +-- * 'rlSearch' +-- +-- * 'rlMaxResults' +-- +-- * 'rlTags' +-- +-- * 'rlFields' +-- +-- * 'rlCreatedBefore' +-- +-- * 'rlAlt' +rastersList + :: Text -- ^ 'projectId' + -> RastersList +rastersList pRlProjectId_ = + RastersList + { _rlCreatedAfter = Nothing + , _rlQuotaUser = Nothing + , _rlPrettyPrint = True + , _rlUserIp = Nothing + , _rlCreatorEmail = Nothing + , _rlRole = Nothing + , _rlKey = Nothing + , _rlBbox = Nothing + , _rlProcessingStatus = Nothing + , _rlModifiedAfter = Nothing + , _rlModifiedBefore = Nothing + , _rlPageToken = Nothing + , _rlProjectId = pRlProjectId_ + , _rlOauthToken = Nothing + , _rlSearch = Nothing + , _rlMaxResults = Nothing + , _rlTags = Nothing + , _rlFields = Nothing + , _rlCreatedBefore = Nothing + , _rlAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +rlCreatedAfter :: Lens' RastersList' (Maybe UTCTime) +rlCreatedAfter + = lens _rlCreatedAfter + (\ s a -> s{_rlCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rlQuotaUser :: Lens' RastersList' (Maybe Text) +rlQuotaUser + = lens _rlQuotaUser (\ s a -> s{_rlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rlPrettyPrint :: Lens' RastersList' Bool +rlPrettyPrint + = lens _rlPrettyPrint + (\ s a -> s{_rlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rlUserIp :: Lens' RastersList' (Maybe Text) +rlUserIp = lens _rlUserIp (\ s a -> s{_rlUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +rlCreatorEmail :: Lens' RastersList' (Maybe Text) +rlCreatorEmail + = lens _rlCreatorEmail + (\ s a -> s{_rlCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +rlRole :: Lens' RastersList' (Maybe Text) +rlRole = lens _rlRole (\ s a -> s{_rlRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rlKey :: Lens' RastersList' (Maybe Text) +rlKey = lens _rlKey (\ s a -> s{_rlKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +rlBbox :: Lens' RastersList' (Maybe Text) +rlBbox = lens _rlBbox (\ s a -> s{_rlBbox = a}) + +rlProcessingStatus :: Lens' RastersList' (Maybe Text) +rlProcessingStatus + = lens _rlProcessingStatus + (\ s a -> s{_rlProcessingStatus = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +rlModifiedAfter :: Lens' RastersList' (Maybe UTCTime) +rlModifiedAfter + = lens _rlModifiedAfter + (\ s a -> s{_rlModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +rlModifiedBefore :: Lens' RastersList' (Maybe UTCTime) +rlModifiedBefore + = lens _rlModifiedBefore + (\ s a -> s{_rlModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rlPageToken :: Lens' RastersList' (Maybe Text) +rlPageToken + = lens _rlPageToken (\ s a -> s{_rlPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +rlProjectId :: Lens' RastersList' Text +rlProjectId + = lens _rlProjectId (\ s a -> s{_rlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +rlOauthToken :: Lens' RastersList' (Maybe Text) +rlOauthToken + = lens _rlOauthToken (\ s a -> s{_rlOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +rlSearch :: Lens' RastersList' (Maybe Text) +rlSearch = lens _rlSearch (\ s a -> s{_rlSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +rlMaxResults :: Lens' RastersList' (Maybe Word32) +rlMaxResults + = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +rlTags :: Lens' RastersList' (Maybe Text) +rlTags = lens _rlTags (\ s a -> s{_rlTags = a}) + +-- | Selector specifying which fields to include in a partial response. +rlFields :: Lens' RastersList' (Maybe Text) +rlFields = lens _rlFields (\ s a -> s{_rlFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +rlCreatedBefore :: Lens' RastersList' (Maybe UTCTime) +rlCreatedBefore + = lens _rlCreatedBefore + (\ s a -> s{_rlCreatedBefore = a}) + +-- | Data format for the response. +rlAlt :: Lens' RastersList' Text +rlAlt = lens _rlAlt (\ s a -> s{_rlAlt = a}) + +instance GoogleRequest RastersList' where + type Rs RastersList' = RastersListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersList{..} + = go _rlCreatedAfter _rlQuotaUser _rlPrettyPrint + _rlUserIp + _rlCreatorEmail + _rlRole + _rlKey + _rlBbox + _rlProcessingStatus + _rlModifiedAfter + _rlModifiedBefore + _rlPageToken + (Just _rlProjectId) + _rlOauthToken + _rlSearch + _rlMaxResults + _rlTags + _rlFields + _rlCreatedBefore + _rlAlt + where go + = clientWithRoute (Proxy :: Proxy RastersListAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Parents/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Parents/List.hs new file mode 100644 index 000000000..62a49f641 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Parents/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all parent ids of the specified rasters. +-- +-- /See:/ for @MapsengineRastersParentsList@. +module Mapsengine.Rasters.Parents.List + ( + -- * REST Resource + RastersParentsListAPI + + -- * Creating a Request + , rastersParentsList + , RastersParentsList + + -- * Request Lenses + , rplQuotaUser + , rplPrettyPrint + , rplUserIp + , rplKey + , rplId + , rplPageToken + , rplOauthToken + , rplMaxResults + , rplFields + , rplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersParentsList@ which the +-- 'RastersParentsList' request conforms to. +type RastersParentsListAPI = + "rasters" :> + Capture "id" Text :> + "parents" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ParentsListResponse + +-- | Return all parent ids of the specified rasters. +-- +-- /See:/ 'rastersParentsList' smart constructor. +data RastersParentsList = RastersParentsList + { _rplQuotaUser :: !(Maybe Text) + , _rplPrettyPrint :: !Bool + , _rplUserIp :: !(Maybe Text) + , _rplKey :: !(Maybe Text) + , _rplId :: !Text + , _rplPageToken :: !(Maybe Text) + , _rplOauthToken :: !(Maybe Text) + , _rplMaxResults :: !(Maybe Word32) + , _rplFields :: !(Maybe Text) + , _rplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rplQuotaUser' +-- +-- * 'rplPrettyPrint' +-- +-- * 'rplUserIp' +-- +-- * 'rplKey' +-- +-- * 'rplId' +-- +-- * 'rplPageToken' +-- +-- * 'rplOauthToken' +-- +-- * 'rplMaxResults' +-- +-- * 'rplFields' +-- +-- * 'rplAlt' +rastersParentsList + :: Text -- ^ 'id' + -> RastersParentsList +rastersParentsList pRplId_ = + RastersParentsList + { _rplQuotaUser = Nothing + , _rplPrettyPrint = True + , _rplUserIp = Nothing + , _rplKey = Nothing + , _rplId = pRplId_ + , _rplPageToken = Nothing + , _rplOauthToken = Nothing + , _rplMaxResults = Nothing + , _rplFields = Nothing + , _rplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rplQuotaUser :: Lens' RastersParentsList' (Maybe Text) +rplQuotaUser + = lens _rplQuotaUser (\ s a -> s{_rplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rplPrettyPrint :: Lens' RastersParentsList' Bool +rplPrettyPrint + = lens _rplPrettyPrint + (\ s a -> s{_rplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rplUserIp :: Lens' RastersParentsList' (Maybe Text) +rplUserIp + = lens _rplUserIp (\ s a -> s{_rplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rplKey :: Lens' RastersParentsList' (Maybe Text) +rplKey = lens _rplKey (\ s a -> s{_rplKey = a}) + +-- | The ID of the rasters whose parents will be listed. +rplId :: Lens' RastersParentsList' Text +rplId = lens _rplId (\ s a -> s{_rplId = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +rplPageToken :: Lens' RastersParentsList' (Maybe Text) +rplPageToken + = lens _rplPageToken (\ s a -> s{_rplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rplOauthToken :: Lens' RastersParentsList' (Maybe Text) +rplOauthToken + = lens _rplOauthToken + (\ s a -> s{_rplOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +rplMaxResults :: Lens' RastersParentsList' (Maybe Word32) +rplMaxResults + = lens _rplMaxResults + (\ s a -> s{_rplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rplFields :: Lens' RastersParentsList' (Maybe Text) +rplFields + = lens _rplFields (\ s a -> s{_rplFields = a}) + +-- | Data format for the response. +rplAlt :: Lens' RastersParentsList' Text +rplAlt = lens _rplAlt (\ s a -> s{_rplAlt = a}) + +instance GoogleRequest RastersParentsList' where + type Rs RastersParentsList' = ParentsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersParentsList{..} + = go _rplQuotaUser _rplPrettyPrint _rplUserIp _rplKey + _rplId + _rplPageToken + _rplOauthToken + _rplMaxResults + _rplFields + _rplAlt + where go + = clientWithRoute + (Proxy :: Proxy RastersParentsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Patch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Patch.hs new file mode 100644 index 000000000..e23c7e62e --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Patch.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Mutate a raster asset. +-- +-- /See:/ for @MapsengineRastersPatch@. +module Mapsengine.Rasters.Patch + ( + -- * REST Resource + RastersPatchAPI + + -- * Creating a Request + , rastersPatch + , RastersPatch + + -- * Request Lenses + , rppQuotaUser + , rppPrettyPrint + , rppUserIp + , rppKey + , rppId + , rppOauthToken + , rppFields + , rppAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersPatch@ which the +-- 'RastersPatch' request conforms to. +type RastersPatchAPI = + "rasters" :> Capture "id" Text :> Patch '[JSON] () + +-- | Mutate a raster asset. +-- +-- /See:/ 'rastersPatch' smart constructor. +data RastersPatch = RastersPatch + { _rppQuotaUser :: !(Maybe Text) + , _rppPrettyPrint :: !Bool + , _rppUserIp :: !(Maybe Text) + , _rppKey :: !(Maybe Text) + , _rppId :: !Text + , _rppOauthToken :: !(Maybe Text) + , _rppFields :: !(Maybe Text) + , _rppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rppQuotaUser' +-- +-- * 'rppPrettyPrint' +-- +-- * 'rppUserIp' +-- +-- * 'rppKey' +-- +-- * 'rppId' +-- +-- * 'rppOauthToken' +-- +-- * 'rppFields' +-- +-- * 'rppAlt' +rastersPatch + :: Text -- ^ 'id' + -> RastersPatch +rastersPatch pRppId_ = + RastersPatch + { _rppQuotaUser = Nothing + , _rppPrettyPrint = True + , _rppUserIp = Nothing + , _rppKey = Nothing + , _rppId = pRppId_ + , _rppOauthToken = Nothing + , _rppFields = Nothing + , _rppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rppQuotaUser :: Lens' RastersPatch' (Maybe Text) +rppQuotaUser + = lens _rppQuotaUser (\ s a -> s{_rppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rppPrettyPrint :: Lens' RastersPatch' Bool +rppPrettyPrint + = lens _rppPrettyPrint + (\ s a -> s{_rppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rppUserIp :: Lens' RastersPatch' (Maybe Text) +rppUserIp + = lens _rppUserIp (\ s a -> s{_rppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rppKey :: Lens' RastersPatch' (Maybe Text) +rppKey = lens _rppKey (\ s a -> s{_rppKey = a}) + +-- | The ID of the raster. +rppId :: Lens' RastersPatch' Text +rppId = lens _rppId (\ s a -> s{_rppId = a}) + +-- | OAuth 2.0 token for the current user. +rppOauthToken :: Lens' RastersPatch' (Maybe Text) +rppOauthToken + = lens _rppOauthToken + (\ s a -> s{_rppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rppFields :: Lens' RastersPatch' (Maybe Text) +rppFields + = lens _rppFields (\ s a -> s{_rppFields = a}) + +-- | Data format for the response. +rppAlt :: Lens' RastersPatch' Text +rppAlt = lens _rppAlt (\ s a -> s{_rppAlt = a}) + +instance GoogleRequest RastersPatch' where + type Rs RastersPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersPatch{..} + = go _rppQuotaUser _rppPrettyPrint _rppUserIp _rppKey + _rppId + _rppOauthToken + _rppFields + _rppAlt + where go + = clientWithRoute (Proxy :: Proxy RastersPatchAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchDelete.hs new file mode 100644 index 000000000..a838c2da8 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchDelete.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ for @MapsengineRastersPermissionsBatchDelete@. +module Mapsengine.Rasters.Permissions.BatchDelete + ( + -- * REST Resource + RastersPermissionsBatchDeleteAPI + + -- * Creating a Request + , rastersPermissionsBatchDelete + , RastersPermissionsBatchDelete + + -- * Request Lenses + , rpbdQuotaUser + , rpbdPrettyPrint + , rpbdUserIp + , rpbdKey + , rpbdId + , rpbdOauthToken + , rpbdFields + , rpbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersPermissionsBatchDelete@ which the +-- 'RastersPermissionsBatchDelete' request conforms to. +type RastersPermissionsBatchDeleteAPI = + "rasters" :> + Capture "id" Text :> + "permissions" :> + "batchDelete" :> + Post '[JSON] PermissionsBatchDeleteResponse + +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ 'rastersPermissionsBatchDelete' smart constructor. +data RastersPermissionsBatchDelete = RastersPermissionsBatchDelete + { _rpbdQuotaUser :: !(Maybe Text) + , _rpbdPrettyPrint :: !Bool + , _rpbdUserIp :: !(Maybe Text) + , _rpbdKey :: !(Maybe Text) + , _rpbdId :: !Text + , _rpbdOauthToken :: !(Maybe Text) + , _rpbdFields :: !(Maybe Text) + , _rpbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersPermissionsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpbdQuotaUser' +-- +-- * 'rpbdPrettyPrint' +-- +-- * 'rpbdUserIp' +-- +-- * 'rpbdKey' +-- +-- * 'rpbdId' +-- +-- * 'rpbdOauthToken' +-- +-- * 'rpbdFields' +-- +-- * 'rpbdAlt' +rastersPermissionsBatchDelete + :: Text -- ^ 'id' + -> RastersPermissionsBatchDelete +rastersPermissionsBatchDelete pRpbdId_ = + RastersPermissionsBatchDelete + { _rpbdQuotaUser = Nothing + , _rpbdPrettyPrint = True + , _rpbdUserIp = Nothing + , _rpbdKey = Nothing + , _rpbdId = pRpbdId_ + , _rpbdOauthToken = Nothing + , _rpbdFields = Nothing + , _rpbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpbdQuotaUser :: Lens' RastersPermissionsBatchDelete' (Maybe Text) +rpbdQuotaUser + = lens _rpbdQuotaUser + (\ s a -> s{_rpbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpbdPrettyPrint :: Lens' RastersPermissionsBatchDelete' Bool +rpbdPrettyPrint + = lens _rpbdPrettyPrint + (\ s a -> s{_rpbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpbdUserIp :: Lens' RastersPermissionsBatchDelete' (Maybe Text) +rpbdUserIp + = lens _rpbdUserIp (\ s a -> s{_rpbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpbdKey :: Lens' RastersPermissionsBatchDelete' (Maybe Text) +rpbdKey = lens _rpbdKey (\ s a -> s{_rpbdKey = a}) + +-- | The ID of the asset from which permissions will be removed. +rpbdId :: Lens' RastersPermissionsBatchDelete' Text +rpbdId = lens _rpbdId (\ s a -> s{_rpbdId = a}) + +-- | OAuth 2.0 token for the current user. +rpbdOauthToken :: Lens' RastersPermissionsBatchDelete' (Maybe Text) +rpbdOauthToken + = lens _rpbdOauthToken + (\ s a -> s{_rpbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rpbdFields :: Lens' RastersPermissionsBatchDelete' (Maybe Text) +rpbdFields + = lens _rpbdFields (\ s a -> s{_rpbdFields = a}) + +-- | Data format for the response. +rpbdAlt :: Lens' RastersPermissionsBatchDelete' Text +rpbdAlt = lens _rpbdAlt (\ s a -> s{_rpbdAlt = a}) + +instance GoogleRequest RastersPermissionsBatchDelete' + where + type Rs RastersPermissionsBatchDelete' = + PermissionsBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RastersPermissionsBatchDelete{..} + = go _rpbdQuotaUser _rpbdPrettyPrint _rpbdUserIp + _rpbdKey + _rpbdId + _rpbdOauthToken + _rpbdFields + _rpbdAlt + where go + = clientWithRoute + (Proxy :: Proxy RastersPermissionsBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchUpdate.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchUpdate.hs new file mode 100644 index 000000000..33046c99e --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/BatchUpdate.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchUpdate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ for @MapsengineRastersPermissionsBatchUpdate@. +module Mapsengine.Rasters.Permissions.BatchUpdate + ( + -- * REST Resource + RastersPermissionsBatchUpdateAPI + + -- * Creating a Request + , rastersPermissionsBatchUpdate + , RastersPermissionsBatchUpdate + + -- * Request Lenses + , rpbuQuotaUser + , rpbuPrettyPrint + , rpbuUserIp + , rpbuKey + , rpbuId + , rpbuOauthToken + , rpbuFields + , rpbuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersPermissionsBatchUpdate@ which the +-- 'RastersPermissionsBatchUpdate' request conforms to. +type RastersPermissionsBatchUpdateAPI = + "rasters" :> + Capture "id" Text :> + "permissions" :> + "batchUpdate" :> + Post '[JSON] PermissionsBatchUpdateResponse + +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ 'rastersPermissionsBatchUpdate' smart constructor. +data RastersPermissionsBatchUpdate = RastersPermissionsBatchUpdate + { _rpbuQuotaUser :: !(Maybe Text) + , _rpbuPrettyPrint :: !Bool + , _rpbuUserIp :: !(Maybe Text) + , _rpbuKey :: !(Maybe Text) + , _rpbuId :: !Text + , _rpbuOauthToken :: !(Maybe Text) + , _rpbuFields :: !(Maybe Text) + , _rpbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersPermissionsBatchUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpbuQuotaUser' +-- +-- * 'rpbuPrettyPrint' +-- +-- * 'rpbuUserIp' +-- +-- * 'rpbuKey' +-- +-- * 'rpbuId' +-- +-- * 'rpbuOauthToken' +-- +-- * 'rpbuFields' +-- +-- * 'rpbuAlt' +rastersPermissionsBatchUpdate + :: Text -- ^ 'id' + -> RastersPermissionsBatchUpdate +rastersPermissionsBatchUpdate pRpbuId_ = + RastersPermissionsBatchUpdate + { _rpbuQuotaUser = Nothing + , _rpbuPrettyPrint = True + , _rpbuUserIp = Nothing + , _rpbuKey = Nothing + , _rpbuId = pRpbuId_ + , _rpbuOauthToken = Nothing + , _rpbuFields = Nothing + , _rpbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpbuQuotaUser :: Lens' RastersPermissionsBatchUpdate' (Maybe Text) +rpbuQuotaUser + = lens _rpbuQuotaUser + (\ s a -> s{_rpbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpbuPrettyPrint :: Lens' RastersPermissionsBatchUpdate' Bool +rpbuPrettyPrint + = lens _rpbuPrettyPrint + (\ s a -> s{_rpbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpbuUserIp :: Lens' RastersPermissionsBatchUpdate' (Maybe Text) +rpbuUserIp + = lens _rpbuUserIp (\ s a -> s{_rpbuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpbuKey :: Lens' RastersPermissionsBatchUpdate' (Maybe Text) +rpbuKey = lens _rpbuKey (\ s a -> s{_rpbuKey = a}) + +-- | The ID of the asset to which permissions will be added. +rpbuId :: Lens' RastersPermissionsBatchUpdate' Text +rpbuId = lens _rpbuId (\ s a -> s{_rpbuId = a}) + +-- | OAuth 2.0 token for the current user. +rpbuOauthToken :: Lens' RastersPermissionsBatchUpdate' (Maybe Text) +rpbuOauthToken + = lens _rpbuOauthToken + (\ s a -> s{_rpbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rpbuFields :: Lens' RastersPermissionsBatchUpdate' (Maybe Text) +rpbuFields + = lens _rpbuFields (\ s a -> s{_rpbuFields = a}) + +-- | Data format for the response. +rpbuAlt :: Lens' RastersPermissionsBatchUpdate' Text +rpbuAlt = lens _rpbuAlt (\ s a -> s{_rpbuAlt = a}) + +instance GoogleRequest RastersPermissionsBatchUpdate' + where + type Rs RastersPermissionsBatchUpdate' = + PermissionsBatchUpdateResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u + RastersPermissionsBatchUpdate{..} + = go _rpbuQuotaUser _rpbuPrettyPrint _rpbuUserIp + _rpbuKey + _rpbuId + _rpbuOauthToken + _rpbuFields + _rpbuAlt + where go + = clientWithRoute + (Proxy :: Proxy RastersPermissionsBatchUpdateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/List.hs new file mode 100644 index 000000000..58dbbca5a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Permissions/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineRastersPermissionsList@. +module Mapsengine.Rasters.Permissions.List + ( + -- * REST Resource + RastersPermissionsListAPI + + -- * Creating a Request + , rastersPermissionsList + , RastersPermissionsList + + -- * Request Lenses + , rasQuotaUser + , rasPrettyPrint + , rasUserIp + , rasKey + , rasId + , rasOauthToken + , rasFields + , rasAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersPermissionsList@ which the +-- 'RastersPermissionsList' request conforms to. +type RastersPermissionsListAPI = + "rasters" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'rastersPermissionsList' smart constructor. +data RastersPermissionsList = RastersPermissionsList + { _rasQuotaUser :: !(Maybe Text) + , _rasPrettyPrint :: !Bool + , _rasUserIp :: !(Maybe Text) + , _rasKey :: !(Maybe Text) + , _rasId :: !Text + , _rasOauthToken :: !(Maybe Text) + , _rasFields :: !(Maybe Text) + , _rasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rasQuotaUser' +-- +-- * 'rasPrettyPrint' +-- +-- * 'rasUserIp' +-- +-- * 'rasKey' +-- +-- * 'rasId' +-- +-- * 'rasOauthToken' +-- +-- * 'rasFields' +-- +-- * 'rasAlt' +rastersPermissionsList + :: Text -- ^ 'id' + -> RastersPermissionsList +rastersPermissionsList pRasId_ = + RastersPermissionsList + { _rasQuotaUser = Nothing + , _rasPrettyPrint = True + , _rasUserIp = Nothing + , _rasKey = Nothing + , _rasId = pRasId_ + , _rasOauthToken = Nothing + , _rasFields = Nothing + , _rasAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rasQuotaUser :: Lens' RastersPermissionsList' (Maybe Text) +rasQuotaUser + = lens _rasQuotaUser (\ s a -> s{_rasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rasPrettyPrint :: Lens' RastersPermissionsList' Bool +rasPrettyPrint + = lens _rasPrettyPrint + (\ s a -> s{_rasPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rasUserIp :: Lens' RastersPermissionsList' (Maybe Text) +rasUserIp + = lens _rasUserIp (\ s a -> s{_rasUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rasKey :: Lens' RastersPermissionsList' (Maybe Text) +rasKey = lens _rasKey (\ s a -> s{_rasKey = a}) + +-- | The ID of the asset whose permissions will be listed. +rasId :: Lens' RastersPermissionsList' Text +rasId = lens _rasId (\ s a -> s{_rasId = a}) + +-- | OAuth 2.0 token for the current user. +rasOauthToken :: Lens' RastersPermissionsList' (Maybe Text) +rasOauthToken + = lens _rasOauthToken + (\ s a -> s{_rasOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rasFields :: Lens' RastersPermissionsList' (Maybe Text) +rasFields + = lens _rasFields (\ s a -> s{_rasFields = a}) + +-- | Data format for the response. +rasAlt :: Lens' RastersPermissionsList' Text +rasAlt = lens _rasAlt (\ s a -> s{_rasAlt = a}) + +instance GoogleRequest RastersPermissionsList' where + type Rs RastersPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersPermissionsList{..} + = go _rasQuotaUser _rasPrettyPrint _rasUserIp _rasKey + _rasId + _rasOauthToken + _rasFields + _rasAlt + where go + = clientWithRoute + (Proxy :: Proxy RastersPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Process.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Process.hs new file mode 100644 index 000000000..a9f5a1a6e --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Process.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Process +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Process a raster asset. +-- +-- /See:/ for @MapsengineRastersProcess@. +module Mapsengine.Rasters.Process + ( + -- * REST Resource + RastersProcessAPI + + -- * Creating a Request + , rastersProcess + , RastersProcess + + -- * Request Lenses + , rpQuotaUser + , rpPrettyPrint + , rpUserIp + , rpKey + , rpId + , rpOauthToken + , rpFields + , rpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersProcess@ which the +-- 'RastersProcess' request conforms to. +type RastersProcessAPI = + "rasters" :> + Capture "id" Text :> + "process" :> Post '[JSON] ProcessResponse + +-- | Process a raster asset. +-- +-- /See:/ 'rastersProcess' smart constructor. +data RastersProcess = RastersProcess + { _rpQuotaUser :: !(Maybe Text) + , _rpPrettyPrint :: !Bool + , _rpUserIp :: !(Maybe Text) + , _rpKey :: !(Maybe Text) + , _rpId :: !Text + , _rpOauthToken :: !(Maybe Text) + , _rpFields :: !(Maybe Text) + , _rpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersProcess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpQuotaUser' +-- +-- * 'rpPrettyPrint' +-- +-- * 'rpUserIp' +-- +-- * 'rpKey' +-- +-- * 'rpId' +-- +-- * 'rpOauthToken' +-- +-- * 'rpFields' +-- +-- * 'rpAlt' +rastersProcess + :: Text -- ^ 'id' + -> RastersProcess +rastersProcess pRpId_ = + RastersProcess + { _rpQuotaUser = Nothing + , _rpPrettyPrint = True + , _rpUserIp = Nothing + , _rpKey = Nothing + , _rpId = pRpId_ + , _rpOauthToken = Nothing + , _rpFields = Nothing + , _rpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rpQuotaUser :: Lens' RastersProcess' (Maybe Text) +rpQuotaUser + = lens _rpQuotaUser (\ s a -> s{_rpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rpPrettyPrint :: Lens' RastersProcess' Bool +rpPrettyPrint + = lens _rpPrettyPrint + (\ s a -> s{_rpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rpUserIp :: Lens' RastersProcess' (Maybe Text) +rpUserIp = lens _rpUserIp (\ s a -> s{_rpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rpKey :: Lens' RastersProcess' (Maybe Text) +rpKey = lens _rpKey (\ s a -> s{_rpKey = a}) + +-- | The ID of the raster. +rpId :: Lens' RastersProcess' Text +rpId = lens _rpId (\ s a -> s{_rpId = a}) + +-- | OAuth 2.0 token for the current user. +rpOauthToken :: Lens' RastersProcess' (Maybe Text) +rpOauthToken + = lens _rpOauthToken (\ s a -> s{_rpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rpFields :: Lens' RastersProcess' (Maybe Text) +rpFields = lens _rpFields (\ s a -> s{_rpFields = a}) + +-- | Data format for the response. +rpAlt :: Lens' RastersProcess' Text +rpAlt = lens _rpAlt (\ s a -> s{_rpAlt = a}) + +instance GoogleRequest RastersProcess' where + type Rs RastersProcess' = ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersProcess{..} + = go _rpQuotaUser _rpPrettyPrint _rpUserIp _rpKey + _rpId + _rpOauthToken + _rpFields + _rpAlt + where go + = clientWithRoute (Proxy :: Proxy RastersProcessAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Upload.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Upload.hs new file mode 100644 index 000000000..c2dcc67d9 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Rasters/Upload.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Rasters.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a skeleton raster asset for upload. +-- +-- /See:/ for @MapsengineRastersUpload@. +module Mapsengine.Rasters.Upload + ( + -- * REST Resource + RastersUploadAPI + + -- * Creating a Request + , rastersUpload + , RastersUpload + + -- * Request Lenses + , ruQuotaUser + , ruPrettyPrint + , ruUserIp + , ruKey + , ruOauthToken + , ruFields + , ruAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineRastersUpload@ which the +-- 'RastersUpload' request conforms to. +type RastersUploadAPI = + "rasters" :> "upload" :> Post '[JSON] Raster + +-- | Create a skeleton raster asset for upload. +-- +-- /See:/ 'rastersUpload' smart constructor. +data RastersUpload = RastersUpload + { _ruQuotaUser :: !(Maybe Text) + , _ruPrettyPrint :: !Bool + , _ruUserIp :: !(Maybe Text) + , _ruKey :: !(Maybe Text) + , _ruOauthToken :: !(Maybe Text) + , _ruFields :: !(Maybe Text) + , _ruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RastersUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruQuotaUser' +-- +-- * 'ruPrettyPrint' +-- +-- * 'ruUserIp' +-- +-- * 'ruKey' +-- +-- * 'ruOauthToken' +-- +-- * 'ruFields' +-- +-- * 'ruAlt' +rastersUpload + :: RastersUpload +rastersUpload = + RastersUpload + { _ruQuotaUser = Nothing + , _ruPrettyPrint = True + , _ruUserIp = Nothing + , _ruKey = Nothing + , _ruOauthToken = Nothing + , _ruFields = Nothing + , _ruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruQuotaUser :: Lens' RastersUpload' (Maybe Text) +ruQuotaUser + = lens _ruQuotaUser (\ s a -> s{_ruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruPrettyPrint :: Lens' RastersUpload' Bool +ruPrettyPrint + = lens _ruPrettyPrint + (\ s a -> s{_ruPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruUserIp :: Lens' RastersUpload' (Maybe Text) +ruUserIp = lens _ruUserIp (\ s a -> s{_ruUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruKey :: Lens' RastersUpload' (Maybe Text) +ruKey = lens _ruKey (\ s a -> s{_ruKey = a}) + +-- | OAuth 2.0 token for the current user. +ruOauthToken :: Lens' RastersUpload' (Maybe Text) +ruOauthToken + = lens _ruOauthToken (\ s a -> s{_ruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ruFields :: Lens' RastersUpload' (Maybe Text) +ruFields = lens _ruFields (\ s a -> s{_ruFields = a}) + +-- | Data format for the response. +ruAlt :: Lens' RastersUpload' Text +ruAlt = lens _ruAlt (\ s a -> s{_ruAlt = a}) + +instance GoogleRequest RastersUpload' where + type Rs RastersUpload' = Raster + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u RastersUpload{..} + = go _ruQuotaUser _ruPrettyPrint _ruUserIp _ruKey + _ruOauthToken + _ruFields + _ruAlt + where go + = clientWithRoute (Proxy :: Proxy RastersUploadAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Create.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Create.hs new file mode 100644 index 000000000..954cb7815 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Create.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a table asset. +-- +-- /See:/ for @MapsengineTablesCreate@. +module Mapsengine.Tables.Create + ( + -- * REST Resource + TablesCreateAPI + + -- * Creating a Request + , tablesCreate + , TablesCreate + + -- * Request Lenses + , tcQuotaUser + , tcPrettyPrint + , tcUserIp + , tcKey + , tcOauthToken + , tcFields + , tcAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesCreate@ which the +-- 'TablesCreate' request conforms to. +type TablesCreateAPI = "tables" :> Post '[JSON] Table + +-- | Create a table asset. +-- +-- /See:/ 'tablesCreate' smart constructor. +data TablesCreate = TablesCreate + { _tcQuotaUser :: !(Maybe Text) + , _tcPrettyPrint :: !Bool + , _tcUserIp :: !(Maybe Text) + , _tcKey :: !(Maybe Text) + , _tcOauthToken :: !(Maybe Text) + , _tcFields :: !(Maybe Text) + , _tcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcQuotaUser' +-- +-- * 'tcPrettyPrint' +-- +-- * 'tcUserIp' +-- +-- * 'tcKey' +-- +-- * 'tcOauthToken' +-- +-- * 'tcFields' +-- +-- * 'tcAlt' +tablesCreate + :: TablesCreate +tablesCreate = + TablesCreate + { _tcQuotaUser = Nothing + , _tcPrettyPrint = True + , _tcUserIp = Nothing + , _tcKey = Nothing + , _tcOauthToken = Nothing + , _tcFields = Nothing + , _tcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tcQuotaUser :: Lens' TablesCreate' (Maybe Text) +tcQuotaUser + = lens _tcQuotaUser (\ s a -> s{_tcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tcPrettyPrint :: Lens' TablesCreate' Bool +tcPrettyPrint + = lens _tcPrettyPrint + (\ s a -> s{_tcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tcUserIp :: Lens' TablesCreate' (Maybe Text) +tcUserIp = lens _tcUserIp (\ s a -> s{_tcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tcKey :: Lens' TablesCreate' (Maybe Text) +tcKey = lens _tcKey (\ s a -> s{_tcKey = a}) + +-- | OAuth 2.0 token for the current user. +tcOauthToken :: Lens' TablesCreate' (Maybe Text) +tcOauthToken + = lens _tcOauthToken (\ s a -> s{_tcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tcFields :: Lens' TablesCreate' (Maybe Text) +tcFields = lens _tcFields (\ s a -> s{_tcFields = a}) + +-- | Data format for the response. +tcAlt :: Lens' TablesCreate' Text +tcAlt = lens _tcAlt (\ s a -> s{_tcAlt = a}) + +instance GoogleRequest TablesCreate' where + type Rs TablesCreate' = Table + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesCreate{..} + = go _tcQuotaUser _tcPrettyPrint _tcUserIp _tcKey + _tcOauthToken + _tcFields + _tcAlt + where go + = clientWithRoute (Proxy :: Proxy TablesCreateAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Delete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Delete.hs new file mode 100644 index 000000000..f43bf0a6a --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Delete.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a table. +-- +-- /See:/ for @MapsengineTablesDelete@. +module Mapsengine.Tables.Delete + ( + -- * REST Resource + TablesDeleteAPI + + -- * Creating a Request + , tablesDelete + , TablesDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdUserIp + , tdKey + , tdId + , tdOauthToken + , tdFields + , tdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesDelete@ which the +-- 'TablesDelete' request conforms to. +type TablesDeleteAPI = + "tables" :> Capture "id" Text :> Delete '[JSON] () + +-- | Delete a table. +-- +-- /See:/ 'tablesDelete' smart constructor. +data TablesDelete = TablesDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdId :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdId' +-- +-- * 'tdOauthToken' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +tablesDelete + :: Text -- ^ 'id' + -> TablesDelete +tablesDelete pTdId_ = + TablesDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdId = pTdId_ + , _tdOauthToken = Nothing + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TablesDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TablesDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TablesDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TablesDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | The ID of the table. Only the table creator or project owner are +-- permitted to delete. If the table is included in a layer, the request +-- will fail. Remove it from all layers prior to deleting. +tdId :: Lens' TablesDelete' Text +tdId = lens _tdId (\ s a -> s{_tdId = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TablesDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TablesDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TablesDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TablesDelete' where + type Rs TablesDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdUserIp _tdKey + _tdId + _tdOauthToken + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TablesDeleteAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchDelete.hs new file mode 100644 index 000000000..ea8b5f2cd --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchDelete.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Features.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete all features matching the given IDs. +-- +-- /See:/ for @MapsengineTablesFeaturesBatchDelete@. +module Mapsengine.Tables.Features.BatchDelete + ( + -- * REST Resource + TablesFeaturesBatchDeleteAPI + + -- * Creating a Request + , tablesFeaturesBatchDelete + , TablesFeaturesBatchDelete + + -- * Request Lenses + , tfbdQuotaUser + , tfbdPrettyPrint + , tfbdUserIp + , tfbdKey + , tfbdId + , tfbdOauthToken + , tfbdFields + , tfbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFeaturesBatchDelete@ which the +-- 'TablesFeaturesBatchDelete' request conforms to. +type TablesFeaturesBatchDeleteAPI = + "tables" :> + Capture "id" Text :> + "features" :> "batchDelete" :> Post '[JSON] () + +-- | Delete all features matching the given IDs. +-- +-- /See:/ 'tablesFeaturesBatchDelete' smart constructor. +data TablesFeaturesBatchDelete = TablesFeaturesBatchDelete + { _tfbdQuotaUser :: !(Maybe Text) + , _tfbdPrettyPrint :: !Bool + , _tfbdUserIp :: !(Maybe Text) + , _tfbdKey :: !(Maybe Text) + , _tfbdId :: !Text + , _tfbdOauthToken :: !(Maybe Text) + , _tfbdFields :: !(Maybe Text) + , _tfbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFeaturesBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfbdQuotaUser' +-- +-- * 'tfbdPrettyPrint' +-- +-- * 'tfbdUserIp' +-- +-- * 'tfbdKey' +-- +-- * 'tfbdId' +-- +-- * 'tfbdOauthToken' +-- +-- * 'tfbdFields' +-- +-- * 'tfbdAlt' +tablesFeaturesBatchDelete + :: Text -- ^ 'id' + -> TablesFeaturesBatchDelete +tablesFeaturesBatchDelete pTfbdId_ = + TablesFeaturesBatchDelete + { _tfbdQuotaUser = Nothing + , _tfbdPrettyPrint = True + , _tfbdUserIp = Nothing + , _tfbdKey = Nothing + , _tfbdId = pTfbdId_ + , _tfbdOauthToken = Nothing + , _tfbdFields = Nothing + , _tfbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tfbdQuotaUser :: Lens' TablesFeaturesBatchDelete' (Maybe Text) +tfbdQuotaUser + = lens _tfbdQuotaUser + (\ s a -> s{_tfbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tfbdPrettyPrint :: Lens' TablesFeaturesBatchDelete' Bool +tfbdPrettyPrint + = lens _tfbdPrettyPrint + (\ s a -> s{_tfbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tfbdUserIp :: Lens' TablesFeaturesBatchDelete' (Maybe Text) +tfbdUserIp + = lens _tfbdUserIp (\ s a -> s{_tfbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tfbdKey :: Lens' TablesFeaturesBatchDelete' (Maybe Text) +tfbdKey = lens _tfbdKey (\ s a -> s{_tfbdKey = a}) + +-- | The ID of the table that contains the features to be deleted. +tfbdId :: Lens' TablesFeaturesBatchDelete' Text +tfbdId = lens _tfbdId (\ s a -> s{_tfbdId = a}) + +-- | OAuth 2.0 token for the current user. +tfbdOauthToken :: Lens' TablesFeaturesBatchDelete' (Maybe Text) +tfbdOauthToken + = lens _tfbdOauthToken + (\ s a -> s{_tfbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tfbdFields :: Lens' TablesFeaturesBatchDelete' (Maybe Text) +tfbdFields + = lens _tfbdFields (\ s a -> s{_tfbdFields = a}) + +-- | Data format for the response. +tfbdAlt :: Lens' TablesFeaturesBatchDelete' Text +tfbdAlt = lens _tfbdAlt (\ s a -> s{_tfbdAlt = a}) + +instance GoogleRequest TablesFeaturesBatchDelete' + where + type Rs TablesFeaturesBatchDelete' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFeaturesBatchDelete{..} + = go _tfbdQuotaUser _tfbdPrettyPrint _tfbdUserIp + _tfbdKey + _tfbdId + _tfbdOauthToken + _tfbdFields + _tfbdAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFeaturesBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchInsert.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchInsert.hs new file mode 100644 index 000000000..85ecdb9ae --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchInsert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Features.BatchInsert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Append features to an existing table. A single batchInsert request can +-- create: - Up to 50 features. - A combined total of 10 000 vertices. +-- Feature limits are documented in the Supported data formats and limits +-- article of the Google Maps Engine help center. Note that free and paid +-- accounts have different limits. For more information about inserting +-- features, read Creating features in the Google Maps Engine developer\'s +-- guide. +-- +-- /See:/ for @MapsengineTablesFeaturesBatchInsert@. +module Mapsengine.Tables.Features.BatchInsert + ( + -- * REST Resource + TablesFeaturesBatchInsertAPI + + -- * Creating a Request + , tablesFeaturesBatchInsert + , TablesFeaturesBatchInsert + + -- * Request Lenses + , tfbiQuotaUser + , tfbiPrettyPrint + , tfbiUserIp + , tfbiKey + , tfbiId + , tfbiOauthToken + , tfbiFields + , tfbiAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFeaturesBatchInsert@ which the +-- 'TablesFeaturesBatchInsert' request conforms to. +type TablesFeaturesBatchInsertAPI = + "tables" :> + Capture "id" Text :> + "features" :> "batchInsert" :> Post '[JSON] () + +-- | Append features to an existing table. A single batchInsert request can +-- create: - Up to 50 features. - A combined total of 10 000 vertices. +-- Feature limits are documented in the Supported data formats and limits +-- article of the Google Maps Engine help center. Note that free and paid +-- accounts have different limits. For more information about inserting +-- features, read Creating features in the Google Maps Engine developer\'s +-- guide. +-- +-- /See:/ 'tablesFeaturesBatchInsert' smart constructor. +data TablesFeaturesBatchInsert = TablesFeaturesBatchInsert + { _tfbiQuotaUser :: !(Maybe Text) + , _tfbiPrettyPrint :: !Bool + , _tfbiUserIp :: !(Maybe Text) + , _tfbiKey :: !(Maybe Text) + , _tfbiId :: !Text + , _tfbiOauthToken :: !(Maybe Text) + , _tfbiFields :: !(Maybe Text) + , _tfbiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFeaturesBatchInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfbiQuotaUser' +-- +-- * 'tfbiPrettyPrint' +-- +-- * 'tfbiUserIp' +-- +-- * 'tfbiKey' +-- +-- * 'tfbiId' +-- +-- * 'tfbiOauthToken' +-- +-- * 'tfbiFields' +-- +-- * 'tfbiAlt' +tablesFeaturesBatchInsert + :: Text -- ^ 'id' + -> TablesFeaturesBatchInsert +tablesFeaturesBatchInsert pTfbiId_ = + TablesFeaturesBatchInsert + { _tfbiQuotaUser = Nothing + , _tfbiPrettyPrint = True + , _tfbiUserIp = Nothing + , _tfbiKey = Nothing + , _tfbiId = pTfbiId_ + , _tfbiOauthToken = Nothing + , _tfbiFields = Nothing + , _tfbiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tfbiQuotaUser :: Lens' TablesFeaturesBatchInsert' (Maybe Text) +tfbiQuotaUser + = lens _tfbiQuotaUser + (\ s a -> s{_tfbiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tfbiPrettyPrint :: Lens' TablesFeaturesBatchInsert' Bool +tfbiPrettyPrint + = lens _tfbiPrettyPrint + (\ s a -> s{_tfbiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tfbiUserIp :: Lens' TablesFeaturesBatchInsert' (Maybe Text) +tfbiUserIp + = lens _tfbiUserIp (\ s a -> s{_tfbiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tfbiKey :: Lens' TablesFeaturesBatchInsert' (Maybe Text) +tfbiKey = lens _tfbiKey (\ s a -> s{_tfbiKey = a}) + +-- | The ID of the table to append the features to. +tfbiId :: Lens' TablesFeaturesBatchInsert' Text +tfbiId = lens _tfbiId (\ s a -> s{_tfbiId = a}) + +-- | OAuth 2.0 token for the current user. +tfbiOauthToken :: Lens' TablesFeaturesBatchInsert' (Maybe Text) +tfbiOauthToken + = lens _tfbiOauthToken + (\ s a -> s{_tfbiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tfbiFields :: Lens' TablesFeaturesBatchInsert' (Maybe Text) +tfbiFields + = lens _tfbiFields (\ s a -> s{_tfbiFields = a}) + +-- | Data format for the response. +tfbiAlt :: Lens' TablesFeaturesBatchInsert' Text +tfbiAlt = lens _tfbiAlt (\ s a -> s{_tfbiAlt = a}) + +instance GoogleRequest TablesFeaturesBatchInsert' + where + type Rs TablesFeaturesBatchInsert' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFeaturesBatchInsert{..} + = go _tfbiQuotaUser _tfbiPrettyPrint _tfbiUserIp + _tfbiKey + _tfbiId + _tfbiOauthToken + _tfbiFields + _tfbiAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFeaturesBatchInsertAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchPatch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchPatch.hs new file mode 100644 index 000000000..ca9d516a5 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/BatchPatch.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Features.BatchPatch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the supplied features. A single batchPatch request can update: - +-- Up to 50 features. - A combined total of 10 000 vertices. Feature limits +-- are documented in the Supported data formats and limits article of the +-- Google Maps Engine help center. Note that free and paid accounts have +-- different limits. Feature updates use HTTP PATCH semantics: - A supplied +-- value replaces an existing value (if any) in that field. - Omitted +-- fields remain unchanged. - Complex values in geometries and properties +-- must be replaced as atomic units. For example, providing just the +-- coordinates of a geometry is not allowed; the complete geometry, +-- including type, must be supplied. - Setting a property\'s value to null +-- deletes that property. For more information about updating features, +-- read Updating features in the Google Maps Engine developer\'s guide. +-- +-- /See:/ for @MapsengineTablesFeaturesBatchPatch@. +module Mapsengine.Tables.Features.BatchPatch + ( + -- * REST Resource + TablesFeaturesBatchPatchAPI + + -- * Creating a Request + , tablesFeaturesBatchPatch + , TablesFeaturesBatchPatch + + -- * Request Lenses + , tfbpQuotaUser + , tfbpPrettyPrint + , tfbpUserIp + , tfbpKey + , tfbpId + , tfbpOauthToken + , tfbpFields + , tfbpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFeaturesBatchPatch@ which the +-- 'TablesFeaturesBatchPatch' request conforms to. +type TablesFeaturesBatchPatchAPI = + "tables" :> + Capture "id" Text :> + "features" :> "batchPatch" :> Post '[JSON] () + +-- | Update the supplied features. A single batchPatch request can update: - +-- Up to 50 features. - A combined total of 10 000 vertices. Feature limits +-- are documented in the Supported data formats and limits article of the +-- Google Maps Engine help center. Note that free and paid accounts have +-- different limits. Feature updates use HTTP PATCH semantics: - A supplied +-- value replaces an existing value (if any) in that field. - Omitted +-- fields remain unchanged. - Complex values in geometries and properties +-- must be replaced as atomic units. For example, providing just the +-- coordinates of a geometry is not allowed; the complete geometry, +-- including type, must be supplied. - Setting a property\'s value to null +-- deletes that property. For more information about updating features, +-- read Updating features in the Google Maps Engine developer\'s guide. +-- +-- /See:/ 'tablesFeaturesBatchPatch' smart constructor. +data TablesFeaturesBatchPatch = TablesFeaturesBatchPatch + { _tfbpQuotaUser :: !(Maybe Text) + , _tfbpPrettyPrint :: !Bool + , _tfbpUserIp :: !(Maybe Text) + , _tfbpKey :: !(Maybe Text) + , _tfbpId :: !Text + , _tfbpOauthToken :: !(Maybe Text) + , _tfbpFields :: !(Maybe Text) + , _tfbpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFeaturesBatchPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfbpQuotaUser' +-- +-- * 'tfbpPrettyPrint' +-- +-- * 'tfbpUserIp' +-- +-- * 'tfbpKey' +-- +-- * 'tfbpId' +-- +-- * 'tfbpOauthToken' +-- +-- * 'tfbpFields' +-- +-- * 'tfbpAlt' +tablesFeaturesBatchPatch + :: Text -- ^ 'id' + -> TablesFeaturesBatchPatch +tablesFeaturesBatchPatch pTfbpId_ = + TablesFeaturesBatchPatch + { _tfbpQuotaUser = Nothing + , _tfbpPrettyPrint = True + , _tfbpUserIp = Nothing + , _tfbpKey = Nothing + , _tfbpId = pTfbpId_ + , _tfbpOauthToken = Nothing + , _tfbpFields = Nothing + , _tfbpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tfbpQuotaUser :: Lens' TablesFeaturesBatchPatch' (Maybe Text) +tfbpQuotaUser + = lens _tfbpQuotaUser + (\ s a -> s{_tfbpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tfbpPrettyPrint :: Lens' TablesFeaturesBatchPatch' Bool +tfbpPrettyPrint + = lens _tfbpPrettyPrint + (\ s a -> s{_tfbpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tfbpUserIp :: Lens' TablesFeaturesBatchPatch' (Maybe Text) +tfbpUserIp + = lens _tfbpUserIp (\ s a -> s{_tfbpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tfbpKey :: Lens' TablesFeaturesBatchPatch' (Maybe Text) +tfbpKey = lens _tfbpKey (\ s a -> s{_tfbpKey = a}) + +-- | The ID of the table containing the features to be patched. +tfbpId :: Lens' TablesFeaturesBatchPatch' Text +tfbpId = lens _tfbpId (\ s a -> s{_tfbpId = a}) + +-- | OAuth 2.0 token for the current user. +tfbpOauthToken :: Lens' TablesFeaturesBatchPatch' (Maybe Text) +tfbpOauthToken + = lens _tfbpOauthToken + (\ s a -> s{_tfbpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tfbpFields :: Lens' TablesFeaturesBatchPatch' (Maybe Text) +tfbpFields + = lens _tfbpFields (\ s a -> s{_tfbpFields = a}) + +-- | Data format for the response. +tfbpAlt :: Lens' TablesFeaturesBatchPatch' Text +tfbpAlt = lens _tfbpAlt (\ s a -> s{_tfbpAlt = a}) + +instance GoogleRequest TablesFeaturesBatchPatch' + where + type Rs TablesFeaturesBatchPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFeaturesBatchPatch{..} + = go _tfbpQuotaUser _tfbpPrettyPrint _tfbpUserIp + _tfbpKey + _tfbpId + _tfbpOauthToken + _tfbpFields + _tfbpAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFeaturesBatchPatchAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/Get.hs new file mode 100644 index 000000000..a4a03b6d2 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/Get.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Features.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return a single feature, given its ID. +-- +-- /See:/ for @MapsengineTablesFeaturesGet@. +module Mapsengine.Tables.Features.Get + ( + -- * REST Resource + TablesFeaturesGetAPI + + -- * Creating a Request + , tablesFeaturesGet + , TablesFeaturesGet + + -- * Request Lenses + , tfgQuotaUser + , tfgPrettyPrint + , tfgUserIp + , tfgKey + , tfgVersion + , tfgId + , tfgSelect + , tfgOauthToken + , tfgTableId + , tfgFields + , tfgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFeaturesGet@ which the +-- 'TablesFeaturesGet' request conforms to. +type TablesFeaturesGetAPI = + "tables" :> + Capture "tableId" Text :> + "features" :> + Capture "id" Text :> + QueryParam "version" Text :> + QueryParam "select" Text :> Get '[JSON] Feature + +-- | Return a single feature, given its ID. +-- +-- /See:/ 'tablesFeaturesGet' smart constructor. +data TablesFeaturesGet = TablesFeaturesGet + { _tfgQuotaUser :: !(Maybe Text) + , _tfgPrettyPrint :: !Bool + , _tfgUserIp :: !(Maybe Text) + , _tfgKey :: !(Maybe Text) + , _tfgVersion :: !(Maybe Text) + , _tfgId :: !Text + , _tfgSelect :: !(Maybe Text) + , _tfgOauthToken :: !(Maybe Text) + , _tfgTableId :: !Text + , _tfgFields :: !(Maybe Text) + , _tfgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFeaturesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfgQuotaUser' +-- +-- * 'tfgPrettyPrint' +-- +-- * 'tfgUserIp' +-- +-- * 'tfgKey' +-- +-- * 'tfgVersion' +-- +-- * 'tfgId' +-- +-- * 'tfgSelect' +-- +-- * 'tfgOauthToken' +-- +-- * 'tfgTableId' +-- +-- * 'tfgFields' +-- +-- * 'tfgAlt' +tablesFeaturesGet + :: Text -- ^ 'id' + -> Text -- ^ 'tableId' + -> TablesFeaturesGet +tablesFeaturesGet pTfgId_ pTfgTableId_ = + TablesFeaturesGet + { _tfgQuotaUser = Nothing + , _tfgPrettyPrint = True + , _tfgUserIp = Nothing + , _tfgKey = Nothing + , _tfgVersion = Nothing + , _tfgId = pTfgId_ + , _tfgSelect = Nothing + , _tfgOauthToken = Nothing + , _tfgTableId = pTfgTableId_ + , _tfgFields = Nothing + , _tfgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tfgQuotaUser :: Lens' TablesFeaturesGet' (Maybe Text) +tfgQuotaUser + = lens _tfgQuotaUser (\ s a -> s{_tfgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tfgPrettyPrint :: Lens' TablesFeaturesGet' Bool +tfgPrettyPrint + = lens _tfgPrettyPrint + (\ s a -> s{_tfgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tfgUserIp :: Lens' TablesFeaturesGet' (Maybe Text) +tfgUserIp + = lens _tfgUserIp (\ s a -> s{_tfgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tfgKey :: Lens' TablesFeaturesGet' (Maybe Text) +tfgKey = lens _tfgKey (\ s a -> s{_tfgKey = a}) + +-- | The table version to access. See Accessing Public Data for information. +tfgVersion :: Lens' TablesFeaturesGet' (Maybe Text) +tfgVersion + = lens _tfgVersion (\ s a -> s{_tfgVersion = a}) + +-- | The ID of the feature to get. +tfgId :: Lens' TablesFeaturesGet' Text +tfgId = lens _tfgId (\ s a -> s{_tfgId = a}) + +-- | A SQL-like projection clause used to specify returned properties. If +-- this parameter is not included, all properties are returned. +tfgSelect :: Lens' TablesFeaturesGet' (Maybe Text) +tfgSelect + = lens _tfgSelect (\ s a -> s{_tfgSelect = a}) + +-- | OAuth 2.0 token for the current user. +tfgOauthToken :: Lens' TablesFeaturesGet' (Maybe Text) +tfgOauthToken + = lens _tfgOauthToken + (\ s a -> s{_tfgOauthToken = a}) + +-- | The ID of the table. +tfgTableId :: Lens' TablesFeaturesGet' Text +tfgTableId + = lens _tfgTableId (\ s a -> s{_tfgTableId = a}) + +-- | Selector specifying which fields to include in a partial response. +tfgFields :: Lens' TablesFeaturesGet' (Maybe Text) +tfgFields + = lens _tfgFields (\ s a -> s{_tfgFields = a}) + +-- | Data format for the response. +tfgAlt :: Lens' TablesFeaturesGet' Text +tfgAlt = lens _tfgAlt (\ s a -> s{_tfgAlt = a}) + +instance GoogleRequest TablesFeaturesGet' where + type Rs TablesFeaturesGet' = Feature + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFeaturesGet{..} + = go _tfgQuotaUser _tfgPrettyPrint _tfgUserIp _tfgKey + _tfgVersion + _tfgId + _tfgSelect + _tfgOauthToken + _tfgTableId + _tfgFields + _tfgAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFeaturesGetAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/List.hs new file mode 100644 index 000000000..d0075204d --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Features/List.hs @@ -0,0 +1,274 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Features.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all features readable by the current user. +-- +-- /See:/ for @MapsengineTablesFeaturesList@. +module Mapsengine.Tables.Features.List + ( + -- * REST Resource + TablesFeaturesListAPI + + -- * Creating a Request + , tablesFeaturesList + , TablesFeaturesList + + -- * Request Lenses + , tflInclude + , tflQuotaUser + , tflPrettyPrint + , tflWhere + , tflOrderBy + , tflUserIp + , tflKey + , tflVersion + , tflId + , tflLimit + , tflPageToken + , tflSelect + , tflOauthToken + , tflIntersects + , tflMaxResults + , tflFields + , tflAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFeaturesList@ which the +-- 'TablesFeaturesList' request conforms to. +type TablesFeaturesListAPI = + "tables" :> + Capture "id" Text :> + "features" :> + QueryParam "include" Text :> + QueryParam "where" Text :> + QueryParam "orderBy" Text :> + QueryParam "version" Text :> + QueryParam "limit" Word32 :> + QueryParam "pageToken" Text :> + QueryParam "select" Text :> + QueryParam "intersects" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] FeaturesListResponse + +-- | Return all features readable by the current user. +-- +-- /See:/ 'tablesFeaturesList' smart constructor. +data TablesFeaturesList = TablesFeaturesList + { _tflInclude :: !(Maybe Text) + , _tflQuotaUser :: !(Maybe Text) + , _tflPrettyPrint :: !Bool + , _tflWhere :: !(Maybe Text) + , _tflOrderBy :: !(Maybe Text) + , _tflUserIp :: !(Maybe Text) + , _tflKey :: !(Maybe Text) + , _tflVersion :: !(Maybe Text) + , _tflId :: !Text + , _tflLimit :: !(Maybe Word32) + , _tflPageToken :: !(Maybe Text) + , _tflSelect :: !(Maybe Text) + , _tflOauthToken :: !(Maybe Text) + , _tflIntersects :: !(Maybe Text) + , _tflMaxResults :: !(Maybe Word32) + , _tflFields :: !(Maybe Text) + , _tflAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFeaturesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tflInclude' +-- +-- * 'tflQuotaUser' +-- +-- * 'tflPrettyPrint' +-- +-- * 'tflWhere' +-- +-- * 'tflOrderBy' +-- +-- * 'tflUserIp' +-- +-- * 'tflKey' +-- +-- * 'tflVersion' +-- +-- * 'tflId' +-- +-- * 'tflLimit' +-- +-- * 'tflPageToken' +-- +-- * 'tflSelect' +-- +-- * 'tflOauthToken' +-- +-- * 'tflIntersects' +-- +-- * 'tflMaxResults' +-- +-- * 'tflFields' +-- +-- * 'tflAlt' +tablesFeaturesList + :: Text -- ^ 'id' + -> TablesFeaturesList +tablesFeaturesList pTflId_ = + TablesFeaturesList + { _tflInclude = Nothing + , _tflQuotaUser = Nothing + , _tflPrettyPrint = True + , _tflWhere = Nothing + , _tflOrderBy = Nothing + , _tflUserIp = Nothing + , _tflKey = Nothing + , _tflVersion = Nothing + , _tflId = pTflId_ + , _tflLimit = Nothing + , _tflPageToken = Nothing + , _tflSelect = Nothing + , _tflOauthToken = Nothing + , _tflIntersects = Nothing + , _tflMaxResults = Nothing + , _tflFields = Nothing + , _tflAlt = "json" + } + +-- | A comma separated list of optional data to include. Optional data +-- available: schema. +tflInclude :: Lens' TablesFeaturesList' (Maybe Text) +tflInclude + = lens _tflInclude (\ s a -> s{_tflInclude = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tflQuotaUser :: Lens' TablesFeaturesList' (Maybe Text) +tflQuotaUser + = lens _tflQuotaUser (\ s a -> s{_tflQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tflPrettyPrint :: Lens' TablesFeaturesList' Bool +tflPrettyPrint + = lens _tflPrettyPrint + (\ s a -> s{_tflPrettyPrint = a}) + +-- | An SQL-like predicate used to filter results. +tflWhere :: Lens' TablesFeaturesList' (Maybe Text) +tflWhere = lens _tflWhere (\ s a -> s{_tflWhere = a}) + +-- | An SQL-like order by clause used to sort results. If this parameter is +-- not included, the order of features is undefined. +tflOrderBy :: Lens' TablesFeaturesList' (Maybe Text) +tflOrderBy + = lens _tflOrderBy (\ s a -> s{_tflOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tflUserIp :: Lens' TablesFeaturesList' (Maybe Text) +tflUserIp + = lens _tflUserIp (\ s a -> s{_tflUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tflKey :: Lens' TablesFeaturesList' (Maybe Text) +tflKey = lens _tflKey (\ s a -> s{_tflKey = a}) + +-- | The table version to access. See Accessing Public Data for information. +tflVersion :: Lens' TablesFeaturesList' (Maybe Text) +tflVersion + = lens _tflVersion (\ s a -> s{_tflVersion = a}) + +-- | The ID of the table to which these features belong. +tflId :: Lens' TablesFeaturesList' Text +tflId = lens _tflId (\ s a -> s{_tflId = a}) + +-- | The total number of features to return from the query, irrespective of +-- the number of pages. +tflLimit :: Lens' TablesFeaturesList' (Maybe Word32) +tflLimit = lens _tflLimit (\ s a -> s{_tflLimit = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +tflPageToken :: Lens' TablesFeaturesList' (Maybe Text) +tflPageToken + = lens _tflPageToken (\ s a -> s{_tflPageToken = a}) + +-- | A SQL-like projection clause used to specify returned properties. If +-- this parameter is not included, all properties are returned. +tflSelect :: Lens' TablesFeaturesList' (Maybe Text) +tflSelect + = lens _tflSelect (\ s a -> s{_tflSelect = a}) + +-- | OAuth 2.0 token for the current user. +tflOauthToken :: Lens' TablesFeaturesList' (Maybe Text) +tflOauthToken + = lens _tflOauthToken + (\ s a -> s{_tflOauthToken = a}) + +-- | A geometry literal that specifies the spatial restriction of the query. +tflIntersects :: Lens' TablesFeaturesList' (Maybe Text) +tflIntersects + = lens _tflIntersects + (\ s a -> s{_tflIntersects = a}) + +-- | The maximum number of items to include in the response, used for paging. +-- The maximum supported value is 1000. +tflMaxResults :: Lens' TablesFeaturesList' (Maybe Word32) +tflMaxResults + = lens _tflMaxResults + (\ s a -> s{_tflMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tflFields :: Lens' TablesFeaturesList' (Maybe Text) +tflFields + = lens _tflFields (\ s a -> s{_tflFields = a}) + +-- | Data format for the response. +tflAlt :: Lens' TablesFeaturesList' Text +tflAlt = lens _tflAlt (\ s a -> s{_tflAlt = a}) + +instance GoogleRequest TablesFeaturesList' where + type Rs TablesFeaturesList' = FeaturesListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFeaturesList{..} + = go _tflInclude _tflQuotaUser _tflPrettyPrint + _tflWhere + _tflOrderBy + _tflUserIp + _tflKey + _tflVersion + _tflId + _tflLimit + _tflPageToken + _tflSelect + _tflOauthToken + _tflIntersects + _tflMaxResults + _tflFields + _tflAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFeaturesListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Files/Insert.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Files/Insert.hs new file mode 100644 index 000000000..5444c1519 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Files/Insert.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Files.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Upload a file to a placeholder table asset. See Table Upload in the +-- Developer\'s Guide for more information. Supported file types are listed +-- in the Supported data formats and limits article of the Google Maps +-- Engine help center. +-- +-- /See:/ for @MapsengineTablesFilesInsert@. +module Mapsengine.Tables.Files.Insert + ( + -- * REST Resource + TablesFilesInsertAPI + + -- * Creating a Request + , tablesFilesInsert + , TablesFilesInsert + + -- * Request Lenses + , tfiQuotaUser + , tfiPrettyPrint + , tfiUserIp + , tfiKey + , tfiId + , tfiOauthToken + , tfiFilename + , tfiFields + , tfiAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesFilesInsert@ which the +-- 'TablesFilesInsert' request conforms to. +type TablesFilesInsertAPI = + "tables" :> + Capture "id" Text :> + "files" :> + QueryParam "filename" Text :> Post '[JSON] () + +-- | Upload a file to a placeholder table asset. See Table Upload in the +-- Developer\'s Guide for more information. Supported file types are listed +-- in the Supported data formats and limits article of the Google Maps +-- Engine help center. +-- +-- /See:/ 'tablesFilesInsert' smart constructor. +data TablesFilesInsert = TablesFilesInsert + { _tfiQuotaUser :: !(Maybe Text) + , _tfiPrettyPrint :: !Bool + , _tfiUserIp :: !(Maybe Text) + , _tfiKey :: !(Maybe Text) + , _tfiId :: !Text + , _tfiOauthToken :: !(Maybe Text) + , _tfiFilename :: !Text + , _tfiFields :: !(Maybe Text) + , _tfiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesFilesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tfiQuotaUser' +-- +-- * 'tfiPrettyPrint' +-- +-- * 'tfiUserIp' +-- +-- * 'tfiKey' +-- +-- * 'tfiId' +-- +-- * 'tfiOauthToken' +-- +-- * 'tfiFilename' +-- +-- * 'tfiFields' +-- +-- * 'tfiAlt' +tablesFilesInsert + :: Text -- ^ 'id' + -> Text -- ^ 'filename' + -> TablesFilesInsert +tablesFilesInsert pTfiId_ pTfiFilename_ = + TablesFilesInsert + { _tfiQuotaUser = Nothing + , _tfiPrettyPrint = True + , _tfiUserIp = Nothing + , _tfiKey = Nothing + , _tfiId = pTfiId_ + , _tfiOauthToken = Nothing + , _tfiFilename = pTfiFilename_ + , _tfiFields = Nothing + , _tfiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tfiQuotaUser :: Lens' TablesFilesInsert' (Maybe Text) +tfiQuotaUser + = lens _tfiQuotaUser (\ s a -> s{_tfiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tfiPrettyPrint :: Lens' TablesFilesInsert' Bool +tfiPrettyPrint + = lens _tfiPrettyPrint + (\ s a -> s{_tfiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tfiUserIp :: Lens' TablesFilesInsert' (Maybe Text) +tfiUserIp + = lens _tfiUserIp (\ s a -> s{_tfiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tfiKey :: Lens' TablesFilesInsert' (Maybe Text) +tfiKey = lens _tfiKey (\ s a -> s{_tfiKey = a}) + +-- | The ID of the table asset. +tfiId :: Lens' TablesFilesInsert' Text +tfiId = lens _tfiId (\ s a -> s{_tfiId = a}) + +-- | OAuth 2.0 token for the current user. +tfiOauthToken :: Lens' TablesFilesInsert' (Maybe Text) +tfiOauthToken + = lens _tfiOauthToken + (\ s a -> s{_tfiOauthToken = a}) + +-- | The file name of this uploaded file. +tfiFilename :: Lens' TablesFilesInsert' Text +tfiFilename + = lens _tfiFilename (\ s a -> s{_tfiFilename = a}) + +-- | Selector specifying which fields to include in a partial response. +tfiFields :: Lens' TablesFilesInsert' (Maybe Text) +tfiFields + = lens _tfiFields (\ s a -> s{_tfiFields = a}) + +-- | Data format for the response. +tfiAlt :: Lens' TablesFilesInsert' Text +tfiAlt = lens _tfiAlt (\ s a -> s{_tfiAlt = a}) + +instance GoogleRequest TablesFilesInsert' where + type Rs TablesFilesInsert' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesFilesInsert{..} + = go _tfiQuotaUser _tfiPrettyPrint _tfiUserIp _tfiKey + _tfiId + _tfiOauthToken + (Just _tfiFilename) + _tfiFields + _tfiAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesFilesInsertAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Get.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Get.hs new file mode 100644 index 000000000..171b9ef97 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Get.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return metadata for a particular table, including the schema. +-- +-- /See:/ for @MapsengineTablesGet@. +module Mapsengine.Tables.Get + ( + -- * REST Resource + TablesGetAPI + + -- * Creating a Request + , tablesGet + , TablesGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgVersion + , tgId + , tgOauthToken + , tgFields + , tgAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesGet@ which the +-- 'TablesGet' request conforms to. +type TablesGetAPI = + "tables" :> + Capture "id" Text :> + QueryParam "version" Text :> Get '[JSON] Table + +-- | Return metadata for a particular table, including the schema. +-- +-- /See:/ 'tablesGet' smart constructor. +data TablesGet = TablesGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgVersion :: !(Maybe Text) + , _tgId :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgVersion' +-- +-- * 'tgId' +-- +-- * 'tgOauthToken' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +tablesGet + :: Text -- ^ 'id' + -> TablesGet +tablesGet pTgId_ = + TablesGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgVersion = Nothing + , _tgId = pTgId_ + , _tgOauthToken = Nothing + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TablesGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TablesGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TablesGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TablesGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +tgVersion :: Lens' TablesGet' (Maybe Text) +tgVersion + = lens _tgVersion (\ s a -> s{_tgVersion = a}) + +-- | The ID of the table. +tgId :: Lens' TablesGet' Text +tgId = lens _tgId (\ s a -> s{_tgId = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TablesGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TablesGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TablesGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TablesGet' where + type Rs TablesGet' = Table + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgUserIp _tgKey + _tgVersion + _tgId + _tgOauthToken + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TablesGetAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/List.hs new file mode 100644 index 000000000..3b1b2d413 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/List.hs @@ -0,0 +1,312 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all tables readable by the current user. +-- +-- /See:/ for @MapsengineTablesList@. +module Mapsengine.Tables.List + ( + -- * REST Resource + TablesListAPI + + -- * Creating a Request + , tablesList + , TablesList + + -- * Request Lenses + , tlCreatedAfter + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlCreatorEmail + , tlRole + , tlKey + , tlBbox + , tlProcessingStatus + , tlModifiedAfter + , tlModifiedBefore + , tlPageToken + , tlProjectId + , tlOauthToken + , tlSearch + , tlMaxResults + , tlTags + , tlFields + , tlCreatedBefore + , tlAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesList@ which the +-- 'TablesList' request conforms to. +type TablesListAPI = + "tables" :> + QueryParam "createdAfter" UTCTime :> + QueryParam "creatorEmail" Text :> + QueryParam "role" Text :> + QueryParam "bbox" Text :> + QueryParam "processingStatus" Text :> + QueryParam "modifiedAfter" UTCTime :> + QueryParam "modifiedBefore" UTCTime :> + QueryParam "pageToken" Text :> + QueryParam "projectId" Text :> + QueryParam "search" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "tags" Text :> + QueryParam "createdBefore" UTCTime :> + Get '[JSON] TablesListResponse + +-- | Return all tables readable by the current user. +-- +-- /See:/ 'tablesList' smart constructor. +data TablesList = TablesList + { _tlCreatedAfter :: !(Maybe UTCTime) + , _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlCreatorEmail :: !(Maybe Text) + , _tlRole :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlBbox :: !(Maybe Text) + , _tlProcessingStatus :: !(Maybe Text) + , _tlModifiedAfter :: !(Maybe UTCTime) + , _tlModifiedBefore :: !(Maybe UTCTime) + , _tlPageToken :: !(Maybe Text) + , _tlProjectId :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlSearch :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Word32) + , _tlTags :: !(Maybe Text) + , _tlFields :: !(Maybe Text) + , _tlCreatedBefore :: !(Maybe UTCTime) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlCreatedAfter' +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlCreatorEmail' +-- +-- * 'tlRole' +-- +-- * 'tlKey' +-- +-- * 'tlBbox' +-- +-- * 'tlProcessingStatus' +-- +-- * 'tlModifiedAfter' +-- +-- * 'tlModifiedBefore' +-- +-- * 'tlPageToken' +-- +-- * 'tlProjectId' +-- +-- * 'tlOauthToken' +-- +-- * 'tlSearch' +-- +-- * 'tlMaxResults' +-- +-- * 'tlTags' +-- +-- * 'tlFields' +-- +-- * 'tlCreatedBefore' +-- +-- * 'tlAlt' +tablesList + :: TablesList +tablesList = + TablesList + { _tlCreatedAfter = Nothing + , _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlCreatorEmail = Nothing + , _tlRole = Nothing + , _tlKey = Nothing + , _tlBbox = Nothing + , _tlProcessingStatus = Nothing + , _tlModifiedAfter = Nothing + , _tlModifiedBefore = Nothing + , _tlPageToken = Nothing + , _tlProjectId = Nothing + , _tlOauthToken = Nothing + , _tlSearch = Nothing + , _tlMaxResults = Nothing + , _tlTags = Nothing + , _tlFields = Nothing + , _tlCreatedBefore = Nothing + , _tlAlt = "json" + } + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or after this time. +tlCreatedAfter :: Lens' TablesList' (Maybe UTCTime) +tlCreatedAfter + = lens _tlCreatedAfter + (\ s a -> s{_tlCreatedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TablesList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TablesList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TablesList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | An email address representing a user. Returned assets that have been +-- created by the user associated with the provided email address. +tlCreatorEmail :: Lens' TablesList' (Maybe Text) +tlCreatorEmail + = lens _tlCreatorEmail + (\ s a -> s{_tlCreatorEmail = a}) + +-- | The role parameter indicates that the response should only contain +-- assets where the current user has the specified level of access. +tlRole :: Lens' TablesList' (Maybe Text) +tlRole = lens _tlRole (\ s a -> s{_tlRole = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TablesList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | A bounding box, expressed as \"west,south,east,north\". If set, only +-- assets which intersect this bounding box will be returned. +tlBbox :: Lens' TablesList' (Maybe Text) +tlBbox = lens _tlBbox (\ s a -> s{_tlBbox = a}) + +tlProcessingStatus :: Lens' TablesList' (Maybe Text) +tlProcessingStatus + = lens _tlProcessingStatus + (\ s a -> s{_tlProcessingStatus = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or after this time. +tlModifiedAfter :: Lens' TablesList' (Maybe UTCTime) +tlModifiedAfter + = lens _tlModifiedAfter + (\ s a -> s{_tlModifiedAfter = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been modified at or before this time. +tlModifiedBefore :: Lens' TablesList' (Maybe UTCTime) +tlModifiedBefore + = lens _tlModifiedBefore + (\ s a -> s{_tlModifiedBefore = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +tlPageToken :: Lens' TablesList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | The ID of a Maps Engine project, used to filter the response. To list +-- all available projects with their IDs, send a Projects: list request. +-- You can also find your project ID as the value of the DashboardPlace:cid +-- URL parameter when signed in to mapsengine.google.com. +tlProjectId :: Lens' TablesList' (Maybe Text) +tlProjectId + = lens _tlProjectId (\ s a -> s{_tlProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TablesList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | An unstructured search string used to filter the set of results based on +-- asset metadata. +tlSearch :: Lens' TablesList' (Maybe Text) +tlSearch = lens _tlSearch (\ s a -> s{_tlSearch = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 100. +tlMaxResults :: Lens' TablesList' (Maybe Word32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | A comma separated list of tags. Returned assets will contain all the +-- tags from the list. +tlTags :: Lens' TablesList' (Maybe Text) +tlTags = lens _tlTags (\ s a -> s{_tlTags = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TablesList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). +-- Returned assets will have been created at or before this time. +tlCreatedBefore :: Lens' TablesList' (Maybe UTCTime) +tlCreatedBefore + = lens _tlCreatedBefore + (\ s a -> s{_tlCreatedBefore = a}) + +-- | Data format for the response. +tlAlt :: Lens' TablesList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TablesList' where + type Rs TablesList' = TablesListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesList{..} + = go _tlCreatedAfter _tlQuotaUser _tlPrettyPrint + _tlUserIp + _tlCreatorEmail + _tlRole + _tlKey + _tlBbox + _tlProcessingStatus + _tlModifiedAfter + _tlModifiedBefore + _tlPageToken + _tlProjectId + _tlOauthToken + _tlSearch + _tlMaxResults + _tlTags + _tlFields + _tlCreatedBefore + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TablesListAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Parents/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Parents/List.hs new file mode 100644 index 000000000..c907de368 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Parents/List.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Parents.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all parent ids of the specified table. +-- +-- /See:/ for @MapsengineTablesParentsList@. +module Mapsengine.Tables.Parents.List + ( + -- * REST Resource + TablesParentsListAPI + + -- * Creating a Request + , tablesParentsList + , TablesParentsList + + -- * Request Lenses + , tplQuotaUser + , tplPrettyPrint + , tplUserIp + , tplKey + , tplId + , tplPageToken + , tplOauthToken + , tplMaxResults + , tplFields + , tplAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesParentsList@ which the +-- 'TablesParentsList' request conforms to. +type TablesParentsListAPI = + "tables" :> + Capture "id" Text :> + "parents" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ParentsListResponse + +-- | Return all parent ids of the specified table. +-- +-- /See:/ 'tablesParentsList' smart constructor. +data TablesParentsList = TablesParentsList + { _tplQuotaUser :: !(Maybe Text) + , _tplPrettyPrint :: !Bool + , _tplUserIp :: !(Maybe Text) + , _tplKey :: !(Maybe Text) + , _tplId :: !Text + , _tplPageToken :: !(Maybe Text) + , _tplOauthToken :: !(Maybe Text) + , _tplMaxResults :: !(Maybe Word32) + , _tplFields :: !(Maybe Text) + , _tplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesParentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tplQuotaUser' +-- +-- * 'tplPrettyPrint' +-- +-- * 'tplUserIp' +-- +-- * 'tplKey' +-- +-- * 'tplId' +-- +-- * 'tplPageToken' +-- +-- * 'tplOauthToken' +-- +-- * 'tplMaxResults' +-- +-- * 'tplFields' +-- +-- * 'tplAlt' +tablesParentsList + :: Text -- ^ 'id' + -> TablesParentsList +tablesParentsList pTplId_ = + TablesParentsList + { _tplQuotaUser = Nothing + , _tplPrettyPrint = True + , _tplUserIp = Nothing + , _tplKey = Nothing + , _tplId = pTplId_ + , _tplPageToken = Nothing + , _tplOauthToken = Nothing + , _tplMaxResults = Nothing + , _tplFields = Nothing + , _tplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tplQuotaUser :: Lens' TablesParentsList' (Maybe Text) +tplQuotaUser + = lens _tplQuotaUser (\ s a -> s{_tplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tplPrettyPrint :: Lens' TablesParentsList' Bool +tplPrettyPrint + = lens _tplPrettyPrint + (\ s a -> s{_tplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tplUserIp :: Lens' TablesParentsList' (Maybe Text) +tplUserIp + = lens _tplUserIp (\ s a -> s{_tplUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tplKey :: Lens' TablesParentsList' (Maybe Text) +tplKey = lens _tplKey (\ s a -> s{_tplKey = a}) + +-- | The ID of the table whose parents will be listed. +tplId :: Lens' TablesParentsList' Text +tplId = lens _tplId (\ s a -> s{_tplId = a}) + +-- | The continuation token, used to page through large result sets. To get +-- the next page of results, set this parameter to the value of +-- nextPageToken from the previous response. +tplPageToken :: Lens' TablesParentsList' (Maybe Text) +tplPageToken + = lens _tplPageToken (\ s a -> s{_tplPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tplOauthToken :: Lens' TablesParentsList' (Maybe Text) +tplOauthToken + = lens _tplOauthToken + (\ s a -> s{_tplOauthToken = a}) + +-- | The maximum number of items to include in a single response page. The +-- maximum supported value is 50. +tplMaxResults :: Lens' TablesParentsList' (Maybe Word32) +tplMaxResults + = lens _tplMaxResults + (\ s a -> s{_tplMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tplFields :: Lens' TablesParentsList' (Maybe Text) +tplFields + = lens _tplFields (\ s a -> s{_tplFields = a}) + +-- | Data format for the response. +tplAlt :: Lens' TablesParentsList' Text +tplAlt = lens _tplAlt (\ s a -> s{_tplAlt = a}) + +instance GoogleRequest TablesParentsList' where + type Rs TablesParentsList' = ParentsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesParentsList{..} + = go _tplQuotaUser _tplPrettyPrint _tplUserIp _tplKey + _tplId + _tplPageToken + _tplOauthToken + _tplMaxResults + _tplFields + _tplAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesParentsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Patch.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Patch.hs new file mode 100644 index 000000000..571f4d220 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Mutate a table asset. +-- +-- /See:/ for @MapsengineTablesPatch@. +module Mapsengine.Tables.Patch + ( + -- * REST Resource + TablesPatchAPI + + -- * Creating a Request + , tablesPatch + , TablesPatch + + -- * Request Lenses + , tppQuotaUser + , tppPrettyPrint + , tppUserIp + , tppKey + , tppId + , tppOauthToken + , tppFields + , tppAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesPatch@ which the +-- 'TablesPatch' request conforms to. +type TablesPatchAPI = + "tables" :> Capture "id" Text :> Patch '[JSON] () + +-- | Mutate a table asset. +-- +-- /See:/ 'tablesPatch' smart constructor. +data TablesPatch = TablesPatch + { _tppQuotaUser :: !(Maybe Text) + , _tppPrettyPrint :: !Bool + , _tppUserIp :: !(Maybe Text) + , _tppKey :: !(Maybe Text) + , _tppId :: !Text + , _tppOauthToken :: !(Maybe Text) + , _tppFields :: !(Maybe Text) + , _tppAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tppQuotaUser' +-- +-- * 'tppPrettyPrint' +-- +-- * 'tppUserIp' +-- +-- * 'tppKey' +-- +-- * 'tppId' +-- +-- * 'tppOauthToken' +-- +-- * 'tppFields' +-- +-- * 'tppAlt' +tablesPatch + :: Text -- ^ 'id' + -> TablesPatch +tablesPatch pTppId_ = + TablesPatch + { _tppQuotaUser = Nothing + , _tppPrettyPrint = True + , _tppUserIp = Nothing + , _tppKey = Nothing + , _tppId = pTppId_ + , _tppOauthToken = Nothing + , _tppFields = Nothing + , _tppAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tppQuotaUser :: Lens' TablesPatch' (Maybe Text) +tppQuotaUser + = lens _tppQuotaUser (\ s a -> s{_tppQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tppPrettyPrint :: Lens' TablesPatch' Bool +tppPrettyPrint + = lens _tppPrettyPrint + (\ s a -> s{_tppPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tppUserIp :: Lens' TablesPatch' (Maybe Text) +tppUserIp + = lens _tppUserIp (\ s a -> s{_tppUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tppKey :: Lens' TablesPatch' (Maybe Text) +tppKey = lens _tppKey (\ s a -> s{_tppKey = a}) + +-- | The ID of the table. +tppId :: Lens' TablesPatch' Text +tppId = lens _tppId (\ s a -> s{_tppId = a}) + +-- | OAuth 2.0 token for the current user. +tppOauthToken :: Lens' TablesPatch' (Maybe Text) +tppOauthToken + = lens _tppOauthToken + (\ s a -> s{_tppOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tppFields :: Lens' TablesPatch' (Maybe Text) +tppFields + = lens _tppFields (\ s a -> s{_tppFields = a}) + +-- | Data format for the response. +tppAlt :: Lens' TablesPatch' Text +tppAlt = lens _tppAlt (\ s a -> s{_tppAlt = a}) + +instance GoogleRequest TablesPatch' where + type Rs TablesPatch' = () + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesPatch{..} + = go _tppQuotaUser _tppPrettyPrint _tppUserIp _tppKey + _tppId + _tppOauthToken + _tppFields + _tppAlt + where go + = clientWithRoute (Proxy :: Proxy TablesPatchAPI) r u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchDelete.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchDelete.hs new file mode 100644 index 000000000..531b45716 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchDelete.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Permissions.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ for @MapsengineTablesPermissionsBatchDelete@. +module Mapsengine.Tables.Permissions.BatchDelete + ( + -- * REST Resource + TablesPermissionsBatchDeleteAPI + + -- * Creating a Request + , tablesPermissionsBatchDelete + , TablesPermissionsBatchDelete + + -- * Request Lenses + , tpbdQuotaUser + , tpbdPrettyPrint + , tpbdUserIp + , tpbdKey + , tpbdId + , tpbdOauthToken + , tpbdFields + , tpbdAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesPermissionsBatchDelete@ which the +-- 'TablesPermissionsBatchDelete' request conforms to. +type TablesPermissionsBatchDeleteAPI = + "tables" :> + Capture "id" Text :> + "permissions" :> + "batchDelete" :> + Post '[JSON] PermissionsBatchDeleteResponse + +-- | Remove permission entries from an already existing asset. +-- +-- /See:/ 'tablesPermissionsBatchDelete' smart constructor. +data TablesPermissionsBatchDelete = TablesPermissionsBatchDelete + { _tpbdQuotaUser :: !(Maybe Text) + , _tpbdPrettyPrint :: !Bool + , _tpbdUserIp :: !(Maybe Text) + , _tpbdKey :: !(Maybe Text) + , _tpbdId :: !Text + , _tpbdOauthToken :: !(Maybe Text) + , _tpbdFields :: !(Maybe Text) + , _tpbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesPermissionsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpbdQuotaUser' +-- +-- * 'tpbdPrettyPrint' +-- +-- * 'tpbdUserIp' +-- +-- * 'tpbdKey' +-- +-- * 'tpbdId' +-- +-- * 'tpbdOauthToken' +-- +-- * 'tpbdFields' +-- +-- * 'tpbdAlt' +tablesPermissionsBatchDelete + :: Text -- ^ 'id' + -> TablesPermissionsBatchDelete +tablesPermissionsBatchDelete pTpbdId_ = + TablesPermissionsBatchDelete + { _tpbdQuotaUser = Nothing + , _tpbdPrettyPrint = True + , _tpbdUserIp = Nothing + , _tpbdKey = Nothing + , _tpbdId = pTpbdId_ + , _tpbdOauthToken = Nothing + , _tpbdFields = Nothing + , _tpbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpbdQuotaUser :: Lens' TablesPermissionsBatchDelete' (Maybe Text) +tpbdQuotaUser + = lens _tpbdQuotaUser + (\ s a -> s{_tpbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpbdPrettyPrint :: Lens' TablesPermissionsBatchDelete' Bool +tpbdPrettyPrint + = lens _tpbdPrettyPrint + (\ s a -> s{_tpbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpbdUserIp :: Lens' TablesPermissionsBatchDelete' (Maybe Text) +tpbdUserIp + = lens _tpbdUserIp (\ s a -> s{_tpbdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpbdKey :: Lens' TablesPermissionsBatchDelete' (Maybe Text) +tpbdKey = lens _tpbdKey (\ s a -> s{_tpbdKey = a}) + +-- | The ID of the asset from which permissions will be removed. +tpbdId :: Lens' TablesPermissionsBatchDelete' Text +tpbdId = lens _tpbdId (\ s a -> s{_tpbdId = a}) + +-- | OAuth 2.0 token for the current user. +tpbdOauthToken :: Lens' TablesPermissionsBatchDelete' (Maybe Text) +tpbdOauthToken + = lens _tpbdOauthToken + (\ s a -> s{_tpbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpbdFields :: Lens' TablesPermissionsBatchDelete' (Maybe Text) +tpbdFields + = lens _tpbdFields (\ s a -> s{_tpbdFields = a}) + +-- | Data format for the response. +tpbdAlt :: Lens' TablesPermissionsBatchDelete' Text +tpbdAlt = lens _tpbdAlt (\ s a -> s{_tpbdAlt = a}) + +instance GoogleRequest TablesPermissionsBatchDelete' + where + type Rs TablesPermissionsBatchDelete' = + PermissionsBatchDeleteResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesPermissionsBatchDelete{..} + = go _tpbdQuotaUser _tpbdPrettyPrint _tpbdUserIp + _tpbdKey + _tpbdId + _tpbdOauthToken + _tpbdFields + _tpbdAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesPermissionsBatchDeleteAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchUpdate.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchUpdate.hs new file mode 100644 index 000000000..717f06da5 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/BatchUpdate.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Permissions.BatchUpdate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ for @MapsengineTablesPermissionsBatchUpdate@. +module Mapsengine.Tables.Permissions.BatchUpdate + ( + -- * REST Resource + TablesPermissionsBatchUpdateAPI + + -- * Creating a Request + , tablesPermissionsBatchUpdate + , TablesPermissionsBatchUpdate + + -- * Request Lenses + , tpbuQuotaUser + , tpbuPrettyPrint + , tpbuUserIp + , tpbuKey + , tpbuId + , tpbuOauthToken + , tpbuFields + , tpbuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesPermissionsBatchUpdate@ which the +-- 'TablesPermissionsBatchUpdate' request conforms to. +type TablesPermissionsBatchUpdateAPI = + "tables" :> + Capture "id" Text :> + "permissions" :> + "batchUpdate" :> + Post '[JSON] PermissionsBatchUpdateResponse + +-- | Add or update permission entries to an already existing asset. An asset +-- can hold up to 20 different permission entries. Each batchInsert request +-- is atomic. +-- +-- /See:/ 'tablesPermissionsBatchUpdate' smart constructor. +data TablesPermissionsBatchUpdate = TablesPermissionsBatchUpdate + { _tpbuQuotaUser :: !(Maybe Text) + , _tpbuPrettyPrint :: !Bool + , _tpbuUserIp :: !(Maybe Text) + , _tpbuKey :: !(Maybe Text) + , _tpbuId :: !Text + , _tpbuOauthToken :: !(Maybe Text) + , _tpbuFields :: !(Maybe Text) + , _tpbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesPermissionsBatchUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpbuQuotaUser' +-- +-- * 'tpbuPrettyPrint' +-- +-- * 'tpbuUserIp' +-- +-- * 'tpbuKey' +-- +-- * 'tpbuId' +-- +-- * 'tpbuOauthToken' +-- +-- * 'tpbuFields' +-- +-- * 'tpbuAlt' +tablesPermissionsBatchUpdate + :: Text -- ^ 'id' + -> TablesPermissionsBatchUpdate +tablesPermissionsBatchUpdate pTpbuId_ = + TablesPermissionsBatchUpdate + { _tpbuQuotaUser = Nothing + , _tpbuPrettyPrint = True + , _tpbuUserIp = Nothing + , _tpbuKey = Nothing + , _tpbuId = pTpbuId_ + , _tpbuOauthToken = Nothing + , _tpbuFields = Nothing + , _tpbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpbuQuotaUser :: Lens' TablesPermissionsBatchUpdate' (Maybe Text) +tpbuQuotaUser + = lens _tpbuQuotaUser + (\ s a -> s{_tpbuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpbuPrettyPrint :: Lens' TablesPermissionsBatchUpdate' Bool +tpbuPrettyPrint + = lens _tpbuPrettyPrint + (\ s a -> s{_tpbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpbuUserIp :: Lens' TablesPermissionsBatchUpdate' (Maybe Text) +tpbuUserIp + = lens _tpbuUserIp (\ s a -> s{_tpbuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpbuKey :: Lens' TablesPermissionsBatchUpdate' (Maybe Text) +tpbuKey = lens _tpbuKey (\ s a -> s{_tpbuKey = a}) + +-- | The ID of the asset to which permissions will be added. +tpbuId :: Lens' TablesPermissionsBatchUpdate' Text +tpbuId = lens _tpbuId (\ s a -> s{_tpbuId = a}) + +-- | OAuth 2.0 token for the current user. +tpbuOauthToken :: Lens' TablesPermissionsBatchUpdate' (Maybe Text) +tpbuOauthToken + = lens _tpbuOauthToken + (\ s a -> s{_tpbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpbuFields :: Lens' TablesPermissionsBatchUpdate' (Maybe Text) +tpbuFields + = lens _tpbuFields (\ s a -> s{_tpbuFields = a}) + +-- | Data format for the response. +tpbuAlt :: Lens' TablesPermissionsBatchUpdate' Text +tpbuAlt = lens _tpbuAlt (\ s a -> s{_tpbuAlt = a}) + +instance GoogleRequest TablesPermissionsBatchUpdate' + where + type Rs TablesPermissionsBatchUpdate' = + PermissionsBatchUpdateResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesPermissionsBatchUpdate{..} + = go _tpbuQuotaUser _tpbuPrettyPrint _tpbuUserIp + _tpbuKey + _tpbuId + _tpbuOauthToken + _tpbuFields + _tpbuAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesPermissionsBatchUpdateAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/List.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/List.hs new file mode 100644 index 000000000..8def01e60 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Permissions/List.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ for @MapsengineTablesPermissionsList@. +module Mapsengine.Tables.Permissions.List + ( + -- * REST Resource + TablesPermissionsListAPI + + -- * Creating a Request + , tablesPermissionsList + , TablesPermissionsList + + -- * Request Lenses + , tabQuotaUser + , tabPrettyPrint + , tabUserIp + , tabKey + , tabId + , tabOauthToken + , tabFields + , tabAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesPermissionsList@ which the +-- 'TablesPermissionsList' request conforms to. +type TablesPermissionsListAPI = + "tables" :> + Capture "id" Text :> + "permissions" :> Get '[JSON] PermissionsListResponse + +-- | Return all of the permissions for the specified asset. +-- +-- /See:/ 'tablesPermissionsList' smart constructor. +data TablesPermissionsList = TablesPermissionsList + { _tabQuotaUser :: !(Maybe Text) + , _tabPrettyPrint :: !Bool + , _tabUserIp :: !(Maybe Text) + , _tabKey :: !(Maybe Text) + , _tabId :: !Text + , _tabOauthToken :: !(Maybe Text) + , _tabFields :: !(Maybe Text) + , _tabAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tabQuotaUser' +-- +-- * 'tabPrettyPrint' +-- +-- * 'tabUserIp' +-- +-- * 'tabKey' +-- +-- * 'tabId' +-- +-- * 'tabOauthToken' +-- +-- * 'tabFields' +-- +-- * 'tabAlt' +tablesPermissionsList + :: Text -- ^ 'id' + -> TablesPermissionsList +tablesPermissionsList pTabId_ = + TablesPermissionsList + { _tabQuotaUser = Nothing + , _tabPrettyPrint = True + , _tabUserIp = Nothing + , _tabKey = Nothing + , _tabId = pTabId_ + , _tabOauthToken = Nothing + , _tabFields = Nothing + , _tabAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tabQuotaUser :: Lens' TablesPermissionsList' (Maybe Text) +tabQuotaUser + = lens _tabQuotaUser (\ s a -> s{_tabQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tabPrettyPrint :: Lens' TablesPermissionsList' Bool +tabPrettyPrint + = lens _tabPrettyPrint + (\ s a -> s{_tabPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tabUserIp :: Lens' TablesPermissionsList' (Maybe Text) +tabUserIp + = lens _tabUserIp (\ s a -> s{_tabUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tabKey :: Lens' TablesPermissionsList' (Maybe Text) +tabKey = lens _tabKey (\ s a -> s{_tabKey = a}) + +-- | The ID of the asset whose permissions will be listed. +tabId :: Lens' TablesPermissionsList' Text +tabId = lens _tabId (\ s a -> s{_tabId = a}) + +-- | OAuth 2.0 token for the current user. +tabOauthToken :: Lens' TablesPermissionsList' (Maybe Text) +tabOauthToken + = lens _tabOauthToken + (\ s a -> s{_tabOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tabFields :: Lens' TablesPermissionsList' (Maybe Text) +tabFields + = lens _tabFields (\ s a -> s{_tabFields = a}) + +-- | Data format for the response. +tabAlt :: Lens' TablesPermissionsList' Text +tabAlt = lens _tabAlt (\ s a -> s{_tabAlt = a}) + +instance GoogleRequest TablesPermissionsList' where + type Rs TablesPermissionsList' = + PermissionsListResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesPermissionsList{..} + = go _tabQuotaUser _tabPrettyPrint _tabUserIp _tabKey + _tabId + _tabOauthToken + _tabFields + _tabAlt + where go + = clientWithRoute + (Proxy :: Proxy TablesPermissionsListAPI) + r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Process.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Process.hs new file mode 100644 index 000000000..d3b8ce5d0 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Process.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Process +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Process a table asset. +-- +-- /See:/ for @MapsengineTablesProcess@. +module Mapsengine.Tables.Process + ( + -- * REST Resource + TablesProcessAPI + + -- * Creating a Request + , tablesProcess + , TablesProcess + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpUserIp + , tpKey + , tpId + , tpOauthToken + , tpFields + , tpAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesProcess@ which the +-- 'TablesProcess' request conforms to. +type TablesProcessAPI = + "tables" :> + Capture "id" Text :> + "process" :> Post '[JSON] ProcessResponse + +-- | Process a table asset. +-- +-- /See:/ 'tablesProcess' smart constructor. +data TablesProcess = TablesProcess + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpId :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesProcess'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpId' +-- +-- * 'tpOauthToken' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +tablesProcess + :: Text -- ^ 'id' + -> TablesProcess +tablesProcess pTpId_ = + TablesProcess + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpId = pTpId_ + , _tpOauthToken = Nothing + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TablesProcess' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TablesProcess' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TablesProcess' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TablesProcess' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | The ID of the table. +tpId :: Lens' TablesProcess' Text +tpId = lens _tpId (\ s a -> s{_tpId = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TablesProcess' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TablesProcess' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TablesProcess' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TablesProcess' where + type Rs TablesProcess' = ProcessResponse + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesProcess{..} + = go _tpQuotaUser _tpPrettyPrint _tpUserIp _tpKey + _tpId + _tpOauthToken + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TablesProcessAPI) r + u diff --git a/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Upload.hs b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Upload.hs new file mode 100644 index 000000000..ba7d551b2 --- /dev/null +++ b/gogol-maps-engine/gen/Network/Google/Resource/Mapsengine/Tables/Upload.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mapsengine.Tables.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a placeholder table asset to which table files can be uploaded. +-- Once the placeholder has been created, files are uploaded to the +-- https:\/\/www.googleapis.com\/upload\/mapsengine\/v1\/tables\/table_id\/files +-- endpoint. See Table Upload in the Developer\'s Guide or Table.files: +-- insert in the reference documentation for more information. +-- +-- /See:/ for @MapsengineTablesUpload@. +module Mapsengine.Tables.Upload + ( + -- * REST Resource + TablesUploadAPI + + -- * Creating a Request + , tablesUpload + , TablesUpload + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuUserIp + , tuKey + , tuOauthToken + , tuFields + , tuAlt + ) where + +import Network.Google.MapEngine.Types +import Network.Google.Prelude + +-- | A resource alias for @MapsengineTablesUpload@ which the +-- 'TablesUpload' request conforms to. +type TablesUploadAPI = + "tables" :> "upload" :> Post '[JSON] Table + +-- | Create a placeholder table asset to which table files can be uploaded. +-- Once the placeholder has been created, files are uploaded to the +-- https:\/\/www.googleapis.com\/upload\/mapsengine\/v1\/tables\/table_id\/files +-- endpoint. See Table Upload in the Developer\'s Guide or Table.files: +-- insert in the reference documentation for more information. +-- +-- /See:/ 'tablesUpload' smart constructor. +data TablesUpload = TablesUpload + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuOauthToken :: !(Maybe Text) + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TablesUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuOauthToken' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +tablesUpload + :: TablesUpload +tablesUpload = + TablesUpload + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuOauthToken = Nothing + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TablesUpload' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TablesUpload' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TablesUpload' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TablesUpload' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TablesUpload' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TablesUpload' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TablesUpload' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TablesUpload' where + type Rs TablesUpload' = Table + request = requestWithRoute defReq mapEngineURL + requestWithRoute r u TablesUpload{..} + = go _tuQuotaUser _tuPrettyPrint _tuUserIp _tuKey + _tuOauthToken + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TablesUploadAPI) r + u diff --git a/gogol-maps-engine/gogol-maps-engine.cabal b/gogol-maps-engine/gogol-maps-engine.cabal new file mode 100644 index 000000000..7cea73257 --- /dev/null +++ b/gogol-maps-engine/gogol-maps-engine.cabal @@ -0,0 +1,120 @@ +name: gogol-maps-engine +version: 0.0.1 +synopsis: Google Maps Engine API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Maps Engine API allows developers to store and query + geospatial vector and raster data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.MapEngine + , Network.Google.MapEngine.Types + , Network.Google.Resource.Mapsengine.Assets.Get + , Network.Google.Resource.Mapsengine.Assets.List + , Network.Google.Resource.Mapsengine.Assets.Parents.List + , Network.Google.Resource.Mapsengine.Assets.Permissions.List + , Network.Google.Resource.Mapsengine.Layers.CancelProcessing + , Network.Google.Resource.Mapsengine.Layers.Create + , Network.Google.Resource.Mapsengine.Layers.Delete + , Network.Google.Resource.Mapsengine.Layers.Get + , Network.Google.Resource.Mapsengine.Layers.GetPublished + , Network.Google.Resource.Mapsengine.Layers.List + , Network.Google.Resource.Mapsengine.Layers.ListPublished + , Network.Google.Resource.Mapsengine.Layers.Parents.List + , Network.Google.Resource.Mapsengine.Layers.Patch + , Network.Google.Resource.Mapsengine.Layers.Permissions.BatchDelete + , Network.Google.Resource.Mapsengine.Layers.Permissions.BatchUpdate + , Network.Google.Resource.Mapsengine.Layers.Permissions.List + , Network.Google.Resource.Mapsengine.Layers.Process + , Network.Google.Resource.Mapsengine.Layers.Publish + , Network.Google.Resource.Mapsengine.Layers.Unpublish + , Network.Google.Resource.Mapsengine.Maps.Create + , Network.Google.Resource.Mapsengine.Maps.Delete + , Network.Google.Resource.Mapsengine.Maps.Get + , Network.Google.Resource.Mapsengine.Maps.GetPublished + , Network.Google.Resource.Mapsengine.Maps.List + , Network.Google.Resource.Mapsengine.Maps.ListPublished + , Network.Google.Resource.Mapsengine.Maps.Patch + , Network.Google.Resource.Mapsengine.Maps.Permissions.BatchDelete + , Network.Google.Resource.Mapsengine.Maps.Permissions.BatchUpdate + , Network.Google.Resource.Mapsengine.Maps.Permissions.List + , Network.Google.Resource.Mapsengine.Maps.Publish + , Network.Google.Resource.Mapsengine.Maps.Unpublish + , Network.Google.Resource.Mapsengine.Projects.Icons.Create + , Network.Google.Resource.Mapsengine.Projects.Icons.Get + , Network.Google.Resource.Mapsengine.Projects.Icons.List + , Network.Google.Resource.Mapsengine.Projects.List + , Network.Google.Resource.Mapsengine.RasterCollections.CancelProcessing + , Network.Google.Resource.Mapsengine.RasterCollections.Create + , Network.Google.Resource.Mapsengine.RasterCollections.Delete + , Network.Google.Resource.Mapsengine.RasterCollections.Get + , Network.Google.Resource.Mapsengine.RasterCollections.List + , Network.Google.Resource.Mapsengine.RasterCollections.Parents.List + , Network.Google.Resource.Mapsengine.RasterCollections.Patch + , Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchDelete + , Network.Google.Resource.Mapsengine.RasterCollections.Permissions.BatchUpdate + , Network.Google.Resource.Mapsengine.RasterCollections.Permissions.List + , Network.Google.Resource.Mapsengine.RasterCollections.Process + , Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchDelete + , Network.Google.Resource.Mapsengine.RasterCollections.Rasters.BatchInsert + , Network.Google.Resource.Mapsengine.RasterCollections.Rasters.List + , Network.Google.Resource.Mapsengine.Rasters.Delete + , Network.Google.Resource.Mapsengine.Rasters.Files.Insert + , Network.Google.Resource.Mapsengine.Rasters.Get + , Network.Google.Resource.Mapsengine.Rasters.List + , Network.Google.Resource.Mapsengine.Rasters.Parents.List + , Network.Google.Resource.Mapsengine.Rasters.Patch + , Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchDelete + , Network.Google.Resource.Mapsengine.Rasters.Permissions.BatchUpdate + , Network.Google.Resource.Mapsengine.Rasters.Permissions.List + , Network.Google.Resource.Mapsengine.Rasters.Process + , Network.Google.Resource.Mapsengine.Rasters.Upload + , Network.Google.Resource.Mapsengine.Tables.Create + , Network.Google.Resource.Mapsengine.Tables.Delete + , Network.Google.Resource.Mapsengine.Tables.Features.BatchDelete + , Network.Google.Resource.Mapsengine.Tables.Features.BatchInsert + , Network.Google.Resource.Mapsengine.Tables.Features.BatchPatch + , Network.Google.Resource.Mapsengine.Tables.Features.Get + , Network.Google.Resource.Mapsengine.Tables.Features.List + , Network.Google.Resource.Mapsengine.Tables.Files.Insert + , Network.Google.Resource.Mapsengine.Tables.Get + , Network.Google.Resource.Mapsengine.Tables.List + , Network.Google.Resource.Mapsengine.Tables.Parents.List + , Network.Google.Resource.Mapsengine.Tables.Patch + , Network.Google.Resource.Mapsengine.Tables.Permissions.BatchDelete + , Network.Google.Resource.Mapsengine.Tables.Permissions.BatchUpdate + , Network.Google.Resource.Mapsengine.Tables.Permissions.List + , Network.Google.Resource.Mapsengine.Tables.Process + , Network.Google.Resource.Mapsengine.Tables.Upload + + other-modules: + Network.Google.MapEngine.Types.Product + , Network.Google.MapEngine.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-maps-engine/src/.gitkeep b/gogol-maps-engine/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-mirror/LICENSE b/gogol-mirror/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-mirror/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-mirror/Makefile b/gogol-mirror/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-mirror/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-mirror/README.md b/gogol-mirror/README.md new file mode 100644 index 000000000..fc2ce5848 --- /dev/null +++ b/gogol-mirror/README.md @@ -0,0 +1,28 @@ +# gogol-mirror + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Mirror API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-mirror` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-mirror/Setup.hs b/gogol-mirror/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-mirror/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-mirror/gen/Network/Google/Mirror.hs b/gogol-mirror/gen/Network/Google/Mirror.hs new file mode 100644 index 000000000..b6799b9f8 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Mirror.hs @@ -0,0 +1,323 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Mirror +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for interacting with Glass users via the timeline. +-- +-- /See:/ +module Network.Google.Mirror + ( + -- * API + MirrorAPI + , mirrorAPI + , mirrorURL + + -- * Service Methods + + -- * REST Resources + + -- ** MirrorAccountsInsert + , module Mirror.Accounts.Insert + + -- ** MirrorContactsDelete + , module Mirror.Contacts.Delete + + -- ** MirrorContactsGet + , module Mirror.Contacts.Get + + -- ** MirrorContactsInsert + , module Mirror.Contacts.Insert + + -- ** MirrorContactsList + , module Mirror.Contacts.List + + -- ** MirrorContactsPatch + , module Mirror.Contacts.Patch + + -- ** MirrorContactsUpdate + , module Mirror.Contacts.Update + + -- ** MirrorLocationsGet + , module Mirror.Locations.Get + + -- ** MirrorLocationsList + , module Mirror.Locations.List + + -- ** MirrorSettingsGet + , module Mirror.Settings.Get + + -- ** MirrorSubscriptionsDelete + , module Mirror.Subscriptions.Delete + + -- ** MirrorSubscriptionsInsert + , module Mirror.Subscriptions.Insert + + -- ** MirrorSubscriptionsList + , module Mirror.Subscriptions.List + + -- ** MirrorSubscriptionsUpdate + , module Mirror.Subscriptions.Update + + -- ** MirrorTimelineAttachmentsDelete + , module Mirror.Timeline.Attachments.Delete + + -- ** MirrorTimelineAttachmentsGet + , module Mirror.Timeline.Attachments.Get + + -- ** MirrorTimelineAttachmentsInsert + , module Mirror.Timeline.Attachments.Insert + + -- ** MirrorTimelineAttachmentsList + , module Mirror.Timeline.Attachments.List + + -- ** MirrorTimelineDelete + , module Mirror.Timeline.Delete + + -- ** MirrorTimelineGet + , module Mirror.Timeline.Get + + -- ** MirrorTimelineInsert + , module Mirror.Timeline.Insert + + -- ** MirrorTimelineList + , module Mirror.Timeline.List + + -- ** MirrorTimelinePatch + , module Mirror.Timeline.Patch + + -- ** MirrorTimelineUpdate + , module Mirror.Timeline.Update + + -- * Types + + -- ** Command + , Command + , command + , cType + + -- ** LocationsListResponse + , LocationsListResponse + , locationsListResponse + , llrKind + , llrItems + + -- ** NotificationConfig + , NotificationConfig + , notificationConfig + , ncDeliveryTime + , ncLevel + + -- ** Location + , Location + , location + , lKind + , lLatitude + , lAddress + , lDisplayName + , lId + , lAccuracy + , lLongitude + , lTimestamp + + -- ** Notification + , Notification + , notification + , nOperation + , nItemId + , nCollection + , nUserActions + , nVerifyToken + , nUserToken + + -- ** Contact + , Contact + , contact + , conAcceptCommands + , conSharingFeatures + , conImageUrls + , conPriority + , conKind + , conAcceptTypes + , conPhoneNumber + , conDisplayName + , conSource + , conId + , conType + , conSpeakableName + + -- ** AuthToken + , AuthToken + , authToken + , atAuthToken + , atType + + -- ** AttachmentsListResponse + , AttachmentsListResponse + , attachmentsListResponse + , alrKind + , alrItems + + -- ** MenuItem + , MenuItem + , menuItem + , miValues + , miRemoveWhenSelected + , miAction + , miPayload + , miContextualCommand + , miId + + -- ** Setting + , Setting + , setting + , sKind + , sValue + , sId + + -- ** Account + , Account + , account + , aAuthTokens + , aUserData + , aPassword + , aFeatures + + -- ** Attachment + , Attachment + , attachment + , aContentUrl + , aId + , aIsProcessingContent + , aContentType + + -- ** UserData + , UserData + , userData + , udValue + , udKey + + -- ** UserAction + , UserAction + , userAction + , uaPayload + , uaType + + -- ** ContactsListResponse + , ContactsListResponse + , contactsListResponse + , clrKind + , clrItems + + -- ** TimelineListResponse + , TimelineListResponse + , timelineListResponse + , tlrNextPageToken + , tlrKind + , tlrItems + + -- ** MenuValue + , MenuValue + , menuValue + , mvState + , mvDisplayName + , mvIconUrl + + -- ** Subscription + , Subscription + , subscription + , subCallbackUrl + , subOperation + , subNotification + , subKind + , subCollection + , subVerifyToken + , subUserToken + , subId + , subUpdated + + -- ** TimelineItem + , TimelineItem + , timelineItem + , tiCreator + , tiDisplayTime + , tiEtag + , tiIsDeleted + , tiPinScore + , tiAttachments + , tiLocation + , tiMenuItems + , tiNotification + , tiText + , tiKind + , tiCreated + , tiSpeakableText + , tiIsBundleCover + , tiSpeakableType + , tiBundleId + , tiCanonicalUrl + , tiSelfLink + , tiIsPinned + , tiSourceItemId + , tiId + , tiHtml + , tiUpdated + , tiRecipients + , tiTitle + , tiInReplyTo + + -- ** SubscriptionsListResponse + , SubscriptionsListResponse + , subscriptionsListResponse + , slrKind + , slrItems + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude +import Network.Google.Resource.Mirror.Accounts.Insert +import Network.Google.Resource.Mirror.Contacts.Delete +import Network.Google.Resource.Mirror.Contacts.Get +import Network.Google.Resource.Mirror.Contacts.Insert +import Network.Google.Resource.Mirror.Contacts.List +import Network.Google.Resource.Mirror.Contacts.Patch +import Network.Google.Resource.Mirror.Contacts.Update +import Network.Google.Resource.Mirror.Locations.Get +import Network.Google.Resource.Mirror.Locations.List +import Network.Google.Resource.Mirror.Settings.Get +import Network.Google.Resource.Mirror.Subscriptions.Delete +import Network.Google.Resource.Mirror.Subscriptions.Insert +import Network.Google.Resource.Mirror.Subscriptions.List +import Network.Google.Resource.Mirror.Subscriptions.Update +import Network.Google.Resource.Mirror.Timeline.Attachments.Delete +import Network.Google.Resource.Mirror.Timeline.Attachments.Get +import Network.Google.Resource.Mirror.Timeline.Attachments.Insert +import Network.Google.Resource.Mirror.Timeline.Attachments.List +import Network.Google.Resource.Mirror.Timeline.Delete +import Network.Google.Resource.Mirror.Timeline.Get +import Network.Google.Resource.Mirror.Timeline.Insert +import Network.Google.Resource.Mirror.Timeline.List +import Network.Google.Resource.Mirror.Timeline.Patch +import Network.Google.Resource.Mirror.Timeline.Update + +{- $resources +TODO +-} + +type MirrorAPI = + Accounts :<|> Settings :<|> Subscriptions :<|> + Timeline + :<|> Contacts + :<|> Locations + +mirrorAPI :: Proxy MirrorAPI +mirrorAPI = Proxy diff --git a/gogol-mirror/gen/Network/Google/Mirror/Types.hs b/gogol-mirror/gen/Network/Google/Mirror/Types.hs new file mode 100644 index 000000000..0b54388b0 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Mirror/Types.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Mirror.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Mirror.Types + ( + -- * Service URL + mirrorURL + + -- * Command + , Command + , command + , cType + + -- * LocationsListResponse + , LocationsListResponse + , locationsListResponse + , llrKind + , llrItems + + -- * NotificationConfig + , NotificationConfig + , notificationConfig + , ncDeliveryTime + , ncLevel + + -- * Location + , Location + , location + , lKind + , lLatitude + , lAddress + , lDisplayName + , lId + , lAccuracy + , lLongitude + , lTimestamp + + -- * Notification + , Notification + , notification + , nOperation + , nItemId + , nCollection + , nUserActions + , nVerifyToken + , nUserToken + + -- * Contact + , Contact + , contact + , conAcceptCommands + , conSharingFeatures + , conImageUrls + , conPriority + , conKind + , conAcceptTypes + , conPhoneNumber + , conDisplayName + , conSource + , conId + , conType + , conSpeakableName + + -- * AuthToken + , AuthToken + , authToken + , atAuthToken + , atType + + -- * AttachmentsListResponse + , AttachmentsListResponse + , attachmentsListResponse + , alrKind + , alrItems + + -- * MenuItem + , MenuItem + , menuItem + , miValues + , miRemoveWhenSelected + , miAction + , miPayload + , miContextualCommand + , miId + + -- * Setting + , Setting + , setting + , sKind + , sValue + , sId + + -- * Account + , Account + , account + , aAuthTokens + , aUserData + , aPassword + , aFeatures + + -- * Attachment + , Attachment + , attachment + , aContentUrl + , aId + , aIsProcessingContent + , aContentType + + -- * UserData + , UserData + , userData + , udValue + , udKey + + -- * UserAction + , UserAction + , userAction + , uaPayload + , uaType + + -- * ContactsListResponse + , ContactsListResponse + , contactsListResponse + , clrKind + , clrItems + + -- * TimelineListResponse + , TimelineListResponse + , timelineListResponse + , tlrNextPageToken + , tlrKind + , tlrItems + + -- * MenuValue + , MenuValue + , menuValue + , mvState + , mvDisplayName + , mvIconUrl + + -- * Subscription + , Subscription + , subscription + , subCallbackUrl + , subOperation + , subNotification + , subKind + , subCollection + , subVerifyToken + , subUserToken + , subId + , subUpdated + + -- * TimelineItem + , TimelineItem + , timelineItem + , tiCreator + , tiDisplayTime + , tiEtag + , tiIsDeleted + , tiPinScore + , tiAttachments + , tiLocation + , tiMenuItems + , tiNotification + , tiText + , tiKind + , tiCreated + , tiSpeakableText + , tiIsBundleCover + , tiSpeakableType + , tiBundleId + , tiCanonicalUrl + , tiSelfLink + , tiIsPinned + , tiSourceItemId + , tiId + , tiHtml + , tiUpdated + , tiRecipients + , tiTitle + , tiInReplyTo + + -- * SubscriptionsListResponse + , SubscriptionsListResponse + , subscriptionsListResponse + , slrKind + , slrItems + ) where + +import Network.Google.Mirror.Types.Product +import Network.Google.Mirror.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Mirror API. +mirrorURL :: BaseURL +mirrorURL + = BaseUrl Https + "https://www.googleapis.com/mirror/v1/" + 443 diff --git a/gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs b/gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs new file mode 100644 index 000000000..d14b77567 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs @@ -0,0 +1,1814 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Mirror.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Mirror.Types.Product where + +import Network.Google.Mirror.Types.Sum +import Network.Google.Prelude + +-- | A single menu command that is part of a Contact. +-- +-- /See:/ 'command' smart constructor. +newtype Command = Command + { _cType :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Command' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cType' +command + :: Command +command = + Command + { _cType = Nothing + } + +-- | The type of operation this command corresponds to. Allowed values are: - +-- TAKE_A_NOTE - Shares a timeline item with the transcription of user +-- speech from the \"Take a note\" voice menu command. - POST_AN_UPDATE - +-- Shares a timeline item with the transcription of user speech from the +-- \"Post an update\" voice menu command. +cType :: Lens' Command (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Command where + parseJSON + = withObject "Command" + (\ o -> Command <$> (o .:? "type")) + +instance ToJSON Command where + toJSON Command{..} + = object (catMaybes [("type" .=) <$> _cType]) + +-- | A list of Locations. This is the response from the server to GET +-- requests on the locations collection. +-- +-- /See:/ 'locationsListResponse' smart constructor. +data LocationsListResponse = LocationsListResponse + { _llrKind :: !Text + , _llrItems :: !(Maybe [Maybe Location]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrKind' +-- +-- * 'llrItems' +locationsListResponse + :: LocationsListResponse +locationsListResponse = + LocationsListResponse + { _llrKind = "mirror#locationsList" + , _llrItems = Nothing + } + +-- | The type of resource. This is always mirror#locationsList. +llrKind :: Lens' LocationsListResponse Text +llrKind = lens _llrKind (\ s a -> s{_llrKind = a}) + +-- | The list of locations. +llrItems :: Lens' LocationsListResponse [Maybe Location] +llrItems + = lens _llrItems (\ s a -> s{_llrItems = a}) . + _Default + . _Coerce + +instance FromJSON LocationsListResponse where + parseJSON + = withObject "LocationsListResponse" + (\ o -> + LocationsListResponse <$> + (o .:? "kind" .!= "mirror#locationsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON LocationsListResponse where + toJSON LocationsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _llrKind), + ("items" .=) <$> _llrItems]) + +-- | Controls how notifications for a timeline item are presented to the +-- user. +-- +-- /See:/ 'notificationConfig' smart constructor. +data NotificationConfig = NotificationConfig + { _ncDeliveryTime :: !(Maybe UTCTime) + , _ncLevel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NotificationConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ncDeliveryTime' +-- +-- * 'ncLevel' +notificationConfig + :: NotificationConfig +notificationConfig = + NotificationConfig + { _ncDeliveryTime = Nothing + , _ncLevel = Nothing + } + +-- | The time at which the notification should be delivered. +ncDeliveryTime :: Lens' NotificationConfig (Maybe UTCTime) +ncDeliveryTime + = lens _ncDeliveryTime + (\ s a -> s{_ncDeliveryTime = a}) + +-- | Describes how important the notification is. Allowed values are: - +-- DEFAULT - Notifications of default importance. A chime will be played to +-- alert users. +ncLevel :: Lens' NotificationConfig (Maybe Text) +ncLevel = lens _ncLevel (\ s a -> s{_ncLevel = a}) + +instance FromJSON NotificationConfig where + parseJSON + = withObject "NotificationConfig" + (\ o -> + NotificationConfig <$> + (o .:? "deliveryTime") <*> (o .:? "level")) + +instance ToJSON NotificationConfig where + toJSON NotificationConfig{..} + = object + (catMaybes + [("deliveryTime" .=) <$> _ncDeliveryTime, + ("level" .=) <$> _ncLevel]) + +-- | A geographic location that can be associated with a timeline item. +-- +-- /See:/ 'location' smart constructor. +data Location = Location + { _lKind :: !Text + , _lLatitude :: !(Maybe Double) + , _lAddress :: !(Maybe Text) + , _lDisplayName :: !(Maybe Text) + , _lId :: !(Maybe Text) + , _lAccuracy :: !(Maybe Double) + , _lLongitude :: !(Maybe Double) + , _lTimestamp :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Location' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lKind' +-- +-- * 'lLatitude' +-- +-- * 'lAddress' +-- +-- * 'lDisplayName' +-- +-- * 'lId' +-- +-- * 'lAccuracy' +-- +-- * 'lLongitude' +-- +-- * 'lTimestamp' +location + :: Location +location = + Location + { _lKind = "mirror#location" + , _lLatitude = Nothing + , _lAddress = Nothing + , _lDisplayName = Nothing + , _lId = Nothing + , _lAccuracy = Nothing + , _lLongitude = Nothing + , _lTimestamp = Nothing + } + +-- | The type of resource. This is always mirror#location. +lKind :: Lens' Location Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | The latitude, in degrees. +lLatitude :: Lens' Location (Maybe Double) +lLatitude + = lens _lLatitude (\ s a -> s{_lLatitude = a}) + +-- | The full address of the location. +lAddress :: Lens' Location (Maybe Text) +lAddress = lens _lAddress (\ s a -> s{_lAddress = a}) + +-- | The name to be displayed. This may be a business name or a user-defined +-- place, such as \"Home\". +lDisplayName :: Lens' Location (Maybe Text) +lDisplayName + = lens _lDisplayName (\ s a -> s{_lDisplayName = a}) + +-- | The ID of the location. +lId :: Lens' Location (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | The accuracy of the location fix in meters. +lAccuracy :: Lens' Location (Maybe Double) +lAccuracy + = lens _lAccuracy (\ s a -> s{_lAccuracy = a}) + +-- | The longitude, in degrees. +lLongitude :: Lens' Location (Maybe Double) +lLongitude + = lens _lLongitude (\ s a -> s{_lLongitude = a}) + +-- | The time at which this location was captured, formatted according to RFC +-- 3339. +lTimestamp :: Lens' Location (Maybe UTCTime) +lTimestamp + = lens _lTimestamp (\ s a -> s{_lTimestamp = a}) + +instance FromJSON Location where + parseJSON + = withObject "Location" + (\ o -> + Location <$> + (o .:? "kind" .!= "mirror#location") <*> + (o .:? "latitude") + <*> (o .:? "address") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "accuracy") + <*> (o .:? "longitude") + <*> (o .:? "timestamp")) + +instance ToJSON Location where + toJSON Location{..} + = object + (catMaybes + [Just ("kind" .= _lKind), + ("latitude" .=) <$> _lLatitude, + ("address" .=) <$> _lAddress, + ("displayName" .=) <$> _lDisplayName, + ("id" .=) <$> _lId, ("accuracy" .=) <$> _lAccuracy, + ("longitude" .=) <$> _lLongitude, + ("timestamp" .=) <$> _lTimestamp]) + +-- | A notification delivered by the API. +-- +-- /See:/ 'notification' smart constructor. +data Notification = Notification + { _nOperation :: !(Maybe Text) + , _nItemId :: !(Maybe Text) + , _nCollection :: !(Maybe Text) + , _nUserActions :: !(Maybe [Maybe UserAction]) + , _nVerifyToken :: !(Maybe Text) + , _nUserToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Notification' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nOperation' +-- +-- * 'nItemId' +-- +-- * 'nCollection' +-- +-- * 'nUserActions' +-- +-- * 'nVerifyToken' +-- +-- * 'nUserToken' +notification + :: Notification +notification = + Notification + { _nOperation = Nothing + , _nItemId = Nothing + , _nCollection = Nothing + , _nUserActions = Nothing + , _nVerifyToken = Nothing + , _nUserToken = Nothing + } + +-- | The type of operation that generated the notification. +nOperation :: Lens' Notification (Maybe Text) +nOperation + = lens _nOperation (\ s a -> s{_nOperation = a}) + +-- | The ID of the item that generated the notification. +nItemId :: Lens' Notification (Maybe Text) +nItemId = lens _nItemId (\ s a -> s{_nItemId = a}) + +-- | The collection that generated the notification. +nCollection :: Lens' Notification (Maybe Text) +nCollection + = lens _nCollection (\ s a -> s{_nCollection = a}) + +-- | A list of actions taken by the user that triggered the notification. +nUserActions :: Lens' Notification [Maybe UserAction] +nUserActions + = lens _nUserActions (\ s a -> s{_nUserActions = a}) + . _Default + . _Coerce + +-- | The secret verify token provided by the service when it subscribed for +-- notifications. +nVerifyToken :: Lens' Notification (Maybe Text) +nVerifyToken + = lens _nVerifyToken (\ s a -> s{_nVerifyToken = a}) + +-- | The user token provided by the service when it subscribed for +-- notifications. +nUserToken :: Lens' Notification (Maybe Text) +nUserToken + = lens _nUserToken (\ s a -> s{_nUserToken = a}) + +instance FromJSON Notification where + parseJSON + = withObject "Notification" + (\ o -> + Notification <$> + (o .:? "operation") <*> (o .:? "itemId") <*> + (o .:? "collection") + <*> (o .:? "userActions" .!= mempty) + <*> (o .:? "verifyToken") + <*> (o .:? "userToken")) + +instance ToJSON Notification where + toJSON Notification{..} + = object + (catMaybes + [("operation" .=) <$> _nOperation, + ("itemId" .=) <$> _nItemId, + ("collection" .=) <$> _nCollection, + ("userActions" .=) <$> _nUserActions, + ("verifyToken" .=) <$> _nVerifyToken, + ("userToken" .=) <$> _nUserToken]) + +-- | A person or group that can be used as a creator or a contact. +-- +-- /See:/ 'contact' smart constructor. +data Contact = Contact + { _conAcceptCommands :: !(Maybe [Maybe Command]) + , _conSharingFeatures :: !(Maybe [Text]) + , _conImageUrls :: !(Maybe [Text]) + , _conPriority :: !(Maybe Word32) + , _conKind :: !Text + , _conAcceptTypes :: !(Maybe [Text]) + , _conPhoneNumber :: !(Maybe Text) + , _conDisplayName :: !(Maybe Text) + , _conSource :: !(Maybe Text) + , _conId :: !(Maybe Text) + , _conType :: !(Maybe Text) + , _conSpeakableName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Contact' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'conAcceptCommands' +-- +-- * 'conSharingFeatures' +-- +-- * 'conImageUrls' +-- +-- * 'conPriority' +-- +-- * 'conKind' +-- +-- * 'conAcceptTypes' +-- +-- * 'conPhoneNumber' +-- +-- * 'conDisplayName' +-- +-- * 'conSource' +-- +-- * 'conId' +-- +-- * 'conType' +-- +-- * 'conSpeakableName' +contact + :: Contact +contact = + Contact + { _conAcceptCommands = Nothing + , _conSharingFeatures = Nothing + , _conImageUrls = Nothing + , _conPriority = Nothing + , _conKind = "mirror#contact" + , _conAcceptTypes = Nothing + , _conPhoneNumber = Nothing + , _conDisplayName = Nothing + , _conSource = Nothing + , _conId = Nothing + , _conType = Nothing + , _conSpeakableName = Nothing + } + +-- | A list of voice menu commands that a contact can handle. Glass shows up +-- to three contacts for each voice menu command. If there are more than +-- that, the three contacts with the highest priority are shown for that +-- particular command. +conAcceptCommands :: Lens' Contact [Maybe Command] +conAcceptCommands + = lens _conAcceptCommands + (\ s a -> s{_conAcceptCommands = a}) + . _Default + . _Coerce + +-- | A list of sharing features that a contact can handle. Allowed values +-- are: - ADD_CAPTION +conSharingFeatures :: Lens' Contact [Text] +conSharingFeatures + = lens _conSharingFeatures + (\ s a -> s{_conSharingFeatures = a}) + . _Default + . _Coerce + +-- | Set of image URLs to display for a contact. Most contacts will have a +-- single image, but a \"group\" contact may include up to 8 image URLs and +-- they will be resized and cropped into a mosaic on the client. +conImageUrls :: Lens' Contact [Text] +conImageUrls + = lens _conImageUrls (\ s a -> s{_conImageUrls = a}) + . _Default + . _Coerce + +-- | Priority for the contact to determine ordering in a list of contacts. +-- Contacts with higher priorities will be shown before ones with lower +-- priorities. +conPriority :: Lens' Contact (Maybe Word32) +conPriority + = lens _conPriority (\ s a -> s{_conPriority = a}) + +-- | The type of resource. This is always mirror#contact. +conKind :: Lens' Contact Text +conKind = lens _conKind (\ s a -> s{_conKind = a}) + +-- | A list of MIME types that a contact supports. The contact will be shown +-- to the user if any of its acceptTypes matches any of the types of the +-- attachments on the item. If no acceptTypes are given, the contact will +-- be shown for all items. +conAcceptTypes :: Lens' Contact [Text] +conAcceptTypes + = lens _conAcceptTypes + (\ s a -> s{_conAcceptTypes = a}) + . _Default + . _Coerce + +-- | Primary phone number for the contact. This can be a fully-qualified +-- number, with country calling code and area code, or a local number. +conPhoneNumber :: Lens' Contact (Maybe Text) +conPhoneNumber + = lens _conPhoneNumber + (\ s a -> s{_conPhoneNumber = a}) + +-- | The name to display for this contact. +conDisplayName :: Lens' Contact (Maybe Text) +conDisplayName + = lens _conDisplayName + (\ s a -> s{_conDisplayName = a}) + +-- | The ID of the application that created this contact. This is populated +-- by the API +conSource :: Lens' Contact (Maybe Text) +conSource + = lens _conSource (\ s a -> s{_conSource = a}) + +-- | An ID for this contact. This is generated by the application and is +-- treated as an opaque token. +conId :: Lens' Contact (Maybe Text) +conId = lens _conId (\ s a -> s{_conId = a}) + +-- | The type for this contact. This is used for sorting in UIs. Allowed +-- values are: - INDIVIDUAL - Represents a single person. This is the +-- default. - GROUP - Represents more than a single person. +conType :: Lens' Contact (Maybe Text) +conType = lens _conType (\ s a -> s{_conType = a}) + +-- | Name of this contact as it should be pronounced. If this contact\'s name +-- must be spoken as part of a voice disambiguation menu, this name is used +-- as the expected pronunciation. This is useful for contact names with +-- unpronounceable characters or whose display spelling is otherwise not +-- phonetic. +conSpeakableName :: Lens' Contact (Maybe Text) +conSpeakableName + = lens _conSpeakableName + (\ s a -> s{_conSpeakableName = a}) + +instance FromJSON Contact where + parseJSON + = withObject "Contact" + (\ o -> + Contact <$> + (o .:? "acceptCommands" .!= mempty) <*> + (o .:? "sharingFeatures" .!= mempty) + <*> (o .:? "imageUrls" .!= mempty) + <*> (o .:? "priority") + <*> (o .:? "kind" .!= "mirror#contact") + <*> (o .:? "acceptTypes" .!= mempty) + <*> (o .:? "phoneNumber") + <*> (o .:? "displayName") + <*> (o .:? "source") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "speakableName")) + +instance ToJSON Contact where + toJSON Contact{..} + = object + (catMaybes + [("acceptCommands" .=) <$> _conAcceptCommands, + ("sharingFeatures" .=) <$> _conSharingFeatures, + ("imageUrls" .=) <$> _conImageUrls, + ("priority" .=) <$> _conPriority, + Just ("kind" .= _conKind), + ("acceptTypes" .=) <$> _conAcceptTypes, + ("phoneNumber" .=) <$> _conPhoneNumber, + ("displayName" .=) <$> _conDisplayName, + ("source" .=) <$> _conSource, ("id" .=) <$> _conId, + ("type" .=) <$> _conType, + ("speakableName" .=) <$> _conSpeakableName]) + +-- +-- /See:/ 'authToken' smart constructor. +data AuthToken = AuthToken + { _atAuthToken :: !(Maybe Text) + , _atType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AuthToken' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'atAuthToken' +-- +-- * 'atType' +authToken + :: AuthToken +authToken = + AuthToken + { _atAuthToken = Nothing + , _atType = Nothing + } + +atAuthToken :: Lens' AuthToken (Maybe Text) +atAuthToken + = lens _atAuthToken (\ s a -> s{_atAuthToken = a}) + +atType :: Lens' AuthToken (Maybe Text) +atType = lens _atType (\ s a -> s{_atType = a}) + +instance FromJSON AuthToken where + parseJSON + = withObject "AuthToken" + (\ o -> + AuthToken <$> (o .:? "authToken") <*> (o .:? "type")) + +instance ToJSON AuthToken where + toJSON AuthToken{..} + = object + (catMaybes + [("authToken" .=) <$> _atAuthToken, + ("type" .=) <$> _atType]) + +-- | A list of Attachments. This is the response from the server to GET +-- requests on the attachments collection. +-- +-- /See:/ 'attachmentsListResponse' smart constructor. +data AttachmentsListResponse = AttachmentsListResponse + { _alrKind :: !Text + , _alrItems :: !(Maybe [Maybe Attachment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AttachmentsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrKind' +-- +-- * 'alrItems' +attachmentsListResponse + :: AttachmentsListResponse +attachmentsListResponse = + AttachmentsListResponse + { _alrKind = "mirror#attachmentsList" + , _alrItems = Nothing + } + +-- | The type of resource. This is always mirror#attachmentsList. +alrKind :: Lens' AttachmentsListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +-- | The list of attachments. +alrItems :: Lens' AttachmentsListResponse [Maybe Attachment] +alrItems + = lens _alrItems (\ s a -> s{_alrItems = a}) . + _Default + . _Coerce + +instance FromJSON AttachmentsListResponse where + parseJSON + = withObject "AttachmentsListResponse" + (\ o -> + AttachmentsListResponse <$> + (o .:? "kind" .!= "mirror#attachmentsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON AttachmentsListResponse where + toJSON AttachmentsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _alrKind), + ("items" .=) <$> _alrItems]) + +-- | A custom menu item that can be presented to the user by a timeline item. +-- +-- /See:/ 'menuItem' smart constructor. +data MenuItem = MenuItem + { _miValues :: !(Maybe [Maybe MenuValue]) + , _miRemoveWhenSelected :: !(Maybe Bool) + , _miAction :: !(Maybe Text) + , _miPayload :: !(Maybe Text) + , _miContextualCommand :: !(Maybe Text) + , _miId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MenuItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miValues' +-- +-- * 'miRemoveWhenSelected' +-- +-- * 'miAction' +-- +-- * 'miPayload' +-- +-- * 'miContextualCommand' +-- +-- * 'miId' +menuItem + :: MenuItem +menuItem = + MenuItem + { _miValues = Nothing + , _miRemoveWhenSelected = Nothing + , _miAction = Nothing + , _miPayload = Nothing + , _miContextualCommand = Nothing + , _miId = Nothing + } + +-- | For CUSTOM items, a list of values controlling the appearance of the +-- menu item in each of its states. A value for the DEFAULT state must be +-- provided. If the PENDING or CONFIRMED states are missing, they will not +-- be shown. +miValues :: Lens' MenuItem [Maybe MenuValue] +miValues + = lens _miValues (\ s a -> s{_miValues = a}) . + _Default + . _Coerce + +-- | If set to true on a CUSTOM menu item, that item will be removed from the +-- menu after it is selected. +miRemoveWhenSelected :: Lens' MenuItem (Maybe Bool) +miRemoveWhenSelected + = lens _miRemoveWhenSelected + (\ s a -> s{_miRemoveWhenSelected = a}) + +-- | Controls the behavior when the user picks the menu option. Allowed +-- values are: - CUSTOM - Custom action set by the service. When the user +-- selects this menuItem, the API triggers a notification to your +-- callbackUrl with the userActions.type set to CUSTOM and the +-- userActions.payload set to the ID of this menu item. This is the default +-- value. - Built-in actions: - REPLY - Initiate a reply to the timeline +-- item using the voice recording UI. The creator attribute must be set in +-- the timeline item for this menu to be available. - REPLY_ALL - Same +-- behavior as REPLY. The original timeline item\'s recipients will be +-- added to the reply item. - DELETE - Delete the timeline item. - SHARE - +-- Share the timeline item with the available contacts. - READ_ALOUD - Read +-- the timeline item\'s speakableText aloud; if this field is not set, read +-- the text field; if none of those fields are set, this menu item is +-- ignored. - GET_MEDIA_INPUT - Allow users to provide media payloads to +-- Glassware from a menu item (currently, only transcribed text from voice +-- input is supported). Subscribe to notifications when users invoke this +-- menu item to receive the timeline item ID. Retrieve the media from the +-- timeline item in the payload property. - VOICE_CALL - Initiate a phone +-- call using the timeline item\'s creator.phoneNumber attribute as +-- recipient. - NAVIGATE - Navigate to the timeline item\'s location. - +-- TOGGLE_PINNED - Toggle the isPinned state of the timeline item. - +-- OPEN_URI - Open the payload of the menu item in the browser. - +-- PLAY_VIDEO - Open the payload of the menu item in the Glass video +-- player. - SEND_MESSAGE - Initiate sending a message to the timeline +-- item\'s creator: - If the creator.phoneNumber is set and Glass is +-- connected to an Android phone, the message is an SMS. - Otherwise, if +-- the creator.email is set, the message is an email. +miAction :: Lens' MenuItem (Maybe Text) +miAction = lens _miAction (\ s a -> s{_miAction = a}) + +-- | A generic payload whose meaning changes depending on this MenuItem\'s +-- action. - When the action is OPEN_URI, the payload is the URL of the +-- website to view. - When the action is PLAY_VIDEO, the payload is the +-- streaming URL of the video - When the action is GET_MEDIA_INPUT, the +-- payload is the text transcription of a user\'s speech input +miPayload :: Lens' MenuItem (Maybe Text) +miPayload + = lens _miPayload (\ s a -> s{_miPayload = a}) + +-- | The ContextualMenus.Command associated with this MenuItem (e.g. +-- READ_ALOUD). The voice label for this command will be displayed in the +-- voice menu and the touch label will be displayed in the touch menu. Note +-- that the default menu value\'s display name will be overriden if you +-- specify this property. Values that do not correspond to a +-- ContextualMenus.Command name will be ignored. +miContextualCommand :: Lens' MenuItem (Maybe Text) +miContextualCommand + = lens _miContextualCommand + (\ s a -> s{_miContextualCommand = a}) + +-- | The ID for this menu item. This is generated by the application and is +-- treated as an opaque token. +miId :: Lens' MenuItem (Maybe Text) +miId = lens _miId (\ s a -> s{_miId = a}) + +instance FromJSON MenuItem where + parseJSON + = withObject "MenuItem" + (\ o -> + MenuItem <$> + (o .:? "values" .!= mempty) <*> + (o .:? "removeWhenSelected") + <*> (o .:? "action") + <*> (o .:? "payload") + <*> (o .:? "contextual_command") + <*> (o .:? "id")) + +instance ToJSON MenuItem where + toJSON MenuItem{..} + = object + (catMaybes + [("values" .=) <$> _miValues, + ("removeWhenSelected" .=) <$> _miRemoveWhenSelected, + ("action" .=) <$> _miAction, + ("payload" .=) <$> _miPayload, + ("contextual_command" .=) <$> _miContextualCommand, + ("id" .=) <$> _miId]) + +-- | A setting for Glass. +-- +-- /See:/ 'setting' smart constructor. +data Setting = Setting + { _sKind :: !Text + , _sValue :: !(Maybe Text) + , _sId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Setting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sKind' +-- +-- * 'sValue' +-- +-- * 'sId' +setting + :: Setting +setting = + Setting + { _sKind = "mirror#setting" + , _sValue = Nothing + , _sId = Nothing + } + +-- | The type of resource. This is always mirror#setting. +sKind :: Lens' Setting Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | The setting value, as a string. +sValue :: Lens' Setting (Maybe Text) +sValue = lens _sValue (\ s a -> s{_sValue = a}) + +-- | The setting\'s ID. The following IDs are valid: - locale - The key to +-- the user’s language\/locale (BCP 47 identifier) that Glassware should +-- use to render localized content. - timezone - The key to the user’s +-- current time zone region as defined in the tz database. Example: +-- America\/Los_Angeles. +sId :: Lens' Setting (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +instance FromJSON Setting where + parseJSON + = withObject "Setting" + (\ o -> + Setting <$> + (o .:? "kind" .!= "mirror#setting") <*> + (o .:? "value") + <*> (o .:? "id")) + +instance ToJSON Setting where + toJSON Setting{..} + = object + (catMaybes + [Just ("kind" .= _sKind), ("value" .=) <$> _sValue, + ("id" .=) <$> _sId]) + +-- | Represents an account passed into the Account Manager on Glass. +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _aAuthTokens :: !(Maybe [Maybe AuthToken]) + , _aUserData :: !(Maybe [Maybe UserData]) + , _aPassword :: !(Maybe Text) + , _aFeatures :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aAuthTokens' +-- +-- * 'aUserData' +-- +-- * 'aPassword' +-- +-- * 'aFeatures' +account + :: Account +account = + Account + { _aAuthTokens = Nothing + , _aUserData = Nothing + , _aPassword = Nothing + , _aFeatures = Nothing + } + +aAuthTokens :: Lens' Account [Maybe AuthToken] +aAuthTokens + = lens _aAuthTokens (\ s a -> s{_aAuthTokens = a}) . + _Default + . _Coerce + +aUserData :: Lens' Account [Maybe UserData] +aUserData + = lens _aUserData (\ s a -> s{_aUserData = a}) . + _Default + . _Coerce + +aPassword :: Lens' Account (Maybe Text) +aPassword + = lens _aPassword (\ s a -> s{_aPassword = a}) + +aFeatures :: Lens' Account [Text] +aFeatures + = lens _aFeatures (\ s a -> s{_aFeatures = a}) . + _Default + . _Coerce + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "authTokens" .!= mempty) <*> + (o .:? "userData" .!= mempty) + <*> (o .:? "password") + <*> (o .:? "features" .!= mempty)) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("authTokens" .=) <$> _aAuthTokens, + ("userData" .=) <$> _aUserData, + ("password" .=) <$> _aPassword, + ("features" .=) <$> _aFeatures]) + +-- | Represents media content, such as a photo, that can be attached to a +-- timeline item. +-- +-- /See:/ 'attachment' smart constructor. +data Attachment = Attachment + { _aContentUrl :: !(Maybe Text) + , _aId :: !(Maybe Text) + , _aIsProcessingContent :: !(Maybe Bool) + , _aContentType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Attachment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aContentUrl' +-- +-- * 'aId' +-- +-- * 'aIsProcessingContent' +-- +-- * 'aContentType' +attachment + :: Attachment +attachment = + Attachment + { _aContentUrl = Nothing + , _aId = Nothing + , _aIsProcessingContent = Nothing + , _aContentType = Nothing + } + +-- | The URL for the content. +aContentUrl :: Lens' Attachment (Maybe Text) +aContentUrl + = lens _aContentUrl (\ s a -> s{_aContentUrl = a}) + +-- | The ID of the attachment. +aId :: Lens' Attachment (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | Indicates that the contentUrl is not available because the attachment +-- content is still being processed. If the caller wishes to retrieve the +-- content, it should try again later. +aIsProcessingContent :: Lens' Attachment (Maybe Bool) +aIsProcessingContent + = lens _aIsProcessingContent + (\ s a -> s{_aIsProcessingContent = a}) + +-- | The MIME type of the attachment. +aContentType :: Lens' Attachment (Maybe Text) +aContentType + = lens _aContentType (\ s a -> s{_aContentType = a}) + +instance FromJSON Attachment where + parseJSON + = withObject "Attachment" + (\ o -> + Attachment <$> + (o .:? "contentUrl") <*> (o .:? "id") <*> + (o .:? "isProcessingContent") + <*> (o .:? "contentType")) + +instance ToJSON Attachment where + toJSON Attachment{..} + = object + (catMaybes + [("contentUrl" .=) <$> _aContentUrl, + ("id" .=) <$> _aId, + ("isProcessingContent" .=) <$> _aIsProcessingContent, + ("contentType" .=) <$> _aContentType]) + +-- +-- /See:/ 'userData' smart constructor. +data UserData = UserData + { _udValue :: !(Maybe Text) + , _udKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udValue' +-- +-- * 'udKey' +userData + :: UserData +userData = + UserData + { _udValue = Nothing + , _udKey = Nothing + } + +udValue :: Lens' UserData (Maybe Text) +udValue = lens _udValue (\ s a -> s{_udValue = a}) + +udKey :: Lens' UserData (Maybe Text) +udKey = lens _udKey (\ s a -> s{_udKey = a}) + +instance FromJSON UserData where + parseJSON + = withObject "UserData" + (\ o -> + UserData <$> (o .:? "value") <*> (o .:? "key")) + +instance ToJSON UserData where + toJSON UserData{..} + = object + (catMaybes + [("value" .=) <$> _udValue, ("key" .=) <$> _udKey]) + +-- | Represents an action taken by the user that triggered a notification. +-- +-- /See:/ 'userAction' smart constructor. +data UserAction = UserAction + { _uaPayload :: !(Maybe Text) + , _uaType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserAction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uaPayload' +-- +-- * 'uaType' +userAction + :: UserAction +userAction = + UserAction + { _uaPayload = Nothing + , _uaType = Nothing + } + +-- | An optional payload for the action. For actions of type CUSTOM, this is +-- the ID of the custom menu item that was selected. +uaPayload :: Lens' UserAction (Maybe Text) +uaPayload + = lens _uaPayload (\ s a -> s{_uaPayload = a}) + +-- | The type of action. The value of this can be: - SHARE - the user shared +-- an item. - REPLY - the user replied to an item. - REPLY_ALL - the user +-- replied to all recipients of an item. - CUSTOM - the user selected a +-- custom menu item on the timeline item. - DELETE - the user deleted the +-- item. - PIN - the user pinned the item. - UNPIN - the user unpinned the +-- item. - LAUNCH - the user initiated a voice command. In the future, +-- additional types may be added. UserActions with unrecognized types +-- should be ignored. +uaType :: Lens' UserAction (Maybe Text) +uaType = lens _uaType (\ s a -> s{_uaType = a}) + +instance FromJSON UserAction where + parseJSON + = withObject "UserAction" + (\ o -> + UserAction <$> (o .:? "payload") <*> (o .:? "type")) + +instance ToJSON UserAction where + toJSON UserAction{..} + = object + (catMaybes + [("payload" .=) <$> _uaPayload, + ("type" .=) <$> _uaType]) + +-- | A list of Contacts representing contacts. This is the response from the +-- server to GET requests on the contacts collection. +-- +-- /See:/ 'contactsListResponse' smart constructor. +data ContactsListResponse = ContactsListResponse + { _clrKind :: !Text + , _clrItems :: !(Maybe [Maybe Contact]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrKind' +-- +-- * 'clrItems' +contactsListResponse + :: ContactsListResponse +contactsListResponse = + ContactsListResponse + { _clrKind = "mirror#contacts" + , _clrItems = Nothing + } + +-- | The type of resource. This is always mirror#contacts. +clrKind :: Lens' ContactsListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +-- | Contact list. +clrItems :: Lens' ContactsListResponse [Maybe Contact] +clrItems + = lens _clrItems (\ s a -> s{_clrItems = a}) . + _Default + . _Coerce + +instance FromJSON ContactsListResponse where + parseJSON + = withObject "ContactsListResponse" + (\ o -> + ContactsListResponse <$> + (o .:? "kind" .!= "mirror#contacts") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON ContactsListResponse where + toJSON ContactsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _clrKind), + ("items" .=) <$> _clrItems]) + +-- | A list of timeline items. This is the response from the server to GET +-- requests on the timeline collection. +-- +-- /See:/ 'timelineListResponse' smart constructor. +data TimelineListResponse = TimelineListResponse + { _tlrNextPageToken :: !(Maybe Text) + , _tlrKind :: !Text + , _tlrItems :: !(Maybe [Maybe TimelineItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrNextPageToken' +-- +-- * 'tlrKind' +-- +-- * 'tlrItems' +timelineListResponse + :: TimelineListResponse +timelineListResponse = + TimelineListResponse + { _tlrNextPageToken = Nothing + , _tlrKind = "mirror#timeline" + , _tlrItems = Nothing + } + +-- | The next page token. Provide this as the pageToken parameter in the +-- request to retrieve the next page of results. +tlrNextPageToken :: Lens' TimelineListResponse (Maybe Text) +tlrNextPageToken + = lens _tlrNextPageToken + (\ s a -> s{_tlrNextPageToken = a}) + +-- | The type of resource. This is always mirror#timeline. +tlrKind :: Lens' TimelineListResponse Text +tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a}) + +-- | Items in the timeline. +tlrItems :: Lens' TimelineListResponse [Maybe TimelineItem] +tlrItems + = lens _tlrItems (\ s a -> s{_tlrItems = a}) . + _Default + . _Coerce + +instance FromJSON TimelineListResponse where + parseJSON + = withObject "TimelineListResponse" + (\ o -> + TimelineListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "mirror#timeline") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON TimelineListResponse where + toJSON TimelineListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tlrNextPageToken, + Just ("kind" .= _tlrKind), + ("items" .=) <$> _tlrItems]) + +-- | A single value that is part of a MenuItem. +-- +-- /See:/ 'menuValue' smart constructor. +data MenuValue = MenuValue + { _mvState :: !(Maybe Text) + , _mvDisplayName :: !(Maybe Text) + , _mvIconUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MenuValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mvState' +-- +-- * 'mvDisplayName' +-- +-- * 'mvIconUrl' +menuValue + :: MenuValue +menuValue = + MenuValue + { _mvState = Nothing + , _mvDisplayName = Nothing + , _mvIconUrl = Nothing + } + +-- | The state that this value applies to. Allowed values are: - DEFAULT - +-- Default value shown when displayed in the menuItems list. - PENDING - +-- Value shown when the menuItem has been selected by the user but can +-- still be cancelled. - CONFIRMED - Value shown when the menuItem has been +-- selected by the user and can no longer be cancelled. +mvState :: Lens' MenuValue (Maybe Text) +mvState = lens _mvState (\ s a -> s{_mvState = a}) + +-- | The name to display for the menu item. If you specify this property for +-- a built-in menu item, the default contextual voice command for that menu +-- item is not shown. +mvDisplayName :: Lens' MenuValue (Maybe Text) +mvDisplayName + = lens _mvDisplayName + (\ s a -> s{_mvDisplayName = a}) + +-- | URL of an icon to display with the menu item. +mvIconUrl :: Lens' MenuValue (Maybe Text) +mvIconUrl + = lens _mvIconUrl (\ s a -> s{_mvIconUrl = a}) + +instance FromJSON MenuValue where + parseJSON + = withObject "MenuValue" + (\ o -> + MenuValue <$> + (o .:? "state") <*> (o .:? "displayName") <*> + (o .:? "iconUrl")) + +instance ToJSON MenuValue where + toJSON MenuValue{..} + = object + (catMaybes + [("state" .=) <$> _mvState, + ("displayName" .=) <$> _mvDisplayName, + ("iconUrl" .=) <$> _mvIconUrl]) + +-- | A subscription to events on a collection. +-- +-- /See:/ 'subscription' smart constructor. +data Subscription = Subscription + { _subCallbackUrl :: !(Maybe Text) + , _subOperation :: !(Maybe [Text]) + , _subNotification :: !(Maybe (Maybe Notification)) + , _subKind :: !Text + , _subCollection :: !(Maybe Text) + , _subVerifyToken :: !(Maybe Text) + , _subUserToken :: !(Maybe Text) + , _subId :: !(Maybe Text) + , _subUpdated :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subscription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subCallbackUrl' +-- +-- * 'subOperation' +-- +-- * 'subNotification' +-- +-- * 'subKind' +-- +-- * 'subCollection' +-- +-- * 'subVerifyToken' +-- +-- * 'subUserToken' +-- +-- * 'subId' +-- +-- * 'subUpdated' +subscription + :: Subscription +subscription = + Subscription + { _subCallbackUrl = Nothing + , _subOperation = Nothing + , _subNotification = Nothing + , _subKind = "mirror#subscription" + , _subCollection = Nothing + , _subVerifyToken = Nothing + , _subUserToken = Nothing + , _subId = Nothing + , _subUpdated = Nothing + } + +-- | The URL where notifications should be delivered (must start with +-- https:\/\/). +subCallbackUrl :: Lens' Subscription (Maybe Text) +subCallbackUrl + = lens _subCallbackUrl + (\ s a -> s{_subCallbackUrl = a}) + +-- | A list of operations that should be subscribed to. An empty list +-- indicates that all operations on the collection should be subscribed to. +-- Allowed values are: - UPDATE - The item has been updated. - INSERT - A +-- new item has been inserted. - DELETE - The item has been deleted. - +-- MENU_ACTION - A custom menu item has been triggered by the user. +subOperation :: Lens' Subscription [Text] +subOperation + = lens _subOperation (\ s a -> s{_subOperation = a}) + . _Default + . _Coerce + +-- | Container object for notifications. This is not populated in the +-- Subscription resource. +subNotification :: Lens' Subscription (Maybe (Maybe Notification)) +subNotification + = lens _subNotification + (\ s a -> s{_subNotification = a}) + +-- | The type of resource. This is always mirror#subscription. +subKind :: Lens' Subscription Text +subKind = lens _subKind (\ s a -> s{_subKind = a}) + +-- | The collection to subscribe to. Allowed values are: - timeline - Changes +-- in the timeline including insertion, deletion, and updates. - locations +-- - Location updates. - settings - Settings updates. +subCollection :: Lens' Subscription (Maybe Text) +subCollection + = lens _subCollection + (\ s a -> s{_subCollection = a}) + +-- | A secret token sent to the subscriber in notifications so that it can +-- verify that the notification was generated by Google. +subVerifyToken :: Lens' Subscription (Maybe Text) +subVerifyToken + = lens _subVerifyToken + (\ s a -> s{_subVerifyToken = a}) + +-- | An opaque token sent to the subscriber in notifications so that it can +-- determine the ID of the user. +subUserToken :: Lens' Subscription (Maybe Text) +subUserToken + = lens _subUserToken (\ s a -> s{_subUserToken = a}) + +-- | The ID of the subscription. +subId :: Lens' Subscription (Maybe Text) +subId = lens _subId (\ s a -> s{_subId = a}) + +-- | The time at which this subscription was last modified, formatted +-- according to RFC 3339. +subUpdated :: Lens' Subscription (Maybe UTCTime) +subUpdated + = lens _subUpdated (\ s a -> s{_subUpdated = a}) + +instance FromJSON Subscription where + parseJSON + = withObject "Subscription" + (\ o -> + Subscription <$> + (o .:? "callbackUrl") <*> + (o .:? "operation" .!= mempty) + <*> (o .:? "notification") + <*> (o .:? "kind" .!= "mirror#subscription") + <*> (o .:? "collection") + <*> (o .:? "verifyToken") + <*> (o .:? "userToken") + <*> (o .:? "id") + <*> (o .:? "updated")) + +instance ToJSON Subscription where + toJSON Subscription{..} + = object + (catMaybes + [("callbackUrl" .=) <$> _subCallbackUrl, + ("operation" .=) <$> _subOperation, + ("notification" .=) <$> _subNotification, + Just ("kind" .= _subKind), + ("collection" .=) <$> _subCollection, + ("verifyToken" .=) <$> _subVerifyToken, + ("userToken" .=) <$> _subUserToken, + ("id" .=) <$> _subId, + ("updated" .=) <$> _subUpdated]) + +-- | Each item in the user\'s timeline is represented as a TimelineItem JSON +-- structure, described below. +-- +-- /See:/ 'timelineItem' smart constructor. +data TimelineItem = TimelineItem + { _tiCreator :: !(Maybe (Maybe Contact)) + , _tiDisplayTime :: !(Maybe UTCTime) + , _tiEtag :: !(Maybe Text) + , _tiIsDeleted :: !(Maybe Bool) + , _tiPinScore :: !(Maybe Int32) + , _tiAttachments :: !(Maybe [Maybe Attachment]) + , _tiLocation :: !(Maybe (Maybe Location)) + , _tiMenuItems :: !(Maybe [Maybe MenuItem]) + , _tiNotification :: !(Maybe (Maybe NotificationConfig)) + , _tiText :: !(Maybe Text) + , _tiKind :: !Text + , _tiCreated :: !(Maybe UTCTime) + , _tiSpeakableText :: !(Maybe Text) + , _tiIsBundleCover :: !(Maybe Bool) + , _tiSpeakableType :: !(Maybe Text) + , _tiBundleId :: !(Maybe Text) + , _tiCanonicalUrl :: !(Maybe Text) + , _tiSelfLink :: !(Maybe Text) + , _tiIsPinned :: !(Maybe Bool) + , _tiSourceItemId :: !(Maybe Text) + , _tiId :: !(Maybe Text) + , _tiHtml :: !(Maybe Text) + , _tiUpdated :: !(Maybe UTCTime) + , _tiRecipients :: !(Maybe [Maybe Contact]) + , _tiTitle :: !(Maybe Text) + , _tiInReplyTo :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiCreator' +-- +-- * 'tiDisplayTime' +-- +-- * 'tiEtag' +-- +-- * 'tiIsDeleted' +-- +-- * 'tiPinScore' +-- +-- * 'tiAttachments' +-- +-- * 'tiLocation' +-- +-- * 'tiMenuItems' +-- +-- * 'tiNotification' +-- +-- * 'tiText' +-- +-- * 'tiKind' +-- +-- * 'tiCreated' +-- +-- * 'tiSpeakableText' +-- +-- * 'tiIsBundleCover' +-- +-- * 'tiSpeakableType' +-- +-- * 'tiBundleId' +-- +-- * 'tiCanonicalUrl' +-- +-- * 'tiSelfLink' +-- +-- * 'tiIsPinned' +-- +-- * 'tiSourceItemId' +-- +-- * 'tiId' +-- +-- * 'tiHtml' +-- +-- * 'tiUpdated' +-- +-- * 'tiRecipients' +-- +-- * 'tiTitle' +-- +-- * 'tiInReplyTo' +timelineItem + :: TimelineItem +timelineItem = + TimelineItem + { _tiCreator = Nothing + , _tiDisplayTime = Nothing + , _tiEtag = Nothing + , _tiIsDeleted = Nothing + , _tiPinScore = Nothing + , _tiAttachments = Nothing + , _tiLocation = Nothing + , _tiMenuItems = Nothing + , _tiNotification = Nothing + , _tiText = Nothing + , _tiKind = "mirror#timelineItem" + , _tiCreated = Nothing + , _tiSpeakableText = Nothing + , _tiIsBundleCover = Nothing + , _tiSpeakableType = Nothing + , _tiBundleId = Nothing + , _tiCanonicalUrl = Nothing + , _tiSelfLink = Nothing + , _tiIsPinned = Nothing + , _tiSourceItemId = Nothing + , _tiId = Nothing + , _tiHtml = Nothing + , _tiUpdated = Nothing + , _tiRecipients = Nothing + , _tiTitle = Nothing + , _tiInReplyTo = Nothing + } + +-- | The user or group that created this item. +tiCreator :: Lens' TimelineItem (Maybe (Maybe Contact)) +tiCreator + = lens _tiCreator (\ s a -> s{_tiCreator = a}) + +-- | The time that should be displayed when this item is viewed in the +-- timeline, formatted according to RFC 3339. This user\'s timeline is +-- sorted chronologically on display time, so this will also determine +-- where the item is displayed in the timeline. If not set by the service, +-- the display time defaults to the updated time. +tiDisplayTime :: Lens' TimelineItem (Maybe UTCTime) +tiDisplayTime + = lens _tiDisplayTime + (\ s a -> s{_tiDisplayTime = a}) + +-- | ETag for this item. +tiEtag :: Lens' TimelineItem (Maybe Text) +tiEtag = lens _tiEtag (\ s a -> s{_tiEtag = a}) + +-- | When true, indicates this item is deleted, and only the ID property is +-- set. +tiIsDeleted :: Lens' TimelineItem (Maybe Bool) +tiIsDeleted + = lens _tiIsDeleted (\ s a -> s{_tiIsDeleted = a}) + +-- | For pinned items, this determines the order in which the item is +-- displayed in the timeline, with a higher score appearing closer to the +-- clock. Note: setting this field is currently not supported. +tiPinScore :: Lens' TimelineItem (Maybe Int32) +tiPinScore + = lens _tiPinScore (\ s a -> s{_tiPinScore = a}) + +-- | A list of media attachments associated with this item. As a convenience, +-- you can refer to attachments in your HTML payloads with the attachment +-- or cid scheme. For example: - attachment: +-- <> where attachment_index is the 0-based +-- index of this array. - cid: <> where attachment_id +-- is the ID of the attachment. +tiAttachments :: Lens' TimelineItem [Maybe Attachment] +tiAttachments + = lens _tiAttachments + (\ s a -> s{_tiAttachments = a}) + . _Default + . _Coerce + +-- | The geographic location associated with this item. +tiLocation :: Lens' TimelineItem (Maybe (Maybe Location)) +tiLocation + = lens _tiLocation (\ s a -> s{_tiLocation = a}) + +-- | A list of menu items that will be presented to the user when this item +-- is selected in the timeline. +tiMenuItems :: Lens' TimelineItem [Maybe MenuItem] +tiMenuItems + = lens _tiMenuItems (\ s a -> s{_tiMenuItems = a}) . + _Default + . _Coerce + +-- | Controls how notifications for this item are presented on the device. If +-- this is missing, no notification will be generated. +tiNotification :: Lens' TimelineItem (Maybe (Maybe NotificationConfig)) +tiNotification + = lens _tiNotification + (\ s a -> s{_tiNotification = a}) + +-- | Text content of this item. +tiText :: Lens' TimelineItem (Maybe Text) +tiText = lens _tiText (\ s a -> s{_tiText = a}) + +-- | The type of resource. This is always mirror#timelineItem. +tiKind :: Lens' TimelineItem Text +tiKind = lens _tiKind (\ s a -> s{_tiKind = a}) + +-- | The time at which this item was created, formatted according to RFC +-- 3339. +tiCreated :: Lens' TimelineItem (Maybe UTCTime) +tiCreated + = lens _tiCreated (\ s a -> s{_tiCreated = a}) + +-- | The speakable version of the content of this item. Along with the +-- READ_ALOUD menu item, use this field to provide text that would be +-- clearer when read aloud, or to provide extended information to what is +-- displayed visually on Glass. Glassware should also specify the +-- speakableType field, which will be spoken before this text in cases +-- where the additional context is useful, for example when the user +-- requests that the item be read aloud following a notification. +tiSpeakableText :: Lens' TimelineItem (Maybe Text) +tiSpeakableText + = lens _tiSpeakableText + (\ s a -> s{_tiSpeakableText = a}) + +-- | Whether this item is a bundle cover. If an item is marked as a bundle +-- cover, it will be the entry point to the bundle of items that have the +-- same bundleId as that item. It will be shown only on the main timeline — +-- not within the opened bundle. On the main timeline, items that are shown +-- are: - Items that have isBundleCover set to true - Items that do not +-- have a bundleId In a bundle sub-timeline, items that are shown are: - +-- Items that have the bundleId in question AND isBundleCover set to false +tiIsBundleCover :: Lens' TimelineItem (Maybe Bool) +tiIsBundleCover + = lens _tiIsBundleCover + (\ s a -> s{_tiIsBundleCover = a}) + +-- | A speakable description of the type of this item. This will be announced +-- to the user prior to reading the content of the item in cases where the +-- additional context is useful, for example when the user requests that +-- the item be read aloud following a notification. This should be a short, +-- simple noun phrase such as \"Email\", \"Text message\", or \"Daily +-- Planet News Update\". Glassware are encouraged to populate this field +-- for every timeline item, even if the item does not contain speakableText +-- or text so that the user can learn the type of the item without looking +-- at the screen. +tiSpeakableType :: Lens' TimelineItem (Maybe Text) +tiSpeakableType + = lens _tiSpeakableType + (\ s a -> s{_tiSpeakableType = a}) + +-- | The bundle ID for this item. Services can specify a bundleId to group +-- many items together. They appear under a single top-level item on the +-- device. +tiBundleId :: Lens' TimelineItem (Maybe Text) +tiBundleId + = lens _tiBundleId (\ s a -> s{_tiBundleId = a}) + +-- | A canonical URL pointing to the canonical\/high quality version of the +-- data represented by the timeline item. +tiCanonicalUrl :: Lens' TimelineItem (Maybe Text) +tiCanonicalUrl + = lens _tiCanonicalUrl + (\ s a -> s{_tiCanonicalUrl = a}) + +-- | A URL that can be used to retrieve this item. +tiSelfLink :: Lens' TimelineItem (Maybe Text) +tiSelfLink + = lens _tiSelfLink (\ s a -> s{_tiSelfLink = a}) + +-- | When true, indicates this item is pinned, which means it\'s grouped +-- alongside \"active\" items like navigation and hangouts, on the opposite +-- side of the home screen from historical (non-pinned) timeline items. You +-- can allow the user to toggle the value of this property with the +-- TOGGLE_PINNED built-in menu item. +tiIsPinned :: Lens' TimelineItem (Maybe Bool) +tiIsPinned + = lens _tiIsPinned (\ s a -> s{_tiIsPinned = a}) + +-- | Opaque string you can use to map a timeline item to data in your own +-- service. +tiSourceItemId :: Lens' TimelineItem (Maybe Text) +tiSourceItemId + = lens _tiSourceItemId + (\ s a -> s{_tiSourceItemId = a}) + +-- | The ID of the timeline item. This is unique within a user\'s timeline. +tiId :: Lens' TimelineItem (Maybe Text) +tiId = lens _tiId (\ s a -> s{_tiId = a}) + +-- | HTML content for this item. If both text and html are provided for an +-- item, the html will be rendered in the timeline. Allowed HTML elements - +-- You can use these elements in your timeline cards. - Headers: h1, h2, +-- h3, h4, h5, h6 - Images: img - Lists: li, ol, ul - HTML5 semantics: +-- article, aside, details, figure, figcaption, footer, header, nav, +-- section, summary, time - Structural: blockquote, br, div, hr, p, span - +-- Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, +-- sup - Tables: table, tbody, td, tfoot, th, thead, tr Blocked HTML +-- elements: These elements and their contents are removed from HTML +-- payloads. - Document headers: head, title - Embeds: audio, embed, +-- object, source, video - Frames: frame, frameset - Scripting: applet, +-- script Other elements: Any elements that aren\'t listed are removed, but +-- their contents are preserved. +tiHtml :: Lens' TimelineItem (Maybe Text) +tiHtml = lens _tiHtml (\ s a -> s{_tiHtml = a}) + +-- | The time at which this item was last modified, formatted according to +-- RFC 3339. +tiUpdated :: Lens' TimelineItem (Maybe UTCTime) +tiUpdated + = lens _tiUpdated (\ s a -> s{_tiUpdated = a}) + +-- | A list of users or groups that this item has been shared with. +tiRecipients :: Lens' TimelineItem [Maybe Contact] +tiRecipients + = lens _tiRecipients (\ s a -> s{_tiRecipients = a}) + . _Default + . _Coerce + +-- | The title of this item. +tiTitle :: Lens' TimelineItem (Maybe Text) +tiTitle = lens _tiTitle (\ s a -> s{_tiTitle = a}) + +-- | If this item was generated as a reply to another item, this field will +-- be set to the ID of the item being replied to. This can be used to +-- attach a reply to the appropriate conversation or post. +tiInReplyTo :: Lens' TimelineItem (Maybe Text) +tiInReplyTo + = lens _tiInReplyTo (\ s a -> s{_tiInReplyTo = a}) + +instance FromJSON TimelineItem where + parseJSON + = withObject "TimelineItem" + (\ o -> + TimelineItem <$> + (o .:? "creator") <*> (o .:? "displayTime") <*> + (o .:? "etag") + <*> (o .:? "isDeleted") + <*> (o .:? "pinScore") + <*> (o .:? "attachments" .!= mempty) + <*> (o .:? "location") + <*> (o .:? "menuItems" .!= mempty) + <*> (o .:? "notification") + <*> (o .:? "text") + <*> (o .:? "kind" .!= "mirror#timelineItem") + <*> (o .:? "created") + <*> (o .:? "speakableText") + <*> (o .:? "isBundleCover") + <*> (o .:? "speakableType") + <*> (o .:? "bundleId") + <*> (o .:? "canonicalUrl") + <*> (o .:? "selfLink") + <*> (o .:? "isPinned") + <*> (o .:? "sourceItemId") + <*> (o .:? "id") + <*> (o .:? "html") + <*> (o .:? "updated") + <*> (o .:? "recipients" .!= mempty) + <*> (o .:? "title") + <*> (o .:? "inReplyTo")) + +instance ToJSON TimelineItem where + toJSON TimelineItem{..} + = object + (catMaybes + [("creator" .=) <$> _tiCreator, + ("displayTime" .=) <$> _tiDisplayTime, + ("etag" .=) <$> _tiEtag, + ("isDeleted" .=) <$> _tiIsDeleted, + ("pinScore" .=) <$> _tiPinScore, + ("attachments" .=) <$> _tiAttachments, + ("location" .=) <$> _tiLocation, + ("menuItems" .=) <$> _tiMenuItems, + ("notification" .=) <$> _tiNotification, + ("text" .=) <$> _tiText, Just ("kind" .= _tiKind), + ("created" .=) <$> _tiCreated, + ("speakableText" .=) <$> _tiSpeakableText, + ("isBundleCover" .=) <$> _tiIsBundleCover, + ("speakableType" .=) <$> _tiSpeakableType, + ("bundleId" .=) <$> _tiBundleId, + ("canonicalUrl" .=) <$> _tiCanonicalUrl, + ("selfLink" .=) <$> _tiSelfLink, + ("isPinned" .=) <$> _tiIsPinned, + ("sourceItemId" .=) <$> _tiSourceItemId, + ("id" .=) <$> _tiId, ("html" .=) <$> _tiHtml, + ("updated" .=) <$> _tiUpdated, + ("recipients" .=) <$> _tiRecipients, + ("title" .=) <$> _tiTitle, + ("inReplyTo" .=) <$> _tiInReplyTo]) + +-- | A list of Subscriptions. This is the response from the server to GET +-- requests on the subscription collection. +-- +-- /See:/ 'subscriptionsListResponse' smart constructor. +data SubscriptionsListResponse = SubscriptionsListResponse + { _slrKind :: !Text + , _slrItems :: !(Maybe [Maybe Subscription]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrKind' +-- +-- * 'slrItems' +subscriptionsListResponse + :: SubscriptionsListResponse +subscriptionsListResponse = + SubscriptionsListResponse + { _slrKind = "mirror#subscriptionsList" + , _slrItems = Nothing + } + +-- | The type of resource. This is always mirror#subscriptionsList. +slrKind :: Lens' SubscriptionsListResponse Text +slrKind = lens _slrKind (\ s a -> s{_slrKind = a}) + +-- | The list of subscriptions. +slrItems :: Lens' SubscriptionsListResponse [Maybe Subscription] +slrItems + = lens _slrItems (\ s a -> s{_slrItems = a}) . + _Default + . _Coerce + +instance FromJSON SubscriptionsListResponse where + parseJSON + = withObject "SubscriptionsListResponse" + (\ o -> + SubscriptionsListResponse <$> + (o .:? "kind" .!= "mirror#subscriptionsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON SubscriptionsListResponse where + toJSON SubscriptionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _slrKind), + ("items" .=) <$> _slrItems]) diff --git a/gogol-mirror/gen/Network/Google/Mirror/Types/Sum.hs b/gogol-mirror/gen/Network/Google/Mirror/Types/Sum.hs new file mode 100644 index 000000000..31bdf3080 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Mirror/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Mirror.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Mirror.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Accounts/Insert.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Accounts/Insert.hs new file mode 100644 index 000000000..80a9b09a8 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Accounts/Insert.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Accounts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new account for a user +-- +-- /See:/ for @MirrorAccountsInsert@. +module Mirror.Accounts.Insert + ( + -- * REST Resource + AccountsInsertAPI + + -- * Creating a Request + , accountsInsert + , AccountsInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiUserIp + , aiAccountName + , aiKey + , aiUserToken + , aiOauthToken + , aiAccountType + , aiFields + , aiAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorAccountsInsert@ which the +-- 'AccountsInsert' request conforms to. +type AccountsInsertAPI = + "accounts" :> + Capture "userToken" Text :> + Capture "accountType" Text :> + Capture "accountName" Text :> Post '[JSON] Account + +-- | Inserts a new account for a user +-- +-- /See:/ 'accountsInsert' smart constructor. +data AccountsInsert = AccountsInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiAccountName :: !Text + , _aiKey :: !(Maybe Text) + , _aiUserToken :: !Text + , _aiOauthToken :: !(Maybe Text) + , _aiAccountType :: !Text + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiAccountName' +-- +-- * 'aiKey' +-- +-- * 'aiUserToken' +-- +-- * 'aiOauthToken' +-- +-- * 'aiAccountType' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +accountsInsert + :: Text -- ^ 'accountName' + -> Text -- ^ 'userToken' + -> Text -- ^ 'accountType' + -> AccountsInsert +accountsInsert pAiAccountName_ pAiUserToken_ pAiAccountType_ = + AccountsInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiAccountName = pAiAccountName_ + , _aiKey = Nothing + , _aiUserToken = pAiUserToken_ + , _aiOauthToken = Nothing + , _aiAccountType = pAiAccountType_ + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' AccountsInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' AccountsInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' AccountsInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | The name of the account to be passed to the Android Account Manager. +aiAccountName :: Lens' AccountsInsert' Text +aiAccountName + = lens _aiAccountName + (\ s a -> s{_aiAccountName = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' AccountsInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | The ID for the user. +aiUserToken :: Lens' AccountsInsert' Text +aiUserToken + = lens _aiUserToken (\ s a -> s{_aiUserToken = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' AccountsInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Account type to be passed to Android Account Manager. +aiAccountType :: Lens' AccountsInsert' Text +aiAccountType + = lens _aiAccountType + (\ s a -> s{_aiAccountType = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' AccountsInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' AccountsInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest AccountsInsert' where + type Rs AccountsInsert' = Account + request = requestWithRoute defReq mirrorURL + requestWithRoute r u AccountsInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiUserIp + _aiAccountName + _aiKey + _aiUserToken + _aiOauthToken + _aiAccountType + _aiFields + _aiAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsInsertAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Delete.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Delete.hs new file mode 100644 index 000000000..bb684b2ac --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Delete.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a contact. +-- +-- /See:/ for @MirrorContactsDelete@. +module Mirror.Contacts.Delete + ( + -- * REST Resource + ContactsDeleteAPI + + -- * Creating a Request + , contactsDelete + , ContactsDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdKey + , cdId + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsDelete@ which the +-- 'ContactsDelete' request conforms to. +type ContactsDeleteAPI = + "contacts" :> Capture "id" Text :> Delete '[JSON] () + +-- | Deletes a contact. +-- +-- /See:/ 'contactsDelete' smart constructor. +data ContactsDelete = ContactsDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdId :: !Text + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdKey' +-- +-- * 'cdId' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +contactsDelete + :: Text -- ^ 'id' + -> ContactsDelete +contactsDelete pCdId_ = + ContactsDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdKey = Nothing + , _cdId = pCdId_ + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' ContactsDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' ContactsDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' ContactsDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' ContactsDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | The ID of the contact. +cdId :: Lens' ContactsDelete' Text +cdId = lens _cdId (\ s a -> s{_cdId = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' ContactsDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' ContactsDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' ContactsDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest ContactsDelete' where + type Rs ContactsDelete' = () + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdUserIp _cdKey + _cdId + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsDeleteAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Get.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Get.hs new file mode 100644 index 000000000..11441acb8 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a single contact by ID. +-- +-- /See:/ for @MirrorContactsGet@. +module Mirror.Contacts.Get + ( + -- * REST Resource + ContactsGetAPI + + -- * Creating a Request + , contactsGet + , ContactsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgKey + , cgId + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsGet@ which the +-- 'ContactsGet' request conforms to. +type ContactsGetAPI = + "contacts" :> + Capture "id" Text :> Get '[JSON] Contact + +-- | Gets a single contact by ID. +-- +-- /See:/ 'contactsGet' smart constructor. +data ContactsGet = ContactsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgId :: !Text + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +contactsGet + :: Text -- ^ 'id' + -> ContactsGet +contactsGet pCgId_ = + ContactsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgId = pCgId_ + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' ContactsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' ContactsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' ContactsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' ContactsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | The ID of the contact. +cgId :: Lens' ContactsGet' Text +cgId = lens _cgId (\ s a -> s{_cgId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' ContactsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' ContactsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' ContactsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest ContactsGet' where + type Rs ContactsGet' = Contact + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgKey + _cgId + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsGetAPI) r u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Insert.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Insert.hs new file mode 100644 index 000000000..ec28fa869 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new contact. +-- +-- /See:/ for @MirrorContactsInsert@. +module Mirror.Contacts.Insert + ( + -- * REST Resource + ContactsInsertAPI + + -- * Creating a Request + , contactsInsert + , ContactsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsInsert@ which the +-- 'ContactsInsert' request conforms to. +type ContactsInsertAPI = + "contacts" :> Post '[JSON] Contact + +-- | Inserts a new contact. +-- +-- /See:/ 'contactsInsert' smart constructor. +data ContactsInsert = ContactsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +contactsInsert + :: ContactsInsert +contactsInsert = + ContactsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' ContactsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' ContactsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' ContactsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' ContactsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' ContactsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' ContactsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' ContactsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest ContactsInsert' where + type Rs ContactsInsert' = Contact + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsInsertAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/List.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/List.hs new file mode 100644 index 000000000..359c2ebad --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of contacts for the authenticated user. +-- +-- /See:/ for @MirrorContactsList@. +module Mirror.Contacts.List + ( + -- * REST Resource + ContactsListAPI + + -- * Creating a Request + , contactsList + , ContactsList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clKey + , clOauthToken + , clFields + , clAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsList@ which the +-- 'ContactsList' request conforms to. +type ContactsListAPI = + "contacts" :> Get '[JSON] ContactsListResponse + +-- | Retrieves a list of contacts for the authenticated user. +-- +-- /See:/ 'contactsList' smart constructor. +data ContactsList = ContactsList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clKey' +-- +-- * 'clOauthToken' +-- +-- * 'clFields' +-- +-- * 'clAlt' +contactsList + :: ContactsList +contactsList = + ContactsList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clKey = Nothing + , _clOauthToken = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' ContactsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' ContactsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' ContactsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' ContactsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' ContactsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' ContactsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' ContactsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest ContactsList' where + type Rs ContactsList' = ContactsListResponse + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp _clKey + _clOauthToken + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsListAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Patch.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Patch.hs new file mode 100644 index 000000000..efc106d41 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Patch.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a contact in place. This method supports patch semantics. +-- +-- /See:/ for @MirrorContactsPatch@. +module Mirror.Contacts.Patch + ( + -- * REST Resource + ContactsPatchAPI + + -- * Creating a Request + , contactsPatch + , ContactsPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpKey + , cpId + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsPatch@ which the +-- 'ContactsPatch' request conforms to. +type ContactsPatchAPI = + "contacts" :> + Capture "id" Text :> Patch '[JSON] Contact + +-- | Updates a contact in place. This method supports patch semantics. +-- +-- /See:/ 'contactsPatch' smart constructor. +data ContactsPatch = ContactsPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpId :: !Text + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +contactsPatch + :: Text -- ^ 'id' + -> ContactsPatch +contactsPatch pCpId_ = + ContactsPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpId = pCpId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' ContactsPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' ContactsPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' ContactsPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' ContactsPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | The ID of the contact. +cpId :: Lens' ContactsPatch' Text +cpId = lens _cpId (\ s a -> s{_cpId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' ContactsPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' ContactsPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' ContactsPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest ContactsPatch' where + type Rs ContactsPatch' = Contact + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp _cpKey + _cpId + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsPatchAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Update.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Update.hs new file mode 100644 index 000000000..4c43e6475 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Contacts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a contact in place. +-- +-- /See:/ for @MirrorContactsUpdate@. +module Mirror.Contacts.Update + ( + -- * REST Resource + ContactsUpdateAPI + + -- * Creating a Request + , contactsUpdate + , ContactsUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuId + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorContactsUpdate@ which the +-- 'ContactsUpdate' request conforms to. +type ContactsUpdateAPI = + "contacts" :> + Capture "id" Text :> Put '[JSON] Contact + +-- | Updates a contact in place. +-- +-- /See:/ 'contactsUpdate' smart constructor. +data ContactsUpdate = ContactsUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuId :: !Text + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContactsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +contactsUpdate + :: Text -- ^ 'id' + -> ContactsUpdate +contactsUpdate pCuId_ = + ContactsUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuId = pCuId_ + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' ContactsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' ContactsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' ContactsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' ContactsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | The ID of the contact. +cuId :: Lens' ContactsUpdate' Text +cuId = lens _cuId (\ s a -> s{_cuId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' ContactsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' ContactsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' ContactsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest ContactsUpdate' where + type Rs ContactsUpdate' = Contact + request = requestWithRoute defReq mirrorURL + requestWithRoute r u ContactsUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuId + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy ContactsUpdateAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/Get.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/Get.hs new file mode 100644 index 000000000..14b5d456b --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Locations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a single location by ID. +-- +-- /See:/ for @MirrorLocationsGet@. +module Mirror.Locations.Get + ( + -- * REST Resource + LocationsGetAPI + + -- * Creating a Request + , locationsGet + , LocationsGet + + -- * Request Lenses + , lgQuotaUser + , lgPrettyPrint + , lgUserIp + , lgKey + , lgId + , lgOauthToken + , lgFields + , lgAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorLocationsGet@ which the +-- 'LocationsGet' request conforms to. +type LocationsGetAPI = + "locations" :> + Capture "id" Text :> Get '[JSON] Location + +-- | Gets a single location by ID. +-- +-- /See:/ 'locationsGet' smart constructor. +data LocationsGet = LocationsGet + { _lgQuotaUser :: !(Maybe Text) + , _lgPrettyPrint :: !Bool + , _lgUserIp :: !(Maybe Text) + , _lgKey :: !(Maybe Text) + , _lgId :: !Text + , _lgOauthToken :: !(Maybe Text) + , _lgFields :: !(Maybe Text) + , _lgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lgQuotaUser' +-- +-- * 'lgPrettyPrint' +-- +-- * 'lgUserIp' +-- +-- * 'lgKey' +-- +-- * 'lgId' +-- +-- * 'lgOauthToken' +-- +-- * 'lgFields' +-- +-- * 'lgAlt' +locationsGet + :: Text -- ^ 'id' + -> LocationsGet +locationsGet pLgId_ = + LocationsGet + { _lgQuotaUser = Nothing + , _lgPrettyPrint = True + , _lgUserIp = Nothing + , _lgKey = Nothing + , _lgId = pLgId_ + , _lgOauthToken = Nothing + , _lgFields = Nothing + , _lgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lgQuotaUser :: Lens' LocationsGet' (Maybe Text) +lgQuotaUser + = lens _lgQuotaUser (\ s a -> s{_lgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lgPrettyPrint :: Lens' LocationsGet' Bool +lgPrettyPrint + = lens _lgPrettyPrint + (\ s a -> s{_lgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lgUserIp :: Lens' LocationsGet' (Maybe Text) +lgUserIp = lens _lgUserIp (\ s a -> s{_lgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lgKey :: Lens' LocationsGet' (Maybe Text) +lgKey = lens _lgKey (\ s a -> s{_lgKey = a}) + +-- | The ID of the location or latest for the last known location. +lgId :: Lens' LocationsGet' Text +lgId = lens _lgId (\ s a -> s{_lgId = a}) + +-- | OAuth 2.0 token for the current user. +lgOauthToken :: Lens' LocationsGet' (Maybe Text) +lgOauthToken + = lens _lgOauthToken (\ s a -> s{_lgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lgFields :: Lens' LocationsGet' (Maybe Text) +lgFields = lens _lgFields (\ s a -> s{_lgFields = a}) + +-- | Data format for the response. +lgAlt :: Lens' LocationsGet' Text +lgAlt = lens _lgAlt (\ s a -> s{_lgAlt = a}) + +instance GoogleRequest LocationsGet' where + type Rs LocationsGet' = Location + request = requestWithRoute defReq mirrorURL + requestWithRoute r u LocationsGet{..} + = go _lgQuotaUser _lgPrettyPrint _lgUserIp _lgKey + _lgId + _lgOauthToken + _lgFields + _lgAlt + where go + = clientWithRoute (Proxy :: Proxy LocationsGetAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/List.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/List.hs new file mode 100644 index 000000000..213687648 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Locations/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Locations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of locations for the user. +-- +-- /See:/ for @MirrorLocationsList@. +module Mirror.Locations.List + ( + -- * REST Resource + LocationsListAPI + + -- * Creating a Request + , locationsList + , LocationsList + + -- * Request Lenses + , llQuotaUser + , llPrettyPrint + , llUserIp + , llKey + , llOauthToken + , llFields + , llAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorLocationsList@ which the +-- 'LocationsList' request conforms to. +type LocationsListAPI = + "locations" :> Get '[JSON] LocationsListResponse + +-- | Retrieves a list of locations for the user. +-- +-- /See:/ 'locationsList' smart constructor. +data LocationsList = LocationsList + { _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llUserIp :: !(Maybe Text) + , _llKey :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llUserIp' +-- +-- * 'llKey' +-- +-- * 'llOauthToken' +-- +-- * 'llFields' +-- +-- * 'llAlt' +locationsList + :: LocationsList +locationsList = + LocationsList + { _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llUserIp = Nothing + , _llKey = Nothing + , _llOauthToken = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LocationsList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LocationsList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LocationsList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LocationsList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LocationsList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LocationsList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LocationsList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LocationsList' where + type Rs LocationsList' = LocationsListResponse + request = requestWithRoute defReq mirrorURL + requestWithRoute r u LocationsList{..} + = go _llQuotaUser _llPrettyPrint _llUserIp _llKey + _llOauthToken + _llFields + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LocationsListAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Settings/Get.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Settings/Get.hs new file mode 100644 index 000000000..49f848bef --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Settings/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Settings.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a single setting by ID. +-- +-- /See:/ for @MirrorSettingsGet@. +module Mirror.Settings.Get + ( + -- * REST Resource + SettingsGetAPI + + -- * Creating a Request + , settingsGet + , SettingsGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgUserIp + , sgKey + , sgId + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorSettingsGet@ which the +-- 'SettingsGet' request conforms to. +type SettingsGetAPI = + "settings" :> + Capture "id" Text :> Get '[JSON] Setting + +-- | Gets a single setting by ID. +-- +-- /See:/ 'settingsGet' smart constructor. +data SettingsGet = SettingsGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgUserIp :: !(Maybe Text) + , _sgKey :: !(Maybe Text) + , _sgId :: !Text + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SettingsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgUserIp' +-- +-- * 'sgKey' +-- +-- * 'sgId' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +settingsGet + :: Text -- ^ 'id' + -> SettingsGet +settingsGet pSgId_ = + SettingsGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgUserIp = Nothing + , _sgKey = Nothing + , _sgId = pSgId_ + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SettingsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SettingsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SettingsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SettingsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | The ID of the setting. The following IDs are valid: - locale - The key +-- to the user’s language\/locale (BCP 47 identifier) that Glassware should +-- use to render localized content. - timezone - The key to the user’s +-- current time zone region as defined in the tz database. Example: +-- America\/Los_Angeles. +sgId :: Lens' SettingsGet' Text +sgId = lens _sgId (\ s a -> s{_sgId = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SettingsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SettingsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SettingsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SettingsGet' where + type Rs SettingsGet' = Setting + request = requestWithRoute defReq mirrorURL + requestWithRoute r u SettingsGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgUserIp _sgKey + _sgId + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SettingsGetAPI) r u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Delete.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Delete.hs new file mode 100644 index 000000000..81a4661cc --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Delete.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Subscriptions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a subscription. +-- +-- /See:/ for @MirrorSubscriptionsDelete@. +module Mirror.Subscriptions.Delete + ( + -- * REST Resource + SubscriptionsDeleteAPI + + -- * Creating a Request + , subscriptionsDelete + , SubscriptionsDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdKey + , sdId + , sdOauthToken + , sdFields + , sdAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorSubscriptionsDelete@ which the +-- 'SubscriptionsDelete' request conforms to. +type SubscriptionsDeleteAPI = + "subscriptions" :> + Capture "id" Text :> Delete '[JSON] () + +-- | Deletes a subscription. +-- +-- /See:/ 'subscriptionsDelete' smart constructor. +data SubscriptionsDelete = SubscriptionsDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdKey :: !(Maybe Text) + , _sdId :: !Text + , _sdOauthToken :: !(Maybe Text) + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdKey' +-- +-- * 'sdId' +-- +-- * 'sdOauthToken' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +subscriptionsDelete + :: Text -- ^ 'id' + -> SubscriptionsDelete +subscriptionsDelete pSdId_ = + SubscriptionsDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdKey = Nothing + , _sdId = pSdId_ + , _sdOauthToken = Nothing + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SubscriptionsDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SubscriptionsDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SubscriptionsDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SubscriptionsDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | The ID of the subscription. +sdId :: Lens' SubscriptionsDelete' Text +sdId = lens _sdId (\ s a -> s{_sdId = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SubscriptionsDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SubscriptionsDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SubscriptionsDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SubscriptionsDelete' where + type Rs SubscriptionsDelete' = () + request = requestWithRoute defReq mirrorURL + requestWithRoute r u SubscriptionsDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp _sdKey + _sdId + _sdOauthToken + _sdFields + _sdAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsDeleteAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Insert.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Insert.hs new file mode 100644 index 000000000..9668db1a8 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Insert.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Subscriptions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new subscription. +-- +-- /See:/ for @MirrorSubscriptionsInsert@. +module Mirror.Subscriptions.Insert + ( + -- * REST Resource + SubscriptionsInsertAPI + + -- * Creating a Request + , subscriptionsInsert + , SubscriptionsInsert + + -- * Request Lenses + , siQuotaUser + , siPrettyPrint + , siUserIp + , siKey + , siOauthToken + , siFields + , siAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorSubscriptionsInsert@ which the +-- 'SubscriptionsInsert' request conforms to. +type SubscriptionsInsertAPI = + "subscriptions" :> Post '[JSON] Subscription + +-- | Creates a new subscription. +-- +-- /See:/ 'subscriptionsInsert' smart constructor. +data SubscriptionsInsert = SubscriptionsInsert + { _siQuotaUser :: !(Maybe Text) + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siKey :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siKey' +-- +-- * 'siOauthToken' +-- +-- * 'siFields' +-- +-- * 'siAlt' +subscriptionsInsert + :: SubscriptionsInsert +subscriptionsInsert = + SubscriptionsInsert + { _siQuotaUser = Nothing + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siKey = Nothing + , _siOauthToken = Nothing + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' SubscriptionsInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' SubscriptionsInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' SubscriptionsInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' SubscriptionsInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' SubscriptionsInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' SubscriptionsInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' SubscriptionsInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest SubscriptionsInsert' where + type Rs SubscriptionsInsert' = Subscription + request = requestWithRoute defReq mirrorURL + requestWithRoute r u SubscriptionsInsert{..} + = go _siQuotaUser _siPrettyPrint _siUserIp _siKey + _siOauthToken + _siFields + _siAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsInsertAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/List.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/List.hs new file mode 100644 index 000000000..4d293c2f0 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/List.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Subscriptions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of subscriptions for the authenticated user and +-- service. +-- +-- /See:/ for @MirrorSubscriptionsList@. +module Mirror.Subscriptions.List + ( + -- * REST Resource + SubscriptionsListAPI + + -- * Creating a Request + , subscriptionsList + , SubscriptionsList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slKey + , slOauthToken + , slFields + , slAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorSubscriptionsList@ which the +-- 'SubscriptionsList' request conforms to. +type SubscriptionsListAPI = + "subscriptions" :> + Get '[JSON] SubscriptionsListResponse + +-- | Retrieves a list of subscriptions for the authenticated user and +-- service. +-- +-- /See:/ 'subscriptionsList' smart constructor. +data SubscriptionsList = SubscriptionsList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slKey' +-- +-- * 'slOauthToken' +-- +-- * 'slFields' +-- +-- * 'slAlt' +subscriptionsList + :: SubscriptionsList +subscriptionsList = + SubscriptionsList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slKey = Nothing + , _slOauthToken = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SubscriptionsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SubscriptionsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SubscriptionsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SubscriptionsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SubscriptionsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SubscriptionsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SubscriptionsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SubscriptionsList' where + type Rs SubscriptionsList' = + SubscriptionsListResponse + request = requestWithRoute defReq mirrorURL + requestWithRoute r u SubscriptionsList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp _slKey + _slOauthToken + _slFields + _slAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsListAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Update.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Update.hs new file mode 100644 index 000000000..8150444f1 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Subscriptions/Update.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Subscriptions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing subscription in place. +-- +-- /See:/ for @MirrorSubscriptionsUpdate@. +module Mirror.Subscriptions.Update + ( + -- * REST Resource + SubscriptionsUpdateAPI + + -- * Creating a Request + , subscriptionsUpdate + , SubscriptionsUpdate + + -- * Request Lenses + , suQuotaUser + , suPrettyPrint + , suUserIp + , suKey + , suId + , suOauthToken + , suFields + , suAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorSubscriptionsUpdate@ which the +-- 'SubscriptionsUpdate' request conforms to. +type SubscriptionsUpdateAPI = + "subscriptions" :> + Capture "id" Text :> Put '[JSON] Subscription + +-- | Updates an existing subscription in place. +-- +-- /See:/ 'subscriptionsUpdate' smart constructor. +data SubscriptionsUpdate = SubscriptionsUpdate + { _suQuotaUser :: !(Maybe Text) + , _suPrettyPrint :: !Bool + , _suUserIp :: !(Maybe Text) + , _suKey :: !(Maybe Text) + , _suId :: !Text + , _suOauthToken :: !(Maybe Text) + , _suFields :: !(Maybe Text) + , _suAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'suQuotaUser' +-- +-- * 'suPrettyPrint' +-- +-- * 'suUserIp' +-- +-- * 'suKey' +-- +-- * 'suId' +-- +-- * 'suOauthToken' +-- +-- * 'suFields' +-- +-- * 'suAlt' +subscriptionsUpdate + :: Text -- ^ 'id' + -> SubscriptionsUpdate +subscriptionsUpdate pSuId_ = + SubscriptionsUpdate + { _suQuotaUser = Nothing + , _suPrettyPrint = True + , _suUserIp = Nothing + , _suKey = Nothing + , _suId = pSuId_ + , _suOauthToken = Nothing + , _suFields = Nothing + , _suAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +suQuotaUser :: Lens' SubscriptionsUpdate' (Maybe Text) +suQuotaUser + = lens _suQuotaUser (\ s a -> s{_suQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +suPrettyPrint :: Lens' SubscriptionsUpdate' Bool +suPrettyPrint + = lens _suPrettyPrint + (\ s a -> s{_suPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +suUserIp :: Lens' SubscriptionsUpdate' (Maybe Text) +suUserIp = lens _suUserIp (\ s a -> s{_suUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +suKey :: Lens' SubscriptionsUpdate' (Maybe Text) +suKey = lens _suKey (\ s a -> s{_suKey = a}) + +-- | The ID of the subscription. +suId :: Lens' SubscriptionsUpdate' Text +suId = lens _suId (\ s a -> s{_suId = a}) + +-- | OAuth 2.0 token for the current user. +suOauthToken :: Lens' SubscriptionsUpdate' (Maybe Text) +suOauthToken + = lens _suOauthToken (\ s a -> s{_suOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +suFields :: Lens' SubscriptionsUpdate' (Maybe Text) +suFields = lens _suFields (\ s a -> s{_suFields = a}) + +-- | Data format for the response. +suAlt :: Lens' SubscriptionsUpdate' Text +suAlt = lens _suAlt (\ s a -> s{_suAlt = a}) + +instance GoogleRequest SubscriptionsUpdate' where + type Rs SubscriptionsUpdate' = Subscription + request = requestWithRoute defReq mirrorURL + requestWithRoute r u SubscriptionsUpdate{..} + = go _suQuotaUser _suPrettyPrint _suUserIp _suKey + _suId + _suOauthToken + _suFields + _suAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsUpdateAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Delete.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Delete.hs new file mode 100644 index 000000000..d484bf61e --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Attachments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an attachment from a timeline item. +-- +-- /See:/ for @MirrorTimelineAttachmentsDelete@. +module Mirror.Timeline.Attachments.Delete + ( + -- * REST Resource + TimelineAttachmentsDeleteAPI + + -- * Creating a Request + , timelineAttachmentsDelete + , TimelineAttachmentsDelete + + -- * Request Lenses + , tadQuotaUser + , tadPrettyPrint + , tadUserIp + , tadItemId + , tadAttachmentId + , tadKey + , tadOauthToken + , tadFields + , tadAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineAttachmentsDelete@ which the +-- 'TimelineAttachmentsDelete' request conforms to. +type TimelineAttachmentsDeleteAPI = + "timeline" :> + Capture "itemId" Text :> + "attachments" :> + Capture "attachmentId" Text :> Delete '[JSON] () + +-- | Deletes an attachment from a timeline item. +-- +-- /See:/ 'timelineAttachmentsDelete' smart constructor. +data TimelineAttachmentsDelete = TimelineAttachmentsDelete + { _tadQuotaUser :: !(Maybe Text) + , _tadPrettyPrint :: !Bool + , _tadUserIp :: !(Maybe Text) + , _tadItemId :: !Text + , _tadAttachmentId :: !Text + , _tadKey :: !(Maybe Text) + , _tadOauthToken :: !(Maybe Text) + , _tadFields :: !(Maybe Text) + , _tadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineAttachmentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tadQuotaUser' +-- +-- * 'tadPrettyPrint' +-- +-- * 'tadUserIp' +-- +-- * 'tadItemId' +-- +-- * 'tadAttachmentId' +-- +-- * 'tadKey' +-- +-- * 'tadOauthToken' +-- +-- * 'tadFields' +-- +-- * 'tadAlt' +timelineAttachmentsDelete + :: Text -- ^ 'itemId' + -> Text -- ^ 'attachmentId' + -> TimelineAttachmentsDelete +timelineAttachmentsDelete pTadItemId_ pTadAttachmentId_ = + TimelineAttachmentsDelete + { _tadQuotaUser = Nothing + , _tadPrettyPrint = True + , _tadUserIp = Nothing + , _tadItemId = pTadItemId_ + , _tadAttachmentId = pTadAttachmentId_ + , _tadKey = Nothing + , _tadOauthToken = Nothing + , _tadFields = Nothing + , _tadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tadQuotaUser :: Lens' TimelineAttachmentsDelete' (Maybe Text) +tadQuotaUser + = lens _tadQuotaUser (\ s a -> s{_tadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tadPrettyPrint :: Lens' TimelineAttachmentsDelete' Bool +tadPrettyPrint + = lens _tadPrettyPrint + (\ s a -> s{_tadPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tadUserIp :: Lens' TimelineAttachmentsDelete' (Maybe Text) +tadUserIp + = lens _tadUserIp (\ s a -> s{_tadUserIp = a}) + +-- | The ID of the timeline item the attachment belongs to. +tadItemId :: Lens' TimelineAttachmentsDelete' Text +tadItemId + = lens _tadItemId (\ s a -> s{_tadItemId = a}) + +-- | The ID of the attachment. +tadAttachmentId :: Lens' TimelineAttachmentsDelete' Text +tadAttachmentId + = lens _tadAttachmentId + (\ s a -> s{_tadAttachmentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tadKey :: Lens' TimelineAttachmentsDelete' (Maybe Text) +tadKey = lens _tadKey (\ s a -> s{_tadKey = a}) + +-- | OAuth 2.0 token for the current user. +tadOauthToken :: Lens' TimelineAttachmentsDelete' (Maybe Text) +tadOauthToken + = lens _tadOauthToken + (\ s a -> s{_tadOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tadFields :: Lens' TimelineAttachmentsDelete' (Maybe Text) +tadFields + = lens _tadFields (\ s a -> s{_tadFields = a}) + +-- | Data format for the response. +tadAlt :: Lens' TimelineAttachmentsDelete' Text +tadAlt = lens _tadAlt (\ s a -> s{_tadAlt = a}) + +instance GoogleRequest TimelineAttachmentsDelete' + where + type Rs TimelineAttachmentsDelete' = () + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineAttachmentsDelete{..} + = go _tadQuotaUser _tadPrettyPrint _tadUserIp + _tadItemId + _tadAttachmentId + _tadKey + _tadOauthToken + _tadFields + _tadAlt + where go + = clientWithRoute + (Proxy :: Proxy TimelineAttachmentsDeleteAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Get.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Get.hs new file mode 100644 index 000000000..a28de1e5c --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Attachments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves an attachment on a timeline item by item ID and attachment ID. +-- +-- /See:/ for @MirrorTimelineAttachmentsGet@. +module Mirror.Timeline.Attachments.Get + ( + -- * REST Resource + TimelineAttachmentsGetAPI + + -- * Creating a Request + , timelineAttachmentsGet + , TimelineAttachmentsGet + + -- * Request Lenses + , tagQuotaUser + , tagPrettyPrint + , tagUserIp + , tagItemId + , tagAttachmentId + , tagKey + , tagOauthToken + , tagFields + , tagAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineAttachmentsGet@ which the +-- 'TimelineAttachmentsGet' request conforms to. +type TimelineAttachmentsGetAPI = + "timeline" :> + Capture "itemId" Text :> + "attachments" :> + Capture "attachmentId" Text :> Get '[JSON] Attachment + +-- | Retrieves an attachment on a timeline item by item ID and attachment ID. +-- +-- /See:/ 'timelineAttachmentsGet' smart constructor. +data TimelineAttachmentsGet = TimelineAttachmentsGet + { _tagQuotaUser :: !(Maybe Text) + , _tagPrettyPrint :: !Bool + , _tagUserIp :: !(Maybe Text) + , _tagItemId :: !Text + , _tagAttachmentId :: !Text + , _tagKey :: !(Maybe Text) + , _tagOauthToken :: !(Maybe Text) + , _tagFields :: !(Maybe Text) + , _tagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineAttachmentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tagQuotaUser' +-- +-- * 'tagPrettyPrint' +-- +-- * 'tagUserIp' +-- +-- * 'tagItemId' +-- +-- * 'tagAttachmentId' +-- +-- * 'tagKey' +-- +-- * 'tagOauthToken' +-- +-- * 'tagFields' +-- +-- * 'tagAlt' +timelineAttachmentsGet + :: Text -- ^ 'itemId' + -> Text -- ^ 'attachmentId' + -> TimelineAttachmentsGet +timelineAttachmentsGet pTagItemId_ pTagAttachmentId_ = + TimelineAttachmentsGet + { _tagQuotaUser = Nothing + , _tagPrettyPrint = True + , _tagUserIp = Nothing + , _tagItemId = pTagItemId_ + , _tagAttachmentId = pTagAttachmentId_ + , _tagKey = Nothing + , _tagOauthToken = Nothing + , _tagFields = Nothing + , _tagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tagQuotaUser :: Lens' TimelineAttachmentsGet' (Maybe Text) +tagQuotaUser + = lens _tagQuotaUser (\ s a -> s{_tagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tagPrettyPrint :: Lens' TimelineAttachmentsGet' Bool +tagPrettyPrint + = lens _tagPrettyPrint + (\ s a -> s{_tagPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tagUserIp :: Lens' TimelineAttachmentsGet' (Maybe Text) +tagUserIp + = lens _tagUserIp (\ s a -> s{_tagUserIp = a}) + +-- | The ID of the timeline item the attachment belongs to. +tagItemId :: Lens' TimelineAttachmentsGet' Text +tagItemId + = lens _tagItemId (\ s a -> s{_tagItemId = a}) + +-- | The ID of the attachment. +tagAttachmentId :: Lens' TimelineAttachmentsGet' Text +tagAttachmentId + = lens _tagAttachmentId + (\ s a -> s{_tagAttachmentId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tagKey :: Lens' TimelineAttachmentsGet' (Maybe Text) +tagKey = lens _tagKey (\ s a -> s{_tagKey = a}) + +-- | OAuth 2.0 token for the current user. +tagOauthToken :: Lens' TimelineAttachmentsGet' (Maybe Text) +tagOauthToken + = lens _tagOauthToken + (\ s a -> s{_tagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tagFields :: Lens' TimelineAttachmentsGet' (Maybe Text) +tagFields + = lens _tagFields (\ s a -> s{_tagFields = a}) + +-- | Data format for the response. +tagAlt :: Lens' TimelineAttachmentsGet' Text +tagAlt = lens _tagAlt (\ s a -> s{_tagAlt = a}) + +instance GoogleRequest TimelineAttachmentsGet' where + type Rs TimelineAttachmentsGet' = Attachment + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineAttachmentsGet{..} + = go _tagQuotaUser _tagPrettyPrint _tagUserIp + _tagItemId + _tagAttachmentId + _tagKey + _tagOauthToken + _tagFields + _tagAlt + where go + = clientWithRoute + (Proxy :: Proxy TimelineAttachmentsGetAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Insert.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Insert.hs new file mode 100644 index 000000000..68f4868f2 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Attachments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a new attachment to a timeline item. +-- +-- /See:/ for @MirrorTimelineAttachmentsInsert@. +module Mirror.Timeline.Attachments.Insert + ( + -- * REST Resource + TimelineAttachmentsInsertAPI + + -- * Creating a Request + , timelineAttachmentsInsert + , TimelineAttachmentsInsert + + -- * Request Lenses + , taiQuotaUser + , taiPrettyPrint + , taiUserIp + , taiItemId + , taiKey + , taiOauthToken + , taiFields + , taiAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineAttachmentsInsert@ which the +-- 'TimelineAttachmentsInsert' request conforms to. +type TimelineAttachmentsInsertAPI = + "timeline" :> + Capture "itemId" Text :> + "attachments" :> Post '[JSON] Attachment + +-- | Adds a new attachment to a timeline item. +-- +-- /See:/ 'timelineAttachmentsInsert' smart constructor. +data TimelineAttachmentsInsert = TimelineAttachmentsInsert + { _taiQuotaUser :: !(Maybe Text) + , _taiPrettyPrint :: !Bool + , _taiUserIp :: !(Maybe Text) + , _taiItemId :: !Text + , _taiKey :: !(Maybe Text) + , _taiOauthToken :: !(Maybe Text) + , _taiFields :: !(Maybe Text) + , _taiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineAttachmentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'taiQuotaUser' +-- +-- * 'taiPrettyPrint' +-- +-- * 'taiUserIp' +-- +-- * 'taiItemId' +-- +-- * 'taiKey' +-- +-- * 'taiOauthToken' +-- +-- * 'taiFields' +-- +-- * 'taiAlt' +timelineAttachmentsInsert + :: Text -- ^ 'itemId' + -> TimelineAttachmentsInsert +timelineAttachmentsInsert pTaiItemId_ = + TimelineAttachmentsInsert + { _taiQuotaUser = Nothing + , _taiPrettyPrint = True + , _taiUserIp = Nothing + , _taiItemId = pTaiItemId_ + , _taiKey = Nothing + , _taiOauthToken = Nothing + , _taiFields = Nothing + , _taiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +taiQuotaUser :: Lens' TimelineAttachmentsInsert' (Maybe Text) +taiQuotaUser + = lens _taiQuotaUser (\ s a -> s{_taiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +taiPrettyPrint :: Lens' TimelineAttachmentsInsert' Bool +taiPrettyPrint + = lens _taiPrettyPrint + (\ s a -> s{_taiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +taiUserIp :: Lens' TimelineAttachmentsInsert' (Maybe Text) +taiUserIp + = lens _taiUserIp (\ s a -> s{_taiUserIp = a}) + +-- | The ID of the timeline item the attachment belongs to. +taiItemId :: Lens' TimelineAttachmentsInsert' Text +taiItemId + = lens _taiItemId (\ s a -> s{_taiItemId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +taiKey :: Lens' TimelineAttachmentsInsert' (Maybe Text) +taiKey = lens _taiKey (\ s a -> s{_taiKey = a}) + +-- | OAuth 2.0 token for the current user. +taiOauthToken :: Lens' TimelineAttachmentsInsert' (Maybe Text) +taiOauthToken + = lens _taiOauthToken + (\ s a -> s{_taiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +taiFields :: Lens' TimelineAttachmentsInsert' (Maybe Text) +taiFields + = lens _taiFields (\ s a -> s{_taiFields = a}) + +-- | Data format for the response. +taiAlt :: Lens' TimelineAttachmentsInsert' Text +taiAlt = lens _taiAlt (\ s a -> s{_taiAlt = a}) + +instance GoogleRequest TimelineAttachmentsInsert' + where + type Rs TimelineAttachmentsInsert' = Attachment + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineAttachmentsInsert{..} + = go _taiQuotaUser _taiPrettyPrint _taiUserIp + _taiItemId + _taiKey + _taiOauthToken + _taiFields + _taiAlt + where go + = clientWithRoute + (Proxy :: Proxy TimelineAttachmentsInsertAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/List.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/List.hs new file mode 100644 index 000000000..44cd947c3 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Attachments/List.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Attachments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of attachments for a timeline item. +-- +-- /See:/ for @MirrorTimelineAttachmentsList@. +module Mirror.Timeline.Attachments.List + ( + -- * REST Resource + TimelineAttachmentsListAPI + + -- * Creating a Request + , timelineAttachmentsList + , TimelineAttachmentsList + + -- * Request Lenses + , talQuotaUser + , talPrettyPrint + , talUserIp + , talItemId + , talKey + , talOauthToken + , talFields + , talAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineAttachmentsList@ which the +-- 'TimelineAttachmentsList' request conforms to. +type TimelineAttachmentsListAPI = + "timeline" :> + Capture "itemId" Text :> + "attachments" :> Get '[JSON] AttachmentsListResponse + +-- | Returns a list of attachments for a timeline item. +-- +-- /See:/ 'timelineAttachmentsList' smart constructor. +data TimelineAttachmentsList = TimelineAttachmentsList + { _talQuotaUser :: !(Maybe Text) + , _talPrettyPrint :: !Bool + , _talUserIp :: !(Maybe Text) + , _talItemId :: !Text + , _talKey :: !(Maybe Text) + , _talOauthToken :: !(Maybe Text) + , _talFields :: !(Maybe Text) + , _talAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineAttachmentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'talQuotaUser' +-- +-- * 'talPrettyPrint' +-- +-- * 'talUserIp' +-- +-- * 'talItemId' +-- +-- * 'talKey' +-- +-- * 'talOauthToken' +-- +-- * 'talFields' +-- +-- * 'talAlt' +timelineAttachmentsList + :: Text -- ^ 'itemId' + -> TimelineAttachmentsList +timelineAttachmentsList pTalItemId_ = + TimelineAttachmentsList + { _talQuotaUser = Nothing + , _talPrettyPrint = True + , _talUserIp = Nothing + , _talItemId = pTalItemId_ + , _talKey = Nothing + , _talOauthToken = Nothing + , _talFields = Nothing + , _talAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +talQuotaUser :: Lens' TimelineAttachmentsList' (Maybe Text) +talQuotaUser + = lens _talQuotaUser (\ s a -> s{_talQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +talPrettyPrint :: Lens' TimelineAttachmentsList' Bool +talPrettyPrint + = lens _talPrettyPrint + (\ s a -> s{_talPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +talUserIp :: Lens' TimelineAttachmentsList' (Maybe Text) +talUserIp + = lens _talUserIp (\ s a -> s{_talUserIp = a}) + +-- | The ID of the timeline item whose attachments should be listed. +talItemId :: Lens' TimelineAttachmentsList' Text +talItemId + = lens _talItemId (\ s a -> s{_talItemId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +talKey :: Lens' TimelineAttachmentsList' (Maybe Text) +talKey = lens _talKey (\ s a -> s{_talKey = a}) + +-- | OAuth 2.0 token for the current user. +talOauthToken :: Lens' TimelineAttachmentsList' (Maybe Text) +talOauthToken + = lens _talOauthToken + (\ s a -> s{_talOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +talFields :: Lens' TimelineAttachmentsList' (Maybe Text) +talFields + = lens _talFields (\ s a -> s{_talFields = a}) + +-- | Data format for the response. +talAlt :: Lens' TimelineAttachmentsList' Text +talAlt = lens _talAlt (\ s a -> s{_talAlt = a}) + +instance GoogleRequest TimelineAttachmentsList' where + type Rs TimelineAttachmentsList' = + AttachmentsListResponse + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineAttachmentsList{..} + = go _talQuotaUser _talPrettyPrint _talUserIp + _talItemId + _talKey + _talOauthToken + _talFields + _talAlt + where go + = clientWithRoute + (Proxy :: Proxy TimelineAttachmentsListAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Delete.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Delete.hs new file mode 100644 index 000000000..ea8492e0f --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Delete.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a timeline item. +-- +-- /See:/ for @MirrorTimelineDelete@. +module Mirror.Timeline.Delete + ( + -- * REST Resource + TimelineDeleteAPI + + -- * Creating a Request + , timelineDelete + , TimelineDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdUserIp + , tdKey + , tdId + , tdOauthToken + , tdFields + , tdAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineDelete@ which the +-- 'TimelineDelete' request conforms to. +type TimelineDeleteAPI = + "timeline" :> Capture "id" Text :> Delete '[JSON] () + +-- | Deletes a timeline item. +-- +-- /See:/ 'timelineDelete' smart constructor. +data TimelineDelete = TimelineDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdId :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdId' +-- +-- * 'tdOauthToken' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +timelineDelete + :: Text -- ^ 'id' + -> TimelineDelete +timelineDelete pTdId_ = + TimelineDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdId = pTdId_ + , _tdOauthToken = Nothing + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TimelineDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TimelineDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TimelineDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TimelineDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | The ID of the timeline item. +tdId :: Lens' TimelineDelete' Text +tdId = lens _tdId (\ s a -> s{_tdId = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TimelineDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TimelineDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TimelineDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TimelineDelete' where + type Rs TimelineDelete' = () + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdUserIp _tdKey + _tdId + _tdOauthToken + _tdFields + _tdAlt + where go + = clientWithRoute (Proxy :: Proxy TimelineDeleteAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Get.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Get.hs new file mode 100644 index 000000000..acc1d1935 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Get.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a single timeline item by ID. +-- +-- /See:/ for @MirrorTimelineGet@. +module Mirror.Timeline.Get + ( + -- * REST Resource + TimelineGetAPI + + -- * Creating a Request + , timelineGet + , TimelineGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgUserIp + , tgKey + , tgId + , tgOauthToken + , tgFields + , tgAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineGet@ which the +-- 'TimelineGet' request conforms to. +type TimelineGetAPI = + "timeline" :> + Capture "id" Text :> Get '[JSON] TimelineItem + +-- | Gets a single timeline item by ID. +-- +-- /See:/ 'timelineGet' smart constructor. +data TimelineGet = TimelineGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgId :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgId' +-- +-- * 'tgOauthToken' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +timelineGet + :: Text -- ^ 'id' + -> TimelineGet +timelineGet pTgId_ = + TimelineGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgId = pTgId_ + , _tgOauthToken = Nothing + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TimelineGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TimelineGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TimelineGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TimelineGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | The ID of the timeline item. +tgId :: Lens' TimelineGet' Text +tgId = lens _tgId (\ s a -> s{_tgId = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TimelineGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TimelineGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TimelineGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TimelineGet' where + type Rs TimelineGet' = TimelineItem + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgUserIp _tgKey + _tgId + _tgOauthToken + _tgFields + _tgAlt + where go + = clientWithRoute (Proxy :: Proxy TimelineGetAPI) r u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Insert.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Insert.hs new file mode 100644 index 000000000..de8310e07 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Insert.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a new item into the timeline. +-- +-- /See:/ for @MirrorTimelineInsert@. +module Mirror.Timeline.Insert + ( + -- * REST Resource + TimelineInsertAPI + + -- * Creating a Request + , timelineInsert + , TimelineInsert + + -- * Request Lenses + , tiQuotaUser + , tiPrettyPrint + , tiUserIp + , tiKey + , tiOauthToken + , tiFields + , tiAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineInsert@ which the +-- 'TimelineInsert' request conforms to. +type TimelineInsertAPI = + "timeline" :> Post '[JSON] TimelineItem + +-- | Inserts a new item into the timeline. +-- +-- /See:/ 'timelineInsert' smart constructor. +data TimelineInsert = TimelineInsert + { _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +timelineInsert + :: TimelineInsert +timelineInsert = + TimelineInsert + { _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TimelineInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TimelineInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TimelineInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TimelineInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TimelineInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TimelineInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TimelineInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TimelineInsert' where + type Rs TimelineInsert' = TimelineItem + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineInsert{..} + = go _tiQuotaUser _tiPrettyPrint _tiUserIp _tiKey + _tiOauthToken + _tiFields + _tiAlt + where go + = clientWithRoute (Proxy :: Proxy TimelineInsertAPI) + r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/List.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/List.hs new file mode 100644 index 000000000..eb185de45 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/List.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of timeline items for the authenticated user. +-- +-- /See:/ for @MirrorTimelineList@. +module Mirror.Timeline.List + ( + -- * REST Resource + TimelineListAPI + + -- * Creating a Request + , timelineList + , TimelineList + + -- * Request Lenses + , tlPinnedOnly + , tlQuotaUser + , tlPrettyPrint + , tlOrderBy + , tlUserIp + , tlBundleId + , tlKey + , tlSourceItemId + , tlPageToken + , tlOauthToken + , tlMaxResults + , tlIncludeDeleted + , tlFields + , tlAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineList@ which the +-- 'TimelineList' request conforms to. +type TimelineListAPI = + "timeline" :> + QueryParam "pinnedOnly" Bool :> + QueryParam "orderBy" Text :> + QueryParam "bundleId" Text :> + QueryParam "sourceItemId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "includeDeleted" Bool :> + Get '[JSON] TimelineListResponse + +-- | Retrieves a list of timeline items for the authenticated user. +-- +-- /See:/ 'timelineList' smart constructor. +data TimelineList = TimelineList + { _tlPinnedOnly :: !(Maybe Bool) + , _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlOrderBy :: !(Maybe Text) + , _tlUserIp :: !(Maybe Text) + , _tlBundleId :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlSourceItemId :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Word32) + , _tlIncludeDeleted :: !(Maybe Bool) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlPinnedOnly' +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlOrderBy' +-- +-- * 'tlUserIp' +-- +-- * 'tlBundleId' +-- +-- * 'tlKey' +-- +-- * 'tlSourceItemId' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlIncludeDeleted' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +timelineList + :: TimelineList +timelineList = + TimelineList + { _tlPinnedOnly = Nothing + , _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlOrderBy = Nothing + , _tlUserIp = Nothing + , _tlBundleId = Nothing + , _tlKey = Nothing + , _tlSourceItemId = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlMaxResults = Nothing + , _tlIncludeDeleted = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | If true, only pinned items will be returned. +tlPinnedOnly :: Lens' TimelineList' (Maybe Bool) +tlPinnedOnly + = lens _tlPinnedOnly (\ s a -> s{_tlPinnedOnly = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TimelineList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TimelineList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | Controls the order in which timeline items are returned. +tlOrderBy :: Lens' TimelineList' (Maybe Text) +tlOrderBy + = lens _tlOrderBy (\ s a -> s{_tlOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TimelineList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | If provided, only items with the given bundleId will be returned. +tlBundleId :: Lens' TimelineList' (Maybe Text) +tlBundleId + = lens _tlBundleId (\ s a -> s{_tlBundleId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TimelineList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | If provided, only items with the given sourceItemId will be returned. +tlSourceItemId :: Lens' TimelineList' (Maybe Text) +tlSourceItemId + = lens _tlSourceItemId + (\ s a -> s{_tlSourceItemId = a}) + +-- | Token for the page of results to return. +tlPageToken :: Lens' TimelineList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TimelineList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | The maximum number of items to include in the response, used for paging. +tlMaxResults :: Lens' TimelineList' (Maybe Word32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | If true, tombstone records for deleted items will be returned. +tlIncludeDeleted :: Lens' TimelineList' (Maybe Bool) +tlIncludeDeleted + = lens _tlIncludeDeleted + (\ s a -> s{_tlIncludeDeleted = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TimelineList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TimelineList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TimelineList' where + type Rs TimelineList' = TimelineListResponse + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineList{..} + = go _tlPinnedOnly _tlQuotaUser _tlPrettyPrint + _tlOrderBy + _tlUserIp + _tlBundleId + _tlKey + _tlSourceItemId + _tlPageToken + _tlOauthToken + _tlMaxResults + _tlIncludeDeleted + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TimelineListAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Patch.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Patch.hs new file mode 100644 index 000000000..ed0212523 --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Patch.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a timeline item in place. This method supports patch semantics. +-- +-- /See:/ for @MirrorTimelinePatch@. +module Mirror.Timeline.Patch + ( + -- * REST Resource + TimelinePatchAPI + + -- * Creating a Request + , timelinePatch + , TimelinePatch + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpUserIp + , tpKey + , tpId + , tpOauthToken + , tpFields + , tpAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelinePatch@ which the +-- 'TimelinePatch' request conforms to. +type TimelinePatchAPI = + "timeline" :> + Capture "id" Text :> Patch '[JSON] TimelineItem + +-- | Updates a timeline item in place. This method supports patch semantics. +-- +-- /See:/ 'timelinePatch' smart constructor. +data TimelinePatch = TimelinePatch + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpId :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelinePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpId' +-- +-- * 'tpOauthToken' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +timelinePatch + :: Text -- ^ 'id' + -> TimelinePatch +timelinePatch pTpId_ = + TimelinePatch + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpId = pTpId_ + , _tpOauthToken = Nothing + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TimelinePatch' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TimelinePatch' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TimelinePatch' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TimelinePatch' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | The ID of the timeline item. +tpId :: Lens' TimelinePatch' Text +tpId = lens _tpId (\ s a -> s{_tpId = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TimelinePatch' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TimelinePatch' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TimelinePatch' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TimelinePatch' where + type Rs TimelinePatch' = TimelineItem + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelinePatch{..} + = go _tpQuotaUser _tpPrettyPrint _tpUserIp _tpKey + _tpId + _tpOauthToken + _tpFields + _tpAlt + where go + = clientWithRoute (Proxy :: Proxy TimelinePatchAPI) r + u diff --git a/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Update.hs b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Update.hs new file mode 100644 index 000000000..6d7ee249d --- /dev/null +++ b/gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Mirror.Timeline.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a timeline item in place. +-- +-- /See:/ for @MirrorTimelineUpdate@. +module Mirror.Timeline.Update + ( + -- * REST Resource + TimelineUpdateAPI + + -- * Creating a Request + , timelineUpdate + , TimelineUpdate + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuUserIp + , tuKey + , tuId + , tuOauthToken + , tuFields + , tuAlt + ) where + +import Network.Google.Mirror.Types +import Network.Google.Prelude + +-- | A resource alias for @MirrorTimelineUpdate@ which the +-- 'TimelineUpdate' request conforms to. +type TimelineUpdateAPI = + "timeline" :> + Capture "id" Text :> Put '[JSON] TimelineItem + +-- | Updates a timeline item in place. +-- +-- /See:/ 'timelineUpdate' smart constructor. +data TimelineUpdate = TimelineUpdate + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuId :: !Text + , _tuOauthToken :: !(Maybe Text) + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimelineUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuId' +-- +-- * 'tuOauthToken' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +timelineUpdate + :: Text -- ^ 'id' + -> TimelineUpdate +timelineUpdate pTuId_ = + TimelineUpdate + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuId = pTuId_ + , _tuOauthToken = Nothing + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TimelineUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TimelineUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TimelineUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TimelineUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | The ID of the timeline item. +tuId :: Lens' TimelineUpdate' Text +tuId = lens _tuId (\ s a -> s{_tuId = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TimelineUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TimelineUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TimelineUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TimelineUpdate' where + type Rs TimelineUpdate' = TimelineItem + request = requestWithRoute defReq mirrorURL + requestWithRoute r u TimelineUpdate{..} + = go _tuQuotaUser _tuPrettyPrint _tuUserIp _tuKey + _tuId + _tuOauthToken + _tuFields + _tuAlt + where go + = clientWithRoute (Proxy :: Proxy TimelineUpdateAPI) + r + u diff --git a/gogol-mirror/gogol-mirror.cabal b/gogol-mirror/gogol-mirror.cabal new file mode 100644 index 000000000..05e1cb1bf --- /dev/null +++ b/gogol-mirror/gogol-mirror.cabal @@ -0,0 +1,66 @@ +name: gogol-mirror +version: 0.0.1 +synopsis: Google Mirror API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for interacting with Glass users via the timeline. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Mirror + , Network.Google.Mirror.Types + , Network.Google.Resource.Mirror.Accounts.Insert + , Network.Google.Resource.Mirror.Contacts.Delete + , Network.Google.Resource.Mirror.Contacts.Get + , Network.Google.Resource.Mirror.Contacts.Insert + , Network.Google.Resource.Mirror.Contacts.List + , Network.Google.Resource.Mirror.Contacts.Patch + , Network.Google.Resource.Mirror.Contacts.Update + , Network.Google.Resource.Mirror.Locations.Get + , Network.Google.Resource.Mirror.Locations.List + , Network.Google.Resource.Mirror.Settings.Get + , Network.Google.Resource.Mirror.Subscriptions.Delete + , Network.Google.Resource.Mirror.Subscriptions.Insert + , Network.Google.Resource.Mirror.Subscriptions.List + , Network.Google.Resource.Mirror.Subscriptions.Update + , Network.Google.Resource.Mirror.Timeline.Attachments.Delete + , Network.Google.Resource.Mirror.Timeline.Attachments.Get + , Network.Google.Resource.Mirror.Timeline.Attachments.Insert + , Network.Google.Resource.Mirror.Timeline.Attachments.List + , Network.Google.Resource.Mirror.Timeline.Delete + , Network.Google.Resource.Mirror.Timeline.Get + , Network.Google.Resource.Mirror.Timeline.Insert + , Network.Google.Resource.Mirror.Timeline.List + , Network.Google.Resource.Mirror.Timeline.Patch + , Network.Google.Resource.Mirror.Timeline.Update + + other-modules: + Network.Google.Mirror.Types.Product + , Network.Google.Mirror.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-mirror/src/.gitkeep b/gogol-mirror/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-monitoring/LICENSE b/gogol-monitoring/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-monitoring/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-monitoring/Makefile b/gogol-monitoring/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-monitoring/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-monitoring/README.md b/gogol-monitoring/README.md new file mode 100644 index 000000000..525a28ab2 --- /dev/null +++ b/gogol-monitoring/README.md @@ -0,0 +1,28 @@ +# gogol-monitoring + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Cloud Monitoring API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-monitoring` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-monitoring/Setup.hs b/gogol-monitoring/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-monitoring/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-monitoring/gen/Network/Google/Monitoring.hs b/gogol-monitoring/gen/Network/Google/Monitoring.hs new file mode 100644 index 000000000..e7a7a73ff --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Monitoring.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Monitoring +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for accessing Google Cloud and API monitoring data. +-- +-- /See:/ +module Network.Google.Monitoring + ( + -- * API + MonitoringAPI + , monitoringAPI + , monitoringURL + + -- * Service Methods + + -- * REST Resources + + -- ** CloudmonitoringMetricDescriptorsCreate + , module Cloudmonitoring.MetricDescriptors.Create + + -- ** CloudmonitoringMetricDescriptorsDelete + , module Cloudmonitoring.MetricDescriptors.Delete + + -- ** CloudmonitoringMetricDescriptorsList + , module Cloudmonitoring.MetricDescriptors.List + + -- ** CloudmonitoringTimeseriesList + , module Cloudmonitoring.Timeseries.List + + -- ** CloudmonitoringTimeseriesWrite + , module Cloudmonitoring.Timeseries.Write + + -- ** CloudmonitoringTimeseriesDescriptorsList + , module Cloudmonitoring.TimeseriesDescriptors.List + + -- * Types + + -- ** MetricDescriptorTypeDescriptor + , MetricDescriptorTypeDescriptor + , metricDescriptorTypeDescriptor + , mdtdMetricType + , mdtdValueType + + -- ** ListTimeseriesResponse + , ListTimeseriesResponse + , listTimeseriesResponse + , ltrNextPageToken + , ltrKind + , ltrOldest + , ltrYoungest + , ltrTimeseries + + -- ** MetricDescriptor + , MetricDescriptor + , metricDescriptor + , mdProject + , mdTypeDescriptor + , mdName + , mdLabels + , mdDescription + + -- ** MetricDescriptorLabelDescriptor + , MetricDescriptorLabelDescriptor + , metricDescriptorLabelDescriptor + , mdldKey + , mdldDescription + + -- ** PointDistributionUnderflowBucket + , PointDistributionUnderflowBucket + , pointDistributionUnderflowBucket + , pdubUpperBound + , pdubCount + + -- ** WriteTimeseriesRequest + , WriteTimeseriesRequest + , writeTimeseriesRequest + , wtrCommonLabels + , wtrTimeseries + + -- ** ListMetricDescriptorsResponse + , ListMetricDescriptorsResponse + , listMetricDescriptorsResponse + , lmdrMetrics + , lmdrNextPageToken + , lmdrKind + + -- ** ListTimeseriesDescriptorsRequest + , ListTimeseriesDescriptorsRequest + , listTimeseriesDescriptorsRequest + , ltdrKind + + -- ** WriteTimeseriesResponse + , WriteTimeseriesResponse + , writeTimeseriesResponse + , wtrKind + + -- ** PointDistributionBucket + , PointDistributionBucket + , pointDistributionBucket + , pdbUpperBound + , pdbCount + , pdbLowerBound + + -- ** TimeseriesDescriptorLabel + , TimeseriesDescriptorLabel + , timeseriesDescriptorLabel + , tdlValue + , tdlKey + + -- ** PointDistribution + , PointDistribution + , pointDistribution + , pdOverflowBucket + , pdBuckets + , pdUnderflowBucket + + -- ** Point + , Point + , point + , pBoolValue + , pStart + , pDoubleValue + , pStringValue + , pDistributionValue + , pEnd + , pInt64Value + + -- ** PointDistributionOverflowBucket + , PointDistributionOverflowBucket + , pointDistributionOverflowBucket + , pdobCount + , pdobLowerBound + + -- ** ListTimeseriesDescriptorsResponse + , ListTimeseriesDescriptorsResponse + , listTimeseriesDescriptorsResponse + , lNextPageToken + , lKind + , lOldest + , lYoungest + , lTimeseries + + -- ** ListMetricDescriptorsRequest + , ListMetricDescriptorsRequest + , listMetricDescriptorsRequest + , lisKind + + -- ** TimeseriesPoint + , TimeseriesPoint + , timeseriesPoint + , tpPoint + , tpTimeseriesDesc + + -- ** TimeseriesDescriptor + , TimeseriesDescriptor + , timeseriesDescriptor + , tdProject + , tdMetric + , tdLabels + + -- ** ListTimeseriesRequest + , ListTimeseriesRequest + , listTimeseriesRequest + , ltrtKind + + -- ** DeleteMetricDescriptorResponse + , DeleteMetricDescriptorResponse + , deleteMetricDescriptorResponse + , dmdrKind + + -- ** Timeseries + , Timeseries + , timeseries + , tPoints + , tTimeseriesDesc + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude +import Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Create +import Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Delete +import Network.Google.Resource.Cloudmonitoring.MetricDescriptors.List +import Network.Google.Resource.Cloudmonitoring.Timeseries.List +import Network.Google.Resource.Cloudmonitoring.Timeseries.Write +import Network.Google.Resource.Cloudmonitoring.TimeseriesDescriptors.List + +{- $resources +TODO +-} + +type MonitoringAPI = + MetricDescriptors :<|> TimeseriesDescriptors :<|> + Timeseries + +monitoringAPI :: Proxy MonitoringAPI +monitoringAPI = Proxy diff --git a/gogol-monitoring/gen/Network/Google/Monitoring/Types.hs b/gogol-monitoring/gen/Network/Google/Monitoring/Types.hs new file mode 100644 index 000000000..66452536c --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Monitoring/Types.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Monitoring.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Monitoring.Types + ( + -- * Service URL + monitoringURL + + -- * MetricDescriptorTypeDescriptor + , MetricDescriptorTypeDescriptor + , metricDescriptorTypeDescriptor + , mdtdMetricType + , mdtdValueType + + -- * ListTimeseriesResponse + , ListTimeseriesResponse + , listTimeseriesResponse + , ltrNextPageToken + , ltrKind + , ltrOldest + , ltrYoungest + , ltrTimeseries + + -- * MetricDescriptor + , MetricDescriptor + , metricDescriptor + , mdProject + , mdTypeDescriptor + , mdName + , mdLabels + , mdDescription + + -- * MetricDescriptorLabelDescriptor + , MetricDescriptorLabelDescriptor + , metricDescriptorLabelDescriptor + , mdldKey + , mdldDescription + + -- * PointDistributionUnderflowBucket + , PointDistributionUnderflowBucket + , pointDistributionUnderflowBucket + , pdubUpperBound + , pdubCount + + -- * WriteTimeseriesRequest + , WriteTimeseriesRequest + , writeTimeseriesRequest + , wtrCommonLabels + , wtrTimeseries + + -- * ListMetricDescriptorsResponse + , ListMetricDescriptorsResponse + , listMetricDescriptorsResponse + , lmdrMetrics + , lmdrNextPageToken + , lmdrKind + + -- * ListTimeseriesDescriptorsRequest + , ListTimeseriesDescriptorsRequest + , listTimeseriesDescriptorsRequest + , ltdrKind + + -- * WriteTimeseriesResponse + , WriteTimeseriesResponse + , writeTimeseriesResponse + , wtrKind + + -- * PointDistributionBucket + , PointDistributionBucket + , pointDistributionBucket + , pdbUpperBound + , pdbCount + , pdbLowerBound + + -- * TimeseriesDescriptorLabel + , TimeseriesDescriptorLabel + , timeseriesDescriptorLabel + , tdlValue + , tdlKey + + -- * PointDistribution + , PointDistribution + , pointDistribution + , pdOverflowBucket + , pdBuckets + , pdUnderflowBucket + + -- * Point + , Point + , point + , pBoolValue + , pStart + , pDoubleValue + , pStringValue + , pDistributionValue + , pEnd + , pInt64Value + + -- * PointDistributionOverflowBucket + , PointDistributionOverflowBucket + , pointDistributionOverflowBucket + , pdobCount + , pdobLowerBound + + -- * ListTimeseriesDescriptorsResponse + , ListTimeseriesDescriptorsResponse + , listTimeseriesDescriptorsResponse + , lNextPageToken + , lKind + , lOldest + , lYoungest + , lTimeseries + + -- * ListMetricDescriptorsRequest + , ListMetricDescriptorsRequest + , listMetricDescriptorsRequest + , lisKind + + -- * TimeseriesPoint + , TimeseriesPoint + , timeseriesPoint + , tpPoint + , tpTimeseriesDesc + + -- * TimeseriesDescriptor + , TimeseriesDescriptor + , timeseriesDescriptor + , tdProject + , tdMetric + , tdLabels + + -- * ListTimeseriesRequest + , ListTimeseriesRequest + , listTimeseriesRequest + , ltrtKind + + -- * DeleteMetricDescriptorResponse + , DeleteMetricDescriptorResponse + , deleteMetricDescriptorResponse + , dmdrKind + + -- * Timeseries + , Timeseries + , timeseries + , tPoints + , tTimeseriesDesc + ) where + +import Network.Google.Monitoring.Types.Product +import Network.Google.Monitoring.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2beta2' of the Cloud Monitoring API. +monitoringURL :: BaseURL +monitoringURL + = BaseUrl Https + "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/" + 443 diff --git a/gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs b/gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs new file mode 100644 index 000000000..004d9570c --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs @@ -0,0 +1,1238 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Monitoring.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Monitoring.Types.Product where + +import Network.Google.Monitoring.Types.Sum +import Network.Google.Prelude + +-- | A type in a metric contains information about how the metric is +-- collected and what its data points look like. +-- +-- /See:/ 'metricDescriptorTypeDescriptor' smart constructor. +data MetricDescriptorTypeDescriptor = MetricDescriptorTypeDescriptor + { _mdtdMetricType :: !(Maybe Text) + , _mdtdValueType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptorTypeDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdtdMetricType' +-- +-- * 'mdtdValueType' +metricDescriptorTypeDescriptor + :: MetricDescriptorTypeDescriptor +metricDescriptorTypeDescriptor = + MetricDescriptorTypeDescriptor + { _mdtdMetricType = Nothing + , _mdtdValueType = Nothing + } + +-- | The method of collecting data for the metric. See Metric types. +mdtdMetricType :: Lens' MetricDescriptorTypeDescriptor (Maybe Text) +mdtdMetricType + = lens _mdtdMetricType + (\ s a -> s{_mdtdMetricType = a}) + +-- | The data type of of individual points in the metric\'s time series. See +-- Metric value types. +mdtdValueType :: Lens' MetricDescriptorTypeDescriptor (Maybe Text) +mdtdValueType + = lens _mdtdValueType + (\ s a -> s{_mdtdValueType = a}) + +instance FromJSON MetricDescriptorTypeDescriptor + where + parseJSON + = withObject "MetricDescriptorTypeDescriptor" + (\ o -> + MetricDescriptorTypeDescriptor <$> + (o .:? "metricType") <*> (o .:? "valueType")) + +instance ToJSON MetricDescriptorTypeDescriptor where + toJSON MetricDescriptorTypeDescriptor{..} + = object + (catMaybes + [("metricType" .=) <$> _mdtdMetricType, + ("valueType" .=) <$> _mdtdValueType]) + +-- | The response of cloudmonitoring.timeseries.list +-- +-- /See:/ 'listTimeseriesResponse' smart constructor. +data ListTimeseriesResponse = ListTimeseriesResponse + { _ltrNextPageToken :: !(Maybe Text) + , _ltrKind :: !Text + , _ltrOldest :: !(Maybe UTCTime) + , _ltrYoungest :: !(Maybe UTCTime) + , _ltrTimeseries :: !(Maybe [Maybe Timeseries]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTimeseriesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrNextPageToken' +-- +-- * 'ltrKind' +-- +-- * 'ltrOldest' +-- +-- * 'ltrYoungest' +-- +-- * 'ltrTimeseries' +listTimeseriesResponse + :: ListTimeseriesResponse +listTimeseriesResponse = + ListTimeseriesResponse + { _ltrNextPageToken = Nothing + , _ltrKind = "cloudmonitoring#listTimeseriesResponse" + , _ltrOldest = Nothing + , _ltrYoungest = Nothing + , _ltrTimeseries = Nothing + } + +-- | Pagination token. If present, indicates that additional results are +-- available for retrieval. To access the results past the pagination +-- limit, set the pageToken query parameter to this value. All of the +-- points of a time series will be returned before returning any point of +-- the subsequent time series. +ltrNextPageToken :: Lens' ListTimeseriesResponse (Maybe Text) +ltrNextPageToken + = lens _ltrNextPageToken + (\ s a -> s{_ltrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listTimeseriesResponse\". +ltrKind :: Lens' ListTimeseriesResponse Text +ltrKind = lens _ltrKind (\ s a -> s{_ltrKind = a}) + +-- | The oldest timestamp of the interval of this query as an RFC 3339 +-- string. +ltrOldest :: Lens' ListTimeseriesResponse (Maybe UTCTime) +ltrOldest + = lens _ltrOldest (\ s a -> s{_ltrOldest = a}) + +-- | The youngest timestamp of the interval of this query as an RFC 3339 +-- string. +ltrYoungest :: Lens' ListTimeseriesResponse (Maybe UTCTime) +ltrYoungest + = lens _ltrYoungest (\ s a -> s{_ltrYoungest = a}) + +-- | The returned time series. +ltrTimeseries :: Lens' ListTimeseriesResponse [Maybe Timeseries] +ltrTimeseries + = lens _ltrTimeseries + (\ s a -> s{_ltrTimeseries = a}) + . _Default + . _Coerce + +instance FromJSON ListTimeseriesResponse where + parseJSON + = withObject "ListTimeseriesResponse" + (\ o -> + ListTimeseriesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "cloudmonitoring#listTimeseriesResponse") + <*> (o .:? "oldest") + <*> (o .:? "youngest") + <*> (o .:? "timeseries" .!= mempty)) + +instance ToJSON ListTimeseriesResponse where + toJSON ListTimeseriesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltrNextPageToken, + Just ("kind" .= _ltrKind), + ("oldest" .=) <$> _ltrOldest, + ("youngest" .=) <$> _ltrYoungest, + ("timeseries" .=) <$> _ltrTimeseries]) + +-- | A metricDescriptor defines the name, label keys, and data type of a +-- particular metric. +-- +-- /See:/ 'metricDescriptor' smart constructor. +data MetricDescriptor = MetricDescriptor + { _mdProject :: !(Maybe Text) + , _mdTypeDescriptor :: !(Maybe (Maybe MetricDescriptorTypeDescriptor)) + , _mdName :: !(Maybe Text) + , _mdLabels :: !(Maybe [Maybe MetricDescriptorLabelDescriptor]) + , _mdDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdProject' +-- +-- * 'mdTypeDescriptor' +-- +-- * 'mdName' +-- +-- * 'mdLabels' +-- +-- * 'mdDescription' +metricDescriptor + :: MetricDescriptor +metricDescriptor = + MetricDescriptor + { _mdProject = Nothing + , _mdTypeDescriptor = Nothing + , _mdName = Nothing + , _mdLabels = Nothing + , _mdDescription = Nothing + } + +-- | The project ID to which the metric belongs. +mdProject :: Lens' MetricDescriptor (Maybe Text) +mdProject + = lens _mdProject (\ s a -> s{_mdProject = a}) + +-- | Type description for this metric. +mdTypeDescriptor :: Lens' MetricDescriptor (Maybe (Maybe MetricDescriptorTypeDescriptor)) +mdTypeDescriptor + = lens _mdTypeDescriptor + (\ s a -> s{_mdTypeDescriptor = a}) + +-- | The name of this metric. +mdName :: Lens' MetricDescriptor (Maybe Text) +mdName = lens _mdName (\ s a -> s{_mdName = a}) + +-- | Labels defined for this metric. +mdLabels :: Lens' MetricDescriptor [Maybe MetricDescriptorLabelDescriptor] +mdLabels + = lens _mdLabels (\ s a -> s{_mdLabels = a}) . + _Default + . _Coerce + +-- | Description of this metric. +mdDescription :: Lens' MetricDescriptor (Maybe Text) +mdDescription + = lens _mdDescription + (\ s a -> s{_mdDescription = a}) + +instance FromJSON MetricDescriptor where + parseJSON + = withObject "MetricDescriptor" + (\ o -> + MetricDescriptor <$> + (o .:? "project") <*> (o .:? "typeDescriptor") <*> + (o .:? "name") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON MetricDescriptor where + toJSON MetricDescriptor{..} + = object + (catMaybes + [("project" .=) <$> _mdProject, + ("typeDescriptor" .=) <$> _mdTypeDescriptor, + ("name" .=) <$> _mdName, ("labels" .=) <$> _mdLabels, + ("description" .=) <$> _mdDescription]) + +-- | A label in a metric is a description of this metric, including the key +-- of this description (what the description is), and the value for this +-- description. +-- +-- /See:/ 'metricDescriptorLabelDescriptor' smart constructor. +data MetricDescriptorLabelDescriptor = MetricDescriptorLabelDescriptor + { _mdldKey :: !(Maybe Text) + , _mdldDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptorLabelDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdldKey' +-- +-- * 'mdldDescription' +metricDescriptorLabelDescriptor + :: MetricDescriptorLabelDescriptor +metricDescriptorLabelDescriptor = + MetricDescriptorLabelDescriptor + { _mdldKey = Nothing + , _mdldDescription = Nothing + } + +-- | Label key. +mdldKey :: Lens' MetricDescriptorLabelDescriptor (Maybe Text) +mdldKey = lens _mdldKey (\ s a -> s{_mdldKey = a}) + +-- | Label description. +mdldDescription :: Lens' MetricDescriptorLabelDescriptor (Maybe Text) +mdldDescription + = lens _mdldDescription + (\ s a -> s{_mdldDescription = a}) + +instance FromJSON MetricDescriptorLabelDescriptor + where + parseJSON + = withObject "MetricDescriptorLabelDescriptor" + (\ o -> + MetricDescriptorLabelDescriptor <$> + (o .:? "key") <*> (o .:? "description")) + +instance ToJSON MetricDescriptorLabelDescriptor where + toJSON MetricDescriptorLabelDescriptor{..} + = object + (catMaybes + [("key" .=) <$> _mdldKey, + ("description" .=) <$> _mdldDescription]) + +-- | The underflow bucket is a special bucket that does not have the +-- lowerBound field; it includes all of the events that are less than its +-- upper bound. +-- +-- /See:/ 'pointDistributionUnderflowBucket' smart constructor. +data PointDistributionUnderflowBucket = PointDistributionUnderflowBucket + { _pdubUpperBound :: !(Maybe Double) + , _pdubCount :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointDistributionUnderflowBucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdubUpperBound' +-- +-- * 'pdubCount' +pointDistributionUnderflowBucket + :: PointDistributionUnderflowBucket +pointDistributionUnderflowBucket = + PointDistributionUnderflowBucket + { _pdubUpperBound = Nothing + , _pdubCount = Nothing + } + +-- | The upper bound of the value interval of this bucket (exclusive). +pdubUpperBound :: Lens' PointDistributionUnderflowBucket (Maybe Double) +pdubUpperBound + = lens _pdubUpperBound + (\ s a -> s{_pdubUpperBound = a}) + +-- | The number of events whose values are in the interval defined by this +-- bucket. +pdubCount :: Lens' PointDistributionUnderflowBucket (Maybe Int64) +pdubCount + = lens _pdubCount (\ s a -> s{_pdubCount = a}) + +instance FromJSON PointDistributionUnderflowBucket + where + parseJSON + = withObject "PointDistributionUnderflowBucket" + (\ o -> + PointDistributionUnderflowBucket <$> + (o .:? "upperBound") <*> (o .:? "count")) + +instance ToJSON PointDistributionUnderflowBucket + where + toJSON PointDistributionUnderflowBucket{..} + = object + (catMaybes + [("upperBound" .=) <$> _pdubUpperBound, + ("count" .=) <$> _pdubCount]) + +-- | The request of cloudmonitoring.timeseries.write +-- +-- /See:/ 'writeTimeseriesRequest' smart constructor. +data WriteTimeseriesRequest = WriteTimeseriesRequest + { _wtrCommonLabels :: !(Maybe WriteTimeseriesRequestCommonLabels) + , _wtrTimeseries :: !(Maybe [Maybe TimeseriesPoint]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteTimeseriesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wtrCommonLabels' +-- +-- * 'wtrTimeseries' +writeTimeseriesRequest + :: WriteTimeseriesRequest +writeTimeseriesRequest = + WriteTimeseriesRequest + { _wtrCommonLabels = Nothing + , _wtrTimeseries = Nothing + } + +-- | The label\'s name. +wtrCommonLabels :: Lens' WriteTimeseriesRequest (Maybe WriteTimeseriesRequestCommonLabels) +wtrCommonLabels + = lens _wtrCommonLabels + (\ s a -> s{_wtrCommonLabels = a}) + +-- | Provide time series specific labels and the data points for each time +-- series. The labels in timeseries and the common_labels should form a +-- complete list of labels that required by the metric. +wtrTimeseries :: Lens' WriteTimeseriesRequest [Maybe TimeseriesPoint] +wtrTimeseries + = lens _wtrTimeseries + (\ s a -> s{_wtrTimeseries = a}) + . _Default + . _Coerce + +instance FromJSON WriteTimeseriesRequest where + parseJSON + = withObject "WriteTimeseriesRequest" + (\ o -> + WriteTimeseriesRequest <$> + (o .:? "commonLabels") <*> + (o .:? "timeseries" .!= mempty)) + +instance ToJSON WriteTimeseriesRequest where + toJSON WriteTimeseriesRequest{..} + = object + (catMaybes + [("commonLabels" .=) <$> _wtrCommonLabels, + ("timeseries" .=) <$> _wtrTimeseries]) + +-- | The response of cloudmonitoring.metricDescriptors.list. +-- +-- /See:/ 'listMetricDescriptorsResponse' smart constructor. +data ListMetricDescriptorsResponse = ListMetricDescriptorsResponse + { _lmdrMetrics :: !(Maybe [Maybe MetricDescriptor]) + , _lmdrNextPageToken :: !(Maybe Text) + , _lmdrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListMetricDescriptorsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmdrMetrics' +-- +-- * 'lmdrNextPageToken' +-- +-- * 'lmdrKind' +listMetricDescriptorsResponse + :: ListMetricDescriptorsResponse +listMetricDescriptorsResponse = + ListMetricDescriptorsResponse + { _lmdrMetrics = Nothing + , _lmdrNextPageToken = Nothing + , _lmdrKind = "cloudmonitoring#listMetricDescriptorsResponse" + } + +-- | The returned metric descriptors. +lmdrMetrics :: Lens' ListMetricDescriptorsResponse [Maybe MetricDescriptor] +lmdrMetrics + = lens _lmdrMetrics (\ s a -> s{_lmdrMetrics = a}) . + _Default + . _Coerce + +-- | Pagination token. If present, indicates that additional results are +-- available for retrieval. To access the results past the pagination +-- limit, pass this value to the pageToken query parameter. +lmdrNextPageToken :: Lens' ListMetricDescriptorsResponse (Maybe Text) +lmdrNextPageToken + = lens _lmdrNextPageToken + (\ s a -> s{_lmdrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listMetricDescriptorsResponse\". +lmdrKind :: Lens' ListMetricDescriptorsResponse Text +lmdrKind = lens _lmdrKind (\ s a -> s{_lmdrKind = a}) + +instance FromJSON ListMetricDescriptorsResponse where + parseJSON + = withObject "ListMetricDescriptorsResponse" + (\ o -> + ListMetricDescriptorsResponse <$> + (o .:? "metrics" .!= mempty) <*> + (o .:? "nextPageToken") + <*> + (o .:? "kind" .!= + "cloudmonitoring#listMetricDescriptorsResponse")) + +instance ToJSON ListMetricDescriptorsResponse where + toJSON ListMetricDescriptorsResponse{..} + = object + (catMaybes + [("metrics" .=) <$> _lmdrMetrics, + ("nextPageToken" .=) <$> _lmdrNextPageToken, + Just ("kind" .= _lmdrKind)]) + +-- | The request of cloudmonitoring.timeseriesDescriptors.list +-- +-- /See:/ 'listTimeseriesDescriptorsRequest' smart constructor. +newtype ListTimeseriesDescriptorsRequest = ListTimeseriesDescriptorsRequest + { _ltdrKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTimeseriesDescriptorsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltdrKind' +listTimeseriesDescriptorsRequest + :: ListTimeseriesDescriptorsRequest +listTimeseriesDescriptorsRequest = + ListTimeseriesDescriptorsRequest + { _ltdrKind = "cloudmonitoring#listTimeseriesDescriptorsRequest" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listTimeseriesDescriptorsRequest\". +ltdrKind :: Lens' ListTimeseriesDescriptorsRequest Text +ltdrKind = lens _ltdrKind (\ s a -> s{_ltdrKind = a}) + +instance FromJSON ListTimeseriesDescriptorsRequest + where + parseJSON + = withObject "ListTimeseriesDescriptorsRequest" + (\ o -> + ListTimeseriesDescriptorsRequest <$> + (o .:? "kind" .!= + "cloudmonitoring#listTimeseriesDescriptorsRequest")) + +instance ToJSON ListTimeseriesDescriptorsRequest + where + toJSON ListTimeseriesDescriptorsRequest{..} + = object (catMaybes [Just ("kind" .= _ltdrKind)]) + +-- | The response of cloudmonitoring.timeseries.write +-- +-- /See:/ 'writeTimeseriesResponse' smart constructor. +newtype WriteTimeseriesResponse = WriteTimeseriesResponse + { _wtrKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WriteTimeseriesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wtrKind' +writeTimeseriesResponse + :: WriteTimeseriesResponse +writeTimeseriesResponse = + WriteTimeseriesResponse + { _wtrKind = "cloudmonitoring#writeTimeseriesResponse" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#writeTimeseriesResponse\". +wtrKind :: Lens' WriteTimeseriesResponse Text +wtrKind = lens _wtrKind (\ s a -> s{_wtrKind = a}) + +instance FromJSON WriteTimeseriesResponse where + parseJSON + = withObject "WriteTimeseriesResponse" + (\ o -> + WriteTimeseriesResponse <$> + (o .:? "kind" .!= + "cloudmonitoring#writeTimeseriesResponse")) + +instance ToJSON WriteTimeseriesResponse where + toJSON WriteTimeseriesResponse{..} + = object (catMaybes [Just ("kind" .= _wtrKind)]) + +-- | The histogram\'s bucket. Buckets that form the histogram of a +-- distribution value. If the upper bound of a bucket, say U1, does not +-- equal the lower bound of the next bucket, say L2, this means that there +-- is no event in [U1, L2). +-- +-- /See:/ 'pointDistributionBucket' smart constructor. +data PointDistributionBucket = PointDistributionBucket + { _pdbUpperBound :: !(Maybe Double) + , _pdbCount :: !(Maybe Int64) + , _pdbLowerBound :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointDistributionBucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdbUpperBound' +-- +-- * 'pdbCount' +-- +-- * 'pdbLowerBound' +pointDistributionBucket + :: PointDistributionBucket +pointDistributionBucket = + PointDistributionBucket + { _pdbUpperBound = Nothing + , _pdbCount = Nothing + , _pdbLowerBound = Nothing + } + +-- | The upper bound of the value interval of this bucket (exclusive). +pdbUpperBound :: Lens' PointDistributionBucket (Maybe Double) +pdbUpperBound + = lens _pdbUpperBound + (\ s a -> s{_pdbUpperBound = a}) + +-- | The number of events whose values are in the interval defined by this +-- bucket. +pdbCount :: Lens' PointDistributionBucket (Maybe Int64) +pdbCount = lens _pdbCount (\ s a -> s{_pdbCount = a}) + +-- | The lower bound of the value interval of this bucket (inclusive). +pdbLowerBound :: Lens' PointDistributionBucket (Maybe Double) +pdbLowerBound + = lens _pdbLowerBound + (\ s a -> s{_pdbLowerBound = a}) + +instance FromJSON PointDistributionBucket where + parseJSON + = withObject "PointDistributionBucket" + (\ o -> + PointDistributionBucket <$> + (o .:? "upperBound") <*> (o .:? "count") <*> + (o .:? "lowerBound")) + +instance ToJSON PointDistributionBucket where + toJSON PointDistributionBucket{..} + = object + (catMaybes + [("upperBound" .=) <$> _pdbUpperBound, + ("count" .=) <$> _pdbCount, + ("lowerBound" .=) <$> _pdbLowerBound]) + +-- +-- /See:/ 'timeseriesDescriptorLabel' smart constructor. +data TimeseriesDescriptorLabel = TimeseriesDescriptorLabel + { _tdlValue :: !(Maybe Text) + , _tdlKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesDescriptorLabel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdlValue' +-- +-- * 'tdlKey' +timeseriesDescriptorLabel + :: TimeseriesDescriptorLabel +timeseriesDescriptorLabel = + TimeseriesDescriptorLabel + { _tdlValue = Nothing + , _tdlKey = Nothing + } + +-- | The label\'s value. +tdlValue :: Lens' TimeseriesDescriptorLabel (Maybe Text) +tdlValue = lens _tdlValue (\ s a -> s{_tdlValue = a}) + +-- | The label\'s name. +tdlKey :: Lens' TimeseriesDescriptorLabel (Maybe Text) +tdlKey = lens _tdlKey (\ s a -> s{_tdlKey = a}) + +instance FromJSON TimeseriesDescriptorLabel where + parseJSON + = withObject "TimeseriesDescriptorLabel" + (\ o -> + TimeseriesDescriptorLabel <$> + (o .:? "value") <*> (o .:? "key")) + +instance ToJSON TimeseriesDescriptorLabel where + toJSON TimeseriesDescriptorLabel{..} + = object + (catMaybes + [("value" .=) <$> _tdlValue, ("key" .=) <$> _tdlKey]) + +-- | Distribution data point value type. When writing distribution points, +-- try to be consistent with the boundaries of your buckets. If you must +-- modify the bucket boundaries, then do so by merging, partitioning, or +-- appending rather than skewing them. +-- +-- /See:/ 'pointDistribution' smart constructor. +data PointDistribution = PointDistribution + { _pdOverflowBucket :: !(Maybe (Maybe PointDistributionOverflowBucket)) + , _pdBuckets :: !(Maybe [Maybe PointDistributionBucket]) + , _pdUnderflowBucket :: !(Maybe (Maybe PointDistributionUnderflowBucket)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointDistribution' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdOverflowBucket' +-- +-- * 'pdBuckets' +-- +-- * 'pdUnderflowBucket' +pointDistribution + :: PointDistribution +pointDistribution = + PointDistribution + { _pdOverflowBucket = Nothing + , _pdBuckets = Nothing + , _pdUnderflowBucket = Nothing + } + +-- | The overflow bucket. +pdOverflowBucket :: Lens' PointDistribution (Maybe (Maybe PointDistributionOverflowBucket)) +pdOverflowBucket + = lens _pdOverflowBucket + (\ s a -> s{_pdOverflowBucket = a}) + +-- | The finite buckets. +pdBuckets :: Lens' PointDistribution [Maybe PointDistributionBucket] +pdBuckets + = lens _pdBuckets (\ s a -> s{_pdBuckets = a}) . + _Default + . _Coerce + +-- | The underflow bucket. +pdUnderflowBucket :: Lens' PointDistribution (Maybe (Maybe PointDistributionUnderflowBucket)) +pdUnderflowBucket + = lens _pdUnderflowBucket + (\ s a -> s{_pdUnderflowBucket = a}) + +instance FromJSON PointDistribution where + parseJSON + = withObject "PointDistribution" + (\ o -> + PointDistribution <$> + (o .:? "overflowBucket") <*> + (o .:? "buckets" .!= mempty) + <*> (o .:? "underflowBucket")) + +instance ToJSON PointDistribution where + toJSON PointDistribution{..} + = object + (catMaybes + [("overflowBucket" .=) <$> _pdOverflowBucket, + ("buckets" .=) <$> _pdBuckets, + ("underflowBucket" .=) <$> _pdUnderflowBucket]) + +-- | Point is a single point in a time series. It consists of a start time, +-- an end time, and a value. +-- +-- /See:/ 'point' smart constructor. +data Point = Point + { _pBoolValue :: !(Maybe Bool) + , _pStart :: !(Maybe UTCTime) + , _pDoubleValue :: !(Maybe Double) + , _pStringValue :: !(Maybe Text) + , _pDistributionValue :: !(Maybe (Maybe PointDistribution)) + , _pEnd :: !(Maybe UTCTime) + , _pInt64Value :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Point' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pBoolValue' +-- +-- * 'pStart' +-- +-- * 'pDoubleValue' +-- +-- * 'pStringValue' +-- +-- * 'pDistributionValue' +-- +-- * 'pEnd' +-- +-- * 'pInt64Value' +point + :: Point +point = + Point + { _pBoolValue = Nothing + , _pStart = Nothing + , _pDoubleValue = Nothing + , _pStringValue = Nothing + , _pDistributionValue = Nothing + , _pEnd = Nothing + , _pInt64Value = Nothing + } + +-- | The value of this data point. Either \"true\" or \"false\". +pBoolValue :: Lens' Point (Maybe Bool) +pBoolValue + = lens _pBoolValue (\ s a -> s{_pBoolValue = a}) + +-- | The interval [start, end] is the time period to which the point\'s value +-- applies. For gauge metrics, whose values are instantaneous measurements, +-- this interval should be empty (start should equal end). For cumulative +-- metrics (of which deltas and rates are special cases), the interval +-- should be non-empty. Both start and end are RFC 3339 strings. +pStart :: Lens' Point (Maybe UTCTime) +pStart = lens _pStart (\ s a -> s{_pStart = a}) + +-- | The value of this data point as a double-precision floating-point +-- number. +pDoubleValue :: Lens' Point (Maybe Double) +pDoubleValue + = lens _pDoubleValue (\ s a -> s{_pDoubleValue = a}) + +-- | The value of this data point in string format. +pStringValue :: Lens' Point (Maybe Text) +pStringValue + = lens _pStringValue (\ s a -> s{_pStringValue = a}) + +-- | The value of this data point as a distribution. A distribution value can +-- contain a list of buckets and\/or an underflowBucket and an +-- overflowBucket. The values of these points can be used to create a +-- histogram. +pDistributionValue :: Lens' Point (Maybe (Maybe PointDistribution)) +pDistributionValue + = lens _pDistributionValue + (\ s a -> s{_pDistributionValue = a}) + +-- | The interval [start, end] is the time period to which the point\'s value +-- applies. For gauge metrics, whose values are instantaneous measurements, +-- this interval should be empty (start should equal end). For cumulative +-- metrics (of which deltas and rates are special cases), the interval +-- should be non-empty. Both start and end are RFC 3339 strings. +pEnd :: Lens' Point (Maybe UTCTime) +pEnd = lens _pEnd (\ s a -> s{_pEnd = a}) + +-- | The value of this data point as a 64-bit integer. +pInt64Value :: Lens' Point (Maybe Int64) +pInt64Value + = lens _pInt64Value (\ s a -> s{_pInt64Value = a}) + +instance FromJSON Point where + parseJSON + = withObject "Point" + (\ o -> + Point <$> + (o .:? "boolValue") <*> (o .:? "start") <*> + (o .:? "doubleValue") + <*> (o .:? "stringValue") + <*> (o .:? "distributionValue") + <*> (o .:? "end") + <*> (o .:? "int64Value")) + +instance ToJSON Point where + toJSON Point{..} + = object + (catMaybes + [("boolValue" .=) <$> _pBoolValue, + ("start" .=) <$> _pStart, + ("doubleValue" .=) <$> _pDoubleValue, + ("stringValue" .=) <$> _pStringValue, + ("distributionValue" .=) <$> _pDistributionValue, + ("end" .=) <$> _pEnd, + ("int64Value" .=) <$> _pInt64Value]) + +-- | The overflow bucket is a special bucket that does not have the +-- upperBound field; it includes all of the events that are no less than +-- its lower bound. +-- +-- /See:/ 'pointDistributionOverflowBucket' smart constructor. +data PointDistributionOverflowBucket = PointDistributionOverflowBucket + { _pdobCount :: !(Maybe Int64) + , _pdobLowerBound :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PointDistributionOverflowBucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdobCount' +-- +-- * 'pdobLowerBound' +pointDistributionOverflowBucket + :: PointDistributionOverflowBucket +pointDistributionOverflowBucket = + PointDistributionOverflowBucket + { _pdobCount = Nothing + , _pdobLowerBound = Nothing + } + +-- | The number of events whose values are in the interval defined by this +-- bucket. +pdobCount :: Lens' PointDistributionOverflowBucket (Maybe Int64) +pdobCount + = lens _pdobCount (\ s a -> s{_pdobCount = a}) + +-- | The lower bound of the value interval of this bucket (inclusive). +pdobLowerBound :: Lens' PointDistributionOverflowBucket (Maybe Double) +pdobLowerBound + = lens _pdobLowerBound + (\ s a -> s{_pdobLowerBound = a}) + +instance FromJSON PointDistributionOverflowBucket + where + parseJSON + = withObject "PointDistributionOverflowBucket" + (\ o -> + PointDistributionOverflowBucket <$> + (o .:? "count") <*> (o .:? "lowerBound")) + +instance ToJSON PointDistributionOverflowBucket where + toJSON PointDistributionOverflowBucket{..} + = object + (catMaybes + [("count" .=) <$> _pdobCount, + ("lowerBound" .=) <$> _pdobLowerBound]) + +-- | The response of cloudmonitoring.timeseriesDescriptors.list +-- +-- /See:/ 'listTimeseriesDescriptorsResponse' smart constructor. +data ListTimeseriesDescriptorsResponse = ListTimeseriesDescriptorsResponse + { _lNextPageToken :: !(Maybe Text) + , _lKind :: !Text + , _lOldest :: !(Maybe UTCTime) + , _lYoungest :: !(Maybe UTCTime) + , _lTimeseries :: !(Maybe [Maybe TimeseriesDescriptor]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTimeseriesDescriptorsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lNextPageToken' +-- +-- * 'lKind' +-- +-- * 'lOldest' +-- +-- * 'lYoungest' +-- +-- * 'lTimeseries' +listTimeseriesDescriptorsResponse + :: ListTimeseriesDescriptorsResponse +listTimeseriesDescriptorsResponse = + ListTimeseriesDescriptorsResponse + { _lNextPageToken = Nothing + , _lKind = "cloudmonitoring#listTimeseriesDescriptorsResponse" + , _lOldest = Nothing + , _lYoungest = Nothing + , _lTimeseries = Nothing + } + +-- | Pagination token. If present, indicates that additional results are +-- available for retrieval. To access the results past the pagination +-- limit, set this value to the pageToken query parameter. +lNextPageToken :: Lens' ListTimeseriesDescriptorsResponse (Maybe Text) +lNextPageToken + = lens _lNextPageToken + (\ s a -> s{_lNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listTimeseriesDescriptorsResponse\". +lKind :: Lens' ListTimeseriesDescriptorsResponse Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | The oldest timestamp of the interval of this query, as an RFC 3339 +-- string. +lOldest :: Lens' ListTimeseriesDescriptorsResponse (Maybe UTCTime) +lOldest = lens _lOldest (\ s a -> s{_lOldest = a}) + +-- | The youngest timestamp of the interval of this query, as an RFC 3339 +-- string. +lYoungest :: Lens' ListTimeseriesDescriptorsResponse (Maybe UTCTime) +lYoungest + = lens _lYoungest (\ s a -> s{_lYoungest = a}) + +-- | The returned time series descriptors. +lTimeseries :: Lens' ListTimeseriesDescriptorsResponse [Maybe TimeseriesDescriptor] +lTimeseries + = lens _lTimeseries (\ s a -> s{_lTimeseries = a}) . + _Default + . _Coerce + +instance FromJSON ListTimeseriesDescriptorsResponse + where + parseJSON + = withObject "ListTimeseriesDescriptorsResponse" + (\ o -> + ListTimeseriesDescriptorsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "cloudmonitoring#listTimeseriesDescriptorsResponse") + <*> (o .:? "oldest") + <*> (o .:? "youngest") + <*> (o .:? "timeseries" .!= mempty)) + +instance ToJSON ListTimeseriesDescriptorsResponse + where + toJSON ListTimeseriesDescriptorsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lNextPageToken, + Just ("kind" .= _lKind), ("oldest" .=) <$> _lOldest, + ("youngest" .=) <$> _lYoungest, + ("timeseries" .=) <$> _lTimeseries]) + +-- | The request of cloudmonitoring.metricDescriptors.list. +-- +-- /See:/ 'listMetricDescriptorsRequest' smart constructor. +newtype ListMetricDescriptorsRequest = ListMetricDescriptorsRequest + { _lisKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListMetricDescriptorsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lisKind' +listMetricDescriptorsRequest + :: ListMetricDescriptorsRequest +listMetricDescriptorsRequest = + ListMetricDescriptorsRequest + { _lisKind = "cloudmonitoring#listMetricDescriptorsRequest" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listMetricDescriptorsRequest\". +lisKind :: Lens' ListMetricDescriptorsRequest Text +lisKind = lens _lisKind (\ s a -> s{_lisKind = a}) + +instance FromJSON ListMetricDescriptorsRequest where + parseJSON + = withObject "ListMetricDescriptorsRequest" + (\ o -> + ListMetricDescriptorsRequest <$> + (o .:? "kind" .!= + "cloudmonitoring#listMetricDescriptorsRequest")) + +instance ToJSON ListMetricDescriptorsRequest where + toJSON ListMetricDescriptorsRequest{..} + = object (catMaybes [Just ("kind" .= _lisKind)]) + +-- | When writing time series, TimeseriesPoint should be used instead of +-- Timeseries, to enforce single point for each time series in the +-- timeseries.write request. +-- +-- /See:/ 'timeseriesPoint' smart constructor. +data TimeseriesPoint = TimeseriesPoint + { _tpPoint :: !(Maybe (Maybe Point)) + , _tpTimeseriesDesc :: !(Maybe (Maybe TimeseriesDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpPoint' +-- +-- * 'tpTimeseriesDesc' +timeseriesPoint + :: TimeseriesPoint +timeseriesPoint = + TimeseriesPoint + { _tpPoint = Nothing + , _tpTimeseriesDesc = Nothing + } + +-- | The data point in this time series snapshot. +tpPoint :: Lens' TimeseriesPoint (Maybe (Maybe Point)) +tpPoint = lens _tpPoint (\ s a -> s{_tpPoint = a}) + +-- | The descriptor of this time series. +tpTimeseriesDesc :: Lens' TimeseriesPoint (Maybe (Maybe TimeseriesDescriptor)) +tpTimeseriesDesc + = lens _tpTimeseriesDesc + (\ s a -> s{_tpTimeseriesDesc = a}) + +instance FromJSON TimeseriesPoint where + parseJSON + = withObject "TimeseriesPoint" + (\ o -> + TimeseriesPoint <$> + (o .:? "point") <*> (o .:? "timeseriesDesc")) + +instance ToJSON TimeseriesPoint where + toJSON TimeseriesPoint{..} + = object + (catMaybes + [("point" .=) <$> _tpPoint, + ("timeseriesDesc" .=) <$> _tpTimeseriesDesc]) + +-- | TimeseriesDescriptor identifies a single time series. +-- +-- /See:/ 'timeseriesDescriptor' smart constructor. +data TimeseriesDescriptor = TimeseriesDescriptor + { _tdProject :: !(Maybe Text) + , _tdMetric :: !(Maybe Text) + , _tdLabels :: !(Maybe TimeseriesDescriptorLabels) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdProject' +-- +-- * 'tdMetric' +-- +-- * 'tdLabels' +timeseriesDescriptor + :: TimeseriesDescriptor +timeseriesDescriptor = + TimeseriesDescriptor + { _tdProject = Nothing + , _tdMetric = Nothing + , _tdLabels = Nothing + } + +-- | The Developers Console project number to which this time series belongs. +tdProject :: Lens' TimeseriesDescriptor (Maybe Text) +tdProject + = lens _tdProject (\ s a -> s{_tdProject = a}) + +-- | The name of the metric. +tdMetric :: Lens' TimeseriesDescriptor (Maybe Text) +tdMetric = lens _tdMetric (\ s a -> s{_tdMetric = a}) + +-- | The label\'s name. +tdLabels :: Lens' TimeseriesDescriptor (Maybe TimeseriesDescriptorLabels) +tdLabels = lens _tdLabels (\ s a -> s{_tdLabels = a}) + +instance FromJSON TimeseriesDescriptor where + parseJSON + = withObject "TimeseriesDescriptor" + (\ o -> + TimeseriesDescriptor <$> + (o .:? "project") <*> (o .:? "metric") <*> + (o .:? "labels")) + +instance ToJSON TimeseriesDescriptor where + toJSON TimeseriesDescriptor{..} + = object + (catMaybes + [("project" .=) <$> _tdProject, + ("metric" .=) <$> _tdMetric, + ("labels" .=) <$> _tdLabels]) + +-- | The request of cloudmonitoring.timeseries.list +-- +-- /See:/ 'listTimeseriesRequest' smart constructor. +newtype ListTimeseriesRequest = ListTimeseriesRequest + { _ltrtKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTimeseriesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrtKind' +listTimeseriesRequest + :: ListTimeseriesRequest +listTimeseriesRequest = + ListTimeseriesRequest + { _ltrtKind = "cloudmonitoring#listTimeseriesRequest" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#listTimeseriesRequest\". +ltrtKind :: Lens' ListTimeseriesRequest Text +ltrtKind = lens _ltrtKind (\ s a -> s{_ltrtKind = a}) + +instance FromJSON ListTimeseriesRequest where + parseJSON + = withObject "ListTimeseriesRequest" + (\ o -> + ListTimeseriesRequest <$> + (o .:? "kind" .!= + "cloudmonitoring#listTimeseriesRequest")) + +instance ToJSON ListTimeseriesRequest where + toJSON ListTimeseriesRequest{..} + = object (catMaybes [Just ("kind" .= _ltrtKind)]) + +-- | The response of cloudmonitoring.metricDescriptors.delete. +-- +-- /See:/ 'deleteMetricDescriptorResponse' smart constructor. +newtype DeleteMetricDescriptorResponse = DeleteMetricDescriptorResponse + { _dmdrKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeleteMetricDescriptorResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dmdrKind' +deleteMetricDescriptorResponse + :: DeleteMetricDescriptorResponse +deleteMetricDescriptorResponse = + DeleteMetricDescriptorResponse + { _dmdrKind = "cloudmonitoring#deleteMetricDescriptorResponse" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"cloudmonitoring#deleteMetricDescriptorResponse\". +dmdrKind :: Lens' DeleteMetricDescriptorResponse Text +dmdrKind = lens _dmdrKind (\ s a -> s{_dmdrKind = a}) + +instance FromJSON DeleteMetricDescriptorResponse + where + parseJSON + = withObject "DeleteMetricDescriptorResponse" + (\ o -> + DeleteMetricDescriptorResponse <$> + (o .:? "kind" .!= + "cloudmonitoring#deleteMetricDescriptorResponse")) + +instance ToJSON DeleteMetricDescriptorResponse where + toJSON DeleteMetricDescriptorResponse{..} + = object (catMaybes [Just ("kind" .= _dmdrKind)]) + +-- | The monitoring data is organized as metrics and stored as data points +-- that are recorded over time. Each data point represents information like +-- the CPU utilization of your virtual machine. A historical record of +-- these data points is called a time series. +-- +-- /See:/ 'timeseries' smart constructor. +data Timeseries = Timeseries + { _tPoints :: !(Maybe [Maybe Point]) + , _tTimeseriesDesc :: !(Maybe (Maybe TimeseriesDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Timeseries' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tPoints' +-- +-- * 'tTimeseriesDesc' +timeseries + :: Timeseries +timeseries = + Timeseries + { _tPoints = Nothing + , _tTimeseriesDesc = Nothing + } + +-- | The data points of this time series. The points are listed in order of +-- their end timestamp, from younger to older. +tPoints :: Lens' Timeseries [Maybe Point] +tPoints + = lens _tPoints (\ s a -> s{_tPoints = a}) . _Default + . _Coerce + +-- | The descriptor of this time series. +tTimeseriesDesc :: Lens' Timeseries (Maybe (Maybe TimeseriesDescriptor)) +tTimeseriesDesc + = lens _tTimeseriesDesc + (\ s a -> s{_tTimeseriesDesc = a}) + +instance FromJSON Timeseries where + parseJSON + = withObject "Timeseries" + (\ o -> + Timeseries <$> + (o .:? "points" .!= mempty) <*> + (o .:? "timeseriesDesc")) + +instance ToJSON Timeseries where + toJSON Timeseries{..} + = object + (catMaybes + [("points" .=) <$> _tPoints, + ("timeseriesDesc" .=) <$> _tTimeseriesDesc]) diff --git a/gogol-monitoring/gen/Network/Google/Monitoring/Types/Sum.hs b/gogol-monitoring/gen/Network/Google/Monitoring/Types/Sum.hs new file mode 100644 index 000000000..6eba15255 --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Monitoring/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Monitoring.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Monitoring.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Create.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Create.hs new file mode 100644 index 000000000..065dd538f --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Create.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new metric. +-- +-- /See:/ for @CloudmonitoringMetricDescriptorsCreate@. +module Cloudmonitoring.MetricDescriptors.Create + ( + -- * REST Resource + MetricDescriptorsCreateAPI + + -- * Creating a Request + , metricDescriptorsCreate + , MetricDescriptorsCreate + + -- * Request Lenses + , mdcQuotaUser + , mdcPrettyPrint + , mdcProject + , mdcUserIp + , mdcKey + , mdcOauthToken + , mdcFields + , mdcAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringMetricDescriptorsCreate@ which the +-- 'MetricDescriptorsCreate' request conforms to. +type MetricDescriptorsCreateAPI = + Capture "project" Text :> + "metricDescriptors" :> Post '[JSON] MetricDescriptor + +-- | Create a new metric. +-- +-- /See:/ 'metricDescriptorsCreate' smart constructor. +data MetricDescriptorsCreate = MetricDescriptorsCreate + { _mdcQuotaUser :: !(Maybe Text) + , _mdcPrettyPrint :: !Bool + , _mdcProject :: !Text + , _mdcUserIp :: !(Maybe Text) + , _mdcKey :: !(Maybe Text) + , _mdcOauthToken :: !(Maybe Text) + , _mdcFields :: !(Maybe Text) + , _mdcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptorsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdcQuotaUser' +-- +-- * 'mdcPrettyPrint' +-- +-- * 'mdcProject' +-- +-- * 'mdcUserIp' +-- +-- * 'mdcKey' +-- +-- * 'mdcOauthToken' +-- +-- * 'mdcFields' +-- +-- * 'mdcAlt' +metricDescriptorsCreate + :: Text -- ^ 'project' + -> MetricDescriptorsCreate +metricDescriptorsCreate pMdcProject_ = + MetricDescriptorsCreate + { _mdcQuotaUser = Nothing + , _mdcPrettyPrint = True + , _mdcProject = pMdcProject_ + , _mdcUserIp = Nothing + , _mdcKey = Nothing + , _mdcOauthToken = Nothing + , _mdcFields = Nothing + , _mdcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mdcQuotaUser :: Lens' MetricDescriptorsCreate' (Maybe Text) +mdcQuotaUser + = lens _mdcQuotaUser (\ s a -> s{_mdcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mdcPrettyPrint :: Lens' MetricDescriptorsCreate' Bool +mdcPrettyPrint + = lens _mdcPrettyPrint + (\ s a -> s{_mdcPrettyPrint = a}) + +-- | The project id. The value can be the numeric project ID or string-based +-- project name. +mdcProject :: Lens' MetricDescriptorsCreate' Text +mdcProject + = lens _mdcProject (\ s a -> s{_mdcProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mdcUserIp :: Lens' MetricDescriptorsCreate' (Maybe Text) +mdcUserIp + = lens _mdcUserIp (\ s a -> s{_mdcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mdcKey :: Lens' MetricDescriptorsCreate' (Maybe Text) +mdcKey = lens _mdcKey (\ s a -> s{_mdcKey = a}) + +-- | OAuth 2.0 token for the current user. +mdcOauthToken :: Lens' MetricDescriptorsCreate' (Maybe Text) +mdcOauthToken + = lens _mdcOauthToken + (\ s a -> s{_mdcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mdcFields :: Lens' MetricDescriptorsCreate' (Maybe Text) +mdcFields + = lens _mdcFields (\ s a -> s{_mdcFields = a}) + +-- | Data format for the response. +mdcAlt :: Lens' MetricDescriptorsCreate' Text +mdcAlt = lens _mdcAlt (\ s a -> s{_mdcAlt = a}) + +instance GoogleRequest MetricDescriptorsCreate' where + type Rs MetricDescriptorsCreate' = MetricDescriptor + request = requestWithRoute defReq monitoringURL + requestWithRoute r u MetricDescriptorsCreate{..} + = go _mdcQuotaUser _mdcPrettyPrint _mdcProject + _mdcUserIp + _mdcKey + _mdcOauthToken + _mdcFields + _mdcAlt + where go + = clientWithRoute + (Proxy :: Proxy MetricDescriptorsCreateAPI) + r + u diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Delete.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Delete.hs new file mode 100644 index 000000000..8b86e452d --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/Delete.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete an existing metric. +-- +-- /See:/ for @CloudmonitoringMetricDescriptorsDelete@. +module Cloudmonitoring.MetricDescriptors.Delete + ( + -- * REST Resource + MetricDescriptorsDeleteAPI + + -- * Creating a Request + , metricDescriptorsDelete + , MetricDescriptorsDelete + + -- * Request Lenses + , mddQuotaUser + , mddPrettyPrint + , mddProject + , mddUserIp + , mddMetric + , mddKey + , mddOauthToken + , mddFields + , mddAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringMetricDescriptorsDelete@ which the +-- 'MetricDescriptorsDelete' request conforms to. +type MetricDescriptorsDeleteAPI = + Capture "project" Text :> + "metricDescriptors" :> + Capture "metric" Text :> + Delete '[JSON] DeleteMetricDescriptorResponse + +-- | Delete an existing metric. +-- +-- /See:/ 'metricDescriptorsDelete' smart constructor. +data MetricDescriptorsDelete = MetricDescriptorsDelete + { _mddQuotaUser :: !(Maybe Text) + , _mddPrettyPrint :: !Bool + , _mddProject :: !Text + , _mddUserIp :: !(Maybe Text) + , _mddMetric :: !Text + , _mddKey :: !(Maybe Text) + , _mddOauthToken :: !(Maybe Text) + , _mddFields :: !(Maybe Text) + , _mddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptorsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mddQuotaUser' +-- +-- * 'mddPrettyPrint' +-- +-- * 'mddProject' +-- +-- * 'mddUserIp' +-- +-- * 'mddMetric' +-- +-- * 'mddKey' +-- +-- * 'mddOauthToken' +-- +-- * 'mddFields' +-- +-- * 'mddAlt' +metricDescriptorsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'metric' + -> MetricDescriptorsDelete +metricDescriptorsDelete pMddProject_ pMddMetric_ = + MetricDescriptorsDelete + { _mddQuotaUser = Nothing + , _mddPrettyPrint = True + , _mddProject = pMddProject_ + , _mddUserIp = Nothing + , _mddMetric = pMddMetric_ + , _mddKey = Nothing + , _mddOauthToken = Nothing + , _mddFields = Nothing + , _mddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mddQuotaUser :: Lens' MetricDescriptorsDelete' (Maybe Text) +mddQuotaUser + = lens _mddQuotaUser (\ s a -> s{_mddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mddPrettyPrint :: Lens' MetricDescriptorsDelete' Bool +mddPrettyPrint + = lens _mddPrettyPrint + (\ s a -> s{_mddPrettyPrint = a}) + +-- | The project ID to which the metric belongs. +mddProject :: Lens' MetricDescriptorsDelete' Text +mddProject + = lens _mddProject (\ s a -> s{_mddProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mddUserIp :: Lens' MetricDescriptorsDelete' (Maybe Text) +mddUserIp + = lens _mddUserIp (\ s a -> s{_mddUserIp = a}) + +-- | Name of the metric. +mddMetric :: Lens' MetricDescriptorsDelete' Text +mddMetric + = lens _mddMetric (\ s a -> s{_mddMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mddKey :: Lens' MetricDescriptorsDelete' (Maybe Text) +mddKey = lens _mddKey (\ s a -> s{_mddKey = a}) + +-- | OAuth 2.0 token for the current user. +mddOauthToken :: Lens' MetricDescriptorsDelete' (Maybe Text) +mddOauthToken + = lens _mddOauthToken + (\ s a -> s{_mddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mddFields :: Lens' MetricDescriptorsDelete' (Maybe Text) +mddFields + = lens _mddFields (\ s a -> s{_mddFields = a}) + +-- | Data format for the response. +mddAlt :: Lens' MetricDescriptorsDelete' Text +mddAlt = lens _mddAlt (\ s a -> s{_mddAlt = a}) + +instance GoogleRequest MetricDescriptorsDelete' where + type Rs MetricDescriptorsDelete' = + DeleteMetricDescriptorResponse + request = requestWithRoute defReq monitoringURL + requestWithRoute r u MetricDescriptorsDelete{..} + = go _mddQuotaUser _mddPrettyPrint _mddProject + _mddUserIp + _mddMetric + _mddKey + _mddOauthToken + _mddFields + _mddAlt + where go + = clientWithRoute + (Proxy :: Proxy MetricDescriptorsDeleteAPI) + r + u diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/List.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/List.hs new file mode 100644 index 000000000..def9178d0 --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/MetricDescriptors/List.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.MetricDescriptors.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List metric descriptors that match the query. If the query is not set, +-- then all of the metric descriptors will be returned. Large responses +-- will be paginated, use the nextPageToken returned in the response to +-- request subsequent pages of results by setting the pageToken query +-- parameter to the value of the nextPageToken. +-- +-- /See:/ for @CloudmonitoringMetricDescriptorsList@. +module Cloudmonitoring.MetricDescriptors.List + ( + -- * REST Resource + MetricDescriptorsListAPI + + -- * Creating a Request + , metricDescriptorsList + , MetricDescriptorsList + + -- * Request Lenses + , mdlQuotaUser + , mdlPrettyPrint + , mdlProject + , mdlUserIp + , mdlCount + , mdlKey + , mdlQuery + , mdlPageToken + , mdlOauthToken + , mdlFields + , mdlAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringMetricDescriptorsList@ which the +-- 'MetricDescriptorsList' request conforms to. +type MetricDescriptorsListAPI = + Capture "project" Text :> + "metricDescriptors" :> + QueryParam "count" Int32 :> + QueryParam "query" Text :> + QueryParam "pageToken" Text :> + Get '[JSON] ListMetricDescriptorsResponse + +-- | List metric descriptors that match the query. If the query is not set, +-- then all of the metric descriptors will be returned. Large responses +-- will be paginated, use the nextPageToken returned in the response to +-- request subsequent pages of results by setting the pageToken query +-- parameter to the value of the nextPageToken. +-- +-- /See:/ 'metricDescriptorsList' smart constructor. +data MetricDescriptorsList = MetricDescriptorsList + { _mdlQuotaUser :: !(Maybe Text) + , _mdlPrettyPrint :: !Bool + , _mdlProject :: !Text + , _mdlUserIp :: !(Maybe Text) + , _mdlCount :: !Int32 + , _mdlKey :: !(Maybe Text) + , _mdlQuery :: !(Maybe Text) + , _mdlPageToken :: !(Maybe Text) + , _mdlOauthToken :: !(Maybe Text) + , _mdlFields :: !(Maybe Text) + , _mdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MetricDescriptorsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdlQuotaUser' +-- +-- * 'mdlPrettyPrint' +-- +-- * 'mdlProject' +-- +-- * 'mdlUserIp' +-- +-- * 'mdlCount' +-- +-- * 'mdlKey' +-- +-- * 'mdlQuery' +-- +-- * 'mdlPageToken' +-- +-- * 'mdlOauthToken' +-- +-- * 'mdlFields' +-- +-- * 'mdlAlt' +metricDescriptorsList + :: Text -- ^ 'project' + -> MetricDescriptorsList +metricDescriptorsList pMdlProject_ = + MetricDescriptorsList + { _mdlQuotaUser = Nothing + , _mdlPrettyPrint = True + , _mdlProject = pMdlProject_ + , _mdlUserIp = Nothing + , _mdlCount = 100 + , _mdlKey = Nothing + , _mdlQuery = Nothing + , _mdlPageToken = Nothing + , _mdlOauthToken = Nothing + , _mdlFields = Nothing + , _mdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mdlQuotaUser :: Lens' MetricDescriptorsList' (Maybe Text) +mdlQuotaUser + = lens _mdlQuotaUser (\ s a -> s{_mdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mdlPrettyPrint :: Lens' MetricDescriptorsList' Bool +mdlPrettyPrint + = lens _mdlPrettyPrint + (\ s a -> s{_mdlPrettyPrint = a}) + +-- | The project id. The value can be the numeric project ID or string-based +-- project name. +mdlProject :: Lens' MetricDescriptorsList' Text +mdlProject + = lens _mdlProject (\ s a -> s{_mdlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mdlUserIp :: Lens' MetricDescriptorsList' (Maybe Text) +mdlUserIp + = lens _mdlUserIp (\ s a -> s{_mdlUserIp = a}) + +-- | Maximum number of metric descriptors per page. Used for pagination. If +-- not specified, count = 100. +mdlCount :: Lens' MetricDescriptorsList' Int32 +mdlCount = lens _mdlCount (\ s a -> s{_mdlCount = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mdlKey :: Lens' MetricDescriptorsList' (Maybe Text) +mdlKey = lens _mdlKey (\ s a -> s{_mdlKey = a}) + +-- | The query used to search against existing metrics. Separate keywords +-- with a space; the service joins all keywords with AND, meaning that all +-- keywords must match for a metric to be returned. If this field is +-- omitted, all metrics are returned. If an empty string is passed with +-- this field, no metrics are returned. +mdlQuery :: Lens' MetricDescriptorsList' (Maybe Text) +mdlQuery = lens _mdlQuery (\ s a -> s{_mdlQuery = a}) + +-- | The pagination token, which is used to page through large result sets. +-- Set this value to the value of the nextPageToken to retrieve the next +-- page of results. +mdlPageToken :: Lens' MetricDescriptorsList' (Maybe Text) +mdlPageToken + = lens _mdlPageToken (\ s a -> s{_mdlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +mdlOauthToken :: Lens' MetricDescriptorsList' (Maybe Text) +mdlOauthToken + = lens _mdlOauthToken + (\ s a -> s{_mdlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +mdlFields :: Lens' MetricDescriptorsList' (Maybe Text) +mdlFields + = lens _mdlFields (\ s a -> s{_mdlFields = a}) + +-- | Data format for the response. +mdlAlt :: Lens' MetricDescriptorsList' Text +mdlAlt = lens _mdlAlt (\ s a -> s{_mdlAlt = a}) + +instance GoogleRequest MetricDescriptorsList' where + type Rs MetricDescriptorsList' = + ListMetricDescriptorsResponse + request = requestWithRoute defReq monitoringURL + requestWithRoute r u MetricDescriptorsList{..} + = go _mdlQuotaUser _mdlPrettyPrint _mdlProject + _mdlUserIp + (Just _mdlCount) + _mdlKey + _mdlQuery + _mdlPageToken + _mdlOauthToken + _mdlFields + _mdlAlt + where go + = clientWithRoute + (Proxy :: Proxy MetricDescriptorsListAPI) + r + u diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/List.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/List.hs new file mode 100644 index 000000000..18cc8eec0 --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/List.hs @@ -0,0 +1,293 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.Timeseries.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the data points of the time series that match the metric and labels +-- values and that have data points in the interval. Large responses are +-- paginated; use the nextPageToken returned in the response to request +-- subsequent pages of results by setting the pageToken query parameter to +-- the value of the nextPageToken. +-- +-- /See:/ for @CloudmonitoringTimeseriesList@. +module Cloudmonitoring.Timeseries.List + ( + -- * REST Resource + TimeseriesListAPI + + -- * Creating a Request + , timeseriesList + , TimeseriesList + + -- * Request Lenses + , tlWindow + , tlQuotaUser + , tlPrettyPrint + , tlProject + , tlUserIp + , tlCount + , tlAggregator + , tlTimespan + , tlMetric + , tlKey + , tlOldest + , tlLabels + , tlPageToken + , tlYoungest + , tlOauthToken + , tlFields + , tlAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringTimeseriesList@ which the +-- 'TimeseriesList' request conforms to. +type TimeseriesListAPI = + Capture "project" Text :> + "timeseries" :> + Capture "metric" Text :> + QueryParam "window" Text :> + QueryParam "count" Int32 :> + QueryParam "aggregator" Text :> + QueryParam "timespan" Text :> + QueryParam "oldest" Text :> + QueryParams "labels" Text :> + QueryParam "pageToken" Text :> + QueryParam "youngest" Text :> + Get '[JSON] ListTimeseriesResponse + +-- | List the data points of the time series that match the metric and labels +-- values and that have data points in the interval. Large responses are +-- paginated; use the nextPageToken returned in the response to request +-- subsequent pages of results by setting the pageToken query parameter to +-- the value of the nextPageToken. +-- +-- /See:/ 'timeseriesList' smart constructor. +data TimeseriesList = TimeseriesList + { _tlWindow :: !(Maybe Text) + , _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlProject :: !Text + , _tlUserIp :: !(Maybe Text) + , _tlCount :: !Int32 + , _tlAggregator :: !(Maybe Text) + , _tlTimespan :: !(Maybe Text) + , _tlMetric :: !Text + , _tlKey :: !(Maybe Text) + , _tlOldest :: !(Maybe Text) + , _tlLabels :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlYoungest :: !Text + , _tlOauthToken :: !(Maybe Text) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlWindow' +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlProject' +-- +-- * 'tlUserIp' +-- +-- * 'tlCount' +-- +-- * 'tlAggregator' +-- +-- * 'tlTimespan' +-- +-- * 'tlMetric' +-- +-- * 'tlKey' +-- +-- * 'tlOldest' +-- +-- * 'tlLabels' +-- +-- * 'tlPageToken' +-- +-- * 'tlYoungest' +-- +-- * 'tlOauthToken' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +timeseriesList + :: Text -- ^ 'project' + -> Text -- ^ 'metric' + -> Text -- ^ 'youngest' + -> TimeseriesList +timeseriesList pTlProject_ pTlMetric_ pTlYoungest_ = + TimeseriesList + { _tlWindow = Nothing + , _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlProject = pTlProject_ + , _tlUserIp = Nothing + , _tlCount = 6000 + , _tlAggregator = Nothing + , _tlTimespan = Nothing + , _tlMetric = pTlMetric_ + , _tlKey = Nothing + , _tlOldest = Nothing + , _tlLabels = Nothing + , _tlPageToken = Nothing + , _tlYoungest = pTlYoungest_ + , _tlOauthToken = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | The sampling window. At most one data point will be returned for each +-- window in the requested time interval. This parameter is only valid for +-- non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: +-- week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is +-- not allowed; you should use 17d instead. +tlWindow :: Lens' TimeseriesList' (Maybe Text) +tlWindow = lens _tlWindow (\ s a -> s{_tlWindow = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TimeseriesList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TimeseriesList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | The project ID to which this time series belongs. The value can be the +-- numeric project ID or string-based project name. +tlProject :: Lens' TimeseriesList' Text +tlProject + = lens _tlProject (\ s a -> s{_tlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TimeseriesList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | Maximum number of data points per page, which is used for pagination of +-- results. +tlCount :: Lens' TimeseriesList' Int32 +tlCount = lens _tlCount (\ s a -> s{_tlCount = a}) + +-- | The aggregation function that will reduce the data points in each window +-- to a single point. This parameter is only valid for non-cumulative +-- metrics with a value type of INT64 or DOUBLE. +tlAggregator :: Lens' TimeseriesList' (Maybe Text) +tlAggregator + = lens _tlAggregator (\ s a -> s{_tlAggregator = a}) + +-- | Length of the time interval to query, which is an alternative way to +-- declare the interval: (youngest - timespan, youngest]. The timespan and +-- oldest parameters should not be used together. Units: - s: second - m: +-- minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit +-- is allowed, for example: 2w3d is not allowed; you should use 17d +-- instead. If neither oldest nor timespan is specified, the default time +-- interval will be (youngest - 4 hours, youngest]. +tlTimespan :: Lens' TimeseriesList' (Maybe Text) +tlTimespan + = lens _tlTimespan (\ s a -> s{_tlTimespan = a}) + +-- | Metric names are protocol-free URLs as listed in the Supported Metrics +-- page. For example, +-- compute.googleapis.com\/instance\/disk\/read_ops_count. +tlMetric :: Lens' TimeseriesList' Text +tlMetric = lens _tlMetric (\ s a -> s{_tlMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TimeseriesList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Start of the time interval (exclusive), which is expressed as an RFC +-- 3339 timestamp. If neither oldest nor timespan is specified, the default +-- time interval will be (youngest - 4 hours, youngest] +tlOldest :: Lens' TimeseriesList' (Maybe Text) +tlOldest = lens _tlOldest (\ s a -> s{_tlOldest = a}) + +-- | A collection of labels for the matching time series, which are +-- represented as: - key==value: key equals the value - key=~value: key +-- regex matches the value - key!=value: key does not equal the value - +-- key!~value: key regex does not match the value For example, to list all +-- of the time series descriptors for the region us-central1, you could +-- specify: label=cloud.googleapis.com%2Flocation=~us-central1.* +tlLabels :: Lens' TimeseriesList' (Maybe Text) +tlLabels = lens _tlLabels (\ s a -> s{_tlLabels = a}) + +-- | The pagination token, which is used to page through large result sets. +-- Set this value to the value of the nextPageToken to retrieve the next +-- page of results. +tlPageToken :: Lens' TimeseriesList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | End of the time interval (inclusive), which is expressed as an RFC 3339 +-- timestamp. +tlYoungest :: Lens' TimeseriesList' Text +tlYoungest + = lens _tlYoungest (\ s a -> s{_tlYoungest = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TimeseriesList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TimeseriesList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TimeseriesList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TimeseriesList' where + type Rs TimeseriesList' = ListTimeseriesResponse + request = requestWithRoute defReq monitoringURL + requestWithRoute r u TimeseriesList{..} + = go _tlWindow _tlQuotaUser _tlPrettyPrint _tlProject + _tlUserIp + (Just _tlCount) + _tlAggregator + _tlTimespan + _tlMetric + _tlKey + _tlOldest + _tlLabels + _tlPageToken + (Just _tlYoungest) + _tlOauthToken + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TimeseriesListAPI) + r + u diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/Write.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/Write.hs new file mode 100644 index 000000000..d002fcb7e --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/Timeseries/Write.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.Timeseries.Write +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Put data points to one or more time series for one or more metrics. If a +-- time series does not exist, a new time series will be created. It is not +-- allowed to write a time series point that is older than the existing +-- youngest point of that time series. Points that are older than the +-- existing youngest point of that time series will be discarded silently. +-- Therefore, users should make sure that points of a time series are +-- written sequentially in the order of their end time. +-- +-- /See:/ for @CloudmonitoringTimeseriesWrite@. +module Cloudmonitoring.Timeseries.Write + ( + -- * REST Resource + TimeseriesWriteAPI + + -- * Creating a Request + , timeseriesWrite + , TimeseriesWrite + + -- * Request Lenses + , twQuotaUser + , twPrettyPrint + , twProject + , twUserIp + , twKey + , twOauthToken + , twFields + , twAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringTimeseriesWrite@ which the +-- 'TimeseriesWrite' request conforms to. +type TimeseriesWriteAPI = + Capture "project" Text :> + "timeseries:write" :> + Post '[JSON] WriteTimeseriesResponse + +-- | Put data points to one or more time series for one or more metrics. If a +-- time series does not exist, a new time series will be created. It is not +-- allowed to write a time series point that is older than the existing +-- youngest point of that time series. Points that are older than the +-- existing youngest point of that time series will be discarded silently. +-- Therefore, users should make sure that points of a time series are +-- written sequentially in the order of their end time. +-- +-- /See:/ 'timeseriesWrite' smart constructor. +data TimeseriesWrite = TimeseriesWrite + { _twQuotaUser :: !(Maybe Text) + , _twPrettyPrint :: !Bool + , _twProject :: !Text + , _twUserIp :: !(Maybe Text) + , _twKey :: !(Maybe Text) + , _twOauthToken :: !(Maybe Text) + , _twFields :: !(Maybe Text) + , _twAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesWrite'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'twQuotaUser' +-- +-- * 'twPrettyPrint' +-- +-- * 'twProject' +-- +-- * 'twUserIp' +-- +-- * 'twKey' +-- +-- * 'twOauthToken' +-- +-- * 'twFields' +-- +-- * 'twAlt' +timeseriesWrite + :: Text -- ^ 'project' + -> TimeseriesWrite +timeseriesWrite pTwProject_ = + TimeseriesWrite + { _twQuotaUser = Nothing + , _twPrettyPrint = True + , _twProject = pTwProject_ + , _twUserIp = Nothing + , _twKey = Nothing + , _twOauthToken = Nothing + , _twFields = Nothing + , _twAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +twQuotaUser :: Lens' TimeseriesWrite' (Maybe Text) +twQuotaUser + = lens _twQuotaUser (\ s a -> s{_twQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +twPrettyPrint :: Lens' TimeseriesWrite' Bool +twPrettyPrint + = lens _twPrettyPrint + (\ s a -> s{_twPrettyPrint = a}) + +-- | The project ID. The value can be the numeric project ID or string-based +-- project name. +twProject :: Lens' TimeseriesWrite' Text +twProject + = lens _twProject (\ s a -> s{_twProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +twUserIp :: Lens' TimeseriesWrite' (Maybe Text) +twUserIp = lens _twUserIp (\ s a -> s{_twUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +twKey :: Lens' TimeseriesWrite' (Maybe Text) +twKey = lens _twKey (\ s a -> s{_twKey = a}) + +-- | OAuth 2.0 token for the current user. +twOauthToken :: Lens' TimeseriesWrite' (Maybe Text) +twOauthToken + = lens _twOauthToken (\ s a -> s{_twOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +twFields :: Lens' TimeseriesWrite' (Maybe Text) +twFields = lens _twFields (\ s a -> s{_twFields = a}) + +-- | Data format for the response. +twAlt :: Lens' TimeseriesWrite' Text +twAlt = lens _twAlt (\ s a -> s{_twAlt = a}) + +instance GoogleRequest TimeseriesWrite' where + type Rs TimeseriesWrite' = WriteTimeseriesResponse + request = requestWithRoute defReq monitoringURL + requestWithRoute r u TimeseriesWrite{..} + = go _twQuotaUser _twPrettyPrint _twProject _twUserIp + _twKey + _twOauthToken + _twFields + _twAlt + where go + = clientWithRoute (Proxy :: Proxy TimeseriesWriteAPI) + r + u diff --git a/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/TimeseriesDescriptors/List.hs b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/TimeseriesDescriptors/List.hs new file mode 100644 index 000000000..745dbb6bb --- /dev/null +++ b/gogol-monitoring/gen/Network/Google/Resource/Cloudmonitoring/TimeseriesDescriptors/List.hs @@ -0,0 +1,294 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudmonitoring.TimeseriesDescriptors.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the descriptors of the time series that match the metric and labels +-- values and that have data points in the interval. Large responses are +-- paginated; use the nextPageToken returned in the response to request +-- subsequent pages of results by setting the pageToken query parameter to +-- the value of the nextPageToken. +-- +-- /See:/ for @CloudmonitoringTimeseriesDescriptorsList@. +module Cloudmonitoring.TimeseriesDescriptors.List + ( + -- * REST Resource + TimeseriesDescriptorsListAPI + + -- * Creating a Request + , timeseriesDescriptorsList + , TimeseriesDescriptorsList + + -- * Request Lenses + , tWindow + , tQuotaUser + , tPrettyPrint + , tProject + , tUserIp + , tCount + , tAggregator + , tTimespan + , tMetric + , tKey + , tOldest + , tLabels + , tPageToken + , tYoungest + , tOauthToken + , tFields + , tAlt + ) where + +import Network.Google.Monitoring.Types +import Network.Google.Prelude + +-- | A resource alias for @CloudmonitoringTimeseriesDescriptorsList@ which the +-- 'TimeseriesDescriptorsList' request conforms to. +type TimeseriesDescriptorsListAPI = + Capture "project" Text :> + "timeseriesDescriptors" :> + Capture "metric" Text :> + QueryParam "window" Text :> + QueryParam "count" Int32 :> + QueryParam "aggregator" Text :> + QueryParam "timespan" Text :> + QueryParam "oldest" Text :> + QueryParams "labels" Text :> + QueryParam "pageToken" Text :> + QueryParam "youngest" Text :> + Get '[JSON] ListTimeseriesDescriptorsResponse + +-- | List the descriptors of the time series that match the metric and labels +-- values and that have data points in the interval. Large responses are +-- paginated; use the nextPageToken returned in the response to request +-- subsequent pages of results by setting the pageToken query parameter to +-- the value of the nextPageToken. +-- +-- /See:/ 'timeseriesDescriptorsList' smart constructor. +data TimeseriesDescriptorsList = TimeseriesDescriptorsList + { _tWindow :: !(Maybe Text) + , _tQuotaUser :: !(Maybe Text) + , _tPrettyPrint :: !Bool + , _tProject :: !Text + , _tUserIp :: !(Maybe Text) + , _tCount :: !Int32 + , _tAggregator :: !(Maybe Text) + , _tTimespan :: !(Maybe Text) + , _tMetric :: !Text + , _tKey :: !(Maybe Text) + , _tOldest :: !(Maybe Text) + , _tLabels :: !(Maybe Text) + , _tPageToken :: !(Maybe Text) + , _tYoungest :: !Text + , _tOauthToken :: !(Maybe Text) + , _tFields :: !(Maybe Text) + , _tAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeseriesDescriptorsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tWindow' +-- +-- * 'tQuotaUser' +-- +-- * 'tPrettyPrint' +-- +-- * 'tProject' +-- +-- * 'tUserIp' +-- +-- * 'tCount' +-- +-- * 'tAggregator' +-- +-- * 'tTimespan' +-- +-- * 'tMetric' +-- +-- * 'tKey' +-- +-- * 'tOldest' +-- +-- * 'tLabels' +-- +-- * 'tPageToken' +-- +-- * 'tYoungest' +-- +-- * 'tOauthToken' +-- +-- * 'tFields' +-- +-- * 'tAlt' +timeseriesDescriptorsList + :: Text -- ^ 'project' + -> Text -- ^ 'metric' + -> Text -- ^ 'youngest' + -> TimeseriesDescriptorsList +timeseriesDescriptorsList pTProject_ pTMetric_ pTYoungest_ = + TimeseriesDescriptorsList + { _tWindow = Nothing + , _tQuotaUser = Nothing + , _tPrettyPrint = True + , _tProject = pTProject_ + , _tUserIp = Nothing + , _tCount = 100 + , _tAggregator = Nothing + , _tTimespan = Nothing + , _tMetric = pTMetric_ + , _tKey = Nothing + , _tOldest = Nothing + , _tLabels = Nothing + , _tPageToken = Nothing + , _tYoungest = pTYoungest_ + , _tOauthToken = Nothing + , _tFields = Nothing + , _tAlt = "json" + } + +-- | The sampling window. At most one data point will be returned for each +-- window in the requested time interval. This parameter is only valid for +-- non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: +-- week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is +-- not allowed; you should use 17d instead. +tWindow :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tWindow = lens _tWindow (\ s a -> s{_tWindow = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tQuotaUser :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tQuotaUser + = lens _tQuotaUser (\ s a -> s{_tQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tPrettyPrint :: Lens' TimeseriesDescriptorsList' Bool +tPrettyPrint + = lens _tPrettyPrint (\ s a -> s{_tPrettyPrint = a}) + +-- | The project ID to which this time series belongs. The value can be the +-- numeric project ID or string-based project name. +tProject :: Lens' TimeseriesDescriptorsList' Text +tProject = lens _tProject (\ s a -> s{_tProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tUserIp :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tUserIp = lens _tUserIp (\ s a -> s{_tUserIp = a}) + +-- | Maximum number of time series descriptors per page. Used for pagination. +-- If not specified, count = 100. +tCount :: Lens' TimeseriesDescriptorsList' Int32 +tCount = lens _tCount (\ s a -> s{_tCount = a}) + +-- | The aggregation function that will reduce the data points in each window +-- to a single point. This parameter is only valid for non-cumulative +-- metrics with a value type of INT64 or DOUBLE. +tAggregator :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tAggregator + = lens _tAggregator (\ s a -> s{_tAggregator = a}) + +-- | Length of the time interval to query, which is an alternative way to +-- declare the interval: (youngest - timespan, youngest]. The timespan and +-- oldest parameters should not be used together. Units: - s: second - m: +-- minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit +-- is allowed, for example: 2w3d is not allowed; you should use 17d +-- instead. If neither oldest nor timespan is specified, the default time +-- interval will be (youngest - 4 hours, youngest]. +tTimespan :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tTimespan + = lens _tTimespan (\ s a -> s{_tTimespan = a}) + +-- | Metric names are protocol-free URLs as listed in the Supported Metrics +-- page. For example, +-- compute.googleapis.com\/instance\/disk\/read_ops_count. +tMetric :: Lens' TimeseriesDescriptorsList' Text +tMetric = lens _tMetric (\ s a -> s{_tMetric = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tKey :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tKey = lens _tKey (\ s a -> s{_tKey = a}) + +-- | Start of the time interval (exclusive), which is expressed as an RFC +-- 3339 timestamp. If neither oldest nor timespan is specified, the default +-- time interval will be (youngest - 4 hours, youngest] +tOldest :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tOldest = lens _tOldest (\ s a -> s{_tOldest = a}) + +-- | A collection of labels for the matching time series, which are +-- represented as: - key==value: key equals the value - key=~value: key +-- regex matches the value - key!=value: key does not equal the value - +-- key!~value: key regex does not match the value For example, to list all +-- of the time series descriptors for the region us-central1, you could +-- specify: label=cloud.googleapis.com%2Flocation=~us-central1.* +tLabels :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tLabels = lens _tLabels (\ s a -> s{_tLabels = a}) + +-- | The pagination token, which is used to page through large result sets. +-- Set this value to the value of the nextPageToken to retrieve the next +-- page of results. +tPageToken :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tPageToken + = lens _tPageToken (\ s a -> s{_tPageToken = a}) + +-- | End of the time interval (inclusive), which is expressed as an RFC 3339 +-- timestamp. +tYoungest :: Lens' TimeseriesDescriptorsList' Text +tYoungest + = lens _tYoungest (\ s a -> s{_tYoungest = a}) + +-- | OAuth 2.0 token for the current user. +tOauthToken :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tOauthToken + = lens _tOauthToken (\ s a -> s{_tOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tFields :: Lens' TimeseriesDescriptorsList' (Maybe Text) +tFields = lens _tFields (\ s a -> s{_tFields = a}) + +-- | Data format for the response. +tAlt :: Lens' TimeseriesDescriptorsList' Text +tAlt = lens _tAlt (\ s a -> s{_tAlt = a}) + +instance GoogleRequest TimeseriesDescriptorsList' + where + type Rs TimeseriesDescriptorsList' = + ListTimeseriesDescriptorsResponse + request = requestWithRoute defReq monitoringURL + requestWithRoute r u TimeseriesDescriptorsList{..} + = go _tWindow _tQuotaUser _tPrettyPrint _tProject + _tUserIp + (Just _tCount) + _tAggregator + _tTimespan + _tMetric + _tKey + _tOldest + _tLabels + _tPageToken + (Just _tYoungest) + _tOauthToken + _tFields + _tAlt + where go + = clientWithRoute + (Proxy :: Proxy TimeseriesDescriptorsListAPI) + r + u diff --git a/gogol-monitoring/gogol-monitoring.cabal b/gogol-monitoring/gogol-monitoring.cabal new file mode 100644 index 000000000..323f4985a --- /dev/null +++ b/gogol-monitoring/gogol-monitoring.cabal @@ -0,0 +1,48 @@ +name: gogol-monitoring +version: 0.0.1 +synopsis: Cloud Monitoring API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for accessing Google Cloud and API monitoring data. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Monitoring + , Network.Google.Monitoring.Types + , Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Create + , Network.Google.Resource.Cloudmonitoring.MetricDescriptors.Delete + , Network.Google.Resource.Cloudmonitoring.MetricDescriptors.List + , Network.Google.Resource.Cloudmonitoring.Timeseries.List + , Network.Google.Resource.Cloudmonitoring.Timeseries.Write + , Network.Google.Resource.Cloudmonitoring.TimeseriesDescriptors.List + + other-modules: + Network.Google.Monitoring.Types.Product + , Network.Google.Monitoring.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-monitoring/src/.gitkeep b/gogol-monitoring/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-oauth2/LICENSE b/gogol-oauth2/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-oauth2/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-oauth2/Makefile b/gogol-oauth2/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-oauth2/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-oauth2/README.md b/gogol-oauth2/README.md new file mode 100644 index 000000000..faa6bb84c --- /dev/null +++ b/gogol-oauth2/README.md @@ -0,0 +1,28 @@ +# gogol-oauth2 + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google OAuth2 API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-oauth2` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-oauth2/Setup.hs b/gogol-oauth2/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-oauth2/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-oauth2/gen/Network/Google/Method/OAuth2/GetCertForOpenIdConnect.hs b/gogol-oauth2/gen/Network/Google/Method/OAuth2/GetCertForOpenIdConnect.hs new file mode 100644 index 000000000..a796239c4 --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/Method/OAuth2/GetCertForOpenIdConnect.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Method.OAuth2.GetCertForOpenIdConnect +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @Oauth2GetCertForOpenIdConnect@. +module OAuth2.GetCertForOpenIdConnect + ( + -- * REST Resource + GetCertForOpenIdConnectAPI + + -- * Creating a Request + , getCertForOpenIdConnect + , GetCertForOpenIdConnect + + -- * Request Lenses + , gcfoicQuotaUser + , gcfoicPrettyPrint + , gcfoicUserIp + , gcfoicKey + , gcfoicOauthToken + , gcfoicFields + , gcfoicAlt + ) where + +import Network.Google.OAuth2.Types +import Network.Google.Prelude + +-- | A resource alias for @Oauth2GetCertForOpenIdConnect@ which the +-- 'GetCertForOpenIdConnect' request conforms to. +type GetCertForOpenIdConnectAPI = + "oauth2" :> "v2" :> "certs" :> Get '[JSON] Jwk + +-- +-- /See:/ 'getCertForOpenIdConnect' smart constructor. +data GetCertForOpenIdConnect = GetCertForOpenIdConnect + { _gcfoicQuotaUser :: !(Maybe Text) + , _gcfoicPrettyPrint :: !Bool + , _gcfoicUserIp :: !(Maybe Text) + , _gcfoicKey :: !(Maybe Text) + , _gcfoicOauthToken :: !(Maybe Text) + , _gcfoicFields :: !(Maybe Text) + , _gcfoicAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetCertForOpenIdConnect'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gcfoicQuotaUser' +-- +-- * 'gcfoicPrettyPrint' +-- +-- * 'gcfoicUserIp' +-- +-- * 'gcfoicKey' +-- +-- * 'gcfoicOauthToken' +-- +-- * 'gcfoicFields' +-- +-- * 'gcfoicAlt' +getCertForOpenIdConnect + :: GetCertForOpenIdConnect +getCertForOpenIdConnect = + GetCertForOpenIdConnect + { _gcfoicQuotaUser = Nothing + , _gcfoicPrettyPrint = True + , _gcfoicUserIp = Nothing + , _gcfoicKey = Nothing + , _gcfoicOauthToken = Nothing + , _gcfoicFields = Nothing + , _gcfoicAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gcfoicQuotaUser :: Lens' GetCertForOpenIdConnect' (Maybe Text) +gcfoicQuotaUser + = lens _gcfoicQuotaUser + (\ s a -> s{_gcfoicQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gcfoicPrettyPrint :: Lens' GetCertForOpenIdConnect' Bool +gcfoicPrettyPrint + = lens _gcfoicPrettyPrint + (\ s a -> s{_gcfoicPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gcfoicUserIp :: Lens' GetCertForOpenIdConnect' (Maybe Text) +gcfoicUserIp + = lens _gcfoicUserIp (\ s a -> s{_gcfoicUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gcfoicKey :: Lens' GetCertForOpenIdConnect' (Maybe Text) +gcfoicKey + = lens _gcfoicKey (\ s a -> s{_gcfoicKey = a}) + +-- | OAuth 2.0 token for the current user. +gcfoicOauthToken :: Lens' GetCertForOpenIdConnect' (Maybe Text) +gcfoicOauthToken + = lens _gcfoicOauthToken + (\ s a -> s{_gcfoicOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gcfoicFields :: Lens' GetCertForOpenIdConnect' (Maybe Text) +gcfoicFields + = lens _gcfoicFields (\ s a -> s{_gcfoicFields = a}) + +-- | Data format for the response. +gcfoicAlt :: Lens' GetCertForOpenIdConnect' Text +gcfoicAlt + = lens _gcfoicAlt (\ s a -> s{_gcfoicAlt = a}) + +instance GoogleRequest GetCertForOpenIdConnect' where + type Rs GetCertForOpenIdConnect' = Jwk + request = requestWithRoute defReq oAuth2URL + requestWithRoute r u GetCertForOpenIdConnect{..} + = go _gcfoicQuotaUser _gcfoicPrettyPrint + _gcfoicUserIp + _gcfoicKey + _gcfoicOauthToken + _gcfoicFields + _gcfoicAlt + where go + = clientWithRoute + (Proxy :: Proxy GetCertForOpenIdConnectAPI) + r + u diff --git a/gogol-oauth2/gen/Network/Google/Method/OAuth2/Tokeninfo.hs b/gogol-oauth2/gen/Network/Google/Method/OAuth2/Tokeninfo.hs new file mode 100644 index 000000000..dd7e076e5 --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/Method/OAuth2/Tokeninfo.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Method.OAuth2.Tokeninfo +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @Oauth2Tokeninfo@. +module OAuth2.Tokeninfo + ( + -- * REST Resource + TokeninfoAPI + + -- * Creating a Request + , tokeninfo + , Tokeninfo + + -- * Request Lenses + , tokQuotaUser + , tokPrettyPrint + , tokUserIp + , tokAccessToken + , tokKey + , tokOauthToken + , tokTokenHandle + , tokFields + , tokAlt + , tokIdToken + ) where + +import Network.Google.OAuth2.Types +import Network.Google.Prelude + +-- | A resource alias for @Oauth2Tokeninfo@ which the +-- 'Tokeninfo' request conforms to. +type TokeninfoAPI = + "oauth2" :> + "v2" :> + "tokeninfo" :> + QueryParam "access_token" Text :> + QueryParam "token_handle" Text :> + QueryParam "id_token" Text :> Post '[JSON] Tokeninfo + +-- +-- /See:/ 'tokeninfo' smart constructor. +data Tokeninfo = Tokeninfo + { _tokQuotaUser :: !(Maybe Text) + , _tokPrettyPrint :: !Bool + , _tokUserIp :: !(Maybe Text) + , _tokAccessToken :: !(Maybe Text) + , _tokKey :: !(Maybe Text) + , _tokOauthToken :: !(Maybe Text) + , _tokTokenHandle :: !(Maybe Text) + , _tokFields :: !(Maybe Text) + , _tokAlt :: !Text + , _tokIdToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tokeninfo'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tokQuotaUser' +-- +-- * 'tokPrettyPrint' +-- +-- * 'tokUserIp' +-- +-- * 'tokAccessToken' +-- +-- * 'tokKey' +-- +-- * 'tokOauthToken' +-- +-- * 'tokTokenHandle' +-- +-- * 'tokFields' +-- +-- * 'tokAlt' +-- +-- * 'tokIdToken' +tokeninfo + :: Tokeninfo +tokeninfo = + Tokeninfo + { _tokQuotaUser = Nothing + , _tokPrettyPrint = True + , _tokUserIp = Nothing + , _tokAccessToken = Nothing + , _tokKey = Nothing + , _tokOauthToken = Nothing + , _tokTokenHandle = Nothing + , _tokFields = Nothing + , _tokAlt = "json" + , _tokIdToken = Nothing + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tokQuotaUser :: Lens' Tokeninfo' (Maybe Text) +tokQuotaUser + = lens _tokQuotaUser (\ s a -> s{_tokQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tokPrettyPrint :: Lens' Tokeninfo' Bool +tokPrettyPrint + = lens _tokPrettyPrint + (\ s a -> s{_tokPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tokUserIp :: Lens' Tokeninfo' (Maybe Text) +tokUserIp + = lens _tokUserIp (\ s a -> s{_tokUserIp = a}) + +tokAccessToken :: Lens' Tokeninfo' (Maybe Text) +tokAccessToken + = lens _tokAccessToken + (\ s a -> s{_tokAccessToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tokKey :: Lens' Tokeninfo' (Maybe Text) +tokKey = lens _tokKey (\ s a -> s{_tokKey = a}) + +-- | OAuth 2.0 token for the current user. +tokOauthToken :: Lens' Tokeninfo' (Maybe Text) +tokOauthToken + = lens _tokOauthToken + (\ s a -> s{_tokOauthToken = a}) + +tokTokenHandle :: Lens' Tokeninfo' (Maybe Text) +tokTokenHandle + = lens _tokTokenHandle + (\ s a -> s{_tokTokenHandle = a}) + +-- | Selector specifying which fields to include in a partial response. +tokFields :: Lens' Tokeninfo' (Maybe Text) +tokFields + = lens _tokFields (\ s a -> s{_tokFields = a}) + +-- | Data format for the response. +tokAlt :: Lens' Tokeninfo' Text +tokAlt = lens _tokAlt (\ s a -> s{_tokAlt = a}) + +tokIdToken :: Lens' Tokeninfo' (Maybe Text) +tokIdToken + = lens _tokIdToken (\ s a -> s{_tokIdToken = a}) + +instance GoogleRequest Tokeninfo' where + type Rs Tokeninfo' = Tokeninfo + request = requestWithRoute defReq oAuth2URL + requestWithRoute r u Tokeninfo{..} + = go _tokQuotaUser _tokPrettyPrint _tokUserIp + _tokAccessToken + _tokKey + _tokOauthToken + _tokTokenHandle + _tokFields + _tokAlt + _tokIdToken + where go + = clientWithRoute (Proxy :: Proxy TokeninfoAPI) r u diff --git a/gogol-oauth2/gen/Network/Google/OAuth2.hs b/gogol-oauth2/gen/Network/Google/OAuth2.hs new file mode 100644 index 000000000..327fb080e --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/OAuth2.hs @@ -0,0 +1,93 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.OAuth2 +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you access OAuth2 protocol related APIs. +-- +-- /See:/ +module Network.Google.OAuth2 + ( + -- * API + OAuth2API + , oAuth2API + , oAuth2URL + + -- * Service Methods + + -- ** Oauth2GetCertForOpenIdConnect + , module OAuth2.GetCertForOpenIdConnect + + -- ** Oauth2Tokeninfo + , module OAuth2.Tokeninfo + + -- * REST Resources + + -- ** Oauth2UserinfoGet + , module OAuth2.Userinfo.Get + + -- ** Oauth2UserinfoV2MeGet + , module OAuth2.Userinfo.V2.Me.Get + + -- * Types + + -- ** Tokeninfo + , Tokeninfo + , tokeninfo + , tAudience + , tEmail + , tExpiresIn + , tAccessType + , tScope + , tVerifiedEmail + , tUserId + , tTokenHandle + , tIssuedTo + + -- ** Jwk + , Jwk + , jwk + , jwkKeys + + -- ** Userinfoplus + , Userinfoplus + , userinfoplus + , uHd + , uEmail + , uLink + , uLocale + , uGivenName + , uFamilyName + , uPicture + , uGender + , uName + , uVerifiedEmail + , uId + ) where + +import Network.Google.Method.OAuth2.GetCertForOpenIdConnect +import Network.Google.Method.OAuth2.Tokeninfo +import Network.Google.OAuth2.Types +import Network.Google.Prelude +import Network.Google.Resource.OAuth2.Userinfo.Get +import Network.Google.Resource.OAuth2.Userinfo.V2.Me.Get + +{- $resources +TODO +-} + +type OAuth2API = + Oauth2GetCertForOpenIdConnect :<|> Oauth2Tokeninfo + :<|> Userinfo + +oAuth2API :: Proxy OAuth2API +oAuth2API = Proxy diff --git a/gogol-oauth2/gen/Network/Google/OAuth2/Types.hs b/gogol-oauth2/gen/Network/Google/OAuth2/Types.hs new file mode 100644 index 000000000..d55756e7c --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/OAuth2/Types.hs @@ -0,0 +1,61 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.OAuth2.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.OAuth2.Types + ( + -- * Service URL + oAuth2URL + + -- * Tokeninfo + , Tokeninfo + , tokeninfo + , tAudience + , tEmail + , tExpiresIn + , tAccessType + , tScope + , tVerifiedEmail + , tUserId + , tTokenHandle + , tIssuedTo + + -- * Jwk + , Jwk + , jwk + , jwkKeys + + -- * Userinfoplus + , Userinfoplus + , userinfoplus + , uHd + , uEmail + , uLink + , uLocale + , uGivenName + , uFamilyName + , uPicture + , uGender + , uName + , uVerifiedEmail + , uId + ) where + +import Network.Google.OAuth2.Types.Product +import Network.Google.OAuth2.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google OAuth2 API. +oAuth2URL :: BaseURL +oAuth2URL + = BaseUrl Https "https://www.googleapis.com/" 443 diff --git a/gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs b/gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs new file mode 100644 index 000000000..8cb51773f --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs @@ -0,0 +1,310 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.OAuth2.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.OAuth2.Types.Product where + +import Network.Google.OAuth2.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'tokeninfo' smart constructor. +data Tokeninfo = Tokeninfo + { _tAudience :: !(Maybe Text) + , _tEmail :: !(Maybe Text) + , _tExpiresIn :: !(Maybe Int32) + , _tAccessType :: !(Maybe Text) + , _tScope :: !(Maybe Text) + , _tVerifiedEmail :: !(Maybe Bool) + , _tUserId :: !(Maybe Text) + , _tTokenHandle :: !(Maybe Text) + , _tIssuedTo :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tokeninfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tAudience' +-- +-- * 'tEmail' +-- +-- * 'tExpiresIn' +-- +-- * 'tAccessType' +-- +-- * 'tScope' +-- +-- * 'tVerifiedEmail' +-- +-- * 'tUserId' +-- +-- * 'tTokenHandle' +-- +-- * 'tIssuedTo' +tokeninfo + :: Tokeninfo +tokeninfo = + Tokeninfo + { _tAudience = Nothing + , _tEmail = Nothing + , _tExpiresIn = Nothing + , _tAccessType = Nothing + , _tScope = Nothing + , _tVerifiedEmail = Nothing + , _tUserId = Nothing + , _tTokenHandle = Nothing + , _tIssuedTo = Nothing + } + +-- | Who is the intended audience for this token. In general the same as +-- issued_to. +tAudience :: Lens' Tokeninfo (Maybe Text) +tAudience + = lens _tAudience (\ s a -> s{_tAudience = a}) + +-- | The email address of the user. Present only if the email scope is +-- present in the request. +tEmail :: Lens' Tokeninfo (Maybe Text) +tEmail = lens _tEmail (\ s a -> s{_tEmail = a}) + +-- | The expiry time of the token, as number of seconds left until expiry. +tExpiresIn :: Lens' Tokeninfo (Maybe Int32) +tExpiresIn + = lens _tExpiresIn (\ s a -> s{_tExpiresIn = a}) + +-- | The access type granted with this token. It can be offline or online. +tAccessType :: Lens' Tokeninfo (Maybe Text) +tAccessType + = lens _tAccessType (\ s a -> s{_tAccessType = a}) + +-- | The space separated list of scopes granted to this token. +tScope :: Lens' Tokeninfo (Maybe Text) +tScope = lens _tScope (\ s a -> s{_tScope = a}) + +-- | Boolean flag which is true if the email address is verified. Present +-- only if the email scope is present in the request. +tVerifiedEmail :: Lens' Tokeninfo (Maybe Bool) +tVerifiedEmail + = lens _tVerifiedEmail + (\ s a -> s{_tVerifiedEmail = a}) + +-- | The obfuscated user id. +tUserId :: Lens' Tokeninfo (Maybe Text) +tUserId = lens _tUserId (\ s a -> s{_tUserId = a}) + +-- | The token handle associated with this token. +tTokenHandle :: Lens' Tokeninfo (Maybe Text) +tTokenHandle + = lens _tTokenHandle (\ s a -> s{_tTokenHandle = a}) + +-- | To whom was the token issued to. In general the same as audience. +tIssuedTo :: Lens' Tokeninfo (Maybe Text) +tIssuedTo + = lens _tIssuedTo (\ s a -> s{_tIssuedTo = a}) + +instance FromJSON Tokeninfo where + parseJSON + = withObject "Tokeninfo" + (\ o -> + Tokeninfo <$> + (o .:? "audience") <*> (o .:? "email") <*> + (o .:? "expires_in") + <*> (o .:? "access_type") + <*> (o .:? "scope") + <*> (o .:? "verified_email") + <*> (o .:? "user_id") + <*> (o .:? "token_handle") + <*> (o .:? "issued_to")) + +instance ToJSON Tokeninfo where + toJSON Tokeninfo{..} + = object + (catMaybes + [("audience" .=) <$> _tAudience, + ("email" .=) <$> _tEmail, + ("expires_in" .=) <$> _tExpiresIn, + ("access_type" .=) <$> _tAccessType, + ("scope" .=) <$> _tScope, + ("verified_email" .=) <$> _tVerifiedEmail, + ("user_id" .=) <$> _tUserId, + ("token_handle" .=) <$> _tTokenHandle, + ("issued_to" .=) <$> _tIssuedTo]) + +-- +-- /See:/ 'jwk' smart constructor. +newtype Jwk = Jwk + { _jwkKeys :: Maybe [JwkKeysItem] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Jwk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'jwkKeys' +jwk + :: Jwk +jwk = + Jwk + { _jwkKeys = Nothing + } + +jwkKeys :: Lens' Jwk [JwkKeysItem] +jwkKeys + = lens _jwkKeys (\ s a -> s{_jwkKeys = a}) . _Default + . _Coerce + +instance FromJSON Jwk where + parseJSON + = withObject "Jwk" + (\ o -> Jwk <$> (o .:? "keys" .!= mempty)) + +instance ToJSON Jwk where + toJSON Jwk{..} + = object (catMaybes [("keys" .=) <$> _jwkKeys]) + +-- +-- /See:/ 'userinfoplus' smart constructor. +data Userinfoplus = Userinfoplus + { _uHd :: !(Maybe Text) + , _uEmail :: !(Maybe Text) + , _uLink :: !(Maybe Text) + , _uLocale :: !(Maybe Text) + , _uGivenName :: !(Maybe Text) + , _uFamilyName :: !(Maybe Text) + , _uPicture :: !(Maybe Text) + , _uGender :: !(Maybe Text) + , _uName :: !(Maybe Text) + , _uVerifiedEmail :: !Bool + , _uId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Userinfoplus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uHd' +-- +-- * 'uEmail' +-- +-- * 'uLink' +-- +-- * 'uLocale' +-- +-- * 'uGivenName' +-- +-- * 'uFamilyName' +-- +-- * 'uPicture' +-- +-- * 'uGender' +-- +-- * 'uName' +-- +-- * 'uVerifiedEmail' +-- +-- * 'uId' +userinfoplus + :: Userinfoplus +userinfoplus = + Userinfoplus + { _uHd = Nothing + , _uEmail = Nothing + , _uLink = Nothing + , _uLocale = Nothing + , _uGivenName = Nothing + , _uFamilyName = Nothing + , _uPicture = Nothing + , _uGender = Nothing + , _uName = Nothing + , _uVerifiedEmail = True + , _uId = Nothing + } + +-- | The hosted domain e.g. example.com if the user is Google apps user. +uHd :: Lens' Userinfoplus (Maybe Text) +uHd = lens _uHd (\ s a -> s{_uHd = a}) + +-- | The user\'s email address. +uEmail :: Lens' Userinfoplus (Maybe Text) +uEmail = lens _uEmail (\ s a -> s{_uEmail = a}) + +-- | URL of the profile page. +uLink :: Lens' Userinfoplus (Maybe Text) +uLink = lens _uLink (\ s a -> s{_uLink = a}) + +-- | The user\'s preferred locale. +uLocale :: Lens' Userinfoplus (Maybe Text) +uLocale = lens _uLocale (\ s a -> s{_uLocale = a}) + +-- | The user\'s first name. +uGivenName :: Lens' Userinfoplus (Maybe Text) +uGivenName + = lens _uGivenName (\ s a -> s{_uGivenName = a}) + +-- | The user\'s last name. +uFamilyName :: Lens' Userinfoplus (Maybe Text) +uFamilyName + = lens _uFamilyName (\ s a -> s{_uFamilyName = a}) + +-- | URL of the user\'s picture image. +uPicture :: Lens' Userinfoplus (Maybe Text) +uPicture = lens _uPicture (\ s a -> s{_uPicture = a}) + +-- | The user\'s gender. +uGender :: Lens' Userinfoplus (Maybe Text) +uGender = lens _uGender (\ s a -> s{_uGender = a}) + +-- | The user\'s full name. +uName :: Lens' Userinfoplus (Maybe Text) +uName = lens _uName (\ s a -> s{_uName = a}) + +-- | Boolean flag which is true if the email address is verified. Always +-- verified because we only return the user\'s primary email address. +uVerifiedEmail :: Lens' Userinfoplus Bool +uVerifiedEmail + = lens _uVerifiedEmail + (\ s a -> s{_uVerifiedEmail = a}) + +-- | The obfuscated ID of the user. +uId :: Lens' Userinfoplus (Maybe Text) +uId = lens _uId (\ s a -> s{_uId = a}) + +instance FromJSON Userinfoplus where + parseJSON + = withObject "Userinfoplus" + (\ o -> + Userinfoplus <$> + (o .:? "hd") <*> (o .:? "email") <*> (o .:? "link") + <*> (o .:? "locale") + <*> (o .:? "given_name") + <*> (o .:? "family_name") + <*> (o .:? "picture") + <*> (o .:? "gender") + <*> (o .:? "name") + <*> (o .:? "verified_email" .!= True) + <*> (o .:? "id")) + +instance ToJSON Userinfoplus where + toJSON Userinfoplus{..} + = object + (catMaybes + [("hd" .=) <$> _uHd, ("email" .=) <$> _uEmail, + ("link" .=) <$> _uLink, ("locale" .=) <$> _uLocale, + ("given_name" .=) <$> _uGivenName, + ("family_name" .=) <$> _uFamilyName, + ("picture" .=) <$> _uPicture, + ("gender" .=) <$> _uGender, ("name" .=) <$> _uName, + Just ("verified_email" .= _uVerifiedEmail), + ("id" .=) <$> _uId]) diff --git a/gogol-oauth2/gen/Network/Google/OAuth2/Types/Sum.hs b/gogol-oauth2/gen/Network/Google/OAuth2/Types/Sum.hs new file mode 100644 index 000000000..ff9a69c2c --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/OAuth2/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.OAuth2.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.OAuth2.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/Get.hs b/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/Get.hs new file mode 100644 index 000000000..ebe0c66df --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/Get.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.OAuth2.Userinfo.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @Oauth2UserinfoGet@. +module OAuth2.Userinfo.Get + ( + -- * REST Resource + UserinfoGetAPI + + -- * Creating a Request + , userinfoGet + , UserinfoGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugUserIp + , ugKey + , ugOauthToken + , ugFields + , ugAlt + ) where + +import Network.Google.OAuth2.Types +import Network.Google.Prelude + +-- | A resource alias for @Oauth2UserinfoGet@ which the +-- 'UserinfoGet' request conforms to. +type UserinfoGetAPI = + "oauth2" :> + "v2" :> "userinfo" :> Get '[JSON] Userinfoplus + +-- +-- /See:/ 'userinfoGet' smart constructor. +data UserinfoGet = UserinfoGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugUserIp :: !(Maybe Text) + , _ugKey :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserinfoGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugUserIp' +-- +-- * 'ugKey' +-- +-- * 'ugOauthToken' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +userinfoGet + :: UserinfoGet +userinfoGet = + UserinfoGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugUserIp = Nothing + , _ugKey = Nothing + , _ugOauthToken = Nothing + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' UserinfoGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' UserinfoGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' UserinfoGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' UserinfoGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' UserinfoGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' UserinfoGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' UserinfoGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest UserinfoGet' where + type Rs UserinfoGet' = Userinfoplus + request = requestWithRoute defReq oAuth2URL + requestWithRoute r u UserinfoGet{..} + = go _ugQuotaUser _ugPrettyPrint _ugUserIp _ugKey + _ugOauthToken + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UserinfoGetAPI) r u diff --git a/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/V2/Me/Get.hs b/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/V2/Me/Get.hs new file mode 100644 index 000000000..901c1acea --- /dev/null +++ b/gogol-oauth2/gen/Network/Google/Resource/OAuth2/Userinfo/V2/Me/Get.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.OAuth2.Userinfo.V2.Me.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @Oauth2UserinfoV2MeGet@. +module OAuth2.Userinfo.V2.Me.Get + ( + -- * REST Resource + UserinfoV2MeGetAPI + + -- * Creating a Request + , userinfoV2MeGet + , UserinfoV2MeGet + + -- * Request Lenses + , uvmgQuotaUser + , uvmgPrettyPrint + , uvmgUserIp + , uvmgKey + , uvmgOauthToken + , uvmgFields + , uvmgAlt + ) where + +import Network.Google.OAuth2.Types +import Network.Google.Prelude + +-- | A resource alias for @Oauth2UserinfoV2MeGet@ which the +-- 'UserinfoV2MeGet' request conforms to. +type UserinfoV2MeGetAPI = + "userinfo" :> + "v2" :> "me" :> Get '[JSON] Userinfoplus + +-- +-- /See:/ 'userinfoV2MeGet' smart constructor. +data UserinfoV2MeGet = UserinfoV2MeGet + { _uvmgQuotaUser :: !(Maybe Text) + , _uvmgPrettyPrint :: !Bool + , _uvmgUserIp :: !(Maybe Text) + , _uvmgKey :: !(Maybe Text) + , _uvmgOauthToken :: !(Maybe Text) + , _uvmgFields :: !(Maybe Text) + , _uvmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserinfoV2MeGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uvmgQuotaUser' +-- +-- * 'uvmgPrettyPrint' +-- +-- * 'uvmgUserIp' +-- +-- * 'uvmgKey' +-- +-- * 'uvmgOauthToken' +-- +-- * 'uvmgFields' +-- +-- * 'uvmgAlt' +userinfoV2MeGet + :: UserinfoV2MeGet +userinfoV2MeGet = + UserinfoV2MeGet + { _uvmgQuotaUser = Nothing + , _uvmgPrettyPrint = True + , _uvmgUserIp = Nothing + , _uvmgKey = Nothing + , _uvmgOauthToken = Nothing + , _uvmgFields = Nothing + , _uvmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uvmgQuotaUser :: Lens' UserinfoV2MeGet' (Maybe Text) +uvmgQuotaUser + = lens _uvmgQuotaUser + (\ s a -> s{_uvmgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uvmgPrettyPrint :: Lens' UserinfoV2MeGet' Bool +uvmgPrettyPrint + = lens _uvmgPrettyPrint + (\ s a -> s{_uvmgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uvmgUserIp :: Lens' UserinfoV2MeGet' (Maybe Text) +uvmgUserIp + = lens _uvmgUserIp (\ s a -> s{_uvmgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uvmgKey :: Lens' UserinfoV2MeGet' (Maybe Text) +uvmgKey = lens _uvmgKey (\ s a -> s{_uvmgKey = a}) + +-- | OAuth 2.0 token for the current user. +uvmgOauthToken :: Lens' UserinfoV2MeGet' (Maybe Text) +uvmgOauthToken + = lens _uvmgOauthToken + (\ s a -> s{_uvmgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uvmgFields :: Lens' UserinfoV2MeGet' (Maybe Text) +uvmgFields + = lens _uvmgFields (\ s a -> s{_uvmgFields = a}) + +-- | Data format for the response. +uvmgAlt :: Lens' UserinfoV2MeGet' Text +uvmgAlt = lens _uvmgAlt (\ s a -> s{_uvmgAlt = a}) + +instance GoogleRequest UserinfoV2MeGet' where + type Rs UserinfoV2MeGet' = Userinfoplus + request = requestWithRoute defReq oAuth2URL + requestWithRoute r u UserinfoV2MeGet{..} + = go _uvmgQuotaUser _uvmgPrettyPrint _uvmgUserIp + _uvmgKey + _uvmgOauthToken + _uvmgFields + _uvmgAlt + where go + = clientWithRoute (Proxy :: Proxy UserinfoV2MeGetAPI) + r + u diff --git a/gogol-oauth2/gogol-oauth2.cabal b/gogol-oauth2/gogol-oauth2.cabal new file mode 100644 index 000000000..958f5c9d1 --- /dev/null +++ b/gogol-oauth2/gogol-oauth2.cabal @@ -0,0 +1,46 @@ +name: gogol-oauth2 +version: 0.0.1 +synopsis: Google OAuth2 API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you access OAuth2 protocol related APIs. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Method.OAuth2.GetCertForOpenIdConnect + , Network.Google.Method.OAuth2.Tokeninfo + , Network.Google.OAuth2 + , Network.Google.OAuth2.Types + , Network.Google.Resource.OAuth2.Userinfo.Get + , Network.Google.Resource.OAuth2.Userinfo.V2.Me.Get + + other-modules: + Network.Google.OAuth2.Types.Product + , Network.Google.OAuth2.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-oauth2/src/.gitkeep b/gogol-oauth2/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-pagespeed/LICENSE b/gogol-pagespeed/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-pagespeed/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-pagespeed/Makefile b/gogol-pagespeed/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-pagespeed/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-pagespeed/README.md b/gogol-pagespeed/README.md new file mode 100644 index 000000000..0989d7cef --- /dev/null +++ b/gogol-pagespeed/README.md @@ -0,0 +1,28 @@ +# gogol-pagespeed + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the PageSpeed Insights API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-pagespeed` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-pagespeed/Setup.hs b/gogol-pagespeed/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-pagespeed/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-pagespeed/gen/Network/Google/PageSpeed.hs b/gogol-pagespeed/gen/Network/Google/PageSpeed.hs new file mode 100644 index 000000000..ccb0cbef8 --- /dev/null +++ b/gogol-pagespeed/gen/Network/Google/PageSpeed.hs @@ -0,0 +1,77 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PageSpeed +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you analyze the performance of a web page and get tailored +-- suggestions to make that page faster. +-- +-- /See:/ +module Network.Google.PageSpeed + ( + -- * API + PageSpeedAPI + , pageSpeedAPI + , pageSpeedURL + + -- * Service Methods + + -- * REST Resources + + -- ** PagespeedonlinePagespeedapiRunpagespeed + , module Pagespeedonline.Pagespeedapi.Runpagespeed + + -- * Types + + -- ** PagespeedAPIImageV2 + , PagespeedAPIImageV2 + , pagespeedAPIImageV2 + , paivHeight + , paivData + , paivMimeType + , paivWidth + , paivPageRect + , paivKey + + -- ** Result + , Result + , result + , rScreenshot + , rKind + , rResponseCode + , rInvalidRules + , rFormattedResults + , rVersion + , rRuleGroups + , rPageStats + , rId + , rTitle + + -- ** PagespeedAPIFormatStringV2 + , PagespeedAPIFormatStringV2 + , pagespeedAPIFormatStringV2 + , pafsvArgs + , pafsvFormat + ) where + +import Network.Google.PageSpeed.Types +import Network.Google.Prelude +import Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed + +{- $resources +TODO +-} + +type PageSpeedAPI = Pagespeedapi + +pageSpeedAPI :: Proxy PageSpeedAPI +pageSpeedAPI = Proxy diff --git a/gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs new file mode 100644 index 000000000..a9f882389 --- /dev/null +++ b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs @@ -0,0 +1,60 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PageSpeed.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PageSpeed.Types + ( + -- * Service URL + pageSpeedURL + + -- * PagespeedAPIImageV2 + , PagespeedAPIImageV2 + , pagespeedAPIImageV2 + , paivHeight + , paivData + , paivMimeType + , paivWidth + , paivPageRect + , paivKey + + -- * Result + , Result + , result + , rScreenshot + , rKind + , rResponseCode + , rInvalidRules + , rFormattedResults + , rVersion + , rRuleGroups + , rPageStats + , rId + , rTitle + + -- * PagespeedAPIFormatStringV2 + , PagespeedAPIFormatStringV2 + , pagespeedAPIFormatStringV2 + , pafsvArgs + , pafsvFormat + ) where + +import Network.Google.PageSpeed.Types.Product +import Network.Google.PageSpeed.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the PageSpeed Insights API. +pageSpeedURL :: BaseURL +pageSpeedURL + = BaseUrl Https + "https://www.googleapis.com/pagespeedonline/v2/" + 443 diff --git a/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs new file mode 100644 index 000000000..cd9f66a34 --- /dev/null +++ b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs @@ -0,0 +1,299 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PageSpeed.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PageSpeed.Types.Product where + +import Network.Google.PageSpeed.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'pagespeedAPIImageV2' smart constructor. +data PagespeedAPIImageV2 = PagespeedAPIImageV2 + { _paivHeight :: !(Maybe Int32) + , _paivData :: !(Maybe Word8) + , _paivMimeType :: !(Maybe Text) + , _paivWidth :: !(Maybe Int32) + , _paivPageRect :: !(Maybe PagespeedAPIImageV2Page_rect) + , _paivKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagespeedAPIImageV2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'paivHeight' +-- +-- * 'paivData' +-- +-- * 'paivMimeType' +-- +-- * 'paivWidth' +-- +-- * 'paivPageRect' +-- +-- * 'paivKey' +pagespeedAPIImageV2 + :: PagespeedAPIImageV2 +pagespeedAPIImageV2 = + PagespeedAPIImageV2 + { _paivHeight = Nothing + , _paivData = Nothing + , _paivMimeType = Nothing + , _paivWidth = Nothing + , _paivPageRect = Nothing + , _paivKey = Nothing + } + +-- | Height of screenshot in pixels. +paivHeight :: Lens' PagespeedAPIImageV2 (Maybe Int32) +paivHeight + = lens _paivHeight (\ s a -> s{_paivHeight = a}) + +-- | Image data base64 encoded. +paivData :: Lens' PagespeedAPIImageV2 (Maybe Word8) +paivData = lens _paivData (\ s a -> s{_paivData = a}) + +-- | Mime type of image data (e.g. \"image\/jpeg\"). +paivMimeType :: Lens' PagespeedAPIImageV2 (Maybe Text) +paivMimeType + = lens _paivMimeType (\ s a -> s{_paivMimeType = a}) + +-- | Width of screenshot in pixels. +paivWidth :: Lens' PagespeedAPIImageV2 (Maybe Int32) +paivWidth + = lens _paivWidth (\ s a -> s{_paivWidth = a}) + +-- | The region of the page that is captured by this image, with dimensions +-- measured in CSS pixels. +paivPageRect :: Lens' PagespeedAPIImageV2 (Maybe PagespeedAPIImageV2Page_rect) +paivPageRect + = lens _paivPageRect (\ s a -> s{_paivPageRect = a}) + +-- | Unique string key, if any, identifying this image. +paivKey :: Lens' PagespeedAPIImageV2 (Maybe Text) +paivKey = lens _paivKey (\ s a -> s{_paivKey = a}) + +instance FromJSON PagespeedAPIImageV2 where + parseJSON + = withObject "PagespeedAPIImageV2" + (\ o -> + PagespeedAPIImageV2 <$> + (o .:? "height") <*> (o .:? "data") <*> + (o .:? "mime_type") + <*> (o .:? "width") + <*> (o .:? "page_rect") + <*> (o .:? "key")) + +instance ToJSON PagespeedAPIImageV2 where + toJSON PagespeedAPIImageV2{..} + = object + (catMaybes + [("height" .=) <$> _paivHeight, + ("data" .=) <$> _paivData, + ("mime_type" .=) <$> _paivMimeType, + ("width" .=) <$> _paivWidth, + ("page_rect" .=) <$> _paivPageRect, + ("key" .=) <$> _paivKey]) + +-- +-- /See:/ 'result' smart constructor. +data Result = Result + { _rScreenshot :: !(Maybe (Maybe PagespeedAPIImageV2)) + , _rKind :: !Text + , _rResponseCode :: !(Maybe Int32) + , _rInvalidRules :: !(Maybe [Text]) + , _rFormattedResults :: !(Maybe ResultFormattedResults) + , _rVersion :: !(Maybe ResultVersion) + , _rRuleGroups :: !(Maybe ResultRuleGroups) + , _rPageStats :: !(Maybe ResultPageStats) + , _rId :: !(Maybe Text) + , _rTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Result' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rScreenshot' +-- +-- * 'rKind' +-- +-- * 'rResponseCode' +-- +-- * 'rInvalidRules' +-- +-- * 'rFormattedResults' +-- +-- * 'rVersion' +-- +-- * 'rRuleGroups' +-- +-- * 'rPageStats' +-- +-- * 'rId' +-- +-- * 'rTitle' +result + :: Result +result = + Result + { _rScreenshot = Nothing + , _rKind = "pagespeedonline#result" + , _rResponseCode = Nothing + , _rInvalidRules = Nothing + , _rFormattedResults = Nothing + , _rVersion = Nothing + , _rRuleGroups = Nothing + , _rPageStats = Nothing + , _rId = Nothing + , _rTitle = Nothing + } + +-- | Base64-encoded screenshot of the page that was analyzed. +rScreenshot :: Lens' Result (Maybe (Maybe PagespeedAPIImageV2)) +rScreenshot + = lens _rScreenshot (\ s a -> s{_rScreenshot = a}) + +-- | Kind of result. +rKind :: Lens' Result Text +rKind = lens _rKind (\ s a -> s{_rKind = a}) + +-- | Response code for the document. 200 indicates a normal page load. +-- 4xx\/5xx indicates an error. +rResponseCode :: Lens' Result (Maybe Int32) +rResponseCode + = lens _rResponseCode + (\ s a -> s{_rResponseCode = a}) + +-- | List of rules that were specified in the request, but which the server +-- did not know how to instantiate. +rInvalidRules :: Lens' Result [Text] +rInvalidRules + = lens _rInvalidRules + (\ s a -> s{_rInvalidRules = a}) + . _Default + . _Coerce + +-- | Localized PageSpeed results. Contains a ruleResults entry for each +-- PageSpeed rule instantiated and run by the server. +rFormattedResults :: Lens' Result (Maybe ResultFormattedResults) +rFormattedResults + = lens _rFormattedResults + (\ s a -> s{_rFormattedResults = a}) + +-- | The version of PageSpeed used to generate these results. +rVersion :: Lens' Result (Maybe ResultVersion) +rVersion = lens _rVersion (\ s a -> s{_rVersion = a}) + +-- | A map with one entry for each rule group in these results. +rRuleGroups :: Lens' Result (Maybe ResultRuleGroups) +rRuleGroups + = lens _rRuleGroups (\ s a -> s{_rRuleGroups = a}) + +-- | Summary statistics for the page, such as number of JavaScript bytes, +-- number of HTML bytes, etc. +rPageStats :: Lens' Result (Maybe ResultPageStats) +rPageStats + = lens _rPageStats (\ s a -> s{_rPageStats = a}) + +-- | Canonicalized and final URL for the document, after following page +-- redirects (if any). +rId :: Lens' Result (Maybe Text) +rId = lens _rId (\ s a -> s{_rId = a}) + +-- | Title of the page, as displayed in the browser\'s title bar. +rTitle :: Lens' Result (Maybe Text) +rTitle = lens _rTitle (\ s a -> s{_rTitle = a}) + +instance FromJSON Result where + parseJSON + = withObject "Result" + (\ o -> + Result <$> + (o .:? "screenshot") <*> + (o .:? "kind" .!= "pagespeedonline#result") + <*> (o .:? "responseCode") + <*> (o .:? "invalidRules" .!= mempty) + <*> (o .:? "formattedResults") + <*> (o .:? "version") + <*> (o .:? "ruleGroups") + <*> (o .:? "pageStats") + <*> (o .:? "id") + <*> (o .:? "title")) + +instance ToJSON Result where + toJSON Result{..} + = object + (catMaybes + [("screenshot" .=) <$> _rScreenshot, + Just ("kind" .= _rKind), + ("responseCode" .=) <$> _rResponseCode, + ("invalidRules" .=) <$> _rInvalidRules, + ("formattedResults" .=) <$> _rFormattedResults, + ("version" .=) <$> _rVersion, + ("ruleGroups" .=) <$> _rRuleGroups, + ("pageStats" .=) <$> _rPageStats, ("id" .=) <$> _rId, + ("title" .=) <$> _rTitle]) + +-- +-- /See:/ 'pagespeedAPIFormatStringV2' smart constructor. +data PagespeedAPIFormatStringV2 = PagespeedAPIFormatStringV2 + { _pafsvArgs :: !(Maybe [PagespeedAPIFormatStringV2ArgsItem]) + , _pafsvFormat :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagespeedAPIFormatStringV2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pafsvArgs' +-- +-- * 'pafsvFormat' +pagespeedAPIFormatStringV2 + :: PagespeedAPIFormatStringV2 +pagespeedAPIFormatStringV2 = + PagespeedAPIFormatStringV2 + { _pafsvArgs = Nothing + , _pafsvFormat = Nothing + } + +-- | List of arguments for the format string. +pafsvArgs :: Lens' PagespeedAPIFormatStringV2 [PagespeedAPIFormatStringV2ArgsItem] +pafsvArgs + = lens _pafsvArgs (\ s a -> s{_pafsvArgs = a}) . + _Default + . _Coerce + +-- | A localized format string with {{FOO}} placeholders, where \'FOO\' is +-- the key of the argument whose value should be substituted. For HYPERLINK +-- arguments, the format string will instead contain {{BEGIN_FOO}} and +-- {{END_FOO}} for the argument with key \'FOO\'. +pafsvFormat :: Lens' PagespeedAPIFormatStringV2 (Maybe Text) +pafsvFormat + = lens _pafsvFormat (\ s a -> s{_pafsvFormat = a}) + +instance FromJSON PagespeedAPIFormatStringV2 where + parseJSON + = withObject "PagespeedAPIFormatStringV2" + (\ o -> + PagespeedAPIFormatStringV2 <$> + (o .:? "args" .!= mempty) <*> (o .:? "format")) + +instance ToJSON PagespeedAPIFormatStringV2 where + toJSON PagespeedAPIFormatStringV2{..} + = object + (catMaybes + [("args" .=) <$> _pafsvArgs, + ("format" .=) <$> _pafsvFormat]) diff --git a/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs new file mode 100644 index 000000000..0db701afc --- /dev/null +++ b/gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PageSpeed.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PageSpeed.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hs b/gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hs new file mode 100644 index 000000000..0a7e0078d --- /dev/null +++ b/gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hs @@ -0,0 +1,219 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Runs PageSpeed analysis on the page at the specified URL, and returns +-- PageSpeed scores, a list of suggestions to make that page faster, and +-- other information. +-- +-- /See:/ for @PagespeedonlinePagespeedapiRunpagespeed@. +module Pagespeedonline.Pagespeedapi.Runpagespeed + ( + -- * REST Resource + PagespeedapiRunpagespeedAPI + + -- * Creating a Request + , pagespeedapiRunpagespeed + , PagespeedapiRunpagespeed + + -- * Request Lenses + , prScreenshot + , prQuotaUser + , prPrettyPrint + , prUserIp + , prLocale + , prUrl + , prFilterThirdPartyResources + , prStrategy + , prRule + , prKey + , prOauthToken + , prFields + , prAlt + ) where + +import Network.Google.PageSpeed.Types +import Network.Google.Prelude + +-- | A resource alias for @PagespeedonlinePagespeedapiRunpagespeed@ which the +-- 'PagespeedapiRunpagespeed' request conforms to. +type PagespeedapiRunpagespeedAPI = + "runPagespeed" :> + QueryParam "screenshot" Bool :> + QueryParam "locale" Text :> + QueryParam "url" Text :> + QueryParam "filter_third_party_resources" Bool :> + QueryParam "strategy" Text :> + QueryParams "rule" Text :> Get '[JSON] Result + +-- | Runs PageSpeed analysis on the page at the specified URL, and returns +-- PageSpeed scores, a list of suggestions to make that page faster, and +-- other information. +-- +-- /See:/ 'pagespeedapiRunpagespeed' smart constructor. +data PagespeedapiRunpagespeed = PagespeedapiRunpagespeed + { _prScreenshot :: !Bool + , _prQuotaUser :: !(Maybe Text) + , _prPrettyPrint :: !Bool + , _prUserIp :: !(Maybe Text) + , _prLocale :: !(Maybe Text) + , _prUrl :: !Text + , _prFilterThirdPartyResources :: !Bool + , _prStrategy :: !(Maybe Text) + , _prRule :: !(Maybe Text) + , _prKey :: !(Maybe Text) + , _prOauthToken :: !(Maybe Text) + , _prFields :: !(Maybe Text) + , _prAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PagespeedapiRunpagespeed'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prScreenshot' +-- +-- * 'prQuotaUser' +-- +-- * 'prPrettyPrint' +-- +-- * 'prUserIp' +-- +-- * 'prLocale' +-- +-- * 'prUrl' +-- +-- * 'prFilterThirdPartyResources' +-- +-- * 'prStrategy' +-- +-- * 'prRule' +-- +-- * 'prKey' +-- +-- * 'prOauthToken' +-- +-- * 'prFields' +-- +-- * 'prAlt' +pagespeedapiRunpagespeed + :: Text -- ^ 'url' + -> PagespeedapiRunpagespeed +pagespeedapiRunpagespeed pPrUrl_ = + PagespeedapiRunpagespeed + { _prScreenshot = False + , _prQuotaUser = Nothing + , _prPrettyPrint = True + , _prUserIp = Nothing + , _prLocale = Nothing + , _prUrl = pPrUrl_ + , _prFilterThirdPartyResources = False + , _prStrategy = Nothing + , _prRule = Nothing + , _prKey = Nothing + , _prOauthToken = Nothing + , _prFields = Nothing + , _prAlt = "json" + } + +-- | Indicates if binary data containing a screenshot should be included +prScreenshot :: Lens' PagespeedapiRunpagespeed' Bool +prScreenshot + = lens _prScreenshot (\ s a -> s{_prScreenshot = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prQuotaUser :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prQuotaUser + = lens _prQuotaUser (\ s a -> s{_prQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prPrettyPrint :: Lens' PagespeedapiRunpagespeed' Bool +prPrettyPrint + = lens _prPrettyPrint + (\ s a -> s{_prPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prUserIp :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prUserIp = lens _prUserIp (\ s a -> s{_prUserIp = a}) + +-- | The locale used to localize formatted results +prLocale :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prLocale = lens _prLocale (\ s a -> s{_prLocale = a}) + +-- | The URL to fetch and analyze +prUrl :: Lens' PagespeedapiRunpagespeed' Text +prUrl = lens _prUrl (\ s a -> s{_prUrl = a}) + +-- | Indicates if third party resources should be filtered out before +-- PageSpeed analysis. +prFilterThirdPartyResources :: Lens' PagespeedapiRunpagespeed' Bool +prFilterThirdPartyResources + = lens _prFilterThirdPartyResources + (\ s a -> s{_prFilterThirdPartyResources = a}) + +-- | The analysis strategy to use +prStrategy :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prStrategy + = lens _prStrategy (\ s a -> s{_prStrategy = a}) + +-- | A PageSpeed rule to run; if none are given, all rules are run +prRule :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prRule = lens _prRule (\ s a -> s{_prRule = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prKey :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prKey = lens _prKey (\ s a -> s{_prKey = a}) + +-- | OAuth 2.0 token for the current user. +prOauthToken :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prOauthToken + = lens _prOauthToken (\ s a -> s{_prOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prFields :: Lens' PagespeedapiRunpagespeed' (Maybe Text) +prFields = lens _prFields (\ s a -> s{_prFields = a}) + +-- | Data format for the response. +prAlt :: Lens' PagespeedapiRunpagespeed' Text +prAlt = lens _prAlt (\ s a -> s{_prAlt = a}) + +instance GoogleRequest PagespeedapiRunpagespeed' + where + type Rs PagespeedapiRunpagespeed' = Result + request = requestWithRoute defReq pageSpeedURL + requestWithRoute r u PagespeedapiRunpagespeed{..} + = go (Just _prScreenshot) _prQuotaUser _prPrettyPrint + _prUserIp + _prLocale + (Just _prUrl) + (Just _prFilterThirdPartyResources) + _prStrategy + _prRule + _prKey + _prOauthToken + _prFields + _prAlt + where go + = clientWithRoute + (Proxy :: Proxy PagespeedapiRunpagespeedAPI) + r + u diff --git a/gogol-pagespeed/gogol-pagespeed.cabal b/gogol-pagespeed/gogol-pagespeed.cabal new file mode 100644 index 000000000..2384a07f6 --- /dev/null +++ b/gogol-pagespeed/gogol-pagespeed.cabal @@ -0,0 +1,44 @@ +name: gogol-pagespeed +version: 0.0.1 +synopsis: PageSpeed Insights API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you analyze the performance of a web page and get tailored + suggestions to make that page faster. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PageSpeed + , Network.Google.PageSpeed.Types + , Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed + + other-modules: + Network.Google.PageSpeed.Types.Product + , Network.Google.PageSpeed.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-pagespeed/src/.gitkeep b/gogol-pagespeed/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-partners/LICENSE b/gogol-partners/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-partners/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-partners/Makefile b/gogol-partners/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-partners/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-partners/README.md b/gogol-partners/README.md new file mode 100644 index 000000000..cb7af6c46 --- /dev/null +++ b/gogol-partners/README.md @@ -0,0 +1,28 @@ +# gogol-partners + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Partners API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-partners` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-partners/Setup.hs b/gogol-partners/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-partners/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-partners/gen/Network/Google/Partners.hs b/gogol-partners/gen/Network/Google/Partners.hs new file mode 100644 index 000000000..9a432be04 --- /dev/null +++ b/gogol-partners/gen/Network/Google/Partners.hs @@ -0,0 +1,260 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Partners +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets advertisers search certified companies and create contact leads +-- with them, and also audits the usage of clients. +-- +-- /See:/ +module Network.Google.Partners + ( + -- * API + PartnersAPI + , partnersAPI + , partnersURL + + -- * Service Methods + + -- * REST Resources + + -- ** PartnersClientMessagesLog + , module Partners.ClientMessages.Log + + -- ** PartnersCompaniesGet + , module Partners.Companies.Get + + -- ** PartnersCompaniesLeadsCreate + , module Partners.Companies.Leads.Create + + -- ** PartnersCompaniesList + , module Partners.Companies.List + + -- ** PartnersUserEventsLog + , module Partners.UserEvents.Log + + -- ** PartnersUserStatesList + , module Partners.UserStates.List + + -- * Types + + -- ** EventData + , EventData + , eventData + , edValues + , edKey + + -- ** LatLng + , LatLng + , latLng + , llLatitude + , llLongitude + + -- ** CertificationStatus + , CertificationStatus + , certificationStatus + , csIsCertified + , csType + , csExamStatuses + + -- ** RequestMetadata + , RequestMetadata + , requestMetadata + , rmExperimentIds + , rmTrafficSource + , rmLocale + , rmUserOverrides + , rmPartnersSessionId + + -- ** ListUserStatesResponse + , ListUserStatesResponse + , listUserStatesResponse + , lusrUserStates + , lusrResponseMetadata + + -- ** DebugInfo + , DebugInfo + , debugInfo + , diServiceUrl + , diServerTraceInfo + , diServerInfo + + -- ** GetCompanyResponse + , GetCompanyResponse + , getCompanyResponse + , gcrResponseMetadata + , gcrCompany + + -- ** PublicProfile + , PublicProfile + , publicProfile + , ppUrl + , ppDisplayImageUrl + , ppDisplayName + , ppId + + -- ** Location + , Location + , location + , lLatLng + , lAddress + + -- ** CertificationExamStatus + , CertificationExamStatus + , certificationExamStatus + , cesNumberUsersPass + , cesType + + -- ** TrafficSource + , TrafficSource + , trafficSource + , tsTrafficSubId + , tsTrafficSourceId + + -- ** Money + , Money + , money + , mCurrencyCode + , mNanos + , mUnits + + -- ** RecaptchaChallenge + , RecaptchaChallenge + , recaptchaChallenge + , rcResponse + , rcId + + -- ** ListCompaniesResponse + , ListCompaniesResponse + , listCompaniesResponse + , lcrNextPageToken + , lcrResponseMetadata + , lcrCompanies + + -- ** CreateLeadResponse + , CreateLeadResponse + , createLeadResponse + , clrRecaptchaStatus + , clrResponseMetadata + , clrLead + + -- ** LocalizedCompanyInfo + , LocalizedCompanyInfo + , localizedCompanyInfo + , lciLanguageCode + , lciOverview + , lciCountryCodes + , lciDisplayName + + -- ** ResponseMetadata + , ResponseMetadata + , responseMetadata + , rmDebugInfo + + -- ** LogMessageRequest + , LogMessageRequest + , logMessageRequest + , lmrRequestMetadata + , lmrClientInfo + , lmrDetails + , lmrLevel + + -- ** UserOverrides + , UserOverrides + , userOverrides + , uoIpAddress + , uoUserId + + -- ** LogMessageResponse + , LogMessageResponse + , logMessageResponse + , lmrResponseMetadata + + -- ** Lead + , Lead + , lead + , lGivenName + , lEmail + , lFamilyName + , lPhoneNumber + , lMinMonthlyBudget + , lId + , lComments + , lWebsiteUrl + , lType + , lGpsMotivations + + -- ** Company + , Company + , company + , cPublicProfile + , cOriginalMinMonthlyBudget + , cIndustries + , cConvertedMinMonthlyBudget + , cName + , cLocalizedInfos + , cCertificationStatuses + , cRanks + , cId + , cWebsiteUrl + , cLocations + , cServices + + -- ** LogUserEventResponse + , LogUserEventResponse + , logUserEventResponse + , luerResponseMetadata + + -- ** LogUserEventRequest + , LogUserEventRequest + , logUserEventRequest + , luerEventCategory + , luerRequestMetadata + , luerUrl + , luerEventScope + , luerLead + , luerEventDatas + , luerEventAction + + -- ** Rank + , Rank + , rank + , rValue + , rType + + -- ** CreateLeadRequest + , CreateLeadRequest + , createLeadRequest + , cRequestMetadata + , cRecaptchaChallenge + , cLead + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude +import Network.Google.Resource.Partners.ClientMessages.Log +import Network.Google.Resource.Partners.Companies.Get +import Network.Google.Resource.Partners.Companies.Leads.Create +import Network.Google.Resource.Partners.Companies.List +import Network.Google.Resource.Partners.UserEvents.Log +import Network.Google.Resource.Partners.UserStates.List + +{- $resources +TODO +-} + +type PartnersAPI = + UserStates :<|> UserEvents :<|> ClientMessages :<|> + Companies + +partnersAPI :: Proxy PartnersAPI +partnersAPI = Proxy diff --git a/gogol-partners/gen/Network/Google/Partners/Types.hs b/gogol-partners/gen/Network/Google/Partners/Types.hs new file mode 100644 index 000000000..346b57b64 --- /dev/null +++ b/gogol-partners/gen/Network/Google/Partners/Types.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Partners.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Partners.Types + ( + -- * Service URL + partnersURL + + -- * EventData + , EventData + , eventData + , edValues + , edKey + + -- * LatLng + , LatLng + , latLng + , llLatitude + , llLongitude + + -- * CertificationStatus + , CertificationStatus + , certificationStatus + , csIsCertified + , csType + , csExamStatuses + + -- * RequestMetadata + , RequestMetadata + , requestMetadata + , rmExperimentIds + , rmTrafficSource + , rmLocale + , rmUserOverrides + , rmPartnersSessionId + + -- * ListUserStatesResponse + , ListUserStatesResponse + , listUserStatesResponse + , lusrUserStates + , lusrResponseMetadata + + -- * DebugInfo + , DebugInfo + , debugInfo + , diServiceUrl + , diServerTraceInfo + , diServerInfo + + -- * GetCompanyResponse + , GetCompanyResponse + , getCompanyResponse + , gcrResponseMetadata + , gcrCompany + + -- * PublicProfile + , PublicProfile + , publicProfile + , ppUrl + , ppDisplayImageUrl + , ppDisplayName + , ppId + + -- * Location + , Location + , location + , lLatLng + , lAddress + + -- * CertificationExamStatus + , CertificationExamStatus + , certificationExamStatus + , cesNumberUsersPass + , cesType + + -- * TrafficSource + , TrafficSource + , trafficSource + , tsTrafficSubId + , tsTrafficSourceId + + -- * Money + , Money + , money + , mCurrencyCode + , mNanos + , mUnits + + -- * RecaptchaChallenge + , RecaptchaChallenge + , recaptchaChallenge + , rcResponse + , rcId + + -- * ListCompaniesResponse + , ListCompaniesResponse + , listCompaniesResponse + , lcrNextPageToken + , lcrResponseMetadata + , lcrCompanies + + -- * CreateLeadResponse + , CreateLeadResponse + , createLeadResponse + , clrRecaptchaStatus + , clrResponseMetadata + , clrLead + + -- * LocalizedCompanyInfo + , LocalizedCompanyInfo + , localizedCompanyInfo + , lciLanguageCode + , lciOverview + , lciCountryCodes + , lciDisplayName + + -- * ResponseMetadata + , ResponseMetadata + , responseMetadata + , rmDebugInfo + + -- * LogMessageRequest + , LogMessageRequest + , logMessageRequest + , lmrRequestMetadata + , lmrClientInfo + , lmrDetails + , lmrLevel + + -- * UserOverrides + , UserOverrides + , userOverrides + , uoIpAddress + , uoUserId + + -- * LogMessageResponse + , LogMessageResponse + , logMessageResponse + , lmrResponseMetadata + + -- * Lead + , Lead + , lead + , lGivenName + , lEmail + , lFamilyName + , lPhoneNumber + , lMinMonthlyBudget + , lId + , lComments + , lWebsiteUrl + , lType + , lGpsMotivations + + -- * Company + , Company + , company + , cPublicProfile + , cOriginalMinMonthlyBudget + , cIndustries + , cConvertedMinMonthlyBudget + , cName + , cLocalizedInfos + , cCertificationStatuses + , cRanks + , cId + , cWebsiteUrl + , cLocations + , cServices + + -- * LogUserEventResponse + , LogUserEventResponse + , logUserEventResponse + , luerResponseMetadata + + -- * LogUserEventRequest + , LogUserEventRequest + , logUserEventRequest + , luerEventCategory + , luerRequestMetadata + , luerUrl + , luerEventScope + , luerLead + , luerEventDatas + , luerEventAction + + -- * Rank + , Rank + , rank + , rValue + , rType + + -- * CreateLeadRequest + , CreateLeadRequest + , createLeadRequest + , cRequestMetadata + , cRecaptchaChallenge + , cLead + ) where + +import Network.Google.Partners.Types.Product +import Network.Google.Partners.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google Partners API. +partnersURL :: BaseURL +partnersURL + = BaseUrl Https "https://partners.googleapis.com/" + 443 diff --git a/gogol-partners/gen/Network/Google/Partners/Types/Product.hs b/gogol-partners/gen/Network/Google/Partners/Types/Product.hs new file mode 100644 index 000000000..4b75d27c4 --- /dev/null +++ b/gogol-partners/gen/Network/Google/Partners/Types/Product.hs @@ -0,0 +1,1716 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Partners.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Partners.Types.Product where + +import Network.Google.Partners.Types.Sum +import Network.Google.Prelude + +-- | Key value data pair for an event. +-- +-- /See:/ 'eventData' smart constructor. +data EventData = EventData + { _edValues :: !(Maybe [Text]) + , _edKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edValues' +-- +-- * 'edKey' +eventData + :: EventData +eventData = + EventData + { _edValues = Nothing + , _edKey = Nothing + } + +-- | Data values. +edValues :: Lens' EventData [Text] +edValues + = lens _edValues (\ s a -> s{_edValues = a}) . + _Default + . _Coerce + +-- | Data type. +edKey :: Lens' EventData (Maybe Text) +edKey = lens _edKey (\ s a -> s{_edKey = a}) + +instance FromJSON EventData where + parseJSON + = withObject "EventData" + (\ o -> + EventData <$> + (o .:? "values" .!= mempty) <*> (o .:? "key")) + +instance ToJSON EventData where + toJSON EventData{..} + = object + (catMaybes + [("values" .=) <$> _edValues, ("key" .=) <$> _edKey]) + +-- | An object representing a latitude\/longitude pair. This is expressed as +-- a pair of doubles representing degrees latitude and degrees longitude. +-- Unless specified otherwise, this must conform to the WGS84 standard. +-- Values must be within normalized ranges. Example of normalization code +-- in Python: def NormalizeLongitude(longitude): \"\"\"Wrapsdecimal degrees +-- longitude to [-180.0, 180.0].\"\"\" q, r = divmod(longitude, 360.0) if r +-- > 180.0 or (r == 180.0 and q \<= -1.0): return r - 360.0 return r def +-- NormalizeLatLng(latitude, longitude): \"\"\"Wraps decimal degrees +-- latitude and longitude to [-180.0, 180.0] and [-90.0, 90.0], +-- respectively.\"\"\" r = latitude % 360.0 if r = 270.0: return r - 360, +-- NormalizeLongitude(longitude) else: return 180 - r, +-- NormalizeLongitude(longitude + 180.0) assert 180.0 == +-- NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) +-- assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == +-- NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, +-- 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, +-- -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == +-- NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == +-- NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == +-- NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == +-- NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == +-- NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == +-- NormalizeLatLng(-270.0, 10.0) +-- +-- /See:/ 'latLng' smart constructor. +data LatLng = LatLng + { _llLatitude :: !(Maybe Double) + , _llLongitude :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LatLng' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llLatitude' +-- +-- * 'llLongitude' +latLng + :: LatLng +latLng = + LatLng + { _llLatitude = Nothing + , _llLongitude = Nothing + } + +-- | The latitude in degrees. It must be in the range [-90.0, +90.0]. +llLatitude :: Lens' LatLng (Maybe Double) +llLatitude + = lens _llLatitude (\ s a -> s{_llLatitude = a}) + +-- | The longitude in degrees. It must be in the range [-180.0, +180.0]. +llLongitude :: Lens' LatLng (Maybe Double) +llLongitude + = lens _llLongitude (\ s a -> s{_llLongitude = a}) + +instance FromJSON LatLng where + parseJSON + = withObject "LatLng" + (\ o -> + LatLng <$> + (o .:? "latitude") <*> (o .:? "longitude")) + +instance ToJSON LatLng where + toJSON LatLng{..} + = object + (catMaybes + [("latitude" .=) <$> _llLatitude, + ("longitude" .=) <$> _llLongitude]) + +-- | Google Partners certification status. +-- +-- /See:/ 'certificationStatus' smart constructor. +data CertificationStatus = CertificationStatus + { _csIsCertified :: !(Maybe Bool) + , _csType :: !(Maybe Text) + , _csExamStatuses :: !(Maybe [Maybe CertificationExamStatus]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CertificationStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csIsCertified' +-- +-- * 'csType' +-- +-- * 'csExamStatuses' +certificationStatus + :: CertificationStatus +certificationStatus = + CertificationStatus + { _csIsCertified = Nothing + , _csType = Nothing + , _csExamStatuses = Nothing + } + +-- | Whether certification is passing. +csIsCertified :: Lens' CertificationStatus (Maybe Bool) +csIsCertified + = lens _csIsCertified + (\ s a -> s{_csIsCertified = a}) + +-- | The type of the certification. +csType :: Lens' CertificationStatus (Maybe Text) +csType = lens _csType (\ s a -> s{_csType = a}) + +-- | List of certification exam statuses. +csExamStatuses :: Lens' CertificationStatus [Maybe CertificationExamStatus] +csExamStatuses + = lens _csExamStatuses + (\ s a -> s{_csExamStatuses = a}) + . _Default + . _Coerce + +instance FromJSON CertificationStatus where + parseJSON + = withObject "CertificationStatus" + (\ o -> + CertificationStatus <$> + (o .:? "isCertified") <*> (o .:? "type") <*> + (o .:? "examStatuses" .!= mempty)) + +instance ToJSON CertificationStatus where + toJSON CertificationStatus{..} + = object + (catMaybes + [("isCertified" .=) <$> _csIsCertified, + ("type" .=) <$> _csType, + ("examStatuses" .=) <$> _csExamStatuses]) + +-- | Common data that is in each API request. +-- +-- /See:/ 'requestMetadata' smart constructor. +data RequestMetadata = RequestMetadata + { _rmExperimentIds :: !(Maybe [Text]) + , _rmTrafficSource :: !(Maybe (Maybe TrafficSource)) + , _rmLocale :: !(Maybe Text) + , _rmUserOverrides :: !(Maybe (Maybe UserOverrides)) + , _rmPartnersSessionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RequestMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmExperimentIds' +-- +-- * 'rmTrafficSource' +-- +-- * 'rmLocale' +-- +-- * 'rmUserOverrides' +-- +-- * 'rmPartnersSessionId' +requestMetadata + :: RequestMetadata +requestMetadata = + RequestMetadata + { _rmExperimentIds = Nothing + , _rmTrafficSource = Nothing + , _rmLocale = Nothing + , _rmUserOverrides = Nothing + , _rmPartnersSessionId = Nothing + } + +-- | Experiment IDs the current request belongs to. +rmExperimentIds :: Lens' RequestMetadata [Text] +rmExperimentIds + = lens _rmExperimentIds + (\ s a -> s{_rmExperimentIds = a}) + . _Default + . _Coerce + +-- | Source of traffic for the current request. +rmTrafficSource :: Lens' RequestMetadata (Maybe (Maybe TrafficSource)) +rmTrafficSource + = lens _rmTrafficSource + (\ s a -> s{_rmTrafficSource = a}) + +-- | Locale to use for the current request. +rmLocale :: Lens' RequestMetadata (Maybe Text) +rmLocale = lens _rmLocale (\ s a -> s{_rmLocale = a}) + +-- | Values to use instead of the user\'s respective defaults for the current +-- request. These are only honored by whitelisted products. +rmUserOverrides :: Lens' RequestMetadata (Maybe (Maybe UserOverrides)) +rmUserOverrides + = lens _rmUserOverrides + (\ s a -> s{_rmUserOverrides = a}) + +-- | Google Partners session ID. +rmPartnersSessionId :: Lens' RequestMetadata (Maybe Text) +rmPartnersSessionId + = lens _rmPartnersSessionId + (\ s a -> s{_rmPartnersSessionId = a}) + +instance FromJSON RequestMetadata where + parseJSON + = withObject "RequestMetadata" + (\ o -> + RequestMetadata <$> + (o .:? "experimentIds" .!= mempty) <*> + (o .:? "trafficSource") + <*> (o .:? "locale") + <*> (o .:? "userOverrides") + <*> (o .:? "partnersSessionId")) + +instance ToJSON RequestMetadata where + toJSON RequestMetadata{..} + = object + (catMaybes + [("experimentIds" .=) <$> _rmExperimentIds, + ("trafficSource" .=) <$> _rmTrafficSource, + ("locale" .=) <$> _rmLocale, + ("userOverrides" .=) <$> _rmUserOverrides, + ("partnersSessionId" .=) <$> _rmPartnersSessionId]) + +-- | Response message for ListUserStates. +-- +-- /See:/ 'listUserStatesResponse' smart constructor. +data ListUserStatesResponse = ListUserStatesResponse + { _lusrUserStates :: !(Maybe [Text]) + , _lusrResponseMetadata :: !(Maybe (Maybe ResponseMetadata)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListUserStatesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lusrUserStates' +-- +-- * 'lusrResponseMetadata' +listUserStatesResponse + :: ListUserStatesResponse +listUserStatesResponse = + ListUserStatesResponse + { _lusrUserStates = Nothing + , _lusrResponseMetadata = Nothing + } + +-- | User\'s states. +lusrUserStates :: Lens' ListUserStatesResponse [Text] +lusrUserStates + = lens _lusrUserStates + (\ s a -> s{_lusrUserStates = a}) + . _Default + . _Coerce + +-- | Current response metadata. +lusrResponseMetadata :: Lens' ListUserStatesResponse (Maybe (Maybe ResponseMetadata)) +lusrResponseMetadata + = lens _lusrResponseMetadata + (\ s a -> s{_lusrResponseMetadata = a}) + +instance FromJSON ListUserStatesResponse where + parseJSON + = withObject "ListUserStatesResponse" + (\ o -> + ListUserStatesResponse <$> + (o .:? "userStates" .!= mempty) <*> + (o .:? "responseMetadata")) + +instance ToJSON ListUserStatesResponse where + toJSON ListUserStatesResponse{..} + = object + (catMaybes + [("userStates" .=) <$> _lusrUserStates, + ("responseMetadata" .=) <$> _lusrResponseMetadata]) + +-- | Debug information about this request. +-- +-- /See:/ 'debugInfo' smart constructor. +data DebugInfo = DebugInfo + { _diServiceUrl :: !(Maybe Text) + , _diServerTraceInfo :: !(Maybe Text) + , _diServerInfo :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DebugInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diServiceUrl' +-- +-- * 'diServerTraceInfo' +-- +-- * 'diServerInfo' +debugInfo + :: DebugInfo +debugInfo = + DebugInfo + { _diServiceUrl = Nothing + , _diServerTraceInfo = Nothing + , _diServerInfo = Nothing + } + +-- | URL of the service that handled this request. +diServiceUrl :: Lens' DebugInfo (Maybe Text) +diServiceUrl + = lens _diServiceUrl (\ s a -> s{_diServiceUrl = a}) + +-- | Server-side debug stack trace. +diServerTraceInfo :: Lens' DebugInfo (Maybe Text) +diServerTraceInfo + = lens _diServerTraceInfo + (\ s a -> s{_diServerTraceInfo = a}) + +-- | Info about the server that serviced this request. +diServerInfo :: Lens' DebugInfo (Maybe Text) +diServerInfo + = lens _diServerInfo (\ s a -> s{_diServerInfo = a}) + +instance FromJSON DebugInfo where + parseJSON + = withObject "DebugInfo" + (\ o -> + DebugInfo <$> + (o .:? "serviceUrl") <*> (o .:? "serverTraceInfo") + <*> (o .:? "serverInfo")) + +instance ToJSON DebugInfo where + toJSON DebugInfo{..} + = object + (catMaybes + [("serviceUrl" .=) <$> _diServiceUrl, + ("serverTraceInfo" .=) <$> _diServerTraceInfo, + ("serverInfo" .=) <$> _diServerInfo]) + +-- | Response message for GetCompany. +-- +-- /See:/ 'getCompanyResponse' smart constructor. +data GetCompanyResponse = GetCompanyResponse + { _gcrResponseMetadata :: !(Maybe (Maybe ResponseMetadata)) + , _gcrCompany :: !(Maybe (Maybe Company)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetCompanyResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gcrResponseMetadata' +-- +-- * 'gcrCompany' +getCompanyResponse + :: GetCompanyResponse +getCompanyResponse = + GetCompanyResponse + { _gcrResponseMetadata = Nothing + , _gcrCompany = Nothing + } + +-- | Current response metadata. +gcrResponseMetadata :: Lens' GetCompanyResponse (Maybe (Maybe ResponseMetadata)) +gcrResponseMetadata + = lens _gcrResponseMetadata + (\ s a -> s{_gcrResponseMetadata = a}) + +-- | The company. +gcrCompany :: Lens' GetCompanyResponse (Maybe (Maybe Company)) +gcrCompany + = lens _gcrCompany (\ s a -> s{_gcrCompany = a}) + +instance FromJSON GetCompanyResponse where + parseJSON + = withObject "GetCompanyResponse" + (\ o -> + GetCompanyResponse <$> + (o .:? "responseMetadata") <*> (o .:? "company")) + +instance ToJSON GetCompanyResponse where + toJSON GetCompanyResponse{..} + = object + (catMaybes + [("responseMetadata" .=) <$> _gcrResponseMetadata, + ("company" .=) <$> _gcrCompany]) + +-- | Basic information from a public profile. +-- +-- /See:/ 'publicProfile' smart constructor. +data PublicProfile = PublicProfile + { _ppUrl :: !(Maybe Text) + , _ppDisplayImageUrl :: !(Maybe Text) + , _ppDisplayName :: !(Maybe Text) + , _ppId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublicProfile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppUrl' +-- +-- * 'ppDisplayImageUrl' +-- +-- * 'ppDisplayName' +-- +-- * 'ppId' +publicProfile + :: PublicProfile +publicProfile = + PublicProfile + { _ppUrl = Nothing + , _ppDisplayImageUrl = Nothing + , _ppDisplayName = Nothing + , _ppId = Nothing + } + +-- | The URL of the public profile. +ppUrl :: Lens' PublicProfile (Maybe Text) +ppUrl = lens _ppUrl (\ s a -> s{_ppUrl = a}) + +-- | The URL to the main display image of the public profile. +ppDisplayImageUrl :: Lens' PublicProfile (Maybe Text) +ppDisplayImageUrl + = lens _ppDisplayImageUrl + (\ s a -> s{_ppDisplayImageUrl = a}) + +-- | The display name of the public profile. +ppDisplayName :: Lens' PublicProfile (Maybe Text) +ppDisplayName + = lens _ppDisplayName + (\ s a -> s{_ppDisplayName = a}) + +-- | The ID which can be used to retrieve more details about the public +-- profile. +ppId :: Lens' PublicProfile (Maybe Text) +ppId = lens _ppId (\ s a -> s{_ppId = a}) + +instance FromJSON PublicProfile where + parseJSON + = withObject "PublicProfile" + (\ o -> + PublicProfile <$> + (o .:? "url") <*> (o .:? "displayImageUrl") <*> + (o .:? "displayName") + <*> (o .:? "id")) + +instance ToJSON PublicProfile where + toJSON PublicProfile{..} + = object + (catMaybes + [("url" .=) <$> _ppUrl, + ("displayImageUrl" .=) <$> _ppDisplayImageUrl, + ("displayName" .=) <$> _ppDisplayName, + ("id" .=) <$> _ppId]) + +-- | A location with address and geographic coordinates. +-- +-- /See:/ 'location' smart constructor. +data Location = Location + { _lLatLng :: !(Maybe (Maybe LatLng)) + , _lAddress :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Location' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lLatLng' +-- +-- * 'lAddress' +location + :: Location +location = + Location + { _lLatLng = Nothing + , _lAddress = Nothing + } + +-- | The latitude and longitude of the location, in degrees. +lLatLng :: Lens' Location (Maybe (Maybe LatLng)) +lLatLng = lens _lLatLng (\ s a -> s{_lLatLng = a}) + +-- | The complete address of the location. +lAddress :: Lens' Location (Maybe Text) +lAddress = lens _lAddress (\ s a -> s{_lAddress = a}) + +instance FromJSON Location where + parseJSON + = withObject "Location" + (\ o -> + Location <$> (o .:? "latLng") <*> (o .:? "address")) + +instance ToJSON Location where + toJSON Location{..} + = object + (catMaybes + [("latLng" .=) <$> _lLatLng, + ("address" .=) <$> _lAddress]) + +-- | Status for a Google Partners certification exam. +-- +-- /See:/ 'certificationExamStatus' smart constructor. +data CertificationExamStatus = CertificationExamStatus + { _cesNumberUsersPass :: !(Maybe Int32) + , _cesType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CertificationExamStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cesNumberUsersPass' +-- +-- * 'cesType' +certificationExamStatus + :: CertificationExamStatus +certificationExamStatus = + CertificationExamStatus + { _cesNumberUsersPass = Nothing + , _cesType = Nothing + } + +-- | The number of people who have passed the certification exam. +cesNumberUsersPass :: Lens' CertificationExamStatus (Maybe Int32) +cesNumberUsersPass + = lens _cesNumberUsersPass + (\ s a -> s{_cesNumberUsersPass = a}) + +-- | The type of certification exam. +cesType :: Lens' CertificationExamStatus (Maybe Text) +cesType = lens _cesType (\ s a -> s{_cesType = a}) + +instance FromJSON CertificationExamStatus where + parseJSON + = withObject "CertificationExamStatus" + (\ o -> + CertificationExamStatus <$> + (o .:? "numberUsersPass") <*> (o .:? "type")) + +instance ToJSON CertificationExamStatus where + toJSON CertificationExamStatus{..} + = object + (catMaybes + [("numberUsersPass" .=) <$> _cesNumberUsersPass, + ("type" .=) <$> _cesType]) + +-- | Source of traffic for the current request. +-- +-- /See:/ 'trafficSource' smart constructor. +data TrafficSource = TrafficSource + { _tsTrafficSubId :: !(Maybe Text) + , _tsTrafficSourceId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrafficSource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsTrafficSubId' +-- +-- * 'tsTrafficSourceId' +trafficSource + :: TrafficSource +trafficSource = + TrafficSource + { _tsTrafficSubId = Nothing + , _tsTrafficSourceId = Nothing + } + +-- | Second level identifier to indicate where the traffic comes from. An +-- identifier has multiple letters created by a team which redirected the +-- traffic to us. +tsTrafficSubId :: Lens' TrafficSource (Maybe Text) +tsTrafficSubId + = lens _tsTrafficSubId + (\ s a -> s{_tsTrafficSubId = a}) + +-- | Identifier to indicate where the traffic comes from. An identifier has +-- multiple letters created by a team which redirected the traffic to us. +tsTrafficSourceId :: Lens' TrafficSource (Maybe Text) +tsTrafficSourceId + = lens _tsTrafficSourceId + (\ s a -> s{_tsTrafficSourceId = a}) + +instance FromJSON TrafficSource where + parseJSON + = withObject "TrafficSource" + (\ o -> + TrafficSource <$> + (o .:? "trafficSubId") <*> (o .:? "trafficSourceId")) + +instance ToJSON TrafficSource where + toJSON TrafficSource{..} + = object + (catMaybes + [("trafficSubId" .=) <$> _tsTrafficSubId, + ("trafficSourceId" .=) <$> _tsTrafficSourceId]) + +-- | Represents an amount of money with its currency type. +-- +-- /See:/ 'money' smart constructor. +data Money = Money + { _mCurrencyCode :: !(Maybe Text) + , _mNanos :: !(Maybe Int32) + , _mUnits :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Money' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mCurrencyCode' +-- +-- * 'mNanos' +-- +-- * 'mUnits' +money + :: Money +money = + Money + { _mCurrencyCode = Nothing + , _mNanos = Nothing + , _mUnits = Nothing + } + +-- | The 3-letter currency code defined in ISO 4217. +mCurrencyCode :: Lens' Money (Maybe Text) +mCurrencyCode + = lens _mCurrencyCode + (\ s a -> s{_mCurrencyCode = a}) + +-- | Number of nano (10^-9) units of the amount. The value must be between +-- -999,999,999 and +999,999,999 inclusive. If \`units\` is positive, +-- \`nanos\` must be positive or zero. If \`units\` is zero, \`nanos\` can +-- be positive, zero, or negative. If \`units\` is negative, \`nanos\` must +-- be negative or zero. For example $-1.75 is represented as \`units\`=-1 +-- and \`nanos\`=-750,000,000. +mNanos :: Lens' Money (Maybe Int32) +mNanos = lens _mNanos (\ s a -> s{_mNanos = a}) + +-- | The whole units of the amount. For example if \`currencyCode\` is +-- \`\"USD\"\`, then 1 unit is one US dollar. +mUnits :: Lens' Money (Maybe Int64) +mUnits = lens _mUnits (\ s a -> s{_mUnits = a}) + +instance FromJSON Money where + parseJSON + = withObject "Money" + (\ o -> + Money <$> + (o .:? "currencyCode") <*> (o .:? "nanos") <*> + (o .:? "units")) + +instance ToJSON Money where + toJSON Money{..} + = object + (catMaybes + [("currencyCode" .=) <$> _mCurrencyCode, + ("nanos" .=) <$> _mNanos, ("units" .=) <$> _mUnits]) + +-- | reCaptcha challenge info. +-- +-- /See:/ 'recaptchaChallenge' smart constructor. +data RecaptchaChallenge = RecaptchaChallenge + { _rcResponse :: !(Maybe Text) + , _rcId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RecaptchaChallenge' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcResponse' +-- +-- * 'rcId' +recaptchaChallenge + :: RecaptchaChallenge +recaptchaChallenge = + RecaptchaChallenge + { _rcResponse = Nothing + , _rcId = Nothing + } + +-- | The response to the reCaptcha challenge. +rcResponse :: Lens' RecaptchaChallenge (Maybe Text) +rcResponse + = lens _rcResponse (\ s a -> s{_rcResponse = a}) + +-- | The ID of the reCaptcha challenge. +rcId :: Lens' RecaptchaChallenge (Maybe Text) +rcId = lens _rcId (\ s a -> s{_rcId = a}) + +instance FromJSON RecaptchaChallenge where + parseJSON + = withObject "RecaptchaChallenge" + (\ o -> + RecaptchaChallenge <$> + (o .:? "response") <*> (o .:? "id")) + +instance ToJSON RecaptchaChallenge where + toJSON RecaptchaChallenge{..} + = object + (catMaybes + [("response" .=) <$> _rcResponse, + ("id" .=) <$> _rcId]) + +-- | Response message for ListCompanies. +-- +-- /See:/ 'listCompaniesResponse' smart constructor. +data ListCompaniesResponse = ListCompaniesResponse + { _lcrNextPageToken :: !(Maybe Text) + , _lcrResponseMetadata :: !(Maybe (Maybe ResponseMetadata)) + , _lcrCompanies :: !(Maybe [Maybe Company]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListCompaniesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcrNextPageToken' +-- +-- * 'lcrResponseMetadata' +-- +-- * 'lcrCompanies' +listCompaniesResponse + :: ListCompaniesResponse +listCompaniesResponse = + ListCompaniesResponse + { _lcrNextPageToken = Nothing + , _lcrResponseMetadata = Nothing + , _lcrCompanies = Nothing + } + +-- | A token to retrieve next page of results. Pass this value in the +-- \`ListCompaniesRequest.page_token\` field in the subsequent call to +-- ListCompanies to retrieve the next page of results. +lcrNextPageToken :: Lens' ListCompaniesResponse (Maybe Text) +lcrNextPageToken + = lens _lcrNextPageToken + (\ s a -> s{_lcrNextPageToken = a}) + +-- | Current response metadata. +lcrResponseMetadata :: Lens' ListCompaniesResponse (Maybe (Maybe ResponseMetadata)) +lcrResponseMetadata + = lens _lcrResponseMetadata + (\ s a -> s{_lcrResponseMetadata = a}) + +-- | The list of companies. +lcrCompanies :: Lens' ListCompaniesResponse [Maybe Company] +lcrCompanies + = lens _lcrCompanies (\ s a -> s{_lcrCompanies = a}) + . _Default + . _Coerce + +instance FromJSON ListCompaniesResponse where + parseJSON + = withObject "ListCompaniesResponse" + (\ o -> + ListCompaniesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "responseMetadata") + <*> (o .:? "companies" .!= mempty)) + +instance ToJSON ListCompaniesResponse where + toJSON ListCompaniesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lcrNextPageToken, + ("responseMetadata" .=) <$> _lcrResponseMetadata, + ("companies" .=) <$> _lcrCompanies]) + +-- | Response message for CreateLead. Debug information about this request. +-- +-- /See:/ 'createLeadResponse' smart constructor. +data CreateLeadResponse = CreateLeadResponse + { _clrRecaptchaStatus :: !(Maybe Text) + , _clrResponseMetadata :: !(Maybe (Maybe ResponseMetadata)) + , _clrLead :: !(Maybe (Maybe Lead)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateLeadResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrRecaptchaStatus' +-- +-- * 'clrResponseMetadata' +-- +-- * 'clrLead' +createLeadResponse + :: CreateLeadResponse +createLeadResponse = + CreateLeadResponse + { _clrRecaptchaStatus = Nothing + , _clrResponseMetadata = Nothing + , _clrLead = Nothing + } + +-- | The outcome of reCaptcha validation. +clrRecaptchaStatus :: Lens' CreateLeadResponse (Maybe Text) +clrRecaptchaStatus + = lens _clrRecaptchaStatus + (\ s a -> s{_clrRecaptchaStatus = a}) + +-- | Current response metadata. +clrResponseMetadata :: Lens' CreateLeadResponse (Maybe (Maybe ResponseMetadata)) +clrResponseMetadata + = lens _clrResponseMetadata + (\ s a -> s{_clrResponseMetadata = a}) + +-- | Lead that was created depending on the outcome of reCaptcha validation. +clrLead :: Lens' CreateLeadResponse (Maybe (Maybe Lead)) +clrLead = lens _clrLead (\ s a -> s{_clrLead = a}) + +instance FromJSON CreateLeadResponse where + parseJSON + = withObject "CreateLeadResponse" + (\ o -> + CreateLeadResponse <$> + (o .:? "recaptchaStatus") <*> + (o .:? "responseMetadata") + <*> (o .:? "lead")) + +instance ToJSON CreateLeadResponse where + toJSON CreateLeadResponse{..} + = object + (catMaybes + [("recaptchaStatus" .=) <$> _clrRecaptchaStatus, + ("responseMetadata" .=) <$> _clrResponseMetadata, + ("lead" .=) <$> _clrLead]) + +-- | The localized company information. +-- +-- /See:/ 'localizedCompanyInfo' smart constructor. +data LocalizedCompanyInfo = LocalizedCompanyInfo + { _lciLanguageCode :: !(Maybe Text) + , _lciOverview :: !(Maybe Text) + , _lciCountryCodes :: !(Maybe [Text]) + , _lciDisplayName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocalizedCompanyInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lciLanguageCode' +-- +-- * 'lciOverview' +-- +-- * 'lciCountryCodes' +-- +-- * 'lciDisplayName' +localizedCompanyInfo + :: LocalizedCompanyInfo +localizedCompanyInfo = + LocalizedCompanyInfo + { _lciLanguageCode = Nothing + , _lciOverview = Nothing + , _lciCountryCodes = Nothing + , _lciDisplayName = Nothing + } + +-- | Language code of the localized company info, as defined by BCP 47 (IETF +-- BCP 47, \"Tags for Identifying Languages\"). +lciLanguageCode :: Lens' LocalizedCompanyInfo (Maybe Text) +lciLanguageCode + = lens _lciLanguageCode + (\ s a -> s{_lciLanguageCode = a}) + +-- | Localized brief description that the company uses to advertise +-- themselves. +lciOverview :: Lens' LocalizedCompanyInfo (Maybe Text) +lciOverview + = lens _lciOverview (\ s a -> s{_lciOverview = a}) + +-- | List of country codes for the localized company info. +lciCountryCodes :: Lens' LocalizedCompanyInfo [Text] +lciCountryCodes + = lens _lciCountryCodes + (\ s a -> s{_lciCountryCodes = a}) + . _Default + . _Coerce + +-- | Localized display name. +lciDisplayName :: Lens' LocalizedCompanyInfo (Maybe Text) +lciDisplayName + = lens _lciDisplayName + (\ s a -> s{_lciDisplayName = a}) + +instance FromJSON LocalizedCompanyInfo where + parseJSON + = withObject "LocalizedCompanyInfo" + (\ o -> + LocalizedCompanyInfo <$> + (o .:? "languageCode") <*> (o .:? "overview") <*> + (o .:? "countryCodes" .!= mempty) + <*> (o .:? "displayName")) + +instance ToJSON LocalizedCompanyInfo where + toJSON LocalizedCompanyInfo{..} + = object + (catMaybes + [("languageCode" .=) <$> _lciLanguageCode, + ("overview" .=) <$> _lciOverview, + ("countryCodes" .=) <$> _lciCountryCodes, + ("displayName" .=) <$> _lciDisplayName]) + +-- | Common data that is in each API response. +-- +-- /See:/ 'responseMetadata' smart constructor. +newtype ResponseMetadata = ResponseMetadata + { _rmDebugInfo :: Maybe (Maybe DebugInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResponseMetadata' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmDebugInfo' +responseMetadata + :: ResponseMetadata +responseMetadata = + ResponseMetadata + { _rmDebugInfo = Nothing + } + +-- | Debug information about this request. +rmDebugInfo :: Lens' ResponseMetadata (Maybe (Maybe DebugInfo)) +rmDebugInfo + = lens _rmDebugInfo (\ s a -> s{_rmDebugInfo = a}) + +instance FromJSON ResponseMetadata where + parseJSON + = withObject "ResponseMetadata" + (\ o -> ResponseMetadata <$> (o .:? "debugInfo")) + +instance ToJSON ResponseMetadata where + toJSON ResponseMetadata{..} + = object + (catMaybes [("debugInfo" .=) <$> _rmDebugInfo]) + +-- | Request message for LogClientMessage. +-- +-- /See:/ 'logMessageRequest' smart constructor. +data LogMessageRequest = LogMessageRequest + { _lmrRequestMetadata :: !(Maybe (Maybe RequestMetadata)) + , _lmrClientInfo :: !(Maybe LogMessageRequestClientInfo) + , _lmrDetails :: !(Maybe Text) + , _lmrLevel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogMessageRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmrRequestMetadata' +-- +-- * 'lmrClientInfo' +-- +-- * 'lmrDetails' +-- +-- * 'lmrLevel' +logMessageRequest + :: LogMessageRequest +logMessageRequest = + LogMessageRequest + { _lmrRequestMetadata = Nothing + , _lmrClientInfo = Nothing + , _lmrDetails = Nothing + , _lmrLevel = Nothing + } + +-- | Current request metadata. +lmrRequestMetadata :: Lens' LogMessageRequest (Maybe (Maybe RequestMetadata)) +lmrRequestMetadata + = lens _lmrRequestMetadata + (\ s a -> s{_lmrRequestMetadata = a}) + +-- | Map of client info, such as URL, browser navigator, browser platform, +-- etc. +lmrClientInfo :: Lens' LogMessageRequest (Maybe LogMessageRequestClientInfo) +lmrClientInfo + = lens _lmrClientInfo + (\ s a -> s{_lmrClientInfo = a}) + +-- | Details about the client message. +lmrDetails :: Lens' LogMessageRequest (Maybe Text) +lmrDetails + = lens _lmrDetails (\ s a -> s{_lmrDetails = a}) + +-- | Message level of client message. +lmrLevel :: Lens' LogMessageRequest (Maybe Text) +lmrLevel = lens _lmrLevel (\ s a -> s{_lmrLevel = a}) + +instance FromJSON LogMessageRequest where + parseJSON + = withObject "LogMessageRequest" + (\ o -> + LogMessageRequest <$> + (o .:? "requestMetadata") <*> (o .:? "clientInfo") + <*> (o .:? "details") + <*> (o .:? "level")) + +instance ToJSON LogMessageRequest where + toJSON LogMessageRequest{..} + = object + (catMaybes + [("requestMetadata" .=) <$> _lmrRequestMetadata, + ("clientInfo" .=) <$> _lmrClientInfo, + ("details" .=) <$> _lmrDetails, + ("level" .=) <$> _lmrLevel]) + +-- | Values to use instead of the user\'s respective defaults. These are only +-- honored by whitelisted products. +-- +-- /See:/ 'userOverrides' smart constructor. +data UserOverrides = UserOverrides + { _uoIpAddress :: !(Maybe Text) + , _uoUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserOverrides' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uoIpAddress' +-- +-- * 'uoUserId' +userOverrides + :: UserOverrides +userOverrides = + UserOverrides + { _uoIpAddress = Nothing + , _uoUserId = Nothing + } + +-- | IP address to use instead of the user\'s geo-located IP address. +uoIpAddress :: Lens' UserOverrides (Maybe Text) +uoIpAddress + = lens _uoIpAddress (\ s a -> s{_uoIpAddress = a}) + +-- | Logged-in user ID to impersonate instead of the user\'s ID. +uoUserId :: Lens' UserOverrides (Maybe Text) +uoUserId = lens _uoUserId (\ s a -> s{_uoUserId = a}) + +instance FromJSON UserOverrides where + parseJSON + = withObject "UserOverrides" + (\ o -> + UserOverrides <$> + (o .:? "ipAddress") <*> (o .:? "userId")) + +instance ToJSON UserOverrides where + toJSON UserOverrides{..} + = object + (catMaybes + [("ipAddress" .=) <$> _uoIpAddress, + ("userId" .=) <$> _uoUserId]) + +-- | Response message for LogClientMessage. +-- +-- /See:/ 'logMessageResponse' smart constructor. +newtype LogMessageResponse = LogMessageResponse + { _lmrResponseMetadata :: Maybe (Maybe ResponseMetadata) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogMessageResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmrResponseMetadata' +logMessageResponse + :: LogMessageResponse +logMessageResponse = + LogMessageResponse + { _lmrResponseMetadata = Nothing + } + +-- | Current response metadata. +lmrResponseMetadata :: Lens' LogMessageResponse (Maybe (Maybe ResponseMetadata)) +lmrResponseMetadata + = lens _lmrResponseMetadata + (\ s a -> s{_lmrResponseMetadata = a}) + +instance FromJSON LogMessageResponse where + parseJSON + = withObject "LogMessageResponse" + (\ o -> + LogMessageResponse <$> (o .:? "responseMetadata")) + +instance ToJSON LogMessageResponse where + toJSON LogMessageResponse{..} + = object + (catMaybes + [("responseMetadata" .=) <$> _lmrResponseMetadata]) + +-- | A lead resource that represents an advertiser contact for a \`Company\`. +-- These are usually generated via Google Partner Search (the advertiser +-- portal). +-- +-- /See:/ 'lead' smart constructor. +data Lead = Lead + { _lGivenName :: !(Maybe Text) + , _lEmail :: !(Maybe Text) + , _lFamilyName :: !(Maybe Text) + , _lPhoneNumber :: !(Maybe Text) + , _lMinMonthlyBudget :: !(Maybe (Maybe Money)) + , _lId :: !(Maybe Text) + , _lComments :: !(Maybe Text) + , _lWebsiteUrl :: !(Maybe Text) + , _lType :: !(Maybe Text) + , _lGpsMotivations :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Lead' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lGivenName' +-- +-- * 'lEmail' +-- +-- * 'lFamilyName' +-- +-- * 'lPhoneNumber' +-- +-- * 'lMinMonthlyBudget' +-- +-- * 'lId' +-- +-- * 'lComments' +-- +-- * 'lWebsiteUrl' +-- +-- * 'lType' +-- +-- * 'lGpsMotivations' +lead + :: Lead +lead = + Lead + { _lGivenName = Nothing + , _lEmail = Nothing + , _lFamilyName = Nothing + , _lPhoneNumber = Nothing + , _lMinMonthlyBudget = Nothing + , _lId = Nothing + , _lComments = Nothing + , _lWebsiteUrl = Nothing + , _lType = Nothing + , _lGpsMotivations = Nothing + } + +-- | First name of lead source. +lGivenName :: Lens' Lead (Maybe Text) +lGivenName + = lens _lGivenName (\ s a -> s{_lGivenName = a}) + +-- | Email address of lead source. +lEmail :: Lens' Lead (Maybe Text) +lEmail = lens _lEmail (\ s a -> s{_lEmail = a}) + +-- | Last name of lead source. +lFamilyName :: Lens' Lead (Maybe Text) +lFamilyName + = lens _lFamilyName (\ s a -> s{_lFamilyName = a}) + +-- | Phone number of lead source. +lPhoneNumber :: Lens' Lead (Maybe Text) +lPhoneNumber + = lens _lPhoneNumber (\ s a -> s{_lPhoneNumber = a}) + +-- | The minimum monthly budget lead source is willing to spend. +lMinMonthlyBudget :: Lens' Lead (Maybe (Maybe Money)) +lMinMonthlyBudget + = lens _lMinMonthlyBudget + (\ s a -> s{_lMinMonthlyBudget = a}) + +-- | ID of the lead. +lId :: Lens' Lead (Maybe Text) +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | Comments lead source gave. +lComments :: Lens' Lead (Maybe Text) +lComments + = lens _lComments (\ s a -> s{_lComments = a}) + +-- | Website URL of lead source. +lWebsiteUrl :: Lens' Lead (Maybe Text) +lWebsiteUrl + = lens _lWebsiteUrl (\ s a -> s{_lWebsiteUrl = a}) + +-- | Type of lead. +lType :: Lens' Lead (Maybe Text) +lType = lens _lType (\ s a -> s{_lType = a}) + +-- | List of reasons for using Google Partner Search and creating a lead. +lGpsMotivations :: Lens' Lead [Text] +lGpsMotivations + = lens _lGpsMotivations + (\ s a -> s{_lGpsMotivations = a}) + . _Default + . _Coerce + +instance FromJSON Lead where + parseJSON + = withObject "Lead" + (\ o -> + Lead <$> + (o .:? "givenName") <*> (o .:? "email") <*> + (o .:? "familyName") + <*> (o .:? "phoneNumber") + <*> (o .:? "minMonthlyBudget") + <*> (o .:? "id") + <*> (o .:? "comments") + <*> (o .:? "websiteUrl") + <*> (o .:? "type") + <*> (o .:? "gpsMotivations" .!= mempty)) + +instance ToJSON Lead where + toJSON Lead{..} + = object + (catMaybes + [("givenName" .=) <$> _lGivenName, + ("email" .=) <$> _lEmail, + ("familyName" .=) <$> _lFamilyName, + ("phoneNumber" .=) <$> _lPhoneNumber, + ("minMonthlyBudget" .=) <$> _lMinMonthlyBudget, + ("id" .=) <$> _lId, ("comments" .=) <$> _lComments, + ("websiteUrl" .=) <$> _lWebsiteUrl, + ("type" .=) <$> _lType, + ("gpsMotivations" .=) <$> _lGpsMotivations]) + +-- | A company resource in the Google Partners API. Once certified, it +-- qualifies for being searched by advertisers. +-- +-- /See:/ 'company' smart constructor. +data Company = Company + { _cPublicProfile :: !(Maybe (Maybe PublicProfile)) + , _cOriginalMinMonthlyBudget :: !(Maybe (Maybe Money)) + , _cIndustries :: !(Maybe [Text]) + , _cConvertedMinMonthlyBudget :: !(Maybe (Maybe Money)) + , _cName :: !(Maybe Text) + , _cLocalizedInfos :: !(Maybe [Maybe LocalizedCompanyInfo]) + , _cCertificationStatuses :: !(Maybe [Maybe CertificationStatus]) + , _cRanks :: !(Maybe [Maybe Rank]) + , _cId :: !(Maybe Text) + , _cWebsiteUrl :: !(Maybe Text) + , _cLocations :: !(Maybe [Maybe Location]) + , _cServices :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Company' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cPublicProfile' +-- +-- * 'cOriginalMinMonthlyBudget' +-- +-- * 'cIndustries' +-- +-- * 'cConvertedMinMonthlyBudget' +-- +-- * 'cName' +-- +-- * 'cLocalizedInfos' +-- +-- * 'cCertificationStatuses' +-- +-- * 'cRanks' +-- +-- * 'cId' +-- +-- * 'cWebsiteUrl' +-- +-- * 'cLocations' +-- +-- * 'cServices' +company + :: Company +company = + Company + { _cPublicProfile = Nothing + , _cOriginalMinMonthlyBudget = Nothing + , _cIndustries = Nothing + , _cConvertedMinMonthlyBudget = Nothing + , _cName = Nothing + , _cLocalizedInfos = Nothing + , _cCertificationStatuses = Nothing + , _cRanks = Nothing + , _cId = Nothing + , _cWebsiteUrl = Nothing + , _cLocations = Nothing + , _cServices = Nothing + } + +-- | Basic information from the company\'s public profile. +cPublicProfile :: Lens' Company (Maybe (Maybe PublicProfile)) +cPublicProfile + = lens _cPublicProfile + (\ s a -> s{_cPublicProfile = a}) + +-- | The unconverted minimum monthly budget that the company accepts for +-- partner business. +cOriginalMinMonthlyBudget :: Lens' Company (Maybe (Maybe Money)) +cOriginalMinMonthlyBudget + = lens _cOriginalMinMonthlyBudget + (\ s a -> s{_cOriginalMinMonthlyBudget = a}) + +-- | Industries the company can help with. +cIndustries :: Lens' Company [Text] +cIndustries + = lens _cIndustries (\ s a -> s{_cIndustries = a}) . + _Default + . _Coerce + +-- | The minimum monthly budget that the company accepts for partner +-- business, converted to the requested currency code. +cConvertedMinMonthlyBudget :: Lens' Company (Maybe (Maybe Money)) +cConvertedMinMonthlyBudget + = lens _cConvertedMinMonthlyBudget + (\ s a -> s{_cConvertedMinMonthlyBudget = a}) + +-- | The name of the company. +cName :: Lens' Company (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | The list of localized info for the company. +cLocalizedInfos :: Lens' Company [Maybe LocalizedCompanyInfo] +cLocalizedInfos + = lens _cLocalizedInfos + (\ s a -> s{_cLocalizedInfos = a}) + . _Default + . _Coerce + +-- | The list of Google Partners certification statuses for the company. +cCertificationStatuses :: Lens' Company [Maybe CertificationStatus] +cCertificationStatuses + = lens _cCertificationStatuses + (\ s a -> s{_cCertificationStatuses = a}) + . _Default + . _Coerce + +-- | Information related to the ranking of the company within the list of +-- companies. +cRanks :: Lens' Company [Maybe Rank] +cRanks + = lens _cRanks (\ s a -> s{_cRanks = a}) . _Default . + _Coerce + +-- | The ID of the company. +cId :: Lens' Company (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | URL of the company\'s website. +cWebsiteUrl :: Lens' Company (Maybe Text) +cWebsiteUrl + = lens _cWebsiteUrl (\ s a -> s{_cWebsiteUrl = a}) + +-- | The list of company locations. +cLocations :: Lens' Company [Maybe Location] +cLocations + = lens _cLocations (\ s a -> s{_cLocations = a}) . + _Default + . _Coerce + +-- | Services the company can help with. +cServices :: Lens' Company [Text] +cServices + = lens _cServices (\ s a -> s{_cServices = a}) . + _Default + . _Coerce + +instance FromJSON Company where + parseJSON + = withObject "Company" + (\ o -> + Company <$> + (o .:? "publicProfile") <*> + (o .:? "originalMinMonthlyBudget") + <*> (o .:? "industries" .!= mempty) + <*> (o .:? "convertedMinMonthlyBudget") + <*> (o .:? "name") + <*> (o .:? "localizedInfos" .!= mempty) + <*> (o .:? "certificationStatuses" .!= mempty) + <*> (o .:? "ranks" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "websiteUrl") + <*> (o .:? "locations" .!= mempty) + <*> (o .:? "services" .!= mempty)) + +instance ToJSON Company where + toJSON Company{..} + = object + (catMaybes + [("publicProfile" .=) <$> _cPublicProfile, + ("originalMinMonthlyBudget" .=) <$> + _cOriginalMinMonthlyBudget, + ("industries" .=) <$> _cIndustries, + ("convertedMinMonthlyBudget" .=) <$> + _cConvertedMinMonthlyBudget, + ("name" .=) <$> _cName, + ("localizedInfos" .=) <$> _cLocalizedInfos, + ("certificationStatuses" .=) <$> + _cCertificationStatuses, + ("ranks" .=) <$> _cRanks, ("id" .=) <$> _cId, + ("websiteUrl" .=) <$> _cWebsiteUrl, + ("locations" .=) <$> _cLocations, + ("services" .=) <$> _cServices]) + +-- | Response message for LogUserEvent. +-- +-- /See:/ 'logUserEventResponse' smart constructor. +newtype LogUserEventResponse = LogUserEventResponse + { _luerResponseMetadata :: Maybe (Maybe ResponseMetadata) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogUserEventResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'luerResponseMetadata' +logUserEventResponse + :: LogUserEventResponse +logUserEventResponse = + LogUserEventResponse + { _luerResponseMetadata = Nothing + } + +-- | Current response metadata. +luerResponseMetadata :: Lens' LogUserEventResponse (Maybe (Maybe ResponseMetadata)) +luerResponseMetadata + = lens _luerResponseMetadata + (\ s a -> s{_luerResponseMetadata = a}) + +instance FromJSON LogUserEventResponse where + parseJSON + = withObject "LogUserEventResponse" + (\ o -> + LogUserEventResponse <$> (o .:? "responseMetadata")) + +instance ToJSON LogUserEventResponse where + toJSON LogUserEventResponse{..} + = object + (catMaybes + [("responseMetadata" .=) <$> _luerResponseMetadata]) + +-- | Request message for LogUserEvent. +-- +-- /See:/ 'logUserEventRequest' smart constructor. +data LogUserEventRequest = LogUserEventRequest + { _luerEventCategory :: !(Maybe Text) + , _luerRequestMetadata :: !(Maybe (Maybe RequestMetadata)) + , _luerUrl :: !(Maybe Text) + , _luerEventScope :: !(Maybe Text) + , _luerLead :: !(Maybe (Maybe Lead)) + , _luerEventDatas :: !(Maybe [Maybe EventData]) + , _luerEventAction :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LogUserEventRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'luerEventCategory' +-- +-- * 'luerRequestMetadata' +-- +-- * 'luerUrl' +-- +-- * 'luerEventScope' +-- +-- * 'luerLead' +-- +-- * 'luerEventDatas' +-- +-- * 'luerEventAction' +logUserEventRequest + :: LogUserEventRequest +logUserEventRequest = + LogUserEventRequest + { _luerEventCategory = Nothing + , _luerRequestMetadata = Nothing + , _luerUrl = Nothing + , _luerEventScope = Nothing + , _luerLead = Nothing + , _luerEventDatas = Nothing + , _luerEventAction = Nothing + } + +-- | The category the action belongs to. +luerEventCategory :: Lens' LogUserEventRequest (Maybe Text) +luerEventCategory + = lens _luerEventCategory + (\ s a -> s{_luerEventCategory = a}) + +-- | Current request metadata. +luerRequestMetadata :: Lens' LogUserEventRequest (Maybe (Maybe RequestMetadata)) +luerRequestMetadata + = lens _luerRequestMetadata + (\ s a -> s{_luerRequestMetadata = a}) + +-- | The URL where the event occurred. +luerUrl :: Lens' LogUserEventRequest (Maybe Text) +luerUrl = lens _luerUrl (\ s a -> s{_luerUrl = a}) + +-- | The scope of the event. +luerEventScope :: Lens' LogUserEventRequest (Maybe Text) +luerEventScope + = lens _luerEventScope + (\ s a -> s{_luerEventScope = a}) + +-- | Advertiser lead information. +luerLead :: Lens' LogUserEventRequest (Maybe (Maybe Lead)) +luerLead = lens _luerLead (\ s a -> s{_luerLead = a}) + +-- | List of event data for the event. +luerEventDatas :: Lens' LogUserEventRequest [Maybe EventData] +luerEventDatas + = lens _luerEventDatas + (\ s a -> s{_luerEventDatas = a}) + . _Default + . _Coerce + +-- | The action that occurred. +luerEventAction :: Lens' LogUserEventRequest (Maybe Text) +luerEventAction + = lens _luerEventAction + (\ s a -> s{_luerEventAction = a}) + +instance FromJSON LogUserEventRequest where + parseJSON + = withObject "LogUserEventRequest" + (\ o -> + LogUserEventRequest <$> + (o .:? "eventCategory") <*> (o .:? "requestMetadata") + <*> (o .:? "url") + <*> (o .:? "eventScope") + <*> (o .:? "lead") + <*> (o .:? "eventDatas" .!= mempty) + <*> (o .:? "eventAction")) + +instance ToJSON LogUserEventRequest where + toJSON LogUserEventRequest{..} + = object + (catMaybes + [("eventCategory" .=) <$> _luerEventCategory, + ("requestMetadata" .=) <$> _luerRequestMetadata, + ("url" .=) <$> _luerUrl, + ("eventScope" .=) <$> _luerEventScope, + ("lead" .=) <$> _luerLead, + ("eventDatas" .=) <$> _luerEventDatas, + ("eventAction" .=) <$> _luerEventAction]) + +-- | Information related to ranking of results. +-- +-- /See:/ 'rank' smart constructor. +data Rank = Rank + { _rValue :: !(Maybe Double) + , _rType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Rank' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rValue' +-- +-- * 'rType' +rank + :: Rank +rank = + Rank + { _rValue = Nothing + , _rType = Nothing + } + +-- | The numerical value of the rank. +rValue :: Lens' Rank (Maybe Double) +rValue = lens _rValue (\ s a -> s{_rValue = a}) + +-- | The type of rank. +rType :: Lens' Rank (Maybe Text) +rType = lens _rType (\ s a -> s{_rType = a}) + +instance FromJSON Rank where + parseJSON + = withObject "Rank" + (\ o -> Rank <$> (o .:? "value") <*> (o .:? "type")) + +instance ToJSON Rank where + toJSON Rank{..} + = object + (catMaybes + [("value" .=) <$> _rValue, ("type" .=) <$> _rType]) + +-- | Request message for CreateLead. +-- +-- /See:/ 'createLeadRequest' smart constructor. +data CreateLeadRequest = CreateLeadRequest + { _cRequestMetadata :: !(Maybe (Maybe RequestMetadata)) + , _cRecaptchaChallenge :: !(Maybe (Maybe RecaptchaChallenge)) + , _cLead :: !(Maybe (Maybe Lead)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateLeadRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cRequestMetadata' +-- +-- * 'cRecaptchaChallenge' +-- +-- * 'cLead' +createLeadRequest + :: CreateLeadRequest +createLeadRequest = + CreateLeadRequest + { _cRequestMetadata = Nothing + , _cRecaptchaChallenge = Nothing + , _cLead = Nothing + } + +-- | Current request metadata. +cRequestMetadata :: Lens' CreateLeadRequest (Maybe (Maybe RequestMetadata)) +cRequestMetadata + = lens _cRequestMetadata + (\ s a -> s{_cRequestMetadata = a}) + +-- | reCaptcha challenge info. +cRecaptchaChallenge :: Lens' CreateLeadRequest (Maybe (Maybe RecaptchaChallenge)) +cRecaptchaChallenge + = lens _cRecaptchaChallenge + (\ s a -> s{_cRecaptchaChallenge = a}) + +-- | The lead resource. The \`LeadType\` must not be +-- \`LEAD_TYPE_UNSPECIFIED\` and either \`email\` or \`phone_number\` must +-- be provided. +cLead :: Lens' CreateLeadRequest (Maybe (Maybe Lead)) +cLead = lens _cLead (\ s a -> s{_cLead = a}) + +instance FromJSON CreateLeadRequest where + parseJSON + = withObject "CreateLeadRequest" + (\ o -> + CreateLeadRequest <$> + (o .:? "requestMetadata") <*> + (o .:? "recaptchaChallenge") + <*> (o .:? "lead")) + +instance ToJSON CreateLeadRequest where + toJSON CreateLeadRequest{..} + = object + (catMaybes + [("requestMetadata" .=) <$> _cRequestMetadata, + ("recaptchaChallenge" .=) <$> _cRecaptchaChallenge, + ("lead" .=) <$> _cLead]) diff --git a/gogol-partners/gen/Network/Google/Partners/Types/Sum.hs b/gogol-partners/gen/Network/Google/Partners/Types/Sum.hs new file mode 100644 index 000000000..17c0ce08d --- /dev/null +++ b/gogol-partners/gen/Network/Google/Partners/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Partners.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Partners.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/ClientMessages/Log.hs b/gogol-partners/gen/Network/Google/Resource/Partners/ClientMessages/Log.hs new file mode 100644 index 000000000..7080b363d --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/ClientMessages/Log.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.ClientMessages.Log +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Logs a generic message from the client, such as \`Failed to render +-- component\`, \`Profile page is running slow\`, \`More than 500 users +-- have accessed this result.\`, etc. +-- +-- /See:/ for @PartnersClientMessagesLog@. +module Partners.ClientMessages.Log + ( + -- * REST Resource + ClientMessagesLogAPI + + -- * Creating a Request + , clientMessagesLog + , ClientMessagesLog + + -- * Request Lenses + , cmlXgafv + , cmlQuotaUser + , cmlPrettyPrint + , cmlUploadProtocol + , cmlPp + , cmlAccessToken + , cmlUploadType + , cmlBearerToken + , cmlKey + , cmlOauthToken + , cmlFields + , cmlCallback + , cmlAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersClientMessagesLog@ which the +-- 'ClientMessagesLog' request conforms to. +type ClientMessagesLogAPI = + "v2" :> + "clientMessages:log" :> + Post '[JSON] LogMessageResponse + +-- | Logs a generic message from the client, such as \`Failed to render +-- component\`, \`Profile page is running slow\`, \`More than 500 users +-- have accessed this result.\`, etc. +-- +-- /See:/ 'clientMessagesLog' smart constructor. +data ClientMessagesLog = ClientMessagesLog + { _cmlXgafv :: !(Maybe Text) + , _cmlQuotaUser :: !(Maybe Text) + , _cmlPrettyPrint :: !Bool + , _cmlUploadProtocol :: !(Maybe Text) + , _cmlPp :: !Bool + , _cmlAccessToken :: !(Maybe Text) + , _cmlUploadType :: !(Maybe Text) + , _cmlBearerToken :: !(Maybe Text) + , _cmlKey :: !(Maybe Text) + , _cmlOauthToken :: !(Maybe Text) + , _cmlFields :: !(Maybe Text) + , _cmlCallback :: !(Maybe Text) + , _cmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ClientMessagesLog'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cmlXgafv' +-- +-- * 'cmlQuotaUser' +-- +-- * 'cmlPrettyPrint' +-- +-- * 'cmlUploadProtocol' +-- +-- * 'cmlPp' +-- +-- * 'cmlAccessToken' +-- +-- * 'cmlUploadType' +-- +-- * 'cmlBearerToken' +-- +-- * 'cmlKey' +-- +-- * 'cmlOauthToken' +-- +-- * 'cmlFields' +-- +-- * 'cmlCallback' +-- +-- * 'cmlAlt' +clientMessagesLog + :: ClientMessagesLog +clientMessagesLog = + ClientMessagesLog + { _cmlXgafv = Nothing + , _cmlQuotaUser = Nothing + , _cmlPrettyPrint = True + , _cmlUploadProtocol = Nothing + , _cmlPp = True + , _cmlAccessToken = Nothing + , _cmlUploadType = Nothing + , _cmlBearerToken = Nothing + , _cmlKey = Nothing + , _cmlOauthToken = Nothing + , _cmlFields = Nothing + , _cmlCallback = Nothing + , _cmlAlt = "json" + } + +-- | V1 error format. +cmlXgafv :: Lens' ClientMessagesLog' (Maybe Text) +cmlXgafv = lens _cmlXgafv (\ s a -> s{_cmlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cmlQuotaUser :: Lens' ClientMessagesLog' (Maybe Text) +cmlQuotaUser + = lens _cmlQuotaUser (\ s a -> s{_cmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cmlPrettyPrint :: Lens' ClientMessagesLog' Bool +cmlPrettyPrint + = lens _cmlPrettyPrint + (\ s a -> s{_cmlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cmlUploadProtocol :: Lens' ClientMessagesLog' (Maybe Text) +cmlUploadProtocol + = lens _cmlUploadProtocol + (\ s a -> s{_cmlUploadProtocol = a}) + +-- | Pretty-print response. +cmlPp :: Lens' ClientMessagesLog' Bool +cmlPp = lens _cmlPp (\ s a -> s{_cmlPp = a}) + +-- | OAuth access token. +cmlAccessToken :: Lens' ClientMessagesLog' (Maybe Text) +cmlAccessToken + = lens _cmlAccessToken + (\ s a -> s{_cmlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cmlUploadType :: Lens' ClientMessagesLog' (Maybe Text) +cmlUploadType + = lens _cmlUploadType + (\ s a -> s{_cmlUploadType = a}) + +-- | OAuth bearer token. +cmlBearerToken :: Lens' ClientMessagesLog' (Maybe Text) +cmlBearerToken + = lens _cmlBearerToken + (\ s a -> s{_cmlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cmlKey :: Lens' ClientMessagesLog' (Maybe Text) +cmlKey = lens _cmlKey (\ s a -> s{_cmlKey = a}) + +-- | OAuth 2.0 token for the current user. +cmlOauthToken :: Lens' ClientMessagesLog' (Maybe Text) +cmlOauthToken + = lens _cmlOauthToken + (\ s a -> s{_cmlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cmlFields :: Lens' ClientMessagesLog' (Maybe Text) +cmlFields + = lens _cmlFields (\ s a -> s{_cmlFields = a}) + +-- | JSONP +cmlCallback :: Lens' ClientMessagesLog' (Maybe Text) +cmlCallback + = lens _cmlCallback (\ s a -> s{_cmlCallback = a}) + +-- | Data format for response. +cmlAlt :: Lens' ClientMessagesLog' Text +cmlAlt = lens _cmlAlt (\ s a -> s{_cmlAlt = a}) + +instance GoogleRequest ClientMessagesLog' where + type Rs ClientMessagesLog' = LogMessageResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u ClientMessagesLog{..} + = go _cmlXgafv _cmlQuotaUser _cmlPrettyPrint + _cmlUploadProtocol + _cmlPp + _cmlAccessToken + _cmlUploadType + _cmlBearerToken + _cmlKey + _cmlOauthToken + _cmlFields + _cmlCallback + _cmlAlt + where go + = clientWithRoute + (Proxy :: Proxy ClientMessagesLogAPI) + r + u diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Get.hs b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Get.hs new file mode 100644 index 000000000..0e2186597 --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Get.hs @@ -0,0 +1,386 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.Companies.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a company. +-- +-- /See:/ for @PartnersCompaniesGet@. +module Partners.Companies.Get + ( + -- * REST Resource + CompaniesGetAPI + + -- * Creating a Request + , companiesGet + , CompaniesGet + + -- * Request Lenses + , cgXgafv + , cgQuotaUser + , cgPrettyPrint + , cgCurrencyCode + , cgUploadProtocol + , cgCompanyId + , cgOrderBy + , cgPp + , cgAccessToken + , cgUploadType + , cgAddress + , cgRequestMetadataPartnersSessionId + , cgBearerToken + , cgKey + , cgRequestMetadataLocale + , cgView + , cgRequestMetadataExperimentIds + , cgRequestMetadataUserOverridesIpAddress + , cgRequestMetadataTrafficSourceTrafficSubId + , cgOauthToken + , cgRequestMetadataUserOverridesUserId + , cgRequestMetadataTrafficSourceTrafficSourceId + , cgFields + , cgCallback + , cgAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersCompaniesGet@ which the +-- 'CompaniesGet' request conforms to. +type CompaniesGetAPI = + "v2" :> + "companies" :> + Capture "companyId" Text :> + QueryParam "currencyCode" Text :> + QueryParam "orderBy" Text :> + QueryParam "address" Text :> + QueryParam "requestMetadata.partnersSessionId" Text + :> + QueryParam "requestMetadata.locale" Text :> + QueryParam "view" Text :> + QueryParams "requestMetadata.experimentIds" Text :> + QueryParam "requestMetadata.userOverrides.ipAddress" + Text + :> + QueryParam + "requestMetadata.trafficSource.trafficSubId" + Text + :> + QueryParam "requestMetadata.userOverrides.userId" + Text + :> + QueryParam + "requestMetadata.trafficSource.trafficSourceId" + Text + :> Get '[JSON] GetCompanyResponse + +-- | Gets a company. +-- +-- /See:/ 'companiesGet' smart constructor. +data CompaniesGet = CompaniesGet + { _cgXgafv :: !(Maybe Text) + , _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgCurrencyCode :: !(Maybe Text) + , _cgUploadProtocol :: !(Maybe Text) + , _cgCompanyId :: !Text + , _cgOrderBy :: !(Maybe Text) + , _cgPp :: !Bool + , _cgAccessToken :: !(Maybe Text) + , _cgUploadType :: !(Maybe Text) + , _cgAddress :: !(Maybe Text) + , _cgRequestMetadataPartnersSessionId :: !(Maybe Text) + , _cgBearerToken :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgRequestMetadataLocale :: !(Maybe Text) + , _cgView :: !(Maybe Text) + , _cgRequestMetadataExperimentIds :: !(Maybe Text) + , _cgRequestMetadataUserOverridesIpAddress :: !(Maybe Text) + , _cgRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgRequestMetadataUserOverridesUserId :: !(Maybe Text) + , _cgRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgCallback :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompaniesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgXgafv' +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgCurrencyCode' +-- +-- * 'cgUploadProtocol' +-- +-- * 'cgCompanyId' +-- +-- * 'cgOrderBy' +-- +-- * 'cgPp' +-- +-- * 'cgAccessToken' +-- +-- * 'cgUploadType' +-- +-- * 'cgAddress' +-- +-- * 'cgRequestMetadataPartnersSessionId' +-- +-- * 'cgBearerToken' +-- +-- * 'cgKey' +-- +-- * 'cgRequestMetadataLocale' +-- +-- * 'cgView' +-- +-- * 'cgRequestMetadataExperimentIds' +-- +-- * 'cgRequestMetadataUserOverridesIpAddress' +-- +-- * 'cgRequestMetadataTrafficSourceTrafficSubId' +-- +-- * 'cgOauthToken' +-- +-- * 'cgRequestMetadataUserOverridesUserId' +-- +-- * 'cgRequestMetadataTrafficSourceTrafficSourceId' +-- +-- * 'cgFields' +-- +-- * 'cgCallback' +-- +-- * 'cgAlt' +companiesGet + :: Text -- ^ 'companyId' + -> CompaniesGet +companiesGet pCgCompanyId_ = + CompaniesGet + { _cgXgafv = Nothing + , _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgCurrencyCode = Nothing + , _cgUploadProtocol = Nothing + , _cgCompanyId = pCgCompanyId_ + , _cgOrderBy = Nothing + , _cgPp = True + , _cgAccessToken = Nothing + , _cgUploadType = Nothing + , _cgAddress = Nothing + , _cgRequestMetadataPartnersSessionId = Nothing + , _cgBearerToken = Nothing + , _cgKey = Nothing + , _cgRequestMetadataLocale = Nothing + , _cgView = Nothing + , _cgRequestMetadataExperimentIds = Nothing + , _cgRequestMetadataUserOverridesIpAddress = Nothing + , _cgRequestMetadataTrafficSourceTrafficSubId = Nothing + , _cgOauthToken = Nothing + , _cgRequestMetadataUserOverridesUserId = Nothing + , _cgRequestMetadataTrafficSourceTrafficSourceId = Nothing + , _cgFields = Nothing + , _cgCallback = Nothing + , _cgAlt = "json" + } + +-- | V1 error format. +cgXgafv :: Lens' CompaniesGet' (Maybe Text) +cgXgafv = lens _cgXgafv (\ s a -> s{_cgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +cgQuotaUser :: Lens' CompaniesGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CompaniesGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | If the company\'s budget is in a different currency code than this one, +-- then the converted budget is converted to this currency code. +cgCurrencyCode :: Lens' CompaniesGet' (Maybe Text) +cgCurrencyCode + = lens _cgCurrencyCode + (\ s a -> s{_cgCurrencyCode = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +cgUploadProtocol :: Lens' CompaniesGet' (Maybe Text) +cgUploadProtocol + = lens _cgUploadProtocol + (\ s a -> s{_cgUploadProtocol = a}) + +-- | The ID of the company to retrieve. +cgCompanyId :: Lens' CompaniesGet' Text +cgCompanyId + = lens _cgCompanyId (\ s a -> s{_cgCompanyId = a}) + +-- | How to order addresses within the returned company. Currently, only +-- \`address\` and \`address desc\` is supported which will sorted by +-- closest to farthest in distance from given address and farthest to +-- closest distance from given address respectively. +cgOrderBy :: Lens' CompaniesGet' (Maybe Text) +cgOrderBy + = lens _cgOrderBy (\ s a -> s{_cgOrderBy = a}) + +-- | Pretty-print response. +cgPp :: Lens' CompaniesGet' Bool +cgPp = lens _cgPp (\ s a -> s{_cgPp = a}) + +-- | OAuth access token. +cgAccessToken :: Lens' CompaniesGet' (Maybe Text) +cgAccessToken + = lens _cgAccessToken + (\ s a -> s{_cgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +cgUploadType :: Lens' CompaniesGet' (Maybe Text) +cgUploadType + = lens _cgUploadType (\ s a -> s{_cgUploadType = a}) + +-- | The address to use for sorting the company\'s addresses by proximity. If +-- not given, the geo-located address of the request is used. Used when +-- order_by is set. +cgAddress :: Lens' CompaniesGet' (Maybe Text) +cgAddress + = lens _cgAddress (\ s a -> s{_cgAddress = a}) + +-- | Google Partners session ID. +cgRequestMetadataPartnersSessionId :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataPartnersSessionId + = lens _cgRequestMetadataPartnersSessionId + (\ s a -> s{_cgRequestMetadataPartnersSessionId = a}) + +-- | OAuth bearer token. +cgBearerToken :: Lens' CompaniesGet' (Maybe Text) +cgBearerToken + = lens _cgBearerToken + (\ s a -> s{_cgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CompaniesGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | Locale to use for the current request. +cgRequestMetadataLocale :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataLocale + = lens _cgRequestMetadataLocale + (\ s a -> s{_cgRequestMetadataLocale = a}) + +-- | The view of \`Company\` resource to be returned. This must not be +-- \`COMPANY_VIEW_UNSPECIFIED\`. +cgView :: Lens' CompaniesGet' (Maybe Text) +cgView = lens _cgView (\ s a -> s{_cgView = a}) + +-- | Experiment IDs the current request belongs to. +cgRequestMetadataExperimentIds :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataExperimentIds + = lens _cgRequestMetadataExperimentIds + (\ s a -> s{_cgRequestMetadataExperimentIds = a}) + +-- | IP address to use instead of the user\'s geo-located IP address. +cgRequestMetadataUserOverridesIpAddress :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataUserOverridesIpAddress + = lens _cgRequestMetadataUserOverridesIpAddress + (\ s a -> + s{_cgRequestMetadataUserOverridesIpAddress = a}) + +-- | Second level identifier to indicate where the traffic comes from. An +-- identifier has multiple letters created by a team which redirected the +-- traffic to us. +cgRequestMetadataTrafficSourceTrafficSubId :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataTrafficSourceTrafficSubId + = lens _cgRequestMetadataTrafficSourceTrafficSubId + (\ s a -> + s{_cgRequestMetadataTrafficSourceTrafficSubId = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CompaniesGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Logged-in user ID to impersonate instead of the user\'s ID. +cgRequestMetadataUserOverridesUserId :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataUserOverridesUserId + = lens _cgRequestMetadataUserOverridesUserId + (\ s a -> + s{_cgRequestMetadataUserOverridesUserId = a}) + +-- | Identifier to indicate where the traffic comes from. An identifier has +-- multiple letters created by a team which redirected the traffic to us. +cgRequestMetadataTrafficSourceTrafficSourceId :: Lens' CompaniesGet' (Maybe Text) +cgRequestMetadataTrafficSourceTrafficSourceId + = lens _cgRequestMetadataTrafficSourceTrafficSourceId + (\ s a -> + s{_cgRequestMetadataTrafficSourceTrafficSourceId = + a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CompaniesGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | JSONP +cgCallback :: Lens' CompaniesGet' (Maybe Text) +cgCallback + = lens _cgCallback (\ s a -> s{_cgCallback = a}) + +-- | Data format for response. +cgAlt :: Lens' CompaniesGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CompaniesGet' where + type Rs CompaniesGet' = GetCompanyResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u CompaniesGet{..} + = go _cgXgafv _cgQuotaUser _cgPrettyPrint + _cgCurrencyCode + _cgUploadProtocol + _cgCompanyId + _cgOrderBy + _cgPp + _cgAccessToken + _cgUploadType + _cgAddress + _cgRequestMetadataPartnersSessionId + _cgBearerToken + _cgKey + _cgRequestMetadataLocale + _cgView + _cgRequestMetadataExperimentIds + _cgRequestMetadataUserOverridesIpAddress + _cgRequestMetadataTrafficSourceTrafficSubId + _cgOauthToken + _cgRequestMetadataUserOverridesUserId + _cgRequestMetadataTrafficSourceTrafficSourceId + _cgFields + _cgCallback + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CompaniesGetAPI) r + u diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Leads/Create.hs b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Leads/Create.hs new file mode 100644 index 000000000..d907401de --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/Leads/Create.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.Companies.Leads.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an advertiser lead for the given company ID. +-- +-- /See:/ for @PartnersCompaniesLeadsCreate@. +module Partners.Companies.Leads.Create + ( + -- * REST Resource + CompaniesLeadsCreateAPI + + -- * Creating a Request + , companiesLeadsCreate + , CompaniesLeadsCreate + + -- * Request Lenses + , clcXgafv + , clcQuotaUser + , clcPrettyPrint + , clcUploadProtocol + , clcCompanyId + , clcPp + , clcAccessToken + , clcUploadType + , clcBearerToken + , clcKey + , clcOauthToken + , clcFields + , clcCallback + , clcAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersCompaniesLeadsCreate@ which the +-- 'CompaniesLeadsCreate' request conforms to. +type CompaniesLeadsCreateAPI = + "v2" :> + "companies" :> + Capture "companyId" Text :> + "leads" :> Post '[JSON] CreateLeadResponse + +-- | Creates an advertiser lead for the given company ID. +-- +-- /See:/ 'companiesLeadsCreate' smart constructor. +data CompaniesLeadsCreate = CompaniesLeadsCreate + { _clcXgafv :: !(Maybe Text) + , _clcQuotaUser :: !(Maybe Text) + , _clcPrettyPrint :: !Bool + , _clcUploadProtocol :: !(Maybe Text) + , _clcCompanyId :: !Text + , _clcPp :: !Bool + , _clcAccessToken :: !(Maybe Text) + , _clcUploadType :: !(Maybe Text) + , _clcBearerToken :: !(Maybe Text) + , _clcKey :: !(Maybe Text) + , _clcOauthToken :: !(Maybe Text) + , _clcFields :: !(Maybe Text) + , _clcCallback :: !(Maybe Text) + , _clcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompaniesLeadsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clcXgafv' +-- +-- * 'clcQuotaUser' +-- +-- * 'clcPrettyPrint' +-- +-- * 'clcUploadProtocol' +-- +-- * 'clcCompanyId' +-- +-- * 'clcPp' +-- +-- * 'clcAccessToken' +-- +-- * 'clcUploadType' +-- +-- * 'clcBearerToken' +-- +-- * 'clcKey' +-- +-- * 'clcOauthToken' +-- +-- * 'clcFields' +-- +-- * 'clcCallback' +-- +-- * 'clcAlt' +companiesLeadsCreate + :: Text -- ^ 'companyId' + -> CompaniesLeadsCreate +companiesLeadsCreate pClcCompanyId_ = + CompaniesLeadsCreate + { _clcXgafv = Nothing + , _clcQuotaUser = Nothing + , _clcPrettyPrint = True + , _clcUploadProtocol = Nothing + , _clcCompanyId = pClcCompanyId_ + , _clcPp = True + , _clcAccessToken = Nothing + , _clcUploadType = Nothing + , _clcBearerToken = Nothing + , _clcKey = Nothing + , _clcOauthToken = Nothing + , _clcFields = Nothing + , _clcCallback = Nothing + , _clcAlt = "json" + } + +-- | V1 error format. +clcXgafv :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcXgafv = lens _clcXgafv (\ s a -> s{_clcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +clcQuotaUser :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcQuotaUser + = lens _clcQuotaUser (\ s a -> s{_clcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clcPrettyPrint :: Lens' CompaniesLeadsCreate' Bool +clcPrettyPrint + = lens _clcPrettyPrint + (\ s a -> s{_clcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +clcUploadProtocol :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcUploadProtocol + = lens _clcUploadProtocol + (\ s a -> s{_clcUploadProtocol = a}) + +-- | The ID of the company to contact. +clcCompanyId :: Lens' CompaniesLeadsCreate' Text +clcCompanyId + = lens _clcCompanyId (\ s a -> s{_clcCompanyId = a}) + +-- | Pretty-print response. +clcPp :: Lens' CompaniesLeadsCreate' Bool +clcPp = lens _clcPp (\ s a -> s{_clcPp = a}) + +-- | OAuth access token. +clcAccessToken :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcAccessToken + = lens _clcAccessToken + (\ s a -> s{_clcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +clcUploadType :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcUploadType + = lens _clcUploadType + (\ s a -> s{_clcUploadType = a}) + +-- | OAuth bearer token. +clcBearerToken :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcBearerToken + = lens _clcBearerToken + (\ s a -> s{_clcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clcKey :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcKey = lens _clcKey (\ s a -> s{_clcKey = a}) + +-- | OAuth 2.0 token for the current user. +clcOauthToken :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcOauthToken + = lens _clcOauthToken + (\ s a -> s{_clcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clcFields :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcFields + = lens _clcFields (\ s a -> s{_clcFields = a}) + +-- | JSONP +clcCallback :: Lens' CompaniesLeadsCreate' (Maybe Text) +clcCallback + = lens _clcCallback (\ s a -> s{_clcCallback = a}) + +-- | Data format for response. +clcAlt :: Lens' CompaniesLeadsCreate' Text +clcAlt = lens _clcAlt (\ s a -> s{_clcAlt = a}) + +instance GoogleRequest CompaniesLeadsCreate' where + type Rs CompaniesLeadsCreate' = CreateLeadResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u CompaniesLeadsCreate{..} + = go _clcXgafv _clcQuotaUser _clcPrettyPrint + _clcUploadProtocol + _clcCompanyId + _clcPp + _clcAccessToken + _clcUploadType + _clcBearerToken + _clcKey + _clcOauthToken + _clcFields + _clcCallback + _clcAlt + where go + = clientWithRoute + (Proxy :: Proxy CompaniesLeadsCreateAPI) + r + u diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/Companies/List.hs b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/List.hs new file mode 100644 index 000000000..41363434b --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/Companies/List.hs @@ -0,0 +1,567 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.Companies.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists companies. +-- +-- /See:/ for @PartnersCompaniesList@. +module Partners.Companies.List + ( + -- * REST Resource + CompaniesListAPI + + -- * Creating a Request + , companiesList + , CompaniesList + + -- * Request Lenses + , clLanguageCodes + , clXgafv + , clMaxMonthlyBudgetUnits + , clQuotaUser + , clPrettyPrint + , clUploadProtocol + , clOrderBy + , clPp + , clCompanyName + , clAccessToken + , clUploadType + , clAddress + , clMinMonthlyBudgetNanos + , clIndustries + , clRequestMetadataPartnersSessionId + , clBearerToken + , clKey + , clMaxMonthlyBudgetNanos + , clRequestMetadataLocale + , clView + , clRequestMetadataExperimentIds + , clRequestMetadataUserOverridesIpAddress + , clMaxMonthlyBudgetCurrencyCode + , clWebsiteUrl + , clPageToken + , clRequestMetadataTrafficSourceTrafficSubId + , clOauthToken + , clGpsMotivations + , clPageSize + , clMinMonthlyBudgetCurrencyCode + , clServices + , clRequestMetadataUserOverridesUserId + , clMinMonthlyBudgetUnits + , clRequestMetadataTrafficSourceTrafficSourceId + , clFields + , clCallback + , clAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersCompaniesList@ which the +-- 'CompaniesList' request conforms to. +type CompaniesListAPI = + "v2" :> + "companies" :> + QueryParams "languageCodes" Text :> + QueryParam "maxMonthlyBudget.units" Int64 :> + QueryParam "orderBy" Text :> + QueryParam "companyName" Text :> + QueryParam "address" Text :> + QueryParam "minMonthlyBudget.nanos" Int32 :> + QueryParams "industries" Text :> + QueryParam "requestMetadata.partnersSessionId" Text + :> + QueryParam "maxMonthlyBudget.nanos" Int32 :> + QueryParam "requestMetadata.locale" Text :> + QueryParam "view" Text :> + QueryParams "requestMetadata.experimentIds" Text + :> + QueryParam + "requestMetadata.userOverrides.ipAddress" + Text + :> + QueryParam "maxMonthlyBudget.currencyCode" + Text + :> + QueryParam "websiteUrl" Text :> + QueryParam "pageToken" Text :> + QueryParam + "requestMetadata.trafficSource.trafficSubId" + Text + :> + QueryParams "gpsMotivations" Text :> + QueryParam "pageSize" Int32 :> + QueryParam + "minMonthlyBudget.currencyCode" + Text + :> + QueryParams "services" Text :> + QueryParam + "requestMetadata.userOverrides.userId" + Text + :> + QueryParam + "minMonthlyBudget.units" + Int64 + :> + QueryParam + "requestMetadata.trafficSource.trafficSourceId" + Text + :> + Get '[JSON] + ListCompaniesResponse + +-- | Lists companies. +-- +-- /See:/ 'companiesList' smart constructor. +data CompaniesList = CompaniesList + { _clLanguageCodes :: !(Maybe Text) + , _clXgafv :: !(Maybe Text) + , _clMaxMonthlyBudgetUnits :: !(Maybe Int64) + , _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUploadProtocol :: !(Maybe Text) + , _clOrderBy :: !(Maybe Text) + , _clPp :: !Bool + , _clCompanyName :: !(Maybe Text) + , _clAccessToken :: !(Maybe Text) + , _clUploadType :: !(Maybe Text) + , _clAddress :: !(Maybe Text) + , _clMinMonthlyBudgetNanos :: !(Maybe Int32) + , _clIndustries :: !(Maybe Text) + , _clRequestMetadataPartnersSessionId :: !(Maybe Text) + , _clBearerToken :: !(Maybe Text) + , _clKey :: !(Maybe Text) + , _clMaxMonthlyBudgetNanos :: !(Maybe Int32) + , _clRequestMetadataLocale :: !(Maybe Text) + , _clView :: !(Maybe Text) + , _clRequestMetadataExperimentIds :: !(Maybe Text) + , _clRequestMetadataUserOverridesIpAddress :: !(Maybe Text) + , _clMaxMonthlyBudgetCurrencyCode :: !(Maybe Text) + , _clWebsiteUrl :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clGpsMotivations :: !(Maybe Text) + , _clPageSize :: !(Maybe Int32) + , _clMinMonthlyBudgetCurrencyCode :: !(Maybe Text) + , _clServices :: !(Maybe Text) + , _clRequestMetadataUserOverridesUserId :: !(Maybe Text) + , _clMinMonthlyBudgetUnits :: !(Maybe Int64) + , _clRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text) + , _clFields :: !(Maybe Text) + , _clCallback :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CompaniesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clLanguageCodes' +-- +-- * 'clXgafv' +-- +-- * 'clMaxMonthlyBudgetUnits' +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUploadProtocol' +-- +-- * 'clOrderBy' +-- +-- * 'clPp' +-- +-- * 'clCompanyName' +-- +-- * 'clAccessToken' +-- +-- * 'clUploadType' +-- +-- * 'clAddress' +-- +-- * 'clMinMonthlyBudgetNanos' +-- +-- * 'clIndustries' +-- +-- * 'clRequestMetadataPartnersSessionId' +-- +-- * 'clBearerToken' +-- +-- * 'clKey' +-- +-- * 'clMaxMonthlyBudgetNanos' +-- +-- * 'clRequestMetadataLocale' +-- +-- * 'clView' +-- +-- * 'clRequestMetadataExperimentIds' +-- +-- * 'clRequestMetadataUserOverridesIpAddress' +-- +-- * 'clMaxMonthlyBudgetCurrencyCode' +-- +-- * 'clWebsiteUrl' +-- +-- * 'clPageToken' +-- +-- * 'clRequestMetadataTrafficSourceTrafficSubId' +-- +-- * 'clOauthToken' +-- +-- * 'clGpsMotivations' +-- +-- * 'clPageSize' +-- +-- * 'clMinMonthlyBudgetCurrencyCode' +-- +-- * 'clServices' +-- +-- * 'clRequestMetadataUserOverridesUserId' +-- +-- * 'clMinMonthlyBudgetUnits' +-- +-- * 'clRequestMetadataTrafficSourceTrafficSourceId' +-- +-- * 'clFields' +-- +-- * 'clCallback' +-- +-- * 'clAlt' +companiesList + :: CompaniesList +companiesList = + CompaniesList + { _clLanguageCodes = Nothing + , _clXgafv = Nothing + , _clMaxMonthlyBudgetUnits = Nothing + , _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUploadProtocol = Nothing + , _clOrderBy = Nothing + , _clPp = True + , _clCompanyName = Nothing + , _clAccessToken = Nothing + , _clUploadType = Nothing + , _clAddress = Nothing + , _clMinMonthlyBudgetNanos = Nothing + , _clIndustries = Nothing + , _clRequestMetadataPartnersSessionId = Nothing + , _clBearerToken = Nothing + , _clKey = Nothing + , _clMaxMonthlyBudgetNanos = Nothing + , _clRequestMetadataLocale = Nothing + , _clView = Nothing + , _clRequestMetadataExperimentIds = Nothing + , _clRequestMetadataUserOverridesIpAddress = Nothing + , _clMaxMonthlyBudgetCurrencyCode = Nothing + , _clWebsiteUrl = Nothing + , _clPageToken = Nothing + , _clRequestMetadataTrafficSourceTrafficSubId = Nothing + , _clOauthToken = Nothing + , _clGpsMotivations = Nothing + , _clPageSize = Nothing + , _clMinMonthlyBudgetCurrencyCode = Nothing + , _clServices = Nothing + , _clRequestMetadataUserOverridesUserId = Nothing + , _clMinMonthlyBudgetUnits = Nothing + , _clRequestMetadataTrafficSourceTrafficSourceId = Nothing + , _clFields = Nothing + , _clCallback = Nothing + , _clAlt = "json" + } + +-- | List of language codes that company can support. Only primary language +-- subtags are accepted as defined by BCP 47 (IETF BCP 47, \"Tags for +-- Identifying Languages\"). +clLanguageCodes :: Lens' CompaniesList' (Maybe Text) +clLanguageCodes + = lens _clLanguageCodes + (\ s a -> s{_clLanguageCodes = a}) + +-- | V1 error format. +clXgafv :: Lens' CompaniesList' (Maybe Text) +clXgafv = lens _clXgafv (\ s a -> s{_clXgafv = a}) + +-- | The whole units of the amount. For example if \`currencyCode\` is +-- \`\"USD\"\`, then 1 unit is one US dollar. +clMaxMonthlyBudgetUnits :: Lens' CompaniesList' (Maybe Int64) +clMaxMonthlyBudgetUnits + = lens _clMaxMonthlyBudgetUnits + (\ s a -> s{_clMaxMonthlyBudgetUnits = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +clQuotaUser :: Lens' CompaniesList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CompaniesList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +clUploadProtocol :: Lens' CompaniesList' (Maybe Text) +clUploadProtocol + = lens _clUploadProtocol + (\ s a -> s{_clUploadProtocol = a}) + +-- | How to order addresses within the returned companies. Currently, only +-- \`address\` and \`address desc\` is supported which will sorted by +-- closest to farthest in distance from given address and farthest to +-- closest distance from given address respectively. +clOrderBy :: Lens' CompaniesList' (Maybe Text) +clOrderBy + = lens _clOrderBy (\ s a -> s{_clOrderBy = a}) + +-- | Pretty-print response. +clPp :: Lens' CompaniesList' Bool +clPp = lens _clPp (\ s a -> s{_clPp = a}) + +-- | Company name to search for. +clCompanyName :: Lens' CompaniesList' (Maybe Text) +clCompanyName + = lens _clCompanyName + (\ s a -> s{_clCompanyName = a}) + +-- | OAuth access token. +clAccessToken :: Lens' CompaniesList' (Maybe Text) +clAccessToken + = lens _clAccessToken + (\ s a -> s{_clAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +clUploadType :: Lens' CompaniesList' (Maybe Text) +clUploadType + = lens _clUploadType (\ s a -> s{_clUploadType = a}) + +-- | The address to use when searching for companies. If not given, the +-- geo-located address of the request is used. +clAddress :: Lens' CompaniesList' (Maybe Text) +clAddress + = lens _clAddress (\ s a -> s{_clAddress = a}) + +-- | Number of nano (10^-9) units of the amount. The value must be between +-- -999,999,999 and +999,999,999 inclusive. If \`units\` is positive, +-- \`nanos\` must be positive or zero. If \`units\` is zero, \`nanos\` can +-- be positive, zero, or negative. If \`units\` is negative, \`nanos\` must +-- be negative or zero. For example $-1.75 is represented as \`units\`=-1 +-- and \`nanos\`=-750,000,000. +clMinMonthlyBudgetNanos :: Lens' CompaniesList' (Maybe Int32) +clMinMonthlyBudgetNanos + = lens _clMinMonthlyBudgetNanos + (\ s a -> s{_clMinMonthlyBudgetNanos = a}) + +-- | List of industries the company can help with. +clIndustries :: Lens' CompaniesList' (Maybe Text) +clIndustries + = lens _clIndustries (\ s a -> s{_clIndustries = a}) + +-- | Google Partners session ID. +clRequestMetadataPartnersSessionId :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataPartnersSessionId + = lens _clRequestMetadataPartnersSessionId + (\ s a -> s{_clRequestMetadataPartnersSessionId = a}) + +-- | OAuth bearer token. +clBearerToken :: Lens' CompaniesList' (Maybe Text) +clBearerToken + = lens _clBearerToken + (\ s a -> s{_clBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CompaniesList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | Number of nano (10^-9) units of the amount. The value must be between +-- -999,999,999 and +999,999,999 inclusive. If \`units\` is positive, +-- \`nanos\` must be positive or zero. If \`units\` is zero, \`nanos\` can +-- be positive, zero, or negative. If \`units\` is negative, \`nanos\` must +-- be negative or zero. For example $-1.75 is represented as \`units\`=-1 +-- and \`nanos\`=-750,000,000. +clMaxMonthlyBudgetNanos :: Lens' CompaniesList' (Maybe Int32) +clMaxMonthlyBudgetNanos + = lens _clMaxMonthlyBudgetNanos + (\ s a -> s{_clMaxMonthlyBudgetNanos = a}) + +-- | Locale to use for the current request. +clRequestMetadataLocale :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataLocale + = lens _clRequestMetadataLocale + (\ s a -> s{_clRequestMetadataLocale = a}) + +-- | The view of the \`Company\` resource to be returned. This must not be +-- \`COMPANY_VIEW_UNSPECIFIED\`. +clView :: Lens' CompaniesList' (Maybe Text) +clView = lens _clView (\ s a -> s{_clView = a}) + +-- | Experiment IDs the current request belongs to. +clRequestMetadataExperimentIds :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataExperimentIds + = lens _clRequestMetadataExperimentIds + (\ s a -> s{_clRequestMetadataExperimentIds = a}) + +-- | IP address to use instead of the user\'s geo-located IP address. +clRequestMetadataUserOverridesIpAddress :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataUserOverridesIpAddress + = lens _clRequestMetadataUserOverridesIpAddress + (\ s a -> + s{_clRequestMetadataUserOverridesIpAddress = a}) + +-- | The 3-letter currency code defined in ISO 4217. +clMaxMonthlyBudgetCurrencyCode :: Lens' CompaniesList' (Maybe Text) +clMaxMonthlyBudgetCurrencyCode + = lens _clMaxMonthlyBudgetCurrencyCode + (\ s a -> s{_clMaxMonthlyBudgetCurrencyCode = a}) + +-- | Website URL that will help to find a better matched company. . +clWebsiteUrl :: Lens' CompaniesList' (Maybe Text) +clWebsiteUrl + = lens _clWebsiteUrl (\ s a -> s{_clWebsiteUrl = a}) + +-- | A token identifying a page of results that the server returns. +-- Typically, this is the value of +-- \`ListCompaniesResponse.next_page_token\` returned from the previous +-- call to ListCompanies. +clPageToken :: Lens' CompaniesList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | Second level identifier to indicate where the traffic comes from. An +-- identifier has multiple letters created by a team which redirected the +-- traffic to us. +clRequestMetadataTrafficSourceTrafficSubId :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataTrafficSourceTrafficSubId + = lens _clRequestMetadataTrafficSourceTrafficSubId + (\ s a -> + s{_clRequestMetadataTrafficSourceTrafficSubId = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CompaniesList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | List of reasons for using Google Partner Search to get companies. +clGpsMotivations :: Lens' CompaniesList' (Maybe Text) +clGpsMotivations + = lens _clGpsMotivations + (\ s a -> s{_clGpsMotivations = a}) + +-- | Requested page size. Server may return fewer companies than requested. +-- If unspecified, server picks an appropriate default. +clPageSize :: Lens' CompaniesList' (Maybe Int32) +clPageSize + = lens _clPageSize (\ s a -> s{_clPageSize = a}) + +-- | The 3-letter currency code defined in ISO 4217. +clMinMonthlyBudgetCurrencyCode :: Lens' CompaniesList' (Maybe Text) +clMinMonthlyBudgetCurrencyCode + = lens _clMinMonthlyBudgetCurrencyCode + (\ s a -> s{_clMinMonthlyBudgetCurrencyCode = a}) + +-- | List of services the company can help with. +clServices :: Lens' CompaniesList' (Maybe Text) +clServices + = lens _clServices (\ s a -> s{_clServices = a}) + +-- | Logged-in user ID to impersonate instead of the user\'s ID. +clRequestMetadataUserOverridesUserId :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataUserOverridesUserId + = lens _clRequestMetadataUserOverridesUserId + (\ s a -> + s{_clRequestMetadataUserOverridesUserId = a}) + +-- | The whole units of the amount. For example if \`currencyCode\` is +-- \`\"USD\"\`, then 1 unit is one US dollar. +clMinMonthlyBudgetUnits :: Lens' CompaniesList' (Maybe Int64) +clMinMonthlyBudgetUnits + = lens _clMinMonthlyBudgetUnits + (\ s a -> s{_clMinMonthlyBudgetUnits = a}) + +-- | Identifier to indicate where the traffic comes from. An identifier has +-- multiple letters created by a team which redirected the traffic to us. +clRequestMetadataTrafficSourceTrafficSourceId :: Lens' CompaniesList' (Maybe Text) +clRequestMetadataTrafficSourceTrafficSourceId + = lens _clRequestMetadataTrafficSourceTrafficSourceId + (\ s a -> + s{_clRequestMetadataTrafficSourceTrafficSourceId = + a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CompaniesList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | JSONP +clCallback :: Lens' CompaniesList' (Maybe Text) +clCallback + = lens _clCallback (\ s a -> s{_clCallback = a}) + +-- | Data format for response. +clAlt :: Lens' CompaniesList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CompaniesList' where + type Rs CompaniesList' = ListCompaniesResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u CompaniesList{..} + = go _clLanguageCodes _clXgafv + _clMaxMonthlyBudgetUnits + _clQuotaUser + _clPrettyPrint + _clUploadProtocol + _clOrderBy + _clPp + _clCompanyName + _clAccessToken + _clUploadType + _clAddress + _clMinMonthlyBudgetNanos + _clIndustries + _clRequestMetadataPartnersSessionId + _clBearerToken + _clKey + _clMaxMonthlyBudgetNanos + _clRequestMetadataLocale + _clView + _clRequestMetadataExperimentIds + _clRequestMetadataUserOverridesIpAddress + _clMaxMonthlyBudgetCurrencyCode + _clWebsiteUrl + _clPageToken + _clRequestMetadataTrafficSourceTrafficSubId + _clOauthToken + _clGpsMotivations + _clPageSize + _clMinMonthlyBudgetCurrencyCode + _clServices + _clRequestMetadataUserOverridesUserId + _clMinMonthlyBudgetUnits + _clRequestMetadataTrafficSourceTrafficSourceId + _clFields + _clCallback + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CompaniesListAPI) r + u diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/UserEvents/Log.hs b/gogol-partners/gen/Network/Google/Resource/Partners/UserEvents/Log.hs new file mode 100644 index 000000000..fcffe12bc --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/UserEvents/Log.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.UserEvents.Log +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Logs a user event. +-- +-- /See:/ for @PartnersUserEventsLog@. +module Partners.UserEvents.Log + ( + -- * REST Resource + UserEventsLogAPI + + -- * Creating a Request + , userEventsLog + , UserEventsLog + + -- * Request Lenses + , uelXgafv + , uelQuotaUser + , uelPrettyPrint + , uelUploadProtocol + , uelPp + , uelAccessToken + , uelUploadType + , uelBearerToken + , uelKey + , uelOauthToken + , uelFields + , uelCallback + , uelAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersUserEventsLog@ which the +-- 'UserEventsLog' request conforms to. +type UserEventsLogAPI = + "v2" :> + "userEvents:log" :> Post '[JSON] LogUserEventResponse + +-- | Logs a user event. +-- +-- /See:/ 'userEventsLog' smart constructor. +data UserEventsLog = UserEventsLog + { _uelXgafv :: !(Maybe Text) + , _uelQuotaUser :: !(Maybe Text) + , _uelPrettyPrint :: !Bool + , _uelUploadProtocol :: !(Maybe Text) + , _uelPp :: !Bool + , _uelAccessToken :: !(Maybe Text) + , _uelUploadType :: !(Maybe Text) + , _uelBearerToken :: !(Maybe Text) + , _uelKey :: !(Maybe Text) + , _uelOauthToken :: !(Maybe Text) + , _uelFields :: !(Maybe Text) + , _uelCallback :: !(Maybe Text) + , _uelAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserEventsLog'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uelXgafv' +-- +-- * 'uelQuotaUser' +-- +-- * 'uelPrettyPrint' +-- +-- * 'uelUploadProtocol' +-- +-- * 'uelPp' +-- +-- * 'uelAccessToken' +-- +-- * 'uelUploadType' +-- +-- * 'uelBearerToken' +-- +-- * 'uelKey' +-- +-- * 'uelOauthToken' +-- +-- * 'uelFields' +-- +-- * 'uelCallback' +-- +-- * 'uelAlt' +userEventsLog + :: UserEventsLog +userEventsLog = + UserEventsLog + { _uelXgafv = Nothing + , _uelQuotaUser = Nothing + , _uelPrettyPrint = True + , _uelUploadProtocol = Nothing + , _uelPp = True + , _uelAccessToken = Nothing + , _uelUploadType = Nothing + , _uelBearerToken = Nothing + , _uelKey = Nothing + , _uelOauthToken = Nothing + , _uelFields = Nothing + , _uelCallback = Nothing + , _uelAlt = "json" + } + +-- | V1 error format. +uelXgafv :: Lens' UserEventsLog' (Maybe Text) +uelXgafv = lens _uelXgafv (\ s a -> s{_uelXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +uelQuotaUser :: Lens' UserEventsLog' (Maybe Text) +uelQuotaUser + = lens _uelQuotaUser (\ s a -> s{_uelQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uelPrettyPrint :: Lens' UserEventsLog' Bool +uelPrettyPrint + = lens _uelPrettyPrint + (\ s a -> s{_uelPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +uelUploadProtocol :: Lens' UserEventsLog' (Maybe Text) +uelUploadProtocol + = lens _uelUploadProtocol + (\ s a -> s{_uelUploadProtocol = a}) + +-- | Pretty-print response. +uelPp :: Lens' UserEventsLog' Bool +uelPp = lens _uelPp (\ s a -> s{_uelPp = a}) + +-- | OAuth access token. +uelAccessToken :: Lens' UserEventsLog' (Maybe Text) +uelAccessToken + = lens _uelAccessToken + (\ s a -> s{_uelAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +uelUploadType :: Lens' UserEventsLog' (Maybe Text) +uelUploadType + = lens _uelUploadType + (\ s a -> s{_uelUploadType = a}) + +-- | OAuth bearer token. +uelBearerToken :: Lens' UserEventsLog' (Maybe Text) +uelBearerToken + = lens _uelBearerToken + (\ s a -> s{_uelBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uelKey :: Lens' UserEventsLog' (Maybe Text) +uelKey = lens _uelKey (\ s a -> s{_uelKey = a}) + +-- | OAuth 2.0 token for the current user. +uelOauthToken :: Lens' UserEventsLog' (Maybe Text) +uelOauthToken + = lens _uelOauthToken + (\ s a -> s{_uelOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uelFields :: Lens' UserEventsLog' (Maybe Text) +uelFields + = lens _uelFields (\ s a -> s{_uelFields = a}) + +-- | JSONP +uelCallback :: Lens' UserEventsLog' (Maybe Text) +uelCallback + = lens _uelCallback (\ s a -> s{_uelCallback = a}) + +-- | Data format for response. +uelAlt :: Lens' UserEventsLog' Text +uelAlt = lens _uelAlt (\ s a -> s{_uelAlt = a}) + +instance GoogleRequest UserEventsLog' where + type Rs UserEventsLog' = LogUserEventResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u UserEventsLog{..} + = go _uelXgafv _uelQuotaUser _uelPrettyPrint + _uelUploadProtocol + _uelPp + _uelAccessToken + _uelUploadType + _uelBearerToken + _uelKey + _uelOauthToken + _uelFields + _uelCallback + _uelAlt + where go + = clientWithRoute (Proxy :: Proxy UserEventsLogAPI) r + u diff --git a/gogol-partners/gen/Network/Google/Resource/Partners/UserStates/List.hs b/gogol-partners/gen/Network/Google/Resource/Partners/UserStates/List.hs new file mode 100644 index 000000000..0d37d91e5 --- /dev/null +++ b/gogol-partners/gen/Network/Google/Resource/Partners/UserStates/List.hs @@ -0,0 +1,324 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Partners.UserStates.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists states for current user. +-- +-- /See:/ for @PartnersUserStatesList@. +module Partners.UserStates.List + ( + -- * REST Resource + UserStatesListAPI + + -- * Creating a Request + , userStatesList + , UserStatesList + + -- * Request Lenses + , uslXgafv + , uslQuotaUser + , uslPrettyPrint + , uslUploadProtocol + , uslPp + , uslAccessToken + , uslUploadType + , uslRequestMetadataPartnersSessionId + , uslBearerToken + , uslKey + , uslRequestMetadataLocale + , uslRequestMetadataExperimentIds + , uslRequestMetadataUserOverridesIpAddress + , uslRequestMetadataTrafficSourceTrafficSubId + , uslOauthToken + , uslRequestMetadataUserOverridesUserId + , uslRequestMetadataTrafficSourceTrafficSourceId + , uslFields + , uslCallback + , uslAlt + ) where + +import Network.Google.Partners.Types +import Network.Google.Prelude + +-- | A resource alias for @PartnersUserStatesList@ which the +-- 'UserStatesList' request conforms to. +type UserStatesListAPI = + "v2" :> + "userStates" :> + QueryParam "requestMetadata.partnersSessionId" Text + :> + QueryParam "requestMetadata.locale" Text :> + QueryParams "requestMetadata.experimentIds" Text :> + QueryParam "requestMetadata.userOverrides.ipAddress" + Text + :> + QueryParam + "requestMetadata.trafficSource.trafficSubId" + Text + :> + QueryParam "requestMetadata.userOverrides.userId" + Text + :> + QueryParam + "requestMetadata.trafficSource.trafficSourceId" + Text + :> Get '[JSON] ListUserStatesResponse + +-- | Lists states for current user. +-- +-- /See:/ 'userStatesList' smart constructor. +data UserStatesList = UserStatesList + { _uslXgafv :: !(Maybe Text) + , _uslQuotaUser :: !(Maybe Text) + , _uslPrettyPrint :: !Bool + , _uslUploadProtocol :: !(Maybe Text) + , _uslPp :: !Bool + , _uslAccessToken :: !(Maybe Text) + , _uslUploadType :: !(Maybe Text) + , _uslRequestMetadataPartnersSessionId :: !(Maybe Text) + , _uslBearerToken :: !(Maybe Text) + , _uslKey :: !(Maybe Text) + , _uslRequestMetadataLocale :: !(Maybe Text) + , _uslRequestMetadataExperimentIds :: !(Maybe Text) + , _uslRequestMetadataUserOverridesIpAddress :: !(Maybe Text) + , _uslRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text) + , _uslOauthToken :: !(Maybe Text) + , _uslRequestMetadataUserOverridesUserId :: !(Maybe Text) + , _uslRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text) + , _uslFields :: !(Maybe Text) + , _uslCallback :: !(Maybe Text) + , _uslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserStatesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uslXgafv' +-- +-- * 'uslQuotaUser' +-- +-- * 'uslPrettyPrint' +-- +-- * 'uslUploadProtocol' +-- +-- * 'uslPp' +-- +-- * 'uslAccessToken' +-- +-- * 'uslUploadType' +-- +-- * 'uslRequestMetadataPartnersSessionId' +-- +-- * 'uslBearerToken' +-- +-- * 'uslKey' +-- +-- * 'uslRequestMetadataLocale' +-- +-- * 'uslRequestMetadataExperimentIds' +-- +-- * 'uslRequestMetadataUserOverridesIpAddress' +-- +-- * 'uslRequestMetadataTrafficSourceTrafficSubId' +-- +-- * 'uslOauthToken' +-- +-- * 'uslRequestMetadataUserOverridesUserId' +-- +-- * 'uslRequestMetadataTrafficSourceTrafficSourceId' +-- +-- * 'uslFields' +-- +-- * 'uslCallback' +-- +-- * 'uslAlt' +userStatesList + :: UserStatesList +userStatesList = + UserStatesList + { _uslXgafv = Nothing + , _uslQuotaUser = Nothing + , _uslPrettyPrint = True + , _uslUploadProtocol = Nothing + , _uslPp = True + , _uslAccessToken = Nothing + , _uslUploadType = Nothing + , _uslRequestMetadataPartnersSessionId = Nothing + , _uslBearerToken = Nothing + , _uslKey = Nothing + , _uslRequestMetadataLocale = Nothing + , _uslRequestMetadataExperimentIds = Nothing + , _uslRequestMetadataUserOverridesIpAddress = Nothing + , _uslRequestMetadataTrafficSourceTrafficSubId = Nothing + , _uslOauthToken = Nothing + , _uslRequestMetadataUserOverridesUserId = Nothing + , _uslRequestMetadataTrafficSourceTrafficSourceId = Nothing + , _uslFields = Nothing + , _uslCallback = Nothing + , _uslAlt = "json" + } + +-- | V1 error format. +uslXgafv :: Lens' UserStatesList' (Maybe Text) +uslXgafv = lens _uslXgafv (\ s a -> s{_uslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +uslQuotaUser :: Lens' UserStatesList' (Maybe Text) +uslQuotaUser + = lens _uslQuotaUser (\ s a -> s{_uslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uslPrettyPrint :: Lens' UserStatesList' Bool +uslPrettyPrint + = lens _uslPrettyPrint + (\ s a -> s{_uslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +uslUploadProtocol :: Lens' UserStatesList' (Maybe Text) +uslUploadProtocol + = lens _uslUploadProtocol + (\ s a -> s{_uslUploadProtocol = a}) + +-- | Pretty-print response. +uslPp :: Lens' UserStatesList' Bool +uslPp = lens _uslPp (\ s a -> s{_uslPp = a}) + +-- | OAuth access token. +uslAccessToken :: Lens' UserStatesList' (Maybe Text) +uslAccessToken + = lens _uslAccessToken + (\ s a -> s{_uslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +uslUploadType :: Lens' UserStatesList' (Maybe Text) +uslUploadType + = lens _uslUploadType + (\ s a -> s{_uslUploadType = a}) + +-- | Google Partners session ID. +uslRequestMetadataPartnersSessionId :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataPartnersSessionId + = lens _uslRequestMetadataPartnersSessionId + (\ s a -> + s{_uslRequestMetadataPartnersSessionId = a}) + +-- | OAuth bearer token. +uslBearerToken :: Lens' UserStatesList' (Maybe Text) +uslBearerToken + = lens _uslBearerToken + (\ s a -> s{_uslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uslKey :: Lens' UserStatesList' (Maybe Text) +uslKey = lens _uslKey (\ s a -> s{_uslKey = a}) + +-- | Locale to use for the current request. +uslRequestMetadataLocale :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataLocale + = lens _uslRequestMetadataLocale + (\ s a -> s{_uslRequestMetadataLocale = a}) + +-- | Experiment IDs the current request belongs to. +uslRequestMetadataExperimentIds :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataExperimentIds + = lens _uslRequestMetadataExperimentIds + (\ s a -> s{_uslRequestMetadataExperimentIds = a}) + +-- | IP address to use instead of the user\'s geo-located IP address. +uslRequestMetadataUserOverridesIpAddress :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataUserOverridesIpAddress + = lens _uslRequestMetadataUserOverridesIpAddress + (\ s a -> + s{_uslRequestMetadataUserOverridesIpAddress = a}) + +-- | Second level identifier to indicate where the traffic comes from. An +-- identifier has multiple letters created by a team which redirected the +-- traffic to us. +uslRequestMetadataTrafficSourceTrafficSubId :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataTrafficSourceTrafficSubId + = lens _uslRequestMetadataTrafficSourceTrafficSubId + (\ s a -> + s{_uslRequestMetadataTrafficSourceTrafficSubId = a}) + +-- | OAuth 2.0 token for the current user. +uslOauthToken :: Lens' UserStatesList' (Maybe Text) +uslOauthToken + = lens _uslOauthToken + (\ s a -> s{_uslOauthToken = a}) + +-- | Logged-in user ID to impersonate instead of the user\'s ID. +uslRequestMetadataUserOverridesUserId :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataUserOverridesUserId + = lens _uslRequestMetadataUserOverridesUserId + (\ s a -> + s{_uslRequestMetadataUserOverridesUserId = a}) + +-- | Identifier to indicate where the traffic comes from. An identifier has +-- multiple letters created by a team which redirected the traffic to us. +uslRequestMetadataTrafficSourceTrafficSourceId :: Lens' UserStatesList' (Maybe Text) +uslRequestMetadataTrafficSourceTrafficSourceId + = lens + _uslRequestMetadataTrafficSourceTrafficSourceId + (\ s a -> + s{_uslRequestMetadataTrafficSourceTrafficSourceId = + a}) + +-- | Selector specifying which fields to include in a partial response. +uslFields :: Lens' UserStatesList' (Maybe Text) +uslFields + = lens _uslFields (\ s a -> s{_uslFields = a}) + +-- | JSONP +uslCallback :: Lens' UserStatesList' (Maybe Text) +uslCallback + = lens _uslCallback (\ s a -> s{_uslCallback = a}) + +-- | Data format for response. +uslAlt :: Lens' UserStatesList' Text +uslAlt = lens _uslAlt (\ s a -> s{_uslAlt = a}) + +instance GoogleRequest UserStatesList' where + type Rs UserStatesList' = ListUserStatesResponse + request = requestWithRoute defReq partnersURL + requestWithRoute r u UserStatesList{..} + = go _uslXgafv _uslQuotaUser _uslPrettyPrint + _uslUploadProtocol + _uslPp + _uslAccessToken + _uslUploadType + _uslRequestMetadataPartnersSessionId + _uslBearerToken + _uslKey + _uslRequestMetadataLocale + _uslRequestMetadataExperimentIds + _uslRequestMetadataUserOverridesIpAddress + _uslRequestMetadataTrafficSourceTrafficSubId + _uslOauthToken + _uslRequestMetadataUserOverridesUserId + _uslRequestMetadataTrafficSourceTrafficSourceId + _uslFields + _uslCallback + _uslAlt + where go + = clientWithRoute (Proxy :: Proxy UserStatesListAPI) + r + u diff --git a/gogol-partners/gogol-partners.cabal b/gogol-partners/gogol-partners.cabal new file mode 100644 index 000000000..2d07dcb6b --- /dev/null +++ b/gogol-partners/gogol-partners.cabal @@ -0,0 +1,49 @@ +name: gogol-partners +version: 0.0.1 +synopsis: Google Partners API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets advertisers search certified companies and create contact leads + with them, and also audits the usage of clients. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Partners + , Network.Google.Partners.Types + , Network.Google.Resource.Partners.ClientMessages.Log + , Network.Google.Resource.Partners.Companies.Get + , Network.Google.Resource.Partners.Companies.Leads.Create + , Network.Google.Resource.Partners.Companies.List + , Network.Google.Resource.Partners.UserEvents.Log + , Network.Google.Resource.Partners.UserStates.List + + other-modules: + Network.Google.Partners.Types.Product + , Network.Google.Partners.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-partners/src/.gitkeep b/gogol-partners/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-play-developer/LICENSE b/gogol-play-developer/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-play-developer/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-play-developer/Makefile b/gogol-play-developer/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-play-developer/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-play-developer/README.md b/gogol-play-developer/README.md new file mode 100644 index 000000000..50f3f9480 --- /dev/null +++ b/gogol-play-developer/README.md @@ -0,0 +1,28 @@ +# gogol-play-developer + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play Developer API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-play-developer` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-play-developer/Setup.hs b/gogol-play-developer/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-play-developer/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-play-developer/gen/Network/Google/PlayDeveloper.hs b/gogol-play-developer/gen/Network/Google/PlayDeveloper.hs new file mode 100644 index 000000000..606c2630e --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/PlayDeveloper.hs @@ -0,0 +1,551 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PlayDeveloper +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets Android application developers access their Google Play accounts. +-- +-- /See:/ +module Network.Google.PlayDeveloper + ( + -- * API + PlayDeveloperAPI + , playDeveloperAPI + , playDeveloperURL + + -- * Service Methods + + -- * REST Resources + + -- ** AndroidpublisherEditsApklistingsDelete + , module Androidpublisher.Edits.Apklistings.Delete + + -- ** AndroidpublisherEditsApklistingsDeleteall + , module Androidpublisher.Edits.Apklistings.Deleteall + + -- ** AndroidpublisherEditsApklistingsGet + , module Androidpublisher.Edits.Apklistings.Get + + -- ** AndroidpublisherEditsApklistingsList + , module Androidpublisher.Edits.Apklistings.List + + -- ** AndroidpublisherEditsApklistingsPatch + , module Androidpublisher.Edits.Apklistings.Patch + + -- ** AndroidpublisherEditsApklistingsUpdate + , module Androidpublisher.Edits.Apklistings.Update + + -- ** AndroidpublisherEditsApksAddexternallyhosted + , module Androidpublisher.Edits.Apks.Addexternallyhosted + + -- ** AndroidpublisherEditsApksList + , module Androidpublisher.Edits.Apks.List + + -- ** AndroidpublisherEditsApksUpload + , module Androidpublisher.Edits.Apks.Upload + + -- ** AndroidpublisherEditsCommit + , module Androidpublisher.Edits.Commit + + -- ** AndroidpublisherEditsDelete + , module Androidpublisher.Edits.Delete + + -- ** AndroidpublisherEditsDetailsGet + , module Androidpublisher.Edits.Details.Get + + -- ** AndroidpublisherEditsDetailsPatch + , module Androidpublisher.Edits.Details.Patch + + -- ** AndroidpublisherEditsDetailsUpdate + , module Androidpublisher.Edits.Details.Update + + -- ** AndroidpublisherEditsExpansionfilesGet + , module Androidpublisher.Edits.Expansionfiles.Get + + -- ** AndroidpublisherEditsExpansionfilesPatch + , module Androidpublisher.Edits.Expansionfiles.Patch + + -- ** AndroidpublisherEditsExpansionfilesUpdate + , module Androidpublisher.Edits.Expansionfiles.Update + + -- ** AndroidpublisherEditsExpansionfilesUpload + , module Androidpublisher.Edits.Expansionfiles.Upload + + -- ** AndroidpublisherEditsGet + , module Androidpublisher.Edits.Get + + -- ** AndroidpublisherEditsImagesDelete + , module Androidpublisher.Edits.Images.Delete + + -- ** AndroidpublisherEditsImagesDeleteall + , module Androidpublisher.Edits.Images.Deleteall + + -- ** AndroidpublisherEditsImagesList + , module Androidpublisher.Edits.Images.List + + -- ** AndroidpublisherEditsImagesUpload + , module Androidpublisher.Edits.Images.Upload + + -- ** AndroidpublisherEditsInsert + , module Androidpublisher.Edits.Insert + + -- ** AndroidpublisherEditsListingsDelete + , module Androidpublisher.Edits.Listings.Delete + + -- ** AndroidpublisherEditsListingsDeleteall + , module Androidpublisher.Edits.Listings.Deleteall + + -- ** AndroidpublisherEditsListingsGet + , module Androidpublisher.Edits.Listings.Get + + -- ** AndroidpublisherEditsListingsList + , module Androidpublisher.Edits.Listings.List + + -- ** AndroidpublisherEditsListingsPatch + , module Androidpublisher.Edits.Listings.Patch + + -- ** AndroidpublisherEditsListingsUpdate + , module Androidpublisher.Edits.Listings.Update + + -- ** AndroidpublisherEditsTestersGet + , module Androidpublisher.Edits.Testers.Get + + -- ** AndroidpublisherEditsTestersPatch + , module Androidpublisher.Edits.Testers.Patch + + -- ** AndroidpublisherEditsTestersUpdate + , module Androidpublisher.Edits.Testers.Update + + -- ** AndroidpublisherEditsTracksGet + , module Androidpublisher.Edits.Tracks.Get + + -- ** AndroidpublisherEditsTracksList + , module Androidpublisher.Edits.Tracks.List + + -- ** AndroidpublisherEditsTracksPatch + , module Androidpublisher.Edits.Tracks.Patch + + -- ** AndroidpublisherEditsTracksUpdate + , module Androidpublisher.Edits.Tracks.Update + + -- ** AndroidpublisherEditsValidate + , module Androidpublisher.Edits.Validate + + -- ** AndroidpublisherEntitlementsList + , module Androidpublisher.Entitlements.List + + -- ** AndroidpublisherInappproductsBatch + , module Androidpublisher.Inappproducts.Batch + + -- ** AndroidpublisherInappproductsDelete + , module Androidpublisher.Inappproducts.Delete + + -- ** AndroidpublisherInappproductsGet + , module Androidpublisher.Inappproducts.Get + + -- ** AndroidpublisherInappproductsInsert + , module Androidpublisher.Inappproducts.Insert + + -- ** AndroidpublisherInappproductsList + , module Androidpublisher.Inappproducts.List + + -- ** AndroidpublisherInappproductsPatch + , module Androidpublisher.Inappproducts.Patch + + -- ** AndroidpublisherInappproductsUpdate + , module Androidpublisher.Inappproducts.Update + + -- ** AndroidpublisherPurchasesProductsGet + , module Androidpublisher.Purchases.Products.Get + + -- ** AndroidpublisherPurchasesSubscriptionsCancel + , module Androidpublisher.Purchases.Subscriptions.Cancel + + -- ** AndroidpublisherPurchasesSubscriptionsDefer + , module Androidpublisher.Purchases.Subscriptions.Defer + + -- ** AndroidpublisherPurchasesSubscriptionsGet + , module Androidpublisher.Purchases.Subscriptions.Get + + -- ** AndroidpublisherPurchasesSubscriptionsRefund + , module Androidpublisher.Purchases.Subscriptions.Refund + + -- ** AndroidpublisherPurchasesSubscriptionsRevoke + , module Androidpublisher.Purchases.Subscriptions.Revoke + + -- * Types + + -- ** InappproductsUpdateResponse + , InappproductsUpdateResponse + , inappproductsUpdateResponse + , iurInappproduct + + -- ** MonthDay + , MonthDay + , monthDay + , mdDay + , mdMonth + + -- ** InappproductsBatchRequestEntry + , InappproductsBatchRequestEntry + , inappproductsBatchRequestEntry + , ibreMethodName + , ibreInappproductsinsertrequest + , ibreInappproductsupdaterequest + , ibreBatchId + + -- ** InAppProductListing + , InAppProductListing + , inAppProductListing + , iaplTitle + , iaplDescription + + -- ** Track + , Track + , track + , tVersionCodes + , tTrack + , tUserFraction + + -- ** TokenPagination + , TokenPagination + , tokenPagination + , tpNextPageToken + , tpPreviousPageToken + + -- ** ExpansionFile + , ExpansionFile + , expansionFile + , efFileSize + , efReferencesVersion + + -- ** Image + , Image + , image + , iUrl + , iSha1 + , iId + + -- ** ImagesDeleteAllResponse + , ImagesDeleteAllResponse + , imagesDeleteAllResponse + , idarDeleted + + -- ** SubscriptionPurchasesDeferRequest + , SubscriptionPurchasesDeferRequest + , subscriptionPurchasesDeferRequest + , spdrDeferralInfo + + -- ** Apk + , Apk + , apk + , apkVersionCode + , apkBinary + + -- ** Testers + , Testers + , testers + , tGooglePlusCommunities + , tGoogleGroups + + -- ** Listing + , Listing + , listing + , lFullDescription + , lVideo + , lShortDescription + , lLanguage + , lTitle + + -- ** Season + , Season + , season + , sStart + , sEnd + + -- ** ImagesListResponse + , ImagesListResponse + , imagesListResponse + , ilrImages + + -- ** AppEdit + , AppEdit + , appEdit + , aeId + , aeExpiryTimeSeconds + + -- ** TracksListResponse + , TracksListResponse + , tracksListResponse + , tlrTracks + , tlrKind + + -- ** PageInfo + , PageInfo + , pageInfo + , piResultPerPage + , piTotalResults + , piStartIndex + + -- ** ApkListing + , ApkListing + , apkListing + , alLanguage + , alRecentChanges + + -- ** SubscriptionPurchasesDeferResponse + , SubscriptionPurchasesDeferResponse + , subscriptionPurchasesDeferResponse + , spdrNewExpiryTimeMillis + + -- ** ProductPurchase + , ProductPurchase + , productPurchase + , ppPurchaseState + , ppConsumptionState + , ppKind + , ppPurchaseTimeMillis + , ppDeveloperPayload + + -- ** SubscriptionPurchase + , SubscriptionPurchase + , subscriptionPurchase + , spKind + , spExpiryTimeMillis + , spAutoRenewing + , spStartTimeMillis + + -- ** InappproductsBatchRequest + , InappproductsBatchRequest + , inappproductsBatchRequest + , ibrEntrys + + -- ** AppDetails + , AppDetails + , appDetails + , adContactPhone + , adContactEmail + , adContactWebsite + , adDefaultLanguage + + -- ** ExternallyHostedApk + , ExternallyHostedApk + , externallyHostedApk + , ehaApplicationLabel + , ehaMaximumSdk + , ehaNativeCodes + , ehaVersionCode + , ehaFileSha256Base64 + , ehaExternallyHostedUrl + , ehaVersionName + , ehaPackageName + , ehaFileSize + , ehaIconBase64 + , ehaUsesFeatures + , ehaMinimumSdk + , ehaFileSha1Base64 + , ehaUsesPermissions + , ehaCertificateBase64s + + -- ** ImagesUploadResponse + , ImagesUploadResponse + , imagesUploadResponse + , iurImage + + -- ** ExpansionFilesUploadResponse + , ExpansionFilesUploadResponse + , expansionFilesUploadResponse + , efurExpansionFile + + -- ** InappproductsListResponse + , InappproductsListResponse + , inappproductsListResponse + , ilrTokenPagination + , ilrPageInfo + , ilrKind + , ilrInappproduct + + -- ** SubscriptionDeferralInfo + , SubscriptionDeferralInfo + , subscriptionDeferralInfo + , sdiDesiredExpiryTimeMillis + , sdiExpectedExpiryTimeMillis + + -- ** ApksAddExternallyHostedResponse + , ApksAddExternallyHostedResponse + , apksAddExternallyHostedResponse + , aaehrExternallyHostedApk + + -- ** ApkListingsListResponse + , ApkListingsListResponse + , apkListingsListResponse + , allrKind + , allrListings + + -- ** InappproductsInsertResponse + , InappproductsInsertResponse + , inappproductsInsertResponse + , iirInappproduct + + -- ** Price + , Price + , price + , pPriceMicros + , pCurrency + + -- ** InappproductsBatchResponseEntry + , InappproductsBatchResponseEntry + , inappproductsBatchResponseEntry + , iInappproductsupdateresponse + , iInappproductsinsertresponse + , iBatchId + + -- ** InAppProduct + , InAppProduct + , inAppProduct + , iapStatus + , iapTrialPeriod + , iapPackageName + , iapSeason + , iapPurchaseType + , iapSubscriptionPeriod + , iapPrices + , iapSku + , iapDefaultPrice + , iapListings + , iapDefaultLanguage + + -- ** ApkBinary + , ApkBinary + , apkBinary + , abSha1 + + -- ** ExternallyHostedApkUsesPermission + , ExternallyHostedApkUsesPermission + , externallyHostedApkUsesPermission + , ehaupName + , ehaupMaxSdkVersion + + -- ** ListingsListResponse + , ListingsListResponse + , listingsListResponse + , llrKind + , llrListings + + -- ** InappproductsInsertRequest + , InappproductsInsertRequest + , inappproductsInsertRequest + , iInappproduct + + -- ** ApksAddExternallyHostedRequest + , ApksAddExternallyHostedRequest + , apksAddExternallyHostedRequest + , aExternallyHostedApk + + -- ** ApksListResponse + , ApksListResponse + , apksListResponse + , alrKind + , alrApks + + -- ** EntitlementsListResponse + , EntitlementsListResponse + , entitlementsListResponse + , elrTokenPagination + , elrPageInfo + , elrResources + + -- ** InappproductsUpdateRequest + , InappproductsUpdateRequest + , inappproductsUpdateRequest + , inaInappproduct + + -- ** InappproductsBatchResponse + , InappproductsBatchResponse + , inappproductsBatchResponse + , iEntrys + , iKind + + -- ** Entitlement + , Entitlement + , entitlement + , eKind + , eProductType + , eToken + , eProductId + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.Delete +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.Deleteall +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.Get +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.List +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.Patch +import Network.Google.Resource.Androidpublisher.Edits.Apklistings.Update +import Network.Google.Resource.Androidpublisher.Edits.Apks.Addexternallyhosted +import Network.Google.Resource.Androidpublisher.Edits.Apks.List +import Network.Google.Resource.Androidpublisher.Edits.Apks.Upload +import Network.Google.Resource.Androidpublisher.Edits.Commit +import Network.Google.Resource.Androidpublisher.Edits.Delete +import Network.Google.Resource.Androidpublisher.Edits.Details.Get +import Network.Google.Resource.Androidpublisher.Edits.Details.Patch +import Network.Google.Resource.Androidpublisher.Edits.Details.Update +import Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Get +import Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Patch +import Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Update +import Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Upload +import Network.Google.Resource.Androidpublisher.Edits.Get +import Network.Google.Resource.Androidpublisher.Edits.Images.Delete +import Network.Google.Resource.Androidpublisher.Edits.Images.Deleteall +import Network.Google.Resource.Androidpublisher.Edits.Images.List +import Network.Google.Resource.Androidpublisher.Edits.Images.Upload +import Network.Google.Resource.Androidpublisher.Edits.Insert +import Network.Google.Resource.Androidpublisher.Edits.Listings.Delete +import Network.Google.Resource.Androidpublisher.Edits.Listings.Deleteall +import Network.Google.Resource.Androidpublisher.Edits.Listings.Get +import Network.Google.Resource.Androidpublisher.Edits.Listings.List +import Network.Google.Resource.Androidpublisher.Edits.Listings.Patch +import Network.Google.Resource.Androidpublisher.Edits.Listings.Update +import Network.Google.Resource.Androidpublisher.Edits.Testers.Get +import Network.Google.Resource.Androidpublisher.Edits.Testers.Patch +import Network.Google.Resource.Androidpublisher.Edits.Testers.Update +import Network.Google.Resource.Androidpublisher.Edits.Tracks.Get +import Network.Google.Resource.Androidpublisher.Edits.Tracks.List +import Network.Google.Resource.Androidpublisher.Edits.Tracks.Patch +import Network.Google.Resource.Androidpublisher.Edits.Tracks.Update +import Network.Google.Resource.Androidpublisher.Edits.Validate +import Network.Google.Resource.Androidpublisher.Entitlements.List +import Network.Google.Resource.Androidpublisher.Inappproducts.Batch +import Network.Google.Resource.Androidpublisher.Inappproducts.Delete +import Network.Google.Resource.Androidpublisher.Inappproducts.Get +import Network.Google.Resource.Androidpublisher.Inappproducts.Insert +import Network.Google.Resource.Androidpublisher.Inappproducts.List +import Network.Google.Resource.Androidpublisher.Inappproducts.Patch +import Network.Google.Resource.Androidpublisher.Inappproducts.Update +import Network.Google.Resource.Androidpublisher.Purchases.Products.Get +import Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Cancel +import Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Defer +import Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Get +import Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Refund +import Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Revoke + +{- $resources +TODO +-} + +type PlayDeveloperAPI = + Inappproducts :<|> Edits :<|> Entitlements :<|> + Purchases + +playDeveloperAPI :: Proxy PlayDeveloperAPI +playDeveloperAPI = Proxy diff --git a/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types.hs b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types.hs new file mode 100644 index 000000000..8731741be --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types.hs @@ -0,0 +1,329 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayDeveloper.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayDeveloper.Types + ( + -- * Service URL + playDeveloperURL + + -- * InappproductsUpdateResponse + , InappproductsUpdateResponse + , inappproductsUpdateResponse + , iurInappproduct + + -- * MonthDay + , MonthDay + , monthDay + , mdDay + , mdMonth + + -- * InappproductsBatchRequestEntry + , InappproductsBatchRequestEntry + , inappproductsBatchRequestEntry + , ibreMethodName + , ibreInappproductsinsertrequest + , ibreInappproductsupdaterequest + , ibreBatchId + + -- * InAppProductListing + , InAppProductListing + , inAppProductListing + , iaplTitle + , iaplDescription + + -- * Track + , Track + , track + , tVersionCodes + , tTrack + , tUserFraction + + -- * TokenPagination + , TokenPagination + , tokenPagination + , tpNextPageToken + , tpPreviousPageToken + + -- * ExpansionFile + , ExpansionFile + , expansionFile + , efFileSize + , efReferencesVersion + + -- * Image + , Image + , image + , iUrl + , iSha1 + , iId + + -- * ImagesDeleteAllResponse + , ImagesDeleteAllResponse + , imagesDeleteAllResponse + , idarDeleted + + -- * SubscriptionPurchasesDeferRequest + , SubscriptionPurchasesDeferRequest + , subscriptionPurchasesDeferRequest + , spdrDeferralInfo + + -- * Apk + , Apk + , apk + , apkVersionCode + , apkBinary + + -- * Testers + , Testers + , testers + , tGooglePlusCommunities + , tGoogleGroups + + -- * Listing + , Listing + , listing + , lFullDescription + , lVideo + , lShortDescription + , lLanguage + , lTitle + + -- * Season + , Season + , season + , sStart + , sEnd + + -- * ImagesListResponse + , ImagesListResponse + , imagesListResponse + , ilrImages + + -- * AppEdit + , AppEdit + , appEdit + , aeId + , aeExpiryTimeSeconds + + -- * TracksListResponse + , TracksListResponse + , tracksListResponse + , tlrTracks + , tlrKind + + -- * PageInfo + , PageInfo + , pageInfo + , piResultPerPage + , piTotalResults + , piStartIndex + + -- * ApkListing + , ApkListing + , apkListing + , alLanguage + , alRecentChanges + + -- * SubscriptionPurchasesDeferResponse + , SubscriptionPurchasesDeferResponse + , subscriptionPurchasesDeferResponse + , spdrNewExpiryTimeMillis + + -- * ProductPurchase + , ProductPurchase + , productPurchase + , ppPurchaseState + , ppConsumptionState + , ppKind + , ppPurchaseTimeMillis + , ppDeveloperPayload + + -- * SubscriptionPurchase + , SubscriptionPurchase + , subscriptionPurchase + , spKind + , spExpiryTimeMillis + , spAutoRenewing + , spStartTimeMillis + + -- * InappproductsBatchRequest + , InappproductsBatchRequest + , inappproductsBatchRequest + , ibrEntrys + + -- * AppDetails + , AppDetails + , appDetails + , adContactPhone + , adContactEmail + , adContactWebsite + , adDefaultLanguage + + -- * ExternallyHostedApk + , ExternallyHostedApk + , externallyHostedApk + , ehaApplicationLabel + , ehaMaximumSdk + , ehaNativeCodes + , ehaVersionCode + , ehaFileSha256Base64 + , ehaExternallyHostedUrl + , ehaVersionName + , ehaPackageName + , ehaFileSize + , ehaIconBase64 + , ehaUsesFeatures + , ehaMinimumSdk + , ehaFileSha1Base64 + , ehaUsesPermissions + , ehaCertificateBase64s + + -- * ImagesUploadResponse + , ImagesUploadResponse + , imagesUploadResponse + , iurImage + + -- * ExpansionFilesUploadResponse + , ExpansionFilesUploadResponse + , expansionFilesUploadResponse + , efurExpansionFile + + -- * InappproductsListResponse + , InappproductsListResponse + , inappproductsListResponse + , ilrTokenPagination + , ilrPageInfo + , ilrKind + , ilrInappproduct + + -- * SubscriptionDeferralInfo + , SubscriptionDeferralInfo + , subscriptionDeferralInfo + , sdiDesiredExpiryTimeMillis + , sdiExpectedExpiryTimeMillis + + -- * ApksAddExternallyHostedResponse + , ApksAddExternallyHostedResponse + , apksAddExternallyHostedResponse + , aaehrExternallyHostedApk + + -- * ApkListingsListResponse + , ApkListingsListResponse + , apkListingsListResponse + , allrKind + , allrListings + + -- * InappproductsInsertResponse + , InappproductsInsertResponse + , inappproductsInsertResponse + , iirInappproduct + + -- * Price + , Price + , price + , pPriceMicros + , pCurrency + + -- * InappproductsBatchResponseEntry + , InappproductsBatchResponseEntry + , inappproductsBatchResponseEntry + , iInappproductsupdateresponse + , iInappproductsinsertresponse + , iBatchId + + -- * InAppProduct + , InAppProduct + , inAppProduct + , iapStatus + , iapTrialPeriod + , iapPackageName + , iapSeason + , iapPurchaseType + , iapSubscriptionPeriod + , iapPrices + , iapSku + , iapDefaultPrice + , iapListings + , iapDefaultLanguage + + -- * ApkBinary + , ApkBinary + , apkBinary + , abSha1 + + -- * ExternallyHostedApkUsesPermission + , ExternallyHostedApkUsesPermission + , externallyHostedApkUsesPermission + , ehaupName + , ehaupMaxSdkVersion + + -- * ListingsListResponse + , ListingsListResponse + , listingsListResponse + , llrKind + , llrListings + + -- * InappproductsInsertRequest + , InappproductsInsertRequest + , inappproductsInsertRequest + , iInappproduct + + -- * ApksAddExternallyHostedRequest + , ApksAddExternallyHostedRequest + , apksAddExternallyHostedRequest + , aExternallyHostedApk + + -- * ApksListResponse + , ApksListResponse + , apksListResponse + , alrKind + , alrApks + + -- * EntitlementsListResponse + , EntitlementsListResponse + , entitlementsListResponse + , elrTokenPagination + , elrPageInfo + , elrResources + + -- * InappproductsUpdateRequest + , InappproductsUpdateRequest + , inappproductsUpdateRequest + , inaInappproduct + + -- * InappproductsBatchResponse + , InappproductsBatchResponse + , inappproductsBatchResponse + , iEntrys + , iKind + + -- * Entitlement + , Entitlement + , entitlement + , eKind + , eProductType + , eToken + , eProductId + ) where + +import Network.Google.PlayDeveloper.Types.Product +import Network.Google.PlayDeveloper.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v2' of the Google Play Developer API. +playDeveloperURL :: BaseURL +playDeveloperURL + = BaseUrl Https + "https://www.googleapis.com/androidpublisher/v2/applications/" + 443 diff --git a/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Product.hs b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Product.hs new file mode 100644 index 000000000..825fa3638 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Product.hs @@ -0,0 +1,2530 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayDeveloper.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayDeveloper.Types.Product where + +import Network.Google.PlayDeveloper.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'inappproductsUpdateResponse' smart constructor. +newtype InappproductsUpdateResponse = InappproductsUpdateResponse + { _iurInappproduct :: Maybe (Maybe InAppProduct) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsUpdateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iurInappproduct' +inappproductsUpdateResponse + :: InappproductsUpdateResponse +inappproductsUpdateResponse = + InappproductsUpdateResponse + { _iurInappproduct = Nothing + } + +iurInappproduct :: Lens' InappproductsUpdateResponse (Maybe (Maybe InAppProduct)) +iurInappproduct + = lens _iurInappproduct + (\ s a -> s{_iurInappproduct = a}) + +instance FromJSON InappproductsUpdateResponse where + parseJSON + = withObject "InappproductsUpdateResponse" + (\ o -> + InappproductsUpdateResponse <$> + (o .:? "inappproduct")) + +instance ToJSON InappproductsUpdateResponse where + toJSON InappproductsUpdateResponse{..} + = object + (catMaybes + [("inappproduct" .=) <$> _iurInappproduct]) + +-- +-- /See:/ 'monthDay' smart constructor. +data MonthDay = MonthDay + { _mdDay :: !(Maybe Word32) + , _mdMonth :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MonthDay' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mdDay' +-- +-- * 'mdMonth' +monthDay + :: MonthDay +monthDay = + MonthDay + { _mdDay = Nothing + , _mdMonth = Nothing + } + +-- | Day of a month, value in [1, 31] range. Valid range depends on the +-- specified month. +mdDay :: Lens' MonthDay (Maybe Word32) +mdDay = lens _mdDay (\ s a -> s{_mdDay = a}) + +-- | Month of a year. e.g. 1 = JAN, 2 = FEB etc. +mdMonth :: Lens' MonthDay (Maybe Word32) +mdMonth = lens _mdMonth (\ s a -> s{_mdMonth = a}) + +instance FromJSON MonthDay where + parseJSON + = withObject "MonthDay" + (\ o -> + MonthDay <$> (o .:? "day") <*> (o .:? "month")) + +instance ToJSON MonthDay where + toJSON MonthDay{..} + = object + (catMaybes + [("day" .=) <$> _mdDay, ("month" .=) <$> _mdMonth]) + +-- +-- /See:/ 'inappproductsBatchRequestEntry' smart constructor. +data InappproductsBatchRequestEntry = InappproductsBatchRequestEntry + { _ibreMethodName :: !(Maybe Text) + , _ibreInappproductsinsertrequest :: !(Maybe (Maybe InappproductsInsertRequest)) + , _ibreInappproductsupdaterequest :: !(Maybe (Maybe InappproductsUpdateRequest)) + , _ibreBatchId :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsBatchRequestEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ibreMethodName' +-- +-- * 'ibreInappproductsinsertrequest' +-- +-- * 'ibreInappproductsupdaterequest' +-- +-- * 'ibreBatchId' +inappproductsBatchRequestEntry + :: InappproductsBatchRequestEntry +inappproductsBatchRequestEntry = + InappproductsBatchRequestEntry + { _ibreMethodName = Nothing + , _ibreInappproductsinsertrequest = Nothing + , _ibreInappproductsupdaterequest = Nothing + , _ibreBatchId = Nothing + } + +ibreMethodName :: Lens' InappproductsBatchRequestEntry (Maybe Text) +ibreMethodName + = lens _ibreMethodName + (\ s a -> s{_ibreMethodName = a}) + +ibreInappproductsinsertrequest :: Lens' InappproductsBatchRequestEntry (Maybe (Maybe InappproductsInsertRequest)) +ibreInappproductsinsertrequest + = lens _ibreInappproductsinsertrequest + (\ s a -> s{_ibreInappproductsinsertrequest = a}) + +ibreInappproductsupdaterequest :: Lens' InappproductsBatchRequestEntry (Maybe (Maybe InappproductsUpdateRequest)) +ibreInappproductsupdaterequest + = lens _ibreInappproductsupdaterequest + (\ s a -> s{_ibreInappproductsupdaterequest = a}) + +ibreBatchId :: Lens' InappproductsBatchRequestEntry (Maybe Word32) +ibreBatchId + = lens _ibreBatchId (\ s a -> s{_ibreBatchId = a}) + +instance FromJSON InappproductsBatchRequestEntry + where + parseJSON + = withObject "InappproductsBatchRequestEntry" + (\ o -> + InappproductsBatchRequestEntry <$> + (o .:? "methodName") <*> + (o .:? "inappproductsinsertrequest") + <*> (o .:? "inappproductsupdaterequest") + <*> (o .:? "batchId")) + +instance ToJSON InappproductsBatchRequestEntry where + toJSON InappproductsBatchRequestEntry{..} + = object + (catMaybes + [("methodName" .=) <$> _ibreMethodName, + ("inappproductsinsertrequest" .=) <$> + _ibreInappproductsinsertrequest, + ("inappproductsupdaterequest" .=) <$> + _ibreInappproductsupdaterequest, + ("batchId" .=) <$> _ibreBatchId]) + +-- +-- /See:/ 'inAppProductListing' smart constructor. +data InAppProductListing = InAppProductListing + { _iaplTitle :: !(Maybe Text) + , _iaplDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InAppProductListing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iaplTitle' +-- +-- * 'iaplDescription' +inAppProductListing + :: InAppProductListing +inAppProductListing = + InAppProductListing + { _iaplTitle = Nothing + , _iaplDescription = Nothing + } + +iaplTitle :: Lens' InAppProductListing (Maybe Text) +iaplTitle + = lens _iaplTitle (\ s a -> s{_iaplTitle = a}) + +iaplDescription :: Lens' InAppProductListing (Maybe Text) +iaplDescription + = lens _iaplDescription + (\ s a -> s{_iaplDescription = a}) + +instance FromJSON InAppProductListing where + parseJSON + = withObject "InAppProductListing" + (\ o -> + InAppProductListing <$> + (o .:? "title") <*> (o .:? "description")) + +instance ToJSON InAppProductListing where + toJSON InAppProductListing{..} + = object + (catMaybes + [("title" .=) <$> _iaplTitle, + ("description" .=) <$> _iaplDescription]) + +-- +-- /See:/ 'track' smart constructor. +data Track = Track + { _tVersionCodes :: !(Maybe [Int32]) + , _tTrack :: !(Maybe Text) + , _tUserFraction :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Track' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tVersionCodes' +-- +-- * 'tTrack' +-- +-- * 'tUserFraction' +track + :: Track +track = + Track + { _tVersionCodes = Nothing + , _tTrack = Nothing + , _tUserFraction = Nothing + } + +tVersionCodes :: Lens' Track [Int32] +tVersionCodes + = lens _tVersionCodes + (\ s a -> s{_tVersionCodes = a}) + . _Default + . _Coerce + +tTrack :: Lens' Track (Maybe Text) +tTrack = lens _tTrack (\ s a -> s{_tTrack = a}) + +tUserFraction :: Lens' Track (Maybe Double) +tUserFraction + = lens _tUserFraction + (\ s a -> s{_tUserFraction = a}) + +instance FromJSON Track where + parseJSON + = withObject "Track" + (\ o -> + Track <$> + (o .:? "versionCodes" .!= mempty) <*> (o .:? "track") + <*> (o .:? "userFraction")) + +instance ToJSON Track where + toJSON Track{..} + = object + (catMaybes + [("versionCodes" .=) <$> _tVersionCodes, + ("track" .=) <$> _tTrack, + ("userFraction" .=) <$> _tUserFraction]) + +-- +-- /See:/ 'tokenPagination' smart constructor. +data TokenPagination = TokenPagination + { _tpNextPageToken :: !(Maybe Text) + , _tpPreviousPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpNextPageToken' +-- +-- * 'tpPreviousPageToken' +tokenPagination + :: TokenPagination +tokenPagination = + TokenPagination + { _tpNextPageToken = Nothing + , _tpPreviousPageToken = Nothing + } + +tpNextPageToken :: Lens' TokenPagination (Maybe Text) +tpNextPageToken + = lens _tpNextPageToken + (\ s a -> s{_tpNextPageToken = a}) + +tpPreviousPageToken :: Lens' TokenPagination (Maybe Text) +tpPreviousPageToken + = lens _tpPreviousPageToken + (\ s a -> s{_tpPreviousPageToken = a}) + +instance FromJSON TokenPagination where + parseJSON + = withObject "TokenPagination" + (\ o -> + TokenPagination <$> + (o .:? "nextPageToken") <*> + (o .:? "previousPageToken")) + +instance ToJSON TokenPagination where + toJSON TokenPagination{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _tpNextPageToken, + ("previousPageToken" .=) <$> _tpPreviousPageToken]) + +-- +-- /See:/ 'expansionFile' smart constructor. +data ExpansionFile = ExpansionFile + { _efFileSize :: !(Maybe Int64) + , _efReferencesVersion :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExpansionFile' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'efFileSize' +-- +-- * 'efReferencesVersion' +expansionFile + :: ExpansionFile +expansionFile = + ExpansionFile + { _efFileSize = Nothing + , _efReferencesVersion = Nothing + } + +-- | If set this field indicates that this APK has an Expansion File uploaded +-- to it: this APK does not reference another APK\'s Expansion File. The +-- field\'s value is the size of the uploaded Expansion File in bytes. +efFileSize :: Lens' ExpansionFile (Maybe Int64) +efFileSize + = lens _efFileSize (\ s a -> s{_efFileSize = a}) + +-- | If set this APK\'s Expansion File references another APK\'s Expansion +-- File. The file_size field will not be set. +efReferencesVersion :: Lens' ExpansionFile (Maybe Int32) +efReferencesVersion + = lens _efReferencesVersion + (\ s a -> s{_efReferencesVersion = a}) + +instance FromJSON ExpansionFile where + parseJSON + = withObject "ExpansionFile" + (\ o -> + ExpansionFile <$> + (o .:? "fileSize") <*> (o .:? "referencesVersion")) + +instance ToJSON ExpansionFile where + toJSON ExpansionFile{..} + = object + (catMaybes + [("fileSize" .=) <$> _efFileSize, + ("referencesVersion" .=) <$> _efReferencesVersion]) + +-- +-- /See:/ 'image' smart constructor. +data Image = Image + { _iUrl :: !(Maybe Text) + , _iSha1 :: !(Maybe Text) + , _iId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Image' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iUrl' +-- +-- * 'iSha1' +-- +-- * 'iId' +image + :: Image +image = + Image + { _iUrl = Nothing + , _iSha1 = Nothing + , _iId = Nothing + } + +-- | A URL that will serve a preview of the image. +iUrl :: Lens' Image (Maybe Text) +iUrl = lens _iUrl (\ s a -> s{_iUrl = a}) + +-- | A sha1 hash of the image that was uploaded. +iSha1 :: Lens' Image (Maybe Text) +iSha1 = lens _iSha1 (\ s a -> s{_iSha1 = a}) + +-- | A unique id representing this image. +iId :: Lens' Image (Maybe Text) +iId = lens _iId (\ s a -> s{_iId = a}) + +instance FromJSON Image where + parseJSON + = withObject "Image" + (\ o -> + Image <$> + (o .:? "url") <*> (o .:? "sha1") <*> (o .:? "id")) + +instance ToJSON Image where + toJSON Image{..} + = object + (catMaybes + [("url" .=) <$> _iUrl, ("sha1" .=) <$> _iSha1, + ("id" .=) <$> _iId]) + +-- +-- /See:/ 'imagesDeleteAllResponse' smart constructor. +newtype ImagesDeleteAllResponse = ImagesDeleteAllResponse + { _idarDeleted :: Maybe [Maybe Image] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesDeleteAllResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idarDeleted' +imagesDeleteAllResponse + :: ImagesDeleteAllResponse +imagesDeleteAllResponse = + ImagesDeleteAllResponse + { _idarDeleted = Nothing + } + +idarDeleted :: Lens' ImagesDeleteAllResponse [Maybe Image] +idarDeleted + = lens _idarDeleted (\ s a -> s{_idarDeleted = a}) . + _Default + . _Coerce + +instance FromJSON ImagesDeleteAllResponse where + parseJSON + = withObject "ImagesDeleteAllResponse" + (\ o -> + ImagesDeleteAllResponse <$> + (o .:? "deleted" .!= mempty)) + +instance ToJSON ImagesDeleteAllResponse where + toJSON ImagesDeleteAllResponse{..} + = object + (catMaybes [("deleted" .=) <$> _idarDeleted]) + +-- +-- /See:/ 'subscriptionPurchasesDeferRequest' smart constructor. +newtype SubscriptionPurchasesDeferRequest = SubscriptionPurchasesDeferRequest + { _spdrDeferralInfo :: Maybe (Maybe SubscriptionDeferralInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionPurchasesDeferRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spdrDeferralInfo' +subscriptionPurchasesDeferRequest + :: SubscriptionPurchasesDeferRequest +subscriptionPurchasesDeferRequest = + SubscriptionPurchasesDeferRequest + { _spdrDeferralInfo = Nothing + } + +-- | The information about the new desired expiry time for the subscription. +spdrDeferralInfo :: Lens' SubscriptionPurchasesDeferRequest (Maybe (Maybe SubscriptionDeferralInfo)) +spdrDeferralInfo + = lens _spdrDeferralInfo + (\ s a -> s{_spdrDeferralInfo = a}) + +instance FromJSON SubscriptionPurchasesDeferRequest + where + parseJSON + = withObject "SubscriptionPurchasesDeferRequest" + (\ o -> + SubscriptionPurchasesDeferRequest <$> + (o .:? "deferralInfo")) + +instance ToJSON SubscriptionPurchasesDeferRequest + where + toJSON SubscriptionPurchasesDeferRequest{..} + = object + (catMaybes + [("deferralInfo" .=) <$> _spdrDeferralInfo]) + +-- +-- /See:/ 'apk' smart constructor. +data Apk = Apk + { _apkVersionCode :: !(Maybe Int32) + , _apkBinary :: !(Maybe (Maybe ApkBinary)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Apk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apkVersionCode' +-- +-- * 'apkBinary' +apk + :: Apk +apk = + Apk + { _apkVersionCode = Nothing + , _apkBinary = Nothing + } + +-- | The version code of the APK, as specified in the APK\'s manifest file. +apkVersionCode :: Lens' Apk (Maybe Int32) +apkVersionCode + = lens _apkVersionCode + (\ s a -> s{_apkVersionCode = a}) + +-- | Information about the binary payload of this APK. +apkBinary :: Lens' Apk (Maybe (Maybe ApkBinary)) +apkBinary + = lens _apkBinary (\ s a -> s{_apkBinary = a}) + +instance FromJSON Apk where + parseJSON + = withObject "Apk" + (\ o -> + Apk <$> (o .:? "versionCode") <*> (o .:? "binary")) + +instance ToJSON Apk where + toJSON Apk{..} + = object + (catMaybes + [("versionCode" .=) <$> _apkVersionCode, + ("binary" .=) <$> _apkBinary]) + +-- +-- /See:/ 'testers' smart constructor. +data Testers = Testers + { _tGooglePlusCommunities :: !(Maybe [Text]) + , _tGoogleGroups :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Testers' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tGooglePlusCommunities' +-- +-- * 'tGoogleGroups' +testers + :: Testers +testers = + Testers + { _tGooglePlusCommunities = Nothing + , _tGoogleGroups = Nothing + } + +tGooglePlusCommunities :: Lens' Testers [Text] +tGooglePlusCommunities + = lens _tGooglePlusCommunities + (\ s a -> s{_tGooglePlusCommunities = a}) + . _Default + . _Coerce + +tGoogleGroups :: Lens' Testers [Text] +tGoogleGroups + = lens _tGoogleGroups + (\ s a -> s{_tGoogleGroups = a}) + . _Default + . _Coerce + +instance FromJSON Testers where + parseJSON + = withObject "Testers" + (\ o -> + Testers <$> + (o .:? "googlePlusCommunities" .!= mempty) <*> + (o .:? "googleGroups" .!= mempty)) + +instance ToJSON Testers where + toJSON Testers{..} + = object + (catMaybes + [("googlePlusCommunities" .=) <$> + _tGooglePlusCommunities, + ("googleGroups" .=) <$> _tGoogleGroups]) + +-- +-- /See:/ 'listing' smart constructor. +data Listing = Listing + { _lFullDescription :: !(Maybe Text) + , _lVideo :: !(Maybe Text) + , _lShortDescription :: !(Maybe Text) + , _lLanguage :: !(Maybe Text) + , _lTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Listing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lFullDescription' +-- +-- * 'lVideo' +-- +-- * 'lShortDescription' +-- +-- * 'lLanguage' +-- +-- * 'lTitle' +listing + :: Listing +listing = + Listing + { _lFullDescription = Nothing + , _lVideo = Nothing + , _lShortDescription = Nothing + , _lLanguage = Nothing + , _lTitle = Nothing + } + +-- | Full description of the app; this may be up to 4000 characters in +-- length. +lFullDescription :: Lens' Listing (Maybe Text) +lFullDescription + = lens _lFullDescription + (\ s a -> s{_lFullDescription = a}) + +-- | URL of a promotional YouTube video for the app. +lVideo :: Lens' Listing (Maybe Text) +lVideo = lens _lVideo (\ s a -> s{_lVideo = a}) + +-- | Short description of the app (previously known as promo text); this may +-- be up to 80 characters in length. +lShortDescription :: Lens' Listing (Maybe Text) +lShortDescription + = lens _lShortDescription + (\ s a -> s{_lShortDescription = a}) + +-- | Language localization code (for example, \"de-AT\" for Austrian German). +lLanguage :: Lens' Listing (Maybe Text) +lLanguage + = lens _lLanguage (\ s a -> s{_lLanguage = a}) + +-- | App\'s localized title. +lTitle :: Lens' Listing (Maybe Text) +lTitle = lens _lTitle (\ s a -> s{_lTitle = a}) + +instance FromJSON Listing where + parseJSON + = withObject "Listing" + (\ o -> + Listing <$> + (o .:? "fullDescription") <*> (o .:? "video") <*> + (o .:? "shortDescription") + <*> (o .:? "language") + <*> (o .:? "title")) + +instance ToJSON Listing where + toJSON Listing{..} + = object + (catMaybes + [("fullDescription" .=) <$> _lFullDescription, + ("video" .=) <$> _lVideo, + ("shortDescription" .=) <$> _lShortDescription, + ("language" .=) <$> _lLanguage, + ("title" .=) <$> _lTitle]) + +-- +-- /See:/ 'season' smart constructor. +data Season = Season + { _sStart :: !(Maybe (Maybe MonthDay)) + , _sEnd :: !(Maybe (Maybe MonthDay)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Season' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sStart' +-- +-- * 'sEnd' +season + :: Season +season = + Season + { _sStart = Nothing + , _sEnd = Nothing + } + +-- | Inclusive start date of the recurrence period. +sStart :: Lens' Season (Maybe (Maybe MonthDay)) +sStart = lens _sStart (\ s a -> s{_sStart = a}) + +-- | Inclusive end date of the recurrence period. +sEnd :: Lens' Season (Maybe (Maybe MonthDay)) +sEnd = lens _sEnd (\ s a -> s{_sEnd = a}) + +instance FromJSON Season where + parseJSON + = withObject "Season" + (\ o -> Season <$> (o .:? "start") <*> (o .:? "end")) + +instance ToJSON Season where + toJSON Season{..} + = object + (catMaybes + [("start" .=) <$> _sStart, ("end" .=) <$> _sEnd]) + +-- +-- /See:/ 'imagesListResponse' smart constructor. +newtype ImagesListResponse = ImagesListResponse + { _ilrImages :: Maybe [Maybe Image] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilrImages' +imagesListResponse + :: ImagesListResponse +imagesListResponse = + ImagesListResponse + { _ilrImages = Nothing + } + +ilrImages :: Lens' ImagesListResponse [Maybe Image] +ilrImages + = lens _ilrImages (\ s a -> s{_ilrImages = a}) . + _Default + . _Coerce + +instance FromJSON ImagesListResponse where + parseJSON + = withObject "ImagesListResponse" + (\ o -> + ImagesListResponse <$> (o .:? "images" .!= mempty)) + +instance ToJSON ImagesListResponse where + toJSON ImagesListResponse{..} + = object (catMaybes [("images" .=) <$> _ilrImages]) + +-- | Represents an edit of an app. An edit allows clients to make multiple +-- changes before committing them in one operation. +-- +-- /See:/ 'appEdit' smart constructor. +data AppEdit = AppEdit + { _aeId :: !(Maybe Text) + , _aeExpiryTimeSeconds :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppEdit' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aeId' +-- +-- * 'aeExpiryTimeSeconds' +appEdit + :: AppEdit +appEdit = + AppEdit + { _aeId = Nothing + , _aeExpiryTimeSeconds = Nothing + } + +-- | The ID of the edit that can be used in subsequent API calls. +aeId :: Lens' AppEdit (Maybe Text) +aeId = lens _aeId (\ s a -> s{_aeId = a}) + +-- | The time at which the edit will expire and will be no longer valid for +-- use in any subsequent API calls (encoded as seconds since the Epoch). +aeExpiryTimeSeconds :: Lens' AppEdit (Maybe Text) +aeExpiryTimeSeconds + = lens _aeExpiryTimeSeconds + (\ s a -> s{_aeExpiryTimeSeconds = a}) + +instance FromJSON AppEdit where + parseJSON + = withObject "AppEdit" + (\ o -> + AppEdit <$> + (o .:? "id") <*> (o .:? "expiryTimeSeconds")) + +instance ToJSON AppEdit where + toJSON AppEdit{..} + = object + (catMaybes + [("id" .=) <$> _aeId, + ("expiryTimeSeconds" .=) <$> _aeExpiryTimeSeconds]) + +-- +-- /See:/ 'tracksListResponse' smart constructor. +data TracksListResponse = TracksListResponse + { _tlrTracks :: !(Maybe [Maybe Track]) + , _tlrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TracksListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrTracks' +-- +-- * 'tlrKind' +tracksListResponse + :: TracksListResponse +tracksListResponse = + TracksListResponse + { _tlrTracks = Nothing + , _tlrKind = "androidpublisher#tracksListResponse" + } + +tlrTracks :: Lens' TracksListResponse [Maybe Track] +tlrTracks + = lens _tlrTracks (\ s a -> s{_tlrTracks = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#tracksListResponse\". +tlrKind :: Lens' TracksListResponse Text +tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a}) + +instance FromJSON TracksListResponse where + parseJSON + = withObject "TracksListResponse" + (\ o -> + TracksListResponse <$> + (o .:? "tracks" .!= mempty) <*> + (o .:? "kind" .!= + "androidpublisher#tracksListResponse")) + +instance ToJSON TracksListResponse where + toJSON TracksListResponse{..} + = object + (catMaybes + [("tracks" .=) <$> _tlrTracks, + Just ("kind" .= _tlrKind)]) + +-- +-- /See:/ 'pageInfo' smart constructor. +data PageInfo = PageInfo + { _piResultPerPage :: !(Maybe Int32) + , _piTotalResults :: !(Maybe Int32) + , _piStartIndex :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PageInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piResultPerPage' +-- +-- * 'piTotalResults' +-- +-- * 'piStartIndex' +pageInfo + :: PageInfo +pageInfo = + PageInfo + { _piResultPerPage = Nothing + , _piTotalResults = Nothing + , _piStartIndex = Nothing + } + +piResultPerPage :: Lens' PageInfo (Maybe Int32) +piResultPerPage + = lens _piResultPerPage + (\ s a -> s{_piResultPerPage = a}) + +piTotalResults :: Lens' PageInfo (Maybe Int32) +piTotalResults + = lens _piTotalResults + (\ s a -> s{_piTotalResults = a}) + +piStartIndex :: Lens' PageInfo (Maybe Int32) +piStartIndex + = lens _piStartIndex (\ s a -> s{_piStartIndex = a}) + +instance FromJSON PageInfo where + parseJSON + = withObject "PageInfo" + (\ o -> + PageInfo <$> + (o .:? "resultPerPage") <*> (o .:? "totalResults") + <*> (o .:? "startIndex")) + +instance ToJSON PageInfo where + toJSON PageInfo{..} + = object + (catMaybes + [("resultPerPage" .=) <$> _piResultPerPage, + ("totalResults" .=) <$> _piTotalResults, + ("startIndex" .=) <$> _piStartIndex]) + +-- +-- /See:/ 'apkListing' smart constructor. +data ApkListing = ApkListing + { _alLanguage :: !(Maybe Text) + , _alRecentChanges :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApkListing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alLanguage' +-- +-- * 'alRecentChanges' +apkListing + :: ApkListing +apkListing = + ApkListing + { _alLanguage = Nothing + , _alRecentChanges = Nothing + } + +-- | The language code, in BCP 47 format (eg \"en-US\"). +alLanguage :: Lens' ApkListing (Maybe Text) +alLanguage + = lens _alLanguage (\ s a -> s{_alLanguage = a}) + +-- | Describe what\'s new in your APK. +alRecentChanges :: Lens' ApkListing (Maybe Text) +alRecentChanges + = lens _alRecentChanges + (\ s a -> s{_alRecentChanges = a}) + +instance FromJSON ApkListing where + parseJSON + = withObject "ApkListing" + (\ o -> + ApkListing <$> + (o .:? "language") <*> (o .:? "recentChanges")) + +instance ToJSON ApkListing where + toJSON ApkListing{..} + = object + (catMaybes + [("language" .=) <$> _alLanguage, + ("recentChanges" .=) <$> _alRecentChanges]) + +-- +-- /See:/ 'subscriptionPurchasesDeferResponse' smart constructor. +newtype SubscriptionPurchasesDeferResponse = SubscriptionPurchasesDeferResponse + { _spdrNewExpiryTimeMillis :: Maybe Int64 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionPurchasesDeferResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spdrNewExpiryTimeMillis' +subscriptionPurchasesDeferResponse + :: SubscriptionPurchasesDeferResponse +subscriptionPurchasesDeferResponse = + SubscriptionPurchasesDeferResponse + { _spdrNewExpiryTimeMillis = Nothing + } + +-- | The new expiry time for the subscription in milliseconds since the +-- Epoch. +spdrNewExpiryTimeMillis :: Lens' SubscriptionPurchasesDeferResponse (Maybe Int64) +spdrNewExpiryTimeMillis + = lens _spdrNewExpiryTimeMillis + (\ s a -> s{_spdrNewExpiryTimeMillis = a}) + +instance FromJSON SubscriptionPurchasesDeferResponse + where + parseJSON + = withObject "SubscriptionPurchasesDeferResponse" + (\ o -> + SubscriptionPurchasesDeferResponse <$> + (o .:? "newExpiryTimeMillis")) + +instance ToJSON SubscriptionPurchasesDeferResponse + where + toJSON SubscriptionPurchasesDeferResponse{..} + = object + (catMaybes + [("newExpiryTimeMillis" .=) <$> + _spdrNewExpiryTimeMillis]) + +-- | A ProductPurchase resource indicates the status of a user\'s inapp +-- product purchase. +-- +-- /See:/ 'productPurchase' smart constructor. +data ProductPurchase = ProductPurchase + { _ppPurchaseState :: !(Maybe Int32) + , _ppConsumptionState :: !(Maybe Int32) + , _ppKind :: !Text + , _ppPurchaseTimeMillis :: !(Maybe Int64) + , _ppDeveloperPayload :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductPurchase' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppPurchaseState' +-- +-- * 'ppConsumptionState' +-- +-- * 'ppKind' +-- +-- * 'ppPurchaseTimeMillis' +-- +-- * 'ppDeveloperPayload' +productPurchase + :: ProductPurchase +productPurchase = + ProductPurchase + { _ppPurchaseState = Nothing + , _ppConsumptionState = Nothing + , _ppKind = "androidpublisher#productPurchase" + , _ppPurchaseTimeMillis = Nothing + , _ppDeveloperPayload = Nothing + } + +-- | The purchase state of the order. Possible values are: - Purchased - +-- Cancelled +ppPurchaseState :: Lens' ProductPurchase (Maybe Int32) +ppPurchaseState + = lens _ppPurchaseState + (\ s a -> s{_ppPurchaseState = a}) + +-- | The consumption state of the inapp product. Possible values are: - Yet +-- to be consumed - Consumed +ppConsumptionState :: Lens' ProductPurchase (Maybe Int32) +ppConsumptionState + = lens _ppConsumptionState + (\ s a -> s{_ppConsumptionState = a}) + +-- | This kind represents an inappPurchase object in the androidpublisher +-- service. +ppKind :: Lens' ProductPurchase Text +ppKind = lens _ppKind (\ s a -> s{_ppKind = a}) + +-- | The time the product was purchased, in milliseconds since the epoch (Jan +-- 1, 1970). +ppPurchaseTimeMillis :: Lens' ProductPurchase (Maybe Int64) +ppPurchaseTimeMillis + = lens _ppPurchaseTimeMillis + (\ s a -> s{_ppPurchaseTimeMillis = a}) + +-- | A developer-specified string that contains supplemental information +-- about an order. +ppDeveloperPayload :: Lens' ProductPurchase (Maybe Text) +ppDeveloperPayload + = lens _ppDeveloperPayload + (\ s a -> s{_ppDeveloperPayload = a}) + +instance FromJSON ProductPurchase where + parseJSON + = withObject "ProductPurchase" + (\ o -> + ProductPurchase <$> + (o .:? "purchaseState") <*> + (o .:? "consumptionState") + <*> + (o .:? "kind" .!= "androidpublisher#productPurchase") + <*> (o .:? "purchaseTimeMillis") + <*> (o .:? "developerPayload")) + +instance ToJSON ProductPurchase where + toJSON ProductPurchase{..} + = object + (catMaybes + [("purchaseState" .=) <$> _ppPurchaseState, + ("consumptionState" .=) <$> _ppConsumptionState, + Just ("kind" .= _ppKind), + ("purchaseTimeMillis" .=) <$> _ppPurchaseTimeMillis, + ("developerPayload" .=) <$> _ppDeveloperPayload]) + +-- | A SubscriptionPurchase resource indicates the status of a user\'s +-- subscription purchase. +-- +-- /See:/ 'subscriptionPurchase' smart constructor. +data SubscriptionPurchase = SubscriptionPurchase + { _spKind :: !Text + , _spExpiryTimeMillis :: !(Maybe Int64) + , _spAutoRenewing :: !(Maybe Bool) + , _spStartTimeMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionPurchase' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spKind' +-- +-- * 'spExpiryTimeMillis' +-- +-- * 'spAutoRenewing' +-- +-- * 'spStartTimeMillis' +subscriptionPurchase + :: SubscriptionPurchase +subscriptionPurchase = + SubscriptionPurchase + { _spKind = "androidpublisher#subscriptionPurchase" + , _spExpiryTimeMillis = Nothing + , _spAutoRenewing = Nothing + , _spStartTimeMillis = Nothing + } + +-- | This kind represents a subscriptionPurchase object in the +-- androidpublisher service. +spKind :: Lens' SubscriptionPurchase Text +spKind = lens _spKind (\ s a -> s{_spKind = a}) + +-- | Time at which the subscription will expire, in milliseconds since Epoch. +spExpiryTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64) +spExpiryTimeMillis + = lens _spExpiryTimeMillis + (\ s a -> s{_spExpiryTimeMillis = a}) + +-- | Whether the subscription will automatically be renewed when it reaches +-- its current expiry time. +spAutoRenewing :: Lens' SubscriptionPurchase (Maybe Bool) +spAutoRenewing + = lens _spAutoRenewing + (\ s a -> s{_spAutoRenewing = a}) + +-- | Time at which the subscription was granted, in milliseconds since Epoch. +spStartTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64) +spStartTimeMillis + = lens _spStartTimeMillis + (\ s a -> s{_spStartTimeMillis = a}) + +instance FromJSON SubscriptionPurchase where + parseJSON + = withObject "SubscriptionPurchase" + (\ o -> + SubscriptionPurchase <$> + (o .:? "kind" .!= + "androidpublisher#subscriptionPurchase") + <*> (o .:? "expiryTimeMillis") + <*> (o .:? "autoRenewing") + <*> (o .:? "startTimeMillis")) + +instance ToJSON SubscriptionPurchase where + toJSON SubscriptionPurchase{..} + = object + (catMaybes + [Just ("kind" .= _spKind), + ("expiryTimeMillis" .=) <$> _spExpiryTimeMillis, + ("autoRenewing" .=) <$> _spAutoRenewing, + ("startTimeMillis" .=) <$> _spStartTimeMillis]) + +-- +-- /See:/ 'inappproductsBatchRequest' smart constructor. +newtype InappproductsBatchRequest = InappproductsBatchRequest + { _ibrEntrys :: Maybe [Maybe InappproductsBatchRequestEntry] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsBatchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ibrEntrys' +inappproductsBatchRequest + :: InappproductsBatchRequest +inappproductsBatchRequest = + InappproductsBatchRequest + { _ibrEntrys = Nothing + } + +ibrEntrys :: Lens' InappproductsBatchRequest [Maybe InappproductsBatchRequestEntry] +ibrEntrys + = lens _ibrEntrys (\ s a -> s{_ibrEntrys = a}) . + _Default + . _Coerce + +instance FromJSON InappproductsBatchRequest where + parseJSON + = withObject "InappproductsBatchRequest" + (\ o -> + InappproductsBatchRequest <$> + (o .:? "entrys" .!= mempty)) + +instance ToJSON InappproductsBatchRequest where + toJSON InappproductsBatchRequest{..} + = object (catMaybes [("entrys" .=) <$> _ibrEntrys]) + +-- +-- /See:/ 'appDetails' smart constructor. +data AppDetails = AppDetails + { _adContactPhone :: !(Maybe Text) + , _adContactEmail :: !(Maybe Text) + , _adContactWebsite :: !(Maybe Text) + , _adDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adContactPhone' +-- +-- * 'adContactEmail' +-- +-- * 'adContactWebsite' +-- +-- * 'adDefaultLanguage' +appDetails + :: AppDetails +appDetails = + AppDetails + { _adContactPhone = Nothing + , _adContactEmail = Nothing + , _adContactWebsite = Nothing + , _adDefaultLanguage = Nothing + } + +-- | The user-visible support telephone number for this app. +adContactPhone :: Lens' AppDetails (Maybe Text) +adContactPhone + = lens _adContactPhone + (\ s a -> s{_adContactPhone = a}) + +-- | The user-visible support email for this app. +adContactEmail :: Lens' AppDetails (Maybe Text) +adContactEmail + = lens _adContactEmail + (\ s a -> s{_adContactEmail = a}) + +-- | The user-visible website for this app. +adContactWebsite :: Lens' AppDetails (Maybe Text) +adContactWebsite + = lens _adContactWebsite + (\ s a -> s{_adContactWebsite = a}) + +-- | Default language code, in BCP 47 format (eg \"en-US\"). +adDefaultLanguage :: Lens' AppDetails (Maybe Text) +adDefaultLanguage + = lens _adDefaultLanguage + (\ s a -> s{_adDefaultLanguage = a}) + +instance FromJSON AppDetails where + parseJSON + = withObject "AppDetails" + (\ o -> + AppDetails <$> + (o .:? "contactPhone") <*> (o .:? "contactEmail") <*> + (o .:? "contactWebsite") + <*> (o .:? "defaultLanguage")) + +instance ToJSON AppDetails where + toJSON AppDetails{..} + = object + (catMaybes + [("contactPhone" .=) <$> _adContactPhone, + ("contactEmail" .=) <$> _adContactEmail, + ("contactWebsite" .=) <$> _adContactWebsite, + ("defaultLanguage" .=) <$> _adDefaultLanguage]) + +-- | Defines an APK available for this application that is hosted externally +-- and not uploaded to Google Play. This function is only available to +-- enterprises who are using Google Play for Work, and whos application is +-- restricted to the enterprise private channel +-- +-- /See:/ 'externallyHostedApk' smart constructor. +data ExternallyHostedApk = ExternallyHostedApk + { _ehaApplicationLabel :: !(Maybe Text) + , _ehaMaximumSdk :: !(Maybe Int32) + , _ehaNativeCodes :: !(Maybe [Text]) + , _ehaVersionCode :: !(Maybe Int32) + , _ehaFileSha256Base64 :: !(Maybe Text) + , _ehaExternallyHostedUrl :: !(Maybe Text) + , _ehaVersionName :: !(Maybe Text) + , _ehaPackageName :: !(Maybe Text) + , _ehaFileSize :: !(Maybe Int64) + , _ehaIconBase64 :: !(Maybe Text) + , _ehaUsesFeatures :: !(Maybe [Text]) + , _ehaMinimumSdk :: !(Maybe Int32) + , _ehaFileSha1Base64 :: !(Maybe Text) + , _ehaUsesPermissions :: !(Maybe [Maybe ExternallyHostedApkUsesPermission]) + , _ehaCertificateBase64s :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExternallyHostedApk' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ehaApplicationLabel' +-- +-- * 'ehaMaximumSdk' +-- +-- * 'ehaNativeCodes' +-- +-- * 'ehaVersionCode' +-- +-- * 'ehaFileSha256Base64' +-- +-- * 'ehaExternallyHostedUrl' +-- +-- * 'ehaVersionName' +-- +-- * 'ehaPackageName' +-- +-- * 'ehaFileSize' +-- +-- * 'ehaIconBase64' +-- +-- * 'ehaUsesFeatures' +-- +-- * 'ehaMinimumSdk' +-- +-- * 'ehaFileSha1Base64' +-- +-- * 'ehaUsesPermissions' +-- +-- * 'ehaCertificateBase64s' +externallyHostedApk + :: ExternallyHostedApk +externallyHostedApk = + ExternallyHostedApk + { _ehaApplicationLabel = Nothing + , _ehaMaximumSdk = Nothing + , _ehaNativeCodes = Nothing + , _ehaVersionCode = Nothing + , _ehaFileSha256Base64 = Nothing + , _ehaExternallyHostedUrl = Nothing + , _ehaVersionName = Nothing + , _ehaPackageName = Nothing + , _ehaFileSize = Nothing + , _ehaIconBase64 = Nothing + , _ehaUsesFeatures = Nothing + , _ehaMinimumSdk = Nothing + , _ehaFileSha1Base64 = Nothing + , _ehaUsesPermissions = Nothing + , _ehaCertificateBase64s = Nothing + } + +-- | The application label. +ehaApplicationLabel :: Lens' ExternallyHostedApk (Maybe Text) +ehaApplicationLabel + = lens _ehaApplicationLabel + (\ s a -> s{_ehaApplicationLabel = a}) + +-- | The maximum SDK supported by this APK (optional). +ehaMaximumSdk :: Lens' ExternallyHostedApk (Maybe Int32) +ehaMaximumSdk + = lens _ehaMaximumSdk + (\ s a -> s{_ehaMaximumSdk = a}) + +-- | The native code environments supported by this APK (optional). +ehaNativeCodes :: Lens' ExternallyHostedApk [Text] +ehaNativeCodes + = lens _ehaNativeCodes + (\ s a -> s{_ehaNativeCodes = a}) + . _Default + . _Coerce + +-- | The version code of this APK. +ehaVersionCode :: Lens' ExternallyHostedApk (Maybe Int32) +ehaVersionCode + = lens _ehaVersionCode + (\ s a -> s{_ehaVersionCode = a}) + +-- | The SHA256 checksum of this APK, represented as a base64 encoded byte +-- array. +ehaFileSha256Base64 :: Lens' ExternallyHostedApk (Maybe Text) +ehaFileSha256Base64 + = lens _ehaFileSha256Base64 + (\ s a -> s{_ehaFileSha256Base64 = a}) + +-- | The URL at which the APK is hosted. This must be an https URL. +ehaExternallyHostedUrl :: Lens' ExternallyHostedApk (Maybe Text) +ehaExternallyHostedUrl + = lens _ehaExternallyHostedUrl + (\ s a -> s{_ehaExternallyHostedUrl = a}) + +-- | The version name of this APK. +ehaVersionName :: Lens' ExternallyHostedApk (Maybe Text) +ehaVersionName + = lens _ehaVersionName + (\ s a -> s{_ehaVersionName = a}) + +-- | The package name. +ehaPackageName :: Lens' ExternallyHostedApk (Maybe Text) +ehaPackageName + = lens _ehaPackageName + (\ s a -> s{_ehaPackageName = a}) + +-- | The file size in bytes of this APK. +ehaFileSize :: Lens' ExternallyHostedApk (Maybe Int64) +ehaFileSize + = lens _ehaFileSize (\ s a -> s{_ehaFileSize = a}) + +-- | The icon image from the APK, as a base64 encoded byte array. +ehaIconBase64 :: Lens' ExternallyHostedApk (Maybe Text) +ehaIconBase64 + = lens _ehaIconBase64 + (\ s a -> s{_ehaIconBase64 = a}) + +-- | The features required by this APK (optional). +ehaUsesFeatures :: Lens' ExternallyHostedApk [Text] +ehaUsesFeatures + = lens _ehaUsesFeatures + (\ s a -> s{_ehaUsesFeatures = a}) + . _Default + . _Coerce + +-- | The minimum SDK targeted by this APK. +ehaMinimumSdk :: Lens' ExternallyHostedApk (Maybe Int32) +ehaMinimumSdk + = lens _ehaMinimumSdk + (\ s a -> s{_ehaMinimumSdk = a}) + +-- | The SHA1 checksum of this APK, represented as a base64 encoded byte +-- array. +ehaFileSha1Base64 :: Lens' ExternallyHostedApk (Maybe Text) +ehaFileSha1Base64 + = lens _ehaFileSha1Base64 + (\ s a -> s{_ehaFileSha1Base64 = a}) + +-- | The permissions requested by this APK. +ehaUsesPermissions :: Lens' ExternallyHostedApk [Maybe ExternallyHostedApkUsesPermission] +ehaUsesPermissions + = lens _ehaUsesPermissions + (\ s a -> s{_ehaUsesPermissions = a}) + . _Default + . _Coerce + +-- | A certificate (or array of certificates if a certificate-chain is used) +-- used to signed this APK, represented as a base64 encoded byte array. +ehaCertificateBase64s :: Lens' ExternallyHostedApk [Text] +ehaCertificateBase64s + = lens _ehaCertificateBase64s + (\ s a -> s{_ehaCertificateBase64s = a}) + . _Default + . _Coerce + +instance FromJSON ExternallyHostedApk where + parseJSON + = withObject "ExternallyHostedApk" + (\ o -> + ExternallyHostedApk <$> + (o .:? "applicationLabel") <*> (o .:? "maximumSdk") + <*> (o .:? "nativeCodes" .!= mempty) + <*> (o .:? "versionCode") + <*> (o .:? "fileSha256Base64") + <*> (o .:? "externallyHostedUrl") + <*> (o .:? "versionName") + <*> (o .:? "packageName") + <*> (o .:? "fileSize") + <*> (o .:? "iconBase64") + <*> (o .:? "usesFeatures" .!= mempty) + <*> (o .:? "minimumSdk") + <*> (o .:? "fileSha1Base64") + <*> (o .:? "usesPermissions" .!= mempty) + <*> (o .:? "certificateBase64s" .!= mempty)) + +instance ToJSON ExternallyHostedApk where + toJSON ExternallyHostedApk{..} + = object + (catMaybes + [("applicationLabel" .=) <$> _ehaApplicationLabel, + ("maximumSdk" .=) <$> _ehaMaximumSdk, + ("nativeCodes" .=) <$> _ehaNativeCodes, + ("versionCode" .=) <$> _ehaVersionCode, + ("fileSha256Base64" .=) <$> _ehaFileSha256Base64, + ("externallyHostedUrl" .=) <$> + _ehaExternallyHostedUrl, + ("versionName" .=) <$> _ehaVersionName, + ("packageName" .=) <$> _ehaPackageName, + ("fileSize" .=) <$> _ehaFileSize, + ("iconBase64" .=) <$> _ehaIconBase64, + ("usesFeatures" .=) <$> _ehaUsesFeatures, + ("minimumSdk" .=) <$> _ehaMinimumSdk, + ("fileSha1Base64" .=) <$> _ehaFileSha1Base64, + ("usesPermissions" .=) <$> _ehaUsesPermissions, + ("certificateBase64s" .=) <$> + _ehaCertificateBase64s]) + +-- +-- /See:/ 'imagesUploadResponse' smart constructor. +newtype ImagesUploadResponse = ImagesUploadResponse + { _iurImage :: Maybe (Maybe Image) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImagesUploadResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iurImage' +imagesUploadResponse + :: ImagesUploadResponse +imagesUploadResponse = + ImagesUploadResponse + { _iurImage = Nothing + } + +iurImage :: Lens' ImagesUploadResponse (Maybe (Maybe Image)) +iurImage = lens _iurImage (\ s a -> s{_iurImage = a}) + +instance FromJSON ImagesUploadResponse where + parseJSON + = withObject "ImagesUploadResponse" + (\ o -> ImagesUploadResponse <$> (o .:? "image")) + +instance ToJSON ImagesUploadResponse where + toJSON ImagesUploadResponse{..} + = object (catMaybes [("image" .=) <$> _iurImage]) + +-- +-- /See:/ 'expansionFilesUploadResponse' smart constructor. +newtype ExpansionFilesUploadResponse = ExpansionFilesUploadResponse + { _efurExpansionFile :: Maybe (Maybe ExpansionFile) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExpansionFilesUploadResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'efurExpansionFile' +expansionFilesUploadResponse + :: ExpansionFilesUploadResponse +expansionFilesUploadResponse = + ExpansionFilesUploadResponse + { _efurExpansionFile = Nothing + } + +efurExpansionFile :: Lens' ExpansionFilesUploadResponse (Maybe (Maybe ExpansionFile)) +efurExpansionFile + = lens _efurExpansionFile + (\ s a -> s{_efurExpansionFile = a}) + +instance FromJSON ExpansionFilesUploadResponse where + parseJSON + = withObject "ExpansionFilesUploadResponse" + (\ o -> + ExpansionFilesUploadResponse <$> + (o .:? "expansionFile")) + +instance ToJSON ExpansionFilesUploadResponse where + toJSON ExpansionFilesUploadResponse{..} + = object + (catMaybes + [("expansionFile" .=) <$> _efurExpansionFile]) + +-- +-- /See:/ 'inappproductsListResponse' smart constructor. +data InappproductsListResponse = InappproductsListResponse + { _ilrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _ilrPageInfo :: !(Maybe (Maybe PageInfo)) + , _ilrKind :: !Text + , _ilrInappproduct :: !(Maybe [Maybe InAppProduct]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilrTokenPagination' +-- +-- * 'ilrPageInfo' +-- +-- * 'ilrKind' +-- +-- * 'ilrInappproduct' +inappproductsListResponse + :: InappproductsListResponse +inappproductsListResponse = + InappproductsListResponse + { _ilrTokenPagination = Nothing + , _ilrPageInfo = Nothing + , _ilrKind = "androidpublisher#inappproductsListResponse" + , _ilrInappproduct = Nothing + } + +ilrTokenPagination :: Lens' InappproductsListResponse (Maybe (Maybe TokenPagination)) +ilrTokenPagination + = lens _ilrTokenPagination + (\ s a -> s{_ilrTokenPagination = a}) + +ilrPageInfo :: Lens' InappproductsListResponse (Maybe (Maybe PageInfo)) +ilrPageInfo + = lens _ilrPageInfo (\ s a -> s{_ilrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#inappproductsListResponse\". +ilrKind :: Lens' InappproductsListResponse Text +ilrKind = lens _ilrKind (\ s a -> s{_ilrKind = a}) + +ilrInappproduct :: Lens' InappproductsListResponse [Maybe InAppProduct] +ilrInappproduct + = lens _ilrInappproduct + (\ s a -> s{_ilrInappproduct = a}) + . _Default + . _Coerce + +instance FromJSON InappproductsListResponse where + parseJSON + = withObject "InappproductsListResponse" + (\ o -> + InappproductsListResponse <$> + (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*> + (o .:? "kind" .!= + "androidpublisher#inappproductsListResponse") + <*> (o .:? "inappproduct" .!= mempty)) + +instance ToJSON InappproductsListResponse where + toJSON InappproductsListResponse{..} + = object + (catMaybes + [("tokenPagination" .=) <$> _ilrTokenPagination, + ("pageInfo" .=) <$> _ilrPageInfo, + Just ("kind" .= _ilrKind), + ("inappproduct" .=) <$> _ilrInappproduct]) + +-- | A SubscriptionDeferralInfo contains the data needed to defer a +-- subscription purchase to a future expiry time. +-- +-- /See:/ 'subscriptionDeferralInfo' smart constructor. +data SubscriptionDeferralInfo = SubscriptionDeferralInfo + { _sdiDesiredExpiryTimeMillis :: !(Maybe Int64) + , _sdiExpectedExpiryTimeMillis :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionDeferralInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdiDesiredExpiryTimeMillis' +-- +-- * 'sdiExpectedExpiryTimeMillis' +subscriptionDeferralInfo + :: SubscriptionDeferralInfo +subscriptionDeferralInfo = + SubscriptionDeferralInfo + { _sdiDesiredExpiryTimeMillis = Nothing + , _sdiExpectedExpiryTimeMillis = Nothing + } + +-- | The desired next expiry time for the subscription in milliseconds since +-- Epoch. The given time must be after the current expiry time for the +-- subscription. +sdiDesiredExpiryTimeMillis :: Lens' SubscriptionDeferralInfo (Maybe Int64) +sdiDesiredExpiryTimeMillis + = lens _sdiDesiredExpiryTimeMillis + (\ s a -> s{_sdiDesiredExpiryTimeMillis = a}) + +-- | The expected expiry time for the subscription. If the current expiry +-- time for the subscription is not the value specified here, the deferral +-- will not occur. +sdiExpectedExpiryTimeMillis :: Lens' SubscriptionDeferralInfo (Maybe Int64) +sdiExpectedExpiryTimeMillis + = lens _sdiExpectedExpiryTimeMillis + (\ s a -> s{_sdiExpectedExpiryTimeMillis = a}) + +instance FromJSON SubscriptionDeferralInfo where + parseJSON + = withObject "SubscriptionDeferralInfo" + (\ o -> + SubscriptionDeferralInfo <$> + (o .:? "desiredExpiryTimeMillis") <*> + (o .:? "expectedExpiryTimeMillis")) + +instance ToJSON SubscriptionDeferralInfo where + toJSON SubscriptionDeferralInfo{..} + = object + (catMaybes + [("desiredExpiryTimeMillis" .=) <$> + _sdiDesiredExpiryTimeMillis, + ("expectedExpiryTimeMillis" .=) <$> + _sdiExpectedExpiryTimeMillis]) + +-- +-- /See:/ 'apksAddExternallyHostedResponse' smart constructor. +newtype ApksAddExternallyHostedResponse = ApksAddExternallyHostedResponse + { _aaehrExternallyHostedApk :: Maybe (Maybe ExternallyHostedApk) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApksAddExternallyHostedResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaehrExternallyHostedApk' +apksAddExternallyHostedResponse + :: ApksAddExternallyHostedResponse +apksAddExternallyHostedResponse = + ApksAddExternallyHostedResponse + { _aaehrExternallyHostedApk = Nothing + } + +-- | The definition of the externally-hosted APK and where it is located. +aaehrExternallyHostedApk :: Lens' ApksAddExternallyHostedResponse (Maybe (Maybe ExternallyHostedApk)) +aaehrExternallyHostedApk + = lens _aaehrExternallyHostedApk + (\ s a -> s{_aaehrExternallyHostedApk = a}) + +instance FromJSON ApksAddExternallyHostedResponse + where + parseJSON + = withObject "ApksAddExternallyHostedResponse" + (\ o -> + ApksAddExternallyHostedResponse <$> + (o .:? "externallyHostedApk")) + +instance ToJSON ApksAddExternallyHostedResponse where + toJSON ApksAddExternallyHostedResponse{..} + = object + (catMaybes + [("externallyHostedApk" .=) <$> + _aaehrExternallyHostedApk]) + +-- +-- /See:/ 'apkListingsListResponse' smart constructor. +data ApkListingsListResponse = ApkListingsListResponse + { _allrKind :: !Text + , _allrListings :: !(Maybe [Maybe ApkListing]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApkListingsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'allrKind' +-- +-- * 'allrListings' +apkListingsListResponse + :: ApkListingsListResponse +apkListingsListResponse = + ApkListingsListResponse + { _allrKind = "androidpublisher#apkListingsListResponse" + , _allrListings = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#apkListingsListResponse\". +allrKind :: Lens' ApkListingsListResponse Text +allrKind = lens _allrKind (\ s a -> s{_allrKind = a}) + +allrListings :: Lens' ApkListingsListResponse [Maybe ApkListing] +allrListings + = lens _allrListings (\ s a -> s{_allrListings = a}) + . _Default + . _Coerce + +instance FromJSON ApkListingsListResponse where + parseJSON + = withObject "ApkListingsListResponse" + (\ o -> + ApkListingsListResponse <$> + (o .:? "kind" .!= + "androidpublisher#apkListingsListResponse") + <*> (o .:? "listings" .!= mempty)) + +instance ToJSON ApkListingsListResponse where + toJSON ApkListingsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _allrKind), + ("listings" .=) <$> _allrListings]) + +-- +-- /See:/ 'inappproductsInsertResponse' smart constructor. +newtype InappproductsInsertResponse = InappproductsInsertResponse + { _iirInappproduct :: Maybe (Maybe InAppProduct) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsInsertResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iirInappproduct' +inappproductsInsertResponse + :: InappproductsInsertResponse +inappproductsInsertResponse = + InappproductsInsertResponse + { _iirInappproduct = Nothing + } + +iirInappproduct :: Lens' InappproductsInsertResponse (Maybe (Maybe InAppProduct)) +iirInappproduct + = lens _iirInappproduct + (\ s a -> s{_iirInappproduct = a}) + +instance FromJSON InappproductsInsertResponse where + parseJSON + = withObject "InappproductsInsertResponse" + (\ o -> + InappproductsInsertResponse <$> + (o .:? "inappproduct")) + +instance ToJSON InappproductsInsertResponse where + toJSON InappproductsInsertResponse{..} + = object + (catMaybes + [("inappproduct" .=) <$> _iirInappproduct]) + +-- +-- /See:/ 'price' smart constructor. +data Price = Price + { _pPriceMicros :: !(Maybe Text) + , _pCurrency :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Price' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pPriceMicros' +-- +-- * 'pCurrency' +price + :: Price +price = + Price + { _pPriceMicros = Nothing + , _pCurrency = Nothing + } + +-- | The price in millionths of the currency base unit represented as a +-- string. +pPriceMicros :: Lens' Price (Maybe Text) +pPriceMicros + = lens _pPriceMicros (\ s a -> s{_pPriceMicros = a}) + +-- | 3 letter Currency code, as defined by ISO 4217. +pCurrency :: Lens' Price (Maybe Text) +pCurrency + = lens _pCurrency (\ s a -> s{_pCurrency = a}) + +instance FromJSON Price where + parseJSON + = withObject "Price" + (\ o -> + Price <$> + (o .:? "priceMicros") <*> (o .:? "currency")) + +instance ToJSON Price where + toJSON Price{..} + = object + (catMaybes + [("priceMicros" .=) <$> _pPriceMicros, + ("currency" .=) <$> _pCurrency]) + +-- +-- /See:/ 'inappproductsBatchResponseEntry' smart constructor. +data InappproductsBatchResponseEntry = InappproductsBatchResponseEntry + { _iInappproductsupdateresponse :: !(Maybe (Maybe InappproductsUpdateResponse)) + , _iInappproductsinsertresponse :: !(Maybe (Maybe InappproductsInsertResponse)) + , _iBatchId :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsBatchResponseEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iInappproductsupdateresponse' +-- +-- * 'iInappproductsinsertresponse' +-- +-- * 'iBatchId' +inappproductsBatchResponseEntry + :: InappproductsBatchResponseEntry +inappproductsBatchResponseEntry = + InappproductsBatchResponseEntry + { _iInappproductsupdateresponse = Nothing + , _iInappproductsinsertresponse = Nothing + , _iBatchId = Nothing + } + +iInappproductsupdateresponse :: Lens' InappproductsBatchResponseEntry (Maybe (Maybe InappproductsUpdateResponse)) +iInappproductsupdateresponse + = lens _iInappproductsupdateresponse + (\ s a -> s{_iInappproductsupdateresponse = a}) + +iInappproductsinsertresponse :: Lens' InappproductsBatchResponseEntry (Maybe (Maybe InappproductsInsertResponse)) +iInappproductsinsertresponse + = lens _iInappproductsinsertresponse + (\ s a -> s{_iInappproductsinsertresponse = a}) + +iBatchId :: Lens' InappproductsBatchResponseEntry (Maybe Word32) +iBatchId = lens _iBatchId (\ s a -> s{_iBatchId = a}) + +instance FromJSON InappproductsBatchResponseEntry + where + parseJSON + = withObject "InappproductsBatchResponseEntry" + (\ o -> + InappproductsBatchResponseEntry <$> + (o .:? "inappproductsupdateresponse") <*> + (o .:? "inappproductsinsertresponse") + <*> (o .:? "batchId")) + +instance ToJSON InappproductsBatchResponseEntry where + toJSON InappproductsBatchResponseEntry{..} + = object + (catMaybes + [("inappproductsupdateresponse" .=) <$> + _iInappproductsupdateresponse, + ("inappproductsinsertresponse" .=) <$> + _iInappproductsinsertresponse, + ("batchId" .=) <$> _iBatchId]) + +-- +-- /See:/ 'inAppProduct' smart constructor. +data InAppProduct = InAppProduct + { _iapStatus :: !(Maybe Text) + , _iapTrialPeriod :: !(Maybe Text) + , _iapPackageName :: !(Maybe Text) + , _iapSeason :: !(Maybe (Maybe Season)) + , _iapPurchaseType :: !(Maybe Text) + , _iapSubscriptionPeriod :: !(Maybe Text) + , _iapPrices :: !(Maybe InAppProductPrices) + , _iapSku :: !(Maybe Text) + , _iapDefaultPrice :: !(Maybe (Maybe Price)) + , _iapListings :: !(Maybe InAppProductListings) + , _iapDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InAppProduct' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iapStatus' +-- +-- * 'iapTrialPeriod' +-- +-- * 'iapPackageName' +-- +-- * 'iapSeason' +-- +-- * 'iapPurchaseType' +-- +-- * 'iapSubscriptionPeriod' +-- +-- * 'iapPrices' +-- +-- * 'iapSku' +-- +-- * 'iapDefaultPrice' +-- +-- * 'iapListings' +-- +-- * 'iapDefaultLanguage' +inAppProduct + :: InAppProduct +inAppProduct = + InAppProduct + { _iapStatus = Nothing + , _iapTrialPeriod = Nothing + , _iapPackageName = Nothing + , _iapSeason = Nothing + , _iapPurchaseType = Nothing + , _iapSubscriptionPeriod = Nothing + , _iapPrices = Nothing + , _iapSku = Nothing + , _iapDefaultPrice = Nothing + , _iapListings = Nothing + , _iapDefaultLanguage = Nothing + } + +iapStatus :: Lens' InAppProduct (Maybe Text) +iapStatus + = lens _iapStatus (\ s a -> s{_iapStatus = a}) + +-- | Trial period, specified in ISO 8601 format. Acceptable values are +-- anything between \"P7D\" (seven days) and \"P999D\" (999 days). Seasonal +-- subscriptions cannot have a trial period. +iapTrialPeriod :: Lens' InAppProduct (Maybe Text) +iapTrialPeriod + = lens _iapTrialPeriod + (\ s a -> s{_iapTrialPeriod = a}) + +-- | The package name of the parent app. +iapPackageName :: Lens' InAppProduct (Maybe Text) +iapPackageName + = lens _iapPackageName + (\ s a -> s{_iapPackageName = a}) + +-- | Definition of a season for a seasonal subscription. Can be defined only +-- for yearly subscriptions. +iapSeason :: Lens' InAppProduct (Maybe (Maybe Season)) +iapSeason + = lens _iapSeason (\ s a -> s{_iapSeason = a}) + +-- | Purchase type enum value. Unmodifiable after creation. +iapPurchaseType :: Lens' InAppProduct (Maybe Text) +iapPurchaseType + = lens _iapPurchaseType + (\ s a -> s{_iapPurchaseType = a}) + +-- | Subscription period, specified in ISO 8601 format. Acceptable values are +-- \"P1W\" (one week), \"P1M\" (one month) and \"P1Y\" (one year). +iapSubscriptionPeriod :: Lens' InAppProduct (Maybe Text) +iapSubscriptionPeriod + = lens _iapSubscriptionPeriod + (\ s a -> s{_iapSubscriptionPeriod = a}) + +-- | Prices per buyer region. None of these prices should be zero. In-app +-- products can never be free. +iapPrices :: Lens' InAppProduct (Maybe InAppProductPrices) +iapPrices + = lens _iapPrices (\ s a -> s{_iapPrices = a}) + +-- | The stock-keeping-unit (SKU) of the product, unique within an app. +iapSku :: Lens' InAppProduct (Maybe Text) +iapSku = lens _iapSku (\ s a -> s{_iapSku = a}) + +-- | Default price cannot be zero. In-app products can never be free. Default +-- price is always in the developer\'s Checkout merchant currency. +iapDefaultPrice :: Lens' InAppProduct (Maybe (Maybe Price)) +iapDefaultPrice + = lens _iapDefaultPrice + (\ s a -> s{_iapDefaultPrice = a}) + +-- | List of localized title and description data. +iapListings :: Lens' InAppProduct (Maybe InAppProductListings) +iapListings + = lens _iapListings (\ s a -> s{_iapListings = a}) + +-- | The default language of the localized data, as defined by BCP 47. e.g. +-- \"en-US\", \"en-GB\". +iapDefaultLanguage :: Lens' InAppProduct (Maybe Text) +iapDefaultLanguage + = lens _iapDefaultLanguage + (\ s a -> s{_iapDefaultLanguage = a}) + +instance FromJSON InAppProduct where + parseJSON + = withObject "InAppProduct" + (\ o -> + InAppProduct <$> + (o .:? "status") <*> (o .:? "trialPeriod") <*> + (o .:? "packageName") + <*> (o .:? "season") + <*> (o .:? "purchaseType") + <*> (o .:? "subscriptionPeriod") + <*> (o .:? "prices") + <*> (o .:? "sku") + <*> (o .:? "defaultPrice") + <*> (o .:? "listings") + <*> (o .:? "defaultLanguage")) + +instance ToJSON InAppProduct where + toJSON InAppProduct{..} + = object + (catMaybes + [("status" .=) <$> _iapStatus, + ("trialPeriod" .=) <$> _iapTrialPeriod, + ("packageName" .=) <$> _iapPackageName, + ("season" .=) <$> _iapSeason, + ("purchaseType" .=) <$> _iapPurchaseType, + ("subscriptionPeriod" .=) <$> _iapSubscriptionPeriod, + ("prices" .=) <$> _iapPrices, ("sku" .=) <$> _iapSku, + ("defaultPrice" .=) <$> _iapDefaultPrice, + ("listings" .=) <$> _iapListings, + ("defaultLanguage" .=) <$> _iapDefaultLanguage]) + +-- | Represents the binary payload of an APK. +-- +-- /See:/ 'apkBinary' smart constructor. +newtype ApkBinary = ApkBinary + { _abSha1 :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApkBinary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'abSha1' +apkBinary + :: ApkBinary +apkBinary = + ApkBinary + { _abSha1 = Nothing + } + +-- | A sha1 hash of the APK payload, encoded as a hex string and matching the +-- output of the sha1sum command. +abSha1 :: Lens' ApkBinary (Maybe Text) +abSha1 = lens _abSha1 (\ s a -> s{_abSha1 = a}) + +instance FromJSON ApkBinary where + parseJSON + = withObject "ApkBinary" + (\ o -> ApkBinary <$> (o .:? "sha1")) + +instance ToJSON ApkBinary where + toJSON ApkBinary{..} + = object (catMaybes [("sha1" .=) <$> _abSha1]) + +-- | A permission used by this APK. +-- +-- /See:/ 'externallyHostedApkUsesPermission' smart constructor. +data ExternallyHostedApkUsesPermission = ExternallyHostedApkUsesPermission + { _ehaupName :: !(Maybe Text) + , _ehaupMaxSdkVersion :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExternallyHostedApkUsesPermission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ehaupName' +-- +-- * 'ehaupMaxSdkVersion' +externallyHostedApkUsesPermission + :: ExternallyHostedApkUsesPermission +externallyHostedApkUsesPermission = + ExternallyHostedApkUsesPermission + { _ehaupName = Nothing + , _ehaupMaxSdkVersion = Nothing + } + +-- | The name of the permission requested. +ehaupName :: Lens' ExternallyHostedApkUsesPermission (Maybe Text) +ehaupName + = lens _ehaupName (\ s a -> s{_ehaupName = a}) + +-- | Optionally, the maximum SDK version for which the permission is +-- required. +ehaupMaxSdkVersion :: Lens' ExternallyHostedApkUsesPermission (Maybe Int32) +ehaupMaxSdkVersion + = lens _ehaupMaxSdkVersion + (\ s a -> s{_ehaupMaxSdkVersion = a}) + +instance FromJSON ExternallyHostedApkUsesPermission + where + parseJSON + = withObject "ExternallyHostedApkUsesPermission" + (\ o -> + ExternallyHostedApkUsesPermission <$> + (o .:? "name") <*> (o .:? "maxSdkVersion")) + +instance ToJSON ExternallyHostedApkUsesPermission + where + toJSON ExternallyHostedApkUsesPermission{..} + = object + (catMaybes + [("name" .=) <$> _ehaupName, + ("maxSdkVersion" .=) <$> _ehaupMaxSdkVersion]) + +-- +-- /See:/ 'listingsListResponse' smart constructor. +data ListingsListResponse = ListingsListResponse + { _llrKind :: !Text + , _llrListings :: !(Maybe [Maybe Listing]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListingsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrKind' +-- +-- * 'llrListings' +listingsListResponse + :: ListingsListResponse +listingsListResponse = + ListingsListResponse + { _llrKind = "androidpublisher#listingsListResponse" + , _llrListings = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#listingsListResponse\". +llrKind :: Lens' ListingsListResponse Text +llrKind = lens _llrKind (\ s a -> s{_llrKind = a}) + +llrListings :: Lens' ListingsListResponse [Maybe Listing] +llrListings + = lens _llrListings (\ s a -> s{_llrListings = a}) . + _Default + . _Coerce + +instance FromJSON ListingsListResponse where + parseJSON + = withObject "ListingsListResponse" + (\ o -> + ListingsListResponse <$> + (o .:? "kind" .!= + "androidpublisher#listingsListResponse") + <*> (o .:? "listings" .!= mempty)) + +instance ToJSON ListingsListResponse where + toJSON ListingsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _llrKind), + ("listings" .=) <$> _llrListings]) + +-- +-- /See:/ 'inappproductsInsertRequest' smart constructor. +newtype InappproductsInsertRequest = InappproductsInsertRequest + { _iInappproduct :: Maybe (Maybe InAppProduct) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsInsertRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iInappproduct' +inappproductsInsertRequest + :: InappproductsInsertRequest +inappproductsInsertRequest = + InappproductsInsertRequest + { _iInappproduct = Nothing + } + +iInappproduct :: Lens' InappproductsInsertRequest (Maybe (Maybe InAppProduct)) +iInappproduct + = lens _iInappproduct + (\ s a -> s{_iInappproduct = a}) + +instance FromJSON InappproductsInsertRequest where + parseJSON + = withObject "InappproductsInsertRequest" + (\ o -> + InappproductsInsertRequest <$> + (o .:? "inappproduct")) + +instance ToJSON InappproductsInsertRequest where + toJSON InappproductsInsertRequest{..} + = object + (catMaybes [("inappproduct" .=) <$> _iInappproduct]) + +-- +-- /See:/ 'apksAddExternallyHostedRequest' smart constructor. +newtype ApksAddExternallyHostedRequest = ApksAddExternallyHostedRequest + { _aExternallyHostedApk :: Maybe (Maybe ExternallyHostedApk) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApksAddExternallyHostedRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aExternallyHostedApk' +apksAddExternallyHostedRequest + :: ApksAddExternallyHostedRequest +apksAddExternallyHostedRequest = + ApksAddExternallyHostedRequest + { _aExternallyHostedApk = Nothing + } + +-- | The definition of the externally-hosted APK and where it is located. +aExternallyHostedApk :: Lens' ApksAddExternallyHostedRequest (Maybe (Maybe ExternallyHostedApk)) +aExternallyHostedApk + = lens _aExternallyHostedApk + (\ s a -> s{_aExternallyHostedApk = a}) + +instance FromJSON ApksAddExternallyHostedRequest + where + parseJSON + = withObject "ApksAddExternallyHostedRequest" + (\ o -> + ApksAddExternallyHostedRequest <$> + (o .:? "externallyHostedApk")) + +instance ToJSON ApksAddExternallyHostedRequest where + toJSON ApksAddExternallyHostedRequest{..} + = object + (catMaybes + [("externallyHostedApk" .=) <$> + _aExternallyHostedApk]) + +-- +-- /See:/ 'apksListResponse' smart constructor. +data ApksListResponse = ApksListResponse + { _alrKind :: !Text + , _alrApks :: !(Maybe [Maybe Apk]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApksListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrKind' +-- +-- * 'alrApks' +apksListResponse + :: ApksListResponse +apksListResponse = + ApksListResponse + { _alrKind = "androidpublisher#apksListResponse" + , _alrApks = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#apksListResponse\". +alrKind :: Lens' ApksListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +alrApks :: Lens' ApksListResponse [Maybe Apk] +alrApks + = lens _alrApks (\ s a -> s{_alrApks = a}) . _Default + . _Coerce + +instance FromJSON ApksListResponse where + parseJSON + = withObject "ApksListResponse" + (\ o -> + ApksListResponse <$> + (o .:? "kind" .!= + "androidpublisher#apksListResponse") + <*> (o .:? "apks" .!= mempty)) + +instance ToJSON ApksListResponse where + toJSON ApksListResponse{..} + = object + (catMaybes + [Just ("kind" .= _alrKind), + ("apks" .=) <$> _alrApks]) + +-- +-- /See:/ 'entitlementsListResponse' smart constructor. +data EntitlementsListResponse = EntitlementsListResponse + { _elrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _elrPageInfo :: !(Maybe (Maybe PageInfo)) + , _elrResources :: !(Maybe [Maybe Entitlement]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elrTokenPagination' +-- +-- * 'elrPageInfo' +-- +-- * 'elrResources' +entitlementsListResponse + :: EntitlementsListResponse +entitlementsListResponse = + EntitlementsListResponse + { _elrTokenPagination = Nothing + , _elrPageInfo = Nothing + , _elrResources = Nothing + } + +elrTokenPagination :: Lens' EntitlementsListResponse (Maybe (Maybe TokenPagination)) +elrTokenPagination + = lens _elrTokenPagination + (\ s a -> s{_elrTokenPagination = a}) + +elrPageInfo :: Lens' EntitlementsListResponse (Maybe (Maybe PageInfo)) +elrPageInfo + = lens _elrPageInfo (\ s a -> s{_elrPageInfo = a}) + +elrResources :: Lens' EntitlementsListResponse [Maybe Entitlement] +elrResources + = lens _elrResources (\ s a -> s{_elrResources = a}) + . _Default + . _Coerce + +instance FromJSON EntitlementsListResponse where + parseJSON + = withObject "EntitlementsListResponse" + (\ o -> + EntitlementsListResponse <$> + (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*> + (o .:? "resources" .!= mempty)) + +instance ToJSON EntitlementsListResponse where + toJSON EntitlementsListResponse{..} + = object + (catMaybes + [("tokenPagination" .=) <$> _elrTokenPagination, + ("pageInfo" .=) <$> _elrPageInfo, + ("resources" .=) <$> _elrResources]) + +-- +-- /See:/ 'inappproductsUpdateRequest' smart constructor. +newtype InappproductsUpdateRequest = InappproductsUpdateRequest + { _inaInappproduct :: Maybe (Maybe InAppProduct) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsUpdateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'inaInappproduct' +inappproductsUpdateRequest + :: InappproductsUpdateRequest +inappproductsUpdateRequest = + InappproductsUpdateRequest + { _inaInappproduct = Nothing + } + +inaInappproduct :: Lens' InappproductsUpdateRequest (Maybe (Maybe InAppProduct)) +inaInappproduct + = lens _inaInappproduct + (\ s a -> s{_inaInappproduct = a}) + +instance FromJSON InappproductsUpdateRequest where + parseJSON + = withObject "InappproductsUpdateRequest" + (\ o -> + InappproductsUpdateRequest <$> + (o .:? "inappproduct")) + +instance ToJSON InappproductsUpdateRequest where + toJSON InappproductsUpdateRequest{..} + = object + (catMaybes + [("inappproduct" .=) <$> _inaInappproduct]) + +-- +-- /See:/ 'inappproductsBatchResponse' smart constructor. +data InappproductsBatchResponse = InappproductsBatchResponse + { _iEntrys :: !(Maybe [Maybe InappproductsBatchResponseEntry]) + , _iKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsBatchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iEntrys' +-- +-- * 'iKind' +inappproductsBatchResponse + :: InappproductsBatchResponse +inappproductsBatchResponse = + InappproductsBatchResponse + { _iEntrys = Nothing + , _iKind = "androidpublisher#inappproductsBatchResponse" + } + +iEntrys :: Lens' InappproductsBatchResponse [Maybe InappproductsBatchResponseEntry] +iEntrys + = lens _iEntrys (\ s a -> s{_iEntrys = a}) . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidpublisher#inappproductsBatchResponse\". +iKind :: Lens' InappproductsBatchResponse Text +iKind = lens _iKind (\ s a -> s{_iKind = a}) + +instance FromJSON InappproductsBatchResponse where + parseJSON + = withObject "InappproductsBatchResponse" + (\ o -> + InappproductsBatchResponse <$> + (o .:? "entrys" .!= mempty) <*> + (o .:? "kind" .!= + "androidpublisher#inappproductsBatchResponse")) + +instance ToJSON InappproductsBatchResponse where + toJSON InappproductsBatchResponse{..} + = object + (catMaybes + [("entrys" .=) <$> _iEntrys, + Just ("kind" .= _iKind)]) + +-- | An Entitlement resource indicates a user\'s current entitlement to an +-- inapp item or subscription. +-- +-- /See:/ 'entitlement' smart constructor. +data Entitlement = Entitlement + { _eKind :: !Text + , _eProductType :: !(Maybe Text) + , _eToken :: !(Maybe Text) + , _eProductId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Entitlement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eKind' +-- +-- * 'eProductType' +-- +-- * 'eToken' +-- +-- * 'eProductId' +entitlement + :: Entitlement +entitlement = + Entitlement + { _eKind = "androidpublisher#entitlement" + , _eProductType = Nothing + , _eToken = Nothing + , _eProductId = Nothing + } + +-- | This kind represents an entitlement object in the androidpublisher +-- service. +eKind :: Lens' Entitlement Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | The type of the inapp product. Possible values are: - In-app item: +-- \"inapp\" - Subscription: \"subs\" +eProductType :: Lens' Entitlement (Maybe Text) +eProductType + = lens _eProductType (\ s a -> s{_eProductType = a}) + +-- | The token which can be verified using the subscriptions or products API. +eToken :: Lens' Entitlement (Maybe Text) +eToken = lens _eToken (\ s a -> s{_eToken = a}) + +-- | The SKU of the product. +eProductId :: Lens' Entitlement (Maybe Text) +eProductId + = lens _eProductId (\ s a -> s{_eProductId = a}) + +instance FromJSON Entitlement where + parseJSON + = withObject "Entitlement" + (\ o -> + Entitlement <$> + (o .:? "kind" .!= "androidpublisher#entitlement") <*> + (o .:? "productType") + <*> (o .:? "token") + <*> (o .:? "productId")) + +instance ToJSON Entitlement where + toJSON Entitlement{..} + = object + (catMaybes + [Just ("kind" .= _eKind), + ("productType" .=) <$> _eProductType, + ("token" .=) <$> _eToken, + ("productId" .=) <$> _eProductId]) diff --git a/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Sum.hs b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Sum.hs new file mode 100644 index 000000000..3d1323aa6 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/PlayDeveloper/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayDeveloper.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayDeveloper.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Delete.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Delete.hs new file mode 100644 index 000000000..27bd34ec1 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Delete.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the APK-specific localized listing for a specified APK and +-- language code. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsDelete@. +module Androidpublisher.Edits.Apklistings.Delete + ( + -- * REST Resource + EditsApklistingsDeleteAPI + + -- * Creating a Request + , editsApklistingsDelete + , EditsApklistingsDelete + + -- * Request Lenses + , eadaQuotaUser + , eadaPrettyPrint + , eadaPackageName + , eadaApkVersionCode + , eadaUserIp + , eadaKey + , eadaLanguage + , eadaOauthToken + , eadaEditId + , eadaFields + , eadaAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsDelete@ which the +-- 'EditsApklistingsDelete' request conforms to. +type EditsApklistingsDeleteAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> + Capture "language" Text :> Delete '[JSON] () + +-- | Deletes the APK-specific localized listing for a specified APK and +-- language code. +-- +-- /See:/ 'editsApklistingsDelete' smart constructor. +data EditsApklistingsDelete = EditsApklistingsDelete + { _eadaQuotaUser :: !(Maybe Text) + , _eadaPrettyPrint :: !Bool + , _eadaPackageName :: !Text + , _eadaApkVersionCode :: !Int32 + , _eadaUserIp :: !(Maybe Text) + , _eadaKey :: !(Maybe Text) + , _eadaLanguage :: !Text + , _eadaOauthToken :: !(Maybe Text) + , _eadaEditId :: !Text + , _eadaFields :: !(Maybe Text) + , _eadaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eadaQuotaUser' +-- +-- * 'eadaPrettyPrint' +-- +-- * 'eadaPackageName' +-- +-- * 'eadaApkVersionCode' +-- +-- * 'eadaUserIp' +-- +-- * 'eadaKey' +-- +-- * 'eadaLanguage' +-- +-- * 'eadaOauthToken' +-- +-- * 'eadaEditId' +-- +-- * 'eadaFields' +-- +-- * 'eadaAlt' +editsApklistingsDelete + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsApklistingsDelete +editsApklistingsDelete pEadaPackageName_ pEadaApkVersionCode_ pEadaLanguage_ pEadaEditId_ = + EditsApklistingsDelete + { _eadaQuotaUser = Nothing + , _eadaPrettyPrint = True + , _eadaPackageName = pEadaPackageName_ + , _eadaApkVersionCode = pEadaApkVersionCode_ + , _eadaUserIp = Nothing + , _eadaKey = Nothing + , _eadaLanguage = pEadaLanguage_ + , _eadaOauthToken = Nothing + , _eadaEditId = pEadaEditId_ + , _eadaFields = Nothing + , _eadaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eadaQuotaUser :: Lens' EditsApklistingsDelete' (Maybe Text) +eadaQuotaUser + = lens _eadaQuotaUser + (\ s a -> s{_eadaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eadaPrettyPrint :: Lens' EditsApklistingsDelete' Bool +eadaPrettyPrint + = lens _eadaPrettyPrint + (\ s a -> s{_eadaPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eadaPackageName :: Lens' EditsApklistingsDelete' Text +eadaPackageName + = lens _eadaPackageName + (\ s a -> s{_eadaPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +eadaApkVersionCode :: Lens' EditsApklistingsDelete' Int32 +eadaApkVersionCode + = lens _eadaApkVersionCode + (\ s a -> s{_eadaApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eadaUserIp :: Lens' EditsApklistingsDelete' (Maybe Text) +eadaUserIp + = lens _eadaUserIp (\ s a -> s{_eadaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eadaKey :: Lens' EditsApklistingsDelete' (Maybe Text) +eadaKey = lens _eadaKey (\ s a -> s{_eadaKey = a}) + +-- | The language code (a BCP-47 language tag) of the APK-specific localized +-- listing to read or modify. For example, to select Austrian German, pass +-- \"de-AT\". +eadaLanguage :: Lens' EditsApklistingsDelete' Text +eadaLanguage + = lens _eadaLanguage (\ s a -> s{_eadaLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eadaOauthToken :: Lens' EditsApklistingsDelete' (Maybe Text) +eadaOauthToken + = lens _eadaOauthToken + (\ s a -> s{_eadaOauthToken = a}) + +-- | Unique identifier for this edit. +eadaEditId :: Lens' EditsApklistingsDelete' Text +eadaEditId + = lens _eadaEditId (\ s a -> s{_eadaEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eadaFields :: Lens' EditsApklistingsDelete' (Maybe Text) +eadaFields + = lens _eadaFields (\ s a -> s{_eadaFields = a}) + +-- | Data format for the response. +eadaAlt :: Lens' EditsApklistingsDelete' Text +eadaAlt = lens _eadaAlt (\ s a -> s{_eadaAlt = a}) + +instance GoogleRequest EditsApklistingsDelete' where + type Rs EditsApklistingsDelete' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsDelete{..} + = go _eadaQuotaUser _eadaPrettyPrint _eadaPackageName + _eadaApkVersionCode + _eadaUserIp + _eadaKey + _eadaLanguage + _eadaOauthToken + _eadaEditId + _eadaFields + _eadaAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsDeleteAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Deleteall.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Deleteall.hs new file mode 100644 index 000000000..c2eea90df --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Deleteall.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.Deleteall +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes all the APK-specific localized listings for a specified APK. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsDeleteall@. +module Androidpublisher.Edits.Apklistings.Deleteall + ( + -- * REST Resource + EditsApklistingsDeleteallAPI + + -- * Creating a Request + , editsApklistingsDeleteall + , EditsApklistingsDeleteall + + -- * Request Lenses + , eadQuotaUser + , eadPrettyPrint + , eadPackageName + , eadApkVersionCode + , eadUserIp + , eadKey + , eadOauthToken + , eadEditId + , eadFields + , eadAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsDeleteall@ which the +-- 'EditsApklistingsDeleteall' request conforms to. +type EditsApklistingsDeleteallAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> Delete '[JSON] () + +-- | Deletes all the APK-specific localized listings for a specified APK. +-- +-- /See:/ 'editsApklistingsDeleteall' smart constructor. +data EditsApklistingsDeleteall = EditsApklistingsDeleteall + { _eadQuotaUser :: !(Maybe Text) + , _eadPrettyPrint :: !Bool + , _eadPackageName :: !Text + , _eadApkVersionCode :: !Int32 + , _eadUserIp :: !(Maybe Text) + , _eadKey :: !(Maybe Text) + , _eadOauthToken :: !(Maybe Text) + , _eadEditId :: !Text + , _eadFields :: !(Maybe Text) + , _eadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsDeleteall'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eadQuotaUser' +-- +-- * 'eadPrettyPrint' +-- +-- * 'eadPackageName' +-- +-- * 'eadApkVersionCode' +-- +-- * 'eadUserIp' +-- +-- * 'eadKey' +-- +-- * 'eadOauthToken' +-- +-- * 'eadEditId' +-- +-- * 'eadFields' +-- +-- * 'eadAlt' +editsApklistingsDeleteall + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'editId' + -> EditsApklistingsDeleteall +editsApklistingsDeleteall pEadPackageName_ pEadApkVersionCode_ pEadEditId_ = + EditsApklistingsDeleteall + { _eadQuotaUser = Nothing + , _eadPrettyPrint = True + , _eadPackageName = pEadPackageName_ + , _eadApkVersionCode = pEadApkVersionCode_ + , _eadUserIp = Nothing + , _eadKey = Nothing + , _eadOauthToken = Nothing + , _eadEditId = pEadEditId_ + , _eadFields = Nothing + , _eadAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eadQuotaUser :: Lens' EditsApklistingsDeleteall' (Maybe Text) +eadQuotaUser + = lens _eadQuotaUser (\ s a -> s{_eadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eadPrettyPrint :: Lens' EditsApklistingsDeleteall' Bool +eadPrettyPrint + = lens _eadPrettyPrint + (\ s a -> s{_eadPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eadPackageName :: Lens' EditsApklistingsDeleteall' Text +eadPackageName + = lens _eadPackageName + (\ s a -> s{_eadPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +eadApkVersionCode :: Lens' EditsApklistingsDeleteall' Int32 +eadApkVersionCode + = lens _eadApkVersionCode + (\ s a -> s{_eadApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eadUserIp :: Lens' EditsApklistingsDeleteall' (Maybe Text) +eadUserIp + = lens _eadUserIp (\ s a -> s{_eadUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eadKey :: Lens' EditsApklistingsDeleteall' (Maybe Text) +eadKey = lens _eadKey (\ s a -> s{_eadKey = a}) + +-- | OAuth 2.0 token for the current user. +eadOauthToken :: Lens' EditsApklistingsDeleteall' (Maybe Text) +eadOauthToken + = lens _eadOauthToken + (\ s a -> s{_eadOauthToken = a}) + +-- | Unique identifier for this edit. +eadEditId :: Lens' EditsApklistingsDeleteall' Text +eadEditId + = lens _eadEditId (\ s a -> s{_eadEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eadFields :: Lens' EditsApklistingsDeleteall' (Maybe Text) +eadFields + = lens _eadFields (\ s a -> s{_eadFields = a}) + +-- | Data format for the response. +eadAlt :: Lens' EditsApklistingsDeleteall' Text +eadAlt = lens _eadAlt (\ s a -> s{_eadAlt = a}) + +instance GoogleRequest EditsApklistingsDeleteall' + where + type Rs EditsApklistingsDeleteall' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsDeleteall{..} + = go _eadQuotaUser _eadPrettyPrint _eadPackageName + _eadApkVersionCode + _eadUserIp + _eadKey + _eadOauthToken + _eadEditId + _eadFields + _eadAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsDeleteallAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Get.hs new file mode 100644 index 000000000..6d26a50e4 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Get.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches the APK-specific localized listing for a specified APK and +-- language code. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsGet@. +module Androidpublisher.Edits.Apklistings.Get + ( + -- * REST Resource + EditsApklistingsGetAPI + + -- * Creating a Request + , editsApklistingsGet + , EditsApklistingsGet + + -- * Request Lenses + , eagQuotaUser + , eagPrettyPrint + , eagPackageName + , eagApkVersionCode + , eagUserIp + , eagKey + , eagLanguage + , eagOauthToken + , eagEditId + , eagFields + , eagAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsGet@ which the +-- 'EditsApklistingsGet' request conforms to. +type EditsApklistingsGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> + Capture "language" Text :> Get '[JSON] ApkListing + +-- | Fetches the APK-specific localized listing for a specified APK and +-- language code. +-- +-- /See:/ 'editsApklistingsGet' smart constructor. +data EditsApklistingsGet = EditsApklistingsGet + { _eagQuotaUser :: !(Maybe Text) + , _eagPrettyPrint :: !Bool + , _eagPackageName :: !Text + , _eagApkVersionCode :: !Int32 + , _eagUserIp :: !(Maybe Text) + , _eagKey :: !(Maybe Text) + , _eagLanguage :: !Text + , _eagOauthToken :: !(Maybe Text) + , _eagEditId :: !Text + , _eagFields :: !(Maybe Text) + , _eagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eagQuotaUser' +-- +-- * 'eagPrettyPrint' +-- +-- * 'eagPackageName' +-- +-- * 'eagApkVersionCode' +-- +-- * 'eagUserIp' +-- +-- * 'eagKey' +-- +-- * 'eagLanguage' +-- +-- * 'eagOauthToken' +-- +-- * 'eagEditId' +-- +-- * 'eagFields' +-- +-- * 'eagAlt' +editsApklistingsGet + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsApklistingsGet +editsApklistingsGet pEagPackageName_ pEagApkVersionCode_ pEagLanguage_ pEagEditId_ = + EditsApklistingsGet + { _eagQuotaUser = Nothing + , _eagPrettyPrint = True + , _eagPackageName = pEagPackageName_ + , _eagApkVersionCode = pEagApkVersionCode_ + , _eagUserIp = Nothing + , _eagKey = Nothing + , _eagLanguage = pEagLanguage_ + , _eagOauthToken = Nothing + , _eagEditId = pEagEditId_ + , _eagFields = Nothing + , _eagAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eagQuotaUser :: Lens' EditsApklistingsGet' (Maybe Text) +eagQuotaUser + = lens _eagQuotaUser (\ s a -> s{_eagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eagPrettyPrint :: Lens' EditsApklistingsGet' Bool +eagPrettyPrint + = lens _eagPrettyPrint + (\ s a -> s{_eagPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eagPackageName :: Lens' EditsApklistingsGet' Text +eagPackageName + = lens _eagPackageName + (\ s a -> s{_eagPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +eagApkVersionCode :: Lens' EditsApklistingsGet' Int32 +eagApkVersionCode + = lens _eagApkVersionCode + (\ s a -> s{_eagApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eagUserIp :: Lens' EditsApklistingsGet' (Maybe Text) +eagUserIp + = lens _eagUserIp (\ s a -> s{_eagUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eagKey :: Lens' EditsApklistingsGet' (Maybe Text) +eagKey = lens _eagKey (\ s a -> s{_eagKey = a}) + +-- | The language code (a BCP-47 language tag) of the APK-specific localized +-- listing to read or modify. For example, to select Austrian German, pass +-- \"de-AT\". +eagLanguage :: Lens' EditsApklistingsGet' Text +eagLanguage + = lens _eagLanguage (\ s a -> s{_eagLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eagOauthToken :: Lens' EditsApklistingsGet' (Maybe Text) +eagOauthToken + = lens _eagOauthToken + (\ s a -> s{_eagOauthToken = a}) + +-- | Unique identifier for this edit. +eagEditId :: Lens' EditsApklistingsGet' Text +eagEditId + = lens _eagEditId (\ s a -> s{_eagEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eagFields :: Lens' EditsApklistingsGet' (Maybe Text) +eagFields + = lens _eagFields (\ s a -> s{_eagFields = a}) + +-- | Data format for the response. +eagAlt :: Lens' EditsApklistingsGet' Text +eagAlt = lens _eagAlt (\ s a -> s{_eagAlt = a}) + +instance GoogleRequest EditsApklistingsGet' where + type Rs EditsApklistingsGet' = ApkListing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsGet{..} + = go _eagQuotaUser _eagPrettyPrint _eagPackageName + _eagApkVersionCode + _eagUserIp + _eagKey + _eagLanguage + _eagOauthToken + _eagEditId + _eagFields + _eagAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/List.hs new file mode 100644 index 000000000..575eccdf3 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/List.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the APK-specific localized listings for a specified APK. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsList@. +module Androidpublisher.Edits.Apklistings.List + ( + -- * REST Resource + EditsApklistingsListAPI + + -- * Creating a Request + , editsApklistingsList + , EditsApklistingsList + + -- * Request Lenses + , ealQuotaUser + , ealPrettyPrint + , ealPackageName + , ealApkVersionCode + , ealUserIp + , ealKey + , ealOauthToken + , ealEditId + , ealFields + , ealAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsList@ which the +-- 'EditsApklistingsList' request conforms to. +type EditsApklistingsListAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> Get '[JSON] ApkListingsListResponse + +-- | Lists all the APK-specific localized listings for a specified APK. +-- +-- /See:/ 'editsApklistingsList' smart constructor. +data EditsApklistingsList = EditsApklistingsList + { _ealQuotaUser :: !(Maybe Text) + , _ealPrettyPrint :: !Bool + , _ealPackageName :: !Text + , _ealApkVersionCode :: !Int32 + , _ealUserIp :: !(Maybe Text) + , _ealKey :: !(Maybe Text) + , _ealOauthToken :: !(Maybe Text) + , _ealEditId :: !Text + , _ealFields :: !(Maybe Text) + , _ealAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ealQuotaUser' +-- +-- * 'ealPrettyPrint' +-- +-- * 'ealPackageName' +-- +-- * 'ealApkVersionCode' +-- +-- * 'ealUserIp' +-- +-- * 'ealKey' +-- +-- * 'ealOauthToken' +-- +-- * 'ealEditId' +-- +-- * 'ealFields' +-- +-- * 'ealAlt' +editsApklistingsList + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'editId' + -> EditsApklistingsList +editsApklistingsList pEalPackageName_ pEalApkVersionCode_ pEalEditId_ = + EditsApklistingsList + { _ealQuotaUser = Nothing + , _ealPrettyPrint = True + , _ealPackageName = pEalPackageName_ + , _ealApkVersionCode = pEalApkVersionCode_ + , _ealUserIp = Nothing + , _ealKey = Nothing + , _ealOauthToken = Nothing + , _ealEditId = pEalEditId_ + , _ealFields = Nothing + , _ealAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ealQuotaUser :: Lens' EditsApklistingsList' (Maybe Text) +ealQuotaUser + = lens _ealQuotaUser (\ s a -> s{_ealQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ealPrettyPrint :: Lens' EditsApklistingsList' Bool +ealPrettyPrint + = lens _ealPrettyPrint + (\ s a -> s{_ealPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ealPackageName :: Lens' EditsApklistingsList' Text +ealPackageName + = lens _ealPackageName + (\ s a -> s{_ealPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +ealApkVersionCode :: Lens' EditsApklistingsList' Int32 +ealApkVersionCode + = lens _ealApkVersionCode + (\ s a -> s{_ealApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ealUserIp :: Lens' EditsApklistingsList' (Maybe Text) +ealUserIp + = lens _ealUserIp (\ s a -> s{_ealUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ealKey :: Lens' EditsApklistingsList' (Maybe Text) +ealKey = lens _ealKey (\ s a -> s{_ealKey = a}) + +-- | OAuth 2.0 token for the current user. +ealOauthToken :: Lens' EditsApklistingsList' (Maybe Text) +ealOauthToken + = lens _ealOauthToken + (\ s a -> s{_ealOauthToken = a}) + +-- | Unique identifier for this edit. +ealEditId :: Lens' EditsApklistingsList' Text +ealEditId + = lens _ealEditId (\ s a -> s{_ealEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +ealFields :: Lens' EditsApklistingsList' (Maybe Text) +ealFields + = lens _ealFields (\ s a -> s{_ealFields = a}) + +-- | Data format for the response. +ealAlt :: Lens' EditsApklistingsList' Text +ealAlt = lens _ealAlt (\ s a -> s{_ealAlt = a}) + +instance GoogleRequest EditsApklistingsList' where + type Rs EditsApklistingsList' = + ApkListingsListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsList{..} + = go _ealQuotaUser _ealPrettyPrint _ealPackageName + _ealApkVersionCode + _ealUserIp + _ealKey + _ealOauthToken + _ealEditId + _ealFields + _ealAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Patch.hs new file mode 100644 index 000000000..b9c79948b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Patch.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates or creates the APK-specific localized listing for a specified +-- APK and language code. This method supports patch semantics. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsPatch@. +module Androidpublisher.Edits.Apklistings.Patch + ( + -- * REST Resource + EditsApklistingsPatchAPI + + -- * Creating a Request + , editsApklistingsPatch + , EditsApklistingsPatch + + -- * Request Lenses + , eapQuotaUser + , eapPrettyPrint + , eapPackageName + , eapApkVersionCode + , eapUserIp + , eapKey + , eapLanguage + , eapOauthToken + , eapEditId + , eapFields + , eapAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsPatch@ which the +-- 'EditsApklistingsPatch' request conforms to. +type EditsApklistingsPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> + Capture "language" Text :> Patch '[JSON] ApkListing + +-- | Updates or creates the APK-specific localized listing for a specified +-- APK and language code. This method supports patch semantics. +-- +-- /See:/ 'editsApklistingsPatch' smart constructor. +data EditsApklistingsPatch = EditsApklistingsPatch + { _eapQuotaUser :: !(Maybe Text) + , _eapPrettyPrint :: !Bool + , _eapPackageName :: !Text + , _eapApkVersionCode :: !Int32 + , _eapUserIp :: !(Maybe Text) + , _eapKey :: !(Maybe Text) + , _eapLanguage :: !Text + , _eapOauthToken :: !(Maybe Text) + , _eapEditId :: !Text + , _eapFields :: !(Maybe Text) + , _eapAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eapQuotaUser' +-- +-- * 'eapPrettyPrint' +-- +-- * 'eapPackageName' +-- +-- * 'eapApkVersionCode' +-- +-- * 'eapUserIp' +-- +-- * 'eapKey' +-- +-- * 'eapLanguage' +-- +-- * 'eapOauthToken' +-- +-- * 'eapEditId' +-- +-- * 'eapFields' +-- +-- * 'eapAlt' +editsApklistingsPatch + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsApklistingsPatch +editsApklistingsPatch pEapPackageName_ pEapApkVersionCode_ pEapLanguage_ pEapEditId_ = + EditsApklistingsPatch + { _eapQuotaUser = Nothing + , _eapPrettyPrint = True + , _eapPackageName = pEapPackageName_ + , _eapApkVersionCode = pEapApkVersionCode_ + , _eapUserIp = Nothing + , _eapKey = Nothing + , _eapLanguage = pEapLanguage_ + , _eapOauthToken = Nothing + , _eapEditId = pEapEditId_ + , _eapFields = Nothing + , _eapAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eapQuotaUser :: Lens' EditsApklistingsPatch' (Maybe Text) +eapQuotaUser + = lens _eapQuotaUser (\ s a -> s{_eapQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eapPrettyPrint :: Lens' EditsApklistingsPatch' Bool +eapPrettyPrint + = lens _eapPrettyPrint + (\ s a -> s{_eapPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eapPackageName :: Lens' EditsApklistingsPatch' Text +eapPackageName + = lens _eapPackageName + (\ s a -> s{_eapPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +eapApkVersionCode :: Lens' EditsApklistingsPatch' Int32 +eapApkVersionCode + = lens _eapApkVersionCode + (\ s a -> s{_eapApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eapUserIp :: Lens' EditsApklistingsPatch' (Maybe Text) +eapUserIp + = lens _eapUserIp (\ s a -> s{_eapUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eapKey :: Lens' EditsApklistingsPatch' (Maybe Text) +eapKey = lens _eapKey (\ s a -> s{_eapKey = a}) + +-- | The language code (a BCP-47 language tag) of the APK-specific localized +-- listing to read or modify. For example, to select Austrian German, pass +-- \"de-AT\". +eapLanguage :: Lens' EditsApklistingsPatch' Text +eapLanguage + = lens _eapLanguage (\ s a -> s{_eapLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eapOauthToken :: Lens' EditsApklistingsPatch' (Maybe Text) +eapOauthToken + = lens _eapOauthToken + (\ s a -> s{_eapOauthToken = a}) + +-- | Unique identifier for this edit. +eapEditId :: Lens' EditsApklistingsPatch' Text +eapEditId + = lens _eapEditId (\ s a -> s{_eapEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eapFields :: Lens' EditsApklistingsPatch' (Maybe Text) +eapFields + = lens _eapFields (\ s a -> s{_eapFields = a}) + +-- | Data format for the response. +eapAlt :: Lens' EditsApklistingsPatch' Text +eapAlt = lens _eapAlt (\ s a -> s{_eapAlt = a}) + +instance GoogleRequest EditsApklistingsPatch' where + type Rs EditsApklistingsPatch' = ApkListing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsPatch{..} + = go _eapQuotaUser _eapPrettyPrint _eapPackageName + _eapApkVersionCode + _eapUserIp + _eapKey + _eapLanguage + _eapOauthToken + _eapEditId + _eapFields + _eapAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Update.hs new file mode 100644 index 000000000..781dcc441 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apklistings/Update.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apklistings.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates or creates the APK-specific localized listing for a specified +-- APK and language code. +-- +-- /See:/ for @AndroidpublisherEditsApklistingsUpdate@. +module Androidpublisher.Edits.Apklistings.Update + ( + -- * REST Resource + EditsApklistingsUpdateAPI + + -- * Creating a Request + , editsApklistingsUpdate + , EditsApklistingsUpdate + + -- * Request Lenses + , eauQuotaUser + , eauPrettyPrint + , eauPackageName + , eauApkVersionCode + , eauUserIp + , eauKey + , eauLanguage + , eauOauthToken + , eauEditId + , eauFields + , eauAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApklistingsUpdate@ which the +-- 'EditsApklistingsUpdate' request conforms to. +type EditsApklistingsUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "listings" :> + Capture "language" Text :> Put '[JSON] ApkListing + +-- | Updates or creates the APK-specific localized listing for a specified +-- APK and language code. +-- +-- /See:/ 'editsApklistingsUpdate' smart constructor. +data EditsApklistingsUpdate = EditsApklistingsUpdate + { _eauQuotaUser :: !(Maybe Text) + , _eauPrettyPrint :: !Bool + , _eauPackageName :: !Text + , _eauApkVersionCode :: !Int32 + , _eauUserIp :: !(Maybe Text) + , _eauKey :: !(Maybe Text) + , _eauLanguage :: !Text + , _eauOauthToken :: !(Maybe Text) + , _eauEditId :: !Text + , _eauFields :: !(Maybe Text) + , _eauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApklistingsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eauQuotaUser' +-- +-- * 'eauPrettyPrint' +-- +-- * 'eauPackageName' +-- +-- * 'eauApkVersionCode' +-- +-- * 'eauUserIp' +-- +-- * 'eauKey' +-- +-- * 'eauLanguage' +-- +-- * 'eauOauthToken' +-- +-- * 'eauEditId' +-- +-- * 'eauFields' +-- +-- * 'eauAlt' +editsApklistingsUpdate + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsApklistingsUpdate +editsApklistingsUpdate pEauPackageName_ pEauApkVersionCode_ pEauLanguage_ pEauEditId_ = + EditsApklistingsUpdate + { _eauQuotaUser = Nothing + , _eauPrettyPrint = True + , _eauPackageName = pEauPackageName_ + , _eauApkVersionCode = pEauApkVersionCode_ + , _eauUserIp = Nothing + , _eauKey = Nothing + , _eauLanguage = pEauLanguage_ + , _eauOauthToken = Nothing + , _eauEditId = pEauEditId_ + , _eauFields = Nothing + , _eauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eauQuotaUser :: Lens' EditsApklistingsUpdate' (Maybe Text) +eauQuotaUser + = lens _eauQuotaUser (\ s a -> s{_eauQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eauPrettyPrint :: Lens' EditsApklistingsUpdate' Bool +eauPrettyPrint + = lens _eauPrettyPrint + (\ s a -> s{_eauPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eauPackageName :: Lens' EditsApklistingsUpdate' Text +eauPackageName + = lens _eauPackageName + (\ s a -> s{_eauPackageName = a}) + +-- | The APK version code whose APK-specific listings should be read or +-- modified. +eauApkVersionCode :: Lens' EditsApklistingsUpdate' Int32 +eauApkVersionCode + = lens _eauApkVersionCode + (\ s a -> s{_eauApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eauUserIp :: Lens' EditsApklistingsUpdate' (Maybe Text) +eauUserIp + = lens _eauUserIp (\ s a -> s{_eauUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eauKey :: Lens' EditsApklistingsUpdate' (Maybe Text) +eauKey = lens _eauKey (\ s a -> s{_eauKey = a}) + +-- | The language code (a BCP-47 language tag) of the APK-specific localized +-- listing to read or modify. For example, to select Austrian German, pass +-- \"de-AT\". +eauLanguage :: Lens' EditsApklistingsUpdate' Text +eauLanguage + = lens _eauLanguage (\ s a -> s{_eauLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eauOauthToken :: Lens' EditsApklistingsUpdate' (Maybe Text) +eauOauthToken + = lens _eauOauthToken + (\ s a -> s{_eauOauthToken = a}) + +-- | Unique identifier for this edit. +eauEditId :: Lens' EditsApklistingsUpdate' Text +eauEditId + = lens _eauEditId (\ s a -> s{_eauEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eauFields :: Lens' EditsApklistingsUpdate' (Maybe Text) +eauFields + = lens _eauFields (\ s a -> s{_eauFields = a}) + +-- | Data format for the response. +eauAlt :: Lens' EditsApklistingsUpdate' Text +eauAlt = lens _eauAlt (\ s a -> s{_eauAlt = a}) + +instance GoogleRequest EditsApklistingsUpdate' where + type Rs EditsApklistingsUpdate' = ApkListing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApklistingsUpdate{..} + = go _eauQuotaUser _eauPrettyPrint _eauPackageName + _eauApkVersionCode + _eauUserIp + _eauKey + _eauLanguage + _eauOauthToken + _eauEditId + _eauFields + _eauAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApklistingsUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Addexternallyhosted.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Addexternallyhosted.hs new file mode 100644 index 000000000..79afda935 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Addexternallyhosted.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apks.Addexternallyhosted +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new APK without uploading the APK itself to Google Play, +-- instead hosting the APK at a specified URL. This function is only +-- available to enterprises using Google Play for Work whose application is +-- configured to restrict distribution to the enterprise domain. +-- +-- /See:/ for @AndroidpublisherEditsApksAddexternallyhosted@. +module Androidpublisher.Edits.Apks.Addexternallyhosted + ( + -- * REST Resource + EditsApksAddexternallyhostedAPI + + -- * Creating a Request + , editsApksAddexternallyhosted + , EditsApksAddexternallyhosted + + -- * Request Lenses + , eaaQuotaUser + , eaaPrettyPrint + , eaaPackageName + , eaaUserIp + , eaaKey + , eaaOauthToken + , eaaEditId + , eaaFields + , eaaAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApksAddexternallyhosted@ which the +-- 'EditsApksAddexternallyhosted' request conforms to. +type EditsApksAddexternallyhostedAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + "externallyHosted" :> + Post '[JSON] ApksAddExternallyHostedResponse + +-- | Creates a new APK without uploading the APK itself to Google Play, +-- instead hosting the APK at a specified URL. This function is only +-- available to enterprises using Google Play for Work whose application is +-- configured to restrict distribution to the enterprise domain. +-- +-- /See:/ 'editsApksAddexternallyhosted' smart constructor. +data EditsApksAddexternallyhosted = EditsApksAddexternallyhosted + { _eaaQuotaUser :: !(Maybe Text) + , _eaaPrettyPrint :: !Bool + , _eaaPackageName :: !Text + , _eaaUserIp :: !(Maybe Text) + , _eaaKey :: !(Maybe Text) + , _eaaOauthToken :: !(Maybe Text) + , _eaaEditId :: !Text + , _eaaFields :: !(Maybe Text) + , _eaaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApksAddexternallyhosted'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eaaQuotaUser' +-- +-- * 'eaaPrettyPrint' +-- +-- * 'eaaPackageName' +-- +-- * 'eaaUserIp' +-- +-- * 'eaaKey' +-- +-- * 'eaaOauthToken' +-- +-- * 'eaaEditId' +-- +-- * 'eaaFields' +-- +-- * 'eaaAlt' +editsApksAddexternallyhosted + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsApksAddexternallyhosted +editsApksAddexternallyhosted pEaaPackageName_ pEaaEditId_ = + EditsApksAddexternallyhosted + { _eaaQuotaUser = Nothing + , _eaaPrettyPrint = True + , _eaaPackageName = pEaaPackageName_ + , _eaaUserIp = Nothing + , _eaaKey = Nothing + , _eaaOauthToken = Nothing + , _eaaEditId = pEaaEditId_ + , _eaaFields = Nothing + , _eaaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eaaQuotaUser :: Lens' EditsApksAddexternallyhosted' (Maybe Text) +eaaQuotaUser + = lens _eaaQuotaUser (\ s a -> s{_eaaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eaaPrettyPrint :: Lens' EditsApksAddexternallyhosted' Bool +eaaPrettyPrint + = lens _eaaPrettyPrint + (\ s a -> s{_eaaPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eaaPackageName :: Lens' EditsApksAddexternallyhosted' Text +eaaPackageName + = lens _eaaPackageName + (\ s a -> s{_eaaPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eaaUserIp :: Lens' EditsApksAddexternallyhosted' (Maybe Text) +eaaUserIp + = lens _eaaUserIp (\ s a -> s{_eaaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eaaKey :: Lens' EditsApksAddexternallyhosted' (Maybe Text) +eaaKey = lens _eaaKey (\ s a -> s{_eaaKey = a}) + +-- | OAuth 2.0 token for the current user. +eaaOauthToken :: Lens' EditsApksAddexternallyhosted' (Maybe Text) +eaaOauthToken + = lens _eaaOauthToken + (\ s a -> s{_eaaOauthToken = a}) + +-- | Unique identifier for this edit. +eaaEditId :: Lens' EditsApksAddexternallyhosted' Text +eaaEditId + = lens _eaaEditId (\ s a -> s{_eaaEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eaaFields :: Lens' EditsApksAddexternallyhosted' (Maybe Text) +eaaFields + = lens _eaaFields (\ s a -> s{_eaaFields = a}) + +-- | Data format for the response. +eaaAlt :: Lens' EditsApksAddexternallyhosted' Text +eaaAlt = lens _eaaAlt (\ s a -> s{_eaaAlt = a}) + +instance GoogleRequest EditsApksAddexternallyhosted' + where + type Rs EditsApksAddexternallyhosted' = + ApksAddExternallyHostedResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApksAddexternallyhosted{..} + = go _eaaQuotaUser _eaaPrettyPrint _eaaPackageName + _eaaUserIp + _eaaKey + _eaaOauthToken + _eaaEditId + _eaaFields + _eaaAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsApksAddexternallyhostedAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/List.hs new file mode 100644 index 000000000..2a6817a30 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/List.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherEditsApksList@. +module Androidpublisher.Edits.Apks.List + ( + -- * REST Resource + EditsApksListAPI + + -- * Creating a Request + , editsApksList + , EditsApksList + + -- * Request Lenses + , ealaQuotaUser + , ealaPrettyPrint + , ealaPackageName + , ealaUserIp + , ealaKey + , ealaOauthToken + , ealaEditId + , ealaFields + , ealaAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApksList@ which the +-- 'EditsApksList' request conforms to. +type EditsApksListAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> Get '[JSON] ApksListResponse + +-- +-- /See:/ 'editsApksList' smart constructor. +data EditsApksList = EditsApksList + { _ealaQuotaUser :: !(Maybe Text) + , _ealaPrettyPrint :: !Bool + , _ealaPackageName :: !Text + , _ealaUserIp :: !(Maybe Text) + , _ealaKey :: !(Maybe Text) + , _ealaOauthToken :: !(Maybe Text) + , _ealaEditId :: !Text + , _ealaFields :: !(Maybe Text) + , _ealaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ealaQuotaUser' +-- +-- * 'ealaPrettyPrint' +-- +-- * 'ealaPackageName' +-- +-- * 'ealaUserIp' +-- +-- * 'ealaKey' +-- +-- * 'ealaOauthToken' +-- +-- * 'ealaEditId' +-- +-- * 'ealaFields' +-- +-- * 'ealaAlt' +editsApksList + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsApksList +editsApksList pEalaPackageName_ pEalaEditId_ = + EditsApksList + { _ealaQuotaUser = Nothing + , _ealaPrettyPrint = True + , _ealaPackageName = pEalaPackageName_ + , _ealaUserIp = Nothing + , _ealaKey = Nothing + , _ealaOauthToken = Nothing + , _ealaEditId = pEalaEditId_ + , _ealaFields = Nothing + , _ealaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ealaQuotaUser :: Lens' EditsApksList' (Maybe Text) +ealaQuotaUser + = lens _ealaQuotaUser + (\ s a -> s{_ealaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ealaPrettyPrint :: Lens' EditsApksList' Bool +ealaPrettyPrint + = lens _ealaPrettyPrint + (\ s a -> s{_ealaPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ealaPackageName :: Lens' EditsApksList' Text +ealaPackageName + = lens _ealaPackageName + (\ s a -> s{_ealaPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ealaUserIp :: Lens' EditsApksList' (Maybe Text) +ealaUserIp + = lens _ealaUserIp (\ s a -> s{_ealaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ealaKey :: Lens' EditsApksList' (Maybe Text) +ealaKey = lens _ealaKey (\ s a -> s{_ealaKey = a}) + +-- | OAuth 2.0 token for the current user. +ealaOauthToken :: Lens' EditsApksList' (Maybe Text) +ealaOauthToken + = lens _ealaOauthToken + (\ s a -> s{_ealaOauthToken = a}) + +-- | Unique identifier for this edit. +ealaEditId :: Lens' EditsApksList' Text +ealaEditId + = lens _ealaEditId (\ s a -> s{_ealaEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +ealaFields :: Lens' EditsApksList' (Maybe Text) +ealaFields + = lens _ealaFields (\ s a -> s{_ealaFields = a}) + +-- | Data format for the response. +ealaAlt :: Lens' EditsApksList' Text +ealaAlt = lens _ealaAlt (\ s a -> s{_ealaAlt = a}) + +instance GoogleRequest EditsApksList' where + type Rs EditsApksList' = ApksListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApksList{..} + = go _ealaQuotaUser _ealaPrettyPrint _ealaPackageName + _ealaUserIp + _ealaKey + _ealaOauthToken + _ealaEditId + _ealaFields + _ealaAlt + where go + = clientWithRoute (Proxy :: Proxy EditsApksListAPI) r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Upload.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Upload.hs new file mode 100644 index 000000000..68fcce05e --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Apks/Upload.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Apks.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherEditsApksUpload@. +module Androidpublisher.Edits.Apks.Upload + ( + -- * REST Resource + EditsApksUploadAPI + + -- * Creating a Request + , editsApksUpload + , EditsApksUpload + + -- * Request Lenses + , eauaQuotaUser + , eauaPrettyPrint + , eauaPackageName + , eauaUserIp + , eauaKey + , eauaOauthToken + , eauaEditId + , eauaFields + , eauaAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsApksUpload@ which the +-- 'EditsApksUpload' request conforms to. +type EditsApksUploadAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> "apks" :> Post '[JSON] Apk + +-- +-- /See:/ 'editsApksUpload' smart constructor. +data EditsApksUpload = EditsApksUpload + { _eauaQuotaUser :: !(Maybe Text) + , _eauaPrettyPrint :: !Bool + , _eauaPackageName :: !Text + , _eauaUserIp :: !(Maybe Text) + , _eauaKey :: !(Maybe Text) + , _eauaOauthToken :: !(Maybe Text) + , _eauaEditId :: !Text + , _eauaFields :: !(Maybe Text) + , _eauaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsApksUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eauaQuotaUser' +-- +-- * 'eauaPrettyPrint' +-- +-- * 'eauaPackageName' +-- +-- * 'eauaUserIp' +-- +-- * 'eauaKey' +-- +-- * 'eauaOauthToken' +-- +-- * 'eauaEditId' +-- +-- * 'eauaFields' +-- +-- * 'eauaAlt' +editsApksUpload + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsApksUpload +editsApksUpload pEauaPackageName_ pEauaEditId_ = + EditsApksUpload + { _eauaQuotaUser = Nothing + , _eauaPrettyPrint = True + , _eauaPackageName = pEauaPackageName_ + , _eauaUserIp = Nothing + , _eauaKey = Nothing + , _eauaOauthToken = Nothing + , _eauaEditId = pEauaEditId_ + , _eauaFields = Nothing + , _eauaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eauaQuotaUser :: Lens' EditsApksUpload' (Maybe Text) +eauaQuotaUser + = lens _eauaQuotaUser + (\ s a -> s{_eauaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eauaPrettyPrint :: Lens' EditsApksUpload' Bool +eauaPrettyPrint + = lens _eauaPrettyPrint + (\ s a -> s{_eauaPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eauaPackageName :: Lens' EditsApksUpload' Text +eauaPackageName + = lens _eauaPackageName + (\ s a -> s{_eauaPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eauaUserIp :: Lens' EditsApksUpload' (Maybe Text) +eauaUserIp + = lens _eauaUserIp (\ s a -> s{_eauaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eauaKey :: Lens' EditsApksUpload' (Maybe Text) +eauaKey = lens _eauaKey (\ s a -> s{_eauaKey = a}) + +-- | OAuth 2.0 token for the current user. +eauaOauthToken :: Lens' EditsApksUpload' (Maybe Text) +eauaOauthToken + = lens _eauaOauthToken + (\ s a -> s{_eauaOauthToken = a}) + +-- | Unique identifier for this edit. +eauaEditId :: Lens' EditsApksUpload' Text +eauaEditId + = lens _eauaEditId (\ s a -> s{_eauaEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eauaFields :: Lens' EditsApksUpload' (Maybe Text) +eauaFields + = lens _eauaFields (\ s a -> s{_eauaFields = a}) + +-- | Data format for the response. +eauaAlt :: Lens' EditsApksUpload' Text +eauaAlt = lens _eauaAlt (\ s a -> s{_eauaAlt = a}) + +instance GoogleRequest EditsApksUpload' where + type Rs EditsApksUpload' = Apk + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsApksUpload{..} + = go _eauaQuotaUser _eauaPrettyPrint _eauaPackageName + _eauaUserIp + _eauaKey + _eauaOauthToken + _eauaEditId + _eauaFields + _eauaAlt + where go + = clientWithRoute (Proxy :: Proxy EditsApksUploadAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Commit.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Commit.hs new file mode 100644 index 000000000..a3774c5af --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Commit.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Commit +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Commits\/applies the changes made in this edit back to the app. +-- +-- /See:/ for @AndroidpublisherEditsCommit@. +module Androidpublisher.Edits.Commit + ( + -- * REST Resource + EditsCommitAPI + + -- * Creating a Request + , editsCommit + , EditsCommit + + -- * Request Lenses + , ecQuotaUser + , ecPrettyPrint + , ecPackageName + , ecUserIp + , ecKey + , ecOauthToken + , ecEditId + , ecFields + , ecAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsCommit@ which the +-- 'EditsCommit' request conforms to. +type EditsCommitAPI = + Capture "packageName" Text :> + "edits" :> "{editId}:commit" :> Post '[JSON] AppEdit + +-- | Commits\/applies the changes made in this edit back to the app. +-- +-- /See:/ 'editsCommit' smart constructor. +data EditsCommit = EditsCommit + { _ecQuotaUser :: !(Maybe Text) + , _ecPrettyPrint :: !Bool + , _ecPackageName :: !Text + , _ecUserIp :: !(Maybe Text) + , _ecKey :: !(Maybe Text) + , _ecOauthToken :: !(Maybe Text) + , _ecEditId :: !Text + , _ecFields :: !(Maybe Text) + , _ecAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsCommit'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ecQuotaUser' +-- +-- * 'ecPrettyPrint' +-- +-- * 'ecPackageName' +-- +-- * 'ecUserIp' +-- +-- * 'ecKey' +-- +-- * 'ecOauthToken' +-- +-- * 'ecEditId' +-- +-- * 'ecFields' +-- +-- * 'ecAlt' +editsCommit + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsCommit +editsCommit pEcPackageName_ pEcEditId_ = + EditsCommit + { _ecQuotaUser = Nothing + , _ecPrettyPrint = True + , _ecPackageName = pEcPackageName_ + , _ecUserIp = Nothing + , _ecKey = Nothing + , _ecOauthToken = Nothing + , _ecEditId = pEcEditId_ + , _ecFields = Nothing + , _ecAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ecQuotaUser :: Lens' EditsCommit' (Maybe Text) +ecQuotaUser + = lens _ecQuotaUser (\ s a -> s{_ecQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ecPrettyPrint :: Lens' EditsCommit' Bool +ecPrettyPrint + = lens _ecPrettyPrint + (\ s a -> s{_ecPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ecPackageName :: Lens' EditsCommit' Text +ecPackageName + = lens _ecPackageName + (\ s a -> s{_ecPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ecUserIp :: Lens' EditsCommit' (Maybe Text) +ecUserIp = lens _ecUserIp (\ s a -> s{_ecUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ecKey :: Lens' EditsCommit' (Maybe Text) +ecKey = lens _ecKey (\ s a -> s{_ecKey = a}) + +-- | OAuth 2.0 token for the current user. +ecOauthToken :: Lens' EditsCommit' (Maybe Text) +ecOauthToken + = lens _ecOauthToken (\ s a -> s{_ecOauthToken = a}) + +-- | Unique identifier for this edit. +ecEditId :: Lens' EditsCommit' Text +ecEditId = lens _ecEditId (\ s a -> s{_ecEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +ecFields :: Lens' EditsCommit' (Maybe Text) +ecFields = lens _ecFields (\ s a -> s{_ecFields = a}) + +-- | Data format for the response. +ecAlt :: Lens' EditsCommit' Text +ecAlt = lens _ecAlt (\ s a -> s{_ecAlt = a}) + +instance GoogleRequest EditsCommit' where + type Rs EditsCommit' = AppEdit + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsCommit{..} + = go _ecQuotaUser _ecPrettyPrint _ecPackageName + _ecUserIp + _ecKey + _ecOauthToken + _ecEditId + _ecFields + _ecAlt + where go + = clientWithRoute (Proxy :: Proxy EditsCommitAPI) r u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Delete.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Delete.hs new file mode 100644 index 000000000..4c46b0e1a --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Delete.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an edit for an app. Creating a new edit will automatically +-- delete any of your previous edits so this method need only be called if +-- you want to preemptively abandon an edit. +-- +-- /See:/ for @AndroidpublisherEditsDelete@. +module Androidpublisher.Edits.Delete + ( + -- * REST Resource + EditsDeleteAPI + + -- * Creating a Request + , editsDelete + , EditsDelete + + -- * Request Lenses + , edQuotaUser + , edPrettyPrint + , edPackageName + , edUserIp + , edKey + , edOauthToken + , edEditId + , edFields + , edAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsDelete@ which the +-- 'EditsDelete' request conforms to. +type EditsDeleteAPI = + Capture "packageName" Text :> + "edits" :> Capture "editId" Text :> Delete '[JSON] () + +-- | Deletes an edit for an app. Creating a new edit will automatically +-- delete any of your previous edits so this method need only be called if +-- you want to preemptively abandon an edit. +-- +-- /See:/ 'editsDelete' smart constructor. +data EditsDelete = EditsDelete + { _edQuotaUser :: !(Maybe Text) + , _edPrettyPrint :: !Bool + , _edPackageName :: !Text + , _edUserIp :: !(Maybe Text) + , _edKey :: !(Maybe Text) + , _edOauthToken :: !(Maybe Text) + , _edEditId :: !Text + , _edFields :: !(Maybe Text) + , _edAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edQuotaUser' +-- +-- * 'edPrettyPrint' +-- +-- * 'edPackageName' +-- +-- * 'edUserIp' +-- +-- * 'edKey' +-- +-- * 'edOauthToken' +-- +-- * 'edEditId' +-- +-- * 'edFields' +-- +-- * 'edAlt' +editsDelete + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsDelete +editsDelete pEdPackageName_ pEdEditId_ = + EditsDelete + { _edQuotaUser = Nothing + , _edPrettyPrint = True + , _edPackageName = pEdPackageName_ + , _edUserIp = Nothing + , _edKey = Nothing + , _edOauthToken = Nothing + , _edEditId = pEdEditId_ + , _edFields = Nothing + , _edAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +edQuotaUser :: Lens' EditsDelete' (Maybe Text) +edQuotaUser + = lens _edQuotaUser (\ s a -> s{_edQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +edPrettyPrint :: Lens' EditsDelete' Bool +edPrettyPrint + = lens _edPrettyPrint + (\ s a -> s{_edPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +edPackageName :: Lens' EditsDelete' Text +edPackageName + = lens _edPackageName + (\ s a -> s{_edPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +edUserIp :: Lens' EditsDelete' (Maybe Text) +edUserIp = lens _edUserIp (\ s a -> s{_edUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +edKey :: Lens' EditsDelete' (Maybe Text) +edKey = lens _edKey (\ s a -> s{_edKey = a}) + +-- | OAuth 2.0 token for the current user. +edOauthToken :: Lens' EditsDelete' (Maybe Text) +edOauthToken + = lens _edOauthToken (\ s a -> s{_edOauthToken = a}) + +-- | Unique identifier for this edit. +edEditId :: Lens' EditsDelete' Text +edEditId = lens _edEditId (\ s a -> s{_edEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +edFields :: Lens' EditsDelete' (Maybe Text) +edFields = lens _edFields (\ s a -> s{_edFields = a}) + +-- | Data format for the response. +edAlt :: Lens' EditsDelete' Text +edAlt = lens _edAlt (\ s a -> s{_edAlt = a}) + +instance GoogleRequest EditsDelete' where + type Rs EditsDelete' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsDelete{..} + = go _edQuotaUser _edPrettyPrint _edPackageName + _edUserIp + _edKey + _edOauthToken + _edEditId + _edFields + _edAlt + where go + = clientWithRoute (Proxy :: Proxy EditsDeleteAPI) r u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Get.hs new file mode 100644 index 000000000..0031b83fe --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Get.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Details.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches app details for this edit. This includes the default language +-- and developer support contact information. +-- +-- /See:/ for @AndroidpublisherEditsDetailsGet@. +module Androidpublisher.Edits.Details.Get + ( + -- * REST Resource + EditsDetailsGetAPI + + -- * Creating a Request + , editsDetailsGet + , EditsDetailsGet + + -- * Request Lenses + , edgQuotaUser + , edgPrettyPrint + , edgPackageName + , edgUserIp + , edgKey + , edgOauthToken + , edgEditId + , edgFields + , edgAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsDetailsGet@ which the +-- 'EditsDetailsGet' request conforms to. +type EditsDetailsGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "details" :> Get '[JSON] AppDetails + +-- | Fetches app details for this edit. This includes the default language +-- and developer support contact information. +-- +-- /See:/ 'editsDetailsGet' smart constructor. +data EditsDetailsGet = EditsDetailsGet + { _edgQuotaUser :: !(Maybe Text) + , _edgPrettyPrint :: !Bool + , _edgPackageName :: !Text + , _edgUserIp :: !(Maybe Text) + , _edgKey :: !(Maybe Text) + , _edgOauthToken :: !(Maybe Text) + , _edgEditId :: !Text + , _edgFields :: !(Maybe Text) + , _edgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsDetailsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edgQuotaUser' +-- +-- * 'edgPrettyPrint' +-- +-- * 'edgPackageName' +-- +-- * 'edgUserIp' +-- +-- * 'edgKey' +-- +-- * 'edgOauthToken' +-- +-- * 'edgEditId' +-- +-- * 'edgFields' +-- +-- * 'edgAlt' +editsDetailsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsDetailsGet +editsDetailsGet pEdgPackageName_ pEdgEditId_ = + EditsDetailsGet + { _edgQuotaUser = Nothing + , _edgPrettyPrint = True + , _edgPackageName = pEdgPackageName_ + , _edgUserIp = Nothing + , _edgKey = Nothing + , _edgOauthToken = Nothing + , _edgEditId = pEdgEditId_ + , _edgFields = Nothing + , _edgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +edgQuotaUser :: Lens' EditsDetailsGet' (Maybe Text) +edgQuotaUser + = lens _edgQuotaUser (\ s a -> s{_edgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +edgPrettyPrint :: Lens' EditsDetailsGet' Bool +edgPrettyPrint + = lens _edgPrettyPrint + (\ s a -> s{_edgPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +edgPackageName :: Lens' EditsDetailsGet' Text +edgPackageName + = lens _edgPackageName + (\ s a -> s{_edgPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +edgUserIp :: Lens' EditsDetailsGet' (Maybe Text) +edgUserIp + = lens _edgUserIp (\ s a -> s{_edgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +edgKey :: Lens' EditsDetailsGet' (Maybe Text) +edgKey = lens _edgKey (\ s a -> s{_edgKey = a}) + +-- | OAuth 2.0 token for the current user. +edgOauthToken :: Lens' EditsDetailsGet' (Maybe Text) +edgOauthToken + = lens _edgOauthToken + (\ s a -> s{_edgOauthToken = a}) + +-- | Unique identifier for this edit. +edgEditId :: Lens' EditsDetailsGet' Text +edgEditId + = lens _edgEditId (\ s a -> s{_edgEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +edgFields :: Lens' EditsDetailsGet' (Maybe Text) +edgFields + = lens _edgFields (\ s a -> s{_edgFields = a}) + +-- | Data format for the response. +edgAlt :: Lens' EditsDetailsGet' Text +edgAlt = lens _edgAlt (\ s a -> s{_edgAlt = a}) + +instance GoogleRequest EditsDetailsGet' where + type Rs EditsDetailsGet' = AppDetails + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsDetailsGet{..} + = go _edgQuotaUser _edgPrettyPrint _edgPackageName + _edgUserIp + _edgKey + _edgOauthToken + _edgEditId + _edgFields + _edgAlt + where go + = clientWithRoute (Proxy :: Proxy EditsDetailsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Patch.hs new file mode 100644 index 000000000..26d6ef347 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Patch.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Details.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates app details for this edit. This method supports patch semantics. +-- +-- /See:/ for @AndroidpublisherEditsDetailsPatch@. +module Androidpublisher.Edits.Details.Patch + ( + -- * REST Resource + EditsDetailsPatchAPI + + -- * Creating a Request + , editsDetailsPatch + , EditsDetailsPatch + + -- * Request Lenses + , edpQuotaUser + , edpPrettyPrint + , edpPackageName + , edpUserIp + , edpKey + , edpOauthToken + , edpEditId + , edpFields + , edpAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsDetailsPatch@ which the +-- 'EditsDetailsPatch' request conforms to. +type EditsDetailsPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "details" :> Patch '[JSON] AppDetails + +-- | Updates app details for this edit. This method supports patch semantics. +-- +-- /See:/ 'editsDetailsPatch' smart constructor. +data EditsDetailsPatch = EditsDetailsPatch + { _edpQuotaUser :: !(Maybe Text) + , _edpPrettyPrint :: !Bool + , _edpPackageName :: !Text + , _edpUserIp :: !(Maybe Text) + , _edpKey :: !(Maybe Text) + , _edpOauthToken :: !(Maybe Text) + , _edpEditId :: !Text + , _edpFields :: !(Maybe Text) + , _edpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsDetailsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edpQuotaUser' +-- +-- * 'edpPrettyPrint' +-- +-- * 'edpPackageName' +-- +-- * 'edpUserIp' +-- +-- * 'edpKey' +-- +-- * 'edpOauthToken' +-- +-- * 'edpEditId' +-- +-- * 'edpFields' +-- +-- * 'edpAlt' +editsDetailsPatch + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsDetailsPatch +editsDetailsPatch pEdpPackageName_ pEdpEditId_ = + EditsDetailsPatch + { _edpQuotaUser = Nothing + , _edpPrettyPrint = True + , _edpPackageName = pEdpPackageName_ + , _edpUserIp = Nothing + , _edpKey = Nothing + , _edpOauthToken = Nothing + , _edpEditId = pEdpEditId_ + , _edpFields = Nothing + , _edpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +edpQuotaUser :: Lens' EditsDetailsPatch' (Maybe Text) +edpQuotaUser + = lens _edpQuotaUser (\ s a -> s{_edpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +edpPrettyPrint :: Lens' EditsDetailsPatch' Bool +edpPrettyPrint + = lens _edpPrettyPrint + (\ s a -> s{_edpPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +edpPackageName :: Lens' EditsDetailsPatch' Text +edpPackageName + = lens _edpPackageName + (\ s a -> s{_edpPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +edpUserIp :: Lens' EditsDetailsPatch' (Maybe Text) +edpUserIp + = lens _edpUserIp (\ s a -> s{_edpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +edpKey :: Lens' EditsDetailsPatch' (Maybe Text) +edpKey = lens _edpKey (\ s a -> s{_edpKey = a}) + +-- | OAuth 2.0 token for the current user. +edpOauthToken :: Lens' EditsDetailsPatch' (Maybe Text) +edpOauthToken + = lens _edpOauthToken + (\ s a -> s{_edpOauthToken = a}) + +-- | Unique identifier for this edit. +edpEditId :: Lens' EditsDetailsPatch' Text +edpEditId + = lens _edpEditId (\ s a -> s{_edpEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +edpFields :: Lens' EditsDetailsPatch' (Maybe Text) +edpFields + = lens _edpFields (\ s a -> s{_edpFields = a}) + +-- | Data format for the response. +edpAlt :: Lens' EditsDetailsPatch' Text +edpAlt = lens _edpAlt (\ s a -> s{_edpAlt = a}) + +instance GoogleRequest EditsDetailsPatch' where + type Rs EditsDetailsPatch' = AppDetails + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsDetailsPatch{..} + = go _edpQuotaUser _edpPrettyPrint _edpPackageName + _edpUserIp + _edpKey + _edpOauthToken + _edpEditId + _edpFields + _edpAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsDetailsPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Update.hs new file mode 100644 index 000000000..ed241cd08 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Details/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Details.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates app details for this edit. +-- +-- /See:/ for @AndroidpublisherEditsDetailsUpdate@. +module Androidpublisher.Edits.Details.Update + ( + -- * REST Resource + EditsDetailsUpdateAPI + + -- * Creating a Request + , editsDetailsUpdate + , EditsDetailsUpdate + + -- * Request Lenses + , eduQuotaUser + , eduPrettyPrint + , eduPackageName + , eduUserIp + , eduKey + , eduOauthToken + , eduEditId + , eduFields + , eduAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsDetailsUpdate@ which the +-- 'EditsDetailsUpdate' request conforms to. +type EditsDetailsUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "details" :> Put '[JSON] AppDetails + +-- | Updates app details for this edit. +-- +-- /See:/ 'editsDetailsUpdate' smart constructor. +data EditsDetailsUpdate = EditsDetailsUpdate + { _eduQuotaUser :: !(Maybe Text) + , _eduPrettyPrint :: !Bool + , _eduPackageName :: !Text + , _eduUserIp :: !(Maybe Text) + , _eduKey :: !(Maybe Text) + , _eduOauthToken :: !(Maybe Text) + , _eduEditId :: !Text + , _eduFields :: !(Maybe Text) + , _eduAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsDetailsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eduQuotaUser' +-- +-- * 'eduPrettyPrint' +-- +-- * 'eduPackageName' +-- +-- * 'eduUserIp' +-- +-- * 'eduKey' +-- +-- * 'eduOauthToken' +-- +-- * 'eduEditId' +-- +-- * 'eduFields' +-- +-- * 'eduAlt' +editsDetailsUpdate + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsDetailsUpdate +editsDetailsUpdate pEduPackageName_ pEduEditId_ = + EditsDetailsUpdate + { _eduQuotaUser = Nothing + , _eduPrettyPrint = True + , _eduPackageName = pEduPackageName_ + , _eduUserIp = Nothing + , _eduKey = Nothing + , _eduOauthToken = Nothing + , _eduEditId = pEduEditId_ + , _eduFields = Nothing + , _eduAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eduQuotaUser :: Lens' EditsDetailsUpdate' (Maybe Text) +eduQuotaUser + = lens _eduQuotaUser (\ s a -> s{_eduQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eduPrettyPrint :: Lens' EditsDetailsUpdate' Bool +eduPrettyPrint + = lens _eduPrettyPrint + (\ s a -> s{_eduPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eduPackageName :: Lens' EditsDetailsUpdate' Text +eduPackageName + = lens _eduPackageName + (\ s a -> s{_eduPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eduUserIp :: Lens' EditsDetailsUpdate' (Maybe Text) +eduUserIp + = lens _eduUserIp (\ s a -> s{_eduUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eduKey :: Lens' EditsDetailsUpdate' (Maybe Text) +eduKey = lens _eduKey (\ s a -> s{_eduKey = a}) + +-- | OAuth 2.0 token for the current user. +eduOauthToken :: Lens' EditsDetailsUpdate' (Maybe Text) +eduOauthToken + = lens _eduOauthToken + (\ s a -> s{_eduOauthToken = a}) + +-- | Unique identifier for this edit. +eduEditId :: Lens' EditsDetailsUpdate' Text +eduEditId + = lens _eduEditId (\ s a -> s{_eduEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eduFields :: Lens' EditsDetailsUpdate' (Maybe Text) +eduFields + = lens _eduFields (\ s a -> s{_eduFields = a}) + +-- | Data format for the response. +eduAlt :: Lens' EditsDetailsUpdate' Text +eduAlt = lens _eduAlt (\ s a -> s{_eduAlt = a}) + +instance GoogleRequest EditsDetailsUpdate' where + type Rs EditsDetailsUpdate' = AppDetails + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsDetailsUpdate{..} + = go _eduQuotaUser _eduPrettyPrint _eduPackageName + _eduUserIp + _eduKey + _eduOauthToken + _eduEditId + _eduFields + _eduAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsDetailsUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Get.hs new file mode 100644 index 000000000..05d2dd56f --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Get.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches the Expansion File configuration for the APK specified. +-- +-- /See:/ for @AndroidpublisherEditsExpansionfilesGet@. +module Androidpublisher.Edits.Expansionfiles.Get + ( + -- * REST Resource + EditsExpansionfilesGetAPI + + -- * Creating a Request + , editsExpansionfilesGet + , EditsExpansionfilesGet + + -- * Request Lenses + , eegQuotaUser + , eegPrettyPrint + , eegPackageName + , eegApkVersionCode + , eegUserIp + , eegKey + , eegExpansionFileType + , eegOauthToken + , eegEditId + , eegFields + , eegAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsExpansionfilesGet@ which the +-- 'EditsExpansionfilesGet' request conforms to. +type EditsExpansionfilesGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "expansionFiles" :> + Capture "expansionFileType" Text :> + Get '[JSON] ExpansionFile + +-- | Fetches the Expansion File configuration for the APK specified. +-- +-- /See:/ 'editsExpansionfilesGet' smart constructor. +data EditsExpansionfilesGet = EditsExpansionfilesGet + { _eegQuotaUser :: !(Maybe Text) + , _eegPrettyPrint :: !Bool + , _eegPackageName :: !Text + , _eegApkVersionCode :: !Int32 + , _eegUserIp :: !(Maybe Text) + , _eegKey :: !(Maybe Text) + , _eegExpansionFileType :: !Text + , _eegOauthToken :: !(Maybe Text) + , _eegEditId :: !Text + , _eegFields :: !(Maybe Text) + , _eegAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsExpansionfilesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eegQuotaUser' +-- +-- * 'eegPrettyPrint' +-- +-- * 'eegPackageName' +-- +-- * 'eegApkVersionCode' +-- +-- * 'eegUserIp' +-- +-- * 'eegKey' +-- +-- * 'eegExpansionFileType' +-- +-- * 'eegOauthToken' +-- +-- * 'eegEditId' +-- +-- * 'eegFields' +-- +-- * 'eegAlt' +editsExpansionfilesGet + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'expansionFileType' + -> Text -- ^ 'editId' + -> EditsExpansionfilesGet +editsExpansionfilesGet pEegPackageName_ pEegApkVersionCode_ pEegExpansionFileType_ pEegEditId_ = + EditsExpansionfilesGet + { _eegQuotaUser = Nothing + , _eegPrettyPrint = True + , _eegPackageName = pEegPackageName_ + , _eegApkVersionCode = pEegApkVersionCode_ + , _eegUserIp = Nothing + , _eegKey = Nothing + , _eegExpansionFileType = pEegExpansionFileType_ + , _eegOauthToken = Nothing + , _eegEditId = pEegEditId_ + , _eegFields = Nothing + , _eegAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eegQuotaUser :: Lens' EditsExpansionfilesGet' (Maybe Text) +eegQuotaUser + = lens _eegQuotaUser (\ s a -> s{_eegQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eegPrettyPrint :: Lens' EditsExpansionfilesGet' Bool +eegPrettyPrint + = lens _eegPrettyPrint + (\ s a -> s{_eegPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eegPackageName :: Lens' EditsExpansionfilesGet' Text +eegPackageName + = lens _eegPackageName + (\ s a -> s{_eegPackageName = a}) + +-- | The version code of the APK whose Expansion File configuration is being +-- read or modified. +eegApkVersionCode :: Lens' EditsExpansionfilesGet' Int32 +eegApkVersionCode + = lens _eegApkVersionCode + (\ s a -> s{_eegApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eegUserIp :: Lens' EditsExpansionfilesGet' (Maybe Text) +eegUserIp + = lens _eegUserIp (\ s a -> s{_eegUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eegKey :: Lens' EditsExpansionfilesGet' (Maybe Text) +eegKey = lens _eegKey (\ s a -> s{_eegKey = a}) + +eegExpansionFileType :: Lens' EditsExpansionfilesGet' Text +eegExpansionFileType + = lens _eegExpansionFileType + (\ s a -> s{_eegExpansionFileType = a}) + +-- | OAuth 2.0 token for the current user. +eegOauthToken :: Lens' EditsExpansionfilesGet' (Maybe Text) +eegOauthToken + = lens _eegOauthToken + (\ s a -> s{_eegOauthToken = a}) + +-- | Unique identifier for this edit. +eegEditId :: Lens' EditsExpansionfilesGet' Text +eegEditId + = lens _eegEditId (\ s a -> s{_eegEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eegFields :: Lens' EditsExpansionfilesGet' (Maybe Text) +eegFields + = lens _eegFields (\ s a -> s{_eegFields = a}) + +-- | Data format for the response. +eegAlt :: Lens' EditsExpansionfilesGet' Text +eegAlt = lens _eegAlt (\ s a -> s{_eegAlt = a}) + +instance GoogleRequest EditsExpansionfilesGet' where + type Rs EditsExpansionfilesGet' = ExpansionFile + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsExpansionfilesGet{..} + = go _eegQuotaUser _eegPrettyPrint _eegPackageName + _eegApkVersionCode + _eegUserIp + _eegKey + _eegExpansionFileType + _eegOauthToken + _eegEditId + _eegFields + _eegAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsExpansionfilesGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Patch.hs new file mode 100644 index 000000000..6dc37dfe3 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Patch.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the APK\'s Expansion File configuration to reference another +-- APK\'s Expansion Files. To add a new Expansion File use the Upload +-- method. This method supports patch semantics. +-- +-- /See:/ for @AndroidpublisherEditsExpansionfilesPatch@. +module Androidpublisher.Edits.Expansionfiles.Patch + ( + -- * REST Resource + EditsExpansionfilesPatchAPI + + -- * Creating a Request + , editsExpansionfilesPatch + , EditsExpansionfilesPatch + + -- * Request Lenses + , eepQuotaUser + , eepPrettyPrint + , eepPackageName + , eepApkVersionCode + , eepUserIp + , eepKey + , eepExpansionFileType + , eepOauthToken + , eepEditId + , eepFields + , eepAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsExpansionfilesPatch@ which the +-- 'EditsExpansionfilesPatch' request conforms to. +type EditsExpansionfilesPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "expansionFiles" :> + Capture "expansionFileType" Text :> + Patch '[JSON] ExpansionFile + +-- | Updates the APK\'s Expansion File configuration to reference another +-- APK\'s Expansion Files. To add a new Expansion File use the Upload +-- method. This method supports patch semantics. +-- +-- /See:/ 'editsExpansionfilesPatch' smart constructor. +data EditsExpansionfilesPatch = EditsExpansionfilesPatch + { _eepQuotaUser :: !(Maybe Text) + , _eepPrettyPrint :: !Bool + , _eepPackageName :: !Text + , _eepApkVersionCode :: !Int32 + , _eepUserIp :: !(Maybe Text) + , _eepKey :: !(Maybe Text) + , _eepExpansionFileType :: !Text + , _eepOauthToken :: !(Maybe Text) + , _eepEditId :: !Text + , _eepFields :: !(Maybe Text) + , _eepAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsExpansionfilesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eepQuotaUser' +-- +-- * 'eepPrettyPrint' +-- +-- * 'eepPackageName' +-- +-- * 'eepApkVersionCode' +-- +-- * 'eepUserIp' +-- +-- * 'eepKey' +-- +-- * 'eepExpansionFileType' +-- +-- * 'eepOauthToken' +-- +-- * 'eepEditId' +-- +-- * 'eepFields' +-- +-- * 'eepAlt' +editsExpansionfilesPatch + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'expansionFileType' + -> Text -- ^ 'editId' + -> EditsExpansionfilesPatch +editsExpansionfilesPatch pEepPackageName_ pEepApkVersionCode_ pEepExpansionFileType_ pEepEditId_ = + EditsExpansionfilesPatch + { _eepQuotaUser = Nothing + , _eepPrettyPrint = True + , _eepPackageName = pEepPackageName_ + , _eepApkVersionCode = pEepApkVersionCode_ + , _eepUserIp = Nothing + , _eepKey = Nothing + , _eepExpansionFileType = pEepExpansionFileType_ + , _eepOauthToken = Nothing + , _eepEditId = pEepEditId_ + , _eepFields = Nothing + , _eepAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eepQuotaUser :: Lens' EditsExpansionfilesPatch' (Maybe Text) +eepQuotaUser + = lens _eepQuotaUser (\ s a -> s{_eepQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eepPrettyPrint :: Lens' EditsExpansionfilesPatch' Bool +eepPrettyPrint + = lens _eepPrettyPrint + (\ s a -> s{_eepPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eepPackageName :: Lens' EditsExpansionfilesPatch' Text +eepPackageName + = lens _eepPackageName + (\ s a -> s{_eepPackageName = a}) + +-- | The version code of the APK whose Expansion File configuration is being +-- read or modified. +eepApkVersionCode :: Lens' EditsExpansionfilesPatch' Int32 +eepApkVersionCode + = lens _eepApkVersionCode + (\ s a -> s{_eepApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eepUserIp :: Lens' EditsExpansionfilesPatch' (Maybe Text) +eepUserIp + = lens _eepUserIp (\ s a -> s{_eepUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eepKey :: Lens' EditsExpansionfilesPatch' (Maybe Text) +eepKey = lens _eepKey (\ s a -> s{_eepKey = a}) + +eepExpansionFileType :: Lens' EditsExpansionfilesPatch' Text +eepExpansionFileType + = lens _eepExpansionFileType + (\ s a -> s{_eepExpansionFileType = a}) + +-- | OAuth 2.0 token for the current user. +eepOauthToken :: Lens' EditsExpansionfilesPatch' (Maybe Text) +eepOauthToken + = lens _eepOauthToken + (\ s a -> s{_eepOauthToken = a}) + +-- | Unique identifier for this edit. +eepEditId :: Lens' EditsExpansionfilesPatch' Text +eepEditId + = lens _eepEditId (\ s a -> s{_eepEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eepFields :: Lens' EditsExpansionfilesPatch' (Maybe Text) +eepFields + = lens _eepFields (\ s a -> s{_eepFields = a}) + +-- | Data format for the response. +eepAlt :: Lens' EditsExpansionfilesPatch' Text +eepAlt = lens _eepAlt (\ s a -> s{_eepAlt = a}) + +instance GoogleRequest EditsExpansionfilesPatch' + where + type Rs EditsExpansionfilesPatch' = ExpansionFile + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsExpansionfilesPatch{..} + = go _eepQuotaUser _eepPrettyPrint _eepPackageName + _eepApkVersionCode + _eepUserIp + _eepKey + _eepExpansionFileType + _eepOauthToken + _eepEditId + _eepFields + _eepAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsExpansionfilesPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Update.hs new file mode 100644 index 000000000..5234f69de --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Update.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the APK\'s Expansion File configuration to reference another +-- APK\'s Expansion Files. To add a new Expansion File use the Upload +-- method. +-- +-- /See:/ for @AndroidpublisherEditsExpansionfilesUpdate@. +module Androidpublisher.Edits.Expansionfiles.Update + ( + -- * REST Resource + EditsExpansionfilesUpdateAPI + + -- * Creating a Request + , editsExpansionfilesUpdate + , EditsExpansionfilesUpdate + + -- * Request Lenses + , ediQuotaUser + , ediPrettyPrint + , ediPackageName + , ediApkVersionCode + , ediUserIp + , ediKey + , ediExpansionFileType + , ediOauthToken + , ediEditId + , ediFields + , ediAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsExpansionfilesUpdate@ which the +-- 'EditsExpansionfilesUpdate' request conforms to. +type EditsExpansionfilesUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "expansionFiles" :> + Capture "expansionFileType" Text :> + Put '[JSON] ExpansionFile + +-- | Updates the APK\'s Expansion File configuration to reference another +-- APK\'s Expansion Files. To add a new Expansion File use the Upload +-- method. +-- +-- /See:/ 'editsExpansionfilesUpdate' smart constructor. +data EditsExpansionfilesUpdate = EditsExpansionfilesUpdate + { _ediQuotaUser :: !(Maybe Text) + , _ediPrettyPrint :: !Bool + , _ediPackageName :: !Text + , _ediApkVersionCode :: !Int32 + , _ediUserIp :: !(Maybe Text) + , _ediKey :: !(Maybe Text) + , _ediExpansionFileType :: !Text + , _ediOauthToken :: !(Maybe Text) + , _ediEditId :: !Text + , _ediFields :: !(Maybe Text) + , _ediAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsExpansionfilesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ediQuotaUser' +-- +-- * 'ediPrettyPrint' +-- +-- * 'ediPackageName' +-- +-- * 'ediApkVersionCode' +-- +-- * 'ediUserIp' +-- +-- * 'ediKey' +-- +-- * 'ediExpansionFileType' +-- +-- * 'ediOauthToken' +-- +-- * 'ediEditId' +-- +-- * 'ediFields' +-- +-- * 'ediAlt' +editsExpansionfilesUpdate + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'expansionFileType' + -> Text -- ^ 'editId' + -> EditsExpansionfilesUpdate +editsExpansionfilesUpdate pEdiPackageName_ pEdiApkVersionCode_ pEdiExpansionFileType_ pEdiEditId_ = + EditsExpansionfilesUpdate + { _ediQuotaUser = Nothing + , _ediPrettyPrint = True + , _ediPackageName = pEdiPackageName_ + , _ediApkVersionCode = pEdiApkVersionCode_ + , _ediUserIp = Nothing + , _ediKey = Nothing + , _ediExpansionFileType = pEdiExpansionFileType_ + , _ediOauthToken = Nothing + , _ediEditId = pEdiEditId_ + , _ediFields = Nothing + , _ediAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ediQuotaUser :: Lens' EditsExpansionfilesUpdate' (Maybe Text) +ediQuotaUser + = lens _ediQuotaUser (\ s a -> s{_ediQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ediPrettyPrint :: Lens' EditsExpansionfilesUpdate' Bool +ediPrettyPrint + = lens _ediPrettyPrint + (\ s a -> s{_ediPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ediPackageName :: Lens' EditsExpansionfilesUpdate' Text +ediPackageName + = lens _ediPackageName + (\ s a -> s{_ediPackageName = a}) + +-- | The version code of the APK whose Expansion File configuration is being +-- read or modified. +ediApkVersionCode :: Lens' EditsExpansionfilesUpdate' Int32 +ediApkVersionCode + = lens _ediApkVersionCode + (\ s a -> s{_ediApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ediUserIp :: Lens' EditsExpansionfilesUpdate' (Maybe Text) +ediUserIp + = lens _ediUserIp (\ s a -> s{_ediUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ediKey :: Lens' EditsExpansionfilesUpdate' (Maybe Text) +ediKey = lens _ediKey (\ s a -> s{_ediKey = a}) + +ediExpansionFileType :: Lens' EditsExpansionfilesUpdate' Text +ediExpansionFileType + = lens _ediExpansionFileType + (\ s a -> s{_ediExpansionFileType = a}) + +-- | OAuth 2.0 token for the current user. +ediOauthToken :: Lens' EditsExpansionfilesUpdate' (Maybe Text) +ediOauthToken + = lens _ediOauthToken + (\ s a -> s{_ediOauthToken = a}) + +-- | Unique identifier for this edit. +ediEditId :: Lens' EditsExpansionfilesUpdate' Text +ediEditId + = lens _ediEditId (\ s a -> s{_ediEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +ediFields :: Lens' EditsExpansionfilesUpdate' (Maybe Text) +ediFields + = lens _ediFields (\ s a -> s{_ediFields = a}) + +-- | Data format for the response. +ediAlt :: Lens' EditsExpansionfilesUpdate' Text +ediAlt = lens _ediAlt (\ s a -> s{_ediAlt = a}) + +instance GoogleRequest EditsExpansionfilesUpdate' + where + type Rs EditsExpansionfilesUpdate' = ExpansionFile + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsExpansionfilesUpdate{..} + = go _ediQuotaUser _ediPrettyPrint _ediPackageName + _ediApkVersionCode + _ediUserIp + _ediKey + _ediExpansionFileType + _ediOauthToken + _ediEditId + _ediFields + _ediAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsExpansionfilesUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Upload.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Upload.hs new file mode 100644 index 000000000..c0b78f716 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Expansionfiles/Upload.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads and attaches a new Expansion File to the APK specified. +-- +-- /See:/ for @AndroidpublisherEditsExpansionfilesUpload@. +module Androidpublisher.Edits.Expansionfiles.Upload + ( + -- * REST Resource + EditsExpansionfilesUploadAPI + + -- * Creating a Request + , editsExpansionfilesUpload + , EditsExpansionfilesUpload + + -- * Request Lenses + , eeuQuotaUser + , eeuPrettyPrint + , eeuPackageName + , eeuApkVersionCode + , eeuUserIp + , eeuKey + , eeuExpansionFileType + , eeuOauthToken + , eeuEditId + , eeuFields + , eeuAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsExpansionfilesUpload@ which the +-- 'EditsExpansionfilesUpload' request conforms to. +type EditsExpansionfilesUploadAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "apks" :> + Capture "apkVersionCode" Int32 :> + "expansionFiles" :> + Capture "expansionFileType" Text :> + Post '[JSON] ExpansionFilesUploadResponse + +-- | Uploads and attaches a new Expansion File to the APK specified. +-- +-- /See:/ 'editsExpansionfilesUpload' smart constructor. +data EditsExpansionfilesUpload = EditsExpansionfilesUpload + { _eeuQuotaUser :: !(Maybe Text) + , _eeuPrettyPrint :: !Bool + , _eeuPackageName :: !Text + , _eeuApkVersionCode :: !Int32 + , _eeuUserIp :: !(Maybe Text) + , _eeuKey :: !(Maybe Text) + , _eeuExpansionFileType :: !Text + , _eeuOauthToken :: !(Maybe Text) + , _eeuEditId :: !Text + , _eeuFields :: !(Maybe Text) + , _eeuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsExpansionfilesUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eeuQuotaUser' +-- +-- * 'eeuPrettyPrint' +-- +-- * 'eeuPackageName' +-- +-- * 'eeuApkVersionCode' +-- +-- * 'eeuUserIp' +-- +-- * 'eeuKey' +-- +-- * 'eeuExpansionFileType' +-- +-- * 'eeuOauthToken' +-- +-- * 'eeuEditId' +-- +-- * 'eeuFields' +-- +-- * 'eeuAlt' +editsExpansionfilesUpload + :: Text -- ^ 'packageName' + -> Int32 -- ^ 'apkVersionCode' + -> Text -- ^ 'expansionFileType' + -> Text -- ^ 'editId' + -> EditsExpansionfilesUpload +editsExpansionfilesUpload pEeuPackageName_ pEeuApkVersionCode_ pEeuExpansionFileType_ pEeuEditId_ = + EditsExpansionfilesUpload + { _eeuQuotaUser = Nothing + , _eeuPrettyPrint = True + , _eeuPackageName = pEeuPackageName_ + , _eeuApkVersionCode = pEeuApkVersionCode_ + , _eeuUserIp = Nothing + , _eeuKey = Nothing + , _eeuExpansionFileType = pEeuExpansionFileType_ + , _eeuOauthToken = Nothing + , _eeuEditId = pEeuEditId_ + , _eeuFields = Nothing + , _eeuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eeuQuotaUser :: Lens' EditsExpansionfilesUpload' (Maybe Text) +eeuQuotaUser + = lens _eeuQuotaUser (\ s a -> s{_eeuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eeuPrettyPrint :: Lens' EditsExpansionfilesUpload' Bool +eeuPrettyPrint + = lens _eeuPrettyPrint + (\ s a -> s{_eeuPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eeuPackageName :: Lens' EditsExpansionfilesUpload' Text +eeuPackageName + = lens _eeuPackageName + (\ s a -> s{_eeuPackageName = a}) + +-- | The version code of the APK whose Expansion File configuration is being +-- read or modified. +eeuApkVersionCode :: Lens' EditsExpansionfilesUpload' Int32 +eeuApkVersionCode + = lens _eeuApkVersionCode + (\ s a -> s{_eeuApkVersionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eeuUserIp :: Lens' EditsExpansionfilesUpload' (Maybe Text) +eeuUserIp + = lens _eeuUserIp (\ s a -> s{_eeuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eeuKey :: Lens' EditsExpansionfilesUpload' (Maybe Text) +eeuKey = lens _eeuKey (\ s a -> s{_eeuKey = a}) + +eeuExpansionFileType :: Lens' EditsExpansionfilesUpload' Text +eeuExpansionFileType + = lens _eeuExpansionFileType + (\ s a -> s{_eeuExpansionFileType = a}) + +-- | OAuth 2.0 token for the current user. +eeuOauthToken :: Lens' EditsExpansionfilesUpload' (Maybe Text) +eeuOauthToken + = lens _eeuOauthToken + (\ s a -> s{_eeuOauthToken = a}) + +-- | Unique identifier for this edit. +eeuEditId :: Lens' EditsExpansionfilesUpload' Text +eeuEditId + = lens _eeuEditId (\ s a -> s{_eeuEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eeuFields :: Lens' EditsExpansionfilesUpload' (Maybe Text) +eeuFields + = lens _eeuFields (\ s a -> s{_eeuFields = a}) + +-- | Data format for the response. +eeuAlt :: Lens' EditsExpansionfilesUpload' Text +eeuAlt = lens _eeuAlt (\ s a -> s{_eeuAlt = a}) + +instance GoogleRequest EditsExpansionfilesUpload' + where + type Rs EditsExpansionfilesUpload' = + ExpansionFilesUploadResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsExpansionfilesUpload{..} + = go _eeuQuotaUser _eeuPrettyPrint _eeuPackageName + _eeuApkVersionCode + _eeuUserIp + _eeuKey + _eeuExpansionFileType + _eeuOauthToken + _eeuEditId + _eeuFields + _eeuAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsExpansionfilesUploadAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Get.hs new file mode 100644 index 000000000..af291f82e --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns information about the edit specified. Calls will fail if the +-- edit is no long active (e.g. has been deleted, superseded or expired). +-- +-- /See:/ for @AndroidpublisherEditsGet@. +module Androidpublisher.Edits.Get + ( + -- * REST Resource + EditsGetAPI + + -- * Creating a Request + , editsGet + , EditsGet + + -- * Request Lenses + , egQuotaUser + , egPrettyPrint + , egPackageName + , egUserIp + , egKey + , egOauthToken + , egEditId + , egFields + , egAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsGet@ which the +-- 'EditsGet' request conforms to. +type EditsGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> Get '[JSON] AppEdit + +-- | Returns information about the edit specified. Calls will fail if the +-- edit is no long active (e.g. has been deleted, superseded or expired). +-- +-- /See:/ 'editsGet' smart constructor. +data EditsGet = EditsGet + { _egQuotaUser :: !(Maybe Text) + , _egPrettyPrint :: !Bool + , _egPackageName :: !Text + , _egUserIp :: !(Maybe Text) + , _egKey :: !(Maybe Text) + , _egOauthToken :: !(Maybe Text) + , _egEditId :: !Text + , _egFields :: !(Maybe Text) + , _egAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'egQuotaUser' +-- +-- * 'egPrettyPrint' +-- +-- * 'egPackageName' +-- +-- * 'egUserIp' +-- +-- * 'egKey' +-- +-- * 'egOauthToken' +-- +-- * 'egEditId' +-- +-- * 'egFields' +-- +-- * 'egAlt' +editsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsGet +editsGet pEgPackageName_ pEgEditId_ = + EditsGet + { _egQuotaUser = Nothing + , _egPrettyPrint = True + , _egPackageName = pEgPackageName_ + , _egUserIp = Nothing + , _egKey = Nothing + , _egOauthToken = Nothing + , _egEditId = pEgEditId_ + , _egFields = Nothing + , _egAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +egQuotaUser :: Lens' EditsGet' (Maybe Text) +egQuotaUser + = lens _egQuotaUser (\ s a -> s{_egQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +egPrettyPrint :: Lens' EditsGet' Bool +egPrettyPrint + = lens _egPrettyPrint + (\ s a -> s{_egPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +egPackageName :: Lens' EditsGet' Text +egPackageName + = lens _egPackageName + (\ s a -> s{_egPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +egUserIp :: Lens' EditsGet' (Maybe Text) +egUserIp = lens _egUserIp (\ s a -> s{_egUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +egKey :: Lens' EditsGet' (Maybe Text) +egKey = lens _egKey (\ s a -> s{_egKey = a}) + +-- | OAuth 2.0 token for the current user. +egOauthToken :: Lens' EditsGet' (Maybe Text) +egOauthToken + = lens _egOauthToken (\ s a -> s{_egOauthToken = a}) + +-- | Unique identifier for this edit. +egEditId :: Lens' EditsGet' Text +egEditId = lens _egEditId (\ s a -> s{_egEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +egFields :: Lens' EditsGet' (Maybe Text) +egFields = lens _egFields (\ s a -> s{_egFields = a}) + +-- | Data format for the response. +egAlt :: Lens' EditsGet' Text +egAlt = lens _egAlt (\ s a -> s{_egAlt = a}) + +instance GoogleRequest EditsGet' where + type Rs EditsGet' = AppEdit + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsGet{..} + = go _egQuotaUser _egPrettyPrint _egPackageName + _egUserIp + _egKey + _egOauthToken + _egEditId + _egFields + _egAlt + where go + = clientWithRoute (Proxy :: Proxy EditsGetAPI) r u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Delete.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Delete.hs new file mode 100644 index 000000000..4af8b8be0 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Delete.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Images.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the image (specified by id) from the edit. +-- +-- /See:/ for @AndroidpublisherEditsImagesDelete@. +module Androidpublisher.Edits.Images.Delete + ( + -- * REST Resource + EditsImagesDeleteAPI + + -- * Creating a Request + , editsImagesDelete + , EditsImagesDelete + + -- * Request Lenses + , eQuotaUser + , ePrettyPrint + , ePackageName + , eUserIp + , eImageType + , eKey + , eImageId + , eLanguage + , eOauthToken + , eEditId + , eFields + , eAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsImagesDelete@ which the +-- 'EditsImagesDelete' request conforms to. +type EditsImagesDeleteAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> + Capture "imageType" Text :> + Capture "imageId" Text :> Delete '[JSON] () + +-- | Deletes the image (specified by id) from the edit. +-- +-- /See:/ 'editsImagesDelete' smart constructor. +data EditsImagesDelete = EditsImagesDelete + { _eQuotaUser :: !(Maybe Text) + , _ePrettyPrint :: !Bool + , _ePackageName :: !Text + , _eUserIp :: !(Maybe Text) + , _eImageType :: !Text + , _eKey :: !(Maybe Text) + , _eImageId :: !Text + , _eLanguage :: !Text + , _eOauthToken :: !(Maybe Text) + , _eEditId :: !Text + , _eFields :: !(Maybe Text) + , _eAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsImagesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eQuotaUser' +-- +-- * 'ePrettyPrint' +-- +-- * 'ePackageName' +-- +-- * 'eUserIp' +-- +-- * 'eImageType' +-- +-- * 'eKey' +-- +-- * 'eImageId' +-- +-- * 'eLanguage' +-- +-- * 'eOauthToken' +-- +-- * 'eEditId' +-- +-- * 'eFields' +-- +-- * 'eAlt' +editsImagesDelete + :: Text -- ^ 'packageName' + -> Text -- ^ 'imageType' + -> Text -- ^ 'imageId' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsImagesDelete +editsImagesDelete pEPackageName_ pEImageType_ pEImageId_ pELanguage_ pEEditId_ = + EditsImagesDelete + { _eQuotaUser = Nothing + , _ePrettyPrint = True + , _ePackageName = pEPackageName_ + , _eUserIp = Nothing + , _eImageType = pEImageType_ + , _eKey = Nothing + , _eImageId = pEImageId_ + , _eLanguage = pELanguage_ + , _eOauthToken = Nothing + , _eEditId = pEEditId_ + , _eFields = Nothing + , _eAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eQuotaUser :: Lens' EditsImagesDelete' (Maybe Text) +eQuotaUser + = lens _eQuotaUser (\ s a -> s{_eQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ePrettyPrint :: Lens' EditsImagesDelete' Bool +ePrettyPrint + = lens _ePrettyPrint (\ s a -> s{_ePrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ePackageName :: Lens' EditsImagesDelete' Text +ePackageName + = lens _ePackageName (\ s a -> s{_ePackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eUserIp :: Lens' EditsImagesDelete' (Maybe Text) +eUserIp = lens _eUserIp (\ s a -> s{_eUserIp = a}) + +eImageType :: Lens' EditsImagesDelete' Text +eImageType + = lens _eImageType (\ s a -> s{_eImageType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eKey :: Lens' EditsImagesDelete' (Maybe Text) +eKey = lens _eKey (\ s a -> s{_eKey = a}) + +-- | Unique identifier an image within the set of images attached to this +-- edit. +eImageId :: Lens' EditsImagesDelete' Text +eImageId = lens _eImageId (\ s a -> s{_eImageId = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing whose +-- images are to read or modified. For example, to select Austrian German, +-- pass \"de-AT\". +eLanguage :: Lens' EditsImagesDelete' Text +eLanguage + = lens _eLanguage (\ s a -> s{_eLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eOauthToken :: Lens' EditsImagesDelete' (Maybe Text) +eOauthToken + = lens _eOauthToken (\ s a -> s{_eOauthToken = a}) + +-- | Unique identifier for this edit. +eEditId :: Lens' EditsImagesDelete' Text +eEditId = lens _eEditId (\ s a -> s{_eEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eFields :: Lens' EditsImagesDelete' (Maybe Text) +eFields = lens _eFields (\ s a -> s{_eFields = a}) + +-- | Data format for the response. +eAlt :: Lens' EditsImagesDelete' Text +eAlt = lens _eAlt (\ s a -> s{_eAlt = a}) + +instance GoogleRequest EditsImagesDelete' where + type Rs EditsImagesDelete' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsImagesDelete{..} + = go _eQuotaUser _ePrettyPrint _ePackageName _eUserIp + _eImageType + _eKey + _eImageId + _eLanguage + _eOauthToken + _eEditId + _eFields + _eAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsImagesDeleteAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Deleteall.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Deleteall.hs new file mode 100644 index 000000000..dbf584f4a --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Deleteall.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Images.Deleteall +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes all images for the specified language and image type. +-- +-- /See:/ for @AndroidpublisherEditsImagesDeleteall@. +module Androidpublisher.Edits.Images.Deleteall + ( + -- * REST Resource + EditsImagesDeleteallAPI + + -- * Creating a Request + , editsImagesDeleteall + , EditsImagesDeleteall + + -- * Request Lenses + , eidQuotaUser + , eidPrettyPrint + , eidPackageName + , eidUserIp + , eidImageType + , eidKey + , eidLanguage + , eidOauthToken + , eidEditId + , eidFields + , eidAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsImagesDeleteall@ which the +-- 'EditsImagesDeleteall' request conforms to. +type EditsImagesDeleteallAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> + Capture "imageType" Text :> + Delete '[JSON] ImagesDeleteAllResponse + +-- | Deletes all images for the specified language and image type. +-- +-- /See:/ 'editsImagesDeleteall' smart constructor. +data EditsImagesDeleteall = EditsImagesDeleteall + { _eidQuotaUser :: !(Maybe Text) + , _eidPrettyPrint :: !Bool + , _eidPackageName :: !Text + , _eidUserIp :: !(Maybe Text) + , _eidImageType :: !Text + , _eidKey :: !(Maybe Text) + , _eidLanguage :: !Text + , _eidOauthToken :: !(Maybe Text) + , _eidEditId :: !Text + , _eidFields :: !(Maybe Text) + , _eidAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsImagesDeleteall'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eidQuotaUser' +-- +-- * 'eidPrettyPrint' +-- +-- * 'eidPackageName' +-- +-- * 'eidUserIp' +-- +-- * 'eidImageType' +-- +-- * 'eidKey' +-- +-- * 'eidLanguage' +-- +-- * 'eidOauthToken' +-- +-- * 'eidEditId' +-- +-- * 'eidFields' +-- +-- * 'eidAlt' +editsImagesDeleteall + :: Text -- ^ 'packageName' + -> Text -- ^ 'imageType' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsImagesDeleteall +editsImagesDeleteall pEidPackageName_ pEidImageType_ pEidLanguage_ pEidEditId_ = + EditsImagesDeleteall + { _eidQuotaUser = Nothing + , _eidPrettyPrint = True + , _eidPackageName = pEidPackageName_ + , _eidUserIp = Nothing + , _eidImageType = pEidImageType_ + , _eidKey = Nothing + , _eidLanguage = pEidLanguage_ + , _eidOauthToken = Nothing + , _eidEditId = pEidEditId_ + , _eidFields = Nothing + , _eidAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eidQuotaUser :: Lens' EditsImagesDeleteall' (Maybe Text) +eidQuotaUser + = lens _eidQuotaUser (\ s a -> s{_eidQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eidPrettyPrint :: Lens' EditsImagesDeleteall' Bool +eidPrettyPrint + = lens _eidPrettyPrint + (\ s a -> s{_eidPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eidPackageName :: Lens' EditsImagesDeleteall' Text +eidPackageName + = lens _eidPackageName + (\ s a -> s{_eidPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eidUserIp :: Lens' EditsImagesDeleteall' (Maybe Text) +eidUserIp + = lens _eidUserIp (\ s a -> s{_eidUserIp = a}) + +eidImageType :: Lens' EditsImagesDeleteall' Text +eidImageType + = lens _eidImageType (\ s a -> s{_eidImageType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eidKey :: Lens' EditsImagesDeleteall' (Maybe Text) +eidKey = lens _eidKey (\ s a -> s{_eidKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing whose +-- images are to read or modified. For example, to select Austrian German, +-- pass \"de-AT\". +eidLanguage :: Lens' EditsImagesDeleteall' Text +eidLanguage + = lens _eidLanguage (\ s a -> s{_eidLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eidOauthToken :: Lens' EditsImagesDeleteall' (Maybe Text) +eidOauthToken + = lens _eidOauthToken + (\ s a -> s{_eidOauthToken = a}) + +-- | Unique identifier for this edit. +eidEditId :: Lens' EditsImagesDeleteall' Text +eidEditId + = lens _eidEditId (\ s a -> s{_eidEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eidFields :: Lens' EditsImagesDeleteall' (Maybe Text) +eidFields + = lens _eidFields (\ s a -> s{_eidFields = a}) + +-- | Data format for the response. +eidAlt :: Lens' EditsImagesDeleteall' Text +eidAlt = lens _eidAlt (\ s a -> s{_eidAlt = a}) + +instance GoogleRequest EditsImagesDeleteall' where + type Rs EditsImagesDeleteall' = + ImagesDeleteAllResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsImagesDeleteall{..} + = go _eidQuotaUser _eidPrettyPrint _eidPackageName + _eidUserIp + _eidImageType + _eidKey + _eidLanguage + _eidOauthToken + _eidEditId + _eidFields + _eidAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsImagesDeleteallAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/List.hs new file mode 100644 index 000000000..e3e1bad4b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/List.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Images.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all images for the specified language and image type. +-- +-- /See:/ for @AndroidpublisherEditsImagesList@. +module Androidpublisher.Edits.Images.List + ( + -- * REST Resource + EditsImagesListAPI + + -- * Creating a Request + , editsImagesList + , EditsImagesList + + -- * Request Lenses + , eilQuotaUser + , eilPrettyPrint + , eilPackageName + , eilUserIp + , eilImageType + , eilKey + , eilLanguage + , eilOauthToken + , eilEditId + , eilFields + , eilAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsImagesList@ which the +-- 'EditsImagesList' request conforms to. +type EditsImagesListAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> + Capture "imageType" Text :> + Get '[JSON] ImagesListResponse + +-- | Lists all images for the specified language and image type. +-- +-- /See:/ 'editsImagesList' smart constructor. +data EditsImagesList = EditsImagesList + { _eilQuotaUser :: !(Maybe Text) + , _eilPrettyPrint :: !Bool + , _eilPackageName :: !Text + , _eilUserIp :: !(Maybe Text) + , _eilImageType :: !Text + , _eilKey :: !(Maybe Text) + , _eilLanguage :: !Text + , _eilOauthToken :: !(Maybe Text) + , _eilEditId :: !Text + , _eilFields :: !(Maybe Text) + , _eilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsImagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eilQuotaUser' +-- +-- * 'eilPrettyPrint' +-- +-- * 'eilPackageName' +-- +-- * 'eilUserIp' +-- +-- * 'eilImageType' +-- +-- * 'eilKey' +-- +-- * 'eilLanguage' +-- +-- * 'eilOauthToken' +-- +-- * 'eilEditId' +-- +-- * 'eilFields' +-- +-- * 'eilAlt' +editsImagesList + :: Text -- ^ 'packageName' + -> Text -- ^ 'imageType' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsImagesList +editsImagesList pEilPackageName_ pEilImageType_ pEilLanguage_ pEilEditId_ = + EditsImagesList + { _eilQuotaUser = Nothing + , _eilPrettyPrint = True + , _eilPackageName = pEilPackageName_ + , _eilUserIp = Nothing + , _eilImageType = pEilImageType_ + , _eilKey = Nothing + , _eilLanguage = pEilLanguage_ + , _eilOauthToken = Nothing + , _eilEditId = pEilEditId_ + , _eilFields = Nothing + , _eilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eilQuotaUser :: Lens' EditsImagesList' (Maybe Text) +eilQuotaUser + = lens _eilQuotaUser (\ s a -> s{_eilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eilPrettyPrint :: Lens' EditsImagesList' Bool +eilPrettyPrint + = lens _eilPrettyPrint + (\ s a -> s{_eilPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eilPackageName :: Lens' EditsImagesList' Text +eilPackageName + = lens _eilPackageName + (\ s a -> s{_eilPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eilUserIp :: Lens' EditsImagesList' (Maybe Text) +eilUserIp + = lens _eilUserIp (\ s a -> s{_eilUserIp = a}) + +eilImageType :: Lens' EditsImagesList' Text +eilImageType + = lens _eilImageType (\ s a -> s{_eilImageType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eilKey :: Lens' EditsImagesList' (Maybe Text) +eilKey = lens _eilKey (\ s a -> s{_eilKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing whose +-- images are to read or modified. For example, to select Austrian German, +-- pass \"de-AT\". +eilLanguage :: Lens' EditsImagesList' Text +eilLanguage + = lens _eilLanguage (\ s a -> s{_eilLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eilOauthToken :: Lens' EditsImagesList' (Maybe Text) +eilOauthToken + = lens _eilOauthToken + (\ s a -> s{_eilOauthToken = a}) + +-- | Unique identifier for this edit. +eilEditId :: Lens' EditsImagesList' Text +eilEditId + = lens _eilEditId (\ s a -> s{_eilEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eilFields :: Lens' EditsImagesList' (Maybe Text) +eilFields + = lens _eilFields (\ s a -> s{_eilFields = a}) + +-- | Data format for the response. +eilAlt :: Lens' EditsImagesList' Text +eilAlt = lens _eilAlt (\ s a -> s{_eilAlt = a}) + +instance GoogleRequest EditsImagesList' where + type Rs EditsImagesList' = ImagesListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsImagesList{..} + = go _eilQuotaUser _eilPrettyPrint _eilPackageName + _eilUserIp + _eilImageType + _eilKey + _eilLanguage + _eilOauthToken + _eilEditId + _eilFields + _eilAlt + where go + = clientWithRoute (Proxy :: Proxy EditsImagesListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Upload.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Upload.hs new file mode 100644 index 000000000..255b633c0 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Images/Upload.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Images.Upload +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a new image and adds it to the list of images for the specified +-- language and image type. +-- +-- /See:/ for @AndroidpublisherEditsImagesUpload@. +module Androidpublisher.Edits.Images.Upload + ( + -- * REST Resource + EditsImagesUploadAPI + + -- * Creating a Request + , editsImagesUpload + , EditsImagesUpload + + -- * Request Lenses + , eiuQuotaUser + , eiuPrettyPrint + , eiuPackageName + , eiuUserIp + , eiuImageType + , eiuKey + , eiuLanguage + , eiuOauthToken + , eiuEditId + , eiuFields + , eiuAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsImagesUpload@ which the +-- 'EditsImagesUpload' request conforms to. +type EditsImagesUploadAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> + Capture "imageType" Text :> + Post '[JSON] ImagesUploadResponse + +-- | Uploads a new image and adds it to the list of images for the specified +-- language and image type. +-- +-- /See:/ 'editsImagesUpload' smart constructor. +data EditsImagesUpload = EditsImagesUpload + { _eiuQuotaUser :: !(Maybe Text) + , _eiuPrettyPrint :: !Bool + , _eiuPackageName :: !Text + , _eiuUserIp :: !(Maybe Text) + , _eiuImageType :: !Text + , _eiuKey :: !(Maybe Text) + , _eiuLanguage :: !Text + , _eiuOauthToken :: !(Maybe Text) + , _eiuEditId :: !Text + , _eiuFields :: !(Maybe Text) + , _eiuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsImagesUpload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eiuQuotaUser' +-- +-- * 'eiuPrettyPrint' +-- +-- * 'eiuPackageName' +-- +-- * 'eiuUserIp' +-- +-- * 'eiuImageType' +-- +-- * 'eiuKey' +-- +-- * 'eiuLanguage' +-- +-- * 'eiuOauthToken' +-- +-- * 'eiuEditId' +-- +-- * 'eiuFields' +-- +-- * 'eiuAlt' +editsImagesUpload + :: Text -- ^ 'packageName' + -> Text -- ^ 'imageType' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsImagesUpload +editsImagesUpload pEiuPackageName_ pEiuImageType_ pEiuLanguage_ pEiuEditId_ = + EditsImagesUpload + { _eiuQuotaUser = Nothing + , _eiuPrettyPrint = True + , _eiuPackageName = pEiuPackageName_ + , _eiuUserIp = Nothing + , _eiuImageType = pEiuImageType_ + , _eiuKey = Nothing + , _eiuLanguage = pEiuLanguage_ + , _eiuOauthToken = Nothing + , _eiuEditId = pEiuEditId_ + , _eiuFields = Nothing + , _eiuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eiuQuotaUser :: Lens' EditsImagesUpload' (Maybe Text) +eiuQuotaUser + = lens _eiuQuotaUser (\ s a -> s{_eiuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eiuPrettyPrint :: Lens' EditsImagesUpload' Bool +eiuPrettyPrint + = lens _eiuPrettyPrint + (\ s a -> s{_eiuPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eiuPackageName :: Lens' EditsImagesUpload' Text +eiuPackageName + = lens _eiuPackageName + (\ s a -> s{_eiuPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eiuUserIp :: Lens' EditsImagesUpload' (Maybe Text) +eiuUserIp + = lens _eiuUserIp (\ s a -> s{_eiuUserIp = a}) + +eiuImageType :: Lens' EditsImagesUpload' Text +eiuImageType + = lens _eiuImageType (\ s a -> s{_eiuImageType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eiuKey :: Lens' EditsImagesUpload' (Maybe Text) +eiuKey = lens _eiuKey (\ s a -> s{_eiuKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing whose +-- images are to read or modified. For example, to select Austrian German, +-- pass \"de-AT\". +eiuLanguage :: Lens' EditsImagesUpload' Text +eiuLanguage + = lens _eiuLanguage (\ s a -> s{_eiuLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eiuOauthToken :: Lens' EditsImagesUpload' (Maybe Text) +eiuOauthToken + = lens _eiuOauthToken + (\ s a -> s{_eiuOauthToken = a}) + +-- | Unique identifier for this edit. +eiuEditId :: Lens' EditsImagesUpload' Text +eiuEditId + = lens _eiuEditId (\ s a -> s{_eiuEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eiuFields :: Lens' EditsImagesUpload' (Maybe Text) +eiuFields + = lens _eiuFields (\ s a -> s{_eiuFields = a}) + +-- | Data format for the response. +eiuAlt :: Lens' EditsImagesUpload' Text +eiuAlt = lens _eiuAlt (\ s a -> s{_eiuAlt = a}) + +instance GoogleRequest EditsImagesUpload' where + type Rs EditsImagesUpload' = ImagesUploadResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsImagesUpload{..} + = go _eiuQuotaUser _eiuPrettyPrint _eiuPackageName + _eiuUserIp + _eiuImageType + _eiuKey + _eiuLanguage + _eiuOauthToken + _eiuEditId + _eiuFields + _eiuAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsImagesUploadAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Insert.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Insert.hs new file mode 100644 index 000000000..09ea604f7 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new edit for an app, populated with the app\'s current state. +-- +-- /See:/ for @AndroidpublisherEditsInsert@. +module Androidpublisher.Edits.Insert + ( + -- * REST Resource + EditsInsertAPI + + -- * Creating a Request + , editsInsert + , EditsInsert + + -- * Request Lenses + , eiQuotaUser + , eiPrettyPrint + , eiPackageName + , eiUserIp + , eiKey + , eiOauthToken + , eiFields + , eiAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsInsert@ which the +-- 'EditsInsert' request conforms to. +type EditsInsertAPI = + Capture "packageName" Text :> + "edits" :> Post '[JSON] AppEdit + +-- | Creates a new edit for an app, populated with the app\'s current state. +-- +-- /See:/ 'editsInsert' smart constructor. +data EditsInsert = EditsInsert + { _eiQuotaUser :: !(Maybe Text) + , _eiPrettyPrint :: !Bool + , _eiPackageName :: !Text + , _eiUserIp :: !(Maybe Text) + , _eiKey :: !(Maybe Text) + , _eiOauthToken :: !(Maybe Text) + , _eiFields :: !(Maybe Text) + , _eiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eiQuotaUser' +-- +-- * 'eiPrettyPrint' +-- +-- * 'eiPackageName' +-- +-- * 'eiUserIp' +-- +-- * 'eiKey' +-- +-- * 'eiOauthToken' +-- +-- * 'eiFields' +-- +-- * 'eiAlt' +editsInsert + :: Text -- ^ 'packageName' + -> EditsInsert +editsInsert pEiPackageName_ = + EditsInsert + { _eiQuotaUser = Nothing + , _eiPrettyPrint = True + , _eiPackageName = pEiPackageName_ + , _eiUserIp = Nothing + , _eiKey = Nothing + , _eiOauthToken = Nothing + , _eiFields = Nothing + , _eiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eiQuotaUser :: Lens' EditsInsert' (Maybe Text) +eiQuotaUser + = lens _eiQuotaUser (\ s a -> s{_eiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eiPrettyPrint :: Lens' EditsInsert' Bool +eiPrettyPrint + = lens _eiPrettyPrint + (\ s a -> s{_eiPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eiPackageName :: Lens' EditsInsert' Text +eiPackageName + = lens _eiPackageName + (\ s a -> s{_eiPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eiUserIp :: Lens' EditsInsert' (Maybe Text) +eiUserIp = lens _eiUserIp (\ s a -> s{_eiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eiKey :: Lens' EditsInsert' (Maybe Text) +eiKey = lens _eiKey (\ s a -> s{_eiKey = a}) + +-- | OAuth 2.0 token for the current user. +eiOauthToken :: Lens' EditsInsert' (Maybe Text) +eiOauthToken + = lens _eiOauthToken (\ s a -> s{_eiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eiFields :: Lens' EditsInsert' (Maybe Text) +eiFields = lens _eiFields (\ s a -> s{_eiFields = a}) + +-- | Data format for the response. +eiAlt :: Lens' EditsInsert' Text +eiAlt = lens _eiAlt (\ s a -> s{_eiAlt = a}) + +instance GoogleRequest EditsInsert' where + type Rs EditsInsert' = AppEdit + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsInsert{..} + = go _eiQuotaUser _eiPrettyPrint _eiPackageName + _eiUserIp + _eiKey + _eiOauthToken + _eiFields + _eiAlt + where go + = clientWithRoute (Proxy :: Proxy EditsInsertAPI) r u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Delete.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Delete.hs new file mode 100644 index 000000000..7a1a0f2d0 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Delete.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified localized store listing from an edit. +-- +-- /See:/ for @AndroidpublisherEditsListingsDelete@. +module Androidpublisher.Edits.Listings.Delete + ( + -- * REST Resource + EditsListingsDeleteAPI + + -- * Creating a Request + , editsListingsDelete + , EditsListingsDelete + + -- * Request Lenses + , eldlQuotaUser + , eldlPrettyPrint + , eldlPackageName + , eldlUserIp + , eldlKey + , eldlLanguage + , eldlOauthToken + , eldlEditId + , eldlFields + , eldlAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsDelete@ which the +-- 'EditsListingsDelete' request conforms to. +type EditsListingsDeleteAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> Delete '[JSON] () + +-- | Deletes the specified localized store listing from an edit. +-- +-- /See:/ 'editsListingsDelete' smart constructor. +data EditsListingsDelete = EditsListingsDelete + { _eldlQuotaUser :: !(Maybe Text) + , _eldlPrettyPrint :: !Bool + , _eldlPackageName :: !Text + , _eldlUserIp :: !(Maybe Text) + , _eldlKey :: !(Maybe Text) + , _eldlLanguage :: !Text + , _eldlOauthToken :: !(Maybe Text) + , _eldlEditId :: !Text + , _eldlFields :: !(Maybe Text) + , _eldlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eldlQuotaUser' +-- +-- * 'eldlPrettyPrint' +-- +-- * 'eldlPackageName' +-- +-- * 'eldlUserIp' +-- +-- * 'eldlKey' +-- +-- * 'eldlLanguage' +-- +-- * 'eldlOauthToken' +-- +-- * 'eldlEditId' +-- +-- * 'eldlFields' +-- +-- * 'eldlAlt' +editsListingsDelete + :: Text -- ^ 'packageName' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsListingsDelete +editsListingsDelete pEldlPackageName_ pEldlLanguage_ pEldlEditId_ = + EditsListingsDelete + { _eldlQuotaUser = Nothing + , _eldlPrettyPrint = True + , _eldlPackageName = pEldlPackageName_ + , _eldlUserIp = Nothing + , _eldlKey = Nothing + , _eldlLanguage = pEldlLanguage_ + , _eldlOauthToken = Nothing + , _eldlEditId = pEldlEditId_ + , _eldlFields = Nothing + , _eldlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eldlQuotaUser :: Lens' EditsListingsDelete' (Maybe Text) +eldlQuotaUser + = lens _eldlQuotaUser + (\ s a -> s{_eldlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eldlPrettyPrint :: Lens' EditsListingsDelete' Bool +eldlPrettyPrint + = lens _eldlPrettyPrint + (\ s a -> s{_eldlPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eldlPackageName :: Lens' EditsListingsDelete' Text +eldlPackageName + = lens _eldlPackageName + (\ s a -> s{_eldlPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eldlUserIp :: Lens' EditsListingsDelete' (Maybe Text) +eldlUserIp + = lens _eldlUserIp (\ s a -> s{_eldlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eldlKey :: Lens' EditsListingsDelete' (Maybe Text) +eldlKey = lens _eldlKey (\ s a -> s{_eldlKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing to +-- read or modify. For example, to select Austrian German, pass \"de-AT\". +eldlLanguage :: Lens' EditsListingsDelete' Text +eldlLanguage + = lens _eldlLanguage (\ s a -> s{_eldlLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eldlOauthToken :: Lens' EditsListingsDelete' (Maybe Text) +eldlOauthToken + = lens _eldlOauthToken + (\ s a -> s{_eldlOauthToken = a}) + +-- | Unique identifier for this edit. +eldlEditId :: Lens' EditsListingsDelete' Text +eldlEditId + = lens _eldlEditId (\ s a -> s{_eldlEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eldlFields :: Lens' EditsListingsDelete' (Maybe Text) +eldlFields + = lens _eldlFields (\ s a -> s{_eldlFields = a}) + +-- | Data format for the response. +eldlAlt :: Lens' EditsListingsDelete' Text +eldlAlt = lens _eldlAlt (\ s a -> s{_eldlAlt = a}) + +instance GoogleRequest EditsListingsDelete' where + type Rs EditsListingsDelete' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsDelete{..} + = go _eldlQuotaUser _eldlPrettyPrint _eldlPackageName + _eldlUserIp + _eldlKey + _eldlLanguage + _eldlOauthToken + _eldlEditId + _eldlFields + _eldlAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsDeleteAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Deleteall.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Deleteall.hs new file mode 100644 index 000000000..f484f3d36 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Deleteall.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.Deleteall +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes all localized listings from an edit. +-- +-- /See:/ for @AndroidpublisherEditsListingsDeleteall@. +module Androidpublisher.Edits.Listings.Deleteall + ( + -- * REST Resource + EditsListingsDeleteallAPI + + -- * Creating a Request + , editsListingsDeleteall + , EditsListingsDeleteall + + -- * Request Lenses + , eldQuotaUser + , eldPrettyPrint + , eldPackageName + , eldUserIp + , eldKey + , eldOauthToken + , eldEditId + , eldFields + , eldAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsDeleteall@ which the +-- 'EditsListingsDeleteall' request conforms to. +type EditsListingsDeleteallAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> Delete '[JSON] () + +-- | Deletes all localized listings from an edit. +-- +-- /See:/ 'editsListingsDeleteall' smart constructor. +data EditsListingsDeleteall = EditsListingsDeleteall + { _eldQuotaUser :: !(Maybe Text) + , _eldPrettyPrint :: !Bool + , _eldPackageName :: !Text + , _eldUserIp :: !(Maybe Text) + , _eldKey :: !(Maybe Text) + , _eldOauthToken :: !(Maybe Text) + , _eldEditId :: !Text + , _eldFields :: !(Maybe Text) + , _eldAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsDeleteall'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eldQuotaUser' +-- +-- * 'eldPrettyPrint' +-- +-- * 'eldPackageName' +-- +-- * 'eldUserIp' +-- +-- * 'eldKey' +-- +-- * 'eldOauthToken' +-- +-- * 'eldEditId' +-- +-- * 'eldFields' +-- +-- * 'eldAlt' +editsListingsDeleteall + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsListingsDeleteall +editsListingsDeleteall pEldPackageName_ pEldEditId_ = + EditsListingsDeleteall + { _eldQuotaUser = Nothing + , _eldPrettyPrint = True + , _eldPackageName = pEldPackageName_ + , _eldUserIp = Nothing + , _eldKey = Nothing + , _eldOauthToken = Nothing + , _eldEditId = pEldEditId_ + , _eldFields = Nothing + , _eldAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eldQuotaUser :: Lens' EditsListingsDeleteall' (Maybe Text) +eldQuotaUser + = lens _eldQuotaUser (\ s a -> s{_eldQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eldPrettyPrint :: Lens' EditsListingsDeleteall' Bool +eldPrettyPrint + = lens _eldPrettyPrint + (\ s a -> s{_eldPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eldPackageName :: Lens' EditsListingsDeleteall' Text +eldPackageName + = lens _eldPackageName + (\ s a -> s{_eldPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eldUserIp :: Lens' EditsListingsDeleteall' (Maybe Text) +eldUserIp + = lens _eldUserIp (\ s a -> s{_eldUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eldKey :: Lens' EditsListingsDeleteall' (Maybe Text) +eldKey = lens _eldKey (\ s a -> s{_eldKey = a}) + +-- | OAuth 2.0 token for the current user. +eldOauthToken :: Lens' EditsListingsDeleteall' (Maybe Text) +eldOauthToken + = lens _eldOauthToken + (\ s a -> s{_eldOauthToken = a}) + +-- | Unique identifier for this edit. +eldEditId :: Lens' EditsListingsDeleteall' Text +eldEditId + = lens _eldEditId (\ s a -> s{_eldEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eldFields :: Lens' EditsListingsDeleteall' (Maybe Text) +eldFields + = lens _eldFields (\ s a -> s{_eldFields = a}) + +-- | Data format for the response. +eldAlt :: Lens' EditsListingsDeleteall' Text +eldAlt = lens _eldAlt (\ s a -> s{_eldAlt = a}) + +instance GoogleRequest EditsListingsDeleteall' where + type Rs EditsListingsDeleteall' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsDeleteall{..} + = go _eldQuotaUser _eldPrettyPrint _eldPackageName + _eldUserIp + _eldKey + _eldOauthToken + _eldEditId + _eldFields + _eldAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsDeleteallAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Get.hs new file mode 100644 index 000000000..2b494c33b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches information about a localized store listing. +-- +-- /See:/ for @AndroidpublisherEditsListingsGet@. +module Androidpublisher.Edits.Listings.Get + ( + -- * REST Resource + EditsListingsGetAPI + + -- * Creating a Request + , editsListingsGet + , EditsListingsGet + + -- * Request Lenses + , elgQuotaUser + , elgPrettyPrint + , elgPackageName + , elgUserIp + , elgKey + , elgLanguage + , elgOauthToken + , elgEditId + , elgFields + , elgAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsGet@ which the +-- 'EditsListingsGet' request conforms to. +type EditsListingsGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> Get '[JSON] Listing + +-- | Fetches information about a localized store listing. +-- +-- /See:/ 'editsListingsGet' smart constructor. +data EditsListingsGet = EditsListingsGet + { _elgQuotaUser :: !(Maybe Text) + , _elgPrettyPrint :: !Bool + , _elgPackageName :: !Text + , _elgUserIp :: !(Maybe Text) + , _elgKey :: !(Maybe Text) + , _elgLanguage :: !Text + , _elgOauthToken :: !(Maybe Text) + , _elgEditId :: !Text + , _elgFields :: !(Maybe Text) + , _elgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elgQuotaUser' +-- +-- * 'elgPrettyPrint' +-- +-- * 'elgPackageName' +-- +-- * 'elgUserIp' +-- +-- * 'elgKey' +-- +-- * 'elgLanguage' +-- +-- * 'elgOauthToken' +-- +-- * 'elgEditId' +-- +-- * 'elgFields' +-- +-- * 'elgAlt' +editsListingsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsListingsGet +editsListingsGet pElgPackageName_ pElgLanguage_ pElgEditId_ = + EditsListingsGet + { _elgQuotaUser = Nothing + , _elgPrettyPrint = True + , _elgPackageName = pElgPackageName_ + , _elgUserIp = Nothing + , _elgKey = Nothing + , _elgLanguage = pElgLanguage_ + , _elgOauthToken = Nothing + , _elgEditId = pElgEditId_ + , _elgFields = Nothing + , _elgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elgQuotaUser :: Lens' EditsListingsGet' (Maybe Text) +elgQuotaUser + = lens _elgQuotaUser (\ s a -> s{_elgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elgPrettyPrint :: Lens' EditsListingsGet' Bool +elgPrettyPrint + = lens _elgPrettyPrint + (\ s a -> s{_elgPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +elgPackageName :: Lens' EditsListingsGet' Text +elgPackageName + = lens _elgPackageName + (\ s a -> s{_elgPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elgUserIp :: Lens' EditsListingsGet' (Maybe Text) +elgUserIp + = lens _elgUserIp (\ s a -> s{_elgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elgKey :: Lens' EditsListingsGet' (Maybe Text) +elgKey = lens _elgKey (\ s a -> s{_elgKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing to +-- read or modify. For example, to select Austrian German, pass \"de-AT\". +elgLanguage :: Lens' EditsListingsGet' Text +elgLanguage + = lens _elgLanguage (\ s a -> s{_elgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +elgOauthToken :: Lens' EditsListingsGet' (Maybe Text) +elgOauthToken + = lens _elgOauthToken + (\ s a -> s{_elgOauthToken = a}) + +-- | Unique identifier for this edit. +elgEditId :: Lens' EditsListingsGet' Text +elgEditId + = lens _elgEditId (\ s a -> s{_elgEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +elgFields :: Lens' EditsListingsGet' (Maybe Text) +elgFields + = lens _elgFields (\ s a -> s{_elgFields = a}) + +-- | Data format for the response. +elgAlt :: Lens' EditsListingsGet' Text +elgAlt = lens _elgAlt (\ s a -> s{_elgAlt = a}) + +instance GoogleRequest EditsListingsGet' where + type Rs EditsListingsGet' = Listing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsGet{..} + = go _elgQuotaUser _elgPrettyPrint _elgPackageName + _elgUserIp + _elgKey + _elgLanguage + _elgOauthToken + _elgEditId + _elgFields + _elgAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/List.hs new file mode 100644 index 000000000..d127aee1b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/List.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns all of the localized store listings attached to this edit. +-- +-- /See:/ for @AndroidpublisherEditsListingsList@. +module Androidpublisher.Edits.Listings.List + ( + -- * REST Resource + EditsListingsListAPI + + -- * Creating a Request + , editsListingsList + , EditsListingsList + + -- * Request Lenses + , ellQuotaUser + , ellPrettyPrint + , ellPackageName + , ellUserIp + , ellKey + , ellOauthToken + , ellEditId + , ellFields + , ellAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsList@ which the +-- 'EditsListingsList' request conforms to. +type EditsListingsListAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> Get '[JSON] ListingsListResponse + +-- | Returns all of the localized store listings attached to this edit. +-- +-- /See:/ 'editsListingsList' smart constructor. +data EditsListingsList = EditsListingsList + { _ellQuotaUser :: !(Maybe Text) + , _ellPrettyPrint :: !Bool + , _ellPackageName :: !Text + , _ellUserIp :: !(Maybe Text) + , _ellKey :: !(Maybe Text) + , _ellOauthToken :: !(Maybe Text) + , _ellEditId :: !Text + , _ellFields :: !(Maybe Text) + , _ellAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ellQuotaUser' +-- +-- * 'ellPrettyPrint' +-- +-- * 'ellPackageName' +-- +-- * 'ellUserIp' +-- +-- * 'ellKey' +-- +-- * 'ellOauthToken' +-- +-- * 'ellEditId' +-- +-- * 'ellFields' +-- +-- * 'ellAlt' +editsListingsList + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsListingsList +editsListingsList pEllPackageName_ pEllEditId_ = + EditsListingsList + { _ellQuotaUser = Nothing + , _ellPrettyPrint = True + , _ellPackageName = pEllPackageName_ + , _ellUserIp = Nothing + , _ellKey = Nothing + , _ellOauthToken = Nothing + , _ellEditId = pEllEditId_ + , _ellFields = Nothing + , _ellAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ellQuotaUser :: Lens' EditsListingsList' (Maybe Text) +ellQuotaUser + = lens _ellQuotaUser (\ s a -> s{_ellQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ellPrettyPrint :: Lens' EditsListingsList' Bool +ellPrettyPrint + = lens _ellPrettyPrint + (\ s a -> s{_ellPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +ellPackageName :: Lens' EditsListingsList' Text +ellPackageName + = lens _ellPackageName + (\ s a -> s{_ellPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ellUserIp :: Lens' EditsListingsList' (Maybe Text) +ellUserIp + = lens _ellUserIp (\ s a -> s{_ellUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ellKey :: Lens' EditsListingsList' (Maybe Text) +ellKey = lens _ellKey (\ s a -> s{_ellKey = a}) + +-- | OAuth 2.0 token for the current user. +ellOauthToken :: Lens' EditsListingsList' (Maybe Text) +ellOauthToken + = lens _ellOauthToken + (\ s a -> s{_ellOauthToken = a}) + +-- | Unique identifier for this edit. +ellEditId :: Lens' EditsListingsList' Text +ellEditId + = lens _ellEditId (\ s a -> s{_ellEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +ellFields :: Lens' EditsListingsList' (Maybe Text) +ellFields + = lens _ellFields (\ s a -> s{_ellFields = a}) + +-- | Data format for the response. +ellAlt :: Lens' EditsListingsList' Text +ellAlt = lens _ellAlt (\ s a -> s{_ellAlt = a}) + +instance GoogleRequest EditsListingsList' where + type Rs EditsListingsList' = ListingsListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsList{..} + = go _ellQuotaUser _ellPrettyPrint _ellPackageName + _ellUserIp + _ellKey + _ellOauthToken + _ellEditId + _ellFields + _ellAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Patch.hs new file mode 100644 index 000000000..cb8d1ff67 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Patch.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates or updates a localized store listing. This method supports patch +-- semantics. +-- +-- /See:/ for @AndroidpublisherEditsListingsPatch@. +module Androidpublisher.Edits.Listings.Patch + ( + -- * REST Resource + EditsListingsPatchAPI + + -- * Creating a Request + , editsListingsPatch + , EditsListingsPatch + + -- * Request Lenses + , elpQuotaUser + , elpPrettyPrint + , elpPackageName + , elpUserIp + , elpKey + , elpLanguage + , elpOauthToken + , elpEditId + , elpFields + , elpAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsPatch@ which the +-- 'EditsListingsPatch' request conforms to. +type EditsListingsPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> Patch '[JSON] Listing + +-- | Creates or updates a localized store listing. This method supports patch +-- semantics. +-- +-- /See:/ 'editsListingsPatch' smart constructor. +data EditsListingsPatch = EditsListingsPatch + { _elpQuotaUser :: !(Maybe Text) + , _elpPrettyPrint :: !Bool + , _elpPackageName :: !Text + , _elpUserIp :: !(Maybe Text) + , _elpKey :: !(Maybe Text) + , _elpLanguage :: !Text + , _elpOauthToken :: !(Maybe Text) + , _elpEditId :: !Text + , _elpFields :: !(Maybe Text) + , _elpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elpQuotaUser' +-- +-- * 'elpPrettyPrint' +-- +-- * 'elpPackageName' +-- +-- * 'elpUserIp' +-- +-- * 'elpKey' +-- +-- * 'elpLanguage' +-- +-- * 'elpOauthToken' +-- +-- * 'elpEditId' +-- +-- * 'elpFields' +-- +-- * 'elpAlt' +editsListingsPatch + :: Text -- ^ 'packageName' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsListingsPatch +editsListingsPatch pElpPackageName_ pElpLanguage_ pElpEditId_ = + EditsListingsPatch + { _elpQuotaUser = Nothing + , _elpPrettyPrint = True + , _elpPackageName = pElpPackageName_ + , _elpUserIp = Nothing + , _elpKey = Nothing + , _elpLanguage = pElpLanguage_ + , _elpOauthToken = Nothing + , _elpEditId = pElpEditId_ + , _elpFields = Nothing + , _elpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elpQuotaUser :: Lens' EditsListingsPatch' (Maybe Text) +elpQuotaUser + = lens _elpQuotaUser (\ s a -> s{_elpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elpPrettyPrint :: Lens' EditsListingsPatch' Bool +elpPrettyPrint + = lens _elpPrettyPrint + (\ s a -> s{_elpPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +elpPackageName :: Lens' EditsListingsPatch' Text +elpPackageName + = lens _elpPackageName + (\ s a -> s{_elpPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elpUserIp :: Lens' EditsListingsPatch' (Maybe Text) +elpUserIp + = lens _elpUserIp (\ s a -> s{_elpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elpKey :: Lens' EditsListingsPatch' (Maybe Text) +elpKey = lens _elpKey (\ s a -> s{_elpKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing to +-- read or modify. For example, to select Austrian German, pass \"de-AT\". +elpLanguage :: Lens' EditsListingsPatch' Text +elpLanguage + = lens _elpLanguage (\ s a -> s{_elpLanguage = a}) + +-- | OAuth 2.0 token for the current user. +elpOauthToken :: Lens' EditsListingsPatch' (Maybe Text) +elpOauthToken + = lens _elpOauthToken + (\ s a -> s{_elpOauthToken = a}) + +-- | Unique identifier for this edit. +elpEditId :: Lens' EditsListingsPatch' Text +elpEditId + = lens _elpEditId (\ s a -> s{_elpEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +elpFields :: Lens' EditsListingsPatch' (Maybe Text) +elpFields + = lens _elpFields (\ s a -> s{_elpFields = a}) + +-- | Data format for the response. +elpAlt :: Lens' EditsListingsPatch' Text +elpAlt = lens _elpAlt (\ s a -> s{_elpAlt = a}) + +instance GoogleRequest EditsListingsPatch' where + type Rs EditsListingsPatch' = Listing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsPatch{..} + = go _elpQuotaUser _elpPrettyPrint _elpPackageName + _elpUserIp + _elpKey + _elpLanguage + _elpOauthToken + _elpEditId + _elpFields + _elpAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Update.hs new file mode 100644 index 000000000..47b32a4e1 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Listings/Update.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Listings.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates or updates a localized store listing. +-- +-- /See:/ for @AndroidpublisherEditsListingsUpdate@. +module Androidpublisher.Edits.Listings.Update + ( + -- * REST Resource + EditsListingsUpdateAPI + + -- * Creating a Request + , editsListingsUpdate + , EditsListingsUpdate + + -- * Request Lenses + , eluQuotaUser + , eluPrettyPrint + , eluPackageName + , eluUserIp + , eluKey + , eluLanguage + , eluOauthToken + , eluEditId + , eluFields + , eluAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsListingsUpdate@ which the +-- 'EditsListingsUpdate' request conforms to. +type EditsListingsUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "listings" :> + Capture "language" Text :> Put '[JSON] Listing + +-- | Creates or updates a localized store listing. +-- +-- /See:/ 'editsListingsUpdate' smart constructor. +data EditsListingsUpdate = EditsListingsUpdate + { _eluQuotaUser :: !(Maybe Text) + , _eluPrettyPrint :: !Bool + , _eluPackageName :: !Text + , _eluUserIp :: !(Maybe Text) + , _eluKey :: !(Maybe Text) + , _eluLanguage :: !Text + , _eluOauthToken :: !(Maybe Text) + , _eluEditId :: !Text + , _eluFields :: !(Maybe Text) + , _eluAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsListingsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eluQuotaUser' +-- +-- * 'eluPrettyPrint' +-- +-- * 'eluPackageName' +-- +-- * 'eluUserIp' +-- +-- * 'eluKey' +-- +-- * 'eluLanguage' +-- +-- * 'eluOauthToken' +-- +-- * 'eluEditId' +-- +-- * 'eluFields' +-- +-- * 'eluAlt' +editsListingsUpdate + :: Text -- ^ 'packageName' + -> Text -- ^ 'language' + -> Text -- ^ 'editId' + -> EditsListingsUpdate +editsListingsUpdate pEluPackageName_ pEluLanguage_ pEluEditId_ = + EditsListingsUpdate + { _eluQuotaUser = Nothing + , _eluPrettyPrint = True + , _eluPackageName = pEluPackageName_ + , _eluUserIp = Nothing + , _eluKey = Nothing + , _eluLanguage = pEluLanguage_ + , _eluOauthToken = Nothing + , _eluEditId = pEluEditId_ + , _eluFields = Nothing + , _eluAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eluQuotaUser :: Lens' EditsListingsUpdate' (Maybe Text) +eluQuotaUser + = lens _eluQuotaUser (\ s a -> s{_eluQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eluPrettyPrint :: Lens' EditsListingsUpdate' Bool +eluPrettyPrint + = lens _eluPrettyPrint + (\ s a -> s{_eluPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +eluPackageName :: Lens' EditsListingsUpdate' Text +eluPackageName + = lens _eluPackageName + (\ s a -> s{_eluPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eluUserIp :: Lens' EditsListingsUpdate' (Maybe Text) +eluUserIp + = lens _eluUserIp (\ s a -> s{_eluUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eluKey :: Lens' EditsListingsUpdate' (Maybe Text) +eluKey = lens _eluKey (\ s a -> s{_eluKey = a}) + +-- | The language code (a BCP-47 language tag) of the localized listing to +-- read or modify. For example, to select Austrian German, pass \"de-AT\". +eluLanguage :: Lens' EditsListingsUpdate' Text +eluLanguage + = lens _eluLanguage (\ s a -> s{_eluLanguage = a}) + +-- | OAuth 2.0 token for the current user. +eluOauthToken :: Lens' EditsListingsUpdate' (Maybe Text) +eluOauthToken + = lens _eluOauthToken + (\ s a -> s{_eluOauthToken = a}) + +-- | Unique identifier for this edit. +eluEditId :: Lens' EditsListingsUpdate' Text +eluEditId + = lens _eluEditId (\ s a -> s{_eluEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +eluFields :: Lens' EditsListingsUpdate' (Maybe Text) +eluFields + = lens _eluFields (\ s a -> s{_eluFields = a}) + +-- | Data format for the response. +eluAlt :: Lens' EditsListingsUpdate' Text +eluAlt = lens _eluAlt (\ s a -> s{_eluAlt = a}) + +instance GoogleRequest EditsListingsUpdate' where + type Rs EditsListingsUpdate' = Listing + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsListingsUpdate{..} + = go _eluQuotaUser _eluPrettyPrint _eluPackageName + _eluUserIp + _eluKey + _eluLanguage + _eluOauthToken + _eluEditId + _eluFields + _eluAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsListingsUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Get.hs new file mode 100644 index 000000000..77dfaf4f0 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Testers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherEditsTestersGet@. +module Androidpublisher.Edits.Testers.Get + ( + -- * REST Resource + EditsTestersGetAPI + + -- * Creating a Request + , editsTestersGet + , EditsTestersGet + + -- * Request Lenses + , etgtQuotaUser + , etgtTrack + , etgtPrettyPrint + , etgtPackageName + , etgtUserIp + , etgtKey + , etgtOauthToken + , etgtEditId + , etgtFields + , etgtAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTestersGet@ which the +-- 'EditsTestersGet' request conforms to. +type EditsTestersGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "testers" :> + Capture "track" Text :> Get '[JSON] Testers + +-- +-- /See:/ 'editsTestersGet' smart constructor. +data EditsTestersGet = EditsTestersGet + { _etgtQuotaUser :: !(Maybe Text) + , _etgtTrack :: !Text + , _etgtPrettyPrint :: !Bool + , _etgtPackageName :: !Text + , _etgtUserIp :: !(Maybe Text) + , _etgtKey :: !(Maybe Text) + , _etgtOauthToken :: !(Maybe Text) + , _etgtEditId :: !Text + , _etgtFields :: !(Maybe Text) + , _etgtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTestersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etgtQuotaUser' +-- +-- * 'etgtTrack' +-- +-- * 'etgtPrettyPrint' +-- +-- * 'etgtPackageName' +-- +-- * 'etgtUserIp' +-- +-- * 'etgtKey' +-- +-- * 'etgtOauthToken' +-- +-- * 'etgtEditId' +-- +-- * 'etgtFields' +-- +-- * 'etgtAlt' +editsTestersGet + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTestersGet +editsTestersGet pEtgtTrack_ pEtgtPackageName_ pEtgtEditId_ = + EditsTestersGet + { _etgtQuotaUser = Nothing + , _etgtTrack = pEtgtTrack_ + , _etgtPrettyPrint = True + , _etgtPackageName = pEtgtPackageName_ + , _etgtUserIp = Nothing + , _etgtKey = Nothing + , _etgtOauthToken = Nothing + , _etgtEditId = pEtgtEditId_ + , _etgtFields = Nothing + , _etgtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etgtQuotaUser :: Lens' EditsTestersGet' (Maybe Text) +etgtQuotaUser + = lens _etgtQuotaUser + (\ s a -> s{_etgtQuotaUser = a}) + +etgtTrack :: Lens' EditsTestersGet' Text +etgtTrack + = lens _etgtTrack (\ s a -> s{_etgtTrack = a}) + +-- | Returns response with indentations and line breaks. +etgtPrettyPrint :: Lens' EditsTestersGet' Bool +etgtPrettyPrint + = lens _etgtPrettyPrint + (\ s a -> s{_etgtPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etgtPackageName :: Lens' EditsTestersGet' Text +etgtPackageName + = lens _etgtPackageName + (\ s a -> s{_etgtPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etgtUserIp :: Lens' EditsTestersGet' (Maybe Text) +etgtUserIp + = lens _etgtUserIp (\ s a -> s{_etgtUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etgtKey :: Lens' EditsTestersGet' (Maybe Text) +etgtKey = lens _etgtKey (\ s a -> s{_etgtKey = a}) + +-- | OAuth 2.0 token for the current user. +etgtOauthToken :: Lens' EditsTestersGet' (Maybe Text) +etgtOauthToken + = lens _etgtOauthToken + (\ s a -> s{_etgtOauthToken = a}) + +-- | Unique identifier for this edit. +etgtEditId :: Lens' EditsTestersGet' Text +etgtEditId + = lens _etgtEditId (\ s a -> s{_etgtEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etgtFields :: Lens' EditsTestersGet' (Maybe Text) +etgtFields + = lens _etgtFields (\ s a -> s{_etgtFields = a}) + +-- | Data format for the response. +etgtAlt :: Lens' EditsTestersGet' Text +etgtAlt = lens _etgtAlt (\ s a -> s{_etgtAlt = a}) + +instance GoogleRequest EditsTestersGet' where + type Rs EditsTestersGet' = Testers + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTestersGet{..} + = go _etgtQuotaUser _etgtTrack _etgtPrettyPrint + _etgtPackageName + _etgtUserIp + _etgtKey + _etgtOauthToken + _etgtEditId + _etgtFields + _etgtAlt + where go + = clientWithRoute (Proxy :: Proxy EditsTestersGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Patch.hs new file mode 100644 index 000000000..fdf3e38a7 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Patch.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Testers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherEditsTestersPatch@. +module Androidpublisher.Edits.Testers.Patch + ( + -- * REST Resource + EditsTestersPatchAPI + + -- * Creating a Request + , editsTestersPatch + , EditsTestersPatch + + -- * Request Lenses + , etptQuotaUser + , etptTrack + , etptPrettyPrint + , etptPackageName + , etptUserIp + , etptKey + , etptOauthToken + , etptEditId + , etptFields + , etptAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTestersPatch@ which the +-- 'EditsTestersPatch' request conforms to. +type EditsTestersPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "testers" :> + Capture "track" Text :> Patch '[JSON] Testers + +-- +-- /See:/ 'editsTestersPatch' smart constructor. +data EditsTestersPatch = EditsTestersPatch + { _etptQuotaUser :: !(Maybe Text) + , _etptTrack :: !Text + , _etptPrettyPrint :: !Bool + , _etptPackageName :: !Text + , _etptUserIp :: !(Maybe Text) + , _etptKey :: !(Maybe Text) + , _etptOauthToken :: !(Maybe Text) + , _etptEditId :: !Text + , _etptFields :: !(Maybe Text) + , _etptAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTestersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etptQuotaUser' +-- +-- * 'etptTrack' +-- +-- * 'etptPrettyPrint' +-- +-- * 'etptPackageName' +-- +-- * 'etptUserIp' +-- +-- * 'etptKey' +-- +-- * 'etptOauthToken' +-- +-- * 'etptEditId' +-- +-- * 'etptFields' +-- +-- * 'etptAlt' +editsTestersPatch + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTestersPatch +editsTestersPatch pEtptTrack_ pEtptPackageName_ pEtptEditId_ = + EditsTestersPatch + { _etptQuotaUser = Nothing + , _etptTrack = pEtptTrack_ + , _etptPrettyPrint = True + , _etptPackageName = pEtptPackageName_ + , _etptUserIp = Nothing + , _etptKey = Nothing + , _etptOauthToken = Nothing + , _etptEditId = pEtptEditId_ + , _etptFields = Nothing + , _etptAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etptQuotaUser :: Lens' EditsTestersPatch' (Maybe Text) +etptQuotaUser + = lens _etptQuotaUser + (\ s a -> s{_etptQuotaUser = a}) + +etptTrack :: Lens' EditsTestersPatch' Text +etptTrack + = lens _etptTrack (\ s a -> s{_etptTrack = a}) + +-- | Returns response with indentations and line breaks. +etptPrettyPrint :: Lens' EditsTestersPatch' Bool +etptPrettyPrint + = lens _etptPrettyPrint + (\ s a -> s{_etptPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etptPackageName :: Lens' EditsTestersPatch' Text +etptPackageName + = lens _etptPackageName + (\ s a -> s{_etptPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etptUserIp :: Lens' EditsTestersPatch' (Maybe Text) +etptUserIp + = lens _etptUserIp (\ s a -> s{_etptUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etptKey :: Lens' EditsTestersPatch' (Maybe Text) +etptKey = lens _etptKey (\ s a -> s{_etptKey = a}) + +-- | OAuth 2.0 token for the current user. +etptOauthToken :: Lens' EditsTestersPatch' (Maybe Text) +etptOauthToken + = lens _etptOauthToken + (\ s a -> s{_etptOauthToken = a}) + +-- | Unique identifier for this edit. +etptEditId :: Lens' EditsTestersPatch' Text +etptEditId + = lens _etptEditId (\ s a -> s{_etptEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etptFields :: Lens' EditsTestersPatch' (Maybe Text) +etptFields + = lens _etptFields (\ s a -> s{_etptFields = a}) + +-- | Data format for the response. +etptAlt :: Lens' EditsTestersPatch' Text +etptAlt = lens _etptAlt (\ s a -> s{_etptAlt = a}) + +instance GoogleRequest EditsTestersPatch' where + type Rs EditsTestersPatch' = Testers + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTestersPatch{..} + = go _etptQuotaUser _etptTrack _etptPrettyPrint + _etptPackageName + _etptUserIp + _etptKey + _etptOauthToken + _etptEditId + _etptFields + _etptAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsTestersPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Update.hs new file mode 100644 index 000000000..e01cc8920 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Testers/Update.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Testers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherEditsTestersUpdate@. +module Androidpublisher.Edits.Testers.Update + ( + -- * REST Resource + EditsTestersUpdateAPI + + -- * Creating a Request + , editsTestersUpdate + , EditsTestersUpdate + + -- * Request Lenses + , etutQuotaUser + , etutTrack + , etutPrettyPrint + , etutPackageName + , etutUserIp + , etutKey + , etutOauthToken + , etutEditId + , etutFields + , etutAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTestersUpdate@ which the +-- 'EditsTestersUpdate' request conforms to. +type EditsTestersUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "testers" :> + Capture "track" Text :> Put '[JSON] Testers + +-- +-- /See:/ 'editsTestersUpdate' smart constructor. +data EditsTestersUpdate = EditsTestersUpdate + { _etutQuotaUser :: !(Maybe Text) + , _etutTrack :: !Text + , _etutPrettyPrint :: !Bool + , _etutPackageName :: !Text + , _etutUserIp :: !(Maybe Text) + , _etutKey :: !(Maybe Text) + , _etutOauthToken :: !(Maybe Text) + , _etutEditId :: !Text + , _etutFields :: !(Maybe Text) + , _etutAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTestersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etutQuotaUser' +-- +-- * 'etutTrack' +-- +-- * 'etutPrettyPrint' +-- +-- * 'etutPackageName' +-- +-- * 'etutUserIp' +-- +-- * 'etutKey' +-- +-- * 'etutOauthToken' +-- +-- * 'etutEditId' +-- +-- * 'etutFields' +-- +-- * 'etutAlt' +editsTestersUpdate + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTestersUpdate +editsTestersUpdate pEtutTrack_ pEtutPackageName_ pEtutEditId_ = + EditsTestersUpdate + { _etutQuotaUser = Nothing + , _etutTrack = pEtutTrack_ + , _etutPrettyPrint = True + , _etutPackageName = pEtutPackageName_ + , _etutUserIp = Nothing + , _etutKey = Nothing + , _etutOauthToken = Nothing + , _etutEditId = pEtutEditId_ + , _etutFields = Nothing + , _etutAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etutQuotaUser :: Lens' EditsTestersUpdate' (Maybe Text) +etutQuotaUser + = lens _etutQuotaUser + (\ s a -> s{_etutQuotaUser = a}) + +etutTrack :: Lens' EditsTestersUpdate' Text +etutTrack + = lens _etutTrack (\ s a -> s{_etutTrack = a}) + +-- | Returns response with indentations and line breaks. +etutPrettyPrint :: Lens' EditsTestersUpdate' Bool +etutPrettyPrint + = lens _etutPrettyPrint + (\ s a -> s{_etutPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etutPackageName :: Lens' EditsTestersUpdate' Text +etutPackageName + = lens _etutPackageName + (\ s a -> s{_etutPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etutUserIp :: Lens' EditsTestersUpdate' (Maybe Text) +etutUserIp + = lens _etutUserIp (\ s a -> s{_etutUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etutKey :: Lens' EditsTestersUpdate' (Maybe Text) +etutKey = lens _etutKey (\ s a -> s{_etutKey = a}) + +-- | OAuth 2.0 token for the current user. +etutOauthToken :: Lens' EditsTestersUpdate' (Maybe Text) +etutOauthToken + = lens _etutOauthToken + (\ s a -> s{_etutOauthToken = a}) + +-- | Unique identifier for this edit. +etutEditId :: Lens' EditsTestersUpdate' Text +etutEditId + = lens _etutEditId (\ s a -> s{_etutEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etutFields :: Lens' EditsTestersUpdate' (Maybe Text) +etutFields + = lens _etutFields (\ s a -> s{_etutFields = a}) + +-- | Data format for the response. +etutAlt :: Lens' EditsTestersUpdate' Text +etutAlt = lens _etutAlt (\ s a -> s{_etutAlt = a}) + +instance GoogleRequest EditsTestersUpdate' where + type Rs EditsTestersUpdate' = Testers + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTestersUpdate{..} + = go _etutQuotaUser _etutTrack _etutPrettyPrint + _etutPackageName + _etutUserIp + _etutKey + _etutOauthToken + _etutEditId + _etutFields + _etutAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsTestersUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Get.hs new file mode 100644 index 000000000..7246cc613 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Get.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Tracks.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches the track configuration for the specified track type. Includes +-- the APK version codes that are in this track. +-- +-- /See:/ for @AndroidpublisherEditsTracksGet@. +module Androidpublisher.Edits.Tracks.Get + ( + -- * REST Resource + EditsTracksGetAPI + + -- * Creating a Request + , editsTracksGet + , EditsTracksGet + + -- * Request Lenses + , etgQuotaUser + , etgTrack + , etgPrettyPrint + , etgPackageName + , etgUserIp + , etgKey + , etgOauthToken + , etgEditId + , etgFields + , etgAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTracksGet@ which the +-- 'EditsTracksGet' request conforms to. +type EditsTracksGetAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "tracks" :> Capture "track" Text :> Get '[JSON] Track + +-- | Fetches the track configuration for the specified track type. Includes +-- the APK version codes that are in this track. +-- +-- /See:/ 'editsTracksGet' smart constructor. +data EditsTracksGet = EditsTracksGet + { _etgQuotaUser :: !(Maybe Text) + , _etgTrack :: !Text + , _etgPrettyPrint :: !Bool + , _etgPackageName :: !Text + , _etgUserIp :: !(Maybe Text) + , _etgKey :: !(Maybe Text) + , _etgOauthToken :: !(Maybe Text) + , _etgEditId :: !Text + , _etgFields :: !(Maybe Text) + , _etgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTracksGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etgQuotaUser' +-- +-- * 'etgTrack' +-- +-- * 'etgPrettyPrint' +-- +-- * 'etgPackageName' +-- +-- * 'etgUserIp' +-- +-- * 'etgKey' +-- +-- * 'etgOauthToken' +-- +-- * 'etgEditId' +-- +-- * 'etgFields' +-- +-- * 'etgAlt' +editsTracksGet + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTracksGet +editsTracksGet pEtgTrack_ pEtgPackageName_ pEtgEditId_ = + EditsTracksGet + { _etgQuotaUser = Nothing + , _etgTrack = pEtgTrack_ + , _etgPrettyPrint = True + , _etgPackageName = pEtgPackageName_ + , _etgUserIp = Nothing + , _etgKey = Nothing + , _etgOauthToken = Nothing + , _etgEditId = pEtgEditId_ + , _etgFields = Nothing + , _etgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etgQuotaUser :: Lens' EditsTracksGet' (Maybe Text) +etgQuotaUser + = lens _etgQuotaUser (\ s a -> s{_etgQuotaUser = a}) + +-- | The track type to read or modify. +etgTrack :: Lens' EditsTracksGet' Text +etgTrack = lens _etgTrack (\ s a -> s{_etgTrack = a}) + +-- | Returns response with indentations and line breaks. +etgPrettyPrint :: Lens' EditsTracksGet' Bool +etgPrettyPrint + = lens _etgPrettyPrint + (\ s a -> s{_etgPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etgPackageName :: Lens' EditsTracksGet' Text +etgPackageName + = lens _etgPackageName + (\ s a -> s{_etgPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etgUserIp :: Lens' EditsTracksGet' (Maybe Text) +etgUserIp + = lens _etgUserIp (\ s a -> s{_etgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etgKey :: Lens' EditsTracksGet' (Maybe Text) +etgKey = lens _etgKey (\ s a -> s{_etgKey = a}) + +-- | OAuth 2.0 token for the current user. +etgOauthToken :: Lens' EditsTracksGet' (Maybe Text) +etgOauthToken + = lens _etgOauthToken + (\ s a -> s{_etgOauthToken = a}) + +-- | Unique identifier for this edit. +etgEditId :: Lens' EditsTracksGet' Text +etgEditId + = lens _etgEditId (\ s a -> s{_etgEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etgFields :: Lens' EditsTracksGet' (Maybe Text) +etgFields + = lens _etgFields (\ s a -> s{_etgFields = a}) + +-- | Data format for the response. +etgAlt :: Lens' EditsTracksGet' Text +etgAlt = lens _etgAlt (\ s a -> s{_etgAlt = a}) + +instance GoogleRequest EditsTracksGet' where + type Rs EditsTracksGet' = Track + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTracksGet{..} + = go _etgQuotaUser _etgTrack _etgPrettyPrint + _etgPackageName + _etgUserIp + _etgKey + _etgOauthToken + _etgEditId + _etgFields + _etgAlt + where go + = clientWithRoute (Proxy :: Proxy EditsTracksGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/List.hs new file mode 100644 index 000000000..4a71279a5 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/List.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Tracks.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all the track configurations for this edit. +-- +-- /See:/ for @AndroidpublisherEditsTracksList@. +module Androidpublisher.Edits.Tracks.List + ( + -- * REST Resource + EditsTracksListAPI + + -- * Creating a Request + , editsTracksList + , EditsTracksList + + -- * Request Lenses + , etlQuotaUser + , etlPrettyPrint + , etlPackageName + , etlUserIp + , etlKey + , etlOauthToken + , etlEditId + , etlFields + , etlAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTracksList@ which the +-- 'EditsTracksList' request conforms to. +type EditsTracksListAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "tracks" :> Get '[JSON] TracksListResponse + +-- | Lists all the track configurations for this edit. +-- +-- /See:/ 'editsTracksList' smart constructor. +data EditsTracksList = EditsTracksList + { _etlQuotaUser :: !(Maybe Text) + , _etlPrettyPrint :: !Bool + , _etlPackageName :: !Text + , _etlUserIp :: !(Maybe Text) + , _etlKey :: !(Maybe Text) + , _etlOauthToken :: !(Maybe Text) + , _etlEditId :: !Text + , _etlFields :: !(Maybe Text) + , _etlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTracksList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etlQuotaUser' +-- +-- * 'etlPrettyPrint' +-- +-- * 'etlPackageName' +-- +-- * 'etlUserIp' +-- +-- * 'etlKey' +-- +-- * 'etlOauthToken' +-- +-- * 'etlEditId' +-- +-- * 'etlFields' +-- +-- * 'etlAlt' +editsTracksList + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTracksList +editsTracksList pEtlPackageName_ pEtlEditId_ = + EditsTracksList + { _etlQuotaUser = Nothing + , _etlPrettyPrint = True + , _etlPackageName = pEtlPackageName_ + , _etlUserIp = Nothing + , _etlKey = Nothing + , _etlOauthToken = Nothing + , _etlEditId = pEtlEditId_ + , _etlFields = Nothing + , _etlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etlQuotaUser :: Lens' EditsTracksList' (Maybe Text) +etlQuotaUser + = lens _etlQuotaUser (\ s a -> s{_etlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +etlPrettyPrint :: Lens' EditsTracksList' Bool +etlPrettyPrint + = lens _etlPrettyPrint + (\ s a -> s{_etlPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etlPackageName :: Lens' EditsTracksList' Text +etlPackageName + = lens _etlPackageName + (\ s a -> s{_etlPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etlUserIp :: Lens' EditsTracksList' (Maybe Text) +etlUserIp + = lens _etlUserIp (\ s a -> s{_etlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etlKey :: Lens' EditsTracksList' (Maybe Text) +etlKey = lens _etlKey (\ s a -> s{_etlKey = a}) + +-- | OAuth 2.0 token for the current user. +etlOauthToken :: Lens' EditsTracksList' (Maybe Text) +etlOauthToken + = lens _etlOauthToken + (\ s a -> s{_etlOauthToken = a}) + +-- | Unique identifier for this edit. +etlEditId :: Lens' EditsTracksList' Text +etlEditId + = lens _etlEditId (\ s a -> s{_etlEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etlFields :: Lens' EditsTracksList' (Maybe Text) +etlFields + = lens _etlFields (\ s a -> s{_etlFields = a}) + +-- | Data format for the response. +etlAlt :: Lens' EditsTracksList' Text +etlAlt = lens _etlAlt (\ s a -> s{_etlAlt = a}) + +instance GoogleRequest EditsTracksList' where + type Rs EditsTracksList' = TracksListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTracksList{..} + = go _etlQuotaUser _etlPrettyPrint _etlPackageName + _etlUserIp + _etlKey + _etlOauthToken + _etlEditId + _etlFields + _etlAlt + where go + = clientWithRoute (Proxy :: Proxy EditsTracksListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Patch.hs new file mode 100644 index 000000000..550aefd5e --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Patch.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Tracks.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the track configuration for the specified track type. When +-- halted, the rollout track cannot be updated without adding new APKs, and +-- adding new APKs will cause it to resume. This method supports patch +-- semantics. +-- +-- /See:/ for @AndroidpublisherEditsTracksPatch@. +module Androidpublisher.Edits.Tracks.Patch + ( + -- * REST Resource + EditsTracksPatchAPI + + -- * Creating a Request + , editsTracksPatch + , EditsTracksPatch + + -- * Request Lenses + , etpQuotaUser + , etpTrack + , etpPrettyPrint + , etpPackageName + , etpUserIp + , etpKey + , etpOauthToken + , etpEditId + , etpFields + , etpAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTracksPatch@ which the +-- 'EditsTracksPatch' request conforms to. +type EditsTracksPatchAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "tracks" :> + Capture "track" Text :> Patch '[JSON] Track + +-- | Updates the track configuration for the specified track type. When +-- halted, the rollout track cannot be updated without adding new APKs, and +-- adding new APKs will cause it to resume. This method supports patch +-- semantics. +-- +-- /See:/ 'editsTracksPatch' smart constructor. +data EditsTracksPatch = EditsTracksPatch + { _etpQuotaUser :: !(Maybe Text) + , _etpTrack :: !Text + , _etpPrettyPrint :: !Bool + , _etpPackageName :: !Text + , _etpUserIp :: !(Maybe Text) + , _etpKey :: !(Maybe Text) + , _etpOauthToken :: !(Maybe Text) + , _etpEditId :: !Text + , _etpFields :: !(Maybe Text) + , _etpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTracksPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etpQuotaUser' +-- +-- * 'etpTrack' +-- +-- * 'etpPrettyPrint' +-- +-- * 'etpPackageName' +-- +-- * 'etpUserIp' +-- +-- * 'etpKey' +-- +-- * 'etpOauthToken' +-- +-- * 'etpEditId' +-- +-- * 'etpFields' +-- +-- * 'etpAlt' +editsTracksPatch + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTracksPatch +editsTracksPatch pEtpTrack_ pEtpPackageName_ pEtpEditId_ = + EditsTracksPatch + { _etpQuotaUser = Nothing + , _etpTrack = pEtpTrack_ + , _etpPrettyPrint = True + , _etpPackageName = pEtpPackageName_ + , _etpUserIp = Nothing + , _etpKey = Nothing + , _etpOauthToken = Nothing + , _etpEditId = pEtpEditId_ + , _etpFields = Nothing + , _etpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etpQuotaUser :: Lens' EditsTracksPatch' (Maybe Text) +etpQuotaUser + = lens _etpQuotaUser (\ s a -> s{_etpQuotaUser = a}) + +-- | The track type to read or modify. +etpTrack :: Lens' EditsTracksPatch' Text +etpTrack = lens _etpTrack (\ s a -> s{_etpTrack = a}) + +-- | Returns response with indentations and line breaks. +etpPrettyPrint :: Lens' EditsTracksPatch' Bool +etpPrettyPrint + = lens _etpPrettyPrint + (\ s a -> s{_etpPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etpPackageName :: Lens' EditsTracksPatch' Text +etpPackageName + = lens _etpPackageName + (\ s a -> s{_etpPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etpUserIp :: Lens' EditsTracksPatch' (Maybe Text) +etpUserIp + = lens _etpUserIp (\ s a -> s{_etpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etpKey :: Lens' EditsTracksPatch' (Maybe Text) +etpKey = lens _etpKey (\ s a -> s{_etpKey = a}) + +-- | OAuth 2.0 token for the current user. +etpOauthToken :: Lens' EditsTracksPatch' (Maybe Text) +etpOauthToken + = lens _etpOauthToken + (\ s a -> s{_etpOauthToken = a}) + +-- | Unique identifier for this edit. +etpEditId :: Lens' EditsTracksPatch' Text +etpEditId + = lens _etpEditId (\ s a -> s{_etpEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etpFields :: Lens' EditsTracksPatch' (Maybe Text) +etpFields + = lens _etpFields (\ s a -> s{_etpFields = a}) + +-- | Data format for the response. +etpAlt :: Lens' EditsTracksPatch' Text +etpAlt = lens _etpAlt (\ s a -> s{_etpAlt = a}) + +instance GoogleRequest EditsTracksPatch' where + type Rs EditsTracksPatch' = Track + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTracksPatch{..} + = go _etpQuotaUser _etpTrack _etpPrettyPrint + _etpPackageName + _etpUserIp + _etpKey + _etpOauthToken + _etpEditId + _etpFields + _etpAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsTracksPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Update.hs new file mode 100644 index 000000000..5ed1ea7dc --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Tracks/Update.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Tracks.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the track configuration for the specified track type. When +-- halted, the rollout track cannot be updated without adding new APKs, and +-- adding new APKs will cause it to resume. +-- +-- /See:/ for @AndroidpublisherEditsTracksUpdate@. +module Androidpublisher.Edits.Tracks.Update + ( + -- * REST Resource + EditsTracksUpdateAPI + + -- * Creating a Request + , editsTracksUpdate + , EditsTracksUpdate + + -- * Request Lenses + , etuQuotaUser + , etuTrack + , etuPrettyPrint + , etuPackageName + , etuUserIp + , etuKey + , etuOauthToken + , etuEditId + , etuFields + , etuAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsTracksUpdate@ which the +-- 'EditsTracksUpdate' request conforms to. +type EditsTracksUpdateAPI = + Capture "packageName" Text :> + "edits" :> + Capture "editId" Text :> + "tracks" :> Capture "track" Text :> Put '[JSON] Track + +-- | Updates the track configuration for the specified track type. When +-- halted, the rollout track cannot be updated without adding new APKs, and +-- adding new APKs will cause it to resume. +-- +-- /See:/ 'editsTracksUpdate' smart constructor. +data EditsTracksUpdate = EditsTracksUpdate + { _etuQuotaUser :: !(Maybe Text) + , _etuTrack :: !Text + , _etuPrettyPrint :: !Bool + , _etuPackageName :: !Text + , _etuUserIp :: !(Maybe Text) + , _etuKey :: !(Maybe Text) + , _etuOauthToken :: !(Maybe Text) + , _etuEditId :: !Text + , _etuFields :: !(Maybe Text) + , _etuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsTracksUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etuQuotaUser' +-- +-- * 'etuTrack' +-- +-- * 'etuPrettyPrint' +-- +-- * 'etuPackageName' +-- +-- * 'etuUserIp' +-- +-- * 'etuKey' +-- +-- * 'etuOauthToken' +-- +-- * 'etuEditId' +-- +-- * 'etuFields' +-- +-- * 'etuAlt' +editsTracksUpdate + :: Text -- ^ 'track' + -> Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsTracksUpdate +editsTracksUpdate pEtuTrack_ pEtuPackageName_ pEtuEditId_ = + EditsTracksUpdate + { _etuQuotaUser = Nothing + , _etuTrack = pEtuTrack_ + , _etuPrettyPrint = True + , _etuPackageName = pEtuPackageName_ + , _etuUserIp = Nothing + , _etuKey = Nothing + , _etuOauthToken = Nothing + , _etuEditId = pEtuEditId_ + , _etuFields = Nothing + , _etuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +etuQuotaUser :: Lens' EditsTracksUpdate' (Maybe Text) +etuQuotaUser + = lens _etuQuotaUser (\ s a -> s{_etuQuotaUser = a}) + +-- | The track type to read or modify. +etuTrack :: Lens' EditsTracksUpdate' Text +etuTrack = lens _etuTrack (\ s a -> s{_etuTrack = a}) + +-- | Returns response with indentations and line breaks. +etuPrettyPrint :: Lens' EditsTracksUpdate' Bool +etuPrettyPrint + = lens _etuPrettyPrint + (\ s a -> s{_etuPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +etuPackageName :: Lens' EditsTracksUpdate' Text +etuPackageName + = lens _etuPackageName + (\ s a -> s{_etuPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +etuUserIp :: Lens' EditsTracksUpdate' (Maybe Text) +etuUserIp + = lens _etuUserIp (\ s a -> s{_etuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +etuKey :: Lens' EditsTracksUpdate' (Maybe Text) +etuKey = lens _etuKey (\ s a -> s{_etuKey = a}) + +-- | OAuth 2.0 token for the current user. +etuOauthToken :: Lens' EditsTracksUpdate' (Maybe Text) +etuOauthToken + = lens _etuOauthToken + (\ s a -> s{_etuOauthToken = a}) + +-- | Unique identifier for this edit. +etuEditId :: Lens' EditsTracksUpdate' Text +etuEditId + = lens _etuEditId (\ s a -> s{_etuEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +etuFields :: Lens' EditsTracksUpdate' (Maybe Text) +etuFields + = lens _etuFields (\ s a -> s{_etuFields = a}) + +-- | Data format for the response. +etuAlt :: Lens' EditsTracksUpdate' Text +etuAlt = lens _etuAlt (\ s a -> s{_etuAlt = a}) + +instance GoogleRequest EditsTracksUpdate' where + type Rs EditsTracksUpdate' = Track + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsTracksUpdate{..} + = go _etuQuotaUser _etuTrack _etuPrettyPrint + _etuPackageName + _etuUserIp + _etuKey + _etuOauthToken + _etuEditId + _etuFields + _etuAlt + where go + = clientWithRoute + (Proxy :: Proxy EditsTracksUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Validate.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Validate.hs new file mode 100644 index 000000000..3a77be78e --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Edits/Validate.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Edits.Validate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Checks that the edit can be successfully committed. The edit\'s changes +-- are not applied to the live app. +-- +-- /See:/ for @AndroidpublisherEditsValidate@. +module Androidpublisher.Edits.Validate + ( + -- * REST Resource + EditsValidateAPI + + -- * Creating a Request + , editsValidate + , EditsValidate + + -- * Request Lenses + , evQuotaUser + , evPrettyPrint + , evPackageName + , evUserIp + , evKey + , evOauthToken + , evEditId + , evFields + , evAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEditsValidate@ which the +-- 'EditsValidate' request conforms to. +type EditsValidateAPI = + Capture "packageName" Text :> + "edits" :> + "{editId}:validate" :> Post '[JSON] AppEdit + +-- | Checks that the edit can be successfully committed. The edit\'s changes +-- are not applied to the live app. +-- +-- /See:/ 'editsValidate' smart constructor. +data EditsValidate = EditsValidate + { _evQuotaUser :: !(Maybe Text) + , _evPrettyPrint :: !Bool + , _evPackageName :: !Text + , _evUserIp :: !(Maybe Text) + , _evKey :: !(Maybe Text) + , _evOauthToken :: !(Maybe Text) + , _evEditId :: !Text + , _evFields :: !(Maybe Text) + , _evAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EditsValidate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'evQuotaUser' +-- +-- * 'evPrettyPrint' +-- +-- * 'evPackageName' +-- +-- * 'evUserIp' +-- +-- * 'evKey' +-- +-- * 'evOauthToken' +-- +-- * 'evEditId' +-- +-- * 'evFields' +-- +-- * 'evAlt' +editsValidate + :: Text -- ^ 'packageName' + -> Text -- ^ 'editId' + -> EditsValidate +editsValidate pEvPackageName_ pEvEditId_ = + EditsValidate + { _evQuotaUser = Nothing + , _evPrettyPrint = True + , _evPackageName = pEvPackageName_ + , _evUserIp = Nothing + , _evKey = Nothing + , _evOauthToken = Nothing + , _evEditId = pEvEditId_ + , _evFields = Nothing + , _evAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +evQuotaUser :: Lens' EditsValidate' (Maybe Text) +evQuotaUser + = lens _evQuotaUser (\ s a -> s{_evQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +evPrettyPrint :: Lens' EditsValidate' Bool +evPrettyPrint + = lens _evPrettyPrint + (\ s a -> s{_evPrettyPrint = a}) + +-- | Unique identifier for the Android app that is being updated; for +-- example, \"com.spiffygame\". +evPackageName :: Lens' EditsValidate' Text +evPackageName + = lens _evPackageName + (\ s a -> s{_evPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +evUserIp :: Lens' EditsValidate' (Maybe Text) +evUserIp = lens _evUserIp (\ s a -> s{_evUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +evKey :: Lens' EditsValidate' (Maybe Text) +evKey = lens _evKey (\ s a -> s{_evKey = a}) + +-- | OAuth 2.0 token for the current user. +evOauthToken :: Lens' EditsValidate' (Maybe Text) +evOauthToken + = lens _evOauthToken (\ s a -> s{_evOauthToken = a}) + +-- | Unique identifier for this edit. +evEditId :: Lens' EditsValidate' Text +evEditId = lens _evEditId (\ s a -> s{_evEditId = a}) + +-- | Selector specifying which fields to include in a partial response. +evFields :: Lens' EditsValidate' (Maybe Text) +evFields = lens _evFields (\ s a -> s{_evFields = a}) + +-- | Data format for the response. +evAlt :: Lens' EditsValidate' Text +evAlt = lens _evAlt (\ s a -> s{_evAlt = a}) + +instance GoogleRequest EditsValidate' where + type Rs EditsValidate' = AppEdit + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EditsValidate{..} + = go _evQuotaUser _evPrettyPrint _evPackageName + _evUserIp + _evKey + _evOauthToken + _evEditId + _evFields + _evAlt + where go + = clientWithRoute (Proxy :: Proxy EditsValidateAPI) r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Entitlements/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Entitlements/List.hs new file mode 100644 index 000000000..3eb5e9e17 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Entitlements/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Entitlements.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the user\'s current inapp item or subscription entitlements +-- +-- /See:/ for @AndroidpublisherEntitlementsList@. +module Androidpublisher.Entitlements.List + ( + -- * REST Resource + EntitlementsListAPI + + -- * Creating a Request + , entitlementsList + , EntitlementsList + + -- * Request Lenses + , elQuotaUser + , elPrettyPrint + , elPackageName + , elUserIp + , elToken + , elKey + , elOauthToken + , elStartIndex + , elProductId + , elMaxResults + , elFields + , elAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherEntitlementsList@ which the +-- 'EntitlementsList' request conforms to. +type EntitlementsListAPI = + Capture "packageName" Text :> + "entitlements" :> + QueryParam "token" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "productId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] EntitlementsListResponse + +-- | Lists the user\'s current inapp item or subscription entitlements +-- +-- /See:/ 'entitlementsList' smart constructor. +data EntitlementsList = EntitlementsList + { _elQuotaUser :: !(Maybe Text) + , _elPrettyPrint :: !Bool + , _elPackageName :: !Text + , _elUserIp :: !(Maybe Text) + , _elToken :: !(Maybe Text) + , _elKey :: !(Maybe Text) + , _elOauthToken :: !(Maybe Text) + , _elStartIndex :: !(Maybe Word32) + , _elProductId :: !(Maybe Text) + , _elMaxResults :: !(Maybe Word32) + , _elFields :: !(Maybe Text) + , _elAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elQuotaUser' +-- +-- * 'elPrettyPrint' +-- +-- * 'elPackageName' +-- +-- * 'elUserIp' +-- +-- * 'elToken' +-- +-- * 'elKey' +-- +-- * 'elOauthToken' +-- +-- * 'elStartIndex' +-- +-- * 'elProductId' +-- +-- * 'elMaxResults' +-- +-- * 'elFields' +-- +-- * 'elAlt' +entitlementsList + :: Text -- ^ 'packageName' + -> EntitlementsList +entitlementsList pElPackageName_ = + EntitlementsList + { _elQuotaUser = Nothing + , _elPrettyPrint = True + , _elPackageName = pElPackageName_ + , _elUserIp = Nothing + , _elToken = Nothing + , _elKey = Nothing + , _elOauthToken = Nothing + , _elStartIndex = Nothing + , _elProductId = Nothing + , _elMaxResults = Nothing + , _elFields = Nothing + , _elAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elQuotaUser :: Lens' EntitlementsList' (Maybe Text) +elQuotaUser + = lens _elQuotaUser (\ s a -> s{_elQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elPrettyPrint :: Lens' EntitlementsList' Bool +elPrettyPrint + = lens _elPrettyPrint + (\ s a -> s{_elPrettyPrint = a}) + +-- | The package name of the application the inapp product was sold in (for +-- example, \'com.some.thing\'). +elPackageName :: Lens' EntitlementsList' Text +elPackageName + = lens _elPackageName + (\ s a -> s{_elPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elUserIp :: Lens' EntitlementsList' (Maybe Text) +elUserIp = lens _elUserIp (\ s a -> s{_elUserIp = a}) + +elToken :: Lens' EntitlementsList' (Maybe Text) +elToken = lens _elToken (\ s a -> s{_elToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elKey :: Lens' EntitlementsList' (Maybe Text) +elKey = lens _elKey (\ s a -> s{_elKey = a}) + +-- | OAuth 2.0 token for the current user. +elOauthToken :: Lens' EntitlementsList' (Maybe Text) +elOauthToken + = lens _elOauthToken (\ s a -> s{_elOauthToken = a}) + +elStartIndex :: Lens' EntitlementsList' (Maybe Word32) +elStartIndex + = lens _elStartIndex (\ s a -> s{_elStartIndex = a}) + +-- | The product id of the inapp product (for example, \'sku1\'). This can be +-- used to restrict the result set. +elProductId :: Lens' EntitlementsList' (Maybe Text) +elProductId + = lens _elProductId (\ s a -> s{_elProductId = a}) + +elMaxResults :: Lens' EntitlementsList' (Maybe Word32) +elMaxResults + = lens _elMaxResults (\ s a -> s{_elMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +elFields :: Lens' EntitlementsList' (Maybe Text) +elFields = lens _elFields (\ s a -> s{_elFields = a}) + +-- | Data format for the response. +elAlt :: Lens' EntitlementsList' Text +elAlt = lens _elAlt (\ s a -> s{_elAlt = a}) + +instance GoogleRequest EntitlementsList' where + type Rs EntitlementsList' = EntitlementsListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u EntitlementsList{..} + = go _elQuotaUser _elPrettyPrint _elPackageName + _elUserIp + _elToken + _elKey + _elOauthToken + _elStartIndex + _elProductId + _elMaxResults + _elFields + _elAlt + where go + = clientWithRoute + (Proxy :: Proxy EntitlementsListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Batch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Batch.hs new file mode 100644 index 000000000..e75bdd658 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Batch.hs @@ -0,0 +1,142 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Batch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- + +-- +-- /See:/ for @AndroidpublisherInappproductsBatch@. +module Androidpublisher.Inappproducts.Batch + ( + -- * REST Resource + InappproductsBatchAPI + + -- * Creating a Request + , inappproductsBatch + , InappproductsBatch + + -- * Request Lenses + , ibQuotaUser + , ibPrettyPrint + , ibUserIp + , ibKey + , ibOauthToken + , ibFields + , ibAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsBatch@ which the +-- 'InappproductsBatch' request conforms to. +type InappproductsBatchAPI = + "inappproducts" :> + "batch" :> Post '[JSON] InappproductsBatchResponse + +-- +-- /See:/ 'inappproductsBatch' smart constructor. +data InappproductsBatch = InappproductsBatch + { _ibQuotaUser :: !(Maybe Text) + , _ibPrettyPrint :: !Bool + , _ibUserIp :: !(Maybe Text) + , _ibKey :: !(Maybe Text) + , _ibOauthToken :: !(Maybe Text) + , _ibFields :: !(Maybe Text) + , _ibAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsBatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ibQuotaUser' +-- +-- * 'ibPrettyPrint' +-- +-- * 'ibUserIp' +-- +-- * 'ibKey' +-- +-- * 'ibOauthToken' +-- +-- * 'ibFields' +-- +-- * 'ibAlt' +inappproductsBatch + :: InappproductsBatch +inappproductsBatch = + InappproductsBatch + { _ibQuotaUser = Nothing + , _ibPrettyPrint = True + , _ibUserIp = Nothing + , _ibKey = Nothing + , _ibOauthToken = Nothing + , _ibFields = Nothing + , _ibAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ibQuotaUser :: Lens' InappproductsBatch' (Maybe Text) +ibQuotaUser + = lens _ibQuotaUser (\ s a -> s{_ibQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ibPrettyPrint :: Lens' InappproductsBatch' Bool +ibPrettyPrint + = lens _ibPrettyPrint + (\ s a -> s{_ibPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ibUserIp :: Lens' InappproductsBatch' (Maybe Text) +ibUserIp = lens _ibUserIp (\ s a -> s{_ibUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ibKey :: Lens' InappproductsBatch' (Maybe Text) +ibKey = lens _ibKey (\ s a -> s{_ibKey = a}) + +-- | OAuth 2.0 token for the current user. +ibOauthToken :: Lens' InappproductsBatch' (Maybe Text) +ibOauthToken + = lens _ibOauthToken (\ s a -> s{_ibOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ibFields :: Lens' InappproductsBatch' (Maybe Text) +ibFields = lens _ibFields (\ s a -> s{_ibFields = a}) + +-- | Data format for the response. +ibAlt :: Lens' InappproductsBatch' Text +ibAlt = lens _ibAlt (\ s a -> s{_ibAlt = a}) + +instance GoogleRequest InappproductsBatch' where + type Rs InappproductsBatch' = + InappproductsBatchResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsBatch{..} + = go _ibQuotaUser _ibPrettyPrint _ibUserIp _ibKey + _ibOauthToken + _ibFields + _ibAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsBatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Delete.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Delete.hs new file mode 100644 index 000000000..9bdb228a9 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Delete.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete an in-app product for an app. +-- +-- /See:/ for @AndroidpublisherInappproductsDelete@. +module Androidpublisher.Inappproducts.Delete + ( + -- * REST Resource + InappproductsDeleteAPI + + -- * Creating a Request + , inappproductsDelete + , InappproductsDelete + + -- * Request Lenses + , idQuotaUser + , idPrettyPrint + , idPackageName + , idUserIp + , idKey + , idSku + , idOauthToken + , idFields + , idAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsDelete@ which the +-- 'InappproductsDelete' request conforms to. +type InappproductsDeleteAPI = + Capture "packageName" Text :> + "inappproducts" :> + Capture "sku" Text :> Delete '[JSON] () + +-- | Delete an in-app product for an app. +-- +-- /See:/ 'inappproductsDelete' smart constructor. +data InappproductsDelete = InappproductsDelete + { _idQuotaUser :: !(Maybe Text) + , _idPrettyPrint :: !Bool + , _idPackageName :: !Text + , _idUserIp :: !(Maybe Text) + , _idKey :: !(Maybe Text) + , _idSku :: !Text + , _idOauthToken :: !(Maybe Text) + , _idFields :: !(Maybe Text) + , _idAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idQuotaUser' +-- +-- * 'idPrettyPrint' +-- +-- * 'idPackageName' +-- +-- * 'idUserIp' +-- +-- * 'idKey' +-- +-- * 'idSku' +-- +-- * 'idOauthToken' +-- +-- * 'idFields' +-- +-- * 'idAlt' +inappproductsDelete + :: Text -- ^ 'packageName' + -> Text -- ^ 'sku' + -> InappproductsDelete +inappproductsDelete pIdPackageName_ pIdSku_ = + InappproductsDelete + { _idQuotaUser = Nothing + , _idPrettyPrint = True + , _idPackageName = pIdPackageName_ + , _idUserIp = Nothing + , _idKey = Nothing + , _idSku = pIdSku_ + , _idOauthToken = Nothing + , _idFields = Nothing + , _idAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +idQuotaUser :: Lens' InappproductsDelete' (Maybe Text) +idQuotaUser + = lens _idQuotaUser (\ s a -> s{_idQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +idPrettyPrint :: Lens' InappproductsDelete' Bool +idPrettyPrint + = lens _idPrettyPrint + (\ s a -> s{_idPrettyPrint = a}) + +-- | Unique identifier for the Android app with the in-app product; for +-- example, \"com.spiffygame\". +idPackageName :: Lens' InappproductsDelete' Text +idPackageName + = lens _idPackageName + (\ s a -> s{_idPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +idUserIp :: Lens' InappproductsDelete' (Maybe Text) +idUserIp = lens _idUserIp (\ s a -> s{_idUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idKey :: Lens' InappproductsDelete' (Maybe Text) +idKey = lens _idKey (\ s a -> s{_idKey = a}) + +-- | Unique identifier for the in-app product. +idSku :: Lens' InappproductsDelete' Text +idSku = lens _idSku (\ s a -> s{_idSku = a}) + +-- | OAuth 2.0 token for the current user. +idOauthToken :: Lens' InappproductsDelete' (Maybe Text) +idOauthToken + = lens _idOauthToken (\ s a -> s{_idOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +idFields :: Lens' InappproductsDelete' (Maybe Text) +idFields = lens _idFields (\ s a -> s{_idFields = a}) + +-- | Data format for the response. +idAlt :: Lens' InappproductsDelete' Text +idAlt = lens _idAlt (\ s a -> s{_idAlt = a}) + +instance GoogleRequest InappproductsDelete' where + type Rs InappproductsDelete' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsDelete{..} + = go _idQuotaUser _idPrettyPrint _idPackageName + _idUserIp + _idKey + _idSku + _idOauthToken + _idFields + _idAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsDeleteAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Get.hs new file mode 100644 index 000000000..17f44ff88 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns information about the in-app product specified. +-- +-- /See:/ for @AndroidpublisherInappproductsGet@. +module Androidpublisher.Inappproducts.Get + ( + -- * REST Resource + InappproductsGetAPI + + -- * Creating a Request + , inappproductsGet + , InappproductsGet + + -- * Request Lenses + , igQuotaUser + , igPrettyPrint + , igPackageName + , igUserIp + , igKey + , igSku + , igOauthToken + , igFields + , igAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsGet@ which the +-- 'InappproductsGet' request conforms to. +type InappproductsGetAPI = + Capture "packageName" Text :> + "inappproducts" :> + Capture "sku" Text :> Get '[JSON] InAppProduct + +-- | Returns information about the in-app product specified. +-- +-- /See:/ 'inappproductsGet' smart constructor. +data InappproductsGet = InappproductsGet + { _igQuotaUser :: !(Maybe Text) + , _igPrettyPrint :: !Bool + , _igPackageName :: !Text + , _igUserIp :: !(Maybe Text) + , _igKey :: !(Maybe Text) + , _igSku :: !Text + , _igOauthToken :: !(Maybe Text) + , _igFields :: !(Maybe Text) + , _igAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igQuotaUser' +-- +-- * 'igPrettyPrint' +-- +-- * 'igPackageName' +-- +-- * 'igUserIp' +-- +-- * 'igKey' +-- +-- * 'igSku' +-- +-- * 'igOauthToken' +-- +-- * 'igFields' +-- +-- * 'igAlt' +inappproductsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'sku' + -> InappproductsGet +inappproductsGet pIgPackageName_ pIgSku_ = + InappproductsGet + { _igQuotaUser = Nothing + , _igPrettyPrint = True + , _igPackageName = pIgPackageName_ + , _igUserIp = Nothing + , _igKey = Nothing + , _igSku = pIgSku_ + , _igOauthToken = Nothing + , _igFields = Nothing + , _igAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igQuotaUser :: Lens' InappproductsGet' (Maybe Text) +igQuotaUser + = lens _igQuotaUser (\ s a -> s{_igQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igPrettyPrint :: Lens' InappproductsGet' Bool +igPrettyPrint + = lens _igPrettyPrint + (\ s a -> s{_igPrettyPrint = a}) + +igPackageName :: Lens' InappproductsGet' Text +igPackageName + = lens _igPackageName + (\ s a -> s{_igPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igUserIp :: Lens' InappproductsGet' (Maybe Text) +igUserIp = lens _igUserIp (\ s a -> s{_igUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igKey :: Lens' InappproductsGet' (Maybe Text) +igKey = lens _igKey (\ s a -> s{_igKey = a}) + +-- | Unique identifier for the in-app product. +igSku :: Lens' InappproductsGet' Text +igSku = lens _igSku (\ s a -> s{_igSku = a}) + +-- | OAuth 2.0 token for the current user. +igOauthToken :: Lens' InappproductsGet' (Maybe Text) +igOauthToken + = lens _igOauthToken (\ s a -> s{_igOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igFields :: Lens' InappproductsGet' (Maybe Text) +igFields = lens _igFields (\ s a -> s{_igFields = a}) + +-- | Data format for the response. +igAlt :: Lens' InappproductsGet' Text +igAlt = lens _igAlt (\ s a -> s{_igAlt = a}) + +instance GoogleRequest InappproductsGet' where + type Rs InappproductsGet' = InAppProduct + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsGet{..} + = go _igQuotaUser _igPrettyPrint _igPackageName + _igUserIp + _igKey + _igSku + _igOauthToken + _igFields + _igAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Insert.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Insert.hs new file mode 100644 index 000000000..a56e01546 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new in-app product for an app. +-- +-- /See:/ for @AndroidpublisherInappproductsInsert@. +module Androidpublisher.Inappproducts.Insert + ( + -- * REST Resource + InappproductsInsertAPI + + -- * Creating a Request + , inappproductsInsert + , InappproductsInsert + + -- * Request Lenses + , iiQuotaUser + , iiPrettyPrint + , iiAutoConvertMissingPrices + , iiPackageName + , iiUserIp + , iiKey + , iiOauthToken + , iiFields + , iiAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsInsert@ which the +-- 'InappproductsInsert' request conforms to. +type InappproductsInsertAPI = + Capture "packageName" Text :> + "inappproducts" :> + QueryParam "autoConvertMissingPrices" Bool :> + Post '[JSON] InAppProduct + +-- | Creates a new in-app product for an app. +-- +-- /See:/ 'inappproductsInsert' smart constructor. +data InappproductsInsert = InappproductsInsert + { _iiQuotaUser :: !(Maybe Text) + , _iiPrettyPrint :: !Bool + , _iiAutoConvertMissingPrices :: !(Maybe Bool) + , _iiPackageName :: !Text + , _iiUserIp :: !(Maybe Text) + , _iiKey :: !(Maybe Text) + , _iiOauthToken :: !(Maybe Text) + , _iiFields :: !(Maybe Text) + , _iiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiQuotaUser' +-- +-- * 'iiPrettyPrint' +-- +-- * 'iiAutoConvertMissingPrices' +-- +-- * 'iiPackageName' +-- +-- * 'iiUserIp' +-- +-- * 'iiKey' +-- +-- * 'iiOauthToken' +-- +-- * 'iiFields' +-- +-- * 'iiAlt' +inappproductsInsert + :: Text -- ^ 'packageName' + -> InappproductsInsert +inappproductsInsert pIiPackageName_ = + InappproductsInsert + { _iiQuotaUser = Nothing + , _iiPrettyPrint = True + , _iiAutoConvertMissingPrices = Nothing + , _iiPackageName = pIiPackageName_ + , _iiUserIp = Nothing + , _iiKey = Nothing + , _iiOauthToken = Nothing + , _iiFields = Nothing + , _iiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iiQuotaUser :: Lens' InappproductsInsert' (Maybe Text) +iiQuotaUser + = lens _iiQuotaUser (\ s a -> s{_iiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iiPrettyPrint :: Lens' InappproductsInsert' Bool +iiPrettyPrint + = lens _iiPrettyPrint + (\ s a -> s{_iiPrettyPrint = a}) + +-- | If true the prices for all regions targeted by the parent app that +-- don\'t have a price specified for this in-app product will be auto +-- converted to the target currency based on the default price. Defaults to +-- false. +iiAutoConvertMissingPrices :: Lens' InappproductsInsert' (Maybe Bool) +iiAutoConvertMissingPrices + = lens _iiAutoConvertMissingPrices + (\ s a -> s{_iiAutoConvertMissingPrices = a}) + +-- | Unique identifier for the Android app; for example, \"com.spiffygame\". +iiPackageName :: Lens' InappproductsInsert' Text +iiPackageName + = lens _iiPackageName + (\ s a -> s{_iiPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iiUserIp :: Lens' InappproductsInsert' (Maybe Text) +iiUserIp = lens _iiUserIp (\ s a -> s{_iiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iiKey :: Lens' InappproductsInsert' (Maybe Text) +iiKey = lens _iiKey (\ s a -> s{_iiKey = a}) + +-- | OAuth 2.0 token for the current user. +iiOauthToken :: Lens' InappproductsInsert' (Maybe Text) +iiOauthToken + = lens _iiOauthToken (\ s a -> s{_iiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iiFields :: Lens' InappproductsInsert' (Maybe Text) +iiFields = lens _iiFields (\ s a -> s{_iiFields = a}) + +-- | Data format for the response. +iiAlt :: Lens' InappproductsInsert' Text +iiAlt = lens _iiAlt (\ s a -> s{_iiAlt = a}) + +instance GoogleRequest InappproductsInsert' where + type Rs InappproductsInsert' = InAppProduct + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsInsert{..} + = go _iiQuotaUser _iiPrettyPrint + _iiAutoConvertMissingPrices + _iiPackageName + _iiUserIp + _iiKey + _iiOauthToken + _iiFields + _iiAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsInsertAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/List.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/List.hs new file mode 100644 index 000000000..822e47d88 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all the in-app products for an Android app, both subscriptions and +-- managed in-app products.. +-- +-- /See:/ for @AndroidpublisherInappproductsList@. +module Androidpublisher.Inappproducts.List + ( + -- * REST Resource + InappproductsListAPI + + -- * Creating a Request + , inappproductsList + , InappproductsList + + -- * Request Lenses + , ilQuotaUser + , ilPrettyPrint + , ilPackageName + , ilUserIp + , ilToken + , ilKey + , ilOauthToken + , ilStartIndex + , ilMaxResults + , ilFields + , ilAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsList@ which the +-- 'InappproductsList' request conforms to. +type InappproductsListAPI = + Capture "packageName" Text :> + "inappproducts" :> + QueryParam "token" Text :> + QueryParam "startIndex" Word32 :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InappproductsListResponse + +-- | List all the in-app products for an Android app, both subscriptions and +-- managed in-app products.. +-- +-- /See:/ 'inappproductsList' smart constructor. +data InappproductsList = InappproductsList + { _ilQuotaUser :: !(Maybe Text) + , _ilPrettyPrint :: !Bool + , _ilPackageName :: !Text + , _ilUserIp :: !(Maybe Text) + , _ilToken :: !(Maybe Text) + , _ilKey :: !(Maybe Text) + , _ilOauthToken :: !(Maybe Text) + , _ilStartIndex :: !(Maybe Word32) + , _ilMaxResults :: !(Maybe Word32) + , _ilFields :: !(Maybe Text) + , _ilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilQuotaUser' +-- +-- * 'ilPrettyPrint' +-- +-- * 'ilPackageName' +-- +-- * 'ilUserIp' +-- +-- * 'ilToken' +-- +-- * 'ilKey' +-- +-- * 'ilOauthToken' +-- +-- * 'ilStartIndex' +-- +-- * 'ilMaxResults' +-- +-- * 'ilFields' +-- +-- * 'ilAlt' +inappproductsList + :: Text -- ^ 'packageName' + -> InappproductsList +inappproductsList pIlPackageName_ = + InappproductsList + { _ilQuotaUser = Nothing + , _ilPrettyPrint = True + , _ilPackageName = pIlPackageName_ + , _ilUserIp = Nothing + , _ilToken = Nothing + , _ilKey = Nothing + , _ilOauthToken = Nothing + , _ilStartIndex = Nothing + , _ilMaxResults = Nothing + , _ilFields = Nothing + , _ilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ilQuotaUser :: Lens' InappproductsList' (Maybe Text) +ilQuotaUser + = lens _ilQuotaUser (\ s a -> s{_ilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ilPrettyPrint :: Lens' InappproductsList' Bool +ilPrettyPrint + = lens _ilPrettyPrint + (\ s a -> s{_ilPrettyPrint = a}) + +-- | Unique identifier for the Android app with in-app products; for example, +-- \"com.spiffygame\". +ilPackageName :: Lens' InappproductsList' Text +ilPackageName + = lens _ilPackageName + (\ s a -> s{_ilPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ilUserIp :: Lens' InappproductsList' (Maybe Text) +ilUserIp = lens _ilUserIp (\ s a -> s{_ilUserIp = a}) + +ilToken :: Lens' InappproductsList' (Maybe Text) +ilToken = lens _ilToken (\ s a -> s{_ilToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ilKey :: Lens' InappproductsList' (Maybe Text) +ilKey = lens _ilKey (\ s a -> s{_ilKey = a}) + +-- | OAuth 2.0 token for the current user. +ilOauthToken :: Lens' InappproductsList' (Maybe Text) +ilOauthToken + = lens _ilOauthToken (\ s a -> s{_ilOauthToken = a}) + +ilStartIndex :: Lens' InappproductsList' (Maybe Word32) +ilStartIndex + = lens _ilStartIndex (\ s a -> s{_ilStartIndex = a}) + +ilMaxResults :: Lens' InappproductsList' (Maybe Word32) +ilMaxResults + = lens _ilMaxResults (\ s a -> s{_ilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ilFields :: Lens' InappproductsList' (Maybe Text) +ilFields = lens _ilFields (\ s a -> s{_ilFields = a}) + +-- | Data format for the response. +ilAlt :: Lens' InappproductsList' Text +ilAlt = lens _ilAlt (\ s a -> s{_ilAlt = a}) + +instance GoogleRequest InappproductsList' where + type Rs InappproductsList' = + InappproductsListResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsList{..} + = go _ilQuotaUser _ilPrettyPrint _ilPackageName + _ilUserIp + _ilToken + _ilKey + _ilOauthToken + _ilStartIndex + _ilMaxResults + _ilFields + _ilAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsListAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Patch.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Patch.hs new file mode 100644 index 000000000..54516b180 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Patch.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the details of an in-app product. This method supports patch +-- semantics. +-- +-- /See:/ for @AndroidpublisherInappproductsPatch@. +module Androidpublisher.Inappproducts.Patch + ( + -- * REST Resource + InappproductsPatchAPI + + -- * Creating a Request + , inappproductsPatch + , InappproductsPatch + + -- * Request Lenses + , ipQuotaUser + , ipPrettyPrint + , ipAutoConvertMissingPrices + , ipPackageName + , ipUserIp + , ipKey + , ipSku + , ipOauthToken + , ipFields + , ipAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsPatch@ which the +-- 'InappproductsPatch' request conforms to. +type InappproductsPatchAPI = + Capture "packageName" Text :> + "inappproducts" :> + Capture "sku" Text :> + QueryParam "autoConvertMissingPrices" Bool :> + Patch '[JSON] InAppProduct + +-- | Updates the details of an in-app product. This method supports patch +-- semantics. +-- +-- /See:/ 'inappproductsPatch' smart constructor. +data InappproductsPatch = InappproductsPatch + { _ipQuotaUser :: !(Maybe Text) + , _ipPrettyPrint :: !Bool + , _ipAutoConvertMissingPrices :: !(Maybe Bool) + , _ipPackageName :: !Text + , _ipUserIp :: !(Maybe Text) + , _ipKey :: !(Maybe Text) + , _ipSku :: !Text + , _ipOauthToken :: !(Maybe Text) + , _ipFields :: !(Maybe Text) + , _ipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipQuotaUser' +-- +-- * 'ipPrettyPrint' +-- +-- * 'ipAutoConvertMissingPrices' +-- +-- * 'ipPackageName' +-- +-- * 'ipUserIp' +-- +-- * 'ipKey' +-- +-- * 'ipSku' +-- +-- * 'ipOauthToken' +-- +-- * 'ipFields' +-- +-- * 'ipAlt' +inappproductsPatch + :: Text -- ^ 'packageName' + -> Text -- ^ 'sku' + -> InappproductsPatch +inappproductsPatch pIpPackageName_ pIpSku_ = + InappproductsPatch + { _ipQuotaUser = Nothing + , _ipPrettyPrint = True + , _ipAutoConvertMissingPrices = Nothing + , _ipPackageName = pIpPackageName_ + , _ipUserIp = Nothing + , _ipKey = Nothing + , _ipSku = pIpSku_ + , _ipOauthToken = Nothing + , _ipFields = Nothing + , _ipAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ipQuotaUser :: Lens' InappproductsPatch' (Maybe Text) +ipQuotaUser + = lens _ipQuotaUser (\ s a -> s{_ipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ipPrettyPrint :: Lens' InappproductsPatch' Bool +ipPrettyPrint + = lens _ipPrettyPrint + (\ s a -> s{_ipPrettyPrint = a}) + +-- | If true the prices for all regions targeted by the parent app that +-- don\'t have a price specified for this in-app product will be auto +-- converted to the target currency based on the default price. Defaults to +-- false. +ipAutoConvertMissingPrices :: Lens' InappproductsPatch' (Maybe Bool) +ipAutoConvertMissingPrices + = lens _ipAutoConvertMissingPrices + (\ s a -> s{_ipAutoConvertMissingPrices = a}) + +-- | Unique identifier for the Android app with the in-app product; for +-- example, \"com.spiffygame\". +ipPackageName :: Lens' InappproductsPatch' Text +ipPackageName + = lens _ipPackageName + (\ s a -> s{_ipPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ipUserIp :: Lens' InappproductsPatch' (Maybe Text) +ipUserIp = lens _ipUserIp (\ s a -> s{_ipUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ipKey :: Lens' InappproductsPatch' (Maybe Text) +ipKey = lens _ipKey (\ s a -> s{_ipKey = a}) + +-- | Unique identifier for the in-app product. +ipSku :: Lens' InappproductsPatch' Text +ipSku = lens _ipSku (\ s a -> s{_ipSku = a}) + +-- | OAuth 2.0 token for the current user. +ipOauthToken :: Lens' InappproductsPatch' (Maybe Text) +ipOauthToken + = lens _ipOauthToken (\ s a -> s{_ipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ipFields :: Lens' InappproductsPatch' (Maybe Text) +ipFields = lens _ipFields (\ s a -> s{_ipFields = a}) + +-- | Data format for the response. +ipAlt :: Lens' InappproductsPatch' Text +ipAlt = lens _ipAlt (\ s a -> s{_ipAlt = a}) + +instance GoogleRequest InappproductsPatch' where + type Rs InappproductsPatch' = InAppProduct + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsPatch{..} + = go _ipQuotaUser _ipPrettyPrint + _ipAutoConvertMissingPrices + _ipPackageName + _ipUserIp + _ipKey + _ipSku + _ipOauthToken + _ipFields + _ipAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsPatchAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Update.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Update.hs new file mode 100644 index 000000000..ab43afb28 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Inappproducts/Update.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Inappproducts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the details of an in-app product. +-- +-- /See:/ for @AndroidpublisherInappproductsUpdate@. +module Androidpublisher.Inappproducts.Update + ( + -- * REST Resource + InappproductsUpdateAPI + + -- * Creating a Request + , inappproductsUpdate + , InappproductsUpdate + + -- * Request Lenses + , iuQuotaUser + , iuPrettyPrint + , iuAutoConvertMissingPrices + , iuPackageName + , iuUserIp + , iuKey + , iuSku + , iuOauthToken + , iuFields + , iuAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherInappproductsUpdate@ which the +-- 'InappproductsUpdate' request conforms to. +type InappproductsUpdateAPI = + Capture "packageName" Text :> + "inappproducts" :> + Capture "sku" Text :> + QueryParam "autoConvertMissingPrices" Bool :> + Put '[JSON] InAppProduct + +-- | Updates the details of an in-app product. +-- +-- /See:/ 'inappproductsUpdate' smart constructor. +data InappproductsUpdate = InappproductsUpdate + { _iuQuotaUser :: !(Maybe Text) + , _iuPrettyPrint :: !Bool + , _iuAutoConvertMissingPrices :: !(Maybe Bool) + , _iuPackageName :: !Text + , _iuUserIp :: !(Maybe Text) + , _iuKey :: !(Maybe Text) + , _iuSku :: !Text + , _iuOauthToken :: !(Maybe Text) + , _iuFields :: !(Maybe Text) + , _iuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InappproductsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iuQuotaUser' +-- +-- * 'iuPrettyPrint' +-- +-- * 'iuAutoConvertMissingPrices' +-- +-- * 'iuPackageName' +-- +-- * 'iuUserIp' +-- +-- * 'iuKey' +-- +-- * 'iuSku' +-- +-- * 'iuOauthToken' +-- +-- * 'iuFields' +-- +-- * 'iuAlt' +inappproductsUpdate + :: Text -- ^ 'packageName' + -> Text -- ^ 'sku' + -> InappproductsUpdate +inappproductsUpdate pIuPackageName_ pIuSku_ = + InappproductsUpdate + { _iuQuotaUser = Nothing + , _iuPrettyPrint = True + , _iuAutoConvertMissingPrices = Nothing + , _iuPackageName = pIuPackageName_ + , _iuUserIp = Nothing + , _iuKey = Nothing + , _iuSku = pIuSku_ + , _iuOauthToken = Nothing + , _iuFields = Nothing + , _iuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iuQuotaUser :: Lens' InappproductsUpdate' (Maybe Text) +iuQuotaUser + = lens _iuQuotaUser (\ s a -> s{_iuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iuPrettyPrint :: Lens' InappproductsUpdate' Bool +iuPrettyPrint + = lens _iuPrettyPrint + (\ s a -> s{_iuPrettyPrint = a}) + +-- | If true the prices for all regions targeted by the parent app that +-- don\'t have a price specified for this in-app product will be auto +-- converted to the target currency based on the default price. Defaults to +-- false. +iuAutoConvertMissingPrices :: Lens' InappproductsUpdate' (Maybe Bool) +iuAutoConvertMissingPrices + = lens _iuAutoConvertMissingPrices + (\ s a -> s{_iuAutoConvertMissingPrices = a}) + +-- | Unique identifier for the Android app with the in-app product; for +-- example, \"com.spiffygame\". +iuPackageName :: Lens' InappproductsUpdate' Text +iuPackageName + = lens _iuPackageName + (\ s a -> s{_iuPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iuUserIp :: Lens' InappproductsUpdate' (Maybe Text) +iuUserIp = lens _iuUserIp (\ s a -> s{_iuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iuKey :: Lens' InappproductsUpdate' (Maybe Text) +iuKey = lens _iuKey (\ s a -> s{_iuKey = a}) + +-- | Unique identifier for the in-app product. +iuSku :: Lens' InappproductsUpdate' Text +iuSku = lens _iuSku (\ s a -> s{_iuSku = a}) + +-- | OAuth 2.0 token for the current user. +iuOauthToken :: Lens' InappproductsUpdate' (Maybe Text) +iuOauthToken + = lens _iuOauthToken (\ s a -> s{_iuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iuFields :: Lens' InappproductsUpdate' (Maybe Text) +iuFields = lens _iuFields (\ s a -> s{_iuFields = a}) + +-- | Data format for the response. +iuAlt :: Lens' InappproductsUpdate' Text +iuAlt = lens _iuAlt (\ s a -> s{_iuAlt = a}) + +instance GoogleRequest InappproductsUpdate' where + type Rs InappproductsUpdate' = InAppProduct + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u InappproductsUpdate{..} + = go _iuQuotaUser _iuPrettyPrint + _iuAutoConvertMissingPrices + _iuPackageName + _iuUserIp + _iuKey + _iuSku + _iuOauthToken + _iuFields + _iuAlt + where go + = clientWithRoute + (Proxy :: Proxy InappproductsUpdateAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Products/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Products/Get.hs new file mode 100644 index 000000000..f120d9cbf --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Products/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Products.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Checks the purchase and consumption status of an inapp item. +-- +-- /See:/ for @AndroidpublisherPurchasesProductsGet@. +module Androidpublisher.Purchases.Products.Get + ( + -- * REST Resource + PurchasesProductsGetAPI + + -- * Creating a Request + , purchasesProductsGet + , PurchasesProductsGet + + -- * Request Lenses + , ppgQuotaUser + , ppgPrettyPrint + , ppgPackageName + , ppgUserIp + , ppgToken + , ppgKey + , ppgOauthToken + , ppgProductId + , ppgFields + , ppgAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesProductsGet@ which the +-- 'PurchasesProductsGet' request conforms to. +type PurchasesProductsGetAPI = + Capture "packageName" Text :> + "purchases" :> + "products" :> + Capture "productId" Text :> + "tokens" :> + Capture "token" Text :> Get '[JSON] ProductPurchase + +-- | Checks the purchase and consumption status of an inapp item. +-- +-- /See:/ 'purchasesProductsGet' smart constructor. +data PurchasesProductsGet = PurchasesProductsGet + { _ppgQuotaUser :: !(Maybe Text) + , _ppgPrettyPrint :: !Bool + , _ppgPackageName :: !Text + , _ppgUserIp :: !(Maybe Text) + , _ppgToken :: !Text + , _ppgKey :: !(Maybe Text) + , _ppgOauthToken :: !(Maybe Text) + , _ppgProductId :: !Text + , _ppgFields :: !(Maybe Text) + , _ppgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesProductsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppgQuotaUser' +-- +-- * 'ppgPrettyPrint' +-- +-- * 'ppgPackageName' +-- +-- * 'ppgUserIp' +-- +-- * 'ppgToken' +-- +-- * 'ppgKey' +-- +-- * 'ppgOauthToken' +-- +-- * 'ppgProductId' +-- +-- * 'ppgFields' +-- +-- * 'ppgAlt' +purchasesProductsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'productId' + -> PurchasesProductsGet +purchasesProductsGet pPpgPackageName_ pPpgToken_ pPpgProductId_ = + PurchasesProductsGet + { _ppgQuotaUser = Nothing + , _ppgPrettyPrint = True + , _ppgPackageName = pPpgPackageName_ + , _ppgUserIp = Nothing + , _ppgToken = pPpgToken_ + , _ppgKey = Nothing + , _ppgOauthToken = Nothing + , _ppgProductId = pPpgProductId_ + , _ppgFields = Nothing + , _ppgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ppgQuotaUser :: Lens' PurchasesProductsGet' (Maybe Text) +ppgQuotaUser + = lens _ppgQuotaUser (\ s a -> s{_ppgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ppgPrettyPrint :: Lens' PurchasesProductsGet' Bool +ppgPrettyPrint + = lens _ppgPrettyPrint + (\ s a -> s{_ppgPrettyPrint = a}) + +-- | The package name of the application the inapp product was sold in (for +-- example, \'com.some.thing\'). +ppgPackageName :: Lens' PurchasesProductsGet' Text +ppgPackageName + = lens _ppgPackageName + (\ s a -> s{_ppgPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ppgUserIp :: Lens' PurchasesProductsGet' (Maybe Text) +ppgUserIp + = lens _ppgUserIp (\ s a -> s{_ppgUserIp = a}) + +-- | The token provided to the user\'s device when the inapp product was +-- purchased. +ppgToken :: Lens' PurchasesProductsGet' Text +ppgToken = lens _ppgToken (\ s a -> s{_ppgToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ppgKey :: Lens' PurchasesProductsGet' (Maybe Text) +ppgKey = lens _ppgKey (\ s a -> s{_ppgKey = a}) + +-- | OAuth 2.0 token for the current user. +ppgOauthToken :: Lens' PurchasesProductsGet' (Maybe Text) +ppgOauthToken + = lens _ppgOauthToken + (\ s a -> s{_ppgOauthToken = a}) + +-- | The inapp product SKU (for example, \'com.some.thing.inapp1\'). +ppgProductId :: Lens' PurchasesProductsGet' Text +ppgProductId + = lens _ppgProductId (\ s a -> s{_ppgProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +ppgFields :: Lens' PurchasesProductsGet' (Maybe Text) +ppgFields + = lens _ppgFields (\ s a -> s{_ppgFields = a}) + +-- | Data format for the response. +ppgAlt :: Lens' PurchasesProductsGet' Text +ppgAlt = lens _ppgAlt (\ s a -> s{_ppgAlt = a}) + +instance GoogleRequest PurchasesProductsGet' where + type Rs PurchasesProductsGet' = ProductPurchase + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesProductsGet{..} + = go _ppgQuotaUser _ppgPrettyPrint _ppgPackageName + _ppgUserIp + _ppgToken + _ppgKey + _ppgOauthToken + _ppgProductId + _ppgFields + _ppgAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesProductsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Cancel.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Cancel.hs new file mode 100644 index 000000000..9fa0fb78b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Cancel.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels a user\'s subscription purchase. The subscription remains valid +-- until its expiration time. +-- +-- /See:/ for @AndroidpublisherPurchasesSubscriptionsCancel@. +module Androidpublisher.Purchases.Subscriptions.Cancel + ( + -- * REST Resource + PurchasesSubscriptionsCancelAPI + + -- * Creating a Request + , purchasesSubscriptionsCancel + , PurchasesSubscriptionsCancel + + -- * Request Lenses + , pscQuotaUser + , pscPrettyPrint + , pscPackageName + , pscUserIp + , pscToken + , pscKey + , pscOauthToken + , pscSubscriptionId + , pscFields + , pscAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesSubscriptionsCancel@ which the +-- 'PurchasesSubscriptionsCancel' request conforms to. +type PurchasesSubscriptionsCancelAPI = + Capture "packageName" Text :> + "purchases" :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "tokens" :> "{token}:cancel" :> Post '[JSON] () + +-- | Cancels a user\'s subscription purchase. The subscription remains valid +-- until its expiration time. +-- +-- /See:/ 'purchasesSubscriptionsCancel' smart constructor. +data PurchasesSubscriptionsCancel = PurchasesSubscriptionsCancel + { _pscQuotaUser :: !(Maybe Text) + , _pscPrettyPrint :: !Bool + , _pscPackageName :: !Text + , _pscUserIp :: !(Maybe Text) + , _pscToken :: !Text + , _pscKey :: !(Maybe Text) + , _pscOauthToken :: !(Maybe Text) + , _pscSubscriptionId :: !Text + , _pscFields :: !(Maybe Text) + , _pscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesSubscriptionsCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pscQuotaUser' +-- +-- * 'pscPrettyPrint' +-- +-- * 'pscPackageName' +-- +-- * 'pscUserIp' +-- +-- * 'pscToken' +-- +-- * 'pscKey' +-- +-- * 'pscOauthToken' +-- +-- * 'pscSubscriptionId' +-- +-- * 'pscFields' +-- +-- * 'pscAlt' +purchasesSubscriptionsCancel + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'subscriptionId' + -> PurchasesSubscriptionsCancel +purchasesSubscriptionsCancel pPscPackageName_ pPscToken_ pPscSubscriptionId_ = + PurchasesSubscriptionsCancel + { _pscQuotaUser = Nothing + , _pscPrettyPrint = True + , _pscPackageName = pPscPackageName_ + , _pscUserIp = Nothing + , _pscToken = pPscToken_ + , _pscKey = Nothing + , _pscOauthToken = Nothing + , _pscSubscriptionId = pPscSubscriptionId_ + , _pscFields = Nothing + , _pscAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pscQuotaUser :: Lens' PurchasesSubscriptionsCancel' (Maybe Text) +pscQuotaUser + = lens _pscQuotaUser (\ s a -> s{_pscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pscPrettyPrint :: Lens' PurchasesSubscriptionsCancel' Bool +pscPrettyPrint + = lens _pscPrettyPrint + (\ s a -> s{_pscPrettyPrint = a}) + +-- | The package name of the application for which this subscription was +-- purchased (for example, \'com.some.thing\'). +pscPackageName :: Lens' PurchasesSubscriptionsCancel' Text +pscPackageName + = lens _pscPackageName + (\ s a -> s{_pscPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pscUserIp :: Lens' PurchasesSubscriptionsCancel' (Maybe Text) +pscUserIp + = lens _pscUserIp (\ s a -> s{_pscUserIp = a}) + +-- | The token provided to the user\'s device when the subscription was +-- purchased. +pscToken :: Lens' PurchasesSubscriptionsCancel' Text +pscToken = lens _pscToken (\ s a -> s{_pscToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pscKey :: Lens' PurchasesSubscriptionsCancel' (Maybe Text) +pscKey = lens _pscKey (\ s a -> s{_pscKey = a}) + +-- | OAuth 2.0 token for the current user. +pscOauthToken :: Lens' PurchasesSubscriptionsCancel' (Maybe Text) +pscOauthToken + = lens _pscOauthToken + (\ s a -> s{_pscOauthToken = a}) + +-- | The purchased subscription ID (for example, \'monthly001\'). +pscSubscriptionId :: Lens' PurchasesSubscriptionsCancel' Text +pscSubscriptionId + = lens _pscSubscriptionId + (\ s a -> s{_pscSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +pscFields :: Lens' PurchasesSubscriptionsCancel' (Maybe Text) +pscFields + = lens _pscFields (\ s a -> s{_pscFields = a}) + +-- | Data format for the response. +pscAlt :: Lens' PurchasesSubscriptionsCancel' Text +pscAlt = lens _pscAlt (\ s a -> s{_pscAlt = a}) + +instance GoogleRequest PurchasesSubscriptionsCancel' + where + type Rs PurchasesSubscriptionsCancel' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesSubscriptionsCancel{..} + = go _pscQuotaUser _pscPrettyPrint _pscPackageName + _pscUserIp + _pscToken + _pscKey + _pscOauthToken + _pscSubscriptionId + _pscFields + _pscAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesSubscriptionsCancelAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Defer.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Defer.hs new file mode 100644 index 000000000..981f943a4 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Defer.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Defer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Defers a user\'s subscription purchase until a specified future +-- expiration time. +-- +-- /See:/ for @AndroidpublisherPurchasesSubscriptionsDefer@. +module Androidpublisher.Purchases.Subscriptions.Defer + ( + -- * REST Resource + PurchasesSubscriptionsDeferAPI + + -- * Creating a Request + , purchasesSubscriptionsDefer + , PurchasesSubscriptionsDefer + + -- * Request Lenses + , psdQuotaUser + , psdPrettyPrint + , psdPackageName + , psdUserIp + , psdToken + , psdKey + , psdOauthToken + , psdSubscriptionId + , psdFields + , psdAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesSubscriptionsDefer@ which the +-- 'PurchasesSubscriptionsDefer' request conforms to. +type PurchasesSubscriptionsDeferAPI = + Capture "packageName" Text :> + "purchases" :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "tokens" :> + "{token}:defer" :> + Post '[JSON] SubscriptionPurchasesDeferResponse + +-- | Defers a user\'s subscription purchase until a specified future +-- expiration time. +-- +-- /See:/ 'purchasesSubscriptionsDefer' smart constructor. +data PurchasesSubscriptionsDefer = PurchasesSubscriptionsDefer + { _psdQuotaUser :: !(Maybe Text) + , _psdPrettyPrint :: !Bool + , _psdPackageName :: !Text + , _psdUserIp :: !(Maybe Text) + , _psdToken :: !Text + , _psdKey :: !(Maybe Text) + , _psdOauthToken :: !(Maybe Text) + , _psdSubscriptionId :: !Text + , _psdFields :: !(Maybe Text) + , _psdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesSubscriptionsDefer'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psdQuotaUser' +-- +-- * 'psdPrettyPrint' +-- +-- * 'psdPackageName' +-- +-- * 'psdUserIp' +-- +-- * 'psdToken' +-- +-- * 'psdKey' +-- +-- * 'psdOauthToken' +-- +-- * 'psdSubscriptionId' +-- +-- * 'psdFields' +-- +-- * 'psdAlt' +purchasesSubscriptionsDefer + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'subscriptionId' + -> PurchasesSubscriptionsDefer +purchasesSubscriptionsDefer pPsdPackageName_ pPsdToken_ pPsdSubscriptionId_ = + PurchasesSubscriptionsDefer + { _psdQuotaUser = Nothing + , _psdPrettyPrint = True + , _psdPackageName = pPsdPackageName_ + , _psdUserIp = Nothing + , _psdToken = pPsdToken_ + , _psdKey = Nothing + , _psdOauthToken = Nothing + , _psdSubscriptionId = pPsdSubscriptionId_ + , _psdFields = Nothing + , _psdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psdQuotaUser :: Lens' PurchasesSubscriptionsDefer' (Maybe Text) +psdQuotaUser + = lens _psdQuotaUser (\ s a -> s{_psdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psdPrettyPrint :: Lens' PurchasesSubscriptionsDefer' Bool +psdPrettyPrint + = lens _psdPrettyPrint + (\ s a -> s{_psdPrettyPrint = a}) + +-- | The package name of the application for which this subscription was +-- purchased (for example, \'com.some.thing\'). +psdPackageName :: Lens' PurchasesSubscriptionsDefer' Text +psdPackageName + = lens _psdPackageName + (\ s a -> s{_psdPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psdUserIp :: Lens' PurchasesSubscriptionsDefer' (Maybe Text) +psdUserIp + = lens _psdUserIp (\ s a -> s{_psdUserIp = a}) + +-- | The token provided to the user\'s device when the subscription was +-- purchased. +psdToken :: Lens' PurchasesSubscriptionsDefer' Text +psdToken = lens _psdToken (\ s a -> s{_psdToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psdKey :: Lens' PurchasesSubscriptionsDefer' (Maybe Text) +psdKey = lens _psdKey (\ s a -> s{_psdKey = a}) + +-- | OAuth 2.0 token for the current user. +psdOauthToken :: Lens' PurchasesSubscriptionsDefer' (Maybe Text) +psdOauthToken + = lens _psdOauthToken + (\ s a -> s{_psdOauthToken = a}) + +-- | The purchased subscription ID (for example, \'monthly001\'). +psdSubscriptionId :: Lens' PurchasesSubscriptionsDefer' Text +psdSubscriptionId + = lens _psdSubscriptionId + (\ s a -> s{_psdSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +psdFields :: Lens' PurchasesSubscriptionsDefer' (Maybe Text) +psdFields + = lens _psdFields (\ s a -> s{_psdFields = a}) + +-- | Data format for the response. +psdAlt :: Lens' PurchasesSubscriptionsDefer' Text +psdAlt = lens _psdAlt (\ s a -> s{_psdAlt = a}) + +instance GoogleRequest PurchasesSubscriptionsDefer' + where + type Rs PurchasesSubscriptionsDefer' = + SubscriptionPurchasesDeferResponse + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesSubscriptionsDefer{..} + = go _psdQuotaUser _psdPrettyPrint _psdPackageName + _psdUserIp + _psdToken + _psdKey + _psdOauthToken + _psdSubscriptionId + _psdFields + _psdAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesSubscriptionsDeferAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Get.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Get.hs new file mode 100644 index 000000000..afd59d469 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Get.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Checks whether a user\'s subscription purchase is valid and returns its +-- expiry time. +-- +-- /See:/ for @AndroidpublisherPurchasesSubscriptionsGet@. +module Androidpublisher.Purchases.Subscriptions.Get + ( + -- * REST Resource + PurchasesSubscriptionsGetAPI + + -- * Creating a Request + , purchasesSubscriptionsGet + , PurchasesSubscriptionsGet + + -- * Request Lenses + , psgQuotaUser + , psgPrettyPrint + , psgPackageName + , psgUserIp + , psgToken + , psgKey + , psgOauthToken + , psgSubscriptionId + , psgFields + , psgAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesSubscriptionsGet@ which the +-- 'PurchasesSubscriptionsGet' request conforms to. +type PurchasesSubscriptionsGetAPI = + Capture "packageName" Text :> + "purchases" :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "tokens" :> + Capture "token" Text :> + Get '[JSON] SubscriptionPurchase + +-- | Checks whether a user\'s subscription purchase is valid and returns its +-- expiry time. +-- +-- /See:/ 'purchasesSubscriptionsGet' smart constructor. +data PurchasesSubscriptionsGet = PurchasesSubscriptionsGet + { _psgQuotaUser :: !(Maybe Text) + , _psgPrettyPrint :: !Bool + , _psgPackageName :: !Text + , _psgUserIp :: !(Maybe Text) + , _psgToken :: !Text + , _psgKey :: !(Maybe Text) + , _psgOauthToken :: !(Maybe Text) + , _psgSubscriptionId :: !Text + , _psgFields :: !(Maybe Text) + , _psgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesSubscriptionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgQuotaUser' +-- +-- * 'psgPrettyPrint' +-- +-- * 'psgPackageName' +-- +-- * 'psgUserIp' +-- +-- * 'psgToken' +-- +-- * 'psgKey' +-- +-- * 'psgOauthToken' +-- +-- * 'psgSubscriptionId' +-- +-- * 'psgFields' +-- +-- * 'psgAlt' +purchasesSubscriptionsGet + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'subscriptionId' + -> PurchasesSubscriptionsGet +purchasesSubscriptionsGet pPsgPackageName_ pPsgToken_ pPsgSubscriptionId_ = + PurchasesSubscriptionsGet + { _psgQuotaUser = Nothing + , _psgPrettyPrint = True + , _psgPackageName = pPsgPackageName_ + , _psgUserIp = Nothing + , _psgToken = pPsgToken_ + , _psgKey = Nothing + , _psgOauthToken = Nothing + , _psgSubscriptionId = pPsgSubscriptionId_ + , _psgFields = Nothing + , _psgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psgQuotaUser :: Lens' PurchasesSubscriptionsGet' (Maybe Text) +psgQuotaUser + = lens _psgQuotaUser (\ s a -> s{_psgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psgPrettyPrint :: Lens' PurchasesSubscriptionsGet' Bool +psgPrettyPrint + = lens _psgPrettyPrint + (\ s a -> s{_psgPrettyPrint = a}) + +-- | The package name of the application for which this subscription was +-- purchased (for example, \'com.some.thing\'). +psgPackageName :: Lens' PurchasesSubscriptionsGet' Text +psgPackageName + = lens _psgPackageName + (\ s a -> s{_psgPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psgUserIp :: Lens' PurchasesSubscriptionsGet' (Maybe Text) +psgUserIp + = lens _psgUserIp (\ s a -> s{_psgUserIp = a}) + +-- | The token provided to the user\'s device when the subscription was +-- purchased. +psgToken :: Lens' PurchasesSubscriptionsGet' Text +psgToken = lens _psgToken (\ s a -> s{_psgToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psgKey :: Lens' PurchasesSubscriptionsGet' (Maybe Text) +psgKey = lens _psgKey (\ s a -> s{_psgKey = a}) + +-- | OAuth 2.0 token for the current user. +psgOauthToken :: Lens' PurchasesSubscriptionsGet' (Maybe Text) +psgOauthToken + = lens _psgOauthToken + (\ s a -> s{_psgOauthToken = a}) + +-- | The purchased subscription ID (for example, \'monthly001\'). +psgSubscriptionId :: Lens' PurchasesSubscriptionsGet' Text +psgSubscriptionId + = lens _psgSubscriptionId + (\ s a -> s{_psgSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +psgFields :: Lens' PurchasesSubscriptionsGet' (Maybe Text) +psgFields + = lens _psgFields (\ s a -> s{_psgFields = a}) + +-- | Data format for the response. +psgAlt :: Lens' PurchasesSubscriptionsGet' Text +psgAlt = lens _psgAlt (\ s a -> s{_psgAlt = a}) + +instance GoogleRequest PurchasesSubscriptionsGet' + where + type Rs PurchasesSubscriptionsGet' = + SubscriptionPurchase + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesSubscriptionsGet{..} + = go _psgQuotaUser _psgPrettyPrint _psgPackageName + _psgUserIp + _psgToken + _psgKey + _psgOauthToken + _psgSubscriptionId + _psgFields + _psgAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesSubscriptionsGetAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Refund.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Refund.hs new file mode 100644 index 000000000..e40338e1b --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Refund.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Refund +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Refunds a user\'s subscription purchase, but the subscription remains +-- valid until its expiration time and it will continue to recur. +-- +-- /See:/ for @AndroidpublisherPurchasesSubscriptionsRefund@. +module Androidpublisher.Purchases.Subscriptions.Refund + ( + -- * REST Resource + PurchasesSubscriptionsRefundAPI + + -- * Creating a Request + , purchasesSubscriptionsRefund + , PurchasesSubscriptionsRefund + + -- * Request Lenses + , psrQuotaUser + , psrPrettyPrint + , psrPackageName + , psrUserIp + , psrToken + , psrKey + , psrOauthToken + , psrSubscriptionId + , psrFields + , psrAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesSubscriptionsRefund@ which the +-- 'PurchasesSubscriptionsRefund' request conforms to. +type PurchasesSubscriptionsRefundAPI = + Capture "packageName" Text :> + "purchases" :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "tokens" :> "{token}:refund" :> Post '[JSON] () + +-- | Refunds a user\'s subscription purchase, but the subscription remains +-- valid until its expiration time and it will continue to recur. +-- +-- /See:/ 'purchasesSubscriptionsRefund' smart constructor. +data PurchasesSubscriptionsRefund = PurchasesSubscriptionsRefund + { _psrQuotaUser :: !(Maybe Text) + , _psrPrettyPrint :: !Bool + , _psrPackageName :: !Text + , _psrUserIp :: !(Maybe Text) + , _psrToken :: !Text + , _psrKey :: !(Maybe Text) + , _psrOauthToken :: !(Maybe Text) + , _psrSubscriptionId :: !Text + , _psrFields :: !(Maybe Text) + , _psrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesSubscriptionsRefund'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psrQuotaUser' +-- +-- * 'psrPrettyPrint' +-- +-- * 'psrPackageName' +-- +-- * 'psrUserIp' +-- +-- * 'psrToken' +-- +-- * 'psrKey' +-- +-- * 'psrOauthToken' +-- +-- * 'psrSubscriptionId' +-- +-- * 'psrFields' +-- +-- * 'psrAlt' +purchasesSubscriptionsRefund + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'subscriptionId' + -> PurchasesSubscriptionsRefund +purchasesSubscriptionsRefund pPsrPackageName_ pPsrToken_ pPsrSubscriptionId_ = + PurchasesSubscriptionsRefund + { _psrQuotaUser = Nothing + , _psrPrettyPrint = True + , _psrPackageName = pPsrPackageName_ + , _psrUserIp = Nothing + , _psrToken = pPsrToken_ + , _psrKey = Nothing + , _psrOauthToken = Nothing + , _psrSubscriptionId = pPsrSubscriptionId_ + , _psrFields = Nothing + , _psrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psrQuotaUser :: Lens' PurchasesSubscriptionsRefund' (Maybe Text) +psrQuotaUser + = lens _psrQuotaUser (\ s a -> s{_psrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psrPrettyPrint :: Lens' PurchasesSubscriptionsRefund' Bool +psrPrettyPrint + = lens _psrPrettyPrint + (\ s a -> s{_psrPrettyPrint = a}) + +-- | The package name of the application for which this subscription was +-- purchased (for example, \'com.some.thing\'). +psrPackageName :: Lens' PurchasesSubscriptionsRefund' Text +psrPackageName + = lens _psrPackageName + (\ s a -> s{_psrPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psrUserIp :: Lens' PurchasesSubscriptionsRefund' (Maybe Text) +psrUserIp + = lens _psrUserIp (\ s a -> s{_psrUserIp = a}) + +-- | The token provided to the user\'s device when the subscription was +-- purchased. +psrToken :: Lens' PurchasesSubscriptionsRefund' Text +psrToken = lens _psrToken (\ s a -> s{_psrToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psrKey :: Lens' PurchasesSubscriptionsRefund' (Maybe Text) +psrKey = lens _psrKey (\ s a -> s{_psrKey = a}) + +-- | OAuth 2.0 token for the current user. +psrOauthToken :: Lens' PurchasesSubscriptionsRefund' (Maybe Text) +psrOauthToken + = lens _psrOauthToken + (\ s a -> s{_psrOauthToken = a}) + +-- | The purchased subscription ID (for example, \'monthly001\'). +psrSubscriptionId :: Lens' PurchasesSubscriptionsRefund' Text +psrSubscriptionId + = lens _psrSubscriptionId + (\ s a -> s{_psrSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +psrFields :: Lens' PurchasesSubscriptionsRefund' (Maybe Text) +psrFields + = lens _psrFields (\ s a -> s{_psrFields = a}) + +-- | Data format for the response. +psrAlt :: Lens' PurchasesSubscriptionsRefund' Text +psrAlt = lens _psrAlt (\ s a -> s{_psrAlt = a}) + +instance GoogleRequest PurchasesSubscriptionsRefund' + where + type Rs PurchasesSubscriptionsRefund' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesSubscriptionsRefund{..} + = go _psrQuotaUser _psrPrettyPrint _psrPackageName + _psrUserIp + _psrToken + _psrKey + _psrOauthToken + _psrSubscriptionId + _psrFields + _psrAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesSubscriptionsRefundAPI) + r + u diff --git a/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Revoke.hs b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Revoke.hs new file mode 100644 index 000000000..f774a3505 --- /dev/null +++ b/gogol-play-developer/gen/Network/Google/Resource/Androidpublisher/Purchases/Subscriptions/Revoke.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Revoke +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Refunds and immediately revokes a user\'s subscription purchase. Access +-- to the subscription will be terminated immediately and it will stop +-- recurring. +-- +-- /See:/ for @AndroidpublisherPurchasesSubscriptionsRevoke@. +module Androidpublisher.Purchases.Subscriptions.Revoke + ( + -- * REST Resource + PurchasesSubscriptionsRevokeAPI + + -- * Creating a Request + , purchasesSubscriptionsRevoke + , PurchasesSubscriptionsRevoke + + -- * Request Lenses + , pQuotaUser + , pPrettyPrint + , pPackageName + , pUserIp + , pToken + , pKey + , pOauthToken + , pSubscriptionId + , pFields + , pAlt + ) where + +import Network.Google.PlayDeveloper.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidpublisherPurchasesSubscriptionsRevoke@ which the +-- 'PurchasesSubscriptionsRevoke' request conforms to. +type PurchasesSubscriptionsRevokeAPI = + Capture "packageName" Text :> + "purchases" :> + "subscriptions" :> + Capture "subscriptionId" Text :> + "tokens" :> "{token}:revoke" :> Post '[JSON] () + +-- | Refunds and immediately revokes a user\'s subscription purchase. Access +-- to the subscription will be terminated immediately and it will stop +-- recurring. +-- +-- /See:/ 'purchasesSubscriptionsRevoke' smart constructor. +data PurchasesSubscriptionsRevoke = PurchasesSubscriptionsRevoke + { _pQuotaUser :: !(Maybe Text) + , _pPrettyPrint :: !Bool + , _pPackageName :: !Text + , _pUserIp :: !(Maybe Text) + , _pToken :: !Text + , _pKey :: !(Maybe Text) + , _pOauthToken :: !(Maybe Text) + , _pSubscriptionId :: !Text + , _pFields :: !(Maybe Text) + , _pAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PurchasesSubscriptionsRevoke'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pQuotaUser' +-- +-- * 'pPrettyPrint' +-- +-- * 'pPackageName' +-- +-- * 'pUserIp' +-- +-- * 'pToken' +-- +-- * 'pKey' +-- +-- * 'pOauthToken' +-- +-- * 'pSubscriptionId' +-- +-- * 'pFields' +-- +-- * 'pAlt' +purchasesSubscriptionsRevoke + :: Text -- ^ 'packageName' + -> Text -- ^ 'token' + -> Text -- ^ 'subscriptionId' + -> PurchasesSubscriptionsRevoke +purchasesSubscriptionsRevoke pPPackageName_ pPToken_ pPSubscriptionId_ = + PurchasesSubscriptionsRevoke + { _pQuotaUser = Nothing + , _pPrettyPrint = True + , _pPackageName = pPPackageName_ + , _pUserIp = Nothing + , _pToken = pPToken_ + , _pKey = Nothing + , _pOauthToken = Nothing + , _pSubscriptionId = pPSubscriptionId_ + , _pFields = Nothing + , _pAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pQuotaUser :: Lens' PurchasesSubscriptionsRevoke' (Maybe Text) +pQuotaUser + = lens _pQuotaUser (\ s a -> s{_pQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pPrettyPrint :: Lens' PurchasesSubscriptionsRevoke' Bool +pPrettyPrint + = lens _pPrettyPrint (\ s a -> s{_pPrettyPrint = a}) + +-- | The package name of the application for which this subscription was +-- purchased (for example, \'com.some.thing\'). +pPackageName :: Lens' PurchasesSubscriptionsRevoke' Text +pPackageName + = lens _pPackageName (\ s a -> s{_pPackageName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pUserIp :: Lens' PurchasesSubscriptionsRevoke' (Maybe Text) +pUserIp = lens _pUserIp (\ s a -> s{_pUserIp = a}) + +-- | The token provided to the user\'s device when the subscription was +-- purchased. +pToken :: Lens' PurchasesSubscriptionsRevoke' Text +pToken = lens _pToken (\ s a -> s{_pToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pKey :: Lens' PurchasesSubscriptionsRevoke' (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | OAuth 2.0 token for the current user. +pOauthToken :: Lens' PurchasesSubscriptionsRevoke' (Maybe Text) +pOauthToken + = lens _pOauthToken (\ s a -> s{_pOauthToken = a}) + +-- | The purchased subscription ID (for example, \'monthly001\'). +pSubscriptionId :: Lens' PurchasesSubscriptionsRevoke' Text +pSubscriptionId + = lens _pSubscriptionId + (\ s a -> s{_pSubscriptionId = a}) + +-- | Selector specifying which fields to include in a partial response. +pFields :: Lens' PurchasesSubscriptionsRevoke' (Maybe Text) +pFields = lens _pFields (\ s a -> s{_pFields = a}) + +-- | Data format for the response. +pAlt :: Lens' PurchasesSubscriptionsRevoke' Text +pAlt = lens _pAlt (\ s a -> s{_pAlt = a}) + +instance GoogleRequest PurchasesSubscriptionsRevoke' + where + type Rs PurchasesSubscriptionsRevoke' = () + request = requestWithRoute defReq playDeveloperURL + requestWithRoute r u PurchasesSubscriptionsRevoke{..} + = go _pQuotaUser _pPrettyPrint _pPackageName _pUserIp + _pToken + _pKey + _pOauthToken + _pSubscriptionId + _pFields + _pAlt + where go + = clientWithRoute + (Proxy :: Proxy PurchasesSubscriptionsRevokeAPI) + r + u diff --git a/gogol-play-developer/gogol-play-developer.cabal b/gogol-play-developer/gogol-play-developer.cabal new file mode 100644 index 000000000..e032f2b68 --- /dev/null +++ b/gogol-play-developer/gogol-play-developer.cabal @@ -0,0 +1,94 @@ +name: gogol-play-developer +version: 0.0.1 +synopsis: Google Play Developer API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets Android application developers access their Google Play accounts. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PlayDeveloper + , Network.Google.PlayDeveloper.Types + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.Delete + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.Deleteall + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.Get + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.List + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.Patch + , Network.Google.Resource.Androidpublisher.Edits.Apklistings.Update + , Network.Google.Resource.Androidpublisher.Edits.Apks.Addexternallyhosted + , Network.Google.Resource.Androidpublisher.Edits.Apks.List + , Network.Google.Resource.Androidpublisher.Edits.Apks.Upload + , Network.Google.Resource.Androidpublisher.Edits.Commit + , Network.Google.Resource.Androidpublisher.Edits.Delete + , Network.Google.Resource.Androidpublisher.Edits.Details.Get + , Network.Google.Resource.Androidpublisher.Edits.Details.Patch + , Network.Google.Resource.Androidpublisher.Edits.Details.Update + , Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Get + , Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Patch + , Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Update + , Network.Google.Resource.Androidpublisher.Edits.Expansionfiles.Upload + , Network.Google.Resource.Androidpublisher.Edits.Get + , Network.Google.Resource.Androidpublisher.Edits.Images.Delete + , Network.Google.Resource.Androidpublisher.Edits.Images.Deleteall + , Network.Google.Resource.Androidpublisher.Edits.Images.List + , Network.Google.Resource.Androidpublisher.Edits.Images.Upload + , Network.Google.Resource.Androidpublisher.Edits.Insert + , Network.Google.Resource.Androidpublisher.Edits.Listings.Delete + , Network.Google.Resource.Androidpublisher.Edits.Listings.Deleteall + , Network.Google.Resource.Androidpublisher.Edits.Listings.Get + , Network.Google.Resource.Androidpublisher.Edits.Listings.List + , Network.Google.Resource.Androidpublisher.Edits.Listings.Patch + , Network.Google.Resource.Androidpublisher.Edits.Listings.Update + , Network.Google.Resource.Androidpublisher.Edits.Testers.Get + , Network.Google.Resource.Androidpublisher.Edits.Testers.Patch + , Network.Google.Resource.Androidpublisher.Edits.Testers.Update + , Network.Google.Resource.Androidpublisher.Edits.Tracks.Get + , Network.Google.Resource.Androidpublisher.Edits.Tracks.List + , Network.Google.Resource.Androidpublisher.Edits.Tracks.Patch + , Network.Google.Resource.Androidpublisher.Edits.Tracks.Update + , Network.Google.Resource.Androidpublisher.Edits.Validate + , Network.Google.Resource.Androidpublisher.Entitlements.List + , Network.Google.Resource.Androidpublisher.Inappproducts.Batch + , Network.Google.Resource.Androidpublisher.Inappproducts.Delete + , Network.Google.Resource.Androidpublisher.Inappproducts.Get + , Network.Google.Resource.Androidpublisher.Inappproducts.Insert + , Network.Google.Resource.Androidpublisher.Inappproducts.List + , Network.Google.Resource.Androidpublisher.Inappproducts.Patch + , Network.Google.Resource.Androidpublisher.Inappproducts.Update + , Network.Google.Resource.Androidpublisher.Purchases.Products.Get + , Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Cancel + , Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Defer + , Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Get + , Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Refund + , Network.Google.Resource.Androidpublisher.Purchases.Subscriptions.Revoke + + other-modules: + Network.Google.PlayDeveloper.Types.Product + , Network.Google.PlayDeveloper.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-play-developer/src/.gitkeep b/gogol-play-developer/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-play-enterprise/LICENSE b/gogol-play-enterprise/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-play-enterprise/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-play-enterprise/Makefile b/gogol-play-enterprise/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-play-enterprise/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-play-enterprise/README.md b/gogol-play-enterprise/README.md new file mode 100644 index 000000000..0e9eccdcc --- /dev/null +++ b/gogol-play-enterprise/README.md @@ -0,0 +1,28 @@ +# gogol-play-enterprise + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play EMM API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-play-enterprise` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-play-enterprise/Setup.hs b/gogol-play-enterprise/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-play-enterprise/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-play-enterprise/gen/Network/Google/PlayEnterprise.hs b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise.hs new file mode 100644 index 000000000..77438443e --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise.hs @@ -0,0 +1,472 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PlayEnterprise +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Allows MDMs\/EMMs and enterprises to manage the deployment of apps to +-- Android for Work users. +-- +-- /See:/ +module Network.Google.PlayEnterprise + ( + -- * API + PlayEnterpriseAPI + , playEnterpriseAPI + , playEnterpriseURL + + -- * Service Methods + + -- * REST Resources + + -- ** AndroidenterpriseCollectionsDelete + , module Androidenterprise.Collections.Delete + + -- ** AndroidenterpriseCollectionsGet + , module Androidenterprise.Collections.Get + + -- ** AndroidenterpriseCollectionsInsert + , module Androidenterprise.Collections.Insert + + -- ** AndroidenterpriseCollectionsList + , module Androidenterprise.Collections.List + + -- ** AndroidenterpriseCollectionsPatch + , module Androidenterprise.Collections.Patch + + -- ** AndroidenterpriseCollectionsUpdate + , module Androidenterprise.Collections.Update + + -- ** AndroidenterpriseCollectionviewersDelete + , module Androidenterprise.Collectionviewers.Delete + + -- ** AndroidenterpriseCollectionviewersGet + , module Androidenterprise.Collectionviewers.Get + + -- ** AndroidenterpriseCollectionviewersList + , module Androidenterprise.Collectionviewers.List + + -- ** AndroidenterpriseCollectionviewersPatch + , module Androidenterprise.Collectionviewers.Patch + + -- ** AndroidenterpriseCollectionviewersUpdate + , module Androidenterprise.Collectionviewers.Update + + -- ** AndroidenterpriseDevicesGet + , module Androidenterprise.Devices.Get + + -- ** AndroidenterpriseDevicesGetState + , module Androidenterprise.Devices.GetState + + -- ** AndroidenterpriseDevicesList + , module Androidenterprise.Devices.List + + -- ** AndroidenterpriseDevicesSetState + , module Androidenterprise.Devices.SetState + + -- ** AndroidenterpriseEnterprisesDelete + , module Androidenterprise.Enterprises.Delete + + -- ** AndroidenterpriseEnterprisesEnroll + , module Androidenterprise.Enterprises.Enroll + + -- ** AndroidenterpriseEnterprisesGet + , module Androidenterprise.Enterprises.Get + + -- ** AndroidenterpriseEnterprisesInsert + , module Androidenterprise.Enterprises.Insert + + -- ** AndroidenterpriseEnterprisesList + , module Androidenterprise.Enterprises.List + + -- ** AndroidenterpriseEnterprisesSendTestPushNotification + , module Androidenterprise.Enterprises.SendTestPushNotification + + -- ** AndroidenterpriseEnterprisesSetAccount + , module Androidenterprise.Enterprises.SetAccount + + -- ** AndroidenterpriseEnterprisesUnenroll + , module Androidenterprise.Enterprises.Unenroll + + -- ** AndroidenterpriseEntitlementsDelete + , module Androidenterprise.Entitlements.Delete + + -- ** AndroidenterpriseEntitlementsGet + , module Androidenterprise.Entitlements.Get + + -- ** AndroidenterpriseEntitlementsList + , module Androidenterprise.Entitlements.List + + -- ** AndroidenterpriseEntitlementsPatch + , module Androidenterprise.Entitlements.Patch + + -- ** AndroidenterpriseEntitlementsUpdate + , module Androidenterprise.Entitlements.Update + + -- ** AndroidenterpriseGrouplicensesGet + , module Androidenterprise.Grouplicenses.Get + + -- ** AndroidenterpriseGrouplicensesList + , module Androidenterprise.Grouplicenses.List + + -- ** AndroidenterpriseGrouplicenseusersList + , module Androidenterprise.Grouplicenseusers.List + + -- ** AndroidenterpriseInstallsDelete + , module Androidenterprise.Installs.Delete + + -- ** AndroidenterpriseInstallsGet + , module Androidenterprise.Installs.Get + + -- ** AndroidenterpriseInstallsList + , module Androidenterprise.Installs.List + + -- ** AndroidenterpriseInstallsPatch + , module Androidenterprise.Installs.Patch + + -- ** AndroidenterpriseInstallsUpdate + , module Androidenterprise.Installs.Update + + -- ** AndroidenterprisePermissionsGet + , module Androidenterprise.Permissions.Get + + -- ** AndroidenterpriseProductsApprove + , module Androidenterprise.Products.Approve + + -- ** AndroidenterpriseProductsGenerateApprovalURL + , module Androidenterprise.Products.GenerateApprovalURL + + -- ** AndroidenterpriseProductsGet + , module Androidenterprise.Products.Get + + -- ** AndroidenterpriseProductsGetAppRestrictionsSchema + , module Androidenterprise.Products.GetAppRestrictionsSchema + + -- ** AndroidenterpriseProductsGetPermissions + , module Androidenterprise.Products.GetPermissions + + -- ** AndroidenterpriseProductsUpdatePermissions + , module Androidenterprise.Products.UpdatePermissions + + -- ** AndroidenterpriseUsersGenerateToken + , module Androidenterprise.Users.GenerateToken + + -- ** AndroidenterpriseUsersGet + , module Androidenterprise.Users.Get + + -- ** AndroidenterpriseUsersGetAvailableProductSet + , module Androidenterprise.Users.GetAvailableProductSet + + -- ** AndroidenterpriseUsersList + , module Androidenterprise.Users.List + + -- ** AndroidenterpriseUsersRevokeToken + , module Androidenterprise.Users.RevokeToken + + -- ** AndroidenterpriseUsersSetAvailableProductSet + , module Androidenterprise.Users.SetAvailableProductSet + + -- * Types + + -- ** CollectionsListResponse + , CollectionsListResponse + , collectionsListResponse + , clrKind + , clrCollection + + -- ** EnterpriseAccount + , EnterpriseAccount + , enterpriseAccount + , eaKind + , eaAccountEmail + + -- ** GroupLicense + , GroupLicense + , groupLicense + , glKind + , glNumProvisioned + , glNumPurchased + , glApproval + , glProductId + , glAcquisitionKind + + -- ** AppRestrictionsSchemaRestrictionRestrictionValue + , AppRestrictionsSchemaRestrictionRestrictionValue + , appRestrictionsSchemaRestrictionRestrictionValue + , arsrrvValueMultiselect + , arsrrvValueBool + , arsrrvValueInteger + , arsrrvType + , arsrrvValueString + + -- ** GroupLicenseUsersListResponse + , GroupLicenseUsersListResponse + , groupLicenseUsersListResponse + , glulrKind + , glulrUser + + -- ** DeviceState + , DeviceState + , deviceState + , dsKind + , dsAccountState + + -- ** ApprovalURLInfo + , ApprovalURLInfo + , approvalURLInfo + , auiApprovalUrl + , auiKind + + -- ** Device + , Device + , device + , dKind + , dManagementType + , dAndroidId + + -- ** ProductPermission + , ProductPermission + , productPermission + , ppState + , ppPermissionId + + -- ** AppVersion + , AppVersion + , appVersion + , avVersionCode + , avVersionString + + -- ** AppRestrictionsSchemaRestriction + , AppRestrictionsSchemaRestriction + , appRestrictionsSchemaRestriction + , arsrRestrictionType + , arsrEntry + , arsrKey + , arsrEntryValue + , arsrDefaultValue + , arsrTitle + , arsrDescription + + -- ** UsersListResponse + , UsersListResponse + , usersListResponse + , ulrKind + , ulrUser + + -- ** InstallsListResponse + , InstallsListResponse + , installsListResponse + , ilrKind + , ilrInstall + + -- ** Collection + , Collection + , collection + , cKind + , cCollectionId + , cVisibility + , cName + , cProductId + + -- ** GroupLicensesListResponse + , GroupLicensesListResponse + , groupLicensesListResponse + , gllrGroupLicense + , gllrKind + + -- ** User + , User + , user + , uKind + , uId + , uPrimaryEmail + + -- ** ProductSet + , ProductSet + , productSet + , psKind + , psProductId + + -- ** Install + , Install + , install + , iVersionCode + , iKind + , iInstallState + , iProductId + + -- ** EnterprisesSendTestPushNotificationResponse + , EnterprisesSendTestPushNotificationResponse + , enterprisesSendTestPushNotificationResponse + , estpnrTopicName + , estpnrMessageId + + -- ** ProductsGenerateApprovalURLResponse + , ProductsGenerateApprovalURLResponse + , productsGenerateApprovalURLResponse + , pgaurUrl + + -- ** AppRestrictionsSchema + , AppRestrictionsSchema + , appRestrictionsSchema + , arsKind + , arsRestrictions + + -- ** EnterprisesListResponse + , EnterprisesListResponse + , enterprisesListResponse + , elrKind + , elrEnterprise + + -- ** DevicesListResponse + , DevicesListResponse + , devicesListResponse + , dlrKind + , dlrDevice + + -- ** UserToken + , UserToken + , userToken + , utKind + , utToken + , utUserId + + -- ** Enterprise + , Enterprise + , enterprise + , eKind + , ePrimaryDomain + , eName + , eId + + -- ** Permission + , Permission + , permission + , pKind + , pName + , pDescription + , pPermissionId + + -- ** Product + , Product + , product + , proAuthorName + , proKind + , proWorkDetailsUrl + , proRequiresContainerApp + , proAppVersion + , proDistributionChannel + , proIconUrl + , proTitle + , proProductId + , proDetailsUrl + + -- ** EntitlementsListResponse + , EntitlementsListResponse + , entitlementsListResponse + , entKind + , entEntitlement + + -- ** ProductPermissions + , ProductPermissions + , productPermissions + , ppKind + , ppPermission + , ppProductId + + -- ** CollectionViewersListResponse + , CollectionViewersListResponse + , collectionViewersListResponse + , cvlrKind + , cvlrUser + + -- ** ProductsApproveRequest + , ProductsApproveRequest + , productsApproveRequest + , parApprovalUrlInfo + + -- ** Entitlement + , Entitlement + , entitlement + , eeKind + , eeReason + , eeProductId + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude +import Network.Google.Resource.Androidenterprise.Collections.Delete +import Network.Google.Resource.Androidenterprise.Collections.Get +import Network.Google.Resource.Androidenterprise.Collections.Insert +import Network.Google.Resource.Androidenterprise.Collections.List +import Network.Google.Resource.Androidenterprise.Collections.Patch +import Network.Google.Resource.Androidenterprise.Collections.Update +import Network.Google.Resource.Androidenterprise.Collectionviewers.Delete +import Network.Google.Resource.Androidenterprise.Collectionviewers.Get +import Network.Google.Resource.Androidenterprise.Collectionviewers.List +import Network.Google.Resource.Androidenterprise.Collectionviewers.Patch +import Network.Google.Resource.Androidenterprise.Collectionviewers.Update +import Network.Google.Resource.Androidenterprise.Devices.Get +import Network.Google.Resource.Androidenterprise.Devices.GetState +import Network.Google.Resource.Androidenterprise.Devices.List +import Network.Google.Resource.Androidenterprise.Devices.SetState +import Network.Google.Resource.Androidenterprise.Enterprises.Delete +import Network.Google.Resource.Androidenterprise.Enterprises.Enroll +import Network.Google.Resource.Androidenterprise.Enterprises.Get +import Network.Google.Resource.Androidenterprise.Enterprises.Insert +import Network.Google.Resource.Androidenterprise.Enterprises.List +import Network.Google.Resource.Androidenterprise.Enterprises.SendTestPushNotification +import Network.Google.Resource.Androidenterprise.Enterprises.SetAccount +import Network.Google.Resource.Androidenterprise.Enterprises.Unenroll +import Network.Google.Resource.Androidenterprise.Entitlements.Delete +import Network.Google.Resource.Androidenterprise.Entitlements.Get +import Network.Google.Resource.Androidenterprise.Entitlements.List +import Network.Google.Resource.Androidenterprise.Entitlements.Patch +import Network.Google.Resource.Androidenterprise.Entitlements.Update +import Network.Google.Resource.Androidenterprise.Grouplicenses.Get +import Network.Google.Resource.Androidenterprise.Grouplicenses.List +import Network.Google.Resource.Androidenterprise.Grouplicenseusers.List +import Network.Google.Resource.Androidenterprise.Installs.Delete +import Network.Google.Resource.Androidenterprise.Installs.Get +import Network.Google.Resource.Androidenterprise.Installs.List +import Network.Google.Resource.Androidenterprise.Installs.Patch +import Network.Google.Resource.Androidenterprise.Installs.Update +import Network.Google.Resource.Androidenterprise.Permissions.Get +import Network.Google.Resource.Androidenterprise.Products.Approve +import Network.Google.Resource.Androidenterprise.Products.GenerateApprovalURL +import Network.Google.Resource.Androidenterprise.Products.Get +import Network.Google.Resource.Androidenterprise.Products.GetAppRestrictionsSchema +import Network.Google.Resource.Androidenterprise.Products.GetPermissions +import Network.Google.Resource.Androidenterprise.Products.UpdatePermissions +import Network.Google.Resource.Androidenterprise.Users.GenerateToken +import Network.Google.Resource.Androidenterprise.Users.Get +import Network.Google.Resource.Androidenterprise.Users.GetAvailableProductSet +import Network.Google.Resource.Androidenterprise.Users.List +import Network.Google.Resource.Androidenterprise.Users.RevokeToken +import Network.Google.Resource.Androidenterprise.Users.SetAvailableProductSet + +{- $resources +TODO +-} + +type PlayEnterpriseAPI = + Collectionviewers :<|> Users :<|> Installs :<|> + Collections + :<|> Enterprises + :<|> Grouplicenses + :<|> Entitlements + :<|> Permissions + :<|> Products + :<|> Devices + :<|> Grouplicenseusers + +playEnterpriseAPI :: Proxy PlayEnterpriseAPI +playEnterpriseAPI = Proxy diff --git a/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types.hs b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types.hs new file mode 100644 index 000000000..82f781117 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types.hs @@ -0,0 +1,254 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayEnterprise.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayEnterprise.Types + ( + -- * Service URL + playEnterpriseURL + + -- * CollectionsListResponse + , CollectionsListResponse + , collectionsListResponse + , clrKind + , clrCollection + + -- * EnterpriseAccount + , EnterpriseAccount + , enterpriseAccount + , eaKind + , eaAccountEmail + + -- * GroupLicense + , GroupLicense + , groupLicense + , glKind + , glNumProvisioned + , glNumPurchased + , glApproval + , glProductId + , glAcquisitionKind + + -- * AppRestrictionsSchemaRestrictionRestrictionValue + , AppRestrictionsSchemaRestrictionRestrictionValue + , appRestrictionsSchemaRestrictionRestrictionValue + , arsrrvValueMultiselect + , arsrrvValueBool + , arsrrvValueInteger + , arsrrvType + , arsrrvValueString + + -- * GroupLicenseUsersListResponse + , GroupLicenseUsersListResponse + , groupLicenseUsersListResponse + , glulrKind + , glulrUser + + -- * DeviceState + , DeviceState + , deviceState + , dsKind + , dsAccountState + + -- * ApprovalURLInfo + , ApprovalURLInfo + , approvalURLInfo + , auiApprovalUrl + , auiKind + + -- * Device + , Device + , device + , dKind + , dManagementType + , dAndroidId + + -- * ProductPermission + , ProductPermission + , productPermission + , ppState + , ppPermissionId + + -- * AppVersion + , AppVersion + , appVersion + , avVersionCode + , avVersionString + + -- * AppRestrictionsSchemaRestriction + , AppRestrictionsSchemaRestriction + , appRestrictionsSchemaRestriction + , arsrRestrictionType + , arsrEntry + , arsrKey + , arsrEntryValue + , arsrDefaultValue + , arsrTitle + , arsrDescription + + -- * UsersListResponse + , UsersListResponse + , usersListResponse + , ulrKind + , ulrUser + + -- * InstallsListResponse + , InstallsListResponse + , installsListResponse + , ilrKind + , ilrInstall + + -- * Collection + , Collection + , collection + , cKind + , cCollectionId + , cVisibility + , cName + , cProductId + + -- * GroupLicensesListResponse + , GroupLicensesListResponse + , groupLicensesListResponse + , gllrGroupLicense + , gllrKind + + -- * User + , User + , user + , uKind + , uId + , uPrimaryEmail + + -- * ProductSet + , ProductSet + , productSet + , psKind + , psProductId + + -- * Install + , Install + , install + , iVersionCode + , iKind + , iInstallState + , iProductId + + -- * EnterprisesSendTestPushNotificationResponse + , EnterprisesSendTestPushNotificationResponse + , enterprisesSendTestPushNotificationResponse + , estpnrTopicName + , estpnrMessageId + + -- * ProductsGenerateApprovalURLResponse + , ProductsGenerateApprovalURLResponse + , productsGenerateApprovalURLResponse + , pgaurUrl + + -- * AppRestrictionsSchema + , AppRestrictionsSchema + , appRestrictionsSchema + , arsKind + , arsRestrictions + + -- * EnterprisesListResponse + , EnterprisesListResponse + , enterprisesListResponse + , elrKind + , elrEnterprise + + -- * DevicesListResponse + , DevicesListResponse + , devicesListResponse + , dlrKind + , dlrDevice + + -- * UserToken + , UserToken + , userToken + , utKind + , utToken + , utUserId + + -- * Enterprise + , Enterprise + , enterprise + , eKind + , ePrimaryDomain + , eName + , eId + + -- * Permission + , Permission + , permission + , pKind + , pName + , pDescription + , pPermissionId + + -- * Product + , Product + , product + , proAuthorName + , proKind + , proWorkDetailsUrl + , proRequiresContainerApp + , proAppVersion + , proDistributionChannel + , proIconUrl + , proTitle + , proProductId + , proDetailsUrl + + -- * EntitlementsListResponse + , EntitlementsListResponse + , entitlementsListResponse + , entKind + , entEntitlement + + -- * ProductPermissions + , ProductPermissions + , productPermissions + , ppKind + , ppPermission + , ppProductId + + -- * CollectionViewersListResponse + , CollectionViewersListResponse + , collectionViewersListResponse + , cvlrKind + , cvlrUser + + -- * ProductsApproveRequest + , ProductsApproveRequest + , productsApproveRequest + , parApprovalUrlInfo + + -- * Entitlement + , Entitlement + , entitlement + , eeKind + , eeReason + , eeProductId + ) where + +import Network.Google.PlayEnterprise.Types.Product +import Network.Google.PlayEnterprise.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Play EMM API. +playEnterpriseURL :: BaseURL +playEnterpriseURL + = BaseUrl Https + "https://www.googleapis.com/androidenterprise/v1/" + 443 diff --git a/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Product.hs b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Product.hs new file mode 100644 index 000000000..bdba20260 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Product.hs @@ -0,0 +1,2180 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayEnterprise.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayEnterprise.Types.Product where + +import Network.Google.PlayEnterprise.Types.Sum +import Network.Google.Prelude + +-- | The collection resources for the enterprise. +-- +-- /See:/ 'collectionsListResponse' smart constructor. +data CollectionsListResponse = CollectionsListResponse + { _clrKind :: !Text + , _clrCollection :: !(Maybe [Maybe Collection]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrKind' +-- +-- * 'clrCollection' +collectionsListResponse + :: CollectionsListResponse +collectionsListResponse = + CollectionsListResponse + { _clrKind = "androidenterprise#collectionsListResponse" + , _clrCollection = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#collectionsListResponse\". +clrKind :: Lens' CollectionsListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +-- | An ordered collection of products which can be made visible on the +-- Google Play Store to a selected group of users. +clrCollection :: Lens' CollectionsListResponse [Maybe Collection] +clrCollection + = lens _clrCollection + (\ s a -> s{_clrCollection = a}) + . _Default + . _Coerce + +instance FromJSON CollectionsListResponse where + parseJSON + = withObject "CollectionsListResponse" + (\ o -> + CollectionsListResponse <$> + (o .:? "kind" .!= + "androidenterprise#collectionsListResponse") + <*> (o .:? "collection" .!= mempty)) + +instance ToJSON CollectionsListResponse where + toJSON CollectionsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _clrKind), + ("collection" .=) <$> _clrCollection]) + +-- | A service account that can be used to authenticate as the enterprise to +-- API calls that require such authentication. +-- +-- /See:/ 'enterpriseAccount' smart constructor. +data EnterpriseAccount = EnterpriseAccount + { _eaKind :: !Text + , _eaAccountEmail :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterpriseAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eaKind' +-- +-- * 'eaAccountEmail' +enterpriseAccount + :: EnterpriseAccount +enterpriseAccount = + EnterpriseAccount + { _eaKind = "androidenterprise#enterpriseAccount" + , _eaAccountEmail = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#enterpriseAccount\". +eaKind :: Lens' EnterpriseAccount Text +eaKind = lens _eaKind (\ s a -> s{_eaKind = a}) + +-- | The email address of the service account. +eaAccountEmail :: Lens' EnterpriseAccount (Maybe Text) +eaAccountEmail + = lens _eaAccountEmail + (\ s a -> s{_eaAccountEmail = a}) + +instance FromJSON EnterpriseAccount where + parseJSON + = withObject "EnterpriseAccount" + (\ o -> + EnterpriseAccount <$> + (o .:? "kind" .!= + "androidenterprise#enterpriseAccount") + <*> (o .:? "accountEmail")) + +instance ToJSON EnterpriseAccount where + toJSON EnterpriseAccount{..} + = object + (catMaybes + [Just ("kind" .= _eaKind), + ("accountEmail" .=) <$> _eaAccountEmail]) + +-- | A group license object indicates a product that an enterprise admin has +-- approved for use in the enterprise. The product may be free or paid. For +-- free products, a group license object is created in these cases: if the +-- enterprise admin approves a product in Google Play, if the product is +-- added to a collection, or if an entitlement for the product is created +-- for a user via the API. For paid products, a group license object is +-- only created as part of the first bulk purchase of that product in +-- Google Play by the enterprise admin. The API can be used to query group +-- licenses; the available information includes the total number of +-- licenses purchased (for paid products) and the total number of licenses +-- that have been provisioned, that is, the total number of user +-- entitlements in existence for the product. Group license objects are +-- never deleted. If, for example, a free app is added to a collection and +-- then removed, the group license will remain, allowing the enterprise +-- admin to keep track of any remaining entitlements. An enterprise admin +-- may indicate they are no longer interested in the group license by +-- marking it as unapproved in Google Play. +-- +-- /See:/ 'groupLicense' smart constructor. +data GroupLicense = GroupLicense + { _glKind :: !Text + , _glNumProvisioned :: !(Maybe Int32) + , _glNumPurchased :: !(Maybe Int32) + , _glApproval :: !(Maybe Text) + , _glProductId :: !(Maybe Text) + , _glAcquisitionKind :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupLicense' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glKind' +-- +-- * 'glNumProvisioned' +-- +-- * 'glNumPurchased' +-- +-- * 'glApproval' +-- +-- * 'glProductId' +-- +-- * 'glAcquisitionKind' +groupLicense + :: GroupLicense +groupLicense = + GroupLicense + { _glKind = "androidenterprise#groupLicense" + , _glNumProvisioned = Nothing + , _glNumPurchased = Nothing + , _glApproval = Nothing + , _glProductId = Nothing + , _glAcquisitionKind = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#groupLicense\". +glKind :: Lens' GroupLicense Text +glKind = lens _glKind (\ s a -> s{_glKind = a}) + +-- | The total number of provisioned licenses for this product. Returned by +-- read operations, but ignored in write operations. +glNumProvisioned :: Lens' GroupLicense (Maybe Int32) +glNumProvisioned + = lens _glNumProvisioned + (\ s a -> s{_glNumProvisioned = a}) + +-- | The number of purchased licenses (possibly in multiple purchases). If +-- this field is omitted then there is no limit on the number of licenses +-- that can be provisioned (e.g. if the acquisition kind is \"free\"). +glNumPurchased :: Lens' GroupLicense (Maybe Int32) +glNumPurchased + = lens _glNumPurchased + (\ s a -> s{_glNumPurchased = a}) + +-- | Whether the product to which this group license relates is currently +-- approved by the enterprise, as either \"approved\" or \"unapproved\". +-- Products are approved when a group license is first created, but this +-- approval may be revoked by an enterprise admin via Google Play. +-- Unapproved products will not be visible to end users in collections and +-- new entitlements to them should not normally be created. +glApproval :: Lens' GroupLicense (Maybe Text) +glApproval + = lens _glApproval (\ s a -> s{_glApproval = a}) + +-- | The ID of the product that the license is for, e.g. +-- \"app:com.google.android.gm\". +glProductId :: Lens' GroupLicense (Maybe Text) +glProductId + = lens _glProductId (\ s a -> s{_glProductId = a}) + +-- | How this group license was acquired. \"bulkPurchase\" means that this +-- group license object was created because the enterprise purchased +-- licenses for this product; this is \"free\" otherwise (for free +-- products). +glAcquisitionKind :: Lens' GroupLicense (Maybe Text) +glAcquisitionKind + = lens _glAcquisitionKind + (\ s a -> s{_glAcquisitionKind = a}) + +instance FromJSON GroupLicense where + parseJSON + = withObject "GroupLicense" + (\ o -> + GroupLicense <$> + (o .:? "kind" .!= "androidenterprise#groupLicense") + <*> (o .:? "numProvisioned") + <*> (o .:? "numPurchased") + <*> (o .:? "approval") + <*> (o .:? "productId") + <*> (o .:? "acquisitionKind")) + +instance ToJSON GroupLicense where + toJSON GroupLicense{..} + = object + (catMaybes + [Just ("kind" .= _glKind), + ("numProvisioned" .=) <$> _glNumProvisioned, + ("numPurchased" .=) <$> _glNumPurchased, + ("approval" .=) <$> _glApproval, + ("productId" .=) <$> _glProductId, + ("acquisitionKind" .=) <$> _glAcquisitionKind]) + +-- | A typed value for the restriction. +-- +-- /See:/ 'appRestrictionsSchemaRestrictionRestrictionValue' smart constructor. +data AppRestrictionsSchemaRestrictionRestrictionValue = AppRestrictionsSchemaRestrictionRestrictionValue + { _arsrrvValueMultiselect :: !(Maybe [Text]) + , _arsrrvValueBool :: !(Maybe Bool) + , _arsrrvValueInteger :: !(Maybe Int32) + , _arsrrvType :: !(Maybe Text) + , _arsrrvValueString :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppRestrictionsSchemaRestrictionRestrictionValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arsrrvValueMultiselect' +-- +-- * 'arsrrvValueBool' +-- +-- * 'arsrrvValueInteger' +-- +-- * 'arsrrvType' +-- +-- * 'arsrrvValueString' +appRestrictionsSchemaRestrictionRestrictionValue + :: AppRestrictionsSchemaRestrictionRestrictionValue +appRestrictionsSchemaRestrictionRestrictionValue = + AppRestrictionsSchemaRestrictionRestrictionValue + { _arsrrvValueMultiselect = Nothing + , _arsrrvValueBool = Nothing + , _arsrrvValueInteger = Nothing + , _arsrrvType = Nothing + , _arsrrvValueString = Nothing + } + +-- | The list of string values - this will only be present if type is +-- multiselect. +arsrrvValueMultiselect :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue [Text] +arsrrvValueMultiselect + = lens _arsrrvValueMultiselect + (\ s a -> s{_arsrrvValueMultiselect = a}) + . _Default + . _Coerce + +-- | The boolean value - this will only be present if type is bool. +arsrrvValueBool :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Bool) +arsrrvValueBool + = lens _arsrrvValueBool + (\ s a -> s{_arsrrvValueBool = a}) + +-- | The integer value - this will only be present if type is integer. +arsrrvValueInteger :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Int32) +arsrrvValueInteger + = lens _arsrrvValueInteger + (\ s a -> s{_arsrrvValueInteger = a}) + +-- | The type of the value being provided. +arsrrvType :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Text) +arsrrvType + = lens _arsrrvType (\ s a -> s{_arsrrvType = a}) + +-- | The string value - this will be present for types string, choice and +-- hidden. +arsrrvValueString :: Lens' AppRestrictionsSchemaRestrictionRestrictionValue (Maybe Text) +arsrrvValueString + = lens _arsrrvValueString + (\ s a -> s{_arsrrvValueString = a}) + +instance FromJSON + AppRestrictionsSchemaRestrictionRestrictionValue + where + parseJSON + = withObject + "AppRestrictionsSchemaRestrictionRestrictionValue" + (\ o -> + AppRestrictionsSchemaRestrictionRestrictionValue <$> + (o .:? "valueMultiselect" .!= mempty) <*> + (o .:? "valueBool") + <*> (o .:? "valueInteger") + <*> (o .:? "type") + <*> (o .:? "valueString")) + +instance ToJSON + AppRestrictionsSchemaRestrictionRestrictionValue + where + toJSON + AppRestrictionsSchemaRestrictionRestrictionValue{..} + = object + (catMaybes + [("valueMultiselect" .=) <$> _arsrrvValueMultiselect, + ("valueBool" .=) <$> _arsrrvValueBool, + ("valueInteger" .=) <$> _arsrrvValueInteger, + ("type" .=) <$> _arsrrvType, + ("valueString" .=) <$> _arsrrvValueString]) + +-- | The user resources for the group license. +-- +-- /See:/ 'groupLicenseUsersListResponse' smart constructor. +data GroupLicenseUsersListResponse = GroupLicenseUsersListResponse + { _glulrKind :: !Text + , _glulrUser :: !(Maybe [Maybe User]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupLicenseUsersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glulrKind' +-- +-- * 'glulrUser' +groupLicenseUsersListResponse + :: GroupLicenseUsersListResponse +groupLicenseUsersListResponse = + GroupLicenseUsersListResponse + { _glulrKind = "androidenterprise#groupLicenseUsersListResponse" + , _glulrUser = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#groupLicenseUsersListResponse\". +glulrKind :: Lens' GroupLicenseUsersListResponse Text +glulrKind + = lens _glulrKind (\ s a -> s{_glulrKind = a}) + +-- | A user of an enterprise. +glulrUser :: Lens' GroupLicenseUsersListResponse [Maybe User] +glulrUser + = lens _glulrUser (\ s a -> s{_glulrUser = a}) . + _Default + . _Coerce + +instance FromJSON GroupLicenseUsersListResponse where + parseJSON + = withObject "GroupLicenseUsersListResponse" + (\ o -> + GroupLicenseUsersListResponse <$> + (o .:? "kind" .!= + "androidenterprise#groupLicenseUsersListResponse") + <*> (o .:? "user" .!= mempty)) + +instance ToJSON GroupLicenseUsersListResponse where + toJSON GroupLicenseUsersListResponse{..} + = object + (catMaybes + [Just ("kind" .= _glulrKind), + ("user" .=) <$> _glulrUser]) + +-- | The state of a user\'s device, as accessed by the getState and setState +-- methods on device resources. +-- +-- /See:/ 'deviceState' smart constructor. +data DeviceState = DeviceState + { _dsKind :: !Text + , _dsAccountState :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeviceState' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsKind' +-- +-- * 'dsAccountState' +deviceState + :: DeviceState +deviceState = + DeviceState + { _dsKind = "androidenterprise#deviceState" + , _dsAccountState = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#deviceState\". +dsKind :: Lens' DeviceState Text +dsKind = lens _dsKind (\ s a -> s{_dsKind = a}) + +-- | The state of the Google account on the device. \"enabled\" indicates +-- that the Google account on the device can be used to access Google +-- services (including Google Play), while \"disabled\" means that it +-- cannot. A new device is initially in the \"disabled\" state. +dsAccountState :: Lens' DeviceState (Maybe Text) +dsAccountState + = lens _dsAccountState + (\ s a -> s{_dsAccountState = a}) + +instance FromJSON DeviceState where + parseJSON + = withObject "DeviceState" + (\ o -> + DeviceState <$> + (o .:? "kind" .!= "androidenterprise#deviceState") + <*> (o .:? "accountState")) + +instance ToJSON DeviceState where + toJSON DeviceState{..} + = object + (catMaybes + [Just ("kind" .= _dsKind), + ("accountState" .=) <$> _dsAccountState]) + +-- | Information on an approval URL. +-- +-- /See:/ 'approvalURLInfo' smart constructor. +data ApprovalURLInfo = ApprovalURLInfo + { _auiApprovalUrl :: !(Maybe Text) + , _auiKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ApprovalURLInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auiApprovalUrl' +-- +-- * 'auiKind' +approvalURLInfo + :: ApprovalURLInfo +approvalURLInfo = + ApprovalURLInfo + { _auiApprovalUrl = Nothing + , _auiKind = "androidenterprise#approvalUrlInfo" + } + +-- | A URL that displays a product\'s permissions and that can also be used +-- to approve the product with the Products.approve call. +auiApprovalUrl :: Lens' ApprovalURLInfo (Maybe Text) +auiApprovalUrl + = lens _auiApprovalUrl + (\ s a -> s{_auiApprovalUrl = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#approvalUrlInfo\". +auiKind :: Lens' ApprovalURLInfo Text +auiKind = lens _auiKind (\ s a -> s{_auiKind = a}) + +instance FromJSON ApprovalURLInfo where + parseJSON + = withObject "ApprovalURLInfo" + (\ o -> + ApprovalURLInfo <$> + (o .:? "approvalUrl") <*> + (o .:? "kind" .!= + "androidenterprise#approvalUrlInfo")) + +instance ToJSON ApprovalURLInfo where + toJSON ApprovalURLInfo{..} + = object + (catMaybes + [("approvalUrl" .=) <$> _auiApprovalUrl, + Just ("kind" .= _auiKind)]) + +-- | A device resource represents a mobile device managed by the MDM and +-- belonging to a specific enterprise user. This collection cannot be +-- modified via the API; it is automatically populated as devices are set +-- up to be managed. +-- +-- /See:/ 'device' smart constructor. +data Device = Device + { _dKind :: !Text + , _dManagementType :: !(Maybe Text) + , _dAndroidId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Device' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dKind' +-- +-- * 'dManagementType' +-- +-- * 'dAndroidId' +device + :: Device +device = + Device + { _dKind = "androidenterprise#device" + , _dManagementType = Nothing + , _dAndroidId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#device\". +dKind :: Lens' Device Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | The mechanism by which this device is managed by the MDM. +-- \"managedDevice\" means that the MDM\'s app is a device owner. +-- \"managedProfile\" means that the MDM\'s app is the profile owner (and +-- there is a separate personal profile which is not managed). +-- \"containerApp\" means that the MDM\'s app is managing the Android for +-- Work container app on the device. +dManagementType :: Lens' Device (Maybe Text) +dManagementType + = lens _dManagementType + (\ s a -> s{_dManagementType = a}) + +-- | The Google Play Services Android ID for the device encoded as a +-- lowercase hex string, e.g. \"123456789abcdef0\". +dAndroidId :: Lens' Device (Maybe Text) +dAndroidId + = lens _dAndroidId (\ s a -> s{_dAndroidId = a}) + +instance FromJSON Device where + parseJSON + = withObject "Device" + (\ o -> + Device <$> + (o .:? "kind" .!= "androidenterprise#device") <*> + (o .:? "managementType") + <*> (o .:? "androidId")) + +instance ToJSON Device where + toJSON Device{..} + = object + (catMaybes + [Just ("kind" .= _dKind), + ("managementType" .=) <$> _dManagementType, + ("androidId" .=) <$> _dAndroidId]) + +-- | A product permissions resource represents the set of permissions +-- required by a specific app and whether or not they have been accepted by +-- an enterprise admin. The API can be used to read the set of permissions, +-- and also to update the set to indicate that permissions have been +-- accepted. +-- +-- /See:/ 'productPermission' smart constructor. +data ProductPermission = ProductPermission + { _ppState :: !(Maybe Text) + , _ppPermissionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductPermission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppState' +-- +-- * 'ppPermissionId' +productPermission + :: ProductPermission +productPermission = + ProductPermission + { _ppState = Nothing + , _ppPermissionId = Nothing + } + +-- | Whether the permission has been accepted or not. +ppState :: Lens' ProductPermission (Maybe Text) +ppState = lens _ppState (\ s a -> s{_ppState = a}) + +-- | An opaque string uniquely identifying the permission. +ppPermissionId :: Lens' ProductPermission (Maybe Text) +ppPermissionId + = lens _ppPermissionId + (\ s a -> s{_ppPermissionId = a}) + +instance FromJSON ProductPermission where + parseJSON + = withObject "ProductPermission" + (\ o -> + ProductPermission <$> + (o .:? "state") <*> (o .:? "permissionId")) + +instance ToJSON ProductPermission where + toJSON ProductPermission{..} + = object + (catMaybes + [("state" .=) <$> _ppState, + ("permissionId" .=) <$> _ppPermissionId]) + +-- | This represents a single version of the app. +-- +-- /See:/ 'appVersion' smart constructor. +data AppVersion = AppVersion + { _avVersionCode :: !(Maybe Int32) + , _avVersionString :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppVersion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'avVersionCode' +-- +-- * 'avVersionString' +appVersion + :: AppVersion +appVersion = + AppVersion + { _avVersionCode = Nothing + , _avVersionString = Nothing + } + +-- | Unique increasing identifier for the app version. +avVersionCode :: Lens' AppVersion (Maybe Int32) +avVersionCode + = lens _avVersionCode + (\ s a -> s{_avVersionCode = a}) + +-- | The string used in the Play Store by the app developer to identify the +-- version. The string is not necessarily unique or localized (for example, +-- the string could be \"1.4\"). +avVersionString :: Lens' AppVersion (Maybe Text) +avVersionString + = lens _avVersionString + (\ s a -> s{_avVersionString = a}) + +instance FromJSON AppVersion where + parseJSON + = withObject "AppVersion" + (\ o -> + AppVersion <$> + (o .:? "versionCode") <*> (o .:? "versionString")) + +instance ToJSON AppVersion where + toJSON AppVersion{..} + = object + (catMaybes + [("versionCode" .=) <$> _avVersionCode, + ("versionString" .=) <$> _avVersionString]) + +-- | A restriction in the App Restriction Schema represents a piece of +-- configuration that may be pre-applied. +-- +-- /See:/ 'appRestrictionsSchemaRestriction' smart constructor. +data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction + { _arsrRestrictionType :: !(Maybe Text) + , _arsrEntry :: !(Maybe [Text]) + , _arsrKey :: !(Maybe Text) + , _arsrEntryValue :: !(Maybe [Text]) + , _arsrDefaultValue :: !(Maybe (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)) + , _arsrTitle :: !(Maybe Text) + , _arsrDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppRestrictionsSchemaRestriction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arsrRestrictionType' +-- +-- * 'arsrEntry' +-- +-- * 'arsrKey' +-- +-- * 'arsrEntryValue' +-- +-- * 'arsrDefaultValue' +-- +-- * 'arsrTitle' +-- +-- * 'arsrDescription' +appRestrictionsSchemaRestriction + :: AppRestrictionsSchemaRestriction +appRestrictionsSchemaRestriction = + AppRestrictionsSchemaRestriction + { _arsrRestrictionType = Nothing + , _arsrEntry = Nothing + , _arsrKey = Nothing + , _arsrEntryValue = Nothing + , _arsrDefaultValue = Nothing + , _arsrTitle = Nothing + , _arsrDescription = Nothing + } + +-- | The type of the restriction. +arsrRestrictionType :: Lens' AppRestrictionsSchemaRestriction (Maybe Text) +arsrRestrictionType + = lens _arsrRestrictionType + (\ s a -> s{_arsrRestrictionType = a}) + +-- | For choice or multiselect restrictions, the list of possible entries\' +-- human-readable names. +arsrEntry :: Lens' AppRestrictionsSchemaRestriction [Text] +arsrEntry + = lens _arsrEntry (\ s a -> s{_arsrEntry = a}) . + _Default + . _Coerce + +-- | The unique key that the product uses to identify the restriction, e.g. +-- \"com.google.android.gm.fieldname\". +arsrKey :: Lens' AppRestrictionsSchemaRestriction (Maybe Text) +arsrKey = lens _arsrKey (\ s a -> s{_arsrKey = a}) + +-- | For choice or multiselect restrictions, the list of possible entries\' +-- machine-readable values. +arsrEntryValue :: Lens' AppRestrictionsSchemaRestriction [Text] +arsrEntryValue + = lens _arsrEntryValue + (\ s a -> s{_arsrEntryValue = a}) + . _Default + . _Coerce + +-- | The default value of the restriction. +arsrDefaultValue :: Lens' AppRestrictionsSchemaRestriction (Maybe (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)) +arsrDefaultValue + = lens _arsrDefaultValue + (\ s a -> s{_arsrDefaultValue = a}) + +-- | The name of the restriction. +arsrTitle :: Lens' AppRestrictionsSchemaRestriction (Maybe Text) +arsrTitle + = lens _arsrTitle (\ s a -> s{_arsrTitle = a}) + +-- | A longer description of the restriction, giving more detail of what it +-- affects. +arsrDescription :: Lens' AppRestrictionsSchemaRestriction (Maybe Text) +arsrDescription + = lens _arsrDescription + (\ s a -> s{_arsrDescription = a}) + +instance FromJSON AppRestrictionsSchemaRestriction + where + parseJSON + = withObject "AppRestrictionsSchemaRestriction" + (\ o -> + AppRestrictionsSchemaRestriction <$> + (o .:? "restrictionType") <*> + (o .:? "entry" .!= mempty) + <*> (o .:? "key") + <*> (o .:? "entryValue" .!= mempty) + <*> (o .:? "defaultValue") + <*> (o .:? "title") + <*> (o .:? "description")) + +instance ToJSON AppRestrictionsSchemaRestriction + where + toJSON AppRestrictionsSchemaRestriction{..} + = object + (catMaybes + [("restrictionType" .=) <$> _arsrRestrictionType, + ("entry" .=) <$> _arsrEntry, ("key" .=) <$> _arsrKey, + ("entryValue" .=) <$> _arsrEntryValue, + ("defaultValue" .=) <$> _arsrDefaultValue, + ("title" .=) <$> _arsrTitle, + ("description" .=) <$> _arsrDescription]) + +-- | The matching user resources. +-- +-- /See:/ 'usersListResponse' smart constructor. +data UsersListResponse = UsersListResponse + { _ulrKind :: !Text + , _ulrUser :: !(Maybe [Maybe User]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulrKind' +-- +-- * 'ulrUser' +usersListResponse + :: UsersListResponse +usersListResponse = + UsersListResponse + { _ulrKind = "androidenterprise#usersListResponse" + , _ulrUser = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#usersListResponse\". +ulrKind :: Lens' UsersListResponse Text +ulrKind = lens _ulrKind (\ s a -> s{_ulrKind = a}) + +-- | A user of an enterprise. +ulrUser :: Lens' UsersListResponse [Maybe User] +ulrUser + = lens _ulrUser (\ s a -> s{_ulrUser = a}) . _Default + . _Coerce + +instance FromJSON UsersListResponse where + parseJSON + = withObject "UsersListResponse" + (\ o -> + UsersListResponse <$> + (o .:? "kind" .!= + "androidenterprise#usersListResponse") + <*> (o .:? "user" .!= mempty)) + +instance ToJSON UsersListResponse where + toJSON UsersListResponse{..} + = object + (catMaybes + [Just ("kind" .= _ulrKind), + ("user" .=) <$> _ulrUser]) + +-- | The install resources for the device. +-- +-- /See:/ 'installsListResponse' smart constructor. +data InstallsListResponse = InstallsListResponse + { _ilrKind :: !Text + , _ilrInstall :: !(Maybe [Maybe Install]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilrKind' +-- +-- * 'ilrInstall' +installsListResponse + :: InstallsListResponse +installsListResponse = + InstallsListResponse + { _ilrKind = "androidenterprise#installsListResponse" + , _ilrInstall = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#installsListResponse\". +ilrKind :: Lens' InstallsListResponse Text +ilrKind = lens _ilrKind (\ s a -> s{_ilrKind = a}) + +-- | An installation of an app for a user on a specific device. The existence +-- of an install implies that the user must have an entitlement to the app. +ilrInstall :: Lens' InstallsListResponse [Maybe Install] +ilrInstall + = lens _ilrInstall (\ s a -> s{_ilrInstall = a}) . + _Default + . _Coerce + +instance FromJSON InstallsListResponse where + parseJSON + = withObject "InstallsListResponse" + (\ o -> + InstallsListResponse <$> + (o .:? "kind" .!= + "androidenterprise#installsListResponse") + <*> (o .:? "install" .!= mempty)) + +instance ToJSON InstallsListResponse where + toJSON InstallsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _ilrKind), + ("install" .=) <$> _ilrInstall]) + +-- | A collection resource defines a named set of apps that is visible to a +-- set of users in the Google Play Store app running on those users\' +-- managed devices. Those users can then install any of those apps if they +-- wish (which will trigger creation of install and entitlement resources). +-- A user cannot install an app on a managed device unless the app is +-- listed in at least one collection that is visible to that user. Note +-- that the API can be used to directly install an app regardless of +-- whether it is in any collection - so an enterprise has a choice of +-- either directly pushing apps to users, or allowing users to install apps +-- if they want. Which is appropriate will depend on the enterprise\'s +-- policies and the purpose of the apps concerned. +-- +-- /See:/ 'collection' smart constructor. +data Collection = Collection + { _cKind :: !Text + , _cCollectionId :: !(Maybe Text) + , _cVisibility :: !(Maybe Text) + , _cName :: !(Maybe Text) + , _cProductId :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Collection' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cKind' +-- +-- * 'cCollectionId' +-- +-- * 'cVisibility' +-- +-- * 'cName' +-- +-- * 'cProductId' +collection + :: Collection +collection = + Collection + { _cKind = "androidenterprise#collection" + , _cCollectionId = Nothing + , _cVisibility = Nothing + , _cName = Nothing + , _cProductId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#collection\". +cKind :: Lens' Collection Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Arbitrary unique ID, allocated by the API on creation. +cCollectionId :: Lens' Collection (Maybe Text) +cCollectionId + = lens _cCollectionId + (\ s a -> s{_cCollectionId = a}) + +-- | Whether this collection is visible to all users, or only to the users +-- that have been granted access through the \"Collectionviewers\" API. +-- With the launch of the \"setAvailableProductSet\" API, this property +-- should always be set to \"viewersOnly\", as the \"allUsers\" option will +-- bypass the \"availableProductSet\" for all users within a domain. The +-- \"allUsers\" setting is deprecated, and will be removed. +cVisibility :: Lens' Collection (Maybe Text) +cVisibility + = lens _cVisibility (\ s a -> s{_cVisibility = a}) + +-- | A user-friendly name for the collection (should be unique), e.g. +-- \"Accounting apps\". +cName :: Lens' Collection (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | The IDs of the products in the collection, in the order in which they +-- should be displayed. +cProductId :: Lens' Collection [Text] +cProductId + = lens _cProductId (\ s a -> s{_cProductId = a}) . + _Default + . _Coerce + +instance FromJSON Collection where + parseJSON + = withObject "Collection" + (\ o -> + Collection <$> + (o .:? "kind" .!= "androidenterprise#collection") <*> + (o .:? "collectionId") + <*> (o .:? "visibility") + <*> (o .:? "name") + <*> (o .:? "productId" .!= mempty)) + +instance ToJSON Collection where + toJSON Collection{..} + = object + (catMaybes + [Just ("kind" .= _cKind), + ("collectionId" .=) <$> _cCollectionId, + ("visibility" .=) <$> _cVisibility, + ("name" .=) <$> _cName, + ("productId" .=) <$> _cProductId]) + +-- | The grouplicense resources for the enterprise. +-- +-- /See:/ 'groupLicensesListResponse' smart constructor. +data GroupLicensesListResponse = GroupLicensesListResponse + { _gllrGroupLicense :: !(Maybe [Maybe GroupLicense]) + , _gllrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupLicensesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gllrGroupLicense' +-- +-- * 'gllrKind' +groupLicensesListResponse + :: GroupLicensesListResponse +groupLicensesListResponse = + GroupLicensesListResponse + { _gllrGroupLicense = Nothing + , _gllrKind = "androidenterprise#groupLicensesListResponse" + } + +-- | A group license for a product approved for use in the enterprise. +gllrGroupLicense :: Lens' GroupLicensesListResponse [Maybe GroupLicense] +gllrGroupLicense + = lens _gllrGroupLicense + (\ s a -> s{_gllrGroupLicense = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#groupLicensesListResponse\". +gllrKind :: Lens' GroupLicensesListResponse Text +gllrKind = lens _gllrKind (\ s a -> s{_gllrKind = a}) + +instance FromJSON GroupLicensesListResponse where + parseJSON + = withObject "GroupLicensesListResponse" + (\ o -> + GroupLicensesListResponse <$> + (o .:? "groupLicense" .!= mempty) <*> + (o .:? "kind" .!= + "androidenterprise#groupLicensesListResponse")) + +instance ToJSON GroupLicensesListResponse where + toJSON GroupLicensesListResponse{..} + = object + (catMaybes + [("groupLicense" .=) <$> _gllrGroupLicense, + Just ("kind" .= _gllrKind)]) + +-- | A user resource represents an individual user within the enterprise\'s +-- domain. Note that each user is associated with a Google account based on +-- the user\'s corporate email address (which must be in one of the +-- enterprise\'s domains). As part of installing an MDM app to manage a +-- device the Google account must be provisioned to the device, and so the +-- user resource must be created before that. This can be done using the +-- Google Admin SDK Directory API. The ID for a user is an opaque string. +-- It can be retrieved using the list method queried by the user\'s primary +-- email address. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uKind :: !Text + , _uId :: !(Maybe Text) + , _uPrimaryEmail :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uKind' +-- +-- * 'uId' +-- +-- * 'uPrimaryEmail' +user + :: User +user = + User + { _uKind = "androidenterprise#user" + , _uId = Nothing + , _uPrimaryEmail = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#user\". +uKind :: Lens' User Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | The unique ID for the user. +uId :: Lens' User (Maybe Text) +uId = lens _uId (\ s a -> s{_uId = a}) + +-- | The user\'s primary email, e.g. \"jsmith\'example.com\". +uPrimaryEmail :: Lens' User (Maybe Text) +uPrimaryEmail + = lens _uPrimaryEmail + (\ s a -> s{_uPrimaryEmail = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "kind" .!= "androidenterprise#user") <*> + (o .:? "id") + <*> (o .:? "primaryEmail")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [Just ("kind" .= _uKind), ("id" .=) <$> _uId, + ("primaryEmail" .=) <$> _uPrimaryEmail]) + +-- | A set of products. +-- +-- /See:/ 'productSet' smart constructor. +data ProductSet = ProductSet + { _psKind :: !Text + , _psProductId :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductSet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psKind' +-- +-- * 'psProductId' +productSet + :: ProductSet +productSet = + ProductSet + { _psKind = "androidenterprise#productSet" + , _psProductId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#productSet\". +psKind :: Lens' ProductSet Text +psKind = lens _psKind (\ s a -> s{_psKind = a}) + +-- | The list of product IDs making up the set of products. +psProductId :: Lens' ProductSet [Text] +psProductId + = lens _psProductId (\ s a -> s{_psProductId = a}) . + _Default + . _Coerce + +instance FromJSON ProductSet where + parseJSON + = withObject "ProductSet" + (\ o -> + ProductSet <$> + (o .:? "kind" .!= "androidenterprise#productSet") <*> + (o .:? "productId" .!= mempty)) + +instance ToJSON ProductSet where + toJSON ProductSet{..} + = object + (catMaybes + [Just ("kind" .= _psKind), + ("productId" .=) <$> _psProductId]) + +-- | The existence of an install resource indicates that an app is installed +-- on a particular device (or that an install is pending). The API can be +-- used to create an install resource using the update method. This +-- triggers the actual install of the app on the device. If the user does +-- not already have an entitlement for the app then an attempt is made to +-- create one. If this fails (e.g. because the app is not free and there is +-- no available license) then the creation of the install fails. The API +-- can also be used to update an installed app. If the update method is +-- used on an existing install then the app will be updated to the latest +-- available version. Note that it is not possible to force the +-- installation of a specific version of an app; the version code is +-- read-only. If a user installs an app themselves (as permitted by the +-- enterprise), then again an install resource and possibly an entitlement +-- resource are automatically created. The API can also be used to delete +-- an install resource, which triggers the removal of the app from the +-- device. Note that deleting an install does not automatically remove the +-- corresponding entitlement, even if there are no remaining installs. The +-- install resource will also be deleted if the user uninstalls the app +-- themselves. +-- +-- /See:/ 'install' smart constructor. +data Install = Install + { _iVersionCode :: !(Maybe Int32) + , _iKind :: !Text + , _iInstallState :: !(Maybe Text) + , _iProductId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Install' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iVersionCode' +-- +-- * 'iKind' +-- +-- * 'iInstallState' +-- +-- * 'iProductId' +install + :: Install +install = + Install + { _iVersionCode = Nothing + , _iKind = "androidenterprise#install" + , _iInstallState = Nothing + , _iProductId = Nothing + } + +-- | The version of the installed product. Guaranteed to be set only if the +-- install state is \"installed\". +iVersionCode :: Lens' Install (Maybe Int32) +iVersionCode + = lens _iVersionCode (\ s a -> s{_iVersionCode = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#install\". +iKind :: Lens' Install Text +iKind = lens _iKind (\ s a -> s{_iKind = a}) + +-- | Install state. The state \"installPending\" means that an install +-- request has recently been made and download to the device is in +-- progress. The state \"installed\" means that the app has been installed. +-- This field is read-only. +iInstallState :: Lens' Install (Maybe Text) +iInstallState + = lens _iInstallState + (\ s a -> s{_iInstallState = a}) + +-- | The ID of the product that the install is for, e.g. +-- \"app:com.google.android.gm\". +iProductId :: Lens' Install (Maybe Text) +iProductId + = lens _iProductId (\ s a -> s{_iProductId = a}) + +instance FromJSON Install where + parseJSON + = withObject "Install" + (\ o -> + Install <$> + (o .:? "versionCode") <*> + (o .:? "kind" .!= "androidenterprise#install") + <*> (o .:? "installState") + <*> (o .:? "productId")) + +instance ToJSON Install where + toJSON Install{..} + = object + (catMaybes + [("versionCode" .=) <$> _iVersionCode, + Just ("kind" .= _iKind), + ("installState" .=) <$> _iInstallState, + ("productId" .=) <$> _iProductId]) + +-- +-- /See:/ 'enterprisesSendTestPushNotificationResponse' smart constructor. +data EnterprisesSendTestPushNotificationResponse = EnterprisesSendTestPushNotificationResponse + { _estpnrTopicName :: !(Maybe Text) + , _estpnrMessageId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesSendTestPushNotificationResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'estpnrTopicName' +-- +-- * 'estpnrMessageId' +enterprisesSendTestPushNotificationResponse + :: EnterprisesSendTestPushNotificationResponse +enterprisesSendTestPushNotificationResponse = + EnterprisesSendTestPushNotificationResponse + { _estpnrTopicName = Nothing + , _estpnrMessageId = Nothing + } + +-- | The name of the Cloud Pub\/Sub topic to which notifications for this +-- enterprise\'s enrolled account will be sent. +estpnrTopicName :: Lens' EnterprisesSendTestPushNotificationResponse (Maybe Text) +estpnrTopicName + = lens _estpnrTopicName + (\ s a -> s{_estpnrTopicName = a}) + +-- | The message ID of the test push notification that was sent. +estpnrMessageId :: Lens' EnterprisesSendTestPushNotificationResponse (Maybe Text) +estpnrMessageId + = lens _estpnrMessageId + (\ s a -> s{_estpnrMessageId = a}) + +instance FromJSON + EnterprisesSendTestPushNotificationResponse where + parseJSON + = withObject + "EnterprisesSendTestPushNotificationResponse" + (\ o -> + EnterprisesSendTestPushNotificationResponse <$> + (o .:? "topicName") <*> (o .:? "messageId")) + +instance ToJSON + EnterprisesSendTestPushNotificationResponse where + toJSON + EnterprisesSendTestPushNotificationResponse{..} + = object + (catMaybes + [("topicName" .=) <$> _estpnrTopicName, + ("messageId" .=) <$> _estpnrMessageId]) + +-- +-- /See:/ 'productsGenerateApprovalURLResponse' smart constructor. +newtype ProductsGenerateApprovalURLResponse = ProductsGenerateApprovalURLResponse + { _pgaurUrl :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsGenerateApprovalURLResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgaurUrl' +productsGenerateApprovalURLResponse + :: ProductsGenerateApprovalURLResponse +productsGenerateApprovalURLResponse = + ProductsGenerateApprovalURLResponse + { _pgaurUrl = Nothing + } + +-- | A URL that can be rendered in an iframe to display the permissions (if +-- any) of a product. This URL can be used to approve the product only once +-- and only within 24 hours of being generated, using the Products.approve +-- call. If the product is currently unapproved and has no permissions, +-- this URL will point to an empty page. If the product is currently +-- approved, a URL will only be generated if that product has added +-- permissions since it was last approved, and the URL will only display +-- those new permissions that have not yet been accepted. +pgaurUrl :: Lens' ProductsGenerateApprovalURLResponse (Maybe Text) +pgaurUrl = lens _pgaurUrl (\ s a -> s{_pgaurUrl = a}) + +instance FromJSON ProductsGenerateApprovalURLResponse + where + parseJSON + = withObject "ProductsGenerateApprovalURLResponse" + (\ o -> + ProductsGenerateApprovalURLResponse <$> + (o .:? "url")) + +instance ToJSON ProductsGenerateApprovalURLResponse + where + toJSON ProductsGenerateApprovalURLResponse{..} + = object (catMaybes [("url" .=) <$> _pgaurUrl]) + +-- | Represents the list of app restrictions available to be pre-configured +-- for the product. +-- +-- /See:/ 'appRestrictionsSchema' smart constructor. +data AppRestrictionsSchema = AppRestrictionsSchema + { _arsKind :: !Text + , _arsRestrictions :: !(Maybe [Maybe AppRestrictionsSchemaRestriction]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AppRestrictionsSchema' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arsKind' +-- +-- * 'arsRestrictions' +appRestrictionsSchema + :: AppRestrictionsSchema +appRestrictionsSchema = + AppRestrictionsSchema + { _arsKind = "androidenterprise#appRestrictionsSchema" + , _arsRestrictions = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#appRestrictionsSchema\". +arsKind :: Lens' AppRestrictionsSchema Text +arsKind = lens _arsKind (\ s a -> s{_arsKind = a}) + +-- | The set of restrictions that make up this schema. +arsRestrictions :: Lens' AppRestrictionsSchema [Maybe AppRestrictionsSchemaRestriction] +arsRestrictions + = lens _arsRestrictions + (\ s a -> s{_arsRestrictions = a}) + . _Default + . _Coerce + +instance FromJSON AppRestrictionsSchema where + parseJSON + = withObject "AppRestrictionsSchema" + (\ o -> + AppRestrictionsSchema <$> + (o .:? "kind" .!= + "androidenterprise#appRestrictionsSchema") + <*> (o .:? "restrictions" .!= mempty)) + +instance ToJSON AppRestrictionsSchema where + toJSON AppRestrictionsSchema{..} + = object + (catMaybes + [Just ("kind" .= _arsKind), + ("restrictions" .=) <$> _arsRestrictions]) + +-- | The matching enterprise resources. +-- +-- /See:/ 'enterprisesListResponse' smart constructor. +data EnterprisesListResponse = EnterprisesListResponse + { _elrKind :: !Text + , _elrEnterprise :: !(Maybe [Maybe Enterprise]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elrKind' +-- +-- * 'elrEnterprise' +enterprisesListResponse + :: EnterprisesListResponse +enterprisesListResponse = + EnterprisesListResponse + { _elrKind = "androidenterprise#enterprisesListResponse" + , _elrEnterprise = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#enterprisesListResponse\". +elrKind :: Lens' EnterprisesListResponse Text +elrKind = lens _elrKind (\ s a -> s{_elrKind = a}) + +-- | An enterprise. +elrEnterprise :: Lens' EnterprisesListResponse [Maybe Enterprise] +elrEnterprise + = lens _elrEnterprise + (\ s a -> s{_elrEnterprise = a}) + . _Default + . _Coerce + +instance FromJSON EnterprisesListResponse where + parseJSON + = withObject "EnterprisesListResponse" + (\ o -> + EnterprisesListResponse <$> + (o .:? "kind" .!= + "androidenterprise#enterprisesListResponse") + <*> (o .:? "enterprise" .!= mempty)) + +instance ToJSON EnterprisesListResponse where + toJSON EnterprisesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _elrKind), + ("enterprise" .=) <$> _elrEnterprise]) + +-- | The device resources for the user. +-- +-- /See:/ 'devicesListResponse' smart constructor. +data DevicesListResponse = DevicesListResponse + { _dlrKind :: !Text + , _dlrDevice :: !(Maybe [Maybe Device]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DevicesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlrKind' +-- +-- * 'dlrDevice' +devicesListResponse + :: DevicesListResponse +devicesListResponse = + DevicesListResponse + { _dlrKind = "androidenterprise#devicesListResponse" + , _dlrDevice = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#devicesListResponse\". +dlrKind :: Lens' DevicesListResponse Text +dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a}) + +-- | A managed device. +dlrDevice :: Lens' DevicesListResponse [Maybe Device] +dlrDevice + = lens _dlrDevice (\ s a -> s{_dlrDevice = a}) . + _Default + . _Coerce + +instance FromJSON DevicesListResponse where + parseJSON + = withObject "DevicesListResponse" + (\ o -> + DevicesListResponse <$> + (o .:? "kind" .!= + "androidenterprise#devicesListResponse") + <*> (o .:? "device" .!= mempty)) + +instance ToJSON DevicesListResponse where + toJSON DevicesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _dlrKind), + ("device" .=) <$> _dlrDevice]) + +-- | A UserToken is used by a user when setting up a managed device or +-- profile with their work account on a device. When the user enters their +-- email address and token (activation code) the appropriate MDM app can be +-- automatically downloaded. +-- +-- /See:/ 'userToken' smart constructor. +data UserToken = UserToken + { _utKind :: !Text + , _utToken :: !(Maybe Text) + , _utUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserToken' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utKind' +-- +-- * 'utToken' +-- +-- * 'utUserId' +userToken + :: UserToken +userToken = + UserToken + { _utKind = "androidenterprise#userToken" + , _utToken = Nothing + , _utUserId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#userToken\". +utKind :: Lens' UserToken Text +utKind = lens _utKind (\ s a -> s{_utKind = a}) + +-- | The token (activation code) to be entered by the user. This consists of +-- a sequence of decimal digits. Note that the leading digit may be 0. +utToken :: Lens' UserToken (Maybe Text) +utToken = lens _utToken (\ s a -> s{_utToken = a}) + +-- | The unique ID for the user. +utUserId :: Lens' UserToken (Maybe Text) +utUserId = lens _utUserId (\ s a -> s{_utUserId = a}) + +instance FromJSON UserToken where + parseJSON + = withObject "UserToken" + (\ o -> + UserToken <$> + (o .:? "kind" .!= "androidenterprise#userToken") <*> + (o .:? "token") + <*> (o .:? "userId")) + +instance ToJSON UserToken where + toJSON UserToken{..} + = object + (catMaybes + [Just ("kind" .= _utKind), ("token" .=) <$> _utToken, + ("userId" .=) <$> _utUserId]) + +-- | An enterprise resource represents a binding between an organisation and +-- their MDM. To create an enterprise, an admin of the enterprise must +-- first go through a Play for Work sign-up flow. At the end of this the +-- admin will be presented with a token (a short opaque alphanumeric +-- string). They must then present this to the MDM, who then supplies it to +-- the enroll method. Until this is done the MDM will not have any access +-- to the enterprise. After calling enroll the MDM should call setAccount +-- to specify the service account that will be allowed to act on behalf of +-- the enterprise, which will be required for access to the enterprise\'s +-- data through this API. Only one call of setAccount is allowed for a +-- given enterprise; the only way to change the account later is to +-- unenroll the enterprise and enroll it again (obtaining a new token). The +-- MDM can unenroll an enterprise in order to sever the binding between +-- them. Re-enrolling an enterprise is possible, but requires a new token +-- to be retrieved. Enterprises.unenroll requires the MDM\'s credentials +-- (as enroll does), not the enterprise\'s. Enterprises.unenroll can only +-- be used for enterprises that were previously enrolled with the enroll +-- call. Any enterprises that were enrolled using the (deprecated) +-- Enterprises.insert call must be unenrolled with Enterprises.delete and +-- can then be re-enrolled using the Enterprises.enroll call. The ID for an +-- enterprise is an opaque string. It is returned by insert and enroll and +-- can also be retrieved if the enterprise\'s primary domain is known using +-- the list method. +-- +-- /See:/ 'enterprise' smart constructor. +data Enterprise = Enterprise + { _eKind :: !Text + , _ePrimaryDomain :: !(Maybe Text) + , _eName :: !(Maybe Text) + , _eId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Enterprise' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eKind' +-- +-- * 'ePrimaryDomain' +-- +-- * 'eName' +-- +-- * 'eId' +enterprise + :: Enterprise +enterprise = + Enterprise + { _eKind = "androidenterprise#enterprise" + , _ePrimaryDomain = Nothing + , _eName = Nothing + , _eId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#enterprise\". +eKind :: Lens' Enterprise Text +eKind = lens _eKind (\ s a -> s{_eKind = a}) + +-- | The enterprise\'s primary domain, e.g. \"example.com\". +ePrimaryDomain :: Lens' Enterprise (Maybe Text) +ePrimaryDomain + = lens _ePrimaryDomain + (\ s a -> s{_ePrimaryDomain = a}) + +-- | The name of the enterprise, e.g. \"Example Inc\". +eName :: Lens' Enterprise (Maybe Text) +eName = lens _eName (\ s a -> s{_eName = a}) + +-- | The unique ID for the enterprise. +eId :: Lens' Enterprise (Maybe Text) +eId = lens _eId (\ s a -> s{_eId = a}) + +instance FromJSON Enterprise where + parseJSON + = withObject "Enterprise" + (\ o -> + Enterprise <$> + (o .:? "kind" .!= "androidenterprise#enterprise") <*> + (o .:? "primaryDomain") + <*> (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON Enterprise where + toJSON Enterprise{..} + = object + (catMaybes + [Just ("kind" .= _eKind), + ("primaryDomain" .=) <$> _ePrimaryDomain, + ("name" .=) <$> _eName, ("id" .=) <$> _eId]) + +-- | A permission represents some extra capability, to be granted to an +-- Android app, which requires explicit consent. An enterprise admin must +-- consent to these permissions on behalf of their users before an +-- entitlement for the app can be created. The permissions collection is +-- read-only. The information provided for each permission (localized name +-- and description) is intended to be used in the MDM user interface when +-- obtaining consent from the enterprise. +-- +-- /See:/ 'permission' smart constructor. +data Permission = Permission + { _pKind :: !Text + , _pName :: !(Maybe Text) + , _pDescription :: !(Maybe Text) + , _pPermissionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Permission' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pKind' +-- +-- * 'pName' +-- +-- * 'pDescription' +-- +-- * 'pPermissionId' +permission + :: Permission +permission = + Permission + { _pKind = "androidenterprise#permission" + , _pName = Nothing + , _pDescription = Nothing + , _pPermissionId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#permission\". +pKind :: Lens' Permission Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The name of the permission. +pName :: Lens' Permission (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | A longer description of the permissions giving more details of what it +-- affects. +pDescription :: Lens' Permission (Maybe Text) +pDescription + = lens _pDescription (\ s a -> s{_pDescription = a}) + +-- | An opaque string uniquely identifying the permission. +pPermissionId :: Lens' Permission (Maybe Text) +pPermissionId + = lens _pPermissionId + (\ s a -> s{_pPermissionId = a}) + +instance FromJSON Permission where + parseJSON + = withObject "Permission" + (\ o -> + Permission <$> + (o .:? "kind" .!= "androidenterprise#permission") <*> + (o .:? "name") + <*> (o .:? "description") + <*> (o .:? "permissionId")) + +instance ToJSON Permission where + toJSON Permission{..} + = object + (catMaybes + [Just ("kind" .= _pKind), ("name" .=) <$> _pName, + ("description" .=) <$> _pDescription, + ("permissionId" .=) <$> _pPermissionId]) + +-- | A product represents an app in the Google Play Store that is available +-- to at least some users in the enterprise. (Some apps are restricted to a +-- single enterprise, and no information about them is made available +-- outside that enterprise.) The information provided for each product +-- (localized name, icon, link to the full Google Play details page) is +-- intended to allow a basic representation of the product within an MDM +-- user interface. +-- +-- /See:/ 'product' smart constructor. +data Product = Product + { _proAuthorName :: !(Maybe Text) + , _proKind :: !Text + , _proWorkDetailsUrl :: !(Maybe Text) + , _proRequiresContainerApp :: !(Maybe Bool) + , _proAppVersion :: !(Maybe [Maybe AppVersion]) + , _proDistributionChannel :: !(Maybe Text) + , _proIconUrl :: !(Maybe Text) + , _proTitle :: !(Maybe Text) + , _proProductId :: !(Maybe Text) + , _proDetailsUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Product' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proAuthorName' +-- +-- * 'proKind' +-- +-- * 'proWorkDetailsUrl' +-- +-- * 'proRequiresContainerApp' +-- +-- * 'proAppVersion' +-- +-- * 'proDistributionChannel' +-- +-- * 'proIconUrl' +-- +-- * 'proTitle' +-- +-- * 'proProductId' +-- +-- * 'proDetailsUrl' +product + :: Product +product = + Product + { _proAuthorName = Nothing + , _proKind = "androidenterprise#product" + , _proWorkDetailsUrl = Nothing + , _proRequiresContainerApp = Nothing + , _proAppVersion = Nothing + , _proDistributionChannel = Nothing + , _proIconUrl = Nothing + , _proTitle = Nothing + , _proProductId = Nothing + , _proDetailsUrl = Nothing + } + +-- | The name of the author of the product (e.g. the app developer). +proAuthorName :: Lens' Product (Maybe Text) +proAuthorName + = lens _proAuthorName + (\ s a -> s{_proAuthorName = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#product\". +proKind :: Lens' Product Text +proKind = lens _proKind (\ s a -> s{_proKind = a}) + +-- | A link to the Google Play for Work details page for the product, for use +-- by an Enterprise administrator. +proWorkDetailsUrl :: Lens' Product (Maybe Text) +proWorkDetailsUrl + = lens _proWorkDetailsUrl + (\ s a -> s{_proWorkDetailsUrl = a}) + +-- | Whether this app can only be installed on devices using the Android for +-- Work container app. +proRequiresContainerApp :: Lens' Product (Maybe Bool) +proRequiresContainerApp + = lens _proRequiresContainerApp + (\ s a -> s{_proRequiresContainerApp = a}) + +-- | App versions currently available for this product. The returned list +-- contains only public versions. Alpha and beta versions are not included. +proAppVersion :: Lens' Product [Maybe AppVersion] +proAppVersion + = lens _proAppVersion + (\ s a -> s{_proAppVersion = a}) + . _Default + . _Coerce + +-- | How and to whom the package is made available. The value +-- publicGoogleHosted means that the package is available through the Play +-- Store and not restricted to a specific enterprise. The value +-- privateGoogleHosted means that the package is a private app (restricted +-- to an enterprise) but hosted by Google. The value privateSelfHosted +-- means that the package is a private app (restricted to an enterprise) +-- and is privately hosted. +proDistributionChannel :: Lens' Product (Maybe Text) +proDistributionChannel + = lens _proDistributionChannel + (\ s a -> s{_proDistributionChannel = a}) + +-- | A link to an image that can be used as an icon for the product. +proIconUrl :: Lens' Product (Maybe Text) +proIconUrl + = lens _proIconUrl (\ s a -> s{_proIconUrl = a}) + +-- | The name of the product. +proTitle :: Lens' Product (Maybe Text) +proTitle = lens _proTitle (\ s a -> s{_proTitle = a}) + +-- | A string of the form app:. For example, app:com.google.android.gm +-- represents the Gmail app. +proProductId :: Lens' Product (Maybe Text) +proProductId + = lens _proProductId (\ s a -> s{_proProductId = a}) + +-- | A link to the (consumer) Google Play details page for the product. +proDetailsUrl :: Lens' Product (Maybe Text) +proDetailsUrl + = lens _proDetailsUrl + (\ s a -> s{_proDetailsUrl = a}) + +instance FromJSON Product where + parseJSON + = withObject "Product" + (\ o -> + Product <$> + (o .:? "authorName") <*> + (o .:? "kind" .!= "androidenterprise#product") + <*> (o .:? "workDetailsUrl") + <*> (o .:? "requiresContainerApp") + <*> (o .:? "appVersion" .!= mempty) + <*> (o .:? "distributionChannel") + <*> (o .:? "iconUrl") + <*> (o .:? "title") + <*> (o .:? "productId") + <*> (o .:? "detailsUrl")) + +instance ToJSON Product where + toJSON Product{..} + = object + (catMaybes + [("authorName" .=) <$> _proAuthorName, + Just ("kind" .= _proKind), + ("workDetailsUrl" .=) <$> _proWorkDetailsUrl, + ("requiresContainerApp" .=) <$> + _proRequiresContainerApp, + ("appVersion" .=) <$> _proAppVersion, + ("distributionChannel" .=) <$> + _proDistributionChannel, + ("iconUrl" .=) <$> _proIconUrl, + ("title" .=) <$> _proTitle, + ("productId" .=) <$> _proProductId, + ("detailsUrl" .=) <$> _proDetailsUrl]) + +-- | The entitlement resources for the user. +-- +-- /See:/ 'entitlementsListResponse' smart constructor. +data EntitlementsListResponse = EntitlementsListResponse + { _entKind :: !Text + , _entEntitlement :: !(Maybe [Maybe Entitlement]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'entKind' +-- +-- * 'entEntitlement' +entitlementsListResponse + :: EntitlementsListResponse +entitlementsListResponse = + EntitlementsListResponse + { _entKind = "androidenterprise#entitlementsListResponse" + , _entEntitlement = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#entitlementsListResponse\". +entKind :: Lens' EntitlementsListResponse Text +entKind = lens _entKind (\ s a -> s{_entKind = a}) + +-- | An entitlement of a user to a product (e.g. an app). For example, a free +-- app that they have installed, or a paid app that they have been +-- allocated a license to. +entEntitlement :: Lens' EntitlementsListResponse [Maybe Entitlement] +entEntitlement + = lens _entEntitlement + (\ s a -> s{_entEntitlement = a}) + . _Default + . _Coerce + +instance FromJSON EntitlementsListResponse where + parseJSON + = withObject "EntitlementsListResponse" + (\ o -> + EntitlementsListResponse <$> + (o .:? "kind" .!= + "androidenterprise#entitlementsListResponse") + <*> (o .:? "entitlement" .!= mempty)) + +instance ToJSON EntitlementsListResponse where + toJSON EntitlementsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _entKind), + ("entitlement" .=) <$> _entEntitlement]) + +-- | Information about the permissions required by a specific app and whether +-- they have been accepted by the enterprise. +-- +-- /See:/ 'productPermissions' smart constructor. +data ProductPermissions = ProductPermissions + { _ppKind :: !Text + , _ppPermission :: !(Maybe [Maybe ProductPermission]) + , _ppProductId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductPermissions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppKind' +-- +-- * 'ppPermission' +-- +-- * 'ppProductId' +productPermissions + :: ProductPermissions +productPermissions = + ProductPermissions + { _ppKind = "androidenterprise#productPermissions" + , _ppPermission = Nothing + , _ppProductId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#productPermissions\". +ppKind :: Lens' ProductPermissions Text +ppKind = lens _ppKind (\ s a -> s{_ppKind = a}) + +-- | The permissions required by the app. +ppPermission :: Lens' ProductPermissions [Maybe ProductPermission] +ppPermission + = lens _ppPermission (\ s a -> s{_ppPermission = a}) + . _Default + . _Coerce + +-- | The ID of the app that the permissions relate to, e.g. +-- \"app:com.google.android.gm\". +ppProductId :: Lens' ProductPermissions (Maybe Text) +ppProductId + = lens _ppProductId (\ s a -> s{_ppProductId = a}) + +instance FromJSON ProductPermissions where + parseJSON + = withObject "ProductPermissions" + (\ o -> + ProductPermissions <$> + (o .:? "kind" .!= + "androidenterprise#productPermissions") + <*> (o .:? "permission" .!= mempty) + <*> (o .:? "productId")) + +instance ToJSON ProductPermissions where + toJSON ProductPermissions{..} + = object + (catMaybes + [Just ("kind" .= _ppKind), + ("permission" .=) <$> _ppPermission, + ("productId" .=) <$> _ppProductId]) + +-- | The user resources for the collection. +-- +-- /See:/ 'collectionViewersListResponse' smart constructor. +data CollectionViewersListResponse = CollectionViewersListResponse + { _cvlrKind :: !Text + , _cvlrUser :: !(Maybe [Maybe User]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionViewersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cvlrKind' +-- +-- * 'cvlrUser' +collectionViewersListResponse + :: CollectionViewersListResponse +collectionViewersListResponse = + CollectionViewersListResponse + { _cvlrKind = "androidenterprise#collectionViewersListResponse" + , _cvlrUser = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#collectionViewersListResponse\". +cvlrKind :: Lens' CollectionViewersListResponse Text +cvlrKind = lens _cvlrKind (\ s a -> s{_cvlrKind = a}) + +-- | A user of an enterprise. +cvlrUser :: Lens' CollectionViewersListResponse [Maybe User] +cvlrUser + = lens _cvlrUser (\ s a -> s{_cvlrUser = a}) . + _Default + . _Coerce + +instance FromJSON CollectionViewersListResponse where + parseJSON + = withObject "CollectionViewersListResponse" + (\ o -> + CollectionViewersListResponse <$> + (o .:? "kind" .!= + "androidenterprise#collectionViewersListResponse") + <*> (o .:? "user" .!= mempty)) + +instance ToJSON CollectionViewersListResponse where + toJSON CollectionViewersListResponse{..} + = object + (catMaybes + [Just ("kind" .= _cvlrKind), + ("user" .=) <$> _cvlrUser]) + +-- +-- /See:/ 'productsApproveRequest' smart constructor. +newtype ProductsApproveRequest = ProductsApproveRequest + { _parApprovalUrlInfo :: Maybe (Maybe ApprovalURLInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsApproveRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'parApprovalUrlInfo' +productsApproveRequest + :: ProductsApproveRequest +productsApproveRequest = + ProductsApproveRequest + { _parApprovalUrlInfo = Nothing + } + +-- | The approval URL that was shown to the user. Only the permissions shown +-- to the user with that URL will be accepted, which may not be the +-- product\'s entire set of permissions. For example, the URL may only +-- display new permissions from an update after the product was approved, +-- or not include new permissions if the product was updated since the URL +-- was generated. +parApprovalUrlInfo :: Lens' ProductsApproveRequest (Maybe (Maybe ApprovalURLInfo)) +parApprovalUrlInfo + = lens _parApprovalUrlInfo + (\ s a -> s{_parApprovalUrlInfo = a}) + +instance FromJSON ProductsApproveRequest where + parseJSON + = withObject "ProductsApproveRequest" + (\ o -> + ProductsApproveRequest <$> (o .:? "approvalUrlInfo")) + +instance ToJSON ProductsApproveRequest where + toJSON ProductsApproveRequest{..} + = object + (catMaybes + [("approvalUrlInfo" .=) <$> _parApprovalUrlInfo]) + +-- | The existence of an entitlement resource means that a user has the right +-- to use a particular app on any of their devices. This might be because +-- the app is free or because they have been allocated a license to the app +-- from a group license purchased by the enterprise. It should always be +-- true that a user has an app installed on one of their devices only if +-- they have an entitlement to it. So if an entitlement is deleted, the app +-- will be uninstalled from all devices. Similarly if the user installs an +-- app (and is permitted to do so), or the MDM triggers an install of the +-- app, an entitlement to that app is automatically created. If this is +-- impossible - e.g. the enterprise has not purchased sufficient licenses - +-- then installation fails. Note that entitlements are always user +-- specific, not device specific; a user may have an entitlement even +-- though they have not installed the app anywhere. Once they have an +-- entitlement they can install the app on multiple devices. The API can be +-- used to create an entitlement. If the app is a free app, a group license +-- for that app is created. If it\'s a paid app, creating the entitlement +-- consumes one license; it remains consumed until the entitlement is +-- removed. Optionally an installation of the app on all the user\'s +-- managed devices can be triggered at the time the entitlement is created. +-- An entitlement cannot be created for an app if the app requires +-- permissions that the enterprise has not yet accepted. Entitlements for +-- paid apps that are due to purchases by the user on a non-managed profile +-- will have \"userPurchase\" as entitlement reason; those entitlements +-- cannot be removed via the API. +-- +-- /See:/ 'entitlement' smart constructor. +data Entitlement = Entitlement + { _eeKind :: !Text + , _eeReason :: !(Maybe Text) + , _eeProductId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Entitlement' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eeKind' +-- +-- * 'eeReason' +-- +-- * 'eeProductId' +entitlement + :: Entitlement +entitlement = + Entitlement + { _eeKind = "androidenterprise#entitlement" + , _eeReason = Nothing + , _eeProductId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"androidenterprise#entitlement\". +eeKind :: Lens' Entitlement Text +eeKind = lens _eeKind (\ s a -> s{_eeKind = a}) + +-- | The reason for the entitlement, e.g. \"free\" for free apps. This is +-- temporary, it will be replaced by the acquisition kind field of group +-- licenses. +eeReason :: Lens' Entitlement (Maybe Text) +eeReason = lens _eeReason (\ s a -> s{_eeReason = a}) + +-- | The ID of the product that the entitlement is for, e.g. +-- \"app:com.google.android.gm\". +eeProductId :: Lens' Entitlement (Maybe Text) +eeProductId + = lens _eeProductId (\ s a -> s{_eeProductId = a}) + +instance FromJSON Entitlement where + parseJSON + = withObject "Entitlement" + (\ o -> + Entitlement <$> + (o .:? "kind" .!= "androidenterprise#entitlement") + <*> (o .:? "reason") + <*> (o .:? "productId")) + +instance ToJSON Entitlement where + toJSON Entitlement{..} + = object + (catMaybes + [Just ("kind" .= _eeKind), + ("reason" .=) <$> _eeReason, + ("productId" .=) <$> _eeProductId]) diff --git a/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Sum.hs b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Sum.hs new file mode 100644 index 000000000..3c6bd2521 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/PlayEnterprise/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayEnterprise.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayEnterprise.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Delete.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Delete.hs new file mode 100644 index 000000000..161d2e793 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a collection. +-- +-- /See:/ for @AndroidenterpriseCollectionsDelete@. +module Androidenterprise.Collections.Delete + ( + -- * REST Resource + CollectionsDeleteAPI + + -- * Creating a Request + , collectionsDelete + , CollectionsDelete + + -- * Request Lenses + , cddQuotaUser + , cddPrettyPrint + , cddEnterpriseId + , cddUserIp + , cddCollectionId + , cddKey + , cddOauthToken + , cddFields + , cddAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsDelete@ which the +-- 'CollectionsDelete' request conforms to. +type CollectionsDeleteAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> Delete '[JSON] () + +-- | Deletes a collection. +-- +-- /See:/ 'collectionsDelete' smart constructor. +data CollectionsDelete = CollectionsDelete + { _cddQuotaUser :: !(Maybe Text) + , _cddPrettyPrint :: !Bool + , _cddEnterpriseId :: !Text + , _cddUserIp :: !(Maybe Text) + , _cddCollectionId :: !Text + , _cddKey :: !(Maybe Text) + , _cddOauthToken :: !(Maybe Text) + , _cddFields :: !(Maybe Text) + , _cddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cddQuotaUser' +-- +-- * 'cddPrettyPrint' +-- +-- * 'cddEnterpriseId' +-- +-- * 'cddUserIp' +-- +-- * 'cddCollectionId' +-- +-- * 'cddKey' +-- +-- * 'cddOauthToken' +-- +-- * 'cddFields' +-- +-- * 'cddAlt' +collectionsDelete + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> CollectionsDelete +collectionsDelete pCddEnterpriseId_ pCddCollectionId_ = + CollectionsDelete + { _cddQuotaUser = Nothing + , _cddPrettyPrint = True + , _cddEnterpriseId = pCddEnterpriseId_ + , _cddUserIp = Nothing + , _cddCollectionId = pCddCollectionId_ + , _cddKey = Nothing + , _cddOauthToken = Nothing + , _cddFields = Nothing + , _cddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cddQuotaUser :: Lens' CollectionsDelete' (Maybe Text) +cddQuotaUser + = lens _cddQuotaUser (\ s a -> s{_cddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cddPrettyPrint :: Lens' CollectionsDelete' Bool +cddPrettyPrint + = lens _cddPrettyPrint + (\ s a -> s{_cddPrettyPrint = a}) + +-- | The ID of the enterprise. +cddEnterpriseId :: Lens' CollectionsDelete' Text +cddEnterpriseId + = lens _cddEnterpriseId + (\ s a -> s{_cddEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cddUserIp :: Lens' CollectionsDelete' (Maybe Text) +cddUserIp + = lens _cddUserIp (\ s a -> s{_cddUserIp = a}) + +-- | The ID of the collection. +cddCollectionId :: Lens' CollectionsDelete' Text +cddCollectionId + = lens _cddCollectionId + (\ s a -> s{_cddCollectionId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cddKey :: Lens' CollectionsDelete' (Maybe Text) +cddKey = lens _cddKey (\ s a -> s{_cddKey = a}) + +-- | OAuth 2.0 token for the current user. +cddOauthToken :: Lens' CollectionsDelete' (Maybe Text) +cddOauthToken + = lens _cddOauthToken + (\ s a -> s{_cddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cddFields :: Lens' CollectionsDelete' (Maybe Text) +cddFields + = lens _cddFields (\ s a -> s{_cddFields = a}) + +-- | Data format for the response. +cddAlt :: Lens' CollectionsDelete' Text +cddAlt = lens _cddAlt (\ s a -> s{_cddAlt = a}) + +instance GoogleRequest CollectionsDelete' where + type Rs CollectionsDelete' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsDelete{..} + = go _cddQuotaUser _cddPrettyPrint _cddEnterpriseId + _cddUserIp + _cddCollectionId + _cddKey + _cddOauthToken + _cddFields + _cddAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionsDeleteAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Get.hs new file mode 100644 index 000000000..7ed2651b5 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the details of a collection. +-- +-- /See:/ for @AndroidenterpriseCollectionsGet@. +module Androidenterprise.Collections.Get + ( + -- * REST Resource + CollectionsGetAPI + + -- * Creating a Request + , collectionsGet + , CollectionsGet + + -- * Request Lenses + , cggQuotaUser + , cggPrettyPrint + , cggEnterpriseId + , cggUserIp + , cggCollectionId + , cggKey + , cggOauthToken + , cggFields + , cggAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsGet@ which the +-- 'CollectionsGet' request conforms to. +type CollectionsGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> Get '[JSON] Collection + +-- | Retrieves the details of a collection. +-- +-- /See:/ 'collectionsGet' smart constructor. +data CollectionsGet = CollectionsGet + { _cggQuotaUser :: !(Maybe Text) + , _cggPrettyPrint :: !Bool + , _cggEnterpriseId :: !Text + , _cggUserIp :: !(Maybe Text) + , _cggCollectionId :: !Text + , _cggKey :: !(Maybe Text) + , _cggOauthToken :: !(Maybe Text) + , _cggFields :: !(Maybe Text) + , _cggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cggQuotaUser' +-- +-- * 'cggPrettyPrint' +-- +-- * 'cggEnterpriseId' +-- +-- * 'cggUserIp' +-- +-- * 'cggCollectionId' +-- +-- * 'cggKey' +-- +-- * 'cggOauthToken' +-- +-- * 'cggFields' +-- +-- * 'cggAlt' +collectionsGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> CollectionsGet +collectionsGet pCggEnterpriseId_ pCggCollectionId_ = + CollectionsGet + { _cggQuotaUser = Nothing + , _cggPrettyPrint = True + , _cggEnterpriseId = pCggEnterpriseId_ + , _cggUserIp = Nothing + , _cggCollectionId = pCggCollectionId_ + , _cggKey = Nothing + , _cggOauthToken = Nothing + , _cggFields = Nothing + , _cggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cggQuotaUser :: Lens' CollectionsGet' (Maybe Text) +cggQuotaUser + = lens _cggQuotaUser (\ s a -> s{_cggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cggPrettyPrint :: Lens' CollectionsGet' Bool +cggPrettyPrint + = lens _cggPrettyPrint + (\ s a -> s{_cggPrettyPrint = a}) + +-- | The ID of the enterprise. +cggEnterpriseId :: Lens' CollectionsGet' Text +cggEnterpriseId + = lens _cggEnterpriseId + (\ s a -> s{_cggEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cggUserIp :: Lens' CollectionsGet' (Maybe Text) +cggUserIp + = lens _cggUserIp (\ s a -> s{_cggUserIp = a}) + +-- | The ID of the collection. +cggCollectionId :: Lens' CollectionsGet' Text +cggCollectionId + = lens _cggCollectionId + (\ s a -> s{_cggCollectionId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cggKey :: Lens' CollectionsGet' (Maybe Text) +cggKey = lens _cggKey (\ s a -> s{_cggKey = a}) + +-- | OAuth 2.0 token for the current user. +cggOauthToken :: Lens' CollectionsGet' (Maybe Text) +cggOauthToken + = lens _cggOauthToken + (\ s a -> s{_cggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cggFields :: Lens' CollectionsGet' (Maybe Text) +cggFields + = lens _cggFields (\ s a -> s{_cggFields = a}) + +-- | Data format for the response. +cggAlt :: Lens' CollectionsGet' Text +cggAlt = lens _cggAlt (\ s a -> s{_cggAlt = a}) + +instance GoogleRequest CollectionsGet' where + type Rs CollectionsGet' = Collection + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsGet{..} + = go _cggQuotaUser _cggPrettyPrint _cggEnterpriseId + _cggUserIp + _cggCollectionId + _cggKey + _cggOauthToken + _cggFields + _cggAlt + where go + = clientWithRoute (Proxy :: Proxy CollectionsGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Insert.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Insert.hs new file mode 100644 index 000000000..655883a4c --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Insert.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new collection. +-- +-- /See:/ for @AndroidenterpriseCollectionsInsert@. +module Androidenterprise.Collections.Insert + ( + -- * REST Resource + CollectionsInsertAPI + + -- * Creating a Request + , collectionsInsert + , CollectionsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciEnterpriseId + , ciUserIp + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsInsert@ which the +-- 'CollectionsInsert' request conforms to. +type CollectionsInsertAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> Post '[JSON] Collection + +-- | Creates a new collection. +-- +-- /See:/ 'collectionsInsert' smart constructor. +data CollectionsInsert = CollectionsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciEnterpriseId :: !Text + , _ciUserIp :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciEnterpriseId' +-- +-- * 'ciUserIp' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +collectionsInsert + :: Text -- ^ 'enterpriseId' + -> CollectionsInsert +collectionsInsert pCiEnterpriseId_ = + CollectionsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciEnterpriseId = pCiEnterpriseId_ + , _ciUserIp = Nothing + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CollectionsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CollectionsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | The ID of the enterprise. +ciEnterpriseId :: Lens' CollectionsInsert' Text +ciEnterpriseId + = lens _ciEnterpriseId + (\ s a -> s{_ciEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CollectionsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CollectionsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CollectionsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CollectionsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CollectionsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CollectionsInsert' where + type Rs CollectionsInsert' = Collection + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciEnterpriseId + _ciUserIp + _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionsInsertAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/List.hs new file mode 100644 index 000000000..76169bdcd --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/List.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the IDs of all the collections for an enterprise. +-- +-- /See:/ for @AndroidenterpriseCollectionsList@. +module Androidenterprise.Collections.List + ( + -- * REST Resource + CollectionsListAPI + + -- * Creating a Request + , collectionsList + , CollectionsList + + -- * Request Lenses + , cQuotaUser + , cPrettyPrint + , cEnterpriseId + , cUserIp + , cKey + , cOauthToken + , cFields + , cAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsList@ which the +-- 'CollectionsList' request conforms to. +type CollectionsListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> Get '[JSON] CollectionsListResponse + +-- | Retrieves the IDs of all the collections for an enterprise. +-- +-- /See:/ 'collectionsList' smart constructor. +data CollectionsList = CollectionsList + { _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cEnterpriseId :: !Text + , _cUserIp :: !(Maybe Text) + , _cKey :: !(Maybe Text) + , _cOauthToken :: !(Maybe Text) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cEnterpriseId' +-- +-- * 'cUserIp' +-- +-- * 'cKey' +-- +-- * 'cOauthToken' +-- +-- * 'cFields' +-- +-- * 'cAlt' +collectionsList + :: Text -- ^ 'enterpriseId' + -> CollectionsList +collectionsList pCEnterpriseId_ = + CollectionsList + { _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cEnterpriseId = pCEnterpriseId_ + , _cUserIp = Nothing + , _cKey = Nothing + , _cOauthToken = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' CollectionsList' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' CollectionsList' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | The ID of the enterprise. +cEnterpriseId :: Lens' CollectionsList' Text +cEnterpriseId + = lens _cEnterpriseId + (\ s a -> s{_cEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' CollectionsList' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' CollectionsList' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' CollectionsList' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' CollectionsList' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' CollectionsList' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest CollectionsList' where + type Rs CollectionsList' = CollectionsListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsList{..} + = go _cQuotaUser _cPrettyPrint _cEnterpriseId + _cUserIp + _cKey + _cOauthToken + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy CollectionsListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Patch.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Patch.hs new file mode 100644 index 000000000..70d31ecb4 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Patch.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a collection. This method supports patch semantics. +-- +-- /See:/ for @AndroidenterpriseCollectionsPatch@. +module Androidenterprise.Collections.Patch + ( + -- * REST Resource + CollectionsPatchAPI + + -- * Creating a Request + , collectionsPatch + , CollectionsPatch + + -- * Request Lenses + , colQuotaUser + , colPrettyPrint + , colEnterpriseId + , colUserIp + , colCollectionId + , colKey + , colOauthToken + , colFields + , colAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsPatch@ which the +-- 'CollectionsPatch' request conforms to. +type CollectionsPatchAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + Patch '[JSON] Collection + +-- | Updates a collection. This method supports patch semantics. +-- +-- /See:/ 'collectionsPatch' smart constructor. +data CollectionsPatch = CollectionsPatch + { _colQuotaUser :: !(Maybe Text) + , _colPrettyPrint :: !Bool + , _colEnterpriseId :: !Text + , _colUserIp :: !(Maybe Text) + , _colCollectionId :: !Text + , _colKey :: !(Maybe Text) + , _colOauthToken :: !(Maybe Text) + , _colFields :: !(Maybe Text) + , _colAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'colQuotaUser' +-- +-- * 'colPrettyPrint' +-- +-- * 'colEnterpriseId' +-- +-- * 'colUserIp' +-- +-- * 'colCollectionId' +-- +-- * 'colKey' +-- +-- * 'colOauthToken' +-- +-- * 'colFields' +-- +-- * 'colAlt' +collectionsPatch + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> CollectionsPatch +collectionsPatch pColEnterpriseId_ pColCollectionId_ = + CollectionsPatch + { _colQuotaUser = Nothing + , _colPrettyPrint = True + , _colEnterpriseId = pColEnterpriseId_ + , _colUserIp = Nothing + , _colCollectionId = pColCollectionId_ + , _colKey = Nothing + , _colOauthToken = Nothing + , _colFields = Nothing + , _colAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +colQuotaUser :: Lens' CollectionsPatch' (Maybe Text) +colQuotaUser + = lens _colQuotaUser (\ s a -> s{_colQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +colPrettyPrint :: Lens' CollectionsPatch' Bool +colPrettyPrint + = lens _colPrettyPrint + (\ s a -> s{_colPrettyPrint = a}) + +-- | The ID of the enterprise. +colEnterpriseId :: Lens' CollectionsPatch' Text +colEnterpriseId + = lens _colEnterpriseId + (\ s a -> s{_colEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +colUserIp :: Lens' CollectionsPatch' (Maybe Text) +colUserIp + = lens _colUserIp (\ s a -> s{_colUserIp = a}) + +-- | The ID of the collection. +colCollectionId :: Lens' CollectionsPatch' Text +colCollectionId + = lens _colCollectionId + (\ s a -> s{_colCollectionId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +colKey :: Lens' CollectionsPatch' (Maybe Text) +colKey = lens _colKey (\ s a -> s{_colKey = a}) + +-- | OAuth 2.0 token for the current user. +colOauthToken :: Lens' CollectionsPatch' (Maybe Text) +colOauthToken + = lens _colOauthToken + (\ s a -> s{_colOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +colFields :: Lens' CollectionsPatch' (Maybe Text) +colFields + = lens _colFields (\ s a -> s{_colFields = a}) + +-- | Data format for the response. +colAlt :: Lens' CollectionsPatch' Text +colAlt = lens _colAlt (\ s a -> s{_colAlt = a}) + +instance GoogleRequest CollectionsPatch' where + type Rs CollectionsPatch' = Collection + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsPatch{..} + = go _colQuotaUser _colPrettyPrint _colEnterpriseId + _colUserIp + _colCollectionId + _colKey + _colOauthToken + _colFields + _colAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionsPatchAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Update.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Update.hs new file mode 100644 index 000000000..6aa28094f --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collections/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collections.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a collection. +-- +-- /See:/ for @AndroidenterpriseCollectionsUpdate@. +module Androidenterprise.Collections.Update + ( + -- * REST Resource + CollectionsUpdateAPI + + -- * Creating a Request + , collectionsUpdate + , CollectionsUpdate + + -- * Request Lenses + , cuuQuotaUser + , cuuPrettyPrint + , cuuEnterpriseId + , cuuUserIp + , cuuCollectionId + , cuuKey + , cuuOauthToken + , cuuFields + , cuuAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionsUpdate@ which the +-- 'CollectionsUpdate' request conforms to. +type CollectionsUpdateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> Put '[JSON] Collection + +-- | Updates a collection. +-- +-- /See:/ 'collectionsUpdate' smart constructor. +data CollectionsUpdate = CollectionsUpdate + { _cuuQuotaUser :: !(Maybe Text) + , _cuuPrettyPrint :: !Bool + , _cuuEnterpriseId :: !Text + , _cuuUserIp :: !(Maybe Text) + , _cuuCollectionId :: !Text + , _cuuKey :: !(Maybe Text) + , _cuuOauthToken :: !(Maybe Text) + , _cuuFields :: !(Maybe Text) + , _cuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuuQuotaUser' +-- +-- * 'cuuPrettyPrint' +-- +-- * 'cuuEnterpriseId' +-- +-- * 'cuuUserIp' +-- +-- * 'cuuCollectionId' +-- +-- * 'cuuKey' +-- +-- * 'cuuOauthToken' +-- +-- * 'cuuFields' +-- +-- * 'cuuAlt' +collectionsUpdate + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> CollectionsUpdate +collectionsUpdate pCuuEnterpriseId_ pCuuCollectionId_ = + CollectionsUpdate + { _cuuQuotaUser = Nothing + , _cuuPrettyPrint = True + , _cuuEnterpriseId = pCuuEnterpriseId_ + , _cuuUserIp = Nothing + , _cuuCollectionId = pCuuCollectionId_ + , _cuuKey = Nothing + , _cuuOauthToken = Nothing + , _cuuFields = Nothing + , _cuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuuQuotaUser :: Lens' CollectionsUpdate' (Maybe Text) +cuuQuotaUser + = lens _cuuQuotaUser (\ s a -> s{_cuuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuuPrettyPrint :: Lens' CollectionsUpdate' Bool +cuuPrettyPrint + = lens _cuuPrettyPrint + (\ s a -> s{_cuuPrettyPrint = a}) + +-- | The ID of the enterprise. +cuuEnterpriseId :: Lens' CollectionsUpdate' Text +cuuEnterpriseId + = lens _cuuEnterpriseId + (\ s a -> s{_cuuEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuuUserIp :: Lens' CollectionsUpdate' (Maybe Text) +cuuUserIp + = lens _cuuUserIp (\ s a -> s{_cuuUserIp = a}) + +-- | The ID of the collection. +cuuCollectionId :: Lens' CollectionsUpdate' Text +cuuCollectionId + = lens _cuuCollectionId + (\ s a -> s{_cuuCollectionId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuuKey :: Lens' CollectionsUpdate' (Maybe Text) +cuuKey = lens _cuuKey (\ s a -> s{_cuuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuuOauthToken :: Lens' CollectionsUpdate' (Maybe Text) +cuuOauthToken + = lens _cuuOauthToken + (\ s a -> s{_cuuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuuFields :: Lens' CollectionsUpdate' (Maybe Text) +cuuFields + = lens _cuuFields (\ s a -> s{_cuuFields = a}) + +-- | Data format for the response. +cuuAlt :: Lens' CollectionsUpdate' Text +cuuAlt = lens _cuuAlt (\ s a -> s{_cuuAlt = a}) + +instance GoogleRequest CollectionsUpdate' where + type Rs CollectionsUpdate' = Collection + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionsUpdate{..} + = go _cuuQuotaUser _cuuPrettyPrint _cuuEnterpriseId + _cuuUserIp + _cuuCollectionId + _cuuKey + _cuuOauthToken + _cuuFields + _cuuAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionsUpdateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Delete.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Delete.hs new file mode 100644 index 000000000..53ef3ecb7 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Delete.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collectionviewers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the user from the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. +-- +-- /See:/ for @AndroidenterpriseCollectionviewersDelete@. +module Androidenterprise.Collectionviewers.Delete + ( + -- * REST Resource + CollectionviewersDeleteAPI + + -- * Creating a Request + , collectionviewersDelete + , CollectionviewersDelete + + -- * Request Lenses + , cdQuotaUser + , cdPrettyPrint + , cdEnterpriseId + , cdUserIp + , cdCollectionId + , cdUserId + , cdKey + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionviewersDelete@ which the +-- 'CollectionviewersDelete' request conforms to. +type CollectionviewersDeleteAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + "users" :> Capture "userId" Text :> Delete '[JSON] () + +-- | Removes the user from the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. +-- +-- /See:/ 'collectionviewersDelete' smart constructor. +data CollectionviewersDelete = CollectionviewersDelete + { _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdEnterpriseId :: !Text + , _cdUserIp :: !(Maybe Text) + , _cdCollectionId :: !Text + , _cdUserId :: !Text + , _cdKey :: !(Maybe Text) + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionviewersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdEnterpriseId' +-- +-- * 'cdUserIp' +-- +-- * 'cdCollectionId' +-- +-- * 'cdUserId' +-- +-- * 'cdKey' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +collectionviewersDelete + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> Text -- ^ 'userId' + -> CollectionviewersDelete +collectionviewersDelete pCdEnterpriseId_ pCdCollectionId_ pCdUserId_ = + CollectionviewersDelete + { _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdEnterpriseId = pCdEnterpriseId_ + , _cdUserIp = Nothing + , _cdCollectionId = pCdCollectionId_ + , _cdUserId = pCdUserId_ + , _cdKey = Nothing + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CollectionviewersDelete' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CollectionviewersDelete' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | The ID of the enterprise. +cdEnterpriseId :: Lens' CollectionviewersDelete' Text +cdEnterpriseId + = lens _cdEnterpriseId + (\ s a -> s{_cdEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CollectionviewersDelete' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | The ID of the collection. +cdCollectionId :: Lens' CollectionviewersDelete' Text +cdCollectionId + = lens _cdCollectionId + (\ s a -> s{_cdCollectionId = a}) + +-- | The ID of the user. +cdUserId :: Lens' CollectionviewersDelete' Text +cdUserId = lens _cdUserId (\ s a -> s{_cdUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CollectionviewersDelete' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CollectionviewersDelete' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CollectionviewersDelete' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CollectionviewersDelete' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CollectionviewersDelete' where + type Rs CollectionviewersDelete' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionviewersDelete{..} + = go _cdQuotaUser _cdPrettyPrint _cdEnterpriseId + _cdUserIp + _cdCollectionId + _cdUserId + _cdKey + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionviewersDeleteAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Get.hs new file mode 100644 index 000000000..0cd6a1b3c --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collectionviewers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the ID of the user if they have been specifically allowed to +-- see the collection. If the collection\'s visibility is set to +-- viewersOnly then only these users will see the collection. +-- +-- /See:/ for @AndroidenterpriseCollectionviewersGet@. +module Androidenterprise.Collectionviewers.Get + ( + -- * REST Resource + CollectionviewersGetAPI + + -- * Creating a Request + , collectionviewersGet + , CollectionviewersGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgEnterpriseId + , cgUserIp + , cgCollectionId + , cgUserId + , cgKey + , cgOauthToken + , cgFields + , cgAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionviewersGet@ which the +-- 'CollectionviewersGet' request conforms to. +type CollectionviewersGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + "users" :> Capture "userId" Text :> Get '[JSON] User + +-- | Retrieves the ID of the user if they have been specifically allowed to +-- see the collection. If the collection\'s visibility is set to +-- viewersOnly then only these users will see the collection. +-- +-- /See:/ 'collectionviewersGet' smart constructor. +data CollectionviewersGet = CollectionviewersGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgEnterpriseId :: !Text + , _cgUserIp :: !(Maybe Text) + , _cgCollectionId :: !Text + , _cgUserId :: !Text + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionviewersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgEnterpriseId' +-- +-- * 'cgUserIp' +-- +-- * 'cgCollectionId' +-- +-- * 'cgUserId' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +collectionviewersGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> Text -- ^ 'userId' + -> CollectionviewersGet +collectionviewersGet pCgEnterpriseId_ pCgCollectionId_ pCgUserId_ = + CollectionviewersGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgEnterpriseId = pCgEnterpriseId_ + , _cgUserIp = Nothing + , _cgCollectionId = pCgCollectionId_ + , _cgUserId = pCgUserId_ + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CollectionviewersGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CollectionviewersGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | The ID of the enterprise. +cgEnterpriseId :: Lens' CollectionviewersGet' Text +cgEnterpriseId + = lens _cgEnterpriseId + (\ s a -> s{_cgEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CollectionviewersGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | The ID of the collection. +cgCollectionId :: Lens' CollectionviewersGet' Text +cgCollectionId + = lens _cgCollectionId + (\ s a -> s{_cgCollectionId = a}) + +-- | The ID of the user. +cgUserId :: Lens' CollectionviewersGet' Text +cgUserId = lens _cgUserId (\ s a -> s{_cgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CollectionviewersGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CollectionviewersGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CollectionviewersGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CollectionviewersGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CollectionviewersGet' where + type Rs CollectionviewersGet' = User + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionviewersGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgEnterpriseId + _cgUserIp + _cgCollectionId + _cgUserId + _cgKey + _cgOauthToken + _cgFields + _cgAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionviewersGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/List.hs new file mode 100644 index 000000000..077e89e84 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/List.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collectionviewers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the IDs of the users who have been specifically allowed to see +-- the collection. If the collection\'s visibility is set to viewersOnly +-- then only these users will see the collection. +-- +-- /See:/ for @AndroidenterpriseCollectionviewersList@. +module Androidenterprise.Collectionviewers.List + ( + -- * REST Resource + CollectionviewersListAPI + + -- * Creating a Request + , collectionviewersList + , CollectionviewersList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clEnterpriseId + , clUserIp + , clCollectionId + , clKey + , clOauthToken + , clFields + , clAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionviewersList@ which the +-- 'CollectionviewersList' request conforms to. +type CollectionviewersListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + "users" :> Get '[JSON] CollectionViewersListResponse + +-- | Retrieves the IDs of the users who have been specifically allowed to see +-- the collection. If the collection\'s visibility is set to viewersOnly +-- then only these users will see the collection. +-- +-- /See:/ 'collectionviewersList' smart constructor. +data CollectionviewersList = CollectionviewersList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clEnterpriseId :: !Text + , _clUserIp :: !(Maybe Text) + , _clCollectionId :: !Text + , _clKey :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionviewersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clEnterpriseId' +-- +-- * 'clUserIp' +-- +-- * 'clCollectionId' +-- +-- * 'clKey' +-- +-- * 'clOauthToken' +-- +-- * 'clFields' +-- +-- * 'clAlt' +collectionviewersList + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> CollectionviewersList +collectionviewersList pClEnterpriseId_ pClCollectionId_ = + CollectionviewersList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clEnterpriseId = pClEnterpriseId_ + , _clUserIp = Nothing + , _clCollectionId = pClCollectionId_ + , _clKey = Nothing + , _clOauthToken = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CollectionviewersList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CollectionviewersList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | The ID of the enterprise. +clEnterpriseId :: Lens' CollectionviewersList' Text +clEnterpriseId + = lens _clEnterpriseId + (\ s a -> s{_clEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CollectionviewersList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | The ID of the collection. +clCollectionId :: Lens' CollectionviewersList' Text +clCollectionId + = lens _clCollectionId + (\ s a -> s{_clCollectionId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CollectionviewersList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CollectionviewersList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CollectionviewersList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CollectionviewersList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CollectionviewersList' where + type Rs CollectionviewersList' = + CollectionViewersListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionviewersList{..} + = go _clQuotaUser _clPrettyPrint _clEnterpriseId + _clUserIp + _clCollectionId + _clKey + _clOauthToken + _clFields + _clAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionviewersListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Patch.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Patch.hs new file mode 100644 index 000000000..82a3d0511 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Patch.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collectionviewers.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds the user to the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. This method supports patch +-- semantics. +-- +-- /See:/ for @AndroidenterpriseCollectionviewersPatch@. +module Androidenterprise.Collectionviewers.Patch + ( + -- * REST Resource + CollectionviewersPatchAPI + + -- * Creating a Request + , collectionviewersPatch + , CollectionviewersPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpEnterpriseId + , cpUserIp + , cpCollectionId + , cpUserId + , cpKey + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionviewersPatch@ which the +-- 'CollectionviewersPatch' request conforms to. +type CollectionviewersPatchAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + "users" :> + Capture "userId" Text :> Patch '[JSON] User + +-- | Adds the user to the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. This method supports patch +-- semantics. +-- +-- /See:/ 'collectionviewersPatch' smart constructor. +data CollectionviewersPatch = CollectionviewersPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpEnterpriseId :: !Text + , _cpUserIp :: !(Maybe Text) + , _cpCollectionId :: !Text + , _cpUserId :: !Text + , _cpKey :: !(Maybe Text) + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionviewersPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpEnterpriseId' +-- +-- * 'cpUserIp' +-- +-- * 'cpCollectionId' +-- +-- * 'cpUserId' +-- +-- * 'cpKey' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +collectionviewersPatch + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> Text -- ^ 'userId' + -> CollectionviewersPatch +collectionviewersPatch pCpEnterpriseId_ pCpCollectionId_ pCpUserId_ = + CollectionviewersPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpEnterpriseId = pCpEnterpriseId_ + , _cpUserIp = Nothing + , _cpCollectionId = pCpCollectionId_ + , _cpUserId = pCpUserId_ + , _cpKey = Nothing + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CollectionviewersPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CollectionviewersPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | The ID of the enterprise. +cpEnterpriseId :: Lens' CollectionviewersPatch' Text +cpEnterpriseId + = lens _cpEnterpriseId + (\ s a -> s{_cpEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CollectionviewersPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | The ID of the collection. +cpCollectionId :: Lens' CollectionviewersPatch' Text +cpCollectionId + = lens _cpCollectionId + (\ s a -> s{_cpCollectionId = a}) + +-- | The ID of the user. +cpUserId :: Lens' CollectionviewersPatch' Text +cpUserId = lens _cpUserId (\ s a -> s{_cpUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CollectionviewersPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CollectionviewersPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CollectionviewersPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CollectionviewersPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CollectionviewersPatch' where + type Rs CollectionviewersPatch' = User + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionviewersPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpEnterpriseId + _cpUserIp + _cpCollectionId + _cpUserId + _cpKey + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionviewersPatchAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Update.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Update.hs new file mode 100644 index 000000000..245eee845 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Collectionviewers/Update.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Collectionviewers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds the user to the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. +-- +-- /See:/ for @AndroidenterpriseCollectionviewersUpdate@. +module Androidenterprise.Collectionviewers.Update + ( + -- * REST Resource + CollectionviewersUpdateAPI + + -- * Creating a Request + , collectionviewersUpdate + , CollectionviewersUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuEnterpriseId + , cuUserIp + , cuCollectionId + , cuUserId + , cuKey + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseCollectionviewersUpdate@ which the +-- 'CollectionviewersUpdate' request conforms to. +type CollectionviewersUpdateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "collections" :> + Capture "collectionId" Text :> + "users" :> Capture "userId" Text :> Put '[JSON] User + +-- | Adds the user to the list of those specifically allowed to see the +-- collection. If the collection\'s visibility is set to viewersOnly then +-- only such users will see the collection. +-- +-- /See:/ 'collectionviewersUpdate' smart constructor. +data CollectionviewersUpdate = CollectionviewersUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuEnterpriseId :: !Text + , _cuUserIp :: !(Maybe Text) + , _cuCollectionId :: !Text + , _cuUserId :: !Text + , _cuKey :: !(Maybe Text) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CollectionviewersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuEnterpriseId' +-- +-- * 'cuUserIp' +-- +-- * 'cuCollectionId' +-- +-- * 'cuUserId' +-- +-- * 'cuKey' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +collectionviewersUpdate + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'collectionId' + -> Text -- ^ 'userId' + -> CollectionviewersUpdate +collectionviewersUpdate pCuEnterpriseId_ pCuCollectionId_ pCuUserId_ = + CollectionviewersUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuEnterpriseId = pCuEnterpriseId_ + , _cuUserIp = Nothing + , _cuCollectionId = pCuCollectionId_ + , _cuUserId = pCuUserId_ + , _cuKey = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CollectionviewersUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CollectionviewersUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | The ID of the enterprise. +cuEnterpriseId :: Lens' CollectionviewersUpdate' Text +cuEnterpriseId + = lens _cuEnterpriseId + (\ s a -> s{_cuEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CollectionviewersUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | The ID of the collection. +cuCollectionId :: Lens' CollectionviewersUpdate' Text +cuCollectionId + = lens _cuCollectionId + (\ s a -> s{_cuCollectionId = a}) + +-- | The ID of the user. +cuUserId :: Lens' CollectionviewersUpdate' Text +cuUserId = lens _cuUserId (\ s a -> s{_cuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CollectionviewersUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CollectionviewersUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CollectionviewersUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CollectionviewersUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CollectionviewersUpdate' where + type Rs CollectionviewersUpdate' = User + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u CollectionviewersUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuEnterpriseId + _cuUserIp + _cuCollectionId + _cuUserId + _cuKey + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute + (Proxy :: Proxy CollectionviewersUpdateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/Get.hs new file mode 100644 index 000000000..d7af241ac --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/Get.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Devices.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the details of a device. +-- +-- /See:/ for @AndroidenterpriseDevicesGet@. +module Androidenterprise.Devices.Get + ( + -- * REST Resource + DevicesGetAPI + + -- * Creating a Request + , devicesGet + , DevicesGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgEnterpriseId + , dgUserIp + , dgUserId + , dgKey + , dgDeviceId + , dgOauthToken + , dgFields + , dgAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseDevicesGet@ which the +-- 'DevicesGet' request conforms to. +type DevicesGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> Get '[JSON] Device + +-- | Retrieves the details of a device. +-- +-- /See:/ 'devicesGet' smart constructor. +data DevicesGet = DevicesGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgEnterpriseId :: !Text + , _dgUserIp :: !(Maybe Text) + , _dgUserId :: !Text + , _dgKey :: !(Maybe Text) + , _dgDeviceId :: !Text + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DevicesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgEnterpriseId' +-- +-- * 'dgUserIp' +-- +-- * 'dgUserId' +-- +-- * 'dgKey' +-- +-- * 'dgDeviceId' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +devicesGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'deviceId' + -> DevicesGet +devicesGet pDgEnterpriseId_ pDgUserId_ pDgDeviceId_ = + DevicesGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgEnterpriseId = pDgEnterpriseId_ + , _dgUserIp = Nothing + , _dgUserId = pDgUserId_ + , _dgKey = Nothing + , _dgDeviceId = pDgDeviceId_ + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DevicesGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DevicesGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | The ID of the enterprise. +dgEnterpriseId :: Lens' DevicesGet' Text +dgEnterpriseId + = lens _dgEnterpriseId + (\ s a -> s{_dgEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DevicesGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | The ID of the user. +dgUserId :: Lens' DevicesGet' Text +dgUserId = lens _dgUserId (\ s a -> s{_dgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DevicesGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | The ID of the device. +dgDeviceId :: Lens' DevicesGet' Text +dgDeviceId + = lens _dgDeviceId (\ s a -> s{_dgDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DevicesGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DevicesGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DevicesGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +instance GoogleRequest DevicesGet' where + type Rs DevicesGet' = Device + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u DevicesGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgEnterpriseId + _dgUserIp + _dgUserId + _dgKey + _dgDeviceId + _dgOauthToken + _dgFields + _dgAlt + where go + = clientWithRoute (Proxy :: Proxy DevicesGetAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/GetState.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/GetState.hs new file mode 100644 index 000000000..be022c169 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/GetState.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Devices.GetState +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves whether a device is enabled or disabled for access by the user +-- to Google services. The device state takes effect only if enforcing EMM +-- policies on Android devices is enabled in the Google Admin Console. +-- Otherwise, the device state is ignored and all devices are allowed +-- access to Google services. +-- +-- /See:/ for @AndroidenterpriseDevicesGetState@. +module Androidenterprise.Devices.GetState + ( + -- * REST Resource + DevicesGetStateAPI + + -- * Creating a Request + , devicesGetState + , DevicesGetState + + -- * Request Lenses + , dgsQuotaUser + , dgsPrettyPrint + , dgsEnterpriseId + , dgsUserIp + , dgsUserId + , dgsKey + , dgsDeviceId + , dgsOauthToken + , dgsFields + , dgsAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseDevicesGetState@ which the +-- 'DevicesGetState' request conforms to. +type DevicesGetStateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "state" :> Get '[JSON] DeviceState + +-- | Retrieves whether a device is enabled or disabled for access by the user +-- to Google services. The device state takes effect only if enforcing EMM +-- policies on Android devices is enabled in the Google Admin Console. +-- Otherwise, the device state is ignored and all devices are allowed +-- access to Google services. +-- +-- /See:/ 'devicesGetState' smart constructor. +data DevicesGetState = DevicesGetState + { _dgsQuotaUser :: !(Maybe Text) + , _dgsPrettyPrint :: !Bool + , _dgsEnterpriseId :: !Text + , _dgsUserIp :: !(Maybe Text) + , _dgsUserId :: !Text + , _dgsKey :: !(Maybe Text) + , _dgsDeviceId :: !Text + , _dgsOauthToken :: !(Maybe Text) + , _dgsFields :: !(Maybe Text) + , _dgsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DevicesGetState'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgsQuotaUser' +-- +-- * 'dgsPrettyPrint' +-- +-- * 'dgsEnterpriseId' +-- +-- * 'dgsUserIp' +-- +-- * 'dgsUserId' +-- +-- * 'dgsKey' +-- +-- * 'dgsDeviceId' +-- +-- * 'dgsOauthToken' +-- +-- * 'dgsFields' +-- +-- * 'dgsAlt' +devicesGetState + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'deviceId' + -> DevicesGetState +devicesGetState pDgsEnterpriseId_ pDgsUserId_ pDgsDeviceId_ = + DevicesGetState + { _dgsQuotaUser = Nothing + , _dgsPrettyPrint = True + , _dgsEnterpriseId = pDgsEnterpriseId_ + , _dgsUserIp = Nothing + , _dgsUserId = pDgsUserId_ + , _dgsKey = Nothing + , _dgsDeviceId = pDgsDeviceId_ + , _dgsOauthToken = Nothing + , _dgsFields = Nothing + , _dgsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgsQuotaUser :: Lens' DevicesGetState' (Maybe Text) +dgsQuotaUser + = lens _dgsQuotaUser (\ s a -> s{_dgsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgsPrettyPrint :: Lens' DevicesGetState' Bool +dgsPrettyPrint + = lens _dgsPrettyPrint + (\ s a -> s{_dgsPrettyPrint = a}) + +-- | The ID of the enterprise. +dgsEnterpriseId :: Lens' DevicesGetState' Text +dgsEnterpriseId + = lens _dgsEnterpriseId + (\ s a -> s{_dgsEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgsUserIp :: Lens' DevicesGetState' (Maybe Text) +dgsUserIp + = lens _dgsUserIp (\ s a -> s{_dgsUserIp = a}) + +-- | The ID of the user. +dgsUserId :: Lens' DevicesGetState' Text +dgsUserId + = lens _dgsUserId (\ s a -> s{_dgsUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgsKey :: Lens' DevicesGetState' (Maybe Text) +dgsKey = lens _dgsKey (\ s a -> s{_dgsKey = a}) + +-- | The ID of the device. +dgsDeviceId :: Lens' DevicesGetState' Text +dgsDeviceId + = lens _dgsDeviceId (\ s a -> s{_dgsDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +dgsOauthToken :: Lens' DevicesGetState' (Maybe Text) +dgsOauthToken + = lens _dgsOauthToken + (\ s a -> s{_dgsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgsFields :: Lens' DevicesGetState' (Maybe Text) +dgsFields + = lens _dgsFields (\ s a -> s{_dgsFields = a}) + +-- | Data format for the response. +dgsAlt :: Lens' DevicesGetState' Text +dgsAlt = lens _dgsAlt (\ s a -> s{_dgsAlt = a}) + +instance GoogleRequest DevicesGetState' where + type Rs DevicesGetState' = DeviceState + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u DevicesGetState{..} + = go _dgsQuotaUser _dgsPrettyPrint _dgsEnterpriseId + _dgsUserIp + _dgsUserId + _dgsKey + _dgsDeviceId + _dgsOauthToken + _dgsFields + _dgsAlt + where go + = clientWithRoute (Proxy :: Proxy DevicesGetStateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/List.hs new file mode 100644 index 000000000..6c614e255 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Devices.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the IDs of all of a user\'s devices. +-- +-- /See:/ for @AndroidenterpriseDevicesList@. +module Androidenterprise.Devices.List + ( + -- * REST Resource + DevicesListAPI + + -- * Creating a Request + , devicesList + , DevicesList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlEnterpriseId + , dlUserIp + , dlUserId + , dlKey + , dlOauthToken + , dlFields + , dlAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseDevicesList@ which the +-- 'DevicesList' request conforms to. +type DevicesListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> Get '[JSON] DevicesListResponse + +-- | Retrieves the IDs of all of a user\'s devices. +-- +-- /See:/ 'devicesList' smart constructor. +data DevicesList = DevicesList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlEnterpriseId :: !Text + , _dlUserIp :: !(Maybe Text) + , _dlUserId :: !Text + , _dlKey :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DevicesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlEnterpriseId' +-- +-- * 'dlUserIp' +-- +-- * 'dlUserId' +-- +-- * 'dlKey' +-- +-- * 'dlOauthToken' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +devicesList + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> DevicesList +devicesList pDlEnterpriseId_ pDlUserId_ = + DevicesList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlEnterpriseId = pDlEnterpriseId_ + , _dlUserIp = Nothing + , _dlUserId = pDlUserId_ + , _dlKey = Nothing + , _dlOauthToken = Nothing + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DevicesList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DevicesList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | The ID of the enterprise. +dlEnterpriseId :: Lens' DevicesList' Text +dlEnterpriseId + = lens _dlEnterpriseId + (\ s a -> s{_dlEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DevicesList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | The ID of the user. +dlUserId :: Lens' DevicesList' Text +dlUserId = lens _dlUserId (\ s a -> s{_dlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DevicesList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DevicesList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DevicesList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DevicesList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DevicesList' where + type Rs DevicesList' = DevicesListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u DevicesList{..} + = go _dlQuotaUser _dlPrettyPrint _dlEnterpriseId + _dlUserIp + _dlUserId + _dlKey + _dlOauthToken + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DevicesListAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/SetState.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/SetState.hs new file mode 100644 index 000000000..43213b354 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Devices/SetState.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Devices.SetState +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets whether a device is enabled or disabled for access by the user to +-- Google services. The device state takes effect only if enforcing EMM +-- policies on Android devices is enabled in the Google Admin Console. +-- Otherwise, the device state is ignored and all devices are allowed +-- access to Google services. +-- +-- /See:/ for @AndroidenterpriseDevicesSetState@. +module Androidenterprise.Devices.SetState + ( + -- * REST Resource + DevicesSetStateAPI + + -- * Creating a Request + , devicesSetState + , DevicesSetState + + -- * Request Lenses + , dssQuotaUser + , dssPrettyPrint + , dssEnterpriseId + , dssUserIp + , dssUserId + , dssKey + , dssDeviceId + , dssOauthToken + , dssFields + , dssAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseDevicesSetState@ which the +-- 'DevicesSetState' request conforms to. +type DevicesSetStateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "state" :> Put '[JSON] DeviceState + +-- | Sets whether a device is enabled or disabled for access by the user to +-- Google services. The device state takes effect only if enforcing EMM +-- policies on Android devices is enabled in the Google Admin Console. +-- Otherwise, the device state is ignored and all devices are allowed +-- access to Google services. +-- +-- /See:/ 'devicesSetState' smart constructor. +data DevicesSetState = DevicesSetState + { _dssQuotaUser :: !(Maybe Text) + , _dssPrettyPrint :: !Bool + , _dssEnterpriseId :: !Text + , _dssUserIp :: !(Maybe Text) + , _dssUserId :: !Text + , _dssKey :: !(Maybe Text) + , _dssDeviceId :: !Text + , _dssOauthToken :: !(Maybe Text) + , _dssFields :: !(Maybe Text) + , _dssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DevicesSetState'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dssQuotaUser' +-- +-- * 'dssPrettyPrint' +-- +-- * 'dssEnterpriseId' +-- +-- * 'dssUserIp' +-- +-- * 'dssUserId' +-- +-- * 'dssKey' +-- +-- * 'dssDeviceId' +-- +-- * 'dssOauthToken' +-- +-- * 'dssFields' +-- +-- * 'dssAlt' +devicesSetState + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'deviceId' + -> DevicesSetState +devicesSetState pDssEnterpriseId_ pDssUserId_ pDssDeviceId_ = + DevicesSetState + { _dssQuotaUser = Nothing + , _dssPrettyPrint = True + , _dssEnterpriseId = pDssEnterpriseId_ + , _dssUserIp = Nothing + , _dssUserId = pDssUserId_ + , _dssKey = Nothing + , _dssDeviceId = pDssDeviceId_ + , _dssOauthToken = Nothing + , _dssFields = Nothing + , _dssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dssQuotaUser :: Lens' DevicesSetState' (Maybe Text) +dssQuotaUser + = lens _dssQuotaUser (\ s a -> s{_dssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dssPrettyPrint :: Lens' DevicesSetState' Bool +dssPrettyPrint + = lens _dssPrettyPrint + (\ s a -> s{_dssPrettyPrint = a}) + +-- | The ID of the enterprise. +dssEnterpriseId :: Lens' DevicesSetState' Text +dssEnterpriseId + = lens _dssEnterpriseId + (\ s a -> s{_dssEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dssUserIp :: Lens' DevicesSetState' (Maybe Text) +dssUserIp + = lens _dssUserIp (\ s a -> s{_dssUserIp = a}) + +-- | The ID of the user. +dssUserId :: Lens' DevicesSetState' Text +dssUserId + = lens _dssUserId (\ s a -> s{_dssUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dssKey :: Lens' DevicesSetState' (Maybe Text) +dssKey = lens _dssKey (\ s a -> s{_dssKey = a}) + +-- | The ID of the device. +dssDeviceId :: Lens' DevicesSetState' Text +dssDeviceId + = lens _dssDeviceId (\ s a -> s{_dssDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +dssOauthToken :: Lens' DevicesSetState' (Maybe Text) +dssOauthToken + = lens _dssOauthToken + (\ s a -> s{_dssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dssFields :: Lens' DevicesSetState' (Maybe Text) +dssFields + = lens _dssFields (\ s a -> s{_dssFields = a}) + +-- | Data format for the response. +dssAlt :: Lens' DevicesSetState' Text +dssAlt = lens _dssAlt (\ s a -> s{_dssAlt = a}) + +instance GoogleRequest DevicesSetState' where + type Rs DevicesSetState' = DeviceState + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u DevicesSetState{..} + = go _dssQuotaUser _dssPrettyPrint _dssEnterpriseId + _dssUserIp + _dssUserId + _dssKey + _dssDeviceId + _dssOauthToken + _dssFields + _dssAlt + where go + = clientWithRoute (Proxy :: Proxy DevicesSetStateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Delete.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Delete.hs new file mode 100644 index 000000000..624a656e7 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Delete.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the binding between the MDM and enterprise. This is now +-- deprecated; use this to unenroll customers that were previously enrolled +-- with the \'insert\' call, then enroll them again with the \'enroll\' +-- call. +-- +-- /See:/ for @AndroidenterpriseEnterprisesDelete@. +module Androidenterprise.Enterprises.Delete + ( + -- * REST Resource + EnterprisesDeleteAPI + + -- * Creating a Request + , enterprisesDelete + , EnterprisesDelete + + -- * Request Lenses + , edQuotaUser + , edPrettyPrint + , edEnterpriseId + , edUserIp + , edKey + , edOauthToken + , edFields + , edAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesDelete@ which the +-- 'EnterprisesDelete' request conforms to. +type EnterprisesDeleteAPI = + "enterprises" :> + Capture "enterpriseId" Text :> Delete '[JSON] () + +-- | Deletes the binding between the MDM and enterprise. This is now +-- deprecated; use this to unenroll customers that were previously enrolled +-- with the \'insert\' call, then enroll them again with the \'enroll\' +-- call. +-- +-- /See:/ 'enterprisesDelete' smart constructor. +data EnterprisesDelete = EnterprisesDelete + { _edQuotaUser :: !(Maybe Text) + , _edPrettyPrint :: !Bool + , _edEnterpriseId :: !Text + , _edUserIp :: !(Maybe Text) + , _edKey :: !(Maybe Text) + , _edOauthToken :: !(Maybe Text) + , _edFields :: !(Maybe Text) + , _edAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'edQuotaUser' +-- +-- * 'edPrettyPrint' +-- +-- * 'edEnterpriseId' +-- +-- * 'edUserIp' +-- +-- * 'edKey' +-- +-- * 'edOauthToken' +-- +-- * 'edFields' +-- +-- * 'edAlt' +enterprisesDelete + :: Text -- ^ 'enterpriseId' + -> EnterprisesDelete +enterprisesDelete pEdEnterpriseId_ = + EnterprisesDelete + { _edQuotaUser = Nothing + , _edPrettyPrint = True + , _edEnterpriseId = pEdEnterpriseId_ + , _edUserIp = Nothing + , _edKey = Nothing + , _edOauthToken = Nothing + , _edFields = Nothing + , _edAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +edQuotaUser :: Lens' EnterprisesDelete' (Maybe Text) +edQuotaUser + = lens _edQuotaUser (\ s a -> s{_edQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +edPrettyPrint :: Lens' EnterprisesDelete' Bool +edPrettyPrint + = lens _edPrettyPrint + (\ s a -> s{_edPrettyPrint = a}) + +-- | The ID of the enterprise. +edEnterpriseId :: Lens' EnterprisesDelete' Text +edEnterpriseId + = lens _edEnterpriseId + (\ s a -> s{_edEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +edUserIp :: Lens' EnterprisesDelete' (Maybe Text) +edUserIp = lens _edUserIp (\ s a -> s{_edUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +edKey :: Lens' EnterprisesDelete' (Maybe Text) +edKey = lens _edKey (\ s a -> s{_edKey = a}) + +-- | OAuth 2.0 token for the current user. +edOauthToken :: Lens' EnterprisesDelete' (Maybe Text) +edOauthToken + = lens _edOauthToken (\ s a -> s{_edOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +edFields :: Lens' EnterprisesDelete' (Maybe Text) +edFields = lens _edFields (\ s a -> s{_edFields = a}) + +-- | Data format for the response. +edAlt :: Lens' EnterprisesDelete' Text +edAlt = lens _edAlt (\ s a -> s{_edAlt = a}) + +instance GoogleRequest EnterprisesDelete' where + type Rs EnterprisesDelete' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesDelete{..} + = go _edQuotaUser _edPrettyPrint _edEnterpriseId + _edUserIp + _edKey + _edOauthToken + _edFields + _edAlt + where go + = clientWithRoute + (Proxy :: Proxy EnterprisesDeleteAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Enroll.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Enroll.hs new file mode 100644 index 000000000..2c26caa9b --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Enroll.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.Enroll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Enrolls an enterprise with the calling MDM. +-- +-- /See:/ for @AndroidenterpriseEnterprisesEnroll@. +module Androidenterprise.Enterprises.Enroll + ( + -- * REST Resource + EnterprisesEnrollAPI + + -- * Creating a Request + , enterprisesEnroll + , EnterprisesEnroll + + -- * Request Lenses + , eeQuotaUser + , eePrettyPrint + , eeUserIp + , eeToken + , eeKey + , eeOauthToken + , eeFields + , eeAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesEnroll@ which the +-- 'EnterprisesEnroll' request conforms to. +type EnterprisesEnrollAPI = + "enterprises" :> + "enroll" :> + QueryParam "token" Text :> Post '[JSON] Enterprise + +-- | Enrolls an enterprise with the calling MDM. +-- +-- /See:/ 'enterprisesEnroll' smart constructor. +data EnterprisesEnroll = EnterprisesEnroll + { _eeQuotaUser :: !(Maybe Text) + , _eePrettyPrint :: !Bool + , _eeUserIp :: !(Maybe Text) + , _eeToken :: !Text + , _eeKey :: !(Maybe Text) + , _eeOauthToken :: !(Maybe Text) + , _eeFields :: !(Maybe Text) + , _eeAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesEnroll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eeQuotaUser' +-- +-- * 'eePrettyPrint' +-- +-- * 'eeUserIp' +-- +-- * 'eeToken' +-- +-- * 'eeKey' +-- +-- * 'eeOauthToken' +-- +-- * 'eeFields' +-- +-- * 'eeAlt' +enterprisesEnroll + :: Text -- ^ 'token' + -> EnterprisesEnroll +enterprisesEnroll pEeToken_ = + EnterprisesEnroll + { _eeQuotaUser = Nothing + , _eePrettyPrint = True + , _eeUserIp = Nothing + , _eeToken = pEeToken_ + , _eeKey = Nothing + , _eeOauthToken = Nothing + , _eeFields = Nothing + , _eeAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eeQuotaUser :: Lens' EnterprisesEnroll' (Maybe Text) +eeQuotaUser + = lens _eeQuotaUser (\ s a -> s{_eeQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eePrettyPrint :: Lens' EnterprisesEnroll' Bool +eePrettyPrint + = lens _eePrettyPrint + (\ s a -> s{_eePrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eeUserIp :: Lens' EnterprisesEnroll' (Maybe Text) +eeUserIp = lens _eeUserIp (\ s a -> s{_eeUserIp = a}) + +-- | The token provided by the enterprise to register the MDM. +eeToken :: Lens' EnterprisesEnroll' Text +eeToken = lens _eeToken (\ s a -> s{_eeToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eeKey :: Lens' EnterprisesEnroll' (Maybe Text) +eeKey = lens _eeKey (\ s a -> s{_eeKey = a}) + +-- | OAuth 2.0 token for the current user. +eeOauthToken :: Lens' EnterprisesEnroll' (Maybe Text) +eeOauthToken + = lens _eeOauthToken (\ s a -> s{_eeOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eeFields :: Lens' EnterprisesEnroll' (Maybe Text) +eeFields = lens _eeFields (\ s a -> s{_eeFields = a}) + +-- | Data format for the response. +eeAlt :: Lens' EnterprisesEnroll' Text +eeAlt = lens _eeAlt (\ s a -> s{_eeAlt = a}) + +instance GoogleRequest EnterprisesEnroll' where + type Rs EnterprisesEnroll' = Enterprise + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesEnroll{..} + = go _eeQuotaUser _eePrettyPrint _eeUserIp + (Just _eeToken) + _eeKey + _eeOauthToken + _eeFields + _eeAlt + where go + = clientWithRoute + (Proxy :: Proxy EnterprisesEnrollAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Get.hs new file mode 100644 index 000000000..272f9ac79 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Get.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the name and domain of an enterprise. +-- +-- /See:/ for @AndroidenterpriseEnterprisesGet@. +module Androidenterprise.Enterprises.Get + ( + -- * REST Resource + EnterprisesGetAPI + + -- * Creating a Request + , enterprisesGet + , EnterprisesGet + + -- * Request Lenses + , egQuotaUser + , egPrettyPrint + , egEnterpriseId + , egUserIp + , egKey + , egOauthToken + , egFields + , egAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesGet@ which the +-- 'EnterprisesGet' request conforms to. +type EnterprisesGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> Get '[JSON] Enterprise + +-- | Retrieves the name and domain of an enterprise. +-- +-- /See:/ 'enterprisesGet' smart constructor. +data EnterprisesGet = EnterprisesGet + { _egQuotaUser :: !(Maybe Text) + , _egPrettyPrint :: !Bool + , _egEnterpriseId :: !Text + , _egUserIp :: !(Maybe Text) + , _egKey :: !(Maybe Text) + , _egOauthToken :: !(Maybe Text) + , _egFields :: !(Maybe Text) + , _egAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'egQuotaUser' +-- +-- * 'egPrettyPrint' +-- +-- * 'egEnterpriseId' +-- +-- * 'egUserIp' +-- +-- * 'egKey' +-- +-- * 'egOauthToken' +-- +-- * 'egFields' +-- +-- * 'egAlt' +enterprisesGet + :: Text -- ^ 'enterpriseId' + -> EnterprisesGet +enterprisesGet pEgEnterpriseId_ = + EnterprisesGet + { _egQuotaUser = Nothing + , _egPrettyPrint = True + , _egEnterpriseId = pEgEnterpriseId_ + , _egUserIp = Nothing + , _egKey = Nothing + , _egOauthToken = Nothing + , _egFields = Nothing + , _egAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +egQuotaUser :: Lens' EnterprisesGet' (Maybe Text) +egQuotaUser + = lens _egQuotaUser (\ s a -> s{_egQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +egPrettyPrint :: Lens' EnterprisesGet' Bool +egPrettyPrint + = lens _egPrettyPrint + (\ s a -> s{_egPrettyPrint = a}) + +-- | The ID of the enterprise. +egEnterpriseId :: Lens' EnterprisesGet' Text +egEnterpriseId + = lens _egEnterpriseId + (\ s a -> s{_egEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +egUserIp :: Lens' EnterprisesGet' (Maybe Text) +egUserIp = lens _egUserIp (\ s a -> s{_egUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +egKey :: Lens' EnterprisesGet' (Maybe Text) +egKey = lens _egKey (\ s a -> s{_egKey = a}) + +-- | OAuth 2.0 token for the current user. +egOauthToken :: Lens' EnterprisesGet' (Maybe Text) +egOauthToken + = lens _egOauthToken (\ s a -> s{_egOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +egFields :: Lens' EnterprisesGet' (Maybe Text) +egFields = lens _egFields (\ s a -> s{_egFields = a}) + +-- | Data format for the response. +egAlt :: Lens' EnterprisesGet' Text +egAlt = lens _egAlt (\ s a -> s{_egAlt = a}) + +instance GoogleRequest EnterprisesGet' where + type Rs EnterprisesGet' = Enterprise + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesGet{..} + = go _egQuotaUser _egPrettyPrint _egEnterpriseId + _egUserIp + _egKey + _egOauthToken + _egFields + _egAlt + where go + = clientWithRoute (Proxy :: Proxy EnterprisesGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Insert.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Insert.hs new file mode 100644 index 000000000..dc883a4cb --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Establishes the binding between the MDM and an enterprise. This is now +-- deprecated; use enroll instead. +-- +-- /See:/ for @AndroidenterpriseEnterprisesInsert@. +module Androidenterprise.Enterprises.Insert + ( + -- * REST Resource + EnterprisesInsertAPI + + -- * Creating a Request + , enterprisesInsert + , EnterprisesInsert + + -- * Request Lenses + , eiQuotaUser + , eiPrettyPrint + , eiUserIp + , eiToken + , eiKey + , eiOauthToken + , eiFields + , eiAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesInsert@ which the +-- 'EnterprisesInsert' request conforms to. +type EnterprisesInsertAPI = + "enterprises" :> + QueryParam "token" Text :> Post '[JSON] Enterprise + +-- | Establishes the binding between the MDM and an enterprise. This is now +-- deprecated; use enroll instead. +-- +-- /See:/ 'enterprisesInsert' smart constructor. +data EnterprisesInsert = EnterprisesInsert + { _eiQuotaUser :: !(Maybe Text) + , _eiPrettyPrint :: !Bool + , _eiUserIp :: !(Maybe Text) + , _eiToken :: !Text + , _eiKey :: !(Maybe Text) + , _eiOauthToken :: !(Maybe Text) + , _eiFields :: !(Maybe Text) + , _eiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eiQuotaUser' +-- +-- * 'eiPrettyPrint' +-- +-- * 'eiUserIp' +-- +-- * 'eiToken' +-- +-- * 'eiKey' +-- +-- * 'eiOauthToken' +-- +-- * 'eiFields' +-- +-- * 'eiAlt' +enterprisesInsert + :: Text -- ^ 'token' + -> EnterprisesInsert +enterprisesInsert pEiToken_ = + EnterprisesInsert + { _eiQuotaUser = Nothing + , _eiPrettyPrint = True + , _eiUserIp = Nothing + , _eiToken = pEiToken_ + , _eiKey = Nothing + , _eiOauthToken = Nothing + , _eiFields = Nothing + , _eiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eiQuotaUser :: Lens' EnterprisesInsert' (Maybe Text) +eiQuotaUser + = lens _eiQuotaUser (\ s a -> s{_eiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eiPrettyPrint :: Lens' EnterprisesInsert' Bool +eiPrettyPrint + = lens _eiPrettyPrint + (\ s a -> s{_eiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eiUserIp :: Lens' EnterprisesInsert' (Maybe Text) +eiUserIp = lens _eiUserIp (\ s a -> s{_eiUserIp = a}) + +-- | The token provided by the enterprise to register the MDM. +eiToken :: Lens' EnterprisesInsert' Text +eiToken = lens _eiToken (\ s a -> s{_eiToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eiKey :: Lens' EnterprisesInsert' (Maybe Text) +eiKey = lens _eiKey (\ s a -> s{_eiKey = a}) + +-- | OAuth 2.0 token for the current user. +eiOauthToken :: Lens' EnterprisesInsert' (Maybe Text) +eiOauthToken + = lens _eiOauthToken (\ s a -> s{_eiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eiFields :: Lens' EnterprisesInsert' (Maybe Text) +eiFields = lens _eiFields (\ s a -> s{_eiFields = a}) + +-- | Data format for the response. +eiAlt :: Lens' EnterprisesInsert' Text +eiAlt = lens _eiAlt (\ s a -> s{_eiAlt = a}) + +instance GoogleRequest EnterprisesInsert' where + type Rs EnterprisesInsert' = Enterprise + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesInsert{..} + = go _eiQuotaUser _eiPrettyPrint _eiUserIp + (Just _eiToken) + _eiKey + _eiOauthToken + _eiFields + _eiAlt + where go + = clientWithRoute + (Proxy :: Proxy EnterprisesInsertAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/List.hs new file mode 100644 index 000000000..c6de98cdd --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/List.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Looks up an enterprise by domain name. +-- +-- /See:/ for @AndroidenterpriseEnterprisesList@. +module Androidenterprise.Enterprises.List + ( + -- * REST Resource + EnterprisesListAPI + + -- * Creating a Request + , enterprisesList + , EnterprisesList + + -- * Request Lenses + , elQuotaUser + , elPrettyPrint + , elUserIp + , elDomain + , elKey + , elOauthToken + , elFields + , elAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesList@ which the +-- 'EnterprisesList' request conforms to. +type EnterprisesListAPI = + "enterprises" :> + QueryParam "domain" Text :> + Get '[JSON] EnterprisesListResponse + +-- | Looks up an enterprise by domain name. +-- +-- /See:/ 'enterprisesList' smart constructor. +data EnterprisesList = EnterprisesList + { _elQuotaUser :: !(Maybe Text) + , _elPrettyPrint :: !Bool + , _elUserIp :: !(Maybe Text) + , _elDomain :: !Text + , _elKey :: !(Maybe Text) + , _elOauthToken :: !(Maybe Text) + , _elFields :: !(Maybe Text) + , _elAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elQuotaUser' +-- +-- * 'elPrettyPrint' +-- +-- * 'elUserIp' +-- +-- * 'elDomain' +-- +-- * 'elKey' +-- +-- * 'elOauthToken' +-- +-- * 'elFields' +-- +-- * 'elAlt' +enterprisesList + :: Text -- ^ 'domain' + -> EnterprisesList +enterprisesList pElDomain_ = + EnterprisesList + { _elQuotaUser = Nothing + , _elPrettyPrint = True + , _elUserIp = Nothing + , _elDomain = pElDomain_ + , _elKey = Nothing + , _elOauthToken = Nothing + , _elFields = Nothing + , _elAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +elQuotaUser :: Lens' EnterprisesList' (Maybe Text) +elQuotaUser + = lens _elQuotaUser (\ s a -> s{_elQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +elPrettyPrint :: Lens' EnterprisesList' Bool +elPrettyPrint + = lens _elPrettyPrint + (\ s a -> s{_elPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +elUserIp :: Lens' EnterprisesList' (Maybe Text) +elUserIp = lens _elUserIp (\ s a -> s{_elUserIp = a}) + +-- | The exact primary domain name of the enterprise to look up. +elDomain :: Lens' EnterprisesList' Text +elDomain = lens _elDomain (\ s a -> s{_elDomain = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +elKey :: Lens' EnterprisesList' (Maybe Text) +elKey = lens _elKey (\ s a -> s{_elKey = a}) + +-- | OAuth 2.0 token for the current user. +elOauthToken :: Lens' EnterprisesList' (Maybe Text) +elOauthToken + = lens _elOauthToken (\ s a -> s{_elOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +elFields :: Lens' EnterprisesList' (Maybe Text) +elFields = lens _elFields (\ s a -> s{_elFields = a}) + +-- | Data format for the response. +elAlt :: Lens' EnterprisesList' Text +elAlt = lens _elAlt (\ s a -> s{_elAlt = a}) + +instance GoogleRequest EnterprisesList' where + type Rs EnterprisesList' = EnterprisesListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesList{..} + = go _elQuotaUser _elPrettyPrint _elUserIp + (Just _elDomain) + _elKey + _elOauthToken + _elFields + _elAlt + where go + = clientWithRoute (Proxy :: Proxy EnterprisesListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SendTestPushNotification.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SendTestPushNotification.hs new file mode 100644 index 000000000..713a0dbe6 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SendTestPushNotification.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.SendTestPushNotification +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sends a test push notification to validate the MDM integration with the +-- Google Cloud Pub\/Sub service for this enterprise. +-- +-- /See:/ for @AndroidenterpriseEnterprisesSendTestPushNotification@. +module Androidenterprise.Enterprises.SendTestPushNotification + ( + -- * REST Resource + EnterprisesSendTestPushNotificationAPI + + -- * Creating a Request + , enterprisesSendTestPushNotification + , EnterprisesSendTestPushNotification + + -- * Request Lenses + , estpnQuotaUser + , estpnPrettyPrint + , estpnEnterpriseId + , estpnUserIp + , estpnKey + , estpnOauthToken + , estpnFields + , estpnAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesSendTestPushNotification@ which the +-- 'EnterprisesSendTestPushNotification' request conforms to. +type EnterprisesSendTestPushNotificationAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "sendTestPushNotification" :> + Post '[JSON] + EnterprisesSendTestPushNotificationResponse + +-- | Sends a test push notification to validate the MDM integration with the +-- Google Cloud Pub\/Sub service for this enterprise. +-- +-- /See:/ 'enterprisesSendTestPushNotification' smart constructor. +data EnterprisesSendTestPushNotification = EnterprisesSendTestPushNotification + { _estpnQuotaUser :: !(Maybe Text) + , _estpnPrettyPrint :: !Bool + , _estpnEnterpriseId :: !Text + , _estpnUserIp :: !(Maybe Text) + , _estpnKey :: !(Maybe Text) + , _estpnOauthToken :: !(Maybe Text) + , _estpnFields :: !(Maybe Text) + , _estpnAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesSendTestPushNotification'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'estpnQuotaUser' +-- +-- * 'estpnPrettyPrint' +-- +-- * 'estpnEnterpriseId' +-- +-- * 'estpnUserIp' +-- +-- * 'estpnKey' +-- +-- * 'estpnOauthToken' +-- +-- * 'estpnFields' +-- +-- * 'estpnAlt' +enterprisesSendTestPushNotification + :: Text -- ^ 'enterpriseId' + -> EnterprisesSendTestPushNotification +enterprisesSendTestPushNotification pEstpnEnterpriseId_ = + EnterprisesSendTestPushNotification + { _estpnQuotaUser = Nothing + , _estpnPrettyPrint = True + , _estpnEnterpriseId = pEstpnEnterpriseId_ + , _estpnUserIp = Nothing + , _estpnKey = Nothing + , _estpnOauthToken = Nothing + , _estpnFields = Nothing + , _estpnAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +estpnQuotaUser :: Lens' EnterprisesSendTestPushNotification' (Maybe Text) +estpnQuotaUser + = lens _estpnQuotaUser + (\ s a -> s{_estpnQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +estpnPrettyPrint :: Lens' EnterprisesSendTestPushNotification' Bool +estpnPrettyPrint + = lens _estpnPrettyPrint + (\ s a -> s{_estpnPrettyPrint = a}) + +-- | The ID of the enterprise. +estpnEnterpriseId :: Lens' EnterprisesSendTestPushNotification' Text +estpnEnterpriseId + = lens _estpnEnterpriseId + (\ s a -> s{_estpnEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +estpnUserIp :: Lens' EnterprisesSendTestPushNotification' (Maybe Text) +estpnUserIp + = lens _estpnUserIp (\ s a -> s{_estpnUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +estpnKey :: Lens' EnterprisesSendTestPushNotification' (Maybe Text) +estpnKey = lens _estpnKey (\ s a -> s{_estpnKey = a}) + +-- | OAuth 2.0 token for the current user. +estpnOauthToken :: Lens' EnterprisesSendTestPushNotification' (Maybe Text) +estpnOauthToken + = lens _estpnOauthToken + (\ s a -> s{_estpnOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +estpnFields :: Lens' EnterprisesSendTestPushNotification' (Maybe Text) +estpnFields + = lens _estpnFields (\ s a -> s{_estpnFields = a}) + +-- | Data format for the response. +estpnAlt :: Lens' EnterprisesSendTestPushNotification' Text +estpnAlt = lens _estpnAlt (\ s a -> s{_estpnAlt = a}) + +instance GoogleRequest + EnterprisesSendTestPushNotification' where + type Rs EnterprisesSendTestPushNotification' = + EnterprisesSendTestPushNotificationResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u + EnterprisesSendTestPushNotification{..} + = go _estpnQuotaUser _estpnPrettyPrint + _estpnEnterpriseId + _estpnUserIp + _estpnKey + _estpnOauthToken + _estpnFields + _estpnAlt + where go + = clientWithRoute + (Proxy :: + Proxy EnterprisesSendTestPushNotificationAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SetAccount.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SetAccount.hs new file mode 100644 index 000000000..6733bc727 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/SetAccount.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.SetAccount +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Set the account that will be used to authenticate to the API as the +-- enterprise. +-- +-- /See:/ for @AndroidenterpriseEnterprisesSetAccount@. +module Androidenterprise.Enterprises.SetAccount + ( + -- * REST Resource + EnterprisesSetAccountAPI + + -- * Creating a Request + , enterprisesSetAccount + , EnterprisesSetAccount + + -- * Request Lenses + , esaQuotaUser + , esaPrettyPrint + , esaEnterpriseId + , esaUserIp + , esaKey + , esaOauthToken + , esaFields + , esaAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesSetAccount@ which the +-- 'EnterprisesSetAccount' request conforms to. +type EnterprisesSetAccountAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "account" :> Put '[JSON] EnterpriseAccount + +-- | Set the account that will be used to authenticate to the API as the +-- enterprise. +-- +-- /See:/ 'enterprisesSetAccount' smart constructor. +data EnterprisesSetAccount = EnterprisesSetAccount + { _esaQuotaUser :: !(Maybe Text) + , _esaPrettyPrint :: !Bool + , _esaEnterpriseId :: !Text + , _esaUserIp :: !(Maybe Text) + , _esaKey :: !(Maybe Text) + , _esaOauthToken :: !(Maybe Text) + , _esaFields :: !(Maybe Text) + , _esaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesSetAccount'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'esaQuotaUser' +-- +-- * 'esaPrettyPrint' +-- +-- * 'esaEnterpriseId' +-- +-- * 'esaUserIp' +-- +-- * 'esaKey' +-- +-- * 'esaOauthToken' +-- +-- * 'esaFields' +-- +-- * 'esaAlt' +enterprisesSetAccount + :: Text -- ^ 'enterpriseId' + -> EnterprisesSetAccount +enterprisesSetAccount pEsaEnterpriseId_ = + EnterprisesSetAccount + { _esaQuotaUser = Nothing + , _esaPrettyPrint = True + , _esaEnterpriseId = pEsaEnterpriseId_ + , _esaUserIp = Nothing + , _esaKey = Nothing + , _esaOauthToken = Nothing + , _esaFields = Nothing + , _esaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +esaQuotaUser :: Lens' EnterprisesSetAccount' (Maybe Text) +esaQuotaUser + = lens _esaQuotaUser (\ s a -> s{_esaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +esaPrettyPrint :: Lens' EnterprisesSetAccount' Bool +esaPrettyPrint + = lens _esaPrettyPrint + (\ s a -> s{_esaPrettyPrint = a}) + +-- | The ID of the enterprise. +esaEnterpriseId :: Lens' EnterprisesSetAccount' Text +esaEnterpriseId + = lens _esaEnterpriseId + (\ s a -> s{_esaEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +esaUserIp :: Lens' EnterprisesSetAccount' (Maybe Text) +esaUserIp + = lens _esaUserIp (\ s a -> s{_esaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +esaKey :: Lens' EnterprisesSetAccount' (Maybe Text) +esaKey = lens _esaKey (\ s a -> s{_esaKey = a}) + +-- | OAuth 2.0 token for the current user. +esaOauthToken :: Lens' EnterprisesSetAccount' (Maybe Text) +esaOauthToken + = lens _esaOauthToken + (\ s a -> s{_esaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +esaFields :: Lens' EnterprisesSetAccount' (Maybe Text) +esaFields + = lens _esaFields (\ s a -> s{_esaFields = a}) + +-- | Data format for the response. +esaAlt :: Lens' EnterprisesSetAccount' Text +esaAlt = lens _esaAlt (\ s a -> s{_esaAlt = a}) + +instance GoogleRequest EnterprisesSetAccount' where + type Rs EnterprisesSetAccount' = EnterpriseAccount + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesSetAccount{..} + = go _esaQuotaUser _esaPrettyPrint _esaEnterpriseId + _esaUserIp + _esaKey + _esaOauthToken + _esaFields + _esaAlt + where go + = clientWithRoute + (Proxy :: Proxy EnterprisesSetAccountAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Unenroll.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Unenroll.hs new file mode 100644 index 000000000..041535cd1 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Enterprises/Unenroll.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Enterprises.Unenroll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Unenrolls an enterprise from the calling MDM. +-- +-- /See:/ for @AndroidenterpriseEnterprisesUnenroll@. +module Androidenterprise.Enterprises.Unenroll + ( + -- * REST Resource + EnterprisesUnenrollAPI + + -- * Creating a Request + , enterprisesUnenroll + , EnterprisesUnenroll + + -- * Request Lenses + , euQuotaUser + , euPrettyPrint + , euEnterpriseId + , euUserIp + , euKey + , euOauthToken + , euFields + , euAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEnterprisesUnenroll@ which the +-- 'EnterprisesUnenroll' request conforms to. +type EnterprisesUnenrollAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "unenroll" :> Post '[JSON] () + +-- | Unenrolls an enterprise from the calling MDM. +-- +-- /See:/ 'enterprisesUnenroll' smart constructor. +data EnterprisesUnenroll = EnterprisesUnenroll + { _euQuotaUser :: !(Maybe Text) + , _euPrettyPrint :: !Bool + , _euEnterpriseId :: !Text + , _euUserIp :: !(Maybe Text) + , _euKey :: !(Maybe Text) + , _euOauthToken :: !(Maybe Text) + , _euFields :: !(Maybe Text) + , _euAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EnterprisesUnenroll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'euQuotaUser' +-- +-- * 'euPrettyPrint' +-- +-- * 'euEnterpriseId' +-- +-- * 'euUserIp' +-- +-- * 'euKey' +-- +-- * 'euOauthToken' +-- +-- * 'euFields' +-- +-- * 'euAlt' +enterprisesUnenroll + :: Text -- ^ 'enterpriseId' + -> EnterprisesUnenroll +enterprisesUnenroll pEuEnterpriseId_ = + EnterprisesUnenroll + { _euQuotaUser = Nothing + , _euPrettyPrint = True + , _euEnterpriseId = pEuEnterpriseId_ + , _euUserIp = Nothing + , _euKey = Nothing + , _euOauthToken = Nothing + , _euFields = Nothing + , _euAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +euQuotaUser :: Lens' EnterprisesUnenroll' (Maybe Text) +euQuotaUser + = lens _euQuotaUser (\ s a -> s{_euQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +euPrettyPrint :: Lens' EnterprisesUnenroll' Bool +euPrettyPrint + = lens _euPrettyPrint + (\ s a -> s{_euPrettyPrint = a}) + +-- | The ID of the enterprise. +euEnterpriseId :: Lens' EnterprisesUnenroll' Text +euEnterpriseId + = lens _euEnterpriseId + (\ s a -> s{_euEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +euUserIp :: Lens' EnterprisesUnenroll' (Maybe Text) +euUserIp = lens _euUserIp (\ s a -> s{_euUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +euKey :: Lens' EnterprisesUnenroll' (Maybe Text) +euKey = lens _euKey (\ s a -> s{_euKey = a}) + +-- | OAuth 2.0 token for the current user. +euOauthToken :: Lens' EnterprisesUnenroll' (Maybe Text) +euOauthToken + = lens _euOauthToken (\ s a -> s{_euOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +euFields :: Lens' EnterprisesUnenroll' (Maybe Text) +euFields = lens _euFields (\ s a -> s{_euFields = a}) + +-- | Data format for the response. +euAlt :: Lens' EnterprisesUnenroll' Text +euAlt = lens _euAlt (\ s a -> s{_euAlt = a}) + +instance GoogleRequest EnterprisesUnenroll' where + type Rs EnterprisesUnenroll' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EnterprisesUnenroll{..} + = go _euQuotaUser _euPrettyPrint _euEnterpriseId + _euUserIp + _euKey + _euOauthToken + _euFields + _euAlt + where go + = clientWithRoute + (Proxy :: Proxy EnterprisesUnenrollAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Delete.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Delete.hs new file mode 100644 index 000000000..f0f240711 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Delete.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Entitlements.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes an entitlement to an app for a user and uninstalls it. +-- +-- /See:/ for @AndroidenterpriseEntitlementsDelete@. +module Androidenterprise.Entitlements.Delete + ( + -- * REST Resource + EntitlementsDeleteAPI + + -- * Creating a Request + , entitlementsDelete + , EntitlementsDelete + + -- * Request Lenses + , eddEntitlementId + , eddQuotaUser + , eddPrettyPrint + , eddEnterpriseId + , eddUserIp + , eddUserId + , eddKey + , eddOauthToken + , eddFields + , eddAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEntitlementsDelete@ which the +-- 'EntitlementsDelete' request conforms to. +type EntitlementsDeleteAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "entitlements" :> + Capture "entitlementId" Text :> Delete '[JSON] () + +-- | Removes an entitlement to an app for a user and uninstalls it. +-- +-- /See:/ 'entitlementsDelete' smart constructor. +data EntitlementsDelete = EntitlementsDelete + { _eddEntitlementId :: !Text + , _eddQuotaUser :: !(Maybe Text) + , _eddPrettyPrint :: !Bool + , _eddEnterpriseId :: !Text + , _eddUserIp :: !(Maybe Text) + , _eddUserId :: !Text + , _eddKey :: !(Maybe Text) + , _eddOauthToken :: !(Maybe Text) + , _eddFields :: !(Maybe Text) + , _eddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eddEntitlementId' +-- +-- * 'eddQuotaUser' +-- +-- * 'eddPrettyPrint' +-- +-- * 'eddEnterpriseId' +-- +-- * 'eddUserIp' +-- +-- * 'eddUserId' +-- +-- * 'eddKey' +-- +-- * 'eddOauthToken' +-- +-- * 'eddFields' +-- +-- * 'eddAlt' +entitlementsDelete + :: Text -- ^ 'entitlementId' + -> Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> EntitlementsDelete +entitlementsDelete pEddEntitlementId_ pEddEnterpriseId_ pEddUserId_ = + EntitlementsDelete + { _eddEntitlementId = pEddEntitlementId_ + , _eddQuotaUser = Nothing + , _eddPrettyPrint = True + , _eddEnterpriseId = pEddEnterpriseId_ + , _eddUserIp = Nothing + , _eddUserId = pEddUserId_ + , _eddKey = Nothing + , _eddOauthToken = Nothing + , _eddFields = Nothing + , _eddAlt = "json" + } + +-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\". +eddEntitlementId :: Lens' EntitlementsDelete' Text +eddEntitlementId + = lens _eddEntitlementId + (\ s a -> s{_eddEntitlementId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eddQuotaUser :: Lens' EntitlementsDelete' (Maybe Text) +eddQuotaUser + = lens _eddQuotaUser (\ s a -> s{_eddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +eddPrettyPrint :: Lens' EntitlementsDelete' Bool +eddPrettyPrint + = lens _eddPrettyPrint + (\ s a -> s{_eddPrettyPrint = a}) + +-- | The ID of the enterprise. +eddEnterpriseId :: Lens' EntitlementsDelete' Text +eddEnterpriseId + = lens _eddEnterpriseId + (\ s a -> s{_eddEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eddUserIp :: Lens' EntitlementsDelete' (Maybe Text) +eddUserIp + = lens _eddUserIp (\ s a -> s{_eddUserIp = a}) + +-- | The ID of the user. +eddUserId :: Lens' EntitlementsDelete' Text +eddUserId + = lens _eddUserId (\ s a -> s{_eddUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eddKey :: Lens' EntitlementsDelete' (Maybe Text) +eddKey = lens _eddKey (\ s a -> s{_eddKey = a}) + +-- | OAuth 2.0 token for the current user. +eddOauthToken :: Lens' EntitlementsDelete' (Maybe Text) +eddOauthToken + = lens _eddOauthToken + (\ s a -> s{_eddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eddFields :: Lens' EntitlementsDelete' (Maybe Text) +eddFields + = lens _eddFields (\ s a -> s{_eddFields = a}) + +-- | Data format for the response. +eddAlt :: Lens' EntitlementsDelete' Text +eddAlt = lens _eddAlt (\ s a -> s{_eddAlt = a}) + +instance GoogleRequest EntitlementsDelete' where + type Rs EntitlementsDelete' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EntitlementsDelete{..} + = go _eddEntitlementId _eddQuotaUser _eddPrettyPrint + _eddEnterpriseId + _eddUserIp + _eddUserId + _eddKey + _eddOauthToken + _eddFields + _eddAlt + where go + = clientWithRoute + (Proxy :: Proxy EntitlementsDeleteAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Get.hs new file mode 100644 index 000000000..4af64f966 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Entitlements.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details of an entitlement. +-- +-- /See:/ for @AndroidenterpriseEntitlementsGet@. +module Androidenterprise.Entitlements.Get + ( + -- * REST Resource + EntitlementsGetAPI + + -- * Creating a Request + , entitlementsGet + , EntitlementsGet + + -- * Request Lenses + , entEntitlementId + , entQuotaUser + , entPrettyPrint + , entEnterpriseId + , entUserIp + , entUserId + , entKey + , entOauthToken + , entFields + , entAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEntitlementsGet@ which the +-- 'EntitlementsGet' request conforms to. +type EntitlementsGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "entitlements" :> + Capture "entitlementId" Text :> + Get '[JSON] Entitlement + +-- | Retrieves details of an entitlement. +-- +-- /See:/ 'entitlementsGet' smart constructor. +data EntitlementsGet = EntitlementsGet + { _entEntitlementId :: !Text + , _entQuotaUser :: !(Maybe Text) + , _entPrettyPrint :: !Bool + , _entEnterpriseId :: !Text + , _entUserIp :: !(Maybe Text) + , _entUserId :: !Text + , _entKey :: !(Maybe Text) + , _entOauthToken :: !(Maybe Text) + , _entFields :: !(Maybe Text) + , _entAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'entEntitlementId' +-- +-- * 'entQuotaUser' +-- +-- * 'entPrettyPrint' +-- +-- * 'entEnterpriseId' +-- +-- * 'entUserIp' +-- +-- * 'entUserId' +-- +-- * 'entKey' +-- +-- * 'entOauthToken' +-- +-- * 'entFields' +-- +-- * 'entAlt' +entitlementsGet + :: Text -- ^ 'entitlementId' + -> Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> EntitlementsGet +entitlementsGet pEntEntitlementId_ pEntEnterpriseId_ pEntUserId_ = + EntitlementsGet + { _entEntitlementId = pEntEntitlementId_ + , _entQuotaUser = Nothing + , _entPrettyPrint = True + , _entEnterpriseId = pEntEnterpriseId_ + , _entUserIp = Nothing + , _entUserId = pEntUserId_ + , _entKey = Nothing + , _entOauthToken = Nothing + , _entFields = Nothing + , _entAlt = "json" + } + +-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\". +entEntitlementId :: Lens' EntitlementsGet' Text +entEntitlementId + = lens _entEntitlementId + (\ s a -> s{_entEntitlementId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +entQuotaUser :: Lens' EntitlementsGet' (Maybe Text) +entQuotaUser + = lens _entQuotaUser (\ s a -> s{_entQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +entPrettyPrint :: Lens' EntitlementsGet' Bool +entPrettyPrint + = lens _entPrettyPrint + (\ s a -> s{_entPrettyPrint = a}) + +-- | The ID of the enterprise. +entEnterpriseId :: Lens' EntitlementsGet' Text +entEnterpriseId + = lens _entEnterpriseId + (\ s a -> s{_entEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +entUserIp :: Lens' EntitlementsGet' (Maybe Text) +entUserIp + = lens _entUserIp (\ s a -> s{_entUserIp = a}) + +-- | The ID of the user. +entUserId :: Lens' EntitlementsGet' Text +entUserId + = lens _entUserId (\ s a -> s{_entUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +entKey :: Lens' EntitlementsGet' (Maybe Text) +entKey = lens _entKey (\ s a -> s{_entKey = a}) + +-- | OAuth 2.0 token for the current user. +entOauthToken :: Lens' EntitlementsGet' (Maybe Text) +entOauthToken + = lens _entOauthToken + (\ s a -> s{_entOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +entFields :: Lens' EntitlementsGet' (Maybe Text) +entFields + = lens _entFields (\ s a -> s{_entFields = a}) + +-- | Data format for the response. +entAlt :: Lens' EntitlementsGet' Text +entAlt = lens _entAlt (\ s a -> s{_entAlt = a}) + +instance GoogleRequest EntitlementsGet' where + type Rs EntitlementsGet' = Entitlement + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EntitlementsGet{..} + = go _entEntitlementId _entQuotaUser _entPrettyPrint + _entEnterpriseId + _entUserIp + _entUserId + _entKey + _entOauthToken + _entFields + _entAlt + where go + = clientWithRoute (Proxy :: Proxy EntitlementsGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/List.hs new file mode 100644 index 000000000..ecb2d8671 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/List.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Entitlements.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List of all entitlements for the specified user. Only the ID is set. +-- +-- /See:/ for @AndroidenterpriseEntitlementsList@. +module Androidenterprise.Entitlements.List + ( + -- * REST Resource + EntitlementsListAPI + + -- * Creating a Request + , entitlementsList + , EntitlementsList + + -- * Request Lenses + , eQuotaUser + , ePrettyPrint + , eEnterpriseId + , eUserIp + , eUserId + , eKey + , eOauthToken + , eFields + , eAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEntitlementsList@ which the +-- 'EntitlementsList' request conforms to. +type EntitlementsListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "entitlements" :> + Get '[JSON] EntitlementsListResponse + +-- | List of all entitlements for the specified user. Only the ID is set. +-- +-- /See:/ 'entitlementsList' smart constructor. +data EntitlementsList = EntitlementsList + { _eQuotaUser :: !(Maybe Text) + , _ePrettyPrint :: !Bool + , _eEnterpriseId :: !Text + , _eUserIp :: !(Maybe Text) + , _eUserId :: !Text + , _eKey :: !(Maybe Text) + , _eOauthToken :: !(Maybe Text) + , _eFields :: !(Maybe Text) + , _eAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eQuotaUser' +-- +-- * 'ePrettyPrint' +-- +-- * 'eEnterpriseId' +-- +-- * 'eUserIp' +-- +-- * 'eUserId' +-- +-- * 'eKey' +-- +-- * 'eOauthToken' +-- +-- * 'eFields' +-- +-- * 'eAlt' +entitlementsList + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> EntitlementsList +entitlementsList pEEnterpriseId_ pEUserId_ = + EntitlementsList + { _eQuotaUser = Nothing + , _ePrettyPrint = True + , _eEnterpriseId = pEEnterpriseId_ + , _eUserIp = Nothing + , _eUserId = pEUserId_ + , _eKey = Nothing + , _eOauthToken = Nothing + , _eFields = Nothing + , _eAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +eQuotaUser :: Lens' EntitlementsList' (Maybe Text) +eQuotaUser + = lens _eQuotaUser (\ s a -> s{_eQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ePrettyPrint :: Lens' EntitlementsList' Bool +ePrettyPrint + = lens _ePrettyPrint (\ s a -> s{_ePrettyPrint = a}) + +-- | The ID of the enterprise. +eEnterpriseId :: Lens' EntitlementsList' Text +eEnterpriseId + = lens _eEnterpriseId + (\ s a -> s{_eEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +eUserIp :: Lens' EntitlementsList' (Maybe Text) +eUserIp = lens _eUserIp (\ s a -> s{_eUserIp = a}) + +-- | The ID of the user. +eUserId :: Lens' EntitlementsList' Text +eUserId = lens _eUserId (\ s a -> s{_eUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +eKey :: Lens' EntitlementsList' (Maybe Text) +eKey = lens _eKey (\ s a -> s{_eKey = a}) + +-- | OAuth 2.0 token for the current user. +eOauthToken :: Lens' EntitlementsList' (Maybe Text) +eOauthToken + = lens _eOauthToken (\ s a -> s{_eOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +eFields :: Lens' EntitlementsList' (Maybe Text) +eFields = lens _eFields (\ s a -> s{_eFields = a}) + +-- | Data format for the response. +eAlt :: Lens' EntitlementsList' Text +eAlt = lens _eAlt (\ s a -> s{_eAlt = a}) + +instance GoogleRequest EntitlementsList' where + type Rs EntitlementsList' = EntitlementsListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EntitlementsList{..} + = go _eQuotaUser _ePrettyPrint _eEnterpriseId + _eUserIp + _eUserId + _eKey + _eOauthToken + _eFields + _eAlt + where go + = clientWithRoute + (Proxy :: Proxy EntitlementsListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Patch.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Patch.hs new file mode 100644 index 000000000..a78f480bf --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Patch.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Entitlements.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds or updates an entitlement to an app for a user. This method +-- supports patch semantics. +-- +-- /See:/ for @AndroidenterpriseEntitlementsPatch@. +module Androidenterprise.Entitlements.Patch + ( + -- * REST Resource + EntitlementsPatchAPI + + -- * Creating a Request + , entitlementsPatch + , EntitlementsPatch + + -- * Request Lenses + , epEntitlementId + , epQuotaUser + , epPrettyPrint + , epEnterpriseId + , epUserIp + , epInstall + , epUserId + , epKey + , epOauthToken + , epFields + , epAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEntitlementsPatch@ which the +-- 'EntitlementsPatch' request conforms to. +type EntitlementsPatchAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "entitlements" :> + Capture "entitlementId" Text :> + QueryParam "install" Bool :> + Patch '[JSON] Entitlement + +-- | Adds or updates an entitlement to an app for a user. This method +-- supports patch semantics. +-- +-- /See:/ 'entitlementsPatch' smart constructor. +data EntitlementsPatch = EntitlementsPatch + { _epEntitlementId :: !Text + , _epQuotaUser :: !(Maybe Text) + , _epPrettyPrint :: !Bool + , _epEnterpriseId :: !Text + , _epUserIp :: !(Maybe Text) + , _epInstall :: !(Maybe Bool) + , _epUserId :: !Text + , _epKey :: !(Maybe Text) + , _epOauthToken :: !(Maybe Text) + , _epFields :: !(Maybe Text) + , _epAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'epEntitlementId' +-- +-- * 'epQuotaUser' +-- +-- * 'epPrettyPrint' +-- +-- * 'epEnterpriseId' +-- +-- * 'epUserIp' +-- +-- * 'epInstall' +-- +-- * 'epUserId' +-- +-- * 'epKey' +-- +-- * 'epOauthToken' +-- +-- * 'epFields' +-- +-- * 'epAlt' +entitlementsPatch + :: Text -- ^ 'entitlementId' + -> Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> EntitlementsPatch +entitlementsPatch pEpEntitlementId_ pEpEnterpriseId_ pEpUserId_ = + EntitlementsPatch + { _epEntitlementId = pEpEntitlementId_ + , _epQuotaUser = Nothing + , _epPrettyPrint = True + , _epEnterpriseId = pEpEnterpriseId_ + , _epUserIp = Nothing + , _epInstall = Nothing + , _epUserId = pEpUserId_ + , _epKey = Nothing + , _epOauthToken = Nothing + , _epFields = Nothing + , _epAlt = "json" + } + +-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\". +epEntitlementId :: Lens' EntitlementsPatch' Text +epEntitlementId + = lens _epEntitlementId + (\ s a -> s{_epEntitlementId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +epQuotaUser :: Lens' EntitlementsPatch' (Maybe Text) +epQuotaUser + = lens _epQuotaUser (\ s a -> s{_epQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +epPrettyPrint :: Lens' EntitlementsPatch' Bool +epPrettyPrint + = lens _epPrettyPrint + (\ s a -> s{_epPrettyPrint = a}) + +-- | The ID of the enterprise. +epEnterpriseId :: Lens' EntitlementsPatch' Text +epEnterpriseId + = lens _epEnterpriseId + (\ s a -> s{_epEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +epUserIp :: Lens' EntitlementsPatch' (Maybe Text) +epUserIp = lens _epUserIp (\ s a -> s{_epUserIp = a}) + +-- | Set to true to also install the product on all the user\'s devices where +-- possible. Failure to install on one or more devices will not prevent +-- this operation from returning successfully, as long as the entitlement +-- was successfully assigned to the user. +epInstall :: Lens' EntitlementsPatch' (Maybe Bool) +epInstall + = lens _epInstall (\ s a -> s{_epInstall = a}) + +-- | The ID of the user. +epUserId :: Lens' EntitlementsPatch' Text +epUserId = lens _epUserId (\ s a -> s{_epUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +epKey :: Lens' EntitlementsPatch' (Maybe Text) +epKey = lens _epKey (\ s a -> s{_epKey = a}) + +-- | OAuth 2.0 token for the current user. +epOauthToken :: Lens' EntitlementsPatch' (Maybe Text) +epOauthToken + = lens _epOauthToken (\ s a -> s{_epOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +epFields :: Lens' EntitlementsPatch' (Maybe Text) +epFields = lens _epFields (\ s a -> s{_epFields = a}) + +-- | Data format for the response. +epAlt :: Lens' EntitlementsPatch' Text +epAlt = lens _epAlt (\ s a -> s{_epAlt = a}) + +instance GoogleRequest EntitlementsPatch' where + type Rs EntitlementsPatch' = Entitlement + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EntitlementsPatch{..} + = go _epEntitlementId _epQuotaUser _epPrettyPrint + _epEnterpriseId + _epUserIp + _epInstall + _epUserId + _epKey + _epOauthToken + _epFields + _epAlt + where go + = clientWithRoute + (Proxy :: Proxy EntitlementsPatchAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Update.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Update.hs new file mode 100644 index 000000000..a8fbb2801 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Entitlements/Update.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Entitlements.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds or updates an entitlement to an app for a user. +-- +-- /See:/ for @AndroidenterpriseEntitlementsUpdate@. +module Androidenterprise.Entitlements.Update + ( + -- * REST Resource + EntitlementsUpdateAPI + + -- * Creating a Request + , entitlementsUpdate + , EntitlementsUpdate + + -- * Request Lenses + , euuEntitlementId + , euuQuotaUser + , euuPrettyPrint + , euuEnterpriseId + , euuUserIp + , euuInstall + , euuUserId + , euuKey + , euuOauthToken + , euuFields + , euuAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseEntitlementsUpdate@ which the +-- 'EntitlementsUpdate' request conforms to. +type EntitlementsUpdateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "entitlements" :> + Capture "entitlementId" Text :> + QueryParam "install" Bool :> Put '[JSON] Entitlement + +-- | Adds or updates an entitlement to an app for a user. +-- +-- /See:/ 'entitlementsUpdate' smart constructor. +data EntitlementsUpdate = EntitlementsUpdate + { _euuEntitlementId :: !Text + , _euuQuotaUser :: !(Maybe Text) + , _euuPrettyPrint :: !Bool + , _euuEnterpriseId :: !Text + , _euuUserIp :: !(Maybe Text) + , _euuInstall :: !(Maybe Bool) + , _euuUserId :: !Text + , _euuKey :: !(Maybe Text) + , _euuOauthToken :: !(Maybe Text) + , _euuFields :: !(Maybe Text) + , _euuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EntitlementsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'euuEntitlementId' +-- +-- * 'euuQuotaUser' +-- +-- * 'euuPrettyPrint' +-- +-- * 'euuEnterpriseId' +-- +-- * 'euuUserIp' +-- +-- * 'euuInstall' +-- +-- * 'euuUserId' +-- +-- * 'euuKey' +-- +-- * 'euuOauthToken' +-- +-- * 'euuFields' +-- +-- * 'euuAlt' +entitlementsUpdate + :: Text -- ^ 'entitlementId' + -> Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> EntitlementsUpdate +entitlementsUpdate pEuuEntitlementId_ pEuuEnterpriseId_ pEuuUserId_ = + EntitlementsUpdate + { _euuEntitlementId = pEuuEntitlementId_ + , _euuQuotaUser = Nothing + , _euuPrettyPrint = True + , _euuEnterpriseId = pEuuEnterpriseId_ + , _euuUserIp = Nothing + , _euuInstall = Nothing + , _euuUserId = pEuuUserId_ + , _euuKey = Nothing + , _euuOauthToken = Nothing + , _euuFields = Nothing + , _euuAlt = "json" + } + +-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\". +euuEntitlementId :: Lens' EntitlementsUpdate' Text +euuEntitlementId + = lens _euuEntitlementId + (\ s a -> s{_euuEntitlementId = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +euuQuotaUser :: Lens' EntitlementsUpdate' (Maybe Text) +euuQuotaUser + = lens _euuQuotaUser (\ s a -> s{_euuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +euuPrettyPrint :: Lens' EntitlementsUpdate' Bool +euuPrettyPrint + = lens _euuPrettyPrint + (\ s a -> s{_euuPrettyPrint = a}) + +-- | The ID of the enterprise. +euuEnterpriseId :: Lens' EntitlementsUpdate' Text +euuEnterpriseId + = lens _euuEnterpriseId + (\ s a -> s{_euuEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +euuUserIp :: Lens' EntitlementsUpdate' (Maybe Text) +euuUserIp + = lens _euuUserIp (\ s a -> s{_euuUserIp = a}) + +-- | Set to true to also install the product on all the user\'s devices where +-- possible. Failure to install on one or more devices will not prevent +-- this operation from returning successfully, as long as the entitlement +-- was successfully assigned to the user. +euuInstall :: Lens' EntitlementsUpdate' (Maybe Bool) +euuInstall + = lens _euuInstall (\ s a -> s{_euuInstall = a}) + +-- | The ID of the user. +euuUserId :: Lens' EntitlementsUpdate' Text +euuUserId + = lens _euuUserId (\ s a -> s{_euuUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +euuKey :: Lens' EntitlementsUpdate' (Maybe Text) +euuKey = lens _euuKey (\ s a -> s{_euuKey = a}) + +-- | OAuth 2.0 token for the current user. +euuOauthToken :: Lens' EntitlementsUpdate' (Maybe Text) +euuOauthToken + = lens _euuOauthToken + (\ s a -> s{_euuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +euuFields :: Lens' EntitlementsUpdate' (Maybe Text) +euuFields + = lens _euuFields (\ s a -> s{_euuFields = a}) + +-- | Data format for the response. +euuAlt :: Lens' EntitlementsUpdate' Text +euuAlt = lens _euuAlt (\ s a -> s{_euuAlt = a}) + +instance GoogleRequest EntitlementsUpdate' where + type Rs EntitlementsUpdate' = Entitlement + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u EntitlementsUpdate{..} + = go _euuEntitlementId _euuQuotaUser _euuPrettyPrint + _euuEnterpriseId + _euuUserIp + _euuInstall + _euuUserId + _euuKey + _euuOauthToken + _euuFields + _euuAlt + where go + = clientWithRoute + (Proxy :: Proxy EntitlementsUpdateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/Get.hs new file mode 100644 index 000000000..9c59068a6 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Grouplicenses.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details of an enterprise\'s group license for a product. +-- +-- /See:/ for @AndroidenterpriseGrouplicensesGet@. +module Androidenterprise.Grouplicenses.Get + ( + -- * REST Resource + GrouplicensesGetAPI + + -- * Creating a Request + , grouplicensesGet + , GrouplicensesGet + + -- * Request Lenses + , ggQuotaUser + , ggPrettyPrint + , ggEnterpriseId + , ggUserIp + , ggKey + , ggOauthToken + , ggGroupLicenseId + , ggFields + , ggAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseGrouplicensesGet@ which the +-- 'GrouplicensesGet' request conforms to. +type GrouplicensesGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "groupLicenses" :> + Capture "groupLicenseId" Text :> + Get '[JSON] GroupLicense + +-- | Retrieves details of an enterprise\'s group license for a product. +-- +-- /See:/ 'grouplicensesGet' smart constructor. +data GrouplicensesGet = GrouplicensesGet + { _ggQuotaUser :: !(Maybe Text) + , _ggPrettyPrint :: !Bool + , _ggEnterpriseId :: !Text + , _ggUserIp :: !(Maybe Text) + , _ggKey :: !(Maybe Text) + , _ggOauthToken :: !(Maybe Text) + , _ggGroupLicenseId :: !Text + , _ggFields :: !(Maybe Text) + , _ggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GrouplicensesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ggQuotaUser' +-- +-- * 'ggPrettyPrint' +-- +-- * 'ggEnterpriseId' +-- +-- * 'ggUserIp' +-- +-- * 'ggKey' +-- +-- * 'ggOauthToken' +-- +-- * 'ggGroupLicenseId' +-- +-- * 'ggFields' +-- +-- * 'ggAlt' +grouplicensesGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'groupLicenseId' + -> GrouplicensesGet +grouplicensesGet pGgEnterpriseId_ pGgGroupLicenseId_ = + GrouplicensesGet + { _ggQuotaUser = Nothing + , _ggPrettyPrint = True + , _ggEnterpriseId = pGgEnterpriseId_ + , _ggUserIp = Nothing + , _ggKey = Nothing + , _ggOauthToken = Nothing + , _ggGroupLicenseId = pGgGroupLicenseId_ + , _ggFields = Nothing + , _ggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ggQuotaUser :: Lens' GrouplicensesGet' (Maybe Text) +ggQuotaUser + = lens _ggQuotaUser (\ s a -> s{_ggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ggPrettyPrint :: Lens' GrouplicensesGet' Bool +ggPrettyPrint + = lens _ggPrettyPrint + (\ s a -> s{_ggPrettyPrint = a}) + +-- | The ID of the enterprise. +ggEnterpriseId :: Lens' GrouplicensesGet' Text +ggEnterpriseId + = lens _ggEnterpriseId + (\ s a -> s{_ggEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ggUserIp :: Lens' GrouplicensesGet' (Maybe Text) +ggUserIp = lens _ggUserIp (\ s a -> s{_ggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ggKey :: Lens' GrouplicensesGet' (Maybe Text) +ggKey = lens _ggKey (\ s a -> s{_ggKey = a}) + +-- | OAuth 2.0 token for the current user. +ggOauthToken :: Lens' GrouplicensesGet' (Maybe Text) +ggOauthToken + = lens _ggOauthToken (\ s a -> s{_ggOauthToken = a}) + +-- | The ID of the product the group license is for, e.g. +-- \"app:com.google.android.gm\". +ggGroupLicenseId :: Lens' GrouplicensesGet' Text +ggGroupLicenseId + = lens _ggGroupLicenseId + (\ s a -> s{_ggGroupLicenseId = a}) + +-- | Selector specifying which fields to include in a partial response. +ggFields :: Lens' GrouplicensesGet' (Maybe Text) +ggFields = lens _ggFields (\ s a -> s{_ggFields = a}) + +-- | Data format for the response. +ggAlt :: Lens' GrouplicensesGet' Text +ggAlt = lens _ggAlt (\ s a -> s{_ggAlt = a}) + +instance GoogleRequest GrouplicensesGet' where + type Rs GrouplicensesGet' = GroupLicense + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u GrouplicensesGet{..} + = go _ggQuotaUser _ggPrettyPrint _ggEnterpriseId + _ggUserIp + _ggKey + _ggOauthToken + _ggGroupLicenseId + _ggFields + _ggAlt + where go + = clientWithRoute + (Proxy :: Proxy GrouplicensesGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/List.hs new file mode 100644 index 000000000..e45f77a17 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenses/List.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Grouplicenses.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves IDs of all products for which the enterprise has a group +-- license. +-- +-- /See:/ for @AndroidenterpriseGrouplicensesList@. +module Androidenterprise.Grouplicenses.List + ( + -- * REST Resource + GrouplicensesListAPI + + -- * Creating a Request + , grouplicensesList + , GrouplicensesList + + -- * Request Lenses + , glQuotaUser + , glPrettyPrint + , glEnterpriseId + , glUserIp + , glKey + , glOauthToken + , glFields + , glAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseGrouplicensesList@ which the +-- 'GrouplicensesList' request conforms to. +type GrouplicensesListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "groupLicenses" :> + Get '[JSON] GroupLicensesListResponse + +-- | Retrieves IDs of all products for which the enterprise has a group +-- license. +-- +-- /See:/ 'grouplicensesList' smart constructor. +data GrouplicensesList = GrouplicensesList + { _glQuotaUser :: !(Maybe Text) + , _glPrettyPrint :: !Bool + , _glEnterpriseId :: !Text + , _glUserIp :: !(Maybe Text) + , _glKey :: !(Maybe Text) + , _glOauthToken :: !(Maybe Text) + , _glFields :: !(Maybe Text) + , _glAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GrouplicensesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glQuotaUser' +-- +-- * 'glPrettyPrint' +-- +-- * 'glEnterpriseId' +-- +-- * 'glUserIp' +-- +-- * 'glKey' +-- +-- * 'glOauthToken' +-- +-- * 'glFields' +-- +-- * 'glAlt' +grouplicensesList + :: Text -- ^ 'enterpriseId' + -> GrouplicensesList +grouplicensesList pGlEnterpriseId_ = + GrouplicensesList + { _glQuotaUser = Nothing + , _glPrettyPrint = True + , _glEnterpriseId = pGlEnterpriseId_ + , _glUserIp = Nothing + , _glKey = Nothing + , _glOauthToken = Nothing + , _glFields = Nothing + , _glAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +glQuotaUser :: Lens' GrouplicensesList' (Maybe Text) +glQuotaUser + = lens _glQuotaUser (\ s a -> s{_glQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +glPrettyPrint :: Lens' GrouplicensesList' Bool +glPrettyPrint + = lens _glPrettyPrint + (\ s a -> s{_glPrettyPrint = a}) + +-- | The ID of the enterprise. +glEnterpriseId :: Lens' GrouplicensesList' Text +glEnterpriseId + = lens _glEnterpriseId + (\ s a -> s{_glEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +glUserIp :: Lens' GrouplicensesList' (Maybe Text) +glUserIp = lens _glUserIp (\ s a -> s{_glUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +glKey :: Lens' GrouplicensesList' (Maybe Text) +glKey = lens _glKey (\ s a -> s{_glKey = a}) + +-- | OAuth 2.0 token for the current user. +glOauthToken :: Lens' GrouplicensesList' (Maybe Text) +glOauthToken + = lens _glOauthToken (\ s a -> s{_glOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +glFields :: Lens' GrouplicensesList' (Maybe Text) +glFields = lens _glFields (\ s a -> s{_glFields = a}) + +-- | Data format for the response. +glAlt :: Lens' GrouplicensesList' Text +glAlt = lens _glAlt (\ s a -> s{_glAlt = a}) + +instance GoogleRequest GrouplicensesList' where + type Rs GrouplicensesList' = + GroupLicensesListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u GrouplicensesList{..} + = go _glQuotaUser _glPrettyPrint _glEnterpriseId + _glUserIp + _glKey + _glOauthToken + _glFields + _glAlt + where go + = clientWithRoute + (Proxy :: Proxy GrouplicensesListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenseusers/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenseusers/List.hs new file mode 100644 index 000000000..7767abdee --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Grouplicenseusers/List.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Grouplicenseusers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the IDs of the users who have been granted entitlements under +-- the license. +-- +-- /See:/ for @AndroidenterpriseGrouplicenseusersList@. +module Androidenterprise.Grouplicenseusers.List + ( + -- * REST Resource + GrouplicenseusersListAPI + + -- * Creating a Request + , grouplicenseusersList + , GrouplicenseusersList + + -- * Request Lenses + , gQuotaUser + , gPrettyPrint + , gEnterpriseId + , gUserIp + , gKey + , gOauthToken + , gGroupLicenseId + , gFields + , gAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseGrouplicenseusersList@ which the +-- 'GrouplicenseusersList' request conforms to. +type GrouplicenseusersListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "groupLicenses" :> + Capture "groupLicenseId" Text :> + "users" :> Get '[JSON] GroupLicenseUsersListResponse + +-- | Retrieves the IDs of the users who have been granted entitlements under +-- the license. +-- +-- /See:/ 'grouplicenseusersList' smart constructor. +data GrouplicenseusersList = GrouplicenseusersList + { _gQuotaUser :: !(Maybe Text) + , _gPrettyPrint :: !Bool + , _gEnterpriseId :: !Text + , _gUserIp :: !(Maybe Text) + , _gKey :: !(Maybe Text) + , _gOauthToken :: !(Maybe Text) + , _gGroupLicenseId :: !Text + , _gFields :: !(Maybe Text) + , _gAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GrouplicenseusersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gQuotaUser' +-- +-- * 'gPrettyPrint' +-- +-- * 'gEnterpriseId' +-- +-- * 'gUserIp' +-- +-- * 'gKey' +-- +-- * 'gOauthToken' +-- +-- * 'gGroupLicenseId' +-- +-- * 'gFields' +-- +-- * 'gAlt' +grouplicenseusersList + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'groupLicenseId' + -> GrouplicenseusersList +grouplicenseusersList pGEnterpriseId_ pGGroupLicenseId_ = + GrouplicenseusersList + { _gQuotaUser = Nothing + , _gPrettyPrint = True + , _gEnterpriseId = pGEnterpriseId_ + , _gUserIp = Nothing + , _gKey = Nothing + , _gOauthToken = Nothing + , _gGroupLicenseId = pGGroupLicenseId_ + , _gFields = Nothing + , _gAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gQuotaUser :: Lens' GrouplicenseusersList' (Maybe Text) +gQuotaUser + = lens _gQuotaUser (\ s a -> s{_gQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gPrettyPrint :: Lens' GrouplicenseusersList' Bool +gPrettyPrint + = lens _gPrettyPrint (\ s a -> s{_gPrettyPrint = a}) + +-- | The ID of the enterprise. +gEnterpriseId :: Lens' GrouplicenseusersList' Text +gEnterpriseId + = lens _gEnterpriseId + (\ s a -> s{_gEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gUserIp :: Lens' GrouplicenseusersList' (Maybe Text) +gUserIp = lens _gUserIp (\ s a -> s{_gUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gKey :: Lens' GrouplicenseusersList' (Maybe Text) +gKey = lens _gKey (\ s a -> s{_gKey = a}) + +-- | OAuth 2.0 token for the current user. +gOauthToken :: Lens' GrouplicenseusersList' (Maybe Text) +gOauthToken + = lens _gOauthToken (\ s a -> s{_gOauthToken = a}) + +-- | The ID of the product the group license is for, e.g. +-- \"app:com.google.android.gm\". +gGroupLicenseId :: Lens' GrouplicenseusersList' Text +gGroupLicenseId + = lens _gGroupLicenseId + (\ s a -> s{_gGroupLicenseId = a}) + +-- | Selector specifying which fields to include in a partial response. +gFields :: Lens' GrouplicenseusersList' (Maybe Text) +gFields = lens _gFields (\ s a -> s{_gFields = a}) + +-- | Data format for the response. +gAlt :: Lens' GrouplicenseusersList' Text +gAlt = lens _gAlt (\ s a -> s{_gAlt = a}) + +instance GoogleRequest GrouplicenseusersList' where + type Rs GrouplicenseusersList' = + GroupLicenseUsersListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u GrouplicenseusersList{..} + = go _gQuotaUser _gPrettyPrint _gEnterpriseId + _gUserIp + _gKey + _gOauthToken + _gGroupLicenseId + _gFields + _gAlt + where go + = clientWithRoute + (Proxy :: Proxy GrouplicenseusersListAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Delete.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Delete.hs new file mode 100644 index 000000000..48e0ea3ed --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Delete.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Installs.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Requests to remove an app from a device. A call to get or list will +-- still show the app as installed on the device until it is actually +-- removed. +-- +-- /See:/ for @AndroidenterpriseInstallsDelete@. +module Androidenterprise.Installs.Delete + ( + -- * REST Resource + InstallsDeleteAPI + + -- * Creating a Request + , installsDelete + , InstallsDelete + + -- * Request Lenses + , idQuotaUser + , idPrettyPrint + , idEnterpriseId + , idUserIp + , idUserId + , idInstallId + , idKey + , idDeviceId + , idOauthToken + , idFields + , idAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseInstallsDelete@ which the +-- 'InstallsDelete' request conforms to. +type InstallsDeleteAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "installs" :> + Capture "installId" Text :> Delete '[JSON] () + +-- | Requests to remove an app from a device. A call to get or list will +-- still show the app as installed on the device until it is actually +-- removed. +-- +-- /See:/ 'installsDelete' smart constructor. +data InstallsDelete = InstallsDelete + { _idQuotaUser :: !(Maybe Text) + , _idPrettyPrint :: !Bool + , _idEnterpriseId :: !Text + , _idUserIp :: !(Maybe Text) + , _idUserId :: !Text + , _idInstallId :: !Text + , _idKey :: !(Maybe Text) + , _idDeviceId :: !Text + , _idOauthToken :: !(Maybe Text) + , _idFields :: !(Maybe Text) + , _idAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idQuotaUser' +-- +-- * 'idPrettyPrint' +-- +-- * 'idEnterpriseId' +-- +-- * 'idUserIp' +-- +-- * 'idUserId' +-- +-- * 'idInstallId' +-- +-- * 'idKey' +-- +-- * 'idDeviceId' +-- +-- * 'idOauthToken' +-- +-- * 'idFields' +-- +-- * 'idAlt' +installsDelete + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'installId' + -> Text -- ^ 'deviceId' + -> InstallsDelete +installsDelete pIdEnterpriseId_ pIdUserId_ pIdInstallId_ pIdDeviceId_ = + InstallsDelete + { _idQuotaUser = Nothing + , _idPrettyPrint = True + , _idEnterpriseId = pIdEnterpriseId_ + , _idUserIp = Nothing + , _idUserId = pIdUserId_ + , _idInstallId = pIdInstallId_ + , _idKey = Nothing + , _idDeviceId = pIdDeviceId_ + , _idOauthToken = Nothing + , _idFields = Nothing + , _idAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +idQuotaUser :: Lens' InstallsDelete' (Maybe Text) +idQuotaUser + = lens _idQuotaUser (\ s a -> s{_idQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +idPrettyPrint :: Lens' InstallsDelete' Bool +idPrettyPrint + = lens _idPrettyPrint + (\ s a -> s{_idPrettyPrint = a}) + +-- | The ID of the enterprise. +idEnterpriseId :: Lens' InstallsDelete' Text +idEnterpriseId + = lens _idEnterpriseId + (\ s a -> s{_idEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +idUserIp :: Lens' InstallsDelete' (Maybe Text) +idUserIp = lens _idUserIp (\ s a -> s{_idUserIp = a}) + +-- | The ID of the user. +idUserId :: Lens' InstallsDelete' Text +idUserId = lens _idUserId (\ s a -> s{_idUserId = a}) + +-- | The ID of the product represented by the install, e.g. +-- \"app:com.google.android.gm\". +idInstallId :: Lens' InstallsDelete' Text +idInstallId + = lens _idInstallId (\ s a -> s{_idInstallId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idKey :: Lens' InstallsDelete' (Maybe Text) +idKey = lens _idKey (\ s a -> s{_idKey = a}) + +-- | The Android ID of the device. +idDeviceId :: Lens' InstallsDelete' Text +idDeviceId + = lens _idDeviceId (\ s a -> s{_idDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +idOauthToken :: Lens' InstallsDelete' (Maybe Text) +idOauthToken + = lens _idOauthToken (\ s a -> s{_idOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +idFields :: Lens' InstallsDelete' (Maybe Text) +idFields = lens _idFields (\ s a -> s{_idFields = a}) + +-- | Data format for the response. +idAlt :: Lens' InstallsDelete' Text +idAlt = lens _idAlt (\ s a -> s{_idAlt = a}) + +instance GoogleRequest InstallsDelete' where + type Rs InstallsDelete' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u InstallsDelete{..} + = go _idQuotaUser _idPrettyPrint _idEnterpriseId + _idUserIp + _idUserId + _idInstallId + _idKey + _idDeviceId + _idOauthToken + _idFields + _idAlt + where go + = clientWithRoute (Proxy :: Proxy InstallsDeleteAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Get.hs new file mode 100644 index 000000000..e94d9ab9a --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Get.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Installs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details of an installation of an app on a device. +-- +-- /See:/ for @AndroidenterpriseInstallsGet@. +module Androidenterprise.Installs.Get + ( + -- * REST Resource + InstallsGetAPI + + -- * Creating a Request + , installsGet + , InstallsGet + + -- * Request Lenses + , igQuotaUser + , igPrettyPrint + , igEnterpriseId + , igUserIp + , igUserId + , igInstallId + , igKey + , igDeviceId + , igOauthToken + , igFields + , igAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseInstallsGet@ which the +-- 'InstallsGet' request conforms to. +type InstallsGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "installs" :> + Capture "installId" Text :> Get '[JSON] Install + +-- | Retrieves details of an installation of an app on a device. +-- +-- /See:/ 'installsGet' smart constructor. +data InstallsGet = InstallsGet + { _igQuotaUser :: !(Maybe Text) + , _igPrettyPrint :: !Bool + , _igEnterpriseId :: !Text + , _igUserIp :: !(Maybe Text) + , _igUserId :: !Text + , _igInstallId :: !Text + , _igKey :: !(Maybe Text) + , _igDeviceId :: !Text + , _igOauthToken :: !(Maybe Text) + , _igFields :: !(Maybe Text) + , _igAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igQuotaUser' +-- +-- * 'igPrettyPrint' +-- +-- * 'igEnterpriseId' +-- +-- * 'igUserIp' +-- +-- * 'igUserId' +-- +-- * 'igInstallId' +-- +-- * 'igKey' +-- +-- * 'igDeviceId' +-- +-- * 'igOauthToken' +-- +-- * 'igFields' +-- +-- * 'igAlt' +installsGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'installId' + -> Text -- ^ 'deviceId' + -> InstallsGet +installsGet pIgEnterpriseId_ pIgUserId_ pIgInstallId_ pIgDeviceId_ = + InstallsGet + { _igQuotaUser = Nothing + , _igPrettyPrint = True + , _igEnterpriseId = pIgEnterpriseId_ + , _igUserIp = Nothing + , _igUserId = pIgUserId_ + , _igInstallId = pIgInstallId_ + , _igKey = Nothing + , _igDeviceId = pIgDeviceId_ + , _igOauthToken = Nothing + , _igFields = Nothing + , _igAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igQuotaUser :: Lens' InstallsGet' (Maybe Text) +igQuotaUser + = lens _igQuotaUser (\ s a -> s{_igQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igPrettyPrint :: Lens' InstallsGet' Bool +igPrettyPrint + = lens _igPrettyPrint + (\ s a -> s{_igPrettyPrint = a}) + +-- | The ID of the enterprise. +igEnterpriseId :: Lens' InstallsGet' Text +igEnterpriseId + = lens _igEnterpriseId + (\ s a -> s{_igEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igUserIp :: Lens' InstallsGet' (Maybe Text) +igUserIp = lens _igUserIp (\ s a -> s{_igUserIp = a}) + +-- | The ID of the user. +igUserId :: Lens' InstallsGet' Text +igUserId = lens _igUserId (\ s a -> s{_igUserId = a}) + +-- | The ID of the product represented by the install, e.g. +-- \"app:com.google.android.gm\". +igInstallId :: Lens' InstallsGet' Text +igInstallId + = lens _igInstallId (\ s a -> s{_igInstallId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igKey :: Lens' InstallsGet' (Maybe Text) +igKey = lens _igKey (\ s a -> s{_igKey = a}) + +-- | The Android ID of the device. +igDeviceId :: Lens' InstallsGet' Text +igDeviceId + = lens _igDeviceId (\ s a -> s{_igDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +igOauthToken :: Lens' InstallsGet' (Maybe Text) +igOauthToken + = lens _igOauthToken (\ s a -> s{_igOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igFields :: Lens' InstallsGet' (Maybe Text) +igFields = lens _igFields (\ s a -> s{_igFields = a}) + +-- | Data format for the response. +igAlt :: Lens' InstallsGet' Text +igAlt = lens _igAlt (\ s a -> s{_igAlt = a}) + +instance GoogleRequest InstallsGet' where + type Rs InstallsGet' = Install + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u InstallsGet{..} + = go _igQuotaUser _igPrettyPrint _igEnterpriseId + _igUserIp + _igUserId + _igInstallId + _igKey + _igDeviceId + _igOauthToken + _igFields + _igAlt + where go + = clientWithRoute (Proxy :: Proxy InstallsGetAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/List.hs new file mode 100644 index 000000000..a853b6a57 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/List.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Installs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the details of all apps installed on the specified device. +-- +-- /See:/ for @AndroidenterpriseInstallsList@. +module Androidenterprise.Installs.List + ( + -- * REST Resource + InstallsListAPI + + -- * Creating a Request + , installsList + , InstallsList + + -- * Request Lenses + , ilQuotaUser + , ilPrettyPrint + , ilEnterpriseId + , ilUserIp + , ilUserId + , ilKey + , ilDeviceId + , ilOauthToken + , ilFields + , ilAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseInstallsList@ which the +-- 'InstallsList' request conforms to. +type InstallsListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "installs" :> Get '[JSON] InstallsListResponse + +-- | Retrieves the details of all apps installed on the specified device. +-- +-- /See:/ 'installsList' smart constructor. +data InstallsList = InstallsList + { _ilQuotaUser :: !(Maybe Text) + , _ilPrettyPrint :: !Bool + , _ilEnterpriseId :: !Text + , _ilUserIp :: !(Maybe Text) + , _ilUserId :: !Text + , _ilKey :: !(Maybe Text) + , _ilDeviceId :: !Text + , _ilOauthToken :: !(Maybe Text) + , _ilFields :: !(Maybe Text) + , _ilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilQuotaUser' +-- +-- * 'ilPrettyPrint' +-- +-- * 'ilEnterpriseId' +-- +-- * 'ilUserIp' +-- +-- * 'ilUserId' +-- +-- * 'ilKey' +-- +-- * 'ilDeviceId' +-- +-- * 'ilOauthToken' +-- +-- * 'ilFields' +-- +-- * 'ilAlt' +installsList + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'deviceId' + -> InstallsList +installsList pIlEnterpriseId_ pIlUserId_ pIlDeviceId_ = + InstallsList + { _ilQuotaUser = Nothing + , _ilPrettyPrint = True + , _ilEnterpriseId = pIlEnterpriseId_ + , _ilUserIp = Nothing + , _ilUserId = pIlUserId_ + , _ilKey = Nothing + , _ilDeviceId = pIlDeviceId_ + , _ilOauthToken = Nothing + , _ilFields = Nothing + , _ilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ilQuotaUser :: Lens' InstallsList' (Maybe Text) +ilQuotaUser + = lens _ilQuotaUser (\ s a -> s{_ilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ilPrettyPrint :: Lens' InstallsList' Bool +ilPrettyPrint + = lens _ilPrettyPrint + (\ s a -> s{_ilPrettyPrint = a}) + +-- | The ID of the enterprise. +ilEnterpriseId :: Lens' InstallsList' Text +ilEnterpriseId + = lens _ilEnterpriseId + (\ s a -> s{_ilEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ilUserIp :: Lens' InstallsList' (Maybe Text) +ilUserIp = lens _ilUserIp (\ s a -> s{_ilUserIp = a}) + +-- | The ID of the user. +ilUserId :: Lens' InstallsList' Text +ilUserId = lens _ilUserId (\ s a -> s{_ilUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ilKey :: Lens' InstallsList' (Maybe Text) +ilKey = lens _ilKey (\ s a -> s{_ilKey = a}) + +-- | The Android ID of the device. +ilDeviceId :: Lens' InstallsList' Text +ilDeviceId + = lens _ilDeviceId (\ s a -> s{_ilDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +ilOauthToken :: Lens' InstallsList' (Maybe Text) +ilOauthToken + = lens _ilOauthToken (\ s a -> s{_ilOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ilFields :: Lens' InstallsList' (Maybe Text) +ilFields = lens _ilFields (\ s a -> s{_ilFields = a}) + +-- | Data format for the response. +ilAlt :: Lens' InstallsList' Text +ilAlt = lens _ilAlt (\ s a -> s{_ilAlt = a}) + +instance GoogleRequest InstallsList' where + type Rs InstallsList' = InstallsListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u InstallsList{..} + = go _ilQuotaUser _ilPrettyPrint _ilEnterpriseId + _ilUserIp + _ilUserId + _ilKey + _ilDeviceId + _ilOauthToken + _ilFields + _ilAlt + where go + = clientWithRoute (Proxy :: Proxy InstallsListAPI) r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Patch.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Patch.hs new file mode 100644 index 000000000..276303539 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Patch.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Installs.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Requests to install the latest version of an app to a device. If the app +-- is already installed then it is updated to the latest version if +-- necessary. This method supports patch semantics. +-- +-- /See:/ for @AndroidenterpriseInstallsPatch@. +module Androidenterprise.Installs.Patch + ( + -- * REST Resource + InstallsPatchAPI + + -- * Creating a Request + , installsPatch + , InstallsPatch + + -- * Request Lenses + , ipQuotaUser + , ipPrettyPrint + , ipEnterpriseId + , ipUserIp + , ipUserId + , ipInstallId + , ipKey + , ipDeviceId + , ipOauthToken + , ipFields + , ipAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseInstallsPatch@ which the +-- 'InstallsPatch' request conforms to. +type InstallsPatchAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "installs" :> + Capture "installId" Text :> Patch '[JSON] Install + +-- | Requests to install the latest version of an app to a device. If the app +-- is already installed then it is updated to the latest version if +-- necessary. This method supports patch semantics. +-- +-- /See:/ 'installsPatch' smart constructor. +data InstallsPatch = InstallsPatch + { _ipQuotaUser :: !(Maybe Text) + , _ipPrettyPrint :: !Bool + , _ipEnterpriseId :: !Text + , _ipUserIp :: !(Maybe Text) + , _ipUserId :: !Text + , _ipInstallId :: !Text + , _ipKey :: !(Maybe Text) + , _ipDeviceId :: !Text + , _ipOauthToken :: !(Maybe Text) + , _ipFields :: !(Maybe Text) + , _ipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipQuotaUser' +-- +-- * 'ipPrettyPrint' +-- +-- * 'ipEnterpriseId' +-- +-- * 'ipUserIp' +-- +-- * 'ipUserId' +-- +-- * 'ipInstallId' +-- +-- * 'ipKey' +-- +-- * 'ipDeviceId' +-- +-- * 'ipOauthToken' +-- +-- * 'ipFields' +-- +-- * 'ipAlt' +installsPatch + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'installId' + -> Text -- ^ 'deviceId' + -> InstallsPatch +installsPatch pIpEnterpriseId_ pIpUserId_ pIpInstallId_ pIpDeviceId_ = + InstallsPatch + { _ipQuotaUser = Nothing + , _ipPrettyPrint = True + , _ipEnterpriseId = pIpEnterpriseId_ + , _ipUserIp = Nothing + , _ipUserId = pIpUserId_ + , _ipInstallId = pIpInstallId_ + , _ipKey = Nothing + , _ipDeviceId = pIpDeviceId_ + , _ipOauthToken = Nothing + , _ipFields = Nothing + , _ipAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ipQuotaUser :: Lens' InstallsPatch' (Maybe Text) +ipQuotaUser + = lens _ipQuotaUser (\ s a -> s{_ipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ipPrettyPrint :: Lens' InstallsPatch' Bool +ipPrettyPrint + = lens _ipPrettyPrint + (\ s a -> s{_ipPrettyPrint = a}) + +-- | The ID of the enterprise. +ipEnterpriseId :: Lens' InstallsPatch' Text +ipEnterpriseId + = lens _ipEnterpriseId + (\ s a -> s{_ipEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ipUserIp :: Lens' InstallsPatch' (Maybe Text) +ipUserIp = lens _ipUserIp (\ s a -> s{_ipUserIp = a}) + +-- | The ID of the user. +ipUserId :: Lens' InstallsPatch' Text +ipUserId = lens _ipUserId (\ s a -> s{_ipUserId = a}) + +-- | The ID of the product represented by the install, e.g. +-- \"app:com.google.android.gm\". +ipInstallId :: Lens' InstallsPatch' Text +ipInstallId + = lens _ipInstallId (\ s a -> s{_ipInstallId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ipKey :: Lens' InstallsPatch' (Maybe Text) +ipKey = lens _ipKey (\ s a -> s{_ipKey = a}) + +-- | The Android ID of the device. +ipDeviceId :: Lens' InstallsPatch' Text +ipDeviceId + = lens _ipDeviceId (\ s a -> s{_ipDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +ipOauthToken :: Lens' InstallsPatch' (Maybe Text) +ipOauthToken + = lens _ipOauthToken (\ s a -> s{_ipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ipFields :: Lens' InstallsPatch' (Maybe Text) +ipFields = lens _ipFields (\ s a -> s{_ipFields = a}) + +-- | Data format for the response. +ipAlt :: Lens' InstallsPatch' Text +ipAlt = lens _ipAlt (\ s a -> s{_ipAlt = a}) + +instance GoogleRequest InstallsPatch' where + type Rs InstallsPatch' = Install + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u InstallsPatch{..} + = go _ipQuotaUser _ipPrettyPrint _ipEnterpriseId + _ipUserIp + _ipUserId + _ipInstallId + _ipKey + _ipDeviceId + _ipOauthToken + _ipFields + _ipAlt + where go + = clientWithRoute (Proxy :: Proxy InstallsPatchAPI) r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Update.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Update.hs new file mode 100644 index 000000000..6864dbd54 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Installs/Update.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Installs.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Requests to install the latest version of an app to a device. If the app +-- is already installed then it is updated to the latest version if +-- necessary. +-- +-- /See:/ for @AndroidenterpriseInstallsUpdate@. +module Androidenterprise.Installs.Update + ( + -- * REST Resource + InstallsUpdateAPI + + -- * Creating a Request + , installsUpdate + , InstallsUpdate + + -- * Request Lenses + , iuQuotaUser + , iuPrettyPrint + , iuEnterpriseId + , iuUserIp + , iuUserId + , iuInstallId + , iuKey + , iuDeviceId + , iuOauthToken + , iuFields + , iuAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseInstallsUpdate@ which the +-- 'InstallsUpdate' request conforms to. +type InstallsUpdateAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "devices" :> + Capture "deviceId" Text :> + "installs" :> + Capture "installId" Text :> Put '[JSON] Install + +-- | Requests to install the latest version of an app to a device. If the app +-- is already installed then it is updated to the latest version if +-- necessary. +-- +-- /See:/ 'installsUpdate' smart constructor. +data InstallsUpdate = InstallsUpdate + { _iuQuotaUser :: !(Maybe Text) + , _iuPrettyPrint :: !Bool + , _iuEnterpriseId :: !Text + , _iuUserIp :: !(Maybe Text) + , _iuUserId :: !Text + , _iuInstallId :: !Text + , _iuKey :: !(Maybe Text) + , _iuDeviceId :: !Text + , _iuOauthToken :: !(Maybe Text) + , _iuFields :: !(Maybe Text) + , _iuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstallsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iuQuotaUser' +-- +-- * 'iuPrettyPrint' +-- +-- * 'iuEnterpriseId' +-- +-- * 'iuUserIp' +-- +-- * 'iuUserId' +-- +-- * 'iuInstallId' +-- +-- * 'iuKey' +-- +-- * 'iuDeviceId' +-- +-- * 'iuOauthToken' +-- +-- * 'iuFields' +-- +-- * 'iuAlt' +installsUpdate + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> Text -- ^ 'installId' + -> Text -- ^ 'deviceId' + -> InstallsUpdate +installsUpdate pIuEnterpriseId_ pIuUserId_ pIuInstallId_ pIuDeviceId_ = + InstallsUpdate + { _iuQuotaUser = Nothing + , _iuPrettyPrint = True + , _iuEnterpriseId = pIuEnterpriseId_ + , _iuUserIp = Nothing + , _iuUserId = pIuUserId_ + , _iuInstallId = pIuInstallId_ + , _iuKey = Nothing + , _iuDeviceId = pIuDeviceId_ + , _iuOauthToken = Nothing + , _iuFields = Nothing + , _iuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iuQuotaUser :: Lens' InstallsUpdate' (Maybe Text) +iuQuotaUser + = lens _iuQuotaUser (\ s a -> s{_iuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iuPrettyPrint :: Lens' InstallsUpdate' Bool +iuPrettyPrint + = lens _iuPrettyPrint + (\ s a -> s{_iuPrettyPrint = a}) + +-- | The ID of the enterprise. +iuEnterpriseId :: Lens' InstallsUpdate' Text +iuEnterpriseId + = lens _iuEnterpriseId + (\ s a -> s{_iuEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iuUserIp :: Lens' InstallsUpdate' (Maybe Text) +iuUserIp = lens _iuUserIp (\ s a -> s{_iuUserIp = a}) + +-- | The ID of the user. +iuUserId :: Lens' InstallsUpdate' Text +iuUserId = lens _iuUserId (\ s a -> s{_iuUserId = a}) + +-- | The ID of the product represented by the install, e.g. +-- \"app:com.google.android.gm\". +iuInstallId :: Lens' InstallsUpdate' Text +iuInstallId + = lens _iuInstallId (\ s a -> s{_iuInstallId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iuKey :: Lens' InstallsUpdate' (Maybe Text) +iuKey = lens _iuKey (\ s a -> s{_iuKey = a}) + +-- | The Android ID of the device. +iuDeviceId :: Lens' InstallsUpdate' Text +iuDeviceId + = lens _iuDeviceId (\ s a -> s{_iuDeviceId = a}) + +-- | OAuth 2.0 token for the current user. +iuOauthToken :: Lens' InstallsUpdate' (Maybe Text) +iuOauthToken + = lens _iuOauthToken (\ s a -> s{_iuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iuFields :: Lens' InstallsUpdate' (Maybe Text) +iuFields = lens _iuFields (\ s a -> s{_iuFields = a}) + +-- | Data format for the response. +iuAlt :: Lens' InstallsUpdate' Text +iuAlt = lens _iuAlt (\ s a -> s{_iuAlt = a}) + +instance GoogleRequest InstallsUpdate' where + type Rs InstallsUpdate' = Install + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u InstallsUpdate{..} + = go _iuQuotaUser _iuPrettyPrint _iuEnterpriseId + _iuUserIp + _iuUserId + _iuInstallId + _iuKey + _iuDeviceId + _iuOauthToken + _iuFields + _iuAlt + where go + = clientWithRoute (Proxy :: Proxy InstallsUpdateAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Permissions/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Permissions/Get.hs new file mode 100644 index 000000000..8b545fd91 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Permissions/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Permissions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details of an Android app permission for display to an +-- enterprise admin. +-- +-- /See:/ for @AndroidenterprisePermissionsGet@. +module Androidenterprise.Permissions.Get + ( + -- * REST Resource + PermissionsGetAPI + + -- * Creating a Request + , permissionsGet + , PermissionsGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgKey + , pgLanguage + , pgOauthToken + , pgPermissionId + , pgFields + , pgAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterprisePermissionsGet@ which the +-- 'PermissionsGet' request conforms to. +type PermissionsGetAPI = + "permissions" :> + Capture "permissionId" Text :> + QueryParam "language" Text :> Get '[JSON] Permission + +-- | Retrieves details of an Android app permission for display to an +-- enterprise admin. +-- +-- /See:/ 'permissionsGet' smart constructor. +data PermissionsGet = PermissionsGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgLanguage :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgPermissionId :: !Text + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PermissionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgKey' +-- +-- * 'pgLanguage' +-- +-- * 'pgOauthToken' +-- +-- * 'pgPermissionId' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +permissionsGet + :: Text -- ^ 'permissionId' + -> PermissionsGet +permissionsGet pPgPermissionId_ = + PermissionsGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgKey = Nothing + , _pgLanguage = Nothing + , _pgOauthToken = Nothing + , _pgPermissionId = pPgPermissionId_ + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PermissionsGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PermissionsGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PermissionsGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PermissionsGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | The BCP47 tag for the user\'s preferred language (e.g. \"en-US\", +-- \"de\") +pgLanguage :: Lens' PermissionsGet' (Maybe Text) +pgLanguage + = lens _pgLanguage (\ s a -> s{_pgLanguage = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PermissionsGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | The ID of the permission. +pgPermissionId :: Lens' PermissionsGet' Text +pgPermissionId + = lens _pgPermissionId + (\ s a -> s{_pgPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PermissionsGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PermissionsGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PermissionsGet' where + type Rs PermissionsGet' = Permission + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u PermissionsGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgKey + _pgLanguage + _pgOauthToken + _pgPermissionId + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PermissionsGetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Approve.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Approve.hs new file mode 100644 index 000000000..4797c1f3f --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Approve.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.Approve +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Approves the specified product (and the relevant app permissions, if +-- any). +-- +-- /See:/ for @AndroidenterpriseProductsApprove@. +module Androidenterprise.Products.Approve + ( + -- * REST Resource + ProductsApproveAPI + + -- * Creating a Request + , productsApprove + , ProductsApprove + + -- * Request Lenses + , paQuotaUser + , paPrettyPrint + , paEnterpriseId + , paUserIp + , paKey + , paOauthToken + , paProductId + , paFields + , paAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsApprove@ which the +-- 'ProductsApprove' request conforms to. +type ProductsApproveAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + "approve" :> Post '[JSON] () + +-- | Approves the specified product (and the relevant app permissions, if +-- any). +-- +-- /See:/ 'productsApprove' smart constructor. +data ProductsApprove = ProductsApprove + { _paQuotaUser :: !(Maybe Text) + , _paPrettyPrint :: !Bool + , _paEnterpriseId :: !Text + , _paUserIp :: !(Maybe Text) + , _paKey :: !(Maybe Text) + , _paOauthToken :: !(Maybe Text) + , _paProductId :: !Text + , _paFields :: !(Maybe Text) + , _paAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsApprove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'paQuotaUser' +-- +-- * 'paPrettyPrint' +-- +-- * 'paEnterpriseId' +-- +-- * 'paUserIp' +-- +-- * 'paKey' +-- +-- * 'paOauthToken' +-- +-- * 'paProductId' +-- +-- * 'paFields' +-- +-- * 'paAlt' +productsApprove + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsApprove +productsApprove pPaEnterpriseId_ pPaProductId_ = + ProductsApprove + { _paQuotaUser = Nothing + , _paPrettyPrint = True + , _paEnterpriseId = pPaEnterpriseId_ + , _paUserIp = Nothing + , _paKey = Nothing + , _paOauthToken = Nothing + , _paProductId = pPaProductId_ + , _paFields = Nothing + , _paAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +paQuotaUser :: Lens' ProductsApprove' (Maybe Text) +paQuotaUser + = lens _paQuotaUser (\ s a -> s{_paQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +paPrettyPrint :: Lens' ProductsApprove' Bool +paPrettyPrint + = lens _paPrettyPrint + (\ s a -> s{_paPrettyPrint = a}) + +-- | The ID of the enterprise. +paEnterpriseId :: Lens' ProductsApprove' Text +paEnterpriseId + = lens _paEnterpriseId + (\ s a -> s{_paEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +paUserIp :: Lens' ProductsApprove' (Maybe Text) +paUserIp = lens _paUserIp (\ s a -> s{_paUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +paKey :: Lens' ProductsApprove' (Maybe Text) +paKey = lens _paKey (\ s a -> s{_paKey = a}) + +-- | OAuth 2.0 token for the current user. +paOauthToken :: Lens' ProductsApprove' (Maybe Text) +paOauthToken + = lens _paOauthToken (\ s a -> s{_paOauthToken = a}) + +-- | The ID of the product. +paProductId :: Lens' ProductsApprove' Text +paProductId + = lens _paProductId (\ s a -> s{_paProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +paFields :: Lens' ProductsApprove' (Maybe Text) +paFields = lens _paFields (\ s a -> s{_paFields = a}) + +-- | Data format for the response. +paAlt :: Lens' ProductsApprove' Text +paAlt = lens _paAlt (\ s a -> s{_paAlt = a}) + +instance GoogleRequest ProductsApprove' where + type Rs ProductsApprove' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u ProductsApprove{..} + = go _paQuotaUser _paPrettyPrint _paEnterpriseId + _paUserIp + _paKey + _paOauthToken + _paProductId + _paFields + _paAlt + where go + = clientWithRoute (Proxy :: Proxy ProductsApproveAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GenerateApprovalURL.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GenerateApprovalURL.hs new file mode 100644 index 000000000..f136b5f2a --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GenerateApprovalURL.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.GenerateApprovalURL +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates a URL that can be rendered in an iframe to display the +-- permissions (if any) of a product. An enterprise admin must view these +-- permissions and accept them on behalf of their organization in order to +-- approve that product. Admins should accept the displayed permissions by +-- interacting with a separate UI element in the EMM console, which in turn +-- should trigger the use of this URL as the approvalUrlInfo.approvalUrl +-- property in a Products.approve call to approve the product. This URL can +-- only be used to display permissions for up to 1 day. +-- +-- /See:/ for @AndroidenterpriseProductsGenerateApprovalURL@. +module Androidenterprise.Products.GenerateApprovalURL + ( + -- * REST Resource + ProductsGenerateApprovalURLAPI + + -- * Creating a Request + , productsGenerateApprovalURL + , ProductsGenerateApprovalURL + + -- * Request Lenses + , pgauQuotaUser + , pgauLanguageCode + , pgauPrettyPrint + , pgauEnterpriseId + , pgauUserIp + , pgauKey + , pgauOauthToken + , pgauProductId + , pgauFields + , pgauAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsGenerateApprovalURL@ which the +-- 'ProductsGenerateApprovalURL' request conforms to. +type ProductsGenerateApprovalURLAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + "generateApprovalUrl" :> + QueryParam "languageCode" Text :> + Post '[JSON] ProductsGenerateApprovalURLResponse + +-- | Generates a URL that can be rendered in an iframe to display the +-- permissions (if any) of a product. An enterprise admin must view these +-- permissions and accept them on behalf of their organization in order to +-- approve that product. Admins should accept the displayed permissions by +-- interacting with a separate UI element in the EMM console, which in turn +-- should trigger the use of this URL as the approvalUrlInfo.approvalUrl +-- property in a Products.approve call to approve the product. This URL can +-- only be used to display permissions for up to 1 day. +-- +-- /See:/ 'productsGenerateApprovalURL' smart constructor. +data ProductsGenerateApprovalURL = ProductsGenerateApprovalURL + { _pgauQuotaUser :: !(Maybe Text) + , _pgauLanguageCode :: !(Maybe Text) + , _pgauPrettyPrint :: !Bool + , _pgauEnterpriseId :: !Text + , _pgauUserIp :: !(Maybe Text) + , _pgauKey :: !(Maybe Text) + , _pgauOauthToken :: !(Maybe Text) + , _pgauProductId :: !Text + , _pgauFields :: !(Maybe Text) + , _pgauAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsGenerateApprovalURL'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgauQuotaUser' +-- +-- * 'pgauLanguageCode' +-- +-- * 'pgauPrettyPrint' +-- +-- * 'pgauEnterpriseId' +-- +-- * 'pgauUserIp' +-- +-- * 'pgauKey' +-- +-- * 'pgauOauthToken' +-- +-- * 'pgauProductId' +-- +-- * 'pgauFields' +-- +-- * 'pgauAlt' +productsGenerateApprovalURL + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsGenerateApprovalURL +productsGenerateApprovalURL pPgauEnterpriseId_ pPgauProductId_ = + ProductsGenerateApprovalURL + { _pgauQuotaUser = Nothing + , _pgauLanguageCode = Nothing + , _pgauPrettyPrint = True + , _pgauEnterpriseId = pPgauEnterpriseId_ + , _pgauUserIp = Nothing + , _pgauKey = Nothing + , _pgauOauthToken = Nothing + , _pgauProductId = pPgauProductId_ + , _pgauFields = Nothing + , _pgauAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgauQuotaUser :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauQuotaUser + = lens _pgauQuotaUser + (\ s a -> s{_pgauQuotaUser = a}) + +-- | The BCP 47 language code used for permission names and descriptions in +-- the returned iframe, for instance \"en-US\". +pgauLanguageCode :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauLanguageCode + = lens _pgauLanguageCode + (\ s a -> s{_pgauLanguageCode = a}) + +-- | Returns response with indentations and line breaks. +pgauPrettyPrint :: Lens' ProductsGenerateApprovalURL' Bool +pgauPrettyPrint + = lens _pgauPrettyPrint + (\ s a -> s{_pgauPrettyPrint = a}) + +-- | The ID of the enterprise. +pgauEnterpriseId :: Lens' ProductsGenerateApprovalURL' Text +pgauEnterpriseId + = lens _pgauEnterpriseId + (\ s a -> s{_pgauEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgauUserIp :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauUserIp + = lens _pgauUserIp (\ s a -> s{_pgauUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgauKey :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauKey = lens _pgauKey (\ s a -> s{_pgauKey = a}) + +-- | OAuth 2.0 token for the current user. +pgauOauthToken :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauOauthToken + = lens _pgauOauthToken + (\ s a -> s{_pgauOauthToken = a}) + +-- | The ID of the product. +pgauProductId :: Lens' ProductsGenerateApprovalURL' Text +pgauProductId + = lens _pgauProductId + (\ s a -> s{_pgauProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgauFields :: Lens' ProductsGenerateApprovalURL' (Maybe Text) +pgauFields + = lens _pgauFields (\ s a -> s{_pgauFields = a}) + +-- | Data format for the response. +pgauAlt :: Lens' ProductsGenerateApprovalURL' Text +pgauAlt = lens _pgauAlt (\ s a -> s{_pgauAlt = a}) + +instance GoogleRequest ProductsGenerateApprovalURL' + where + type Rs ProductsGenerateApprovalURL' = + ProductsGenerateApprovalURLResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u ProductsGenerateApprovalURL{..} + = go _pgauQuotaUser _pgauLanguageCode + _pgauPrettyPrint + _pgauEnterpriseId + _pgauUserIp + _pgauKey + _pgauOauthToken + _pgauProductId + _pgauFields + _pgauAlt + where go + = clientWithRoute + (Proxy :: Proxy ProductsGenerateApprovalURLAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Get.hs new file mode 100644 index 000000000..6275c2831 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/Get.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details of a product for display to an enterprise admin. +-- +-- /See:/ for @AndroidenterpriseProductsGet@. +module Androidenterprise.Products.Get + ( + -- * REST Resource + ProductsGetAPI + + -- * Creating a Request + , productsGet + , ProductsGet + + -- * Request Lenses + , pQuotaUser + , pPrettyPrint + , pEnterpriseId + , pUserIp + , pKey + , pLanguage + , pOauthToken + , pProductId + , pFields + , pAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsGet@ which the +-- 'ProductsGet' request conforms to. +type ProductsGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + QueryParam "language" Text :> Get '[JSON] Product + +-- | Retrieves details of a product for display to an enterprise admin. +-- +-- /See:/ 'productsGet' smart constructor. +data ProductsGet = ProductsGet + { _pQuotaUser :: !(Maybe Text) + , _pPrettyPrint :: !Bool + , _pEnterpriseId :: !Text + , _pUserIp :: !(Maybe Text) + , _pKey :: !(Maybe Text) + , _pLanguage :: !(Maybe Text) + , _pOauthToken :: !(Maybe Text) + , _pProductId :: !Text + , _pFields :: !(Maybe Text) + , _pAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pQuotaUser' +-- +-- * 'pPrettyPrint' +-- +-- * 'pEnterpriseId' +-- +-- * 'pUserIp' +-- +-- * 'pKey' +-- +-- * 'pLanguage' +-- +-- * 'pOauthToken' +-- +-- * 'pProductId' +-- +-- * 'pFields' +-- +-- * 'pAlt' +productsGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsGet +productsGet pPEnterpriseId_ pPProductId_ = + ProductsGet + { _pQuotaUser = Nothing + , _pPrettyPrint = True + , _pEnterpriseId = pPEnterpriseId_ + , _pUserIp = Nothing + , _pKey = Nothing + , _pLanguage = Nothing + , _pOauthToken = Nothing + , _pProductId = pPProductId_ + , _pFields = Nothing + , _pAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pQuotaUser :: Lens' ProductsGet' (Maybe Text) +pQuotaUser + = lens _pQuotaUser (\ s a -> s{_pQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pPrettyPrint :: Lens' ProductsGet' Bool +pPrettyPrint + = lens _pPrettyPrint (\ s a -> s{_pPrettyPrint = a}) + +-- | The ID of the enterprise. +pEnterpriseId :: Lens' ProductsGet' Text +pEnterpriseId + = lens _pEnterpriseId + (\ s a -> s{_pEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pUserIp :: Lens' ProductsGet' (Maybe Text) +pUserIp = lens _pUserIp (\ s a -> s{_pUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pKey :: Lens' ProductsGet' (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | The BCP47 tag for the user\'s preferred language (e.g. \"en-US\", +-- \"de\"). +pLanguage :: Lens' ProductsGet' (Maybe Text) +pLanguage + = lens _pLanguage (\ s a -> s{_pLanguage = a}) + +-- | OAuth 2.0 token for the current user. +pOauthToken :: Lens' ProductsGet' (Maybe Text) +pOauthToken + = lens _pOauthToken (\ s a -> s{_pOauthToken = a}) + +-- | The ID of the product, e.g. \"app:com.google.android.gm\". +pProductId :: Lens' ProductsGet' Text +pProductId + = lens _pProductId (\ s a -> s{_pProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +pFields :: Lens' ProductsGet' (Maybe Text) +pFields = lens _pFields (\ s a -> s{_pFields = a}) + +-- | Data format for the response. +pAlt :: Lens' ProductsGet' Text +pAlt = lens _pAlt (\ s a -> s{_pAlt = a}) + +instance GoogleRequest ProductsGet' where + type Rs ProductsGet' = Product + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u ProductsGet{..} + = go _pQuotaUser _pPrettyPrint _pEnterpriseId + _pUserIp + _pKey + _pLanguage + _pOauthToken + _pProductId + _pFields + _pAlt + where go + = clientWithRoute (Proxy :: Proxy ProductsGetAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetAppRestrictionsSchema.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetAppRestrictionsSchema.hs new file mode 100644 index 000000000..4587c4904 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetAppRestrictionsSchema.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.GetAppRestrictionsSchema +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the schema defining app restrictions configurable for this +-- product. All products have a schema, but this may be empty if no app +-- restrictions are defined. +-- +-- /See:/ for @AndroidenterpriseProductsGetAppRestrictionsSchema@. +module Androidenterprise.Products.GetAppRestrictionsSchema + ( + -- * REST Resource + ProductsGetAppRestrictionsSchemaAPI + + -- * Creating a Request + , productsGetAppRestrictionsSchema + , ProductsGetAppRestrictionsSchema + + -- * Request Lenses + , pgarsQuotaUser + , pgarsPrettyPrint + , pgarsEnterpriseId + , pgarsUserIp + , pgarsKey + , pgarsLanguage + , pgarsOauthToken + , pgarsProductId + , pgarsFields + , pgarsAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsGetAppRestrictionsSchema@ which the +-- 'ProductsGetAppRestrictionsSchema' request conforms to. +type ProductsGetAppRestrictionsSchemaAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + "appRestrictionsSchema" :> + QueryParam "language" Text :> + Get '[JSON] AppRestrictionsSchema + +-- | Retrieves the schema defining app restrictions configurable for this +-- product. All products have a schema, but this may be empty if no app +-- restrictions are defined. +-- +-- /See:/ 'productsGetAppRestrictionsSchema' smart constructor. +data ProductsGetAppRestrictionsSchema = ProductsGetAppRestrictionsSchema + { _pgarsQuotaUser :: !(Maybe Text) + , _pgarsPrettyPrint :: !Bool + , _pgarsEnterpriseId :: !Text + , _pgarsUserIp :: !(Maybe Text) + , _pgarsKey :: !(Maybe Text) + , _pgarsLanguage :: !(Maybe Text) + , _pgarsOauthToken :: !(Maybe Text) + , _pgarsProductId :: !Text + , _pgarsFields :: !(Maybe Text) + , _pgarsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsGetAppRestrictionsSchema'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgarsQuotaUser' +-- +-- * 'pgarsPrettyPrint' +-- +-- * 'pgarsEnterpriseId' +-- +-- * 'pgarsUserIp' +-- +-- * 'pgarsKey' +-- +-- * 'pgarsLanguage' +-- +-- * 'pgarsOauthToken' +-- +-- * 'pgarsProductId' +-- +-- * 'pgarsFields' +-- +-- * 'pgarsAlt' +productsGetAppRestrictionsSchema + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsGetAppRestrictionsSchema +productsGetAppRestrictionsSchema pPgarsEnterpriseId_ pPgarsProductId_ = + ProductsGetAppRestrictionsSchema + { _pgarsQuotaUser = Nothing + , _pgarsPrettyPrint = True + , _pgarsEnterpriseId = pPgarsEnterpriseId_ + , _pgarsUserIp = Nothing + , _pgarsKey = Nothing + , _pgarsLanguage = Nothing + , _pgarsOauthToken = Nothing + , _pgarsProductId = pPgarsProductId_ + , _pgarsFields = Nothing + , _pgarsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgarsQuotaUser :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsQuotaUser + = lens _pgarsQuotaUser + (\ s a -> s{_pgarsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgarsPrettyPrint :: Lens' ProductsGetAppRestrictionsSchema' Bool +pgarsPrettyPrint + = lens _pgarsPrettyPrint + (\ s a -> s{_pgarsPrettyPrint = a}) + +-- | The ID of the enterprise. +pgarsEnterpriseId :: Lens' ProductsGetAppRestrictionsSchema' Text +pgarsEnterpriseId + = lens _pgarsEnterpriseId + (\ s a -> s{_pgarsEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgarsUserIp :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsUserIp + = lens _pgarsUserIp (\ s a -> s{_pgarsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgarsKey :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsKey = lens _pgarsKey (\ s a -> s{_pgarsKey = a}) + +-- | The BCP47 tag for the user\'s preferred language (e.g. \"en-US\", +-- \"de\"). +pgarsLanguage :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsLanguage + = lens _pgarsLanguage + (\ s a -> s{_pgarsLanguage = a}) + +-- | OAuth 2.0 token for the current user. +pgarsOauthToken :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsOauthToken + = lens _pgarsOauthToken + (\ s a -> s{_pgarsOauthToken = a}) + +-- | The ID of the product. +pgarsProductId :: Lens' ProductsGetAppRestrictionsSchema' Text +pgarsProductId + = lens _pgarsProductId + (\ s a -> s{_pgarsProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgarsFields :: Lens' ProductsGetAppRestrictionsSchema' (Maybe Text) +pgarsFields + = lens _pgarsFields (\ s a -> s{_pgarsFields = a}) + +-- | Data format for the response. +pgarsAlt :: Lens' ProductsGetAppRestrictionsSchema' Text +pgarsAlt = lens _pgarsAlt (\ s a -> s{_pgarsAlt = a}) + +instance GoogleRequest + ProductsGetAppRestrictionsSchema' where + type Rs ProductsGetAppRestrictionsSchema' = + AppRestrictionsSchema + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u + ProductsGetAppRestrictionsSchema{..} + = go _pgarsQuotaUser _pgarsPrettyPrint + _pgarsEnterpriseId + _pgarsUserIp + _pgarsKey + _pgarsLanguage + _pgarsOauthToken + _pgarsProductId + _pgarsFields + _pgarsAlt + where go + = clientWithRoute + (Proxy :: Proxy ProductsGetAppRestrictionsSchemaAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetPermissions.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetPermissions.hs new file mode 100644 index 000000000..3f34301a0 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/GetPermissions.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.GetPermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the Android app permissions required by this app. +-- +-- /See:/ for @AndroidenterpriseProductsGetPermissions@. +module Androidenterprise.Products.GetPermissions + ( + -- * REST Resource + ProductsGetPermissionsAPI + + -- * Creating a Request + , productsGetPermissions + , ProductsGetPermissions + + -- * Request Lenses + , pgpQuotaUser + , pgpPrettyPrint + , pgpEnterpriseId + , pgpUserIp + , pgpKey + , pgpOauthToken + , pgpProductId + , pgpFields + , pgpAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsGetPermissions@ which the +-- 'ProductsGetPermissions' request conforms to. +type ProductsGetPermissionsAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + "permissions" :> Get '[JSON] ProductPermissions + +-- | Retrieves the Android app permissions required by this app. +-- +-- /See:/ 'productsGetPermissions' smart constructor. +data ProductsGetPermissions = ProductsGetPermissions + { _pgpQuotaUser :: !(Maybe Text) + , _pgpPrettyPrint :: !Bool + , _pgpEnterpriseId :: !Text + , _pgpUserIp :: !(Maybe Text) + , _pgpKey :: !(Maybe Text) + , _pgpOauthToken :: !(Maybe Text) + , _pgpProductId :: !Text + , _pgpFields :: !(Maybe Text) + , _pgpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsGetPermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgpQuotaUser' +-- +-- * 'pgpPrettyPrint' +-- +-- * 'pgpEnterpriseId' +-- +-- * 'pgpUserIp' +-- +-- * 'pgpKey' +-- +-- * 'pgpOauthToken' +-- +-- * 'pgpProductId' +-- +-- * 'pgpFields' +-- +-- * 'pgpAlt' +productsGetPermissions + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsGetPermissions +productsGetPermissions pPgpEnterpriseId_ pPgpProductId_ = + ProductsGetPermissions + { _pgpQuotaUser = Nothing + , _pgpPrettyPrint = True + , _pgpEnterpriseId = pPgpEnterpriseId_ + , _pgpUserIp = Nothing + , _pgpKey = Nothing + , _pgpOauthToken = Nothing + , _pgpProductId = pPgpProductId_ + , _pgpFields = Nothing + , _pgpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgpQuotaUser :: Lens' ProductsGetPermissions' (Maybe Text) +pgpQuotaUser + = lens _pgpQuotaUser (\ s a -> s{_pgpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgpPrettyPrint :: Lens' ProductsGetPermissions' Bool +pgpPrettyPrint + = lens _pgpPrettyPrint + (\ s a -> s{_pgpPrettyPrint = a}) + +-- | The ID of the enterprise. +pgpEnterpriseId :: Lens' ProductsGetPermissions' Text +pgpEnterpriseId + = lens _pgpEnterpriseId + (\ s a -> s{_pgpEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgpUserIp :: Lens' ProductsGetPermissions' (Maybe Text) +pgpUserIp + = lens _pgpUserIp (\ s a -> s{_pgpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgpKey :: Lens' ProductsGetPermissions' (Maybe Text) +pgpKey = lens _pgpKey (\ s a -> s{_pgpKey = a}) + +-- | OAuth 2.0 token for the current user. +pgpOauthToken :: Lens' ProductsGetPermissions' (Maybe Text) +pgpOauthToken + = lens _pgpOauthToken + (\ s a -> s{_pgpOauthToken = a}) + +-- | The ID of the product. +pgpProductId :: Lens' ProductsGetPermissions' Text +pgpProductId + = lens _pgpProductId (\ s a -> s{_pgpProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +pgpFields :: Lens' ProductsGetPermissions' (Maybe Text) +pgpFields + = lens _pgpFields (\ s a -> s{_pgpFields = a}) + +-- | Data format for the response. +pgpAlt :: Lens' ProductsGetPermissions' Text +pgpAlt = lens _pgpAlt (\ s a -> s{_pgpAlt = a}) + +instance GoogleRequest ProductsGetPermissions' where + type Rs ProductsGetPermissions' = ProductPermissions + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u ProductsGetPermissions{..} + = go _pgpQuotaUser _pgpPrettyPrint _pgpEnterpriseId + _pgpUserIp + _pgpKey + _pgpOauthToken + _pgpProductId + _pgpFields + _pgpAlt + where go + = clientWithRoute + (Proxy :: Proxy ProductsGetPermissionsAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/UpdatePermissions.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/UpdatePermissions.hs new file mode 100644 index 000000000..7633a9ba3 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Products/UpdatePermissions.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Products.UpdatePermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the set of Android app permissions for this app that have been +-- accepted by the enterprise. +-- +-- /See:/ for @AndroidenterpriseProductsUpdatePermissions@. +module Androidenterprise.Products.UpdatePermissions + ( + -- * REST Resource + ProductsUpdatePermissionsAPI + + -- * Creating a Request + , productsUpdatePermissions + , ProductsUpdatePermissions + + -- * Request Lenses + , pupQuotaUser + , pupPrettyPrint + , pupEnterpriseId + , pupUserIp + , pupKey + , pupOauthToken + , pupProductId + , pupFields + , pupAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseProductsUpdatePermissions@ which the +-- 'ProductsUpdatePermissions' request conforms to. +type ProductsUpdatePermissionsAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "products" :> + Capture "productId" Text :> + "permissions" :> Put '[JSON] ProductPermissions + +-- | Updates the set of Android app permissions for this app that have been +-- accepted by the enterprise. +-- +-- /See:/ 'productsUpdatePermissions' smart constructor. +data ProductsUpdatePermissions = ProductsUpdatePermissions + { _pupQuotaUser :: !(Maybe Text) + , _pupPrettyPrint :: !Bool + , _pupEnterpriseId :: !Text + , _pupUserIp :: !(Maybe Text) + , _pupKey :: !(Maybe Text) + , _pupOauthToken :: !(Maybe Text) + , _pupProductId :: !Text + , _pupFields :: !(Maybe Text) + , _pupAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProductsUpdatePermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pupQuotaUser' +-- +-- * 'pupPrettyPrint' +-- +-- * 'pupEnterpriseId' +-- +-- * 'pupUserIp' +-- +-- * 'pupKey' +-- +-- * 'pupOauthToken' +-- +-- * 'pupProductId' +-- +-- * 'pupFields' +-- +-- * 'pupAlt' +productsUpdatePermissions + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'productId' + -> ProductsUpdatePermissions +productsUpdatePermissions pPupEnterpriseId_ pPupProductId_ = + ProductsUpdatePermissions + { _pupQuotaUser = Nothing + , _pupPrettyPrint = True + , _pupEnterpriseId = pPupEnterpriseId_ + , _pupUserIp = Nothing + , _pupKey = Nothing + , _pupOauthToken = Nothing + , _pupProductId = pPupProductId_ + , _pupFields = Nothing + , _pupAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pupQuotaUser :: Lens' ProductsUpdatePermissions' (Maybe Text) +pupQuotaUser + = lens _pupQuotaUser (\ s a -> s{_pupQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pupPrettyPrint :: Lens' ProductsUpdatePermissions' Bool +pupPrettyPrint + = lens _pupPrettyPrint + (\ s a -> s{_pupPrettyPrint = a}) + +-- | The ID of the enterprise. +pupEnterpriseId :: Lens' ProductsUpdatePermissions' Text +pupEnterpriseId + = lens _pupEnterpriseId + (\ s a -> s{_pupEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pupUserIp :: Lens' ProductsUpdatePermissions' (Maybe Text) +pupUserIp + = lens _pupUserIp (\ s a -> s{_pupUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pupKey :: Lens' ProductsUpdatePermissions' (Maybe Text) +pupKey = lens _pupKey (\ s a -> s{_pupKey = a}) + +-- | OAuth 2.0 token for the current user. +pupOauthToken :: Lens' ProductsUpdatePermissions' (Maybe Text) +pupOauthToken + = lens _pupOauthToken + (\ s a -> s{_pupOauthToken = a}) + +-- | The ID of the product. +pupProductId :: Lens' ProductsUpdatePermissions' Text +pupProductId + = lens _pupProductId (\ s a -> s{_pupProductId = a}) + +-- | Selector specifying which fields to include in a partial response. +pupFields :: Lens' ProductsUpdatePermissions' (Maybe Text) +pupFields + = lens _pupFields (\ s a -> s{_pupFields = a}) + +-- | Data format for the response. +pupAlt :: Lens' ProductsUpdatePermissions' Text +pupAlt = lens _pupAlt (\ s a -> s{_pupAlt = a}) + +instance GoogleRequest ProductsUpdatePermissions' + where + type Rs ProductsUpdatePermissions' = + ProductPermissions + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u ProductsUpdatePermissions{..} + = go _pupQuotaUser _pupPrettyPrint _pupEnterpriseId + _pupUserIp + _pupKey + _pupOauthToken + _pupProductId + _pupFields + _pupAlt + where go + = clientWithRoute + (Proxy :: Proxy ProductsUpdatePermissionsAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GenerateToken.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GenerateToken.hs new file mode 100644 index 000000000..54d1682c3 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GenerateToken.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.GenerateToken +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates a token (activation code) to allow this user to configure +-- their work account in the Android Setup Wizard. Revokes any previously +-- generated token. +-- +-- /See:/ for @AndroidenterpriseUsersGenerateToken@. +module Androidenterprise.Users.GenerateToken + ( + -- * REST Resource + UsersGenerateTokenAPI + + -- * Creating a Request + , usersGenerateToken + , UsersGenerateToken + + -- * Request Lenses + , ugtQuotaUser + , ugtPrettyPrint + , ugtEnterpriseId + , ugtUserIp + , ugtUserId + , ugtKey + , ugtOauthToken + , ugtFields + , ugtAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersGenerateToken@ which the +-- 'UsersGenerateToken' request conforms to. +type UsersGenerateTokenAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "token" :> Post '[JSON] UserToken + +-- | Generates a token (activation code) to allow this user to configure +-- their work account in the Android Setup Wizard. Revokes any previously +-- generated token. +-- +-- /See:/ 'usersGenerateToken' smart constructor. +data UsersGenerateToken = UsersGenerateToken + { _ugtQuotaUser :: !(Maybe Text) + , _ugtPrettyPrint :: !Bool + , _ugtEnterpriseId :: !Text + , _ugtUserIp :: !(Maybe Text) + , _ugtUserId :: !Text + , _ugtKey :: !(Maybe Text) + , _ugtOauthToken :: !(Maybe Text) + , _ugtFields :: !(Maybe Text) + , _ugtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGenerateToken'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugtQuotaUser' +-- +-- * 'ugtPrettyPrint' +-- +-- * 'ugtEnterpriseId' +-- +-- * 'ugtUserIp' +-- +-- * 'ugtUserId' +-- +-- * 'ugtKey' +-- +-- * 'ugtOauthToken' +-- +-- * 'ugtFields' +-- +-- * 'ugtAlt' +usersGenerateToken + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> UsersGenerateToken +usersGenerateToken pUgtEnterpriseId_ pUgtUserId_ = + UsersGenerateToken + { _ugtQuotaUser = Nothing + , _ugtPrettyPrint = True + , _ugtEnterpriseId = pUgtEnterpriseId_ + , _ugtUserIp = Nothing + , _ugtUserId = pUgtUserId_ + , _ugtKey = Nothing + , _ugtOauthToken = Nothing + , _ugtFields = Nothing + , _ugtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugtQuotaUser :: Lens' UsersGenerateToken' (Maybe Text) +ugtQuotaUser + = lens _ugtQuotaUser (\ s a -> s{_ugtQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugtPrettyPrint :: Lens' UsersGenerateToken' Bool +ugtPrettyPrint + = lens _ugtPrettyPrint + (\ s a -> s{_ugtPrettyPrint = a}) + +-- | The ID of the enterprise. +ugtEnterpriseId :: Lens' UsersGenerateToken' Text +ugtEnterpriseId + = lens _ugtEnterpriseId + (\ s a -> s{_ugtEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugtUserIp :: Lens' UsersGenerateToken' (Maybe Text) +ugtUserIp + = lens _ugtUserIp (\ s a -> s{_ugtUserIp = a}) + +-- | The ID of the user. +ugtUserId :: Lens' UsersGenerateToken' Text +ugtUserId + = lens _ugtUserId (\ s a -> s{_ugtUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugtKey :: Lens' UsersGenerateToken' (Maybe Text) +ugtKey = lens _ugtKey (\ s a -> s{_ugtKey = a}) + +-- | OAuth 2.0 token for the current user. +ugtOauthToken :: Lens' UsersGenerateToken' (Maybe Text) +ugtOauthToken + = lens _ugtOauthToken + (\ s a -> s{_ugtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugtFields :: Lens' UsersGenerateToken' (Maybe Text) +ugtFields + = lens _ugtFields (\ s a -> s{_ugtFields = a}) + +-- | Data format for the response. +ugtAlt :: Lens' UsersGenerateToken' Text +ugtAlt = lens _ugtAlt (\ s a -> s{_ugtAlt = a}) + +instance GoogleRequest UsersGenerateToken' where + type Rs UsersGenerateToken' = UserToken + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersGenerateToken{..} + = go _ugtQuotaUser _ugtPrettyPrint _ugtEnterpriseId + _ugtUserIp + _ugtUserId + _ugtKey + _ugtOauthToken + _ugtFields + _ugtAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersGenerateTokenAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/Get.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/Get.hs new file mode 100644 index 000000000..25139d18c --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/Get.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a user\'s details. +-- +-- /See:/ for @AndroidenterpriseUsersGet@. +module Androidenterprise.Users.Get + ( + -- * REST Resource + UsersGetAPI + + -- * Creating a Request + , usersGet + , UsersGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugEnterpriseId + , ugUserIp + , ugUserId + , ugKey + , ugOauthToken + , ugFields + , ugAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersGet@ which the +-- 'UsersGet' request conforms to. +type UsersGetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> Capture "userId" Text :> Get '[JSON] User + +-- | Retrieves a user\'s details. +-- +-- /See:/ 'usersGet' smart constructor. +data UsersGet = UsersGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugEnterpriseId :: !Text + , _ugUserIp :: !(Maybe Text) + , _ugUserId :: !Text + , _ugKey :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugEnterpriseId' +-- +-- * 'ugUserIp' +-- +-- * 'ugUserId' +-- +-- * 'ugKey' +-- +-- * 'ugOauthToken' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +usersGet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> UsersGet +usersGet pUgEnterpriseId_ pUgUserId_ = + UsersGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugEnterpriseId = pUgEnterpriseId_ + , _ugUserIp = Nothing + , _ugUserId = pUgUserId_ + , _ugKey = Nothing + , _ugOauthToken = Nothing + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' UsersGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' UsersGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | The ID of the enterprise. +ugEnterpriseId :: Lens' UsersGet' Text +ugEnterpriseId + = lens _ugEnterpriseId + (\ s a -> s{_ugEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' UsersGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | The ID of the user. +ugUserId :: Lens' UsersGet' Text +ugUserId = lens _ugUserId (\ s a -> s{_ugUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' UsersGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' UsersGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' UsersGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' UsersGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest UsersGet' where + type Rs UsersGet' = User + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersGet{..} + = go _ugQuotaUser _ugPrettyPrint _ugEnterpriseId + _ugUserIp + _ugUserId + _ugKey + _ugOauthToken + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UsersGetAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GetAvailableProductSet.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GetAvailableProductSet.hs new file mode 100644 index 000000000..929f5f606 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/GetAvailableProductSet.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.GetAvailableProductSet +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the set of products a user is entitled to access. +-- +-- /See:/ for @AndroidenterpriseUsersGetAvailableProductSet@. +module Androidenterprise.Users.GetAvailableProductSet + ( + -- * REST Resource + UsersGetAvailableProductSetAPI + + -- * Creating a Request + , usersGetAvailableProductSet + , UsersGetAvailableProductSet + + -- * Request Lenses + , ugapsQuotaUser + , ugapsPrettyPrint + , ugapsEnterpriseId + , ugapsUserIp + , ugapsUserId + , ugapsKey + , ugapsOauthToken + , ugapsFields + , ugapsAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersGetAvailableProductSet@ which the +-- 'UsersGetAvailableProductSet' request conforms to. +type UsersGetAvailableProductSetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "availableProductSet" :> Get '[JSON] ProductSet + +-- | Retrieves the set of products a user is entitled to access. +-- +-- /See:/ 'usersGetAvailableProductSet' smart constructor. +data UsersGetAvailableProductSet = UsersGetAvailableProductSet + { _ugapsQuotaUser :: !(Maybe Text) + , _ugapsPrettyPrint :: !Bool + , _ugapsEnterpriseId :: !Text + , _ugapsUserIp :: !(Maybe Text) + , _ugapsUserId :: !Text + , _ugapsKey :: !(Maybe Text) + , _ugapsOauthToken :: !(Maybe Text) + , _ugapsFields :: !(Maybe Text) + , _ugapsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersGetAvailableProductSet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugapsQuotaUser' +-- +-- * 'ugapsPrettyPrint' +-- +-- * 'ugapsEnterpriseId' +-- +-- * 'ugapsUserIp' +-- +-- * 'ugapsUserId' +-- +-- * 'ugapsKey' +-- +-- * 'ugapsOauthToken' +-- +-- * 'ugapsFields' +-- +-- * 'ugapsAlt' +usersGetAvailableProductSet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> UsersGetAvailableProductSet +usersGetAvailableProductSet pUgapsEnterpriseId_ pUgapsUserId_ = + UsersGetAvailableProductSet + { _ugapsQuotaUser = Nothing + , _ugapsPrettyPrint = True + , _ugapsEnterpriseId = pUgapsEnterpriseId_ + , _ugapsUserIp = Nothing + , _ugapsUserId = pUgapsUserId_ + , _ugapsKey = Nothing + , _ugapsOauthToken = Nothing + , _ugapsFields = Nothing + , _ugapsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugapsQuotaUser :: Lens' UsersGetAvailableProductSet' (Maybe Text) +ugapsQuotaUser + = lens _ugapsQuotaUser + (\ s a -> s{_ugapsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugapsPrettyPrint :: Lens' UsersGetAvailableProductSet' Bool +ugapsPrettyPrint + = lens _ugapsPrettyPrint + (\ s a -> s{_ugapsPrettyPrint = a}) + +-- | The ID of the enterprise. +ugapsEnterpriseId :: Lens' UsersGetAvailableProductSet' Text +ugapsEnterpriseId + = lens _ugapsEnterpriseId + (\ s a -> s{_ugapsEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugapsUserIp :: Lens' UsersGetAvailableProductSet' (Maybe Text) +ugapsUserIp + = lens _ugapsUserIp (\ s a -> s{_ugapsUserIp = a}) + +-- | The ID of the user. +ugapsUserId :: Lens' UsersGetAvailableProductSet' Text +ugapsUserId + = lens _ugapsUserId (\ s a -> s{_ugapsUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugapsKey :: Lens' UsersGetAvailableProductSet' (Maybe Text) +ugapsKey = lens _ugapsKey (\ s a -> s{_ugapsKey = a}) + +-- | OAuth 2.0 token for the current user. +ugapsOauthToken :: Lens' UsersGetAvailableProductSet' (Maybe Text) +ugapsOauthToken + = lens _ugapsOauthToken + (\ s a -> s{_ugapsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugapsFields :: Lens' UsersGetAvailableProductSet' (Maybe Text) +ugapsFields + = lens _ugapsFields (\ s a -> s{_ugapsFields = a}) + +-- | Data format for the response. +ugapsAlt :: Lens' UsersGetAvailableProductSet' Text +ugapsAlt = lens _ugapsAlt (\ s a -> s{_ugapsAlt = a}) + +instance GoogleRequest UsersGetAvailableProductSet' + where + type Rs UsersGetAvailableProductSet' = ProductSet + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersGetAvailableProductSet{..} + = go _ugapsQuotaUser _ugapsPrettyPrint + _ugapsEnterpriseId + _ugapsUserIp + _ugapsUserId + _ugapsKey + _ugapsOauthToken + _ugapsFields + _ugapsAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersGetAvailableProductSetAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/List.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/List.hs new file mode 100644 index 000000000..0673d1f91 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Looks up a user by email address. +-- +-- /See:/ for @AndroidenterpriseUsersList@. +module Androidenterprise.Users.List + ( + -- * REST Resource + UsersListAPI + + -- * Creating a Request + , usersList + , UsersList + + -- * Request Lenses + , ulEmail + , ulQuotaUser + , ulPrettyPrint + , ulEnterpriseId + , ulUserIp + , ulKey + , ulOauthToken + , ulFields + , ulAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersList@ which the +-- 'UsersList' request conforms to. +type UsersListAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + QueryParam "email" Text :> + Get '[JSON] UsersListResponse + +-- | Looks up a user by email address. +-- +-- /See:/ 'usersList' smart constructor. +data UsersList = UsersList + { _ulEmail :: !Text + , _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulEnterpriseId :: !Text + , _ulUserIp :: !(Maybe Text) + , _ulKey :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulEmail' +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulEnterpriseId' +-- +-- * 'ulUserIp' +-- +-- * 'ulKey' +-- +-- * 'ulOauthToken' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +usersList + :: Text -- ^ 'email' + -> Text -- ^ 'enterpriseId' + -> UsersList +usersList pUlEmail_ pUlEnterpriseId_ = + UsersList + { _ulEmail = pUlEmail_ + , _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulEnterpriseId = pUlEnterpriseId_ + , _ulUserIp = Nothing + , _ulKey = Nothing + , _ulOauthToken = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | The exact primary email address of the user to look up. +ulEmail :: Lens' UsersList' Text +ulEmail = lens _ulEmail (\ s a -> s{_ulEmail = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' UsersList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' UsersList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | The ID of the enterprise. +ulEnterpriseId :: Lens' UsersList' Text +ulEnterpriseId + = lens _ulEnterpriseId + (\ s a -> s{_ulEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' UsersList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' UsersList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' UsersList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' UsersList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' UsersList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest UsersList' where + type Rs UsersList' = UsersListResponse + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersList{..} + = go (Just _ulEmail) _ulQuotaUser _ulPrettyPrint + _ulEnterpriseId + _ulUserIp + _ulKey + _ulOauthToken + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UsersListAPI) r u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/RevokeToken.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/RevokeToken.hs new file mode 100644 index 000000000..4ed3c27a9 --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/RevokeToken.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.RevokeToken +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Revokes a previously generated token (activation code) for the user. +-- +-- /See:/ for @AndroidenterpriseUsersRevokeToken@. +module Androidenterprise.Users.RevokeToken + ( + -- * REST Resource + UsersRevokeTokenAPI + + -- * Creating a Request + , usersRevokeToken + , UsersRevokeToken + + -- * Request Lenses + , urtQuotaUser + , urtPrettyPrint + , urtEnterpriseId + , urtUserIp + , urtUserId + , urtKey + , urtOauthToken + , urtFields + , urtAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersRevokeToken@ which the +-- 'UsersRevokeToken' request conforms to. +type UsersRevokeTokenAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> "token" :> Delete '[JSON] () + +-- | Revokes a previously generated token (activation code) for the user. +-- +-- /See:/ 'usersRevokeToken' smart constructor. +data UsersRevokeToken = UsersRevokeToken + { _urtQuotaUser :: !(Maybe Text) + , _urtPrettyPrint :: !Bool + , _urtEnterpriseId :: !Text + , _urtUserIp :: !(Maybe Text) + , _urtUserId :: !Text + , _urtKey :: !(Maybe Text) + , _urtOauthToken :: !(Maybe Text) + , _urtFields :: !(Maybe Text) + , _urtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersRevokeToken'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urtQuotaUser' +-- +-- * 'urtPrettyPrint' +-- +-- * 'urtEnterpriseId' +-- +-- * 'urtUserIp' +-- +-- * 'urtUserId' +-- +-- * 'urtKey' +-- +-- * 'urtOauthToken' +-- +-- * 'urtFields' +-- +-- * 'urtAlt' +usersRevokeToken + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> UsersRevokeToken +usersRevokeToken pUrtEnterpriseId_ pUrtUserId_ = + UsersRevokeToken + { _urtQuotaUser = Nothing + , _urtPrettyPrint = True + , _urtEnterpriseId = pUrtEnterpriseId_ + , _urtUserIp = Nothing + , _urtUserId = pUrtUserId_ + , _urtKey = Nothing + , _urtOauthToken = Nothing + , _urtFields = Nothing + , _urtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +urtQuotaUser :: Lens' UsersRevokeToken' (Maybe Text) +urtQuotaUser + = lens _urtQuotaUser (\ s a -> s{_urtQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +urtPrettyPrint :: Lens' UsersRevokeToken' Bool +urtPrettyPrint + = lens _urtPrettyPrint + (\ s a -> s{_urtPrettyPrint = a}) + +-- | The ID of the enterprise. +urtEnterpriseId :: Lens' UsersRevokeToken' Text +urtEnterpriseId + = lens _urtEnterpriseId + (\ s a -> s{_urtEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +urtUserIp :: Lens' UsersRevokeToken' (Maybe Text) +urtUserIp + = lens _urtUserIp (\ s a -> s{_urtUserIp = a}) + +-- | The ID of the user. +urtUserId :: Lens' UsersRevokeToken' Text +urtUserId + = lens _urtUserId (\ s a -> s{_urtUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +urtKey :: Lens' UsersRevokeToken' (Maybe Text) +urtKey = lens _urtKey (\ s a -> s{_urtKey = a}) + +-- | OAuth 2.0 token for the current user. +urtOauthToken :: Lens' UsersRevokeToken' (Maybe Text) +urtOauthToken + = lens _urtOauthToken + (\ s a -> s{_urtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +urtFields :: Lens' UsersRevokeToken' (Maybe Text) +urtFields + = lens _urtFields (\ s a -> s{_urtFields = a}) + +-- | Data format for the response. +urtAlt :: Lens' UsersRevokeToken' Text +urtAlt = lens _urtAlt (\ s a -> s{_urtAlt = a}) + +instance GoogleRequest UsersRevokeToken' where + type Rs UsersRevokeToken' = () + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersRevokeToken{..} + = go _urtQuotaUser _urtPrettyPrint _urtEnterpriseId + _urtUserIp + _urtUserId + _urtKey + _urtOauthToken + _urtFields + _urtAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersRevokeTokenAPI) + r + u diff --git a/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/SetAvailableProductSet.hs b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/SetAvailableProductSet.hs new file mode 100644 index 000000000..0773d323b --- /dev/null +++ b/gogol-play-enterprise/gen/Network/Google/Resource/Androidenterprise/Users/SetAvailableProductSet.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Androidenterprise.Users.SetAvailableProductSet +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the set of products a user is entitled to access. +-- +-- /See:/ for @AndroidenterpriseUsersSetAvailableProductSet@. +module Androidenterprise.Users.SetAvailableProductSet + ( + -- * REST Resource + UsersSetAvailableProductSetAPI + + -- * Creating a Request + , usersSetAvailableProductSet + , UsersSetAvailableProductSet + + -- * Request Lenses + , usapsQuotaUser + , usapsPrettyPrint + , usapsEnterpriseId + , usapsUserIp + , usapsUserId + , usapsKey + , usapsOauthToken + , usapsFields + , usapsAlt + ) where + +import Network.Google.PlayEnterprise.Types +import Network.Google.Prelude + +-- | A resource alias for @AndroidenterpriseUsersSetAvailableProductSet@ which the +-- 'UsersSetAvailableProductSet' request conforms to. +type UsersSetAvailableProductSetAPI = + "enterprises" :> + Capture "enterpriseId" Text :> + "users" :> + Capture "userId" Text :> + "availableProductSet" :> Put '[JSON] ProductSet + +-- | Modifies the set of products a user is entitled to access. +-- +-- /See:/ 'usersSetAvailableProductSet' smart constructor. +data UsersSetAvailableProductSet = UsersSetAvailableProductSet + { _usapsQuotaUser :: !(Maybe Text) + , _usapsPrettyPrint :: !Bool + , _usapsEnterpriseId :: !Text + , _usapsUserIp :: !(Maybe Text) + , _usapsUserId :: !Text + , _usapsKey :: !(Maybe Text) + , _usapsOauthToken :: !(Maybe Text) + , _usapsFields :: !(Maybe Text) + , _usapsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersSetAvailableProductSet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usapsQuotaUser' +-- +-- * 'usapsPrettyPrint' +-- +-- * 'usapsEnterpriseId' +-- +-- * 'usapsUserIp' +-- +-- * 'usapsUserId' +-- +-- * 'usapsKey' +-- +-- * 'usapsOauthToken' +-- +-- * 'usapsFields' +-- +-- * 'usapsAlt' +usersSetAvailableProductSet + :: Text -- ^ 'enterpriseId' + -> Text -- ^ 'userId' + -> UsersSetAvailableProductSet +usersSetAvailableProductSet pUsapsEnterpriseId_ pUsapsUserId_ = + UsersSetAvailableProductSet + { _usapsQuotaUser = Nothing + , _usapsPrettyPrint = True + , _usapsEnterpriseId = pUsapsEnterpriseId_ + , _usapsUserIp = Nothing + , _usapsUserId = pUsapsUserId_ + , _usapsKey = Nothing + , _usapsOauthToken = Nothing + , _usapsFields = Nothing + , _usapsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +usapsQuotaUser :: Lens' UsersSetAvailableProductSet' (Maybe Text) +usapsQuotaUser + = lens _usapsQuotaUser + (\ s a -> s{_usapsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +usapsPrettyPrint :: Lens' UsersSetAvailableProductSet' Bool +usapsPrettyPrint + = lens _usapsPrettyPrint + (\ s a -> s{_usapsPrettyPrint = a}) + +-- | The ID of the enterprise. +usapsEnterpriseId :: Lens' UsersSetAvailableProductSet' Text +usapsEnterpriseId + = lens _usapsEnterpriseId + (\ s a -> s{_usapsEnterpriseId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +usapsUserIp :: Lens' UsersSetAvailableProductSet' (Maybe Text) +usapsUserIp + = lens _usapsUserIp (\ s a -> s{_usapsUserIp = a}) + +-- | The ID of the user. +usapsUserId :: Lens' UsersSetAvailableProductSet' Text +usapsUserId + = lens _usapsUserId (\ s a -> s{_usapsUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +usapsKey :: Lens' UsersSetAvailableProductSet' (Maybe Text) +usapsKey = lens _usapsKey (\ s a -> s{_usapsKey = a}) + +-- | OAuth 2.0 token for the current user. +usapsOauthToken :: Lens' UsersSetAvailableProductSet' (Maybe Text) +usapsOauthToken + = lens _usapsOauthToken + (\ s a -> s{_usapsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +usapsFields :: Lens' UsersSetAvailableProductSet' (Maybe Text) +usapsFields + = lens _usapsFields (\ s a -> s{_usapsFields = a}) + +-- | Data format for the response. +usapsAlt :: Lens' UsersSetAvailableProductSet' Text +usapsAlt = lens _usapsAlt (\ s a -> s{_usapsAlt = a}) + +instance GoogleRequest UsersSetAvailableProductSet' + where + type Rs UsersSetAvailableProductSet' = ProductSet + request = requestWithRoute defReq playEnterpriseURL + requestWithRoute r u UsersSetAvailableProductSet{..} + = go _usapsQuotaUser _usapsPrettyPrint + _usapsEnterpriseId + _usapsUserIp + _usapsUserId + _usapsKey + _usapsOauthToken + _usapsFields + _usapsAlt + where go + = clientWithRoute + (Proxy :: Proxy UsersSetAvailableProductSetAPI) + r + u diff --git a/gogol-play-enterprise/gogol-play-enterprise.cabal b/gogol-play-enterprise/gogol-play-enterprise.cabal new file mode 100644 index 000000000..208449cef --- /dev/null +++ b/gogol-play-enterprise/gogol-play-enterprise.cabal @@ -0,0 +1,92 @@ +name: gogol-play-enterprise +version: 0.0.1 +synopsis: Google Play EMM API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Allows MDMs\/EMMs and enterprises to manage the deployment of apps to + Android for Work users. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PlayEnterprise + , Network.Google.PlayEnterprise.Types + , Network.Google.Resource.Androidenterprise.Collections.Delete + , Network.Google.Resource.Androidenterprise.Collections.Get + , Network.Google.Resource.Androidenterprise.Collections.Insert + , Network.Google.Resource.Androidenterprise.Collections.List + , Network.Google.Resource.Androidenterprise.Collections.Patch + , Network.Google.Resource.Androidenterprise.Collections.Update + , Network.Google.Resource.Androidenterprise.Collectionviewers.Delete + , Network.Google.Resource.Androidenterprise.Collectionviewers.Get + , Network.Google.Resource.Androidenterprise.Collectionviewers.List + , Network.Google.Resource.Androidenterprise.Collectionviewers.Patch + , Network.Google.Resource.Androidenterprise.Collectionviewers.Update + , Network.Google.Resource.Androidenterprise.Devices.Get + , Network.Google.Resource.Androidenterprise.Devices.GetState + , Network.Google.Resource.Androidenterprise.Devices.List + , Network.Google.Resource.Androidenterprise.Devices.SetState + , Network.Google.Resource.Androidenterprise.Enterprises.Delete + , Network.Google.Resource.Androidenterprise.Enterprises.Enroll + , Network.Google.Resource.Androidenterprise.Enterprises.Get + , Network.Google.Resource.Androidenterprise.Enterprises.Insert + , Network.Google.Resource.Androidenterprise.Enterprises.List + , Network.Google.Resource.Androidenterprise.Enterprises.SendTestPushNotification + , Network.Google.Resource.Androidenterprise.Enterprises.SetAccount + , Network.Google.Resource.Androidenterprise.Enterprises.Unenroll + , Network.Google.Resource.Androidenterprise.Entitlements.Delete + , Network.Google.Resource.Androidenterprise.Entitlements.Get + , Network.Google.Resource.Androidenterprise.Entitlements.List + , Network.Google.Resource.Androidenterprise.Entitlements.Patch + , Network.Google.Resource.Androidenterprise.Entitlements.Update + , Network.Google.Resource.Androidenterprise.Grouplicenses.Get + , Network.Google.Resource.Androidenterprise.Grouplicenses.List + , Network.Google.Resource.Androidenterprise.Grouplicenseusers.List + , Network.Google.Resource.Androidenterprise.Installs.Delete + , Network.Google.Resource.Androidenterprise.Installs.Get + , Network.Google.Resource.Androidenterprise.Installs.List + , Network.Google.Resource.Androidenterprise.Installs.Patch + , Network.Google.Resource.Androidenterprise.Installs.Update + , Network.Google.Resource.Androidenterprise.Permissions.Get + , Network.Google.Resource.Androidenterprise.Products.Approve + , Network.Google.Resource.Androidenterprise.Products.GenerateApprovalURL + , Network.Google.Resource.Androidenterprise.Products.Get + , Network.Google.Resource.Androidenterprise.Products.GetAppRestrictionsSchema + , Network.Google.Resource.Androidenterprise.Products.GetPermissions + , Network.Google.Resource.Androidenterprise.Products.UpdatePermissions + , Network.Google.Resource.Androidenterprise.Users.GenerateToken + , Network.Google.Resource.Androidenterprise.Users.Get + , Network.Google.Resource.Androidenterprise.Users.GetAvailableProductSet + , Network.Google.Resource.Androidenterprise.Users.List + , Network.Google.Resource.Androidenterprise.Users.RevokeToken + , Network.Google.Resource.Androidenterprise.Users.SetAvailableProductSet + + other-modules: + Network.Google.PlayEnterprise.Types.Product + , Network.Google.PlayEnterprise.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-play-enterprise/src/.gitkeep b/gogol-play-enterprise/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-play-moviespartner/LICENSE b/gogol-play-moviespartner/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-play-moviespartner/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-play-moviespartner/Makefile b/gogol-play-moviespartner/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-play-moviespartner/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-play-moviespartner/README.md b/gogol-play-moviespartner/README.md new file mode 100644 index 000000000..7e538501c --- /dev/null +++ b/gogol-play-moviespartner/README.md @@ -0,0 +1,28 @@ +# gogol-play-moviespartner + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Play Movies Partner API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-play-moviespartner` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-play-moviespartner/Setup.hs b/gogol-play-moviespartner/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-play-moviespartner/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner.hs b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner.hs new file mode 100644 index 000000000..a76cc8207 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PlayMoviesPartner +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets Google Play Movies Partners get the delivery status of their +-- titles. +-- +-- /See:/ +module Network.Google.PlayMoviesPartner + ( + -- * API + PlayMoviesPartnerAPI + , playMoviesPartnerAPI + , playMoviesPartnerURL + + -- * Service Methods + + -- * REST Resources + + -- ** PlaymoviespartnerAccountsAvailsList + , module PlayMoviesPartner.Accounts.Avails.List + + -- ** PlaymoviespartnerAccountsExperienceLocalesGet + , module PlayMoviesPartner.Accounts.ExperienceLocales.Get + + -- ** PlaymoviespartnerAccountsExperienceLocalesList + , module PlayMoviesPartner.Accounts.ExperienceLocales.List + + -- ** PlaymoviespartnerAccountsOrdersGet + , module PlayMoviesPartner.Accounts.Orders.Get + + -- ** PlaymoviespartnerAccountsOrdersList + , module PlayMoviesPartner.Accounts.Orders.List + + -- ** PlaymoviespartnerAccountsStoreInfosCountryGet + , module PlayMoviesPartner.Accounts.StoreInfos.Country.Get + + -- ** PlaymoviespartnerAccountsStoreInfosList + , module PlayMoviesPartner.Accounts.StoreInfos.List + + -- * Types + + -- ** Avail + , Avail + , avail + , aAltId + , aPphNames + , aCaptionExemption + , aRatingSystem + , aSuppressionLiftDate + , aEpisodeNumber + , aPriceType + , aStoreLanguage + , aEpisodeAltId + , aStart + , aTerritory + , aEpisodeTitleInternalAlias + , aLicenseType + , aSeasonNumber + , aWorkType + , aRatingValue + , aSeasonTitleInternalAlias + , aContentId + , aVideoId + , aSeriesAltId + , aEnd + , aSeriesTitleInternalAlias + , aDisplayName + , aReleaseDate + , aFormatProfile + , aRatingReason + , aEncodeId + , aPriceValue + , aCaptionIncluded + , aProductId + , aSeasonAltId + , aTitleInternalAlias + + -- ** ListAvailsResponse + , ListAvailsResponse + , listAvailsResponse + , larNextPageToken + , larAvails + + -- ** ListOrdersResponse + , ListOrdersResponse + , listOrdersResponse + , lorNextPageToken + , lorOrders + + -- ** ListExperienceLocalesResponse + , ListExperienceLocalesResponse + , listExperienceLocalesResponse + , lelrNextPageToken + , lelrExperienceLocales + + -- ** ListStoreInfosResponse + , ListStoreInfosResponse + , listStoreInfosResponse + , lsirNextPageToken + , lsirStoreInfos + + -- ** ExperienceLocale + , ExperienceLocale + , experienceLocale + , elTitleLevelEidr + , elStatus + , elPphNames + , elInventoryId + , elEarliestAvailStartTime + , elStudioName + , elPriority + , elCustomIds + , elCreatedTime + , elCountry + , elTrailerId + , elPresentationId + , elAltCutId + , elChannelId + , elApprovedTime + , elPlayableSequenceId + , elElId + , elVideoId + , elName + , elLanguage + , elEditLevelEidr + , elType + , elNormalizedPriority + + -- ** Order + , Order + , order + , oStatus + , oShowName + , oPphName + , oEarliestAvailStartTime + , oStudioName + , oReceivedTime + , oPriority + , oChannelId + , oCustomId + , oApprovedTime + , oCountries + , oChannelName + , oVideoId + , oLegacyPriority + , oName + , oRejectionNote + , oOrderedTime + , oSeasonName + , oStatusDetail + , oType + , oNormalizedPriority + , oOrderId + , oEpisodeName + + -- ** StoreInfo + , StoreInfo + , storeInfo + , siTitleLevelEidr + , siPphNames + , siShowName + , siSubtitles + , siStudioName + , siAudioTracks + , siEpisodeNumber + , siCountry + , siTrailerId + , siHasInfoCards + , siLiveTime + , siSeasonNumber + , siHasHdOffer + , siVideoId + , siName + , siHasVodOffer + , siSeasonName + , siHasSdOffer + , siMid + , siEditLevelEidr + , siType + , siHasEstOffer + , siHasAudio51 + , siSeasonId + , siShowId + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude +import Network.Google.Resource.PlayMoviesPartner.Accounts.Avails.List +import Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.Get +import Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.List +import Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.Get +import Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.List +import Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.Country.Get +import Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.List + +{- $resources +TODO +-} + +type PlayMoviesPartnerAPI = Accounts + +playMoviesPartnerAPI :: Proxy PlayMoviesPartnerAPI +playMoviesPartnerAPI = Proxy diff --git a/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types.hs b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types.hs new file mode 100644 index 000000000..af815d4fe --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayMoviesPartner.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayMoviesPartner.Types + ( + -- * Service URL + playMoviesPartnerURL + + -- * Avail + , Avail + , avail + , aAltId + , aPphNames + , aCaptionExemption + , aRatingSystem + , aSuppressionLiftDate + , aEpisodeNumber + , aPriceType + , aStoreLanguage + , aEpisodeAltId + , aStart + , aTerritory + , aEpisodeTitleInternalAlias + , aLicenseType + , aSeasonNumber + , aWorkType + , aRatingValue + , aSeasonTitleInternalAlias + , aContentId + , aVideoId + , aSeriesAltId + , aEnd + , aSeriesTitleInternalAlias + , aDisplayName + , aReleaseDate + , aFormatProfile + , aRatingReason + , aEncodeId + , aPriceValue + , aCaptionIncluded + , aProductId + , aSeasonAltId + , aTitleInternalAlias + + -- * ListAvailsResponse + , ListAvailsResponse + , listAvailsResponse + , larNextPageToken + , larAvails + + -- * ListOrdersResponse + , ListOrdersResponse + , listOrdersResponse + , lorNextPageToken + , lorOrders + + -- * ListExperienceLocalesResponse + , ListExperienceLocalesResponse + , listExperienceLocalesResponse + , lelrNextPageToken + , lelrExperienceLocales + + -- * ListStoreInfosResponse + , ListStoreInfosResponse + , listStoreInfosResponse + , lsirNextPageToken + , lsirStoreInfos + + -- * ExperienceLocale + , ExperienceLocale + , experienceLocale + , elTitleLevelEidr + , elStatus + , elPphNames + , elInventoryId + , elEarliestAvailStartTime + , elStudioName + , elPriority + , elCustomIds + , elCreatedTime + , elCountry + , elTrailerId + , elPresentationId + , elAltCutId + , elChannelId + , elApprovedTime + , elPlayableSequenceId + , elElId + , elVideoId + , elName + , elLanguage + , elEditLevelEidr + , elType + , elNormalizedPriority + + -- * Order + , Order + , order + , oStatus + , oShowName + , oPphName + , oEarliestAvailStartTime + , oStudioName + , oReceivedTime + , oPriority + , oChannelId + , oCustomId + , oApprovedTime + , oCountries + , oChannelName + , oVideoId + , oLegacyPriority + , oName + , oRejectionNote + , oOrderedTime + , oSeasonName + , oStatusDetail + , oType + , oNormalizedPriority + , oOrderId + , oEpisodeName + + -- * StoreInfo + , StoreInfo + , storeInfo + , siTitleLevelEidr + , siPphNames + , siShowName + , siSubtitles + , siStudioName + , siAudioTracks + , siEpisodeNumber + , siCountry + , siTrailerId + , siHasInfoCards + , siLiveTime + , siSeasonNumber + , siHasHdOffer + , siVideoId + , siName + , siHasVodOffer + , siSeasonName + , siHasSdOffer + , siMid + , siEditLevelEidr + , siType + , siHasEstOffer + , siHasAudio51 + , siSeasonId + , siShowId + ) where + +import Network.Google.PlayMoviesPartner.Types.Product +import Network.Google.PlayMoviesPartner.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google Play Movies Partner API. +playMoviesPartnerURL :: BaseURL +playMoviesPartnerURL + = BaseUrl Https + "https://playmoviespartner.googleapis.com/" + 443 diff --git a/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs new file mode 100644 index 000000000..c8eace9e6 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs @@ -0,0 +1,1592 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayMoviesPartner.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayMoviesPartner.Types.Product where + +import Network.Google.PlayMoviesPartner.Types.Sum +import Network.Google.Prelude + +-- | An Avail describes the Availability Window of a specific Edit in a given +-- country, which means the period Google is allowed to sell or rent the +-- Edit. Avails are exposed in EMA format Version 1.6b (available at +-- http:\/\/www.movielabs.com\/md\/avails\/) Studios can see the Avails for +-- the Titles they own. Post-production houses cannot see any Avails. +-- +-- /See:/ 'avail' smart constructor. +data Avail = Avail + { _aAltId :: !(Maybe Text) + , _aPphNames :: !(Maybe [Text]) + , _aCaptionExemption :: !(Maybe Text) + , _aRatingSystem :: !(Maybe Text) + , _aSuppressionLiftDate :: !(Maybe Text) + , _aEpisodeNumber :: !(Maybe Text) + , _aPriceType :: !(Maybe Text) + , _aStoreLanguage :: !(Maybe Text) + , _aEpisodeAltId :: !(Maybe Text) + , _aStart :: !(Maybe Text) + , _aTerritory :: !(Maybe Text) + , _aEpisodeTitleInternalAlias :: !(Maybe Text) + , _aLicenseType :: !(Maybe Text) + , _aSeasonNumber :: !(Maybe Text) + , _aWorkType :: !(Maybe Text) + , _aRatingValue :: !(Maybe Text) + , _aSeasonTitleInternalAlias :: !(Maybe Text) + , _aContentId :: !(Maybe Text) + , _aVideoId :: !(Maybe Text) + , _aSeriesAltId :: !(Maybe Text) + , _aEnd :: !(Maybe Text) + , _aSeriesTitleInternalAlias :: !(Maybe Text) + , _aDisplayName :: !(Maybe Text) + , _aReleaseDate :: !(Maybe Text) + , _aFormatProfile :: !(Maybe Text) + , _aRatingReason :: !(Maybe Text) + , _aEncodeId :: !(Maybe Text) + , _aPriceValue :: !(Maybe Text) + , _aCaptionIncluded :: !(Maybe Bool) + , _aProductId :: !(Maybe Text) + , _aSeasonAltId :: !(Maybe Text) + , _aTitleInternalAlias :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Avail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aAltId' +-- +-- * 'aPphNames' +-- +-- * 'aCaptionExemption' +-- +-- * 'aRatingSystem' +-- +-- * 'aSuppressionLiftDate' +-- +-- * 'aEpisodeNumber' +-- +-- * 'aPriceType' +-- +-- * 'aStoreLanguage' +-- +-- * 'aEpisodeAltId' +-- +-- * 'aStart' +-- +-- * 'aTerritory' +-- +-- * 'aEpisodeTitleInternalAlias' +-- +-- * 'aLicenseType' +-- +-- * 'aSeasonNumber' +-- +-- * 'aWorkType' +-- +-- * 'aRatingValue' +-- +-- * 'aSeasonTitleInternalAlias' +-- +-- * 'aContentId' +-- +-- * 'aVideoId' +-- +-- * 'aSeriesAltId' +-- +-- * 'aEnd' +-- +-- * 'aSeriesTitleInternalAlias' +-- +-- * 'aDisplayName' +-- +-- * 'aReleaseDate' +-- +-- * 'aFormatProfile' +-- +-- * 'aRatingReason' +-- +-- * 'aEncodeId' +-- +-- * 'aPriceValue' +-- +-- * 'aCaptionIncluded' +-- +-- * 'aProductId' +-- +-- * 'aSeasonAltId' +-- +-- * 'aTitleInternalAlias' +avail + :: Avail +avail = + Avail + { _aAltId = Nothing + , _aPphNames = Nothing + , _aCaptionExemption = Nothing + , _aRatingSystem = Nothing + , _aSuppressionLiftDate = Nothing + , _aEpisodeNumber = Nothing + , _aPriceType = Nothing + , _aStoreLanguage = Nothing + , _aEpisodeAltId = Nothing + , _aStart = Nothing + , _aTerritory = Nothing + , _aEpisodeTitleInternalAlias = Nothing + , _aLicenseType = Nothing + , _aSeasonNumber = Nothing + , _aWorkType = Nothing + , _aRatingValue = Nothing + , _aSeasonTitleInternalAlias = Nothing + , _aContentId = Nothing + , _aVideoId = Nothing + , _aSeriesAltId = Nothing + , _aEnd = Nothing + , _aSeriesTitleInternalAlias = Nothing + , _aDisplayName = Nothing + , _aReleaseDate = Nothing + , _aFormatProfile = Nothing + , _aRatingReason = Nothing + , _aEncodeId = Nothing + , _aPriceValue = Nothing + , _aCaptionIncluded = Nothing + , _aProductId = Nothing + , _aSeasonAltId = Nothing + , _aTitleInternalAlias = Nothing + } + +-- | Other identifier referring to the Edit, as defined by partner. Example: +-- \"GOOGLER_2006\" +aAltId :: Lens' Avail (Maybe Text) +aAltId = lens _aAltId (\ s a -> s{_aAltId = a}) + +-- | Name of the post-production houses that manage the Avail. Not part of +-- EMA Specs. +aPphNames :: Lens' Avail [Text] +aPphNames + = lens _aPphNames (\ s a -> s{_aPphNames = a}) . + _Default + . _Coerce + +-- | Communicating an exempt category as defined by FCC regulations. It is +-- not required for non-US Avails. Example: \"1\" +aCaptionExemption :: Lens' Avail (Maybe Text) +aCaptionExemption + = lens _aCaptionExemption + (\ s a -> s{_aCaptionExemption = a}) + +-- | Rating system applied to the version of title within territory of Avail. +-- Rating systems should be formatted as per [EMA ratings +-- spec](http:\/\/www.movielabs.com\/md\/ratings\/) Example: \"MPAA\" +aRatingSystem :: Lens' Avail (Maybe Text) +aRatingSystem + = lens _aRatingSystem + (\ s a -> s{_aRatingSystem = a}) + +-- | First date an Edit could be publically announced as becoming available +-- at a specific future date in territory of Avail. *Not* the Avail start +-- date or pre-order start date. Format is YYYY-MM-DD. Only available for +-- pre-orders. Example: \"2012-12-10\" +aSuppressionLiftDate :: Lens' Avail (Maybe Text) +aSuppressionLiftDate + = lens _aSuppressionLiftDate + (\ s a -> s{_aSuppressionLiftDate = a}) + +-- | The number assigned to the episode within a season. Only available on TV +-- Avails. Example: \"3\". +aEpisodeNumber :: Lens' Avail (Maybe Text) +aEpisodeNumber + = lens _aEpisodeNumber + (\ s a -> s{_aEpisodeNumber = a}) + +-- | Type of pricing that should be applied to this Avail based on how the +-- partner classify them. Example: \"Tier\", \"WSP\", \"SRP\", or +-- \"Category\". +aPriceType :: Lens' Avail (Maybe Text) +aPriceType + = lens _aPriceType (\ s a -> s{_aPriceType = a}) + +-- | Spoken language of the intended audience. Language shall be encoded in +-- accordance with RFC 5646. Example: \"fr\". +aStoreLanguage :: Lens' Avail (Maybe Text) +aStoreLanguage + = lens _aStoreLanguage + (\ s a -> s{_aStoreLanguage = a}) + +-- | Other identifier referring to the episode, as defined by partner. Only +-- available on TV avails. Example: \"rs_googlers_s1_3\". +aEpisodeAltId :: Lens' Avail (Maybe Text) +aEpisodeAltId + = lens _aEpisodeAltId + (\ s a -> s{_aEpisodeAltId = a}) + +-- | Start of term in YYYY-MM-DD format in the timezone of the country of the +-- Avail. Example: \"2013-05-14\". +aStart :: Lens' Avail (Maybe Text) +aStart = lens _aStart (\ s a -> s{_aStart = a}) + +-- | ISO 3166-1 alpha-2 country code for the country or territory of this +-- Avail. For Avails, we use Territory in lieu of Country to comply with +-- EMA specifications. But please note that Territory and Country identify +-- the same thing. Example: \"US\". +aTerritory :: Lens' Avail (Maybe Text) +aTerritory + = lens _aTerritory (\ s a -> s{_aTerritory = a}) + +-- | OPTIONAL.TV Only. Title used by involved parties to refer to this +-- episode. Only available on TV Avails. Example: \"Coding at Google\". +aEpisodeTitleInternalAlias :: Lens' Avail (Maybe Text) +aEpisodeTitleInternalAlias + = lens _aEpisodeTitleInternalAlias + (\ s a -> s{_aEpisodeTitleInternalAlias = a}) + +-- | Type of transaction. +aLicenseType :: Lens' Avail (Maybe Text) +aLicenseType + = lens _aLicenseType (\ s a -> s{_aLicenseType = a}) + +-- | The number assigned to the season within a series. Only available on TV +-- Avails. Example: \"1\". +aSeasonNumber :: Lens' Avail (Maybe Text) +aSeasonNumber + = lens _aSeasonNumber + (\ s a -> s{_aSeasonNumber = a}) + +-- | Work type as enumerated in EMA. +aWorkType :: Lens' Avail (Maybe Text) +aWorkType + = lens _aWorkType (\ s a -> s{_aWorkType = a}) + +-- | Value representing the rating. Ratings should be formatted as per +-- http:\/\/www.movielabs.com\/md\/ratings\/ Example: \"PG\" +aRatingValue :: Lens' Avail (Maybe Text) +aRatingValue + = lens _aRatingValue (\ s a -> s{_aRatingValue = a}) + +-- | Title used by involved parties to refer to this season. Only available +-- on TV Avails. Example: \"Googlers, The\". +aSeasonTitleInternalAlias :: Lens' Avail (Maybe Text) +aSeasonTitleInternalAlias + = lens _aSeasonTitleInternalAlias + (\ s a -> s{_aSeasonTitleInternalAlias = a}) + +-- | Title Identifier. This should be the Title Level EIDR. Example: +-- \"10.5240\/1489-49A2-3956-4B2D-FE16-5\". +aContentId :: Lens' Avail (Maybe Text) +aContentId + = lens _aContentId (\ s a -> s{_aContentId = a}) + +-- | Google-generated ID identifying the video linked to this Avail, once +-- delivered. Not part of EMA Specs. Example: \'gtry456_xc\' +aVideoId :: Lens' Avail (Maybe Text) +aVideoId = lens _aVideoId (\ s a -> s{_aVideoId = a}) + +-- | Other identifier referring to the series, as defined by partner. Only +-- available on TV avails. Example: \"rs_googlers\". +aSeriesAltId :: Lens' Avail (Maybe Text) +aSeriesAltId + = lens _aSeriesAltId (\ s a -> s{_aSeriesAltId = a}) + +-- | End of term in YYYY-MM-DD format in the timezone of the country of the +-- Avail. \"Open\" if no end date is available. Example: \"2019-02-17\" +aEnd :: Lens' Avail (Maybe Text) +aEnd = lens _aEnd (\ s a -> s{_aEnd = a}) + +-- | Title used by involved parties to refer to this series. Only available +-- on TV Avails. Example: \"Googlers, The\". +aSeriesTitleInternalAlias :: Lens' Avail (Maybe Text) +aSeriesTitleInternalAlias + = lens _aSeriesTitleInternalAlias + (\ s a -> s{_aSeriesTitleInternalAlias = a}) + +-- | The name of the studio that owns the Edit referred in the Avail. This is +-- the equivalent of \`studio_name\` in other resources, but it follows the +-- EMA nomenclature. Example: \"Google Films\". +aDisplayName :: Lens' Avail (Maybe Text) +aDisplayName + = lens _aDisplayName (\ s a -> s{_aDisplayName = a}) + +-- | Release date of the Title in earliest released territory. Typically it +-- is just the year, but it is free-form as per EMA spec. Examples: +-- \"1979\", \"Oct 2014\" +aReleaseDate :: Lens' Avail (Maybe Text) +aReleaseDate + = lens _aReleaseDate (\ s a -> s{_aReleaseDate = a}) + +-- | Indicates the format profile covered by the transaction. +aFormatProfile :: Lens' Avail (Maybe Text) +aFormatProfile + = lens _aFormatProfile + (\ s a -> s{_aFormatProfile = a}) + +-- | Value representing the rating reason. Rating reasons should be formatted +-- as per [EMA ratings spec](http:\/\/www.movielabs.com\/md\/ratings\/) and +-- comma-separated for inclusion of multiple reasons. Example: \"L, S, V\" +aRatingReason :: Lens' Avail (Maybe Text) +aRatingReason + = lens _aRatingReason + (\ s a -> s{_aRatingReason = a}) + +-- | Manifestation Identifier. This should be the Manifestation Level EIDR. +-- Example: \"10.2340\/1489-49A2-3956-4B2D-FE16-7\" +aEncodeId :: Lens' Avail (Maybe Text) +aEncodeId + = lens _aEncodeId (\ s a -> s{_aEncodeId = a}) + +-- | Value to be applied to the pricing type. Example: \"4\" or \"2.99\" +aPriceValue :: Lens' Avail (Maybe Text) +aPriceValue + = lens _aPriceValue (\ s a -> s{_aPriceValue = a}) + +-- | Communicating if caption file will be delivered. +aCaptionIncluded :: Lens' Avail (Maybe Bool) +aCaptionIncluded + = lens _aCaptionIncluded + (\ s a -> s{_aCaptionIncluded = a}) + +-- | Edit Identifier. This should be the Edit Level EIDR. Example: +-- \"10.2340\/1489-49A2-3956-4B2D-FE16-6\" +aProductId :: Lens' Avail (Maybe Text) +aProductId + = lens _aProductId (\ s a -> s{_aProductId = a}) + +-- | Other identifier referring to the season, as defined by partner. Only +-- available on TV avails. Example: \"rs_googlers_s1\". +aSeasonAltId :: Lens' Avail (Maybe Text) +aSeasonAltId + = lens _aSeasonAltId (\ s a -> s{_aSeasonAltId = a}) + +-- | Title used by involved parties to refer to this content. Example: +-- \"Googlers, The\". Only available on Movie Avails. +aTitleInternalAlias :: Lens' Avail (Maybe Text) +aTitleInternalAlias + = lens _aTitleInternalAlias + (\ s a -> s{_aTitleInternalAlias = a}) + +instance FromJSON Avail where + parseJSON + = withObject "Avail" + (\ o -> + Avail <$> + (o .:? "altId") <*> (o .:? "pphNames" .!= mempty) <*> + (o .:? "captionExemption") + <*> (o .:? "ratingSystem") + <*> (o .:? "suppressionLiftDate") + <*> (o .:? "episodeNumber") + <*> (o .:? "priceType") + <*> (o .:? "storeLanguage") + <*> (o .:? "episodeAltId") + <*> (o .:? "start") + <*> (o .:? "territory") + <*> (o .:? "episodeTitleInternalAlias") + <*> (o .:? "licenseType") + <*> (o .:? "seasonNumber") + <*> (o .:? "workType") + <*> (o .:? "ratingValue") + <*> (o .:? "seasonTitleInternalAlias") + <*> (o .:? "contentId") + <*> (o .:? "videoId") + <*> (o .:? "seriesAltId") + <*> (o .:? "end") + <*> (o .:? "seriesTitleInternalAlias") + <*> (o .:? "displayName") + <*> (o .:? "releaseDate") + <*> (o .:? "formatProfile") + <*> (o .:? "ratingReason") + <*> (o .:? "encodeId") + <*> (o .:? "priceValue") + <*> (o .:? "captionIncluded") + <*> (o .:? "productId") + <*> (o .:? "seasonAltId") + <*> (o .:? "titleInternalAlias")) + +instance ToJSON Avail where + toJSON Avail{..} + = object + (catMaybes + [("altId" .=) <$> _aAltId, + ("pphNames" .=) <$> _aPphNames, + ("captionExemption" .=) <$> _aCaptionExemption, + ("ratingSystem" .=) <$> _aRatingSystem, + ("suppressionLiftDate" .=) <$> _aSuppressionLiftDate, + ("episodeNumber" .=) <$> _aEpisodeNumber, + ("priceType" .=) <$> _aPriceType, + ("storeLanguage" .=) <$> _aStoreLanguage, + ("episodeAltId" .=) <$> _aEpisodeAltId, + ("start" .=) <$> _aStart, + ("territory" .=) <$> _aTerritory, + ("episodeTitleInternalAlias" .=) <$> + _aEpisodeTitleInternalAlias, + ("licenseType" .=) <$> _aLicenseType, + ("seasonNumber" .=) <$> _aSeasonNumber, + ("workType" .=) <$> _aWorkType, + ("ratingValue" .=) <$> _aRatingValue, + ("seasonTitleInternalAlias" .=) <$> + _aSeasonTitleInternalAlias, + ("contentId" .=) <$> _aContentId, + ("videoId" .=) <$> _aVideoId, + ("seriesAltId" .=) <$> _aSeriesAltId, + ("end" .=) <$> _aEnd, + ("seriesTitleInternalAlias" .=) <$> + _aSeriesTitleInternalAlias, + ("displayName" .=) <$> _aDisplayName, + ("releaseDate" .=) <$> _aReleaseDate, + ("formatProfile" .=) <$> _aFormatProfile, + ("ratingReason" .=) <$> _aRatingReason, + ("encodeId" .=) <$> _aEncodeId, + ("priceValue" .=) <$> _aPriceValue, + ("captionIncluded" .=) <$> _aCaptionIncluded, + ("productId" .=) <$> _aProductId, + ("seasonAltId" .=) <$> _aSeasonAltId, + ("titleInternalAlias" .=) <$> _aTitleInternalAlias]) + +-- | Response to the \'ListAvails\' method. +-- +-- /See:/ 'listAvailsResponse' smart constructor. +data ListAvailsResponse = ListAvailsResponse + { _larNextPageToken :: !(Maybe Text) + , _larAvails :: !(Maybe [Maybe Avail]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListAvailsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'larNextPageToken' +-- +-- * 'larAvails' +listAvailsResponse + :: ListAvailsResponse +listAvailsResponse = + ListAvailsResponse + { _larNextPageToken = Nothing + , _larAvails = Nothing + } + +-- | See _List methods rules_ for info about this field. +larNextPageToken :: Lens' ListAvailsResponse (Maybe Text) +larNextPageToken + = lens _larNextPageToken + (\ s a -> s{_larNextPageToken = a}) + +-- | List of Avails that match the request criteria. +larAvails :: Lens' ListAvailsResponse [Maybe Avail] +larAvails + = lens _larAvails (\ s a -> s{_larAvails = a}) . + _Default + . _Coerce + +instance FromJSON ListAvailsResponse where + parseJSON + = withObject "ListAvailsResponse" + (\ o -> + ListAvailsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "avails" .!= mempty)) + +instance ToJSON ListAvailsResponse where + toJSON ListAvailsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _larNextPageToken, + ("avails" .=) <$> _larAvails]) + +-- | Response to the \'ListOrders\' method. +-- +-- /See:/ 'listOrdersResponse' smart constructor. +data ListOrdersResponse = ListOrdersResponse + { _lorNextPageToken :: !(Maybe Text) + , _lorOrders :: !(Maybe [Maybe Order]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOrdersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorNextPageToken' +-- +-- * 'lorOrders' +listOrdersResponse + :: ListOrdersResponse +listOrdersResponse = + ListOrdersResponse + { _lorNextPageToken = Nothing + , _lorOrders = Nothing + } + +-- | See _List methods rules_ for info about this field. +lorNextPageToken :: Lens' ListOrdersResponse (Maybe Text) +lorNextPageToken + = lens _lorNextPageToken + (\ s a -> s{_lorNextPageToken = a}) + +-- | List of Orders that match the request criteria. +lorOrders :: Lens' ListOrdersResponse [Maybe Order] +lorOrders + = lens _lorOrders (\ s a -> s{_lorOrders = a}) . + _Default + . _Coerce + +instance FromJSON ListOrdersResponse where + parseJSON + = withObject "ListOrdersResponse" + (\ o -> + ListOrdersResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "orders" .!= mempty)) + +instance ToJSON ListOrdersResponse where + toJSON ListOrdersResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lorNextPageToken, + ("orders" .=) <$> _lorOrders]) + +-- | Response to the \'ListExperienceLocales\' method. +-- +-- /See:/ 'listExperienceLocalesResponse' smart constructor. +data ListExperienceLocalesResponse = ListExperienceLocalesResponse + { _lelrNextPageToken :: !(Maybe Text) + , _lelrExperienceLocales :: !(Maybe [Maybe ExperienceLocale]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListExperienceLocalesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lelrNextPageToken' +-- +-- * 'lelrExperienceLocales' +listExperienceLocalesResponse + :: ListExperienceLocalesResponse +listExperienceLocalesResponse = + ListExperienceLocalesResponse + { _lelrNextPageToken = Nothing + , _lelrExperienceLocales = Nothing + } + +-- | See _List methods rules_ for info about this field. +lelrNextPageToken :: Lens' ListExperienceLocalesResponse (Maybe Text) +lelrNextPageToken + = lens _lelrNextPageToken + (\ s a -> s{_lelrNextPageToken = a}) + +-- | List of ExperienceLocales that match the request criteria. +lelrExperienceLocales :: Lens' ListExperienceLocalesResponse [Maybe ExperienceLocale] +lelrExperienceLocales + = lens _lelrExperienceLocales + (\ s a -> s{_lelrExperienceLocales = a}) + . _Default + . _Coerce + +instance FromJSON ListExperienceLocalesResponse where + parseJSON + = withObject "ListExperienceLocalesResponse" + (\ o -> + ListExperienceLocalesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "experienceLocales" .!= mempty)) + +instance ToJSON ListExperienceLocalesResponse where + toJSON ListExperienceLocalesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lelrNextPageToken, + ("experienceLocales" .=) <$> _lelrExperienceLocales]) + +-- | Response to the \'ListStoreInfos\' method. +-- +-- /See:/ 'listStoreInfosResponse' smart constructor. +data ListStoreInfosResponse = ListStoreInfosResponse + { _lsirNextPageToken :: !(Maybe Text) + , _lsirStoreInfos :: !(Maybe [Maybe StoreInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListStoreInfosResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsirNextPageToken' +-- +-- * 'lsirStoreInfos' +listStoreInfosResponse + :: ListStoreInfosResponse +listStoreInfosResponse = + ListStoreInfosResponse + { _lsirNextPageToken = Nothing + , _lsirStoreInfos = Nothing + } + +-- | See \'List methods rules\' for info about this field. +lsirNextPageToken :: Lens' ListStoreInfosResponse (Maybe Text) +lsirNextPageToken + = lens _lsirNextPageToken + (\ s a -> s{_lsirNextPageToken = a}) + +-- | List of StoreInfos that match the request criteria. +lsirStoreInfos :: Lens' ListStoreInfosResponse [Maybe StoreInfo] +lsirStoreInfos + = lens _lsirStoreInfos + (\ s a -> s{_lsirStoreInfos = a}) + . _Default + . _Coerce + +instance FromJSON ListStoreInfosResponse where + parseJSON + = withObject "ListStoreInfosResponse" + (\ o -> + ListStoreInfosResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "storeInfos" .!= mempty)) + +instance ToJSON ListStoreInfosResponse where + toJSON ListStoreInfosResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lsirNextPageToken, + ("storeInfos" .=) <$> _lsirStoreInfos]) + +-- | An ExperienceLocale tracks the fulfillment of a Title in a country using +-- a specific language, when delivered using component-based delivery. For +-- example, a Title in Switzerland might have 3 ExperienceLocales: they +-- both share the same country (\"CH\"), but each has different languages +-- (\"de\", \"fr\", and \"it\"). Each ExperienceLocale is uniquely +-- identified by an \`el_id\`, which is generated by Google. Externally, an +-- ExperienceLocale can also be identified by partners using its EIDR IDs, +-- AltCutID or \`custom_id\` (when provided). +-- +-- /See:/ 'experienceLocale' smart constructor. +data ExperienceLocale = ExperienceLocale + { _elTitleLevelEidr :: !(Maybe Text) + , _elStatus :: !(Maybe Text) + , _elPphNames :: !(Maybe [Text]) + , _elInventoryId :: !(Maybe Text) + , _elEarliestAvailStartTime :: !(Maybe Text) + , _elStudioName :: !(Maybe Text) + , _elPriority :: !(Maybe Double) + , _elCustomIds :: !(Maybe [Text]) + , _elCreatedTime :: !(Maybe Text) + , _elCountry :: !(Maybe Text) + , _elTrailerId :: !(Maybe Text) + , _elPresentationId :: !(Maybe Text) + , _elAltCutId :: !(Maybe Text) + , _elChannelId :: !(Maybe Text) + , _elApprovedTime :: !(Maybe Text) + , _elPlayableSequenceId :: !(Maybe Text) + , _elElId :: !(Maybe Text) + , _elVideoId :: !(Maybe Text) + , _elName :: !(Maybe Text) + , _elLanguage :: !(Maybe Text) + , _elEditLevelEidr :: !(Maybe Text) + , _elType :: !(Maybe Text) + , _elNormalizedPriority :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExperienceLocale' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'elTitleLevelEidr' +-- +-- * 'elStatus' +-- +-- * 'elPphNames' +-- +-- * 'elInventoryId' +-- +-- * 'elEarliestAvailStartTime' +-- +-- * 'elStudioName' +-- +-- * 'elPriority' +-- +-- * 'elCustomIds' +-- +-- * 'elCreatedTime' +-- +-- * 'elCountry' +-- +-- * 'elTrailerId' +-- +-- * 'elPresentationId' +-- +-- * 'elAltCutId' +-- +-- * 'elChannelId' +-- +-- * 'elApprovedTime' +-- +-- * 'elPlayableSequenceId' +-- +-- * 'elElId' +-- +-- * 'elVideoId' +-- +-- * 'elName' +-- +-- * 'elLanguage' +-- +-- * 'elEditLevelEidr' +-- +-- * 'elType' +-- +-- * 'elNormalizedPriority' +experienceLocale + :: ExperienceLocale +experienceLocale = + ExperienceLocale + { _elTitleLevelEidr = Nothing + , _elStatus = Nothing + , _elPphNames = Nothing + , _elInventoryId = Nothing + , _elEarliestAvailStartTime = Nothing + , _elStudioName = Nothing + , _elPriority = Nothing + , _elCustomIds = Nothing + , _elCreatedTime = Nothing + , _elCountry = Nothing + , _elTrailerId = Nothing + , _elPresentationId = Nothing + , _elAltCutId = Nothing + , _elChannelId = Nothing + , _elApprovedTime = Nothing + , _elPlayableSequenceId = Nothing + , _elElId = Nothing + , _elVideoId = Nothing + , _elName = Nothing + , _elLanguage = Nothing + , _elEditLevelEidr = Nothing + , _elType = Nothing + , _elNormalizedPriority = Nothing + } + +-- | Title-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-5\". +elTitleLevelEidr :: Lens' ExperienceLocale (Maybe Text) +elTitleLevelEidr + = lens _elTitleLevelEidr + (\ s a -> s{_elTitleLevelEidr = a}) + +-- | High-level status of the ExperienceLocale. +elStatus :: Lens' ExperienceLocale (Maybe Text) +elStatus = lens _elStatus (\ s a -> s{_elStatus = a}) + +-- | Name of the post-production houses that manage the ExperienceLocale. +elPphNames :: Lens' ExperienceLocale [Text] +elPphNames + = lens _elPphNames (\ s a -> s{_elPphNames = a}) . + _Default + . _Coerce + +-- | InventoryID as defined in the EMA specs. +elInventoryId :: Lens' ExperienceLocale (Maybe Text) +elInventoryId + = lens _elInventoryId + (\ s a -> s{_elInventoryId = a}) + +-- | Timestamp of the earliest start date of the Avails linked to this +-- ExperienceLocale. +elEarliestAvailStartTime :: Lens' ExperienceLocale (Maybe Text) +elEarliestAvailStartTime + = lens _elEarliestAvailStartTime + (\ s a -> s{_elEarliestAvailStartTime = a}) + +-- | Name of the studio that owns the ExperienceLocale. +elStudioName :: Lens' ExperienceLocale (Maybe Text) +elStudioName + = lens _elStudioName (\ s a -> s{_elStudioName = a}) + +-- | ExperienceLocale priority, as defined by Google. The higher the value, +-- the higher the priority. Example: 90 +elPriority :: Lens' ExperienceLocale (Maybe Double) +elPriority + = lens _elPriority (\ s a -> s{_elPriority = a}) + +-- | List of custom IDs (defined by the partner) linked to this +-- ExperienceLocale. Example: \"R86241\" +elCustomIds :: Lens' ExperienceLocale [Text] +elCustomIds + = lens _elCustomIds (\ s a -> s{_elCustomIds = a}) . + _Default + . _Coerce + +-- | Timestamp when the ExperienceLocale was created. +elCreatedTime :: Lens' ExperienceLocale (Maybe Text) +elCreatedTime + = lens _elCreatedTime + (\ s a -> s{_elCreatedTime = a}) + +-- | Country where the ExperienceLocale is available, using the \"ISO 3166-1 +-- alpha-2\" format. Example: \"US\". +elCountry :: Lens' ExperienceLocale (Maybe Text) +elCountry + = lens _elCountry (\ s a -> s{_elCountry = a}) + +-- | Trailer ID, as defined by Google, linked to the trailer video in the +-- ExperienceLocale. Example: \'gtry457_tr\'. +elTrailerId :: Lens' ExperienceLocale (Maybe Text) +elTrailerId + = lens _elTrailerId (\ s a -> s{_elTrailerId = a}) + +-- | PresentationID as defined in the EMA specs. +elPresentationId :: Lens' ExperienceLocale (Maybe Text) +elPresentationId + = lens _elPresentationId + (\ s a -> s{_elPresentationId = a}) + +-- | Alternative Cut ID, sometimes available in lieu of the main Edit-level +-- EIDR ID. This is not an EIDR ID, but a Partner-provided ID. Example: +-- \"206346_79838\". +elAltCutId :: Lens' ExperienceLocale (Maybe Text) +elAltCutId + = lens _elAltCutId (\ s a -> s{_elAltCutId = a}) + +-- | YouTube Channel ID linked to the ExperienceLocale. Example: +-- \"UCRG64darCZhb\". +elChannelId :: Lens' ExperienceLocale (Maybe Text) +elChannelId + = lens _elChannelId (\ s a -> s{_elChannelId = a}) + +-- | Timestamp when the ExperienceLocale was approved. +elApprovedTime :: Lens' ExperienceLocale (Maybe Text) +elApprovedTime + = lens _elApprovedTime + (\ s a -> s{_elApprovedTime = a}) + +-- | PlayableSequenceID as defined in the EMA specs. +elPlayableSequenceId :: Lens' ExperienceLocale (Maybe Text) +elPlayableSequenceId + = lens _elPlayableSequenceId + (\ s a -> s{_elPlayableSequenceId = a}) + +-- | ID internally generated by Google to uniquely identify a +-- ExperienceLocale. Example: \'KRZiVjY9h7t\' +elElId :: Lens' ExperienceLocale (Maybe Text) +elElId = lens _elElId (\ s a -> s{_elElId = a}) + +-- | Video ID, as defined by Google, linked to the feature video in the +-- ExperienceLocale. Example: \'gtry456_xc\'. +elVideoId :: Lens' ExperienceLocale (Maybe Text) +elVideoId + = lens _elVideoId (\ s a -> s{_elVideoId = a}) + +-- | Default Edit name, usually in the language of the country of origin. +-- Example: \"Googlers, The\". +elName :: Lens' ExperienceLocale (Maybe Text) +elName = lens _elName (\ s a -> s{_elName = a}) + +-- | Language of the ExperienceLocale, using the \"BCP 47\" format. Examples: +-- \"en\", \"en-US\", \"es\", \"es-419\". +elLanguage :: Lens' ExperienceLocale (Maybe Text) +elLanguage + = lens _elLanguage (\ s a -> s{_elLanguage = a}) + +-- | Edit-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-6\". +elEditLevelEidr :: Lens' ExperienceLocale (Maybe Text) +elEditLevelEidr + = lens _elEditLevelEidr + (\ s a -> s{_elEditLevelEidr = a}) + +-- | Type of the Edit linked to the ExperienceLocale. +elType :: Lens' ExperienceLocale (Maybe Text) +elType = lens _elType (\ s a -> s{_elType = a}) + +-- | A simpler representation of the priority. +elNormalizedPriority :: Lens' ExperienceLocale (Maybe Text) +elNormalizedPriority + = lens _elNormalizedPriority + (\ s a -> s{_elNormalizedPriority = a}) + +instance FromJSON ExperienceLocale where + parseJSON + = withObject "ExperienceLocale" + (\ o -> + ExperienceLocale <$> + (o .:? "titleLevelEidr") <*> (o .:? "status") <*> + (o .:? "pphNames" .!= mempty) + <*> (o .:? "inventoryId") + <*> (o .:? "earliestAvailStartTime") + <*> (o .:? "studioName") + <*> (o .:? "priority") + <*> (o .:? "customIds" .!= mempty) + <*> (o .:? "createdTime") + <*> (o .:? "country") + <*> (o .:? "trailerId") + <*> (o .:? "presentationId") + <*> (o .:? "altCutId") + <*> (o .:? "channelId") + <*> (o .:? "approvedTime") + <*> (o .:? "playableSequenceId") + <*> (o .:? "elId") + <*> (o .:? "videoId") + <*> (o .:? "name") + <*> (o .:? "language") + <*> (o .:? "editLevelEidr") + <*> (o .:? "type") + <*> (o .:? "normalizedPriority")) + +instance ToJSON ExperienceLocale where + toJSON ExperienceLocale{..} + = object + (catMaybes + [("titleLevelEidr" .=) <$> _elTitleLevelEidr, + ("status" .=) <$> _elStatus, + ("pphNames" .=) <$> _elPphNames, + ("inventoryId" .=) <$> _elInventoryId, + ("earliestAvailStartTime" .=) <$> + _elEarliestAvailStartTime, + ("studioName" .=) <$> _elStudioName, + ("priority" .=) <$> _elPriority, + ("customIds" .=) <$> _elCustomIds, + ("createdTime" .=) <$> _elCreatedTime, + ("country" .=) <$> _elCountry, + ("trailerId" .=) <$> _elTrailerId, + ("presentationId" .=) <$> _elPresentationId, + ("altCutId" .=) <$> _elAltCutId, + ("channelId" .=) <$> _elChannelId, + ("approvedTime" .=) <$> _elApprovedTime, + ("playableSequenceId" .=) <$> _elPlayableSequenceId, + ("elId" .=) <$> _elElId, + ("videoId" .=) <$> _elVideoId, + ("name" .=) <$> _elName, + ("language" .=) <$> _elLanguage, + ("editLevelEidr" .=) <$> _elEditLevelEidr, + ("type" .=) <$> _elType, + ("normalizedPriority" .=) <$> _elNormalizedPriority]) + +-- | An Order tracks the fulfillment of an Edit when delivered using the +-- legacy, non-component-based delivery. Each Order is uniquely identified +-- by an \`order_id\`, which is generated by Google. Externally, Orders can +-- also be identified by partners using its \`custom_id\` (when provided). +-- +-- /See:/ 'order' smart constructor. +data Order = Order + { _oStatus :: !(Maybe Text) + , _oShowName :: !(Maybe Text) + , _oPphName :: !(Maybe Text) + , _oEarliestAvailStartTime :: !(Maybe Text) + , _oStudioName :: !(Maybe Text) + , _oReceivedTime :: !(Maybe Text) + , _oPriority :: !(Maybe Double) + , _oChannelId :: !(Maybe Text) + , _oCustomId :: !(Maybe Text) + , _oApprovedTime :: !(Maybe Text) + , _oCountries :: !(Maybe [Text]) + , _oChannelName :: !(Maybe Text) + , _oVideoId :: !(Maybe Text) + , _oLegacyPriority :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oRejectionNote :: !(Maybe Text) + , _oOrderedTime :: !(Maybe Text) + , _oSeasonName :: !(Maybe Text) + , _oStatusDetail :: !(Maybe Text) + , _oType :: !(Maybe Text) + , _oNormalizedPriority :: !(Maybe Text) + , _oOrderId :: !(Maybe Text) + , _oEpisodeName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Order' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oStatus' +-- +-- * 'oShowName' +-- +-- * 'oPphName' +-- +-- * 'oEarliestAvailStartTime' +-- +-- * 'oStudioName' +-- +-- * 'oReceivedTime' +-- +-- * 'oPriority' +-- +-- * 'oChannelId' +-- +-- * 'oCustomId' +-- +-- * 'oApprovedTime' +-- +-- * 'oCountries' +-- +-- * 'oChannelName' +-- +-- * 'oVideoId' +-- +-- * 'oLegacyPriority' +-- +-- * 'oName' +-- +-- * 'oRejectionNote' +-- +-- * 'oOrderedTime' +-- +-- * 'oSeasonName' +-- +-- * 'oStatusDetail' +-- +-- * 'oType' +-- +-- * 'oNormalizedPriority' +-- +-- * 'oOrderId' +-- +-- * 'oEpisodeName' +order + :: Order +order = + Order + { _oStatus = Nothing + , _oShowName = Nothing + , _oPphName = Nothing + , _oEarliestAvailStartTime = Nothing + , _oStudioName = Nothing + , _oReceivedTime = Nothing + , _oPriority = Nothing + , _oChannelId = Nothing + , _oCustomId = Nothing + , _oApprovedTime = Nothing + , _oCountries = Nothing + , _oChannelName = Nothing + , _oVideoId = Nothing + , _oLegacyPriority = Nothing + , _oName = Nothing + , _oRejectionNote = Nothing + , _oOrderedTime = Nothing + , _oSeasonName = Nothing + , _oStatusDetail = Nothing + , _oType = Nothing + , _oNormalizedPriority = Nothing + , _oOrderId = Nothing + , _oEpisodeName = Nothing + } + +-- | High-level status of the order. +oStatus :: Lens' Order (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | Default Show name, usually in the language of the country of origin. +-- Only available for TV Edits Example: \"Googlers, The\". +oShowName :: Lens' Order (Maybe Text) +oShowName + = lens _oShowName (\ s a -> s{_oShowName = a}) + +-- | Name of the post-production house that manages the Edit ordered. +oPphName :: Lens' Order (Maybe Text) +oPphName = lens _oPphName (\ s a -> s{_oPphName = a}) + +-- | Timestamp of the earliest start date of the Avails linked to this Order. +oEarliestAvailStartTime :: Lens' Order (Maybe Text) +oEarliestAvailStartTime + = lens _oEarliestAvailStartTime + (\ s a -> s{_oEarliestAvailStartTime = a}) + +-- | Name of the studio that owns the Edit ordered. +oStudioName :: Lens' Order (Maybe Text) +oStudioName + = lens _oStudioName (\ s a -> s{_oStudioName = a}) + +-- | Timestamp when the Order was fulfilled. +oReceivedTime :: Lens' Order (Maybe Text) +oReceivedTime + = lens _oReceivedTime + (\ s a -> s{_oReceivedTime = a}) + +-- | Order priority, as defined by Google. The higher the value, the higher +-- the priority. Example: 90 +oPriority :: Lens' Order (Maybe Double) +oPriority + = lens _oPriority (\ s a -> s{_oPriority = a}) + +-- | YouTube Channel ID that should be used to fulfill the Order. Example: +-- \"UCRG64darCZhb\". +oChannelId :: Lens' Order (Maybe Text) +oChannelId + = lens _oChannelId (\ s a -> s{_oChannelId = a}) + +-- | ID that can be used to externally identify an Order. This ID is provided +-- by partners when submitting the Avails. Example: \'GOOGLER_2006\' +oCustomId :: Lens' Order (Maybe Text) +oCustomId + = lens _oCustomId (\ s a -> s{_oCustomId = a}) + +-- | Timestamp when the Order was approved. +oApprovedTime :: Lens' Order (Maybe Text) +oApprovedTime + = lens _oApprovedTime + (\ s a -> s{_oApprovedTime = a}) + +-- | Countries where the Order is available, using the \"ISO 3166-1 alpha-2\" +-- format (example: \"US\"). +oCountries :: Lens' Order [Text] +oCountries + = lens _oCountries (\ s a -> s{_oCountries = a}) . + _Default + . _Coerce + +-- | YouTube Channel Name that should be used to fulfill the Order. Example: +-- \"Google_channel\". +oChannelName :: Lens' Order (Maybe Text) +oChannelName + = lens _oChannelName (\ s a -> s{_oChannelName = a}) + +-- | Google-generated ID identifying the video linked to this Order, once +-- delivered. Example: \'gtry456_xc\'. +oVideoId :: Lens' Order (Maybe Text) +oVideoId = lens _oVideoId (\ s a -> s{_oVideoId = a}) + +-- | Legacy Order priority, as defined by Google. Example: \'P0\' +oLegacyPriority :: Lens' Order (Maybe Text) +oLegacyPriority + = lens _oLegacyPriority + (\ s a -> s{_oLegacyPriority = a}) + +-- | Default Edit name, usually in the language of the country of origin. +-- Example: \"Googlers, The\". +oName :: Lens' Order (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | Field explaining why an Order has been rejected. Example: \"Trailer +-- audio is 2ch mono, please re-deliver in stereo\". +oRejectionNote :: Lens' Order (Maybe Text) +oRejectionNote + = lens _oRejectionNote + (\ s a -> s{_oRejectionNote = a}) + +-- | Timestamp when the Order was created. +oOrderedTime :: Lens' Order (Maybe Text) +oOrderedTime + = lens _oOrderedTime (\ s a -> s{_oOrderedTime = a}) + +-- | Default Season name, usually in the language of the country of origin. +-- Only available for TV Edits Example: \"Googlers, The - A Brave New +-- World\". +oSeasonName :: Lens' Order (Maybe Text) +oSeasonName + = lens _oSeasonName (\ s a -> s{_oSeasonName = a}) + +-- | Detailed status of the order +oStatusDetail :: Lens' Order (Maybe Text) +oStatusDetail + = lens _oStatusDetail + (\ s a -> s{_oStatusDetail = a}) + +-- | Type of the Edit linked to the Order. +oType :: Lens' Order (Maybe Text) +oType = lens _oType (\ s a -> s{_oType = a}) + +-- | A simpler representation of the priority. +oNormalizedPriority :: Lens' Order (Maybe Text) +oNormalizedPriority + = lens _oNormalizedPriority + (\ s a -> s{_oNormalizedPriority = a}) + +-- | ID internally generated by Google to uniquely identify an Order. +-- Example: \'abcde12_x\' +oOrderId :: Lens' Order (Maybe Text) +oOrderId = lens _oOrderId (\ s a -> s{_oOrderId = a}) + +-- | Default Episode name, usually in the language of the country of origin. +-- Only available for TV Edits Example: \"Googlers, The - Pilot\". +oEpisodeName :: Lens' Order (Maybe Text) +oEpisodeName + = lens _oEpisodeName (\ s a -> s{_oEpisodeName = a}) + +instance FromJSON Order where + parseJSON + = withObject "Order" + (\ o -> + Order <$> + (o .:? "status") <*> (o .:? "showName") <*> + (o .:? "pphName") + <*> (o .:? "earliestAvailStartTime") + <*> (o .:? "studioName") + <*> (o .:? "receivedTime") + <*> (o .:? "priority") + <*> (o .:? "channelId") + <*> (o .:? "customId") + <*> (o .:? "approvedTime") + <*> (o .:? "countries" .!= mempty) + <*> (o .:? "channelName") + <*> (o .:? "videoId") + <*> (o .:? "legacyPriority") + <*> (o .:? "name") + <*> (o .:? "rejectionNote") + <*> (o .:? "orderedTime") + <*> (o .:? "seasonName") + <*> (o .:? "statusDetail") + <*> (o .:? "type") + <*> (o .:? "normalizedPriority") + <*> (o .:? "orderId") + <*> (o .:? "episodeName")) + +instance ToJSON Order where + toJSON Order{..} + = object + (catMaybes + [("status" .=) <$> _oStatus, + ("showName" .=) <$> _oShowName, + ("pphName" .=) <$> _oPphName, + ("earliestAvailStartTime" .=) <$> + _oEarliestAvailStartTime, + ("studioName" .=) <$> _oStudioName, + ("receivedTime" .=) <$> _oReceivedTime, + ("priority" .=) <$> _oPriority, + ("channelId" .=) <$> _oChannelId, + ("customId" .=) <$> _oCustomId, + ("approvedTime" .=) <$> _oApprovedTime, + ("countries" .=) <$> _oCountries, + ("channelName" .=) <$> _oChannelName, + ("videoId" .=) <$> _oVideoId, + ("legacyPriority" .=) <$> _oLegacyPriority, + ("name" .=) <$> _oName, + ("rejectionNote" .=) <$> _oRejectionNote, + ("orderedTime" .=) <$> _oOrderedTime, + ("seasonName" .=) <$> _oSeasonName, + ("statusDetail" .=) <$> _oStatusDetail, + ("type" .=) <$> _oType, + ("normalizedPriority" .=) <$> _oNormalizedPriority, + ("orderId" .=) <$> _oOrderId, + ("episodeName" .=) <$> _oEpisodeName]) + +-- | Information about a playable sequence (video) associated with an Edit +-- and available at the Google Play Store. Internally, each StoreInfo is +-- uniquely identified by a \`video_id\` and \`country\`. Externally, +-- Title-level EIDR or Edit-level EIDR, if provided, can also be used to +-- identify a specific title or edit in a country. +-- +-- /See:/ 'storeInfo' smart constructor. +data StoreInfo = StoreInfo + { _siTitleLevelEidr :: !(Maybe Text) + , _siPphNames :: !(Maybe [Text]) + , _siShowName :: !(Maybe Text) + , _siSubtitles :: !(Maybe [Text]) + , _siStudioName :: !(Maybe Text) + , _siAudioTracks :: !(Maybe [Text]) + , _siEpisodeNumber :: !(Maybe Text) + , _siCountry :: !(Maybe Text) + , _siTrailerId :: !(Maybe Text) + , _siHasInfoCards :: !(Maybe Bool) + , _siLiveTime :: !(Maybe Text) + , _siSeasonNumber :: !(Maybe Text) + , _siHasHdOffer :: !(Maybe Bool) + , _siVideoId :: !(Maybe Text) + , _siName :: !(Maybe Text) + , _siHasVodOffer :: !(Maybe Bool) + , _siSeasonName :: !(Maybe Text) + , _siHasSdOffer :: !(Maybe Bool) + , _siMid :: !(Maybe Text) + , _siEditLevelEidr :: !(Maybe Text) + , _siType :: !(Maybe Text) + , _siHasEstOffer :: !(Maybe Bool) + , _siHasAudio51 :: !(Maybe Bool) + , _siSeasonId :: !(Maybe Text) + , _siShowId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StoreInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siTitleLevelEidr' +-- +-- * 'siPphNames' +-- +-- * 'siShowName' +-- +-- * 'siSubtitles' +-- +-- * 'siStudioName' +-- +-- * 'siAudioTracks' +-- +-- * 'siEpisodeNumber' +-- +-- * 'siCountry' +-- +-- * 'siTrailerId' +-- +-- * 'siHasInfoCards' +-- +-- * 'siLiveTime' +-- +-- * 'siSeasonNumber' +-- +-- * 'siHasHdOffer' +-- +-- * 'siVideoId' +-- +-- * 'siName' +-- +-- * 'siHasVodOffer' +-- +-- * 'siSeasonName' +-- +-- * 'siHasSdOffer' +-- +-- * 'siMid' +-- +-- * 'siEditLevelEidr' +-- +-- * 'siType' +-- +-- * 'siHasEstOffer' +-- +-- * 'siHasAudio51' +-- +-- * 'siSeasonId' +-- +-- * 'siShowId' +storeInfo + :: StoreInfo +storeInfo = + StoreInfo + { _siTitleLevelEidr = Nothing + , _siPphNames = Nothing + , _siShowName = Nothing + , _siSubtitles = Nothing + , _siStudioName = Nothing + , _siAudioTracks = Nothing + , _siEpisodeNumber = Nothing + , _siCountry = Nothing + , _siTrailerId = Nothing + , _siHasInfoCards = Nothing + , _siLiveTime = Nothing + , _siSeasonNumber = Nothing + , _siHasHdOffer = Nothing + , _siVideoId = Nothing + , _siName = Nothing + , _siHasVodOffer = Nothing + , _siSeasonName = Nothing + , _siHasSdOffer = Nothing + , _siMid = Nothing + , _siEditLevelEidr = Nothing + , _siType = Nothing + , _siHasEstOffer = Nothing + , _siHasAudio51 = Nothing + , _siSeasonId = Nothing + , _siShowId = Nothing + } + +-- | Title-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-5\". +siTitleLevelEidr :: Lens' StoreInfo (Maybe Text) +siTitleLevelEidr + = lens _siTitleLevelEidr + (\ s a -> s{_siTitleLevelEidr = a}) + +-- | Name of the post-production houses that manage the Edit. +siPphNames :: Lens' StoreInfo [Text] +siPphNames + = lens _siPphNames (\ s a -> s{_siPphNames = a}) . + _Default + . _Coerce + +-- | Default Show name, usually in the language of the country of origin. +-- Only available for TV Edits Example: \"Googlers, The\". +siShowName :: Lens' StoreInfo (Maybe Text) +siShowName + = lens _siShowName (\ s a -> s{_siShowName = a}) + +-- | Subtitles available for this Edit. +siSubtitles :: Lens' StoreInfo [Text] +siSubtitles + = lens _siSubtitles (\ s a -> s{_siSubtitles = a}) . + _Default + . _Coerce + +-- | Name of the studio that owns the Edit ordered. +siStudioName :: Lens' StoreInfo (Maybe Text) +siStudioName + = lens _siStudioName (\ s a -> s{_siStudioName = a}) + +-- | Audio tracks available for this Edit. +siAudioTracks :: Lens' StoreInfo [Text] +siAudioTracks + = lens _siAudioTracks + (\ s a -> s{_siAudioTracks = a}) + . _Default + . _Coerce + +-- | The number assigned to the episode within a season. Only available on TV +-- Edits. Example: \"1\". +siEpisodeNumber :: Lens' StoreInfo (Maybe Text) +siEpisodeNumber + = lens _siEpisodeNumber + (\ s a -> s{_siEpisodeNumber = a}) + +-- | Country where Edit is available in ISO 3166-1 alpha-2 country code. +-- Example: \"US\". +siCountry :: Lens' StoreInfo (Maybe Text) +siCountry + = lens _siCountry (\ s a -> s{_siCountry = a}) + +-- | Google-generated ID identifying the trailer linked to the Edit. Example: +-- \'bhd_4e_cx\' +siTrailerId :: Lens' StoreInfo (Maybe Text) +siTrailerId + = lens _siTrailerId (\ s a -> s{_siTrailerId = a}) + +-- | Whether the Edit has info cards. +siHasInfoCards :: Lens' StoreInfo (Maybe Bool) +siHasInfoCards + = lens _siHasInfoCards + (\ s a -> s{_siHasInfoCards = a}) + +-- | Timestamp when the Edit went live on the Store. +siLiveTime :: Lens' StoreInfo (Maybe Text) +siLiveTime + = lens _siLiveTime (\ s a -> s{_siLiveTime = a}) + +-- | The number assigned to the season within a show. Only available on TV +-- Edits. Example: \"1\". +siSeasonNumber :: Lens' StoreInfo (Maybe Text) +siSeasonNumber + = lens _siSeasonNumber + (\ s a -> s{_siSeasonNumber = a}) + +-- | Whether the Edit has a HD offer. +siHasHdOffer :: Lens' StoreInfo (Maybe Bool) +siHasHdOffer + = lens _siHasHdOffer (\ s a -> s{_siHasHdOffer = a}) + +-- | Google-generated ID identifying the video linked to the Edit. Example: +-- \'gtry456_xc\' +siVideoId :: Lens' StoreInfo (Maybe Text) +siVideoId + = lens _siVideoId (\ s a -> s{_siVideoId = a}) + +-- | Default Edit name, usually in the language of the country of origin. +-- Example: \"Googlers, The\". +siName :: Lens' StoreInfo (Maybe Text) +siName = lens _siName (\ s a -> s{_siName = a}) + +-- | Whether the Edit has a VOD offer. +siHasVodOffer :: Lens' StoreInfo (Maybe Bool) +siHasVodOffer + = lens _siHasVodOffer + (\ s a -> s{_siHasVodOffer = a}) + +-- | Default Season name, usually in the language of the country of origin. +-- Only available for TV Edits Example: \"Googlers, The - A Brave New +-- World\". +siSeasonName :: Lens' StoreInfo (Maybe Text) +siSeasonName + = lens _siSeasonName (\ s a -> s{_siSeasonName = a}) + +-- | Whether the Edit has a SD offer. +siHasSdOffer :: Lens' StoreInfo (Maybe Bool) +siHasSdOffer + = lens _siHasSdOffer (\ s a -> s{_siHasSdOffer = a}) + +-- | Knowledge Graph ID associated to this Edit, if available. This ID links +-- the Edit to its knowledge entity, externally accessible at +-- http:\/\/freebase.com. In the absense of Title EIDR or Edit EIDR, this +-- ID helps link together multiple Edits across countries. Example: +-- \'\/m\/0ffx29\' +siMid :: Lens' StoreInfo (Maybe Text) +siMid = lens _siMid (\ s a -> s{_siMid = a}) + +-- | Edit-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-6\". +siEditLevelEidr :: Lens' StoreInfo (Maybe Text) +siEditLevelEidr + = lens _siEditLevelEidr + (\ s a -> s{_siEditLevelEidr = a}) + +-- | Edit type, like Movie, Episode or Season. +siType :: Lens' StoreInfo (Maybe Text) +siType = lens _siType (\ s a -> s{_siType = a}) + +-- | Whether the Edit has a EST offer. +siHasEstOffer :: Lens' StoreInfo (Maybe Bool) +siHasEstOffer + = lens _siHasEstOffer + (\ s a -> s{_siHasEstOffer = a}) + +-- | Whether the Edit has a 5.1 channel audio track. +siHasAudio51 :: Lens' StoreInfo (Maybe Bool) +siHasAudio51 + = lens _siHasAudio51 (\ s a -> s{_siHasAudio51 = a}) + +-- | Google-generated ID identifying the season linked to the Edit. Only +-- available for TV Edits. Example: \'ster23ex\' +siSeasonId :: Lens' StoreInfo (Maybe Text) +siSeasonId + = lens _siSeasonId (\ s a -> s{_siSeasonId = a}) + +-- | Google-generated ID identifying the show linked to the Edit. Only +-- available for TV Edits. Example: \'et2hsue_x\' +siShowId :: Lens' StoreInfo (Maybe Text) +siShowId = lens _siShowId (\ s a -> s{_siShowId = a}) + +instance FromJSON StoreInfo where + parseJSON + = withObject "StoreInfo" + (\ o -> + StoreInfo <$> + (o .:? "titleLevelEidr") <*> + (o .:? "pphNames" .!= mempty) + <*> (o .:? "showName") + <*> (o .:? "subtitles" .!= mempty) + <*> (o .:? "studioName") + <*> (o .:? "audioTracks" .!= mempty) + <*> (o .:? "episodeNumber") + <*> (o .:? "country") + <*> (o .:? "trailerId") + <*> (o .:? "hasInfoCards") + <*> (o .:? "liveTime") + <*> (o .:? "seasonNumber") + <*> (o .:? "hasHdOffer") + <*> (o .:? "videoId") + <*> (o .:? "name") + <*> (o .:? "hasVodOffer") + <*> (o .:? "seasonName") + <*> (o .:? "hasSdOffer") + <*> (o .:? "mid") + <*> (o .:? "editLevelEidr") + <*> (o .:? "type") + <*> (o .:? "hasEstOffer") + <*> (o .:? "hasAudio51") + <*> (o .:? "seasonId") + <*> (o .:? "showId")) + +instance ToJSON StoreInfo where + toJSON StoreInfo{..} + = object + (catMaybes + [("titleLevelEidr" .=) <$> _siTitleLevelEidr, + ("pphNames" .=) <$> _siPphNames, + ("showName" .=) <$> _siShowName, + ("subtitles" .=) <$> _siSubtitles, + ("studioName" .=) <$> _siStudioName, + ("audioTracks" .=) <$> _siAudioTracks, + ("episodeNumber" .=) <$> _siEpisodeNumber, + ("country" .=) <$> _siCountry, + ("trailerId" .=) <$> _siTrailerId, + ("hasInfoCards" .=) <$> _siHasInfoCards, + ("liveTime" .=) <$> _siLiveTime, + ("seasonNumber" .=) <$> _siSeasonNumber, + ("hasHdOffer" .=) <$> _siHasHdOffer, + ("videoId" .=) <$> _siVideoId, + ("name" .=) <$> _siName, + ("hasVodOffer" .=) <$> _siHasVodOffer, + ("seasonName" .=) <$> _siSeasonName, + ("hasSdOffer" .=) <$> _siHasSdOffer, + ("mid" .=) <$> _siMid, + ("editLevelEidr" .=) <$> _siEditLevelEidr, + ("type" .=) <$> _siType, + ("hasEstOffer" .=) <$> _siHasEstOffer, + ("hasAudio51" .=) <$> _siHasAudio51, + ("seasonId" .=) <$> _siSeasonId, + ("showId" .=) <$> _siShowId]) diff --git a/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Sum.hs b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Sum.hs new file mode 100644 index 000000000..a121a240e --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlayMoviesPartner.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlayMoviesPartner.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Avails/List.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Avails/List.hs new file mode 100644 index 000000000..cfc169d0b --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Avails/List.hs @@ -0,0 +1,331 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.Avails.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List Avails owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsAvailsList@. +module PlayMoviesPartner.Accounts.Avails.List + ( + -- * REST Resource + AccountsAvailsListAPI + + -- * Creating a Request + , accountsAvailsList + , AccountsAvailsList + + -- * Request Lenses + , aalAltId + , aalPphNames + , aalXgafv + , aalStudioNames + , aalQuotaUser + , aalVideoIds + , aalPrettyPrint + , aalUploadProtocol + , aalPp + , aalAccessToken + , aalUploadType + , aalTerritories + , aalAccountId + , aalBearerToken + , aalKey + , aalPageToken + , aalTitle + , aalOauthToken + , aalPageSize + , aalFields + , aalCallback + , aalAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsAvailsList@ which the +-- 'AccountsAvailsList' request conforms to. +type AccountsAvailsListAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "avails" :> + QueryParam "altId" Text :> + QueryParams "pphNames" Text :> + QueryParams "studioNames" Text :> + QueryParams "videoIds" Text :> + QueryParams "territories" Text :> + QueryParam "pageToken" Text :> + QueryParam "title" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListAvailsResponse + +-- | List Avails owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ 'accountsAvailsList' smart constructor. +data AccountsAvailsList = AccountsAvailsList + { _aalAltId :: !(Maybe Text) + , _aalPphNames :: !(Maybe Text) + , _aalXgafv :: !(Maybe Text) + , _aalStudioNames :: !(Maybe Text) + , _aalQuotaUser :: !(Maybe Text) + , _aalVideoIds :: !(Maybe Text) + , _aalPrettyPrint :: !Bool + , _aalUploadProtocol :: !(Maybe Text) + , _aalPp :: !Bool + , _aalAccessToken :: !(Maybe Text) + , _aalUploadType :: !(Maybe Text) + , _aalTerritories :: !(Maybe Text) + , _aalAccountId :: !Text + , _aalBearerToken :: !(Maybe Text) + , _aalKey :: !(Maybe Text) + , _aalPageToken :: !(Maybe Text) + , _aalTitle :: !(Maybe Text) + , _aalOauthToken :: !(Maybe Text) + , _aalPageSize :: !(Maybe Int32) + , _aalFields :: !(Maybe Text) + , _aalCallback :: !(Maybe Text) + , _aalAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsAvailsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aalAltId' +-- +-- * 'aalPphNames' +-- +-- * 'aalXgafv' +-- +-- * 'aalStudioNames' +-- +-- * 'aalQuotaUser' +-- +-- * 'aalVideoIds' +-- +-- * 'aalPrettyPrint' +-- +-- * 'aalUploadProtocol' +-- +-- * 'aalPp' +-- +-- * 'aalAccessToken' +-- +-- * 'aalUploadType' +-- +-- * 'aalTerritories' +-- +-- * 'aalAccountId' +-- +-- * 'aalBearerToken' +-- +-- * 'aalKey' +-- +-- * 'aalPageToken' +-- +-- * 'aalTitle' +-- +-- * 'aalOauthToken' +-- +-- * 'aalPageSize' +-- +-- * 'aalFields' +-- +-- * 'aalCallback' +-- +-- * 'aalAlt' +accountsAvailsList + :: Text -- ^ 'accountId' + -> AccountsAvailsList +accountsAvailsList pAalAccountId_ = + AccountsAvailsList + { _aalAltId = Nothing + , _aalPphNames = Nothing + , _aalXgafv = Nothing + , _aalStudioNames = Nothing + , _aalQuotaUser = Nothing + , _aalVideoIds = Nothing + , _aalPrettyPrint = True + , _aalUploadProtocol = Nothing + , _aalPp = True + , _aalAccessToken = Nothing + , _aalUploadType = Nothing + , _aalTerritories = Nothing + , _aalAccountId = pAalAccountId_ + , _aalBearerToken = Nothing + , _aalKey = Nothing + , _aalPageToken = Nothing + , _aalTitle = Nothing + , _aalOauthToken = Nothing + , _aalPageSize = Nothing + , _aalFields = Nothing + , _aalCallback = Nothing + , _aalAlt = "json" + } + +-- | Filter Avails that match a case-insensitive, partner-specific custom id. +aalAltId :: Lens' AccountsAvailsList' (Maybe Text) +aalAltId = lens _aalAltId (\ s a -> s{_aalAltId = a}) + +-- | See _List methods rules_ for info about this field. +aalPphNames :: Lens' AccountsAvailsList' (Maybe Text) +aalPphNames + = lens _aalPphNames (\ s a -> s{_aalPphNames = a}) + +-- | V1 error format. +aalXgafv :: Lens' AccountsAvailsList' (Maybe Text) +aalXgafv = lens _aalXgafv (\ s a -> s{_aalXgafv = a}) + +-- | See _List methods rules_ for info about this field. +aalStudioNames :: Lens' AccountsAvailsList' (Maybe Text) +aalStudioNames + = lens _aalStudioNames + (\ s a -> s{_aalStudioNames = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aalQuotaUser :: Lens' AccountsAvailsList' (Maybe Text) +aalQuotaUser + = lens _aalQuotaUser (\ s a -> s{_aalQuotaUser = a}) + +-- | Filter Avails that match any of the given \`video_id\`s. +aalVideoIds :: Lens' AccountsAvailsList' (Maybe Text) +aalVideoIds + = lens _aalVideoIds (\ s a -> s{_aalVideoIds = a}) + +-- | Returns response with indentations and line breaks. +aalPrettyPrint :: Lens' AccountsAvailsList' Bool +aalPrettyPrint + = lens _aalPrettyPrint + (\ s a -> s{_aalPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aalUploadProtocol :: Lens' AccountsAvailsList' (Maybe Text) +aalUploadProtocol + = lens _aalUploadProtocol + (\ s a -> s{_aalUploadProtocol = a}) + +-- | Pretty-print response. +aalPp :: Lens' AccountsAvailsList' Bool +aalPp = lens _aalPp (\ s a -> s{_aalPp = a}) + +-- | OAuth access token. +aalAccessToken :: Lens' AccountsAvailsList' (Maybe Text) +aalAccessToken + = lens _aalAccessToken + (\ s a -> s{_aalAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aalUploadType :: Lens' AccountsAvailsList' (Maybe Text) +aalUploadType + = lens _aalUploadType + (\ s a -> s{_aalUploadType = a}) + +-- | Filter Avails that match (case-insensitive) any of the given country +-- codes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", +-- \"us\", \"Us\"). +aalTerritories :: Lens' AccountsAvailsList' (Maybe Text) +aalTerritories + = lens _aalTerritories + (\ s a -> s{_aalTerritories = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +aalAccountId :: Lens' AccountsAvailsList' Text +aalAccountId + = lens _aalAccountId (\ s a -> s{_aalAccountId = a}) + +-- | OAuth bearer token. +aalBearerToken :: Lens' AccountsAvailsList' (Maybe Text) +aalBearerToken + = lens _aalBearerToken + (\ s a -> s{_aalBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aalKey :: Lens' AccountsAvailsList' (Maybe Text) +aalKey = lens _aalKey (\ s a -> s{_aalKey = a}) + +-- | See _List methods rules_ for info about this field. +aalPageToken :: Lens' AccountsAvailsList' (Maybe Text) +aalPageToken + = lens _aalPageToken (\ s a -> s{_aalPageToken = a}) + +-- | Filter Avails that match a case-insensitive substring of the default +-- Title name. +aalTitle :: Lens' AccountsAvailsList' (Maybe Text) +aalTitle = lens _aalTitle (\ s a -> s{_aalTitle = a}) + +-- | OAuth 2.0 token for the current user. +aalOauthToken :: Lens' AccountsAvailsList' (Maybe Text) +aalOauthToken + = lens _aalOauthToken + (\ s a -> s{_aalOauthToken = a}) + +-- | See _List methods rules_ for info about this field. +aalPageSize :: Lens' AccountsAvailsList' (Maybe Int32) +aalPageSize + = lens _aalPageSize (\ s a -> s{_aalPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +aalFields :: Lens' AccountsAvailsList' (Maybe Text) +aalFields + = lens _aalFields (\ s a -> s{_aalFields = a}) + +-- | JSONP +aalCallback :: Lens' AccountsAvailsList' (Maybe Text) +aalCallback + = lens _aalCallback (\ s a -> s{_aalCallback = a}) + +-- | Data format for response. +aalAlt :: Lens' AccountsAvailsList' Text +aalAlt = lens _aalAlt (\ s a -> s{_aalAlt = a}) + +instance GoogleRequest AccountsAvailsList' where + type Rs AccountsAvailsList' = ListAvailsResponse + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsAvailsList{..} + = go _aalAltId _aalPphNames _aalXgafv _aalStudioNames + _aalQuotaUser + _aalVideoIds + _aalPrettyPrint + _aalUploadProtocol + _aalPp + _aalAccessToken + _aalUploadType + _aalTerritories + _aalAccountId + _aalBearerToken + _aalKey + _aalPageToken + _aalTitle + _aalOauthToken + _aalPageSize + _aalFields + _aalCallback + _aalAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsAvailsListAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/Get.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/Get.hs new file mode 100644 index 000000000..b908f9f5c --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/Get.hs @@ -0,0 +1,249 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get an ExperienceLocale given its id. See _Authentication and +-- Authorization rules_ and _Get methods rules_ for more information about +-- this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsExperienceLocalesGet@. +module PlayMoviesPartner.Accounts.ExperienceLocales.Get + ( + -- * REST Resource + AccountsExperienceLocalesGetAPI + + -- * Creating a Request + , accountsExperienceLocalesGet + , AccountsExperienceLocalesGet + + -- * Request Lenses + , aelgXgafv + , aelgQuotaUser + , aelgPrettyPrint + , aelgUploadProtocol + , aelgPp + , aelgAccessToken + , aelgUploadType + , aelgElId + , aelgAccountId + , aelgBearerToken + , aelgKey + , aelgOauthToken + , aelgFields + , aelgCallback + , aelgAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsExperienceLocalesGet@ which the +-- 'AccountsExperienceLocalesGet' request conforms to. +type AccountsExperienceLocalesGetAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "experienceLocales" :> + Capture "elId" Text :> Get '[JSON] ExperienceLocale + +-- | Get an ExperienceLocale given its id. See _Authentication and +-- Authorization rules_ and _Get methods rules_ for more information about +-- this method. +-- +-- /See:/ 'accountsExperienceLocalesGet' smart constructor. +data AccountsExperienceLocalesGet = AccountsExperienceLocalesGet + { _aelgXgafv :: !(Maybe Text) + , _aelgQuotaUser :: !(Maybe Text) + , _aelgPrettyPrint :: !Bool + , _aelgUploadProtocol :: !(Maybe Text) + , _aelgPp :: !Bool + , _aelgAccessToken :: !(Maybe Text) + , _aelgUploadType :: !(Maybe Text) + , _aelgElId :: !Text + , _aelgAccountId :: !Text + , _aelgBearerToken :: !(Maybe Text) + , _aelgKey :: !(Maybe Text) + , _aelgOauthToken :: !(Maybe Text) + , _aelgFields :: !(Maybe Text) + , _aelgCallback :: !(Maybe Text) + , _aelgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsExperienceLocalesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aelgXgafv' +-- +-- * 'aelgQuotaUser' +-- +-- * 'aelgPrettyPrint' +-- +-- * 'aelgUploadProtocol' +-- +-- * 'aelgPp' +-- +-- * 'aelgAccessToken' +-- +-- * 'aelgUploadType' +-- +-- * 'aelgElId' +-- +-- * 'aelgAccountId' +-- +-- * 'aelgBearerToken' +-- +-- * 'aelgKey' +-- +-- * 'aelgOauthToken' +-- +-- * 'aelgFields' +-- +-- * 'aelgCallback' +-- +-- * 'aelgAlt' +accountsExperienceLocalesGet + :: Text -- ^ 'elId' + -> Text -- ^ 'accountId' + -> AccountsExperienceLocalesGet +accountsExperienceLocalesGet pAelgElId_ pAelgAccountId_ = + AccountsExperienceLocalesGet + { _aelgXgafv = Nothing + , _aelgQuotaUser = Nothing + , _aelgPrettyPrint = True + , _aelgUploadProtocol = Nothing + , _aelgPp = True + , _aelgAccessToken = Nothing + , _aelgUploadType = Nothing + , _aelgElId = pAelgElId_ + , _aelgAccountId = pAelgAccountId_ + , _aelgBearerToken = Nothing + , _aelgKey = Nothing + , _aelgOauthToken = Nothing + , _aelgFields = Nothing + , _aelgCallback = Nothing + , _aelgAlt = "json" + } + +-- | V1 error format. +aelgXgafv :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgXgafv + = lens _aelgXgafv (\ s a -> s{_aelgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aelgQuotaUser :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgQuotaUser + = lens _aelgQuotaUser + (\ s a -> s{_aelgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aelgPrettyPrint :: Lens' AccountsExperienceLocalesGet' Bool +aelgPrettyPrint + = lens _aelgPrettyPrint + (\ s a -> s{_aelgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aelgUploadProtocol :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgUploadProtocol + = lens _aelgUploadProtocol + (\ s a -> s{_aelgUploadProtocol = a}) + +-- | Pretty-print response. +aelgPp :: Lens' AccountsExperienceLocalesGet' Bool +aelgPp = lens _aelgPp (\ s a -> s{_aelgPp = a}) + +-- | OAuth access token. +aelgAccessToken :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgAccessToken + = lens _aelgAccessToken + (\ s a -> s{_aelgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aelgUploadType :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgUploadType + = lens _aelgUploadType + (\ s a -> s{_aelgUploadType = a}) + +-- | REQUIRED. ExperienceLocale ID, as defined by Google. +aelgElId :: Lens' AccountsExperienceLocalesGet' Text +aelgElId = lens _aelgElId (\ s a -> s{_aelgElId = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +aelgAccountId :: Lens' AccountsExperienceLocalesGet' Text +aelgAccountId + = lens _aelgAccountId + (\ s a -> s{_aelgAccountId = a}) + +-- | OAuth bearer token. +aelgBearerToken :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgBearerToken + = lens _aelgBearerToken + (\ s a -> s{_aelgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aelgKey :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgKey = lens _aelgKey (\ s a -> s{_aelgKey = a}) + +-- | OAuth 2.0 token for the current user. +aelgOauthToken :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgOauthToken + = lens _aelgOauthToken + (\ s a -> s{_aelgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aelgFields :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgFields + = lens _aelgFields (\ s a -> s{_aelgFields = a}) + +-- | JSONP +aelgCallback :: Lens' AccountsExperienceLocalesGet' (Maybe Text) +aelgCallback + = lens _aelgCallback (\ s a -> s{_aelgCallback = a}) + +-- | Data format for response. +aelgAlt :: Lens' AccountsExperienceLocalesGet' Text +aelgAlt = lens _aelgAlt (\ s a -> s{_aelgAlt = a}) + +instance GoogleRequest AccountsExperienceLocalesGet' + where + type Rs AccountsExperienceLocalesGet' = + ExperienceLocale + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsExperienceLocalesGet{..} + = go _aelgXgafv _aelgQuotaUser _aelgPrettyPrint + _aelgUploadProtocol + _aelgPp + _aelgAccessToken + _aelgUploadType + _aelgElId + _aelgAccountId + _aelgBearerToken + _aelgKey + _aelgOauthToken + _aelgFields + _aelgCallback + _aelgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsExperienceLocalesGetAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/List.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/List.hs new file mode 100644 index 000000000..21771ccfa --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/ExperienceLocales/List.hs @@ -0,0 +1,353 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List ExperienceLocales owned or managed by the partner. See +-- _Authentication and Authorization rules_ and _List methods rules_ for +-- more information about this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsExperienceLocalesList@. +module PlayMoviesPartner.Accounts.ExperienceLocales.List + ( + -- * REST Resource + AccountsExperienceLocalesListAPI + + -- * Creating a Request + , accountsExperienceLocalesList + , AccountsExperienceLocalesList + + -- * Request Lenses + , aellTitleLevelEidr + , aellStatus + , aellPphNames + , aellXgafv + , aellStudioNames + , aellQuotaUser + , aellPrettyPrint + , aellUploadProtocol + , aellPp + , aellAccessToken + , aellUploadType + , aellAltCutId + , aellCustomId + , aellAccountId + , aellBearerToken + , aellKey + , aellEditLevelEidr + , aellPageToken + , aellOauthToken + , aellPageSize + , aellFields + , aellCallback + , aellAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsExperienceLocalesList@ which the +-- 'AccountsExperienceLocalesList' request conforms to. +type AccountsExperienceLocalesListAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "experienceLocales" :> + QueryParam "titleLevelEidr" Text :> + QueryParams "status" Text :> + QueryParams "pphNames" Text :> + QueryParams "studioNames" Text :> + QueryParam "altCutId" Text :> + QueryParam "customId" Text :> + QueryParam "editLevelEidr" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListExperienceLocalesResponse + +-- | List ExperienceLocales owned or managed by the partner. See +-- _Authentication and Authorization rules_ and _List methods rules_ for +-- more information about this method. +-- +-- /See:/ 'accountsExperienceLocalesList' smart constructor. +data AccountsExperienceLocalesList = AccountsExperienceLocalesList + { _aellTitleLevelEidr :: !(Maybe Text) + , _aellStatus :: !(Maybe Text) + , _aellPphNames :: !(Maybe Text) + , _aellXgafv :: !(Maybe Text) + , _aellStudioNames :: !(Maybe Text) + , _aellQuotaUser :: !(Maybe Text) + , _aellPrettyPrint :: !Bool + , _aellUploadProtocol :: !(Maybe Text) + , _aellPp :: !Bool + , _aellAccessToken :: !(Maybe Text) + , _aellUploadType :: !(Maybe Text) + , _aellAltCutId :: !(Maybe Text) + , _aellCustomId :: !(Maybe Text) + , _aellAccountId :: !Text + , _aellBearerToken :: !(Maybe Text) + , _aellKey :: !(Maybe Text) + , _aellEditLevelEidr :: !(Maybe Text) + , _aellPageToken :: !(Maybe Text) + , _aellOauthToken :: !(Maybe Text) + , _aellPageSize :: !(Maybe Int32) + , _aellFields :: !(Maybe Text) + , _aellCallback :: !(Maybe Text) + , _aellAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsExperienceLocalesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aellTitleLevelEidr' +-- +-- * 'aellStatus' +-- +-- * 'aellPphNames' +-- +-- * 'aellXgafv' +-- +-- * 'aellStudioNames' +-- +-- * 'aellQuotaUser' +-- +-- * 'aellPrettyPrint' +-- +-- * 'aellUploadProtocol' +-- +-- * 'aellPp' +-- +-- * 'aellAccessToken' +-- +-- * 'aellUploadType' +-- +-- * 'aellAltCutId' +-- +-- * 'aellCustomId' +-- +-- * 'aellAccountId' +-- +-- * 'aellBearerToken' +-- +-- * 'aellKey' +-- +-- * 'aellEditLevelEidr' +-- +-- * 'aellPageToken' +-- +-- * 'aellOauthToken' +-- +-- * 'aellPageSize' +-- +-- * 'aellFields' +-- +-- * 'aellCallback' +-- +-- * 'aellAlt' +accountsExperienceLocalesList + :: Text -- ^ 'accountId' + -> AccountsExperienceLocalesList +accountsExperienceLocalesList pAellAccountId_ = + AccountsExperienceLocalesList + { _aellTitleLevelEidr = Nothing + , _aellStatus = Nothing + , _aellPphNames = Nothing + , _aellXgafv = Nothing + , _aellStudioNames = Nothing + , _aellQuotaUser = Nothing + , _aellPrettyPrint = True + , _aellUploadProtocol = Nothing + , _aellPp = True + , _aellAccessToken = Nothing + , _aellUploadType = Nothing + , _aellAltCutId = Nothing + , _aellCustomId = Nothing + , _aellAccountId = pAellAccountId_ + , _aellBearerToken = Nothing + , _aellKey = Nothing + , _aellEditLevelEidr = Nothing + , _aellPageToken = Nothing + , _aellOauthToken = Nothing + , _aellPageSize = Nothing + , _aellFields = Nothing + , _aellCallback = Nothing + , _aellAlt = "json" + } + +-- | Filter ExperienceLocales that match a given title-level EIDR. +aellTitleLevelEidr :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellTitleLevelEidr + = lens _aellTitleLevelEidr + (\ s a -> s{_aellTitleLevelEidr = a}) + +-- | Filter ExperienceLocales that match one of the given status. +aellStatus :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellStatus + = lens _aellStatus (\ s a -> s{_aellStatus = a}) + +-- | See _List methods rules_ for info about this field. +aellPphNames :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellPphNames + = lens _aellPphNames (\ s a -> s{_aellPphNames = a}) + +-- | V1 error format. +aellXgafv :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellXgafv + = lens _aellXgafv (\ s a -> s{_aellXgafv = a}) + +-- | See _List methods rules_ for info about this field. +aellStudioNames :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellStudioNames + = lens _aellStudioNames + (\ s a -> s{_aellStudioNames = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aellQuotaUser :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellQuotaUser + = lens _aellQuotaUser + (\ s a -> s{_aellQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aellPrettyPrint :: Lens' AccountsExperienceLocalesList' Bool +aellPrettyPrint + = lens _aellPrettyPrint + (\ s a -> s{_aellPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aellUploadProtocol :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellUploadProtocol + = lens _aellUploadProtocol + (\ s a -> s{_aellUploadProtocol = a}) + +-- | Pretty-print response. +aellPp :: Lens' AccountsExperienceLocalesList' Bool +aellPp = lens _aellPp (\ s a -> s{_aellPp = a}) + +-- | OAuth access token. +aellAccessToken :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellAccessToken + = lens _aellAccessToken + (\ s a -> s{_aellAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aellUploadType :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellUploadType + = lens _aellUploadType + (\ s a -> s{_aellUploadType = a}) + +-- | Filter ExperienceLocales that match a case-insensitive, partner-specific +-- Alternative Cut ID. +aellAltCutId :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellAltCutId + = lens _aellAltCutId (\ s a -> s{_aellAltCutId = a}) + +-- | Filter ExperienceLocales that match a case-insensitive, partner-specific +-- custom id. +aellCustomId :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellCustomId + = lens _aellCustomId (\ s a -> s{_aellCustomId = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +aellAccountId :: Lens' AccountsExperienceLocalesList' Text +aellAccountId + = lens _aellAccountId + (\ s a -> s{_aellAccountId = a}) + +-- | OAuth bearer token. +aellBearerToken :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellBearerToken + = lens _aellBearerToken + (\ s a -> s{_aellBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aellKey :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellKey = lens _aellKey (\ s a -> s{_aellKey = a}) + +-- | Filter ExperienceLocales that match a given edit-level EIDR. +aellEditLevelEidr :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellEditLevelEidr + = lens _aellEditLevelEidr + (\ s a -> s{_aellEditLevelEidr = a}) + +-- | See _List methods rules_ for info about this field. +aellPageToken :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellPageToken + = lens _aellPageToken + (\ s a -> s{_aellPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aellOauthToken :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellOauthToken + = lens _aellOauthToken + (\ s a -> s{_aellOauthToken = a}) + +-- | See _List methods rules_ for info about this field. +aellPageSize :: Lens' AccountsExperienceLocalesList' (Maybe Int32) +aellPageSize + = lens _aellPageSize (\ s a -> s{_aellPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +aellFields :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellFields + = lens _aellFields (\ s a -> s{_aellFields = a}) + +-- | JSONP +aellCallback :: Lens' AccountsExperienceLocalesList' (Maybe Text) +aellCallback + = lens _aellCallback (\ s a -> s{_aellCallback = a}) + +-- | Data format for response. +aellAlt :: Lens' AccountsExperienceLocalesList' Text +aellAlt = lens _aellAlt (\ s a -> s{_aellAlt = a}) + +instance GoogleRequest AccountsExperienceLocalesList' + where + type Rs AccountsExperienceLocalesList' = + ListExperienceLocalesResponse + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u + AccountsExperienceLocalesList{..} + = go _aellTitleLevelEidr _aellStatus _aellPphNames + _aellXgafv + _aellStudioNames + _aellQuotaUser + _aellPrettyPrint + _aellUploadProtocol + _aellPp + _aellAccessToken + _aellUploadType + _aellAltCutId + _aellCustomId + _aellAccountId + _aellBearerToken + _aellKey + _aellEditLevelEidr + _aellPageToken + _aellOauthToken + _aellPageSize + _aellFields + _aellCallback + _aellAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsExperienceLocalesListAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/Get.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/Get.hs new file mode 100644 index 000000000..e96eb60f1 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/Get.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get an Order given its id. See _Authentication and Authorization rules_ +-- and _Get methods rules_ for more information about this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsOrdersGet@. +module PlayMoviesPartner.Accounts.Orders.Get + ( + -- * REST Resource + AccountsOrdersGetAPI + + -- * Creating a Request + , accountsOrdersGet + , AccountsOrdersGet + + -- * Request Lenses + , aogXgafv + , aogQuotaUser + , aogPrettyPrint + , aogUploadProtocol + , aogPp + , aogAccessToken + , aogUploadType + , aogAccountId + , aogBearerToken + , aogKey + , aogOauthToken + , aogOrderId + , aogFields + , aogCallback + , aogAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsOrdersGet@ which the +-- 'AccountsOrdersGet' request conforms to. +type AccountsOrdersGetAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "orders" :> + Capture "orderId" Text :> Get '[JSON] Order + +-- | Get an Order given its id. See _Authentication and Authorization rules_ +-- and _Get methods rules_ for more information about this method. +-- +-- /See:/ 'accountsOrdersGet' smart constructor. +data AccountsOrdersGet = AccountsOrdersGet + { _aogXgafv :: !(Maybe Text) + , _aogQuotaUser :: !(Maybe Text) + , _aogPrettyPrint :: !Bool + , _aogUploadProtocol :: !(Maybe Text) + , _aogPp :: !Bool + , _aogAccessToken :: !(Maybe Text) + , _aogUploadType :: !(Maybe Text) + , _aogAccountId :: !Text + , _aogBearerToken :: !(Maybe Text) + , _aogKey :: !(Maybe Text) + , _aogOauthToken :: !(Maybe Text) + , _aogOrderId :: !Text + , _aogFields :: !(Maybe Text) + , _aogCallback :: !(Maybe Text) + , _aogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsOrdersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aogXgafv' +-- +-- * 'aogQuotaUser' +-- +-- * 'aogPrettyPrint' +-- +-- * 'aogUploadProtocol' +-- +-- * 'aogPp' +-- +-- * 'aogAccessToken' +-- +-- * 'aogUploadType' +-- +-- * 'aogAccountId' +-- +-- * 'aogBearerToken' +-- +-- * 'aogKey' +-- +-- * 'aogOauthToken' +-- +-- * 'aogOrderId' +-- +-- * 'aogFields' +-- +-- * 'aogCallback' +-- +-- * 'aogAlt' +accountsOrdersGet + :: Text -- ^ 'accountId' + -> Text -- ^ 'orderId' + -> AccountsOrdersGet +accountsOrdersGet pAogAccountId_ pAogOrderId_ = + AccountsOrdersGet + { _aogXgafv = Nothing + , _aogQuotaUser = Nothing + , _aogPrettyPrint = True + , _aogUploadProtocol = Nothing + , _aogPp = True + , _aogAccessToken = Nothing + , _aogUploadType = Nothing + , _aogAccountId = pAogAccountId_ + , _aogBearerToken = Nothing + , _aogKey = Nothing + , _aogOauthToken = Nothing + , _aogOrderId = pAogOrderId_ + , _aogFields = Nothing + , _aogCallback = Nothing + , _aogAlt = "json" + } + +-- | V1 error format. +aogXgafv :: Lens' AccountsOrdersGet' (Maybe Text) +aogXgafv = lens _aogXgafv (\ s a -> s{_aogXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aogQuotaUser :: Lens' AccountsOrdersGet' (Maybe Text) +aogQuotaUser + = lens _aogQuotaUser (\ s a -> s{_aogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aogPrettyPrint :: Lens' AccountsOrdersGet' Bool +aogPrettyPrint + = lens _aogPrettyPrint + (\ s a -> s{_aogPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aogUploadProtocol :: Lens' AccountsOrdersGet' (Maybe Text) +aogUploadProtocol + = lens _aogUploadProtocol + (\ s a -> s{_aogUploadProtocol = a}) + +-- | Pretty-print response. +aogPp :: Lens' AccountsOrdersGet' Bool +aogPp = lens _aogPp (\ s a -> s{_aogPp = a}) + +-- | OAuth access token. +aogAccessToken :: Lens' AccountsOrdersGet' (Maybe Text) +aogAccessToken + = lens _aogAccessToken + (\ s a -> s{_aogAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aogUploadType :: Lens' AccountsOrdersGet' (Maybe Text) +aogUploadType + = lens _aogUploadType + (\ s a -> s{_aogUploadType = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +aogAccountId :: Lens' AccountsOrdersGet' Text +aogAccountId + = lens _aogAccountId (\ s a -> s{_aogAccountId = a}) + +-- | OAuth bearer token. +aogBearerToken :: Lens' AccountsOrdersGet' (Maybe Text) +aogBearerToken + = lens _aogBearerToken + (\ s a -> s{_aogBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aogKey :: Lens' AccountsOrdersGet' (Maybe Text) +aogKey = lens _aogKey (\ s a -> s{_aogKey = a}) + +-- | OAuth 2.0 token for the current user. +aogOauthToken :: Lens' AccountsOrdersGet' (Maybe Text) +aogOauthToken + = lens _aogOauthToken + (\ s a -> s{_aogOauthToken = a}) + +-- | REQUIRED. Order ID. +aogOrderId :: Lens' AccountsOrdersGet' Text +aogOrderId + = lens _aogOrderId (\ s a -> s{_aogOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +aogFields :: Lens' AccountsOrdersGet' (Maybe Text) +aogFields + = lens _aogFields (\ s a -> s{_aogFields = a}) + +-- | JSONP +aogCallback :: Lens' AccountsOrdersGet' (Maybe Text) +aogCallback + = lens _aogCallback (\ s a -> s{_aogCallback = a}) + +-- | Data format for response. +aogAlt :: Lens' AccountsOrdersGet' Text +aogAlt = lens _aogAlt (\ s a -> s{_aogAlt = a}) + +instance GoogleRequest AccountsOrdersGet' where + type Rs AccountsOrdersGet' = Order + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsOrdersGet{..} + = go _aogXgafv _aogQuotaUser _aogPrettyPrint + _aogUploadProtocol + _aogPp + _aogAccessToken + _aogUploadType + _aogAccountId + _aogBearerToken + _aogKey + _aogOauthToken + _aogOrderId + _aogFields + _aogCallback + _aogAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsOrdersGetAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/List.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/List.hs new file mode 100644 index 000000000..6872b2007 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/List.hs @@ -0,0 +1,318 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List Orders owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsOrdersList@. +module PlayMoviesPartner.Accounts.Orders.List + ( + -- * REST Resource + AccountsOrdersListAPI + + -- * Creating a Request + , accountsOrdersList + , AccountsOrdersList + + -- * Request Lenses + , aolStatus + , aolPphNames + , aolXgafv + , aolStudioNames + , aolQuotaUser + , aolPrettyPrint + , aolUploadProtocol + , aolPp + , aolAccessToken + , aolUploadType + , aolCustomId + , aolAccountId + , aolBearerToken + , aolKey + , aolName + , aolPageToken + , aolOauthToken + , aolPageSize + , aolFields + , aolCallback + , aolAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsOrdersList@ which the +-- 'AccountsOrdersList' request conforms to. +type AccountsOrdersListAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "orders" :> + QueryParams "status" Text :> + QueryParams "pphNames" Text :> + QueryParams "studioNames" Text :> + QueryParam "customId" Text :> + QueryParam "name" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListOrdersResponse + +-- | List Orders owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ 'accountsOrdersList' smart constructor. +data AccountsOrdersList = AccountsOrdersList + { _aolStatus :: !(Maybe Text) + , _aolPphNames :: !(Maybe Text) + , _aolXgafv :: !(Maybe Text) + , _aolStudioNames :: !(Maybe Text) + , _aolQuotaUser :: !(Maybe Text) + , _aolPrettyPrint :: !Bool + , _aolUploadProtocol :: !(Maybe Text) + , _aolPp :: !Bool + , _aolAccessToken :: !(Maybe Text) + , _aolUploadType :: !(Maybe Text) + , _aolCustomId :: !(Maybe Text) + , _aolAccountId :: !Text + , _aolBearerToken :: !(Maybe Text) + , _aolKey :: !(Maybe Text) + , _aolName :: !(Maybe Text) + , _aolPageToken :: !(Maybe Text) + , _aolOauthToken :: !(Maybe Text) + , _aolPageSize :: !(Maybe Int32) + , _aolFields :: !(Maybe Text) + , _aolCallback :: !(Maybe Text) + , _aolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsOrdersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aolStatus' +-- +-- * 'aolPphNames' +-- +-- * 'aolXgafv' +-- +-- * 'aolStudioNames' +-- +-- * 'aolQuotaUser' +-- +-- * 'aolPrettyPrint' +-- +-- * 'aolUploadProtocol' +-- +-- * 'aolPp' +-- +-- * 'aolAccessToken' +-- +-- * 'aolUploadType' +-- +-- * 'aolCustomId' +-- +-- * 'aolAccountId' +-- +-- * 'aolBearerToken' +-- +-- * 'aolKey' +-- +-- * 'aolName' +-- +-- * 'aolPageToken' +-- +-- * 'aolOauthToken' +-- +-- * 'aolPageSize' +-- +-- * 'aolFields' +-- +-- * 'aolCallback' +-- +-- * 'aolAlt' +accountsOrdersList + :: Text -- ^ 'accountId' + -> AccountsOrdersList +accountsOrdersList pAolAccountId_ = + AccountsOrdersList + { _aolStatus = Nothing + , _aolPphNames = Nothing + , _aolXgafv = Nothing + , _aolStudioNames = Nothing + , _aolQuotaUser = Nothing + , _aolPrettyPrint = True + , _aolUploadProtocol = Nothing + , _aolPp = True + , _aolAccessToken = Nothing + , _aolUploadType = Nothing + , _aolCustomId = Nothing + , _aolAccountId = pAolAccountId_ + , _aolBearerToken = Nothing + , _aolKey = Nothing + , _aolName = Nothing + , _aolPageToken = Nothing + , _aolOauthToken = Nothing + , _aolPageSize = Nothing + , _aolFields = Nothing + , _aolCallback = Nothing + , _aolAlt = "json" + } + +-- | Filter Orders that match one of the given status. +aolStatus :: Lens' AccountsOrdersList' (Maybe Text) +aolStatus + = lens _aolStatus (\ s a -> s{_aolStatus = a}) + +-- | See _List methods rules_ for info about this field. +aolPphNames :: Lens' AccountsOrdersList' (Maybe Text) +aolPphNames + = lens _aolPphNames (\ s a -> s{_aolPphNames = a}) + +-- | V1 error format. +aolXgafv :: Lens' AccountsOrdersList' (Maybe Text) +aolXgafv = lens _aolXgafv (\ s a -> s{_aolXgafv = a}) + +-- | See _List methods rules_ for info about this field. +aolStudioNames :: Lens' AccountsOrdersList' (Maybe Text) +aolStudioNames + = lens _aolStudioNames + (\ s a -> s{_aolStudioNames = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +aolQuotaUser :: Lens' AccountsOrdersList' (Maybe Text) +aolQuotaUser + = lens _aolQuotaUser (\ s a -> s{_aolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aolPrettyPrint :: Lens' AccountsOrdersList' Bool +aolPrettyPrint + = lens _aolPrettyPrint + (\ s a -> s{_aolPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +aolUploadProtocol :: Lens' AccountsOrdersList' (Maybe Text) +aolUploadProtocol + = lens _aolUploadProtocol + (\ s a -> s{_aolUploadProtocol = a}) + +-- | Pretty-print response. +aolPp :: Lens' AccountsOrdersList' Bool +aolPp = lens _aolPp (\ s a -> s{_aolPp = a}) + +-- | OAuth access token. +aolAccessToken :: Lens' AccountsOrdersList' (Maybe Text) +aolAccessToken + = lens _aolAccessToken + (\ s a -> s{_aolAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +aolUploadType :: Lens' AccountsOrdersList' (Maybe Text) +aolUploadType + = lens _aolUploadType + (\ s a -> s{_aolUploadType = a}) + +-- | Filter Orders that match a case-insensitive, partner-specific custom id. +aolCustomId :: Lens' AccountsOrdersList' (Maybe Text) +aolCustomId + = lens _aolCustomId (\ s a -> s{_aolCustomId = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +aolAccountId :: Lens' AccountsOrdersList' Text +aolAccountId + = lens _aolAccountId (\ s a -> s{_aolAccountId = a}) + +-- | OAuth bearer token. +aolBearerToken :: Lens' AccountsOrdersList' (Maybe Text) +aolBearerToken + = lens _aolBearerToken + (\ s a -> s{_aolBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aolKey :: Lens' AccountsOrdersList' (Maybe Text) +aolKey = lens _aolKey (\ s a -> s{_aolKey = a}) + +-- | Filter Orders that match a title name (case-insensitive, sub-string +-- match). +aolName :: Lens' AccountsOrdersList' (Maybe Text) +aolName = lens _aolName (\ s a -> s{_aolName = a}) + +-- | See _List methods rules_ for info about this field. +aolPageToken :: Lens' AccountsOrdersList' (Maybe Text) +aolPageToken + = lens _aolPageToken (\ s a -> s{_aolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aolOauthToken :: Lens' AccountsOrdersList' (Maybe Text) +aolOauthToken + = lens _aolOauthToken + (\ s a -> s{_aolOauthToken = a}) + +-- | See _List methods rules_ for info about this field. +aolPageSize :: Lens' AccountsOrdersList' (Maybe Int32) +aolPageSize + = lens _aolPageSize (\ s a -> s{_aolPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +aolFields :: Lens' AccountsOrdersList' (Maybe Text) +aolFields + = lens _aolFields (\ s a -> s{_aolFields = a}) + +-- | JSONP +aolCallback :: Lens' AccountsOrdersList' (Maybe Text) +aolCallback + = lens _aolCallback (\ s a -> s{_aolCallback = a}) + +-- | Data format for response. +aolAlt :: Lens' AccountsOrdersList' Text +aolAlt = lens _aolAlt (\ s a -> s{_aolAlt = a}) + +instance GoogleRequest AccountsOrdersList' where + type Rs AccountsOrdersList' = ListOrdersResponse + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsOrdersList{..} + = go _aolStatus _aolPphNames _aolXgafv + _aolStudioNames + _aolQuotaUser + _aolPrettyPrint + _aolUploadProtocol + _aolPp + _aolAccessToken + _aolUploadType + _aolCustomId + _aolAccountId + _aolBearerToken + _aolKey + _aolName + _aolPageToken + _aolOauthToken + _aolPageSize + _aolFields + _aolCallback + _aolAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsOrdersListAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/Country/Get.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/Country/Get.hs new file mode 100644 index 000000000..a8f0c0c99 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/Country/Get.hs @@ -0,0 +1,264 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.Country.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a StoreInfo given its video id and country. See _Authentication and +-- Authorization rules_ and _Get methods rules_ for more information about +-- this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsStoreInfosCountryGet@. +module PlayMoviesPartner.Accounts.StoreInfos.Country.Get + ( + -- * REST Resource + AccountsStoreInfosCountryGetAPI + + -- * Creating a Request + , accountsStoreInfosCountryGet + , AccountsStoreInfosCountryGet + + -- * Request Lenses + , asicgXgafv + , asicgQuotaUser + , asicgPrettyPrint + , asicgUploadProtocol + , asicgCountry + , asicgPp + , asicgAccessToken + , asicgUploadType + , asicgVideoId + , asicgAccountId + , asicgBearerToken + , asicgKey + , asicgOauthToken + , asicgFields + , asicgCallback + , asicgAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsStoreInfosCountryGet@ which the +-- 'AccountsStoreInfosCountryGet' request conforms to. +type AccountsStoreInfosCountryGetAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "storeInfos" :> + Capture "videoId" Text :> + "country" :> + Capture "country" Text :> Get '[JSON] StoreInfo + +-- | Get a StoreInfo given its video id and country. See _Authentication and +-- Authorization rules_ and _Get methods rules_ for more information about +-- this method. +-- +-- /See:/ 'accountsStoreInfosCountryGet' smart constructor. +data AccountsStoreInfosCountryGet = AccountsStoreInfosCountryGet + { _asicgXgafv :: !(Maybe Text) + , _asicgQuotaUser :: !(Maybe Text) + , _asicgPrettyPrint :: !Bool + , _asicgUploadProtocol :: !(Maybe Text) + , _asicgCountry :: !Text + , _asicgPp :: !Bool + , _asicgAccessToken :: !(Maybe Text) + , _asicgUploadType :: !(Maybe Text) + , _asicgVideoId :: !Text + , _asicgAccountId :: !Text + , _asicgBearerToken :: !(Maybe Text) + , _asicgKey :: !(Maybe Text) + , _asicgOauthToken :: !(Maybe Text) + , _asicgFields :: !(Maybe Text) + , _asicgCallback :: !(Maybe Text) + , _asicgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsStoreInfosCountryGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asicgXgafv' +-- +-- * 'asicgQuotaUser' +-- +-- * 'asicgPrettyPrint' +-- +-- * 'asicgUploadProtocol' +-- +-- * 'asicgCountry' +-- +-- * 'asicgPp' +-- +-- * 'asicgAccessToken' +-- +-- * 'asicgUploadType' +-- +-- * 'asicgVideoId' +-- +-- * 'asicgAccountId' +-- +-- * 'asicgBearerToken' +-- +-- * 'asicgKey' +-- +-- * 'asicgOauthToken' +-- +-- * 'asicgFields' +-- +-- * 'asicgCallback' +-- +-- * 'asicgAlt' +accountsStoreInfosCountryGet + :: Text -- ^ 'country' + -> Text -- ^ 'videoId' + -> Text -- ^ 'accountId' + -> AccountsStoreInfosCountryGet +accountsStoreInfosCountryGet pAsicgCountry_ pAsicgVideoId_ pAsicgAccountId_ = + AccountsStoreInfosCountryGet + { _asicgXgafv = Nothing + , _asicgQuotaUser = Nothing + , _asicgPrettyPrint = True + , _asicgUploadProtocol = Nothing + , _asicgCountry = pAsicgCountry_ + , _asicgPp = True + , _asicgAccessToken = Nothing + , _asicgUploadType = Nothing + , _asicgVideoId = pAsicgVideoId_ + , _asicgAccountId = pAsicgAccountId_ + , _asicgBearerToken = Nothing + , _asicgKey = Nothing + , _asicgOauthToken = Nothing + , _asicgFields = Nothing + , _asicgCallback = Nothing + , _asicgAlt = "json" + } + +-- | V1 error format. +asicgXgafv :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgXgafv + = lens _asicgXgafv (\ s a -> s{_asicgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +asicgQuotaUser :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgQuotaUser + = lens _asicgQuotaUser + (\ s a -> s{_asicgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asicgPrettyPrint :: Lens' AccountsStoreInfosCountryGet' Bool +asicgPrettyPrint + = lens _asicgPrettyPrint + (\ s a -> s{_asicgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +asicgUploadProtocol :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgUploadProtocol + = lens _asicgUploadProtocol + (\ s a -> s{_asicgUploadProtocol = a}) + +-- | REQUIRED. Edit country. +asicgCountry :: Lens' AccountsStoreInfosCountryGet' Text +asicgCountry + = lens _asicgCountry (\ s a -> s{_asicgCountry = a}) + +-- | Pretty-print response. +asicgPp :: Lens' AccountsStoreInfosCountryGet' Bool +asicgPp = lens _asicgPp (\ s a -> s{_asicgPp = a}) + +-- | OAuth access token. +asicgAccessToken :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgAccessToken + = lens _asicgAccessToken + (\ s a -> s{_asicgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +asicgUploadType :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgUploadType + = lens _asicgUploadType + (\ s a -> s{_asicgUploadType = a}) + +-- | REQUIRED. Video ID. +asicgVideoId :: Lens' AccountsStoreInfosCountryGet' Text +asicgVideoId + = lens _asicgVideoId (\ s a -> s{_asicgVideoId = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +asicgAccountId :: Lens' AccountsStoreInfosCountryGet' Text +asicgAccountId + = lens _asicgAccountId + (\ s a -> s{_asicgAccountId = a}) + +-- | OAuth bearer token. +asicgBearerToken :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgBearerToken + = lens _asicgBearerToken + (\ s a -> s{_asicgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asicgKey :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgKey = lens _asicgKey (\ s a -> s{_asicgKey = a}) + +-- | OAuth 2.0 token for the current user. +asicgOauthToken :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgOauthToken + = lens _asicgOauthToken + (\ s a -> s{_asicgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +asicgFields :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgFields + = lens _asicgFields (\ s a -> s{_asicgFields = a}) + +-- | JSONP +asicgCallback :: Lens' AccountsStoreInfosCountryGet' (Maybe Text) +asicgCallback + = lens _asicgCallback + (\ s a -> s{_asicgCallback = a}) + +-- | Data format for response. +asicgAlt :: Lens' AccountsStoreInfosCountryGet' Text +asicgAlt = lens _asicgAlt (\ s a -> s{_asicgAlt = a}) + +instance GoogleRequest AccountsStoreInfosCountryGet' + where + type Rs AccountsStoreInfosCountryGet' = StoreInfo + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsStoreInfosCountryGet{..} + = go _asicgXgafv _asicgQuotaUser _asicgPrettyPrint + _asicgUploadProtocol + _asicgCountry + _asicgPp + _asicgAccessToken + _asicgUploadType + _asicgVideoId + _asicgAccountId + _asicgBearerToken + _asicgKey + _asicgOauthToken + _asicgFields + _asicgCallback + _asicgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsStoreInfosCountryGetAPI) + r + u diff --git a/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/List.hs b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/List.hs new file mode 100644 index 000000000..a7ef31223 --- /dev/null +++ b/gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/StoreInfos/List.hs @@ -0,0 +1,340 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List StoreInfos owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ for @PlaymoviespartnerAccountsStoreInfosList@. +module PlayMoviesPartner.Accounts.StoreInfos.List + ( + -- * REST Resource + AccountsStoreInfosListAPI + + -- * Creating a Request + , accountsStoreInfosList + , AccountsStoreInfosList + + -- * Request Lenses + , asilPphNames + , asilXgafv + , asilStudioNames + , asilQuotaUser + , asilVideoIds + , asilPrettyPrint + , asilUploadProtocol + , asilPp + , asilAccessToken + , asilUploadType + , asilCountries + , asilVideoId + , asilAccountId + , asilBearerToken + , asilKey + , asilName + , asilPageToken + , asilOauthToken + , asilPageSize + , asilFields + , asilCallback + , asilAlt + ) where + +import Network.Google.PlayMoviesPartner.Types +import Network.Google.Prelude + +-- | A resource alias for @PlaymoviespartnerAccountsStoreInfosList@ which the +-- 'AccountsStoreInfosList' request conforms to. +type AccountsStoreInfosListAPI = + "v1" :> + "accounts" :> + Capture "accountId" Text :> + "storeInfos" :> + QueryParams "pphNames" Text :> + QueryParams "studioNames" Text :> + QueryParams "videoIds" Text :> + QueryParams "countries" Text :> + QueryParam "videoId" Text :> + QueryParam "name" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListStoreInfosResponse + +-- | List StoreInfos owned or managed by the partner. See _Authentication and +-- Authorization rules_ and _List methods rules_ for more information about +-- this method. +-- +-- /See:/ 'accountsStoreInfosList' smart constructor. +data AccountsStoreInfosList = AccountsStoreInfosList + { _asilPphNames :: !(Maybe Text) + , _asilXgafv :: !(Maybe Text) + , _asilStudioNames :: !(Maybe Text) + , _asilQuotaUser :: !(Maybe Text) + , _asilVideoIds :: !(Maybe Text) + , _asilPrettyPrint :: !Bool + , _asilUploadProtocol :: !(Maybe Text) + , _asilPp :: !Bool + , _asilAccessToken :: !(Maybe Text) + , _asilUploadType :: !(Maybe Text) + , _asilCountries :: !(Maybe Text) + , _asilVideoId :: !(Maybe Text) + , _asilAccountId :: !Text + , _asilBearerToken :: !(Maybe Text) + , _asilKey :: !(Maybe Text) + , _asilName :: !(Maybe Text) + , _asilPageToken :: !(Maybe Text) + , _asilOauthToken :: !(Maybe Text) + , _asilPageSize :: !(Maybe Int32) + , _asilFields :: !(Maybe Text) + , _asilCallback :: !(Maybe Text) + , _asilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsStoreInfosList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asilPphNames' +-- +-- * 'asilXgafv' +-- +-- * 'asilStudioNames' +-- +-- * 'asilQuotaUser' +-- +-- * 'asilVideoIds' +-- +-- * 'asilPrettyPrint' +-- +-- * 'asilUploadProtocol' +-- +-- * 'asilPp' +-- +-- * 'asilAccessToken' +-- +-- * 'asilUploadType' +-- +-- * 'asilCountries' +-- +-- * 'asilVideoId' +-- +-- * 'asilAccountId' +-- +-- * 'asilBearerToken' +-- +-- * 'asilKey' +-- +-- * 'asilName' +-- +-- * 'asilPageToken' +-- +-- * 'asilOauthToken' +-- +-- * 'asilPageSize' +-- +-- * 'asilFields' +-- +-- * 'asilCallback' +-- +-- * 'asilAlt' +accountsStoreInfosList + :: Text -- ^ 'accountId' + -> AccountsStoreInfosList +accountsStoreInfosList pAsilAccountId_ = + AccountsStoreInfosList + { _asilPphNames = Nothing + , _asilXgafv = Nothing + , _asilStudioNames = Nothing + , _asilQuotaUser = Nothing + , _asilVideoIds = Nothing + , _asilPrettyPrint = True + , _asilUploadProtocol = Nothing + , _asilPp = True + , _asilAccessToken = Nothing + , _asilUploadType = Nothing + , _asilCountries = Nothing + , _asilVideoId = Nothing + , _asilAccountId = pAsilAccountId_ + , _asilBearerToken = Nothing + , _asilKey = Nothing + , _asilName = Nothing + , _asilPageToken = Nothing + , _asilOauthToken = Nothing + , _asilPageSize = Nothing + , _asilFields = Nothing + , _asilCallback = Nothing + , _asilAlt = "json" + } + +-- | See _List methods rules_ for info about this field. +asilPphNames :: Lens' AccountsStoreInfosList' (Maybe Text) +asilPphNames + = lens _asilPphNames (\ s a -> s{_asilPphNames = a}) + +-- | V1 error format. +asilXgafv :: Lens' AccountsStoreInfosList' (Maybe Text) +asilXgafv + = lens _asilXgafv (\ s a -> s{_asilXgafv = a}) + +-- | See _List methods rules_ for info about this field. +asilStudioNames :: Lens' AccountsStoreInfosList' (Maybe Text) +asilStudioNames + = lens _asilStudioNames + (\ s a -> s{_asilStudioNames = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +asilQuotaUser :: Lens' AccountsStoreInfosList' (Maybe Text) +asilQuotaUser + = lens _asilQuotaUser + (\ s a -> s{_asilQuotaUser = a}) + +-- | Filter StoreInfos that match any of the given \`video_id\`s. +asilVideoIds :: Lens' AccountsStoreInfosList' (Maybe Text) +asilVideoIds + = lens _asilVideoIds (\ s a -> s{_asilVideoIds = a}) + +-- | Returns response with indentations and line breaks. +asilPrettyPrint :: Lens' AccountsStoreInfosList' Bool +asilPrettyPrint + = lens _asilPrettyPrint + (\ s a -> s{_asilPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +asilUploadProtocol :: Lens' AccountsStoreInfosList' (Maybe Text) +asilUploadProtocol + = lens _asilUploadProtocol + (\ s a -> s{_asilUploadProtocol = a}) + +-- | Pretty-print response. +asilPp :: Lens' AccountsStoreInfosList' Bool +asilPp = lens _asilPp (\ s a -> s{_asilPp = a}) + +-- | OAuth access token. +asilAccessToken :: Lens' AccountsStoreInfosList' (Maybe Text) +asilAccessToken + = lens _asilAccessToken + (\ s a -> s{_asilAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +asilUploadType :: Lens' AccountsStoreInfosList' (Maybe Text) +asilUploadType + = lens _asilUploadType + (\ s a -> s{_asilUploadType = a}) + +-- | Filter StoreInfos that match (case-insensitive) any of the given country +-- codes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", +-- \"us\", \"Us\"). +asilCountries :: Lens' AccountsStoreInfosList' (Maybe Text) +asilCountries + = lens _asilCountries + (\ s a -> s{_asilCountries = a}) + +-- | Filter StoreInfos that match a given \`video_id\`. NOTE: this field is +-- deprecated and will be removed on V2; \`video_ids\` should be used +-- instead. +asilVideoId :: Lens' AccountsStoreInfosList' (Maybe Text) +asilVideoId + = lens _asilVideoId (\ s a -> s{_asilVideoId = a}) + +-- | REQUIRED. See _General rules_ for more information about this field. +asilAccountId :: Lens' AccountsStoreInfosList' Text +asilAccountId + = lens _asilAccountId + (\ s a -> s{_asilAccountId = a}) + +-- | OAuth bearer token. +asilBearerToken :: Lens' AccountsStoreInfosList' (Maybe Text) +asilBearerToken + = lens _asilBearerToken + (\ s a -> s{_asilBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asilKey :: Lens' AccountsStoreInfosList' (Maybe Text) +asilKey = lens _asilKey (\ s a -> s{_asilKey = a}) + +-- | Filter StoreInfos that match a case-insensitive substring of the default +-- name. +asilName :: Lens' AccountsStoreInfosList' (Maybe Text) +asilName = lens _asilName (\ s a -> s{_asilName = a}) + +-- | See _List methods rules_ for info about this field. +asilPageToken :: Lens' AccountsStoreInfosList' (Maybe Text) +asilPageToken + = lens _asilPageToken + (\ s a -> s{_asilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +asilOauthToken :: Lens' AccountsStoreInfosList' (Maybe Text) +asilOauthToken + = lens _asilOauthToken + (\ s a -> s{_asilOauthToken = a}) + +-- | See _List methods rules_ for info about this field. +asilPageSize :: Lens' AccountsStoreInfosList' (Maybe Int32) +asilPageSize + = lens _asilPageSize (\ s a -> s{_asilPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +asilFields :: Lens' AccountsStoreInfosList' (Maybe Text) +asilFields + = lens _asilFields (\ s a -> s{_asilFields = a}) + +-- | JSONP +asilCallback :: Lens' AccountsStoreInfosList' (Maybe Text) +asilCallback + = lens _asilCallback (\ s a -> s{_asilCallback = a}) + +-- | Data format for response. +asilAlt :: Lens' AccountsStoreInfosList' Text +asilAlt = lens _asilAlt (\ s a -> s{_asilAlt = a}) + +instance GoogleRequest AccountsStoreInfosList' where + type Rs AccountsStoreInfosList' = + ListStoreInfosResponse + request + = requestWithRoute defReq playMoviesPartnerURL + requestWithRoute r u AccountsStoreInfosList{..} + = go _asilPphNames _asilXgafv _asilStudioNames + _asilQuotaUser + _asilVideoIds + _asilPrettyPrint + _asilUploadProtocol + _asilPp + _asilAccessToken + _asilUploadType + _asilCountries + _asilVideoId + _asilAccountId + _asilBearerToken + _asilKey + _asilName + _asilPageToken + _asilOauthToken + _asilPageSize + _asilFields + _asilCallback + _asilAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsStoreInfosListAPI) + r + u diff --git a/gogol-play-moviespartner/gogol-play-moviespartner.cabal b/gogol-play-moviespartner/gogol-play-moviespartner.cabal new file mode 100644 index 000000000..71f4fa3f7 --- /dev/null +++ b/gogol-play-moviespartner/gogol-play-moviespartner.cabal @@ -0,0 +1,50 @@ +name: gogol-play-moviespartner +version: 0.0.1 +synopsis: Google Play Movies Partner API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets Google Play Movies Partners get the delivery status of their + titles. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PlayMoviesPartner + , Network.Google.PlayMoviesPartner.Types + , Network.Google.Resource.PlayMoviesPartner.Accounts.Avails.List + , Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.Get + , Network.Google.Resource.PlayMoviesPartner.Accounts.ExperienceLocales.List + , Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.Get + , Network.Google.Resource.PlayMoviesPartner.Accounts.Orders.List + , Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.Country.Get + , Network.Google.Resource.PlayMoviesPartner.Accounts.StoreInfos.List + + other-modules: + Network.Google.PlayMoviesPartner.Types.Product + , Network.Google.PlayMoviesPartner.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-play-moviespartner/src/.gitkeep b/gogol-play-moviespartner/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-plus-domains/LICENSE b/gogol-plus-domains/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-plus-domains/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-plus-domains/Makefile b/gogol-plus-domains/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-plus-domains/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-plus-domains/README.md b/gogol-plus-domains/README.md new file mode 100644 index 000000000..b43925546 --- /dev/null +++ b/gogol-plus-domains/README.md @@ -0,0 +1,28 @@ +# gogol-plus-domains + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google+ Domains API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-plus-domains` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-plus-domains/Setup.hs b/gogol-plus-domains/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-plus-domains/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-plus-domains/gen/Network/Google/PlusDomains.hs b/gogol-plus-domains/gen/Network/Google/PlusDomains.hs new file mode 100644 index 000000000..145e93861 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/PlusDomains.hs @@ -0,0 +1,328 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PlusDomains +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google+ API enables developers to build on top of the Google+ +-- platform. +-- +-- /See:/ +module Network.Google.PlusDomains + ( + -- * API + PlusDomainsAPI + , plusDomainsAPI + , plusDomainsURL + + -- * Service Methods + + -- * REST Resources + + -- ** PlusDomainsActivitiesGet + , module PlusDomains.Activities.Get + + -- ** PlusDomainsActivitiesInsert + , module PlusDomains.Activities.Insert + + -- ** PlusDomainsActivitiesList + , module PlusDomains.Activities.List + + -- ** PlusDomainsAudiencesList + , module PlusDomains.Audiences.List + + -- ** PlusDomainsCirclesAddPeople + , module PlusDomains.Circles.AddPeople + + -- ** PlusDomainsCirclesGet + , module PlusDomains.Circles.Get + + -- ** PlusDomainsCirclesInsert + , module PlusDomains.Circles.Insert + + -- ** PlusDomainsCirclesList + , module PlusDomains.Circles.List + + -- ** PlusDomainsCirclesPatch + , module PlusDomains.Circles.Patch + + -- ** PlusDomainsCirclesRemove + , module PlusDomains.Circles.Remove + + -- ** PlusDomainsCirclesRemovePeople + , module PlusDomains.Circles.RemovePeople + + -- ** PlusDomainsCirclesUpdate + , module PlusDomains.Circles.Update + + -- ** PlusDomainsCommentsGet + , module PlusDomains.Comments.Get + + -- ** PlusDomainsCommentsInsert + , module PlusDomains.Comments.Insert + + -- ** PlusDomainsCommentsList + , module PlusDomains.Comments.List + + -- ** PlusDomainsMediaInsert + , module PlusDomains.Media.Insert + + -- ** PlusDomainsPeopleGet + , module PlusDomains.People.Get + + -- ** PlusDomainsPeopleList + , module PlusDomains.People.List + + -- ** PlusDomainsPeopleListByActivity + , module PlusDomains.People.ListByActivity + + -- ** PlusDomainsPeopleListByCircle + , module PlusDomains.People.ListByCircle + + -- * Types + + -- ** Audience + , Audience + , audience + , aEtag + , aKind + , aVisibility + , aItem + , aMemberCount + + -- ** Circle + , Circle + , circle + , cEtag + , cKind + , cPeople + , cSelfLink + , cDisplayName + , cId + , cDescription + + -- ** Person + , Person + , person + , pCurrentLocation + , pEtag + , pImage + , pBraggingRights + , pPlacesLived + , pPlusOneCount + , pObjectType + , pCover + , pKind + , pRelationshipStatus + , pUrls + , pDomain + , pUrl + , pVerified + , pBirthday + , pIsPlusUser + , pTagline + , pGender + , pName + , pEmails + , pOccupation + , pSkills + , pAboutMe + , pDisplayName + , pId + , pNickname + , pOrganizations + , pCircledByCount + + -- ** Videostream + , Videostream + , videostream + , vHeight + , vUrl + , vWidth + , vType + + -- ** CircleFeed + , CircleFeed + , circleFeed + , cfTotalItems + , cfEtag + , cfNextPageToken + , cfNextLink + , cfKind + , cfItems + , cfSelfLink + , cfTitle + + -- ** PlusDomainsACLentryResource + , PlusDomainsACLentryResource + , plusDomainsACLentryResource + , pdarDisplayName + , pdarId + , pdarType + + -- ** PeopleFeed + , PeopleFeed + , peopleFeed + , pfTotalItems + , pfEtag + , pfNextPageToken + , pfKind + , pfItems + , pfSelfLink + , pfTitle + + -- ** Media + , Media + , media + , mSizeBytes + , mSummary + , mEtag + , mHeight + , mVideoDuration + , mVideoStatus + , mKind + , mPublished + , mUrl + , mWidth + , mMediaUrl + , mStreams + , mExif + , mDisplayName + , mAuthor + , mId + , mUpdated + , mMediaCreatedTime + + -- ** ActivityFeed + , ActivityFeed + , activityFeed + , afEtag + , afNextPageToken + , afNextLink + , afKind + , afItems + , afSelfLink + , afId + , afUpdated + , afTitle + + -- ** AudiencesFeed + , AudiencesFeed + , audiencesFeed + , audTotalItems + , audEtag + , audNextPageToken + , audKind + , audItems + + -- ** Activity + , Activity + , activity + , actAccess + , actPlaceName + , actEtag + , actAnnotation + , actLocation + , actGeocode + , actKind + , actRadius + , actPublished + , actUrl + , actActor + , actAddress + , actObject + , actId + , actUpdated + , actTitle + , actVerb + , actCrosspostSource + , actPlaceId + , actProvider + + -- ** Place + , Place + , place + , plaKind + , plaAddress + , plaDisplayName + , plaId + , plaPosition + + -- ** Comment + , Comment + , comment + , comEtag + , comPlusoners + , comKind + , comPublished + , comActor + , comSelfLink + , comObject + , comId + , comUpdated + , comVerb + , comInReplyTo + + -- ** ACL + , ACL + , aCL + , aclKind + , aclItems + , aclDomainRestricted + , aclDescription + + -- ** CommentFeed + , CommentFeed + , commentFeed + , cffEtag + , cffNextPageToken + , cffNextLink + , cffKind + , cffItems + , cffId + , cffUpdated + , cffTitle + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude +import Network.Google.Resource.PlusDomains.Activities.Get +import Network.Google.Resource.PlusDomains.Activities.Insert +import Network.Google.Resource.PlusDomains.Activities.List +import Network.Google.Resource.PlusDomains.Audiences.List +import Network.Google.Resource.PlusDomains.Circles.AddPeople +import Network.Google.Resource.PlusDomains.Circles.Get +import Network.Google.Resource.PlusDomains.Circles.Insert +import Network.Google.Resource.PlusDomains.Circles.List +import Network.Google.Resource.PlusDomains.Circles.Patch +import Network.Google.Resource.PlusDomains.Circles.Remove +import Network.Google.Resource.PlusDomains.Circles.RemovePeople +import Network.Google.Resource.PlusDomains.Circles.Update +import Network.Google.Resource.PlusDomains.Comments.Get +import Network.Google.Resource.PlusDomains.Comments.Insert +import Network.Google.Resource.PlusDomains.Comments.List +import Network.Google.Resource.PlusDomains.Media.Insert +import Network.Google.Resource.PlusDomains.People.Get +import Network.Google.Resource.PlusDomains.People.List +import Network.Google.Resource.PlusDomains.People.ListByActivity +import Network.Google.Resource.PlusDomains.People.ListByCircle + +{- $resources +TODO +-} + +type PlusDomainsAPI = + Activities :<|> People :<|> Media :<|> Audiences :<|> + Comments + :<|> Circles + +plusDomainsAPI :: Proxy PlusDomainsAPI +plusDomainsAPI = Proxy diff --git a/gogol-plus-domains/gen/Network/Google/PlusDomains/Types.hs b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types.hs new file mode 100644 index 000000000..fd5b69032 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlusDomains.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlusDomains.Types + ( + -- * Service URL + plusDomainsURL + + -- * Audience + , Audience + , audience + , aEtag + , aKind + , aVisibility + , aItem + , aMemberCount + + -- * Circle + , Circle + , circle + , cEtag + , cKind + , cPeople + , cSelfLink + , cDisplayName + , cId + , cDescription + + -- * Person + , Person + , person + , pCurrentLocation + , pEtag + , pImage + , pBraggingRights + , pPlacesLived + , pPlusOneCount + , pObjectType + , pCover + , pKind + , pRelationshipStatus + , pUrls + , pDomain + , pUrl + , pVerified + , pBirthday + , pIsPlusUser + , pTagline + , pGender + , pName + , pEmails + , pOccupation + , pSkills + , pAboutMe + , pDisplayName + , pId + , pNickname + , pOrganizations + , pCircledByCount + + -- * Videostream + , Videostream + , videostream + , vHeight + , vUrl + , vWidth + , vType + + -- * CircleFeed + , CircleFeed + , circleFeed + , cfTotalItems + , cfEtag + , cfNextPageToken + , cfNextLink + , cfKind + , cfItems + , cfSelfLink + , cfTitle + + -- * PlusDomainsACLentryResource + , PlusDomainsACLentryResource + , plusDomainsACLentryResource + , pdarDisplayName + , pdarId + , pdarType + + -- * PeopleFeed + , PeopleFeed + , peopleFeed + , pfTotalItems + , pfEtag + , pfNextPageToken + , pfKind + , pfItems + , pfSelfLink + , pfTitle + + -- * Media + , Media + , media + , mSizeBytes + , mSummary + , mEtag + , mHeight + , mVideoDuration + , mVideoStatus + , mKind + , mPublished + , mUrl + , mWidth + , mMediaUrl + , mStreams + , mExif + , mDisplayName + , mAuthor + , mId + , mUpdated + , mMediaCreatedTime + + -- * ActivityFeed + , ActivityFeed + , activityFeed + , afEtag + , afNextPageToken + , afNextLink + , afKind + , afItems + , afSelfLink + , afId + , afUpdated + , afTitle + + -- * AudiencesFeed + , AudiencesFeed + , audiencesFeed + , audTotalItems + , audEtag + , audNextPageToken + , audKind + , audItems + + -- * Activity + , Activity + , activity + , actAccess + , actPlaceName + , actEtag + , actAnnotation + , actLocation + , actGeocode + , actKind + , actRadius + , actPublished + , actUrl + , actActor + , actAddress + , actObject + , actId + , actUpdated + , actTitle + , actVerb + , actCrosspostSource + , actPlaceId + , actProvider + + -- * Place + , Place + , place + , plaKind + , plaAddress + , plaDisplayName + , plaId + , plaPosition + + -- * Comment + , Comment + , comment + , comEtag + , comPlusoners + , comKind + , comPublished + , comActor + , comSelfLink + , comObject + , comId + , comUpdated + , comVerb + , comInReplyTo + + -- * ACL + , ACL + , aCL + , aclKind + , aclItems + , aclDomainRestricted + , aclDescription + + -- * CommentFeed + , CommentFeed + , commentFeed + , cffEtag + , cffNextPageToken + , cffNextLink + , cffKind + , cffItems + , cffId + , cffUpdated + , cffTitle + ) where + +import Network.Google.PlusDomains.Types.Product +import Network.Google.PlusDomains.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google+ Domains API. +plusDomainsURL :: BaseURL +plusDomainsURL + = BaseUrl Https + "https://www.googleapis.com/plusDomains/v1/" + 443 diff --git a/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs new file mode 100644 index 000000000..e02eee680 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs @@ -0,0 +1,1970 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlusDomains.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlusDomains.Types.Product where + +import Network.Google.PlusDomains.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'audience' smart constructor. +data Audience = Audience + { _aEtag :: !(Maybe Text) + , _aKind :: !Text + , _aVisibility :: !(Maybe Text) + , _aItem :: !(Maybe (Maybe PlusDomainsACLentryResource)) + , _aMemberCount :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Audience' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aKind' +-- +-- * 'aVisibility' +-- +-- * 'aItem' +-- +-- * 'aMemberCount' +audience + :: Audience +audience = + Audience + { _aEtag = Nothing + , _aKind = "plus#audience" + , _aVisibility = Nothing + , _aItem = Nothing + , _aMemberCount = Nothing + } + +-- | ETag of this response for caching purposes. +aEtag :: Lens' Audience (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Identifies this resource as an audience. Value: \"plus#audience\". +aKind :: Lens' Audience Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The circle members\' visibility as chosen by the owner of the circle. +-- This only applies for items with \"item.type\" equals \"circle\". +-- Possible values are: - \"public\" - Members are visible to the public. - +-- \"limited\" - Members are visible to a limited audience. - \"private\" - +-- Members are visible to the owner only. +aVisibility :: Lens' Audience (Maybe Text) +aVisibility + = lens _aVisibility (\ s a -> s{_aVisibility = a}) + +-- | The access control list entry. +aItem :: Lens' Audience (Maybe (Maybe PlusDomainsACLentryResource)) +aItem = lens _aItem (\ s a -> s{_aItem = a}) + +-- | The number of people in this circle. This only applies if entity_type is +-- CIRCLE. +aMemberCount :: Lens' Audience (Maybe Word32) +aMemberCount + = lens _aMemberCount (\ s a -> s{_aMemberCount = a}) + +instance FromJSON Audience where + parseJSON + = withObject "Audience" + (\ o -> + Audience <$> + (o .:? "etag") <*> (o .:? "kind" .!= "plus#audience") + <*> (o .:? "visibility") + <*> (o .:? "item") + <*> (o .:? "memberCount")) + +instance ToJSON Audience where + toJSON Audience{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, Just ("kind" .= _aKind), + ("visibility" .=) <$> _aVisibility, + ("item" .=) <$> _aItem, + ("memberCount" .=) <$> _aMemberCount]) + +-- +-- /See:/ 'circle' smart constructor. +data Circle = Circle + { _cEtag :: !(Maybe Text) + , _cKind :: !Text + , _cPeople :: !(Maybe CirclePeople) + , _cSelfLink :: !(Maybe Text) + , _cDisplayName :: !(Maybe Text) + , _cId :: !(Maybe Text) + , _cDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Circle' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cEtag' +-- +-- * 'cKind' +-- +-- * 'cPeople' +-- +-- * 'cSelfLink' +-- +-- * 'cDisplayName' +-- +-- * 'cId' +-- +-- * 'cDescription' +circle + :: Circle +circle = + Circle + { _cEtag = Nothing + , _cKind = "plus#circle" + , _cPeople = Nothing + , _cSelfLink = Nothing + , _cDisplayName = Nothing + , _cId = Nothing + , _cDescription = Nothing + } + +-- | ETag of this response for caching purposes. +cEtag :: Lens' Circle (Maybe Text) +cEtag = lens _cEtag (\ s a -> s{_cEtag = a}) + +-- | Identifies this resource as a circle. Value: \"plus#circle\". +cKind :: Lens' Circle Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The people in this circle. +cPeople :: Lens' Circle (Maybe CirclePeople) +cPeople = lens _cPeople (\ s a -> s{_cPeople = a}) + +-- | Link to this circle resource +cSelfLink :: Lens' Circle (Maybe Text) +cSelfLink + = lens _cSelfLink (\ s a -> s{_cSelfLink = a}) + +-- | The circle name. +cDisplayName :: Lens' Circle (Maybe Text) +cDisplayName + = lens _cDisplayName (\ s a -> s{_cDisplayName = a}) + +-- | The ID of the circle. +cId :: Lens' Circle (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The description of this circle. +cDescription :: Lens' Circle (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +instance FromJSON Circle where + parseJSON + = withObject "Circle" + (\ o -> + Circle <$> + (o .:? "etag") <*> (o .:? "kind" .!= "plus#circle") + <*> (o .:? "people") + <*> (o .:? "selfLink") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "description")) + +instance ToJSON Circle where + toJSON Circle{..} + = object + (catMaybes + [("etag" .=) <$> _cEtag, Just ("kind" .= _cKind), + ("people" .=) <$> _cPeople, + ("selfLink" .=) <$> _cSelfLink, + ("displayName" .=) <$> _cDisplayName, + ("id" .=) <$> _cId, + ("description" .=) <$> _cDescription]) + +-- +-- /See:/ 'person' smart constructor. +data Person = Person + { _pCurrentLocation :: !(Maybe Text) + , _pEtag :: !(Maybe Text) + , _pImage :: !(Maybe PersonImage) + , _pBraggingRights :: !(Maybe Text) + , _pPlacesLived :: !(Maybe [PersonPlacesLivedItem]) + , _pPlusOneCount :: !(Maybe Int32) + , _pObjectType :: !(Maybe Text) + , _pCover :: !(Maybe PersonCover) + , _pKind :: !Text + , _pRelationshipStatus :: !(Maybe Text) + , _pUrls :: !(Maybe [PersonURLsItem]) + , _pDomain :: !(Maybe Text) + , _pUrl :: !(Maybe Text) + , _pVerified :: !(Maybe Bool) + , _pBirthday :: !(Maybe Text) + , _pIsPlusUser :: !(Maybe Bool) + , _pTagline :: !(Maybe Text) + , _pGender :: !(Maybe Text) + , _pName :: !(Maybe PersonName) + , _pEmails :: !(Maybe [PersonEmailsItem]) + , _pOccupation :: !(Maybe Text) + , _pSkills :: !(Maybe Text) + , _pAboutMe :: !(Maybe Text) + , _pDisplayName :: !(Maybe Text) + , _pId :: !(Maybe Text) + , _pNickname :: !(Maybe Text) + , _pOrganizations :: !(Maybe [PersonOrganizationsItem]) + , _pCircledByCount :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Person' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pCurrentLocation' +-- +-- * 'pEtag' +-- +-- * 'pImage' +-- +-- * 'pBraggingRights' +-- +-- * 'pPlacesLived' +-- +-- * 'pPlusOneCount' +-- +-- * 'pObjectType' +-- +-- * 'pCover' +-- +-- * 'pKind' +-- +-- * 'pRelationshipStatus' +-- +-- * 'pUrls' +-- +-- * 'pDomain' +-- +-- * 'pUrl' +-- +-- * 'pVerified' +-- +-- * 'pBirthday' +-- +-- * 'pIsPlusUser' +-- +-- * 'pTagline' +-- +-- * 'pGender' +-- +-- * 'pName' +-- +-- * 'pEmails' +-- +-- * 'pOccupation' +-- +-- * 'pSkills' +-- +-- * 'pAboutMe' +-- +-- * 'pDisplayName' +-- +-- * 'pId' +-- +-- * 'pNickname' +-- +-- * 'pOrganizations' +-- +-- * 'pCircledByCount' +person + :: Person +person = + Person + { _pCurrentLocation = Nothing + , _pEtag = Nothing + , _pImage = Nothing + , _pBraggingRights = Nothing + , _pPlacesLived = Nothing + , _pPlusOneCount = Nothing + , _pObjectType = Nothing + , _pCover = Nothing + , _pKind = "plus#person" + , _pRelationshipStatus = Nothing + , _pUrls = Nothing + , _pDomain = Nothing + , _pUrl = Nothing + , _pVerified = Nothing + , _pBirthday = Nothing + , _pIsPlusUser = Nothing + , _pTagline = Nothing + , _pGender = Nothing + , _pName = Nothing + , _pEmails = Nothing + , _pOccupation = Nothing + , _pSkills = Nothing + , _pAboutMe = Nothing + , _pDisplayName = Nothing + , _pId = Nothing + , _pNickname = Nothing + , _pOrganizations = Nothing + , _pCircledByCount = Nothing + } + +-- | (this field is not currently used) +pCurrentLocation :: Lens' Person (Maybe Text) +pCurrentLocation + = lens _pCurrentLocation + (\ s a -> s{_pCurrentLocation = a}) + +-- | ETag of this response for caching purposes. +pEtag :: Lens' Person (Maybe Text) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | The representation of the person\'s profile photo. +pImage :: Lens' Person (Maybe PersonImage) +pImage = lens _pImage (\ s a -> s{_pImage = a}) + +-- | The \"bragging rights\" line of this person. +pBraggingRights :: Lens' Person (Maybe Text) +pBraggingRights + = lens _pBraggingRights + (\ s a -> s{_pBraggingRights = a}) + +-- | A list of places where this person has lived. +pPlacesLived :: Lens' Person [PersonPlacesLivedItem] +pPlacesLived + = lens _pPlacesLived (\ s a -> s{_pPlacesLived = a}) + . _Default + . _Coerce + +-- | If a Google+ Page, the number of people who have +1\'d this page. +pPlusOneCount :: Lens' Person (Maybe Int32) +pPlusOneCount + = lens _pPlusOneCount + (\ s a -> s{_pPlusOneCount = a}) + +-- | Type of person within Google+. Possible values include, but are not +-- limited to, the following values: - \"person\" - represents an actual +-- person. - \"page\" - represents a page. +pObjectType :: Lens' Person (Maybe Text) +pObjectType + = lens _pObjectType (\ s a -> s{_pObjectType = a}) + +-- | The cover photo content. +pCover :: Lens' Person (Maybe PersonCover) +pCover = lens _pCover (\ s a -> s{_pCover = a}) + +-- | Identifies this resource as a person. Value: \"plus#person\". +pKind :: Lens' Person Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The person\'s relationship status. Possible values include, but are not +-- limited to, the following values: - \"single\" - Person is single. - +-- \"in_a_relationship\" - Person is in a relationship. - \"engaged\" - +-- Person is engaged. - \"married\" - Person is married. - +-- \"its_complicated\" - The relationship is complicated. - +-- \"open_relationship\" - Person is in an open relationship. - \"widowed\" +-- - Person is widowed. - \"in_domestic_partnership\" - Person is in a +-- domestic partnership. - \"in_civil_union\" - Person is in a civil union. +pRelationshipStatus :: Lens' Person (Maybe Text) +pRelationshipStatus + = lens _pRelationshipStatus + (\ s a -> s{_pRelationshipStatus = a}) + +-- | A list of URLs for this person. +pUrls :: Lens' Person [PersonURLsItem] +pUrls + = lens _pUrls (\ s a -> s{_pUrls = a}) . _Default . + _Coerce + +-- | The hosted domain name for the user\'s Google Apps account. For +-- instance, example.com. The plus.profile.emails.read or email scope is +-- needed to get this domain name. +pDomain :: Lens' Person (Maybe Text) +pDomain = lens _pDomain (\ s a -> s{_pDomain = a}) + +-- | The URL of this person\'s profile. +pUrl :: Lens' Person (Maybe Text) +pUrl = lens _pUrl (\ s a -> s{_pUrl = a}) + +-- | Whether the person or Google+ Page has been verified. +pVerified :: Lens' Person (Maybe Bool) +pVerified + = lens _pVerified (\ s a -> s{_pVerified = a}) + +-- | The person\'s date of birth, represented as YYYY-MM-DD. +pBirthday :: Lens' Person (Maybe Text) +pBirthday + = lens _pBirthday (\ s a -> s{_pBirthday = a}) + +-- | Whether this user has signed up for Google+. +pIsPlusUser :: Lens' Person (Maybe Bool) +pIsPlusUser + = lens _pIsPlusUser (\ s a -> s{_pIsPlusUser = a}) + +-- | The brief description (tagline) of this person. +pTagline :: Lens' Person (Maybe Text) +pTagline = lens _pTagline (\ s a -> s{_pTagline = a}) + +-- | The person\'s gender. Possible values include, but are not limited to, +-- the following values: - \"male\" - Male gender. - \"female\" - Female +-- gender. - \"other\" - Other. +pGender :: Lens' Person (Maybe Text) +pGender = lens _pGender (\ s a -> s{_pGender = a}) + +-- | An object representation of the individual components of a person\'s +-- name. +pName :: Lens' Person (Maybe PersonName) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | A list of email addresses that this person has, including their Google +-- account email address, and the public verified email addresses on their +-- Google+ profile. The plus.profile.emails.read scope is needed to +-- retrieve these email addresses, or the email scope can be used to +-- retrieve just the Google account email address. +pEmails :: Lens' Person [PersonEmailsItem] +pEmails + = lens _pEmails (\ s a -> s{_pEmails = a}) . _Default + . _Coerce + +-- | The occupation of this person. +pOccupation :: Lens' Person (Maybe Text) +pOccupation + = lens _pOccupation (\ s a -> s{_pOccupation = a}) + +-- | The person\'s skills. +pSkills :: Lens' Person (Maybe Text) +pSkills = lens _pSkills (\ s a -> s{_pSkills = a}) + +-- | A short biography for this person. +pAboutMe :: Lens' Person (Maybe Text) +pAboutMe = lens _pAboutMe (\ s a -> s{_pAboutMe = a}) + +-- | The name of this person, which is suitable for display. +pDisplayName :: Lens' Person (Maybe Text) +pDisplayName + = lens _pDisplayName (\ s a -> s{_pDisplayName = a}) + +-- | The ID of this person. +pId :: Lens' Person (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | The nickname of this person. +pNickname :: Lens' Person (Maybe Text) +pNickname + = lens _pNickname (\ s a -> s{_pNickname = a}) + +-- | A list of current or past organizations with which this person is +-- associated. +pOrganizations :: Lens' Person [PersonOrganizationsItem] +pOrganizations + = lens _pOrganizations + (\ s a -> s{_pOrganizations = a}) + . _Default + . _Coerce + +-- | For followers who are visible, the number of people who have added this +-- person or page to a circle. +pCircledByCount :: Lens' Person (Maybe Int32) +pCircledByCount + = lens _pCircledByCount + (\ s a -> s{_pCircledByCount = a}) + +instance FromJSON Person where + parseJSON + = withObject "Person" + (\ o -> + Person <$> + (o .:? "currentLocation") <*> (o .:? "etag") <*> + (o .:? "image") + <*> (o .:? "braggingRights") + <*> (o .:? "placesLived" .!= mempty) + <*> (o .:? "plusOneCount") + <*> (o .:? "objectType") + <*> (o .:? "cover") + <*> (o .:? "kind" .!= "plus#person") + <*> (o .:? "relationshipStatus") + <*> (o .:? "urls" .!= mempty) + <*> (o .:? "domain") + <*> (o .:? "url") + <*> (o .:? "verified") + <*> (o .:? "birthday") + <*> (o .:? "isPlusUser") + <*> (o .:? "tagline") + <*> (o .:? "gender") + <*> (o .:? "name") + <*> (o .:? "emails" .!= mempty) + <*> (o .:? "occupation") + <*> (o .:? "skills") + <*> (o .:? "aboutMe") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "nickname") + <*> (o .:? "organizations" .!= mempty) + <*> (o .:? "circledByCount")) + +instance ToJSON Person where + toJSON Person{..} + = object + (catMaybes + [("currentLocation" .=) <$> _pCurrentLocation, + ("etag" .=) <$> _pEtag, ("image" .=) <$> _pImage, + ("braggingRights" .=) <$> _pBraggingRights, + ("placesLived" .=) <$> _pPlacesLived, + ("plusOneCount" .=) <$> _pPlusOneCount, + ("objectType" .=) <$> _pObjectType, + ("cover" .=) <$> _pCover, Just ("kind" .= _pKind), + ("relationshipStatus" .=) <$> _pRelationshipStatus, + ("urls" .=) <$> _pUrls, ("domain" .=) <$> _pDomain, + ("url" .=) <$> _pUrl, ("verified" .=) <$> _pVerified, + ("birthday" .=) <$> _pBirthday, + ("isPlusUser" .=) <$> _pIsPlusUser, + ("tagline" .=) <$> _pTagline, + ("gender" .=) <$> _pGender, ("name" .=) <$> _pName, + ("emails" .=) <$> _pEmails, + ("occupation" .=) <$> _pOccupation, + ("skills" .=) <$> _pSkills, + ("aboutMe" .=) <$> _pAboutMe, + ("displayName" .=) <$> _pDisplayName, + ("id" .=) <$> _pId, ("nickname" .=) <$> _pNickname, + ("organizations" .=) <$> _pOrganizations, + ("circledByCount" .=) <$> _pCircledByCount]) + +-- +-- /See:/ 'videostream' smart constructor. +data Videostream = Videostream + { _vHeight :: !(Maybe Int32) + , _vUrl :: !(Maybe Text) + , _vWidth :: !(Maybe Int32) + , _vType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Videostream' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vHeight' +-- +-- * 'vUrl' +-- +-- * 'vWidth' +-- +-- * 'vType' +videostream + :: Videostream +videostream = + Videostream + { _vHeight = Nothing + , _vUrl = Nothing + , _vWidth = Nothing + , _vType = Nothing + } + +-- | The height, in pixels, of the video resource. +vHeight :: Lens' Videostream (Maybe Int32) +vHeight = lens _vHeight (\ s a -> s{_vHeight = a}) + +-- | URL of the video stream. +vUrl :: Lens' Videostream (Maybe Text) +vUrl = lens _vUrl (\ s a -> s{_vUrl = a}) + +-- | The width, in pixels, of the video resource. +vWidth :: Lens' Videostream (Maybe Int32) +vWidth = lens _vWidth (\ s a -> s{_vWidth = a}) + +-- | MIME type of the video stream. +vType :: Lens' Videostream (Maybe Text) +vType = lens _vType (\ s a -> s{_vType = a}) + +instance FromJSON Videostream where + parseJSON + = withObject "Videostream" + (\ o -> + Videostream <$> + (o .:? "height") <*> (o .:? "url") <*> + (o .:? "width") + <*> (o .:? "type")) + +instance ToJSON Videostream where + toJSON Videostream{..} + = object + (catMaybes + [("height" .=) <$> _vHeight, ("url" .=) <$> _vUrl, + ("width" .=) <$> _vWidth, ("type" .=) <$> _vType]) + +-- +-- /See:/ 'circleFeed' smart constructor. +data CircleFeed = CircleFeed + { _cfTotalItems :: !(Maybe Int32) + , _cfEtag :: !(Maybe Text) + , _cfNextPageToken :: !(Maybe Text) + , _cfNextLink :: !(Maybe Text) + , _cfKind :: !Text + , _cfItems :: !(Maybe [Maybe Circle]) + , _cfSelfLink :: !(Maybe Text) + , _cfTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CircleFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfTotalItems' +-- +-- * 'cfEtag' +-- +-- * 'cfNextPageToken' +-- +-- * 'cfNextLink' +-- +-- * 'cfKind' +-- +-- * 'cfItems' +-- +-- * 'cfSelfLink' +-- +-- * 'cfTitle' +circleFeed + :: CircleFeed +circleFeed = + CircleFeed + { _cfTotalItems = Nothing + , _cfEtag = Nothing + , _cfNextPageToken = Nothing + , _cfNextLink = Nothing + , _cfKind = "plus#circleFeed" + , _cfItems = Nothing + , _cfSelfLink = Nothing + , _cfTitle = Nothing + } + +-- | The total number of circles. The number of circles in this response may +-- be smaller due to paging. +cfTotalItems :: Lens' CircleFeed (Maybe Int32) +cfTotalItems + = lens _cfTotalItems (\ s a -> s{_cfTotalItems = a}) + +-- | ETag of this response for caching purposes. +cfEtag :: Lens' CircleFeed (Maybe Text) +cfEtag = lens _cfEtag (\ s a -> s{_cfEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +cfNextPageToken :: Lens' CircleFeed (Maybe Text) +cfNextPageToken + = lens _cfNextPageToken + (\ s a -> s{_cfNextPageToken = a}) + +-- | Link to the next page of circles. +cfNextLink :: Lens' CircleFeed (Maybe Text) +cfNextLink + = lens _cfNextLink (\ s a -> s{_cfNextLink = a}) + +-- | Identifies this resource as a collection of circles. Value: +-- \"plus#circleFeed\". +cfKind :: Lens' CircleFeed Text +cfKind = lens _cfKind (\ s a -> s{_cfKind = a}) + +-- | The circles in this page of results. +cfItems :: Lens' CircleFeed [Maybe Circle] +cfItems + = lens _cfItems (\ s a -> s{_cfItems = a}) . _Default + . _Coerce + +-- | Link to this page of circles. +cfSelfLink :: Lens' CircleFeed (Maybe Text) +cfSelfLink + = lens _cfSelfLink (\ s a -> s{_cfSelfLink = a}) + +-- | The title of this list of resources. +cfTitle :: Lens' CircleFeed (Maybe Text) +cfTitle = lens _cfTitle (\ s a -> s{_cfTitle = a}) + +instance FromJSON CircleFeed where + parseJSON + = withObject "CircleFeed" + (\ o -> + CircleFeed <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#circleFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "title")) + +instance ToJSON CircleFeed where + toJSON CircleFeed{..} + = object + (catMaybes + [("totalItems" .=) <$> _cfTotalItems, + ("etag" .=) <$> _cfEtag, + ("nextPageToken" .=) <$> _cfNextPageToken, + ("nextLink" .=) <$> _cfNextLink, + Just ("kind" .= _cfKind), ("items" .=) <$> _cfItems, + ("selfLink" .=) <$> _cfSelfLink, + ("title" .=) <$> _cfTitle]) + +-- +-- /See:/ 'plusDomainsACLentryResource' smart constructor. +data PlusDomainsACLentryResource = PlusDomainsACLentryResource + { _pdarDisplayName :: !(Maybe Text) + , _pdarId :: !(Maybe Text) + , _pdarType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlusDomainsACLentryResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdarDisplayName' +-- +-- * 'pdarId' +-- +-- * 'pdarType' +plusDomainsACLentryResource + :: PlusDomainsACLentryResource +plusDomainsACLentryResource = + PlusDomainsACLentryResource + { _pdarDisplayName = Nothing + , _pdarId = Nothing + , _pdarType = Nothing + } + +-- | A descriptive name for this entry. Suitable for display. +pdarDisplayName :: Lens' PlusDomainsACLentryResource (Maybe Text) +pdarDisplayName + = lens _pdarDisplayName + (\ s a -> s{_pdarDisplayName = a}) + +-- | The ID of the entry. For entries of type \"person\" or \"circle\", this +-- is the ID of the resource. For other types, this property is not set. +pdarId :: Lens' PlusDomainsACLentryResource (Maybe Text) +pdarId = lens _pdarId (\ s a -> s{_pdarId = a}) + +-- | The type of entry describing to whom access is granted. Possible values +-- are: - \"person\" - Access to an individual. - \"circle\" - Access to +-- members of a circle. - \"myCircles\" - Access to members of all the +-- person\'s circles. - \"extendedCircles\" - Access to members of all the +-- person\'s circles, plus all of the people in their circles. - \"domain\" +-- - Access to members of the person\'s Google Apps domain. - \"public\" - +-- Access to anyone on the web. +pdarType :: Lens' PlusDomainsACLentryResource (Maybe Text) +pdarType = lens _pdarType (\ s a -> s{_pdarType = a}) + +instance FromJSON PlusDomainsACLentryResource where + parseJSON + = withObject "PlusDomainsACLentryResource" + (\ o -> + PlusDomainsACLentryResource <$> + (o .:? "displayName") <*> (o .:? "id") <*> + (o .:? "type")) + +instance ToJSON PlusDomainsACLentryResource where + toJSON PlusDomainsACLentryResource{..} + = object + (catMaybes + [("displayName" .=) <$> _pdarDisplayName, + ("id" .=) <$> _pdarId, ("type" .=) <$> _pdarType]) + +-- +-- /See:/ 'peopleFeed' smart constructor. +data PeopleFeed = PeopleFeed + { _pfTotalItems :: !(Maybe Int32) + , _pfEtag :: !(Maybe Text) + , _pfNextPageToken :: !(Maybe Text) + , _pfKind :: !Text + , _pfItems :: !(Maybe [Maybe Person]) + , _pfSelfLink :: !(Maybe Text) + , _pfTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pfTotalItems' +-- +-- * 'pfEtag' +-- +-- * 'pfNextPageToken' +-- +-- * 'pfKind' +-- +-- * 'pfItems' +-- +-- * 'pfSelfLink' +-- +-- * 'pfTitle' +peopleFeed + :: PeopleFeed +peopleFeed = + PeopleFeed + { _pfTotalItems = Nothing + , _pfEtag = Nothing + , _pfNextPageToken = Nothing + , _pfKind = "plus#peopleFeed" + , _pfItems = Nothing + , _pfSelfLink = Nothing + , _pfTitle = Nothing + } + +-- | The total number of people available in this list. The number of people +-- in a response might be smaller due to paging. This might not be set for +-- all collections. +pfTotalItems :: Lens' PeopleFeed (Maybe Int32) +pfTotalItems + = lens _pfTotalItems (\ s a -> s{_pfTotalItems = a}) + +-- | ETag of this response for caching purposes. +pfEtag :: Lens' PeopleFeed (Maybe Text) +pfEtag = lens _pfEtag (\ s a -> s{_pfEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +pfNextPageToken :: Lens' PeopleFeed (Maybe Text) +pfNextPageToken + = lens _pfNextPageToken + (\ s a -> s{_pfNextPageToken = a}) + +-- | Identifies this resource as a collection of people. Value: +-- \"plus#peopleFeed\". +pfKind :: Lens' PeopleFeed Text +pfKind = lens _pfKind (\ s a -> s{_pfKind = a}) + +-- | The people in this page of results. Each item includes the id, +-- displayName, image, and url for the person. To retrieve additional +-- profile data, see the people.get method. +pfItems :: Lens' PeopleFeed [Maybe Person] +pfItems + = lens _pfItems (\ s a -> s{_pfItems = a}) . _Default + . _Coerce + +-- | Link to this resource. +pfSelfLink :: Lens' PeopleFeed (Maybe Text) +pfSelfLink + = lens _pfSelfLink (\ s a -> s{_pfSelfLink = a}) + +-- | The title of this collection of people. +pfTitle :: Lens' PeopleFeed (Maybe Text) +pfTitle = lens _pfTitle (\ s a -> s{_pfTitle = a}) + +instance FromJSON PeopleFeed where + parseJSON + = withObject "PeopleFeed" + (\ o -> + PeopleFeed <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "plus#peopleFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "title")) + +instance ToJSON PeopleFeed where + toJSON PeopleFeed{..} + = object + (catMaybes + [("totalItems" .=) <$> _pfTotalItems, + ("etag" .=) <$> _pfEtag, + ("nextPageToken" .=) <$> _pfNextPageToken, + Just ("kind" .= _pfKind), ("items" .=) <$> _pfItems, + ("selfLink" .=) <$> _pfSelfLink, + ("title" .=) <$> _pfTitle]) + +-- +-- /See:/ 'media' smart constructor. +data Media = Media + { _mSizeBytes :: !(Maybe Int64) + , _mSummary :: !(Maybe Text) + , _mEtag :: !(Maybe Text) + , _mHeight :: !(Maybe Word32) + , _mVideoDuration :: !(Maybe Int64) + , _mVideoStatus :: !(Maybe Text) + , _mKind :: !Text + , _mPublished :: !(Maybe UTCTime) + , _mUrl :: !(Maybe Text) + , _mWidth :: !(Maybe Word32) + , _mMediaUrl :: !(Maybe Text) + , _mStreams :: !(Maybe [Maybe Videostream]) + , _mExif :: !(Maybe MediaExif) + , _mDisplayName :: !(Maybe Text) + , _mAuthor :: !(Maybe MediaAuthor) + , _mId :: !(Maybe Text) + , _mUpdated :: !(Maybe UTCTime) + , _mMediaCreatedTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Media' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mSizeBytes' +-- +-- * 'mSummary' +-- +-- * 'mEtag' +-- +-- * 'mHeight' +-- +-- * 'mVideoDuration' +-- +-- * 'mVideoStatus' +-- +-- * 'mKind' +-- +-- * 'mPublished' +-- +-- * 'mUrl' +-- +-- * 'mWidth' +-- +-- * 'mMediaUrl' +-- +-- * 'mStreams' +-- +-- * 'mExif' +-- +-- * 'mDisplayName' +-- +-- * 'mAuthor' +-- +-- * 'mId' +-- +-- * 'mUpdated' +-- +-- * 'mMediaCreatedTime' +media + :: Media +media = + Media + { _mSizeBytes = Nothing + , _mSummary = Nothing + , _mEtag = Nothing + , _mHeight = Nothing + , _mVideoDuration = Nothing + , _mVideoStatus = Nothing + , _mKind = "plus#media" + , _mPublished = Nothing + , _mUrl = Nothing + , _mWidth = Nothing + , _mMediaUrl = Nothing + , _mStreams = Nothing + , _mExif = Nothing + , _mDisplayName = Nothing + , _mAuthor = Nothing + , _mId = Nothing + , _mUpdated = Nothing + , _mMediaCreatedTime = Nothing + } + +-- | The size in bytes of this video. +mSizeBytes :: Lens' Media (Maybe Int64) +mSizeBytes + = lens _mSizeBytes (\ s a -> s{_mSizeBytes = a}) + +-- | A description, or caption, for this media. +mSummary :: Lens' Media (Maybe Text) +mSummary = lens _mSummary (\ s a -> s{_mSummary = a}) + +-- | ETag of this response for caching purposes. +mEtag :: Lens' Media (Maybe Text) +mEtag = lens _mEtag (\ s a -> s{_mEtag = a}) + +-- | The height in pixels of the original image. +mHeight :: Lens' Media (Maybe Word32) +mHeight = lens _mHeight (\ s a -> s{_mHeight = a}) + +-- | The duration in milliseconds of this video. +mVideoDuration :: Lens' Media (Maybe Int64) +mVideoDuration + = lens _mVideoDuration + (\ s a -> s{_mVideoDuration = a}) + +-- | The encoding status of this video. Possible values are: - \"UPLOADING\" +-- - Not all the video bytes have been received. - \"PENDING\" - Video not +-- yet processed. - \"FAILED\" - Video processing failed. - \"READY\" - A +-- single video stream is playable. - \"FINAL\" - All video streams are +-- playable. +mVideoStatus :: Lens' Media (Maybe Text) +mVideoStatus + = lens _mVideoStatus (\ s a -> s{_mVideoStatus = a}) + +-- | The type of resource. +mKind :: Lens' Media Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | The time at which this media was uploaded. Formatted as an RFC 3339 +-- timestamp. +mPublished :: Lens' Media (Maybe UTCTime) +mPublished + = lens _mPublished (\ s a -> s{_mPublished = a}) + +-- | The URL for the page that hosts this media. +mUrl :: Lens' Media (Maybe Text) +mUrl = lens _mUrl (\ s a -> s{_mUrl = a}) + +-- | The width in pixels of the original image. +mWidth :: Lens' Media (Maybe Word32) +mWidth = lens _mWidth (\ s a -> s{_mWidth = a}) + +-- | The URL of this photo or video\'s still image. +mMediaUrl :: Lens' Media (Maybe Text) +mMediaUrl + = lens _mMediaUrl (\ s a -> s{_mMediaUrl = a}) + +-- | The list of video streams for this video. There might be several +-- different streams available for a single video, either Flash or MPEG, of +-- various sizes +mStreams :: Lens' Media [Maybe Videostream] +mStreams + = lens _mStreams (\ s a -> s{_mStreams = a}) . + _Default + . _Coerce + +-- | Exif information of the media item. +mExif :: Lens' Media (Maybe MediaExif) +mExif = lens _mExif (\ s a -> s{_mExif = a}) + +-- | The display name for this media. +mDisplayName :: Lens' Media (Maybe Text) +mDisplayName + = lens _mDisplayName (\ s a -> s{_mDisplayName = a}) + +-- | The person who uploaded this media. +mAuthor :: Lens' Media (Maybe MediaAuthor) +mAuthor = lens _mAuthor (\ s a -> s{_mAuthor = a}) + +-- | ID of this media, which is generated by the API. +mId :: Lens' Media (Maybe Text) +mId = lens _mId (\ s a -> s{_mId = a}) + +-- | The time at which this media was last updated. This includes changes to +-- media metadata. Formatted as an RFC 3339 timestamp. +mUpdated :: Lens' Media (Maybe UTCTime) +mUpdated = lens _mUpdated (\ s a -> s{_mUpdated = a}) + +-- | The time at which this media was originally created in UTC. Formatted as +-- an RFC 3339 timestamp that matches this example: +-- 2010-11-25T14:30:27.655Z +mMediaCreatedTime :: Lens' Media (Maybe UTCTime) +mMediaCreatedTime + = lens _mMediaCreatedTime + (\ s a -> s{_mMediaCreatedTime = a}) + +instance FromJSON Media where + parseJSON + = withObject "Media" + (\ o -> + Media <$> + (o .:? "sizeBytes") <*> (o .:? "summary") <*> + (o .:? "etag") + <*> (o .:? "height") + <*> (o .:? "videoDuration") + <*> (o .:? "videoStatus") + <*> (o .:? "kind" .!= "plus#media") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "width") + <*> (o .:? "mediaUrl") + <*> (o .:? "streams" .!= mempty) + <*> (o .:? "exif") + <*> (o .:? "displayName") + <*> (o .:? "author") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "mediaCreatedTime")) + +instance ToJSON Media where + toJSON Media{..} + = object + (catMaybes + [("sizeBytes" .=) <$> _mSizeBytes, + ("summary" .=) <$> _mSummary, ("etag" .=) <$> _mEtag, + ("height" .=) <$> _mHeight, + ("videoDuration" .=) <$> _mVideoDuration, + ("videoStatus" .=) <$> _mVideoStatus, + Just ("kind" .= _mKind), + ("published" .=) <$> _mPublished, + ("url" .=) <$> _mUrl, ("width" .=) <$> _mWidth, + ("mediaUrl" .=) <$> _mMediaUrl, + ("streams" .=) <$> _mStreams, ("exif" .=) <$> _mExif, + ("displayName" .=) <$> _mDisplayName, + ("author" .=) <$> _mAuthor, ("id" .=) <$> _mId, + ("updated" .=) <$> _mUpdated, + ("mediaCreatedTime" .=) <$> _mMediaCreatedTime]) + +-- +-- /See:/ 'activityFeed' smart constructor. +data ActivityFeed = ActivityFeed + { _afEtag :: !(Maybe Text) + , _afNextPageToken :: !(Maybe Text) + , _afNextLink :: !(Maybe Text) + , _afKind :: !Text + , _afItems :: !(Maybe [Maybe Activity]) + , _afSelfLink :: !(Maybe Text) + , _afId :: !(Maybe Text) + , _afUpdated :: !(Maybe UTCTime) + , _afTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'afEtag' +-- +-- * 'afNextPageToken' +-- +-- * 'afNextLink' +-- +-- * 'afKind' +-- +-- * 'afItems' +-- +-- * 'afSelfLink' +-- +-- * 'afId' +-- +-- * 'afUpdated' +-- +-- * 'afTitle' +activityFeed + :: ActivityFeed +activityFeed = + ActivityFeed + { _afEtag = Nothing + , _afNextPageToken = Nothing + , _afNextLink = Nothing + , _afKind = "plus#activityFeed" + , _afItems = Nothing + , _afSelfLink = Nothing + , _afId = Nothing + , _afUpdated = Nothing + , _afTitle = Nothing + } + +-- | ETag of this response for caching purposes. +afEtag :: Lens' ActivityFeed (Maybe Text) +afEtag = lens _afEtag (\ s a -> s{_afEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +afNextPageToken :: Lens' ActivityFeed (Maybe Text) +afNextPageToken + = lens _afNextPageToken + (\ s a -> s{_afNextPageToken = a}) + +-- | Link to the next page of activities. +afNextLink :: Lens' ActivityFeed (Maybe Text) +afNextLink + = lens _afNextLink (\ s a -> s{_afNextLink = a}) + +-- | Identifies this resource as a collection of activities. Value: +-- \"plus#activityFeed\". +afKind :: Lens' ActivityFeed Text +afKind = lens _afKind (\ s a -> s{_afKind = a}) + +-- | The activities in this page of results. +afItems :: Lens' ActivityFeed [Maybe Activity] +afItems + = lens _afItems (\ s a -> s{_afItems = a}) . _Default + . _Coerce + +-- | Link to this activity resource. +afSelfLink :: Lens' ActivityFeed (Maybe Text) +afSelfLink + = lens _afSelfLink (\ s a -> s{_afSelfLink = a}) + +-- | The ID of this collection of activities. Deprecated. +afId :: Lens' ActivityFeed (Maybe Text) +afId = lens _afId (\ s a -> s{_afId = a}) + +-- | The time at which this collection of activities was last updated. +-- Formatted as an RFC 3339 timestamp. +afUpdated :: Lens' ActivityFeed (Maybe UTCTime) +afUpdated + = lens _afUpdated (\ s a -> s{_afUpdated = a}) + +-- | The title of this collection of activities, which is a truncated portion +-- of the content. +afTitle :: Lens' ActivityFeed (Maybe Text) +afTitle = lens _afTitle (\ s a -> s{_afTitle = a}) + +instance FromJSON ActivityFeed where + parseJSON + = withObject "ActivityFeed" + (\ o -> + ActivityFeed <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#activityFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON ActivityFeed where + toJSON ActivityFeed{..} + = object + (catMaybes + [("etag" .=) <$> _afEtag, + ("nextPageToken" .=) <$> _afNextPageToken, + ("nextLink" .=) <$> _afNextLink, + Just ("kind" .= _afKind), ("items" .=) <$> _afItems, + ("selfLink" .=) <$> _afSelfLink, ("id" .=) <$> _afId, + ("updated" .=) <$> _afUpdated, + ("title" .=) <$> _afTitle]) + +-- +-- /See:/ 'audiencesFeed' smart constructor. +data AudiencesFeed = AudiencesFeed + { _audTotalItems :: !(Maybe Int32) + , _audEtag :: !(Maybe Text) + , _audNextPageToken :: !(Maybe Text) + , _audKind :: !Text + , _audItems :: !(Maybe [Maybe Audience]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AudiencesFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'audTotalItems' +-- +-- * 'audEtag' +-- +-- * 'audNextPageToken' +-- +-- * 'audKind' +-- +-- * 'audItems' +audiencesFeed + :: AudiencesFeed +audiencesFeed = + AudiencesFeed + { _audTotalItems = Nothing + , _audEtag = Nothing + , _audNextPageToken = Nothing + , _audKind = "plus#audiencesFeed" + , _audItems = Nothing + } + +-- | The total number of ACL entries. The number of entries in this response +-- may be smaller due to paging. +audTotalItems :: Lens' AudiencesFeed (Maybe Int32) +audTotalItems + = lens _audTotalItems + (\ s a -> s{_audTotalItems = a}) + +-- | ETag of this response for caching purposes. +audEtag :: Lens' AudiencesFeed (Maybe Text) +audEtag = lens _audEtag (\ s a -> s{_audEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +audNextPageToken :: Lens' AudiencesFeed (Maybe Text) +audNextPageToken + = lens _audNextPageToken + (\ s a -> s{_audNextPageToken = a}) + +-- | Identifies this resource as a collection of audiences. Value: +-- \"plus#audienceFeed\". +audKind :: Lens' AudiencesFeed Text +audKind = lens _audKind (\ s a -> s{_audKind = a}) + +-- | The audiences in this result. +audItems :: Lens' AudiencesFeed [Maybe Audience] +audItems + = lens _audItems (\ s a -> s{_audItems = a}) . + _Default + . _Coerce + +instance FromJSON AudiencesFeed where + parseJSON + = withObject "AudiencesFeed" + (\ o -> + AudiencesFeed <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "plus#audiencesFeed") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON AudiencesFeed where + toJSON AudiencesFeed{..} + = object + (catMaybes + [("totalItems" .=) <$> _audTotalItems, + ("etag" .=) <$> _audEtag, + ("nextPageToken" .=) <$> _audNextPageToken, + Just ("kind" .= _audKind), + ("items" .=) <$> _audItems]) + +-- +-- /See:/ 'activity' smart constructor. +data Activity = Activity + { _actAccess :: !(Maybe (Maybe ACL)) + , _actPlaceName :: !(Maybe Text) + , _actEtag :: !(Maybe Text) + , _actAnnotation :: !(Maybe Text) + , _actLocation :: !(Maybe (Maybe Place)) + , _actGeocode :: !(Maybe Text) + , _actKind :: !Text + , _actRadius :: !(Maybe Text) + , _actPublished :: !(Maybe UTCTime) + , _actUrl :: !(Maybe Text) + , _actActor :: !(Maybe ActivityActor) + , _actAddress :: !(Maybe Text) + , _actObject :: !(Maybe ActivityObject) + , _actId :: !(Maybe Text) + , _actUpdated :: !(Maybe UTCTime) + , _actTitle :: !(Maybe Text) + , _actVerb :: !(Maybe Text) + , _actCrosspostSource :: !(Maybe Text) + , _actPlaceId :: !(Maybe Text) + , _actProvider :: !(Maybe ActivityProvider) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actAccess' +-- +-- * 'actPlaceName' +-- +-- * 'actEtag' +-- +-- * 'actAnnotation' +-- +-- * 'actLocation' +-- +-- * 'actGeocode' +-- +-- * 'actKind' +-- +-- * 'actRadius' +-- +-- * 'actPublished' +-- +-- * 'actUrl' +-- +-- * 'actActor' +-- +-- * 'actAddress' +-- +-- * 'actObject' +-- +-- * 'actId' +-- +-- * 'actUpdated' +-- +-- * 'actTitle' +-- +-- * 'actVerb' +-- +-- * 'actCrosspostSource' +-- +-- * 'actPlaceId' +-- +-- * 'actProvider' +activity + :: Activity +activity = + Activity + { _actAccess = Nothing + , _actPlaceName = Nothing + , _actEtag = Nothing + , _actAnnotation = Nothing + , _actLocation = Nothing + , _actGeocode = Nothing + , _actKind = "plus#activity" + , _actRadius = Nothing + , _actPublished = Nothing + , _actUrl = Nothing + , _actActor = Nothing + , _actAddress = Nothing + , _actObject = Nothing + , _actId = Nothing + , _actUpdated = Nothing + , _actTitle = Nothing + , _actVerb = Nothing + , _actCrosspostSource = Nothing + , _actPlaceId = Nothing + , _actProvider = Nothing + } + +-- | Identifies who has access to see this activity. +actAccess :: Lens' Activity (Maybe (Maybe ACL)) +actAccess + = lens _actAccess (\ s a -> s{_actAccess = a}) + +-- | Name of the place where this activity occurred. +actPlaceName :: Lens' Activity (Maybe Text) +actPlaceName + = lens _actPlaceName (\ s a -> s{_actPlaceName = a}) + +-- | ETag of this response for caching purposes. +actEtag :: Lens' Activity (Maybe Text) +actEtag = lens _actEtag (\ s a -> s{_actEtag = a}) + +-- | Additional content added by the person who shared this activity, +-- applicable only when resharing an activity. +actAnnotation :: Lens' Activity (Maybe Text) +actAnnotation + = lens _actAnnotation + (\ s a -> s{_actAnnotation = a}) + +-- | The location where this activity occurred. +actLocation :: Lens' Activity (Maybe (Maybe Place)) +actLocation + = lens _actLocation (\ s a -> s{_actLocation = a}) + +-- | Latitude and longitude where this activity occurred. Format is latitude +-- followed by longitude, space separated. +actGeocode :: Lens' Activity (Maybe Text) +actGeocode + = lens _actGeocode (\ s a -> s{_actGeocode = a}) + +-- | Identifies this resource as an activity. Value: \"plus#activity\". +actKind :: Lens' Activity Text +actKind = lens _actKind (\ s a -> s{_actKind = a}) + +-- | Radius, in meters, of the region where this activity occurred, centered +-- at the latitude and longitude identified in geocode. +actRadius :: Lens' Activity (Maybe Text) +actRadius + = lens _actRadius (\ s a -> s{_actRadius = a}) + +-- | The time at which this activity was initially published. Formatted as an +-- RFC 3339 timestamp. +actPublished :: Lens' Activity (Maybe UTCTime) +actPublished + = lens _actPublished (\ s a -> s{_actPublished = a}) + +-- | The link to this activity. +actUrl :: Lens' Activity (Maybe Text) +actUrl = lens _actUrl (\ s a -> s{_actUrl = a}) + +-- | The person who performed this activity. +actActor :: Lens' Activity (Maybe ActivityActor) +actActor = lens _actActor (\ s a -> s{_actActor = a}) + +-- | Street address where this activity occurred. +actAddress :: Lens' Activity (Maybe Text) +actAddress + = lens _actAddress (\ s a -> s{_actAddress = a}) + +-- | The object of this activity. +actObject :: Lens' Activity (Maybe ActivityObject) +actObject + = lens _actObject (\ s a -> s{_actObject = a}) + +-- | The ID of this activity. +actId :: Lens' Activity (Maybe Text) +actId = lens _actId (\ s a -> s{_actId = a}) + +-- | The time at which this activity was last updated. Formatted as an RFC +-- 3339 timestamp. +actUpdated :: Lens' Activity (Maybe UTCTime) +actUpdated + = lens _actUpdated (\ s a -> s{_actUpdated = a}) + +-- | Title of this activity. +actTitle :: Lens' Activity (Maybe Text) +actTitle = lens _actTitle (\ s a -> s{_actTitle = a}) + +-- | This activity\'s verb, which indicates the action that was performed. +-- Possible values include, but are not limited to, the following values: - +-- \"post\" - Publish content to the stream. - \"share\" - Reshare an +-- activity. +actVerb :: Lens' Activity (Maybe Text) +actVerb = lens _actVerb (\ s a -> s{_actVerb = a}) + +-- | If this activity is a crosspost from another system, this property +-- specifies the ID of the original activity. +actCrosspostSource :: Lens' Activity (Maybe Text) +actCrosspostSource + = lens _actCrosspostSource + (\ s a -> s{_actCrosspostSource = a}) + +-- | ID of the place where this activity occurred. +actPlaceId :: Lens' Activity (Maybe Text) +actPlaceId + = lens _actPlaceId (\ s a -> s{_actPlaceId = a}) + +-- | The service provider that initially published this activity. +actProvider :: Lens' Activity (Maybe ActivityProvider) +actProvider + = lens _actProvider (\ s a -> s{_actProvider = a}) + +instance FromJSON Activity where + parseJSON + = withObject "Activity" + (\ o -> + Activity <$> + (o .:? "access") <*> (o .:? "placeName") <*> + (o .:? "etag") + <*> (o .:? "annotation") + <*> (o .:? "location") + <*> (o .:? "geocode") + <*> (o .:? "kind" .!= "plus#activity") + <*> (o .:? "radius") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "actor") + <*> (o .:? "address") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title") + <*> (o .:? "verb") + <*> (o .:? "crosspostSource") + <*> (o .:? "placeId") + <*> (o .:? "provider")) + +instance ToJSON Activity where + toJSON Activity{..} + = object + (catMaybes + [("access" .=) <$> _actAccess, + ("placeName" .=) <$> _actPlaceName, + ("etag" .=) <$> _actEtag, + ("annotation" .=) <$> _actAnnotation, + ("location" .=) <$> _actLocation, + ("geocode" .=) <$> _actGeocode, + Just ("kind" .= _actKind), + ("radius" .=) <$> _actRadius, + ("published" .=) <$> _actPublished, + ("url" .=) <$> _actUrl, ("actor" .=) <$> _actActor, + ("address" .=) <$> _actAddress, + ("object" .=) <$> _actObject, ("id" .=) <$> _actId, + ("updated" .=) <$> _actUpdated, + ("title" .=) <$> _actTitle, ("verb" .=) <$> _actVerb, + ("crosspostSource" .=) <$> _actCrosspostSource, + ("placeId" .=) <$> _actPlaceId, + ("provider" .=) <$> _actProvider]) + +-- +-- /See:/ 'place' smart constructor. +data Place = Place + { _plaKind :: !Text + , _plaAddress :: !(Maybe PlaceAddress) + , _plaDisplayName :: !(Maybe Text) + , _plaId :: !(Maybe Text) + , _plaPosition :: !(Maybe PlacePosition) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Place' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaKind' +-- +-- * 'plaAddress' +-- +-- * 'plaDisplayName' +-- +-- * 'plaId' +-- +-- * 'plaPosition' +place + :: Place +place = + Place + { _plaKind = "plus#place" + , _plaAddress = Nothing + , _plaDisplayName = Nothing + , _plaId = Nothing + , _plaPosition = Nothing + } + +-- | Identifies this resource as a place. Value: \"plus#place\". +plaKind :: Lens' Place Text +plaKind = lens _plaKind (\ s a -> s{_plaKind = a}) + +-- | The physical address of the place. +plaAddress :: Lens' Place (Maybe PlaceAddress) +plaAddress + = lens _plaAddress (\ s a -> s{_plaAddress = a}) + +-- | The display name of the place. +plaDisplayName :: Lens' Place (Maybe Text) +plaDisplayName + = lens _plaDisplayName + (\ s a -> s{_plaDisplayName = a}) + +-- | The id of the place. +plaId :: Lens' Place (Maybe Text) +plaId = lens _plaId (\ s a -> s{_plaId = a}) + +-- | The position of the place. +plaPosition :: Lens' Place (Maybe PlacePosition) +plaPosition + = lens _plaPosition (\ s a -> s{_plaPosition = a}) + +instance FromJSON Place where + parseJSON + = withObject "Place" + (\ o -> + Place <$> + (o .:? "kind" .!= "plus#place") <*> (o .:? "address") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "position")) + +instance ToJSON Place where + toJSON Place{..} + = object + (catMaybes + [Just ("kind" .= _plaKind), + ("address" .=) <$> _plaAddress, + ("displayName" .=) <$> _plaDisplayName, + ("id" .=) <$> _plaId, + ("position" .=) <$> _plaPosition]) + +-- +-- /See:/ 'comment' smart constructor. +data Comment = Comment + { _comEtag :: !(Maybe Text) + , _comPlusoners :: !(Maybe CommentPlusoners) + , _comKind :: !Text + , _comPublished :: !(Maybe UTCTime) + , _comActor :: !(Maybe CommentActor) + , _comSelfLink :: !(Maybe Text) + , _comObject :: !(Maybe CommentObject) + , _comId :: !(Maybe Text) + , _comUpdated :: !(Maybe UTCTime) + , _comVerb :: !Text + , _comInReplyTo :: !(Maybe [CommentInReplyToItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Comment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comEtag' +-- +-- * 'comPlusoners' +-- +-- * 'comKind' +-- +-- * 'comPublished' +-- +-- * 'comActor' +-- +-- * 'comSelfLink' +-- +-- * 'comObject' +-- +-- * 'comId' +-- +-- * 'comUpdated' +-- +-- * 'comVerb' +-- +-- * 'comInReplyTo' +comment + :: Comment +comment = + Comment + { _comEtag = Nothing + , _comPlusoners = Nothing + , _comKind = "plus#comment" + , _comPublished = Nothing + , _comActor = Nothing + , _comSelfLink = Nothing + , _comObject = Nothing + , _comId = Nothing + , _comUpdated = Nothing + , _comVerb = "post" + , _comInReplyTo = Nothing + } + +-- | ETag of this response for caching purposes. +comEtag :: Lens' Comment (Maybe Text) +comEtag = lens _comEtag (\ s a -> s{_comEtag = a}) + +-- | People who +1\'d this comment. +comPlusoners :: Lens' Comment (Maybe CommentPlusoners) +comPlusoners + = lens _comPlusoners (\ s a -> s{_comPlusoners = a}) + +-- | Identifies this resource as a comment. Value: \"plus#comment\". +comKind :: Lens' Comment Text +comKind = lens _comKind (\ s a -> s{_comKind = a}) + +-- | The time at which this comment was initially published. Formatted as an +-- RFC 3339 timestamp. +comPublished :: Lens' Comment (Maybe UTCTime) +comPublished + = lens _comPublished (\ s a -> s{_comPublished = a}) + +-- | The person who posted this comment. +comActor :: Lens' Comment (Maybe CommentActor) +comActor = lens _comActor (\ s a -> s{_comActor = a}) + +-- | Link to this comment resource. +comSelfLink :: Lens' Comment (Maybe Text) +comSelfLink + = lens _comSelfLink (\ s a -> s{_comSelfLink = a}) + +-- | The object of this comment. +comObject :: Lens' Comment (Maybe CommentObject) +comObject + = lens _comObject (\ s a -> s{_comObject = a}) + +-- | The ID of this comment. +comId :: Lens' Comment (Maybe Text) +comId = lens _comId (\ s a -> s{_comId = a}) + +-- | The time at which this comment was last updated. Formatted as an RFC +-- 3339 timestamp. +comUpdated :: Lens' Comment (Maybe UTCTime) +comUpdated + = lens _comUpdated (\ s a -> s{_comUpdated = a}) + +-- | This comment\'s verb, indicating what action was performed. Possible +-- values are: - \"post\" - Publish content to the stream. +comVerb :: Lens' Comment Text +comVerb = lens _comVerb (\ s a -> s{_comVerb = a}) + +-- | The activity this comment replied to. +comInReplyTo :: Lens' Comment [CommentInReplyToItem] +comInReplyTo + = lens _comInReplyTo (\ s a -> s{_comInReplyTo = a}) + . _Default + . _Coerce + +instance FromJSON Comment where + parseJSON + = withObject "Comment" + (\ o -> + Comment <$> + (o .:? "etag") <*> (o .:? "plusoners") <*> + (o .:? "kind" .!= "plus#comment") + <*> (o .:? "published") + <*> (o .:? "actor") + <*> (o .:? "selfLink") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "verb" .!= "post") + <*> (o .:? "inReplyTo" .!= mempty)) + +instance ToJSON Comment where + toJSON Comment{..} + = object + (catMaybes + [("etag" .=) <$> _comEtag, + ("plusoners" .=) <$> _comPlusoners, + Just ("kind" .= _comKind), + ("published" .=) <$> _comPublished, + ("actor" .=) <$> _comActor, + ("selfLink" .=) <$> _comSelfLink, + ("object" .=) <$> _comObject, ("id" .=) <$> _comId, + ("updated" .=) <$> _comUpdated, + Just ("verb" .= _comVerb), + ("inReplyTo" .=) <$> _comInReplyTo]) + +-- +-- /See:/ 'aCL' smart constructor. +data ACL = ACL + { _aclKind :: !Text + , _aclItems :: !(Maybe [Maybe PlusDomainsACLentryResource]) + , _aclDomainRestricted :: !(Maybe Bool) + , _aclDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclKind' +-- +-- * 'aclItems' +-- +-- * 'aclDomainRestricted' +-- +-- * 'aclDescription' +aCL + :: ACL +aCL = + ACL + { _aclKind = "plus#acl" + , _aclItems = Nothing + , _aclDomainRestricted = Nothing + , _aclDescription = Nothing + } + +-- | Identifies this resource as a collection of access controls. Value: +-- \"plus#acl\". +aclKind :: Lens' ACL Text +aclKind = lens _aclKind (\ s a -> s{_aclKind = a}) + +-- | The list of access entries. +aclItems :: Lens' ACL [Maybe PlusDomainsACLentryResource] +aclItems + = lens _aclItems (\ s a -> s{_aclItems = a}) . + _Default + . _Coerce + +-- | Whether access is restricted to the domain. +aclDomainRestricted :: Lens' ACL (Maybe Bool) +aclDomainRestricted + = lens _aclDomainRestricted + (\ s a -> s{_aclDomainRestricted = a}) + +-- | Description of the access granted, suitable for display. +aclDescription :: Lens' ACL (Maybe Text) +aclDescription + = lens _aclDescription + (\ s a -> s{_aclDescription = a}) + +instance FromJSON ACL where + parseJSON + = withObject "ACL" + (\ o -> + ACL <$> + (o .:? "kind" .!= "plus#acl") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "domainRestricted") + <*> (o .:? "description")) + +instance ToJSON ACL where + toJSON ACL{..} + = object + (catMaybes + [Just ("kind" .= _aclKind), + ("items" .=) <$> _aclItems, + ("domainRestricted" .=) <$> _aclDomainRestricted, + ("description" .=) <$> _aclDescription]) + +-- +-- /See:/ 'commentFeed' smart constructor. +data CommentFeed = CommentFeed + { _cffEtag :: !(Maybe Text) + , _cffNextPageToken :: !(Maybe Text) + , _cffNextLink :: !(Maybe Text) + , _cffKind :: !Text + , _cffItems :: !(Maybe [Maybe Comment]) + , _cffId :: !(Maybe Text) + , _cffUpdated :: !(Maybe UTCTime) + , _cffTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cffEtag' +-- +-- * 'cffNextPageToken' +-- +-- * 'cffNextLink' +-- +-- * 'cffKind' +-- +-- * 'cffItems' +-- +-- * 'cffId' +-- +-- * 'cffUpdated' +-- +-- * 'cffTitle' +commentFeed + :: CommentFeed +commentFeed = + CommentFeed + { _cffEtag = Nothing + , _cffNextPageToken = Nothing + , _cffNextLink = Nothing + , _cffKind = "plus#commentFeed" + , _cffItems = Nothing + , _cffId = Nothing + , _cffUpdated = Nothing + , _cffTitle = Nothing + } + +-- | ETag of this response for caching purposes. +cffEtag :: Lens' CommentFeed (Maybe Text) +cffEtag = lens _cffEtag (\ s a -> s{_cffEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +cffNextPageToken :: Lens' CommentFeed (Maybe Text) +cffNextPageToken + = lens _cffNextPageToken + (\ s a -> s{_cffNextPageToken = a}) + +-- | Link to the next page of activities. +cffNextLink :: Lens' CommentFeed (Maybe Text) +cffNextLink + = lens _cffNextLink (\ s a -> s{_cffNextLink = a}) + +-- | Identifies this resource as a collection of comments. Value: +-- \"plus#commentFeed\". +cffKind :: Lens' CommentFeed Text +cffKind = lens _cffKind (\ s a -> s{_cffKind = a}) + +-- | The comments in this page of results. +cffItems :: Lens' CommentFeed [Maybe Comment] +cffItems + = lens _cffItems (\ s a -> s{_cffItems = a}) . + _Default + . _Coerce + +-- | The ID of this collection of comments. +cffId :: Lens' CommentFeed (Maybe Text) +cffId = lens _cffId (\ s a -> s{_cffId = a}) + +-- | The time at which this collection of comments was last updated. +-- Formatted as an RFC 3339 timestamp. +cffUpdated :: Lens' CommentFeed (Maybe UTCTime) +cffUpdated + = lens _cffUpdated (\ s a -> s{_cffUpdated = a}) + +-- | The title of this collection of comments. +cffTitle :: Lens' CommentFeed (Maybe Text) +cffTitle = lens _cffTitle (\ s a -> s{_cffTitle = a}) + +instance FromJSON CommentFeed where + parseJSON + = withObject "CommentFeed" + (\ o -> + CommentFeed <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#commentFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON CommentFeed where + toJSON CommentFeed{..} + = object + (catMaybes + [("etag" .=) <$> _cffEtag, + ("nextPageToken" .=) <$> _cffNextPageToken, + ("nextLink" .=) <$> _cffNextLink, + Just ("kind" .= _cffKind), + ("items" .=) <$> _cffItems, ("id" .=) <$> _cffId, + ("updated" .=) <$> _cffUpdated, + ("title" .=) <$> _cffTitle]) diff --git a/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Sum.hs b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Sum.hs new file mode 100644 index 000000000..1a7e9a807 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PlusDomains.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PlusDomains.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Get.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Get.hs new file mode 100644 index 000000000..f03de6a55 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Activities.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get an activity. +-- +-- /See:/ for @PlusDomainsActivitiesGet@. +module PlusDomains.Activities.Get + ( + -- * REST Resource + ActivitiesGetAPI + + -- * Creating a Request + , activitiesGet + , ActivitiesGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agActivityId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsActivitiesGet@ which the +-- 'ActivitiesGet' request conforms to. +type ActivitiesGetAPI = + "activities" :> + Capture "activityId" Text :> Get '[JSON] Activity + +-- | Get an activity. +-- +-- /See:/ 'activitiesGet' smart constructor. +data ActivitiesGet = ActivitiesGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agActivityId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agActivityId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +activitiesGet + :: Text -- ^ 'activityId' + -> ActivitiesGet +activitiesGet pAgActivityId_ = + ActivitiesGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agActivityId = pAgActivityId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' ActivitiesGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' ActivitiesGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' ActivitiesGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The ID of the activity to get. +agActivityId :: Lens' ActivitiesGet' Text +agActivityId + = lens _agActivityId (\ s a -> s{_agActivityId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' ActivitiesGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' ActivitiesGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' ActivitiesGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' ActivitiesGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest ActivitiesGet' where + type Rs ActivitiesGet' = Activity + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u ActivitiesGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agActivityId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesGetAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Insert.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Insert.hs new file mode 100644 index 000000000..89a9ceffb --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Insert.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Activities.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new activity for the authenticated user. +-- +-- /See:/ for @PlusDomainsActivitiesInsert@. +module PlusDomains.Activities.Insert + ( + -- * REST Resource + ActivitiesInsertAPI + + -- * Creating a Request + , activitiesInsert + , ActivitiesInsert + + -- * Request Lenses + , aiQuotaUser + , aiPrettyPrint + , aiUserIp + , aiUserId + , aiKey + , aiPreview + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsActivitiesInsert@ which the +-- 'ActivitiesInsert' request conforms to. +type ActivitiesInsertAPI = + "people" :> + Capture "userId" Text :> + "activities" :> + QueryParam "preview" Bool :> Post '[JSON] Activity + +-- | Create a new activity for the authenticated user. +-- +-- /See:/ 'activitiesInsert' smart constructor. +data ActivitiesInsert = ActivitiesInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiUserId :: !Text + , _aiKey :: !(Maybe Text) + , _aiPreview :: !(Maybe Bool) + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiUserId' +-- +-- * 'aiKey' +-- +-- * 'aiPreview' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +activitiesInsert + :: Text -- ^ 'userId' + -> ActivitiesInsert +activitiesInsert pAiUserId_ = + ActivitiesInsert + { _aiQuotaUser = Nothing + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiUserId = pAiUserId_ + , _aiKey = Nothing + , _aiPreview = Nothing + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' ActivitiesInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' ActivitiesInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' ActivitiesInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | The ID of the user to create the activity on behalf of. Its value should +-- be \"me\", to indicate the authenticated user. +aiUserId :: Lens' ActivitiesInsert' Text +aiUserId = lens _aiUserId (\ s a -> s{_aiUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' ActivitiesInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | If \"true\", extract the potential media attachments for a URL. The +-- response will include all possible attachments for a URL, including +-- video, photos, and articles based on the content of the page. +aiPreview :: Lens' ActivitiesInsert' (Maybe Bool) +aiPreview + = lens _aiPreview (\ s a -> s{_aiPreview = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' ActivitiesInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' ActivitiesInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' ActivitiesInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest ActivitiesInsert' where + type Rs ActivitiesInsert' = Activity + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u ActivitiesInsert{..} + = go _aiQuotaUser _aiPrettyPrint _aiUserIp _aiUserId + _aiKey + _aiPreview + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute + (Proxy :: Proxy ActivitiesInsertAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/List.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/List.hs new file mode 100644 index 000000000..53d01feff --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Activities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the activities in the specified collection for a particular +-- user. +-- +-- /See:/ for @PlusDomainsActivitiesList@. +module PlusDomains.Activities.List + ( + -- * REST Resource + ActivitiesListAPI + + -- * Creating a Request + , activitiesList + , ActivitiesList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alCollection + , alUserId + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsActivitiesList@ which the +-- 'ActivitiesList' request conforms to. +type ActivitiesListAPI = + "people" :> + Capture "userId" Text :> + "activities" :> + Capture "collection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ActivityFeed + +-- | List all of the activities in the specified collection for a particular +-- user. +-- +-- /See:/ 'activitiesList' smart constructor. +data ActivitiesList = ActivitiesList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alCollection :: !Text + , _alUserId :: !Text + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !Word32 + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alCollection' +-- +-- * 'alUserId' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +activitiesList + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> ActivitiesList +activitiesList pAlCollection_ pAlUserId_ = + ActivitiesList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alCollection = pAlCollection_ + , _alUserId = pAlUserId_ + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = 20 + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ActivitiesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ActivitiesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ActivitiesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | The collection of activities to list. +alCollection :: Lens' ActivitiesList' Text +alCollection + = lens _alCollection (\ s a -> s{_alCollection = a}) + +-- | The ID of the user to get activities for. The special value \"me\" can +-- be used to indicate the authenticated user. +alUserId :: Lens' ActivitiesList' Text +alUserId = lens _alUserId (\ s a -> s{_alUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ActivitiesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +alPageToken :: Lens' ActivitiesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ActivitiesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of activities to include in the response, which is +-- used for paging. For any response, the actual number returned might be +-- less than the specified maxResults. +alMaxResults :: Lens' ActivitiesList' Word32 +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ActivitiesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ActivitiesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ActivitiesList' where + type Rs ActivitiesList' = ActivityFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u ActivitiesList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alCollection + _alUserId + _alKey + _alPageToken + _alOauthToken + (Just _alMaxResults) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesListAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Audiences/List.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Audiences/List.hs new file mode 100644 index 000000000..6dec578d3 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Audiences/List.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Audiences.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the audiences to which a user can share. +-- +-- /See:/ for @PlusDomainsAudiencesList@. +module PlusDomains.Audiences.List + ( + -- * REST Resource + AudiencesListAPI + + -- * Creating a Request + , audiencesList + , AudiencesList + + -- * Request Lenses + , aQuotaUser + , aPrettyPrint + , aUserIp + , aUserId + , aKey + , aPageToken + , aOauthToken + , aMaxResults + , aFields + , aAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsAudiencesList@ which the +-- 'AudiencesList' request conforms to. +type AudiencesListAPI = + "people" :> + Capture "userId" Text :> + "audiences" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] AudiencesFeed + +-- | List all of the audiences to which a user can share. +-- +-- /See:/ 'audiencesList' smart constructor. +data AudiencesList = AudiencesList + { _aQuotaUser :: !(Maybe Text) + , _aPrettyPrint :: !Bool + , _aUserIp :: !(Maybe Text) + , _aUserId :: !Text + , _aKey :: !(Maybe Text) + , _aPageToken :: !(Maybe Text) + , _aOauthToken :: !(Maybe Text) + , _aMaxResults :: !Word32 + , _aFields :: !(Maybe Text) + , _aAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AudiencesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aQuotaUser' +-- +-- * 'aPrettyPrint' +-- +-- * 'aUserIp' +-- +-- * 'aUserId' +-- +-- * 'aKey' +-- +-- * 'aPageToken' +-- +-- * 'aOauthToken' +-- +-- * 'aMaxResults' +-- +-- * 'aFields' +-- +-- * 'aAlt' +audiencesList + :: Text -- ^ 'userId' + -> AudiencesList +audiencesList pAUserId_ = + AudiencesList + { _aQuotaUser = Nothing + , _aPrettyPrint = True + , _aUserIp = Nothing + , _aUserId = pAUserId_ + , _aKey = Nothing + , _aPageToken = Nothing + , _aOauthToken = Nothing + , _aMaxResults = 20 + , _aFields = Nothing + , _aAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aQuotaUser :: Lens' AudiencesList' (Maybe Text) +aQuotaUser + = lens _aQuotaUser (\ s a -> s{_aQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aPrettyPrint :: Lens' AudiencesList' Bool +aPrettyPrint + = lens _aPrettyPrint (\ s a -> s{_aPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aUserIp :: Lens' AudiencesList' (Maybe Text) +aUserIp = lens _aUserIp (\ s a -> s{_aUserIp = a}) + +-- | The ID of the user to get audiences for. The special value \"me\" can be +-- used to indicate the authenticated user. +aUserId :: Lens' AudiencesList' Text +aUserId = lens _aUserId (\ s a -> s{_aUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aKey :: Lens' AudiencesList' (Maybe Text) +aKey = lens _aKey (\ s a -> s{_aKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +aPageToken :: Lens' AudiencesList' (Maybe Text) +aPageToken + = lens _aPageToken (\ s a -> s{_aPageToken = a}) + +-- | OAuth 2.0 token for the current user. +aOauthToken :: Lens' AudiencesList' (Maybe Text) +aOauthToken + = lens _aOauthToken (\ s a -> s{_aOauthToken = a}) + +-- | The maximum number of circles to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +aMaxResults :: Lens' AudiencesList' Word32 +aMaxResults + = lens _aMaxResults (\ s a -> s{_aMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +aFields :: Lens' AudiencesList' (Maybe Text) +aFields = lens _aFields (\ s a -> s{_aFields = a}) + +-- | Data format for the response. +aAlt :: Lens' AudiencesList' Text +aAlt = lens _aAlt (\ s a -> s{_aAlt = a}) + +instance GoogleRequest AudiencesList' where + type Rs AudiencesList' = AudiencesFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u AudiencesList{..} + = go _aQuotaUser _aPrettyPrint _aUserIp _aUserId + _aKey + _aPageToken + _aOauthToken + (Just _aMaxResults) + _aFields + _aAlt + where go + = clientWithRoute (Proxy :: Proxy AudiencesListAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/AddPeople.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/AddPeople.hs new file mode 100644 index 000000000..2935a6723 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/AddPeople.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.AddPeople +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a person to a circle. Google+ limits certain circle operations, +-- including the number of circle adds. Learn More. +-- +-- /See:/ for @PlusDomainsCirclesAddPeople@. +module PlusDomains.Circles.AddPeople + ( + -- * REST Resource + CirclesAddPeopleAPI + + -- * Creating a Request + , circlesAddPeople + , CirclesAddPeople + + -- * Request Lenses + , capEmail + , capQuotaUser + , capPrettyPrint + , capUserIp + , capUserId + , capKey + , capCircleId + , capOauthToken + , capFields + , capAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesAddPeople@ which the +-- 'CirclesAddPeople' request conforms to. +type CirclesAddPeopleAPI = + "circles" :> + Capture "circleId" Text :> + "people" :> + QueryParams "email" Text :> + QueryParams "userId" Text :> Put '[JSON] Circle + +-- | Add a person to a circle. Google+ limits certain circle operations, +-- including the number of circle adds. Learn More. +-- +-- /See:/ 'circlesAddPeople' smart constructor. +data CirclesAddPeople = CirclesAddPeople + { _capEmail :: !(Maybe Text) + , _capQuotaUser :: !(Maybe Text) + , _capPrettyPrint :: !Bool + , _capUserIp :: !(Maybe Text) + , _capUserId :: !(Maybe Text) + , _capKey :: !(Maybe Text) + , _capCircleId :: !Text + , _capOauthToken :: !(Maybe Text) + , _capFields :: !(Maybe Text) + , _capAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesAddPeople'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'capEmail' +-- +-- * 'capQuotaUser' +-- +-- * 'capPrettyPrint' +-- +-- * 'capUserIp' +-- +-- * 'capUserId' +-- +-- * 'capKey' +-- +-- * 'capCircleId' +-- +-- * 'capOauthToken' +-- +-- * 'capFields' +-- +-- * 'capAlt' +circlesAddPeople + :: Text -- ^ 'circleId' + -> CirclesAddPeople +circlesAddPeople pCapCircleId_ = + CirclesAddPeople + { _capEmail = Nothing + , _capQuotaUser = Nothing + , _capPrettyPrint = True + , _capUserIp = Nothing + , _capUserId = Nothing + , _capKey = Nothing + , _capCircleId = pCapCircleId_ + , _capOauthToken = Nothing + , _capFields = Nothing + , _capAlt = "json" + } + +-- | Email of the people to add to the circle. Optional, can be repeated. +capEmail :: Lens' CirclesAddPeople' (Maybe Text) +capEmail = lens _capEmail (\ s a -> s{_capEmail = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +capQuotaUser :: Lens' CirclesAddPeople' (Maybe Text) +capQuotaUser + = lens _capQuotaUser (\ s a -> s{_capQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +capPrettyPrint :: Lens' CirclesAddPeople' Bool +capPrettyPrint + = lens _capPrettyPrint + (\ s a -> s{_capPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +capUserIp :: Lens' CirclesAddPeople' (Maybe Text) +capUserIp + = lens _capUserIp (\ s a -> s{_capUserIp = a}) + +-- | IDs of the people to add to the circle. Optional, can be repeated. +capUserId :: Lens' CirclesAddPeople' (Maybe Text) +capUserId + = lens _capUserId (\ s a -> s{_capUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +capKey :: Lens' CirclesAddPeople' (Maybe Text) +capKey = lens _capKey (\ s a -> s{_capKey = a}) + +-- | The ID of the circle to add the person to. +capCircleId :: Lens' CirclesAddPeople' Text +capCircleId + = lens _capCircleId (\ s a -> s{_capCircleId = a}) + +-- | OAuth 2.0 token for the current user. +capOauthToken :: Lens' CirclesAddPeople' (Maybe Text) +capOauthToken + = lens _capOauthToken + (\ s a -> s{_capOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +capFields :: Lens' CirclesAddPeople' (Maybe Text) +capFields + = lens _capFields (\ s a -> s{_capFields = a}) + +-- | Data format for the response. +capAlt :: Lens' CirclesAddPeople' Text +capAlt = lens _capAlt (\ s a -> s{_capAlt = a}) + +instance GoogleRequest CirclesAddPeople' where + type Rs CirclesAddPeople' = Circle + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesAddPeople{..} + = go _capEmail _capQuotaUser _capPrettyPrint + _capUserIp + _capUserId + _capKey + _capCircleId + _capOauthToken + _capFields + _capAlt + where go + = clientWithRoute + (Proxy :: Proxy CirclesAddPeopleAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Get.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Get.hs new file mode 100644 index 000000000..8743a661c --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Get.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a circle. +-- +-- /See:/ for @PlusDomainsCirclesGet@. +module PlusDomains.Circles.Get + ( + -- * REST Resource + CirclesGetAPI + + -- * Creating a Request + , circlesGet + , CirclesGet + + -- * Request Lenses + , cggQuotaUser + , cggPrettyPrint + , cggUserIp + , cggKey + , cggCircleId + , cggOauthToken + , cggFields + , cggAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesGet@ which the +-- 'CirclesGet' request conforms to. +type CirclesGetAPI = + "circles" :> + Capture "circleId" Text :> Get '[JSON] Circle + +-- | Get a circle. +-- +-- /See:/ 'circlesGet' smart constructor. +data CirclesGet = CirclesGet + { _cggQuotaUser :: !(Maybe Text) + , _cggPrettyPrint :: !Bool + , _cggUserIp :: !(Maybe Text) + , _cggKey :: !(Maybe Text) + , _cggCircleId :: !Text + , _cggOauthToken :: !(Maybe Text) + , _cggFields :: !(Maybe Text) + , _cggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cggQuotaUser' +-- +-- * 'cggPrettyPrint' +-- +-- * 'cggUserIp' +-- +-- * 'cggKey' +-- +-- * 'cggCircleId' +-- +-- * 'cggOauthToken' +-- +-- * 'cggFields' +-- +-- * 'cggAlt' +circlesGet + :: Text -- ^ 'circleId' + -> CirclesGet +circlesGet pCggCircleId_ = + CirclesGet + { _cggQuotaUser = Nothing + , _cggPrettyPrint = True + , _cggUserIp = Nothing + , _cggKey = Nothing + , _cggCircleId = pCggCircleId_ + , _cggOauthToken = Nothing + , _cggFields = Nothing + , _cggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cggQuotaUser :: Lens' CirclesGet' (Maybe Text) +cggQuotaUser + = lens _cggQuotaUser (\ s a -> s{_cggQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cggPrettyPrint :: Lens' CirclesGet' Bool +cggPrettyPrint + = lens _cggPrettyPrint + (\ s a -> s{_cggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cggUserIp :: Lens' CirclesGet' (Maybe Text) +cggUserIp + = lens _cggUserIp (\ s a -> s{_cggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cggKey :: Lens' CirclesGet' (Maybe Text) +cggKey = lens _cggKey (\ s a -> s{_cggKey = a}) + +-- | The ID of the circle to get. +cggCircleId :: Lens' CirclesGet' Text +cggCircleId + = lens _cggCircleId (\ s a -> s{_cggCircleId = a}) + +-- | OAuth 2.0 token for the current user. +cggOauthToken :: Lens' CirclesGet' (Maybe Text) +cggOauthToken + = lens _cggOauthToken + (\ s a -> s{_cggOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cggFields :: Lens' CirclesGet' (Maybe Text) +cggFields + = lens _cggFields (\ s a -> s{_cggFields = a}) + +-- | Data format for the response. +cggAlt :: Lens' CirclesGet' Text +cggAlt = lens _cggAlt (\ s a -> s{_cggAlt = a}) + +instance GoogleRequest CirclesGet' where + type Rs CirclesGet' = Circle + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesGet{..} + = go _cggQuotaUser _cggPrettyPrint _cggUserIp _cggKey + _cggCircleId + _cggOauthToken + _cggFields + _cggAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesGetAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Insert.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Insert.hs new file mode 100644 index 000000000..4332d7811 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Insert.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new circle for the authenticated user. +-- +-- /See:/ for @PlusDomainsCirclesInsert@. +module PlusDomains.Circles.Insert + ( + -- * REST Resource + CirclesInsertAPI + + -- * Creating a Request + , circlesInsert + , CirclesInsert + + -- * Request Lenses + , cQuotaUser + , cPrettyPrint + , cUserIp + , cUserId + , cKey + , cOauthToken + , cFields + , cAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesInsert@ which the +-- 'CirclesInsert' request conforms to. +type CirclesInsertAPI = + "people" :> + Capture "userId" Text :> + "circles" :> Post '[JSON] Circle + +-- | Create a new circle for the authenticated user. +-- +-- /See:/ 'circlesInsert' smart constructor. +data CirclesInsert = CirclesInsert + { _cQuotaUser :: !(Maybe Text) + , _cPrettyPrint :: !Bool + , _cUserIp :: !(Maybe Text) + , _cUserId :: !Text + , _cKey :: !(Maybe Text) + , _cOauthToken :: !(Maybe Text) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPrettyPrint' +-- +-- * 'cUserIp' +-- +-- * 'cUserId' +-- +-- * 'cKey' +-- +-- * 'cOauthToken' +-- +-- * 'cFields' +-- +-- * 'cAlt' +circlesInsert + :: Text -- ^ 'userId' + -> CirclesInsert +circlesInsert pCUserId_ = + CirclesInsert + { _cQuotaUser = Nothing + , _cPrettyPrint = True + , _cUserIp = Nothing + , _cUserId = pCUserId_ + , _cKey = Nothing + , _cOauthToken = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' CirclesInsert' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' CirclesInsert' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' CirclesInsert' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | The ID of the user to create the circle on behalf of. The value \"me\" +-- can be used to indicate the authenticated user. +cUserId :: Lens' CirclesInsert' Text +cUserId = lens _cUserId (\ s a -> s{_cUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' CirclesInsert' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' CirclesInsert' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' CirclesInsert' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' CirclesInsert' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest CirclesInsert' where + type Rs CirclesInsert' = Circle + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesInsert{..} + = go _cQuotaUser _cPrettyPrint _cUserIp _cUserId + _cKey + _cOauthToken + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesInsertAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/List.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/List.hs new file mode 100644 index 000000000..5c81f7473 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/List.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the circles for a user. +-- +-- /See:/ for @PlusDomainsCirclesList@. +module PlusDomains.Circles.List + ( + -- * REST Resource + CirclesListAPI + + -- * Creating a Request + , circlesList + , CirclesList + + -- * Request Lenses + , cirQuotaUser + , cirPrettyPrint + , cirUserIp + , cirUserId + , cirKey + , cirPageToken + , cirOauthToken + , cirMaxResults + , cirFields + , cirAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesList@ which the +-- 'CirclesList' request conforms to. +type CirclesListAPI = + "people" :> + Capture "userId" Text :> + "circles" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CircleFeed + +-- | List all of the circles for a user. +-- +-- /See:/ 'circlesList' smart constructor. +data CirclesList = CirclesList + { _cirQuotaUser :: !(Maybe Text) + , _cirPrettyPrint :: !Bool + , _cirUserIp :: !(Maybe Text) + , _cirUserId :: !Text + , _cirKey :: !(Maybe Text) + , _cirPageToken :: !(Maybe Text) + , _cirOauthToken :: !(Maybe Text) + , _cirMaxResults :: !Word32 + , _cirFields :: !(Maybe Text) + , _cirAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cirQuotaUser' +-- +-- * 'cirPrettyPrint' +-- +-- * 'cirUserIp' +-- +-- * 'cirUserId' +-- +-- * 'cirKey' +-- +-- * 'cirPageToken' +-- +-- * 'cirOauthToken' +-- +-- * 'cirMaxResults' +-- +-- * 'cirFields' +-- +-- * 'cirAlt' +circlesList + :: Text -- ^ 'userId' + -> CirclesList +circlesList pCirUserId_ = + CirclesList + { _cirQuotaUser = Nothing + , _cirPrettyPrint = True + , _cirUserIp = Nothing + , _cirUserId = pCirUserId_ + , _cirKey = Nothing + , _cirPageToken = Nothing + , _cirOauthToken = Nothing + , _cirMaxResults = 20 + , _cirFields = Nothing + , _cirAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cirQuotaUser :: Lens' CirclesList' (Maybe Text) +cirQuotaUser + = lens _cirQuotaUser (\ s a -> s{_cirQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cirPrettyPrint :: Lens' CirclesList' Bool +cirPrettyPrint + = lens _cirPrettyPrint + (\ s a -> s{_cirPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cirUserIp :: Lens' CirclesList' (Maybe Text) +cirUserIp + = lens _cirUserIp (\ s a -> s{_cirUserIp = a}) + +-- | The ID of the user to get circles for. The special value \"me\" can be +-- used to indicate the authenticated user. +cirUserId :: Lens' CirclesList' Text +cirUserId + = lens _cirUserId (\ s a -> s{_cirUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cirKey :: Lens' CirclesList' (Maybe Text) +cirKey = lens _cirKey (\ s a -> s{_cirKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +cirPageToken :: Lens' CirclesList' (Maybe Text) +cirPageToken + = lens _cirPageToken (\ s a -> s{_cirPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cirOauthToken :: Lens' CirclesList' (Maybe Text) +cirOauthToken + = lens _cirOauthToken + (\ s a -> s{_cirOauthToken = a}) + +-- | The maximum number of circles to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +cirMaxResults :: Lens' CirclesList' Word32 +cirMaxResults + = lens _cirMaxResults + (\ s a -> s{_cirMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +cirFields :: Lens' CirclesList' (Maybe Text) +cirFields + = lens _cirFields (\ s a -> s{_cirFields = a}) + +-- | Data format for the response. +cirAlt :: Lens' CirclesList' Text +cirAlt = lens _cirAlt (\ s a -> s{_cirAlt = a}) + +instance GoogleRequest CirclesList' where + type Rs CirclesList' = CircleFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesList{..} + = go _cirQuotaUser _cirPrettyPrint _cirUserIp + _cirUserId + _cirKey + _cirPageToken + _cirOauthToken + (Just _cirMaxResults) + _cirFields + _cirAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesListAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Patch.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Patch.hs new file mode 100644 index 000000000..bad4a0a17 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Patch.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a circle\'s description. This method supports patch semantics. +-- +-- /See:/ for @PlusDomainsCirclesPatch@. +module PlusDomains.Circles.Patch + ( + -- * REST Resource + CirclesPatchAPI + + -- * Creating a Request + , circlesPatch + , CirclesPatch + + -- * Request Lenses + , cpQuotaUser + , cpPrettyPrint + , cpUserIp + , cpKey + , cpCircleId + , cpOauthToken + , cpFields + , cpAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesPatch@ which the +-- 'CirclesPatch' request conforms to. +type CirclesPatchAPI = + "circles" :> + Capture "circleId" Text :> Patch '[JSON] Circle + +-- | Update a circle\'s description. This method supports patch semantics. +-- +-- /See:/ 'circlesPatch' smart constructor. +data CirclesPatch = CirclesPatch + { _cpQuotaUser :: !(Maybe Text) + , _cpPrettyPrint :: !Bool + , _cpUserIp :: !(Maybe Text) + , _cpKey :: !(Maybe Text) + , _cpCircleId :: !Text + , _cpOauthToken :: !(Maybe Text) + , _cpFields :: !(Maybe Text) + , _cpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cpQuotaUser' +-- +-- * 'cpPrettyPrint' +-- +-- * 'cpUserIp' +-- +-- * 'cpKey' +-- +-- * 'cpCircleId' +-- +-- * 'cpOauthToken' +-- +-- * 'cpFields' +-- +-- * 'cpAlt' +circlesPatch + :: Text -- ^ 'circleId' + -> CirclesPatch +circlesPatch pCpCircleId_ = + CirclesPatch + { _cpQuotaUser = Nothing + , _cpPrettyPrint = True + , _cpUserIp = Nothing + , _cpKey = Nothing + , _cpCircleId = pCpCircleId_ + , _cpOauthToken = Nothing + , _cpFields = Nothing + , _cpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cpQuotaUser :: Lens' CirclesPatch' (Maybe Text) +cpQuotaUser + = lens _cpQuotaUser (\ s a -> s{_cpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cpPrettyPrint :: Lens' CirclesPatch' Bool +cpPrettyPrint + = lens _cpPrettyPrint + (\ s a -> s{_cpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cpUserIp :: Lens' CirclesPatch' (Maybe Text) +cpUserIp = lens _cpUserIp (\ s a -> s{_cpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cpKey :: Lens' CirclesPatch' (Maybe Text) +cpKey = lens _cpKey (\ s a -> s{_cpKey = a}) + +-- | The ID of the circle to update. +cpCircleId :: Lens' CirclesPatch' Text +cpCircleId + = lens _cpCircleId (\ s a -> s{_cpCircleId = a}) + +-- | OAuth 2.0 token for the current user. +cpOauthToken :: Lens' CirclesPatch' (Maybe Text) +cpOauthToken + = lens _cpOauthToken (\ s a -> s{_cpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cpFields :: Lens' CirclesPatch' (Maybe Text) +cpFields = lens _cpFields (\ s a -> s{_cpFields = a}) + +-- | Data format for the response. +cpAlt :: Lens' CirclesPatch' Text +cpAlt = lens _cpAlt (\ s a -> s{_cpAlt = a}) + +instance GoogleRequest CirclesPatch' where + type Rs CirclesPatch' = Circle + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesPatch{..} + = go _cpQuotaUser _cpPrettyPrint _cpUserIp _cpKey + _cpCircleId + _cpOauthToken + _cpFields + _cpAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesPatchAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Remove.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Remove.hs new file mode 100644 index 000000000..621f8ee0f --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Remove.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.Remove +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a circle. +-- +-- /See:/ for @PlusDomainsCirclesRemove@. +module PlusDomains.Circles.Remove + ( + -- * REST Resource + CirclesRemoveAPI + + -- * Creating a Request + , circlesRemove + , CirclesRemove + + -- * Request Lenses + , crQuotaUser + , crPrettyPrint + , crUserIp + , crKey + , crCircleId + , crOauthToken + , crFields + , crAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesRemove@ which the +-- 'CirclesRemove' request conforms to. +type CirclesRemoveAPI = + "circles" :> + Capture "circleId" Text :> Delete '[JSON] () + +-- | Delete a circle. +-- +-- /See:/ 'circlesRemove' smart constructor. +data CirclesRemove = CirclesRemove + { _crQuotaUser :: !(Maybe Text) + , _crPrettyPrint :: !Bool + , _crUserIp :: !(Maybe Text) + , _crKey :: !(Maybe Text) + , _crCircleId :: !Text + , _crOauthToken :: !(Maybe Text) + , _crFields :: !(Maybe Text) + , _crAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesRemove'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crQuotaUser' +-- +-- * 'crPrettyPrint' +-- +-- * 'crUserIp' +-- +-- * 'crKey' +-- +-- * 'crCircleId' +-- +-- * 'crOauthToken' +-- +-- * 'crFields' +-- +-- * 'crAlt' +circlesRemove + :: Text -- ^ 'circleId' + -> CirclesRemove +circlesRemove pCrCircleId_ = + CirclesRemove + { _crQuotaUser = Nothing + , _crPrettyPrint = True + , _crUserIp = Nothing + , _crKey = Nothing + , _crCircleId = pCrCircleId_ + , _crOauthToken = Nothing + , _crFields = Nothing + , _crAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +crQuotaUser :: Lens' CirclesRemove' (Maybe Text) +crQuotaUser + = lens _crQuotaUser (\ s a -> s{_crQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +crPrettyPrint :: Lens' CirclesRemove' Bool +crPrettyPrint + = lens _crPrettyPrint + (\ s a -> s{_crPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +crUserIp :: Lens' CirclesRemove' (Maybe Text) +crUserIp = lens _crUserIp (\ s a -> s{_crUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +crKey :: Lens' CirclesRemove' (Maybe Text) +crKey = lens _crKey (\ s a -> s{_crKey = a}) + +-- | The ID of the circle to delete. +crCircleId :: Lens' CirclesRemove' Text +crCircleId + = lens _crCircleId (\ s a -> s{_crCircleId = a}) + +-- | OAuth 2.0 token for the current user. +crOauthToken :: Lens' CirclesRemove' (Maybe Text) +crOauthToken + = lens _crOauthToken (\ s a -> s{_crOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +crFields :: Lens' CirclesRemove' (Maybe Text) +crFields = lens _crFields (\ s a -> s{_crFields = a}) + +-- | Data format for the response. +crAlt :: Lens' CirclesRemove' Text +crAlt = lens _crAlt (\ s a -> s{_crAlt = a}) + +instance GoogleRequest CirclesRemove' where + type Rs CirclesRemove' = () + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesRemove{..} + = go _crQuotaUser _crPrettyPrint _crUserIp _crKey + _crCircleId + _crOauthToken + _crFields + _crAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesRemoveAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/RemovePeople.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/RemovePeople.hs new file mode 100644 index 000000000..076d67437 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/RemovePeople.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.RemovePeople +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove a person from a circle. +-- +-- /See:/ for @PlusDomainsCirclesRemovePeople@. +module PlusDomains.Circles.RemovePeople + ( + -- * REST Resource + CirclesRemovePeopleAPI + + -- * Creating a Request + , circlesRemovePeople + , CirclesRemovePeople + + -- * Request Lenses + , crpEmail + , crpQuotaUser + , crpPrettyPrint + , crpUserIp + , crpUserId + , crpKey + , crpCircleId + , crpOauthToken + , crpFields + , crpAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesRemovePeople@ which the +-- 'CirclesRemovePeople' request conforms to. +type CirclesRemovePeopleAPI = + "circles" :> + Capture "circleId" Text :> + "people" :> + QueryParams "email" Text :> + QueryParams "userId" Text :> Delete '[JSON] () + +-- | Remove a person from a circle. +-- +-- /See:/ 'circlesRemovePeople' smart constructor. +data CirclesRemovePeople = CirclesRemovePeople + { _crpEmail :: !(Maybe Text) + , _crpQuotaUser :: !(Maybe Text) + , _crpPrettyPrint :: !Bool + , _crpUserIp :: !(Maybe Text) + , _crpUserId :: !(Maybe Text) + , _crpKey :: !(Maybe Text) + , _crpCircleId :: !Text + , _crpOauthToken :: !(Maybe Text) + , _crpFields :: !(Maybe Text) + , _crpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesRemovePeople'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crpEmail' +-- +-- * 'crpQuotaUser' +-- +-- * 'crpPrettyPrint' +-- +-- * 'crpUserIp' +-- +-- * 'crpUserId' +-- +-- * 'crpKey' +-- +-- * 'crpCircleId' +-- +-- * 'crpOauthToken' +-- +-- * 'crpFields' +-- +-- * 'crpAlt' +circlesRemovePeople + :: Text -- ^ 'circleId' + -> CirclesRemovePeople +circlesRemovePeople pCrpCircleId_ = + CirclesRemovePeople + { _crpEmail = Nothing + , _crpQuotaUser = Nothing + , _crpPrettyPrint = True + , _crpUserIp = Nothing + , _crpUserId = Nothing + , _crpKey = Nothing + , _crpCircleId = pCrpCircleId_ + , _crpOauthToken = Nothing + , _crpFields = Nothing + , _crpAlt = "json" + } + +-- | Email of the people to add to the circle. Optional, can be repeated. +crpEmail :: Lens' CirclesRemovePeople' (Maybe Text) +crpEmail = lens _crpEmail (\ s a -> s{_crpEmail = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +crpQuotaUser :: Lens' CirclesRemovePeople' (Maybe Text) +crpQuotaUser + = lens _crpQuotaUser (\ s a -> s{_crpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +crpPrettyPrint :: Lens' CirclesRemovePeople' Bool +crpPrettyPrint + = lens _crpPrettyPrint + (\ s a -> s{_crpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +crpUserIp :: Lens' CirclesRemovePeople' (Maybe Text) +crpUserIp + = lens _crpUserIp (\ s a -> s{_crpUserIp = a}) + +-- | IDs of the people to remove from the circle. Optional, can be repeated. +crpUserId :: Lens' CirclesRemovePeople' (Maybe Text) +crpUserId + = lens _crpUserId (\ s a -> s{_crpUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +crpKey :: Lens' CirclesRemovePeople' (Maybe Text) +crpKey = lens _crpKey (\ s a -> s{_crpKey = a}) + +-- | The ID of the circle to remove the person from. +crpCircleId :: Lens' CirclesRemovePeople' Text +crpCircleId + = lens _crpCircleId (\ s a -> s{_crpCircleId = a}) + +-- | OAuth 2.0 token for the current user. +crpOauthToken :: Lens' CirclesRemovePeople' (Maybe Text) +crpOauthToken + = lens _crpOauthToken + (\ s a -> s{_crpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +crpFields :: Lens' CirclesRemovePeople' (Maybe Text) +crpFields + = lens _crpFields (\ s a -> s{_crpFields = a}) + +-- | Data format for the response. +crpAlt :: Lens' CirclesRemovePeople' Text +crpAlt = lens _crpAlt (\ s a -> s{_crpAlt = a}) + +instance GoogleRequest CirclesRemovePeople' where + type Rs CirclesRemovePeople' = () + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesRemovePeople{..} + = go _crpEmail _crpQuotaUser _crpPrettyPrint + _crpUserIp + _crpUserId + _crpKey + _crpCircleId + _crpOauthToken + _crpFields + _crpAlt + where go + = clientWithRoute + (Proxy :: Proxy CirclesRemovePeopleAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Update.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Update.hs new file mode 100644 index 000000000..d73fa6050 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Circles/Update.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Circles.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a circle\'s description. +-- +-- /See:/ for @PlusDomainsCirclesUpdate@. +module PlusDomains.Circles.Update + ( + -- * REST Resource + CirclesUpdateAPI + + -- * Creating a Request + , circlesUpdate + , CirclesUpdate + + -- * Request Lenses + , cuQuotaUser + , cuPrettyPrint + , cuUserIp + , cuKey + , cuCircleId + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCirclesUpdate@ which the +-- 'CirclesUpdate' request conforms to. +type CirclesUpdateAPI = + "circles" :> + Capture "circleId" Text :> Put '[JSON] Circle + +-- | Update a circle\'s description. +-- +-- /See:/ 'circlesUpdate' smart constructor. +data CirclesUpdate = CirclesUpdate + { _cuQuotaUser :: !(Maybe Text) + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuCircleId :: !Text + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CirclesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuKey' +-- +-- * 'cuCircleId' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +circlesUpdate + :: Text -- ^ 'circleId' + -> CirclesUpdate +circlesUpdate pCuCircleId_ = + CirclesUpdate + { _cuQuotaUser = Nothing + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuKey = Nothing + , _cuCircleId = pCuCircleId_ + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CirclesUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CirclesUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CirclesUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CirclesUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | The ID of the circle to update. +cuCircleId :: Lens' CirclesUpdate' Text +cuCircleId + = lens _cuCircleId (\ s a -> s{_cuCircleId = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CirclesUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CirclesUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CirclesUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CirclesUpdate' where + type Rs CirclesUpdate' = Circle + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CirclesUpdate{..} + = go _cuQuotaUser _cuPrettyPrint _cuUserIp _cuKey + _cuCircleId + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CirclesUpdateAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Get.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Get.hs new file mode 100644 index 000000000..3bf18fea4 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Comments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a comment. +-- +-- /See:/ for @PlusDomainsCommentsGet@. +module PlusDomains.Comments.Get + ( + -- * REST Resource + CommentsGetAPI + + -- * Creating a Request + , commentsGet + , CommentsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgKey + , cgOauthToken + , cgCommentId + , cgFields + , cgAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCommentsGet@ which the +-- 'CommentsGet' request conforms to. +type CommentsGetAPI = + "comments" :> + Capture "commentId" Text :> Get '[JSON] Comment + +-- | Get a comment. +-- +-- /See:/ 'commentsGet' smart constructor. +data CommentsGet = CommentsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgCommentId :: !Text + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgCommentId' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +commentsGet + :: Text -- ^ 'commentId' + -> CommentsGet +commentsGet pCgCommentId_ = + CommentsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgCommentId = pCgCommentId_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CommentsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CommentsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CommentsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CommentsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CommentsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | The ID of the comment to get. +cgCommentId :: Lens' CommentsGet' Text +cgCommentId + = lens _cgCommentId (\ s a -> s{_cgCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CommentsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CommentsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CommentsGet' where + type Rs CommentsGet' = Comment + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CommentsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgKey + _cgOauthToken + _cgCommentId + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsGetAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Insert.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Insert.hs new file mode 100644 index 000000000..2b3340ebc --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Comments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a new comment in reply to an activity. +-- +-- /See:/ for @PlusDomainsCommentsInsert@. +module PlusDomains.Comments.Insert + ( + -- * REST Resource + CommentsInsertAPI + + -- * Creating a Request + , commentsInsert + , CommentsInsert + + -- * Request Lenses + , ciQuotaUser + , ciPrettyPrint + , ciUserIp + , ciActivityId + , ciKey + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCommentsInsert@ which the +-- 'CommentsInsert' request conforms to. +type CommentsInsertAPI = + "activities" :> + Capture "activityId" Text :> + "comments" :> Post '[JSON] Comment + +-- | Create a new comment in reply to an activity. +-- +-- /See:/ 'commentsInsert' smart constructor. +data CommentsInsert = CommentsInsert + { _ciQuotaUser :: !(Maybe Text) + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciActivityId :: !Text + , _ciKey :: !(Maybe Text) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciActivityId' +-- +-- * 'ciKey' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +commentsInsert + :: Text -- ^ 'activityId' + -> CommentsInsert +commentsInsert pCiActivityId_ = + CommentsInsert + { _ciQuotaUser = Nothing + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciActivityId = pCiActivityId_ + , _ciKey = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CommentsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CommentsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CommentsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | The ID of the activity to reply to. +ciActivityId :: Lens' CommentsInsert' Text +ciActivityId + = lens _ciActivityId (\ s a -> s{_ciActivityId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CommentsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CommentsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CommentsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CommentsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CommentsInsert' where + type Rs CommentsInsert' = Comment + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CommentsInsert{..} + = go _ciQuotaUser _ciPrettyPrint _ciUserIp + _ciActivityId + _ciKey + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsInsertAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/List.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/List.hs new file mode 100644 index 000000000..da4079e91 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Comments/List.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Comments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the comments for an activity. +-- +-- /See:/ for @PlusDomainsCommentsList@. +module PlusDomains.Comments.List + ( + -- * REST Resource + CommentsListAPI + + -- * Creating a Request + , commentsList + , CommentsList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clActivityId + , clSortOrder + , clKey + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsCommentsList@ which the +-- 'CommentsList' request conforms to. +type CommentsListAPI = + "activities" :> + Capture "activityId" Text :> + "comments" :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CommentFeed + +-- | List all of the comments for an activity. +-- +-- /See:/ 'commentsList' smart constructor. +data CommentsList = CommentsList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clActivityId :: !Text + , _clSortOrder :: !Text + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !Word32 + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clActivityId' +-- +-- * 'clSortOrder' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +commentsList + :: Text -- ^ 'activityId' + -> CommentsList +commentsList pClActivityId_ = + CommentsList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clActivityId = pClActivityId_ + , _clSortOrder = "ascending" + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = 20 + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CommentsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CommentsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CommentsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | The ID of the activity to get comments for. +clActivityId :: Lens' CommentsList' Text +clActivityId + = lens _clActivityId (\ s a -> s{_clActivityId = a}) + +-- | The order in which to sort the list of comments. +clSortOrder :: Lens' CommentsList' Text +clSortOrder + = lens _clSortOrder (\ s a -> s{_clSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CommentsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +clPageToken :: Lens' CommentsList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CommentsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | The maximum number of comments to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +clMaxResults :: Lens' CommentsList' Word32 +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CommentsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CommentsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CommentsList' where + type Rs CommentsList' = CommentFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u CommentsList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp + _clActivityId + (Just _clSortOrder) + _clKey + _clPageToken + _clOauthToken + (Just _clMaxResults) + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsListAPI) r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Media/Insert.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Media/Insert.hs new file mode 100644 index 000000000..b0d3b3056 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Media/Insert.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.Media.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a new media item to an album. The current upload size limitations +-- are 36MB for a photo and 1GB for a video. Uploads do not count against +-- quota if photos are less than 2048 pixels on their longest side or +-- videos are less than 15 minutes in length. +-- +-- /See:/ for @PlusDomainsMediaInsert@. +module PlusDomains.Media.Insert + ( + -- * REST Resource + MediaInsertAPI + + -- * Creating a Request + , mediaInsert + , MediaInsert + + -- * Request Lenses + , miQuotaUser + , miPrettyPrint + , miUserIp + , miCollection + , miUserId + , miKey + , miOauthToken + , miFields + , miAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsMediaInsert@ which the +-- 'MediaInsert' request conforms to. +type MediaInsertAPI = + "people" :> + Capture "userId" Text :> + "media" :> + Capture "collection" Text :> Post '[JSON] Media + +-- | Add a new media item to an album. The current upload size limitations +-- are 36MB for a photo and 1GB for a video. Uploads do not count against +-- quota if photos are less than 2048 pixels on their longest side or +-- videos are less than 15 minutes in length. +-- +-- /See:/ 'mediaInsert' smart constructor. +data MediaInsert = MediaInsert + { _miQuotaUser :: !(Maybe Text) + , _miPrettyPrint :: !Bool + , _miUserIp :: !(Maybe Text) + , _miCollection :: !Text + , _miUserId :: !Text + , _miKey :: !(Maybe Text) + , _miOauthToken :: !(Maybe Text) + , _miFields :: !(Maybe Text) + , _miAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MediaInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miQuotaUser' +-- +-- * 'miPrettyPrint' +-- +-- * 'miUserIp' +-- +-- * 'miCollection' +-- +-- * 'miUserId' +-- +-- * 'miKey' +-- +-- * 'miOauthToken' +-- +-- * 'miFields' +-- +-- * 'miAlt' +mediaInsert + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> MediaInsert +mediaInsert pMiCollection_ pMiUserId_ = + MediaInsert + { _miQuotaUser = Nothing + , _miPrettyPrint = True + , _miUserIp = Nothing + , _miCollection = pMiCollection_ + , _miUserId = pMiUserId_ + , _miKey = Nothing + , _miOauthToken = Nothing + , _miFields = Nothing + , _miAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miQuotaUser :: Lens' MediaInsert' (Maybe Text) +miQuotaUser + = lens _miQuotaUser (\ s a -> s{_miQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miPrettyPrint :: Lens' MediaInsert' Bool +miPrettyPrint + = lens _miPrettyPrint + (\ s a -> s{_miPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miUserIp :: Lens' MediaInsert' (Maybe Text) +miUserIp = lens _miUserIp (\ s a -> s{_miUserIp = a}) + +miCollection :: Lens' MediaInsert' Text +miCollection + = lens _miCollection (\ s a -> s{_miCollection = a}) + +-- | The ID of the user to create the activity on behalf of. +miUserId :: Lens' MediaInsert' Text +miUserId = lens _miUserId (\ s a -> s{_miUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miKey :: Lens' MediaInsert' (Maybe Text) +miKey = lens _miKey (\ s a -> s{_miKey = a}) + +-- | OAuth 2.0 token for the current user. +miOauthToken :: Lens' MediaInsert' (Maybe Text) +miOauthToken + = lens _miOauthToken (\ s a -> s{_miOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +miFields :: Lens' MediaInsert' (Maybe Text) +miFields = lens _miFields (\ s a -> s{_miFields = a}) + +-- | Data format for the response. +miAlt :: Lens' MediaInsert' Text +miAlt = lens _miAlt (\ s a -> s{_miAlt = a}) + +instance GoogleRequest MediaInsert' where + type Rs MediaInsert' = Media + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u MediaInsert{..} + = go _miQuotaUser _miPrettyPrint _miUserIp + _miCollection + _miUserId + _miKey + _miOauthToken + _miFields + _miAlt + where go + = clientWithRoute (Proxy :: Proxy MediaInsertAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/Get.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/Get.hs new file mode 100644 index 000000000..037fb3ad8 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.People.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a person\'s profile. +-- +-- /See:/ for @PlusDomainsPeopleGet@. +module PlusDomains.People.Get + ( + -- * REST Resource + PeopleGetAPI + + -- * Creating a Request + , peopleGet + , PeopleGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgUserId + , pgKey + , pgOauthToken + , pgFields + , pgAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsPeopleGet@ which the +-- 'PeopleGet' request conforms to. +type PeopleGetAPI = + "people" :> + Capture "userId" Text :> Get '[JSON] Person + +-- | Get a person\'s profile. +-- +-- /See:/ 'peopleGet' smart constructor. +data PeopleGet = PeopleGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgUserId :: !Text + , _pgKey :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgUserId' +-- +-- * 'pgKey' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +peopleGet + :: Text -- ^ 'userId' + -> PeopleGet +peopleGet pPgUserId_ = + PeopleGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgUserId = pPgUserId_ + , _pgKey = Nothing + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PeopleGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PeopleGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PeopleGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | The ID of the person to get the profile for. The special value \"me\" +-- can be used to indicate the authenticated user. +pgUserId :: Lens' PeopleGet' Text +pgUserId = lens _pgUserId (\ s a -> s{_pgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PeopleGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PeopleGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PeopleGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PeopleGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PeopleGet' where + type Rs PeopleGet' = Person + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u PeopleGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgUserId + _pgKey + _pgOauthToken + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PeopleGetAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/List.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/List.hs new file mode 100644 index 000000000..a4cad977b --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/List.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.People.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the people in the specified collection. +-- +-- /See:/ for @PlusDomainsPeopleList@. +module PlusDomains.People.List + ( + -- * REST Resource + PeopleListAPI + + -- * Creating a Request + , peopleList + , PeopleList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plOrderBy + , plUserIp + , plCollection + , plUserId + , plKey + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsPeopleList@ which the +-- 'PeopleList' request conforms to. +type PeopleListAPI = + "people" :> + Capture "userId" Text :> + "people" :> + Capture "collection" Text :> + QueryParam "orderBy" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | List all of the people in the specified collection. +-- +-- /See:/ 'peopleList' smart constructor. +data PeopleList = PeopleList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plOrderBy :: !(Maybe Text) + , _plUserIp :: !(Maybe Text) + , _plCollection :: !Text + , _plUserId :: !Text + , _plKey :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !Word32 + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plOrderBy' +-- +-- * 'plUserIp' +-- +-- * 'plCollection' +-- +-- * 'plUserId' +-- +-- * 'plKey' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +peopleList + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> PeopleList +peopleList pPlCollection_ pPlUserId_ = + PeopleList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plOrderBy = Nothing + , _plUserIp = Nothing + , _plCollection = pPlCollection_ + , _plUserId = pPlUserId_ + , _plKey = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = 100 + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PeopleList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PeopleList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | The order to return people in. +plOrderBy :: Lens' PeopleList' (Maybe Text) +plOrderBy + = lens _plOrderBy (\ s a -> s{_plOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PeopleList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | The collection of people to list. +plCollection :: Lens' PeopleList' Text +plCollection + = lens _plCollection (\ s a -> s{_plCollection = a}) + +-- | Get the collection of people for the person identified. Use \"me\" to +-- indicate the authenticated user. +plUserId :: Lens' PeopleList' Text +plUserId = lens _plUserId (\ s a -> s{_plUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PeopleList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +plPageToken :: Lens' PeopleList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PeopleList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +plMaxResults :: Lens' PeopleList' Word32 +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PeopleList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PeopleList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PeopleList' where + type Rs PeopleList' = PeopleFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u PeopleList{..} + = go _plQuotaUser _plPrettyPrint _plOrderBy _plUserIp + _plCollection + _plUserId + _plKey + _plPageToken + _plOauthToken + (Just _plMaxResults) + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PeopleListAPI) r u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByActivity.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByActivity.hs new file mode 100644 index 000000000..bfba080f8 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByActivity.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.People.ListByActivity +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the people in the specified collection for a particular +-- activity. +-- +-- /See:/ for @PlusDomainsPeopleListByActivity@. +module PlusDomains.People.ListByActivity + ( + -- * REST Resource + PeopleListByActivityAPI + + -- * Creating a Request + , peopleListByActivity + , PeopleListByActivity + + -- * Request Lenses + , plbaQuotaUser + , plbaPrettyPrint + , plbaUserIp + , plbaActivityId + , plbaCollection + , plbaKey + , plbaPageToken + , plbaOauthToken + , plbaMaxResults + , plbaFields + , plbaAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsPeopleListByActivity@ which the +-- 'PeopleListByActivity' request conforms to. +type PeopleListByActivityAPI = + "activities" :> + Capture "activityId" Text :> + "people" :> + Capture "collection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | List all of the people in the specified collection for a particular +-- activity. +-- +-- /See:/ 'peopleListByActivity' smart constructor. +data PeopleListByActivity = PeopleListByActivity + { _plbaQuotaUser :: !(Maybe Text) + , _plbaPrettyPrint :: !Bool + , _plbaUserIp :: !(Maybe Text) + , _plbaActivityId :: !Text + , _plbaCollection :: !Text + , _plbaKey :: !(Maybe Text) + , _plbaPageToken :: !(Maybe Text) + , _plbaOauthToken :: !(Maybe Text) + , _plbaMaxResults :: !Word32 + , _plbaFields :: !(Maybe Text) + , _plbaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleListByActivity'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plbaQuotaUser' +-- +-- * 'plbaPrettyPrint' +-- +-- * 'plbaUserIp' +-- +-- * 'plbaActivityId' +-- +-- * 'plbaCollection' +-- +-- * 'plbaKey' +-- +-- * 'plbaPageToken' +-- +-- * 'plbaOauthToken' +-- +-- * 'plbaMaxResults' +-- +-- * 'plbaFields' +-- +-- * 'plbaAlt' +peopleListByActivity + :: Text -- ^ 'activityId' + -> Text -- ^ 'collection' + -> PeopleListByActivity +peopleListByActivity pPlbaActivityId_ pPlbaCollection_ = + PeopleListByActivity + { _plbaQuotaUser = Nothing + , _plbaPrettyPrint = True + , _plbaUserIp = Nothing + , _plbaActivityId = pPlbaActivityId_ + , _plbaCollection = pPlbaCollection_ + , _plbaKey = Nothing + , _plbaPageToken = Nothing + , _plbaOauthToken = Nothing + , _plbaMaxResults = 20 + , _plbaFields = Nothing + , _plbaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plbaQuotaUser :: Lens' PeopleListByActivity' (Maybe Text) +plbaQuotaUser + = lens _plbaQuotaUser + (\ s a -> s{_plbaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plbaPrettyPrint :: Lens' PeopleListByActivity' Bool +plbaPrettyPrint + = lens _plbaPrettyPrint + (\ s a -> s{_plbaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plbaUserIp :: Lens' PeopleListByActivity' (Maybe Text) +plbaUserIp + = lens _plbaUserIp (\ s a -> s{_plbaUserIp = a}) + +-- | The ID of the activity to get the list of people for. +plbaActivityId :: Lens' PeopleListByActivity' Text +plbaActivityId + = lens _plbaActivityId + (\ s a -> s{_plbaActivityId = a}) + +-- | The collection of people to list. +plbaCollection :: Lens' PeopleListByActivity' Text +plbaCollection + = lens _plbaCollection + (\ s a -> s{_plbaCollection = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plbaKey :: Lens' PeopleListByActivity' (Maybe Text) +plbaKey = lens _plbaKey (\ s a -> s{_plbaKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +plbaPageToken :: Lens' PeopleListByActivity' (Maybe Text) +plbaPageToken + = lens _plbaPageToken + (\ s a -> s{_plbaPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plbaOauthToken :: Lens' PeopleListByActivity' (Maybe Text) +plbaOauthToken + = lens _plbaOauthToken + (\ s a -> s{_plbaOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +plbaMaxResults :: Lens' PeopleListByActivity' Word32 +plbaMaxResults + = lens _plbaMaxResults + (\ s a -> s{_plbaMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plbaFields :: Lens' PeopleListByActivity' (Maybe Text) +plbaFields + = lens _plbaFields (\ s a -> s{_plbaFields = a}) + +-- | Data format for the response. +plbaAlt :: Lens' PeopleListByActivity' Text +plbaAlt = lens _plbaAlt (\ s a -> s{_plbaAlt = a}) + +instance GoogleRequest PeopleListByActivity' where + type Rs PeopleListByActivity' = PeopleFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u PeopleListByActivity{..} + = go _plbaQuotaUser _plbaPrettyPrint _plbaUserIp + _plbaActivityId + _plbaCollection + _plbaKey + _plbaPageToken + _plbaOauthToken + (Just _plbaMaxResults) + _plbaFields + _plbaAlt + where go + = clientWithRoute + (Proxy :: Proxy PeopleListByActivityAPI) + r + u diff --git a/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByCircle.hs b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByCircle.hs new file mode 100644 index 000000000..cd0a63e27 --- /dev/null +++ b/gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByCircle.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PlusDomains.People.ListByCircle +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the people who are members of a circle. +-- +-- /See:/ for @PlusDomainsPeopleListByCircle@. +module PlusDomains.People.ListByCircle + ( + -- * REST Resource + PeopleListByCircleAPI + + -- * Creating a Request + , peopleListByCircle + , PeopleListByCircle + + -- * Request Lenses + , plbcQuotaUser + , plbcPrettyPrint + , plbcUserIp + , plbcKey + , plbcCircleId + , plbcPageToken + , plbcOauthToken + , plbcMaxResults + , plbcFields + , plbcAlt + ) where + +import Network.Google.PlusDomains.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusDomainsPeopleListByCircle@ which the +-- 'PeopleListByCircle' request conforms to. +type PeopleListByCircleAPI = + "circles" :> + Capture "circleId" Text :> + "people" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | List all of the people who are members of a circle. +-- +-- /See:/ 'peopleListByCircle' smart constructor. +data PeopleListByCircle = PeopleListByCircle + { _plbcQuotaUser :: !(Maybe Text) + , _plbcPrettyPrint :: !Bool + , _plbcUserIp :: !(Maybe Text) + , _plbcKey :: !(Maybe Text) + , _plbcCircleId :: !Text + , _plbcPageToken :: !(Maybe Text) + , _plbcOauthToken :: !(Maybe Text) + , _plbcMaxResults :: !Word32 + , _plbcFields :: !(Maybe Text) + , _plbcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleListByCircle'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plbcQuotaUser' +-- +-- * 'plbcPrettyPrint' +-- +-- * 'plbcUserIp' +-- +-- * 'plbcKey' +-- +-- * 'plbcCircleId' +-- +-- * 'plbcPageToken' +-- +-- * 'plbcOauthToken' +-- +-- * 'plbcMaxResults' +-- +-- * 'plbcFields' +-- +-- * 'plbcAlt' +peopleListByCircle + :: Text -- ^ 'circleId' + -> PeopleListByCircle +peopleListByCircle pPlbcCircleId_ = + PeopleListByCircle + { _plbcQuotaUser = Nothing + , _plbcPrettyPrint = True + , _plbcUserIp = Nothing + , _plbcKey = Nothing + , _plbcCircleId = pPlbcCircleId_ + , _plbcPageToken = Nothing + , _plbcOauthToken = Nothing + , _plbcMaxResults = 20 + , _plbcFields = Nothing + , _plbcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plbcQuotaUser :: Lens' PeopleListByCircle' (Maybe Text) +plbcQuotaUser + = lens _plbcQuotaUser + (\ s a -> s{_plbcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plbcPrettyPrint :: Lens' PeopleListByCircle' Bool +plbcPrettyPrint + = lens _plbcPrettyPrint + (\ s a -> s{_plbcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plbcUserIp :: Lens' PeopleListByCircle' (Maybe Text) +plbcUserIp + = lens _plbcUserIp (\ s a -> s{_plbcUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plbcKey :: Lens' PeopleListByCircle' (Maybe Text) +plbcKey = lens _plbcKey (\ s a -> s{_plbcKey = a}) + +-- | The ID of the circle to get the members of. +plbcCircleId :: Lens' PeopleListByCircle' Text +plbcCircleId + = lens _plbcCircleId (\ s a -> s{_plbcCircleId = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +plbcPageToken :: Lens' PeopleListByCircle' (Maybe Text) +plbcPageToken + = lens _plbcPageToken + (\ s a -> s{_plbcPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plbcOauthToken :: Lens' PeopleListByCircle' (Maybe Text) +plbcOauthToken + = lens _plbcOauthToken + (\ s a -> s{_plbcOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +plbcMaxResults :: Lens' PeopleListByCircle' Word32 +plbcMaxResults + = lens _plbcMaxResults + (\ s a -> s{_plbcMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plbcFields :: Lens' PeopleListByCircle' (Maybe Text) +plbcFields + = lens _plbcFields (\ s a -> s{_plbcFields = a}) + +-- | Data format for the response. +plbcAlt :: Lens' PeopleListByCircle' Text +plbcAlt = lens _plbcAlt (\ s a -> s{_plbcAlt = a}) + +instance GoogleRequest PeopleListByCircle' where + type Rs PeopleListByCircle' = PeopleFeed + request = requestWithRoute defReq plusDomainsURL + requestWithRoute r u PeopleListByCircle{..} + = go _plbcQuotaUser _plbcPrettyPrint _plbcUserIp + _plbcKey + _plbcCircleId + _plbcPageToken + _plbcOauthToken + (Just _plbcMaxResults) + _plbcFields + _plbcAlt + where go + = clientWithRoute + (Proxy :: Proxy PeopleListByCircleAPI) + r + u diff --git a/gogol-plus-domains/gogol-plus-domains.cabal b/gogol-plus-domains/gogol-plus-domains.cabal new file mode 100644 index 000000000..32c47bc73 --- /dev/null +++ b/gogol-plus-domains/gogol-plus-domains.cabal @@ -0,0 +1,63 @@ +name: gogol-plus-domains +version: 0.0.1 +synopsis: Google+ Domains API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google+ API enables developers to build on top of the Google+ + platform. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PlusDomains + , Network.Google.PlusDomains.Types + , Network.Google.Resource.PlusDomains.Activities.Get + , Network.Google.Resource.PlusDomains.Activities.Insert + , Network.Google.Resource.PlusDomains.Activities.List + , Network.Google.Resource.PlusDomains.Audiences.List + , Network.Google.Resource.PlusDomains.Circles.AddPeople + , Network.Google.Resource.PlusDomains.Circles.Get + , Network.Google.Resource.PlusDomains.Circles.Insert + , Network.Google.Resource.PlusDomains.Circles.List + , Network.Google.Resource.PlusDomains.Circles.Patch + , Network.Google.Resource.PlusDomains.Circles.Remove + , Network.Google.Resource.PlusDomains.Circles.RemovePeople + , Network.Google.Resource.PlusDomains.Circles.Update + , Network.Google.Resource.PlusDomains.Comments.Get + , Network.Google.Resource.PlusDomains.Comments.Insert + , Network.Google.Resource.PlusDomains.Comments.List + , Network.Google.Resource.PlusDomains.Media.Insert + , Network.Google.Resource.PlusDomains.People.Get + , Network.Google.Resource.PlusDomains.People.List + , Network.Google.Resource.PlusDomains.People.ListByActivity + , Network.Google.Resource.PlusDomains.People.ListByCircle + + other-modules: + Network.Google.PlusDomains.Types.Product + , Network.Google.PlusDomains.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-plus-domains/src/.gitkeep b/gogol-plus-domains/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-plus/LICENSE b/gogol-plus/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-plus/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-plus/Makefile b/gogol-plus/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-plus/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-plus/README.md b/gogol-plus/README.md new file mode 100644 index 000000000..3c41572b7 --- /dev/null +++ b/gogol-plus/README.md @@ -0,0 +1,28 @@ +# gogol-plus + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google+ API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-plus` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-plus/Setup.hs b/gogol-plus/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-plus/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-plus/gen/Network/Google/Plus.hs b/gogol-plus/gen/Network/Google/Plus.hs new file mode 100644 index 000000000..f0c84e1a4 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Plus.hs @@ -0,0 +1,302 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Plus +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google+ API enables developers to build on top of the Google+ +-- platform. +-- +-- /See:/ +module Network.Google.Plus + ( + -- * API + PlusAPI + , plusAPI + , plusURL + + -- * Service Methods + + -- * REST Resources + + -- ** PlusActivitiesGet + , module Plus.Activities.Get + + -- ** PlusActivitiesList + , module Plus.Activities.List + + -- ** PlusActivitiesSearch + , module Plus.Activities.Search + + -- ** PlusCommentsGet + , module Plus.Comments.Get + + -- ** PlusCommentsList + , module Plus.Comments.List + + -- ** PlusMomentsInsert + , module Plus.Moments.Insert + + -- ** PlusMomentsList + , module Plus.Moments.List + + -- ** PlusPeopleGet + , module Plus.People.Get + + -- ** PlusPeopleList + , module Plus.People.List + + -- ** PlusPeopleListByActivity + , module Plus.People.ListByActivity + + -- ** PlusPeopleSearch + , module Plus.People.Search + + -- * Types + + -- ** Person + , Person + , person + , pCurrentLocation + , pAgeRange + , pEtag + , pImage + , pBraggingRights + , pPlacesLived + , pPlusOneCount + , pObjectType + , pCover + , pKind + , pRelationshipStatus + , pUrls + , pDomain + , pUrl + , pVerified + , pBirthday + , pIsPlusUser + , pTagline + , pGender + , pName + , pEmails + , pOccupation + , pSkills + , pLanguage + , pAboutMe + , pDisplayName + , pId + , pNickname + , pOrganizations + , pCircledByCount + + -- ** Moment + , Moment + , moment + , mKind + , mResult + , mStartDate + , mObject + , mId + , mType + , mTarget + + -- ** PeopleFeed + , PeopleFeed + , peopleFeed + , pfTotalItems + , pfEtag + , pfNextPageToken + , pfKind + , pfItems + , pfSelfLink + , pfTitle + + -- ** ItemScope + , ItemScope + , itemScope + , isGivenName + , isContentSize + , isThumbnail + , isTickerSymbol + , isHeight + , isThumbnailUrl + , isImage + , isStreetAddress + , isWorstRating + , isLocation + , isAttendees + , isText + , isKind + , isLatitude + , isPostalCode + , isEndDate + , isAssociatedMedia + , isPlayerType + , isUrl + , isWidth + , isCaption + , isAddress + , isAddressCountry + , isPostOfficeBoxNumber + , isAdditionalName + , isFamilyName + , isDateCreated + , isRatingValue + , isDatePublished + , isStartDate + , isGender + , isName + , isBestRating + , isAddressLocality + , isPartOfTVSeries + , isContentUrl + , isByArtist + , isAbout + , isReviewRating + , isDateModified + , isAuthor + , isGeo + , isId + , isPerformers + , isAttendeeCount + , isInAlbum + , isEmbedUrl + , isType + , isContributor + , isLongitude + , isDuration + , isAddressRegion + , isAudio + , isDescription + , isBirthDate + + -- ** ActivityFeed + , ActivityFeed + , activityFeed + , afEtag + , afNextPageToken + , afNextLink + , afKind + , afItems + , afSelfLink + , afId + , afUpdated + , afTitle + + -- ** PlusACLentryResource + , PlusACLentryResource + , plusACLentryResource + , parDisplayName + , parId + , parType + + -- ** Activity + , Activity + , activity + , aAccess + , aPlaceName + , aEtag + , aAnnotation + , aLocation + , aGeocode + , aKind + , aRadius + , aPublished + , aUrl + , aActor + , aAddress + , aObject + , aId + , aUpdated + , aTitle + , aVerb + , aCrosspostSource + , aPlaceId + , aProvider + + -- ** Place + , Place + , place + , plaKind + , plaAddress + , plaDisplayName + , plaId + , plaPosition + + -- ** Comment + , Comment + , comment + , cEtag + , cPlusoners + , cKind + , cPublished + , cActor + , cSelfLink + , cObject + , cId + , cUpdated + , cVerb + , cInReplyTo + + -- ** ACL + , ACL + , aCL + , aclKind + , aclItems + , aclDescription + + -- ** MomentsFeed + , MomentsFeed + , momentsFeed + , mfEtag + , mfNextPageToken + , mfNextLink + , mfKind + , mfItems + , mfSelfLink + , mfUpdated + , mfTitle + + -- ** CommentFeed + , CommentFeed + , commentFeed + , cfEtag + , cfNextPageToken + , cfNextLink + , cfKind + , cfItems + , cfId + , cfUpdated + , cfTitle + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude +import Network.Google.Resource.Plus.Activities.Get +import Network.Google.Resource.Plus.Activities.List +import Network.Google.Resource.Plus.Activities.Search +import Network.Google.Resource.Plus.Comments.Get +import Network.Google.Resource.Plus.Comments.List +import Network.Google.Resource.Plus.Moments.Insert +import Network.Google.Resource.Plus.Moments.List +import Network.Google.Resource.Plus.People.Get +import Network.Google.Resource.Plus.People.List +import Network.Google.Resource.Plus.People.ListByActivity +import Network.Google.Resource.Plus.People.Search + +{- $resources +TODO +-} + +type PlusAPI = + Activities :<|> People :<|> Comments :<|> Moments + +plusAPI :: Proxy PlusAPI +plusAPI = Proxy diff --git a/gogol-plus/gen/Network/Google/Plus/Types.hs b/gogol-plus/gen/Network/Google/Plus/Types.hs new file mode 100644 index 000000000..3bc76207c --- /dev/null +++ b/gogol-plus/gen/Network/Google/Plus/Types.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Plus.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Plus.Types + ( + -- * Service URL + plusURL + + -- * Person + , Person + , person + , pCurrentLocation + , pAgeRange + , pEtag + , pImage + , pBraggingRights + , pPlacesLived + , pPlusOneCount + , pObjectType + , pCover + , pKind + , pRelationshipStatus + , pUrls + , pDomain + , pUrl + , pVerified + , pBirthday + , pIsPlusUser + , pTagline + , pGender + , pName + , pEmails + , pOccupation + , pSkills + , pLanguage + , pAboutMe + , pDisplayName + , pId + , pNickname + , pOrganizations + , pCircledByCount + + -- * Moment + , Moment + , moment + , mKind + , mResult + , mStartDate + , mObject + , mId + , mType + , mTarget + + -- * PeopleFeed + , PeopleFeed + , peopleFeed + , pfTotalItems + , pfEtag + , pfNextPageToken + , pfKind + , pfItems + , pfSelfLink + , pfTitle + + -- * ItemScope + , ItemScope + , itemScope + , isGivenName + , isContentSize + , isThumbnail + , isTickerSymbol + , isHeight + , isThumbnailUrl + , isImage + , isStreetAddress + , isWorstRating + , isLocation + , isAttendees + , isText + , isKind + , isLatitude + , isPostalCode + , isEndDate + , isAssociatedMedia + , isPlayerType + , isUrl + , isWidth + , isCaption + , isAddress + , isAddressCountry + , isPostOfficeBoxNumber + , isAdditionalName + , isFamilyName + , isDateCreated + , isRatingValue + , isDatePublished + , isStartDate + , isGender + , isName + , isBestRating + , isAddressLocality + , isPartOfTVSeries + , isContentUrl + , isByArtist + , isAbout + , isReviewRating + , isDateModified + , isAuthor + , isGeo + , isId + , isPerformers + , isAttendeeCount + , isInAlbum + , isEmbedUrl + , isType + , isContributor + , isLongitude + , isDuration + , isAddressRegion + , isAudio + , isDescription + , isBirthDate + + -- * ActivityFeed + , ActivityFeed + , activityFeed + , afEtag + , afNextPageToken + , afNextLink + , afKind + , afItems + , afSelfLink + , afId + , afUpdated + , afTitle + + -- * PlusACLentryResource + , PlusACLentryResource + , plusACLentryResource + , parDisplayName + , parId + , parType + + -- * Activity + , Activity + , activity + , aAccess + , aPlaceName + , aEtag + , aAnnotation + , aLocation + , aGeocode + , aKind + , aRadius + , aPublished + , aUrl + , aActor + , aAddress + , aObject + , aId + , aUpdated + , aTitle + , aVerb + , aCrosspostSource + , aPlaceId + , aProvider + + -- * Place + , Place + , place + , plaKind + , plaAddress + , plaDisplayName + , plaId + , plaPosition + + -- * Comment + , Comment + , comment + , cEtag + , cPlusoners + , cKind + , cPublished + , cActor + , cSelfLink + , cObject + , cId + , cUpdated + , cVerb + , cInReplyTo + + -- * ACL + , ACL + , aCL + , aclKind + , aclItems + , aclDescription + + -- * MomentsFeed + , MomentsFeed + , momentsFeed + , mfEtag + , mfNextPageToken + , mfNextLink + , mfKind + , mfItems + , mfSelfLink + , mfUpdated + , mfTitle + + -- * CommentFeed + , CommentFeed + , commentFeed + , cfEtag + , cfNextPageToken + , cfNextLink + , cfKind + , cfItems + , cfId + , cfUpdated + , cfTitle + ) where + +import Network.Google.Plus.Types.Product +import Network.Google.Plus.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1' of the Google+ API. +plusURL :: BaseURL +plusURL + = BaseUrl Https "https://www.googleapis.com/plus/v1/" + 443 diff --git a/gogol-plus/gen/Network/Google/Plus/Types/Product.hs b/gogol-plus/gen/Network/Google/Plus/Types/Product.hs new file mode 100644 index 000000000..9da287ef3 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Plus/Types/Product.hs @@ -0,0 +1,2202 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Plus.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Plus.Types.Product where + +import Network.Google.Plus.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'person' smart constructor. +data Person = Person + { _pCurrentLocation :: !(Maybe Text) + , _pAgeRange :: !(Maybe PersonAgeRange) + , _pEtag :: !(Maybe Text) + , _pImage :: !(Maybe PersonImage) + , _pBraggingRights :: !(Maybe Text) + , _pPlacesLived :: !(Maybe [PersonPlacesLivedItem]) + , _pPlusOneCount :: !(Maybe Int32) + , _pObjectType :: !(Maybe Text) + , _pCover :: !(Maybe PersonCover) + , _pKind :: !Text + , _pRelationshipStatus :: !(Maybe Text) + , _pUrls :: !(Maybe [PersonURLsItem]) + , _pDomain :: !(Maybe Text) + , _pUrl :: !(Maybe Text) + , _pVerified :: !(Maybe Bool) + , _pBirthday :: !(Maybe Text) + , _pIsPlusUser :: !(Maybe Bool) + , _pTagline :: !(Maybe Text) + , _pGender :: !(Maybe Text) + , _pName :: !(Maybe PersonName) + , _pEmails :: !(Maybe [PersonEmailsItem]) + , _pOccupation :: !(Maybe Text) + , _pSkills :: !(Maybe Text) + , _pLanguage :: !(Maybe Text) + , _pAboutMe :: !(Maybe Text) + , _pDisplayName :: !(Maybe Text) + , _pId :: !(Maybe Text) + , _pNickname :: !(Maybe Text) + , _pOrganizations :: !(Maybe [PersonOrganizationsItem]) + , _pCircledByCount :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Person' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pCurrentLocation' +-- +-- * 'pAgeRange' +-- +-- * 'pEtag' +-- +-- * 'pImage' +-- +-- * 'pBraggingRights' +-- +-- * 'pPlacesLived' +-- +-- * 'pPlusOneCount' +-- +-- * 'pObjectType' +-- +-- * 'pCover' +-- +-- * 'pKind' +-- +-- * 'pRelationshipStatus' +-- +-- * 'pUrls' +-- +-- * 'pDomain' +-- +-- * 'pUrl' +-- +-- * 'pVerified' +-- +-- * 'pBirthday' +-- +-- * 'pIsPlusUser' +-- +-- * 'pTagline' +-- +-- * 'pGender' +-- +-- * 'pName' +-- +-- * 'pEmails' +-- +-- * 'pOccupation' +-- +-- * 'pSkills' +-- +-- * 'pLanguage' +-- +-- * 'pAboutMe' +-- +-- * 'pDisplayName' +-- +-- * 'pId' +-- +-- * 'pNickname' +-- +-- * 'pOrganizations' +-- +-- * 'pCircledByCount' +person + :: Person +person = + Person + { _pCurrentLocation = Nothing + , _pAgeRange = Nothing + , _pEtag = Nothing + , _pImage = Nothing + , _pBraggingRights = Nothing + , _pPlacesLived = Nothing + , _pPlusOneCount = Nothing + , _pObjectType = Nothing + , _pCover = Nothing + , _pKind = "plus#person" + , _pRelationshipStatus = Nothing + , _pUrls = Nothing + , _pDomain = Nothing + , _pUrl = Nothing + , _pVerified = Nothing + , _pBirthday = Nothing + , _pIsPlusUser = Nothing + , _pTagline = Nothing + , _pGender = Nothing + , _pName = Nothing + , _pEmails = Nothing + , _pOccupation = Nothing + , _pSkills = Nothing + , _pLanguage = Nothing + , _pAboutMe = Nothing + , _pDisplayName = Nothing + , _pId = Nothing + , _pNickname = Nothing + , _pOrganizations = Nothing + , _pCircledByCount = Nothing + } + +-- | (this field is not currently used) +pCurrentLocation :: Lens' Person (Maybe Text) +pCurrentLocation + = lens _pCurrentLocation + (\ s a -> s{_pCurrentLocation = a}) + +-- | The age range of the person. Valid ranges are 17 or younger, 18 to 20, +-- and 21 or older. Age is determined from the user\'s birthday using +-- Western age reckoning. +pAgeRange :: Lens' Person (Maybe PersonAgeRange) +pAgeRange + = lens _pAgeRange (\ s a -> s{_pAgeRange = a}) + +-- | ETag of this response for caching purposes. +pEtag :: Lens' Person (Maybe Text) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | The representation of the person\'s profile photo. +pImage :: Lens' Person (Maybe PersonImage) +pImage = lens _pImage (\ s a -> s{_pImage = a}) + +-- | The \"bragging rights\" line of this person. +pBraggingRights :: Lens' Person (Maybe Text) +pBraggingRights + = lens _pBraggingRights + (\ s a -> s{_pBraggingRights = a}) + +-- | A list of places where this person has lived. +pPlacesLived :: Lens' Person [PersonPlacesLivedItem] +pPlacesLived + = lens _pPlacesLived (\ s a -> s{_pPlacesLived = a}) + . _Default + . _Coerce + +-- | If a Google+ Page, the number of people who have +1\'d this page. +pPlusOneCount :: Lens' Person (Maybe Int32) +pPlusOneCount + = lens _pPlusOneCount + (\ s a -> s{_pPlusOneCount = a}) + +-- | Type of person within Google+. Possible values include, but are not +-- limited to, the following values: - \"person\" - represents an actual +-- person. - \"page\" - represents a page. +pObjectType :: Lens' Person (Maybe Text) +pObjectType + = lens _pObjectType (\ s a -> s{_pObjectType = a}) + +-- | The cover photo content. +pCover :: Lens' Person (Maybe PersonCover) +pCover = lens _pCover (\ s a -> s{_pCover = a}) + +-- | Identifies this resource as a person. Value: \"plus#person\". +pKind :: Lens' Person Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The person\'s relationship status. Possible values include, but are not +-- limited to, the following values: - \"single\" - Person is single. - +-- \"in_a_relationship\" - Person is in a relationship. - \"engaged\" - +-- Person is engaged. - \"married\" - Person is married. - +-- \"its_complicated\" - The relationship is complicated. - +-- \"open_relationship\" - Person is in an open relationship. - \"widowed\" +-- - Person is widowed. - \"in_domestic_partnership\" - Person is in a +-- domestic partnership. - \"in_civil_union\" - Person is in a civil union. +pRelationshipStatus :: Lens' Person (Maybe Text) +pRelationshipStatus + = lens _pRelationshipStatus + (\ s a -> s{_pRelationshipStatus = a}) + +-- | A list of URLs for this person. +pUrls :: Lens' Person [PersonURLsItem] +pUrls + = lens _pUrls (\ s a -> s{_pUrls = a}) . _Default . + _Coerce + +-- | The hosted domain name for the user\'s Google Apps account. For +-- instance, example.com. The plus.profile.emails.read or email scope is +-- needed to get this domain name. +pDomain :: Lens' Person (Maybe Text) +pDomain = lens _pDomain (\ s a -> s{_pDomain = a}) + +-- | The URL of this person\'s profile. +pUrl :: Lens' Person (Maybe Text) +pUrl = lens _pUrl (\ s a -> s{_pUrl = a}) + +-- | Whether the person or Google+ Page has been verified. +pVerified :: Lens' Person (Maybe Bool) +pVerified + = lens _pVerified (\ s a -> s{_pVerified = a}) + +-- | The person\'s date of birth, represented as YYYY-MM-DD. +pBirthday :: Lens' Person (Maybe Text) +pBirthday + = lens _pBirthday (\ s a -> s{_pBirthday = a}) + +-- | Whether this user has signed up for Google+. +pIsPlusUser :: Lens' Person (Maybe Bool) +pIsPlusUser + = lens _pIsPlusUser (\ s a -> s{_pIsPlusUser = a}) + +-- | The brief description (tagline) of this person. +pTagline :: Lens' Person (Maybe Text) +pTagline = lens _pTagline (\ s a -> s{_pTagline = a}) + +-- | The person\'s gender. Possible values include, but are not limited to, +-- the following values: - \"male\" - Male gender. - \"female\" - Female +-- gender. - \"other\" - Other. +pGender :: Lens' Person (Maybe Text) +pGender = lens _pGender (\ s a -> s{_pGender = a}) + +-- | An object representation of the individual components of a person\'s +-- name. +pName :: Lens' Person (Maybe PersonName) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | A list of email addresses that this person has, including their Google +-- account email address, and the public verified email addresses on their +-- Google+ profile. The plus.profile.emails.read scope is needed to +-- retrieve these email addresses, or the email scope can be used to +-- retrieve just the Google account email address. +pEmails :: Lens' Person [PersonEmailsItem] +pEmails + = lens _pEmails (\ s a -> s{_pEmails = a}) . _Default + . _Coerce + +-- | The occupation of this person. +pOccupation :: Lens' Person (Maybe Text) +pOccupation + = lens _pOccupation (\ s a -> s{_pOccupation = a}) + +-- | The person\'s skills. +pSkills :: Lens' Person (Maybe Text) +pSkills = lens _pSkills (\ s a -> s{_pSkills = a}) + +-- | The user\'s preferred language for rendering. +pLanguage :: Lens' Person (Maybe Text) +pLanguage + = lens _pLanguage (\ s a -> s{_pLanguage = a}) + +-- | A short biography for this person. +pAboutMe :: Lens' Person (Maybe Text) +pAboutMe = lens _pAboutMe (\ s a -> s{_pAboutMe = a}) + +-- | The name of this person, which is suitable for display. +pDisplayName :: Lens' Person (Maybe Text) +pDisplayName + = lens _pDisplayName (\ s a -> s{_pDisplayName = a}) + +-- | The ID of this person. +pId :: Lens' Person (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +-- | The nickname of this person. +pNickname :: Lens' Person (Maybe Text) +pNickname + = lens _pNickname (\ s a -> s{_pNickname = a}) + +-- | A list of current or past organizations with which this person is +-- associated. +pOrganizations :: Lens' Person [PersonOrganizationsItem] +pOrganizations + = lens _pOrganizations + (\ s a -> s{_pOrganizations = a}) + . _Default + . _Coerce + +-- | For followers who are visible, the number of people who have added this +-- person or page to a circle. +pCircledByCount :: Lens' Person (Maybe Int32) +pCircledByCount + = lens _pCircledByCount + (\ s a -> s{_pCircledByCount = a}) + +instance FromJSON Person where + parseJSON + = withObject "Person" + (\ o -> + Person <$> + (o .:? "currentLocation") <*> (o .:? "ageRange") <*> + (o .:? "etag") + <*> (o .:? "image") + <*> (o .:? "braggingRights") + <*> (o .:? "placesLived" .!= mempty) + <*> (o .:? "plusOneCount") + <*> (o .:? "objectType") + <*> (o .:? "cover") + <*> (o .:? "kind" .!= "plus#person") + <*> (o .:? "relationshipStatus") + <*> (o .:? "urls" .!= mempty) + <*> (o .:? "domain") + <*> (o .:? "url") + <*> (o .:? "verified") + <*> (o .:? "birthday") + <*> (o .:? "isPlusUser") + <*> (o .:? "tagline") + <*> (o .:? "gender") + <*> (o .:? "name") + <*> (o .:? "emails" .!= mempty) + <*> (o .:? "occupation") + <*> (o .:? "skills") + <*> (o .:? "language") + <*> (o .:? "aboutMe") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "nickname") + <*> (o .:? "organizations" .!= mempty) + <*> (o .:? "circledByCount")) + +instance ToJSON Person where + toJSON Person{..} + = object + (catMaybes + [("currentLocation" .=) <$> _pCurrentLocation, + ("ageRange" .=) <$> _pAgeRange, + ("etag" .=) <$> _pEtag, ("image" .=) <$> _pImage, + ("braggingRights" .=) <$> _pBraggingRights, + ("placesLived" .=) <$> _pPlacesLived, + ("plusOneCount" .=) <$> _pPlusOneCount, + ("objectType" .=) <$> _pObjectType, + ("cover" .=) <$> _pCover, Just ("kind" .= _pKind), + ("relationshipStatus" .=) <$> _pRelationshipStatus, + ("urls" .=) <$> _pUrls, ("domain" .=) <$> _pDomain, + ("url" .=) <$> _pUrl, ("verified" .=) <$> _pVerified, + ("birthday" .=) <$> _pBirthday, + ("isPlusUser" .=) <$> _pIsPlusUser, + ("tagline" .=) <$> _pTagline, + ("gender" .=) <$> _pGender, ("name" .=) <$> _pName, + ("emails" .=) <$> _pEmails, + ("occupation" .=) <$> _pOccupation, + ("skills" .=) <$> _pSkills, + ("language" .=) <$> _pLanguage, + ("aboutMe" .=) <$> _pAboutMe, + ("displayName" .=) <$> _pDisplayName, + ("id" .=) <$> _pId, ("nickname" .=) <$> _pNickname, + ("organizations" .=) <$> _pOrganizations, + ("circledByCount" .=) <$> _pCircledByCount]) + +-- +-- /See:/ 'moment' smart constructor. +data Moment = Moment + { _mKind :: !Text + , _mResult :: !(Maybe (Maybe ItemScope)) + , _mStartDate :: !(Maybe UTCTime) + , _mObject :: !(Maybe (Maybe ItemScope)) + , _mId :: !(Maybe Text) + , _mType :: !(Maybe Text) + , _mTarget :: !(Maybe (Maybe ItemScope)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Moment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mKind' +-- +-- * 'mResult' +-- +-- * 'mStartDate' +-- +-- * 'mObject' +-- +-- * 'mId' +-- +-- * 'mType' +-- +-- * 'mTarget' +moment + :: Moment +moment = + Moment + { _mKind = "plus#moment" + , _mResult = Nothing + , _mStartDate = Nothing + , _mObject = Nothing + , _mId = Nothing + , _mType = Nothing + , _mTarget = Nothing + } + +-- | Identifies this resource as a moment. +mKind :: Lens' Moment Text +mKind = lens _mKind (\ s a -> s{_mKind = a}) + +-- | The object generated by performing the action on the object. For +-- example, a user writes a review of a restaurant, the object is the +-- restaurant and the result is the review. +mResult :: Lens' Moment (Maybe (Maybe ItemScope)) +mResult = lens _mResult (\ s a -> s{_mResult = a}) + +-- | Time stamp of when the action occurred in RFC3339 format. +mStartDate :: Lens' Moment (Maybe UTCTime) +mStartDate + = lens _mStartDate (\ s a -> s{_mStartDate = a}) + +-- | The object on which the action was performed. Specifying this is +-- equivalent with specifying \"target\". Note that responses from the +-- server will use the \"target\" field instead for backward-compatibility +-- with older clients. +mObject :: Lens' Moment (Maybe (Maybe ItemScope)) +mObject = lens _mObject (\ s a -> s{_mObject = a}) + +-- | The moment ID. +mId :: Lens' Moment (Maybe Text) +mId = lens _mId (\ s a -> s{_mId = a}) + +-- | The schema.org type for the type of moment to write. For example, +-- http:\/\/schema.org\/AddAction. Note that responses from the server will +-- use the Google schema type instead for backward-compatibility with older +-- clients. For example, http:\/\/schemas.google.com\/AddActivity. +mType :: Lens' Moment (Maybe Text) +mType = lens _mType (\ s a -> s{_mType = a}) + +-- | The object on which the action was performed. +mTarget :: Lens' Moment (Maybe (Maybe ItemScope)) +mTarget = lens _mTarget (\ s a -> s{_mTarget = a}) + +instance FromJSON Moment where + parseJSON + = withObject "Moment" + (\ o -> + Moment <$> + (o .:? "kind" .!= "plus#moment") <*> (o .:? "result") + <*> (o .:? "startDate") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "type") + <*> (o .:? "target")) + +instance ToJSON Moment where + toJSON Moment{..} + = object + (catMaybes + [Just ("kind" .= _mKind), ("result" .=) <$> _mResult, + ("startDate" .=) <$> _mStartDate, + ("object" .=) <$> _mObject, ("id" .=) <$> _mId, + ("type" .=) <$> _mType, ("target" .=) <$> _mTarget]) + +-- +-- /See:/ 'peopleFeed' smart constructor. +data PeopleFeed = PeopleFeed + { _pfTotalItems :: !(Maybe Int32) + , _pfEtag :: !(Maybe Text) + , _pfNextPageToken :: !(Maybe Text) + , _pfKind :: !Text + , _pfItems :: !(Maybe [Maybe Person]) + , _pfSelfLink :: !(Maybe Text) + , _pfTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pfTotalItems' +-- +-- * 'pfEtag' +-- +-- * 'pfNextPageToken' +-- +-- * 'pfKind' +-- +-- * 'pfItems' +-- +-- * 'pfSelfLink' +-- +-- * 'pfTitle' +peopleFeed + :: PeopleFeed +peopleFeed = + PeopleFeed + { _pfTotalItems = Nothing + , _pfEtag = Nothing + , _pfNextPageToken = Nothing + , _pfKind = "plus#peopleFeed" + , _pfItems = Nothing + , _pfSelfLink = Nothing + , _pfTitle = Nothing + } + +-- | The total number of people available in this list. The number of people +-- in a response might be smaller due to paging. This might not be set for +-- all collections. +pfTotalItems :: Lens' PeopleFeed (Maybe Int32) +pfTotalItems + = lens _pfTotalItems (\ s a -> s{_pfTotalItems = a}) + +-- | ETag of this response for caching purposes. +pfEtag :: Lens' PeopleFeed (Maybe Text) +pfEtag = lens _pfEtag (\ s a -> s{_pfEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +pfNextPageToken :: Lens' PeopleFeed (Maybe Text) +pfNextPageToken + = lens _pfNextPageToken + (\ s a -> s{_pfNextPageToken = a}) + +-- | Identifies this resource as a collection of people. Value: +-- \"plus#peopleFeed\". +pfKind :: Lens' PeopleFeed Text +pfKind = lens _pfKind (\ s a -> s{_pfKind = a}) + +-- | The people in this page of results. Each item includes the id, +-- displayName, image, and url for the person. To retrieve additional +-- profile data, see the people.get method. +pfItems :: Lens' PeopleFeed [Maybe Person] +pfItems + = lens _pfItems (\ s a -> s{_pfItems = a}) . _Default + . _Coerce + +-- | Link to this resource. +pfSelfLink :: Lens' PeopleFeed (Maybe Text) +pfSelfLink + = lens _pfSelfLink (\ s a -> s{_pfSelfLink = a}) + +-- | The title of this collection of people. +pfTitle :: Lens' PeopleFeed (Maybe Text) +pfTitle = lens _pfTitle (\ s a -> s{_pfTitle = a}) + +instance FromJSON PeopleFeed where + parseJSON + = withObject "PeopleFeed" + (\ o -> + PeopleFeed <$> + (o .:? "totalItems") <*> (o .:? "etag") <*> + (o .:? "nextPageToken") + <*> (o .:? "kind" .!= "plus#peopleFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "title")) + +instance ToJSON PeopleFeed where + toJSON PeopleFeed{..} + = object + (catMaybes + [("totalItems" .=) <$> _pfTotalItems, + ("etag" .=) <$> _pfEtag, + ("nextPageToken" .=) <$> _pfNextPageToken, + Just ("kind" .= _pfKind), ("items" .=) <$> _pfItems, + ("selfLink" .=) <$> _pfSelfLink, + ("title" .=) <$> _pfTitle]) + +-- +-- /See:/ 'itemScope' smart constructor. +data ItemScope = ItemScope + { _isGivenName :: !(Maybe Text) + , _isContentSize :: !(Maybe Text) + , _isThumbnail :: !(Maybe (Maybe ItemScope)) + , _isTickerSymbol :: !(Maybe Text) + , _isHeight :: !(Maybe Text) + , _isThumbnailUrl :: !(Maybe Text) + , _isImage :: !(Maybe Text) + , _isStreetAddress :: !(Maybe Text) + , _isWorstRating :: !(Maybe Text) + , _isLocation :: !(Maybe (Maybe ItemScope)) + , _isAttendees :: !(Maybe [Maybe ItemScope]) + , _isText :: !(Maybe Text) + , _isKind :: !Text + , _isLatitude :: !(Maybe Double) + , _isPostalCode :: !(Maybe Text) + , _isEndDate :: !(Maybe Text) + , _isAssociatedMedia :: !(Maybe [Maybe ItemScope]) + , _isPlayerType :: !(Maybe Text) + , _isUrl :: !(Maybe Text) + , _isWidth :: !(Maybe Text) + , _isCaption :: !(Maybe Text) + , _isAddress :: !(Maybe (Maybe ItemScope)) + , _isAddressCountry :: !(Maybe Text) + , _isPostOfficeBoxNumber :: !(Maybe Text) + , _isAdditionalName :: !(Maybe [Text]) + , _isFamilyName :: !(Maybe Text) + , _isDateCreated :: !(Maybe Text) + , _isRatingValue :: !(Maybe Text) + , _isDatePublished :: !(Maybe Text) + , _isStartDate :: !(Maybe Text) + , _isGender :: !(Maybe Text) + , _isName :: !(Maybe Text) + , _isBestRating :: !(Maybe Text) + , _isAddressLocality :: !(Maybe Text) + , _isPartOfTVSeries :: !(Maybe (Maybe ItemScope)) + , _isContentUrl :: !(Maybe Text) + , _isByArtist :: !(Maybe (Maybe ItemScope)) + , _isAbout :: !(Maybe (Maybe ItemScope)) + , _isReviewRating :: !(Maybe (Maybe ItemScope)) + , _isDateModified :: !(Maybe Text) + , _isAuthor :: !(Maybe [Maybe ItemScope]) + , _isGeo :: !(Maybe (Maybe ItemScope)) + , _isId :: !(Maybe Text) + , _isPerformers :: !(Maybe [Maybe ItemScope]) + , _isAttendeeCount :: !(Maybe Int32) + , _isInAlbum :: !(Maybe (Maybe ItemScope)) + , _isEmbedUrl :: !(Maybe Text) + , _isType :: !(Maybe Text) + , _isContributor :: !(Maybe [Maybe ItemScope]) + , _isLongitude :: !(Maybe Double) + , _isDuration :: !(Maybe Text) + , _isAddressRegion :: !(Maybe Text) + , _isAudio :: !(Maybe (Maybe ItemScope)) + , _isDescription :: !(Maybe Text) + , _isBirthDate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ItemScope' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isGivenName' +-- +-- * 'isContentSize' +-- +-- * 'isThumbnail' +-- +-- * 'isTickerSymbol' +-- +-- * 'isHeight' +-- +-- * 'isThumbnailUrl' +-- +-- * 'isImage' +-- +-- * 'isStreetAddress' +-- +-- * 'isWorstRating' +-- +-- * 'isLocation' +-- +-- * 'isAttendees' +-- +-- * 'isText' +-- +-- * 'isKind' +-- +-- * 'isLatitude' +-- +-- * 'isPostalCode' +-- +-- * 'isEndDate' +-- +-- * 'isAssociatedMedia' +-- +-- * 'isPlayerType' +-- +-- * 'isUrl' +-- +-- * 'isWidth' +-- +-- * 'isCaption' +-- +-- * 'isAddress' +-- +-- * 'isAddressCountry' +-- +-- * 'isPostOfficeBoxNumber' +-- +-- * 'isAdditionalName' +-- +-- * 'isFamilyName' +-- +-- * 'isDateCreated' +-- +-- * 'isRatingValue' +-- +-- * 'isDatePublished' +-- +-- * 'isStartDate' +-- +-- * 'isGender' +-- +-- * 'isName' +-- +-- * 'isBestRating' +-- +-- * 'isAddressLocality' +-- +-- * 'isPartOfTVSeries' +-- +-- * 'isContentUrl' +-- +-- * 'isByArtist' +-- +-- * 'isAbout' +-- +-- * 'isReviewRating' +-- +-- * 'isDateModified' +-- +-- * 'isAuthor' +-- +-- * 'isGeo' +-- +-- * 'isId' +-- +-- * 'isPerformers' +-- +-- * 'isAttendeeCount' +-- +-- * 'isInAlbum' +-- +-- * 'isEmbedUrl' +-- +-- * 'isType' +-- +-- * 'isContributor' +-- +-- * 'isLongitude' +-- +-- * 'isDuration' +-- +-- * 'isAddressRegion' +-- +-- * 'isAudio' +-- +-- * 'isDescription' +-- +-- * 'isBirthDate' +itemScope + :: ItemScope +itemScope = + ItemScope + { _isGivenName = Nothing + , _isContentSize = Nothing + , _isThumbnail = Nothing + , _isTickerSymbol = Nothing + , _isHeight = Nothing + , _isThumbnailUrl = Nothing + , _isImage = Nothing + , _isStreetAddress = Nothing + , _isWorstRating = Nothing + , _isLocation = Nothing + , _isAttendees = Nothing + , _isText = Nothing + , _isKind = "plus#itemScope" + , _isLatitude = Nothing + , _isPostalCode = Nothing + , _isEndDate = Nothing + , _isAssociatedMedia = Nothing + , _isPlayerType = Nothing + , _isUrl = Nothing + , _isWidth = Nothing + , _isCaption = Nothing + , _isAddress = Nothing + , _isAddressCountry = Nothing + , _isPostOfficeBoxNumber = Nothing + , _isAdditionalName = Nothing + , _isFamilyName = Nothing + , _isDateCreated = Nothing + , _isRatingValue = Nothing + , _isDatePublished = Nothing + , _isStartDate = Nothing + , _isGender = Nothing + , _isName = Nothing + , _isBestRating = Nothing + , _isAddressLocality = Nothing + , _isPartOfTVSeries = Nothing + , _isContentUrl = Nothing + , _isByArtist = Nothing + , _isAbout = Nothing + , _isReviewRating = Nothing + , _isDateModified = Nothing + , _isAuthor = Nothing + , _isGeo = Nothing + , _isId = Nothing + , _isPerformers = Nothing + , _isAttendeeCount = Nothing + , _isInAlbum = Nothing + , _isEmbedUrl = Nothing + , _isType = Nothing + , _isContributor = Nothing + , _isLongitude = Nothing + , _isDuration = Nothing + , _isAddressRegion = Nothing + , _isAudio = Nothing + , _isDescription = Nothing + , _isBirthDate = Nothing + } + +-- | Given name. This property can be used with familyName instead of the +-- name property. +isGivenName :: Lens' ItemScope (Maybe Text) +isGivenName + = lens _isGivenName (\ s a -> s{_isGivenName = a}) + +-- | File size in (mega\/kilo) bytes. +isContentSize :: Lens' ItemScope (Maybe Text) +isContentSize + = lens _isContentSize + (\ s a -> s{_isContentSize = a}) + +-- | Thumbnail image for an image or video. +isThumbnail :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isThumbnail + = lens _isThumbnail (\ s a -> s{_isThumbnail = a}) + +-- | The exchange traded instrument associated with a Corporation object. The +-- tickerSymbol is expressed as an exchange and an instrument name +-- separated by a space character. For the exchange component of the +-- tickerSymbol attribute, we recommend using the controlled vocabulary of +-- Market Identifier Codes (MIC) specified in ISO15022. +isTickerSymbol :: Lens' ItemScope (Maybe Text) +isTickerSymbol + = lens _isTickerSymbol + (\ s a -> s{_isTickerSymbol = a}) + +-- | The height of the media object. +isHeight :: Lens' ItemScope (Maybe Text) +isHeight = lens _isHeight (\ s a -> s{_isHeight = a}) + +-- | A URL to a thumbnail image that represents this result. +isThumbnailUrl :: Lens' ItemScope (Maybe Text) +isThumbnailUrl + = lens _isThumbnailUrl + (\ s a -> s{_isThumbnailUrl = a}) + +-- | A URL to the image that represents this result. For example, if a user +-- writes a review of a restaurant and attaches a photo of their meal, you +-- might use that photo as the result.image. +isImage :: Lens' ItemScope (Maybe Text) +isImage = lens _isImage (\ s a -> s{_isImage = a}) + +-- | Street address. +isStreetAddress :: Lens' ItemScope (Maybe Text) +isStreetAddress + = lens _isStreetAddress + (\ s a -> s{_isStreetAddress = a}) + +-- | Worst possible rating value that a result might obtain. This property +-- defines the lower bound for the ratingValue. +isWorstRating :: Lens' ItemScope (Maybe Text) +isWorstRating + = lens _isWorstRating + (\ s a -> s{_isWorstRating = a}) + +-- | The location of the event or organization. +isLocation :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isLocation + = lens _isLocation (\ s a -> s{_isLocation = a}) + +-- | A person attending the event. +isAttendees :: Lens' ItemScope [Maybe ItemScope] +isAttendees + = lens _isAttendees (\ s a -> s{_isAttendees = a}) . + _Default + . _Coerce + +-- | The text that is the result of the app activity. For example, if a user +-- leaves a review of a restaurant, this might be the text of the review. +isText :: Lens' ItemScope (Maybe Text) +isText = lens _isText (\ s a -> s{_isText = a}) + +-- | Identifies this resource as an itemScope. +isKind :: Lens' ItemScope Text +isKind = lens _isKind (\ s a -> s{_isKind = a}) + +-- | Latitude. +isLatitude :: Lens' ItemScope (Maybe Double) +isLatitude + = lens _isLatitude (\ s a -> s{_isLatitude = a}) + +-- | Postal code. +isPostalCode :: Lens' ItemScope (Maybe Text) +isPostalCode + = lens _isPostalCode (\ s a -> s{_isPostalCode = a}) + +-- | The end date and time of the event (in ISO 8601 date format). +isEndDate :: Lens' ItemScope (Maybe Text) +isEndDate + = lens _isEndDate (\ s a -> s{_isEndDate = a}) + +-- | The encoding. +isAssociatedMedia :: Lens' ItemScope [Maybe ItemScope] +isAssociatedMedia + = lens _isAssociatedMedia + (\ s a -> s{_isAssociatedMedia = a}) + . _Default + . _Coerce + +-- | Player type that is required. For example: Flash or Silverlight. +isPlayerType :: Lens' ItemScope (Maybe Text) +isPlayerType + = lens _isPlayerType (\ s a -> s{_isPlayerType = a}) + +-- | The URL that points to the result object. For example, a permalink +-- directly to a restaurant reviewer\'s comment. +isUrl :: Lens' ItemScope (Maybe Text) +isUrl = lens _isUrl (\ s a -> s{_isUrl = a}) + +-- | The width of the media object. +isWidth :: Lens' ItemScope (Maybe Text) +isWidth = lens _isWidth (\ s a -> s{_isWidth = a}) + +-- | The caption for this object. +isCaption :: Lens' ItemScope (Maybe Text) +isCaption + = lens _isCaption (\ s a -> s{_isCaption = a}) + +-- | Postal address. +isAddress :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isAddress + = lens _isAddress (\ s a -> s{_isAddress = a}) + +-- | Address country. +isAddressCountry :: Lens' ItemScope (Maybe Text) +isAddressCountry + = lens _isAddressCountry + (\ s a -> s{_isAddressCountry = a}) + +-- | Post office box number. +isPostOfficeBoxNumber :: Lens' ItemScope (Maybe Text) +isPostOfficeBoxNumber + = lens _isPostOfficeBoxNumber + (\ s a -> s{_isPostOfficeBoxNumber = a}) + +-- | An additional name for a Person, can be used for a middle name. +isAdditionalName :: Lens' ItemScope [Text] +isAdditionalName + = lens _isAdditionalName + (\ s a -> s{_isAdditionalName = a}) + . _Default + . _Coerce + +-- | Family name. This property can be used with givenName instead of the +-- name property. +isFamilyName :: Lens' ItemScope (Maybe Text) +isFamilyName + = lens _isFamilyName (\ s a -> s{_isFamilyName = a}) + +-- | The date the result was created such as the date that a review was first +-- created. +isDateCreated :: Lens' ItemScope (Maybe Text) +isDateCreated + = lens _isDateCreated + (\ s a -> s{_isDateCreated = a}) + +-- | Rating value. +isRatingValue :: Lens' ItemScope (Maybe Text) +isRatingValue + = lens _isRatingValue + (\ s a -> s{_isRatingValue = a}) + +-- | The initial date that the result was published. For example, a user +-- writes a comment on a blog, which has a result.dateCreated of when they +-- submit it. If the blog users comment moderation, the +-- result.datePublished value would match the date when the owner approved +-- the message. +isDatePublished :: Lens' ItemScope (Maybe Text) +isDatePublished + = lens _isDatePublished + (\ s a -> s{_isDatePublished = a}) + +-- | The start date and time of the event (in ISO 8601 date format). +isStartDate :: Lens' ItemScope (Maybe Text) +isStartDate + = lens _isStartDate (\ s a -> s{_isStartDate = a}) + +-- | Gender of the person. +isGender :: Lens' ItemScope (Maybe Text) +isGender = lens _isGender (\ s a -> s{_isGender = a}) + +-- | The name of the result. In the example of a restaurant review, this +-- might be the summary the user gave their review such as \"Great +-- ambiance, but overpriced.\" +isName :: Lens' ItemScope (Maybe Text) +isName = lens _isName (\ s a -> s{_isName = a}) + +-- | Best possible rating value that a result might obtain. This property +-- defines the upper bound for the ratingValue. For example, you might have +-- a 5 star rating scale, you would provide 5 as the value for this +-- property. +isBestRating :: Lens' ItemScope (Maybe Text) +isBestRating + = lens _isBestRating (\ s a -> s{_isBestRating = a}) + +-- | Address locality. +isAddressLocality :: Lens' ItemScope (Maybe Text) +isAddressLocality + = lens _isAddressLocality + (\ s a -> s{_isAddressLocality = a}) + +-- | Property of http:\/\/schema.org\/TVEpisode indicating which series the +-- episode belongs to. +isPartOfTVSeries :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isPartOfTVSeries + = lens _isPartOfTVSeries + (\ s a -> s{_isPartOfTVSeries = a}) + +-- | Actual bytes of the media object, for example the image file or video +-- file. +isContentUrl :: Lens' ItemScope (Maybe Text) +isContentUrl + = lens _isContentUrl (\ s a -> s{_isContentUrl = a}) + +-- | From http:\/\/schema.org\/MusicRecording, the artist that performed this +-- recording. +isByArtist :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isByArtist + = lens _isByArtist (\ s a -> s{_isByArtist = a}) + +-- | The subject matter of the content. +isAbout :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isAbout = lens _isAbout (\ s a -> s{_isAbout = a}) + +-- | Review rating. +isReviewRating :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isReviewRating + = lens _isReviewRating + (\ s a -> s{_isReviewRating = a}) + +-- | The date the result was last modified such as the date that a review was +-- last edited. +isDateModified :: Lens' ItemScope (Maybe Text) +isDateModified + = lens _isDateModified + (\ s a -> s{_isDateModified = a}) + +-- | The person or persons who created this result. In the example of +-- restaurant reviews, this might be the reviewer\'s name. +isAuthor :: Lens' ItemScope [Maybe ItemScope] +isAuthor + = lens _isAuthor (\ s a -> s{_isAuthor = a}) . + _Default + . _Coerce + +-- | Geo coordinates. +isGeo :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isGeo = lens _isGeo (\ s a -> s{_isGeo = a}) + +-- | An identifier for the object. Your app can choose how to identify +-- objects. The object.id is required if you are writing an action that +-- does not have a corresponding web page or object.url property. +isId :: Lens' ItemScope (Maybe Text) +isId = lens _isId (\ s a -> s{_isId = a}) + +-- | The main performer or performers of the event-for example, a presenter, +-- musician, or actor. +isPerformers :: Lens' ItemScope [Maybe ItemScope] +isPerformers + = lens _isPerformers (\ s a -> s{_isPerformers = a}) + . _Default + . _Coerce + +-- | Number of attendees. +isAttendeeCount :: Lens' ItemScope (Maybe Int32) +isAttendeeCount + = lens _isAttendeeCount + (\ s a -> s{_isAttendeeCount = a}) + +-- | From http:\/\/schema.org\/MusicRecording, which album a song is in. +isInAlbum :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isInAlbum + = lens _isInAlbum (\ s a -> s{_isInAlbum = a}) + +-- | A URL pointing to a player for a specific video. In general, this is the +-- information in the src element of an embed tag and should not be the +-- same as the content of the loc tag. +isEmbedUrl :: Lens' ItemScope (Maybe Text) +isEmbedUrl + = lens _isEmbedUrl (\ s a -> s{_isEmbedUrl = a}) + +-- | The schema.org URL that best describes the referenced object and matches +-- the type of moment. +isType :: Lens' ItemScope (Maybe Text) +isType = lens _isType (\ s a -> s{_isType = a}) + +-- | A list of contributors to this result. +isContributor :: Lens' ItemScope [Maybe ItemScope] +isContributor + = lens _isContributor + (\ s a -> s{_isContributor = a}) + . _Default + . _Coerce + +-- | Longitude. +isLongitude :: Lens' ItemScope (Maybe Double) +isLongitude + = lens _isLongitude (\ s a -> s{_isLongitude = a}) + +-- | The duration of the item (movie, audio recording, event, etc.) in ISO +-- 8601 date format. +isDuration :: Lens' ItemScope (Maybe Text) +isDuration + = lens _isDuration (\ s a -> s{_isDuration = a}) + +-- | Address region. +isAddressRegion :: Lens' ItemScope (Maybe Text) +isAddressRegion + = lens _isAddressRegion + (\ s a -> s{_isAddressRegion = a}) + +-- | From http:\/\/schema.org\/MusicRecording, the audio file. +isAudio :: Lens' ItemScope (Maybe (Maybe ItemScope)) +isAudio = lens _isAudio (\ s a -> s{_isAudio = a}) + +-- | The string that describes the content of the result. +isDescription :: Lens' ItemScope (Maybe Text) +isDescription + = lens _isDescription + (\ s a -> s{_isDescription = a}) + +-- | Date of birth. +isBirthDate :: Lens' ItemScope (Maybe Text) +isBirthDate + = lens _isBirthDate (\ s a -> s{_isBirthDate = a}) + +instance FromJSON ItemScope where + parseJSON + = withObject "ItemScope" + (\ o -> + ItemScope <$> + (o .:? "givenName") <*> (o .:? "contentSize") <*> + (o .:? "thumbnail") + <*> (o .:? "tickerSymbol") + <*> (o .:? "height") + <*> (o .:? "thumbnailUrl") + <*> (o .:? "image") + <*> (o .:? "streetAddress") + <*> (o .:? "worstRating") + <*> (o .:? "location") + <*> (o .:? "attendees" .!= mempty) + <*> (o .:? "text") + <*> (o .:? "kind" .!= "plus#itemScope") + <*> (o .:? "latitude") + <*> (o .:? "postalCode") + <*> (o .:? "endDate") + <*> (o .:? "associated_media" .!= mempty) + <*> (o .:? "playerType") + <*> (o .:? "url") + <*> (o .:? "width") + <*> (o .:? "caption") + <*> (o .:? "address") + <*> (o .:? "addressCountry") + <*> (o .:? "postOfficeBoxNumber") + <*> (o .:? "additionalName" .!= mempty) + <*> (o .:? "familyName") + <*> (o .:? "dateCreated") + <*> (o .:? "ratingValue") + <*> (o .:? "datePublished") + <*> (o .:? "startDate") + <*> (o .:? "gender") + <*> (o .:? "name") + <*> (o .:? "bestRating") + <*> (o .:? "addressLocality") + <*> (o .:? "partOfTVSeries") + <*> (o .:? "contentUrl") + <*> (o .:? "byArtist") + <*> (o .:? "about") + <*> (o .:? "reviewRating") + <*> (o .:? "dateModified") + <*> (o .:? "author" .!= mempty) + <*> (o .:? "geo") + <*> (o .:? "id") + <*> (o .:? "performers" .!= mempty) + <*> (o .:? "attendeeCount") + <*> (o .:? "inAlbum") + <*> (o .:? "embedUrl") + <*> (o .:? "type") + <*> (o .:? "contributor" .!= mempty) + <*> (o .:? "longitude") + <*> (o .:? "duration") + <*> (o .:? "addressRegion") + <*> (o .:? "audio") + <*> (o .:? "description") + <*> (o .:? "birthDate")) + +instance ToJSON ItemScope where + toJSON ItemScope{..} + = object + (catMaybes + [("givenName" .=) <$> _isGivenName, + ("contentSize" .=) <$> _isContentSize, + ("thumbnail" .=) <$> _isThumbnail, + ("tickerSymbol" .=) <$> _isTickerSymbol, + ("height" .=) <$> _isHeight, + ("thumbnailUrl" .=) <$> _isThumbnailUrl, + ("image" .=) <$> _isImage, + ("streetAddress" .=) <$> _isStreetAddress, + ("worstRating" .=) <$> _isWorstRating, + ("location" .=) <$> _isLocation, + ("attendees" .=) <$> _isAttendees, + ("text" .=) <$> _isText, Just ("kind" .= _isKind), + ("latitude" .=) <$> _isLatitude, + ("postalCode" .=) <$> _isPostalCode, + ("endDate" .=) <$> _isEndDate, + ("associated_media" .=) <$> _isAssociatedMedia, + ("playerType" .=) <$> _isPlayerType, + ("url" .=) <$> _isUrl, ("width" .=) <$> _isWidth, + ("caption" .=) <$> _isCaption, + ("address" .=) <$> _isAddress, + ("addressCountry" .=) <$> _isAddressCountry, + ("postOfficeBoxNumber" .=) <$> + _isPostOfficeBoxNumber, + ("additionalName" .=) <$> _isAdditionalName, + ("familyName" .=) <$> _isFamilyName, + ("dateCreated" .=) <$> _isDateCreated, + ("ratingValue" .=) <$> _isRatingValue, + ("datePublished" .=) <$> _isDatePublished, + ("startDate" .=) <$> _isStartDate, + ("gender" .=) <$> _isGender, ("name" .=) <$> _isName, + ("bestRating" .=) <$> _isBestRating, + ("addressLocality" .=) <$> _isAddressLocality, + ("partOfTVSeries" .=) <$> _isPartOfTVSeries, + ("contentUrl" .=) <$> _isContentUrl, + ("byArtist" .=) <$> _isByArtist, + ("about" .=) <$> _isAbout, + ("reviewRating" .=) <$> _isReviewRating, + ("dateModified" .=) <$> _isDateModified, + ("author" .=) <$> _isAuthor, ("geo" .=) <$> _isGeo, + ("id" .=) <$> _isId, + ("performers" .=) <$> _isPerformers, + ("attendeeCount" .=) <$> _isAttendeeCount, + ("inAlbum" .=) <$> _isInAlbum, + ("embedUrl" .=) <$> _isEmbedUrl, + ("type" .=) <$> _isType, + ("contributor" .=) <$> _isContributor, + ("longitude" .=) <$> _isLongitude, + ("duration" .=) <$> _isDuration, + ("addressRegion" .=) <$> _isAddressRegion, + ("audio" .=) <$> _isAudio, + ("description" .=) <$> _isDescription, + ("birthDate" .=) <$> _isBirthDate]) + +-- +-- /See:/ 'activityFeed' smart constructor. +data ActivityFeed = ActivityFeed + { _afEtag :: !(Maybe Text) + , _afNextPageToken :: !(Maybe Text) + , _afNextLink :: !(Maybe Text) + , _afKind :: !Text + , _afItems :: !(Maybe [Maybe Activity]) + , _afSelfLink :: !(Maybe Text) + , _afId :: !(Maybe Text) + , _afUpdated :: !(Maybe UTCTime) + , _afTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'afEtag' +-- +-- * 'afNextPageToken' +-- +-- * 'afNextLink' +-- +-- * 'afKind' +-- +-- * 'afItems' +-- +-- * 'afSelfLink' +-- +-- * 'afId' +-- +-- * 'afUpdated' +-- +-- * 'afTitle' +activityFeed + :: ActivityFeed +activityFeed = + ActivityFeed + { _afEtag = Nothing + , _afNextPageToken = Nothing + , _afNextLink = Nothing + , _afKind = "plus#activityFeed" + , _afItems = Nothing + , _afSelfLink = Nothing + , _afId = Nothing + , _afUpdated = Nothing + , _afTitle = Nothing + } + +-- | ETag of this response for caching purposes. +afEtag :: Lens' ActivityFeed (Maybe Text) +afEtag = lens _afEtag (\ s a -> s{_afEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +afNextPageToken :: Lens' ActivityFeed (Maybe Text) +afNextPageToken + = lens _afNextPageToken + (\ s a -> s{_afNextPageToken = a}) + +-- | Link to the next page of activities. +afNextLink :: Lens' ActivityFeed (Maybe Text) +afNextLink + = lens _afNextLink (\ s a -> s{_afNextLink = a}) + +-- | Identifies this resource as a collection of activities. Value: +-- \"plus#activityFeed\". +afKind :: Lens' ActivityFeed Text +afKind = lens _afKind (\ s a -> s{_afKind = a}) + +-- | The activities in this page of results. +afItems :: Lens' ActivityFeed [Maybe Activity] +afItems + = lens _afItems (\ s a -> s{_afItems = a}) . _Default + . _Coerce + +-- | Link to this activity resource. +afSelfLink :: Lens' ActivityFeed (Maybe Text) +afSelfLink + = lens _afSelfLink (\ s a -> s{_afSelfLink = a}) + +-- | The ID of this collection of activities. Deprecated. +afId :: Lens' ActivityFeed (Maybe Text) +afId = lens _afId (\ s a -> s{_afId = a}) + +-- | The time at which this collection of activities was last updated. +-- Formatted as an RFC 3339 timestamp. +afUpdated :: Lens' ActivityFeed (Maybe UTCTime) +afUpdated + = lens _afUpdated (\ s a -> s{_afUpdated = a}) + +-- | The title of this collection of activities, which is a truncated portion +-- of the content. +afTitle :: Lens' ActivityFeed (Maybe Text) +afTitle = lens _afTitle (\ s a -> s{_afTitle = a}) + +instance FromJSON ActivityFeed where + parseJSON + = withObject "ActivityFeed" + (\ o -> + ActivityFeed <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#activityFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON ActivityFeed where + toJSON ActivityFeed{..} + = object + (catMaybes + [("etag" .=) <$> _afEtag, + ("nextPageToken" .=) <$> _afNextPageToken, + ("nextLink" .=) <$> _afNextLink, + Just ("kind" .= _afKind), ("items" .=) <$> _afItems, + ("selfLink" .=) <$> _afSelfLink, ("id" .=) <$> _afId, + ("updated" .=) <$> _afUpdated, + ("title" .=) <$> _afTitle]) + +-- +-- /See:/ 'plusACLentryResource' smart constructor. +data PlusACLentryResource = PlusACLentryResource + { _parDisplayName :: !(Maybe Text) + , _parId :: !(Maybe Text) + , _parType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlusACLentryResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'parDisplayName' +-- +-- * 'parId' +-- +-- * 'parType' +plusACLentryResource + :: PlusACLentryResource +plusACLentryResource = + PlusACLentryResource + { _parDisplayName = Nothing + , _parId = Nothing + , _parType = Nothing + } + +-- | A descriptive name for this entry. Suitable for display. +parDisplayName :: Lens' PlusACLentryResource (Maybe Text) +parDisplayName + = lens _parDisplayName + (\ s a -> s{_parDisplayName = a}) + +-- | The ID of the entry. For entries of type \"person\" or \"circle\", this +-- is the ID of the resource. For other types, this property is not set. +parId :: Lens' PlusACLentryResource (Maybe Text) +parId = lens _parId (\ s a -> s{_parId = a}) + +-- | The type of entry describing to whom access is granted. Possible values +-- are: - \"person\" - Access to an individual. - \"circle\" - Access to +-- members of a circle. - \"myCircles\" - Access to members of all the +-- person\'s circles. - \"extendedCircles\" - Access to members of all the +-- person\'s circles, plus all of the people in their circles. - \"domain\" +-- - Access to members of the person\'s Google Apps domain. - \"public\" - +-- Access to anyone on the web. +parType :: Lens' PlusACLentryResource (Maybe Text) +parType = lens _parType (\ s a -> s{_parType = a}) + +instance FromJSON PlusACLentryResource where + parseJSON + = withObject "PlusACLentryResource" + (\ o -> + PlusACLentryResource <$> + (o .:? "displayName") <*> (o .:? "id") <*> + (o .:? "type")) + +instance ToJSON PlusACLentryResource where + toJSON PlusACLentryResource{..} + = object + (catMaybes + [("displayName" .=) <$> _parDisplayName, + ("id" .=) <$> _parId, ("type" .=) <$> _parType]) + +-- +-- /See:/ 'activity' smart constructor. +data Activity = Activity + { _aAccess :: !(Maybe (Maybe ACL)) + , _aPlaceName :: !(Maybe Text) + , _aEtag :: !(Maybe Text) + , _aAnnotation :: !(Maybe Text) + , _aLocation :: !(Maybe (Maybe Place)) + , _aGeocode :: !(Maybe Text) + , _aKind :: !Text + , _aRadius :: !(Maybe Text) + , _aPublished :: !(Maybe UTCTime) + , _aUrl :: !(Maybe Text) + , _aActor :: !(Maybe ActivityActor) + , _aAddress :: !(Maybe Text) + , _aObject :: !(Maybe ActivityObject) + , _aId :: !(Maybe Text) + , _aUpdated :: !(Maybe UTCTime) + , _aTitle :: !(Maybe Text) + , _aVerb :: !(Maybe Text) + , _aCrosspostSource :: !(Maybe Text) + , _aPlaceId :: !(Maybe Text) + , _aProvider :: !(Maybe ActivityProvider) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aAccess' +-- +-- * 'aPlaceName' +-- +-- * 'aEtag' +-- +-- * 'aAnnotation' +-- +-- * 'aLocation' +-- +-- * 'aGeocode' +-- +-- * 'aKind' +-- +-- * 'aRadius' +-- +-- * 'aPublished' +-- +-- * 'aUrl' +-- +-- * 'aActor' +-- +-- * 'aAddress' +-- +-- * 'aObject' +-- +-- * 'aId' +-- +-- * 'aUpdated' +-- +-- * 'aTitle' +-- +-- * 'aVerb' +-- +-- * 'aCrosspostSource' +-- +-- * 'aPlaceId' +-- +-- * 'aProvider' +activity + :: Activity +activity = + Activity + { _aAccess = Nothing + , _aPlaceName = Nothing + , _aEtag = Nothing + , _aAnnotation = Nothing + , _aLocation = Nothing + , _aGeocode = Nothing + , _aKind = "plus#activity" + , _aRadius = Nothing + , _aPublished = Nothing + , _aUrl = Nothing + , _aActor = Nothing + , _aAddress = Nothing + , _aObject = Nothing + , _aId = Nothing + , _aUpdated = Nothing + , _aTitle = Nothing + , _aVerb = Nothing + , _aCrosspostSource = Nothing + , _aPlaceId = Nothing + , _aProvider = Nothing + } + +-- | Identifies who has access to see this activity. +aAccess :: Lens' Activity (Maybe (Maybe ACL)) +aAccess = lens _aAccess (\ s a -> s{_aAccess = a}) + +-- | Name of the place where this activity occurred. +aPlaceName :: Lens' Activity (Maybe Text) +aPlaceName + = lens _aPlaceName (\ s a -> s{_aPlaceName = a}) + +-- | ETag of this response for caching purposes. +aEtag :: Lens' Activity (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | Additional content added by the person who shared this activity, +-- applicable only when resharing an activity. +aAnnotation :: Lens' Activity (Maybe Text) +aAnnotation + = lens _aAnnotation (\ s a -> s{_aAnnotation = a}) + +-- | The location where this activity occurred. +aLocation :: Lens' Activity (Maybe (Maybe Place)) +aLocation + = lens _aLocation (\ s a -> s{_aLocation = a}) + +-- | Latitude and longitude where this activity occurred. Format is latitude +-- followed by longitude, space separated. +aGeocode :: Lens' Activity (Maybe Text) +aGeocode = lens _aGeocode (\ s a -> s{_aGeocode = a}) + +-- | Identifies this resource as an activity. Value: \"plus#activity\". +aKind :: Lens' Activity Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | Radius, in meters, of the region where this activity occurred, centered +-- at the latitude and longitude identified in geocode. +aRadius :: Lens' Activity (Maybe Text) +aRadius = lens _aRadius (\ s a -> s{_aRadius = a}) + +-- | The time at which this activity was initially published. Formatted as an +-- RFC 3339 timestamp. +aPublished :: Lens' Activity (Maybe UTCTime) +aPublished + = lens _aPublished (\ s a -> s{_aPublished = a}) + +-- | The link to this activity. +aUrl :: Lens' Activity (Maybe Text) +aUrl = lens _aUrl (\ s a -> s{_aUrl = a}) + +-- | The person who performed this activity. +aActor :: Lens' Activity (Maybe ActivityActor) +aActor = lens _aActor (\ s a -> s{_aActor = a}) + +-- | Street address where this activity occurred. +aAddress :: Lens' Activity (Maybe Text) +aAddress = lens _aAddress (\ s a -> s{_aAddress = a}) + +-- | The object of this activity. +aObject :: Lens' Activity (Maybe ActivityObject) +aObject = lens _aObject (\ s a -> s{_aObject = a}) + +-- | The ID of this activity. +aId :: Lens' Activity (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | The time at which this activity was last updated. Formatted as an RFC +-- 3339 timestamp. +aUpdated :: Lens' Activity (Maybe UTCTime) +aUpdated = lens _aUpdated (\ s a -> s{_aUpdated = a}) + +-- | Title of this activity. +aTitle :: Lens' Activity (Maybe Text) +aTitle = lens _aTitle (\ s a -> s{_aTitle = a}) + +-- | This activity\'s verb, which indicates the action that was performed. +-- Possible values include, but are not limited to, the following values: - +-- \"post\" - Publish content to the stream. - \"share\" - Reshare an +-- activity. +aVerb :: Lens' Activity (Maybe Text) +aVerb = lens _aVerb (\ s a -> s{_aVerb = a}) + +-- | If this activity is a crosspost from another system, this property +-- specifies the ID of the original activity. +aCrosspostSource :: Lens' Activity (Maybe Text) +aCrosspostSource + = lens _aCrosspostSource + (\ s a -> s{_aCrosspostSource = a}) + +-- | ID of the place where this activity occurred. +aPlaceId :: Lens' Activity (Maybe Text) +aPlaceId = lens _aPlaceId (\ s a -> s{_aPlaceId = a}) + +-- | The service provider that initially published this activity. +aProvider :: Lens' Activity (Maybe ActivityProvider) +aProvider + = lens _aProvider (\ s a -> s{_aProvider = a}) + +instance FromJSON Activity where + parseJSON + = withObject "Activity" + (\ o -> + Activity <$> + (o .:? "access") <*> (o .:? "placeName") <*> + (o .:? "etag") + <*> (o .:? "annotation") + <*> (o .:? "location") + <*> (o .:? "geocode") + <*> (o .:? "kind" .!= "plus#activity") + <*> (o .:? "radius") + <*> (o .:? "published") + <*> (o .:? "url") + <*> (o .:? "actor") + <*> (o .:? "address") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title") + <*> (o .:? "verb") + <*> (o .:? "crosspostSource") + <*> (o .:? "placeId") + <*> (o .:? "provider")) + +instance ToJSON Activity where + toJSON Activity{..} + = object + (catMaybes + [("access" .=) <$> _aAccess, + ("placeName" .=) <$> _aPlaceName, + ("etag" .=) <$> _aEtag, + ("annotation" .=) <$> _aAnnotation, + ("location" .=) <$> _aLocation, + ("geocode" .=) <$> _aGeocode, + Just ("kind" .= _aKind), ("radius" .=) <$> _aRadius, + ("published" .=) <$> _aPublished, + ("url" .=) <$> _aUrl, ("actor" .=) <$> _aActor, + ("address" .=) <$> _aAddress, + ("object" .=) <$> _aObject, ("id" .=) <$> _aId, + ("updated" .=) <$> _aUpdated, + ("title" .=) <$> _aTitle, ("verb" .=) <$> _aVerb, + ("crosspostSource" .=) <$> _aCrosspostSource, + ("placeId" .=) <$> _aPlaceId, + ("provider" .=) <$> _aProvider]) + +-- +-- /See:/ 'place' smart constructor. +data Place = Place + { _plaKind :: !Text + , _plaAddress :: !(Maybe PlaceAddress) + , _plaDisplayName :: !(Maybe Text) + , _plaId :: !(Maybe Text) + , _plaPosition :: !(Maybe PlacePosition) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Place' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaKind' +-- +-- * 'plaAddress' +-- +-- * 'plaDisplayName' +-- +-- * 'plaId' +-- +-- * 'plaPosition' +place + :: Place +place = + Place + { _plaKind = "plus#place" + , _plaAddress = Nothing + , _plaDisplayName = Nothing + , _plaId = Nothing + , _plaPosition = Nothing + } + +-- | Identifies this resource as a place. Value: \"plus#place\". +plaKind :: Lens' Place Text +plaKind = lens _plaKind (\ s a -> s{_plaKind = a}) + +-- | The physical address of the place. +plaAddress :: Lens' Place (Maybe PlaceAddress) +plaAddress + = lens _plaAddress (\ s a -> s{_plaAddress = a}) + +-- | The display name of the place. +plaDisplayName :: Lens' Place (Maybe Text) +plaDisplayName + = lens _plaDisplayName + (\ s a -> s{_plaDisplayName = a}) + +-- | The id of the place. +plaId :: Lens' Place (Maybe Text) +plaId = lens _plaId (\ s a -> s{_plaId = a}) + +-- | The position of the place. +plaPosition :: Lens' Place (Maybe PlacePosition) +plaPosition + = lens _plaPosition (\ s a -> s{_plaPosition = a}) + +instance FromJSON Place where + parseJSON + = withObject "Place" + (\ o -> + Place <$> + (o .:? "kind" .!= "plus#place") <*> (o .:? "address") + <*> (o .:? "displayName") + <*> (o .:? "id") + <*> (o .:? "position")) + +instance ToJSON Place where + toJSON Place{..} + = object + (catMaybes + [Just ("kind" .= _plaKind), + ("address" .=) <$> _plaAddress, + ("displayName" .=) <$> _plaDisplayName, + ("id" .=) <$> _plaId, + ("position" .=) <$> _plaPosition]) + +-- +-- /See:/ 'comment' smart constructor. +data Comment = Comment + { _cEtag :: !(Maybe Text) + , _cPlusoners :: !(Maybe CommentPlusoners) + , _cKind :: !Text + , _cPublished :: !(Maybe UTCTime) + , _cActor :: !(Maybe CommentActor) + , _cSelfLink :: !(Maybe Text) + , _cObject :: !(Maybe CommentObject) + , _cId :: !(Maybe Text) + , _cUpdated :: !(Maybe UTCTime) + , _cVerb :: !Text + , _cInReplyTo :: !(Maybe [CommentInReplyToItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Comment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cEtag' +-- +-- * 'cPlusoners' +-- +-- * 'cKind' +-- +-- * 'cPublished' +-- +-- * 'cActor' +-- +-- * 'cSelfLink' +-- +-- * 'cObject' +-- +-- * 'cId' +-- +-- * 'cUpdated' +-- +-- * 'cVerb' +-- +-- * 'cInReplyTo' +comment + :: Comment +comment = + Comment + { _cEtag = Nothing + , _cPlusoners = Nothing + , _cKind = "plus#comment" + , _cPublished = Nothing + , _cActor = Nothing + , _cSelfLink = Nothing + , _cObject = Nothing + , _cId = Nothing + , _cUpdated = Nothing + , _cVerb = "post" + , _cInReplyTo = Nothing + } + +-- | ETag of this response for caching purposes. +cEtag :: Lens' Comment (Maybe Text) +cEtag = lens _cEtag (\ s a -> s{_cEtag = a}) + +-- | People who +1\'d this comment. +cPlusoners :: Lens' Comment (Maybe CommentPlusoners) +cPlusoners + = lens _cPlusoners (\ s a -> s{_cPlusoners = a}) + +-- | Identifies this resource as a comment. Value: \"plus#comment\". +cKind :: Lens' Comment Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The time at which this comment was initially published. Formatted as an +-- RFC 3339 timestamp. +cPublished :: Lens' Comment (Maybe UTCTime) +cPublished + = lens _cPublished (\ s a -> s{_cPublished = a}) + +-- | The person who posted this comment. +cActor :: Lens' Comment (Maybe CommentActor) +cActor = lens _cActor (\ s a -> s{_cActor = a}) + +-- | Link to this comment resource. +cSelfLink :: Lens' Comment (Maybe Text) +cSelfLink + = lens _cSelfLink (\ s a -> s{_cSelfLink = a}) + +-- | The object of this comment. +cObject :: Lens' Comment (Maybe CommentObject) +cObject = lens _cObject (\ s a -> s{_cObject = a}) + +-- | The ID of this comment. +cId :: Lens' Comment (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The time at which this comment was last updated. Formatted as an RFC +-- 3339 timestamp. +cUpdated :: Lens' Comment (Maybe UTCTime) +cUpdated = lens _cUpdated (\ s a -> s{_cUpdated = a}) + +-- | This comment\'s verb, indicating what action was performed. Possible +-- values are: - \"post\" - Publish content to the stream. +cVerb :: Lens' Comment Text +cVerb = lens _cVerb (\ s a -> s{_cVerb = a}) + +-- | The activity this comment replied to. +cInReplyTo :: Lens' Comment [CommentInReplyToItem] +cInReplyTo + = lens _cInReplyTo (\ s a -> s{_cInReplyTo = a}) . + _Default + . _Coerce + +instance FromJSON Comment where + parseJSON + = withObject "Comment" + (\ o -> + Comment <$> + (o .:? "etag") <*> (o .:? "plusoners") <*> + (o .:? "kind" .!= "plus#comment") + <*> (o .:? "published") + <*> (o .:? "actor") + <*> (o .:? "selfLink") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "verb" .!= "post") + <*> (o .:? "inReplyTo" .!= mempty)) + +instance ToJSON Comment where + toJSON Comment{..} + = object + (catMaybes + [("etag" .=) <$> _cEtag, + ("plusoners" .=) <$> _cPlusoners, + Just ("kind" .= _cKind), + ("published" .=) <$> _cPublished, + ("actor" .=) <$> _cActor, + ("selfLink" .=) <$> _cSelfLink, + ("object" .=) <$> _cObject, ("id" .=) <$> _cId, + ("updated" .=) <$> _cUpdated, + Just ("verb" .= _cVerb), + ("inReplyTo" .=) <$> _cInReplyTo]) + +-- +-- /See:/ 'aCL' smart constructor. +data ACL = ACL + { _aclKind :: !Text + , _aclItems :: !(Maybe [Maybe PlusACLentryResource]) + , _aclDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclKind' +-- +-- * 'aclItems' +-- +-- * 'aclDescription' +aCL + :: ACL +aCL = + ACL + { _aclKind = "plus#acl" + , _aclItems = Nothing + , _aclDescription = Nothing + } + +-- | Identifies this resource as a collection of access controls. Value: +-- \"plus#acl\". +aclKind :: Lens' ACL Text +aclKind = lens _aclKind (\ s a -> s{_aclKind = a}) + +-- | The list of access entries. +aclItems :: Lens' ACL [Maybe PlusACLentryResource] +aclItems + = lens _aclItems (\ s a -> s{_aclItems = a}) . + _Default + . _Coerce + +-- | Description of the access granted, suitable for display. +aclDescription :: Lens' ACL (Maybe Text) +aclDescription + = lens _aclDescription + (\ s a -> s{_aclDescription = a}) + +instance FromJSON ACL where + parseJSON + = withObject "ACL" + (\ o -> + ACL <$> + (o .:? "kind" .!= "plus#acl") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON ACL where + toJSON ACL{..} + = object + (catMaybes + [Just ("kind" .= _aclKind), + ("items" .=) <$> _aclItems, + ("description" .=) <$> _aclDescription]) + +-- +-- /See:/ 'momentsFeed' smart constructor. +data MomentsFeed = MomentsFeed + { _mfEtag :: !(Maybe Text) + , _mfNextPageToken :: !(Maybe Text) + , _mfNextLink :: !(Maybe Text) + , _mfKind :: !Text + , _mfItems :: !(Maybe [Maybe Moment]) + , _mfSelfLink :: !(Maybe Text) + , _mfUpdated :: !(Maybe UTCTime) + , _mfTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MomentsFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mfEtag' +-- +-- * 'mfNextPageToken' +-- +-- * 'mfNextLink' +-- +-- * 'mfKind' +-- +-- * 'mfItems' +-- +-- * 'mfSelfLink' +-- +-- * 'mfUpdated' +-- +-- * 'mfTitle' +momentsFeed + :: MomentsFeed +momentsFeed = + MomentsFeed + { _mfEtag = Nothing + , _mfNextPageToken = Nothing + , _mfNextLink = Nothing + , _mfKind = "plus#momentsFeed" + , _mfItems = Nothing + , _mfSelfLink = Nothing + , _mfUpdated = Nothing + , _mfTitle = Nothing + } + +-- | ETag of this response for caching purposes. +mfEtag :: Lens' MomentsFeed (Maybe Text) +mfEtag = lens _mfEtag (\ s a -> s{_mfEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +mfNextPageToken :: Lens' MomentsFeed (Maybe Text) +mfNextPageToken + = lens _mfNextPageToken + (\ s a -> s{_mfNextPageToken = a}) + +-- | Link to the next page of moments. +mfNextLink :: Lens' MomentsFeed (Maybe Text) +mfNextLink + = lens _mfNextLink (\ s a -> s{_mfNextLink = a}) + +-- | Identifies this resource as a collection of moments. Value: +-- \"plus#momentsFeed\". +mfKind :: Lens' MomentsFeed Text +mfKind = lens _mfKind (\ s a -> s{_mfKind = a}) + +-- | The moments in this page of results. +mfItems :: Lens' MomentsFeed [Maybe Moment] +mfItems + = lens _mfItems (\ s a -> s{_mfItems = a}) . _Default + . _Coerce + +-- | Link to this page of moments. +mfSelfLink :: Lens' MomentsFeed (Maybe Text) +mfSelfLink + = lens _mfSelfLink (\ s a -> s{_mfSelfLink = a}) + +-- | The RFC 339 timestamp for when this collection of moments was last +-- updated. +mfUpdated :: Lens' MomentsFeed (Maybe UTCTime) +mfUpdated + = lens _mfUpdated (\ s a -> s{_mfUpdated = a}) + +-- | The title of this collection of moments. +mfTitle :: Lens' MomentsFeed (Maybe Text) +mfTitle = lens _mfTitle (\ s a -> s{_mfTitle = a}) + +instance FromJSON MomentsFeed where + parseJSON + = withObject "MomentsFeed" + (\ o -> + MomentsFeed <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#momentsFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON MomentsFeed where + toJSON MomentsFeed{..} + = object + (catMaybes + [("etag" .=) <$> _mfEtag, + ("nextPageToken" .=) <$> _mfNextPageToken, + ("nextLink" .=) <$> _mfNextLink, + Just ("kind" .= _mfKind), ("items" .=) <$> _mfItems, + ("selfLink" .=) <$> _mfSelfLink, + ("updated" .=) <$> _mfUpdated, + ("title" .=) <$> _mfTitle]) + +-- +-- /See:/ 'commentFeed' smart constructor. +data CommentFeed = CommentFeed + { _cfEtag :: !(Maybe Text) + , _cfNextPageToken :: !(Maybe Text) + , _cfNextLink :: !(Maybe Text) + , _cfKind :: !Text + , _cfItems :: !(Maybe [Maybe Comment]) + , _cfId :: !(Maybe Text) + , _cfUpdated :: !(Maybe UTCTime) + , _cfTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentFeed' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cfEtag' +-- +-- * 'cfNextPageToken' +-- +-- * 'cfNextLink' +-- +-- * 'cfKind' +-- +-- * 'cfItems' +-- +-- * 'cfId' +-- +-- * 'cfUpdated' +-- +-- * 'cfTitle' +commentFeed + :: CommentFeed +commentFeed = + CommentFeed + { _cfEtag = Nothing + , _cfNextPageToken = Nothing + , _cfNextLink = Nothing + , _cfKind = "plus#commentFeed" + , _cfItems = Nothing + , _cfId = Nothing + , _cfUpdated = Nothing + , _cfTitle = Nothing + } + +-- | ETag of this response for caching purposes. +cfEtag :: Lens' CommentFeed (Maybe Text) +cfEtag = lens _cfEtag (\ s a -> s{_cfEtag = a}) + +-- | The continuation token, which is used to page through large result sets. +-- Provide this value in a subsequent request to return the next page of +-- results. +cfNextPageToken :: Lens' CommentFeed (Maybe Text) +cfNextPageToken + = lens _cfNextPageToken + (\ s a -> s{_cfNextPageToken = a}) + +-- | Link to the next page of activities. +cfNextLink :: Lens' CommentFeed (Maybe Text) +cfNextLink + = lens _cfNextLink (\ s a -> s{_cfNextLink = a}) + +-- | Identifies this resource as a collection of comments. Value: +-- \"plus#commentFeed\". +cfKind :: Lens' CommentFeed Text +cfKind = lens _cfKind (\ s a -> s{_cfKind = a}) + +-- | The comments in this page of results. +cfItems :: Lens' CommentFeed [Maybe Comment] +cfItems + = lens _cfItems (\ s a -> s{_cfItems = a}) . _Default + . _Coerce + +-- | The ID of this collection of comments. +cfId :: Lens' CommentFeed (Maybe Text) +cfId = lens _cfId (\ s a -> s{_cfId = a}) + +-- | The time at which this collection of comments was last updated. +-- Formatted as an RFC 3339 timestamp. +cfUpdated :: Lens' CommentFeed (Maybe UTCTime) +cfUpdated + = lens _cfUpdated (\ s a -> s{_cfUpdated = a}) + +-- | The title of this collection of comments. +cfTitle :: Lens' CommentFeed (Maybe Text) +cfTitle = lens _cfTitle (\ s a -> s{_cfTitle = a}) + +instance FromJSON CommentFeed where + parseJSON + = withObject "CommentFeed" + (\ o -> + CommentFeed <$> + (o .:? "etag") <*> (o .:? "nextPageToken") <*> + (o .:? "nextLink") + <*> (o .:? "kind" .!= "plus#commentFeed") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "title")) + +instance ToJSON CommentFeed where + toJSON CommentFeed{..} + = object + (catMaybes + [("etag" .=) <$> _cfEtag, + ("nextPageToken" .=) <$> _cfNextPageToken, + ("nextLink" .=) <$> _cfNextLink, + Just ("kind" .= _cfKind), ("items" .=) <$> _cfItems, + ("id" .=) <$> _cfId, ("updated" .=) <$> _cfUpdated, + ("title" .=) <$> _cfTitle]) diff --git a/gogol-plus/gen/Network/Google/Plus/Types/Sum.hs b/gogol-plus/gen/Network/Google/Plus/Types/Sum.hs new file mode 100644 index 000000000..33dddd2c9 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Plus/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Plus.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Plus.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Get.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Get.hs new file mode 100644 index 000000000..f0b691bf8 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Get.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Activities.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get an activity. +-- +-- /See:/ for @PlusActivitiesGet@. +module Plus.Activities.Get + ( + -- * REST Resource + ActivitiesGetAPI + + -- * Creating a Request + , activitiesGet + , ActivitiesGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agActivityId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusActivitiesGet@ which the +-- 'ActivitiesGet' request conforms to. +type ActivitiesGetAPI = + "activities" :> + Capture "activityId" Text :> Get '[JSON] Activity + +-- | Get an activity. +-- +-- /See:/ 'activitiesGet' smart constructor. +data ActivitiesGet = ActivitiesGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agActivityId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agActivityId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +activitiesGet + :: Text -- ^ 'activityId' + -> ActivitiesGet +activitiesGet pAgActivityId_ = + ActivitiesGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agActivityId = pAgActivityId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' ActivitiesGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' ActivitiesGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' ActivitiesGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The ID of the activity to get. +agActivityId :: Lens' ActivitiesGet' Text +agActivityId + = lens _agActivityId (\ s a -> s{_agActivityId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' ActivitiesGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' ActivitiesGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' ActivitiesGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' ActivitiesGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest ActivitiesGet' where + type Rs ActivitiesGet' = Activity + request = requestWithRoute defReq plusURL + requestWithRoute r u ActivitiesGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agActivityId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesGetAPI) r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Activities/List.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/List.hs new file mode 100644 index 000000000..abf37af65 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Activities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the activities in the specified collection for a particular +-- user. +-- +-- /See:/ for @PlusActivitiesList@. +module Plus.Activities.List + ( + -- * REST Resource + ActivitiesListAPI + + -- * Creating a Request + , activitiesList + , ActivitiesList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alCollection + , alUserId + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alFields + , alAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusActivitiesList@ which the +-- 'ActivitiesList' request conforms to. +type ActivitiesListAPI = + "people" :> + Capture "userId" Text :> + "activities" :> + Capture "collection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ActivityFeed + +-- | List all of the activities in the specified collection for a particular +-- user. +-- +-- /See:/ 'activitiesList' smart constructor. +data ActivitiesList = ActivitiesList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alCollection :: !Text + , _alUserId :: !Text + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !Word32 + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alCollection' +-- +-- * 'alUserId' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alFields' +-- +-- * 'alAlt' +activitiesList + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> ActivitiesList +activitiesList pAlCollection_ pAlUserId_ = + ActivitiesList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alCollection = pAlCollection_ + , _alUserId = pAlUserId_ + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = 20 + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ActivitiesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ActivitiesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ActivitiesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | The collection of activities to list. +alCollection :: Lens' ActivitiesList' Text +alCollection + = lens _alCollection (\ s a -> s{_alCollection = a}) + +-- | The ID of the user to get activities for. The special value \"me\" can +-- be used to indicate the authenticated user. +alUserId :: Lens' ActivitiesList' Text +alUserId = lens _alUserId (\ s a -> s{_alUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ActivitiesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +alPageToken :: Lens' ActivitiesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ActivitiesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maximum number of activities to include in the response, which is +-- used for paging. For any response, the actual number returned might be +-- less than the specified maxResults. +alMaxResults :: Lens' ActivitiesList' Word32 +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ActivitiesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ActivitiesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ActivitiesList' where + type Rs ActivitiesList' = ActivityFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u ActivitiesList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp + _alCollection + _alUserId + _alKey + _alPageToken + _alOauthToken + (Just _alMaxResults) + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesListAPI) + r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Search.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Search.hs new file mode 100644 index 000000000..3c9c36c4c --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Activities/Search.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Activities.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Search public activities. +-- +-- /See:/ for @PlusActivitiesSearch@. +module Plus.Activities.Search + ( + -- * REST Resource + ActivitiesSearchAPI + + -- * Creating a Request + , activitiesSearch + , ActivitiesSearch + + -- * Request Lenses + , asQuotaUser + , asPrettyPrint + , asOrderBy + , asUserIp + , asKey + , asQuery + , asLanguage + , asPageToken + , asOauthToken + , asMaxResults + , asFields + , asAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusActivitiesSearch@ which the +-- 'ActivitiesSearch' request conforms to. +type ActivitiesSearchAPI = + "activities" :> + QueryParam "orderBy" Text :> + QueryParam "query" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ActivityFeed + +-- | Search public activities. +-- +-- /See:/ 'activitiesSearch' smart constructor. +data ActivitiesSearch = ActivitiesSearch + { _asQuotaUser :: !(Maybe Text) + , _asPrettyPrint :: !Bool + , _asOrderBy :: !Text + , _asUserIp :: !(Maybe Text) + , _asKey :: !(Maybe Text) + , _asQuery :: !Text + , _asLanguage :: !Text + , _asPageToken :: !(Maybe Text) + , _asOauthToken :: !(Maybe Text) + , _asMaxResults :: !Word32 + , _asFields :: !(Maybe Text) + , _asAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asQuotaUser' +-- +-- * 'asPrettyPrint' +-- +-- * 'asOrderBy' +-- +-- * 'asUserIp' +-- +-- * 'asKey' +-- +-- * 'asQuery' +-- +-- * 'asLanguage' +-- +-- * 'asPageToken' +-- +-- * 'asOauthToken' +-- +-- * 'asMaxResults' +-- +-- * 'asFields' +-- +-- * 'asAlt' +activitiesSearch + :: Text -- ^ 'query' + -> ActivitiesSearch +activitiesSearch pAsQuery_ = + ActivitiesSearch + { _asQuotaUser = Nothing + , _asPrettyPrint = True + , _asOrderBy = "recent" + , _asUserIp = Nothing + , _asKey = Nothing + , _asQuery = pAsQuery_ + , _asLanguage = "en-US" + , _asPageToken = Nothing + , _asOauthToken = Nothing + , _asMaxResults = 10 + , _asFields = Nothing + , _asAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +asQuotaUser :: Lens' ActivitiesSearch' (Maybe Text) +asQuotaUser + = lens _asQuotaUser (\ s a -> s{_asQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +asPrettyPrint :: Lens' ActivitiesSearch' Bool +asPrettyPrint + = lens _asPrettyPrint + (\ s a -> s{_asPrettyPrint = a}) + +-- | Specifies how to order search results. +asOrderBy :: Lens' ActivitiesSearch' Text +asOrderBy + = lens _asOrderBy (\ s a -> s{_asOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +asUserIp :: Lens' ActivitiesSearch' (Maybe Text) +asUserIp = lens _asUserIp (\ s a -> s{_asUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +asKey :: Lens' ActivitiesSearch' (Maybe Text) +asKey = lens _asKey (\ s a -> s{_asKey = a}) + +-- | Full-text search query string. +asQuery :: Lens' ActivitiesSearch' Text +asQuery = lens _asQuery (\ s a -> s{_asQuery = a}) + +-- | Specify the preferred language to search with. See search language codes +-- for available values. +asLanguage :: Lens' ActivitiesSearch' Text +asLanguage + = lens _asLanguage (\ s a -> s{_asLanguage = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. This token can be of any +-- length. +asPageToken :: Lens' ActivitiesSearch' (Maybe Text) +asPageToken + = lens _asPageToken (\ s a -> s{_asPageToken = a}) + +-- | OAuth 2.0 token for the current user. +asOauthToken :: Lens' ActivitiesSearch' (Maybe Text) +asOauthToken + = lens _asOauthToken (\ s a -> s{_asOauthToken = a}) + +-- | The maximum number of activities to include in the response, which is +-- used for paging. For any response, the actual number returned might be +-- less than the specified maxResults. +asMaxResults :: Lens' ActivitiesSearch' Word32 +asMaxResults + = lens _asMaxResults (\ s a -> s{_asMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +asFields :: Lens' ActivitiesSearch' (Maybe Text) +asFields = lens _asFields (\ s a -> s{_asFields = a}) + +-- | Data format for the response. +asAlt :: Lens' ActivitiesSearch' Text +asAlt = lens _asAlt (\ s a -> s{_asAlt = a}) + +instance GoogleRequest ActivitiesSearch' where + type Rs ActivitiesSearch' = ActivityFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u ActivitiesSearch{..} + = go _asQuotaUser _asPrettyPrint (Just _asOrderBy) + _asUserIp + _asKey + (Just _asQuery) + (Just _asLanguage) + _asPageToken + _asOauthToken + (Just _asMaxResults) + _asFields + _asAlt + where go + = clientWithRoute + (Proxy :: Proxy ActivitiesSearchAPI) + r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Comments/Get.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Comments/Get.hs new file mode 100644 index 000000000..e60ac148f --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Comments/Get.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Comments.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a comment. +-- +-- /See:/ for @PlusCommentsGet@. +module Plus.Comments.Get + ( + -- * REST Resource + CommentsGetAPI + + -- * Creating a Request + , commentsGet + , CommentsGet + + -- * Request Lenses + , cgQuotaUser + , cgPrettyPrint + , cgUserIp + , cgKey + , cgOauthToken + , cgCommentId + , cgFields + , cgAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusCommentsGet@ which the +-- 'CommentsGet' request conforms to. +type CommentsGetAPI = + "comments" :> + Capture "commentId" Text :> Get '[JSON] Comment + +-- | Get a comment. +-- +-- /See:/ 'commentsGet' smart constructor. +data CommentsGet = CommentsGet + { _cgQuotaUser :: !(Maybe Text) + , _cgPrettyPrint :: !Bool + , _cgUserIp :: !(Maybe Text) + , _cgKey :: !(Maybe Text) + , _cgOauthToken :: !(Maybe Text) + , _cgCommentId :: !Text + , _cgFields :: !(Maybe Text) + , _cgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cgQuotaUser' +-- +-- * 'cgPrettyPrint' +-- +-- * 'cgUserIp' +-- +-- * 'cgKey' +-- +-- * 'cgOauthToken' +-- +-- * 'cgCommentId' +-- +-- * 'cgFields' +-- +-- * 'cgAlt' +commentsGet + :: Text -- ^ 'commentId' + -> CommentsGet +commentsGet pCgCommentId_ = + CommentsGet + { _cgQuotaUser = Nothing + , _cgPrettyPrint = True + , _cgUserIp = Nothing + , _cgKey = Nothing + , _cgOauthToken = Nothing + , _cgCommentId = pCgCommentId_ + , _cgFields = Nothing + , _cgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cgQuotaUser :: Lens' CommentsGet' (Maybe Text) +cgQuotaUser + = lens _cgQuotaUser (\ s a -> s{_cgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cgPrettyPrint :: Lens' CommentsGet' Bool +cgPrettyPrint + = lens _cgPrettyPrint + (\ s a -> s{_cgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cgUserIp :: Lens' CommentsGet' (Maybe Text) +cgUserIp = lens _cgUserIp (\ s a -> s{_cgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cgKey :: Lens' CommentsGet' (Maybe Text) +cgKey = lens _cgKey (\ s a -> s{_cgKey = a}) + +-- | OAuth 2.0 token for the current user. +cgOauthToken :: Lens' CommentsGet' (Maybe Text) +cgOauthToken + = lens _cgOauthToken (\ s a -> s{_cgOauthToken = a}) + +-- | The ID of the comment to get. +cgCommentId :: Lens' CommentsGet' Text +cgCommentId + = lens _cgCommentId (\ s a -> s{_cgCommentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cgFields :: Lens' CommentsGet' (Maybe Text) +cgFields = lens _cgFields (\ s a -> s{_cgFields = a}) + +-- | Data format for the response. +cgAlt :: Lens' CommentsGet' Text +cgAlt = lens _cgAlt (\ s a -> s{_cgAlt = a}) + +instance GoogleRequest CommentsGet' where + type Rs CommentsGet' = Comment + request = requestWithRoute defReq plusURL + requestWithRoute r u CommentsGet{..} + = go _cgQuotaUser _cgPrettyPrint _cgUserIp _cgKey + _cgOauthToken + _cgCommentId + _cgFields + _cgAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsGetAPI) r u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Comments/List.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Comments/List.hs new file mode 100644 index 000000000..cf857d4d8 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Comments/List.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Comments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the comments for an activity. +-- +-- /See:/ for @PlusCommentsList@. +module Plus.Comments.List + ( + -- * REST Resource + CommentsListAPI + + -- * Creating a Request + , commentsList + , CommentsList + + -- * Request Lenses + , clQuotaUser + , clPrettyPrint + , clUserIp + , clActivityId + , clSortOrder + , clKey + , clPageToken + , clOauthToken + , clMaxResults + , clFields + , clAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusCommentsList@ which the +-- 'CommentsList' request conforms to. +type CommentsListAPI = + "activities" :> + Capture "activityId" Text :> + "comments" :> + QueryParam "sortOrder" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CommentFeed + +-- | List all of the comments for an activity. +-- +-- /See:/ 'commentsList' smart constructor. +data CommentsList = CommentsList + { _clQuotaUser :: !(Maybe Text) + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clActivityId :: !Text + , _clSortOrder :: !Text + , _clKey :: !(Maybe Text) + , _clPageToken :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clMaxResults :: !Word32 + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clQuotaUser' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clActivityId' +-- +-- * 'clSortOrder' +-- +-- * 'clKey' +-- +-- * 'clPageToken' +-- +-- * 'clOauthToken' +-- +-- * 'clMaxResults' +-- +-- * 'clFields' +-- +-- * 'clAlt' +commentsList + :: Text -- ^ 'activityId' + -> CommentsList +commentsList pClActivityId_ = + CommentsList + { _clQuotaUser = Nothing + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clActivityId = pClActivityId_ + , _clSortOrder = "ascending" + , _clKey = Nothing + , _clPageToken = Nothing + , _clOauthToken = Nothing + , _clMaxResults = 20 + , _clFields = Nothing + , _clAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CommentsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CommentsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CommentsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | The ID of the activity to get comments for. +clActivityId :: Lens' CommentsList' Text +clActivityId + = lens _clActivityId (\ s a -> s{_clActivityId = a}) + +-- | The order in which to sort the list of comments. +clSortOrder :: Lens' CommentsList' Text +clSortOrder + = lens _clSortOrder (\ s a -> s{_clSortOrder = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CommentsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +clPageToken :: Lens' CommentsList' (Maybe Text) +clPageToken + = lens _clPageToken (\ s a -> s{_clPageToken = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CommentsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | The maximum number of comments to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +clMaxResults :: Lens' CommentsList' Word32 +clMaxResults + = lens _clMaxResults (\ s a -> s{_clMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CommentsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CommentsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CommentsList' where + type Rs CommentsList' = CommentFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u CommentsList{..} + = go _clQuotaUser _clPrettyPrint _clUserIp + _clActivityId + (Just _clSortOrder) + _clKey + _clPageToken + _clOauthToken + (Just _clMaxResults) + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsListAPI) r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Moments/Insert.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Moments/Insert.hs new file mode 100644 index 000000000..111c87a68 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Moments/Insert.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Moments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Record a moment representing a user\'s action such as making a purchase +-- or commenting on a blog. +-- +-- /See:/ for @PlusMomentsInsert@. +module Plus.Moments.Insert + ( + -- * REST Resource + MomentsInsertAPI + + -- * Creating a Request + , momentsInsert + , MomentsInsert + + -- * Request Lenses + , miQuotaUser + , miPrettyPrint + , miUserIp + , miCollection + , miDebug + , miUserId + , miKey + , miOauthToken + , miFields + , miAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusMomentsInsert@ which the +-- 'MomentsInsert' request conforms to. +type MomentsInsertAPI = + "people" :> + Capture "userId" Text :> + "moments" :> + Capture "collection" Text :> + QueryParam "debug" Bool :> Post '[JSON] Moment + +-- | Record a moment representing a user\'s action such as making a purchase +-- or commenting on a blog. +-- +-- /See:/ 'momentsInsert' smart constructor. +data MomentsInsert = MomentsInsert + { _miQuotaUser :: !(Maybe Text) + , _miPrettyPrint :: !Bool + , _miUserIp :: !(Maybe Text) + , _miCollection :: !Text + , _miDebug :: !(Maybe Bool) + , _miUserId :: !Text + , _miKey :: !(Maybe Text) + , _miOauthToken :: !(Maybe Text) + , _miFields :: !(Maybe Text) + , _miAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MomentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'miQuotaUser' +-- +-- * 'miPrettyPrint' +-- +-- * 'miUserIp' +-- +-- * 'miCollection' +-- +-- * 'miDebug' +-- +-- * 'miUserId' +-- +-- * 'miKey' +-- +-- * 'miOauthToken' +-- +-- * 'miFields' +-- +-- * 'miAlt' +momentsInsert + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> MomentsInsert +momentsInsert pMiCollection_ pMiUserId_ = + MomentsInsert + { _miQuotaUser = Nothing + , _miPrettyPrint = True + , _miUserIp = Nothing + , _miCollection = pMiCollection_ + , _miDebug = Nothing + , _miUserId = pMiUserId_ + , _miKey = Nothing + , _miOauthToken = Nothing + , _miFields = Nothing + , _miAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +miQuotaUser :: Lens' MomentsInsert' (Maybe Text) +miQuotaUser + = lens _miQuotaUser (\ s a -> s{_miQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +miPrettyPrint :: Lens' MomentsInsert' Bool +miPrettyPrint + = lens _miPrettyPrint + (\ s a -> s{_miPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +miUserIp :: Lens' MomentsInsert' (Maybe Text) +miUserIp = lens _miUserIp (\ s a -> s{_miUserIp = a}) + +-- | The collection to which to write moments. +miCollection :: Lens' MomentsInsert' Text +miCollection + = lens _miCollection (\ s a -> s{_miCollection = a}) + +-- | Return the moment as written. Should be used only for debugging. +miDebug :: Lens' MomentsInsert' (Maybe Bool) +miDebug = lens _miDebug (\ s a -> s{_miDebug = a}) + +-- | The ID of the user to record actions for. The only valid values are +-- \"me\" and the ID of the authenticated user. +miUserId :: Lens' MomentsInsert' Text +miUserId = lens _miUserId (\ s a -> s{_miUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +miKey :: Lens' MomentsInsert' (Maybe Text) +miKey = lens _miKey (\ s a -> s{_miKey = a}) + +-- | OAuth 2.0 token for the current user. +miOauthToken :: Lens' MomentsInsert' (Maybe Text) +miOauthToken + = lens _miOauthToken (\ s a -> s{_miOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +miFields :: Lens' MomentsInsert' (Maybe Text) +miFields = lens _miFields (\ s a -> s{_miFields = a}) + +-- | Data format for the response. +miAlt :: Lens' MomentsInsert' Text +miAlt = lens _miAlt (\ s a -> s{_miAlt = a}) + +instance GoogleRequest MomentsInsert' where + type Rs MomentsInsert' = Moment + request = requestWithRoute defReq plusURL + requestWithRoute r u MomentsInsert{..} + = go _miQuotaUser _miPrettyPrint _miUserIp + _miCollection + _miDebug + _miUserId + _miKey + _miOauthToken + _miFields + _miAlt + where go + = clientWithRoute (Proxy :: Proxy MomentsInsertAPI) r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/Moments/List.hs b/gogol-plus/gen/Network/Google/Resource/Plus/Moments/List.hs new file mode 100644 index 000000000..a461857ad --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/Moments/List.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.Moments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the moments for a particular user. +-- +-- /See:/ for @PlusMomentsList@. +module Plus.Moments.List + ( + -- * REST Resource + MomentsListAPI + + -- * Creating a Request + , momentsList + , MomentsList + + -- * Request Lenses + , mlQuotaUser + , mlPrettyPrint + , mlTargetUrl + , mlUserIp + , mlCollection + , mlUserId + , mlKey + , mlPageToken + , mlType + , mlOauthToken + , mlMaxResults + , mlFields + , mlAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusMomentsList@ which the +-- 'MomentsList' request conforms to. +type MomentsListAPI = + "people" :> + Capture "userId" Text :> + "moments" :> + Capture "collection" Text :> + QueryParam "targetUrl" Text :> + QueryParam "pageToken" Text :> + QueryParam "type" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] MomentsFeed + +-- | List all of the moments for a particular user. +-- +-- /See:/ 'momentsList' smart constructor. +data MomentsList = MomentsList + { _mlQuotaUser :: !(Maybe Text) + , _mlPrettyPrint :: !Bool + , _mlTargetUrl :: !(Maybe Text) + , _mlUserIp :: !(Maybe Text) + , _mlCollection :: !Text + , _mlUserId :: !Text + , _mlKey :: !(Maybe Text) + , _mlPageToken :: !(Maybe Text) + , _mlType :: !(Maybe Text) + , _mlOauthToken :: !(Maybe Text) + , _mlMaxResults :: !Word32 + , _mlFields :: !(Maybe Text) + , _mlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MomentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mlQuotaUser' +-- +-- * 'mlPrettyPrint' +-- +-- * 'mlTargetUrl' +-- +-- * 'mlUserIp' +-- +-- * 'mlCollection' +-- +-- * 'mlUserId' +-- +-- * 'mlKey' +-- +-- * 'mlPageToken' +-- +-- * 'mlType' +-- +-- * 'mlOauthToken' +-- +-- * 'mlMaxResults' +-- +-- * 'mlFields' +-- +-- * 'mlAlt' +momentsList + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> MomentsList +momentsList pMlCollection_ pMlUserId_ = + MomentsList + { _mlQuotaUser = Nothing + , _mlPrettyPrint = True + , _mlTargetUrl = Nothing + , _mlUserIp = Nothing + , _mlCollection = pMlCollection_ + , _mlUserId = pMlUserId_ + , _mlKey = Nothing + , _mlPageToken = Nothing + , _mlType = Nothing + , _mlOauthToken = Nothing + , _mlMaxResults = 20 + , _mlFields = Nothing + , _mlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +mlQuotaUser :: Lens' MomentsList' (Maybe Text) +mlQuotaUser + = lens _mlQuotaUser (\ s a -> s{_mlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +mlPrettyPrint :: Lens' MomentsList' Bool +mlPrettyPrint + = lens _mlPrettyPrint + (\ s a -> s{_mlPrettyPrint = a}) + +-- | Only moments containing this targetUrl will be returned. +mlTargetUrl :: Lens' MomentsList' (Maybe Text) +mlTargetUrl + = lens _mlTargetUrl (\ s a -> s{_mlTargetUrl = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +mlUserIp :: Lens' MomentsList' (Maybe Text) +mlUserIp = lens _mlUserIp (\ s a -> s{_mlUserIp = a}) + +-- | The collection of moments to list. +mlCollection :: Lens' MomentsList' Text +mlCollection + = lens _mlCollection (\ s a -> s{_mlCollection = a}) + +-- | The ID of the user to get moments for. The special value \"me\" can be +-- used to indicate the authenticated user. +mlUserId :: Lens' MomentsList' Text +mlUserId = lens _mlUserId (\ s a -> s{_mlUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +mlKey :: Lens' MomentsList' (Maybe Text) +mlKey = lens _mlKey (\ s a -> s{_mlKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +mlPageToken :: Lens' MomentsList' (Maybe Text) +mlPageToken + = lens _mlPageToken (\ s a -> s{_mlPageToken = a}) + +-- | Only moments of this type will be returned. +mlType :: Lens' MomentsList' (Maybe Text) +mlType = lens _mlType (\ s a -> s{_mlType = a}) + +-- | OAuth 2.0 token for the current user. +mlOauthToken :: Lens' MomentsList' (Maybe Text) +mlOauthToken + = lens _mlOauthToken (\ s a -> s{_mlOauthToken = a}) + +-- | The maximum number of moments to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +mlMaxResults :: Lens' MomentsList' Word32 +mlMaxResults + = lens _mlMaxResults (\ s a -> s{_mlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +mlFields :: Lens' MomentsList' (Maybe Text) +mlFields = lens _mlFields (\ s a -> s{_mlFields = a}) + +-- | Data format for the response. +mlAlt :: Lens' MomentsList' Text +mlAlt = lens _mlAlt (\ s a -> s{_mlAlt = a}) + +instance GoogleRequest MomentsList' where + type Rs MomentsList' = MomentsFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u MomentsList{..} + = go _mlQuotaUser _mlPrettyPrint _mlTargetUrl + _mlUserIp + _mlCollection + _mlUserId + _mlKey + _mlPageToken + _mlType + _mlOauthToken + (Just _mlMaxResults) + _mlFields + _mlAlt + where go + = clientWithRoute (Proxy :: Proxy MomentsListAPI) r u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/People/Get.hs b/gogol-plus/gen/Network/Google/Resource/Plus/People/Get.hs new file mode 100644 index 000000000..421562853 --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/People/Get.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.People.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a person\'s profile. If your app uses scope +-- https:\/\/www.googleapis.com\/auth\/plus.login, this method is +-- guaranteed to return ageRange and language. +-- +-- /See:/ for @PlusPeopleGet@. +module Plus.People.Get + ( + -- * REST Resource + PeopleGetAPI + + -- * Creating a Request + , peopleGet + , PeopleGet + + -- * Request Lenses + , pgQuotaUser + , pgPrettyPrint + , pgUserIp + , pgUserId + , pgKey + , pgOauthToken + , pgFields + , pgAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusPeopleGet@ which the +-- 'PeopleGet' request conforms to. +type PeopleGetAPI = + "people" :> + Capture "userId" Text :> Get '[JSON] Person + +-- | Get a person\'s profile. If your app uses scope +-- https:\/\/www.googleapis.com\/auth\/plus.login, this method is +-- guaranteed to return ageRange and language. +-- +-- /See:/ 'peopleGet' smart constructor. +data PeopleGet = PeopleGet + { _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUserIp :: !(Maybe Text) + , _pgUserId :: !Text + , _pgKey :: !(Maybe Text) + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUserIp' +-- +-- * 'pgUserId' +-- +-- * 'pgKey' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgAlt' +peopleGet + :: Text -- ^ 'userId' + -> PeopleGet +peopleGet pPgUserId_ = + PeopleGet + { _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUserIp = Nothing + , _pgUserId = pPgUserId_ + , _pgKey = Nothing + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgQuotaUser :: Lens' PeopleGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' PeopleGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgUserIp :: Lens' PeopleGet' (Maybe Text) +pgUserIp = lens _pgUserIp (\ s a -> s{_pgUserIp = a}) + +-- | The ID of the person to get the profile for. The special value \"me\" +-- can be used to indicate the authenticated user. +pgUserId :: Lens' PeopleGet' Text +pgUserId = lens _pgUserId (\ s a -> s{_pgUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' PeopleGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' PeopleGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' PeopleGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | Data format for the response. +pgAlt :: Lens' PeopleGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest PeopleGet' where + type Rs PeopleGet' = Person + request = requestWithRoute defReq plusURL + requestWithRoute r u PeopleGet{..} + = go _pgQuotaUser _pgPrettyPrint _pgUserIp _pgUserId + _pgKey + _pgOauthToken + _pgFields + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy PeopleGetAPI) r u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/People/List.hs b/gogol-plus/gen/Network/Google/Resource/Plus/People/List.hs new file mode 100644 index 000000000..2164278ba --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/People/List.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.People.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the people in the specified collection. +-- +-- /See:/ for @PlusPeopleList@. +module Plus.People.List + ( + -- * REST Resource + PeopleListAPI + + -- * Creating a Request + , peopleList + , PeopleList + + -- * Request Lenses + , plQuotaUser + , plPrettyPrint + , plOrderBy + , plUserIp + , plCollection + , plUserId + , plKey + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusPeopleList@ which the +-- 'PeopleList' request conforms to. +type PeopleListAPI = + "people" :> + Capture "userId" Text :> + "people" :> + Capture "collection" Text :> + QueryParam "orderBy" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | List all of the people in the specified collection. +-- +-- /See:/ 'peopleList' smart constructor. +data PeopleList = PeopleList + { _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plOrderBy :: !(Maybe Text) + , _plUserIp :: !(Maybe Text) + , _plCollection :: !Text + , _plUserId :: !Text + , _plKey :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !Word32 + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plOrderBy' +-- +-- * 'plUserIp' +-- +-- * 'plCollection' +-- +-- * 'plUserId' +-- +-- * 'plKey' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +peopleList + :: Text -- ^ 'collection' + -> Text -- ^ 'userId' + -> PeopleList +peopleList pPlCollection_ pPlUserId_ = + PeopleList + { _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plOrderBy = Nothing + , _plUserIp = Nothing + , _plCollection = pPlCollection_ + , _plUserId = pPlUserId_ + , _plKey = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = 100 + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PeopleList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PeopleList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | The order to return people in. +plOrderBy :: Lens' PeopleList' (Maybe Text) +plOrderBy + = lens _plOrderBy (\ s a -> s{_plOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PeopleList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | The collection of people to list. +plCollection :: Lens' PeopleList' Text +plCollection + = lens _plCollection (\ s a -> s{_plCollection = a}) + +-- | Get the collection of people for the person identified. Use \"me\" to +-- indicate the authenticated user. +plUserId :: Lens' PeopleList' Text +plUserId = lens _plUserId (\ s a -> s{_plUserId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PeopleList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +plPageToken :: Lens' PeopleList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PeopleList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +plMaxResults :: Lens' PeopleList' Word32 +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PeopleList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PeopleList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PeopleList' where + type Rs PeopleList' = PeopleFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u PeopleList{..} + = go _plQuotaUser _plPrettyPrint _plOrderBy _plUserIp + _plCollection + _plUserId + _plKey + _plPageToken + _plOauthToken + (Just _plMaxResults) + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PeopleListAPI) r u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/People/ListByActivity.hs b/gogol-plus/gen/Network/Google/Resource/Plus/People/ListByActivity.hs new file mode 100644 index 000000000..f08ef357a --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/People/ListByActivity.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.People.ListByActivity +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all of the people in the specified collection for a particular +-- activity. +-- +-- /See:/ for @PlusPeopleListByActivity@. +module Plus.People.ListByActivity + ( + -- * REST Resource + PeopleListByActivityAPI + + -- * Creating a Request + , peopleListByActivity + , PeopleListByActivity + + -- * Request Lenses + , plbaQuotaUser + , plbaPrettyPrint + , plbaUserIp + , plbaActivityId + , plbaCollection + , plbaKey + , plbaPageToken + , plbaOauthToken + , plbaMaxResults + , plbaFields + , plbaAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusPeopleListByActivity@ which the +-- 'PeopleListByActivity' request conforms to. +type PeopleListByActivityAPI = + "activities" :> + Capture "activityId" Text :> + "people" :> + Capture "collection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | List all of the people in the specified collection for a particular +-- activity. +-- +-- /See:/ 'peopleListByActivity' smart constructor. +data PeopleListByActivity = PeopleListByActivity + { _plbaQuotaUser :: !(Maybe Text) + , _plbaPrettyPrint :: !Bool + , _plbaUserIp :: !(Maybe Text) + , _plbaActivityId :: !Text + , _plbaCollection :: !Text + , _plbaKey :: !(Maybe Text) + , _plbaPageToken :: !(Maybe Text) + , _plbaOauthToken :: !(Maybe Text) + , _plbaMaxResults :: !Word32 + , _plbaFields :: !(Maybe Text) + , _plbaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleListByActivity'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plbaQuotaUser' +-- +-- * 'plbaPrettyPrint' +-- +-- * 'plbaUserIp' +-- +-- * 'plbaActivityId' +-- +-- * 'plbaCollection' +-- +-- * 'plbaKey' +-- +-- * 'plbaPageToken' +-- +-- * 'plbaOauthToken' +-- +-- * 'plbaMaxResults' +-- +-- * 'plbaFields' +-- +-- * 'plbaAlt' +peopleListByActivity + :: Text -- ^ 'activityId' + -> Text -- ^ 'collection' + -> PeopleListByActivity +peopleListByActivity pPlbaActivityId_ pPlbaCollection_ = + PeopleListByActivity + { _plbaQuotaUser = Nothing + , _plbaPrettyPrint = True + , _plbaUserIp = Nothing + , _plbaActivityId = pPlbaActivityId_ + , _plbaCollection = pPlbaCollection_ + , _plbaKey = Nothing + , _plbaPageToken = Nothing + , _plbaOauthToken = Nothing + , _plbaMaxResults = 20 + , _plbaFields = Nothing + , _plbaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plbaQuotaUser :: Lens' PeopleListByActivity' (Maybe Text) +plbaQuotaUser + = lens _plbaQuotaUser + (\ s a -> s{_plbaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plbaPrettyPrint :: Lens' PeopleListByActivity' Bool +plbaPrettyPrint + = lens _plbaPrettyPrint + (\ s a -> s{_plbaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plbaUserIp :: Lens' PeopleListByActivity' (Maybe Text) +plbaUserIp + = lens _plbaUserIp (\ s a -> s{_plbaUserIp = a}) + +-- | The ID of the activity to get the list of people for. +plbaActivityId :: Lens' PeopleListByActivity' Text +plbaActivityId + = lens _plbaActivityId + (\ s a -> s{_plbaActivityId = a}) + +-- | The collection of people to list. +plbaCollection :: Lens' PeopleListByActivity' Text +plbaCollection + = lens _plbaCollection + (\ s a -> s{_plbaCollection = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plbaKey :: Lens' PeopleListByActivity' (Maybe Text) +plbaKey = lens _plbaKey (\ s a -> s{_plbaKey = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. +plbaPageToken :: Lens' PeopleListByActivity' (Maybe Text) +plbaPageToken + = lens _plbaPageToken + (\ s a -> s{_plbaPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plbaOauthToken :: Lens' PeopleListByActivity' (Maybe Text) +plbaOauthToken + = lens _plbaOauthToken + (\ s a -> s{_plbaOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +plbaMaxResults :: Lens' PeopleListByActivity' Word32 +plbaMaxResults + = lens _plbaMaxResults + (\ s a -> s{_plbaMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plbaFields :: Lens' PeopleListByActivity' (Maybe Text) +plbaFields + = lens _plbaFields (\ s a -> s{_plbaFields = a}) + +-- | Data format for the response. +plbaAlt :: Lens' PeopleListByActivity' Text +plbaAlt = lens _plbaAlt (\ s a -> s{_plbaAlt = a}) + +instance GoogleRequest PeopleListByActivity' where + type Rs PeopleListByActivity' = PeopleFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u PeopleListByActivity{..} + = go _plbaQuotaUser _plbaPrettyPrint _plbaUserIp + _plbaActivityId + _plbaCollection + _plbaKey + _plbaPageToken + _plbaOauthToken + (Just _plbaMaxResults) + _plbaFields + _plbaAlt + where go + = clientWithRoute + (Proxy :: Proxy PeopleListByActivityAPI) + r + u diff --git a/gogol-plus/gen/Network/Google/Resource/Plus/People/Search.hs b/gogol-plus/gen/Network/Google/Resource/Plus/People/Search.hs new file mode 100644 index 000000000..1526cda9a --- /dev/null +++ b/gogol-plus/gen/Network/Google/Resource/Plus/People/Search.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Plus.People.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Search all public profiles. +-- +-- /See:/ for @PlusPeopleSearch@. +module Plus.People.Search + ( + -- * REST Resource + PeopleSearchAPI + + -- * Creating a Request + , peopleSearch + , PeopleSearch + + -- * Request Lenses + , psQuotaUser + , psPrettyPrint + , psUserIp + , psKey + , psQuery + , psLanguage + , psPageToken + , psOauthToken + , psMaxResults + , psFields + , psAlt + ) where + +import Network.Google.Plus.Types +import Network.Google.Prelude + +-- | A resource alias for @PlusPeopleSearch@ which the +-- 'PeopleSearch' request conforms to. +type PeopleSearchAPI = + "people" :> + QueryParam "query" Text :> + QueryParam "language" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PeopleFeed + +-- | Search all public profiles. +-- +-- /See:/ 'peopleSearch' smart constructor. +data PeopleSearch = PeopleSearch + { _psQuotaUser :: !(Maybe Text) + , _psPrettyPrint :: !Bool + , _psUserIp :: !(Maybe Text) + , _psKey :: !(Maybe Text) + , _psQuery :: !Text + , _psLanguage :: !Text + , _psPageToken :: !(Maybe Text) + , _psOauthToken :: !(Maybe Text) + , _psMaxResults :: !Word32 + , _psFields :: !(Maybe Text) + , _psAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PeopleSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psQuotaUser' +-- +-- * 'psPrettyPrint' +-- +-- * 'psUserIp' +-- +-- * 'psKey' +-- +-- * 'psQuery' +-- +-- * 'psLanguage' +-- +-- * 'psPageToken' +-- +-- * 'psOauthToken' +-- +-- * 'psMaxResults' +-- +-- * 'psFields' +-- +-- * 'psAlt' +peopleSearch + :: Text -- ^ 'query' + -> PeopleSearch +peopleSearch pPsQuery_ = + PeopleSearch + { _psQuotaUser = Nothing + , _psPrettyPrint = True + , _psUserIp = Nothing + , _psKey = Nothing + , _psQuery = pPsQuery_ + , _psLanguage = "en-US" + , _psPageToken = Nothing + , _psOauthToken = Nothing + , _psMaxResults = 25 + , _psFields = Nothing + , _psAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +psQuotaUser :: Lens' PeopleSearch' (Maybe Text) +psQuotaUser + = lens _psQuotaUser (\ s a -> s{_psQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psPrettyPrint :: Lens' PeopleSearch' Bool +psPrettyPrint + = lens _psPrettyPrint + (\ s a -> s{_psPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +psUserIp :: Lens' PeopleSearch' (Maybe Text) +psUserIp = lens _psUserIp (\ s a -> s{_psUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psKey :: Lens' PeopleSearch' (Maybe Text) +psKey = lens _psKey (\ s a -> s{_psKey = a}) + +-- | Specify a query string for full text search of public text in all +-- profiles. +psQuery :: Lens' PeopleSearch' Text +psQuery = lens _psQuery (\ s a -> s{_psQuery = a}) + +-- | Specify the preferred language to search with. See search language codes +-- for available values. +psLanguage :: Lens' PeopleSearch' Text +psLanguage + = lens _psLanguage (\ s a -> s{_psLanguage = a}) + +-- | The continuation token, which is used to page through large result sets. +-- To get the next page of results, set this parameter to the value of +-- \"nextPageToken\" from the previous response. This token can be of any +-- length. +psPageToken :: Lens' PeopleSearch' (Maybe Text) +psPageToken + = lens _psPageToken (\ s a -> s{_psPageToken = a}) + +-- | OAuth 2.0 token for the current user. +psOauthToken :: Lens' PeopleSearch' (Maybe Text) +psOauthToken + = lens _psOauthToken (\ s a -> s{_psOauthToken = a}) + +-- | The maximum number of people to include in the response, which is used +-- for paging. For any response, the actual number returned might be less +-- than the specified maxResults. +psMaxResults :: Lens' PeopleSearch' Word32 +psMaxResults + = lens _psMaxResults (\ s a -> s{_psMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +psFields :: Lens' PeopleSearch' (Maybe Text) +psFields = lens _psFields (\ s a -> s{_psFields = a}) + +-- | Data format for the response. +psAlt :: Lens' PeopleSearch' Text +psAlt = lens _psAlt (\ s a -> s{_psAlt = a}) + +instance GoogleRequest PeopleSearch' where + type Rs PeopleSearch' = PeopleFeed + request = requestWithRoute defReq plusURL + requestWithRoute r u PeopleSearch{..} + = go _psQuotaUser _psPrettyPrint _psUserIp _psKey + (Just _psQuery) + (Just _psLanguage) + _psPageToken + _psOauthToken + (Just _psMaxResults) + _psFields + _psAlt + where go + = clientWithRoute (Proxy :: Proxy PeopleSearchAPI) r + u diff --git a/gogol-plus/gogol-plus.cabal b/gogol-plus/gogol-plus.cabal new file mode 100644 index 000000000..ede418cb6 --- /dev/null +++ b/gogol-plus/gogol-plus.cabal @@ -0,0 +1,54 @@ +name: gogol-plus +version: 0.0.1 +synopsis: Google+ API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google+ API enables developers to build on top of the Google+ + platform. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Plus + , Network.Google.Plus.Types + , Network.Google.Resource.Plus.Activities.Get + , Network.Google.Resource.Plus.Activities.List + , Network.Google.Resource.Plus.Activities.Search + , Network.Google.Resource.Plus.Comments.Get + , Network.Google.Resource.Plus.Comments.List + , Network.Google.Resource.Plus.Moments.Insert + , Network.Google.Resource.Plus.Moments.List + , Network.Google.Resource.Plus.People.Get + , Network.Google.Resource.Plus.People.List + , Network.Google.Resource.Plus.People.ListByActivity + , Network.Google.Resource.Plus.People.Search + + other-modules: + Network.Google.Plus.Types.Product + , Network.Google.Plus.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-plus/src/.gitkeep b/gogol-plus/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-prediction/LICENSE b/gogol-prediction/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-prediction/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-prediction/Makefile b/gogol-prediction/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-prediction/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-prediction/README.md b/gogol-prediction/README.md new file mode 100644 index 000000000..12f1538a4 --- /dev/null +++ b/gogol-prediction/README.md @@ -0,0 +1,28 @@ +# gogol-prediction + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Prediction API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-prediction` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-prediction/Setup.hs b/gogol-prediction/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-prediction/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-prediction/gen/Network/Google/Prediction.hs b/gogol-prediction/gen/Network/Google/Prediction.hs new file mode 100644 index 000000000..df6eb59a8 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Prediction.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Prediction +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you access a cloud hosted machine learning service that makes it +-- easy to build smart apps +-- +-- /See:/ +module Network.Google.Prediction + ( + -- * API + PredictionAPI + , predictionAPI + , predictionURL + + -- * Service Methods + + -- * REST Resources + + -- ** PredictionHostedmodelsPredict + , module Prediction.Hostedmodels.Predict + + -- ** PredictionTrainedmodelsAnalyze + , module Prediction.Trainedmodels.Analyze + + -- ** PredictionTrainedmodelsDelete + , module Prediction.Trainedmodels.Delete + + -- ** PredictionTrainedmodelsGet + , module Prediction.Trainedmodels.Get + + -- ** PredictionTrainedmodelsInsert + , module Prediction.Trainedmodels.Insert + + -- ** PredictionTrainedmodelsList + , module Prediction.Trainedmodels.List + + -- ** PredictionTrainedmodelsPredict + , module Prediction.Trainedmodels.Predict + + -- ** PredictionTrainedmodelsUpdate + , module Prediction.Trainedmodels.Update + + -- * Types + + -- ** Insert + , Insert + , insert + , iStorageDataLocation + , iModelType + , iTrainingInstances + , iUtility + , iStoragePMMLModelLocation + , iSourceModel + , iId + , iStoragePMMLLocation + + -- ** List + , List + , list + , lNextPageToken + , lKind + , lItems + , lSelfLink + + -- ** Insert2 + , Insert2 + , insert2 + , insStorageDataLocation + , insModelType + , insKind + , insCreated + , insTrainingComplete + , insSelfLink + , insTrainingStatus + , insStoragePMMLModelLocation + , insId + , insStoragePMMLLocation + , insModelInfo + + -- ** Input + , Input + , input + , iInput + + -- ** Analyze + , Analyze + , analyze + , aKind + , aModelDescription + , aSelfLink + , aId + , aErrors + , aDataDescription + + -- ** Output + , Output + , output + , oOutputValue + , oKind + , oOutputLabel + , oSelfLink + , oId + , oOutputMulti + + -- ** Update + , Update + , update + , uCsvInstance + , uOutput + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude +import Network.Google.Resource.Prediction.Hostedmodels.Predict +import Network.Google.Resource.Prediction.Trainedmodels.Analyze +import Network.Google.Resource.Prediction.Trainedmodels.Delete +import Network.Google.Resource.Prediction.Trainedmodels.Get +import Network.Google.Resource.Prediction.Trainedmodels.Insert +import Network.Google.Resource.Prediction.Trainedmodels.List +import Network.Google.Resource.Prediction.Trainedmodels.Predict +import Network.Google.Resource.Prediction.Trainedmodels.Update + +{- $resources +TODO +-} + +type PredictionAPI = Trainedmodels :<|> Hostedmodels + +predictionAPI :: Proxy PredictionAPI +predictionAPI = Proxy diff --git a/gogol-prediction/gen/Network/Google/Prediction/Types.hs b/gogol-prediction/gen/Network/Google/Prediction/Types.hs new file mode 100644 index 000000000..086540c8c --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Prediction/Types.hs @@ -0,0 +1,96 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Prediction.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Prediction.Types + ( + -- * Service URL + predictionURL + + -- * Insert + , Insert + , insert + , iStorageDataLocation + , iModelType + , iTrainingInstances + , iUtility + , iStoragePMMLModelLocation + , iSourceModel + , iId + , iStoragePMMLLocation + + -- * List + , List + , list + , lNextPageToken + , lKind + , lItems + , lSelfLink + + -- * Insert2 + , Insert2 + , insert2 + , insStorageDataLocation + , insModelType + , insKind + , insCreated + , insTrainingComplete + , insSelfLink + , insTrainingStatus + , insStoragePMMLModelLocation + , insId + , insStoragePMMLLocation + , insModelInfo + + -- * Input + , Input + , input + , iInput + + -- * Analyze + , Analyze + , analyze + , aKind + , aModelDescription + , aSelfLink + , aId + , aErrors + , aDataDescription + + -- * Output + , Output + , output + , oOutputValue + , oKind + , oOutputLabel + , oSelfLink + , oId + , oOutputMulti + + -- * Update + , Update + , update + , uCsvInstance + , uOutput + ) where + +import Network.Google.Prediction.Types.Product +import Network.Google.Prediction.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1.6' of the Prediction API. +predictionURL :: BaseURL +predictionURL + = BaseUrl Https + "https://www.googleapis.com/prediction/v1.6/projects/" + 443 diff --git a/gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs b/gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs new file mode 100644 index 000000000..5c696da1d --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs @@ -0,0 +1,624 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Prediction.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Prediction.Types.Product where + +import Network.Google.Prediction.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'insert' smart constructor. +data Insert = Insert + { _iStorageDataLocation :: !(Maybe Text) + , _iModelType :: !(Maybe Text) + , _iTrainingInstances :: !(Maybe [InsertTrainingInstancesItem]) + , _iUtility :: !(Maybe [InsertUtilityItem]) + , _iStoragePMMLModelLocation :: !(Maybe Text) + , _iSourceModel :: !(Maybe Text) + , _iId :: !(Maybe Text) + , _iStoragePMMLLocation :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Insert' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iStorageDataLocation' +-- +-- * 'iModelType' +-- +-- * 'iTrainingInstances' +-- +-- * 'iUtility' +-- +-- * 'iStoragePMMLModelLocation' +-- +-- * 'iSourceModel' +-- +-- * 'iId' +-- +-- * 'iStoragePMMLLocation' +insert + :: Insert +insert = + Insert + { _iStorageDataLocation = Nothing + , _iModelType = Nothing + , _iTrainingInstances = Nothing + , _iUtility = Nothing + , _iStoragePMMLModelLocation = Nothing + , _iSourceModel = Nothing + , _iId = Nothing + , _iStoragePMMLLocation = Nothing + } + +-- | Google storage location of the training data file. +iStorageDataLocation :: Lens' Insert (Maybe Text) +iStorageDataLocation + = lens _iStorageDataLocation + (\ s a -> s{_iStorageDataLocation = a}) + +-- | Type of predictive model (classification or regression). +iModelType :: Lens' Insert (Maybe Text) +iModelType + = lens _iModelType (\ s a -> s{_iModelType = a}) + +-- | Instances to train model on. +iTrainingInstances :: Lens' Insert [InsertTrainingInstancesItem] +iTrainingInstances + = lens _iTrainingInstances + (\ s a -> s{_iTrainingInstances = a}) + . _Default + . _Coerce + +-- | A class weighting function, which allows the importance weights for +-- class labels to be specified (Categorical models only). +iUtility :: Lens' Insert [InsertUtilityItem] +iUtility + = lens _iUtility (\ s a -> s{_iUtility = a}) . + _Default + . _Coerce + +-- | Google storage location of the pmml model file. +iStoragePMMLModelLocation :: Lens' Insert (Maybe Text) +iStoragePMMLModelLocation + = lens _iStoragePMMLModelLocation + (\ s a -> s{_iStoragePMMLModelLocation = a}) + +-- | The Id of the model to be copied over. +iSourceModel :: Lens' Insert (Maybe Text) +iSourceModel + = lens _iSourceModel (\ s a -> s{_iSourceModel = a}) + +-- | The unique name for the predictive model. +iId :: Lens' Insert (Maybe Text) +iId = lens _iId (\ s a -> s{_iId = a}) + +-- | Google storage location of the preprocessing pmml file. +iStoragePMMLLocation :: Lens' Insert (Maybe Text) +iStoragePMMLLocation + = lens _iStoragePMMLLocation + (\ s a -> s{_iStoragePMMLLocation = a}) + +instance FromJSON Insert where + parseJSON + = withObject "Insert" + (\ o -> + Insert <$> + (o .:? "storageDataLocation") <*> (o .:? "modelType") + <*> (o .:? "trainingInstances" .!= mempty) + <*> (o .:? "utility" .!= mempty) + <*> (o .:? "storagePMMLModelLocation") + <*> (o .:? "sourceModel") + <*> (o .:? "id") + <*> (o .:? "storagePMMLLocation")) + +instance ToJSON Insert where + toJSON Insert{..} + = object + (catMaybes + [("storageDataLocation" .=) <$> + _iStorageDataLocation, + ("modelType" .=) <$> _iModelType, + ("trainingInstances" .=) <$> _iTrainingInstances, + ("utility" .=) <$> _iUtility, + ("storagePMMLModelLocation" .=) <$> + _iStoragePMMLModelLocation, + ("sourceModel" .=) <$> _iSourceModel, + ("id" .=) <$> _iId, + ("storagePMMLLocation" .=) <$> + _iStoragePMMLLocation]) + +-- +-- /See:/ 'list' smart constructor. +data List = List + { _lNextPageToken :: !(Maybe Text) + , _lKind :: !Text + , _lItems :: !(Maybe [Maybe Insert2]) + , _lSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'List' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lNextPageToken' +-- +-- * 'lKind' +-- +-- * 'lItems' +-- +-- * 'lSelfLink' +list + :: List +list = + List + { _lNextPageToken = Nothing + , _lKind = "prediction#list" + , _lItems = Nothing + , _lSelfLink = Nothing + } + +-- | Pagination token to fetch the next page, if one exists. +lNextPageToken :: Lens' List (Maybe Text) +lNextPageToken + = lens _lNextPageToken + (\ s a -> s{_lNextPageToken = a}) + +-- | What kind of resource this is. +lKind :: Lens' List Text +lKind = lens _lKind (\ s a -> s{_lKind = a}) + +-- | List of models. +lItems :: Lens' List [Maybe Insert2] +lItems + = lens _lItems (\ s a -> s{_lItems = a}) . _Default . + _Coerce + +-- | A URL to re-request this resource. +lSelfLink :: Lens' List (Maybe Text) +lSelfLink + = lens _lSelfLink (\ s a -> s{_lSelfLink = a}) + +instance FromJSON List where + parseJSON + = withObject "List" + (\ o -> + List <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "prediction#list") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON List where + toJSON List{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lNextPageToken, + Just ("kind" .= _lKind), ("items" .=) <$> _lItems, + ("selfLink" .=) <$> _lSelfLink]) + +-- +-- /See:/ 'insert2' smart constructor. +data Insert2 = Insert2 + { _insStorageDataLocation :: !(Maybe Text) + , _insModelType :: !(Maybe Text) + , _insKind :: !Text + , _insCreated :: !(Maybe UTCTime) + , _insTrainingComplete :: !(Maybe UTCTime) + , _insSelfLink :: !(Maybe Text) + , _insTrainingStatus :: !(Maybe Text) + , _insStoragePMMLModelLocation :: !(Maybe Text) + , _insId :: !(Maybe Text) + , _insStoragePMMLLocation :: !(Maybe Text) + , _insModelInfo :: !(Maybe Insert2ModelInfo) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Insert2' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'insStorageDataLocation' +-- +-- * 'insModelType' +-- +-- * 'insKind' +-- +-- * 'insCreated' +-- +-- * 'insTrainingComplete' +-- +-- * 'insSelfLink' +-- +-- * 'insTrainingStatus' +-- +-- * 'insStoragePMMLModelLocation' +-- +-- * 'insId' +-- +-- * 'insStoragePMMLLocation' +-- +-- * 'insModelInfo' +insert2 + :: Insert2 +insert2 = + Insert2 + { _insStorageDataLocation = Nothing + , _insModelType = Nothing + , _insKind = "prediction#training" + , _insCreated = Nothing + , _insTrainingComplete = Nothing + , _insSelfLink = Nothing + , _insTrainingStatus = Nothing + , _insStoragePMMLModelLocation = Nothing + , _insId = Nothing + , _insStoragePMMLLocation = Nothing + , _insModelInfo = Nothing + } + +-- | Google storage location of the training data file. +insStorageDataLocation :: Lens' Insert2 (Maybe Text) +insStorageDataLocation + = lens _insStorageDataLocation + (\ s a -> s{_insStorageDataLocation = a}) + +-- | Type of predictive model (CLASSIFICATION or REGRESSION). +insModelType :: Lens' Insert2 (Maybe Text) +insModelType + = lens _insModelType (\ s a -> s{_insModelType = a}) + +-- | What kind of resource this is. +insKind :: Lens' Insert2 Text +insKind = lens _insKind (\ s a -> s{_insKind = a}) + +-- | Insert time of the model (as a RFC 3339 timestamp). +insCreated :: Lens' Insert2 (Maybe UTCTime) +insCreated + = lens _insCreated (\ s a -> s{_insCreated = a}) + +-- | Training completion time (as a RFC 3339 timestamp). +insTrainingComplete :: Lens' Insert2 (Maybe UTCTime) +insTrainingComplete + = lens _insTrainingComplete + (\ s a -> s{_insTrainingComplete = a}) + +-- | A URL to re-request this resource. +insSelfLink :: Lens' Insert2 (Maybe Text) +insSelfLink + = lens _insSelfLink (\ s a -> s{_insSelfLink = a}) + +-- | The current status of the training job. This can be one of following: +-- RUNNING; DONE; ERROR; ERROR: TRAINING JOB NOT FOUND +insTrainingStatus :: Lens' Insert2 (Maybe Text) +insTrainingStatus + = lens _insTrainingStatus + (\ s a -> s{_insTrainingStatus = a}) + +-- | Google storage location of the pmml model file. +insStoragePMMLModelLocation :: Lens' Insert2 (Maybe Text) +insStoragePMMLModelLocation + = lens _insStoragePMMLModelLocation + (\ s a -> s{_insStoragePMMLModelLocation = a}) + +-- | The unique name for the predictive model. +insId :: Lens' Insert2 (Maybe Text) +insId = lens _insId (\ s a -> s{_insId = a}) + +-- | Google storage location of the preprocessing pmml file. +insStoragePMMLLocation :: Lens' Insert2 (Maybe Text) +insStoragePMMLLocation + = lens _insStoragePMMLLocation + (\ s a -> s{_insStoragePMMLLocation = a}) + +-- | Model metadata. +insModelInfo :: Lens' Insert2 (Maybe Insert2ModelInfo) +insModelInfo + = lens _insModelInfo (\ s a -> s{_insModelInfo = a}) + +instance FromJSON Insert2 where + parseJSON + = withObject "Insert2" + (\ o -> + Insert2 <$> + (o .:? "storageDataLocation") <*> (o .:? "modelType") + <*> (o .:? "kind" .!= "prediction#training") + <*> (o .:? "created") + <*> (o .:? "trainingComplete") + <*> (o .:? "selfLink") + <*> (o .:? "trainingStatus") + <*> (o .:? "storagePMMLModelLocation") + <*> (o .:? "id") + <*> (o .:? "storagePMMLLocation") + <*> (o .:? "modelInfo")) + +instance ToJSON Insert2 where + toJSON Insert2{..} + = object + (catMaybes + [("storageDataLocation" .=) <$> + _insStorageDataLocation, + ("modelType" .=) <$> _insModelType, + Just ("kind" .= _insKind), + ("created" .=) <$> _insCreated, + ("trainingComplete" .=) <$> _insTrainingComplete, + ("selfLink" .=) <$> _insSelfLink, + ("trainingStatus" .=) <$> _insTrainingStatus, + ("storagePMMLModelLocation" .=) <$> + _insStoragePMMLModelLocation, + ("id" .=) <$> _insId, + ("storagePMMLLocation" .=) <$> + _insStoragePMMLLocation, + ("modelInfo" .=) <$> _insModelInfo]) + +-- +-- /See:/ 'input' smart constructor. +newtype Input = Input + { _iInput :: Maybe InputInput + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Input' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iInput' +input + :: Input +input = + Input + { _iInput = Nothing + } + +-- | Input to the model for a prediction. +iInput :: Lens' Input (Maybe InputInput) +iInput = lens _iInput (\ s a -> s{_iInput = a}) + +instance FromJSON Input where + parseJSON + = withObject "Input" + (\ o -> Input <$> (o .:? "input")) + +instance ToJSON Input where + toJSON Input{..} + = object (catMaybes [("input" .=) <$> _iInput]) + +-- +-- /See:/ 'analyze' smart constructor. +data Analyze = Analyze + { _aKind :: !Text + , _aModelDescription :: !(Maybe AnalyzeModelDescription) + , _aSelfLink :: !(Maybe Text) + , _aId :: !(Maybe Text) + , _aErrors :: !(Maybe [AnalyzeErrorsItem]) + , _aDataDescription :: !(Maybe AnalyzeDataDescription) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Analyze' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aKind' +-- +-- * 'aModelDescription' +-- +-- * 'aSelfLink' +-- +-- * 'aId' +-- +-- * 'aErrors' +-- +-- * 'aDataDescription' +analyze + :: Analyze +analyze = + Analyze + { _aKind = "prediction#analyze" + , _aModelDescription = Nothing + , _aSelfLink = Nothing + , _aId = Nothing + , _aErrors = Nothing + , _aDataDescription = Nothing + } + +-- | What kind of resource this is. +aKind :: Lens' Analyze Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | Description of the model. +aModelDescription :: Lens' Analyze (Maybe AnalyzeModelDescription) +aModelDescription + = lens _aModelDescription + (\ s a -> s{_aModelDescription = a}) + +-- | A URL to re-request this resource. +aSelfLink :: Lens' Analyze (Maybe Text) +aSelfLink + = lens _aSelfLink (\ s a -> s{_aSelfLink = a}) + +-- | The unique name for the predictive model. +aId :: Lens' Analyze (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +-- | List of errors with the data. +aErrors :: Lens' Analyze [AnalyzeErrorsItem] +aErrors + = lens _aErrors (\ s a -> s{_aErrors = a}) . _Default + . _Coerce + +-- | Description of the data the model was trained on. +aDataDescription :: Lens' Analyze (Maybe AnalyzeDataDescription) +aDataDescription + = lens _aDataDescription + (\ s a -> s{_aDataDescription = a}) + +instance FromJSON Analyze where + parseJSON + = withObject "Analyze" + (\ o -> + Analyze <$> + (o .:? "kind" .!= "prediction#analyze") <*> + (o .:? "modelDescription") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "errors" .!= mempty) + <*> (o .:? "dataDescription")) + +instance ToJSON Analyze where + toJSON Analyze{..} + = object + (catMaybes + [Just ("kind" .= _aKind), + ("modelDescription" .=) <$> _aModelDescription, + ("selfLink" .=) <$> _aSelfLink, ("id" .=) <$> _aId, + ("errors" .=) <$> _aErrors, + ("dataDescription" .=) <$> _aDataDescription]) + +-- +-- /See:/ 'output' smart constructor. +data Output = Output + { _oOutputValue :: !(Maybe Text) + , _oKind :: !Text + , _oOutputLabel :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oId :: !(Maybe Text) + , _oOutputMulti :: !(Maybe [OutputOutputMultiItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Output' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oOutputValue' +-- +-- * 'oKind' +-- +-- * 'oOutputLabel' +-- +-- * 'oSelfLink' +-- +-- * 'oId' +-- +-- * 'oOutputMulti' +output + :: Output +output = + Output + { _oOutputValue = Nothing + , _oKind = "prediction#output" + , _oOutputLabel = Nothing + , _oSelfLink = Nothing + , _oId = Nothing + , _oOutputMulti = Nothing + } + +-- | The estimated regression value (Regression models only). +oOutputValue :: Lens' Output (Maybe Text) +oOutputValue + = lens _oOutputValue (\ s a -> s{_oOutputValue = a}) + +-- | What kind of resource this is. +oKind :: Lens' Output Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | The most likely class label (Categorical models only). +oOutputLabel :: Lens' Output (Maybe Text) +oOutputLabel + = lens _oOutputLabel (\ s a -> s{_oOutputLabel = a}) + +-- | A URL to re-request this resource. +oSelfLink :: Lens' Output (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | The unique name for the predictive model. +oId :: Lens' Output (Maybe Text) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | A list of class labels with their estimated probabilities (Categorical +-- models only). +oOutputMulti :: Lens' Output [OutputOutputMultiItem] +oOutputMulti + = lens _oOutputMulti (\ s a -> s{_oOutputMulti = a}) + . _Default + . _Coerce + +instance FromJSON Output where + parseJSON + = withObject "Output" + (\ o -> + Output <$> + (o .:? "outputValue") <*> + (o .:? "kind" .!= "prediction#output") + <*> (o .:? "outputLabel") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "outputMulti" .!= mempty)) + +instance ToJSON Output where + toJSON Output{..} + = object + (catMaybes + [("outputValue" .=) <$> _oOutputValue, + Just ("kind" .= _oKind), + ("outputLabel" .=) <$> _oOutputLabel, + ("selfLink" .=) <$> _oSelfLink, ("id" .=) <$> _oId, + ("outputMulti" .=) <$> _oOutputMulti]) + +-- +-- /See:/ 'update' smart constructor. +data Update = Update + { _uCsvInstance :: !(Maybe [JSON]) + , _uOutput :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Update' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uCsvInstance' +-- +-- * 'uOutput' +update + :: Update +update = + Update + { _uCsvInstance = Nothing + , _uOutput = Nothing + } + +-- | The input features for this instance. +uCsvInstance :: Lens' Update [JSON] +uCsvInstance + = lens _uCsvInstance (\ s a -> s{_uCsvInstance = a}) + . _Default + . _Coerce + +-- | The generic output value - could be regression or class label. +uOutput :: Lens' Update (Maybe Text) +uOutput = lens _uOutput (\ s a -> s{_uOutput = a}) + +instance FromJSON Update where + parseJSON + = withObject "Update" + (\ o -> + Update <$> + (o .:? "csvInstance" .!= mempty) <*> + (o .:? "output")) + +instance ToJSON Update where + toJSON Update{..} + = object + (catMaybes + [("csvInstance" .=) <$> _uCsvInstance, + ("output" .=) <$> _uOutput]) diff --git a/gogol-prediction/gen/Network/Google/Prediction/Types/Sum.hs b/gogol-prediction/gen/Network/Google/Prediction/Types/Sum.hs new file mode 100644 index 000000000..bbb2c4da7 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Prediction/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Prediction.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Prediction.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Hostedmodels/Predict.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Hostedmodels/Predict.hs new file mode 100644 index 000000000..170b12926 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Hostedmodels/Predict.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Hostedmodels.Predict +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submit input and request an output against a hosted model. +-- +-- /See:/ for @PredictionHostedmodelsPredict@. +module Prediction.Hostedmodels.Predict + ( + -- * REST Resource + HostedmodelsPredictAPI + + -- * Creating a Request + , hostedmodelsPredict + , HostedmodelsPredict + + -- * Request Lenses + , hpQuotaUser + , hpPrettyPrint + , hpProject + , hpUserIp + , hpKey + , hpOauthToken + , hpFields + , hpHostedModelName + , hpAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionHostedmodelsPredict@ which the +-- 'HostedmodelsPredict' request conforms to. +type HostedmodelsPredictAPI = + Capture "project" Text :> + "hostedmodels" :> + Capture "hostedModelName" Text :> + "predict" :> Post '[JSON] Output + +-- | Submit input and request an output against a hosted model. +-- +-- /See:/ 'hostedmodelsPredict' smart constructor. +data HostedmodelsPredict = HostedmodelsPredict + { _hpQuotaUser :: !(Maybe Text) + , _hpPrettyPrint :: !Bool + , _hpProject :: !Text + , _hpUserIp :: !(Maybe Text) + , _hpKey :: !(Maybe Text) + , _hpOauthToken :: !(Maybe Text) + , _hpFields :: !(Maybe Text) + , _hpHostedModelName :: !Text + , _hpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HostedmodelsPredict'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'hpQuotaUser' +-- +-- * 'hpPrettyPrint' +-- +-- * 'hpProject' +-- +-- * 'hpUserIp' +-- +-- * 'hpKey' +-- +-- * 'hpOauthToken' +-- +-- * 'hpFields' +-- +-- * 'hpHostedModelName' +-- +-- * 'hpAlt' +hostedmodelsPredict + :: Text -- ^ 'project' + -> Text -- ^ 'hostedModelName' + -> HostedmodelsPredict +hostedmodelsPredict pHpProject_ pHpHostedModelName_ = + HostedmodelsPredict + { _hpQuotaUser = Nothing + , _hpPrettyPrint = True + , _hpProject = pHpProject_ + , _hpUserIp = Nothing + , _hpKey = Nothing + , _hpOauthToken = Nothing + , _hpFields = Nothing + , _hpHostedModelName = pHpHostedModelName_ + , _hpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +hpQuotaUser :: Lens' HostedmodelsPredict' (Maybe Text) +hpQuotaUser + = lens _hpQuotaUser (\ s a -> s{_hpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +hpPrettyPrint :: Lens' HostedmodelsPredict' Bool +hpPrettyPrint + = lens _hpPrettyPrint + (\ s a -> s{_hpPrettyPrint = a}) + +-- | The project associated with the model. +hpProject :: Lens' HostedmodelsPredict' Text +hpProject + = lens _hpProject (\ s a -> s{_hpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +hpUserIp :: Lens' HostedmodelsPredict' (Maybe Text) +hpUserIp = lens _hpUserIp (\ s a -> s{_hpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +hpKey :: Lens' HostedmodelsPredict' (Maybe Text) +hpKey = lens _hpKey (\ s a -> s{_hpKey = a}) + +-- | OAuth 2.0 token for the current user. +hpOauthToken :: Lens' HostedmodelsPredict' (Maybe Text) +hpOauthToken + = lens _hpOauthToken (\ s a -> s{_hpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +hpFields :: Lens' HostedmodelsPredict' (Maybe Text) +hpFields = lens _hpFields (\ s a -> s{_hpFields = a}) + +-- | The name of a hosted model. +hpHostedModelName :: Lens' HostedmodelsPredict' Text +hpHostedModelName + = lens _hpHostedModelName + (\ s a -> s{_hpHostedModelName = a}) + +-- | Data format for the response. +hpAlt :: Lens' HostedmodelsPredict' Text +hpAlt = lens _hpAlt (\ s a -> s{_hpAlt = a}) + +instance GoogleRequest HostedmodelsPredict' where + type Rs HostedmodelsPredict' = Output + request = requestWithRoute defReq predictionURL + requestWithRoute r u HostedmodelsPredict{..} + = go _hpQuotaUser _hpPrettyPrint _hpProject _hpUserIp + _hpKey + _hpOauthToken + _hpFields + _hpHostedModelName + _hpAlt + where go + = clientWithRoute + (Proxy :: Proxy HostedmodelsPredictAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Analyze.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Analyze.hs new file mode 100644 index 000000000..2df415a38 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Analyze.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Analyze +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get analysis of the model and the data the model was trained on. +-- +-- /See:/ for @PredictionTrainedmodelsAnalyze@. +module Prediction.Trainedmodels.Analyze + ( + -- * REST Resource + TrainedmodelsAnalyzeAPI + + -- * Creating a Request + , trainedmodelsAnalyze + , TrainedmodelsAnalyze + + -- * Request Lenses + , taQuotaUser + , taPrettyPrint + , taProject + , taUserIp + , taKey + , taId + , taOauthToken + , taFields + , taAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsAnalyze@ which the +-- 'TrainedmodelsAnalyze' request conforms to. +type TrainedmodelsAnalyzeAPI = + Capture "project" Text :> + "trainedmodels" :> + Capture "id" Text :> "analyze" :> Get '[JSON] Analyze + +-- | Get analysis of the model and the data the model was trained on. +-- +-- /See:/ 'trainedmodelsAnalyze' smart constructor. +data TrainedmodelsAnalyze = TrainedmodelsAnalyze + { _taQuotaUser :: !(Maybe Text) + , _taPrettyPrint :: !Bool + , _taProject :: !Text + , _taUserIp :: !(Maybe Text) + , _taKey :: !(Maybe Text) + , _taId :: !Text + , _taOauthToken :: !(Maybe Text) + , _taFields :: !(Maybe Text) + , _taAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsAnalyze'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'taQuotaUser' +-- +-- * 'taPrettyPrint' +-- +-- * 'taProject' +-- +-- * 'taUserIp' +-- +-- * 'taKey' +-- +-- * 'taId' +-- +-- * 'taOauthToken' +-- +-- * 'taFields' +-- +-- * 'taAlt' +trainedmodelsAnalyze + :: Text -- ^ 'project' + -> Text -- ^ 'id' + -> TrainedmodelsAnalyze +trainedmodelsAnalyze pTaProject_ pTaId_ = + TrainedmodelsAnalyze + { _taQuotaUser = Nothing + , _taPrettyPrint = True + , _taProject = pTaProject_ + , _taUserIp = Nothing + , _taKey = Nothing + , _taId = pTaId_ + , _taOauthToken = Nothing + , _taFields = Nothing + , _taAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +taQuotaUser :: Lens' TrainedmodelsAnalyze' (Maybe Text) +taQuotaUser + = lens _taQuotaUser (\ s a -> s{_taQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +taPrettyPrint :: Lens' TrainedmodelsAnalyze' Bool +taPrettyPrint + = lens _taPrettyPrint + (\ s a -> s{_taPrettyPrint = a}) + +-- | The project associated with the model. +taProject :: Lens' TrainedmodelsAnalyze' Text +taProject + = lens _taProject (\ s a -> s{_taProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +taUserIp :: Lens' TrainedmodelsAnalyze' (Maybe Text) +taUserIp = lens _taUserIp (\ s a -> s{_taUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +taKey :: Lens' TrainedmodelsAnalyze' (Maybe Text) +taKey = lens _taKey (\ s a -> s{_taKey = a}) + +-- | The unique name for the predictive model. +taId :: Lens' TrainedmodelsAnalyze' Text +taId = lens _taId (\ s a -> s{_taId = a}) + +-- | OAuth 2.0 token for the current user. +taOauthToken :: Lens' TrainedmodelsAnalyze' (Maybe Text) +taOauthToken + = lens _taOauthToken (\ s a -> s{_taOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +taFields :: Lens' TrainedmodelsAnalyze' (Maybe Text) +taFields = lens _taFields (\ s a -> s{_taFields = a}) + +-- | Data format for the response. +taAlt :: Lens' TrainedmodelsAnalyze' Text +taAlt = lens _taAlt (\ s a -> s{_taAlt = a}) + +instance GoogleRequest TrainedmodelsAnalyze' where + type Rs TrainedmodelsAnalyze' = Analyze + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsAnalyze{..} + = go _taQuotaUser _taPrettyPrint _taProject _taUserIp + _taKey + _taId + _taOauthToken + _taFields + _taAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsAnalyzeAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Delete.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Delete.hs new file mode 100644 index 000000000..2b72f2e45 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Delete.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a trained model. +-- +-- /See:/ for @PredictionTrainedmodelsDelete@. +module Prediction.Trainedmodels.Delete + ( + -- * REST Resource + TrainedmodelsDeleteAPI + + -- * Creating a Request + , trainedmodelsDelete + , TrainedmodelsDelete + + -- * Request Lenses + , tdQuotaUser + , tdPrettyPrint + , tdProject + , tdUserIp + , tdKey + , tdId + , tdOauthToken + , tdFields + , tdAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsDelete@ which the +-- 'TrainedmodelsDelete' request conforms to. +type TrainedmodelsDeleteAPI = + Capture "project" Text :> + "trainedmodels" :> + Capture "id" Text :> Delete '[JSON] () + +-- | Delete a trained model. +-- +-- /See:/ 'trainedmodelsDelete' smart constructor. +data TrainedmodelsDelete = TrainedmodelsDelete + { _tdQuotaUser :: !(Maybe Text) + , _tdPrettyPrint :: !Bool + , _tdProject :: !Text + , _tdUserIp :: !(Maybe Text) + , _tdKey :: !(Maybe Text) + , _tdId :: !Text + , _tdOauthToken :: !(Maybe Text) + , _tdFields :: !(Maybe Text) + , _tdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdQuotaUser' +-- +-- * 'tdPrettyPrint' +-- +-- * 'tdProject' +-- +-- * 'tdUserIp' +-- +-- * 'tdKey' +-- +-- * 'tdId' +-- +-- * 'tdOauthToken' +-- +-- * 'tdFields' +-- +-- * 'tdAlt' +trainedmodelsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'id' + -> TrainedmodelsDelete +trainedmodelsDelete pTdProject_ pTdId_ = + TrainedmodelsDelete + { _tdQuotaUser = Nothing + , _tdPrettyPrint = True + , _tdProject = pTdProject_ + , _tdUserIp = Nothing + , _tdKey = Nothing + , _tdId = pTdId_ + , _tdOauthToken = Nothing + , _tdFields = Nothing + , _tdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tdQuotaUser :: Lens' TrainedmodelsDelete' (Maybe Text) +tdQuotaUser + = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tdPrettyPrint :: Lens' TrainedmodelsDelete' Bool +tdPrettyPrint + = lens _tdPrettyPrint + (\ s a -> s{_tdPrettyPrint = a}) + +-- | The project associated with the model. +tdProject :: Lens' TrainedmodelsDelete' Text +tdProject + = lens _tdProject (\ s a -> s{_tdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tdUserIp :: Lens' TrainedmodelsDelete' (Maybe Text) +tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tdKey :: Lens' TrainedmodelsDelete' (Maybe Text) +tdKey = lens _tdKey (\ s a -> s{_tdKey = a}) + +-- | The unique name for the predictive model. +tdId :: Lens' TrainedmodelsDelete' Text +tdId = lens _tdId (\ s a -> s{_tdId = a}) + +-- | OAuth 2.0 token for the current user. +tdOauthToken :: Lens' TrainedmodelsDelete' (Maybe Text) +tdOauthToken + = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tdFields :: Lens' TrainedmodelsDelete' (Maybe Text) +tdFields = lens _tdFields (\ s a -> s{_tdFields = a}) + +-- | Data format for the response. +tdAlt :: Lens' TrainedmodelsDelete' Text +tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a}) + +instance GoogleRequest TrainedmodelsDelete' where + type Rs TrainedmodelsDelete' = () + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsDelete{..} + = go _tdQuotaUser _tdPrettyPrint _tdProject _tdUserIp + _tdKey + _tdId + _tdOauthToken + _tdFields + _tdAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsDeleteAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Get.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Get.hs new file mode 100644 index 000000000..cb70cd4cd --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Get.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Check training status of your model. +-- +-- /See:/ for @PredictionTrainedmodelsGet@. +module Prediction.Trainedmodels.Get + ( + -- * REST Resource + TrainedmodelsGetAPI + + -- * Creating a Request + , trainedmodelsGet + , TrainedmodelsGet + + -- * Request Lenses + , tgQuotaUser + , tgPrettyPrint + , tgProject + , tgUserIp + , tgKey + , tgId + , tgOauthToken + , tgFields + , tgAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsGet@ which the +-- 'TrainedmodelsGet' request conforms to. +type TrainedmodelsGetAPI = + Capture "project" Text :> + "trainedmodels" :> + Capture "id" Text :> Get '[JSON] Insert2 + +-- | Check training status of your model. +-- +-- /See:/ 'trainedmodelsGet' smart constructor. +data TrainedmodelsGet = TrainedmodelsGet + { _tgQuotaUser :: !(Maybe Text) + , _tgPrettyPrint :: !Bool + , _tgProject :: !Text + , _tgUserIp :: !(Maybe Text) + , _tgKey :: !(Maybe Text) + , _tgId :: !Text + , _tgOauthToken :: !(Maybe Text) + , _tgFields :: !(Maybe Text) + , _tgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tgQuotaUser' +-- +-- * 'tgPrettyPrint' +-- +-- * 'tgProject' +-- +-- * 'tgUserIp' +-- +-- * 'tgKey' +-- +-- * 'tgId' +-- +-- * 'tgOauthToken' +-- +-- * 'tgFields' +-- +-- * 'tgAlt' +trainedmodelsGet + :: Text -- ^ 'project' + -> Text -- ^ 'id' + -> TrainedmodelsGet +trainedmodelsGet pTgProject_ pTgId_ = + TrainedmodelsGet + { _tgQuotaUser = Nothing + , _tgPrettyPrint = True + , _tgProject = pTgProject_ + , _tgUserIp = Nothing + , _tgKey = Nothing + , _tgId = pTgId_ + , _tgOauthToken = Nothing + , _tgFields = Nothing + , _tgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tgQuotaUser :: Lens' TrainedmodelsGet' (Maybe Text) +tgQuotaUser + = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tgPrettyPrint :: Lens' TrainedmodelsGet' Bool +tgPrettyPrint + = lens _tgPrettyPrint + (\ s a -> s{_tgPrettyPrint = a}) + +-- | The project associated with the model. +tgProject :: Lens' TrainedmodelsGet' Text +tgProject + = lens _tgProject (\ s a -> s{_tgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tgUserIp :: Lens' TrainedmodelsGet' (Maybe Text) +tgUserIp = lens _tgUserIp (\ s a -> s{_tgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tgKey :: Lens' TrainedmodelsGet' (Maybe Text) +tgKey = lens _tgKey (\ s a -> s{_tgKey = a}) + +-- | The unique name for the predictive model. +tgId :: Lens' TrainedmodelsGet' Text +tgId = lens _tgId (\ s a -> s{_tgId = a}) + +-- | OAuth 2.0 token for the current user. +tgOauthToken :: Lens' TrainedmodelsGet' (Maybe Text) +tgOauthToken + = lens _tgOauthToken (\ s a -> s{_tgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tgFields :: Lens' TrainedmodelsGet' (Maybe Text) +tgFields = lens _tgFields (\ s a -> s{_tgFields = a}) + +-- | Data format for the response. +tgAlt :: Lens' TrainedmodelsGet' Text +tgAlt = lens _tgAlt (\ s a -> s{_tgAlt = a}) + +instance GoogleRequest TrainedmodelsGet' where + type Rs TrainedmodelsGet' = Insert2 + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsGet{..} + = go _tgQuotaUser _tgPrettyPrint _tgProject _tgUserIp + _tgKey + _tgId + _tgOauthToken + _tgFields + _tgAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsGetAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Insert.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Insert.hs new file mode 100644 index 000000000..6ffbabc73 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Insert.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Train a Prediction API model. +-- +-- /See:/ for @PredictionTrainedmodelsInsert@. +module Prediction.Trainedmodels.Insert + ( + -- * REST Resource + TrainedmodelsInsertAPI + + -- * Creating a Request + , trainedmodelsInsert + , TrainedmodelsInsert + + -- * Request Lenses + , tiQuotaUser + , tiPrettyPrint + , tiProject + , tiUserIp + , tiKey + , tiOauthToken + , tiFields + , tiAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsInsert@ which the +-- 'TrainedmodelsInsert' request conforms to. +type TrainedmodelsInsertAPI = + Capture "project" Text :> + "trainedmodels" :> Post '[JSON] Insert2 + +-- | Train a Prediction API model. +-- +-- /See:/ 'trainedmodelsInsert' smart constructor. +data TrainedmodelsInsert = TrainedmodelsInsert + { _tiQuotaUser :: !(Maybe Text) + , _tiPrettyPrint :: !Bool + , _tiProject :: !Text + , _tiUserIp :: !(Maybe Text) + , _tiKey :: !(Maybe Text) + , _tiOauthToken :: !(Maybe Text) + , _tiFields :: !(Maybe Text) + , _tiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiQuotaUser' +-- +-- * 'tiPrettyPrint' +-- +-- * 'tiProject' +-- +-- * 'tiUserIp' +-- +-- * 'tiKey' +-- +-- * 'tiOauthToken' +-- +-- * 'tiFields' +-- +-- * 'tiAlt' +trainedmodelsInsert + :: Text -- ^ 'project' + -> TrainedmodelsInsert +trainedmodelsInsert pTiProject_ = + TrainedmodelsInsert + { _tiQuotaUser = Nothing + , _tiPrettyPrint = True + , _tiProject = pTiProject_ + , _tiUserIp = Nothing + , _tiKey = Nothing + , _tiOauthToken = Nothing + , _tiFields = Nothing + , _tiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tiQuotaUser :: Lens' TrainedmodelsInsert' (Maybe Text) +tiQuotaUser + = lens _tiQuotaUser (\ s a -> s{_tiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tiPrettyPrint :: Lens' TrainedmodelsInsert' Bool +tiPrettyPrint + = lens _tiPrettyPrint + (\ s a -> s{_tiPrettyPrint = a}) + +-- | The project associated with the model. +tiProject :: Lens' TrainedmodelsInsert' Text +tiProject + = lens _tiProject (\ s a -> s{_tiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tiUserIp :: Lens' TrainedmodelsInsert' (Maybe Text) +tiUserIp = lens _tiUserIp (\ s a -> s{_tiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tiKey :: Lens' TrainedmodelsInsert' (Maybe Text) +tiKey = lens _tiKey (\ s a -> s{_tiKey = a}) + +-- | OAuth 2.0 token for the current user. +tiOauthToken :: Lens' TrainedmodelsInsert' (Maybe Text) +tiOauthToken + = lens _tiOauthToken (\ s a -> s{_tiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tiFields :: Lens' TrainedmodelsInsert' (Maybe Text) +tiFields = lens _tiFields (\ s a -> s{_tiFields = a}) + +-- | Data format for the response. +tiAlt :: Lens' TrainedmodelsInsert' Text +tiAlt = lens _tiAlt (\ s a -> s{_tiAlt = a}) + +instance GoogleRequest TrainedmodelsInsert' where + type Rs TrainedmodelsInsert' = Insert2 + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsInsert{..} + = go _tiQuotaUser _tiPrettyPrint _tiProject _tiUserIp + _tiKey + _tiOauthToken + _tiFields + _tiAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsInsertAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/List.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/List.hs new file mode 100644 index 000000000..ddabf2291 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/List.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List available models. +-- +-- /See:/ for @PredictionTrainedmodelsList@. +module Prediction.Trainedmodels.List + ( + -- * REST Resource + TrainedmodelsListAPI + + -- * Creating a Request + , trainedmodelsList + , TrainedmodelsList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlProject + , tlUserIp + , tlKey + , tlPageToken + , tlOauthToken + , tlMaxResults + , tlFields + , tlAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsList@ which the +-- 'TrainedmodelsList' request conforms to. +type TrainedmodelsListAPI = + Capture "project" Text :> + "trainedmodels" :> + "list" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> Get '[JSON] List + +-- | List available models. +-- +-- /See:/ 'trainedmodelsList' smart constructor. +data TrainedmodelsList = TrainedmodelsList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlProject :: !Text + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlPageToken :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlMaxResults :: !(Maybe Word32) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlProject' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlPageToken' +-- +-- * 'tlOauthToken' +-- +-- * 'tlMaxResults' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +trainedmodelsList + :: Text -- ^ 'project' + -> TrainedmodelsList +trainedmodelsList pTlProject_ = + TrainedmodelsList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlProject = pTlProject_ + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlPageToken = Nothing + , _tlOauthToken = Nothing + , _tlMaxResults = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TrainedmodelsList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TrainedmodelsList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | The project associated with the model. +tlProject :: Lens' TrainedmodelsList' Text +tlProject + = lens _tlProject (\ s a -> s{_tlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TrainedmodelsList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TrainedmodelsList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | Pagination token. +tlPageToken :: Lens' TrainedmodelsList' (Maybe Text) +tlPageToken + = lens _tlPageToken (\ s a -> s{_tlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TrainedmodelsList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Maximum number of results to return. +tlMaxResults :: Lens' TrainedmodelsList' (Maybe Word32) +tlMaxResults + = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TrainedmodelsList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TrainedmodelsList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TrainedmodelsList' where + type Rs TrainedmodelsList' = List + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsList{..} + = go _tlQuotaUser _tlPrettyPrint _tlProject _tlUserIp + _tlKey + _tlPageToken + _tlOauthToken + _tlMaxResults + _tlFields + _tlAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsListAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Predict.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Predict.hs new file mode 100644 index 000000000..28b708596 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Predict.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Predict +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submit model id and request a prediction. +-- +-- /See:/ for @PredictionTrainedmodelsPredict@. +module Prediction.Trainedmodels.Predict + ( + -- * REST Resource + TrainedmodelsPredictAPI + + -- * Creating a Request + , trainedmodelsPredict + , TrainedmodelsPredict + + -- * Request Lenses + , tpQuotaUser + , tpPrettyPrint + , tpProject + , tpUserIp + , tpKey + , tpId + , tpOauthToken + , tpFields + , tpAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsPredict@ which the +-- 'TrainedmodelsPredict' request conforms to. +type TrainedmodelsPredictAPI = + Capture "project" Text :> + "trainedmodels" :> + Capture "id" Text :> "predict" :> Post '[JSON] Output + +-- | Submit model id and request a prediction. +-- +-- /See:/ 'trainedmodelsPredict' smart constructor. +data TrainedmodelsPredict = TrainedmodelsPredict + { _tpQuotaUser :: !(Maybe Text) + , _tpPrettyPrint :: !Bool + , _tpProject :: !Text + , _tpUserIp :: !(Maybe Text) + , _tpKey :: !(Maybe Text) + , _tpId :: !Text + , _tpOauthToken :: !(Maybe Text) + , _tpFields :: !(Maybe Text) + , _tpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsPredict'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tpQuotaUser' +-- +-- * 'tpPrettyPrint' +-- +-- * 'tpProject' +-- +-- * 'tpUserIp' +-- +-- * 'tpKey' +-- +-- * 'tpId' +-- +-- * 'tpOauthToken' +-- +-- * 'tpFields' +-- +-- * 'tpAlt' +trainedmodelsPredict + :: Text -- ^ 'project' + -> Text -- ^ 'id' + -> TrainedmodelsPredict +trainedmodelsPredict pTpProject_ pTpId_ = + TrainedmodelsPredict + { _tpQuotaUser = Nothing + , _tpPrettyPrint = True + , _tpProject = pTpProject_ + , _tpUserIp = Nothing + , _tpKey = Nothing + , _tpId = pTpId_ + , _tpOauthToken = Nothing + , _tpFields = Nothing + , _tpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tpQuotaUser :: Lens' TrainedmodelsPredict' (Maybe Text) +tpQuotaUser + = lens _tpQuotaUser (\ s a -> s{_tpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tpPrettyPrint :: Lens' TrainedmodelsPredict' Bool +tpPrettyPrint + = lens _tpPrettyPrint + (\ s a -> s{_tpPrettyPrint = a}) + +-- | The project associated with the model. +tpProject :: Lens' TrainedmodelsPredict' Text +tpProject + = lens _tpProject (\ s a -> s{_tpProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tpUserIp :: Lens' TrainedmodelsPredict' (Maybe Text) +tpUserIp = lens _tpUserIp (\ s a -> s{_tpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tpKey :: Lens' TrainedmodelsPredict' (Maybe Text) +tpKey = lens _tpKey (\ s a -> s{_tpKey = a}) + +-- | The unique name for the predictive model. +tpId :: Lens' TrainedmodelsPredict' Text +tpId = lens _tpId (\ s a -> s{_tpId = a}) + +-- | OAuth 2.0 token for the current user. +tpOauthToken :: Lens' TrainedmodelsPredict' (Maybe Text) +tpOauthToken + = lens _tpOauthToken (\ s a -> s{_tpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tpFields :: Lens' TrainedmodelsPredict' (Maybe Text) +tpFields = lens _tpFields (\ s a -> s{_tpFields = a}) + +-- | Data format for the response. +tpAlt :: Lens' TrainedmodelsPredict' Text +tpAlt = lens _tpAlt (\ s a -> s{_tpAlt = a}) + +instance GoogleRequest TrainedmodelsPredict' where + type Rs TrainedmodelsPredict' = Output + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsPredict{..} + = go _tpQuotaUser _tpPrettyPrint _tpProject _tpUserIp + _tpKey + _tpId + _tpOauthToken + _tpFields + _tpAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsPredictAPI) + r + u diff --git a/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Update.hs b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Update.hs new file mode 100644 index 000000000..963a04266 --- /dev/null +++ b/gogol-prediction/gen/Network/Google/Resource/Prediction/Trainedmodels/Update.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Prediction.Trainedmodels.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add new data to a trained model. +-- +-- /See:/ for @PredictionTrainedmodelsUpdate@. +module Prediction.Trainedmodels.Update + ( + -- * REST Resource + TrainedmodelsUpdateAPI + + -- * Creating a Request + , trainedmodelsUpdate + , TrainedmodelsUpdate + + -- * Request Lenses + , tuQuotaUser + , tuPrettyPrint + , tuProject + , tuUserIp + , tuKey + , tuId + , tuOauthToken + , tuFields + , tuAlt + ) where + +import Network.Google.Prediction.Types +import Network.Google.Prelude + +-- | A resource alias for @PredictionTrainedmodelsUpdate@ which the +-- 'TrainedmodelsUpdate' request conforms to. +type TrainedmodelsUpdateAPI = + Capture "project" Text :> + "trainedmodels" :> + Capture "id" Text :> Put '[JSON] Insert2 + +-- | Add new data to a trained model. +-- +-- /See:/ 'trainedmodelsUpdate' smart constructor. +data TrainedmodelsUpdate = TrainedmodelsUpdate + { _tuQuotaUser :: !(Maybe Text) + , _tuPrettyPrint :: !Bool + , _tuProject :: !Text + , _tuUserIp :: !(Maybe Text) + , _tuKey :: !(Maybe Text) + , _tuId :: !Text + , _tuOauthToken :: !(Maybe Text) + , _tuFields :: !(Maybe Text) + , _tuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TrainedmodelsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tuQuotaUser' +-- +-- * 'tuPrettyPrint' +-- +-- * 'tuProject' +-- +-- * 'tuUserIp' +-- +-- * 'tuKey' +-- +-- * 'tuId' +-- +-- * 'tuOauthToken' +-- +-- * 'tuFields' +-- +-- * 'tuAlt' +trainedmodelsUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'id' + -> TrainedmodelsUpdate +trainedmodelsUpdate pTuProject_ pTuId_ = + TrainedmodelsUpdate + { _tuQuotaUser = Nothing + , _tuPrettyPrint = True + , _tuProject = pTuProject_ + , _tuUserIp = Nothing + , _tuKey = Nothing + , _tuId = pTuId_ + , _tuOauthToken = Nothing + , _tuFields = Nothing + , _tuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tuQuotaUser :: Lens' TrainedmodelsUpdate' (Maybe Text) +tuQuotaUser + = lens _tuQuotaUser (\ s a -> s{_tuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tuPrettyPrint :: Lens' TrainedmodelsUpdate' Bool +tuPrettyPrint + = lens _tuPrettyPrint + (\ s a -> s{_tuPrettyPrint = a}) + +-- | The project associated with the model. +tuProject :: Lens' TrainedmodelsUpdate' Text +tuProject + = lens _tuProject (\ s a -> s{_tuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tuUserIp :: Lens' TrainedmodelsUpdate' (Maybe Text) +tuUserIp = lens _tuUserIp (\ s a -> s{_tuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tuKey :: Lens' TrainedmodelsUpdate' (Maybe Text) +tuKey = lens _tuKey (\ s a -> s{_tuKey = a}) + +-- | The unique name for the predictive model. +tuId :: Lens' TrainedmodelsUpdate' Text +tuId = lens _tuId (\ s a -> s{_tuId = a}) + +-- | OAuth 2.0 token for the current user. +tuOauthToken :: Lens' TrainedmodelsUpdate' (Maybe Text) +tuOauthToken + = lens _tuOauthToken (\ s a -> s{_tuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tuFields :: Lens' TrainedmodelsUpdate' (Maybe Text) +tuFields = lens _tuFields (\ s a -> s{_tuFields = a}) + +-- | Data format for the response. +tuAlt :: Lens' TrainedmodelsUpdate' Text +tuAlt = lens _tuAlt (\ s a -> s{_tuAlt = a}) + +instance GoogleRequest TrainedmodelsUpdate' where + type Rs TrainedmodelsUpdate' = Insert2 + request = requestWithRoute defReq predictionURL + requestWithRoute r u TrainedmodelsUpdate{..} + = go _tuQuotaUser _tuPrettyPrint _tuProject _tuUserIp + _tuKey + _tuId + _tuOauthToken + _tuFields + _tuAlt + where go + = clientWithRoute + (Proxy :: Proxy TrainedmodelsUpdateAPI) + r + u diff --git a/gogol-prediction/gogol-prediction.cabal b/gogol-prediction/gogol-prediction.cabal new file mode 100644 index 000000000..de90409fc --- /dev/null +++ b/gogol-prediction/gogol-prediction.cabal @@ -0,0 +1,51 @@ +name: gogol-prediction +version: 0.0.1 +synopsis: Prediction API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you access a cloud hosted machine learning service that makes it + easy to build smart apps + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Prediction + , Network.Google.Prediction.Types + , Network.Google.Resource.Prediction.Hostedmodels.Predict + , Network.Google.Resource.Prediction.Trainedmodels.Analyze + , Network.Google.Resource.Prediction.Trainedmodels.Delete + , Network.Google.Resource.Prediction.Trainedmodels.Get + , Network.Google.Resource.Prediction.Trainedmodels.Insert + , Network.Google.Resource.Prediction.Trainedmodels.List + , Network.Google.Resource.Prediction.Trainedmodels.Predict + , Network.Google.Resource.Prediction.Trainedmodels.Update + + other-modules: + Network.Google.Prediction.Types.Product + , Network.Google.Prediction.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-prediction/src/.gitkeep b/gogol-prediction/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-proximitybeacon/LICENSE b/gogol-proximitybeacon/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-proximitybeacon/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-proximitybeacon/Makefile b/gogol-proximitybeacon/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-proximitybeacon/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-proximitybeacon/README.md b/gogol-proximitybeacon/README.md new file mode 100644 index 000000000..473ac5d95 --- /dev/null +++ b/gogol-proximitybeacon/README.md @@ -0,0 +1,28 @@ +# gogol-proximitybeacon + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Proximity Beacon API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-proximitybeacon` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-proximitybeacon/Setup.hs b/gogol-proximitybeacon/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-proximitybeacon/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs new file mode 100644 index 000000000..d628cd971 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs @@ -0,0 +1,221 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.ProximityBeacon +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | This API provides services to register, manage, index, and search +-- beacons. +-- +-- /See:/ +module Network.Google.ProximityBeacon + ( + -- * API + ProximityBeaconAPI + , proximityBeaconAPI + , proximityBeaconURL + + -- * Service Methods + + -- * REST Resources + + -- ** ProximitybeaconBeaconinfoGetforobserved + , module ProximityBeacon.Beaconinfo.Getforobserved + + -- ** ProximitybeaconBeaconsActivate + , module ProximityBeacon.Beacons.Activate + + -- ** ProximitybeaconBeaconsAttachmentsBatchDelete + , module ProximityBeacon.Beacons.Attachments.BatchDelete + + -- ** ProximitybeaconBeaconsAttachmentsCreate + , module ProximityBeacon.Beacons.Attachments.Create + + -- ** ProximitybeaconBeaconsAttachmentsDelete + , module ProximityBeacon.Beacons.Attachments.Delete + + -- ** ProximitybeaconBeaconsAttachmentsList + , module ProximityBeacon.Beacons.Attachments.List + + -- ** ProximitybeaconBeaconsDeactivate + , module ProximityBeacon.Beacons.Deactivate + + -- ** ProximitybeaconBeaconsDecommission + , module ProximityBeacon.Beacons.Decommission + + -- ** ProximitybeaconBeaconsDiagnosticsList + , module ProximityBeacon.Beacons.Diagnostics.List + + -- ** ProximitybeaconBeaconsGet + , module ProximityBeacon.Beacons.Get + + -- ** ProximitybeaconBeaconsList + , module ProximityBeacon.Beacons.List + + -- ** ProximitybeaconBeaconsRegister + , module ProximityBeacon.Beacons.Register + + -- ** ProximitybeaconBeaconsUpdate + , module ProximityBeacon.Beacons.Update + + -- ** ProximitybeaconNamespacesList + , module ProximityBeacon.Namespaces.List + + -- * Types + + -- ** LatLng + , LatLng + , latLng + , llLatitude + , llLongitude + + -- ** AttachmentInfo + , AttachmentInfo + , attachmentInfo + , aiData + , aiNamespacedType + + -- ** Empty + , Empty + , empty + + -- ** DeleteAttachmentsResponse + , DeleteAttachmentsResponse + , deleteAttachmentsResponse + , darNumDeleted + + -- ** Namespace + , Namespace + , namespace + , nServingVisibility + , nNamespaceName + + -- ** GetInfoForObservedBeaconsRequest + , GetInfoForObservedBeaconsRequest + , getInfoForObservedBeaconsRequest + , gifobrObservations + , gifobrNamespacedTypes + + -- ** ListNamespacesResponse + , ListNamespacesResponse + , listNamespacesResponse + , lnrNamespaces + + -- ** Diagnostics + , Diagnostics + , diagnostics + , dAlerts + , dBeaconName + , dEstimatedLowBatteryDate + + -- ** Date + , Date + , date + , dDay + , dYear + , dMonth + + -- ** Beacon + , Beacon + , beacon + , bLatLng + , bStatus + , bBeaconName + , bIndoorLevel + , bExpectedStability + , bDescription + , bPlaceId + , bAdvertisedId + , bProperties + + -- ** ListBeaconAttachmentsResponse + , ListBeaconAttachmentsResponse + , listBeaconAttachmentsResponse + , lbarAttachments + + -- ** IndoorLevel + , IndoorLevel + , indoorLevel + , ilName + + -- ** Observation + , Observation + , observation + , oTelemetry + , oTimestampMs + , oAdvertisedId + + -- ** BeaconInfo + , BeaconInfo + , beaconInfo + , biAttachments + , biBeaconName + , biDescription + , biAdvertisedId + + -- ** BeaconAttachment + , BeaconAttachment + , beaconAttachment + , baData + , baAttachmentName + , baNamespacedType + + -- ** ListDiagnosticsResponse + , ListDiagnosticsResponse + , listDiagnosticsResponse + , ldrNextPageToken + , ldrDiagnostics + + -- ** AdvertisedId + , AdvertisedId + , advertisedId + , aiId + , aiType + + -- ** ListBeaconsResponse + , ListBeaconsResponse + , listBeaconsResponse + , lbrNextPageToken + , lbrBeacons + , lbrTotalCount + + -- ** GetInfoForObservedBeaconsResponse + , GetInfoForObservedBeaconsResponse + , getInfoForObservedBeaconsResponse + , gifobrBeacons + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types +import Network.Google.Resource.ProximityBeacon.Beaconinfo.Getforobserved +import Network.Google.Resource.ProximityBeacon.Beacons.Activate +import Network.Google.Resource.ProximityBeacon.Beacons.Attachments.BatchDelete +import Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Create +import Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Delete +import Network.Google.Resource.ProximityBeacon.Beacons.Attachments.List +import Network.Google.Resource.ProximityBeacon.Beacons.Deactivate +import Network.Google.Resource.ProximityBeacon.Beacons.Decommission +import Network.Google.Resource.ProximityBeacon.Beacons.Diagnostics.List +import Network.Google.Resource.ProximityBeacon.Beacons.Get +import Network.Google.Resource.ProximityBeacon.Beacons.List +import Network.Google.Resource.ProximityBeacon.Beacons.Register +import Network.Google.Resource.ProximityBeacon.Beacons.Update +import Network.Google.Resource.ProximityBeacon.Namespaces.List + +{- $resources +TODO +-} + +type ProximityBeaconAPI = + Beacons :<|> Namespaces :<|> Beaconinfo + +proximityBeaconAPI :: Proxy ProximityBeaconAPI +proximityBeaconAPI = Proxy diff --git a/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types.hs b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types.hs new file mode 100644 index 000000000..c43200f63 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types.hs @@ -0,0 +1,151 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ProximityBeacon.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ProximityBeacon.Types + ( + -- * Service URL + proximityBeaconURL + + -- * LatLng + , LatLng + , latLng + , llLatitude + , llLongitude + + -- * AttachmentInfo + , AttachmentInfo + , attachmentInfo + , aiData + , aiNamespacedType + + -- * Empty + , Empty + , empty + + -- * DeleteAttachmentsResponse + , DeleteAttachmentsResponse + , deleteAttachmentsResponse + , darNumDeleted + + -- * Namespace + , Namespace + , namespace + , nServingVisibility + , nNamespaceName + + -- * GetInfoForObservedBeaconsRequest + , GetInfoForObservedBeaconsRequest + , getInfoForObservedBeaconsRequest + , gifobrObservations + , gifobrNamespacedTypes + + -- * ListNamespacesResponse + , ListNamespacesResponse + , listNamespacesResponse + , lnrNamespaces + + -- * Diagnostics + , Diagnostics + , diagnostics + , dAlerts + , dBeaconName + , dEstimatedLowBatteryDate + + -- * Date + , Date + , date + , dDay + , dYear + , dMonth + + -- * Beacon + , Beacon + , beacon + , bLatLng + , bStatus + , bBeaconName + , bIndoorLevel + , bExpectedStability + , bDescription + , bPlaceId + , bAdvertisedId + , bProperties + + -- * ListBeaconAttachmentsResponse + , ListBeaconAttachmentsResponse + , listBeaconAttachmentsResponse + , lbarAttachments + + -- * IndoorLevel + , IndoorLevel + , indoorLevel + , ilName + + -- * Observation + , Observation + , observation + , oTelemetry + , oTimestampMs + , oAdvertisedId + + -- * BeaconInfo + , BeaconInfo + , beaconInfo + , biAttachments + , biBeaconName + , biDescription + , biAdvertisedId + + -- * BeaconAttachment + , BeaconAttachment + , beaconAttachment + , baData + , baAttachmentName + , baNamespacedType + + -- * ListDiagnosticsResponse + , ListDiagnosticsResponse + , listDiagnosticsResponse + , ldrNextPageToken + , ldrDiagnostics + + -- * AdvertisedId + , AdvertisedId + , advertisedId + , aiId + , aiType + + -- * ListBeaconsResponse + , ListBeaconsResponse + , listBeaconsResponse + , lbrNextPageToken + , lbrBeacons + , lbrTotalCount + + -- * GetInfoForObservedBeaconsResponse + , GetInfoForObservedBeaconsResponse + , getInfoForObservedBeaconsResponse + , gifobrBeacons + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types.Product +import Network.Google.ProximityBeacon.Types.Sum + +-- | URL referring to version 'v1beta1' of the Google Proximity Beacon API. +proximityBeaconURL :: BaseURL +proximityBeaconURL + = BaseUrl Https + "https://proximitybeacon.googleapis.com/" + 443 diff --git a/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs new file mode 100644 index 000000000..ce4de8606 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs @@ -0,0 +1,1108 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ProximityBeacon.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ProximityBeacon.Types.Product where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types.Sum + +-- | An object representing a latitude\/longitude pair. This is expressed as +-- a pair of doubles representing degrees latitude and degrees longitude. +-- Unless specified otherwise, this must conform to the WGS84 standard. +-- Values must be within normalized ranges. Example of normalization code +-- in Python: def NormalizeLongitude(longitude): \"\"\"Wrapsdecimal degrees +-- longitude to [-180.0, 180.0].\"\"\" q, r = divmod(longitude, 360.0) if r +-- > 180.0 or (r == 180.0 and q \<= -1.0): return r - 360.0 return r def +-- NormalizeLatLng(latitude, longitude): \"\"\"Wraps decimal degrees +-- latitude and longitude to [-180.0, 180.0] and [-90.0, 90.0], +-- respectively.\"\"\" r = latitude % 360.0 if r = 270.0: return r - 360, +-- NormalizeLongitude(longitude) else: return 180 - r, +-- NormalizeLongitude(longitude + 180.0) assert 180.0 == +-- NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) +-- assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == +-- NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, +-- 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, +-- -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == +-- NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == +-- NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == +-- NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == +-- NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == +-- NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == +-- NormalizeLatLng(-270.0, 10.0) +-- +-- /See:/ 'latLng' smart constructor. +data LatLng = LatLng + { _llLatitude :: !(Maybe Double) + , _llLongitude :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LatLng' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llLatitude' +-- +-- * 'llLongitude' +latLng + :: LatLng +latLng = + LatLng + { _llLatitude = Nothing + , _llLongitude = Nothing + } + +-- | The latitude in degrees. It must be in the range [-90.0, +90.0]. +llLatitude :: Lens' LatLng (Maybe Double) +llLatitude + = lens _llLatitude (\ s a -> s{_llLatitude = a}) + +-- | The longitude in degrees. It must be in the range [-180.0, +180.0]. +llLongitude :: Lens' LatLng (Maybe Double) +llLongitude + = lens _llLongitude (\ s a -> s{_llLongitude = a}) + +instance FromJSON LatLng where + parseJSON + = withObject "LatLng" + (\ o -> + LatLng <$> + (o .:? "latitude") <*> (o .:? "longitude")) + +instance ToJSON LatLng where + toJSON LatLng{..} + = object + (catMaybes + [("latitude" .=) <$> _llLatitude, + ("longitude" .=) <$> _llLongitude]) + +-- | A subset of attachment information served via the +-- \`beaconinfo.getforobserved\` method, used when your users encounter +-- your beacons. +-- +-- /See:/ 'attachmentInfo' smart constructor. +data AttachmentInfo = AttachmentInfo + { _aiData :: !(Maybe Word8) + , _aiNamespacedType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AttachmentInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiData' +-- +-- * 'aiNamespacedType' +attachmentInfo + :: AttachmentInfo +attachmentInfo = + AttachmentInfo + { _aiData = Nothing + , _aiNamespacedType = Nothing + } + +-- | An opaque data container for client-provided data. +aiData :: Lens' AttachmentInfo (Maybe Word8) +aiData = lens _aiData (\ s a -> s{_aiData = a}) + +-- | Specifies what kind of attachment this is. Tells a client how to +-- interpret the \`data\` field. Format is namespace\/type, for example +-- scrupulous-wombat-12345\/welcome-message +aiNamespacedType :: Lens' AttachmentInfo (Maybe Text) +aiNamespacedType + = lens _aiNamespacedType + (\ s a -> s{_aiNamespacedType = a}) + +instance FromJSON AttachmentInfo where + parseJSON + = withObject "AttachmentInfo" + (\ o -> + AttachmentInfo <$> + (o .:? "data") <*> (o .:? "namespacedType")) + +instance ToJSON AttachmentInfo where + toJSON AttachmentInfo{..} + = object + (catMaybes + [("data" .=) <$> _aiData, + ("namespacedType" .=) <$> _aiNamespacedType]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Response for a request to delete attachments. +-- +-- /See:/ 'deleteAttachmentsResponse' smart constructor. +newtype DeleteAttachmentsResponse = DeleteAttachmentsResponse + { _darNumDeleted :: Maybe Int32 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeleteAttachmentsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'darNumDeleted' +deleteAttachmentsResponse + :: DeleteAttachmentsResponse +deleteAttachmentsResponse = + DeleteAttachmentsResponse + { _darNumDeleted = Nothing + } + +-- | The number of attachments that were deleted. +darNumDeleted :: Lens' DeleteAttachmentsResponse (Maybe Int32) +darNumDeleted + = lens _darNumDeleted + (\ s a -> s{_darNumDeleted = a}) + +instance FromJSON DeleteAttachmentsResponse where + parseJSON + = withObject "DeleteAttachmentsResponse" + (\ o -> + DeleteAttachmentsResponse <$> (o .:? "numDeleted")) + +instance ToJSON DeleteAttachmentsResponse where + toJSON DeleteAttachmentsResponse{..} + = object + (catMaybes [("numDeleted" .=) <$> _darNumDeleted]) + +-- | An attachment namespace defines read and write access for all the +-- attachments created under it. Each namespace is globally unique, and +-- owned by one project which is the only project that can create +-- attachments under it. +-- +-- /See:/ 'namespace' smart constructor. +data Namespace = Namespace + { _nServingVisibility :: !(Maybe Text) + , _nNamespaceName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Namespace' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nServingVisibility' +-- +-- * 'nNamespaceName' +namespace + :: Namespace +namespace = + Namespace + { _nServingVisibility = Nothing + , _nNamespaceName = Nothing + } + +-- | Specifies what clients may receive attachments under this namespace via +-- \`beaconinfo.getforobserved\`. +nServingVisibility :: Lens' Namespace (Maybe Text) +nServingVisibility + = lens _nServingVisibility + (\ s a -> s{_nServingVisibility = a}) + +-- | Resource name of this namespace. Namespaces names have the format: +-- namespaces\/namespace. +nNamespaceName :: Lens' Namespace (Maybe Text) +nNamespaceName + = lens _nNamespaceName + (\ s a -> s{_nNamespaceName = a}) + +instance FromJSON Namespace where + parseJSON + = withObject "Namespace" + (\ o -> + Namespace <$> + (o .:? "servingVisibility") <*> + (o .:? "namespaceName")) + +instance ToJSON Namespace where + toJSON Namespace{..} + = object + (catMaybes + [("servingVisibility" .=) <$> _nServingVisibility, + ("namespaceName" .=) <$> _nNamespaceName]) + +-- | Request for beacon and attachment information about beacons that a +-- mobile client has encountered \"in the wild\". +-- +-- /See:/ 'getInfoForObservedBeaconsRequest' smart constructor. +data GetInfoForObservedBeaconsRequest = GetInfoForObservedBeaconsRequest + { _gifobrObservations :: !(Maybe [Maybe Observation]) + , _gifobrNamespacedTypes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetInfoForObservedBeaconsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gifobrObservations' +-- +-- * 'gifobrNamespacedTypes' +getInfoForObservedBeaconsRequest + :: GetInfoForObservedBeaconsRequest +getInfoForObservedBeaconsRequest = + GetInfoForObservedBeaconsRequest + { _gifobrObservations = Nothing + , _gifobrNamespacedTypes = Nothing + } + +-- | The beacons that the client has encountered. At least one must be given. +gifobrObservations :: Lens' GetInfoForObservedBeaconsRequest [Maybe Observation] +gifobrObservations + = lens _gifobrObservations + (\ s a -> s{_gifobrObservations = a}) + . _Default + . _Coerce + +-- | Specifies what kind of attachments to include in the response. When +-- given, the response will include only attachments of the given types. +-- When empty, no attachments will be returned. Must be in the format +-- namespace\/type. Accepts \`*\` to specify all types in all namespaces. +-- Optional. +gifobrNamespacedTypes :: Lens' GetInfoForObservedBeaconsRequest [Text] +gifobrNamespacedTypes + = lens _gifobrNamespacedTypes + (\ s a -> s{_gifobrNamespacedTypes = a}) + . _Default + . _Coerce + +instance FromJSON GetInfoForObservedBeaconsRequest + where + parseJSON + = withObject "GetInfoForObservedBeaconsRequest" + (\ o -> + GetInfoForObservedBeaconsRequest <$> + (o .:? "observations" .!= mempty) <*> + (o .:? "namespacedTypes" .!= mempty)) + +instance ToJSON GetInfoForObservedBeaconsRequest + where + toJSON GetInfoForObservedBeaconsRequest{..} + = object + (catMaybes + [("observations" .=) <$> _gifobrObservations, + ("namespacedTypes" .=) <$> _gifobrNamespacedTypes]) + +-- | Response to ListNamespacesRequest that contains all the project\'s +-- namespaces. +-- +-- /See:/ 'listNamespacesResponse' smart constructor. +newtype ListNamespacesResponse = ListNamespacesResponse + { _lnrNamespaces :: Maybe [Maybe Namespace] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListNamespacesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lnrNamespaces' +listNamespacesResponse + :: ListNamespacesResponse +listNamespacesResponse = + ListNamespacesResponse + { _lnrNamespaces = Nothing + } + +-- | The attachments that corresponded to the request params. +lnrNamespaces :: Lens' ListNamespacesResponse [Maybe Namespace] +lnrNamespaces + = lens _lnrNamespaces + (\ s a -> s{_lnrNamespaces = a}) + . _Default + . _Coerce + +instance FromJSON ListNamespacesResponse where + parseJSON + = withObject "ListNamespacesResponse" + (\ o -> + ListNamespacesResponse <$> + (o .:? "namespaces" .!= mempty)) + +instance ToJSON ListNamespacesResponse where + toJSON ListNamespacesResponse{..} + = object + (catMaybes [("namespaces" .=) <$> _lnrNamespaces]) + +-- | Diagnostics for a single beacon. +-- +-- /See:/ 'diagnostics' smart constructor. +data Diagnostics = Diagnostics + { _dAlerts :: !(Maybe [Text]) + , _dBeaconName :: !(Maybe Text) + , _dEstimatedLowBatteryDate :: !(Maybe (Maybe Date)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Diagnostics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dAlerts' +-- +-- * 'dBeaconName' +-- +-- * 'dEstimatedLowBatteryDate' +diagnostics + :: Diagnostics +diagnostics = + Diagnostics + { _dAlerts = Nothing + , _dBeaconName = Nothing + , _dEstimatedLowBatteryDate = Nothing + } + +-- | An unordered list of Alerts that the beacon has. +dAlerts :: Lens' Diagnostics [Text] +dAlerts + = lens _dAlerts (\ s a -> s{_dAlerts = a}) . _Default + . _Coerce + +-- | Resource name of the beacon. +dBeaconName :: Lens' Diagnostics (Maybe Text) +dBeaconName + = lens _dBeaconName (\ s a -> s{_dBeaconName = a}) + +-- | The date when the battery is expected to be low. If the value is missing +-- then there is no estimate for when the battery will be low. This value +-- is only an estimate, not an exact date. +dEstimatedLowBatteryDate :: Lens' Diagnostics (Maybe (Maybe Date)) +dEstimatedLowBatteryDate + = lens _dEstimatedLowBatteryDate + (\ s a -> s{_dEstimatedLowBatteryDate = a}) + +instance FromJSON Diagnostics where + parseJSON + = withObject "Diagnostics" + (\ o -> + Diagnostics <$> + (o .:? "alerts" .!= mempty) <*> (o .:? "beaconName") + <*> (o .:? "estimatedLowBatteryDate")) + +instance ToJSON Diagnostics where + toJSON Diagnostics{..} + = object + (catMaybes + [("alerts" .=) <$> _dAlerts, + ("beaconName" .=) <$> _dBeaconName, + ("estimatedLowBatteryDate" .=) <$> + _dEstimatedLowBatteryDate]) + +-- | Represents a whole calendar date, e.g. date of birth. The time of day +-- and time zone are either specified elsewhere or are not significant. The +-- date is relative to the Proleptic Gregorian Calendar. The day may be 0 +-- to represent a year and month where the day is not significant, e.g. +-- credit card expiration date. The year may be 0 to represent a month and +-- day independent of year, e.g. anniversary date. Related types are +-- [google.type.TimeOfDay][] and \`google.protobuf.Timestamp\`. +-- +-- /See:/ 'date' smart constructor. +data Date = Date + { _dDay :: !(Maybe Int32) + , _dYear :: !(Maybe Int32) + , _dMonth :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Date' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dDay' +-- +-- * 'dYear' +-- +-- * 'dMonth' +date + :: Date +date = + Date + { _dDay = Nothing + , _dYear = Nothing + , _dMonth = Nothing + } + +-- | Day of month. Must be from 1 to 31 and valid for the year and month, or +-- 0 if specifying a year\/month where the day is not sigificant. +dDay :: Lens' Date (Maybe Int32) +dDay = lens _dDay (\ s a -> s{_dDay = a}) + +-- | Year of date. Must be from 1 to 9,999, or 0 if specifying a date without +-- a year. +dYear :: Lens' Date (Maybe Int32) +dYear = lens _dYear (\ s a -> s{_dYear = a}) + +-- | Month of year of date. Must be from 1 to 12. +dMonth :: Lens' Date (Maybe Int32) +dMonth = lens _dMonth (\ s a -> s{_dMonth = a}) + +instance FromJSON Date where + parseJSON + = withObject "Date" + (\ o -> + Date <$> + (o .:? "day") <*> (o .:? "year") <*> (o .:? "month")) + +instance ToJSON Date where + toJSON Date{..} + = object + (catMaybes + [("day" .=) <$> _dDay, ("year" .=) <$> _dYear, + ("month" .=) <$> _dMonth]) + +-- | Details of a beacon device. +-- +-- /See:/ 'beacon' smart constructor. +data Beacon = Beacon + { _bLatLng :: !(Maybe (Maybe LatLng)) + , _bStatus :: !(Maybe Text) + , _bBeaconName :: !(Maybe Text) + , _bIndoorLevel :: !(Maybe (Maybe IndoorLevel)) + , _bExpectedStability :: !(Maybe Text) + , _bDescription :: !(Maybe Text) + , _bPlaceId :: !(Maybe Text) + , _bAdvertisedId :: !(Maybe (Maybe AdvertisedId)) + , _bProperties :: !(Maybe BeaconProperties) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Beacon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bLatLng' +-- +-- * 'bStatus' +-- +-- * 'bBeaconName' +-- +-- * 'bIndoorLevel' +-- +-- * 'bExpectedStability' +-- +-- * 'bDescription' +-- +-- * 'bPlaceId' +-- +-- * 'bAdvertisedId' +-- +-- * 'bProperties' +beacon + :: Beacon +beacon = + Beacon + { _bLatLng = Nothing + , _bStatus = Nothing + , _bBeaconName = Nothing + , _bIndoorLevel = Nothing + , _bExpectedStability = Nothing + , _bDescription = Nothing + , _bPlaceId = Nothing + , _bAdvertisedId = Nothing + , _bProperties = Nothing + } + +-- | The location of the beacon, expressed as a latitude and longitude pair. +-- This location is given when the beacon is registered or updated. It does +-- not necessarily indicate the actual current location of the beacon. +-- Optional. +bLatLng :: Lens' Beacon (Maybe (Maybe LatLng)) +bLatLng = lens _bLatLng (\ s a -> s{_bLatLng = a}) + +-- | Current status of the beacon. Required. +bStatus :: Lens' Beacon (Maybe Text) +bStatus = lens _bStatus (\ s a -> s{_bStatus = a}) + +-- | Resource name of this beacon. A beacon name has the format +-- \"beacons\/N!beaconId\" where the beaconId is the base16 ID broadcast by +-- the beacon and N is a code for the beacon\'s type. Possible values are +-- \`3\` for Eddystone, \`1\` for iBeacon, or \`5\` for AltBeacon. This +-- field must be left empty when registering. After reading a beacon, +-- clients can use the name for future operations. +bBeaconName :: Lens' Beacon (Maybe Text) +bBeaconName + = lens _bBeaconName (\ s a -> s{_bBeaconName = a}) + +-- | The indoor level information for this beacon, if known. As returned by +-- the Google Maps API. Optional. +bIndoorLevel :: Lens' Beacon (Maybe (Maybe IndoorLevel)) +bIndoorLevel + = lens _bIndoorLevel (\ s a -> s{_bIndoorLevel = a}) + +-- | Expected location stability. This is set when the beacon is registered +-- or updated, not automatically detected in any way. Optional. +bExpectedStability :: Lens' Beacon (Maybe Text) +bExpectedStability + = lens _bExpectedStability + (\ s a -> s{_bExpectedStability = a}) + +-- | Free text used to identify and describe the beacon. Maximum length 140 +-- characters. Optional. +bDescription :: Lens' Beacon (Maybe Text) +bDescription + = lens _bDescription (\ s a -> s{_bDescription = a}) + +-- | The [Google Places API](\/places\/place-id) Place ID of the place where +-- the beacon is deployed. This is given when the beacon is registered or +-- updated, not automatically detected in any way. Optional. +bPlaceId :: Lens' Beacon (Maybe Text) +bPlaceId = lens _bPlaceId (\ s a -> s{_bPlaceId = a}) + +-- | The identifier of a beacon as advertised by it. This field must be +-- populated when registering. It may be empty when updating a beacon +-- record because it is ignored in updates. +bAdvertisedId :: Lens' Beacon (Maybe (Maybe AdvertisedId)) +bAdvertisedId + = lens _bAdvertisedId + (\ s a -> s{_bAdvertisedId = a}) + +-- | Properties of the beacon device, for example battery type or firmware +-- version. Optional. +bProperties :: Lens' Beacon (Maybe BeaconProperties) +bProperties + = lens _bProperties (\ s a -> s{_bProperties = a}) + +instance FromJSON Beacon where + parseJSON + = withObject "Beacon" + (\ o -> + Beacon <$> + (o .:? "latLng") <*> (o .:? "status") <*> + (o .:? "beaconName") + <*> (o .:? "indoorLevel") + <*> (o .:? "expectedStability") + <*> (o .:? "description") + <*> (o .:? "placeId") + <*> (o .:? "advertisedId") + <*> (o .:? "properties")) + +instance ToJSON Beacon where + toJSON Beacon{..} + = object + (catMaybes + [("latLng" .=) <$> _bLatLng, + ("status" .=) <$> _bStatus, + ("beaconName" .=) <$> _bBeaconName, + ("indoorLevel" .=) <$> _bIndoorLevel, + ("expectedStability" .=) <$> _bExpectedStability, + ("description" .=) <$> _bDescription, + ("placeId" .=) <$> _bPlaceId, + ("advertisedId" .=) <$> _bAdvertisedId, + ("properties" .=) <$> _bProperties]) + +-- | Response to ListBeaconAttachments that contains the requested +-- attachments. +-- +-- /See:/ 'listBeaconAttachmentsResponse' smart constructor. +newtype ListBeaconAttachmentsResponse = ListBeaconAttachmentsResponse + { _lbarAttachments :: Maybe [Maybe BeaconAttachment] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListBeaconAttachmentsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbarAttachments' +listBeaconAttachmentsResponse + :: ListBeaconAttachmentsResponse +listBeaconAttachmentsResponse = + ListBeaconAttachmentsResponse + { _lbarAttachments = Nothing + } + +-- | The attachments that corresponded to the request params. +lbarAttachments :: Lens' ListBeaconAttachmentsResponse [Maybe BeaconAttachment] +lbarAttachments + = lens _lbarAttachments + (\ s a -> s{_lbarAttachments = a}) + . _Default + . _Coerce + +instance FromJSON ListBeaconAttachmentsResponse where + parseJSON + = withObject "ListBeaconAttachmentsResponse" + (\ o -> + ListBeaconAttachmentsResponse <$> + (o .:? "attachments" .!= mempty)) + +instance ToJSON ListBeaconAttachmentsResponse where + toJSON ListBeaconAttachmentsResponse{..} + = object + (catMaybes [("attachments" .=) <$> _lbarAttachments]) + +-- | Indoor level, a human-readable string as returned by Google Maps APIs, +-- useful to indicate which floor of a building a beacon is located on. +-- +-- /See:/ 'indoorLevel' smart constructor. +newtype IndoorLevel = IndoorLevel + { _ilName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IndoorLevel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilName' +indoorLevel + :: IndoorLevel +indoorLevel = + IndoorLevel + { _ilName = Nothing + } + +-- | The name of this level. +ilName :: Lens' IndoorLevel (Maybe Text) +ilName = lens _ilName (\ s a -> s{_ilName = a}) + +instance FromJSON IndoorLevel where + parseJSON + = withObject "IndoorLevel" + (\ o -> IndoorLevel <$> (o .:? "name")) + +instance ToJSON IndoorLevel where + toJSON IndoorLevel{..} + = object (catMaybes [("name" .=) <$> _ilName]) + +-- | Represents one beacon observed once. +-- +-- /See:/ 'observation' smart constructor. +data Observation = Observation + { _oTelemetry :: !(Maybe Word8) + , _oTimestampMs :: !(Maybe Text) + , _oAdvertisedId :: !(Maybe (Maybe AdvertisedId)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Observation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTelemetry' +-- +-- * 'oTimestampMs' +-- +-- * 'oAdvertisedId' +observation + :: Observation +observation = + Observation + { _oTelemetry = Nothing + , _oTimestampMs = Nothing + , _oAdvertisedId = Nothing + } + +-- | The array of telemetry bytes received from the beacon. The server is +-- responsible for parsing it. This field may frequently be empty, as with +-- a beacon that transmits telemetry only occasionally. +oTelemetry :: Lens' Observation (Maybe Word8) +oTelemetry + = lens _oTelemetry (\ s a -> s{_oTelemetry = a}) + +-- | Time when the beacon was observed. Being sourced from a mobile device, +-- this time may be suspect. +oTimestampMs :: Lens' Observation (Maybe Text) +oTimestampMs + = lens _oTimestampMs (\ s a -> s{_oTimestampMs = a}) + +-- | The ID advertised by the beacon the client has encountered. Required. +oAdvertisedId :: Lens' Observation (Maybe (Maybe AdvertisedId)) +oAdvertisedId + = lens _oAdvertisedId + (\ s a -> s{_oAdvertisedId = a}) + +instance FromJSON Observation where + parseJSON + = withObject "Observation" + (\ o -> + Observation <$> + (o .:? "telemetry") <*> (o .:? "timestampMs") <*> + (o .:? "advertisedId")) + +instance ToJSON Observation where + toJSON Observation{..} + = object + (catMaybes + [("telemetry" .=) <$> _oTelemetry, + ("timestampMs" .=) <$> _oTimestampMs, + ("advertisedId" .=) <$> _oAdvertisedId]) + +-- | A subset of beacon information served via the +-- \`beaconinfo.getforobserved\` method, which you call when users of your +-- app encounter your beacons. +-- +-- /See:/ 'beaconInfo' smart constructor. +data BeaconInfo = BeaconInfo + { _biAttachments :: !(Maybe [Maybe AttachmentInfo]) + , _biBeaconName :: !(Maybe Text) + , _biDescription :: !(Maybe Text) + , _biAdvertisedId :: !(Maybe (Maybe AdvertisedId)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'biAttachments' +-- +-- * 'biBeaconName' +-- +-- * 'biDescription' +-- +-- * 'biAdvertisedId' +beaconInfo + :: BeaconInfo +beaconInfo = + BeaconInfo + { _biAttachments = Nothing + , _biBeaconName = Nothing + , _biDescription = Nothing + , _biAdvertisedId = Nothing + } + +-- | Attachments matching the type(s) requested. May be empty if no +-- attachment types were requested, or if none matched. +biAttachments :: Lens' BeaconInfo [Maybe AttachmentInfo] +biAttachments + = lens _biAttachments + (\ s a -> s{_biAttachments = a}) + . _Default + . _Coerce + +-- | The name under which the beacon is registered. +biBeaconName :: Lens' BeaconInfo (Maybe Text) +biBeaconName + = lens _biBeaconName (\ s a -> s{_biBeaconName = a}) + +-- | Free text used to identify or describe the beacon in a registered +-- establishment. For example: \"entrance\", \"room 101\", etc. May be +-- empty. +biDescription :: Lens' BeaconInfo (Maybe Text) +biDescription + = lens _biDescription + (\ s a -> s{_biDescription = a}) + +-- | The ID advertised by the beacon. +biAdvertisedId :: Lens' BeaconInfo (Maybe (Maybe AdvertisedId)) +biAdvertisedId + = lens _biAdvertisedId + (\ s a -> s{_biAdvertisedId = a}) + +instance FromJSON BeaconInfo where + parseJSON + = withObject "BeaconInfo" + (\ o -> + BeaconInfo <$> + (o .:? "attachments" .!= mempty) <*> + (o .:? "beaconName") + <*> (o .:? "description") + <*> (o .:? "advertisedId")) + +instance ToJSON BeaconInfo where + toJSON BeaconInfo{..} + = object + (catMaybes + [("attachments" .=) <$> _biAttachments, + ("beaconName" .=) <$> _biBeaconName, + ("description" .=) <$> _biDescription, + ("advertisedId" .=) <$> _biAdvertisedId]) + +-- | Project-specific data associated with a beacon. +-- +-- /See:/ 'beaconAttachment' smart constructor. +data BeaconAttachment = BeaconAttachment + { _baData :: !(Maybe Word8) + , _baAttachmentName :: !(Maybe Text) + , _baNamespacedType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconAttachment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baData' +-- +-- * 'baAttachmentName' +-- +-- * 'baNamespacedType' +beaconAttachment + :: BeaconAttachment +beaconAttachment = + BeaconAttachment + { _baData = Nothing + , _baAttachmentName = Nothing + , _baNamespacedType = Nothing + } + +-- | An opaque data container for client-provided data. Must be +-- [base64](http:\/\/tools.ietf.org\/html\/rfc4648#section-4) encoded in +-- HTTP requests, and will be so encoded (with padding) in responses. +-- Required. +baData :: Lens' BeaconAttachment (Maybe Word8) +baData = lens _baData (\ s a -> s{_baData = a}) + +-- | Resource name of this attachment. Attachment names have the format: +-- beacons\/beacon_id\/attachments\/attachment_id. Leave this empty on +-- creation. +baAttachmentName :: Lens' BeaconAttachment (Maybe Text) +baAttachmentName + = lens _baAttachmentName + (\ s a -> s{_baAttachmentName = a}) + +-- | Specifies what kind of attachment this is. Tells a client how to +-- interpret the \`data\` field. Format is namespace\/type. Namespace +-- provides type separation between clients. Type describes the type of +-- \`data\`, for use by the client when parsing the \`data\` field. +-- Required. +baNamespacedType :: Lens' BeaconAttachment (Maybe Text) +baNamespacedType + = lens _baNamespacedType + (\ s a -> s{_baNamespacedType = a}) + +instance FromJSON BeaconAttachment where + parseJSON + = withObject "BeaconAttachment" + (\ o -> + BeaconAttachment <$> + (o .:? "data") <*> (o .:? "attachmentName") <*> + (o .:? "namespacedType")) + +instance ToJSON BeaconAttachment where + toJSON BeaconAttachment{..} + = object + (catMaybes + [("data" .=) <$> _baData, + ("attachmentName" .=) <$> _baAttachmentName, + ("namespacedType" .=) <$> _baNamespacedType]) + +-- | Response that contains the requested diagnostics. +-- +-- /See:/ 'listDiagnosticsResponse' smart constructor. +data ListDiagnosticsResponse = ListDiagnosticsResponse + { _ldrNextPageToken :: !(Maybe Text) + , _ldrDiagnostics :: !(Maybe [Maybe Diagnostics]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListDiagnosticsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ldrNextPageToken' +-- +-- * 'ldrDiagnostics' +listDiagnosticsResponse + :: ListDiagnosticsResponse +listDiagnosticsResponse = + ListDiagnosticsResponse + { _ldrNextPageToken = Nothing + , _ldrDiagnostics = Nothing + } + +-- | Token that can be used for pagination. Returned only if the request +-- matches more beacons than can be returned in this response. +ldrNextPageToken :: Lens' ListDiagnosticsResponse (Maybe Text) +ldrNextPageToken + = lens _ldrNextPageToken + (\ s a -> s{_ldrNextPageToken = a}) + +-- | The diagnostics matching the given request. +ldrDiagnostics :: Lens' ListDiagnosticsResponse [Maybe Diagnostics] +ldrDiagnostics + = lens _ldrDiagnostics + (\ s a -> s{_ldrDiagnostics = a}) + . _Default + . _Coerce + +instance FromJSON ListDiagnosticsResponse where + parseJSON + = withObject "ListDiagnosticsResponse" + (\ o -> + ListDiagnosticsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "diagnostics" .!= mempty)) + +instance ToJSON ListDiagnosticsResponse where + toJSON ListDiagnosticsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ldrNextPageToken, + ("diagnostics" .=) <$> _ldrDiagnostics]) + +-- | Defines a unique identifier of a beacon as broadcast by the device. +-- +-- /See:/ 'advertisedId' smart constructor. +data AdvertisedId = AdvertisedId + { _aiId :: !(Maybe Word8) + , _aiType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AdvertisedId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiId' +-- +-- * 'aiType' +advertisedId + :: AdvertisedId +advertisedId = + AdvertisedId + { _aiId = Nothing + , _aiType = Nothing + } + +-- | The actual beacon identifier, as broadcast by the beacon hardware. Must +-- be [base64](http:\/\/tools.ietf.org\/html\/rfc4648#section-4) encoded in +-- HTTP requests, and will be so encoded (with padding) in responses. The +-- base64 encoding should be of the binary byte-stream and not any textual +-- (such as hex) representation thereof. Required. +aiId :: Lens' AdvertisedId (Maybe Word8) +aiId = lens _aiId (\ s a -> s{_aiId = a}) + +-- | Specifies the identifier type. Required. +aiType :: Lens' AdvertisedId (Maybe Text) +aiType = lens _aiType (\ s a -> s{_aiType = a}) + +instance FromJSON AdvertisedId where + parseJSON + = withObject "AdvertisedId" + (\ o -> + AdvertisedId <$> (o .:? "id") <*> (o .:? "type")) + +instance ToJSON AdvertisedId where + toJSON AdvertisedId{..} + = object + (catMaybes + [("id" .=) <$> _aiId, ("type" .=) <$> _aiType]) + +-- | Response that contains list beacon results and pagination help. +-- +-- /See:/ 'listBeaconsResponse' smart constructor. +data ListBeaconsResponse = ListBeaconsResponse + { _lbrNextPageToken :: !(Maybe Text) + , _lbrBeacons :: !(Maybe [Maybe Beacon]) + , _lbrTotalCount :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListBeaconsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbrNextPageToken' +-- +-- * 'lbrBeacons' +-- +-- * 'lbrTotalCount' +listBeaconsResponse + :: ListBeaconsResponse +listBeaconsResponse = + ListBeaconsResponse + { _lbrNextPageToken = Nothing + , _lbrBeacons = Nothing + , _lbrTotalCount = Nothing + } + +-- | An opaque pagination token that the client may provide in their next +-- request to retrieve the next page of results. +lbrNextPageToken :: Lens' ListBeaconsResponse (Maybe Text) +lbrNextPageToken + = lens _lbrNextPageToken + (\ s a -> s{_lbrNextPageToken = a}) + +-- | The beacons that matched the search criteria. +lbrBeacons :: Lens' ListBeaconsResponse [Maybe Beacon] +lbrBeacons + = lens _lbrBeacons (\ s a -> s{_lbrBeacons = a}) . + _Default + . _Coerce + +-- | Estimate of the total number of beacons matched by the query. Higher +-- values may be less accurate. +lbrTotalCount :: Lens' ListBeaconsResponse (Maybe Int64) +lbrTotalCount + = lens _lbrTotalCount + (\ s a -> s{_lbrTotalCount = a}) + +instance FromJSON ListBeaconsResponse where + parseJSON + = withObject "ListBeaconsResponse" + (\ o -> + ListBeaconsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "beacons" .!= mempty) + <*> (o .:? "totalCount")) + +instance ToJSON ListBeaconsResponse where + toJSON ListBeaconsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lbrNextPageToken, + ("beacons" .=) <$> _lbrBeacons, + ("totalCount" .=) <$> _lbrTotalCount]) + +-- | Information about the requested beacons, optionally including attachment +-- data. +-- +-- /See:/ 'getInfoForObservedBeaconsResponse' smart constructor. +newtype GetInfoForObservedBeaconsResponse = GetInfoForObservedBeaconsResponse + { _gifobrBeacons :: Maybe [Maybe BeaconInfo] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetInfoForObservedBeaconsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gifobrBeacons' +getInfoForObservedBeaconsResponse + :: GetInfoForObservedBeaconsResponse +getInfoForObservedBeaconsResponse = + GetInfoForObservedBeaconsResponse + { _gifobrBeacons = Nothing + } + +-- | Public information about beacons. May be empty if the request matched no +-- beacons. +gifobrBeacons :: Lens' GetInfoForObservedBeaconsResponse [Maybe BeaconInfo] +gifobrBeacons + = lens _gifobrBeacons + (\ s a -> s{_gifobrBeacons = a}) + . _Default + . _Coerce + +instance FromJSON GetInfoForObservedBeaconsResponse + where + parseJSON + = withObject "GetInfoForObservedBeaconsResponse" + (\ o -> + GetInfoForObservedBeaconsResponse <$> + (o .:? "beacons" .!= mempty)) + +instance ToJSON GetInfoForObservedBeaconsResponse + where + toJSON GetInfoForObservedBeaconsResponse{..} + = object + (catMaybes [("beacons" .=) <$> _gifobrBeacons]) diff --git a/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Sum.hs b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Sum.hs new file mode 100644 index 000000000..143c51561 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ProximityBeacon.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ProximityBeacon.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beaconinfo/Getforobserved.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beaconinfo/Getforobserved.hs new file mode 100644 index 000000000..90c410b44 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beaconinfo/Getforobserved.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beaconinfo.Getforobserved +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Given one or more beacon observations, returns any beacon information +-- and attachments accessible to your application. +-- +-- /See:/ for @ProximitybeaconBeaconinfoGetforobserved@. +module ProximityBeacon.Beaconinfo.Getforobserved + ( + -- * REST Resource + BeaconinfoGetforobservedAPI + + -- * Creating a Request + , beaconinfoGetforobserved + , BeaconinfoGetforobserved + + -- * Request Lenses + , bXgafv + , bQuotaUser + , bPrettyPrint + , bUploadProtocol + , bPp + , bAccessToken + , bUploadType + , bBearerToken + , bKey + , bOauthToken + , bFields + , bCallback + , bAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconinfoGetforobserved@ which the +-- 'BeaconinfoGetforobserved' request conforms to. +type BeaconinfoGetforobservedAPI = + "v1beta1" :> + "beaconinfo:getforobserved" :> + Post '[JSON] GetInfoForObservedBeaconsResponse + +-- | Given one or more beacon observations, returns any beacon information +-- and attachments accessible to your application. +-- +-- /See:/ 'beaconinfoGetforobserved' smart constructor. +data BeaconinfoGetforobserved = BeaconinfoGetforobserved + { _bXgafv :: !(Maybe Text) + , _bQuotaUser :: !(Maybe Text) + , _bPrettyPrint :: !Bool + , _bUploadProtocol :: !(Maybe Text) + , _bPp :: !Bool + , _bAccessToken :: !(Maybe Text) + , _bUploadType :: !(Maybe Text) + , _bBearerToken :: !(Maybe Text) + , _bKey :: !(Maybe Text) + , _bOauthToken :: !(Maybe Text) + , _bFields :: !(Maybe Text) + , _bCallback :: !(Maybe Text) + , _bAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconinfoGetforobserved'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bXgafv' +-- +-- * 'bQuotaUser' +-- +-- * 'bPrettyPrint' +-- +-- * 'bUploadProtocol' +-- +-- * 'bPp' +-- +-- * 'bAccessToken' +-- +-- * 'bUploadType' +-- +-- * 'bBearerToken' +-- +-- * 'bKey' +-- +-- * 'bOauthToken' +-- +-- * 'bFields' +-- +-- * 'bCallback' +-- +-- * 'bAlt' +beaconinfoGetforobserved + :: BeaconinfoGetforobserved +beaconinfoGetforobserved = + BeaconinfoGetforobserved + { _bXgafv = Nothing + , _bQuotaUser = Nothing + , _bPrettyPrint = True + , _bUploadProtocol = Nothing + , _bPp = True + , _bAccessToken = Nothing + , _bUploadType = Nothing + , _bBearerToken = Nothing + , _bKey = Nothing + , _bOauthToken = Nothing + , _bFields = Nothing + , _bCallback = Nothing + , _bAlt = "json" + } + +-- | V1 error format. +bXgafv :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bXgafv = lens _bXgafv (\ s a -> s{_bXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bQuotaUser :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bQuotaUser + = lens _bQuotaUser (\ s a -> s{_bQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bPrettyPrint :: Lens' BeaconinfoGetforobserved' Bool +bPrettyPrint + = lens _bPrettyPrint (\ s a -> s{_bPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bUploadProtocol :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bUploadProtocol + = lens _bUploadProtocol + (\ s a -> s{_bUploadProtocol = a}) + +-- | Pretty-print response. +bPp :: Lens' BeaconinfoGetforobserved' Bool +bPp = lens _bPp (\ s a -> s{_bPp = a}) + +-- | OAuth access token. +bAccessToken :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bAccessToken + = lens _bAccessToken (\ s a -> s{_bAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bUploadType :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bUploadType + = lens _bUploadType (\ s a -> s{_bUploadType = a}) + +-- | OAuth bearer token. +bBearerToken :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bBearerToken + = lens _bBearerToken (\ s a -> s{_bBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bKey :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bKey = lens _bKey (\ s a -> s{_bKey = a}) + +-- | OAuth 2.0 token for the current user. +bOauthToken :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bOauthToken + = lens _bOauthToken (\ s a -> s{_bOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bFields :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bFields = lens _bFields (\ s a -> s{_bFields = a}) + +-- | JSONP +bCallback :: Lens' BeaconinfoGetforobserved' (Maybe Text) +bCallback + = lens _bCallback (\ s a -> s{_bCallback = a}) + +-- | Data format for response. +bAlt :: Lens' BeaconinfoGetforobserved' Text +bAlt = lens _bAlt (\ s a -> s{_bAlt = a}) + +instance GoogleRequest BeaconinfoGetforobserved' + where + type Rs BeaconinfoGetforobserved' = + GetInfoForObservedBeaconsResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconinfoGetforobserved{..} + = go _bXgafv _bQuotaUser _bPrettyPrint + _bUploadProtocol + _bPp + _bAccessToken + _bUploadType + _bBearerToken + _bKey + _bOauthToken + _bFields + _bCallback + _bAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconinfoGetforobservedAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Activate.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Activate.hs new file mode 100644 index 000000000..caf9055bb --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Activate.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Activate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | (Re)activates a beacon. A beacon that is active will return information +-- and attachment data when queried via \`beaconinfo.getforobserved\`. +-- Calling this method on an already active beacon will do nothing (but +-- will return a successful response code). +-- +-- /See:/ for @ProximitybeaconBeaconsActivate@. +module ProximityBeacon.Beacons.Activate + ( + -- * REST Resource + BeaconsActivateAPI + + -- * Creating a Request + , beaconsActivate + , BeaconsActivate + + -- * Request Lenses + , baXgafv + , baQuotaUser + , baPrettyPrint + , baUploadProtocol + , baPp + , baAccessToken + , baBeaconName + , baUploadType + , baBearerToken + , baKey + , baOauthToken + , baFields + , baCallback + , baAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsActivate@ which the +-- 'BeaconsActivate' request conforms to. +type BeaconsActivateAPI = + "v1beta1" :> + "{+beaconName}:activate" :> Post '[JSON] Empty + +-- | (Re)activates a beacon. A beacon that is active will return information +-- and attachment data when queried via \`beaconinfo.getforobserved\`. +-- Calling this method on an already active beacon will do nothing (but +-- will return a successful response code). +-- +-- /See:/ 'beaconsActivate' smart constructor. +data BeaconsActivate = BeaconsActivate + { _baXgafv :: !(Maybe Text) + , _baQuotaUser :: !(Maybe Text) + , _baPrettyPrint :: !Bool + , _baUploadProtocol :: !(Maybe Text) + , _baPp :: !Bool + , _baAccessToken :: !(Maybe Text) + , _baBeaconName :: !Text + , _baUploadType :: !(Maybe Text) + , _baBearerToken :: !(Maybe Text) + , _baKey :: !(Maybe Text) + , _baOauthToken :: !(Maybe Text) + , _baFields :: !(Maybe Text) + , _baCallback :: !(Maybe Text) + , _baAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsActivate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baXgafv' +-- +-- * 'baQuotaUser' +-- +-- * 'baPrettyPrint' +-- +-- * 'baUploadProtocol' +-- +-- * 'baPp' +-- +-- * 'baAccessToken' +-- +-- * 'baBeaconName' +-- +-- * 'baUploadType' +-- +-- * 'baBearerToken' +-- +-- * 'baKey' +-- +-- * 'baOauthToken' +-- +-- * 'baFields' +-- +-- * 'baCallback' +-- +-- * 'baAlt' +beaconsActivate + :: Text -- ^ 'beaconName' + -> BeaconsActivate +beaconsActivate pBaBeaconName_ = + BeaconsActivate + { _baXgafv = Nothing + , _baQuotaUser = Nothing + , _baPrettyPrint = True + , _baUploadProtocol = Nothing + , _baPp = True + , _baAccessToken = Nothing + , _baBeaconName = pBaBeaconName_ + , _baUploadType = Nothing + , _baBearerToken = Nothing + , _baKey = Nothing + , _baOauthToken = Nothing + , _baFields = Nothing + , _baCallback = Nothing + , _baAlt = "json" + } + +-- | V1 error format. +baXgafv :: Lens' BeaconsActivate' (Maybe Text) +baXgafv = lens _baXgafv (\ s a -> s{_baXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +baQuotaUser :: Lens' BeaconsActivate' (Maybe Text) +baQuotaUser + = lens _baQuotaUser (\ s a -> s{_baQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +baPrettyPrint :: Lens' BeaconsActivate' Bool +baPrettyPrint + = lens _baPrettyPrint + (\ s a -> s{_baPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +baUploadProtocol :: Lens' BeaconsActivate' (Maybe Text) +baUploadProtocol + = lens _baUploadProtocol + (\ s a -> s{_baUploadProtocol = a}) + +-- | Pretty-print response. +baPp :: Lens' BeaconsActivate' Bool +baPp = lens _baPp (\ s a -> s{_baPp = a}) + +-- | OAuth access token. +baAccessToken :: Lens' BeaconsActivate' (Maybe Text) +baAccessToken + = lens _baAccessToken + (\ s a -> s{_baAccessToken = a}) + +-- | The beacon to activate. Required. +baBeaconName :: Lens' BeaconsActivate' Text +baBeaconName + = lens _baBeaconName (\ s a -> s{_baBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +baUploadType :: Lens' BeaconsActivate' (Maybe Text) +baUploadType + = lens _baUploadType (\ s a -> s{_baUploadType = a}) + +-- | OAuth bearer token. +baBearerToken :: Lens' BeaconsActivate' (Maybe Text) +baBearerToken + = lens _baBearerToken + (\ s a -> s{_baBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +baKey :: Lens' BeaconsActivate' (Maybe Text) +baKey = lens _baKey (\ s a -> s{_baKey = a}) + +-- | OAuth 2.0 token for the current user. +baOauthToken :: Lens' BeaconsActivate' (Maybe Text) +baOauthToken + = lens _baOauthToken (\ s a -> s{_baOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +baFields :: Lens' BeaconsActivate' (Maybe Text) +baFields = lens _baFields (\ s a -> s{_baFields = a}) + +-- | JSONP +baCallback :: Lens' BeaconsActivate' (Maybe Text) +baCallback + = lens _baCallback (\ s a -> s{_baCallback = a}) + +-- | Data format for response. +baAlt :: Lens' BeaconsActivate' Text +baAlt = lens _baAlt (\ s a -> s{_baAlt = a}) + +instance GoogleRequest BeaconsActivate' where + type Rs BeaconsActivate' = Empty + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsActivate{..} + = go _baXgafv _baQuotaUser _baPrettyPrint + _baUploadProtocol + _baPp + _baAccessToken + _baBeaconName + _baUploadType + _baBearerToken + _baKey + _baOauthToken + _baFields + _baCallback + _baAlt + where go + = clientWithRoute (Proxy :: Proxy BeaconsActivateAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs new file mode 100644 index 000000000..3919679f0 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs @@ -0,0 +1,258 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Attachments.BatchDelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes multiple attachments on a given beacon. This operation is +-- permanent and cannot be undone. You can optionally specify +-- \`namespacedType\` to choose which attachments should be deleted. If you +-- do not specify \`namespacedType\`, all your attachments on the given +-- beacon will be deleted. You also may explicitly specify \`*\/*\` to +-- delete all. +-- +-- /See:/ for @ProximitybeaconBeaconsAttachmentsBatchDelete@. +module ProximityBeacon.Beacons.Attachments.BatchDelete + ( + -- * REST Resource + BeaconsAttachmentsBatchDeleteAPI + + -- * Creating a Request + , beaconsAttachmentsBatchDelete + , BeaconsAttachmentsBatchDelete + + -- * Request Lenses + , babdXgafv + , babdQuotaUser + , babdPrettyPrint + , babdUploadProtocol + , babdPp + , babdAccessToken + , babdBeaconName + , babdUploadType + , babdBearerToken + , babdNamespacedType + , babdKey + , babdOauthToken + , babdFields + , babdCallback + , babdAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsAttachmentsBatchDelete@ which the +-- 'BeaconsAttachmentsBatchDelete' request conforms to. +type BeaconsAttachmentsBatchDeleteAPI = + "v1beta1" :> + "{+beaconName}" :> + "attachments:batchDelete" :> + QueryParam "namespacedType" Text :> + Post '[JSON] DeleteAttachmentsResponse + +-- | Deletes multiple attachments on a given beacon. This operation is +-- permanent and cannot be undone. You can optionally specify +-- \`namespacedType\` to choose which attachments should be deleted. If you +-- do not specify \`namespacedType\`, all your attachments on the given +-- beacon will be deleted. You also may explicitly specify \`*\/*\` to +-- delete all. +-- +-- /See:/ 'beaconsAttachmentsBatchDelete' smart constructor. +data BeaconsAttachmentsBatchDelete = BeaconsAttachmentsBatchDelete + { _babdXgafv :: !(Maybe Text) + , _babdQuotaUser :: !(Maybe Text) + , _babdPrettyPrint :: !Bool + , _babdUploadProtocol :: !(Maybe Text) + , _babdPp :: !Bool + , _babdAccessToken :: !(Maybe Text) + , _babdBeaconName :: !Text + , _babdUploadType :: !(Maybe Text) + , _babdBearerToken :: !(Maybe Text) + , _babdNamespacedType :: !(Maybe Text) + , _babdKey :: !(Maybe Text) + , _babdOauthToken :: !(Maybe Text) + , _babdFields :: !(Maybe Text) + , _babdCallback :: !(Maybe Text) + , _babdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsAttachmentsBatchDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'babdXgafv' +-- +-- * 'babdQuotaUser' +-- +-- * 'babdPrettyPrint' +-- +-- * 'babdUploadProtocol' +-- +-- * 'babdPp' +-- +-- * 'babdAccessToken' +-- +-- * 'babdBeaconName' +-- +-- * 'babdUploadType' +-- +-- * 'babdBearerToken' +-- +-- * 'babdNamespacedType' +-- +-- * 'babdKey' +-- +-- * 'babdOauthToken' +-- +-- * 'babdFields' +-- +-- * 'babdCallback' +-- +-- * 'babdAlt' +beaconsAttachmentsBatchDelete + :: Text -- ^ 'beaconName' + -> BeaconsAttachmentsBatchDelete +beaconsAttachmentsBatchDelete pBabdBeaconName_ = + BeaconsAttachmentsBatchDelete + { _babdXgafv = Nothing + , _babdQuotaUser = Nothing + , _babdPrettyPrint = True + , _babdUploadProtocol = Nothing + , _babdPp = True + , _babdAccessToken = Nothing + , _babdBeaconName = pBabdBeaconName_ + , _babdUploadType = Nothing + , _babdBearerToken = Nothing + , _babdNamespacedType = Nothing + , _babdKey = Nothing + , _babdOauthToken = Nothing + , _babdFields = Nothing + , _babdCallback = Nothing + , _babdAlt = "json" + } + +-- | V1 error format. +babdXgafv :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdXgafv + = lens _babdXgafv (\ s a -> s{_babdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +babdQuotaUser :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdQuotaUser + = lens _babdQuotaUser + (\ s a -> s{_babdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +babdPrettyPrint :: Lens' BeaconsAttachmentsBatchDelete' Bool +babdPrettyPrint + = lens _babdPrettyPrint + (\ s a -> s{_babdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +babdUploadProtocol :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdUploadProtocol + = lens _babdUploadProtocol + (\ s a -> s{_babdUploadProtocol = a}) + +-- | Pretty-print response. +babdPp :: Lens' BeaconsAttachmentsBatchDelete' Bool +babdPp = lens _babdPp (\ s a -> s{_babdPp = a}) + +-- | OAuth access token. +babdAccessToken :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdAccessToken + = lens _babdAccessToken + (\ s a -> s{_babdAccessToken = a}) + +-- | The beacon whose attachments are to be deleted. Required. +babdBeaconName :: Lens' BeaconsAttachmentsBatchDelete' Text +babdBeaconName + = lens _babdBeaconName + (\ s a -> s{_babdBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +babdUploadType :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdUploadType + = lens _babdUploadType + (\ s a -> s{_babdUploadType = a}) + +-- | OAuth bearer token. +babdBearerToken :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdBearerToken + = lens _babdBearerToken + (\ s a -> s{_babdBearerToken = a}) + +-- | Specifies the namespace and type of attachments to delete in +-- \`namespace\/type\` format. Accepts \`*\/*\` to specify \"all types in +-- all namespaces\". Optional. +babdNamespacedType :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdNamespacedType + = lens _babdNamespacedType + (\ s a -> s{_babdNamespacedType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +babdKey :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdKey = lens _babdKey (\ s a -> s{_babdKey = a}) + +-- | OAuth 2.0 token for the current user. +babdOauthToken :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdOauthToken + = lens _babdOauthToken + (\ s a -> s{_babdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +babdFields :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdFields + = lens _babdFields (\ s a -> s{_babdFields = a}) + +-- | JSONP +babdCallback :: Lens' BeaconsAttachmentsBatchDelete' (Maybe Text) +babdCallback + = lens _babdCallback (\ s a -> s{_babdCallback = a}) + +-- | Data format for response. +babdAlt :: Lens' BeaconsAttachmentsBatchDelete' Text +babdAlt = lens _babdAlt (\ s a -> s{_babdAlt = a}) + +instance GoogleRequest BeaconsAttachmentsBatchDelete' + where + type Rs BeaconsAttachmentsBatchDelete' = + DeleteAttachmentsResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u + BeaconsAttachmentsBatchDelete{..} + = go _babdXgafv _babdQuotaUser _babdPrettyPrint + _babdUploadProtocol + _babdPp + _babdAccessToken + _babdBeaconName + _babdUploadType + _babdBearerToken + _babdNamespacedType + _babdKey + _babdOauthToken + _babdFields + _babdCallback + _babdAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsAttachmentsBatchDeleteAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Create.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Create.hs new file mode 100644 index 000000000..95890a896 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Create.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Associates the given data with the specified beacon. Attachment data +-- must contain two parts: - A namespaced type. - The actual attachment +-- data itself. The namespaced type consists of two parts, the namespace +-- and the type. The namespace must be one of the values returned by the +-- \`namespaces\` endpoint, while the type can be a string of any +-- characters except for the forward slash (\`\/\`) up to 100 characters in +-- length. Attachment data can be up to 1024 bytes long. +-- +-- /See:/ for @ProximitybeaconBeaconsAttachmentsCreate@. +module ProximityBeacon.Beacons.Attachments.Create + ( + -- * REST Resource + BeaconsAttachmentsCreateAPI + + -- * Creating a Request + , beaconsAttachmentsCreate + , BeaconsAttachmentsCreate + + -- * Request Lenses + , bacXgafv + , bacQuotaUser + , bacPrettyPrint + , bacUploadProtocol + , bacPp + , bacAccessToken + , bacBeaconName + , bacUploadType + , bacBearerToken + , bacKey + , bacOauthToken + , bacFields + , bacCallback + , bacAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsAttachmentsCreate@ which the +-- 'BeaconsAttachmentsCreate' request conforms to. +type BeaconsAttachmentsCreateAPI = + "v1beta1" :> + "{+beaconName}" :> + "attachments" :> Post '[JSON] BeaconAttachment + +-- | Associates the given data with the specified beacon. Attachment data +-- must contain two parts: - A namespaced type. - The actual attachment +-- data itself. The namespaced type consists of two parts, the namespace +-- and the type. The namespace must be one of the values returned by the +-- \`namespaces\` endpoint, while the type can be a string of any +-- characters except for the forward slash (\`\/\`) up to 100 characters in +-- length. Attachment data can be up to 1024 bytes long. +-- +-- /See:/ 'beaconsAttachmentsCreate' smart constructor. +data BeaconsAttachmentsCreate = BeaconsAttachmentsCreate + { _bacXgafv :: !(Maybe Text) + , _bacQuotaUser :: !(Maybe Text) + , _bacPrettyPrint :: !Bool + , _bacUploadProtocol :: !(Maybe Text) + , _bacPp :: !Bool + , _bacAccessToken :: !(Maybe Text) + , _bacBeaconName :: !Text + , _bacUploadType :: !(Maybe Text) + , _bacBearerToken :: !(Maybe Text) + , _bacKey :: !(Maybe Text) + , _bacOauthToken :: !(Maybe Text) + , _bacFields :: !(Maybe Text) + , _bacCallback :: !(Maybe Text) + , _bacAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsAttachmentsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacXgafv' +-- +-- * 'bacQuotaUser' +-- +-- * 'bacPrettyPrint' +-- +-- * 'bacUploadProtocol' +-- +-- * 'bacPp' +-- +-- * 'bacAccessToken' +-- +-- * 'bacBeaconName' +-- +-- * 'bacUploadType' +-- +-- * 'bacBearerToken' +-- +-- * 'bacKey' +-- +-- * 'bacOauthToken' +-- +-- * 'bacFields' +-- +-- * 'bacCallback' +-- +-- * 'bacAlt' +beaconsAttachmentsCreate + :: Text -- ^ 'beaconName' + -> BeaconsAttachmentsCreate +beaconsAttachmentsCreate pBacBeaconName_ = + BeaconsAttachmentsCreate + { _bacXgafv = Nothing + , _bacQuotaUser = Nothing + , _bacPrettyPrint = True + , _bacUploadProtocol = Nothing + , _bacPp = True + , _bacAccessToken = Nothing + , _bacBeaconName = pBacBeaconName_ + , _bacUploadType = Nothing + , _bacBearerToken = Nothing + , _bacKey = Nothing + , _bacOauthToken = Nothing + , _bacFields = Nothing + , _bacCallback = Nothing + , _bacAlt = "json" + } + +-- | V1 error format. +bacXgafv :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacXgafv = lens _bacXgafv (\ s a -> s{_bacXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bacQuotaUser :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacQuotaUser + = lens _bacQuotaUser (\ s a -> s{_bacQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bacPrettyPrint :: Lens' BeaconsAttachmentsCreate' Bool +bacPrettyPrint + = lens _bacPrettyPrint + (\ s a -> s{_bacPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bacUploadProtocol :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacUploadProtocol + = lens _bacUploadProtocol + (\ s a -> s{_bacUploadProtocol = a}) + +-- | Pretty-print response. +bacPp :: Lens' BeaconsAttachmentsCreate' Bool +bacPp = lens _bacPp (\ s a -> s{_bacPp = a}) + +-- | OAuth access token. +bacAccessToken :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacAccessToken + = lens _bacAccessToken + (\ s a -> s{_bacAccessToken = a}) + +-- | The beacon on which the attachment should be created. Required. +bacBeaconName :: Lens' BeaconsAttachmentsCreate' Text +bacBeaconName + = lens _bacBeaconName + (\ s a -> s{_bacBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bacUploadType :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacUploadType + = lens _bacUploadType + (\ s a -> s{_bacUploadType = a}) + +-- | OAuth bearer token. +bacBearerToken :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacBearerToken + = lens _bacBearerToken + (\ s a -> s{_bacBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bacKey :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacKey = lens _bacKey (\ s a -> s{_bacKey = a}) + +-- | OAuth 2.0 token for the current user. +bacOauthToken :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacOauthToken + = lens _bacOauthToken + (\ s a -> s{_bacOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bacFields :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacFields + = lens _bacFields (\ s a -> s{_bacFields = a}) + +-- | JSONP +bacCallback :: Lens' BeaconsAttachmentsCreate' (Maybe Text) +bacCallback + = lens _bacCallback (\ s a -> s{_bacCallback = a}) + +-- | Data format for response. +bacAlt :: Lens' BeaconsAttachmentsCreate' Text +bacAlt = lens _bacAlt (\ s a -> s{_bacAlt = a}) + +instance GoogleRequest BeaconsAttachmentsCreate' + where + type Rs BeaconsAttachmentsCreate' = BeaconAttachment + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsAttachmentsCreate{..} + = go _bacXgafv _bacQuotaUser _bacPrettyPrint + _bacUploadProtocol + _bacPp + _bacAccessToken + _bacBeaconName + _bacUploadType + _bacBearerToken + _bacKey + _bacOauthToken + _bacFields + _bacCallback + _bacAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsAttachmentsCreateAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Delete.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Delete.hs new file mode 100644 index 000000000..5f7924e0b --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/Delete.hs @@ -0,0 +1,238 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified attachment for the given beacon. Each attachment +-- has a unique attachment name (\`attachmentName\`) which is returned when +-- you fetch the attachment data via this API. You specify this with the +-- delete request to control which attachment is removed. This operation +-- cannot be undone. +-- +-- /See:/ for @ProximitybeaconBeaconsAttachmentsDelete@. +module ProximityBeacon.Beacons.Attachments.Delete + ( + -- * REST Resource + BeaconsAttachmentsDeleteAPI + + -- * Creating a Request + , beaconsAttachmentsDelete + , BeaconsAttachmentsDelete + + -- * Request Lenses + , badXgafv + , badQuotaUser + , badPrettyPrint + , badUploadProtocol + , badPp + , badAccessToken + , badUploadType + , badAttachmentName + , badBearerToken + , badKey + , badOauthToken + , badFields + , badCallback + , badAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsAttachmentsDelete@ which the +-- 'BeaconsAttachmentsDelete' request conforms to. +type BeaconsAttachmentsDeleteAPI = + "v1beta1" :> + "{+attachmentName}" :> Delete '[JSON] Empty + +-- | Deletes the specified attachment for the given beacon. Each attachment +-- has a unique attachment name (\`attachmentName\`) which is returned when +-- you fetch the attachment data via this API. You specify this with the +-- delete request to control which attachment is removed. This operation +-- cannot be undone. +-- +-- /See:/ 'beaconsAttachmentsDelete' smart constructor. +data BeaconsAttachmentsDelete = BeaconsAttachmentsDelete + { _badXgafv :: !(Maybe Text) + , _badQuotaUser :: !(Maybe Text) + , _badPrettyPrint :: !Bool + , _badUploadProtocol :: !(Maybe Text) + , _badPp :: !Bool + , _badAccessToken :: !(Maybe Text) + , _badUploadType :: !(Maybe Text) + , _badAttachmentName :: !Text + , _badBearerToken :: !(Maybe Text) + , _badKey :: !(Maybe Text) + , _badOauthToken :: !(Maybe Text) + , _badFields :: !(Maybe Text) + , _badCallback :: !(Maybe Text) + , _badAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsAttachmentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'badXgafv' +-- +-- * 'badQuotaUser' +-- +-- * 'badPrettyPrint' +-- +-- * 'badUploadProtocol' +-- +-- * 'badPp' +-- +-- * 'badAccessToken' +-- +-- * 'badUploadType' +-- +-- * 'badAttachmentName' +-- +-- * 'badBearerToken' +-- +-- * 'badKey' +-- +-- * 'badOauthToken' +-- +-- * 'badFields' +-- +-- * 'badCallback' +-- +-- * 'badAlt' +beaconsAttachmentsDelete + :: Text -- ^ 'attachmentName' + -> BeaconsAttachmentsDelete +beaconsAttachmentsDelete pBadAttachmentName_ = + BeaconsAttachmentsDelete + { _badXgafv = Nothing + , _badQuotaUser = Nothing + , _badPrettyPrint = True + , _badUploadProtocol = Nothing + , _badPp = True + , _badAccessToken = Nothing + , _badUploadType = Nothing + , _badAttachmentName = pBadAttachmentName_ + , _badBearerToken = Nothing + , _badKey = Nothing + , _badOauthToken = Nothing + , _badFields = Nothing + , _badCallback = Nothing + , _badAlt = "json" + } + +-- | V1 error format. +badXgafv :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badXgafv = lens _badXgafv (\ s a -> s{_badXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +badQuotaUser :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badQuotaUser + = lens _badQuotaUser (\ s a -> s{_badQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +badPrettyPrint :: Lens' BeaconsAttachmentsDelete' Bool +badPrettyPrint + = lens _badPrettyPrint + (\ s a -> s{_badPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +badUploadProtocol :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badUploadProtocol + = lens _badUploadProtocol + (\ s a -> s{_badUploadProtocol = a}) + +-- | Pretty-print response. +badPp :: Lens' BeaconsAttachmentsDelete' Bool +badPp = lens _badPp (\ s a -> s{_badPp = a}) + +-- | OAuth access token. +badAccessToken :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badAccessToken + = lens _badAccessToken + (\ s a -> s{_badAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +badUploadType :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badUploadType + = lens _badUploadType + (\ s a -> s{_badUploadType = a}) + +-- | The attachment name (\`attachmentName\`) of the attachment to remove. +-- For example: +-- \`beacons\/3!893737abc9\/attachments\/c5e937-af0-494-959-ec49d12738\` +-- Required. +badAttachmentName :: Lens' BeaconsAttachmentsDelete' Text +badAttachmentName + = lens _badAttachmentName + (\ s a -> s{_badAttachmentName = a}) + +-- | OAuth bearer token. +badBearerToken :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badBearerToken + = lens _badBearerToken + (\ s a -> s{_badBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +badKey :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badKey = lens _badKey (\ s a -> s{_badKey = a}) + +-- | OAuth 2.0 token for the current user. +badOauthToken :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badOauthToken + = lens _badOauthToken + (\ s a -> s{_badOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +badFields :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badFields + = lens _badFields (\ s a -> s{_badFields = a}) + +-- | JSONP +badCallback :: Lens' BeaconsAttachmentsDelete' (Maybe Text) +badCallback + = lens _badCallback (\ s a -> s{_badCallback = a}) + +-- | Data format for response. +badAlt :: Lens' BeaconsAttachmentsDelete' Text +badAlt = lens _badAlt (\ s a -> s{_badAlt = a}) + +instance GoogleRequest BeaconsAttachmentsDelete' + where + type Rs BeaconsAttachmentsDelete' = Empty + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsAttachmentsDelete{..} + = go _badXgafv _badQuotaUser _badPrettyPrint + _badUploadProtocol + _badPp + _badAccessToken + _badUploadType + _badAttachmentName + _badBearerToken + _badKey + _badOauthToken + _badFields + _badCallback + _badAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsAttachmentsDeleteAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/List.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/List.hs new file mode 100644 index 000000000..8f1d801ef --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/List.hs @@ -0,0 +1,254 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Attachments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the attachments for the specified beacon that match the +-- specified namespaced-type pattern. To control which namespaced types are +-- returned, you add the \`namespacedType\` query parameter to the request. +-- You must either use \`*\/*\`, to return all attachments, or the +-- namespace must be one of the ones returned from the \`namespaces\` +-- endpoint. +-- +-- /See:/ for @ProximitybeaconBeaconsAttachmentsList@. +module ProximityBeacon.Beacons.Attachments.List + ( + -- * REST Resource + BeaconsAttachmentsListAPI + + -- * Creating a Request + , beaconsAttachmentsList + , BeaconsAttachmentsList + + -- * Request Lenses + , balXgafv + , balQuotaUser + , balPrettyPrint + , balUploadProtocol + , balPp + , balAccessToken + , balBeaconName + , balUploadType + , balBearerToken + , balNamespacedType + , balKey + , balOauthToken + , balFields + , balCallback + , balAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsAttachmentsList@ which the +-- 'BeaconsAttachmentsList' request conforms to. +type BeaconsAttachmentsListAPI = + "v1beta1" :> + "{+beaconName}" :> + "attachments" :> + QueryParam "namespacedType" Text :> + Get '[JSON] ListBeaconAttachmentsResponse + +-- | Returns the attachments for the specified beacon that match the +-- specified namespaced-type pattern. To control which namespaced types are +-- returned, you add the \`namespacedType\` query parameter to the request. +-- You must either use \`*\/*\`, to return all attachments, or the +-- namespace must be one of the ones returned from the \`namespaces\` +-- endpoint. +-- +-- /See:/ 'beaconsAttachmentsList' smart constructor. +data BeaconsAttachmentsList = BeaconsAttachmentsList + { _balXgafv :: !(Maybe Text) + , _balQuotaUser :: !(Maybe Text) + , _balPrettyPrint :: !Bool + , _balUploadProtocol :: !(Maybe Text) + , _balPp :: !Bool + , _balAccessToken :: !(Maybe Text) + , _balBeaconName :: !Text + , _balUploadType :: !(Maybe Text) + , _balBearerToken :: !(Maybe Text) + , _balNamespacedType :: !(Maybe Text) + , _balKey :: !(Maybe Text) + , _balOauthToken :: !(Maybe Text) + , _balFields :: !(Maybe Text) + , _balCallback :: !(Maybe Text) + , _balAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsAttachmentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'balXgafv' +-- +-- * 'balQuotaUser' +-- +-- * 'balPrettyPrint' +-- +-- * 'balUploadProtocol' +-- +-- * 'balPp' +-- +-- * 'balAccessToken' +-- +-- * 'balBeaconName' +-- +-- * 'balUploadType' +-- +-- * 'balBearerToken' +-- +-- * 'balNamespacedType' +-- +-- * 'balKey' +-- +-- * 'balOauthToken' +-- +-- * 'balFields' +-- +-- * 'balCallback' +-- +-- * 'balAlt' +beaconsAttachmentsList + :: Text -- ^ 'beaconName' + -> BeaconsAttachmentsList +beaconsAttachmentsList pBalBeaconName_ = + BeaconsAttachmentsList + { _balXgafv = Nothing + , _balQuotaUser = Nothing + , _balPrettyPrint = True + , _balUploadProtocol = Nothing + , _balPp = True + , _balAccessToken = Nothing + , _balBeaconName = pBalBeaconName_ + , _balUploadType = Nothing + , _balBearerToken = Nothing + , _balNamespacedType = Nothing + , _balKey = Nothing + , _balOauthToken = Nothing + , _balFields = Nothing + , _balCallback = Nothing + , _balAlt = "json" + } + +-- | V1 error format. +balXgafv :: Lens' BeaconsAttachmentsList' (Maybe Text) +balXgafv = lens _balXgafv (\ s a -> s{_balXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +balQuotaUser :: Lens' BeaconsAttachmentsList' (Maybe Text) +balQuotaUser + = lens _balQuotaUser (\ s a -> s{_balQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +balPrettyPrint :: Lens' BeaconsAttachmentsList' Bool +balPrettyPrint + = lens _balPrettyPrint + (\ s a -> s{_balPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +balUploadProtocol :: Lens' BeaconsAttachmentsList' (Maybe Text) +balUploadProtocol + = lens _balUploadProtocol + (\ s a -> s{_balUploadProtocol = a}) + +-- | Pretty-print response. +balPp :: Lens' BeaconsAttachmentsList' Bool +balPp = lens _balPp (\ s a -> s{_balPp = a}) + +-- | OAuth access token. +balAccessToken :: Lens' BeaconsAttachmentsList' (Maybe Text) +balAccessToken + = lens _balAccessToken + (\ s a -> s{_balAccessToken = a}) + +-- | The beacon whose attachments are to be fetched. Required. +balBeaconName :: Lens' BeaconsAttachmentsList' Text +balBeaconName + = lens _balBeaconName + (\ s a -> s{_balBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +balUploadType :: Lens' BeaconsAttachmentsList' (Maybe Text) +balUploadType + = lens _balUploadType + (\ s a -> s{_balUploadType = a}) + +-- | OAuth bearer token. +balBearerToken :: Lens' BeaconsAttachmentsList' (Maybe Text) +balBearerToken + = lens _balBearerToken + (\ s a -> s{_balBearerToken = a}) + +-- | Specifies the namespace and type of attachment to include in response in +-- namespace\/type format. Accepts \`*\/*\` to specify \"all types in all +-- namespaces\". +balNamespacedType :: Lens' BeaconsAttachmentsList' (Maybe Text) +balNamespacedType + = lens _balNamespacedType + (\ s a -> s{_balNamespacedType = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +balKey :: Lens' BeaconsAttachmentsList' (Maybe Text) +balKey = lens _balKey (\ s a -> s{_balKey = a}) + +-- | OAuth 2.0 token for the current user. +balOauthToken :: Lens' BeaconsAttachmentsList' (Maybe Text) +balOauthToken + = lens _balOauthToken + (\ s a -> s{_balOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +balFields :: Lens' BeaconsAttachmentsList' (Maybe Text) +balFields + = lens _balFields (\ s a -> s{_balFields = a}) + +-- | JSONP +balCallback :: Lens' BeaconsAttachmentsList' (Maybe Text) +balCallback + = lens _balCallback (\ s a -> s{_balCallback = a}) + +-- | Data format for response. +balAlt :: Lens' BeaconsAttachmentsList' Text +balAlt = lens _balAlt (\ s a -> s{_balAlt = a}) + +instance GoogleRequest BeaconsAttachmentsList' where + type Rs BeaconsAttachmentsList' = + ListBeaconAttachmentsResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsAttachmentsList{..} + = go _balXgafv _balQuotaUser _balPrettyPrint + _balUploadProtocol + _balPp + _balAccessToken + _balBeaconName + _balUploadType + _balBearerToken + _balNamespacedType + _balKey + _balOauthToken + _balFields + _balCallback + _balAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsAttachmentsListAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Deactivate.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Deactivate.hs new file mode 100644 index 000000000..516218c49 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Deactivate.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Deactivate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deactivates a beacon. Once deactivated, the API will not return +-- information nor attachment data for the beacon when queried via +-- \`beaconinfo.getforobserved\`. Calling this method on an already +-- inactive beacon will do nothing (but will return a successful response +-- code). +-- +-- /See:/ for @ProximitybeaconBeaconsDeactivate@. +module ProximityBeacon.Beacons.Deactivate + ( + -- * REST Resource + BeaconsDeactivateAPI + + -- * Creating a Request + , beaconsDeactivate + , BeaconsDeactivate + + -- * Request Lenses + , bdXgafv + , bdQuotaUser + , bdPrettyPrint + , bdUploadProtocol + , bdPp + , bdAccessToken + , bdBeaconName + , bdUploadType + , bdBearerToken + , bdKey + , bdOauthToken + , bdFields + , bdCallback + , bdAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsDeactivate@ which the +-- 'BeaconsDeactivate' request conforms to. +type BeaconsDeactivateAPI = + "v1beta1" :> + "{+beaconName}:deactivate" :> Post '[JSON] Empty + +-- | Deactivates a beacon. Once deactivated, the API will not return +-- information nor attachment data for the beacon when queried via +-- \`beaconinfo.getforobserved\`. Calling this method on an already +-- inactive beacon will do nothing (but will return a successful response +-- code). +-- +-- /See:/ 'beaconsDeactivate' smart constructor. +data BeaconsDeactivate = BeaconsDeactivate + { _bdXgafv :: !(Maybe Text) + , _bdQuotaUser :: !(Maybe Text) + , _bdPrettyPrint :: !Bool + , _bdUploadProtocol :: !(Maybe Text) + , _bdPp :: !Bool + , _bdAccessToken :: !(Maybe Text) + , _bdBeaconName :: !Text + , _bdUploadType :: !(Maybe Text) + , _bdBearerToken :: !(Maybe Text) + , _bdKey :: !(Maybe Text) + , _bdOauthToken :: !(Maybe Text) + , _bdFields :: !(Maybe Text) + , _bdCallback :: !(Maybe Text) + , _bdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsDeactivate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bdXgafv' +-- +-- * 'bdQuotaUser' +-- +-- * 'bdPrettyPrint' +-- +-- * 'bdUploadProtocol' +-- +-- * 'bdPp' +-- +-- * 'bdAccessToken' +-- +-- * 'bdBeaconName' +-- +-- * 'bdUploadType' +-- +-- * 'bdBearerToken' +-- +-- * 'bdKey' +-- +-- * 'bdOauthToken' +-- +-- * 'bdFields' +-- +-- * 'bdCallback' +-- +-- * 'bdAlt' +beaconsDeactivate + :: Text -- ^ 'beaconName' + -> BeaconsDeactivate +beaconsDeactivate pBdBeaconName_ = + BeaconsDeactivate + { _bdXgafv = Nothing + , _bdQuotaUser = Nothing + , _bdPrettyPrint = True + , _bdUploadProtocol = Nothing + , _bdPp = True + , _bdAccessToken = Nothing + , _bdBeaconName = pBdBeaconName_ + , _bdUploadType = Nothing + , _bdBearerToken = Nothing + , _bdKey = Nothing + , _bdOauthToken = Nothing + , _bdFields = Nothing + , _bdCallback = Nothing + , _bdAlt = "json" + } + +-- | V1 error format. +bdXgafv :: Lens' BeaconsDeactivate' (Maybe Text) +bdXgafv = lens _bdXgafv (\ s a -> s{_bdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bdQuotaUser :: Lens' BeaconsDeactivate' (Maybe Text) +bdQuotaUser + = lens _bdQuotaUser (\ s a -> s{_bdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bdPrettyPrint :: Lens' BeaconsDeactivate' Bool +bdPrettyPrint + = lens _bdPrettyPrint + (\ s a -> s{_bdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bdUploadProtocol :: Lens' BeaconsDeactivate' (Maybe Text) +bdUploadProtocol + = lens _bdUploadProtocol + (\ s a -> s{_bdUploadProtocol = a}) + +-- | Pretty-print response. +bdPp :: Lens' BeaconsDeactivate' Bool +bdPp = lens _bdPp (\ s a -> s{_bdPp = a}) + +-- | OAuth access token. +bdAccessToken :: Lens' BeaconsDeactivate' (Maybe Text) +bdAccessToken + = lens _bdAccessToken + (\ s a -> s{_bdAccessToken = a}) + +-- | The beacon name of this beacon. +bdBeaconName :: Lens' BeaconsDeactivate' Text +bdBeaconName + = lens _bdBeaconName (\ s a -> s{_bdBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bdUploadType :: Lens' BeaconsDeactivate' (Maybe Text) +bdUploadType + = lens _bdUploadType (\ s a -> s{_bdUploadType = a}) + +-- | OAuth bearer token. +bdBearerToken :: Lens' BeaconsDeactivate' (Maybe Text) +bdBearerToken + = lens _bdBearerToken + (\ s a -> s{_bdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bdKey :: Lens' BeaconsDeactivate' (Maybe Text) +bdKey = lens _bdKey (\ s a -> s{_bdKey = a}) + +-- | OAuth 2.0 token for the current user. +bdOauthToken :: Lens' BeaconsDeactivate' (Maybe Text) +bdOauthToken + = lens _bdOauthToken (\ s a -> s{_bdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bdFields :: Lens' BeaconsDeactivate' (Maybe Text) +bdFields = lens _bdFields (\ s a -> s{_bdFields = a}) + +-- | JSONP +bdCallback :: Lens' BeaconsDeactivate' (Maybe Text) +bdCallback + = lens _bdCallback (\ s a -> s{_bdCallback = a}) + +-- | Data format for response. +bdAlt :: Lens' BeaconsDeactivate' Text +bdAlt = lens _bdAlt (\ s a -> s{_bdAlt = a}) + +instance GoogleRequest BeaconsDeactivate' where + type Rs BeaconsDeactivate' = Empty + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsDeactivate{..} + = go _bdXgafv _bdQuotaUser _bdPrettyPrint + _bdUploadProtocol + _bdPp + _bdAccessToken + _bdBeaconName + _bdUploadType + _bdBearerToken + _bdKey + _bdOauthToken + _bdFields + _bdCallback + _bdAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsDeactivateAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Decommission.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Decommission.hs new file mode 100644 index 000000000..4bff4e74f --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Decommission.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Decommission +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Decommissions the specified beacon in the service. This beacon will no +-- longer be returned from \`beaconinfo.getforobserved\`. This operation is +-- permanent -- you will not be able to re-register a beacon with this ID +-- again. +-- +-- /See:/ for @ProximitybeaconBeaconsDecommission@. +module ProximityBeacon.Beacons.Decommission + ( + -- * REST Resource + BeaconsDecommissionAPI + + -- * Creating a Request + , beaconsDecommission + , BeaconsDecommission + + -- * Request Lenses + , beaXgafv + , beaQuotaUser + , beaPrettyPrint + , beaUploadProtocol + , beaPp + , beaAccessToken + , beaBeaconName + , beaUploadType + , beaBearerToken + , beaKey + , beaOauthToken + , beaFields + , beaCallback + , beaAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsDecommission@ which the +-- 'BeaconsDecommission' request conforms to. +type BeaconsDecommissionAPI = + "v1beta1" :> + "{+beaconName}:decommission" :> Post '[JSON] Empty + +-- | Decommissions the specified beacon in the service. This beacon will no +-- longer be returned from \`beaconinfo.getforobserved\`. This operation is +-- permanent -- you will not be able to re-register a beacon with this ID +-- again. +-- +-- /See:/ 'beaconsDecommission' smart constructor. +data BeaconsDecommission = BeaconsDecommission + { _beaXgafv :: !(Maybe Text) + , _beaQuotaUser :: !(Maybe Text) + , _beaPrettyPrint :: !Bool + , _beaUploadProtocol :: !(Maybe Text) + , _beaPp :: !Bool + , _beaAccessToken :: !(Maybe Text) + , _beaBeaconName :: !Text + , _beaUploadType :: !(Maybe Text) + , _beaBearerToken :: !(Maybe Text) + , _beaKey :: !(Maybe Text) + , _beaOauthToken :: !(Maybe Text) + , _beaFields :: !(Maybe Text) + , _beaCallback :: !(Maybe Text) + , _beaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsDecommission'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'beaXgafv' +-- +-- * 'beaQuotaUser' +-- +-- * 'beaPrettyPrint' +-- +-- * 'beaUploadProtocol' +-- +-- * 'beaPp' +-- +-- * 'beaAccessToken' +-- +-- * 'beaBeaconName' +-- +-- * 'beaUploadType' +-- +-- * 'beaBearerToken' +-- +-- * 'beaKey' +-- +-- * 'beaOauthToken' +-- +-- * 'beaFields' +-- +-- * 'beaCallback' +-- +-- * 'beaAlt' +beaconsDecommission + :: Text -- ^ 'beaconName' + -> BeaconsDecommission +beaconsDecommission pBeaBeaconName_ = + BeaconsDecommission + { _beaXgafv = Nothing + , _beaQuotaUser = Nothing + , _beaPrettyPrint = True + , _beaUploadProtocol = Nothing + , _beaPp = True + , _beaAccessToken = Nothing + , _beaBeaconName = pBeaBeaconName_ + , _beaUploadType = Nothing + , _beaBearerToken = Nothing + , _beaKey = Nothing + , _beaOauthToken = Nothing + , _beaFields = Nothing + , _beaCallback = Nothing + , _beaAlt = "json" + } + +-- | V1 error format. +beaXgafv :: Lens' BeaconsDecommission' (Maybe Text) +beaXgafv = lens _beaXgafv (\ s a -> s{_beaXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +beaQuotaUser :: Lens' BeaconsDecommission' (Maybe Text) +beaQuotaUser + = lens _beaQuotaUser (\ s a -> s{_beaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +beaPrettyPrint :: Lens' BeaconsDecommission' Bool +beaPrettyPrint + = lens _beaPrettyPrint + (\ s a -> s{_beaPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +beaUploadProtocol :: Lens' BeaconsDecommission' (Maybe Text) +beaUploadProtocol + = lens _beaUploadProtocol + (\ s a -> s{_beaUploadProtocol = a}) + +-- | Pretty-print response. +beaPp :: Lens' BeaconsDecommission' Bool +beaPp = lens _beaPp (\ s a -> s{_beaPp = a}) + +-- | OAuth access token. +beaAccessToken :: Lens' BeaconsDecommission' (Maybe Text) +beaAccessToken + = lens _beaAccessToken + (\ s a -> s{_beaAccessToken = a}) + +-- | Beacon that should be decommissioned. Required. +beaBeaconName :: Lens' BeaconsDecommission' Text +beaBeaconName + = lens _beaBeaconName + (\ s a -> s{_beaBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +beaUploadType :: Lens' BeaconsDecommission' (Maybe Text) +beaUploadType + = lens _beaUploadType + (\ s a -> s{_beaUploadType = a}) + +-- | OAuth bearer token. +beaBearerToken :: Lens' BeaconsDecommission' (Maybe Text) +beaBearerToken + = lens _beaBearerToken + (\ s a -> s{_beaBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +beaKey :: Lens' BeaconsDecommission' (Maybe Text) +beaKey = lens _beaKey (\ s a -> s{_beaKey = a}) + +-- | OAuth 2.0 token for the current user. +beaOauthToken :: Lens' BeaconsDecommission' (Maybe Text) +beaOauthToken + = lens _beaOauthToken + (\ s a -> s{_beaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +beaFields :: Lens' BeaconsDecommission' (Maybe Text) +beaFields + = lens _beaFields (\ s a -> s{_beaFields = a}) + +-- | JSONP +beaCallback :: Lens' BeaconsDecommission' (Maybe Text) +beaCallback + = lens _beaCallback (\ s a -> s{_beaCallback = a}) + +-- | Data format for response. +beaAlt :: Lens' BeaconsDecommission' Text +beaAlt = lens _beaAlt (\ s a -> s{_beaAlt = a}) + +instance GoogleRequest BeaconsDecommission' where + type Rs BeaconsDecommission' = Empty + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsDecommission{..} + = go _beaXgafv _beaQuotaUser _beaPrettyPrint + _beaUploadProtocol + _beaPp + _beaAccessToken + _beaBeaconName + _beaUploadType + _beaBearerToken + _beaKey + _beaOauthToken + _beaFields + _beaCallback + _beaAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsDecommissionAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Diagnostics/List.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Diagnostics/List.hs new file mode 100644 index 000000000..e4533bf8f --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Diagnostics/List.hs @@ -0,0 +1,273 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Diagnostics.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the diagnostics for a single beacon. You can also list diagnostics +-- for all the beacons owned by your Google Developers Console project by +-- using the beacon name \`beacons\/-\`. +-- +-- /See:/ for @ProximitybeaconBeaconsDiagnosticsList@. +module ProximityBeacon.Beacons.Diagnostics.List + ( + -- * REST Resource + BeaconsDiagnosticsListAPI + + -- * Creating a Request + , beaconsDiagnosticsList + , BeaconsDiagnosticsList + + -- * Request Lenses + , bdlXgafv + , bdlQuotaUser + , bdlPrettyPrint + , bdlUploadProtocol + , bdlPp + , bdlAccessToken + , bdlBeaconName + , bdlUploadType + , bdlBearerToken + , bdlKey + , bdlPageToken + , bdlOauthToken + , bdlPageSize + , bdlAlertFilter + , bdlFields + , bdlCallback + , bdlAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsDiagnosticsList@ which the +-- 'BeaconsDiagnosticsList' request conforms to. +type BeaconsDiagnosticsListAPI = + "v1beta1" :> + "{+beaconName}" :> + "diagnostics" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + QueryParam "alertFilter" Text :> + Get '[JSON] ListDiagnosticsResponse + +-- | List the diagnostics for a single beacon. You can also list diagnostics +-- for all the beacons owned by your Google Developers Console project by +-- using the beacon name \`beacons\/-\`. +-- +-- /See:/ 'beaconsDiagnosticsList' smart constructor. +data BeaconsDiagnosticsList = BeaconsDiagnosticsList + { _bdlXgafv :: !(Maybe Text) + , _bdlQuotaUser :: !(Maybe Text) + , _bdlPrettyPrint :: !Bool + , _bdlUploadProtocol :: !(Maybe Text) + , _bdlPp :: !Bool + , _bdlAccessToken :: !(Maybe Text) + , _bdlBeaconName :: !Text + , _bdlUploadType :: !(Maybe Text) + , _bdlBearerToken :: !(Maybe Text) + , _bdlKey :: !(Maybe Text) + , _bdlPageToken :: !(Maybe Text) + , _bdlOauthToken :: !(Maybe Text) + , _bdlPageSize :: !(Maybe Int32) + , _bdlAlertFilter :: !(Maybe Text) + , _bdlFields :: !(Maybe Text) + , _bdlCallback :: !(Maybe Text) + , _bdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsDiagnosticsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bdlXgafv' +-- +-- * 'bdlQuotaUser' +-- +-- * 'bdlPrettyPrint' +-- +-- * 'bdlUploadProtocol' +-- +-- * 'bdlPp' +-- +-- * 'bdlAccessToken' +-- +-- * 'bdlBeaconName' +-- +-- * 'bdlUploadType' +-- +-- * 'bdlBearerToken' +-- +-- * 'bdlKey' +-- +-- * 'bdlPageToken' +-- +-- * 'bdlOauthToken' +-- +-- * 'bdlPageSize' +-- +-- * 'bdlAlertFilter' +-- +-- * 'bdlFields' +-- +-- * 'bdlCallback' +-- +-- * 'bdlAlt' +beaconsDiagnosticsList + :: Text -- ^ 'beaconName' + -> BeaconsDiagnosticsList +beaconsDiagnosticsList pBdlBeaconName_ = + BeaconsDiagnosticsList + { _bdlXgafv = Nothing + , _bdlQuotaUser = Nothing + , _bdlPrettyPrint = True + , _bdlUploadProtocol = Nothing + , _bdlPp = True + , _bdlAccessToken = Nothing + , _bdlBeaconName = pBdlBeaconName_ + , _bdlUploadType = Nothing + , _bdlBearerToken = Nothing + , _bdlKey = Nothing + , _bdlPageToken = Nothing + , _bdlOauthToken = Nothing + , _bdlPageSize = Nothing + , _bdlAlertFilter = Nothing + , _bdlFields = Nothing + , _bdlCallback = Nothing + , _bdlAlt = "json" + } + +-- | V1 error format. +bdlXgafv :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlXgafv = lens _bdlXgafv (\ s a -> s{_bdlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bdlQuotaUser :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlQuotaUser + = lens _bdlQuotaUser (\ s a -> s{_bdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bdlPrettyPrint :: Lens' BeaconsDiagnosticsList' Bool +bdlPrettyPrint + = lens _bdlPrettyPrint + (\ s a -> s{_bdlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bdlUploadProtocol :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlUploadProtocol + = lens _bdlUploadProtocol + (\ s a -> s{_bdlUploadProtocol = a}) + +-- | Pretty-print response. +bdlPp :: Lens' BeaconsDiagnosticsList' Bool +bdlPp = lens _bdlPp (\ s a -> s{_bdlPp = a}) + +-- | OAuth access token. +bdlAccessToken :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlAccessToken + = lens _bdlAccessToken + (\ s a -> s{_bdlAccessToken = a}) + +-- | Beacon that the diagnostics are for. +bdlBeaconName :: Lens' BeaconsDiagnosticsList' Text +bdlBeaconName + = lens _bdlBeaconName + (\ s a -> s{_bdlBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bdlUploadType :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlUploadType + = lens _bdlUploadType + (\ s a -> s{_bdlUploadType = a}) + +-- | OAuth bearer token. +bdlBearerToken :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlBearerToken + = lens _bdlBearerToken + (\ s a -> s{_bdlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bdlKey :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlKey = lens _bdlKey (\ s a -> s{_bdlKey = a}) + +-- | Requests results that occur after the \`page_token\`, obtained from the +-- response to a previous request. Optional. +bdlPageToken :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlPageToken + = lens _bdlPageToken (\ s a -> s{_bdlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +bdlOauthToken :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlOauthToken + = lens _bdlOauthToken + (\ s a -> s{_bdlOauthToken = a}) + +-- | Specifies the maximum number of results to return. Defaults to 10. +-- Maximum 1000. Optional. +bdlPageSize :: Lens' BeaconsDiagnosticsList' (Maybe Int32) +bdlPageSize + = lens _bdlPageSize (\ s a -> s{_bdlPageSize = a}) + +-- | Requests only beacons that have the given alert. For example, to find +-- beacons that have low batteries use \`alert_filter=LOW_BATTERY\`. +bdlAlertFilter :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlAlertFilter + = lens _bdlAlertFilter + (\ s a -> s{_bdlAlertFilter = a}) + +-- | Selector specifying which fields to include in a partial response. +bdlFields :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlFields + = lens _bdlFields (\ s a -> s{_bdlFields = a}) + +-- | JSONP +bdlCallback :: Lens' BeaconsDiagnosticsList' (Maybe Text) +bdlCallback + = lens _bdlCallback (\ s a -> s{_bdlCallback = a}) + +-- | Data format for response. +bdlAlt :: Lens' BeaconsDiagnosticsList' Text +bdlAlt = lens _bdlAlt (\ s a -> s{_bdlAlt = a}) + +instance GoogleRequest BeaconsDiagnosticsList' where + type Rs BeaconsDiagnosticsList' = + ListDiagnosticsResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsDiagnosticsList{..} + = go _bdlXgafv _bdlQuotaUser _bdlPrettyPrint + _bdlUploadProtocol + _bdlPp + _bdlAccessToken + _bdlBeaconName + _bdlUploadType + _bdlBearerToken + _bdlKey + _bdlPageToken + _bdlOauthToken + _bdlPageSize + _bdlAlertFilter + _bdlFields + _bdlCallback + _bdlAlt + where go + = clientWithRoute + (Proxy :: Proxy BeaconsDiagnosticsListAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs new file mode 100644 index 000000000..da2a14f17 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns detailed information about the specified beacon. +-- +-- /See:/ for @ProximitybeaconBeaconsGet@. +module ProximityBeacon.Beacons.Get + ( + -- * REST Resource + BeaconsGetAPI + + -- * Creating a Request + , beaconsGet + , BeaconsGet + + -- * Request Lenses + , bgXgafv + , bgQuotaUser + , bgPrettyPrint + , bgUploadProtocol + , bgPp + , bgAccessToken + , bgBeaconName + , bgUploadType + , bgBearerToken + , bgKey + , bgOauthToken + , bgFields + , bgCallback + , bgAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsGet@ which the +-- 'BeaconsGet' request conforms to. +type BeaconsGetAPI = + "v1beta1" :> "{+beaconName}" :> Get '[JSON] Beacon + +-- | Returns detailed information about the specified beacon. +-- +-- /See:/ 'beaconsGet' smart constructor. +data BeaconsGet = BeaconsGet + { _bgXgafv :: !(Maybe Text) + , _bgQuotaUser :: !(Maybe Text) + , _bgPrettyPrint :: !Bool + , _bgUploadProtocol :: !(Maybe Text) + , _bgPp :: !Bool + , _bgAccessToken :: !(Maybe Text) + , _bgBeaconName :: !Text + , _bgUploadType :: !(Maybe Text) + , _bgBearerToken :: !(Maybe Text) + , _bgKey :: !(Maybe Text) + , _bgOauthToken :: !(Maybe Text) + , _bgFields :: !(Maybe Text) + , _bgCallback :: !(Maybe Text) + , _bgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgXgafv' +-- +-- * 'bgQuotaUser' +-- +-- * 'bgPrettyPrint' +-- +-- * 'bgUploadProtocol' +-- +-- * 'bgPp' +-- +-- * 'bgAccessToken' +-- +-- * 'bgBeaconName' +-- +-- * 'bgUploadType' +-- +-- * 'bgBearerToken' +-- +-- * 'bgKey' +-- +-- * 'bgOauthToken' +-- +-- * 'bgFields' +-- +-- * 'bgCallback' +-- +-- * 'bgAlt' +beaconsGet + :: Text -- ^ 'beaconName' + -> BeaconsGet +beaconsGet pBgBeaconName_ = + BeaconsGet + { _bgXgafv = Nothing + , _bgQuotaUser = Nothing + , _bgPrettyPrint = True + , _bgUploadProtocol = Nothing + , _bgPp = True + , _bgAccessToken = Nothing + , _bgBeaconName = pBgBeaconName_ + , _bgUploadType = Nothing + , _bgBearerToken = Nothing + , _bgKey = Nothing + , _bgOauthToken = Nothing + , _bgFields = Nothing + , _bgCallback = Nothing + , _bgAlt = "json" + } + +-- | V1 error format. +bgXgafv :: Lens' BeaconsGet' (Maybe Text) +bgXgafv = lens _bgXgafv (\ s a -> s{_bgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +bgQuotaUser :: Lens' BeaconsGet' (Maybe Text) +bgQuotaUser + = lens _bgQuotaUser (\ s a -> s{_bgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bgPrettyPrint :: Lens' BeaconsGet' Bool +bgPrettyPrint + = lens _bgPrettyPrint + (\ s a -> s{_bgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +bgUploadProtocol :: Lens' BeaconsGet' (Maybe Text) +bgUploadProtocol + = lens _bgUploadProtocol + (\ s a -> s{_bgUploadProtocol = a}) + +-- | Pretty-print response. +bgPp :: Lens' BeaconsGet' Bool +bgPp = lens _bgPp (\ s a -> s{_bgPp = a}) + +-- | OAuth access token. +bgAccessToken :: Lens' BeaconsGet' (Maybe Text) +bgAccessToken + = lens _bgAccessToken + (\ s a -> s{_bgAccessToken = a}) + +-- | Beacon that is requested. +bgBeaconName :: Lens' BeaconsGet' Text +bgBeaconName + = lens _bgBeaconName (\ s a -> s{_bgBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +bgUploadType :: Lens' BeaconsGet' (Maybe Text) +bgUploadType + = lens _bgUploadType (\ s a -> s{_bgUploadType = a}) + +-- | OAuth bearer token. +bgBearerToken :: Lens' BeaconsGet' (Maybe Text) +bgBearerToken + = lens _bgBearerToken + (\ s a -> s{_bgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgKey :: Lens' BeaconsGet' (Maybe Text) +bgKey = lens _bgKey (\ s a -> s{_bgKey = a}) + +-- | OAuth 2.0 token for the current user. +bgOauthToken :: Lens' BeaconsGet' (Maybe Text) +bgOauthToken + = lens _bgOauthToken (\ s a -> s{_bgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bgFields :: Lens' BeaconsGet' (Maybe Text) +bgFields = lens _bgFields (\ s a -> s{_bgFields = a}) + +-- | JSONP +bgCallback :: Lens' BeaconsGet' (Maybe Text) +bgCallback + = lens _bgCallback (\ s a -> s{_bgCallback = a}) + +-- | Data format for response. +bgAlt :: Lens' BeaconsGet' Text +bgAlt = lens _bgAlt (\ s a -> s{_bgAlt = a}) + +instance GoogleRequest BeaconsGet' where + type Rs BeaconsGet' = Beacon + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsGet{..} + = go _bgXgafv _bgQuotaUser _bgPrettyPrint + _bgUploadProtocol + _bgPp + _bgAccessToken + _bgBeaconName + _bgUploadType + _bgBearerToken + _bgKey + _bgOauthToken + _bgFields + _bgCallback + _bgAlt + where go + = clientWithRoute (Proxy :: Proxy BeaconsGetAPI) r u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/List.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/List.hs new file mode 100644 index 000000000..b22a02d3c --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/List.hs @@ -0,0 +1,293 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Searches the beacon registry for beacons that match the given search +-- criteria. Only those beacons that the client has permission to list will +-- be returned. +-- +-- /See:/ for @ProximitybeaconBeaconsList@. +module ProximityBeacon.Beacons.List + ( + -- * REST Resource + BeaconsListAPI + + -- * Creating a Request + , beaconsList + , BeaconsList + + -- * Request Lenses + , blXgafv + , blQuotaUser + , blPrettyPrint + , blUploadProtocol + , blPp + , blAccessToken + , blUploadType + , blQ + , blBearerToken + , blKey + , blPageToken + , blOauthToken + , blPageSize + , blFields + , blCallback + , blAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsList@ which the +-- 'BeaconsList' request conforms to. +type BeaconsListAPI = + "v1beta1" :> + "beacons" :> + QueryParam "q" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListBeaconsResponse + +-- | Searches the beacon registry for beacons that match the given search +-- criteria. Only those beacons that the client has permission to list will +-- be returned. +-- +-- /See:/ 'beaconsList' smart constructor. +data BeaconsList = BeaconsList + { _blXgafv :: !(Maybe Text) + , _blQuotaUser :: !(Maybe Text) + , _blPrettyPrint :: !Bool + , _blUploadProtocol :: !(Maybe Text) + , _blPp :: !Bool + , _blAccessToken :: !(Maybe Text) + , _blUploadType :: !(Maybe Text) + , _blQ :: !(Maybe Text) + , _blBearerToken :: !(Maybe Text) + , _blKey :: !(Maybe Text) + , _blPageToken :: !(Maybe Text) + , _blOauthToken :: !(Maybe Text) + , _blPageSize :: !(Maybe Int32) + , _blFields :: !(Maybe Text) + , _blCallback :: !(Maybe Text) + , _blAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blXgafv' +-- +-- * 'blQuotaUser' +-- +-- * 'blPrettyPrint' +-- +-- * 'blUploadProtocol' +-- +-- * 'blPp' +-- +-- * 'blAccessToken' +-- +-- * 'blUploadType' +-- +-- * 'blQ' +-- +-- * 'blBearerToken' +-- +-- * 'blKey' +-- +-- * 'blPageToken' +-- +-- * 'blOauthToken' +-- +-- * 'blPageSize' +-- +-- * 'blFields' +-- +-- * 'blCallback' +-- +-- * 'blAlt' +beaconsList + :: BeaconsList +beaconsList = + BeaconsList + { _blXgafv = Nothing + , _blQuotaUser = Nothing + , _blPrettyPrint = True + , _blUploadProtocol = Nothing + , _blPp = True + , _blAccessToken = Nothing + , _blUploadType = Nothing + , _blQ = Nothing + , _blBearerToken = Nothing + , _blKey = Nothing + , _blPageToken = Nothing + , _blOauthToken = Nothing + , _blPageSize = Nothing + , _blFields = Nothing + , _blCallback = Nothing + , _blAlt = "json" + } + +-- | V1 error format. +blXgafv :: Lens' BeaconsList' (Maybe Text) +blXgafv = lens _blXgafv (\ s a -> s{_blXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +blQuotaUser :: Lens' BeaconsList' (Maybe Text) +blQuotaUser + = lens _blQuotaUser (\ s a -> s{_blQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +blPrettyPrint :: Lens' BeaconsList' Bool +blPrettyPrint + = lens _blPrettyPrint + (\ s a -> s{_blPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +blUploadProtocol :: Lens' BeaconsList' (Maybe Text) +blUploadProtocol + = lens _blUploadProtocol + (\ s a -> s{_blUploadProtocol = a}) + +-- | Pretty-print response. +blPp :: Lens' BeaconsList' Bool +blPp = lens _blPp (\ s a -> s{_blPp = a}) + +-- | OAuth access token. +blAccessToken :: Lens' BeaconsList' (Maybe Text) +blAccessToken + = lens _blAccessToken + (\ s a -> s{_blAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +blUploadType :: Lens' BeaconsList' (Maybe Text) +blUploadType + = lens _blUploadType (\ s a -> s{_blUploadType = a}) + +-- | Filter query string that supports the following field filters: * +-- \`description:\"\"\` For example: \`description:\"Room 3\"\` Returns +-- beacons whose description matches tokens in the string \"Room 3\" (not +-- necessarily that exact string). The string must be double-quoted. * +-- \`status:\` For example: \`status:active\` Returns beacons whose status +-- matches the given value. Values must be one of the Beacon.Status enum +-- values (case insensitive). Accepts multiple filters which will be +-- combined with OR logic. * \`stability:\` For example: +-- \`stability:mobile\` Returns beacons whose expected stability matches +-- the given value. Values must be one of the Beacon.Stability enum values +-- (case insensitive). Accepts multiple filters which will be combined with +-- OR logic. * \`place_id:\"\"\` For example: +-- \`place_id:\"ChIJVSZzVR8FdkgRXGmmm6SslKw=\"\` Returns beacons explicitly +-- registered at the given place, expressed as a Place ID obtained from +-- [Google Places API](\/places\/place-id). Does not match places inside +-- the given place. Does not consider the beacon\'s actual location (which +-- may be different from its registered place). Accepts multiple filters +-- that will be combined with OR logic. The place ID must be double-quoted. +-- * \`registration_time[|=]\` For example: +-- \`registration_time>=1433116800\` Returns beacons whose registration +-- time matches the given filter. Supports the operators: , =. Timestamp +-- must be expressed as an integer number of seconds since midnight January +-- 1, 1970 UTC. Accepts at most two filters that will be combined with AND +-- logic, to support \"between\" semantics. If more than two are supplied, +-- the latter ones are ignored. * \`lat: lng: radius:\` For example: +-- \`lat:51.1232343 lng:-1.093852 radius:1000\` Returns beacons whose +-- registered location is within the given circle. When any of these fields +-- are given, all are required. Latitude and longitude must be decimal +-- degrees between -90.0 and 90.0 and between -180.0 and 180.0 +-- respectively. Radius must be an integer number of meters less than +-- 1,000,000 (1000 km). * \`property:\"=\"\` For example: +-- \`property:\"battery-type=CR2032\"\` Returns beacons which have a +-- property of the given name and value. Supports multiple filters which +-- will be combined with OR logic. The entire name=value string must be +-- double-quoted as one string. * \`attachment_type:\"\"\` For example: +-- \`attachment_type:\"my-namespace\/my-type\"\` Returns beacons having at +-- least one attachment of the given namespaced type. Supports \"any within +-- this namespace\" via the partial wildcard syntax: \"my-namespace\/*\". +-- Supports multiple filters which will be combined with OR logic. The +-- string must be double-quoted. Multiple filters on the same field are +-- combined with OR logic (except registration_time which is combined with +-- AND logic). Multiple filters on different fields are combined with AND +-- logic. Filters should be separated by spaces. As with any HTTP query +-- string parameter, the whole filter expression must be URL-encoded. +-- Example REST request: \`GET +-- \/v1beta1\/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000\` +blQ :: Lens' BeaconsList' (Maybe Text) +blQ = lens _blQ (\ s a -> s{_blQ = a}) + +-- | OAuth bearer token. +blBearerToken :: Lens' BeaconsList' (Maybe Text) +blBearerToken + = lens _blBearerToken + (\ s a -> s{_blBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +blKey :: Lens' BeaconsList' (Maybe Text) +blKey = lens _blKey (\ s a -> s{_blKey = a}) + +-- | A pagination token obtained from a previous request to list beacons. +blPageToken :: Lens' BeaconsList' (Maybe Text) +blPageToken + = lens _blPageToken (\ s a -> s{_blPageToken = a}) + +-- | OAuth 2.0 token for the current user. +blOauthToken :: Lens' BeaconsList' (Maybe Text) +blOauthToken + = lens _blOauthToken (\ s a -> s{_blOauthToken = a}) + +-- | The maximum number of records to return for this request, up to a +-- server-defined upper limit. +blPageSize :: Lens' BeaconsList' (Maybe Int32) +blPageSize + = lens _blPageSize (\ s a -> s{_blPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +blFields :: Lens' BeaconsList' (Maybe Text) +blFields = lens _blFields (\ s a -> s{_blFields = a}) + +-- | JSONP +blCallback :: Lens' BeaconsList' (Maybe Text) +blCallback + = lens _blCallback (\ s a -> s{_blCallback = a}) + +-- | Data format for response. +blAlt :: Lens' BeaconsList' Text +blAlt = lens _blAlt (\ s a -> s{_blAlt = a}) + +instance GoogleRequest BeaconsList' where + type Rs BeaconsList' = ListBeaconsResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsList{..} + = go _blXgafv _blQuotaUser _blPrettyPrint + _blUploadProtocol + _blPp + _blAccessToken + _blUploadType + _blQ + _blBearerToken + _blKey + _blPageToken + _blOauthToken + _blPageSize + _blFields + _blCallback + _blAlt + where go + = clientWithRoute (Proxy :: Proxy BeaconsListAPI) r u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs new file mode 100644 index 000000000..e86db3617 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Register +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Registers a previously unregistered beacon given its \`advertisedId\`. +-- These IDs are unique within the system. An ID can be registered only +-- once. +-- +-- /See:/ for @ProximitybeaconBeaconsRegister@. +module ProximityBeacon.Beacons.Register + ( + -- * REST Resource + BeaconsRegisterAPI + + -- * Creating a Request + , beaconsRegister + , BeaconsRegister + + -- * Request Lenses + , brXgafv + , brQuotaUser + , brPrettyPrint + , brUploadProtocol + , brPp + , brAccessToken + , brUploadType + , brBearerToken + , brKey + , brOauthToken + , brFields + , brCallback + , brAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsRegister@ which the +-- 'BeaconsRegister' request conforms to. +type BeaconsRegisterAPI = + "v1beta1" :> + "beacons:register" :> Post '[JSON] Beacon + +-- | Registers a previously unregistered beacon given its \`advertisedId\`. +-- These IDs are unique within the system. An ID can be registered only +-- once. +-- +-- /See:/ 'beaconsRegister' smart constructor. +data BeaconsRegister = BeaconsRegister + { _brXgafv :: !(Maybe Text) + , _brQuotaUser :: !(Maybe Text) + , _brPrettyPrint :: !Bool + , _brUploadProtocol :: !(Maybe Text) + , _brPp :: !Bool + , _brAccessToken :: !(Maybe Text) + , _brUploadType :: !(Maybe Text) + , _brBearerToken :: !(Maybe Text) + , _brKey :: !(Maybe Text) + , _brOauthToken :: !(Maybe Text) + , _brFields :: !(Maybe Text) + , _brCallback :: !(Maybe Text) + , _brAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsRegister'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brXgafv' +-- +-- * 'brQuotaUser' +-- +-- * 'brPrettyPrint' +-- +-- * 'brUploadProtocol' +-- +-- * 'brPp' +-- +-- * 'brAccessToken' +-- +-- * 'brUploadType' +-- +-- * 'brBearerToken' +-- +-- * 'brKey' +-- +-- * 'brOauthToken' +-- +-- * 'brFields' +-- +-- * 'brCallback' +-- +-- * 'brAlt' +beaconsRegister + :: BeaconsRegister +beaconsRegister = + BeaconsRegister + { _brXgafv = Nothing + , _brQuotaUser = Nothing + , _brPrettyPrint = True + , _brUploadProtocol = Nothing + , _brPp = True + , _brAccessToken = Nothing + , _brUploadType = Nothing + , _brBearerToken = Nothing + , _brKey = Nothing + , _brOauthToken = Nothing + , _brFields = Nothing + , _brCallback = Nothing + , _brAlt = "json" + } + +-- | V1 error format. +brXgafv :: Lens' BeaconsRegister' (Maybe Text) +brXgafv = lens _brXgafv (\ s a -> s{_brXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +brQuotaUser :: Lens' BeaconsRegister' (Maybe Text) +brQuotaUser + = lens _brQuotaUser (\ s a -> s{_brQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brPrettyPrint :: Lens' BeaconsRegister' Bool +brPrettyPrint + = lens _brPrettyPrint + (\ s a -> s{_brPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +brUploadProtocol :: Lens' BeaconsRegister' (Maybe Text) +brUploadProtocol + = lens _brUploadProtocol + (\ s a -> s{_brUploadProtocol = a}) + +-- | Pretty-print response. +brPp :: Lens' BeaconsRegister' Bool +brPp = lens _brPp (\ s a -> s{_brPp = a}) + +-- | OAuth access token. +brAccessToken :: Lens' BeaconsRegister' (Maybe Text) +brAccessToken + = lens _brAccessToken + (\ s a -> s{_brAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +brUploadType :: Lens' BeaconsRegister' (Maybe Text) +brUploadType + = lens _brUploadType (\ s a -> s{_brUploadType = a}) + +-- | OAuth bearer token. +brBearerToken :: Lens' BeaconsRegister' (Maybe Text) +brBearerToken + = lens _brBearerToken + (\ s a -> s{_brBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brKey :: Lens' BeaconsRegister' (Maybe Text) +brKey = lens _brKey (\ s a -> s{_brKey = a}) + +-- | OAuth 2.0 token for the current user. +brOauthToken :: Lens' BeaconsRegister' (Maybe Text) +brOauthToken + = lens _brOauthToken (\ s a -> s{_brOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +brFields :: Lens' BeaconsRegister' (Maybe Text) +brFields = lens _brFields (\ s a -> s{_brFields = a}) + +-- | JSONP +brCallback :: Lens' BeaconsRegister' (Maybe Text) +brCallback + = lens _brCallback (\ s a -> s{_brCallback = a}) + +-- | Data format for response. +brAlt :: Lens' BeaconsRegister' Text +brAlt = lens _brAlt (\ s a -> s{_brAlt = a}) + +instance GoogleRequest BeaconsRegister' where + type Rs BeaconsRegister' = Beacon + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsRegister{..} + = go _brXgafv _brQuotaUser _brPrettyPrint + _brUploadProtocol + _brPp + _brAccessToken + _brUploadType + _brBearerToken + _brKey + _brOauthToken + _brFields + _brCallback + _brAlt + where go + = clientWithRoute (Proxy :: Proxy BeaconsRegisterAPI) + r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Update.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Update.hs new file mode 100644 index 000000000..e5c862943 --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Update.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Beacons.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the information about the specified beacon. **Any field that you +-- do not populate in the submitted beacon will be permanently erased**, so +-- you should follow the \"read, modify, write\" pattern to avoid +-- inadvertently destroying data. Changes to the beacon status via this +-- method will be silently ignored. To update beacon status, use the +-- separate methods on this API for (de)activation and decommissioning. +-- +-- /See:/ for @ProximitybeaconBeaconsUpdate@. +module ProximityBeacon.Beacons.Update + ( + -- * REST Resource + BeaconsUpdateAPI + + -- * Creating a Request + , beaconsUpdate + , BeaconsUpdate + + -- * Request Lenses + , buXgafv + , buQuotaUser + , buPrettyPrint + , buUploadProtocol + , buPp + , buAccessToken + , buBeaconName + , buUploadType + , buBearerToken + , buKey + , buOauthToken + , buFields + , buCallback + , buAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconBeaconsUpdate@ which the +-- 'BeaconsUpdate' request conforms to. +type BeaconsUpdateAPI = + "v1beta1" :> "{+beaconName}" :> Put '[JSON] Beacon + +-- | Updates the information about the specified beacon. **Any field that you +-- do not populate in the submitted beacon will be permanently erased**, so +-- you should follow the \"read, modify, write\" pattern to avoid +-- inadvertently destroying data. Changes to the beacon status via this +-- method will be silently ignored. To update beacon status, use the +-- separate methods on this API for (de)activation and decommissioning. +-- +-- /See:/ 'beaconsUpdate' smart constructor. +data BeaconsUpdate = BeaconsUpdate + { _buXgafv :: !(Maybe Text) + , _buQuotaUser :: !(Maybe Text) + , _buPrettyPrint :: !Bool + , _buUploadProtocol :: !(Maybe Text) + , _buPp :: !Bool + , _buAccessToken :: !(Maybe Text) + , _buBeaconName :: !Text + , _buUploadType :: !(Maybe Text) + , _buBearerToken :: !(Maybe Text) + , _buKey :: !(Maybe Text) + , _buOauthToken :: !(Maybe Text) + , _buFields :: !(Maybe Text) + , _buCallback :: !(Maybe Text) + , _buAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BeaconsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buXgafv' +-- +-- * 'buQuotaUser' +-- +-- * 'buPrettyPrint' +-- +-- * 'buUploadProtocol' +-- +-- * 'buPp' +-- +-- * 'buAccessToken' +-- +-- * 'buBeaconName' +-- +-- * 'buUploadType' +-- +-- * 'buBearerToken' +-- +-- * 'buKey' +-- +-- * 'buOauthToken' +-- +-- * 'buFields' +-- +-- * 'buCallback' +-- +-- * 'buAlt' +beaconsUpdate + :: Text -- ^ 'beaconName' + -> BeaconsUpdate +beaconsUpdate pBuBeaconName_ = + BeaconsUpdate + { _buXgafv = Nothing + , _buQuotaUser = Nothing + , _buPrettyPrint = True + , _buUploadProtocol = Nothing + , _buPp = True + , _buAccessToken = Nothing + , _buBeaconName = pBuBeaconName_ + , _buUploadType = Nothing + , _buBearerToken = Nothing + , _buKey = Nothing + , _buOauthToken = Nothing + , _buFields = Nothing + , _buCallback = Nothing + , _buAlt = "json" + } + +-- | V1 error format. +buXgafv :: Lens' BeaconsUpdate' (Maybe Text) +buXgafv = lens _buXgafv (\ s a -> s{_buXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +buQuotaUser :: Lens' BeaconsUpdate' (Maybe Text) +buQuotaUser + = lens _buQuotaUser (\ s a -> s{_buQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +buPrettyPrint :: Lens' BeaconsUpdate' Bool +buPrettyPrint + = lens _buPrettyPrint + (\ s a -> s{_buPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +buUploadProtocol :: Lens' BeaconsUpdate' (Maybe Text) +buUploadProtocol + = lens _buUploadProtocol + (\ s a -> s{_buUploadProtocol = a}) + +-- | Pretty-print response. +buPp :: Lens' BeaconsUpdate' Bool +buPp = lens _buPp (\ s a -> s{_buPp = a}) + +-- | OAuth access token. +buAccessToken :: Lens' BeaconsUpdate' (Maybe Text) +buAccessToken + = lens _buAccessToken + (\ s a -> s{_buAccessToken = a}) + +-- | Resource name of this beacon. A beacon name has the format +-- \"beacons\/N!beaconId\" where the beaconId is the base16 ID broadcast by +-- the beacon and N is a code for the beacon\'s type. Possible values are +-- \`3\` for Eddystone, \`1\` for iBeacon, or \`5\` for AltBeacon. This +-- field must be left empty when registering. After reading a beacon, +-- clients can use the name for future operations. +buBeaconName :: Lens' BeaconsUpdate' Text +buBeaconName + = lens _buBeaconName (\ s a -> s{_buBeaconName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +buUploadType :: Lens' BeaconsUpdate' (Maybe Text) +buUploadType + = lens _buUploadType (\ s a -> s{_buUploadType = a}) + +-- | OAuth bearer token. +buBearerToken :: Lens' BeaconsUpdate' (Maybe Text) +buBearerToken + = lens _buBearerToken + (\ s a -> s{_buBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +buKey :: Lens' BeaconsUpdate' (Maybe Text) +buKey = lens _buKey (\ s a -> s{_buKey = a}) + +-- | OAuth 2.0 token for the current user. +buOauthToken :: Lens' BeaconsUpdate' (Maybe Text) +buOauthToken + = lens _buOauthToken (\ s a -> s{_buOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +buFields :: Lens' BeaconsUpdate' (Maybe Text) +buFields = lens _buFields (\ s a -> s{_buFields = a}) + +-- | JSONP +buCallback :: Lens' BeaconsUpdate' (Maybe Text) +buCallback + = lens _buCallback (\ s a -> s{_buCallback = a}) + +-- | Data format for response. +buAlt :: Lens' BeaconsUpdate' Text +buAlt = lens _buAlt (\ s a -> s{_buAlt = a}) + +instance GoogleRequest BeaconsUpdate' where + type Rs BeaconsUpdate' = Beacon + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u BeaconsUpdate{..} + = go _buXgafv _buQuotaUser _buPrettyPrint + _buUploadProtocol + _buPp + _buAccessToken + _buBeaconName + _buUploadType + _buBearerToken + _buKey + _buOauthToken + _buFields + _buCallback + _buAlt + where go + = clientWithRoute (Proxy :: Proxy BeaconsUpdateAPI) r + u diff --git a/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Namespaces/List.hs b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Namespaces/List.hs new file mode 100644 index 000000000..b087e7e7c --- /dev/null +++ b/gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Namespaces/List.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.ProximityBeacon.Namespaces.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all attachment namespaces owned by your Google Developers Console +-- project. Attachment data associated with a beacon must include a +-- namespaced type, and the namespace must be owned by your project. +-- +-- /See:/ for @ProximitybeaconNamespacesList@. +module ProximityBeacon.Namespaces.List + ( + -- * REST Resource + NamespacesListAPI + + -- * Creating a Request + , namespacesList + , NamespacesList + + -- * Request Lenses + , nlXgafv + , nlQuotaUser + , nlPrettyPrint + , nlUploadProtocol + , nlPp + , nlAccessToken + , nlUploadType + , nlBearerToken + , nlKey + , nlOauthToken + , nlFields + , nlCallback + , nlAlt + ) where + +import Network.Google.Prelude +import Network.Google.ProximityBeacon.Types + +-- | A resource alias for @ProximitybeaconNamespacesList@ which the +-- 'NamespacesList' request conforms to. +type NamespacesListAPI = + "v1beta1" :> + "namespaces" :> Get '[JSON] ListNamespacesResponse + +-- | Lists all attachment namespaces owned by your Google Developers Console +-- project. Attachment data associated with a beacon must include a +-- namespaced type, and the namespace must be owned by your project. +-- +-- /See:/ 'namespacesList' smart constructor. +data NamespacesList = NamespacesList + { _nlXgafv :: !(Maybe Text) + , _nlQuotaUser :: !(Maybe Text) + , _nlPrettyPrint :: !Bool + , _nlUploadProtocol :: !(Maybe Text) + , _nlPp :: !Bool + , _nlAccessToken :: !(Maybe Text) + , _nlUploadType :: !(Maybe Text) + , _nlBearerToken :: !(Maybe Text) + , _nlKey :: !(Maybe Text) + , _nlOauthToken :: !(Maybe Text) + , _nlFields :: !(Maybe Text) + , _nlCallback :: !(Maybe Text) + , _nlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'NamespacesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'nlXgafv' +-- +-- * 'nlQuotaUser' +-- +-- * 'nlPrettyPrint' +-- +-- * 'nlUploadProtocol' +-- +-- * 'nlPp' +-- +-- * 'nlAccessToken' +-- +-- * 'nlUploadType' +-- +-- * 'nlBearerToken' +-- +-- * 'nlKey' +-- +-- * 'nlOauthToken' +-- +-- * 'nlFields' +-- +-- * 'nlCallback' +-- +-- * 'nlAlt' +namespacesList + :: NamespacesList +namespacesList = + NamespacesList + { _nlXgafv = Nothing + , _nlQuotaUser = Nothing + , _nlPrettyPrint = True + , _nlUploadProtocol = Nothing + , _nlPp = True + , _nlAccessToken = Nothing + , _nlUploadType = Nothing + , _nlBearerToken = Nothing + , _nlKey = Nothing + , _nlOauthToken = Nothing + , _nlFields = Nothing + , _nlCallback = Nothing + , _nlAlt = "json" + } + +-- | V1 error format. +nlXgafv :: Lens' NamespacesList' (Maybe Text) +nlXgafv = lens _nlXgafv (\ s a -> s{_nlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +nlQuotaUser :: Lens' NamespacesList' (Maybe Text) +nlQuotaUser + = lens _nlQuotaUser (\ s a -> s{_nlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +nlPrettyPrint :: Lens' NamespacesList' Bool +nlPrettyPrint + = lens _nlPrettyPrint + (\ s a -> s{_nlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +nlUploadProtocol :: Lens' NamespacesList' (Maybe Text) +nlUploadProtocol + = lens _nlUploadProtocol + (\ s a -> s{_nlUploadProtocol = a}) + +-- | Pretty-print response. +nlPp :: Lens' NamespacesList' Bool +nlPp = lens _nlPp (\ s a -> s{_nlPp = a}) + +-- | OAuth access token. +nlAccessToken :: Lens' NamespacesList' (Maybe Text) +nlAccessToken + = lens _nlAccessToken + (\ s a -> s{_nlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +nlUploadType :: Lens' NamespacesList' (Maybe Text) +nlUploadType + = lens _nlUploadType (\ s a -> s{_nlUploadType = a}) + +-- | OAuth bearer token. +nlBearerToken :: Lens' NamespacesList' (Maybe Text) +nlBearerToken + = lens _nlBearerToken + (\ s a -> s{_nlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +nlKey :: Lens' NamespacesList' (Maybe Text) +nlKey = lens _nlKey (\ s a -> s{_nlKey = a}) + +-- | OAuth 2.0 token for the current user. +nlOauthToken :: Lens' NamespacesList' (Maybe Text) +nlOauthToken + = lens _nlOauthToken (\ s a -> s{_nlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +nlFields :: Lens' NamespacesList' (Maybe Text) +nlFields = lens _nlFields (\ s a -> s{_nlFields = a}) + +-- | JSONP +nlCallback :: Lens' NamespacesList' (Maybe Text) +nlCallback + = lens _nlCallback (\ s a -> s{_nlCallback = a}) + +-- | Data format for response. +nlAlt :: Lens' NamespacesList' Text +nlAlt = lens _nlAlt (\ s a -> s{_nlAlt = a}) + +instance GoogleRequest NamespacesList' where + type Rs NamespacesList' = ListNamespacesResponse + request = requestWithRoute defReq proximityBeaconURL + requestWithRoute r u NamespacesList{..} + = go _nlXgafv _nlQuotaUser _nlPrettyPrint + _nlUploadProtocol + _nlPp + _nlAccessToken + _nlUploadType + _nlBearerToken + _nlKey + _nlOauthToken + _nlFields + _nlCallback + _nlAlt + where go + = clientWithRoute (Proxy :: Proxy NamespacesListAPI) + r + u diff --git a/gogol-proximitybeacon/gogol-proximitybeacon.cabal b/gogol-proximitybeacon/gogol-proximitybeacon.cabal new file mode 100644 index 000000000..b525ea1c0 --- /dev/null +++ b/gogol-proximitybeacon/gogol-proximitybeacon.cabal @@ -0,0 +1,57 @@ +name: gogol-proximitybeacon +version: 0.0.1 +synopsis: Google Proximity Beacon API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + This API provides services to register, manage, index, and search + beacons. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.ProximityBeacon + , Network.Google.ProximityBeacon.Types + , Network.Google.Resource.ProximityBeacon.Beaconinfo.Getforobserved + , Network.Google.Resource.ProximityBeacon.Beacons.Activate + , Network.Google.Resource.ProximityBeacon.Beacons.Attachments.BatchDelete + , Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Create + , Network.Google.Resource.ProximityBeacon.Beacons.Attachments.Delete + , Network.Google.Resource.ProximityBeacon.Beacons.Attachments.List + , Network.Google.Resource.ProximityBeacon.Beacons.Deactivate + , Network.Google.Resource.ProximityBeacon.Beacons.Decommission + , Network.Google.Resource.ProximityBeacon.Beacons.Diagnostics.List + , Network.Google.Resource.ProximityBeacon.Beacons.Get + , Network.Google.Resource.ProximityBeacon.Beacons.List + , Network.Google.Resource.ProximityBeacon.Beacons.Register + , Network.Google.Resource.ProximityBeacon.Beacons.Update + , Network.Google.Resource.ProximityBeacon.Namespaces.List + + other-modules: + Network.Google.ProximityBeacon.Types.Product + , Network.Google.ProximityBeacon.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-proximitybeacon/src/.gitkeep b/gogol-proximitybeacon/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-pubsub/LICENSE b/gogol-pubsub/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-pubsub/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-pubsub/Makefile b/gogol-pubsub/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-pubsub/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-pubsub/README.md b/gogol-pubsub/README.md new file mode 100644 index 000000000..a97ca51ea --- /dev/null +++ b/gogol-pubsub/README.md @@ -0,0 +1,28 @@ +# gogol-pubsub + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Pub/Sub API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-pubsub` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-pubsub/Setup.hs b/gogol-pubsub/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-pubsub/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-pubsub/gen/Network/Google/PubSub.hs b/gogol-pubsub/gen/Network/Google/PubSub.hs new file mode 100644 index 000000000..f3dde5cc2 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/PubSub.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.PubSub +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Provides reliable, many-to-many, asynchronous messaging between +-- applications. +-- +-- /See:/ +module Network.Google.PubSub + ( + -- * API + PubSubAPI + , pubSubAPI + , pubSubURL + + -- * Service Methods + + -- * REST Resources + + -- ** PubsubProjectsSubscriptionsAcknowledge + , module PubSub.Projects.Subscriptions.Acknowledge + + -- ** PubsubProjectsSubscriptionsCreate + , module PubSub.Projects.Subscriptions.Create + + -- ** PubsubProjectsSubscriptionsDelete + , module PubSub.Projects.Subscriptions.Delete + + -- ** PubsubProjectsSubscriptionsGet + , module PubSub.Projects.Subscriptions.Get + + -- ** PubsubProjectsSubscriptionsGetIAMPolicy + , module PubSub.Projects.Subscriptions.GetIAMPolicy + + -- ** PubsubProjectsSubscriptionsList + , module PubSub.Projects.Subscriptions.List + + -- ** PubsubProjectsSubscriptionsModifyAckDeadline + , module PubSub.Projects.Subscriptions.ModifyAckDeadline + + -- ** PubsubProjectsSubscriptionsModifyPushConfig + , module PubSub.Projects.Subscriptions.ModifyPushConfig + + -- ** PubsubProjectsSubscriptionsPull + , module PubSub.Projects.Subscriptions.Pull + + -- ** PubsubProjectsSubscriptionsSetIAMPolicy + , module PubSub.Projects.Subscriptions.SetIAMPolicy + + -- ** PubsubProjectsSubscriptionsTestIAMPermissions + , module PubSub.Projects.Subscriptions.TestIAMPermissions + + -- ** PubsubProjectsTopicsCreate + , module PubSub.Projects.Topics.Create + + -- ** PubsubProjectsTopicsDelete + , module PubSub.Projects.Topics.Delete + + -- ** PubsubProjectsTopicsGet + , module PubSub.Projects.Topics.Get + + -- ** PubsubProjectsTopicsGetIAMPolicy + , module PubSub.Projects.Topics.GetIAMPolicy + + -- ** PubsubProjectsTopicsList + , module PubSub.Projects.Topics.List + + -- ** PubsubProjectsTopicsPublish + , module PubSub.Projects.Topics.Publish + + -- ** PubsubProjectsTopicsSetIAMPolicy + , module PubSub.Projects.Topics.SetIAMPolicy + + -- ** PubsubProjectsTopicsSubscriptionsList + , module PubSub.Projects.Topics.Subscriptions.List + + -- ** PubsubProjectsTopicsTestIAMPermissions + , module PubSub.Projects.Topics.TestIAMPermissions + + -- * Types + + -- ** PushConfig + , PushConfig + , pushConfig + , pcAttributes + , pcPushEndpoint + + -- ** ReceivedMessage + , ReceivedMessage + , receivedMessage + , rmAckId + , rmMessage + + -- ** ModifyAckDeadlineRequest + , ModifyAckDeadlineRequest + , modifyAckDeadlineRequest + , madrAckIds + , madrAckId + , madrAckDeadlineSeconds + + -- ** ModifyPushConfigRequest + , ModifyPushConfigRequest + , modifyPushConfigRequest + , mpcrPushConfig + + -- ** Empty + , Empty + , empty + + -- ** ListTopicSubscriptionsResponse + , ListTopicSubscriptionsResponse + , listTopicSubscriptionsResponse + , ltsrNextPageToken + , ltsrSubscriptions + + -- ** PubsubMessage + , PubsubMessage + , pubsubMessage + , pmData + , pmAttributes + , pmMessageId + + -- ** ListTopicsResponse + , ListTopicsResponse + , listTopicsResponse + , ltrNextPageToken + , ltrTopics + + -- ** PullResponse + , PullResponse + , pullResponse + , prReceivedMessages + + -- ** SetIAMPolicyRequest + , SetIAMPolicyRequest + , setIAMPolicyRequest + , siprPolicy + + -- ** Topic + , Topic + , topic + , tName + + -- ** PullRequest + , PullRequest + , pullRequest + , prMaxMessages + , prReturnImmediately + + -- ** TestIAMPermissionsRequest + , TestIAMPermissionsRequest + , testIAMPermissionsRequest + , tiprPermissions + + -- ** PublishResponse + , PublishResponse + , publishResponse + , prMessageIds + + -- ** TestIAMPermissionsResponse + , TestIAMPermissionsResponse + , testIAMPermissionsResponse + , tiamprPermissions + + -- ** PublishRequest + , PublishRequest + , publishRequest + , prMessages + + -- ** Policy + , Policy + , policy + , pEtag + , pVersion + , pBindings + + -- ** Subscription + , Subscription + , subscription + , sPushConfig + , sTopic + , sName + , sAckDeadlineSeconds + + -- ** Binding + , Binding + , binding + , bMembers + , bRole + + -- ** AcknowledgeRequest + , AcknowledgeRequest + , acknowledgeRequest + , arAckIds + + -- ** ListSubscriptionsResponse + , ListSubscriptionsResponse + , listSubscriptionsResponse + , lsrNextPageToken + , lsrSubscriptions + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types +import Network.Google.Resource.PubSub.Projects.Subscriptions.Acknowledge +import Network.Google.Resource.PubSub.Projects.Subscriptions.Create +import Network.Google.Resource.PubSub.Projects.Subscriptions.Delete +import Network.Google.Resource.PubSub.Projects.Subscriptions.Get +import Network.Google.Resource.PubSub.Projects.Subscriptions.GetIAMPolicy +import Network.Google.Resource.PubSub.Projects.Subscriptions.List +import Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyAckDeadline +import Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyPushConfig +import Network.Google.Resource.PubSub.Projects.Subscriptions.Pull +import Network.Google.Resource.PubSub.Projects.Subscriptions.SetIAMPolicy +import Network.Google.Resource.PubSub.Projects.Subscriptions.TestIAMPermissions +import Network.Google.Resource.PubSub.Projects.Topics.Create +import Network.Google.Resource.PubSub.Projects.Topics.Delete +import Network.Google.Resource.PubSub.Projects.Topics.Get +import Network.Google.Resource.PubSub.Projects.Topics.GetIAMPolicy +import Network.Google.Resource.PubSub.Projects.Topics.List +import Network.Google.Resource.PubSub.Projects.Topics.Publish +import Network.Google.Resource.PubSub.Projects.Topics.SetIAMPolicy +import Network.Google.Resource.PubSub.Projects.Topics.Subscriptions.List +import Network.Google.Resource.PubSub.Projects.Topics.TestIAMPermissions + +{- $resources +TODO +-} + +type PubSubAPI = Projects + +pubSubAPI :: Proxy PubSubAPI +pubSubAPI = Proxy diff --git a/gogol-pubsub/gen/Network/Google/PubSub/Types.hs b/gogol-pubsub/gen/Network/Google/PubSub/Types.hs new file mode 100644 index 000000000..f47c4b6ef --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/PubSub/Types.hs @@ -0,0 +1,148 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PubSub.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PubSub.Types + ( + -- * Service URL + pubSubURL + + -- * PushConfig + , PushConfig + , pushConfig + , pcAttributes + , pcPushEndpoint + + -- * ReceivedMessage + , ReceivedMessage + , receivedMessage + , rmAckId + , rmMessage + + -- * ModifyAckDeadlineRequest + , ModifyAckDeadlineRequest + , modifyAckDeadlineRequest + , madrAckIds + , madrAckId + , madrAckDeadlineSeconds + + -- * ModifyPushConfigRequest + , ModifyPushConfigRequest + , modifyPushConfigRequest + , mpcrPushConfig + + -- * Empty + , Empty + , empty + + -- * ListTopicSubscriptionsResponse + , ListTopicSubscriptionsResponse + , listTopicSubscriptionsResponse + , ltsrNextPageToken + , ltsrSubscriptions + + -- * PubsubMessage + , PubsubMessage + , pubsubMessage + , pmData + , pmAttributes + , pmMessageId + + -- * ListTopicsResponse + , ListTopicsResponse + , listTopicsResponse + , ltrNextPageToken + , ltrTopics + + -- * PullResponse + , PullResponse + , pullResponse + , prReceivedMessages + + -- * SetIAMPolicyRequest + , SetIAMPolicyRequest + , setIAMPolicyRequest + , siprPolicy + + -- * Topic + , Topic + , topic + , tName + + -- * PullRequest + , PullRequest + , pullRequest + , prMaxMessages + , prReturnImmediately + + -- * TestIAMPermissionsRequest + , TestIAMPermissionsRequest + , testIAMPermissionsRequest + , tiprPermissions + + -- * PublishResponse + , PublishResponse + , publishResponse + , prMessageIds + + -- * TestIAMPermissionsResponse + , TestIAMPermissionsResponse + , testIAMPermissionsResponse + , tiamprPermissions + + -- * PublishRequest + , PublishRequest + , publishRequest + , prMessages + + -- * Policy + , Policy + , policy + , pEtag + , pVersion + , pBindings + + -- * Subscription + , Subscription + , subscription + , sPushConfig + , sTopic + , sName + , sAckDeadlineSeconds + + -- * Binding + , Binding + , binding + , bMembers + , bRole + + -- * AcknowledgeRequest + , AcknowledgeRequest + , acknowledgeRequest + , arAckIds + + -- * ListSubscriptionsResponse + , ListSubscriptionsResponse + , listSubscriptionsResponse + , lsrNextPageToken + , lsrSubscriptions + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types.Product +import Network.Google.PubSub.Types.Sum + +-- | URL referring to version 'v1beta2' of the Google Cloud Pub/Sub API. +pubSubURL :: BaseURL +pubSubURL + = BaseUrl Https "https://pubsub.googleapis.com/" 443 diff --git a/gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs b/gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs new file mode 100644 index 000000000..37c2645eb --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs @@ -0,0 +1,1066 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PubSub.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PubSub.Types.Product where + +import Network.Google.Prelude +import Network.Google.PubSub.Types.Sum + +-- | Configuration for a push delivery endpoint. +-- +-- /See:/ 'pushConfig' smart constructor. +data PushConfig = PushConfig + { _pcAttributes :: !(Maybe PushConfigAttributes) + , _pcPushEndpoint :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PushConfig' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcAttributes' +-- +-- * 'pcPushEndpoint' +pushConfig + :: PushConfig +pushConfig = + PushConfig + { _pcAttributes = Nothing + , _pcPushEndpoint = Nothing + } + +-- | Endpoint configuration attributes. Every endpoint has a set of API +-- supported attributes that can be used to control different aspects of +-- the message delivery. The currently supported attribute is +-- \`x-goog-version\`, which you can use to change the format of the push +-- message. This attribute indicates the version of the data expected by +-- the endpoint. This controls the shape of the envelope (i.e. its fields +-- and metadata). The endpoint version is based on the version of the +-- Pub\/Sub API. If not present during the CreateSubscription call, it will +-- default to the version of the API used to make such call. If not present +-- during a ModifyPushConfig call, its value will not be changed. +-- GetSubscription calls will always return a valid version, even if the +-- subscription was created without this attribute. The possible values for +-- this attribute are: * \`v1beta1\`: uses the push format defined in the +-- v1beta1 Pub\/Sub API. * \`v1\` or \`v1beta2\`: uses the push format +-- defined in the v1 Pub\/Sub API. +pcAttributes :: Lens' PushConfig (Maybe PushConfigAttributes) +pcAttributes + = lens _pcAttributes (\ s a -> s{_pcAttributes = a}) + +-- | A URL locating the endpoint to which messages should be pushed. For +-- example, a Webhook endpoint might use \"https:\/\/example.com\/push\". +pcPushEndpoint :: Lens' PushConfig (Maybe Text) +pcPushEndpoint + = lens _pcPushEndpoint + (\ s a -> s{_pcPushEndpoint = a}) + +instance FromJSON PushConfig where + parseJSON + = withObject "PushConfig" + (\ o -> + PushConfig <$> + (o .:? "attributes") <*> (o .:? "pushEndpoint")) + +instance ToJSON PushConfig where + toJSON PushConfig{..} + = object + (catMaybes + [("attributes" .=) <$> _pcAttributes, + ("pushEndpoint" .=) <$> _pcPushEndpoint]) + +-- | A message and its corresponding acknowledgment ID. +-- +-- /See:/ 'receivedMessage' smart constructor. +data ReceivedMessage = ReceivedMessage + { _rmAckId :: !(Maybe Text) + , _rmMessage :: !(Maybe (Maybe PubsubMessage)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReceivedMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rmAckId' +-- +-- * 'rmMessage' +receivedMessage + :: ReceivedMessage +receivedMessage = + ReceivedMessage + { _rmAckId = Nothing + , _rmMessage = Nothing + } + +-- | This ID can be used to acknowledge the received message. +rmAckId :: Lens' ReceivedMessage (Maybe Text) +rmAckId = lens _rmAckId (\ s a -> s{_rmAckId = a}) + +-- | The message. +rmMessage :: Lens' ReceivedMessage (Maybe (Maybe PubsubMessage)) +rmMessage + = lens _rmMessage (\ s a -> s{_rmMessage = a}) + +instance FromJSON ReceivedMessage where + parseJSON + = withObject "ReceivedMessage" + (\ o -> + ReceivedMessage <$> + (o .:? "ackId") <*> (o .:? "message")) + +instance ToJSON ReceivedMessage where + toJSON ReceivedMessage{..} + = object + (catMaybes + [("ackId" .=) <$> _rmAckId, + ("message" .=) <$> _rmMessage]) + +-- | Request for the ModifyAckDeadline method. +-- +-- /See:/ 'modifyAckDeadlineRequest' smart constructor. +data ModifyAckDeadlineRequest = ModifyAckDeadlineRequest + { _madrAckIds :: !(Maybe [Text]) + , _madrAckId :: !(Maybe Text) + , _madrAckDeadlineSeconds :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ModifyAckDeadlineRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'madrAckIds' +-- +-- * 'madrAckId' +-- +-- * 'madrAckDeadlineSeconds' +modifyAckDeadlineRequest + :: ModifyAckDeadlineRequest +modifyAckDeadlineRequest = + ModifyAckDeadlineRequest + { _madrAckIds = Nothing + , _madrAckId = Nothing + , _madrAckDeadlineSeconds = Nothing + } + +-- | List of acknowledgment IDs. +madrAckIds :: Lens' ModifyAckDeadlineRequest [Text] +madrAckIds + = lens _madrAckIds (\ s a -> s{_madrAckIds = a}) . + _Default + . _Coerce + +-- | The acknowledgment ID. Either this or ack_ids must be populated, but not +-- both. +madrAckId :: Lens' ModifyAckDeadlineRequest (Maybe Text) +madrAckId + = lens _madrAckId (\ s a -> s{_madrAckId = a}) + +-- | The new ack deadline with respect to the time this request was sent to +-- the Pub\/Sub system. Must be >= 0. For example, if the value is 10, the +-- new ack deadline will expire 10 seconds after the ModifyAckDeadline call +-- was made. Specifying zero may immediately make the message available for +-- another pull request. +madrAckDeadlineSeconds :: Lens' ModifyAckDeadlineRequest (Maybe Int32) +madrAckDeadlineSeconds + = lens _madrAckDeadlineSeconds + (\ s a -> s{_madrAckDeadlineSeconds = a}) + +instance FromJSON ModifyAckDeadlineRequest where + parseJSON + = withObject "ModifyAckDeadlineRequest" + (\ o -> + ModifyAckDeadlineRequest <$> + (o .:? "ackIds" .!= mempty) <*> (o .:? "ackId") <*> + (o .:? "ackDeadlineSeconds")) + +instance ToJSON ModifyAckDeadlineRequest where + toJSON ModifyAckDeadlineRequest{..} + = object + (catMaybes + [("ackIds" .=) <$> _madrAckIds, + ("ackId" .=) <$> _madrAckId, + ("ackDeadlineSeconds" .=) <$> + _madrAckDeadlineSeconds]) + +-- | Request for the ModifyPushConfig method. +-- +-- /See:/ 'modifyPushConfigRequest' smart constructor. +newtype ModifyPushConfigRequest = ModifyPushConfigRequest + { _mpcrPushConfig :: Maybe (Maybe PushConfig) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ModifyPushConfigRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'mpcrPushConfig' +modifyPushConfigRequest + :: ModifyPushConfigRequest +modifyPushConfigRequest = + ModifyPushConfigRequest + { _mpcrPushConfig = Nothing + } + +-- | The push configuration for future deliveries. An empty pushConfig +-- indicates that the Pub\/Sub system should stop pushing messages from the +-- given subscription and allow messages to be pulled and acknowledged - +-- effectively pausing the subscription if Pull is not called. +mpcrPushConfig :: Lens' ModifyPushConfigRequest (Maybe (Maybe PushConfig)) +mpcrPushConfig + = lens _mpcrPushConfig + (\ s a -> s{_mpcrPushConfig = a}) + +instance FromJSON ModifyPushConfigRequest where + parseJSON + = withObject "ModifyPushConfigRequest" + (\ o -> + ModifyPushConfigRequest <$> (o .:? "pushConfig")) + +instance ToJSON ModifyPushConfigRequest where + toJSON ModifyPushConfigRequest{..} + = object + (catMaybes [("pushConfig" .=) <$> _mpcrPushConfig]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Response for the ListTopicSubscriptions method. +-- +-- /See:/ 'listTopicSubscriptionsResponse' smart constructor. +data ListTopicSubscriptionsResponse = ListTopicSubscriptionsResponse + { _ltsrNextPageToken :: !(Maybe Text) + , _ltsrSubscriptions :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTopicSubscriptionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltsrNextPageToken' +-- +-- * 'ltsrSubscriptions' +listTopicSubscriptionsResponse + :: ListTopicSubscriptionsResponse +listTopicSubscriptionsResponse = + ListTopicSubscriptionsResponse + { _ltsrNextPageToken = Nothing + , _ltsrSubscriptions = Nothing + } + +-- | If not empty, indicates that there may be more subscriptions that match +-- the request; this value should be passed in a new +-- ListTopicSubscriptionsRequest to get more subscriptions. +ltsrNextPageToken :: Lens' ListTopicSubscriptionsResponse (Maybe Text) +ltsrNextPageToken + = lens _ltsrNextPageToken + (\ s a -> s{_ltsrNextPageToken = a}) + +-- | The names of the subscriptions that match the request. +ltsrSubscriptions :: Lens' ListTopicSubscriptionsResponse [Text] +ltsrSubscriptions + = lens _ltsrSubscriptions + (\ s a -> s{_ltsrSubscriptions = a}) + . _Default + . _Coerce + +instance FromJSON ListTopicSubscriptionsResponse + where + parseJSON + = withObject "ListTopicSubscriptionsResponse" + (\ o -> + ListTopicSubscriptionsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "subscriptions" .!= mempty)) + +instance ToJSON ListTopicSubscriptionsResponse where + toJSON ListTopicSubscriptionsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltsrNextPageToken, + ("subscriptions" .=) <$> _ltsrSubscriptions]) + +-- | A message data and its attributes. The message payload must not be +-- empty; it must contain either a non-empty data field, or at least one +-- attribute. +-- +-- /See:/ 'pubsubMessage' smart constructor. +data PubsubMessage = PubsubMessage + { _pmData :: !(Maybe Word8) + , _pmAttributes :: !(Maybe PubsubMessageAttributes) + , _pmMessageId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PubsubMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pmData' +-- +-- * 'pmAttributes' +-- +-- * 'pmMessageId' +pubsubMessage + :: PubsubMessage +pubsubMessage = + PubsubMessage + { _pmData = Nothing + , _pmAttributes = Nothing + , _pmMessageId = Nothing + } + +-- | The message payload. For JSON requests, the value of this field must be +-- base64-encoded. +pmData :: Lens' PubsubMessage (Maybe Word8) +pmData = lens _pmData (\ s a -> s{_pmData = a}) + +-- | Optional attributes for this message. +pmAttributes :: Lens' PubsubMessage (Maybe PubsubMessageAttributes) +pmAttributes + = lens _pmAttributes (\ s a -> s{_pmAttributes = a}) + +-- | ID of this message assigned by the server at publication time. +-- Guaranteed to be unique within the topic. This value may be read by a +-- subscriber that receives a PubsubMessage via a Pull call or a push +-- delivery. It must not be populated by a publisher in a Publish call. +pmMessageId :: Lens' PubsubMessage (Maybe Text) +pmMessageId + = lens _pmMessageId (\ s a -> s{_pmMessageId = a}) + +instance FromJSON PubsubMessage where + parseJSON + = withObject "PubsubMessage" + (\ o -> + PubsubMessage <$> + (o .:? "data") <*> (o .:? "attributes") <*> + (o .:? "messageId")) + +instance ToJSON PubsubMessage where + toJSON PubsubMessage{..} + = object + (catMaybes + [("data" .=) <$> _pmData, + ("attributes" .=) <$> _pmAttributes, + ("messageId" .=) <$> _pmMessageId]) + +-- | Response for the ListTopics method. +-- +-- /See:/ 'listTopicsResponse' smart constructor. +data ListTopicsResponse = ListTopicsResponse + { _ltrNextPageToken :: !(Maybe Text) + , _ltrTopics :: !(Maybe [Maybe Topic]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTopicsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrNextPageToken' +-- +-- * 'ltrTopics' +listTopicsResponse + :: ListTopicsResponse +listTopicsResponse = + ListTopicsResponse + { _ltrNextPageToken = Nothing + , _ltrTopics = Nothing + } + +-- | If not empty, indicates that there may be more topics that match the +-- request; this value should be passed in a new ListTopicsRequest. +ltrNextPageToken :: Lens' ListTopicsResponse (Maybe Text) +ltrNextPageToken + = lens _ltrNextPageToken + (\ s a -> s{_ltrNextPageToken = a}) + +-- | The resulting topics. +ltrTopics :: Lens' ListTopicsResponse [Maybe Topic] +ltrTopics + = lens _ltrTopics (\ s a -> s{_ltrTopics = a}) . + _Default + . _Coerce + +instance FromJSON ListTopicsResponse where + parseJSON + = withObject "ListTopicsResponse" + (\ o -> + ListTopicsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "topics" .!= mempty)) + +instance ToJSON ListTopicsResponse where + toJSON ListTopicsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltrNextPageToken, + ("topics" .=) <$> _ltrTopics]) + +-- | Response for the Pull method. +-- +-- /See:/ 'pullResponse' smart constructor. +newtype PullResponse = PullResponse + { _prReceivedMessages :: Maybe [Maybe ReceivedMessage] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PullResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prReceivedMessages' +pullResponse + :: PullResponse +pullResponse = + PullResponse + { _prReceivedMessages = Nothing + } + +-- | Received Pub\/Sub messages. The Pub\/Sub system will return zero +-- messages if there are no more available in the backlog. The Pub\/Sub +-- system may return fewer than the maxMessages requested even if there are +-- more messages available in the backlog. +prReceivedMessages :: Lens' PullResponse [Maybe ReceivedMessage] +prReceivedMessages + = lens _prReceivedMessages + (\ s a -> s{_prReceivedMessages = a}) + . _Default + . _Coerce + +instance FromJSON PullResponse where + parseJSON + = withObject "PullResponse" + (\ o -> + PullResponse <$> + (o .:? "receivedMessages" .!= mempty)) + +instance ToJSON PullResponse where + toJSON PullResponse{..} + = object + (catMaybes + [("receivedMessages" .=) <$> _prReceivedMessages]) + +-- | Request message for \`SetIamPolicy\` method. +-- +-- /See:/ 'setIAMPolicyRequest' smart constructor. +newtype SetIAMPolicyRequest = SetIAMPolicyRequest + { _siprPolicy :: Maybe (Maybe Policy) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SetIAMPolicyRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siprPolicy' +setIAMPolicyRequest + :: SetIAMPolicyRequest +setIAMPolicyRequest = + SetIAMPolicyRequest + { _siprPolicy = Nothing + } + +-- | REQUIRED: The complete policy to be applied to the \'resource\'. The +-- size of the policy is limited to a few 10s of KB. An empty policy is in +-- general a valid policy but certain services (like Projects) might reject +-- them. +siprPolicy :: Lens' SetIAMPolicyRequest (Maybe (Maybe Policy)) +siprPolicy + = lens _siprPolicy (\ s a -> s{_siprPolicy = a}) + +instance FromJSON SetIAMPolicyRequest where + parseJSON + = withObject "SetIAMPolicyRequest" + (\ o -> SetIAMPolicyRequest <$> (o .:? "policy")) + +instance ToJSON SetIAMPolicyRequest where + toJSON SetIAMPolicyRequest{..} + = object (catMaybes [("policy" .=) <$> _siprPolicy]) + +-- | A topic resource. +-- +-- /See:/ 'topic' smart constructor. +newtype Topic = Topic + { _tName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Topic' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tName' +topic + :: Topic +topic = + Topic + { _tName = Nothing + } + +-- | The name of the topic. It must have the format +-- \`\"projects\/{project}\/topics\/{topic}\"\`. \`{topic}\` must start +-- with a letter, and contain only letters (\`[A-Za-z]\`), numbers +-- (\`[0-9]\`), dashes (\`-\`), underscores (\`_\`), periods (\`.\`), +-- tildes (\`~\`), plus (\`+\`) or percent signs (\`%\`). It must be +-- between 3 and 255 characters in length, and it must not start with +-- \`\"goog\"\`. +tName :: Lens' Topic (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +instance FromJSON Topic where + parseJSON + = withObject "Topic" + (\ o -> Topic <$> (o .:? "name")) + +instance ToJSON Topic where + toJSON Topic{..} + = object (catMaybes [("name" .=) <$> _tName]) + +-- | Request for the Pull method. +-- +-- /See:/ 'pullRequest' smart constructor. +data PullRequest = PullRequest + { _prMaxMessages :: !(Maybe Int32) + , _prReturnImmediately :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PullRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prMaxMessages' +-- +-- * 'prReturnImmediately' +pullRequest + :: PullRequest +pullRequest = + PullRequest + { _prMaxMessages = Nothing + , _prReturnImmediately = Nothing + } + +-- | The maximum number of messages returned for this request. The Pub\/Sub +-- system may return fewer than the number specified. +prMaxMessages :: Lens' PullRequest (Maybe Int32) +prMaxMessages + = lens _prMaxMessages + (\ s a -> s{_prMaxMessages = a}) + +-- | If this is specified as true the system will respond immediately even if +-- it is not able to return a message in the Pull response. Otherwise the +-- system is allowed to wait until at least one message is available rather +-- than returning no messages. The client may cancel the request if it does +-- not wish to wait any longer for the response. +prReturnImmediately :: Lens' PullRequest (Maybe Bool) +prReturnImmediately + = lens _prReturnImmediately + (\ s a -> s{_prReturnImmediately = a}) + +instance FromJSON PullRequest where + parseJSON + = withObject "PullRequest" + (\ o -> + PullRequest <$> + (o .:? "maxMessages") <*> + (o .:? "returnImmediately")) + +instance ToJSON PullRequest where + toJSON PullRequest{..} + = object + (catMaybes + [("maxMessages" .=) <$> _prMaxMessages, + ("returnImmediately" .=) <$> _prReturnImmediately]) + +-- | Request message for \`TestIamPermissions\` method. +-- +-- /See:/ 'testIAMPermissionsRequest' smart constructor. +newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest + { _tiprPermissions :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestIAMPermissionsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiprPermissions' +testIAMPermissionsRequest + :: TestIAMPermissionsRequest +testIAMPermissionsRequest = + TestIAMPermissionsRequest + { _tiprPermissions = Nothing + } + +-- | The set of permissions to check for the \'resource\'. Permissions with +-- wildcards (such as \'*\' or \'storage.*\') are not allowed. +tiprPermissions :: Lens' TestIAMPermissionsRequest [Text] +tiprPermissions + = lens _tiprPermissions + (\ s a -> s{_tiprPermissions = a}) + . _Default + . _Coerce + +instance FromJSON TestIAMPermissionsRequest where + parseJSON + = withObject "TestIAMPermissionsRequest" + (\ o -> + TestIAMPermissionsRequest <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON TestIAMPermissionsRequest where + toJSON TestIAMPermissionsRequest{..} + = object + (catMaybes [("permissions" .=) <$> _tiprPermissions]) + +-- | Response for the Publish method. +-- +-- /See:/ 'publishResponse' smart constructor. +newtype PublishResponse = PublishResponse + { _prMessageIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prMessageIds' +publishResponse + :: PublishResponse +publishResponse = + PublishResponse + { _prMessageIds = Nothing + } + +-- | The server-assigned ID of each published message, in the same order as +-- the messages in the request. IDs are guaranteed to be unique within the +-- topic. +prMessageIds :: Lens' PublishResponse [Text] +prMessageIds + = lens _prMessageIds (\ s a -> s{_prMessageIds = a}) + . _Default + . _Coerce + +instance FromJSON PublishResponse where + parseJSON + = withObject "PublishResponse" + (\ o -> + PublishResponse <$> (o .:? "messageIds" .!= mempty)) + +instance ToJSON PublishResponse where + toJSON PublishResponse{..} + = object + (catMaybes [("messageIds" .=) <$> _prMessageIds]) + +-- | Response message for \`TestIamPermissions\` method. +-- +-- /See:/ 'testIAMPermissionsResponse' smart constructor. +newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse + { _tiamprPermissions :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestIAMPermissionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiamprPermissions' +testIAMPermissionsResponse + :: TestIAMPermissionsResponse +testIAMPermissionsResponse = + TestIAMPermissionsResponse + { _tiamprPermissions = Nothing + } + +-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is +-- allowed. +tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text] +tiamprPermissions + = lens _tiamprPermissions + (\ s a -> s{_tiamprPermissions = a}) + . _Default + . _Coerce + +instance FromJSON TestIAMPermissionsResponse where + parseJSON + = withObject "TestIAMPermissionsResponse" + (\ o -> + TestIAMPermissionsResponse <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON TestIAMPermissionsResponse where + toJSON TestIAMPermissionsResponse{..} + = object + (catMaybes + [("permissions" .=) <$> _tiamprPermissions]) + +-- | Request for the Publish method. +-- +-- /See:/ 'publishRequest' smart constructor. +newtype PublishRequest = PublishRequest + { _prMessages :: Maybe [Maybe PubsubMessage] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prMessages' +publishRequest + :: PublishRequest +publishRequest = + PublishRequest + { _prMessages = Nothing + } + +-- | The messages to publish. +prMessages :: Lens' PublishRequest [Maybe PubsubMessage] +prMessages + = lens _prMessages (\ s a -> s{_prMessages = a}) . + _Default + . _Coerce + +instance FromJSON PublishRequest where + parseJSON + = withObject "PublishRequest" + (\ o -> + PublishRequest <$> (o .:? "messages" .!= mempty)) + +instance ToJSON PublishRequest where + toJSON PublishRequest{..} + = object + (catMaybes [("messages" .=) <$> _prMessages]) + +-- | # Overview The \`Policy\` defines an access control policy language. It +-- is used to define policies that are attached to resources like files, +-- folders, VMs, etc. # Policy structure A \`Policy\` consists of a list of +-- bindings. A \`Binding\` binds a set of members to a role, where the +-- members include user accounts, user groups, user domains, and service +-- accounts. A \'role\' is a named set of permissions, defined by IAM. The +-- definition of a role is outside the policy. A permission check first +-- determines the roles that include the specified permission, and then +-- determines if the principal specified is a member of a binding to at +-- least one of these roles. The membership check is recursive when a group +-- is bound to a role. Policy examples: \`\`\` { \"bindings\": [ { +-- \"role\": \"roles\/owner\", \"members\": [ \"user:mike\'example.com\", +-- \"group:admins\'example.com\", \"domain:google.com\", +-- \"serviceAccount:frontend\'example.iam.gserviceaccounts.com\"] }, { +-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] } +-- ] } \`\`\` +-- +-- /See:/ 'policy' smart constructor. +data Policy = Policy + { _pEtag :: !(Maybe Word8) + , _pVersion :: !(Maybe Int32) + , _pBindings :: !(Maybe [Maybe Binding]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Policy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pEtag' +-- +-- * 'pVersion' +-- +-- * 'pBindings' +policy + :: Policy +policy = + Policy + { _pEtag = Nothing + , _pVersion = Nothing + , _pBindings = Nothing + } + +-- | Can be used to perform a read-modify-write. +pEtag :: Lens' Policy (Maybe Word8) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | The policy language version. The version of the policy is represented by +-- the etag. The default version is 0. +pVersion :: Lens' Policy (Maybe Int32) +pVersion = lens _pVersion (\ s a -> s{_pVersion = a}) + +-- | It is an error to specify multiple bindings for the same role. It is an +-- error to specify a binding with no members. +pBindings :: Lens' Policy [Maybe Binding] +pBindings + = lens _pBindings (\ s a -> s{_pBindings = a}) . + _Default + . _Coerce + +instance FromJSON Policy where + parseJSON + = withObject "Policy" + (\ o -> + Policy <$> + (o .:? "etag") <*> (o .:? "version") <*> + (o .:? "bindings" .!= mempty)) + +instance ToJSON Policy where + toJSON Policy{..} + = object + (catMaybes + [("etag" .=) <$> _pEtag, + ("version" .=) <$> _pVersion, + ("bindings" .=) <$> _pBindings]) + +-- | A subscription resource. +-- +-- /See:/ 'subscription' smart constructor. +data Subscription = Subscription + { _sPushConfig :: !(Maybe (Maybe PushConfig)) + , _sTopic :: !(Maybe Text) + , _sName :: !(Maybe Text) + , _sAckDeadlineSeconds :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subscription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sPushConfig' +-- +-- * 'sTopic' +-- +-- * 'sName' +-- +-- * 'sAckDeadlineSeconds' +subscription + :: Subscription +subscription = + Subscription + { _sPushConfig = Nothing + , _sTopic = Nothing + , _sName = Nothing + , _sAckDeadlineSeconds = Nothing + } + +-- | If push delivery is used with this subscription, this field is used to +-- configure it. An empty pushConfig signifies that the subscriber will +-- pull and ack messages using API methods. +sPushConfig :: Lens' Subscription (Maybe (Maybe PushConfig)) +sPushConfig + = lens _sPushConfig (\ s a -> s{_sPushConfig = a}) + +-- | The name of the topic from which this subscription is receiving +-- messages. The value of this field will be \`_deleted-topic_\` if the +-- topic has been deleted. +sTopic :: Lens' Subscription (Maybe Text) +sTopic = lens _sTopic (\ s a -> s{_sTopic = a}) + +-- | The name of the subscription. It must have the format +-- \`\"projects\/{project}\/subscriptions\/{subscription}\"\`. +-- \`{subscription}\` must start with a letter, and contain only letters +-- (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), underscores +-- (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent signs +-- (\`%\`). It must be between 3 and 255 characters in length, and it must +-- not start with \`\"goog\"\`. +sName :: Lens' Subscription (Maybe Text) +sName = lens _sName (\ s a -> s{_sName = a}) + +-- | This value is the maximum time after a subscriber receives a message +-- before the subscriber should acknowledge the message. After message +-- delivery but before the ack deadline expires and before the message is +-- acknowledged, it is an outstanding message and will not be delivered +-- again during that time (on a best-effort basis). For pull delivery this +-- value is used as the initial value for the ack deadline. To override +-- this value for a given message, call ModifyAckDeadline with the +-- corresponding ack_id. For push delivery, this value is also used to set +-- the request timeout for the call to the push endpoint. If the subscriber +-- never acknowledges the message, the Pub\/Sub system will eventually +-- redeliver the message. If this parameter is not set, the default value +-- of 10 seconds is used. +sAckDeadlineSeconds :: Lens' Subscription (Maybe Int32) +sAckDeadlineSeconds + = lens _sAckDeadlineSeconds + (\ s a -> s{_sAckDeadlineSeconds = a}) + +instance FromJSON Subscription where + parseJSON + = withObject "Subscription" + (\ o -> + Subscription <$> + (o .:? "pushConfig") <*> (o .:? "topic") <*> + (o .:? "name") + <*> (o .:? "ackDeadlineSeconds")) + +instance ToJSON Subscription where + toJSON Subscription{..} + = object + (catMaybes + [("pushConfig" .=) <$> _sPushConfig, + ("topic" .=) <$> _sTopic, ("name" .=) <$> _sName, + ("ackDeadlineSeconds" .=) <$> _sAckDeadlineSeconds]) + +-- | Associates members with roles. See below for allowed formats of members. +-- +-- /See:/ 'binding' smart constructor. +data Binding = Binding + { _bMembers :: !(Maybe [Text]) + , _bRole :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Binding' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bMembers' +-- +-- * 'bRole' +binding + :: Binding +binding = + Binding + { _bMembers = Nothing + , _bRole = Nothing + } + +-- | Format of member entries: 1. allUsers Matches any requesting principal +-- (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches +-- any requesting authenticated principal (users or service accounts). 3. +-- user:{emailid} A google user account using an email address. For example +-- alice\'gmail.com, joe\'example.com 4. serviceAccount:{emailid} An +-- service account email. 5. group:{emailid} A google group with an email +-- address. For example auth-ti-cloud\'google.com 6. domain:{domain} A +-- Google Apps domain name. For example google.com, example.com +bMembers :: Lens' Binding [Text] +bMembers + = lens _bMembers (\ s a -> s{_bMembers = a}) . + _Default + . _Coerce + +-- | The name of the role to which the members should be bound. Examples: +-- \"roles\/viewer\", \"roles\/editor\", \"roles\/owner\". Required +bRole :: Lens' Binding (Maybe Text) +bRole = lens _bRole (\ s a -> s{_bRole = a}) + +instance FromJSON Binding where + parseJSON + = withObject "Binding" + (\ o -> + Binding <$> + (o .:? "members" .!= mempty) <*> (o .:? "role")) + +instance ToJSON Binding where + toJSON Binding{..} + = object + (catMaybes + [("members" .=) <$> _bMembers, + ("role" .=) <$> _bRole]) + +-- | Request for the Acknowledge method. +-- +-- /See:/ 'acknowledgeRequest' smart constructor. +newtype AcknowledgeRequest = AcknowledgeRequest + { _arAckIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AcknowledgeRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arAckIds' +acknowledgeRequest + :: AcknowledgeRequest +acknowledgeRequest = + AcknowledgeRequest + { _arAckIds = Nothing + } + +-- | The acknowledgment ID for the messages being acknowledged that was +-- returned by the Pub\/Sub system in the Pull response. Must not be empty. +arAckIds :: Lens' AcknowledgeRequest [Text] +arAckIds + = lens _arAckIds (\ s a -> s{_arAckIds = a}) . + _Default + . _Coerce + +instance FromJSON AcknowledgeRequest where + parseJSON + = withObject "AcknowledgeRequest" + (\ o -> + AcknowledgeRequest <$> (o .:? "ackIds" .!= mempty)) + +instance ToJSON AcknowledgeRequest where + toJSON AcknowledgeRequest{..} + = object (catMaybes [("ackIds" .=) <$> _arAckIds]) + +-- | Response for the ListSubscriptions method. +-- +-- /See:/ 'listSubscriptionsResponse' smart constructor. +data ListSubscriptionsResponse = ListSubscriptionsResponse + { _lsrNextPageToken :: !(Maybe Text) + , _lsrSubscriptions :: !(Maybe [Maybe Subscription]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListSubscriptionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsrNextPageToken' +-- +-- * 'lsrSubscriptions' +listSubscriptionsResponse + :: ListSubscriptionsResponse +listSubscriptionsResponse = + ListSubscriptionsResponse + { _lsrNextPageToken = Nothing + , _lsrSubscriptions = Nothing + } + +-- | If not empty, indicates that there may be more subscriptions that match +-- the request; this value should be passed in a new +-- ListSubscriptionsRequest to get more subscriptions. +lsrNextPageToken :: Lens' ListSubscriptionsResponse (Maybe Text) +lsrNextPageToken + = lens _lsrNextPageToken + (\ s a -> s{_lsrNextPageToken = a}) + +-- | The subscriptions that match the request. +lsrSubscriptions :: Lens' ListSubscriptionsResponse [Maybe Subscription] +lsrSubscriptions + = lens _lsrSubscriptions + (\ s a -> s{_lsrSubscriptions = a}) + . _Default + . _Coerce + +instance FromJSON ListSubscriptionsResponse where + parseJSON + = withObject "ListSubscriptionsResponse" + (\ o -> + ListSubscriptionsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "subscriptions" .!= mempty)) + +instance ToJSON ListSubscriptionsResponse where + toJSON ListSubscriptionsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lsrNextPageToken, + ("subscriptions" .=) <$> _lsrSubscriptions]) diff --git a/gogol-pubsub/gen/Network/Google/PubSub/Types/Sum.hs b/gogol-pubsub/gen/Network/Google/PubSub/Types/Sum.hs new file mode 100644 index 000000000..ce8b54438 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/PubSub/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.PubSub.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.PubSub.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Acknowledge.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Acknowledge.hs new file mode 100644 index 000000000..2bff28177 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Acknowledge.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.Acknowledge +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Acknowledges the messages associated with the ack tokens in the +-- AcknowledgeRequest. The Pub\/Sub system can remove the relevant messages +-- from the subscription. Acknowledging a message whose ack deadline has +-- expired may succeed, but such a message may be redelivered later. +-- Acknowledging a message more than once will not result in an error. +-- +-- /See:/ for @PubsubProjectsSubscriptionsAcknowledge@. +module PubSub.Projects.Subscriptions.Acknowledge + ( + -- * REST Resource + ProjectsSubscriptionsAcknowledgeAPI + + -- * Creating a Request + , projectsSubscriptionsAcknowledge + , ProjectsSubscriptionsAcknowledge + + -- * Request Lenses + , psaXgafv + , psaQuotaUser + , psaPrettyPrint + , psaUploadProtocol + , psaPp + , psaAccessToken + , psaUploadType + , psaBearerToken + , psaKey + , psaOauthToken + , psaSubscription + , psaFields + , psaCallback + , psaAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsAcknowledge@ which the +-- 'ProjectsSubscriptionsAcknowledge' request conforms to. +type ProjectsSubscriptionsAcknowledgeAPI = + "v1beta2" :> + "{+subscription}:acknowledge" :> Post '[JSON] Empty + +-- | Acknowledges the messages associated with the ack tokens in the +-- AcknowledgeRequest. The Pub\/Sub system can remove the relevant messages +-- from the subscription. Acknowledging a message whose ack deadline has +-- expired may succeed, but such a message may be redelivered later. +-- Acknowledging a message more than once will not result in an error. +-- +-- /See:/ 'projectsSubscriptionsAcknowledge' smart constructor. +data ProjectsSubscriptionsAcknowledge = ProjectsSubscriptionsAcknowledge + { _psaXgafv :: !(Maybe Text) + , _psaQuotaUser :: !(Maybe Text) + , _psaPrettyPrint :: !Bool + , _psaUploadProtocol :: !(Maybe Text) + , _psaPp :: !Bool + , _psaAccessToken :: !(Maybe Text) + , _psaUploadType :: !(Maybe Text) + , _psaBearerToken :: !(Maybe Text) + , _psaKey :: !(Maybe Text) + , _psaOauthToken :: !(Maybe Text) + , _psaSubscription :: !Text + , _psaFields :: !(Maybe Text) + , _psaCallback :: !(Maybe Text) + , _psaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsAcknowledge'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psaXgafv' +-- +-- * 'psaQuotaUser' +-- +-- * 'psaPrettyPrint' +-- +-- * 'psaUploadProtocol' +-- +-- * 'psaPp' +-- +-- * 'psaAccessToken' +-- +-- * 'psaUploadType' +-- +-- * 'psaBearerToken' +-- +-- * 'psaKey' +-- +-- * 'psaOauthToken' +-- +-- * 'psaSubscription' +-- +-- * 'psaFields' +-- +-- * 'psaCallback' +-- +-- * 'psaAlt' +projectsSubscriptionsAcknowledge + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsAcknowledge +projectsSubscriptionsAcknowledge pPsaSubscription_ = + ProjectsSubscriptionsAcknowledge + { _psaXgafv = Nothing + , _psaQuotaUser = Nothing + , _psaPrettyPrint = True + , _psaUploadProtocol = Nothing + , _psaPp = True + , _psaAccessToken = Nothing + , _psaUploadType = Nothing + , _psaBearerToken = Nothing + , _psaKey = Nothing + , _psaOauthToken = Nothing + , _psaSubscription = pPsaSubscription_ + , _psaFields = Nothing + , _psaCallback = Nothing + , _psaAlt = "json" + } + +-- | V1 error format. +psaXgafv :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaXgafv = lens _psaXgafv (\ s a -> s{_psaXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psaQuotaUser :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaQuotaUser + = lens _psaQuotaUser (\ s a -> s{_psaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psaPrettyPrint :: Lens' ProjectsSubscriptionsAcknowledge' Bool +psaPrettyPrint + = lens _psaPrettyPrint + (\ s a -> s{_psaPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psaUploadProtocol :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaUploadProtocol + = lens _psaUploadProtocol + (\ s a -> s{_psaUploadProtocol = a}) + +-- | Pretty-print response. +psaPp :: Lens' ProjectsSubscriptionsAcknowledge' Bool +psaPp = lens _psaPp (\ s a -> s{_psaPp = a}) + +-- | OAuth access token. +psaAccessToken :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaAccessToken + = lens _psaAccessToken + (\ s a -> s{_psaAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psaUploadType :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaUploadType + = lens _psaUploadType + (\ s a -> s{_psaUploadType = a}) + +-- | OAuth bearer token. +psaBearerToken :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaBearerToken + = lens _psaBearerToken + (\ s a -> s{_psaBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psaKey :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaKey = lens _psaKey (\ s a -> s{_psaKey = a}) + +-- | OAuth 2.0 token for the current user. +psaOauthToken :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaOauthToken + = lens _psaOauthToken + (\ s a -> s{_psaOauthToken = a}) + +-- | The subscription whose message is being acknowledged. +psaSubscription :: Lens' ProjectsSubscriptionsAcknowledge' Text +psaSubscription + = lens _psaSubscription + (\ s a -> s{_psaSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +psaFields :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaFields + = lens _psaFields (\ s a -> s{_psaFields = a}) + +-- | JSONP +psaCallback :: Lens' ProjectsSubscriptionsAcknowledge' (Maybe Text) +psaCallback + = lens _psaCallback (\ s a -> s{_psaCallback = a}) + +-- | Data format for response. +psaAlt :: Lens' ProjectsSubscriptionsAcknowledge' Text +psaAlt = lens _psaAlt (\ s a -> s{_psaAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsAcknowledge' where + type Rs ProjectsSubscriptionsAcknowledge' = Empty + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsAcknowledge{..} + = go _psaXgafv _psaQuotaUser _psaPrettyPrint + _psaUploadProtocol + _psaPp + _psaAccessToken + _psaUploadType + _psaBearerToken + _psaKey + _psaOauthToken + _psaSubscription + _psaFields + _psaCallback + _psaAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsAcknowledgeAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Create.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Create.hs new file mode 100644 index 000000000..b834e85c0 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Create.hs @@ -0,0 +1,238 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a subscription to a given topic for a given subscriber. If the +-- subscription already exists, returns ALREADY_EXISTS. If the +-- corresponding topic doesn\'t exist, returns NOT_FOUND. If the name is +-- not provided in the request, the server will assign a random name for +-- this subscription on the same project as the topic. +-- +-- /See:/ for @PubsubProjectsSubscriptionsCreate@. +module PubSub.Projects.Subscriptions.Create + ( + -- * REST Resource + ProjectsSubscriptionsCreateAPI + + -- * Creating a Request + , projectsSubscriptionsCreate + , ProjectsSubscriptionsCreate + + -- * Request Lenses + , pscXgafv + , pscQuotaUser + , pscPrettyPrint + , pscUploadProtocol + , pscPp + , pscAccessToken + , pscUploadType + , pscBearerToken + , pscKey + , pscName + , pscOauthToken + , pscFields + , pscCallback + , pscAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsCreate@ which the +-- 'ProjectsSubscriptionsCreate' request conforms to. +type ProjectsSubscriptionsCreateAPI = + "v1beta2" :> "{+name}" :> Put '[JSON] Subscription + +-- | Creates a subscription to a given topic for a given subscriber. If the +-- subscription already exists, returns ALREADY_EXISTS. If the +-- corresponding topic doesn\'t exist, returns NOT_FOUND. If the name is +-- not provided in the request, the server will assign a random name for +-- this subscription on the same project as the topic. +-- +-- /See:/ 'projectsSubscriptionsCreate' smart constructor. +data ProjectsSubscriptionsCreate = ProjectsSubscriptionsCreate + { _pscXgafv :: !(Maybe Text) + , _pscQuotaUser :: !(Maybe Text) + , _pscPrettyPrint :: !Bool + , _pscUploadProtocol :: !(Maybe Text) + , _pscPp :: !Bool + , _pscAccessToken :: !(Maybe Text) + , _pscUploadType :: !(Maybe Text) + , _pscBearerToken :: !(Maybe Text) + , _pscKey :: !(Maybe Text) + , _pscName :: !Text + , _pscOauthToken :: !(Maybe Text) + , _pscFields :: !(Maybe Text) + , _pscCallback :: !(Maybe Text) + , _pscAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pscXgafv' +-- +-- * 'pscQuotaUser' +-- +-- * 'pscPrettyPrint' +-- +-- * 'pscUploadProtocol' +-- +-- * 'pscPp' +-- +-- * 'pscAccessToken' +-- +-- * 'pscUploadType' +-- +-- * 'pscBearerToken' +-- +-- * 'pscKey' +-- +-- * 'pscName' +-- +-- * 'pscOauthToken' +-- +-- * 'pscFields' +-- +-- * 'pscCallback' +-- +-- * 'pscAlt' +projectsSubscriptionsCreate + :: Text -- ^ 'name' + -> ProjectsSubscriptionsCreate +projectsSubscriptionsCreate pPscName_ = + ProjectsSubscriptionsCreate + { _pscXgafv = Nothing + , _pscQuotaUser = Nothing + , _pscPrettyPrint = True + , _pscUploadProtocol = Nothing + , _pscPp = True + , _pscAccessToken = Nothing + , _pscUploadType = Nothing + , _pscBearerToken = Nothing + , _pscKey = Nothing + , _pscName = pPscName_ + , _pscOauthToken = Nothing + , _pscFields = Nothing + , _pscCallback = Nothing + , _pscAlt = "json" + } + +-- | V1 error format. +pscXgafv :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscXgafv = lens _pscXgafv (\ s a -> s{_pscXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pscQuotaUser :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscQuotaUser + = lens _pscQuotaUser (\ s a -> s{_pscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pscPrettyPrint :: Lens' ProjectsSubscriptionsCreate' Bool +pscPrettyPrint + = lens _pscPrettyPrint + (\ s a -> s{_pscPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pscUploadProtocol :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscUploadProtocol + = lens _pscUploadProtocol + (\ s a -> s{_pscUploadProtocol = a}) + +-- | Pretty-print response. +pscPp :: Lens' ProjectsSubscriptionsCreate' Bool +pscPp = lens _pscPp (\ s a -> s{_pscPp = a}) + +-- | OAuth access token. +pscAccessToken :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscAccessToken + = lens _pscAccessToken + (\ s a -> s{_pscAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pscUploadType :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscUploadType + = lens _pscUploadType + (\ s a -> s{_pscUploadType = a}) + +-- | OAuth bearer token. +pscBearerToken :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscBearerToken + = lens _pscBearerToken + (\ s a -> s{_pscBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pscKey :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscKey = lens _pscKey (\ s a -> s{_pscKey = a}) + +-- | The name of the subscription. It must have the format +-- \`\"projects\/{project}\/subscriptions\/{subscription}\"\`. +-- \`{subscription}\` must start with a letter, and contain only letters +-- (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), underscores +-- (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent signs +-- (\`%\`). It must be between 3 and 255 characters in length, and it must +-- not start with \`\"goog\"\`. +pscName :: Lens' ProjectsSubscriptionsCreate' Text +pscName = lens _pscName (\ s a -> s{_pscName = a}) + +-- | OAuth 2.0 token for the current user. +pscOauthToken :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscOauthToken + = lens _pscOauthToken + (\ s a -> s{_pscOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pscFields :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscFields + = lens _pscFields (\ s a -> s{_pscFields = a}) + +-- | JSONP +pscCallback :: Lens' ProjectsSubscriptionsCreate' (Maybe Text) +pscCallback + = lens _pscCallback (\ s a -> s{_pscCallback = a}) + +-- | Data format for response. +pscAlt :: Lens' ProjectsSubscriptionsCreate' Text +pscAlt = lens _pscAlt (\ s a -> s{_pscAlt = a}) + +instance GoogleRequest ProjectsSubscriptionsCreate' + where + type Rs ProjectsSubscriptionsCreate' = Subscription + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsSubscriptionsCreate{..} + = go _pscXgafv _pscQuotaUser _pscPrettyPrint + _pscUploadProtocol + _pscPp + _pscAccessToken + _pscUploadType + _pscBearerToken + _pscKey + _pscName + _pscOauthToken + _pscFields + _pscCallback + _pscAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsCreateAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Delete.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Delete.hs new file mode 100644 index 000000000..761d842eb --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Delete.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes an existing subscription. All pending messages in the +-- subscription are immediately dropped. Calls to Pull after deletion will +-- return NOT_FOUND. After a subscription is deleted, a new one may be +-- created with the same name, but the new one has no association with the +-- old subscription, or its topic unless the same topic is specified. +-- +-- /See:/ for @PubsubProjectsSubscriptionsDelete@. +module PubSub.Projects.Subscriptions.Delete + ( + -- * REST Resource + ProjectsSubscriptionsDeleteAPI + + -- * Creating a Request + , projectsSubscriptionsDelete + , ProjectsSubscriptionsDelete + + -- * Request Lenses + , psdXgafv + , psdQuotaUser + , psdPrettyPrint + , psdUploadProtocol + , psdPp + , psdAccessToken + , psdUploadType + , psdBearerToken + , psdKey + , psdOauthToken + , psdSubscription + , psdFields + , psdCallback + , psdAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsDelete@ which the +-- 'ProjectsSubscriptionsDelete' request conforms to. +type ProjectsSubscriptionsDeleteAPI = + "v1beta2" :> + "{+subscription}" :> Delete '[JSON] Empty + +-- | Deletes an existing subscription. All pending messages in the +-- subscription are immediately dropped. Calls to Pull after deletion will +-- return NOT_FOUND. After a subscription is deleted, a new one may be +-- created with the same name, but the new one has no association with the +-- old subscription, or its topic unless the same topic is specified. +-- +-- /See:/ 'projectsSubscriptionsDelete' smart constructor. +data ProjectsSubscriptionsDelete = ProjectsSubscriptionsDelete + { _psdXgafv :: !(Maybe Text) + , _psdQuotaUser :: !(Maybe Text) + , _psdPrettyPrint :: !Bool + , _psdUploadProtocol :: !(Maybe Text) + , _psdPp :: !Bool + , _psdAccessToken :: !(Maybe Text) + , _psdUploadType :: !(Maybe Text) + , _psdBearerToken :: !(Maybe Text) + , _psdKey :: !(Maybe Text) + , _psdOauthToken :: !(Maybe Text) + , _psdSubscription :: !Text + , _psdFields :: !(Maybe Text) + , _psdCallback :: !(Maybe Text) + , _psdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psdXgafv' +-- +-- * 'psdQuotaUser' +-- +-- * 'psdPrettyPrint' +-- +-- * 'psdUploadProtocol' +-- +-- * 'psdPp' +-- +-- * 'psdAccessToken' +-- +-- * 'psdUploadType' +-- +-- * 'psdBearerToken' +-- +-- * 'psdKey' +-- +-- * 'psdOauthToken' +-- +-- * 'psdSubscription' +-- +-- * 'psdFields' +-- +-- * 'psdCallback' +-- +-- * 'psdAlt' +projectsSubscriptionsDelete + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsDelete +projectsSubscriptionsDelete pPsdSubscription_ = + ProjectsSubscriptionsDelete + { _psdXgafv = Nothing + , _psdQuotaUser = Nothing + , _psdPrettyPrint = True + , _psdUploadProtocol = Nothing + , _psdPp = True + , _psdAccessToken = Nothing + , _psdUploadType = Nothing + , _psdBearerToken = Nothing + , _psdKey = Nothing + , _psdOauthToken = Nothing + , _psdSubscription = pPsdSubscription_ + , _psdFields = Nothing + , _psdCallback = Nothing + , _psdAlt = "json" + } + +-- | V1 error format. +psdXgafv :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdXgafv = lens _psdXgafv (\ s a -> s{_psdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psdQuotaUser :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdQuotaUser + = lens _psdQuotaUser (\ s a -> s{_psdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psdPrettyPrint :: Lens' ProjectsSubscriptionsDelete' Bool +psdPrettyPrint + = lens _psdPrettyPrint + (\ s a -> s{_psdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psdUploadProtocol :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdUploadProtocol + = lens _psdUploadProtocol + (\ s a -> s{_psdUploadProtocol = a}) + +-- | Pretty-print response. +psdPp :: Lens' ProjectsSubscriptionsDelete' Bool +psdPp = lens _psdPp (\ s a -> s{_psdPp = a}) + +-- | OAuth access token. +psdAccessToken :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdAccessToken + = lens _psdAccessToken + (\ s a -> s{_psdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psdUploadType :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdUploadType + = lens _psdUploadType + (\ s a -> s{_psdUploadType = a}) + +-- | OAuth bearer token. +psdBearerToken :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdBearerToken + = lens _psdBearerToken + (\ s a -> s{_psdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psdKey :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdKey = lens _psdKey (\ s a -> s{_psdKey = a}) + +-- | OAuth 2.0 token for the current user. +psdOauthToken :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdOauthToken + = lens _psdOauthToken + (\ s a -> s{_psdOauthToken = a}) + +-- | The subscription to delete. +psdSubscription :: Lens' ProjectsSubscriptionsDelete' Text +psdSubscription + = lens _psdSubscription + (\ s a -> s{_psdSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +psdFields :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdFields + = lens _psdFields (\ s a -> s{_psdFields = a}) + +-- | JSONP +psdCallback :: Lens' ProjectsSubscriptionsDelete' (Maybe Text) +psdCallback + = lens _psdCallback (\ s a -> s{_psdCallback = a}) + +-- | Data format for response. +psdAlt :: Lens' ProjectsSubscriptionsDelete' Text +psdAlt = lens _psdAlt (\ s a -> s{_psdAlt = a}) + +instance GoogleRequest ProjectsSubscriptionsDelete' + where + type Rs ProjectsSubscriptionsDelete' = Empty + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsSubscriptionsDelete{..} + = go _psdXgafv _psdQuotaUser _psdPrettyPrint + _psdUploadProtocol + _psdPp + _psdAccessToken + _psdUploadType + _psdBearerToken + _psdKey + _psdOauthToken + _psdSubscription + _psdFields + _psdCallback + _psdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsDeleteAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Get.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Get.hs new file mode 100644 index 000000000..053e50574 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Get.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the configuration details of a subscription. +-- +-- /See:/ for @PubsubProjectsSubscriptionsGet@. +module PubSub.Projects.Subscriptions.Get + ( + -- * REST Resource + ProjectsSubscriptionsGetAPI + + -- * Creating a Request + , projectsSubscriptionsGet + , ProjectsSubscriptionsGet + + -- * Request Lenses + , psgXgafv + , psgQuotaUser + , psgPrettyPrint + , psgUploadProtocol + , psgPp + , psgAccessToken + , psgUploadType + , psgBearerToken + , psgKey + , psgOauthToken + , psgSubscription + , psgFields + , psgCallback + , psgAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsGet@ which the +-- 'ProjectsSubscriptionsGet' request conforms to. +type ProjectsSubscriptionsGetAPI = + "v1beta2" :> + "{+subscription}" :> Get '[JSON] Subscription + +-- | Gets the configuration details of a subscription. +-- +-- /See:/ 'projectsSubscriptionsGet' smart constructor. +data ProjectsSubscriptionsGet = ProjectsSubscriptionsGet + { _psgXgafv :: !(Maybe Text) + , _psgQuotaUser :: !(Maybe Text) + , _psgPrettyPrint :: !Bool + , _psgUploadProtocol :: !(Maybe Text) + , _psgPp :: !Bool + , _psgAccessToken :: !(Maybe Text) + , _psgUploadType :: !(Maybe Text) + , _psgBearerToken :: !(Maybe Text) + , _psgKey :: !(Maybe Text) + , _psgOauthToken :: !(Maybe Text) + , _psgSubscription :: !Text + , _psgFields :: !(Maybe Text) + , _psgCallback :: !(Maybe Text) + , _psgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgXgafv' +-- +-- * 'psgQuotaUser' +-- +-- * 'psgPrettyPrint' +-- +-- * 'psgUploadProtocol' +-- +-- * 'psgPp' +-- +-- * 'psgAccessToken' +-- +-- * 'psgUploadType' +-- +-- * 'psgBearerToken' +-- +-- * 'psgKey' +-- +-- * 'psgOauthToken' +-- +-- * 'psgSubscription' +-- +-- * 'psgFields' +-- +-- * 'psgCallback' +-- +-- * 'psgAlt' +projectsSubscriptionsGet + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsGet +projectsSubscriptionsGet pPsgSubscription_ = + ProjectsSubscriptionsGet + { _psgXgafv = Nothing + , _psgQuotaUser = Nothing + , _psgPrettyPrint = True + , _psgUploadProtocol = Nothing + , _psgPp = True + , _psgAccessToken = Nothing + , _psgUploadType = Nothing + , _psgBearerToken = Nothing + , _psgKey = Nothing + , _psgOauthToken = Nothing + , _psgSubscription = pPsgSubscription_ + , _psgFields = Nothing + , _psgCallback = Nothing + , _psgAlt = "json" + } + +-- | V1 error format. +psgXgafv :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgXgafv = lens _psgXgafv (\ s a -> s{_psgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psgQuotaUser :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgQuotaUser + = lens _psgQuotaUser (\ s a -> s{_psgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psgPrettyPrint :: Lens' ProjectsSubscriptionsGet' Bool +psgPrettyPrint + = lens _psgPrettyPrint + (\ s a -> s{_psgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psgUploadProtocol :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgUploadProtocol + = lens _psgUploadProtocol + (\ s a -> s{_psgUploadProtocol = a}) + +-- | Pretty-print response. +psgPp :: Lens' ProjectsSubscriptionsGet' Bool +psgPp = lens _psgPp (\ s a -> s{_psgPp = a}) + +-- | OAuth access token. +psgAccessToken :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgAccessToken + = lens _psgAccessToken + (\ s a -> s{_psgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psgUploadType :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgUploadType + = lens _psgUploadType + (\ s a -> s{_psgUploadType = a}) + +-- | OAuth bearer token. +psgBearerToken :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgBearerToken + = lens _psgBearerToken + (\ s a -> s{_psgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psgKey :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgKey = lens _psgKey (\ s a -> s{_psgKey = a}) + +-- | OAuth 2.0 token for the current user. +psgOauthToken :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgOauthToken + = lens _psgOauthToken + (\ s a -> s{_psgOauthToken = a}) + +-- | The name of the subscription to get. +psgSubscription :: Lens' ProjectsSubscriptionsGet' Text +psgSubscription + = lens _psgSubscription + (\ s a -> s{_psgSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +psgFields :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgFields + = lens _psgFields (\ s a -> s{_psgFields = a}) + +-- | JSONP +psgCallback :: Lens' ProjectsSubscriptionsGet' (Maybe Text) +psgCallback + = lens _psgCallback (\ s a -> s{_psgCallback = a}) + +-- | Data format for response. +psgAlt :: Lens' ProjectsSubscriptionsGet' Text +psgAlt = lens _psgAlt (\ s a -> s{_psgAlt = a}) + +instance GoogleRequest ProjectsSubscriptionsGet' + where + type Rs ProjectsSubscriptionsGet' = Subscription + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsSubscriptionsGet{..} + = go _psgXgafv _psgQuotaUser _psgPrettyPrint + _psgUploadProtocol + _psgPp + _psgAccessToken + _psgUploadType + _psgBearerToken + _psgKey + _psgOauthToken + _psgSubscription + _psgFields + _psgCallback + _psgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsGetAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/GetIAMPolicy.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/GetIAMPolicy.hs new file mode 100644 index 000000000..e82b61df0 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/GetIAMPolicy.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.GetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the access control policy for a resource. Is empty if the policy or +-- the resource does not exist. +-- +-- /See:/ for @PubsubProjectsSubscriptionsGetIAMPolicy@. +module PubSub.Projects.Subscriptions.GetIAMPolicy + ( + -- * REST Resource + ProjectsSubscriptionsGetIAMPolicyAPI + + -- * Creating a Request + , projectsSubscriptionsGetIAMPolicy + , ProjectsSubscriptionsGetIAMPolicy + + -- * Request Lenses + , psgipXgafv + , psgipQuotaUser + , psgipPrettyPrint + , psgipUploadProtocol + , psgipPp + , psgipAccessToken + , psgipUploadType + , psgipBearerToken + , psgipKey + , psgipResource + , psgipOauthToken + , psgipFields + , psgipCallback + , psgipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsGetIAMPolicy@ which the +-- 'ProjectsSubscriptionsGetIAMPolicy' request conforms to. +type ProjectsSubscriptionsGetIAMPolicyAPI = + "v1beta2" :> + "{+resource}:getIamPolicy" :> Get '[JSON] Policy + +-- | Gets the access control policy for a resource. Is empty if the policy or +-- the resource does not exist. +-- +-- /See:/ 'projectsSubscriptionsGetIAMPolicy' smart constructor. +data ProjectsSubscriptionsGetIAMPolicy = ProjectsSubscriptionsGetIAMPolicy + { _psgipXgafv :: !(Maybe Text) + , _psgipQuotaUser :: !(Maybe Text) + , _psgipPrettyPrint :: !Bool + , _psgipUploadProtocol :: !(Maybe Text) + , _psgipPp :: !Bool + , _psgipAccessToken :: !(Maybe Text) + , _psgipUploadType :: !(Maybe Text) + , _psgipBearerToken :: !(Maybe Text) + , _psgipKey :: !(Maybe Text) + , _psgipResource :: !Text + , _psgipOauthToken :: !(Maybe Text) + , _psgipFields :: !(Maybe Text) + , _psgipCallback :: !(Maybe Text) + , _psgipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsGetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgipXgafv' +-- +-- * 'psgipQuotaUser' +-- +-- * 'psgipPrettyPrint' +-- +-- * 'psgipUploadProtocol' +-- +-- * 'psgipPp' +-- +-- * 'psgipAccessToken' +-- +-- * 'psgipUploadType' +-- +-- * 'psgipBearerToken' +-- +-- * 'psgipKey' +-- +-- * 'psgipResource' +-- +-- * 'psgipOauthToken' +-- +-- * 'psgipFields' +-- +-- * 'psgipCallback' +-- +-- * 'psgipAlt' +projectsSubscriptionsGetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsSubscriptionsGetIAMPolicy +projectsSubscriptionsGetIAMPolicy pPsgipResource_ = + ProjectsSubscriptionsGetIAMPolicy + { _psgipXgafv = Nothing + , _psgipQuotaUser = Nothing + , _psgipPrettyPrint = True + , _psgipUploadProtocol = Nothing + , _psgipPp = True + , _psgipAccessToken = Nothing + , _psgipUploadType = Nothing + , _psgipBearerToken = Nothing + , _psgipKey = Nothing + , _psgipResource = pPsgipResource_ + , _psgipOauthToken = Nothing + , _psgipFields = Nothing + , _psgipCallback = Nothing + , _psgipAlt = "json" + } + +-- | V1 error format. +psgipXgafv :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipXgafv + = lens _psgipXgafv (\ s a -> s{_psgipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psgipQuotaUser :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipQuotaUser + = lens _psgipQuotaUser + (\ s a -> s{_psgipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psgipPrettyPrint :: Lens' ProjectsSubscriptionsGetIAMPolicy' Bool +psgipPrettyPrint + = lens _psgipPrettyPrint + (\ s a -> s{_psgipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psgipUploadProtocol :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipUploadProtocol + = lens _psgipUploadProtocol + (\ s a -> s{_psgipUploadProtocol = a}) + +-- | Pretty-print response. +psgipPp :: Lens' ProjectsSubscriptionsGetIAMPolicy' Bool +psgipPp = lens _psgipPp (\ s a -> s{_psgipPp = a}) + +-- | OAuth access token. +psgipAccessToken :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipAccessToken + = lens _psgipAccessToken + (\ s a -> s{_psgipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psgipUploadType :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipUploadType + = lens _psgipUploadType + (\ s a -> s{_psgipUploadType = a}) + +-- | OAuth bearer token. +psgipBearerToken :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipBearerToken + = lens _psgipBearerToken + (\ s a -> s{_psgipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psgipKey :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipKey = lens _psgipKey (\ s a -> s{_psgipKey = a}) + +-- | REQUIRED: The resource for which policy is being requested. Resource is +-- usually specified as a path, such as, projects\/{project}. +psgipResource :: Lens' ProjectsSubscriptionsGetIAMPolicy' Text +psgipResource + = lens _psgipResource + (\ s a -> s{_psgipResource = a}) + +-- | OAuth 2.0 token for the current user. +psgipOauthToken :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipOauthToken + = lens _psgipOauthToken + (\ s a -> s{_psgipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psgipFields :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipFields + = lens _psgipFields (\ s a -> s{_psgipFields = a}) + +-- | JSONP +psgipCallback :: Lens' ProjectsSubscriptionsGetIAMPolicy' (Maybe Text) +psgipCallback + = lens _psgipCallback + (\ s a -> s{_psgipCallback = a}) + +-- | Data format for response. +psgipAlt :: Lens' ProjectsSubscriptionsGetIAMPolicy' Text +psgipAlt = lens _psgipAlt (\ s a -> s{_psgipAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsGetIAMPolicy' where + type Rs ProjectsSubscriptionsGetIAMPolicy' = Policy + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsGetIAMPolicy{..} + = go _psgipXgafv _psgipQuotaUser _psgipPrettyPrint + _psgipUploadProtocol + _psgipPp + _psgipAccessToken + _psgipUploadType + _psgipBearerToken + _psgipKey + _psgipResource + _psgipOauthToken + _psgipFields + _psgipCallback + _psgipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsGetIAMPolicyAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/List.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/List.hs new file mode 100644 index 000000000..e9f831b1f --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/List.hs @@ -0,0 +1,255 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists matching subscriptions. +-- +-- /See:/ for @PubsubProjectsSubscriptionsList@. +module PubSub.Projects.Subscriptions.List + ( + -- * REST Resource + ProjectsSubscriptionsListAPI + + -- * Creating a Request + , projectsSubscriptionsList + , ProjectsSubscriptionsList + + -- * Request Lenses + , pslXgafv + , pslQuotaUser + , pslPrettyPrint + , pslUploadProtocol + , pslProject + , pslPp + , pslAccessToken + , pslUploadType + , pslBearerToken + , pslKey + , pslPageToken + , pslOauthToken + , pslPageSize + , pslFields + , pslCallback + , pslAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsList@ which the +-- 'ProjectsSubscriptionsList' request conforms to. +type ProjectsSubscriptionsListAPI = + "v1beta2" :> + "{+project}" :> + "subscriptions" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListSubscriptionsResponse + +-- | Lists matching subscriptions. +-- +-- /See:/ 'projectsSubscriptionsList' smart constructor. +data ProjectsSubscriptionsList = ProjectsSubscriptionsList + { _pslXgafv :: !(Maybe Text) + , _pslQuotaUser :: !(Maybe Text) + , _pslPrettyPrint :: !Bool + , _pslUploadProtocol :: !(Maybe Text) + , _pslProject :: !Text + , _pslPp :: !Bool + , _pslAccessToken :: !(Maybe Text) + , _pslUploadType :: !(Maybe Text) + , _pslBearerToken :: !(Maybe Text) + , _pslKey :: !(Maybe Text) + , _pslPageToken :: !(Maybe Text) + , _pslOauthToken :: !(Maybe Text) + , _pslPageSize :: !(Maybe Int32) + , _pslFields :: !(Maybe Text) + , _pslCallback :: !(Maybe Text) + , _pslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslXgafv' +-- +-- * 'pslQuotaUser' +-- +-- * 'pslPrettyPrint' +-- +-- * 'pslUploadProtocol' +-- +-- * 'pslProject' +-- +-- * 'pslPp' +-- +-- * 'pslAccessToken' +-- +-- * 'pslUploadType' +-- +-- * 'pslBearerToken' +-- +-- * 'pslKey' +-- +-- * 'pslPageToken' +-- +-- * 'pslOauthToken' +-- +-- * 'pslPageSize' +-- +-- * 'pslFields' +-- +-- * 'pslCallback' +-- +-- * 'pslAlt' +projectsSubscriptionsList + :: Text -- ^ 'project' + -> ProjectsSubscriptionsList +projectsSubscriptionsList pPslProject_ = + ProjectsSubscriptionsList + { _pslXgafv = Nothing + , _pslQuotaUser = Nothing + , _pslPrettyPrint = True + , _pslUploadProtocol = Nothing + , _pslProject = pPslProject_ + , _pslPp = True + , _pslAccessToken = Nothing + , _pslUploadType = Nothing + , _pslBearerToken = Nothing + , _pslKey = Nothing + , _pslPageToken = Nothing + , _pslOauthToken = Nothing + , _pslPageSize = Nothing + , _pslFields = Nothing + , _pslCallback = Nothing + , _pslAlt = "json" + } + +-- | V1 error format. +pslXgafv :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pslQuotaUser :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslQuotaUser + = lens _pslQuotaUser (\ s a -> s{_pslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pslPrettyPrint :: Lens' ProjectsSubscriptionsList' Bool +pslPrettyPrint + = lens _pslPrettyPrint + (\ s a -> s{_pslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pslUploadProtocol :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslUploadProtocol + = lens _pslUploadProtocol + (\ s a -> s{_pslUploadProtocol = a}) + +-- | The name of the cloud project that subscriptions belong to. +pslProject :: Lens' ProjectsSubscriptionsList' Text +pslProject + = lens _pslProject (\ s a -> s{_pslProject = a}) + +-- | Pretty-print response. +pslPp :: Lens' ProjectsSubscriptionsList' Bool +pslPp = lens _pslPp (\ s a -> s{_pslPp = a}) + +-- | OAuth access token. +pslAccessToken :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslAccessToken + = lens _pslAccessToken + (\ s a -> s{_pslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pslUploadType :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslUploadType + = lens _pslUploadType + (\ s a -> s{_pslUploadType = a}) + +-- | OAuth bearer token. +pslBearerToken :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslBearerToken + = lens _pslBearerToken + (\ s a -> s{_pslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pslKey :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslKey = lens _pslKey (\ s a -> s{_pslKey = a}) + +-- | The value returned by the last ListSubscriptionsResponse; indicates that +-- this is a continuation of a prior ListSubscriptions call, and that the +-- system should return the next page of data. +pslPageToken :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslPageToken + = lens _pslPageToken (\ s a -> s{_pslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +pslOauthToken :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslOauthToken + = lens _pslOauthToken + (\ s a -> s{_pslOauthToken = a}) + +-- | Maximum number of subscriptions to return. +pslPageSize :: Lens' ProjectsSubscriptionsList' (Maybe Int32) +pslPageSize + = lens _pslPageSize (\ s a -> s{_pslPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +pslFields :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslFields + = lens _pslFields (\ s a -> s{_pslFields = a}) + +-- | JSONP +pslCallback :: Lens' ProjectsSubscriptionsList' (Maybe Text) +pslCallback + = lens _pslCallback (\ s a -> s{_pslCallback = a}) + +-- | Data format for response. +pslAlt :: Lens' ProjectsSubscriptionsList' Text +pslAlt = lens _pslAlt (\ s a -> s{_pslAlt = a}) + +instance GoogleRequest ProjectsSubscriptionsList' + where + type Rs ProjectsSubscriptionsList' = + ListSubscriptionsResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsSubscriptionsList{..} + = go _pslXgafv _pslQuotaUser _pslPrettyPrint + _pslUploadProtocol + _pslProject + _pslPp + _pslAccessToken + _pslUploadType + _pslBearerToken + _pslKey + _pslPageToken + _pslOauthToken + _pslPageSize + _pslFields + _pslCallback + _pslAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsListAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyAckDeadline.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyAckDeadline.hs new file mode 100644 index 000000000..0557e52f3 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyAckDeadline.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyAckDeadline +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the ack deadline for a specific message. This method is useful +-- to indicate that more time is needed to process a message by the +-- subscriber, or to make the message available for redelivery if the +-- processing was interrupted. +-- +-- /See:/ for @PubsubProjectsSubscriptionsModifyAckDeadline@. +module PubSub.Projects.Subscriptions.ModifyAckDeadline + ( + -- * REST Resource + ProjectsSubscriptionsModifyAckDeadlineAPI + + -- * Creating a Request + , projectsSubscriptionsModifyAckDeadline + , ProjectsSubscriptionsModifyAckDeadline + + -- * Request Lenses + , psmadXgafv + , psmadQuotaUser + , psmadPrettyPrint + , psmadUploadProtocol + , psmadPp + , psmadAccessToken + , psmadUploadType + , psmadBearerToken + , psmadKey + , psmadOauthToken + , psmadSubscription + , psmadFields + , psmadCallback + , psmadAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsModifyAckDeadline@ which the +-- 'ProjectsSubscriptionsModifyAckDeadline' request conforms to. +type ProjectsSubscriptionsModifyAckDeadlineAPI = + "v1beta2" :> + "{+subscription}:modifyAckDeadline" :> + Post '[JSON] Empty + +-- | Modifies the ack deadline for a specific message. This method is useful +-- to indicate that more time is needed to process a message by the +-- subscriber, or to make the message available for redelivery if the +-- processing was interrupted. +-- +-- /See:/ 'projectsSubscriptionsModifyAckDeadline' smart constructor. +data ProjectsSubscriptionsModifyAckDeadline = ProjectsSubscriptionsModifyAckDeadline + { _psmadXgafv :: !(Maybe Text) + , _psmadQuotaUser :: !(Maybe Text) + , _psmadPrettyPrint :: !Bool + , _psmadUploadProtocol :: !(Maybe Text) + , _psmadPp :: !Bool + , _psmadAccessToken :: !(Maybe Text) + , _psmadUploadType :: !(Maybe Text) + , _psmadBearerToken :: !(Maybe Text) + , _psmadKey :: !(Maybe Text) + , _psmadOauthToken :: !(Maybe Text) + , _psmadSubscription :: !Text + , _psmadFields :: !(Maybe Text) + , _psmadCallback :: !(Maybe Text) + , _psmadAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsModifyAckDeadline'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psmadXgafv' +-- +-- * 'psmadQuotaUser' +-- +-- * 'psmadPrettyPrint' +-- +-- * 'psmadUploadProtocol' +-- +-- * 'psmadPp' +-- +-- * 'psmadAccessToken' +-- +-- * 'psmadUploadType' +-- +-- * 'psmadBearerToken' +-- +-- * 'psmadKey' +-- +-- * 'psmadOauthToken' +-- +-- * 'psmadSubscription' +-- +-- * 'psmadFields' +-- +-- * 'psmadCallback' +-- +-- * 'psmadAlt' +projectsSubscriptionsModifyAckDeadline + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsModifyAckDeadline +projectsSubscriptionsModifyAckDeadline pPsmadSubscription_ = + ProjectsSubscriptionsModifyAckDeadline + { _psmadXgafv = Nothing + , _psmadQuotaUser = Nothing + , _psmadPrettyPrint = True + , _psmadUploadProtocol = Nothing + , _psmadPp = True + , _psmadAccessToken = Nothing + , _psmadUploadType = Nothing + , _psmadBearerToken = Nothing + , _psmadKey = Nothing + , _psmadOauthToken = Nothing + , _psmadSubscription = pPsmadSubscription_ + , _psmadFields = Nothing + , _psmadCallback = Nothing + , _psmadAlt = "json" + } + +-- | V1 error format. +psmadXgafv :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadXgafv + = lens _psmadXgafv (\ s a -> s{_psmadXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psmadQuotaUser :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadQuotaUser + = lens _psmadQuotaUser + (\ s a -> s{_psmadQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psmadPrettyPrint :: Lens' ProjectsSubscriptionsModifyAckDeadline' Bool +psmadPrettyPrint + = lens _psmadPrettyPrint + (\ s a -> s{_psmadPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psmadUploadProtocol :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadUploadProtocol + = lens _psmadUploadProtocol + (\ s a -> s{_psmadUploadProtocol = a}) + +-- | Pretty-print response. +psmadPp :: Lens' ProjectsSubscriptionsModifyAckDeadline' Bool +psmadPp = lens _psmadPp (\ s a -> s{_psmadPp = a}) + +-- | OAuth access token. +psmadAccessToken :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadAccessToken + = lens _psmadAccessToken + (\ s a -> s{_psmadAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psmadUploadType :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadUploadType + = lens _psmadUploadType + (\ s a -> s{_psmadUploadType = a}) + +-- | OAuth bearer token. +psmadBearerToken :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadBearerToken + = lens _psmadBearerToken + (\ s a -> s{_psmadBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psmadKey :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadKey = lens _psmadKey (\ s a -> s{_psmadKey = a}) + +-- | OAuth 2.0 token for the current user. +psmadOauthToken :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadOauthToken + = lens _psmadOauthToken + (\ s a -> s{_psmadOauthToken = a}) + +-- | The name of the subscription. +psmadSubscription :: Lens' ProjectsSubscriptionsModifyAckDeadline' Text +psmadSubscription + = lens _psmadSubscription + (\ s a -> s{_psmadSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +psmadFields :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadFields + = lens _psmadFields (\ s a -> s{_psmadFields = a}) + +-- | JSONP +psmadCallback :: Lens' ProjectsSubscriptionsModifyAckDeadline' (Maybe Text) +psmadCallback + = lens _psmadCallback + (\ s a -> s{_psmadCallback = a}) + +-- | Data format for response. +psmadAlt :: Lens' ProjectsSubscriptionsModifyAckDeadline' Text +psmadAlt = lens _psmadAlt (\ s a -> s{_psmadAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsModifyAckDeadline' where + type Rs ProjectsSubscriptionsModifyAckDeadline' = + Empty + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsModifyAckDeadline{..} + = go _psmadXgafv _psmadQuotaUser _psmadPrettyPrint + _psmadUploadProtocol + _psmadPp + _psmadAccessToken + _psmadUploadType + _psmadBearerToken + _psmadKey + _psmadOauthToken + _psmadSubscription + _psmadFields + _psmadCallback + _psmadAlt + where go + = clientWithRoute + (Proxy :: + Proxy ProjectsSubscriptionsModifyAckDeadlineAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyPushConfig.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyPushConfig.hs new file mode 100644 index 000000000..85e7a9f01 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/ModifyPushConfig.hs @@ -0,0 +1,242 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyPushConfig +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the PushConfig for a specified subscription. This may be used +-- to change a push subscription to a pull one (signified by an empty +-- PushConfig) or vice versa, or change the endpoint URL and other +-- attributes of a push subscription. Messages will accumulate for delivery +-- continuously through the call regardless of changes to the PushConfig. +-- +-- /See:/ for @PubsubProjectsSubscriptionsModifyPushConfig@. +module PubSub.Projects.Subscriptions.ModifyPushConfig + ( + -- * REST Resource + ProjectsSubscriptionsModifyPushConfigAPI + + -- * Creating a Request + , projectsSubscriptionsModifyPushConfig + , ProjectsSubscriptionsModifyPushConfig + + -- * Request Lenses + , psmpcXgafv + , psmpcQuotaUser + , psmpcPrettyPrint + , psmpcUploadProtocol + , psmpcPp + , psmpcAccessToken + , psmpcUploadType + , psmpcBearerToken + , psmpcKey + , psmpcOauthToken + , psmpcSubscription + , psmpcFields + , psmpcCallback + , psmpcAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsModifyPushConfig@ which the +-- 'ProjectsSubscriptionsModifyPushConfig' request conforms to. +type ProjectsSubscriptionsModifyPushConfigAPI = + "v1beta2" :> + "{+subscription}:modifyPushConfig" :> + Post '[JSON] Empty + +-- | Modifies the PushConfig for a specified subscription. This may be used +-- to change a push subscription to a pull one (signified by an empty +-- PushConfig) or vice versa, or change the endpoint URL and other +-- attributes of a push subscription. Messages will accumulate for delivery +-- continuously through the call regardless of changes to the PushConfig. +-- +-- /See:/ 'projectsSubscriptionsModifyPushConfig' smart constructor. +data ProjectsSubscriptionsModifyPushConfig = ProjectsSubscriptionsModifyPushConfig + { _psmpcXgafv :: !(Maybe Text) + , _psmpcQuotaUser :: !(Maybe Text) + , _psmpcPrettyPrint :: !Bool + , _psmpcUploadProtocol :: !(Maybe Text) + , _psmpcPp :: !Bool + , _psmpcAccessToken :: !(Maybe Text) + , _psmpcUploadType :: !(Maybe Text) + , _psmpcBearerToken :: !(Maybe Text) + , _psmpcKey :: !(Maybe Text) + , _psmpcOauthToken :: !(Maybe Text) + , _psmpcSubscription :: !Text + , _psmpcFields :: !(Maybe Text) + , _psmpcCallback :: !(Maybe Text) + , _psmpcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsModifyPushConfig'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psmpcXgafv' +-- +-- * 'psmpcQuotaUser' +-- +-- * 'psmpcPrettyPrint' +-- +-- * 'psmpcUploadProtocol' +-- +-- * 'psmpcPp' +-- +-- * 'psmpcAccessToken' +-- +-- * 'psmpcUploadType' +-- +-- * 'psmpcBearerToken' +-- +-- * 'psmpcKey' +-- +-- * 'psmpcOauthToken' +-- +-- * 'psmpcSubscription' +-- +-- * 'psmpcFields' +-- +-- * 'psmpcCallback' +-- +-- * 'psmpcAlt' +projectsSubscriptionsModifyPushConfig + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsModifyPushConfig +projectsSubscriptionsModifyPushConfig pPsmpcSubscription_ = + ProjectsSubscriptionsModifyPushConfig + { _psmpcXgafv = Nothing + , _psmpcQuotaUser = Nothing + , _psmpcPrettyPrint = True + , _psmpcUploadProtocol = Nothing + , _psmpcPp = True + , _psmpcAccessToken = Nothing + , _psmpcUploadType = Nothing + , _psmpcBearerToken = Nothing + , _psmpcKey = Nothing + , _psmpcOauthToken = Nothing + , _psmpcSubscription = pPsmpcSubscription_ + , _psmpcFields = Nothing + , _psmpcCallback = Nothing + , _psmpcAlt = "json" + } + +-- | V1 error format. +psmpcXgafv :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcXgafv + = lens _psmpcXgafv (\ s a -> s{_psmpcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psmpcQuotaUser :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcQuotaUser + = lens _psmpcQuotaUser + (\ s a -> s{_psmpcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psmpcPrettyPrint :: Lens' ProjectsSubscriptionsModifyPushConfig' Bool +psmpcPrettyPrint + = lens _psmpcPrettyPrint + (\ s a -> s{_psmpcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psmpcUploadProtocol :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcUploadProtocol + = lens _psmpcUploadProtocol + (\ s a -> s{_psmpcUploadProtocol = a}) + +-- | Pretty-print response. +psmpcPp :: Lens' ProjectsSubscriptionsModifyPushConfig' Bool +psmpcPp = lens _psmpcPp (\ s a -> s{_psmpcPp = a}) + +-- | OAuth access token. +psmpcAccessToken :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcAccessToken + = lens _psmpcAccessToken + (\ s a -> s{_psmpcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psmpcUploadType :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcUploadType + = lens _psmpcUploadType + (\ s a -> s{_psmpcUploadType = a}) + +-- | OAuth bearer token. +psmpcBearerToken :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcBearerToken + = lens _psmpcBearerToken + (\ s a -> s{_psmpcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psmpcKey :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcKey = lens _psmpcKey (\ s a -> s{_psmpcKey = a}) + +-- | OAuth 2.0 token for the current user. +psmpcOauthToken :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcOauthToken + = lens _psmpcOauthToken + (\ s a -> s{_psmpcOauthToken = a}) + +-- | The name of the subscription. +psmpcSubscription :: Lens' ProjectsSubscriptionsModifyPushConfig' Text +psmpcSubscription + = lens _psmpcSubscription + (\ s a -> s{_psmpcSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +psmpcFields :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcFields + = lens _psmpcFields (\ s a -> s{_psmpcFields = a}) + +-- | JSONP +psmpcCallback :: Lens' ProjectsSubscriptionsModifyPushConfig' (Maybe Text) +psmpcCallback + = lens _psmpcCallback + (\ s a -> s{_psmpcCallback = a}) + +-- | Data format for response. +psmpcAlt :: Lens' ProjectsSubscriptionsModifyPushConfig' Text +psmpcAlt = lens _psmpcAlt (\ s a -> s{_psmpcAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsModifyPushConfig' where + type Rs ProjectsSubscriptionsModifyPushConfig' = + Empty + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsModifyPushConfig{..} + = go _psmpcXgafv _psmpcQuotaUser _psmpcPrettyPrint + _psmpcUploadProtocol + _psmpcPp + _psmpcAccessToken + _psmpcUploadType + _psmpcBearerToken + _psmpcKey + _psmpcOauthToken + _psmpcSubscription + _psmpcFields + _psmpcCallback + _psmpcAlt + where go + = clientWithRoute + (Proxy :: + Proxy ProjectsSubscriptionsModifyPushConfigAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Pull.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Pull.hs new file mode 100644 index 000000000..335741991 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Pull.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.Pull +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Pulls messages from the server. Returns an empty list if there are no +-- messages available in the backlog. The server may return UNAVAILABLE if +-- there are too many concurrent pull requests pending for the given +-- subscription. +-- +-- /See:/ for @PubsubProjectsSubscriptionsPull@. +module PubSub.Projects.Subscriptions.Pull + ( + -- * REST Resource + ProjectsSubscriptionsPullAPI + + -- * Creating a Request + , projectsSubscriptionsPull + , ProjectsSubscriptionsPull + + -- * Request Lenses + , pspXgafv + , pspQuotaUser + , pspPrettyPrint + , pspUploadProtocol + , pspPp + , pspAccessToken + , pspUploadType + , pspBearerToken + , pspKey + , pspOauthToken + , pspSubscription + , pspFields + , pspCallback + , pspAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsPull@ which the +-- 'ProjectsSubscriptionsPull' request conforms to. +type ProjectsSubscriptionsPullAPI = + "v1beta2" :> + "{+subscription}:pull" :> Post '[JSON] PullResponse + +-- | Pulls messages from the server. Returns an empty list if there are no +-- messages available in the backlog. The server may return UNAVAILABLE if +-- there are too many concurrent pull requests pending for the given +-- subscription. +-- +-- /See:/ 'projectsSubscriptionsPull' smart constructor. +data ProjectsSubscriptionsPull = ProjectsSubscriptionsPull + { _pspXgafv :: !(Maybe Text) + , _pspQuotaUser :: !(Maybe Text) + , _pspPrettyPrint :: !Bool + , _pspUploadProtocol :: !(Maybe Text) + , _pspPp :: !Bool + , _pspAccessToken :: !(Maybe Text) + , _pspUploadType :: !(Maybe Text) + , _pspBearerToken :: !(Maybe Text) + , _pspKey :: !(Maybe Text) + , _pspOauthToken :: !(Maybe Text) + , _pspSubscription :: !Text + , _pspFields :: !(Maybe Text) + , _pspCallback :: !(Maybe Text) + , _pspAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsPull'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pspXgafv' +-- +-- * 'pspQuotaUser' +-- +-- * 'pspPrettyPrint' +-- +-- * 'pspUploadProtocol' +-- +-- * 'pspPp' +-- +-- * 'pspAccessToken' +-- +-- * 'pspUploadType' +-- +-- * 'pspBearerToken' +-- +-- * 'pspKey' +-- +-- * 'pspOauthToken' +-- +-- * 'pspSubscription' +-- +-- * 'pspFields' +-- +-- * 'pspCallback' +-- +-- * 'pspAlt' +projectsSubscriptionsPull + :: Text -- ^ 'subscription' + -> ProjectsSubscriptionsPull +projectsSubscriptionsPull pPspSubscription_ = + ProjectsSubscriptionsPull + { _pspXgafv = Nothing + , _pspQuotaUser = Nothing + , _pspPrettyPrint = True + , _pspUploadProtocol = Nothing + , _pspPp = True + , _pspAccessToken = Nothing + , _pspUploadType = Nothing + , _pspBearerToken = Nothing + , _pspKey = Nothing + , _pspOauthToken = Nothing + , _pspSubscription = pPspSubscription_ + , _pspFields = Nothing + , _pspCallback = Nothing + , _pspAlt = "json" + } + +-- | V1 error format. +pspXgafv :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspXgafv = lens _pspXgafv (\ s a -> s{_pspXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pspQuotaUser :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspQuotaUser + = lens _pspQuotaUser (\ s a -> s{_pspQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pspPrettyPrint :: Lens' ProjectsSubscriptionsPull' Bool +pspPrettyPrint + = lens _pspPrettyPrint + (\ s a -> s{_pspPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pspUploadProtocol :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspUploadProtocol + = lens _pspUploadProtocol + (\ s a -> s{_pspUploadProtocol = a}) + +-- | Pretty-print response. +pspPp :: Lens' ProjectsSubscriptionsPull' Bool +pspPp = lens _pspPp (\ s a -> s{_pspPp = a}) + +-- | OAuth access token. +pspAccessToken :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspAccessToken + = lens _pspAccessToken + (\ s a -> s{_pspAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pspUploadType :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspUploadType + = lens _pspUploadType + (\ s a -> s{_pspUploadType = a}) + +-- | OAuth bearer token. +pspBearerToken :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspBearerToken + = lens _pspBearerToken + (\ s a -> s{_pspBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pspKey :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspKey = lens _pspKey (\ s a -> s{_pspKey = a}) + +-- | OAuth 2.0 token for the current user. +pspOauthToken :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspOauthToken + = lens _pspOauthToken + (\ s a -> s{_pspOauthToken = a}) + +-- | The subscription from which messages should be pulled. +pspSubscription :: Lens' ProjectsSubscriptionsPull' Text +pspSubscription + = lens _pspSubscription + (\ s a -> s{_pspSubscription = a}) + +-- | Selector specifying which fields to include in a partial response. +pspFields :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspFields + = lens _pspFields (\ s a -> s{_pspFields = a}) + +-- | JSONP +pspCallback :: Lens' ProjectsSubscriptionsPull' (Maybe Text) +pspCallback + = lens _pspCallback (\ s a -> s{_pspCallback = a}) + +-- | Data format for response. +pspAlt :: Lens' ProjectsSubscriptionsPull' Text +pspAlt = lens _pspAlt (\ s a -> s{_pspAlt = a}) + +instance GoogleRequest ProjectsSubscriptionsPull' + where + type Rs ProjectsSubscriptionsPull' = PullResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsSubscriptionsPull{..} + = go _pspXgafv _pspQuotaUser _pspPrettyPrint + _pspUploadProtocol + _pspPp + _pspAccessToken + _pspUploadType + _pspBearerToken + _pspKey + _pspOauthToken + _pspSubscription + _pspFields + _pspCallback + _pspAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsPullAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/SetIAMPolicy.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/SetIAMPolicy.hs new file mode 100644 index 000000000..0855e7eb3 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/SetIAMPolicy.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.SetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the access control policy on the specified resource. Replaces any +-- existing policy. +-- +-- /See:/ for @PubsubProjectsSubscriptionsSetIAMPolicy@. +module PubSub.Projects.Subscriptions.SetIAMPolicy + ( + -- * REST Resource + ProjectsSubscriptionsSetIAMPolicyAPI + + -- * Creating a Request + , projectsSubscriptionsSetIAMPolicy + , ProjectsSubscriptionsSetIAMPolicy + + -- * Request Lenses + , pssipXgafv + , pssipQuotaUser + , pssipPrettyPrint + , pssipUploadProtocol + , pssipPp + , pssipAccessToken + , pssipUploadType + , pssipBearerToken + , pssipKey + , pssipResource + , pssipOauthToken + , pssipFields + , pssipCallback + , pssipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsSetIAMPolicy@ which the +-- 'ProjectsSubscriptionsSetIAMPolicy' request conforms to. +type ProjectsSubscriptionsSetIAMPolicyAPI = + "v1beta2" :> + "{+resource}:setIamPolicy" :> Post '[JSON] Policy + +-- | Sets the access control policy on the specified resource. Replaces any +-- existing policy. +-- +-- /See:/ 'projectsSubscriptionsSetIAMPolicy' smart constructor. +data ProjectsSubscriptionsSetIAMPolicy = ProjectsSubscriptionsSetIAMPolicy + { _pssipXgafv :: !(Maybe Text) + , _pssipQuotaUser :: !(Maybe Text) + , _pssipPrettyPrint :: !Bool + , _pssipUploadProtocol :: !(Maybe Text) + , _pssipPp :: !Bool + , _pssipAccessToken :: !(Maybe Text) + , _pssipUploadType :: !(Maybe Text) + , _pssipBearerToken :: !(Maybe Text) + , _pssipKey :: !(Maybe Text) + , _pssipResource :: !Text + , _pssipOauthToken :: !(Maybe Text) + , _pssipFields :: !(Maybe Text) + , _pssipCallback :: !(Maybe Text) + , _pssipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsSetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pssipXgafv' +-- +-- * 'pssipQuotaUser' +-- +-- * 'pssipPrettyPrint' +-- +-- * 'pssipUploadProtocol' +-- +-- * 'pssipPp' +-- +-- * 'pssipAccessToken' +-- +-- * 'pssipUploadType' +-- +-- * 'pssipBearerToken' +-- +-- * 'pssipKey' +-- +-- * 'pssipResource' +-- +-- * 'pssipOauthToken' +-- +-- * 'pssipFields' +-- +-- * 'pssipCallback' +-- +-- * 'pssipAlt' +projectsSubscriptionsSetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsSubscriptionsSetIAMPolicy +projectsSubscriptionsSetIAMPolicy pPssipResource_ = + ProjectsSubscriptionsSetIAMPolicy + { _pssipXgafv = Nothing + , _pssipQuotaUser = Nothing + , _pssipPrettyPrint = True + , _pssipUploadProtocol = Nothing + , _pssipPp = True + , _pssipAccessToken = Nothing + , _pssipUploadType = Nothing + , _pssipBearerToken = Nothing + , _pssipKey = Nothing + , _pssipResource = pPssipResource_ + , _pssipOauthToken = Nothing + , _pssipFields = Nothing + , _pssipCallback = Nothing + , _pssipAlt = "json" + } + +-- | V1 error format. +pssipXgafv :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipXgafv + = lens _pssipXgafv (\ s a -> s{_pssipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pssipQuotaUser :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipQuotaUser + = lens _pssipQuotaUser + (\ s a -> s{_pssipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pssipPrettyPrint :: Lens' ProjectsSubscriptionsSetIAMPolicy' Bool +pssipPrettyPrint + = lens _pssipPrettyPrint + (\ s a -> s{_pssipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pssipUploadProtocol :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipUploadProtocol + = lens _pssipUploadProtocol + (\ s a -> s{_pssipUploadProtocol = a}) + +-- | Pretty-print response. +pssipPp :: Lens' ProjectsSubscriptionsSetIAMPolicy' Bool +pssipPp = lens _pssipPp (\ s a -> s{_pssipPp = a}) + +-- | OAuth access token. +pssipAccessToken :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipAccessToken + = lens _pssipAccessToken + (\ s a -> s{_pssipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pssipUploadType :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipUploadType + = lens _pssipUploadType + (\ s a -> s{_pssipUploadType = a}) + +-- | OAuth bearer token. +pssipBearerToken :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipBearerToken + = lens _pssipBearerToken + (\ s a -> s{_pssipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pssipKey :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipKey = lens _pssipKey (\ s a -> s{_pssipKey = a}) + +-- | REQUIRED: The resource for which policy is being specified. Resource is +-- usually specified as a path, such as, +-- projects\/{project}\/zones\/{zone}\/disks\/{disk}. +pssipResource :: Lens' ProjectsSubscriptionsSetIAMPolicy' Text +pssipResource + = lens _pssipResource + (\ s a -> s{_pssipResource = a}) + +-- | OAuth 2.0 token for the current user. +pssipOauthToken :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipOauthToken + = lens _pssipOauthToken + (\ s a -> s{_pssipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pssipFields :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipFields + = lens _pssipFields (\ s a -> s{_pssipFields = a}) + +-- | JSONP +pssipCallback :: Lens' ProjectsSubscriptionsSetIAMPolicy' (Maybe Text) +pssipCallback + = lens _pssipCallback + (\ s a -> s{_pssipCallback = a}) + +-- | Data format for response. +pssipAlt :: Lens' ProjectsSubscriptionsSetIAMPolicy' Text +pssipAlt = lens _pssipAlt (\ s a -> s{_pssipAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsSetIAMPolicy' where + type Rs ProjectsSubscriptionsSetIAMPolicy' = Policy + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsSetIAMPolicy{..} + = go _pssipXgafv _pssipQuotaUser _pssipPrettyPrint + _pssipUploadProtocol + _pssipPp + _pssipAccessToken + _pssipUploadType + _pssipBearerToken + _pssipKey + _pssipResource + _pssipOauthToken + _pssipFields + _pssipCallback + _pssipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSubscriptionsSetIAMPolicyAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/TestIAMPermissions.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/TestIAMPermissions.hs new file mode 100644 index 000000000..6439ff897 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/TestIAMPermissions.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Subscriptions.TestIAMPermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns permissions that a caller has on the specified resource. +-- +-- /See:/ for @PubsubProjectsSubscriptionsTestIAMPermissions@. +module PubSub.Projects.Subscriptions.TestIAMPermissions + ( + -- * REST Resource + ProjectsSubscriptionsTestIAMPermissionsAPI + + -- * Creating a Request + , projectsSubscriptionsTestIAMPermissions + , ProjectsSubscriptionsTestIAMPermissions + + -- * Request Lenses + , pstipXgafv + , pstipQuotaUser + , pstipPrettyPrint + , pstipUploadProtocol + , pstipPp + , pstipAccessToken + , pstipUploadType + , pstipBearerToken + , pstipKey + , pstipResource + , pstipOauthToken + , pstipFields + , pstipCallback + , pstipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsSubscriptionsTestIAMPermissions@ which the +-- 'ProjectsSubscriptionsTestIAMPermissions' request conforms to. +type ProjectsSubscriptionsTestIAMPermissionsAPI = + "v1beta2" :> + "{+resource}:testIamPermissions" :> + Post '[JSON] TestIAMPermissionsResponse + +-- | Returns permissions that a caller has on the specified resource. +-- +-- /See:/ 'projectsSubscriptionsTestIAMPermissions' smart constructor. +data ProjectsSubscriptionsTestIAMPermissions = ProjectsSubscriptionsTestIAMPermissions + { _pstipXgafv :: !(Maybe Text) + , _pstipQuotaUser :: !(Maybe Text) + , _pstipPrettyPrint :: !Bool + , _pstipUploadProtocol :: !(Maybe Text) + , _pstipPp :: !Bool + , _pstipAccessToken :: !(Maybe Text) + , _pstipUploadType :: !(Maybe Text) + , _pstipBearerToken :: !(Maybe Text) + , _pstipKey :: !(Maybe Text) + , _pstipResource :: !Text + , _pstipOauthToken :: !(Maybe Text) + , _pstipFields :: !(Maybe Text) + , _pstipCallback :: !(Maybe Text) + , _pstipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSubscriptionsTestIAMPermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pstipXgafv' +-- +-- * 'pstipQuotaUser' +-- +-- * 'pstipPrettyPrint' +-- +-- * 'pstipUploadProtocol' +-- +-- * 'pstipPp' +-- +-- * 'pstipAccessToken' +-- +-- * 'pstipUploadType' +-- +-- * 'pstipBearerToken' +-- +-- * 'pstipKey' +-- +-- * 'pstipResource' +-- +-- * 'pstipOauthToken' +-- +-- * 'pstipFields' +-- +-- * 'pstipCallback' +-- +-- * 'pstipAlt' +projectsSubscriptionsTestIAMPermissions + :: Text -- ^ 'resource' + -> ProjectsSubscriptionsTestIAMPermissions +projectsSubscriptionsTestIAMPermissions pPstipResource_ = + ProjectsSubscriptionsTestIAMPermissions + { _pstipXgafv = Nothing + , _pstipQuotaUser = Nothing + , _pstipPrettyPrint = True + , _pstipUploadProtocol = Nothing + , _pstipPp = True + , _pstipAccessToken = Nothing + , _pstipUploadType = Nothing + , _pstipBearerToken = Nothing + , _pstipKey = Nothing + , _pstipResource = pPstipResource_ + , _pstipOauthToken = Nothing + , _pstipFields = Nothing + , _pstipCallback = Nothing + , _pstipAlt = "json" + } + +-- | V1 error format. +pstipXgafv :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipXgafv + = lens _pstipXgafv (\ s a -> s{_pstipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pstipQuotaUser :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipQuotaUser + = lens _pstipQuotaUser + (\ s a -> s{_pstipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pstipPrettyPrint :: Lens' ProjectsSubscriptionsTestIAMPermissions' Bool +pstipPrettyPrint + = lens _pstipPrettyPrint + (\ s a -> s{_pstipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pstipUploadProtocol :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipUploadProtocol + = lens _pstipUploadProtocol + (\ s a -> s{_pstipUploadProtocol = a}) + +-- | Pretty-print response. +pstipPp :: Lens' ProjectsSubscriptionsTestIAMPermissions' Bool +pstipPp = lens _pstipPp (\ s a -> s{_pstipPp = a}) + +-- | OAuth access token. +pstipAccessToken :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipAccessToken + = lens _pstipAccessToken + (\ s a -> s{_pstipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pstipUploadType :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipUploadType + = lens _pstipUploadType + (\ s a -> s{_pstipUploadType = a}) + +-- | OAuth bearer token. +pstipBearerToken :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipBearerToken + = lens _pstipBearerToken + (\ s a -> s{_pstipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pstipKey :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipKey = lens _pstipKey (\ s a -> s{_pstipKey = a}) + +-- | REQUIRED: The resource for which policy detail is being requested. +-- Resource is usually specified as a path, such as, projects\/{project}. +pstipResource :: Lens' ProjectsSubscriptionsTestIAMPermissions' Text +pstipResource + = lens _pstipResource + (\ s a -> s{_pstipResource = a}) + +-- | OAuth 2.0 token for the current user. +pstipOauthToken :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipOauthToken + = lens _pstipOauthToken + (\ s a -> s{_pstipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pstipFields :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipFields + = lens _pstipFields (\ s a -> s{_pstipFields = a}) + +-- | JSONP +pstipCallback :: Lens' ProjectsSubscriptionsTestIAMPermissions' (Maybe Text) +pstipCallback + = lens _pstipCallback + (\ s a -> s{_pstipCallback = a}) + +-- | Data format for response. +pstipAlt :: Lens' ProjectsSubscriptionsTestIAMPermissions' Text +pstipAlt = lens _pstipAlt (\ s a -> s{_pstipAlt = a}) + +instance GoogleRequest + ProjectsSubscriptionsTestIAMPermissions' where + type Rs ProjectsSubscriptionsTestIAMPermissions' = + TestIAMPermissionsResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsSubscriptionsTestIAMPermissions{..} + = go _pstipXgafv _pstipQuotaUser _pstipPrettyPrint + _pstipUploadProtocol + _pstipPp + _pstipAccessToken + _pstipUploadType + _pstipBearerToken + _pstipKey + _pstipResource + _pstipOauthToken + _pstipFields + _pstipCallback + _pstipAlt + where go + = clientWithRoute + (Proxy :: + Proxy ProjectsSubscriptionsTestIAMPermissionsAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Create.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Create.hs new file mode 100644 index 000000000..f8861eebc --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Create.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates the given topic with the given name. +-- +-- /See:/ for @PubsubProjectsTopicsCreate@. +module PubSub.Projects.Topics.Create + ( + -- * REST Resource + ProjectsTopicsCreateAPI + + -- * Creating a Request + , projectsTopicsCreate + , ProjectsTopicsCreate + + -- * Request Lenses + , ptcXgafv + , ptcQuotaUser + , ptcPrettyPrint + , ptcUploadProtocol + , ptcPp + , ptcAccessToken + , ptcUploadType + , ptcBearerToken + , ptcKey + , ptcName + , ptcOauthToken + , ptcFields + , ptcCallback + , ptcAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsCreate@ which the +-- 'ProjectsTopicsCreate' request conforms to. +type ProjectsTopicsCreateAPI = + "v1beta2" :> "{+name}" :> Put '[JSON] Topic + +-- | Creates the given topic with the given name. +-- +-- /See:/ 'projectsTopicsCreate' smart constructor. +data ProjectsTopicsCreate = ProjectsTopicsCreate + { _ptcXgafv :: !(Maybe Text) + , _ptcQuotaUser :: !(Maybe Text) + , _ptcPrettyPrint :: !Bool + , _ptcUploadProtocol :: !(Maybe Text) + , _ptcPp :: !Bool + , _ptcAccessToken :: !(Maybe Text) + , _ptcUploadType :: !(Maybe Text) + , _ptcBearerToken :: !(Maybe Text) + , _ptcKey :: !(Maybe Text) + , _ptcName :: !Text + , _ptcOauthToken :: !(Maybe Text) + , _ptcFields :: !(Maybe Text) + , _ptcCallback :: !(Maybe Text) + , _ptcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptcXgafv' +-- +-- * 'ptcQuotaUser' +-- +-- * 'ptcPrettyPrint' +-- +-- * 'ptcUploadProtocol' +-- +-- * 'ptcPp' +-- +-- * 'ptcAccessToken' +-- +-- * 'ptcUploadType' +-- +-- * 'ptcBearerToken' +-- +-- * 'ptcKey' +-- +-- * 'ptcName' +-- +-- * 'ptcOauthToken' +-- +-- * 'ptcFields' +-- +-- * 'ptcCallback' +-- +-- * 'ptcAlt' +projectsTopicsCreate + :: Text -- ^ 'name' + -> ProjectsTopicsCreate +projectsTopicsCreate pPtcName_ = + ProjectsTopicsCreate + { _ptcXgafv = Nothing + , _ptcQuotaUser = Nothing + , _ptcPrettyPrint = True + , _ptcUploadProtocol = Nothing + , _ptcPp = True + , _ptcAccessToken = Nothing + , _ptcUploadType = Nothing + , _ptcBearerToken = Nothing + , _ptcKey = Nothing + , _ptcName = pPtcName_ + , _ptcOauthToken = Nothing + , _ptcFields = Nothing + , _ptcCallback = Nothing + , _ptcAlt = "json" + } + +-- | V1 error format. +ptcXgafv :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcXgafv = lens _ptcXgafv (\ s a -> s{_ptcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptcQuotaUser :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcQuotaUser + = lens _ptcQuotaUser (\ s a -> s{_ptcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptcPrettyPrint :: Lens' ProjectsTopicsCreate' Bool +ptcPrettyPrint + = lens _ptcPrettyPrint + (\ s a -> s{_ptcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptcUploadProtocol :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcUploadProtocol + = lens _ptcUploadProtocol + (\ s a -> s{_ptcUploadProtocol = a}) + +-- | Pretty-print response. +ptcPp :: Lens' ProjectsTopicsCreate' Bool +ptcPp = lens _ptcPp (\ s a -> s{_ptcPp = a}) + +-- | OAuth access token. +ptcAccessToken :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcAccessToken + = lens _ptcAccessToken + (\ s a -> s{_ptcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptcUploadType :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcUploadType + = lens _ptcUploadType + (\ s a -> s{_ptcUploadType = a}) + +-- | OAuth bearer token. +ptcBearerToken :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcBearerToken + = lens _ptcBearerToken + (\ s a -> s{_ptcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptcKey :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcKey = lens _ptcKey (\ s a -> s{_ptcKey = a}) + +-- | The name of the topic. It must have the format +-- \`\"projects\/{project}\/topics\/{topic}\"\`. \`{topic}\` must start +-- with a letter, and contain only letters (\`[A-Za-z]\`), numbers +-- (\`[0-9]\`), dashes (\`-\`), underscores (\`_\`), periods (\`.\`), +-- tildes (\`~\`), plus (\`+\`) or percent signs (\`%\`). It must be +-- between 3 and 255 characters in length, and it must not start with +-- \`\"goog\"\`. +ptcName :: Lens' ProjectsTopicsCreate' Text +ptcName = lens _ptcName (\ s a -> s{_ptcName = a}) + +-- | OAuth 2.0 token for the current user. +ptcOauthToken :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcOauthToken + = lens _ptcOauthToken + (\ s a -> s{_ptcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptcFields :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcFields + = lens _ptcFields (\ s a -> s{_ptcFields = a}) + +-- | JSONP +ptcCallback :: Lens' ProjectsTopicsCreate' (Maybe Text) +ptcCallback + = lens _ptcCallback (\ s a -> s{_ptcCallback = a}) + +-- | Data format for response. +ptcAlt :: Lens' ProjectsTopicsCreate' Text +ptcAlt = lens _ptcAlt (\ s a -> s{_ptcAlt = a}) + +instance GoogleRequest ProjectsTopicsCreate' where + type Rs ProjectsTopicsCreate' = Topic + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsCreate{..} + = go _ptcXgafv _ptcQuotaUser _ptcPrettyPrint + _ptcUploadProtocol + _ptcPp + _ptcAccessToken + _ptcUploadType + _ptcBearerToken + _ptcKey + _ptcName + _ptcOauthToken + _ptcFields + _ptcCallback + _ptcAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsCreateAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Delete.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Delete.hs new file mode 100644 index 000000000..f35647a22 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Delete.hs @@ -0,0 +1,231 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the topic with the given name. Returns NOT_FOUND if the topic +-- does not exist. After a topic is deleted, a new topic may be created +-- with the same name; this is an entirely new topic with none of the old +-- configuration or subscriptions. Existing subscriptions to this topic are +-- not deleted, but their \`topic\` field is set to \`_deleted-topic_\`. +-- +-- /See:/ for @PubsubProjectsTopicsDelete@. +module PubSub.Projects.Topics.Delete + ( + -- * REST Resource + ProjectsTopicsDeleteAPI + + -- * Creating a Request + , projectsTopicsDelete + , ProjectsTopicsDelete + + -- * Request Lenses + , ptdXgafv + , ptdQuotaUser + , ptdPrettyPrint + , ptdUploadProtocol + , ptdPp + , ptdAccessToken + , ptdUploadType + , ptdTopic + , ptdBearerToken + , ptdKey + , ptdOauthToken + , ptdFields + , ptdCallback + , ptdAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsDelete@ which the +-- 'ProjectsTopicsDelete' request conforms to. +type ProjectsTopicsDeleteAPI = + "v1beta2" :> "{+topic}" :> Delete '[JSON] Empty + +-- | Deletes the topic with the given name. Returns NOT_FOUND if the topic +-- does not exist. After a topic is deleted, a new topic may be created +-- with the same name; this is an entirely new topic with none of the old +-- configuration or subscriptions. Existing subscriptions to this topic are +-- not deleted, but their \`topic\` field is set to \`_deleted-topic_\`. +-- +-- /See:/ 'projectsTopicsDelete' smart constructor. +data ProjectsTopicsDelete = ProjectsTopicsDelete + { _ptdXgafv :: !(Maybe Text) + , _ptdQuotaUser :: !(Maybe Text) + , _ptdPrettyPrint :: !Bool + , _ptdUploadProtocol :: !(Maybe Text) + , _ptdPp :: !Bool + , _ptdAccessToken :: !(Maybe Text) + , _ptdUploadType :: !(Maybe Text) + , _ptdTopic :: !Text + , _ptdBearerToken :: !(Maybe Text) + , _ptdKey :: !(Maybe Text) + , _ptdOauthToken :: !(Maybe Text) + , _ptdFields :: !(Maybe Text) + , _ptdCallback :: !(Maybe Text) + , _ptdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptdXgafv' +-- +-- * 'ptdQuotaUser' +-- +-- * 'ptdPrettyPrint' +-- +-- * 'ptdUploadProtocol' +-- +-- * 'ptdPp' +-- +-- * 'ptdAccessToken' +-- +-- * 'ptdUploadType' +-- +-- * 'ptdTopic' +-- +-- * 'ptdBearerToken' +-- +-- * 'ptdKey' +-- +-- * 'ptdOauthToken' +-- +-- * 'ptdFields' +-- +-- * 'ptdCallback' +-- +-- * 'ptdAlt' +projectsTopicsDelete + :: Text -- ^ 'topic' + -> ProjectsTopicsDelete +projectsTopicsDelete pPtdTopic_ = + ProjectsTopicsDelete + { _ptdXgafv = Nothing + , _ptdQuotaUser = Nothing + , _ptdPrettyPrint = True + , _ptdUploadProtocol = Nothing + , _ptdPp = True + , _ptdAccessToken = Nothing + , _ptdUploadType = Nothing + , _ptdTopic = pPtdTopic_ + , _ptdBearerToken = Nothing + , _ptdKey = Nothing + , _ptdOauthToken = Nothing + , _ptdFields = Nothing + , _ptdCallback = Nothing + , _ptdAlt = "json" + } + +-- | V1 error format. +ptdXgafv :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdXgafv = lens _ptdXgafv (\ s a -> s{_ptdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptdQuotaUser :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdQuotaUser + = lens _ptdQuotaUser (\ s a -> s{_ptdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptdPrettyPrint :: Lens' ProjectsTopicsDelete' Bool +ptdPrettyPrint + = lens _ptdPrettyPrint + (\ s a -> s{_ptdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptdUploadProtocol :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdUploadProtocol + = lens _ptdUploadProtocol + (\ s a -> s{_ptdUploadProtocol = a}) + +-- | Pretty-print response. +ptdPp :: Lens' ProjectsTopicsDelete' Bool +ptdPp = lens _ptdPp (\ s a -> s{_ptdPp = a}) + +-- | OAuth access token. +ptdAccessToken :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdAccessToken + = lens _ptdAccessToken + (\ s a -> s{_ptdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptdUploadType :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdUploadType + = lens _ptdUploadType + (\ s a -> s{_ptdUploadType = a}) + +-- | Name of the topic to delete. +ptdTopic :: Lens' ProjectsTopicsDelete' Text +ptdTopic = lens _ptdTopic (\ s a -> s{_ptdTopic = a}) + +-- | OAuth bearer token. +ptdBearerToken :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdBearerToken + = lens _ptdBearerToken + (\ s a -> s{_ptdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptdKey :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdKey = lens _ptdKey (\ s a -> s{_ptdKey = a}) + +-- | OAuth 2.0 token for the current user. +ptdOauthToken :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdOauthToken + = lens _ptdOauthToken + (\ s a -> s{_ptdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptdFields :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdFields + = lens _ptdFields (\ s a -> s{_ptdFields = a}) + +-- | JSONP +ptdCallback :: Lens' ProjectsTopicsDelete' (Maybe Text) +ptdCallback + = lens _ptdCallback (\ s a -> s{_ptdCallback = a}) + +-- | Data format for response. +ptdAlt :: Lens' ProjectsTopicsDelete' Text +ptdAlt = lens _ptdAlt (\ s a -> s{_ptdAlt = a}) + +instance GoogleRequest ProjectsTopicsDelete' where + type Rs ProjectsTopicsDelete' = Empty + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsDelete{..} + = go _ptdXgafv _ptdQuotaUser _ptdPrettyPrint + _ptdUploadProtocol + _ptdPp + _ptdAccessToken + _ptdUploadType + _ptdTopic + _ptdBearerToken + _ptdKey + _ptdOauthToken + _ptdFields + _ptdCallback + _ptdAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsDeleteAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Get.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Get.hs new file mode 100644 index 000000000..b40940756 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Get.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the configuration of a topic. +-- +-- /See:/ for @PubsubProjectsTopicsGet@. +module PubSub.Projects.Topics.Get + ( + -- * REST Resource + ProjectsTopicsGetAPI + + -- * Creating a Request + , projectsTopicsGet + , ProjectsTopicsGet + + -- * Request Lenses + , ptgXgafv + , ptgQuotaUser + , ptgPrettyPrint + , ptgUploadProtocol + , ptgPp + , ptgAccessToken + , ptgUploadType + , ptgTopic + , ptgBearerToken + , ptgKey + , ptgOauthToken + , ptgFields + , ptgCallback + , ptgAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsGet@ which the +-- 'ProjectsTopicsGet' request conforms to. +type ProjectsTopicsGetAPI = + "v1beta2" :> "{+topic}" :> Get '[JSON] Topic + +-- | Gets the configuration of a topic. +-- +-- /See:/ 'projectsTopicsGet' smart constructor. +data ProjectsTopicsGet = ProjectsTopicsGet + { _ptgXgafv :: !(Maybe Text) + , _ptgQuotaUser :: !(Maybe Text) + , _ptgPrettyPrint :: !Bool + , _ptgUploadProtocol :: !(Maybe Text) + , _ptgPp :: !Bool + , _ptgAccessToken :: !(Maybe Text) + , _ptgUploadType :: !(Maybe Text) + , _ptgTopic :: !Text + , _ptgBearerToken :: !(Maybe Text) + , _ptgKey :: !(Maybe Text) + , _ptgOauthToken :: !(Maybe Text) + , _ptgFields :: !(Maybe Text) + , _ptgCallback :: !(Maybe Text) + , _ptgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptgXgafv' +-- +-- * 'ptgQuotaUser' +-- +-- * 'ptgPrettyPrint' +-- +-- * 'ptgUploadProtocol' +-- +-- * 'ptgPp' +-- +-- * 'ptgAccessToken' +-- +-- * 'ptgUploadType' +-- +-- * 'ptgTopic' +-- +-- * 'ptgBearerToken' +-- +-- * 'ptgKey' +-- +-- * 'ptgOauthToken' +-- +-- * 'ptgFields' +-- +-- * 'ptgCallback' +-- +-- * 'ptgAlt' +projectsTopicsGet + :: Text -- ^ 'topic' + -> ProjectsTopicsGet +projectsTopicsGet pPtgTopic_ = + ProjectsTopicsGet + { _ptgXgafv = Nothing + , _ptgQuotaUser = Nothing + , _ptgPrettyPrint = True + , _ptgUploadProtocol = Nothing + , _ptgPp = True + , _ptgAccessToken = Nothing + , _ptgUploadType = Nothing + , _ptgTopic = pPtgTopic_ + , _ptgBearerToken = Nothing + , _ptgKey = Nothing + , _ptgOauthToken = Nothing + , _ptgFields = Nothing + , _ptgCallback = Nothing + , _ptgAlt = "json" + } + +-- | V1 error format. +ptgXgafv :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgXgafv = lens _ptgXgafv (\ s a -> s{_ptgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptgQuotaUser :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgQuotaUser + = lens _ptgQuotaUser (\ s a -> s{_ptgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptgPrettyPrint :: Lens' ProjectsTopicsGet' Bool +ptgPrettyPrint + = lens _ptgPrettyPrint + (\ s a -> s{_ptgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptgUploadProtocol :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgUploadProtocol + = lens _ptgUploadProtocol + (\ s a -> s{_ptgUploadProtocol = a}) + +-- | Pretty-print response. +ptgPp :: Lens' ProjectsTopicsGet' Bool +ptgPp = lens _ptgPp (\ s a -> s{_ptgPp = a}) + +-- | OAuth access token. +ptgAccessToken :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgAccessToken + = lens _ptgAccessToken + (\ s a -> s{_ptgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptgUploadType :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgUploadType + = lens _ptgUploadType + (\ s a -> s{_ptgUploadType = a}) + +-- | The name of the topic to get. +ptgTopic :: Lens' ProjectsTopicsGet' Text +ptgTopic = lens _ptgTopic (\ s a -> s{_ptgTopic = a}) + +-- | OAuth bearer token. +ptgBearerToken :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgBearerToken + = lens _ptgBearerToken + (\ s a -> s{_ptgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptgKey :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgKey = lens _ptgKey (\ s a -> s{_ptgKey = a}) + +-- | OAuth 2.0 token for the current user. +ptgOauthToken :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgOauthToken + = lens _ptgOauthToken + (\ s a -> s{_ptgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptgFields :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgFields + = lens _ptgFields (\ s a -> s{_ptgFields = a}) + +-- | JSONP +ptgCallback :: Lens' ProjectsTopicsGet' (Maybe Text) +ptgCallback + = lens _ptgCallback (\ s a -> s{_ptgCallback = a}) + +-- | Data format for response. +ptgAlt :: Lens' ProjectsTopicsGet' Text +ptgAlt = lens _ptgAlt (\ s a -> s{_ptgAlt = a}) + +instance GoogleRequest ProjectsTopicsGet' where + type Rs ProjectsTopicsGet' = Topic + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsGet{..} + = go _ptgXgafv _ptgQuotaUser _ptgPrettyPrint + _ptgUploadProtocol + _ptgPp + _ptgAccessToken + _ptgUploadType + _ptgTopic + _ptgBearerToken + _ptgKey + _ptgOauthToken + _ptgFields + _ptgCallback + _ptgAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsGetAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/GetIAMPolicy.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/GetIAMPolicy.hs new file mode 100644 index 000000000..7ecebed74 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/GetIAMPolicy.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.GetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the access control policy for a resource. Is empty if the policy or +-- the resource does not exist. +-- +-- /See:/ for @PubsubProjectsTopicsGetIAMPolicy@. +module PubSub.Projects.Topics.GetIAMPolicy + ( + -- * REST Resource + ProjectsTopicsGetIAMPolicyAPI + + -- * Creating a Request + , projectsTopicsGetIAMPolicy + , ProjectsTopicsGetIAMPolicy + + -- * Request Lenses + , ptgipXgafv + , ptgipQuotaUser + , ptgipPrettyPrint + , ptgipUploadProtocol + , ptgipPp + , ptgipAccessToken + , ptgipUploadType + , ptgipBearerToken + , ptgipKey + , ptgipResource + , ptgipOauthToken + , ptgipFields + , ptgipCallback + , ptgipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsGetIAMPolicy@ which the +-- 'ProjectsTopicsGetIAMPolicy' request conforms to. +type ProjectsTopicsGetIAMPolicyAPI = + "v1beta2" :> + "{+resource}:getIamPolicy" :> Get '[JSON] Policy + +-- | Gets the access control policy for a resource. Is empty if the policy or +-- the resource does not exist. +-- +-- /See:/ 'projectsTopicsGetIAMPolicy' smart constructor. +data ProjectsTopicsGetIAMPolicy = ProjectsTopicsGetIAMPolicy + { _ptgipXgafv :: !(Maybe Text) + , _ptgipQuotaUser :: !(Maybe Text) + , _ptgipPrettyPrint :: !Bool + , _ptgipUploadProtocol :: !(Maybe Text) + , _ptgipPp :: !Bool + , _ptgipAccessToken :: !(Maybe Text) + , _ptgipUploadType :: !(Maybe Text) + , _ptgipBearerToken :: !(Maybe Text) + , _ptgipKey :: !(Maybe Text) + , _ptgipResource :: !Text + , _ptgipOauthToken :: !(Maybe Text) + , _ptgipFields :: !(Maybe Text) + , _ptgipCallback :: !(Maybe Text) + , _ptgipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsGetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptgipXgafv' +-- +-- * 'ptgipQuotaUser' +-- +-- * 'ptgipPrettyPrint' +-- +-- * 'ptgipUploadProtocol' +-- +-- * 'ptgipPp' +-- +-- * 'ptgipAccessToken' +-- +-- * 'ptgipUploadType' +-- +-- * 'ptgipBearerToken' +-- +-- * 'ptgipKey' +-- +-- * 'ptgipResource' +-- +-- * 'ptgipOauthToken' +-- +-- * 'ptgipFields' +-- +-- * 'ptgipCallback' +-- +-- * 'ptgipAlt' +projectsTopicsGetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsTopicsGetIAMPolicy +projectsTopicsGetIAMPolicy pPtgipResource_ = + ProjectsTopicsGetIAMPolicy + { _ptgipXgafv = Nothing + , _ptgipQuotaUser = Nothing + , _ptgipPrettyPrint = True + , _ptgipUploadProtocol = Nothing + , _ptgipPp = True + , _ptgipAccessToken = Nothing + , _ptgipUploadType = Nothing + , _ptgipBearerToken = Nothing + , _ptgipKey = Nothing + , _ptgipResource = pPtgipResource_ + , _ptgipOauthToken = Nothing + , _ptgipFields = Nothing + , _ptgipCallback = Nothing + , _ptgipAlt = "json" + } + +-- | V1 error format. +ptgipXgafv :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipXgafv + = lens _ptgipXgafv (\ s a -> s{_ptgipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptgipQuotaUser :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipQuotaUser + = lens _ptgipQuotaUser + (\ s a -> s{_ptgipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptgipPrettyPrint :: Lens' ProjectsTopicsGetIAMPolicy' Bool +ptgipPrettyPrint + = lens _ptgipPrettyPrint + (\ s a -> s{_ptgipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptgipUploadProtocol :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipUploadProtocol + = lens _ptgipUploadProtocol + (\ s a -> s{_ptgipUploadProtocol = a}) + +-- | Pretty-print response. +ptgipPp :: Lens' ProjectsTopicsGetIAMPolicy' Bool +ptgipPp = lens _ptgipPp (\ s a -> s{_ptgipPp = a}) + +-- | OAuth access token. +ptgipAccessToken :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipAccessToken + = lens _ptgipAccessToken + (\ s a -> s{_ptgipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptgipUploadType :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipUploadType + = lens _ptgipUploadType + (\ s a -> s{_ptgipUploadType = a}) + +-- | OAuth bearer token. +ptgipBearerToken :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipBearerToken + = lens _ptgipBearerToken + (\ s a -> s{_ptgipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptgipKey :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipKey = lens _ptgipKey (\ s a -> s{_ptgipKey = a}) + +-- | REQUIRED: The resource for which policy is being requested. Resource is +-- usually specified as a path, such as, projects\/{project}. +ptgipResource :: Lens' ProjectsTopicsGetIAMPolicy' Text +ptgipResource + = lens _ptgipResource + (\ s a -> s{_ptgipResource = a}) + +-- | OAuth 2.0 token for the current user. +ptgipOauthToken :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipOauthToken + = lens _ptgipOauthToken + (\ s a -> s{_ptgipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptgipFields :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipFields + = lens _ptgipFields (\ s a -> s{_ptgipFields = a}) + +-- | JSONP +ptgipCallback :: Lens' ProjectsTopicsGetIAMPolicy' (Maybe Text) +ptgipCallback + = lens _ptgipCallback + (\ s a -> s{_ptgipCallback = a}) + +-- | Data format for response. +ptgipAlt :: Lens' ProjectsTopicsGetIAMPolicy' Text +ptgipAlt = lens _ptgipAlt (\ s a -> s{_ptgipAlt = a}) + +instance GoogleRequest ProjectsTopicsGetIAMPolicy' + where + type Rs ProjectsTopicsGetIAMPolicy' = Policy + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsGetIAMPolicy{..} + = go _ptgipXgafv _ptgipQuotaUser _ptgipPrettyPrint + _ptgipUploadProtocol + _ptgipPp + _ptgipAccessToken + _ptgipUploadType + _ptgipBearerToken + _ptgipKey + _ptgipResource + _ptgipOauthToken + _ptgipFields + _ptgipCallback + _ptgipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsGetIAMPolicyAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/List.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/List.hs new file mode 100644 index 000000000..155cccbd9 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/List.hs @@ -0,0 +1,253 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists matching topics. +-- +-- /See:/ for @PubsubProjectsTopicsList@. +module PubSub.Projects.Topics.List + ( + -- * REST Resource + ProjectsTopicsListAPI + + -- * Creating a Request + , projectsTopicsList + , ProjectsTopicsList + + -- * Request Lenses + , ptlXgafv + , ptlQuotaUser + , ptlPrettyPrint + , ptlUploadProtocol + , ptlProject + , ptlPp + , ptlAccessToken + , ptlUploadType + , ptlBearerToken + , ptlKey + , ptlPageToken + , ptlOauthToken + , ptlPageSize + , ptlFields + , ptlCallback + , ptlAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsList@ which the +-- 'ProjectsTopicsList' request conforms to. +type ProjectsTopicsListAPI = + "v1beta2" :> + "{+project}" :> + "topics" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListTopicsResponse + +-- | Lists matching topics. +-- +-- /See:/ 'projectsTopicsList' smart constructor. +data ProjectsTopicsList = ProjectsTopicsList + { _ptlXgafv :: !(Maybe Text) + , _ptlQuotaUser :: !(Maybe Text) + , _ptlPrettyPrint :: !Bool + , _ptlUploadProtocol :: !(Maybe Text) + , _ptlProject :: !Text + , _ptlPp :: !Bool + , _ptlAccessToken :: !(Maybe Text) + , _ptlUploadType :: !(Maybe Text) + , _ptlBearerToken :: !(Maybe Text) + , _ptlKey :: !(Maybe Text) + , _ptlPageToken :: !(Maybe Text) + , _ptlOauthToken :: !(Maybe Text) + , _ptlPageSize :: !(Maybe Int32) + , _ptlFields :: !(Maybe Text) + , _ptlCallback :: !(Maybe Text) + , _ptlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptlXgafv' +-- +-- * 'ptlQuotaUser' +-- +-- * 'ptlPrettyPrint' +-- +-- * 'ptlUploadProtocol' +-- +-- * 'ptlProject' +-- +-- * 'ptlPp' +-- +-- * 'ptlAccessToken' +-- +-- * 'ptlUploadType' +-- +-- * 'ptlBearerToken' +-- +-- * 'ptlKey' +-- +-- * 'ptlPageToken' +-- +-- * 'ptlOauthToken' +-- +-- * 'ptlPageSize' +-- +-- * 'ptlFields' +-- +-- * 'ptlCallback' +-- +-- * 'ptlAlt' +projectsTopicsList + :: Text -- ^ 'project' + -> ProjectsTopicsList +projectsTopicsList pPtlProject_ = + ProjectsTopicsList + { _ptlXgafv = Nothing + , _ptlQuotaUser = Nothing + , _ptlPrettyPrint = True + , _ptlUploadProtocol = Nothing + , _ptlProject = pPtlProject_ + , _ptlPp = True + , _ptlAccessToken = Nothing + , _ptlUploadType = Nothing + , _ptlBearerToken = Nothing + , _ptlKey = Nothing + , _ptlPageToken = Nothing + , _ptlOauthToken = Nothing + , _ptlPageSize = Nothing + , _ptlFields = Nothing + , _ptlCallback = Nothing + , _ptlAlt = "json" + } + +-- | V1 error format. +ptlXgafv :: Lens' ProjectsTopicsList' (Maybe Text) +ptlXgafv = lens _ptlXgafv (\ s a -> s{_ptlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptlQuotaUser :: Lens' ProjectsTopicsList' (Maybe Text) +ptlQuotaUser + = lens _ptlQuotaUser (\ s a -> s{_ptlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptlPrettyPrint :: Lens' ProjectsTopicsList' Bool +ptlPrettyPrint + = lens _ptlPrettyPrint + (\ s a -> s{_ptlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptlUploadProtocol :: Lens' ProjectsTopicsList' (Maybe Text) +ptlUploadProtocol + = lens _ptlUploadProtocol + (\ s a -> s{_ptlUploadProtocol = a}) + +-- | The name of the cloud project that topics belong to. +ptlProject :: Lens' ProjectsTopicsList' Text +ptlProject + = lens _ptlProject (\ s a -> s{_ptlProject = a}) + +-- | Pretty-print response. +ptlPp :: Lens' ProjectsTopicsList' Bool +ptlPp = lens _ptlPp (\ s a -> s{_ptlPp = a}) + +-- | OAuth access token. +ptlAccessToken :: Lens' ProjectsTopicsList' (Maybe Text) +ptlAccessToken + = lens _ptlAccessToken + (\ s a -> s{_ptlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptlUploadType :: Lens' ProjectsTopicsList' (Maybe Text) +ptlUploadType + = lens _ptlUploadType + (\ s a -> s{_ptlUploadType = a}) + +-- | OAuth bearer token. +ptlBearerToken :: Lens' ProjectsTopicsList' (Maybe Text) +ptlBearerToken + = lens _ptlBearerToken + (\ s a -> s{_ptlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptlKey :: Lens' ProjectsTopicsList' (Maybe Text) +ptlKey = lens _ptlKey (\ s a -> s{_ptlKey = a}) + +-- | The value returned by the last ListTopicsResponse; indicates that this +-- is a continuation of a prior ListTopics call, and that the system should +-- return the next page of data. +ptlPageToken :: Lens' ProjectsTopicsList' (Maybe Text) +ptlPageToken + = lens _ptlPageToken (\ s a -> s{_ptlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ptlOauthToken :: Lens' ProjectsTopicsList' (Maybe Text) +ptlOauthToken + = lens _ptlOauthToken + (\ s a -> s{_ptlOauthToken = a}) + +-- | Maximum number of topics to return. +ptlPageSize :: Lens' ProjectsTopicsList' (Maybe Int32) +ptlPageSize + = lens _ptlPageSize (\ s a -> s{_ptlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +ptlFields :: Lens' ProjectsTopicsList' (Maybe Text) +ptlFields + = lens _ptlFields (\ s a -> s{_ptlFields = a}) + +-- | JSONP +ptlCallback :: Lens' ProjectsTopicsList' (Maybe Text) +ptlCallback + = lens _ptlCallback (\ s a -> s{_ptlCallback = a}) + +-- | Data format for response. +ptlAlt :: Lens' ProjectsTopicsList' Text +ptlAlt = lens _ptlAlt (\ s a -> s{_ptlAlt = a}) + +instance GoogleRequest ProjectsTopicsList' where + type Rs ProjectsTopicsList' = ListTopicsResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsList{..} + = go _ptlXgafv _ptlQuotaUser _ptlPrettyPrint + _ptlUploadProtocol + _ptlProject + _ptlPp + _ptlAccessToken + _ptlUploadType + _ptlBearerToken + _ptlKey + _ptlPageToken + _ptlOauthToken + _ptlPageSize + _ptlFields + _ptlCallback + _ptlAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsListAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Publish.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Publish.hs new file mode 100644 index 000000000..94c664af2 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Publish.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds one or more messages to the topic. Returns NOT_FOUND if the topic +-- does not exist. The message payload must not be empty; it must contain +-- either a non-empty data field, or at least one attribute. +-- +-- /See:/ for @PubsubProjectsTopicsPublish@. +module PubSub.Projects.Topics.Publish + ( + -- * REST Resource + ProjectsTopicsPublishAPI + + -- * Creating a Request + , projectsTopicsPublish + , ProjectsTopicsPublish + + -- * Request Lenses + , ptpXgafv + , ptpQuotaUser + , ptpPrettyPrint + , ptpUploadProtocol + , ptpPp + , ptpAccessToken + , ptpUploadType + , ptpTopic + , ptpBearerToken + , ptpKey + , ptpOauthToken + , ptpFields + , ptpCallback + , ptpAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsPublish@ which the +-- 'ProjectsTopicsPublish' request conforms to. +type ProjectsTopicsPublishAPI = + "v1beta2" :> + "{+topic}:publish" :> Post '[JSON] PublishResponse + +-- | Adds one or more messages to the topic. Returns NOT_FOUND if the topic +-- does not exist. The message payload must not be empty; it must contain +-- either a non-empty data field, or at least one attribute. +-- +-- /See:/ 'projectsTopicsPublish' smart constructor. +data ProjectsTopicsPublish = ProjectsTopicsPublish + { _ptpXgafv :: !(Maybe Text) + , _ptpQuotaUser :: !(Maybe Text) + , _ptpPrettyPrint :: !Bool + , _ptpUploadProtocol :: !(Maybe Text) + , _ptpPp :: !Bool + , _ptpAccessToken :: !(Maybe Text) + , _ptpUploadType :: !(Maybe Text) + , _ptpTopic :: !Text + , _ptpBearerToken :: !(Maybe Text) + , _ptpKey :: !(Maybe Text) + , _ptpOauthToken :: !(Maybe Text) + , _ptpFields :: !(Maybe Text) + , _ptpCallback :: !(Maybe Text) + , _ptpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptpXgafv' +-- +-- * 'ptpQuotaUser' +-- +-- * 'ptpPrettyPrint' +-- +-- * 'ptpUploadProtocol' +-- +-- * 'ptpPp' +-- +-- * 'ptpAccessToken' +-- +-- * 'ptpUploadType' +-- +-- * 'ptpTopic' +-- +-- * 'ptpBearerToken' +-- +-- * 'ptpKey' +-- +-- * 'ptpOauthToken' +-- +-- * 'ptpFields' +-- +-- * 'ptpCallback' +-- +-- * 'ptpAlt' +projectsTopicsPublish + :: Text -- ^ 'topic' + -> ProjectsTopicsPublish +projectsTopicsPublish pPtpTopic_ = + ProjectsTopicsPublish + { _ptpXgafv = Nothing + , _ptpQuotaUser = Nothing + , _ptpPrettyPrint = True + , _ptpUploadProtocol = Nothing + , _ptpPp = True + , _ptpAccessToken = Nothing + , _ptpUploadType = Nothing + , _ptpTopic = pPtpTopic_ + , _ptpBearerToken = Nothing + , _ptpKey = Nothing + , _ptpOauthToken = Nothing + , _ptpFields = Nothing + , _ptpCallback = Nothing + , _ptpAlt = "json" + } + +-- | V1 error format. +ptpXgafv :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpXgafv = lens _ptpXgafv (\ s a -> s{_ptpXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptpQuotaUser :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpQuotaUser + = lens _ptpQuotaUser (\ s a -> s{_ptpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptpPrettyPrint :: Lens' ProjectsTopicsPublish' Bool +ptpPrettyPrint + = lens _ptpPrettyPrint + (\ s a -> s{_ptpPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptpUploadProtocol :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpUploadProtocol + = lens _ptpUploadProtocol + (\ s a -> s{_ptpUploadProtocol = a}) + +-- | Pretty-print response. +ptpPp :: Lens' ProjectsTopicsPublish' Bool +ptpPp = lens _ptpPp (\ s a -> s{_ptpPp = a}) + +-- | OAuth access token. +ptpAccessToken :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpAccessToken + = lens _ptpAccessToken + (\ s a -> s{_ptpAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptpUploadType :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpUploadType + = lens _ptpUploadType + (\ s a -> s{_ptpUploadType = a}) + +-- | The messages in the request will be published on this topic. +ptpTopic :: Lens' ProjectsTopicsPublish' Text +ptpTopic = lens _ptpTopic (\ s a -> s{_ptpTopic = a}) + +-- | OAuth bearer token. +ptpBearerToken :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpBearerToken + = lens _ptpBearerToken + (\ s a -> s{_ptpBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptpKey :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpKey = lens _ptpKey (\ s a -> s{_ptpKey = a}) + +-- | OAuth 2.0 token for the current user. +ptpOauthToken :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpOauthToken + = lens _ptpOauthToken + (\ s a -> s{_ptpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptpFields :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpFields + = lens _ptpFields (\ s a -> s{_ptpFields = a}) + +-- | JSONP +ptpCallback :: Lens' ProjectsTopicsPublish' (Maybe Text) +ptpCallback + = lens _ptpCallback (\ s a -> s{_ptpCallback = a}) + +-- | Data format for response. +ptpAlt :: Lens' ProjectsTopicsPublish' Text +ptpAlt = lens _ptpAlt (\ s a -> s{_ptpAlt = a}) + +instance GoogleRequest ProjectsTopicsPublish' where + type Rs ProjectsTopicsPublish' = PublishResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsPublish{..} + = go _ptpXgafv _ptpQuotaUser _ptpPrettyPrint + _ptpUploadProtocol + _ptpPp + _ptpAccessToken + _ptpUploadType + _ptpTopic + _ptpBearerToken + _ptpKey + _ptpOauthToken + _ptpFields + _ptpCallback + _ptpAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsPublishAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs new file mode 100644 index 000000000..16dadcccd --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.SetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the access control policy on the specified resource. Replaces any +-- existing policy. +-- +-- /See:/ for @PubsubProjectsTopicsSetIAMPolicy@. +module PubSub.Projects.Topics.SetIAMPolicy + ( + -- * REST Resource + ProjectsTopicsSetIAMPolicyAPI + + -- * Creating a Request + , projectsTopicsSetIAMPolicy + , ProjectsTopicsSetIAMPolicy + + -- * Request Lenses + , ptsipXgafv + , ptsipQuotaUser + , ptsipPrettyPrint + , ptsipUploadProtocol + , ptsipPp + , ptsipAccessToken + , ptsipUploadType + , ptsipBearerToken + , ptsipKey + , ptsipResource + , ptsipOauthToken + , ptsipFields + , ptsipCallback + , ptsipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsSetIAMPolicy@ which the +-- 'ProjectsTopicsSetIAMPolicy' request conforms to. +type ProjectsTopicsSetIAMPolicyAPI = + "v1beta2" :> + "{+resource}:setIamPolicy" :> Post '[JSON] Policy + +-- | Sets the access control policy on the specified resource. Replaces any +-- existing policy. +-- +-- /See:/ 'projectsTopicsSetIAMPolicy' smart constructor. +data ProjectsTopicsSetIAMPolicy = ProjectsTopicsSetIAMPolicy + { _ptsipXgafv :: !(Maybe Text) + , _ptsipQuotaUser :: !(Maybe Text) + , _ptsipPrettyPrint :: !Bool + , _ptsipUploadProtocol :: !(Maybe Text) + , _ptsipPp :: !Bool + , _ptsipAccessToken :: !(Maybe Text) + , _ptsipUploadType :: !(Maybe Text) + , _ptsipBearerToken :: !(Maybe Text) + , _ptsipKey :: !(Maybe Text) + , _ptsipResource :: !Text + , _ptsipOauthToken :: !(Maybe Text) + , _ptsipFields :: !(Maybe Text) + , _ptsipCallback :: !(Maybe Text) + , _ptsipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsSetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptsipXgafv' +-- +-- * 'ptsipQuotaUser' +-- +-- * 'ptsipPrettyPrint' +-- +-- * 'ptsipUploadProtocol' +-- +-- * 'ptsipPp' +-- +-- * 'ptsipAccessToken' +-- +-- * 'ptsipUploadType' +-- +-- * 'ptsipBearerToken' +-- +-- * 'ptsipKey' +-- +-- * 'ptsipResource' +-- +-- * 'ptsipOauthToken' +-- +-- * 'ptsipFields' +-- +-- * 'ptsipCallback' +-- +-- * 'ptsipAlt' +projectsTopicsSetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsTopicsSetIAMPolicy +projectsTopicsSetIAMPolicy pPtsipResource_ = + ProjectsTopicsSetIAMPolicy + { _ptsipXgafv = Nothing + , _ptsipQuotaUser = Nothing + , _ptsipPrettyPrint = True + , _ptsipUploadProtocol = Nothing + , _ptsipPp = True + , _ptsipAccessToken = Nothing + , _ptsipUploadType = Nothing + , _ptsipBearerToken = Nothing + , _ptsipKey = Nothing + , _ptsipResource = pPtsipResource_ + , _ptsipOauthToken = Nothing + , _ptsipFields = Nothing + , _ptsipCallback = Nothing + , _ptsipAlt = "json" + } + +-- | V1 error format. +ptsipXgafv :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipXgafv + = lens _ptsipXgafv (\ s a -> s{_ptsipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptsipQuotaUser :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipQuotaUser + = lens _ptsipQuotaUser + (\ s a -> s{_ptsipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptsipPrettyPrint :: Lens' ProjectsTopicsSetIAMPolicy' Bool +ptsipPrettyPrint + = lens _ptsipPrettyPrint + (\ s a -> s{_ptsipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptsipUploadProtocol :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipUploadProtocol + = lens _ptsipUploadProtocol + (\ s a -> s{_ptsipUploadProtocol = a}) + +-- | Pretty-print response. +ptsipPp :: Lens' ProjectsTopicsSetIAMPolicy' Bool +ptsipPp = lens _ptsipPp (\ s a -> s{_ptsipPp = a}) + +-- | OAuth access token. +ptsipAccessToken :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipAccessToken + = lens _ptsipAccessToken + (\ s a -> s{_ptsipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptsipUploadType :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipUploadType + = lens _ptsipUploadType + (\ s a -> s{_ptsipUploadType = a}) + +-- | OAuth bearer token. +ptsipBearerToken :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipBearerToken + = lens _ptsipBearerToken + (\ s a -> s{_ptsipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptsipKey :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipKey = lens _ptsipKey (\ s a -> s{_ptsipKey = a}) + +-- | REQUIRED: The resource for which policy is being specified. Resource is +-- usually specified as a path, such as, +-- projects\/{project}\/zones\/{zone}\/disks\/{disk}. +ptsipResource :: Lens' ProjectsTopicsSetIAMPolicy' Text +ptsipResource + = lens _ptsipResource + (\ s a -> s{_ptsipResource = a}) + +-- | OAuth 2.0 token for the current user. +ptsipOauthToken :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipOauthToken + = lens _ptsipOauthToken + (\ s a -> s{_ptsipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptsipFields :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipFields + = lens _ptsipFields (\ s a -> s{_ptsipFields = a}) + +-- | JSONP +ptsipCallback :: Lens' ProjectsTopicsSetIAMPolicy' (Maybe Text) +ptsipCallback + = lens _ptsipCallback + (\ s a -> s{_ptsipCallback = a}) + +-- | Data format for response. +ptsipAlt :: Lens' ProjectsTopicsSetIAMPolicy' Text +ptsipAlt = lens _ptsipAlt (\ s a -> s{_ptsipAlt = a}) + +instance GoogleRequest ProjectsTopicsSetIAMPolicy' + where + type Rs ProjectsTopicsSetIAMPolicy' = Policy + request = requestWithRoute defReq pubSubURL + requestWithRoute r u ProjectsTopicsSetIAMPolicy{..} + = go _ptsipXgafv _ptsipQuotaUser _ptsipPrettyPrint + _ptsipUploadProtocol + _ptsipPp + _ptsipAccessToken + _ptsipUploadType + _ptsipBearerToken + _ptsipKey + _ptsipResource + _ptsipOauthToken + _ptsipFields + _ptsipCallback + _ptsipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsSetIAMPolicyAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Subscriptions/List.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Subscriptions/List.hs new file mode 100644 index 000000000..4c35f09af --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Subscriptions/List.hs @@ -0,0 +1,259 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.Subscriptions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the name of the subscriptions for this topic. +-- +-- /See:/ for @PubsubProjectsTopicsSubscriptionsList@. +module PubSub.Projects.Topics.Subscriptions.List + ( + -- * REST Resource + ProjectsTopicsSubscriptionsListAPI + + -- * Creating a Request + , projectsTopicsSubscriptionsList + , ProjectsTopicsSubscriptionsList + + -- * Request Lenses + , ptslXgafv + , ptslQuotaUser + , ptslPrettyPrint + , ptslUploadProtocol + , ptslPp + , ptslAccessToken + , ptslUploadType + , ptslTopic + , ptslBearerToken + , ptslKey + , ptslPageToken + , ptslOauthToken + , ptslPageSize + , ptslFields + , ptslCallback + , ptslAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsSubscriptionsList@ which the +-- 'ProjectsTopicsSubscriptionsList' request conforms to. +type ProjectsTopicsSubscriptionsListAPI = + "v1beta2" :> + "{+topic}" :> + "subscriptions" :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListTopicSubscriptionsResponse + +-- | Lists the name of the subscriptions for this topic. +-- +-- /See:/ 'projectsTopicsSubscriptionsList' smart constructor. +data ProjectsTopicsSubscriptionsList = ProjectsTopicsSubscriptionsList + { _ptslXgafv :: !(Maybe Text) + , _ptslQuotaUser :: !(Maybe Text) + , _ptslPrettyPrint :: !Bool + , _ptslUploadProtocol :: !(Maybe Text) + , _ptslPp :: !Bool + , _ptslAccessToken :: !(Maybe Text) + , _ptslUploadType :: !(Maybe Text) + , _ptslTopic :: !Text + , _ptslBearerToken :: !(Maybe Text) + , _ptslKey :: !(Maybe Text) + , _ptslPageToken :: !(Maybe Text) + , _ptslOauthToken :: !(Maybe Text) + , _ptslPageSize :: !(Maybe Int32) + , _ptslFields :: !(Maybe Text) + , _ptslCallback :: !(Maybe Text) + , _ptslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsSubscriptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptslXgafv' +-- +-- * 'ptslQuotaUser' +-- +-- * 'ptslPrettyPrint' +-- +-- * 'ptslUploadProtocol' +-- +-- * 'ptslPp' +-- +-- * 'ptslAccessToken' +-- +-- * 'ptslUploadType' +-- +-- * 'ptslTopic' +-- +-- * 'ptslBearerToken' +-- +-- * 'ptslKey' +-- +-- * 'ptslPageToken' +-- +-- * 'ptslOauthToken' +-- +-- * 'ptslPageSize' +-- +-- * 'ptslFields' +-- +-- * 'ptslCallback' +-- +-- * 'ptslAlt' +projectsTopicsSubscriptionsList + :: Text -- ^ 'topic' + -> ProjectsTopicsSubscriptionsList +projectsTopicsSubscriptionsList pPtslTopic_ = + ProjectsTopicsSubscriptionsList + { _ptslXgafv = Nothing + , _ptslQuotaUser = Nothing + , _ptslPrettyPrint = True + , _ptslUploadProtocol = Nothing + , _ptslPp = True + , _ptslAccessToken = Nothing + , _ptslUploadType = Nothing + , _ptslTopic = pPtslTopic_ + , _ptslBearerToken = Nothing + , _ptslKey = Nothing + , _ptslPageToken = Nothing + , _ptslOauthToken = Nothing + , _ptslPageSize = Nothing + , _ptslFields = Nothing + , _ptslCallback = Nothing + , _ptslAlt = "json" + } + +-- | V1 error format. +ptslXgafv :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslXgafv + = lens _ptslXgafv (\ s a -> s{_ptslXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptslQuotaUser :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslQuotaUser + = lens _ptslQuotaUser + (\ s a -> s{_ptslQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptslPrettyPrint :: Lens' ProjectsTopicsSubscriptionsList' Bool +ptslPrettyPrint + = lens _ptslPrettyPrint + (\ s a -> s{_ptslPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptslUploadProtocol :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslUploadProtocol + = lens _ptslUploadProtocol + (\ s a -> s{_ptslUploadProtocol = a}) + +-- | Pretty-print response. +ptslPp :: Lens' ProjectsTopicsSubscriptionsList' Bool +ptslPp = lens _ptslPp (\ s a -> s{_ptslPp = a}) + +-- | OAuth access token. +ptslAccessToken :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslAccessToken + = lens _ptslAccessToken + (\ s a -> s{_ptslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptslUploadType :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslUploadType + = lens _ptslUploadType + (\ s a -> s{_ptslUploadType = a}) + +-- | The name of the topic that subscriptions are attached to. +ptslTopic :: Lens' ProjectsTopicsSubscriptionsList' Text +ptslTopic + = lens _ptslTopic (\ s a -> s{_ptslTopic = a}) + +-- | OAuth bearer token. +ptslBearerToken :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslBearerToken + = lens _ptslBearerToken + (\ s a -> s{_ptslBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptslKey :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslKey = lens _ptslKey (\ s a -> s{_ptslKey = a}) + +-- | The value returned by the last ListTopicSubscriptionsResponse; indicates +-- that this is a continuation of a prior ListTopicSubscriptions call, and +-- that the system should return the next page of data. +ptslPageToken :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslPageToken + = lens _ptslPageToken + (\ s a -> s{_ptslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ptslOauthToken :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslOauthToken + = lens _ptslOauthToken + (\ s a -> s{_ptslOauthToken = a}) + +-- | Maximum number of subscription names to return. +ptslPageSize :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Int32) +ptslPageSize + = lens _ptslPageSize (\ s a -> s{_ptslPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +ptslFields :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslFields + = lens _ptslFields (\ s a -> s{_ptslFields = a}) + +-- | JSONP +ptslCallback :: Lens' ProjectsTopicsSubscriptionsList' (Maybe Text) +ptslCallback + = lens _ptslCallback (\ s a -> s{_ptslCallback = a}) + +-- | Data format for response. +ptslAlt :: Lens' ProjectsTopicsSubscriptionsList' Text +ptslAlt = lens _ptslAlt (\ s a -> s{_ptslAlt = a}) + +instance GoogleRequest + ProjectsTopicsSubscriptionsList' where + type Rs ProjectsTopicsSubscriptionsList' = + ListTopicSubscriptionsResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsTopicsSubscriptionsList{..} + = go _ptslXgafv _ptslQuotaUser _ptslPrettyPrint + _ptslUploadProtocol + _ptslPp + _ptslAccessToken + _ptslUploadType + _ptslTopic + _ptslBearerToken + _ptslKey + _ptslPageToken + _ptslOauthToken + _ptslPageSize + _ptslFields + _ptslCallback + _ptslAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsSubscriptionsListAPI) + r + u diff --git a/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/TestIAMPermissions.hs b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/TestIAMPermissions.hs new file mode 100644 index 000000000..5a44b79f0 --- /dev/null +++ b/gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/TestIAMPermissions.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.PubSub.Projects.Topics.TestIAMPermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns permissions that a caller has on the specified resource. +-- +-- /See:/ for @PubsubProjectsTopicsTestIAMPermissions@. +module PubSub.Projects.Topics.TestIAMPermissions + ( + -- * REST Resource + ProjectsTopicsTestIAMPermissionsAPI + + -- * Creating a Request + , projectsTopicsTestIAMPermissions + , ProjectsTopicsTestIAMPermissions + + -- * Request Lenses + , pttipXgafv + , pttipQuotaUser + , pttipPrettyPrint + , pttipUploadProtocol + , pttipPp + , pttipAccessToken + , pttipUploadType + , pttipBearerToken + , pttipKey + , pttipResource + , pttipOauthToken + , pttipFields + , pttipCallback + , pttipAlt + ) where + +import Network.Google.Prelude +import Network.Google.PubSub.Types + +-- | A resource alias for @PubsubProjectsTopicsTestIAMPermissions@ which the +-- 'ProjectsTopicsTestIAMPermissions' request conforms to. +type ProjectsTopicsTestIAMPermissionsAPI = + "v1beta2" :> + "{+resource}:testIamPermissions" :> + Post '[JSON] TestIAMPermissionsResponse + +-- | Returns permissions that a caller has on the specified resource. +-- +-- /See:/ 'projectsTopicsTestIAMPermissions' smart constructor. +data ProjectsTopicsTestIAMPermissions = ProjectsTopicsTestIAMPermissions + { _pttipXgafv :: !(Maybe Text) + , _pttipQuotaUser :: !(Maybe Text) + , _pttipPrettyPrint :: !Bool + , _pttipUploadProtocol :: !(Maybe Text) + , _pttipPp :: !Bool + , _pttipAccessToken :: !(Maybe Text) + , _pttipUploadType :: !(Maybe Text) + , _pttipBearerToken :: !(Maybe Text) + , _pttipKey :: !(Maybe Text) + , _pttipResource :: !Text + , _pttipOauthToken :: !(Maybe Text) + , _pttipFields :: !(Maybe Text) + , _pttipCallback :: !(Maybe Text) + , _pttipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTopicsTestIAMPermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pttipXgafv' +-- +-- * 'pttipQuotaUser' +-- +-- * 'pttipPrettyPrint' +-- +-- * 'pttipUploadProtocol' +-- +-- * 'pttipPp' +-- +-- * 'pttipAccessToken' +-- +-- * 'pttipUploadType' +-- +-- * 'pttipBearerToken' +-- +-- * 'pttipKey' +-- +-- * 'pttipResource' +-- +-- * 'pttipOauthToken' +-- +-- * 'pttipFields' +-- +-- * 'pttipCallback' +-- +-- * 'pttipAlt' +projectsTopicsTestIAMPermissions + :: Text -- ^ 'resource' + -> ProjectsTopicsTestIAMPermissions +projectsTopicsTestIAMPermissions pPttipResource_ = + ProjectsTopicsTestIAMPermissions + { _pttipXgafv = Nothing + , _pttipQuotaUser = Nothing + , _pttipPrettyPrint = True + , _pttipUploadProtocol = Nothing + , _pttipPp = True + , _pttipAccessToken = Nothing + , _pttipUploadType = Nothing + , _pttipBearerToken = Nothing + , _pttipKey = Nothing + , _pttipResource = pPttipResource_ + , _pttipOauthToken = Nothing + , _pttipFields = Nothing + , _pttipCallback = Nothing + , _pttipAlt = "json" + } + +-- | V1 error format. +pttipXgafv :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipXgafv + = lens _pttipXgafv (\ s a -> s{_pttipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pttipQuotaUser :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipQuotaUser + = lens _pttipQuotaUser + (\ s a -> s{_pttipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pttipPrettyPrint :: Lens' ProjectsTopicsTestIAMPermissions' Bool +pttipPrettyPrint + = lens _pttipPrettyPrint + (\ s a -> s{_pttipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pttipUploadProtocol :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipUploadProtocol + = lens _pttipUploadProtocol + (\ s a -> s{_pttipUploadProtocol = a}) + +-- | Pretty-print response. +pttipPp :: Lens' ProjectsTopicsTestIAMPermissions' Bool +pttipPp = lens _pttipPp (\ s a -> s{_pttipPp = a}) + +-- | OAuth access token. +pttipAccessToken :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipAccessToken + = lens _pttipAccessToken + (\ s a -> s{_pttipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pttipUploadType :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipUploadType + = lens _pttipUploadType + (\ s a -> s{_pttipUploadType = a}) + +-- | OAuth bearer token. +pttipBearerToken :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipBearerToken + = lens _pttipBearerToken + (\ s a -> s{_pttipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pttipKey :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipKey = lens _pttipKey (\ s a -> s{_pttipKey = a}) + +-- | REQUIRED: The resource for which policy detail is being requested. +-- Resource is usually specified as a path, such as, projects\/{project}. +pttipResource :: Lens' ProjectsTopicsTestIAMPermissions' Text +pttipResource + = lens _pttipResource + (\ s a -> s{_pttipResource = a}) + +-- | OAuth 2.0 token for the current user. +pttipOauthToken :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipOauthToken + = lens _pttipOauthToken + (\ s a -> s{_pttipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pttipFields :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipFields + = lens _pttipFields (\ s a -> s{_pttipFields = a}) + +-- | JSONP +pttipCallback :: Lens' ProjectsTopicsTestIAMPermissions' (Maybe Text) +pttipCallback + = lens _pttipCallback + (\ s a -> s{_pttipCallback = a}) + +-- | Data format for response. +pttipAlt :: Lens' ProjectsTopicsTestIAMPermissions' Text +pttipAlt = lens _pttipAlt (\ s a -> s{_pttipAlt = a}) + +instance GoogleRequest + ProjectsTopicsTestIAMPermissions' where + type Rs ProjectsTopicsTestIAMPermissions' = + TestIAMPermissionsResponse + request = requestWithRoute defReq pubSubURL + requestWithRoute r u + ProjectsTopicsTestIAMPermissions{..} + = go _pttipXgafv _pttipQuotaUser _pttipPrettyPrint + _pttipUploadProtocol + _pttipPp + _pttipAccessToken + _pttipUploadType + _pttipBearerToken + _pttipKey + _pttipResource + _pttipOauthToken + _pttipFields + _pttipCallback + _pttipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTopicsTestIAMPermissionsAPI) + r + u diff --git a/gogol-pubsub/gogol-pubsub.cabal b/gogol-pubsub/gogol-pubsub.cabal new file mode 100644 index 000000000..5f0f09576 --- /dev/null +++ b/gogol-pubsub/gogol-pubsub.cabal @@ -0,0 +1,63 @@ +name: gogol-pubsub +version: 0.0.1 +synopsis: Google Cloud Pub/Sub API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Provides reliable, many-to-many, asynchronous messaging between + applications. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.PubSub + , Network.Google.PubSub.Types + , Network.Google.Resource.PubSub.Projects.Subscriptions.Acknowledge + , Network.Google.Resource.PubSub.Projects.Subscriptions.Create + , Network.Google.Resource.PubSub.Projects.Subscriptions.Delete + , Network.Google.Resource.PubSub.Projects.Subscriptions.Get + , Network.Google.Resource.PubSub.Projects.Subscriptions.GetIAMPolicy + , Network.Google.Resource.PubSub.Projects.Subscriptions.List + , Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyAckDeadline + , Network.Google.Resource.PubSub.Projects.Subscriptions.ModifyPushConfig + , Network.Google.Resource.PubSub.Projects.Subscriptions.Pull + , Network.Google.Resource.PubSub.Projects.Subscriptions.SetIAMPolicy + , Network.Google.Resource.PubSub.Projects.Subscriptions.TestIAMPermissions + , Network.Google.Resource.PubSub.Projects.Topics.Create + , Network.Google.Resource.PubSub.Projects.Topics.Delete + , Network.Google.Resource.PubSub.Projects.Topics.Get + , Network.Google.Resource.PubSub.Projects.Topics.GetIAMPolicy + , Network.Google.Resource.PubSub.Projects.Topics.List + , Network.Google.Resource.PubSub.Projects.Topics.Publish + , Network.Google.Resource.PubSub.Projects.Topics.SetIAMPolicy + , Network.Google.Resource.PubSub.Projects.Topics.Subscriptions.List + , Network.Google.Resource.PubSub.Projects.Topics.TestIAMPermissions + + other-modules: + Network.Google.PubSub.Types.Product + , Network.Google.PubSub.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-pubsub/src/.gitkeep b/gogol-pubsub/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-qpxexpress/LICENSE b/gogol-qpxexpress/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-qpxexpress/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-qpxexpress/Makefile b/gogol-qpxexpress/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-qpxexpress/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-qpxexpress/README.md b/gogol-qpxexpress/README.md new file mode 100644 index 000000000..f21c7222e --- /dev/null +++ b/gogol-qpxexpress/README.md @@ -0,0 +1,28 @@ +# gogol-qpxexpress + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the QPX Express API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-qpxexpress` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-qpxexpress/Setup.hs b/gogol-qpxexpress/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-qpxexpress/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-qpxexpress/gen/Network/Google/QPXExpress.hs b/gogol-qpxexpress/gen/Network/Google/QPXExpress.hs new file mode 100644 index 000000000..d0882d8dc --- /dev/null +++ b/gogol-qpxexpress/gen/Network/Google/QPXExpress.hs @@ -0,0 +1,278 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.QPXExpress +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you find the least expensive flights between an origin and a +-- destination. +-- +-- /See:/ +module Network.Google.QPXExpress + ( + -- * API + QPXExpressAPI + , qPXExpressAPI + , qPXExpressURL + + -- * Service Methods + + -- * REST Resources + + -- ** QpxExpressTripsSearch + , module QPXExpress.Trips.Search + + -- * Types + + -- ** FreeBaggageAllowance + , FreeBaggageAllowance + , freeBaggageAllowance + , fbaKind + , fbaPounds + , fbaBagDescriptor + , fbaKilosPerPiece + , fbaKilos + , fbaPieces + + -- ** CarrierData + , CarrierData + , carrierData + , cdKind + , cdName + , cdCode + + -- ** TripOptionsResponse + , TripOptionsResponse + , tripOptionsResponse + , torRequestId + , torKind + , torData + , torTripOption + + -- ** TimeOfDayRange + , TimeOfDayRange + , timeOfDayRange + , todrKind + , todrLatestTime + , todrEarliestTime + + -- ** Data + , Data + , data' + , dCarrier + , dKind + , dAircraft + , dAirport + , dCity + , dTax + + -- ** AircraftData + , AircraftData + , aircraftData + , adKind + , adName + , adCode + + -- ** LegInfo + , LegInfo + , legInfo + , liDestination + , liOrigin + , liSecure + , liKind + , liAircraft + , liArrivalTime + , liOnTimePerformance + , liOperatingDisclosure + , liMeal + , liId + , liOriginTerminal + , liChangePlane + , liDestinationTerminal + , liConnectionDuration + , liDuration + , liMileage + , liDepartureTime + + -- ** AirportData + , AirportData + , airportData + , aKind + , aName + , aCity + , aCode + + -- ** SegmentPricing + , SegmentPricing + , segmentPricing + , spFreeBaggageOption + , spKind + , spFareId + , spSegmentId + + -- ** SliceInfo + , SliceInfo + , sliceInfo + , siKind + , siSegment + , siDuration + + -- ** TripsSearchResponse + , TripsSearchResponse + , tripsSearchResponse + , tsrTrips + , tsrKind + + -- ** TripOption + , TripOption + , tripOption + , toPricing + , toKind + , toId + , toSlice + , toSaleTotal + + -- ** CityData + , CityData + , cityData + , cCountry + , cKind + , cName + , cCode + + -- ** BagDescriptor + , BagDescriptor + , bagDescriptor + , bdKind + , bdCommercialName + , bdCount + , bdDescription + , bdSubcode + + -- ** PassengerCounts + , PassengerCounts + , passengerCounts + , pcSeniorCount + , pcKind + , pcInfantInLapCount + , pcChildCount + , pcInfantInSeatCount + , pcAdultCount + + -- ** SegmentInfo + , SegmentInfo + , segmentInfo + , sBookingCode + , sCabin + , sBookingCodeCount + , sSubjectToGovernmentApproval + , sKind + , sFlight + , sId + , sMarriedSegmentGroup + , sConnectionDuration + , sDuration + , sLeg + + -- ** TaxData + , TaxData + , taxData + , tdKind + , tdName + , tdId + + -- ** TaxInfo + , TaxInfo + , taxInfo + , tiChargeType + , tiCountry + , tiKind + , tiSalePrice + , tiCode + , tiId + + -- ** TripsSearchRequest + , TripsSearchRequest + , tripsSearchRequest + , tsrRequest + + -- ** PricingInfo + , PricingInfo + , pricingInfo + , piSaleTaxTotal + , piRefundable + , piPtc + , piBaseFareTotal + , piFare + , piKind + , piSegmentPricing + , piPassengers + , piFareCalculation + , piLatestTicketingTime + , piTax + , piSaleTotal + , piSaleFareTotal + + -- ** FlightInfo + , FlightInfo + , flightInfo + , fiCarrier + , fiNumber + + -- ** FareInfo + , FareInfo + , fareInfo + , fCarrier + , fDestination + , fOrigin + , fPrivate + , fKind + , fBasisCode + , fId + + -- ** SliceInput + , SliceInput + , sliceInput + , sliDestination + , sliOrigin + , sliMaxStops + , sliKind + , sliProhibitedCarrier + , sliDate + , sliMaxConnectionDuration + , sliPreferredCabin + , sliPermittedDepartureTime + , sliPermittedCarrier + , sliAlliance + + -- ** TripOptionsRequest + , TripOptionsRequest + , tripOptionsRequest + , torRefundable + , torSaleCountry + , torPassengers + , torSolutions + , torSlice + , torMaxPrice + ) where + +import Network.Google.Prelude +import Network.Google.QPXExpress.Types +import Network.Google.Resource.QPXExpress.Trips.Search + +{- $resources +TODO +-} + +type QPXExpressAPI = Trips + +qPXExpressAPI :: Proxy QPXExpressAPI +qPXExpressAPI = Proxy diff --git a/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types.hs b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types.hs new file mode 100644 index 000000000..678c80730 --- /dev/null +++ b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types.hs @@ -0,0 +1,261 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.QPXExpress.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.QPXExpress.Types + ( + -- * Service URL + qPXExpressURL + + -- * FreeBaggageAllowance + , FreeBaggageAllowance + , freeBaggageAllowance + , fbaKind + , fbaPounds + , fbaBagDescriptor + , fbaKilosPerPiece + , fbaKilos + , fbaPieces + + -- * CarrierData + , CarrierData + , carrierData + , cdKind + , cdName + , cdCode + + -- * TripOptionsResponse + , TripOptionsResponse + , tripOptionsResponse + , torRequestId + , torKind + , torData + , torTripOption + + -- * TimeOfDayRange + , TimeOfDayRange + , timeOfDayRange + , todrKind + , todrLatestTime + , todrEarliestTime + + -- * Data + , Data + , data' + , dCarrier + , dKind + , dAircraft + , dAirport + , dCity + , dTax + + -- * AircraftData + , AircraftData + , aircraftData + , adKind + , adName + , adCode + + -- * LegInfo + , LegInfo + , legInfo + , liDestination + , liOrigin + , liSecure + , liKind + , liAircraft + , liArrivalTime + , liOnTimePerformance + , liOperatingDisclosure + , liMeal + , liId + , liOriginTerminal + , liChangePlane + , liDestinationTerminal + , liConnectionDuration + , liDuration + , liMileage + , liDepartureTime + + -- * AirportData + , AirportData + , airportData + , aKind + , aName + , aCity + , aCode + + -- * SegmentPricing + , SegmentPricing + , segmentPricing + , spFreeBaggageOption + , spKind + , spFareId + , spSegmentId + + -- * SliceInfo + , SliceInfo + , sliceInfo + , siKind + , siSegment + , siDuration + + -- * TripsSearchResponse + , TripsSearchResponse + , tripsSearchResponse + , tsrTrips + , tsrKind + + -- * TripOption + , TripOption + , tripOption + , toPricing + , toKind + , toId + , toSlice + , toSaleTotal + + -- * CityData + , CityData + , cityData + , cCountry + , cKind + , cName + , cCode + + -- * BagDescriptor + , BagDescriptor + , bagDescriptor + , bdKind + , bdCommercialName + , bdCount + , bdDescription + , bdSubcode + + -- * PassengerCounts + , PassengerCounts + , passengerCounts + , pcSeniorCount + , pcKind + , pcInfantInLapCount + , pcChildCount + , pcInfantInSeatCount + , pcAdultCount + + -- * SegmentInfo + , SegmentInfo + , segmentInfo + , sBookingCode + , sCabin + , sBookingCodeCount + , sSubjectToGovernmentApproval + , sKind + , sFlight + , sId + , sMarriedSegmentGroup + , sConnectionDuration + , sDuration + , sLeg + + -- * TaxData + , TaxData + , taxData + , tdKind + , tdName + , tdId + + -- * TaxInfo + , TaxInfo + , taxInfo + , tiChargeType + , tiCountry + , tiKind + , tiSalePrice + , tiCode + , tiId + + -- * TripsSearchRequest + , TripsSearchRequest + , tripsSearchRequest + , tsrRequest + + -- * PricingInfo + , PricingInfo + , pricingInfo + , piSaleTaxTotal + , piRefundable + , piPtc + , piBaseFareTotal + , piFare + , piKind + , piSegmentPricing + , piPassengers + , piFareCalculation + , piLatestTicketingTime + , piTax + , piSaleTotal + , piSaleFareTotal + + -- * FlightInfo + , FlightInfo + , flightInfo + , fiCarrier + , fiNumber + + -- * FareInfo + , FareInfo + , fareInfo + , fCarrier + , fDestination + , fOrigin + , fPrivate + , fKind + , fBasisCode + , fId + + -- * SliceInput + , SliceInput + , sliceInput + , sliDestination + , sliOrigin + , sliMaxStops + , sliKind + , sliProhibitedCarrier + , sliDate + , sliMaxConnectionDuration + , sliPreferredCabin + , sliPermittedDepartureTime + , sliPermittedCarrier + , sliAlliance + + -- * TripOptionsRequest + , TripOptionsRequest + , tripOptionsRequest + , torRefundable + , torSaleCountry + , torPassengers + , torSolutions + , torSlice + , torMaxPrice + ) where + +import Network.Google.Prelude +import Network.Google.QPXExpress.Types.Product +import Network.Google.QPXExpress.Types.Sum + +-- | URL referring to version 'v1' of the QPX Express API. +qPXExpressURL :: BaseURL +qPXExpressURL + = BaseUrl Https + "https://www.googleapis.com/qpxExpress/v1/trips/" + 443 diff --git a/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs new file mode 100644 index 000000000..57bc00f08 --- /dev/null +++ b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs @@ -0,0 +1,2243 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.QPXExpress.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.QPXExpress.Types.Product where + +import Network.Google.Prelude +import Network.Google.QPXExpress.Types.Sum + +-- | Information about free baggage allowed on one segment of a trip. +-- +-- /See:/ 'freeBaggageAllowance' smart constructor. +data FreeBaggageAllowance = FreeBaggageAllowance + { _fbaKind :: !Text + , _fbaPounds :: !(Maybe Int32) + , _fbaBagDescriptor :: !(Maybe [Maybe BagDescriptor]) + , _fbaKilosPerPiece :: !(Maybe Int32) + , _fbaKilos :: !(Maybe Int32) + , _fbaPieces :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FreeBaggageAllowance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fbaKind' +-- +-- * 'fbaPounds' +-- +-- * 'fbaBagDescriptor' +-- +-- * 'fbaKilosPerPiece' +-- +-- * 'fbaKilos' +-- +-- * 'fbaPieces' +freeBaggageAllowance + :: FreeBaggageAllowance +freeBaggageAllowance = + FreeBaggageAllowance + { _fbaKind = "qpxexpress#freeBaggageAllowance" + , _fbaPounds = Nothing + , _fbaBagDescriptor = Nothing + , _fbaKilosPerPiece = Nothing + , _fbaKilos = Nothing + , _fbaPieces = Nothing + } + +-- | Identifies this as free baggage object, allowed on one segment of a +-- trip. Value: the fixed string qpxexpress#freeBaggageAllowance. +fbaKind :: Lens' FreeBaggageAllowance Text +fbaKind = lens _fbaKind (\ s a -> s{_fbaKind = a}) + +-- | The number of pounds of free baggage allowed. +fbaPounds :: Lens' FreeBaggageAllowance (Maybe Int32) +fbaPounds + = lens _fbaPounds (\ s a -> s{_fbaPounds = a}) + +-- | A representation of a type of bag, such as an ATPCo subcode, Commercial +-- Name, or other description. +fbaBagDescriptor :: Lens' FreeBaggageAllowance [Maybe BagDescriptor] +fbaBagDescriptor + = lens _fbaBagDescriptor + (\ s a -> s{_fbaBagDescriptor = a}) + . _Default + . _Coerce + +-- | The maximum number of kilos any one piece of baggage may weigh. +fbaKilosPerPiece :: Lens' FreeBaggageAllowance (Maybe Int32) +fbaKilosPerPiece + = lens _fbaKilosPerPiece + (\ s a -> s{_fbaKilosPerPiece = a}) + +-- | The maximum number of kilos all the free baggage together may weigh. +fbaKilos :: Lens' FreeBaggageAllowance (Maybe Int32) +fbaKilos = lens _fbaKilos (\ s a -> s{_fbaKilos = a}) + +-- | The number of free pieces of baggage allowed. +fbaPieces :: Lens' FreeBaggageAllowance (Maybe Int32) +fbaPieces + = lens _fbaPieces (\ s a -> s{_fbaPieces = a}) + +instance FromJSON FreeBaggageAllowance where + parseJSON + = withObject "FreeBaggageAllowance" + (\ o -> + FreeBaggageAllowance <$> + (o .:? "kind" .!= "qpxexpress#freeBaggageAllowance") + <*> (o .:? "pounds") + <*> (o .:? "bagDescriptor" .!= mempty) + <*> (o .:? "kilosPerPiece") + <*> (o .:? "kilos") + <*> (o .:? "pieces")) + +instance ToJSON FreeBaggageAllowance where + toJSON FreeBaggageAllowance{..} + = object + (catMaybes + [Just ("kind" .= _fbaKind), + ("pounds" .=) <$> _fbaPounds, + ("bagDescriptor" .=) <$> _fbaBagDescriptor, + ("kilosPerPiece" .=) <$> _fbaKilosPerPiece, + ("kilos" .=) <$> _fbaKilos, + ("pieces" .=) <$> _fbaPieces]) + +-- | Information about a carrier (ie. an airline, bus line, railroad, etc) +-- that might be useful to display to an end-user. +-- +-- /See:/ 'carrierData' smart constructor. +data CarrierData = CarrierData + { _cdKind :: !Text + , _cdName :: !(Maybe Text) + , _cdCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CarrierData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdKind' +-- +-- * 'cdName' +-- +-- * 'cdCode' +carrierData + :: CarrierData +carrierData = + CarrierData + { _cdKind = "qpxexpress#carrierData" + , _cdName = Nothing + , _cdCode = Nothing + } + +-- | Identifies this as a kind of carrier (ie. an airline, bus line, +-- railroad, etc). Value: the fixed string qpxexpress#carrierData. +cdKind :: Lens' CarrierData Text +cdKind = lens _cdKind (\ s a -> s{_cdKind = a}) + +-- | The long, full name of a carrier. For example: American Airlines. +cdName :: Lens' CarrierData (Maybe Text) +cdName = lens _cdName (\ s a -> s{_cdName = a}) + +-- | The IATA designator of a carrier (airline, etc). For example, for +-- American Airlines, the code is AA. +cdCode :: Lens' CarrierData (Maybe Text) +cdCode = lens _cdCode (\ s a -> s{_cdCode = a}) + +instance FromJSON CarrierData where + parseJSON + = withObject "CarrierData" + (\ o -> + CarrierData <$> + (o .:? "kind" .!= "qpxexpress#carrierData") <*> + (o .:? "name") + <*> (o .:? "code")) + +instance ToJSON CarrierData where + toJSON CarrierData{..} + = object + (catMaybes + [Just ("kind" .= _cdKind), ("name" .=) <$> _cdName, + ("code" .=) <$> _cdCode]) + +-- | A QPX Express search response. +-- +-- /See:/ 'tripOptionsResponse' smart constructor. +data TripOptionsResponse = TripOptionsResponse + { _torRequestId :: !(Maybe Text) + , _torKind :: !Text + , _torData :: !(Maybe (Maybe Data)) + , _torTripOption :: !(Maybe [Maybe TripOption]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripOptionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'torRequestId' +-- +-- * 'torKind' +-- +-- * 'torData' +-- +-- * 'torTripOption' +tripOptionsResponse + :: TripOptionsResponse +tripOptionsResponse = + TripOptionsResponse + { _torRequestId = Nothing + , _torKind = "qpxexpress#tripOptions" + , _torData = Nothing + , _torTripOption = Nothing + } + +-- | An identifier uniquely identifying this response. +torRequestId :: Lens' TripOptionsResponse (Maybe Text) +torRequestId + = lens _torRequestId (\ s a -> s{_torRequestId = a}) + +-- | Identifies this as a QPX Express trip response object, which consists of +-- zero or more solutions. Value: the fixed string qpxexpress#tripOptions. +torKind :: Lens' TripOptionsResponse Text +torKind = lens _torKind (\ s a -> s{_torKind = a}) + +-- | Informational data global to list of solutions. +torData :: Lens' TripOptionsResponse (Maybe (Maybe Data)) +torData = lens _torData (\ s a -> s{_torData = a}) + +-- | A list of priced itinerary solutions to the QPX Express query. +torTripOption :: Lens' TripOptionsResponse [Maybe TripOption] +torTripOption + = lens _torTripOption + (\ s a -> s{_torTripOption = a}) + . _Default + . _Coerce + +instance FromJSON TripOptionsResponse where + parseJSON + = withObject "TripOptionsResponse" + (\ o -> + TripOptionsResponse <$> + (o .:? "requestId") <*> + (o .:? "kind" .!= "qpxexpress#tripOptions") + <*> (o .:? "data") + <*> (o .:? "tripOption" .!= mempty)) + +instance ToJSON TripOptionsResponse where + toJSON TripOptionsResponse{..} + = object + (catMaybes + [("requestId" .=) <$> _torRequestId, + Just ("kind" .= _torKind), ("data" .=) <$> _torData, + ("tripOption" .=) <$> _torTripOption]) + +-- | Two times in a single day defining a time range. +-- +-- /See:/ 'timeOfDayRange' smart constructor. +data TimeOfDayRange = TimeOfDayRange + { _todrKind :: !Text + , _todrLatestTime :: !(Maybe Text) + , _todrEarliestTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeOfDayRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'todrKind' +-- +-- * 'todrLatestTime' +-- +-- * 'todrEarliestTime' +timeOfDayRange + :: TimeOfDayRange +timeOfDayRange = + TimeOfDayRange + { _todrKind = "qpxexpress#timeOfDayRange" + , _todrLatestTime = Nothing + , _todrEarliestTime = Nothing + } + +-- | Identifies this as a time of day range object, representing two times in +-- a single day defining a time range. Value: the fixed string +-- qpxexpress#timeOfDayRange. +todrKind :: Lens' TimeOfDayRange Text +todrKind = lens _todrKind (\ s a -> s{_todrKind = a}) + +-- | The latest time of day in HH:MM format. +todrLatestTime :: Lens' TimeOfDayRange (Maybe Text) +todrLatestTime + = lens _todrLatestTime + (\ s a -> s{_todrLatestTime = a}) + +-- | The earliest time of day in HH:MM format. +todrEarliestTime :: Lens' TimeOfDayRange (Maybe Text) +todrEarliestTime + = lens _todrEarliestTime + (\ s a -> s{_todrEarliestTime = a}) + +instance FromJSON TimeOfDayRange where + parseJSON + = withObject "TimeOfDayRange" + (\ o -> + TimeOfDayRange <$> + (o .:? "kind" .!= "qpxexpress#timeOfDayRange") <*> + (o .:? "latestTime") + <*> (o .:? "earliestTime")) + +instance ToJSON TimeOfDayRange where + toJSON TimeOfDayRange{..} + = object + (catMaybes + [Just ("kind" .= _todrKind), + ("latestTime" .=) <$> _todrLatestTime, + ("earliestTime" .=) <$> _todrEarliestTime]) + +-- | Detailed information about components found in the solutions of this +-- response, including a trip\'s airport, city, taxes, airline, and +-- aircraft. +-- +-- /See:/ 'data'' smart constructor. +data Data = Data + { _dCarrier :: !(Maybe [Maybe CarrierData]) + , _dKind :: !Text + , _dAircraft :: !(Maybe [Maybe AircraftData]) + , _dAirport :: !(Maybe [Maybe AirportData]) + , _dCity :: !(Maybe [Maybe CityData]) + , _dTax :: !(Maybe [Maybe TaxData]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Data' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dCarrier' +-- +-- * 'dKind' +-- +-- * 'dAircraft' +-- +-- * 'dAirport' +-- +-- * 'dCity' +-- +-- * 'dTax' +data' + :: Data +data' = + Data + { _dCarrier = Nothing + , _dKind = "qpxexpress#data" + , _dAircraft = Nothing + , _dAirport = Nothing + , _dCity = Nothing + , _dTax = Nothing + } + +-- | The airline carrier of the aircraft flying between an origin and +-- destination. Allowed values are IATA carrier codes. +dCarrier :: Lens' Data [Maybe CarrierData] +dCarrier + = lens _dCarrier (\ s a -> s{_dCarrier = a}) . + _Default + . _Coerce + +-- | Identifies this as QPX Express response resource, including a trip\'s +-- airport, city, taxes, airline, and aircraft. Value: the fixed string +-- qpxexpress#data. +dKind :: Lens' Data Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | The aircraft that is flying between an origin and destination. +dAircraft :: Lens' Data [Maybe AircraftData] +dAircraft + = lens _dAircraft (\ s a -> s{_dAircraft = a}) . + _Default + . _Coerce + +-- | The airport of an origin or destination. +dAirport :: Lens' Data [Maybe AirportData] +dAirport + = lens _dAirport (\ s a -> s{_dAirport = a}) . + _Default + . _Coerce + +-- | The city that is either the origin or destination of part of a trip. +dCity :: Lens' Data [Maybe CityData] +dCity + = lens _dCity (\ s a -> s{_dCity = a}) . _Default . + _Coerce + +-- | The taxes due for flying between an origin and a destination. +dTax :: Lens' Data [Maybe TaxData] +dTax + = lens _dTax (\ s a -> s{_dTax = a}) . _Default . + _Coerce + +instance FromJSON Data where + parseJSON + = withObject "Data" + (\ o -> + Data <$> + (o .:? "carrier" .!= mempty) <*> + (o .:? "kind" .!= "qpxexpress#data") + <*> (o .:? "aircraft" .!= mempty) + <*> (o .:? "airport" .!= mempty) + <*> (o .:? "city" .!= mempty) + <*> (o .:? "tax" .!= mempty)) + +instance ToJSON Data where + toJSON Data{..} + = object + (catMaybes + [("carrier" .=) <$> _dCarrier, + Just ("kind" .= _dKind), + ("aircraft" .=) <$> _dAircraft, + ("airport" .=) <$> _dAirport, ("city" .=) <$> _dCity, + ("tax" .=) <$> _dTax]) + +-- | The make, model, and type of an aircraft. +-- +-- /See:/ 'aircraftData' smart constructor. +data AircraftData = AircraftData + { _adKind :: !Text + , _adName :: !(Maybe Text) + , _adCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AircraftData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'adKind' +-- +-- * 'adName' +-- +-- * 'adCode' +aircraftData + :: AircraftData +aircraftData = + AircraftData + { _adKind = "qpxexpress#aircraftData" + , _adName = Nothing + , _adCode = Nothing + } + +-- | Identifies this as an aircraftData object. Value: the fixed string +-- qpxexpress#aircraftData +adKind :: Lens' AircraftData Text +adKind = lens _adKind (\ s a -> s{_adKind = a}) + +-- | The name of an aircraft, for example Boeing 777. +adName :: Lens' AircraftData (Maybe Text) +adName = lens _adName (\ s a -> s{_adName = a}) + +-- | The aircraft code. For example, for a Boeing 777 the code would be 777. +adCode :: Lens' AircraftData (Maybe Text) +adCode = lens _adCode (\ s a -> s{_adCode = a}) + +instance FromJSON AircraftData where + parseJSON + = withObject "AircraftData" + (\ o -> + AircraftData <$> + (o .:? "kind" .!= "qpxexpress#aircraftData") <*> + (o .:? "name") + <*> (o .:? "code")) + +instance ToJSON AircraftData where + toJSON AircraftData{..} + = object + (catMaybes + [Just ("kind" .= _adKind), ("name" .=) <$> _adName, + ("code" .=) <$> _adCode]) + +-- | Information about a leg. (A leg is the smallest unit of travel, in the +-- case of a flight a takeoff immediately followed by a landing at two set +-- points on a particular carrier with a particular flight number.) +-- +-- /See:/ 'legInfo' smart constructor. +data LegInfo = LegInfo + { _liDestination :: !(Maybe Text) + , _liOrigin :: !(Maybe Text) + , _liSecure :: !(Maybe Bool) + , _liKind :: !Text + , _liAircraft :: !(Maybe Text) + , _liArrivalTime :: !(Maybe Text) + , _liOnTimePerformance :: !(Maybe Int32) + , _liOperatingDisclosure :: !(Maybe Text) + , _liMeal :: !(Maybe Text) + , _liId :: !(Maybe Text) + , _liOriginTerminal :: !(Maybe Text) + , _liChangePlane :: !(Maybe Bool) + , _liDestinationTerminal :: !(Maybe Text) + , _liConnectionDuration :: !(Maybe Int32) + , _liDuration :: !(Maybe Int32) + , _liMileage :: !(Maybe Int32) + , _liDepartureTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LegInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'liDestination' +-- +-- * 'liOrigin' +-- +-- * 'liSecure' +-- +-- * 'liKind' +-- +-- * 'liAircraft' +-- +-- * 'liArrivalTime' +-- +-- * 'liOnTimePerformance' +-- +-- * 'liOperatingDisclosure' +-- +-- * 'liMeal' +-- +-- * 'liId' +-- +-- * 'liOriginTerminal' +-- +-- * 'liChangePlane' +-- +-- * 'liDestinationTerminal' +-- +-- * 'liConnectionDuration' +-- +-- * 'liDuration' +-- +-- * 'liMileage' +-- +-- * 'liDepartureTime' +legInfo + :: LegInfo +legInfo = + LegInfo + { _liDestination = Nothing + , _liOrigin = Nothing + , _liSecure = Nothing + , _liKind = "qpxexpress#legInfo" + , _liAircraft = Nothing + , _liArrivalTime = Nothing + , _liOnTimePerformance = Nothing + , _liOperatingDisclosure = Nothing + , _liMeal = Nothing + , _liId = Nothing + , _liOriginTerminal = Nothing + , _liChangePlane = Nothing + , _liDestinationTerminal = Nothing + , _liConnectionDuration = Nothing + , _liDuration = Nothing + , _liMileage = Nothing + , _liDepartureTime = Nothing + } + +-- | The leg destination as a city and airport. +liDestination :: Lens' LegInfo (Maybe Text) +liDestination + = lens _liDestination + (\ s a -> s{_liDestination = a}) + +-- | The leg origin as a city and airport. +liOrigin :: Lens' LegInfo (Maybe Text) +liOrigin = lens _liOrigin (\ s a -> s{_liOrigin = a}) + +-- | Whether passenger information must be furnished to the United States +-- Transportation Security Administration (TSA) prior to departure. +liSecure :: Lens' LegInfo (Maybe Bool) +liSecure = lens _liSecure (\ s a -> s{_liSecure = a}) + +-- | Identifies this as a leg object. A leg is the smallest unit of travel, +-- in the case of a flight a takeoff immediately followed by a landing at +-- two set points on a particular carrier with a particular flight number. +-- Value: the fixed string qpxexpress#legInfo. +liKind :: Lens' LegInfo Text +liKind = lens _liKind (\ s a -> s{_liKind = a}) + +-- | The aircraft (or bus, ferry, railcar, etc) travelling between the two +-- points of this leg. +liAircraft :: Lens' LegInfo (Maybe Text) +liAircraft + = lens _liAircraft (\ s a -> s{_liAircraft = a}) + +-- | The scheduled time of arrival at the destination of the leg, local to +-- the point of arrival. +liArrivalTime :: Lens' LegInfo (Maybe Text) +liArrivalTime + = lens _liArrivalTime + (\ s a -> s{_liArrivalTime = a}) + +-- | In percent, the published on time performance on this leg. +liOnTimePerformance :: Lens' LegInfo (Maybe Int32) +liOnTimePerformance + = lens _liOnTimePerformance + (\ s a -> s{_liOnTimePerformance = a}) + +-- | Department of Transportation disclosure information on the actual +-- operator of a flight in a code share. (A code share refers to a +-- marketing agreement between two carriers, where one carrier will list in +-- its schedules (and take bookings for) flights that are actually operated +-- by another carrier.) +liOperatingDisclosure :: Lens' LegInfo (Maybe Text) +liOperatingDisclosure + = lens _liOperatingDisclosure + (\ s a -> s{_liOperatingDisclosure = a}) + +-- | A simple, general description of the meal(s) served on the flight, for +-- example: \"Hot meal\". +liMeal :: Lens' LegInfo (Maybe Text) +liMeal = lens _liMeal (\ s a -> s{_liMeal = a}) + +-- | An identifier that uniquely identifies this leg in the solution. +liId :: Lens' LegInfo (Maybe Text) +liId = lens _liId (\ s a -> s{_liId = a}) + +-- | The terminal the flight is scheduled to depart from. +liOriginTerminal :: Lens' LegInfo (Maybe Text) +liOriginTerminal + = lens _liOriginTerminal + (\ s a -> s{_liOriginTerminal = a}) + +-- | Whether you have to change planes following this leg. Only applies to +-- the next leg. +liChangePlane :: Lens' LegInfo (Maybe Bool) +liChangePlane + = lens _liChangePlane + (\ s a -> s{_liChangePlane = a}) + +-- | The terminal the flight is scheduled to arrive at. +liDestinationTerminal :: Lens' LegInfo (Maybe Text) +liDestinationTerminal + = lens _liDestinationTerminal + (\ s a -> s{_liDestinationTerminal = a}) + +-- | Duration of a connection following this leg, in minutes. +liConnectionDuration :: Lens' LegInfo (Maybe Int32) +liConnectionDuration + = lens _liConnectionDuration + (\ s a -> s{_liConnectionDuration = a}) + +-- | The scheduled travelling time from the origin to the destination. +liDuration :: Lens' LegInfo (Maybe Int32) +liDuration + = lens _liDuration (\ s a -> s{_liDuration = a}) + +-- | The number of miles in this leg. +liMileage :: Lens' LegInfo (Maybe Int32) +liMileage + = lens _liMileage (\ s a -> s{_liMileage = a}) + +-- | The scheduled departure time of the leg, local to the point of +-- departure. +liDepartureTime :: Lens' LegInfo (Maybe Text) +liDepartureTime + = lens _liDepartureTime + (\ s a -> s{_liDepartureTime = a}) + +instance FromJSON LegInfo where + parseJSON + = withObject "LegInfo" + (\ o -> + LegInfo <$> + (o .:? "destination") <*> (o .:? "origin") <*> + (o .:? "secure") + <*> (o .:? "kind" .!= "qpxexpress#legInfo") + <*> (o .:? "aircraft") + <*> (o .:? "arrivalTime") + <*> (o .:? "onTimePerformance") + <*> (o .:? "operatingDisclosure") + <*> (o .:? "meal") + <*> (o .:? "id") + <*> (o .:? "originTerminal") + <*> (o .:? "changePlane") + <*> (o .:? "destinationTerminal") + <*> (o .:? "connectionDuration") + <*> (o .:? "duration") + <*> (o .:? "mileage") + <*> (o .:? "departureTime")) + +instance ToJSON LegInfo where + toJSON LegInfo{..} + = object + (catMaybes + [("destination" .=) <$> _liDestination, + ("origin" .=) <$> _liOrigin, + ("secure" .=) <$> _liSecure, + Just ("kind" .= _liKind), + ("aircraft" .=) <$> _liAircraft, + ("arrivalTime" .=) <$> _liArrivalTime, + ("onTimePerformance" .=) <$> _liOnTimePerformance, + ("operatingDisclosure" .=) <$> + _liOperatingDisclosure, + ("meal" .=) <$> _liMeal, ("id" .=) <$> _liId, + ("originTerminal" .=) <$> _liOriginTerminal, + ("changePlane" .=) <$> _liChangePlane, + ("destinationTerminal" .=) <$> + _liDestinationTerminal, + ("connectionDuration" .=) <$> _liConnectionDuration, + ("duration" .=) <$> _liDuration, + ("mileage" .=) <$> _liMileage, + ("departureTime" .=) <$> _liDepartureTime]) + +-- | An airport. +-- +-- /See:/ 'airportData' smart constructor. +data AirportData = AirportData + { _aKind :: !Text + , _aName :: !(Maybe Text) + , _aCity :: !(Maybe Text) + , _aCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AirportData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aKind' +-- +-- * 'aName' +-- +-- * 'aCity' +-- +-- * 'aCode' +airportData + :: AirportData +airportData = + AirportData + { _aKind = "qpxexpress#airportData" + , _aName = Nothing + , _aCity = Nothing + , _aCode = Nothing + } + +-- | Identifies this as an airport object. Value: the fixed string +-- qpxexpress#airportData. +aKind :: Lens' AirportData Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The name of an airport. For example, for airport BOS the name is +-- \"Boston Logan International\". +aName :: Lens' AirportData (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +-- | The city code an airport is located in. For example, for JFK airport, +-- this is NYC. +aCity :: Lens' AirportData (Maybe Text) +aCity = lens _aCity (\ s a -> s{_aCity = a}) + +-- | An airport\'s code. For example, for Boston Logan airport, this is BOS. +aCode :: Lens' AirportData (Maybe Text) +aCode = lens _aCode (\ s a -> s{_aCode = a}) + +instance FromJSON AirportData where + parseJSON + = withObject "AirportData" + (\ o -> + AirportData <$> + (o .:? "kind" .!= "qpxexpress#airportData") <*> + (o .:? "name") + <*> (o .:? "city") + <*> (o .:? "code")) + +instance ToJSON AirportData where + toJSON AirportData{..} + = object + (catMaybes + [Just ("kind" .= _aKind), ("name" .=) <$> _aName, + ("city" .=) <$> _aCity, ("code" .=) <$> _aCode]) + +-- | The price of this segment. +-- +-- /See:/ 'segmentPricing' smart constructor. +data SegmentPricing = SegmentPricing + { _spFreeBaggageOption :: !(Maybe [Maybe FreeBaggageAllowance]) + , _spKind :: !Text + , _spFareId :: !(Maybe Text) + , _spSegmentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SegmentPricing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'spFreeBaggageOption' +-- +-- * 'spKind' +-- +-- * 'spFareId' +-- +-- * 'spSegmentId' +segmentPricing + :: SegmentPricing +segmentPricing = + SegmentPricing + { _spFreeBaggageOption = Nothing + , _spKind = "qpxexpress#segmentPricing" + , _spFareId = Nothing + , _spSegmentId = Nothing + } + +-- | Details of the free baggage allowance on this segment. +spFreeBaggageOption :: Lens' SegmentPricing [Maybe FreeBaggageAllowance] +spFreeBaggageOption + = lens _spFreeBaggageOption + (\ s a -> s{_spFreeBaggageOption = a}) + . _Default + . _Coerce + +-- | Identifies this as a segment pricing object, representing the price of +-- this segment. Value: the fixed string qpxexpress#segmentPricing. +spKind :: Lens' SegmentPricing Text +spKind = lens _spKind (\ s a -> s{_spKind = a}) + +-- | A segment identifier unique within a single solution. It is used to +-- refer to different parts of the same solution. +spFareId :: Lens' SegmentPricing (Maybe Text) +spFareId = lens _spFareId (\ s a -> s{_spFareId = a}) + +-- | Unique identifier in the response of this segment. +spSegmentId :: Lens' SegmentPricing (Maybe Text) +spSegmentId + = lens _spSegmentId (\ s a -> s{_spSegmentId = a}) + +instance FromJSON SegmentPricing where + parseJSON + = withObject "SegmentPricing" + (\ o -> + SegmentPricing <$> + (o .:? "freeBaggageOption" .!= mempty) <*> + (o .:? "kind" .!= "qpxexpress#segmentPricing") + <*> (o .:? "fareId") + <*> (o .:? "segmentId")) + +instance ToJSON SegmentPricing where + toJSON SegmentPricing{..} + = object + (catMaybes + [("freeBaggageOption" .=) <$> _spFreeBaggageOption, + Just ("kind" .= _spKind), + ("fareId" .=) <$> _spFareId, + ("segmentId" .=) <$> _spSegmentId]) + +-- | Information about a slice. A slice represents a traveller\'s intent, the +-- portion of a low-fare search corresponding to a traveler\'s request to +-- get between two points. One-way journeys are generally expressed using 1 +-- slice, round-trips using 2. For example, if a traveler specifies the +-- following trip in a user interface: | Origin | Destination | Departure +-- Date | | BOS | LAX | March 10, 2007 | | LAX | SYD | March 17, 2007 | | +-- SYD | BOS | March 22, 2007 | then this is a three slice trip. +-- +-- /See:/ 'sliceInfo' smart constructor. +data SliceInfo = SliceInfo + { _siKind :: !Text + , _siSegment :: !(Maybe [Maybe SegmentInfo]) + , _siDuration :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SliceInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siKind' +-- +-- * 'siSegment' +-- +-- * 'siDuration' +sliceInfo + :: SliceInfo +sliceInfo = + SliceInfo + { _siKind = "qpxexpress#sliceInfo" + , _siSegment = Nothing + , _siDuration = Nothing + } + +-- | Identifies this as a slice object. A slice represents a traveller\'s +-- intent, the portion of a low-fare search corresponding to a traveler\'s +-- request to get between two points. One-way journeys are generally +-- expressed using 1 slice, round-trips using 2. Value: the fixed string +-- qpxexpress#sliceInfo. +siKind :: Lens' SliceInfo Text +siKind = lens _siKind (\ s a -> s{_siKind = a}) + +-- | The segment(s) constituting the slice. +siSegment :: Lens' SliceInfo [Maybe SegmentInfo] +siSegment + = lens _siSegment (\ s a -> s{_siSegment = a}) . + _Default + . _Coerce + +-- | The duration of the slice in minutes. +siDuration :: Lens' SliceInfo (Maybe Int32) +siDuration + = lens _siDuration (\ s a -> s{_siDuration = a}) + +instance FromJSON SliceInfo where + parseJSON + = withObject "SliceInfo" + (\ o -> + SliceInfo <$> + (o .:? "kind" .!= "qpxexpress#sliceInfo") <*> + (o .:? "segment" .!= mempty) + <*> (o .:? "duration")) + +instance ToJSON SliceInfo where + toJSON SliceInfo{..} + = object + (catMaybes + [Just ("kind" .= _siKind), + ("segment" .=) <$> _siSegment, + ("duration" .=) <$> _siDuration]) + +-- | A QPX Express search response. +-- +-- /See:/ 'tripsSearchResponse' smart constructor. +data TripsSearchResponse = TripsSearchResponse + { _tsrTrips :: !(Maybe (Maybe TripOptionsResponse)) + , _tsrKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripsSearchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsrTrips' +-- +-- * 'tsrKind' +tripsSearchResponse + :: TripsSearchResponse +tripsSearchResponse = + TripsSearchResponse + { _tsrTrips = Nothing + , _tsrKind = "qpxExpress#tripsSearch" + } + +-- | All possible solutions to the QPX Express search request. +tsrTrips :: Lens' TripsSearchResponse (Maybe (Maybe TripOptionsResponse)) +tsrTrips = lens _tsrTrips (\ s a -> s{_tsrTrips = a}) + +-- | Identifies this as a QPX Express API search response resource. Value: +-- the fixed string qpxExpress#tripsSearch. +tsrKind :: Lens' TripsSearchResponse Text +tsrKind = lens _tsrKind (\ s a -> s{_tsrKind = a}) + +instance FromJSON TripsSearchResponse where + parseJSON + = withObject "TripsSearchResponse" + (\ o -> + TripsSearchResponse <$> + (o .:? "trips") <*> + (o .:? "kind" .!= "qpxExpress#tripsSearch")) + +instance ToJSON TripsSearchResponse where + toJSON TripsSearchResponse{..} + = object + (catMaybes + [("trips" .=) <$> _tsrTrips, + Just ("kind" .= _tsrKind)]) + +-- | Trip information. +-- +-- /See:/ 'tripOption' smart constructor. +data TripOption = TripOption + { _toPricing :: !(Maybe [Maybe PricingInfo]) + , _toKind :: !Text + , _toId :: !(Maybe Text) + , _toSlice :: !(Maybe [Maybe SliceInfo]) + , _toSaleTotal :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripOption' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'toPricing' +-- +-- * 'toKind' +-- +-- * 'toId' +-- +-- * 'toSlice' +-- +-- * 'toSaleTotal' +tripOption + :: TripOption +tripOption = + TripOption + { _toPricing = Nothing + , _toKind = "qpxexpress#tripOption" + , _toId = Nothing + , _toSlice = Nothing + , _toSaleTotal = Nothing + } + +-- | Per passenger pricing information. +toPricing :: Lens' TripOption [Maybe PricingInfo] +toPricing + = lens _toPricing (\ s a -> s{_toPricing = a}) . + _Default + . _Coerce + +-- | Identifies this as a trip information object. Value: the fixed string +-- qpxexpress#tripOption. +toKind :: Lens' TripOption Text +toKind = lens _toKind (\ s a -> s{_toKind = a}) + +-- | Identifier uniquely identifying this trip in a response. +toId :: Lens' TripOption (Maybe Text) +toId = lens _toId (\ s a -> s{_toId = a}) + +-- | The slices that make up this trip\'s itinerary. +toSlice :: Lens' TripOption [Maybe SliceInfo] +toSlice + = lens _toSlice (\ s a -> s{_toSlice = a}) . _Default + . _Coerce + +-- | The total price for all passengers on the trip, in the form of a +-- currency followed by an amount, e.g. USD253.35. +toSaleTotal :: Lens' TripOption (Maybe Text) +toSaleTotal + = lens _toSaleTotal (\ s a -> s{_toSaleTotal = a}) + +instance FromJSON TripOption where + parseJSON + = withObject "TripOption" + (\ o -> + TripOption <$> + (o .:? "pricing" .!= mempty) <*> + (o .:? "kind" .!= "qpxexpress#tripOption") + <*> (o .:? "id") + <*> (o .:? "slice" .!= mempty) + <*> (o .:? "saleTotal")) + +instance ToJSON TripOption where + toJSON TripOption{..} + = object + (catMaybes + [("pricing" .=) <$> _toPricing, + Just ("kind" .= _toKind), ("id" .=) <$> _toId, + ("slice" .=) <$> _toSlice, + ("saleTotal" .=) <$> _toSaleTotal]) + +-- | Information about a city that might be useful to an end-user; typically +-- the city of an airport. +-- +-- /See:/ 'cityData' smart constructor. +data CityData = CityData + { _cCountry :: !(Maybe Text) + , _cKind :: !Text + , _cName :: !(Maybe Text) + , _cCode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CityData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cCountry' +-- +-- * 'cKind' +-- +-- * 'cName' +-- +-- * 'cCode' +cityData + :: CityData +cityData = + CityData + { _cCountry = Nothing + , _cKind = "qpxexpress#cityData" + , _cName = Nothing + , _cCode = Nothing + } + +-- | The two-character country code of the country the city is located in. +-- For example, US for the United States of America. +cCountry :: Lens' CityData (Maybe Text) +cCountry = lens _cCountry (\ s a -> s{_cCountry = a}) + +-- | Identifies this as a city, typically with one or more airports. Value: +-- the fixed string qpxexpress#cityData. +cKind :: Lens' CityData Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The full name of a city. An example would be: New York. +cName :: Lens' CityData (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | The IATA character ID of a city. For example, for Boston this is BOS. +cCode :: Lens' CityData (Maybe Text) +cCode = lens _cCode (\ s a -> s{_cCode = a}) + +instance FromJSON CityData where + parseJSON + = withObject "CityData" + (\ o -> + CityData <$> + (o .:? "country") <*> + (o .:? "kind" .!= "qpxexpress#cityData") + <*> (o .:? "name") + <*> (o .:? "code")) + +instance ToJSON CityData where + toJSON CityData{..} + = object + (catMaybes + [("country" .=) <$> _cCountry, + Just ("kind" .= _cKind), ("name" .=) <$> _cName, + ("code" .=) <$> _cCode]) + +-- | Information about an item of baggage. +-- +-- /See:/ 'bagDescriptor' smart constructor. +data BagDescriptor = BagDescriptor + { _bdKind :: !Text + , _bdCommercialName :: !(Maybe Text) + , _bdCount :: !(Maybe Int32) + , _bdDescription :: !(Maybe [Text]) + , _bdSubcode :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BagDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bdKind' +-- +-- * 'bdCommercialName' +-- +-- * 'bdCount' +-- +-- * 'bdDescription' +-- +-- * 'bdSubcode' +bagDescriptor + :: BagDescriptor +bagDescriptor = + BagDescriptor + { _bdKind = "qpxexpress#bagDescriptor" + , _bdCommercialName = Nothing + , _bdCount = Nothing + , _bdDescription = Nothing + , _bdSubcode = Nothing + } + +-- | Identifies this as a baggage object. Value: the fixed string +-- qpxexpress#bagDescriptor. +bdKind :: Lens' BagDescriptor Text +bdKind = lens _bdKind (\ s a -> s{_bdKind = a}) + +-- | Provides the commercial name for an optional service. +bdCommercialName :: Lens' BagDescriptor (Maybe Text) +bdCommercialName + = lens _bdCommercialName + (\ s a -> s{_bdCommercialName = a}) + +-- | How many of this type of bag will be checked on this flight. +bdCount :: Lens' BagDescriptor (Maybe Int32) +bdCount = lens _bdCount (\ s a -> s{_bdCount = a}) + +-- | A description of the baggage. +bdDescription :: Lens' BagDescriptor [Text] +bdDescription + = lens _bdDescription + (\ s a -> s{_bdDescription = a}) + . _Default + . _Coerce + +-- | The standard IATA subcode used to identify this optional service. +bdSubcode :: Lens' BagDescriptor (Maybe Text) +bdSubcode + = lens _bdSubcode (\ s a -> s{_bdSubcode = a}) + +instance FromJSON BagDescriptor where + parseJSON + = withObject "BagDescriptor" + (\ o -> + BagDescriptor <$> + (o .:? "kind" .!= "qpxexpress#bagDescriptor") <*> + (o .:? "commercialName") + <*> (o .:? "count") + <*> (o .:? "description" .!= mempty) + <*> (o .:? "subcode")) + +instance ToJSON BagDescriptor where + toJSON BagDescriptor{..} + = object + (catMaybes + [Just ("kind" .= _bdKind), + ("commercialName" .=) <$> _bdCommercialName, + ("count" .=) <$> _bdCount, + ("description" .=) <$> _bdDescription, + ("subcode" .=) <$> _bdSubcode]) + +-- | The number and type of passengers. Unfortunately the definition of an +-- infant, child, adult, and senior citizen varies across carriers and +-- reservation systems. +-- +-- /See:/ 'passengerCounts' smart constructor. +data PassengerCounts = PassengerCounts + { _pcSeniorCount :: !(Maybe Int32) + , _pcKind :: !Text + , _pcInfantInLapCount :: !(Maybe Int32) + , _pcChildCount :: !(Maybe Int32) + , _pcInfantInSeatCount :: !(Maybe Int32) + , _pcAdultCount :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PassengerCounts' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcSeniorCount' +-- +-- * 'pcKind' +-- +-- * 'pcInfantInLapCount' +-- +-- * 'pcChildCount' +-- +-- * 'pcInfantInSeatCount' +-- +-- * 'pcAdultCount' +passengerCounts + :: PassengerCounts +passengerCounts = + PassengerCounts + { _pcSeniorCount = Nothing + , _pcKind = "qpxexpress#passengerCounts" + , _pcInfantInLapCount = Nothing + , _pcChildCount = Nothing + , _pcInfantInSeatCount = Nothing + , _pcAdultCount = Nothing + } + +-- | The number of passengers that are senior citizens. +pcSeniorCount :: Lens' PassengerCounts (Maybe Int32) +pcSeniorCount + = lens _pcSeniorCount + (\ s a -> s{_pcSeniorCount = a}) + +-- | Identifies this as a passenger count object, representing the number of +-- passengers. Value: the fixed string qpxexpress#passengerCounts. +pcKind :: Lens' PassengerCounts Text +pcKind = lens _pcKind (\ s a -> s{_pcKind = a}) + +-- | The number of passengers that are infants travelling in the lap of an +-- adult. +pcInfantInLapCount :: Lens' PassengerCounts (Maybe Int32) +pcInfantInLapCount + = lens _pcInfantInLapCount + (\ s a -> s{_pcInfantInLapCount = a}) + +-- | The number of passengers that are children. +pcChildCount :: Lens' PassengerCounts (Maybe Int32) +pcChildCount + = lens _pcChildCount (\ s a -> s{_pcChildCount = a}) + +-- | The number of passengers that are infants each assigned a seat. +pcInfantInSeatCount :: Lens' PassengerCounts (Maybe Int32) +pcInfantInSeatCount + = lens _pcInfantInSeatCount + (\ s a -> s{_pcInfantInSeatCount = a}) + +-- | The number of passengers that are adults. +pcAdultCount :: Lens' PassengerCounts (Maybe Int32) +pcAdultCount + = lens _pcAdultCount (\ s a -> s{_pcAdultCount = a}) + +instance FromJSON PassengerCounts where + parseJSON + = withObject "PassengerCounts" + (\ o -> + PassengerCounts <$> + (o .:? "seniorCount") <*> + (o .:? "kind" .!= "qpxexpress#passengerCounts") + <*> (o .:? "infantInLapCount") + <*> (o .:? "childCount") + <*> (o .:? "infantInSeatCount") + <*> (o .:? "adultCount")) + +instance ToJSON PassengerCounts where + toJSON PassengerCounts{..} + = object + (catMaybes + [("seniorCount" .=) <$> _pcSeniorCount, + Just ("kind" .= _pcKind), + ("infantInLapCount" .=) <$> _pcInfantInLapCount, + ("childCount" .=) <$> _pcChildCount, + ("infantInSeatCount" .=) <$> _pcInfantInSeatCount, + ("adultCount" .=) <$> _pcAdultCount]) + +-- | Details of a segment of a flight; a segment is one or more consecutive +-- legs on the same flight. For example a hypothetical flight ZZ001, from +-- DFW to OGG, would have one segment with two legs: DFW to HNL (leg 1), +-- HNL to OGG (leg 2), and DFW to OGG (legs 1 and 2). +-- +-- /See:/ 'segmentInfo' smart constructor. +data SegmentInfo = SegmentInfo + { _sBookingCode :: !(Maybe Text) + , _sCabin :: !(Maybe Text) + , _sBookingCodeCount :: !(Maybe Int32) + , _sSubjectToGovernmentApproval :: !(Maybe Bool) + , _sKind :: !Text + , _sFlight :: !(Maybe (Maybe FlightInfo)) + , _sId :: !(Maybe Text) + , _sMarriedSegmentGroup :: !(Maybe Text) + , _sConnectionDuration :: !(Maybe Int32) + , _sDuration :: !(Maybe Int32) + , _sLeg :: !(Maybe [Maybe LegInfo]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SegmentInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sBookingCode' +-- +-- * 'sCabin' +-- +-- * 'sBookingCodeCount' +-- +-- * 'sSubjectToGovernmentApproval' +-- +-- * 'sKind' +-- +-- * 'sFlight' +-- +-- * 'sId' +-- +-- * 'sMarriedSegmentGroup' +-- +-- * 'sConnectionDuration' +-- +-- * 'sDuration' +-- +-- * 'sLeg' +segmentInfo + :: SegmentInfo +segmentInfo = + SegmentInfo + { _sBookingCode = Nothing + , _sCabin = Nothing + , _sBookingCodeCount = Nothing + , _sSubjectToGovernmentApproval = Nothing + , _sKind = "qpxexpress#segmentInfo" + , _sFlight = Nothing + , _sId = Nothing + , _sMarriedSegmentGroup = Nothing + , _sConnectionDuration = Nothing + , _sDuration = Nothing + , _sLeg = Nothing + } + +-- | The booking code or class for this segment. +sBookingCode :: Lens' SegmentInfo (Maybe Text) +sBookingCode + = lens _sBookingCode (\ s a -> s{_sBookingCode = a}) + +-- | The cabin booked for this segment. +sCabin :: Lens' SegmentInfo (Maybe Text) +sCabin = lens _sCabin (\ s a -> s{_sCabin = a}) + +-- | The number of seats available in this booking code on this segment. +sBookingCodeCount :: Lens' SegmentInfo (Maybe Int32) +sBookingCodeCount + = lens _sBookingCodeCount + (\ s a -> s{_sBookingCodeCount = a}) + +-- | Whether the operation of this segment remains subject to government +-- approval. +sSubjectToGovernmentApproval :: Lens' SegmentInfo (Maybe Bool) +sSubjectToGovernmentApproval + = lens _sSubjectToGovernmentApproval + (\ s a -> s{_sSubjectToGovernmentApproval = a}) + +-- | Identifies this as a segment object. A segment is one or more +-- consecutive legs on the same flight. For example a hypothetical flight +-- ZZ001, from DFW to OGG, could have one segment with two legs: DFW to HNL +-- (leg 1), HNL to OGG (leg 2). Value: the fixed string +-- qpxexpress#segmentInfo. +sKind :: Lens' SegmentInfo Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | The flight this is a segment of. +sFlight :: Lens' SegmentInfo (Maybe (Maybe FlightInfo)) +sFlight = lens _sFlight (\ s a -> s{_sFlight = a}) + +-- | An id uniquely identifying the segment in the solution. +sId :: Lens' SegmentInfo (Maybe Text) +sId = lens _sId (\ s a -> s{_sId = a}) + +-- | The solution-based index of a segment in a married segment group. +-- Married segments can only be booked together. For example, an airline +-- might report a certain booking code as sold out from Boston to +-- Pittsburgh, but as available as part of two married segments Boston to +-- Chicago connecting through Pittsburgh. For example content of this +-- field, consider the round-trip flight ZZ1 PHX-PHL ZZ2 PHL-CLT ZZ3 +-- CLT-PHX. This has three segments, with the two outbound ones (ZZ1 ZZ2) +-- married. In this case, the two outbound segments belong to married +-- segment group 0, and the return segment belongs to married segment group +-- 1. +sMarriedSegmentGroup :: Lens' SegmentInfo (Maybe Text) +sMarriedSegmentGroup + = lens _sMarriedSegmentGroup + (\ s a -> s{_sMarriedSegmentGroup = a}) + +-- | In minutes, the duration of the connection following this segment. +sConnectionDuration :: Lens' SegmentInfo (Maybe Int32) +sConnectionDuration + = lens _sConnectionDuration + (\ s a -> s{_sConnectionDuration = a}) + +-- | The duration of the flight segment in minutes. +sDuration :: Lens' SegmentInfo (Maybe Int32) +sDuration + = lens _sDuration (\ s a -> s{_sDuration = a}) + +-- | The legs composing this segment. +sLeg :: Lens' SegmentInfo [Maybe LegInfo] +sLeg + = lens _sLeg (\ s a -> s{_sLeg = a}) . _Default . + _Coerce + +instance FromJSON SegmentInfo where + parseJSON + = withObject "SegmentInfo" + (\ o -> + SegmentInfo <$> + (o .:? "bookingCode") <*> (o .:? "cabin") <*> + (o .:? "bookingCodeCount") + <*> (o .:? "subjectToGovernmentApproval") + <*> (o .:? "kind" .!= "qpxexpress#segmentInfo") + <*> (o .:? "flight") + <*> (o .:? "id") + <*> (o .:? "marriedSegmentGroup") + <*> (o .:? "connectionDuration") + <*> (o .:? "duration") + <*> (o .:? "leg" .!= mempty)) + +instance ToJSON SegmentInfo where + toJSON SegmentInfo{..} + = object + (catMaybes + [("bookingCode" .=) <$> _sBookingCode, + ("cabin" .=) <$> _sCabin, + ("bookingCodeCount" .=) <$> _sBookingCodeCount, + ("subjectToGovernmentApproval" .=) <$> + _sSubjectToGovernmentApproval, + Just ("kind" .= _sKind), ("flight" .=) <$> _sFlight, + ("id" .=) <$> _sId, + ("marriedSegmentGroup" .=) <$> _sMarriedSegmentGroup, + ("connectionDuration" .=) <$> _sConnectionDuration, + ("duration" .=) <$> _sDuration, + ("leg" .=) <$> _sLeg]) + +-- | Tax data. +-- +-- /See:/ 'taxData' smart constructor. +data TaxData = TaxData + { _tdKind :: !Text + , _tdName :: !(Maybe Text) + , _tdId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaxData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdKind' +-- +-- * 'tdName' +-- +-- * 'tdId' +taxData + :: TaxData +taxData = + TaxData + { _tdKind = "qpxexpress#taxData" + , _tdName = Nothing + , _tdId = Nothing + } + +-- | Identifies this as a tax data object, representing some tax. Value: the +-- fixed string qpxexpress#taxData. +tdKind :: Lens' TaxData Text +tdKind = lens _tdKind (\ s a -> s{_tdKind = a}) + +-- | The name of a tax. +tdName :: Lens' TaxData (Maybe Text) +tdName = lens _tdName (\ s a -> s{_tdName = a}) + +-- | An identifier uniquely identifying a tax in a response. +tdId :: Lens' TaxData (Maybe Text) +tdId = lens _tdId (\ s a -> s{_tdId = a}) + +instance FromJSON TaxData where + parseJSON + = withObject "TaxData" + (\ o -> + TaxData <$> + (o .:? "kind" .!= "qpxexpress#taxData") <*> + (o .:? "name") + <*> (o .:? "id")) + +instance ToJSON TaxData where + toJSON TaxData{..} + = object + (catMaybes + [Just ("kind" .= _tdKind), ("name" .=) <$> _tdName, + ("id" .=) <$> _tdId]) + +-- | Tax information. +-- +-- /See:/ 'taxInfo' smart constructor. +data TaxInfo = TaxInfo + { _tiChargeType :: !(Maybe Text) + , _tiCountry :: !(Maybe Text) + , _tiKind :: !Text + , _tiSalePrice :: !(Maybe Text) + , _tiCode :: !(Maybe Text) + , _tiId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TaxInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiChargeType' +-- +-- * 'tiCountry' +-- +-- * 'tiKind' +-- +-- * 'tiSalePrice' +-- +-- * 'tiCode' +-- +-- * 'tiId' +taxInfo + :: TaxInfo +taxInfo = + TaxInfo + { _tiChargeType = Nothing + , _tiCountry = Nothing + , _tiKind = "qpxexpress#taxInfo" + , _tiSalePrice = Nothing + , _tiCode = Nothing + , _tiId = Nothing + } + +-- | Whether this is a government charge or a carrier surcharge. +tiChargeType :: Lens' TaxInfo (Maybe Text) +tiChargeType + = lens _tiChargeType (\ s a -> s{_tiChargeType = a}) + +-- | For government charges, the country levying the charge. +tiCountry :: Lens' TaxInfo (Maybe Text) +tiCountry + = lens _tiCountry (\ s a -> s{_tiCountry = a}) + +-- | Identifies this as a tax information object. Value: the fixed string +-- qpxexpress#taxInfo. +tiKind :: Lens' TaxInfo Text +tiKind = lens _tiKind (\ s a -> s{_tiKind = a}) + +-- | The price of the tax in the sales or equivalent currency. +tiSalePrice :: Lens' TaxInfo (Maybe Text) +tiSalePrice + = lens _tiSalePrice (\ s a -> s{_tiSalePrice = a}) + +-- | The code to enter in the ticket\'s tax box. +tiCode :: Lens' TaxInfo (Maybe Text) +tiCode = lens _tiCode (\ s a -> s{_tiCode = a}) + +-- | Identifier uniquely identifying this tax in a response. Not present for +-- unnamed carrier surcharges. +tiId :: Lens' TaxInfo (Maybe Text) +tiId = lens _tiId (\ s a -> s{_tiId = a}) + +instance FromJSON TaxInfo where + parseJSON + = withObject "TaxInfo" + (\ o -> + TaxInfo <$> + (o .:? "chargeType") <*> (o .:? "country") <*> + (o .:? "kind" .!= "qpxexpress#taxInfo") + <*> (o .:? "salePrice") + <*> (o .:? "code") + <*> (o .:? "id")) + +instance ToJSON TaxInfo where + toJSON TaxInfo{..} + = object + (catMaybes + [("chargeType" .=) <$> _tiChargeType, + ("country" .=) <$> _tiCountry, + Just ("kind" .= _tiKind), + ("salePrice" .=) <$> _tiSalePrice, + ("code" .=) <$> _tiCode, ("id" .=) <$> _tiId]) + +-- | A QPX Express search request. +-- +-- /See:/ 'tripsSearchRequest' smart constructor. +newtype TripsSearchRequest = TripsSearchRequest + { _tsrRequest :: Maybe (Maybe TripOptionsRequest) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripsSearchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsrRequest' +tripsSearchRequest + :: TripsSearchRequest +tripsSearchRequest = + TripsSearchRequest + { _tsrRequest = Nothing + } + +-- | A QPX Express search request. Required values are at least one adult or +-- senior passenger, an origin, a destination, and a date. +tsrRequest :: Lens' TripsSearchRequest (Maybe (Maybe TripOptionsRequest)) +tsrRequest + = lens _tsrRequest (\ s a -> s{_tsrRequest = a}) + +instance FromJSON TripsSearchRequest where + parseJSON + = withObject "TripsSearchRequest" + (\ o -> TripsSearchRequest <$> (o .:? "request")) + +instance ToJSON TripsSearchRequest where + toJSON TripsSearchRequest{..} + = object (catMaybes [("request" .=) <$> _tsrRequest]) + +-- | The price of one or more travel segments. The currency used to purchase +-- tickets is usually determined by the sale\/ticketing city or the +-- sale\/ticketing country, unless none are specified, in which case it +-- defaults to that of the journey origin country. +-- +-- /See:/ 'pricingInfo' smart constructor. +data PricingInfo = PricingInfo + { _piSaleTaxTotal :: !(Maybe Text) + , _piRefundable :: !(Maybe Bool) + , _piPtc :: !(Maybe Text) + , _piBaseFareTotal :: !(Maybe Text) + , _piFare :: !(Maybe [Maybe FareInfo]) + , _piKind :: !Text + , _piSegmentPricing :: !(Maybe [Maybe SegmentPricing]) + , _piPassengers :: !(Maybe (Maybe PassengerCounts)) + , _piFareCalculation :: !(Maybe Text) + , _piLatestTicketingTime :: !(Maybe Text) + , _piTax :: !(Maybe [Maybe TaxInfo]) + , _piSaleTotal :: !(Maybe Text) + , _piSaleFareTotal :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PricingInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piSaleTaxTotal' +-- +-- * 'piRefundable' +-- +-- * 'piPtc' +-- +-- * 'piBaseFareTotal' +-- +-- * 'piFare' +-- +-- * 'piKind' +-- +-- * 'piSegmentPricing' +-- +-- * 'piPassengers' +-- +-- * 'piFareCalculation' +-- +-- * 'piLatestTicketingTime' +-- +-- * 'piTax' +-- +-- * 'piSaleTotal' +-- +-- * 'piSaleFareTotal' +pricingInfo + :: PricingInfo +pricingInfo = + PricingInfo + { _piSaleTaxTotal = Nothing + , _piRefundable = Nothing + , _piPtc = Nothing + , _piBaseFareTotal = Nothing + , _piFare = Nothing + , _piKind = "qpxexpress#pricingInfo" + , _piSegmentPricing = Nothing + , _piPassengers = Nothing + , _piFareCalculation = Nothing + , _piLatestTicketingTime = Nothing + , _piTax = Nothing + , _piSaleTotal = Nothing + , _piSaleFareTotal = Nothing + } + +-- | The taxes in the sale or equivalent currency. +piSaleTaxTotal :: Lens' PricingInfo (Maybe Text) +piSaleTaxTotal + = lens _piSaleTaxTotal + (\ s a -> s{_piSaleTaxTotal = a}) + +-- | Whether the fares on this pricing are refundable. +piRefundable :: Lens' PricingInfo (Maybe Bool) +piRefundable + = lens _piRefundable (\ s a -> s{_piRefundable = a}) + +-- | The passenger type code for this pricing. An alphanumeric code used by a +-- carrier to restrict fares to certain categories of passenger. For +-- instance, a fare might be valid only for senior citizens. +piPtc :: Lens' PricingInfo (Maybe Text) +piPtc = lens _piPtc (\ s a -> s{_piPtc = a}) + +-- | The total fare in the base fare currency (the currency of the country of +-- origin). This element is only present when the sales currency and the +-- currency of the country of commencement are different. +piBaseFareTotal :: Lens' PricingInfo (Maybe Text) +piBaseFareTotal + = lens _piBaseFareTotal + (\ s a -> s{_piBaseFareTotal = a}) + +-- | The fare used to price one or more segments. +piFare :: Lens' PricingInfo [Maybe FareInfo] +piFare + = lens _piFare (\ s a -> s{_piFare = a}) . _Default . + _Coerce + +-- | Identifies this as a pricing object, representing the price of one or +-- more travel segments. Value: the fixed string qpxexpress#pricingInfo. +piKind :: Lens' PricingInfo Text +piKind = lens _piKind (\ s a -> s{_piKind = a}) + +-- | The per-segment price and baggage information. +piSegmentPricing :: Lens' PricingInfo [Maybe SegmentPricing] +piSegmentPricing + = lens _piSegmentPricing + (\ s a -> s{_piSegmentPricing = a}) + . _Default + . _Coerce + +-- | The number of passengers to which this price applies. +piPassengers :: Lens' PricingInfo (Maybe (Maybe PassengerCounts)) +piPassengers + = lens _piPassengers (\ s a -> s{_piPassengers = a}) + +-- | The horizontal fare calculation. This is a field on a ticket that +-- displays all of the relevant items that go into the calculation of the +-- fare. +piFareCalculation :: Lens' PricingInfo (Maybe Text) +piFareCalculation + = lens _piFareCalculation + (\ s a -> s{_piFareCalculation = a}) + +-- | The latest ticketing time for this pricing assuming the reservation +-- occurs at ticketing time and there is no change in fares\/rules. The +-- time is local to the point of sale (POS). +piLatestTicketingTime :: Lens' PricingInfo (Maybe Text) +piLatestTicketingTime + = lens _piLatestTicketingTime + (\ s a -> s{_piLatestTicketingTime = a}) + +-- | The taxes used to calculate the tax total per ticket. +piTax :: Lens' PricingInfo [Maybe TaxInfo] +piTax + = lens _piTax (\ s a -> s{_piTax = a}) . _Default . + _Coerce + +-- | Total per-passenger price (fare and tax) in the sale or equivalent +-- currency. +piSaleTotal :: Lens' PricingInfo (Maybe Text) +piSaleTotal + = lens _piSaleTotal (\ s a -> s{_piSaleTotal = a}) + +-- | The total fare in the sale or equivalent currency. +piSaleFareTotal :: Lens' PricingInfo (Maybe Text) +piSaleFareTotal + = lens _piSaleFareTotal + (\ s a -> s{_piSaleFareTotal = a}) + +instance FromJSON PricingInfo where + parseJSON + = withObject "PricingInfo" + (\ o -> + PricingInfo <$> + (o .:? "saleTaxTotal") <*> (o .:? "refundable") <*> + (o .:? "ptc") + <*> (o .:? "baseFareTotal") + <*> (o .:? "fare" .!= mempty) + <*> (o .:? "kind" .!= "qpxexpress#pricingInfo") + <*> (o .:? "segmentPricing" .!= mempty) + <*> (o .:? "passengers") + <*> (o .:? "fareCalculation") + <*> (o .:? "latestTicketingTime") + <*> (o .:? "tax" .!= mempty) + <*> (o .:? "saleTotal") + <*> (o .:? "saleFareTotal")) + +instance ToJSON PricingInfo where + toJSON PricingInfo{..} + = object + (catMaybes + [("saleTaxTotal" .=) <$> _piSaleTaxTotal, + ("refundable" .=) <$> _piRefundable, + ("ptc" .=) <$> _piPtc, + ("baseFareTotal" .=) <$> _piBaseFareTotal, + ("fare" .=) <$> _piFare, Just ("kind" .= _piKind), + ("segmentPricing" .=) <$> _piSegmentPricing, + ("passengers" .=) <$> _piPassengers, + ("fareCalculation" .=) <$> _piFareCalculation, + ("latestTicketingTime" .=) <$> + _piLatestTicketingTime, + ("tax" .=) <$> _piTax, + ("saleTotal" .=) <$> _piSaleTotal, + ("saleFareTotal" .=) <$> _piSaleFareTotal]) + +-- | A flight is a sequence of legs with the same airline carrier and flight +-- number. (A leg is the smallest unit of travel, in the case of a flight a +-- takeoff immediately followed by a landing at two set points on a +-- particular carrier with a particular flight number.) The naive view is +-- that a flight is scheduled travel of an aircraft between two points, +-- with possibly intermediate stops, but carriers will frequently list +-- flights that require a change of aircraft between legs. +-- +-- /See:/ 'flightInfo' smart constructor. +data FlightInfo = FlightInfo + { _fiCarrier :: !(Maybe Text) + , _fiNumber :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FlightInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fiCarrier' +-- +-- * 'fiNumber' +flightInfo + :: FlightInfo +flightInfo = + FlightInfo + { _fiCarrier = Nothing + , _fiNumber = Nothing + } + +fiCarrier :: Lens' FlightInfo (Maybe Text) +fiCarrier + = lens _fiCarrier (\ s a -> s{_fiCarrier = a}) + +-- | The flight number. +fiNumber :: Lens' FlightInfo (Maybe Text) +fiNumber = lens _fiNumber (\ s a -> s{_fiNumber = a}) + +instance FromJSON FlightInfo where + parseJSON + = withObject "FlightInfo" + (\ o -> + FlightInfo <$> + (o .:? "carrier") <*> (o .:? "number")) + +instance ToJSON FlightInfo where + toJSON FlightInfo{..} + = object + (catMaybes + [("carrier" .=) <$> _fiCarrier, + ("number" .=) <$> _fiNumber]) + +-- | Complete information about a fare used in the solution to a low-fare +-- search query. In the airline industry a fare is a price an airline +-- charges for one-way travel between two points. A fare typically contains +-- a carrier code, two city codes, a price, and a fare basis. (A fare basis +-- is a one-to-eight character alphanumeric code used to identify a fare.) +-- +-- /See:/ 'fareInfo' smart constructor. +data FareInfo = FareInfo + { _fCarrier :: !(Maybe Text) + , _fDestination :: !(Maybe Text) + , _fOrigin :: !(Maybe Text) + , _fPrivate :: !(Maybe Bool) + , _fKind :: !Text + , _fBasisCode :: !(Maybe Text) + , _fId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FareInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fCarrier' +-- +-- * 'fDestination' +-- +-- * 'fOrigin' +-- +-- * 'fPrivate' +-- +-- * 'fKind' +-- +-- * 'fBasisCode' +-- +-- * 'fId' +fareInfo + :: FareInfo +fareInfo = + FareInfo + { _fCarrier = Nothing + , _fDestination = Nothing + , _fOrigin = Nothing + , _fPrivate = Nothing + , _fKind = "qpxexpress#fareInfo" + , _fBasisCode = Nothing + , _fId = Nothing + } + +-- | The carrier of the aircraft or other vehicle commuting between two +-- points. +fCarrier :: Lens' FareInfo (Maybe Text) +fCarrier = lens _fCarrier (\ s a -> s{_fCarrier = a}) + +-- | The city code of the city the trip ends at. +fDestination :: Lens' FareInfo (Maybe Text) +fDestination + = lens _fDestination (\ s a -> s{_fDestination = a}) + +-- | The city code of the city the trip begins at. +fOrigin :: Lens' FareInfo (Maybe Text) +fOrigin = lens _fOrigin (\ s a -> s{_fOrigin = a}) + +-- | Whether this is a private fare, for example one offered only to select +-- customers rather than the general public. +fPrivate :: Lens' FareInfo (Maybe Bool) +fPrivate = lens _fPrivate (\ s a -> s{_fPrivate = a}) + +-- | Identifies this as a fare object. Value: the fixed string +-- qpxexpress#fareInfo. +fKind :: Lens' FareInfo Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +fBasisCode :: Lens' FareInfo (Maybe Text) +fBasisCode + = lens _fBasisCode (\ s a -> s{_fBasisCode = a}) + +-- | A unique identifier of the fare. +fId :: Lens' FareInfo (Maybe Text) +fId = lens _fId (\ s a -> s{_fId = a}) + +instance FromJSON FareInfo where + parseJSON + = withObject "FareInfo" + (\ o -> + FareInfo <$> + (o .:? "carrier") <*> (o .:? "destination") <*> + (o .:? "origin") + <*> (o .:? "private") + <*> (o .:? "kind" .!= "qpxexpress#fareInfo") + <*> (o .:? "basisCode") + <*> (o .:? "id")) + +instance ToJSON FareInfo where + toJSON FareInfo{..} + = object + (catMaybes + [("carrier" .=) <$> _fCarrier, + ("destination" .=) <$> _fDestination, + ("origin" .=) <$> _fOrigin, + ("private" .=) <$> _fPrivate, + Just ("kind" .= _fKind), + ("basisCode" .=) <$> _fBasisCode, + ("id" .=) <$> _fId]) + +-- | Criteria a desired slice must satisfy. +-- +-- /See:/ 'sliceInput' smart constructor. +data SliceInput = SliceInput + { _sliDestination :: !(Maybe Text) + , _sliOrigin :: !(Maybe Text) + , _sliMaxStops :: !(Maybe Int32) + , _sliKind :: !Text + , _sliProhibitedCarrier :: !(Maybe [Text]) + , _sliDate :: !(Maybe Text) + , _sliMaxConnectionDuration :: !(Maybe Int32) + , _sliPreferredCabin :: !(Maybe Text) + , _sliPermittedDepartureTime :: !(Maybe (Maybe TimeOfDayRange)) + , _sliPermittedCarrier :: !(Maybe [Text]) + , _sliAlliance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SliceInput' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sliDestination' +-- +-- * 'sliOrigin' +-- +-- * 'sliMaxStops' +-- +-- * 'sliKind' +-- +-- * 'sliProhibitedCarrier' +-- +-- * 'sliDate' +-- +-- * 'sliMaxConnectionDuration' +-- +-- * 'sliPreferredCabin' +-- +-- * 'sliPermittedDepartureTime' +-- +-- * 'sliPermittedCarrier' +-- +-- * 'sliAlliance' +sliceInput + :: SliceInput +sliceInput = + SliceInput + { _sliDestination = Nothing + , _sliOrigin = Nothing + , _sliMaxStops = Nothing + , _sliKind = "qpxexpress#sliceInput" + , _sliProhibitedCarrier = Nothing + , _sliDate = Nothing + , _sliMaxConnectionDuration = Nothing + , _sliPreferredCabin = Nothing + , _sliPermittedDepartureTime = Nothing + , _sliPermittedCarrier = Nothing + , _sliAlliance = Nothing + } + +-- | Airport or city IATA designator of the destination. +sliDestination :: Lens' SliceInput (Maybe Text) +sliDestination + = lens _sliDestination + (\ s a -> s{_sliDestination = a}) + +-- | Airport or city IATA designator of the origin. +sliOrigin :: Lens' SliceInput (Maybe Text) +sliOrigin + = lens _sliOrigin (\ s a -> s{_sliOrigin = a}) + +-- | The maximum number of stops you are willing to accept in this slice. +sliMaxStops :: Lens' SliceInput (Maybe Int32) +sliMaxStops + = lens _sliMaxStops (\ s a -> s{_sliMaxStops = a}) + +-- | Identifies this as a slice input object, representing the criteria a +-- desired slice must satisfy. Value: the fixed string +-- qpxexpress#sliceInput. +sliKind :: Lens' SliceInput Text +sliKind = lens _sliKind (\ s a -> s{_sliKind = a}) + +-- | A list of 2-letter IATA airline designators. Exclude slices that use +-- these carriers. +sliProhibitedCarrier :: Lens' SliceInput [Text] +sliProhibitedCarrier + = lens _sliProhibitedCarrier + (\ s a -> s{_sliProhibitedCarrier = a}) + . _Default + . _Coerce + +-- | Departure date in YYYY-MM-DD format. +sliDate :: Lens' SliceInput (Maybe Text) +sliDate = lens _sliDate (\ s a -> s{_sliDate = a}) + +-- | The longest connection between two legs, in minutes, you are willing to +-- accept. +sliMaxConnectionDuration :: Lens' SliceInput (Maybe Int32) +sliMaxConnectionDuration + = lens _sliMaxConnectionDuration + (\ s a -> s{_sliMaxConnectionDuration = a}) + +-- | Prefer solutions that book in this cabin for this slice. Allowed values +-- are COACH, PREMIUM_COACH, BUSINESS, and FIRST. +sliPreferredCabin :: Lens' SliceInput (Maybe Text) +sliPreferredCabin + = lens _sliPreferredCabin + (\ s a -> s{_sliPreferredCabin = a}) + +-- | Slices must depart in this time of day range, local to the point of +-- departure. +sliPermittedDepartureTime :: Lens' SliceInput (Maybe (Maybe TimeOfDayRange)) +sliPermittedDepartureTime + = lens _sliPermittedDepartureTime + (\ s a -> s{_sliPermittedDepartureTime = a}) + +-- | A list of 2-letter IATA airline designators. Slices with only these +-- carriers should be returned. +sliPermittedCarrier :: Lens' SliceInput [Text] +sliPermittedCarrier + = lens _sliPermittedCarrier + (\ s a -> s{_sliPermittedCarrier = a}) + . _Default + . _Coerce + +-- | Slices with only the carriers in this alliance should be returned; do +-- not use this field with permittedCarrier. Allowed values are ONEWORLD, +-- SKYTEAM, and STAR. +sliAlliance :: Lens' SliceInput (Maybe Text) +sliAlliance + = lens _sliAlliance (\ s a -> s{_sliAlliance = a}) + +instance FromJSON SliceInput where + parseJSON + = withObject "SliceInput" + (\ o -> + SliceInput <$> + (o .:? "destination") <*> (o .:? "origin") <*> + (o .:? "maxStops") + <*> (o .:? "kind" .!= "qpxexpress#sliceInput") + <*> (o .:? "prohibitedCarrier" .!= mempty) + <*> (o .:? "date") + <*> (o .:? "maxConnectionDuration") + <*> (o .:? "preferredCabin") + <*> (o .:? "permittedDepartureTime") + <*> (o .:? "permittedCarrier" .!= mempty) + <*> (o .:? "alliance")) + +instance ToJSON SliceInput where + toJSON SliceInput{..} + = object + (catMaybes + [("destination" .=) <$> _sliDestination, + ("origin" .=) <$> _sliOrigin, + ("maxStops" .=) <$> _sliMaxStops, + Just ("kind" .= _sliKind), + ("prohibitedCarrier" .=) <$> _sliProhibitedCarrier, + ("date" .=) <$> _sliDate, + ("maxConnectionDuration" .=) <$> + _sliMaxConnectionDuration, + ("preferredCabin" .=) <$> _sliPreferredCabin, + ("permittedDepartureTime" .=) <$> + _sliPermittedDepartureTime, + ("permittedCarrier" .=) <$> _sliPermittedCarrier, + ("alliance" .=) <$> _sliAlliance]) + +-- | A QPX Express search request, which will yield one or more solutions. +-- +-- /See:/ 'tripOptionsRequest' smart constructor. +data TripOptionsRequest = TripOptionsRequest + { _torRefundable :: !(Maybe Bool) + , _torSaleCountry :: !(Maybe Text) + , _torPassengers :: !(Maybe (Maybe PassengerCounts)) + , _torSolutions :: !(Maybe Int32) + , _torSlice :: !(Maybe [Maybe SliceInput]) + , _torMaxPrice :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripOptionsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'torRefundable' +-- +-- * 'torSaleCountry' +-- +-- * 'torPassengers' +-- +-- * 'torSolutions' +-- +-- * 'torSlice' +-- +-- * 'torMaxPrice' +tripOptionsRequest + :: TripOptionsRequest +tripOptionsRequest = + TripOptionsRequest + { _torRefundable = Nothing + , _torSaleCountry = Nothing + , _torPassengers = Nothing + , _torSolutions = Nothing + , _torSlice = Nothing + , _torMaxPrice = Nothing + } + +-- | Return only solutions with refundable fares. +torRefundable :: Lens' TripOptionsRequest (Maybe Bool) +torRefundable + = lens _torRefundable + (\ s a -> s{_torRefundable = a}) + +-- | IATA country code representing the point of sale. This determines the +-- \"equivalent amount paid\" currency for the ticket. +torSaleCountry :: Lens' TripOptionsRequest (Maybe Text) +torSaleCountry + = lens _torSaleCountry + (\ s a -> s{_torSaleCountry = a}) + +-- | Counts for each passenger type in the request. +torPassengers :: Lens' TripOptionsRequest (Maybe (Maybe PassengerCounts)) +torPassengers + = lens _torPassengers + (\ s a -> s{_torPassengers = a}) + +-- | The number of solutions to return, maximum 500. +torSolutions :: Lens' TripOptionsRequest (Maybe Int32) +torSolutions + = lens _torSolutions (\ s a -> s{_torSolutions = a}) + +-- | The slices that make up the itinerary of this trip. A slice represents a +-- traveler\'s intent, the portion of a low-fare search corresponding to a +-- traveler\'s request to get between two points. One-way journeys are +-- generally expressed using one slice, round-trips using two. An example +-- of a one slice trip with three segments might be BOS-SYD, SYD-LAX, +-- LAX-BOS if the traveler only stopped in SYD and LAX just long enough to +-- change planes. +torSlice :: Lens' TripOptionsRequest [Maybe SliceInput] +torSlice + = lens _torSlice (\ s a -> s{_torSlice = a}) . + _Default + . _Coerce + +-- | Do not return solutions that cost more than this price. The alphabetical +-- part of the price is in ISO 4217. The format, in regex, is +-- [A-Z]{3}\\d+(\\.\\d+)? Example: $102.07 +torMaxPrice :: Lens' TripOptionsRequest (Maybe Text) +torMaxPrice + = lens _torMaxPrice (\ s a -> s{_torMaxPrice = a}) + +instance FromJSON TripOptionsRequest where + parseJSON + = withObject "TripOptionsRequest" + (\ o -> + TripOptionsRequest <$> + (o .:? "refundable") <*> (o .:? "saleCountry") <*> + (o .:? "passengers") + <*> (o .:? "solutions") + <*> (o .:? "slice" .!= mempty) + <*> (o .:? "maxPrice")) + +instance ToJSON TripOptionsRequest where + toJSON TripOptionsRequest{..} + = object + (catMaybes + [("refundable" .=) <$> _torRefundable, + ("saleCountry" .=) <$> _torSaleCountry, + ("passengers" .=) <$> _torPassengers, + ("solutions" .=) <$> _torSolutions, + ("slice" .=) <$> _torSlice, + ("maxPrice" .=) <$> _torMaxPrice]) diff --git a/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Sum.hs b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Sum.hs new file mode 100644 index 000000000..de86cd186 --- /dev/null +++ b/gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.QPXExpress.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.QPXExpress.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-qpxexpress/gen/Network/Google/Resource/QPXExpress/Trips/Search.hs b/gogol-qpxexpress/gen/Network/Google/Resource/QPXExpress/Trips/Search.hs new file mode 100644 index 000000000..e1f1e9c8e --- /dev/null +++ b/gogol-qpxexpress/gen/Network/Google/Resource/QPXExpress/Trips/Search.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.QPXExpress.Trips.Search +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of flights. +-- +-- /See:/ for @QpxExpressTripsSearch@. +module QPXExpress.Trips.Search + ( + -- * REST Resource + TripsSearchAPI + + -- * Creating a Request + , tripsSearch + , TripsSearch + + -- * Request Lenses + , tsQuotaUser + , tsPrettyPrint + , tsUserIp + , tsKey + , tsOauthToken + , tsFields + , tsAlt + ) where + +import Network.Google.Prelude +import Network.Google.QPXExpress.Types + +-- | A resource alias for @QpxExpressTripsSearch@ which the +-- 'TripsSearch' request conforms to. +type TripsSearchAPI = + "search" :> Post '[JSON] TripsSearchResponse + +-- | Returns a list of flights. +-- +-- /See:/ 'tripsSearch' smart constructor. +data TripsSearch = TripsSearch + { _tsQuotaUser :: !(Maybe Text) + , _tsPrettyPrint :: !Bool + , _tsUserIp :: !(Maybe Text) + , _tsKey :: !(Maybe Text) + , _tsOauthToken :: !(Maybe Text) + , _tsFields :: !(Maybe Text) + , _tsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TripsSearch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsQuotaUser' +-- +-- * 'tsPrettyPrint' +-- +-- * 'tsUserIp' +-- +-- * 'tsKey' +-- +-- * 'tsOauthToken' +-- +-- * 'tsFields' +-- +-- * 'tsAlt' +tripsSearch + :: TripsSearch +tripsSearch = + TripsSearch + { _tsQuotaUser = Nothing + , _tsPrettyPrint = True + , _tsUserIp = Nothing + , _tsKey = Nothing + , _tsOauthToken = Nothing + , _tsFields = Nothing + , _tsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tsQuotaUser :: Lens' TripsSearch' (Maybe Text) +tsQuotaUser + = lens _tsQuotaUser (\ s a -> s{_tsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tsPrettyPrint :: Lens' TripsSearch' Bool +tsPrettyPrint + = lens _tsPrettyPrint + (\ s a -> s{_tsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tsUserIp :: Lens' TripsSearch' (Maybe Text) +tsUserIp = lens _tsUserIp (\ s a -> s{_tsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tsKey :: Lens' TripsSearch' (Maybe Text) +tsKey = lens _tsKey (\ s a -> s{_tsKey = a}) + +-- | OAuth 2.0 token for the current user. +tsOauthToken :: Lens' TripsSearch' (Maybe Text) +tsOauthToken + = lens _tsOauthToken (\ s a -> s{_tsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tsFields :: Lens' TripsSearch' (Maybe Text) +tsFields = lens _tsFields (\ s a -> s{_tsFields = a}) + +-- | Data format for the response. +tsAlt :: Lens' TripsSearch' Text +tsAlt = lens _tsAlt (\ s a -> s{_tsAlt = a}) + +instance GoogleRequest TripsSearch' where + type Rs TripsSearch' = TripsSearchResponse + request = requestWithRoute defReq qPXExpressURL + requestWithRoute r u TripsSearch{..} + = go _tsQuotaUser _tsPrettyPrint _tsUserIp _tsKey + _tsOauthToken + _tsFields + _tsAlt + where go + = clientWithRoute (Proxy :: Proxy TripsSearchAPI) r u diff --git a/gogol-qpxexpress/gogol-qpxexpress.cabal b/gogol-qpxexpress/gogol-qpxexpress.cabal new file mode 100644 index 000000000..f1546c38b --- /dev/null +++ b/gogol-qpxexpress/gogol-qpxexpress.cabal @@ -0,0 +1,44 @@ +name: gogol-qpxexpress +version: 0.0.1 +synopsis: QPX Express API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you find the least expensive flights between an origin and a + destination. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.QPXExpress + , Network.Google.QPXExpress.Types + , Network.Google.Resource.QPXExpress.Trips.Search + + other-modules: + Network.Google.QPXExpress.Types.Product + , Network.Google.QPXExpress.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-qpxexpress/src/.gitkeep b/gogol-qpxexpress/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-replicapool-updater/LICENSE b/gogol-replicapool-updater/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-replicapool-updater/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-replicapool-updater/Makefile b/gogol-replicapool-updater/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-replicapool-updater/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-replicapool-updater/README.md b/gogol-replicapool-updater/README.md new file mode 100644 index 000000000..45f7ee6f0 --- /dev/null +++ b/gogol-replicapool-updater/README.md @@ -0,0 +1,28 @@ +# gogol-replicapool-updater + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Compute Engine Instance Group Updater API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-replicapool-updater` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-replicapool-updater/Setup.hs b/gogol-replicapool-updater/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-replicapool-updater/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater.hs b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater.hs new file mode 100644 index 000000000..470f06fd3 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.InstanceGroupsUpdater +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Compute Engine Instance Group Updater API provides services +-- for updating groups of Compute Engine Instances. +-- +-- /See:/ +module Network.Google.InstanceGroupsUpdater + ( + -- * API + InstanceGroupsUpdaterAPI + , instanceGroupsUpdaterAPI + , instanceGroupsUpdaterURL + + -- * Service Methods + + -- * REST Resources + + -- ** ReplicapoolupdaterRollingUpdatesCancel + , module Replicapoolupdater.RollingUpdates.Cancel + + -- ** ReplicapoolupdaterRollingUpdatesGet + , module Replicapoolupdater.RollingUpdates.Get + + -- ** ReplicapoolupdaterRollingUpdatesInsert + , module Replicapoolupdater.RollingUpdates.Insert + + -- ** ReplicapoolupdaterRollingUpdatesList + , module Replicapoolupdater.RollingUpdates.List + + -- ** ReplicapoolupdaterRollingUpdatesListInstanceUpdates + , module Replicapoolupdater.RollingUpdates.ListInstanceUpdates + + -- ** ReplicapoolupdaterRollingUpdatesPause + , module Replicapoolupdater.RollingUpdates.Pause + + -- ** ReplicapoolupdaterRollingUpdatesResume + , module Replicapoolupdater.RollingUpdates.Resume + + -- ** ReplicapoolupdaterRollingUpdatesRollback + , module Replicapoolupdater.RollingUpdates.Rollback + + -- ** ReplicapoolupdaterZoneOperationsGet + , module Replicapoolupdater.ZoneOperations.Get + + -- ** ReplicapoolupdaterZoneOperationsList + , module Replicapoolupdater.ZoneOperations.List + + -- * Types + + -- ** RollingUpdate + , RollingUpdate + , rollingUpdate + , ruStatus + , ruProgress + , ruInstanceGroupManager + , ruKind + , ruError + , ruInstanceTemplate + , ruUser + , ruSelfLink + , ruStatusMessage + , ruCreationTimestamp + , ruId + , ruPolicy + , ruActionType + , ruOldInstanceTemplate + , ruDescription + , ruInstanceGroup + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** InstanceUpdateList + , InstanceUpdateList + , instanceUpdateList + , iulNextPageToken + , iulKind + , iulItems + , iulSelfLink + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** InstanceUpdate + , InstanceUpdate + , instanceUpdate + , iuStatus + , iuError + , iuInstance + + -- ** RollingUpdateList + , RollingUpdateList + , rollingUpdateList + , rulNextPageToken + , rulKind + , rulItems + , rulSelfLink + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Cancel +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Get +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Insert +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.List +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.ListInstanceUpdates +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Pause +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Resume +import Network.Google.Resource.Replicapoolupdater.RollingUpdates.Rollback +import Network.Google.Resource.Replicapoolupdater.ZoneOperations.Get +import Network.Google.Resource.Replicapoolupdater.ZoneOperations.List + +{- $resources +TODO +-} + +type InstanceGroupsUpdaterAPI = + RollingUpdates :<|> ZoneOperations + +instanceGroupsUpdaterAPI :: Proxy InstanceGroupsUpdaterAPI +instanceGroupsUpdaterAPI = Proxy diff --git a/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types.hs b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types.hs new file mode 100644 index 000000000..d66bdbd8d --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types.hs @@ -0,0 +1,108 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsUpdater.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsUpdater.Types + ( + -- * Service URL + instanceGroupsUpdaterURL + + -- * RollingUpdate + , RollingUpdate + , rollingUpdate + , ruStatus + , ruProgress + , ruInstanceGroupManager + , ruKind + , ruError + , ruInstanceTemplate + , ruUser + , ruSelfLink + , ruStatusMessage + , ruCreationTimestamp + , ruId + , ruPolicy + , ruActionType + , ruOldInstanceTemplate + , ruDescription + , ruInstanceGroup + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * InstanceUpdateList + , InstanceUpdateList + , instanceUpdateList + , iulNextPageToken + , iulKind + , iulItems + , iulSelfLink + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * InstanceUpdate + , InstanceUpdate + , instanceUpdate + , iuStatus + , iuError + , iuInstance + + -- * RollingUpdateList + , RollingUpdateList + , rollingUpdateList + , rulNextPageToken + , rulKind + , rulItems + , rulSelfLink + ) where + +import Network.Google.InstanceGroupsUpdater.Types.Product +import Network.Google.InstanceGroupsUpdater.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta1' of the Google Compute Engine Instance Group Updater API. +instanceGroupsUpdaterURL :: BaseURL +instanceGroupsUpdaterURL + = BaseUrl Https + "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/" + 443 diff --git a/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Product.hs b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Product.hs new file mode 100644 index 000000000..cc2f7ceac --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Product.hs @@ -0,0 +1,799 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsUpdater.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsUpdater.Types.Product where + +import Network.Google.InstanceGroupsUpdater.Types.Sum +import Network.Google.Prelude + +-- | The following represents a resource describing a single update (rollout) +-- of a group of instances to the given template. +-- +-- /See:/ 'rollingUpdate' smart constructor. +data RollingUpdate = RollingUpdate + { _ruStatus :: !(Maybe Text) + , _ruProgress :: !(Maybe Int32) + , _ruInstanceGroupManager :: !(Maybe Text) + , _ruKind :: !Text + , _ruError :: !(Maybe RollingUpdateError) + , _ruInstanceTemplate :: !(Maybe Text) + , _ruUser :: !(Maybe Text) + , _ruSelfLink :: !(Maybe Text) + , _ruStatusMessage :: !(Maybe Text) + , _ruCreationTimestamp :: !(Maybe Text) + , _ruId :: !(Maybe Text) + , _ruPolicy :: !(Maybe RollingUpdatePolicy) + , _ruActionType :: !(Maybe Text) + , _ruOldInstanceTemplate :: !(Maybe Text) + , _ruDescription :: !(Maybe Text) + , _ruInstanceGroup :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruStatus' +-- +-- * 'ruProgress' +-- +-- * 'ruInstanceGroupManager' +-- +-- * 'ruKind' +-- +-- * 'ruError' +-- +-- * 'ruInstanceTemplate' +-- +-- * 'ruUser' +-- +-- * 'ruSelfLink' +-- +-- * 'ruStatusMessage' +-- +-- * 'ruCreationTimestamp' +-- +-- * 'ruId' +-- +-- * 'ruPolicy' +-- +-- * 'ruActionType' +-- +-- * 'ruOldInstanceTemplate' +-- +-- * 'ruDescription' +-- +-- * 'ruInstanceGroup' +rollingUpdate + :: RollingUpdate +rollingUpdate = + RollingUpdate + { _ruStatus = Nothing + , _ruProgress = Nothing + , _ruInstanceGroupManager = Nothing + , _ruKind = "replicapoolupdater#rollingUpdate" + , _ruError = Nothing + , _ruInstanceTemplate = Nothing + , _ruUser = Nothing + , _ruSelfLink = Nothing + , _ruStatusMessage = Nothing + , _ruCreationTimestamp = Nothing + , _ruId = Nothing + , _ruPolicy = Nothing + , _ruActionType = Nothing + , _ruOldInstanceTemplate = Nothing + , _ruDescription = Nothing + , _ruInstanceGroup = Nothing + } + +-- | [Output Only] Status of the update. Possible values are: - +-- \"ROLLING_FORWARD\": The update is going forward. - \"ROLLING_BACK\": +-- The update is being rolled back. - \"PAUSED\": The update is temporarily +-- paused (inactive). - \"ROLLED_OUT\": The update is finished, all +-- instances have been updated successfully. - \"ROLLED_BACK\": The update +-- is finished, all instances have been reverted to the previous template. +-- - \"CANCELLED\": The update is paused and no longer can be resumed, +-- undefined how many instances are running in which template. +ruStatus :: Lens' RollingUpdate (Maybe Text) +ruStatus = lens _ruStatus (\ s a -> s{_ruStatus = a}) + +-- | [Output Only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the update will +-- be complete. This number should be monotonically increasing as the +-- update progresses. +ruProgress :: Lens' RollingUpdate (Maybe Int32) +ruProgress + = lens _ruProgress (\ s a -> s{_ruProgress = a}) + +-- | Fully-qualified URL of an instance group manager being updated. Exactly +-- one of instanceGroupManager and instanceGroup must be set. +ruInstanceGroupManager :: Lens' RollingUpdate (Maybe Text) +ruInstanceGroupManager + = lens _ruInstanceGroupManager + (\ s a -> s{_ruInstanceGroupManager = a}) + +-- | [Output Only] Type of the resource. +ruKind :: Lens' RollingUpdate Text +ruKind = lens _ruKind (\ s a -> s{_ruKind = a}) + +-- | [Output Only] Errors that occurred during the rolling update. +ruError :: Lens' RollingUpdate (Maybe RollingUpdateError) +ruError = lens _ruError (\ s a -> s{_ruError = a}) + +-- | Fully-qualified URL of an instance template to apply. +ruInstanceTemplate :: Lens' RollingUpdate (Maybe Text) +ruInstanceTemplate + = lens _ruInstanceTemplate + (\ s a -> s{_ruInstanceTemplate = a}) + +-- | [Output Only] User who requested the update, for example: +-- user\'example.com. +ruUser :: Lens' RollingUpdate (Maybe Text) +ruUser = lens _ruUser (\ s a -> s{_ruUser = a}) + +-- | [Output Only] The fully qualified URL for the resource. +ruSelfLink :: Lens' RollingUpdate (Maybe Text) +ruSelfLink + = lens _ruSelfLink (\ s a -> s{_ruSelfLink = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the update. +ruStatusMessage :: Lens' RollingUpdate (Maybe Text) +ruStatusMessage + = lens _ruStatusMessage + (\ s a -> s{_ruStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +ruCreationTimestamp :: Lens' RollingUpdate (Maybe Text) +ruCreationTimestamp + = lens _ruCreationTimestamp + (\ s a -> s{_ruCreationTimestamp = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +ruId :: Lens' RollingUpdate (Maybe Text) +ruId = lens _ruId (\ s a -> s{_ruId = a}) + +-- | Parameters of the update process. +ruPolicy :: Lens' RollingUpdate (Maybe RollingUpdatePolicy) +ruPolicy = lens _ruPolicy (\ s a -> s{_ruPolicy = a}) + +-- | Specifies the action to take for each instance within the instance +-- group. This can be RECREATE which will recreate each instance and is +-- only available for managed instance groups. It can also be REBOOT which +-- performs a soft reboot for each instance and is only available for +-- regular (non-managed) instance groups. +ruActionType :: Lens' RollingUpdate (Maybe Text) +ruActionType + = lens _ruActionType (\ s a -> s{_ruActionType = a}) + +-- | Fully-qualified URL of the instance template encountered while starting +-- the update. +ruOldInstanceTemplate :: Lens' RollingUpdate (Maybe Text) +ruOldInstanceTemplate + = lens _ruOldInstanceTemplate + (\ s a -> s{_ruOldInstanceTemplate = a}) + +-- | An optional textual description of the resource; provided by the client +-- when the resource is created. +ruDescription :: Lens' RollingUpdate (Maybe Text) +ruDescription + = lens _ruDescription + (\ s a -> s{_ruDescription = a}) + +-- | Fully-qualified URL of an instance group being updated. Exactly one of +-- instanceGroupManager and instanceGroup must be set. +ruInstanceGroup :: Lens' RollingUpdate (Maybe Text) +ruInstanceGroup + = lens _ruInstanceGroup + (\ s a -> s{_ruInstanceGroup = a}) + +instance FromJSON RollingUpdate where + parseJSON + = withObject "RollingUpdate" + (\ o -> + RollingUpdate <$> + (o .:? "status") <*> (o .:? "progress") <*> + (o .:? "instanceGroupManager") + <*> + (o .:? "kind" .!= "replicapoolupdater#rollingUpdate") + <*> (o .:? "error") + <*> (o .:? "instanceTemplate") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "policy") + <*> (o .:? "actionType") + <*> (o .:? "oldInstanceTemplate") + <*> (o .:? "description") + <*> (o .:? "instanceGroup")) + +instance ToJSON RollingUpdate where + toJSON RollingUpdate{..} + = object + (catMaybes + [("status" .=) <$> _ruStatus, + ("progress" .=) <$> _ruProgress, + ("instanceGroupManager" .=) <$> + _ruInstanceGroupManager, + Just ("kind" .= _ruKind), ("error" .=) <$> _ruError, + ("instanceTemplate" .=) <$> _ruInstanceTemplate, + ("user" .=) <$> _ruUser, + ("selfLink" .=) <$> _ruSelfLink, + ("statusMessage" .=) <$> _ruStatusMessage, + ("creationTimestamp" .=) <$> _ruCreationTimestamp, + ("id" .=) <$> _ruId, ("policy" .=) <$> _ruPolicy, + ("actionType" .=) <$> _ruActionType, + ("oldInstanceTemplate" .=) <$> + _ruOldInstanceTemplate, + ("description" .=) <$> _ruDescription, + ("instanceGroup" .=) <$> _ruInstanceGroup]) + +-- | Contains a list of Operation resources. +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "replicapoolupdater#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +-- | [Output Only] A token used to continue a truncate. +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | [Output Only] Type of resource. Always replicapoolupdater#operations for +-- Operations resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +-- | [Output Only] The Operation resources. +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +-- | [Output Only] Server-defined URL for this resource. +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "replicapoolupdater#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- | Response returned by ListInstanceUpdates method. +-- +-- /See:/ 'instanceUpdateList' smart constructor. +data InstanceUpdateList = InstanceUpdateList + { _iulNextPageToken :: !(Maybe Text) + , _iulKind :: !Text + , _iulItems :: !(Maybe [Maybe InstanceUpdate]) + , _iulSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceUpdateList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iulNextPageToken' +-- +-- * 'iulKind' +-- +-- * 'iulItems' +-- +-- * 'iulSelfLink' +instanceUpdateList + :: InstanceUpdateList +instanceUpdateList = + InstanceUpdateList + { _iulNextPageToken = Nothing + , _iulKind = "replicapoolupdater#instanceUpdateList" + , _iulItems = Nothing + , _iulSelfLink = Nothing + } + +-- | A token used to continue a truncated list request. +iulNextPageToken :: Lens' InstanceUpdateList (Maybe Text) +iulNextPageToken + = lens _iulNextPageToken + (\ s a -> s{_iulNextPageToken = a}) + +-- | [Output Only] Type of the resource. +iulKind :: Lens' InstanceUpdateList Text +iulKind = lens _iulKind (\ s a -> s{_iulKind = a}) + +-- | Collection of requested instance updates. +iulItems :: Lens' InstanceUpdateList [Maybe InstanceUpdate] +iulItems + = lens _iulItems (\ s a -> s{_iulItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The fully qualified URL for the resource. +iulSelfLink :: Lens' InstanceUpdateList (Maybe Text) +iulSelfLink + = lens _iulSelfLink (\ s a -> s{_iulSelfLink = a}) + +instance FromJSON InstanceUpdateList where + parseJSON + = withObject "InstanceUpdateList" + (\ o -> + InstanceUpdateList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "replicapoolupdater#instanceUpdateList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON InstanceUpdateList where + toJSON InstanceUpdateList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _iulNextPageToken, + Just ("kind" .= _iulKind), + ("items" .=) <$> _iulItems, + ("selfLink" .=) <$> _iulSelfLink]) + +-- | An operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "replicapoolupdater#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target id which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. Can be one of the following: +-- \"PENDING\", \"RUNNING\", or \"DONE\". +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested. This is in RFC +-- 3339 format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server. +-- This is in RFC 3339 format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output Only] Type of the resource. Always replicapoolupdater#operation +-- for Operation resources. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors occurred during processing of this operation, +-- this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server defined URL for the resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] Creation timestamp in RFC3339 text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource; defined by the server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output Only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "replicapoolupdater#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- | Update of a single instance. +-- +-- /See:/ 'instanceUpdate' smart constructor. +data InstanceUpdate = InstanceUpdate + { _iuStatus :: !(Maybe Text) + , _iuError :: !(Maybe InstanceUpdateError) + , _iuInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceUpdate' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iuStatus' +-- +-- * 'iuError' +-- +-- * 'iuInstance' +instanceUpdate + :: InstanceUpdate +instanceUpdate = + InstanceUpdate + { _iuStatus = Nothing + , _iuError = Nothing + , _iuInstance = Nothing + } + +-- | Status of the instance update. Possible values are: - \"PENDING\": The +-- instance update is pending execution. - \"ROLLING_FORWARD\": The +-- instance update is going forward. - \"ROLLING_BACK\": The instance +-- update is being rolled back. - \"PAUSED\": The instance update is +-- temporarily paused (inactive). - \"ROLLED_OUT\": The instance update is +-- finished, the instance is running the new template. - \"ROLLED_BACK\": +-- The instance update is finished, the instance has been reverted to the +-- previous template. - \"CANCELLED\": The instance update is paused and no +-- longer can be resumed, undefined in which template the instance is +-- running. +iuStatus :: Lens' InstanceUpdate (Maybe Text) +iuStatus = lens _iuStatus (\ s a -> s{_iuStatus = a}) + +-- | Errors that occurred during the instance update. +iuError :: Lens' InstanceUpdate (Maybe InstanceUpdateError) +iuError = lens _iuError (\ s a -> s{_iuError = a}) + +-- | Fully-qualified URL of the instance being updated. +iuInstance :: Lens' InstanceUpdate (Maybe Text) +iuInstance + = lens _iuInstance (\ s a -> s{_iuInstance = a}) + +instance FromJSON InstanceUpdate where + parseJSON + = withObject "InstanceUpdate" + (\ o -> + InstanceUpdate <$> + (o .:? "status") <*> (o .:? "error") <*> + (o .:? "instance")) + +instance ToJSON InstanceUpdate where + toJSON InstanceUpdate{..} + = object + (catMaybes + [("status" .=) <$> _iuStatus, + ("error" .=) <$> _iuError, + ("instance" .=) <$> _iuInstance]) + +-- | Response returned by List method. +-- +-- /See:/ 'rollingUpdateList' smart constructor. +data RollingUpdateList = RollingUpdateList + { _rulNextPageToken :: !(Maybe Text) + , _rulKind :: !Text + , _rulItems :: !(Maybe [Maybe RollingUpdate]) + , _rulSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdateList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rulNextPageToken' +-- +-- * 'rulKind' +-- +-- * 'rulItems' +-- +-- * 'rulSelfLink' +rollingUpdateList + :: RollingUpdateList +rollingUpdateList = + RollingUpdateList + { _rulNextPageToken = Nothing + , _rulKind = "replicapoolupdater#rollingUpdateList" + , _rulItems = Nothing + , _rulSelfLink = Nothing + } + +-- | A token used to continue a truncated list request. +rulNextPageToken :: Lens' RollingUpdateList (Maybe Text) +rulNextPageToken + = lens _rulNextPageToken + (\ s a -> s{_rulNextPageToken = a}) + +-- | [Output Only] Type of the resource. +rulKind :: Lens' RollingUpdateList Text +rulKind = lens _rulKind (\ s a -> s{_rulKind = a}) + +-- | Collection of requested updates. +rulItems :: Lens' RollingUpdateList [Maybe RollingUpdate] +rulItems + = lens _rulItems (\ s a -> s{_rulItems = a}) . + _Default + . _Coerce + +-- | [Output Only] The fully qualified URL for the resource. +rulSelfLink :: Lens' RollingUpdateList (Maybe Text) +rulSelfLink + = lens _rulSelfLink (\ s a -> s{_rulSelfLink = a}) + +instance FromJSON RollingUpdateList where + parseJSON + = withObject "RollingUpdateList" + (\ o -> + RollingUpdateList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "replicapoolupdater#rollingUpdateList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON RollingUpdateList where + toJSON RollingUpdateList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _rulNextPageToken, + Just ("kind" .= _rulKind), + ("items" .=) <$> _rulItems, + ("selfLink" .=) <$> _rulSelfLink]) diff --git a/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Sum.hs b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Sum.hs new file mode 100644 index 000000000..4bc704a1a --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/InstanceGroupsUpdater/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsUpdater.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsUpdater.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Cancel.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Cancel.hs new file mode 100644 index 000000000..1e586a0bc --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Cancel.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels an update. The update must be PAUSED before it can be cancelled. +-- This has no effect if the update is already CANCELLED. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesCancel@. +module Replicapoolupdater.RollingUpdates.Cancel + ( + -- * REST Resource + RollingUpdatesCancelAPI + + -- * Creating a Request + , rollingUpdatesCancel + , RollingUpdatesCancel + + -- * Request Lenses + , rucRollingUpdate + , rucQuotaUser + , rucPrettyPrint + , rucProject + , rucUserIp + , rucZone + , rucKey + , rucOauthToken + , rucFields + , rucAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesCancel@ which the +-- 'RollingUpdatesCancel' request conforms to. +type RollingUpdatesCancelAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + "cancel" :> Post '[JSON] Operation + +-- | Cancels an update. The update must be PAUSED before it can be cancelled. +-- This has no effect if the update is already CANCELLED. +-- +-- /See:/ 'rollingUpdatesCancel' smart constructor. +data RollingUpdatesCancel = RollingUpdatesCancel + { _rucRollingUpdate :: !Text + , _rucQuotaUser :: !(Maybe Text) + , _rucPrettyPrint :: !Bool + , _rucProject :: !Text + , _rucUserIp :: !(Maybe Text) + , _rucZone :: !Text + , _rucKey :: !(Maybe Text) + , _rucOauthToken :: !(Maybe Text) + , _rucFields :: !(Maybe Text) + , _rucAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rucRollingUpdate' +-- +-- * 'rucQuotaUser' +-- +-- * 'rucPrettyPrint' +-- +-- * 'rucProject' +-- +-- * 'rucUserIp' +-- +-- * 'rucZone' +-- +-- * 'rucKey' +-- +-- * 'rucOauthToken' +-- +-- * 'rucFields' +-- +-- * 'rucAlt' +rollingUpdatesCancel + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesCancel +rollingUpdatesCancel pRucRollingUpdate_ pRucProject_ pRucZone_ = + RollingUpdatesCancel + { _rucRollingUpdate = pRucRollingUpdate_ + , _rucQuotaUser = Nothing + , _rucPrettyPrint = True + , _rucProject = pRucProject_ + , _rucUserIp = Nothing + , _rucZone = pRucZone_ + , _rucKey = Nothing + , _rucOauthToken = Nothing + , _rucFields = Nothing + , _rucAlt = "json" + } + +-- | The name of the update. +rucRollingUpdate :: Lens' RollingUpdatesCancel' Text +rucRollingUpdate + = lens _rucRollingUpdate + (\ s a -> s{_rucRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rucQuotaUser :: Lens' RollingUpdatesCancel' (Maybe Text) +rucQuotaUser + = lens _rucQuotaUser (\ s a -> s{_rucQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rucPrettyPrint :: Lens' RollingUpdatesCancel' Bool +rucPrettyPrint + = lens _rucPrettyPrint + (\ s a -> s{_rucPrettyPrint = a}) + +-- | The Google Developers Console project name. +rucProject :: Lens' RollingUpdatesCancel' Text +rucProject + = lens _rucProject (\ s a -> s{_rucProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rucUserIp :: Lens' RollingUpdatesCancel' (Maybe Text) +rucUserIp + = lens _rucUserIp (\ s a -> s{_rucUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rucZone :: Lens' RollingUpdatesCancel' Text +rucZone = lens _rucZone (\ s a -> s{_rucZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rucKey :: Lens' RollingUpdatesCancel' (Maybe Text) +rucKey = lens _rucKey (\ s a -> s{_rucKey = a}) + +-- | OAuth 2.0 token for the current user. +rucOauthToken :: Lens' RollingUpdatesCancel' (Maybe Text) +rucOauthToken + = lens _rucOauthToken + (\ s a -> s{_rucOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rucFields :: Lens' RollingUpdatesCancel' (Maybe Text) +rucFields + = lens _rucFields (\ s a -> s{_rucFields = a}) + +-- | Data format for the response. +rucAlt :: Lens' RollingUpdatesCancel' Text +rucAlt = lens _rucAlt (\ s a -> s{_rucAlt = a}) + +instance GoogleRequest RollingUpdatesCancel' where + type Rs RollingUpdatesCancel' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesCancel{..} + = go _rucRollingUpdate _rucQuotaUser _rucPrettyPrint + _rucProject + _rucUserIp + _rucZone + _rucKey + _rucOauthToken + _rucFields + _rucAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesCancelAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Get.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Get.hs new file mode 100644 index 000000000..b710fa115 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Get.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns information about an update. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesGet@. +module Replicapoolupdater.RollingUpdates.Get + ( + -- * REST Resource + RollingUpdatesGetAPI + + -- * Creating a Request + , rollingUpdatesGet + , RollingUpdatesGet + + -- * Request Lenses + , rugRollingUpdate + , rugQuotaUser + , rugPrettyPrint + , rugProject + , rugUserIp + , rugZone + , rugKey + , rugOauthToken + , rugFields + , rugAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesGet@ which the +-- 'RollingUpdatesGet' request conforms to. +type RollingUpdatesGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + Get '[JSON] RollingUpdate + +-- | Returns information about an update. +-- +-- /See:/ 'rollingUpdatesGet' smart constructor. +data RollingUpdatesGet = RollingUpdatesGet + { _rugRollingUpdate :: !Text + , _rugQuotaUser :: !(Maybe Text) + , _rugPrettyPrint :: !Bool + , _rugProject :: !Text + , _rugUserIp :: !(Maybe Text) + , _rugZone :: !Text + , _rugKey :: !(Maybe Text) + , _rugOauthToken :: !(Maybe Text) + , _rugFields :: !(Maybe Text) + , _rugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rugRollingUpdate' +-- +-- * 'rugQuotaUser' +-- +-- * 'rugPrettyPrint' +-- +-- * 'rugProject' +-- +-- * 'rugUserIp' +-- +-- * 'rugZone' +-- +-- * 'rugKey' +-- +-- * 'rugOauthToken' +-- +-- * 'rugFields' +-- +-- * 'rugAlt' +rollingUpdatesGet + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesGet +rollingUpdatesGet pRugRollingUpdate_ pRugProject_ pRugZone_ = + RollingUpdatesGet + { _rugRollingUpdate = pRugRollingUpdate_ + , _rugQuotaUser = Nothing + , _rugPrettyPrint = True + , _rugProject = pRugProject_ + , _rugUserIp = Nothing + , _rugZone = pRugZone_ + , _rugKey = Nothing + , _rugOauthToken = Nothing + , _rugFields = Nothing + , _rugAlt = "json" + } + +-- | The name of the update. +rugRollingUpdate :: Lens' RollingUpdatesGet' Text +rugRollingUpdate + = lens _rugRollingUpdate + (\ s a -> s{_rugRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rugQuotaUser :: Lens' RollingUpdatesGet' (Maybe Text) +rugQuotaUser + = lens _rugQuotaUser (\ s a -> s{_rugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rugPrettyPrint :: Lens' RollingUpdatesGet' Bool +rugPrettyPrint + = lens _rugPrettyPrint + (\ s a -> s{_rugPrettyPrint = a}) + +-- | The Google Developers Console project name. +rugProject :: Lens' RollingUpdatesGet' Text +rugProject + = lens _rugProject (\ s a -> s{_rugProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rugUserIp :: Lens' RollingUpdatesGet' (Maybe Text) +rugUserIp + = lens _rugUserIp (\ s a -> s{_rugUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rugZone :: Lens' RollingUpdatesGet' Text +rugZone = lens _rugZone (\ s a -> s{_rugZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rugKey :: Lens' RollingUpdatesGet' (Maybe Text) +rugKey = lens _rugKey (\ s a -> s{_rugKey = a}) + +-- | OAuth 2.0 token for the current user. +rugOauthToken :: Lens' RollingUpdatesGet' (Maybe Text) +rugOauthToken + = lens _rugOauthToken + (\ s a -> s{_rugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rugFields :: Lens' RollingUpdatesGet' (Maybe Text) +rugFields + = lens _rugFields (\ s a -> s{_rugFields = a}) + +-- | Data format for the response. +rugAlt :: Lens' RollingUpdatesGet' Text +rugAlt = lens _rugAlt (\ s a -> s{_rugAlt = a}) + +instance GoogleRequest RollingUpdatesGet' where + type Rs RollingUpdatesGet' = RollingUpdate + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesGet{..} + = go _rugRollingUpdate _rugQuotaUser _rugPrettyPrint + _rugProject + _rugUserIp + _rugZone + _rugKey + _rugOauthToken + _rugFields + _rugAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesGetAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Insert.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Insert.hs new file mode 100644 index 000000000..16f873d7b --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Insert.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts and starts a new update. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesInsert@. +module Replicapoolupdater.RollingUpdates.Insert + ( + -- * REST Resource + RollingUpdatesInsertAPI + + -- * Creating a Request + , rollingUpdatesInsert + , RollingUpdatesInsert + + -- * Request Lenses + , ruiQuotaUser + , ruiPrettyPrint + , ruiProject + , ruiUserIp + , ruiZone + , ruiKey + , ruiOauthToken + , ruiFields + , ruiAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesInsert@ which the +-- 'RollingUpdatesInsert' request conforms to. +type RollingUpdatesInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> Post '[JSON] Operation + +-- | Inserts and starts a new update. +-- +-- /See:/ 'rollingUpdatesInsert' smart constructor. +data RollingUpdatesInsert = RollingUpdatesInsert + { _ruiQuotaUser :: !(Maybe Text) + , _ruiPrettyPrint :: !Bool + , _ruiProject :: !Text + , _ruiUserIp :: !(Maybe Text) + , _ruiZone :: !Text + , _ruiKey :: !(Maybe Text) + , _ruiOauthToken :: !(Maybe Text) + , _ruiFields :: !(Maybe Text) + , _ruiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruiQuotaUser' +-- +-- * 'ruiPrettyPrint' +-- +-- * 'ruiProject' +-- +-- * 'ruiUserIp' +-- +-- * 'ruiZone' +-- +-- * 'ruiKey' +-- +-- * 'ruiOauthToken' +-- +-- * 'ruiFields' +-- +-- * 'ruiAlt' +rollingUpdatesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesInsert +rollingUpdatesInsert pRuiProject_ pRuiZone_ = + RollingUpdatesInsert + { _ruiQuotaUser = Nothing + , _ruiPrettyPrint = True + , _ruiProject = pRuiProject_ + , _ruiUserIp = Nothing + , _ruiZone = pRuiZone_ + , _ruiKey = Nothing + , _ruiOauthToken = Nothing + , _ruiFields = Nothing + , _ruiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruiQuotaUser :: Lens' RollingUpdatesInsert' (Maybe Text) +ruiQuotaUser + = lens _ruiQuotaUser (\ s a -> s{_ruiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruiPrettyPrint :: Lens' RollingUpdatesInsert' Bool +ruiPrettyPrint + = lens _ruiPrettyPrint + (\ s a -> s{_ruiPrettyPrint = a}) + +-- | The Google Developers Console project name. +ruiProject :: Lens' RollingUpdatesInsert' Text +ruiProject + = lens _ruiProject (\ s a -> s{_ruiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruiUserIp :: Lens' RollingUpdatesInsert' (Maybe Text) +ruiUserIp + = lens _ruiUserIp (\ s a -> s{_ruiUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +ruiZone :: Lens' RollingUpdatesInsert' Text +ruiZone = lens _ruiZone (\ s a -> s{_ruiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruiKey :: Lens' RollingUpdatesInsert' (Maybe Text) +ruiKey = lens _ruiKey (\ s a -> s{_ruiKey = a}) + +-- | OAuth 2.0 token for the current user. +ruiOauthToken :: Lens' RollingUpdatesInsert' (Maybe Text) +ruiOauthToken + = lens _ruiOauthToken + (\ s a -> s{_ruiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ruiFields :: Lens' RollingUpdatesInsert' (Maybe Text) +ruiFields + = lens _ruiFields (\ s a -> s{_ruiFields = a}) + +-- | Data format for the response. +ruiAlt :: Lens' RollingUpdatesInsert' Text +ruiAlt = lens _ruiAlt (\ s a -> s{_ruiAlt = a}) + +instance GoogleRequest RollingUpdatesInsert' where + type Rs RollingUpdatesInsert' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesInsert{..} + = go _ruiQuotaUser _ruiPrettyPrint _ruiProject + _ruiUserIp + _ruiZone + _ruiKey + _ruiOauthToken + _ruiFields + _ruiAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesInsertAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/List.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/List.hs new file mode 100644 index 000000000..498423766 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/List.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists recent updates for a given managed instance group, in reverse +-- chronological order and paginated format. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesList@. +module Replicapoolupdater.RollingUpdates.List + ( + -- * REST Resource + RollingUpdatesListAPI + + -- * Creating a Request + , rollingUpdatesList + , RollingUpdatesList + + -- * Request Lenses + , rulQuotaUser + , rulPrettyPrint + , rulProject + , rulUserIp + , rulZone + , rulKey + , rulFilter + , rulPageToken + , rulOauthToken + , rulMaxResults + , rulFields + , rulAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesList@ which the +-- 'RollingUpdatesList' request conforms to. +type RollingUpdatesListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] RollingUpdateList + +-- | Lists recent updates for a given managed instance group, in reverse +-- chronological order and paginated format. +-- +-- /See:/ 'rollingUpdatesList' smart constructor. +data RollingUpdatesList = RollingUpdatesList + { _rulQuotaUser :: !(Maybe Text) + , _rulPrettyPrint :: !Bool + , _rulProject :: !Text + , _rulUserIp :: !(Maybe Text) + , _rulZone :: !Text + , _rulKey :: !(Maybe Text) + , _rulFilter :: !(Maybe Text) + , _rulPageToken :: !(Maybe Text) + , _rulOauthToken :: !(Maybe Text) + , _rulMaxResults :: !Word32 + , _rulFields :: !(Maybe Text) + , _rulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rulQuotaUser' +-- +-- * 'rulPrettyPrint' +-- +-- * 'rulProject' +-- +-- * 'rulUserIp' +-- +-- * 'rulZone' +-- +-- * 'rulKey' +-- +-- * 'rulFilter' +-- +-- * 'rulPageToken' +-- +-- * 'rulOauthToken' +-- +-- * 'rulMaxResults' +-- +-- * 'rulFields' +-- +-- * 'rulAlt' +rollingUpdatesList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesList +rollingUpdatesList pRulProject_ pRulZone_ = + RollingUpdatesList + { _rulQuotaUser = Nothing + , _rulPrettyPrint = True + , _rulProject = pRulProject_ + , _rulUserIp = Nothing + , _rulZone = pRulZone_ + , _rulKey = Nothing + , _rulFilter = Nothing + , _rulPageToken = Nothing + , _rulOauthToken = Nothing + , _rulMaxResults = 500 + , _rulFields = Nothing + , _rulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rulQuotaUser :: Lens' RollingUpdatesList' (Maybe Text) +rulQuotaUser + = lens _rulQuotaUser (\ s a -> s{_rulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rulPrettyPrint :: Lens' RollingUpdatesList' Bool +rulPrettyPrint + = lens _rulPrettyPrint + (\ s a -> s{_rulPrettyPrint = a}) + +-- | The Google Developers Console project name. +rulProject :: Lens' RollingUpdatesList' Text +rulProject + = lens _rulProject (\ s a -> s{_rulProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rulUserIp :: Lens' RollingUpdatesList' (Maybe Text) +rulUserIp + = lens _rulUserIp (\ s a -> s{_rulUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rulZone :: Lens' RollingUpdatesList' Text +rulZone = lens _rulZone (\ s a -> s{_rulZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rulKey :: Lens' RollingUpdatesList' (Maybe Text) +rulKey = lens _rulKey (\ s a -> s{_rulKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +rulFilter :: Lens' RollingUpdatesList' (Maybe Text) +rulFilter + = lens _rulFilter (\ s a -> s{_rulFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +rulPageToken :: Lens' RollingUpdatesList' (Maybe Text) +rulPageToken + = lens _rulPageToken (\ s a -> s{_rulPageToken = a}) + +-- | OAuth 2.0 token for the current user. +rulOauthToken :: Lens' RollingUpdatesList' (Maybe Text) +rulOauthToken + = lens _rulOauthToken + (\ s a -> s{_rulOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +rulMaxResults :: Lens' RollingUpdatesList' Word32 +rulMaxResults + = lens _rulMaxResults + (\ s a -> s{_rulMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +rulFields :: Lens' RollingUpdatesList' (Maybe Text) +rulFields + = lens _rulFields (\ s a -> s{_rulFields = a}) + +-- | Data format for the response. +rulAlt :: Lens' RollingUpdatesList' Text +rulAlt = lens _rulAlt (\ s a -> s{_rulAlt = a}) + +instance GoogleRequest RollingUpdatesList' where + type Rs RollingUpdatesList' = RollingUpdateList + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesList{..} + = go _rulQuotaUser _rulPrettyPrint _rulProject + _rulUserIp + _rulZone + _rulKey + _rulFilter + _rulPageToken + _rulOauthToken + (Just _rulMaxResults) + _rulFields + _rulAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesListAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/ListInstanceUpdates.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/ListInstanceUpdates.hs new file mode 100644 index 000000000..f2a329b1a --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/ListInstanceUpdates.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.ListInstanceUpdates +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the current status for each instance within a given update. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesListInstanceUpdates@. +module Replicapoolupdater.RollingUpdates.ListInstanceUpdates + ( + -- * REST Resource + RollingUpdatesListInstanceUpdatesAPI + + -- * Creating a Request + , rollingUpdatesListInstanceUpdates + , RollingUpdatesListInstanceUpdates + + -- * Request Lenses + , ruliuRollingUpdate + , ruliuQuotaUser + , ruliuPrettyPrint + , ruliuProject + , ruliuUserIp + , ruliuZone + , ruliuKey + , ruliuFilter + , ruliuPageToken + , ruliuOauthToken + , ruliuMaxResults + , ruliuFields + , ruliuAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesListInstanceUpdates@ which the +-- 'RollingUpdatesListInstanceUpdates' request conforms to. +type RollingUpdatesListInstanceUpdatesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + "instanceUpdates" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceUpdateList + +-- | Lists the current status for each instance within a given update. +-- +-- /See:/ 'rollingUpdatesListInstanceUpdates' smart constructor. +data RollingUpdatesListInstanceUpdates = RollingUpdatesListInstanceUpdates + { _ruliuRollingUpdate :: !Text + , _ruliuQuotaUser :: !(Maybe Text) + , _ruliuPrettyPrint :: !Bool + , _ruliuProject :: !Text + , _ruliuUserIp :: !(Maybe Text) + , _ruliuZone :: !Text + , _ruliuKey :: !(Maybe Text) + , _ruliuFilter :: !(Maybe Text) + , _ruliuPageToken :: !(Maybe Text) + , _ruliuOauthToken :: !(Maybe Text) + , _ruliuMaxResults :: !Word32 + , _ruliuFields :: !(Maybe Text) + , _ruliuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesListInstanceUpdates'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ruliuRollingUpdate' +-- +-- * 'ruliuQuotaUser' +-- +-- * 'ruliuPrettyPrint' +-- +-- * 'ruliuProject' +-- +-- * 'ruliuUserIp' +-- +-- * 'ruliuZone' +-- +-- * 'ruliuKey' +-- +-- * 'ruliuFilter' +-- +-- * 'ruliuPageToken' +-- +-- * 'ruliuOauthToken' +-- +-- * 'ruliuMaxResults' +-- +-- * 'ruliuFields' +-- +-- * 'ruliuAlt' +rollingUpdatesListInstanceUpdates + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesListInstanceUpdates +rollingUpdatesListInstanceUpdates pRuliuRollingUpdate_ pRuliuProject_ pRuliuZone_ = + RollingUpdatesListInstanceUpdates + { _ruliuRollingUpdate = pRuliuRollingUpdate_ + , _ruliuQuotaUser = Nothing + , _ruliuPrettyPrint = True + , _ruliuProject = pRuliuProject_ + , _ruliuUserIp = Nothing + , _ruliuZone = pRuliuZone_ + , _ruliuKey = Nothing + , _ruliuFilter = Nothing + , _ruliuPageToken = Nothing + , _ruliuOauthToken = Nothing + , _ruliuMaxResults = 500 + , _ruliuFields = Nothing + , _ruliuAlt = "json" + } + +-- | The name of the update. +ruliuRollingUpdate :: Lens' RollingUpdatesListInstanceUpdates' Text +ruliuRollingUpdate + = lens _ruliuRollingUpdate + (\ s a -> s{_ruliuRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ruliuQuotaUser :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuQuotaUser + = lens _ruliuQuotaUser + (\ s a -> s{_ruliuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ruliuPrettyPrint :: Lens' RollingUpdatesListInstanceUpdates' Bool +ruliuPrettyPrint + = lens _ruliuPrettyPrint + (\ s a -> s{_ruliuPrettyPrint = a}) + +-- | The Google Developers Console project name. +ruliuProject :: Lens' RollingUpdatesListInstanceUpdates' Text +ruliuProject + = lens _ruliuProject (\ s a -> s{_ruliuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ruliuUserIp :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuUserIp + = lens _ruliuUserIp (\ s a -> s{_ruliuUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +ruliuZone :: Lens' RollingUpdatesListInstanceUpdates' Text +ruliuZone + = lens _ruliuZone (\ s a -> s{_ruliuZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ruliuKey :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuKey = lens _ruliuKey (\ s a -> s{_ruliuKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +ruliuFilter :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuFilter + = lens _ruliuFilter (\ s a -> s{_ruliuFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +ruliuPageToken :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuPageToken + = lens _ruliuPageToken + (\ s a -> s{_ruliuPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ruliuOauthToken :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuOauthToken + = lens _ruliuOauthToken + (\ s a -> s{_ruliuOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +ruliuMaxResults :: Lens' RollingUpdatesListInstanceUpdates' Word32 +ruliuMaxResults + = lens _ruliuMaxResults + (\ s a -> s{_ruliuMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ruliuFields :: Lens' RollingUpdatesListInstanceUpdates' (Maybe Text) +ruliuFields + = lens _ruliuFields (\ s a -> s{_ruliuFields = a}) + +-- | Data format for the response. +ruliuAlt :: Lens' RollingUpdatesListInstanceUpdates' Text +ruliuAlt = lens _ruliuAlt (\ s a -> s{_ruliuAlt = a}) + +instance GoogleRequest + RollingUpdatesListInstanceUpdates' where + type Rs RollingUpdatesListInstanceUpdates' = + InstanceUpdateList + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u + RollingUpdatesListInstanceUpdates{..} + = go _ruliuRollingUpdate _ruliuQuotaUser + _ruliuPrettyPrint + _ruliuProject + _ruliuUserIp + _ruliuZone + _ruliuKey + _ruliuFilter + _ruliuPageToken + _ruliuOauthToken + (Just _ruliuMaxResults) + _ruliuFields + _ruliuAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesListInstanceUpdatesAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Pause.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Pause.hs new file mode 100644 index 000000000..3cdb27d16 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Pause.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Pause +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no +-- effect if invoked when the state of the update is PAUSED. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesPause@. +module Replicapoolupdater.RollingUpdates.Pause + ( + -- * REST Resource + RollingUpdatesPauseAPI + + -- * Creating a Request + , rollingUpdatesPause + , RollingUpdatesPause + + -- * Request Lenses + , rupRollingUpdate + , rupQuotaUser + , rupPrettyPrint + , rupProject + , rupUserIp + , rupZone + , rupKey + , rupOauthToken + , rupFields + , rupAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesPause@ which the +-- 'RollingUpdatesPause' request conforms to. +type RollingUpdatesPauseAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + "pause" :> Post '[JSON] Operation + +-- | Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no +-- effect if invoked when the state of the update is PAUSED. +-- +-- /See:/ 'rollingUpdatesPause' smart constructor. +data RollingUpdatesPause = RollingUpdatesPause + { _rupRollingUpdate :: !Text + , _rupQuotaUser :: !(Maybe Text) + , _rupPrettyPrint :: !Bool + , _rupProject :: !Text + , _rupUserIp :: !(Maybe Text) + , _rupZone :: !Text + , _rupKey :: !(Maybe Text) + , _rupOauthToken :: !(Maybe Text) + , _rupFields :: !(Maybe Text) + , _rupAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesPause'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rupRollingUpdate' +-- +-- * 'rupQuotaUser' +-- +-- * 'rupPrettyPrint' +-- +-- * 'rupProject' +-- +-- * 'rupUserIp' +-- +-- * 'rupZone' +-- +-- * 'rupKey' +-- +-- * 'rupOauthToken' +-- +-- * 'rupFields' +-- +-- * 'rupAlt' +rollingUpdatesPause + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesPause +rollingUpdatesPause pRupRollingUpdate_ pRupProject_ pRupZone_ = + RollingUpdatesPause + { _rupRollingUpdate = pRupRollingUpdate_ + , _rupQuotaUser = Nothing + , _rupPrettyPrint = True + , _rupProject = pRupProject_ + , _rupUserIp = Nothing + , _rupZone = pRupZone_ + , _rupKey = Nothing + , _rupOauthToken = Nothing + , _rupFields = Nothing + , _rupAlt = "json" + } + +-- | The name of the update. +rupRollingUpdate :: Lens' RollingUpdatesPause' Text +rupRollingUpdate + = lens _rupRollingUpdate + (\ s a -> s{_rupRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rupQuotaUser :: Lens' RollingUpdatesPause' (Maybe Text) +rupQuotaUser + = lens _rupQuotaUser (\ s a -> s{_rupQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rupPrettyPrint :: Lens' RollingUpdatesPause' Bool +rupPrettyPrint + = lens _rupPrettyPrint + (\ s a -> s{_rupPrettyPrint = a}) + +-- | The Google Developers Console project name. +rupProject :: Lens' RollingUpdatesPause' Text +rupProject + = lens _rupProject (\ s a -> s{_rupProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rupUserIp :: Lens' RollingUpdatesPause' (Maybe Text) +rupUserIp + = lens _rupUserIp (\ s a -> s{_rupUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rupZone :: Lens' RollingUpdatesPause' Text +rupZone = lens _rupZone (\ s a -> s{_rupZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rupKey :: Lens' RollingUpdatesPause' (Maybe Text) +rupKey = lens _rupKey (\ s a -> s{_rupKey = a}) + +-- | OAuth 2.0 token for the current user. +rupOauthToken :: Lens' RollingUpdatesPause' (Maybe Text) +rupOauthToken + = lens _rupOauthToken + (\ s a -> s{_rupOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rupFields :: Lens' RollingUpdatesPause' (Maybe Text) +rupFields + = lens _rupFields (\ s a -> s{_rupFields = a}) + +-- | Data format for the response. +rupAlt :: Lens' RollingUpdatesPause' Text +rupAlt = lens _rupAlt (\ s a -> s{_rupAlt = a}) + +instance GoogleRequest RollingUpdatesPause' where + type Rs RollingUpdatesPause' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesPause{..} + = go _rupRollingUpdate _rupQuotaUser _rupPrettyPrint + _rupProject + _rupUserIp + _rupZone + _rupKey + _rupOauthToken + _rupFields + _rupAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesPauseAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Resume.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Resume.hs new file mode 100644 index 000000000..0b4d1fc05 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Resume.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Resume +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Continues an update in PAUSED state. Has no effect if invoked when the +-- state of the update is ROLLED_OUT. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesResume@. +module Replicapoolupdater.RollingUpdates.Resume + ( + -- * REST Resource + RollingUpdatesResumeAPI + + -- * Creating a Request + , rollingUpdatesResume + , RollingUpdatesResume + + -- * Request Lenses + , rRollingUpdate + , rQuotaUser + , rPrettyPrint + , rProject + , rUserIp + , rZone + , rKey + , rOauthToken + , rFields + , rAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesResume@ which the +-- 'RollingUpdatesResume' request conforms to. +type RollingUpdatesResumeAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + "resume" :> Post '[JSON] Operation + +-- | Continues an update in PAUSED state. Has no effect if invoked when the +-- state of the update is ROLLED_OUT. +-- +-- /See:/ 'rollingUpdatesResume' smart constructor. +data RollingUpdatesResume = RollingUpdatesResume + { _rRollingUpdate :: !Text + , _rQuotaUser :: !(Maybe Text) + , _rPrettyPrint :: !Bool + , _rProject :: !Text + , _rUserIp :: !(Maybe Text) + , _rZone :: !Text + , _rKey :: !(Maybe Text) + , _rOauthToken :: !(Maybe Text) + , _rFields :: !(Maybe Text) + , _rAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesResume'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rRollingUpdate' +-- +-- * 'rQuotaUser' +-- +-- * 'rPrettyPrint' +-- +-- * 'rProject' +-- +-- * 'rUserIp' +-- +-- * 'rZone' +-- +-- * 'rKey' +-- +-- * 'rOauthToken' +-- +-- * 'rFields' +-- +-- * 'rAlt' +rollingUpdatesResume + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesResume +rollingUpdatesResume pRRollingUpdate_ pRProject_ pRZone_ = + RollingUpdatesResume + { _rRollingUpdate = pRRollingUpdate_ + , _rQuotaUser = Nothing + , _rPrettyPrint = True + , _rProject = pRProject_ + , _rUserIp = Nothing + , _rZone = pRZone_ + , _rKey = Nothing + , _rOauthToken = Nothing + , _rFields = Nothing + , _rAlt = "json" + } + +-- | The name of the update. +rRollingUpdate :: Lens' RollingUpdatesResume' Text +rRollingUpdate + = lens _rRollingUpdate + (\ s a -> s{_rRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rQuotaUser :: Lens' RollingUpdatesResume' (Maybe Text) +rQuotaUser + = lens _rQuotaUser (\ s a -> s{_rQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rPrettyPrint :: Lens' RollingUpdatesResume' Bool +rPrettyPrint + = lens _rPrettyPrint (\ s a -> s{_rPrettyPrint = a}) + +-- | The Google Developers Console project name. +rProject :: Lens' RollingUpdatesResume' Text +rProject = lens _rProject (\ s a -> s{_rProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rUserIp :: Lens' RollingUpdatesResume' (Maybe Text) +rUserIp = lens _rUserIp (\ s a -> s{_rUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rZone :: Lens' RollingUpdatesResume' Text +rZone = lens _rZone (\ s a -> s{_rZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rKey :: Lens' RollingUpdatesResume' (Maybe Text) +rKey = lens _rKey (\ s a -> s{_rKey = a}) + +-- | OAuth 2.0 token for the current user. +rOauthToken :: Lens' RollingUpdatesResume' (Maybe Text) +rOauthToken + = lens _rOauthToken (\ s a -> s{_rOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rFields :: Lens' RollingUpdatesResume' (Maybe Text) +rFields = lens _rFields (\ s a -> s{_rFields = a}) + +-- | Data format for the response. +rAlt :: Lens' RollingUpdatesResume' Text +rAlt = lens _rAlt (\ s a -> s{_rAlt = a}) + +instance GoogleRequest RollingUpdatesResume' where + type Rs RollingUpdatesResume' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesResume{..} + = go _rRollingUpdate _rQuotaUser _rPrettyPrint + _rProject + _rUserIp + _rZone + _rKey + _rOauthToken + _rFields + _rAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesResumeAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Rollback.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Rollback.hs new file mode 100644 index 000000000..52b8f8d1f --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/RollingUpdates/Rollback.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.RollingUpdates.Rollback +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no +-- effect if invoked when the state of the update is ROLLED_BACK. +-- +-- /See:/ for @ReplicapoolupdaterRollingUpdatesRollback@. +module Replicapoolupdater.RollingUpdates.Rollback + ( + -- * REST Resource + RollingUpdatesRollbackAPI + + -- * Creating a Request + , rollingUpdatesRollback + , RollingUpdatesRollback + + -- * Request Lenses + , rurRollingUpdate + , rurQuotaUser + , rurPrettyPrint + , rurProject + , rurUserIp + , rurZone + , rurKey + , rurOauthToken + , rurFields + , rurAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterRollingUpdatesRollback@ which the +-- 'RollingUpdatesRollback' request conforms to. +type RollingUpdatesRollbackAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "rollingUpdates" :> + Capture "rollingUpdate" Text :> + "rollback" :> Post '[JSON] Operation + +-- | Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no +-- effect if invoked when the state of the update is ROLLED_BACK. +-- +-- /See:/ 'rollingUpdatesRollback' smart constructor. +data RollingUpdatesRollback = RollingUpdatesRollback + { _rurRollingUpdate :: !Text + , _rurQuotaUser :: !(Maybe Text) + , _rurPrettyPrint :: !Bool + , _rurProject :: !Text + , _rurUserIp :: !(Maybe Text) + , _rurZone :: !Text + , _rurKey :: !(Maybe Text) + , _rurOauthToken :: !(Maybe Text) + , _rurFields :: !(Maybe Text) + , _rurAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RollingUpdatesRollback'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rurRollingUpdate' +-- +-- * 'rurQuotaUser' +-- +-- * 'rurPrettyPrint' +-- +-- * 'rurProject' +-- +-- * 'rurUserIp' +-- +-- * 'rurZone' +-- +-- * 'rurKey' +-- +-- * 'rurOauthToken' +-- +-- * 'rurFields' +-- +-- * 'rurAlt' +rollingUpdatesRollback + :: Text -- ^ 'rollingUpdate' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> RollingUpdatesRollback +rollingUpdatesRollback pRurRollingUpdate_ pRurProject_ pRurZone_ = + RollingUpdatesRollback + { _rurRollingUpdate = pRurRollingUpdate_ + , _rurQuotaUser = Nothing + , _rurPrettyPrint = True + , _rurProject = pRurProject_ + , _rurUserIp = Nothing + , _rurZone = pRurZone_ + , _rurKey = Nothing + , _rurOauthToken = Nothing + , _rurFields = Nothing + , _rurAlt = "json" + } + +-- | The name of the update. +rurRollingUpdate :: Lens' RollingUpdatesRollback' Text +rurRollingUpdate + = lens _rurRollingUpdate + (\ s a -> s{_rurRollingUpdate = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rurQuotaUser :: Lens' RollingUpdatesRollback' (Maybe Text) +rurQuotaUser + = lens _rurQuotaUser (\ s a -> s{_rurQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +rurPrettyPrint :: Lens' RollingUpdatesRollback' Bool +rurPrettyPrint + = lens _rurPrettyPrint + (\ s a -> s{_rurPrettyPrint = a}) + +-- | The Google Developers Console project name. +rurProject :: Lens' RollingUpdatesRollback' Text +rurProject + = lens _rurProject (\ s a -> s{_rurProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rurUserIp :: Lens' RollingUpdatesRollback' (Maybe Text) +rurUserIp + = lens _rurUserIp (\ s a -> s{_rurUserIp = a}) + +-- | The name of the zone in which the update\'s target resides. +rurZone :: Lens' RollingUpdatesRollback' Text +rurZone = lens _rurZone (\ s a -> s{_rurZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rurKey :: Lens' RollingUpdatesRollback' (Maybe Text) +rurKey = lens _rurKey (\ s a -> s{_rurKey = a}) + +-- | OAuth 2.0 token for the current user. +rurOauthToken :: Lens' RollingUpdatesRollback' (Maybe Text) +rurOauthToken + = lens _rurOauthToken + (\ s a -> s{_rurOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +rurFields :: Lens' RollingUpdatesRollback' (Maybe Text) +rurFields + = lens _rurFields (\ s a -> s{_rurFields = a}) + +-- | Data format for the response. +rurAlt :: Lens' RollingUpdatesRollback' Text +rurAlt = lens _rurAlt (\ s a -> s{_rurAlt = a}) + +instance GoogleRequest RollingUpdatesRollback' where + type Rs RollingUpdatesRollback' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u RollingUpdatesRollback{..} + = go _rurRollingUpdate _rurQuotaUser _rurPrettyPrint + _rurProject + _rurUserIp + _rurZone + _rurKey + _rurOauthToken + _rurFields + _rurAlt + where go + = clientWithRoute + (Proxy :: Proxy RollingUpdatesRollbackAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/Get.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/Get.hs new file mode 100644 index 000000000..f65fafbf6 --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.ZoneOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ for @ReplicapoolupdaterZoneOperationsGet@. +module Replicapoolupdater.ZoneOperations.Get + ( + -- * REST Resource + ZoneOperationsGetAPI + + -- * Creating a Request + , zoneOperationsGet + , ZoneOperationsGet + + -- * Request Lenses + , zogQuotaUser + , zogPrettyPrint + , zogProject + , zogOperation + , zogUserIp + , zogZone + , zogKey + , zogOauthToken + , zogFields + , zogAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterZoneOperationsGet@ which the +-- 'ZoneOperationsGet' request conforms to. +type ZoneOperationsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ 'zoneOperationsGet' smart constructor. +data ZoneOperationsGet = ZoneOperationsGet + { _zogQuotaUser :: !(Maybe Text) + , _zogPrettyPrint :: !Bool + , _zogProject :: !Text + , _zogOperation :: !Text + , _zogUserIp :: !(Maybe Text) + , _zogZone :: !Text + , _zogKey :: !(Maybe Text) + , _zogOauthToken :: !(Maybe Text) + , _zogFields :: !(Maybe Text) + , _zogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zogQuotaUser' +-- +-- * 'zogPrettyPrint' +-- +-- * 'zogProject' +-- +-- * 'zogOperation' +-- +-- * 'zogUserIp' +-- +-- * 'zogZone' +-- +-- * 'zogKey' +-- +-- * 'zogOauthToken' +-- +-- * 'zogFields' +-- +-- * 'zogAlt' +zoneOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsGet +zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ = + ZoneOperationsGet + { _zogQuotaUser = Nothing + , _zogPrettyPrint = True + , _zogProject = pZogProject_ + , _zogOperation = pZogOperation_ + , _zogUserIp = Nothing + , _zogZone = pZogZone_ + , _zogKey = Nothing + , _zogOauthToken = Nothing + , _zogFields = Nothing + , _zogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zogQuotaUser :: Lens' ZoneOperationsGet' (Maybe Text) +zogQuotaUser + = lens _zogQuotaUser (\ s a -> s{_zogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zogPrettyPrint :: Lens' ZoneOperationsGet' Bool +zogPrettyPrint + = lens _zogPrettyPrint + (\ s a -> s{_zogPrettyPrint = a}) + +-- | Name of the project scoping this request. +zogProject :: Lens' ZoneOperationsGet' Text +zogProject + = lens _zogProject (\ s a -> s{_zogProject = a}) + +-- | Name of the operation resource to return. +zogOperation :: Lens' ZoneOperationsGet' Text +zogOperation + = lens _zogOperation (\ s a -> s{_zogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zogUserIp :: Lens' ZoneOperationsGet' (Maybe Text) +zogUserIp + = lens _zogUserIp (\ s a -> s{_zogUserIp = a}) + +-- | Name of the zone scoping this request. +zogZone :: Lens' ZoneOperationsGet' Text +zogZone = lens _zogZone (\ s a -> s{_zogZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zogKey :: Lens' ZoneOperationsGet' (Maybe Text) +zogKey = lens _zogKey (\ s a -> s{_zogKey = a}) + +-- | OAuth 2.0 token for the current user. +zogOauthToken :: Lens' ZoneOperationsGet' (Maybe Text) +zogOauthToken + = lens _zogOauthToken + (\ s a -> s{_zogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zogFields :: Lens' ZoneOperationsGet' (Maybe Text) +zogFields + = lens _zogFields (\ s a -> s{_zogFields = a}) + +-- | Data format for the response. +zogAlt :: Lens' ZoneOperationsGet' Text +zogAlt = lens _zogAlt (\ s a -> s{_zogAlt = a}) + +instance GoogleRequest ZoneOperationsGet' where + type Rs ZoneOperationsGet' = Operation + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u ZoneOperationsGet{..} + = go _zogQuotaUser _zogPrettyPrint _zogProject + _zogOperation + _zogUserIp + _zogZone + _zogKey + _zogOauthToken + _zogFields + _zogAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsGetAPI) + r + u diff --git a/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/List.hs b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/List.hs new file mode 100644 index 000000000..03b5bd04f --- /dev/null +++ b/gogol-replicapool-updater/gen/Network/Google/Resource/Replicapoolupdater/ZoneOperations/List.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapoolupdater.ZoneOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Operation resources contained within the specified +-- zone. +-- +-- /See:/ for @ReplicapoolupdaterZoneOperationsList@. +module Replicapoolupdater.ZoneOperations.List + ( + -- * REST Resource + ZoneOperationsListAPI + + -- * Creating a Request + , zoneOperationsList + , ZoneOperationsList + + -- * Request Lenses + , zolQuotaUser + , zolPrettyPrint + , zolProject + , zolUserIp + , zolZone + , zolKey + , zolFilter + , zolPageToken + , zolOauthToken + , zolMaxResults + , zolFields + , zolAlt + ) where + +import Network.Google.InstanceGroupsUpdater.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolupdaterZoneOperationsList@ which the +-- 'ZoneOperationsList' request conforms to. +type ZoneOperationsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of Operation resources contained within the specified +-- zone. +-- +-- /See:/ 'zoneOperationsList' smart constructor. +data ZoneOperationsList = ZoneOperationsList + { _zolQuotaUser :: !(Maybe Text) + , _zolPrettyPrint :: !Bool + , _zolProject :: !Text + , _zolUserIp :: !(Maybe Text) + , _zolZone :: !Text + , _zolKey :: !(Maybe Text) + , _zolFilter :: !(Maybe Text) + , _zolPageToken :: !(Maybe Text) + , _zolOauthToken :: !(Maybe Text) + , _zolMaxResults :: !Word32 + , _zolFields :: !(Maybe Text) + , _zolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zolQuotaUser' +-- +-- * 'zolPrettyPrint' +-- +-- * 'zolProject' +-- +-- * 'zolUserIp' +-- +-- * 'zolZone' +-- +-- * 'zolKey' +-- +-- * 'zolFilter' +-- +-- * 'zolPageToken' +-- +-- * 'zolOauthToken' +-- +-- * 'zolMaxResults' +-- +-- * 'zolFields' +-- +-- * 'zolAlt' +zoneOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneOperationsList +zoneOperationsList pZolProject_ pZolZone_ = + ZoneOperationsList + { _zolQuotaUser = Nothing + , _zolPrettyPrint = True + , _zolProject = pZolProject_ + , _zolUserIp = Nothing + , _zolZone = pZolZone_ + , _zolKey = Nothing + , _zolFilter = Nothing + , _zolPageToken = Nothing + , _zolOauthToken = Nothing + , _zolMaxResults = 500 + , _zolFields = Nothing + , _zolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zolQuotaUser :: Lens' ZoneOperationsList' (Maybe Text) +zolQuotaUser + = lens _zolQuotaUser (\ s a -> s{_zolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zolPrettyPrint :: Lens' ZoneOperationsList' Bool +zolPrettyPrint + = lens _zolPrettyPrint + (\ s a -> s{_zolPrettyPrint = a}) + +-- | Name of the project scoping this request. +zolProject :: Lens' ZoneOperationsList' Text +zolProject + = lens _zolProject (\ s a -> s{_zolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zolUserIp :: Lens' ZoneOperationsList' (Maybe Text) +zolUserIp + = lens _zolUserIp (\ s a -> s{_zolUserIp = a}) + +-- | Name of the zone scoping this request. +zolZone :: Lens' ZoneOperationsList' Text +zolZone = lens _zolZone (\ s a -> s{_zolZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zolKey :: Lens' ZoneOperationsList' (Maybe Text) +zolKey = lens _zolKey (\ s a -> s{_zolKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +zolFilter :: Lens' ZoneOperationsList' (Maybe Text) +zolFilter + = lens _zolFilter (\ s a -> s{_zolFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +zolPageToken :: Lens' ZoneOperationsList' (Maybe Text) +zolPageToken + = lens _zolPageToken (\ s a -> s{_zolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zolOauthToken :: Lens' ZoneOperationsList' (Maybe Text) +zolOauthToken + = lens _zolOauthToken + (\ s a -> s{_zolOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +zolMaxResults :: Lens' ZoneOperationsList' Word32 +zolMaxResults + = lens _zolMaxResults + (\ s a -> s{_zolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zolFields :: Lens' ZoneOperationsList' (Maybe Text) +zolFields + = lens _zolFields (\ s a -> s{_zolFields = a}) + +-- | Data format for the response. +zolAlt :: Lens' ZoneOperationsList' Text +zolAlt = lens _zolAlt (\ s a -> s{_zolAlt = a}) + +instance GoogleRequest ZoneOperationsList' where + type Rs ZoneOperationsList' = OperationList + request + = requestWithRoute defReq instanceGroupsUpdaterURL + requestWithRoute r u ZoneOperationsList{..} + = go _zolQuotaUser _zolPrettyPrint _zolProject + _zolUserIp + _zolZone + _zolKey + _zolFilter + _zolPageToken + _zolOauthToken + (Just _zolMaxResults) + _zolFields + _zolAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsListAPI) + r + u diff --git a/gogol-replicapool-updater/gogol-replicapool-updater.cabal b/gogol-replicapool-updater/gogol-replicapool-updater.cabal new file mode 100644 index 000000000..8858716fb --- /dev/null +++ b/gogol-replicapool-updater/gogol-replicapool-updater.cabal @@ -0,0 +1,53 @@ +name: gogol-replicapool-updater +version: 0.0.1 +synopsis: Google Compute Engine Instance Group Updater API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Compute Engine Instance Group Updater API provides services + for updating groups of Compute Engine Instances. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.InstanceGroupsUpdater + , Network.Google.InstanceGroupsUpdater.Types + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Cancel + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Get + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Insert + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.List + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.ListInstanceUpdates + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Pause + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Resume + , Network.Google.Resource.Replicapoolupdater.RollingUpdates.Rollback + , Network.Google.Resource.Replicapoolupdater.ZoneOperations.Get + , Network.Google.Resource.Replicapoolupdater.ZoneOperations.List + + other-modules: + Network.Google.InstanceGroupsUpdater.Types.Product + , Network.Google.InstanceGroupsUpdater.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-replicapool-updater/src/.gitkeep b/gogol-replicapool-updater/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-replicapool/LICENSE b/gogol-replicapool/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-replicapool/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-replicapool/Makefile b/gogol-replicapool/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-replicapool/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-replicapool/README.md b/gogol-replicapool/README.md new file mode 100644 index 000000000..fc57b5d70 --- /dev/null +++ b/gogol-replicapool/README.md @@ -0,0 +1,28 @@ +# gogol-replicapool + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Compute Engine Instance Group Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-replicapool` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-replicapool/Setup.hs b/gogol-replicapool/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-replicapool/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-replicapool/gen/Network/Google/InstanceGroupsManager.hs b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager.hs new file mode 100644 index 000000000..89c62963d --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.InstanceGroupsManager +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Compute Engine Instance Group Manager API provides groups of +-- homogenous Compute Engine Instances. +-- +-- /See:/ +module Network.Google.InstanceGroupsManager + ( + -- * API + InstanceGroupsManagerAPI + , instanceGroupsManagerAPI + , instanceGroupsManagerURL + + -- * Service Methods + + -- * REST Resources + + -- ** ReplicapoolInstanceGroupManagersAbandonInstances + , module Replicapool.InstanceGroupManagers.AbandonInstances + + -- ** ReplicapoolInstanceGroupManagersDelete + , module Replicapool.InstanceGroupManagers.Delete + + -- ** ReplicapoolInstanceGroupManagersDeleteInstances + , module Replicapool.InstanceGroupManagers.DeleteInstances + + -- ** ReplicapoolInstanceGroupManagersGet + , module Replicapool.InstanceGroupManagers.Get + + -- ** ReplicapoolInstanceGroupManagersInsert + , module Replicapool.InstanceGroupManagers.Insert + + -- ** ReplicapoolInstanceGroupManagersList + , module Replicapool.InstanceGroupManagers.List + + -- ** ReplicapoolInstanceGroupManagersRecreateInstances + , module Replicapool.InstanceGroupManagers.RecreateInstances + + -- ** ReplicapoolInstanceGroupManagersResize + , module Replicapool.InstanceGroupManagers.Resize + + -- ** ReplicapoolInstanceGroupManagersSetInstanceTemplate + , module Replicapool.InstanceGroupManagers.SetInstanceTemplate + + -- ** ReplicapoolInstanceGroupManagersSetTargetPools + , module Replicapool.InstanceGroupManagers.SetTargetPools + + -- ** ReplicapoolZoneOperationsGet + , module Replicapool.ZoneOperations.Get + + -- ** ReplicapoolZoneOperationsList + , module Replicapool.ZoneOperations.List + + -- * Types + + -- ** InstanceGroupManagersSetInstanceTemplateRequest + , InstanceGroupManagersSetInstanceTemplateRequest + , instanceGroupManagersSetInstanceTemplateRequest + , igmsitrInstanceTemplate + + -- ** InstanceGroupManagersAbandonInstancesRequest + , InstanceGroupManagersAbandonInstancesRequest + , instanceGroupManagersAbandonInstancesRequest + , igmairInstances + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** InstanceGroupManagerList + , InstanceGroupManagerList + , instanceGroupManagerList + , igmlNextPageToken + , igmlKind + , igmlItems + , igmlSelfLink + , igmlId + + -- ** InstanceGroupManager + , InstanceGroupManager + , instanceGroupManager + , igmCurrentSize + , igmGroup + , igmKind + , igmFingerprint + , igmBaseInstanceName + , igmAutoHealingPolicies + , igmInstanceTemplate + , igmTargetSize + , igmSelfLink + , igmName + , igmCreationTimestamp + , igmId + , igmTargetPools + , igmDescription + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** ReplicaPoolAutoHealingPolicy + , ReplicaPoolAutoHealingPolicy + , replicaPoolAutoHealingPolicy + , rpahpHealthCheck + , rpahpActionType + + -- ** InstanceGroupManagersRecreateInstancesRequest + , InstanceGroupManagersRecreateInstancesRequest + , instanceGroupManagersRecreateInstancesRequest + , igmrirInstances + + -- ** InstanceGroupManagersDeleteInstancesRequest + , InstanceGroupManagersDeleteInstancesRequest + , instanceGroupManagersDeleteInstancesRequest + , igmdirInstances + + -- ** InstanceGroupManagersSetTargetPoolsRequest + , InstanceGroupManagersSetTargetPoolsRequest + , instanceGroupManagersSetTargetPoolsRequest + , igmstprFingerprint + , igmstprTargetPools + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude +import Network.Google.Resource.Replicapool.InstanceGroupManagers.AbandonInstances +import Network.Google.Resource.Replicapool.InstanceGroupManagers.Delete +import Network.Google.Resource.Replicapool.InstanceGroupManagers.DeleteInstances +import Network.Google.Resource.Replicapool.InstanceGroupManagers.Get +import Network.Google.Resource.Replicapool.InstanceGroupManagers.Insert +import Network.Google.Resource.Replicapool.InstanceGroupManagers.List +import Network.Google.Resource.Replicapool.InstanceGroupManagers.RecreateInstances +import Network.Google.Resource.Replicapool.InstanceGroupManagers.Resize +import Network.Google.Resource.Replicapool.InstanceGroupManagers.SetInstanceTemplate +import Network.Google.Resource.Replicapool.InstanceGroupManagers.SetTargetPools +import Network.Google.Resource.Replicapool.ZoneOperations.Get +import Network.Google.Resource.Replicapool.ZoneOperations.List + +{- $resources +TODO +-} + +type InstanceGroupsManagerAPI = + ZoneOperations :<|> InstanceGroupManagers + +instanceGroupsManagerAPI :: Proxy InstanceGroupsManagerAPI +instanceGroupsManagerAPI = Proxy diff --git a/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types.hs b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types.hs new file mode 100644 index 000000000..b1dc85cf0 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types.hs @@ -0,0 +1,124 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsManager.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsManager.Types + ( + -- * Service URL + instanceGroupsManagerURL + + -- * InstanceGroupManagersSetInstanceTemplateRequest + , InstanceGroupManagersSetInstanceTemplateRequest + , instanceGroupManagersSetInstanceTemplateRequest + , igmsitrInstanceTemplate + + -- * InstanceGroupManagersAbandonInstancesRequest + , InstanceGroupManagersAbandonInstancesRequest + , instanceGroupManagersAbandonInstancesRequest + , igmairInstances + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * InstanceGroupManagerList + , InstanceGroupManagerList + , instanceGroupManagerList + , igmlNextPageToken + , igmlKind + , igmlItems + , igmlSelfLink + , igmlId + + -- * InstanceGroupManager + , InstanceGroupManager + , instanceGroupManager + , igmCurrentSize + , igmGroup + , igmKind + , igmFingerprint + , igmBaseInstanceName + , igmAutoHealingPolicies + , igmInstanceTemplate + , igmTargetSize + , igmSelfLink + , igmName + , igmCreationTimestamp + , igmId + , igmTargetPools + , igmDescription + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * ReplicaPoolAutoHealingPolicy + , ReplicaPoolAutoHealingPolicy + , replicaPoolAutoHealingPolicy + , rpahpHealthCheck + , rpahpActionType + + -- * InstanceGroupManagersRecreateInstancesRequest + , InstanceGroupManagersRecreateInstancesRequest + , instanceGroupManagersRecreateInstancesRequest + , igmrirInstances + + -- * InstanceGroupManagersDeleteInstancesRequest + , InstanceGroupManagersDeleteInstancesRequest + , instanceGroupManagersDeleteInstancesRequest + , igmdirInstances + + -- * InstanceGroupManagersSetTargetPoolsRequest + , InstanceGroupManagersSetTargetPoolsRequest + , instanceGroupManagersSetTargetPoolsRequest + , igmstprFingerprint + , igmstprTargetPools + ) where + +import Network.Google.InstanceGroupsManager.Types.Product +import Network.Google.InstanceGroupsManager.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the Google Compute Engine Instance Group Manager API. +instanceGroupsManagerURL :: BaseURL +instanceGroupsManagerURL + = BaseUrl Https + "https://www.googleapis.com/replicapool/v1beta2/projects/" + 443 diff --git a/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Product.hs b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Product.hs new file mode 100644 index 000000000..b45597f4c --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Product.hs @@ -0,0 +1,954 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsManager.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsManager.Types.Product where + +import Network.Google.InstanceGroupsManager.Types.Sum +import Network.Google.Prelude + +-- +-- /See:/ 'instanceGroupManagersSetInstanceTemplateRequest' smart constructor. +newtype InstanceGroupManagersSetInstanceTemplateRequest = InstanceGroupManagersSetInstanceTemplateRequest + { _igmsitrInstanceTemplate :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplateRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmsitrInstanceTemplate' +instanceGroupManagersSetInstanceTemplateRequest + :: InstanceGroupManagersSetInstanceTemplateRequest +instanceGroupManagersSetInstanceTemplateRequest = + InstanceGroupManagersSetInstanceTemplateRequest + { _igmsitrInstanceTemplate = Nothing + } + +-- | The full URL to an Instance Template from which all new instances will +-- be created. +igmsitrInstanceTemplate :: Lens' InstanceGroupManagersSetInstanceTemplateRequest (Maybe Text) +igmsitrInstanceTemplate + = lens _igmsitrInstanceTemplate + (\ s a -> s{_igmsitrInstanceTemplate = a}) + +instance FromJSON + InstanceGroupManagersSetInstanceTemplateRequest where + parseJSON + = withObject + "InstanceGroupManagersSetInstanceTemplateRequest" + (\ o -> + InstanceGroupManagersSetInstanceTemplateRequest <$> + (o .:? "instanceTemplate")) + +instance ToJSON + InstanceGroupManagersSetInstanceTemplateRequest where + toJSON + InstanceGroupManagersSetInstanceTemplateRequest{..} + = object + (catMaybes + [("instanceTemplate" .=) <$> + _igmsitrInstanceTemplate]) + +-- +-- /See:/ 'instanceGroupManagersAbandonInstancesRequest' smart constructor. +newtype InstanceGroupManagersAbandonInstancesRequest = InstanceGroupManagersAbandonInstancesRequest + { _igmairInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersAbandonInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmairInstances' +instanceGroupManagersAbandonInstancesRequest + :: InstanceGroupManagersAbandonInstancesRequest +instanceGroupManagersAbandonInstancesRequest = + InstanceGroupManagersAbandonInstancesRequest + { _igmairInstances = Nothing + } + +-- | The names of one or more instances to abandon. For example: { +-- \'instances\': [ \'instance-c3po\', \'instance-r2d2\' ] } +igmairInstances :: Lens' InstanceGroupManagersAbandonInstancesRequest [Text] +igmairInstances + = lens _igmairInstances + (\ s a -> s{_igmairInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersAbandonInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersAbandonInstancesRequest" + (\ o -> + InstanceGroupManagersAbandonInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersAbandonInstancesRequest where + toJSON + InstanceGroupManagersAbandonInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmairInstances]) + +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "replicapool#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +-- | A token used to continue a truncated list request (output only). +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | Type of resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +-- | The operation resources. +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +-- | Server defined URL for this resource (output only). +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +-- | Unique identifier for the resource; defined by the server (output only). +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "replicapool#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- +-- /See:/ 'instanceGroupManagerList' smart constructor. +data InstanceGroupManagerList = InstanceGroupManagerList + { _igmlNextPageToken :: !(Maybe Text) + , _igmlKind :: !Text + , _igmlItems :: !(Maybe [Maybe InstanceGroupManager]) + , _igmlSelfLink :: !(Maybe Text) + , _igmlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagerList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlNextPageToken' +-- +-- * 'igmlKind' +-- +-- * 'igmlItems' +-- +-- * 'igmlSelfLink' +-- +-- * 'igmlId' +instanceGroupManagerList + :: InstanceGroupManagerList +instanceGroupManagerList = + InstanceGroupManagerList + { _igmlNextPageToken = Nothing + , _igmlKind = "replicapool#instanceGroupManagerList" + , _igmlItems = Nothing + , _igmlSelfLink = Nothing + , _igmlId = Nothing + } + +-- | A token used to continue a truncated list request (output only). +igmlNextPageToken :: Lens' InstanceGroupManagerList (Maybe Text) +igmlNextPageToken + = lens _igmlNextPageToken + (\ s a -> s{_igmlNextPageToken = a}) + +-- | Type of resource. +igmlKind :: Lens' InstanceGroupManagerList Text +igmlKind = lens _igmlKind (\ s a -> s{_igmlKind = a}) + +-- | A list of instance resources. +igmlItems :: Lens' InstanceGroupManagerList [Maybe InstanceGroupManager] +igmlItems + = lens _igmlItems (\ s a -> s{_igmlItems = a}) . + _Default + . _Coerce + +-- | Server defined URL for this resource (output only). +igmlSelfLink :: Lens' InstanceGroupManagerList (Maybe Text) +igmlSelfLink + = lens _igmlSelfLink (\ s a -> s{_igmlSelfLink = a}) + +-- | Unique identifier for the resource; defined by the server (output only). +igmlId :: Lens' InstanceGroupManagerList (Maybe Text) +igmlId = lens _igmlId (\ s a -> s{_igmlId = a}) + +instance FromJSON InstanceGroupManagerList where + parseJSON + = withObject "InstanceGroupManagerList" + (\ o -> + InstanceGroupManagerList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= + "replicapool#instanceGroupManagerList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON InstanceGroupManagerList where + toJSON InstanceGroupManagerList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _igmlNextPageToken, + Just ("kind" .= _igmlKind), + ("items" .=) <$> _igmlItems, + ("selfLink" .=) <$> _igmlSelfLink, + ("id" .=) <$> _igmlId]) + +-- | An Instance Group Manager resource. +-- +-- /See:/ 'instanceGroupManager' smart constructor. +data InstanceGroupManager = InstanceGroupManager + { _igmCurrentSize :: !(Maybe Int32) + , _igmGroup :: !(Maybe Text) + , _igmKind :: !Text + , _igmFingerprint :: !(Maybe Word8) + , _igmBaseInstanceName :: !(Maybe Text) + , _igmAutoHealingPolicies :: !(Maybe [Maybe ReplicaPoolAutoHealingPolicy]) + , _igmInstanceTemplate :: !(Maybe Text) + , _igmTargetSize :: !(Maybe Int32) + , _igmSelfLink :: !(Maybe Text) + , _igmName :: !(Maybe Text) + , _igmCreationTimestamp :: !(Maybe Text) + , _igmId :: !(Maybe Word64) + , _igmTargetPools :: !(Maybe [Text]) + , _igmDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManager' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmCurrentSize' +-- +-- * 'igmGroup' +-- +-- * 'igmKind' +-- +-- * 'igmFingerprint' +-- +-- * 'igmBaseInstanceName' +-- +-- * 'igmAutoHealingPolicies' +-- +-- * 'igmInstanceTemplate' +-- +-- * 'igmTargetSize' +-- +-- * 'igmSelfLink' +-- +-- * 'igmName' +-- +-- * 'igmCreationTimestamp' +-- +-- * 'igmId' +-- +-- * 'igmTargetPools' +-- +-- * 'igmDescription' +instanceGroupManager + :: InstanceGroupManager +instanceGroupManager = + InstanceGroupManager + { _igmCurrentSize = Nothing + , _igmGroup = Nothing + , _igmKind = "replicapool#instanceGroupManager" + , _igmFingerprint = Nothing + , _igmBaseInstanceName = Nothing + , _igmAutoHealingPolicies = Nothing + , _igmInstanceTemplate = Nothing + , _igmTargetSize = Nothing + , _igmSelfLink = Nothing + , _igmName = Nothing + , _igmCreationTimestamp = Nothing + , _igmId = Nothing + , _igmTargetPools = Nothing + , _igmDescription = Nothing + } + +-- | [Output only] The number of instances that currently exist and are a +-- part of this group. This includes instances that are starting but are +-- not yet RUNNING, and instances that are in the process of being deleted +-- or abandoned. +igmCurrentSize :: Lens' InstanceGroupManager (Maybe Int32) +igmCurrentSize + = lens _igmCurrentSize + (\ s a -> s{_igmCurrentSize = a}) + +-- | [Output only] The full URL of the instance group created by the manager. +-- This group contains all of the instances being managed, and cannot +-- contain non-managed instances. +igmGroup :: Lens' InstanceGroupManager (Maybe Text) +igmGroup = lens _igmGroup (\ s a -> s{_igmGroup = a}) + +-- | [Output only] The resource type. Always +-- replicapool#instanceGroupManager. +igmKind :: Lens' InstanceGroupManager Text +igmKind = lens _igmKind (\ s a -> s{_igmKind = a}) + +-- | [Output only] Fingerprint of the instance group manager. This field is +-- used for optimistic locking. An up-to-date fingerprint must be provided +-- in order to modify the Instance Group Manager resource. +igmFingerprint :: Lens' InstanceGroupManager (Maybe Word8) +igmFingerprint + = lens _igmFingerprint + (\ s a -> s{_igmFingerprint = a}) + +-- | The base instance name to use for instances in this group. The value +-- must be a valid RFC1035 name. Supported characters are lowercase +-- letters, numbers, and hyphens (-). Instances are named by appending a +-- hyphen and a random four-character string to the base instance name. +igmBaseInstanceName :: Lens' InstanceGroupManager (Maybe Text) +igmBaseInstanceName + = lens _igmBaseInstanceName + (\ s a -> s{_igmBaseInstanceName = a}) + +-- | The autohealing policy for this managed instance group. You can specify +-- only one value. +igmAutoHealingPolicies :: Lens' InstanceGroupManager [Maybe ReplicaPoolAutoHealingPolicy] +igmAutoHealingPolicies + = lens _igmAutoHealingPolicies + (\ s a -> s{_igmAutoHealingPolicies = a}) + . _Default + . _Coerce + +-- | The full URL to an instance template from which all new instances will +-- be created. +igmInstanceTemplate :: Lens' InstanceGroupManager (Maybe Text) +igmInstanceTemplate + = lens _igmInstanceTemplate + (\ s a -> s{_igmInstanceTemplate = a}) + +-- | [Output only] The number of instances that the manager is attempting to +-- maintain. Deleting or abandoning instances affects this number, as does +-- resizing the group. +igmTargetSize :: Lens' InstanceGroupManager (Maybe Int32) +igmTargetSize + = lens _igmTargetSize + (\ s a -> s{_igmTargetSize = a}) + +-- | [Output only] The fully qualified URL for this resource. +igmSelfLink :: Lens' InstanceGroupManager (Maybe Text) +igmSelfLink + = lens _igmSelfLink (\ s a -> s{_igmSelfLink = a}) + +-- | The name of the instance group manager. Must be 1-63 characters long and +-- comply with RFC1035. Supported characters include lowercase letters, +-- numbers, and hyphens. +igmName :: Lens' InstanceGroupManager (Maybe Text) +igmName = lens _igmName (\ s a -> s{_igmName = a}) + +-- | [Output only] The time the instance group manager was created, in +-- RFC3339 text format. +igmCreationTimestamp :: Lens' InstanceGroupManager (Maybe Text) +igmCreationTimestamp + = lens _igmCreationTimestamp + (\ s a -> s{_igmCreationTimestamp = a}) + +-- | [Output only] A server-assigned unique identifier for the resource. +igmId :: Lens' InstanceGroupManager (Maybe Word64) +igmId = lens _igmId (\ s a -> s{_igmId = a}) + +-- | The full URL of all target pools to which new instances in the group are +-- added. Updating the target pool values does not affect existing +-- instances. +igmTargetPools :: Lens' InstanceGroupManager [Text] +igmTargetPools + = lens _igmTargetPools + (\ s a -> s{_igmTargetPools = a}) + . _Default + . _Coerce + +-- | An optional textual description of the instance group manager. +igmDescription :: Lens' InstanceGroupManager (Maybe Text) +igmDescription + = lens _igmDescription + (\ s a -> s{_igmDescription = a}) + +instance FromJSON InstanceGroupManager where + parseJSON + = withObject "InstanceGroupManager" + (\ o -> + InstanceGroupManager <$> + (o .:? "currentSize") <*> (o .:? "group") <*> + (o .:? "kind" .!= "replicapool#instanceGroupManager") + <*> (o .:? "fingerprint") + <*> (o .:? "baseInstanceName") + <*> (o .:? "autoHealingPolicies" .!= mempty) + <*> (o .:? "instanceTemplate") + <*> (o .:? "targetSize") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "targetPools" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON InstanceGroupManager where + toJSON InstanceGroupManager{..} + = object + (catMaybes + [("currentSize" .=) <$> _igmCurrentSize, + ("group" .=) <$> _igmGroup, + Just ("kind" .= _igmKind), + ("fingerprint" .=) <$> _igmFingerprint, + ("baseInstanceName" .=) <$> _igmBaseInstanceName, + ("autoHealingPolicies" .=) <$> + _igmAutoHealingPolicies, + ("instanceTemplate" .=) <$> _igmInstanceTemplate, + ("targetSize" .=) <$> _igmTargetSize, + ("selfLink" .=) <$> _igmSelfLink, + ("name" .=) <$> _igmName, + ("creationTimestamp" .=) <$> _igmCreationTimestamp, + ("id" .=) <$> _igmId, + ("targetPools" .=) <$> _igmTargetPools, + ("description" .=) <$> _igmDescription]) + +-- | An operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "replicapool#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target ID which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested, in RFC3339 +-- text format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | [Output only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the operation +-- will be complete. This number should be monotonically increasing as the +-- operation progresses. +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server, in +-- RFC3339 text format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output only] Type of the resource. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors occurred during processing of this operation, +-- this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | [Output only] If operation fails, the HTTP error message returned. +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. Only +-- available when performing per-zone operations. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | [Output Only] If there are issues with this operation, a warning is +-- returned. +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +-- | [Output only] If operation fails, the HTTP error status code returned. +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +-- | [Output Only] User who requested the operation, for example: +-- user\'example.com. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server-defined fully-qualified URL for this resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] The time that this operation was requested, in RFC3339 +-- text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +-- | [Output Only] The time that this operation was completed, in RFC3339 +-- text format. +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource, generated by the +-- server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | [Output only] Type of the operation. Operations include insert, update, +-- and delete. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. Only +-- available when performing regional operations. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Output only] An optional identifier specified by the client when the +-- mutation was initiated. Must be unique for all operation resources in +-- the project. +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "replicapool#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- +-- /See:/ 'replicaPoolAutoHealingPolicy' smart constructor. +data ReplicaPoolAutoHealingPolicy = ReplicaPoolAutoHealingPolicy + { _rpahpHealthCheck :: !(Maybe Text) + , _rpahpActionType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReplicaPoolAutoHealingPolicy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rpahpHealthCheck' +-- +-- * 'rpahpActionType' +replicaPoolAutoHealingPolicy + :: ReplicaPoolAutoHealingPolicy +replicaPoolAutoHealingPolicy = + ReplicaPoolAutoHealingPolicy + { _rpahpHealthCheck = Nothing + , _rpahpActionType = Nothing + } + +-- | The URL for the HealthCheck that signals autohealing. +rpahpHealthCheck :: Lens' ReplicaPoolAutoHealingPolicy (Maybe Text) +rpahpHealthCheck + = lens _rpahpHealthCheck + (\ s a -> s{_rpahpHealthCheck = a}) + +-- | The action to perform when an instance becomes unhealthy. Possible +-- values are RECREATE or REBOOT. RECREATE replaces an unhealthy instance +-- with a new instance that is based on the instance template for this +-- managed instance group. REBOOT performs a soft reboot on an instance. If +-- the instance cannot reboot, the instance performs a hard restart. +rpahpActionType :: Lens' ReplicaPoolAutoHealingPolicy (Maybe Text) +rpahpActionType + = lens _rpahpActionType + (\ s a -> s{_rpahpActionType = a}) + +instance FromJSON ReplicaPoolAutoHealingPolicy where + parseJSON + = withObject "ReplicaPoolAutoHealingPolicy" + (\ o -> + ReplicaPoolAutoHealingPolicy <$> + (o .:? "healthCheck") <*> (o .:? "actionType")) + +instance ToJSON ReplicaPoolAutoHealingPolicy where + toJSON ReplicaPoolAutoHealingPolicy{..} + = object + (catMaybes + [("healthCheck" .=) <$> _rpahpHealthCheck, + ("actionType" .=) <$> _rpahpActionType]) + +-- +-- /See:/ 'instanceGroupManagersRecreateInstancesRequest' smart constructor. +newtype InstanceGroupManagersRecreateInstancesRequest = InstanceGroupManagersRecreateInstancesRequest + { _igmrirInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersRecreateInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmrirInstances' +instanceGroupManagersRecreateInstancesRequest + :: InstanceGroupManagersRecreateInstancesRequest +instanceGroupManagersRecreateInstancesRequest = + InstanceGroupManagersRecreateInstancesRequest + { _igmrirInstances = Nothing + } + +-- | The names of one or more instances to recreate. For example: { +-- \'instances\': [ \'instance-c3po\', \'instance-r2d2\' ] } +igmrirInstances :: Lens' InstanceGroupManagersRecreateInstancesRequest [Text] +igmrirInstances + = lens _igmrirInstances + (\ s a -> s{_igmrirInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersRecreateInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersRecreateInstancesRequest" + (\ o -> + InstanceGroupManagersRecreateInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersRecreateInstancesRequest where + toJSON + InstanceGroupManagersRecreateInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmrirInstances]) + +-- +-- /See:/ 'instanceGroupManagersDeleteInstancesRequest' smart constructor. +newtype InstanceGroupManagersDeleteInstancesRequest = InstanceGroupManagersDeleteInstancesRequest + { _igmdirInstances :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDeleteInstancesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdirInstances' +instanceGroupManagersDeleteInstancesRequest + :: InstanceGroupManagersDeleteInstancesRequest +instanceGroupManagersDeleteInstancesRequest = + InstanceGroupManagersDeleteInstancesRequest + { _igmdirInstances = Nothing + } + +-- | Names of instances to delete. Example: \'instance-foo\', +-- \'instance-bar\' +igmdirInstances :: Lens' InstanceGroupManagersDeleteInstancesRequest [Text] +igmdirInstances + = lens _igmdirInstances + (\ s a -> s{_igmdirInstances = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersDeleteInstancesRequest where + parseJSON + = withObject + "InstanceGroupManagersDeleteInstancesRequest" + (\ o -> + InstanceGroupManagersDeleteInstancesRequest <$> + (o .:? "instances" .!= mempty)) + +instance ToJSON + InstanceGroupManagersDeleteInstancesRequest where + toJSON + InstanceGroupManagersDeleteInstancesRequest{..} + = object + (catMaybes [("instances" .=) <$> _igmdirInstances]) + +-- +-- /See:/ 'instanceGroupManagersSetTargetPoolsRequest' smart constructor. +data InstanceGroupManagersSetTargetPoolsRequest = InstanceGroupManagersSetTargetPoolsRequest + { _igmstprFingerprint :: !(Maybe Word8) + , _igmstprTargetPools :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetTargetPoolsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmstprFingerprint' +-- +-- * 'igmstprTargetPools' +instanceGroupManagersSetTargetPoolsRequest + :: InstanceGroupManagersSetTargetPoolsRequest +instanceGroupManagersSetTargetPoolsRequest = + InstanceGroupManagersSetTargetPoolsRequest + { _igmstprFingerprint = Nothing + , _igmstprTargetPools = Nothing + } + +-- | The current fingerprint of the Instance Group Manager resource. If this +-- does not match the server-side fingerprint of the resource, then the +-- request will be rejected. +igmstprFingerprint :: Lens' InstanceGroupManagersSetTargetPoolsRequest (Maybe Word8) +igmstprFingerprint + = lens _igmstprFingerprint + (\ s a -> s{_igmstprFingerprint = a}) + +-- | A list of fully-qualified URLs to existing Target Pool resources. New +-- instances in the Instance Group Manager will be added to the specified +-- target pools; existing instances are not affected. +igmstprTargetPools :: Lens' InstanceGroupManagersSetTargetPoolsRequest [Text] +igmstprTargetPools + = lens _igmstprTargetPools + (\ s a -> s{_igmstprTargetPools = a}) + . _Default + . _Coerce + +instance FromJSON + InstanceGroupManagersSetTargetPoolsRequest where + parseJSON + = withObject + "InstanceGroupManagersSetTargetPoolsRequest" + (\ o -> + InstanceGroupManagersSetTargetPoolsRequest <$> + (o .:? "fingerprint") <*> + (o .:? "targetPools" .!= mempty)) + +instance ToJSON + InstanceGroupManagersSetTargetPoolsRequest where + toJSON InstanceGroupManagersSetTargetPoolsRequest{..} + = object + (catMaybes + [("fingerprint" .=) <$> _igmstprFingerprint, + ("targetPools" .=) <$> _igmstprTargetPools]) diff --git a/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Sum.hs b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Sum.hs new file mode 100644 index 000000000..2ee0d9014 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/InstanceGroupsManager/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroupsManager.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroupsManager.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/AbandonInstances.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/AbandonInstances.hs new file mode 100644 index 000000000..64e4ce947 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/AbandonInstances.hs @@ -0,0 +1,197 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.AbandonInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes the specified instances from the managed instance group, and +-- from any target pools of which they were members, without deleting the +-- instances. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersAbandonInstances@. +module Replicapool.InstanceGroupManagers.AbandonInstances + ( + -- * REST Resource + InstanceGroupManagersAbandonInstancesAPI + + -- * Creating a Request + , instanceGroupManagersAbandonInstances + , InstanceGroupManagersAbandonInstances + + -- * Request Lenses + , igmaiQuotaUser + , igmaiPrettyPrint + , igmaiProject + , igmaiInstanceGroupManager + , igmaiUserIp + , igmaiZone + , igmaiKey + , igmaiOauthToken + , igmaiFields + , igmaiAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersAbandonInstances@ which the +-- 'InstanceGroupManagersAbandonInstances' request conforms to. +type InstanceGroupManagersAbandonInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "abandonInstances" :> Post '[JSON] Operation + +-- | Removes the specified instances from the managed instance group, and +-- from any target pools of which they were members, without deleting the +-- instances. +-- +-- /See:/ 'instanceGroupManagersAbandonInstances' smart constructor. +data InstanceGroupManagersAbandonInstances = InstanceGroupManagersAbandonInstances + { _igmaiQuotaUser :: !(Maybe Text) + , _igmaiPrettyPrint :: !Bool + , _igmaiProject :: !Text + , _igmaiInstanceGroupManager :: !Text + , _igmaiUserIp :: !(Maybe Text) + , _igmaiZone :: !Text + , _igmaiKey :: !(Maybe Text) + , _igmaiOauthToken :: !(Maybe Text) + , _igmaiFields :: !(Maybe Text) + , _igmaiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersAbandonInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmaiQuotaUser' +-- +-- * 'igmaiPrettyPrint' +-- +-- * 'igmaiProject' +-- +-- * 'igmaiInstanceGroupManager' +-- +-- * 'igmaiUserIp' +-- +-- * 'igmaiZone' +-- +-- * 'igmaiKey' +-- +-- * 'igmaiOauthToken' +-- +-- * 'igmaiFields' +-- +-- * 'igmaiAlt' +instanceGroupManagersAbandonInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersAbandonInstances +instanceGroupManagersAbandonInstances pIgmaiProject_ pIgmaiInstanceGroupManager_ pIgmaiZone_ = + InstanceGroupManagersAbandonInstances + { _igmaiQuotaUser = Nothing + , _igmaiPrettyPrint = True + , _igmaiProject = pIgmaiProject_ + , _igmaiInstanceGroupManager = pIgmaiInstanceGroupManager_ + , _igmaiUserIp = Nothing + , _igmaiZone = pIgmaiZone_ + , _igmaiKey = Nothing + , _igmaiOauthToken = Nothing + , _igmaiFields = Nothing + , _igmaiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmaiQuotaUser :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiQuotaUser + = lens _igmaiQuotaUser + (\ s a -> s{_igmaiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmaiPrettyPrint :: Lens' InstanceGroupManagersAbandonInstances' Bool +igmaiPrettyPrint + = lens _igmaiPrettyPrint + (\ s a -> s{_igmaiPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmaiProject :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiProject + = lens _igmaiProject (\ s a -> s{_igmaiProject = a}) + +-- | The name of the instance group manager. +igmaiInstanceGroupManager :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiInstanceGroupManager + = lens _igmaiInstanceGroupManager + (\ s a -> s{_igmaiInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmaiUserIp :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiUserIp + = lens _igmaiUserIp (\ s a -> s{_igmaiUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmaiZone :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiZone + = lens _igmaiZone (\ s a -> s{_igmaiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmaiKey :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiKey = lens _igmaiKey (\ s a -> s{_igmaiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmaiOauthToken :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiOauthToken + = lens _igmaiOauthToken + (\ s a -> s{_igmaiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmaiFields :: Lens' InstanceGroupManagersAbandonInstances' (Maybe Text) +igmaiFields + = lens _igmaiFields (\ s a -> s{_igmaiFields = a}) + +-- | Data format for the response. +igmaiAlt :: Lens' InstanceGroupManagersAbandonInstances' Text +igmaiAlt = lens _igmaiAlt (\ s a -> s{_igmaiAlt = a}) + +instance GoogleRequest + InstanceGroupManagersAbandonInstances' where + type Rs InstanceGroupManagersAbandonInstances' = + Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u + InstanceGroupManagersAbandonInstances{..} + = go _igmaiQuotaUser _igmaiPrettyPrint _igmaiProject + _igmaiInstanceGroupManager + _igmaiUserIp + _igmaiZone + _igmaiKey + _igmaiOauthToken + _igmaiFields + _igmaiAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersAbandonInstancesAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Delete.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Delete.hs new file mode 100644 index 000000000..464093c4a --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Delete.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the instance group manager and all instances contained within. +-- If you\'d like to delete the manager without deleting the instances, you +-- must first abandon the instances to remove them from the group. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersDelete@. +module Replicapool.InstanceGroupManagers.Delete + ( + -- * REST Resource + InstanceGroupManagersDeleteAPI + + -- * Creating a Request + , instanceGroupManagersDelete + , InstanceGroupManagersDelete + + -- * Request Lenses + , igmdQuotaUser + , igmdPrettyPrint + , igmdProject + , igmdInstanceGroupManager + , igmdUserIp + , igmdZone + , igmdKey + , igmdOauthToken + , igmdFields + , igmdAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersDelete@ which the +-- 'InstanceGroupManagersDelete' request conforms to. +type InstanceGroupManagersDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + Delete '[JSON] Operation + +-- | Deletes the instance group manager and all instances contained within. +-- If you\'d like to delete the manager without deleting the instances, you +-- must first abandon the instances to remove them from the group. +-- +-- /See:/ 'instanceGroupManagersDelete' smart constructor. +data InstanceGroupManagersDelete = InstanceGroupManagersDelete + { _igmdQuotaUser :: !(Maybe Text) + , _igmdPrettyPrint :: !Bool + , _igmdProject :: !Text + , _igmdInstanceGroupManager :: !Text + , _igmdUserIp :: !(Maybe Text) + , _igmdZone :: !Text + , _igmdKey :: !(Maybe Text) + , _igmdOauthToken :: !(Maybe Text) + , _igmdFields :: !(Maybe Text) + , _igmdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdQuotaUser' +-- +-- * 'igmdPrettyPrint' +-- +-- * 'igmdProject' +-- +-- * 'igmdInstanceGroupManager' +-- +-- * 'igmdUserIp' +-- +-- * 'igmdZone' +-- +-- * 'igmdKey' +-- +-- * 'igmdOauthToken' +-- +-- * 'igmdFields' +-- +-- * 'igmdAlt' +instanceGroupManagersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersDelete +instanceGroupManagersDelete pIgmdProject_ pIgmdInstanceGroupManager_ pIgmdZone_ = + InstanceGroupManagersDelete + { _igmdQuotaUser = Nothing + , _igmdPrettyPrint = True + , _igmdProject = pIgmdProject_ + , _igmdInstanceGroupManager = pIgmdInstanceGroupManager_ + , _igmdUserIp = Nothing + , _igmdZone = pIgmdZone_ + , _igmdKey = Nothing + , _igmdOauthToken = Nothing + , _igmdFields = Nothing + , _igmdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmdQuotaUser :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdQuotaUser + = lens _igmdQuotaUser + (\ s a -> s{_igmdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmdPrettyPrint :: Lens' InstanceGroupManagersDelete' Bool +igmdPrettyPrint + = lens _igmdPrettyPrint + (\ s a -> s{_igmdPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmdProject :: Lens' InstanceGroupManagersDelete' Text +igmdProject + = lens _igmdProject (\ s a -> s{_igmdProject = a}) + +-- | Name of the Instance Group Manager resource to delete. +igmdInstanceGroupManager :: Lens' InstanceGroupManagersDelete' Text +igmdInstanceGroupManager + = lens _igmdInstanceGroupManager + (\ s a -> s{_igmdInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmdUserIp :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdUserIp + = lens _igmdUserIp (\ s a -> s{_igmdUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmdZone :: Lens' InstanceGroupManagersDelete' Text +igmdZone = lens _igmdZone (\ s a -> s{_igmdZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmdKey :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdKey = lens _igmdKey (\ s a -> s{_igmdKey = a}) + +-- | OAuth 2.0 token for the current user. +igmdOauthToken :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdOauthToken + = lens _igmdOauthToken + (\ s a -> s{_igmdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmdFields :: Lens' InstanceGroupManagersDelete' (Maybe Text) +igmdFields + = lens _igmdFields (\ s a -> s{_igmdFields = a}) + +-- | Data format for the response. +igmdAlt :: Lens' InstanceGroupManagersDelete' Text +igmdAlt = lens _igmdAlt (\ s a -> s{_igmdAlt = a}) + +instance GoogleRequest InstanceGroupManagersDelete' + where + type Rs InstanceGroupManagersDelete' = Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u InstanceGroupManagersDelete{..} + = go _igmdQuotaUser _igmdPrettyPrint _igmdProject + _igmdInstanceGroupManager + _igmdUserIp + _igmdZone + _igmdKey + _igmdOauthToken + _igmdFields + _igmdAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersDeleteAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/DeleteInstances.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/DeleteInstances.hs new file mode 100644 index 000000000..692cd4634 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/DeleteInstances.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.DeleteInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the specified instances. The instances are deleted, then removed +-- from the instance group and any target pools of which they were a +-- member. The targetSize of the instance group manager is reduced by the +-- number of instances deleted. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersDeleteInstances@. +module Replicapool.InstanceGroupManagers.DeleteInstances + ( + -- * REST Resource + InstanceGroupManagersDeleteInstancesAPI + + -- * Creating a Request + , instanceGroupManagersDeleteInstances + , InstanceGroupManagersDeleteInstances + + -- * Request Lenses + , igmdiQuotaUser + , igmdiPrettyPrint + , igmdiProject + , igmdiInstanceGroupManager + , igmdiUserIp + , igmdiZone + , igmdiKey + , igmdiOauthToken + , igmdiFields + , igmdiAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersDeleteInstances@ which the +-- 'InstanceGroupManagersDeleteInstances' request conforms to. +type InstanceGroupManagersDeleteInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "deleteInstances" :> Post '[JSON] Operation + +-- | Deletes the specified instances. The instances are deleted, then removed +-- from the instance group and any target pools of which they were a +-- member. The targetSize of the instance group manager is reduced by the +-- number of instances deleted. +-- +-- /See:/ 'instanceGroupManagersDeleteInstances' smart constructor. +data InstanceGroupManagersDeleteInstances = InstanceGroupManagersDeleteInstances + { _igmdiQuotaUser :: !(Maybe Text) + , _igmdiPrettyPrint :: !Bool + , _igmdiProject :: !Text + , _igmdiInstanceGroupManager :: !Text + , _igmdiUserIp :: !(Maybe Text) + , _igmdiZone :: !Text + , _igmdiKey :: !(Maybe Text) + , _igmdiOauthToken :: !(Maybe Text) + , _igmdiFields :: !(Maybe Text) + , _igmdiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersDeleteInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmdiQuotaUser' +-- +-- * 'igmdiPrettyPrint' +-- +-- * 'igmdiProject' +-- +-- * 'igmdiInstanceGroupManager' +-- +-- * 'igmdiUserIp' +-- +-- * 'igmdiZone' +-- +-- * 'igmdiKey' +-- +-- * 'igmdiOauthToken' +-- +-- * 'igmdiFields' +-- +-- * 'igmdiAlt' +instanceGroupManagersDeleteInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersDeleteInstances +instanceGroupManagersDeleteInstances pIgmdiProject_ pIgmdiInstanceGroupManager_ pIgmdiZone_ = + InstanceGroupManagersDeleteInstances + { _igmdiQuotaUser = Nothing + , _igmdiPrettyPrint = True + , _igmdiProject = pIgmdiProject_ + , _igmdiInstanceGroupManager = pIgmdiInstanceGroupManager_ + , _igmdiUserIp = Nothing + , _igmdiZone = pIgmdiZone_ + , _igmdiKey = Nothing + , _igmdiOauthToken = Nothing + , _igmdiFields = Nothing + , _igmdiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmdiQuotaUser :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiQuotaUser + = lens _igmdiQuotaUser + (\ s a -> s{_igmdiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmdiPrettyPrint :: Lens' InstanceGroupManagersDeleteInstances' Bool +igmdiPrettyPrint + = lens _igmdiPrettyPrint + (\ s a -> s{_igmdiPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmdiProject :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiProject + = lens _igmdiProject (\ s a -> s{_igmdiProject = a}) + +-- | The name of the instance group manager. +igmdiInstanceGroupManager :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiInstanceGroupManager + = lens _igmdiInstanceGroupManager + (\ s a -> s{_igmdiInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmdiUserIp :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiUserIp + = lens _igmdiUserIp (\ s a -> s{_igmdiUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmdiZone :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiZone + = lens _igmdiZone (\ s a -> s{_igmdiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmdiKey :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiKey = lens _igmdiKey (\ s a -> s{_igmdiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmdiOauthToken :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiOauthToken + = lens _igmdiOauthToken + (\ s a -> s{_igmdiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmdiFields :: Lens' InstanceGroupManagersDeleteInstances' (Maybe Text) +igmdiFields + = lens _igmdiFields (\ s a -> s{_igmdiFields = a}) + +-- | Data format for the response. +igmdiAlt :: Lens' InstanceGroupManagersDeleteInstances' Text +igmdiAlt = lens _igmdiAlt (\ s a -> s{_igmdiAlt = a}) + +instance GoogleRequest + InstanceGroupManagersDeleteInstances' where + type Rs InstanceGroupManagersDeleteInstances' = + Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u + InstanceGroupManagersDeleteInstances{..} + = go _igmdiQuotaUser _igmdiPrettyPrint _igmdiProject + _igmdiInstanceGroupManager + _igmdiUserIp + _igmdiZone + _igmdiKey + _igmdiOauthToken + _igmdiFields + _igmdiAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersDeleteInstancesAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Get.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Get.hs new file mode 100644 index 000000000..4ace1b077 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Get.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the specified Instance Group Manager resource. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersGet@. +module Replicapool.InstanceGroupManagers.Get + ( + -- * REST Resource + InstanceGroupManagersGetAPI + + -- * Creating a Request + , instanceGroupManagersGet + , InstanceGroupManagersGet + + -- * Request Lenses + , igmgQuotaUser + , igmgPrettyPrint + , igmgProject + , igmgInstanceGroupManager + , igmgUserIp + , igmgZone + , igmgKey + , igmgOauthToken + , igmgFields + , igmgAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersGet@ which the +-- 'InstanceGroupManagersGet' request conforms to. +type InstanceGroupManagersGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + Get '[JSON] InstanceGroupManager + +-- | Returns the specified Instance Group Manager resource. +-- +-- /See:/ 'instanceGroupManagersGet' smart constructor. +data InstanceGroupManagersGet = InstanceGroupManagersGet + { _igmgQuotaUser :: !(Maybe Text) + , _igmgPrettyPrint :: !Bool + , _igmgProject :: !Text + , _igmgInstanceGroupManager :: !Text + , _igmgUserIp :: !(Maybe Text) + , _igmgZone :: !Text + , _igmgKey :: !(Maybe Text) + , _igmgOauthToken :: !(Maybe Text) + , _igmgFields :: !(Maybe Text) + , _igmgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmgQuotaUser' +-- +-- * 'igmgPrettyPrint' +-- +-- * 'igmgProject' +-- +-- * 'igmgInstanceGroupManager' +-- +-- * 'igmgUserIp' +-- +-- * 'igmgZone' +-- +-- * 'igmgKey' +-- +-- * 'igmgOauthToken' +-- +-- * 'igmgFields' +-- +-- * 'igmgAlt' +instanceGroupManagersGet + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersGet +instanceGroupManagersGet pIgmgProject_ pIgmgInstanceGroupManager_ pIgmgZone_ = + InstanceGroupManagersGet + { _igmgQuotaUser = Nothing + , _igmgPrettyPrint = True + , _igmgProject = pIgmgProject_ + , _igmgInstanceGroupManager = pIgmgInstanceGroupManager_ + , _igmgUserIp = Nothing + , _igmgZone = pIgmgZone_ + , _igmgKey = Nothing + , _igmgOauthToken = Nothing + , _igmgFields = Nothing + , _igmgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmgQuotaUser :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgQuotaUser + = lens _igmgQuotaUser + (\ s a -> s{_igmgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmgPrettyPrint :: Lens' InstanceGroupManagersGet' Bool +igmgPrettyPrint + = lens _igmgPrettyPrint + (\ s a -> s{_igmgPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmgProject :: Lens' InstanceGroupManagersGet' Text +igmgProject + = lens _igmgProject (\ s a -> s{_igmgProject = a}) + +-- | Name of the instance resource to return. +igmgInstanceGroupManager :: Lens' InstanceGroupManagersGet' Text +igmgInstanceGroupManager + = lens _igmgInstanceGroupManager + (\ s a -> s{_igmgInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmgUserIp :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgUserIp + = lens _igmgUserIp (\ s a -> s{_igmgUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmgZone :: Lens' InstanceGroupManagersGet' Text +igmgZone = lens _igmgZone (\ s a -> s{_igmgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmgKey :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgKey = lens _igmgKey (\ s a -> s{_igmgKey = a}) + +-- | OAuth 2.0 token for the current user. +igmgOauthToken :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgOauthToken + = lens _igmgOauthToken + (\ s a -> s{_igmgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmgFields :: Lens' InstanceGroupManagersGet' (Maybe Text) +igmgFields + = lens _igmgFields (\ s a -> s{_igmgFields = a}) + +-- | Data format for the response. +igmgAlt :: Lens' InstanceGroupManagersGet' Text +igmgAlt = lens _igmgAlt (\ s a -> s{_igmgAlt = a}) + +instance GoogleRequest InstanceGroupManagersGet' + where + type Rs InstanceGroupManagersGet' = + InstanceGroupManager + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u InstanceGroupManagersGet{..} + = go _igmgQuotaUser _igmgPrettyPrint _igmgProject + _igmgInstanceGroupManager + _igmgUserIp + _igmgZone + _igmgKey + _igmgOauthToken + _igmgFields + _igmgAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersGetAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Insert.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Insert.hs new file mode 100644 index 000000000..ee6560bdd --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Insert.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an instance group manager, as well as the instance group and the +-- specified number of instances. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersInsert@. +module Replicapool.InstanceGroupManagers.Insert + ( + -- * REST Resource + InstanceGroupManagersInsertAPI + + -- * Creating a Request + , instanceGroupManagersInsert + , InstanceGroupManagersInsert + + -- * Request Lenses + , igmiQuotaUser + , igmiPrettyPrint + , igmiProject + , igmiSize + , igmiUserIp + , igmiZone + , igmiKey + , igmiOauthToken + , igmiFields + , igmiAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersInsert@ which the +-- 'InstanceGroupManagersInsert' request conforms to. +type InstanceGroupManagersInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + QueryParam "size" Int32 :> Post '[JSON] Operation + +-- | Creates an instance group manager, as well as the instance group and the +-- specified number of instances. +-- +-- /See:/ 'instanceGroupManagersInsert' smart constructor. +data InstanceGroupManagersInsert = InstanceGroupManagersInsert + { _igmiQuotaUser :: !(Maybe Text) + , _igmiPrettyPrint :: !Bool + , _igmiProject :: !Text + , _igmiSize :: !Int32 + , _igmiUserIp :: !(Maybe Text) + , _igmiZone :: !Text + , _igmiKey :: !(Maybe Text) + , _igmiOauthToken :: !(Maybe Text) + , _igmiFields :: !(Maybe Text) + , _igmiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmiQuotaUser' +-- +-- * 'igmiPrettyPrint' +-- +-- * 'igmiProject' +-- +-- * 'igmiSize' +-- +-- * 'igmiUserIp' +-- +-- * 'igmiZone' +-- +-- * 'igmiKey' +-- +-- * 'igmiOauthToken' +-- +-- * 'igmiFields' +-- +-- * 'igmiAlt' +instanceGroupManagersInsert + :: Text -- ^ 'project' + -> Int32 -- ^ 'size' + -> Text -- ^ 'zone' + -> InstanceGroupManagersInsert +instanceGroupManagersInsert pIgmiProject_ pIgmiSize_ pIgmiZone_ = + InstanceGroupManagersInsert + { _igmiQuotaUser = Nothing + , _igmiPrettyPrint = True + , _igmiProject = pIgmiProject_ + , _igmiSize = pIgmiSize_ + , _igmiUserIp = Nothing + , _igmiZone = pIgmiZone_ + , _igmiKey = Nothing + , _igmiOauthToken = Nothing + , _igmiFields = Nothing + , _igmiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmiQuotaUser :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiQuotaUser + = lens _igmiQuotaUser + (\ s a -> s{_igmiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmiPrettyPrint :: Lens' InstanceGroupManagersInsert' Bool +igmiPrettyPrint + = lens _igmiPrettyPrint + (\ s a -> s{_igmiPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmiProject :: Lens' InstanceGroupManagersInsert' Text +igmiProject + = lens _igmiProject (\ s a -> s{_igmiProject = a}) + +-- | Number of instances that should exist. +igmiSize :: Lens' InstanceGroupManagersInsert' Int32 +igmiSize = lens _igmiSize (\ s a -> s{_igmiSize = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmiUserIp :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiUserIp + = lens _igmiUserIp (\ s a -> s{_igmiUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmiZone :: Lens' InstanceGroupManagersInsert' Text +igmiZone = lens _igmiZone (\ s a -> s{_igmiZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmiKey :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiKey = lens _igmiKey (\ s a -> s{_igmiKey = a}) + +-- | OAuth 2.0 token for the current user. +igmiOauthToken :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiOauthToken + = lens _igmiOauthToken + (\ s a -> s{_igmiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmiFields :: Lens' InstanceGroupManagersInsert' (Maybe Text) +igmiFields + = lens _igmiFields (\ s a -> s{_igmiFields = a}) + +-- | Data format for the response. +igmiAlt :: Lens' InstanceGroupManagersInsert' Text +igmiAlt = lens _igmiAlt (\ s a -> s{_igmiAlt = a}) + +instance GoogleRequest InstanceGroupManagersInsert' + where + type Rs InstanceGroupManagersInsert' = Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u InstanceGroupManagersInsert{..} + = go _igmiQuotaUser _igmiPrettyPrint _igmiProject + (Just _igmiSize) + _igmiUserIp + _igmiZone + _igmiKey + _igmiOauthToken + _igmiFields + _igmiAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersInsertAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/List.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/List.hs new file mode 100644 index 000000000..4fdb3cb3c --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/List.hs @@ -0,0 +1,218 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of Instance Group Manager resources contained within +-- the specified zone. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersList@. +module Replicapool.InstanceGroupManagers.List + ( + -- * REST Resource + InstanceGroupManagersListAPI + + -- * Creating a Request + , instanceGroupManagersList + , InstanceGroupManagersList + + -- * Request Lenses + , igmlQuotaUser + , igmlPrettyPrint + , igmlProject + , igmlUserIp + , igmlZone + , igmlKey + , igmlFilter + , igmlPageToken + , igmlOauthToken + , igmlMaxResults + , igmlFields + , igmlAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersList@ which the +-- 'InstanceGroupManagersList' request conforms to. +type InstanceGroupManagersListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstanceGroupManagerList + +-- | Retrieves the list of Instance Group Manager resources contained within +-- the specified zone. +-- +-- /See:/ 'instanceGroupManagersList' smart constructor. +data InstanceGroupManagersList = InstanceGroupManagersList + { _igmlQuotaUser :: !(Maybe Text) + , _igmlPrettyPrint :: !Bool + , _igmlProject :: !Text + , _igmlUserIp :: !(Maybe Text) + , _igmlZone :: !Text + , _igmlKey :: !(Maybe Text) + , _igmlFilter :: !(Maybe Text) + , _igmlPageToken :: !(Maybe Text) + , _igmlOauthToken :: !(Maybe Text) + , _igmlMaxResults :: !Word32 + , _igmlFields :: !(Maybe Text) + , _igmlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmlQuotaUser' +-- +-- * 'igmlPrettyPrint' +-- +-- * 'igmlProject' +-- +-- * 'igmlUserIp' +-- +-- * 'igmlZone' +-- +-- * 'igmlKey' +-- +-- * 'igmlFilter' +-- +-- * 'igmlPageToken' +-- +-- * 'igmlOauthToken' +-- +-- * 'igmlMaxResults' +-- +-- * 'igmlFields' +-- +-- * 'igmlAlt' +instanceGroupManagersList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> InstanceGroupManagersList +instanceGroupManagersList pIgmlProject_ pIgmlZone_ = + InstanceGroupManagersList + { _igmlQuotaUser = Nothing + , _igmlPrettyPrint = True + , _igmlProject = pIgmlProject_ + , _igmlUserIp = Nothing + , _igmlZone = pIgmlZone_ + , _igmlKey = Nothing + , _igmlFilter = Nothing + , _igmlPageToken = Nothing + , _igmlOauthToken = Nothing + , _igmlMaxResults = 500 + , _igmlFields = Nothing + , _igmlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmlQuotaUser :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlQuotaUser + = lens _igmlQuotaUser + (\ s a -> s{_igmlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmlPrettyPrint :: Lens' InstanceGroupManagersList' Bool +igmlPrettyPrint + = lens _igmlPrettyPrint + (\ s a -> s{_igmlPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmlProject :: Lens' InstanceGroupManagersList' Text +igmlProject + = lens _igmlProject (\ s a -> s{_igmlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmlUserIp :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlUserIp + = lens _igmlUserIp (\ s a -> s{_igmlUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmlZone :: Lens' InstanceGroupManagersList' Text +igmlZone = lens _igmlZone (\ s a -> s{_igmlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmlKey :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlKey = lens _igmlKey (\ s a -> s{_igmlKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +igmlFilter :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlFilter + = lens _igmlFilter (\ s a -> s{_igmlFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +igmlPageToken :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlPageToken + = lens _igmlPageToken + (\ s a -> s{_igmlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +igmlOauthToken :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlOauthToken + = lens _igmlOauthToken + (\ s a -> s{_igmlOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +igmlMaxResults :: Lens' InstanceGroupManagersList' Word32 +igmlMaxResults + = lens _igmlMaxResults + (\ s a -> s{_igmlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +igmlFields :: Lens' InstanceGroupManagersList' (Maybe Text) +igmlFields + = lens _igmlFields (\ s a -> s{_igmlFields = a}) + +-- | Data format for the response. +igmlAlt :: Lens' InstanceGroupManagersList' Text +igmlAlt = lens _igmlAlt (\ s a -> s{_igmlAlt = a}) + +instance GoogleRequest InstanceGroupManagersList' + where + type Rs InstanceGroupManagersList' = + InstanceGroupManagerList + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u InstanceGroupManagersList{..} + = go _igmlQuotaUser _igmlPrettyPrint _igmlProject + _igmlUserIp + _igmlZone + _igmlKey + _igmlFilter + _igmlPageToken + _igmlOauthToken + (Just _igmlMaxResults) + _igmlFields + _igmlAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersListAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/RecreateInstances.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/RecreateInstances.hs new file mode 100644 index 000000000..b1faa867e --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/RecreateInstances.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.RecreateInstances +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Recreates the specified instances. The instances are deleted, then +-- recreated using the instance group manager\'s current instance template. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersRecreateInstances@. +module Replicapool.InstanceGroupManagers.RecreateInstances + ( + -- * REST Resource + InstanceGroupManagersRecreateInstancesAPI + + -- * Creating a Request + , instanceGroupManagersRecreateInstances + , InstanceGroupManagersRecreateInstances + + -- * Request Lenses + , igmriQuotaUser + , igmriPrettyPrint + , igmriProject + , igmriInstanceGroupManager + , igmriUserIp + , igmriZone + , igmriKey + , igmriOauthToken + , igmriFields + , igmriAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersRecreateInstances@ which the +-- 'InstanceGroupManagersRecreateInstances' request conforms to. +type InstanceGroupManagersRecreateInstancesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "recreateInstances" :> Post '[JSON] Operation + +-- | Recreates the specified instances. The instances are deleted, then +-- recreated using the instance group manager\'s current instance template. +-- +-- /See:/ 'instanceGroupManagersRecreateInstances' smart constructor. +data InstanceGroupManagersRecreateInstances = InstanceGroupManagersRecreateInstances + { _igmriQuotaUser :: !(Maybe Text) + , _igmriPrettyPrint :: !Bool + , _igmriProject :: !Text + , _igmriInstanceGroupManager :: !Text + , _igmriUserIp :: !(Maybe Text) + , _igmriZone :: !Text + , _igmriKey :: !(Maybe Text) + , _igmriOauthToken :: !(Maybe Text) + , _igmriFields :: !(Maybe Text) + , _igmriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersRecreateInstances'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmriQuotaUser' +-- +-- * 'igmriPrettyPrint' +-- +-- * 'igmriProject' +-- +-- * 'igmriInstanceGroupManager' +-- +-- * 'igmriUserIp' +-- +-- * 'igmriZone' +-- +-- * 'igmriKey' +-- +-- * 'igmriOauthToken' +-- +-- * 'igmriFields' +-- +-- * 'igmriAlt' +instanceGroupManagersRecreateInstances + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersRecreateInstances +instanceGroupManagersRecreateInstances pIgmriProject_ pIgmriInstanceGroupManager_ pIgmriZone_ = + InstanceGroupManagersRecreateInstances + { _igmriQuotaUser = Nothing + , _igmriPrettyPrint = True + , _igmriProject = pIgmriProject_ + , _igmriInstanceGroupManager = pIgmriInstanceGroupManager_ + , _igmriUserIp = Nothing + , _igmriZone = pIgmriZone_ + , _igmriKey = Nothing + , _igmriOauthToken = Nothing + , _igmriFields = Nothing + , _igmriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmriQuotaUser :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriQuotaUser + = lens _igmriQuotaUser + (\ s a -> s{_igmriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmriPrettyPrint :: Lens' InstanceGroupManagersRecreateInstances' Bool +igmriPrettyPrint + = lens _igmriPrettyPrint + (\ s a -> s{_igmriPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmriProject :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriProject + = lens _igmriProject (\ s a -> s{_igmriProject = a}) + +-- | The name of the instance group manager. +igmriInstanceGroupManager :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriInstanceGroupManager + = lens _igmriInstanceGroupManager + (\ s a -> s{_igmriInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmriUserIp :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriUserIp + = lens _igmriUserIp (\ s a -> s{_igmriUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmriZone :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriZone + = lens _igmriZone (\ s a -> s{_igmriZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmriKey :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriKey = lens _igmriKey (\ s a -> s{_igmriKey = a}) + +-- | OAuth 2.0 token for the current user. +igmriOauthToken :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriOauthToken + = lens _igmriOauthToken + (\ s a -> s{_igmriOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmriFields :: Lens' InstanceGroupManagersRecreateInstances' (Maybe Text) +igmriFields + = lens _igmriFields (\ s a -> s{_igmriFields = a}) + +-- | Data format for the response. +igmriAlt :: Lens' InstanceGroupManagersRecreateInstances' Text +igmriAlt = lens _igmriAlt (\ s a -> s{_igmriAlt = a}) + +instance GoogleRequest + InstanceGroupManagersRecreateInstances' where + type Rs InstanceGroupManagersRecreateInstances' = + Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u + InstanceGroupManagersRecreateInstances{..} + = go _igmriQuotaUser _igmriPrettyPrint _igmriProject + _igmriInstanceGroupManager + _igmriUserIp + _igmriZone + _igmriKey + _igmriOauthToken + _igmriFields + _igmriAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersRecreateInstancesAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Resize.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Resize.hs new file mode 100644 index 000000000..29212bd77 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/Resize.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.Resize +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resizes the managed instance group up or down. If resized up, new +-- instances are created using the current instance template. If resized +-- down, instances are removed in the order outlined in Resizing a managed +-- instance group. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersResize@. +module Replicapool.InstanceGroupManagers.Resize + ( + -- * REST Resource + InstanceGroupManagersResizeAPI + + -- * Creating a Request + , instanceGroupManagersResize + , InstanceGroupManagersResize + + -- * Request Lenses + , igmrQuotaUser + , igmrPrettyPrint + , igmrProject + , igmrSize + , igmrInstanceGroupManager + , igmrUserIp + , igmrZone + , igmrKey + , igmrOauthToken + , igmrFields + , igmrAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersResize@ which the +-- 'InstanceGroupManagersResize' request conforms to. +type InstanceGroupManagersResizeAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "resize" :> + QueryParam "size" Int32 :> Post '[JSON] Operation + +-- | Resizes the managed instance group up or down. If resized up, new +-- instances are created using the current instance template. If resized +-- down, instances are removed in the order outlined in Resizing a managed +-- instance group. +-- +-- /See:/ 'instanceGroupManagersResize' smart constructor. +data InstanceGroupManagersResize = InstanceGroupManagersResize + { _igmrQuotaUser :: !(Maybe Text) + , _igmrPrettyPrint :: !Bool + , _igmrProject :: !Text + , _igmrSize :: !Int32 + , _igmrInstanceGroupManager :: !Text + , _igmrUserIp :: !(Maybe Text) + , _igmrZone :: !Text + , _igmrKey :: !(Maybe Text) + , _igmrOauthToken :: !(Maybe Text) + , _igmrFields :: !(Maybe Text) + , _igmrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersResize'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmrQuotaUser' +-- +-- * 'igmrPrettyPrint' +-- +-- * 'igmrProject' +-- +-- * 'igmrSize' +-- +-- * 'igmrInstanceGroupManager' +-- +-- * 'igmrUserIp' +-- +-- * 'igmrZone' +-- +-- * 'igmrKey' +-- +-- * 'igmrOauthToken' +-- +-- * 'igmrFields' +-- +-- * 'igmrAlt' +instanceGroupManagersResize + :: Text -- ^ 'project' + -> Int32 -- ^ 'size' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersResize +instanceGroupManagersResize pIgmrProject_ pIgmrSize_ pIgmrInstanceGroupManager_ pIgmrZone_ = + InstanceGroupManagersResize + { _igmrQuotaUser = Nothing + , _igmrPrettyPrint = True + , _igmrProject = pIgmrProject_ + , _igmrSize = pIgmrSize_ + , _igmrInstanceGroupManager = pIgmrInstanceGroupManager_ + , _igmrUserIp = Nothing + , _igmrZone = pIgmrZone_ + , _igmrKey = Nothing + , _igmrOauthToken = Nothing + , _igmrFields = Nothing + , _igmrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmrQuotaUser :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrQuotaUser + = lens _igmrQuotaUser + (\ s a -> s{_igmrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmrPrettyPrint :: Lens' InstanceGroupManagersResize' Bool +igmrPrettyPrint + = lens _igmrPrettyPrint + (\ s a -> s{_igmrPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmrProject :: Lens' InstanceGroupManagersResize' Text +igmrProject + = lens _igmrProject (\ s a -> s{_igmrProject = a}) + +-- | Number of instances that should exist in this Instance Group Manager. +igmrSize :: Lens' InstanceGroupManagersResize' Int32 +igmrSize = lens _igmrSize (\ s a -> s{_igmrSize = a}) + +-- | The name of the instance group manager. +igmrInstanceGroupManager :: Lens' InstanceGroupManagersResize' Text +igmrInstanceGroupManager + = lens _igmrInstanceGroupManager + (\ s a -> s{_igmrInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmrUserIp :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrUserIp + = lens _igmrUserIp (\ s a -> s{_igmrUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmrZone :: Lens' InstanceGroupManagersResize' Text +igmrZone = lens _igmrZone (\ s a -> s{_igmrZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmrKey :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrKey = lens _igmrKey (\ s a -> s{_igmrKey = a}) + +-- | OAuth 2.0 token for the current user. +igmrOauthToken :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrOauthToken + = lens _igmrOauthToken + (\ s a -> s{_igmrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmrFields :: Lens' InstanceGroupManagersResize' (Maybe Text) +igmrFields + = lens _igmrFields (\ s a -> s{_igmrFields = a}) + +-- | Data format for the response. +igmrAlt :: Lens' InstanceGroupManagersResize' Text +igmrAlt = lens _igmrAlt (\ s a -> s{_igmrAlt = a}) + +instance GoogleRequest InstanceGroupManagersResize' + where + type Rs InstanceGroupManagersResize' = Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u InstanceGroupManagersResize{..} + = go _igmrQuotaUser _igmrPrettyPrint _igmrProject + (Just _igmrSize) + _igmrInstanceGroupManager + _igmrUserIp + _igmrZone + _igmrKey + _igmrOauthToken + _igmrFields + _igmrAlt + where go + = clientWithRoute + (Proxy :: Proxy InstanceGroupManagersResizeAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetInstanceTemplate.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetInstanceTemplate.hs new file mode 100644 index 000000000..1b3a43e0c --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetInstanceTemplate.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.SetInstanceTemplate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the instance template to use when creating new instances in this +-- group. Existing instances are not affected. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersSetInstanceTemplate@. +module Replicapool.InstanceGroupManagers.SetInstanceTemplate + ( + -- * REST Resource + InstanceGroupManagersSetInstanceTemplateAPI + + -- * Creating a Request + , instanceGroupManagersSetInstanceTemplate + , InstanceGroupManagersSetInstanceTemplate + + -- * Request Lenses + , igmsitQuotaUser + , igmsitPrettyPrint + , igmsitProject + , igmsitInstanceGroupManager + , igmsitUserIp + , igmsitZone + , igmsitKey + , igmsitOauthToken + , igmsitFields + , igmsitAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersSetInstanceTemplate@ which the +-- 'InstanceGroupManagersSetInstanceTemplate' request conforms to. +type InstanceGroupManagersSetInstanceTemplateAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "setInstanceTemplate" :> Post '[JSON] Operation + +-- | Sets the instance template to use when creating new instances in this +-- group. Existing instances are not affected. +-- +-- /See:/ 'instanceGroupManagersSetInstanceTemplate' smart constructor. +data InstanceGroupManagersSetInstanceTemplate = InstanceGroupManagersSetInstanceTemplate + { _igmsitQuotaUser :: !(Maybe Text) + , _igmsitPrettyPrint :: !Bool + , _igmsitProject :: !Text + , _igmsitInstanceGroupManager :: !Text + , _igmsitUserIp :: !(Maybe Text) + , _igmsitZone :: !Text + , _igmsitKey :: !(Maybe Text) + , _igmsitOauthToken :: !(Maybe Text) + , _igmsitFields :: !(Maybe Text) + , _igmsitAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmsitQuotaUser' +-- +-- * 'igmsitPrettyPrint' +-- +-- * 'igmsitProject' +-- +-- * 'igmsitInstanceGroupManager' +-- +-- * 'igmsitUserIp' +-- +-- * 'igmsitZone' +-- +-- * 'igmsitKey' +-- +-- * 'igmsitOauthToken' +-- +-- * 'igmsitFields' +-- +-- * 'igmsitAlt' +instanceGroupManagersSetInstanceTemplate + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersSetInstanceTemplate +instanceGroupManagersSetInstanceTemplate pIgmsitProject_ pIgmsitInstanceGroupManager_ pIgmsitZone_ = + InstanceGroupManagersSetInstanceTemplate + { _igmsitQuotaUser = Nothing + , _igmsitPrettyPrint = True + , _igmsitProject = pIgmsitProject_ + , _igmsitInstanceGroupManager = pIgmsitInstanceGroupManager_ + , _igmsitUserIp = Nothing + , _igmsitZone = pIgmsitZone_ + , _igmsitKey = Nothing + , _igmsitOauthToken = Nothing + , _igmsitFields = Nothing + , _igmsitAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmsitQuotaUser :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitQuotaUser + = lens _igmsitQuotaUser + (\ s a -> s{_igmsitQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmsitPrettyPrint :: Lens' InstanceGroupManagersSetInstanceTemplate' Bool +igmsitPrettyPrint + = lens _igmsitPrettyPrint + (\ s a -> s{_igmsitPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmsitProject :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitProject + = lens _igmsitProject + (\ s a -> s{_igmsitProject = a}) + +-- | The name of the instance group manager. +igmsitInstanceGroupManager :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitInstanceGroupManager + = lens _igmsitInstanceGroupManager + (\ s a -> s{_igmsitInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmsitUserIp :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitUserIp + = lens _igmsitUserIp (\ s a -> s{_igmsitUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmsitZone :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitZone + = lens _igmsitZone (\ s a -> s{_igmsitZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmsitKey :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitKey + = lens _igmsitKey (\ s a -> s{_igmsitKey = a}) + +-- | OAuth 2.0 token for the current user. +igmsitOauthToken :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitOauthToken + = lens _igmsitOauthToken + (\ s a -> s{_igmsitOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmsitFields :: Lens' InstanceGroupManagersSetInstanceTemplate' (Maybe Text) +igmsitFields + = lens _igmsitFields (\ s a -> s{_igmsitFields = a}) + +-- | Data format for the response. +igmsitAlt :: Lens' InstanceGroupManagersSetInstanceTemplate' Text +igmsitAlt + = lens _igmsitAlt (\ s a -> s{_igmsitAlt = a}) + +instance GoogleRequest + InstanceGroupManagersSetInstanceTemplate' where + type Rs InstanceGroupManagersSetInstanceTemplate' = + Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u + InstanceGroupManagersSetInstanceTemplate{..} + = go _igmsitQuotaUser _igmsitPrettyPrint + _igmsitProject + _igmsitInstanceGroupManager + _igmsitUserIp + _igmsitZone + _igmsitKey + _igmsitOauthToken + _igmsitFields + _igmsitAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersSetInstanceTemplateAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetTargetPools.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetTargetPools.hs new file mode 100644 index 000000000..024b4456a --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/InstanceGroupManagers/SetTargetPools.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.InstanceGroupManagers.SetTargetPools +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the target pools to which all new instances in this group are +-- assigned. Existing instances in the group are not affected. +-- +-- /See:/ for @ReplicapoolInstanceGroupManagersSetTargetPools@. +module Replicapool.InstanceGroupManagers.SetTargetPools + ( + -- * REST Resource + InstanceGroupManagersSetTargetPoolsAPI + + -- * Creating a Request + , instanceGroupManagersSetTargetPools + , InstanceGroupManagersSetTargetPools + + -- * Request Lenses + , igmstpQuotaUser + , igmstpPrettyPrint + , igmstpProject + , igmstpInstanceGroupManager + , igmstpUserIp + , igmstpZone + , igmstpKey + , igmstpOauthToken + , igmstpFields + , igmstpAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolInstanceGroupManagersSetTargetPools@ which the +-- 'InstanceGroupManagersSetTargetPools' request conforms to. +type InstanceGroupManagersSetTargetPoolsAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "instanceGroupManagers" :> + Capture "instanceGroupManager" Text :> + "setTargetPools" :> Post '[JSON] Operation + +-- | Modifies the target pools to which all new instances in this group are +-- assigned. Existing instances in the group are not affected. +-- +-- /See:/ 'instanceGroupManagersSetTargetPools' smart constructor. +data InstanceGroupManagersSetTargetPools = InstanceGroupManagersSetTargetPools + { _igmstpQuotaUser :: !(Maybe Text) + , _igmstpPrettyPrint :: !Bool + , _igmstpProject :: !Text + , _igmstpInstanceGroupManager :: !Text + , _igmstpUserIp :: !(Maybe Text) + , _igmstpZone :: !Text + , _igmstpKey :: !(Maybe Text) + , _igmstpOauthToken :: !(Maybe Text) + , _igmstpFields :: !(Maybe Text) + , _igmstpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstanceGroupManagersSetTargetPools'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igmstpQuotaUser' +-- +-- * 'igmstpPrettyPrint' +-- +-- * 'igmstpProject' +-- +-- * 'igmstpInstanceGroupManager' +-- +-- * 'igmstpUserIp' +-- +-- * 'igmstpZone' +-- +-- * 'igmstpKey' +-- +-- * 'igmstpOauthToken' +-- +-- * 'igmstpFields' +-- +-- * 'igmstpAlt' +instanceGroupManagersSetTargetPools + :: Text -- ^ 'project' + -> Text -- ^ 'instanceGroupManager' + -> Text -- ^ 'zone' + -> InstanceGroupManagersSetTargetPools +instanceGroupManagersSetTargetPools pIgmstpProject_ pIgmstpInstanceGroupManager_ pIgmstpZone_ = + InstanceGroupManagersSetTargetPools + { _igmstpQuotaUser = Nothing + , _igmstpPrettyPrint = True + , _igmstpProject = pIgmstpProject_ + , _igmstpInstanceGroupManager = pIgmstpInstanceGroupManager_ + , _igmstpUserIp = Nothing + , _igmstpZone = pIgmstpZone_ + , _igmstpKey = Nothing + , _igmstpOauthToken = Nothing + , _igmstpFields = Nothing + , _igmstpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igmstpQuotaUser :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpQuotaUser + = lens _igmstpQuotaUser + (\ s a -> s{_igmstpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igmstpPrettyPrint :: Lens' InstanceGroupManagersSetTargetPools' Bool +igmstpPrettyPrint + = lens _igmstpPrettyPrint + (\ s a -> s{_igmstpPrettyPrint = a}) + +-- | The Google Developers Console project name. +igmstpProject :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpProject + = lens _igmstpProject + (\ s a -> s{_igmstpProject = a}) + +-- | The name of the instance group manager. +igmstpInstanceGroupManager :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpInstanceGroupManager + = lens _igmstpInstanceGroupManager + (\ s a -> s{_igmstpInstanceGroupManager = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igmstpUserIp :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpUserIp + = lens _igmstpUserIp (\ s a -> s{_igmstpUserIp = a}) + +-- | The name of the zone in which the instance group manager resides. +igmstpZone :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpZone + = lens _igmstpZone (\ s a -> s{_igmstpZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igmstpKey :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpKey + = lens _igmstpKey (\ s a -> s{_igmstpKey = a}) + +-- | OAuth 2.0 token for the current user. +igmstpOauthToken :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpOauthToken + = lens _igmstpOauthToken + (\ s a -> s{_igmstpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igmstpFields :: Lens' InstanceGroupManagersSetTargetPools' (Maybe Text) +igmstpFields + = lens _igmstpFields (\ s a -> s{_igmstpFields = a}) + +-- | Data format for the response. +igmstpAlt :: Lens' InstanceGroupManagersSetTargetPools' Text +igmstpAlt + = lens _igmstpAlt (\ s a -> s{_igmstpAlt = a}) + +instance GoogleRequest + InstanceGroupManagersSetTargetPools' where + type Rs InstanceGroupManagersSetTargetPools' = + Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u + InstanceGroupManagersSetTargetPools{..} + = go _igmstpQuotaUser _igmstpPrettyPrint + _igmstpProject + _igmstpInstanceGroupManager + _igmstpUserIp + _igmstpZone + _igmstpKey + _igmstpOauthToken + _igmstpFields + _igmstpAlt + where go + = clientWithRoute + (Proxy :: + Proxy InstanceGroupManagersSetTargetPoolsAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/Get.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/Get.hs new file mode 100644 index 000000000..9206c56eb --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/Get.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.ZoneOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ for @ReplicapoolZoneOperationsGet@. +module Replicapool.ZoneOperations.Get + ( + -- * REST Resource + ZoneOperationsGetAPI + + -- * Creating a Request + , zoneOperationsGet + , ZoneOperationsGet + + -- * Request Lenses + , zogQuotaUser + , zogPrettyPrint + , zogProject + , zogOperation + , zogUserIp + , zogZone + , zogKey + , zogOauthToken + , zogFields + , zogAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolZoneOperationsGet@ which the +-- 'ZoneOperationsGet' request conforms to. +type ZoneOperationsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ 'zoneOperationsGet' smart constructor. +data ZoneOperationsGet = ZoneOperationsGet + { _zogQuotaUser :: !(Maybe Text) + , _zogPrettyPrint :: !Bool + , _zogProject :: !Text + , _zogOperation :: !Text + , _zogUserIp :: !(Maybe Text) + , _zogZone :: !Text + , _zogKey :: !(Maybe Text) + , _zogOauthToken :: !(Maybe Text) + , _zogFields :: !(Maybe Text) + , _zogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zogQuotaUser' +-- +-- * 'zogPrettyPrint' +-- +-- * 'zogProject' +-- +-- * 'zogOperation' +-- +-- * 'zogUserIp' +-- +-- * 'zogZone' +-- +-- * 'zogKey' +-- +-- * 'zogOauthToken' +-- +-- * 'zogFields' +-- +-- * 'zogAlt' +zoneOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsGet +zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ = + ZoneOperationsGet + { _zogQuotaUser = Nothing + , _zogPrettyPrint = True + , _zogProject = pZogProject_ + , _zogOperation = pZogOperation_ + , _zogUserIp = Nothing + , _zogZone = pZogZone_ + , _zogKey = Nothing + , _zogOauthToken = Nothing + , _zogFields = Nothing + , _zogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zogQuotaUser :: Lens' ZoneOperationsGet' (Maybe Text) +zogQuotaUser + = lens _zogQuotaUser (\ s a -> s{_zogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zogPrettyPrint :: Lens' ZoneOperationsGet' Bool +zogPrettyPrint + = lens _zogPrettyPrint + (\ s a -> s{_zogPrettyPrint = a}) + +-- | Name of the project scoping this request. +zogProject :: Lens' ZoneOperationsGet' Text +zogProject + = lens _zogProject (\ s a -> s{_zogProject = a}) + +-- | Name of the operation resource to return. +zogOperation :: Lens' ZoneOperationsGet' Text +zogOperation + = lens _zogOperation (\ s a -> s{_zogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zogUserIp :: Lens' ZoneOperationsGet' (Maybe Text) +zogUserIp + = lens _zogUserIp (\ s a -> s{_zogUserIp = a}) + +-- | Name of the zone scoping this request. +zogZone :: Lens' ZoneOperationsGet' Text +zogZone = lens _zogZone (\ s a -> s{_zogZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zogKey :: Lens' ZoneOperationsGet' (Maybe Text) +zogKey = lens _zogKey (\ s a -> s{_zogKey = a}) + +-- | OAuth 2.0 token for the current user. +zogOauthToken :: Lens' ZoneOperationsGet' (Maybe Text) +zogOauthToken + = lens _zogOauthToken + (\ s a -> s{_zogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zogFields :: Lens' ZoneOperationsGet' (Maybe Text) +zogFields + = lens _zogFields (\ s a -> s{_zogFields = a}) + +-- | Data format for the response. +zogAlt :: Lens' ZoneOperationsGet' Text +zogAlt = lens _zogAlt (\ s a -> s{_zogAlt = a}) + +instance GoogleRequest ZoneOperationsGet' where + type Rs ZoneOperationsGet' = Operation + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u ZoneOperationsGet{..} + = go _zogQuotaUser _zogPrettyPrint _zogProject + _zogOperation + _zogUserIp + _zogZone + _zogKey + _zogOauthToken + _zogFields + _zogAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsGetAPI) + r + u diff --git a/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/List.hs b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/List.hs new file mode 100644 index 000000000..ef99e6e11 --- /dev/null +++ b/gogol-replicapool/gen/Network/Google/Resource/Replicapool/ZoneOperations/List.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Replicapool.ZoneOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ for @ReplicapoolZoneOperationsList@. +module Replicapool.ZoneOperations.List + ( + -- * REST Resource + ZoneOperationsListAPI + + -- * Creating a Request + , zoneOperationsList + , ZoneOperationsList + + -- * Request Lenses + , zolQuotaUser + , zolPrettyPrint + , zolProject + , zolUserIp + , zolZone + , zolKey + , zolFilter + , zolPageToken + , zolOauthToken + , zolMaxResults + , zolFields + , zolAlt + ) where + +import Network.Google.InstanceGroupsManager.Types +import Network.Google.Prelude + +-- | A resource alias for @ReplicapoolZoneOperationsList@ which the +-- 'ZoneOperationsList' request conforms to. +type ZoneOperationsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ 'zoneOperationsList' smart constructor. +data ZoneOperationsList = ZoneOperationsList + { _zolQuotaUser :: !(Maybe Text) + , _zolPrettyPrint :: !Bool + , _zolProject :: !Text + , _zolUserIp :: !(Maybe Text) + , _zolZone :: !Text + , _zolKey :: !(Maybe Text) + , _zolFilter :: !(Maybe Text) + , _zolPageToken :: !(Maybe Text) + , _zolOauthToken :: !(Maybe Text) + , _zolMaxResults :: !Word32 + , _zolFields :: !(Maybe Text) + , _zolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zolQuotaUser' +-- +-- * 'zolPrettyPrint' +-- +-- * 'zolProject' +-- +-- * 'zolUserIp' +-- +-- * 'zolZone' +-- +-- * 'zolKey' +-- +-- * 'zolFilter' +-- +-- * 'zolPageToken' +-- +-- * 'zolOauthToken' +-- +-- * 'zolMaxResults' +-- +-- * 'zolFields' +-- +-- * 'zolAlt' +zoneOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneOperationsList +zoneOperationsList pZolProject_ pZolZone_ = + ZoneOperationsList + { _zolQuotaUser = Nothing + , _zolPrettyPrint = True + , _zolProject = pZolProject_ + , _zolUserIp = Nothing + , _zolZone = pZolZone_ + , _zolKey = Nothing + , _zolFilter = Nothing + , _zolPageToken = Nothing + , _zolOauthToken = Nothing + , _zolMaxResults = 500 + , _zolFields = Nothing + , _zolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zolQuotaUser :: Lens' ZoneOperationsList' (Maybe Text) +zolQuotaUser + = lens _zolQuotaUser (\ s a -> s{_zolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zolPrettyPrint :: Lens' ZoneOperationsList' Bool +zolPrettyPrint + = lens _zolPrettyPrint + (\ s a -> s{_zolPrettyPrint = a}) + +-- | Name of the project scoping this request. +zolProject :: Lens' ZoneOperationsList' Text +zolProject + = lens _zolProject (\ s a -> s{_zolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zolUserIp :: Lens' ZoneOperationsList' (Maybe Text) +zolUserIp + = lens _zolUserIp (\ s a -> s{_zolUserIp = a}) + +-- | Name of the zone scoping this request. +zolZone :: Lens' ZoneOperationsList' Text +zolZone = lens _zolZone (\ s a -> s{_zolZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zolKey :: Lens' ZoneOperationsList' (Maybe Text) +zolKey = lens _zolKey (\ s a -> s{_zolKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +zolFilter :: Lens' ZoneOperationsList' (Maybe Text) +zolFilter + = lens _zolFilter (\ s a -> s{_zolFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +zolPageToken :: Lens' ZoneOperationsList' (Maybe Text) +zolPageToken + = lens _zolPageToken (\ s a -> s{_zolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zolOauthToken :: Lens' ZoneOperationsList' (Maybe Text) +zolOauthToken + = lens _zolOauthToken + (\ s a -> s{_zolOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +zolMaxResults :: Lens' ZoneOperationsList' Word32 +zolMaxResults + = lens _zolMaxResults + (\ s a -> s{_zolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zolFields :: Lens' ZoneOperationsList' (Maybe Text) +zolFields + = lens _zolFields (\ s a -> s{_zolFields = a}) + +-- | Data format for the response. +zolAlt :: Lens' ZoneOperationsList' Text +zolAlt = lens _zolAlt (\ s a -> s{_zolAlt = a}) + +instance GoogleRequest ZoneOperationsList' where + type Rs ZoneOperationsList' = OperationList + request + = requestWithRoute defReq instanceGroupsManagerURL + requestWithRoute r u ZoneOperationsList{..} + = go _zolQuotaUser _zolPrettyPrint _zolProject + _zolUserIp + _zolZone + _zolKey + _zolFilter + _zolPageToken + _zolOauthToken + (Just _zolMaxResults) + _zolFields + _zolAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsListAPI) + r + u diff --git a/gogol-replicapool/gogol-replicapool.cabal b/gogol-replicapool/gogol-replicapool.cabal new file mode 100644 index 000000000..27c552d24 --- /dev/null +++ b/gogol-replicapool/gogol-replicapool.cabal @@ -0,0 +1,55 @@ +name: gogol-replicapool +version: 0.0.1 +synopsis: Google Compute Engine Instance Group Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Compute Engine Instance Group Manager API provides groups of + homogenous Compute Engine Instances. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.InstanceGroupsManager + , Network.Google.InstanceGroupsManager.Types + , Network.Google.Resource.Replicapool.InstanceGroupManagers.AbandonInstances + , Network.Google.Resource.Replicapool.InstanceGroupManagers.Delete + , Network.Google.Resource.Replicapool.InstanceGroupManagers.DeleteInstances + , Network.Google.Resource.Replicapool.InstanceGroupManagers.Get + , Network.Google.Resource.Replicapool.InstanceGroupManagers.Insert + , Network.Google.Resource.Replicapool.InstanceGroupManagers.List + , Network.Google.Resource.Replicapool.InstanceGroupManagers.RecreateInstances + , Network.Google.Resource.Replicapool.InstanceGroupManagers.Resize + , Network.Google.Resource.Replicapool.InstanceGroupManagers.SetInstanceTemplate + , Network.Google.Resource.Replicapool.InstanceGroupManagers.SetTargetPools + , Network.Google.Resource.Replicapool.ZoneOperations.Get + , Network.Google.Resource.Replicapool.ZoneOperations.List + + other-modules: + Network.Google.InstanceGroupsManager.Types.Product + , Network.Google.InstanceGroupsManager.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-replicapool/src/.gitkeep b/gogol-replicapool/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-resourcemanager/LICENSE b/gogol-resourcemanager/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-resourcemanager/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-resourcemanager/Makefile b/gogol-resourcemanager/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-resourcemanager/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-resourcemanager/README.md b/gogol-resourcemanager/README.md new file mode 100644 index 000000000..e855048f4 --- /dev/null +++ b/gogol-resourcemanager/README.md @@ -0,0 +1,28 @@ +# gogol-resourcemanager + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Cloud Resource Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-resourcemanager` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-resourcemanager/Setup.hs b/gogol-resourcemanager/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-resourcemanager/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Get.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Get.hs new file mode 100644 index 000000000..844de81a0 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Get.hs @@ -0,0 +1,225 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Fetches an Organization resource by id. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsGet@. +module Cloudresourcemanager.Organizations.Get + ( + -- * REST Resource + OrganizationsGetAPI + + -- * Creating a Request + , organizationsGet + , OrganizationsGet + + -- * Request Lenses + , ogXgafv + , ogQuotaUser + , ogPrettyPrint + , ogUploadProtocol + , ogPp + , ogAccessToken + , ogUploadType + , ogBearerToken + , ogKey + , ogOauthToken + , ogOrganizationId + , ogFields + , ogCallback + , ogAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsGet@ which the +-- 'OrganizationsGet' request conforms to. +type OrganizationsGetAPI = + "v1beta1" :> + "organizations" :> + Capture "organizationId" Text :> + Get '[JSON] Organization + +-- | Fetches an Organization resource by id. +-- +-- /See:/ 'organizationsGet' smart constructor. +data OrganizationsGet = OrganizationsGet + { _ogXgafv :: !(Maybe Text) + , _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogUploadProtocol :: !(Maybe Text) + , _ogPp :: !Bool + , _ogAccessToken :: !(Maybe Text) + , _ogUploadType :: !(Maybe Text) + , _ogBearerToken :: !(Maybe Text) + , _ogKey :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogOrganizationId :: !Text + , _ogFields :: !(Maybe Text) + , _ogCallback :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogXgafv' +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogUploadProtocol' +-- +-- * 'ogPp' +-- +-- * 'ogAccessToken' +-- +-- * 'ogUploadType' +-- +-- * 'ogBearerToken' +-- +-- * 'ogKey' +-- +-- * 'ogOauthToken' +-- +-- * 'ogOrganizationId' +-- +-- * 'ogFields' +-- +-- * 'ogCallback' +-- +-- * 'ogAlt' +organizationsGet + :: Text -- ^ 'organizationId' + -> OrganizationsGet +organizationsGet pOgOrganizationId_ = + OrganizationsGet + { _ogXgafv = Nothing + , _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogUploadProtocol = Nothing + , _ogPp = True + , _ogAccessToken = Nothing + , _ogUploadType = Nothing + , _ogBearerToken = Nothing + , _ogKey = Nothing + , _ogOauthToken = Nothing + , _ogOrganizationId = pOgOrganizationId_ + , _ogFields = Nothing + , _ogCallback = Nothing + , _ogAlt = "json" + } + +-- | V1 error format. +ogXgafv :: Lens' OrganizationsGet' (Maybe Text) +ogXgafv = lens _ogXgafv (\ s a -> s{_ogXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ogQuotaUser :: Lens' OrganizationsGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OrganizationsGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ogUploadProtocol :: Lens' OrganizationsGet' (Maybe Text) +ogUploadProtocol + = lens _ogUploadProtocol + (\ s a -> s{_ogUploadProtocol = a}) + +-- | Pretty-print response. +ogPp :: Lens' OrganizationsGet' Bool +ogPp = lens _ogPp (\ s a -> s{_ogPp = a}) + +-- | OAuth access token. +ogAccessToken :: Lens' OrganizationsGet' (Maybe Text) +ogAccessToken + = lens _ogAccessToken + (\ s a -> s{_ogAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ogUploadType :: Lens' OrganizationsGet' (Maybe Text) +ogUploadType + = lens _ogUploadType (\ s a -> s{_ogUploadType = a}) + +-- | OAuth bearer token. +ogBearerToken :: Lens' OrganizationsGet' (Maybe Text) +ogBearerToken + = lens _ogBearerToken + (\ s a -> s{_ogBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OrganizationsGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OrganizationsGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | The id of the Organization resource to fetch. +ogOrganizationId :: Lens' OrganizationsGet' Text +ogOrganizationId + = lens _ogOrganizationId + (\ s a -> s{_ogOrganizationId = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OrganizationsGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | JSONP +ogCallback :: Lens' OrganizationsGet' (Maybe Text) +ogCallback + = lens _ogCallback (\ s a -> s{_ogCallback = a}) + +-- | Data format for response. +ogAlt :: Lens' OrganizationsGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OrganizationsGet' where + type Rs OrganizationsGet' = Organization + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u OrganizationsGet{..} + = go _ogXgafv _ogQuotaUser _ogPrettyPrint + _ogUploadProtocol + _ogPp + _ogAccessToken + _ogUploadType + _ogBearerToken + _ogKey + _ogOauthToken + _ogOrganizationId + _ogFields + _ogCallback + _ogAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsGetAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/GetIAMPolicy.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/GetIAMPolicy.hs new file mode 100644 index 000000000..ec6811eb4 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/GetIAMPolicy.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.GetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the access control policy for a Organization resource. May be empty +-- if no such policy or resource exists. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsGetIAMPolicy@. +module Cloudresourcemanager.Organizations.GetIAMPolicy + ( + -- * REST Resource + OrganizationsGetIAMPolicyAPI + + -- * Creating a Request + , organizationsGetIAMPolicy + , OrganizationsGetIAMPolicy + + -- * Request Lenses + , ogipXgafv + , ogipQuotaUser + , ogipPrettyPrint + , ogipUploadProtocol + , ogipPp + , ogipAccessToken + , ogipUploadType + , ogipBearerToken + , ogipKey + , ogipResource + , ogipOauthToken + , ogipFields + , ogipCallback + , ogipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsGetIAMPolicy@ which the +-- 'OrganizationsGetIAMPolicy' request conforms to. +type OrganizationsGetIAMPolicyAPI = + "v1beta1" :> + "organizations" :> + "{resource}:getIamPolicy" :> Post '[JSON] Policy + +-- | Gets the access control policy for a Organization resource. May be empty +-- if no such policy or resource exists. +-- +-- /See:/ 'organizationsGetIAMPolicy' smart constructor. +data OrganizationsGetIAMPolicy = OrganizationsGetIAMPolicy + { _ogipXgafv :: !(Maybe Text) + , _ogipQuotaUser :: !(Maybe Text) + , _ogipPrettyPrint :: !Bool + , _ogipUploadProtocol :: !(Maybe Text) + , _ogipPp :: !Bool + , _ogipAccessToken :: !(Maybe Text) + , _ogipUploadType :: !(Maybe Text) + , _ogipBearerToken :: !(Maybe Text) + , _ogipKey :: !(Maybe Text) + , _ogipResource :: !Text + , _ogipOauthToken :: !(Maybe Text) + , _ogipFields :: !(Maybe Text) + , _ogipCallback :: !(Maybe Text) + , _ogipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsGetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogipXgafv' +-- +-- * 'ogipQuotaUser' +-- +-- * 'ogipPrettyPrint' +-- +-- * 'ogipUploadProtocol' +-- +-- * 'ogipPp' +-- +-- * 'ogipAccessToken' +-- +-- * 'ogipUploadType' +-- +-- * 'ogipBearerToken' +-- +-- * 'ogipKey' +-- +-- * 'ogipResource' +-- +-- * 'ogipOauthToken' +-- +-- * 'ogipFields' +-- +-- * 'ogipCallback' +-- +-- * 'ogipAlt' +organizationsGetIAMPolicy + :: Text -- ^ 'resource' + -> OrganizationsGetIAMPolicy +organizationsGetIAMPolicy pOgipResource_ = + OrganizationsGetIAMPolicy + { _ogipXgafv = Nothing + , _ogipQuotaUser = Nothing + , _ogipPrettyPrint = True + , _ogipUploadProtocol = Nothing + , _ogipPp = True + , _ogipAccessToken = Nothing + , _ogipUploadType = Nothing + , _ogipBearerToken = Nothing + , _ogipKey = Nothing + , _ogipResource = pOgipResource_ + , _ogipOauthToken = Nothing + , _ogipFields = Nothing + , _ogipCallback = Nothing + , _ogipAlt = "json" + } + +-- | V1 error format. +ogipXgafv :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipXgafv + = lens _ogipXgafv (\ s a -> s{_ogipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ogipQuotaUser :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipQuotaUser + = lens _ogipQuotaUser + (\ s a -> s{_ogipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogipPrettyPrint :: Lens' OrganizationsGetIAMPolicy' Bool +ogipPrettyPrint + = lens _ogipPrettyPrint + (\ s a -> s{_ogipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ogipUploadProtocol :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipUploadProtocol + = lens _ogipUploadProtocol + (\ s a -> s{_ogipUploadProtocol = a}) + +-- | Pretty-print response. +ogipPp :: Lens' OrganizationsGetIAMPolicy' Bool +ogipPp = lens _ogipPp (\ s a -> s{_ogipPp = a}) + +-- | OAuth access token. +ogipAccessToken :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipAccessToken + = lens _ogipAccessToken + (\ s a -> s{_ogipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ogipUploadType :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipUploadType + = lens _ogipUploadType + (\ s a -> s{_ogipUploadType = a}) + +-- | OAuth bearer token. +ogipBearerToken :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipBearerToken + = lens _ogipBearerToken + (\ s a -> s{_ogipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogipKey :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipKey = lens _ogipKey (\ s a -> s{_ogipKey = a}) + +-- | REQUIRED: The resource for which policy is being requested. Resource is +-- usually specified as a path, such as, \`projects\/{project}\`. +ogipResource :: Lens' OrganizationsGetIAMPolicy' Text +ogipResource + = lens _ogipResource (\ s a -> s{_ogipResource = a}) + +-- | OAuth 2.0 token for the current user. +ogipOauthToken :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipOauthToken + = lens _ogipOauthToken + (\ s a -> s{_ogipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogipFields :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipFields + = lens _ogipFields (\ s a -> s{_ogipFields = a}) + +-- | JSONP +ogipCallback :: Lens' OrganizationsGetIAMPolicy' (Maybe Text) +ogipCallback + = lens _ogipCallback (\ s a -> s{_ogipCallback = a}) + +-- | Data format for response. +ogipAlt :: Lens' OrganizationsGetIAMPolicy' Text +ogipAlt = lens _ogipAlt (\ s a -> s{_ogipAlt = a}) + +instance GoogleRequest OrganizationsGetIAMPolicy' + where + type Rs OrganizationsGetIAMPolicy' = Policy + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u OrganizationsGetIAMPolicy{..} + = go _ogipXgafv _ogipQuotaUser _ogipPrettyPrint + _ogipUploadProtocol + _ogipPp + _ogipAccessToken + _ogipUploadType + _ogipBearerToken + _ogipKey + _ogipResource + _ogipOauthToken + _ogipFields + _ogipCallback + _ogipAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsGetIAMPolicyAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/List.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/List.hs new file mode 100644 index 000000000..bc8366c19 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/List.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Query Organization resources. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsList@. +module Cloudresourcemanager.Organizations.List + ( + -- * REST Resource + OrganizationsListAPI + + -- * Creating a Request + , organizationsList + , OrganizationsList + + -- * Request Lenses + , olXgafv + , olQuotaUser + , olPrettyPrint + , olUploadProtocol + , olPp + , olAccessToken + , olUploadType + , olBearerToken + , olKey + , olFilter + , olPageToken + , olOauthToken + , olPageSize + , olFields + , olCallback + , olAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsList@ which the +-- 'OrganizationsList' request conforms to. +type OrganizationsListAPI = + "v1beta1" :> + "organizations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListOrganizationsResponse + +-- | Query Organization resources. +-- +-- /See:/ 'organizationsList' smart constructor. +data OrganizationsList = OrganizationsList + { _olXgafv :: !(Maybe Text) + , _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olUploadProtocol :: !(Maybe Text) + , _olPp :: !Bool + , _olAccessToken :: !(Maybe Text) + , _olUploadType :: !(Maybe Text) + , _olBearerToken :: !(Maybe Text) + , _olKey :: !(Maybe Text) + , _olFilter :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olPageSize :: !(Maybe Int32) + , _olFields :: !(Maybe Text) + , _olCallback :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olXgafv' +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olUploadProtocol' +-- +-- * 'olPp' +-- +-- * 'olAccessToken' +-- +-- * 'olUploadType' +-- +-- * 'olBearerToken' +-- +-- * 'olKey' +-- +-- * 'olFilter' +-- +-- * 'olPageToken' +-- +-- * 'olOauthToken' +-- +-- * 'olPageSize' +-- +-- * 'olFields' +-- +-- * 'olCallback' +-- +-- * 'olAlt' +organizationsList + :: OrganizationsList +organizationsList = + OrganizationsList + { _olXgafv = Nothing + , _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olUploadProtocol = Nothing + , _olPp = True + , _olAccessToken = Nothing + , _olUploadType = Nothing + , _olBearerToken = Nothing + , _olKey = Nothing + , _olFilter = Nothing + , _olPageToken = Nothing + , _olOauthToken = Nothing + , _olPageSize = Nothing + , _olFields = Nothing + , _olCallback = Nothing + , _olAlt = "json" + } + +-- | V1 error format. +olXgafv :: Lens' OrganizationsList' (Maybe Text) +olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +olQuotaUser :: Lens' OrganizationsList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OrganizationsList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +olUploadProtocol :: Lens' OrganizationsList' (Maybe Text) +olUploadProtocol + = lens _olUploadProtocol + (\ s a -> s{_olUploadProtocol = a}) + +-- | Pretty-print response. +olPp :: Lens' OrganizationsList' Bool +olPp = lens _olPp (\ s a -> s{_olPp = a}) + +-- | OAuth access token. +olAccessToken :: Lens' OrganizationsList' (Maybe Text) +olAccessToken + = lens _olAccessToken + (\ s a -> s{_olAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +olUploadType :: Lens' OrganizationsList' (Maybe Text) +olUploadType + = lens _olUploadType (\ s a -> s{_olUploadType = a}) + +-- | OAuth bearer token. +olBearerToken :: Lens' OrganizationsList' (Maybe Text) +olBearerToken + = lens _olBearerToken + (\ s a -> s{_olBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OrganizationsList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | An optional query string used to filter the Organizations to be return +-- in the response. Filter rules are case-insensitive. Organizations may be +-- filtered by \`owner.directoryCustomerId\` or by \`domain\`, where the +-- domain is a Google for Work domain, for example: |Filter|Description| +-- |------|-----------| |owner.directorycustomerid:123456789|Organizations +-- with \`owner.directory_customer_id\` equal to \`123456789\`.| +-- |domain:google.com|Organizations corresponding to the domain +-- \`google.com\`.| This field is optional. +olFilter :: Lens' OrganizationsList' (Maybe Text) +olFilter = lens _olFilter (\ s a -> s{_olFilter = a}) + +-- | A pagination token returned from a previous call to ListOrganizations +-- that indicates from where listing should continue. This field is +-- optional. +olPageToken :: Lens' OrganizationsList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OrganizationsList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | The maximum number of Organizations to return in the response. This +-- field is optional. +olPageSize :: Lens' OrganizationsList' (Maybe Int32) +olPageSize + = lens _olPageSize (\ s a -> s{_olPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OrganizationsList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | JSONP +olCallback :: Lens' OrganizationsList' (Maybe Text) +olCallback + = lens _olCallback (\ s a -> s{_olCallback = a}) + +-- | Data format for response. +olAlt :: Lens' OrganizationsList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OrganizationsList' where + type Rs OrganizationsList' = + ListOrganizationsResponse + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u OrganizationsList{..} + = go _olXgafv _olQuotaUser _olPrettyPrint + _olUploadProtocol + _olPp + _olAccessToken + _olUploadType + _olBearerToken + _olKey + _olFilter + _olPageToken + _olOauthToken + _olPageSize + _olFields + _olCallback + _olAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsListAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/SetIAMPolicy.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/SetIAMPolicy.hs new file mode 100644 index 000000000..492f6840b --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/SetIAMPolicy.hs @@ -0,0 +1,233 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.SetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the access control policy on a Organization resource. Replaces any +-- existing policy. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsSetIAMPolicy@. +module Cloudresourcemanager.Organizations.SetIAMPolicy + ( + -- * REST Resource + OrganizationsSetIAMPolicyAPI + + -- * Creating a Request + , organizationsSetIAMPolicy + , OrganizationsSetIAMPolicy + + -- * Request Lenses + , osipXgafv + , osipQuotaUser + , osipPrettyPrint + , osipUploadProtocol + , osipPp + , osipAccessToken + , osipUploadType + , osipBearerToken + , osipKey + , osipResource + , osipOauthToken + , osipFields + , osipCallback + , osipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsSetIAMPolicy@ which the +-- 'OrganizationsSetIAMPolicy' request conforms to. +type OrganizationsSetIAMPolicyAPI = + "v1beta1" :> + "organizations" :> + "{resource}:setIamPolicy" :> Post '[JSON] Policy + +-- | Sets the access control policy on a Organization resource. Replaces any +-- existing policy. +-- +-- /See:/ 'organizationsSetIAMPolicy' smart constructor. +data OrganizationsSetIAMPolicy = OrganizationsSetIAMPolicy + { _osipXgafv :: !(Maybe Text) + , _osipQuotaUser :: !(Maybe Text) + , _osipPrettyPrint :: !Bool + , _osipUploadProtocol :: !(Maybe Text) + , _osipPp :: !Bool + , _osipAccessToken :: !(Maybe Text) + , _osipUploadType :: !(Maybe Text) + , _osipBearerToken :: !(Maybe Text) + , _osipKey :: !(Maybe Text) + , _osipResource :: !Text + , _osipOauthToken :: !(Maybe Text) + , _osipFields :: !(Maybe Text) + , _osipCallback :: !(Maybe Text) + , _osipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsSetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osipXgafv' +-- +-- * 'osipQuotaUser' +-- +-- * 'osipPrettyPrint' +-- +-- * 'osipUploadProtocol' +-- +-- * 'osipPp' +-- +-- * 'osipAccessToken' +-- +-- * 'osipUploadType' +-- +-- * 'osipBearerToken' +-- +-- * 'osipKey' +-- +-- * 'osipResource' +-- +-- * 'osipOauthToken' +-- +-- * 'osipFields' +-- +-- * 'osipCallback' +-- +-- * 'osipAlt' +organizationsSetIAMPolicy + :: Text -- ^ 'resource' + -> OrganizationsSetIAMPolicy +organizationsSetIAMPolicy pOsipResource_ = + OrganizationsSetIAMPolicy + { _osipXgafv = Nothing + , _osipQuotaUser = Nothing + , _osipPrettyPrint = True + , _osipUploadProtocol = Nothing + , _osipPp = True + , _osipAccessToken = Nothing + , _osipUploadType = Nothing + , _osipBearerToken = Nothing + , _osipKey = Nothing + , _osipResource = pOsipResource_ + , _osipOauthToken = Nothing + , _osipFields = Nothing + , _osipCallback = Nothing + , _osipAlt = "json" + } + +-- | V1 error format. +osipXgafv :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipXgafv + = lens _osipXgafv (\ s a -> s{_osipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +osipQuotaUser :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipQuotaUser + = lens _osipQuotaUser + (\ s a -> s{_osipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +osipPrettyPrint :: Lens' OrganizationsSetIAMPolicy' Bool +osipPrettyPrint + = lens _osipPrettyPrint + (\ s a -> s{_osipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +osipUploadProtocol :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipUploadProtocol + = lens _osipUploadProtocol + (\ s a -> s{_osipUploadProtocol = a}) + +-- | Pretty-print response. +osipPp :: Lens' OrganizationsSetIAMPolicy' Bool +osipPp = lens _osipPp (\ s a -> s{_osipPp = a}) + +-- | OAuth access token. +osipAccessToken :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipAccessToken + = lens _osipAccessToken + (\ s a -> s{_osipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +osipUploadType :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipUploadType + = lens _osipUploadType + (\ s a -> s{_osipUploadType = a}) + +-- | OAuth bearer token. +osipBearerToken :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipBearerToken + = lens _osipBearerToken + (\ s a -> s{_osipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +osipKey :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipKey = lens _osipKey (\ s a -> s{_osipKey = a}) + +-- | REQUIRED: The resource for which policy is being specified. \`resource\` +-- is usually specified as a path, such as, +-- \`projects\/{project}\/zones\/{zone}\/disks\/{disk}\`. +osipResource :: Lens' OrganizationsSetIAMPolicy' Text +osipResource + = lens _osipResource (\ s a -> s{_osipResource = a}) + +-- | OAuth 2.0 token for the current user. +osipOauthToken :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipOauthToken + = lens _osipOauthToken + (\ s a -> s{_osipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +osipFields :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipFields + = lens _osipFields (\ s a -> s{_osipFields = a}) + +-- | JSONP +osipCallback :: Lens' OrganizationsSetIAMPolicy' (Maybe Text) +osipCallback + = lens _osipCallback (\ s a -> s{_osipCallback = a}) + +-- | Data format for response. +osipAlt :: Lens' OrganizationsSetIAMPolicy' Text +osipAlt = lens _osipAlt (\ s a -> s{_osipAlt = a}) + +instance GoogleRequest OrganizationsSetIAMPolicy' + where + type Rs OrganizationsSetIAMPolicy' = Policy + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u OrganizationsSetIAMPolicy{..} + = go _osipXgafv _osipQuotaUser _osipPrettyPrint + _osipUploadProtocol + _osipPp + _osipAccessToken + _osipUploadType + _osipBearerToken + _osipKey + _osipResource + _osipOauthToken + _osipFields + _osipCallback + _osipAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsSetIAMPolicyAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/TestIAMPermissions.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/TestIAMPermissions.hs new file mode 100644 index 000000000..71363d55e --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/TestIAMPermissions.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.TestIAMPermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns permissions that a caller has on the specified Organization. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsTestIAMPermissions@. +module Cloudresourcemanager.Organizations.TestIAMPermissions + ( + -- * REST Resource + OrganizationsTestIAMPermissionsAPI + + -- * Creating a Request + , organizationsTestIAMPermissions + , OrganizationsTestIAMPermissions + + -- * Request Lenses + , otipXgafv + , otipQuotaUser + , otipPrettyPrint + , otipUploadProtocol + , otipPp + , otipAccessToken + , otipUploadType + , otipBearerToken + , otipKey + , otipResource + , otipOauthToken + , otipFields + , otipCallback + , otipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsTestIAMPermissions@ which the +-- 'OrganizationsTestIAMPermissions' request conforms to. +type OrganizationsTestIAMPermissionsAPI = + "v1beta1" :> + "organizations" :> + "{resource}:testIamPermissions" :> + Post '[JSON] TestIAMPermissionsResponse + +-- | Returns permissions that a caller has on the specified Organization. +-- +-- /See:/ 'organizationsTestIAMPermissions' smart constructor. +data OrganizationsTestIAMPermissions = OrganizationsTestIAMPermissions + { _otipXgafv :: !(Maybe Text) + , _otipQuotaUser :: !(Maybe Text) + , _otipPrettyPrint :: !Bool + , _otipUploadProtocol :: !(Maybe Text) + , _otipPp :: !Bool + , _otipAccessToken :: !(Maybe Text) + , _otipUploadType :: !(Maybe Text) + , _otipBearerToken :: !(Maybe Text) + , _otipKey :: !(Maybe Text) + , _otipResource :: !Text + , _otipOauthToken :: !(Maybe Text) + , _otipFields :: !(Maybe Text) + , _otipCallback :: !(Maybe Text) + , _otipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsTestIAMPermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'otipXgafv' +-- +-- * 'otipQuotaUser' +-- +-- * 'otipPrettyPrint' +-- +-- * 'otipUploadProtocol' +-- +-- * 'otipPp' +-- +-- * 'otipAccessToken' +-- +-- * 'otipUploadType' +-- +-- * 'otipBearerToken' +-- +-- * 'otipKey' +-- +-- * 'otipResource' +-- +-- * 'otipOauthToken' +-- +-- * 'otipFields' +-- +-- * 'otipCallback' +-- +-- * 'otipAlt' +organizationsTestIAMPermissions + :: Text -- ^ 'resource' + -> OrganizationsTestIAMPermissions +organizationsTestIAMPermissions pOtipResource_ = + OrganizationsTestIAMPermissions + { _otipXgafv = Nothing + , _otipQuotaUser = Nothing + , _otipPrettyPrint = True + , _otipUploadProtocol = Nothing + , _otipPp = True + , _otipAccessToken = Nothing + , _otipUploadType = Nothing + , _otipBearerToken = Nothing + , _otipKey = Nothing + , _otipResource = pOtipResource_ + , _otipOauthToken = Nothing + , _otipFields = Nothing + , _otipCallback = Nothing + , _otipAlt = "json" + } + +-- | V1 error format. +otipXgafv :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipXgafv + = lens _otipXgafv (\ s a -> s{_otipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +otipQuotaUser :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipQuotaUser + = lens _otipQuotaUser + (\ s a -> s{_otipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +otipPrettyPrint :: Lens' OrganizationsTestIAMPermissions' Bool +otipPrettyPrint + = lens _otipPrettyPrint + (\ s a -> s{_otipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +otipUploadProtocol :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipUploadProtocol + = lens _otipUploadProtocol + (\ s a -> s{_otipUploadProtocol = a}) + +-- | Pretty-print response. +otipPp :: Lens' OrganizationsTestIAMPermissions' Bool +otipPp = lens _otipPp (\ s a -> s{_otipPp = a}) + +-- | OAuth access token. +otipAccessToken :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipAccessToken + = lens _otipAccessToken + (\ s a -> s{_otipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +otipUploadType :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipUploadType + = lens _otipUploadType + (\ s a -> s{_otipUploadType = a}) + +-- | OAuth bearer token. +otipBearerToken :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipBearerToken + = lens _otipBearerToken + (\ s a -> s{_otipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +otipKey :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipKey = lens _otipKey (\ s a -> s{_otipKey = a}) + +-- | REQUIRED: The resource for which policy detail is being requested. +-- \`resource\` is usually specified as a path, such as, +-- \`projects\/{project}\`. +otipResource :: Lens' OrganizationsTestIAMPermissions' Text +otipResource + = lens _otipResource (\ s a -> s{_otipResource = a}) + +-- | OAuth 2.0 token for the current user. +otipOauthToken :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipOauthToken + = lens _otipOauthToken + (\ s a -> s{_otipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +otipFields :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipFields + = lens _otipFields (\ s a -> s{_otipFields = a}) + +-- | JSONP +otipCallback :: Lens' OrganizationsTestIAMPermissions' (Maybe Text) +otipCallback + = lens _otipCallback (\ s a -> s{_otipCallback = a}) + +-- | Data format for response. +otipAlt :: Lens' OrganizationsTestIAMPermissions' Text +otipAlt = lens _otipAlt (\ s a -> s{_otipAlt = a}) + +instance GoogleRequest + OrganizationsTestIAMPermissions' where + type Rs OrganizationsTestIAMPermissions' = + TestIAMPermissionsResponse + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u + OrganizationsTestIAMPermissions{..} + = go _otipXgafv _otipQuotaUser _otipPrettyPrint + _otipUploadProtocol + _otipPp + _otipAccessToken + _otipUploadType + _otipBearerToken + _otipKey + _otipResource + _otipOauthToken + _otipFields + _otipCallback + _otipAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsTestIAMPermissionsAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Update.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Update.hs new file mode 100644 index 000000000..e165f0858 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Organizations/Update.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Organizations.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an Organization resource. +-- +-- /See:/ for @CloudresourcemanagerOrganizationsUpdate@. +module Cloudresourcemanager.Organizations.Update + ( + -- * REST Resource + OrganizationsUpdateAPI + + -- * Creating a Request + , organizationsUpdate + , OrganizationsUpdate + + -- * Request Lenses + , ouXgafv + , ouQuotaUser + , ouPrettyPrint + , ouUploadProtocol + , ouPp + , ouAccessToken + , ouUploadType + , ouBearerToken + , ouKey + , ouOauthToken + , ouOrganizationId + , ouFields + , ouCallback + , ouAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerOrganizationsUpdate@ which the +-- 'OrganizationsUpdate' request conforms to. +type OrganizationsUpdateAPI = + "v1beta1" :> + "organizations" :> + Capture "organizationId" Text :> + Put '[JSON] Organization + +-- | Updates an Organization resource. +-- +-- /See:/ 'organizationsUpdate' smart constructor. +data OrganizationsUpdate = OrganizationsUpdate + { _ouXgafv :: !(Maybe Text) + , _ouQuotaUser :: !(Maybe Text) + , _ouPrettyPrint :: !Bool + , _ouUploadProtocol :: !(Maybe Text) + , _ouPp :: !Bool + , _ouAccessToken :: !(Maybe Text) + , _ouUploadType :: !(Maybe Text) + , _ouBearerToken :: !(Maybe Text) + , _ouKey :: !(Maybe Text) + , _ouOauthToken :: !(Maybe Text) + , _ouOrganizationId :: !Text + , _ouFields :: !(Maybe Text) + , _ouCallback :: !(Maybe Text) + , _ouAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ouXgafv' +-- +-- * 'ouQuotaUser' +-- +-- * 'ouPrettyPrint' +-- +-- * 'ouUploadProtocol' +-- +-- * 'ouPp' +-- +-- * 'ouAccessToken' +-- +-- * 'ouUploadType' +-- +-- * 'ouBearerToken' +-- +-- * 'ouKey' +-- +-- * 'ouOauthToken' +-- +-- * 'ouOrganizationId' +-- +-- * 'ouFields' +-- +-- * 'ouCallback' +-- +-- * 'ouAlt' +organizationsUpdate + :: Text -- ^ 'organizationId' + -> OrganizationsUpdate +organizationsUpdate pOuOrganizationId_ = + OrganizationsUpdate + { _ouXgafv = Nothing + , _ouQuotaUser = Nothing + , _ouPrettyPrint = True + , _ouUploadProtocol = Nothing + , _ouPp = True + , _ouAccessToken = Nothing + , _ouUploadType = Nothing + , _ouBearerToken = Nothing + , _ouKey = Nothing + , _ouOauthToken = Nothing + , _ouOrganizationId = pOuOrganizationId_ + , _ouFields = Nothing + , _ouCallback = Nothing + , _ouAlt = "json" + } + +-- | V1 error format. +ouXgafv :: Lens' OrganizationsUpdate' (Maybe Text) +ouXgafv = lens _ouXgafv (\ s a -> s{_ouXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ouQuotaUser :: Lens' OrganizationsUpdate' (Maybe Text) +ouQuotaUser + = lens _ouQuotaUser (\ s a -> s{_ouQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ouPrettyPrint :: Lens' OrganizationsUpdate' Bool +ouPrettyPrint + = lens _ouPrettyPrint + (\ s a -> s{_ouPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ouUploadProtocol :: Lens' OrganizationsUpdate' (Maybe Text) +ouUploadProtocol + = lens _ouUploadProtocol + (\ s a -> s{_ouUploadProtocol = a}) + +-- | Pretty-print response. +ouPp :: Lens' OrganizationsUpdate' Bool +ouPp = lens _ouPp (\ s a -> s{_ouPp = a}) + +-- | OAuth access token. +ouAccessToken :: Lens' OrganizationsUpdate' (Maybe Text) +ouAccessToken + = lens _ouAccessToken + (\ s a -> s{_ouAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ouUploadType :: Lens' OrganizationsUpdate' (Maybe Text) +ouUploadType + = lens _ouUploadType (\ s a -> s{_ouUploadType = a}) + +-- | OAuth bearer token. +ouBearerToken :: Lens' OrganizationsUpdate' (Maybe Text) +ouBearerToken + = lens _ouBearerToken + (\ s a -> s{_ouBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ouKey :: Lens' OrganizationsUpdate' (Maybe Text) +ouKey = lens _ouKey (\ s a -> s{_ouKey = a}) + +-- | OAuth 2.0 token for the current user. +ouOauthToken :: Lens' OrganizationsUpdate' (Maybe Text) +ouOauthToken + = lens _ouOauthToken (\ s a -> s{_ouOauthToken = a}) + +-- | An immutable id for the Organization that is assigned on creation. This +-- should be omitted when creating a new Organization. This field is +-- read-only. +ouOrganizationId :: Lens' OrganizationsUpdate' Text +ouOrganizationId + = lens _ouOrganizationId + (\ s a -> s{_ouOrganizationId = a}) + +-- | Selector specifying which fields to include in a partial response. +ouFields :: Lens' OrganizationsUpdate' (Maybe Text) +ouFields = lens _ouFields (\ s a -> s{_ouFields = a}) + +-- | JSONP +ouCallback :: Lens' OrganizationsUpdate' (Maybe Text) +ouCallback + = lens _ouCallback (\ s a -> s{_ouCallback = a}) + +-- | Data format for response. +ouAlt :: Lens' OrganizationsUpdate' Text +ouAlt = lens _ouAlt (\ s a -> s{_ouAlt = a}) + +instance GoogleRequest OrganizationsUpdate' where + type Rs OrganizationsUpdate' = Organization + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u OrganizationsUpdate{..} + = go _ouXgafv _ouQuotaUser _ouPrettyPrint + _ouUploadProtocol + _ouPp + _ouAccessToken + _ouUploadType + _ouBearerToken + _ouKey + _ouOauthToken + _ouOrganizationId + _ouFields + _ouCallback + _ouAlt + where go + = clientWithRoute + (Proxy :: Proxy OrganizationsUpdateAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Create.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Create.hs new file mode 100644 index 000000000..eb3a05fbf --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Create.hs @@ -0,0 +1,214 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a project resource. Initially, the project resource is owned by +-- its creator exclusively. The creator can later grant permission to +-- others to read or update the project. Several APIs are activated +-- automatically for the project, including Google Cloud Storage. +-- +-- /See:/ for @CloudresourcemanagerProjectsCreate@. +module Cloudresourcemanager.Projects.Create + ( + -- * REST Resource + ProjectsCreateAPI + + -- * Creating a Request + , projectsCreate + , ProjectsCreate + + -- * Request Lenses + , pcXgafv + , pcQuotaUser + , pcPrettyPrint + , pcUploadProtocol + , pcPp + , pcAccessToken + , pcUploadType + , pcBearerToken + , pcKey + , pcOauthToken + , pcFields + , pcCallback + , pcAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsCreate@ which the +-- 'ProjectsCreate' request conforms to. +type ProjectsCreateAPI = + "v1beta1" :> "projects" :> Post '[JSON] Project + +-- | Creates a project resource. Initially, the project resource is owned by +-- its creator exclusively. The creator can later grant permission to +-- others to read or update the project. Several APIs are activated +-- automatically for the project, including Google Cloud Storage. +-- +-- /See:/ 'projectsCreate' smart constructor. +data ProjectsCreate = ProjectsCreate + { _pcXgafv :: !(Maybe Text) + , _pcQuotaUser :: !(Maybe Text) + , _pcPrettyPrint :: !Bool + , _pcUploadProtocol :: !(Maybe Text) + , _pcPp :: !Bool + , _pcAccessToken :: !(Maybe Text) + , _pcUploadType :: !(Maybe Text) + , _pcBearerToken :: !(Maybe Text) + , _pcKey :: !(Maybe Text) + , _pcOauthToken :: !(Maybe Text) + , _pcFields :: !(Maybe Text) + , _pcCallback :: !(Maybe Text) + , _pcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcXgafv' +-- +-- * 'pcQuotaUser' +-- +-- * 'pcPrettyPrint' +-- +-- * 'pcUploadProtocol' +-- +-- * 'pcPp' +-- +-- * 'pcAccessToken' +-- +-- * 'pcUploadType' +-- +-- * 'pcBearerToken' +-- +-- * 'pcKey' +-- +-- * 'pcOauthToken' +-- +-- * 'pcFields' +-- +-- * 'pcCallback' +-- +-- * 'pcAlt' +projectsCreate + :: ProjectsCreate +projectsCreate = + ProjectsCreate + { _pcXgafv = Nothing + , _pcQuotaUser = Nothing + , _pcPrettyPrint = True + , _pcUploadProtocol = Nothing + , _pcPp = True + , _pcAccessToken = Nothing + , _pcUploadType = Nothing + , _pcBearerToken = Nothing + , _pcKey = Nothing + , _pcOauthToken = Nothing + , _pcFields = Nothing + , _pcCallback = Nothing + , _pcAlt = "json" + } + +-- | V1 error format. +pcXgafv :: Lens' ProjectsCreate' (Maybe Text) +pcXgafv = lens _pcXgafv (\ s a -> s{_pcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pcQuotaUser :: Lens' ProjectsCreate' (Maybe Text) +pcQuotaUser + = lens _pcQuotaUser (\ s a -> s{_pcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pcPrettyPrint :: Lens' ProjectsCreate' Bool +pcPrettyPrint + = lens _pcPrettyPrint + (\ s a -> s{_pcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pcUploadProtocol :: Lens' ProjectsCreate' (Maybe Text) +pcUploadProtocol + = lens _pcUploadProtocol + (\ s a -> s{_pcUploadProtocol = a}) + +-- | Pretty-print response. +pcPp :: Lens' ProjectsCreate' Bool +pcPp = lens _pcPp (\ s a -> s{_pcPp = a}) + +-- | OAuth access token. +pcAccessToken :: Lens' ProjectsCreate' (Maybe Text) +pcAccessToken + = lens _pcAccessToken + (\ s a -> s{_pcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pcUploadType :: Lens' ProjectsCreate' (Maybe Text) +pcUploadType + = lens _pcUploadType (\ s a -> s{_pcUploadType = a}) + +-- | OAuth bearer token. +pcBearerToken :: Lens' ProjectsCreate' (Maybe Text) +pcBearerToken + = lens _pcBearerToken + (\ s a -> s{_pcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pcKey :: Lens' ProjectsCreate' (Maybe Text) +pcKey = lens _pcKey (\ s a -> s{_pcKey = a}) + +-- | OAuth 2.0 token for the current user. +pcOauthToken :: Lens' ProjectsCreate' (Maybe Text) +pcOauthToken + = lens _pcOauthToken (\ s a -> s{_pcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pcFields :: Lens' ProjectsCreate' (Maybe Text) +pcFields = lens _pcFields (\ s a -> s{_pcFields = a}) + +-- | JSONP +pcCallback :: Lens' ProjectsCreate' (Maybe Text) +pcCallback + = lens _pcCallback (\ s a -> s{_pcCallback = a}) + +-- | Data format for response. +pcAlt :: Lens' ProjectsCreate' Text +pcAlt = lens _pcAlt (\ s a -> s{_pcAlt = a}) + +instance GoogleRequest ProjectsCreate' where + type Rs ProjectsCreate' = Project + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsCreate{..} + = go _pcXgafv _pcQuotaUser _pcPrettyPrint + _pcUploadProtocol + _pcPp + _pcAccessToken + _pcUploadType + _pcBearerToken + _pcKey + _pcOauthToken + _pcFields + _pcCallback + _pcAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsCreateAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Delete.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Delete.hs new file mode 100644 index 000000000..88da672cc --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Delete.hs @@ -0,0 +1,268 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`) for deletion. This method will only affect +-- the project if the following criteria are met: + The project does not +-- have a billing account associated with it. + The project has a lifecycle +-- state of +-- [ACTIVE][google.cloudresourcemanager.projects.v1beta1.LifecycleState.ACTIVE]. +-- This method changes the project\'s lifecycle state from +-- [ACTIVE][google.cloudresourcemanager.projects.v1beta1.LifecycleState.ACTIVE] +-- to [DELETE_REQUESTED] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_REQUESTED]. +-- The deletion starts at an unspecified time, at which point the lifecycle +-- state changes to [DELETE_IN_PROGRESS] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_IN_PROGRESS]. +-- Until the deletion completes, you can check the lifecycle state checked +-- by retrieving the project with [GetProject] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.GetProject], +-- and the project remains visible to [ListProjects] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.ListProjects]. +-- However, you cannot update the project. After the deletion completes, +-- the project is not retrievable by the [GetProject] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.GetProject] +-- and [ListProjects] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.ListProjects] +-- methods. The caller must have modify permissions for this project. +-- +-- /See:/ for @CloudresourcemanagerProjectsDelete@. +module Cloudresourcemanager.Projects.Delete + ( + -- * REST Resource + ProjectsDeleteAPI + + -- * Creating a Request + , projectsDelete + , ProjectsDelete + + -- * Request Lenses + , pdXgafv + , pdQuotaUser + , pdPrettyPrint + , pdUploadProtocol + , pdPp + , pdAccessToken + , pdUploadType + , pdBearerToken + , pdKey + , pdProjectId + , pdOauthToken + , pdFields + , pdCallback + , pdAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsDelete@ which the +-- 'ProjectsDelete' request conforms to. +type ProjectsDeleteAPI = + "v1beta1" :> + "projects" :> + Capture "projectId" Text :> Delete '[JSON] Empty + +-- | Marks the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`) for deletion. This method will only affect +-- the project if the following criteria are met: + The project does not +-- have a billing account associated with it. + The project has a lifecycle +-- state of +-- [ACTIVE][google.cloudresourcemanager.projects.v1beta1.LifecycleState.ACTIVE]. +-- This method changes the project\'s lifecycle state from +-- [ACTIVE][google.cloudresourcemanager.projects.v1beta1.LifecycleState.ACTIVE] +-- to [DELETE_REQUESTED] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_REQUESTED]. +-- The deletion starts at an unspecified time, at which point the lifecycle +-- state changes to [DELETE_IN_PROGRESS] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_IN_PROGRESS]. +-- Until the deletion completes, you can check the lifecycle state checked +-- by retrieving the project with [GetProject] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.GetProject], +-- and the project remains visible to [ListProjects] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.ListProjects]. +-- However, you cannot update the project. After the deletion completes, +-- the project is not retrievable by the [GetProject] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.GetProject] +-- and [ListProjects] +-- [google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.ListProjects] +-- methods. The caller must have modify permissions for this project. +-- +-- /See:/ 'projectsDelete' smart constructor. +data ProjectsDelete = ProjectsDelete + { _pdXgafv :: !(Maybe Text) + , _pdQuotaUser :: !(Maybe Text) + , _pdPrettyPrint :: !Bool + , _pdUploadProtocol :: !(Maybe Text) + , _pdPp :: !Bool + , _pdAccessToken :: !(Maybe Text) + , _pdUploadType :: !(Maybe Text) + , _pdBearerToken :: !(Maybe Text) + , _pdKey :: !(Maybe Text) + , _pdProjectId :: !Text + , _pdOauthToken :: !(Maybe Text) + , _pdFields :: !(Maybe Text) + , _pdCallback :: !(Maybe Text) + , _pdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdXgafv' +-- +-- * 'pdQuotaUser' +-- +-- * 'pdPrettyPrint' +-- +-- * 'pdUploadProtocol' +-- +-- * 'pdPp' +-- +-- * 'pdAccessToken' +-- +-- * 'pdUploadType' +-- +-- * 'pdBearerToken' +-- +-- * 'pdKey' +-- +-- * 'pdProjectId' +-- +-- * 'pdOauthToken' +-- +-- * 'pdFields' +-- +-- * 'pdCallback' +-- +-- * 'pdAlt' +projectsDelete + :: Text -- ^ 'projectId' + -> ProjectsDelete +projectsDelete pPdProjectId_ = + ProjectsDelete + { _pdXgafv = Nothing + , _pdQuotaUser = Nothing + , _pdPrettyPrint = True + , _pdUploadProtocol = Nothing + , _pdPp = True + , _pdAccessToken = Nothing + , _pdUploadType = Nothing + , _pdBearerToken = Nothing + , _pdKey = Nothing + , _pdProjectId = pPdProjectId_ + , _pdOauthToken = Nothing + , _pdFields = Nothing + , _pdCallback = Nothing + , _pdAlt = "json" + } + +-- | V1 error format. +pdXgafv :: Lens' ProjectsDelete' (Maybe Text) +pdXgafv = lens _pdXgafv (\ s a -> s{_pdXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pdQuotaUser :: Lens' ProjectsDelete' (Maybe Text) +pdQuotaUser + = lens _pdQuotaUser (\ s a -> s{_pdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pdPrettyPrint :: Lens' ProjectsDelete' Bool +pdPrettyPrint + = lens _pdPrettyPrint + (\ s a -> s{_pdPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pdUploadProtocol :: Lens' ProjectsDelete' (Maybe Text) +pdUploadProtocol + = lens _pdUploadProtocol + (\ s a -> s{_pdUploadProtocol = a}) + +-- | Pretty-print response. +pdPp :: Lens' ProjectsDelete' Bool +pdPp = lens _pdPp (\ s a -> s{_pdPp = a}) + +-- | OAuth access token. +pdAccessToken :: Lens' ProjectsDelete' (Maybe Text) +pdAccessToken + = lens _pdAccessToken + (\ s a -> s{_pdAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pdUploadType :: Lens' ProjectsDelete' (Maybe Text) +pdUploadType + = lens _pdUploadType (\ s a -> s{_pdUploadType = a}) + +-- | OAuth bearer token. +pdBearerToken :: Lens' ProjectsDelete' (Maybe Text) +pdBearerToken + = lens _pdBearerToken + (\ s a -> s{_pdBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pdKey :: Lens' ProjectsDelete' (Maybe Text) +pdKey = lens _pdKey (\ s a -> s{_pdKey = a}) + +-- | The project ID (for example, \`foo-bar-123\`). Required. +pdProjectId :: Lens' ProjectsDelete' Text +pdProjectId + = lens _pdProjectId (\ s a -> s{_pdProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pdOauthToken :: Lens' ProjectsDelete' (Maybe Text) +pdOauthToken + = lens _pdOauthToken (\ s a -> s{_pdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pdFields :: Lens' ProjectsDelete' (Maybe Text) +pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) + +-- | JSONP +pdCallback :: Lens' ProjectsDelete' (Maybe Text) +pdCallback + = lens _pdCallback (\ s a -> s{_pdCallback = a}) + +-- | Data format for response. +pdAlt :: Lens' ProjectsDelete' Text +pdAlt = lens _pdAlt (\ s a -> s{_pdAlt = a}) + +instance GoogleRequest ProjectsDelete' where + type Rs ProjectsDelete' = Empty + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsDelete{..} + = go _pdXgafv _pdQuotaUser _pdPrettyPrint + _pdUploadProtocol + _pdPp + _pdAccessToken + _pdUploadType + _pdBearerToken + _pdKey + _pdProjectId + _pdOauthToken + _pdFields + _pdCallback + _pdAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsDeleteAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Get.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Get.hs new file mode 100644 index 000000000..66b83f49b --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Get.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`). The caller must have read permissions for +-- this project. +-- +-- /See:/ for @CloudresourcemanagerProjectsGet@. +module Cloudresourcemanager.Projects.Get + ( + -- * REST Resource + ProjectsGetAPI + + -- * Creating a Request + , projectsGet + , ProjectsGet + + -- * Request Lenses + , pgXgafv + , pgQuotaUser + , pgPrettyPrint + , pgUploadProtocol + , pgPp + , pgAccessToken + , pgUploadType + , pgBearerToken + , pgKey + , pgProjectId + , pgOauthToken + , pgFields + , pgCallback + , pgAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsGet@ which the +-- 'ProjectsGet' request conforms to. +type ProjectsGetAPI = + "v1beta1" :> + "projects" :> + Capture "projectId" Text :> Get '[JSON] Project + +-- | Retrieves the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`). The caller must have read permissions for +-- this project. +-- +-- /See:/ 'projectsGet' smart constructor. +data ProjectsGet = ProjectsGet + { _pgXgafv :: !(Maybe Text) + , _pgQuotaUser :: !(Maybe Text) + , _pgPrettyPrint :: !Bool + , _pgUploadProtocol :: !(Maybe Text) + , _pgPp :: !Bool + , _pgAccessToken :: !(Maybe Text) + , _pgUploadType :: !(Maybe Text) + , _pgBearerToken :: !(Maybe Text) + , _pgKey :: !(Maybe Text) + , _pgProjectId :: !Text + , _pgOauthToken :: !(Maybe Text) + , _pgFields :: !(Maybe Text) + , _pgCallback :: !(Maybe Text) + , _pgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgXgafv' +-- +-- * 'pgQuotaUser' +-- +-- * 'pgPrettyPrint' +-- +-- * 'pgUploadProtocol' +-- +-- * 'pgPp' +-- +-- * 'pgAccessToken' +-- +-- * 'pgUploadType' +-- +-- * 'pgBearerToken' +-- +-- * 'pgKey' +-- +-- * 'pgProjectId' +-- +-- * 'pgOauthToken' +-- +-- * 'pgFields' +-- +-- * 'pgCallback' +-- +-- * 'pgAlt' +projectsGet + :: Text -- ^ 'projectId' + -> ProjectsGet +projectsGet pPgProjectId_ = + ProjectsGet + { _pgXgafv = Nothing + , _pgQuotaUser = Nothing + , _pgPrettyPrint = True + , _pgUploadProtocol = Nothing + , _pgPp = True + , _pgAccessToken = Nothing + , _pgUploadType = Nothing + , _pgBearerToken = Nothing + , _pgKey = Nothing + , _pgProjectId = pPgProjectId_ + , _pgOauthToken = Nothing + , _pgFields = Nothing + , _pgCallback = Nothing + , _pgAlt = "json" + } + +-- | V1 error format. +pgXgafv :: Lens' ProjectsGet' (Maybe Text) +pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pgQuotaUser :: Lens' ProjectsGet' (Maybe Text) +pgQuotaUser + = lens _pgQuotaUser (\ s a -> s{_pgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgPrettyPrint :: Lens' ProjectsGet' Bool +pgPrettyPrint + = lens _pgPrettyPrint + (\ s a -> s{_pgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pgUploadProtocol :: Lens' ProjectsGet' (Maybe Text) +pgUploadProtocol + = lens _pgUploadProtocol + (\ s a -> s{_pgUploadProtocol = a}) + +-- | Pretty-print response. +pgPp :: Lens' ProjectsGet' Bool +pgPp = lens _pgPp (\ s a -> s{_pgPp = a}) + +-- | OAuth access token. +pgAccessToken :: Lens' ProjectsGet' (Maybe Text) +pgAccessToken + = lens _pgAccessToken + (\ s a -> s{_pgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pgUploadType :: Lens' ProjectsGet' (Maybe Text) +pgUploadType + = lens _pgUploadType (\ s a -> s{_pgUploadType = a}) + +-- | OAuth bearer token. +pgBearerToken :: Lens' ProjectsGet' (Maybe Text) +pgBearerToken + = lens _pgBearerToken + (\ s a -> s{_pgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgKey :: Lens' ProjectsGet' (Maybe Text) +pgKey = lens _pgKey (\ s a -> s{_pgKey = a}) + +-- | The project ID (for example, \`my-project-123\`). Required. +pgProjectId :: Lens' ProjectsGet' Text +pgProjectId + = lens _pgProjectId (\ s a -> s{_pgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +pgOauthToken :: Lens' ProjectsGet' (Maybe Text) +pgOauthToken + = lens _pgOauthToken (\ s a -> s{_pgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgFields :: Lens' ProjectsGet' (Maybe Text) +pgFields = lens _pgFields (\ s a -> s{_pgFields = a}) + +-- | JSONP +pgCallback :: Lens' ProjectsGet' (Maybe Text) +pgCallback + = lens _pgCallback (\ s a -> s{_pgCallback = a}) + +-- | Data format for response. +pgAlt :: Lens' ProjectsGet' Text +pgAlt = lens _pgAlt (\ s a -> s{_pgAlt = a}) + +instance GoogleRequest ProjectsGet' where + type Rs ProjectsGet' = Project + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsGet{..} + = go _pgXgafv _pgQuotaUser _pgPrettyPrint + _pgUploadProtocol + _pgPp + _pgAccessToken + _pgUploadType + _pgBearerToken + _pgKey + _pgProjectId + _pgOauthToken + _pgFields + _pgCallback + _pgAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsGetAPI) r u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/GetIAMPolicy.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/GetIAMPolicy.hs new file mode 100644 index 000000000..8a06df1d8 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/GetIAMPolicy.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.GetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the IAM access control policy for specified project. +-- +-- /See:/ for @CloudresourcemanagerProjectsGetIAMPolicy@. +module Cloudresourcemanager.Projects.GetIAMPolicy + ( + -- * REST Resource + ProjectsGetIAMPolicyAPI + + -- * Creating a Request + , projectsGetIAMPolicy + , ProjectsGetIAMPolicy + + -- * Request Lenses + , pgipXgafv + , pgipQuotaUser + , pgipPrettyPrint + , pgipUploadProtocol + , pgipPp + , pgipAccessToken + , pgipUploadType + , pgipBearerToken + , pgipKey + , pgipResource + , pgipOauthToken + , pgipFields + , pgipCallback + , pgipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsGetIAMPolicy@ which the +-- 'ProjectsGetIAMPolicy' request conforms to. +type ProjectsGetIAMPolicyAPI = + "v1beta1" :> + "projects" :> + "{resource}:getIamPolicy" :> Post '[JSON] Policy + +-- | Returns the IAM access control policy for specified project. +-- +-- /See:/ 'projectsGetIAMPolicy' smart constructor. +data ProjectsGetIAMPolicy = ProjectsGetIAMPolicy + { _pgipXgafv :: !(Maybe Text) + , _pgipQuotaUser :: !(Maybe Text) + , _pgipPrettyPrint :: !Bool + , _pgipUploadProtocol :: !(Maybe Text) + , _pgipPp :: !Bool + , _pgipAccessToken :: !(Maybe Text) + , _pgipUploadType :: !(Maybe Text) + , _pgipBearerToken :: !(Maybe Text) + , _pgipKey :: !(Maybe Text) + , _pgipResource :: !Text + , _pgipOauthToken :: !(Maybe Text) + , _pgipFields :: !(Maybe Text) + , _pgipCallback :: !(Maybe Text) + , _pgipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsGetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgipXgafv' +-- +-- * 'pgipQuotaUser' +-- +-- * 'pgipPrettyPrint' +-- +-- * 'pgipUploadProtocol' +-- +-- * 'pgipPp' +-- +-- * 'pgipAccessToken' +-- +-- * 'pgipUploadType' +-- +-- * 'pgipBearerToken' +-- +-- * 'pgipKey' +-- +-- * 'pgipResource' +-- +-- * 'pgipOauthToken' +-- +-- * 'pgipFields' +-- +-- * 'pgipCallback' +-- +-- * 'pgipAlt' +projectsGetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsGetIAMPolicy +projectsGetIAMPolicy pPgipResource_ = + ProjectsGetIAMPolicy + { _pgipXgafv = Nothing + , _pgipQuotaUser = Nothing + , _pgipPrettyPrint = True + , _pgipUploadProtocol = Nothing + , _pgipPp = True + , _pgipAccessToken = Nothing + , _pgipUploadType = Nothing + , _pgipBearerToken = Nothing + , _pgipKey = Nothing + , _pgipResource = pPgipResource_ + , _pgipOauthToken = Nothing + , _pgipFields = Nothing + , _pgipCallback = Nothing + , _pgipAlt = "json" + } + +-- | V1 error format. +pgipXgafv :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipXgafv + = lens _pgipXgafv (\ s a -> s{_pgipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +pgipQuotaUser :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipQuotaUser + = lens _pgipQuotaUser + (\ s a -> s{_pgipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgipPrettyPrint :: Lens' ProjectsGetIAMPolicy' Bool +pgipPrettyPrint + = lens _pgipPrettyPrint + (\ s a -> s{_pgipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pgipUploadProtocol :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipUploadProtocol + = lens _pgipUploadProtocol + (\ s a -> s{_pgipUploadProtocol = a}) + +-- | Pretty-print response. +pgipPp :: Lens' ProjectsGetIAMPolicy' Bool +pgipPp = lens _pgipPp (\ s a -> s{_pgipPp = a}) + +-- | OAuth access token. +pgipAccessToken :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipAccessToken + = lens _pgipAccessToken + (\ s a -> s{_pgipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pgipUploadType :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipUploadType + = lens _pgipUploadType + (\ s a -> s{_pgipUploadType = a}) + +-- | OAuth bearer token. +pgipBearerToken :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipBearerToken + = lens _pgipBearerToken + (\ s a -> s{_pgipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgipKey :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipKey = lens _pgipKey (\ s a -> s{_pgipKey = a}) + +-- | REQUIRED: The resource for which policy is being requested. Resource is +-- usually specified as a path, such as, \`projects\/{project}\`. +pgipResource :: Lens' ProjectsGetIAMPolicy' Text +pgipResource + = lens _pgipResource (\ s a -> s{_pgipResource = a}) + +-- | OAuth 2.0 token for the current user. +pgipOauthToken :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipOauthToken + = lens _pgipOauthToken + (\ s a -> s{_pgipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgipFields :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipFields + = lens _pgipFields (\ s a -> s{_pgipFields = a}) + +-- | JSONP +pgipCallback :: Lens' ProjectsGetIAMPolicy' (Maybe Text) +pgipCallback + = lens _pgipCallback (\ s a -> s{_pgipCallback = a}) + +-- | Data format for response. +pgipAlt :: Lens' ProjectsGetIAMPolicy' Text +pgipAlt = lens _pgipAlt (\ s a -> s{_pgipAlt = a}) + +instance GoogleRequest ProjectsGetIAMPolicy' where + type Rs ProjectsGetIAMPolicy' = Policy + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsGetIAMPolicy{..} + = go _pgipXgafv _pgipQuotaUser _pgipPrettyPrint + _pgipUploadProtocol + _pgipPp + _pgipAccessToken + _pgipUploadType + _pgipBearerToken + _pgipKey + _pgipResource + _pgipOauthToken + _pgipFields + _pgipCallback + _pgipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsGetIAMPolicyAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/List.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/List.hs new file mode 100644 index 000000000..f7f1b4dc0 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/List.hs @@ -0,0 +1,263 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists projects that are visible to the user and satisfy the specified +-- filter. This method returns projects in an unspecified order. New +-- projects do not necessarily appear at the end of the list. +-- +-- /See:/ for @CloudresourcemanagerProjectsList@. +module Cloudresourcemanager.Projects.List + ( + -- * REST Resource + ProjectsListAPI + + -- * Creating a Request + , projectsList + , ProjectsList + + -- * Request Lenses + , plXgafv + , plQuotaUser + , plPrettyPrint + , plUploadProtocol + , plPp + , plAccessToken + , plUploadType + , plBearerToken + , plKey + , plFilter + , plPageToken + , plOauthToken + , plPageSize + , plFields + , plCallback + , plAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsList@ which the +-- 'ProjectsList' request conforms to. +type ProjectsListAPI = + "v1beta1" :> + "projects" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListProjectsResponse + +-- | Lists projects that are visible to the user and satisfy the specified +-- filter. This method returns projects in an unspecified order. New +-- projects do not necessarily appear at the end of the list. +-- +-- /See:/ 'projectsList' smart constructor. +data ProjectsList = ProjectsList + { _plXgafv :: !(Maybe Text) + , _plQuotaUser :: !(Maybe Text) + , _plPrettyPrint :: !Bool + , _plUploadProtocol :: !(Maybe Text) + , _plPp :: !Bool + , _plAccessToken :: !(Maybe Text) + , _plUploadType :: !(Maybe Text) + , _plBearerToken :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plFilter :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plPageSize :: !(Maybe Int32) + , _plFields :: !(Maybe Text) + , _plCallback :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plXgafv' +-- +-- * 'plQuotaUser' +-- +-- * 'plPrettyPrint' +-- +-- * 'plUploadProtocol' +-- +-- * 'plPp' +-- +-- * 'plAccessToken' +-- +-- * 'plUploadType' +-- +-- * 'plBearerToken' +-- +-- * 'plKey' +-- +-- * 'plFilter' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plPageSize' +-- +-- * 'plFields' +-- +-- * 'plCallback' +-- +-- * 'plAlt' +projectsList + :: ProjectsList +projectsList = + ProjectsList + { _plXgafv = Nothing + , _plQuotaUser = Nothing + , _plPrettyPrint = True + , _plUploadProtocol = Nothing + , _plPp = True + , _plAccessToken = Nothing + , _plUploadType = Nothing + , _plBearerToken = Nothing + , _plKey = Nothing + , _plFilter = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plPageSize = Nothing + , _plFields = Nothing + , _plCallback = Nothing + , _plAlt = "json" + } + +-- | V1 error format. +plXgafv :: Lens' ProjectsList' (Maybe Text) +plXgafv = lens _plXgafv (\ s a -> s{_plXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +plQuotaUser :: Lens' ProjectsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' ProjectsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +plUploadProtocol :: Lens' ProjectsList' (Maybe Text) +plUploadProtocol + = lens _plUploadProtocol + (\ s a -> s{_plUploadProtocol = a}) + +-- | Pretty-print response. +plPp :: Lens' ProjectsList' Bool +plPp = lens _plPp (\ s a -> s{_plPp = a}) + +-- | OAuth access token. +plAccessToken :: Lens' ProjectsList' (Maybe Text) +plAccessToken + = lens _plAccessToken + (\ s a -> s{_plAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +plUploadType :: Lens' ProjectsList' (Maybe Text) +plUploadType + = lens _plUploadType (\ s a -> s{_plUploadType = a}) + +-- | OAuth bearer token. +plBearerToken :: Lens' ProjectsList' (Maybe Text) +plBearerToken + = lens _plBearerToken + (\ s a -> s{_plBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' ProjectsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | An expression for filtering the results of the request. Filter rules are +-- case insensitive. The fields eligible for filtering are: + \`name\` + +-- \`id\` + labels.key where *key* is the name of a label Some examples of +-- using labels as filters: |Filter|Description| |------|-----------| +-- |name:*|The project has a name.| |name:Howl|The project\'s name is +-- \`Howl\` or \`howl\`.| |name:HOWL|Equivalent to above.| +-- |NAME:howl|Equivalent to above.| |labels.color:*|The project has the +-- label \`color\`.| |labels.color:red|The project\'s label \`color\` has +-- the value \`red\`.| |labels.color:red label.size:big|The project\'s +-- label \`color\` has the value \`red\` and its label \`size\` has the +-- value \`big\`. Optional. +plFilter :: Lens' ProjectsList' (Maybe Text) +plFilter = lens _plFilter (\ s a -> s{_plFilter = a}) + +-- | A pagination token returned from a previous call to ListProject that +-- indicates from where listing should continue. Note: pagination is not +-- yet supported; the server ignores this field. Optional. +plPageToken :: Lens' ProjectsList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' ProjectsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | The maximum number of Projects to return in the response. The server can +-- return fewer projects than requested. If unspecified, server picks an +-- appropriate default. Note: pagination is not yet supported; the server +-- ignores this field. Optional. +plPageSize :: Lens' ProjectsList' (Maybe Int32) +plPageSize + = lens _plPageSize (\ s a -> s{_plPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' ProjectsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | JSONP +plCallback :: Lens' ProjectsList' (Maybe Text) +plCallback + = lens _plCallback (\ s a -> s{_plCallback = a}) + +-- | Data format for response. +plAlt :: Lens' ProjectsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest ProjectsList' where + type Rs ProjectsList' = ListProjectsResponse + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsList{..} + = go _plXgafv _plQuotaUser _plPrettyPrint + _plUploadProtocol + _plPp + _plAccessToken + _plUploadType + _plBearerToken + _plKey + _plFilter + _plPageToken + _plOauthToken + _plPageSize + _plFields + _plCallback + _plAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsListAPI) r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/SetIAMPolicy.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/SetIAMPolicy.hs new file mode 100644 index 000000000..3749a28f4 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/SetIAMPolicy.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.SetIAMPolicy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the IAM access control policy for the specified project. We do not +-- currently support \'domain:\' prefixed members in a Binding of a Policy. +-- Calling this method requires enabling the App Engine Admin API. +-- +-- /See:/ for @CloudresourcemanagerProjectsSetIAMPolicy@. +module Cloudresourcemanager.Projects.SetIAMPolicy + ( + -- * REST Resource + ProjectsSetIAMPolicyAPI + + -- * Creating a Request + , projectsSetIAMPolicy + , ProjectsSetIAMPolicy + + -- * Request Lenses + , psipXgafv + , psipQuotaUser + , psipPrettyPrint + , psipUploadProtocol + , psipPp + , psipAccessToken + , psipUploadType + , psipBearerToken + , psipKey + , psipResource + , psipOauthToken + , psipFields + , psipCallback + , psipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsSetIAMPolicy@ which the +-- 'ProjectsSetIAMPolicy' request conforms to. +type ProjectsSetIAMPolicyAPI = + "v1beta1" :> + "projects" :> + "{resource}:setIamPolicy" :> Post '[JSON] Policy + +-- | Sets the IAM access control policy for the specified project. We do not +-- currently support \'domain:\' prefixed members in a Binding of a Policy. +-- Calling this method requires enabling the App Engine Admin API. +-- +-- /See:/ 'projectsSetIAMPolicy' smart constructor. +data ProjectsSetIAMPolicy = ProjectsSetIAMPolicy + { _psipXgafv :: !(Maybe Text) + , _psipQuotaUser :: !(Maybe Text) + , _psipPrettyPrint :: !Bool + , _psipUploadProtocol :: !(Maybe Text) + , _psipPp :: !Bool + , _psipAccessToken :: !(Maybe Text) + , _psipUploadType :: !(Maybe Text) + , _psipBearerToken :: !(Maybe Text) + , _psipKey :: !(Maybe Text) + , _psipResource :: !Text + , _psipOauthToken :: !(Maybe Text) + , _psipFields :: !(Maybe Text) + , _psipCallback :: !(Maybe Text) + , _psipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsSetIAMPolicy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psipXgafv' +-- +-- * 'psipQuotaUser' +-- +-- * 'psipPrettyPrint' +-- +-- * 'psipUploadProtocol' +-- +-- * 'psipPp' +-- +-- * 'psipAccessToken' +-- +-- * 'psipUploadType' +-- +-- * 'psipBearerToken' +-- +-- * 'psipKey' +-- +-- * 'psipResource' +-- +-- * 'psipOauthToken' +-- +-- * 'psipFields' +-- +-- * 'psipCallback' +-- +-- * 'psipAlt' +projectsSetIAMPolicy + :: Text -- ^ 'resource' + -> ProjectsSetIAMPolicy +projectsSetIAMPolicy pPsipResource_ = + ProjectsSetIAMPolicy + { _psipXgafv = Nothing + , _psipQuotaUser = Nothing + , _psipPrettyPrint = True + , _psipUploadProtocol = Nothing + , _psipPp = True + , _psipAccessToken = Nothing + , _psipUploadType = Nothing + , _psipBearerToken = Nothing + , _psipKey = Nothing + , _psipResource = pPsipResource_ + , _psipOauthToken = Nothing + , _psipFields = Nothing + , _psipCallback = Nothing + , _psipAlt = "json" + } + +-- | V1 error format. +psipXgafv :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipXgafv + = lens _psipXgafv (\ s a -> s{_psipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +psipQuotaUser :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipQuotaUser + = lens _psipQuotaUser + (\ s a -> s{_psipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +psipPrettyPrint :: Lens' ProjectsSetIAMPolicy' Bool +psipPrettyPrint + = lens _psipPrettyPrint + (\ s a -> s{_psipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psipUploadProtocol :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipUploadProtocol + = lens _psipUploadProtocol + (\ s a -> s{_psipUploadProtocol = a}) + +-- | Pretty-print response. +psipPp :: Lens' ProjectsSetIAMPolicy' Bool +psipPp = lens _psipPp (\ s a -> s{_psipPp = a}) + +-- | OAuth access token. +psipAccessToken :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipAccessToken + = lens _psipAccessToken + (\ s a -> s{_psipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psipUploadType :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipUploadType + = lens _psipUploadType + (\ s a -> s{_psipUploadType = a}) + +-- | OAuth bearer token. +psipBearerToken :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipBearerToken + = lens _psipBearerToken + (\ s a -> s{_psipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +psipKey :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipKey = lens _psipKey (\ s a -> s{_psipKey = a}) + +-- | REQUIRED: The resource for which policy is being specified. \`resource\` +-- is usually specified as a path, such as, +-- \`projects\/{project}\/zones\/{zone}\/disks\/{disk}\`. +psipResource :: Lens' ProjectsSetIAMPolicy' Text +psipResource + = lens _psipResource (\ s a -> s{_psipResource = a}) + +-- | OAuth 2.0 token for the current user. +psipOauthToken :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipOauthToken + = lens _psipOauthToken + (\ s a -> s{_psipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +psipFields :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipFields + = lens _psipFields (\ s a -> s{_psipFields = a}) + +-- | JSONP +psipCallback :: Lens' ProjectsSetIAMPolicy' (Maybe Text) +psipCallback + = lens _psipCallback (\ s a -> s{_psipCallback = a}) + +-- | Data format for response. +psipAlt :: Lens' ProjectsSetIAMPolicy' Text +psipAlt = lens _psipAlt (\ s a -> s{_psipAlt = a}) + +instance GoogleRequest ProjectsSetIAMPolicy' where + type Rs ProjectsSetIAMPolicy' = Policy + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsSetIAMPolicy{..} + = go _psipXgafv _psipQuotaUser _psipPrettyPrint + _psipUploadProtocol + _psipPp + _psipAccessToken + _psipUploadType + _psipBearerToken + _psipKey + _psipResource + _psipOauthToken + _psipFields + _psipCallback + _psipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsSetIAMPolicyAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/TestIAMPermissions.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/TestIAMPermissions.hs new file mode 100644 index 000000000..39f6c15b7 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/TestIAMPermissions.hs @@ -0,0 +1,235 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.TestIAMPermissions +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Tests the specified permissions against the IAM access control policy +-- for the specified project. +-- +-- /See:/ for @CloudresourcemanagerProjectsTestIAMPermissions@. +module Cloudresourcemanager.Projects.TestIAMPermissions + ( + -- * REST Resource + ProjectsTestIAMPermissionsAPI + + -- * Creating a Request + , projectsTestIAMPermissions + , ProjectsTestIAMPermissions + + -- * Request Lenses + , ptipXgafv + , ptipQuotaUser + , ptipPrettyPrint + , ptipUploadProtocol + , ptipPp + , ptipAccessToken + , ptipUploadType + , ptipBearerToken + , ptipKey + , ptipResource + , ptipOauthToken + , ptipFields + , ptipCallback + , ptipAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsTestIAMPermissions@ which the +-- 'ProjectsTestIAMPermissions' request conforms to. +type ProjectsTestIAMPermissionsAPI = + "v1beta1" :> + "projects" :> + "{resource}:testIamPermissions" :> + Post '[JSON] TestIAMPermissionsResponse + +-- | Tests the specified permissions against the IAM access control policy +-- for the specified project. +-- +-- /See:/ 'projectsTestIAMPermissions' smart constructor. +data ProjectsTestIAMPermissions = ProjectsTestIAMPermissions + { _ptipXgafv :: !(Maybe Text) + , _ptipQuotaUser :: !(Maybe Text) + , _ptipPrettyPrint :: !Bool + , _ptipUploadProtocol :: !(Maybe Text) + , _ptipPp :: !Bool + , _ptipAccessToken :: !(Maybe Text) + , _ptipUploadType :: !(Maybe Text) + , _ptipBearerToken :: !(Maybe Text) + , _ptipKey :: !(Maybe Text) + , _ptipResource :: !Text + , _ptipOauthToken :: !(Maybe Text) + , _ptipFields :: !(Maybe Text) + , _ptipCallback :: !(Maybe Text) + , _ptipAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsTestIAMPermissions'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ptipXgafv' +-- +-- * 'ptipQuotaUser' +-- +-- * 'ptipPrettyPrint' +-- +-- * 'ptipUploadProtocol' +-- +-- * 'ptipPp' +-- +-- * 'ptipAccessToken' +-- +-- * 'ptipUploadType' +-- +-- * 'ptipBearerToken' +-- +-- * 'ptipKey' +-- +-- * 'ptipResource' +-- +-- * 'ptipOauthToken' +-- +-- * 'ptipFields' +-- +-- * 'ptipCallback' +-- +-- * 'ptipAlt' +projectsTestIAMPermissions + :: Text -- ^ 'resource' + -> ProjectsTestIAMPermissions +projectsTestIAMPermissions pPtipResource_ = + ProjectsTestIAMPermissions + { _ptipXgafv = Nothing + , _ptipQuotaUser = Nothing + , _ptipPrettyPrint = True + , _ptipUploadProtocol = Nothing + , _ptipPp = True + , _ptipAccessToken = Nothing + , _ptipUploadType = Nothing + , _ptipBearerToken = Nothing + , _ptipKey = Nothing + , _ptipResource = pPtipResource_ + , _ptipOauthToken = Nothing + , _ptipFields = Nothing + , _ptipCallback = Nothing + , _ptipAlt = "json" + } + +-- | V1 error format. +ptipXgafv :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipXgafv + = lens _ptipXgafv (\ s a -> s{_ptipXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ptipQuotaUser :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipQuotaUser + = lens _ptipQuotaUser + (\ s a -> s{_ptipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ptipPrettyPrint :: Lens' ProjectsTestIAMPermissions' Bool +ptipPrettyPrint + = lens _ptipPrettyPrint + (\ s a -> s{_ptipPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ptipUploadProtocol :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipUploadProtocol + = lens _ptipUploadProtocol + (\ s a -> s{_ptipUploadProtocol = a}) + +-- | Pretty-print response. +ptipPp :: Lens' ProjectsTestIAMPermissions' Bool +ptipPp = lens _ptipPp (\ s a -> s{_ptipPp = a}) + +-- | OAuth access token. +ptipAccessToken :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipAccessToken + = lens _ptipAccessToken + (\ s a -> s{_ptipAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ptipUploadType :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipUploadType + = lens _ptipUploadType + (\ s a -> s{_ptipUploadType = a}) + +-- | OAuth bearer token. +ptipBearerToken :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipBearerToken + = lens _ptipBearerToken + (\ s a -> s{_ptipBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ptipKey :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipKey = lens _ptipKey (\ s a -> s{_ptipKey = a}) + +-- | REQUIRED: The resource for which policy detail is being requested. +-- \`resource\` is usually specified as a path, such as, +-- \`projects\/{project}\`. +ptipResource :: Lens' ProjectsTestIAMPermissions' Text +ptipResource + = lens _ptipResource (\ s a -> s{_ptipResource = a}) + +-- | OAuth 2.0 token for the current user. +ptipOauthToken :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipOauthToken + = lens _ptipOauthToken + (\ s a -> s{_ptipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ptipFields :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipFields + = lens _ptipFields (\ s a -> s{_ptipFields = a}) + +-- | JSONP +ptipCallback :: Lens' ProjectsTestIAMPermissions' (Maybe Text) +ptipCallback + = lens _ptipCallback (\ s a -> s{_ptipCallback = a}) + +-- | Data format for response. +ptipAlt :: Lens' ProjectsTestIAMPermissions' Text +ptipAlt = lens _ptipAlt (\ s a -> s{_ptipAlt = a}) + +instance GoogleRequest ProjectsTestIAMPermissions' + where + type Rs ProjectsTestIAMPermissions' = + TestIAMPermissionsResponse + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsTestIAMPermissions{..} + = go _ptipXgafv _ptipQuotaUser _ptipPrettyPrint + _ptipUploadProtocol + _ptipPp + _ptipAccessToken + _ptipUploadType + _ptipBearerToken + _ptipKey + _ptipResource + _ptipOauthToken + _ptipFields + _ptipCallback + _ptipAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsTestIAMPermissionsAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Undelete.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Undelete.hs new file mode 100644 index 000000000..8147f9703 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Undelete.hs @@ -0,0 +1,239 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.Undelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Restores the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`). You can only use this method for a project +-- that has a lifecycle state of [DELETE_REQUESTED] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_REQUESTED]. +-- After deletion starts, as indicated by a lifecycle state of +-- [DELETE_IN_PROGRESS] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_IN_PROGRESS], +-- the project cannot be restored. The caller must have modify permissions +-- for this project. +-- +-- /See:/ for @CloudresourcemanagerProjectsUndelete@. +module Cloudresourcemanager.Projects.Undelete + ( + -- * REST Resource + ProjectsUndeleteAPI + + -- * Creating a Request + , projectsUndelete + , ProjectsUndelete + + -- * Request Lenses + , puXgafv + , puQuotaUser + , puPrettyPrint + , puUploadProtocol + , puPp + , puAccessToken + , puUploadType + , puBearerToken + , puKey + , puProjectId + , puOauthToken + , puFields + , puCallback + , puAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsUndelete@ which the +-- 'ProjectsUndelete' request conforms to. +type ProjectsUndeleteAPI = + "v1beta1" :> + "projects" :> + "{projectId}:undelete" :> Post '[JSON] Empty + +-- | Restores the project identified by the specified \`project_id\` (for +-- example, \`my-project-123\`). You can only use this method for a project +-- that has a lifecycle state of [DELETE_REQUESTED] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_REQUESTED]. +-- After deletion starts, as indicated by a lifecycle state of +-- [DELETE_IN_PROGRESS] +-- [google.cloudresourcemanager.projects.v1beta1.LifecycleState.DELETE_IN_PROGRESS], +-- the project cannot be restored. The caller must have modify permissions +-- for this project. +-- +-- /See:/ 'projectsUndelete' smart constructor. +data ProjectsUndelete = ProjectsUndelete + { _puXgafv :: !(Maybe Text) + , _puQuotaUser :: !(Maybe Text) + , _puPrettyPrint :: !Bool + , _puUploadProtocol :: !(Maybe Text) + , _puPp :: !Bool + , _puAccessToken :: !(Maybe Text) + , _puUploadType :: !(Maybe Text) + , _puBearerToken :: !(Maybe Text) + , _puKey :: !(Maybe Text) + , _puProjectId :: !Text + , _puOauthToken :: !(Maybe Text) + , _puFields :: !(Maybe Text) + , _puCallback :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsUndelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puXgafv' +-- +-- * 'puQuotaUser' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUploadProtocol' +-- +-- * 'puPp' +-- +-- * 'puAccessToken' +-- +-- * 'puUploadType' +-- +-- * 'puBearerToken' +-- +-- * 'puKey' +-- +-- * 'puProjectId' +-- +-- * 'puOauthToken' +-- +-- * 'puFields' +-- +-- * 'puCallback' +-- +-- * 'puAlt' +projectsUndelete + :: Text -- ^ 'projectId' + -> ProjectsUndelete +projectsUndelete pPuProjectId_ = + ProjectsUndelete + { _puXgafv = Nothing + , _puQuotaUser = Nothing + , _puPrettyPrint = True + , _puUploadProtocol = Nothing + , _puPp = True + , _puAccessToken = Nothing + , _puUploadType = Nothing + , _puBearerToken = Nothing + , _puKey = Nothing + , _puProjectId = pPuProjectId_ + , _puOauthToken = Nothing + , _puFields = Nothing + , _puCallback = Nothing + , _puAlt = "json" + } + +-- | V1 error format. +puXgafv :: Lens' ProjectsUndelete' (Maybe Text) +puXgafv = lens _puXgafv (\ s a -> s{_puXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +puQuotaUser :: Lens' ProjectsUndelete' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' ProjectsUndelete' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +puUploadProtocol :: Lens' ProjectsUndelete' (Maybe Text) +puUploadProtocol + = lens _puUploadProtocol + (\ s a -> s{_puUploadProtocol = a}) + +-- | Pretty-print response. +puPp :: Lens' ProjectsUndelete' Bool +puPp = lens _puPp (\ s a -> s{_puPp = a}) + +-- | OAuth access token. +puAccessToken :: Lens' ProjectsUndelete' (Maybe Text) +puAccessToken + = lens _puAccessToken + (\ s a -> s{_puAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +puUploadType :: Lens' ProjectsUndelete' (Maybe Text) +puUploadType + = lens _puUploadType (\ s a -> s{_puUploadType = a}) + +-- | OAuth bearer token. +puBearerToken :: Lens' ProjectsUndelete' (Maybe Text) +puBearerToken + = lens _puBearerToken + (\ s a -> s{_puBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' ProjectsUndelete' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | The project ID (for example, \`foo-bar-123\`). Required. +puProjectId :: Lens' ProjectsUndelete' Text +puProjectId + = lens _puProjectId (\ s a -> s{_puProjectId = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' ProjectsUndelete' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' ProjectsUndelete' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | JSONP +puCallback :: Lens' ProjectsUndelete' (Maybe Text) +puCallback + = lens _puCallback (\ s a -> s{_puCallback = a}) + +-- | Data format for response. +puAlt :: Lens' ProjectsUndelete' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest ProjectsUndelete' where + type Rs ProjectsUndelete' = Empty + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsUndelete{..} + = go _puXgafv _puQuotaUser _puPrettyPrint + _puUploadProtocol + _puPp + _puAccessToken + _puUploadType + _puBearerToken + _puKey + _puProjectId + _puOauthToken + _puFields + _puCallback + _puAlt + where go + = clientWithRoute + (Proxy :: Proxy ProjectsUndeleteAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Update.hs b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Update.hs new file mode 100644 index 000000000..dc45fb4dc --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/Resource/Cloudresourcemanager/Projects/Update.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Cloudresourcemanager.Projects.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the attributes of the project identified by the specified +-- \`project_id\` (for example, \`my-project-123\`). The caller must have +-- modify permissions for this project. +-- +-- /See:/ for @CloudresourcemanagerProjectsUpdate@. +module Cloudresourcemanager.Projects.Update + ( + -- * REST Resource + ProjectsUpdateAPI + + -- * Creating a Request + , projectsUpdate + , ProjectsUpdate + + -- * Request Lenses + , proXgafv + , proQuotaUser + , proPrettyPrint + , proUploadProtocol + , proPp + , proAccessToken + , proUploadType + , proBearerToken + , proKey + , proProjectId + , proOauthToken + , proFields + , proCallback + , proAlt + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types + +-- | A resource alias for @CloudresourcemanagerProjectsUpdate@ which the +-- 'ProjectsUpdate' request conforms to. +type ProjectsUpdateAPI = + "v1beta1" :> + "projects" :> + Capture "projectId" Text :> Put '[JSON] Project + +-- | Updates the attributes of the project identified by the specified +-- \`project_id\` (for example, \`my-project-123\`). The caller must have +-- modify permissions for this project. +-- +-- /See:/ 'projectsUpdate' smart constructor. +data ProjectsUpdate = ProjectsUpdate + { _proXgafv :: !(Maybe Text) + , _proQuotaUser :: !(Maybe Text) + , _proPrettyPrint :: !Bool + , _proUploadProtocol :: !(Maybe Text) + , _proPp :: !Bool + , _proAccessToken :: !(Maybe Text) + , _proUploadType :: !(Maybe Text) + , _proBearerToken :: !(Maybe Text) + , _proKey :: !(Maybe Text) + , _proProjectId :: !Text + , _proOauthToken :: !(Maybe Text) + , _proFields :: !(Maybe Text) + , _proCallback :: !(Maybe Text) + , _proAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ProjectsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'proXgafv' +-- +-- * 'proQuotaUser' +-- +-- * 'proPrettyPrint' +-- +-- * 'proUploadProtocol' +-- +-- * 'proPp' +-- +-- * 'proAccessToken' +-- +-- * 'proUploadType' +-- +-- * 'proBearerToken' +-- +-- * 'proKey' +-- +-- * 'proProjectId' +-- +-- * 'proOauthToken' +-- +-- * 'proFields' +-- +-- * 'proCallback' +-- +-- * 'proAlt' +projectsUpdate + :: Text -- ^ 'projectId' + -> ProjectsUpdate +projectsUpdate pProProjectId_ = + ProjectsUpdate + { _proXgafv = Nothing + , _proQuotaUser = Nothing + , _proPrettyPrint = True + , _proUploadProtocol = Nothing + , _proPp = True + , _proAccessToken = Nothing + , _proUploadType = Nothing + , _proBearerToken = Nothing + , _proKey = Nothing + , _proProjectId = pProProjectId_ + , _proOauthToken = Nothing + , _proFields = Nothing + , _proCallback = Nothing + , _proAlt = "json" + } + +-- | V1 error format. +proXgafv :: Lens' ProjectsUpdate' (Maybe Text) +proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +proQuotaUser :: Lens' ProjectsUpdate' (Maybe Text) +proQuotaUser + = lens _proQuotaUser (\ s a -> s{_proQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +proPrettyPrint :: Lens' ProjectsUpdate' Bool +proPrettyPrint + = lens _proPrettyPrint + (\ s a -> s{_proPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +proUploadProtocol :: Lens' ProjectsUpdate' (Maybe Text) +proUploadProtocol + = lens _proUploadProtocol + (\ s a -> s{_proUploadProtocol = a}) + +-- | Pretty-print response. +proPp :: Lens' ProjectsUpdate' Bool +proPp = lens _proPp (\ s a -> s{_proPp = a}) + +-- | OAuth access token. +proAccessToken :: Lens' ProjectsUpdate' (Maybe Text) +proAccessToken + = lens _proAccessToken + (\ s a -> s{_proAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +proUploadType :: Lens' ProjectsUpdate' (Maybe Text) +proUploadType + = lens _proUploadType + (\ s a -> s{_proUploadType = a}) + +-- | OAuth bearer token. +proBearerToken :: Lens' ProjectsUpdate' (Maybe Text) +proBearerToken + = lens _proBearerToken + (\ s a -> s{_proBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +proKey :: Lens' ProjectsUpdate' (Maybe Text) +proKey = lens _proKey (\ s a -> s{_proKey = a}) + +-- | The project ID (for example, \`my-project-123\`). Required. +proProjectId :: Lens' ProjectsUpdate' Text +proProjectId + = lens _proProjectId (\ s a -> s{_proProjectId = a}) + +-- | OAuth 2.0 token for the current user. +proOauthToken :: Lens' ProjectsUpdate' (Maybe Text) +proOauthToken + = lens _proOauthToken + (\ s a -> s{_proOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +proFields :: Lens' ProjectsUpdate' (Maybe Text) +proFields + = lens _proFields (\ s a -> s{_proFields = a}) + +-- | JSONP +proCallback :: Lens' ProjectsUpdate' (Maybe Text) +proCallback + = lens _proCallback (\ s a -> s{_proCallback = a}) + +-- | Data format for response. +proAlt :: Lens' ProjectsUpdate' Text +proAlt = lens _proAlt (\ s a -> s{_proAlt = a}) + +instance GoogleRequest ProjectsUpdate' where + type Rs ProjectsUpdate' = Project + request = requestWithRoute defReq resourceManagerURL + requestWithRoute r u ProjectsUpdate{..} + = go _proXgafv _proQuotaUser _proPrettyPrint + _proUploadProtocol + _proPp + _proAccessToken + _proUploadType + _proBearerToken + _proKey + _proProjectId + _proOauthToken + _proFields + _proCallback + _proAlt + where go + = clientWithRoute (Proxy :: Proxy ProjectsUpdateAPI) + r + u diff --git a/gogol-resourcemanager/gen/Network/Google/ResourceManager.hs b/gogol-resourcemanager/gen/Network/Google/ResourceManager.hs new file mode 100644 index 000000000..4417bc8ae --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/ResourceManager.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.ResourceManager +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Google Cloud Resource Manager API provides methods for creating, +-- reading, and updating of project metadata. +-- +-- /See:/ +module Network.Google.ResourceManager + ( + -- * API + ResourceManagerAPI + , resourceManagerAPI + , resourceManagerURL + + -- * Service Methods + + -- * REST Resources + + -- ** CloudresourcemanagerOrganizationsGet + , module Cloudresourcemanager.Organizations.Get + + -- ** CloudresourcemanagerOrganizationsGetIAMPolicy + , module Cloudresourcemanager.Organizations.GetIAMPolicy + + -- ** CloudresourcemanagerOrganizationsList + , module Cloudresourcemanager.Organizations.List + + -- ** CloudresourcemanagerOrganizationsSetIAMPolicy + , module Cloudresourcemanager.Organizations.SetIAMPolicy + + -- ** CloudresourcemanagerOrganizationsTestIAMPermissions + , module Cloudresourcemanager.Organizations.TestIAMPermissions + + -- ** CloudresourcemanagerOrganizationsUpdate + , module Cloudresourcemanager.Organizations.Update + + -- ** CloudresourcemanagerProjectsCreate + , module Cloudresourcemanager.Projects.Create + + -- ** CloudresourcemanagerProjectsDelete + , module Cloudresourcemanager.Projects.Delete + + -- ** CloudresourcemanagerProjectsGet + , module Cloudresourcemanager.Projects.Get + + -- ** CloudresourcemanagerProjectsGetIAMPolicy + , module Cloudresourcemanager.Projects.GetIAMPolicy + + -- ** CloudresourcemanagerProjectsList + , module Cloudresourcemanager.Projects.List + + -- ** CloudresourcemanagerProjectsSetIAMPolicy + , module Cloudresourcemanager.Projects.SetIAMPolicy + + -- ** CloudresourcemanagerProjectsTestIAMPermissions + , module Cloudresourcemanager.Projects.TestIAMPermissions + + -- ** CloudresourcemanagerProjectsUndelete + , module Cloudresourcemanager.Projects.Undelete + + -- ** CloudresourcemanagerProjectsUpdate + , module Cloudresourcemanager.Projects.Update + + -- * Types + + -- ** ListProjectsResponse + , ListProjectsResponse + , listProjectsResponse + , lprNextPageToken + , lprProjects + + -- ** ResourceId + , ResourceId + , resourceId + , riId + , riType + + -- ** GetIAMPolicyRequest + , GetIAMPolicyRequest + , getIAMPolicyRequest + + -- ** OrganizationOwner + , OrganizationOwner + , organizationOwner + , ooDirectoryCustomerId + + -- ** Project + , Project + , project + , pParent + , pProjectNumber + , pName + , pLabels + , pProjectId + , pLifecycleState + , pCreateTime + + -- ** Empty + , Empty + , empty + + -- ** SetIAMPolicyRequest + , SetIAMPolicyRequest + , setIAMPolicyRequest + , siprPolicy + + -- ** TestIAMPermissionsRequest + , TestIAMPermissionsRequest + , testIAMPermissionsRequest + , tiprPermissions + + -- ** TestIAMPermissionsResponse + , TestIAMPermissionsResponse + , testIAMPermissionsResponse + , tiamprPermissions + + -- ** Policy + , Policy + , policy + , pEtag + , pVersion + , pBindings + + -- ** Organization + , Organization + , organization + , oOwner + , oDisplayName + , oOrganizationId + + -- ** Binding + , Binding + , binding + , bMembers + , bRole + + -- ** ListOrganizationsResponse + , ListOrganizationsResponse + , listOrganizationsResponse + , lorNextPageToken + , lorOrganizations + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Cloudresourcemanager.Organizations.Get +import Network.Google.Resource.Cloudresourcemanager.Organizations.GetIAMPolicy +import Network.Google.Resource.Cloudresourcemanager.Organizations.List +import Network.Google.Resource.Cloudresourcemanager.Organizations.SetIAMPolicy +import Network.Google.Resource.Cloudresourcemanager.Organizations.TestIAMPermissions +import Network.Google.Resource.Cloudresourcemanager.Organizations.Update +import Network.Google.Resource.Cloudresourcemanager.Projects.Create +import Network.Google.Resource.Cloudresourcemanager.Projects.Delete +import Network.Google.Resource.Cloudresourcemanager.Projects.Get +import Network.Google.Resource.Cloudresourcemanager.Projects.GetIAMPolicy +import Network.Google.Resource.Cloudresourcemanager.Projects.List +import Network.Google.Resource.Cloudresourcemanager.Projects.SetIAMPolicy +import Network.Google.Resource.Cloudresourcemanager.Projects.TestIAMPermissions +import Network.Google.Resource.Cloudresourcemanager.Projects.Undelete +import Network.Google.Resource.Cloudresourcemanager.Projects.Update +import Network.Google.ResourceManager.Types + +{- $resources +TODO +-} + +type ResourceManagerAPI = Organizations :<|> Projects + +resourceManagerAPI :: Proxy ResourceManagerAPI +resourceManagerAPI = Proxy diff --git a/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs new file mode 100644 index 000000000..cc934c538 --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs @@ -0,0 +1,107 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ResourceManager.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ResourceManager.Types + ( + -- * Service URL + resourceManagerURL + + -- * ListProjectsResponse + , ListProjectsResponse + , listProjectsResponse + , lprNextPageToken + , lprProjects + + -- * ResourceId + , ResourceId + , resourceId + , riId + , riType + + -- * GetIAMPolicyRequest + , GetIAMPolicyRequest + , getIAMPolicyRequest + + -- * OrganizationOwner + , OrganizationOwner + , organizationOwner + , ooDirectoryCustomerId + + -- * Project + , Project + , project + , pParent + , pProjectNumber + , pName + , pLabels + , pProjectId + , pLifecycleState + , pCreateTime + + -- * Empty + , Empty + , empty + + -- * SetIAMPolicyRequest + , SetIAMPolicyRequest + , setIAMPolicyRequest + , siprPolicy + + -- * TestIAMPermissionsRequest + , TestIAMPermissionsRequest + , testIAMPermissionsRequest + , tiprPermissions + + -- * TestIAMPermissionsResponse + , TestIAMPermissionsResponse + , testIAMPermissionsResponse + , tiamprPermissions + + -- * Policy + , Policy + , policy + , pEtag + , pVersion + , pBindings + + -- * Organization + , Organization + , organization + , oOwner + , oDisplayName + , oOrganizationId + + -- * Binding + , Binding + , binding + , bMembers + , bRole + + -- * ListOrganizationsResponse + , ListOrganizationsResponse + , listOrganizationsResponse + , lorNextPageToken + , lorOrganizations + ) where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types.Product +import Network.Google.ResourceManager.Types.Sum + +-- | URL referring to version 'v1beta1' of the Google Cloud Resource Manager API. +resourceManagerURL :: BaseURL +resourceManagerURL + = BaseUrl Https + "https://cloudresourcemanager.googleapis.com/" + 443 diff --git a/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs new file mode 100644 index 000000000..6b0b6fb7d --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs @@ -0,0 +1,705 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ResourceManager.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ResourceManager.Types.Product where + +import Network.Google.Prelude +import Network.Google.ResourceManager.Types.Sum + +-- | A page of the response received from the +-- [ListProjects][google.cloudresourcemanager.projects.v1beta1.DeveloperProjects.ListProjects] +-- method. A paginated response where more pages are available has +-- \`next_page_token\` set. This token can be used in a subsequent request +-- to retrieve the next request page. +-- +-- /See:/ 'listProjectsResponse' smart constructor. +data ListProjectsResponse = ListProjectsResponse + { _lprNextPageToken :: !(Maybe Text) + , _lprProjects :: !(Maybe [Maybe Project]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListProjectsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lprNextPageToken' +-- +-- * 'lprProjects' +listProjectsResponse + :: ListProjectsResponse +listProjectsResponse = + ListProjectsResponse + { _lprNextPageToken = Nothing + , _lprProjects = Nothing + } + +-- | Pagination token. If the result set is too large to fit in a single +-- response, this token is returned. It encodes the position of the current +-- result cursor. Feeding this value into a new list request with the +-- \`page_token\` parameter gives the next page of the results. When +-- \`next_page_token\` is not filled in, there is no next page and the list +-- returned is the last page in the result set. Pagination tokens have a +-- limited lifetime. Note: pagination is not yet supported; the server will +-- not set this field. +lprNextPageToken :: Lens' ListProjectsResponse (Maybe Text) +lprNextPageToken + = lens _lprNextPageToken + (\ s a -> s{_lprNextPageToken = a}) + +-- | The list of projects that matched the list filter. This list can be +-- paginated. +lprProjects :: Lens' ListProjectsResponse [Maybe Project] +lprProjects + = lens _lprProjects (\ s a -> s{_lprProjects = a}) . + _Default + . _Coerce + +instance FromJSON ListProjectsResponse where + parseJSON + = withObject "ListProjectsResponse" + (\ o -> + ListProjectsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "projects" .!= mempty)) + +instance ToJSON ListProjectsResponse where + toJSON ListProjectsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lprNextPageToken, + ("projects" .=) <$> _lprProjects]) + +-- | A container to reference an id for any resource type. A \'resource\' in +-- Google Cloud Platform is a generic term for something you (a developer) +-- may want to interact with through one of our API\'s. Some examples are +-- an AppEngine app, a Compute Engine instance, Cloud SQL database, ... +-- +-- /See:/ 'resourceId' smart constructor. +data ResourceId = ResourceId + { _riId :: !(Maybe Text) + , _riType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riId' +-- +-- * 'riType' +resourceId + :: ResourceId +resourceId = + ResourceId + { _riId = Nothing + , _riType = Nothing + } + +-- | Required field for the type-specific id. This should correspond to the +-- id used in the type-specific API\'s. +riId :: Lens' ResourceId (Maybe Text) +riId = lens _riId (\ s a -> s{_riId = a}) + +-- | Required field representing the resource type this id is for. At +-- present, the only valid type is \"organization\". +riType :: Lens' ResourceId (Maybe Text) +riType = lens _riType (\ s a -> s{_riType = a}) + +instance FromJSON ResourceId where + parseJSON + = withObject "ResourceId" + (\ o -> + ResourceId <$> (o .:? "id") <*> (o .:? "type")) + +instance ToJSON ResourceId where + toJSON ResourceId{..} + = object + (catMaybes + [("id" .=) <$> _riId, ("type" .=) <$> _riType]) + +-- | Request message for \`GetIamPolicy\` method. +-- +-- /See:/ 'getIAMPolicyRequest' smart constructor. +data GetIAMPolicyRequest = + GetIAMPolicyRequest + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetIAMPolicyRequest' with the minimum fields required to make a request. +-- +getIAMPolicyRequest + :: GetIAMPolicyRequest +getIAMPolicyRequest = GetIAMPolicyRequest + +instance FromJSON GetIAMPolicyRequest where + parseJSON + = withObject "GetIAMPolicyRequest" + (\ o -> pure GetIAMPolicyRequest) + +instance ToJSON GetIAMPolicyRequest where + toJSON = const (Object mempty) + +-- | The entity that owns an Organization. The lifetime of the Organization +-- and all of its descendants are bound to the OrganizationOwner. If the +-- OrganizationOwner is deleted, the Organization and all its descendants +-- will be deleted. +-- +-- /See:/ 'organizationOwner' smart constructor. +newtype OrganizationOwner = OrganizationOwner + { _ooDirectoryCustomerId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrganizationOwner' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ooDirectoryCustomerId' +organizationOwner + :: OrganizationOwner +organizationOwner = + OrganizationOwner + { _ooDirectoryCustomerId = Nothing + } + +-- | The Google for Work customer id used in the Directory API. +ooDirectoryCustomerId :: Lens' OrganizationOwner (Maybe Text) +ooDirectoryCustomerId + = lens _ooDirectoryCustomerId + (\ s a -> s{_ooDirectoryCustomerId = a}) + +instance FromJSON OrganizationOwner where + parseJSON + = withObject "OrganizationOwner" + (\ o -> + OrganizationOwner <$> (o .:? "directoryCustomerId")) + +instance ToJSON OrganizationOwner where + toJSON OrganizationOwner{..} + = object + (catMaybes + [("directoryCustomerId" .=) <$> + _ooDirectoryCustomerId]) + +-- | A Project is a high-level Google Cloud Platform entity. It is a +-- container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud +-- Platform resources. +-- +-- /See:/ 'project' smart constructor. +data Project = Project + { _pParent :: !(Maybe (Maybe ResourceId)) + , _pProjectNumber :: !(Maybe Int64) + , _pName :: !(Maybe Text) + , _pLabels :: !(Maybe ProjectLabels) + , _pProjectId :: !(Maybe Text) + , _pLifecycleState :: !(Maybe Text) + , _pCreateTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Project' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pParent' +-- +-- * 'pProjectNumber' +-- +-- * 'pName' +-- +-- * 'pLabels' +-- +-- * 'pProjectId' +-- +-- * 'pLifecycleState' +-- +-- * 'pCreateTime' +project + :: Project +project = + Project + { _pParent = Nothing + , _pProjectNumber = Nothing + , _pName = Nothing + , _pLabels = Nothing + , _pProjectId = Nothing + , _pLifecycleState = Nothing + , _pCreateTime = Nothing + } + +-- | An optional reference to a parent Resource. The only supported parent +-- type is \"organization\". Once set, the parent cannot be modified. +-- Read-write. +pParent :: Lens' Project (Maybe (Maybe ResourceId)) +pParent = lens _pParent (\ s a -> s{_pParent = a}) + +-- | The number uniquely identifying the project. Example: 415104041262 +-- Read-only. +pProjectNumber :: Lens' Project (Maybe Int64) +pProjectNumber + = lens _pProjectNumber + (\ s a -> s{_pProjectNumber = a}) + +-- | The user-assigned name of the project. It must be 4 to 30 characters. +-- Allowed characters are: lowercase and uppercase letters, numbers, +-- hyphen, single-quote, double-quote, space, and exclamation point. +-- Example: My Project Read-write. +pName :: Lens' Project (Maybe Text) +pName = lens _pName (\ s a -> s{_pName = a}) + +-- | The labels associated with this project. Label keys must be between 1 +-- and 63 characters long and must conform to the following regular +-- expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?. Label values must be +-- between 0 and 63 characters long and must conform to the regular +-- expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256 +-- labels can be associated with a given resource. Clients should store +-- labels in a representation such as JSON that does not depend on specific +-- characters being disallowed. Example: \"environment\" : \"dev\" +-- Read-write. +pLabels :: Lens' Project (Maybe ProjectLabels) +pLabels = lens _pLabels (\ s a -> s{_pLabels = a}) + +-- | The unique, user-assigned ID of the project. It must be 6 to 30 +-- lowercase letters, digits, or hyphens. It must start with a letter. +-- Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after +-- creation. +pProjectId :: Lens' Project (Maybe Text) +pProjectId + = lens _pProjectId (\ s a -> s{_pProjectId = a}) + +-- | The project lifecycle state. Read-only. +pLifecycleState :: Lens' Project (Maybe Text) +pLifecycleState + = lens _pLifecycleState + (\ s a -> s{_pLifecycleState = a}) + +-- | Creation time. Read-only. +pCreateTime :: Lens' Project (Maybe Text) +pCreateTime + = lens _pCreateTime (\ s a -> s{_pCreateTime = a}) + +instance FromJSON Project where + parseJSON + = withObject "Project" + (\ o -> + Project <$> + (o .:? "parent") <*> (o .:? "projectNumber") <*> + (o .:? "name") + <*> (o .:? "labels") + <*> (o .:? "projectId") + <*> (o .:? "lifecycleState") + <*> (o .:? "createTime")) + +instance ToJSON Project where + toJSON Project{..} + = object + (catMaybes + [("parent" .=) <$> _pParent, + ("projectNumber" .=) <$> _pProjectNumber, + ("name" .=) <$> _pName, ("labels" .=) <$> _pLabels, + ("projectId" .=) <$> _pProjectId, + ("lifecycleState" .=) <$> _pLifecycleState, + ("createTime" .=) <$> _pCreateTime]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Request message for \`SetIamPolicy\` method. +-- +-- /See:/ 'setIAMPolicyRequest' smart constructor. +newtype SetIAMPolicyRequest = SetIAMPolicyRequest + { _siprPolicy :: Maybe (Maybe Policy) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SetIAMPolicyRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siprPolicy' +setIAMPolicyRequest + :: SetIAMPolicyRequest +setIAMPolicyRequest = + SetIAMPolicyRequest + { _siprPolicy = Nothing + } + +-- | REQUIRED: The complete policy to be applied to the \`resource\`. The +-- size of the policy is limited to a few 10s of KB. An empty policy is a +-- valid policy but certain Cloud Platform services (such as Projects) +-- might reject them. +siprPolicy :: Lens' SetIAMPolicyRequest (Maybe (Maybe Policy)) +siprPolicy + = lens _siprPolicy (\ s a -> s{_siprPolicy = a}) + +instance FromJSON SetIAMPolicyRequest where + parseJSON + = withObject "SetIAMPolicyRequest" + (\ o -> SetIAMPolicyRequest <$> (o .:? "policy")) + +instance ToJSON SetIAMPolicyRequest where + toJSON SetIAMPolicyRequest{..} + = object (catMaybes [("policy" .=) <$> _siprPolicy]) + +-- | Request message for \`TestIamPermissions\` method. +-- +-- /See:/ 'testIAMPermissionsRequest' smart constructor. +newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest + { _tiprPermissions :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestIAMPermissionsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiprPermissions' +testIAMPermissionsRequest + :: TestIAMPermissionsRequest +testIAMPermissionsRequest = + TestIAMPermissionsRequest + { _tiprPermissions = Nothing + } + +-- | The set of permissions to check for the \`resource\`. Permissions with +-- wildcards (such as \'*\' or \'storage.*\') are not allowed. +tiprPermissions :: Lens' TestIAMPermissionsRequest [Text] +tiprPermissions + = lens _tiprPermissions + (\ s a -> s{_tiprPermissions = a}) + . _Default + . _Coerce + +instance FromJSON TestIAMPermissionsRequest where + parseJSON + = withObject "TestIAMPermissionsRequest" + (\ o -> + TestIAMPermissionsRequest <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON TestIAMPermissionsRequest where + toJSON TestIAMPermissionsRequest{..} + = object + (catMaybes [("permissions" .=) <$> _tiprPermissions]) + +-- | Response message for \`TestIamPermissions\` method. +-- +-- /See:/ 'testIAMPermissionsResponse' smart constructor. +newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse + { _tiamprPermissions :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestIAMPermissionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tiamprPermissions' +testIAMPermissionsResponse + :: TestIAMPermissionsResponse +testIAMPermissionsResponse = + TestIAMPermissionsResponse + { _tiamprPermissions = Nothing + } + +-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is +-- allowed. +tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text] +tiamprPermissions + = lens _tiamprPermissions + (\ s a -> s{_tiamprPermissions = a}) + . _Default + . _Coerce + +instance FromJSON TestIAMPermissionsResponse where + parseJSON + = withObject "TestIAMPermissionsResponse" + (\ o -> + TestIAMPermissionsResponse <$> + (o .:? "permissions" .!= mempty)) + +instance ToJSON TestIAMPermissionsResponse where + toJSON TestIAMPermissionsResponse{..} + = object + (catMaybes + [("permissions" .=) <$> _tiamprPermissions]) + +-- | Defines an Identity and Access Management (IAM) policy. It is used to +-- specify access control policies for Cloud Platform resources. A +-- \`Policy\` consists of a list of \`bindings\`. A \`Binding\` binds a +-- list of \`members\` to a \`role\`, where the members can be user +-- accounts, Google groups, Google domains, and service accounts. A +-- \`role\` is a named list of permissions defined by IAM. **Example** +-- \`\`\` { \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [ +-- \"user:mike\'example.com\", \"group:admins\'example.com\", +-- \"domain:google.com\", +-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\"] }, { +-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] } +-- ] } \`\`\` For a description of IAM and its features, see the [IAM +-- developer\'s guide][https:\/\/cloud.google.com\/iam]. +-- +-- /See:/ 'policy' smart constructor. +data Policy = Policy + { _pEtag :: !(Maybe Word8) + , _pVersion :: !(Maybe Int32) + , _pBindings :: !(Maybe [Maybe Binding]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Policy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pEtag' +-- +-- * 'pVersion' +-- +-- * 'pBindings' +policy + :: Policy +policy = + Policy + { _pEtag = Nothing + , _pVersion = Nothing + , _pBindings = Nothing + } + +-- | Can be used to perform a read-modify-write. +pEtag :: Lens' Policy (Maybe Word8) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | Version of the \`Policy\`. The default version is 0. +pVersion :: Lens' Policy (Maybe Int32) +pVersion = lens _pVersion (\ s a -> s{_pVersion = a}) + +-- | Associates a list of \`members\` to a \`role\`. Multiple \`bindings\` +-- must not be specified for the same \`role\`. \`bindings\` with no +-- members will result in an error. +pBindings :: Lens' Policy [Maybe Binding] +pBindings + = lens _pBindings (\ s a -> s{_pBindings = a}) . + _Default + . _Coerce + +instance FromJSON Policy where + parseJSON + = withObject "Policy" + (\ o -> + Policy <$> + (o .:? "etag") <*> (o .:? "version") <*> + (o .:? "bindings" .!= mempty)) + +instance ToJSON Policy where + toJSON Policy{..} + = object + (catMaybes + [("etag" .=) <$> _pEtag, + ("version" .=) <$> _pVersion, + ("bindings" .=) <$> _pBindings]) + +-- | The root node in the resource hierarchy to which a particular entity\'s +-- (e.g., company) resources belong. +-- +-- /See:/ 'organization' smart constructor. +data Organization = Organization + { _oOwner :: !(Maybe (Maybe OrganizationOwner)) + , _oDisplayName :: !(Maybe Text) + , _oOrganizationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Organization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oOwner' +-- +-- * 'oDisplayName' +-- +-- * 'oOrganizationId' +organization + :: Organization +organization = + Organization + { _oOwner = Nothing + , _oDisplayName = Nothing + , _oOrganizationId = Nothing + } + +-- | The owner of this Organization. The owner should be specified upon +-- creation. Once set, it cannot be changed. This field is required. +oOwner :: Lens' Organization (Maybe (Maybe OrganizationOwner)) +oOwner = lens _oOwner (\ s a -> s{_oOwner = a}) + +-- | A friendly string to be used to refer to the Organization in the UI. +-- This field is required. +oDisplayName :: Lens' Organization (Maybe Text) +oDisplayName + = lens _oDisplayName (\ s a -> s{_oDisplayName = a}) + +-- | An immutable id for the Organization that is assigned on creation. This +-- should be omitted when creating a new Organization. This field is +-- read-only. +oOrganizationId :: Lens' Organization (Maybe Text) +oOrganizationId + = lens _oOrganizationId + (\ s a -> s{_oOrganizationId = a}) + +instance FromJSON Organization where + parseJSON + = withObject "Organization" + (\ o -> + Organization <$> + (o .:? "owner") <*> (o .:? "displayName") <*> + (o .:? "organizationId")) + +instance ToJSON Organization where + toJSON Organization{..} + = object + (catMaybes + [("owner" .=) <$> _oOwner, + ("displayName" .=) <$> _oDisplayName, + ("organizationId" .=) <$> _oOrganizationId]) + +-- | Associates \`members\` with a \`role\`. +-- +-- /See:/ 'binding' smart constructor. +data Binding = Binding + { _bMembers :: !(Maybe [Text]) + , _bRole :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Binding' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bMembers' +-- +-- * 'bRole' +binding + :: Binding +binding = + Binding + { _bMembers = Nothing + , _bRole = Nothing + } + +-- | Specifies the identities requesting access for a Cloud Platform +-- resource. \`members\` can have the following formats: * \`allUsers\`: A +-- special identifier that represents anyone who is on the internet; with +-- or without a Google account. * \`allAuthenticatedUsers\`: A special +-- identifier that represents anyone who is authenticated with a Google +-- account or a service account. * \`user:{emailid}\`: An email address +-- that represents a specific Google account. For example, +-- \`alice\'gmail.com\` or \`joe\'example.com\`. * +-- \`serviceAccount:{emailid}\`: An email address that represents a service +-- account. For example, \`my-other-app\'appspot.gserviceaccount.com\`. * +-- \`group:{emailid}\`: An email address that represents a Google group. +-- For example, \`admins\'example.com\`. * \`domain:{domain}\`: A Google +-- Apps domain name that represents all the users of that domain. For +-- example, \`google.com\` or \`example.com\`. +bMembers :: Lens' Binding [Text] +bMembers + = lens _bMembers (\ s a -> s{_bMembers = a}) . + _Default + . _Coerce + +-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`, +-- \`roles\/editor\`, or \`roles\/owner\`. Required +bRole :: Lens' Binding (Maybe Text) +bRole = lens _bRole (\ s a -> s{_bRole = a}) + +instance FromJSON Binding where + parseJSON + = withObject "Binding" + (\ o -> + Binding <$> + (o .:? "members" .!= mempty) <*> (o .:? "role")) + +instance ToJSON Binding where + toJSON Binding{..} + = object + (catMaybes + [("members" .=) <$> _bMembers, + ("role" .=) <$> _bRole]) + +-- | The response returned from the ListOrganizations method. +-- +-- /See:/ 'listOrganizationsResponse' smart constructor. +data ListOrganizationsResponse = ListOrganizationsResponse + { _lorNextPageToken :: !(Maybe Text) + , _lorOrganizations :: !(Maybe [Maybe Organization]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOrganizationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorNextPageToken' +-- +-- * 'lorOrganizations' +listOrganizationsResponse + :: ListOrganizationsResponse +listOrganizationsResponse = + ListOrganizationsResponse + { _lorNextPageToken = Nothing + , _lorOrganizations = Nothing + } + +-- | A pagination token to be used to retrieve the next page of results. If +-- the result is too large to fit within the page size specified in the +-- request, this field will be set with a token that can be used to fetch +-- the next page of results. If this field is empty, it indicates that this +-- response contains the last page of results. +lorNextPageToken :: Lens' ListOrganizationsResponse (Maybe Text) +lorNextPageToken + = lens _lorNextPageToken + (\ s a -> s{_lorNextPageToken = a}) + +-- | The list of Organizations that matched the list query, possibly +-- paginated. +lorOrganizations :: Lens' ListOrganizationsResponse [Maybe Organization] +lorOrganizations + = lens _lorOrganizations + (\ s a -> s{_lorOrganizations = a}) + . _Default + . _Coerce + +instance FromJSON ListOrganizationsResponse where + parseJSON + = withObject "ListOrganizationsResponse" + (\ o -> + ListOrganizationsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "organizations" .!= mempty)) + +instance ToJSON ListOrganizationsResponse where + toJSON ListOrganizationsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lorNextPageToken, + ("organizations" .=) <$> _lorOrganizations]) diff --git a/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs new file mode 100644 index 000000000..e6e91227b --- /dev/null +++ b/gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ResourceManager.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ResourceManager.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-resourcemanager/gogol-resourcemanager.cabal b/gogol-resourcemanager/gogol-resourcemanager.cabal new file mode 100644 index 000000000..9ad1b1f99 --- /dev/null +++ b/gogol-resourcemanager/gogol-resourcemanager.cabal @@ -0,0 +1,58 @@ +name: gogol-resourcemanager +version: 0.0.1 +synopsis: Google Cloud Resource Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Google Cloud Resource Manager API provides methods for creating, + reading, and updating of project metadata. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Cloudresourcemanager.Organizations.Get + , Network.Google.Resource.Cloudresourcemanager.Organizations.GetIAMPolicy + , Network.Google.Resource.Cloudresourcemanager.Organizations.List + , Network.Google.Resource.Cloudresourcemanager.Organizations.SetIAMPolicy + , Network.Google.Resource.Cloudresourcemanager.Organizations.TestIAMPermissions + , Network.Google.Resource.Cloudresourcemanager.Organizations.Update + , Network.Google.Resource.Cloudresourcemanager.Projects.Create + , Network.Google.Resource.Cloudresourcemanager.Projects.Delete + , Network.Google.Resource.Cloudresourcemanager.Projects.Get + , Network.Google.Resource.Cloudresourcemanager.Projects.GetIAMPolicy + , Network.Google.Resource.Cloudresourcemanager.Projects.List + , Network.Google.Resource.Cloudresourcemanager.Projects.SetIAMPolicy + , Network.Google.Resource.Cloudresourcemanager.Projects.TestIAMPermissions + , Network.Google.Resource.Cloudresourcemanager.Projects.Undelete + , Network.Google.Resource.Cloudresourcemanager.Projects.Update + , Network.Google.ResourceManager + , Network.Google.ResourceManager.Types + + other-modules: + Network.Google.ResourceManager.Types.Product + , Network.Google.ResourceManager.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-resourcemanager/src/.gitkeep b/gogol-resourcemanager/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-resourceviews/LICENSE b/gogol-resourceviews/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-resourceviews/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-resourceviews/Makefile b/gogol-resourceviews/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-resourceviews/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-resourceviews/README.md b/gogol-resourceviews/README.md new file mode 100644 index 000000000..6f993f1c0 --- /dev/null +++ b/gogol-resourceviews/README.md @@ -0,0 +1,28 @@ +# gogol-resourceviews + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Compute Engine Instance Groups API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-resourceviews` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-resourceviews/Setup.hs b/gogol-resourceviews/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-resourceviews/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-resourceviews/gen/Network/Google/InstanceGroups.hs b/gogol-resourceviews/gen/Network/Google/InstanceGroups.hs new file mode 100644 index 000000000..8e8484732 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/InstanceGroups.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.InstanceGroups +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | The Resource View API allows users to create and manage logical sets of +-- Google Compute Engine instances. +-- +-- /See:/ +module Network.Google.InstanceGroups + ( + -- * API + InstanceGroupsAPI + , instanceGroupsAPI + , instanceGroupsURL + + -- * Service Methods + + -- * REST Resources + + -- ** ResourceviewsZoneOperationsGet + , module Resourceviews.ZoneOperations.Get + + -- ** ResourceviewsZoneOperationsList + , module Resourceviews.ZoneOperations.List + + -- ** ResourceviewsZoneViewsAddResources + , module Resourceviews.ZoneViews.AddResources + + -- ** ResourceviewsZoneViewsDelete + , module Resourceviews.ZoneViews.Delete + + -- ** ResourceviewsZoneViewsGet + , module Resourceviews.ZoneViews.Get + + -- ** ResourceviewsZoneViewsGetService + , module Resourceviews.ZoneViews.GetService + + -- ** ResourceviewsZoneViewsInsert + , module Resourceviews.ZoneViews.Insert + + -- ** ResourceviewsZoneViewsList + , module Resourceviews.ZoneViews.List + + -- ** ResourceviewsZoneViewsListResources + , module Resourceviews.ZoneViews.ListResources + + -- ** ResourceviewsZoneViewsRemoveResources + , module Resourceviews.ZoneViews.RemoveResources + + -- ** ResourceviewsZoneViewsSetService + , module Resourceviews.ZoneViews.SetService + + -- * Types + + -- ** ResourceView + , ResourceView + , resourceView + , rvSize + , rvKind + , rvFingerprint + , rvNetwork + , rvResources + , rvSelfLink + , rvName + , rvCreationTimestamp + , rvId + , rvLabels + , rvEndpoints + , rvDescription + + -- ** OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- ** ZoneViewsList + , ZoneViewsList + , zoneViewsList + , zvlNextPageToken + , zvlKind + , zvlItems + , zvlSelfLink + + -- ** Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- ** ZoneViewsListResourcesResponse + , ZoneViewsListResourcesResponse + , zoneViewsListResourcesResponse + , zvlrrNextPageToken + , zvlrrItems + , zvlrrNetwork + + -- ** ServiceEndpoint + , ServiceEndpoint + , serviceEndpoint + , seName + , sePort + + -- ** ZoneViewsRemoveResourcesRequest + , ZoneViewsRemoveResourcesRequest + , zoneViewsRemoveResourcesRequest + , zvrrrResources + + -- ** ZoneViewsAddResourcesRequest + , ZoneViewsAddResourcesRequest + , zoneViewsAddResourcesRequest + , zvarrResources + + -- ** ZoneViewsGetServiceResponse + , ZoneViewsGetServiceResponse + , zoneViewsGetServiceResponse + , zvgsrFingerprint + , zvgsrEndpoints + + -- ** ListResourceResponseItem + , ListResourceResponseItem + , listResourceResponseItem + , lrriResource + , lrriEndpoints + + -- ** Label + , Label + , label + , lValue + , lKey + + -- ** ZoneViewsSetServiceRequest + , ZoneViewsSetServiceRequest + , zoneViewsSetServiceRequest + , zvssrResourceName + , zvssrFingerprint + , zvssrEndpoints + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude +import Network.Google.Resource.Resourceviews.ZoneOperations.Get +import Network.Google.Resource.Resourceviews.ZoneOperations.List +import Network.Google.Resource.Resourceviews.ZoneViews.AddResources +import Network.Google.Resource.Resourceviews.ZoneViews.Delete +import Network.Google.Resource.Resourceviews.ZoneViews.Get +import Network.Google.Resource.Resourceviews.ZoneViews.GetService +import Network.Google.Resource.Resourceviews.ZoneViews.Insert +import Network.Google.Resource.Resourceviews.ZoneViews.List +import Network.Google.Resource.Resourceviews.ZoneViews.ListResources +import Network.Google.Resource.Resourceviews.ZoneViews.RemoveResources +import Network.Google.Resource.Resourceviews.ZoneViews.SetService + +{- $resources +TODO +-} + +type InstanceGroupsAPI = + ZoneViews :<|> ZoneOperations + +instanceGroupsAPI :: Proxy InstanceGroupsAPI +instanceGroupsAPI = Proxy diff --git a/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types.hs b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types.hs new file mode 100644 index 000000000..32f1c75da --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroups.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroups.Types + ( + -- * Service URL + instanceGroupsURL + + -- * ResourceView + , ResourceView + , resourceView + , rvSize + , rvKind + , rvFingerprint + , rvNetwork + , rvResources + , rvSelfLink + , rvName + , rvCreationTimestamp + , rvId + , rvLabels + , rvEndpoints + , rvDescription + + -- * OperationList + , OperationList + , operationList + , olNextPageToken + , olKind + , olItems + , olSelfLink + , olId + + -- * ZoneViewsList + , ZoneViewsList + , zoneViewsList + , zvlNextPageToken + , zvlKind + , zvlItems + , zvlSelfLink + + -- * Operation + , Operation + , operation + , oTargetId + , oStatus + , oInsertTime + , oProgress + , oStartTime + , oKind + , oError + , oHttpErrorMessage + , oZone + , oWarnings + , oHttpErrorStatusCode + , oUser + , oSelfLink + , oName + , oStatusMessage + , oCreationTimestamp + , oEndTime + , oId + , oOperationType + , oRegion + , oTargetLink + , oClientOperationId + + -- * ZoneViewsListResourcesResponse + , ZoneViewsListResourcesResponse + , zoneViewsListResourcesResponse + , zvlrrNextPageToken + , zvlrrItems + , zvlrrNetwork + + -- * ServiceEndpoint + , ServiceEndpoint + , serviceEndpoint + , seName + , sePort + + -- * ZoneViewsRemoveResourcesRequest + , ZoneViewsRemoveResourcesRequest + , zoneViewsRemoveResourcesRequest + , zvrrrResources + + -- * ZoneViewsAddResourcesRequest + , ZoneViewsAddResourcesRequest + , zoneViewsAddResourcesRequest + , zvarrResources + + -- * ZoneViewsGetServiceResponse + , ZoneViewsGetServiceResponse + , zoneViewsGetServiceResponse + , zvgsrFingerprint + , zvgsrEndpoints + + -- * ListResourceResponseItem + , ListResourceResponseItem + , listResourceResponseItem + , lrriResource + , lrriEndpoints + + -- * Label + , Label + , label + , lValue + , lKey + + -- * ZoneViewsSetServiceRequest + , ZoneViewsSetServiceRequest + , zoneViewsSetServiceRequest + , zvssrResourceName + , zvssrFingerprint + , zvssrEndpoints + ) where + +import Network.Google.InstanceGroups.Types.Product +import Network.Google.InstanceGroups.Types.Sum +import Network.Google.Prelude + +-- | URL referring to version 'v1beta2' of the Google Compute Engine Instance Groups API. +instanceGroupsURL :: BaseURL +instanceGroupsURL + = BaseUrl Https + "https://www.googleapis.com/resourceviews/v1beta2/projects/" + 443 diff --git a/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Product.hs b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Product.hs new file mode 100644 index 000000000..071012fa8 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Product.hs @@ -0,0 +1,1008 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroups.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroups.Types.Product where + +import Network.Google.InstanceGroups.Types.Sum +import Network.Google.Prelude + +-- | The resource view object. +-- +-- /See:/ 'resourceView' smart constructor. +data ResourceView = ResourceView + { _rvSize :: !(Maybe Word32) + , _rvKind :: !Text + , _rvFingerprint :: !(Maybe Text) + , _rvNetwork :: !(Maybe Text) + , _rvResources :: !(Maybe [Text]) + , _rvSelfLink :: !(Maybe Text) + , _rvName :: !(Maybe Text) + , _rvCreationTimestamp :: !(Maybe Text) + , _rvId :: !(Maybe Text) + , _rvLabels :: !(Maybe [Maybe Label]) + , _rvEndpoints :: !(Maybe [Maybe ServiceEndpoint]) + , _rvDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceView' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rvSize' +-- +-- * 'rvKind' +-- +-- * 'rvFingerprint' +-- +-- * 'rvNetwork' +-- +-- * 'rvResources' +-- +-- * 'rvSelfLink' +-- +-- * 'rvName' +-- +-- * 'rvCreationTimestamp' +-- +-- * 'rvId' +-- +-- * 'rvLabels' +-- +-- * 'rvEndpoints' +-- +-- * 'rvDescription' +resourceView + :: ResourceView +resourceView = + ResourceView + { _rvSize = Nothing + , _rvKind = "resourceviews#resourceView" + , _rvFingerprint = Nothing + , _rvNetwork = Nothing + , _rvResources = Nothing + , _rvSelfLink = Nothing + , _rvName = Nothing + , _rvCreationTimestamp = Nothing + , _rvId = Nothing + , _rvLabels = Nothing + , _rvEndpoints = Nothing + , _rvDescription = Nothing + } + +-- | The total number of resources in the resource view. +rvSize :: Lens' ResourceView (Maybe Word32) +rvSize = lens _rvSize (\ s a -> s{_rvSize = a}) + +-- | Type of the resource. +rvKind :: Lens' ResourceView Text +rvKind = lens _rvKind (\ s a -> s{_rvKind = a}) + +-- | The fingerprint of the service endpoint information. +rvFingerprint :: Lens' ResourceView (Maybe Text) +rvFingerprint + = lens _rvFingerprint + (\ s a -> s{_rvFingerprint = a}) + +-- | The URL of a Compute Engine network to which the resources in the view +-- belong. +rvNetwork :: Lens' ResourceView (Maybe Text) +rvNetwork + = lens _rvNetwork (\ s a -> s{_rvNetwork = a}) + +-- | A list of all resources in the resource view. +rvResources :: Lens' ResourceView [Text] +rvResources + = lens _rvResources (\ s a -> s{_rvResources = a}) . + _Default + . _Coerce + +-- | [Output Only] A self-link to the resource view. +rvSelfLink :: Lens' ResourceView (Maybe Text) +rvSelfLink + = lens _rvSelfLink (\ s a -> s{_rvSelfLink = a}) + +-- | The name of the resource view. +rvName :: Lens' ResourceView (Maybe Text) +rvName = lens _rvName (\ s a -> s{_rvName = a}) + +-- | The creation time of the resource view. +rvCreationTimestamp :: Lens' ResourceView (Maybe Text) +rvCreationTimestamp + = lens _rvCreationTimestamp + (\ s a -> s{_rvCreationTimestamp = a}) + +-- | [Output Only] The ID of the resource view. +rvId :: Lens' ResourceView (Maybe Text) +rvId = lens _rvId (\ s a -> s{_rvId = a}) + +-- | The labels for events. +rvLabels :: Lens' ResourceView [Maybe Label] +rvLabels + = lens _rvLabels (\ s a -> s{_rvLabels = a}) . + _Default + . _Coerce + +-- | Services endpoint information. +rvEndpoints :: Lens' ResourceView [Maybe ServiceEndpoint] +rvEndpoints + = lens _rvEndpoints (\ s a -> s{_rvEndpoints = a}) . + _Default + . _Coerce + +-- | The detailed description of the resource view. +rvDescription :: Lens' ResourceView (Maybe Text) +rvDescription + = lens _rvDescription + (\ s a -> s{_rvDescription = a}) + +instance FromJSON ResourceView where + parseJSON + = withObject "ResourceView" + (\ o -> + ResourceView <$> + (o .:? "size") <*> + (o .:? "kind" .!= "resourceviews#resourceView") + <*> (o .:? "fingerprint") + <*> (o .:? "network") + <*> (o .:? "resources" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "creationTimestamp") + <*> (o .:? "id") + <*> (o .:? "labels" .!= mempty) + <*> (o .:? "endpoints" .!= mempty) + <*> (o .:? "description")) + +instance ToJSON ResourceView where + toJSON ResourceView{..} + = object + (catMaybes + [("size" .=) <$> _rvSize, Just ("kind" .= _rvKind), + ("fingerprint" .=) <$> _rvFingerprint, + ("network" .=) <$> _rvNetwork, + ("resources" .=) <$> _rvResources, + ("selfLink" .=) <$> _rvSelfLink, + ("name" .=) <$> _rvName, + ("creationTimestamp" .=) <$> _rvCreationTimestamp, + ("id" .=) <$> _rvId, ("labels" .=) <$> _rvLabels, + ("endpoints" .=) <$> _rvEndpoints, + ("description" .=) <$> _rvDescription]) + +-- +-- /See:/ 'operationList' smart constructor. +data OperationList = OperationList + { _olNextPageToken :: !(Maybe Text) + , _olKind :: !Text + , _olItems :: !(Maybe [Maybe Operation]) + , _olSelfLink :: !(Maybe Text) + , _olId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olNextPageToken' +-- +-- * 'olKind' +-- +-- * 'olItems' +-- +-- * 'olSelfLink' +-- +-- * 'olId' +operationList + :: OperationList +operationList = + OperationList + { _olNextPageToken = Nothing + , _olKind = "resourceviews#operationList" + , _olItems = Nothing + , _olSelfLink = Nothing + , _olId = Nothing + } + +-- | A token used to continue a truncated list request (output only). +olNextPageToken :: Lens' OperationList (Maybe Text) +olNextPageToken + = lens _olNextPageToken + (\ s a -> s{_olNextPageToken = a}) + +-- | Type of resource. +olKind :: Lens' OperationList Text +olKind = lens _olKind (\ s a -> s{_olKind = a}) + +-- | The operation resources. +olItems :: Lens' OperationList [Maybe Operation] +olItems + = lens _olItems (\ s a -> s{_olItems = a}) . _Default + . _Coerce + +-- | Server defined URL for this resource (output only). +olSelfLink :: Lens' OperationList (Maybe Text) +olSelfLink + = lens _olSelfLink (\ s a -> s{_olSelfLink = a}) + +-- | Unique identifier for the resource; defined by the server (output only). +olId :: Lens' OperationList (Maybe Text) +olId = lens _olId (\ s a -> s{_olId = a}) + +instance FromJSON OperationList where + parseJSON + = withObject "OperationList" + (\ o -> + OperationList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "resourceviews#operationList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "id")) + +instance ToJSON OperationList where + toJSON OperationList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olNextPageToken, + Just ("kind" .= _olKind), ("items" .=) <$> _olItems, + ("selfLink" .=) <$> _olSelfLink, + ("id" .=) <$> _olId]) + +-- | The response to a list request. +-- +-- /See:/ 'zoneViewsList' smart constructor. +data ZoneViewsList = ZoneViewsList + { _zvlNextPageToken :: !(Maybe Text) + , _zvlKind :: !Text + , _zvlItems :: !(Maybe [Maybe ResourceView]) + , _zvlSelfLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvlNextPageToken' +-- +-- * 'zvlKind' +-- +-- * 'zvlItems' +-- +-- * 'zvlSelfLink' +zoneViewsList + :: ZoneViewsList +zoneViewsList = + ZoneViewsList + { _zvlNextPageToken = Nothing + , _zvlKind = "resourceviews#zoneViewsList" + , _zvlItems = Nothing + , _zvlSelfLink = Nothing + } + +-- | A token used for pagination. +zvlNextPageToken :: Lens' ZoneViewsList (Maybe Text) +zvlNextPageToken + = lens _zvlNextPageToken + (\ s a -> s{_zvlNextPageToken = a}) + +-- | Type of resource. +zvlKind :: Lens' ZoneViewsList Text +zvlKind = lens _zvlKind (\ s a -> s{_zvlKind = a}) + +-- | The result that contains all resource views that meet the criteria. +zvlItems :: Lens' ZoneViewsList [Maybe ResourceView] +zvlItems + = lens _zvlItems (\ s a -> s{_zvlItems = a}) . + _Default + . _Coerce + +-- | Server defined URL for this resource (output only). +zvlSelfLink :: Lens' ZoneViewsList (Maybe Text) +zvlSelfLink + = lens _zvlSelfLink (\ s a -> s{_zvlSelfLink = a}) + +instance FromJSON ZoneViewsList where + parseJSON + = withObject "ZoneViewsList" + (\ o -> + ZoneViewsList <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "resourceviews#zoneViewsList") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "selfLink")) + +instance ToJSON ZoneViewsList where + toJSON ZoneViewsList{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _zvlNextPageToken, + Just ("kind" .= _zvlKind), + ("items" .=) <$> _zvlItems, + ("selfLink" .=) <$> _zvlSelfLink]) + +-- | An operation resource, used to manage asynchronous API requests. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Word64) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe Text) + , _oProgress :: !(Maybe Int32) + , _oStartTime :: !(Maybe Text) + , _oKind :: !Text + , _oError :: !(Maybe OperationError) + , _oHttpErrorMessage :: !(Maybe Text) + , _oZone :: !(Maybe Text) + , _oWarnings :: !(Maybe [OperationWarningsItem]) + , _oHttpErrorStatusCode :: !(Maybe Int32) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oStatusMessage :: !(Maybe Text) + , _oCreationTimestamp :: !(Maybe Text) + , _oEndTime :: !(Maybe Text) + , _oId :: !(Maybe Word64) + , _oOperationType :: !(Maybe Text) + , _oRegion :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + , _oClientOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oProgress' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oHttpErrorMessage' +-- +-- * 'oZone' +-- +-- * 'oWarnings' +-- +-- * 'oHttpErrorStatusCode' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oStatusMessage' +-- +-- * 'oCreationTimestamp' +-- +-- * 'oEndTime' +-- +-- * 'oId' +-- +-- * 'oOperationType' +-- +-- * 'oRegion' +-- +-- * 'oTargetLink' +-- +-- * 'oClientOperationId' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oProgress = Nothing + , _oStartTime = Nothing + , _oKind = "resourceviews#operation" + , _oError = Nothing + , _oHttpErrorMessage = Nothing + , _oZone = Nothing + , _oWarnings = Nothing + , _oHttpErrorStatusCode = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oStatusMessage = Nothing + , _oCreationTimestamp = Nothing + , _oEndTime = Nothing + , _oId = Nothing + , _oOperationType = Nothing + , _oRegion = Nothing + , _oTargetLink = Nothing + , _oClientOperationId = Nothing + } + +-- | [Output Only] Unique target ID which identifies a particular incarnation +-- of the target. +oTargetId :: Lens' Operation (Maybe Word64) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | [Output Only] Status of the operation. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | [Output Only] The time that this operation was requested, in RFC3339 +-- text format. +oInsertTime :: Lens' Operation (Maybe Text) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | [Output only] An optional progress indicator that ranges from 0 to 100. +-- There is no requirement that this be linear or support any granularity +-- of operations. This should not be used to guess at when the operation +-- will be complete. This number should be monotonically increasing as the +-- operation progresses. +oProgress :: Lens' Operation (Maybe Int32) +oProgress + = lens _oProgress (\ s a -> s{_oProgress = a}) + +-- | [Output Only] The time that this operation was started by the server, in +-- RFC3339 text format. +oStartTime :: Lens' Operation (Maybe Text) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | [Output only] Type of the resource. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | [Output Only] If errors occurred during processing of this operation, +-- this field will be populated. +oError :: Lens' Operation (Maybe OperationError) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | [Output only] If operation fails, the HTTP error message returned. +oHttpErrorMessage :: Lens' Operation (Maybe Text) +oHttpErrorMessage + = lens _oHttpErrorMessage + (\ s a -> s{_oHttpErrorMessage = a}) + +-- | [Output Only] URL of the zone where the operation resides. Only +-- available when performing per-zone operations. +oZone :: Lens' Operation (Maybe Text) +oZone = lens _oZone (\ s a -> s{_oZone = a}) + +-- | [Output Only] If there are issues with this operation, a warning is +-- returned. +oWarnings :: Lens' Operation [OperationWarningsItem] +oWarnings + = lens _oWarnings (\ s a -> s{_oWarnings = a}) . + _Default + . _Coerce + +-- | [Output only] If operation fails, the HTTP error status code returned. +oHttpErrorStatusCode :: Lens' Operation (Maybe Int32) +oHttpErrorStatusCode + = lens _oHttpErrorStatusCode + (\ s a -> s{_oHttpErrorStatusCode = a}) + +-- | [Output Only] User who requested the operation, for example: +-- user\'example.com. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | [Output Only] Server-defined fully-qualified URL for this resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | [Output Only] Name of the resource. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | [Output Only] An optional textual description of the current status of +-- the operation. +oStatusMessage :: Lens' Operation (Maybe Text) +oStatusMessage + = lens _oStatusMessage + (\ s a -> s{_oStatusMessage = a}) + +-- | [Output Only] The time that this operation was requested, in RFC3339 +-- text format. +oCreationTimestamp :: Lens' Operation (Maybe Text) +oCreationTimestamp + = lens _oCreationTimestamp + (\ s a -> s{_oCreationTimestamp = a}) + +-- | [Output Only] The time that this operation was completed, in RFC3339 +-- text format. +oEndTime :: Lens' Operation (Maybe Text) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | [Output Only] Unique identifier for the resource, generated by the +-- server. +oId :: Lens' Operation (Maybe Word64) +oId = lens _oId (\ s a -> s{_oId = a}) + +-- | [Output only] Type of the operation. Operations include insert, update, +-- and delete. +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | [Output Only] URL of the region where the operation resides. Only +-- available when performing regional operations. +oRegion :: Lens' Operation (Maybe Text) +oRegion = lens _oRegion (\ s a -> s{_oRegion = a}) + +-- | [Output only] URL of the resource the operation is mutating. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +-- | [Output only] An optional identifier specified by the client when the +-- mutation was initiated. Must be unique for all operation resources in +-- the project. +oClientOperationId :: Lens' Operation (Maybe Text) +oClientOperationId + = lens _oClientOperationId + (\ s a -> s{_oClientOperationId = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "status") <*> + (o .:? "insertTime") + <*> (o .:? "progress") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "resourceviews#operation") + <*> (o .:? "error") + <*> (o .:? "httpErrorMessage") + <*> (o .:? "zone") + <*> (o .:? "warnings" .!= mempty) + <*> (o .:? "httpErrorStatusCode") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "statusMessage") + <*> (o .:? "creationTimestamp") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "operationType") + <*> (o .:? "region") + <*> (o .:? "targetLink") + <*> (o .:? "clientOperationId")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("progress" .=) <$> _oProgress, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("httpErrorMessage" .=) <$> _oHttpErrorMessage, + ("zone" .=) <$> _oZone, + ("warnings" .=) <$> _oWarnings, + ("httpErrorStatusCode" .=) <$> _oHttpErrorStatusCode, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, + ("statusMessage" .=) <$> _oStatusMessage, + ("creationTimestamp" .=) <$> _oCreationTimestamp, + ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId, + ("operationType" .=) <$> _oOperationType, + ("region" .=) <$> _oRegion, + ("targetLink" .=) <$> _oTargetLink, + ("clientOperationId" .=) <$> _oClientOperationId]) + +-- | The response to a list resource request. +-- +-- /See:/ 'zoneViewsListResourcesResponse' smart constructor. +data ZoneViewsListResourcesResponse = ZoneViewsListResourcesResponse + { _zvlrrNextPageToken :: !(Maybe Text) + , _zvlrrItems :: !(Maybe [Maybe ListResourceResponseItem]) + , _zvlrrNetwork :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsListResourcesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvlrrNextPageToken' +-- +-- * 'zvlrrItems' +-- +-- * 'zvlrrNetwork' +zoneViewsListResourcesResponse + :: ZoneViewsListResourcesResponse +zoneViewsListResourcesResponse = + ZoneViewsListResourcesResponse + { _zvlrrNextPageToken = Nothing + , _zvlrrItems = Nothing + , _zvlrrNetwork = Nothing + } + +-- | A token used for pagination. +zvlrrNextPageToken :: Lens' ZoneViewsListResourcesResponse (Maybe Text) +zvlrrNextPageToken + = lens _zvlrrNextPageToken + (\ s a -> s{_zvlrrNextPageToken = a}) + +-- | The formatted JSON that is requested by the user. +zvlrrItems :: Lens' ZoneViewsListResourcesResponse [Maybe ListResourceResponseItem] +zvlrrItems + = lens _zvlrrItems (\ s a -> s{_zvlrrItems = a}) . + _Default + . _Coerce + +-- | The URL of a Compute Engine network to which the resources in the view +-- belong. +zvlrrNetwork :: Lens' ZoneViewsListResourcesResponse (Maybe Text) +zvlrrNetwork + = lens _zvlrrNetwork (\ s a -> s{_zvlrrNetwork = a}) + +instance FromJSON ZoneViewsListResourcesResponse + where + parseJSON + = withObject "ZoneViewsListResourcesResponse" + (\ o -> + ZoneViewsListResourcesResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "network")) + +instance ToJSON ZoneViewsListResourcesResponse where + toJSON ZoneViewsListResourcesResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _zvlrrNextPageToken, + ("items" .=) <$> _zvlrrItems, + ("network" .=) <$> _zvlrrNetwork]) + +-- | The service endpoint that may be started in a VM. +-- +-- /See:/ 'serviceEndpoint' smart constructor. +data ServiceEndpoint = ServiceEndpoint + { _seName :: !(Maybe Text) + , _sePort :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ServiceEndpoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'seName' +-- +-- * 'sePort' +serviceEndpoint + :: ServiceEndpoint +serviceEndpoint = + ServiceEndpoint + { _seName = Nothing + , _sePort = Nothing + } + +-- | The name of the service endpoint. +seName :: Lens' ServiceEndpoint (Maybe Text) +seName = lens _seName (\ s a -> s{_seName = a}) + +-- | The port of the service endpoint. +sePort :: Lens' ServiceEndpoint (Maybe Int32) +sePort = lens _sePort (\ s a -> s{_sePort = a}) + +instance FromJSON ServiceEndpoint where + parseJSON + = withObject "ServiceEndpoint" + (\ o -> + ServiceEndpoint <$> + (o .:? "name") <*> (o .:? "port")) + +instance ToJSON ServiceEndpoint where + toJSON ServiceEndpoint{..} + = object + (catMaybes + [("name" .=) <$> _seName, ("port" .=) <$> _sePort]) + +-- | The request to remove resources from the resource view. +-- +-- /See:/ 'zoneViewsRemoveResourcesRequest' smart constructor. +newtype ZoneViewsRemoveResourcesRequest = ZoneViewsRemoveResourcesRequest + { _zvrrrResources :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsRemoveResourcesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvrrrResources' +zoneViewsRemoveResourcesRequest + :: ZoneViewsRemoveResourcesRequest +zoneViewsRemoveResourcesRequest = + ZoneViewsRemoveResourcesRequest + { _zvrrrResources = Nothing + } + +-- | The list of resources to be removed. +zvrrrResources :: Lens' ZoneViewsRemoveResourcesRequest [Text] +zvrrrResources + = lens _zvrrrResources + (\ s a -> s{_zvrrrResources = a}) + . _Default + . _Coerce + +instance FromJSON ZoneViewsRemoveResourcesRequest + where + parseJSON + = withObject "ZoneViewsRemoveResourcesRequest" + (\ o -> + ZoneViewsRemoveResourcesRequest <$> + (o .:? "resources" .!= mempty)) + +instance ToJSON ZoneViewsRemoveResourcesRequest where + toJSON ZoneViewsRemoveResourcesRequest{..} + = object + (catMaybes [("resources" .=) <$> _zvrrrResources]) + +-- | The request to add resources to the resource view. +-- +-- /See:/ 'zoneViewsAddResourcesRequest' smart constructor. +newtype ZoneViewsAddResourcesRequest = ZoneViewsAddResourcesRequest + { _zvarrResources :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsAddResourcesRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvarrResources' +zoneViewsAddResourcesRequest + :: ZoneViewsAddResourcesRequest +zoneViewsAddResourcesRequest = + ZoneViewsAddResourcesRequest + { _zvarrResources = Nothing + } + +-- | The list of resources to be added. +zvarrResources :: Lens' ZoneViewsAddResourcesRequest [Text] +zvarrResources + = lens _zvarrResources + (\ s a -> s{_zvarrResources = a}) + . _Default + . _Coerce + +instance FromJSON ZoneViewsAddResourcesRequest where + parseJSON + = withObject "ZoneViewsAddResourcesRequest" + (\ o -> + ZoneViewsAddResourcesRequest <$> + (o .:? "resources" .!= mempty)) + +instance ToJSON ZoneViewsAddResourcesRequest where + toJSON ZoneViewsAddResourcesRequest{..} + = object + (catMaybes [("resources" .=) <$> _zvarrResources]) + +-- +-- /See:/ 'zoneViewsGetServiceResponse' smart constructor. +data ZoneViewsGetServiceResponse = ZoneViewsGetServiceResponse + { _zvgsrFingerprint :: !(Maybe Text) + , _zvgsrEndpoints :: !(Maybe [Maybe ServiceEndpoint]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsGetServiceResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvgsrFingerprint' +-- +-- * 'zvgsrEndpoints' +zoneViewsGetServiceResponse + :: ZoneViewsGetServiceResponse +zoneViewsGetServiceResponse = + ZoneViewsGetServiceResponse + { _zvgsrFingerprint = Nothing + , _zvgsrEndpoints = Nothing + } + +-- | The fingerprint of the service information. +zvgsrFingerprint :: Lens' ZoneViewsGetServiceResponse (Maybe Text) +zvgsrFingerprint + = lens _zvgsrFingerprint + (\ s a -> s{_zvgsrFingerprint = a}) + +-- | The service information. +zvgsrEndpoints :: Lens' ZoneViewsGetServiceResponse [Maybe ServiceEndpoint] +zvgsrEndpoints + = lens _zvgsrEndpoints + (\ s a -> s{_zvgsrEndpoints = a}) + . _Default + . _Coerce + +instance FromJSON ZoneViewsGetServiceResponse where + parseJSON + = withObject "ZoneViewsGetServiceResponse" + (\ o -> + ZoneViewsGetServiceResponse <$> + (o .:? "fingerprint") <*> + (o .:? "endpoints" .!= mempty)) + +instance ToJSON ZoneViewsGetServiceResponse where + toJSON ZoneViewsGetServiceResponse{..} + = object + (catMaybes + [("fingerprint" .=) <$> _zvgsrFingerprint, + ("endpoints" .=) <$> _zvgsrEndpoints]) + +-- | The list response item that contains the resource and end points +-- information. +-- +-- /See:/ 'listResourceResponseItem' smart constructor. +data ListResourceResponseItem = ListResourceResponseItem + { _lrriResource :: !(Maybe Text) + , _lrriEndpoints :: !(Maybe ListResourceResponseItemEndpoints) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListResourceResponseItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrriResource' +-- +-- * 'lrriEndpoints' +listResourceResponseItem + :: ListResourceResponseItem +listResourceResponseItem = + ListResourceResponseItem + { _lrriResource = Nothing + , _lrriEndpoints = Nothing + } + +-- | The full URL of the resource. +lrriResource :: Lens' ListResourceResponseItem (Maybe Text) +lrriResource + = lens _lrriResource (\ s a -> s{_lrriResource = a}) + +-- | The list of service end points on the resource. +lrriEndpoints :: Lens' ListResourceResponseItem (Maybe ListResourceResponseItemEndpoints) +lrriEndpoints + = lens _lrriEndpoints + (\ s a -> s{_lrriEndpoints = a}) + +instance FromJSON ListResourceResponseItem where + parseJSON + = withObject "ListResourceResponseItem" + (\ o -> + ListResourceResponseItem <$> + (o .:? "resource") <*> (o .:? "endpoints")) + +instance ToJSON ListResourceResponseItem where + toJSON ListResourceResponseItem{..} + = object + (catMaybes + [("resource" .=) <$> _lrriResource, + ("endpoints" .=) <$> _lrriEndpoints]) + +-- | The Label to be applied to the resource views. +-- +-- /See:/ 'label' smart constructor. +data Label = Label + { _lValue :: !(Maybe Text) + , _lKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Label' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lValue' +-- +-- * 'lKey' +label + :: Label +label = + Label + { _lValue = Nothing + , _lKey = Nothing + } + +-- | Value of the label. +lValue :: Lens' Label (Maybe Text) +lValue = lens _lValue (\ s a -> s{_lValue = a}) + +-- | Key of the label. +lKey :: Lens' Label (Maybe Text) +lKey = lens _lKey (\ s a -> s{_lKey = a}) + +instance FromJSON Label where + parseJSON + = withObject "Label" + (\ o -> Label <$> (o .:? "value") <*> (o .:? "key")) + +instance ToJSON Label where + toJSON Label{..} + = object + (catMaybes + [("value" .=) <$> _lValue, ("key" .=) <$> _lKey]) + +-- +-- /See:/ 'zoneViewsSetServiceRequest' smart constructor. +data ZoneViewsSetServiceRequest = ZoneViewsSetServiceRequest + { _zvssrResourceName :: !(Maybe Text) + , _zvssrFingerprint :: !(Maybe Text) + , _zvssrEndpoints :: !(Maybe [Maybe ServiceEndpoint]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsSetServiceRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvssrResourceName' +-- +-- * 'zvssrFingerprint' +-- +-- * 'zvssrEndpoints' +zoneViewsSetServiceRequest + :: ZoneViewsSetServiceRequest +zoneViewsSetServiceRequest = + ZoneViewsSetServiceRequest + { _zvssrResourceName = Nothing + , _zvssrFingerprint = Nothing + , _zvssrEndpoints = Nothing + } + +-- | The name of the resource if user wants to update the service information +-- of the resource. +zvssrResourceName :: Lens' ZoneViewsSetServiceRequest (Maybe Text) +zvssrResourceName + = lens _zvssrResourceName + (\ s a -> s{_zvssrResourceName = a}) + +-- | Fingerprint of the service information; a hash of the contents. This +-- field is used for optimistic locking when updating the service entries. +zvssrFingerprint :: Lens' ZoneViewsSetServiceRequest (Maybe Text) +zvssrFingerprint + = lens _zvssrFingerprint + (\ s a -> s{_zvssrFingerprint = a}) + +-- | The service information to be updated. +zvssrEndpoints :: Lens' ZoneViewsSetServiceRequest [Maybe ServiceEndpoint] +zvssrEndpoints + = lens _zvssrEndpoints + (\ s a -> s{_zvssrEndpoints = a}) + . _Default + . _Coerce + +instance FromJSON ZoneViewsSetServiceRequest where + parseJSON + = withObject "ZoneViewsSetServiceRequest" + (\ o -> + ZoneViewsSetServiceRequest <$> + (o .:? "resourceName") <*> (o .:? "fingerprint") <*> + (o .:? "endpoints" .!= mempty)) + +instance ToJSON ZoneViewsSetServiceRequest where + toJSON ZoneViewsSetServiceRequest{..} + = object + (catMaybes + [("resourceName" .=) <$> _zvssrResourceName, + ("fingerprint" .=) <$> _zvssrFingerprint, + ("endpoints" .=) <$> _zvssrEndpoints]) diff --git a/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Sum.hs b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Sum.hs new file mode 100644 index 000000000..39df6a20b --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/InstanceGroups/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.InstanceGroups.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.InstanceGroups.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/Get.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/Get.hs new file mode 100644 index 000000000..e6b1859e4 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ for @ResourceviewsZoneOperationsGet@. +module Resourceviews.ZoneOperations.Get + ( + -- * REST Resource + ZoneOperationsGetAPI + + -- * Creating a Request + , zoneOperationsGet + , ZoneOperationsGet + + -- * Request Lenses + , zogQuotaUser + , zogPrettyPrint + , zogProject + , zogOperation + , zogUserIp + , zogZone + , zogKey + , zogOauthToken + , zogFields + , zogAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneOperationsGet@ which the +-- 'ZoneOperationsGet' request conforms to. +type ZoneOperationsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves the specified zone-specific operation resource. +-- +-- /See:/ 'zoneOperationsGet' smart constructor. +data ZoneOperationsGet = ZoneOperationsGet + { _zogQuotaUser :: !(Maybe Text) + , _zogPrettyPrint :: !Bool + , _zogProject :: !Text + , _zogOperation :: !Text + , _zogUserIp :: !(Maybe Text) + , _zogZone :: !Text + , _zogKey :: !(Maybe Text) + , _zogOauthToken :: !(Maybe Text) + , _zogFields :: !(Maybe Text) + , _zogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zogQuotaUser' +-- +-- * 'zogPrettyPrint' +-- +-- * 'zogProject' +-- +-- * 'zogOperation' +-- +-- * 'zogUserIp' +-- +-- * 'zogZone' +-- +-- * 'zogKey' +-- +-- * 'zogOauthToken' +-- +-- * 'zogFields' +-- +-- * 'zogAlt' +zoneOperationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> Text -- ^ 'zone' + -> ZoneOperationsGet +zoneOperationsGet pZogProject_ pZogOperation_ pZogZone_ = + ZoneOperationsGet + { _zogQuotaUser = Nothing + , _zogPrettyPrint = True + , _zogProject = pZogProject_ + , _zogOperation = pZogOperation_ + , _zogUserIp = Nothing + , _zogZone = pZogZone_ + , _zogKey = Nothing + , _zogOauthToken = Nothing + , _zogFields = Nothing + , _zogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zogQuotaUser :: Lens' ZoneOperationsGet' (Maybe Text) +zogQuotaUser + = lens _zogQuotaUser (\ s a -> s{_zogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zogPrettyPrint :: Lens' ZoneOperationsGet' Bool +zogPrettyPrint + = lens _zogPrettyPrint + (\ s a -> s{_zogPrettyPrint = a}) + +-- | Name of the project scoping this request. +zogProject :: Lens' ZoneOperationsGet' Text +zogProject + = lens _zogProject (\ s a -> s{_zogProject = a}) + +-- | Name of the operation resource to return. +zogOperation :: Lens' ZoneOperationsGet' Text +zogOperation + = lens _zogOperation (\ s a -> s{_zogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zogUserIp :: Lens' ZoneOperationsGet' (Maybe Text) +zogUserIp + = lens _zogUserIp (\ s a -> s{_zogUserIp = a}) + +-- | Name of the zone scoping this request. +zogZone :: Lens' ZoneOperationsGet' Text +zogZone = lens _zogZone (\ s a -> s{_zogZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zogKey :: Lens' ZoneOperationsGet' (Maybe Text) +zogKey = lens _zogKey (\ s a -> s{_zogKey = a}) + +-- | OAuth 2.0 token for the current user. +zogOauthToken :: Lens' ZoneOperationsGet' (Maybe Text) +zogOauthToken + = lens _zogOauthToken + (\ s a -> s{_zogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zogFields :: Lens' ZoneOperationsGet' (Maybe Text) +zogFields + = lens _zogFields (\ s a -> s{_zogFields = a}) + +-- | Data format for the response. +zogAlt :: Lens' ZoneOperationsGet' Text +zogAlt = lens _zogAlt (\ s a -> s{_zogAlt = a}) + +instance GoogleRequest ZoneOperationsGet' where + type Rs ZoneOperationsGet' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneOperationsGet{..} + = go _zogQuotaUser _zogPrettyPrint _zogProject + _zogOperation + _zogUserIp + _zogZone + _zogKey + _zogOauthToken + _zogFields + _zogAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsGetAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/List.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/List.hs new file mode 100644 index 000000000..fd6218cf7 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneOperations/List.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ for @ResourceviewsZoneOperationsList@. +module Resourceviews.ZoneOperations.List + ( + -- * REST Resource + ZoneOperationsListAPI + + -- * Creating a Request + , zoneOperationsList + , ZoneOperationsList + + -- * Request Lenses + , zolQuotaUser + , zolPrettyPrint + , zolProject + , zolUserIp + , zolZone + , zolKey + , zolFilter + , zolPageToken + , zolOauthToken + , zolMaxResults + , zolFields + , zolAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneOperationsList@ which the +-- 'ZoneOperationsList' request conforms to. +type ZoneOperationsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "operations" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OperationList + +-- | Retrieves the list of operation resources contained within the specified +-- zone. +-- +-- /See:/ 'zoneOperationsList' smart constructor. +data ZoneOperationsList = ZoneOperationsList + { _zolQuotaUser :: !(Maybe Text) + , _zolPrettyPrint :: !Bool + , _zolProject :: !Text + , _zolUserIp :: !(Maybe Text) + , _zolZone :: !Text + , _zolKey :: !(Maybe Text) + , _zolFilter :: !(Maybe Text) + , _zolPageToken :: !(Maybe Text) + , _zolOauthToken :: !(Maybe Text) + , _zolMaxResults :: !Word32 + , _zolFields :: !(Maybe Text) + , _zolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zolQuotaUser' +-- +-- * 'zolPrettyPrint' +-- +-- * 'zolProject' +-- +-- * 'zolUserIp' +-- +-- * 'zolZone' +-- +-- * 'zolKey' +-- +-- * 'zolFilter' +-- +-- * 'zolPageToken' +-- +-- * 'zolOauthToken' +-- +-- * 'zolMaxResults' +-- +-- * 'zolFields' +-- +-- * 'zolAlt' +zoneOperationsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneOperationsList +zoneOperationsList pZolProject_ pZolZone_ = + ZoneOperationsList + { _zolQuotaUser = Nothing + , _zolPrettyPrint = True + , _zolProject = pZolProject_ + , _zolUserIp = Nothing + , _zolZone = pZolZone_ + , _zolKey = Nothing + , _zolFilter = Nothing + , _zolPageToken = Nothing + , _zolOauthToken = Nothing + , _zolMaxResults = 500 + , _zolFields = Nothing + , _zolAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zolQuotaUser :: Lens' ZoneOperationsList' (Maybe Text) +zolQuotaUser + = lens _zolQuotaUser (\ s a -> s{_zolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zolPrettyPrint :: Lens' ZoneOperationsList' Bool +zolPrettyPrint + = lens _zolPrettyPrint + (\ s a -> s{_zolPrettyPrint = a}) + +-- | Name of the project scoping this request. +zolProject :: Lens' ZoneOperationsList' Text +zolProject + = lens _zolProject (\ s a -> s{_zolProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zolUserIp :: Lens' ZoneOperationsList' (Maybe Text) +zolUserIp + = lens _zolUserIp (\ s a -> s{_zolUserIp = a}) + +-- | Name of the zone scoping this request. +zolZone :: Lens' ZoneOperationsList' Text +zolZone = lens _zolZone (\ s a -> s{_zolZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zolKey :: Lens' ZoneOperationsList' (Maybe Text) +zolKey = lens _zolKey (\ s a -> s{_zolKey = a}) + +-- | Optional. Filter expression for filtering listed resources. +zolFilter :: Lens' ZoneOperationsList' (Maybe Text) +zolFilter + = lens _zolFilter (\ s a -> s{_zolFilter = a}) + +-- | Optional. Tag returned by a previous list request truncated by +-- maxResults. Used to continue a previous list request. +zolPageToken :: Lens' ZoneOperationsList' (Maybe Text) +zolPageToken + = lens _zolPageToken (\ s a -> s{_zolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zolOauthToken :: Lens' ZoneOperationsList' (Maybe Text) +zolOauthToken + = lens _zolOauthToken + (\ s a -> s{_zolOauthToken = a}) + +-- | Optional. Maximum count of results to be returned. Maximum value is 500 +-- and default value is 500. +zolMaxResults :: Lens' ZoneOperationsList' Word32 +zolMaxResults + = lens _zolMaxResults + (\ s a -> s{_zolMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zolFields :: Lens' ZoneOperationsList' (Maybe Text) +zolFields + = lens _zolFields (\ s a -> s{_zolFields = a}) + +-- | Data format for the response. +zolAlt :: Lens' ZoneOperationsList' Text +zolAlt = lens _zolAlt (\ s a -> s{_zolAlt = a}) + +instance GoogleRequest ZoneOperationsList' where + type Rs ZoneOperationsList' = OperationList + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneOperationsList{..} + = go _zolQuotaUser _zolPrettyPrint _zolProject + _zolUserIp + _zolZone + _zolKey + _zolFilter + _zolPageToken + _zolOauthToken + (Just _zolMaxResults) + _zolFields + _zolAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneOperationsListAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/AddResources.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/AddResources.hs new file mode 100644 index 000000000..630e74a69 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/AddResources.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.AddResources +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add resources to the view. +-- +-- /See:/ for @ResourceviewsZoneViewsAddResources@. +module Resourceviews.ZoneViews.AddResources + ( + -- * REST Resource + ZoneViewsAddResourcesAPI + + -- * Creating a Request + , zoneViewsAddResources + , ZoneViewsAddResources + + -- * Request Lenses + , zvarQuotaUser + , zvarPrettyPrint + , zvarResourceView + , zvarProject + , zvarUserIp + , zvarZone + , zvarKey + , zvarOauthToken + , zvarFields + , zvarAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsAddResources@ which the +-- 'ZoneViewsAddResources' request conforms to. +type ZoneViewsAddResourcesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + "addResources" :> Post '[JSON] Operation + +-- | Add resources to the view. +-- +-- /See:/ 'zoneViewsAddResources' smart constructor. +data ZoneViewsAddResources = ZoneViewsAddResources + { _zvarQuotaUser :: !(Maybe Text) + , _zvarPrettyPrint :: !Bool + , _zvarResourceView :: !Text + , _zvarProject :: !Text + , _zvarUserIp :: !(Maybe Text) + , _zvarZone :: !Text + , _zvarKey :: !(Maybe Text) + , _zvarOauthToken :: !(Maybe Text) + , _zvarFields :: !(Maybe Text) + , _zvarAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsAddResources'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvarQuotaUser' +-- +-- * 'zvarPrettyPrint' +-- +-- * 'zvarResourceView' +-- +-- * 'zvarProject' +-- +-- * 'zvarUserIp' +-- +-- * 'zvarZone' +-- +-- * 'zvarKey' +-- +-- * 'zvarOauthToken' +-- +-- * 'zvarFields' +-- +-- * 'zvarAlt' +zoneViewsAddResources + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsAddResources +zoneViewsAddResources pZvarResourceView_ pZvarProject_ pZvarZone_ = + ZoneViewsAddResources + { _zvarQuotaUser = Nothing + , _zvarPrettyPrint = True + , _zvarResourceView = pZvarResourceView_ + , _zvarProject = pZvarProject_ + , _zvarUserIp = Nothing + , _zvarZone = pZvarZone_ + , _zvarKey = Nothing + , _zvarOauthToken = Nothing + , _zvarFields = Nothing + , _zvarAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvarQuotaUser :: Lens' ZoneViewsAddResources' (Maybe Text) +zvarQuotaUser + = lens _zvarQuotaUser + (\ s a -> s{_zvarQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvarPrettyPrint :: Lens' ZoneViewsAddResources' Bool +zvarPrettyPrint + = lens _zvarPrettyPrint + (\ s a -> s{_zvarPrettyPrint = a}) + +-- | The name of the resource view. +zvarResourceView :: Lens' ZoneViewsAddResources' Text +zvarResourceView + = lens _zvarResourceView + (\ s a -> s{_zvarResourceView = a}) + +-- | The project name of the resource view. +zvarProject :: Lens' ZoneViewsAddResources' Text +zvarProject + = lens _zvarProject (\ s a -> s{_zvarProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvarUserIp :: Lens' ZoneViewsAddResources' (Maybe Text) +zvarUserIp + = lens _zvarUserIp (\ s a -> s{_zvarUserIp = a}) + +-- | The zone name of the resource view. +zvarZone :: Lens' ZoneViewsAddResources' Text +zvarZone = lens _zvarZone (\ s a -> s{_zvarZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvarKey :: Lens' ZoneViewsAddResources' (Maybe Text) +zvarKey = lens _zvarKey (\ s a -> s{_zvarKey = a}) + +-- | OAuth 2.0 token for the current user. +zvarOauthToken :: Lens' ZoneViewsAddResources' (Maybe Text) +zvarOauthToken + = lens _zvarOauthToken + (\ s a -> s{_zvarOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvarFields :: Lens' ZoneViewsAddResources' (Maybe Text) +zvarFields + = lens _zvarFields (\ s a -> s{_zvarFields = a}) + +-- | Data format for the response. +zvarAlt :: Lens' ZoneViewsAddResources' Text +zvarAlt = lens _zvarAlt (\ s a -> s{_zvarAlt = a}) + +instance GoogleRequest ZoneViewsAddResources' where + type Rs ZoneViewsAddResources' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsAddResources{..} + = go _zvarQuotaUser _zvarPrettyPrint + _zvarResourceView + _zvarProject + _zvarUserIp + _zvarZone + _zvarKey + _zvarOauthToken + _zvarFields + _zvarAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneViewsAddResourcesAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Delete.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Delete.hs new file mode 100644 index 000000000..a153abc9c --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Delete a resource view. +-- +-- /See:/ for @ResourceviewsZoneViewsDelete@. +module Resourceviews.ZoneViews.Delete + ( + -- * REST Resource + ZoneViewsDeleteAPI + + -- * Creating a Request + , zoneViewsDelete + , ZoneViewsDelete + + -- * Request Lenses + , zvdQuotaUser + , zvdPrettyPrint + , zvdResourceView + , zvdProject + , zvdUserIp + , zvdZone + , zvdKey + , zvdOauthToken + , zvdFields + , zvdAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsDelete@ which the +-- 'ZoneViewsDelete' request conforms to. +type ZoneViewsDeleteAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + Delete '[JSON] Operation + +-- | Delete a resource view. +-- +-- /See:/ 'zoneViewsDelete' smart constructor. +data ZoneViewsDelete = ZoneViewsDelete + { _zvdQuotaUser :: !(Maybe Text) + , _zvdPrettyPrint :: !Bool + , _zvdResourceView :: !Text + , _zvdProject :: !Text + , _zvdUserIp :: !(Maybe Text) + , _zvdZone :: !Text + , _zvdKey :: !(Maybe Text) + , _zvdOauthToken :: !(Maybe Text) + , _zvdFields :: !(Maybe Text) + , _zvdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvdQuotaUser' +-- +-- * 'zvdPrettyPrint' +-- +-- * 'zvdResourceView' +-- +-- * 'zvdProject' +-- +-- * 'zvdUserIp' +-- +-- * 'zvdZone' +-- +-- * 'zvdKey' +-- +-- * 'zvdOauthToken' +-- +-- * 'zvdFields' +-- +-- * 'zvdAlt' +zoneViewsDelete + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsDelete +zoneViewsDelete pZvdResourceView_ pZvdProject_ pZvdZone_ = + ZoneViewsDelete + { _zvdQuotaUser = Nothing + , _zvdPrettyPrint = True + , _zvdResourceView = pZvdResourceView_ + , _zvdProject = pZvdProject_ + , _zvdUserIp = Nothing + , _zvdZone = pZvdZone_ + , _zvdKey = Nothing + , _zvdOauthToken = Nothing + , _zvdFields = Nothing + , _zvdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvdQuotaUser :: Lens' ZoneViewsDelete' (Maybe Text) +zvdQuotaUser + = lens _zvdQuotaUser (\ s a -> s{_zvdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvdPrettyPrint :: Lens' ZoneViewsDelete' Bool +zvdPrettyPrint + = lens _zvdPrettyPrint + (\ s a -> s{_zvdPrettyPrint = a}) + +-- | The name of the resource view. +zvdResourceView :: Lens' ZoneViewsDelete' Text +zvdResourceView + = lens _zvdResourceView + (\ s a -> s{_zvdResourceView = a}) + +-- | The project name of the resource view. +zvdProject :: Lens' ZoneViewsDelete' Text +zvdProject + = lens _zvdProject (\ s a -> s{_zvdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvdUserIp :: Lens' ZoneViewsDelete' (Maybe Text) +zvdUserIp + = lens _zvdUserIp (\ s a -> s{_zvdUserIp = a}) + +-- | The zone name of the resource view. +zvdZone :: Lens' ZoneViewsDelete' Text +zvdZone = lens _zvdZone (\ s a -> s{_zvdZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvdKey :: Lens' ZoneViewsDelete' (Maybe Text) +zvdKey = lens _zvdKey (\ s a -> s{_zvdKey = a}) + +-- | OAuth 2.0 token for the current user. +zvdOauthToken :: Lens' ZoneViewsDelete' (Maybe Text) +zvdOauthToken + = lens _zvdOauthToken + (\ s a -> s{_zvdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvdFields :: Lens' ZoneViewsDelete' (Maybe Text) +zvdFields + = lens _zvdFields (\ s a -> s{_zvdFields = a}) + +-- | Data format for the response. +zvdAlt :: Lens' ZoneViewsDelete' Text +zvdAlt = lens _zvdAlt (\ s a -> s{_zvdAlt = a}) + +instance GoogleRequest ZoneViewsDelete' where + type Rs ZoneViewsDelete' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsDelete{..} + = go _zvdQuotaUser _zvdPrettyPrint _zvdResourceView + _zvdProject + _zvdUserIp + _zvdZone + _zvdKey + _zvdOauthToken + _zvdFields + _zvdAlt + where go + = clientWithRoute (Proxy :: Proxy ZoneViewsDeleteAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Get.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Get.hs new file mode 100644 index 000000000..a6a34156d --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Get.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the information of a zonal resource view. +-- +-- /See:/ for @ResourceviewsZoneViewsGet@. +module Resourceviews.ZoneViews.Get + ( + -- * REST Resource + ZoneViewsGetAPI + + -- * Creating a Request + , zoneViewsGet + , ZoneViewsGet + + -- * Request Lenses + , zvgQuotaUser + , zvgPrettyPrint + , zvgResourceView + , zvgProject + , zvgUserIp + , zvgZone + , zvgKey + , zvgOauthToken + , zvgFields + , zvgAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsGet@ which the +-- 'ZoneViewsGet' request conforms to. +type ZoneViewsGetAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + Get '[JSON] ResourceView + +-- | Get the information of a zonal resource view. +-- +-- /See:/ 'zoneViewsGet' smart constructor. +data ZoneViewsGet = ZoneViewsGet + { _zvgQuotaUser :: !(Maybe Text) + , _zvgPrettyPrint :: !Bool + , _zvgResourceView :: !Text + , _zvgProject :: !Text + , _zvgUserIp :: !(Maybe Text) + , _zvgZone :: !Text + , _zvgKey :: !(Maybe Text) + , _zvgOauthToken :: !(Maybe Text) + , _zvgFields :: !(Maybe Text) + , _zvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvgQuotaUser' +-- +-- * 'zvgPrettyPrint' +-- +-- * 'zvgResourceView' +-- +-- * 'zvgProject' +-- +-- * 'zvgUserIp' +-- +-- * 'zvgZone' +-- +-- * 'zvgKey' +-- +-- * 'zvgOauthToken' +-- +-- * 'zvgFields' +-- +-- * 'zvgAlt' +zoneViewsGet + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsGet +zoneViewsGet pZvgResourceView_ pZvgProject_ pZvgZone_ = + ZoneViewsGet + { _zvgQuotaUser = Nothing + , _zvgPrettyPrint = True + , _zvgResourceView = pZvgResourceView_ + , _zvgProject = pZvgProject_ + , _zvgUserIp = Nothing + , _zvgZone = pZvgZone_ + , _zvgKey = Nothing + , _zvgOauthToken = Nothing + , _zvgFields = Nothing + , _zvgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvgQuotaUser :: Lens' ZoneViewsGet' (Maybe Text) +zvgQuotaUser + = lens _zvgQuotaUser (\ s a -> s{_zvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvgPrettyPrint :: Lens' ZoneViewsGet' Bool +zvgPrettyPrint + = lens _zvgPrettyPrint + (\ s a -> s{_zvgPrettyPrint = a}) + +-- | The name of the resource view. +zvgResourceView :: Lens' ZoneViewsGet' Text +zvgResourceView + = lens _zvgResourceView + (\ s a -> s{_zvgResourceView = a}) + +-- | The project name of the resource view. +zvgProject :: Lens' ZoneViewsGet' Text +zvgProject + = lens _zvgProject (\ s a -> s{_zvgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvgUserIp :: Lens' ZoneViewsGet' (Maybe Text) +zvgUserIp + = lens _zvgUserIp (\ s a -> s{_zvgUserIp = a}) + +-- | The zone name of the resource view. +zvgZone :: Lens' ZoneViewsGet' Text +zvgZone = lens _zvgZone (\ s a -> s{_zvgZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvgKey :: Lens' ZoneViewsGet' (Maybe Text) +zvgKey = lens _zvgKey (\ s a -> s{_zvgKey = a}) + +-- | OAuth 2.0 token for the current user. +zvgOauthToken :: Lens' ZoneViewsGet' (Maybe Text) +zvgOauthToken + = lens _zvgOauthToken + (\ s a -> s{_zvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvgFields :: Lens' ZoneViewsGet' (Maybe Text) +zvgFields + = lens _zvgFields (\ s a -> s{_zvgFields = a}) + +-- | Data format for the response. +zvgAlt :: Lens' ZoneViewsGet' Text +zvgAlt = lens _zvgAlt (\ s a -> s{_zvgAlt = a}) + +instance GoogleRequest ZoneViewsGet' where + type Rs ZoneViewsGet' = ResourceView + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsGet{..} + = go _zvgQuotaUser _zvgPrettyPrint _zvgResourceView + _zvgProject + _zvgUserIp + _zvgZone + _zvgKey + _zvgOauthToken + _zvgFields + _zvgAlt + where go + = clientWithRoute (Proxy :: Proxy ZoneViewsGetAPI) r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/GetService.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/GetService.hs new file mode 100644 index 000000000..c9685e40e --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/GetService.hs @@ -0,0 +1,204 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.GetService +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the service information of a resource view or a resource. +-- +-- /See:/ for @ResourceviewsZoneViewsGetService@. +module Resourceviews.ZoneViews.GetService + ( + -- * REST Resource + ZoneViewsGetServiceAPI + + -- * Creating a Request + , zoneViewsGetService + , ZoneViewsGetService + + -- * Request Lenses + , zvgsQuotaUser + , zvgsPrettyPrint + , zvgsResourceView + , zvgsResourceName + , zvgsProject + , zvgsUserIp + , zvgsZone + , zvgsKey + , zvgsOauthToken + , zvgsFields + , zvgsAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsGetService@ which the +-- 'ZoneViewsGetService' request conforms to. +type ZoneViewsGetServiceAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + "getService" :> + QueryParam "resourceName" Text :> + Post '[JSON] ZoneViewsGetServiceResponse + +-- | Get the service information of a resource view or a resource. +-- +-- /See:/ 'zoneViewsGetService' smart constructor. +data ZoneViewsGetService = ZoneViewsGetService + { _zvgsQuotaUser :: !(Maybe Text) + , _zvgsPrettyPrint :: !Bool + , _zvgsResourceView :: !Text + , _zvgsResourceName :: !(Maybe Text) + , _zvgsProject :: !Text + , _zvgsUserIp :: !(Maybe Text) + , _zvgsZone :: !Text + , _zvgsKey :: !(Maybe Text) + , _zvgsOauthToken :: !(Maybe Text) + , _zvgsFields :: !(Maybe Text) + , _zvgsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsGetService'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvgsQuotaUser' +-- +-- * 'zvgsPrettyPrint' +-- +-- * 'zvgsResourceView' +-- +-- * 'zvgsResourceName' +-- +-- * 'zvgsProject' +-- +-- * 'zvgsUserIp' +-- +-- * 'zvgsZone' +-- +-- * 'zvgsKey' +-- +-- * 'zvgsOauthToken' +-- +-- * 'zvgsFields' +-- +-- * 'zvgsAlt' +zoneViewsGetService + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsGetService +zoneViewsGetService pZvgsResourceView_ pZvgsProject_ pZvgsZone_ = + ZoneViewsGetService + { _zvgsQuotaUser = Nothing + , _zvgsPrettyPrint = True + , _zvgsResourceView = pZvgsResourceView_ + , _zvgsResourceName = Nothing + , _zvgsProject = pZvgsProject_ + , _zvgsUserIp = Nothing + , _zvgsZone = pZvgsZone_ + , _zvgsKey = Nothing + , _zvgsOauthToken = Nothing + , _zvgsFields = Nothing + , _zvgsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvgsQuotaUser :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsQuotaUser + = lens _zvgsQuotaUser + (\ s a -> s{_zvgsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvgsPrettyPrint :: Lens' ZoneViewsGetService' Bool +zvgsPrettyPrint + = lens _zvgsPrettyPrint + (\ s a -> s{_zvgsPrettyPrint = a}) + +-- | The name of the resource view. +zvgsResourceView :: Lens' ZoneViewsGetService' Text +zvgsResourceView + = lens _zvgsResourceView + (\ s a -> s{_zvgsResourceView = a}) + +-- | The name of the resource if user wants to get the service information of +-- the resource. +zvgsResourceName :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsResourceName + = lens _zvgsResourceName + (\ s a -> s{_zvgsResourceName = a}) + +-- | The project name of the resource view. +zvgsProject :: Lens' ZoneViewsGetService' Text +zvgsProject + = lens _zvgsProject (\ s a -> s{_zvgsProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvgsUserIp :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsUserIp + = lens _zvgsUserIp (\ s a -> s{_zvgsUserIp = a}) + +-- | The zone name of the resource view. +zvgsZone :: Lens' ZoneViewsGetService' Text +zvgsZone = lens _zvgsZone (\ s a -> s{_zvgsZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvgsKey :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsKey = lens _zvgsKey (\ s a -> s{_zvgsKey = a}) + +-- | OAuth 2.0 token for the current user. +zvgsOauthToken :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsOauthToken + = lens _zvgsOauthToken + (\ s a -> s{_zvgsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvgsFields :: Lens' ZoneViewsGetService' (Maybe Text) +zvgsFields + = lens _zvgsFields (\ s a -> s{_zvgsFields = a}) + +-- | Data format for the response. +zvgsAlt :: Lens' ZoneViewsGetService' Text +zvgsAlt = lens _zvgsAlt (\ s a -> s{_zvgsAlt = a}) + +instance GoogleRequest ZoneViewsGetService' where + type Rs ZoneViewsGetService' = + ZoneViewsGetServiceResponse + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsGetService{..} + = go _zvgsQuotaUser _zvgsPrettyPrint + _zvgsResourceView + _zvgsResourceName + _zvgsProject + _zvgsUserIp + _zvgsZone + _zvgsKey + _zvgsOauthToken + _zvgsFields + _zvgsAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneViewsGetServiceAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Insert.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Insert.hs new file mode 100644 index 000000000..f7c6af05e --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/Insert.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Create a resource view. +-- +-- /See:/ for @ResourceviewsZoneViewsInsert@. +module Resourceviews.ZoneViews.Insert + ( + -- * REST Resource + ZoneViewsInsertAPI + + -- * Creating a Request + , zoneViewsInsert + , ZoneViewsInsert + + -- * Request Lenses + , zviQuotaUser + , zviPrettyPrint + , zviProject + , zviUserIp + , zviZone + , zviKey + , zviOauthToken + , zviFields + , zviAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsInsert@ which the +-- 'ZoneViewsInsert' request conforms to. +type ZoneViewsInsertAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> Post '[JSON] Operation + +-- | Create a resource view. +-- +-- /See:/ 'zoneViewsInsert' smart constructor. +data ZoneViewsInsert = ZoneViewsInsert + { _zviQuotaUser :: !(Maybe Text) + , _zviPrettyPrint :: !Bool + , _zviProject :: !Text + , _zviUserIp :: !(Maybe Text) + , _zviZone :: !Text + , _zviKey :: !(Maybe Text) + , _zviOauthToken :: !(Maybe Text) + , _zviFields :: !(Maybe Text) + , _zviAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zviQuotaUser' +-- +-- * 'zviPrettyPrint' +-- +-- * 'zviProject' +-- +-- * 'zviUserIp' +-- +-- * 'zviZone' +-- +-- * 'zviKey' +-- +-- * 'zviOauthToken' +-- +-- * 'zviFields' +-- +-- * 'zviAlt' +zoneViewsInsert + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsInsert +zoneViewsInsert pZviProject_ pZviZone_ = + ZoneViewsInsert + { _zviQuotaUser = Nothing + , _zviPrettyPrint = True + , _zviProject = pZviProject_ + , _zviUserIp = Nothing + , _zviZone = pZviZone_ + , _zviKey = Nothing + , _zviOauthToken = Nothing + , _zviFields = Nothing + , _zviAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zviQuotaUser :: Lens' ZoneViewsInsert' (Maybe Text) +zviQuotaUser + = lens _zviQuotaUser (\ s a -> s{_zviQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zviPrettyPrint :: Lens' ZoneViewsInsert' Bool +zviPrettyPrint + = lens _zviPrettyPrint + (\ s a -> s{_zviPrettyPrint = a}) + +-- | The project name of the resource view. +zviProject :: Lens' ZoneViewsInsert' Text +zviProject + = lens _zviProject (\ s a -> s{_zviProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zviUserIp :: Lens' ZoneViewsInsert' (Maybe Text) +zviUserIp + = lens _zviUserIp (\ s a -> s{_zviUserIp = a}) + +-- | The zone name of the resource view. +zviZone :: Lens' ZoneViewsInsert' Text +zviZone = lens _zviZone (\ s a -> s{_zviZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zviKey :: Lens' ZoneViewsInsert' (Maybe Text) +zviKey = lens _zviKey (\ s a -> s{_zviKey = a}) + +-- | OAuth 2.0 token for the current user. +zviOauthToken :: Lens' ZoneViewsInsert' (Maybe Text) +zviOauthToken + = lens _zviOauthToken + (\ s a -> s{_zviOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zviFields :: Lens' ZoneViewsInsert' (Maybe Text) +zviFields + = lens _zviFields (\ s a -> s{_zviFields = a}) + +-- | Data format for the response. +zviAlt :: Lens' ZoneViewsInsert' Text +zviAlt = lens _zviAlt (\ s a -> s{_zviAlt = a}) + +instance GoogleRequest ZoneViewsInsert' where + type Rs ZoneViewsInsert' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsInsert{..} + = go _zviQuotaUser _zviPrettyPrint _zviProject + _zviUserIp + _zviZone + _zviKey + _zviOauthToken + _zviFields + _zviAlt + where go + = clientWithRoute (Proxy :: Proxy ZoneViewsInsertAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/List.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/List.hs new file mode 100644 index 000000000..4bcd09a89 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/List.hs @@ -0,0 +1,198 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List resource views. +-- +-- /See:/ for @ResourceviewsZoneViewsList@. +module Resourceviews.ZoneViews.List + ( + -- * REST Resource + ZoneViewsListAPI + + -- * Creating a Request + , zoneViewsList + , ZoneViewsList + + -- * Request Lenses + , zvlQuotaUser + , zvlPrettyPrint + , zvlProject + , zvlUserIp + , zvlZone + , zvlKey + , zvlPageToken + , zvlOauthToken + , zvlMaxResults + , zvlFields + , zvlAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsList@ which the +-- 'ZoneViewsList' request conforms to. +type ZoneViewsListAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ZoneViewsList + +-- | List resource views. +-- +-- /See:/ 'zoneViewsList' smart constructor. +data ZoneViewsList = ZoneViewsList + { _zvlQuotaUser :: !(Maybe Text) + , _zvlPrettyPrint :: !Bool + , _zvlProject :: !Text + , _zvlUserIp :: !(Maybe Text) + , _zvlZone :: !Text + , _zvlKey :: !(Maybe Text) + , _zvlPageToken :: !(Maybe Text) + , _zvlOauthToken :: !(Maybe Text) + , _zvlMaxResults :: !Int32 + , _zvlFields :: !(Maybe Text) + , _zvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvlQuotaUser' +-- +-- * 'zvlPrettyPrint' +-- +-- * 'zvlProject' +-- +-- * 'zvlUserIp' +-- +-- * 'zvlZone' +-- +-- * 'zvlKey' +-- +-- * 'zvlPageToken' +-- +-- * 'zvlOauthToken' +-- +-- * 'zvlMaxResults' +-- +-- * 'zvlFields' +-- +-- * 'zvlAlt' +zoneViewsList + :: Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsList +zoneViewsList pZvlProject_ pZvlZone_ = + ZoneViewsList + { _zvlQuotaUser = Nothing + , _zvlPrettyPrint = True + , _zvlProject = pZvlProject_ + , _zvlUserIp = Nothing + , _zvlZone = pZvlZone_ + , _zvlKey = Nothing + , _zvlPageToken = Nothing + , _zvlOauthToken = Nothing + , _zvlMaxResults = 5000 + , _zvlFields = Nothing + , _zvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvlQuotaUser :: Lens' ZoneViewsList' (Maybe Text) +zvlQuotaUser + = lens _zvlQuotaUser (\ s a -> s{_zvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvlPrettyPrint :: Lens' ZoneViewsList' Bool +zvlPrettyPrint + = lens _zvlPrettyPrint + (\ s a -> s{_zvlPrettyPrint = a}) + +-- | The project name of the resource view. +zvlProject :: Lens' ZoneViewsList' Text +zvlProject + = lens _zvlProject (\ s a -> s{_zvlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvlUserIp :: Lens' ZoneViewsList' (Maybe Text) +zvlUserIp + = lens _zvlUserIp (\ s a -> s{_zvlUserIp = a}) + +-- | The zone name of the resource view. +zvlZone :: Lens' ZoneViewsList' Text +zvlZone = lens _zvlZone (\ s a -> s{_zvlZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvlKey :: Lens' ZoneViewsList' (Maybe Text) +zvlKey = lens _zvlKey (\ s a -> s{_zvlKey = a}) + +-- | Specifies a nextPageToken returned by a previous list request. This +-- token can be used to request the next page of results from a previous +-- list request. +zvlPageToken :: Lens' ZoneViewsList' (Maybe Text) +zvlPageToken + = lens _zvlPageToken (\ s a -> s{_zvlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zvlOauthToken :: Lens' ZoneViewsList' (Maybe Text) +zvlOauthToken + = lens _zvlOauthToken + (\ s a -> s{_zvlOauthToken = a}) + +-- | Maximum count of results to be returned. Acceptable values are 0 to +-- 5000, inclusive. (Default: 5000) +zvlMaxResults :: Lens' ZoneViewsList' Int32 +zvlMaxResults + = lens _zvlMaxResults + (\ s a -> s{_zvlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zvlFields :: Lens' ZoneViewsList' (Maybe Text) +zvlFields + = lens _zvlFields (\ s a -> s{_zvlFields = a}) + +-- | Data format for the response. +zvlAlt :: Lens' ZoneViewsList' Text +zvlAlt = lens _zvlAlt (\ s a -> s{_zvlAlt = a}) + +instance GoogleRequest ZoneViewsList' where + type Rs ZoneViewsList' = ZoneViewsList + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsList{..} + = go _zvlQuotaUser _zvlPrettyPrint _zvlProject + _zvlUserIp + _zvlZone + _zvlKey + _zvlPageToken + _zvlOauthToken + (Just _zvlMaxResults) + _zvlFields + _zvlAlt + where go + = clientWithRoute (Proxy :: Proxy ZoneViewsListAPI) r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/ListResources.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/ListResources.hs new file mode 100644 index 000000000..a91e2daa9 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/ListResources.hs @@ -0,0 +1,260 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.ListResources +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the resources of the resource view. +-- +-- /See:/ for @ResourceviewsZoneViewsListResources@. +module Resourceviews.ZoneViews.ListResources + ( + -- * REST Resource + ZoneViewsListResourcesAPI + + -- * Creating a Request + , zoneViewsListResources + , ZoneViewsListResources + + -- * Request Lenses + , zvlrQuotaUser + , zvlrPrettyPrint + , zvlrResourceView + , zvlrListState + , zvlrProject + , zvlrUserIp + , zvlrFormat + , zvlrZone + , zvlrKey + , zvlrServiceName + , zvlrPageToken + , zvlrOauthToken + , zvlrMaxResults + , zvlrFields + , zvlrAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsListResources@ which the +-- 'ZoneViewsListResources' request conforms to. +type ZoneViewsListResourcesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + "resources" :> + QueryParam "listState" Text :> + QueryParam "format" Text :> + QueryParam "serviceName" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] ZoneViewsListResourcesResponse + +-- | List the resources of the resource view. +-- +-- /See:/ 'zoneViewsListResources' smart constructor. +data ZoneViewsListResources = ZoneViewsListResources + { _zvlrQuotaUser :: !(Maybe Text) + , _zvlrPrettyPrint :: !Bool + , _zvlrResourceView :: !Text + , _zvlrListState :: !Text + , _zvlrProject :: !Text + , _zvlrUserIp :: !(Maybe Text) + , _zvlrFormat :: !(Maybe Text) + , _zvlrZone :: !Text + , _zvlrKey :: !(Maybe Text) + , _zvlrServiceName :: !(Maybe Text) + , _zvlrPageToken :: !(Maybe Text) + , _zvlrOauthToken :: !(Maybe Text) + , _zvlrMaxResults :: !Int32 + , _zvlrFields :: !(Maybe Text) + , _zvlrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsListResources'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvlrQuotaUser' +-- +-- * 'zvlrPrettyPrint' +-- +-- * 'zvlrResourceView' +-- +-- * 'zvlrListState' +-- +-- * 'zvlrProject' +-- +-- * 'zvlrUserIp' +-- +-- * 'zvlrFormat' +-- +-- * 'zvlrZone' +-- +-- * 'zvlrKey' +-- +-- * 'zvlrServiceName' +-- +-- * 'zvlrPageToken' +-- +-- * 'zvlrOauthToken' +-- +-- * 'zvlrMaxResults' +-- +-- * 'zvlrFields' +-- +-- * 'zvlrAlt' +zoneViewsListResources + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsListResources +zoneViewsListResources pZvlrResourceView_ pZvlrProject_ pZvlrZone_ = + ZoneViewsListResources + { _zvlrQuotaUser = Nothing + , _zvlrPrettyPrint = True + , _zvlrResourceView = pZvlrResourceView_ + , _zvlrListState = "ALL" + , _zvlrProject = pZvlrProject_ + , _zvlrUserIp = Nothing + , _zvlrFormat = Nothing + , _zvlrZone = pZvlrZone_ + , _zvlrKey = Nothing + , _zvlrServiceName = Nothing + , _zvlrPageToken = Nothing + , _zvlrOauthToken = Nothing + , _zvlrMaxResults = 5000 + , _zvlrFields = Nothing + , _zvlrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvlrQuotaUser :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrQuotaUser + = lens _zvlrQuotaUser + (\ s a -> s{_zvlrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvlrPrettyPrint :: Lens' ZoneViewsListResources' Bool +zvlrPrettyPrint + = lens _zvlrPrettyPrint + (\ s a -> s{_zvlrPrettyPrint = a}) + +-- | The name of the resource view. +zvlrResourceView :: Lens' ZoneViewsListResources' Text +zvlrResourceView + = lens _zvlrResourceView + (\ s a -> s{_zvlrResourceView = a}) + +-- | The state of the instance to list. By default, it lists all instances. +zvlrListState :: Lens' ZoneViewsListResources' Text +zvlrListState + = lens _zvlrListState + (\ s a -> s{_zvlrListState = a}) + +-- | The project name of the resource view. +zvlrProject :: Lens' ZoneViewsListResources' Text +zvlrProject + = lens _zvlrProject (\ s a -> s{_zvlrProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvlrUserIp :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrUserIp + = lens _zvlrUserIp (\ s a -> s{_zvlrUserIp = a}) + +-- | The requested format of the return value. It can be URL or URL_PORT. A +-- JSON object will be included in the response based on the format. The +-- default format is NONE, which results in no JSON in the response. +zvlrFormat :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrFormat + = lens _zvlrFormat (\ s a -> s{_zvlrFormat = a}) + +-- | The zone name of the resource view. +zvlrZone :: Lens' ZoneViewsListResources' Text +zvlrZone = lens _zvlrZone (\ s a -> s{_zvlrZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvlrKey :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrKey = lens _zvlrKey (\ s a -> s{_zvlrKey = a}) + +-- | The service name to return in the response. It is optional and if it is +-- not set, all the service end points will be returned. +zvlrServiceName :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrServiceName + = lens _zvlrServiceName + (\ s a -> s{_zvlrServiceName = a}) + +-- | Specifies a nextPageToken returned by a previous list request. This +-- token can be used to request the next page of results from a previous +-- list request. +zvlrPageToken :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrPageToken + = lens _zvlrPageToken + (\ s a -> s{_zvlrPageToken = a}) + +-- | OAuth 2.0 token for the current user. +zvlrOauthToken :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrOauthToken + = lens _zvlrOauthToken + (\ s a -> s{_zvlrOauthToken = a}) + +-- | Maximum count of results to be returned. Acceptable values are 0 to +-- 5000, inclusive. (Default: 5000) +zvlrMaxResults :: Lens' ZoneViewsListResources' Int32 +zvlrMaxResults + = lens _zvlrMaxResults + (\ s a -> s{_zvlrMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +zvlrFields :: Lens' ZoneViewsListResources' (Maybe Text) +zvlrFields + = lens _zvlrFields (\ s a -> s{_zvlrFields = a}) + +-- | Data format for the response. +zvlrAlt :: Lens' ZoneViewsListResources' Text +zvlrAlt = lens _zvlrAlt (\ s a -> s{_zvlrAlt = a}) + +instance GoogleRequest ZoneViewsListResources' where + type Rs ZoneViewsListResources' = + ZoneViewsListResourcesResponse + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsListResources{..} + = go _zvlrQuotaUser _zvlrPrettyPrint + _zvlrResourceView + (Just _zvlrListState) + _zvlrProject + _zvlrUserIp + _zvlrFormat + _zvlrZone + _zvlrKey + _zvlrServiceName + _zvlrPageToken + _zvlrOauthToken + (Just _zvlrMaxResults) + _zvlrFields + _zvlrAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneViewsListResourcesAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/RemoveResources.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/RemoveResources.hs new file mode 100644 index 000000000..9735c1385 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/RemoveResources.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.RemoveResources +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Remove resources from the view. +-- +-- /See:/ for @ResourceviewsZoneViewsRemoveResources@. +module Resourceviews.ZoneViews.RemoveResources + ( + -- * REST Resource + ZoneViewsRemoveResourcesAPI + + -- * Creating a Request + , zoneViewsRemoveResources + , ZoneViewsRemoveResources + + -- * Request Lenses + , zvrrQuotaUser + , zvrrPrettyPrint + , zvrrResourceView + , zvrrProject + , zvrrUserIp + , zvrrZone + , zvrrKey + , zvrrOauthToken + , zvrrFields + , zvrrAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsRemoveResources@ which the +-- 'ZoneViewsRemoveResources' request conforms to. +type ZoneViewsRemoveResourcesAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + "removeResources" :> Post '[JSON] Operation + +-- | Remove resources from the view. +-- +-- /See:/ 'zoneViewsRemoveResources' smart constructor. +data ZoneViewsRemoveResources = ZoneViewsRemoveResources + { _zvrrQuotaUser :: !(Maybe Text) + , _zvrrPrettyPrint :: !Bool + , _zvrrResourceView :: !Text + , _zvrrProject :: !Text + , _zvrrUserIp :: !(Maybe Text) + , _zvrrZone :: !Text + , _zvrrKey :: !(Maybe Text) + , _zvrrOauthToken :: !(Maybe Text) + , _zvrrFields :: !(Maybe Text) + , _zvrrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsRemoveResources'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvrrQuotaUser' +-- +-- * 'zvrrPrettyPrint' +-- +-- * 'zvrrResourceView' +-- +-- * 'zvrrProject' +-- +-- * 'zvrrUserIp' +-- +-- * 'zvrrZone' +-- +-- * 'zvrrKey' +-- +-- * 'zvrrOauthToken' +-- +-- * 'zvrrFields' +-- +-- * 'zvrrAlt' +zoneViewsRemoveResources + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsRemoveResources +zoneViewsRemoveResources pZvrrResourceView_ pZvrrProject_ pZvrrZone_ = + ZoneViewsRemoveResources + { _zvrrQuotaUser = Nothing + , _zvrrPrettyPrint = True + , _zvrrResourceView = pZvrrResourceView_ + , _zvrrProject = pZvrrProject_ + , _zvrrUserIp = Nothing + , _zvrrZone = pZvrrZone_ + , _zvrrKey = Nothing + , _zvrrOauthToken = Nothing + , _zvrrFields = Nothing + , _zvrrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvrrQuotaUser :: Lens' ZoneViewsRemoveResources' (Maybe Text) +zvrrQuotaUser + = lens _zvrrQuotaUser + (\ s a -> s{_zvrrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvrrPrettyPrint :: Lens' ZoneViewsRemoveResources' Bool +zvrrPrettyPrint + = lens _zvrrPrettyPrint + (\ s a -> s{_zvrrPrettyPrint = a}) + +-- | The name of the resource view. +zvrrResourceView :: Lens' ZoneViewsRemoveResources' Text +zvrrResourceView + = lens _zvrrResourceView + (\ s a -> s{_zvrrResourceView = a}) + +-- | The project name of the resource view. +zvrrProject :: Lens' ZoneViewsRemoveResources' Text +zvrrProject + = lens _zvrrProject (\ s a -> s{_zvrrProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvrrUserIp :: Lens' ZoneViewsRemoveResources' (Maybe Text) +zvrrUserIp + = lens _zvrrUserIp (\ s a -> s{_zvrrUserIp = a}) + +-- | The zone name of the resource view. +zvrrZone :: Lens' ZoneViewsRemoveResources' Text +zvrrZone = lens _zvrrZone (\ s a -> s{_zvrrZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvrrKey :: Lens' ZoneViewsRemoveResources' (Maybe Text) +zvrrKey = lens _zvrrKey (\ s a -> s{_zvrrKey = a}) + +-- | OAuth 2.0 token for the current user. +zvrrOauthToken :: Lens' ZoneViewsRemoveResources' (Maybe Text) +zvrrOauthToken + = lens _zvrrOauthToken + (\ s a -> s{_zvrrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvrrFields :: Lens' ZoneViewsRemoveResources' (Maybe Text) +zvrrFields + = lens _zvrrFields (\ s a -> s{_zvrrFields = a}) + +-- | Data format for the response. +zvrrAlt :: Lens' ZoneViewsRemoveResources' Text +zvrrAlt = lens _zvrrAlt (\ s a -> s{_zvrrAlt = a}) + +instance GoogleRequest ZoneViewsRemoveResources' + where + type Rs ZoneViewsRemoveResources' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsRemoveResources{..} + = go _zvrrQuotaUser _zvrrPrettyPrint + _zvrrResourceView + _zvrrProject + _zvrrUserIp + _zvrrZone + _zvrrKey + _zvrrOauthToken + _zvrrFields + _zvrrAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneViewsRemoveResourcesAPI) + r + u diff --git a/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/SetService.hs b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/SetService.hs new file mode 100644 index 000000000..031deb414 --- /dev/null +++ b/gogol-resourceviews/gen/Network/Google/Resource/Resourceviews/ZoneViews/SetService.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Resourceviews.ZoneViews.SetService +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update the service information of a resource view or a resource. +-- +-- /See:/ for @ResourceviewsZoneViewsSetService@. +module Resourceviews.ZoneViews.SetService + ( + -- * REST Resource + ZoneViewsSetServiceAPI + + -- * Creating a Request + , zoneViewsSetService + , ZoneViewsSetService + + -- * Request Lenses + , zvssQuotaUser + , zvssPrettyPrint + , zvssResourceView + , zvssProject + , zvssUserIp + , zvssZone + , zvssKey + , zvssOauthToken + , zvssFields + , zvssAlt + ) where + +import Network.Google.InstanceGroups.Types +import Network.Google.Prelude + +-- | A resource alias for @ResourceviewsZoneViewsSetService@ which the +-- 'ZoneViewsSetService' request conforms to. +type ZoneViewsSetServiceAPI = + Capture "project" Text :> + "zones" :> + Capture "zone" Text :> + "resourceViews" :> + Capture "resourceView" Text :> + "setService" :> Post '[JSON] Operation + +-- | Update the service information of a resource view or a resource. +-- +-- /See:/ 'zoneViewsSetService' smart constructor. +data ZoneViewsSetService = ZoneViewsSetService + { _zvssQuotaUser :: !(Maybe Text) + , _zvssPrettyPrint :: !Bool + , _zvssResourceView :: !Text + , _zvssProject :: !Text + , _zvssUserIp :: !(Maybe Text) + , _zvssZone :: !Text + , _zvssKey :: !(Maybe Text) + , _zvssOauthToken :: !(Maybe Text) + , _zvssFields :: !(Maybe Text) + , _zvssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ZoneViewsSetService'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'zvssQuotaUser' +-- +-- * 'zvssPrettyPrint' +-- +-- * 'zvssResourceView' +-- +-- * 'zvssProject' +-- +-- * 'zvssUserIp' +-- +-- * 'zvssZone' +-- +-- * 'zvssKey' +-- +-- * 'zvssOauthToken' +-- +-- * 'zvssFields' +-- +-- * 'zvssAlt' +zoneViewsSetService + :: Text -- ^ 'resourceView' + -> Text -- ^ 'project' + -> Text -- ^ 'zone' + -> ZoneViewsSetService +zoneViewsSetService pZvssResourceView_ pZvssProject_ pZvssZone_ = + ZoneViewsSetService + { _zvssQuotaUser = Nothing + , _zvssPrettyPrint = True + , _zvssResourceView = pZvssResourceView_ + , _zvssProject = pZvssProject_ + , _zvssUserIp = Nothing + , _zvssZone = pZvssZone_ + , _zvssKey = Nothing + , _zvssOauthToken = Nothing + , _zvssFields = Nothing + , _zvssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +zvssQuotaUser :: Lens' ZoneViewsSetService' (Maybe Text) +zvssQuotaUser + = lens _zvssQuotaUser + (\ s a -> s{_zvssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +zvssPrettyPrint :: Lens' ZoneViewsSetService' Bool +zvssPrettyPrint + = lens _zvssPrettyPrint + (\ s a -> s{_zvssPrettyPrint = a}) + +-- | The name of the resource view. +zvssResourceView :: Lens' ZoneViewsSetService' Text +zvssResourceView + = lens _zvssResourceView + (\ s a -> s{_zvssResourceView = a}) + +-- | The project name of the resource view. +zvssProject :: Lens' ZoneViewsSetService' Text +zvssProject + = lens _zvssProject (\ s a -> s{_zvssProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +zvssUserIp :: Lens' ZoneViewsSetService' (Maybe Text) +zvssUserIp + = lens _zvssUserIp (\ s a -> s{_zvssUserIp = a}) + +-- | The zone name of the resource view. +zvssZone :: Lens' ZoneViewsSetService' Text +zvssZone = lens _zvssZone (\ s a -> s{_zvssZone = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +zvssKey :: Lens' ZoneViewsSetService' (Maybe Text) +zvssKey = lens _zvssKey (\ s a -> s{_zvssKey = a}) + +-- | OAuth 2.0 token for the current user. +zvssOauthToken :: Lens' ZoneViewsSetService' (Maybe Text) +zvssOauthToken + = lens _zvssOauthToken + (\ s a -> s{_zvssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +zvssFields :: Lens' ZoneViewsSetService' (Maybe Text) +zvssFields + = lens _zvssFields (\ s a -> s{_zvssFields = a}) + +-- | Data format for the response. +zvssAlt :: Lens' ZoneViewsSetService' Text +zvssAlt = lens _zvssAlt (\ s a -> s{_zvssAlt = a}) + +instance GoogleRequest ZoneViewsSetService' where + type Rs ZoneViewsSetService' = Operation + request = requestWithRoute defReq instanceGroupsURL + requestWithRoute r u ZoneViewsSetService{..} + = go _zvssQuotaUser _zvssPrettyPrint + _zvssResourceView + _zvssProject + _zvssUserIp + _zvssZone + _zvssKey + _zvssOauthToken + _zvssFields + _zvssAlt + where go + = clientWithRoute + (Proxy :: Proxy ZoneViewsSetServiceAPI) + r + u diff --git a/gogol-resourceviews/gogol-resourceviews.cabal b/gogol-resourceviews/gogol-resourceviews.cabal new file mode 100644 index 000000000..2e3f82e2b --- /dev/null +++ b/gogol-resourceviews/gogol-resourceviews.cabal @@ -0,0 +1,54 @@ +name: gogol-resourceviews +version: 0.0.1 +synopsis: Google Compute Engine Instance Groups API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + The Resource View API allows users to create and manage logical sets of + Google Compute Engine instances. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.InstanceGroups + , Network.Google.InstanceGroups.Types + , Network.Google.Resource.Resourceviews.ZoneOperations.Get + , Network.Google.Resource.Resourceviews.ZoneOperations.List + , Network.Google.Resource.Resourceviews.ZoneViews.AddResources + , Network.Google.Resource.Resourceviews.ZoneViews.Delete + , Network.Google.Resource.Resourceviews.ZoneViews.Get + , Network.Google.Resource.Resourceviews.ZoneViews.GetService + , Network.Google.Resource.Resourceviews.ZoneViews.Insert + , Network.Google.Resource.Resourceviews.ZoneViews.List + , Network.Google.Resource.Resourceviews.ZoneViews.ListResources + , Network.Google.Resource.Resourceviews.ZoneViews.RemoveResources + , Network.Google.Resource.Resourceviews.ZoneViews.SetService + + other-modules: + Network.Google.InstanceGroups.Types.Product + , Network.Google.InstanceGroups.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-resourceviews/src/.gitkeep b/gogol-resourceviews/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-shopping-content/LICENSE b/gogol-shopping-content/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-shopping-content/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-shopping-content/Makefile b/gogol-shopping-content/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-shopping-content/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-shopping-content/README.md b/gogol-shopping-content/README.md new file mode 100644 index 000000000..6e7585700 --- /dev/null +++ b/gogol-shopping-content/README.md @@ -0,0 +1,28 @@ +# gogol-shopping-content + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Content API for Shopping. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-shopping-content` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-shopping-content/Setup.hs b/gogol-shopping-content/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-shopping-content/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Acknowledge.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Acknowledge.hs new file mode 100644 index 000000000..791530695 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Acknowledge.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Acknowledge +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks an order as acknowledged. +-- +-- /See:/ for @ContentOrdersAcknowledge@. +module Content.Orders.Acknowledge + ( + -- * REST Resource + OrdersAcknowledgeAPI + + -- * Creating a Request + , ordersAcknowledge + , OrdersAcknowledge + + -- * Request Lenses + , oaQuotaUser + , oaMerchantId + , oaPrettyPrint + , oaUserIp + , oaKey + , oaOauthToken + , oaOrderId + , oaFields + , oaAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersAcknowledge@ which the +-- 'OrdersAcknowledge' request conforms to. +type OrdersAcknowledgeAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "acknowledge" :> + Post '[JSON] OrdersAcknowledgeResponse + +-- | Marks an order as acknowledged. +-- +-- /See:/ 'ordersAcknowledge' smart constructor. +data OrdersAcknowledge = OrdersAcknowledge + { _oaQuotaUser :: !(Maybe Text) + , _oaMerchantId :: !Word64 + , _oaPrettyPrint :: !Bool + , _oaUserIp :: !(Maybe Text) + , _oaKey :: !(Maybe Text) + , _oaOauthToken :: !(Maybe Text) + , _oaOrderId :: !Text + , _oaFields :: !(Maybe Text) + , _oaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersAcknowledge'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaQuotaUser' +-- +-- * 'oaMerchantId' +-- +-- * 'oaPrettyPrint' +-- +-- * 'oaUserIp' +-- +-- * 'oaKey' +-- +-- * 'oaOauthToken' +-- +-- * 'oaOrderId' +-- +-- * 'oaFields' +-- +-- * 'oaAlt' +ordersAcknowledge + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersAcknowledge +ordersAcknowledge pOaMerchantId_ pOaOrderId_ = + OrdersAcknowledge + { _oaQuotaUser = Nothing + , _oaMerchantId = pOaMerchantId_ + , _oaPrettyPrint = True + , _oaUserIp = Nothing + , _oaKey = Nothing + , _oaOauthToken = Nothing + , _oaOrderId = pOaOrderId_ + , _oaFields = Nothing + , _oaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oaQuotaUser :: Lens' OrdersAcknowledge' (Maybe Text) +oaQuotaUser + = lens _oaQuotaUser (\ s a -> s{_oaQuotaUser = a}) + +-- | The ID of the managing account. +oaMerchantId :: Lens' OrdersAcknowledge' Word64 +oaMerchantId + = lens _oaMerchantId (\ s a -> s{_oaMerchantId = a}) + +-- | Returns response with indentations and line breaks. +oaPrettyPrint :: Lens' OrdersAcknowledge' Bool +oaPrettyPrint + = lens _oaPrettyPrint + (\ s a -> s{_oaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oaUserIp :: Lens' OrdersAcknowledge' (Maybe Text) +oaUserIp = lens _oaUserIp (\ s a -> s{_oaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oaKey :: Lens' OrdersAcknowledge' (Maybe Text) +oaKey = lens _oaKey (\ s a -> s{_oaKey = a}) + +-- | OAuth 2.0 token for the current user. +oaOauthToken :: Lens' OrdersAcknowledge' (Maybe Text) +oaOauthToken + = lens _oaOauthToken (\ s a -> s{_oaOauthToken = a}) + +-- | The ID of the order. +oaOrderId :: Lens' OrdersAcknowledge' Text +oaOrderId + = lens _oaOrderId (\ s a -> s{_oaOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +oaFields :: Lens' OrdersAcknowledge' (Maybe Text) +oaFields = lens _oaFields (\ s a -> s{_oaFields = a}) + +-- | Data format for the response. +oaAlt :: Lens' OrdersAcknowledge' Text +oaAlt = lens _oaAlt (\ s a -> s{_oaAlt = a}) + +instance GoogleRequest OrdersAcknowledge' where + type Rs OrdersAcknowledge' = + OrdersAcknowledgeResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersAcknowledge{..} + = go _oaQuotaUser _oaMerchantId _oaPrettyPrint + _oaUserIp + _oaKey + _oaOauthToken + _oaOrderId + _oaFields + _oaAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersAcknowledgeAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Advancetestorder.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Advancetestorder.hs new file mode 100644 index 000000000..7d12c8372 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Advancetestorder.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Advancetestorder +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sandbox only. Moves a test order from state \"inProgress\" to state +-- \"pendingShipment\". +-- +-- /See:/ for @ContentOrdersAdvancetestorder@. +module Content.Orders.Advancetestorder + ( + -- * REST Resource + OrdersAdvancetestorderAPI + + -- * Creating a Request + , ordersAdvancetestorder + , OrdersAdvancetestorder + + -- * Request Lenses + , oaaQuotaUser + , oaaMerchantId + , oaaPrettyPrint + , oaaUserIp + , oaaKey + , oaaOauthToken + , oaaOrderId + , oaaFields + , oaaAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersAdvancetestorder@ which the +-- 'OrdersAdvancetestorder' request conforms to. +type OrdersAdvancetestorderAPI = + Capture "merchantId" Word64 :> + "testorders" :> + Capture "orderId" Text :> + "advance" :> + Post '[JSON] OrdersAdvanceTestOrderResponse + +-- | Sandbox only. Moves a test order from state \"inProgress\" to state +-- \"pendingShipment\". +-- +-- /See:/ 'ordersAdvancetestorder' smart constructor. +data OrdersAdvancetestorder = OrdersAdvancetestorder + { _oaaQuotaUser :: !(Maybe Text) + , _oaaMerchantId :: !Word64 + , _oaaPrettyPrint :: !Bool + , _oaaUserIp :: !(Maybe Text) + , _oaaKey :: !(Maybe Text) + , _oaaOauthToken :: !(Maybe Text) + , _oaaOrderId :: !Text + , _oaaFields :: !(Maybe Text) + , _oaaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersAdvancetestorder'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaaQuotaUser' +-- +-- * 'oaaMerchantId' +-- +-- * 'oaaPrettyPrint' +-- +-- * 'oaaUserIp' +-- +-- * 'oaaKey' +-- +-- * 'oaaOauthToken' +-- +-- * 'oaaOrderId' +-- +-- * 'oaaFields' +-- +-- * 'oaaAlt' +ordersAdvancetestorder + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersAdvancetestorder +ordersAdvancetestorder pOaaMerchantId_ pOaaOrderId_ = + OrdersAdvancetestorder + { _oaaQuotaUser = Nothing + , _oaaMerchantId = pOaaMerchantId_ + , _oaaPrettyPrint = True + , _oaaUserIp = Nothing + , _oaaKey = Nothing + , _oaaOauthToken = Nothing + , _oaaOrderId = pOaaOrderId_ + , _oaaFields = Nothing + , _oaaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oaaQuotaUser :: Lens' OrdersAdvancetestorder' (Maybe Text) +oaaQuotaUser + = lens _oaaQuotaUser (\ s a -> s{_oaaQuotaUser = a}) + +-- | The ID of the managing account. +oaaMerchantId :: Lens' OrdersAdvancetestorder' Word64 +oaaMerchantId + = lens _oaaMerchantId + (\ s a -> s{_oaaMerchantId = a}) + +-- | Returns response with indentations and line breaks. +oaaPrettyPrint :: Lens' OrdersAdvancetestorder' Bool +oaaPrettyPrint + = lens _oaaPrettyPrint + (\ s a -> s{_oaaPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oaaUserIp :: Lens' OrdersAdvancetestorder' (Maybe Text) +oaaUserIp + = lens _oaaUserIp (\ s a -> s{_oaaUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oaaKey :: Lens' OrdersAdvancetestorder' (Maybe Text) +oaaKey = lens _oaaKey (\ s a -> s{_oaaKey = a}) + +-- | OAuth 2.0 token for the current user. +oaaOauthToken :: Lens' OrdersAdvancetestorder' (Maybe Text) +oaaOauthToken + = lens _oaaOauthToken + (\ s a -> s{_oaaOauthToken = a}) + +-- | The ID of the test order to modify. +oaaOrderId :: Lens' OrdersAdvancetestorder' Text +oaaOrderId + = lens _oaaOrderId (\ s a -> s{_oaaOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +oaaFields :: Lens' OrdersAdvancetestorder' (Maybe Text) +oaaFields + = lens _oaaFields (\ s a -> s{_oaaFields = a}) + +-- | Data format for the response. +oaaAlt :: Lens' OrdersAdvancetestorder' Text +oaaAlt = lens _oaaAlt (\ s a -> s{_oaaAlt = a}) + +instance GoogleRequest OrdersAdvancetestorder' where + type Rs OrdersAdvancetestorder' = + OrdersAdvanceTestOrderResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersAdvancetestorder{..} + = go _oaaQuotaUser _oaaMerchantId _oaaPrettyPrint + _oaaUserIp + _oaaKey + _oaaOauthToken + _oaaOrderId + _oaaFields + _oaaAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersAdvancetestorderAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancel.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancel.hs new file mode 100644 index 000000000..c667d2cba --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancel.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels all line items in an order. +-- +-- /See:/ for @ContentOrdersCancel@. +module Content.Orders.Cancel + ( + -- * REST Resource + OrdersCancelAPI + + -- * Creating a Request + , ordersCancel + , OrdersCancel + + -- * Request Lenses + , occQuotaUser + , occMerchantId + , occPrettyPrint + , occUserIp + , occKey + , occOauthToken + , occOrderId + , occFields + , occAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersCancel@ which the +-- 'OrdersCancel' request conforms to. +type OrdersCancelAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "cancel" :> Post '[JSON] OrdersCancelResponse + +-- | Cancels all line items in an order. +-- +-- /See:/ 'ordersCancel' smart constructor. +data OrdersCancel = OrdersCancel + { _occQuotaUser :: !(Maybe Text) + , _occMerchantId :: !Word64 + , _occPrettyPrint :: !Bool + , _occUserIp :: !(Maybe Text) + , _occKey :: !(Maybe Text) + , _occOauthToken :: !(Maybe Text) + , _occOrderId :: !Text + , _occFields :: !(Maybe Text) + , _occAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'occQuotaUser' +-- +-- * 'occMerchantId' +-- +-- * 'occPrettyPrint' +-- +-- * 'occUserIp' +-- +-- * 'occKey' +-- +-- * 'occOauthToken' +-- +-- * 'occOrderId' +-- +-- * 'occFields' +-- +-- * 'occAlt' +ordersCancel + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersCancel +ordersCancel pOccMerchantId_ pOccOrderId_ = + OrdersCancel + { _occQuotaUser = Nothing + , _occMerchantId = pOccMerchantId_ + , _occPrettyPrint = True + , _occUserIp = Nothing + , _occKey = Nothing + , _occOauthToken = Nothing + , _occOrderId = pOccOrderId_ + , _occFields = Nothing + , _occAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +occQuotaUser :: Lens' OrdersCancel' (Maybe Text) +occQuotaUser + = lens _occQuotaUser (\ s a -> s{_occQuotaUser = a}) + +-- | The ID of the managing account. +occMerchantId :: Lens' OrdersCancel' Word64 +occMerchantId + = lens _occMerchantId + (\ s a -> s{_occMerchantId = a}) + +-- | Returns response with indentations and line breaks. +occPrettyPrint :: Lens' OrdersCancel' Bool +occPrettyPrint + = lens _occPrettyPrint + (\ s a -> s{_occPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +occUserIp :: Lens' OrdersCancel' (Maybe Text) +occUserIp + = lens _occUserIp (\ s a -> s{_occUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +occKey :: Lens' OrdersCancel' (Maybe Text) +occKey = lens _occKey (\ s a -> s{_occKey = a}) + +-- | OAuth 2.0 token for the current user. +occOauthToken :: Lens' OrdersCancel' (Maybe Text) +occOauthToken + = lens _occOauthToken + (\ s a -> s{_occOauthToken = a}) + +-- | The ID of the order to cancel. +occOrderId :: Lens' OrdersCancel' Text +occOrderId + = lens _occOrderId (\ s a -> s{_occOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +occFields :: Lens' OrdersCancel' (Maybe Text) +occFields + = lens _occFields (\ s a -> s{_occFields = a}) + +-- | Data format for the response. +occAlt :: Lens' OrdersCancel' Text +occAlt = lens _occAlt (\ s a -> s{_occAlt = a}) + +instance GoogleRequest OrdersCancel' where + type Rs OrdersCancel' = OrdersCancelResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersCancel{..} + = go _occQuotaUser _occMerchantId _occPrettyPrint + _occUserIp + _occKey + _occOauthToken + _occOrderId + _occFields + _occAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersCancelAPI) r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancellineitem.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancellineitem.hs new file mode 100644 index 000000000..5044c6491 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Cancellineitem.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Cancellineitem +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels a line item. +-- +-- /See:/ for @ContentOrdersCancellineitem@. +module Content.Orders.Cancellineitem + ( + -- * REST Resource + OrdersCancellineitemAPI + + -- * Creating a Request + , ordersCancellineitem + , OrdersCancellineitem + + -- * Request Lenses + , oQuotaUser + , oMerchantId + , oPrettyPrint + , oUserIp + , oKey + , oOauthToken + , oOrderId + , oFields + , oAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersCancellineitem@ which the +-- 'OrdersCancellineitem' request conforms to. +type OrdersCancellineitemAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "cancelLineItem" :> + Post '[JSON] OrdersCancelLineItemResponse + +-- | Cancels a line item. +-- +-- /See:/ 'ordersCancellineitem' smart constructor. +data OrdersCancellineitem = OrdersCancellineitem + { _oQuotaUser :: !(Maybe Text) + , _oMerchantId :: !Word64 + , _oPrettyPrint :: !Bool + , _oUserIp :: !(Maybe Text) + , _oKey :: !(Maybe Text) + , _oOauthToken :: !(Maybe Text) + , _oOrderId :: !Text + , _oFields :: !(Maybe Text) + , _oAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancellineitem'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oQuotaUser' +-- +-- * 'oMerchantId' +-- +-- * 'oPrettyPrint' +-- +-- * 'oUserIp' +-- +-- * 'oKey' +-- +-- * 'oOauthToken' +-- +-- * 'oOrderId' +-- +-- * 'oFields' +-- +-- * 'oAlt' +ordersCancellineitem + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersCancellineitem +ordersCancellineitem pOMerchantId_ pOOrderId_ = + OrdersCancellineitem + { _oQuotaUser = Nothing + , _oMerchantId = pOMerchantId_ + , _oPrettyPrint = True + , _oUserIp = Nothing + , _oKey = Nothing + , _oOauthToken = Nothing + , _oOrderId = pOOrderId_ + , _oFields = Nothing + , _oAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oQuotaUser :: Lens' OrdersCancellineitem' (Maybe Text) +oQuotaUser + = lens _oQuotaUser (\ s a -> s{_oQuotaUser = a}) + +-- | The ID of the managing account. +oMerchantId :: Lens' OrdersCancellineitem' Word64 +oMerchantId + = lens _oMerchantId (\ s a -> s{_oMerchantId = a}) + +-- | Returns response with indentations and line breaks. +oPrettyPrint :: Lens' OrdersCancellineitem' Bool +oPrettyPrint + = lens _oPrettyPrint (\ s a -> s{_oPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oUserIp :: Lens' OrdersCancellineitem' (Maybe Text) +oUserIp = lens _oUserIp (\ s a -> s{_oUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oKey :: Lens' OrdersCancellineitem' (Maybe Text) +oKey = lens _oKey (\ s a -> s{_oKey = a}) + +-- | OAuth 2.0 token for the current user. +oOauthToken :: Lens' OrdersCancellineitem' (Maybe Text) +oOauthToken + = lens _oOauthToken (\ s a -> s{_oOauthToken = a}) + +-- | The ID of the order. +oOrderId :: Lens' OrdersCancellineitem' Text +oOrderId = lens _oOrderId (\ s a -> s{_oOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +oFields :: Lens' OrdersCancellineitem' (Maybe Text) +oFields = lens _oFields (\ s a -> s{_oFields = a}) + +-- | Data format for the response. +oAlt :: Lens' OrdersCancellineitem' Text +oAlt = lens _oAlt (\ s a -> s{_oAlt = a}) + +instance GoogleRequest OrdersCancellineitem' where + type Rs OrdersCancellineitem' = + OrdersCancelLineItemResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersCancellineitem{..} + = go _oQuotaUser _oMerchantId _oPrettyPrint _oUserIp + _oKey + _oOauthToken + _oOrderId + _oFields + _oAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersCancellineitemAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Createtestorder.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Createtestorder.hs new file mode 100644 index 000000000..fecad5a21 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Createtestorder.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Createtestorder +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sandbox only. Creates a test order. +-- +-- /See:/ for @ContentOrdersCreatetestorder@. +module Content.Orders.Createtestorder + ( + -- * REST Resource + OrdersCreatetestorderAPI + + -- * Creating a Request + , ordersCreatetestorder + , OrdersCreatetestorder + + -- * Request Lenses + , ocQuotaUser + , ocMerchantId + , ocPrettyPrint + , ocUserIp + , ocKey + , ocOauthToken + , ocFields + , ocAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersCreatetestorder@ which the +-- 'OrdersCreatetestorder' request conforms to. +type OrdersCreatetestorderAPI = + Capture "merchantId" Word64 :> + "testorders" :> + Post '[JSON] OrdersCreateTestOrderResponse + +-- | Sandbox only. Creates a test order. +-- +-- /See:/ 'ordersCreatetestorder' smart constructor. +data OrdersCreatetestorder = OrdersCreatetestorder + { _ocQuotaUser :: !(Maybe Text) + , _ocMerchantId :: !Word64 + , _ocPrettyPrint :: !Bool + , _ocUserIp :: !(Maybe Text) + , _ocKey :: !(Maybe Text) + , _ocOauthToken :: !(Maybe Text) + , _ocFields :: !(Maybe Text) + , _ocAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCreatetestorder'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocQuotaUser' +-- +-- * 'ocMerchantId' +-- +-- * 'ocPrettyPrint' +-- +-- * 'ocUserIp' +-- +-- * 'ocKey' +-- +-- * 'ocOauthToken' +-- +-- * 'ocFields' +-- +-- * 'ocAlt' +ordersCreatetestorder + :: Word64 -- ^ 'merchantId' + -> OrdersCreatetestorder +ordersCreatetestorder pOcMerchantId_ = + OrdersCreatetestorder + { _ocQuotaUser = Nothing + , _ocMerchantId = pOcMerchantId_ + , _ocPrettyPrint = True + , _ocUserIp = Nothing + , _ocKey = Nothing + , _ocOauthToken = Nothing + , _ocFields = Nothing + , _ocAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ocQuotaUser :: Lens' OrdersCreatetestorder' (Maybe Text) +ocQuotaUser + = lens _ocQuotaUser (\ s a -> s{_ocQuotaUser = a}) + +-- | The ID of the managing account. +ocMerchantId :: Lens' OrdersCreatetestorder' Word64 +ocMerchantId + = lens _ocMerchantId (\ s a -> s{_ocMerchantId = a}) + +-- | Returns response with indentations and line breaks. +ocPrettyPrint :: Lens' OrdersCreatetestorder' Bool +ocPrettyPrint + = lens _ocPrettyPrint + (\ s a -> s{_ocPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ocUserIp :: Lens' OrdersCreatetestorder' (Maybe Text) +ocUserIp = lens _ocUserIp (\ s a -> s{_ocUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ocKey :: Lens' OrdersCreatetestorder' (Maybe Text) +ocKey = lens _ocKey (\ s a -> s{_ocKey = a}) + +-- | OAuth 2.0 token for the current user. +ocOauthToken :: Lens' OrdersCreatetestorder' (Maybe Text) +ocOauthToken + = lens _ocOauthToken (\ s a -> s{_ocOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ocFields :: Lens' OrdersCreatetestorder' (Maybe Text) +ocFields = lens _ocFields (\ s a -> s{_ocFields = a}) + +-- | Data format for the response. +ocAlt :: Lens' OrdersCreatetestorder' Text +ocAlt = lens _ocAlt (\ s a -> s{_ocAlt = a}) + +instance GoogleRequest OrdersCreatetestorder' where + type Rs OrdersCreatetestorder' = + OrdersCreateTestOrderResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersCreatetestorder{..} + = go _ocQuotaUser _ocMerchantId _ocPrettyPrint + _ocUserIp + _ocKey + _ocOauthToken + _ocFields + _ocAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersCreatetestorderAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Custombatch.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Custombatch.hs new file mode 100644 index 000000000..24ecf3dc4 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Custombatch.hs @@ -0,0 +1,146 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Custombatch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves or modifies multiple orders in a single request. +-- +-- /See:/ for @ContentOrdersCustombatch@. +module Content.Orders.Custombatch + ( + -- * REST Resource + OrdersCustombatchAPI + + -- * Creating a Request + , ordersCustombatch + , OrdersCustombatch + + -- * Request Lenses + , ordQuotaUser + , ordPrettyPrint + , ordUserIp + , ordKey + , ordOauthToken + , ordFields + , ordAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersCustombatch@ which the +-- 'OrdersCustombatch' request conforms to. +type OrdersCustombatchAPI = + "orders" :> + "batch" :> Post '[JSON] OrdersCustomBatchResponse + +-- | Retrieves or modifies multiple orders in a single request. +-- +-- /See:/ 'ordersCustombatch' smart constructor. +data OrdersCustombatch = OrdersCustombatch + { _ordQuotaUser :: !(Maybe Text) + , _ordPrettyPrint :: !Bool + , _ordUserIp :: !(Maybe Text) + , _ordKey :: !(Maybe Text) + , _ordOauthToken :: !(Maybe Text) + , _ordFields :: !(Maybe Text) + , _ordAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustombatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ordQuotaUser' +-- +-- * 'ordPrettyPrint' +-- +-- * 'ordUserIp' +-- +-- * 'ordKey' +-- +-- * 'ordOauthToken' +-- +-- * 'ordFields' +-- +-- * 'ordAlt' +ordersCustombatch + :: OrdersCustombatch +ordersCustombatch = + OrdersCustombatch + { _ordQuotaUser = Nothing + , _ordPrettyPrint = True + , _ordUserIp = Nothing + , _ordKey = Nothing + , _ordOauthToken = Nothing + , _ordFields = Nothing + , _ordAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ordQuotaUser :: Lens' OrdersCustombatch' (Maybe Text) +ordQuotaUser + = lens _ordQuotaUser (\ s a -> s{_ordQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ordPrettyPrint :: Lens' OrdersCustombatch' Bool +ordPrettyPrint + = lens _ordPrettyPrint + (\ s a -> s{_ordPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ordUserIp :: Lens' OrdersCustombatch' (Maybe Text) +ordUserIp + = lens _ordUserIp (\ s a -> s{_ordUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ordKey :: Lens' OrdersCustombatch' (Maybe Text) +ordKey = lens _ordKey (\ s a -> s{_ordKey = a}) + +-- | OAuth 2.0 token for the current user. +ordOauthToken :: Lens' OrdersCustombatch' (Maybe Text) +ordOauthToken + = lens _ordOauthToken + (\ s a -> s{_ordOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ordFields :: Lens' OrdersCustombatch' (Maybe Text) +ordFields + = lens _ordFields (\ s a -> s{_ordFields = a}) + +-- | Data format for the response. +ordAlt :: Lens' OrdersCustombatch' Text +ordAlt = lens _ordAlt (\ s a -> s{_ordAlt = a}) + +instance GoogleRequest OrdersCustombatch' where + type Rs OrdersCustombatch' = + OrdersCustomBatchResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersCustombatch{..} + = go _ordQuotaUser _ordPrettyPrint _ordUserIp _ordKey + _ordOauthToken + _ordFields + _ordAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersCustombatchAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Get.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Get.hs new file mode 100644 index 000000000..1e98dd7db --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Get.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves an order from your Merchant Center account. +-- +-- /See:/ for @ContentOrdersGet@. +module Content.Orders.Get + ( + -- * REST Resource + OrdersGetAPI + + -- * Creating a Request + , ordersGet + , OrdersGet + + -- * Request Lenses + , oggQuotaUser + , oggMerchantId + , oggPrettyPrint + , oggUserIp + , oggKey + , oggOauthToken + , oggOrderId + , oggFields + , oggAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersGet@ which the +-- 'OrdersGet' request conforms to. +type OrdersGetAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> Get '[JSON] Order + +-- | Retrieves an order from your Merchant Center account. +-- +-- /See:/ 'ordersGet' smart constructor. +data OrdersGet = OrdersGet + { _oggQuotaUser :: !(Maybe Text) + , _oggMerchantId :: !Word64 + , _oggPrettyPrint :: !Bool + , _oggUserIp :: !(Maybe Text) + , _oggKey :: !(Maybe Text) + , _oggOauthToken :: !(Maybe Text) + , _oggOrderId :: !Text + , _oggFields :: !(Maybe Text) + , _oggAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oggQuotaUser' +-- +-- * 'oggMerchantId' +-- +-- * 'oggPrettyPrint' +-- +-- * 'oggUserIp' +-- +-- * 'oggKey' +-- +-- * 'oggOauthToken' +-- +-- * 'oggOrderId' +-- +-- * 'oggFields' +-- +-- * 'oggAlt' +ordersGet + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersGet +ordersGet pOggMerchantId_ pOggOrderId_ = + OrdersGet + { _oggQuotaUser = Nothing + , _oggMerchantId = pOggMerchantId_ + , _oggPrettyPrint = True + , _oggUserIp = Nothing + , _oggKey = Nothing + , _oggOauthToken = Nothing + , _oggOrderId = pOggOrderId_ + , _oggFields = Nothing + , _oggAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oggQuotaUser :: Lens' OrdersGet' (Maybe Text) +oggQuotaUser + = lens _oggQuotaUser (\ s a -> s{_oggQuotaUser = a}) + +-- | The ID of the managing account. +oggMerchantId :: Lens' OrdersGet' Word64 +oggMerchantId + = lens _oggMerchantId + (\ s a -> s{_oggMerchantId = a}) + +-- | Returns response with indentations and line breaks. +oggPrettyPrint :: Lens' OrdersGet' Bool +oggPrettyPrint + = lens _oggPrettyPrint + (\ s a -> s{_oggPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oggUserIp :: Lens' OrdersGet' (Maybe Text) +oggUserIp + = lens _oggUserIp (\ s a -> s{_oggUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oggKey :: Lens' OrdersGet' (Maybe Text) +oggKey = lens _oggKey (\ s a -> s{_oggKey = a}) + +-- | OAuth 2.0 token for the current user. +oggOauthToken :: Lens' OrdersGet' (Maybe Text) +oggOauthToken + = lens _oggOauthToken + (\ s a -> s{_oggOauthToken = a}) + +-- | The ID of the order. +oggOrderId :: Lens' OrdersGet' Text +oggOrderId + = lens _oggOrderId (\ s a -> s{_oggOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +oggFields :: Lens' OrdersGet' (Maybe Text) +oggFields + = lens _oggFields (\ s a -> s{_oggFields = a}) + +-- | Data format for the response. +oggAlt :: Lens' OrdersGet' Text +oggAlt = lens _oggAlt (\ s a -> s{_oggAlt = a}) + +instance GoogleRequest OrdersGet' where + type Rs OrdersGet' = Order + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersGet{..} + = go _oggQuotaUser _oggMerchantId _oggPrettyPrint + _oggUserIp + _oggKey + _oggOauthToken + _oggOrderId + _oggFields + _oggAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersGetAPI) r u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Getbymerchantorderid.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Getbymerchantorderid.hs new file mode 100644 index 000000000..0e79c816c --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Getbymerchantorderid.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Getbymerchantorderid +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves an order using merchant order id. +-- +-- /See:/ for @ContentOrdersGetbymerchantorderid@. +module Content.Orders.Getbymerchantorderid + ( + -- * REST Resource + OrdersGetbymerchantorderidAPI + + -- * Creating a Request + , ordersGetbymerchantorderid + , OrdersGetbymerchantorderid + + -- * Request Lenses + , ogQuotaUser + , ogMerchantId + , ogPrettyPrint + , ogUserIp + , ogMerchantOrderId + , ogKey + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersGetbymerchantorderid@ which the +-- 'OrdersGetbymerchantorderid' request conforms to. +type OrdersGetbymerchantorderidAPI = + Capture "merchantId" Word64 :> + "ordersbymerchantid" :> + Capture "merchantOrderId" Text :> + Get '[JSON] OrdersGetByMerchantOrderIdResponse + +-- | Retrieves an order using merchant order id. +-- +-- /See:/ 'ordersGetbymerchantorderid' smart constructor. +data OrdersGetbymerchantorderid = OrdersGetbymerchantorderid + { _ogQuotaUser :: !(Maybe Text) + , _ogMerchantId :: !Word64 + , _ogPrettyPrint :: !Bool + , _ogUserIp :: !(Maybe Text) + , _ogMerchantOrderId :: !Text + , _ogKey :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGetbymerchantorderid'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogMerchantId' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogUserIp' +-- +-- * 'ogMerchantOrderId' +-- +-- * 'ogKey' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +ordersGetbymerchantorderid + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'merchantOrderId' + -> OrdersGetbymerchantorderid +ordersGetbymerchantorderid pOgMerchantId_ pOgMerchantOrderId_ = + OrdersGetbymerchantorderid + { _ogQuotaUser = Nothing + , _ogMerchantId = pOgMerchantId_ + , _ogPrettyPrint = True + , _ogUserIp = Nothing + , _ogMerchantOrderId = pOgMerchantOrderId_ + , _ogKey = Nothing + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OrdersGetbymerchantorderid' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | The ID of the managing account. +ogMerchantId :: Lens' OrdersGetbymerchantorderid' Word64 +ogMerchantId + = lens _ogMerchantId (\ s a -> s{_ogMerchantId = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OrdersGetbymerchantorderid' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OrdersGetbymerchantorderid' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | The merchant order id to be looked for. +ogMerchantOrderId :: Lens' OrdersGetbymerchantorderid' Text +ogMerchantOrderId + = lens _ogMerchantOrderId + (\ s a -> s{_ogMerchantOrderId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OrdersGetbymerchantorderid' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OrdersGetbymerchantorderid' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OrdersGetbymerchantorderid' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OrdersGetbymerchantorderid' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OrdersGetbymerchantorderid' + where + type Rs OrdersGetbymerchantorderid' = + OrdersGetByMerchantOrderIdResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersGetbymerchantorderid{..} + = go _ogQuotaUser _ogMerchantId _ogPrettyPrint + _ogUserIp + _ogMerchantOrderId + _ogKey + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersGetbymerchantorderidAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Gettestordertemplate.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Gettestordertemplate.hs new file mode 100644 index 000000000..c1722063b --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Gettestordertemplate.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Gettestordertemplate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sandbox only. Retrieves an order template that can be used to quickly +-- create a new order in sandbox. +-- +-- /See:/ for @ContentOrdersGettestordertemplate@. +module Content.Orders.Gettestordertemplate + ( + -- * REST Resource + OrdersGettestordertemplateAPI + + -- * Creating a Request + , ordersGettestordertemplate + , OrdersGettestordertemplate + + -- * Request Lenses + , ooQuotaUser + , ooMerchantId + , ooPrettyPrint + , ooTemplateName + , ooUserIp + , ooKey + , ooOauthToken + , ooFields + , ooAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersGettestordertemplate@ which the +-- 'OrdersGettestordertemplate' request conforms to. +type OrdersGettestordertemplateAPI = + Capture "merchantId" Word64 :> + "testordertemplates" :> + Capture "templateName" Text :> + Get '[JSON] OrdersGetTestOrderTemplateResponse + +-- | Sandbox only. Retrieves an order template that can be used to quickly +-- create a new order in sandbox. +-- +-- /See:/ 'ordersGettestordertemplate' smart constructor. +data OrdersGettestordertemplate = OrdersGettestordertemplate + { _ooQuotaUser :: !(Maybe Text) + , _ooMerchantId :: !Word64 + , _ooPrettyPrint :: !Bool + , _ooTemplateName :: !Text + , _ooUserIp :: !(Maybe Text) + , _ooKey :: !(Maybe Text) + , _ooOauthToken :: !(Maybe Text) + , _ooFields :: !(Maybe Text) + , _ooAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGettestordertemplate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ooQuotaUser' +-- +-- * 'ooMerchantId' +-- +-- * 'ooPrettyPrint' +-- +-- * 'ooTemplateName' +-- +-- * 'ooUserIp' +-- +-- * 'ooKey' +-- +-- * 'ooOauthToken' +-- +-- * 'ooFields' +-- +-- * 'ooAlt' +ordersGettestordertemplate + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'templateName' + -> OrdersGettestordertemplate +ordersGettestordertemplate pOoMerchantId_ pOoTemplateName_ = + OrdersGettestordertemplate + { _ooQuotaUser = Nothing + , _ooMerchantId = pOoMerchantId_ + , _ooPrettyPrint = True + , _ooTemplateName = pOoTemplateName_ + , _ooUserIp = Nothing + , _ooKey = Nothing + , _ooOauthToken = Nothing + , _ooFields = Nothing + , _ooAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ooQuotaUser :: Lens' OrdersGettestordertemplate' (Maybe Text) +ooQuotaUser + = lens _ooQuotaUser (\ s a -> s{_ooQuotaUser = a}) + +-- | The ID of the managing account. +ooMerchantId :: Lens' OrdersGettestordertemplate' Word64 +ooMerchantId + = lens _ooMerchantId (\ s a -> s{_ooMerchantId = a}) + +-- | Returns response with indentations and line breaks. +ooPrettyPrint :: Lens' OrdersGettestordertemplate' Bool +ooPrettyPrint + = lens _ooPrettyPrint + (\ s a -> s{_ooPrettyPrint = a}) + +-- | The name of the template to retrieve. +ooTemplateName :: Lens' OrdersGettestordertemplate' Text +ooTemplateName + = lens _ooTemplateName + (\ s a -> s{_ooTemplateName = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ooUserIp :: Lens' OrdersGettestordertemplate' (Maybe Text) +ooUserIp = lens _ooUserIp (\ s a -> s{_ooUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ooKey :: Lens' OrdersGettestordertemplate' (Maybe Text) +ooKey = lens _ooKey (\ s a -> s{_ooKey = a}) + +-- | OAuth 2.0 token for the current user. +ooOauthToken :: Lens' OrdersGettestordertemplate' (Maybe Text) +ooOauthToken + = lens _ooOauthToken (\ s a -> s{_ooOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ooFields :: Lens' OrdersGettestordertemplate' (Maybe Text) +ooFields = lens _ooFields (\ s a -> s{_ooFields = a}) + +-- | Data format for the response. +ooAlt :: Lens' OrdersGettestordertemplate' Text +ooAlt = lens _ooAlt (\ s a -> s{_ooAlt = a}) + +instance GoogleRequest OrdersGettestordertemplate' + where + type Rs OrdersGettestordertemplate' = + OrdersGetTestOrderTemplateResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersGettestordertemplate{..} + = go _ooQuotaUser _ooMerchantId _ooPrettyPrint + _ooTemplateName + _ooUserIp + _ooKey + _ooOauthToken + _ooFields + _ooAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersGettestordertemplateAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/List.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/List.hs new file mode 100644 index 000000000..7cd4ef3cb --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/List.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the orders in your Merchant Center account. +-- +-- /See:/ for @ContentOrdersList@. +module Content.Orders.List + ( + -- * REST Resource + OrdersListAPI + + -- * Creating a Request + , ordersList + , OrdersList + + -- * Request Lenses + , olPlacedDateEnd + , olQuotaUser + , olMerchantId + , olPrettyPrint + , olOrderBy + , olUserIp + , olAcknowledged + , olKey + , olStatuses + , olPageToken + , olOauthToken + , olPlacedDateStart + , olMaxResults + , olFields + , olAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersList@ which the +-- 'OrdersList' request conforms to. +type OrdersListAPI = + Capture "merchantId" Word64 :> + "orders" :> + QueryParam "placedDateEnd" Text :> + QueryParam "orderBy" Text :> + QueryParam "acknowledged" Bool :> + QueryParams "statuses" Text :> + QueryParam "pageToken" Text :> + QueryParam "placedDateStart" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] OrdersListResponse + +-- | Lists the orders in your Merchant Center account. +-- +-- /See:/ 'ordersList' smart constructor. +data OrdersList = OrdersList + { _olPlacedDateEnd :: !(Maybe Text) + , _olQuotaUser :: !(Maybe Text) + , _olMerchantId :: !Word64 + , _olPrettyPrint :: !Bool + , _olOrderBy :: !(Maybe Text) + , _olUserIp :: !(Maybe Text) + , _olAcknowledged :: !(Maybe Bool) + , _olKey :: !(Maybe Text) + , _olStatuses :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olPlacedDateStart :: !(Maybe Text) + , _olMaxResults :: !(Maybe Word32) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olPlacedDateEnd' +-- +-- * 'olQuotaUser' +-- +-- * 'olMerchantId' +-- +-- * 'olPrettyPrint' +-- +-- * 'olOrderBy' +-- +-- * 'olUserIp' +-- +-- * 'olAcknowledged' +-- +-- * 'olKey' +-- +-- * 'olStatuses' +-- +-- * 'olPageToken' +-- +-- * 'olOauthToken' +-- +-- * 'olPlacedDateStart' +-- +-- * 'olMaxResults' +-- +-- * 'olFields' +-- +-- * 'olAlt' +ordersList + :: Word64 -- ^ 'merchantId' + -> OrdersList +ordersList pOlMerchantId_ = + OrdersList + { _olPlacedDateEnd = Nothing + , _olQuotaUser = Nothing + , _olMerchantId = pOlMerchantId_ + , _olPrettyPrint = True + , _olOrderBy = Nothing + , _olUserIp = Nothing + , _olAcknowledged = Nothing + , _olKey = Nothing + , _olStatuses = Nothing + , _olPageToken = Nothing + , _olOauthToken = Nothing + , _olPlacedDateStart = Nothing + , _olMaxResults = Nothing + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Obtains orders placed before this date (exclusively), in ISO 8601 +-- format. +olPlacedDateEnd :: Lens' OrdersList' (Maybe Text) +olPlacedDateEnd + = lens _olPlacedDateEnd + (\ s a -> s{_olPlacedDateEnd = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OrdersList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | The ID of the managing account. +olMerchantId :: Lens' OrdersList' Word64 +olMerchantId + = lens _olMerchantId (\ s a -> s{_olMerchantId = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OrdersList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | The ordering of the returned list. The only supported value are +-- placedDate desc and placedDate asc for now, which returns orders sorted +-- by placement date. \"placedDate desc\" stands for listing orders by +-- placement date, from oldest to most recent. \"placedDate asc\" stands +-- for listing orders by placement date, from most recent to oldest. In +-- future releases we\'ll support other sorting criteria. +olOrderBy :: Lens' OrdersList' (Maybe Text) +olOrderBy + = lens _olOrderBy (\ s a -> s{_olOrderBy = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OrdersList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | Obtains orders that match the acknowledgement status. When set to true, +-- obtains orders that have been acknowledged. When false, obtains orders +-- that have not been acknowledged. We recommend using this filter set to +-- false, in conjunction with the acknowledge call, such that only +-- un-acknowledged orders are returned. +olAcknowledged :: Lens' OrdersList' (Maybe Bool) +olAcknowledged + = lens _olAcknowledged + (\ s a -> s{_olAcknowledged = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OrdersList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | Obtains orders that match any of the specified statuses. Multiple values +-- can be specified with comma separation. Additionally, please note that +-- active is a shortcut for pendingShipment and partiallyShipped, and +-- completed is a shortcut for shipped , partiallyDelivered, delivered, +-- partiallyReturned, returned, and canceled. +olStatuses :: Lens' OrdersList' (Maybe Text) +olStatuses + = lens _olStatuses (\ s a -> s{_olStatuses = a}) + +-- | The token returned by the previous request. +olPageToken :: Lens' OrdersList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OrdersList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Obtains orders placed after this date (inclusively), in ISO 8601 format. +olPlacedDateStart :: Lens' OrdersList' (Maybe Text) +olPlacedDateStart + = lens _olPlacedDateStart + (\ s a -> s{_olPlacedDateStart = a}) + +-- | The maximum number of orders to return in the response, used for paging. +-- The default value is 25 orders per page, and the maximum allowed value +-- is 250 orders per page. Known issue: All List calls will return all +-- Orders without limit regardless of the value of this field. +olMaxResults :: Lens' OrdersList' (Maybe Word32) +olMaxResults + = lens _olMaxResults (\ s a -> s{_olMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OrdersList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OrdersList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest OrdersList' where + type Rs OrdersList' = OrdersListResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersList{..} + = go _olPlacedDateEnd _olQuotaUser _olMerchantId + _olPrettyPrint + _olOrderBy + _olUserIp + _olAcknowledged + _olKey + _olStatuses + _olPageToken + _olOauthToken + _olPlacedDateStart + _olMaxResults + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersListAPI) r u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Refund.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Refund.hs new file mode 100644 index 000000000..f7b377341 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Refund.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Refund +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Refund a portion of the order, up to the full amount paid. +-- +-- /See:/ for @ContentOrdersRefund@. +module Content.Orders.Refund + ( + -- * REST Resource + OrdersRefundAPI + + -- * Creating a Request + , ordersRefund + , OrdersRefund + + -- * Request Lenses + , orQuotaUser + , orMerchantId + , orPrettyPrint + , orUserIp + , orKey + , orOauthToken + , orOrderId + , orFields + , orAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersRefund@ which the +-- 'OrdersRefund' request conforms to. +type OrdersRefundAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "refund" :> Post '[JSON] OrdersRefundResponse + +-- | Refund a portion of the order, up to the full amount paid. +-- +-- /See:/ 'ordersRefund' smart constructor. +data OrdersRefund = OrdersRefund + { _orQuotaUser :: !(Maybe Text) + , _orMerchantId :: !Word64 + , _orPrettyPrint :: !Bool + , _orUserIp :: !(Maybe Text) + , _orKey :: !(Maybe Text) + , _orOauthToken :: !(Maybe Text) + , _orOrderId :: !Text + , _orFields :: !(Maybe Text) + , _orAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersRefund'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orQuotaUser' +-- +-- * 'orMerchantId' +-- +-- * 'orPrettyPrint' +-- +-- * 'orUserIp' +-- +-- * 'orKey' +-- +-- * 'orOauthToken' +-- +-- * 'orOrderId' +-- +-- * 'orFields' +-- +-- * 'orAlt' +ordersRefund + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersRefund +ordersRefund pOrMerchantId_ pOrOrderId_ = + OrdersRefund + { _orQuotaUser = Nothing + , _orMerchantId = pOrMerchantId_ + , _orPrettyPrint = True + , _orUserIp = Nothing + , _orKey = Nothing + , _orOauthToken = Nothing + , _orOrderId = pOrOrderId_ + , _orFields = Nothing + , _orAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +orQuotaUser :: Lens' OrdersRefund' (Maybe Text) +orQuotaUser + = lens _orQuotaUser (\ s a -> s{_orQuotaUser = a}) + +-- | The ID of the managing account. +orMerchantId :: Lens' OrdersRefund' Word64 +orMerchantId + = lens _orMerchantId (\ s a -> s{_orMerchantId = a}) + +-- | Returns response with indentations and line breaks. +orPrettyPrint :: Lens' OrdersRefund' Bool +orPrettyPrint + = lens _orPrettyPrint + (\ s a -> s{_orPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +orUserIp :: Lens' OrdersRefund' (Maybe Text) +orUserIp = lens _orUserIp (\ s a -> s{_orUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +orKey :: Lens' OrdersRefund' (Maybe Text) +orKey = lens _orKey (\ s a -> s{_orKey = a}) + +-- | OAuth 2.0 token for the current user. +orOauthToken :: Lens' OrdersRefund' (Maybe Text) +orOauthToken + = lens _orOauthToken (\ s a -> s{_orOauthToken = a}) + +-- | The ID of the order to refund. +orOrderId :: Lens' OrdersRefund' Text +orOrderId + = lens _orOrderId (\ s a -> s{_orOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +orFields :: Lens' OrdersRefund' (Maybe Text) +orFields = lens _orFields (\ s a -> s{_orFields = a}) + +-- | Data format for the response. +orAlt :: Lens' OrdersRefund' Text +orAlt = lens _orAlt (\ s a -> s{_orAlt = a}) + +instance GoogleRequest OrdersRefund' where + type Rs OrdersRefund' = OrdersRefundResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersRefund{..} + = go _orQuotaUser _orMerchantId _orPrettyPrint + _orUserIp + _orKey + _orOauthToken + _orOrderId + _orFields + _orAlt + where go + = clientWithRoute (Proxy :: Proxy OrdersRefundAPI) r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Returnlineitem.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Returnlineitem.hs new file mode 100644 index 000000000..3b8de327d --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Returnlineitem.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Returnlineitem +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a line item. +-- +-- /See:/ for @ContentOrdersReturnlineitem@. +module Content.Orders.Returnlineitem + ( + -- * REST Resource + OrdersReturnlineitemAPI + + -- * Creating a Request + , ordersReturnlineitem + , OrdersReturnlineitem + + -- * Request Lenses + , orrQuotaUser + , orrMerchantId + , orrPrettyPrint + , orrUserIp + , orrKey + , orrOauthToken + , orrOrderId + , orrFields + , orrAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersReturnlineitem@ which the +-- 'OrdersReturnlineitem' request conforms to. +type OrdersReturnlineitemAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "returnLineItem" :> + Post '[JSON] OrdersReturnLineItemResponse + +-- | Returns a line item. +-- +-- /See:/ 'ordersReturnlineitem' smart constructor. +data OrdersReturnlineitem = OrdersReturnlineitem + { _orrQuotaUser :: !(Maybe Text) + , _orrMerchantId :: !Word64 + , _orrPrettyPrint :: !Bool + , _orrUserIp :: !(Maybe Text) + , _orrKey :: !(Maybe Text) + , _orrOauthToken :: !(Maybe Text) + , _orrOrderId :: !Text + , _orrFields :: !(Maybe Text) + , _orrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersReturnlineitem'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orrQuotaUser' +-- +-- * 'orrMerchantId' +-- +-- * 'orrPrettyPrint' +-- +-- * 'orrUserIp' +-- +-- * 'orrKey' +-- +-- * 'orrOauthToken' +-- +-- * 'orrOrderId' +-- +-- * 'orrFields' +-- +-- * 'orrAlt' +ordersReturnlineitem + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersReturnlineitem +ordersReturnlineitem pOrrMerchantId_ pOrrOrderId_ = + OrdersReturnlineitem + { _orrQuotaUser = Nothing + , _orrMerchantId = pOrrMerchantId_ + , _orrPrettyPrint = True + , _orrUserIp = Nothing + , _orrKey = Nothing + , _orrOauthToken = Nothing + , _orrOrderId = pOrrOrderId_ + , _orrFields = Nothing + , _orrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +orrQuotaUser :: Lens' OrdersReturnlineitem' (Maybe Text) +orrQuotaUser + = lens _orrQuotaUser (\ s a -> s{_orrQuotaUser = a}) + +-- | The ID of the managing account. +orrMerchantId :: Lens' OrdersReturnlineitem' Word64 +orrMerchantId + = lens _orrMerchantId + (\ s a -> s{_orrMerchantId = a}) + +-- | Returns response with indentations and line breaks. +orrPrettyPrint :: Lens' OrdersReturnlineitem' Bool +orrPrettyPrint + = lens _orrPrettyPrint + (\ s a -> s{_orrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +orrUserIp :: Lens' OrdersReturnlineitem' (Maybe Text) +orrUserIp + = lens _orrUserIp (\ s a -> s{_orrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +orrKey :: Lens' OrdersReturnlineitem' (Maybe Text) +orrKey = lens _orrKey (\ s a -> s{_orrKey = a}) + +-- | OAuth 2.0 token for the current user. +orrOauthToken :: Lens' OrdersReturnlineitem' (Maybe Text) +orrOauthToken + = lens _orrOauthToken + (\ s a -> s{_orrOauthToken = a}) + +-- | The ID of the order. +orrOrderId :: Lens' OrdersReturnlineitem' Text +orrOrderId + = lens _orrOrderId (\ s a -> s{_orrOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +orrFields :: Lens' OrdersReturnlineitem' (Maybe Text) +orrFields + = lens _orrFields (\ s a -> s{_orrFields = a}) + +-- | Data format for the response. +orrAlt :: Lens' OrdersReturnlineitem' Text +orrAlt = lens _orrAlt (\ s a -> s{_orrAlt = a}) + +instance GoogleRequest OrdersReturnlineitem' where + type Rs OrdersReturnlineitem' = + OrdersReturnLineItemResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersReturnlineitem{..} + = go _orrQuotaUser _orrMerchantId _orrPrettyPrint + _orrUserIp + _orrKey + _orrOauthToken + _orrOrderId + _orrFields + _orrAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersReturnlineitemAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Shiplineitems.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Shiplineitems.hs new file mode 100644 index 000000000..2952cc4bb --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Shiplineitems.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Shiplineitems +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks line item(s) as shipped. +-- +-- /See:/ for @ContentOrdersShiplineitems@. +module Content.Orders.Shiplineitems + ( + -- * REST Resource + OrdersShiplineitemsAPI + + -- * Creating a Request + , ordersShiplineitems + , OrdersShiplineitems + + -- * Request Lenses + , osQuotaUser + , osMerchantId + , osPrettyPrint + , osUserIp + , osKey + , osOauthToken + , osOrderId + , osFields + , osAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersShiplineitems@ which the +-- 'OrdersShiplineitems' request conforms to. +type OrdersShiplineitemsAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "shipLineItems" :> + Post '[JSON] OrdersShipLineItemsResponse + +-- | Marks line item(s) as shipped. +-- +-- /See:/ 'ordersShiplineitems' smart constructor. +data OrdersShiplineitems = OrdersShiplineitems + { _osQuotaUser :: !(Maybe Text) + , _osMerchantId :: !Word64 + , _osPrettyPrint :: !Bool + , _osUserIp :: !(Maybe Text) + , _osKey :: !(Maybe Text) + , _osOauthToken :: !(Maybe Text) + , _osOrderId :: !Text + , _osFields :: !(Maybe Text) + , _osAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersShiplineitems'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osQuotaUser' +-- +-- * 'osMerchantId' +-- +-- * 'osPrettyPrint' +-- +-- * 'osUserIp' +-- +-- * 'osKey' +-- +-- * 'osOauthToken' +-- +-- * 'osOrderId' +-- +-- * 'osFields' +-- +-- * 'osAlt' +ordersShiplineitems + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersShiplineitems +ordersShiplineitems pOsMerchantId_ pOsOrderId_ = + OrdersShiplineitems + { _osQuotaUser = Nothing + , _osMerchantId = pOsMerchantId_ + , _osPrettyPrint = True + , _osUserIp = Nothing + , _osKey = Nothing + , _osOauthToken = Nothing + , _osOrderId = pOsOrderId_ + , _osFields = Nothing + , _osAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +osQuotaUser :: Lens' OrdersShiplineitems' (Maybe Text) +osQuotaUser + = lens _osQuotaUser (\ s a -> s{_osQuotaUser = a}) + +-- | The ID of the managing account. +osMerchantId :: Lens' OrdersShiplineitems' Word64 +osMerchantId + = lens _osMerchantId (\ s a -> s{_osMerchantId = a}) + +-- | Returns response with indentations and line breaks. +osPrettyPrint :: Lens' OrdersShiplineitems' Bool +osPrettyPrint + = lens _osPrettyPrint + (\ s a -> s{_osPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +osUserIp :: Lens' OrdersShiplineitems' (Maybe Text) +osUserIp = lens _osUserIp (\ s a -> s{_osUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +osKey :: Lens' OrdersShiplineitems' (Maybe Text) +osKey = lens _osKey (\ s a -> s{_osKey = a}) + +-- | OAuth 2.0 token for the current user. +osOauthToken :: Lens' OrdersShiplineitems' (Maybe Text) +osOauthToken + = lens _osOauthToken (\ s a -> s{_osOauthToken = a}) + +-- | The ID of the order. +osOrderId :: Lens' OrdersShiplineitems' Text +osOrderId + = lens _osOrderId (\ s a -> s{_osOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +osFields :: Lens' OrdersShiplineitems' (Maybe Text) +osFields = lens _osFields (\ s a -> s{_osFields = a}) + +-- | Data format for the response. +osAlt :: Lens' OrdersShiplineitems' Text +osAlt = lens _osAlt (\ s a -> s{_osAlt = a}) + +instance GoogleRequest OrdersShiplineitems' where + type Rs OrdersShiplineitems' = + OrdersShipLineItemsResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersShiplineitems{..} + = go _osQuotaUser _osMerchantId _osPrettyPrint + _osUserIp + _osKey + _osOauthToken + _osOrderId + _osFields + _osAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersShiplineitemsAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updatemerchantorderid.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updatemerchantorderid.hs new file mode 100644 index 000000000..42eaa3583 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updatemerchantorderid.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Updatemerchantorderid +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates the merchant order ID for a given order. +-- +-- /See:/ for @ContentOrdersUpdatemerchantorderid@. +module Content.Orders.Updatemerchantorderid + ( + -- * REST Resource + OrdersUpdatemerchantorderidAPI + + -- * Creating a Request + , ordersUpdatemerchantorderid + , OrdersUpdatemerchantorderid + + -- * Request Lenses + , ouQuotaUser + , ouMerchantId + , ouPrettyPrint + , ouUserIp + , ouKey + , ouOauthToken + , ouOrderId + , ouFields + , ouAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersUpdatemerchantorderid@ which the +-- 'OrdersUpdatemerchantorderid' request conforms to. +type OrdersUpdatemerchantorderidAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "updateMerchantOrderId" :> + Post '[JSON] OrdersUpdateMerchantOrderIdResponse + +-- | Updates the merchant order ID for a given order. +-- +-- /See:/ 'ordersUpdatemerchantorderid' smart constructor. +data OrdersUpdatemerchantorderid = OrdersUpdatemerchantorderid + { _ouQuotaUser :: !(Maybe Text) + , _ouMerchantId :: !Word64 + , _ouPrettyPrint :: !Bool + , _ouUserIp :: !(Maybe Text) + , _ouKey :: !(Maybe Text) + , _ouOauthToken :: !(Maybe Text) + , _ouOrderId :: !Text + , _ouFields :: !(Maybe Text) + , _ouAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdatemerchantorderid'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ouQuotaUser' +-- +-- * 'ouMerchantId' +-- +-- * 'ouPrettyPrint' +-- +-- * 'ouUserIp' +-- +-- * 'ouKey' +-- +-- * 'ouOauthToken' +-- +-- * 'ouOrderId' +-- +-- * 'ouFields' +-- +-- * 'ouAlt' +ordersUpdatemerchantorderid + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersUpdatemerchantorderid +ordersUpdatemerchantorderid pOuMerchantId_ pOuOrderId_ = + OrdersUpdatemerchantorderid + { _ouQuotaUser = Nothing + , _ouMerchantId = pOuMerchantId_ + , _ouPrettyPrint = True + , _ouUserIp = Nothing + , _ouKey = Nothing + , _ouOauthToken = Nothing + , _ouOrderId = pOuOrderId_ + , _ouFields = Nothing + , _ouAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ouQuotaUser :: Lens' OrdersUpdatemerchantorderid' (Maybe Text) +ouQuotaUser + = lens _ouQuotaUser (\ s a -> s{_ouQuotaUser = a}) + +-- | The ID of the managing account. +ouMerchantId :: Lens' OrdersUpdatemerchantorderid' Word64 +ouMerchantId + = lens _ouMerchantId (\ s a -> s{_ouMerchantId = a}) + +-- | Returns response with indentations and line breaks. +ouPrettyPrint :: Lens' OrdersUpdatemerchantorderid' Bool +ouPrettyPrint + = lens _ouPrettyPrint + (\ s a -> s{_ouPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ouUserIp :: Lens' OrdersUpdatemerchantorderid' (Maybe Text) +ouUserIp = lens _ouUserIp (\ s a -> s{_ouUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ouKey :: Lens' OrdersUpdatemerchantorderid' (Maybe Text) +ouKey = lens _ouKey (\ s a -> s{_ouKey = a}) + +-- | OAuth 2.0 token for the current user. +ouOauthToken :: Lens' OrdersUpdatemerchantorderid' (Maybe Text) +ouOauthToken + = lens _ouOauthToken (\ s a -> s{_ouOauthToken = a}) + +-- | The ID of the order. +ouOrderId :: Lens' OrdersUpdatemerchantorderid' Text +ouOrderId + = lens _ouOrderId (\ s a -> s{_ouOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +ouFields :: Lens' OrdersUpdatemerchantorderid' (Maybe Text) +ouFields = lens _ouFields (\ s a -> s{_ouFields = a}) + +-- | Data format for the response. +ouAlt :: Lens' OrdersUpdatemerchantorderid' Text +ouAlt = lens _ouAlt (\ s a -> s{_ouAlt = a}) + +instance GoogleRequest OrdersUpdatemerchantorderid' + where + type Rs OrdersUpdatemerchantorderid' = + OrdersUpdateMerchantOrderIdResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersUpdatemerchantorderid{..} + = go _ouQuotaUser _ouMerchantId _ouPrettyPrint + _ouUserIp + _ouKey + _ouOauthToken + _ouOrderId + _ouFields + _ouAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersUpdatemerchantorderidAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updateshipment.hs b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updateshipment.hs new file mode 100644 index 000000000..8fbb4ea16 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Updateshipment.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Content.Orders.Updateshipment +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a shipment\'s status, carrier, and\/or tracking ID. +-- +-- /See:/ for @ContentOrdersUpdateshipment@. +module Content.Orders.Updateshipment + ( + -- * REST Resource + OrdersUpdateshipmentAPI + + -- * Creating a Request + , ordersUpdateshipment + , OrdersUpdateshipment + + -- * Request Lenses + , ouuQuotaUser + , ouuMerchantId + , ouuPrettyPrint + , ouuUserIp + , ouuKey + , ouuOauthToken + , ouuOrderId + , ouuFields + , ouuAlt + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types + +-- | A resource alias for @ContentOrdersUpdateshipment@ which the +-- 'OrdersUpdateshipment' request conforms to. +type OrdersUpdateshipmentAPI = + Capture "merchantId" Word64 :> + "orders" :> + Capture "orderId" Text :> + "updateShipment" :> + Post '[JSON] OrdersUpdateShipmentResponse + +-- | Updates a shipment\'s status, carrier, and\/or tracking ID. +-- +-- /See:/ 'ordersUpdateshipment' smart constructor. +data OrdersUpdateshipment = OrdersUpdateshipment + { _ouuQuotaUser :: !(Maybe Text) + , _ouuMerchantId :: !Word64 + , _ouuPrettyPrint :: !Bool + , _ouuUserIp :: !(Maybe Text) + , _ouuKey :: !(Maybe Text) + , _ouuOauthToken :: !(Maybe Text) + , _ouuOrderId :: !Text + , _ouuFields :: !(Maybe Text) + , _ouuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdateshipment'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ouuQuotaUser' +-- +-- * 'ouuMerchantId' +-- +-- * 'ouuPrettyPrint' +-- +-- * 'ouuUserIp' +-- +-- * 'ouuKey' +-- +-- * 'ouuOauthToken' +-- +-- * 'ouuOrderId' +-- +-- * 'ouuFields' +-- +-- * 'ouuAlt' +ordersUpdateshipment + :: Word64 -- ^ 'merchantId' + -> Text -- ^ 'orderId' + -> OrdersUpdateshipment +ordersUpdateshipment pOuuMerchantId_ pOuuOrderId_ = + OrdersUpdateshipment + { _ouuQuotaUser = Nothing + , _ouuMerchantId = pOuuMerchantId_ + , _ouuPrettyPrint = True + , _ouuUserIp = Nothing + , _ouuKey = Nothing + , _ouuOauthToken = Nothing + , _ouuOrderId = pOuuOrderId_ + , _ouuFields = Nothing + , _ouuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ouuQuotaUser :: Lens' OrdersUpdateshipment' (Maybe Text) +ouuQuotaUser + = lens _ouuQuotaUser (\ s a -> s{_ouuQuotaUser = a}) + +-- | The ID of the managing account. +ouuMerchantId :: Lens' OrdersUpdateshipment' Word64 +ouuMerchantId + = lens _ouuMerchantId + (\ s a -> s{_ouuMerchantId = a}) + +-- | Returns response with indentations and line breaks. +ouuPrettyPrint :: Lens' OrdersUpdateshipment' Bool +ouuPrettyPrint + = lens _ouuPrettyPrint + (\ s a -> s{_ouuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ouuUserIp :: Lens' OrdersUpdateshipment' (Maybe Text) +ouuUserIp + = lens _ouuUserIp (\ s a -> s{_ouuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ouuKey :: Lens' OrdersUpdateshipment' (Maybe Text) +ouuKey = lens _ouuKey (\ s a -> s{_ouuKey = a}) + +-- | OAuth 2.0 token for the current user. +ouuOauthToken :: Lens' OrdersUpdateshipment' (Maybe Text) +ouuOauthToken + = lens _ouuOauthToken + (\ s a -> s{_ouuOauthToken = a}) + +-- | The ID of the order. +ouuOrderId :: Lens' OrdersUpdateshipment' Text +ouuOrderId + = lens _ouuOrderId (\ s a -> s{_ouuOrderId = a}) + +-- | Selector specifying which fields to include in a partial response. +ouuFields :: Lens' OrdersUpdateshipment' (Maybe Text) +ouuFields + = lens _ouuFields (\ s a -> s{_ouuFields = a}) + +-- | Data format for the response. +ouuAlt :: Lens' OrdersUpdateshipment' Text +ouuAlt = lens _ouuAlt (\ s a -> s{_ouuAlt = a}) + +instance GoogleRequest OrdersUpdateshipment' where + type Rs OrdersUpdateshipment' = + OrdersUpdateShipmentResponse + request = requestWithRoute defReq shoppingContentURL + requestWithRoute r u OrdersUpdateshipment{..} + = go _ouuQuotaUser _ouuMerchantId _ouuPrettyPrint + _ouuUserIp + _ouuKey + _ouuOauthToken + _ouuOrderId + _ouuFields + _ouuAlt + where go + = clientWithRoute + (Proxy :: Proxy OrdersUpdateshipmentAPI) + r + u diff --git a/gogol-shopping-content/gen/Network/Google/ShoppingContent.hs b/gogol-shopping-content/gen/Network/Google/ShoppingContent.hs new file mode 100644 index 000000000..fa003a2e6 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/ShoppingContent.hs @@ -0,0 +1,570 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.ShoppingContent +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Manage product items, inventory, and Merchant Center accounts for Google +-- Shopping. +-- +-- /See:/ +module Network.Google.ShoppingContent + ( + -- * API + ShoppingContentAPI + , shoppingContentAPI + , shoppingContentURL + + -- * Service Methods + + -- * REST Resources + + -- ** ContentOrdersAcknowledge + , module Content.Orders.Acknowledge + + -- ** ContentOrdersAdvancetestorder + , module Content.Orders.Advancetestorder + + -- ** ContentOrdersCancel + , module Content.Orders.Cancel + + -- ** ContentOrdersCancellineitem + , module Content.Orders.Cancellineitem + + -- ** ContentOrdersCreatetestorder + , module Content.Orders.Createtestorder + + -- ** ContentOrdersCustombatch + , module Content.Orders.Custombatch + + -- ** ContentOrdersGet + , module Content.Orders.Get + + -- ** ContentOrdersGetbymerchantorderid + , module Content.Orders.Getbymerchantorderid + + -- ** ContentOrdersGettestordertemplate + , module Content.Orders.Gettestordertemplate + + -- ** ContentOrdersList + , module Content.Orders.List + + -- ** ContentOrdersRefund + , module Content.Orders.Refund + + -- ** ContentOrdersReturnlineitem + , module Content.Orders.Returnlineitem + + -- ** ContentOrdersShiplineitems + , module Content.Orders.Shiplineitems + + -- ** ContentOrdersUpdatemerchantorderid + , module Content.Orders.Updatemerchantorderid + + -- ** ContentOrdersUpdateshipment + , module Content.Orders.Updateshipment + + -- * Types + + -- ** TestOrderCustomer + , TestOrderCustomer + , testOrderCustomer + , tocFullName + , tocEmail + , tocExplicitMarketingPreference + + -- ** OrdersUpdateMerchantOrderIdRequest + , OrdersUpdateMerchantOrderIdRequest + , ordersUpdateMerchantOrderIdRequest + , oumoirMerchantOrderId + , oumoirOperationId + + -- ** OrdersAdvanceTestOrderResponse + , OrdersAdvanceTestOrderResponse + , ordersAdvanceTestOrderResponse + , oatorKind + + -- ** OrdersAcknowledgeRequest + , OrdersAcknowledgeRequest + , ordersAcknowledgeRequest + , oarOperationId + + -- ** OrderReturn + , OrderReturn + , orderReturn + , orQuantity + , orActor + , orReason + , orCreationDate + , orReasonText + + -- ** OrdersCustomBatchRequestEntry + , OrdersCustomBatchRequestEntry + , ordersCustomBatchRequestEntry + , ocbreMerchantId + , ocbreCancelLineItem + , ocbreRefund + , ocbreUpdateShipment + , ocbreReturnLineItem + , ocbreMerchantOrderId + , ocbreMethod + , ocbreShipLineItems + , ocbreOperationId + , ocbreOrderId + , ocbreCancel + , ocbreBatchId + + -- ** OrderLineItemShippingDetailsMethod + , OrderLineItemShippingDetailsMethod + , orderLineItemShippingDetailsMethod + , olisdmCarrier + , olisdmMethodName + , olisdmMaxDaysInTransit + , olisdmMinDaysInTransit + + -- ** OrdersCreateTestOrderResponse + , OrdersCreateTestOrderResponse + , ordersCreateTestOrderResponse + , octorKind + , octorOrderId + + -- ** OrdersRefundRequest + , OrdersRefundRequest + , ordersRefundRequest + , orrAmount + , orrReason + , orrOperationId + , orrReasonText + + -- ** OrdersCustomBatchRequestEntryCancelLineItem + , OrdersCustomBatchRequestEntryCancelLineItem + , ordersCustomBatchRequestEntryCancelLineItem + , ocbrecliQuantity + , ocbrecliLineItemId + , ocbrecliReason + , ocbrecliReasonText + + -- ** OrdersUpdateShipmentRequest + , OrdersUpdateShipmentRequest + , ordersUpdateShipmentRequest + , ousrCarrier + , ousrStatus + , ousrTrackingId + , ousrShipmentId + , ousrOperationId + + -- ** TestOrderPaymentMethod + , TestOrderPaymentMethod + , testOrderPaymentMethod + , topmExpirationMonth + , topmExpirationYear + , topmLastFourDigits + , topmType + , topmPredefinedBillingAddress + + -- ** OrdersReturnLineItemRequest + , OrdersReturnLineItemRequest + , ordersReturnLineItemRequest + , orlirQuantity + , orlirLineItemId + , orlirReason + , orlirOperationId + , orlirReasonText + + -- ** OrdersCustomBatchRequestEntryShipLineItems + , OrdersCustomBatchRequestEntryShipLineItems + , ordersCustomBatchRequestEntryShipLineItems + , ocbresliCarrier + , ocbresliTrackingId + , ocbresliShipmentId + , ocbresliLineItems + + -- ** OrderLineItem + , OrderLineItem + , orderLineItem + , oliQuantityOrdered + , oliReturnInfo + , oliQuantityDelivered + , oliShippingDetails + , oliQuantityPending + , oliCancellations + , oliQuantityCanceled + , oliId + , oliTax + , oliPrice + , oliQuantityShipped + , oliQuantityReturned + , oliProduct + , oliReturns + + -- ** OrderShipmentLineItemShipment + , OrderShipmentLineItemShipment + , orderShipmentLineItemShipment + , oslisQuantity + , oslisLineItemId + + -- ** OrdersRefundResponse + , OrdersRefundResponse + , ordersRefundResponse + , orrKind + , orrExecutionStatus + + -- ** OrdersCreateTestOrderRequest + , OrdersCreateTestOrderRequest + , ordersCreateTestOrderRequest + , octorTemplateName + , octorTestOrder + + -- ** OrdersGetTestOrderTemplateResponse + , OrdersGetTestOrderTemplateResponse + , ordersGetTestOrderTemplateResponse + , ogtotrKind + , ogtotrTemplate + + -- ** Error + , Error + , error' + , eDomain + , eReason + , eMessage + + -- ** OrdersCustomBatchRequest + , OrdersCustomBatchRequest + , ordersCustomBatchRequest + , ocbrEntries + + -- ** OrdersShipLineItemsRequest + , OrdersShipLineItemsRequest + , ordersShipLineItemsRequest + , oslirCarrier + , oslirTrackingId + , oslirShipmentId + , oslirLineItems + , oslirOperationId + + -- ** OrderShipment + , OrderShipment + , orderShipment + , osCarrier + , osStatus + , osTrackingId + , osLineItems + , osId + , osCreationDate + , osDeliveryDate + + -- ** OrderLineItemReturnInfo + , OrderLineItemReturnInfo + , orderLineItemReturnInfo + , oliriIsReturnable + , oliriPolicyUrl + , oliriDaysToReturn + + -- ** OrdersCancelLineItemRequest + , OrdersCancelLineItemRequest + , ordersCancelLineItemRequest + , oclirQuantity + , oclirLineItemId + , oclirReason + , oclirOperationId + , oclirReasonText + + -- ** OrdersCustomBatchRequestEntryCancel + , OrdersCustomBatchRequestEntryCancel + , ordersCustomBatchRequestEntryCancel + , ocbrecReason + , ocbrecReasonText + + -- ** OrdersShipLineItemsResponse + , OrdersShipLineItemsResponse + , ordersShipLineItemsResponse + , oslirKind + , oslirExecutionStatus + + -- ** OrdersListResponse + , OrdersListResponse + , ordersListResponse + , olrNextPageToken + , olrKind + , olrResources + + -- ** OrdersReturnLineItemResponse + , OrdersReturnLineItemResponse + , ordersReturnLineItemResponse + , orlirKind + , orlirExecutionStatus + + -- ** OrdersUpdateShipmentResponse + , OrdersUpdateShipmentResponse + , ordersUpdateShipmentResponse + , ousrKind + , ousrExecutionStatus + + -- ** OrdersCancelRequest + , OrdersCancelRequest + , ordersCancelRequest + , ocrReason + , ocrOperationId + , ocrReasonText + + -- ** OrderCustomer + , OrderCustomer + , orderCustomer + , ocFullName + , ocEmail + , ocExplicitMarketingPreference + + -- ** OrdersGetByMerchantOrderIdResponse + , OrdersGetByMerchantOrderIdResponse + , ordersGetByMerchantOrderIdResponse + , ogbmoirKind + , ogbmoirOrder + + -- ** OrderLineItemShippingDetails + , OrderLineItemShippingDetails + , orderLineItemShippingDetails + , olisdShipByDate + , olisdMethod + , olisdDeliverByDate + + -- ** Price + , Price + , price + , pValue + , pCurrency + + -- ** OrderLineItemProductVariantAttribute + , OrderLineItemProductVariantAttribute + , orderLineItemProductVariantAttribute + , olipvaDimension + , olipvaValue + + -- ** OrdersCustomBatchResponseEntry + , OrdersCustomBatchResponseEntry + , ordersCustomBatchResponseEntry + , oKind + , oExecutionStatus + , oErrors + , oOrder + , oBatchId + + -- ** TestOrderLineItemProduct + , TestOrderLineItemProduct + , testOrderLineItemProduct + , tolipImageLink + , tolipChannel + , tolipBrand + , tolipTargetCountry + , tolipGtin + , tolipItemGroupId + , tolipOfferId + , tolipPrice + , tolipVariantAttributes + , tolipTitle + , tolipContentLanguage + , tolipMpn + , tolipCondition + + -- ** TestOrder + , TestOrder + , testOrder + , toKind + , toLineItems + , toShippingOption + , toPredefinedDeliveryAddress + , toShippingCostTax + , toCustomer + , toPaymentMethod + , toShippingCost + + -- ** OrderRefund + , OrderRefund + , orderRefund + , oAmount + , oActor + , oReason + , oCreationDate + , oReasonText + + -- ** OrderDeliveryDetails + , OrderDeliveryDetails + , orderDeliveryDetails + , oddAddress + , oddPhoneNumber + + -- ** OrderAddress + , OrderAddress + , orderAddress + , oaRecipientName + , oaStreetAddress + , oaCountry + , oaPostalCode + , oaLocality + , oaIsPostOfficeBox + , oaFullAddress + , oaRegion + + -- ** OrdersCancelResponse + , OrdersCancelResponse + , ordersCancelResponse + , ocrKind + , ocrExecutionStatus + + -- ** TestOrderLineItem + , TestOrderLineItem + , testOrderLineItem + , toliQuantityOrdered + , toliReturnInfo + , toliShippingDetails + , toliProduct + , toliUnitTax + + -- ** OrderPaymentMethod + , OrderPaymentMethod + , orderPaymentMethod + , opmExpirationMonth + , opmExpirationYear + , opmPhoneNumber + , opmBillingAddress + , opmLastFourDigits + , opmType + + -- ** Errors + , Errors + , errors + , errCode + , errMessage + , errErrors + + -- ** OrdersCancelLineItemResponse + , OrdersCancelLineItemResponse + , ordersCancelLineItemResponse + , oclirKind + , oclirExecutionStatus + + -- ** OrdersCustomBatchRequestEntryUpdateShipment + , OrdersCustomBatchRequestEntryUpdateShipment + , ordersCustomBatchRequestEntryUpdateShipment + , ocbreusCarrier + , ocbreusStatus + , ocbreusTrackingId + , ocbreusShipmentId + + -- ** OrderLineItemProduct + , OrderLineItemProduct + , orderLineItemProduct + , olipImageLink + , olipShownImage + , olipChannel + , olipBrand + , olipTargetCountry + , olipGtin + , olipItemGroupId + , olipOfferId + , olipId + , olipPrice + , olipVariantAttributes + , olipTitle + , olipContentLanguage + , olipMpn + , olipCondition + + -- ** OrdersAcknowledgeResponse + , OrdersAcknowledgeResponse + , ordersAcknowledgeResponse + , oarKind + , oarExecutionStatus + + -- ** Order + , Order + , order + , ordStatus + , ordMerchantId + , ordRefunds + , ordKind + , ordLineItems + , ordShipments + , ordNetAmount + , ordPlacedDate + , ordDeliveryDetails + , ordShippingOption + , ordMerchantOrderId + , ordAcknowledged + , ordShippingCostTax + , ordCustomer + , ordId + , ordPaymentMethod + , ordPaymentStatus + , ordShippingCost + + -- ** OrdersCustomBatchRequestEntryReturnLineItem + , OrdersCustomBatchRequestEntryReturnLineItem + , ordersCustomBatchRequestEntryReturnLineItem + , ocbrerliQuantity + , ocbrerliLineItemId + , ocbrerliReason + , ocbrerliReasonText + + -- ** OrdersUpdateMerchantOrderIdResponse + , OrdersUpdateMerchantOrderIdResponse + , ordersUpdateMerchantOrderIdResponse + , oumoirKind + , oumoirExecutionStatus + + -- ** OrdersCustomBatchRequestEntryRefund + , OrdersCustomBatchRequestEntryRefund + , ordersCustomBatchRequestEntryRefund + , ocbrerAmount + , ocbrerReason + , ocbrerReasonText + + -- ** OrderCancellation + , OrderCancellation + , orderCancellation + , ocQuantity + , ocActor + , ocReason + , ocCreationDate + , ocReasonText + + -- ** OrdersCustomBatchResponse + , OrdersCustomBatchResponse + , ordersCustomBatchResponse + , ocbrcEntries + , ocbrcKind + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Content.Orders.Acknowledge +import Network.Google.Resource.Content.Orders.Advancetestorder +import Network.Google.Resource.Content.Orders.Cancel +import Network.Google.Resource.Content.Orders.Cancellineitem +import Network.Google.Resource.Content.Orders.Createtestorder +import Network.Google.Resource.Content.Orders.Custombatch +import Network.Google.Resource.Content.Orders.Get +import Network.Google.Resource.Content.Orders.Getbymerchantorderid +import Network.Google.Resource.Content.Orders.Gettestordertemplate +import Network.Google.Resource.Content.Orders.List +import Network.Google.Resource.Content.Orders.Refund +import Network.Google.Resource.Content.Orders.Returnlineitem +import Network.Google.Resource.Content.Orders.Shiplineitems +import Network.Google.Resource.Content.Orders.Updatemerchantorderid +import Network.Google.Resource.Content.Orders.Updateshipment +import Network.Google.ShoppingContent.Types + +{- $resources +TODO +-} + +type ShoppingContentAPI = Orders + +shoppingContentAPI :: Proxy ShoppingContentAPI +shoppingContentAPI = Proxy diff --git a/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types.hs b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types.hs new file mode 100644 index 000000000..ad1f1ef31 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types.hs @@ -0,0 +1,497 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ShoppingContent.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ShoppingContent.Types + ( + -- * Service URL + shoppingContentURL + + -- * TestOrderCustomer + , TestOrderCustomer + , testOrderCustomer + , tocFullName + , tocEmail + , tocExplicitMarketingPreference + + -- * OrdersUpdateMerchantOrderIdRequest + , OrdersUpdateMerchantOrderIdRequest + , ordersUpdateMerchantOrderIdRequest + , oumoirMerchantOrderId + , oumoirOperationId + + -- * OrdersAdvanceTestOrderResponse + , OrdersAdvanceTestOrderResponse + , ordersAdvanceTestOrderResponse + , oatorKind + + -- * OrdersAcknowledgeRequest + , OrdersAcknowledgeRequest + , ordersAcknowledgeRequest + , oarOperationId + + -- * OrderReturn + , OrderReturn + , orderReturn + , orQuantity + , orActor + , orReason + , orCreationDate + , orReasonText + + -- * OrdersCustomBatchRequestEntry + , OrdersCustomBatchRequestEntry + , ordersCustomBatchRequestEntry + , ocbreMerchantId + , ocbreCancelLineItem + , ocbreRefund + , ocbreUpdateShipment + , ocbreReturnLineItem + , ocbreMerchantOrderId + , ocbreMethod + , ocbreShipLineItems + , ocbreOperationId + , ocbreOrderId + , ocbreCancel + , ocbreBatchId + + -- * OrderLineItemShippingDetailsMethod + , OrderLineItemShippingDetailsMethod + , orderLineItemShippingDetailsMethod + , olisdmCarrier + , olisdmMethodName + , olisdmMaxDaysInTransit + , olisdmMinDaysInTransit + + -- * OrdersCreateTestOrderResponse + , OrdersCreateTestOrderResponse + , ordersCreateTestOrderResponse + , octorKind + , octorOrderId + + -- * OrdersRefundRequest + , OrdersRefundRequest + , ordersRefundRequest + , orrAmount + , orrReason + , orrOperationId + , orrReasonText + + -- * OrdersCustomBatchRequestEntryCancelLineItem + , OrdersCustomBatchRequestEntryCancelLineItem + , ordersCustomBatchRequestEntryCancelLineItem + , ocbrecliQuantity + , ocbrecliLineItemId + , ocbrecliReason + , ocbrecliReasonText + + -- * OrdersUpdateShipmentRequest + , OrdersUpdateShipmentRequest + , ordersUpdateShipmentRequest + , ousrCarrier + , ousrStatus + , ousrTrackingId + , ousrShipmentId + , ousrOperationId + + -- * TestOrderPaymentMethod + , TestOrderPaymentMethod + , testOrderPaymentMethod + , topmExpirationMonth + , topmExpirationYear + , topmLastFourDigits + , topmType + , topmPredefinedBillingAddress + + -- * OrdersReturnLineItemRequest + , OrdersReturnLineItemRequest + , ordersReturnLineItemRequest + , orlirQuantity + , orlirLineItemId + , orlirReason + , orlirOperationId + , orlirReasonText + + -- * OrdersCustomBatchRequestEntryShipLineItems + , OrdersCustomBatchRequestEntryShipLineItems + , ordersCustomBatchRequestEntryShipLineItems + , ocbresliCarrier + , ocbresliTrackingId + , ocbresliShipmentId + , ocbresliLineItems + + -- * OrderLineItem + , OrderLineItem + , orderLineItem + , oliQuantityOrdered + , oliReturnInfo + , oliQuantityDelivered + , oliShippingDetails + , oliQuantityPending + , oliCancellations + , oliQuantityCanceled + , oliId + , oliTax + , oliPrice + , oliQuantityShipped + , oliQuantityReturned + , oliProduct + , oliReturns + + -- * OrderShipmentLineItemShipment + , OrderShipmentLineItemShipment + , orderShipmentLineItemShipment + , oslisQuantity + , oslisLineItemId + + -- * OrdersRefundResponse + , OrdersRefundResponse + , ordersRefundResponse + , orrKind + , orrExecutionStatus + + -- * OrdersCreateTestOrderRequest + , OrdersCreateTestOrderRequest + , ordersCreateTestOrderRequest + , octorTemplateName + , octorTestOrder + + -- * OrdersGetTestOrderTemplateResponse + , OrdersGetTestOrderTemplateResponse + , ordersGetTestOrderTemplateResponse + , ogtotrKind + , ogtotrTemplate + + -- * Error + , Error + , error' + , eDomain + , eReason + , eMessage + + -- * OrdersCustomBatchRequest + , OrdersCustomBatchRequest + , ordersCustomBatchRequest + , ocbrEntries + + -- * OrdersShipLineItemsRequest + , OrdersShipLineItemsRequest + , ordersShipLineItemsRequest + , oslirCarrier + , oslirTrackingId + , oslirShipmentId + , oslirLineItems + , oslirOperationId + + -- * OrderShipment + , OrderShipment + , orderShipment + , osCarrier + , osStatus + , osTrackingId + , osLineItems + , osId + , osCreationDate + , osDeliveryDate + + -- * OrderLineItemReturnInfo + , OrderLineItemReturnInfo + , orderLineItemReturnInfo + , oliriIsReturnable + , oliriPolicyUrl + , oliriDaysToReturn + + -- * OrdersCancelLineItemRequest + , OrdersCancelLineItemRequest + , ordersCancelLineItemRequest + , oclirQuantity + , oclirLineItemId + , oclirReason + , oclirOperationId + , oclirReasonText + + -- * OrdersCustomBatchRequestEntryCancel + , OrdersCustomBatchRequestEntryCancel + , ordersCustomBatchRequestEntryCancel + , ocbrecReason + , ocbrecReasonText + + -- * OrdersShipLineItemsResponse + , OrdersShipLineItemsResponse + , ordersShipLineItemsResponse + , oslirKind + , oslirExecutionStatus + + -- * OrdersListResponse + , OrdersListResponse + , ordersListResponse + , olrNextPageToken + , olrKind + , olrResources + + -- * OrdersReturnLineItemResponse + , OrdersReturnLineItemResponse + , ordersReturnLineItemResponse + , orlirKind + , orlirExecutionStatus + + -- * OrdersUpdateShipmentResponse + , OrdersUpdateShipmentResponse + , ordersUpdateShipmentResponse + , ousrKind + , ousrExecutionStatus + + -- * OrdersCancelRequest + , OrdersCancelRequest + , ordersCancelRequest + , ocrReason + , ocrOperationId + , ocrReasonText + + -- * OrderCustomer + , OrderCustomer + , orderCustomer + , ocFullName + , ocEmail + , ocExplicitMarketingPreference + + -- * OrdersGetByMerchantOrderIdResponse + , OrdersGetByMerchantOrderIdResponse + , ordersGetByMerchantOrderIdResponse + , ogbmoirKind + , ogbmoirOrder + + -- * OrderLineItemShippingDetails + , OrderLineItemShippingDetails + , orderLineItemShippingDetails + , olisdShipByDate + , olisdMethod + , olisdDeliverByDate + + -- * Price + , Price + , price + , pValue + , pCurrency + + -- * OrderLineItemProductVariantAttribute + , OrderLineItemProductVariantAttribute + , orderLineItemProductVariantAttribute + , olipvaDimension + , olipvaValue + + -- * OrdersCustomBatchResponseEntry + , OrdersCustomBatchResponseEntry + , ordersCustomBatchResponseEntry + , oKind + , oExecutionStatus + , oErrors + , oOrder + , oBatchId + + -- * TestOrderLineItemProduct + , TestOrderLineItemProduct + , testOrderLineItemProduct + , tolipImageLink + , tolipChannel + , tolipBrand + , tolipTargetCountry + , tolipGtin + , tolipItemGroupId + , tolipOfferId + , tolipPrice + , tolipVariantAttributes + , tolipTitle + , tolipContentLanguage + , tolipMpn + , tolipCondition + + -- * TestOrder + , TestOrder + , testOrder + , toKind + , toLineItems + , toShippingOption + , toPredefinedDeliveryAddress + , toShippingCostTax + , toCustomer + , toPaymentMethod + , toShippingCost + + -- * OrderRefund + , OrderRefund + , orderRefund + , oAmount + , oActor + , oReason + , oCreationDate + , oReasonText + + -- * OrderDeliveryDetails + , OrderDeliveryDetails + , orderDeliveryDetails + , oddAddress + , oddPhoneNumber + + -- * OrderAddress + , OrderAddress + , orderAddress + , oaRecipientName + , oaStreetAddress + , oaCountry + , oaPostalCode + , oaLocality + , oaIsPostOfficeBox + , oaFullAddress + , oaRegion + + -- * OrdersCancelResponse + , OrdersCancelResponse + , ordersCancelResponse + , ocrKind + , ocrExecutionStatus + + -- * TestOrderLineItem + , TestOrderLineItem + , testOrderLineItem + , toliQuantityOrdered + , toliReturnInfo + , toliShippingDetails + , toliProduct + , toliUnitTax + + -- * OrderPaymentMethod + , OrderPaymentMethod + , orderPaymentMethod + , opmExpirationMonth + , opmExpirationYear + , opmPhoneNumber + , opmBillingAddress + , opmLastFourDigits + , opmType + + -- * Errors + , Errors + , errors + , errCode + , errMessage + , errErrors + + -- * OrdersCancelLineItemResponse + , OrdersCancelLineItemResponse + , ordersCancelLineItemResponse + , oclirKind + , oclirExecutionStatus + + -- * OrdersCustomBatchRequestEntryUpdateShipment + , OrdersCustomBatchRequestEntryUpdateShipment + , ordersCustomBatchRequestEntryUpdateShipment + , ocbreusCarrier + , ocbreusStatus + , ocbreusTrackingId + , ocbreusShipmentId + + -- * OrderLineItemProduct + , OrderLineItemProduct + , orderLineItemProduct + , olipImageLink + , olipShownImage + , olipChannel + , olipBrand + , olipTargetCountry + , olipGtin + , olipItemGroupId + , olipOfferId + , olipId + , olipPrice + , olipVariantAttributes + , olipTitle + , olipContentLanguage + , olipMpn + , olipCondition + + -- * OrdersAcknowledgeResponse + , OrdersAcknowledgeResponse + , ordersAcknowledgeResponse + , oarKind + , oarExecutionStatus + + -- * Order + , Order + , order + , ordStatus + , ordMerchantId + , ordRefunds + , ordKind + , ordLineItems + , ordShipments + , ordNetAmount + , ordPlacedDate + , ordDeliveryDetails + , ordShippingOption + , ordMerchantOrderId + , ordAcknowledged + , ordShippingCostTax + , ordCustomer + , ordId + , ordPaymentMethod + , ordPaymentStatus + , ordShippingCost + + -- * OrdersCustomBatchRequestEntryReturnLineItem + , OrdersCustomBatchRequestEntryReturnLineItem + , ordersCustomBatchRequestEntryReturnLineItem + , ocbrerliQuantity + , ocbrerliLineItemId + , ocbrerliReason + , ocbrerliReasonText + + -- * OrdersUpdateMerchantOrderIdResponse + , OrdersUpdateMerchantOrderIdResponse + , ordersUpdateMerchantOrderIdResponse + , oumoirKind + , oumoirExecutionStatus + + -- * OrdersCustomBatchRequestEntryRefund + , OrdersCustomBatchRequestEntryRefund + , ordersCustomBatchRequestEntryRefund + , ocbrerAmount + , ocbrerReason + , ocbrerReasonText + + -- * OrderCancellation + , OrderCancellation + , orderCancellation + , ocQuantity + , ocActor + , ocReason + , ocCreationDate + , ocReasonText + + -- * OrdersCustomBatchResponse + , OrdersCustomBatchResponse + , ordersCustomBatchResponse + , ocbrcEntries + , ocbrcKind + ) where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types.Product +import Network.Google.ShoppingContent.Types.Sum + +-- | URL referring to version 'v2sandbox' of the Content API for Shopping. +shoppingContentURL :: BaseURL +shoppingContentURL + = BaseUrl Https + "https://www.googleapis.com/content/v2sandbox/" + 443 diff --git a/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs new file mode 100644 index 000000000..87eb766e3 --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs @@ -0,0 +1,4270 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ShoppingContent.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ShoppingContent.Types.Product where + +import Network.Google.Prelude +import Network.Google.ShoppingContent.Types.Sum + +-- +-- /See:/ 'testOrderCustomer' smart constructor. +data TestOrderCustomer = TestOrderCustomer + { _tocFullName :: !(Maybe Text) + , _tocEmail :: !(Maybe Text) + , _tocExplicitMarketingPreference :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestOrderCustomer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tocFullName' +-- +-- * 'tocEmail' +-- +-- * 'tocExplicitMarketingPreference' +testOrderCustomer + :: TestOrderCustomer +testOrderCustomer = + TestOrderCustomer + { _tocFullName = Nothing + , _tocEmail = Nothing + , _tocExplicitMarketingPreference = Nothing + } + +-- | Full name of the customer. +tocFullName :: Lens' TestOrderCustomer (Maybe Text) +tocFullName + = lens _tocFullName (\ s a -> s{_tocFullName = a}) + +-- | Email address of the customer. +tocEmail :: Lens' TestOrderCustomer (Maybe Text) +tocEmail = lens _tocEmail (\ s a -> s{_tocEmail = a}) + +-- | If set, this indicates the user had a choice to opt in or out of +-- providing marketing rights to the merchant. If unset, this indicates the +-- user has already made this choice in a previous purchase, and was thus +-- not shown the marketing right opt in\/out checkbox during the Purchases +-- on Google checkout flow. Optional. +tocExplicitMarketingPreference :: Lens' TestOrderCustomer (Maybe Bool) +tocExplicitMarketingPreference + = lens _tocExplicitMarketingPreference + (\ s a -> s{_tocExplicitMarketingPreference = a}) + +instance FromJSON TestOrderCustomer where + parseJSON + = withObject "TestOrderCustomer" + (\ o -> + TestOrderCustomer <$> + (o .:? "fullName") <*> (o .:? "email") <*> + (o .:? "explicitMarketingPreference")) + +instance ToJSON TestOrderCustomer where + toJSON TestOrderCustomer{..} + = object + (catMaybes + [("fullName" .=) <$> _tocFullName, + ("email" .=) <$> _tocEmail, + ("explicitMarketingPreference" .=) <$> + _tocExplicitMarketingPreference]) + +-- +-- /See:/ 'ordersUpdateMerchantOrderIdRequest' smart constructor. +data OrdersUpdateMerchantOrderIdRequest = OrdersUpdateMerchantOrderIdRequest + { _oumoirMerchantOrderId :: !(Maybe Text) + , _oumoirOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdateMerchantOrderIdRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oumoirMerchantOrderId' +-- +-- * 'oumoirOperationId' +ordersUpdateMerchantOrderIdRequest + :: OrdersUpdateMerchantOrderIdRequest +ordersUpdateMerchantOrderIdRequest = + OrdersUpdateMerchantOrderIdRequest + { _oumoirMerchantOrderId = Nothing + , _oumoirOperationId = Nothing + } + +-- | The merchant order id to be assigned to the order. Must be unique per +-- merchant. +oumoirMerchantOrderId :: Lens' OrdersUpdateMerchantOrderIdRequest (Maybe Text) +oumoirMerchantOrderId + = lens _oumoirMerchantOrderId + (\ s a -> s{_oumoirMerchantOrderId = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +oumoirOperationId :: Lens' OrdersUpdateMerchantOrderIdRequest (Maybe Text) +oumoirOperationId + = lens _oumoirOperationId + (\ s a -> s{_oumoirOperationId = a}) + +instance FromJSON OrdersUpdateMerchantOrderIdRequest + where + parseJSON + = withObject "OrdersUpdateMerchantOrderIdRequest" + (\ o -> + OrdersUpdateMerchantOrderIdRequest <$> + (o .:? "merchantOrderId") <*> (o .:? "operationId")) + +instance ToJSON OrdersUpdateMerchantOrderIdRequest + where + toJSON OrdersUpdateMerchantOrderIdRequest{..} + = object + (catMaybes + [("merchantOrderId" .=) <$> _oumoirMerchantOrderId, + ("operationId" .=) <$> _oumoirOperationId]) + +-- +-- /See:/ 'ordersAdvanceTestOrderResponse' smart constructor. +newtype OrdersAdvanceTestOrderResponse = OrdersAdvanceTestOrderResponse + { _oatorKind :: Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersAdvanceTestOrderResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oatorKind' +ordersAdvanceTestOrderResponse + :: OrdersAdvanceTestOrderResponse +ordersAdvanceTestOrderResponse = + OrdersAdvanceTestOrderResponse + { _oatorKind = "content#ordersAdvanceTestOrderResponse" + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersAdvanceTestOrderResponse\". +oatorKind :: Lens' OrdersAdvanceTestOrderResponse Text +oatorKind + = lens _oatorKind (\ s a -> s{_oatorKind = a}) + +instance FromJSON OrdersAdvanceTestOrderResponse + where + parseJSON + = withObject "OrdersAdvanceTestOrderResponse" + (\ o -> + OrdersAdvanceTestOrderResponse <$> + (o .:? "kind" .!= + "content#ordersAdvanceTestOrderResponse")) + +instance ToJSON OrdersAdvanceTestOrderResponse where + toJSON OrdersAdvanceTestOrderResponse{..} + = object (catMaybes [Just ("kind" .= _oatorKind)]) + +-- +-- /See:/ 'ordersAcknowledgeRequest' smart constructor. +newtype OrdersAcknowledgeRequest = OrdersAcknowledgeRequest + { _oarOperationId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersAcknowledgeRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oarOperationId' +ordersAcknowledgeRequest + :: OrdersAcknowledgeRequest +ordersAcknowledgeRequest = + OrdersAcknowledgeRequest + { _oarOperationId = Nothing + } + +-- | The ID of the operation. Unique across all operations for a given order. +oarOperationId :: Lens' OrdersAcknowledgeRequest (Maybe Text) +oarOperationId + = lens _oarOperationId + (\ s a -> s{_oarOperationId = a}) + +instance FromJSON OrdersAcknowledgeRequest where + parseJSON + = withObject "OrdersAcknowledgeRequest" + (\ o -> + OrdersAcknowledgeRequest <$> (o .:? "operationId")) + +instance ToJSON OrdersAcknowledgeRequest where + toJSON OrdersAcknowledgeRequest{..} + = object + (catMaybes [("operationId" .=) <$> _oarOperationId]) + +-- +-- /See:/ 'orderReturn' smart constructor. +data OrderReturn = OrderReturn + { _orQuantity :: !(Maybe Word32) + , _orActor :: !(Maybe Text) + , _orReason :: !(Maybe Text) + , _orCreationDate :: !(Maybe Text) + , _orReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderReturn' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orQuantity' +-- +-- * 'orActor' +-- +-- * 'orReason' +-- +-- * 'orCreationDate' +-- +-- * 'orReasonText' +orderReturn + :: OrderReturn +orderReturn = + OrderReturn + { _orQuantity = Nothing + , _orActor = Nothing + , _orReason = Nothing + , _orCreationDate = Nothing + , _orReasonText = Nothing + } + +-- | Quantity that is returned. +orQuantity :: Lens' OrderReturn (Maybe Word32) +orQuantity + = lens _orQuantity (\ s a -> s{_orQuantity = a}) + +-- | The actor that created the refund. +orActor :: Lens' OrderReturn (Maybe Text) +orActor = lens _orActor (\ s a -> s{_orActor = a}) + +-- | The reason for the return. +orReason :: Lens' OrderReturn (Maybe Text) +orReason = lens _orReason (\ s a -> s{_orReason = a}) + +-- | Date on which the item has been created, in ISO 8601 format. +orCreationDate :: Lens' OrderReturn (Maybe Text) +orCreationDate + = lens _orCreationDate + (\ s a -> s{_orCreationDate = a}) + +-- | The explanation of the reason. +orReasonText :: Lens' OrderReturn (Maybe Text) +orReasonText + = lens _orReasonText (\ s a -> s{_orReasonText = a}) + +instance FromJSON OrderReturn where + parseJSON + = withObject "OrderReturn" + (\ o -> + OrderReturn <$> + (o .:? "quantity") <*> (o .:? "actor") <*> + (o .:? "reason") + <*> (o .:? "creationDate") + <*> (o .:? "reasonText")) + +instance ToJSON OrderReturn where + toJSON OrderReturn{..} + = object + (catMaybes + [("quantity" .=) <$> _orQuantity, + ("actor" .=) <$> _orActor, + ("reason" .=) <$> _orReason, + ("creationDate" .=) <$> _orCreationDate, + ("reasonText" .=) <$> _orReasonText]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntry' smart constructor. +data OrdersCustomBatchRequestEntry = OrdersCustomBatchRequestEntry + { _ocbreMerchantId :: !(Maybe Word64) + , _ocbreCancelLineItem :: !(Maybe (Maybe OrdersCustomBatchRequestEntryCancelLineItem)) + , _ocbreRefund :: !(Maybe (Maybe OrdersCustomBatchRequestEntryRefund)) + , _ocbreUpdateShipment :: !(Maybe (Maybe OrdersCustomBatchRequestEntryUpdateShipment)) + , _ocbreReturnLineItem :: !(Maybe (Maybe OrdersCustomBatchRequestEntryReturnLineItem)) + , _ocbreMerchantOrderId :: !(Maybe Text) + , _ocbreMethod :: !(Maybe Text) + , _ocbreShipLineItems :: !(Maybe (Maybe OrdersCustomBatchRequestEntryShipLineItems)) + , _ocbreOperationId :: !(Maybe Text) + , _ocbreOrderId :: !(Maybe Text) + , _ocbreCancel :: !(Maybe (Maybe OrdersCustomBatchRequestEntryCancel)) + , _ocbreBatchId :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbreMerchantId' +-- +-- * 'ocbreCancelLineItem' +-- +-- * 'ocbreRefund' +-- +-- * 'ocbreUpdateShipment' +-- +-- * 'ocbreReturnLineItem' +-- +-- * 'ocbreMerchantOrderId' +-- +-- * 'ocbreMethod' +-- +-- * 'ocbreShipLineItems' +-- +-- * 'ocbreOperationId' +-- +-- * 'ocbreOrderId' +-- +-- * 'ocbreCancel' +-- +-- * 'ocbreBatchId' +ordersCustomBatchRequestEntry + :: OrdersCustomBatchRequestEntry +ordersCustomBatchRequestEntry = + OrdersCustomBatchRequestEntry + { _ocbreMerchantId = Nothing + , _ocbreCancelLineItem = Nothing + , _ocbreRefund = Nothing + , _ocbreUpdateShipment = Nothing + , _ocbreReturnLineItem = Nothing + , _ocbreMerchantOrderId = Nothing + , _ocbreMethod = Nothing + , _ocbreShipLineItems = Nothing + , _ocbreOperationId = Nothing + , _ocbreOrderId = Nothing + , _ocbreCancel = Nothing + , _ocbreBatchId = Nothing + } + +-- | The ID of the managing account. +ocbreMerchantId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word64) +ocbreMerchantId + = lens _ocbreMerchantId + (\ s a -> s{_ocbreMerchantId = a}) + +-- | Required for cancelLineItem method. +ocbreCancelLineItem :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryCancelLineItem)) +ocbreCancelLineItem + = lens _ocbreCancelLineItem + (\ s a -> s{_ocbreCancelLineItem = a}) + +-- | Required for refund method. +ocbreRefund :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryRefund)) +ocbreRefund + = lens _ocbreRefund (\ s a -> s{_ocbreRefund = a}) + +-- | Required for updateShipment method. +ocbreUpdateShipment :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryUpdateShipment)) +ocbreUpdateShipment + = lens _ocbreUpdateShipment + (\ s a -> s{_ocbreUpdateShipment = a}) + +-- | Required for returnLineItem method. +ocbreReturnLineItem :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryReturnLineItem)) +ocbreReturnLineItem + = lens _ocbreReturnLineItem + (\ s a -> s{_ocbreReturnLineItem = a}) + +-- | The merchant order id. Required for updateMerchantOrderId and +-- getByMerchantOrderId methods. +ocbreMerchantOrderId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text) +ocbreMerchantOrderId + = lens _ocbreMerchantOrderId + (\ s a -> s{_ocbreMerchantOrderId = a}) + +-- | The method to apply. +ocbreMethod :: Lens' OrdersCustomBatchRequestEntry (Maybe Text) +ocbreMethod + = lens _ocbreMethod (\ s a -> s{_ocbreMethod = a}) + +-- | Required for shipLineItems method. +ocbreShipLineItems :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryShipLineItems)) +ocbreShipLineItems + = lens _ocbreShipLineItems + (\ s a -> s{_ocbreShipLineItems = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +-- Required for all methods beside get and getByMerchantOrderId. +ocbreOperationId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text) +ocbreOperationId + = lens _ocbreOperationId + (\ s a -> s{_ocbreOperationId = a}) + +-- | The ID of the order. Required for all methods beside +-- getByMerchantOrderId. +ocbreOrderId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text) +ocbreOrderId + = lens _ocbreOrderId (\ s a -> s{_ocbreOrderId = a}) + +-- | Required for cancel method. +ocbreCancel :: Lens' OrdersCustomBatchRequestEntry (Maybe (Maybe OrdersCustomBatchRequestEntryCancel)) +ocbreCancel + = lens _ocbreCancel (\ s a -> s{_ocbreCancel = a}) + +-- | An entry ID, unique within the batch request. +ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32) +ocbreBatchId + = lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a}) + +instance FromJSON OrdersCustomBatchRequestEntry where + parseJSON + = withObject "OrdersCustomBatchRequestEntry" + (\ o -> + OrdersCustomBatchRequestEntry <$> + (o .:? "merchantId") <*> (o .:? "cancelLineItem") <*> + (o .:? "refund") + <*> (o .:? "updateShipment") + <*> (o .:? "returnLineItem") + <*> (o .:? "merchantOrderId") + <*> (o .:? "method") + <*> (o .:? "shipLineItems") + <*> (o .:? "operationId") + <*> (o .:? "orderId") + <*> (o .:? "cancel") + <*> (o .:? "batchId")) + +instance ToJSON OrdersCustomBatchRequestEntry where + toJSON OrdersCustomBatchRequestEntry{..} + = object + (catMaybes + [("merchantId" .=) <$> _ocbreMerchantId, + ("cancelLineItem" .=) <$> _ocbreCancelLineItem, + ("refund" .=) <$> _ocbreRefund, + ("updateShipment" .=) <$> _ocbreUpdateShipment, + ("returnLineItem" .=) <$> _ocbreReturnLineItem, + ("merchantOrderId" .=) <$> _ocbreMerchantOrderId, + ("method" .=) <$> _ocbreMethod, + ("shipLineItems" .=) <$> _ocbreShipLineItems, + ("operationId" .=) <$> _ocbreOperationId, + ("orderId" .=) <$> _ocbreOrderId, + ("cancel" .=) <$> _ocbreCancel, + ("batchId" .=) <$> _ocbreBatchId]) + +-- +-- /See:/ 'orderLineItemShippingDetailsMethod' smart constructor. +data OrderLineItemShippingDetailsMethod = OrderLineItemShippingDetailsMethod + { _olisdmCarrier :: !(Maybe Text) + , _olisdmMethodName :: !(Maybe Text) + , _olisdmMaxDaysInTransit :: !(Maybe Word32) + , _olisdmMinDaysInTransit :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItemShippingDetailsMethod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olisdmCarrier' +-- +-- * 'olisdmMethodName' +-- +-- * 'olisdmMaxDaysInTransit' +-- +-- * 'olisdmMinDaysInTransit' +orderLineItemShippingDetailsMethod + :: OrderLineItemShippingDetailsMethod +orderLineItemShippingDetailsMethod = + OrderLineItemShippingDetailsMethod + { _olisdmCarrier = Nothing + , _olisdmMethodName = Nothing + , _olisdmMaxDaysInTransit = Nothing + , _olisdmMinDaysInTransit = Nothing + } + +-- | The carrier for the shipping. Optional. +olisdmCarrier :: Lens' OrderLineItemShippingDetailsMethod (Maybe Text) +olisdmCarrier + = lens _olisdmCarrier + (\ s a -> s{_olisdmCarrier = a}) + +-- | The name of the shipping method. +olisdmMethodName :: Lens' OrderLineItemShippingDetailsMethod (Maybe Text) +olisdmMethodName + = lens _olisdmMethodName + (\ s a -> s{_olisdmMethodName = a}) + +-- | Maximum transit time. +olisdmMaxDaysInTransit :: Lens' OrderLineItemShippingDetailsMethod (Maybe Word32) +olisdmMaxDaysInTransit + = lens _olisdmMaxDaysInTransit + (\ s a -> s{_olisdmMaxDaysInTransit = a}) + +-- | Minimum transit time. +olisdmMinDaysInTransit :: Lens' OrderLineItemShippingDetailsMethod (Maybe Word32) +olisdmMinDaysInTransit + = lens _olisdmMinDaysInTransit + (\ s a -> s{_olisdmMinDaysInTransit = a}) + +instance FromJSON OrderLineItemShippingDetailsMethod + where + parseJSON + = withObject "OrderLineItemShippingDetailsMethod" + (\ o -> + OrderLineItemShippingDetailsMethod <$> + (o .:? "carrier") <*> (o .:? "methodName") <*> + (o .:? "maxDaysInTransit") + <*> (o .:? "minDaysInTransit")) + +instance ToJSON OrderLineItemShippingDetailsMethod + where + toJSON OrderLineItemShippingDetailsMethod{..} + = object + (catMaybes + [("carrier" .=) <$> _olisdmCarrier, + ("methodName" .=) <$> _olisdmMethodName, + ("maxDaysInTransit" .=) <$> _olisdmMaxDaysInTransit, + ("minDaysInTransit" .=) <$> _olisdmMinDaysInTransit]) + +-- +-- /See:/ 'ordersCreateTestOrderResponse' smart constructor. +data OrdersCreateTestOrderResponse = OrdersCreateTestOrderResponse + { _octorKind :: !Text + , _octorOrderId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCreateTestOrderResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'octorKind' +-- +-- * 'octorOrderId' +ordersCreateTestOrderResponse + :: OrdersCreateTestOrderResponse +ordersCreateTestOrderResponse = + OrdersCreateTestOrderResponse + { _octorKind = "content#ordersCreateTestOrderResponse" + , _octorOrderId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersCreateTestOrderResponse\". +octorKind :: Lens' OrdersCreateTestOrderResponse Text +octorKind + = lens _octorKind (\ s a -> s{_octorKind = a}) + +-- | The ID of the newly created test order. +octorOrderId :: Lens' OrdersCreateTestOrderResponse (Maybe Text) +octorOrderId + = lens _octorOrderId (\ s a -> s{_octorOrderId = a}) + +instance FromJSON OrdersCreateTestOrderResponse where + parseJSON + = withObject "OrdersCreateTestOrderResponse" + (\ o -> + OrdersCreateTestOrderResponse <$> + (o .:? "kind" .!= + "content#ordersCreateTestOrderResponse") + <*> (o .:? "orderId")) + +instance ToJSON OrdersCreateTestOrderResponse where + toJSON OrdersCreateTestOrderResponse{..} + = object + (catMaybes + [Just ("kind" .= _octorKind), + ("orderId" .=) <$> _octorOrderId]) + +-- +-- /See:/ 'ordersRefundRequest' smart constructor. +data OrdersRefundRequest = OrdersRefundRequest + { _orrAmount :: !(Maybe (Maybe Price)) + , _orrReason :: !(Maybe Text) + , _orrOperationId :: !(Maybe Text) + , _orrReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersRefundRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orrAmount' +-- +-- * 'orrReason' +-- +-- * 'orrOperationId' +-- +-- * 'orrReasonText' +ordersRefundRequest + :: OrdersRefundRequest +ordersRefundRequest = + OrdersRefundRequest + { _orrAmount = Nothing + , _orrReason = Nothing + , _orrOperationId = Nothing + , _orrReasonText = Nothing + } + +-- | The amount that is refunded. +orrAmount :: Lens' OrdersRefundRequest (Maybe (Maybe Price)) +orrAmount + = lens _orrAmount (\ s a -> s{_orrAmount = a}) + +-- | The reason for the refund. +orrReason :: Lens' OrdersRefundRequest (Maybe Text) +orrReason + = lens _orrReason (\ s a -> s{_orrReason = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +orrOperationId :: Lens' OrdersRefundRequest (Maybe Text) +orrOperationId + = lens _orrOperationId + (\ s a -> s{_orrOperationId = a}) + +-- | The explanation of the reason. +orrReasonText :: Lens' OrdersRefundRequest (Maybe Text) +orrReasonText + = lens _orrReasonText + (\ s a -> s{_orrReasonText = a}) + +instance FromJSON OrdersRefundRequest where + parseJSON + = withObject "OrdersRefundRequest" + (\ o -> + OrdersRefundRequest <$> + (o .:? "amount") <*> (o .:? "reason") <*> + (o .:? "operationId") + <*> (o .:? "reasonText")) + +instance ToJSON OrdersRefundRequest where + toJSON OrdersRefundRequest{..} + = object + (catMaybes + [("amount" .=) <$> _orrAmount, + ("reason" .=) <$> _orrReason, + ("operationId" .=) <$> _orrOperationId, + ("reasonText" .=) <$> _orrReasonText]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryCancelLineItem' smart constructor. +data OrdersCustomBatchRequestEntryCancelLineItem = OrdersCustomBatchRequestEntryCancelLineItem + { _ocbrecliQuantity :: !(Maybe Word32) + , _ocbrecliLineItemId :: !(Maybe Text) + , _ocbrecliReason :: !(Maybe Text) + , _ocbrecliReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryCancelLineItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrecliQuantity' +-- +-- * 'ocbrecliLineItemId' +-- +-- * 'ocbrecliReason' +-- +-- * 'ocbrecliReasonText' +ordersCustomBatchRequestEntryCancelLineItem + :: OrdersCustomBatchRequestEntryCancelLineItem +ordersCustomBatchRequestEntryCancelLineItem = + OrdersCustomBatchRequestEntryCancelLineItem + { _ocbrecliQuantity = Nothing + , _ocbrecliLineItemId = Nothing + , _ocbrecliReason = Nothing + , _ocbrecliReasonText = Nothing + } + +-- | The quantity to cancel. +ocbrecliQuantity :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Word32) +ocbrecliQuantity + = lens _ocbrecliQuantity + (\ s a -> s{_ocbrecliQuantity = a}) + +-- | The ID of the line item to cancel. +ocbrecliLineItemId :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text) +ocbrecliLineItemId + = lens _ocbrecliLineItemId + (\ s a -> s{_ocbrecliLineItemId = a}) + +-- | The reason for the cancellation. +ocbrecliReason :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text) +ocbrecliReason + = lens _ocbrecliReason + (\ s a -> s{_ocbrecliReason = a}) + +-- | The explanation of the reason. +ocbrecliReasonText :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text) +ocbrecliReasonText + = lens _ocbrecliReasonText + (\ s a -> s{_ocbrecliReasonText = a}) + +instance FromJSON + OrdersCustomBatchRequestEntryCancelLineItem where + parseJSON + = withObject + "OrdersCustomBatchRequestEntryCancelLineItem" + (\ o -> + OrdersCustomBatchRequestEntryCancelLineItem <$> + (o .:? "quantity") <*> (o .:? "lineItemId") <*> + (o .:? "reason") + <*> (o .:? "reasonText")) + +instance ToJSON + OrdersCustomBatchRequestEntryCancelLineItem where + toJSON + OrdersCustomBatchRequestEntryCancelLineItem{..} + = object + (catMaybes + [("quantity" .=) <$> _ocbrecliQuantity, + ("lineItemId" .=) <$> _ocbrecliLineItemId, + ("reason" .=) <$> _ocbrecliReason, + ("reasonText" .=) <$> _ocbrecliReasonText]) + +-- +-- /See:/ 'ordersUpdateShipmentRequest' smart constructor. +data OrdersUpdateShipmentRequest = OrdersUpdateShipmentRequest + { _ousrCarrier :: !(Maybe Text) + , _ousrStatus :: !(Maybe Text) + , _ousrTrackingId :: !(Maybe Text) + , _ousrShipmentId :: !(Maybe Text) + , _ousrOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdateShipmentRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ousrCarrier' +-- +-- * 'ousrStatus' +-- +-- * 'ousrTrackingId' +-- +-- * 'ousrShipmentId' +-- +-- * 'ousrOperationId' +ordersUpdateShipmentRequest + :: OrdersUpdateShipmentRequest +ordersUpdateShipmentRequest = + OrdersUpdateShipmentRequest + { _ousrCarrier = Nothing + , _ousrStatus = Nothing + , _ousrTrackingId = Nothing + , _ousrShipmentId = Nothing + , _ousrOperationId = Nothing + } + +-- | The carrier handling the shipment. Not updated if missing. +ousrCarrier :: Lens' OrdersUpdateShipmentRequest (Maybe Text) +ousrCarrier + = lens _ousrCarrier (\ s a -> s{_ousrCarrier = a}) + +-- | New status for the shipment. Not updated if missing. +ousrStatus :: Lens' OrdersUpdateShipmentRequest (Maybe Text) +ousrStatus + = lens _ousrStatus (\ s a -> s{_ousrStatus = a}) + +-- | The tracking id for the shipment. Not updated if missing. +ousrTrackingId :: Lens' OrdersUpdateShipmentRequest (Maybe Text) +ousrTrackingId + = lens _ousrTrackingId + (\ s a -> s{_ousrTrackingId = a}) + +-- | The ID of the shipment. +ousrShipmentId :: Lens' OrdersUpdateShipmentRequest (Maybe Text) +ousrShipmentId + = lens _ousrShipmentId + (\ s a -> s{_ousrShipmentId = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +ousrOperationId :: Lens' OrdersUpdateShipmentRequest (Maybe Text) +ousrOperationId + = lens _ousrOperationId + (\ s a -> s{_ousrOperationId = a}) + +instance FromJSON OrdersUpdateShipmentRequest where + parseJSON + = withObject "OrdersUpdateShipmentRequest" + (\ o -> + OrdersUpdateShipmentRequest <$> + (o .:? "carrier") <*> (o .:? "status") <*> + (o .:? "trackingId") + <*> (o .:? "shipmentId") + <*> (o .:? "operationId")) + +instance ToJSON OrdersUpdateShipmentRequest where + toJSON OrdersUpdateShipmentRequest{..} + = object + (catMaybes + [("carrier" .=) <$> _ousrCarrier, + ("status" .=) <$> _ousrStatus, + ("trackingId" .=) <$> _ousrTrackingId, + ("shipmentId" .=) <$> _ousrShipmentId, + ("operationId" .=) <$> _ousrOperationId]) + +-- +-- /See:/ 'testOrderPaymentMethod' smart constructor. +data TestOrderPaymentMethod = TestOrderPaymentMethod + { _topmExpirationMonth :: !(Maybe Int32) + , _topmExpirationYear :: !(Maybe Int32) + , _topmLastFourDigits :: !(Maybe Text) + , _topmType :: !(Maybe Text) + , _topmPredefinedBillingAddress :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestOrderPaymentMethod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'topmExpirationMonth' +-- +-- * 'topmExpirationYear' +-- +-- * 'topmLastFourDigits' +-- +-- * 'topmType' +-- +-- * 'topmPredefinedBillingAddress' +testOrderPaymentMethod + :: TestOrderPaymentMethod +testOrderPaymentMethod = + TestOrderPaymentMethod + { _topmExpirationMonth = Nothing + , _topmExpirationYear = Nothing + , _topmLastFourDigits = Nothing + , _topmType = Nothing + , _topmPredefinedBillingAddress = Nothing + } + +-- | The card expiration month (January = 1, February = 2 etc.). +topmExpirationMonth :: Lens' TestOrderPaymentMethod (Maybe Int32) +topmExpirationMonth + = lens _topmExpirationMonth + (\ s a -> s{_topmExpirationMonth = a}) + +-- | The card expiration year (4-digit, e.g. 2015). +topmExpirationYear :: Lens' TestOrderPaymentMethod (Maybe Int32) +topmExpirationYear + = lens _topmExpirationYear + (\ s a -> s{_topmExpirationYear = a}) + +-- | The last four digits of the card number. +topmLastFourDigits :: Lens' TestOrderPaymentMethod (Maybe Text) +topmLastFourDigits + = lens _topmLastFourDigits + (\ s a -> s{_topmLastFourDigits = a}) + +-- | The type of instrument. Note that real orders might have different +-- values than the four values accepted by createTestOrder. +topmType :: Lens' TestOrderPaymentMethod (Maybe Text) +topmType = lens _topmType (\ s a -> s{_topmType = a}) + +-- | The billing address. +topmPredefinedBillingAddress :: Lens' TestOrderPaymentMethod (Maybe Text) +topmPredefinedBillingAddress + = lens _topmPredefinedBillingAddress + (\ s a -> s{_topmPredefinedBillingAddress = a}) + +instance FromJSON TestOrderPaymentMethod where + parseJSON + = withObject "TestOrderPaymentMethod" + (\ o -> + TestOrderPaymentMethod <$> + (o .:? "expirationMonth") <*> + (o .:? "expirationYear") + <*> (o .:? "lastFourDigits") + <*> (o .:? "type") + <*> (o .:? "predefinedBillingAddress")) + +instance ToJSON TestOrderPaymentMethod where + toJSON TestOrderPaymentMethod{..} + = object + (catMaybes + [("expirationMonth" .=) <$> _topmExpirationMonth, + ("expirationYear" .=) <$> _topmExpirationYear, + ("lastFourDigits" .=) <$> _topmLastFourDigits, + ("type" .=) <$> _topmType, + ("predefinedBillingAddress" .=) <$> + _topmPredefinedBillingAddress]) + +-- +-- /See:/ 'ordersReturnLineItemRequest' smart constructor. +data OrdersReturnLineItemRequest = OrdersReturnLineItemRequest + { _orlirQuantity :: !(Maybe Word32) + , _orlirLineItemId :: !(Maybe Text) + , _orlirReason :: !(Maybe Text) + , _orlirOperationId :: !(Maybe Text) + , _orlirReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersReturnLineItemRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orlirQuantity' +-- +-- * 'orlirLineItemId' +-- +-- * 'orlirReason' +-- +-- * 'orlirOperationId' +-- +-- * 'orlirReasonText' +ordersReturnLineItemRequest + :: OrdersReturnLineItemRequest +ordersReturnLineItemRequest = + OrdersReturnLineItemRequest + { _orlirQuantity = Nothing + , _orlirLineItemId = Nothing + , _orlirReason = Nothing + , _orlirOperationId = Nothing + , _orlirReasonText = Nothing + } + +-- | The quantity to return. +orlirQuantity :: Lens' OrdersReturnLineItemRequest (Maybe Word32) +orlirQuantity + = lens _orlirQuantity + (\ s a -> s{_orlirQuantity = a}) + +-- | The ID of the line item to return. +orlirLineItemId :: Lens' OrdersReturnLineItemRequest (Maybe Text) +orlirLineItemId + = lens _orlirLineItemId + (\ s a -> s{_orlirLineItemId = a}) + +-- | The reason for the return. +orlirReason :: Lens' OrdersReturnLineItemRequest (Maybe Text) +orlirReason + = lens _orlirReason (\ s a -> s{_orlirReason = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +orlirOperationId :: Lens' OrdersReturnLineItemRequest (Maybe Text) +orlirOperationId + = lens _orlirOperationId + (\ s a -> s{_orlirOperationId = a}) + +-- | The explanation of the reason. +orlirReasonText :: Lens' OrdersReturnLineItemRequest (Maybe Text) +orlirReasonText + = lens _orlirReasonText + (\ s a -> s{_orlirReasonText = a}) + +instance FromJSON OrdersReturnLineItemRequest where + parseJSON + = withObject "OrdersReturnLineItemRequest" + (\ o -> + OrdersReturnLineItemRequest <$> + (o .:? "quantity") <*> (o .:? "lineItemId") <*> + (o .:? "reason") + <*> (o .:? "operationId") + <*> (o .:? "reasonText")) + +instance ToJSON OrdersReturnLineItemRequest where + toJSON OrdersReturnLineItemRequest{..} + = object + (catMaybes + [("quantity" .=) <$> _orlirQuantity, + ("lineItemId" .=) <$> _orlirLineItemId, + ("reason" .=) <$> _orlirReason, + ("operationId" .=) <$> _orlirOperationId, + ("reasonText" .=) <$> _orlirReasonText]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryShipLineItems' smart constructor. +data OrdersCustomBatchRequestEntryShipLineItems = OrdersCustomBatchRequestEntryShipLineItems + { _ocbresliCarrier :: !(Maybe Text) + , _ocbresliTrackingId :: !(Maybe Text) + , _ocbresliShipmentId :: !(Maybe Text) + , _ocbresliLineItems :: !(Maybe [Maybe OrderShipmentLineItemShipment]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryShipLineItems' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbresliCarrier' +-- +-- * 'ocbresliTrackingId' +-- +-- * 'ocbresliShipmentId' +-- +-- * 'ocbresliLineItems' +ordersCustomBatchRequestEntryShipLineItems + :: OrdersCustomBatchRequestEntryShipLineItems +ordersCustomBatchRequestEntryShipLineItems = + OrdersCustomBatchRequestEntryShipLineItems + { _ocbresliCarrier = Nothing + , _ocbresliTrackingId = Nothing + , _ocbresliShipmentId = Nothing + , _ocbresliLineItems = Nothing + } + +-- | The carrier handling the shipment. +ocbresliCarrier :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text) +ocbresliCarrier + = lens _ocbresliCarrier + (\ s a -> s{_ocbresliCarrier = a}) + +-- | The tracking id for the shipment. +ocbresliTrackingId :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text) +ocbresliTrackingId + = lens _ocbresliTrackingId + (\ s a -> s{_ocbresliTrackingId = a}) + +-- | The ID of the shipment. +ocbresliShipmentId :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text) +ocbresliShipmentId + = lens _ocbresliShipmentId + (\ s a -> s{_ocbresliShipmentId = a}) + +-- | Line items to ship. +ocbresliLineItems :: Lens' OrdersCustomBatchRequestEntryShipLineItems [Maybe OrderShipmentLineItemShipment] +ocbresliLineItems + = lens _ocbresliLineItems + (\ s a -> s{_ocbresliLineItems = a}) + . _Default + . _Coerce + +instance FromJSON + OrdersCustomBatchRequestEntryShipLineItems where + parseJSON + = withObject + "OrdersCustomBatchRequestEntryShipLineItems" + (\ o -> + OrdersCustomBatchRequestEntryShipLineItems <$> + (o .:? "carrier") <*> (o .:? "trackingId") <*> + (o .:? "shipmentId") + <*> (o .:? "lineItems" .!= mempty)) + +instance ToJSON + OrdersCustomBatchRequestEntryShipLineItems where + toJSON OrdersCustomBatchRequestEntryShipLineItems{..} + = object + (catMaybes + [("carrier" .=) <$> _ocbresliCarrier, + ("trackingId" .=) <$> _ocbresliTrackingId, + ("shipmentId" .=) <$> _ocbresliShipmentId, + ("lineItems" .=) <$> _ocbresliLineItems]) + +-- +-- /See:/ 'orderLineItem' smart constructor. +data OrderLineItem = OrderLineItem + { _oliQuantityOrdered :: !(Maybe Word32) + , _oliReturnInfo :: !(Maybe (Maybe OrderLineItemReturnInfo)) + , _oliQuantityDelivered :: !(Maybe Word32) + , _oliShippingDetails :: !(Maybe (Maybe OrderLineItemShippingDetails)) + , _oliQuantityPending :: !(Maybe Word32) + , _oliCancellations :: !(Maybe [Maybe OrderCancellation]) + , _oliQuantityCanceled :: !(Maybe Word32) + , _oliId :: !(Maybe Text) + , _oliTax :: !(Maybe (Maybe Price)) + , _oliPrice :: !(Maybe (Maybe Price)) + , _oliQuantityShipped :: !(Maybe Word32) + , _oliQuantityReturned :: !(Maybe Word32) + , _oliProduct :: !(Maybe (Maybe OrderLineItemProduct)) + , _oliReturns :: !(Maybe [Maybe OrderReturn]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oliQuantityOrdered' +-- +-- * 'oliReturnInfo' +-- +-- * 'oliQuantityDelivered' +-- +-- * 'oliShippingDetails' +-- +-- * 'oliQuantityPending' +-- +-- * 'oliCancellations' +-- +-- * 'oliQuantityCanceled' +-- +-- * 'oliId' +-- +-- * 'oliTax' +-- +-- * 'oliPrice' +-- +-- * 'oliQuantityShipped' +-- +-- * 'oliQuantityReturned' +-- +-- * 'oliProduct' +-- +-- * 'oliReturns' +orderLineItem + :: OrderLineItem +orderLineItem = + OrderLineItem + { _oliQuantityOrdered = Nothing + , _oliReturnInfo = Nothing + , _oliQuantityDelivered = Nothing + , _oliShippingDetails = Nothing + , _oliQuantityPending = Nothing + , _oliCancellations = Nothing + , _oliQuantityCanceled = Nothing + , _oliId = Nothing + , _oliTax = Nothing + , _oliPrice = Nothing + , _oliQuantityShipped = Nothing + , _oliQuantityReturned = Nothing + , _oliProduct = Nothing + , _oliReturns = Nothing + } + +-- | Number of items ordered. +oliQuantityOrdered :: Lens' OrderLineItem (Maybe Word32) +oliQuantityOrdered + = lens _oliQuantityOrdered + (\ s a -> s{_oliQuantityOrdered = a}) + +-- | Details of the return policy for the line item. +oliReturnInfo :: Lens' OrderLineItem (Maybe (Maybe OrderLineItemReturnInfo)) +oliReturnInfo + = lens _oliReturnInfo + (\ s a -> s{_oliReturnInfo = a}) + +-- | Number of items delivered. +oliQuantityDelivered :: Lens' OrderLineItem (Maybe Word32) +oliQuantityDelivered + = lens _oliQuantityDelivered + (\ s a -> s{_oliQuantityDelivered = a}) + +-- | Details of the requested shipping for the line item. +oliShippingDetails :: Lens' OrderLineItem (Maybe (Maybe OrderLineItemShippingDetails)) +oliShippingDetails + = lens _oliShippingDetails + (\ s a -> s{_oliShippingDetails = a}) + +-- | Number of items pending. +oliQuantityPending :: Lens' OrderLineItem (Maybe Word32) +oliQuantityPending + = lens _oliQuantityPending + (\ s a -> s{_oliQuantityPending = a}) + +-- | Cancellations of the line item. +oliCancellations :: Lens' OrderLineItem [Maybe OrderCancellation] +oliCancellations + = lens _oliCancellations + (\ s a -> s{_oliCancellations = a}) + . _Default + . _Coerce + +-- | Number of items canceled. +oliQuantityCanceled :: Lens' OrderLineItem (Maybe Word32) +oliQuantityCanceled + = lens _oliQuantityCanceled + (\ s a -> s{_oliQuantityCanceled = a}) + +-- | The id of the line item. +oliId :: Lens' OrderLineItem (Maybe Text) +oliId = lens _oliId (\ s a -> s{_oliId = a}) + +-- | Total tax amount for the line item. For example, if two items are +-- purchased, and each have a cost tax of $2, the total tax amount will be +-- $4. +oliTax :: Lens' OrderLineItem (Maybe (Maybe Price)) +oliTax = lens _oliTax (\ s a -> s{_oliTax = a}) + +-- | Total price for the line item. For example, if two items for $10 are +-- purchased, the total price will be $20. +oliPrice :: Lens' OrderLineItem (Maybe (Maybe Price)) +oliPrice = lens _oliPrice (\ s a -> s{_oliPrice = a}) + +-- | Number of items shipped. +oliQuantityShipped :: Lens' OrderLineItem (Maybe Word32) +oliQuantityShipped + = lens _oliQuantityShipped + (\ s a -> s{_oliQuantityShipped = a}) + +-- | Number of items returned. +oliQuantityReturned :: Lens' OrderLineItem (Maybe Word32) +oliQuantityReturned + = lens _oliQuantityReturned + (\ s a -> s{_oliQuantityReturned = a}) + +-- | Product data from the time of the order placement. +oliProduct :: Lens' OrderLineItem (Maybe (Maybe OrderLineItemProduct)) +oliProduct + = lens _oliProduct (\ s a -> s{_oliProduct = a}) + +-- | Returns of the line item. +oliReturns :: Lens' OrderLineItem [Maybe OrderReturn] +oliReturns + = lens _oliReturns (\ s a -> s{_oliReturns = a}) . + _Default + . _Coerce + +instance FromJSON OrderLineItem where + parseJSON + = withObject "OrderLineItem" + (\ o -> + OrderLineItem <$> + (o .:? "quantityOrdered") <*> (o .:? "returnInfo") + <*> (o .:? "quantityDelivered") + <*> (o .:? "shippingDetails") + <*> (o .:? "quantityPending") + <*> (o .:? "cancellations" .!= mempty) + <*> (o .:? "quantityCanceled") + <*> (o .:? "id") + <*> (o .:? "tax") + <*> (o .:? "price") + <*> (o .:? "quantityShipped") + <*> (o .:? "quantityReturned") + <*> (o .:? "product") + <*> (o .:? "returns" .!= mempty)) + +instance ToJSON OrderLineItem where + toJSON OrderLineItem{..} + = object + (catMaybes + [("quantityOrdered" .=) <$> _oliQuantityOrdered, + ("returnInfo" .=) <$> _oliReturnInfo, + ("quantityDelivered" .=) <$> _oliQuantityDelivered, + ("shippingDetails" .=) <$> _oliShippingDetails, + ("quantityPending" .=) <$> _oliQuantityPending, + ("cancellations" .=) <$> _oliCancellations, + ("quantityCanceled" .=) <$> _oliQuantityCanceled, + ("id" .=) <$> _oliId, ("tax" .=) <$> _oliTax, + ("price" .=) <$> _oliPrice, + ("quantityShipped" .=) <$> _oliQuantityShipped, + ("quantityReturned" .=) <$> _oliQuantityReturned, + ("product" .=) <$> _oliProduct, + ("returns" .=) <$> _oliReturns]) + +-- +-- /See:/ 'orderShipmentLineItemShipment' smart constructor. +data OrderShipmentLineItemShipment = OrderShipmentLineItemShipment + { _oslisQuantity :: !(Maybe Word32) + , _oslisLineItemId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderShipmentLineItemShipment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslisQuantity' +-- +-- * 'oslisLineItemId' +orderShipmentLineItemShipment + :: OrderShipmentLineItemShipment +orderShipmentLineItemShipment = + OrderShipmentLineItemShipment + { _oslisQuantity = Nothing + , _oslisLineItemId = Nothing + } + +-- | The quantity that is shipped. +oslisQuantity :: Lens' OrderShipmentLineItemShipment (Maybe Word32) +oslisQuantity + = lens _oslisQuantity + (\ s a -> s{_oslisQuantity = a}) + +-- | The id of the line item that is shipped. +oslisLineItemId :: Lens' OrderShipmentLineItemShipment (Maybe Text) +oslisLineItemId + = lens _oslisLineItemId + (\ s a -> s{_oslisLineItemId = a}) + +instance FromJSON OrderShipmentLineItemShipment where + parseJSON + = withObject "OrderShipmentLineItemShipment" + (\ o -> + OrderShipmentLineItemShipment <$> + (o .:? "quantity") <*> (o .:? "lineItemId")) + +instance ToJSON OrderShipmentLineItemShipment where + toJSON OrderShipmentLineItemShipment{..} + = object + (catMaybes + [("quantity" .=) <$> _oslisQuantity, + ("lineItemId" .=) <$> _oslisLineItemId]) + +-- +-- /See:/ 'ordersRefundResponse' smart constructor. +data OrdersRefundResponse = OrdersRefundResponse + { _orrKind :: !Text + , _orrExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersRefundResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orrKind' +-- +-- * 'orrExecutionStatus' +ordersRefundResponse + :: OrdersRefundResponse +ordersRefundResponse = + OrdersRefundResponse + { _orrKind = "content#ordersRefundResponse" + , _orrExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersRefundResponse\". +orrKind :: Lens' OrdersRefundResponse Text +orrKind = lens _orrKind (\ s a -> s{_orrKind = a}) + +-- | The status of the execution. +orrExecutionStatus :: Lens' OrdersRefundResponse (Maybe Text) +orrExecutionStatus + = lens _orrExecutionStatus + (\ s a -> s{_orrExecutionStatus = a}) + +instance FromJSON OrdersRefundResponse where + parseJSON + = withObject "OrdersRefundResponse" + (\ o -> + OrdersRefundResponse <$> + (o .:? "kind" .!= "content#ordersRefundResponse") <*> + (o .:? "executionStatus")) + +instance ToJSON OrdersRefundResponse where + toJSON OrdersRefundResponse{..} + = object + (catMaybes + [Just ("kind" .= _orrKind), + ("executionStatus" .=) <$> _orrExecutionStatus]) + +-- +-- /See:/ 'ordersCreateTestOrderRequest' smart constructor. +data OrdersCreateTestOrderRequest = OrdersCreateTestOrderRequest + { _octorTemplateName :: !(Maybe Text) + , _octorTestOrder :: !(Maybe (Maybe TestOrder)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCreateTestOrderRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'octorTemplateName' +-- +-- * 'octorTestOrder' +ordersCreateTestOrderRequest + :: OrdersCreateTestOrderRequest +ordersCreateTestOrderRequest = + OrdersCreateTestOrderRequest + { _octorTemplateName = Nothing + , _octorTestOrder = Nothing + } + +-- | The test order template to use. Specify as an alternative to testOrder +-- as a shortcut for retrieving a template and then creating an order using +-- that template. +octorTemplateName :: Lens' OrdersCreateTestOrderRequest (Maybe Text) +octorTemplateName + = lens _octorTemplateName + (\ s a -> s{_octorTemplateName = a}) + +-- | The test order to create. +octorTestOrder :: Lens' OrdersCreateTestOrderRequest (Maybe (Maybe TestOrder)) +octorTestOrder + = lens _octorTestOrder + (\ s a -> s{_octorTestOrder = a}) + +instance FromJSON OrdersCreateTestOrderRequest where + parseJSON + = withObject "OrdersCreateTestOrderRequest" + (\ o -> + OrdersCreateTestOrderRequest <$> + (o .:? "templateName") <*> (o .:? "testOrder")) + +instance ToJSON OrdersCreateTestOrderRequest where + toJSON OrdersCreateTestOrderRequest{..} + = object + (catMaybes + [("templateName" .=) <$> _octorTemplateName, + ("testOrder" .=) <$> _octorTestOrder]) + +-- +-- /See:/ 'ordersGetTestOrderTemplateResponse' smart constructor. +data OrdersGetTestOrderTemplateResponse = OrdersGetTestOrderTemplateResponse + { _ogtotrKind :: !Text + , _ogtotrTemplate :: !(Maybe (Maybe TestOrder)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGetTestOrderTemplateResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogtotrKind' +-- +-- * 'ogtotrTemplate' +ordersGetTestOrderTemplateResponse + :: OrdersGetTestOrderTemplateResponse +ordersGetTestOrderTemplateResponse = + OrdersGetTestOrderTemplateResponse + { _ogtotrKind = "content#ordersGetTestOrderTemplateResponse" + , _ogtotrTemplate = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersGetTestOrderTemplateResponse\". +ogtotrKind :: Lens' OrdersGetTestOrderTemplateResponse Text +ogtotrKind + = lens _ogtotrKind (\ s a -> s{_ogtotrKind = a}) + +-- | The requested test order template. +ogtotrTemplate :: Lens' OrdersGetTestOrderTemplateResponse (Maybe (Maybe TestOrder)) +ogtotrTemplate + = lens _ogtotrTemplate + (\ s a -> s{_ogtotrTemplate = a}) + +instance FromJSON OrdersGetTestOrderTemplateResponse + where + parseJSON + = withObject "OrdersGetTestOrderTemplateResponse" + (\ o -> + OrdersGetTestOrderTemplateResponse <$> + (o .:? "kind" .!= + "content#ordersGetTestOrderTemplateResponse") + <*> (o .:? "template")) + +instance ToJSON OrdersGetTestOrderTemplateResponse + where + toJSON OrdersGetTestOrderTemplateResponse{..} + = object + (catMaybes + [Just ("kind" .= _ogtotrKind), + ("template" .=) <$> _ogtotrTemplate]) + +-- | An error returned by the API. +-- +-- /See:/ 'error'' smart constructor. +data Error = Error + { _eDomain :: !(Maybe Text) + , _eReason :: !(Maybe Text) + , _eMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Error' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eDomain' +-- +-- * 'eReason' +-- +-- * 'eMessage' +error' + :: Error +error' = + Error + { _eDomain = Nothing + , _eReason = Nothing + , _eMessage = Nothing + } + +-- | The domain of the error. +eDomain :: Lens' Error (Maybe Text) +eDomain = lens _eDomain (\ s a -> s{_eDomain = a}) + +-- | The error code. +eReason :: Lens' Error (Maybe Text) +eReason = lens _eReason (\ s a -> s{_eReason = a}) + +-- | A description of the error. +eMessage :: Lens' Error (Maybe Text) +eMessage = lens _eMessage (\ s a -> s{_eMessage = a}) + +instance FromJSON Error where + parseJSON + = withObject "Error" + (\ o -> + Error <$> + (o .:? "domain") <*> (o .:? "reason") <*> + (o .:? "message")) + +instance ToJSON Error where + toJSON Error{..} + = object + (catMaybes + [("domain" .=) <$> _eDomain, + ("reason" .=) <$> _eReason, + ("message" .=) <$> _eMessage]) + +-- +-- /See:/ 'ordersCustomBatchRequest' smart constructor. +newtype OrdersCustomBatchRequest = OrdersCustomBatchRequest + { _ocbrEntries :: Maybe [Maybe OrdersCustomBatchRequestEntry] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrEntries' +ordersCustomBatchRequest + :: OrdersCustomBatchRequest +ordersCustomBatchRequest = + OrdersCustomBatchRequest + { _ocbrEntries = Nothing + } + +-- | The request entries to be processed in the batch. +ocbrEntries :: Lens' OrdersCustomBatchRequest [Maybe OrdersCustomBatchRequestEntry] +ocbrEntries + = lens _ocbrEntries (\ s a -> s{_ocbrEntries = a}) . + _Default + . _Coerce + +instance FromJSON OrdersCustomBatchRequest where + parseJSON + = withObject "OrdersCustomBatchRequest" + (\ o -> + OrdersCustomBatchRequest <$> + (o .:? "entries" .!= mempty)) + +instance ToJSON OrdersCustomBatchRequest where + toJSON OrdersCustomBatchRequest{..} + = object + (catMaybes [("entries" .=) <$> _ocbrEntries]) + +-- +-- /See:/ 'ordersShipLineItemsRequest' smart constructor. +data OrdersShipLineItemsRequest = OrdersShipLineItemsRequest + { _oslirCarrier :: !(Maybe Text) + , _oslirTrackingId :: !(Maybe Text) + , _oslirShipmentId :: !(Maybe Text) + , _oslirLineItems :: !(Maybe [Maybe OrderShipmentLineItemShipment]) + , _oslirOperationId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersShipLineItemsRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslirCarrier' +-- +-- * 'oslirTrackingId' +-- +-- * 'oslirShipmentId' +-- +-- * 'oslirLineItems' +-- +-- * 'oslirOperationId' +ordersShipLineItemsRequest + :: OrdersShipLineItemsRequest +ordersShipLineItemsRequest = + OrdersShipLineItemsRequest + { _oslirCarrier = Nothing + , _oslirTrackingId = Nothing + , _oslirShipmentId = Nothing + , _oslirLineItems = Nothing + , _oslirOperationId = Nothing + } + +-- | The carrier handling the shipment. +oslirCarrier :: Lens' OrdersShipLineItemsRequest (Maybe Text) +oslirCarrier + = lens _oslirCarrier (\ s a -> s{_oslirCarrier = a}) + +-- | The tracking id for the shipment. +oslirTrackingId :: Lens' OrdersShipLineItemsRequest (Maybe Text) +oslirTrackingId + = lens _oslirTrackingId + (\ s a -> s{_oslirTrackingId = a}) + +-- | The ID of the shipment. +oslirShipmentId :: Lens' OrdersShipLineItemsRequest (Maybe Text) +oslirShipmentId + = lens _oslirShipmentId + (\ s a -> s{_oslirShipmentId = a}) + +-- | Line items to ship. +oslirLineItems :: Lens' OrdersShipLineItemsRequest [Maybe OrderShipmentLineItemShipment] +oslirLineItems + = lens _oslirLineItems + (\ s a -> s{_oslirLineItems = a}) + . _Default + . _Coerce + +-- | The ID of the operation. Unique across all operations for a given order. +oslirOperationId :: Lens' OrdersShipLineItemsRequest (Maybe Text) +oslirOperationId + = lens _oslirOperationId + (\ s a -> s{_oslirOperationId = a}) + +instance FromJSON OrdersShipLineItemsRequest where + parseJSON + = withObject "OrdersShipLineItemsRequest" + (\ o -> + OrdersShipLineItemsRequest <$> + (o .:? "carrier") <*> (o .:? "trackingId") <*> + (o .:? "shipmentId") + <*> (o .:? "lineItems" .!= mempty) + <*> (o .:? "operationId")) + +instance ToJSON OrdersShipLineItemsRequest where + toJSON OrdersShipLineItemsRequest{..} + = object + (catMaybes + [("carrier" .=) <$> _oslirCarrier, + ("trackingId" .=) <$> _oslirTrackingId, + ("shipmentId" .=) <$> _oslirShipmentId, + ("lineItems" .=) <$> _oslirLineItems, + ("operationId" .=) <$> _oslirOperationId]) + +-- +-- /See:/ 'orderShipment' smart constructor. +data OrderShipment = OrderShipment + { _osCarrier :: !(Maybe Text) + , _osStatus :: !(Maybe Text) + , _osTrackingId :: !(Maybe Text) + , _osLineItems :: !(Maybe [Maybe OrderShipmentLineItemShipment]) + , _osId :: !(Maybe Text) + , _osCreationDate :: !(Maybe Text) + , _osDeliveryDate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderShipment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'osCarrier' +-- +-- * 'osStatus' +-- +-- * 'osTrackingId' +-- +-- * 'osLineItems' +-- +-- * 'osId' +-- +-- * 'osCreationDate' +-- +-- * 'osDeliveryDate' +orderShipment + :: OrderShipment +orderShipment = + OrderShipment + { _osCarrier = Nothing + , _osStatus = Nothing + , _osTrackingId = Nothing + , _osLineItems = Nothing + , _osId = Nothing + , _osCreationDate = Nothing + , _osDeliveryDate = Nothing + } + +-- | The carrier handling the shipment. +osCarrier :: Lens' OrderShipment (Maybe Text) +osCarrier + = lens _osCarrier (\ s a -> s{_osCarrier = a}) + +-- | The status of the shipment. +osStatus :: Lens' OrderShipment (Maybe Text) +osStatus = lens _osStatus (\ s a -> s{_osStatus = a}) + +-- | The tracking id for the shipment. +osTrackingId :: Lens' OrderShipment (Maybe Text) +osTrackingId + = lens _osTrackingId (\ s a -> s{_osTrackingId = a}) + +-- | The line items that are shipped. +osLineItems :: Lens' OrderShipment [Maybe OrderShipmentLineItemShipment] +osLineItems + = lens _osLineItems (\ s a -> s{_osLineItems = a}) . + _Default + . _Coerce + +-- | The id of the shipment. +osId :: Lens' OrderShipment (Maybe Text) +osId = lens _osId (\ s a -> s{_osId = a}) + +-- | Date on which the shipment has been created, in ISO 8601 format. +osCreationDate :: Lens' OrderShipment (Maybe Text) +osCreationDate + = lens _osCreationDate + (\ s a -> s{_osCreationDate = a}) + +-- | Date on which the shipment has been delivered, in ISO 8601 format. +-- Present only if status is delievered +osDeliveryDate :: Lens' OrderShipment (Maybe Text) +osDeliveryDate + = lens _osDeliveryDate + (\ s a -> s{_osDeliveryDate = a}) + +instance FromJSON OrderShipment where + parseJSON + = withObject "OrderShipment" + (\ o -> + OrderShipment <$> + (o .:? "carrier") <*> (o .:? "status") <*> + (o .:? "trackingId") + <*> (o .:? "lineItems" .!= mempty) + <*> (o .:? "id") + <*> (o .:? "creationDate") + <*> (o .:? "deliveryDate")) + +instance ToJSON OrderShipment where + toJSON OrderShipment{..} + = object + (catMaybes + [("carrier" .=) <$> _osCarrier, + ("status" .=) <$> _osStatus, + ("trackingId" .=) <$> _osTrackingId, + ("lineItems" .=) <$> _osLineItems, + ("id" .=) <$> _osId, + ("creationDate" .=) <$> _osCreationDate, + ("deliveryDate" .=) <$> _osDeliveryDate]) + +-- +-- /See:/ 'orderLineItemReturnInfo' smart constructor. +data OrderLineItemReturnInfo = OrderLineItemReturnInfo + { _oliriIsReturnable :: !(Maybe Bool) + , _oliriPolicyUrl :: !(Maybe Text) + , _oliriDaysToReturn :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItemReturnInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oliriIsReturnable' +-- +-- * 'oliriPolicyUrl' +-- +-- * 'oliriDaysToReturn' +orderLineItemReturnInfo + :: OrderLineItemReturnInfo +orderLineItemReturnInfo = + OrderLineItemReturnInfo + { _oliriIsReturnable = Nothing + , _oliriPolicyUrl = Nothing + , _oliriDaysToReturn = Nothing + } + +-- | Whether the item is returnable. +oliriIsReturnable :: Lens' OrderLineItemReturnInfo (Maybe Bool) +oliriIsReturnable + = lens _oliriIsReturnable + (\ s a -> s{_oliriIsReturnable = a}) + +-- | URL of the item return policy. +oliriPolicyUrl :: Lens' OrderLineItemReturnInfo (Maybe Text) +oliriPolicyUrl + = lens _oliriPolicyUrl + (\ s a -> s{_oliriPolicyUrl = a}) + +-- | How many days later the item can be returned. +oliriDaysToReturn :: Lens' OrderLineItemReturnInfo (Maybe Int32) +oliriDaysToReturn + = lens _oliriDaysToReturn + (\ s a -> s{_oliriDaysToReturn = a}) + +instance FromJSON OrderLineItemReturnInfo where + parseJSON + = withObject "OrderLineItemReturnInfo" + (\ o -> + OrderLineItemReturnInfo <$> + (o .:? "isReturnable") <*> (o .:? "policyUrl") <*> + (o .:? "daysToReturn")) + +instance ToJSON OrderLineItemReturnInfo where + toJSON OrderLineItemReturnInfo{..} + = object + (catMaybes + [("isReturnable" .=) <$> _oliriIsReturnable, + ("policyUrl" .=) <$> _oliriPolicyUrl, + ("daysToReturn" .=) <$> _oliriDaysToReturn]) + +-- +-- /See:/ 'ordersCancelLineItemRequest' smart constructor. +data OrdersCancelLineItemRequest = OrdersCancelLineItemRequest + { _oclirQuantity :: !(Maybe Word32) + , _oclirLineItemId :: !(Maybe Text) + , _oclirReason :: !(Maybe Text) + , _oclirOperationId :: !(Maybe Text) + , _oclirReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancelLineItemRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oclirQuantity' +-- +-- * 'oclirLineItemId' +-- +-- * 'oclirReason' +-- +-- * 'oclirOperationId' +-- +-- * 'oclirReasonText' +ordersCancelLineItemRequest + :: OrdersCancelLineItemRequest +ordersCancelLineItemRequest = + OrdersCancelLineItemRequest + { _oclirQuantity = Nothing + , _oclirLineItemId = Nothing + , _oclirReason = Nothing + , _oclirOperationId = Nothing + , _oclirReasonText = Nothing + } + +-- | The quantity to cancel. +oclirQuantity :: Lens' OrdersCancelLineItemRequest (Maybe Word32) +oclirQuantity + = lens _oclirQuantity + (\ s a -> s{_oclirQuantity = a}) + +-- | The ID of the line item to cancel. +oclirLineItemId :: Lens' OrdersCancelLineItemRequest (Maybe Text) +oclirLineItemId + = lens _oclirLineItemId + (\ s a -> s{_oclirLineItemId = a}) + +-- | The reason for the cancellation. +oclirReason :: Lens' OrdersCancelLineItemRequest (Maybe Text) +oclirReason + = lens _oclirReason (\ s a -> s{_oclirReason = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +oclirOperationId :: Lens' OrdersCancelLineItemRequest (Maybe Text) +oclirOperationId + = lens _oclirOperationId + (\ s a -> s{_oclirOperationId = a}) + +-- | The explanation of the reason. +oclirReasonText :: Lens' OrdersCancelLineItemRequest (Maybe Text) +oclirReasonText + = lens _oclirReasonText + (\ s a -> s{_oclirReasonText = a}) + +instance FromJSON OrdersCancelLineItemRequest where + parseJSON + = withObject "OrdersCancelLineItemRequest" + (\ o -> + OrdersCancelLineItemRequest <$> + (o .:? "quantity") <*> (o .:? "lineItemId") <*> + (o .:? "reason") + <*> (o .:? "operationId") + <*> (o .:? "reasonText")) + +instance ToJSON OrdersCancelLineItemRequest where + toJSON OrdersCancelLineItemRequest{..} + = object + (catMaybes + [("quantity" .=) <$> _oclirQuantity, + ("lineItemId" .=) <$> _oclirLineItemId, + ("reason" .=) <$> _oclirReason, + ("operationId" .=) <$> _oclirOperationId, + ("reasonText" .=) <$> _oclirReasonText]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryCancel' smart constructor. +data OrdersCustomBatchRequestEntryCancel = OrdersCustomBatchRequestEntryCancel + { _ocbrecReason :: !(Maybe Text) + , _ocbrecReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryCancel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrecReason' +-- +-- * 'ocbrecReasonText' +ordersCustomBatchRequestEntryCancel + :: OrdersCustomBatchRequestEntryCancel +ordersCustomBatchRequestEntryCancel = + OrdersCustomBatchRequestEntryCancel + { _ocbrecReason = Nothing + , _ocbrecReasonText = Nothing + } + +-- | The reason for the cancellation. +ocbrecReason :: Lens' OrdersCustomBatchRequestEntryCancel (Maybe Text) +ocbrecReason + = lens _ocbrecReason (\ s a -> s{_ocbrecReason = a}) + +-- | The explanation of the reason. +ocbrecReasonText :: Lens' OrdersCustomBatchRequestEntryCancel (Maybe Text) +ocbrecReasonText + = lens _ocbrecReasonText + (\ s a -> s{_ocbrecReasonText = a}) + +instance FromJSON OrdersCustomBatchRequestEntryCancel + where + parseJSON + = withObject "OrdersCustomBatchRequestEntryCancel" + (\ o -> + OrdersCustomBatchRequestEntryCancel <$> + (o .:? "reason") <*> (o .:? "reasonText")) + +instance ToJSON OrdersCustomBatchRequestEntryCancel + where + toJSON OrdersCustomBatchRequestEntryCancel{..} + = object + (catMaybes + [("reason" .=) <$> _ocbrecReason, + ("reasonText" .=) <$> _ocbrecReasonText]) + +-- +-- /See:/ 'ordersShipLineItemsResponse' smart constructor. +data OrdersShipLineItemsResponse = OrdersShipLineItemsResponse + { _oslirKind :: !Text + , _oslirExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersShipLineItemsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oslirKind' +-- +-- * 'oslirExecutionStatus' +ordersShipLineItemsResponse + :: OrdersShipLineItemsResponse +ordersShipLineItemsResponse = + OrdersShipLineItemsResponse + { _oslirKind = "content#ordersShipLineItemsResponse" + , _oslirExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersShipLineItemsResponse\". +oslirKind :: Lens' OrdersShipLineItemsResponse Text +oslirKind + = lens _oslirKind (\ s a -> s{_oslirKind = a}) + +-- | The status of the execution. +oslirExecutionStatus :: Lens' OrdersShipLineItemsResponse (Maybe Text) +oslirExecutionStatus + = lens _oslirExecutionStatus + (\ s a -> s{_oslirExecutionStatus = a}) + +instance FromJSON OrdersShipLineItemsResponse where + parseJSON + = withObject "OrdersShipLineItemsResponse" + (\ o -> + OrdersShipLineItemsResponse <$> + (o .:? "kind" .!= + "content#ordersShipLineItemsResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersShipLineItemsResponse where + toJSON OrdersShipLineItemsResponse{..} + = object + (catMaybes + [Just ("kind" .= _oslirKind), + ("executionStatus" .=) <$> _oslirExecutionStatus]) + +-- +-- /See:/ 'ordersListResponse' smart constructor. +data OrdersListResponse = OrdersListResponse + { _olrNextPageToken :: !(Maybe Text) + , _olrKind :: !Text + , _olrResources :: !(Maybe [Maybe Order]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olrNextPageToken' +-- +-- * 'olrKind' +-- +-- * 'olrResources' +ordersListResponse + :: OrdersListResponse +ordersListResponse = + OrdersListResponse + { _olrNextPageToken = Nothing + , _olrKind = "content#ordersListResponse" + , _olrResources = Nothing + } + +-- | The token for the retrieval of the next page of orders. +olrNextPageToken :: Lens' OrdersListResponse (Maybe Text) +olrNextPageToken + = lens _olrNextPageToken + (\ s a -> s{_olrNextPageToken = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersListResponse\". +olrKind :: Lens' OrdersListResponse Text +olrKind = lens _olrKind (\ s a -> s{_olrKind = a}) + +olrResources :: Lens' OrdersListResponse [Maybe Order] +olrResources + = lens _olrResources (\ s a -> s{_olrResources = a}) + . _Default + . _Coerce + +instance FromJSON OrdersListResponse where + parseJSON + = withObject "OrdersListResponse" + (\ o -> + OrdersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "content#ordersListResponse") + <*> (o .:? "resources" .!= mempty)) + +instance ToJSON OrdersListResponse where + toJSON OrdersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olrNextPageToken, + Just ("kind" .= _olrKind), + ("resources" .=) <$> _olrResources]) + +-- +-- /See:/ 'ordersReturnLineItemResponse' smart constructor. +data OrdersReturnLineItemResponse = OrdersReturnLineItemResponse + { _orlirKind :: !Text + , _orlirExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersReturnLineItemResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'orlirKind' +-- +-- * 'orlirExecutionStatus' +ordersReturnLineItemResponse + :: OrdersReturnLineItemResponse +ordersReturnLineItemResponse = + OrdersReturnLineItemResponse + { _orlirKind = "content#ordersReturnLineItemResponse" + , _orlirExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersReturnLineItemResponse\". +orlirKind :: Lens' OrdersReturnLineItemResponse Text +orlirKind + = lens _orlirKind (\ s a -> s{_orlirKind = a}) + +-- | The status of the execution. +orlirExecutionStatus :: Lens' OrdersReturnLineItemResponse (Maybe Text) +orlirExecutionStatus + = lens _orlirExecutionStatus + (\ s a -> s{_orlirExecutionStatus = a}) + +instance FromJSON OrdersReturnLineItemResponse where + parseJSON + = withObject "OrdersReturnLineItemResponse" + (\ o -> + OrdersReturnLineItemResponse <$> + (o .:? "kind" .!= + "content#ordersReturnLineItemResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersReturnLineItemResponse where + toJSON OrdersReturnLineItemResponse{..} + = object + (catMaybes + [Just ("kind" .= _orlirKind), + ("executionStatus" .=) <$> _orlirExecutionStatus]) + +-- +-- /See:/ 'ordersUpdateShipmentResponse' smart constructor. +data OrdersUpdateShipmentResponse = OrdersUpdateShipmentResponse + { _ousrKind :: !Text + , _ousrExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdateShipmentResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ousrKind' +-- +-- * 'ousrExecutionStatus' +ordersUpdateShipmentResponse + :: OrdersUpdateShipmentResponse +ordersUpdateShipmentResponse = + OrdersUpdateShipmentResponse + { _ousrKind = "content#ordersUpdateShipmentResponse" + , _ousrExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersUpdateShipmentResponse\". +ousrKind :: Lens' OrdersUpdateShipmentResponse Text +ousrKind = lens _ousrKind (\ s a -> s{_ousrKind = a}) + +-- | The status of the execution. +ousrExecutionStatus :: Lens' OrdersUpdateShipmentResponse (Maybe Text) +ousrExecutionStatus + = lens _ousrExecutionStatus + (\ s a -> s{_ousrExecutionStatus = a}) + +instance FromJSON OrdersUpdateShipmentResponse where + parseJSON + = withObject "OrdersUpdateShipmentResponse" + (\ o -> + OrdersUpdateShipmentResponse <$> + (o .:? "kind" .!= + "content#ordersUpdateShipmentResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersUpdateShipmentResponse where + toJSON OrdersUpdateShipmentResponse{..} + = object + (catMaybes + [Just ("kind" .= _ousrKind), + ("executionStatus" .=) <$> _ousrExecutionStatus]) + +-- +-- /See:/ 'ordersCancelRequest' smart constructor. +data OrdersCancelRequest = OrdersCancelRequest + { _ocrReason :: !(Maybe Text) + , _ocrOperationId :: !(Maybe Text) + , _ocrReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancelRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocrReason' +-- +-- * 'ocrOperationId' +-- +-- * 'ocrReasonText' +ordersCancelRequest + :: OrdersCancelRequest +ordersCancelRequest = + OrdersCancelRequest + { _ocrReason = Nothing + , _ocrOperationId = Nothing + , _ocrReasonText = Nothing + } + +-- | The reason for the cancellation. +ocrReason :: Lens' OrdersCancelRequest (Maybe Text) +ocrReason + = lens _ocrReason (\ s a -> s{_ocrReason = a}) + +-- | The ID of the operation. Unique across all operations for a given order. +ocrOperationId :: Lens' OrdersCancelRequest (Maybe Text) +ocrOperationId + = lens _ocrOperationId + (\ s a -> s{_ocrOperationId = a}) + +-- | The explanation of the reason. +ocrReasonText :: Lens' OrdersCancelRequest (Maybe Text) +ocrReasonText + = lens _ocrReasonText + (\ s a -> s{_ocrReasonText = a}) + +instance FromJSON OrdersCancelRequest where + parseJSON + = withObject "OrdersCancelRequest" + (\ o -> + OrdersCancelRequest <$> + (o .:? "reason") <*> (o .:? "operationId") <*> + (o .:? "reasonText")) + +instance ToJSON OrdersCancelRequest where + toJSON OrdersCancelRequest{..} + = object + (catMaybes + [("reason" .=) <$> _ocrReason, + ("operationId" .=) <$> _ocrOperationId, + ("reasonText" .=) <$> _ocrReasonText]) + +-- +-- /See:/ 'orderCustomer' smart constructor. +data OrderCustomer = OrderCustomer + { _ocFullName :: !(Maybe Text) + , _ocEmail :: !(Maybe Text) + , _ocExplicitMarketingPreference :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderCustomer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocFullName' +-- +-- * 'ocEmail' +-- +-- * 'ocExplicitMarketingPreference' +orderCustomer + :: OrderCustomer +orderCustomer = + OrderCustomer + { _ocFullName = Nothing + , _ocEmail = Nothing + , _ocExplicitMarketingPreference = Nothing + } + +-- | Full name of the customer. +ocFullName :: Lens' OrderCustomer (Maybe Text) +ocFullName + = lens _ocFullName (\ s a -> s{_ocFullName = a}) + +-- | Email address of the customer. +ocEmail :: Lens' OrderCustomer (Maybe Text) +ocEmail = lens _ocEmail (\ s a -> s{_ocEmail = a}) + +-- | If set, this indicates the user had a choice to opt in or out of +-- providing marketing rights to the merchant. If unset, this indicates the +-- user has already made this choice in a previous purchase, and was thus +-- not shown the marketing right opt in\/out checkbox during the Purchases +-- on Google checkout flow. +ocExplicitMarketingPreference :: Lens' OrderCustomer (Maybe Bool) +ocExplicitMarketingPreference + = lens _ocExplicitMarketingPreference + (\ s a -> s{_ocExplicitMarketingPreference = a}) + +instance FromJSON OrderCustomer where + parseJSON + = withObject "OrderCustomer" + (\ o -> + OrderCustomer <$> + (o .:? "fullName") <*> (o .:? "email") <*> + (o .:? "explicitMarketingPreference")) + +instance ToJSON OrderCustomer where + toJSON OrderCustomer{..} + = object + (catMaybes + [("fullName" .=) <$> _ocFullName, + ("email" .=) <$> _ocEmail, + ("explicitMarketingPreference" .=) <$> + _ocExplicitMarketingPreference]) + +-- +-- /See:/ 'ordersGetByMerchantOrderIdResponse' smart constructor. +data OrdersGetByMerchantOrderIdResponse = OrdersGetByMerchantOrderIdResponse + { _ogbmoirKind :: !Text + , _ogbmoirOrder :: !(Maybe (Maybe Order)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersGetByMerchantOrderIdResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogbmoirKind' +-- +-- * 'ogbmoirOrder' +ordersGetByMerchantOrderIdResponse + :: OrdersGetByMerchantOrderIdResponse +ordersGetByMerchantOrderIdResponse = + OrdersGetByMerchantOrderIdResponse + { _ogbmoirKind = "content#ordersGetByMerchantOrderIdResponse" + , _ogbmoirOrder = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersGetByMerchantOrderIdResponse\". +ogbmoirKind :: Lens' OrdersGetByMerchantOrderIdResponse Text +ogbmoirKind + = lens _ogbmoirKind (\ s a -> s{_ogbmoirKind = a}) + +-- | The requested order. +ogbmoirOrder :: Lens' OrdersGetByMerchantOrderIdResponse (Maybe (Maybe Order)) +ogbmoirOrder + = lens _ogbmoirOrder (\ s a -> s{_ogbmoirOrder = a}) + +instance FromJSON OrdersGetByMerchantOrderIdResponse + where + parseJSON + = withObject "OrdersGetByMerchantOrderIdResponse" + (\ o -> + OrdersGetByMerchantOrderIdResponse <$> + (o .:? "kind" .!= + "content#ordersGetByMerchantOrderIdResponse") + <*> (o .:? "order")) + +instance ToJSON OrdersGetByMerchantOrderIdResponse + where + toJSON OrdersGetByMerchantOrderIdResponse{..} + = object + (catMaybes + [Just ("kind" .= _ogbmoirKind), + ("order" .=) <$> _ogbmoirOrder]) + +-- +-- /See:/ 'orderLineItemShippingDetails' smart constructor. +data OrderLineItemShippingDetails = OrderLineItemShippingDetails + { _olisdShipByDate :: !(Maybe Text) + , _olisdMethod :: !(Maybe (Maybe OrderLineItemShippingDetailsMethod)) + , _olisdDeliverByDate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItemShippingDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olisdShipByDate' +-- +-- * 'olisdMethod' +-- +-- * 'olisdDeliverByDate' +orderLineItemShippingDetails + :: OrderLineItemShippingDetails +orderLineItemShippingDetails = + OrderLineItemShippingDetails + { _olisdShipByDate = Nothing + , _olisdMethod = Nothing + , _olisdDeliverByDate = Nothing + } + +-- | The ship by date, in ISO 8601 format. +olisdShipByDate :: Lens' OrderLineItemShippingDetails (Maybe Text) +olisdShipByDate + = lens _olisdShipByDate + (\ s a -> s{_olisdShipByDate = a}) + +-- | Details of the shipping method. +olisdMethod :: Lens' OrderLineItemShippingDetails (Maybe (Maybe OrderLineItemShippingDetailsMethod)) +olisdMethod + = lens _olisdMethod (\ s a -> s{_olisdMethod = a}) + +-- | The delivery by date, in ISO 8601 format. +olisdDeliverByDate :: Lens' OrderLineItemShippingDetails (Maybe Text) +olisdDeliverByDate + = lens _olisdDeliverByDate + (\ s a -> s{_olisdDeliverByDate = a}) + +instance FromJSON OrderLineItemShippingDetails where + parseJSON + = withObject "OrderLineItemShippingDetails" + (\ o -> + OrderLineItemShippingDetails <$> + (o .:? "shipByDate") <*> (o .:? "method") <*> + (o .:? "deliverByDate")) + +instance ToJSON OrderLineItemShippingDetails where + toJSON OrderLineItemShippingDetails{..} + = object + (catMaybes + [("shipByDate" .=) <$> _olisdShipByDate, + ("method" .=) <$> _olisdMethod, + ("deliverByDate" .=) <$> _olisdDeliverByDate]) + +-- +-- /See:/ 'price' smart constructor. +data Price = Price + { _pValue :: !(Maybe Text) + , _pCurrency :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Price' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pValue' +-- +-- * 'pCurrency' +price + :: Price +price = + Price + { _pValue = Nothing + , _pCurrency = Nothing + } + +-- | The price represented as a number. +pValue :: Lens' Price (Maybe Text) +pValue = lens _pValue (\ s a -> s{_pValue = a}) + +-- | The currency of the price. +pCurrency :: Lens' Price (Maybe Text) +pCurrency + = lens _pCurrency (\ s a -> s{_pCurrency = a}) + +instance FromJSON Price where + parseJSON + = withObject "Price" + (\ o -> + Price <$> (o .:? "value") <*> (o .:? "currency")) + +instance ToJSON Price where + toJSON Price{..} + = object + (catMaybes + [("value" .=) <$> _pValue, + ("currency" .=) <$> _pCurrency]) + +-- +-- /See:/ 'orderLineItemProductVariantAttribute' smart constructor. +data OrderLineItemProductVariantAttribute = OrderLineItemProductVariantAttribute + { _olipvaDimension :: !(Maybe Text) + , _olipvaValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItemProductVariantAttribute' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olipvaDimension' +-- +-- * 'olipvaValue' +orderLineItemProductVariantAttribute + :: OrderLineItemProductVariantAttribute +orderLineItemProductVariantAttribute = + OrderLineItemProductVariantAttribute + { _olipvaDimension = Nothing + , _olipvaValue = Nothing + } + +-- | The dimension of the variant. +olipvaDimension :: Lens' OrderLineItemProductVariantAttribute (Maybe Text) +olipvaDimension + = lens _olipvaDimension + (\ s a -> s{_olipvaDimension = a}) + +-- | The value for the dimension. +olipvaValue :: Lens' OrderLineItemProductVariantAttribute (Maybe Text) +olipvaValue + = lens _olipvaValue (\ s a -> s{_olipvaValue = a}) + +instance FromJSON + OrderLineItemProductVariantAttribute where + parseJSON + = withObject "OrderLineItemProductVariantAttribute" + (\ o -> + OrderLineItemProductVariantAttribute <$> + (o .:? "dimension") <*> (o .:? "value")) + +instance ToJSON OrderLineItemProductVariantAttribute + where + toJSON OrderLineItemProductVariantAttribute{..} + = object + (catMaybes + [("dimension" .=) <$> _olipvaDimension, + ("value" .=) <$> _olipvaValue]) + +-- +-- /See:/ 'ordersCustomBatchResponseEntry' smart constructor. +data OrdersCustomBatchResponseEntry = OrdersCustomBatchResponseEntry + { _oKind :: !Text + , _oExecutionStatus :: !(Maybe Text) + , _oErrors :: !(Maybe (Maybe Errors)) + , _oOrder :: !(Maybe (Maybe Order)) + , _oBatchId :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchResponseEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oKind' +-- +-- * 'oExecutionStatus' +-- +-- * 'oErrors' +-- +-- * 'oOrder' +-- +-- * 'oBatchId' +ordersCustomBatchResponseEntry + :: OrdersCustomBatchResponseEntry +ordersCustomBatchResponseEntry = + OrdersCustomBatchResponseEntry + { _oKind = "content#ordersCustomBatchResponseEntry" + , _oExecutionStatus = Nothing + , _oErrors = Nothing + , _oOrder = Nothing + , _oBatchId = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersCustomBatchResponseEntry\". +oKind :: Lens' OrdersCustomBatchResponseEntry Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | The status of the execution. Only defined if the method is not get or +-- getByMerchantOrderId and if the request was successful. +oExecutionStatus :: Lens' OrdersCustomBatchResponseEntry (Maybe Text) +oExecutionStatus + = lens _oExecutionStatus + (\ s a -> s{_oExecutionStatus = a}) + +-- | A list of errors defined if and only if the request failed. +oErrors :: Lens' OrdersCustomBatchResponseEntry (Maybe (Maybe Errors)) +oErrors = lens _oErrors (\ s a -> s{_oErrors = a}) + +-- | The retrieved order. Only defined if the method is get and if the +-- request was successful. +oOrder :: Lens' OrdersCustomBatchResponseEntry (Maybe (Maybe Order)) +oOrder = lens _oOrder (\ s a -> s{_oOrder = a}) + +-- | The ID of the request entry this entry responds to. +oBatchId :: Lens' OrdersCustomBatchResponseEntry (Maybe Word32) +oBatchId = lens _oBatchId (\ s a -> s{_oBatchId = a}) + +instance FromJSON OrdersCustomBatchResponseEntry + where + parseJSON + = withObject "OrdersCustomBatchResponseEntry" + (\ o -> + OrdersCustomBatchResponseEntry <$> + (o .:? "kind" .!= + "content#ordersCustomBatchResponseEntry") + <*> (o .:? "executionStatus") + <*> (o .:? "errors") + <*> (o .:? "order") + <*> (o .:? "batchId")) + +instance ToJSON OrdersCustomBatchResponseEntry where + toJSON OrdersCustomBatchResponseEntry{..} + = object + (catMaybes + [Just ("kind" .= _oKind), + ("executionStatus" .=) <$> _oExecutionStatus, + ("errors" .=) <$> _oErrors, ("order" .=) <$> _oOrder, + ("batchId" .=) <$> _oBatchId]) + +-- +-- /See:/ 'testOrderLineItemProduct' smart constructor. +data TestOrderLineItemProduct = TestOrderLineItemProduct + { _tolipImageLink :: !(Maybe Text) + , _tolipChannel :: !(Maybe Text) + , _tolipBrand :: !(Maybe Text) + , _tolipTargetCountry :: !(Maybe Text) + , _tolipGtin :: !(Maybe Text) + , _tolipItemGroupId :: !(Maybe Text) + , _tolipOfferId :: !(Maybe Text) + , _tolipPrice :: !(Maybe (Maybe Price)) + , _tolipVariantAttributes :: !(Maybe [Maybe OrderLineItemProductVariantAttribute]) + , _tolipTitle :: !(Maybe Text) + , _tolipContentLanguage :: !(Maybe Text) + , _tolipMpn :: !(Maybe Text) + , _tolipCondition :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestOrderLineItemProduct' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tolipImageLink' +-- +-- * 'tolipChannel' +-- +-- * 'tolipBrand' +-- +-- * 'tolipTargetCountry' +-- +-- * 'tolipGtin' +-- +-- * 'tolipItemGroupId' +-- +-- * 'tolipOfferId' +-- +-- * 'tolipPrice' +-- +-- * 'tolipVariantAttributes' +-- +-- * 'tolipTitle' +-- +-- * 'tolipContentLanguage' +-- +-- * 'tolipMpn' +-- +-- * 'tolipCondition' +testOrderLineItemProduct + :: TestOrderLineItemProduct +testOrderLineItemProduct = + TestOrderLineItemProduct + { _tolipImageLink = Nothing + , _tolipChannel = Nothing + , _tolipBrand = Nothing + , _tolipTargetCountry = Nothing + , _tolipGtin = Nothing + , _tolipItemGroupId = Nothing + , _tolipOfferId = Nothing + , _tolipPrice = Nothing + , _tolipVariantAttributes = Nothing + , _tolipTitle = Nothing + , _tolipContentLanguage = Nothing + , _tolipMpn = Nothing + , _tolipCondition = Nothing + } + +-- | URL of an image of the item. +tolipImageLink :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipImageLink + = lens _tolipImageLink + (\ s a -> s{_tolipImageLink = a}) + +-- | The item\'s channel. +tolipChannel :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipChannel + = lens _tolipChannel (\ s a -> s{_tolipChannel = a}) + +-- | Brand of the item. +tolipBrand :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipBrand + = lens _tolipBrand (\ s a -> s{_tolipBrand = a}) + +-- | The CLDR territory code of the target country of the product. +tolipTargetCountry :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipTargetCountry + = lens _tolipTargetCountry + (\ s a -> s{_tolipTargetCountry = a}) + +-- | Global Trade Item Number (GTIN) of the item. Optional. +tolipGtin :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipGtin + = lens _tolipGtin (\ s a -> s{_tolipGtin = a}) + +-- | Shared identifier for all variants of the same product. Optional. +tolipItemGroupId :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipItemGroupId + = lens _tolipItemGroupId + (\ s a -> s{_tolipItemGroupId = a}) + +-- | An identifier of the item. +tolipOfferId :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipOfferId + = lens _tolipOfferId (\ s a -> s{_tolipOfferId = a}) + +-- | The price for the product. +tolipPrice :: Lens' TestOrderLineItemProduct (Maybe (Maybe Price)) +tolipPrice + = lens _tolipPrice (\ s a -> s{_tolipPrice = a}) + +-- | Variant attributes for the item. Optional. +tolipVariantAttributes :: Lens' TestOrderLineItemProduct [Maybe OrderLineItemProductVariantAttribute] +tolipVariantAttributes + = lens _tolipVariantAttributes + (\ s a -> s{_tolipVariantAttributes = a}) + . _Default + . _Coerce + +-- | The title of the product. +tolipTitle :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipTitle + = lens _tolipTitle (\ s a -> s{_tolipTitle = a}) + +-- | The two-letter ISO 639-1 language code for the item. +tolipContentLanguage :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipContentLanguage + = lens _tolipContentLanguage + (\ s a -> s{_tolipContentLanguage = a}) + +-- | Manufacturer Part Number (MPN) of the item. Optional. +tolipMpn :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipMpn = lens _tolipMpn (\ s a -> s{_tolipMpn = a}) + +-- | Condition or state of the item. +tolipCondition :: Lens' TestOrderLineItemProduct (Maybe Text) +tolipCondition + = lens _tolipCondition + (\ s a -> s{_tolipCondition = a}) + +instance FromJSON TestOrderLineItemProduct where + parseJSON + = withObject "TestOrderLineItemProduct" + (\ o -> + TestOrderLineItemProduct <$> + (o .:? "imageLink") <*> (o .:? "channel") <*> + (o .:? "brand") + <*> (o .:? "targetCountry") + <*> (o .:? "gtin") + <*> (o .:? "itemGroupId") + <*> (o .:? "offerId") + <*> (o .:? "price") + <*> (o .:? "variantAttributes" .!= mempty) + <*> (o .:? "title") + <*> (o .:? "contentLanguage") + <*> (o .:? "mpn") + <*> (o .:? "condition")) + +instance ToJSON TestOrderLineItemProduct where + toJSON TestOrderLineItemProduct{..} + = object + (catMaybes + [("imageLink" .=) <$> _tolipImageLink, + ("channel" .=) <$> _tolipChannel, + ("brand" .=) <$> _tolipBrand, + ("targetCountry" .=) <$> _tolipTargetCountry, + ("gtin" .=) <$> _tolipGtin, + ("itemGroupId" .=) <$> _tolipItemGroupId, + ("offerId" .=) <$> _tolipOfferId, + ("price" .=) <$> _tolipPrice, + ("variantAttributes" .=) <$> _tolipVariantAttributes, + ("title" .=) <$> _tolipTitle, + ("contentLanguage" .=) <$> _tolipContentLanguage, + ("mpn" .=) <$> _tolipMpn, + ("condition" .=) <$> _tolipCondition]) + +-- +-- /See:/ 'testOrder' smart constructor. +data TestOrder = TestOrder + { _toKind :: !Text + , _toLineItems :: !(Maybe [Maybe TestOrderLineItem]) + , _toShippingOption :: !(Maybe Text) + , _toPredefinedDeliveryAddress :: !(Maybe Text) + , _toShippingCostTax :: !(Maybe (Maybe Price)) + , _toCustomer :: !(Maybe (Maybe TestOrderCustomer)) + , _toPaymentMethod :: !(Maybe (Maybe TestOrderPaymentMethod)) + , _toShippingCost :: !(Maybe (Maybe Price)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestOrder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'toKind' +-- +-- * 'toLineItems' +-- +-- * 'toShippingOption' +-- +-- * 'toPredefinedDeliveryAddress' +-- +-- * 'toShippingCostTax' +-- +-- * 'toCustomer' +-- +-- * 'toPaymentMethod' +-- +-- * 'toShippingCost' +testOrder + :: TestOrder +testOrder = + TestOrder + { _toKind = "content#testOrder" + , _toLineItems = Nothing + , _toShippingOption = Nothing + , _toPredefinedDeliveryAddress = Nothing + , _toShippingCostTax = Nothing + , _toCustomer = Nothing + , _toPaymentMethod = Nothing + , _toShippingCost = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#testOrder\". +toKind :: Lens' TestOrder Text +toKind = lens _toKind (\ s a -> s{_toKind = a}) + +-- | Line items that are ordered. At least one line item must be provided. +toLineItems :: Lens' TestOrder [Maybe TestOrderLineItem] +toLineItems + = lens _toLineItems (\ s a -> s{_toLineItems = a}) . + _Default + . _Coerce + +-- | The requested shipping option. +toShippingOption :: Lens' TestOrder (Maybe Text) +toShippingOption + = lens _toShippingOption + (\ s a -> s{_toShippingOption = a}) + +-- | Identifier of one of the predefined delivery addresses for the delivery. +toPredefinedDeliveryAddress :: Lens' TestOrder (Maybe Text) +toPredefinedDeliveryAddress + = lens _toPredefinedDeliveryAddress + (\ s a -> s{_toPredefinedDeliveryAddress = a}) + +-- | The tax for the total shipping cost. +toShippingCostTax :: Lens' TestOrder (Maybe (Maybe Price)) +toShippingCostTax + = lens _toShippingCostTax + (\ s a -> s{_toShippingCostTax = a}) + +-- | The details of the customer who placed the order. +toCustomer :: Lens' TestOrder (Maybe (Maybe TestOrderCustomer)) +toCustomer + = lens _toCustomer (\ s a -> s{_toCustomer = a}) + +-- | The details of the payment method. +toPaymentMethod :: Lens' TestOrder (Maybe (Maybe TestOrderPaymentMethod)) +toPaymentMethod + = lens _toPaymentMethod + (\ s a -> s{_toPaymentMethod = a}) + +-- | The total cost of shipping for all items. +toShippingCost :: Lens' TestOrder (Maybe (Maybe Price)) +toShippingCost + = lens _toShippingCost + (\ s a -> s{_toShippingCost = a}) + +instance FromJSON TestOrder where + parseJSON + = withObject "TestOrder" + (\ o -> + TestOrder <$> + (o .:? "kind" .!= "content#testOrder") <*> + (o .:? "lineItems" .!= mempty) + <*> (o .:? "shippingOption") + <*> (o .:? "predefinedDeliveryAddress") + <*> (o .:? "shippingCostTax") + <*> (o .:? "customer") + <*> (o .:? "paymentMethod") + <*> (o .:? "shippingCost")) + +instance ToJSON TestOrder where + toJSON TestOrder{..} + = object + (catMaybes + [Just ("kind" .= _toKind), + ("lineItems" .=) <$> _toLineItems, + ("shippingOption" .=) <$> _toShippingOption, + ("predefinedDeliveryAddress" .=) <$> + _toPredefinedDeliveryAddress, + ("shippingCostTax" .=) <$> _toShippingCostTax, + ("customer" .=) <$> _toCustomer, + ("paymentMethod" .=) <$> _toPaymentMethod, + ("shippingCost" .=) <$> _toShippingCost]) + +-- +-- /See:/ 'orderRefund' smart constructor. +data OrderRefund = OrderRefund + { _oAmount :: !(Maybe (Maybe Price)) + , _oActor :: !(Maybe Text) + , _oReason :: !(Maybe Text) + , _oCreationDate :: !(Maybe Text) + , _oReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderRefund' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oAmount' +-- +-- * 'oActor' +-- +-- * 'oReason' +-- +-- * 'oCreationDate' +-- +-- * 'oReasonText' +orderRefund + :: OrderRefund +orderRefund = + OrderRefund + { _oAmount = Nothing + , _oActor = Nothing + , _oReason = Nothing + , _oCreationDate = Nothing + , _oReasonText = Nothing + } + +-- | The amount that is refunded. +oAmount :: Lens' OrderRefund (Maybe (Maybe Price)) +oAmount = lens _oAmount (\ s a -> s{_oAmount = a}) + +-- | The actor that created the refund. +oActor :: Lens' OrderRefund (Maybe Text) +oActor = lens _oActor (\ s a -> s{_oActor = a}) + +-- | The reason for the refund. +oReason :: Lens' OrderRefund (Maybe Text) +oReason = lens _oReason (\ s a -> s{_oReason = a}) + +-- | Date on which the item has been created, in ISO 8601 format. +oCreationDate :: Lens' OrderRefund (Maybe Text) +oCreationDate + = lens _oCreationDate + (\ s a -> s{_oCreationDate = a}) + +-- | The explanation of the reason. +oReasonText :: Lens' OrderRefund (Maybe Text) +oReasonText + = lens _oReasonText (\ s a -> s{_oReasonText = a}) + +instance FromJSON OrderRefund where + parseJSON + = withObject "OrderRefund" + (\ o -> + OrderRefund <$> + (o .:? "amount") <*> (o .:? "actor") <*> + (o .:? "reason") + <*> (o .:? "creationDate") + <*> (o .:? "reasonText")) + +instance ToJSON OrderRefund where + toJSON OrderRefund{..} + = object + (catMaybes + [("amount" .=) <$> _oAmount, + ("actor" .=) <$> _oActor, ("reason" .=) <$> _oReason, + ("creationDate" .=) <$> _oCreationDate, + ("reasonText" .=) <$> _oReasonText]) + +-- +-- /See:/ 'orderDeliveryDetails' smart constructor. +data OrderDeliveryDetails = OrderDeliveryDetails + { _oddAddress :: !(Maybe (Maybe OrderAddress)) + , _oddPhoneNumber :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderDeliveryDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oddAddress' +-- +-- * 'oddPhoneNumber' +orderDeliveryDetails + :: OrderDeliveryDetails +orderDeliveryDetails = + OrderDeliveryDetails + { _oddAddress = Nothing + , _oddPhoneNumber = Nothing + } + +-- | The delivery address +oddAddress :: Lens' OrderDeliveryDetails (Maybe (Maybe OrderAddress)) +oddAddress + = lens _oddAddress (\ s a -> s{_oddAddress = a}) + +-- | The phone number of the person receiving the delivery. +oddPhoneNumber :: Lens' OrderDeliveryDetails (Maybe Text) +oddPhoneNumber + = lens _oddPhoneNumber + (\ s a -> s{_oddPhoneNumber = a}) + +instance FromJSON OrderDeliveryDetails where + parseJSON + = withObject "OrderDeliveryDetails" + (\ o -> + OrderDeliveryDetails <$> + (o .:? "address") <*> (o .:? "phoneNumber")) + +instance ToJSON OrderDeliveryDetails where + toJSON OrderDeliveryDetails{..} + = object + (catMaybes + [("address" .=) <$> _oddAddress, + ("phoneNumber" .=) <$> _oddPhoneNumber]) + +-- +-- /See:/ 'orderAddress' smart constructor. +data OrderAddress = OrderAddress + { _oaRecipientName :: !(Maybe Text) + , _oaStreetAddress :: !(Maybe [Text]) + , _oaCountry :: !(Maybe Text) + , _oaPostalCode :: !(Maybe Text) + , _oaLocality :: !(Maybe Text) + , _oaIsPostOfficeBox :: !(Maybe Bool) + , _oaFullAddress :: !(Maybe [Text]) + , _oaRegion :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderAddress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaRecipientName' +-- +-- * 'oaStreetAddress' +-- +-- * 'oaCountry' +-- +-- * 'oaPostalCode' +-- +-- * 'oaLocality' +-- +-- * 'oaIsPostOfficeBox' +-- +-- * 'oaFullAddress' +-- +-- * 'oaRegion' +orderAddress + :: OrderAddress +orderAddress = + OrderAddress + { _oaRecipientName = Nothing + , _oaStreetAddress = Nothing + , _oaCountry = Nothing + , _oaPostalCode = Nothing + , _oaLocality = Nothing + , _oaIsPostOfficeBox = Nothing + , _oaFullAddress = Nothing + , _oaRegion = Nothing + } + +-- | Name of the recipient. +oaRecipientName :: Lens' OrderAddress (Maybe Text) +oaRecipientName + = lens _oaRecipientName + (\ s a -> s{_oaRecipientName = a}) + +-- | Street-level part of the address. +oaStreetAddress :: Lens' OrderAddress [Text] +oaStreetAddress + = lens _oaStreetAddress + (\ s a -> s{_oaStreetAddress = a}) + . _Default + . _Coerce + +-- | CLDR country code (e.g. \"US\"). +oaCountry :: Lens' OrderAddress (Maybe Text) +oaCountry + = lens _oaCountry (\ s a -> s{_oaCountry = a}) + +-- | Postal Code or ZIP (e.g. \"94043\"). +oaPostalCode :: Lens' OrderAddress (Maybe Text) +oaPostalCode + = lens _oaPostalCode (\ s a -> s{_oaPostalCode = a}) + +-- | City, town or commune. May also include dependent localities or +-- sublocalities (e.g. neighborhoods or suburbs). +oaLocality :: Lens' OrderAddress (Maybe Text) +oaLocality + = lens _oaLocality (\ s a -> s{_oaLocality = a}) + +-- | Whether the address is a post office box. +oaIsPostOfficeBox :: Lens' OrderAddress (Maybe Bool) +oaIsPostOfficeBox + = lens _oaIsPostOfficeBox + (\ s a -> s{_oaIsPostOfficeBox = a}) + +-- | Strings representing the lines of the printed label for mailing the +-- order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, +-- CA, 94043 United States +oaFullAddress :: Lens' OrderAddress [Text] +oaFullAddress + = lens _oaFullAddress + (\ s a -> s{_oaFullAddress = a}) + . _Default + . _Coerce + +-- | Top-level administrative subdivision of the country (e.g. \"CA\"). +oaRegion :: Lens' OrderAddress (Maybe Text) +oaRegion = lens _oaRegion (\ s a -> s{_oaRegion = a}) + +instance FromJSON OrderAddress where + parseJSON + = withObject "OrderAddress" + (\ o -> + OrderAddress <$> + (o .:? "recipientName") <*> + (o .:? "streetAddress" .!= mempty) + <*> (o .:? "country") + <*> (o .:? "postalCode") + <*> (o .:? "locality") + <*> (o .:? "isPostOfficeBox") + <*> (o .:? "fullAddress" .!= mempty) + <*> (o .:? "region")) + +instance ToJSON OrderAddress where + toJSON OrderAddress{..} + = object + (catMaybes + [("recipientName" .=) <$> _oaRecipientName, + ("streetAddress" .=) <$> _oaStreetAddress, + ("country" .=) <$> _oaCountry, + ("postalCode" .=) <$> _oaPostalCode, + ("locality" .=) <$> _oaLocality, + ("isPostOfficeBox" .=) <$> _oaIsPostOfficeBox, + ("fullAddress" .=) <$> _oaFullAddress, + ("region" .=) <$> _oaRegion]) + +-- +-- /See:/ 'ordersCancelResponse' smart constructor. +data OrdersCancelResponse = OrdersCancelResponse + { _ocrKind :: !Text + , _ocrExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancelResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocrKind' +-- +-- * 'ocrExecutionStatus' +ordersCancelResponse + :: OrdersCancelResponse +ordersCancelResponse = + OrdersCancelResponse + { _ocrKind = "content#ordersCancelResponse" + , _ocrExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersCancelResponse\". +ocrKind :: Lens' OrdersCancelResponse Text +ocrKind = lens _ocrKind (\ s a -> s{_ocrKind = a}) + +-- | The status of the execution. +ocrExecutionStatus :: Lens' OrdersCancelResponse (Maybe Text) +ocrExecutionStatus + = lens _ocrExecutionStatus + (\ s a -> s{_ocrExecutionStatus = a}) + +instance FromJSON OrdersCancelResponse where + parseJSON + = withObject "OrdersCancelResponse" + (\ o -> + OrdersCancelResponse <$> + (o .:? "kind" .!= "content#ordersCancelResponse") <*> + (o .:? "executionStatus")) + +instance ToJSON OrdersCancelResponse where + toJSON OrdersCancelResponse{..} + = object + (catMaybes + [Just ("kind" .= _ocrKind), + ("executionStatus" .=) <$> _ocrExecutionStatus]) + +-- +-- /See:/ 'testOrderLineItem' smart constructor. +data TestOrderLineItem = TestOrderLineItem + { _toliQuantityOrdered :: !(Maybe Word32) + , _toliReturnInfo :: !(Maybe (Maybe OrderLineItemReturnInfo)) + , _toliShippingDetails :: !(Maybe (Maybe OrderLineItemShippingDetails)) + , _toliProduct :: !(Maybe (Maybe TestOrderLineItemProduct)) + , _toliUnitTax :: !(Maybe (Maybe Price)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TestOrderLineItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'toliQuantityOrdered' +-- +-- * 'toliReturnInfo' +-- +-- * 'toliShippingDetails' +-- +-- * 'toliProduct' +-- +-- * 'toliUnitTax' +testOrderLineItem + :: TestOrderLineItem +testOrderLineItem = + TestOrderLineItem + { _toliQuantityOrdered = Nothing + , _toliReturnInfo = Nothing + , _toliShippingDetails = Nothing + , _toliProduct = Nothing + , _toliUnitTax = Nothing + } + +-- | Number of items ordered. +toliQuantityOrdered :: Lens' TestOrderLineItem (Maybe Word32) +toliQuantityOrdered + = lens _toliQuantityOrdered + (\ s a -> s{_toliQuantityOrdered = a}) + +-- | Details of the return policy for the line item. +toliReturnInfo :: Lens' TestOrderLineItem (Maybe (Maybe OrderLineItemReturnInfo)) +toliReturnInfo + = lens _toliReturnInfo + (\ s a -> s{_toliReturnInfo = a}) + +-- | Details of the requested shipping for the line item. +toliShippingDetails :: Lens' TestOrderLineItem (Maybe (Maybe OrderLineItemShippingDetails)) +toliShippingDetails + = lens _toliShippingDetails + (\ s a -> s{_toliShippingDetails = a}) + +-- | Product data from the time of the order placement. +toliProduct :: Lens' TestOrderLineItem (Maybe (Maybe TestOrderLineItemProduct)) +toliProduct + = lens _toliProduct (\ s a -> s{_toliProduct = a}) + +-- | Unit tax for the line item. +toliUnitTax :: Lens' TestOrderLineItem (Maybe (Maybe Price)) +toliUnitTax + = lens _toliUnitTax (\ s a -> s{_toliUnitTax = a}) + +instance FromJSON TestOrderLineItem where + parseJSON + = withObject "TestOrderLineItem" + (\ o -> + TestOrderLineItem <$> + (o .:? "quantityOrdered") <*> (o .:? "returnInfo") + <*> (o .:? "shippingDetails") + <*> (o .:? "product") + <*> (o .:? "unitTax")) + +instance ToJSON TestOrderLineItem where + toJSON TestOrderLineItem{..} + = object + (catMaybes + [("quantityOrdered" .=) <$> _toliQuantityOrdered, + ("returnInfo" .=) <$> _toliReturnInfo, + ("shippingDetails" .=) <$> _toliShippingDetails, + ("product" .=) <$> _toliProduct, + ("unitTax" .=) <$> _toliUnitTax]) + +-- +-- /See:/ 'orderPaymentMethod' smart constructor. +data OrderPaymentMethod = OrderPaymentMethod + { _opmExpirationMonth :: !(Maybe Int32) + , _opmExpirationYear :: !(Maybe Int32) + , _opmPhoneNumber :: !(Maybe Text) + , _opmBillingAddress :: !(Maybe (Maybe OrderAddress)) + , _opmLastFourDigits :: !(Maybe Text) + , _opmType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderPaymentMethod' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opmExpirationMonth' +-- +-- * 'opmExpirationYear' +-- +-- * 'opmPhoneNumber' +-- +-- * 'opmBillingAddress' +-- +-- * 'opmLastFourDigits' +-- +-- * 'opmType' +orderPaymentMethod + :: OrderPaymentMethod +orderPaymentMethod = + OrderPaymentMethod + { _opmExpirationMonth = Nothing + , _opmExpirationYear = Nothing + , _opmPhoneNumber = Nothing + , _opmBillingAddress = Nothing + , _opmLastFourDigits = Nothing + , _opmType = Nothing + } + +-- | The card expiration month (January = 1, February = 2 etc.). +opmExpirationMonth :: Lens' OrderPaymentMethod (Maybe Int32) +opmExpirationMonth + = lens _opmExpirationMonth + (\ s a -> s{_opmExpirationMonth = a}) + +-- | The card expiration year (4-digit, e.g. 2015). +opmExpirationYear :: Lens' OrderPaymentMethod (Maybe Int32) +opmExpirationYear + = lens _opmExpirationYear + (\ s a -> s{_opmExpirationYear = a}) + +-- | The billing phone number. +opmPhoneNumber :: Lens' OrderPaymentMethod (Maybe Text) +opmPhoneNumber + = lens _opmPhoneNumber + (\ s a -> s{_opmPhoneNumber = a}) + +-- | The billing address. +opmBillingAddress :: Lens' OrderPaymentMethod (Maybe (Maybe OrderAddress)) +opmBillingAddress + = lens _opmBillingAddress + (\ s a -> s{_opmBillingAddress = a}) + +-- | The last four digits of the card number. +opmLastFourDigits :: Lens' OrderPaymentMethod (Maybe Text) +opmLastFourDigits + = lens _opmLastFourDigits + (\ s a -> s{_opmLastFourDigits = a}) + +-- | The type of instrument (VISA, Mastercard, etc). +opmType :: Lens' OrderPaymentMethod (Maybe Text) +opmType = lens _opmType (\ s a -> s{_opmType = a}) + +instance FromJSON OrderPaymentMethod where + parseJSON + = withObject "OrderPaymentMethod" + (\ o -> + OrderPaymentMethod <$> + (o .:? "expirationMonth") <*> + (o .:? "expirationYear") + <*> (o .:? "phoneNumber") + <*> (o .:? "billingAddress") + <*> (o .:? "lastFourDigits") + <*> (o .:? "type")) + +instance ToJSON OrderPaymentMethod where + toJSON OrderPaymentMethod{..} + = object + (catMaybes + [("expirationMonth" .=) <$> _opmExpirationMonth, + ("expirationYear" .=) <$> _opmExpirationYear, + ("phoneNumber" .=) <$> _opmPhoneNumber, + ("billingAddress" .=) <$> _opmBillingAddress, + ("lastFourDigits" .=) <$> _opmLastFourDigits, + ("type" .=) <$> _opmType]) + +-- | A list of errors returned by a failed batch entry. +-- +-- /See:/ 'errors' smart constructor. +data Errors = Errors + { _errCode :: !(Maybe Word32) + , _errMessage :: !(Maybe Text) + , _errErrors :: !(Maybe [Maybe Error]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Errors' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'errCode' +-- +-- * 'errMessage' +-- +-- * 'errErrors' +errors + :: Errors +errors = + Errors + { _errCode = Nothing + , _errMessage = Nothing + , _errErrors = Nothing + } + +-- | The HTTP status of the first error in errors. +errCode :: Lens' Errors (Maybe Word32) +errCode = lens _errCode (\ s a -> s{_errCode = a}) + +-- | The message of the first error in errors. +errMessage :: Lens' Errors (Maybe Text) +errMessage + = lens _errMessage (\ s a -> s{_errMessage = a}) + +-- | A list of errors. +errErrors :: Lens' Errors [Maybe Error] +errErrors + = lens _errErrors (\ s a -> s{_errErrors = a}) . + _Default + . _Coerce + +instance FromJSON Errors where + parseJSON + = withObject "Errors" + (\ o -> + Errors <$> + (o .:? "code") <*> (o .:? "message") <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON Errors where + toJSON Errors{..} + = object + (catMaybes + [("code" .=) <$> _errCode, + ("message" .=) <$> _errMessage, + ("errors" .=) <$> _errErrors]) + +-- +-- /See:/ 'ordersCancelLineItemResponse' smart constructor. +data OrdersCancelLineItemResponse = OrdersCancelLineItemResponse + { _oclirKind :: !Text + , _oclirExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCancelLineItemResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oclirKind' +-- +-- * 'oclirExecutionStatus' +ordersCancelLineItemResponse + :: OrdersCancelLineItemResponse +ordersCancelLineItemResponse = + OrdersCancelLineItemResponse + { _oclirKind = "content#ordersCancelLineItemResponse" + , _oclirExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersCancelLineItemResponse\". +oclirKind :: Lens' OrdersCancelLineItemResponse Text +oclirKind + = lens _oclirKind (\ s a -> s{_oclirKind = a}) + +-- | The status of the execution. +oclirExecutionStatus :: Lens' OrdersCancelLineItemResponse (Maybe Text) +oclirExecutionStatus + = lens _oclirExecutionStatus + (\ s a -> s{_oclirExecutionStatus = a}) + +instance FromJSON OrdersCancelLineItemResponse where + parseJSON + = withObject "OrdersCancelLineItemResponse" + (\ o -> + OrdersCancelLineItemResponse <$> + (o .:? "kind" .!= + "content#ordersCancelLineItemResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersCancelLineItemResponse where + toJSON OrdersCancelLineItemResponse{..} + = object + (catMaybes + [Just ("kind" .= _oclirKind), + ("executionStatus" .=) <$> _oclirExecutionStatus]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryUpdateShipment' smart constructor. +data OrdersCustomBatchRequestEntryUpdateShipment = OrdersCustomBatchRequestEntryUpdateShipment + { _ocbreusCarrier :: !(Maybe Text) + , _ocbreusStatus :: !(Maybe Text) + , _ocbreusTrackingId :: !(Maybe Text) + , _ocbreusShipmentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryUpdateShipment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbreusCarrier' +-- +-- * 'ocbreusStatus' +-- +-- * 'ocbreusTrackingId' +-- +-- * 'ocbreusShipmentId' +ordersCustomBatchRequestEntryUpdateShipment + :: OrdersCustomBatchRequestEntryUpdateShipment +ordersCustomBatchRequestEntryUpdateShipment = + OrdersCustomBatchRequestEntryUpdateShipment + { _ocbreusCarrier = Nothing + , _ocbreusStatus = Nothing + , _ocbreusTrackingId = Nothing + , _ocbreusShipmentId = Nothing + } + +-- | The carrier handling the shipment. Not updated if missing. +ocbreusCarrier :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text) +ocbreusCarrier + = lens _ocbreusCarrier + (\ s a -> s{_ocbreusCarrier = a}) + +-- | New status for the shipment. Not updated if missing. +ocbreusStatus :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text) +ocbreusStatus + = lens _ocbreusStatus + (\ s a -> s{_ocbreusStatus = a}) + +-- | The tracking id for the shipment. Not updated if missing. +ocbreusTrackingId :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text) +ocbreusTrackingId + = lens _ocbreusTrackingId + (\ s a -> s{_ocbreusTrackingId = a}) + +-- | The ID of the shipment. +ocbreusShipmentId :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text) +ocbreusShipmentId + = lens _ocbreusShipmentId + (\ s a -> s{_ocbreusShipmentId = a}) + +instance FromJSON + OrdersCustomBatchRequestEntryUpdateShipment where + parseJSON + = withObject + "OrdersCustomBatchRequestEntryUpdateShipment" + (\ o -> + OrdersCustomBatchRequestEntryUpdateShipment <$> + (o .:? "carrier") <*> (o .:? "status") <*> + (o .:? "trackingId") + <*> (o .:? "shipmentId")) + +instance ToJSON + OrdersCustomBatchRequestEntryUpdateShipment where + toJSON + OrdersCustomBatchRequestEntryUpdateShipment{..} + = object + (catMaybes + [("carrier" .=) <$> _ocbreusCarrier, + ("status" .=) <$> _ocbreusStatus, + ("trackingId" .=) <$> _ocbreusTrackingId, + ("shipmentId" .=) <$> _ocbreusShipmentId]) + +-- +-- /See:/ 'orderLineItemProduct' smart constructor. +data OrderLineItemProduct = OrderLineItemProduct + { _olipImageLink :: !(Maybe Text) + , _olipShownImage :: !(Maybe Text) + , _olipChannel :: !(Maybe Text) + , _olipBrand :: !(Maybe Text) + , _olipTargetCountry :: !(Maybe Text) + , _olipGtin :: !(Maybe Text) + , _olipItemGroupId :: !(Maybe Text) + , _olipOfferId :: !(Maybe Text) + , _olipId :: !(Maybe Text) + , _olipPrice :: !(Maybe (Maybe Price)) + , _olipVariantAttributes :: !(Maybe [Maybe OrderLineItemProductVariantAttribute]) + , _olipTitle :: !(Maybe Text) + , _olipContentLanguage :: !(Maybe Text) + , _olipMpn :: !(Maybe Text) + , _olipCondition :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderLineItemProduct' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olipImageLink' +-- +-- * 'olipShownImage' +-- +-- * 'olipChannel' +-- +-- * 'olipBrand' +-- +-- * 'olipTargetCountry' +-- +-- * 'olipGtin' +-- +-- * 'olipItemGroupId' +-- +-- * 'olipOfferId' +-- +-- * 'olipId' +-- +-- * 'olipPrice' +-- +-- * 'olipVariantAttributes' +-- +-- * 'olipTitle' +-- +-- * 'olipContentLanguage' +-- +-- * 'olipMpn' +-- +-- * 'olipCondition' +orderLineItemProduct + :: OrderLineItemProduct +orderLineItemProduct = + OrderLineItemProduct + { _olipImageLink = Nothing + , _olipShownImage = Nothing + , _olipChannel = Nothing + , _olipBrand = Nothing + , _olipTargetCountry = Nothing + , _olipGtin = Nothing + , _olipItemGroupId = Nothing + , _olipOfferId = Nothing + , _olipId = Nothing + , _olipPrice = Nothing + , _olipVariantAttributes = Nothing + , _olipTitle = Nothing + , _olipContentLanguage = Nothing + , _olipMpn = Nothing + , _olipCondition = Nothing + } + +-- | URL of an image of the item. +olipImageLink :: Lens' OrderLineItemProduct (Maybe Text) +olipImageLink + = lens _olipImageLink + (\ s a -> s{_olipImageLink = a}) + +-- | URL to the cached image shown to the user when order was placed. +olipShownImage :: Lens' OrderLineItemProduct (Maybe Text) +olipShownImage + = lens _olipShownImage + (\ s a -> s{_olipShownImage = a}) + +-- | The item\'s channel (online or local). +olipChannel :: Lens' OrderLineItemProduct (Maybe Text) +olipChannel + = lens _olipChannel (\ s a -> s{_olipChannel = a}) + +-- | Brand of the item. +olipBrand :: Lens' OrderLineItemProduct (Maybe Text) +olipBrand + = lens _olipBrand (\ s a -> s{_olipBrand = a}) + +-- | The CLDR territory code of the target country of the product. +olipTargetCountry :: Lens' OrderLineItemProduct (Maybe Text) +olipTargetCountry + = lens _olipTargetCountry + (\ s a -> s{_olipTargetCountry = a}) + +-- | Global Trade Item Number (GTIN) of the item. +olipGtin :: Lens' OrderLineItemProduct (Maybe Text) +olipGtin = lens _olipGtin (\ s a -> s{_olipGtin = a}) + +-- | Shared identifier for all variants of the same product. +olipItemGroupId :: Lens' OrderLineItemProduct (Maybe Text) +olipItemGroupId + = lens _olipItemGroupId + (\ s a -> s{_olipItemGroupId = a}) + +-- | An identifier of the item. +olipOfferId :: Lens' OrderLineItemProduct (Maybe Text) +olipOfferId + = lens _olipOfferId (\ s a -> s{_olipOfferId = a}) + +-- | The REST id of the product. +olipId :: Lens' OrderLineItemProduct (Maybe Text) +olipId = lens _olipId (\ s a -> s{_olipId = a}) + +-- | Price of the item. +olipPrice :: Lens' OrderLineItemProduct (Maybe (Maybe Price)) +olipPrice + = lens _olipPrice (\ s a -> s{_olipPrice = a}) + +-- | Variant attributes for the item. These are dimensions of the product, +-- such as color, gender, material, pattern, and size. You can find a +-- comprehensive list of variant attributes here. +olipVariantAttributes :: Lens' OrderLineItemProduct [Maybe OrderLineItemProductVariantAttribute] +olipVariantAttributes + = lens _olipVariantAttributes + (\ s a -> s{_olipVariantAttributes = a}) + . _Default + . _Coerce + +-- | The title of the product. +olipTitle :: Lens' OrderLineItemProduct (Maybe Text) +olipTitle + = lens _olipTitle (\ s a -> s{_olipTitle = a}) + +-- | The two-letter ISO 639-1 language code for the item. +olipContentLanguage :: Lens' OrderLineItemProduct (Maybe Text) +olipContentLanguage + = lens _olipContentLanguage + (\ s a -> s{_olipContentLanguage = a}) + +-- | Manufacturer Part Number (MPN) of the item. +olipMpn :: Lens' OrderLineItemProduct (Maybe Text) +olipMpn = lens _olipMpn (\ s a -> s{_olipMpn = a}) + +-- | Condition or state of the item. +olipCondition :: Lens' OrderLineItemProduct (Maybe Text) +olipCondition + = lens _olipCondition + (\ s a -> s{_olipCondition = a}) + +instance FromJSON OrderLineItemProduct where + parseJSON + = withObject "OrderLineItemProduct" + (\ o -> + OrderLineItemProduct <$> + (o .:? "imageLink") <*> (o .:? "shownImage") <*> + (o .:? "channel") + <*> (o .:? "brand") + <*> (o .:? "targetCountry") + <*> (o .:? "gtin") + <*> (o .:? "itemGroupId") + <*> (o .:? "offerId") + <*> (o .:? "id") + <*> (o .:? "price") + <*> (o .:? "variantAttributes" .!= mempty) + <*> (o .:? "title") + <*> (o .:? "contentLanguage") + <*> (o .:? "mpn") + <*> (o .:? "condition")) + +instance ToJSON OrderLineItemProduct where + toJSON OrderLineItemProduct{..} + = object + (catMaybes + [("imageLink" .=) <$> _olipImageLink, + ("shownImage" .=) <$> _olipShownImage, + ("channel" .=) <$> _olipChannel, + ("brand" .=) <$> _olipBrand, + ("targetCountry" .=) <$> _olipTargetCountry, + ("gtin" .=) <$> _olipGtin, + ("itemGroupId" .=) <$> _olipItemGroupId, + ("offerId" .=) <$> _olipOfferId, + ("id" .=) <$> _olipId, ("price" .=) <$> _olipPrice, + ("variantAttributes" .=) <$> _olipVariantAttributes, + ("title" .=) <$> _olipTitle, + ("contentLanguage" .=) <$> _olipContentLanguage, + ("mpn" .=) <$> _olipMpn, + ("condition" .=) <$> _olipCondition]) + +-- +-- /See:/ 'ordersAcknowledgeResponse' smart constructor. +data OrdersAcknowledgeResponse = OrdersAcknowledgeResponse + { _oarKind :: !Text + , _oarExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersAcknowledgeResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oarKind' +-- +-- * 'oarExecutionStatus' +ordersAcknowledgeResponse + :: OrdersAcknowledgeResponse +ordersAcknowledgeResponse = + OrdersAcknowledgeResponse + { _oarKind = "content#ordersAcknowledgeResponse" + , _oarExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersAcknowledgeResponse\". +oarKind :: Lens' OrdersAcknowledgeResponse Text +oarKind = lens _oarKind (\ s a -> s{_oarKind = a}) + +-- | The status of the execution. +oarExecutionStatus :: Lens' OrdersAcknowledgeResponse (Maybe Text) +oarExecutionStatus + = lens _oarExecutionStatus + (\ s a -> s{_oarExecutionStatus = a}) + +instance FromJSON OrdersAcknowledgeResponse where + parseJSON + = withObject "OrdersAcknowledgeResponse" + (\ o -> + OrdersAcknowledgeResponse <$> + (o .:? "kind" .!= + "content#ordersAcknowledgeResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersAcknowledgeResponse where + toJSON OrdersAcknowledgeResponse{..} + = object + (catMaybes + [Just ("kind" .= _oarKind), + ("executionStatus" .=) <$> _oarExecutionStatus]) + +-- +-- /See:/ 'order' smart constructor. +data Order = Order + { _ordStatus :: !(Maybe Text) + , _ordMerchantId :: !(Maybe Word64) + , _ordRefunds :: !(Maybe [Maybe OrderRefund]) + , _ordKind :: !Text + , _ordLineItems :: !(Maybe [Maybe OrderLineItem]) + , _ordShipments :: !(Maybe [Maybe OrderShipment]) + , _ordNetAmount :: !(Maybe (Maybe Price)) + , _ordPlacedDate :: !(Maybe Text) + , _ordDeliveryDetails :: !(Maybe (Maybe OrderDeliveryDetails)) + , _ordShippingOption :: !(Maybe Text) + , _ordMerchantOrderId :: !(Maybe Text) + , _ordAcknowledged :: !(Maybe Bool) + , _ordShippingCostTax :: !(Maybe (Maybe Price)) + , _ordCustomer :: !(Maybe (Maybe OrderCustomer)) + , _ordId :: !(Maybe Text) + , _ordPaymentMethod :: !(Maybe (Maybe OrderPaymentMethod)) + , _ordPaymentStatus :: !(Maybe Text) + , _ordShippingCost :: !(Maybe (Maybe Price)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Order' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ordStatus' +-- +-- * 'ordMerchantId' +-- +-- * 'ordRefunds' +-- +-- * 'ordKind' +-- +-- * 'ordLineItems' +-- +-- * 'ordShipments' +-- +-- * 'ordNetAmount' +-- +-- * 'ordPlacedDate' +-- +-- * 'ordDeliveryDetails' +-- +-- * 'ordShippingOption' +-- +-- * 'ordMerchantOrderId' +-- +-- * 'ordAcknowledged' +-- +-- * 'ordShippingCostTax' +-- +-- * 'ordCustomer' +-- +-- * 'ordId' +-- +-- * 'ordPaymentMethod' +-- +-- * 'ordPaymentStatus' +-- +-- * 'ordShippingCost' +order + :: Order +order = + Order + { _ordStatus = Nothing + , _ordMerchantId = Nothing + , _ordRefunds = Nothing + , _ordKind = "content#order" + , _ordLineItems = Nothing + , _ordShipments = Nothing + , _ordNetAmount = Nothing + , _ordPlacedDate = Nothing + , _ordDeliveryDetails = Nothing + , _ordShippingOption = Nothing + , _ordMerchantOrderId = Nothing + , _ordAcknowledged = Nothing + , _ordShippingCostTax = Nothing + , _ordCustomer = Nothing + , _ordId = Nothing + , _ordPaymentMethod = Nothing + , _ordPaymentStatus = Nothing + , _ordShippingCost = Nothing + } + +-- | The status of the order. +ordStatus :: Lens' Order (Maybe Text) +ordStatus + = lens _ordStatus (\ s a -> s{_ordStatus = a}) + +ordMerchantId :: Lens' Order (Maybe Word64) +ordMerchantId + = lens _ordMerchantId + (\ s a -> s{_ordMerchantId = a}) + +-- | Refunds for the order. +ordRefunds :: Lens' Order [Maybe OrderRefund] +ordRefunds + = lens _ordRefunds (\ s a -> s{_ordRefunds = a}) . + _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#order\". +ordKind :: Lens' Order Text +ordKind = lens _ordKind (\ s a -> s{_ordKind = a}) + +-- | Line items that are ordered. +ordLineItems :: Lens' Order [Maybe OrderLineItem] +ordLineItems + = lens _ordLineItems (\ s a -> s{_ordLineItems = a}) + . _Default + . _Coerce + +-- | Shipments of the order. +ordShipments :: Lens' Order [Maybe OrderShipment] +ordShipments + = lens _ordShipments (\ s a -> s{_ordShipments = a}) + . _Default + . _Coerce + +-- | The net amount for the order. For example, if an order was originally +-- for a grand total of $100 and a refund was issued for $20, the net +-- amount will be $80. +ordNetAmount :: Lens' Order (Maybe (Maybe Price)) +ordNetAmount + = lens _ordNetAmount (\ s a -> s{_ordNetAmount = a}) + +-- | The date when the order was placed, in ISO 8601 format. +ordPlacedDate :: Lens' Order (Maybe Text) +ordPlacedDate + = lens _ordPlacedDate + (\ s a -> s{_ordPlacedDate = a}) + +-- | The details for the delivery. +ordDeliveryDetails :: Lens' Order (Maybe (Maybe OrderDeliveryDetails)) +ordDeliveryDetails + = lens _ordDeliveryDetails + (\ s a -> s{_ordDeliveryDetails = a}) + +-- | The requested shipping option. +ordShippingOption :: Lens' Order (Maybe Text) +ordShippingOption + = lens _ordShippingOption + (\ s a -> s{_ordShippingOption = a}) + +-- | Merchant-provided id of the order. +ordMerchantOrderId :: Lens' Order (Maybe Text) +ordMerchantOrderId + = lens _ordMerchantOrderId + (\ s a -> s{_ordMerchantOrderId = a}) + +-- | Whether the order was acknowledged. +ordAcknowledged :: Lens' Order (Maybe Bool) +ordAcknowledged + = lens _ordAcknowledged + (\ s a -> s{_ordAcknowledged = a}) + +-- | The tax for the total shipping cost. +ordShippingCostTax :: Lens' Order (Maybe (Maybe Price)) +ordShippingCostTax + = lens _ordShippingCostTax + (\ s a -> s{_ordShippingCostTax = a}) + +-- | The details of the customer who placed the order. +ordCustomer :: Lens' Order (Maybe (Maybe OrderCustomer)) +ordCustomer + = lens _ordCustomer (\ s a -> s{_ordCustomer = a}) + +-- | The REST id of the order. Globally unique. +ordId :: Lens' Order (Maybe Text) +ordId = lens _ordId (\ s a -> s{_ordId = a}) + +-- | The details of the payment method. +ordPaymentMethod :: Lens' Order (Maybe (Maybe OrderPaymentMethod)) +ordPaymentMethod + = lens _ordPaymentMethod + (\ s a -> s{_ordPaymentMethod = a}) + +-- | The status of the payment. +ordPaymentStatus :: Lens' Order (Maybe Text) +ordPaymentStatus + = lens _ordPaymentStatus + (\ s a -> s{_ordPaymentStatus = a}) + +-- | The total cost of shipping for all items. +ordShippingCost :: Lens' Order (Maybe (Maybe Price)) +ordShippingCost + = lens _ordShippingCost + (\ s a -> s{_ordShippingCost = a}) + +instance FromJSON Order where + parseJSON + = withObject "Order" + (\ o -> + Order <$> + (o .:? "status") <*> (o .:? "merchantId") <*> + (o .:? "refunds" .!= mempty) + <*> (o .:? "kind" .!= "content#order") + <*> (o .:? "lineItems" .!= mempty) + <*> (o .:? "shipments" .!= mempty) + <*> (o .:? "netAmount") + <*> (o .:? "placedDate") + <*> (o .:? "deliveryDetails") + <*> (o .:? "shippingOption") + <*> (o .:? "merchantOrderId") + <*> (o .:? "acknowledged") + <*> (o .:? "shippingCostTax") + <*> (o .:? "customer") + <*> (o .:? "id") + <*> (o .:? "paymentMethod") + <*> (o .:? "paymentStatus") + <*> (o .:? "shippingCost")) + +instance ToJSON Order where + toJSON Order{..} + = object + (catMaybes + [("status" .=) <$> _ordStatus, + ("merchantId" .=) <$> _ordMerchantId, + ("refunds" .=) <$> _ordRefunds, + Just ("kind" .= _ordKind), + ("lineItems" .=) <$> _ordLineItems, + ("shipments" .=) <$> _ordShipments, + ("netAmount" .=) <$> _ordNetAmount, + ("placedDate" .=) <$> _ordPlacedDate, + ("deliveryDetails" .=) <$> _ordDeliveryDetails, + ("shippingOption" .=) <$> _ordShippingOption, + ("merchantOrderId" .=) <$> _ordMerchantOrderId, + ("acknowledged" .=) <$> _ordAcknowledged, + ("shippingCostTax" .=) <$> _ordShippingCostTax, + ("customer" .=) <$> _ordCustomer, + ("id" .=) <$> _ordId, + ("paymentMethod" .=) <$> _ordPaymentMethod, + ("paymentStatus" .=) <$> _ordPaymentStatus, + ("shippingCost" .=) <$> _ordShippingCost]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryReturnLineItem' smart constructor. +data OrdersCustomBatchRequestEntryReturnLineItem = OrdersCustomBatchRequestEntryReturnLineItem + { _ocbrerliQuantity :: !(Maybe Word32) + , _ocbrerliLineItemId :: !(Maybe Text) + , _ocbrerliReason :: !(Maybe Text) + , _ocbrerliReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryReturnLineItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrerliQuantity' +-- +-- * 'ocbrerliLineItemId' +-- +-- * 'ocbrerliReason' +-- +-- * 'ocbrerliReasonText' +ordersCustomBatchRequestEntryReturnLineItem + :: OrdersCustomBatchRequestEntryReturnLineItem +ordersCustomBatchRequestEntryReturnLineItem = + OrdersCustomBatchRequestEntryReturnLineItem + { _ocbrerliQuantity = Nothing + , _ocbrerliLineItemId = Nothing + , _ocbrerliReason = Nothing + , _ocbrerliReasonText = Nothing + } + +-- | The quantity to return. +ocbrerliQuantity :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Word32) +ocbrerliQuantity + = lens _ocbrerliQuantity + (\ s a -> s{_ocbrerliQuantity = a}) + +-- | The ID of the line item to return. +ocbrerliLineItemId :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text) +ocbrerliLineItemId + = lens _ocbrerliLineItemId + (\ s a -> s{_ocbrerliLineItemId = a}) + +-- | The reason for the return. +ocbrerliReason :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text) +ocbrerliReason + = lens _ocbrerliReason + (\ s a -> s{_ocbrerliReason = a}) + +-- | The explanation of the reason. +ocbrerliReasonText :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text) +ocbrerliReasonText + = lens _ocbrerliReasonText + (\ s a -> s{_ocbrerliReasonText = a}) + +instance FromJSON + OrdersCustomBatchRequestEntryReturnLineItem where + parseJSON + = withObject + "OrdersCustomBatchRequestEntryReturnLineItem" + (\ o -> + OrdersCustomBatchRequestEntryReturnLineItem <$> + (o .:? "quantity") <*> (o .:? "lineItemId") <*> + (o .:? "reason") + <*> (o .:? "reasonText")) + +instance ToJSON + OrdersCustomBatchRequestEntryReturnLineItem where + toJSON + OrdersCustomBatchRequestEntryReturnLineItem{..} + = object + (catMaybes + [("quantity" .=) <$> _ocbrerliQuantity, + ("lineItemId" .=) <$> _ocbrerliLineItemId, + ("reason" .=) <$> _ocbrerliReason, + ("reasonText" .=) <$> _ocbrerliReasonText]) + +-- +-- /See:/ 'ordersUpdateMerchantOrderIdResponse' smart constructor. +data OrdersUpdateMerchantOrderIdResponse = OrdersUpdateMerchantOrderIdResponse + { _oumoirKind :: !Text + , _oumoirExecutionStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersUpdateMerchantOrderIdResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oumoirKind' +-- +-- * 'oumoirExecutionStatus' +ordersUpdateMerchantOrderIdResponse + :: OrdersUpdateMerchantOrderIdResponse +ordersUpdateMerchantOrderIdResponse = + OrdersUpdateMerchantOrderIdResponse + { _oumoirKind = "content#ordersUpdateMerchantOrderIdResponse" + , _oumoirExecutionStatus = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersUpdateMerchantOrderIdResponse\". +oumoirKind :: Lens' OrdersUpdateMerchantOrderIdResponse Text +oumoirKind + = lens _oumoirKind (\ s a -> s{_oumoirKind = a}) + +-- | The status of the execution. +oumoirExecutionStatus :: Lens' OrdersUpdateMerchantOrderIdResponse (Maybe Text) +oumoirExecutionStatus + = lens _oumoirExecutionStatus + (\ s a -> s{_oumoirExecutionStatus = a}) + +instance FromJSON OrdersUpdateMerchantOrderIdResponse + where + parseJSON + = withObject "OrdersUpdateMerchantOrderIdResponse" + (\ o -> + OrdersUpdateMerchantOrderIdResponse <$> + (o .:? "kind" .!= + "content#ordersUpdateMerchantOrderIdResponse") + <*> (o .:? "executionStatus")) + +instance ToJSON OrdersUpdateMerchantOrderIdResponse + where + toJSON OrdersUpdateMerchantOrderIdResponse{..} + = object + (catMaybes + [Just ("kind" .= _oumoirKind), + ("executionStatus" .=) <$> _oumoirExecutionStatus]) + +-- +-- /See:/ 'ordersCustomBatchRequestEntryRefund' smart constructor. +data OrdersCustomBatchRequestEntryRefund = OrdersCustomBatchRequestEntryRefund + { _ocbrerAmount :: !(Maybe (Maybe Price)) + , _ocbrerReason :: !(Maybe Text) + , _ocbrerReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchRequestEntryRefund' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrerAmount' +-- +-- * 'ocbrerReason' +-- +-- * 'ocbrerReasonText' +ordersCustomBatchRequestEntryRefund + :: OrdersCustomBatchRequestEntryRefund +ordersCustomBatchRequestEntryRefund = + OrdersCustomBatchRequestEntryRefund + { _ocbrerAmount = Nothing + , _ocbrerReason = Nothing + , _ocbrerReasonText = Nothing + } + +-- | The amount that is refunded. +ocbrerAmount :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe (Maybe Price)) +ocbrerAmount + = lens _ocbrerAmount (\ s a -> s{_ocbrerAmount = a}) + +-- | The reason for the refund. +ocbrerReason :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe Text) +ocbrerReason + = lens _ocbrerReason (\ s a -> s{_ocbrerReason = a}) + +-- | The explanation of the reason. +ocbrerReasonText :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe Text) +ocbrerReasonText + = lens _ocbrerReasonText + (\ s a -> s{_ocbrerReasonText = a}) + +instance FromJSON OrdersCustomBatchRequestEntryRefund + where + parseJSON + = withObject "OrdersCustomBatchRequestEntryRefund" + (\ o -> + OrdersCustomBatchRequestEntryRefund <$> + (o .:? "amount") <*> (o .:? "reason") <*> + (o .:? "reasonText")) + +instance ToJSON OrdersCustomBatchRequestEntryRefund + where + toJSON OrdersCustomBatchRequestEntryRefund{..} + = object + (catMaybes + [("amount" .=) <$> _ocbrerAmount, + ("reason" .=) <$> _ocbrerReason, + ("reasonText" .=) <$> _ocbrerReasonText]) + +-- +-- /See:/ 'orderCancellation' smart constructor. +data OrderCancellation = OrderCancellation + { _ocQuantity :: !(Maybe Word32) + , _ocActor :: !(Maybe Text) + , _ocReason :: !(Maybe Text) + , _ocCreationDate :: !(Maybe Text) + , _ocReasonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrderCancellation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocQuantity' +-- +-- * 'ocActor' +-- +-- * 'ocReason' +-- +-- * 'ocCreationDate' +-- +-- * 'ocReasonText' +orderCancellation + :: OrderCancellation +orderCancellation = + OrderCancellation + { _ocQuantity = Nothing + , _ocActor = Nothing + , _ocReason = Nothing + , _ocCreationDate = Nothing + , _ocReasonText = Nothing + } + +-- | The quantity that was canceled. +ocQuantity :: Lens' OrderCancellation (Maybe Word32) +ocQuantity + = lens _ocQuantity (\ s a -> s{_ocQuantity = a}) + +-- | The actor that created the cancellation. +ocActor :: Lens' OrderCancellation (Maybe Text) +ocActor = lens _ocActor (\ s a -> s{_ocActor = a}) + +-- | The reason for the cancellation. +ocReason :: Lens' OrderCancellation (Maybe Text) +ocReason = lens _ocReason (\ s a -> s{_ocReason = a}) + +-- | Date on which the cancellation has been created, in ISO 8601 format. +ocCreationDate :: Lens' OrderCancellation (Maybe Text) +ocCreationDate + = lens _ocCreationDate + (\ s a -> s{_ocCreationDate = a}) + +-- | The explanation of the reason. +ocReasonText :: Lens' OrderCancellation (Maybe Text) +ocReasonText + = lens _ocReasonText (\ s a -> s{_ocReasonText = a}) + +instance FromJSON OrderCancellation where + parseJSON + = withObject "OrderCancellation" + (\ o -> + OrderCancellation <$> + (o .:? "quantity") <*> (o .:? "actor") <*> + (o .:? "reason") + <*> (o .:? "creationDate") + <*> (o .:? "reasonText")) + +instance ToJSON OrderCancellation where + toJSON OrderCancellation{..} + = object + (catMaybes + [("quantity" .=) <$> _ocQuantity, + ("actor" .=) <$> _ocActor, + ("reason" .=) <$> _ocReason, + ("creationDate" .=) <$> _ocCreationDate, + ("reasonText" .=) <$> _ocReasonText]) + +-- +-- /See:/ 'ordersCustomBatchResponse' smart constructor. +data OrdersCustomBatchResponse = OrdersCustomBatchResponse + { _ocbrcEntries :: !(Maybe [Maybe OrdersCustomBatchResponseEntry]) + , _ocbrcKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OrdersCustomBatchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocbrcEntries' +-- +-- * 'ocbrcKind' +ordersCustomBatchResponse + :: OrdersCustomBatchResponse +ordersCustomBatchResponse = + OrdersCustomBatchResponse + { _ocbrcEntries = Nothing + , _ocbrcKind = "content#ordersCustomBatchResponse" + } + +-- | The result of the execution of the batch requests. +ocbrcEntries :: Lens' OrdersCustomBatchResponse [Maybe OrdersCustomBatchResponseEntry] +ocbrcEntries + = lens _ocbrcEntries (\ s a -> s{_ocbrcEntries = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"content#ordersCustomBatchResponse\". +ocbrcKind :: Lens' OrdersCustomBatchResponse Text +ocbrcKind + = lens _ocbrcKind (\ s a -> s{_ocbrcKind = a}) + +instance FromJSON OrdersCustomBatchResponse where + parseJSON + = withObject "OrdersCustomBatchResponse" + (\ o -> + OrdersCustomBatchResponse <$> + (o .:? "entries" .!= mempty) <*> + (o .:? "kind" .!= + "content#ordersCustomBatchResponse")) + +instance ToJSON OrdersCustomBatchResponse where + toJSON OrdersCustomBatchResponse{..} + = object + (catMaybes + [("entries" .=) <$> _ocbrcEntries, + Just ("kind" .= _ocbrcKind)]) diff --git a/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Sum.hs b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Sum.hs new file mode 100644 index 000000000..8062fea0d --- /dev/null +++ b/gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.ShoppingContent.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.ShoppingContent.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-shopping-content/gogol-shopping-content.cabal b/gogol-shopping-content/gogol-shopping-content.cabal new file mode 100644 index 000000000..42299142a --- /dev/null +++ b/gogol-shopping-content/gogol-shopping-content.cabal @@ -0,0 +1,58 @@ +name: gogol-shopping-content +version: 0.0.1 +synopsis: Content API for Shopping Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Manage product items, inventory, and Merchant Center accounts for Google + Shopping. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Content.Orders.Acknowledge + , Network.Google.Resource.Content.Orders.Advancetestorder + , Network.Google.Resource.Content.Orders.Cancel + , Network.Google.Resource.Content.Orders.Cancellineitem + , Network.Google.Resource.Content.Orders.Createtestorder + , Network.Google.Resource.Content.Orders.Custombatch + , Network.Google.Resource.Content.Orders.Get + , Network.Google.Resource.Content.Orders.Getbymerchantorderid + , Network.Google.Resource.Content.Orders.Gettestordertemplate + , Network.Google.Resource.Content.Orders.List + , Network.Google.Resource.Content.Orders.Refund + , Network.Google.Resource.Content.Orders.Returnlineitem + , Network.Google.Resource.Content.Orders.Shiplineitems + , Network.Google.Resource.Content.Orders.Updatemerchantorderid + , Network.Google.Resource.Content.Orders.Updateshipment + , Network.Google.ShoppingContent + , Network.Google.ShoppingContent.Types + + other-modules: + Network.Google.ShoppingContent.Types.Product + , Network.Google.ShoppingContent.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-shopping-content/src/.gitkeep b/gogol-shopping-content/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-siteverification/LICENSE b/gogol-siteverification/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-siteverification/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-siteverification/Makefile b/gogol-siteverification/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-siteverification/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-siteverification/README.md b/gogol-siteverification/README.md new file mode 100644 index 000000000..fd964d98a --- /dev/null +++ b/gogol-siteverification/README.md @@ -0,0 +1,28 @@ +# gogol-siteverification + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Site Verification API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-siteverification` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-siteverification/Setup.hs b/gogol-siteverification/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-siteverification/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Delete.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Delete.hs new file mode 100644 index 000000000..e769465cc --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Delete.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Relinquish ownership of a website or domain. +-- +-- /See:/ for @SiteVerificationWebResourceDelete@. +module SiteVerification.WebResource.Delete + ( + -- * REST Resource + WebResourceDeleteAPI + + -- * Creating a Request + , webResourceDelete + , WebResourceDelete + + -- * Request Lenses + , wrdQuotaUser + , wrdPrettyPrint + , wrdUserIp + , wrdKey + , wrdId + , wrdOauthToken + , wrdFields + , wrdAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceDelete@ which the +-- 'WebResourceDelete' request conforms to. +type WebResourceDeleteAPI = + "webResource" :> + Capture "id" Text :> Delete '[JSON] () + +-- | Relinquish ownership of a website or domain. +-- +-- /See:/ 'webResourceDelete' smart constructor. +data WebResourceDelete = WebResourceDelete + { _wrdQuotaUser :: !(Maybe Text) + , _wrdPrettyPrint :: !Bool + , _wrdUserIp :: !(Maybe Text) + , _wrdKey :: !(Maybe Text) + , _wrdId :: !Text + , _wrdOauthToken :: !(Maybe Text) + , _wrdFields :: !(Maybe Text) + , _wrdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrdQuotaUser' +-- +-- * 'wrdPrettyPrint' +-- +-- * 'wrdUserIp' +-- +-- * 'wrdKey' +-- +-- * 'wrdId' +-- +-- * 'wrdOauthToken' +-- +-- * 'wrdFields' +-- +-- * 'wrdAlt' +webResourceDelete + :: Text -- ^ 'id' + -> WebResourceDelete +webResourceDelete pWrdId_ = + WebResourceDelete + { _wrdQuotaUser = Nothing + , _wrdPrettyPrint = False + , _wrdUserIp = Nothing + , _wrdKey = Nothing + , _wrdId = pWrdId_ + , _wrdOauthToken = Nothing + , _wrdFields = Nothing + , _wrdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wrdQuotaUser :: Lens' WebResourceDelete' (Maybe Text) +wrdQuotaUser + = lens _wrdQuotaUser (\ s a -> s{_wrdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wrdPrettyPrint :: Lens' WebResourceDelete' Bool +wrdPrettyPrint + = lens _wrdPrettyPrint + (\ s a -> s{_wrdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wrdUserIp :: Lens' WebResourceDelete' (Maybe Text) +wrdUserIp + = lens _wrdUserIp (\ s a -> s{_wrdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wrdKey :: Lens' WebResourceDelete' (Maybe Text) +wrdKey = lens _wrdKey (\ s a -> s{_wrdKey = a}) + +-- | The id of a verified site or domain. +wrdId :: Lens' WebResourceDelete' Text +wrdId = lens _wrdId (\ s a -> s{_wrdId = a}) + +-- | OAuth 2.0 token for the current user. +wrdOauthToken :: Lens' WebResourceDelete' (Maybe Text) +wrdOauthToken + = lens _wrdOauthToken + (\ s a -> s{_wrdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wrdFields :: Lens' WebResourceDelete' (Maybe Text) +wrdFields + = lens _wrdFields (\ s a -> s{_wrdFields = a}) + +-- | Data format for the response. +wrdAlt :: Lens' WebResourceDelete' Text +wrdAlt = lens _wrdAlt (\ s a -> s{_wrdAlt = a}) + +instance GoogleRequest WebResourceDelete' where + type Rs WebResourceDelete' = () + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceDelete{..} + = go _wrdQuotaUser _wrdPrettyPrint _wrdUserIp _wrdKey + _wrdId + _wrdOauthToken + _wrdFields + _wrdAlt + where go + = clientWithRoute + (Proxy :: Proxy WebResourceDeleteAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Get.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Get.hs new file mode 100644 index 000000000..409362346 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Get.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the most current data for a website or domain. +-- +-- /See:/ for @SiteVerificationWebResourceGet@. +module SiteVerification.WebResource.Get + ( + -- * REST Resource + WebResourceGetAPI + + -- * Creating a Request + , webResourceGet + , WebResourceGet + + -- * Request Lenses + , wrgQuotaUser + , wrgPrettyPrint + , wrgUserIp + , wrgKey + , wrgId + , wrgOauthToken + , wrgFields + , wrgAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceGet@ which the +-- 'WebResourceGet' request conforms to. +type WebResourceGetAPI = + "webResource" :> + Capture "id" Text :> + Get '[JSON] SiteVerificationWebResourceResource + +-- | Get the most current data for a website or domain. +-- +-- /See:/ 'webResourceGet' smart constructor. +data WebResourceGet = WebResourceGet + { _wrgQuotaUser :: !(Maybe Text) + , _wrgPrettyPrint :: !Bool + , _wrgUserIp :: !(Maybe Text) + , _wrgKey :: !(Maybe Text) + , _wrgId :: !Text + , _wrgOauthToken :: !(Maybe Text) + , _wrgFields :: !(Maybe Text) + , _wrgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrgQuotaUser' +-- +-- * 'wrgPrettyPrint' +-- +-- * 'wrgUserIp' +-- +-- * 'wrgKey' +-- +-- * 'wrgId' +-- +-- * 'wrgOauthToken' +-- +-- * 'wrgFields' +-- +-- * 'wrgAlt' +webResourceGet + :: Text -- ^ 'id' + -> WebResourceGet +webResourceGet pWrgId_ = + WebResourceGet + { _wrgQuotaUser = Nothing + , _wrgPrettyPrint = False + , _wrgUserIp = Nothing + , _wrgKey = Nothing + , _wrgId = pWrgId_ + , _wrgOauthToken = Nothing + , _wrgFields = Nothing + , _wrgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wrgQuotaUser :: Lens' WebResourceGet' (Maybe Text) +wrgQuotaUser + = lens _wrgQuotaUser (\ s a -> s{_wrgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wrgPrettyPrint :: Lens' WebResourceGet' Bool +wrgPrettyPrint + = lens _wrgPrettyPrint + (\ s a -> s{_wrgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wrgUserIp :: Lens' WebResourceGet' (Maybe Text) +wrgUserIp + = lens _wrgUserIp (\ s a -> s{_wrgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wrgKey :: Lens' WebResourceGet' (Maybe Text) +wrgKey = lens _wrgKey (\ s a -> s{_wrgKey = a}) + +-- | The id of a verified site or domain. +wrgId :: Lens' WebResourceGet' Text +wrgId = lens _wrgId (\ s a -> s{_wrgId = a}) + +-- | OAuth 2.0 token for the current user. +wrgOauthToken :: Lens' WebResourceGet' (Maybe Text) +wrgOauthToken + = lens _wrgOauthToken + (\ s a -> s{_wrgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wrgFields :: Lens' WebResourceGet' (Maybe Text) +wrgFields + = lens _wrgFields (\ s a -> s{_wrgFields = a}) + +-- | Data format for the response. +wrgAlt :: Lens' WebResourceGet' Text +wrgAlt = lens _wrgAlt (\ s a -> s{_wrgAlt = a}) + +instance GoogleRequest WebResourceGet' where + type Rs WebResourceGet' = + SiteVerificationWebResourceResource + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceGet{..} + = go _wrgQuotaUser _wrgPrettyPrint _wrgUserIp _wrgKey + _wrgId + _wrgOauthToken + _wrgFields + _wrgAlt + where go + = clientWithRoute (Proxy :: Proxy WebResourceGetAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/GetToken.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/GetToken.hs new file mode 100644 index 000000000..d8bc2fff9 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/GetToken.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.GetToken +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get a verification token for placing on a website or domain. +-- +-- /See:/ for @SiteVerificationWebResourceGetToken@. +module SiteVerification.WebResource.GetToken + ( + -- * REST Resource + WebResourceGetTokenAPI + + -- * Creating a Request + , webResourceGetToken + , WebResourceGetToken + + -- * Request Lenses + , wrgtQuotaUser + , wrgtPrettyPrint + , wrgtUserIp + , wrgtKey + , wrgtOauthToken + , wrgtFields + , wrgtAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceGetToken@ which the +-- 'WebResourceGetToken' request conforms to. +type WebResourceGetTokenAPI = + "token" :> + Post '[JSON] + SiteVerificationWebResourceGettokenResponse + +-- | Get a verification token for placing on a website or domain. +-- +-- /See:/ 'webResourceGetToken' smart constructor. +data WebResourceGetToken = WebResourceGetToken + { _wrgtQuotaUser :: !(Maybe Text) + , _wrgtPrettyPrint :: !Bool + , _wrgtUserIp :: !(Maybe Text) + , _wrgtKey :: !(Maybe Text) + , _wrgtOauthToken :: !(Maybe Text) + , _wrgtFields :: !(Maybe Text) + , _wrgtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceGetToken'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrgtQuotaUser' +-- +-- * 'wrgtPrettyPrint' +-- +-- * 'wrgtUserIp' +-- +-- * 'wrgtKey' +-- +-- * 'wrgtOauthToken' +-- +-- * 'wrgtFields' +-- +-- * 'wrgtAlt' +webResourceGetToken + :: WebResourceGetToken +webResourceGetToken = + WebResourceGetToken + { _wrgtQuotaUser = Nothing + , _wrgtPrettyPrint = False + , _wrgtUserIp = Nothing + , _wrgtKey = Nothing + , _wrgtOauthToken = Nothing + , _wrgtFields = Nothing + , _wrgtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wrgtQuotaUser :: Lens' WebResourceGetToken' (Maybe Text) +wrgtQuotaUser + = lens _wrgtQuotaUser + (\ s a -> s{_wrgtQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wrgtPrettyPrint :: Lens' WebResourceGetToken' Bool +wrgtPrettyPrint + = lens _wrgtPrettyPrint + (\ s a -> s{_wrgtPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wrgtUserIp :: Lens' WebResourceGetToken' (Maybe Text) +wrgtUserIp + = lens _wrgtUserIp (\ s a -> s{_wrgtUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wrgtKey :: Lens' WebResourceGetToken' (Maybe Text) +wrgtKey = lens _wrgtKey (\ s a -> s{_wrgtKey = a}) + +-- | OAuth 2.0 token for the current user. +wrgtOauthToken :: Lens' WebResourceGetToken' (Maybe Text) +wrgtOauthToken + = lens _wrgtOauthToken + (\ s a -> s{_wrgtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wrgtFields :: Lens' WebResourceGetToken' (Maybe Text) +wrgtFields + = lens _wrgtFields (\ s a -> s{_wrgtFields = a}) + +-- | Data format for the response. +wrgtAlt :: Lens' WebResourceGetToken' Text +wrgtAlt = lens _wrgtAlt (\ s a -> s{_wrgtAlt = a}) + +instance GoogleRequest WebResourceGetToken' where + type Rs WebResourceGetToken' = + SiteVerificationWebResourceGettokenResponse + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceGetToken{..} + = go _wrgtQuotaUser _wrgtPrettyPrint _wrgtUserIp + _wrgtKey + _wrgtOauthToken + _wrgtFields + _wrgtAlt + where go + = clientWithRoute + (Proxy :: Proxy WebResourceGetTokenAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Insert.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Insert.hs new file mode 100644 index 000000000..95d8e3ab6 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Attempt verification of a website or domain. +-- +-- /See:/ for @SiteVerificationWebResourceInsert@. +module SiteVerification.WebResource.Insert + ( + -- * REST Resource + WebResourceInsertAPI + + -- * Creating a Request + , webResourceInsert + , WebResourceInsert + + -- * Request Lenses + , wriQuotaUser + , wriPrettyPrint + , wriUserIp + , wriKey + , wriOauthToken + , wriVerificationMethod + , wriFields + , wriAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceInsert@ which the +-- 'WebResourceInsert' request conforms to. +type WebResourceInsertAPI = + "webResource" :> + QueryParam "verificationMethod" Text :> + Post '[JSON] SiteVerificationWebResourceResource + +-- | Attempt verification of a website or domain. +-- +-- /See:/ 'webResourceInsert' smart constructor. +data WebResourceInsert = WebResourceInsert + { _wriQuotaUser :: !(Maybe Text) + , _wriPrettyPrint :: !Bool + , _wriUserIp :: !(Maybe Text) + , _wriKey :: !(Maybe Text) + , _wriOauthToken :: !(Maybe Text) + , _wriVerificationMethod :: !Text + , _wriFields :: !(Maybe Text) + , _wriAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wriQuotaUser' +-- +-- * 'wriPrettyPrint' +-- +-- * 'wriUserIp' +-- +-- * 'wriKey' +-- +-- * 'wriOauthToken' +-- +-- * 'wriVerificationMethod' +-- +-- * 'wriFields' +-- +-- * 'wriAlt' +webResourceInsert + :: Text -- ^ 'verificationMethod' + -> WebResourceInsert +webResourceInsert pWriVerificationMethod_ = + WebResourceInsert + { _wriQuotaUser = Nothing + , _wriPrettyPrint = False + , _wriUserIp = Nothing + , _wriKey = Nothing + , _wriOauthToken = Nothing + , _wriVerificationMethod = pWriVerificationMethod_ + , _wriFields = Nothing + , _wriAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wriQuotaUser :: Lens' WebResourceInsert' (Maybe Text) +wriQuotaUser + = lens _wriQuotaUser (\ s a -> s{_wriQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wriPrettyPrint :: Lens' WebResourceInsert' Bool +wriPrettyPrint + = lens _wriPrettyPrint + (\ s a -> s{_wriPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wriUserIp :: Lens' WebResourceInsert' (Maybe Text) +wriUserIp + = lens _wriUserIp (\ s a -> s{_wriUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wriKey :: Lens' WebResourceInsert' (Maybe Text) +wriKey = lens _wriKey (\ s a -> s{_wriKey = a}) + +-- | OAuth 2.0 token for the current user. +wriOauthToken :: Lens' WebResourceInsert' (Maybe Text) +wriOauthToken + = lens _wriOauthToken + (\ s a -> s{_wriOauthToken = a}) + +-- | The method to use for verifying a site or domain. +wriVerificationMethod :: Lens' WebResourceInsert' Text +wriVerificationMethod + = lens _wriVerificationMethod + (\ s a -> s{_wriVerificationMethod = a}) + +-- | Selector specifying which fields to include in a partial response. +wriFields :: Lens' WebResourceInsert' (Maybe Text) +wriFields + = lens _wriFields (\ s a -> s{_wriFields = a}) + +-- | Data format for the response. +wriAlt :: Lens' WebResourceInsert' Text +wriAlt = lens _wriAlt (\ s a -> s{_wriAlt = a}) + +instance GoogleRequest WebResourceInsert' where + type Rs WebResourceInsert' = + SiteVerificationWebResourceResource + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceInsert{..} + = go _wriQuotaUser _wriPrettyPrint _wriUserIp _wriKey + _wriOauthToken + (Just _wriVerificationMethod) + _wriFields + _wriAlt + where go + = clientWithRoute + (Proxy :: Proxy WebResourceInsertAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/List.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/List.hs new file mode 100644 index 000000000..484a98b76 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/List.hs @@ -0,0 +1,145 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Get the list of your verified websites and domains. +-- +-- /See:/ for @SiteVerificationWebResourceList@. +module SiteVerification.WebResource.List + ( + -- * REST Resource + WebResourceListAPI + + -- * Creating a Request + , webResourceList + , WebResourceList + + -- * Request Lenses + , wrlQuotaUser + , wrlPrettyPrint + , wrlUserIp + , wrlKey + , wrlOauthToken + , wrlFields + , wrlAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceList@ which the +-- 'WebResourceList' request conforms to. +type WebResourceListAPI = + "webResource" :> + Get '[JSON] SiteVerificationWebResourceListResponse + +-- | Get the list of your verified websites and domains. +-- +-- /See:/ 'webResourceList' smart constructor. +data WebResourceList = WebResourceList + { _wrlQuotaUser :: !(Maybe Text) + , _wrlPrettyPrint :: !Bool + , _wrlUserIp :: !(Maybe Text) + , _wrlKey :: !(Maybe Text) + , _wrlOauthToken :: !(Maybe Text) + , _wrlFields :: !(Maybe Text) + , _wrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrlQuotaUser' +-- +-- * 'wrlPrettyPrint' +-- +-- * 'wrlUserIp' +-- +-- * 'wrlKey' +-- +-- * 'wrlOauthToken' +-- +-- * 'wrlFields' +-- +-- * 'wrlAlt' +webResourceList + :: WebResourceList +webResourceList = + WebResourceList + { _wrlQuotaUser = Nothing + , _wrlPrettyPrint = False + , _wrlUserIp = Nothing + , _wrlKey = Nothing + , _wrlOauthToken = Nothing + , _wrlFields = Nothing + , _wrlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wrlQuotaUser :: Lens' WebResourceList' (Maybe Text) +wrlQuotaUser + = lens _wrlQuotaUser (\ s a -> s{_wrlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wrlPrettyPrint :: Lens' WebResourceList' Bool +wrlPrettyPrint + = lens _wrlPrettyPrint + (\ s a -> s{_wrlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wrlUserIp :: Lens' WebResourceList' (Maybe Text) +wrlUserIp + = lens _wrlUserIp (\ s a -> s{_wrlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wrlKey :: Lens' WebResourceList' (Maybe Text) +wrlKey = lens _wrlKey (\ s a -> s{_wrlKey = a}) + +-- | OAuth 2.0 token for the current user. +wrlOauthToken :: Lens' WebResourceList' (Maybe Text) +wrlOauthToken + = lens _wrlOauthToken + (\ s a -> s{_wrlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wrlFields :: Lens' WebResourceList' (Maybe Text) +wrlFields + = lens _wrlFields (\ s a -> s{_wrlFields = a}) + +-- | Data format for the response. +wrlAlt :: Lens' WebResourceList' Text +wrlAlt = lens _wrlAlt (\ s a -> s{_wrlAlt = a}) + +instance GoogleRequest WebResourceList' where + type Rs WebResourceList' = + SiteVerificationWebResourceListResponse + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceList{..} + = go _wrlQuotaUser _wrlPrettyPrint _wrlUserIp _wrlKey + _wrlOauthToken + _wrlFields + _wrlAlt + where go + = clientWithRoute (Proxy :: Proxy WebResourceListAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Patch.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Patch.hs new file mode 100644 index 000000000..fe77fee3b --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Patch.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modify the list of owners for your website or domain. This method +-- supports patch semantics. +-- +-- /See:/ for @SiteVerificationWebResourcePatch@. +module SiteVerification.WebResource.Patch + ( + -- * REST Resource + WebResourcePatchAPI + + -- * Creating a Request + , webResourcePatch + , WebResourcePatch + + -- * Request Lenses + , wrpQuotaUser + , wrpPrettyPrint + , wrpUserIp + , wrpKey + , wrpId + , wrpOauthToken + , wrpFields + , wrpAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourcePatch@ which the +-- 'WebResourcePatch' request conforms to. +type WebResourcePatchAPI = + "webResource" :> + Capture "id" Text :> + Patch '[JSON] SiteVerificationWebResourceResource + +-- | Modify the list of owners for your website or domain. This method +-- supports patch semantics. +-- +-- /See:/ 'webResourcePatch' smart constructor. +data WebResourcePatch = WebResourcePatch + { _wrpQuotaUser :: !(Maybe Text) + , _wrpPrettyPrint :: !Bool + , _wrpUserIp :: !(Maybe Text) + , _wrpKey :: !(Maybe Text) + , _wrpId :: !Text + , _wrpOauthToken :: !(Maybe Text) + , _wrpFields :: !(Maybe Text) + , _wrpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourcePatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wrpQuotaUser' +-- +-- * 'wrpPrettyPrint' +-- +-- * 'wrpUserIp' +-- +-- * 'wrpKey' +-- +-- * 'wrpId' +-- +-- * 'wrpOauthToken' +-- +-- * 'wrpFields' +-- +-- * 'wrpAlt' +webResourcePatch + :: Text -- ^ 'id' + -> WebResourcePatch +webResourcePatch pWrpId_ = + WebResourcePatch + { _wrpQuotaUser = Nothing + , _wrpPrettyPrint = False + , _wrpUserIp = Nothing + , _wrpKey = Nothing + , _wrpId = pWrpId_ + , _wrpOauthToken = Nothing + , _wrpFields = Nothing + , _wrpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wrpQuotaUser :: Lens' WebResourcePatch' (Maybe Text) +wrpQuotaUser + = lens _wrpQuotaUser (\ s a -> s{_wrpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wrpPrettyPrint :: Lens' WebResourcePatch' Bool +wrpPrettyPrint + = lens _wrpPrettyPrint + (\ s a -> s{_wrpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wrpUserIp :: Lens' WebResourcePatch' (Maybe Text) +wrpUserIp + = lens _wrpUserIp (\ s a -> s{_wrpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wrpKey :: Lens' WebResourcePatch' (Maybe Text) +wrpKey = lens _wrpKey (\ s a -> s{_wrpKey = a}) + +-- | The id of a verified site or domain. +wrpId :: Lens' WebResourcePatch' Text +wrpId = lens _wrpId (\ s a -> s{_wrpId = a}) + +-- | OAuth 2.0 token for the current user. +wrpOauthToken :: Lens' WebResourcePatch' (Maybe Text) +wrpOauthToken + = lens _wrpOauthToken + (\ s a -> s{_wrpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wrpFields :: Lens' WebResourcePatch' (Maybe Text) +wrpFields + = lens _wrpFields (\ s a -> s{_wrpFields = a}) + +-- | Data format for the response. +wrpAlt :: Lens' WebResourcePatch' Text +wrpAlt = lens _wrpAlt (\ s a -> s{_wrpAlt = a}) + +instance GoogleRequest WebResourcePatch' where + type Rs WebResourcePatch' = + SiteVerificationWebResourceResource + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourcePatch{..} + = go _wrpQuotaUser _wrpPrettyPrint _wrpUserIp _wrpKey + _wrpId + _wrpOauthToken + _wrpFields + _wrpAlt + where go + = clientWithRoute + (Proxy :: Proxy WebResourcePatchAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Update.hs b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Update.hs new file mode 100644 index 000000000..1d4438d3c --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/Resource/SiteVerification/WebResource/Update.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.SiteVerification.WebResource.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modify the list of owners for your website or domain. +-- +-- /See:/ for @SiteVerificationWebResourceUpdate@. +module SiteVerification.WebResource.Update + ( + -- * REST Resource + WebResourceUpdateAPI + + -- * Creating a Request + , webResourceUpdate + , WebResourceUpdate + + -- * Request Lenses + , wruQuotaUser + , wruPrettyPrint + , wruUserIp + , wruKey + , wruId + , wruOauthToken + , wruFields + , wruAlt + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types + +-- | A resource alias for @SiteVerificationWebResourceUpdate@ which the +-- 'WebResourceUpdate' request conforms to. +type WebResourceUpdateAPI = + "webResource" :> + Capture "id" Text :> + Put '[JSON] SiteVerificationWebResourceResource + +-- | Modify the list of owners for your website or domain. +-- +-- /See:/ 'webResourceUpdate' smart constructor. +data WebResourceUpdate = WebResourceUpdate + { _wruQuotaUser :: !(Maybe Text) + , _wruPrettyPrint :: !Bool + , _wruUserIp :: !(Maybe Text) + , _wruKey :: !(Maybe Text) + , _wruId :: !Text + , _wruOauthToken :: !(Maybe Text) + , _wruFields :: !(Maybe Text) + , _wruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WebResourceUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wruQuotaUser' +-- +-- * 'wruPrettyPrint' +-- +-- * 'wruUserIp' +-- +-- * 'wruKey' +-- +-- * 'wruId' +-- +-- * 'wruOauthToken' +-- +-- * 'wruFields' +-- +-- * 'wruAlt' +webResourceUpdate + :: Text -- ^ 'id' + -> WebResourceUpdate +webResourceUpdate pWruId_ = + WebResourceUpdate + { _wruQuotaUser = Nothing + , _wruPrettyPrint = False + , _wruUserIp = Nothing + , _wruKey = Nothing + , _wruId = pWruId_ + , _wruOauthToken = Nothing + , _wruFields = Nothing + , _wruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wruQuotaUser :: Lens' WebResourceUpdate' (Maybe Text) +wruQuotaUser + = lens _wruQuotaUser (\ s a -> s{_wruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wruPrettyPrint :: Lens' WebResourceUpdate' Bool +wruPrettyPrint + = lens _wruPrettyPrint + (\ s a -> s{_wruPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wruUserIp :: Lens' WebResourceUpdate' (Maybe Text) +wruUserIp + = lens _wruUserIp (\ s a -> s{_wruUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wruKey :: Lens' WebResourceUpdate' (Maybe Text) +wruKey = lens _wruKey (\ s a -> s{_wruKey = a}) + +-- | The id of a verified site or domain. +wruId :: Lens' WebResourceUpdate' Text +wruId = lens _wruId (\ s a -> s{_wruId = a}) + +-- | OAuth 2.0 token for the current user. +wruOauthToken :: Lens' WebResourceUpdate' (Maybe Text) +wruOauthToken + = lens _wruOauthToken + (\ s a -> s{_wruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wruFields :: Lens' WebResourceUpdate' (Maybe Text) +wruFields + = lens _wruFields (\ s a -> s{_wruFields = a}) + +-- | Data format for the response. +wruAlt :: Lens' WebResourceUpdate' Text +wruAlt = lens _wruAlt (\ s a -> s{_wruAlt = a}) + +instance GoogleRequest WebResourceUpdate' where + type Rs WebResourceUpdate' = + SiteVerificationWebResourceResource + request = requestWithRoute defReq siteVerificationURL + requestWithRoute r u WebResourceUpdate{..} + = go _wruQuotaUser _wruPrettyPrint _wruUserIp _wruKey + _wruId + _wruOauthToken + _wruFields + _wruAlt + where go + = clientWithRoute + (Proxy :: Proxy WebResourceUpdateAPI) + r + u diff --git a/gogol-siteverification/gen/Network/Google/SiteVerification.hs b/gogol-siteverification/gen/Network/Google/SiteVerification.hs new file mode 100644 index 000000000..7ab686a95 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/SiteVerification.hs @@ -0,0 +1,95 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.SiteVerification +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you programatically verify ownership of websites or domains with +-- Google. +-- +-- /See:/ +module Network.Google.SiteVerification + ( + -- * API + SiteVerificationAPI + , siteVerificationAPI + , siteVerificationURL + + -- * Service Methods + + -- * REST Resources + + -- ** SiteVerificationWebResourceDelete + , module SiteVerification.WebResource.Delete + + -- ** SiteVerificationWebResourceGet + , module SiteVerification.WebResource.Get + + -- ** SiteVerificationWebResourceGetToken + , module SiteVerification.WebResource.GetToken + + -- ** SiteVerificationWebResourceInsert + , module SiteVerification.WebResource.Insert + + -- ** SiteVerificationWebResourceList + , module SiteVerification.WebResource.List + + -- ** SiteVerificationWebResourcePatch + , module SiteVerification.WebResource.Patch + + -- ** SiteVerificationWebResourceUpdate + , module SiteVerification.WebResource.Update + + -- * Types + + -- ** SiteVerificationWebResourceGettokenResponse + , SiteVerificationWebResourceGettokenResponse + , siteVerificationWebResourceGettokenResponse + , svwrgrToken + , svwrgrMethod + + -- ** SiteVerificationWebResourceListResponse + , SiteVerificationWebResourceListResponse + , siteVerificationWebResourceListResponse + , svwrlrItems + + -- ** SiteVerificationWebResourceGettokenRequest + , SiteVerificationWebResourceGettokenRequest + , siteVerificationWebResourceGettokenRequest + , svwrgrSite + , svwrgrVerificationMethod + + -- ** SiteVerificationWebResourceResource + , SiteVerificationWebResourceResource + , siteVerificationWebResourceResource + , svwrrOwners + , svwrrId + , svwrrSite + ) where + +import Network.Google.Prelude +import Network.Google.Resource.SiteVerification.WebResource.Delete +import Network.Google.Resource.SiteVerification.WebResource.Get +import Network.Google.Resource.SiteVerification.WebResource.GetToken +import Network.Google.Resource.SiteVerification.WebResource.Insert +import Network.Google.Resource.SiteVerification.WebResource.List +import Network.Google.Resource.SiteVerification.WebResource.Patch +import Network.Google.Resource.SiteVerification.WebResource.Update +import Network.Google.SiteVerification.Types + +{- $resources +TODO +-} + +type SiteVerificationAPI = WebResource + +siteVerificationAPI :: Proxy SiteVerificationAPI +siteVerificationAPI = Proxy diff --git a/gogol-siteverification/gen/Network/Google/SiteVerification/Types.hs b/gogol-siteverification/gen/Network/Google/SiteVerification/Types.hs new file mode 100644 index 000000000..b6e570f5b --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/SiteVerification/Types.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SiteVerification.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SiteVerification.Types + ( + -- * Service URL + siteVerificationURL + + -- * SiteVerificationWebResourceGettokenResponse + , SiteVerificationWebResourceGettokenResponse + , siteVerificationWebResourceGettokenResponse + , svwrgrToken + , svwrgrMethod + + -- * SiteVerificationWebResourceListResponse + , SiteVerificationWebResourceListResponse + , siteVerificationWebResourceListResponse + , svwrlrItems + + -- * SiteVerificationWebResourceGettokenRequest + , SiteVerificationWebResourceGettokenRequest + , siteVerificationWebResourceGettokenRequest + , svwrgrSite + , svwrgrVerificationMethod + + -- * SiteVerificationWebResourceResource + , SiteVerificationWebResourceResource + , siteVerificationWebResourceResource + , svwrrOwners + , svwrrId + , svwrrSite + ) where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types.Product +import Network.Google.SiteVerification.Types.Sum + +-- | URL referring to version 'v1' of the Google Site Verification API. +siteVerificationURL :: BaseURL +siteVerificationURL + = BaseUrl Https + "https://www.googleapis.com/siteVerification/v1/" + 443 diff --git a/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs b/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs new file mode 100644 index 000000000..0831c367a --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SiteVerification.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SiteVerification.Types.Product where + +import Network.Google.Prelude +import Network.Google.SiteVerification.Types.Sum + +-- +-- /See:/ 'siteVerificationWebResourceGettokenResponse' smart constructor. +data SiteVerificationWebResourceGettokenResponse = SiteVerificationWebResourceGettokenResponse + { _svwrgrToken :: !(Maybe Text) + , _svwrgrMethod :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteVerificationWebResourceGettokenResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svwrgrToken' +-- +-- * 'svwrgrMethod' +siteVerificationWebResourceGettokenResponse + :: SiteVerificationWebResourceGettokenResponse +siteVerificationWebResourceGettokenResponse = + SiteVerificationWebResourceGettokenResponse + { _svwrgrToken = Nothing + , _svwrgrMethod = Nothing + } + +-- | The verification token. The token must be placed appropriately in order +-- for verification to succeed. +svwrgrToken :: Lens' SiteVerificationWebResourceGettokenResponse (Maybe Text) +svwrgrToken + = lens _svwrgrToken (\ s a -> s{_svwrgrToken = a}) + +-- | The verification method to use in conjunction with this token. For FILE, +-- the token should be placed in the top-level directory of the site, +-- stored inside a file of the same name. For META, the token should be +-- placed in the HEAD tag of the default page that is loaded for the site. +-- For DNS, the token should be placed in a TXT record of the domain. +svwrgrMethod :: Lens' SiteVerificationWebResourceGettokenResponse (Maybe Text) +svwrgrMethod + = lens _svwrgrMethod (\ s a -> s{_svwrgrMethod = a}) + +instance FromJSON + SiteVerificationWebResourceGettokenResponse where + parseJSON + = withObject + "SiteVerificationWebResourceGettokenResponse" + (\ o -> + SiteVerificationWebResourceGettokenResponse <$> + (o .:? "token") <*> (o .:? "method")) + +instance ToJSON + SiteVerificationWebResourceGettokenResponse where + toJSON + SiteVerificationWebResourceGettokenResponse{..} + = object + (catMaybes + [("token" .=) <$> _svwrgrToken, + ("method" .=) <$> _svwrgrMethod]) + +-- +-- /See:/ 'siteVerificationWebResourceListResponse' smart constructor. +newtype SiteVerificationWebResourceListResponse = SiteVerificationWebResourceListResponse + { _svwrlrItems :: Maybe [Maybe SiteVerificationWebResourceResource] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteVerificationWebResourceListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svwrlrItems' +siteVerificationWebResourceListResponse + :: SiteVerificationWebResourceListResponse +siteVerificationWebResourceListResponse = + SiteVerificationWebResourceListResponse + { _svwrlrItems = Nothing + } + +-- | The list of sites that are owned by the authenticated user. +svwrlrItems :: Lens' SiteVerificationWebResourceListResponse [Maybe SiteVerificationWebResourceResource] +svwrlrItems + = lens _svwrlrItems (\ s a -> s{_svwrlrItems = a}) . + _Default + . _Coerce + +instance FromJSON + SiteVerificationWebResourceListResponse where + parseJSON + = withObject + "SiteVerificationWebResourceListResponse" + (\ o -> + SiteVerificationWebResourceListResponse <$> + (o .:? "items" .!= mempty)) + +instance ToJSON + SiteVerificationWebResourceListResponse where + toJSON SiteVerificationWebResourceListResponse{..} + = object (catMaybes [("items" .=) <$> _svwrlrItems]) + +-- +-- /See:/ 'siteVerificationWebResourceGettokenRequest' smart constructor. +data SiteVerificationWebResourceGettokenRequest = SiteVerificationWebResourceGettokenRequest + { _svwrgrSite :: !(Maybe SiteVerificationWebResourceGettokenRequestSite) + , _svwrgrVerificationMethod :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteVerificationWebResourceGettokenRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svwrgrSite' +-- +-- * 'svwrgrVerificationMethod' +siteVerificationWebResourceGettokenRequest + :: SiteVerificationWebResourceGettokenRequest +siteVerificationWebResourceGettokenRequest = + SiteVerificationWebResourceGettokenRequest + { _svwrgrSite = Nothing + , _svwrgrVerificationMethod = Nothing + } + +-- | The site for which a verification token will be generated. +svwrgrSite :: Lens' SiteVerificationWebResourceGettokenRequest (Maybe SiteVerificationWebResourceGettokenRequestSite) +svwrgrSite + = lens _svwrgrSite (\ s a -> s{_svwrgrSite = a}) + +-- | The verification method that will be used to verify this site. For +-- sites, \'FILE\' or \'META\' methods may be used. For domains, only +-- \'DNS\' may be used. +svwrgrVerificationMethod :: Lens' SiteVerificationWebResourceGettokenRequest (Maybe Text) +svwrgrVerificationMethod + = lens _svwrgrVerificationMethod + (\ s a -> s{_svwrgrVerificationMethod = a}) + +instance FromJSON + SiteVerificationWebResourceGettokenRequest where + parseJSON + = withObject + "SiteVerificationWebResourceGettokenRequest" + (\ o -> + SiteVerificationWebResourceGettokenRequest <$> + (o .:? "site") <*> (o .:? "verificationMethod")) + +instance ToJSON + SiteVerificationWebResourceGettokenRequest where + toJSON SiteVerificationWebResourceGettokenRequest{..} + = object + (catMaybes + [("site" .=) <$> _svwrgrSite, + ("verificationMethod" .=) <$> + _svwrgrVerificationMethod]) + +-- +-- /See:/ 'siteVerificationWebResourceResource' smart constructor. +data SiteVerificationWebResourceResource = SiteVerificationWebResourceResource + { _svwrrOwners :: !(Maybe [Text]) + , _svwrrId :: !(Maybe Text) + , _svwrrSite :: !(Maybe SiteVerificationWebResourceResourceSite) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SiteVerificationWebResourceResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'svwrrOwners' +-- +-- * 'svwrrId' +-- +-- * 'svwrrSite' +siteVerificationWebResourceResource + :: SiteVerificationWebResourceResource +siteVerificationWebResourceResource = + SiteVerificationWebResourceResource + { _svwrrOwners = Nothing + , _svwrrId = Nothing + , _svwrrSite = Nothing + } + +-- | The email addresses of all verified owners. +svwrrOwners :: Lens' SiteVerificationWebResourceResource [Text] +svwrrOwners + = lens _svwrrOwners (\ s a -> s{_svwrrOwners = a}) . + _Default + . _Coerce + +-- | The string used to identify this site. This value should be used in the +-- \"id\" portion of the REST URL for the Get, Update, and Delete +-- operations. +svwrrId :: Lens' SiteVerificationWebResourceResource (Maybe Text) +svwrrId = lens _svwrrId (\ s a -> s{_svwrrId = a}) + +-- | The address and type of a site that is verified or will be verified. +svwrrSite :: Lens' SiteVerificationWebResourceResource (Maybe SiteVerificationWebResourceResourceSite) +svwrrSite + = lens _svwrrSite (\ s a -> s{_svwrrSite = a}) + +instance FromJSON SiteVerificationWebResourceResource + where + parseJSON + = withObject "SiteVerificationWebResourceResource" + (\ o -> + SiteVerificationWebResourceResource <$> + (o .:? "owners" .!= mempty) <*> (o .:? "id") <*> + (o .:? "site")) + +instance ToJSON SiteVerificationWebResourceResource + where + toJSON SiteVerificationWebResourceResource{..} + = object + (catMaybes + [("owners" .=) <$> _svwrrOwners, + ("id" .=) <$> _svwrrId, ("site" .=) <$> _svwrrSite]) diff --git a/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Sum.hs b/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Sum.hs new file mode 100644 index 000000000..86558aec2 --- /dev/null +++ b/gogol-siteverification/gen/Network/Google/SiteVerification/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SiteVerification.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SiteVerification.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-siteverification/gogol-siteverification.cabal b/gogol-siteverification/gogol-siteverification.cabal new file mode 100644 index 000000000..f8e914bda --- /dev/null +++ b/gogol-siteverification/gogol-siteverification.cabal @@ -0,0 +1,50 @@ +name: gogol-siteverification +version: 0.0.1 +synopsis: Google Site Verification API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you programatically verify ownership of websites or domains with + Google. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.SiteVerification.WebResource.Delete + , Network.Google.Resource.SiteVerification.WebResource.Get + , Network.Google.Resource.SiteVerification.WebResource.GetToken + , Network.Google.Resource.SiteVerification.WebResource.Insert + , Network.Google.Resource.SiteVerification.WebResource.List + , Network.Google.Resource.SiteVerification.WebResource.Patch + , Network.Google.Resource.SiteVerification.WebResource.Update + , Network.Google.SiteVerification + , Network.Google.SiteVerification.Types + + other-modules: + Network.Google.SiteVerification.Types.Product + , Network.Google.SiteVerification.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-siteverification/src/.gitkeep b/gogol-siteverification/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-spectrum/LICENSE b/gogol-spectrum/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-spectrum/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-spectrum/Makefile b/gogol-spectrum/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-spectrum/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-spectrum/README.md b/gogol-spectrum/README.md new file mode 100644 index 000000000..4ddd0bc50 --- /dev/null +++ b/gogol-spectrum/README.md @@ -0,0 +1,28 @@ +# gogol-spectrum + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Spectrum Database API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-spectrum` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-spectrum/Setup.hs b/gogol-spectrum/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-spectrum/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrum.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrum.hs new file mode 100644 index 000000000..6a71ee953 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrum.hs @@ -0,0 +1,147 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.GetSpectrum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Requests information about the available spectrum for a device at a +-- location. Requests from a fixed-mode device must include owner +-- information so the device can be registered with the database. +-- +-- /See:/ for @SpectrumPawsGetSpectrum@. +module Spectrum.Paws.GetSpectrum + ( + -- * REST Resource + PawsGetSpectrumAPI + + -- * Creating a Request + , pawsGetSpectrum + , PawsGetSpectrum + + -- * Request Lenses + , pgsQuotaUser + , pgsPrettyPrint + , pgsUserIp + , pgsKey + , pgsOauthToken + , pgsFields + , pgsAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsGetSpectrum@ which the +-- 'PawsGetSpectrum' request conforms to. +type PawsGetSpectrumAPI = + "getSpectrum" :> Post '[JSON] PawsGetSpectrumResponse + +-- | Requests information about the available spectrum for a device at a +-- location. Requests from a fixed-mode device must include owner +-- information so the device can be registered with the database. +-- +-- /See:/ 'pawsGetSpectrum' smart constructor. +data PawsGetSpectrum = PawsGetSpectrum + { _pgsQuotaUser :: !(Maybe Text) + , _pgsPrettyPrint :: !Bool + , _pgsUserIp :: !(Maybe Text) + , _pgsKey :: !(Maybe Text) + , _pgsOauthToken :: !(Maybe Text) + , _pgsFields :: !(Maybe Text) + , _pgsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrum'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgsQuotaUser' +-- +-- * 'pgsPrettyPrint' +-- +-- * 'pgsUserIp' +-- +-- * 'pgsKey' +-- +-- * 'pgsOauthToken' +-- +-- * 'pgsFields' +-- +-- * 'pgsAlt' +pawsGetSpectrum + :: PawsGetSpectrum +pawsGetSpectrum = + PawsGetSpectrum + { _pgsQuotaUser = Nothing + , _pgsPrettyPrint = True + , _pgsUserIp = Nothing + , _pgsKey = Nothing + , _pgsOauthToken = Nothing + , _pgsFields = Nothing + , _pgsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgsQuotaUser :: Lens' PawsGetSpectrum' (Maybe Text) +pgsQuotaUser + = lens _pgsQuotaUser (\ s a -> s{_pgsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgsPrettyPrint :: Lens' PawsGetSpectrum' Bool +pgsPrettyPrint + = lens _pgsPrettyPrint + (\ s a -> s{_pgsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgsUserIp :: Lens' PawsGetSpectrum' (Maybe Text) +pgsUserIp + = lens _pgsUserIp (\ s a -> s{_pgsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgsKey :: Lens' PawsGetSpectrum' (Maybe Text) +pgsKey = lens _pgsKey (\ s a -> s{_pgsKey = a}) + +-- | OAuth 2.0 token for the current user. +pgsOauthToken :: Lens' PawsGetSpectrum' (Maybe Text) +pgsOauthToken + = lens _pgsOauthToken + (\ s a -> s{_pgsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgsFields :: Lens' PawsGetSpectrum' (Maybe Text) +pgsFields + = lens _pgsFields (\ s a -> s{_pgsFields = a}) + +-- | Data format for the response. +pgsAlt :: Lens' PawsGetSpectrum' Text +pgsAlt = lens _pgsAlt (\ s a -> s{_pgsAlt = a}) + +instance GoogleRequest PawsGetSpectrum' where + type Rs PawsGetSpectrum' = PawsGetSpectrumResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsGetSpectrum{..} + = go _pgsQuotaUser _pgsPrettyPrint _pgsUserIp _pgsKey + _pgsOauthToken + _pgsFields + _pgsAlt + where go + = clientWithRoute (Proxy :: Proxy PawsGetSpectrumAPI) + r + u diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrumBatch.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrumBatch.hs new file mode 100644 index 000000000..e640ca571 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/GetSpectrumBatch.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.GetSpectrumBatch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | The Google Spectrum Database does not support batch requests, so this +-- method always yields an UNIMPLEMENTED error. +-- +-- /See:/ for @SpectrumPawsGetSpectrumBatch@. +module Spectrum.Paws.GetSpectrumBatch + ( + -- * REST Resource + PawsGetSpectrumBatchAPI + + -- * Creating a Request + , pawsGetSpectrumBatch + , PawsGetSpectrumBatch + + -- * Request Lenses + , pgsbQuotaUser + , pgsbPrettyPrint + , pgsbUserIp + , pgsbKey + , pgsbOauthToken + , pgsbFields + , pgsbAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsGetSpectrumBatch@ which the +-- 'PawsGetSpectrumBatch' request conforms to. +type PawsGetSpectrumBatchAPI = + "getSpectrumBatch" :> + Post '[JSON] PawsGetSpectrumBatchResponse + +-- | The Google Spectrum Database does not support batch requests, so this +-- method always yields an UNIMPLEMENTED error. +-- +-- /See:/ 'pawsGetSpectrumBatch' smart constructor. +data PawsGetSpectrumBatch = PawsGetSpectrumBatch + { _pgsbQuotaUser :: !(Maybe Text) + , _pgsbPrettyPrint :: !Bool + , _pgsbUserIp :: !(Maybe Text) + , _pgsbKey :: !(Maybe Text) + , _pgsbOauthToken :: !(Maybe Text) + , _pgsbFields :: !(Maybe Text) + , _pgsbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrumBatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgsbQuotaUser' +-- +-- * 'pgsbPrettyPrint' +-- +-- * 'pgsbUserIp' +-- +-- * 'pgsbKey' +-- +-- * 'pgsbOauthToken' +-- +-- * 'pgsbFields' +-- +-- * 'pgsbAlt' +pawsGetSpectrumBatch + :: PawsGetSpectrumBatch +pawsGetSpectrumBatch = + PawsGetSpectrumBatch + { _pgsbQuotaUser = Nothing + , _pgsbPrettyPrint = True + , _pgsbUserIp = Nothing + , _pgsbKey = Nothing + , _pgsbOauthToken = Nothing + , _pgsbFields = Nothing + , _pgsbAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pgsbQuotaUser :: Lens' PawsGetSpectrumBatch' (Maybe Text) +pgsbQuotaUser + = lens _pgsbQuotaUser + (\ s a -> s{_pgsbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pgsbPrettyPrint :: Lens' PawsGetSpectrumBatch' Bool +pgsbPrettyPrint + = lens _pgsbPrettyPrint + (\ s a -> s{_pgsbPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pgsbUserIp :: Lens' PawsGetSpectrumBatch' (Maybe Text) +pgsbUserIp + = lens _pgsbUserIp (\ s a -> s{_pgsbUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pgsbKey :: Lens' PawsGetSpectrumBatch' (Maybe Text) +pgsbKey = lens _pgsbKey (\ s a -> s{_pgsbKey = a}) + +-- | OAuth 2.0 token for the current user. +pgsbOauthToken :: Lens' PawsGetSpectrumBatch' (Maybe Text) +pgsbOauthToken + = lens _pgsbOauthToken + (\ s a -> s{_pgsbOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pgsbFields :: Lens' PawsGetSpectrumBatch' (Maybe Text) +pgsbFields + = lens _pgsbFields (\ s a -> s{_pgsbFields = a}) + +-- | Data format for the response. +pgsbAlt :: Lens' PawsGetSpectrumBatch' Text +pgsbAlt = lens _pgsbAlt (\ s a -> s{_pgsbAlt = a}) + +instance GoogleRequest PawsGetSpectrumBatch' where + type Rs PawsGetSpectrumBatch' = + PawsGetSpectrumBatchResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsGetSpectrumBatch{..} + = go _pgsbQuotaUser _pgsbPrettyPrint _pgsbUserIp + _pgsbKey + _pgsbOauthToken + _pgsbFields + _pgsbAlt + where go + = clientWithRoute + (Proxy :: Proxy PawsGetSpectrumBatchAPI) + r + u diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Init.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Init.hs new file mode 100644 index 000000000..57caf3aa5 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Init.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.Init +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Initializes the connection between a white space device and the +-- database. +-- +-- /See:/ for @SpectrumPawsInit@. +module Spectrum.Paws.Init + ( + -- * REST Resource + PawsInitAPI + + -- * Creating a Request + , pawsInit + , PawsInit + + -- * Request Lenses + , piQuotaUser + , piPrettyPrint + , piUserIp + , piKey + , piOauthToken + , piFields + , piAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsInit@ which the +-- 'PawsInit' request conforms to. +type PawsInitAPI = + "init" :> Post '[JSON] PawsInitResponse + +-- | Initializes the connection between a white space device and the +-- database. +-- +-- /See:/ 'pawsInit' smart constructor. +data PawsInit = PawsInit + { _piQuotaUser :: !(Maybe Text) + , _piPrettyPrint :: !Bool + , _piUserIp :: !(Maybe Text) + , _piKey :: !(Maybe Text) + , _piOauthToken :: !(Maybe Text) + , _piFields :: !(Maybe Text) + , _piAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsInit'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piQuotaUser' +-- +-- * 'piPrettyPrint' +-- +-- * 'piUserIp' +-- +-- * 'piKey' +-- +-- * 'piOauthToken' +-- +-- * 'piFields' +-- +-- * 'piAlt' +pawsInit + :: PawsInit +pawsInit = + PawsInit + { _piQuotaUser = Nothing + , _piPrettyPrint = True + , _piUserIp = Nothing + , _piKey = Nothing + , _piOauthToken = Nothing + , _piFields = Nothing + , _piAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piQuotaUser :: Lens' PawsInit' (Maybe Text) +piQuotaUser + = lens _piQuotaUser (\ s a -> s{_piQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +piPrettyPrint :: Lens' PawsInit' Bool +piPrettyPrint + = lens _piPrettyPrint + (\ s a -> s{_piPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piUserIp :: Lens' PawsInit' (Maybe Text) +piUserIp = lens _piUserIp (\ s a -> s{_piUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piKey :: Lens' PawsInit' (Maybe Text) +piKey = lens _piKey (\ s a -> s{_piKey = a}) + +-- | OAuth 2.0 token for the current user. +piOauthToken :: Lens' PawsInit' (Maybe Text) +piOauthToken + = lens _piOauthToken (\ s a -> s{_piOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piFields :: Lens' PawsInit' (Maybe Text) +piFields = lens _piFields (\ s a -> s{_piFields = a}) + +-- | Data format for the response. +piAlt :: Lens' PawsInit' Text +piAlt = lens _piAlt (\ s a -> s{_piAlt = a}) + +instance GoogleRequest PawsInit' where + type Rs PawsInit' = PawsInitResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsInit{..} + = go _piQuotaUser _piPrettyPrint _piUserIp _piKey + _piOauthToken + _piFields + _piAlt + where go + = clientWithRoute (Proxy :: Proxy PawsInitAPI) r u diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/NotifySpectrumUse.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/NotifySpectrumUse.hs new file mode 100644 index 000000000..0374262c4 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/NotifySpectrumUse.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.NotifySpectrumUse +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Notifies the database that the device has selected certain frequency +-- ranges for transmission. Only to be invoked when required by the +-- regulator. The Google Spectrum Database does not operate in domains that +-- require notification, so this always yields an UNIMPLEMENTED error. +-- +-- /See:/ for @SpectrumPawsNotifySpectrumUse@. +module Spectrum.Paws.NotifySpectrumUse + ( + -- * REST Resource + PawsNotifySpectrumUseAPI + + -- * Creating a Request + , pawsNotifySpectrumUse + , PawsNotifySpectrumUse + + -- * Request Lenses + , pnsuQuotaUser + , pnsuPrettyPrint + , pnsuUserIp + , pnsuKey + , pnsuOauthToken + , pnsuFields + , pnsuAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsNotifySpectrumUse@ which the +-- 'PawsNotifySpectrumUse' request conforms to. +type PawsNotifySpectrumUseAPI = + "notifySpectrumUse" :> + Post '[JSON] PawsNotifySpectrumUseResponse + +-- | Notifies the database that the device has selected certain frequency +-- ranges for transmission. Only to be invoked when required by the +-- regulator. The Google Spectrum Database does not operate in domains that +-- require notification, so this always yields an UNIMPLEMENTED error. +-- +-- /See:/ 'pawsNotifySpectrumUse' smart constructor. +data PawsNotifySpectrumUse = PawsNotifySpectrumUse + { _pnsuQuotaUser :: !(Maybe Text) + , _pnsuPrettyPrint :: !Bool + , _pnsuUserIp :: !(Maybe Text) + , _pnsuKey :: !(Maybe Text) + , _pnsuOauthToken :: !(Maybe Text) + , _pnsuFields :: !(Maybe Text) + , _pnsuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsNotifySpectrumUse'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pnsuQuotaUser' +-- +-- * 'pnsuPrettyPrint' +-- +-- * 'pnsuUserIp' +-- +-- * 'pnsuKey' +-- +-- * 'pnsuOauthToken' +-- +-- * 'pnsuFields' +-- +-- * 'pnsuAlt' +pawsNotifySpectrumUse + :: PawsNotifySpectrumUse +pawsNotifySpectrumUse = + PawsNotifySpectrumUse + { _pnsuQuotaUser = Nothing + , _pnsuPrettyPrint = True + , _pnsuUserIp = Nothing + , _pnsuKey = Nothing + , _pnsuOauthToken = Nothing + , _pnsuFields = Nothing + , _pnsuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pnsuQuotaUser :: Lens' PawsNotifySpectrumUse' (Maybe Text) +pnsuQuotaUser + = lens _pnsuQuotaUser + (\ s a -> s{_pnsuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pnsuPrettyPrint :: Lens' PawsNotifySpectrumUse' Bool +pnsuPrettyPrint + = lens _pnsuPrettyPrint + (\ s a -> s{_pnsuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pnsuUserIp :: Lens' PawsNotifySpectrumUse' (Maybe Text) +pnsuUserIp + = lens _pnsuUserIp (\ s a -> s{_pnsuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pnsuKey :: Lens' PawsNotifySpectrumUse' (Maybe Text) +pnsuKey = lens _pnsuKey (\ s a -> s{_pnsuKey = a}) + +-- | OAuth 2.0 token for the current user. +pnsuOauthToken :: Lens' PawsNotifySpectrumUse' (Maybe Text) +pnsuOauthToken + = lens _pnsuOauthToken + (\ s a -> s{_pnsuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pnsuFields :: Lens' PawsNotifySpectrumUse' (Maybe Text) +pnsuFields + = lens _pnsuFields (\ s a -> s{_pnsuFields = a}) + +-- | Data format for the response. +pnsuAlt :: Lens' PawsNotifySpectrumUse' Text +pnsuAlt = lens _pnsuAlt (\ s a -> s{_pnsuAlt = a}) + +instance GoogleRequest PawsNotifySpectrumUse' where + type Rs PawsNotifySpectrumUse' = + PawsNotifySpectrumUseResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsNotifySpectrumUse{..} + = go _pnsuQuotaUser _pnsuPrettyPrint _pnsuUserIp + _pnsuKey + _pnsuOauthToken + _pnsuFields + _pnsuAlt + where go + = clientWithRoute + (Proxy :: Proxy PawsNotifySpectrumUseAPI) + r + u diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Register.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Register.hs new file mode 100644 index 000000000..2cb715ba3 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/Register.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.Register +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | The Google Spectrum Database implements registration in the getSpectrum +-- method. As such this always returns an UNIMPLEMENTED error. +-- +-- /See:/ for @SpectrumPawsRegister@. +module Spectrum.Paws.Register + ( + -- * REST Resource + PawsRegisterAPI + + -- * Creating a Request + , pawsRegister + , PawsRegister + + -- * Request Lenses + , prQuotaUser + , prPrettyPrint + , prUserIp + , prKey + , prOauthToken + , prFields + , prAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsRegister@ which the +-- 'PawsRegister' request conforms to. +type PawsRegisterAPI = + "register" :> Post '[JSON] PawsRegisterResponse + +-- | The Google Spectrum Database implements registration in the getSpectrum +-- method. As such this always returns an UNIMPLEMENTED error. +-- +-- /See:/ 'pawsRegister' smart constructor. +data PawsRegister = PawsRegister + { _prQuotaUser :: !(Maybe Text) + , _prPrettyPrint :: !Bool + , _prUserIp :: !(Maybe Text) + , _prKey :: !(Maybe Text) + , _prOauthToken :: !(Maybe Text) + , _prFields :: !(Maybe Text) + , _prAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsRegister'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prQuotaUser' +-- +-- * 'prPrettyPrint' +-- +-- * 'prUserIp' +-- +-- * 'prKey' +-- +-- * 'prOauthToken' +-- +-- * 'prFields' +-- +-- * 'prAlt' +pawsRegister + :: PawsRegister +pawsRegister = + PawsRegister + { _prQuotaUser = Nothing + , _prPrettyPrint = True + , _prUserIp = Nothing + , _prKey = Nothing + , _prOauthToken = Nothing + , _prFields = Nothing + , _prAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +prQuotaUser :: Lens' PawsRegister' (Maybe Text) +prQuotaUser + = lens _prQuotaUser (\ s a -> s{_prQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +prPrettyPrint :: Lens' PawsRegister' Bool +prPrettyPrint + = lens _prPrettyPrint + (\ s a -> s{_prPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +prUserIp :: Lens' PawsRegister' (Maybe Text) +prUserIp = lens _prUserIp (\ s a -> s{_prUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +prKey :: Lens' PawsRegister' (Maybe Text) +prKey = lens _prKey (\ s a -> s{_prKey = a}) + +-- | OAuth 2.0 token for the current user. +prOauthToken :: Lens' PawsRegister' (Maybe Text) +prOauthToken + = lens _prOauthToken (\ s a -> s{_prOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +prFields :: Lens' PawsRegister' (Maybe Text) +prFields = lens _prFields (\ s a -> s{_prFields = a}) + +-- | Data format for the response. +prAlt :: Lens' PawsRegister' Text +prAlt = lens _prAlt (\ s a -> s{_prAlt = a}) + +instance GoogleRequest PawsRegister' where + type Rs PawsRegister' = PawsRegisterResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsRegister{..} + = go _prQuotaUser _prPrettyPrint _prUserIp _prKey + _prOauthToken + _prFields + _prAlt + where go + = clientWithRoute (Proxy :: Proxy PawsRegisterAPI) r + u diff --git a/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/VerifyDevice.hs b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/VerifyDevice.hs new file mode 100644 index 000000000..f4250e203 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Resource/Spectrum/Paws/VerifyDevice.hs @@ -0,0 +1,149 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Spectrum.Paws.VerifyDevice +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Validates a device for white space use in accordance with regulatory +-- rules. The Google Spectrum Database does not support master\/slave +-- configurations, so this always yields an UNIMPLEMENTED error. +-- +-- /See:/ for @SpectrumPawsVerifyDevice@. +module Spectrum.Paws.VerifyDevice + ( + -- * REST Resource + PawsVerifyDeviceAPI + + -- * Creating a Request + , pawsVerifyDevice + , PawsVerifyDevice + + -- * Request Lenses + , pvdQuotaUser + , pvdPrettyPrint + , pvdUserIp + , pvdKey + , pvdOauthToken + , pvdFields + , pvdAlt + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types + +-- | A resource alias for @SpectrumPawsVerifyDevice@ which the +-- 'PawsVerifyDevice' request conforms to. +type PawsVerifyDeviceAPI = + "verifyDevice" :> + Post '[JSON] PawsVerifyDeviceResponse + +-- | Validates a device for white space use in accordance with regulatory +-- rules. The Google Spectrum Database does not support master\/slave +-- configurations, so this always yields an UNIMPLEMENTED error. +-- +-- /See:/ 'pawsVerifyDevice' smart constructor. +data PawsVerifyDevice = PawsVerifyDevice + { _pvdQuotaUser :: !(Maybe Text) + , _pvdPrettyPrint :: !Bool + , _pvdUserIp :: !(Maybe Text) + , _pvdKey :: !(Maybe Text) + , _pvdOauthToken :: !(Maybe Text) + , _pvdFields :: !(Maybe Text) + , _pvdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsVerifyDevice'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pvdQuotaUser' +-- +-- * 'pvdPrettyPrint' +-- +-- * 'pvdUserIp' +-- +-- * 'pvdKey' +-- +-- * 'pvdOauthToken' +-- +-- * 'pvdFields' +-- +-- * 'pvdAlt' +pawsVerifyDevice + :: PawsVerifyDevice +pawsVerifyDevice = + PawsVerifyDevice + { _pvdQuotaUser = Nothing + , _pvdPrettyPrint = True + , _pvdUserIp = Nothing + , _pvdKey = Nothing + , _pvdOauthToken = Nothing + , _pvdFields = Nothing + , _pvdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pvdQuotaUser :: Lens' PawsVerifyDevice' (Maybe Text) +pvdQuotaUser + = lens _pvdQuotaUser (\ s a -> s{_pvdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pvdPrettyPrint :: Lens' PawsVerifyDevice' Bool +pvdPrettyPrint + = lens _pvdPrettyPrint + (\ s a -> s{_pvdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pvdUserIp :: Lens' PawsVerifyDevice' (Maybe Text) +pvdUserIp + = lens _pvdUserIp (\ s a -> s{_pvdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pvdKey :: Lens' PawsVerifyDevice' (Maybe Text) +pvdKey = lens _pvdKey (\ s a -> s{_pvdKey = a}) + +-- | OAuth 2.0 token for the current user. +pvdOauthToken :: Lens' PawsVerifyDevice' (Maybe Text) +pvdOauthToken + = lens _pvdOauthToken + (\ s a -> s{_pvdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pvdFields :: Lens' PawsVerifyDevice' (Maybe Text) +pvdFields + = lens _pvdFields (\ s a -> s{_pvdFields = a}) + +-- | Data format for the response. +pvdAlt :: Lens' PawsVerifyDevice' Text +pvdAlt = lens _pvdAlt (\ s a -> s{_pvdAlt = a}) + +instance GoogleRequest PawsVerifyDevice' where + type Rs PawsVerifyDevice' = PawsVerifyDeviceResponse + request = requestWithRoute defReq spectrumURL + requestWithRoute r u PawsVerifyDevice{..} + = go _pvdQuotaUser _pvdPrettyPrint _pvdUserIp _pvdKey + _pvdOauthToken + _pvdFields + _pvdAlt + where go + = clientWithRoute + (Proxy :: Proxy PawsVerifyDeviceAPI) + r + u diff --git a/gogol-spectrum/gen/Network/Google/Spectrum.hs b/gogol-spectrum/gen/Network/Google/Spectrum.hs new file mode 100644 index 000000000..967ec2417 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Spectrum.hs @@ -0,0 +1,334 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Spectrum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for spectrum-management functions. +-- +-- /See:/ +module Network.Google.Spectrum + ( + -- * API + SpectrumAPI + , spectrumAPI + , spectrumURL + + -- * Service Methods + + -- * REST Resources + + -- ** SpectrumPawsGetSpectrum + , module Spectrum.Paws.GetSpectrum + + -- ** SpectrumPawsGetSpectrumBatch + , module Spectrum.Paws.GetSpectrumBatch + + -- ** SpectrumPawsInit + , module Spectrum.Paws.Init + + -- ** SpectrumPawsNotifySpectrumUse + , module Spectrum.Paws.NotifySpectrumUse + + -- ** SpectrumPawsRegister + , module Spectrum.Paws.Register + + -- ** SpectrumPawsVerifyDevice + , module Spectrum.Paws.VerifyDevice + + -- * Types + + -- ** PawsInitResponse + , PawsInitResponse + , pawsInitResponse + , pirKind + , pirVersion + , pirRulesetInfo + , pirType + , pirDatabaseChange + + -- ** GeoLocationPoint + , GeoLocationPoint + , geoLocationPoint + , glpLatitude + , glpLongitude + + -- ** GeoLocationPolygon + , GeoLocationPolygon + , geoLocationPolygon + , glpExterior + + -- ** PawsRegisterResponse + , PawsRegisterResponse + , pawsRegisterResponse + , prrKind + , prrVersion + , prrType + , prrDatabaseChange + + -- ** PawsNotifySpectrumUseRequest + , PawsNotifySpectrumUseRequest + , pawsNotifySpectrumUseRequest + , pnsurSpectra + , pnsurLocation + , pnsurVersion + , pnsurType + , pnsurDeviceDesc + + -- ** Vcard + , Vcard + , vcard + , vEmail + , vAdr + , vOrg + , vTel + , vFn + + -- ** DBUpdateSpec + , DBUpdateSpec + , dBUpdateSpec + , dusDatabases + + -- ** PawsGetSpectrumBatchRequest + , PawsGetSpectrumBatchRequest + , pawsGetSpectrumBatchRequest + , pgsbrAntenna + , pgsbrMasterDeviceDesc + , pgsbrOwner + , pgsbrRequestType + , pgsbrVersion + , pgsbrType + , pgsbrLocations + , pgsbrCapabilities + , pgsbrDeviceDesc + + -- ** VcardTypedText + , VcardTypedText + , vcardTypedText + , vttText + + -- ** GeoSpectrumSchedule + , GeoSpectrumSchedule + , geoSpectrumSchedule + , gssLocation + , gssSpectrumSchedules + + -- ** SpectrumSchedule + , SpectrumSchedule + , spectrumSchedule + , ssSpectra + , ssEventTime + + -- ** VcardTelephone + , VcardTelephone + , vcardTelephone + , vtUri + + -- ** DeviceOwner + , DeviceOwner + , deviceOwner + , doOperator + , doOwner + + -- ** AntennaCharacteristics + , AntennaCharacteristics + , antennaCharacteristics + , acHeight + , acHeightType + , acHeightUncertainty + + -- ** PawsVerifyDeviceResponse + , PawsVerifyDeviceResponse + , pawsVerifyDeviceResponse + , pvdrDeviceValidities + , pvdrKind + , pvdrVersion + , pvdrType + , pvdrDatabaseChange + + -- ** PawsGetSpectrumRequest + , PawsGetSpectrumRequest + , pawsGetSpectrumRequest + , pgsrAntenna + , pgsrMasterDeviceDesc + , pgsrLocation + , pgsrOwner + , pgsrRequestType + , pgsrVersion + , pgsrType + , pgsrCapabilities + , pgsrDeviceDesc + + -- ** EventTime + , EventTime + , eventTime + , etStartTime + , etStopTime + + -- ** VcardAddress + , VcardAddress + , vcardAddress + , vaPobox + , vaCountry + , vaStreet + , vaLocality + , vaCode + , vaRegion + + -- ** PawsGetSpectrumBatchResponse + , PawsGetSpectrumBatchResponse + , pawsGetSpectrumBatchResponse + , pNeedsSpectrumReport + , pKind + , pGeoSpectrumSchedules + , pMaxContiguousBwHz + , pVersion + , pRulesetInfo + , pType + , pDatabaseChange + , pTimestamp + , pDeviceDesc + , pMaxTotalBwHz + + -- ** GeoLocationEllipse + , GeoLocationEllipse + , geoLocationEllipse + , gleSemiMajorAxis + , gleCenter + , gleOrientation + , gleSemiMinorAxis + + -- ** DeviceValidity + , DeviceValidity + , deviceValidity + , dvIsValid + , dvReason + , dvDeviceDesc + + -- ** RulesetInfo + , RulesetInfo + , rulesetInfo + , riRulesetIds + , riMaxPollingSecs + , riMaxLocationChange + , riAuthority + + -- ** PawsNotifySpectrumUseResponse + , PawsNotifySpectrumUseResponse + , pawsNotifySpectrumUseResponse + , pawKind + , pawVersion + , pawType + + -- ** PawsRegisterRequest + , PawsRegisterRequest + , pawsRegisterRequest + , prrrAntenna + , prrrLocation + , prrrDeviceOwner + , prrrVersion + , prrrType + , prrrDeviceDesc + + -- ** DatabaseSpec + , DatabaseSpec + , databaseSpec + , dsUri + , dsName + + -- ** SpectrumMessage + , SpectrumMessage + , spectrumMessage + , smBandwidth + , smFrequencyRanges + + -- ** GeoLocation + , GeoLocation + , geoLocation + , glConfidence + , glPoint + , glRegion + + -- ** FrequencyRange + , FrequencyRange + , frequencyRange + , frStopHz + , frMaxPowerDBm + , frChannelId + , frStartHz + + -- ** PawsVerifyDeviceRequest + , PawsVerifyDeviceRequest + , pawsVerifyDeviceRequest + , pvdrvVersion + , pvdrvDeviceDescs + , pvdrvType + + -- ** DeviceDescriptor + , DeviceDescriptor + , deviceDescriptor + , ddEtsiEnDeviceEmissionsClass + , ddRulesetIds + , ddModelId + , ddEtsiEnDeviceType + , ddEtsiEnTechnologyId + , ddFccId + , ddManufacturerId + , ddFccTvbdDeviceType + , ddEtsiEnDeviceCategory + , ddSerialNumber + + -- ** PawsGetSpectrumResponse + , PawsGetSpectrumResponse + , pawsGetSpectrumResponse + , pgsrgNeedsSpectrumReport + , pgsrgSpectrumSchedules + , pgsrgKind + , pgsrgMaxContiguousBwHz + , pgsrgVersion + , pgsrgRulesetInfo + , pgsrgType + , pgsrgDatabaseChange + , pgsrgTimestamp + , pgsrgDeviceDesc + , pgsrgMaxTotalBwHz + + -- ** PawsInitRequest + , PawsInitRequest + , pawsInitRequest + , piriLocation + , piriVersion + , piriType + , piriDeviceDesc + + -- ** DeviceCapabilities + , DeviceCapabilities + , deviceCapabilities + , dcFrequencyRanges + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Spectrum.Paws.GetSpectrum +import Network.Google.Resource.Spectrum.Paws.GetSpectrumBatch +import Network.Google.Resource.Spectrum.Paws.Init +import Network.Google.Resource.Spectrum.Paws.NotifySpectrumUse +import Network.Google.Resource.Spectrum.Paws.Register +import Network.Google.Resource.Spectrum.Paws.VerifyDevice +import Network.Google.Spectrum.Types + +{- $resources +TODO +-} + +type SpectrumAPI = Paws + +spectrumAPI :: Proxy SpectrumAPI +spectrumAPI = Proxy diff --git a/gogol-spectrum/gen/Network/Google/Spectrum/Types.hs b/gogol-spectrum/gen/Network/Google/Spectrum/Types.hs new file mode 100644 index 000000000..619869ad3 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Spectrum/Types.hs @@ -0,0 +1,298 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Spectrum.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Spectrum.Types + ( + -- * Service URL + spectrumURL + + -- * PawsInitResponse + , PawsInitResponse + , pawsInitResponse + , pirKind + , pirVersion + , pirRulesetInfo + , pirType + , pirDatabaseChange + + -- * GeoLocationPoint + , GeoLocationPoint + , geoLocationPoint + , glpLatitude + , glpLongitude + + -- * GeoLocationPolygon + , GeoLocationPolygon + , geoLocationPolygon + , glpExterior + + -- * PawsRegisterResponse + , PawsRegisterResponse + , pawsRegisterResponse + , prrKind + , prrVersion + , prrType + , prrDatabaseChange + + -- * PawsNotifySpectrumUseRequest + , PawsNotifySpectrumUseRequest + , pawsNotifySpectrumUseRequest + , pnsurSpectra + , pnsurLocation + , pnsurVersion + , pnsurType + , pnsurDeviceDesc + + -- * Vcard + , Vcard + , vcard + , vEmail + , vAdr + , vOrg + , vTel + , vFn + + -- * DBUpdateSpec + , DBUpdateSpec + , dBUpdateSpec + , dusDatabases + + -- * PawsGetSpectrumBatchRequest + , PawsGetSpectrumBatchRequest + , pawsGetSpectrumBatchRequest + , pgsbrAntenna + , pgsbrMasterDeviceDesc + , pgsbrOwner + , pgsbrRequestType + , pgsbrVersion + , pgsbrType + , pgsbrLocations + , pgsbrCapabilities + , pgsbrDeviceDesc + + -- * VcardTypedText + , VcardTypedText + , vcardTypedText + , vttText + + -- * GeoSpectrumSchedule + , GeoSpectrumSchedule + , geoSpectrumSchedule + , gssLocation + , gssSpectrumSchedules + + -- * SpectrumSchedule + , SpectrumSchedule + , spectrumSchedule + , ssSpectra + , ssEventTime + + -- * VcardTelephone + , VcardTelephone + , vcardTelephone + , vtUri + + -- * DeviceOwner + , DeviceOwner + , deviceOwner + , doOperator + , doOwner + + -- * AntennaCharacteristics + , AntennaCharacteristics + , antennaCharacteristics + , acHeight + , acHeightType + , acHeightUncertainty + + -- * PawsVerifyDeviceResponse + , PawsVerifyDeviceResponse + , pawsVerifyDeviceResponse + , pvdrDeviceValidities + , pvdrKind + , pvdrVersion + , pvdrType + , pvdrDatabaseChange + + -- * PawsGetSpectrumRequest + , PawsGetSpectrumRequest + , pawsGetSpectrumRequest + , pgsrAntenna + , pgsrMasterDeviceDesc + , pgsrLocation + , pgsrOwner + , pgsrRequestType + , pgsrVersion + , pgsrType + , pgsrCapabilities + , pgsrDeviceDesc + + -- * EventTime + , EventTime + , eventTime + , etStartTime + , etStopTime + + -- * VcardAddress + , VcardAddress + , vcardAddress + , vaPobox + , vaCountry + , vaStreet + , vaLocality + , vaCode + , vaRegion + + -- * PawsGetSpectrumBatchResponse + , PawsGetSpectrumBatchResponse + , pawsGetSpectrumBatchResponse + , pNeedsSpectrumReport + , pKind + , pGeoSpectrumSchedules + , pMaxContiguousBwHz + , pVersion + , pRulesetInfo + , pType + , pDatabaseChange + , pTimestamp + , pDeviceDesc + , pMaxTotalBwHz + + -- * GeoLocationEllipse + , GeoLocationEllipse + , geoLocationEllipse + , gleSemiMajorAxis + , gleCenter + , gleOrientation + , gleSemiMinorAxis + + -- * DeviceValidity + , DeviceValidity + , deviceValidity + , dvIsValid + , dvReason + , dvDeviceDesc + + -- * RulesetInfo + , RulesetInfo + , rulesetInfo + , riRulesetIds + , riMaxPollingSecs + , riMaxLocationChange + , riAuthority + + -- * PawsNotifySpectrumUseResponse + , PawsNotifySpectrumUseResponse + , pawsNotifySpectrumUseResponse + , pawKind + , pawVersion + , pawType + + -- * PawsRegisterRequest + , PawsRegisterRequest + , pawsRegisterRequest + , prrrAntenna + , prrrLocation + , prrrDeviceOwner + , prrrVersion + , prrrType + , prrrDeviceDesc + + -- * DatabaseSpec + , DatabaseSpec + , databaseSpec + , dsUri + , dsName + + -- * SpectrumMessage + , SpectrumMessage + , spectrumMessage + , smBandwidth + , smFrequencyRanges + + -- * GeoLocation + , GeoLocation + , geoLocation + , glConfidence + , glPoint + , glRegion + + -- * FrequencyRange + , FrequencyRange + , frequencyRange + , frStopHz + , frMaxPowerDBm + , frChannelId + , frStartHz + + -- * PawsVerifyDeviceRequest + , PawsVerifyDeviceRequest + , pawsVerifyDeviceRequest + , pvdrvVersion + , pvdrvDeviceDescs + , pvdrvType + + -- * DeviceDescriptor + , DeviceDescriptor + , deviceDescriptor + , ddEtsiEnDeviceEmissionsClass + , ddRulesetIds + , ddModelId + , ddEtsiEnDeviceType + , ddEtsiEnTechnologyId + , ddFccId + , ddManufacturerId + , ddFccTvbdDeviceType + , ddEtsiEnDeviceCategory + , ddSerialNumber + + -- * PawsGetSpectrumResponse + , PawsGetSpectrumResponse + , pawsGetSpectrumResponse + , pgsrgNeedsSpectrumReport + , pgsrgSpectrumSchedules + , pgsrgKind + , pgsrgMaxContiguousBwHz + , pgsrgVersion + , pgsrgRulesetInfo + , pgsrgType + , pgsrgDatabaseChange + , pgsrgTimestamp + , pgsrgDeviceDesc + , pgsrgMaxTotalBwHz + + -- * PawsInitRequest + , PawsInitRequest + , pawsInitRequest + , piriLocation + , piriVersion + , piriType + , piriDeviceDesc + + -- * DeviceCapabilities + , DeviceCapabilities + , deviceCapabilities + , dcFrequencyRanges + ) where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types.Product +import Network.Google.Spectrum.Types.Sum + +-- | URL referring to version 'v1explorer' of the Google Spectrum Database API. +spectrumURL :: BaseURL +spectrumURL + = BaseUrl Https + "https://www.googleapis.com/spectrum/v1explorer/paws/" + 443 diff --git a/gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs b/gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs new file mode 100644 index 000000000..a492b7377 --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs @@ -0,0 +1,2753 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Spectrum.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Spectrum.Types.Product where + +import Network.Google.Prelude +import Network.Google.Spectrum.Types.Sum + +-- | The initialization response message communicates database parameters to +-- the requesting device. +-- +-- /See:/ 'pawsInitResponse' smart constructor. +data PawsInitResponse = PawsInitResponse + { _pirKind :: !Text + , _pirVersion :: !(Maybe Text) + , _pirRulesetInfo :: !(Maybe (Maybe RulesetInfo)) + , _pirType :: !(Maybe Text) + , _pirDatabaseChange :: !(Maybe (Maybe DBUpdateSpec)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsInitResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pirKind' +-- +-- * 'pirVersion' +-- +-- * 'pirRulesetInfo' +-- +-- * 'pirType' +-- +-- * 'pirDatabaseChange' +pawsInitResponse + :: PawsInitResponse +pawsInitResponse = + PawsInitResponse + { _pirKind = "spectrum#pawsInitResponse" + , _pirVersion = Nothing + , _pirRulesetInfo = Nothing + , _pirType = Nothing + , _pirDatabaseChange = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsInitResponse\". +pirKind :: Lens' PawsInitResponse Text +pirKind = lens _pirKind (\ s a -> s{_pirKind = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pirVersion :: Lens' PawsInitResponse (Maybe Text) +pirVersion + = lens _pirVersion (\ s a -> s{_pirVersion = a}) + +-- | The rulesetInfo parameter must be included in the response. This +-- parameter specifies the regulatory domain and parameters applicable to +-- that domain. The database must include the authority field, which +-- defines the regulatory domain for the location specified in the INIT_REQ +-- message. +pirRulesetInfo :: Lens' PawsInitResponse (Maybe (Maybe RulesetInfo)) +pirRulesetInfo + = lens _pirRulesetInfo + (\ s a -> s{_pirRulesetInfo = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pirType :: Lens' PawsInitResponse (Maybe Text) +pirType = lens _pirType (\ s a -> s{_pirType = a}) + +-- | A database may include the databaseChange parameter to notify a device +-- of a change to its database URI, providing one or more alternate +-- database URIs. The device should use this information to update its list +-- of pre-configured databases by (only) replacing its entry for the +-- responding database with the list of alternate URIs. +pirDatabaseChange :: Lens' PawsInitResponse (Maybe (Maybe DBUpdateSpec)) +pirDatabaseChange + = lens _pirDatabaseChange + (\ s a -> s{_pirDatabaseChange = a}) + +instance FromJSON PawsInitResponse where + parseJSON + = withObject "PawsInitResponse" + (\ o -> + PawsInitResponse <$> + (o .:? "kind" .!= "spectrum#pawsInitResponse") <*> + (o .:? "version") + <*> (o .:? "rulesetInfo") + <*> (o .:? "type") + <*> (o .:? "databaseChange")) + +instance ToJSON PawsInitResponse where + toJSON PawsInitResponse{..} + = object + (catMaybes + [Just ("kind" .= _pirKind), + ("version" .=) <$> _pirVersion, + ("rulesetInfo" .=) <$> _pirRulesetInfo, + ("type" .=) <$> _pirType, + ("databaseChange" .=) <$> _pirDatabaseChange]) + +-- | A single geolocation on the globe. +-- +-- /See:/ 'geoLocationPoint' smart constructor. +data GeoLocationPoint = GeoLocationPoint + { _glpLatitude :: !(Maybe Double) + , _glpLongitude :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoLocationPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glpLatitude' +-- +-- * 'glpLongitude' +geoLocationPoint + :: GeoLocationPoint +geoLocationPoint = + GeoLocationPoint + { _glpLatitude = Nothing + , _glpLongitude = Nothing + } + +-- | A required floating-point number that expresses the latitude in degrees +-- using the WGS84 datum. For details on this encoding, see the National +-- Imagery and Mapping Agency\'s Technical Report TR8350.2. +glpLatitude :: Lens' GeoLocationPoint (Maybe Double) +glpLatitude + = lens _glpLatitude (\ s a -> s{_glpLatitude = a}) + +-- | A required floating-point number that expresses the longitude in degrees +-- using the WGS84 datum. For details on this encoding, see the National +-- Imagery and Mapping Agency\'s Technical Report TR8350.2. +glpLongitude :: Lens' GeoLocationPoint (Maybe Double) +glpLongitude + = lens _glpLongitude (\ s a -> s{_glpLongitude = a}) + +instance FromJSON GeoLocationPoint where + parseJSON + = withObject "GeoLocationPoint" + (\ o -> + GeoLocationPoint <$> + (o .:? "latitude") <*> (o .:? "longitude")) + +instance ToJSON GeoLocationPoint where + toJSON GeoLocationPoint{..} + = object + (catMaybes + [("latitude" .=) <$> _glpLatitude, + ("longitude" .=) <$> _glpLongitude]) + +-- | A region is represented using the polygonal shape. +-- +-- /See:/ 'geoLocationPolygon' smart constructor. +newtype GeoLocationPolygon = GeoLocationPolygon + { _glpExterior :: Maybe [Maybe GeoLocationPoint] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoLocationPolygon' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glpExterior' +geoLocationPolygon + :: GeoLocationPolygon +geoLocationPolygon = + GeoLocationPolygon + { _glpExterior = Nothing + } + +-- | When the geolocation describes a region, the exterior field refers to a +-- list of latitude\/longitude points that represent the vertices of a +-- polygon. The first and last points must be the same. Thus, a minimum of +-- four points is required. The following polygon restrictions from RFC5491 +-- apply: - A connecting line shall not cross another connecting line of +-- the same polygon. - The vertices must be defined in a counterclockwise +-- order. - The edges of a polygon are defined by the shortest path between +-- two points in space (not a geodesic curve). Consequently, the length +-- between two adjacent vertices should be restricted to a maximum of 130 +-- km. - All vertices are assumed to be at the same altitude. - Polygon +-- shapes should be restricted to a maximum of 15 vertices (16 points that +-- include the repeated vertex). +glpExterior :: Lens' GeoLocationPolygon [Maybe GeoLocationPoint] +glpExterior + = lens _glpExterior (\ s a -> s{_glpExterior = a}) . + _Default + . _Coerce + +instance FromJSON GeoLocationPolygon where + parseJSON + = withObject "GeoLocationPolygon" + (\ o -> + GeoLocationPolygon <$> (o .:? "exterior" .!= mempty)) + +instance ToJSON GeoLocationPolygon where + toJSON GeoLocationPolygon{..} + = object + (catMaybes [("exterior" .=) <$> _glpExterior]) + +-- | The registration response message simply acknowledges receipt of the +-- request and is otherwise empty. +-- +-- /See:/ 'pawsRegisterResponse' smart constructor. +data PawsRegisterResponse = PawsRegisterResponse + { _prrKind :: !Text + , _prrVersion :: !(Maybe Text) + , _prrType :: !(Maybe Text) + , _prrDatabaseChange :: !(Maybe (Maybe DBUpdateSpec)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsRegisterResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prrKind' +-- +-- * 'prrVersion' +-- +-- * 'prrType' +-- +-- * 'prrDatabaseChange' +pawsRegisterResponse + :: PawsRegisterResponse +pawsRegisterResponse = + PawsRegisterResponse + { _prrKind = "spectrum#pawsRegisterResponse" + , _prrVersion = Nothing + , _prrType = Nothing + , _prrDatabaseChange = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsRegisterResponse\". +prrKind :: Lens' PawsRegisterResponse Text +prrKind = lens _prrKind (\ s a -> s{_prrKind = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +prrVersion :: Lens' PawsRegisterResponse (Maybe Text) +prrVersion + = lens _prrVersion (\ s a -> s{_prrVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +prrType :: Lens' PawsRegisterResponse (Maybe Text) +prrType = lens _prrType (\ s a -> s{_prrType = a}) + +-- | A database may include the databaseChange parameter to notify a device +-- of a change to its database URI, providing one or more alternate +-- database URIs. The device should use this information to update its list +-- of pre-configured databases by (only) replacing its entry for the +-- responding database with the list of alternate URIs. +prrDatabaseChange :: Lens' PawsRegisterResponse (Maybe (Maybe DBUpdateSpec)) +prrDatabaseChange + = lens _prrDatabaseChange + (\ s a -> s{_prrDatabaseChange = a}) + +instance FromJSON PawsRegisterResponse where + parseJSON + = withObject "PawsRegisterResponse" + (\ o -> + PawsRegisterResponse <$> + (o .:? "kind" .!= "spectrum#pawsRegisterResponse") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "databaseChange")) + +instance ToJSON PawsRegisterResponse where + toJSON PawsRegisterResponse{..} + = object + (catMaybes + [Just ("kind" .= _prrKind), + ("version" .=) <$> _prrVersion, + ("type" .=) <$> _prrType, + ("databaseChange" .=) <$> _prrDatabaseChange]) + +-- | The spectrum-use notification message which must contain the geolocation +-- of the Device and parameters required by the regulatory domain. +-- +-- /See:/ 'pawsNotifySpectrumUseRequest' smart constructor. +data PawsNotifySpectrumUseRequest = PawsNotifySpectrumUseRequest + { _pnsurSpectra :: !(Maybe [Maybe SpectrumMessage]) + , _pnsurLocation :: !(Maybe (Maybe GeoLocation)) + , _pnsurVersion :: !(Maybe Text) + , _pnsurType :: !(Maybe Text) + , _pnsurDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsNotifySpectrumUseRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pnsurSpectra' +-- +-- * 'pnsurLocation' +-- +-- * 'pnsurVersion' +-- +-- * 'pnsurType' +-- +-- * 'pnsurDeviceDesc' +pawsNotifySpectrumUseRequest + :: PawsNotifySpectrumUseRequest +pawsNotifySpectrumUseRequest = + PawsNotifySpectrumUseRequest + { _pnsurSpectra = Nothing + , _pnsurLocation = Nothing + , _pnsurVersion = Nothing + , _pnsurType = Nothing + , _pnsurDeviceDesc = Nothing + } + +-- | A spectrum list is required in the spectrum-use notification. The list +-- specifies the spectrum that the device expects to use, which includes +-- frequency ranges and maximum power levels. The list may be empty if the +-- device decides not to use any of spectrum. For consistency, the +-- psdBandwidthHz value should match that from one of the spectrum elements +-- in the corresponding available spectrum response previously sent to the +-- device by the database. Note that maximum power levels in the spectrum +-- element must be expressed as power spectral density over the specified +-- psdBandwidthHz value. The actual bandwidth to be used (as computed from +-- the start and stop frequencies) may be different from the psdBandwidthHz +-- value. As an example, when regulatory rules express maximum power +-- spectral density in terms of maximum power over any 100 kHz band, then +-- the psdBandwidthHz value should be set to 100 kHz, even though the +-- actual bandwidth used can be 20 kHz. +pnsurSpectra :: Lens' PawsNotifySpectrumUseRequest [Maybe SpectrumMessage] +pnsurSpectra + = lens _pnsurSpectra (\ s a -> s{_pnsurSpectra = a}) + . _Default + . _Coerce + +-- | The geolocation of the master device (the device that is sending the +-- spectrum-use notification) to the database is required in the +-- spectrum-use notification message. +pnsurLocation :: Lens' PawsNotifySpectrumUseRequest (Maybe (Maybe GeoLocation)) +pnsurLocation + = lens _pnsurLocation + (\ s a -> s{_pnsurLocation = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pnsurVersion :: Lens' PawsNotifySpectrumUseRequest (Maybe Text) +pnsurVersion + = lens _pnsurVersion (\ s a -> s{_pnsurVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pnsurType :: Lens' PawsNotifySpectrumUseRequest (Maybe Text) +pnsurType + = lens _pnsurType (\ s a -> s{_pnsurType = a}) + +-- | Device descriptor information is required in the spectrum-use +-- notification message. +pnsurDeviceDesc :: Lens' PawsNotifySpectrumUseRequest (Maybe (Maybe DeviceDescriptor)) +pnsurDeviceDesc + = lens _pnsurDeviceDesc + (\ s a -> s{_pnsurDeviceDesc = a}) + +instance FromJSON PawsNotifySpectrumUseRequest where + parseJSON + = withObject "PawsNotifySpectrumUseRequest" + (\ o -> + PawsNotifySpectrumUseRequest <$> + (o .:? "spectra" .!= mempty) <*> (o .:? "location") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "deviceDesc")) + +instance ToJSON PawsNotifySpectrumUseRequest where + toJSON PawsNotifySpectrumUseRequest{..} + = object + (catMaybes + [("spectra" .=) <$> _pnsurSpectra, + ("location" .=) <$> _pnsurLocation, + ("version" .=) <$> _pnsurVersion, + ("type" .=) <$> _pnsurType, + ("deviceDesc" .=) <$> _pnsurDeviceDesc]) + +-- | A vCard-in-JSON message that contains only the fields needed for PAWS: - +-- fn: Full name of an individual - org: Name of the organization - adr: +-- Address fields - tel: Telephone numbers - email: Email addresses +-- +-- /See:/ 'vcard' smart constructor. +data Vcard = Vcard + { _vEmail :: !(Maybe (Maybe VcardTypedText)) + , _vAdr :: !(Maybe (Maybe VcardAddress)) + , _vOrg :: !(Maybe (Maybe VcardTypedText)) + , _vTel :: !(Maybe (Maybe VcardTelephone)) + , _vFn :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Vcard' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vEmail' +-- +-- * 'vAdr' +-- +-- * 'vOrg' +-- +-- * 'vTel' +-- +-- * 'vFn' +vcard + :: Vcard +vcard = + Vcard + { _vEmail = Nothing + , _vAdr = Nothing + , _vOrg = Nothing + , _vTel = Nothing + , _vFn = Nothing + } + +-- | An email address that can be used to reach the contact. +vEmail :: Lens' Vcard (Maybe (Maybe VcardTypedText)) +vEmail = lens _vEmail (\ s a -> s{_vEmail = a}) + +-- | The street address of the entity. +vAdr :: Lens' Vcard (Maybe (Maybe VcardAddress)) +vAdr = lens _vAdr (\ s a -> s{_vAdr = a}) + +-- | The organization associated with the registering entity. +vOrg :: Lens' Vcard (Maybe (Maybe VcardTypedText)) +vOrg = lens _vOrg (\ s a -> s{_vOrg = a}) + +-- | A telephone number that can be used to call the contact. +vTel :: Lens' Vcard (Maybe (Maybe VcardTelephone)) +vTel = lens _vTel (\ s a -> s{_vTel = a}) + +-- | The full name of the contact person. For example: John A. Smith. +vFn :: Lens' Vcard (Maybe Text) +vFn = lens _vFn (\ s a -> s{_vFn = a}) + +instance FromJSON Vcard where + parseJSON + = withObject "Vcard" + (\ o -> + Vcard <$> + (o .:? "email") <*> (o .:? "adr") <*> (o .:? "org") + <*> (o .:? "tel") + <*> (o .:? "fn")) + +instance ToJSON Vcard where + toJSON Vcard{..} + = object + (catMaybes + [("email" .=) <$> _vEmail, ("adr" .=) <$> _vAdr, + ("org" .=) <$> _vOrg, ("tel" .=) <$> _vTel, + ("fn" .=) <$> _vFn]) + +-- | This message is provided by the database to notify devices of an +-- upcoming change to the database URI. +-- +-- /See:/ 'dBUpdateSpec' smart constructor. +newtype DBUpdateSpec = DBUpdateSpec + { _dusDatabases :: Maybe [Maybe DatabaseSpec] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DBUpdateSpec' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dusDatabases' +dBUpdateSpec + :: DBUpdateSpec +dBUpdateSpec = + DBUpdateSpec + { _dusDatabases = Nothing + } + +-- | A required list of one or more databases. A device should update its +-- preconfigured list of databases to replace (only) the database that +-- provided the response with the specified entries. +dusDatabases :: Lens' DBUpdateSpec [Maybe DatabaseSpec] +dusDatabases + = lens _dusDatabases (\ s a -> s{_dusDatabases = a}) + . _Default + . _Coerce + +instance FromJSON DBUpdateSpec where + parseJSON + = withObject "DBUpdateSpec" + (\ o -> + DBUpdateSpec <$> (o .:? "databases" .!= mempty)) + +instance ToJSON DBUpdateSpec where + toJSON DBUpdateSpec{..} + = object + (catMaybes [("databases" .=) <$> _dusDatabases]) + +-- | The request message for a batch available spectrum query protocol. +-- +-- /See:/ 'pawsGetSpectrumBatchRequest' smart constructor. +data PawsGetSpectrumBatchRequest = PawsGetSpectrumBatchRequest + { _pgsbrAntenna :: !(Maybe (Maybe AntennaCharacteristics)) + , _pgsbrMasterDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + , _pgsbrOwner :: !(Maybe (Maybe DeviceOwner)) + , _pgsbrRequestType :: !(Maybe Text) + , _pgsbrVersion :: !(Maybe Text) + , _pgsbrType :: !(Maybe Text) + , _pgsbrLocations :: !(Maybe [Maybe GeoLocation]) + , _pgsbrCapabilities :: !(Maybe (Maybe DeviceCapabilities)) + , _pgsbrDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrumBatchRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgsbrAntenna' +-- +-- * 'pgsbrMasterDeviceDesc' +-- +-- * 'pgsbrOwner' +-- +-- * 'pgsbrRequestType' +-- +-- * 'pgsbrVersion' +-- +-- * 'pgsbrType' +-- +-- * 'pgsbrLocations' +-- +-- * 'pgsbrCapabilities' +-- +-- * 'pgsbrDeviceDesc' +pawsGetSpectrumBatchRequest + :: PawsGetSpectrumBatchRequest +pawsGetSpectrumBatchRequest = + PawsGetSpectrumBatchRequest + { _pgsbrAntenna = Nothing + , _pgsbrMasterDeviceDesc = Nothing + , _pgsbrOwner = Nothing + , _pgsbrRequestType = Nothing + , _pgsbrVersion = Nothing + , _pgsbrType = Nothing + , _pgsbrLocations = Nothing + , _pgsbrCapabilities = Nothing + , _pgsbrDeviceDesc = Nothing + } + +-- | Depending on device type and regulatory domain, antenna characteristics +-- may be required. +pgsbrAntenna :: Lens' PawsGetSpectrumBatchRequest (Maybe (Maybe AntennaCharacteristics)) +pgsbrAntenna + = lens _pgsbrAntenna (\ s a -> s{_pgsbrAntenna = a}) + +-- | When an available spectrum batch request is made by the master device (a +-- device with geolocation capability) on behalf of a slave device (a +-- device without geolocation capability), the rules of the applicable +-- regulatory domain may require the master device to provide its own +-- device descriptor information (in addition to device descriptor +-- information for the slave device in a separate parameter). +pgsbrMasterDeviceDesc :: Lens' PawsGetSpectrumBatchRequest (Maybe (Maybe DeviceDescriptor)) +pgsbrMasterDeviceDesc + = lens _pgsbrMasterDeviceDesc + (\ s a -> s{_pgsbrMasterDeviceDesc = a}) + +-- | Depending on device type and regulatory domain, device owner information +-- may be included in an available spectrum batch request. This allows the +-- device to register and get spectrum-availability information in a single +-- request. +pgsbrOwner :: Lens' PawsGetSpectrumBatchRequest (Maybe (Maybe DeviceOwner)) +pgsbrOwner + = lens _pgsbrOwner (\ s a -> s{_pgsbrOwner = a}) + +-- | The request type parameter is an optional parameter that can be used to +-- modify an available spectrum batch request, but its use depends on +-- applicable regulatory rules. For example, It may be used to request +-- generic slave device parameters without having to specify the device +-- descriptor for a specific device. When the requestType parameter is +-- missing, the request is for a specific device (master or slave), and the +-- device descriptor parameter for the device on whose behalf the batch +-- request is made is required. +pgsbrRequestType :: Lens' PawsGetSpectrumBatchRequest (Maybe Text) +pgsbrRequestType + = lens _pgsbrRequestType + (\ s a -> s{_pgsbrRequestType = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pgsbrVersion :: Lens' PawsGetSpectrumBatchRequest (Maybe Text) +pgsbrVersion + = lens _pgsbrVersion (\ s a -> s{_pgsbrVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pgsbrType :: Lens' PawsGetSpectrumBatchRequest (Maybe Text) +pgsbrType + = lens _pgsbrType (\ s a -> s{_pgsbrType = a}) + +-- | A geolocation list is required. This allows a device to specify its +-- current location plus additional anticipated locations when allowed by +-- the regulatory domain. At least one location must be included. +-- Geolocation must be given as the location of the radiation center of the +-- device\'s antenna. If a location specifies a region, rather than a +-- point, the database may return an UNIMPLEMENTED error if it does not +-- support query by region. There is no upper limit on the number of +-- locations included in a available spectrum batch request, but the +-- database may restrict the number of locations it supports by returning a +-- response with fewer locations than specified in the batch request. Note +-- that geolocations must be those of the master device (a device with +-- geolocation capability that makes an available spectrum batch request), +-- whether the master device is making the request on its own behalf or on +-- behalf of a slave device (one without geolocation capability). +pgsbrLocations :: Lens' PawsGetSpectrumBatchRequest [Maybe GeoLocation] +pgsbrLocations + = lens _pgsbrLocations + (\ s a -> s{_pgsbrLocations = a}) + . _Default + . _Coerce + +-- | The master device may include its device capabilities to limit the +-- available-spectrum batch response to the spectrum that is compatible +-- with its capabilities. The database should not return spectrum that is +-- incompatible with the specified capabilities. +pgsbrCapabilities :: Lens' PawsGetSpectrumBatchRequest (Maybe (Maybe DeviceCapabilities)) +pgsbrCapabilities + = lens _pgsbrCapabilities + (\ s a -> s{_pgsbrCapabilities = a}) + +-- | When the available spectrum request is made on behalf of a specific +-- device (a master or slave device), device descriptor information for the +-- device on whose behalf the request is made is required (in such cases, +-- the requestType parameter must be empty). When a requestType value is +-- specified, device descriptor information may be optional or required +-- according to the rules of the applicable regulatory domain. +pgsbrDeviceDesc :: Lens' PawsGetSpectrumBatchRequest (Maybe (Maybe DeviceDescriptor)) +pgsbrDeviceDesc + = lens _pgsbrDeviceDesc + (\ s a -> s{_pgsbrDeviceDesc = a}) + +instance FromJSON PawsGetSpectrumBatchRequest where + parseJSON + = withObject "PawsGetSpectrumBatchRequest" + (\ o -> + PawsGetSpectrumBatchRequest <$> + (o .:? "antenna") <*> (o .:? "masterDeviceDesc") <*> + (o .:? "owner") + <*> (o .:? "requestType") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "locations" .!= mempty) + <*> (o .:? "capabilities") + <*> (o .:? "deviceDesc")) + +instance ToJSON PawsGetSpectrumBatchRequest where + toJSON PawsGetSpectrumBatchRequest{..} + = object + (catMaybes + [("antenna" .=) <$> _pgsbrAntenna, + ("masterDeviceDesc" .=) <$> _pgsbrMasterDeviceDesc, + ("owner" .=) <$> _pgsbrOwner, + ("requestType" .=) <$> _pgsbrRequestType, + ("version" .=) <$> _pgsbrVersion, + ("type" .=) <$> _pgsbrType, + ("locations" .=) <$> _pgsbrLocations, + ("capabilities" .=) <$> _pgsbrCapabilities, + ("deviceDesc" .=) <$> _pgsbrDeviceDesc]) + +-- | The structure used to represent an organization and an email address. +-- +-- /See:/ 'vcardTypedText' smart constructor. +newtype VcardTypedText = VcardTypedText + { _vttText :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VcardTypedText' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vttText' +vcardTypedText + :: VcardTypedText +vcardTypedText = + VcardTypedText + { _vttText = Nothing + } + +-- | The text string associated with this item. For example, for an org +-- field: ACME, inc. For an email field: smith\'example.com. +vttText :: Lens' VcardTypedText (Maybe Text) +vttText = lens _vttText (\ s a -> s{_vttText = a}) + +instance FromJSON VcardTypedText where + parseJSON + = withObject "VcardTypedText" + (\ o -> VcardTypedText <$> (o .:? "text")) + +instance ToJSON VcardTypedText where + toJSON VcardTypedText{..} + = object (catMaybes [("text" .=) <$> _vttText]) + +-- | The schedule of spectrum profiles available at a particular geolocation. +-- +-- /See:/ 'geoSpectrumSchedule' smart constructor. +data GeoSpectrumSchedule = GeoSpectrumSchedule + { _gssLocation :: !(Maybe (Maybe GeoLocation)) + , _gssSpectrumSchedules :: !(Maybe [Maybe SpectrumSchedule]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoSpectrumSchedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gssLocation' +-- +-- * 'gssSpectrumSchedules' +geoSpectrumSchedule + :: GeoSpectrumSchedule +geoSpectrumSchedule = + GeoSpectrumSchedule + { _gssLocation = Nothing + , _gssSpectrumSchedules = Nothing + } + +-- | The geolocation identifies the location at which the spectrum schedule +-- applies. It will always be present. +gssLocation :: Lens' GeoSpectrumSchedule (Maybe (Maybe GeoLocation)) +gssLocation + = lens _gssLocation (\ s a -> s{_gssLocation = a}) + +-- | A list of available spectrum profiles and associated times. It will +-- always be present, and at least one schedule must be included (though it +-- may be empty if there is no available spectrum). More than one schedule +-- may be included to represent future changes to the available spectrum. +gssSpectrumSchedules :: Lens' GeoSpectrumSchedule [Maybe SpectrumSchedule] +gssSpectrumSchedules + = lens _gssSpectrumSchedules + (\ s a -> s{_gssSpectrumSchedules = a}) + . _Default + . _Coerce + +instance FromJSON GeoSpectrumSchedule where + parseJSON + = withObject "GeoSpectrumSchedule" + (\ o -> + GeoSpectrumSchedule <$> + (o .:? "location") <*> + (o .:? "spectrumSchedules" .!= mempty)) + +instance ToJSON GeoSpectrumSchedule where + toJSON GeoSpectrumSchedule{..} + = object + (catMaybes + [("location" .=) <$> _gssLocation, + ("spectrumSchedules" .=) <$> _gssSpectrumSchedules]) + +-- | The spectrum schedule element combines an event time with spectrum +-- profile to define a time period in which the profile is valid. +-- +-- /See:/ 'spectrumSchedule' smart constructor. +data SpectrumSchedule = SpectrumSchedule + { _ssSpectra :: !(Maybe [Maybe SpectrumMessage]) + , _ssEventTime :: !(Maybe (Maybe EventTime)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SpectrumSchedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssSpectra' +-- +-- * 'ssEventTime' +spectrumSchedule + :: SpectrumSchedule +spectrumSchedule = + SpectrumSchedule + { _ssSpectra = Nothing + , _ssEventTime = Nothing + } + +-- | A list of spectrum messages representing the usable profile. It will +-- always be present, but may be empty when there is no available spectrum. +ssSpectra :: Lens' SpectrumSchedule [Maybe SpectrumMessage] +ssSpectra + = lens _ssSpectra (\ s a -> s{_ssSpectra = a}) . + _Default + . _Coerce + +-- | The event time expresses when the spectrum profile is valid. It will +-- always be present. +ssEventTime :: Lens' SpectrumSchedule (Maybe (Maybe EventTime)) +ssEventTime + = lens _ssEventTime (\ s a -> s{_ssEventTime = a}) + +instance FromJSON SpectrumSchedule where + parseJSON + = withObject "SpectrumSchedule" + (\ o -> + SpectrumSchedule <$> + (o .:? "spectra" .!= mempty) <*> (o .:? "eventTime")) + +instance ToJSON SpectrumSchedule where + toJSON SpectrumSchedule{..} + = object + (catMaybes + [("spectra" .=) <$> _ssSpectra, + ("eventTime" .=) <$> _ssEventTime]) + +-- | The structure used to represent a telephone number. +-- +-- /See:/ 'vcardTelephone' smart constructor. +newtype VcardTelephone = VcardTelephone + { _vtUri :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VcardTelephone' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtUri' +vcardTelephone + :: VcardTelephone +vcardTelephone = + VcardTelephone + { _vtUri = Nothing + } + +-- | A nested telephone URI of the form: tel:+1-123-456-7890. +vtUri :: Lens' VcardTelephone (Maybe Text) +vtUri = lens _vtUri (\ s a -> s{_vtUri = a}) + +instance FromJSON VcardTelephone where + parseJSON + = withObject "VcardTelephone" + (\ o -> VcardTelephone <$> (o .:? "uri")) + +instance ToJSON VcardTelephone where + toJSON VcardTelephone{..} + = object (catMaybes [("uri" .=) <$> _vtUri]) + +-- | This parameter contains device-owner information required as part of +-- device registration. The regulatory domains may require additional +-- parameters. All contact information must be expressed using the +-- structure defined by the vCard format specification. Only the contact +-- fields of vCard are supported: - fn: Full name of an individual - org: +-- Name of the organization - adr: Address fields - tel: Telephone numbers +-- - email: Email addresses Note that the vCard specification defines +-- maximum lengths for each field. +-- +-- /See:/ 'deviceOwner' smart constructor. +data DeviceOwner = DeviceOwner + { _doOperator :: !(Maybe (Maybe Vcard)) + , _doOwner :: !(Maybe (Maybe Vcard)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeviceOwner' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doOperator' +-- +-- * 'doOwner' +deviceOwner + :: DeviceOwner +deviceOwner = + DeviceOwner + { _doOperator = Nothing + , _doOwner = Nothing + } + +-- | The vCard contact information for the device operator is optional, but +-- may be required by specific regulatory domains. +doOperator :: Lens' DeviceOwner (Maybe (Maybe Vcard)) +doOperator + = lens _doOperator (\ s a -> s{_doOperator = a}) + +-- | The vCard contact information for the individual or business that owns +-- the device is required. +doOwner :: Lens' DeviceOwner (Maybe (Maybe Vcard)) +doOwner = lens _doOwner (\ s a -> s{_doOwner = a}) + +instance FromJSON DeviceOwner where + parseJSON + = withObject "DeviceOwner" + (\ o -> + DeviceOwner <$> + (o .:? "operator") <*> (o .:? "owner")) + +instance ToJSON DeviceOwner where + toJSON DeviceOwner{..} + = object + (catMaybes + [("operator" .=) <$> _doOperator, + ("owner" .=) <$> _doOwner]) + +-- | Antenna characteristics provide additional information, such as the +-- antenna height, antenna type, etc. Whether antenna characteristics must +-- be provided in a request depends on the device type and regulatory +-- domain. +-- +-- /See:/ 'antennaCharacteristics' smart constructor. +data AntennaCharacteristics = AntennaCharacteristics + { _acHeight :: !(Maybe Double) + , _acHeightType :: !(Maybe Text) + , _acHeightUncertainty :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AntennaCharacteristics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acHeight' +-- +-- * 'acHeightType' +-- +-- * 'acHeightUncertainty' +antennaCharacteristics + :: AntennaCharacteristics +antennaCharacteristics = + AntennaCharacteristics + { _acHeight = Nothing + , _acHeightType = Nothing + , _acHeightUncertainty = Nothing + } + +-- | The antenna height in meters. Whether the antenna height is required +-- depends on the device type and the regulatory domain. Note that the +-- height may be negative. +acHeight :: Lens' AntennaCharacteristics (Maybe Double) +acHeight = lens _acHeight (\ s a -> s{_acHeight = a}) + +-- | If the height is required, then the height type (AGL for above ground +-- level or AMSL for above mean sea level) is also required. The default is +-- AGL. +acHeightType :: Lens' AntennaCharacteristics (Maybe Text) +acHeightType + = lens _acHeightType (\ s a -> s{_acHeightType = a}) + +-- | The height uncertainty in meters. Whether this is required depends on +-- the regulatory domain. +acHeightUncertainty :: Lens' AntennaCharacteristics (Maybe Double) +acHeightUncertainty + = lens _acHeightUncertainty + (\ s a -> s{_acHeightUncertainty = a}) + +instance FromJSON AntennaCharacteristics where + parseJSON + = withObject "AntennaCharacteristics" + (\ o -> + AntennaCharacteristics <$> + (o .:? "height") <*> (o .:? "heightType") <*> + (o .:? "heightUncertainty")) + +instance ToJSON AntennaCharacteristics where + toJSON AntennaCharacteristics{..} + = object + (catMaybes + [("height" .=) <$> _acHeight, + ("heightType" .=) <$> _acHeightType, + ("heightUncertainty" .=) <$> _acHeightUncertainty]) + +-- | The device validation response message. +-- +-- /See:/ 'pawsVerifyDeviceResponse' smart constructor. +data PawsVerifyDeviceResponse = PawsVerifyDeviceResponse + { _pvdrDeviceValidities :: !(Maybe [Maybe DeviceValidity]) + , _pvdrKind :: !Text + , _pvdrVersion :: !(Maybe Text) + , _pvdrType :: !(Maybe Text) + , _pvdrDatabaseChange :: !(Maybe (Maybe DBUpdateSpec)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsVerifyDeviceResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pvdrDeviceValidities' +-- +-- * 'pvdrKind' +-- +-- * 'pvdrVersion' +-- +-- * 'pvdrType' +-- +-- * 'pvdrDatabaseChange' +pawsVerifyDeviceResponse + :: PawsVerifyDeviceResponse +pawsVerifyDeviceResponse = + PawsVerifyDeviceResponse + { _pvdrDeviceValidities = Nothing + , _pvdrKind = "spectrum#pawsVerifyDeviceResponse" + , _pvdrVersion = Nothing + , _pvdrType = Nothing + , _pvdrDatabaseChange = Nothing + } + +-- | A device validities list is required in the device validation response +-- to report whether each slave device listed in a previous device +-- validation request is valid. The number of entries must match the number +-- of device descriptors listed in the previous device validation request. +pvdrDeviceValidities :: Lens' PawsVerifyDeviceResponse [Maybe DeviceValidity] +pvdrDeviceValidities + = lens _pvdrDeviceValidities + (\ s a -> s{_pvdrDeviceValidities = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsVerifyDeviceResponse\". +pvdrKind :: Lens' PawsVerifyDeviceResponse Text +pvdrKind = lens _pvdrKind (\ s a -> s{_pvdrKind = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pvdrVersion :: Lens' PawsVerifyDeviceResponse (Maybe Text) +pvdrVersion + = lens _pvdrVersion (\ s a -> s{_pvdrVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pvdrType :: Lens' PawsVerifyDeviceResponse (Maybe Text) +pvdrType = lens _pvdrType (\ s a -> s{_pvdrType = a}) + +-- | A database may include the databaseChange parameter to notify a device +-- of a change to its database URI, providing one or more alternate +-- database URIs. The device should use this information to update its list +-- of pre-configured databases by (only) replacing its entry for the +-- responding database with the list of alternate URIs. +pvdrDatabaseChange :: Lens' PawsVerifyDeviceResponse (Maybe (Maybe DBUpdateSpec)) +pvdrDatabaseChange + = lens _pvdrDatabaseChange + (\ s a -> s{_pvdrDatabaseChange = a}) + +instance FromJSON PawsVerifyDeviceResponse where + parseJSON + = withObject "PawsVerifyDeviceResponse" + (\ o -> + PawsVerifyDeviceResponse <$> + (o .:? "deviceValidities" .!= mempty) <*> + (o .:? "kind" .!= + "spectrum#pawsVerifyDeviceResponse") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "databaseChange")) + +instance ToJSON PawsVerifyDeviceResponse where + toJSON PawsVerifyDeviceResponse{..} + = object + (catMaybes + [("deviceValidities" .=) <$> _pvdrDeviceValidities, + Just ("kind" .= _pvdrKind), + ("version" .=) <$> _pvdrVersion, + ("type" .=) <$> _pvdrType, + ("databaseChange" .=) <$> _pvdrDatabaseChange]) + +-- | The request message for the available spectrum query protocol which must +-- include the device\'s geolocation. +-- +-- /See:/ 'pawsGetSpectrumRequest' smart constructor. +data PawsGetSpectrumRequest = PawsGetSpectrumRequest + { _pgsrAntenna :: !(Maybe (Maybe AntennaCharacteristics)) + , _pgsrMasterDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + , _pgsrLocation :: !(Maybe (Maybe GeoLocation)) + , _pgsrOwner :: !(Maybe (Maybe DeviceOwner)) + , _pgsrRequestType :: !(Maybe Text) + , _pgsrVersion :: !(Maybe Text) + , _pgsrType :: !(Maybe Text) + , _pgsrCapabilities :: !(Maybe (Maybe DeviceCapabilities)) + , _pgsrDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrumRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgsrAntenna' +-- +-- * 'pgsrMasterDeviceDesc' +-- +-- * 'pgsrLocation' +-- +-- * 'pgsrOwner' +-- +-- * 'pgsrRequestType' +-- +-- * 'pgsrVersion' +-- +-- * 'pgsrType' +-- +-- * 'pgsrCapabilities' +-- +-- * 'pgsrDeviceDesc' +pawsGetSpectrumRequest + :: PawsGetSpectrumRequest +pawsGetSpectrumRequest = + PawsGetSpectrumRequest + { _pgsrAntenna = Nothing + , _pgsrMasterDeviceDesc = Nothing + , _pgsrLocation = Nothing + , _pgsrOwner = Nothing + , _pgsrRequestType = Nothing + , _pgsrVersion = Nothing + , _pgsrType = Nothing + , _pgsrCapabilities = Nothing + , _pgsrDeviceDesc = Nothing + } + +-- | Depending on device type and regulatory domain, the characteristics of +-- the antenna may be required. +pgsrAntenna :: Lens' PawsGetSpectrumRequest (Maybe (Maybe AntennaCharacteristics)) +pgsrAntenna + = lens _pgsrAntenna (\ s a -> s{_pgsrAntenna = a}) + +-- | When an available spectrum request is made by the master device (a +-- device with geolocation capability) on behalf of a slave device (a +-- device without geolocation capability), the rules of the applicable +-- regulatory domain may require the master device to provide its own +-- device descriptor information (in addition to device descriptor +-- information for the slave device, which is provided in a separate +-- parameter). +pgsrMasterDeviceDesc :: Lens' PawsGetSpectrumRequest (Maybe (Maybe DeviceDescriptor)) +pgsrMasterDeviceDesc + = lens _pgsrMasterDeviceDesc + (\ s a -> s{_pgsrMasterDeviceDesc = a}) + +-- | The geolocation of the master device (a device with geolocation +-- capability that makes an available spectrum request) is required whether +-- the master device is making the request on its own behalf or on behalf +-- of a slave device (one without geolocation capability). The location +-- must be the location of the radiation center of the master device\'s +-- antenna. To support mobile devices, a regulatory domain may allow the +-- anticipated position of the master device to be given instead. If the +-- location specifies a region, rather than a point, the database may +-- return an UNIMPLEMENTED error code if it does not support query by +-- region. +pgsrLocation :: Lens' PawsGetSpectrumRequest (Maybe (Maybe GeoLocation)) +pgsrLocation + = lens _pgsrLocation (\ s a -> s{_pgsrLocation = a}) + +-- | Depending on device type and regulatory domain, device owner information +-- may be included in an available spectrum request. This allows the device +-- to register and get spectrum-availability information in a single +-- request. +pgsrOwner :: Lens' PawsGetSpectrumRequest (Maybe (Maybe DeviceOwner)) +pgsrOwner + = lens _pgsrOwner (\ s a -> s{_pgsrOwner = a}) + +-- | The request type parameter is an optional parameter that can be used to +-- modify an available spectrum request, but its use depends on applicable +-- regulatory rules. It may be used, for example, to request generic slave +-- device parameters without having to specify the device descriptor for a +-- specific device. When the requestType parameter is missing, the request +-- is for a specific device (master or slave), and the deviceDesc parameter +-- for the device on whose behalf the request is made is required. +pgsrRequestType :: Lens' PawsGetSpectrumRequest (Maybe Text) +pgsrRequestType + = lens _pgsrRequestType + (\ s a -> s{_pgsrRequestType = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pgsrVersion :: Lens' PawsGetSpectrumRequest (Maybe Text) +pgsrVersion + = lens _pgsrVersion (\ s a -> s{_pgsrVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pgsrType :: Lens' PawsGetSpectrumRequest (Maybe Text) +pgsrType = lens _pgsrType (\ s a -> s{_pgsrType = a}) + +-- | The master device may include its device capabilities to limit the +-- available-spectrum response to the spectrum that is compatible with its +-- capabilities. The database should not return spectrum that is +-- incompatible with the specified capabilities. +pgsrCapabilities :: Lens' PawsGetSpectrumRequest (Maybe (Maybe DeviceCapabilities)) +pgsrCapabilities + = lens _pgsrCapabilities + (\ s a -> s{_pgsrCapabilities = a}) + +-- | When the available spectrum request is made on behalf of a specific +-- device (a master or slave device), device descriptor information for +-- that device is required (in such cases, the requestType parameter must +-- be empty). When a requestType value is specified, device descriptor +-- information may be optional or required according to the rules of the +-- applicable regulatory domain. +pgsrDeviceDesc :: Lens' PawsGetSpectrumRequest (Maybe (Maybe DeviceDescriptor)) +pgsrDeviceDesc + = lens _pgsrDeviceDesc + (\ s a -> s{_pgsrDeviceDesc = a}) + +instance FromJSON PawsGetSpectrumRequest where + parseJSON + = withObject "PawsGetSpectrumRequest" + (\ o -> + PawsGetSpectrumRequest <$> + (o .:? "antenna") <*> (o .:? "masterDeviceDesc") <*> + (o .:? "location") + <*> (o .:? "owner") + <*> (o .:? "requestType") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "capabilities") + <*> (o .:? "deviceDesc")) + +instance ToJSON PawsGetSpectrumRequest where + toJSON PawsGetSpectrumRequest{..} + = object + (catMaybes + [("antenna" .=) <$> _pgsrAntenna, + ("masterDeviceDesc" .=) <$> _pgsrMasterDeviceDesc, + ("location" .=) <$> _pgsrLocation, + ("owner" .=) <$> _pgsrOwner, + ("requestType" .=) <$> _pgsrRequestType, + ("version" .=) <$> _pgsrVersion, + ("type" .=) <$> _pgsrType, + ("capabilities" .=) <$> _pgsrCapabilities, + ("deviceDesc" .=) <$> _pgsrDeviceDesc]) + +-- | The start and stop times of an event. This is used to indicate the time +-- period for which a spectrum profile is valid. Both times are expressed +-- using the format, YYYY-MM-DDThh:mm:ssZ, as defined in RFC3339. The times +-- must be expressed using UTC. +-- +-- /See:/ 'eventTime' smart constructor. +data EventTime = EventTime + { _etStartTime :: !(Maybe Text) + , _etStopTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'EventTime' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'etStartTime' +-- +-- * 'etStopTime' +eventTime + :: EventTime +eventTime = + EventTime + { _etStartTime = Nothing + , _etStopTime = Nothing + } + +-- | The inclusive start of the event. It will be present. +etStartTime :: Lens' EventTime (Maybe Text) +etStartTime + = lens _etStartTime (\ s a -> s{_etStartTime = a}) + +-- | The exclusive end of the event. It will be present. +etStopTime :: Lens' EventTime (Maybe Text) +etStopTime + = lens _etStopTime (\ s a -> s{_etStopTime = a}) + +instance FromJSON EventTime where + parseJSON + = withObject "EventTime" + (\ o -> + EventTime <$> + (o .:? "startTime") <*> (o .:? "stopTime")) + +instance ToJSON EventTime where + toJSON EventTime{..} + = object + (catMaybes + [("startTime" .=) <$> _etStartTime, + ("stopTime" .=) <$> _etStopTime]) + +-- | The structure used to represent a street address. +-- +-- /See:/ 'vcardAddress' smart constructor. +data VcardAddress = VcardAddress + { _vaPobox :: !(Maybe Text) + , _vaCountry :: !(Maybe Text) + , _vaStreet :: !(Maybe Text) + , _vaLocality :: !(Maybe Text) + , _vaCode :: !(Maybe Text) + , _vaRegion :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VcardAddress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vaPobox' +-- +-- * 'vaCountry' +-- +-- * 'vaStreet' +-- +-- * 'vaLocality' +-- +-- * 'vaCode' +-- +-- * 'vaRegion' +vcardAddress + :: VcardAddress +vcardAddress = + VcardAddress + { _vaPobox = Nothing + , _vaCountry = Nothing + , _vaStreet = Nothing + , _vaLocality = Nothing + , _vaCode = Nothing + , _vaRegion = Nothing + } + +-- | An optional post office box number. +vaPobox :: Lens' VcardAddress (Maybe Text) +vaPobox = lens _vaPobox (\ s a -> s{_vaPobox = a}) + +-- | The country name. For example: US. +vaCountry :: Lens' VcardAddress (Maybe Text) +vaCountry + = lens _vaCountry (\ s a -> s{_vaCountry = a}) + +-- | The street number and name. For example: 123 Any St. +vaStreet :: Lens' VcardAddress (Maybe Text) +vaStreet = lens _vaStreet (\ s a -> s{_vaStreet = a}) + +-- | The city or local equivalent portion of the address. For example: San +-- Jose. +vaLocality :: Lens' VcardAddress (Maybe Text) +vaLocality + = lens _vaLocality (\ s a -> s{_vaLocality = a}) + +-- | The postal code associated with the address. For example: 94423. +vaCode :: Lens' VcardAddress (Maybe Text) +vaCode = lens _vaCode (\ s a -> s{_vaCode = a}) + +-- | The state or local equivalent portion of the address. For example: CA. +vaRegion :: Lens' VcardAddress (Maybe Text) +vaRegion = lens _vaRegion (\ s a -> s{_vaRegion = a}) + +instance FromJSON VcardAddress where + parseJSON + = withObject "VcardAddress" + (\ o -> + VcardAddress <$> + (o .:? "pobox") <*> (o .:? "country") <*> + (o .:? "street") + <*> (o .:? "locality") + <*> (o .:? "code") + <*> (o .:? "region")) + +instance ToJSON VcardAddress where + toJSON VcardAddress{..} + = object + (catMaybes + [("pobox" .=) <$> _vaPobox, + ("country" .=) <$> _vaCountry, + ("street" .=) <$> _vaStreet, + ("locality" .=) <$> _vaLocality, + ("code" .=) <$> _vaCode, + ("region" .=) <$> _vaRegion]) + +-- | The response message for the batch available spectrum query contains a +-- schedule of available spectrum for the device at multiple locations. +-- +-- /See:/ 'pawsGetSpectrumBatchResponse' smart constructor. +data PawsGetSpectrumBatchResponse = PawsGetSpectrumBatchResponse + { _pNeedsSpectrumReport :: !(Maybe Bool) + , _pKind :: !Text + , _pGeoSpectrumSchedules :: !(Maybe [Maybe GeoSpectrumSchedule]) + , _pMaxContiguousBwHz :: !(Maybe Double) + , _pVersion :: !(Maybe Text) + , _pRulesetInfo :: !(Maybe (Maybe RulesetInfo)) + , _pType :: !(Maybe Text) + , _pDatabaseChange :: !(Maybe (Maybe DBUpdateSpec)) + , _pTimestamp :: !(Maybe Text) + , _pDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + , _pMaxTotalBwHz :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrumBatchResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pNeedsSpectrumReport' +-- +-- * 'pKind' +-- +-- * 'pGeoSpectrumSchedules' +-- +-- * 'pMaxContiguousBwHz' +-- +-- * 'pVersion' +-- +-- * 'pRulesetInfo' +-- +-- * 'pType' +-- +-- * 'pDatabaseChange' +-- +-- * 'pTimestamp' +-- +-- * 'pDeviceDesc' +-- +-- * 'pMaxTotalBwHz' +pawsGetSpectrumBatchResponse + :: PawsGetSpectrumBatchResponse +pawsGetSpectrumBatchResponse = + PawsGetSpectrumBatchResponse + { _pNeedsSpectrumReport = Nothing + , _pKind = "spectrum#pawsGetSpectrumBatchResponse" + , _pGeoSpectrumSchedules = Nothing + , _pMaxContiguousBwHz = Nothing + , _pVersion = Nothing + , _pRulesetInfo = Nothing + , _pType = Nothing + , _pDatabaseChange = Nothing + , _pTimestamp = Nothing + , _pDeviceDesc = Nothing + , _pMaxTotalBwHz = Nothing + } + +-- | For regulatory domains that require a spectrum-usage report from +-- devices, the database must return true for this parameter if the +-- geo-spectrum schedules list is not empty; otherwise, the database should +-- either return false or omit this parameter. If this parameter is present +-- and its value is true, the device must send a spectrum use notify +-- message to the database; otherwise, the device should not send the +-- notification. +pNeedsSpectrumReport :: Lens' PawsGetSpectrumBatchResponse (Maybe Bool) +pNeedsSpectrumReport + = lens _pNeedsSpectrumReport + (\ s a -> s{_pNeedsSpectrumReport = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsGetSpectrumBatchResponse\". +pKind :: Lens' PawsGetSpectrumBatchResponse Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The available spectrum batch response must contain a geo-spectrum +-- schedule list, The list may be empty if spectrum is not available. The +-- database may return more than one geo-spectrum schedule to represent +-- future changes to the available spectrum. How far in advance a schedule +-- may be provided depends upon the applicable regulatory domain. The +-- database may return available spectrum for fewer geolocations than +-- requested. The device must not make assumptions about the order of the +-- entries in the list, and must use the geolocation value in each +-- geo-spectrum schedule entry to match available spectrum to a location. +pGeoSpectrumSchedules :: Lens' PawsGetSpectrumBatchResponse [Maybe GeoSpectrumSchedule] +pGeoSpectrumSchedules + = lens _pGeoSpectrumSchedules + (\ s a -> s{_pGeoSpectrumSchedules = a}) + . _Default + . _Coerce + +-- | The database may return a constraint on the allowed maximum contiguous +-- bandwidth (in Hertz). A regulatory domain may require the database to +-- return this parameter. When this parameter is present in the response, +-- the device must apply this constraint to its spectrum-selection logic to +-- ensure that no single block of spectrum has bandwidth that exceeds this +-- value. +pMaxContiguousBwHz :: Lens' PawsGetSpectrumBatchResponse (Maybe Double) +pMaxContiguousBwHz + = lens _pMaxContiguousBwHz + (\ s a -> s{_pMaxContiguousBwHz = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pVersion :: Lens' PawsGetSpectrumBatchResponse (Maybe Text) +pVersion = lens _pVersion (\ s a -> s{_pVersion = a}) + +-- | The database should return ruleset information, which identifies the +-- applicable regulatory authority and ruleset for the available spectrum +-- batch response. If included, the device must use the corresponding +-- ruleset to interpret the response. Values provided in the returned +-- ruleset information, such as maxLocationChange, take precedence over any +-- conflicting values provided in the ruleset information returned in a +-- prior initialization response sent by the database to the device. +pRulesetInfo :: Lens' PawsGetSpectrumBatchResponse (Maybe (Maybe RulesetInfo)) +pRulesetInfo + = lens _pRulesetInfo (\ s a -> s{_pRulesetInfo = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pType :: Lens' PawsGetSpectrumBatchResponse (Maybe Text) +pType = lens _pType (\ s a -> s{_pType = a}) + +-- | A database may include the databaseChange parameter to notify a device +-- of a change to its database URI, providing one or more alternate +-- database URIs. The device should use this information to update its list +-- of pre-configured databases by (only) replacing its entry for the +-- responding database with the list of alternate URIs. +pDatabaseChange :: Lens' PawsGetSpectrumBatchResponse (Maybe (Maybe DBUpdateSpec)) +pDatabaseChange + = lens _pDatabaseChange + (\ s a -> s{_pDatabaseChange = a}) + +-- | The database includes a timestamp of the form, YYYY-MM-DDThh:mm:ssZ +-- (Internet timestamp format per RFC3339), in its available spectrum batch +-- response. The timestamp should be used by the device as a reference for +-- the start and stop times specified in the response spectrum schedules. +pTimestamp :: Lens' PawsGetSpectrumBatchResponse (Maybe Text) +pTimestamp + = lens _pTimestamp (\ s a -> s{_pTimestamp = a}) + +-- | The database must return in its available spectrum response the device +-- descriptor information it received in the master device\'s available +-- spectrum batch request. +pDeviceDesc :: Lens' PawsGetSpectrumBatchResponse (Maybe (Maybe DeviceDescriptor)) +pDeviceDesc + = lens _pDeviceDesc (\ s a -> s{_pDeviceDesc = a}) + +-- | The database may return a constraint on the allowed maximum total +-- bandwidth (in Hertz), which does not need to be contiguous. A regulatory +-- domain may require the database to return this parameter. When this +-- parameter is present in the available spectrum batch response, the +-- device must apply this constraint to its spectrum-selection logic to +-- ensure that total bandwidth does not exceed this value. +pMaxTotalBwHz :: Lens' PawsGetSpectrumBatchResponse (Maybe Double) +pMaxTotalBwHz + = lens _pMaxTotalBwHz + (\ s a -> s{_pMaxTotalBwHz = a}) + +instance FromJSON PawsGetSpectrumBatchResponse where + parseJSON + = withObject "PawsGetSpectrumBatchResponse" + (\ o -> + PawsGetSpectrumBatchResponse <$> + (o .:? "needsSpectrumReport") <*> + (o .:? "kind" .!= + "spectrum#pawsGetSpectrumBatchResponse") + <*> (o .:? "geoSpectrumSchedules" .!= mempty) + <*> (o .:? "maxContiguousBwHz") + <*> (o .:? "version") + <*> (o .:? "rulesetInfo") + <*> (o .:? "type") + <*> (o .:? "databaseChange") + <*> (o .:? "timestamp") + <*> (o .:? "deviceDesc") + <*> (o .:? "maxTotalBwHz")) + +instance ToJSON PawsGetSpectrumBatchResponse where + toJSON PawsGetSpectrumBatchResponse{..} + = object + (catMaybes + [("needsSpectrumReport" .=) <$> + _pNeedsSpectrumReport, + Just ("kind" .= _pKind), + ("geoSpectrumSchedules" .=) <$> + _pGeoSpectrumSchedules, + ("maxContiguousBwHz" .=) <$> _pMaxContiguousBwHz, + ("version" .=) <$> _pVersion, + ("rulesetInfo" .=) <$> _pRulesetInfo, + ("type" .=) <$> _pType, + ("databaseChange" .=) <$> _pDatabaseChange, + ("timestamp" .=) <$> _pTimestamp, + ("deviceDesc" .=) <$> _pDeviceDesc, + ("maxTotalBwHz" .=) <$> _pMaxTotalBwHz]) + +-- | A \"point\" with uncertainty is represented using the Ellipse shape. +-- +-- /See:/ 'geoLocationEllipse' smart constructor. +data GeoLocationEllipse = GeoLocationEllipse + { _gleSemiMajorAxis :: !(Maybe Double) + , _gleCenter :: !(Maybe (Maybe GeoLocationPoint)) + , _gleOrientation :: !(Maybe Double) + , _gleSemiMinorAxis :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoLocationEllipse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gleSemiMajorAxis' +-- +-- * 'gleCenter' +-- +-- * 'gleOrientation' +-- +-- * 'gleSemiMinorAxis' +geoLocationEllipse + :: GeoLocationEllipse +geoLocationEllipse = + GeoLocationEllipse + { _gleSemiMajorAxis = Nothing + , _gleCenter = Nothing + , _gleOrientation = Nothing + , _gleSemiMinorAxis = Nothing + } + +-- | A floating-point number that expresses the location uncertainty along +-- the major axis of the ellipse. May be required by the regulatory domain. +-- When the uncertainty is optional, the default value is 0. +gleSemiMajorAxis :: Lens' GeoLocationEllipse (Maybe Double) +gleSemiMajorAxis + = lens _gleSemiMajorAxis + (\ s a -> s{_gleSemiMajorAxis = a}) + +-- | A required geo-spatial point representing the center of the ellipse. +gleCenter :: Lens' GeoLocationEllipse (Maybe (Maybe GeoLocationPoint)) +gleCenter + = lens _gleCenter (\ s a -> s{_gleCenter = a}) + +-- | A floating-point number that expresses the orientation of the ellipse, +-- representing the rotation, in degrees, of the semi-major axis from North +-- towards the East. For example, when the uncertainty is greatest along +-- the North-South direction, orientation is 0 degrees; conversely, if the +-- uncertainty is greatest along the East-West direction, orientation is 90 +-- degrees. When orientation is not present, the orientation is assumed to +-- be 0. +gleOrientation :: Lens' GeoLocationEllipse (Maybe Double) +gleOrientation + = lens _gleOrientation + (\ s a -> s{_gleOrientation = a}) + +-- | A floating-point number that expresses the location uncertainty along +-- the minor axis of the ellipse. May be required by the regulatory domain. +-- When the uncertainty is optional, the default value is 0. +gleSemiMinorAxis :: Lens' GeoLocationEllipse (Maybe Double) +gleSemiMinorAxis + = lens _gleSemiMinorAxis + (\ s a -> s{_gleSemiMinorAxis = a}) + +instance FromJSON GeoLocationEllipse where + parseJSON + = withObject "GeoLocationEllipse" + (\ o -> + GeoLocationEllipse <$> + (o .:? "semiMajorAxis") <*> (o .:? "center") <*> + (o .:? "orientation") + <*> (o .:? "semiMinorAxis")) + +instance ToJSON GeoLocationEllipse where + toJSON GeoLocationEllipse{..} + = object + (catMaybes + [("semiMajorAxis" .=) <$> _gleSemiMajorAxis, + ("center" .=) <$> _gleCenter, + ("orientation" .=) <$> _gleOrientation, + ("semiMinorAxis" .=) <$> _gleSemiMinorAxis]) + +-- | The device validity element describes whether a particular device is +-- valid to operate in the regulatory domain. +-- +-- /See:/ 'deviceValidity' smart constructor. +data DeviceValidity = DeviceValidity + { _dvIsValid :: !(Maybe Bool) + , _dvReason :: !(Maybe Text) + , _dvDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeviceValidity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dvIsValid' +-- +-- * 'dvReason' +-- +-- * 'dvDeviceDesc' +deviceValidity + :: DeviceValidity +deviceValidity = + DeviceValidity + { _dvIsValid = Nothing + , _dvReason = Nothing + , _dvDeviceDesc = Nothing + } + +-- | The validity status: true if the device is valid for operation, false +-- otherwise. It will always be present. +dvIsValid :: Lens' DeviceValidity (Maybe Bool) +dvIsValid + = lens _dvIsValid (\ s a -> s{_dvIsValid = a}) + +-- | If the device identifier is not valid, the database may include a +-- reason. The reason may be in any language. The length of the value +-- should not exceed 128 characters. +dvReason :: Lens' DeviceValidity (Maybe Text) +dvReason = lens _dvReason (\ s a -> s{_dvReason = a}) + +-- | The descriptor of the device for which the validity check was requested. +-- It will always be present. +dvDeviceDesc :: Lens' DeviceValidity (Maybe (Maybe DeviceDescriptor)) +dvDeviceDesc + = lens _dvDeviceDesc (\ s a -> s{_dvDeviceDesc = a}) + +instance FromJSON DeviceValidity where + parseJSON + = withObject "DeviceValidity" + (\ o -> + DeviceValidity <$> + (o .:? "isValid") <*> (o .:? "reason") <*> + (o .:? "deviceDesc")) + +instance ToJSON DeviceValidity where + toJSON DeviceValidity{..} + = object + (catMaybes + [("isValid" .=) <$> _dvIsValid, + ("reason" .=) <$> _dvReason, + ("deviceDesc" .=) <$> _dvDeviceDesc]) + +-- | This contains parameters for the ruleset of a regulatory domain that is +-- communicated using the initialization and available-spectrum processes. +-- +-- /See:/ 'rulesetInfo' smart constructor. +data RulesetInfo = RulesetInfo + { _riRulesetIds :: !(Maybe [Text]) + , _riMaxPollingSecs :: !(Maybe Int32) + , _riMaxLocationChange :: !(Maybe Double) + , _riAuthority :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RulesetInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riRulesetIds' +-- +-- * 'riMaxPollingSecs' +-- +-- * 'riMaxLocationChange' +-- +-- * 'riAuthority' +rulesetInfo + :: RulesetInfo +rulesetInfo = + RulesetInfo + { _riRulesetIds = Nothing + , _riMaxPollingSecs = Nothing + , _riMaxLocationChange = Nothing + , _riAuthority = Nothing + } + +-- | The identifiers of the rulesets supported for the device\'s location. +-- The database should include at least one applicable ruleset in the +-- initialization response. The device may use the ruleset identifiers to +-- determine parameters to include in subsequent requests. Within the +-- context of the available-spectrum responses, the database should include +-- the identifier of the ruleset that it used to determine the +-- available-spectrum response. If included, the device must use the +-- specified ruleset to interpret the response. If the device does not +-- support the indicated ruleset, it must not operate in the spectrum +-- governed by the ruleset. +riRulesetIds :: Lens' RulesetInfo [Text] +riRulesetIds + = lens _riRulesetIds (\ s a -> s{_riRulesetIds = a}) + . _Default + . _Coerce + +-- | The maximum duration, in seconds, between requests for available +-- spectrum. It is required in the initialization response, but optional +-- otherwise. The device must contact the database to get available +-- spectrum no less frequently than this duration. If the new spectrum +-- information indicates that the device is using spectrum that is no +-- longer available, it must immediately cease use of those frequencies +-- under rules for database-managed spectrum. If this value is provided +-- within the context of an available-spectrum response, it takes +-- precedence over the value within the initialization response. +riMaxPollingSecs :: Lens' RulesetInfo (Maybe Int32) +riMaxPollingSecs + = lens _riMaxPollingSecs + (\ s a -> s{_riMaxPollingSecs = a}) + +-- | The maximum location change in meters is required in the initialization +-- response, but optional otherwise. When the device changes location by +-- more than this specified distance, it must contact the database to get +-- the available spectrum for the new location. If the device is using +-- spectrum that is no longer available, it must immediately cease use of +-- the spectrum under rules for database-managed spectrum. If this value is +-- provided within the context of an available-spectrum response, it takes +-- precedence over the value within the initialization response. +riMaxLocationChange :: Lens' RulesetInfo (Maybe Double) +riMaxLocationChange + = lens _riMaxLocationChange + (\ s a -> s{_riMaxLocationChange = a}) + +-- | The regulatory domain to which the ruleset belongs is required. It must +-- be a 2-letter country code. The device should use this to determine +-- additional device behavior required by the associated regulatory domain. +riAuthority :: Lens' RulesetInfo (Maybe Text) +riAuthority + = lens _riAuthority (\ s a -> s{_riAuthority = a}) + +instance FromJSON RulesetInfo where + parseJSON + = withObject "RulesetInfo" + (\ o -> + RulesetInfo <$> + (o .:? "rulesetIds" .!= mempty) <*> + (o .:? "maxPollingSecs") + <*> (o .:? "maxLocationChange") + <*> (o .:? "authority")) + +instance ToJSON RulesetInfo where + toJSON RulesetInfo{..} + = object + (catMaybes + [("rulesetIds" .=) <$> _riRulesetIds, + ("maxPollingSecs" .=) <$> _riMaxPollingSecs, + ("maxLocationChange" .=) <$> _riMaxLocationChange, + ("authority" .=) <$> _riAuthority]) + +-- | An empty response to the notification. +-- +-- /See:/ 'pawsNotifySpectrumUseResponse' smart constructor. +data PawsNotifySpectrumUseResponse = PawsNotifySpectrumUseResponse + { _pawKind :: !Text + , _pawVersion :: !(Maybe Text) + , _pawType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsNotifySpectrumUseResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pawKind' +-- +-- * 'pawVersion' +-- +-- * 'pawType' +pawsNotifySpectrumUseResponse + :: PawsNotifySpectrumUseResponse +pawsNotifySpectrumUseResponse = + PawsNotifySpectrumUseResponse + { _pawKind = "spectrum#pawsNotifySpectrumUseResponse" + , _pawVersion = Nothing + , _pawType = Nothing + } + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsNotifySpectrumUseResponse\". +pawKind :: Lens' PawsNotifySpectrumUseResponse Text +pawKind = lens _pawKind (\ s a -> s{_pawKind = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pawVersion :: Lens' PawsNotifySpectrumUseResponse (Maybe Text) +pawVersion + = lens _pawVersion (\ s a -> s{_pawVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pawType :: Lens' PawsNotifySpectrumUseResponse (Maybe Text) +pawType = lens _pawType (\ s a -> s{_pawType = a}) + +instance FromJSON PawsNotifySpectrumUseResponse where + parseJSON + = withObject "PawsNotifySpectrumUseResponse" + (\ o -> + PawsNotifySpectrumUseResponse <$> + (o .:? "kind" .!= + "spectrum#pawsNotifySpectrumUseResponse") + <*> (o .:? "version") + <*> (o .:? "type")) + +instance ToJSON PawsNotifySpectrumUseResponse where + toJSON PawsNotifySpectrumUseResponse{..} + = object + (catMaybes + [Just ("kind" .= _pawKind), + ("version" .=) <$> _pawVersion, + ("type" .=) <$> _pawType]) + +-- | The registration request message contains the required registration +-- parameters. +-- +-- /See:/ 'pawsRegisterRequest' smart constructor. +data PawsRegisterRequest = PawsRegisterRequest + { _prrrAntenna :: !(Maybe (Maybe AntennaCharacteristics)) + , _prrrLocation :: !(Maybe (Maybe GeoLocation)) + , _prrrDeviceOwner :: !(Maybe (Maybe DeviceOwner)) + , _prrrVersion :: !(Maybe Text) + , _prrrType :: !(Maybe Text) + , _prrrDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsRegisterRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'prrrAntenna' +-- +-- * 'prrrLocation' +-- +-- * 'prrrDeviceOwner' +-- +-- * 'prrrVersion' +-- +-- * 'prrrType' +-- +-- * 'prrrDeviceDesc' +pawsRegisterRequest + :: PawsRegisterRequest +pawsRegisterRequest = + PawsRegisterRequest + { _prrrAntenna = Nothing + , _prrrLocation = Nothing + , _prrrDeviceOwner = Nothing + , _prrrVersion = Nothing + , _prrrType = Nothing + , _prrrDeviceDesc = Nothing + } + +-- | Antenna characteristics, including its height and height type. +prrrAntenna :: Lens' PawsRegisterRequest (Maybe (Maybe AntennaCharacteristics)) +prrrAntenna + = lens _prrrAntenna (\ s a -> s{_prrrAntenna = a}) + +-- | A device\'s geolocation is required. +prrrLocation :: Lens' PawsRegisterRequest (Maybe (Maybe GeoLocation)) +prrrLocation + = lens _prrrLocation (\ s a -> s{_prrrLocation = a}) + +-- | Device owner information is required. +prrrDeviceOwner :: Lens' PawsRegisterRequest (Maybe (Maybe DeviceOwner)) +prrrDeviceOwner + = lens _prrrDeviceOwner + (\ s a -> s{_prrrDeviceOwner = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +prrrVersion :: Lens' PawsRegisterRequest (Maybe Text) +prrrVersion + = lens _prrrVersion (\ s a -> s{_prrrVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +prrrType :: Lens' PawsRegisterRequest (Maybe Text) +prrrType = lens _prrrType (\ s a -> s{_prrrType = a}) + +-- | A DeviceDescriptor is required. +prrrDeviceDesc :: Lens' PawsRegisterRequest (Maybe (Maybe DeviceDescriptor)) +prrrDeviceDesc + = lens _prrrDeviceDesc + (\ s a -> s{_prrrDeviceDesc = a}) + +instance FromJSON PawsRegisterRequest where + parseJSON + = withObject "PawsRegisterRequest" + (\ o -> + PawsRegisterRequest <$> + (o .:? "antenna") <*> (o .:? "location") <*> + (o .:? "deviceOwner") + <*> (o .:? "version") + <*> (o .:? "type") + <*> (o .:? "deviceDesc")) + +instance ToJSON PawsRegisterRequest where + toJSON PawsRegisterRequest{..} + = object + (catMaybes + [("antenna" .=) <$> _prrrAntenna, + ("location" .=) <$> _prrrLocation, + ("deviceOwner" .=) <$> _prrrDeviceOwner, + ("version" .=) <$> _prrrVersion, + ("type" .=) <$> _prrrType, + ("deviceDesc" .=) <$> _prrrDeviceDesc]) + +-- | This message contains the name and URI of a database. +-- +-- /See:/ 'databaseSpec' smart constructor. +data DatabaseSpec = DatabaseSpec + { _dsUri :: !(Maybe Text) + , _dsName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabaseSpec' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dsUri' +-- +-- * 'dsName' +databaseSpec + :: DatabaseSpec +databaseSpec = + DatabaseSpec + { _dsUri = Nothing + , _dsName = Nothing + } + +-- | The corresponding URI of the database. +dsUri :: Lens' DatabaseSpec (Maybe Text) +dsUri = lens _dsUri (\ s a -> s{_dsUri = a}) + +-- | The display name for a database. +dsName :: Lens' DatabaseSpec (Maybe Text) +dsName = lens _dsName (\ s a -> s{_dsName = a}) + +instance FromJSON DatabaseSpec where + parseJSON + = withObject "DatabaseSpec" + (\ o -> + DatabaseSpec <$> (o .:? "uri") <*> (o .:? "name")) + +instance ToJSON DatabaseSpec where + toJSON DatabaseSpec{..} + = object + (catMaybes + [("uri" .=) <$> _dsUri, ("name" .=) <$> _dsName]) + +-- | Available spectrum can be logically characterized by a list of frequency +-- ranges and permissible power levels for each range. +-- +-- /See:/ 'spectrumMessage' smart constructor. +data SpectrumMessage = SpectrumMessage + { _smBandwidth :: !(Maybe Double) + , _smFrequencyRanges :: !(Maybe [Maybe FrequencyRange]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SpectrumMessage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'smBandwidth' +-- +-- * 'smFrequencyRanges' +spectrumMessage + :: SpectrumMessage +spectrumMessage = + SpectrumMessage + { _smBandwidth = Nothing + , _smFrequencyRanges = Nothing + } + +-- | The bandwidth (in Hertz) for which permissible power levels are +-- specified. For example, FCC regulation would require only one spectrum +-- specification at 6MHz bandwidth, but Ofcom regulation would require two +-- specifications, at 0.1MHz and 8MHz. This parameter may be empty if there +-- is no available spectrum. It will be present otherwise. +smBandwidth :: Lens' SpectrumMessage (Maybe Double) +smBandwidth + = lens _smBandwidth (\ s a -> s{_smBandwidth = a}) + +-- | The list of frequency ranges and permissible power levels. The list may +-- be empty if there is no available spectrum, otherwise it will be +-- present. +smFrequencyRanges :: Lens' SpectrumMessage [Maybe FrequencyRange] +smFrequencyRanges + = lens _smFrequencyRanges + (\ s a -> s{_smFrequencyRanges = a}) + . _Default + . _Coerce + +instance FromJSON SpectrumMessage where + parseJSON + = withObject "SpectrumMessage" + (\ o -> + SpectrumMessage <$> + (o .:? "bandwidth") <*> + (o .:? "frequencyRanges" .!= mempty)) + +instance ToJSON SpectrumMessage where + toJSON SpectrumMessage{..} + = object + (catMaybes + [("bandwidth" .=) <$> _smBandwidth, + ("frequencyRanges" .=) <$> _smFrequencyRanges]) + +-- | This parameter is used to specify the geolocation of the device. +-- +-- /See:/ 'geoLocation' smart constructor. +data GeoLocation = GeoLocation + { _glConfidence :: !(Maybe Int32) + , _glPoint :: !(Maybe (Maybe GeoLocationEllipse)) + , _glRegion :: !(Maybe (Maybe GeoLocationPolygon)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoLocation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glConfidence' +-- +-- * 'glPoint' +-- +-- * 'glRegion' +geoLocation + :: GeoLocation +geoLocation = + GeoLocation + { _glConfidence = Nothing + , _glPoint = Nothing + , _glRegion = Nothing + } + +-- | The location confidence level, as an integer percentage, may be +-- required, depending on the regulatory domain. When the parameter is +-- optional and not provided, its value is assumed to be 95. Valid values +-- range from 0 to 99, since, in practice, 100-percent confidence is not +-- achievable. The confidence value is meaningful only when geolocation +-- refers to a point with uncertainty. +glConfidence :: Lens' GeoLocation (Maybe Int32) +glConfidence + = lens _glConfidence (\ s a -> s{_glConfidence = a}) + +-- | If present, indicates that the geolocation represents a point. +-- Paradoxically, a point is parameterized using an ellipse, where the +-- center represents the location of the point and the distances along the +-- major and minor axes represent the uncertainty. The uncertainty values +-- may be required, depending on the regulatory domain. +glPoint :: Lens' GeoLocation (Maybe (Maybe GeoLocationEllipse)) +glPoint = lens _glPoint (\ s a -> s{_glPoint = a}) + +-- | If present, indicates that the geolocation represents a region. Database +-- support for regions is optional. +glRegion :: Lens' GeoLocation (Maybe (Maybe GeoLocationPolygon)) +glRegion = lens _glRegion (\ s a -> s{_glRegion = a}) + +instance FromJSON GeoLocation where + parseJSON + = withObject "GeoLocation" + (\ o -> + GeoLocation <$> + (o .:? "confidence") <*> (o .:? "point") <*> + (o .:? "region")) + +instance ToJSON GeoLocation where + toJSON GeoLocation{..} + = object + (catMaybes + [("confidence" .=) <$> _glConfidence, + ("point" .=) <$> _glPoint, + ("region" .=) <$> _glRegion]) + +-- | A specific range of frequencies together with the associated maximum +-- power level and channel identifier. +-- +-- /See:/ 'frequencyRange' smart constructor. +data FrequencyRange = FrequencyRange + { _frStopHz :: !(Maybe Double) + , _frMaxPowerDBm :: !(Maybe Double) + , _frChannelId :: !(Maybe Text) + , _frStartHz :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FrequencyRange' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'frStopHz' +-- +-- * 'frMaxPowerDBm' +-- +-- * 'frChannelId' +-- +-- * 'frStartHz' +frequencyRange + :: FrequencyRange +frequencyRange = + FrequencyRange + { _frStopHz = Nothing + , _frMaxPowerDBm = Nothing + , _frChannelId = Nothing + , _frStartHz = Nothing + } + +-- | The required exclusive end of the frequency range (in Hertz). +frStopHz :: Lens' FrequencyRange (Maybe Double) +frStopHz = lens _frStopHz (\ s a -> s{_frStopHz = a}) + +-- | The maximum total power level (EIRP)—computed over the corresponding +-- operating bandwidth—that is permitted within the frequency range. +-- Depending on the context in which the frequency-range element appears, +-- this value may be required. For example, it is required in the +-- available-spectrum response, available-spectrum-batch response, and +-- spectrum-use notification message, but it should not be present (it is +-- not applicable) when the frequency range appears inside a +-- device-capabilities message. +frMaxPowerDBm :: Lens' FrequencyRange (Maybe Double) +frMaxPowerDBm + = lens _frMaxPowerDBm + (\ s a -> s{_frMaxPowerDBm = a}) + +-- | The database may include a channel identifier, when applicable. When it +-- is included, the device should treat it as informative. The length of +-- the identifier should not exceed 16 characters. +frChannelId :: Lens' FrequencyRange (Maybe Text) +frChannelId + = lens _frChannelId (\ s a -> s{_frChannelId = a}) + +-- | The required inclusive start of the frequency range (in Hertz). +frStartHz :: Lens' FrequencyRange (Maybe Double) +frStartHz + = lens _frStartHz (\ s a -> s{_frStartHz = a}) + +instance FromJSON FrequencyRange where + parseJSON + = withObject "FrequencyRange" + (\ o -> + FrequencyRange <$> + (o .:? "stopHz") <*> (o .:? "maxPowerDBm") <*> + (o .:? "channelId") + <*> (o .:? "startHz")) + +instance ToJSON FrequencyRange where + toJSON FrequencyRange{..} + = object + (catMaybes + [("stopHz" .=) <$> _frStopHz, + ("maxPowerDBm" .=) <$> _frMaxPowerDBm, + ("channelId" .=) <$> _frChannelId, + ("startHz" .=) <$> _frStartHz]) + +-- | The device validation request message. +-- +-- /See:/ 'pawsVerifyDeviceRequest' smart constructor. +data PawsVerifyDeviceRequest = PawsVerifyDeviceRequest + { _pvdrvVersion :: !(Maybe Text) + , _pvdrvDeviceDescs :: !(Maybe [Maybe DeviceDescriptor]) + , _pvdrvType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsVerifyDeviceRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pvdrvVersion' +-- +-- * 'pvdrvDeviceDescs' +-- +-- * 'pvdrvType' +pawsVerifyDeviceRequest + :: PawsVerifyDeviceRequest +pawsVerifyDeviceRequest = + PawsVerifyDeviceRequest + { _pvdrvVersion = Nothing + , _pvdrvDeviceDescs = Nothing + , _pvdrvType = Nothing + } + +-- | The PAWS version. Must be exactly 1.0. Required field. +pvdrvVersion :: Lens' PawsVerifyDeviceRequest (Maybe Text) +pvdrvVersion + = lens _pvdrvVersion (\ s a -> s{_pvdrvVersion = a}) + +-- | A list of device descriptors, which specifies the slave devices to be +-- validated, is required. +pvdrvDeviceDescs :: Lens' PawsVerifyDeviceRequest [Maybe DeviceDescriptor] +pvdrvDeviceDescs + = lens _pvdrvDeviceDescs + (\ s a -> s{_pvdrvDeviceDescs = a}) + . _Default + . _Coerce + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pvdrvType :: Lens' PawsVerifyDeviceRequest (Maybe Text) +pvdrvType + = lens _pvdrvType (\ s a -> s{_pvdrvType = a}) + +instance FromJSON PawsVerifyDeviceRequest where + parseJSON + = withObject "PawsVerifyDeviceRequest" + (\ o -> + PawsVerifyDeviceRequest <$> + (o .:? "version") <*> + (o .:? "deviceDescs" .!= mempty) + <*> (o .:? "type")) + +instance ToJSON PawsVerifyDeviceRequest where + toJSON PawsVerifyDeviceRequest{..} + = object + (catMaybes + [("version" .=) <$> _pvdrvVersion, + ("deviceDescs" .=) <$> _pvdrvDeviceDescs, + ("type" .=) <$> _pvdrvType]) + +-- | The device descriptor contains parameters that identify the specific +-- device, such as its manufacturer serial number, regulatory-specific +-- identifier (e.g., FCC ID), and any other device characteristics required +-- by regulatory domains. +-- +-- /See:/ 'deviceDescriptor' smart constructor. +data DeviceDescriptor = DeviceDescriptor + { _ddEtsiEnDeviceEmissionsClass :: !(Maybe Text) + , _ddRulesetIds :: !(Maybe [Text]) + , _ddModelId :: !(Maybe Text) + , _ddEtsiEnDeviceType :: !(Maybe Text) + , _ddEtsiEnTechnologyId :: !(Maybe Text) + , _ddFccId :: !(Maybe Text) + , _ddManufacturerId :: !(Maybe Text) + , _ddFccTvbdDeviceType :: !(Maybe Text) + , _ddEtsiEnDeviceCategory :: !(Maybe Text) + , _ddSerialNumber :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeviceDescriptor' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddEtsiEnDeviceEmissionsClass' +-- +-- * 'ddRulesetIds' +-- +-- * 'ddModelId' +-- +-- * 'ddEtsiEnDeviceType' +-- +-- * 'ddEtsiEnTechnologyId' +-- +-- * 'ddFccId' +-- +-- * 'ddManufacturerId' +-- +-- * 'ddFccTvbdDeviceType' +-- +-- * 'ddEtsiEnDeviceCategory' +-- +-- * 'ddSerialNumber' +deviceDescriptor + :: DeviceDescriptor +deviceDescriptor = + DeviceDescriptor + { _ddEtsiEnDeviceEmissionsClass = Nothing + , _ddRulesetIds = Nothing + , _ddModelId = Nothing + , _ddEtsiEnDeviceType = Nothing + , _ddEtsiEnTechnologyId = Nothing + , _ddFccId = Nothing + , _ddManufacturerId = Nothing + , _ddFccTvbdDeviceType = Nothing + , _ddEtsiEnDeviceCategory = Nothing + , _ddSerialNumber = Nothing + } + +-- | Specifies the ETSI white space device emissions class. The values are +-- represented by numeric strings, such as 1, 2, etc. Consult the ETSI +-- documentation for details about the device types. +ddEtsiEnDeviceEmissionsClass :: Lens' DeviceDescriptor (Maybe Text) +ddEtsiEnDeviceEmissionsClass + = lens _ddEtsiEnDeviceEmissionsClass + (\ s a -> s{_ddEtsiEnDeviceEmissionsClass = a}) + +-- | The list of identifiers for rulesets supported by the device. A database +-- may require that the device provide this list before servicing the +-- device requests. If the database does not support any of the rulesets +-- specified in the list, the database may refuse to service the device +-- requests. If present, the list must contain at least one entry. For +-- information about the valid requests, see section 9.2 of the PAWS +-- specification. Currently, FccTvBandWhiteSpace-2010 is the only supported +-- ruleset. +ddRulesetIds :: Lens' DeviceDescriptor [Text] +ddRulesetIds + = lens _ddRulesetIds (\ s a -> s{_ddRulesetIds = a}) + . _Default + . _Coerce + +-- | The device\'s model ID may be required by the regulatory domain. The +-- string value must not exceed 64 characters in length. +ddModelId :: Lens' DeviceDescriptor (Maybe Text) +ddModelId + = lens _ddModelId (\ s a -> s{_ddModelId = a}) + +-- | Specifies the ETSI white space device type. Valid values are +-- single-letter strings, such as A, B, etc. Consult the ETSI documentation +-- for details about the device types. +ddEtsiEnDeviceType :: Lens' DeviceDescriptor (Maybe Text) +ddEtsiEnDeviceType + = lens _ddEtsiEnDeviceType + (\ s a -> s{_ddEtsiEnDeviceType = a}) + +-- | Specifies the ETSI white space device technology identifier. The string +-- value must not exceed 64 characters in length. Consult the ETSI +-- documentation for details about the device types. +ddEtsiEnTechnologyId :: Lens' DeviceDescriptor (Maybe Text) +ddEtsiEnTechnologyId + = lens _ddEtsiEnTechnologyId + (\ s a -> s{_ddEtsiEnTechnologyId = a}) + +-- | Specifies the device\'s FCC certification identifier. The value is an +-- identifier string whose length should not exceed 32 characters. Note +-- that, in practice, a valid FCC ID may be limited to 19 characters. +ddFccId :: Lens' DeviceDescriptor (Maybe Text) +ddFccId = lens _ddFccId (\ s a -> s{_ddFccId = a}) + +-- | The manufacturer\'s ID may be required by the regulatory domain. This +-- should represent the name of the device manufacturer, should be +-- consistent across all devices from the same manufacturer, and should be +-- distinct from that of other manufacturers. The string value must not +-- exceed 64 characters in length. +ddManufacturerId :: Lens' DeviceDescriptor (Maybe Text) +ddManufacturerId + = lens _ddManufacturerId + (\ s a -> s{_ddManufacturerId = a}) + +-- | Specifies the TV Band White Space device type, as defined by the FCC. +-- Valid values are FIXED, MODE_1, MODE_2. +ddFccTvbdDeviceType :: Lens' DeviceDescriptor (Maybe Text) +ddFccTvbdDeviceType + = lens _ddFccTvbdDeviceType + (\ s a -> s{_ddFccTvbdDeviceType = a}) + +-- | Specifies the ETSI white space device category. Valid values are the +-- strings master and slave. This field is case-insensitive. Consult the +-- ETSI documentation for details about the device types. +ddEtsiEnDeviceCategory :: Lens' DeviceDescriptor (Maybe Text) +ddEtsiEnDeviceCategory + = lens _ddEtsiEnDeviceCategory + (\ s a -> s{_ddEtsiEnDeviceCategory = a}) + +-- | The manufacturer\'s device serial number; required by the applicable +-- regulatory domain. The length of the value must not exceed 64 +-- characters. +ddSerialNumber :: Lens' DeviceDescriptor (Maybe Text) +ddSerialNumber + = lens _ddSerialNumber + (\ s a -> s{_ddSerialNumber = a}) + +instance FromJSON DeviceDescriptor where + parseJSON + = withObject "DeviceDescriptor" + (\ o -> + DeviceDescriptor <$> + (o .:? "etsiEnDeviceEmissionsClass") <*> + (o .:? "rulesetIds" .!= mempty) + <*> (o .:? "modelId") + <*> (o .:? "etsiEnDeviceType") + <*> (o .:? "etsiEnTechnologyId") + <*> (o .:? "fccId") + <*> (o .:? "manufacturerId") + <*> (o .:? "fccTvbdDeviceType") + <*> (o .:? "etsiEnDeviceCategory") + <*> (o .:? "serialNumber")) + +instance ToJSON DeviceDescriptor where + toJSON DeviceDescriptor{..} + = object + (catMaybes + [("etsiEnDeviceEmissionsClass" .=) <$> + _ddEtsiEnDeviceEmissionsClass, + ("rulesetIds" .=) <$> _ddRulesetIds, + ("modelId" .=) <$> _ddModelId, + ("etsiEnDeviceType" .=) <$> _ddEtsiEnDeviceType, + ("etsiEnTechnologyId" .=) <$> _ddEtsiEnTechnologyId, + ("fccId" .=) <$> _ddFccId, + ("manufacturerId" .=) <$> _ddManufacturerId, + ("fccTvbdDeviceType" .=) <$> _ddFccTvbdDeviceType, + ("etsiEnDeviceCategory" .=) <$> + _ddEtsiEnDeviceCategory, + ("serialNumber" .=) <$> _ddSerialNumber]) + +-- | The response message for the available spectrum query which contains a +-- schedule of available spectrum for the device. +-- +-- /See:/ 'pawsGetSpectrumResponse' smart constructor. +data PawsGetSpectrumResponse = PawsGetSpectrumResponse + { _pgsrgNeedsSpectrumReport :: !(Maybe Bool) + , _pgsrgSpectrumSchedules :: !(Maybe [Maybe SpectrumSchedule]) + , _pgsrgKind :: !Text + , _pgsrgMaxContiguousBwHz :: !(Maybe Double) + , _pgsrgVersion :: !(Maybe Text) + , _pgsrgRulesetInfo :: !(Maybe (Maybe RulesetInfo)) + , _pgsrgType :: !(Maybe Text) + , _pgsrgDatabaseChange :: !(Maybe (Maybe DBUpdateSpec)) + , _pgsrgTimestamp :: !(Maybe Text) + , _pgsrgDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + , _pgsrgMaxTotalBwHz :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsGetSpectrumResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pgsrgNeedsSpectrumReport' +-- +-- * 'pgsrgSpectrumSchedules' +-- +-- * 'pgsrgKind' +-- +-- * 'pgsrgMaxContiguousBwHz' +-- +-- * 'pgsrgVersion' +-- +-- * 'pgsrgRulesetInfo' +-- +-- * 'pgsrgType' +-- +-- * 'pgsrgDatabaseChange' +-- +-- * 'pgsrgTimestamp' +-- +-- * 'pgsrgDeviceDesc' +-- +-- * 'pgsrgMaxTotalBwHz' +pawsGetSpectrumResponse + :: PawsGetSpectrumResponse +pawsGetSpectrumResponse = + PawsGetSpectrumResponse + { _pgsrgNeedsSpectrumReport = Nothing + , _pgsrgSpectrumSchedules = Nothing + , _pgsrgKind = "spectrum#pawsGetSpectrumResponse" + , _pgsrgMaxContiguousBwHz = Nothing + , _pgsrgVersion = Nothing + , _pgsrgRulesetInfo = Nothing + , _pgsrgType = Nothing + , _pgsrgDatabaseChange = Nothing + , _pgsrgTimestamp = Nothing + , _pgsrgDeviceDesc = Nothing + , _pgsrgMaxTotalBwHz = Nothing + } + +-- | For regulatory domains that require a spectrum-usage report from +-- devices, the database must return true for this parameter if the +-- spectrum schedule list is not empty; otherwise, the database will either +-- return false or omit this parameter. If this parameter is present and +-- its value is true, the device must send a spectrum use notify message to +-- the database; otherwise, the device must not send the notification. +pgsrgNeedsSpectrumReport :: Lens' PawsGetSpectrumResponse (Maybe Bool) +pgsrgNeedsSpectrumReport + = lens _pgsrgNeedsSpectrumReport + (\ s a -> s{_pgsrgNeedsSpectrumReport = a}) + +-- | The available spectrum response must contain a spectrum schedule list. +-- The list may be empty if spectrum is not available. The database may +-- return more than one spectrum schedule to represent future changes to +-- the available spectrum. How far in advance a schedule may be provided +-- depends on the applicable regulatory domain. +pgsrgSpectrumSchedules :: Lens' PawsGetSpectrumResponse [Maybe SpectrumSchedule] +pgsrgSpectrumSchedules + = lens _pgsrgSpectrumSchedules + (\ s a -> s{_pgsrgSpectrumSchedules = a}) + . _Default + . _Coerce + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"spectrum#pawsGetSpectrumResponse\". +pgsrgKind :: Lens' PawsGetSpectrumResponse Text +pgsrgKind + = lens _pgsrgKind (\ s a -> s{_pgsrgKind = a}) + +-- | The database may return a constraint on the allowed maximum contiguous +-- bandwidth (in Hertz). A regulatory domain may require the database to +-- return this parameter. When this parameter is present in the response, +-- the device must apply this constraint to its spectrum-selection logic to +-- ensure that no single block of spectrum has bandwidth that exceeds this +-- value. +pgsrgMaxContiguousBwHz :: Lens' PawsGetSpectrumResponse (Maybe Double) +pgsrgMaxContiguousBwHz + = lens _pgsrgMaxContiguousBwHz + (\ s a -> s{_pgsrgMaxContiguousBwHz = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +pgsrgVersion :: Lens' PawsGetSpectrumResponse (Maybe Text) +pgsrgVersion + = lens _pgsrgVersion (\ s a -> s{_pgsrgVersion = a}) + +-- | The database should return ruleset information, which identifies the +-- applicable regulatory authority and ruleset for the available spectrum +-- response. If included, the device must use the corresponding ruleset to +-- interpret the response. Values provided in the returned ruleset +-- information, such as maxLocationChange, take precedence over any +-- conflicting values provided in the ruleset information returned in a +-- prior initialization response sent by the database to the device. +pgsrgRulesetInfo :: Lens' PawsGetSpectrumResponse (Maybe (Maybe RulesetInfo)) +pgsrgRulesetInfo + = lens _pgsrgRulesetInfo + (\ s a -> s{_pgsrgRulesetInfo = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +pgsrgType :: Lens' PawsGetSpectrumResponse (Maybe Text) +pgsrgType + = lens _pgsrgType (\ s a -> s{_pgsrgType = a}) + +-- | A database may include the databaseChange parameter to notify a device +-- of a change to its database URI, providing one or more alternate +-- database URIs. The device should use this information to update its list +-- of pre-configured databases by (only) replacing its entry for the +-- responding database with the list of alternate URIs. +pgsrgDatabaseChange :: Lens' PawsGetSpectrumResponse (Maybe (Maybe DBUpdateSpec)) +pgsrgDatabaseChange + = lens _pgsrgDatabaseChange + (\ s a -> s{_pgsrgDatabaseChange = a}) + +-- | The database includes a timestamp of the form YYYY-MM-DDThh:mm:ssZ +-- (Internet timestamp format per RFC3339) in its available spectrum +-- response. The timestamp should be used by the device as a reference for +-- the start and stop times specified in the response spectrum schedules. +pgsrgTimestamp :: Lens' PawsGetSpectrumResponse (Maybe Text) +pgsrgTimestamp + = lens _pgsrgTimestamp + (\ s a -> s{_pgsrgTimestamp = a}) + +-- | The database must return, in its available spectrum response, the device +-- descriptor information it received in the master device\'s available +-- spectrum request. +pgsrgDeviceDesc :: Lens' PawsGetSpectrumResponse (Maybe (Maybe DeviceDescriptor)) +pgsrgDeviceDesc + = lens _pgsrgDeviceDesc + (\ s a -> s{_pgsrgDeviceDesc = a}) + +-- | The database may return a constraint on the allowed maximum total +-- bandwidth (in Hertz), which need not be contiguous. A regulatory domain +-- may require the database to return this parameter. When this parameter +-- is present in the available spectrum response, the device must apply +-- this constraint to its spectrum-selection logic to ensure that total +-- bandwidth does not exceed this value. +pgsrgMaxTotalBwHz :: Lens' PawsGetSpectrumResponse (Maybe Double) +pgsrgMaxTotalBwHz + = lens _pgsrgMaxTotalBwHz + (\ s a -> s{_pgsrgMaxTotalBwHz = a}) + +instance FromJSON PawsGetSpectrumResponse where + parseJSON + = withObject "PawsGetSpectrumResponse" + (\ o -> + PawsGetSpectrumResponse <$> + (o .:? "needsSpectrumReport") <*> + (o .:? "spectrumSchedules" .!= mempty) + <*> + (o .:? "kind" .!= "spectrum#pawsGetSpectrumResponse") + <*> (o .:? "maxContiguousBwHz") + <*> (o .:? "version") + <*> (o .:? "rulesetInfo") + <*> (o .:? "type") + <*> (o .:? "databaseChange") + <*> (o .:? "timestamp") + <*> (o .:? "deviceDesc") + <*> (o .:? "maxTotalBwHz")) + +instance ToJSON PawsGetSpectrumResponse where + toJSON PawsGetSpectrumResponse{..} + = object + (catMaybes + [("needsSpectrumReport" .=) <$> + _pgsrgNeedsSpectrumReport, + ("spectrumSchedules" .=) <$> _pgsrgSpectrumSchedules, + Just ("kind" .= _pgsrgKind), + ("maxContiguousBwHz" .=) <$> _pgsrgMaxContiguousBwHz, + ("version" .=) <$> _pgsrgVersion, + ("rulesetInfo" .=) <$> _pgsrgRulesetInfo, + ("type" .=) <$> _pgsrgType, + ("databaseChange" .=) <$> _pgsrgDatabaseChange, + ("timestamp" .=) <$> _pgsrgTimestamp, + ("deviceDesc" .=) <$> _pgsrgDeviceDesc, + ("maxTotalBwHz" .=) <$> _pgsrgMaxTotalBwHz]) + +-- | The initialization request message allows the master device to initiate +-- exchange of capabilities with the database. +-- +-- /See:/ 'pawsInitRequest' smart constructor. +data PawsInitRequest = PawsInitRequest + { _piriLocation :: !(Maybe (Maybe GeoLocation)) + , _piriVersion :: !(Maybe Text) + , _piriType :: !(Maybe Text) + , _piriDeviceDesc :: !(Maybe (Maybe DeviceDescriptor)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PawsInitRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piriLocation' +-- +-- * 'piriVersion' +-- +-- * 'piriType' +-- +-- * 'piriDeviceDesc' +pawsInitRequest + :: PawsInitRequest +pawsInitRequest = + PawsInitRequest + { _piriLocation = Nothing + , _piriVersion = Nothing + , _piriType = Nothing + , _piriDeviceDesc = Nothing + } + +-- | A device\'s geolocation is required. +piriLocation :: Lens' PawsInitRequest (Maybe (Maybe GeoLocation)) +piriLocation + = lens _piriLocation (\ s a -> s{_piriLocation = a}) + +-- | The PAWS version. Must be exactly 1.0. Required field. +piriVersion :: Lens' PawsInitRequest (Maybe Text) +piriVersion + = lens _piriVersion (\ s a -> s{_piriVersion = a}) + +-- | The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ, ...). Required +-- field. +piriType :: Lens' PawsInitRequest (Maybe Text) +piriType = lens _piriType (\ s a -> s{_piriType = a}) + +-- | The DeviceDescriptor parameter is required. If the database does not +-- support the device or any of the rulesets specified in the device +-- descriptor, it must return an UNSUPPORTED error code in the error +-- response. +piriDeviceDesc :: Lens' PawsInitRequest (Maybe (Maybe DeviceDescriptor)) +piriDeviceDesc + = lens _piriDeviceDesc + (\ s a -> s{_piriDeviceDesc = a}) + +instance FromJSON PawsInitRequest where + parseJSON + = withObject "PawsInitRequest" + (\ o -> + PawsInitRequest <$> + (o .:? "location") <*> (o .:? "version") <*> + (o .:? "type") + <*> (o .:? "deviceDesc")) + +instance ToJSON PawsInitRequest where + toJSON PawsInitRequest{..} + = object + (catMaybes + [("location" .=) <$> _piriLocation, + ("version" .=) <$> _piriVersion, + ("type" .=) <$> _piriType, + ("deviceDesc" .=) <$> _piriDeviceDesc]) + +-- | Device capabilities provide additional information that may be used by a +-- device to provide additional information to the database that may help +-- it to determine available spectrum. If the database does not support +-- device capabilities it will ignore the parameter altogether. +-- +-- /See:/ 'deviceCapabilities' smart constructor. +newtype DeviceCapabilities = DeviceCapabilities + { _dcFrequencyRanges :: Maybe [Maybe FrequencyRange] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DeviceCapabilities' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dcFrequencyRanges' +deviceCapabilities + :: DeviceCapabilities +deviceCapabilities = + DeviceCapabilities + { _dcFrequencyRanges = Nothing + } + +-- | An optional list of frequency ranges supported by the device. Each +-- element must contain start and stop frequencies in which the device can +-- operate. Channel identifiers are optional. When specified, the database +-- should not return available spectrum that falls outside these ranges or +-- channel IDs. +dcFrequencyRanges :: Lens' DeviceCapabilities [Maybe FrequencyRange] +dcFrequencyRanges + = lens _dcFrequencyRanges + (\ s a -> s{_dcFrequencyRanges = a}) + . _Default + . _Coerce + +instance FromJSON DeviceCapabilities where + parseJSON + = withObject "DeviceCapabilities" + (\ o -> + DeviceCapabilities <$> + (o .:? "frequencyRanges" .!= mempty)) + +instance ToJSON DeviceCapabilities where + toJSON DeviceCapabilities{..} + = object + (catMaybes + [("frequencyRanges" .=) <$> _dcFrequencyRanges]) diff --git a/gogol-spectrum/gen/Network/Google/Spectrum/Types/Sum.hs b/gogol-spectrum/gen/Network/Google/Spectrum/Types/Sum.hs new file mode 100644 index 000000000..10f4e16df --- /dev/null +++ b/gogol-spectrum/gen/Network/Google/Spectrum/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Spectrum.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Spectrum.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-spectrum/gogol-spectrum.cabal b/gogol-spectrum/gogol-spectrum.cabal new file mode 100644 index 000000000..ccd781bc7 --- /dev/null +++ b/gogol-spectrum/gogol-spectrum.cabal @@ -0,0 +1,48 @@ +name: gogol-spectrum +version: 0.0.1 +synopsis: Google Spectrum Database API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for spectrum-management functions. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Spectrum.Paws.GetSpectrum + , Network.Google.Resource.Spectrum.Paws.GetSpectrumBatch + , Network.Google.Resource.Spectrum.Paws.Init + , Network.Google.Resource.Spectrum.Paws.NotifySpectrumUse + , Network.Google.Resource.Spectrum.Paws.Register + , Network.Google.Resource.Spectrum.Paws.VerifyDevice + , Network.Google.Spectrum + , Network.Google.Spectrum.Types + + other-modules: + Network.Google.Spectrum.Types.Product + , Network.Google.Spectrum.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-spectrum/src/.gitkeep b/gogol-spectrum/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-sqladmin/LICENSE b/gogol-sqladmin/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-sqladmin/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-sqladmin/Makefile b/gogol-sqladmin/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-sqladmin/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-sqladmin/README.md b/gogol-sqladmin/README.md new file mode 100644 index 000000000..07fe77043 --- /dev/null +++ b/gogol-sqladmin/README.md @@ -0,0 +1,28 @@ +# gogol-sqladmin + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Cloud SQL Administration API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-sqladmin` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-sqladmin/Setup.hs b/gogol-sqladmin/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-sqladmin/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Delete.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Delete.hs new file mode 100644 index 000000000..075ace835 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Delete.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.BackupRuns.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the backup taken by a backup run. +-- +-- /See:/ for @SqlBackupRunsDelete@. +module Sql.BackupRuns.Delete + ( + -- * REST Resource + BackupRunsDeleteAPI + + -- * Creating a Request + , backupRunsDelete + , BackupRunsDelete + + -- * Request Lenses + , brdQuotaUser + , brdPrettyPrint + , brdProject + , brdUserIp + , brdKey + , brdId + , brdOauthToken + , brdFields + , brdAlt + , brdInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlBackupRunsDelete@ which the +-- 'BackupRunsDelete' request conforms to. +type BackupRunsDeleteAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "backupRuns" :> + Capture "id" Int64 :> Delete '[JSON] Operation + +-- | Deletes the backup taken by a backup run. +-- +-- /See:/ 'backupRunsDelete' smart constructor. +data BackupRunsDelete = BackupRunsDelete + { _brdQuotaUser :: !(Maybe Text) + , _brdPrettyPrint :: !Bool + , _brdProject :: !Text + , _brdUserIp :: !(Maybe Text) + , _brdKey :: !(Maybe Text) + , _brdId :: !Int64 + , _brdOauthToken :: !(Maybe Text) + , _brdFields :: !(Maybe Text) + , _brdAlt :: !Text + , _brdInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupRunsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brdQuotaUser' +-- +-- * 'brdPrettyPrint' +-- +-- * 'brdProject' +-- +-- * 'brdUserIp' +-- +-- * 'brdKey' +-- +-- * 'brdId' +-- +-- * 'brdOauthToken' +-- +-- * 'brdFields' +-- +-- * 'brdAlt' +-- +-- * 'brdInstance' +backupRunsDelete + :: Text -- ^ 'project' + -> Int64 -- ^ 'id' + -> Text -- ^ 'instance' + -> BackupRunsDelete +backupRunsDelete pBrdProject_ pBrdId_ pBrdInstance_ = + BackupRunsDelete + { _brdQuotaUser = Nothing + , _brdPrettyPrint = True + , _brdProject = pBrdProject_ + , _brdUserIp = Nothing + , _brdKey = Nothing + , _brdId = pBrdId_ + , _brdOauthToken = Nothing + , _brdFields = Nothing + , _brdAlt = "json" + , _brdInstance = pBrdInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +brdQuotaUser :: Lens' BackupRunsDelete' (Maybe Text) +brdQuotaUser + = lens _brdQuotaUser (\ s a -> s{_brdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brdPrettyPrint :: Lens' BackupRunsDelete' Bool +brdPrettyPrint + = lens _brdPrettyPrint + (\ s a -> s{_brdPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +brdProject :: Lens' BackupRunsDelete' Text +brdProject + = lens _brdProject (\ s a -> s{_brdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +brdUserIp :: Lens' BackupRunsDelete' (Maybe Text) +brdUserIp + = lens _brdUserIp (\ s a -> s{_brdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brdKey :: Lens' BackupRunsDelete' (Maybe Text) +brdKey = lens _brdKey (\ s a -> s{_brdKey = a}) + +-- | The ID of the Backup Run to delete. +brdId :: Lens' BackupRunsDelete' Int64 +brdId = lens _brdId (\ s a -> s{_brdId = a}) + +-- | OAuth 2.0 token for the current user. +brdOauthToken :: Lens' BackupRunsDelete' (Maybe Text) +brdOauthToken + = lens _brdOauthToken + (\ s a -> s{_brdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +brdFields :: Lens' BackupRunsDelete' (Maybe Text) +brdFields + = lens _brdFields (\ s a -> s{_brdFields = a}) + +-- | Data format for the response. +brdAlt :: Lens' BackupRunsDelete' Text +brdAlt = lens _brdAlt (\ s a -> s{_brdAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +brdInstance :: Lens' BackupRunsDelete' Text +brdInstance + = lens _brdInstance (\ s a -> s{_brdInstance = a}) + +instance GoogleRequest BackupRunsDelete' where + type Rs BackupRunsDelete' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u BackupRunsDelete{..} + = go _brdQuotaUser _brdPrettyPrint _brdProject + _brdUserIp + _brdKey + _brdId + _brdOauthToken + _brdFields + _brdAlt + _brdInstance + where go + = clientWithRoute + (Proxy :: Proxy BackupRunsDeleteAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Get.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Get.hs new file mode 100644 index 000000000..3bbdf5903 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.BackupRuns.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a resource containing information about a backup run. +-- +-- /See:/ for @SqlBackupRunsGet@. +module Sql.BackupRuns.Get + ( + -- * REST Resource + BackupRunsGetAPI + + -- * Creating a Request + , backupRunsGet + , BackupRunsGet + + -- * Request Lenses + , brgQuotaUser + , brgPrettyPrint + , brgProject + , brgUserIp + , brgKey + , brgId + , brgOauthToken + , brgFields + , brgAlt + , brgInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlBackupRunsGet@ which the +-- 'BackupRunsGet' request conforms to. +type BackupRunsGetAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "backupRuns" :> + Capture "id" Int64 :> Get '[JSON] BackupRun + +-- | Retrieves a resource containing information about a backup run. +-- +-- /See:/ 'backupRunsGet' smart constructor. +data BackupRunsGet = BackupRunsGet + { _brgQuotaUser :: !(Maybe Text) + , _brgPrettyPrint :: !Bool + , _brgProject :: !Text + , _brgUserIp :: !(Maybe Text) + , _brgKey :: !(Maybe Text) + , _brgId :: !Int64 + , _brgOauthToken :: !(Maybe Text) + , _brgFields :: !(Maybe Text) + , _brgAlt :: !Text + , _brgInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupRunsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brgQuotaUser' +-- +-- * 'brgPrettyPrint' +-- +-- * 'brgProject' +-- +-- * 'brgUserIp' +-- +-- * 'brgKey' +-- +-- * 'brgId' +-- +-- * 'brgOauthToken' +-- +-- * 'brgFields' +-- +-- * 'brgAlt' +-- +-- * 'brgInstance' +backupRunsGet + :: Text -- ^ 'project' + -> Int64 -- ^ 'id' + -> Text -- ^ 'instance' + -> BackupRunsGet +backupRunsGet pBrgProject_ pBrgId_ pBrgInstance_ = + BackupRunsGet + { _brgQuotaUser = Nothing + , _brgPrettyPrint = True + , _brgProject = pBrgProject_ + , _brgUserIp = Nothing + , _brgKey = Nothing + , _brgId = pBrgId_ + , _brgOauthToken = Nothing + , _brgFields = Nothing + , _brgAlt = "json" + , _brgInstance = pBrgInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +brgQuotaUser :: Lens' BackupRunsGet' (Maybe Text) +brgQuotaUser + = lens _brgQuotaUser (\ s a -> s{_brgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brgPrettyPrint :: Lens' BackupRunsGet' Bool +brgPrettyPrint + = lens _brgPrettyPrint + (\ s a -> s{_brgPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +brgProject :: Lens' BackupRunsGet' Text +brgProject + = lens _brgProject (\ s a -> s{_brgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +brgUserIp :: Lens' BackupRunsGet' (Maybe Text) +brgUserIp + = lens _brgUserIp (\ s a -> s{_brgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brgKey :: Lens' BackupRunsGet' (Maybe Text) +brgKey = lens _brgKey (\ s a -> s{_brgKey = a}) + +-- | The ID of this Backup Run. +brgId :: Lens' BackupRunsGet' Int64 +brgId = lens _brgId (\ s a -> s{_brgId = a}) + +-- | OAuth 2.0 token for the current user. +brgOauthToken :: Lens' BackupRunsGet' (Maybe Text) +brgOauthToken + = lens _brgOauthToken + (\ s a -> s{_brgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +brgFields :: Lens' BackupRunsGet' (Maybe Text) +brgFields + = lens _brgFields (\ s a -> s{_brgFields = a}) + +-- | Data format for the response. +brgAlt :: Lens' BackupRunsGet' Text +brgAlt = lens _brgAlt (\ s a -> s{_brgAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +brgInstance :: Lens' BackupRunsGet' Text +brgInstance + = lens _brgInstance (\ s a -> s{_brgInstance = a}) + +instance GoogleRequest BackupRunsGet' where + type Rs BackupRunsGet' = BackupRun + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u BackupRunsGet{..} + = go _brgQuotaUser _brgPrettyPrint _brgProject + _brgUserIp + _brgKey + _brgId + _brgOauthToken + _brgFields + _brgAlt + _brgInstance + where go + = clientWithRoute (Proxy :: Proxy BackupRunsGetAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/List.hs new file mode 100644 index 000000000..594721793 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/BackupRuns/List.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.BackupRuns.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all backup runs associated with a given instance and configuration +-- in the reverse chronological order of the enqueued time. +-- +-- /See:/ for @SqlBackupRunsList@. +module Sql.BackupRuns.List + ( + -- * REST Resource + BackupRunsListAPI + + -- * Creating a Request + , backupRunsList + , BackupRunsList + + -- * Request Lenses + , brlQuotaUser + , brlPrettyPrint + , brlProject + , brlUserIp + , brlKey + , brlPageToken + , brlOauthToken + , brlMaxResults + , brlFields + , brlAlt + , brlInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlBackupRunsList@ which the +-- 'BackupRunsList' request conforms to. +type BackupRunsListAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "backupRuns" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Int32 :> + Get '[JSON] BackupRunsListResponse + +-- | Lists all backup runs associated with a given instance and configuration +-- in the reverse chronological order of the enqueued time. +-- +-- /See:/ 'backupRunsList' smart constructor. +data BackupRunsList = BackupRunsList + { _brlQuotaUser :: !(Maybe Text) + , _brlPrettyPrint :: !Bool + , _brlProject :: !Text + , _brlUserIp :: !(Maybe Text) + , _brlKey :: !(Maybe Text) + , _brlPageToken :: !(Maybe Text) + , _brlOauthToken :: !(Maybe Text) + , _brlMaxResults :: !(Maybe Int32) + , _brlFields :: !(Maybe Text) + , _brlAlt :: !Text + , _brlInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupRunsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brlQuotaUser' +-- +-- * 'brlPrettyPrint' +-- +-- * 'brlProject' +-- +-- * 'brlUserIp' +-- +-- * 'brlKey' +-- +-- * 'brlPageToken' +-- +-- * 'brlOauthToken' +-- +-- * 'brlMaxResults' +-- +-- * 'brlFields' +-- +-- * 'brlAlt' +-- +-- * 'brlInstance' +backupRunsList + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> BackupRunsList +backupRunsList pBrlProject_ pBrlInstance_ = + BackupRunsList + { _brlQuotaUser = Nothing + , _brlPrettyPrint = True + , _brlProject = pBrlProject_ + , _brlUserIp = Nothing + , _brlKey = Nothing + , _brlPageToken = Nothing + , _brlOauthToken = Nothing + , _brlMaxResults = Nothing + , _brlFields = Nothing + , _brlAlt = "json" + , _brlInstance = pBrlInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +brlQuotaUser :: Lens' BackupRunsList' (Maybe Text) +brlQuotaUser + = lens _brlQuotaUser (\ s a -> s{_brlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brlPrettyPrint :: Lens' BackupRunsList' Bool +brlPrettyPrint + = lens _brlPrettyPrint + (\ s a -> s{_brlPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +brlProject :: Lens' BackupRunsList' Text +brlProject + = lens _brlProject (\ s a -> s{_brlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +brlUserIp :: Lens' BackupRunsList' (Maybe Text) +brlUserIp + = lens _brlUserIp (\ s a -> s{_brlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brlKey :: Lens' BackupRunsList' (Maybe Text) +brlKey = lens _brlKey (\ s a -> s{_brlKey = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +brlPageToken :: Lens' BackupRunsList' (Maybe Text) +brlPageToken + = lens _brlPageToken (\ s a -> s{_brlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +brlOauthToken :: Lens' BackupRunsList' (Maybe Text) +brlOauthToken + = lens _brlOauthToken + (\ s a -> s{_brlOauthToken = a}) + +-- | Maximum number of backup runs per response. +brlMaxResults :: Lens' BackupRunsList' (Maybe Int32) +brlMaxResults + = lens _brlMaxResults + (\ s a -> s{_brlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +brlFields :: Lens' BackupRunsList' (Maybe Text) +brlFields + = lens _brlFields (\ s a -> s{_brlFields = a}) + +-- | Data format for the response. +brlAlt :: Lens' BackupRunsList' Text +brlAlt = lens _brlAlt (\ s a -> s{_brlAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +brlInstance :: Lens' BackupRunsList' Text +brlInstance + = lens _brlInstance (\ s a -> s{_brlInstance = a}) + +instance GoogleRequest BackupRunsList' where + type Rs BackupRunsList' = BackupRunsListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u BackupRunsList{..} + = go _brlQuotaUser _brlPrettyPrint _brlProject + _brlUserIp + _brlKey + _brlPageToken + _brlOauthToken + _brlMaxResults + _brlFields + _brlAlt + _brlInstance + where go + = clientWithRoute (Proxy :: Proxy BackupRunsListAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Delete.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Delete.hs new file mode 100644 index 000000000..4f81f1223 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Delete.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ for @SqlDatabasesDelete@. +module Sql.Databases.Delete + ( + -- * REST Resource + DatabasesDeleteAPI + + -- * Creating a Request + , databasesDelete + , DatabasesDelete + + -- * Request Lenses + , ddQuotaUser + , ddPrettyPrint + , ddProject + , ddDatabase + , ddUserIp + , ddKey + , ddOauthToken + , ddFields + , ddAlt + , ddInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesDelete@ which the +-- 'DatabasesDelete' request conforms to. +type DatabasesDeleteAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> + Capture "database" Text :> Delete '[JSON] Operation + +-- | Deletes a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ 'databasesDelete' smart constructor. +data DatabasesDelete = DatabasesDelete + { _ddQuotaUser :: !(Maybe Text) + , _ddPrettyPrint :: !Bool + , _ddProject :: !Text + , _ddDatabase :: !Text + , _ddUserIp :: !(Maybe Text) + , _ddKey :: !(Maybe Text) + , _ddOauthToken :: !(Maybe Text) + , _ddFields :: !(Maybe Text) + , _ddAlt :: !Text + , _ddInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ddQuotaUser' +-- +-- * 'ddPrettyPrint' +-- +-- * 'ddProject' +-- +-- * 'ddDatabase' +-- +-- * 'ddUserIp' +-- +-- * 'ddKey' +-- +-- * 'ddOauthToken' +-- +-- * 'ddFields' +-- +-- * 'ddAlt' +-- +-- * 'ddInstance' +databasesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'database' + -> Text -- ^ 'instance' + -> DatabasesDelete +databasesDelete pDdProject_ pDdDatabase_ pDdInstance_ = + DatabasesDelete + { _ddQuotaUser = Nothing + , _ddPrettyPrint = True + , _ddProject = pDdProject_ + , _ddDatabase = pDdDatabase_ + , _ddUserIp = Nothing + , _ddKey = Nothing + , _ddOauthToken = Nothing + , _ddFields = Nothing + , _ddAlt = "json" + , _ddInstance = pDdInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ddQuotaUser :: Lens' DatabasesDelete' (Maybe Text) +ddQuotaUser + = lens _ddQuotaUser (\ s a -> s{_ddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ddPrettyPrint :: Lens' DatabasesDelete' Bool +ddPrettyPrint + = lens _ddPrettyPrint + (\ s a -> s{_ddPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +ddProject :: Lens' DatabasesDelete' Text +ddProject + = lens _ddProject (\ s a -> s{_ddProject = a}) + +-- | Name of the database to be deleted in the instance. +ddDatabase :: Lens' DatabasesDelete' Text +ddDatabase + = lens _ddDatabase (\ s a -> s{_ddDatabase = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ddUserIp :: Lens' DatabasesDelete' (Maybe Text) +ddUserIp = lens _ddUserIp (\ s a -> s{_ddUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ddKey :: Lens' DatabasesDelete' (Maybe Text) +ddKey = lens _ddKey (\ s a -> s{_ddKey = a}) + +-- | OAuth 2.0 token for the current user. +ddOauthToken :: Lens' DatabasesDelete' (Maybe Text) +ddOauthToken + = lens _ddOauthToken (\ s a -> s{_ddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ddFields :: Lens' DatabasesDelete' (Maybe Text) +ddFields = lens _ddFields (\ s a -> s{_ddFields = a}) + +-- | Data format for the response. +ddAlt :: Lens' DatabasesDelete' Text +ddAlt = lens _ddAlt (\ s a -> s{_ddAlt = a}) + +-- | Database instance ID. This does not include the project ID. +ddInstance :: Lens' DatabasesDelete' Text +ddInstance + = lens _ddInstance (\ s a -> s{_ddInstance = a}) + +instance GoogleRequest DatabasesDelete' where + type Rs DatabasesDelete' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesDelete{..} + = go _ddQuotaUser _ddPrettyPrint _ddProject + _ddDatabase + _ddUserIp + _ddKey + _ddOauthToken + _ddFields + _ddAlt + _ddInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesDeleteAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Get.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Get.hs new file mode 100644 index 000000000..163ba550b --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Get.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ for @SqlDatabasesGet@. +module Sql.Databases.Get + ( + -- * REST Resource + DatabasesGetAPI + + -- * Creating a Request + , databasesGet + , DatabasesGet + + -- * Request Lenses + , dgQuotaUser + , dgPrettyPrint + , dgProject + , dgDatabase + , dgUserIp + , dgKey + , dgOauthToken + , dgFields + , dgAlt + , dgInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesGet@ which the +-- 'DatabasesGet' request conforms to. +type DatabasesGetAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> + Capture "database" Text :> Get '[JSON] Database + +-- | Retrieves a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ 'databasesGet' smart constructor. +data DatabasesGet = DatabasesGet + { _dgQuotaUser :: !(Maybe Text) + , _dgPrettyPrint :: !Bool + , _dgProject :: !Text + , _dgDatabase :: !Text + , _dgUserIp :: !(Maybe Text) + , _dgKey :: !(Maybe Text) + , _dgOauthToken :: !(Maybe Text) + , _dgFields :: !(Maybe Text) + , _dgAlt :: !Text + , _dgInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dgQuotaUser' +-- +-- * 'dgPrettyPrint' +-- +-- * 'dgProject' +-- +-- * 'dgDatabase' +-- +-- * 'dgUserIp' +-- +-- * 'dgKey' +-- +-- * 'dgOauthToken' +-- +-- * 'dgFields' +-- +-- * 'dgAlt' +-- +-- * 'dgInstance' +databasesGet + :: Text -- ^ 'project' + -> Text -- ^ 'database' + -> Text -- ^ 'instance' + -> DatabasesGet +databasesGet pDgProject_ pDgDatabase_ pDgInstance_ = + DatabasesGet + { _dgQuotaUser = Nothing + , _dgPrettyPrint = True + , _dgProject = pDgProject_ + , _dgDatabase = pDgDatabase_ + , _dgUserIp = Nothing + , _dgKey = Nothing + , _dgOauthToken = Nothing + , _dgFields = Nothing + , _dgAlt = "json" + , _dgInstance = pDgInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dgQuotaUser :: Lens' DatabasesGet' (Maybe Text) +dgQuotaUser + = lens _dgQuotaUser (\ s a -> s{_dgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dgPrettyPrint :: Lens' DatabasesGet' Bool +dgPrettyPrint + = lens _dgPrettyPrint + (\ s a -> s{_dgPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +dgProject :: Lens' DatabasesGet' Text +dgProject + = lens _dgProject (\ s a -> s{_dgProject = a}) + +-- | Name of the database in the instance. +dgDatabase :: Lens' DatabasesGet' Text +dgDatabase + = lens _dgDatabase (\ s a -> s{_dgDatabase = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dgUserIp :: Lens' DatabasesGet' (Maybe Text) +dgUserIp = lens _dgUserIp (\ s a -> s{_dgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dgKey :: Lens' DatabasesGet' (Maybe Text) +dgKey = lens _dgKey (\ s a -> s{_dgKey = a}) + +-- | OAuth 2.0 token for the current user. +dgOauthToken :: Lens' DatabasesGet' (Maybe Text) +dgOauthToken + = lens _dgOauthToken (\ s a -> s{_dgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dgFields :: Lens' DatabasesGet' (Maybe Text) +dgFields = lens _dgFields (\ s a -> s{_dgFields = a}) + +-- | Data format for the response. +dgAlt :: Lens' DatabasesGet' Text +dgAlt = lens _dgAlt (\ s a -> s{_dgAlt = a}) + +-- | Database instance ID. This does not include the project ID. +dgInstance :: Lens' DatabasesGet' Text +dgInstance + = lens _dgInstance (\ s a -> s{_dgInstance = a}) + +instance GoogleRequest DatabasesGet' where + type Rs DatabasesGet' = Database + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesGet{..} + = go _dgQuotaUser _dgPrettyPrint _dgProject + _dgDatabase + _dgUserIp + _dgKey + _dgOauthToken + _dgFields + _dgAlt + _dgInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesGetAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Insert.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Insert.hs new file mode 100644 index 000000000..ec604a5f2 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Insert.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Inserts a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ for @SqlDatabasesInsert@. +module Sql.Databases.Insert + ( + -- * REST Resource + DatabasesInsertAPI + + -- * Creating a Request + , databasesInsert + , DatabasesInsert + + -- * Request Lenses + , datQuotaUser + , datPrettyPrint + , datProject + , datUserIp + , datKey + , datOauthToken + , datFields + , datAlt + , datInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesInsert@ which the +-- 'DatabasesInsert' request conforms to. +type DatabasesInsertAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> Post '[JSON] Operation + +-- | Inserts a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ 'databasesInsert' smart constructor. +data DatabasesInsert = DatabasesInsert + { _datQuotaUser :: !(Maybe Text) + , _datPrettyPrint :: !Bool + , _datProject :: !Text + , _datUserIp :: !(Maybe Text) + , _datKey :: !(Maybe Text) + , _datOauthToken :: !(Maybe Text) + , _datFields :: !(Maybe Text) + , _datAlt :: !Text + , _datInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'datQuotaUser' +-- +-- * 'datPrettyPrint' +-- +-- * 'datProject' +-- +-- * 'datUserIp' +-- +-- * 'datKey' +-- +-- * 'datOauthToken' +-- +-- * 'datFields' +-- +-- * 'datAlt' +-- +-- * 'datInstance' +databasesInsert + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> DatabasesInsert +databasesInsert pDatProject_ pDatInstance_ = + DatabasesInsert + { _datQuotaUser = Nothing + , _datPrettyPrint = True + , _datProject = pDatProject_ + , _datUserIp = Nothing + , _datKey = Nothing + , _datOauthToken = Nothing + , _datFields = Nothing + , _datAlt = "json" + , _datInstance = pDatInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +datQuotaUser :: Lens' DatabasesInsert' (Maybe Text) +datQuotaUser + = lens _datQuotaUser (\ s a -> s{_datQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +datPrettyPrint :: Lens' DatabasesInsert' Bool +datPrettyPrint + = lens _datPrettyPrint + (\ s a -> s{_datPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +datProject :: Lens' DatabasesInsert' Text +datProject + = lens _datProject (\ s a -> s{_datProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +datUserIp :: Lens' DatabasesInsert' (Maybe Text) +datUserIp + = lens _datUserIp (\ s a -> s{_datUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +datKey :: Lens' DatabasesInsert' (Maybe Text) +datKey = lens _datKey (\ s a -> s{_datKey = a}) + +-- | OAuth 2.0 token for the current user. +datOauthToken :: Lens' DatabasesInsert' (Maybe Text) +datOauthToken + = lens _datOauthToken + (\ s a -> s{_datOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +datFields :: Lens' DatabasesInsert' (Maybe Text) +datFields + = lens _datFields (\ s a -> s{_datFields = a}) + +-- | Data format for the response. +datAlt :: Lens' DatabasesInsert' Text +datAlt = lens _datAlt (\ s a -> s{_datAlt = a}) + +-- | Database instance ID. This does not include the project ID. +datInstance :: Lens' DatabasesInsert' Text +datInstance + = lens _datInstance (\ s a -> s{_datInstance = a}) + +instance GoogleRequest DatabasesInsert' where + type Rs DatabasesInsert' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesInsert{..} + = go _datQuotaUser _datPrettyPrint _datProject + _datUserIp + _datKey + _datOauthToken + _datFields + _datAlt + _datInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesInsertAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/List.hs new file mode 100644 index 000000000..b99a4df0e --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/List.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists databases in the specified Cloud SQL instance. +-- +-- /See:/ for @SqlDatabasesList@. +module Sql.Databases.List + ( + -- * REST Resource + DatabasesListAPI + + -- * Creating a Request + , databasesList + , DatabasesList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlProject + , dlUserIp + , dlKey + , dlOauthToken + , dlFields + , dlAlt + , dlInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesList@ which the +-- 'DatabasesList' request conforms to. +type DatabasesListAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> Get '[JSON] DatabasesListResponse + +-- | Lists databases in the specified Cloud SQL instance. +-- +-- /See:/ 'databasesList' smart constructor. +data DatabasesList = DatabasesList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlProject :: !Text + , _dlUserIp :: !(Maybe Text) + , _dlKey :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + , _dlInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlProject' +-- +-- * 'dlUserIp' +-- +-- * 'dlKey' +-- +-- * 'dlOauthToken' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +-- +-- * 'dlInstance' +databasesList + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> DatabasesList +databasesList pDlProject_ pDlInstance_ = + DatabasesList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlProject = pDlProject_ + , _dlUserIp = Nothing + , _dlKey = Nothing + , _dlOauthToken = Nothing + , _dlFields = Nothing + , _dlAlt = "json" + , _dlInstance = pDlInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DatabasesList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DatabasesList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | Project ID of the project for which to list Cloud SQL instances. +dlProject :: Lens' DatabasesList' Text +dlProject + = lens _dlProject (\ s a -> s{_dlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DatabasesList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DatabasesList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DatabasesList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DatabasesList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DatabasesList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +dlInstance :: Lens' DatabasesList' Text +dlInstance + = lens _dlInstance (\ s a -> s{_dlInstance = a}) + +instance GoogleRequest DatabasesList' where + type Rs DatabasesList' = DatabasesListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesList{..} + = go _dlQuotaUser _dlPrettyPrint _dlProject _dlUserIp + _dlKey + _dlOauthToken + _dlFields + _dlAlt + _dlInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesListAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Patch.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Patch.hs new file mode 100644 index 000000000..9b0aee0c7 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Patch.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a resource containing information about a database inside a +-- Cloud SQL instance. This method supports patch semantics. +-- +-- /See:/ for @SqlDatabasesPatch@. +module Sql.Databases.Patch + ( + -- * REST Resource + DatabasesPatchAPI + + -- * Creating a Request + , databasesPatch + , DatabasesPatch + + -- * Request Lenses + , dpQuotaUser + , dpPrettyPrint + , dpProject + , dpDatabase + , dpUserIp + , dpKey + , dpOauthToken + , dpFields + , dpAlt + , dpInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesPatch@ which the +-- 'DatabasesPatch' request conforms to. +type DatabasesPatchAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> + Capture "database" Text :> Patch '[JSON] Operation + +-- | Updates a resource containing information about a database inside a +-- Cloud SQL instance. This method supports patch semantics. +-- +-- /See:/ 'databasesPatch' smart constructor. +data DatabasesPatch = DatabasesPatch + { _dpQuotaUser :: !(Maybe Text) + , _dpPrettyPrint :: !Bool + , _dpProject :: !Text + , _dpDatabase :: !Text + , _dpUserIp :: !(Maybe Text) + , _dpKey :: !(Maybe Text) + , _dpOauthToken :: !(Maybe Text) + , _dpFields :: !(Maybe Text) + , _dpAlt :: !Text + , _dpInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dpQuotaUser' +-- +-- * 'dpPrettyPrint' +-- +-- * 'dpProject' +-- +-- * 'dpDatabase' +-- +-- * 'dpUserIp' +-- +-- * 'dpKey' +-- +-- * 'dpOauthToken' +-- +-- * 'dpFields' +-- +-- * 'dpAlt' +-- +-- * 'dpInstance' +databasesPatch + :: Text -- ^ 'project' + -> Text -- ^ 'database' + -> Text -- ^ 'instance' + -> DatabasesPatch +databasesPatch pDpProject_ pDpDatabase_ pDpInstance_ = + DatabasesPatch + { _dpQuotaUser = Nothing + , _dpPrettyPrint = True + , _dpProject = pDpProject_ + , _dpDatabase = pDpDatabase_ + , _dpUserIp = Nothing + , _dpKey = Nothing + , _dpOauthToken = Nothing + , _dpFields = Nothing + , _dpAlt = "json" + , _dpInstance = pDpInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dpQuotaUser :: Lens' DatabasesPatch' (Maybe Text) +dpQuotaUser + = lens _dpQuotaUser (\ s a -> s{_dpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dpPrettyPrint :: Lens' DatabasesPatch' Bool +dpPrettyPrint + = lens _dpPrettyPrint + (\ s a -> s{_dpPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +dpProject :: Lens' DatabasesPatch' Text +dpProject + = lens _dpProject (\ s a -> s{_dpProject = a}) + +-- | Name of the database to be updated in the instance. +dpDatabase :: Lens' DatabasesPatch' Text +dpDatabase + = lens _dpDatabase (\ s a -> s{_dpDatabase = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dpUserIp :: Lens' DatabasesPatch' (Maybe Text) +dpUserIp = lens _dpUserIp (\ s a -> s{_dpUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dpKey :: Lens' DatabasesPatch' (Maybe Text) +dpKey = lens _dpKey (\ s a -> s{_dpKey = a}) + +-- | OAuth 2.0 token for the current user. +dpOauthToken :: Lens' DatabasesPatch' (Maybe Text) +dpOauthToken + = lens _dpOauthToken (\ s a -> s{_dpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dpFields :: Lens' DatabasesPatch' (Maybe Text) +dpFields = lens _dpFields (\ s a -> s{_dpFields = a}) + +-- | Data format for the response. +dpAlt :: Lens' DatabasesPatch' Text +dpAlt = lens _dpAlt (\ s a -> s{_dpAlt = a}) + +-- | Database instance ID. This does not include the project ID. +dpInstance :: Lens' DatabasesPatch' Text +dpInstance + = lens _dpInstance (\ s a -> s{_dpInstance = a}) + +instance GoogleRequest DatabasesPatch' where + type Rs DatabasesPatch' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesPatch{..} + = go _dpQuotaUser _dpPrettyPrint _dpProject + _dpDatabase + _dpUserIp + _dpKey + _dpOauthToken + _dpFields + _dpAlt + _dpInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesPatchAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Update.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Update.hs new file mode 100644 index 000000000..0225503a7 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Databases/Update.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Databases.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ for @SqlDatabasesUpdate@. +module Sql.Databases.Update + ( + -- * REST Resource + DatabasesUpdateAPI + + -- * Creating a Request + , databasesUpdate + , DatabasesUpdate + + -- * Request Lenses + , duQuotaUser + , duPrettyPrint + , duProject + , duDatabase + , duUserIp + , duKey + , duOauthToken + , duFields + , duAlt + , duInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlDatabasesUpdate@ which the +-- 'DatabasesUpdate' request conforms to. +type DatabasesUpdateAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "databases" :> + Capture "database" Text :> Put '[JSON] Operation + +-- | Updates a resource containing information about a database inside a +-- Cloud SQL instance. +-- +-- /See:/ 'databasesUpdate' smart constructor. +data DatabasesUpdate = DatabasesUpdate + { _duQuotaUser :: !(Maybe Text) + , _duPrettyPrint :: !Bool + , _duProject :: !Text + , _duDatabase :: !Text + , _duUserIp :: !(Maybe Text) + , _duKey :: !(Maybe Text) + , _duOauthToken :: !(Maybe Text) + , _duFields :: !(Maybe Text) + , _duAlt :: !Text + , _duInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'duQuotaUser' +-- +-- * 'duPrettyPrint' +-- +-- * 'duProject' +-- +-- * 'duDatabase' +-- +-- * 'duUserIp' +-- +-- * 'duKey' +-- +-- * 'duOauthToken' +-- +-- * 'duFields' +-- +-- * 'duAlt' +-- +-- * 'duInstance' +databasesUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'database' + -> Text -- ^ 'instance' + -> DatabasesUpdate +databasesUpdate pDuProject_ pDuDatabase_ pDuInstance_ = + DatabasesUpdate + { _duQuotaUser = Nothing + , _duPrettyPrint = True + , _duProject = pDuProject_ + , _duDatabase = pDuDatabase_ + , _duUserIp = Nothing + , _duKey = Nothing + , _duOauthToken = Nothing + , _duFields = Nothing + , _duAlt = "json" + , _duInstance = pDuInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +duQuotaUser :: Lens' DatabasesUpdate' (Maybe Text) +duQuotaUser + = lens _duQuotaUser (\ s a -> s{_duQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +duPrettyPrint :: Lens' DatabasesUpdate' Bool +duPrettyPrint + = lens _duPrettyPrint + (\ s a -> s{_duPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +duProject :: Lens' DatabasesUpdate' Text +duProject + = lens _duProject (\ s a -> s{_duProject = a}) + +-- | Name of the database to be updated in the instance. +duDatabase :: Lens' DatabasesUpdate' Text +duDatabase + = lens _duDatabase (\ s a -> s{_duDatabase = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +duUserIp :: Lens' DatabasesUpdate' (Maybe Text) +duUserIp = lens _duUserIp (\ s a -> s{_duUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +duKey :: Lens' DatabasesUpdate' (Maybe Text) +duKey = lens _duKey (\ s a -> s{_duKey = a}) + +-- | OAuth 2.0 token for the current user. +duOauthToken :: Lens' DatabasesUpdate' (Maybe Text) +duOauthToken + = lens _duOauthToken (\ s a -> s{_duOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +duFields :: Lens' DatabasesUpdate' (Maybe Text) +duFields = lens _duFields (\ s a -> s{_duFields = a}) + +-- | Data format for the response. +duAlt :: Lens' DatabasesUpdate' Text +duAlt = lens _duAlt (\ s a -> s{_duAlt = a}) + +-- | Database instance ID. This does not include the project ID. +duInstance :: Lens' DatabasesUpdate' Text +duInstance + = lens _duInstance (\ s a -> s{_duInstance = a}) + +instance GoogleRequest DatabasesUpdate' where + type Rs DatabasesUpdate' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u DatabasesUpdate{..} + = go _duQuotaUser _duPrettyPrint _duProject + _duDatabase + _duUserIp + _duKey + _duOauthToken + _duFields + _duAlt + _duInstance + where go + = clientWithRoute (Proxy :: Proxy DatabasesUpdateAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Flags/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Flags/List.hs new file mode 100644 index 000000000..ca071cb20 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Flags/List.hs @@ -0,0 +1,138 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Flags.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all available database flags for Google Cloud SQL instances. +-- +-- /See:/ for @SqlFlagsList@. +module Sql.Flags.List + ( + -- * REST Resource + FlagsListAPI + + -- * Creating a Request + , flagsList + , FlagsList + + -- * Request Lenses + , flQuotaUser + , flPrettyPrint + , flUserIp + , flKey + , flOauthToken + , flFields + , flAlt + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlFlagsList@ which the +-- 'FlagsList' request conforms to. +type FlagsListAPI = + "flags" :> Get '[JSON] FlagsListResponse + +-- | List all available database flags for Google Cloud SQL instances. +-- +-- /See:/ 'flagsList' smart constructor. +data FlagsList = FlagsList + { _flQuotaUser :: !(Maybe Text) + , _flPrettyPrint :: !Bool + , _flUserIp :: !(Maybe Text) + , _flKey :: !(Maybe Text) + , _flOauthToken :: !(Maybe Text) + , _flFields :: !(Maybe Text) + , _flAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FlagsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flQuotaUser' +-- +-- * 'flPrettyPrint' +-- +-- * 'flUserIp' +-- +-- * 'flKey' +-- +-- * 'flOauthToken' +-- +-- * 'flFields' +-- +-- * 'flAlt' +flagsList + :: FlagsList +flagsList = + FlagsList + { _flQuotaUser = Nothing + , _flPrettyPrint = True + , _flUserIp = Nothing + , _flKey = Nothing + , _flOauthToken = Nothing + , _flFields = Nothing + , _flAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +flQuotaUser :: Lens' FlagsList' (Maybe Text) +flQuotaUser + = lens _flQuotaUser (\ s a -> s{_flQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +flPrettyPrint :: Lens' FlagsList' Bool +flPrettyPrint + = lens _flPrettyPrint + (\ s a -> s{_flPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +flUserIp :: Lens' FlagsList' (Maybe Text) +flUserIp = lens _flUserIp (\ s a -> s{_flUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +flKey :: Lens' FlagsList' (Maybe Text) +flKey = lens _flKey (\ s a -> s{_flKey = a}) + +-- | OAuth 2.0 token for the current user. +flOauthToken :: Lens' FlagsList' (Maybe Text) +flOauthToken + = lens _flOauthToken (\ s a -> s{_flOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +flFields :: Lens' FlagsList' (Maybe Text) +flFields = lens _flFields (\ s a -> s{_flFields = a}) + +-- | Data format for the response. +flAlt :: Lens' FlagsList' Text +flAlt = lens _flAlt (\ s a -> s{_flAlt = a}) + +instance GoogleRequest FlagsList' where + type Rs FlagsList' = FlagsListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u FlagsList{..} + = go _flQuotaUser _flPrettyPrint _flUserIp _flKey + _flOauthToken + _flFields + _flAlt + where go + = clientWithRoute (Proxy :: Proxy FlagsListAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Clone.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Clone.hs new file mode 100644 index 000000000..04c7a66fa --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Clone.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Clone +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a Cloud SQL instance as a clone of the source instance. +-- +-- /See:/ for @SqlInstancesClone@. +module Sql.Instances.Clone + ( + -- * REST Resource + InstancesCloneAPI + + -- * Creating a Request + , instancesClone + , InstancesClone + + -- * Request Lenses + , icQuotaUser + , icPrettyPrint + , icProject + , icUserIp + , icKey + , icOauthToken + , icFields + , icAlt + , icInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesClone@ which the +-- 'InstancesClone' request conforms to. +type InstancesCloneAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "clone" :> Post '[JSON] Operation + +-- | Creates a Cloud SQL instance as a clone of the source instance. +-- +-- /See:/ 'instancesClone' smart constructor. +data InstancesClone = InstancesClone + { _icQuotaUser :: !(Maybe Text) + , _icPrettyPrint :: !Bool + , _icProject :: !Text + , _icUserIp :: !(Maybe Text) + , _icKey :: !(Maybe Text) + , _icOauthToken :: !(Maybe Text) + , _icFields :: !(Maybe Text) + , _icAlt :: !Text + , _icInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesClone'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icQuotaUser' +-- +-- * 'icPrettyPrint' +-- +-- * 'icProject' +-- +-- * 'icUserIp' +-- +-- * 'icKey' +-- +-- * 'icOauthToken' +-- +-- * 'icFields' +-- +-- * 'icAlt' +-- +-- * 'icInstance' +instancesClone + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesClone +instancesClone pIcProject_ pIcInstance_ = + InstancesClone + { _icQuotaUser = Nothing + , _icPrettyPrint = True + , _icProject = pIcProject_ + , _icUserIp = Nothing + , _icKey = Nothing + , _icOauthToken = Nothing + , _icFields = Nothing + , _icAlt = "json" + , _icInstance = pIcInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +icQuotaUser :: Lens' InstancesClone' (Maybe Text) +icQuotaUser + = lens _icQuotaUser (\ s a -> s{_icQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +icPrettyPrint :: Lens' InstancesClone' Bool +icPrettyPrint + = lens _icPrettyPrint + (\ s a -> s{_icPrettyPrint = a}) + +-- | Project ID of the source as well as the clone Cloud SQL instance. +icProject :: Lens' InstancesClone' Text +icProject + = lens _icProject (\ s a -> s{_icProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +icUserIp :: Lens' InstancesClone' (Maybe Text) +icUserIp = lens _icUserIp (\ s a -> s{_icUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +icKey :: Lens' InstancesClone' (Maybe Text) +icKey = lens _icKey (\ s a -> s{_icKey = a}) + +-- | OAuth 2.0 token for the current user. +icOauthToken :: Lens' InstancesClone' (Maybe Text) +icOauthToken + = lens _icOauthToken (\ s a -> s{_icOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +icFields :: Lens' InstancesClone' (Maybe Text) +icFields = lens _icFields (\ s a -> s{_icFields = a}) + +-- | Data format for the response. +icAlt :: Lens' InstancesClone' Text +icAlt = lens _icAlt (\ s a -> s{_icAlt = a}) + +-- | The ID of the Cloud SQL instance to be cloned (source). This does not +-- include the project ID. +icInstance :: Lens' InstancesClone' Text +icInstance + = lens _icInstance (\ s a -> s{_icInstance = a}) + +instance GoogleRequest InstancesClone' where + type Rs InstancesClone' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesClone{..} + = go _icQuotaUser _icPrettyPrint _icProject _icUserIp + _icKey + _icOauthToken + _icFields + _icAlt + _icInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesCloneAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Delete.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Delete.hs new file mode 100644 index 000000000..441ce4fbf --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Delete.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a Cloud SQL instance. +-- +-- /See:/ for @SqlInstancesDelete@. +module Sql.Instances.Delete + ( + -- * REST Resource + InstancesDeleteAPI + + -- * Creating a Request + , instancesDelete + , InstancesDelete + + -- * Request Lenses + , idQuotaUser + , idPrettyPrint + , idProject + , idUserIp + , idKey + , idOauthToken + , idFields + , idAlt + , idInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesDelete@ which the +-- 'InstancesDelete' request conforms to. +type InstancesDeleteAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> Delete '[JSON] Operation + +-- | Deletes a Cloud SQL instance. +-- +-- /See:/ 'instancesDelete' smart constructor. +data InstancesDelete = InstancesDelete + { _idQuotaUser :: !(Maybe Text) + , _idPrettyPrint :: !Bool + , _idProject :: !Text + , _idUserIp :: !(Maybe Text) + , _idKey :: !(Maybe Text) + , _idOauthToken :: !(Maybe Text) + , _idFields :: !(Maybe Text) + , _idAlt :: !Text + , _idInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'idQuotaUser' +-- +-- * 'idPrettyPrint' +-- +-- * 'idProject' +-- +-- * 'idUserIp' +-- +-- * 'idKey' +-- +-- * 'idOauthToken' +-- +-- * 'idFields' +-- +-- * 'idAlt' +-- +-- * 'idInstance' +instancesDelete + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesDelete +instancesDelete pIdProject_ pIdInstance_ = + InstancesDelete + { _idQuotaUser = Nothing + , _idPrettyPrint = True + , _idProject = pIdProject_ + , _idUserIp = Nothing + , _idKey = Nothing + , _idOauthToken = Nothing + , _idFields = Nothing + , _idAlt = "json" + , _idInstance = pIdInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +idQuotaUser :: Lens' InstancesDelete' (Maybe Text) +idQuotaUser + = lens _idQuotaUser (\ s a -> s{_idQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +idPrettyPrint :: Lens' InstancesDelete' Bool +idPrettyPrint + = lens _idPrettyPrint + (\ s a -> s{_idPrettyPrint = a}) + +-- | Project ID of the project that contains the instance to be deleted. +idProject :: Lens' InstancesDelete' Text +idProject + = lens _idProject (\ s a -> s{_idProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +idUserIp :: Lens' InstancesDelete' (Maybe Text) +idUserIp = lens _idUserIp (\ s a -> s{_idUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +idKey :: Lens' InstancesDelete' (Maybe Text) +idKey = lens _idKey (\ s a -> s{_idKey = a}) + +-- | OAuth 2.0 token for the current user. +idOauthToken :: Lens' InstancesDelete' (Maybe Text) +idOauthToken + = lens _idOauthToken (\ s a -> s{_idOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +idFields :: Lens' InstancesDelete' (Maybe Text) +idFields = lens _idFields (\ s a -> s{_idFields = a}) + +-- | Data format for the response. +idAlt :: Lens' InstancesDelete' Text +idAlt = lens _idAlt (\ s a -> s{_idAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +idInstance :: Lens' InstancesDelete' Text +idInstance + = lens _idInstance (\ s a -> s{_idInstance = a}) + +instance GoogleRequest InstancesDelete' where + type Rs InstancesDelete' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesDelete{..} + = go _idQuotaUser _idPrettyPrint _idProject _idUserIp + _idKey + _idOauthToken + _idFields + _idAlt + _idInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesDeleteAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Export.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Export.hs new file mode 100644 index 000000000..a2275471b --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Export.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Export +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Exports data from a Cloud SQL instance to a Google Cloud Storage bucket +-- as a MySQL dump file. +-- +-- /See:/ for @SqlInstancesExport@. +module Sql.Instances.Export + ( + -- * REST Resource + InstancesExportAPI + + -- * Creating a Request + , instancesExport + , InstancesExport + + -- * Request Lenses + , ieQuotaUser + , iePrettyPrint + , ieProject + , ieUserIp + , ieKey + , ieOauthToken + , ieFields + , ieAlt + , ieInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesExport@ which the +-- 'InstancesExport' request conforms to. +type InstancesExportAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "export" :> Post '[JSON] Operation + +-- | Exports data from a Cloud SQL instance to a Google Cloud Storage bucket +-- as a MySQL dump file. +-- +-- /See:/ 'instancesExport' smart constructor. +data InstancesExport = InstancesExport + { _ieQuotaUser :: !(Maybe Text) + , _iePrettyPrint :: !Bool + , _ieProject :: !Text + , _ieUserIp :: !(Maybe Text) + , _ieKey :: !(Maybe Text) + , _ieOauthToken :: !(Maybe Text) + , _ieFields :: !(Maybe Text) + , _ieAlt :: !Text + , _ieInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesExport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ieQuotaUser' +-- +-- * 'iePrettyPrint' +-- +-- * 'ieProject' +-- +-- * 'ieUserIp' +-- +-- * 'ieKey' +-- +-- * 'ieOauthToken' +-- +-- * 'ieFields' +-- +-- * 'ieAlt' +-- +-- * 'ieInstance' +instancesExport + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesExport +instancesExport pIeProject_ pIeInstance_ = + InstancesExport + { _ieQuotaUser = Nothing + , _iePrettyPrint = True + , _ieProject = pIeProject_ + , _ieUserIp = Nothing + , _ieKey = Nothing + , _ieOauthToken = Nothing + , _ieFields = Nothing + , _ieAlt = "json" + , _ieInstance = pIeInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ieQuotaUser :: Lens' InstancesExport' (Maybe Text) +ieQuotaUser + = lens _ieQuotaUser (\ s a -> s{_ieQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iePrettyPrint :: Lens' InstancesExport' Bool +iePrettyPrint + = lens _iePrettyPrint + (\ s a -> s{_iePrettyPrint = a}) + +-- | Project ID of the project that contains the instance to be exported. +ieProject :: Lens' InstancesExport' Text +ieProject + = lens _ieProject (\ s a -> s{_ieProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ieUserIp :: Lens' InstancesExport' (Maybe Text) +ieUserIp = lens _ieUserIp (\ s a -> s{_ieUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ieKey :: Lens' InstancesExport' (Maybe Text) +ieKey = lens _ieKey (\ s a -> s{_ieKey = a}) + +-- | OAuth 2.0 token for the current user. +ieOauthToken :: Lens' InstancesExport' (Maybe Text) +ieOauthToken + = lens _ieOauthToken (\ s a -> s{_ieOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ieFields :: Lens' InstancesExport' (Maybe Text) +ieFields = lens _ieFields (\ s a -> s{_ieFields = a}) + +-- | Data format for the response. +ieAlt :: Lens' InstancesExport' Text +ieAlt = lens _ieAlt (\ s a -> s{_ieAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +ieInstance :: Lens' InstancesExport' Text +ieInstance + = lens _ieInstance (\ s a -> s{_ieInstance = a}) + +instance GoogleRequest InstancesExport' where + type Rs InstancesExport' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesExport{..} + = go _ieQuotaUser _iePrettyPrint _ieProject _ieUserIp + _ieKey + _ieOauthToken + _ieFields + _ieAlt + _ieInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesExportAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Get.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Get.hs new file mode 100644 index 000000000..d35af5ce3 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a resource containing information about a Cloud SQL instance. +-- +-- /See:/ for @SqlInstancesGet@. +module Sql.Instances.Get + ( + -- * REST Resource + InstancesGetAPI + + -- * Creating a Request + , instancesGet + , InstancesGet + + -- * Request Lenses + , igQuotaUser + , igPrettyPrint + , igProject + , igUserIp + , igKey + , igOauthToken + , igFields + , igAlt + , igInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesGet@ which the +-- 'InstancesGet' request conforms to. +type InstancesGetAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + Get '[JSON] DatabaseInstance + +-- | Retrieves a resource containing information about a Cloud SQL instance. +-- +-- /See:/ 'instancesGet' smart constructor. +data InstancesGet = InstancesGet + { _igQuotaUser :: !(Maybe Text) + , _igPrettyPrint :: !Bool + , _igProject :: !Text + , _igUserIp :: !(Maybe Text) + , _igKey :: !(Maybe Text) + , _igOauthToken :: !(Maybe Text) + , _igFields :: !(Maybe Text) + , _igAlt :: !Text + , _igInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'igQuotaUser' +-- +-- * 'igPrettyPrint' +-- +-- * 'igProject' +-- +-- * 'igUserIp' +-- +-- * 'igKey' +-- +-- * 'igOauthToken' +-- +-- * 'igFields' +-- +-- * 'igAlt' +-- +-- * 'igInstance' +instancesGet + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesGet +instancesGet pIgProject_ pIgInstance_ = + InstancesGet + { _igQuotaUser = Nothing + , _igPrettyPrint = True + , _igProject = pIgProject_ + , _igUserIp = Nothing + , _igKey = Nothing + , _igOauthToken = Nothing + , _igFields = Nothing + , _igAlt = "json" + , _igInstance = pIgInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +igQuotaUser :: Lens' InstancesGet' (Maybe Text) +igQuotaUser + = lens _igQuotaUser (\ s a -> s{_igQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +igPrettyPrint :: Lens' InstancesGet' Bool +igPrettyPrint + = lens _igPrettyPrint + (\ s a -> s{_igPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +igProject :: Lens' InstancesGet' Text +igProject + = lens _igProject (\ s a -> s{_igProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +igUserIp :: Lens' InstancesGet' (Maybe Text) +igUserIp = lens _igUserIp (\ s a -> s{_igUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +igKey :: Lens' InstancesGet' (Maybe Text) +igKey = lens _igKey (\ s a -> s{_igKey = a}) + +-- | OAuth 2.0 token for the current user. +igOauthToken :: Lens' InstancesGet' (Maybe Text) +igOauthToken + = lens _igOauthToken (\ s a -> s{_igOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +igFields :: Lens' InstancesGet' (Maybe Text) +igFields = lens _igFields (\ s a -> s{_igFields = a}) + +-- | Data format for the response. +igAlt :: Lens' InstancesGet' Text +igAlt = lens _igAlt (\ s a -> s{_igAlt = a}) + +-- | Database instance ID. This does not include the project ID. +igInstance :: Lens' InstancesGet' Text +igInstance + = lens _igInstance (\ s a -> s{_igInstance = a}) + +instance GoogleRequest InstancesGet' where + type Rs InstancesGet' = DatabaseInstance + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesGet{..} + = go _igQuotaUser _igPrettyPrint _igProject _igUserIp + _igKey + _igOauthToken + _igFields + _igAlt + _igInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesGetAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Import.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Import.hs new file mode 100644 index 000000000..e651f1a3f --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Import.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Import +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Imports data into a Cloud SQL instance from a MySQL dump file in Google +-- Cloud Storage. +-- +-- /See:/ for @SqlInstancesImport@. +module Sql.Instances.Import + ( + -- * REST Resource + InstancesImportAPI + + -- * Creating a Request + , instancesImport + , InstancesImport + + -- * Request Lenses + , iQuotaUser + , iPrettyPrint + , iProject + , iUserIp + , iKey + , iOauthToken + , iFields + , iAlt + , iInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesImport@ which the +-- 'InstancesImport' request conforms to. +type InstancesImportAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "import" :> Post '[JSON] Operation + +-- | Imports data into a Cloud SQL instance from a MySQL dump file in Google +-- Cloud Storage. +-- +-- /See:/ 'instancesImport' smart constructor. +data InstancesImport = InstancesImport + { _iQuotaUser :: !(Maybe Text) + , _iPrettyPrint :: !Bool + , _iProject :: !Text + , _iUserIp :: !(Maybe Text) + , _iKey :: !(Maybe Text) + , _iOauthToken :: !(Maybe Text) + , _iFields :: !(Maybe Text) + , _iAlt :: !Text + , _iInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesImport'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iQuotaUser' +-- +-- * 'iPrettyPrint' +-- +-- * 'iProject' +-- +-- * 'iUserIp' +-- +-- * 'iKey' +-- +-- * 'iOauthToken' +-- +-- * 'iFields' +-- +-- * 'iAlt' +-- +-- * 'iInstance' +instancesImport + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesImport +instancesImport pIProject_ pIInstance_ = + InstancesImport + { _iQuotaUser = Nothing + , _iPrettyPrint = True + , _iProject = pIProject_ + , _iUserIp = Nothing + , _iKey = Nothing + , _iOauthToken = Nothing + , _iFields = Nothing + , _iAlt = "json" + , _iInstance = pIInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iQuotaUser :: Lens' InstancesImport' (Maybe Text) +iQuotaUser + = lens _iQuotaUser (\ s a -> s{_iQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iPrettyPrint :: Lens' InstancesImport' Bool +iPrettyPrint + = lens _iPrettyPrint (\ s a -> s{_iPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +iProject :: Lens' InstancesImport' Text +iProject = lens _iProject (\ s a -> s{_iProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iUserIp :: Lens' InstancesImport' (Maybe Text) +iUserIp = lens _iUserIp (\ s a -> s{_iUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iKey :: Lens' InstancesImport' (Maybe Text) +iKey = lens _iKey (\ s a -> s{_iKey = a}) + +-- | OAuth 2.0 token for the current user. +iOauthToken :: Lens' InstancesImport' (Maybe Text) +iOauthToken + = lens _iOauthToken (\ s a -> s{_iOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iFields :: Lens' InstancesImport' (Maybe Text) +iFields = lens _iFields (\ s a -> s{_iFields = a}) + +-- | Data format for the response. +iAlt :: Lens' InstancesImport' Text +iAlt = lens _iAlt (\ s a -> s{_iAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +iInstance :: Lens' InstancesImport' Text +iInstance + = lens _iInstance (\ s a -> s{_iInstance = a}) + +instance GoogleRequest InstancesImport' where + type Rs InstancesImport' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesImport{..} + = go _iQuotaUser _iPrettyPrint _iProject _iUserIp + _iKey + _iOauthToken + _iFields + _iAlt + _iInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesImportAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Insert.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Insert.hs new file mode 100644 index 000000000..f17deff74 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Insert.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new Cloud SQL instance. +-- +-- /See:/ for @SqlInstancesInsert@. +module Sql.Instances.Insert + ( + -- * REST Resource + InstancesInsertAPI + + -- * Creating a Request + , instancesInsert + , InstancesInsert + + -- * Request Lenses + , iiQuotaUser + , iiPrettyPrint + , iiProject + , iiUserIp + , iiKey + , iiOauthToken + , iiFields + , iiAlt + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesInsert@ which the +-- 'InstancesInsert' request conforms to. +type InstancesInsertAPI = + "projects" :> + Capture "project" Text :> + "instances" :> Post '[JSON] Operation + +-- | Creates a new Cloud SQL instance. +-- +-- /See:/ 'instancesInsert' smart constructor. +data InstancesInsert = InstancesInsert + { _iiQuotaUser :: !(Maybe Text) + , _iiPrettyPrint :: !Bool + , _iiProject :: !Text + , _iiUserIp :: !(Maybe Text) + , _iiKey :: !(Maybe Text) + , _iiOauthToken :: !(Maybe Text) + , _iiFields :: !(Maybe Text) + , _iiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiQuotaUser' +-- +-- * 'iiPrettyPrint' +-- +-- * 'iiProject' +-- +-- * 'iiUserIp' +-- +-- * 'iiKey' +-- +-- * 'iiOauthToken' +-- +-- * 'iiFields' +-- +-- * 'iiAlt' +instancesInsert + :: Text -- ^ 'project' + -> InstancesInsert +instancesInsert pIiProject_ = + InstancesInsert + { _iiQuotaUser = Nothing + , _iiPrettyPrint = True + , _iiProject = pIiProject_ + , _iiUserIp = Nothing + , _iiKey = Nothing + , _iiOauthToken = Nothing + , _iiFields = Nothing + , _iiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iiQuotaUser :: Lens' InstancesInsert' (Maybe Text) +iiQuotaUser + = lens _iiQuotaUser (\ s a -> s{_iiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iiPrettyPrint :: Lens' InstancesInsert' Bool +iiPrettyPrint + = lens _iiPrettyPrint + (\ s a -> s{_iiPrettyPrint = a}) + +-- | Project ID of the project to which the newly created Cloud SQL instances +-- should belong. +iiProject :: Lens' InstancesInsert' Text +iiProject + = lens _iiProject (\ s a -> s{_iiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iiUserIp :: Lens' InstancesInsert' (Maybe Text) +iiUserIp = lens _iiUserIp (\ s a -> s{_iiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iiKey :: Lens' InstancesInsert' (Maybe Text) +iiKey = lens _iiKey (\ s a -> s{_iiKey = a}) + +-- | OAuth 2.0 token for the current user. +iiOauthToken :: Lens' InstancesInsert' (Maybe Text) +iiOauthToken + = lens _iiOauthToken (\ s a -> s{_iiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iiFields :: Lens' InstancesInsert' (Maybe Text) +iiFields = lens _iiFields (\ s a -> s{_iiFields = a}) + +-- | Data format for the response. +iiAlt :: Lens' InstancesInsert' Text +iiAlt = lens _iiAlt (\ s a -> s{_iiAlt = a}) + +instance GoogleRequest InstancesInsert' where + type Rs InstancesInsert' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesInsert{..} + = go _iiQuotaUser _iiPrettyPrint _iiProject _iiUserIp + _iiKey + _iiOauthToken + _iiFields + _iiAlt + where go + = clientWithRoute (Proxy :: Proxy InstancesInsertAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/List.hs new file mode 100644 index 000000000..86bc76c10 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/List.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists instances under a given project in the alphabetical order of the +-- instance name. +-- +-- /See:/ for @SqlInstancesList@. +module Sql.Instances.List + ( + -- * REST Resource + InstancesListAPI + + -- * Creating a Request + , instancesList + , InstancesList + + -- * Request Lenses + , ilQuotaUser + , ilPrettyPrint + , ilProject + , ilUserIp + , ilKey + , ilPageToken + , ilOauthToken + , ilMaxResults + , ilFields + , ilAlt + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesList@ which the +-- 'InstancesList' request conforms to. +type InstancesListAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] InstancesListResponse + +-- | Lists instances under a given project in the alphabetical order of the +-- instance name. +-- +-- /See:/ 'instancesList' smart constructor. +data InstancesList = InstancesList + { _ilQuotaUser :: !(Maybe Text) + , _ilPrettyPrint :: !Bool + , _ilProject :: !Text + , _ilUserIp :: !(Maybe Text) + , _ilKey :: !(Maybe Text) + , _ilPageToken :: !(Maybe Text) + , _ilOauthToken :: !(Maybe Text) + , _ilMaxResults :: !(Maybe Word32) + , _ilFields :: !(Maybe Text) + , _ilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilQuotaUser' +-- +-- * 'ilPrettyPrint' +-- +-- * 'ilProject' +-- +-- * 'ilUserIp' +-- +-- * 'ilKey' +-- +-- * 'ilPageToken' +-- +-- * 'ilOauthToken' +-- +-- * 'ilMaxResults' +-- +-- * 'ilFields' +-- +-- * 'ilAlt' +instancesList + :: Text -- ^ 'project' + -> InstancesList +instancesList pIlProject_ = + InstancesList + { _ilQuotaUser = Nothing + , _ilPrettyPrint = True + , _ilProject = pIlProject_ + , _ilUserIp = Nothing + , _ilKey = Nothing + , _ilPageToken = Nothing + , _ilOauthToken = Nothing + , _ilMaxResults = Nothing + , _ilFields = Nothing + , _ilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ilQuotaUser :: Lens' InstancesList' (Maybe Text) +ilQuotaUser + = lens _ilQuotaUser (\ s a -> s{_ilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ilPrettyPrint :: Lens' InstancesList' Bool +ilPrettyPrint + = lens _ilPrettyPrint + (\ s a -> s{_ilPrettyPrint = a}) + +-- | Project ID of the project for which to list Cloud SQL instances. +ilProject :: Lens' InstancesList' Text +ilProject + = lens _ilProject (\ s a -> s{_ilProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ilUserIp :: Lens' InstancesList' (Maybe Text) +ilUserIp = lens _ilUserIp (\ s a -> s{_ilUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ilKey :: Lens' InstancesList' (Maybe Text) +ilKey = lens _ilKey (\ s a -> s{_ilKey = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +ilPageToken :: Lens' InstancesList' (Maybe Text) +ilPageToken + = lens _ilPageToken (\ s a -> s{_ilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ilOauthToken :: Lens' InstancesList' (Maybe Text) +ilOauthToken + = lens _ilOauthToken (\ s a -> s{_ilOauthToken = a}) + +-- | The maximum number of results to return per response. +ilMaxResults :: Lens' InstancesList' (Maybe Word32) +ilMaxResults + = lens _ilMaxResults (\ s a -> s{_ilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ilFields :: Lens' InstancesList' (Maybe Text) +ilFields = lens _ilFields (\ s a -> s{_ilFields = a}) + +-- | Data format for the response. +ilAlt :: Lens' InstancesList' Text +ilAlt = lens _ilAlt (\ s a -> s{_ilAlt = a}) + +instance GoogleRequest InstancesList' where + type Rs InstancesList' = InstancesListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesList{..} + = go _ilQuotaUser _ilPrettyPrint _ilProject _ilUserIp + _ilKey + _ilPageToken + _ilOauthToken + _ilMaxResults + _ilFields + _ilAlt + where go + = clientWithRoute (Proxy :: Proxy InstancesListAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Patch.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Patch.hs new file mode 100644 index 000000000..2e3894b2d --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Patch.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates settings of a Cloud SQL instance. Caution: This is not a partial +-- update, so you must include values for all the settings that you want to +-- retain. For partial updates, use patch.. This method supports patch +-- semantics. +-- +-- /See:/ for @SqlInstancesPatch@. +module Sql.Instances.Patch + ( + -- * REST Resource + InstancesPatchAPI + + -- * Creating a Request + , instancesPatch + , InstancesPatch + + -- * Request Lenses + , ipQuotaUser + , ipPrettyPrint + , ipProject + , ipUserIp + , ipKey + , ipOauthToken + , ipFields + , ipAlt + , ipInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesPatch@ which the +-- 'InstancesPatch' request conforms to. +type InstancesPatchAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> Patch '[JSON] Operation + +-- | Updates settings of a Cloud SQL instance. Caution: This is not a partial +-- update, so you must include values for all the settings that you want to +-- retain. For partial updates, use patch.. This method supports patch +-- semantics. +-- +-- /See:/ 'instancesPatch' smart constructor. +data InstancesPatch = InstancesPatch + { _ipQuotaUser :: !(Maybe Text) + , _ipPrettyPrint :: !Bool + , _ipProject :: !Text + , _ipUserIp :: !(Maybe Text) + , _ipKey :: !(Maybe Text) + , _ipOauthToken :: !(Maybe Text) + , _ipFields :: !(Maybe Text) + , _ipAlt :: !Text + , _ipInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipQuotaUser' +-- +-- * 'ipPrettyPrint' +-- +-- * 'ipProject' +-- +-- * 'ipUserIp' +-- +-- * 'ipKey' +-- +-- * 'ipOauthToken' +-- +-- * 'ipFields' +-- +-- * 'ipAlt' +-- +-- * 'ipInstance' +instancesPatch + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesPatch +instancesPatch pIpProject_ pIpInstance_ = + InstancesPatch + { _ipQuotaUser = Nothing + , _ipPrettyPrint = True + , _ipProject = pIpProject_ + , _ipUserIp = Nothing + , _ipKey = Nothing + , _ipOauthToken = Nothing + , _ipFields = Nothing + , _ipAlt = "json" + , _ipInstance = pIpInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ipQuotaUser :: Lens' InstancesPatch' (Maybe Text) +ipQuotaUser + = lens _ipQuotaUser (\ s a -> s{_ipQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ipPrettyPrint :: Lens' InstancesPatch' Bool +ipPrettyPrint + = lens _ipPrettyPrint + (\ s a -> s{_ipPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +ipProject :: Lens' InstancesPatch' Text +ipProject + = lens _ipProject (\ s a -> s{_ipProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ipUserIp :: Lens' InstancesPatch' (Maybe Text) +ipUserIp = lens _ipUserIp (\ s a -> s{_ipUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ipKey :: Lens' InstancesPatch' (Maybe Text) +ipKey = lens _ipKey (\ s a -> s{_ipKey = a}) + +-- | OAuth 2.0 token for the current user. +ipOauthToken :: Lens' InstancesPatch' (Maybe Text) +ipOauthToken + = lens _ipOauthToken (\ s a -> s{_ipOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ipFields :: Lens' InstancesPatch' (Maybe Text) +ipFields = lens _ipFields (\ s a -> s{_ipFields = a}) + +-- | Data format for the response. +ipAlt :: Lens' InstancesPatch' Text +ipAlt = lens _ipAlt (\ s a -> s{_ipAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +ipInstance :: Lens' InstancesPatch' Text +ipInstance + = lens _ipInstance (\ s a -> s{_ipInstance = a}) + +instance GoogleRequest InstancesPatch' where + type Rs InstancesPatch' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesPatch{..} + = go _ipQuotaUser _ipPrettyPrint _ipProject _ipUserIp + _ipKey + _ipOauthToken + _ipFields + _ipAlt + _ipInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesPatchAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/PromoteReplica.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/PromoteReplica.hs new file mode 100644 index 000000000..08d41dceb --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/PromoteReplica.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.PromoteReplica +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Promotes the read replica instance to be a stand-alone Cloud SQL +-- instance. +-- +-- /See:/ for @SqlInstancesPromoteReplica@. +module Sql.Instances.PromoteReplica + ( + -- * REST Resource + InstancesPromoteReplicaAPI + + -- * Creating a Request + , instancesPromoteReplica + , InstancesPromoteReplica + + -- * Request Lenses + , iprQuotaUser + , iprPrettyPrint + , iprProject + , iprUserIp + , iprKey + , iprOauthToken + , iprFields + , iprAlt + , iprInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesPromoteReplica@ which the +-- 'InstancesPromoteReplica' request conforms to. +type InstancesPromoteReplicaAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "promoteReplica" :> Post '[JSON] Operation + +-- | Promotes the read replica instance to be a stand-alone Cloud SQL +-- instance. +-- +-- /See:/ 'instancesPromoteReplica' smart constructor. +data InstancesPromoteReplica = InstancesPromoteReplica + { _iprQuotaUser :: !(Maybe Text) + , _iprPrettyPrint :: !Bool + , _iprProject :: !Text + , _iprUserIp :: !(Maybe Text) + , _iprKey :: !(Maybe Text) + , _iprOauthToken :: !(Maybe Text) + , _iprFields :: !(Maybe Text) + , _iprAlt :: !Text + , _iprInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesPromoteReplica'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iprQuotaUser' +-- +-- * 'iprPrettyPrint' +-- +-- * 'iprProject' +-- +-- * 'iprUserIp' +-- +-- * 'iprKey' +-- +-- * 'iprOauthToken' +-- +-- * 'iprFields' +-- +-- * 'iprAlt' +-- +-- * 'iprInstance' +instancesPromoteReplica + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesPromoteReplica +instancesPromoteReplica pIprProject_ pIprInstance_ = + InstancesPromoteReplica + { _iprQuotaUser = Nothing + , _iprPrettyPrint = True + , _iprProject = pIprProject_ + , _iprUserIp = Nothing + , _iprKey = Nothing + , _iprOauthToken = Nothing + , _iprFields = Nothing + , _iprAlt = "json" + , _iprInstance = pIprInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iprQuotaUser :: Lens' InstancesPromoteReplica' (Maybe Text) +iprQuotaUser + = lens _iprQuotaUser (\ s a -> s{_iprQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iprPrettyPrint :: Lens' InstancesPromoteReplica' Bool +iprPrettyPrint + = lens _iprPrettyPrint + (\ s a -> s{_iprPrettyPrint = a}) + +-- | ID of the project that contains the read replica. +iprProject :: Lens' InstancesPromoteReplica' Text +iprProject + = lens _iprProject (\ s a -> s{_iprProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iprUserIp :: Lens' InstancesPromoteReplica' (Maybe Text) +iprUserIp + = lens _iprUserIp (\ s a -> s{_iprUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iprKey :: Lens' InstancesPromoteReplica' (Maybe Text) +iprKey = lens _iprKey (\ s a -> s{_iprKey = a}) + +-- | OAuth 2.0 token for the current user. +iprOauthToken :: Lens' InstancesPromoteReplica' (Maybe Text) +iprOauthToken + = lens _iprOauthToken + (\ s a -> s{_iprOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iprFields :: Lens' InstancesPromoteReplica' (Maybe Text) +iprFields + = lens _iprFields (\ s a -> s{_iprFields = a}) + +-- | Data format for the response. +iprAlt :: Lens' InstancesPromoteReplica' Text +iprAlt = lens _iprAlt (\ s a -> s{_iprAlt = a}) + +-- | Cloud SQL read replica instance name. +iprInstance :: Lens' InstancesPromoteReplica' Text +iprInstance + = lens _iprInstance (\ s a -> s{_iprInstance = a}) + +instance GoogleRequest InstancesPromoteReplica' where + type Rs InstancesPromoteReplica' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesPromoteReplica{..} + = go _iprQuotaUser _iprPrettyPrint _iprProject + _iprUserIp + _iprKey + _iprOauthToken + _iprFields + _iprAlt + _iprInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesPromoteReplicaAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/ResetSSLConfig.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/ResetSSLConfig.hs new file mode 100644 index 000000000..95371f407 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/ResetSSLConfig.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.ResetSSLConfig +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes all client certificates and generates a new server SSL +-- certificate for the instance. The changes will not take effect until the +-- instance is restarted. Existing instances without a server certificate +-- will need to call this once to set a server certificate. +-- +-- /See:/ for @SqlInstancesResetSSLConfig@. +module Sql.Instances.ResetSSLConfig + ( + -- * REST Resource + InstancesResetSSLConfigAPI + + -- * Creating a Request + , instancesResetSSLConfig + , InstancesResetSSLConfig + + -- * Request Lenses + , irscQuotaUser + , irscPrettyPrint + , irscProject + , irscUserIp + , irscKey + , irscOauthToken + , irscFields + , irscAlt + , irscInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesResetSSLConfig@ which the +-- 'InstancesResetSSLConfig' request conforms to. +type InstancesResetSSLConfigAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "resetSslConfig" :> Post '[JSON] Operation + +-- | Deletes all client certificates and generates a new server SSL +-- certificate for the instance. The changes will not take effect until the +-- instance is restarted. Existing instances without a server certificate +-- will need to call this once to set a server certificate. +-- +-- /See:/ 'instancesResetSSLConfig' smart constructor. +data InstancesResetSSLConfig = InstancesResetSSLConfig + { _irscQuotaUser :: !(Maybe Text) + , _irscPrettyPrint :: !Bool + , _irscProject :: !Text + , _irscUserIp :: !(Maybe Text) + , _irscKey :: !(Maybe Text) + , _irscOauthToken :: !(Maybe Text) + , _irscFields :: !(Maybe Text) + , _irscAlt :: !Text + , _irscInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesResetSSLConfig'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irscQuotaUser' +-- +-- * 'irscPrettyPrint' +-- +-- * 'irscProject' +-- +-- * 'irscUserIp' +-- +-- * 'irscKey' +-- +-- * 'irscOauthToken' +-- +-- * 'irscFields' +-- +-- * 'irscAlt' +-- +-- * 'irscInstance' +instancesResetSSLConfig + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesResetSSLConfig +instancesResetSSLConfig pIrscProject_ pIrscInstance_ = + InstancesResetSSLConfig + { _irscQuotaUser = Nothing + , _irscPrettyPrint = True + , _irscProject = pIrscProject_ + , _irscUserIp = Nothing + , _irscKey = Nothing + , _irscOauthToken = Nothing + , _irscFields = Nothing + , _irscAlt = "json" + , _irscInstance = pIrscInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +irscQuotaUser :: Lens' InstancesResetSSLConfig' (Maybe Text) +irscQuotaUser + = lens _irscQuotaUser + (\ s a -> s{_irscQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +irscPrettyPrint :: Lens' InstancesResetSSLConfig' Bool +irscPrettyPrint + = lens _irscPrettyPrint + (\ s a -> s{_irscPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +irscProject :: Lens' InstancesResetSSLConfig' Text +irscProject + = lens _irscProject (\ s a -> s{_irscProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +irscUserIp :: Lens' InstancesResetSSLConfig' (Maybe Text) +irscUserIp + = lens _irscUserIp (\ s a -> s{_irscUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +irscKey :: Lens' InstancesResetSSLConfig' (Maybe Text) +irscKey = lens _irscKey (\ s a -> s{_irscKey = a}) + +-- | OAuth 2.0 token for the current user. +irscOauthToken :: Lens' InstancesResetSSLConfig' (Maybe Text) +irscOauthToken + = lens _irscOauthToken + (\ s a -> s{_irscOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +irscFields :: Lens' InstancesResetSSLConfig' (Maybe Text) +irscFields + = lens _irscFields (\ s a -> s{_irscFields = a}) + +-- | Data format for the response. +irscAlt :: Lens' InstancesResetSSLConfig' Text +irscAlt = lens _irscAlt (\ s a -> s{_irscAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +irscInstance :: Lens' InstancesResetSSLConfig' Text +irscInstance + = lens _irscInstance (\ s a -> s{_irscInstance = a}) + +instance GoogleRequest InstancesResetSSLConfig' where + type Rs InstancesResetSSLConfig' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesResetSSLConfig{..} + = go _irscQuotaUser _irscPrettyPrint _irscProject + _irscUserIp + _irscKey + _irscOauthToken + _irscFields + _irscAlt + _irscInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesResetSSLConfigAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Restart.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Restart.hs new file mode 100644 index 000000000..0e2bde305 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Restart.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Restart +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Restarts a Cloud SQL instance. +-- +-- /See:/ for @SqlInstancesRestart@. +module Sql.Instances.Restart + ( + -- * REST Resource + InstancesRestartAPI + + -- * Creating a Request + , instancesRestart + , InstancesRestart + + -- * Request Lenses + , irQuotaUser + , irPrettyPrint + , irProject + , irUserIp + , irKey + , irOauthToken + , irFields + , irAlt + , irInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesRestart@ which the +-- 'InstancesRestart' request conforms to. +type InstancesRestartAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "restart" :> Post '[JSON] Operation + +-- | Restarts a Cloud SQL instance. +-- +-- /See:/ 'instancesRestart' smart constructor. +data InstancesRestart = InstancesRestart + { _irQuotaUser :: !(Maybe Text) + , _irPrettyPrint :: !Bool + , _irProject :: !Text + , _irUserIp :: !(Maybe Text) + , _irKey :: !(Maybe Text) + , _irOauthToken :: !(Maybe Text) + , _irFields :: !(Maybe Text) + , _irAlt :: !Text + , _irInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesRestart'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irQuotaUser' +-- +-- * 'irPrettyPrint' +-- +-- * 'irProject' +-- +-- * 'irUserIp' +-- +-- * 'irKey' +-- +-- * 'irOauthToken' +-- +-- * 'irFields' +-- +-- * 'irAlt' +-- +-- * 'irInstance' +instancesRestart + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesRestart +instancesRestart pIrProject_ pIrInstance_ = + InstancesRestart + { _irQuotaUser = Nothing + , _irPrettyPrint = True + , _irProject = pIrProject_ + , _irUserIp = Nothing + , _irKey = Nothing + , _irOauthToken = Nothing + , _irFields = Nothing + , _irAlt = "json" + , _irInstance = pIrInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +irQuotaUser :: Lens' InstancesRestart' (Maybe Text) +irQuotaUser + = lens _irQuotaUser (\ s a -> s{_irQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +irPrettyPrint :: Lens' InstancesRestart' Bool +irPrettyPrint + = lens _irPrettyPrint + (\ s a -> s{_irPrettyPrint = a}) + +-- | Project ID of the project that contains the instance to be restarted. +irProject :: Lens' InstancesRestart' Text +irProject + = lens _irProject (\ s a -> s{_irProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +irUserIp :: Lens' InstancesRestart' (Maybe Text) +irUserIp = lens _irUserIp (\ s a -> s{_irUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +irKey :: Lens' InstancesRestart' (Maybe Text) +irKey = lens _irKey (\ s a -> s{_irKey = a}) + +-- | OAuth 2.0 token for the current user. +irOauthToken :: Lens' InstancesRestart' (Maybe Text) +irOauthToken + = lens _irOauthToken (\ s a -> s{_irOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +irFields :: Lens' InstancesRestart' (Maybe Text) +irFields = lens _irFields (\ s a -> s{_irFields = a}) + +-- | Data format for the response. +irAlt :: Lens' InstancesRestart' Text +irAlt = lens _irAlt (\ s a -> s{_irAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +irInstance :: Lens' InstancesRestart' Text +irInstance + = lens _irInstance (\ s a -> s{_irInstance = a}) + +instance GoogleRequest InstancesRestart' where + type Rs InstancesRestart' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesRestart{..} + = go _irQuotaUser _irPrettyPrint _irProject _irUserIp + _irKey + _irOauthToken + _irFields + _irAlt + _irInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesRestartAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/RestoreBackup.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/RestoreBackup.hs new file mode 100644 index 000000000..c4ac61e01 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/RestoreBackup.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.RestoreBackup +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Restores a backup of a Cloud SQL instance. +-- +-- /See:/ for @SqlInstancesRestoreBackup@. +module Sql.Instances.RestoreBackup + ( + -- * REST Resource + InstancesRestoreBackupAPI + + -- * Creating a Request + , instancesRestoreBackup + , InstancesRestoreBackup + + -- * Request Lenses + , irbQuotaUser + , irbPrettyPrint + , irbProject + , irbUserIp + , irbKey + , irbOauthToken + , irbFields + , irbAlt + , irbInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesRestoreBackup@ which the +-- 'InstancesRestoreBackup' request conforms to. +type InstancesRestoreBackupAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "restoreBackup" :> Post '[JSON] Operation + +-- | Restores a backup of a Cloud SQL instance. +-- +-- /See:/ 'instancesRestoreBackup' smart constructor. +data InstancesRestoreBackup = InstancesRestoreBackup + { _irbQuotaUser :: !(Maybe Text) + , _irbPrettyPrint :: !Bool + , _irbProject :: !Text + , _irbUserIp :: !(Maybe Text) + , _irbKey :: !(Maybe Text) + , _irbOauthToken :: !(Maybe Text) + , _irbFields :: !(Maybe Text) + , _irbAlt :: !Text + , _irbInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesRestoreBackup'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irbQuotaUser' +-- +-- * 'irbPrettyPrint' +-- +-- * 'irbProject' +-- +-- * 'irbUserIp' +-- +-- * 'irbKey' +-- +-- * 'irbOauthToken' +-- +-- * 'irbFields' +-- +-- * 'irbAlt' +-- +-- * 'irbInstance' +instancesRestoreBackup + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesRestoreBackup +instancesRestoreBackup pIrbProject_ pIrbInstance_ = + InstancesRestoreBackup + { _irbQuotaUser = Nothing + , _irbPrettyPrint = True + , _irbProject = pIrbProject_ + , _irbUserIp = Nothing + , _irbKey = Nothing + , _irbOauthToken = Nothing + , _irbFields = Nothing + , _irbAlt = "json" + , _irbInstance = pIrbInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +irbQuotaUser :: Lens' InstancesRestoreBackup' (Maybe Text) +irbQuotaUser + = lens _irbQuotaUser (\ s a -> s{_irbQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +irbPrettyPrint :: Lens' InstancesRestoreBackup' Bool +irbPrettyPrint + = lens _irbPrettyPrint + (\ s a -> s{_irbPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +irbProject :: Lens' InstancesRestoreBackup' Text +irbProject + = lens _irbProject (\ s a -> s{_irbProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +irbUserIp :: Lens' InstancesRestoreBackup' (Maybe Text) +irbUserIp + = lens _irbUserIp (\ s a -> s{_irbUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +irbKey :: Lens' InstancesRestoreBackup' (Maybe Text) +irbKey = lens _irbKey (\ s a -> s{_irbKey = a}) + +-- | OAuth 2.0 token for the current user. +irbOauthToken :: Lens' InstancesRestoreBackup' (Maybe Text) +irbOauthToken + = lens _irbOauthToken + (\ s a -> s{_irbOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +irbFields :: Lens' InstancesRestoreBackup' (Maybe Text) +irbFields + = lens _irbFields (\ s a -> s{_irbFields = a}) + +-- | Data format for the response. +irbAlt :: Lens' InstancesRestoreBackup' Text +irbAlt = lens _irbAlt (\ s a -> s{_irbAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +irbInstance :: Lens' InstancesRestoreBackup' Text +irbInstance + = lens _irbInstance (\ s a -> s{_irbInstance = a}) + +instance GoogleRequest InstancesRestoreBackup' where + type Rs InstancesRestoreBackup' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesRestoreBackup{..} + = go _irbQuotaUser _irbPrettyPrint _irbProject + _irbUserIp + _irbKey + _irbOauthToken + _irbFields + _irbAlt + _irbInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesRestoreBackupAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StartReplica.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StartReplica.hs new file mode 100644 index 000000000..d71b26d80 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StartReplica.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.StartReplica +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Starts the replication in the read replica instance. +-- +-- /See:/ for @SqlInstancesStartReplica@. +module Sql.Instances.StartReplica + ( + -- * REST Resource + InstancesStartReplicaAPI + + -- * Creating a Request + , instancesStartReplica + , InstancesStartReplica + + -- * Request Lenses + , isrQuotaUser + , isrPrettyPrint + , isrProject + , isrUserIp + , isrKey + , isrOauthToken + , isrFields + , isrAlt + , isrInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesStartReplica@ which the +-- 'InstancesStartReplica' request conforms to. +type InstancesStartReplicaAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "startReplica" :> Post '[JSON] Operation + +-- | Starts the replication in the read replica instance. +-- +-- /See:/ 'instancesStartReplica' smart constructor. +data InstancesStartReplica = InstancesStartReplica + { _isrQuotaUser :: !(Maybe Text) + , _isrPrettyPrint :: !Bool + , _isrProject :: !Text + , _isrUserIp :: !(Maybe Text) + , _isrKey :: !(Maybe Text) + , _isrOauthToken :: !(Maybe Text) + , _isrFields :: !(Maybe Text) + , _isrAlt :: !Text + , _isrInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesStartReplica'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isrQuotaUser' +-- +-- * 'isrPrettyPrint' +-- +-- * 'isrProject' +-- +-- * 'isrUserIp' +-- +-- * 'isrKey' +-- +-- * 'isrOauthToken' +-- +-- * 'isrFields' +-- +-- * 'isrAlt' +-- +-- * 'isrInstance' +instancesStartReplica + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesStartReplica +instancesStartReplica pIsrProject_ pIsrInstance_ = + InstancesStartReplica + { _isrQuotaUser = Nothing + , _isrPrettyPrint = True + , _isrProject = pIsrProject_ + , _isrUserIp = Nothing + , _isrKey = Nothing + , _isrOauthToken = Nothing + , _isrFields = Nothing + , _isrAlt = "json" + , _isrInstance = pIsrInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +isrQuotaUser :: Lens' InstancesStartReplica' (Maybe Text) +isrQuotaUser + = lens _isrQuotaUser (\ s a -> s{_isrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +isrPrettyPrint :: Lens' InstancesStartReplica' Bool +isrPrettyPrint + = lens _isrPrettyPrint + (\ s a -> s{_isrPrettyPrint = a}) + +-- | ID of the project that contains the read replica. +isrProject :: Lens' InstancesStartReplica' Text +isrProject + = lens _isrProject (\ s a -> s{_isrProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +isrUserIp :: Lens' InstancesStartReplica' (Maybe Text) +isrUserIp + = lens _isrUserIp (\ s a -> s{_isrUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +isrKey :: Lens' InstancesStartReplica' (Maybe Text) +isrKey = lens _isrKey (\ s a -> s{_isrKey = a}) + +-- | OAuth 2.0 token for the current user. +isrOauthToken :: Lens' InstancesStartReplica' (Maybe Text) +isrOauthToken + = lens _isrOauthToken + (\ s a -> s{_isrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +isrFields :: Lens' InstancesStartReplica' (Maybe Text) +isrFields + = lens _isrFields (\ s a -> s{_isrFields = a}) + +-- | Data format for the response. +isrAlt :: Lens' InstancesStartReplica' Text +isrAlt = lens _isrAlt (\ s a -> s{_isrAlt = a}) + +-- | Cloud SQL read replica instance name. +isrInstance :: Lens' InstancesStartReplica' Text +isrInstance + = lens _isrInstance (\ s a -> s{_isrInstance = a}) + +instance GoogleRequest InstancesStartReplica' where + type Rs InstancesStartReplica' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesStartReplica{..} + = go _isrQuotaUser _isrPrettyPrint _isrProject + _isrUserIp + _isrKey + _isrOauthToken + _isrFields + _isrAlt + _isrInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesStartReplicaAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StopReplica.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StopReplica.hs new file mode 100644 index 000000000..a52888bfe --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/StopReplica.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.StopReplica +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stops the replication in the read replica instance. +-- +-- /See:/ for @SqlInstancesStopReplica@. +module Sql.Instances.StopReplica + ( + -- * REST Resource + InstancesStopReplicaAPI + + -- * Creating a Request + , instancesStopReplica + , InstancesStopReplica + + -- * Request Lenses + , insQuotaUser + , insPrettyPrint + , insProject + , insUserIp + , insKey + , insOauthToken + , insFields + , insAlt + , insInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesStopReplica@ which the +-- 'InstancesStopReplica' request conforms to. +type InstancesStopReplicaAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "stopReplica" :> Post '[JSON] Operation + +-- | Stops the replication in the read replica instance. +-- +-- /See:/ 'instancesStopReplica' smart constructor. +data InstancesStopReplica = InstancesStopReplica + { _insQuotaUser :: !(Maybe Text) + , _insPrettyPrint :: !Bool + , _insProject :: !Text + , _insUserIp :: !(Maybe Text) + , _insKey :: !(Maybe Text) + , _insOauthToken :: !(Maybe Text) + , _insFields :: !(Maybe Text) + , _insAlt :: !Text + , _insInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesStopReplica'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'insQuotaUser' +-- +-- * 'insPrettyPrint' +-- +-- * 'insProject' +-- +-- * 'insUserIp' +-- +-- * 'insKey' +-- +-- * 'insOauthToken' +-- +-- * 'insFields' +-- +-- * 'insAlt' +-- +-- * 'insInstance' +instancesStopReplica + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesStopReplica +instancesStopReplica pInsProject_ pInsInstance_ = + InstancesStopReplica + { _insQuotaUser = Nothing + , _insPrettyPrint = True + , _insProject = pInsProject_ + , _insUserIp = Nothing + , _insKey = Nothing + , _insOauthToken = Nothing + , _insFields = Nothing + , _insAlt = "json" + , _insInstance = pInsInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +insQuotaUser :: Lens' InstancesStopReplica' (Maybe Text) +insQuotaUser + = lens _insQuotaUser (\ s a -> s{_insQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +insPrettyPrint :: Lens' InstancesStopReplica' Bool +insPrettyPrint + = lens _insPrettyPrint + (\ s a -> s{_insPrettyPrint = a}) + +-- | ID of the project that contains the read replica. +insProject :: Lens' InstancesStopReplica' Text +insProject + = lens _insProject (\ s a -> s{_insProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +insUserIp :: Lens' InstancesStopReplica' (Maybe Text) +insUserIp + = lens _insUserIp (\ s a -> s{_insUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +insKey :: Lens' InstancesStopReplica' (Maybe Text) +insKey = lens _insKey (\ s a -> s{_insKey = a}) + +-- | OAuth 2.0 token for the current user. +insOauthToken :: Lens' InstancesStopReplica' (Maybe Text) +insOauthToken + = lens _insOauthToken + (\ s a -> s{_insOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +insFields :: Lens' InstancesStopReplica' (Maybe Text) +insFields + = lens _insFields (\ s a -> s{_insFields = a}) + +-- | Data format for the response. +insAlt :: Lens' InstancesStopReplica' Text +insAlt = lens _insAlt (\ s a -> s{_insAlt = a}) + +-- | Cloud SQL read replica instance name. +insInstance :: Lens' InstancesStopReplica' Text +insInstance + = lens _insInstance (\ s a -> s{_insInstance = a}) + +instance GoogleRequest InstancesStopReplica' where + type Rs InstancesStopReplica' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesStopReplica{..} + = go _insQuotaUser _insPrettyPrint _insProject + _insUserIp + _insKey + _insOauthToken + _insFields + _insAlt + _insInstance + where go + = clientWithRoute + (Proxy :: Proxy InstancesStopReplicaAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Update.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Update.hs new file mode 100644 index 000000000..ea71e4e7d --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Instances/Update.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Instances.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates settings of a Cloud SQL instance. Caution: This is not a partial +-- update, so you must include values for all the settings that you want to +-- retain. For partial updates, use patch. +-- +-- /See:/ for @SqlInstancesUpdate@. +module Sql.Instances.Update + ( + -- * REST Resource + InstancesUpdateAPI + + -- * Creating a Request + , instancesUpdate + , InstancesUpdate + + -- * Request Lenses + , iuQuotaUser + , iuPrettyPrint + , iuProject + , iuUserIp + , iuKey + , iuOauthToken + , iuFields + , iuAlt + , iuInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlInstancesUpdate@ which the +-- 'InstancesUpdate' request conforms to. +type InstancesUpdateAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> Put '[JSON] Operation + +-- | Updates settings of a Cloud SQL instance. Caution: This is not a partial +-- update, so you must include values for all the settings that you want to +-- retain. For partial updates, use patch. +-- +-- /See:/ 'instancesUpdate' smart constructor. +data InstancesUpdate = InstancesUpdate + { _iuQuotaUser :: !(Maybe Text) + , _iuPrettyPrint :: !Bool + , _iuProject :: !Text + , _iuUserIp :: !(Maybe Text) + , _iuKey :: !(Maybe Text) + , _iuOauthToken :: !(Maybe Text) + , _iuFields :: !(Maybe Text) + , _iuAlt :: !Text + , _iuInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iuQuotaUser' +-- +-- * 'iuPrettyPrint' +-- +-- * 'iuProject' +-- +-- * 'iuUserIp' +-- +-- * 'iuKey' +-- +-- * 'iuOauthToken' +-- +-- * 'iuFields' +-- +-- * 'iuAlt' +-- +-- * 'iuInstance' +instancesUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> InstancesUpdate +instancesUpdate pIuProject_ pIuInstance_ = + InstancesUpdate + { _iuQuotaUser = Nothing + , _iuPrettyPrint = True + , _iuProject = pIuProject_ + , _iuUserIp = Nothing + , _iuKey = Nothing + , _iuOauthToken = Nothing + , _iuFields = Nothing + , _iuAlt = "json" + , _iuInstance = pIuInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +iuQuotaUser :: Lens' InstancesUpdate' (Maybe Text) +iuQuotaUser + = lens _iuQuotaUser (\ s a -> s{_iuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +iuPrettyPrint :: Lens' InstancesUpdate' Bool +iuPrettyPrint + = lens _iuPrettyPrint + (\ s a -> s{_iuPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +iuProject :: Lens' InstancesUpdate' Text +iuProject + = lens _iuProject (\ s a -> s{_iuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +iuUserIp :: Lens' InstancesUpdate' (Maybe Text) +iuUserIp = lens _iuUserIp (\ s a -> s{_iuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +iuKey :: Lens' InstancesUpdate' (Maybe Text) +iuKey = lens _iuKey (\ s a -> s{_iuKey = a}) + +-- | OAuth 2.0 token for the current user. +iuOauthToken :: Lens' InstancesUpdate' (Maybe Text) +iuOauthToken + = lens _iuOauthToken (\ s a -> s{_iuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +iuFields :: Lens' InstancesUpdate' (Maybe Text) +iuFields = lens _iuFields (\ s a -> s{_iuFields = a}) + +-- | Data format for the response. +iuAlt :: Lens' InstancesUpdate' Text +iuAlt = lens _iuAlt (\ s a -> s{_iuAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +iuInstance :: Lens' InstancesUpdate' Text +iuInstance + = lens _iuInstance (\ s a -> s{_iuInstance = a}) + +instance GoogleRequest InstancesUpdate' where + type Rs InstancesUpdate' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u InstancesUpdate{..} + = go _iuQuotaUser _iuPrettyPrint _iuProject _iuUserIp + _iuKey + _iuOauthToken + _iuFields + _iuAlt + _iuInstance + where go + = clientWithRoute (Proxy :: Proxy InstancesUpdateAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/Get.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/Get.hs new file mode 100644 index 000000000..c4da93f80 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/Get.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Operations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves an instance operation that has been performed on an instance. +-- +-- /See:/ for @SqlOperationsGet@. +module Sql.Operations.Get + ( + -- * REST Resource + OperationsGetAPI + + -- * Creating a Request + , operationsGet + , OperationsGet + + -- * Request Lenses + , ogQuotaUser + , ogPrettyPrint + , ogProject + , ogOperation + , ogUserIp + , ogKey + , ogOauthToken + , ogFields + , ogAlt + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlOperationsGet@ which the +-- 'OperationsGet' request conforms to. +type OperationsGetAPI = + "projects" :> + Capture "project" Text :> + "operations" :> + Capture "operation" Text :> Get '[JSON] Operation + +-- | Retrieves an instance operation that has been performed on an instance. +-- +-- /See:/ 'operationsGet' smart constructor. +data OperationsGet = OperationsGet + { _ogQuotaUser :: !(Maybe Text) + , _ogPrettyPrint :: !Bool + , _ogProject :: !Text + , _ogOperation :: !Text + , _ogUserIp :: !(Maybe Text) + , _ogKey :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogProject' +-- +-- * 'ogOperation' +-- +-- * 'ogUserIp' +-- +-- * 'ogKey' +-- +-- * 'ogOauthToken' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +operationsGet + :: Text -- ^ 'project' + -> Text -- ^ 'operation' + -> OperationsGet +operationsGet pOgProject_ pOgOperation_ = + OperationsGet + { _ogQuotaUser = Nothing + , _ogPrettyPrint = True + , _ogProject = pOgProject_ + , _ogOperation = pOgOperation_ + , _ogUserIp = Nothing + , _ogKey = Nothing + , _ogOauthToken = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' OperationsGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' OperationsGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +ogProject :: Lens' OperationsGet' Text +ogProject + = lens _ogProject (\ s a -> s{_ogProject = a}) + +-- | Instance operation ID. +ogOperation :: Lens' OperationsGet' Text +ogOperation + = lens _ogOperation (\ s a -> s{_ogOperation = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' OperationsGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' OperationsGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' OperationsGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' OperationsGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' OperationsGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest OperationsGet' where + type Rs OperationsGet' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u OperationsGet{..} + = go _ogQuotaUser _ogPrettyPrint _ogProject + _ogOperation + _ogUserIp + _ogKey + _ogOauthToken + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy OperationsGetAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/List.hs new file mode 100644 index 000000000..aaa1c81e7 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Operations/List.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Operations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all instance operations that have been performed on the given +-- Cloud SQL instance in the reverse chronological order of the start time. +-- +-- /See:/ for @SqlOperationsList@. +module Sql.Operations.List + ( + -- * REST Resource + OperationsListAPI + + -- * Creating a Request + , operationsList + , OperationsList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olProject + , olUserIp + , olKey + , olPageToken + , olOauthToken + , olMaxResults + , olFields + , olAlt + , olInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlOperationsList@ which the +-- 'OperationsList' request conforms to. +type OperationsListAPI = + "projects" :> + Capture "project" Text :> + "operations" :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "instance" Text :> + Get '[JSON] OperationsListResponse + +-- | Lists all instance operations that have been performed on the given +-- Cloud SQL instance in the reverse chronological order of the start time. +-- +-- /See:/ 'operationsList' smart constructor. +data OperationsList = OperationsList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olProject :: !Text + , _olUserIp :: !(Maybe Text) + , _olKey :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olMaxResults :: !(Maybe Word32) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + , _olInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olProject' +-- +-- * 'olUserIp' +-- +-- * 'olKey' +-- +-- * 'olPageToken' +-- +-- * 'olOauthToken' +-- +-- * 'olMaxResults' +-- +-- * 'olFields' +-- +-- * 'olAlt' +-- +-- * 'olInstance' +operationsList + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> OperationsList +operationsList pOlProject_ pOlInstance_ = + OperationsList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olProject = pOlProject_ + , _olUserIp = Nothing + , _olKey = Nothing + , _olPageToken = Nothing + , _olOauthToken = Nothing + , _olMaxResults = Nothing + , _olFields = Nothing + , _olAlt = "json" + , _olInstance = pOlInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' OperationsList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' OperationsList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +olProject :: Lens' OperationsList' Text +olProject + = lens _olProject (\ s a -> s{_olProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' OperationsList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' OperationsList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +olPageToken :: Lens' OperationsList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' OperationsList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Maximum number of operations per response. +olMaxResults :: Lens' OperationsList' (Maybe Word32) +olMaxResults + = lens _olMaxResults (\ s a -> s{_olMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' OperationsList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' OperationsList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +olInstance :: Lens' OperationsList' Text +olInstance + = lens _olInstance (\ s a -> s{_olInstance = a}) + +instance GoogleRequest OperationsList' where + type Rs OperationsList' = OperationsListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u OperationsList{..} + = go _olQuotaUser _olPrettyPrint _olProject _olUserIp + _olKey + _olPageToken + _olOauthToken + _olMaxResults + _olFields + _olAlt + (Just _olInstance) + where go + = clientWithRoute (Proxy :: Proxy OperationsListAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/CreateEphemeral.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/CreateEphemeral.hs new file mode 100644 index 000000000..3db294a27 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/CreateEphemeral.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.SSLCerts.CreateEphemeral +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Generates a short-lived X509 certificate containing the provided public +-- key and signed by a private key specific to the target instance. Users +-- may use the certificate to authenticate as themselves when connecting to +-- the database. +-- +-- /See:/ for @SqlSSLCertsCreateEphemeral@. +module Sql.SSLCerts.CreateEphemeral + ( + -- * REST Resource + SslCertsCreateEphemeralAPI + + -- * Creating a Request + , sSLCertsCreateEphemeral + , SSLCertsCreateEphemeral + + -- * Request Lenses + , scceQuotaUser + , sccePrettyPrint + , scceProject + , scceUserIp + , scceKey + , scceOauthToken + , scceFields + , scceAlt + , scceInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlSSLCertsCreateEphemeral@ which the +-- 'SSLCertsCreateEphemeral' request conforms to. +type SslCertsCreateEphemeralAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "createEphemeral" :> Post '[JSON] SSLCert + +-- | Generates a short-lived X509 certificate containing the provided public +-- key and signed by a private key specific to the target instance. Users +-- may use the certificate to authenticate as themselves when connecting to +-- the database. +-- +-- /See:/ 'sSLCertsCreateEphemeral' smart constructor. +data SSLCertsCreateEphemeral = SSLCertsCreateEphemeral + { _scceQuotaUser :: !(Maybe Text) + , _sccePrettyPrint :: !Bool + , _scceProject :: !Text + , _scceUserIp :: !(Maybe Text) + , _scceKey :: !(Maybe Text) + , _scceOauthToken :: !(Maybe Text) + , _scceFields :: !(Maybe Text) + , _scceAlt :: !Text + , _scceInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsCreateEphemeral'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scceQuotaUser' +-- +-- * 'sccePrettyPrint' +-- +-- * 'scceProject' +-- +-- * 'scceUserIp' +-- +-- * 'scceKey' +-- +-- * 'scceOauthToken' +-- +-- * 'scceFields' +-- +-- * 'scceAlt' +-- +-- * 'scceInstance' +sSLCertsCreateEphemeral + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> SSLCertsCreateEphemeral +sSLCertsCreateEphemeral pScceProject_ pScceInstance_ = + SSLCertsCreateEphemeral + { _scceQuotaUser = Nothing + , _sccePrettyPrint = True + , _scceProject = pScceProject_ + , _scceUserIp = Nothing + , _scceKey = Nothing + , _scceOauthToken = Nothing + , _scceFields = Nothing + , _scceAlt = "json" + , _scceInstance = pScceInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scceQuotaUser :: Lens' SSLCertsCreateEphemeral' (Maybe Text) +scceQuotaUser + = lens _scceQuotaUser + (\ s a -> s{_scceQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sccePrettyPrint :: Lens' SSLCertsCreateEphemeral' Bool +sccePrettyPrint + = lens _sccePrettyPrint + (\ s a -> s{_sccePrettyPrint = a}) + +-- | Project ID of the Cloud SQL project. +scceProject :: Lens' SSLCertsCreateEphemeral' Text +scceProject + = lens _scceProject (\ s a -> s{_scceProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scceUserIp :: Lens' SSLCertsCreateEphemeral' (Maybe Text) +scceUserIp + = lens _scceUserIp (\ s a -> s{_scceUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scceKey :: Lens' SSLCertsCreateEphemeral' (Maybe Text) +scceKey = lens _scceKey (\ s a -> s{_scceKey = a}) + +-- | OAuth 2.0 token for the current user. +scceOauthToken :: Lens' SSLCertsCreateEphemeral' (Maybe Text) +scceOauthToken + = lens _scceOauthToken + (\ s a -> s{_scceOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +scceFields :: Lens' SSLCertsCreateEphemeral' (Maybe Text) +scceFields + = lens _scceFields (\ s a -> s{_scceFields = a}) + +-- | Data format for the response. +scceAlt :: Lens' SSLCertsCreateEphemeral' Text +scceAlt = lens _scceAlt (\ s a -> s{_scceAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +scceInstance :: Lens' SSLCertsCreateEphemeral' Text +scceInstance + = lens _scceInstance (\ s a -> s{_scceInstance = a}) + +instance GoogleRequest SSLCertsCreateEphemeral' where + type Rs SSLCertsCreateEphemeral' = SSLCert + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u SSLCertsCreateEphemeral{..} + = go _scceQuotaUser _sccePrettyPrint _scceProject + _scceUserIp + _scceKey + _scceOauthToken + _scceFields + _scceAlt + _scceInstance + where go + = clientWithRoute + (Proxy :: Proxy SslCertsCreateEphemeralAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Delete.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Delete.hs new file mode 100644 index 000000000..22c040d56 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Delete.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.SSLCerts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes the SSL certificate. The change will not take effect until the +-- instance is restarted. +-- +-- /See:/ for @SqlSSLCertsDelete@. +module Sql.SSLCerts.Delete + ( + -- * REST Resource + SslCertsDeleteAPI + + -- * Creating a Request + , sSLCertsDelete + , SSLCertsDelete + + -- * Request Lenses + , scdQuotaUser + , scdPrettyPrint + , scdProject + , scdUserIp + , scdKey + , scdOauthToken + , scdSha1Fingerprint + , scdFields + , scdAlt + , scdInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlSSLCertsDelete@ which the +-- 'SSLCertsDelete' request conforms to. +type SslCertsDeleteAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "sslCerts" :> + Capture "sha1Fingerprint" Text :> + Delete '[JSON] Operation + +-- | Deletes the SSL certificate. The change will not take effect until the +-- instance is restarted. +-- +-- /See:/ 'sSLCertsDelete' smart constructor. +data SSLCertsDelete = SSLCertsDelete + { _scdQuotaUser :: !(Maybe Text) + , _scdPrettyPrint :: !Bool + , _scdProject :: !Text + , _scdUserIp :: !(Maybe Text) + , _scdKey :: !(Maybe Text) + , _scdOauthToken :: !(Maybe Text) + , _scdSha1Fingerprint :: !Text + , _scdFields :: !(Maybe Text) + , _scdAlt :: !Text + , _scdInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scdQuotaUser' +-- +-- * 'scdPrettyPrint' +-- +-- * 'scdProject' +-- +-- * 'scdUserIp' +-- +-- * 'scdKey' +-- +-- * 'scdOauthToken' +-- +-- * 'scdSha1Fingerprint' +-- +-- * 'scdFields' +-- +-- * 'scdAlt' +-- +-- * 'scdInstance' +sSLCertsDelete + :: Text -- ^ 'project' + -> Text -- ^ 'sha1Fingerprint' + -> Text -- ^ 'instance' + -> SSLCertsDelete +sSLCertsDelete pScdProject_ pScdSha1Fingerprint_ pScdInstance_ = + SSLCertsDelete + { _scdQuotaUser = Nothing + , _scdPrettyPrint = True + , _scdProject = pScdProject_ + , _scdUserIp = Nothing + , _scdKey = Nothing + , _scdOauthToken = Nothing + , _scdSha1Fingerprint = pScdSha1Fingerprint_ + , _scdFields = Nothing + , _scdAlt = "json" + , _scdInstance = pScdInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scdQuotaUser :: Lens' SSLCertsDelete' (Maybe Text) +scdQuotaUser + = lens _scdQuotaUser (\ s a -> s{_scdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scdPrettyPrint :: Lens' SSLCertsDelete' Bool +scdPrettyPrint + = lens _scdPrettyPrint + (\ s a -> s{_scdPrettyPrint = a}) + +-- | Project ID of the project that contains the instance to be deleted. +scdProject :: Lens' SSLCertsDelete' Text +scdProject + = lens _scdProject (\ s a -> s{_scdProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scdUserIp :: Lens' SSLCertsDelete' (Maybe Text) +scdUserIp + = lens _scdUserIp (\ s a -> s{_scdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scdKey :: Lens' SSLCertsDelete' (Maybe Text) +scdKey = lens _scdKey (\ s a -> s{_scdKey = a}) + +-- | OAuth 2.0 token for the current user. +scdOauthToken :: Lens' SSLCertsDelete' (Maybe Text) +scdOauthToken + = lens _scdOauthToken + (\ s a -> s{_scdOauthToken = a}) + +-- | Sha1 FingerPrint. +scdSha1Fingerprint :: Lens' SSLCertsDelete' Text +scdSha1Fingerprint + = lens _scdSha1Fingerprint + (\ s a -> s{_scdSha1Fingerprint = a}) + +-- | Selector specifying which fields to include in a partial response. +scdFields :: Lens' SSLCertsDelete' (Maybe Text) +scdFields + = lens _scdFields (\ s a -> s{_scdFields = a}) + +-- | Data format for the response. +scdAlt :: Lens' SSLCertsDelete' Text +scdAlt = lens _scdAlt (\ s a -> s{_scdAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +scdInstance :: Lens' SSLCertsDelete' Text +scdInstance + = lens _scdInstance (\ s a -> s{_scdInstance = a}) + +instance GoogleRequest SSLCertsDelete' where + type Rs SSLCertsDelete' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u SSLCertsDelete{..} + = go _scdQuotaUser _scdPrettyPrint _scdProject + _scdUserIp + _scdKey + _scdOauthToken + _scdSha1Fingerprint + _scdFields + _scdAlt + _scdInstance + where go + = clientWithRoute (Proxy :: Proxy SslCertsDeleteAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Get.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Get.hs new file mode 100644 index 000000000..2c23b1ef3 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Get.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.SSLCerts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a particular SSL certificate. Does not include the private key +-- (required for usage). The private key must be saved from the response to +-- initial creation. +-- +-- /See:/ for @SqlSSLCertsGet@. +module Sql.SSLCerts.Get + ( + -- * REST Resource + SslCertsGetAPI + + -- * Creating a Request + , sSLCertsGet + , SSLCertsGet + + -- * Request Lenses + , scgQuotaUser + , scgPrettyPrint + , scgProject + , scgUserIp + , scgKey + , scgOauthToken + , scgSha1Fingerprint + , scgFields + , scgAlt + , scgInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlSSLCertsGet@ which the +-- 'SSLCertsGet' request conforms to. +type SslCertsGetAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "sslCerts" :> + Capture "sha1Fingerprint" Text :> Get '[JSON] SSLCert + +-- | Retrieves a particular SSL certificate. Does not include the private key +-- (required for usage). The private key must be saved from the response to +-- initial creation. +-- +-- /See:/ 'sSLCertsGet' smart constructor. +data SSLCertsGet = SSLCertsGet + { _scgQuotaUser :: !(Maybe Text) + , _scgPrettyPrint :: !Bool + , _scgProject :: !Text + , _scgUserIp :: !(Maybe Text) + , _scgKey :: !(Maybe Text) + , _scgOauthToken :: !(Maybe Text) + , _scgSha1Fingerprint :: !Text + , _scgFields :: !(Maybe Text) + , _scgAlt :: !Text + , _scgInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scgQuotaUser' +-- +-- * 'scgPrettyPrint' +-- +-- * 'scgProject' +-- +-- * 'scgUserIp' +-- +-- * 'scgKey' +-- +-- * 'scgOauthToken' +-- +-- * 'scgSha1Fingerprint' +-- +-- * 'scgFields' +-- +-- * 'scgAlt' +-- +-- * 'scgInstance' +sSLCertsGet + :: Text -- ^ 'project' + -> Text -- ^ 'sha1Fingerprint' + -> Text -- ^ 'instance' + -> SSLCertsGet +sSLCertsGet pScgProject_ pScgSha1Fingerprint_ pScgInstance_ = + SSLCertsGet + { _scgQuotaUser = Nothing + , _scgPrettyPrint = True + , _scgProject = pScgProject_ + , _scgUserIp = Nothing + , _scgKey = Nothing + , _scgOauthToken = Nothing + , _scgSha1Fingerprint = pScgSha1Fingerprint_ + , _scgFields = Nothing + , _scgAlt = "json" + , _scgInstance = pScgInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +scgQuotaUser :: Lens' SSLCertsGet' (Maybe Text) +scgQuotaUser + = lens _scgQuotaUser (\ s a -> s{_scgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +scgPrettyPrint :: Lens' SSLCertsGet' Bool +scgPrettyPrint + = lens _scgPrettyPrint + (\ s a -> s{_scgPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +scgProject :: Lens' SSLCertsGet' Text +scgProject + = lens _scgProject (\ s a -> s{_scgProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +scgUserIp :: Lens' SSLCertsGet' (Maybe Text) +scgUserIp + = lens _scgUserIp (\ s a -> s{_scgUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +scgKey :: Lens' SSLCertsGet' (Maybe Text) +scgKey = lens _scgKey (\ s a -> s{_scgKey = a}) + +-- | OAuth 2.0 token for the current user. +scgOauthToken :: Lens' SSLCertsGet' (Maybe Text) +scgOauthToken + = lens _scgOauthToken + (\ s a -> s{_scgOauthToken = a}) + +-- | Sha1 FingerPrint. +scgSha1Fingerprint :: Lens' SSLCertsGet' Text +scgSha1Fingerprint + = lens _scgSha1Fingerprint + (\ s a -> s{_scgSha1Fingerprint = a}) + +-- | Selector specifying which fields to include in a partial response. +scgFields :: Lens' SSLCertsGet' (Maybe Text) +scgFields + = lens _scgFields (\ s a -> s{_scgFields = a}) + +-- | Data format for the response. +scgAlt :: Lens' SSLCertsGet' Text +scgAlt = lens _scgAlt (\ s a -> s{_scgAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +scgInstance :: Lens' SSLCertsGet' Text +scgInstance + = lens _scgInstance (\ s a -> s{_scgInstance = a}) + +instance GoogleRequest SSLCertsGet' where + type Rs SSLCertsGet' = SSLCert + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u SSLCertsGet{..} + = go _scgQuotaUser _scgPrettyPrint _scgProject + _scgUserIp + _scgKey + _scgOauthToken + _scgSha1Fingerprint + _scgFields + _scgAlt + _scgInstance + where go + = clientWithRoute (Proxy :: Proxy SslCertsGetAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Insert.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Insert.hs new file mode 100644 index 000000000..91d044612 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/Insert.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.SSLCerts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates an SSL certificate and returns it along with the private key and +-- server certificate authority. The new certificate will not be usable +-- until the instance is restarted. +-- +-- /See:/ for @SqlSSLCertsInsert@. +module Sql.SSLCerts.Insert + ( + -- * REST Resource + SslCertsInsertAPI + + -- * Creating a Request + , sSLCertsInsert + , SSLCertsInsert + + -- * Request Lenses + , sciQuotaUser + , sciPrettyPrint + , sciProject + , sciUserIp + , sciKey + , sciOauthToken + , sciFields + , sciAlt + , sciInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlSSLCertsInsert@ which the +-- 'SSLCertsInsert' request conforms to. +type SslCertsInsertAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "sslCerts" :> Post '[JSON] SSLCertsInsertResponse + +-- | Creates an SSL certificate and returns it along with the private key and +-- server certificate authority. The new certificate will not be usable +-- until the instance is restarted. +-- +-- /See:/ 'sSLCertsInsert' smart constructor. +data SSLCertsInsert = SSLCertsInsert + { _sciQuotaUser :: !(Maybe Text) + , _sciPrettyPrint :: !Bool + , _sciProject :: !Text + , _sciUserIp :: !(Maybe Text) + , _sciKey :: !(Maybe Text) + , _sciOauthToken :: !(Maybe Text) + , _sciFields :: !(Maybe Text) + , _sciAlt :: !Text + , _sciInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sciQuotaUser' +-- +-- * 'sciPrettyPrint' +-- +-- * 'sciProject' +-- +-- * 'sciUserIp' +-- +-- * 'sciKey' +-- +-- * 'sciOauthToken' +-- +-- * 'sciFields' +-- +-- * 'sciAlt' +-- +-- * 'sciInstance' +sSLCertsInsert + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> SSLCertsInsert +sSLCertsInsert pSciProject_ pSciInstance_ = + SSLCertsInsert + { _sciQuotaUser = Nothing + , _sciPrettyPrint = True + , _sciProject = pSciProject_ + , _sciUserIp = Nothing + , _sciKey = Nothing + , _sciOauthToken = Nothing + , _sciFields = Nothing + , _sciAlt = "json" + , _sciInstance = pSciInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sciQuotaUser :: Lens' SSLCertsInsert' (Maybe Text) +sciQuotaUser + = lens _sciQuotaUser (\ s a -> s{_sciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sciPrettyPrint :: Lens' SSLCertsInsert' Bool +sciPrettyPrint + = lens _sciPrettyPrint + (\ s a -> s{_sciPrettyPrint = a}) + +-- | Project ID of the project to which the newly created Cloud SQL instances +-- should belong. +sciProject :: Lens' SSLCertsInsert' Text +sciProject + = lens _sciProject (\ s a -> s{_sciProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sciUserIp :: Lens' SSLCertsInsert' (Maybe Text) +sciUserIp + = lens _sciUserIp (\ s a -> s{_sciUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sciKey :: Lens' SSLCertsInsert' (Maybe Text) +sciKey = lens _sciKey (\ s a -> s{_sciKey = a}) + +-- | OAuth 2.0 token for the current user. +sciOauthToken :: Lens' SSLCertsInsert' (Maybe Text) +sciOauthToken + = lens _sciOauthToken + (\ s a -> s{_sciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sciFields :: Lens' SSLCertsInsert' (Maybe Text) +sciFields + = lens _sciFields (\ s a -> s{_sciFields = a}) + +-- | Data format for the response. +sciAlt :: Lens' SSLCertsInsert' Text +sciAlt = lens _sciAlt (\ s a -> s{_sciAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +sciInstance :: Lens' SSLCertsInsert' Text +sciInstance + = lens _sciInstance (\ s a -> s{_sciInstance = a}) + +instance GoogleRequest SSLCertsInsert' where + type Rs SSLCertsInsert' = SSLCertsInsertResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u SSLCertsInsert{..} + = go _sciQuotaUser _sciPrettyPrint _sciProject + _sciUserIp + _sciKey + _sciOauthToken + _sciFields + _sciAlt + _sciInstance + where go + = clientWithRoute (Proxy :: Proxy SslCertsInsertAPI) + r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/List.hs new file mode 100644 index 000000000..90aa09487 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/SSLCerts/List.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.SSLCerts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all of the current SSL certificates for the instance. +-- +-- /See:/ for @SqlSSLCertsList@. +module Sql.SSLCerts.List + ( + -- * REST Resource + SslCertsListAPI + + -- * Creating a Request + , sSLCertsList + , SSLCertsList + + -- * Request Lenses + , sclQuotaUser + , sclPrettyPrint + , sclProject + , sclUserIp + , sclKey + , sclOauthToken + , sclFields + , sclAlt + , sclInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlSSLCertsList@ which the +-- 'SSLCertsList' request conforms to. +type SslCertsListAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "sslCerts" :> Get '[JSON] SSLCertsListResponse + +-- | Lists all of the current SSL certificates for the instance. +-- +-- /See:/ 'sSLCertsList' smart constructor. +data SSLCertsList = SSLCertsList + { _sclQuotaUser :: !(Maybe Text) + , _sclPrettyPrint :: !Bool + , _sclProject :: !Text + , _sclUserIp :: !(Maybe Text) + , _sclKey :: !(Maybe Text) + , _sclOauthToken :: !(Maybe Text) + , _sclFields :: !(Maybe Text) + , _sclAlt :: !Text + , _sclInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sclQuotaUser' +-- +-- * 'sclPrettyPrint' +-- +-- * 'sclProject' +-- +-- * 'sclUserIp' +-- +-- * 'sclKey' +-- +-- * 'sclOauthToken' +-- +-- * 'sclFields' +-- +-- * 'sclAlt' +-- +-- * 'sclInstance' +sSLCertsList + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> SSLCertsList +sSLCertsList pSclProject_ pSclInstance_ = + SSLCertsList + { _sclQuotaUser = Nothing + , _sclPrettyPrint = True + , _sclProject = pSclProject_ + , _sclUserIp = Nothing + , _sclKey = Nothing + , _sclOauthToken = Nothing + , _sclFields = Nothing + , _sclAlt = "json" + , _sclInstance = pSclInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sclQuotaUser :: Lens' SSLCertsList' (Maybe Text) +sclQuotaUser + = lens _sclQuotaUser (\ s a -> s{_sclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sclPrettyPrint :: Lens' SSLCertsList' Bool +sclPrettyPrint + = lens _sclPrettyPrint + (\ s a -> s{_sclPrettyPrint = a}) + +-- | Project ID of the project for which to list Cloud SQL instances. +sclProject :: Lens' SSLCertsList' Text +sclProject + = lens _sclProject (\ s a -> s{_sclProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sclUserIp :: Lens' SSLCertsList' (Maybe Text) +sclUserIp + = lens _sclUserIp (\ s a -> s{_sclUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sclKey :: Lens' SSLCertsList' (Maybe Text) +sclKey = lens _sclKey (\ s a -> s{_sclKey = a}) + +-- | OAuth 2.0 token for the current user. +sclOauthToken :: Lens' SSLCertsList' (Maybe Text) +sclOauthToken + = lens _sclOauthToken + (\ s a -> s{_sclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sclFields :: Lens' SSLCertsList' (Maybe Text) +sclFields + = lens _sclFields (\ s a -> s{_sclFields = a}) + +-- | Data format for the response. +sclAlt :: Lens' SSLCertsList' Text +sclAlt = lens _sclAlt (\ s a -> s{_sclAlt = a}) + +-- | Cloud SQL instance ID. This does not include the project ID. +sclInstance :: Lens' SSLCertsList' Text +sclInstance + = lens _sclInstance (\ s a -> s{_sclInstance = a}) + +instance GoogleRequest SSLCertsList' where + type Rs SSLCertsList' = SSLCertsListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u SSLCertsList{..} + = go _sclQuotaUser _sclPrettyPrint _sclProject + _sclUserIp + _sclKey + _sclOauthToken + _sclFields + _sclAlt + _sclInstance + where go + = clientWithRoute (Proxy :: Proxy SslCertsListAPI) r + u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Tiers/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Tiers/List.hs new file mode 100644 index 000000000..8385bf5a9 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Tiers/List.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Tiers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all available service tiers for Google Cloud SQL, for example D1, +-- D2. For related information, see Pricing. +-- +-- /See:/ for @SqlTiersList@. +module Sql.Tiers.List + ( + -- * REST Resource + TiersListAPI + + -- * Creating a Request + , tiersList + , TiersList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlProject + , tlUserIp + , tlKey + , tlOauthToken + , tlFields + , tlAlt + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlTiersList@ which the +-- 'TiersList' request conforms to. +type TiersListAPI = + "projects" :> + Capture "project" Text :> + "tiers" :> Get '[JSON] TiersListResponse + +-- | Lists all available service tiers for Google Cloud SQL, for example D1, +-- D2. For related information, see Pricing. +-- +-- /See:/ 'tiersList' smart constructor. +data TiersList = TiersList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlProject :: !Text + , _tlUserIp :: !(Maybe Text) + , _tlKey :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TiersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlProject' +-- +-- * 'tlUserIp' +-- +-- * 'tlKey' +-- +-- * 'tlOauthToken' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +tiersList + :: Text -- ^ 'project' + -> TiersList +tiersList pTlProject_ = + TiersList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlProject = pTlProject_ + , _tlUserIp = Nothing + , _tlKey = Nothing + , _tlOauthToken = Nothing + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TiersList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TiersList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | Project ID of the project for which to list tiers. +tlProject :: Lens' TiersList' Text +tlProject + = lens _tlProject (\ s a -> s{_tlProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TiersList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TiersList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TiersList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TiersList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TiersList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TiersList' where + type Rs TiersList' = TiersListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u TiersList{..} + = go _tlQuotaUser _tlPrettyPrint _tlProject _tlUserIp + _tlKey + _tlOauthToken + _tlFields + _tlAlt + where go + = clientWithRoute (Proxy :: Proxy TiersListAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Delete.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Delete.hs new file mode 100644 index 000000000..5db32c611 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Delete.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Users.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a user from a Cloud SQL instance. +-- +-- /See:/ for @SqlUsersDelete@. +module Sql.Users.Delete + ( + -- * REST Resource + UsersDeleteAPI + + -- * Creating a Request + , usersDelete + , UsersDelete + + -- * Request Lenses + , udQuotaUser + , udPrettyPrint + , udProject + , udUserIp + , udKey + , udName + , udHost + , udOauthToken + , udFields + , udAlt + , udInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlUsersDelete@ which the +-- 'UsersDelete' request conforms to. +type UsersDeleteAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "users" :> + QueryParam "name" Text :> + QueryParam "host" Text :> Delete '[JSON] Operation + +-- | Deletes a user from a Cloud SQL instance. +-- +-- /See:/ 'usersDelete' smart constructor. +data UsersDelete = UsersDelete + { _udQuotaUser :: !(Maybe Text) + , _udPrettyPrint :: !Bool + , _udProject :: !Text + , _udUserIp :: !(Maybe Text) + , _udKey :: !(Maybe Text) + , _udName :: !Text + , _udHost :: !Text + , _udOauthToken :: !(Maybe Text) + , _udFields :: !(Maybe Text) + , _udAlt :: !Text + , _udInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'udQuotaUser' +-- +-- * 'udPrettyPrint' +-- +-- * 'udProject' +-- +-- * 'udUserIp' +-- +-- * 'udKey' +-- +-- * 'udName' +-- +-- * 'udHost' +-- +-- * 'udOauthToken' +-- +-- * 'udFields' +-- +-- * 'udAlt' +-- +-- * 'udInstance' +usersDelete + :: Text -- ^ 'project' + -> Text -- ^ 'name' + -> Text -- ^ 'host' + -> Text -- ^ 'instance' + -> UsersDelete +usersDelete pUdProject_ pUdName_ pUdHost_ pUdInstance_ = + UsersDelete + { _udQuotaUser = Nothing + , _udPrettyPrint = True + , _udProject = pUdProject_ + , _udUserIp = Nothing + , _udKey = Nothing + , _udName = pUdName_ + , _udHost = pUdHost_ + , _udOauthToken = Nothing + , _udFields = Nothing + , _udAlt = "json" + , _udInstance = pUdInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +udQuotaUser :: Lens' UsersDelete' (Maybe Text) +udQuotaUser + = lens _udQuotaUser (\ s a -> s{_udQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +udPrettyPrint :: Lens' UsersDelete' Bool +udPrettyPrint + = lens _udPrettyPrint + (\ s a -> s{_udPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +udProject :: Lens' UsersDelete' Text +udProject + = lens _udProject (\ s a -> s{_udProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +udUserIp :: Lens' UsersDelete' (Maybe Text) +udUserIp = lens _udUserIp (\ s a -> s{_udUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +udKey :: Lens' UsersDelete' (Maybe Text) +udKey = lens _udKey (\ s a -> s{_udKey = a}) + +-- | Name of the user in the instance. +udName :: Lens' UsersDelete' Text +udName = lens _udName (\ s a -> s{_udName = a}) + +-- | Host of the user in the instance. +udHost :: Lens' UsersDelete' Text +udHost = lens _udHost (\ s a -> s{_udHost = a}) + +-- | OAuth 2.0 token for the current user. +udOauthToken :: Lens' UsersDelete' (Maybe Text) +udOauthToken + = lens _udOauthToken (\ s a -> s{_udOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +udFields :: Lens' UsersDelete' (Maybe Text) +udFields = lens _udFields (\ s a -> s{_udFields = a}) + +-- | Data format for the response. +udAlt :: Lens' UsersDelete' Text +udAlt = lens _udAlt (\ s a -> s{_udAlt = a}) + +-- | Database instance ID. This does not include the project ID. +udInstance :: Lens' UsersDelete' Text +udInstance + = lens _udInstance (\ s a -> s{_udInstance = a}) + +instance GoogleRequest UsersDelete' where + type Rs UsersDelete' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u UsersDelete{..} + = go _udQuotaUser _udPrettyPrint _udProject _udUserIp + _udKey + (Just _udName) + (Just _udHost) + _udOauthToken + _udFields + _udAlt + _udInstance + where go + = clientWithRoute (Proxy :: Proxy UsersDeleteAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Insert.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Insert.hs new file mode 100644 index 000000000..9efc44548 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Insert.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Users.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new user in a Cloud SQL instance. +-- +-- /See:/ for @SqlUsersInsert@. +module Sql.Users.Insert + ( + -- * REST Resource + UsersInsertAPI + + -- * Creating a Request + , usersInsert + , UsersInsert + + -- * Request Lenses + , uiQuotaUser + , uiPrettyPrint + , uiProject + , uiUserIp + , uiKey + , uiOauthToken + , uiFields + , uiAlt + , uiInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlUsersInsert@ which the +-- 'UsersInsert' request conforms to. +type UsersInsertAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "users" :> Post '[JSON] Operation + +-- | Creates a new user in a Cloud SQL instance. +-- +-- /See:/ 'usersInsert' smart constructor. +data UsersInsert = UsersInsert + { _uiQuotaUser :: !(Maybe Text) + , _uiPrettyPrint :: !Bool + , _uiProject :: !Text + , _uiUserIp :: !(Maybe Text) + , _uiKey :: !(Maybe Text) + , _uiOauthToken :: !(Maybe Text) + , _uiFields :: !(Maybe Text) + , _uiAlt :: !Text + , _uiInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiQuotaUser' +-- +-- * 'uiPrettyPrint' +-- +-- * 'uiProject' +-- +-- * 'uiUserIp' +-- +-- * 'uiKey' +-- +-- * 'uiOauthToken' +-- +-- * 'uiFields' +-- +-- * 'uiAlt' +-- +-- * 'uiInstance' +usersInsert + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> UsersInsert +usersInsert pUiProject_ pUiInstance_ = + UsersInsert + { _uiQuotaUser = Nothing + , _uiPrettyPrint = True + , _uiProject = pUiProject_ + , _uiUserIp = Nothing + , _uiKey = Nothing + , _uiOauthToken = Nothing + , _uiFields = Nothing + , _uiAlt = "json" + , _uiInstance = pUiInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uiQuotaUser :: Lens' UsersInsert' (Maybe Text) +uiQuotaUser + = lens _uiQuotaUser (\ s a -> s{_uiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uiPrettyPrint :: Lens' UsersInsert' Bool +uiPrettyPrint + = lens _uiPrettyPrint + (\ s a -> s{_uiPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +uiProject :: Lens' UsersInsert' Text +uiProject + = lens _uiProject (\ s a -> s{_uiProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uiUserIp :: Lens' UsersInsert' (Maybe Text) +uiUserIp = lens _uiUserIp (\ s a -> s{_uiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uiKey :: Lens' UsersInsert' (Maybe Text) +uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) + +-- | OAuth 2.0 token for the current user. +uiOauthToken :: Lens' UsersInsert' (Maybe Text) +uiOauthToken + = lens _uiOauthToken (\ s a -> s{_uiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uiFields :: Lens' UsersInsert' (Maybe Text) +uiFields = lens _uiFields (\ s a -> s{_uiFields = a}) + +-- | Data format for the response. +uiAlt :: Lens' UsersInsert' Text +uiAlt = lens _uiAlt (\ s a -> s{_uiAlt = a}) + +-- | Database instance ID. This does not include the project ID. +uiInstance :: Lens' UsersInsert' Text +uiInstance + = lens _uiInstance (\ s a -> s{_uiInstance = a}) + +instance GoogleRequest UsersInsert' where + type Rs UsersInsert' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u UsersInsert{..} + = go _uiQuotaUser _uiPrettyPrint _uiProject _uiUserIp + _uiKey + _uiOauthToken + _uiFields + _uiAlt + _uiInstance + where go + = clientWithRoute (Proxy :: Proxy UsersInsertAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/List.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/List.hs new file mode 100644 index 000000000..8f5221ae6 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/List.hs @@ -0,0 +1,166 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Users.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists users in the specified Cloud SQL instance. +-- +-- /See:/ for @SqlUsersList@. +module Sql.Users.List + ( + -- * REST Resource + UsersListAPI + + -- * Creating a Request + , usersList + , UsersList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulProject + , ulUserIp + , ulKey + , ulOauthToken + , ulFields + , ulAlt + , ulInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlUsersList@ which the +-- 'UsersList' request conforms to. +type UsersListAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "users" :> Get '[JSON] UsersListResponse + +-- | Lists users in the specified Cloud SQL instance. +-- +-- /See:/ 'usersList' smart constructor. +data UsersList = UsersList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulProject :: !Text + , _ulUserIp :: !(Maybe Text) + , _ulKey :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + , _ulInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulProject' +-- +-- * 'ulUserIp' +-- +-- * 'ulKey' +-- +-- * 'ulOauthToken' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +-- +-- * 'ulInstance' +usersList + :: Text -- ^ 'project' + -> Text -- ^ 'instance' + -> UsersList +usersList pUlProject_ pUlInstance_ = + UsersList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulProject = pUlProject_ + , _ulUserIp = Nothing + , _ulKey = Nothing + , _ulOauthToken = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + , _ulInstance = pUlInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' UsersList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' UsersList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +ulProject :: Lens' UsersList' Text +ulProject + = lens _ulProject (\ s a -> s{_ulProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' UsersList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' UsersList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' UsersList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' UsersList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' UsersList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +-- | Database instance ID. This does not include the project ID. +ulInstance :: Lens' UsersList' Text +ulInstance + = lens _ulInstance (\ s a -> s{_ulInstance = a}) + +instance GoogleRequest UsersList' where + type Rs UsersList' = UsersListResponse + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u UsersList{..} + = go _ulQuotaUser _ulPrettyPrint _ulProject _ulUserIp + _ulKey + _ulOauthToken + _ulFields + _ulAlt + _ulInstance + where go + = clientWithRoute (Proxy :: Proxy UsersListAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Update.hs b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Update.hs new file mode 100644 index 000000000..dc7bcc58c --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/Resource/Sql/Users/Update.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Sql.Users.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an existing user in a Cloud SQL instance. +-- +-- /See:/ for @SqlUsersUpdate@. +module Sql.Users.Update + ( + -- * REST Resource + UsersUpdateAPI + + -- * Creating a Request + , usersUpdate + , UsersUpdate + + -- * Request Lenses + , uuQuotaUser + , uuPrettyPrint + , uuProject + , uuUserIp + , uuKey + , uuName + , uuHost + , uuOauthToken + , uuFields + , uuAlt + , uuInstance + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types + +-- | A resource alias for @SqlUsersUpdate@ which the +-- 'UsersUpdate' request conforms to. +type UsersUpdateAPI = + "projects" :> + Capture "project" Text :> + "instances" :> + Capture "instance" Text :> + "users" :> + QueryParam "name" Text :> + QueryParam "host" Text :> Put '[JSON] Operation + +-- | Updates an existing user in a Cloud SQL instance. +-- +-- /See:/ 'usersUpdate' smart constructor. +data UsersUpdate = UsersUpdate + { _uuQuotaUser :: !(Maybe Text) + , _uuPrettyPrint :: !Bool + , _uuProject :: !Text + , _uuUserIp :: !(Maybe Text) + , _uuKey :: !(Maybe Text) + , _uuName :: !Text + , _uuHost :: !Text + , _uuOauthToken :: !(Maybe Text) + , _uuFields :: !(Maybe Text) + , _uuAlt :: !Text + , _uuInstance :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uuQuotaUser' +-- +-- * 'uuPrettyPrint' +-- +-- * 'uuProject' +-- +-- * 'uuUserIp' +-- +-- * 'uuKey' +-- +-- * 'uuName' +-- +-- * 'uuHost' +-- +-- * 'uuOauthToken' +-- +-- * 'uuFields' +-- +-- * 'uuAlt' +-- +-- * 'uuInstance' +usersUpdate + :: Text -- ^ 'project' + -> Text -- ^ 'name' + -> Text -- ^ 'host' + -> Text -- ^ 'instance' + -> UsersUpdate +usersUpdate pUuProject_ pUuName_ pUuHost_ pUuInstance_ = + UsersUpdate + { _uuQuotaUser = Nothing + , _uuPrettyPrint = True + , _uuProject = pUuProject_ + , _uuUserIp = Nothing + , _uuKey = Nothing + , _uuName = pUuName_ + , _uuHost = pUuHost_ + , _uuOauthToken = Nothing + , _uuFields = Nothing + , _uuAlt = "json" + , _uuInstance = pUuInstance_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uuQuotaUser :: Lens' UsersUpdate' (Maybe Text) +uuQuotaUser + = lens _uuQuotaUser (\ s a -> s{_uuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uuPrettyPrint :: Lens' UsersUpdate' Bool +uuPrettyPrint + = lens _uuPrettyPrint + (\ s a -> s{_uuPrettyPrint = a}) + +-- | Project ID of the project that contains the instance. +uuProject :: Lens' UsersUpdate' Text +uuProject + = lens _uuProject (\ s a -> s{_uuProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uuUserIp :: Lens' UsersUpdate' (Maybe Text) +uuUserIp = lens _uuUserIp (\ s a -> s{_uuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uuKey :: Lens' UsersUpdate' (Maybe Text) +uuKey = lens _uuKey (\ s a -> s{_uuKey = a}) + +-- | Name of the user in the instance. +uuName :: Lens' UsersUpdate' Text +uuName = lens _uuName (\ s a -> s{_uuName = a}) + +-- | Host of the user in the instance. +uuHost :: Lens' UsersUpdate' Text +uuHost = lens _uuHost (\ s a -> s{_uuHost = a}) + +-- | OAuth 2.0 token for the current user. +uuOauthToken :: Lens' UsersUpdate' (Maybe Text) +uuOauthToken + = lens _uuOauthToken (\ s a -> s{_uuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uuFields :: Lens' UsersUpdate' (Maybe Text) +uuFields = lens _uuFields (\ s a -> s{_uuFields = a}) + +-- | Data format for the response. +uuAlt :: Lens' UsersUpdate' Text +uuAlt = lens _uuAlt (\ s a -> s{_uuAlt = a}) + +-- | Database instance ID. This does not include the project ID. +uuInstance :: Lens' UsersUpdate' Text +uuInstance + = lens _uuInstance (\ s a -> s{_uuInstance = a}) + +instance GoogleRequest UsersUpdate' where + type Rs UsersUpdate' = Operation + request = requestWithRoute defReq sQLAdminURL + requestWithRoute r u UsersUpdate{..} + = go _uuQuotaUser _uuPrettyPrint _uuProject _uuUserIp + _uuKey + (Just _uuName) + (Just _uuHost) + _uuOauthToken + _uuFields + _uuAlt + _uuInstance + where go + = clientWithRoute (Proxy :: Proxy UsersUpdateAPI) r u diff --git a/gogol-sqladmin/gen/Network/Google/SQLAdmin.hs b/gogol-sqladmin/gen/Network/Google/SQLAdmin.hs new file mode 100644 index 000000000..521bf3b7e --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/SQLAdmin.hs @@ -0,0 +1,542 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.SQLAdmin +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for Cloud SQL database instance management. +-- +-- /See:/ +module Network.Google.SQLAdmin + ( + -- * API + SQLAdminAPI + , sQLAdminAPI + , sQLAdminURL + + -- * Service Methods + + -- * REST Resources + + -- ** SqlBackupRunsDelete + , module Sql.BackupRuns.Delete + + -- ** SqlBackupRunsGet + , module Sql.BackupRuns.Get + + -- ** SqlBackupRunsList + , module Sql.BackupRuns.List + + -- ** SqlDatabasesDelete + , module Sql.Databases.Delete + + -- ** SqlDatabasesGet + , module Sql.Databases.Get + + -- ** SqlDatabasesInsert + , module Sql.Databases.Insert + + -- ** SqlDatabasesList + , module Sql.Databases.List + + -- ** SqlDatabasesPatch + , module Sql.Databases.Patch + + -- ** SqlDatabasesUpdate + , module Sql.Databases.Update + + -- ** SqlFlagsList + , module Sql.Flags.List + + -- ** SqlInstancesClone + , module Sql.Instances.Clone + + -- ** SqlInstancesDelete + , module Sql.Instances.Delete + + -- ** SqlInstancesExport + , module Sql.Instances.Export + + -- ** SqlInstancesGet + , module Sql.Instances.Get + + -- ** SqlInstancesImport + , module Sql.Instances.Import + + -- ** SqlInstancesInsert + , module Sql.Instances.Insert + + -- ** SqlInstancesList + , module Sql.Instances.List + + -- ** SqlInstancesPatch + , module Sql.Instances.Patch + + -- ** SqlInstancesPromoteReplica + , module Sql.Instances.PromoteReplica + + -- ** SqlInstancesResetSSLConfig + , module Sql.Instances.ResetSSLConfig + + -- ** SqlInstancesRestart + , module Sql.Instances.Restart + + -- ** SqlInstancesRestoreBackup + , module Sql.Instances.RestoreBackup + + -- ** SqlInstancesStartReplica + , module Sql.Instances.StartReplica + + -- ** SqlInstancesStopReplica + , module Sql.Instances.StopReplica + + -- ** SqlInstancesUpdate + , module Sql.Instances.Update + + -- ** SqlOperationsGet + , module Sql.Operations.Get + + -- ** SqlOperationsList + , module Sql.Operations.List + + -- ** SqlSSLCertsCreateEphemeral + , module Sql.SSLCerts.CreateEphemeral + + -- ** SqlSSLCertsDelete + , module Sql.SSLCerts.Delete + + -- ** SqlSSLCertsGet + , module Sql.SSLCerts.Get + + -- ** SqlSSLCertsInsert + , module Sql.SSLCerts.Insert + + -- ** SqlSSLCertsList + , module Sql.SSLCerts.List + + -- ** SqlTiersList + , module Sql.Tiers.List + + -- ** SqlUsersDelete + , module Sql.Users.Delete + + -- ** SqlUsersInsert + , module Sql.Users.Insert + + -- ** SqlUsersList + , module Sql.Users.List + + -- ** SqlUsersUpdate + , module Sql.Users.Update + + -- * Types + + -- ** SSLCert + , SSLCert + , sSLCert + , scCommonName + , scKind + , scCertSerialNumber + , scSelfLink + , scCert + , scSha1Fingerprint + , scExpirationTime + , scCreateTime + , scInstance + + -- ** InstancesExportRequest + , InstancesExportRequest + , instancesExportRequest + , ierExportContext + + -- ** DatabasesListResponse + , DatabasesListResponse + , databasesListResponse + , dlrKind + , dlrItems + + -- ** OperationsListResponse + , OperationsListResponse + , operationsListResponse + , olrNextPageToken + , olrKind + , olrItems + + -- ** OnPremisesConfiguration + , OnPremisesConfiguration + , onPremisesConfiguration + , opcKind + , opcHostPort + + -- ** ImportContext + , ImportContext + , importContext + , icDatabase + , icKind + , icCsvImportOptions + , icUri + , icFileType + + -- ** Settings + , Settings + , settings + , sReplicationType + , sActivationPolicy + , sSettingsVersion + , sAuthorizedGaeApplications + , sKind + , sPricingPlan + , sIpConfiguration + , sDatabaseReplicationEnabled + , sTier + , sDatabaseFlags + , sCrashSafeReplicationEnabled + , sLocationPreference + , sBackupConfiguration + + -- ** SSLCertsCreateEphemeralRequest + , SSLCertsCreateEphemeralRequest + , sSLCertsCreateEphemeralRequest + , sccerPublicKey + + -- ** Database + , Database + , database + , dEtag + , dProject + , dKind + , dCollation + , dSelfLink + , dName + , dCharset + , dInstance + + -- ** IPMapping + , IPMapping + , iPMapping + , imIpAddress + , imTimeToRetire + + -- ** Operation + , Operation + , operation + , oTargetId + , oTargetProject + , oStatus + , oInsertTime + , oImportContext + , oStartTime + , oKind + , oError + , oExportContext + , oUser + , oSelfLink + , oName + , oEndTime + , oOperationType + , oTargetLink + + -- ** TiersListResponse + , TiersListResponse + , tiersListResponse + , tlrKind + , tlrItems + + -- ** BinLogCoordinates + , BinLogCoordinates + , binLogCoordinates + , blcBinLogPosition + , blcKind + , blcBinLogFileName + + -- ** ExportContext + , ExportContext + , exportContext + , ecCsvExportOptions + , ecKind + , ecUri + , ecFileType + , ecSqlExportOptions + , ecDatabases + + -- ** UsersListResponse + , UsersListResponse + , usersListResponse + , ulrNextPageToken + , ulrKind + , ulrItems + + -- ** OperationErrors + , OperationErrors + , operationErrors + , oeKind + , oeErrors + + -- ** SSLCertsListResponse + , SSLCertsListResponse + , sSLCertsListResponse + , sclrKind + , sclrItems + + -- ** IPConfiguration + , IPConfiguration + , iPConfiguration + , icAuthorizedNetworks + , icRequireSsl + , icIpv4Enabled + + -- ** SSLCertsInsertRequest + , SSLCertsInsertRequest + , sSLCertsInsertRequest + , scirCommonName + + -- ** User + , User + , user + , uEtag + , uProject + , uKind + , uName + , uPassword + , uHost + , uInstance + + -- ** DatabaseInstance + , DatabaseInstance + , databaseInstance + , diMaxDiskSize + , diOnPremisesConfiguration + , diEtag + , diState + , diIpv6Address + , diServerCaCert + , diDatabaseVersion + , diProject + , diSettings + , diKind + , diCurrentDiskSize + , diInstanceType + , diReplicaNames + , diSelfLink + , diName + , diMasterInstanceName + , diReplicaConfiguration + , diRegion + , diServiceAccountEmailAddress + , diIpAddresses + + -- ** Flag + , Flag + , flag + , fMaxValue + , fKind + , fAppliesTo + , fName + , fAllowedStringValues + , fType + , fMinValue + + -- ** CloneContext + , CloneContext + , cloneContext + , ccDestinationInstanceName + , ccBinLogCoordinates + , ccKind + + -- ** BackupRun + , BackupRun + , backupRun + , brStatus + , brStartTime + , brKind + , brError + , brWindowStartTime + , brSelfLink + , brEndTime + , brId + , brEnqueuedTime + , brInstance + + -- ** ACLEntry + , ACLEntry + , aCLEntry + , aeKind + , aeValue + , aeName + , aeExpirationTime + + -- ** MySqlReplicaConfiguration + , MySqlReplicaConfiguration + , mySqlReplicaConfiguration + , msrcVerifyServerCertificate + , msrcKind + , msrcClientKey + , msrcUsername + , msrcSslCipher + , msrcMasterHeartbeatPeriod + , msrcConnectRetryInterval + , msrcClientCertificate + , msrcCaCertificate + , msrcDumpFilePath + , msrcPassword + + -- ** Tier + , Tier + , tier + , tKind + , tTier + , tRegion + , tDiskQuota + , tRAM + + -- ** DatabaseFlags + , DatabaseFlags + , databaseFlags + , dfValue + , dfName + + -- ** InstancesRestoreBackupRequest + , InstancesRestoreBackupRequest + , instancesRestoreBackupRequest + , irbrRestoreBackupContext + + -- ** OperationError + , OperationError + , operationError + , opeKind + , opeCode + , opeMessage + + -- ** SSLCertDetail + , SSLCertDetail + , sSLCertDetail + , scdCertInfo + , scdCertPrivateKey + + -- ** BackupRunsListResponse + , BackupRunsListResponse + , backupRunsListResponse + , brlrNextPageToken + , brlrKind + , brlrItems + + -- ** InstancesCloneRequest + , InstancesCloneRequest + , instancesCloneRequest + , icrCloneContext + + -- ** ReplicaConfiguration + , ReplicaConfiguration + , replicaConfiguration + , rcKind + , rcMysqlReplicaConfiguration + + -- ** SSLCertsInsertResponse + , SSLCertsInsertResponse + , sSLCertsInsertResponse + , scirServerCaCert + , scirKind + , scirClientCert + + -- ** InstancesListResponse + , InstancesListResponse + , instancesListResponse + , ilrNextPageToken + , ilrKind + , ilrItems + + -- ** LocationPreference + , LocationPreference + , locationPreference + , lpKind + , lpFollowGaeApplication + , lpZone + + -- ** InstancesImportRequest + , InstancesImportRequest + , instancesImportRequest + , iirImportContext + + -- ** FlagsListResponse + , FlagsListResponse + , flagsListResponse + , flrKind + , flrItems + + -- ** BackupConfiguration + , BackupConfiguration + , backupConfiguration + , bcEnabled + , bcStartTime + , bcKind + , bcBinaryLogEnabled + + -- ** RestoreBackupContext + , RestoreBackupContext + , restoreBackupContext + , rbcInstanceId + , rbcBackupRunId + , rbcKind + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Sql.BackupRuns.Delete +import Network.Google.Resource.Sql.BackupRuns.Get +import Network.Google.Resource.Sql.BackupRuns.List +import Network.Google.Resource.Sql.Databases.Delete +import Network.Google.Resource.Sql.Databases.Get +import Network.Google.Resource.Sql.Databases.Insert +import Network.Google.Resource.Sql.Databases.List +import Network.Google.Resource.Sql.Databases.Patch +import Network.Google.Resource.Sql.Databases.Update +import Network.Google.Resource.Sql.Flags.List +import Network.Google.Resource.Sql.Instances.Clone +import Network.Google.Resource.Sql.Instances.Delete +import Network.Google.Resource.Sql.Instances.Export +import Network.Google.Resource.Sql.Instances.Get +import Network.Google.Resource.Sql.Instances.Import +import Network.Google.Resource.Sql.Instances.Insert +import Network.Google.Resource.Sql.Instances.List +import Network.Google.Resource.Sql.Instances.Patch +import Network.Google.Resource.Sql.Instances.PromoteReplica +import Network.Google.Resource.Sql.Instances.ResetSSLConfig +import Network.Google.Resource.Sql.Instances.Restart +import Network.Google.Resource.Sql.Instances.RestoreBackup +import Network.Google.Resource.Sql.Instances.StartReplica +import Network.Google.Resource.Sql.Instances.StopReplica +import Network.Google.Resource.Sql.Instances.Update +import Network.Google.Resource.Sql.Operations.Get +import Network.Google.Resource.Sql.Operations.List +import Network.Google.Resource.Sql.SSLCerts.CreateEphemeral +import Network.Google.Resource.Sql.SSLCerts.Delete +import Network.Google.Resource.Sql.SSLCerts.Get +import Network.Google.Resource.Sql.SSLCerts.Insert +import Network.Google.Resource.Sql.SSLCerts.List +import Network.Google.Resource.Sql.Tiers.List +import Network.Google.Resource.Sql.Users.Delete +import Network.Google.Resource.Sql.Users.Insert +import Network.Google.Resource.Sql.Users.List +import Network.Google.Resource.Sql.Users.Update +import Network.Google.SQLAdmin.Types + +{- $resources +TODO +-} + +type SQLAdminAPI = + Flags :<|> Users :<|> Tiers :<|> BackupRuns :<|> + SSLCerts + :<|> Instances + :<|> Operations + :<|> Databases + +sQLAdminAPI :: Proxy SQLAdminAPI +sQLAdminAPI = Proxy diff --git a/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types.hs b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types.hs new file mode 100644 index 000000000..6c1b84646 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types.hs @@ -0,0 +1,377 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SQLAdmin.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SQLAdmin.Types + ( + -- * Service URL + sQLAdminURL + + -- * SSLCert + , SSLCert + , sSLCert + , scCommonName + , scKind + , scCertSerialNumber + , scSelfLink + , scCert + , scSha1Fingerprint + , scExpirationTime + , scCreateTime + , scInstance + + -- * InstancesExportRequest + , InstancesExportRequest + , instancesExportRequest + , ierExportContext + + -- * DatabasesListResponse + , DatabasesListResponse + , databasesListResponse + , dlrKind + , dlrItems + + -- * OperationsListResponse + , OperationsListResponse + , operationsListResponse + , olrNextPageToken + , olrKind + , olrItems + + -- * OnPremisesConfiguration + , OnPremisesConfiguration + , onPremisesConfiguration + , opcKind + , opcHostPort + + -- * ImportContext + , ImportContext + , importContext + , icDatabase + , icKind + , icCsvImportOptions + , icUri + , icFileType + + -- * Settings + , Settings + , settings + , sReplicationType + , sActivationPolicy + , sSettingsVersion + , sAuthorizedGaeApplications + , sKind + , sPricingPlan + , sIpConfiguration + , sDatabaseReplicationEnabled + , sTier + , sDatabaseFlags + , sCrashSafeReplicationEnabled + , sLocationPreference + , sBackupConfiguration + + -- * SSLCertsCreateEphemeralRequest + , SSLCertsCreateEphemeralRequest + , sSLCertsCreateEphemeralRequest + , sccerPublicKey + + -- * Database + , Database + , database + , dEtag + , dProject + , dKind + , dCollation + , dSelfLink + , dName + , dCharset + , dInstance + + -- * IPMapping + , IPMapping + , iPMapping + , imIpAddress + , imTimeToRetire + + -- * Operation + , Operation + , operation + , oTargetId + , oTargetProject + , oStatus + , oInsertTime + , oImportContext + , oStartTime + , oKind + , oError + , oExportContext + , oUser + , oSelfLink + , oName + , oEndTime + , oOperationType + , oTargetLink + + -- * TiersListResponse + , TiersListResponse + , tiersListResponse + , tlrKind + , tlrItems + + -- * BinLogCoordinates + , BinLogCoordinates + , binLogCoordinates + , blcBinLogPosition + , blcKind + , blcBinLogFileName + + -- * ExportContext + , ExportContext + , exportContext + , ecCsvExportOptions + , ecKind + , ecUri + , ecFileType + , ecSqlExportOptions + , ecDatabases + + -- * UsersListResponse + , UsersListResponse + , usersListResponse + , ulrNextPageToken + , ulrKind + , ulrItems + + -- * OperationErrors + , OperationErrors + , operationErrors + , oeKind + , oeErrors + + -- * SSLCertsListResponse + , SSLCertsListResponse + , sSLCertsListResponse + , sclrKind + , sclrItems + + -- * IPConfiguration + , IPConfiguration + , iPConfiguration + , icAuthorizedNetworks + , icRequireSsl + , icIpv4Enabled + + -- * SSLCertsInsertRequest + , SSLCertsInsertRequest + , sSLCertsInsertRequest + , scirCommonName + + -- * User + , User + , user + , uEtag + , uProject + , uKind + , uName + , uPassword + , uHost + , uInstance + + -- * DatabaseInstance + , DatabaseInstance + , databaseInstance + , diMaxDiskSize + , diOnPremisesConfiguration + , diEtag + , diState + , diIpv6Address + , diServerCaCert + , diDatabaseVersion + , diProject + , diSettings + , diKind + , diCurrentDiskSize + , diInstanceType + , diReplicaNames + , diSelfLink + , diName + , diMasterInstanceName + , diReplicaConfiguration + , diRegion + , diServiceAccountEmailAddress + , diIpAddresses + + -- * Flag + , Flag + , flag + , fMaxValue + , fKind + , fAppliesTo + , fName + , fAllowedStringValues + , fType + , fMinValue + + -- * CloneContext + , CloneContext + , cloneContext + , ccDestinationInstanceName + , ccBinLogCoordinates + , ccKind + + -- * BackupRun + , BackupRun + , backupRun + , brStatus + , brStartTime + , brKind + , brError + , brWindowStartTime + , brSelfLink + , brEndTime + , brId + , brEnqueuedTime + , brInstance + + -- * ACLEntry + , ACLEntry + , aCLEntry + , aeKind + , aeValue + , aeName + , aeExpirationTime + + -- * MySqlReplicaConfiguration + , MySqlReplicaConfiguration + , mySqlReplicaConfiguration + , msrcVerifyServerCertificate + , msrcKind + , msrcClientKey + , msrcUsername + , msrcSslCipher + , msrcMasterHeartbeatPeriod + , msrcConnectRetryInterval + , msrcClientCertificate + , msrcCaCertificate + , msrcDumpFilePath + , msrcPassword + + -- * Tier + , Tier + , tier + , tKind + , tTier + , tRegion + , tDiskQuota + , tRAM + + -- * DatabaseFlags + , DatabaseFlags + , databaseFlags + , dfValue + , dfName + + -- * InstancesRestoreBackupRequest + , InstancesRestoreBackupRequest + , instancesRestoreBackupRequest + , irbrRestoreBackupContext + + -- * OperationError + , OperationError + , operationError + , opeKind + , opeCode + , opeMessage + + -- * SSLCertDetail + , SSLCertDetail + , sSLCertDetail + , scdCertInfo + , scdCertPrivateKey + + -- * BackupRunsListResponse + , BackupRunsListResponse + , backupRunsListResponse + , brlrNextPageToken + , brlrKind + , brlrItems + + -- * InstancesCloneRequest + , InstancesCloneRequest + , instancesCloneRequest + , icrCloneContext + + -- * ReplicaConfiguration + , ReplicaConfiguration + , replicaConfiguration + , rcKind + , rcMysqlReplicaConfiguration + + -- * SSLCertsInsertResponse + , SSLCertsInsertResponse + , sSLCertsInsertResponse + , scirServerCaCert + , scirKind + , scirClientCert + + -- * InstancesListResponse + , InstancesListResponse + , instancesListResponse + , ilrNextPageToken + , ilrKind + , ilrItems + + -- * LocationPreference + , LocationPreference + , locationPreference + , lpKind + , lpFollowGaeApplication + , lpZone + + -- * InstancesImportRequest + , InstancesImportRequest + , instancesImportRequest + , iirImportContext + + -- * FlagsListResponse + , FlagsListResponse + , flagsListResponse + , flrKind + , flrItems + + -- * BackupConfiguration + , BackupConfiguration + , backupConfiguration + , bcEnabled + , bcStartTime + , bcKind + , bcBinaryLogEnabled + + -- * RestoreBackupContext + , RestoreBackupContext + , restoreBackupContext + , rbcInstanceId + , rbcBackupRunId + , rbcKind + ) where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types.Product +import Network.Google.SQLAdmin.Types.Sum + +-- | URL referring to version 'v1beta4' of the Cloud SQL Administration API. +sQLAdminURL :: BaseURL +sQLAdminURL + = BaseUrl Https + "https://www.googleapis.com/sql/v1beta4/" + 443 diff --git a/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs new file mode 100644 index 000000000..960ba04fa --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs @@ -0,0 +1,3249 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SQLAdmin.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SQLAdmin.Types.Product where + +import Network.Google.Prelude +import Network.Google.SQLAdmin.Types.Sum + +-- | SslCerts Resource +-- +-- /See:/ 'sSLCert' smart constructor. +data SSLCert = SSLCert + { _scCommonName :: !(Maybe Text) + , _scKind :: !Text + , _scCertSerialNumber :: !(Maybe Text) + , _scSelfLink :: !(Maybe Text) + , _scCert :: !(Maybe Text) + , _scSha1Fingerprint :: !(Maybe Text) + , _scExpirationTime :: !(Maybe UTCTime) + , _scCreateTime :: !(Maybe UTCTime) + , _scInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCert' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scCommonName' +-- +-- * 'scKind' +-- +-- * 'scCertSerialNumber' +-- +-- * 'scSelfLink' +-- +-- * 'scCert' +-- +-- * 'scSha1Fingerprint' +-- +-- * 'scExpirationTime' +-- +-- * 'scCreateTime' +-- +-- * 'scInstance' +sSLCert + :: SSLCert +sSLCert = + SSLCert + { _scCommonName = Nothing + , _scKind = "sql#sslCert" + , _scCertSerialNumber = Nothing + , _scSelfLink = Nothing + , _scCert = Nothing + , _scSha1Fingerprint = Nothing + , _scExpirationTime = Nothing + , _scCreateTime = Nothing + , _scInstance = Nothing + } + +-- | User supplied name. Constrained to [a-zA-Z.-_ ]+. +scCommonName :: Lens' SSLCert (Maybe Text) +scCommonName + = lens _scCommonName (\ s a -> s{_scCommonName = a}) + +-- | This is always sql#sslCert. +scKind :: Lens' SSLCert Text +scKind = lens _scKind (\ s a -> s{_scKind = a}) + +-- | Serial number, as extracted from the certificate. +scCertSerialNumber :: Lens' SSLCert (Maybe Text) +scCertSerialNumber + = lens _scCertSerialNumber + (\ s a -> s{_scCertSerialNumber = a}) + +-- | The URI of this resource. +scSelfLink :: Lens' SSLCert (Maybe Text) +scSelfLink + = lens _scSelfLink (\ s a -> s{_scSelfLink = a}) + +-- | PEM representation. +scCert :: Lens' SSLCert (Maybe Text) +scCert = lens _scCert (\ s a -> s{_scCert = a}) + +-- | Sha1 Fingerprint. +scSha1Fingerprint :: Lens' SSLCert (Maybe Text) +scSha1Fingerprint + = lens _scSha1Fingerprint + (\ s a -> s{_scSha1Fingerprint = a}) + +-- | The time when the certificate expires in RFC 3339 format, for example +-- 2012-11-15T16:19:00.094Z. +scExpirationTime :: Lens' SSLCert (Maybe UTCTime) +scExpirationTime + = lens _scExpirationTime + (\ s a -> s{_scExpirationTime = a}) + +-- | The time when the certificate was created in RFC 3339 format, for +-- example 2012-11-15T16:19:00.094Z +scCreateTime :: Lens' SSLCert (Maybe UTCTime) +scCreateTime + = lens _scCreateTime (\ s a -> s{_scCreateTime = a}) + +-- | Name of the database instance. +scInstance :: Lens' SSLCert (Maybe Text) +scInstance + = lens _scInstance (\ s a -> s{_scInstance = a}) + +instance FromJSON SSLCert where + parseJSON + = withObject "SSLCert" + (\ o -> + SSLCert <$> + (o .:? "commonName") <*> + (o .:? "kind" .!= "sql#sslCert") + <*> (o .:? "certSerialNumber") + <*> (o .:? "selfLink") + <*> (o .:? "cert") + <*> (o .:? "sha1Fingerprint") + <*> (o .:? "expirationTime") + <*> (o .:? "createTime") + <*> (o .:? "instance")) + +instance ToJSON SSLCert where + toJSON SSLCert{..} + = object + (catMaybes + [("commonName" .=) <$> _scCommonName, + Just ("kind" .= _scKind), + ("certSerialNumber" .=) <$> _scCertSerialNumber, + ("selfLink" .=) <$> _scSelfLink, + ("cert" .=) <$> _scCert, + ("sha1Fingerprint" .=) <$> _scSha1Fingerprint, + ("expirationTime" .=) <$> _scExpirationTime, + ("createTime" .=) <$> _scCreateTime, + ("instance" .=) <$> _scInstance]) + +-- | Database instance export request. +-- +-- /See:/ 'instancesExportRequest' smart constructor. +newtype InstancesExportRequest = InstancesExportRequest + { _ierExportContext :: Maybe (Maybe ExportContext) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesExportRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ierExportContext' +instancesExportRequest + :: InstancesExportRequest +instancesExportRequest = + InstancesExportRequest + { _ierExportContext = Nothing + } + +-- | Contains details about the export operation. +ierExportContext :: Lens' InstancesExportRequest (Maybe (Maybe ExportContext)) +ierExportContext + = lens _ierExportContext + (\ s a -> s{_ierExportContext = a}) + +instance FromJSON InstancesExportRequest where + parseJSON + = withObject "InstancesExportRequest" + (\ o -> + InstancesExportRequest <$> (o .:? "exportContext")) + +instance ToJSON InstancesExportRequest where + toJSON InstancesExportRequest{..} + = object + (catMaybes + [("exportContext" .=) <$> _ierExportContext]) + +-- | Database list response. +-- +-- /See:/ 'databasesListResponse' smart constructor. +data DatabasesListResponse = DatabasesListResponse + { _dlrKind :: !Text + , _dlrItems :: !(Maybe [Maybe Database]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabasesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlrKind' +-- +-- * 'dlrItems' +databasesListResponse + :: DatabasesListResponse +databasesListResponse = + DatabasesListResponse + { _dlrKind = "sql#databasesList" + , _dlrItems = Nothing + } + +-- | This is always sql#databasesList. +dlrKind :: Lens' DatabasesListResponse Text +dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a}) + +-- | List of database resources in the instance. +dlrItems :: Lens' DatabasesListResponse [Maybe Database] +dlrItems + = lens _dlrItems (\ s a -> s{_dlrItems = a}) . + _Default + . _Coerce + +instance FromJSON DatabasesListResponse where + parseJSON + = withObject "DatabasesListResponse" + (\ o -> + DatabasesListResponse <$> + (o .:? "kind" .!= "sql#databasesList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON DatabasesListResponse where + toJSON DatabasesListResponse{..} + = object + (catMaybes + [Just ("kind" .= _dlrKind), + ("items" .=) <$> _dlrItems]) + +-- | Database instance list operations response. +-- +-- /See:/ 'operationsListResponse' smart constructor. +data OperationsListResponse = OperationsListResponse + { _olrNextPageToken :: !(Maybe Text) + , _olrKind :: !Text + , _olrItems :: !(Maybe [Maybe Operation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olrNextPageToken' +-- +-- * 'olrKind' +-- +-- * 'olrItems' +operationsListResponse + :: OperationsListResponse +operationsListResponse = + OperationsListResponse + { _olrNextPageToken = Nothing + , _olrKind = "sql#operationsList" + , _olrItems = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +olrNextPageToken :: Lens' OperationsListResponse (Maybe Text) +olrNextPageToken + = lens _olrNextPageToken + (\ s a -> s{_olrNextPageToken = a}) + +-- | This is always sql#operationsList. +olrKind :: Lens' OperationsListResponse Text +olrKind = lens _olrKind (\ s a -> s{_olrKind = a}) + +-- | List of operation resources. +olrItems :: Lens' OperationsListResponse [Maybe Operation] +olrItems + = lens _olrItems (\ s a -> s{_olrItems = a}) . + _Default + . _Coerce + +instance FromJSON OperationsListResponse where + parseJSON + = withObject "OperationsListResponse" + (\ o -> + OperationsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "sql#operationsList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON OperationsListResponse where + toJSON OperationsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _olrNextPageToken, + Just ("kind" .= _olrKind), + ("items" .=) <$> _olrItems]) + +-- | On-premises instance configuration. +-- +-- /See:/ 'onPremisesConfiguration' smart constructor. +data OnPremisesConfiguration = OnPremisesConfiguration + { _opcKind :: !Text + , _opcHostPort :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OnPremisesConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opcKind' +-- +-- * 'opcHostPort' +onPremisesConfiguration + :: OnPremisesConfiguration +onPremisesConfiguration = + OnPremisesConfiguration + { _opcKind = "sql#onPremisesConfiguration" + , _opcHostPort = Nothing + } + +-- | This is always sql#onPremisesConfiguration. +opcKind :: Lens' OnPremisesConfiguration Text +opcKind = lens _opcKind (\ s a -> s{_opcKind = a}) + +-- | The host and port of the on-premises instance in host:port format +opcHostPort :: Lens' OnPremisesConfiguration (Maybe Text) +opcHostPort + = lens _opcHostPort (\ s a -> s{_opcHostPort = a}) + +instance FromJSON OnPremisesConfiguration where + parseJSON + = withObject "OnPremisesConfiguration" + (\ o -> + OnPremisesConfiguration <$> + (o .:? "kind" .!= "sql#onPremisesConfiguration") <*> + (o .:? "hostPort")) + +instance ToJSON OnPremisesConfiguration where + toJSON OnPremisesConfiguration{..} + = object + (catMaybes + [Just ("kind" .= _opcKind), + ("hostPort" .=) <$> _opcHostPort]) + +-- | Database instance import context. +-- +-- /See:/ 'importContext' smart constructor. +data ImportContext = ImportContext + { _icDatabase :: !(Maybe Text) + , _icKind :: !Text + , _icCsvImportOptions :: !(Maybe ImportContextCSVImportOptions) + , _icUri :: !(Maybe Text) + , _icFileType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImportContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icDatabase' +-- +-- * 'icKind' +-- +-- * 'icCsvImportOptions' +-- +-- * 'icUri' +-- +-- * 'icFileType' +importContext + :: ImportContext +importContext = + ImportContext + { _icDatabase = Nothing + , _icKind = "sql#importContext" + , _icCsvImportOptions = Nothing + , _icUri = Nothing + , _icFileType = Nothing + } + +-- | The database (for example, guestbook) to which the import is made. If +-- fileType is SQL and no database is specified, it is assumed that the +-- database is specified in the file to be imported. If fileType is CSV, it +-- must be specified. +icDatabase :: Lens' ImportContext (Maybe Text) +icDatabase + = lens _icDatabase (\ s a -> s{_icDatabase = a}) + +-- | This is always sql#importContext. +icKind :: Lens' ImportContext Text +icKind = lens _icKind (\ s a -> s{_icKind = a}) + +-- | Options for importing data as CSV. +icCsvImportOptions :: Lens' ImportContext (Maybe ImportContextCSVImportOptions) +icCsvImportOptions + = lens _icCsvImportOptions + (\ s a -> s{_icCsvImportOptions = a}) + +-- | A path to the file in Google Cloud Storage from which the import is +-- made. The URI is in the form gs:\/\/bucketName\/fileName. Compressed +-- gzip files (.gz) are supported when fileType is SQL. +icUri :: Lens' ImportContext (Maybe Text) +icUri = lens _icUri (\ s a -> s{_icUri = a}) + +-- | The file type for the specified uri. SQL: The file contains SQL +-- statements. CSV: The file contains CSV data. +icFileType :: Lens' ImportContext (Maybe Text) +icFileType + = lens _icFileType (\ s a -> s{_icFileType = a}) + +instance FromJSON ImportContext where + parseJSON + = withObject "ImportContext" + (\ o -> + ImportContext <$> + (o .:? "database") <*> + (o .:? "kind" .!= "sql#importContext") + <*> (o .:? "csvImportOptions") + <*> (o .:? "uri") + <*> (o .:? "fileType")) + +instance ToJSON ImportContext where + toJSON ImportContext{..} + = object + (catMaybes + [("database" .=) <$> _icDatabase, + Just ("kind" .= _icKind), + ("csvImportOptions" .=) <$> _icCsvImportOptions, + ("uri" .=) <$> _icUri, + ("fileType" .=) <$> _icFileType]) + +-- | Database instance settings. +-- +-- /See:/ 'settings' smart constructor. +data Settings = Settings + { _sReplicationType :: !(Maybe Text) + , _sActivationPolicy :: !(Maybe Text) + , _sSettingsVersion :: !(Maybe Int64) + , _sAuthorizedGaeApplications :: !(Maybe [Text]) + , _sKind :: !Text + , _sPricingPlan :: !(Maybe Text) + , _sIpConfiguration :: !(Maybe (Maybe IPConfiguration)) + , _sDatabaseReplicationEnabled :: !(Maybe Bool) + , _sTier :: !(Maybe Text) + , _sDatabaseFlags :: !(Maybe [Maybe DatabaseFlags]) + , _sCrashSafeReplicationEnabled :: !(Maybe Bool) + , _sLocationPreference :: !(Maybe (Maybe LocationPreference)) + , _sBackupConfiguration :: !(Maybe (Maybe BackupConfiguration)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Settings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sReplicationType' +-- +-- * 'sActivationPolicy' +-- +-- * 'sSettingsVersion' +-- +-- * 'sAuthorizedGaeApplications' +-- +-- * 'sKind' +-- +-- * 'sPricingPlan' +-- +-- * 'sIpConfiguration' +-- +-- * 'sDatabaseReplicationEnabled' +-- +-- * 'sTier' +-- +-- * 'sDatabaseFlags' +-- +-- * 'sCrashSafeReplicationEnabled' +-- +-- * 'sLocationPreference' +-- +-- * 'sBackupConfiguration' +settings + :: Settings +settings = + Settings + { _sReplicationType = Nothing + , _sActivationPolicy = Nothing + , _sSettingsVersion = Nothing + , _sAuthorizedGaeApplications = Nothing + , _sKind = "sql#settings" + , _sPricingPlan = Nothing + , _sIpConfiguration = Nothing + , _sDatabaseReplicationEnabled = Nothing + , _sTier = Nothing + , _sDatabaseFlags = Nothing + , _sCrashSafeReplicationEnabled = Nothing + , _sLocationPreference = Nothing + , _sBackupConfiguration = Nothing + } + +-- | The type of replication this instance uses. This can be either +-- ASYNCHRONOUS or SYNCHRONOUS. +sReplicationType :: Lens' Settings (Maybe Text) +sReplicationType + = lens _sReplicationType + (\ s a -> s{_sReplicationType = a}) + +-- | The activation policy for this instance. This specifies when the +-- instance should be activated and is applicable only when the instance +-- state is RUNNABLE. This can be one of the following. ALWAYS: The +-- instance should always be active. NEVER: The instance should never be +-- activated. ON_DEMAND: The instance is activated upon receiving requests. +sActivationPolicy :: Lens' Settings (Maybe Text) +sActivationPolicy + = lens _sActivationPolicy + (\ s a -> s{_sActivationPolicy = a}) + +-- | The version of instance settings. This is a required field for update +-- method to make sure concurrent updates are handled properly. During +-- update, use the most recent settingsVersion value for this instance and +-- do not try to update this value. +sSettingsVersion :: Lens' Settings (Maybe Int64) +sSettingsVersion + = lens _sSettingsVersion + (\ s a -> s{_sSettingsVersion = a}) + +-- | The App Engine app IDs that can access this instance. +sAuthorizedGaeApplications :: Lens' Settings [Text] +sAuthorizedGaeApplications + = lens _sAuthorizedGaeApplications + (\ s a -> s{_sAuthorizedGaeApplications = a}) + . _Default + . _Coerce + +-- | This is always sql#settings. +sKind :: Lens' Settings Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | The pricing plan for this instance. This can be either PER_USE or +-- PACKAGE. +sPricingPlan :: Lens' Settings (Maybe Text) +sPricingPlan + = lens _sPricingPlan (\ s a -> s{_sPricingPlan = a}) + +-- | The settings for IP Management. This allows to enable or disable the +-- instance IP and manage which external networks can connect to the +-- instance. +sIpConfiguration :: Lens' Settings (Maybe (Maybe IPConfiguration)) +sIpConfiguration + = lens _sIpConfiguration + (\ s a -> s{_sIpConfiguration = a}) + +-- | Configuration specific to read replica instances. Indicates whether +-- replication is enabled or not. +sDatabaseReplicationEnabled :: Lens' Settings (Maybe Bool) +sDatabaseReplicationEnabled + = lens _sDatabaseReplicationEnabled + (\ s a -> s{_sDatabaseReplicationEnabled = a}) + +-- | The tier of service for this instance, for example D1, D2. For more +-- information, see pricing. +sTier :: Lens' Settings (Maybe Text) +sTier = lens _sTier (\ s a -> s{_sTier = a}) + +-- | The database flags passed to the instance at startup. +sDatabaseFlags :: Lens' Settings [Maybe DatabaseFlags] +sDatabaseFlags + = lens _sDatabaseFlags + (\ s a -> s{_sDatabaseFlags = a}) + . _Default + . _Coerce + +-- | Configuration specific to read replica instances. Indicates whether +-- database flags for crash-safe replication are enabled. +sCrashSafeReplicationEnabled :: Lens' Settings (Maybe Bool) +sCrashSafeReplicationEnabled + = lens _sCrashSafeReplicationEnabled + (\ s a -> s{_sCrashSafeReplicationEnabled = a}) + +-- | The location preference settings. This allows the instance to be located +-- as near as possible to either an App Engine app or GCE zone for better +-- performance. +sLocationPreference :: Lens' Settings (Maybe (Maybe LocationPreference)) +sLocationPreference + = lens _sLocationPreference + (\ s a -> s{_sLocationPreference = a}) + +-- | The daily backup configuration for the instance. +sBackupConfiguration :: Lens' Settings (Maybe (Maybe BackupConfiguration)) +sBackupConfiguration + = lens _sBackupConfiguration + (\ s a -> s{_sBackupConfiguration = a}) + +instance FromJSON Settings where + parseJSON + = withObject "Settings" + (\ o -> + Settings <$> + (o .:? "replicationType") <*> + (o .:? "activationPolicy") + <*> (o .:? "settingsVersion") + <*> (o .:? "authorizedGaeApplications" .!= mempty) + <*> (o .:? "kind" .!= "sql#settings") + <*> (o .:? "pricingPlan") + <*> (o .:? "ipConfiguration") + <*> (o .:? "databaseReplicationEnabled") + <*> (o .:? "tier") + <*> (o .:? "databaseFlags" .!= mempty) + <*> (o .:? "crashSafeReplicationEnabled") + <*> (o .:? "locationPreference") + <*> (o .:? "backupConfiguration")) + +instance ToJSON Settings where + toJSON Settings{..} + = object + (catMaybes + [("replicationType" .=) <$> _sReplicationType, + ("activationPolicy" .=) <$> _sActivationPolicy, + ("settingsVersion" .=) <$> _sSettingsVersion, + ("authorizedGaeApplications" .=) <$> + _sAuthorizedGaeApplications, + Just ("kind" .= _sKind), + ("pricingPlan" .=) <$> _sPricingPlan, + ("ipConfiguration" .=) <$> _sIpConfiguration, + ("databaseReplicationEnabled" .=) <$> + _sDatabaseReplicationEnabled, + ("tier" .=) <$> _sTier, + ("databaseFlags" .=) <$> _sDatabaseFlags, + ("crashSafeReplicationEnabled" .=) <$> + _sCrashSafeReplicationEnabled, + ("locationPreference" .=) <$> _sLocationPreference, + ("backupConfiguration" .=) <$> + _sBackupConfiguration]) + +-- | SslCerts create ephemeral certificate request. +-- +-- /See:/ 'sSLCertsCreateEphemeralRequest' smart constructor. +newtype SSLCertsCreateEphemeralRequest = SSLCertsCreateEphemeralRequest + { _sccerPublicKey :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsCreateEphemeralRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sccerPublicKey' +sSLCertsCreateEphemeralRequest + :: SSLCertsCreateEphemeralRequest +sSLCertsCreateEphemeralRequest = + SSLCertsCreateEphemeralRequest + { _sccerPublicKey = Nothing + } + +-- | PEM encoded public key to include in the signed certificate. +sccerPublicKey :: Lens' SSLCertsCreateEphemeralRequest (Maybe Text) +sccerPublicKey + = lens _sccerPublicKey + (\ s a -> s{_sccerPublicKey = a}) + +instance FromJSON SSLCertsCreateEphemeralRequest + where + parseJSON + = withObject "SSLCertsCreateEphemeralRequest" + (\ o -> + SSLCertsCreateEphemeralRequest <$> + (o .:? "public_key")) + +instance ToJSON SSLCertsCreateEphemeralRequest where + toJSON SSLCertsCreateEphemeralRequest{..} + = object + (catMaybes [("public_key" .=) <$> _sccerPublicKey]) + +-- | A database resource inside a Cloud SQL instance. +-- +-- /See:/ 'database' smart constructor. +data Database = Database + { _dEtag :: !(Maybe Text) + , _dProject :: !(Maybe Text) + , _dKind :: !Text + , _dCollation :: !(Maybe Text) + , _dSelfLink :: !(Maybe Text) + , _dName :: !(Maybe Text) + , _dCharset :: !(Maybe Text) + , _dInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Database' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dEtag' +-- +-- * 'dProject' +-- +-- * 'dKind' +-- +-- * 'dCollation' +-- +-- * 'dSelfLink' +-- +-- * 'dName' +-- +-- * 'dCharset' +-- +-- * 'dInstance' +database + :: Database +database = + Database + { _dEtag = Nothing + , _dProject = Nothing + , _dKind = "sql#database" + , _dCollation = Nothing + , _dSelfLink = Nothing + , _dName = Nothing + , _dCharset = Nothing + , _dInstance = Nothing + } + +-- | HTTP 1.1 Entity tag for the resource. +dEtag :: Lens' Database (Maybe Text) +dEtag = lens _dEtag (\ s a -> s{_dEtag = a}) + +-- | The project ID of the project containing the Cloud SQL database. The +-- Google apps domain is prefixed if applicable. +dProject :: Lens' Database (Maybe Text) +dProject = lens _dProject (\ s a -> s{_dProject = a}) + +-- | This is always sql#database. +dKind :: Lens' Database Text +dKind = lens _dKind (\ s a -> s{_dKind = a}) + +-- | The MySQL collation value. +dCollation :: Lens' Database (Maybe Text) +dCollation + = lens _dCollation (\ s a -> s{_dCollation = a}) + +-- | The URI of this resource. +dSelfLink :: Lens' Database (Maybe Text) +dSelfLink + = lens _dSelfLink (\ s a -> s{_dSelfLink = a}) + +-- | The name of the database in the Cloud SQL instance. This does not +-- include the project ID or instance name. +dName :: Lens' Database (Maybe Text) +dName = lens _dName (\ s a -> s{_dName = a}) + +-- | The MySQL charset value. +dCharset :: Lens' Database (Maybe Text) +dCharset = lens _dCharset (\ s a -> s{_dCharset = a}) + +-- | The name of the Cloud SQL instance. This does not include the project +-- ID. +dInstance :: Lens' Database (Maybe Text) +dInstance + = lens _dInstance (\ s a -> s{_dInstance = a}) + +instance FromJSON Database where + parseJSON + = withObject "Database" + (\ o -> + Database <$> + (o .:? "etag") <*> (o .:? "project") <*> + (o .:? "kind" .!= "sql#database") + <*> (o .:? "collation") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "charset") + <*> (o .:? "instance")) + +instance ToJSON Database where + toJSON Database{..} + = object + (catMaybes + [("etag" .=) <$> _dEtag, + ("project" .=) <$> _dProject, + Just ("kind" .= _dKind), + ("collation" .=) <$> _dCollation, + ("selfLink" .=) <$> _dSelfLink, + ("name" .=) <$> _dName, ("charset" .=) <$> _dCharset, + ("instance" .=) <$> _dInstance]) + +-- | Database instance IP Mapping. +-- +-- /See:/ 'iPMapping' smart constructor. +data IPMapping = IPMapping + { _imIpAddress :: !(Maybe Text) + , _imTimeToRetire :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IPMapping' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'imIpAddress' +-- +-- * 'imTimeToRetire' +iPMapping + :: IPMapping +iPMapping = + IPMapping + { _imIpAddress = Nothing + , _imTimeToRetire = Nothing + } + +-- | The IP address assigned. +imIpAddress :: Lens' IPMapping (Maybe Text) +imIpAddress + = lens _imIpAddress (\ s a -> s{_imIpAddress = a}) + +-- | The due time for this IP to be retired in RFC 3339 format, for example +-- 2012-11-15T16:19:00.094Z. This field is only available when the IP is +-- scheduled to be retired. +imTimeToRetire :: Lens' IPMapping (Maybe UTCTime) +imTimeToRetire + = lens _imTimeToRetire + (\ s a -> s{_imTimeToRetire = a}) + +instance FromJSON IPMapping where + parseJSON + = withObject "IPMapping" + (\ o -> + IPMapping <$> + (o .:? "ipAddress") <*> (o .:? "timeToRetire")) + +instance ToJSON IPMapping where + toJSON IPMapping{..} + = object + (catMaybes + [("ipAddress" .=) <$> _imIpAddress, + ("timeToRetire" .=) <$> _imTimeToRetire]) + +-- | An Operations resource contains information about database instance +-- operations such as create, delete, and restart. Operations resources are +-- created in response to operations that were initiated; you never create +-- them directly. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oTargetId :: !(Maybe Text) + , _oTargetProject :: !(Maybe Text) + , _oStatus :: !(Maybe Text) + , _oInsertTime :: !(Maybe UTCTime) + , _oImportContext :: !(Maybe (Maybe ImportContext)) + , _oStartTime :: !(Maybe UTCTime) + , _oKind :: !Text + , _oError :: !(Maybe (Maybe OperationErrors)) + , _oExportContext :: !(Maybe (Maybe ExportContext)) + , _oUser :: !(Maybe Text) + , _oSelfLink :: !(Maybe Text) + , _oName :: !(Maybe Text) + , _oEndTime :: !(Maybe UTCTime) + , _oOperationType :: !(Maybe Text) + , _oTargetLink :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oTargetId' +-- +-- * 'oTargetProject' +-- +-- * 'oStatus' +-- +-- * 'oInsertTime' +-- +-- * 'oImportContext' +-- +-- * 'oStartTime' +-- +-- * 'oKind' +-- +-- * 'oError' +-- +-- * 'oExportContext' +-- +-- * 'oUser' +-- +-- * 'oSelfLink' +-- +-- * 'oName' +-- +-- * 'oEndTime' +-- +-- * 'oOperationType' +-- +-- * 'oTargetLink' +operation + :: Operation +operation = + Operation + { _oTargetId = Nothing + , _oTargetProject = Nothing + , _oStatus = Nothing + , _oInsertTime = Nothing + , _oImportContext = Nothing + , _oStartTime = Nothing + , _oKind = "sql#operation" + , _oError = Nothing + , _oExportContext = Nothing + , _oUser = Nothing + , _oSelfLink = Nothing + , _oName = Nothing + , _oEndTime = Nothing + , _oOperationType = Nothing + , _oTargetLink = Nothing + } + +-- | Name of the database instance related to this operation. +oTargetId :: Lens' Operation (Maybe Text) +oTargetId + = lens _oTargetId (\ s a -> s{_oTargetId = a}) + +-- | The project ID of the target instance related to this operation. +oTargetProject :: Lens' Operation (Maybe Text) +oTargetProject + = lens _oTargetProject + (\ s a -> s{_oTargetProject = a}) + +-- | The status of an operation. Valid values are PENDING, RUNNING, DONE, +-- UNKNOWN. +oStatus :: Lens' Operation (Maybe Text) +oStatus = lens _oStatus (\ s a -> s{_oStatus = a}) + +-- | The time this operation was enqueued in UTC timezone in RFC 3339 format, +-- for example 2012-11-15T16:19:00.094Z. +oInsertTime :: Lens' Operation (Maybe UTCTime) +oInsertTime + = lens _oInsertTime (\ s a -> s{_oInsertTime = a}) + +-- | The context for import operation, if applicable. +oImportContext :: Lens' Operation (Maybe (Maybe ImportContext)) +oImportContext + = lens _oImportContext + (\ s a -> s{_oImportContext = a}) + +-- | The time this operation actually started in UTC timezone in RFC 3339 +-- format, for example 2012-11-15T16:19:00.094Z. +oStartTime :: Lens' Operation (Maybe UTCTime) +oStartTime + = lens _oStartTime (\ s a -> s{_oStartTime = a}) + +-- | This is always sql#operation. +oKind :: Lens' Operation Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | If errors occurred during processing of this operation, this field will +-- be populated. +oError :: Lens' Operation (Maybe (Maybe OperationErrors)) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | The context for export operation, if applicable. +oExportContext :: Lens' Operation (Maybe (Maybe ExportContext)) +oExportContext + = lens _oExportContext + (\ s a -> s{_oExportContext = a}) + +-- | The email address of the user who initiated this operation. +oUser :: Lens' Operation (Maybe Text) +oUser = lens _oUser (\ s a -> s{_oUser = a}) + +-- | The URI of this resource. +oSelfLink :: Lens' Operation (Maybe Text) +oSelfLink + = lens _oSelfLink (\ s a -> s{_oSelfLink = a}) + +-- | An identifier that uniquely identifies the operation. You can use this +-- identifier to retrieve the Operations resource that has information +-- about the operation. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | The time this operation finished in UTC timezone in RFC 3339 format, for +-- example 2012-11-15T16:19:00.094Z. +oEndTime :: Lens' Operation (Maybe UTCTime) +oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a}) + +-- | The type of the operation. Valid values are CREATE, DELETE, UPDATE, +-- RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, +-- DELETE_USER, CREATE_DATABASE, DELETE_DATABASE . +oOperationType :: Lens' Operation (Maybe Text) +oOperationType + = lens _oOperationType + (\ s a -> s{_oOperationType = a}) + +-- | The URI of the instance related to the operation. +oTargetLink :: Lens' Operation (Maybe Text) +oTargetLink + = lens _oTargetLink (\ s a -> s{_oTargetLink = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "targetId") <*> (o .:? "targetProject") <*> + (o .:? "status") + <*> (o .:? "insertTime") + <*> (o .:? "importContext") + <*> (o .:? "startTime") + <*> (o .:? "kind" .!= "sql#operation") + <*> (o .:? "error") + <*> (o .:? "exportContext") + <*> (o .:? "user") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "endTime") + <*> (o .:? "operationType") + <*> (o .:? "targetLink")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("targetId" .=) <$> _oTargetId, + ("targetProject" .=) <$> _oTargetProject, + ("status" .=) <$> _oStatus, + ("insertTime" .=) <$> _oInsertTime, + ("importContext" .=) <$> _oImportContext, + ("startTime" .=) <$> _oStartTime, + Just ("kind" .= _oKind), ("error" .=) <$> _oError, + ("exportContext" .=) <$> _oExportContext, + ("user" .=) <$> _oUser, + ("selfLink" .=) <$> _oSelfLink, + ("name" .=) <$> _oName, ("endTime" .=) <$> _oEndTime, + ("operationType" .=) <$> _oOperationType, + ("targetLink" .=) <$> _oTargetLink]) + +-- | Tiers list response. +-- +-- /See:/ 'tiersListResponse' smart constructor. +data TiersListResponse = TiersListResponse + { _tlrKind :: !Text + , _tlrItems :: !(Maybe [Maybe Tier]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TiersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrKind' +-- +-- * 'tlrItems' +tiersListResponse + :: TiersListResponse +tiersListResponse = + TiersListResponse + { _tlrKind = "sql#tiersList" + , _tlrItems = Nothing + } + +-- | This is always sql#tiersList. +tlrKind :: Lens' TiersListResponse Text +tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a}) + +-- | List of tiers. +tlrItems :: Lens' TiersListResponse [Maybe Tier] +tlrItems + = lens _tlrItems (\ s a -> s{_tlrItems = a}) . + _Default + . _Coerce + +instance FromJSON TiersListResponse where + parseJSON + = withObject "TiersListResponse" + (\ o -> + TiersListResponse <$> + (o .:? "kind" .!= "sql#tiersList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON TiersListResponse where + toJSON TiersListResponse{..} + = object + (catMaybes + [Just ("kind" .= _tlrKind), + ("items" .=) <$> _tlrItems]) + +-- | Binary log coordinates. +-- +-- /See:/ 'binLogCoordinates' smart constructor. +data BinLogCoordinates = BinLogCoordinates + { _blcBinLogPosition :: !(Maybe Int64) + , _blcKind :: !Text + , _blcBinLogFileName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BinLogCoordinates' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blcBinLogPosition' +-- +-- * 'blcKind' +-- +-- * 'blcBinLogFileName' +binLogCoordinates + :: BinLogCoordinates +binLogCoordinates = + BinLogCoordinates + { _blcBinLogPosition = Nothing + , _blcKind = "sql#binLogCoordinates" + , _blcBinLogFileName = Nothing + } + +-- | Position (offset) within the binary log file. +blcBinLogPosition :: Lens' BinLogCoordinates (Maybe Int64) +blcBinLogPosition + = lens _blcBinLogPosition + (\ s a -> s{_blcBinLogPosition = a}) + +-- | This is always sql#binLogCoordinates. +blcKind :: Lens' BinLogCoordinates Text +blcKind = lens _blcKind (\ s a -> s{_blcKind = a}) + +-- | Name of the binary log file for a Cloud SQL instance. +blcBinLogFileName :: Lens' BinLogCoordinates (Maybe Text) +blcBinLogFileName + = lens _blcBinLogFileName + (\ s a -> s{_blcBinLogFileName = a}) + +instance FromJSON BinLogCoordinates where + parseJSON + = withObject "BinLogCoordinates" + (\ o -> + BinLogCoordinates <$> + (o .:? "binLogPosition") <*> + (o .:? "kind" .!= "sql#binLogCoordinates") + <*> (o .:? "binLogFileName")) + +instance ToJSON BinLogCoordinates where + toJSON BinLogCoordinates{..} + = object + (catMaybes + [("binLogPosition" .=) <$> _blcBinLogPosition, + Just ("kind" .= _blcKind), + ("binLogFileName" .=) <$> _blcBinLogFileName]) + +-- | Database instance export context. +-- +-- /See:/ 'exportContext' smart constructor. +data ExportContext = ExportContext + { _ecCsvExportOptions :: !(Maybe ExportContextCSVExportOptions) + , _ecKind :: !Text + , _ecUri :: !(Maybe Text) + , _ecFileType :: !(Maybe Text) + , _ecSqlExportOptions :: !(Maybe ExportContextSqlExportOptions) + , _ecDatabases :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ExportContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ecCsvExportOptions' +-- +-- * 'ecKind' +-- +-- * 'ecUri' +-- +-- * 'ecFileType' +-- +-- * 'ecSqlExportOptions' +-- +-- * 'ecDatabases' +exportContext + :: ExportContext +exportContext = + ExportContext + { _ecCsvExportOptions = Nothing + , _ecKind = "sql#exportContext" + , _ecUri = Nothing + , _ecFileType = Nothing + , _ecSqlExportOptions = Nothing + , _ecDatabases = Nothing + } + +-- | Options for exporting data as CSV. +ecCsvExportOptions :: Lens' ExportContext (Maybe ExportContextCSVExportOptions) +ecCsvExportOptions + = lens _ecCsvExportOptions + (\ s a -> s{_ecCsvExportOptions = a}) + +-- | This is always sql#exportContext. +ecKind :: Lens' ExportContext Text +ecKind = lens _ecKind (\ s a -> s{_ecKind = a}) + +-- | The path to the file in Google Cloud Storage where the export will be +-- stored. The URI is in the form gs:\/\/bucketName\/fileName. If the file +-- already exists, the operation fails. If fileType is SQL and the filename +-- ends with .gz, the contents are compressed. +ecUri :: Lens' ExportContext (Maybe Text) +ecUri = lens _ecUri (\ s a -> s{_ecUri = a}) + +-- | The file type for the specified uri. SQL: The file contains SQL +-- statements. CSV: The file contains CSV data. +ecFileType :: Lens' ExportContext (Maybe Text) +ecFileType + = lens _ecFileType (\ s a -> s{_ecFileType = a}) + +-- | Options for exporting data as SQL statements. +ecSqlExportOptions :: Lens' ExportContext (Maybe ExportContextSqlExportOptions) +ecSqlExportOptions + = lens _ecSqlExportOptions + (\ s a -> s{_ecSqlExportOptions = a}) + +-- | Databases (for example, guestbook) from which the export is made. If +-- fileType is SQL and no database is specified, all databases are +-- exported. If fileType is CSV, you can optionally specify at most one +-- database to export. If csvExportOptions.selectQuery also specifies the +-- database, this field will be ignored. +ecDatabases :: Lens' ExportContext [Text] +ecDatabases + = lens _ecDatabases (\ s a -> s{_ecDatabases = a}) . + _Default + . _Coerce + +instance FromJSON ExportContext where + parseJSON + = withObject "ExportContext" + (\ o -> + ExportContext <$> + (o .:? "csvExportOptions") <*> + (o .:? "kind" .!= "sql#exportContext") + <*> (o .:? "uri") + <*> (o .:? "fileType") + <*> (o .:? "sqlExportOptions") + <*> (o .:? "databases" .!= mempty)) + +instance ToJSON ExportContext where + toJSON ExportContext{..} + = object + (catMaybes + [("csvExportOptions" .=) <$> _ecCsvExportOptions, + Just ("kind" .= _ecKind), ("uri" .=) <$> _ecUri, + ("fileType" .=) <$> _ecFileType, + ("sqlExportOptions" .=) <$> _ecSqlExportOptions, + ("databases" .=) <$> _ecDatabases]) + +-- | User list response. +-- +-- /See:/ 'usersListResponse' smart constructor. +data UsersListResponse = UsersListResponse + { _ulrNextPageToken :: !(Maybe Text) + , _ulrKind :: !Text + , _ulrItems :: !(Maybe [Maybe User]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UsersListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulrNextPageToken' +-- +-- * 'ulrKind' +-- +-- * 'ulrItems' +usersListResponse + :: UsersListResponse +usersListResponse = + UsersListResponse + { _ulrNextPageToken = Nothing + , _ulrKind = "sql#usersList" + , _ulrItems = Nothing + } + +-- | An identifier that uniquely identifies the operation. You can use this +-- identifier to retrieve the Operations resource that has information +-- about the operation. +ulrNextPageToken :: Lens' UsersListResponse (Maybe Text) +ulrNextPageToken + = lens _ulrNextPageToken + (\ s a -> s{_ulrNextPageToken = a}) + +-- | This is always sql#usersList. +ulrKind :: Lens' UsersListResponse Text +ulrKind = lens _ulrKind (\ s a -> s{_ulrKind = a}) + +-- | List of user resources in the instance. +ulrItems :: Lens' UsersListResponse [Maybe User] +ulrItems + = lens _ulrItems (\ s a -> s{_ulrItems = a}) . + _Default + . _Coerce + +instance FromJSON UsersListResponse where + parseJSON + = withObject "UsersListResponse" + (\ o -> + UsersListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "sql#usersList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON UsersListResponse where + toJSON UsersListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ulrNextPageToken, + Just ("kind" .= _ulrKind), + ("items" .=) <$> _ulrItems]) + +-- | Database instance operation errors list wrapper. +-- +-- /See:/ 'operationErrors' smart constructor. +data OperationErrors = OperationErrors + { _oeKind :: !Text + , _oeErrors :: !(Maybe [Maybe OperationError]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationErrors' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oeKind' +-- +-- * 'oeErrors' +operationErrors + :: OperationErrors +operationErrors = + OperationErrors + { _oeKind = "sql#operationErrors" + , _oeErrors = Nothing + } + +-- | This is always sql#operationErrors. +oeKind :: Lens' OperationErrors Text +oeKind = lens _oeKind (\ s a -> s{_oeKind = a}) + +-- | The list of errors encountered while processing this operation. +oeErrors :: Lens' OperationErrors [Maybe OperationError] +oeErrors + = lens _oeErrors (\ s a -> s{_oeErrors = a}) . + _Default + . _Coerce + +instance FromJSON OperationErrors where + parseJSON + = withObject "OperationErrors" + (\ o -> + OperationErrors <$> + (o .:? "kind" .!= "sql#operationErrors") <*> + (o .:? "errors" .!= mempty)) + +instance ToJSON OperationErrors where + toJSON OperationErrors{..} + = object + (catMaybes + [Just ("kind" .= _oeKind), + ("errors" .=) <$> _oeErrors]) + +-- | SslCerts list response. +-- +-- /See:/ 'sSLCertsListResponse' smart constructor. +data SSLCertsListResponse = SSLCertsListResponse + { _sclrKind :: !Text + , _sclrItems :: !(Maybe [Maybe SSLCert]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sclrKind' +-- +-- * 'sclrItems' +sSLCertsListResponse + :: SSLCertsListResponse +sSLCertsListResponse = + SSLCertsListResponse + { _sclrKind = "sql#sslCertsList" + , _sclrItems = Nothing + } + +-- | This is always sql#sslCertsList. +sclrKind :: Lens' SSLCertsListResponse Text +sclrKind = lens _sclrKind (\ s a -> s{_sclrKind = a}) + +-- | List of client certificates for the instance. +sclrItems :: Lens' SSLCertsListResponse [Maybe SSLCert] +sclrItems + = lens _sclrItems (\ s a -> s{_sclrItems = a}) . + _Default + . _Coerce + +instance FromJSON SSLCertsListResponse where + parseJSON + = withObject "SSLCertsListResponse" + (\ o -> + SSLCertsListResponse <$> + (o .:? "kind" .!= "sql#sslCertsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON SSLCertsListResponse where + toJSON SSLCertsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _sclrKind), + ("items" .=) <$> _sclrItems]) + +-- | IP Management configuration. +-- +-- /See:/ 'iPConfiguration' smart constructor. +data IPConfiguration = IPConfiguration + { _icAuthorizedNetworks :: !(Maybe [Maybe ACLEntry]) + , _icRequireSsl :: !(Maybe Bool) + , _icIpv4Enabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IPConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icAuthorizedNetworks' +-- +-- * 'icRequireSsl' +-- +-- * 'icIpv4Enabled' +iPConfiguration + :: IPConfiguration +iPConfiguration = + IPConfiguration + { _icAuthorizedNetworks = Nothing + , _icRequireSsl = Nothing + , _icIpv4Enabled = Nothing + } + +-- | The list of external networks that are allowed to connect to the +-- instance using the IP. In CIDR notation, also known as \'slash\' +-- notation (e.g. 192.168.100.0\/24). +icAuthorizedNetworks :: Lens' IPConfiguration [Maybe ACLEntry] +icAuthorizedNetworks + = lens _icAuthorizedNetworks + (\ s a -> s{_icAuthorizedNetworks = a}) + . _Default + . _Coerce + +-- | Whether the mysqld should default to \'REQUIRE X509\' for users +-- connecting over IP. +icRequireSsl :: Lens' IPConfiguration (Maybe Bool) +icRequireSsl + = lens _icRequireSsl (\ s a -> s{_icRequireSsl = a}) + +-- | Whether the instance should be assigned an IP address or not. +icIpv4Enabled :: Lens' IPConfiguration (Maybe Bool) +icIpv4Enabled + = lens _icIpv4Enabled + (\ s a -> s{_icIpv4Enabled = a}) + +instance FromJSON IPConfiguration where + parseJSON + = withObject "IPConfiguration" + (\ o -> + IPConfiguration <$> + (o .:? "authorizedNetworks" .!= mempty) <*> + (o .:? "requireSsl") + <*> (o .:? "ipv4Enabled")) + +instance ToJSON IPConfiguration where + toJSON IPConfiguration{..} + = object + (catMaybes + [("authorizedNetworks" .=) <$> _icAuthorizedNetworks, + ("requireSsl" .=) <$> _icRequireSsl, + ("ipv4Enabled" .=) <$> _icIpv4Enabled]) + +-- | SslCerts insert request. +-- +-- /See:/ 'sSLCertsInsertRequest' smart constructor. +newtype SSLCertsInsertRequest = SSLCertsInsertRequest + { _scirCommonName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsInsertRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scirCommonName' +sSLCertsInsertRequest + :: SSLCertsInsertRequest +sSLCertsInsertRequest = + SSLCertsInsertRequest + { _scirCommonName = Nothing + } + +-- | User supplied name. Must be a distinct name from the other certificates +-- for this instance. New certificates will not be usable until the +-- instance is restarted. +scirCommonName :: Lens' SSLCertsInsertRequest (Maybe Text) +scirCommonName + = lens _scirCommonName + (\ s a -> s{_scirCommonName = a}) + +instance FromJSON SSLCertsInsertRequest where + parseJSON + = withObject "SSLCertsInsertRequest" + (\ o -> + SSLCertsInsertRequest <$> (o .:? "commonName")) + +instance ToJSON SSLCertsInsertRequest where + toJSON SSLCertsInsertRequest{..} + = object + (catMaybes [("commonName" .=) <$> _scirCommonName]) + +-- | A Cloud SQL user resource. +-- +-- /See:/ 'user' smart constructor. +data User = User + { _uEtag :: !(Maybe Text) + , _uProject :: !(Maybe Text) + , _uKind :: !Text + , _uName :: !(Maybe Text) + , _uPassword :: !(Maybe Text) + , _uHost :: !(Maybe Text) + , _uInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'User' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uEtag' +-- +-- * 'uProject' +-- +-- * 'uKind' +-- +-- * 'uName' +-- +-- * 'uPassword' +-- +-- * 'uHost' +-- +-- * 'uInstance' +user + :: User +user = + User + { _uEtag = Nothing + , _uProject = Nothing + , _uKind = "sql#user" + , _uName = Nothing + , _uPassword = Nothing + , _uHost = Nothing + , _uInstance = Nothing + } + +-- | HTTP 1.1 Entity tag for the resource. +uEtag :: Lens' User (Maybe Text) +uEtag = lens _uEtag (\ s a -> s{_uEtag = a}) + +-- | The project ID of the project containing the Cloud SQL database. The +-- Google apps domain is prefixed if applicable. Can be omitted for update +-- since it is already specified on the URL. +uProject :: Lens' User (Maybe Text) +uProject = lens _uProject (\ s a -> s{_uProject = a}) + +-- | This is always sql#user. +uKind :: Lens' User Text +uKind = lens _uKind (\ s a -> s{_uKind = a}) + +-- | The name of the user in the Cloud SQL instance. Can be omitted for +-- update since it is already specified on the URL. +uName :: Lens' User (Maybe Text) +uName = lens _uName (\ s a -> s{_uName = a}) + +-- | The password for the user. +uPassword :: Lens' User (Maybe Text) +uPassword + = lens _uPassword (\ s a -> s{_uPassword = a}) + +-- | The host name from which the user can connect. For insert operations, +-- host defaults to an empty string. For update operations, host is +-- specified as part of the request URL. The host name is not mutable with +-- this API. +uHost :: Lens' User (Maybe Text) +uHost = lens _uHost (\ s a -> s{_uHost = a}) + +-- | The name of the Cloud SQL instance. This does not include the project +-- ID. Can be omitted for update since it is already specified on the URL. +uInstance :: Lens' User (Maybe Text) +uInstance + = lens _uInstance (\ s a -> s{_uInstance = a}) + +instance FromJSON User where + parseJSON + = withObject "User" + (\ o -> + User <$> + (o .:? "etag") <*> (o .:? "project") <*> + (o .:? "kind" .!= "sql#user") + <*> (o .:? "name") + <*> (o .:? "password") + <*> (o .:? "host") + <*> (o .:? "instance")) + +instance ToJSON User where + toJSON User{..} + = object + (catMaybes + [("etag" .=) <$> _uEtag, + ("project" .=) <$> _uProject, + Just ("kind" .= _uKind), ("name" .=) <$> _uName, + ("password" .=) <$> _uPassword, + ("host" .=) <$> _uHost, + ("instance" .=) <$> _uInstance]) + +-- | A Cloud SQL instance resource. +-- +-- /See:/ 'databaseInstance' smart constructor. +data DatabaseInstance = DatabaseInstance + { _diMaxDiskSize :: !(Maybe Int64) + , _diOnPremisesConfiguration :: !(Maybe (Maybe OnPremisesConfiguration)) + , _diEtag :: !(Maybe Text) + , _diState :: !(Maybe Text) + , _diIpv6Address :: !(Maybe Text) + , _diServerCaCert :: !(Maybe (Maybe SSLCert)) + , _diDatabaseVersion :: !(Maybe Text) + , _diProject :: !(Maybe Text) + , _diSettings :: !(Maybe (Maybe Settings)) + , _diKind :: !Text + , _diCurrentDiskSize :: !(Maybe Int64) + , _diInstanceType :: !(Maybe Text) + , _diReplicaNames :: !(Maybe [Text]) + , _diSelfLink :: !(Maybe Text) + , _diName :: !(Maybe Text) + , _diMasterInstanceName :: !(Maybe Text) + , _diReplicaConfiguration :: !(Maybe (Maybe ReplicaConfiguration)) + , _diRegion :: !(Maybe Text) + , _diServiceAccountEmailAddress :: !(Maybe Text) + , _diIpAddresses :: !(Maybe [Maybe IPMapping]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabaseInstance' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'diMaxDiskSize' +-- +-- * 'diOnPremisesConfiguration' +-- +-- * 'diEtag' +-- +-- * 'diState' +-- +-- * 'diIpv6Address' +-- +-- * 'diServerCaCert' +-- +-- * 'diDatabaseVersion' +-- +-- * 'diProject' +-- +-- * 'diSettings' +-- +-- * 'diKind' +-- +-- * 'diCurrentDiskSize' +-- +-- * 'diInstanceType' +-- +-- * 'diReplicaNames' +-- +-- * 'diSelfLink' +-- +-- * 'diName' +-- +-- * 'diMasterInstanceName' +-- +-- * 'diReplicaConfiguration' +-- +-- * 'diRegion' +-- +-- * 'diServiceAccountEmailAddress' +-- +-- * 'diIpAddresses' +databaseInstance + :: DatabaseInstance +databaseInstance = + DatabaseInstance + { _diMaxDiskSize = Nothing + , _diOnPremisesConfiguration = Nothing + , _diEtag = Nothing + , _diState = Nothing + , _diIpv6Address = Nothing + , _diServerCaCert = Nothing + , _diDatabaseVersion = Nothing + , _diProject = Nothing + , _diSettings = Nothing + , _diKind = "sql#instance" + , _diCurrentDiskSize = Nothing + , _diInstanceType = Nothing + , _diReplicaNames = Nothing + , _diSelfLink = Nothing + , _diName = Nothing + , _diMasterInstanceName = Nothing + , _diReplicaConfiguration = Nothing + , _diRegion = Nothing + , _diServiceAccountEmailAddress = Nothing + , _diIpAddresses = Nothing + } + +-- | The maximum disk size of the instance in bytes. +diMaxDiskSize :: Lens' DatabaseInstance (Maybe Int64) +diMaxDiskSize + = lens _diMaxDiskSize + (\ s a -> s{_diMaxDiskSize = a}) + +-- | Configuration specific to on-premises instances. +diOnPremisesConfiguration :: Lens' DatabaseInstance (Maybe (Maybe OnPremisesConfiguration)) +diOnPremisesConfiguration + = lens _diOnPremisesConfiguration + (\ s a -> s{_diOnPremisesConfiguration = a}) + +-- | HTTP 1.1 Entity tag for the resource. +diEtag :: Lens' DatabaseInstance (Maybe Text) +diEtag = lens _diEtag (\ s a -> s{_diEtag = a}) + +-- | The current serving state of the Cloud SQL instance. This can be one of +-- the following. RUNNABLE: The instance is running, or is ready to run +-- when accessed. SUSPENDED: The instance is not available, for example due +-- to problems with billing. PENDING_CREATE: The instance is being created. +-- MAINTENANCE: The instance is down for maintenance. FAILED: The instance +-- creation failed. UNKNOWN_STATE: The state of the instance is unknown. +diState :: Lens' DatabaseInstance (Maybe Text) +diState = lens _diState (\ s a -> s{_diState = a}) + +-- | The IPv6 address assigned to the instance. +diIpv6Address :: Lens' DatabaseInstance (Maybe Text) +diIpv6Address + = lens _diIpv6Address + (\ s a -> s{_diIpv6Address = a}) + +-- | SSL configuration. +diServerCaCert :: Lens' DatabaseInstance (Maybe (Maybe SSLCert)) +diServerCaCert + = lens _diServerCaCert + (\ s a -> s{_diServerCaCert = a}) + +-- | The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. +-- Defaults to MYSQL_5_5. The databaseVersion can not be changed after +-- instance creation. +diDatabaseVersion :: Lens' DatabaseInstance (Maybe Text) +diDatabaseVersion + = lens _diDatabaseVersion + (\ s a -> s{_diDatabaseVersion = a}) + +-- | The project ID of the project containing the Cloud SQL instance. The +-- Google apps domain is prefixed if applicable. +diProject :: Lens' DatabaseInstance (Maybe Text) +diProject + = lens _diProject (\ s a -> s{_diProject = a}) + +-- | The user settings. +diSettings :: Lens' DatabaseInstance (Maybe (Maybe Settings)) +diSettings + = lens _diSettings (\ s a -> s{_diSettings = a}) + +-- | This is always sql#instance. +diKind :: Lens' DatabaseInstance Text +diKind = lens _diKind (\ s a -> s{_diKind = a}) + +-- | The current disk usage of the instance in bytes. +diCurrentDiskSize :: Lens' DatabaseInstance (Maybe Int64) +diCurrentDiskSize + = lens _diCurrentDiskSize + (\ s a -> s{_diCurrentDiskSize = a}) + +-- | The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: +-- A Cloud SQL instance that is not replicating from a master. +-- ON_PREMISES_INSTANCE: An instance running on the customer\'s premises. +-- READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a +-- read-replica. +diInstanceType :: Lens' DatabaseInstance (Maybe Text) +diInstanceType + = lens _diInstanceType + (\ s a -> s{_diInstanceType = a}) + +-- | The replicas of the instance. +diReplicaNames :: Lens' DatabaseInstance [Text] +diReplicaNames + = lens _diReplicaNames + (\ s a -> s{_diReplicaNames = a}) + . _Default + . _Coerce + +-- | The URI of this resource. +diSelfLink :: Lens' DatabaseInstance (Maybe Text) +diSelfLink + = lens _diSelfLink (\ s a -> s{_diSelfLink = a}) + +-- | Name of the Cloud SQL instance. This does not include the project ID. +diName :: Lens' DatabaseInstance (Maybe Text) +diName = lens _diName (\ s a -> s{_diName = a}) + +-- | The name of the instance which will act as master in the replication +-- setup. +diMasterInstanceName :: Lens' DatabaseInstance (Maybe Text) +diMasterInstanceName + = lens _diMasterInstanceName + (\ s a -> s{_diMasterInstanceName = a}) + +-- | Configuration specific to read-replicas replicating from on-premises +-- masters. +diReplicaConfiguration :: Lens' DatabaseInstance (Maybe (Maybe ReplicaConfiguration)) +diReplicaConfiguration + = lens _diReplicaConfiguration + (\ s a -> s{_diReplicaConfiguration = a}) + +-- | The geographical region. Can be us-central, asia-east1 or europe-west1. +-- Defaults to us-central. The region can not be changed after instance +-- creation. +diRegion :: Lens' DatabaseInstance (Maybe Text) +diRegion = lens _diRegion (\ s a -> s{_diRegion = a}) + +-- | The service account email address assigned to the instance. +diServiceAccountEmailAddress :: Lens' DatabaseInstance (Maybe Text) +diServiceAccountEmailAddress + = lens _diServiceAccountEmailAddress + (\ s a -> s{_diServiceAccountEmailAddress = a}) + +-- | The assigned IP addresses for the instance. +diIpAddresses :: Lens' DatabaseInstance [Maybe IPMapping] +diIpAddresses + = lens _diIpAddresses + (\ s a -> s{_diIpAddresses = a}) + . _Default + . _Coerce + +instance FromJSON DatabaseInstance where + parseJSON + = withObject "DatabaseInstance" + (\ o -> + DatabaseInstance <$> + (o .:? "maxDiskSize") <*> + (o .:? "onPremisesConfiguration") + <*> (o .:? "etag") + <*> (o .:? "state") + <*> (o .:? "ipv6Address") + <*> (o .:? "serverCaCert") + <*> (o .:? "databaseVersion") + <*> (o .:? "project") + <*> (o .:? "settings") + <*> (o .:? "kind" .!= "sql#instance") + <*> (o .:? "currentDiskSize") + <*> (o .:? "instanceType") + <*> (o .:? "replicaNames" .!= mempty) + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "masterInstanceName") + <*> (o .:? "replicaConfiguration") + <*> (o .:? "region") + <*> (o .:? "serviceAccountEmailAddress") + <*> (o .:? "ipAddresses" .!= mempty)) + +instance ToJSON DatabaseInstance where + toJSON DatabaseInstance{..} + = object + (catMaybes + [("maxDiskSize" .=) <$> _diMaxDiskSize, + ("onPremisesConfiguration" .=) <$> + _diOnPremisesConfiguration, + ("etag" .=) <$> _diEtag, ("state" .=) <$> _diState, + ("ipv6Address" .=) <$> _diIpv6Address, + ("serverCaCert" .=) <$> _diServerCaCert, + ("databaseVersion" .=) <$> _diDatabaseVersion, + ("project" .=) <$> _diProject, + ("settings" .=) <$> _diSettings, + Just ("kind" .= _diKind), + ("currentDiskSize" .=) <$> _diCurrentDiskSize, + ("instanceType" .=) <$> _diInstanceType, + ("replicaNames" .=) <$> _diReplicaNames, + ("selfLink" .=) <$> _diSelfLink, + ("name" .=) <$> _diName, + ("masterInstanceName" .=) <$> _diMasterInstanceName, + ("replicaConfiguration" .=) <$> + _diReplicaConfiguration, + ("region" .=) <$> _diRegion, + ("serviceAccountEmailAddress" .=) <$> + _diServiceAccountEmailAddress, + ("ipAddresses" .=) <$> _diIpAddresses]) + +-- | A Google Cloud SQL service flag resource. +-- +-- /See:/ 'flag' smart constructor. +data Flag = Flag + { _fMaxValue :: !(Maybe Int64) + , _fKind :: !Text + , _fAppliesTo :: !(Maybe [Text]) + , _fName :: !(Maybe Text) + , _fAllowedStringValues :: !(Maybe [Text]) + , _fType :: !(Maybe Text) + , _fMinValue :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Flag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fMaxValue' +-- +-- * 'fKind' +-- +-- * 'fAppliesTo' +-- +-- * 'fName' +-- +-- * 'fAllowedStringValues' +-- +-- * 'fType' +-- +-- * 'fMinValue' +flag + :: Flag +flag = + Flag + { _fMaxValue = Nothing + , _fKind = "sql#flag" + , _fAppliesTo = Nothing + , _fName = Nothing + , _fAllowedStringValues = Nothing + , _fType = Nothing + , _fMinValue = Nothing + } + +-- | For INTEGER flags, the maximum allowed value. +fMaxValue :: Lens' Flag (Maybe Int64) +fMaxValue + = lens _fMaxValue (\ s a -> s{_fMaxValue = a}) + +-- | This is always sql#flag. +fKind :: Lens' Flag Text +fKind = lens _fKind (\ s a -> s{_fKind = a}) + +-- | The database version this flag applies to. Currently this can only be +-- [MYSQL_5_5]. +fAppliesTo :: Lens' Flag [Text] +fAppliesTo + = lens _fAppliesTo (\ s a -> s{_fAppliesTo = a}) . + _Default + . _Coerce + +-- | This is the name of the flag. Flag names always use underscores, not +-- hyphens, e.g. max_allowed_packet +fName :: Lens' Flag (Maybe Text) +fName = lens _fName (\ s a -> s{_fName = a}) + +-- | For STRING flags, a list of strings that the value can be set to. +fAllowedStringValues :: Lens' Flag [Text] +fAllowedStringValues + = lens _fAllowedStringValues + (\ s a -> s{_fAllowedStringValues = a}) + . _Default + . _Coerce + +-- | The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER +-- or NONE. NONE is used for flags which do not take a value, such as +-- skip_grant_tables. +fType :: Lens' Flag (Maybe Text) +fType = lens _fType (\ s a -> s{_fType = a}) + +-- | For INTEGER flags, the minimum allowed value. +fMinValue :: Lens' Flag (Maybe Int64) +fMinValue + = lens _fMinValue (\ s a -> s{_fMinValue = a}) + +instance FromJSON Flag where + parseJSON + = withObject "Flag" + (\ o -> + Flag <$> + (o .:? "maxValue") <*> (o .:? "kind" .!= "sql#flag") + <*> (o .:? "appliesTo" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "allowedStringValues" .!= mempty) + <*> (o .:? "type") + <*> (o .:? "minValue")) + +instance ToJSON Flag where + toJSON Flag{..} + = object + (catMaybes + [("maxValue" .=) <$> _fMaxValue, + Just ("kind" .= _fKind), + ("appliesTo" .=) <$> _fAppliesTo, + ("name" .=) <$> _fName, + ("allowedStringValues" .=) <$> _fAllowedStringValues, + ("type" .=) <$> _fType, + ("minValue" .=) <$> _fMinValue]) + +-- | Database instance clone context. +-- +-- /See:/ 'cloneContext' smart constructor. +data CloneContext = CloneContext + { _ccDestinationInstanceName :: !(Maybe Text) + , _ccBinLogCoordinates :: !(Maybe (Maybe BinLogCoordinates)) + , _ccKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CloneContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccDestinationInstanceName' +-- +-- * 'ccBinLogCoordinates' +-- +-- * 'ccKind' +cloneContext + :: CloneContext +cloneContext = + CloneContext + { _ccDestinationInstanceName = Nothing + , _ccBinLogCoordinates = Nothing + , _ccKind = "sql#cloneContext" + } + +-- | Name of the Cloud SQL instance to be created as a clone. +ccDestinationInstanceName :: Lens' CloneContext (Maybe Text) +ccDestinationInstanceName + = lens _ccDestinationInstanceName + (\ s a -> s{_ccDestinationInstanceName = a}) + +-- | Binary log coordinates, if specified, indentify the the position up to +-- which the source instance should be cloned. If not specified, the source +-- instance is cloned up to the most recent binary log coordintes. +ccBinLogCoordinates :: Lens' CloneContext (Maybe (Maybe BinLogCoordinates)) +ccBinLogCoordinates + = lens _ccBinLogCoordinates + (\ s a -> s{_ccBinLogCoordinates = a}) + +-- | This is always sql#cloneContext. +ccKind :: Lens' CloneContext Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +instance FromJSON CloneContext where + parseJSON + = withObject "CloneContext" + (\ o -> + CloneContext <$> + (o .:? "destinationInstanceName") <*> + (o .:? "binLogCoordinates") + <*> (o .:? "kind" .!= "sql#cloneContext")) + +instance ToJSON CloneContext where + toJSON CloneContext{..} + = object + (catMaybes + [("destinationInstanceName" .=) <$> + _ccDestinationInstanceName, + ("binLogCoordinates" .=) <$> _ccBinLogCoordinates, + Just ("kind" .= _ccKind)]) + +-- | A database instance backup run resource. +-- +-- /See:/ 'backupRun' smart constructor. +data BackupRun = BackupRun + { _brStatus :: !(Maybe Text) + , _brStartTime :: !(Maybe UTCTime) + , _brKind :: !Text + , _brError :: !(Maybe (Maybe OperationError)) + , _brWindowStartTime :: !(Maybe UTCTime) + , _brSelfLink :: !(Maybe Text) + , _brEndTime :: !(Maybe UTCTime) + , _brId :: !(Maybe Int64) + , _brEnqueuedTime :: !(Maybe UTCTime) + , _brInstance :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupRun' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brStatus' +-- +-- * 'brStartTime' +-- +-- * 'brKind' +-- +-- * 'brError' +-- +-- * 'brWindowStartTime' +-- +-- * 'brSelfLink' +-- +-- * 'brEndTime' +-- +-- * 'brId' +-- +-- * 'brEnqueuedTime' +-- +-- * 'brInstance' +backupRun + :: BackupRun +backupRun = + BackupRun + { _brStatus = Nothing + , _brStartTime = Nothing + , _brKind = "sql#backupRun" + , _brError = Nothing + , _brWindowStartTime = Nothing + , _brSelfLink = Nothing + , _brEndTime = Nothing + , _brId = Nothing + , _brEnqueuedTime = Nothing + , _brInstance = Nothing + } + +-- | The status of this run. +brStatus :: Lens' BackupRun (Maybe Text) +brStatus = lens _brStatus (\ s a -> s{_brStatus = a}) + +-- | The time the backup operation actually started in UTC timezone in RFC +-- 3339 format, for example 2012-11-15T16:19:00.094Z. +brStartTime :: Lens' BackupRun (Maybe UTCTime) +brStartTime + = lens _brStartTime (\ s a -> s{_brStartTime = a}) + +-- | This is always sql#backupRun. +brKind :: Lens' BackupRun Text +brKind = lens _brKind (\ s a -> s{_brKind = a}) + +-- | Information about why the backup operation failed. This is only present +-- if the run has the FAILED status. +brError :: Lens' BackupRun (Maybe (Maybe OperationError)) +brError = lens _brError (\ s a -> s{_brError = a}) + +-- | The start time of the backup window during which this the backup was +-- attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. +brWindowStartTime :: Lens' BackupRun (Maybe UTCTime) +brWindowStartTime + = lens _brWindowStartTime + (\ s a -> s{_brWindowStartTime = a}) + +-- | The URI of this resource. +brSelfLink :: Lens' BackupRun (Maybe Text) +brSelfLink + = lens _brSelfLink (\ s a -> s{_brSelfLink = a}) + +-- | The time the backup operation completed in UTC timezone in RFC 3339 +-- format, for example 2012-11-15T16:19:00.094Z. +brEndTime :: Lens' BackupRun (Maybe UTCTime) +brEndTime + = lens _brEndTime (\ s a -> s{_brEndTime = a}) + +-- | A unique identifier for this backup run. Note that this is unique only +-- within the scope of a particular Cloud SQL instance. +brId :: Lens' BackupRun (Maybe Int64) +brId = lens _brId (\ s a -> s{_brId = a}) + +-- | The time the run was enqueued in UTC timezone in RFC 3339 format, for +-- example 2012-11-15T16:19:00.094Z. +brEnqueuedTime :: Lens' BackupRun (Maybe UTCTime) +brEnqueuedTime + = lens _brEnqueuedTime + (\ s a -> s{_brEnqueuedTime = a}) + +-- | Name of the database instance. +brInstance :: Lens' BackupRun (Maybe Text) +brInstance + = lens _brInstance (\ s a -> s{_brInstance = a}) + +instance FromJSON BackupRun where + parseJSON + = withObject "BackupRun" + (\ o -> + BackupRun <$> + (o .:? "status") <*> (o .:? "startTime") <*> + (o .:? "kind" .!= "sql#backupRun") + <*> (o .:? "error") + <*> (o .:? "windowStartTime") + <*> (o .:? "selfLink") + <*> (o .:? "endTime") + <*> (o .:? "id") + <*> (o .:? "enqueuedTime") + <*> (o .:? "instance")) + +instance ToJSON BackupRun where + toJSON BackupRun{..} + = object + (catMaybes + [("status" .=) <$> _brStatus, + ("startTime" .=) <$> _brStartTime, + Just ("kind" .= _brKind), ("error" .=) <$> _brError, + ("windowStartTime" .=) <$> _brWindowStartTime, + ("selfLink" .=) <$> _brSelfLink, + ("endTime" .=) <$> _brEndTime, ("id" .=) <$> _brId, + ("enqueuedTime" .=) <$> _brEnqueuedTime, + ("instance" .=) <$> _brInstance]) + +-- | An entry for an Access Control list. +-- +-- /See:/ 'aCLEntry' smart constructor. +data ACLEntry = ACLEntry + { _aeKind :: !Text + , _aeValue :: !(Maybe Text) + , _aeName :: !(Maybe Text) + , _aeExpirationTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ACLEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aeKind' +-- +-- * 'aeValue' +-- +-- * 'aeName' +-- +-- * 'aeExpirationTime' +aCLEntry + :: ACLEntry +aCLEntry = + ACLEntry + { _aeKind = "sql#aclEntry" + , _aeValue = Nothing + , _aeName = Nothing + , _aeExpirationTime = Nothing + } + +-- | This is always sql#aclEntry. +aeKind :: Lens' ACLEntry Text +aeKind = lens _aeKind (\ s a -> s{_aeKind = a}) + +-- | The whitelisted value for the access control list. +aeValue :: Lens' ACLEntry (Maybe Text) +aeValue = lens _aeValue (\ s a -> s{_aeValue = a}) + +-- | An optional label to identify this entry. +aeName :: Lens' ACLEntry (Maybe Text) +aeName = lens _aeName (\ s a -> s{_aeName = a}) + +-- | The time when this access control entry expires in RFC 3339 format, for +-- example 2012-11-15T16:19:00.094Z. +aeExpirationTime :: Lens' ACLEntry (Maybe UTCTime) +aeExpirationTime + = lens _aeExpirationTime + (\ s a -> s{_aeExpirationTime = a}) + +instance FromJSON ACLEntry where + parseJSON + = withObject "ACLEntry" + (\ o -> + ACLEntry <$> + (o .:? "kind" .!= "sql#aclEntry") <*> (o .:? "value") + <*> (o .:? "name") + <*> (o .:? "expirationTime")) + +instance ToJSON ACLEntry where + toJSON ACLEntry{..} + = object + (catMaybes + [Just ("kind" .= _aeKind), ("value" .=) <$> _aeValue, + ("name" .=) <$> _aeName, + ("expirationTime" .=) <$> _aeExpirationTime]) + +-- | Read-replica configuration specific to MySQL databases. +-- +-- /See:/ 'mySqlReplicaConfiguration' smart constructor. +data MySqlReplicaConfiguration = MySqlReplicaConfiguration + { _msrcVerifyServerCertificate :: !(Maybe Bool) + , _msrcKind :: !Text + , _msrcClientKey :: !(Maybe Text) + , _msrcUsername :: !(Maybe Text) + , _msrcSslCipher :: !(Maybe Text) + , _msrcMasterHeartbeatPeriod :: !(Maybe Int64) + , _msrcConnectRetryInterval :: !(Maybe Int32) + , _msrcClientCertificate :: !(Maybe Text) + , _msrcCaCertificate :: !(Maybe Text) + , _msrcDumpFilePath :: !(Maybe Text) + , _msrcPassword :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MySqlReplicaConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msrcVerifyServerCertificate' +-- +-- * 'msrcKind' +-- +-- * 'msrcClientKey' +-- +-- * 'msrcUsername' +-- +-- * 'msrcSslCipher' +-- +-- * 'msrcMasterHeartbeatPeriod' +-- +-- * 'msrcConnectRetryInterval' +-- +-- * 'msrcClientCertificate' +-- +-- * 'msrcCaCertificate' +-- +-- * 'msrcDumpFilePath' +-- +-- * 'msrcPassword' +mySqlReplicaConfiguration + :: MySqlReplicaConfiguration +mySqlReplicaConfiguration = + MySqlReplicaConfiguration + { _msrcVerifyServerCertificate = Nothing + , _msrcKind = "sql#mysqlReplicaConfiguration" + , _msrcClientKey = Nothing + , _msrcUsername = Nothing + , _msrcSslCipher = Nothing + , _msrcMasterHeartbeatPeriod = Nothing + , _msrcConnectRetryInterval = Nothing + , _msrcClientCertificate = Nothing + , _msrcCaCertificate = Nothing + , _msrcDumpFilePath = Nothing + , _msrcPassword = Nothing + } + +-- | Whether or not to check the master\'s Common Name value in the +-- certificate that it sends during the SSL handshake. +msrcVerifyServerCertificate :: Lens' MySqlReplicaConfiguration (Maybe Bool) +msrcVerifyServerCertificate + = lens _msrcVerifyServerCertificate + (\ s a -> s{_msrcVerifyServerCertificate = a}) + +-- | This is always sql#mysqlReplicaConfiguration. +msrcKind :: Lens' MySqlReplicaConfiguration Text +msrcKind = lens _msrcKind (\ s a -> s{_msrcKind = a}) + +-- | PEM representation of the slave\'s private key. The corresponsing public +-- key is encoded in the client\'s certificate. +msrcClientKey :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcClientKey + = lens _msrcClientKey + (\ s a -> s{_msrcClientKey = a}) + +-- | The username for the replication connection. +msrcUsername :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcUsername + = lens _msrcUsername (\ s a -> s{_msrcUsername = a}) + +-- | A list of permissible ciphers to use for SSL encryption. +msrcSslCipher :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcSslCipher + = lens _msrcSslCipher + (\ s a -> s{_msrcSslCipher = a}) + +-- | Interval in milliseconds between replication heartbeats. +msrcMasterHeartbeatPeriod :: Lens' MySqlReplicaConfiguration (Maybe Int64) +msrcMasterHeartbeatPeriod + = lens _msrcMasterHeartbeatPeriod + (\ s a -> s{_msrcMasterHeartbeatPeriod = a}) + +-- | Seconds to wait between connect retries. MySQL\'s default is 60 seconds. +msrcConnectRetryInterval :: Lens' MySqlReplicaConfiguration (Maybe Int32) +msrcConnectRetryInterval + = lens _msrcConnectRetryInterval + (\ s a -> s{_msrcConnectRetryInterval = a}) + +-- | PEM representation of the slave\'s x509 certificate. +msrcClientCertificate :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcClientCertificate + = lens _msrcClientCertificate + (\ s a -> s{_msrcClientCertificate = a}) + +-- | PEM representation of the trusted CA\'s x509 certificate. +msrcCaCertificate :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcCaCertificate + = lens _msrcCaCertificate + (\ s a -> s{_msrcCaCertificate = a}) + +-- | Path to a SQL dump file in Google Cloud Storage from which the slave +-- instance is to be created. The URI is in the form +-- gs:\/\/bucketName\/fileName. Compressed gzip files (.gz) are also +-- supported. Dumps should have the binlog co-ordinates from which +-- replication should begin. This can be accomplished by setting +-- --master-data to 1 when using mysqldump. +msrcDumpFilePath :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcDumpFilePath + = lens _msrcDumpFilePath + (\ s a -> s{_msrcDumpFilePath = a}) + +-- | The password for the replication connection. +msrcPassword :: Lens' MySqlReplicaConfiguration (Maybe Text) +msrcPassword + = lens _msrcPassword (\ s a -> s{_msrcPassword = a}) + +instance FromJSON MySqlReplicaConfiguration where + parseJSON + = withObject "MySqlReplicaConfiguration" + (\ o -> + MySqlReplicaConfiguration <$> + (o .:? "verifyServerCertificate") <*> + (o .:? "kind" .!= "sql#mysqlReplicaConfiguration") + <*> (o .:? "clientKey") + <*> (o .:? "username") + <*> (o .:? "sslCipher") + <*> (o .:? "masterHeartbeatPeriod") + <*> (o .:? "connectRetryInterval") + <*> (o .:? "clientCertificate") + <*> (o .:? "caCertificate") + <*> (o .:? "dumpFilePath") + <*> (o .:? "password")) + +instance ToJSON MySqlReplicaConfiguration where + toJSON MySqlReplicaConfiguration{..} + = object + (catMaybes + [("verifyServerCertificate" .=) <$> + _msrcVerifyServerCertificate, + Just ("kind" .= _msrcKind), + ("clientKey" .=) <$> _msrcClientKey, + ("username" .=) <$> _msrcUsername, + ("sslCipher" .=) <$> _msrcSslCipher, + ("masterHeartbeatPeriod" .=) <$> + _msrcMasterHeartbeatPeriod, + ("connectRetryInterval" .=) <$> + _msrcConnectRetryInterval, + ("clientCertificate" .=) <$> _msrcClientCertificate, + ("caCertificate" .=) <$> _msrcCaCertificate, + ("dumpFilePath" .=) <$> _msrcDumpFilePath, + ("password" .=) <$> _msrcPassword]) + +-- | A Google Cloud SQL service tier resource. +-- +-- /See:/ 'tier' smart constructor. +data Tier = Tier + { _tKind :: !Text + , _tTier :: !(Maybe Text) + , _tRegion :: !(Maybe [Text]) + , _tDiskQuota :: !(Maybe Int64) + , _tRAM :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tier' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tKind' +-- +-- * 'tTier' +-- +-- * 'tRegion' +-- +-- * 'tDiskQuota' +-- +-- * 'tRAM' +tier + :: Tier +tier = + Tier + { _tKind = "sql#tier" + , _tTier = Nothing + , _tRegion = Nothing + , _tDiskQuota = Nothing + , _tRAM = Nothing + } + +-- | This is always sql#tier. +tKind :: Lens' Tier Text +tKind = lens _tKind (\ s a -> s{_tKind = a}) + +-- | An identifier for the service tier, for example D1, D2 etc. For related +-- information, see Pricing. +tTier :: Lens' Tier (Maybe Text) +tTier = lens _tTier (\ s a -> s{_tTier = a}) + +-- | The applicable regions for this tier. Can be us-east1, europe-west1 or +-- asia-east1. +tRegion :: Lens' Tier [Text] +tRegion + = lens _tRegion (\ s a -> s{_tRegion = a}) . _Default + . _Coerce + +-- | The maximum disk size of this tier in bytes. +tDiskQuota :: Lens' Tier (Maybe Int64) +tDiskQuota + = lens _tDiskQuota (\ s a -> s{_tDiskQuota = a}) + +-- | The maximum RAM usage of this tier in bytes. +tRAM :: Lens' Tier (Maybe Int64) +tRAM = lens _tRAM (\ s a -> s{_tRAM = a}) + +instance FromJSON Tier where + parseJSON + = withObject "Tier" + (\ o -> + Tier <$> + (o .:? "kind" .!= "sql#tier") <*> (o .:? "tier") <*> + (o .:? "region" .!= mempty) + <*> (o .:? "DiskQuota") + <*> (o .:? "RAM")) + +instance ToJSON Tier where + toJSON Tier{..} + = object + (catMaybes + [Just ("kind" .= _tKind), ("tier" .=) <$> _tTier, + ("region" .=) <$> _tRegion, + ("DiskQuota" .=) <$> _tDiskQuota, + ("RAM" .=) <$> _tRAM]) + +-- | MySQL flags for Cloud SQL instances. +-- +-- /See:/ 'databaseFlags' smart constructor. +data DatabaseFlags = DatabaseFlags + { _dfValue :: !(Maybe Text) + , _dfName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DatabaseFlags' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dfValue' +-- +-- * 'dfName' +databaseFlags + :: DatabaseFlags +databaseFlags = + DatabaseFlags + { _dfValue = Nothing + , _dfName = Nothing + } + +-- | The value of the flag. Booleans should be set to on for true and off for +-- false. This field must be omitted if the flag doesn\'t take a value. +dfValue :: Lens' DatabaseFlags (Maybe Text) +dfValue = lens _dfValue (\ s a -> s{_dfValue = a}) + +-- | The name of the flag. These flags are passed at instance startup, so +-- include both MySQL server options and MySQL system variables. Flags +-- should be specified with underscores, not hyphens. For more information, +-- see Configuring MySQL Flags in the Google Cloud SQL documentation, as +-- well as the official MySQL documentation for server options and system +-- variables. +dfName :: Lens' DatabaseFlags (Maybe Text) +dfName = lens _dfName (\ s a -> s{_dfName = a}) + +instance FromJSON DatabaseFlags where + parseJSON + = withObject "DatabaseFlags" + (\ o -> + DatabaseFlags <$> (o .:? "value") <*> (o .:? "name")) + +instance ToJSON DatabaseFlags where + toJSON DatabaseFlags{..} + = object + (catMaybes + [("value" .=) <$> _dfValue, ("name" .=) <$> _dfName]) + +-- | Database instance restore backup request. +-- +-- /See:/ 'instancesRestoreBackupRequest' smart constructor. +newtype InstancesRestoreBackupRequest = InstancesRestoreBackupRequest + { _irbrRestoreBackupContext :: Maybe (Maybe RestoreBackupContext) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesRestoreBackupRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irbrRestoreBackupContext' +instancesRestoreBackupRequest + :: InstancesRestoreBackupRequest +instancesRestoreBackupRequest = + InstancesRestoreBackupRequest + { _irbrRestoreBackupContext = Nothing + } + +-- | Parameters required to perform the restore backup operation. +irbrRestoreBackupContext :: Lens' InstancesRestoreBackupRequest (Maybe (Maybe RestoreBackupContext)) +irbrRestoreBackupContext + = lens _irbrRestoreBackupContext + (\ s a -> s{_irbrRestoreBackupContext = a}) + +instance FromJSON InstancesRestoreBackupRequest where + parseJSON + = withObject "InstancesRestoreBackupRequest" + (\ o -> + InstancesRestoreBackupRequest <$> + (o .:? "restoreBackupContext")) + +instance ToJSON InstancesRestoreBackupRequest where + toJSON InstancesRestoreBackupRequest{..} + = object + (catMaybes + [("restoreBackupContext" .=) <$> + _irbrRestoreBackupContext]) + +-- | Database instance operation error. +-- +-- /See:/ 'operationError' smart constructor. +data OperationError = OperationError + { _opeKind :: !Text + , _opeCode :: !(Maybe Text) + , _opeMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'OperationError' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opeKind' +-- +-- * 'opeCode' +-- +-- * 'opeMessage' +operationError + :: OperationError +operationError = + OperationError + { _opeKind = "sql#operationError" + , _opeCode = Nothing + , _opeMessage = Nothing + } + +-- | This is always sql#operationError. +opeKind :: Lens' OperationError Text +opeKind = lens _opeKind (\ s a -> s{_opeKind = a}) + +-- | Identifies the specific error that occurred. +opeCode :: Lens' OperationError (Maybe Text) +opeCode = lens _opeCode (\ s a -> s{_opeCode = a}) + +-- | Additional information about the error encountered. +opeMessage :: Lens' OperationError (Maybe Text) +opeMessage + = lens _opeMessage (\ s a -> s{_opeMessage = a}) + +instance FromJSON OperationError where + parseJSON + = withObject "OperationError" + (\ o -> + OperationError <$> + (o .:? "kind" .!= "sql#operationError") <*> + (o .:? "code") + <*> (o .:? "message")) + +instance ToJSON OperationError where + toJSON OperationError{..} + = object + (catMaybes + [Just ("kind" .= _opeKind), ("code" .=) <$> _opeCode, + ("message" .=) <$> _opeMessage]) + +-- | SslCertDetail. +-- +-- /See:/ 'sSLCertDetail' smart constructor. +data SSLCertDetail = SSLCertDetail + { _scdCertInfo :: !(Maybe (Maybe SSLCert)) + , _scdCertPrivateKey :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertDetail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scdCertInfo' +-- +-- * 'scdCertPrivateKey' +sSLCertDetail + :: SSLCertDetail +sSLCertDetail = + SSLCertDetail + { _scdCertInfo = Nothing + , _scdCertPrivateKey = Nothing + } + +-- | The public information about the cert. +scdCertInfo :: Lens' SSLCertDetail (Maybe (Maybe SSLCert)) +scdCertInfo + = lens _scdCertInfo (\ s a -> s{_scdCertInfo = a}) + +-- | The private key for the client cert, in pem format. Keep private in +-- order to protect your security. +scdCertPrivateKey :: Lens' SSLCertDetail (Maybe Text) +scdCertPrivateKey + = lens _scdCertPrivateKey + (\ s a -> s{_scdCertPrivateKey = a}) + +instance FromJSON SSLCertDetail where + parseJSON + = withObject "SSLCertDetail" + (\ o -> + SSLCertDetail <$> + (o .:? "certInfo") <*> (o .:? "certPrivateKey")) + +instance ToJSON SSLCertDetail where + toJSON SSLCertDetail{..} + = object + (catMaybes + [("certInfo" .=) <$> _scdCertInfo, + ("certPrivateKey" .=) <$> _scdCertPrivateKey]) + +-- | Backup run list results. +-- +-- /See:/ 'backupRunsListResponse' smart constructor. +data BackupRunsListResponse = BackupRunsListResponse + { _brlrNextPageToken :: !(Maybe Text) + , _brlrKind :: !Text + , _brlrItems :: !(Maybe [Maybe BackupRun]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupRunsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brlrNextPageToken' +-- +-- * 'brlrKind' +-- +-- * 'brlrItems' +backupRunsListResponse + :: BackupRunsListResponse +backupRunsListResponse = + BackupRunsListResponse + { _brlrNextPageToken = Nothing + , _brlrKind = "sql#backupRunsList" + , _brlrItems = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +brlrNextPageToken :: Lens' BackupRunsListResponse (Maybe Text) +brlrNextPageToken + = lens _brlrNextPageToken + (\ s a -> s{_brlrNextPageToken = a}) + +-- | This is always sql#backupRunsList. +brlrKind :: Lens' BackupRunsListResponse Text +brlrKind = lens _brlrKind (\ s a -> s{_brlrKind = a}) + +-- | A list of backup runs in reverse chronological order of the enqueued +-- time. +brlrItems :: Lens' BackupRunsListResponse [Maybe BackupRun] +brlrItems + = lens _brlrItems (\ s a -> s{_brlrItems = a}) . + _Default + . _Coerce + +instance FromJSON BackupRunsListResponse where + parseJSON + = withObject "BackupRunsListResponse" + (\ o -> + BackupRunsListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "sql#backupRunsList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON BackupRunsListResponse where + toJSON BackupRunsListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _brlrNextPageToken, + Just ("kind" .= _brlrKind), + ("items" .=) <$> _brlrItems]) + +-- | Database instance clone request. +-- +-- /See:/ 'instancesCloneRequest' smart constructor. +newtype InstancesCloneRequest = InstancesCloneRequest + { _icrCloneContext :: Maybe (Maybe CloneContext) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesCloneRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'icrCloneContext' +instancesCloneRequest + :: InstancesCloneRequest +instancesCloneRequest = + InstancesCloneRequest + { _icrCloneContext = Nothing + } + +-- | Contains details about the clone operation. +icrCloneContext :: Lens' InstancesCloneRequest (Maybe (Maybe CloneContext)) +icrCloneContext + = lens _icrCloneContext + (\ s a -> s{_icrCloneContext = a}) + +instance FromJSON InstancesCloneRequest where + parseJSON + = withObject "InstancesCloneRequest" + (\ o -> + InstancesCloneRequest <$> (o .:? "cloneContext")) + +instance ToJSON InstancesCloneRequest where + toJSON InstancesCloneRequest{..} + = object + (catMaybes + [("cloneContext" .=) <$> _icrCloneContext]) + +-- | Read-replica configuration for connecting to the master. +-- +-- /See:/ 'replicaConfiguration' smart constructor. +data ReplicaConfiguration = ReplicaConfiguration + { _rcKind :: !Text + , _rcMysqlReplicaConfiguration :: !(Maybe (Maybe MySqlReplicaConfiguration)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReplicaConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rcKind' +-- +-- * 'rcMysqlReplicaConfiguration' +replicaConfiguration + :: ReplicaConfiguration +replicaConfiguration = + ReplicaConfiguration + { _rcKind = "sql#replicaConfiguration" + , _rcMysqlReplicaConfiguration = Nothing + } + +-- | This is always sql#replicaConfiguration. +rcKind :: Lens' ReplicaConfiguration Text +rcKind = lens _rcKind (\ s a -> s{_rcKind = a}) + +-- | MySQL specific configuration when replicating from a MySQL on-premises +-- master. Replication configuration information such as the username, +-- password, certificates, and keys are not stored in the instance +-- metadata. The configuration information is used only to set up the +-- replication connection and is stored by MySQL in a file named +-- master.info in the data directory. +rcMysqlReplicaConfiguration :: Lens' ReplicaConfiguration (Maybe (Maybe MySqlReplicaConfiguration)) +rcMysqlReplicaConfiguration + = lens _rcMysqlReplicaConfiguration + (\ s a -> s{_rcMysqlReplicaConfiguration = a}) + +instance FromJSON ReplicaConfiguration where + parseJSON + = withObject "ReplicaConfiguration" + (\ o -> + ReplicaConfiguration <$> + (o .:? "kind" .!= "sql#replicaConfiguration") <*> + (o .:? "mysqlReplicaConfiguration")) + +instance ToJSON ReplicaConfiguration where + toJSON ReplicaConfiguration{..} + = object + (catMaybes + [Just ("kind" .= _rcKind), + ("mysqlReplicaConfiguration" .=) <$> + _rcMysqlReplicaConfiguration]) + +-- | SslCert insert response. +-- +-- /See:/ 'sSLCertsInsertResponse' smart constructor. +data SSLCertsInsertResponse = SSLCertsInsertResponse + { _scirServerCaCert :: !(Maybe (Maybe SSLCert)) + , _scirKind :: !Text + , _scirClientCert :: !(Maybe (Maybe SSLCertDetail)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SSLCertsInsertResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scirServerCaCert' +-- +-- * 'scirKind' +-- +-- * 'scirClientCert' +sSLCertsInsertResponse + :: SSLCertsInsertResponse +sSLCertsInsertResponse = + SSLCertsInsertResponse + { _scirServerCaCert = Nothing + , _scirKind = "sql#sslCertsInsert" + , _scirClientCert = Nothing + } + +-- | The server Certificate Authority\'s certificate. If this is missing you +-- can force a new one to be generated by calling resetSslConfig method on +-- instances resource. +scirServerCaCert :: Lens' SSLCertsInsertResponse (Maybe (Maybe SSLCert)) +scirServerCaCert + = lens _scirServerCaCert + (\ s a -> s{_scirServerCaCert = a}) + +-- | This is always sql#sslCertsInsert. +scirKind :: Lens' SSLCertsInsertResponse Text +scirKind = lens _scirKind (\ s a -> s{_scirKind = a}) + +-- | The new client certificate and private key. The new certificate will not +-- work until the instance is restarted. +scirClientCert :: Lens' SSLCertsInsertResponse (Maybe (Maybe SSLCertDetail)) +scirClientCert + = lens _scirClientCert + (\ s a -> s{_scirClientCert = a}) + +instance FromJSON SSLCertsInsertResponse where + parseJSON + = withObject "SSLCertsInsertResponse" + (\ o -> + SSLCertsInsertResponse <$> + (o .:? "serverCaCert") <*> + (o .:? "kind" .!= "sql#sslCertsInsert") + <*> (o .:? "clientCert")) + +instance ToJSON SSLCertsInsertResponse where + toJSON SSLCertsInsertResponse{..} + = object + (catMaybes + [("serverCaCert" .=) <$> _scirServerCaCert, + Just ("kind" .= _scirKind), + ("clientCert" .=) <$> _scirClientCert]) + +-- | Database instances list response. +-- +-- /See:/ 'instancesListResponse' smart constructor. +data InstancesListResponse = InstancesListResponse + { _ilrNextPageToken :: !(Maybe Text) + , _ilrKind :: !Text + , _ilrItems :: !(Maybe [Maybe DatabaseInstance]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilrNextPageToken' +-- +-- * 'ilrKind' +-- +-- * 'ilrItems' +instancesListResponse + :: InstancesListResponse +instancesListResponse = + InstancesListResponse + { _ilrNextPageToken = Nothing + , _ilrKind = "sql#instancesList" + , _ilrItems = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +ilrNextPageToken :: Lens' InstancesListResponse (Maybe Text) +ilrNextPageToken + = lens _ilrNextPageToken + (\ s a -> s{_ilrNextPageToken = a}) + +-- | This is always sql#instancesList. +ilrKind :: Lens' InstancesListResponse Text +ilrKind = lens _ilrKind (\ s a -> s{_ilrKind = a}) + +-- | List of database instance resources. +ilrItems :: Lens' InstancesListResponse [Maybe DatabaseInstance] +ilrItems + = lens _ilrItems (\ s a -> s{_ilrItems = a}) . + _Default + . _Coerce + +instance FromJSON InstancesListResponse where + parseJSON + = withObject "InstancesListResponse" + (\ o -> + InstancesListResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "sql#instancesList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON InstancesListResponse where + toJSON InstancesListResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ilrNextPageToken, + Just ("kind" .= _ilrKind), + ("items" .=) <$> _ilrItems]) + +-- | Preferred location. This specifies where a Cloud SQL instance should +-- preferably be located, either in a specific Compute Engine zone, or +-- co-located with an App Engine application. Note that if the preferred +-- location is not available, the instance will be located as close as +-- possible within the region. Only one location may be specified. +-- +-- /See:/ 'locationPreference' smart constructor. +data LocationPreference = LocationPreference + { _lpKind :: !Text + , _lpFollowGaeApplication :: !(Maybe Text) + , _lpZone :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocationPreference' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpKind' +-- +-- * 'lpFollowGaeApplication' +-- +-- * 'lpZone' +locationPreference + :: LocationPreference +locationPreference = + LocationPreference + { _lpKind = "sql#locationPreference" + , _lpFollowGaeApplication = Nothing + , _lpZone = Nothing + } + +-- | This is always sql#locationPreference. +lpKind :: Lens' LocationPreference Text +lpKind = lens _lpKind (\ s a -> s{_lpKind = a}) + +-- | The AppEngine application to follow, it must be in the same region as +-- the Cloud SQL instance. +lpFollowGaeApplication :: Lens' LocationPreference (Maybe Text) +lpFollowGaeApplication + = lens _lpFollowGaeApplication + (\ s a -> s{_lpFollowGaeApplication = a}) + +-- | The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, +-- etc.). +lpZone :: Lens' LocationPreference (Maybe Text) +lpZone = lens _lpZone (\ s a -> s{_lpZone = a}) + +instance FromJSON LocationPreference where + parseJSON + = withObject "LocationPreference" + (\ o -> + LocationPreference <$> + (o .:? "kind" .!= "sql#locationPreference") <*> + (o .:? "followGaeApplication") + <*> (o .:? "zone")) + +instance ToJSON LocationPreference where + toJSON LocationPreference{..} + = object + (catMaybes + [Just ("kind" .= _lpKind), + ("followGaeApplication" .=) <$> + _lpFollowGaeApplication, + ("zone" .=) <$> _lpZone]) + +-- | Database instance import request. +-- +-- /See:/ 'instancesImportRequest' smart constructor. +newtype InstancesImportRequest = InstancesImportRequest + { _iirImportContext :: Maybe (Maybe ImportContext) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InstancesImportRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iirImportContext' +instancesImportRequest + :: InstancesImportRequest +instancesImportRequest = + InstancesImportRequest + { _iirImportContext = Nothing + } + +-- | Contains details about the import operation. +iirImportContext :: Lens' InstancesImportRequest (Maybe (Maybe ImportContext)) +iirImportContext + = lens _iirImportContext + (\ s a -> s{_iirImportContext = a}) + +instance FromJSON InstancesImportRequest where + parseJSON + = withObject "InstancesImportRequest" + (\ o -> + InstancesImportRequest <$> (o .:? "importContext")) + +instance ToJSON InstancesImportRequest where + toJSON InstancesImportRequest{..} + = object + (catMaybes + [("importContext" .=) <$> _iirImportContext]) + +-- | Flags list response. +-- +-- /See:/ 'flagsListResponse' smart constructor. +data FlagsListResponse = FlagsListResponse + { _flrKind :: !Text + , _flrItems :: !(Maybe [Maybe Flag]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FlagsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'flrKind' +-- +-- * 'flrItems' +flagsListResponse + :: FlagsListResponse +flagsListResponse = + FlagsListResponse + { _flrKind = "sql#flagsList" + , _flrItems = Nothing + } + +-- | This is always sql#flagsList. +flrKind :: Lens' FlagsListResponse Text +flrKind = lens _flrKind (\ s a -> s{_flrKind = a}) + +-- | List of flags. +flrItems :: Lens' FlagsListResponse [Maybe Flag] +flrItems + = lens _flrItems (\ s a -> s{_flrItems = a}) . + _Default + . _Coerce + +instance FromJSON FlagsListResponse where + parseJSON + = withObject "FlagsListResponse" + (\ o -> + FlagsListResponse <$> + (o .:? "kind" .!= "sql#flagsList") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON FlagsListResponse where + toJSON FlagsListResponse{..} + = object + (catMaybes + [Just ("kind" .= _flrKind), + ("items" .=) <$> _flrItems]) + +-- | Database instance backup configuration. +-- +-- /See:/ 'backupConfiguration' smart constructor. +data BackupConfiguration = BackupConfiguration + { _bcEnabled :: !(Maybe Bool) + , _bcStartTime :: !(Maybe Text) + , _bcKind :: !Text + , _bcBinaryLogEnabled :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BackupConfiguration' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bcEnabled' +-- +-- * 'bcStartTime' +-- +-- * 'bcKind' +-- +-- * 'bcBinaryLogEnabled' +backupConfiguration + :: BackupConfiguration +backupConfiguration = + BackupConfiguration + { _bcEnabled = Nothing + , _bcStartTime = Nothing + , _bcKind = "sql#backupConfiguration" + , _bcBinaryLogEnabled = Nothing + } + +-- | Whether this configuration is enabled. +bcEnabled :: Lens' BackupConfiguration (Maybe Bool) +bcEnabled + = lens _bcEnabled (\ s a -> s{_bcEnabled = a}) + +-- | Start time for the daily backup configuration in UTC timezone in the 24 +-- hour format - HH:MM. +bcStartTime :: Lens' BackupConfiguration (Maybe Text) +bcStartTime + = lens _bcStartTime (\ s a -> s{_bcStartTime = a}) + +-- | This is always sql#backupConfiguration. +bcKind :: Lens' BackupConfiguration Text +bcKind = lens _bcKind (\ s a -> s{_bcKind = a}) + +-- | Whether binary log is enabled. If backup configuration is disabled, +-- binary log must be disabled as well. +bcBinaryLogEnabled :: Lens' BackupConfiguration (Maybe Bool) +bcBinaryLogEnabled + = lens _bcBinaryLogEnabled + (\ s a -> s{_bcBinaryLogEnabled = a}) + +instance FromJSON BackupConfiguration where + parseJSON + = withObject "BackupConfiguration" + (\ o -> + BackupConfiguration <$> + (o .:? "enabled") <*> (o .:? "startTime") <*> + (o .:? "kind" .!= "sql#backupConfiguration") + <*> (o .:? "binaryLogEnabled")) + +instance ToJSON BackupConfiguration where + toJSON BackupConfiguration{..} + = object + (catMaybes + [("enabled" .=) <$> _bcEnabled, + ("startTime" .=) <$> _bcStartTime, + Just ("kind" .= _bcKind), + ("binaryLogEnabled" .=) <$> _bcBinaryLogEnabled]) + +-- | Database instance restore from backup context. +-- +-- /See:/ 'restoreBackupContext' smart constructor. +data RestoreBackupContext = RestoreBackupContext + { _rbcInstanceId :: !(Maybe Text) + , _rbcBackupRunId :: !(Maybe Int64) + , _rbcKind :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'RestoreBackupContext' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rbcInstanceId' +-- +-- * 'rbcBackupRunId' +-- +-- * 'rbcKind' +restoreBackupContext + :: RestoreBackupContext +restoreBackupContext = + RestoreBackupContext + { _rbcInstanceId = Nothing + , _rbcBackupRunId = Nothing + , _rbcKind = "sql#restoreBackupContext" + } + +-- | The ID of the instance that the backup was taken from. +rbcInstanceId :: Lens' RestoreBackupContext (Maybe Text) +rbcInstanceId + = lens _rbcInstanceId + (\ s a -> s{_rbcInstanceId = a}) + +-- | The ID of the backup run to restore from. +rbcBackupRunId :: Lens' RestoreBackupContext (Maybe Int64) +rbcBackupRunId + = lens _rbcBackupRunId + (\ s a -> s{_rbcBackupRunId = a}) + +-- | This is always sql#restoreBackupContext. +rbcKind :: Lens' RestoreBackupContext Text +rbcKind = lens _rbcKind (\ s a -> s{_rbcKind = a}) + +instance FromJSON RestoreBackupContext where + parseJSON + = withObject "RestoreBackupContext" + (\ o -> + RestoreBackupContext <$> + (o .:? "instanceId") <*> (o .:? "backupRunId") <*> + (o .:? "kind" .!= "sql#restoreBackupContext")) + +instance ToJSON RestoreBackupContext where + toJSON RestoreBackupContext{..} + = object + (catMaybes + [("instanceId" .=) <$> _rbcInstanceId, + ("backupRunId" .=) <$> _rbcBackupRunId, + Just ("kind" .= _rbcKind)]) diff --git a/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Sum.hs b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Sum.hs new file mode 100644 index 000000000..30132ce54 --- /dev/null +++ b/gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.SQLAdmin.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.SQLAdmin.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-sqladmin/gogol-sqladmin.cabal b/gogol-sqladmin/gogol-sqladmin.cabal new file mode 100644 index 000000000..6cac37e25 --- /dev/null +++ b/gogol-sqladmin/gogol-sqladmin.cabal @@ -0,0 +1,79 @@ +name: gogol-sqladmin +version: 0.0.1 +synopsis: Cloud SQL Administration API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for Cloud SQL database instance management. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Sql.BackupRuns.Delete + , Network.Google.Resource.Sql.BackupRuns.Get + , Network.Google.Resource.Sql.BackupRuns.List + , Network.Google.Resource.Sql.Databases.Delete + , Network.Google.Resource.Sql.Databases.Get + , Network.Google.Resource.Sql.Databases.Insert + , Network.Google.Resource.Sql.Databases.List + , Network.Google.Resource.Sql.Databases.Patch + , Network.Google.Resource.Sql.Databases.Update + , Network.Google.Resource.Sql.Flags.List + , Network.Google.Resource.Sql.Instances.Clone + , Network.Google.Resource.Sql.Instances.Delete + , Network.Google.Resource.Sql.Instances.Export + , Network.Google.Resource.Sql.Instances.Get + , Network.Google.Resource.Sql.Instances.Import + , Network.Google.Resource.Sql.Instances.Insert + , Network.Google.Resource.Sql.Instances.List + , Network.Google.Resource.Sql.Instances.Patch + , Network.Google.Resource.Sql.Instances.PromoteReplica + , Network.Google.Resource.Sql.Instances.ResetSSLConfig + , Network.Google.Resource.Sql.Instances.Restart + , Network.Google.Resource.Sql.Instances.RestoreBackup + , Network.Google.Resource.Sql.Instances.StartReplica + , Network.Google.Resource.Sql.Instances.StopReplica + , Network.Google.Resource.Sql.Instances.Update + , Network.Google.Resource.Sql.Operations.Get + , Network.Google.Resource.Sql.Operations.List + , Network.Google.Resource.Sql.SSLCerts.CreateEphemeral + , Network.Google.Resource.Sql.SSLCerts.Delete + , Network.Google.Resource.Sql.SSLCerts.Get + , Network.Google.Resource.Sql.SSLCerts.Insert + , Network.Google.Resource.Sql.SSLCerts.List + , Network.Google.Resource.Sql.Tiers.List + , Network.Google.Resource.Sql.Users.Delete + , Network.Google.Resource.Sql.Users.Insert + , Network.Google.Resource.Sql.Users.List + , Network.Google.Resource.Sql.Users.Update + , Network.Google.SQLAdmin + , Network.Google.SQLAdmin.Types + + other-modules: + Network.Google.SQLAdmin.Types.Product + , Network.Google.SQLAdmin.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-sqladmin/src/.gitkeep b/gogol-sqladmin/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-storage-transfer/LICENSE b/gogol-storage-transfer/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-storage-transfer/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-storage-transfer/Makefile b/gogol-storage-transfer/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-storage-transfer/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-storage-transfer/README.md b/gogol-storage-transfer/README.md new file mode 100644 index 000000000..b66088dc8 --- /dev/null +++ b/gogol-storage-transfer/README.md @@ -0,0 +1,28 @@ +# gogol-storage-transfer + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Google Storage Transfer API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-storage-transfer` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-storage-transfer/Setup.hs b/gogol-storage-transfer/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-storage-transfer/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GetGoogleServiceAccount.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GetGoogleServiceAccount.hs new file mode 100644 index 000000000..23f4b23a2 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GetGoogleServiceAccount.hs @@ -0,0 +1,242 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.GetGoogleServiceAccount +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the Google service account that is used by Storage Transfer +-- Service to access buckets in the project where transfers run or in other +-- projects. Each Google service account is associated with one Google +-- Developers Console project. Users should add this service account to the +-- Google Cloud Storage bucket ACLs to grant access to Storage Transfer +-- Service. This service account is created and owned by Storage Transfer +-- Service and can only be used by Storage Transfer Service. +-- +-- /See:/ for @StoragetransferGetGoogleServiceAccount@. +module StorageTransfer.GetGoogleServiceAccount + ( + -- * REST Resource + GetGoogleServiceAccountAPI + + -- * Creating a Request + , getGoogleServiceAccount + , GetGoogleServiceAccount + + -- * Request Lenses + , ggsaXgafv + , ggsaQuotaUser + , ggsaPrettyPrint + , ggsaUploadProtocol + , ggsaPp + , ggsaAccessToken + , ggsaUploadType + , ggsaBearerToken + , ggsaKey + , ggsaProjectId + , ggsaOauthToken + , ggsaFields + , ggsaCallback + , ggsaAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferGetGoogleServiceAccount@ which the +-- 'GetGoogleServiceAccount' request conforms to. +type GetGoogleServiceAccountAPI = + "v1:getGoogleServiceAccount" :> + QueryParam "projectId" Text :> + Get '[JSON] GoogleServiceAccount + +-- | Returns the Google service account that is used by Storage Transfer +-- Service to access buckets in the project where transfers run or in other +-- projects. Each Google service account is associated with one Google +-- Developers Console project. Users should add this service account to the +-- Google Cloud Storage bucket ACLs to grant access to Storage Transfer +-- Service. This service account is created and owned by Storage Transfer +-- Service and can only be used by Storage Transfer Service. +-- +-- /See:/ 'getGoogleServiceAccount' smart constructor. +data GetGoogleServiceAccount = GetGoogleServiceAccount + { _ggsaXgafv :: !(Maybe Text) + , _ggsaQuotaUser :: !(Maybe Text) + , _ggsaPrettyPrint :: !Bool + , _ggsaUploadProtocol :: !(Maybe Text) + , _ggsaPp :: !Bool + , _ggsaAccessToken :: !(Maybe Text) + , _ggsaUploadType :: !(Maybe Text) + , _ggsaBearerToken :: !(Maybe Text) + , _ggsaKey :: !(Maybe Text) + , _ggsaProjectId :: !(Maybe Text) + , _ggsaOauthToken :: !(Maybe Text) + , _ggsaFields :: !(Maybe Text) + , _ggsaCallback :: !(Maybe Text) + , _ggsaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GetGoogleServiceAccount'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ggsaXgafv' +-- +-- * 'ggsaQuotaUser' +-- +-- * 'ggsaPrettyPrint' +-- +-- * 'ggsaUploadProtocol' +-- +-- * 'ggsaPp' +-- +-- * 'ggsaAccessToken' +-- +-- * 'ggsaUploadType' +-- +-- * 'ggsaBearerToken' +-- +-- * 'ggsaKey' +-- +-- * 'ggsaProjectId' +-- +-- * 'ggsaOauthToken' +-- +-- * 'ggsaFields' +-- +-- * 'ggsaCallback' +-- +-- * 'ggsaAlt' +getGoogleServiceAccount + :: GetGoogleServiceAccount +getGoogleServiceAccount = + GetGoogleServiceAccount + { _ggsaXgafv = Nothing + , _ggsaQuotaUser = Nothing + , _ggsaPrettyPrint = True + , _ggsaUploadProtocol = Nothing + , _ggsaPp = True + , _ggsaAccessToken = Nothing + , _ggsaUploadType = Nothing + , _ggsaBearerToken = Nothing + , _ggsaKey = Nothing + , _ggsaProjectId = Nothing + , _ggsaOauthToken = Nothing + , _ggsaFields = Nothing + , _ggsaCallback = Nothing + , _ggsaAlt = "json" + } + +-- | V1 error format. +ggsaXgafv :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaXgafv + = lens _ggsaXgafv (\ s a -> s{_ggsaXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +ggsaQuotaUser :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaQuotaUser + = lens _ggsaQuotaUser + (\ s a -> s{_ggsaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ggsaPrettyPrint :: Lens' GetGoogleServiceAccount' Bool +ggsaPrettyPrint + = lens _ggsaPrettyPrint + (\ s a -> s{_ggsaPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +ggsaUploadProtocol :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaUploadProtocol + = lens _ggsaUploadProtocol + (\ s a -> s{_ggsaUploadProtocol = a}) + +-- | Pretty-print response. +ggsaPp :: Lens' GetGoogleServiceAccount' Bool +ggsaPp = lens _ggsaPp (\ s a -> s{_ggsaPp = a}) + +-- | OAuth access token. +ggsaAccessToken :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaAccessToken + = lens _ggsaAccessToken + (\ s a -> s{_ggsaAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +ggsaUploadType :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaUploadType + = lens _ggsaUploadType + (\ s a -> s{_ggsaUploadType = a}) + +-- | OAuth bearer token. +ggsaBearerToken :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaBearerToken + = lens _ggsaBearerToken + (\ s a -> s{_ggsaBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ggsaKey :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaKey = lens _ggsaKey (\ s a -> s{_ggsaKey = a}) + +-- | The ID of the Google Developers Console project that the Google service +-- account is associated with. Required. +ggsaProjectId :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaProjectId + = lens _ggsaProjectId + (\ s a -> s{_ggsaProjectId = a}) + +-- | OAuth 2.0 token for the current user. +ggsaOauthToken :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaOauthToken + = lens _ggsaOauthToken + (\ s a -> s{_ggsaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ggsaFields :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaFields + = lens _ggsaFields (\ s a -> s{_ggsaFields = a}) + +-- | JSONP +ggsaCallback :: Lens' GetGoogleServiceAccount' (Maybe Text) +ggsaCallback + = lens _ggsaCallback (\ s a -> s{_ggsaCallback = a}) + +-- | Data format for response. +ggsaAlt :: Lens' GetGoogleServiceAccount' Text +ggsaAlt = lens _ggsaAlt (\ s a -> s{_ggsaAlt = a}) + +instance GoogleRequest GetGoogleServiceAccount' where + type Rs GetGoogleServiceAccount' = + GoogleServiceAccount + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u GetGoogleServiceAccount{..} + = go _ggsaXgafv _ggsaQuotaUser _ggsaPrettyPrint + _ggsaUploadProtocol + _ggsaPp + _ggsaAccessToken + _ggsaUploadType + _ggsaBearerToken + _ggsaKey + _ggsaProjectId + _ggsaOauthToken + _ggsaFields + _ggsaCallback + _ggsaAlt + where go + = clientWithRoute + (Proxy :: Proxy GetGoogleServiceAccountAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GoogleServiceAccounts/Get.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GoogleServiceAccounts/Get.hs new file mode 100644 index 000000000..9933e835a --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/GoogleServiceAccounts/Get.hs @@ -0,0 +1,245 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.GoogleServiceAccounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the Google service account that is used by Storage Transfer +-- Service to access buckets in the project where transfers run or in other +-- projects. Each Google service account is associated with one Google +-- Developers Console project. Users should add this service account to the +-- Google Cloud Storage bucket ACLs to grant access to Storage Transfer +-- Service. This service account is created and owned by Storage Transfer +-- Service and can only be used by Storage Transfer Service. +-- +-- /See:/ for @StoragetransferGoogleServiceAccountsGet@. +module StorageTransfer.GoogleServiceAccounts.Get + ( + -- * REST Resource + GoogleServiceAccountsGetAPI + + -- * Creating a Request + , googleServiceAccountsGet + , GoogleServiceAccountsGet + + -- * Request Lenses + , gsagXgafv + , gsagQuotaUser + , gsagPrettyPrint + , gsagUploadProtocol + , gsagPp + , gsagAccessToken + , gsagUploadType + , gsagBearerToken + , gsagKey + , gsagProjectId + , gsagOauthToken + , gsagFields + , gsagCallback + , gsagAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferGoogleServiceAccountsGet@ which the +-- 'GoogleServiceAccountsGet' request conforms to. +type GoogleServiceAccountsGetAPI = + "v1" :> + "googleServiceAccounts" :> + Capture "projectId" Text :> + Get '[JSON] GoogleServiceAccount + +-- | Returns the Google service account that is used by Storage Transfer +-- Service to access buckets in the project where transfers run or in other +-- projects. Each Google service account is associated with one Google +-- Developers Console project. Users should add this service account to the +-- Google Cloud Storage bucket ACLs to grant access to Storage Transfer +-- Service. This service account is created and owned by Storage Transfer +-- Service and can only be used by Storage Transfer Service. +-- +-- /See:/ 'googleServiceAccountsGet' smart constructor. +data GoogleServiceAccountsGet = GoogleServiceAccountsGet + { _gsagXgafv :: !(Maybe Text) + , _gsagQuotaUser :: !(Maybe Text) + , _gsagPrettyPrint :: !Bool + , _gsagUploadProtocol :: !(Maybe Text) + , _gsagPp :: !Bool + , _gsagAccessToken :: !(Maybe Text) + , _gsagUploadType :: !(Maybe Text) + , _gsagBearerToken :: !(Maybe Text) + , _gsagKey :: !(Maybe Text) + , _gsagProjectId :: !Text + , _gsagOauthToken :: !(Maybe Text) + , _gsagFields :: !(Maybe Text) + , _gsagCallback :: !(Maybe Text) + , _gsagAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GoogleServiceAccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gsagXgafv' +-- +-- * 'gsagQuotaUser' +-- +-- * 'gsagPrettyPrint' +-- +-- * 'gsagUploadProtocol' +-- +-- * 'gsagPp' +-- +-- * 'gsagAccessToken' +-- +-- * 'gsagUploadType' +-- +-- * 'gsagBearerToken' +-- +-- * 'gsagKey' +-- +-- * 'gsagProjectId' +-- +-- * 'gsagOauthToken' +-- +-- * 'gsagFields' +-- +-- * 'gsagCallback' +-- +-- * 'gsagAlt' +googleServiceAccountsGet + :: Text -- ^ 'projectId' + -> GoogleServiceAccountsGet +googleServiceAccountsGet pGsagProjectId_ = + GoogleServiceAccountsGet + { _gsagXgafv = Nothing + , _gsagQuotaUser = Nothing + , _gsagPrettyPrint = True + , _gsagUploadProtocol = Nothing + , _gsagPp = True + , _gsagAccessToken = Nothing + , _gsagUploadType = Nothing + , _gsagBearerToken = Nothing + , _gsagKey = Nothing + , _gsagProjectId = pGsagProjectId_ + , _gsagOauthToken = Nothing + , _gsagFields = Nothing + , _gsagCallback = Nothing + , _gsagAlt = "json" + } + +-- | V1 error format. +gsagXgafv :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagXgafv + = lens _gsagXgafv (\ s a -> s{_gsagXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +gsagQuotaUser :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagQuotaUser + = lens _gsagQuotaUser + (\ s a -> s{_gsagQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gsagPrettyPrint :: Lens' GoogleServiceAccountsGet' Bool +gsagPrettyPrint + = lens _gsagPrettyPrint + (\ s a -> s{_gsagPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +gsagUploadProtocol :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagUploadProtocol + = lens _gsagUploadProtocol + (\ s a -> s{_gsagUploadProtocol = a}) + +-- | Pretty-print response. +gsagPp :: Lens' GoogleServiceAccountsGet' Bool +gsagPp = lens _gsagPp (\ s a -> s{_gsagPp = a}) + +-- | OAuth access token. +gsagAccessToken :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagAccessToken + = lens _gsagAccessToken + (\ s a -> s{_gsagAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +gsagUploadType :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagUploadType + = lens _gsagUploadType + (\ s a -> s{_gsagUploadType = a}) + +-- | OAuth bearer token. +gsagBearerToken :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagBearerToken + = lens _gsagBearerToken + (\ s a -> s{_gsagBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gsagKey :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagKey = lens _gsagKey (\ s a -> s{_gsagKey = a}) + +-- | The ID of the Google Developers Console project that the Google service +-- account is associated with. Required. +gsagProjectId :: Lens' GoogleServiceAccountsGet' Text +gsagProjectId + = lens _gsagProjectId + (\ s a -> s{_gsagProjectId = a}) + +-- | OAuth 2.0 token for the current user. +gsagOauthToken :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagOauthToken + = lens _gsagOauthToken + (\ s a -> s{_gsagOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gsagFields :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagFields + = lens _gsagFields (\ s a -> s{_gsagFields = a}) + +-- | JSONP +gsagCallback :: Lens' GoogleServiceAccountsGet' (Maybe Text) +gsagCallback + = lens _gsagCallback (\ s a -> s{_gsagCallback = a}) + +-- | Data format for response. +gsagAlt :: Lens' GoogleServiceAccountsGet' Text +gsagAlt = lens _gsagAlt (\ s a -> s{_gsagAlt = a}) + +instance GoogleRequest GoogleServiceAccountsGet' + where + type Rs GoogleServiceAccountsGet' = + GoogleServiceAccount + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u GoogleServiceAccountsGet{..} + = go _gsagXgafv _gsagQuotaUser _gsagPrettyPrint + _gsagUploadProtocol + _gsagPp + _gsagAccessToken + _gsagUploadType + _gsagBearerToken + _gsagKey + _gsagProjectId + _gsagOauthToken + _gsagFields + _gsagCallback + _gsagAlt + where go + = clientWithRoute + (Proxy :: Proxy GoogleServiceAccountsGetAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Create.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Create.hs new file mode 100644 index 000000000..d0bafa487 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Create.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferJobs.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a transfer job that runs periodically. +-- +-- /See:/ for @StoragetransferTransferJobsCreate@. +module StorageTransfer.TransferJobs.Create + ( + -- * REST Resource + TransferJobsCreateAPI + + -- * Creating a Request + , transferJobsCreate + , TransferJobsCreate + + -- * Request Lenses + , tjcXgafv + , tjcQuotaUser + , tjcPrettyPrint + , tjcUploadProtocol + , tjcPp + , tjcAccessToken + , tjcUploadType + , tjcBearerToken + , tjcKey + , tjcOauthToken + , tjcFields + , tjcCallback + , tjcAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferJobsCreate@ which the +-- 'TransferJobsCreate' request conforms to. +type TransferJobsCreateAPI = + "v1" :> "transferJobs" :> Post '[JSON] TransferJob + +-- | Creates a transfer job that runs periodically. +-- +-- /See:/ 'transferJobsCreate' smart constructor. +data TransferJobsCreate = TransferJobsCreate + { _tjcXgafv :: !(Maybe Text) + , _tjcQuotaUser :: !(Maybe Text) + , _tjcPrettyPrint :: !Bool + , _tjcUploadProtocol :: !(Maybe Text) + , _tjcPp :: !Bool + , _tjcAccessToken :: !(Maybe Text) + , _tjcUploadType :: !(Maybe Text) + , _tjcBearerToken :: !(Maybe Text) + , _tjcKey :: !(Maybe Text) + , _tjcOauthToken :: !(Maybe Text) + , _tjcFields :: !(Maybe Text) + , _tjcCallback :: !(Maybe Text) + , _tjcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferJobsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tjcXgafv' +-- +-- * 'tjcQuotaUser' +-- +-- * 'tjcPrettyPrint' +-- +-- * 'tjcUploadProtocol' +-- +-- * 'tjcPp' +-- +-- * 'tjcAccessToken' +-- +-- * 'tjcUploadType' +-- +-- * 'tjcBearerToken' +-- +-- * 'tjcKey' +-- +-- * 'tjcOauthToken' +-- +-- * 'tjcFields' +-- +-- * 'tjcCallback' +-- +-- * 'tjcAlt' +transferJobsCreate + :: TransferJobsCreate +transferJobsCreate = + TransferJobsCreate + { _tjcXgafv = Nothing + , _tjcQuotaUser = Nothing + , _tjcPrettyPrint = True + , _tjcUploadProtocol = Nothing + , _tjcPp = True + , _tjcAccessToken = Nothing + , _tjcUploadType = Nothing + , _tjcBearerToken = Nothing + , _tjcKey = Nothing + , _tjcOauthToken = Nothing + , _tjcFields = Nothing + , _tjcCallback = Nothing + , _tjcAlt = "json" + } + +-- | V1 error format. +tjcXgafv :: Lens' TransferJobsCreate' (Maybe Text) +tjcXgafv = lens _tjcXgafv (\ s a -> s{_tjcXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tjcQuotaUser :: Lens' TransferJobsCreate' (Maybe Text) +tjcQuotaUser + = lens _tjcQuotaUser (\ s a -> s{_tjcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tjcPrettyPrint :: Lens' TransferJobsCreate' Bool +tjcPrettyPrint + = lens _tjcPrettyPrint + (\ s a -> s{_tjcPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tjcUploadProtocol :: Lens' TransferJobsCreate' (Maybe Text) +tjcUploadProtocol + = lens _tjcUploadProtocol + (\ s a -> s{_tjcUploadProtocol = a}) + +-- | Pretty-print response. +tjcPp :: Lens' TransferJobsCreate' Bool +tjcPp = lens _tjcPp (\ s a -> s{_tjcPp = a}) + +-- | OAuth access token. +tjcAccessToken :: Lens' TransferJobsCreate' (Maybe Text) +tjcAccessToken + = lens _tjcAccessToken + (\ s a -> s{_tjcAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tjcUploadType :: Lens' TransferJobsCreate' (Maybe Text) +tjcUploadType + = lens _tjcUploadType + (\ s a -> s{_tjcUploadType = a}) + +-- | OAuth bearer token. +tjcBearerToken :: Lens' TransferJobsCreate' (Maybe Text) +tjcBearerToken + = lens _tjcBearerToken + (\ s a -> s{_tjcBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tjcKey :: Lens' TransferJobsCreate' (Maybe Text) +tjcKey = lens _tjcKey (\ s a -> s{_tjcKey = a}) + +-- | OAuth 2.0 token for the current user. +tjcOauthToken :: Lens' TransferJobsCreate' (Maybe Text) +tjcOauthToken + = lens _tjcOauthToken + (\ s a -> s{_tjcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tjcFields :: Lens' TransferJobsCreate' (Maybe Text) +tjcFields + = lens _tjcFields (\ s a -> s{_tjcFields = a}) + +-- | JSONP +tjcCallback :: Lens' TransferJobsCreate' (Maybe Text) +tjcCallback + = lens _tjcCallback (\ s a -> s{_tjcCallback = a}) + +-- | Data format for response. +tjcAlt :: Lens' TransferJobsCreate' Text +tjcAlt = lens _tjcAlt (\ s a -> s{_tjcAlt = a}) + +instance GoogleRequest TransferJobsCreate' where + type Rs TransferJobsCreate' = TransferJob + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferJobsCreate{..} + = go _tjcXgafv _tjcQuotaUser _tjcPrettyPrint + _tjcUploadProtocol + _tjcPp + _tjcAccessToken + _tjcUploadType + _tjcBearerToken + _tjcKey + _tjcOauthToken + _tjcFields + _tjcCallback + _tjcAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferJobsCreateAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Get.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Get.hs new file mode 100644 index 000000000..633e9707c --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Get.hs @@ -0,0 +1,238 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferJobs.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a transfer job. +-- +-- /See:/ for @StoragetransferTransferJobsGet@. +module StorageTransfer.TransferJobs.Get + ( + -- * REST Resource + TransferJobsGetAPI + + -- * Creating a Request + , transferJobsGet + , TransferJobsGet + + -- * Request Lenses + , tjgXgafv + , tjgQuotaUser + , tjgPrettyPrint + , tjgUploadProtocol + , tjgPp + , tjgAccessToken + , tjgJobName + , tjgUploadType + , tjgBearerToken + , tjgKey + , tjgProjectId + , tjgOauthToken + , tjgFields + , tjgCallback + , tjgAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferJobsGet@ which the +-- 'TransferJobsGet' request conforms to. +type TransferJobsGetAPI = + "v1" :> + "{+jobName}" :> + QueryParam "projectId" Text :> + Get '[JSON] TransferJob + +-- | Gets a transfer job. +-- +-- /See:/ 'transferJobsGet' smart constructor. +data TransferJobsGet = TransferJobsGet + { _tjgXgafv :: !(Maybe Text) + , _tjgQuotaUser :: !(Maybe Text) + , _tjgPrettyPrint :: !Bool + , _tjgUploadProtocol :: !(Maybe Text) + , _tjgPp :: !Bool + , _tjgAccessToken :: !(Maybe Text) + , _tjgJobName :: !Text + , _tjgUploadType :: !(Maybe Text) + , _tjgBearerToken :: !(Maybe Text) + , _tjgKey :: !(Maybe Text) + , _tjgProjectId :: !(Maybe Text) + , _tjgOauthToken :: !(Maybe Text) + , _tjgFields :: !(Maybe Text) + , _tjgCallback :: !(Maybe Text) + , _tjgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferJobsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tjgXgafv' +-- +-- * 'tjgQuotaUser' +-- +-- * 'tjgPrettyPrint' +-- +-- * 'tjgUploadProtocol' +-- +-- * 'tjgPp' +-- +-- * 'tjgAccessToken' +-- +-- * 'tjgJobName' +-- +-- * 'tjgUploadType' +-- +-- * 'tjgBearerToken' +-- +-- * 'tjgKey' +-- +-- * 'tjgProjectId' +-- +-- * 'tjgOauthToken' +-- +-- * 'tjgFields' +-- +-- * 'tjgCallback' +-- +-- * 'tjgAlt' +transferJobsGet + :: Text -- ^ 'jobName' + -> TransferJobsGet +transferJobsGet pTjgJobName_ = + TransferJobsGet + { _tjgXgafv = Nothing + , _tjgQuotaUser = Nothing + , _tjgPrettyPrint = True + , _tjgUploadProtocol = Nothing + , _tjgPp = True + , _tjgAccessToken = Nothing + , _tjgJobName = pTjgJobName_ + , _tjgUploadType = Nothing + , _tjgBearerToken = Nothing + , _tjgKey = Nothing + , _tjgProjectId = Nothing + , _tjgOauthToken = Nothing + , _tjgFields = Nothing + , _tjgCallback = Nothing + , _tjgAlt = "json" + } + +-- | V1 error format. +tjgXgafv :: Lens' TransferJobsGet' (Maybe Text) +tjgXgafv = lens _tjgXgafv (\ s a -> s{_tjgXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tjgQuotaUser :: Lens' TransferJobsGet' (Maybe Text) +tjgQuotaUser + = lens _tjgQuotaUser (\ s a -> s{_tjgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tjgPrettyPrint :: Lens' TransferJobsGet' Bool +tjgPrettyPrint + = lens _tjgPrettyPrint + (\ s a -> s{_tjgPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tjgUploadProtocol :: Lens' TransferJobsGet' (Maybe Text) +tjgUploadProtocol + = lens _tjgUploadProtocol + (\ s a -> s{_tjgUploadProtocol = a}) + +-- | Pretty-print response. +tjgPp :: Lens' TransferJobsGet' Bool +tjgPp = lens _tjgPp (\ s a -> s{_tjgPp = a}) + +-- | OAuth access token. +tjgAccessToken :: Lens' TransferJobsGet' (Maybe Text) +tjgAccessToken + = lens _tjgAccessToken + (\ s a -> s{_tjgAccessToken = a}) + +-- | The job to get. Required. +tjgJobName :: Lens' TransferJobsGet' Text +tjgJobName + = lens _tjgJobName (\ s a -> s{_tjgJobName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tjgUploadType :: Lens' TransferJobsGet' (Maybe Text) +tjgUploadType + = lens _tjgUploadType + (\ s a -> s{_tjgUploadType = a}) + +-- | OAuth bearer token. +tjgBearerToken :: Lens' TransferJobsGet' (Maybe Text) +tjgBearerToken + = lens _tjgBearerToken + (\ s a -> s{_tjgBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tjgKey :: Lens' TransferJobsGet' (Maybe Text) +tjgKey = lens _tjgKey (\ s a -> s{_tjgKey = a}) + +-- | The ID of the Google Developers Console project that owns the job. +-- Required. +tjgProjectId :: Lens' TransferJobsGet' (Maybe Text) +tjgProjectId + = lens _tjgProjectId (\ s a -> s{_tjgProjectId = a}) + +-- | OAuth 2.0 token for the current user. +tjgOauthToken :: Lens' TransferJobsGet' (Maybe Text) +tjgOauthToken + = lens _tjgOauthToken + (\ s a -> s{_tjgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tjgFields :: Lens' TransferJobsGet' (Maybe Text) +tjgFields + = lens _tjgFields (\ s a -> s{_tjgFields = a}) + +-- | JSONP +tjgCallback :: Lens' TransferJobsGet' (Maybe Text) +tjgCallback + = lens _tjgCallback (\ s a -> s{_tjgCallback = a}) + +-- | Data format for response. +tjgAlt :: Lens' TransferJobsGet' Text +tjgAlt = lens _tjgAlt (\ s a -> s{_tjgAlt = a}) + +instance GoogleRequest TransferJobsGet' where + type Rs TransferJobsGet' = TransferJob + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferJobsGet{..} + = go _tjgXgafv _tjgQuotaUser _tjgPrettyPrint + _tjgUploadProtocol + _tjgPp + _tjgAccessToken + _tjgJobName + _tjgUploadType + _tjgBearerToken + _tjgKey + _tjgProjectId + _tjgOauthToken + _tjgFields + _tjgCallback + _tjgAlt + where go + = clientWithRoute (Proxy :: Proxy TransferJobsGetAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/List.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/List.hs new file mode 100644 index 000000000..9c9de151a --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/List.hs @@ -0,0 +1,257 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferJobs.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists transfer jobs. +-- +-- /See:/ for @StoragetransferTransferJobsList@. +module StorageTransfer.TransferJobs.List + ( + -- * REST Resource + TransferJobsListAPI + + -- * Creating a Request + , transferJobsList + , TransferJobsList + + -- * Request Lenses + , tjlXgafv + , tjlQuotaUser + , tjlPrettyPrint + , tjlUploadProtocol + , tjlPp + , tjlAccessToken + , tjlUploadType + , tjlBearerToken + , tjlKey + , tjlFilter + , tjlPageToken + , tjlOauthToken + , tjlPageSize + , tjlFields + , tjlCallback + , tjlAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferJobsList@ which the +-- 'TransferJobsList' request conforms to. +type TransferJobsListAPI = + "v1" :> + "transferJobs" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListTransferJobsResponse + +-- | Lists transfer jobs. +-- +-- /See:/ 'transferJobsList' smart constructor. +data TransferJobsList = TransferJobsList + { _tjlXgafv :: !(Maybe Text) + , _tjlQuotaUser :: !(Maybe Text) + , _tjlPrettyPrint :: !Bool + , _tjlUploadProtocol :: !(Maybe Text) + , _tjlPp :: !Bool + , _tjlAccessToken :: !(Maybe Text) + , _tjlUploadType :: !(Maybe Text) + , _tjlBearerToken :: !(Maybe Text) + , _tjlKey :: !(Maybe Text) + , _tjlFilter :: !(Maybe Text) + , _tjlPageToken :: !(Maybe Text) + , _tjlOauthToken :: !(Maybe Text) + , _tjlPageSize :: !(Maybe Int32) + , _tjlFields :: !(Maybe Text) + , _tjlCallback :: !(Maybe Text) + , _tjlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferJobsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tjlXgafv' +-- +-- * 'tjlQuotaUser' +-- +-- * 'tjlPrettyPrint' +-- +-- * 'tjlUploadProtocol' +-- +-- * 'tjlPp' +-- +-- * 'tjlAccessToken' +-- +-- * 'tjlUploadType' +-- +-- * 'tjlBearerToken' +-- +-- * 'tjlKey' +-- +-- * 'tjlFilter' +-- +-- * 'tjlPageToken' +-- +-- * 'tjlOauthToken' +-- +-- * 'tjlPageSize' +-- +-- * 'tjlFields' +-- +-- * 'tjlCallback' +-- +-- * 'tjlAlt' +transferJobsList + :: TransferJobsList +transferJobsList = + TransferJobsList + { _tjlXgafv = Nothing + , _tjlQuotaUser = Nothing + , _tjlPrettyPrint = True + , _tjlUploadProtocol = Nothing + , _tjlPp = True + , _tjlAccessToken = Nothing + , _tjlUploadType = Nothing + , _tjlBearerToken = Nothing + , _tjlKey = Nothing + , _tjlFilter = Nothing + , _tjlPageToken = Nothing + , _tjlOauthToken = Nothing + , _tjlPageSize = Nothing + , _tjlFields = Nothing + , _tjlCallback = Nothing + , _tjlAlt = "json" + } + +-- | V1 error format. +tjlXgafv :: Lens' TransferJobsList' (Maybe Text) +tjlXgafv = lens _tjlXgafv (\ s a -> s{_tjlXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tjlQuotaUser :: Lens' TransferJobsList' (Maybe Text) +tjlQuotaUser + = lens _tjlQuotaUser (\ s a -> s{_tjlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tjlPrettyPrint :: Lens' TransferJobsList' Bool +tjlPrettyPrint + = lens _tjlPrettyPrint + (\ s a -> s{_tjlPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tjlUploadProtocol :: Lens' TransferJobsList' (Maybe Text) +tjlUploadProtocol + = lens _tjlUploadProtocol + (\ s a -> s{_tjlUploadProtocol = a}) + +-- | Pretty-print response. +tjlPp :: Lens' TransferJobsList' Bool +tjlPp = lens _tjlPp (\ s a -> s{_tjlPp = a}) + +-- | OAuth access token. +tjlAccessToken :: Lens' TransferJobsList' (Maybe Text) +tjlAccessToken + = lens _tjlAccessToken + (\ s a -> s{_tjlAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tjlUploadType :: Lens' TransferJobsList' (Maybe Text) +tjlUploadType + = lens _tjlUploadType + (\ s a -> s{_tjlUploadType = a}) + +-- | OAuth bearer token. +tjlBearerToken :: Lens' TransferJobsList' (Maybe Text) +tjlBearerToken + = lens _tjlBearerToken + (\ s a -> s{_tjlBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tjlKey :: Lens' TransferJobsList' (Maybe Text) +tjlKey = lens _tjlKey (\ s a -> s{_tjlKey = a}) + +-- | A list of query parameters specified as JSON text in the form of +-- {\"\`project_id\`\":\"my_project_id\", +-- \"\`job_names\`\":[\"jobid1\",\"jobid2\",...], +-- \"\`job_statuses\`\":[\"status1\",\"status2\",...]}. Since \`job_names\` +-- and \`job_statuses\` support multiple values, their values must be +-- specified with array notation. \`project_id\` is required. \`job_names\` +-- and \`job_statuses\` are optional. The valid values for \`job_statuses\` +-- are case-insensitive: \`ENABLED\`, \`DISABLED\`, and \`DELETED\`. +tjlFilter :: Lens' TransferJobsList' (Maybe Text) +tjlFilter + = lens _tjlFilter (\ s a -> s{_tjlFilter = a}) + +-- | The list page token. +tjlPageToken :: Lens' TransferJobsList' (Maybe Text) +tjlPageToken + = lens _tjlPageToken (\ s a -> s{_tjlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tjlOauthToken :: Lens' TransferJobsList' (Maybe Text) +tjlOauthToken + = lens _tjlOauthToken + (\ s a -> s{_tjlOauthToken = a}) + +-- | The list page size. The max allowed value is 256. +tjlPageSize :: Lens' TransferJobsList' (Maybe Int32) +tjlPageSize + = lens _tjlPageSize (\ s a -> s{_tjlPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +tjlFields :: Lens' TransferJobsList' (Maybe Text) +tjlFields + = lens _tjlFields (\ s a -> s{_tjlFields = a}) + +-- | JSONP +tjlCallback :: Lens' TransferJobsList' (Maybe Text) +tjlCallback + = lens _tjlCallback (\ s a -> s{_tjlCallback = a}) + +-- | Data format for response. +tjlAlt :: Lens' TransferJobsList' Text +tjlAlt = lens _tjlAlt (\ s a -> s{_tjlAlt = a}) + +instance GoogleRequest TransferJobsList' where + type Rs TransferJobsList' = ListTransferJobsResponse + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferJobsList{..} + = go _tjlXgafv _tjlQuotaUser _tjlPrettyPrint + _tjlUploadProtocol + _tjlPp + _tjlAccessToken + _tjlUploadType + _tjlBearerToken + _tjlKey + _tjlFilter + _tjlPageToken + _tjlOauthToken + _tjlPageSize + _tjlFields + _tjlCallback + _tjlAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferJobsListAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Patch.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Patch.hs new file mode 100644 index 000000000..ffd4ffcd8 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Patch.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferJobs.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a transfer job. Updating a job\'s transfer spec does not affect +-- transfer operations that are running already. Updating the scheduling of +-- a job is not allowed. +-- +-- /See:/ for @StoragetransferTransferJobsPatch@. +module StorageTransfer.TransferJobs.Patch + ( + -- * REST Resource + TransferJobsPatchAPI + + -- * Creating a Request + , transferJobsPatch + , TransferJobsPatch + + -- * Request Lenses + , tjpXgafv + , tjpQuotaUser + , tjpPrettyPrint + , tjpUploadProtocol + , tjpPp + , tjpAccessToken + , tjpJobName + , tjpUploadType + , tjpBearerToken + , tjpKey + , tjpOauthToken + , tjpFields + , tjpCallback + , tjpAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferJobsPatch@ which the +-- 'TransferJobsPatch' request conforms to. +type TransferJobsPatchAPI = + "v1" :> "{+jobName}" :> Patch '[JSON] TransferJob + +-- | Updates a transfer job. Updating a job\'s transfer spec does not affect +-- transfer operations that are running already. Updating the scheduling of +-- a job is not allowed. +-- +-- /See:/ 'transferJobsPatch' smart constructor. +data TransferJobsPatch = TransferJobsPatch + { _tjpXgafv :: !(Maybe Text) + , _tjpQuotaUser :: !(Maybe Text) + , _tjpPrettyPrint :: !Bool + , _tjpUploadProtocol :: !(Maybe Text) + , _tjpPp :: !Bool + , _tjpAccessToken :: !(Maybe Text) + , _tjpJobName :: !Text + , _tjpUploadType :: !(Maybe Text) + , _tjpBearerToken :: !(Maybe Text) + , _tjpKey :: !(Maybe Text) + , _tjpOauthToken :: !(Maybe Text) + , _tjpFields :: !(Maybe Text) + , _tjpCallback :: !(Maybe Text) + , _tjpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferJobsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tjpXgafv' +-- +-- * 'tjpQuotaUser' +-- +-- * 'tjpPrettyPrint' +-- +-- * 'tjpUploadProtocol' +-- +-- * 'tjpPp' +-- +-- * 'tjpAccessToken' +-- +-- * 'tjpJobName' +-- +-- * 'tjpUploadType' +-- +-- * 'tjpBearerToken' +-- +-- * 'tjpKey' +-- +-- * 'tjpOauthToken' +-- +-- * 'tjpFields' +-- +-- * 'tjpCallback' +-- +-- * 'tjpAlt' +transferJobsPatch + :: Text -- ^ 'jobName' + -> TransferJobsPatch +transferJobsPatch pTjpJobName_ = + TransferJobsPatch + { _tjpXgafv = Nothing + , _tjpQuotaUser = Nothing + , _tjpPrettyPrint = True + , _tjpUploadProtocol = Nothing + , _tjpPp = True + , _tjpAccessToken = Nothing + , _tjpJobName = pTjpJobName_ + , _tjpUploadType = Nothing + , _tjpBearerToken = Nothing + , _tjpKey = Nothing + , _tjpOauthToken = Nothing + , _tjpFields = Nothing + , _tjpCallback = Nothing + , _tjpAlt = "json" + } + +-- | V1 error format. +tjpXgafv :: Lens' TransferJobsPatch' (Maybe Text) +tjpXgafv = lens _tjpXgafv (\ s a -> s{_tjpXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tjpQuotaUser :: Lens' TransferJobsPatch' (Maybe Text) +tjpQuotaUser + = lens _tjpQuotaUser (\ s a -> s{_tjpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tjpPrettyPrint :: Lens' TransferJobsPatch' Bool +tjpPrettyPrint + = lens _tjpPrettyPrint + (\ s a -> s{_tjpPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tjpUploadProtocol :: Lens' TransferJobsPatch' (Maybe Text) +tjpUploadProtocol + = lens _tjpUploadProtocol + (\ s a -> s{_tjpUploadProtocol = a}) + +-- | Pretty-print response. +tjpPp :: Lens' TransferJobsPatch' Bool +tjpPp = lens _tjpPp (\ s a -> s{_tjpPp = a}) + +-- | OAuth access token. +tjpAccessToken :: Lens' TransferJobsPatch' (Maybe Text) +tjpAccessToken + = lens _tjpAccessToken + (\ s a -> s{_tjpAccessToken = a}) + +-- | The name of job to update. Required. +tjpJobName :: Lens' TransferJobsPatch' Text +tjpJobName + = lens _tjpJobName (\ s a -> s{_tjpJobName = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tjpUploadType :: Lens' TransferJobsPatch' (Maybe Text) +tjpUploadType + = lens _tjpUploadType + (\ s a -> s{_tjpUploadType = a}) + +-- | OAuth bearer token. +tjpBearerToken :: Lens' TransferJobsPatch' (Maybe Text) +tjpBearerToken + = lens _tjpBearerToken + (\ s a -> s{_tjpBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tjpKey :: Lens' TransferJobsPatch' (Maybe Text) +tjpKey = lens _tjpKey (\ s a -> s{_tjpKey = a}) + +-- | OAuth 2.0 token for the current user. +tjpOauthToken :: Lens' TransferJobsPatch' (Maybe Text) +tjpOauthToken + = lens _tjpOauthToken + (\ s a -> s{_tjpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tjpFields :: Lens' TransferJobsPatch' (Maybe Text) +tjpFields + = lens _tjpFields (\ s a -> s{_tjpFields = a}) + +-- | JSONP +tjpCallback :: Lens' TransferJobsPatch' (Maybe Text) +tjpCallback + = lens _tjpCallback (\ s a -> s{_tjpCallback = a}) + +-- | Data format for response. +tjpAlt :: Lens' TransferJobsPatch' Text +tjpAlt = lens _tjpAlt (\ s a -> s{_tjpAlt = a}) + +instance GoogleRequest TransferJobsPatch' where + type Rs TransferJobsPatch' = TransferJob + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferJobsPatch{..} + = go _tjpXgafv _tjpQuotaUser _tjpPrettyPrint + _tjpUploadProtocol + _tjpPp + _tjpAccessToken + _tjpJobName + _tjpUploadType + _tjpBearerToken + _tjpKey + _tjpOauthToken + _tjpFields + _tjpCallback + _tjpAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferJobsPatchAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Cancel.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Cancel.hs new file mode 100644 index 000000000..85b8686b8 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Cancel.hs @@ -0,0 +1,226 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.Cancel +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Cancels a transfer. Use the get method to check whether the cancellation +-- succeeded or whether the operation completed despite cancellation. +-- +-- /See:/ for @StoragetransferTransferOperationsCancel@. +module StorageTransfer.TransferOperations.Cancel + ( + -- * REST Resource + TransferOperationsCancelAPI + + -- * Creating a Request + , transferOperationsCancel + , TransferOperationsCancel + + -- * Request Lenses + , tocXgafv + , tocQuotaUser + , tocPrettyPrint + , tocUploadProtocol + , tocPp + , tocAccessToken + , tocUploadType + , tocBearerToken + , tocKey + , tocName + , tocOauthToken + , tocFields + , tocCallback + , tocAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsCancel@ which the +-- 'TransferOperationsCancel' request conforms to. +type TransferOperationsCancelAPI = + "v1" :> "{+name}:cancel" :> Post '[JSON] Empty + +-- | Cancels a transfer. Use the get method to check whether the cancellation +-- succeeded or whether the operation completed despite cancellation. +-- +-- /See:/ 'transferOperationsCancel' smart constructor. +data TransferOperationsCancel = TransferOperationsCancel + { _tocXgafv :: !(Maybe Text) + , _tocQuotaUser :: !(Maybe Text) + , _tocPrettyPrint :: !Bool + , _tocUploadProtocol :: !(Maybe Text) + , _tocPp :: !Bool + , _tocAccessToken :: !(Maybe Text) + , _tocUploadType :: !(Maybe Text) + , _tocBearerToken :: !(Maybe Text) + , _tocKey :: !(Maybe Text) + , _tocName :: !Text + , _tocOauthToken :: !(Maybe Text) + , _tocFields :: !(Maybe Text) + , _tocCallback :: !(Maybe Text) + , _tocAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsCancel'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tocXgafv' +-- +-- * 'tocQuotaUser' +-- +-- * 'tocPrettyPrint' +-- +-- * 'tocUploadProtocol' +-- +-- * 'tocPp' +-- +-- * 'tocAccessToken' +-- +-- * 'tocUploadType' +-- +-- * 'tocBearerToken' +-- +-- * 'tocKey' +-- +-- * 'tocName' +-- +-- * 'tocOauthToken' +-- +-- * 'tocFields' +-- +-- * 'tocCallback' +-- +-- * 'tocAlt' +transferOperationsCancel + :: Text -- ^ 'name' + -> TransferOperationsCancel +transferOperationsCancel pTocName_ = + TransferOperationsCancel + { _tocXgafv = Nothing + , _tocQuotaUser = Nothing + , _tocPrettyPrint = True + , _tocUploadProtocol = Nothing + , _tocPp = True + , _tocAccessToken = Nothing + , _tocUploadType = Nothing + , _tocBearerToken = Nothing + , _tocKey = Nothing + , _tocName = pTocName_ + , _tocOauthToken = Nothing + , _tocFields = Nothing + , _tocCallback = Nothing + , _tocAlt = "json" + } + +-- | V1 error format. +tocXgafv :: Lens' TransferOperationsCancel' (Maybe Text) +tocXgafv = lens _tocXgafv (\ s a -> s{_tocXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tocQuotaUser :: Lens' TransferOperationsCancel' (Maybe Text) +tocQuotaUser + = lens _tocQuotaUser (\ s a -> s{_tocQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tocPrettyPrint :: Lens' TransferOperationsCancel' Bool +tocPrettyPrint + = lens _tocPrettyPrint + (\ s a -> s{_tocPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tocUploadProtocol :: Lens' TransferOperationsCancel' (Maybe Text) +tocUploadProtocol + = lens _tocUploadProtocol + (\ s a -> s{_tocUploadProtocol = a}) + +-- | Pretty-print response. +tocPp :: Lens' TransferOperationsCancel' Bool +tocPp = lens _tocPp (\ s a -> s{_tocPp = a}) + +-- | OAuth access token. +tocAccessToken :: Lens' TransferOperationsCancel' (Maybe Text) +tocAccessToken + = lens _tocAccessToken + (\ s a -> s{_tocAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tocUploadType :: Lens' TransferOperationsCancel' (Maybe Text) +tocUploadType + = lens _tocUploadType + (\ s a -> s{_tocUploadType = a}) + +-- | OAuth bearer token. +tocBearerToken :: Lens' TransferOperationsCancel' (Maybe Text) +tocBearerToken + = lens _tocBearerToken + (\ s a -> s{_tocBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tocKey :: Lens' TransferOperationsCancel' (Maybe Text) +tocKey = lens _tocKey (\ s a -> s{_tocKey = a}) + +-- | The name of the operation resource to be cancelled. +tocName :: Lens' TransferOperationsCancel' Text +tocName = lens _tocName (\ s a -> s{_tocName = a}) + +-- | OAuth 2.0 token for the current user. +tocOauthToken :: Lens' TransferOperationsCancel' (Maybe Text) +tocOauthToken + = lens _tocOauthToken + (\ s a -> s{_tocOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tocFields :: Lens' TransferOperationsCancel' (Maybe Text) +tocFields + = lens _tocFields (\ s a -> s{_tocFields = a}) + +-- | JSONP +tocCallback :: Lens' TransferOperationsCancel' (Maybe Text) +tocCallback + = lens _tocCallback (\ s a -> s{_tocCallback = a}) + +-- | Data format for response. +tocAlt :: Lens' TransferOperationsCancel' Text +tocAlt = lens _tocAlt (\ s a -> s{_tocAlt = a}) + +instance GoogleRequest TransferOperationsCancel' + where + type Rs TransferOperationsCancel' = Empty + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsCancel{..} + = go _tocXgafv _tocQuotaUser _tocPrettyPrint + _tocUploadProtocol + _tocPp + _tocAccessToken + _tocUploadType + _tocBearerToken + _tocKey + _tocName + _tocOauthToken + _tocFields + _tocCallback + _tocAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsCancelAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs new file mode 100644 index 000000000..d8a1d17a1 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | This method is not supported and the server returns \`UNIMPLEMENTED\`. +-- +-- /See:/ for @StoragetransferTransferOperationsDelete@. +module StorageTransfer.TransferOperations.Delete + ( + -- * REST Resource + TransferOperationsDeleteAPI + + -- * Creating a Request + , transferOperationsDelete + , TransferOperationsDelete + + -- * Request Lenses + , todXgafv + , todQuotaUser + , todPrettyPrint + , todUploadProtocol + , todPp + , todAccessToken + , todUploadType + , todBearerToken + , todKey + , todName + , todOauthToken + , todFields + , todCallback + , todAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsDelete@ which the +-- 'TransferOperationsDelete' request conforms to. +type TransferOperationsDeleteAPI = + "v1" :> "{+name}" :> Delete '[JSON] Empty + +-- | This method is not supported and the server returns \`UNIMPLEMENTED\`. +-- +-- /See:/ 'transferOperationsDelete' smart constructor. +data TransferOperationsDelete = TransferOperationsDelete + { _todXgafv :: !(Maybe Text) + , _todQuotaUser :: !(Maybe Text) + , _todPrettyPrint :: !Bool + , _todUploadProtocol :: !(Maybe Text) + , _todPp :: !Bool + , _todAccessToken :: !(Maybe Text) + , _todUploadType :: !(Maybe Text) + , _todBearerToken :: !(Maybe Text) + , _todKey :: !(Maybe Text) + , _todName :: !Text + , _todOauthToken :: !(Maybe Text) + , _todFields :: !(Maybe Text) + , _todCallback :: !(Maybe Text) + , _todAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'todXgafv' +-- +-- * 'todQuotaUser' +-- +-- * 'todPrettyPrint' +-- +-- * 'todUploadProtocol' +-- +-- * 'todPp' +-- +-- * 'todAccessToken' +-- +-- * 'todUploadType' +-- +-- * 'todBearerToken' +-- +-- * 'todKey' +-- +-- * 'todName' +-- +-- * 'todOauthToken' +-- +-- * 'todFields' +-- +-- * 'todCallback' +-- +-- * 'todAlt' +transferOperationsDelete + :: Text -- ^ 'name' + -> TransferOperationsDelete +transferOperationsDelete pTodName_ = + TransferOperationsDelete + { _todXgafv = Nothing + , _todQuotaUser = Nothing + , _todPrettyPrint = True + , _todUploadProtocol = Nothing + , _todPp = True + , _todAccessToken = Nothing + , _todUploadType = Nothing + , _todBearerToken = Nothing + , _todKey = Nothing + , _todName = pTodName_ + , _todOauthToken = Nothing + , _todFields = Nothing + , _todCallback = Nothing + , _todAlt = "json" + } + +-- | V1 error format. +todXgafv :: Lens' TransferOperationsDelete' (Maybe Text) +todXgafv = lens _todXgafv (\ s a -> s{_todXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +todQuotaUser :: Lens' TransferOperationsDelete' (Maybe Text) +todQuotaUser + = lens _todQuotaUser (\ s a -> s{_todQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +todPrettyPrint :: Lens' TransferOperationsDelete' Bool +todPrettyPrint + = lens _todPrettyPrint + (\ s a -> s{_todPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +todUploadProtocol :: Lens' TransferOperationsDelete' (Maybe Text) +todUploadProtocol + = lens _todUploadProtocol + (\ s a -> s{_todUploadProtocol = a}) + +-- | Pretty-print response. +todPp :: Lens' TransferOperationsDelete' Bool +todPp = lens _todPp (\ s a -> s{_todPp = a}) + +-- | OAuth access token. +todAccessToken :: Lens' TransferOperationsDelete' (Maybe Text) +todAccessToken + = lens _todAccessToken + (\ s a -> s{_todAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +todUploadType :: Lens' TransferOperationsDelete' (Maybe Text) +todUploadType + = lens _todUploadType + (\ s a -> s{_todUploadType = a}) + +-- | OAuth bearer token. +todBearerToken :: Lens' TransferOperationsDelete' (Maybe Text) +todBearerToken + = lens _todBearerToken + (\ s a -> s{_todBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +todKey :: Lens' TransferOperationsDelete' (Maybe Text) +todKey = lens _todKey (\ s a -> s{_todKey = a}) + +-- | The name of the operation resource to be deleted. +todName :: Lens' TransferOperationsDelete' Text +todName = lens _todName (\ s a -> s{_todName = a}) + +-- | OAuth 2.0 token for the current user. +todOauthToken :: Lens' TransferOperationsDelete' (Maybe Text) +todOauthToken + = lens _todOauthToken + (\ s a -> s{_todOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +todFields :: Lens' TransferOperationsDelete' (Maybe Text) +todFields + = lens _todFields (\ s a -> s{_todFields = a}) + +-- | JSONP +todCallback :: Lens' TransferOperationsDelete' (Maybe Text) +todCallback + = lens _todCallback (\ s a -> s{_todCallback = a}) + +-- | Data format for response. +todAlt :: Lens' TransferOperationsDelete' Text +todAlt = lens _todAlt (\ s a -> s{_todAlt = a}) + +instance GoogleRequest TransferOperationsDelete' + where + type Rs TransferOperationsDelete' = Empty + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsDelete{..} + = go _todXgafv _todQuotaUser _todPrettyPrint + _todUploadProtocol + _todPp + _todAccessToken + _todUploadType + _todBearerToken + _todKey + _todName + _todOauthToken + _todFields + _todCallback + _todAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsDeleteAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Get.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Get.hs new file mode 100644 index 000000000..ca9fd0938 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Get.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets the latest state of a long-running operation. Clients can use this +-- method to poll the operation result at intervals as recommended by the +-- API service. +-- +-- /See:/ for @StoragetransferTransferOperationsGet@. +module StorageTransfer.TransferOperations.Get + ( + -- * REST Resource + TransferOperationsGetAPI + + -- * Creating a Request + , transferOperationsGet + , TransferOperationsGet + + -- * Request Lenses + , togXgafv + , togQuotaUser + , togPrettyPrint + , togUploadProtocol + , togPp + , togAccessToken + , togUploadType + , togBearerToken + , togKey + , togName + , togOauthToken + , togFields + , togCallback + , togAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsGet@ which the +-- 'TransferOperationsGet' request conforms to. +type TransferOperationsGetAPI = + "v1" :> "{+name}" :> Get '[JSON] Operation + +-- | Gets the latest state of a long-running operation. Clients can use this +-- method to poll the operation result at intervals as recommended by the +-- API service. +-- +-- /See:/ 'transferOperationsGet' smart constructor. +data TransferOperationsGet = TransferOperationsGet + { _togXgafv :: !(Maybe Text) + , _togQuotaUser :: !(Maybe Text) + , _togPrettyPrint :: !Bool + , _togUploadProtocol :: !(Maybe Text) + , _togPp :: !Bool + , _togAccessToken :: !(Maybe Text) + , _togUploadType :: !(Maybe Text) + , _togBearerToken :: !(Maybe Text) + , _togKey :: !(Maybe Text) + , _togName :: !Text + , _togOauthToken :: !(Maybe Text) + , _togFields :: !(Maybe Text) + , _togCallback :: !(Maybe Text) + , _togAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'togXgafv' +-- +-- * 'togQuotaUser' +-- +-- * 'togPrettyPrint' +-- +-- * 'togUploadProtocol' +-- +-- * 'togPp' +-- +-- * 'togAccessToken' +-- +-- * 'togUploadType' +-- +-- * 'togBearerToken' +-- +-- * 'togKey' +-- +-- * 'togName' +-- +-- * 'togOauthToken' +-- +-- * 'togFields' +-- +-- * 'togCallback' +-- +-- * 'togAlt' +transferOperationsGet + :: Text -- ^ 'name' + -> TransferOperationsGet +transferOperationsGet pTogName_ = + TransferOperationsGet + { _togXgafv = Nothing + , _togQuotaUser = Nothing + , _togPrettyPrint = True + , _togUploadProtocol = Nothing + , _togPp = True + , _togAccessToken = Nothing + , _togUploadType = Nothing + , _togBearerToken = Nothing + , _togKey = Nothing + , _togName = pTogName_ + , _togOauthToken = Nothing + , _togFields = Nothing + , _togCallback = Nothing + , _togAlt = "json" + } + +-- | V1 error format. +togXgafv :: Lens' TransferOperationsGet' (Maybe Text) +togXgafv = lens _togXgafv (\ s a -> s{_togXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +togQuotaUser :: Lens' TransferOperationsGet' (Maybe Text) +togQuotaUser + = lens _togQuotaUser (\ s a -> s{_togQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +togPrettyPrint :: Lens' TransferOperationsGet' Bool +togPrettyPrint + = lens _togPrettyPrint + (\ s a -> s{_togPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +togUploadProtocol :: Lens' TransferOperationsGet' (Maybe Text) +togUploadProtocol + = lens _togUploadProtocol + (\ s a -> s{_togUploadProtocol = a}) + +-- | Pretty-print response. +togPp :: Lens' TransferOperationsGet' Bool +togPp = lens _togPp (\ s a -> s{_togPp = a}) + +-- | OAuth access token. +togAccessToken :: Lens' TransferOperationsGet' (Maybe Text) +togAccessToken + = lens _togAccessToken + (\ s a -> s{_togAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +togUploadType :: Lens' TransferOperationsGet' (Maybe Text) +togUploadType + = lens _togUploadType + (\ s a -> s{_togUploadType = a}) + +-- | OAuth bearer token. +togBearerToken :: Lens' TransferOperationsGet' (Maybe Text) +togBearerToken + = lens _togBearerToken + (\ s a -> s{_togBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +togKey :: Lens' TransferOperationsGet' (Maybe Text) +togKey = lens _togKey (\ s a -> s{_togKey = a}) + +-- | The name of the operation resource. +togName :: Lens' TransferOperationsGet' Text +togName = lens _togName (\ s a -> s{_togName = a}) + +-- | OAuth 2.0 token for the current user. +togOauthToken :: Lens' TransferOperationsGet' (Maybe Text) +togOauthToken + = lens _togOauthToken + (\ s a -> s{_togOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +togFields :: Lens' TransferOperationsGet' (Maybe Text) +togFields + = lens _togFields (\ s a -> s{_togFields = a}) + +-- | JSONP +togCallback :: Lens' TransferOperationsGet' (Maybe Text) +togCallback + = lens _togCallback (\ s a -> s{_togCallback = a}) + +-- | Data format for response. +togAlt :: Lens' TransferOperationsGet' Text +togAlt = lens _togAlt (\ s a -> s{_togAlt = a}) + +instance GoogleRequest TransferOperationsGet' where + type Rs TransferOperationsGet' = Operation + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsGet{..} + = go _togXgafv _togQuotaUser _togPrettyPrint + _togUploadProtocol + _togPp + _togAccessToken + _togUploadType + _togBearerToken + _togKey + _togName + _togOauthToken + _togFields + _togCallback + _togAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsGetAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/List.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/List.hs new file mode 100644 index 000000000..b1170faa0 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/List.hs @@ -0,0 +1,270 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists operations that match the specified filter in the request. If the +-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE: +-- the \`name\` binding below allows API services to override the binding +-- to use different resource name schemes, such as +-- \`users\/*\/operations\`. +-- +-- /See:/ for @StoragetransferTransferOperationsList@. +module StorageTransfer.TransferOperations.List + ( + -- * REST Resource + TransferOperationsListAPI + + -- * Creating a Request + , transferOperationsList + , TransferOperationsList + + -- * Request Lenses + , tolXgafv + , tolQuotaUser + , tolPrettyPrint + , tolUploadProtocol + , tolPp + , tolAccessToken + , tolUploadType + , tolBearerToken + , tolKey + , tolName + , tolFilter + , tolPageToken + , tolOauthToken + , tolPageSize + , tolFields + , tolCallback + , tolAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsList@ which the +-- 'TransferOperationsList' request conforms to. +type TransferOperationsListAPI = + "v1" :> + "{+name}" :> + QueryParam "filter" Text :> + QueryParam "pageToken" Text :> + QueryParam "pageSize" Int32 :> + Get '[JSON] ListOperationsResponse + +-- | Lists operations that match the specified filter in the request. If the +-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE: +-- the \`name\` binding below allows API services to override the binding +-- to use different resource name schemes, such as +-- \`users\/*\/operations\`. +-- +-- /See:/ 'transferOperationsList' smart constructor. +data TransferOperationsList = TransferOperationsList + { _tolXgafv :: !(Maybe Text) + , _tolQuotaUser :: !(Maybe Text) + , _tolPrettyPrint :: !Bool + , _tolUploadProtocol :: !(Maybe Text) + , _tolPp :: !Bool + , _tolAccessToken :: !(Maybe Text) + , _tolUploadType :: !(Maybe Text) + , _tolBearerToken :: !(Maybe Text) + , _tolKey :: !(Maybe Text) + , _tolName :: !Text + , _tolFilter :: !(Maybe Text) + , _tolPageToken :: !(Maybe Text) + , _tolOauthToken :: !(Maybe Text) + , _tolPageSize :: !(Maybe Int32) + , _tolFields :: !(Maybe Text) + , _tolCallback :: !(Maybe Text) + , _tolAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tolXgafv' +-- +-- * 'tolQuotaUser' +-- +-- * 'tolPrettyPrint' +-- +-- * 'tolUploadProtocol' +-- +-- * 'tolPp' +-- +-- * 'tolAccessToken' +-- +-- * 'tolUploadType' +-- +-- * 'tolBearerToken' +-- +-- * 'tolKey' +-- +-- * 'tolName' +-- +-- * 'tolFilter' +-- +-- * 'tolPageToken' +-- +-- * 'tolOauthToken' +-- +-- * 'tolPageSize' +-- +-- * 'tolFields' +-- +-- * 'tolCallback' +-- +-- * 'tolAlt' +transferOperationsList + :: Text -- ^ 'name' + -> TransferOperationsList +transferOperationsList pTolName_ = + TransferOperationsList + { _tolXgafv = Nothing + , _tolQuotaUser = Nothing + , _tolPrettyPrint = True + , _tolUploadProtocol = Nothing + , _tolPp = True + , _tolAccessToken = Nothing + , _tolUploadType = Nothing + , _tolBearerToken = Nothing + , _tolKey = Nothing + , _tolName = pTolName_ + , _tolFilter = Nothing + , _tolPageToken = Nothing + , _tolOauthToken = Nothing + , _tolPageSize = Nothing + , _tolFields = Nothing + , _tolCallback = Nothing + , _tolAlt = "json" + } + +-- | V1 error format. +tolXgafv :: Lens' TransferOperationsList' (Maybe Text) +tolXgafv = lens _tolXgafv (\ s a -> s{_tolXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +tolQuotaUser :: Lens' TransferOperationsList' (Maybe Text) +tolQuotaUser + = lens _tolQuotaUser (\ s a -> s{_tolQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tolPrettyPrint :: Lens' TransferOperationsList' Bool +tolPrettyPrint + = lens _tolPrettyPrint + (\ s a -> s{_tolPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +tolUploadProtocol :: Lens' TransferOperationsList' (Maybe Text) +tolUploadProtocol + = lens _tolUploadProtocol + (\ s a -> s{_tolUploadProtocol = a}) + +-- | Pretty-print response. +tolPp :: Lens' TransferOperationsList' Bool +tolPp = lens _tolPp (\ s a -> s{_tolPp = a}) + +-- | OAuth access token. +tolAccessToken :: Lens' TransferOperationsList' (Maybe Text) +tolAccessToken + = lens _tolAccessToken + (\ s a -> s{_tolAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +tolUploadType :: Lens' TransferOperationsList' (Maybe Text) +tolUploadType + = lens _tolUploadType + (\ s a -> s{_tolUploadType = a}) + +-- | OAuth bearer token. +tolBearerToken :: Lens' TransferOperationsList' (Maybe Text) +tolBearerToken + = lens _tolBearerToken + (\ s a -> s{_tolBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tolKey :: Lens' TransferOperationsList' (Maybe Text) +tolKey = lens _tolKey (\ s a -> s{_tolKey = a}) + +-- | The value \`transferOperations\`. +tolName :: Lens' TransferOperationsList' Text +tolName = lens _tolName (\ s a -> s{_tolName = a}) + +-- | The standard list filter. +tolFilter :: Lens' TransferOperationsList' (Maybe Text) +tolFilter + = lens _tolFilter (\ s a -> s{_tolFilter = a}) + +-- | The standard list page token. +tolPageToken :: Lens' TransferOperationsList' (Maybe Text) +tolPageToken + = lens _tolPageToken (\ s a -> s{_tolPageToken = a}) + +-- | OAuth 2.0 token for the current user. +tolOauthToken :: Lens' TransferOperationsList' (Maybe Text) +tolOauthToken + = lens _tolOauthToken + (\ s a -> s{_tolOauthToken = a}) + +-- | The standard list page size. +tolPageSize :: Lens' TransferOperationsList' (Maybe Int32) +tolPageSize + = lens _tolPageSize (\ s a -> s{_tolPageSize = a}) + +-- | Selector specifying which fields to include in a partial response. +tolFields :: Lens' TransferOperationsList' (Maybe Text) +tolFields + = lens _tolFields (\ s a -> s{_tolFields = a}) + +-- | JSONP +tolCallback :: Lens' TransferOperationsList' (Maybe Text) +tolCallback + = lens _tolCallback (\ s a -> s{_tolCallback = a}) + +-- | Data format for response. +tolAlt :: Lens' TransferOperationsList' Text +tolAlt = lens _tolAlt (\ s a -> s{_tolAlt = a}) + +instance GoogleRequest TransferOperationsList' where + type Rs TransferOperationsList' = + ListOperationsResponse + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsList{..} + = go _tolXgafv _tolQuotaUser _tolPrettyPrint + _tolUploadProtocol + _tolPp + _tolAccessToken + _tolUploadType + _tolBearerToken + _tolKey + _tolName + _tolFilter + _tolPageToken + _tolOauthToken + _tolPageSize + _tolFields + _tolCallback + _tolAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsListAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Pause.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Pause.hs new file mode 100644 index 000000000..25306c53c --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Pause.hs @@ -0,0 +1,223 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.Pause +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Pauses a transfer operation. +-- +-- /See:/ for @StoragetransferTransferOperationsPause@. +module StorageTransfer.TransferOperations.Pause + ( + -- * REST Resource + TransferOperationsPauseAPI + + -- * Creating a Request + , transferOperationsPause + , TransferOperationsPause + + -- * Request Lenses + , topXgafv + , topQuotaUser + , topPrettyPrint + , topUploadProtocol + , topPp + , topAccessToken + , topUploadType + , topBearerToken + , topKey + , topName + , topOauthToken + , topFields + , topCallback + , topAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsPause@ which the +-- 'TransferOperationsPause' request conforms to. +type TransferOperationsPauseAPI = + "v1" :> "{+name}:pause" :> Post '[JSON] Empty + +-- | Pauses a transfer operation. +-- +-- /See:/ 'transferOperationsPause' smart constructor. +data TransferOperationsPause = TransferOperationsPause + { _topXgafv :: !(Maybe Text) + , _topQuotaUser :: !(Maybe Text) + , _topPrettyPrint :: !Bool + , _topUploadProtocol :: !(Maybe Text) + , _topPp :: !Bool + , _topAccessToken :: !(Maybe Text) + , _topUploadType :: !(Maybe Text) + , _topBearerToken :: !(Maybe Text) + , _topKey :: !(Maybe Text) + , _topName :: !Text + , _topOauthToken :: !(Maybe Text) + , _topFields :: !(Maybe Text) + , _topCallback :: !(Maybe Text) + , _topAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsPause'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'topXgafv' +-- +-- * 'topQuotaUser' +-- +-- * 'topPrettyPrint' +-- +-- * 'topUploadProtocol' +-- +-- * 'topPp' +-- +-- * 'topAccessToken' +-- +-- * 'topUploadType' +-- +-- * 'topBearerToken' +-- +-- * 'topKey' +-- +-- * 'topName' +-- +-- * 'topOauthToken' +-- +-- * 'topFields' +-- +-- * 'topCallback' +-- +-- * 'topAlt' +transferOperationsPause + :: Text -- ^ 'name' + -> TransferOperationsPause +transferOperationsPause pTopName_ = + TransferOperationsPause + { _topXgafv = Nothing + , _topQuotaUser = Nothing + , _topPrettyPrint = True + , _topUploadProtocol = Nothing + , _topPp = True + , _topAccessToken = Nothing + , _topUploadType = Nothing + , _topBearerToken = Nothing + , _topKey = Nothing + , _topName = pTopName_ + , _topOauthToken = Nothing + , _topFields = Nothing + , _topCallback = Nothing + , _topAlt = "json" + } + +-- | V1 error format. +topXgafv :: Lens' TransferOperationsPause' (Maybe Text) +topXgafv = lens _topXgafv (\ s a -> s{_topXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +topQuotaUser :: Lens' TransferOperationsPause' (Maybe Text) +topQuotaUser + = lens _topQuotaUser (\ s a -> s{_topQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +topPrettyPrint :: Lens' TransferOperationsPause' Bool +topPrettyPrint + = lens _topPrettyPrint + (\ s a -> s{_topPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +topUploadProtocol :: Lens' TransferOperationsPause' (Maybe Text) +topUploadProtocol + = lens _topUploadProtocol + (\ s a -> s{_topUploadProtocol = a}) + +-- | Pretty-print response. +topPp :: Lens' TransferOperationsPause' Bool +topPp = lens _topPp (\ s a -> s{_topPp = a}) + +-- | OAuth access token. +topAccessToken :: Lens' TransferOperationsPause' (Maybe Text) +topAccessToken + = lens _topAccessToken + (\ s a -> s{_topAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +topUploadType :: Lens' TransferOperationsPause' (Maybe Text) +topUploadType + = lens _topUploadType + (\ s a -> s{_topUploadType = a}) + +-- | OAuth bearer token. +topBearerToken :: Lens' TransferOperationsPause' (Maybe Text) +topBearerToken + = lens _topBearerToken + (\ s a -> s{_topBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +topKey :: Lens' TransferOperationsPause' (Maybe Text) +topKey = lens _topKey (\ s a -> s{_topKey = a}) + +-- | The name of the transfer operation. Required. +topName :: Lens' TransferOperationsPause' Text +topName = lens _topName (\ s a -> s{_topName = a}) + +-- | OAuth 2.0 token for the current user. +topOauthToken :: Lens' TransferOperationsPause' (Maybe Text) +topOauthToken + = lens _topOauthToken + (\ s a -> s{_topOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +topFields :: Lens' TransferOperationsPause' (Maybe Text) +topFields + = lens _topFields (\ s a -> s{_topFields = a}) + +-- | JSONP +topCallback :: Lens' TransferOperationsPause' (Maybe Text) +topCallback + = lens _topCallback (\ s a -> s{_topCallback = a}) + +-- | Data format for response. +topAlt :: Lens' TransferOperationsPause' Text +topAlt = lens _topAlt (\ s a -> s{_topAlt = a}) + +instance GoogleRequest TransferOperationsPause' where + type Rs TransferOperationsPause' = Empty + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsPause{..} + = go _topXgafv _topQuotaUser _topPrettyPrint + _topUploadProtocol + _topPp + _topAccessToken + _topUploadType + _topBearerToken + _topKey + _topName + _topOauthToken + _topFields + _topCallback + _topAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsPauseAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Resume.hs b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Resume.hs new file mode 100644 index 000000000..af1d0316c --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Resume.hs @@ -0,0 +1,224 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.StorageTransfer.TransferOperations.Resume +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Resumes a transfer operation that is paused. +-- +-- /See:/ for @StoragetransferTransferOperationsResume@. +module StorageTransfer.TransferOperations.Resume + ( + -- * REST Resource + TransferOperationsResumeAPI + + -- * Creating a Request + , transferOperationsResume + , TransferOperationsResume + + -- * Request Lenses + , torXgafv + , torQuotaUser + , torPrettyPrint + , torUploadProtocol + , torPp + , torAccessToken + , torUploadType + , torBearerToken + , torKey + , torName + , torOauthToken + , torFields + , torCallback + , torAlt + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types + +-- | A resource alias for @StoragetransferTransferOperationsResume@ which the +-- 'TransferOperationsResume' request conforms to. +type TransferOperationsResumeAPI = + "v1" :> "{+name}:resume" :> Post '[JSON] Empty + +-- | Resumes a transfer operation that is paused. +-- +-- /See:/ 'transferOperationsResume' smart constructor. +data TransferOperationsResume = TransferOperationsResume + { _torXgafv :: !(Maybe Text) + , _torQuotaUser :: !(Maybe Text) + , _torPrettyPrint :: !Bool + , _torUploadProtocol :: !(Maybe Text) + , _torPp :: !Bool + , _torAccessToken :: !(Maybe Text) + , _torUploadType :: !(Maybe Text) + , _torBearerToken :: !(Maybe Text) + , _torKey :: !(Maybe Text) + , _torName :: !Text + , _torOauthToken :: !(Maybe Text) + , _torFields :: !(Maybe Text) + , _torCallback :: !(Maybe Text) + , _torAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperationsResume'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'torXgafv' +-- +-- * 'torQuotaUser' +-- +-- * 'torPrettyPrint' +-- +-- * 'torUploadProtocol' +-- +-- * 'torPp' +-- +-- * 'torAccessToken' +-- +-- * 'torUploadType' +-- +-- * 'torBearerToken' +-- +-- * 'torKey' +-- +-- * 'torName' +-- +-- * 'torOauthToken' +-- +-- * 'torFields' +-- +-- * 'torCallback' +-- +-- * 'torAlt' +transferOperationsResume + :: Text -- ^ 'name' + -> TransferOperationsResume +transferOperationsResume pTorName_ = + TransferOperationsResume + { _torXgafv = Nothing + , _torQuotaUser = Nothing + , _torPrettyPrint = True + , _torUploadProtocol = Nothing + , _torPp = True + , _torAccessToken = Nothing + , _torUploadType = Nothing + , _torBearerToken = Nothing + , _torKey = Nothing + , _torName = pTorName_ + , _torOauthToken = Nothing + , _torFields = Nothing + , _torCallback = Nothing + , _torAlt = "json" + } + +-- | V1 error format. +torXgafv :: Lens' TransferOperationsResume' (Maybe Text) +torXgafv = lens _torXgafv (\ s a -> s{_torXgafv = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. +torQuotaUser :: Lens' TransferOperationsResume' (Maybe Text) +torQuotaUser + = lens _torQuotaUser (\ s a -> s{_torQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +torPrettyPrint :: Lens' TransferOperationsResume' Bool +torPrettyPrint + = lens _torPrettyPrint + (\ s a -> s{_torPrettyPrint = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +torUploadProtocol :: Lens' TransferOperationsResume' (Maybe Text) +torUploadProtocol + = lens _torUploadProtocol + (\ s a -> s{_torUploadProtocol = a}) + +-- | Pretty-print response. +torPp :: Lens' TransferOperationsResume' Bool +torPp = lens _torPp (\ s a -> s{_torPp = a}) + +-- | OAuth access token. +torAccessToken :: Lens' TransferOperationsResume' (Maybe Text) +torAccessToken + = lens _torAccessToken + (\ s a -> s{_torAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +torUploadType :: Lens' TransferOperationsResume' (Maybe Text) +torUploadType + = lens _torUploadType + (\ s a -> s{_torUploadType = a}) + +-- | OAuth bearer token. +torBearerToken :: Lens' TransferOperationsResume' (Maybe Text) +torBearerToken + = lens _torBearerToken + (\ s a -> s{_torBearerToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +torKey :: Lens' TransferOperationsResume' (Maybe Text) +torKey = lens _torKey (\ s a -> s{_torKey = a}) + +-- | The name of the transfer operation. Required. +torName :: Lens' TransferOperationsResume' Text +torName = lens _torName (\ s a -> s{_torName = a}) + +-- | OAuth 2.0 token for the current user. +torOauthToken :: Lens' TransferOperationsResume' (Maybe Text) +torOauthToken + = lens _torOauthToken + (\ s a -> s{_torOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +torFields :: Lens' TransferOperationsResume' (Maybe Text) +torFields + = lens _torFields (\ s a -> s{_torFields = a}) + +-- | JSONP +torCallback :: Lens' TransferOperationsResume' (Maybe Text) +torCallback + = lens _torCallback (\ s a -> s{_torCallback = a}) + +-- | Data format for response. +torAlt :: Lens' TransferOperationsResume' Text +torAlt = lens _torAlt (\ s a -> s{_torAlt = a}) + +instance GoogleRequest TransferOperationsResume' + where + type Rs TransferOperationsResume' = Empty + request = requestWithRoute defReq storageTransferURL + requestWithRoute r u TransferOperationsResume{..} + = go _torXgafv _torQuotaUser _torPrettyPrint + _torUploadProtocol + _torPp + _torAccessToken + _torUploadType + _torBearerToken + _torKey + _torName + _torOauthToken + _torFields + _torCallback + _torAlt + where go + = clientWithRoute + (Proxy :: Proxy TransferOperationsResumeAPI) + r + u diff --git a/gogol-storage-transfer/gen/Network/Google/StorageTransfer.hs b/gogol-storage-transfer/gen/Network/Google/StorageTransfer.hs new file mode 100644 index 000000000..32c0a5f41 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/StorageTransfer.hs @@ -0,0 +1,273 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.StorageTransfer +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Transfers data from external data sources to a Google Cloud Storage +-- bucket or between Google Cloud Storage buckets. +-- +-- /See:/ +module Network.Google.StorageTransfer + ( + -- * API + StorageTransferAPI + , storageTransferAPI + , storageTransferURL + + -- * Service Methods + + -- * REST Resources + + -- ** StoragetransferGetGoogleServiceAccount + , module StorageTransfer.GetGoogleServiceAccount + + -- ** StoragetransferGoogleServiceAccountsGet + , module StorageTransfer.GoogleServiceAccounts.Get + + -- ** StoragetransferTransferJobsCreate + , module StorageTransfer.TransferJobs.Create + + -- ** StoragetransferTransferJobsGet + , module StorageTransfer.TransferJobs.Get + + -- ** StoragetransferTransferJobsList + , module StorageTransfer.TransferJobs.List + + -- ** StoragetransferTransferJobsPatch + , module StorageTransfer.TransferJobs.Patch + + -- ** StoragetransferTransferOperationsCancel + , module StorageTransfer.TransferOperations.Cancel + + -- ** StoragetransferTransferOperationsDelete + , module StorageTransfer.TransferOperations.Delete + + -- ** StoragetransferTransferOperationsGet + , module StorageTransfer.TransferOperations.Get + + -- ** StoragetransferTransferOperationsList + , module StorageTransfer.TransferOperations.List + + -- ** StoragetransferTransferOperationsPause + , module StorageTransfer.TransferOperations.Pause + + -- ** StoragetransferTransferOperationsResume + , module StorageTransfer.TransferOperations.Resume + + -- * Types + + -- ** ErrorSummary + , ErrorSummary + , errorSummary + , esErrorCount + , esErrorCode + , esErrorLogEntries + + -- ** Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- ** ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorNextPageToken + , lorOperations + + -- ** PauseTransferOperationRequest + , PauseTransferOperationRequest + , pauseTransferOperationRequest + + -- ** GoogleServiceAccount + , GoogleServiceAccount + , googleServiceAccount + , gsaAccountEmail + + -- ** ObjectConditions + , ObjectConditions + , objectConditions + , ocMinTimeElapsedSinceLastModification + , ocIncludePrefixes + , ocMaxTimeElapsedSinceLastModification + , ocExcludePrefixes + + -- ** Operation + , Operation + , operation + , oDone + , oError + , oResponse + , oName + , oMetadata + + -- ** Schedule + , Schedule + , schedule + , sScheduleEndDate + , sScheduleStartDate + , sStartTimeOfDay + + -- ** Empty + , Empty + , empty + + -- ** Date + , Date + , date + , dDay + , dYear + , dMonth + + -- ** UpdateTransferJobRequest + , UpdateTransferJobRequest + , updateTransferJobRequest + , utjrTransferJob + , utjrProjectId + , utjrUpdateTransferJobFieldMask + + -- ** TransferCounters + , TransferCounters + , transferCounters + , tcBytesFoundOnlyFromSink + , tcBytesDeletedFromSink + , tcObjectsDeletedFromSource + , tcObjectsFoundFromSource + , tcBytesFailedToDeleteFromSink + , tcBytesFromSourceFailed + , tcBytesCopiedToSink + , tcBytesFoundFromSource + , tcBytesDeletedFromSource + , tcObjectsDeletedFromSink + , tcObjectsFoundOnlyFromSink + , tcBytesFromSourceSkippedBySync + , tcObjectsCopiedToSink + , tcObjectsFromSourceFailed + , tcObjectsFailedToDeleteFromSink + , tcObjectsFromSourceSkippedBySync + + -- ** TransferJob + , TransferJob + , transferJob + , tjCreationTime + , tjStatus + , tjSchedule + , tjDeletionTime + , tjName + , tjProjectId + , tjTransferSpec + , tjDescription + , tjLastModificationTime + + -- ** GcsData + , GcsData + , gcsData + , gdBucketName + + -- ** AwsS3Data + , AwsS3Data + , awsS3Data + , asdBucketName + , asdAwsAccessKey + + -- ** HTTPData + , HTTPData + , hTTPData + , httpdListUrl + + -- ** ErrorLogEntry + , ErrorLogEntry + , errorLogEntry + , eleUrl + , eleErrorDetails + + -- ** TimeOfDay + , TimeOfDay + , timeOfDay + , todNanos + , todHours + , todMinutes + , todSeconds + + -- ** TransferOptions + , TransferOptions + , transferOptions + , toDeleteObjectsUniqueInSink + , toDeleteObjectsFromSourceAfterTransfer + , toOverwriteObjectsAlreadyExistingInSink + + -- ** TransferOperation + , TransferOperation + , transferOperation + , toStatus + , toCounters + , toStartTime + , toTransferJobName + , toName + , toEndTime + , toProjectId + , toTransferSpec + , toErrorBreakdowns + + -- ** TransferSpec + , TransferSpec + , transferSpec + , tsGcsDataSource + , tsObjectConditions + , tsHttpDataSource + , tsAwsS3DataSource + , tsGcsDataSink + , tsTransferOptions + + -- ** ListTransferJobsResponse + , ListTransferJobsResponse + , listTransferJobsResponse + , ltjrNextPageToken + , ltjrTransferJobs + + -- ** AwsAccessKey + , AwsAccessKey + , awsAccessKey + , aakSecretAccessKey + , aakAccessKeyId + + -- ** ResumeTransferOperationRequest + , ResumeTransferOperationRequest + , resumeTransferOperationRequest + ) where + +import Network.Google.Prelude +import Network.Google.Resource.StorageTransfer.GetGoogleServiceAccount +import Network.Google.Resource.StorageTransfer.GoogleServiceAccounts.Get +import Network.Google.Resource.StorageTransfer.TransferJobs.Create +import Network.Google.Resource.StorageTransfer.TransferJobs.Get +import Network.Google.Resource.StorageTransfer.TransferJobs.List +import Network.Google.Resource.StorageTransfer.TransferJobs.Patch +import Network.Google.Resource.StorageTransfer.TransferOperations.Cancel +import Network.Google.Resource.StorageTransfer.TransferOperations.Delete +import Network.Google.Resource.StorageTransfer.TransferOperations.Get +import Network.Google.Resource.StorageTransfer.TransferOperations.List +import Network.Google.Resource.StorageTransfer.TransferOperations.Pause +import Network.Google.Resource.StorageTransfer.TransferOperations.Resume +import Network.Google.StorageTransfer.Types + +{- $resources +TODO +-} + +type StorageTransferAPI = + TransferJobs :<|> V1 :<|> TransferOperations :<|> + GoogleServiceAccounts + +storageTransferAPI :: Proxy StorageTransferAPI +storageTransferAPI = Proxy diff --git a/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types.hs b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types.hs new file mode 100644 index 000000000..21c5bfcb9 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types.hs @@ -0,0 +1,210 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.StorageTransfer.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.StorageTransfer.Types + ( + -- * Service URL + storageTransferURL + + -- * ErrorSummary + , ErrorSummary + , errorSummary + , esErrorCount + , esErrorCode + , esErrorLogEntries + + -- * Status + , Status + , status + , sDetails + , sCode + , sMessage + + -- * ListOperationsResponse + , ListOperationsResponse + , listOperationsResponse + , lorNextPageToken + , lorOperations + + -- * PauseTransferOperationRequest + , PauseTransferOperationRequest + , pauseTransferOperationRequest + + -- * GoogleServiceAccount + , GoogleServiceAccount + , googleServiceAccount + , gsaAccountEmail + + -- * ObjectConditions + , ObjectConditions + , objectConditions + , ocMinTimeElapsedSinceLastModification + , ocIncludePrefixes + , ocMaxTimeElapsedSinceLastModification + , ocExcludePrefixes + + -- * Operation + , Operation + , operation + , oDone + , oError + , oResponse + , oName + , oMetadata + + -- * Schedule + , Schedule + , schedule + , sScheduleEndDate + , sScheduleStartDate + , sStartTimeOfDay + + -- * Empty + , Empty + , empty + + -- * Date + , Date + , date + , dDay + , dYear + , dMonth + + -- * UpdateTransferJobRequest + , UpdateTransferJobRequest + , updateTransferJobRequest + , utjrTransferJob + , utjrProjectId + , utjrUpdateTransferJobFieldMask + + -- * TransferCounters + , TransferCounters + , transferCounters + , tcBytesFoundOnlyFromSink + , tcBytesDeletedFromSink + , tcObjectsDeletedFromSource + , tcObjectsFoundFromSource + , tcBytesFailedToDeleteFromSink + , tcBytesFromSourceFailed + , tcBytesCopiedToSink + , tcBytesFoundFromSource + , tcBytesDeletedFromSource + , tcObjectsDeletedFromSink + , tcObjectsFoundOnlyFromSink + , tcBytesFromSourceSkippedBySync + , tcObjectsCopiedToSink + , tcObjectsFromSourceFailed + , tcObjectsFailedToDeleteFromSink + , tcObjectsFromSourceSkippedBySync + + -- * TransferJob + , TransferJob + , transferJob + , tjCreationTime + , tjStatus + , tjSchedule + , tjDeletionTime + , tjName + , tjProjectId + , tjTransferSpec + , tjDescription + , tjLastModificationTime + + -- * GcsData + , GcsData + , gcsData + , gdBucketName + + -- * AwsS3Data + , AwsS3Data + , awsS3Data + , asdBucketName + , asdAwsAccessKey + + -- * HTTPData + , HTTPData + , hTTPData + , httpdListUrl + + -- * ErrorLogEntry + , ErrorLogEntry + , errorLogEntry + , eleUrl + , eleErrorDetails + + -- * TimeOfDay + , TimeOfDay + , timeOfDay + , todNanos + , todHours + , todMinutes + , todSeconds + + -- * TransferOptions + , TransferOptions + , transferOptions + , toDeleteObjectsUniqueInSink + , toDeleteObjectsFromSourceAfterTransfer + , toOverwriteObjectsAlreadyExistingInSink + + -- * TransferOperation + , TransferOperation + , transferOperation + , toStatus + , toCounters + , toStartTime + , toTransferJobName + , toName + , toEndTime + , toProjectId + , toTransferSpec + , toErrorBreakdowns + + -- * TransferSpec + , TransferSpec + , transferSpec + , tsGcsDataSource + , tsObjectConditions + , tsHttpDataSource + , tsAwsS3DataSource + , tsGcsDataSink + , tsTransferOptions + + -- * ListTransferJobsResponse + , ListTransferJobsResponse + , listTransferJobsResponse + , ltjrNextPageToken + , ltjrTransferJobs + + -- * AwsAccessKey + , AwsAccessKey + , awsAccessKey + , aakSecretAccessKey + , aakAccessKeyId + + -- * ResumeTransferOperationRequest + , ResumeTransferOperationRequest + , resumeTransferOperationRequest + ) where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types.Product +import Network.Google.StorageTransfer.Types.Sum + +-- | URL referring to version 'v1' of the Google Storage Transfer API. +storageTransferURL :: BaseURL +storageTransferURL + = BaseUrl Https + "https://storagetransfer.googleapis.com/" + 443 diff --git a/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs new file mode 100644 index 000000000..a908fe17f --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs @@ -0,0 +1,1779 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.StorageTransfer.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.StorageTransfer.Types.Product where + +import Network.Google.Prelude +import Network.Google.StorageTransfer.Types.Sum + +-- | A summary of errors by error code, plus a count and sample error log +-- entries. +-- +-- /See:/ 'errorSummary' smart constructor. +data ErrorSummary = ErrorSummary + { _esErrorCount :: !(Maybe Int64) + , _esErrorCode :: !(Maybe Text) + , _esErrorLogEntries :: !(Maybe [Maybe ErrorLogEntry]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ErrorSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'esErrorCount' +-- +-- * 'esErrorCode' +-- +-- * 'esErrorLogEntries' +errorSummary + :: ErrorSummary +errorSummary = + ErrorSummary + { _esErrorCount = Nothing + , _esErrorCode = Nothing + , _esErrorLogEntries = Nothing + } + +-- | Count of this type of error. Required. +esErrorCount :: Lens' ErrorSummary (Maybe Int64) +esErrorCount + = lens _esErrorCount (\ s a -> s{_esErrorCount = a}) + +-- | Required. +esErrorCode :: Lens' ErrorSummary (Maybe Text) +esErrorCode + = lens _esErrorCode (\ s a -> s{_esErrorCode = a}) + +-- | Error samples. +esErrorLogEntries :: Lens' ErrorSummary [Maybe ErrorLogEntry] +esErrorLogEntries + = lens _esErrorLogEntries + (\ s a -> s{_esErrorLogEntries = a}) + . _Default + . _Coerce + +instance FromJSON ErrorSummary where + parseJSON + = withObject "ErrorSummary" + (\ o -> + ErrorSummary <$> + (o .:? "errorCount") <*> (o .:? "errorCode") <*> + (o .:? "errorLogEntries" .!= mempty)) + +instance ToJSON ErrorSummary where + toJSON ErrorSummary{..} + = object + (catMaybes + [("errorCount" .=) <$> _esErrorCount, + ("errorCode" .=) <$> _esErrorCode, + ("errorLogEntries" .=) <$> _esErrorLogEntries]) + +-- | The \`Status\` type defines a logical error model that is suitable for +-- different programming environments, including REST APIs and RPC APIs. It +-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is +-- designed to be: - Simple to use and understand for most users - Flexible +-- enough to meet unexpected needs # Overview The \`Status\` message +-- contains three pieces of data: error code, error message, and error +-- details. The error code should be an enum value of +-- [google.rpc.Code][google.rpc.Code], but it may accept additional error +-- codes if needed. The error message should be a developer-facing English +-- message that helps developers *understand* and *resolve* the error. If a +-- localized user-facing error message is needed, put the localized message +-- in the error details or localize it in the client. The optional error +-- details may contain arbitrary information about the error. There is a +-- predefined set of error detail types in the package \`google.rpc\` which +-- can be used for common error conditions. # Language mapping The +-- \`Status\` message is the logical representation of the error model, but +-- it is not necessarily the actual wire format. When the \`Status\` +-- message is exposed in different client libraries and different wire +-- protocols, it can be mapped differently. For example, it will likely be +-- mapped to some exceptions in Java, but more likely mapped to some error +-- codes in C. # Other uses The error model and the \`Status\` message can +-- be used in a variety of environments, either with or without APIs, to +-- provide a consistent developer experience across different environments. +-- Example uses of this error model include: - Partial errors. If a service +-- needs to return partial errors to the client, it may embed the +-- \`Status\` in the normal response to indicate the partial errors. - +-- Workflow errors. A typical workflow has multiple steps. Each step may +-- have a \`Status\` message for error reporting purpose. - Batch +-- operations. If a client uses batch request and batch response, the +-- \`Status\` message should be used directly inside batch response, one +-- for each error sub-response. - Asynchronous operations. If an API call +-- embeds asynchronous operation results in its response, the status of +-- those operations should be represented directly using the \`Status\` +-- message. - Logging. If some API errors are stored in logs, the message +-- \`Status\` could be used directly after any stripping needed for +-- security\/privacy reasons. +-- +-- /See:/ 'status' smart constructor. +data Status = Status + { _sDetails :: !(Maybe [StatusDetailsItem]) + , _sCode :: !(Maybe Int32) + , _sMessage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Status' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sDetails' +-- +-- * 'sCode' +-- +-- * 'sMessage' +status + :: Status +status = + Status + { _sDetails = Nothing + , _sCode = Nothing + , _sMessage = Nothing + } + +-- | A list of messages that carry the error details. There will be a common +-- set of message types for APIs to use. +sDetails :: Lens' Status [StatusDetailsItem] +sDetails + = lens _sDetails (\ s a -> s{_sDetails = a}) . + _Default + . _Coerce + +-- | The status code, which should be an enum value of +-- [google.rpc.Code][google.rpc.Code]. +sCode :: Lens' Status (Maybe Int32) +sCode = lens _sCode (\ s a -> s{_sCode = a}) + +-- | A developer-facing error message, which should be in English. Any +-- user-facing error message should be localized and sent in the +-- [google.rpc.Status.details][google.rpc.Status.details] field, or +-- localized by the client. +sMessage :: Lens' Status (Maybe Text) +sMessage = lens _sMessage (\ s a -> s{_sMessage = a}) + +instance FromJSON Status where + parseJSON + = withObject "Status" + (\ o -> + Status <$> + (o .:? "details" .!= mempty) <*> (o .:? "code") <*> + (o .:? "message")) + +instance ToJSON Status where + toJSON Status{..} + = object + (catMaybes + [("details" .=) <$> _sDetails, + ("code" .=) <$> _sCode, + ("message" .=) <$> _sMessage]) + +-- | The response message for +-- [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +-- +-- /See:/ 'listOperationsResponse' smart constructor. +data ListOperationsResponse = ListOperationsResponse + { _lorNextPageToken :: !(Maybe Text) + , _lorOperations :: !(Maybe [Maybe Operation]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lorNextPageToken' +-- +-- * 'lorOperations' +listOperationsResponse + :: ListOperationsResponse +listOperationsResponse = + ListOperationsResponse + { _lorNextPageToken = Nothing + , _lorOperations = Nothing + } + +-- | The standard List next-page token. +lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text) +lorNextPageToken + = lens _lorNextPageToken + (\ s a -> s{_lorNextPageToken = a}) + +-- | A list of operations that matches the specified filter in the request. +lorOperations :: Lens' ListOperationsResponse [Maybe Operation] +lorOperations + = lens _lorOperations + (\ s a -> s{_lorOperations = a}) + . _Default + . _Coerce + +instance FromJSON ListOperationsResponse where + parseJSON + = withObject "ListOperationsResponse" + (\ o -> + ListOperationsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "operations" .!= mempty)) + +instance ToJSON ListOperationsResponse where + toJSON ListOperationsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _lorNextPageToken, + ("operations" .=) <$> _lorOperations]) + +-- | Request passed to PauseTransferOperation. +-- +-- /See:/ 'pauseTransferOperationRequest' smart constructor. +data PauseTransferOperationRequest = + PauseTransferOperationRequest + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PauseTransferOperationRequest' with the minimum fields required to make a request. +-- +pauseTransferOperationRequest + :: PauseTransferOperationRequest +pauseTransferOperationRequest = PauseTransferOperationRequest + +instance FromJSON PauseTransferOperationRequest where + parseJSON + = withObject "PauseTransferOperationRequest" + (\ o -> pure PauseTransferOperationRequest) + +instance ToJSON PauseTransferOperationRequest where + toJSON = const (Object mempty) + +-- | Google service account +-- +-- /See:/ 'googleServiceAccount' smart constructor. +newtype GoogleServiceAccount = GoogleServiceAccount + { _gsaAccountEmail :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GoogleServiceAccount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gsaAccountEmail' +googleServiceAccount + :: GoogleServiceAccount +googleServiceAccount = + GoogleServiceAccount + { _gsaAccountEmail = Nothing + } + +-- | Required. +gsaAccountEmail :: Lens' GoogleServiceAccount (Maybe Text) +gsaAccountEmail + = lens _gsaAccountEmail + (\ s a -> s{_gsaAccountEmail = a}) + +instance FromJSON GoogleServiceAccount where + parseJSON + = withObject "GoogleServiceAccount" + (\ o -> + GoogleServiceAccount <$> (o .:? "accountEmail")) + +instance ToJSON GoogleServiceAccount where + toJSON GoogleServiceAccount{..} + = object + (catMaybes + [("accountEmail" .=) <$> _gsaAccountEmail]) + +-- | Conditions that determine which objects will be transferred. +-- +-- /See:/ 'objectConditions' smart constructor. +data ObjectConditions = ObjectConditions + { _ocMinTimeElapsedSinceLastModification :: !(Maybe Text) + , _ocIncludePrefixes :: !(Maybe [Text]) + , _ocMaxTimeElapsedSinceLastModification :: !(Maybe Text) + , _ocExcludePrefixes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectConditions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocMinTimeElapsedSinceLastModification' +-- +-- * 'ocIncludePrefixes' +-- +-- * 'ocMaxTimeElapsedSinceLastModification' +-- +-- * 'ocExcludePrefixes' +objectConditions + :: ObjectConditions +objectConditions = + ObjectConditions + { _ocMinTimeElapsedSinceLastModification = Nothing + , _ocIncludePrefixes = Nothing + , _ocMaxTimeElapsedSinceLastModification = Nothing + , _ocExcludePrefixes = Nothing + } + +-- | If unspecified, \`minTimeElapsedSinceLastModification\` takes a zero +-- value and \`maxTimeElapsedSinceLastModification\` takes the maximum +-- possible value of Duration. Objects that satisfy the object conditions +-- must either have a \`lastModificationTime\` greater or equal to \`NOW\` +-- - \`maxTimeElapsedSinceLastModification\` and less than \`NOW\` - +-- \`minTimeElapsedSinceLastModification\`, or not have a +-- \`lastModificationTime\`. +ocMinTimeElapsedSinceLastModification :: Lens' ObjectConditions (Maybe Text) +ocMinTimeElapsedSinceLastModification + = lens _ocMinTimeElapsedSinceLastModification + (\ s a -> + s{_ocMinTimeElapsedSinceLastModification = a}) + +-- | If \`includePrefixes\` is specified, objects that satisfy the object +-- conditions must have names that start with one of the +-- \`includePrefixes\` and that do not start with any of the +-- \`excludePrefixes\`. If \`includePrefixes\` is not specified, all +-- objects except those that have names starting with one of the +-- \`excludePrefixes\` must satisfy the object conditions. Requirements: * +-- Each include-prefix and exclude-prefix can contain any sequence of +-- Unicode characters, of max length 1024 bytes when UTF8-encoded, and must +-- not contain Carriage Return or Line Feed characters. Wildcard matching +-- and regular expression matching are not supported. * None of the +-- include-prefix or the exclude-prefix values can be empty, if specified. +-- * Each include-prefix must include a distinct portion of the object +-- namespace, i.e., no include-prefix may be a prefix of another +-- include-prefix. * Each exclude-prefix must exclude a distinct portion of +-- the object namespace, i.e., no exclude-prefix may be a prefix of another +-- exclude-prefix. * If \`includePrefixes\` is specified, then each +-- exclude-prefix must start with the value of a path explicitly included +-- by \`includePrefixes\`. The max size of \`includePrefixes\` is 20. +ocIncludePrefixes :: Lens' ObjectConditions [Text] +ocIncludePrefixes + = lens _ocIncludePrefixes + (\ s a -> s{_ocIncludePrefixes = a}) + . _Default + . _Coerce + +-- | \`maxTimeElapsedSinceLastModification\` is the complement to +-- \`minTimeElapsedSinceLastModification\`. +ocMaxTimeElapsedSinceLastModification :: Lens' ObjectConditions (Maybe Text) +ocMaxTimeElapsedSinceLastModification + = lens _ocMaxTimeElapsedSinceLastModification + (\ s a -> + s{_ocMaxTimeElapsedSinceLastModification = a}) + +-- | \`excludePrefixes\` must follow the requirements described for +-- \`includePrefixes\`. The max size of \`excludePrefixes\` is 20. +ocExcludePrefixes :: Lens' ObjectConditions [Text] +ocExcludePrefixes + = lens _ocExcludePrefixes + (\ s a -> s{_ocExcludePrefixes = a}) + . _Default + . _Coerce + +instance FromJSON ObjectConditions where + parseJSON + = withObject "ObjectConditions" + (\ o -> + ObjectConditions <$> + (o .:? "minTimeElapsedSinceLastModification") <*> + (o .:? "includePrefixes" .!= mempty) + <*> (o .:? "maxTimeElapsedSinceLastModification") + <*> (o .:? "excludePrefixes" .!= mempty)) + +instance ToJSON ObjectConditions where + toJSON ObjectConditions{..} + = object + (catMaybes + [("minTimeElapsedSinceLastModification" .=) <$> + _ocMinTimeElapsedSinceLastModification, + ("includePrefixes" .=) <$> _ocIncludePrefixes, + ("maxTimeElapsedSinceLastModification" .=) <$> + _ocMaxTimeElapsedSinceLastModification, + ("excludePrefixes" .=) <$> _ocExcludePrefixes]) + +-- | This resource represents a long-running operation that is the result of +-- a network API call. +-- +-- /See:/ 'operation' smart constructor. +data Operation = Operation + { _oDone :: !(Maybe Bool) + , _oError :: !(Maybe (Maybe Status)) + , _oResponse :: !(Maybe OperationResponse) + , _oName :: !(Maybe Text) + , _oMetadata :: !(Maybe OperationMetadata) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Operation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oDone' +-- +-- * 'oError' +-- +-- * 'oResponse' +-- +-- * 'oName' +-- +-- * 'oMetadata' +operation + :: Operation +operation = + Operation + { _oDone = Nothing + , _oError = Nothing + , _oResponse = Nothing + , _oName = Nothing + , _oMetadata = Nothing + } + +-- | If the value is \`false\`, it means the operation is still in progress. +-- If true, the operation is completed and the \`result\` is available. +oDone :: Lens' Operation (Maybe Bool) +oDone = lens _oDone (\ s a -> s{_oDone = a}) + +-- | The error result of the operation in case of failure. +oError :: Lens' Operation (Maybe (Maybe Status)) +oError = lens _oError (\ s a -> s{_oError = a}) + +-- | The normal response of the operation in case of success. If the original +-- method returns no data on success, such as \`Delete\`, the response is +-- \`google.protobuf.Empty\`. If the original method is standard +-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource. +-- For other methods, the response should have the type \`XxxResponse\`, +-- where \`Xxx\` is the original method name. For example, if the original +-- method name is \`TakeSnapshot()\`, the inferred response type is +-- \`TakeSnapshotResponse\`. +oResponse :: Lens' Operation (Maybe OperationResponse) +oResponse + = lens _oResponse (\ s a -> s{_oResponse = a}) + +-- | The server-assigned name, which is only unique within the same service +-- that originally returns it. If you use the default HTTP mapping above, +-- the \`name\` should have the format of +-- \`operations\/some\/unique\/name\`. +oName :: Lens' Operation (Maybe Text) +oName = lens _oName (\ s a -> s{_oName = a}) + +-- | Represents the transfer operation object. +oMetadata :: Lens' Operation (Maybe OperationMetadata) +oMetadata + = lens _oMetadata (\ s a -> s{_oMetadata = a}) + +instance FromJSON Operation where + parseJSON + = withObject "Operation" + (\ o -> + Operation <$> + (o .:? "done") <*> (o .:? "error") <*> + (o .:? "response") + <*> (o .:? "name") + <*> (o .:? "metadata")) + +instance ToJSON Operation where + toJSON Operation{..} + = object + (catMaybes + [("done" .=) <$> _oDone, ("error" .=) <$> _oError, + ("response" .=) <$> _oResponse, + ("name" .=) <$> _oName, + ("metadata" .=) <$> _oMetadata]) + +-- | Transfers can be scheduled to recur or to run just once. +-- +-- /See:/ 'schedule' smart constructor. +data Schedule = Schedule + { _sScheduleEndDate :: !(Maybe (Maybe Date)) + , _sScheduleStartDate :: !(Maybe (Maybe Date)) + , _sStartTimeOfDay :: !(Maybe (Maybe TimeOfDay)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Schedule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sScheduleEndDate' +-- +-- * 'sScheduleStartDate' +-- +-- * 'sStartTimeOfDay' +schedule + :: Schedule +schedule = + Schedule + { _sScheduleEndDate = Nothing + , _sScheduleStartDate = Nothing + , _sStartTimeOfDay = Nothing + } + +-- | The last day the recurring transfer will be run. If \`scheduleEndDate\` +-- is the same as \`scheduleStartDate\`, the transfer will be executed only +-- once. +sScheduleEndDate :: Lens' Schedule (Maybe (Maybe Date)) +sScheduleEndDate + = lens _sScheduleEndDate + (\ s a -> s{_sScheduleEndDate = a}) + +-- | The first day the recurring transfer is scheduled to run. Required. +sScheduleStartDate :: Lens' Schedule (Maybe (Maybe Date)) +sScheduleStartDate + = lens _sScheduleStartDate + (\ s a -> s{_sScheduleStartDate = a}) + +-- | The time in UTC at which the transfer will be scheduled to start in a +-- day. Transfers may start later than this time. If not specified, +-- transfers are scheduled to start at midnight UTC. +sStartTimeOfDay :: Lens' Schedule (Maybe (Maybe TimeOfDay)) +sStartTimeOfDay + = lens _sStartTimeOfDay + (\ s a -> s{_sStartTimeOfDay = a}) + +instance FromJSON Schedule where + parseJSON + = withObject "Schedule" + (\ o -> + Schedule <$> + (o .:? "scheduleEndDate") <*> + (o .:? "scheduleStartDate") + <*> (o .:? "startTimeOfDay")) + +instance ToJSON Schedule where + toJSON Schedule{..} + = object + (catMaybes + [("scheduleEndDate" .=) <$> _sScheduleEndDate, + ("scheduleStartDate" .=) <$> _sScheduleStartDate, + ("startTimeOfDay" .=) <$> _sStartTimeOfDay]) + +-- | A generic empty message that you can re-use to avoid defining duplicated +-- empty messages in your APIs. A typical example is to use it as the +-- request or the response type of an API method. For instance: service Foo +-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The +-- JSON representation for \`Empty\` is empty JSON object \`{}\`. +-- +-- /See:/ 'empty' smart constructor. +data Empty = + Empty + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Empty' with the minimum fields required to make a request. +-- +empty + :: Empty +empty = Empty + +instance FromJSON Empty where + parseJSON = withObject "Empty" (\ o -> pure Empty) + +instance ToJSON Empty where + toJSON = const (Object mempty) + +-- | Represents a whole calendar date, e.g. date of birth. The time of day +-- and time zone are either specified elsewhere or are not significant. The +-- date is relative to the Proleptic Gregorian Calendar. The day may be 0 +-- to represent a year and month where the day is not significant, e.g. +-- credit card expiration date. The year may be 0 to represent a month and +-- day independent of year, e.g. anniversary date. Related types are +-- [google.type.TimeOfDay][google.type.TimeOfDay] and +-- \`google.protobuf.Timestamp\`. +-- +-- /See:/ 'date' smart constructor. +data Date = Date + { _dDay :: !(Maybe Int32) + , _dYear :: !(Maybe Int32) + , _dMonth :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Date' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dDay' +-- +-- * 'dYear' +-- +-- * 'dMonth' +date + :: Date +date = + Date + { _dDay = Nothing + , _dYear = Nothing + , _dMonth = Nothing + } + +-- | Day of month. Must be from 1 to 31 and valid for the year and month, or +-- 0 if specifying a year\/month where the day is not sigificant. +dDay :: Lens' Date (Maybe Int32) +dDay = lens _dDay (\ s a -> s{_dDay = a}) + +-- | Year of date. Must be from 1 to 9,999, or 0 if specifying a date without +-- a year. +dYear :: Lens' Date (Maybe Int32) +dYear = lens _dYear (\ s a -> s{_dYear = a}) + +-- | Month of year of date. Must be from 1 to 12. +dMonth :: Lens' Date (Maybe Int32) +dMonth = lens _dMonth (\ s a -> s{_dMonth = a}) + +instance FromJSON Date where + parseJSON + = withObject "Date" + (\ o -> + Date <$> + (o .:? "day") <*> (o .:? "year") <*> (o .:? "month")) + +instance ToJSON Date where + toJSON Date{..} + = object + (catMaybes + [("day" .=) <$> _dDay, ("year" .=) <$> _dYear, + ("month" .=) <$> _dMonth]) + +-- | Request passed to UpdateTransferJob. +-- +-- /See:/ 'updateTransferJobRequest' smart constructor. +data UpdateTransferJobRequest = UpdateTransferJobRequest + { _utjrTransferJob :: !(Maybe (Maybe TransferJob)) + , _utjrProjectId :: !(Maybe Text) + , _utjrUpdateTransferJobFieldMask :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UpdateTransferJobRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'utjrTransferJob' +-- +-- * 'utjrProjectId' +-- +-- * 'utjrUpdateTransferJobFieldMask' +updateTransferJobRequest + :: UpdateTransferJobRequest +updateTransferJobRequest = + UpdateTransferJobRequest + { _utjrTransferJob = Nothing + , _utjrProjectId = Nothing + , _utjrUpdateTransferJobFieldMask = Nothing + } + +-- | The job to update. Required. +utjrTransferJob :: Lens' UpdateTransferJobRequest (Maybe (Maybe TransferJob)) +utjrTransferJob + = lens _utjrTransferJob + (\ s a -> s{_utjrTransferJob = a}) + +-- | The ID of the Google Developers Console project that owns the job. +-- Required. +utjrProjectId :: Lens' UpdateTransferJobRequest (Maybe Text) +utjrProjectId + = lens _utjrProjectId + (\ s a -> s{_utjrProjectId = a}) + +-- | The field mask of the fields in \`transferJob\` that are to be updated +-- in this request. Fields in \`transferJob\` that can be updated are: +-- \`description\`, \`transferSpec\`, and \`status\`. To update the +-- \`transferSpec\` of the job, a complete transfer specification has to be +-- provided. An incomplete specification which misses any required fields +-- will be rejected with the error \`INVALID_ARGUMENT\`. +utjrUpdateTransferJobFieldMask :: Lens' UpdateTransferJobRequest (Maybe Text) +utjrUpdateTransferJobFieldMask + = lens _utjrUpdateTransferJobFieldMask + (\ s a -> s{_utjrUpdateTransferJobFieldMask = a}) + +instance FromJSON UpdateTransferJobRequest where + parseJSON + = withObject "UpdateTransferJobRequest" + (\ o -> + UpdateTransferJobRequest <$> + (o .:? "transferJob") <*> (o .:? "projectId") <*> + (o .:? "updateTransferJobFieldMask")) + +instance ToJSON UpdateTransferJobRequest where + toJSON UpdateTransferJobRequest{..} + = object + (catMaybes + [("transferJob" .=) <$> _utjrTransferJob, + ("projectId" .=) <$> _utjrProjectId, + ("updateTransferJobFieldMask" .=) <$> + _utjrUpdateTransferJobFieldMask]) + +-- | A collection of counters that report the progress of a transfer +-- operation. +-- +-- /See:/ 'transferCounters' smart constructor. +data TransferCounters = TransferCounters + { _tcBytesFoundOnlyFromSink :: !(Maybe Int64) + , _tcBytesDeletedFromSink :: !(Maybe Int64) + , _tcObjectsDeletedFromSource :: !(Maybe Int64) + , _tcObjectsFoundFromSource :: !(Maybe Int64) + , _tcBytesFailedToDeleteFromSink :: !(Maybe Int64) + , _tcBytesFromSourceFailed :: !(Maybe Int64) + , _tcBytesCopiedToSink :: !(Maybe Int64) + , _tcBytesFoundFromSource :: !(Maybe Int64) + , _tcBytesDeletedFromSource :: !(Maybe Int64) + , _tcObjectsDeletedFromSink :: !(Maybe Int64) + , _tcObjectsFoundOnlyFromSink :: !(Maybe Int64) + , _tcBytesFromSourceSkippedBySync :: !(Maybe Int64) + , _tcObjectsCopiedToSink :: !(Maybe Int64) + , _tcObjectsFromSourceFailed :: !(Maybe Int64) + , _tcObjectsFailedToDeleteFromSink :: !(Maybe Int64) + , _tcObjectsFromSourceSkippedBySync :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferCounters' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tcBytesFoundOnlyFromSink' +-- +-- * 'tcBytesDeletedFromSink' +-- +-- * 'tcObjectsDeletedFromSource' +-- +-- * 'tcObjectsFoundFromSource' +-- +-- * 'tcBytesFailedToDeleteFromSink' +-- +-- * 'tcBytesFromSourceFailed' +-- +-- * 'tcBytesCopiedToSink' +-- +-- * 'tcBytesFoundFromSource' +-- +-- * 'tcBytesDeletedFromSource' +-- +-- * 'tcObjectsDeletedFromSink' +-- +-- * 'tcObjectsFoundOnlyFromSink' +-- +-- * 'tcBytesFromSourceSkippedBySync' +-- +-- * 'tcObjectsCopiedToSink' +-- +-- * 'tcObjectsFromSourceFailed' +-- +-- * 'tcObjectsFailedToDeleteFromSink' +-- +-- * 'tcObjectsFromSourceSkippedBySync' +transferCounters + :: TransferCounters +transferCounters = + TransferCounters + { _tcBytesFoundOnlyFromSink = Nothing + , _tcBytesDeletedFromSink = Nothing + , _tcObjectsDeletedFromSource = Nothing + , _tcObjectsFoundFromSource = Nothing + , _tcBytesFailedToDeleteFromSink = Nothing + , _tcBytesFromSourceFailed = Nothing + , _tcBytesCopiedToSink = Nothing + , _tcBytesFoundFromSource = Nothing + , _tcBytesDeletedFromSource = Nothing + , _tcObjectsDeletedFromSink = Nothing + , _tcObjectsFoundOnlyFromSink = Nothing + , _tcBytesFromSourceSkippedBySync = Nothing + , _tcObjectsCopiedToSink = Nothing + , _tcObjectsFromSourceFailed = Nothing + , _tcObjectsFailedToDeleteFromSink = Nothing + , _tcObjectsFromSourceSkippedBySync = Nothing + } + +-- | Bytes found only in the data sink that are scheduled to be deleted. +tcBytesFoundOnlyFromSink :: Lens' TransferCounters (Maybe Int64) +tcBytesFoundOnlyFromSink + = lens _tcBytesFoundOnlyFromSink + (\ s a -> s{_tcBytesFoundOnlyFromSink = a}) + +-- | Bytes that are deleted from the data sink. +tcBytesDeletedFromSink :: Lens' TransferCounters (Maybe Int64) +tcBytesDeletedFromSink + = lens _tcBytesDeletedFromSink + (\ s a -> s{_tcBytesDeletedFromSink = a}) + +-- | Objects that are deleted from the data source. +tcObjectsDeletedFromSource :: Lens' TransferCounters (Maybe Int64) +tcObjectsDeletedFromSource + = lens _tcObjectsDeletedFromSource + (\ s a -> s{_tcObjectsDeletedFromSource = a}) + +-- | Objects found in the data source that are scheduled to be transferred, +-- which will be copied, excluded based on conditions, or skipped due to +-- failures. +tcObjectsFoundFromSource :: Lens' TransferCounters (Maybe Int64) +tcObjectsFoundFromSource + = lens _tcObjectsFoundFromSource + (\ s a -> s{_tcObjectsFoundFromSource = a}) + +-- | Bytes that failed to be deleted from the data sink. +tcBytesFailedToDeleteFromSink :: Lens' TransferCounters (Maybe Int64) +tcBytesFailedToDeleteFromSink + = lens _tcBytesFailedToDeleteFromSink + (\ s a -> s{_tcBytesFailedToDeleteFromSink = a}) + +-- | Bytes in the data source that failed during the transfer. +tcBytesFromSourceFailed :: Lens' TransferCounters (Maybe Int64) +tcBytesFromSourceFailed + = lens _tcBytesFromSourceFailed + (\ s a -> s{_tcBytesFromSourceFailed = a}) + +-- | Bytes that are copied to the data sink. +tcBytesCopiedToSink :: Lens' TransferCounters (Maybe Int64) +tcBytesCopiedToSink + = lens _tcBytesCopiedToSink + (\ s a -> s{_tcBytesCopiedToSink = a}) + +-- | Bytes found in the data source that are scheduled to be transferred, +-- which will be copied, excluded based on conditions, or skipped due to +-- failures. +tcBytesFoundFromSource :: Lens' TransferCounters (Maybe Int64) +tcBytesFoundFromSource + = lens _tcBytesFoundFromSource + (\ s a -> s{_tcBytesFoundFromSource = a}) + +-- | Bytes that are deleted from the data source. +tcBytesDeletedFromSource :: Lens' TransferCounters (Maybe Int64) +tcBytesDeletedFromSource + = lens _tcBytesDeletedFromSource + (\ s a -> s{_tcBytesDeletedFromSource = a}) + +-- | Objects that are deleted from the data sink. +tcObjectsDeletedFromSink :: Lens' TransferCounters (Maybe Int64) +tcObjectsDeletedFromSink + = lens _tcObjectsDeletedFromSink + (\ s a -> s{_tcObjectsDeletedFromSink = a}) + +-- | Objects found only in the data sink that are scheduled to be deleted. +tcObjectsFoundOnlyFromSink :: Lens' TransferCounters (Maybe Int64) +tcObjectsFoundOnlyFromSink + = lens _tcObjectsFoundOnlyFromSink + (\ s a -> s{_tcObjectsFoundOnlyFromSink = a}) + +-- | Bytes in the data source that are not transferred because they already +-- exist in the data sink. +tcBytesFromSourceSkippedBySync :: Lens' TransferCounters (Maybe Int64) +tcBytesFromSourceSkippedBySync + = lens _tcBytesFromSourceSkippedBySync + (\ s a -> s{_tcBytesFromSourceSkippedBySync = a}) + +-- | Objects that are copied to the data sink. +tcObjectsCopiedToSink :: Lens' TransferCounters (Maybe Int64) +tcObjectsCopiedToSink + = lens _tcObjectsCopiedToSink + (\ s a -> s{_tcObjectsCopiedToSink = a}) + +-- | Objects in the data source that failed during the transfer. +tcObjectsFromSourceFailed :: Lens' TransferCounters (Maybe Int64) +tcObjectsFromSourceFailed + = lens _tcObjectsFromSourceFailed + (\ s a -> s{_tcObjectsFromSourceFailed = a}) + +-- | Objects that failed to be deleted from the data sink. +tcObjectsFailedToDeleteFromSink :: Lens' TransferCounters (Maybe Int64) +tcObjectsFailedToDeleteFromSink + = lens _tcObjectsFailedToDeleteFromSink + (\ s a -> s{_tcObjectsFailedToDeleteFromSink = a}) + +-- | Objects in the data source that are not transferred because they already +-- exist in the data sink. +tcObjectsFromSourceSkippedBySync :: Lens' TransferCounters (Maybe Int64) +tcObjectsFromSourceSkippedBySync + = lens _tcObjectsFromSourceSkippedBySync + (\ s a -> s{_tcObjectsFromSourceSkippedBySync = a}) + +instance FromJSON TransferCounters where + parseJSON + = withObject "TransferCounters" + (\ o -> + TransferCounters <$> + (o .:? "bytesFoundOnlyFromSink") <*> + (o .:? "bytesDeletedFromSink") + <*> (o .:? "objectsDeletedFromSource") + <*> (o .:? "objectsFoundFromSource") + <*> (o .:? "bytesFailedToDeleteFromSink") + <*> (o .:? "bytesFromSourceFailed") + <*> (o .:? "bytesCopiedToSink") + <*> (o .:? "bytesFoundFromSource") + <*> (o .:? "bytesDeletedFromSource") + <*> (o .:? "objectsDeletedFromSink") + <*> (o .:? "objectsFoundOnlyFromSink") + <*> (o .:? "bytesFromSourceSkippedBySync") + <*> (o .:? "objectsCopiedToSink") + <*> (o .:? "objectsFromSourceFailed") + <*> (o .:? "objectsFailedToDeleteFromSink") + <*> (o .:? "objectsFromSourceSkippedBySync")) + +instance ToJSON TransferCounters where + toJSON TransferCounters{..} + = object + (catMaybes + [("bytesFoundOnlyFromSink" .=) <$> + _tcBytesFoundOnlyFromSink, + ("bytesDeletedFromSink" .=) <$> + _tcBytesDeletedFromSink, + ("objectsDeletedFromSource" .=) <$> + _tcObjectsDeletedFromSource, + ("objectsFoundFromSource" .=) <$> + _tcObjectsFoundFromSource, + ("bytesFailedToDeleteFromSink" .=) <$> + _tcBytesFailedToDeleteFromSink, + ("bytesFromSourceFailed" .=) <$> + _tcBytesFromSourceFailed, + ("bytesCopiedToSink" .=) <$> _tcBytesCopiedToSink, + ("bytesFoundFromSource" .=) <$> + _tcBytesFoundFromSource, + ("bytesDeletedFromSource" .=) <$> + _tcBytesDeletedFromSource, + ("objectsDeletedFromSink" .=) <$> + _tcObjectsDeletedFromSink, + ("objectsFoundOnlyFromSink" .=) <$> + _tcObjectsFoundOnlyFromSink, + ("bytesFromSourceSkippedBySync" .=) <$> + _tcBytesFromSourceSkippedBySync, + ("objectsCopiedToSink" .=) <$> + _tcObjectsCopiedToSink, + ("objectsFromSourceFailed" .=) <$> + _tcObjectsFromSourceFailed, + ("objectsFailedToDeleteFromSink" .=) <$> + _tcObjectsFailedToDeleteFromSink, + ("objectsFromSourceSkippedBySync" .=) <$> + _tcObjectsFromSourceSkippedBySync]) + +-- | This resource represents the configuration of a transfer job that runs +-- periodically. +-- +-- /See:/ 'transferJob' smart constructor. +data TransferJob = TransferJob + { _tjCreationTime :: !(Maybe Text) + , _tjStatus :: !(Maybe Text) + , _tjSchedule :: !(Maybe (Maybe Schedule)) + , _tjDeletionTime :: !(Maybe Text) + , _tjName :: !(Maybe Text) + , _tjProjectId :: !(Maybe Text) + , _tjTransferSpec :: !(Maybe (Maybe TransferSpec)) + , _tjDescription :: !(Maybe Text) + , _tjLastModificationTime :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferJob' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tjCreationTime' +-- +-- * 'tjStatus' +-- +-- * 'tjSchedule' +-- +-- * 'tjDeletionTime' +-- +-- * 'tjName' +-- +-- * 'tjProjectId' +-- +-- * 'tjTransferSpec' +-- +-- * 'tjDescription' +-- +-- * 'tjLastModificationTime' +transferJob + :: TransferJob +transferJob = + TransferJob + { _tjCreationTime = Nothing + , _tjStatus = Nothing + , _tjSchedule = Nothing + , _tjDeletionTime = Nothing + , _tjName = Nothing + , _tjProjectId = Nothing + , _tjTransferSpec = Nothing + , _tjDescription = Nothing + , _tjLastModificationTime = Nothing + } + +-- | This field cannot be changed by user requests. +tjCreationTime :: Lens' TransferJob (Maybe Text) +tjCreationTime + = lens _tjCreationTime + (\ s a -> s{_tjCreationTime = a}) + +-- | Status of the job. This value MUST be specified for +-- \`CreateTransferJobRequests\`. NOTE: The effect of the new job status +-- takes place during a subsequent job run. For example, if you change the +-- job status from \`ENABLED\` to \`DISABLED\`, and an operation spawned by +-- the transfer is running, the status change would not affect the current +-- operation. +tjStatus :: Lens' TransferJob (Maybe Text) +tjStatus = lens _tjStatus (\ s a -> s{_tjStatus = a}) + +-- | Schedule specification. Required. +tjSchedule :: Lens' TransferJob (Maybe (Maybe Schedule)) +tjSchedule + = lens _tjSchedule (\ s a -> s{_tjSchedule = a}) + +-- | This field cannot be changed by user requests. +tjDeletionTime :: Lens' TransferJob (Maybe Text) +tjDeletionTime + = lens _tjDeletionTime + (\ s a -> s{_tjDeletionTime = a}) + +-- | A globally unique name assigned by Storage Transfer Service when the job +-- is created. This field should be left empty in requests to create a new +-- transfer job; otherwise, the requests result in an \`INVALID_ARGUMENT\` +-- error. +tjName :: Lens' TransferJob (Maybe Text) +tjName = lens _tjName (\ s a -> s{_tjName = a}) + +-- | The ID of the Google Developers Console project that owns the job. +-- Required. +tjProjectId :: Lens' TransferJob (Maybe Text) +tjProjectId + = lens _tjProjectId (\ s a -> s{_tjProjectId = a}) + +-- | Transfer specification. Required. +tjTransferSpec :: Lens' TransferJob (Maybe (Maybe TransferSpec)) +tjTransferSpec + = lens _tjTransferSpec + (\ s a -> s{_tjTransferSpec = a}) + +-- | A description provided by the user for the job. Its max length is 1024 +-- bytes when Unicode-encoded. +tjDescription :: Lens' TransferJob (Maybe Text) +tjDescription + = lens _tjDescription + (\ s a -> s{_tjDescription = a}) + +-- | This field cannot be changed by user requests. +tjLastModificationTime :: Lens' TransferJob (Maybe Text) +tjLastModificationTime + = lens _tjLastModificationTime + (\ s a -> s{_tjLastModificationTime = a}) + +instance FromJSON TransferJob where + parseJSON + = withObject "TransferJob" + (\ o -> + TransferJob <$> + (o .:? "creationTime") <*> (o .:? "status") <*> + (o .:? "schedule") + <*> (o .:? "deletionTime") + <*> (o .:? "name") + <*> (o .:? "projectId") + <*> (o .:? "transferSpec") + <*> (o .:? "description") + <*> (o .:? "lastModificationTime")) + +instance ToJSON TransferJob where + toJSON TransferJob{..} + = object + (catMaybes + [("creationTime" .=) <$> _tjCreationTime, + ("status" .=) <$> _tjStatus, + ("schedule" .=) <$> _tjSchedule, + ("deletionTime" .=) <$> _tjDeletionTime, + ("name" .=) <$> _tjName, + ("projectId" .=) <$> _tjProjectId, + ("transferSpec" .=) <$> _tjTransferSpec, + ("description" .=) <$> _tjDescription, + ("lastModificationTime" .=) <$> + _tjLastModificationTime]) + +-- | In a GcsData, an object\'s name is the Google Cloud Storage object\'s +-- name and its \`lastModificationTime\` refers to the object\'s updated +-- time, which changes when the content or the metadata of the object is +-- updated. +-- +-- /See:/ 'gcsData' smart constructor. +newtype GcsData = GcsData + { _gdBucketName :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GcsData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdBucketName' +gcsData + :: GcsData +gcsData = + GcsData + { _gdBucketName = Nothing + } + +-- | Google Cloud Storage bucket name (see [Bucket Name +-- Requirements](https:\/\/cloud.google.com\/storage\/docs\/bucket-naming#requirements)). +-- Required. +gdBucketName :: Lens' GcsData (Maybe Text) +gdBucketName + = lens _gdBucketName (\ s a -> s{_gdBucketName = a}) + +instance FromJSON GcsData where + parseJSON + = withObject "GcsData" + (\ o -> GcsData <$> (o .:? "bucketName")) + +instance ToJSON GcsData where + toJSON GcsData{..} + = object + (catMaybes [("bucketName" .=) <$> _gdBucketName]) + +-- | An AwsS3Data can be a data source, but not a data sink. In an AwsS3Data, +-- an object\'s name is the S3 object\'s key name. +-- +-- /See:/ 'awsS3Data' smart constructor. +data AwsS3Data = AwsS3Data + { _asdBucketName :: !(Maybe Text) + , _asdAwsAccessKey :: !(Maybe (Maybe AwsAccessKey)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AwsS3Data' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asdBucketName' +-- +-- * 'asdAwsAccessKey' +awsS3Data + :: AwsS3Data +awsS3Data = + AwsS3Data + { _asdBucketName = Nothing + , _asdAwsAccessKey = Nothing + } + +-- | S3 Bucket name (see [Creating a +-- bucket](http:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/dev\/create-bucket-get-location-example.html)). +-- Required. +asdBucketName :: Lens' AwsS3Data (Maybe Text) +asdBucketName + = lens _asdBucketName + (\ s a -> s{_asdBucketName = a}) + +-- | AWS access key used to sign the API requests to the AWS S3 bucket. +-- Permissions on the bucket must be granted to the access ID of the AWS +-- access key. Required. +asdAwsAccessKey :: Lens' AwsS3Data (Maybe (Maybe AwsAccessKey)) +asdAwsAccessKey + = lens _asdAwsAccessKey + (\ s a -> s{_asdAwsAccessKey = a}) + +instance FromJSON AwsS3Data where + parseJSON + = withObject "AwsS3Data" + (\ o -> + AwsS3Data <$> + (o .:? "bucketName") <*> (o .:? "awsAccessKey")) + +instance ToJSON AwsS3Data where + toJSON AwsS3Data{..} + = object + (catMaybes + [("bucketName" .=) <$> _asdBucketName, + ("awsAccessKey" .=) <$> _asdAwsAccessKey]) + +-- | An HttpData specifies a list of objects on the web to be transferred +-- over HTTP. The information of the objects to be transferred is contained +-- in a file referenced by a URL. The first line in the file must be +-- \"TsvHttpData-1.0\", which specifies the format of the file. Subsequent +-- lines specify the information of the list of objects, one object per +-- list entry. Each entry has the following tab-delimited fields: * HTTP +-- URL * Length * MD5 - This field is a base64-encoded MD5 hash of the +-- object An HTTP URL that points to the object to be transferred. It must +-- be a valid URL with URL scheme HTTP or HTTPS. When an object with URL +-- \`http(s):\/\/hostname:port\/\` is transferred to the data sink, the +-- name of the object at the data sink is \`\/\`. Length and MD5 provide +-- the size and the base64-encoded MD5 hash of the object. If Length does +-- not match the actual length of the object fetched, the object will not +-- be transferred. If MD5 does not match the MD5 computed from the +-- transferred bytes, the object transfer will fail. +-- \`lastModificationTime\` is not available in HttpData objects. The +-- objects that the URL list points to must allow public access. Storage +-- Transfer Service obeys \`robots.txt\` rules and requires the HTTP server +-- to support Range requests and to return a Content-Length header in each +-- response. +-- +-- /See:/ 'hTTPData' smart constructor. +newtype HTTPData = HTTPData + { _httpdListUrl :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'HTTPData' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'httpdListUrl' +hTTPData + :: HTTPData +hTTPData = + HTTPData + { _httpdListUrl = Nothing + } + +-- | The URL that points to the file that stores the object list entries. +-- This file must allow public access. Currently, only URLs with HTTP and +-- HTTPS schemes are supported. Required. +httpdListUrl :: Lens' HTTPData (Maybe Text) +httpdListUrl + = lens _httpdListUrl (\ s a -> s{_httpdListUrl = a}) + +instance FromJSON HTTPData where + parseJSON + = withObject "HTTPData" + (\ o -> HTTPData <$> (o .:? "listUrl")) + +instance ToJSON HTTPData where + toJSON HTTPData{..} + = object + (catMaybes [("listUrl" .=) <$> _httpdListUrl]) + +-- | An entry describing an error that has occurred. +-- +-- /See:/ 'errorLogEntry' smart constructor. +data ErrorLogEntry = ErrorLogEntry + { _eleUrl :: !(Maybe Text) + , _eleErrorDetails :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ErrorLogEntry' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'eleUrl' +-- +-- * 'eleErrorDetails' +errorLogEntry + :: ErrorLogEntry +errorLogEntry = + ErrorLogEntry + { _eleUrl = Nothing + , _eleErrorDetails = Nothing + } + +-- | A URL that refers to the target (a data source, a data sink, or an +-- object) with which the error is associated. Required. +eleUrl :: Lens' ErrorLogEntry (Maybe Text) +eleUrl = lens _eleUrl (\ s a -> s{_eleUrl = a}) + +-- | A list of messages that carry the error details. +eleErrorDetails :: Lens' ErrorLogEntry [Text] +eleErrorDetails + = lens _eleErrorDetails + (\ s a -> s{_eleErrorDetails = a}) + . _Default + . _Coerce + +instance FromJSON ErrorLogEntry where + parseJSON + = withObject "ErrorLogEntry" + (\ o -> + ErrorLogEntry <$> + (o .:? "url") <*> (o .:? "errorDetails" .!= mempty)) + +instance ToJSON ErrorLogEntry where + toJSON ErrorLogEntry{..} + = object + (catMaybes + [("url" .=) <$> _eleUrl, + ("errorDetails" .=) <$> _eleErrorDetails]) + +-- | Represents a time of day. The date and time zone are either not +-- significant or are specified elsewhere. An API may chose to allow leap +-- seconds. Related types are [google.type.Date][google.type.Date] and +-- \`google.protobuf.Timestamp\`. +-- +-- /See:/ 'timeOfDay' smart constructor. +data TimeOfDay = TimeOfDay + { _todNanos :: !(Maybe Int32) + , _todHours :: !(Maybe Int32) + , _todMinutes :: !(Maybe Int32) + , _todSeconds :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TimeOfDay' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'todNanos' +-- +-- * 'todHours' +-- +-- * 'todMinutes' +-- +-- * 'todSeconds' +timeOfDay + :: TimeOfDay +timeOfDay = + TimeOfDay + { _todNanos = Nothing + , _todHours = Nothing + , _todMinutes = Nothing + , _todSeconds = Nothing + } + +-- | Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +todNanos :: Lens' TimeOfDay (Maybe Int32) +todNanos = lens _todNanos (\ s a -> s{_todNanos = a}) + +-- | Hours of day in 24 hour format. Should be from 0 to 23. An API may +-- choose to allow the value \"24:00:00\" for scenarios like business +-- closing time. +todHours :: Lens' TimeOfDay (Maybe Int32) +todHours = lens _todHours (\ s a -> s{_todHours = a}) + +-- | Minutes of hour of day. Must be from 0 to 59. +todMinutes :: Lens' TimeOfDay (Maybe Int32) +todMinutes + = lens _todMinutes (\ s a -> s{_todMinutes = a}) + +-- | Seconds of minutes of the time. Must normally be from 0 to 59. An API +-- may allow the value 60 if it allows leap-seconds. +todSeconds :: Lens' TimeOfDay (Maybe Int32) +todSeconds + = lens _todSeconds (\ s a -> s{_todSeconds = a}) + +instance FromJSON TimeOfDay where + parseJSON + = withObject "TimeOfDay" + (\ o -> + TimeOfDay <$> + (o .:? "nanos") <*> (o .:? "hours") <*> + (o .:? "minutes") + <*> (o .:? "seconds")) + +instance ToJSON TimeOfDay where + toJSON TimeOfDay{..} + = object + (catMaybes + [("nanos" .=) <$> _todNanos, + ("hours" .=) <$> _todHours, + ("minutes" .=) <$> _todMinutes, + ("seconds" .=) <$> _todSeconds]) + +-- | TransferOptions uses three boolean parameters to define the actions to +-- be performed on objects in a transfer. +-- +-- /See:/ 'transferOptions' smart constructor. +data TransferOptions = TransferOptions + { _toDeleteObjectsUniqueInSink :: !(Maybe Bool) + , _toDeleteObjectsFromSourceAfterTransfer :: !(Maybe Bool) + , _toOverwriteObjectsAlreadyExistingInSink :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'toDeleteObjectsUniqueInSink' +-- +-- * 'toDeleteObjectsFromSourceAfterTransfer' +-- +-- * 'toOverwriteObjectsAlreadyExistingInSink' +transferOptions + :: TransferOptions +transferOptions = + TransferOptions + { _toDeleteObjectsUniqueInSink = Nothing + , _toDeleteObjectsFromSourceAfterTransfer = Nothing + , _toOverwriteObjectsAlreadyExistingInSink = Nothing + } + +-- | Whether objects that exist only in the sink should be deleted. +toDeleteObjectsUniqueInSink :: Lens' TransferOptions (Maybe Bool) +toDeleteObjectsUniqueInSink + = lens _toDeleteObjectsUniqueInSink + (\ s a -> s{_toDeleteObjectsUniqueInSink = a}) + +-- | Whether objects should be deleted from the source after they are +-- transferred to the sink. +toDeleteObjectsFromSourceAfterTransfer :: Lens' TransferOptions (Maybe Bool) +toDeleteObjectsFromSourceAfterTransfer + = lens _toDeleteObjectsFromSourceAfterTransfer + (\ s a -> + s{_toDeleteObjectsFromSourceAfterTransfer = a}) + +-- | Whether overwriting objects that already exist in the sink is allowed. +toOverwriteObjectsAlreadyExistingInSink :: Lens' TransferOptions (Maybe Bool) +toOverwriteObjectsAlreadyExistingInSink + = lens _toOverwriteObjectsAlreadyExistingInSink + (\ s a -> + s{_toOverwriteObjectsAlreadyExistingInSink = a}) + +instance FromJSON TransferOptions where + parseJSON + = withObject "TransferOptions" + (\ o -> + TransferOptions <$> + (o .:? "deleteObjectsUniqueInSink") <*> + (o .:? "deleteObjectsFromSourceAfterTransfer") + <*> (o .:? "overwriteObjectsAlreadyExistingInSink")) + +instance ToJSON TransferOptions where + toJSON TransferOptions{..} + = object + (catMaybes + [("deleteObjectsUniqueInSink" .=) <$> + _toDeleteObjectsUniqueInSink, + ("deleteObjectsFromSourceAfterTransfer" .=) <$> + _toDeleteObjectsFromSourceAfterTransfer, + ("overwriteObjectsAlreadyExistingInSink" .=) <$> + _toOverwriteObjectsAlreadyExistingInSink]) + +-- | A description of the execution of a transfer. +-- +-- /See:/ 'transferOperation' smart constructor. +data TransferOperation = TransferOperation + { _toStatus :: !(Maybe Text) + , _toCounters :: !(Maybe (Maybe TransferCounters)) + , _toStartTime :: !(Maybe Text) + , _toTransferJobName :: !(Maybe Text) + , _toName :: !(Maybe Text) + , _toEndTime :: !(Maybe Text) + , _toProjectId :: !(Maybe Text) + , _toTransferSpec :: !(Maybe (Maybe TransferSpec)) + , _toErrorBreakdowns :: !(Maybe [Maybe ErrorSummary]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferOperation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'toStatus' +-- +-- * 'toCounters' +-- +-- * 'toStartTime' +-- +-- * 'toTransferJobName' +-- +-- * 'toName' +-- +-- * 'toEndTime' +-- +-- * 'toProjectId' +-- +-- * 'toTransferSpec' +-- +-- * 'toErrorBreakdowns' +transferOperation + :: TransferOperation +transferOperation = + TransferOperation + { _toStatus = Nothing + , _toCounters = Nothing + , _toStartTime = Nothing + , _toTransferJobName = Nothing + , _toName = Nothing + , _toEndTime = Nothing + , _toProjectId = Nothing + , _toTransferSpec = Nothing + , _toErrorBreakdowns = Nothing + } + +-- | Status of the transfer operation. +toStatus :: Lens' TransferOperation (Maybe Text) +toStatus = lens _toStatus (\ s a -> s{_toStatus = a}) + +-- | Information about the progress of the transfer operation. +toCounters :: Lens' TransferOperation (Maybe (Maybe TransferCounters)) +toCounters + = lens _toCounters (\ s a -> s{_toCounters = a}) + +-- | Start time of this transfer execution. +toStartTime :: Lens' TransferOperation (Maybe Text) +toStartTime + = lens _toStartTime (\ s a -> s{_toStartTime = a}) + +-- | The name of the transfer job that triggers this transfer operation. +toTransferJobName :: Lens' TransferOperation (Maybe Text) +toTransferJobName + = lens _toTransferJobName + (\ s a -> s{_toTransferJobName = a}) + +-- | A globally unique ID assigned by the system. +toName :: Lens' TransferOperation (Maybe Text) +toName = lens _toName (\ s a -> s{_toName = a}) + +-- | End time of this transfer execution. +toEndTime :: Lens' TransferOperation (Maybe Text) +toEndTime + = lens _toEndTime (\ s a -> s{_toEndTime = a}) + +-- | The ID of the Google Developers Console project that owns the operation. +-- Required. +toProjectId :: Lens' TransferOperation (Maybe Text) +toProjectId + = lens _toProjectId (\ s a -> s{_toProjectId = a}) + +-- | Transfer specification. Required. +toTransferSpec :: Lens' TransferOperation (Maybe (Maybe TransferSpec)) +toTransferSpec + = lens _toTransferSpec + (\ s a -> s{_toTransferSpec = a}) + +-- | Summarizes errors encountered with sample error log entries. +toErrorBreakdowns :: Lens' TransferOperation [Maybe ErrorSummary] +toErrorBreakdowns + = lens _toErrorBreakdowns + (\ s a -> s{_toErrorBreakdowns = a}) + . _Default + . _Coerce + +instance FromJSON TransferOperation where + parseJSON + = withObject "TransferOperation" + (\ o -> + TransferOperation <$> + (o .:? "status") <*> (o .:? "counters") <*> + (o .:? "startTime") + <*> (o .:? "transferJobName") + <*> (o .:? "name") + <*> (o .:? "endTime") + <*> (o .:? "projectId") + <*> (o .:? "transferSpec") + <*> (o .:? "errorBreakdowns" .!= mempty)) + +instance ToJSON TransferOperation where + toJSON TransferOperation{..} + = object + (catMaybes + [("status" .=) <$> _toStatus, + ("counters" .=) <$> _toCounters, + ("startTime" .=) <$> _toStartTime, + ("transferJobName" .=) <$> _toTransferJobName, + ("name" .=) <$> _toName, + ("endTime" .=) <$> _toEndTime, + ("projectId" .=) <$> _toProjectId, + ("transferSpec" .=) <$> _toTransferSpec, + ("errorBreakdowns" .=) <$> _toErrorBreakdowns]) + +-- | Configuration for running a transfer. +-- +-- /See:/ 'transferSpec' smart constructor. +data TransferSpec = TransferSpec + { _tsGcsDataSource :: !(Maybe (Maybe GcsData)) + , _tsObjectConditions :: !(Maybe (Maybe ObjectConditions)) + , _tsHttpDataSource :: !(Maybe (Maybe HTTPData)) + , _tsAwsS3DataSource :: !(Maybe (Maybe AwsS3Data)) + , _tsGcsDataSink :: !(Maybe (Maybe GcsData)) + , _tsTransferOptions :: !(Maybe (Maybe TransferOptions)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TransferSpec' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsGcsDataSource' +-- +-- * 'tsObjectConditions' +-- +-- * 'tsHttpDataSource' +-- +-- * 'tsAwsS3DataSource' +-- +-- * 'tsGcsDataSink' +-- +-- * 'tsTransferOptions' +transferSpec + :: TransferSpec +transferSpec = + TransferSpec + { _tsGcsDataSource = Nothing + , _tsObjectConditions = Nothing + , _tsHttpDataSource = Nothing + , _tsAwsS3DataSource = Nothing + , _tsGcsDataSink = Nothing + , _tsTransferOptions = Nothing + } + +-- | A Google Cloud Storage data source. +tsGcsDataSource :: Lens' TransferSpec (Maybe (Maybe GcsData)) +tsGcsDataSource + = lens _tsGcsDataSource + (\ s a -> s{_tsGcsDataSource = a}) + +-- | Only objects that satisfy these object conditions are included in the +-- set of data source and data sink objects. Object conditions based on +-- objects\' \`lastModificationTime\` do not exclude objects in a data +-- sink. +tsObjectConditions :: Lens' TransferSpec (Maybe (Maybe ObjectConditions)) +tsObjectConditions + = lens _tsObjectConditions + (\ s a -> s{_tsObjectConditions = a}) + +-- | An HTTP URL data source. +tsHttpDataSource :: Lens' TransferSpec (Maybe (Maybe HTTPData)) +tsHttpDataSource + = lens _tsHttpDataSource + (\ s a -> s{_tsHttpDataSource = a}) + +-- | An AWS S3 data source. +tsAwsS3DataSource :: Lens' TransferSpec (Maybe (Maybe AwsS3Data)) +tsAwsS3DataSource + = lens _tsAwsS3DataSource + (\ s a -> s{_tsAwsS3DataSource = a}) + +-- | A Google Cloud Storage data sink. +tsGcsDataSink :: Lens' TransferSpec (Maybe (Maybe GcsData)) +tsGcsDataSink + = lens _tsGcsDataSink + (\ s a -> s{_tsGcsDataSink = a}) + +-- | If the option \`deleteObjectsUniqueInSink\` is \`true\`, object +-- conditions based on objects\' \`lastModificationTime\` are ignored and +-- do not exclude objects in a data source or a data sink. +tsTransferOptions :: Lens' TransferSpec (Maybe (Maybe TransferOptions)) +tsTransferOptions + = lens _tsTransferOptions + (\ s a -> s{_tsTransferOptions = a}) + +instance FromJSON TransferSpec where + parseJSON + = withObject "TransferSpec" + (\ o -> + TransferSpec <$> + (o .:? "gcsDataSource") <*> + (o .:? "objectConditions") + <*> (o .:? "httpDataSource") + <*> (o .:? "awsS3DataSource") + <*> (o .:? "gcsDataSink") + <*> (o .:? "transferOptions")) + +instance ToJSON TransferSpec where + toJSON TransferSpec{..} + = object + (catMaybes + [("gcsDataSource" .=) <$> _tsGcsDataSource, + ("objectConditions" .=) <$> _tsObjectConditions, + ("httpDataSource" .=) <$> _tsHttpDataSource, + ("awsS3DataSource" .=) <$> _tsAwsS3DataSource, + ("gcsDataSink" .=) <$> _tsGcsDataSink, + ("transferOptions" .=) <$> _tsTransferOptions]) + +-- | Response from ListTransferJobs. +-- +-- /See:/ 'listTransferJobsResponse' smart constructor. +data ListTransferJobsResponse = ListTransferJobsResponse + { _ltjrNextPageToken :: !(Maybe Text) + , _ltjrTransferJobs :: !(Maybe [Maybe TransferJob]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTransferJobsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltjrNextPageToken' +-- +-- * 'ltjrTransferJobs' +listTransferJobsResponse + :: ListTransferJobsResponse +listTransferJobsResponse = + ListTransferJobsResponse + { _ltjrNextPageToken = Nothing + , _ltjrTransferJobs = Nothing + } + +-- | The list next page token. +ltjrNextPageToken :: Lens' ListTransferJobsResponse (Maybe Text) +ltjrNextPageToken + = lens _ltjrNextPageToken + (\ s a -> s{_ltjrNextPageToken = a}) + +-- | A list of transfer jobs. +ltjrTransferJobs :: Lens' ListTransferJobsResponse [Maybe TransferJob] +ltjrTransferJobs + = lens _ltjrTransferJobs + (\ s a -> s{_ltjrTransferJobs = a}) + . _Default + . _Coerce + +instance FromJSON ListTransferJobsResponse where + parseJSON + = withObject "ListTransferJobsResponse" + (\ o -> + ListTransferJobsResponse <$> + (o .:? "nextPageToken") <*> + (o .:? "transferJobs" .!= mempty)) + +instance ToJSON ListTransferJobsResponse where + toJSON ListTransferJobsResponse{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _ltjrNextPageToken, + ("transferJobs" .=) <$> _ltjrTransferJobs]) + +-- | AWS access key (see [AWS Security +-- Credentials](http:\/\/docs.aws.amazon.com\/general\/latest\/gr\/aws-security-credentials.html)). +-- +-- /See:/ 'awsAccessKey' smart constructor. +data AwsAccessKey = AwsAccessKey + { _aakSecretAccessKey :: !(Maybe Text) + , _aakAccessKeyId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AwsAccessKey' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aakSecretAccessKey' +-- +-- * 'aakAccessKeyId' +awsAccessKey + :: AwsAccessKey +awsAccessKey = + AwsAccessKey + { _aakSecretAccessKey = Nothing + , _aakAccessKeyId = Nothing + } + +-- | AWS secret access key. This field is not returned in RPC responses. +-- Required. +aakSecretAccessKey :: Lens' AwsAccessKey (Maybe Text) +aakSecretAccessKey + = lens _aakSecretAccessKey + (\ s a -> s{_aakSecretAccessKey = a}) + +-- | AWS access key ID. Required. +aakAccessKeyId :: Lens' AwsAccessKey (Maybe Text) +aakAccessKeyId + = lens _aakAccessKeyId + (\ s a -> s{_aakAccessKeyId = a}) + +instance FromJSON AwsAccessKey where + parseJSON + = withObject "AwsAccessKey" + (\ o -> + AwsAccessKey <$> + (o .:? "secretAccessKey") <*> (o .:? "accessKeyId")) + +instance ToJSON AwsAccessKey where + toJSON AwsAccessKey{..} + = object + (catMaybes + [("secretAccessKey" .=) <$> _aakSecretAccessKey, + ("accessKeyId" .=) <$> _aakAccessKeyId]) + +-- | Request passed to ResumeTransferOperation. +-- +-- /See:/ 'resumeTransferOperationRequest' smart constructor. +data ResumeTransferOperationRequest = + ResumeTransferOperationRequest + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResumeTransferOperationRequest' with the minimum fields required to make a request. +-- +resumeTransferOperationRequest + :: ResumeTransferOperationRequest +resumeTransferOperationRequest = ResumeTransferOperationRequest + +instance FromJSON ResumeTransferOperationRequest + where + parseJSON + = withObject "ResumeTransferOperationRequest" + (\ o -> pure ResumeTransferOperationRequest) + +instance ToJSON ResumeTransferOperationRequest where + toJSON = const (Object mempty) diff --git a/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Sum.hs b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Sum.hs new file mode 100644 index 000000000..c7c5f3a67 --- /dev/null +++ b/gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.StorageTransfer.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.StorageTransfer.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-storage-transfer/gogol-storage-transfer.cabal b/gogol-storage-transfer/gogol-storage-transfer.cabal new file mode 100644 index 000000000..287fd130d --- /dev/null +++ b/gogol-storage-transfer/gogol-storage-transfer.cabal @@ -0,0 +1,55 @@ +name: gogol-storage-transfer +version: 0.0.1 +synopsis: Google Storage Transfer API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Transfers data from external data sources to a Google Cloud Storage + bucket or between Google Cloud Storage buckets. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.StorageTransfer.GetGoogleServiceAccount + , Network.Google.Resource.StorageTransfer.GoogleServiceAccounts.Get + , Network.Google.Resource.StorageTransfer.TransferJobs.Create + , Network.Google.Resource.StorageTransfer.TransferJobs.Get + , Network.Google.Resource.StorageTransfer.TransferJobs.List + , Network.Google.Resource.StorageTransfer.TransferJobs.Patch + , Network.Google.Resource.StorageTransfer.TransferOperations.Cancel + , Network.Google.Resource.StorageTransfer.TransferOperations.Delete + , Network.Google.Resource.StorageTransfer.TransferOperations.Get + , Network.Google.Resource.StorageTransfer.TransferOperations.List + , Network.Google.Resource.StorageTransfer.TransferOperations.Pause + , Network.Google.Resource.StorageTransfer.TransferOperations.Resume + , Network.Google.StorageTransfer + , Network.Google.StorageTransfer.Types + + other-modules: + Network.Google.StorageTransfer.Types.Product + , Network.Google.StorageTransfer.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-storage-transfer/src/.gitkeep b/gogol-storage-transfer/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-storage/LICENSE b/gogol-storage/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-storage/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-storage/Makefile b/gogol-storage/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-storage/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-storage/README.md b/gogol-storage/README.md new file mode 100644 index 000000000..e6925fc74 --- /dev/null +++ b/gogol-storage/README.md @@ -0,0 +1,28 @@ +# gogol-storage + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Cloud Storage API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-storage` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-storage/Setup.hs b/gogol-storage/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-storage/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Delete.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Delete.hs new file mode 100644 index 000000000..3154aff71 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Delete.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes the ACL entry for the specified entity on the +-- specified bucket. +-- +-- /See:/ for @StorageBucketAccessControlsDelete@. +module Storage.BucketAccessControls.Delete + ( + -- * REST Resource + BucketAccessControlsDeleteAPI + + -- * Creating a Request + , bucketAccessControlsDelete + , BucketAccessControlsDelete + + -- * Request Lenses + , bacdQuotaUser + , bacdPrettyPrint + , bacdUserIp + , bacdBucket + , bacdKey + , bacdOauthToken + , bacdEntity + , bacdFields + , bacdAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsDelete@ which the +-- 'BucketAccessControlsDelete' request conforms to. +type BucketAccessControlsDeleteAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> Capture "entity" Text :> Delete '[JSON] () + +-- | Permanently deletes the ACL entry for the specified entity on the +-- specified bucket. +-- +-- /See:/ 'bucketAccessControlsDelete' smart constructor. +data BucketAccessControlsDelete = BucketAccessControlsDelete + { _bacdQuotaUser :: !(Maybe Text) + , _bacdPrettyPrint :: !Bool + , _bacdUserIp :: !(Maybe Text) + , _bacdBucket :: !Text + , _bacdKey :: !(Maybe Text) + , _bacdOauthToken :: !(Maybe Text) + , _bacdEntity :: !Text + , _bacdFields :: !(Maybe Text) + , _bacdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacdQuotaUser' +-- +-- * 'bacdPrettyPrint' +-- +-- * 'bacdUserIp' +-- +-- * 'bacdBucket' +-- +-- * 'bacdKey' +-- +-- * 'bacdOauthToken' +-- +-- * 'bacdEntity' +-- +-- * 'bacdFields' +-- +-- * 'bacdAlt' +bucketAccessControlsDelete + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> BucketAccessControlsDelete +bucketAccessControlsDelete pBacdBucket_ pBacdEntity_ = + BucketAccessControlsDelete + { _bacdQuotaUser = Nothing + , _bacdPrettyPrint = True + , _bacdUserIp = Nothing + , _bacdBucket = pBacdBucket_ + , _bacdKey = Nothing + , _bacdOauthToken = Nothing + , _bacdEntity = pBacdEntity_ + , _bacdFields = Nothing + , _bacdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bacdQuotaUser :: Lens' BucketAccessControlsDelete' (Maybe Text) +bacdQuotaUser + = lens _bacdQuotaUser + (\ s a -> s{_bacdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bacdPrettyPrint :: Lens' BucketAccessControlsDelete' Bool +bacdPrettyPrint + = lens _bacdPrettyPrint + (\ s a -> s{_bacdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bacdUserIp :: Lens' BucketAccessControlsDelete' (Maybe Text) +bacdUserIp + = lens _bacdUserIp (\ s a -> s{_bacdUserIp = a}) + +-- | Name of a bucket. +bacdBucket :: Lens' BucketAccessControlsDelete' Text +bacdBucket + = lens _bacdBucket (\ s a -> s{_bacdBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bacdKey :: Lens' BucketAccessControlsDelete' (Maybe Text) +bacdKey = lens _bacdKey (\ s a -> s{_bacdKey = a}) + +-- | OAuth 2.0 token for the current user. +bacdOauthToken :: Lens' BucketAccessControlsDelete' (Maybe Text) +bacdOauthToken + = lens _bacdOauthToken + (\ s a -> s{_bacdOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +bacdEntity :: Lens' BucketAccessControlsDelete' Text +bacdEntity + = lens _bacdEntity (\ s a -> s{_bacdEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +bacdFields :: Lens' BucketAccessControlsDelete' (Maybe Text) +bacdFields + = lens _bacdFields (\ s a -> s{_bacdFields = a}) + +-- | Data format for the response. +bacdAlt :: Lens' BucketAccessControlsDelete' Text +bacdAlt = lens _bacdAlt (\ s a -> s{_bacdAlt = a}) + +instance GoogleRequest BucketAccessControlsDelete' + where + type Rs BucketAccessControlsDelete' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsDelete{..} + = go _bacdQuotaUser _bacdPrettyPrint _bacdUserIp + _bacdBucket + _bacdKey + _bacdOauthToken + _bacdEntity + _bacdFields + _bacdAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsDeleteAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Get.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Get.hs new file mode 100644 index 000000000..2b6b99791 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Get.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the ACL entry for the specified entity on the specified bucket. +-- +-- /See:/ for @StorageBucketAccessControlsGet@. +module Storage.BucketAccessControls.Get + ( + -- * REST Resource + BucketAccessControlsGetAPI + + -- * Creating a Request + , bucketAccessControlsGet + , BucketAccessControlsGet + + -- * Request Lenses + , bacgQuotaUser + , bacgPrettyPrint + , bacgUserIp + , bacgBucket + , bacgKey + , bacgOauthToken + , bacgEntity + , bacgFields + , bacgAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsGet@ which the +-- 'BucketAccessControlsGet' request conforms to. +type BucketAccessControlsGetAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> + Capture "entity" Text :> + Get '[JSON] BucketAccessControl + +-- | Returns the ACL entry for the specified entity on the specified bucket. +-- +-- /See:/ 'bucketAccessControlsGet' smart constructor. +data BucketAccessControlsGet = BucketAccessControlsGet + { _bacgQuotaUser :: !(Maybe Text) + , _bacgPrettyPrint :: !Bool + , _bacgUserIp :: !(Maybe Text) + , _bacgBucket :: !Text + , _bacgKey :: !(Maybe Text) + , _bacgOauthToken :: !(Maybe Text) + , _bacgEntity :: !Text + , _bacgFields :: !(Maybe Text) + , _bacgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacgQuotaUser' +-- +-- * 'bacgPrettyPrint' +-- +-- * 'bacgUserIp' +-- +-- * 'bacgBucket' +-- +-- * 'bacgKey' +-- +-- * 'bacgOauthToken' +-- +-- * 'bacgEntity' +-- +-- * 'bacgFields' +-- +-- * 'bacgAlt' +bucketAccessControlsGet + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> BucketAccessControlsGet +bucketAccessControlsGet pBacgBucket_ pBacgEntity_ = + BucketAccessControlsGet + { _bacgQuotaUser = Nothing + , _bacgPrettyPrint = True + , _bacgUserIp = Nothing + , _bacgBucket = pBacgBucket_ + , _bacgKey = Nothing + , _bacgOauthToken = Nothing + , _bacgEntity = pBacgEntity_ + , _bacgFields = Nothing + , _bacgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bacgQuotaUser :: Lens' BucketAccessControlsGet' (Maybe Text) +bacgQuotaUser + = lens _bacgQuotaUser + (\ s a -> s{_bacgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bacgPrettyPrint :: Lens' BucketAccessControlsGet' Bool +bacgPrettyPrint + = lens _bacgPrettyPrint + (\ s a -> s{_bacgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bacgUserIp :: Lens' BucketAccessControlsGet' (Maybe Text) +bacgUserIp + = lens _bacgUserIp (\ s a -> s{_bacgUserIp = a}) + +-- | Name of a bucket. +bacgBucket :: Lens' BucketAccessControlsGet' Text +bacgBucket + = lens _bacgBucket (\ s a -> s{_bacgBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bacgKey :: Lens' BucketAccessControlsGet' (Maybe Text) +bacgKey = lens _bacgKey (\ s a -> s{_bacgKey = a}) + +-- | OAuth 2.0 token for the current user. +bacgOauthToken :: Lens' BucketAccessControlsGet' (Maybe Text) +bacgOauthToken + = lens _bacgOauthToken + (\ s a -> s{_bacgOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +bacgEntity :: Lens' BucketAccessControlsGet' Text +bacgEntity + = lens _bacgEntity (\ s a -> s{_bacgEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +bacgFields :: Lens' BucketAccessControlsGet' (Maybe Text) +bacgFields + = lens _bacgFields (\ s a -> s{_bacgFields = a}) + +-- | Data format for the response. +bacgAlt :: Lens' BucketAccessControlsGet' Text +bacgAlt = lens _bacgAlt (\ s a -> s{_bacgAlt = a}) + +instance GoogleRequest BucketAccessControlsGet' where + type Rs BucketAccessControlsGet' = + BucketAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsGet{..} + = go _bacgQuotaUser _bacgPrettyPrint _bacgUserIp + _bacgBucket + _bacgKey + _bacgOauthToken + _bacgEntity + _bacgFields + _bacgAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsGetAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Insert.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Insert.hs new file mode 100644 index 000000000..bb4e1b07c --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Insert.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new ACL entry on the specified bucket. +-- +-- /See:/ for @StorageBucketAccessControlsInsert@. +module Storage.BucketAccessControls.Insert + ( + -- * REST Resource + BucketAccessControlsInsertAPI + + -- * Creating a Request + , bucketAccessControlsInsert + , BucketAccessControlsInsert + + -- * Request Lenses + , baciQuotaUser + , baciPrettyPrint + , baciUserIp + , baciBucket + , baciKey + , baciOauthToken + , baciFields + , baciAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsInsert@ which the +-- 'BucketAccessControlsInsert' request conforms to. +type BucketAccessControlsInsertAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> Post '[JSON] BucketAccessControl + +-- | Creates a new ACL entry on the specified bucket. +-- +-- /See:/ 'bucketAccessControlsInsert' smart constructor. +data BucketAccessControlsInsert = BucketAccessControlsInsert + { _baciQuotaUser :: !(Maybe Text) + , _baciPrettyPrint :: !Bool + , _baciUserIp :: !(Maybe Text) + , _baciBucket :: !Text + , _baciKey :: !(Maybe Text) + , _baciOauthToken :: !(Maybe Text) + , _baciFields :: !(Maybe Text) + , _baciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baciQuotaUser' +-- +-- * 'baciPrettyPrint' +-- +-- * 'baciUserIp' +-- +-- * 'baciBucket' +-- +-- * 'baciKey' +-- +-- * 'baciOauthToken' +-- +-- * 'baciFields' +-- +-- * 'baciAlt' +bucketAccessControlsInsert + :: Text -- ^ 'bucket' + -> BucketAccessControlsInsert +bucketAccessControlsInsert pBaciBucket_ = + BucketAccessControlsInsert + { _baciQuotaUser = Nothing + , _baciPrettyPrint = True + , _baciUserIp = Nothing + , _baciBucket = pBaciBucket_ + , _baciKey = Nothing + , _baciOauthToken = Nothing + , _baciFields = Nothing + , _baciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +baciQuotaUser :: Lens' BucketAccessControlsInsert' (Maybe Text) +baciQuotaUser + = lens _baciQuotaUser + (\ s a -> s{_baciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +baciPrettyPrint :: Lens' BucketAccessControlsInsert' Bool +baciPrettyPrint + = lens _baciPrettyPrint + (\ s a -> s{_baciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +baciUserIp :: Lens' BucketAccessControlsInsert' (Maybe Text) +baciUserIp + = lens _baciUserIp (\ s a -> s{_baciUserIp = a}) + +-- | Name of a bucket. +baciBucket :: Lens' BucketAccessControlsInsert' Text +baciBucket + = lens _baciBucket (\ s a -> s{_baciBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +baciKey :: Lens' BucketAccessControlsInsert' (Maybe Text) +baciKey = lens _baciKey (\ s a -> s{_baciKey = a}) + +-- | OAuth 2.0 token for the current user. +baciOauthToken :: Lens' BucketAccessControlsInsert' (Maybe Text) +baciOauthToken + = lens _baciOauthToken + (\ s a -> s{_baciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +baciFields :: Lens' BucketAccessControlsInsert' (Maybe Text) +baciFields + = lens _baciFields (\ s a -> s{_baciFields = a}) + +-- | Data format for the response. +baciAlt :: Lens' BucketAccessControlsInsert' Text +baciAlt = lens _baciAlt (\ s a -> s{_baciAlt = a}) + +instance GoogleRequest BucketAccessControlsInsert' + where + type Rs BucketAccessControlsInsert' = + BucketAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsInsert{..} + = go _baciQuotaUser _baciPrettyPrint _baciUserIp + _baciBucket + _baciKey + _baciOauthToken + _baciFields + _baciAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsInsertAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/List.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/List.hs new file mode 100644 index 000000000..79293a5f3 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves ACL entries on the specified bucket. +-- +-- /See:/ for @StorageBucketAccessControlsList@. +module Storage.BucketAccessControls.List + ( + -- * REST Resource + BucketAccessControlsListAPI + + -- * Creating a Request + , bucketAccessControlsList + , BucketAccessControlsList + + -- * Request Lenses + , baclQuotaUser + , baclPrettyPrint + , baclUserIp + , baclBucket + , baclKey + , baclOauthToken + , baclFields + , baclAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsList@ which the +-- 'BucketAccessControlsList' request conforms to. +type BucketAccessControlsListAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> Get '[JSON] BucketAccessControls + +-- | Retrieves ACL entries on the specified bucket. +-- +-- /See:/ 'bucketAccessControlsList' smart constructor. +data BucketAccessControlsList = BucketAccessControlsList + { _baclQuotaUser :: !(Maybe Text) + , _baclPrettyPrint :: !Bool + , _baclUserIp :: !(Maybe Text) + , _baclBucket :: !Text + , _baclKey :: !(Maybe Text) + , _baclOauthToken :: !(Maybe Text) + , _baclFields :: !(Maybe Text) + , _baclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'baclQuotaUser' +-- +-- * 'baclPrettyPrint' +-- +-- * 'baclUserIp' +-- +-- * 'baclBucket' +-- +-- * 'baclKey' +-- +-- * 'baclOauthToken' +-- +-- * 'baclFields' +-- +-- * 'baclAlt' +bucketAccessControlsList + :: Text -- ^ 'bucket' + -> BucketAccessControlsList +bucketAccessControlsList pBaclBucket_ = + BucketAccessControlsList + { _baclQuotaUser = Nothing + , _baclPrettyPrint = True + , _baclUserIp = Nothing + , _baclBucket = pBaclBucket_ + , _baclKey = Nothing + , _baclOauthToken = Nothing + , _baclFields = Nothing + , _baclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +baclQuotaUser :: Lens' BucketAccessControlsList' (Maybe Text) +baclQuotaUser + = lens _baclQuotaUser + (\ s a -> s{_baclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +baclPrettyPrint :: Lens' BucketAccessControlsList' Bool +baclPrettyPrint + = lens _baclPrettyPrint + (\ s a -> s{_baclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +baclUserIp :: Lens' BucketAccessControlsList' (Maybe Text) +baclUserIp + = lens _baclUserIp (\ s a -> s{_baclUserIp = a}) + +-- | Name of a bucket. +baclBucket :: Lens' BucketAccessControlsList' Text +baclBucket + = lens _baclBucket (\ s a -> s{_baclBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +baclKey :: Lens' BucketAccessControlsList' (Maybe Text) +baclKey = lens _baclKey (\ s a -> s{_baclKey = a}) + +-- | OAuth 2.0 token for the current user. +baclOauthToken :: Lens' BucketAccessControlsList' (Maybe Text) +baclOauthToken + = lens _baclOauthToken + (\ s a -> s{_baclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +baclFields :: Lens' BucketAccessControlsList' (Maybe Text) +baclFields + = lens _baclFields (\ s a -> s{_baclFields = a}) + +-- | Data format for the response. +baclAlt :: Lens' BucketAccessControlsList' Text +baclAlt = lens _baclAlt (\ s a -> s{_baclAlt = a}) + +instance GoogleRequest BucketAccessControlsList' + where + type Rs BucketAccessControlsList' = + BucketAccessControls + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsList{..} + = go _baclQuotaUser _baclPrettyPrint _baclUserIp + _baclBucket + _baclKey + _baclOauthToken + _baclFields + _baclAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsListAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Patch.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Patch.hs new file mode 100644 index 000000000..417edd8de --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Patch.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an ACL entry on the specified bucket. This method supports patch +-- semantics. +-- +-- /See:/ for @StorageBucketAccessControlsPatch@. +module Storage.BucketAccessControls.Patch + ( + -- * REST Resource + BucketAccessControlsPatchAPI + + -- * Creating a Request + , bucketAccessControlsPatch + , BucketAccessControlsPatch + + -- * Request Lenses + , bacpQuotaUser + , bacpPrettyPrint + , bacpUserIp + , bacpBucket + , bacpKey + , bacpOauthToken + , bacpEntity + , bacpFields + , bacpAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsPatch@ which the +-- 'BucketAccessControlsPatch' request conforms to. +type BucketAccessControlsPatchAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> + Capture "entity" Text :> + Patch '[JSON] BucketAccessControl + +-- | Updates an ACL entry on the specified bucket. This method supports patch +-- semantics. +-- +-- /See:/ 'bucketAccessControlsPatch' smart constructor. +data BucketAccessControlsPatch = BucketAccessControlsPatch + { _bacpQuotaUser :: !(Maybe Text) + , _bacpPrettyPrint :: !Bool + , _bacpUserIp :: !(Maybe Text) + , _bacpBucket :: !Text + , _bacpKey :: !(Maybe Text) + , _bacpOauthToken :: !(Maybe Text) + , _bacpEntity :: !Text + , _bacpFields :: !(Maybe Text) + , _bacpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacpQuotaUser' +-- +-- * 'bacpPrettyPrint' +-- +-- * 'bacpUserIp' +-- +-- * 'bacpBucket' +-- +-- * 'bacpKey' +-- +-- * 'bacpOauthToken' +-- +-- * 'bacpEntity' +-- +-- * 'bacpFields' +-- +-- * 'bacpAlt' +bucketAccessControlsPatch + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> BucketAccessControlsPatch +bucketAccessControlsPatch pBacpBucket_ pBacpEntity_ = + BucketAccessControlsPatch + { _bacpQuotaUser = Nothing + , _bacpPrettyPrint = True + , _bacpUserIp = Nothing + , _bacpBucket = pBacpBucket_ + , _bacpKey = Nothing + , _bacpOauthToken = Nothing + , _bacpEntity = pBacpEntity_ + , _bacpFields = Nothing + , _bacpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bacpQuotaUser :: Lens' BucketAccessControlsPatch' (Maybe Text) +bacpQuotaUser + = lens _bacpQuotaUser + (\ s a -> s{_bacpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bacpPrettyPrint :: Lens' BucketAccessControlsPatch' Bool +bacpPrettyPrint + = lens _bacpPrettyPrint + (\ s a -> s{_bacpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bacpUserIp :: Lens' BucketAccessControlsPatch' (Maybe Text) +bacpUserIp + = lens _bacpUserIp (\ s a -> s{_bacpUserIp = a}) + +-- | Name of a bucket. +bacpBucket :: Lens' BucketAccessControlsPatch' Text +bacpBucket + = lens _bacpBucket (\ s a -> s{_bacpBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bacpKey :: Lens' BucketAccessControlsPatch' (Maybe Text) +bacpKey = lens _bacpKey (\ s a -> s{_bacpKey = a}) + +-- | OAuth 2.0 token for the current user. +bacpOauthToken :: Lens' BucketAccessControlsPatch' (Maybe Text) +bacpOauthToken + = lens _bacpOauthToken + (\ s a -> s{_bacpOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +bacpEntity :: Lens' BucketAccessControlsPatch' Text +bacpEntity + = lens _bacpEntity (\ s a -> s{_bacpEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +bacpFields :: Lens' BucketAccessControlsPatch' (Maybe Text) +bacpFields + = lens _bacpFields (\ s a -> s{_bacpFields = a}) + +-- | Data format for the response. +bacpAlt :: Lens' BucketAccessControlsPatch' Text +bacpAlt = lens _bacpAlt (\ s a -> s{_bacpAlt = a}) + +instance GoogleRequest BucketAccessControlsPatch' + where + type Rs BucketAccessControlsPatch' = + BucketAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsPatch{..} + = go _bacpQuotaUser _bacpPrettyPrint _bacpUserIp + _bacpBucket + _bacpKey + _bacpOauthToken + _bacpEntity + _bacpFields + _bacpAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsPatchAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Update.hs b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Update.hs new file mode 100644 index 000000000..c95c1c116 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/BucketAccessControls/Update.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.BucketAccessControls.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an ACL entry on the specified bucket. +-- +-- /See:/ for @StorageBucketAccessControlsUpdate@. +module Storage.BucketAccessControls.Update + ( + -- * REST Resource + BucketAccessControlsUpdateAPI + + -- * Creating a Request + , bucketAccessControlsUpdate + , BucketAccessControlsUpdate + + -- * Request Lenses + , bacuQuotaUser + , bacuPrettyPrint + , bacuUserIp + , bacuBucket + , bacuKey + , bacuOauthToken + , bacuEntity + , bacuFields + , bacuAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketAccessControlsUpdate@ which the +-- 'BucketAccessControlsUpdate' request conforms to. +type BucketAccessControlsUpdateAPI = + "b" :> + Capture "bucket" Text :> + "acl" :> + Capture "entity" Text :> + Put '[JSON] BucketAccessControl + +-- | Updates an ACL entry on the specified bucket. +-- +-- /See:/ 'bucketAccessControlsUpdate' smart constructor. +data BucketAccessControlsUpdate = BucketAccessControlsUpdate + { _bacuQuotaUser :: !(Maybe Text) + , _bacuPrettyPrint :: !Bool + , _bacuUserIp :: !(Maybe Text) + , _bacuBucket :: !Text + , _bacuKey :: !(Maybe Text) + , _bacuOauthToken :: !(Maybe Text) + , _bacuEntity :: !Text + , _bacuFields :: !(Maybe Text) + , _bacuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControlsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacuQuotaUser' +-- +-- * 'bacuPrettyPrint' +-- +-- * 'bacuUserIp' +-- +-- * 'bacuBucket' +-- +-- * 'bacuKey' +-- +-- * 'bacuOauthToken' +-- +-- * 'bacuEntity' +-- +-- * 'bacuFields' +-- +-- * 'bacuAlt' +bucketAccessControlsUpdate + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> BucketAccessControlsUpdate +bucketAccessControlsUpdate pBacuBucket_ pBacuEntity_ = + BucketAccessControlsUpdate + { _bacuQuotaUser = Nothing + , _bacuPrettyPrint = True + , _bacuUserIp = Nothing + , _bacuBucket = pBacuBucket_ + , _bacuKey = Nothing + , _bacuOauthToken = Nothing + , _bacuEntity = pBacuEntity_ + , _bacuFields = Nothing + , _bacuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bacuQuotaUser :: Lens' BucketAccessControlsUpdate' (Maybe Text) +bacuQuotaUser + = lens _bacuQuotaUser + (\ s a -> s{_bacuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +bacuPrettyPrint :: Lens' BucketAccessControlsUpdate' Bool +bacuPrettyPrint + = lens _bacuPrettyPrint + (\ s a -> s{_bacuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bacuUserIp :: Lens' BucketAccessControlsUpdate' (Maybe Text) +bacuUserIp + = lens _bacuUserIp (\ s a -> s{_bacuUserIp = a}) + +-- | Name of a bucket. +bacuBucket :: Lens' BucketAccessControlsUpdate' Text +bacuBucket + = lens _bacuBucket (\ s a -> s{_bacuBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bacuKey :: Lens' BucketAccessControlsUpdate' (Maybe Text) +bacuKey = lens _bacuKey (\ s a -> s{_bacuKey = a}) + +-- | OAuth 2.0 token for the current user. +bacuOauthToken :: Lens' BucketAccessControlsUpdate' (Maybe Text) +bacuOauthToken + = lens _bacuOauthToken + (\ s a -> s{_bacuOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +bacuEntity :: Lens' BucketAccessControlsUpdate' Text +bacuEntity + = lens _bacuEntity (\ s a -> s{_bacuEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +bacuFields :: Lens' BucketAccessControlsUpdate' (Maybe Text) +bacuFields + = lens _bacuFields (\ s a -> s{_bacuFields = a}) + +-- | Data format for the response. +bacuAlt :: Lens' BucketAccessControlsUpdate' Text +bacuAlt = lens _bacuAlt (\ s a -> s{_bacuAlt = a}) + +instance GoogleRequest BucketAccessControlsUpdate' + where + type Rs BucketAccessControlsUpdate' = + BucketAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketAccessControlsUpdate{..} + = go _bacuQuotaUser _bacuPrettyPrint _bacuUserIp + _bacuBucket + _bacuKey + _bacuOauthToken + _bacuEntity + _bacuFields + _bacuAlt + where go + = clientWithRoute + (Proxy :: Proxy BucketAccessControlsUpdateAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Delete.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Delete.hs new file mode 100644 index 000000000..3ce370a9b --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Delete.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes an empty bucket. +-- +-- /See:/ for @StorageBucketsDelete@. +module Storage.Buckets.Delete + ( + -- * REST Resource + BucketsDeleteAPI + + -- * Creating a Request + , bucketsDelete + , BucketsDelete + + -- * Request Lenses + , bdQuotaUser + , bdIfMetagenerationMatch + , bdPrettyPrint + , bdUserIp + , bdBucket + , bdKey + , bdIfMetagenerationNotMatch + , bdOauthToken + , bdFields + , bdAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsDelete@ which the +-- 'BucketsDelete' request conforms to. +type BucketsDeleteAPI = + "b" :> + Capture "bucket" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + Delete '[JSON] () + +-- | Permanently deletes an empty bucket. +-- +-- /See:/ 'bucketsDelete' smart constructor. +data BucketsDelete = BucketsDelete + { _bdQuotaUser :: !(Maybe Text) + , _bdIfMetagenerationMatch :: !(Maybe Word64) + , _bdPrettyPrint :: !Bool + , _bdUserIp :: !(Maybe Text) + , _bdBucket :: !Text + , _bdKey :: !(Maybe Text) + , _bdIfMetagenerationNotMatch :: !(Maybe Word64) + , _bdOauthToken :: !(Maybe Text) + , _bdFields :: !(Maybe Text) + , _bdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bdQuotaUser' +-- +-- * 'bdIfMetagenerationMatch' +-- +-- * 'bdPrettyPrint' +-- +-- * 'bdUserIp' +-- +-- * 'bdBucket' +-- +-- * 'bdKey' +-- +-- * 'bdIfMetagenerationNotMatch' +-- +-- * 'bdOauthToken' +-- +-- * 'bdFields' +-- +-- * 'bdAlt' +bucketsDelete + :: Text -- ^ 'bucket' + -> BucketsDelete +bucketsDelete pBdBucket_ = + BucketsDelete + { _bdQuotaUser = Nothing + , _bdIfMetagenerationMatch = Nothing + , _bdPrettyPrint = True + , _bdUserIp = Nothing + , _bdBucket = pBdBucket_ + , _bdKey = Nothing + , _bdIfMetagenerationNotMatch = Nothing + , _bdOauthToken = Nothing + , _bdFields = Nothing + , _bdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bdQuotaUser :: Lens' BucketsDelete' (Maybe Text) +bdQuotaUser + = lens _bdQuotaUser (\ s a -> s{_bdQuotaUser = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration matches the given value. +bdIfMetagenerationMatch :: Lens' BucketsDelete' (Maybe Word64) +bdIfMetagenerationMatch + = lens _bdIfMetagenerationMatch + (\ s a -> s{_bdIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +bdPrettyPrint :: Lens' BucketsDelete' Bool +bdPrettyPrint + = lens _bdPrettyPrint + (\ s a -> s{_bdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bdUserIp :: Lens' BucketsDelete' (Maybe Text) +bdUserIp = lens _bdUserIp (\ s a -> s{_bdUserIp = a}) + +-- | Name of a bucket. +bdBucket :: Lens' BucketsDelete' Text +bdBucket = lens _bdBucket (\ s a -> s{_bdBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bdKey :: Lens' BucketsDelete' (Maybe Text) +bdKey = lens _bdKey (\ s a -> s{_bdKey = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration does not match the given value. +bdIfMetagenerationNotMatch :: Lens' BucketsDelete' (Maybe Word64) +bdIfMetagenerationNotMatch + = lens _bdIfMetagenerationNotMatch + (\ s a -> s{_bdIfMetagenerationNotMatch = a}) + +-- | OAuth 2.0 token for the current user. +bdOauthToken :: Lens' BucketsDelete' (Maybe Text) +bdOauthToken + = lens _bdOauthToken (\ s a -> s{_bdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bdFields :: Lens' BucketsDelete' (Maybe Text) +bdFields = lens _bdFields (\ s a -> s{_bdFields = a}) + +-- | Data format for the response. +bdAlt :: Lens' BucketsDelete' Text +bdAlt = lens _bdAlt (\ s a -> s{_bdAlt = a}) + +instance GoogleRequest BucketsDelete' where + type Rs BucketsDelete' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsDelete{..} + = go _bdQuotaUser _bdIfMetagenerationMatch + _bdPrettyPrint + _bdUserIp + _bdBucket + _bdKey + _bdIfMetagenerationNotMatch + _bdOauthToken + _bdFields + _bdAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsDeleteAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Get.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Get.hs new file mode 100644 index 000000000..ce37066aa --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Get.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns metadata for the specified bucket. +-- +-- /See:/ for @StorageBucketsGet@. +module Storage.Buckets.Get + ( + -- * REST Resource + BucketsGetAPI + + -- * Creating a Request + , bucketsGet + , BucketsGet + + -- * Request Lenses + , bgQuotaUser + , bgIfMetagenerationMatch + , bgPrettyPrint + , bgUserIp + , bgBucket + , bgKey + , bgIfMetagenerationNotMatch + , bgProjection + , bgOauthToken + , bgFields + , bgAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsGet@ which the +-- 'BucketsGet' request conforms to. +type BucketsGetAPI = + "b" :> + Capture "bucket" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> Get '[JSON] Bucket + +-- | Returns metadata for the specified bucket. +-- +-- /See:/ 'bucketsGet' smart constructor. +data BucketsGet = BucketsGet + { _bgQuotaUser :: !(Maybe Text) + , _bgIfMetagenerationMatch :: !(Maybe Word64) + , _bgPrettyPrint :: !Bool + , _bgUserIp :: !(Maybe Text) + , _bgBucket :: !Text + , _bgKey :: !(Maybe Text) + , _bgIfMetagenerationNotMatch :: !(Maybe Word64) + , _bgProjection :: !(Maybe Text) + , _bgOauthToken :: !(Maybe Text) + , _bgFields :: !(Maybe Text) + , _bgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bgQuotaUser' +-- +-- * 'bgIfMetagenerationMatch' +-- +-- * 'bgPrettyPrint' +-- +-- * 'bgUserIp' +-- +-- * 'bgBucket' +-- +-- * 'bgKey' +-- +-- * 'bgIfMetagenerationNotMatch' +-- +-- * 'bgProjection' +-- +-- * 'bgOauthToken' +-- +-- * 'bgFields' +-- +-- * 'bgAlt' +bucketsGet + :: Text -- ^ 'bucket' + -> BucketsGet +bucketsGet pBgBucket_ = + BucketsGet + { _bgQuotaUser = Nothing + , _bgIfMetagenerationMatch = Nothing + , _bgPrettyPrint = True + , _bgUserIp = Nothing + , _bgBucket = pBgBucket_ + , _bgKey = Nothing + , _bgIfMetagenerationNotMatch = Nothing + , _bgProjection = Nothing + , _bgOauthToken = Nothing + , _bgFields = Nothing + , _bgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bgQuotaUser :: Lens' BucketsGet' (Maybe Text) +bgQuotaUser + = lens _bgQuotaUser (\ s a -> s{_bgQuotaUser = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration matches the given value. +bgIfMetagenerationMatch :: Lens' BucketsGet' (Maybe Word64) +bgIfMetagenerationMatch + = lens _bgIfMetagenerationMatch + (\ s a -> s{_bgIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +bgPrettyPrint :: Lens' BucketsGet' Bool +bgPrettyPrint + = lens _bgPrettyPrint + (\ s a -> s{_bgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bgUserIp :: Lens' BucketsGet' (Maybe Text) +bgUserIp = lens _bgUserIp (\ s a -> s{_bgUserIp = a}) + +-- | Name of a bucket. +bgBucket :: Lens' BucketsGet' Text +bgBucket = lens _bgBucket (\ s a -> s{_bgBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bgKey :: Lens' BucketsGet' (Maybe Text) +bgKey = lens _bgKey (\ s a -> s{_bgKey = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration does not match the given value. +bgIfMetagenerationNotMatch :: Lens' BucketsGet' (Maybe Word64) +bgIfMetagenerationNotMatch + = lens _bgIfMetagenerationNotMatch + (\ s a -> s{_bgIfMetagenerationNotMatch = a}) + +-- | Set of properties to return. Defaults to noAcl. +bgProjection :: Lens' BucketsGet' (Maybe Text) +bgProjection + = lens _bgProjection (\ s a -> s{_bgProjection = a}) + +-- | OAuth 2.0 token for the current user. +bgOauthToken :: Lens' BucketsGet' (Maybe Text) +bgOauthToken + = lens _bgOauthToken (\ s a -> s{_bgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bgFields :: Lens' BucketsGet' (Maybe Text) +bgFields = lens _bgFields (\ s a -> s{_bgFields = a}) + +-- | Data format for the response. +bgAlt :: Lens' BucketsGet' Text +bgAlt = lens _bgAlt (\ s a -> s{_bgAlt = a}) + +instance GoogleRequest BucketsGet' where + type Rs BucketsGet' = Bucket + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsGet{..} + = go _bgQuotaUser _bgIfMetagenerationMatch + _bgPrettyPrint + _bgUserIp + _bgBucket + _bgKey + _bgIfMetagenerationNotMatch + _bgProjection + _bgOauthToken + _bgFields + _bgAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsGetAPI) r u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Insert.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Insert.hs new file mode 100644 index 000000000..c479c8dfb --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Insert.hs @@ -0,0 +1,167 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new bucket. +-- +-- /See:/ for @StorageBucketsInsert@. +module Storage.Buckets.Insert + ( + -- * REST Resource + BucketsInsertAPI + + -- * Creating a Request + , bucketsInsert + , BucketsInsert + + -- * Request Lenses + , biQuotaUser + , biPrettyPrint + , biProject + , biUserIp + , biKey + , biProjection + , biOauthToken + , biFields + , biAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsInsert@ which the +-- 'BucketsInsert' request conforms to. +type BucketsInsertAPI = + "b" :> + QueryParam "project" Text :> + QueryParam "projection" Text :> Post '[JSON] Bucket + +-- | Creates a new bucket. +-- +-- /See:/ 'bucketsInsert' smart constructor. +data BucketsInsert = BucketsInsert + { _biQuotaUser :: !(Maybe Text) + , _biPrettyPrint :: !Bool + , _biProject :: !Text + , _biUserIp :: !(Maybe Text) + , _biKey :: !(Maybe Text) + , _biProjection :: !(Maybe Text) + , _biOauthToken :: !(Maybe Text) + , _biFields :: !(Maybe Text) + , _biAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'biQuotaUser' +-- +-- * 'biPrettyPrint' +-- +-- * 'biProject' +-- +-- * 'biUserIp' +-- +-- * 'biKey' +-- +-- * 'biProjection' +-- +-- * 'biOauthToken' +-- +-- * 'biFields' +-- +-- * 'biAlt' +bucketsInsert + :: Text -- ^ 'project' + -> BucketsInsert +bucketsInsert pBiProject_ = + BucketsInsert + { _biQuotaUser = Nothing + , _biPrettyPrint = True + , _biProject = pBiProject_ + , _biUserIp = Nothing + , _biKey = Nothing + , _biProjection = Nothing + , _biOauthToken = Nothing + , _biFields = Nothing + , _biAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +biQuotaUser :: Lens' BucketsInsert' (Maybe Text) +biQuotaUser + = lens _biQuotaUser (\ s a -> s{_biQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +biPrettyPrint :: Lens' BucketsInsert' Bool +biPrettyPrint + = lens _biPrettyPrint + (\ s a -> s{_biPrettyPrint = a}) + +-- | A valid API project identifier. +biProject :: Lens' BucketsInsert' Text +biProject + = lens _biProject (\ s a -> s{_biProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +biUserIp :: Lens' BucketsInsert' (Maybe Text) +biUserIp = lens _biUserIp (\ s a -> s{_biUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +biKey :: Lens' BucketsInsert' (Maybe Text) +biKey = lens _biKey (\ s a -> s{_biKey = a}) + +-- | Set of properties to return. Defaults to noAcl, unless the bucket +-- resource specifies acl or defaultObjectAcl properties, when it defaults +-- to full. +biProjection :: Lens' BucketsInsert' (Maybe Text) +biProjection + = lens _biProjection (\ s a -> s{_biProjection = a}) + +-- | OAuth 2.0 token for the current user. +biOauthToken :: Lens' BucketsInsert' (Maybe Text) +biOauthToken + = lens _biOauthToken (\ s a -> s{_biOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +biFields :: Lens' BucketsInsert' (Maybe Text) +biFields = lens _biFields (\ s a -> s{_biFields = a}) + +-- | Data format for the response. +biAlt :: Lens' BucketsInsert' Text +biAlt = lens _biAlt (\ s a -> s{_biAlt = a}) + +instance GoogleRequest BucketsInsert' where + type Rs BucketsInsert' = Bucket + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsInsert{..} + = go _biQuotaUser _biPrettyPrint (Just _biProject) + _biUserIp + _biKey + _biProjection + _biOauthToken + _biFields + _biAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsInsertAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/List.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/List.hs new file mode 100644 index 000000000..599d8ec01 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/List.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of buckets for a given project. +-- +-- /See:/ for @StorageBucketsList@. +module Storage.Buckets.List + ( + -- * REST Resource + BucketsListAPI + + -- * Creating a Request + , bucketsList + , BucketsList + + -- * Request Lenses + , blQuotaUser + , blPrettyPrint + , blProject + , blUserIp + , blKey + , blProjection + , blPageToken + , blOauthToken + , blMaxResults + , blFields + , blAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsList@ which the +-- 'BucketsList' request conforms to. +type BucketsListAPI = + "b" :> + QueryParam "project" Text :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> Get '[JSON] Buckets + +-- | Retrieves a list of buckets for a given project. +-- +-- /See:/ 'bucketsList' smart constructor. +data BucketsList = BucketsList + { _blQuotaUser :: !(Maybe Text) + , _blPrettyPrint :: !Bool + , _blProject :: !Text + , _blUserIp :: !(Maybe Text) + , _blKey :: !(Maybe Text) + , _blProjection :: !(Maybe Text) + , _blPageToken :: !(Maybe Text) + , _blOauthToken :: !(Maybe Text) + , _blMaxResults :: !(Maybe Word32) + , _blFields :: !(Maybe Text) + , _blAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'blQuotaUser' +-- +-- * 'blPrettyPrint' +-- +-- * 'blProject' +-- +-- * 'blUserIp' +-- +-- * 'blKey' +-- +-- * 'blProjection' +-- +-- * 'blPageToken' +-- +-- * 'blOauthToken' +-- +-- * 'blMaxResults' +-- +-- * 'blFields' +-- +-- * 'blAlt' +bucketsList + :: Text -- ^ 'project' + -> BucketsList +bucketsList pBlProject_ = + BucketsList + { _blQuotaUser = Nothing + , _blPrettyPrint = True + , _blProject = pBlProject_ + , _blUserIp = Nothing + , _blKey = Nothing + , _blProjection = Nothing + , _blPageToken = Nothing + , _blOauthToken = Nothing + , _blMaxResults = Nothing + , _blFields = Nothing + , _blAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +blQuotaUser :: Lens' BucketsList' (Maybe Text) +blQuotaUser + = lens _blQuotaUser (\ s a -> s{_blQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +blPrettyPrint :: Lens' BucketsList' Bool +blPrettyPrint + = lens _blPrettyPrint + (\ s a -> s{_blPrettyPrint = a}) + +-- | A valid API project identifier. +blProject :: Lens' BucketsList' Text +blProject + = lens _blProject (\ s a -> s{_blProject = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +blUserIp :: Lens' BucketsList' (Maybe Text) +blUserIp = lens _blUserIp (\ s a -> s{_blUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +blKey :: Lens' BucketsList' (Maybe Text) +blKey = lens _blKey (\ s a -> s{_blKey = a}) + +-- | Set of properties to return. Defaults to noAcl. +blProjection :: Lens' BucketsList' (Maybe Text) +blProjection + = lens _blProjection (\ s a -> s{_blProjection = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +blPageToken :: Lens' BucketsList' (Maybe Text) +blPageToken + = lens _blPageToken (\ s a -> s{_blPageToken = a}) + +-- | OAuth 2.0 token for the current user. +blOauthToken :: Lens' BucketsList' (Maybe Text) +blOauthToken + = lens _blOauthToken (\ s a -> s{_blOauthToken = a}) + +-- | Maximum number of buckets to return. +blMaxResults :: Lens' BucketsList' (Maybe Word32) +blMaxResults + = lens _blMaxResults (\ s a -> s{_blMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +blFields :: Lens' BucketsList' (Maybe Text) +blFields = lens _blFields (\ s a -> s{_blFields = a}) + +-- | Data format for the response. +blAlt :: Lens' BucketsList' Text +blAlt = lens _blAlt (\ s a -> s{_blAlt = a}) + +instance GoogleRequest BucketsList' where + type Rs BucketsList' = Buckets + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsList{..} + = go _blQuotaUser _blPrettyPrint (Just _blProject) + _blUserIp + _blKey + _blProjection + _blPageToken + _blOauthToken + _blMaxResults + _blFields + _blAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsListAPI) r u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs new file mode 100644 index 000000000..788bed9c4 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a bucket. This method supports patch semantics. +-- +-- /See:/ for @StorageBucketsPatch@. +module Storage.Buckets.Patch + ( + -- * REST Resource + BucketsPatchAPI + + -- * Creating a Request + , bucketsPatch + , BucketsPatch + + -- * Request Lenses + , bpQuotaUser + , bpIfMetagenerationMatch + , bpPrettyPrint + , bpUserIp + , bpBucket + , bpKey + , bpIfMetagenerationNotMatch + , bpProjection + , bpOauthToken + , bpFields + , bpAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsPatch@ which the +-- 'BucketsPatch' request conforms to. +type BucketsPatchAPI = + "b" :> + Capture "bucket" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> Patch '[JSON] Bucket + +-- | Updates a bucket. This method supports patch semantics. +-- +-- /See:/ 'bucketsPatch' smart constructor. +data BucketsPatch = BucketsPatch + { _bpQuotaUser :: !(Maybe Text) + , _bpIfMetagenerationMatch :: !(Maybe Word64) + , _bpPrettyPrint :: !Bool + , _bpUserIp :: !(Maybe Text) + , _bpBucket :: !Text + , _bpKey :: !(Maybe Text) + , _bpIfMetagenerationNotMatch :: !(Maybe Word64) + , _bpProjection :: !(Maybe Text) + , _bpOauthToken :: !(Maybe Text) + , _bpFields :: !(Maybe Text) + , _bpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bpQuotaUser' +-- +-- * 'bpIfMetagenerationMatch' +-- +-- * 'bpPrettyPrint' +-- +-- * 'bpUserIp' +-- +-- * 'bpBucket' +-- +-- * 'bpKey' +-- +-- * 'bpIfMetagenerationNotMatch' +-- +-- * 'bpProjection' +-- +-- * 'bpOauthToken' +-- +-- * 'bpFields' +-- +-- * 'bpAlt' +bucketsPatch + :: Text -- ^ 'bucket' + -> BucketsPatch +bucketsPatch pBpBucket_ = + BucketsPatch + { _bpQuotaUser = Nothing + , _bpIfMetagenerationMatch = Nothing + , _bpPrettyPrint = True + , _bpUserIp = Nothing + , _bpBucket = pBpBucket_ + , _bpKey = Nothing + , _bpIfMetagenerationNotMatch = Nothing + , _bpProjection = Nothing + , _bpOauthToken = Nothing + , _bpFields = Nothing + , _bpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +bpQuotaUser :: Lens' BucketsPatch' (Maybe Text) +bpQuotaUser + = lens _bpQuotaUser (\ s a -> s{_bpQuotaUser = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration matches the given value. +bpIfMetagenerationMatch :: Lens' BucketsPatch' (Maybe Word64) +bpIfMetagenerationMatch + = lens _bpIfMetagenerationMatch + (\ s a -> s{_bpIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +bpPrettyPrint :: Lens' BucketsPatch' Bool +bpPrettyPrint + = lens _bpPrettyPrint + (\ s a -> s{_bpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +bpUserIp :: Lens' BucketsPatch' (Maybe Text) +bpUserIp = lens _bpUserIp (\ s a -> s{_bpUserIp = a}) + +-- | Name of a bucket. +bpBucket :: Lens' BucketsPatch' Text +bpBucket = lens _bpBucket (\ s a -> s{_bpBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +bpKey :: Lens' BucketsPatch' (Maybe Text) +bpKey = lens _bpKey (\ s a -> s{_bpKey = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration does not match the given value. +bpIfMetagenerationNotMatch :: Lens' BucketsPatch' (Maybe Word64) +bpIfMetagenerationNotMatch + = lens _bpIfMetagenerationNotMatch + (\ s a -> s{_bpIfMetagenerationNotMatch = a}) + +-- | Set of properties to return. Defaults to full. +bpProjection :: Lens' BucketsPatch' (Maybe Text) +bpProjection + = lens _bpProjection (\ s a -> s{_bpProjection = a}) + +-- | OAuth 2.0 token for the current user. +bpOauthToken :: Lens' BucketsPatch' (Maybe Text) +bpOauthToken + = lens _bpOauthToken (\ s a -> s{_bpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +bpFields :: Lens' BucketsPatch' (Maybe Text) +bpFields = lens _bpFields (\ s a -> s{_bpFields = a}) + +-- | Data format for the response. +bpAlt :: Lens' BucketsPatch' Text +bpAlt = lens _bpAlt (\ s a -> s{_bpAlt = a}) + +instance GoogleRequest BucketsPatch' where + type Rs BucketsPatch' = Bucket + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsPatch{..} + = go _bpQuotaUser _bpIfMetagenerationMatch + _bpPrettyPrint + _bpUserIp + _bpBucket + _bpKey + _bpIfMetagenerationNotMatch + _bpProjection + _bpOauthToken + _bpFields + _bpAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsPatchAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Update.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Update.hs new file mode 100644 index 000000000..aa58bab1b --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Update.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Buckets.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a bucket. +-- +-- /See:/ for @StorageBucketsUpdate@. +module Storage.Buckets.Update + ( + -- * REST Resource + BucketsUpdateAPI + + -- * Creating a Request + , bucketsUpdate + , BucketsUpdate + + -- * Request Lenses + , buQuotaUser + , buIfMetagenerationMatch + , buPrettyPrint + , buUserIp + , buBucket + , buKey + , buIfMetagenerationNotMatch + , buProjection + , buOauthToken + , buFields + , buAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageBucketsUpdate@ which the +-- 'BucketsUpdate' request conforms to. +type BucketsUpdateAPI = + "b" :> + Capture "bucket" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> Put '[JSON] Bucket + +-- | Updates a bucket. +-- +-- /See:/ 'bucketsUpdate' smart constructor. +data BucketsUpdate = BucketsUpdate + { _buQuotaUser :: !(Maybe Text) + , _buIfMetagenerationMatch :: !(Maybe Word64) + , _buPrettyPrint :: !Bool + , _buUserIp :: !(Maybe Text) + , _buBucket :: !Text + , _buKey :: !(Maybe Text) + , _buIfMetagenerationNotMatch :: !(Maybe Word64) + , _buProjection :: !(Maybe Text) + , _buOauthToken :: !(Maybe Text) + , _buFields :: !(Maybe Text) + , _buAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'buQuotaUser' +-- +-- * 'buIfMetagenerationMatch' +-- +-- * 'buPrettyPrint' +-- +-- * 'buUserIp' +-- +-- * 'buBucket' +-- +-- * 'buKey' +-- +-- * 'buIfMetagenerationNotMatch' +-- +-- * 'buProjection' +-- +-- * 'buOauthToken' +-- +-- * 'buFields' +-- +-- * 'buAlt' +bucketsUpdate + :: Text -- ^ 'bucket' + -> BucketsUpdate +bucketsUpdate pBuBucket_ = + BucketsUpdate + { _buQuotaUser = Nothing + , _buIfMetagenerationMatch = Nothing + , _buPrettyPrint = True + , _buUserIp = Nothing + , _buBucket = pBuBucket_ + , _buKey = Nothing + , _buIfMetagenerationNotMatch = Nothing + , _buProjection = Nothing + , _buOauthToken = Nothing + , _buFields = Nothing + , _buAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +buQuotaUser :: Lens' BucketsUpdate' (Maybe Text) +buQuotaUser + = lens _buQuotaUser (\ s a -> s{_buQuotaUser = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration matches the given value. +buIfMetagenerationMatch :: Lens' BucketsUpdate' (Maybe Word64) +buIfMetagenerationMatch + = lens _buIfMetagenerationMatch + (\ s a -> s{_buIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +buPrettyPrint :: Lens' BucketsUpdate' Bool +buPrettyPrint + = lens _buPrettyPrint + (\ s a -> s{_buPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +buUserIp :: Lens' BucketsUpdate' (Maybe Text) +buUserIp = lens _buUserIp (\ s a -> s{_buUserIp = a}) + +-- | Name of a bucket. +buBucket :: Lens' BucketsUpdate' Text +buBucket = lens _buBucket (\ s a -> s{_buBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +buKey :: Lens' BucketsUpdate' (Maybe Text) +buKey = lens _buKey (\ s a -> s{_buKey = a}) + +-- | Makes the return of the bucket metadata conditional on whether the +-- bucket\'s current metageneration does not match the given value. +buIfMetagenerationNotMatch :: Lens' BucketsUpdate' (Maybe Word64) +buIfMetagenerationNotMatch + = lens _buIfMetagenerationNotMatch + (\ s a -> s{_buIfMetagenerationNotMatch = a}) + +-- | Set of properties to return. Defaults to full. +buProjection :: Lens' BucketsUpdate' (Maybe Text) +buProjection + = lens _buProjection (\ s a -> s{_buProjection = a}) + +-- | OAuth 2.0 token for the current user. +buOauthToken :: Lens' BucketsUpdate' (Maybe Text) +buOauthToken + = lens _buOauthToken (\ s a -> s{_buOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +buFields :: Lens' BucketsUpdate' (Maybe Text) +buFields = lens _buFields (\ s a -> s{_buFields = a}) + +-- | Data format for the response. +buAlt :: Lens' BucketsUpdate' Text +buAlt = lens _buAlt (\ s a -> s{_buAlt = a}) + +instance GoogleRequest BucketsUpdate' where + type Rs BucketsUpdate' = Bucket + request = requestWithRoute defReq storageURL + requestWithRoute r u BucketsUpdate{..} + = go _buQuotaUser _buIfMetagenerationMatch + _buPrettyPrint + _buUserIp + _buBucket + _buKey + _buIfMetagenerationNotMatch + _buProjection + _buOauthToken + _buFields + _buAlt + where go + = clientWithRoute (Proxy :: Proxy BucketsUpdateAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Channels/Stop.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Channels/Stop.hs new file mode 100644 index 000000000..37289f804 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Channels/Stop.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Channels.Stop +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stop watching resources through this channel +-- +-- /See:/ for @StorageChannelsStop@. +module Storage.Channels.Stop + ( + -- * REST Resource + ChannelsStopAPI + + -- * Creating a Request + , channelsStop + , ChannelsStop + + -- * Request Lenses + , csQuotaUser + , csPrettyPrint + , csUserIp + , csKey + , csOauthToken + , csFields + , csAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageChannelsStop@ which the +-- 'ChannelsStop' request conforms to. +type ChannelsStopAPI = + "channels" :> "stop" :> Post '[JSON] () + +-- | Stop watching resources through this channel +-- +-- /See:/ 'channelsStop' smart constructor. +data ChannelsStop = ChannelsStop + { _csQuotaUser :: !(Maybe Text) + , _csPrettyPrint :: !Bool + , _csUserIp :: !(Maybe Text) + , _csKey :: !(Maybe Text) + , _csOauthToken :: !(Maybe Text) + , _csFields :: !(Maybe Text) + , _csAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsStop'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csQuotaUser' +-- +-- * 'csPrettyPrint' +-- +-- * 'csUserIp' +-- +-- * 'csKey' +-- +-- * 'csOauthToken' +-- +-- * 'csFields' +-- +-- * 'csAlt' +channelsStop + :: ChannelsStop +channelsStop = + ChannelsStop + { _csQuotaUser = Nothing + , _csPrettyPrint = True + , _csUserIp = Nothing + , _csKey = Nothing + , _csOauthToken = Nothing + , _csFields = Nothing + , _csAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csQuotaUser :: Lens' ChannelsStop' (Maybe Text) +csQuotaUser + = lens _csQuotaUser (\ s a -> s{_csQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csPrettyPrint :: Lens' ChannelsStop' Bool +csPrettyPrint + = lens _csPrettyPrint + (\ s a -> s{_csPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csUserIp :: Lens' ChannelsStop' (Maybe Text) +csUserIp = lens _csUserIp (\ s a -> s{_csUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csKey :: Lens' ChannelsStop' (Maybe Text) +csKey = lens _csKey (\ s a -> s{_csKey = a}) + +-- | OAuth 2.0 token for the current user. +csOauthToken :: Lens' ChannelsStop' (Maybe Text) +csOauthToken + = lens _csOauthToken (\ s a -> s{_csOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csFields :: Lens' ChannelsStop' (Maybe Text) +csFields = lens _csFields (\ s a -> s{_csFields = a}) + +-- | Data format for the response. +csAlt :: Lens' ChannelsStop' Text +csAlt = lens _csAlt (\ s a -> s{_csAlt = a}) + +instance GoogleRequest ChannelsStop' where + type Rs ChannelsStop' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u ChannelsStop{..} + = go _csQuotaUser _csPrettyPrint _csUserIp _csKey + _csOauthToken + _csFields + _csAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsStopAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Delete.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Delete.hs new file mode 100644 index 000000000..4491c36f7 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Delete.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes the default object ACL entry for the specified +-- entity on the specified bucket. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsDelete@. +module Storage.DefaultObjectAccessControls.Delete + ( + -- * REST Resource + DefaultObjectAccessControlsDeleteAPI + + -- * Creating a Request + , defaultObjectAccessControlsDelete + , DefaultObjectAccessControlsDelete + + -- * Request Lenses + , doacdQuotaUser + , doacdPrettyPrint + , doacdUserIp + , doacdBucket + , doacdKey + , doacdOauthToken + , doacdEntity + , doacdFields + , doacdAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsDelete@ which the +-- 'DefaultObjectAccessControlsDelete' request conforms to. +type DefaultObjectAccessControlsDeleteAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + Capture "entity" Text :> Delete '[JSON] () + +-- | Permanently deletes the default object ACL entry for the specified +-- entity on the specified bucket. +-- +-- /See:/ 'defaultObjectAccessControlsDelete' smart constructor. +data DefaultObjectAccessControlsDelete = DefaultObjectAccessControlsDelete + { _doacdQuotaUser :: !(Maybe Text) + , _doacdPrettyPrint :: !Bool + , _doacdUserIp :: !(Maybe Text) + , _doacdBucket :: !Text + , _doacdKey :: !(Maybe Text) + , _doacdOauthToken :: !(Maybe Text) + , _doacdEntity :: !Text + , _doacdFields :: !(Maybe Text) + , _doacdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doacdQuotaUser' +-- +-- * 'doacdPrettyPrint' +-- +-- * 'doacdUserIp' +-- +-- * 'doacdBucket' +-- +-- * 'doacdKey' +-- +-- * 'doacdOauthToken' +-- +-- * 'doacdEntity' +-- +-- * 'doacdFields' +-- +-- * 'doacdAlt' +defaultObjectAccessControlsDelete + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> DefaultObjectAccessControlsDelete +defaultObjectAccessControlsDelete pDoacdBucket_ pDoacdEntity_ = + DefaultObjectAccessControlsDelete + { _doacdQuotaUser = Nothing + , _doacdPrettyPrint = True + , _doacdUserIp = Nothing + , _doacdBucket = pDoacdBucket_ + , _doacdKey = Nothing + , _doacdOauthToken = Nothing + , _doacdEntity = pDoacdEntity_ + , _doacdFields = Nothing + , _doacdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doacdQuotaUser :: Lens' DefaultObjectAccessControlsDelete' (Maybe Text) +doacdQuotaUser + = lens _doacdQuotaUser + (\ s a -> s{_doacdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +doacdPrettyPrint :: Lens' DefaultObjectAccessControlsDelete' Bool +doacdPrettyPrint + = lens _doacdPrettyPrint + (\ s a -> s{_doacdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doacdUserIp :: Lens' DefaultObjectAccessControlsDelete' (Maybe Text) +doacdUserIp + = lens _doacdUserIp (\ s a -> s{_doacdUserIp = a}) + +-- | Name of a bucket. +doacdBucket :: Lens' DefaultObjectAccessControlsDelete' Text +doacdBucket + = lens _doacdBucket (\ s a -> s{_doacdBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doacdKey :: Lens' DefaultObjectAccessControlsDelete' (Maybe Text) +doacdKey = lens _doacdKey (\ s a -> s{_doacdKey = a}) + +-- | OAuth 2.0 token for the current user. +doacdOauthToken :: Lens' DefaultObjectAccessControlsDelete' (Maybe Text) +doacdOauthToken + = lens _doacdOauthToken + (\ s a -> s{_doacdOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +doacdEntity :: Lens' DefaultObjectAccessControlsDelete' Text +doacdEntity + = lens _doacdEntity (\ s a -> s{_doacdEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +doacdFields :: Lens' DefaultObjectAccessControlsDelete' (Maybe Text) +doacdFields + = lens _doacdFields (\ s a -> s{_doacdFields = a}) + +-- | Data format for the response. +doacdAlt :: Lens' DefaultObjectAccessControlsDelete' Text +doacdAlt = lens _doacdAlt (\ s a -> s{_doacdAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsDelete' where + type Rs DefaultObjectAccessControlsDelete' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsDelete{..} + = go _doacdQuotaUser _doacdPrettyPrint _doacdUserIp + _doacdBucket + _doacdKey + _doacdOauthToken + _doacdEntity + _doacdFields + _doacdAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsDeleteAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Get.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Get.hs new file mode 100644 index 000000000..43b4cb000 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Get.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the default object ACL entry for the specified entity on the +-- specified bucket. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsGet@. +module Storage.DefaultObjectAccessControls.Get + ( + -- * REST Resource + DefaultObjectAccessControlsGetAPI + + -- * Creating a Request + , defaultObjectAccessControlsGet + , DefaultObjectAccessControlsGet + + -- * Request Lenses + , doacgQuotaUser + , doacgPrettyPrint + , doacgUserIp + , doacgBucket + , doacgKey + , doacgOauthToken + , doacgEntity + , doacgFields + , doacgAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsGet@ which the +-- 'DefaultObjectAccessControlsGet' request conforms to. +type DefaultObjectAccessControlsGetAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + Capture "entity" Text :> + Get '[JSON] ObjectAccessControl + +-- | Returns the default object ACL entry for the specified entity on the +-- specified bucket. +-- +-- /See:/ 'defaultObjectAccessControlsGet' smart constructor. +data DefaultObjectAccessControlsGet = DefaultObjectAccessControlsGet + { _doacgQuotaUser :: !(Maybe Text) + , _doacgPrettyPrint :: !Bool + , _doacgUserIp :: !(Maybe Text) + , _doacgBucket :: !Text + , _doacgKey :: !(Maybe Text) + , _doacgOauthToken :: !(Maybe Text) + , _doacgEntity :: !Text + , _doacgFields :: !(Maybe Text) + , _doacgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doacgQuotaUser' +-- +-- * 'doacgPrettyPrint' +-- +-- * 'doacgUserIp' +-- +-- * 'doacgBucket' +-- +-- * 'doacgKey' +-- +-- * 'doacgOauthToken' +-- +-- * 'doacgEntity' +-- +-- * 'doacgFields' +-- +-- * 'doacgAlt' +defaultObjectAccessControlsGet + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> DefaultObjectAccessControlsGet +defaultObjectAccessControlsGet pDoacgBucket_ pDoacgEntity_ = + DefaultObjectAccessControlsGet + { _doacgQuotaUser = Nothing + , _doacgPrettyPrint = True + , _doacgUserIp = Nothing + , _doacgBucket = pDoacgBucket_ + , _doacgKey = Nothing + , _doacgOauthToken = Nothing + , _doacgEntity = pDoacgEntity_ + , _doacgFields = Nothing + , _doacgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doacgQuotaUser :: Lens' DefaultObjectAccessControlsGet' (Maybe Text) +doacgQuotaUser + = lens _doacgQuotaUser + (\ s a -> s{_doacgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +doacgPrettyPrint :: Lens' DefaultObjectAccessControlsGet' Bool +doacgPrettyPrint + = lens _doacgPrettyPrint + (\ s a -> s{_doacgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doacgUserIp :: Lens' DefaultObjectAccessControlsGet' (Maybe Text) +doacgUserIp + = lens _doacgUserIp (\ s a -> s{_doacgUserIp = a}) + +-- | Name of a bucket. +doacgBucket :: Lens' DefaultObjectAccessControlsGet' Text +doacgBucket + = lens _doacgBucket (\ s a -> s{_doacgBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doacgKey :: Lens' DefaultObjectAccessControlsGet' (Maybe Text) +doacgKey = lens _doacgKey (\ s a -> s{_doacgKey = a}) + +-- | OAuth 2.0 token for the current user. +doacgOauthToken :: Lens' DefaultObjectAccessControlsGet' (Maybe Text) +doacgOauthToken + = lens _doacgOauthToken + (\ s a -> s{_doacgOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +doacgEntity :: Lens' DefaultObjectAccessControlsGet' Text +doacgEntity + = lens _doacgEntity (\ s a -> s{_doacgEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +doacgFields :: Lens' DefaultObjectAccessControlsGet' (Maybe Text) +doacgFields + = lens _doacgFields (\ s a -> s{_doacgFields = a}) + +-- | Data format for the response. +doacgAlt :: Lens' DefaultObjectAccessControlsGet' Text +doacgAlt = lens _doacgAlt (\ s a -> s{_doacgAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsGet' where + type Rs DefaultObjectAccessControlsGet' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsGet{..} + = go _doacgQuotaUser _doacgPrettyPrint _doacgUserIp + _doacgBucket + _doacgKey + _doacgOauthToken + _doacgEntity + _doacgFields + _doacgAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsGetAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Insert.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Insert.hs new file mode 100644 index 000000000..fa8813362 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Insert.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new default object ACL entry on the specified bucket. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsInsert@. +module Storage.DefaultObjectAccessControls.Insert + ( + -- * REST Resource + DefaultObjectAccessControlsInsertAPI + + -- * Creating a Request + , defaultObjectAccessControlsInsert + , DefaultObjectAccessControlsInsert + + -- * Request Lenses + , doaciQuotaUser + , doaciPrettyPrint + , doaciUserIp + , doaciBucket + , doaciKey + , doaciOauthToken + , doaciFields + , doaciAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsInsert@ which the +-- 'DefaultObjectAccessControlsInsert' request conforms to. +type DefaultObjectAccessControlsInsertAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + Post '[JSON] ObjectAccessControl + +-- | Creates a new default object ACL entry on the specified bucket. +-- +-- /See:/ 'defaultObjectAccessControlsInsert' smart constructor. +data DefaultObjectAccessControlsInsert = DefaultObjectAccessControlsInsert + { _doaciQuotaUser :: !(Maybe Text) + , _doaciPrettyPrint :: !Bool + , _doaciUserIp :: !(Maybe Text) + , _doaciBucket :: !Text + , _doaciKey :: !(Maybe Text) + , _doaciOauthToken :: !(Maybe Text) + , _doaciFields :: !(Maybe Text) + , _doaciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doaciQuotaUser' +-- +-- * 'doaciPrettyPrint' +-- +-- * 'doaciUserIp' +-- +-- * 'doaciBucket' +-- +-- * 'doaciKey' +-- +-- * 'doaciOauthToken' +-- +-- * 'doaciFields' +-- +-- * 'doaciAlt' +defaultObjectAccessControlsInsert + :: Text -- ^ 'bucket' + -> DefaultObjectAccessControlsInsert +defaultObjectAccessControlsInsert pDoaciBucket_ = + DefaultObjectAccessControlsInsert + { _doaciQuotaUser = Nothing + , _doaciPrettyPrint = True + , _doaciUserIp = Nothing + , _doaciBucket = pDoaciBucket_ + , _doaciKey = Nothing + , _doaciOauthToken = Nothing + , _doaciFields = Nothing + , _doaciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doaciQuotaUser :: Lens' DefaultObjectAccessControlsInsert' (Maybe Text) +doaciQuotaUser + = lens _doaciQuotaUser + (\ s a -> s{_doaciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +doaciPrettyPrint :: Lens' DefaultObjectAccessControlsInsert' Bool +doaciPrettyPrint + = lens _doaciPrettyPrint + (\ s a -> s{_doaciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doaciUserIp :: Lens' DefaultObjectAccessControlsInsert' (Maybe Text) +doaciUserIp + = lens _doaciUserIp (\ s a -> s{_doaciUserIp = a}) + +-- | Name of a bucket. +doaciBucket :: Lens' DefaultObjectAccessControlsInsert' Text +doaciBucket + = lens _doaciBucket (\ s a -> s{_doaciBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doaciKey :: Lens' DefaultObjectAccessControlsInsert' (Maybe Text) +doaciKey = lens _doaciKey (\ s a -> s{_doaciKey = a}) + +-- | OAuth 2.0 token for the current user. +doaciOauthToken :: Lens' DefaultObjectAccessControlsInsert' (Maybe Text) +doaciOauthToken + = lens _doaciOauthToken + (\ s a -> s{_doaciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +doaciFields :: Lens' DefaultObjectAccessControlsInsert' (Maybe Text) +doaciFields + = lens _doaciFields (\ s a -> s{_doaciFields = a}) + +-- | Data format for the response. +doaciAlt :: Lens' DefaultObjectAccessControlsInsert' Text +doaciAlt = lens _doaciAlt (\ s a -> s{_doaciAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsInsert' where + type Rs DefaultObjectAccessControlsInsert' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsInsert{..} + = go _doaciQuotaUser _doaciPrettyPrint _doaciUserIp + _doaciBucket + _doaciKey + _doaciOauthToken + _doaciFields + _doaciAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsInsertAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/List.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/List.hs new file mode 100644 index 000000000..44cd7fe86 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/List.hs @@ -0,0 +1,193 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves default object ACL entries on the specified bucket. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsList@. +module Storage.DefaultObjectAccessControls.List + ( + -- * REST Resource + DefaultObjectAccessControlsListAPI + + -- * Creating a Request + , defaultObjectAccessControlsList + , DefaultObjectAccessControlsList + + -- * Request Lenses + , doaclQuotaUser + , doaclIfMetagenerationMatch + , doaclPrettyPrint + , doaclUserIp + , doaclBucket + , doaclKey + , doaclIfMetagenerationNotMatch + , doaclOauthToken + , doaclFields + , doaclAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsList@ which the +-- 'DefaultObjectAccessControlsList' request conforms to. +type DefaultObjectAccessControlsListAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + QueryParam "ifMetagenerationMatch" Int64 :> + QueryParam "ifMetagenerationNotMatch" Int64 :> + Get '[JSON] ObjectAccessControls + +-- | Retrieves default object ACL entries on the specified bucket. +-- +-- /See:/ 'defaultObjectAccessControlsList' smart constructor. +data DefaultObjectAccessControlsList = DefaultObjectAccessControlsList + { _doaclQuotaUser :: !(Maybe Text) + , _doaclIfMetagenerationMatch :: !(Maybe Int64) + , _doaclPrettyPrint :: !Bool + , _doaclUserIp :: !(Maybe Text) + , _doaclBucket :: !Text + , _doaclKey :: !(Maybe Text) + , _doaclIfMetagenerationNotMatch :: !(Maybe Int64) + , _doaclOauthToken :: !(Maybe Text) + , _doaclFields :: !(Maybe Text) + , _doaclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doaclQuotaUser' +-- +-- * 'doaclIfMetagenerationMatch' +-- +-- * 'doaclPrettyPrint' +-- +-- * 'doaclUserIp' +-- +-- * 'doaclBucket' +-- +-- * 'doaclKey' +-- +-- * 'doaclIfMetagenerationNotMatch' +-- +-- * 'doaclOauthToken' +-- +-- * 'doaclFields' +-- +-- * 'doaclAlt' +defaultObjectAccessControlsList + :: Text -- ^ 'bucket' + -> DefaultObjectAccessControlsList +defaultObjectAccessControlsList pDoaclBucket_ = + DefaultObjectAccessControlsList + { _doaclQuotaUser = Nothing + , _doaclIfMetagenerationMatch = Nothing + , _doaclPrettyPrint = True + , _doaclUserIp = Nothing + , _doaclBucket = pDoaclBucket_ + , _doaclKey = Nothing + , _doaclIfMetagenerationNotMatch = Nothing + , _doaclOauthToken = Nothing + , _doaclFields = Nothing + , _doaclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doaclQuotaUser :: Lens' DefaultObjectAccessControlsList' (Maybe Text) +doaclQuotaUser + = lens _doaclQuotaUser + (\ s a -> s{_doaclQuotaUser = a}) + +-- | If present, only return default ACL listing if the bucket\'s current +-- metageneration matches this value. +doaclIfMetagenerationMatch :: Lens' DefaultObjectAccessControlsList' (Maybe Int64) +doaclIfMetagenerationMatch + = lens _doaclIfMetagenerationMatch + (\ s a -> s{_doaclIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +doaclPrettyPrint :: Lens' DefaultObjectAccessControlsList' Bool +doaclPrettyPrint + = lens _doaclPrettyPrint + (\ s a -> s{_doaclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doaclUserIp :: Lens' DefaultObjectAccessControlsList' (Maybe Text) +doaclUserIp + = lens _doaclUserIp (\ s a -> s{_doaclUserIp = a}) + +-- | Name of a bucket. +doaclBucket :: Lens' DefaultObjectAccessControlsList' Text +doaclBucket + = lens _doaclBucket (\ s a -> s{_doaclBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doaclKey :: Lens' DefaultObjectAccessControlsList' (Maybe Text) +doaclKey = lens _doaclKey (\ s a -> s{_doaclKey = a}) + +-- | If present, only return default ACL listing if the bucket\'s current +-- metageneration does not match the given value. +doaclIfMetagenerationNotMatch :: Lens' DefaultObjectAccessControlsList' (Maybe Int64) +doaclIfMetagenerationNotMatch + = lens _doaclIfMetagenerationNotMatch + (\ s a -> s{_doaclIfMetagenerationNotMatch = a}) + +-- | OAuth 2.0 token for the current user. +doaclOauthToken :: Lens' DefaultObjectAccessControlsList' (Maybe Text) +doaclOauthToken + = lens _doaclOauthToken + (\ s a -> s{_doaclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +doaclFields :: Lens' DefaultObjectAccessControlsList' (Maybe Text) +doaclFields + = lens _doaclFields (\ s a -> s{_doaclFields = a}) + +-- | Data format for the response. +doaclAlt :: Lens' DefaultObjectAccessControlsList' Text +doaclAlt = lens _doaclAlt (\ s a -> s{_doaclAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsList' where + type Rs DefaultObjectAccessControlsList' = + ObjectAccessControls + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsList{..} + = go _doaclQuotaUser _doaclIfMetagenerationMatch + _doaclPrettyPrint + _doaclUserIp + _doaclBucket + _doaclKey + _doaclIfMetagenerationNotMatch + _doaclOauthToken + _doaclFields + _doaclAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsListAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Patch.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Patch.hs new file mode 100644 index 000000000..66e2a6a3d --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Patch.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a default object ACL entry on the specified bucket. This method +-- supports patch semantics. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsPatch@. +module Storage.DefaultObjectAccessControls.Patch + ( + -- * REST Resource + DefaultObjectAccessControlsPatchAPI + + -- * Creating a Request + , defaultObjectAccessControlsPatch + , DefaultObjectAccessControlsPatch + + -- * Request Lenses + , doacpQuotaUser + , doacpPrettyPrint + , doacpUserIp + , doacpBucket + , doacpKey + , doacpOauthToken + , doacpEntity + , doacpFields + , doacpAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsPatch@ which the +-- 'DefaultObjectAccessControlsPatch' request conforms to. +type DefaultObjectAccessControlsPatchAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + Capture "entity" Text :> + Patch '[JSON] ObjectAccessControl + +-- | Updates a default object ACL entry on the specified bucket. This method +-- supports patch semantics. +-- +-- /See:/ 'defaultObjectAccessControlsPatch' smart constructor. +data DefaultObjectAccessControlsPatch = DefaultObjectAccessControlsPatch + { _doacpQuotaUser :: !(Maybe Text) + , _doacpPrettyPrint :: !Bool + , _doacpUserIp :: !(Maybe Text) + , _doacpBucket :: !Text + , _doacpKey :: !(Maybe Text) + , _doacpOauthToken :: !(Maybe Text) + , _doacpEntity :: !Text + , _doacpFields :: !(Maybe Text) + , _doacpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doacpQuotaUser' +-- +-- * 'doacpPrettyPrint' +-- +-- * 'doacpUserIp' +-- +-- * 'doacpBucket' +-- +-- * 'doacpKey' +-- +-- * 'doacpOauthToken' +-- +-- * 'doacpEntity' +-- +-- * 'doacpFields' +-- +-- * 'doacpAlt' +defaultObjectAccessControlsPatch + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> DefaultObjectAccessControlsPatch +defaultObjectAccessControlsPatch pDoacpBucket_ pDoacpEntity_ = + DefaultObjectAccessControlsPatch + { _doacpQuotaUser = Nothing + , _doacpPrettyPrint = True + , _doacpUserIp = Nothing + , _doacpBucket = pDoacpBucket_ + , _doacpKey = Nothing + , _doacpOauthToken = Nothing + , _doacpEntity = pDoacpEntity_ + , _doacpFields = Nothing + , _doacpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doacpQuotaUser :: Lens' DefaultObjectAccessControlsPatch' (Maybe Text) +doacpQuotaUser + = lens _doacpQuotaUser + (\ s a -> s{_doacpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +doacpPrettyPrint :: Lens' DefaultObjectAccessControlsPatch' Bool +doacpPrettyPrint + = lens _doacpPrettyPrint + (\ s a -> s{_doacpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doacpUserIp :: Lens' DefaultObjectAccessControlsPatch' (Maybe Text) +doacpUserIp + = lens _doacpUserIp (\ s a -> s{_doacpUserIp = a}) + +-- | Name of a bucket. +doacpBucket :: Lens' DefaultObjectAccessControlsPatch' Text +doacpBucket + = lens _doacpBucket (\ s a -> s{_doacpBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doacpKey :: Lens' DefaultObjectAccessControlsPatch' (Maybe Text) +doacpKey = lens _doacpKey (\ s a -> s{_doacpKey = a}) + +-- | OAuth 2.0 token for the current user. +doacpOauthToken :: Lens' DefaultObjectAccessControlsPatch' (Maybe Text) +doacpOauthToken + = lens _doacpOauthToken + (\ s a -> s{_doacpOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +doacpEntity :: Lens' DefaultObjectAccessControlsPatch' Text +doacpEntity + = lens _doacpEntity (\ s a -> s{_doacpEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +doacpFields :: Lens' DefaultObjectAccessControlsPatch' (Maybe Text) +doacpFields + = lens _doacpFields (\ s a -> s{_doacpFields = a}) + +-- | Data format for the response. +doacpAlt :: Lens' DefaultObjectAccessControlsPatch' Text +doacpAlt = lens _doacpAlt (\ s a -> s{_doacpAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsPatch' where + type Rs DefaultObjectAccessControlsPatch' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsPatch{..} + = go _doacpQuotaUser _doacpPrettyPrint _doacpUserIp + _doacpBucket + _doacpKey + _doacpOauthToken + _doacpEntity + _doacpFields + _doacpAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsPatchAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Update.hs b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Update.hs new file mode 100644 index 000000000..87ce17217 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Update.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.DefaultObjectAccessControls.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a default object ACL entry on the specified bucket. +-- +-- /See:/ for @StorageDefaultObjectAccessControlsUpdate@. +module Storage.DefaultObjectAccessControls.Update + ( + -- * REST Resource + DefaultObjectAccessControlsUpdateAPI + + -- * Creating a Request + , defaultObjectAccessControlsUpdate + , DefaultObjectAccessControlsUpdate + + -- * Request Lenses + , doacuQuotaUser + , doacuPrettyPrint + , doacuUserIp + , doacuBucket + , doacuKey + , doacuOauthToken + , doacuEntity + , doacuFields + , doacuAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageDefaultObjectAccessControlsUpdate@ which the +-- 'DefaultObjectAccessControlsUpdate' request conforms to. +type DefaultObjectAccessControlsUpdateAPI = + "b" :> + Capture "bucket" Text :> + "defaultObjectAcl" :> + Capture "entity" Text :> + Put '[JSON] ObjectAccessControl + +-- | Updates a default object ACL entry on the specified bucket. +-- +-- /See:/ 'defaultObjectAccessControlsUpdate' smart constructor. +data DefaultObjectAccessControlsUpdate = DefaultObjectAccessControlsUpdate + { _doacuQuotaUser :: !(Maybe Text) + , _doacuPrettyPrint :: !Bool + , _doacuUserIp :: !(Maybe Text) + , _doacuBucket :: !Text + , _doacuKey :: !(Maybe Text) + , _doacuOauthToken :: !(Maybe Text) + , _doacuEntity :: !Text + , _doacuFields :: !(Maybe Text) + , _doacuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DefaultObjectAccessControlsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'doacuQuotaUser' +-- +-- * 'doacuPrettyPrint' +-- +-- * 'doacuUserIp' +-- +-- * 'doacuBucket' +-- +-- * 'doacuKey' +-- +-- * 'doacuOauthToken' +-- +-- * 'doacuEntity' +-- +-- * 'doacuFields' +-- +-- * 'doacuAlt' +defaultObjectAccessControlsUpdate + :: Text -- ^ 'bucket' + -> Text -- ^ 'entity' + -> DefaultObjectAccessControlsUpdate +defaultObjectAccessControlsUpdate pDoacuBucket_ pDoacuEntity_ = + DefaultObjectAccessControlsUpdate + { _doacuQuotaUser = Nothing + , _doacuPrettyPrint = True + , _doacuUserIp = Nothing + , _doacuBucket = pDoacuBucket_ + , _doacuKey = Nothing + , _doacuOauthToken = Nothing + , _doacuEntity = pDoacuEntity_ + , _doacuFields = Nothing + , _doacuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +doacuQuotaUser :: Lens' DefaultObjectAccessControlsUpdate' (Maybe Text) +doacuQuotaUser + = lens _doacuQuotaUser + (\ s a -> s{_doacuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +doacuPrettyPrint :: Lens' DefaultObjectAccessControlsUpdate' Bool +doacuPrettyPrint + = lens _doacuPrettyPrint + (\ s a -> s{_doacuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +doacuUserIp :: Lens' DefaultObjectAccessControlsUpdate' (Maybe Text) +doacuUserIp + = lens _doacuUserIp (\ s a -> s{_doacuUserIp = a}) + +-- | Name of a bucket. +doacuBucket :: Lens' DefaultObjectAccessControlsUpdate' Text +doacuBucket + = lens _doacuBucket (\ s a -> s{_doacuBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +doacuKey :: Lens' DefaultObjectAccessControlsUpdate' (Maybe Text) +doacuKey = lens _doacuKey (\ s a -> s{_doacuKey = a}) + +-- | OAuth 2.0 token for the current user. +doacuOauthToken :: Lens' DefaultObjectAccessControlsUpdate' (Maybe Text) +doacuOauthToken + = lens _doacuOauthToken + (\ s a -> s{_doacuOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +doacuEntity :: Lens' DefaultObjectAccessControlsUpdate' Text +doacuEntity + = lens _doacuEntity (\ s a -> s{_doacuEntity = a}) + +-- | Selector specifying which fields to include in a partial response. +doacuFields :: Lens' DefaultObjectAccessControlsUpdate' (Maybe Text) +doacuFields + = lens _doacuFields (\ s a -> s{_doacuFields = a}) + +-- | Data format for the response. +doacuAlt :: Lens' DefaultObjectAccessControlsUpdate' Text +doacuAlt = lens _doacuAlt (\ s a -> s{_doacuAlt = a}) + +instance GoogleRequest + DefaultObjectAccessControlsUpdate' where + type Rs DefaultObjectAccessControlsUpdate' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u + DefaultObjectAccessControlsUpdate{..} + = go _doacuQuotaUser _doacuPrettyPrint _doacuUserIp + _doacuBucket + _doacuKey + _doacuOauthToken + _doacuEntity + _doacuFields + _doacuAlt + where go + = clientWithRoute + (Proxy :: Proxy DefaultObjectAccessControlsUpdateAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Delete.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Delete.hs new file mode 100644 index 000000000..d0ad7e128 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Delete.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Permanently deletes the ACL entry for the specified entity on the +-- specified object. +-- +-- /See:/ for @StorageObjectAccessControlsDelete@. +module Storage.ObjectAccessControls.Delete + ( + -- * REST Resource + ObjectAccessControlsDeleteAPI + + -- * Creating a Request + , objectAccessControlsDelete + , ObjectAccessControlsDelete + + -- * Request Lenses + , oacdQuotaUser + , oacdPrettyPrint + , oacdUserIp + , oacdBucket + , oacdKey + , oacdObject + , oacdOauthToken + , oacdEntity + , oacdGeneration + , oacdFields + , oacdAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsDelete@ which the +-- 'ObjectAccessControlsDelete' request conforms to. +type ObjectAccessControlsDeleteAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + Capture "entity" Text :> + QueryParam "generation" Word64 :> Delete '[JSON] () + +-- | Permanently deletes the ACL entry for the specified entity on the +-- specified object. +-- +-- /See:/ 'objectAccessControlsDelete' smart constructor. +data ObjectAccessControlsDelete = ObjectAccessControlsDelete + { _oacdQuotaUser :: !(Maybe Text) + , _oacdPrettyPrint :: !Bool + , _oacdUserIp :: !(Maybe Text) + , _oacdBucket :: !Text + , _oacdKey :: !(Maybe Text) + , _oacdObject :: !Text + , _oacdOauthToken :: !(Maybe Text) + , _oacdEntity :: !Text + , _oacdGeneration :: !(Maybe Word64) + , _oacdFields :: !(Maybe Text) + , _oacdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacdQuotaUser' +-- +-- * 'oacdPrettyPrint' +-- +-- * 'oacdUserIp' +-- +-- * 'oacdBucket' +-- +-- * 'oacdKey' +-- +-- * 'oacdObject' +-- +-- * 'oacdOauthToken' +-- +-- * 'oacdEntity' +-- +-- * 'oacdGeneration' +-- +-- * 'oacdFields' +-- +-- * 'oacdAlt' +objectAccessControlsDelete + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> Text -- ^ 'entity' + -> ObjectAccessControlsDelete +objectAccessControlsDelete pOacdBucket_ pOacdObject_ pOacdEntity_ = + ObjectAccessControlsDelete + { _oacdQuotaUser = Nothing + , _oacdPrettyPrint = True + , _oacdUserIp = Nothing + , _oacdBucket = pOacdBucket_ + , _oacdKey = Nothing + , _oacdObject = pOacdObject_ + , _oacdOauthToken = Nothing + , _oacdEntity = pOacdEntity_ + , _oacdGeneration = Nothing + , _oacdFields = Nothing + , _oacdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oacdQuotaUser :: Lens' ObjectAccessControlsDelete' (Maybe Text) +oacdQuotaUser + = lens _oacdQuotaUser + (\ s a -> s{_oacdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oacdPrettyPrint :: Lens' ObjectAccessControlsDelete' Bool +oacdPrettyPrint + = lens _oacdPrettyPrint + (\ s a -> s{_oacdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oacdUserIp :: Lens' ObjectAccessControlsDelete' (Maybe Text) +oacdUserIp + = lens _oacdUserIp (\ s a -> s{_oacdUserIp = a}) + +-- | Name of a bucket. +oacdBucket :: Lens' ObjectAccessControlsDelete' Text +oacdBucket + = lens _oacdBucket (\ s a -> s{_oacdBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oacdKey :: Lens' ObjectAccessControlsDelete' (Maybe Text) +oacdKey = lens _oacdKey (\ s a -> s{_oacdKey = a}) + +-- | Name of the object. +oacdObject :: Lens' ObjectAccessControlsDelete' Text +oacdObject + = lens _oacdObject (\ s a -> s{_oacdObject = a}) + +-- | OAuth 2.0 token for the current user. +oacdOauthToken :: Lens' ObjectAccessControlsDelete' (Maybe Text) +oacdOauthToken + = lens _oacdOauthToken + (\ s a -> s{_oacdOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +oacdEntity :: Lens' ObjectAccessControlsDelete' Text +oacdEntity + = lens _oacdEntity (\ s a -> s{_oacdEntity = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oacdGeneration :: Lens' ObjectAccessControlsDelete' (Maybe Word64) +oacdGeneration + = lens _oacdGeneration + (\ s a -> s{_oacdGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oacdFields :: Lens' ObjectAccessControlsDelete' (Maybe Text) +oacdFields + = lens _oacdFields (\ s a -> s{_oacdFields = a}) + +-- | Data format for the response. +oacdAlt :: Lens' ObjectAccessControlsDelete' Text +oacdAlt = lens _oacdAlt (\ s a -> s{_oacdAlt = a}) + +instance GoogleRequest ObjectAccessControlsDelete' + where + type Rs ObjectAccessControlsDelete' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsDelete{..} + = go _oacdQuotaUser _oacdPrettyPrint _oacdUserIp + _oacdBucket + _oacdKey + _oacdObject + _oacdOauthToken + _oacdEntity + _oacdGeneration + _oacdFields + _oacdAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsDeleteAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Get.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Get.hs new file mode 100644 index 000000000..93672cfa3 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Get.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns the ACL entry for the specified entity on the specified object. +-- +-- /See:/ for @StorageObjectAccessControlsGet@. +module Storage.ObjectAccessControls.Get + ( + -- * REST Resource + ObjectAccessControlsGetAPI + + -- * Creating a Request + , objectAccessControlsGet + , ObjectAccessControlsGet + + -- * Request Lenses + , oacgQuotaUser + , oacgPrettyPrint + , oacgUserIp + , oacgBucket + , oacgKey + , oacgObject + , oacgOauthToken + , oacgEntity + , oacgGeneration + , oacgFields + , oacgAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsGet@ which the +-- 'ObjectAccessControlsGet' request conforms to. +type ObjectAccessControlsGetAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + Capture "entity" Text :> + QueryParam "generation" Word64 :> + Get '[JSON] ObjectAccessControl + +-- | Returns the ACL entry for the specified entity on the specified object. +-- +-- /See:/ 'objectAccessControlsGet' smart constructor. +data ObjectAccessControlsGet = ObjectAccessControlsGet + { _oacgQuotaUser :: !(Maybe Text) + , _oacgPrettyPrint :: !Bool + , _oacgUserIp :: !(Maybe Text) + , _oacgBucket :: !Text + , _oacgKey :: !(Maybe Text) + , _oacgObject :: !Text + , _oacgOauthToken :: !(Maybe Text) + , _oacgEntity :: !Text + , _oacgGeneration :: !(Maybe Word64) + , _oacgFields :: !(Maybe Text) + , _oacgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacgQuotaUser' +-- +-- * 'oacgPrettyPrint' +-- +-- * 'oacgUserIp' +-- +-- * 'oacgBucket' +-- +-- * 'oacgKey' +-- +-- * 'oacgObject' +-- +-- * 'oacgOauthToken' +-- +-- * 'oacgEntity' +-- +-- * 'oacgGeneration' +-- +-- * 'oacgFields' +-- +-- * 'oacgAlt' +objectAccessControlsGet + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> Text -- ^ 'entity' + -> ObjectAccessControlsGet +objectAccessControlsGet pOacgBucket_ pOacgObject_ pOacgEntity_ = + ObjectAccessControlsGet + { _oacgQuotaUser = Nothing + , _oacgPrettyPrint = True + , _oacgUserIp = Nothing + , _oacgBucket = pOacgBucket_ + , _oacgKey = Nothing + , _oacgObject = pOacgObject_ + , _oacgOauthToken = Nothing + , _oacgEntity = pOacgEntity_ + , _oacgGeneration = Nothing + , _oacgFields = Nothing + , _oacgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oacgQuotaUser :: Lens' ObjectAccessControlsGet' (Maybe Text) +oacgQuotaUser + = lens _oacgQuotaUser + (\ s a -> s{_oacgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oacgPrettyPrint :: Lens' ObjectAccessControlsGet' Bool +oacgPrettyPrint + = lens _oacgPrettyPrint + (\ s a -> s{_oacgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oacgUserIp :: Lens' ObjectAccessControlsGet' (Maybe Text) +oacgUserIp + = lens _oacgUserIp (\ s a -> s{_oacgUserIp = a}) + +-- | Name of a bucket. +oacgBucket :: Lens' ObjectAccessControlsGet' Text +oacgBucket + = lens _oacgBucket (\ s a -> s{_oacgBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oacgKey :: Lens' ObjectAccessControlsGet' (Maybe Text) +oacgKey = lens _oacgKey (\ s a -> s{_oacgKey = a}) + +-- | Name of the object. +oacgObject :: Lens' ObjectAccessControlsGet' Text +oacgObject + = lens _oacgObject (\ s a -> s{_oacgObject = a}) + +-- | OAuth 2.0 token for the current user. +oacgOauthToken :: Lens' ObjectAccessControlsGet' (Maybe Text) +oacgOauthToken + = lens _oacgOauthToken + (\ s a -> s{_oacgOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +oacgEntity :: Lens' ObjectAccessControlsGet' Text +oacgEntity + = lens _oacgEntity (\ s a -> s{_oacgEntity = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oacgGeneration :: Lens' ObjectAccessControlsGet' (Maybe Word64) +oacgGeneration + = lens _oacgGeneration + (\ s a -> s{_oacgGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oacgFields :: Lens' ObjectAccessControlsGet' (Maybe Text) +oacgFields + = lens _oacgFields (\ s a -> s{_oacgFields = a}) + +-- | Data format for the response. +oacgAlt :: Lens' ObjectAccessControlsGet' Text +oacgAlt = lens _oacgAlt (\ s a -> s{_oacgAlt = a}) + +instance GoogleRequest ObjectAccessControlsGet' where + type Rs ObjectAccessControlsGet' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsGet{..} + = go _oacgQuotaUser _oacgPrettyPrint _oacgUserIp + _oacgBucket + _oacgKey + _oacgObject + _oacgOauthToken + _oacgEntity + _oacgGeneration + _oacgFields + _oacgAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsGetAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Insert.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Insert.hs new file mode 100644 index 000000000..c6a653647 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Insert.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new ACL entry on the specified object. +-- +-- /See:/ for @StorageObjectAccessControlsInsert@. +module Storage.ObjectAccessControls.Insert + ( + -- * REST Resource + ObjectAccessControlsInsertAPI + + -- * Creating a Request + , objectAccessControlsInsert + , ObjectAccessControlsInsert + + -- * Request Lenses + , oaciQuotaUser + , oaciPrettyPrint + , oaciUserIp + , oaciBucket + , oaciKey + , oaciObject + , oaciOauthToken + , oaciGeneration + , oaciFields + , oaciAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsInsert@ which the +-- 'ObjectAccessControlsInsert' request conforms to. +type ObjectAccessControlsInsertAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + QueryParam "generation" Word64 :> + Post '[JSON] ObjectAccessControl + +-- | Creates a new ACL entry on the specified object. +-- +-- /See:/ 'objectAccessControlsInsert' smart constructor. +data ObjectAccessControlsInsert = ObjectAccessControlsInsert + { _oaciQuotaUser :: !(Maybe Text) + , _oaciPrettyPrint :: !Bool + , _oaciUserIp :: !(Maybe Text) + , _oaciBucket :: !Text + , _oaciKey :: !(Maybe Text) + , _oaciObject :: !Text + , _oaciOauthToken :: !(Maybe Text) + , _oaciGeneration :: !(Maybe Word64) + , _oaciFields :: !(Maybe Text) + , _oaciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaciQuotaUser' +-- +-- * 'oaciPrettyPrint' +-- +-- * 'oaciUserIp' +-- +-- * 'oaciBucket' +-- +-- * 'oaciKey' +-- +-- * 'oaciObject' +-- +-- * 'oaciOauthToken' +-- +-- * 'oaciGeneration' +-- +-- * 'oaciFields' +-- +-- * 'oaciAlt' +objectAccessControlsInsert + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectAccessControlsInsert +objectAccessControlsInsert pOaciBucket_ pOaciObject_ = + ObjectAccessControlsInsert + { _oaciQuotaUser = Nothing + , _oaciPrettyPrint = True + , _oaciUserIp = Nothing + , _oaciBucket = pOaciBucket_ + , _oaciKey = Nothing + , _oaciObject = pOaciObject_ + , _oaciOauthToken = Nothing + , _oaciGeneration = Nothing + , _oaciFields = Nothing + , _oaciAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oaciQuotaUser :: Lens' ObjectAccessControlsInsert' (Maybe Text) +oaciQuotaUser + = lens _oaciQuotaUser + (\ s a -> s{_oaciQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oaciPrettyPrint :: Lens' ObjectAccessControlsInsert' Bool +oaciPrettyPrint + = lens _oaciPrettyPrint + (\ s a -> s{_oaciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oaciUserIp :: Lens' ObjectAccessControlsInsert' (Maybe Text) +oaciUserIp + = lens _oaciUserIp (\ s a -> s{_oaciUserIp = a}) + +-- | Name of a bucket. +oaciBucket :: Lens' ObjectAccessControlsInsert' Text +oaciBucket + = lens _oaciBucket (\ s a -> s{_oaciBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oaciKey :: Lens' ObjectAccessControlsInsert' (Maybe Text) +oaciKey = lens _oaciKey (\ s a -> s{_oaciKey = a}) + +-- | Name of the object. +oaciObject :: Lens' ObjectAccessControlsInsert' Text +oaciObject + = lens _oaciObject (\ s a -> s{_oaciObject = a}) + +-- | OAuth 2.0 token for the current user. +oaciOauthToken :: Lens' ObjectAccessControlsInsert' (Maybe Text) +oaciOauthToken + = lens _oaciOauthToken + (\ s a -> s{_oaciOauthToken = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oaciGeneration :: Lens' ObjectAccessControlsInsert' (Maybe Word64) +oaciGeneration + = lens _oaciGeneration + (\ s a -> s{_oaciGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oaciFields :: Lens' ObjectAccessControlsInsert' (Maybe Text) +oaciFields + = lens _oaciFields (\ s a -> s{_oaciFields = a}) + +-- | Data format for the response. +oaciAlt :: Lens' ObjectAccessControlsInsert' Text +oaciAlt = lens _oaciAlt (\ s a -> s{_oaciAlt = a}) + +instance GoogleRequest ObjectAccessControlsInsert' + where + type Rs ObjectAccessControlsInsert' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsInsert{..} + = go _oaciQuotaUser _oaciPrettyPrint _oaciUserIp + _oaciBucket + _oaciKey + _oaciObject + _oaciOauthToken + _oaciGeneration + _oaciFields + _oaciAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsInsertAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/List.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/List.hs new file mode 100644 index 000000000..d5c505295 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/List.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves ACL entries on the specified object. +-- +-- /See:/ for @StorageObjectAccessControlsList@. +module Storage.ObjectAccessControls.List + ( + -- * REST Resource + ObjectAccessControlsListAPI + + -- * Creating a Request + , objectAccessControlsList + , ObjectAccessControlsList + + -- * Request Lenses + , oaclQuotaUser + , oaclPrettyPrint + , oaclUserIp + , oaclBucket + , oaclKey + , oaclObject + , oaclOauthToken + , oaclGeneration + , oaclFields + , oaclAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsList@ which the +-- 'ObjectAccessControlsList' request conforms to. +type ObjectAccessControlsListAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + QueryParam "generation" Word64 :> + Get '[JSON] ObjectAccessControls + +-- | Retrieves ACL entries on the specified object. +-- +-- /See:/ 'objectAccessControlsList' smart constructor. +data ObjectAccessControlsList = ObjectAccessControlsList + { _oaclQuotaUser :: !(Maybe Text) + , _oaclPrettyPrint :: !Bool + , _oaclUserIp :: !(Maybe Text) + , _oaclBucket :: !Text + , _oaclKey :: !(Maybe Text) + , _oaclObject :: !Text + , _oaclOauthToken :: !(Maybe Text) + , _oaclGeneration :: !(Maybe Word64) + , _oaclFields :: !(Maybe Text) + , _oaclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oaclQuotaUser' +-- +-- * 'oaclPrettyPrint' +-- +-- * 'oaclUserIp' +-- +-- * 'oaclBucket' +-- +-- * 'oaclKey' +-- +-- * 'oaclObject' +-- +-- * 'oaclOauthToken' +-- +-- * 'oaclGeneration' +-- +-- * 'oaclFields' +-- +-- * 'oaclAlt' +objectAccessControlsList + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectAccessControlsList +objectAccessControlsList pOaclBucket_ pOaclObject_ = + ObjectAccessControlsList + { _oaclQuotaUser = Nothing + , _oaclPrettyPrint = True + , _oaclUserIp = Nothing + , _oaclBucket = pOaclBucket_ + , _oaclKey = Nothing + , _oaclObject = pOaclObject_ + , _oaclOauthToken = Nothing + , _oaclGeneration = Nothing + , _oaclFields = Nothing + , _oaclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oaclQuotaUser :: Lens' ObjectAccessControlsList' (Maybe Text) +oaclQuotaUser + = lens _oaclQuotaUser + (\ s a -> s{_oaclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oaclPrettyPrint :: Lens' ObjectAccessControlsList' Bool +oaclPrettyPrint + = lens _oaclPrettyPrint + (\ s a -> s{_oaclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oaclUserIp :: Lens' ObjectAccessControlsList' (Maybe Text) +oaclUserIp + = lens _oaclUserIp (\ s a -> s{_oaclUserIp = a}) + +-- | Name of a bucket. +oaclBucket :: Lens' ObjectAccessControlsList' Text +oaclBucket + = lens _oaclBucket (\ s a -> s{_oaclBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oaclKey :: Lens' ObjectAccessControlsList' (Maybe Text) +oaclKey = lens _oaclKey (\ s a -> s{_oaclKey = a}) + +-- | Name of the object. +oaclObject :: Lens' ObjectAccessControlsList' Text +oaclObject + = lens _oaclObject (\ s a -> s{_oaclObject = a}) + +-- | OAuth 2.0 token for the current user. +oaclOauthToken :: Lens' ObjectAccessControlsList' (Maybe Text) +oaclOauthToken + = lens _oaclOauthToken + (\ s a -> s{_oaclOauthToken = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oaclGeneration :: Lens' ObjectAccessControlsList' (Maybe Word64) +oaclGeneration + = lens _oaclGeneration + (\ s a -> s{_oaclGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oaclFields :: Lens' ObjectAccessControlsList' (Maybe Text) +oaclFields + = lens _oaclFields (\ s a -> s{_oaclFields = a}) + +-- | Data format for the response. +oaclAlt :: Lens' ObjectAccessControlsList' Text +oaclAlt = lens _oaclAlt (\ s a -> s{_oaclAlt = a}) + +instance GoogleRequest ObjectAccessControlsList' + where + type Rs ObjectAccessControlsList' = + ObjectAccessControls + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsList{..} + = go _oaclQuotaUser _oaclPrettyPrint _oaclUserIp + _oaclBucket + _oaclKey + _oaclObject + _oaclOauthToken + _oaclGeneration + _oaclFields + _oaclAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsListAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Patch.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Patch.hs new file mode 100644 index 000000000..9888d209c --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Patch.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an ACL entry on the specified object. This method supports patch +-- semantics. +-- +-- /See:/ for @StorageObjectAccessControlsPatch@. +module Storage.ObjectAccessControls.Patch + ( + -- * REST Resource + ObjectAccessControlsPatchAPI + + -- * Creating a Request + , objectAccessControlsPatch + , ObjectAccessControlsPatch + + -- * Request Lenses + , oacpQuotaUser + , oacpPrettyPrint + , oacpUserIp + , oacpBucket + , oacpKey + , oacpObject + , oacpOauthToken + , oacpEntity + , oacpGeneration + , oacpFields + , oacpAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsPatch@ which the +-- 'ObjectAccessControlsPatch' request conforms to. +type ObjectAccessControlsPatchAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + Capture "entity" Text :> + QueryParam "generation" Word64 :> + Patch '[JSON] ObjectAccessControl + +-- | Updates an ACL entry on the specified object. This method supports patch +-- semantics. +-- +-- /See:/ 'objectAccessControlsPatch' smart constructor. +data ObjectAccessControlsPatch = ObjectAccessControlsPatch + { _oacpQuotaUser :: !(Maybe Text) + , _oacpPrettyPrint :: !Bool + , _oacpUserIp :: !(Maybe Text) + , _oacpBucket :: !Text + , _oacpKey :: !(Maybe Text) + , _oacpObject :: !Text + , _oacpOauthToken :: !(Maybe Text) + , _oacpEntity :: !Text + , _oacpGeneration :: !(Maybe Word64) + , _oacpFields :: !(Maybe Text) + , _oacpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacpQuotaUser' +-- +-- * 'oacpPrettyPrint' +-- +-- * 'oacpUserIp' +-- +-- * 'oacpBucket' +-- +-- * 'oacpKey' +-- +-- * 'oacpObject' +-- +-- * 'oacpOauthToken' +-- +-- * 'oacpEntity' +-- +-- * 'oacpGeneration' +-- +-- * 'oacpFields' +-- +-- * 'oacpAlt' +objectAccessControlsPatch + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> Text -- ^ 'entity' + -> ObjectAccessControlsPatch +objectAccessControlsPatch pOacpBucket_ pOacpObject_ pOacpEntity_ = + ObjectAccessControlsPatch + { _oacpQuotaUser = Nothing + , _oacpPrettyPrint = True + , _oacpUserIp = Nothing + , _oacpBucket = pOacpBucket_ + , _oacpKey = Nothing + , _oacpObject = pOacpObject_ + , _oacpOauthToken = Nothing + , _oacpEntity = pOacpEntity_ + , _oacpGeneration = Nothing + , _oacpFields = Nothing + , _oacpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oacpQuotaUser :: Lens' ObjectAccessControlsPatch' (Maybe Text) +oacpQuotaUser + = lens _oacpQuotaUser + (\ s a -> s{_oacpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oacpPrettyPrint :: Lens' ObjectAccessControlsPatch' Bool +oacpPrettyPrint + = lens _oacpPrettyPrint + (\ s a -> s{_oacpPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oacpUserIp :: Lens' ObjectAccessControlsPatch' (Maybe Text) +oacpUserIp + = lens _oacpUserIp (\ s a -> s{_oacpUserIp = a}) + +-- | Name of a bucket. +oacpBucket :: Lens' ObjectAccessControlsPatch' Text +oacpBucket + = lens _oacpBucket (\ s a -> s{_oacpBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oacpKey :: Lens' ObjectAccessControlsPatch' (Maybe Text) +oacpKey = lens _oacpKey (\ s a -> s{_oacpKey = a}) + +-- | Name of the object. +oacpObject :: Lens' ObjectAccessControlsPatch' Text +oacpObject + = lens _oacpObject (\ s a -> s{_oacpObject = a}) + +-- | OAuth 2.0 token for the current user. +oacpOauthToken :: Lens' ObjectAccessControlsPatch' (Maybe Text) +oacpOauthToken + = lens _oacpOauthToken + (\ s a -> s{_oacpOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +oacpEntity :: Lens' ObjectAccessControlsPatch' Text +oacpEntity + = lens _oacpEntity (\ s a -> s{_oacpEntity = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oacpGeneration :: Lens' ObjectAccessControlsPatch' (Maybe Word64) +oacpGeneration + = lens _oacpGeneration + (\ s a -> s{_oacpGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oacpFields :: Lens' ObjectAccessControlsPatch' (Maybe Text) +oacpFields + = lens _oacpFields (\ s a -> s{_oacpFields = a}) + +-- | Data format for the response. +oacpAlt :: Lens' ObjectAccessControlsPatch' Text +oacpAlt = lens _oacpAlt (\ s a -> s{_oacpAlt = a}) + +instance GoogleRequest ObjectAccessControlsPatch' + where + type Rs ObjectAccessControlsPatch' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsPatch{..} + = go _oacpQuotaUser _oacpPrettyPrint _oacpUserIp + _oacpBucket + _oacpKey + _oacpObject + _oacpOauthToken + _oacpEntity + _oacpGeneration + _oacpFields + _oacpAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsPatchAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Update.hs b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Update.hs new file mode 100644 index 000000000..210b7c929 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/ObjectAccessControls/Update.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.ObjectAccessControls.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates an ACL entry on the specified object. +-- +-- /See:/ for @StorageObjectAccessControlsUpdate@. +module Storage.ObjectAccessControls.Update + ( + -- * REST Resource + ObjectAccessControlsUpdateAPI + + -- * Creating a Request + , objectAccessControlsUpdate + , ObjectAccessControlsUpdate + + -- * Request Lenses + , oacuQuotaUser + , oacuPrettyPrint + , oacuUserIp + , oacuBucket + , oacuKey + , oacuObject + , oacuOauthToken + , oacuEntity + , oacuGeneration + , oacuFields + , oacuAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectAccessControlsUpdate@ which the +-- 'ObjectAccessControlsUpdate' request conforms to. +type ObjectAccessControlsUpdateAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + "acl" :> + Capture "entity" Text :> + QueryParam "generation" Word64 :> + Put '[JSON] ObjectAccessControl + +-- | Updates an ACL entry on the specified object. +-- +-- /See:/ 'objectAccessControlsUpdate' smart constructor. +data ObjectAccessControlsUpdate = ObjectAccessControlsUpdate + { _oacuQuotaUser :: !(Maybe Text) + , _oacuPrettyPrint :: !Bool + , _oacuUserIp :: !(Maybe Text) + , _oacuBucket :: !Text + , _oacuKey :: !(Maybe Text) + , _oacuObject :: !Text + , _oacuOauthToken :: !(Maybe Text) + , _oacuEntity :: !Text + , _oacuGeneration :: !(Maybe Word64) + , _oacuFields :: !(Maybe Text) + , _oacuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControlsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacuQuotaUser' +-- +-- * 'oacuPrettyPrint' +-- +-- * 'oacuUserIp' +-- +-- * 'oacuBucket' +-- +-- * 'oacuKey' +-- +-- * 'oacuObject' +-- +-- * 'oacuOauthToken' +-- +-- * 'oacuEntity' +-- +-- * 'oacuGeneration' +-- +-- * 'oacuFields' +-- +-- * 'oacuAlt' +objectAccessControlsUpdate + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> Text -- ^ 'entity' + -> ObjectAccessControlsUpdate +objectAccessControlsUpdate pOacuBucket_ pOacuObject_ pOacuEntity_ = + ObjectAccessControlsUpdate + { _oacuQuotaUser = Nothing + , _oacuPrettyPrint = True + , _oacuUserIp = Nothing + , _oacuBucket = pOacuBucket_ + , _oacuKey = Nothing + , _oacuObject = pOacuObject_ + , _oacuOauthToken = Nothing + , _oacuEntity = pOacuEntity_ + , _oacuGeneration = Nothing + , _oacuFields = Nothing + , _oacuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oacuQuotaUser :: Lens' ObjectAccessControlsUpdate' (Maybe Text) +oacuQuotaUser + = lens _oacuQuotaUser + (\ s a -> s{_oacuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +oacuPrettyPrint :: Lens' ObjectAccessControlsUpdate' Bool +oacuPrettyPrint + = lens _oacuPrettyPrint + (\ s a -> s{_oacuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oacuUserIp :: Lens' ObjectAccessControlsUpdate' (Maybe Text) +oacuUserIp + = lens _oacuUserIp (\ s a -> s{_oacuUserIp = a}) + +-- | Name of a bucket. +oacuBucket :: Lens' ObjectAccessControlsUpdate' Text +oacuBucket + = lens _oacuBucket (\ s a -> s{_oacuBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oacuKey :: Lens' ObjectAccessControlsUpdate' (Maybe Text) +oacuKey = lens _oacuKey (\ s a -> s{_oacuKey = a}) + +-- | Name of the object. +oacuObject :: Lens' ObjectAccessControlsUpdate' Text +oacuObject + = lens _oacuObject (\ s a -> s{_oacuObject = a}) + +-- | OAuth 2.0 token for the current user. +oacuOauthToken :: Lens' ObjectAccessControlsUpdate' (Maybe Text) +oacuOauthToken + = lens _oacuOauthToken + (\ s a -> s{_oacuOauthToken = a}) + +-- | The entity holding the permission. Can be user-userId, +-- user-emailAddress, group-groupId, group-emailAddress, allUsers, or +-- allAuthenticatedUsers. +oacuEntity :: Lens' ObjectAccessControlsUpdate' Text +oacuEntity + = lens _oacuEntity (\ s a -> s{_oacuEntity = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +oacuGeneration :: Lens' ObjectAccessControlsUpdate' (Maybe Word64) +oacuGeneration + = lens _oacuGeneration + (\ s a -> s{_oacuGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +oacuFields :: Lens' ObjectAccessControlsUpdate' (Maybe Text) +oacuFields + = lens _oacuFields (\ s a -> s{_oacuFields = a}) + +-- | Data format for the response. +oacuAlt :: Lens' ObjectAccessControlsUpdate' Text +oacuAlt = lens _oacuAlt (\ s a -> s{_oacuAlt = a}) + +instance GoogleRequest ObjectAccessControlsUpdate' + where + type Rs ObjectAccessControlsUpdate' = + ObjectAccessControl + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectAccessControlsUpdate{..} + = go _oacuQuotaUser _oacuPrettyPrint _oacuUserIp + _oacuBucket + _oacuKey + _oacuObject + _oacuOauthToken + _oacuEntity + _oacuGeneration + _oacuFields + _oacuAlt + where go + = clientWithRoute + (Proxy :: Proxy ObjectAccessControlsUpdateAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Compose.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Compose.hs new file mode 100644 index 000000000..67efc871c --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Compose.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Compose +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Concatenates a list of existing objects into a new object in the same +-- bucket. +-- +-- /See:/ for @StorageObjectsCompose@. +module Storage.Objects.Compose + ( + -- * REST Resource + ObjectsComposeAPI + + -- * Creating a Request + , objectsCompose + , ObjectsCompose + + -- * Request Lenses + , oQuotaUser + , oIfMetagenerationMatch + , oPrettyPrint + , oIfGenerationMatch + , oUserIp + , oKey + , oDestinationBucket + , oOauthToken + , oFields + , oAlt + , oDestinationObject + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsCompose@ which the +-- 'ObjectsCompose' request conforms to. +type ObjectsComposeAPI = + "b" :> + Capture "destinationBucket" Text :> + "o" :> + Capture "destinationObject" Text :> + "compose" :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + Post '[JSON] Object + +-- | Concatenates a list of existing objects into a new object in the same +-- bucket. +-- +-- /See:/ 'objectsCompose' smart constructor. +data ObjectsCompose = ObjectsCompose + { _oQuotaUser :: !(Maybe Text) + , _oIfMetagenerationMatch :: !(Maybe Word64) + , _oPrettyPrint :: !Bool + , _oIfGenerationMatch :: !(Maybe Word64) + , _oUserIp :: !(Maybe Text) + , _oKey :: !(Maybe Text) + , _oDestinationBucket :: !Text + , _oOauthToken :: !(Maybe Text) + , _oFields :: !(Maybe Text) + , _oAlt :: !Text + , _oDestinationObject :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsCompose'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oQuotaUser' +-- +-- * 'oIfMetagenerationMatch' +-- +-- * 'oPrettyPrint' +-- +-- * 'oIfGenerationMatch' +-- +-- * 'oUserIp' +-- +-- * 'oKey' +-- +-- * 'oDestinationBucket' +-- +-- * 'oOauthToken' +-- +-- * 'oFields' +-- +-- * 'oAlt' +-- +-- * 'oDestinationObject' +objectsCompose + :: Text -- ^ 'destinationBucket' + -> Text -- ^ 'destinationObject' + -> ObjectsCompose +objectsCompose pODestinationBucket_ pODestinationObject_ = + ObjectsCompose + { _oQuotaUser = Nothing + , _oIfMetagenerationMatch = Nothing + , _oPrettyPrint = True + , _oIfGenerationMatch = Nothing + , _oUserIp = Nothing + , _oKey = Nothing + , _oDestinationBucket = pODestinationBucket_ + , _oOauthToken = Nothing + , _oFields = Nothing + , _oAlt = "json" + , _oDestinationObject = pODestinationObject_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oQuotaUser :: Lens' ObjectsCompose' (Maybe Text) +oQuotaUser + = lens _oQuotaUser (\ s a -> s{_oQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +oIfMetagenerationMatch :: Lens' ObjectsCompose' (Maybe Word64) +oIfMetagenerationMatch + = lens _oIfMetagenerationMatch + (\ s a -> s{_oIfMetagenerationMatch = a}) + +-- | Returns response with indentations and line breaks. +oPrettyPrint :: Lens' ObjectsCompose' Bool +oPrettyPrint + = lens _oPrettyPrint (\ s a -> s{_oPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation matches the given value. +oIfGenerationMatch :: Lens' ObjectsCompose' (Maybe Word64) +oIfGenerationMatch + = lens _oIfGenerationMatch + (\ s a -> s{_oIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oUserIp :: Lens' ObjectsCompose' (Maybe Text) +oUserIp = lens _oUserIp (\ s a -> s{_oUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oKey :: Lens' ObjectsCompose' (Maybe Text) +oKey = lens _oKey (\ s a -> s{_oKey = a}) + +-- | Name of the bucket in which to store the new object. +oDestinationBucket :: Lens' ObjectsCompose' Text +oDestinationBucket + = lens _oDestinationBucket + (\ s a -> s{_oDestinationBucket = a}) + +-- | OAuth 2.0 token for the current user. +oOauthToken :: Lens' ObjectsCompose' (Maybe Text) +oOauthToken + = lens _oOauthToken (\ s a -> s{_oOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oFields :: Lens' ObjectsCompose' (Maybe Text) +oFields = lens _oFields (\ s a -> s{_oFields = a}) + +-- | Data format for the response. +oAlt :: Lens' ObjectsCompose' Text +oAlt = lens _oAlt (\ s a -> s{_oAlt = a}) + +-- | Name of the new object. +oDestinationObject :: Lens' ObjectsCompose' Text +oDestinationObject + = lens _oDestinationObject + (\ s a -> s{_oDestinationObject = a}) + +instance GoogleRequest ObjectsCompose' where + type Rs ObjectsCompose' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsCompose{..} + = go _oQuotaUser _oIfMetagenerationMatch + _oPrettyPrint + _oIfGenerationMatch + _oUserIp + _oKey + _oDestinationBucket + _oOauthToken + _oFields + _oAlt + _oDestinationObject + where go + = clientWithRoute (Proxy :: Proxy ObjectsComposeAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Copy.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Copy.hs new file mode 100644 index 000000000..c292e2c3c --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Copy.hs @@ -0,0 +1,349 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Copy +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Copies an object to a destination in the same location. Optionally +-- overrides metadata. +-- +-- /See:/ for @StorageObjectsCopy@. +module Storage.Objects.Copy + ( + -- * REST Resource + ObjectsCopyAPI + + -- * Creating a Request + , objectsCopy + , ObjectsCopy + + -- * Request Lenses + , ocQuotaUser + , ocIfSourceGenerationMatch + , ocIfMetagenerationMatch + , ocIfGenerationNotMatch + , ocPrettyPrint + , ocIfSourceMetagenerationNotMatch + , ocIfSourceMetagenerationMatch + , ocIfGenerationMatch + , ocUserIp + , ocSourceObject + , ocSourceBucket + , ocKey + , ocDestinationBucket + , ocIfMetagenerationNotMatch + , ocIfSourceGenerationNotMatch + , ocProjection + , ocOauthToken + , ocSourceGeneration + , ocFields + , ocAlt + , ocDestinationObject + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsCopy@ which the +-- 'ObjectsCopy' request conforms to. +type ObjectsCopyAPI = + "b" :> + Capture "sourceBucket" Text :> + "o" :> + Capture "sourceObject" Text :> + "copyTo" :> + "b" :> + Capture "destinationBucket" Text :> + "o" :> + Capture "destinationObject" Text :> + QueryParam "ifSourceGenerationMatch" Word64 :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifSourceMetagenerationNotMatch" Word64 + :> + QueryParam "ifSourceMetagenerationMatch" Word64 + :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 + :> + QueryParam "ifSourceGenerationNotMatch" + Word64 + :> + QueryParam "projection" Text :> + QueryParam "sourceGeneration" Word64 :> + Post '[JSON] Object + +-- | Copies an object to a destination in the same location. Optionally +-- overrides metadata. +-- +-- /See:/ 'objectsCopy' smart constructor. +data ObjectsCopy = ObjectsCopy + { _ocQuotaUser :: !(Maybe Text) + , _ocIfSourceGenerationMatch :: !(Maybe Word64) + , _ocIfMetagenerationMatch :: !(Maybe Word64) + , _ocIfGenerationNotMatch :: !(Maybe Word64) + , _ocPrettyPrint :: !Bool + , _ocIfSourceMetagenerationNotMatch :: !(Maybe Word64) + , _ocIfSourceMetagenerationMatch :: !(Maybe Word64) + , _ocIfGenerationMatch :: !(Maybe Word64) + , _ocUserIp :: !(Maybe Text) + , _ocSourceObject :: !Text + , _ocSourceBucket :: !Text + , _ocKey :: !(Maybe Text) + , _ocDestinationBucket :: !Text + , _ocIfMetagenerationNotMatch :: !(Maybe Word64) + , _ocIfSourceGenerationNotMatch :: !(Maybe Word64) + , _ocProjection :: !(Maybe Text) + , _ocOauthToken :: !(Maybe Text) + , _ocSourceGeneration :: !(Maybe Word64) + , _ocFields :: !(Maybe Text) + , _ocAlt :: !Text + , _ocDestinationObject :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsCopy'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ocQuotaUser' +-- +-- * 'ocIfSourceGenerationMatch' +-- +-- * 'ocIfMetagenerationMatch' +-- +-- * 'ocIfGenerationNotMatch' +-- +-- * 'ocPrettyPrint' +-- +-- * 'ocIfSourceMetagenerationNotMatch' +-- +-- * 'ocIfSourceMetagenerationMatch' +-- +-- * 'ocIfGenerationMatch' +-- +-- * 'ocUserIp' +-- +-- * 'ocSourceObject' +-- +-- * 'ocSourceBucket' +-- +-- * 'ocKey' +-- +-- * 'ocDestinationBucket' +-- +-- * 'ocIfMetagenerationNotMatch' +-- +-- * 'ocIfSourceGenerationNotMatch' +-- +-- * 'ocProjection' +-- +-- * 'ocOauthToken' +-- +-- * 'ocSourceGeneration' +-- +-- * 'ocFields' +-- +-- * 'ocAlt' +-- +-- * 'ocDestinationObject' +objectsCopy + :: Text -- ^ 'sourceObject' + -> Text -- ^ 'sourceBucket' + -> Text -- ^ 'destinationBucket' + -> Text -- ^ 'destinationObject' + -> ObjectsCopy +objectsCopy pOcSourceObject_ pOcSourceBucket_ pOcDestinationBucket_ pOcDestinationObject_ = + ObjectsCopy + { _ocQuotaUser = Nothing + , _ocIfSourceGenerationMatch = Nothing + , _ocIfMetagenerationMatch = Nothing + , _ocIfGenerationNotMatch = Nothing + , _ocPrettyPrint = True + , _ocIfSourceMetagenerationNotMatch = Nothing + , _ocIfSourceMetagenerationMatch = Nothing + , _ocIfGenerationMatch = Nothing + , _ocUserIp = Nothing + , _ocSourceObject = pOcSourceObject_ + , _ocSourceBucket = pOcSourceBucket_ + , _ocKey = Nothing + , _ocDestinationBucket = pOcDestinationBucket_ + , _ocIfMetagenerationNotMatch = Nothing + , _ocIfSourceGenerationNotMatch = Nothing + , _ocProjection = Nothing + , _ocOauthToken = Nothing + , _ocSourceGeneration = Nothing + , _ocFields = Nothing + , _ocAlt = "json" + , _ocDestinationObject = pOcDestinationObject_ + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ocQuotaUser :: Lens' ObjectsCopy' (Maybe Text) +ocQuotaUser + = lens _ocQuotaUser (\ s a -> s{_ocQuotaUser = a}) + +-- | Makes the operation conditional on whether the source object\'s +-- generation matches the given value. +ocIfSourceGenerationMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfSourceGenerationMatch + = lens _ocIfSourceGenerationMatch + (\ s a -> s{_ocIfSourceGenerationMatch = a}) + +-- | Makes the operation conditional on whether the destination object\'s +-- current metageneration matches the given value. +ocIfMetagenerationMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfMetagenerationMatch + = lens _ocIfMetagenerationMatch + (\ s a -> s{_ocIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the destination object\'s +-- current generation does not match the given value. +ocIfGenerationNotMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfGenerationNotMatch + = lens _ocIfGenerationNotMatch + (\ s a -> s{_ocIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +ocPrettyPrint :: Lens' ObjectsCopy' Bool +ocPrettyPrint + = lens _ocPrettyPrint + (\ s a -> s{_ocPrettyPrint = a}) + +-- | Makes the operation conditional on whether the source object\'s current +-- metageneration does not match the given value. +ocIfSourceMetagenerationNotMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfSourceMetagenerationNotMatch + = lens _ocIfSourceMetagenerationNotMatch + (\ s a -> s{_ocIfSourceMetagenerationNotMatch = a}) + +-- | Makes the operation conditional on whether the source object\'s current +-- metageneration matches the given value. +ocIfSourceMetagenerationMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfSourceMetagenerationMatch + = lens _ocIfSourceMetagenerationMatch + (\ s a -> s{_ocIfSourceMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the destination object\'s +-- current generation matches the given value. +ocIfGenerationMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfGenerationMatch + = lens _ocIfGenerationMatch + (\ s a -> s{_ocIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ocUserIp :: Lens' ObjectsCopy' (Maybe Text) +ocUserIp = lens _ocUserIp (\ s a -> s{_ocUserIp = a}) + +-- | Name of the source object. +ocSourceObject :: Lens' ObjectsCopy' Text +ocSourceObject + = lens _ocSourceObject + (\ s a -> s{_ocSourceObject = a}) + +-- | Name of the bucket in which to find the source object. +ocSourceBucket :: Lens' ObjectsCopy' Text +ocSourceBucket + = lens _ocSourceBucket + (\ s a -> s{_ocSourceBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ocKey :: Lens' ObjectsCopy' (Maybe Text) +ocKey = lens _ocKey (\ s a -> s{_ocKey = a}) + +-- | Name of the bucket in which to store the new object. Overrides the +-- provided object metadata\'s bucket value, if any. +ocDestinationBucket :: Lens' ObjectsCopy' Text +ocDestinationBucket + = lens _ocDestinationBucket + (\ s a -> s{_ocDestinationBucket = a}) + +-- | Makes the operation conditional on whether the destination object\'s +-- current metageneration does not match the given value. +ocIfMetagenerationNotMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfMetagenerationNotMatch + = lens _ocIfMetagenerationNotMatch + (\ s a -> s{_ocIfMetagenerationNotMatch = a}) + +-- | Makes the operation conditional on whether the source object\'s +-- generation does not match the given value. +ocIfSourceGenerationNotMatch :: Lens' ObjectsCopy' (Maybe Word64) +ocIfSourceGenerationNotMatch + = lens _ocIfSourceGenerationNotMatch + (\ s a -> s{_ocIfSourceGenerationNotMatch = a}) + +-- | Set of properties to return. Defaults to noAcl, unless the object +-- resource specifies the acl property, when it defaults to full. +ocProjection :: Lens' ObjectsCopy' (Maybe Text) +ocProjection + = lens _ocProjection (\ s a -> s{_ocProjection = a}) + +-- | OAuth 2.0 token for the current user. +ocOauthToken :: Lens' ObjectsCopy' (Maybe Text) +ocOauthToken + = lens _ocOauthToken (\ s a -> s{_ocOauthToken = a}) + +-- | If present, selects a specific revision of the source object (as opposed +-- to the latest version, the default). +ocSourceGeneration :: Lens' ObjectsCopy' (Maybe Word64) +ocSourceGeneration + = lens _ocSourceGeneration + (\ s a -> s{_ocSourceGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +ocFields :: Lens' ObjectsCopy' (Maybe Text) +ocFields = lens _ocFields (\ s a -> s{_ocFields = a}) + +-- | Data format for the response. +ocAlt :: Lens' ObjectsCopy' Text +ocAlt = lens _ocAlt (\ s a -> s{_ocAlt = a}) + +-- | Name of the new object. Required when the object metadata is not +-- otherwise provided. Overrides the object metadata\'s name value, if any. +ocDestinationObject :: Lens' ObjectsCopy' Text +ocDestinationObject + = lens _ocDestinationObject + (\ s a -> s{_ocDestinationObject = a}) + +instance GoogleRequest ObjectsCopy' where + type Rs ObjectsCopy' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsCopy{..} + = go _ocQuotaUser _ocIfSourceGenerationMatch + _ocIfMetagenerationMatch + _ocIfGenerationNotMatch + _ocPrettyPrint + _ocIfSourceMetagenerationNotMatch + _ocIfSourceMetagenerationMatch + _ocIfGenerationMatch + _ocUserIp + _ocSourceObject + _ocSourceBucket + _ocKey + _ocDestinationBucket + _ocIfMetagenerationNotMatch + _ocIfSourceGenerationNotMatch + _ocProjection + _ocOauthToken + _ocSourceGeneration + _ocFields + _ocAlt + _ocDestinationObject + where go + = clientWithRoute (Proxy :: Proxy ObjectsCopyAPI) r u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Delete.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Delete.hs new file mode 100644 index 000000000..55132d929 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Delete.hs @@ -0,0 +1,239 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes data blobs and associated metadata. Deletions are permanent if +-- versioning is not enabled for the bucket, or if the generation parameter +-- is used. +-- +-- /See:/ for @StorageObjectsDelete@. +module Storage.Objects.Delete + ( + -- * REST Resource + ObjectsDeleteAPI + + -- * Creating a Request + , objectsDelete + , ObjectsDelete + + -- * Request Lenses + , odQuotaUser + , odIfMetagenerationMatch + , odIfGenerationNotMatch + , odPrettyPrint + , odIfGenerationMatch + , odUserIp + , odBucket + , odKey + , odIfMetagenerationNotMatch + , odObject + , odOauthToken + , odGeneration + , odFields + , odAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsDelete@ which the +-- 'ObjectsDelete' request conforms to. +type ObjectsDeleteAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "generation" Word64 :> Delete '[JSON] () + +-- | Deletes data blobs and associated metadata. Deletions are permanent if +-- versioning is not enabled for the bucket, or if the generation parameter +-- is used. +-- +-- /See:/ 'objectsDelete' smart constructor. +data ObjectsDelete = ObjectsDelete + { _odQuotaUser :: !(Maybe Text) + , _odIfMetagenerationMatch :: !(Maybe Word64) + , _odIfGenerationNotMatch :: !(Maybe Word64) + , _odPrettyPrint :: !Bool + , _odIfGenerationMatch :: !(Maybe Word64) + , _odUserIp :: !(Maybe Text) + , _odBucket :: !Text + , _odKey :: !(Maybe Text) + , _odIfMetagenerationNotMatch :: !(Maybe Word64) + , _odObject :: !Text + , _odOauthToken :: !(Maybe Text) + , _odGeneration :: !(Maybe Word64) + , _odFields :: !(Maybe Text) + , _odAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'odQuotaUser' +-- +-- * 'odIfMetagenerationMatch' +-- +-- * 'odIfGenerationNotMatch' +-- +-- * 'odPrettyPrint' +-- +-- * 'odIfGenerationMatch' +-- +-- * 'odUserIp' +-- +-- * 'odBucket' +-- +-- * 'odKey' +-- +-- * 'odIfMetagenerationNotMatch' +-- +-- * 'odObject' +-- +-- * 'odOauthToken' +-- +-- * 'odGeneration' +-- +-- * 'odFields' +-- +-- * 'odAlt' +objectsDelete + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectsDelete +objectsDelete pOdBucket_ pOdObject_ = + ObjectsDelete + { _odQuotaUser = Nothing + , _odIfMetagenerationMatch = Nothing + , _odIfGenerationNotMatch = Nothing + , _odPrettyPrint = True + , _odIfGenerationMatch = Nothing + , _odUserIp = Nothing + , _odBucket = pOdBucket_ + , _odKey = Nothing + , _odIfMetagenerationNotMatch = Nothing + , _odObject = pOdObject_ + , _odOauthToken = Nothing + , _odGeneration = Nothing + , _odFields = Nothing + , _odAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +odQuotaUser :: Lens' ObjectsDelete' (Maybe Text) +odQuotaUser + = lens _odQuotaUser (\ s a -> s{_odQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +odIfMetagenerationMatch :: Lens' ObjectsDelete' (Maybe Word64) +odIfMetagenerationMatch + = lens _odIfMetagenerationMatch + (\ s a -> s{_odIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation does not match the given value. +odIfGenerationNotMatch :: Lens' ObjectsDelete' (Maybe Word64) +odIfGenerationNotMatch + = lens _odIfGenerationNotMatch + (\ s a -> s{_odIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +odPrettyPrint :: Lens' ObjectsDelete' Bool +odPrettyPrint + = lens _odPrettyPrint + (\ s a -> s{_odPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation matches the given value. +odIfGenerationMatch :: Lens' ObjectsDelete' (Maybe Word64) +odIfGenerationMatch + = lens _odIfGenerationMatch + (\ s a -> s{_odIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +odUserIp :: Lens' ObjectsDelete' (Maybe Text) +odUserIp = lens _odUserIp (\ s a -> s{_odUserIp = a}) + +-- | Name of the bucket in which the object resides. +odBucket :: Lens' ObjectsDelete' Text +odBucket = lens _odBucket (\ s a -> s{_odBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +odKey :: Lens' ObjectsDelete' (Maybe Text) +odKey = lens _odKey (\ s a -> s{_odKey = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration does not match the given value. +odIfMetagenerationNotMatch :: Lens' ObjectsDelete' (Maybe Word64) +odIfMetagenerationNotMatch + = lens _odIfMetagenerationNotMatch + (\ s a -> s{_odIfMetagenerationNotMatch = a}) + +-- | Name of the object. +odObject :: Lens' ObjectsDelete' Text +odObject = lens _odObject (\ s a -> s{_odObject = a}) + +-- | OAuth 2.0 token for the current user. +odOauthToken :: Lens' ObjectsDelete' (Maybe Text) +odOauthToken + = lens _odOauthToken (\ s a -> s{_odOauthToken = a}) + +-- | If present, permanently deletes a specific revision of this object (as +-- opposed to the latest version, the default). +odGeneration :: Lens' ObjectsDelete' (Maybe Word64) +odGeneration + = lens _odGeneration (\ s a -> s{_odGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +odFields :: Lens' ObjectsDelete' (Maybe Text) +odFields = lens _odFields (\ s a -> s{_odFields = a}) + +-- | Data format for the response. +odAlt :: Lens' ObjectsDelete' Text +odAlt = lens _odAlt (\ s a -> s{_odAlt = a}) + +instance GoogleRequest ObjectsDelete' where + type Rs ObjectsDelete' = () + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsDelete{..} + = go _odQuotaUser _odIfMetagenerationMatch + _odIfGenerationNotMatch + _odPrettyPrint + _odIfGenerationMatch + _odUserIp + _odBucket + _odKey + _odIfMetagenerationNotMatch + _odObject + _odOauthToken + _odGeneration + _odFields + _odAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsDeleteAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Get.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Get.hs new file mode 100644 index 000000000..183a705e6 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Get.hs @@ -0,0 +1,246 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves objects or their associated metadata. +-- +-- /See:/ for @StorageObjectsGet@. +module Storage.Objects.Get + ( + -- * REST Resource + ObjectsGetAPI + + -- * Creating a Request + , objectsGet + , ObjectsGet + + -- * Request Lenses + , ogQuotaUser + , ogIfMetagenerationMatch + , ogIfGenerationNotMatch + , ogPrettyPrint + , ogIfGenerationMatch + , ogUserIp + , ogBucket + , ogKey + , ogIfMetagenerationNotMatch + , ogObject + , ogProjection + , ogOauthToken + , ogGeneration + , ogFields + , ogAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsGet@ which the +-- 'ObjectsGet' request conforms to. +type ObjectsGetAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> + QueryParam "generation" Word64 :> Get '[JSON] Object + +-- | Retrieves objects or their associated metadata. +-- +-- /See:/ 'objectsGet' smart constructor. +data ObjectsGet = ObjectsGet + { _ogQuotaUser :: !(Maybe Text) + , _ogIfMetagenerationMatch :: !(Maybe Word64) + , _ogIfGenerationNotMatch :: !(Maybe Word64) + , _ogPrettyPrint :: !Bool + , _ogIfGenerationMatch :: !(Maybe Word64) + , _ogUserIp :: !(Maybe Text) + , _ogBucket :: !Text + , _ogKey :: !(Maybe Text) + , _ogIfMetagenerationNotMatch :: !(Maybe Word64) + , _ogObject :: !Text + , _ogProjection :: !(Maybe Text) + , _ogOauthToken :: !(Maybe Text) + , _ogGeneration :: !(Maybe Word64) + , _ogFields :: !(Maybe Text) + , _ogAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ogQuotaUser' +-- +-- * 'ogIfMetagenerationMatch' +-- +-- * 'ogIfGenerationNotMatch' +-- +-- * 'ogPrettyPrint' +-- +-- * 'ogIfGenerationMatch' +-- +-- * 'ogUserIp' +-- +-- * 'ogBucket' +-- +-- * 'ogKey' +-- +-- * 'ogIfMetagenerationNotMatch' +-- +-- * 'ogObject' +-- +-- * 'ogProjection' +-- +-- * 'ogOauthToken' +-- +-- * 'ogGeneration' +-- +-- * 'ogFields' +-- +-- * 'ogAlt' +objectsGet + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectsGet +objectsGet pOgBucket_ pOgObject_ = + ObjectsGet + { _ogQuotaUser = Nothing + , _ogIfMetagenerationMatch = Nothing + , _ogIfGenerationNotMatch = Nothing + , _ogPrettyPrint = True + , _ogIfGenerationMatch = Nothing + , _ogUserIp = Nothing + , _ogBucket = pOgBucket_ + , _ogKey = Nothing + , _ogIfMetagenerationNotMatch = Nothing + , _ogObject = pOgObject_ + , _ogProjection = Nothing + , _ogOauthToken = Nothing + , _ogGeneration = Nothing + , _ogFields = Nothing + , _ogAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ogQuotaUser :: Lens' ObjectsGet' (Maybe Text) +ogQuotaUser + = lens _ogQuotaUser (\ s a -> s{_ogQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +ogIfMetagenerationMatch :: Lens' ObjectsGet' (Maybe Word64) +ogIfMetagenerationMatch + = lens _ogIfMetagenerationMatch + (\ s a -> s{_ogIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the object\'s generation does +-- not match the given value. +ogIfGenerationNotMatch :: Lens' ObjectsGet' (Maybe Word64) +ogIfGenerationNotMatch + = lens _ogIfGenerationNotMatch + (\ s a -> s{_ogIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +ogPrettyPrint :: Lens' ObjectsGet' Bool +ogPrettyPrint + = lens _ogPrettyPrint + (\ s a -> s{_ogPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s generation +-- matches the given value. +ogIfGenerationMatch :: Lens' ObjectsGet' (Maybe Word64) +ogIfGenerationMatch + = lens _ogIfGenerationMatch + (\ s a -> s{_ogIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ogUserIp :: Lens' ObjectsGet' (Maybe Text) +ogUserIp = lens _ogUserIp (\ s a -> s{_ogUserIp = a}) + +-- | Name of the bucket in which the object resides. +ogBucket :: Lens' ObjectsGet' Text +ogBucket = lens _ogBucket (\ s a -> s{_ogBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ogKey :: Lens' ObjectsGet' (Maybe Text) +ogKey = lens _ogKey (\ s a -> s{_ogKey = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration does not match the given value. +ogIfMetagenerationNotMatch :: Lens' ObjectsGet' (Maybe Word64) +ogIfMetagenerationNotMatch + = lens _ogIfMetagenerationNotMatch + (\ s a -> s{_ogIfMetagenerationNotMatch = a}) + +-- | Name of the object. +ogObject :: Lens' ObjectsGet' Text +ogObject = lens _ogObject (\ s a -> s{_ogObject = a}) + +-- | Set of properties to return. Defaults to noAcl. +ogProjection :: Lens' ObjectsGet' (Maybe Text) +ogProjection + = lens _ogProjection (\ s a -> s{_ogProjection = a}) + +-- | OAuth 2.0 token for the current user. +ogOauthToken :: Lens' ObjectsGet' (Maybe Text) +ogOauthToken + = lens _ogOauthToken (\ s a -> s{_ogOauthToken = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +ogGeneration :: Lens' ObjectsGet' (Maybe Word64) +ogGeneration + = lens _ogGeneration (\ s a -> s{_ogGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +ogFields :: Lens' ObjectsGet' (Maybe Text) +ogFields = lens _ogFields (\ s a -> s{_ogFields = a}) + +-- | Data format for the response. +ogAlt :: Lens' ObjectsGet' Text +ogAlt = lens _ogAlt (\ s a -> s{_ogAlt = a}) + +instance GoogleRequest ObjectsGet' where + type Rs ObjectsGet' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsGet{..} + = go _ogQuotaUser _ogIfMetagenerationMatch + _ogIfGenerationNotMatch + _ogPrettyPrint + _ogIfGenerationMatch + _ogUserIp + _ogBucket + _ogKey + _ogIfMetagenerationNotMatch + _ogObject + _ogProjection + _ogOauthToken + _ogGeneration + _ogFields + _ogAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsGetAPI) r u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Insert.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Insert.hs new file mode 100644 index 000000000..18f16977c --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Insert.hs @@ -0,0 +1,236 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Stores new data blobs and associated metadata. +-- +-- /See:/ for @StorageObjectsInsert@. +module Storage.Objects.Insert + ( + -- * REST Resource + ObjectsInsertAPI + + -- * Creating a Request + , objectsInsert + , ObjectsInsert + + -- * Request Lenses + , oiQuotaUser + , oiIfMetagenerationMatch + , oiIfGenerationNotMatch + , oiPrettyPrint + , oiIfGenerationMatch + , oiUserIp + , oiBucket + , oiKey + , oiName + , oiIfMetagenerationNotMatch + , oiProjection + , oiOauthToken + , oiFields + , oiAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsInsert@ which the +-- 'ObjectsInsert' request conforms to. +type ObjectsInsertAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "name" Text :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> Post '[JSON] Object + +-- | Stores new data blobs and associated metadata. +-- +-- /See:/ 'objectsInsert' smart constructor. +data ObjectsInsert = ObjectsInsert + { _oiQuotaUser :: !(Maybe Text) + , _oiIfMetagenerationMatch :: !(Maybe Word64) + , _oiIfGenerationNotMatch :: !(Maybe Word64) + , _oiPrettyPrint :: !Bool + , _oiIfGenerationMatch :: !(Maybe Word64) + , _oiUserIp :: !(Maybe Text) + , _oiBucket :: !Text + , _oiKey :: !(Maybe Text) + , _oiName :: !(Maybe Text) + , _oiIfMetagenerationNotMatch :: !(Maybe Word64) + , _oiProjection :: !(Maybe Text) + , _oiOauthToken :: !(Maybe Text) + , _oiFields :: !(Maybe Text) + , _oiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oiQuotaUser' +-- +-- * 'oiIfMetagenerationMatch' +-- +-- * 'oiIfGenerationNotMatch' +-- +-- * 'oiPrettyPrint' +-- +-- * 'oiIfGenerationMatch' +-- +-- * 'oiUserIp' +-- +-- * 'oiBucket' +-- +-- * 'oiKey' +-- +-- * 'oiName' +-- +-- * 'oiIfMetagenerationNotMatch' +-- +-- * 'oiProjection' +-- +-- * 'oiOauthToken' +-- +-- * 'oiFields' +-- +-- * 'oiAlt' +objectsInsert + :: Text -- ^ 'bucket' + -> ObjectsInsert +objectsInsert pOiBucket_ = + ObjectsInsert + { _oiQuotaUser = Nothing + , _oiIfMetagenerationMatch = Nothing + , _oiIfGenerationNotMatch = Nothing + , _oiPrettyPrint = True + , _oiIfGenerationMatch = Nothing + , _oiUserIp = Nothing + , _oiBucket = pOiBucket_ + , _oiKey = Nothing + , _oiName = Nothing + , _oiIfMetagenerationNotMatch = Nothing + , _oiProjection = Nothing + , _oiOauthToken = Nothing + , _oiFields = Nothing + , _oiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +oiQuotaUser :: Lens' ObjectsInsert' (Maybe Text) +oiQuotaUser + = lens _oiQuotaUser (\ s a -> s{_oiQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +oiIfMetagenerationMatch :: Lens' ObjectsInsert' (Maybe Word64) +oiIfMetagenerationMatch + = lens _oiIfMetagenerationMatch + (\ s a -> s{_oiIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation does not match the given value. +oiIfGenerationNotMatch :: Lens' ObjectsInsert' (Maybe Word64) +oiIfGenerationNotMatch + = lens _oiIfGenerationNotMatch + (\ s a -> s{_oiIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +oiPrettyPrint :: Lens' ObjectsInsert' Bool +oiPrettyPrint + = lens _oiPrettyPrint + (\ s a -> s{_oiPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation matches the given value. +oiIfGenerationMatch :: Lens' ObjectsInsert' (Maybe Word64) +oiIfGenerationMatch + = lens _oiIfGenerationMatch + (\ s a -> s{_oiIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +oiUserIp :: Lens' ObjectsInsert' (Maybe Text) +oiUserIp = lens _oiUserIp (\ s a -> s{_oiUserIp = a}) + +-- | Name of the bucket in which to store the new object. Overrides the +-- provided object metadata\'s bucket value, if any. +oiBucket :: Lens' ObjectsInsert' Text +oiBucket = lens _oiBucket (\ s a -> s{_oiBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +oiKey :: Lens' ObjectsInsert' (Maybe Text) +oiKey = lens _oiKey (\ s a -> s{_oiKey = a}) + +-- | Name of the object. Required when the object metadata is not otherwise +-- provided. Overrides the object metadata\'s name value, if any. +oiName :: Lens' ObjectsInsert' (Maybe Text) +oiName = lens _oiName (\ s a -> s{_oiName = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration does not match the given value. +oiIfMetagenerationNotMatch :: Lens' ObjectsInsert' (Maybe Word64) +oiIfMetagenerationNotMatch + = lens _oiIfMetagenerationNotMatch + (\ s a -> s{_oiIfMetagenerationNotMatch = a}) + +-- | Set of properties to return. Defaults to noAcl, unless the object +-- resource specifies the acl property, when it defaults to full. +oiProjection :: Lens' ObjectsInsert' (Maybe Text) +oiProjection + = lens _oiProjection (\ s a -> s{_oiProjection = a}) + +-- | OAuth 2.0 token for the current user. +oiOauthToken :: Lens' ObjectsInsert' (Maybe Text) +oiOauthToken + = lens _oiOauthToken (\ s a -> s{_oiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +oiFields :: Lens' ObjectsInsert' (Maybe Text) +oiFields = lens _oiFields (\ s a -> s{_oiFields = a}) + +-- | Data format for the response. +oiAlt :: Lens' ObjectsInsert' Text +oiAlt = lens _oiAlt (\ s a -> s{_oiAlt = a}) + +instance GoogleRequest ObjectsInsert' where + type Rs ObjectsInsert' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsInsert{..} + = go _oiQuotaUser _oiIfMetagenerationMatch + _oiIfGenerationNotMatch + _oiPrettyPrint + _oiIfGenerationMatch + _oiUserIp + _oiBucket + _oiKey + _oiName + _oiIfMetagenerationNotMatch + _oiProjection + _oiOauthToken + _oiFields + _oiAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsInsertAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs new file mode 100644 index 000000000..04d2edb48 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs @@ -0,0 +1,228 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of objects matching the criteria. +-- +-- /See:/ for @StorageObjectsList@. +module Storage.Objects.List + ( + -- * REST Resource + ObjectsListAPI + + -- * Creating a Request + , objectsList + , ObjectsList + + -- * Request Lenses + , olQuotaUser + , olPrettyPrint + , olPrefix + , olUserIp + , olBucket + , olVersions + , olKey + , olProjection + , olPageToken + , olOauthToken + , olDelimiter + , olMaxResults + , olFields + , olAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsList@ which the +-- 'ObjectsList' request conforms to. +type ObjectsListAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + QueryParam "prefix" Text :> + QueryParam "versions" Bool :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "delimiter" Text :> + QueryParam "maxResults" Word32 :> Get '[JSON] Objects + +-- | Retrieves a list of objects matching the criteria. +-- +-- /See:/ 'objectsList' smart constructor. +data ObjectsList = ObjectsList + { _olQuotaUser :: !(Maybe Text) + , _olPrettyPrint :: !Bool + , _olPrefix :: !(Maybe Text) + , _olUserIp :: !(Maybe Text) + , _olBucket :: !Text + , _olVersions :: !(Maybe Bool) + , _olKey :: !(Maybe Text) + , _olProjection :: !(Maybe Text) + , _olPageToken :: !(Maybe Text) + , _olOauthToken :: !(Maybe Text) + , _olDelimiter :: !(Maybe Text) + , _olMaxResults :: !(Maybe Word32) + , _olFields :: !(Maybe Text) + , _olAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'olQuotaUser' +-- +-- * 'olPrettyPrint' +-- +-- * 'olPrefix' +-- +-- * 'olUserIp' +-- +-- * 'olBucket' +-- +-- * 'olVersions' +-- +-- * 'olKey' +-- +-- * 'olProjection' +-- +-- * 'olPageToken' +-- +-- * 'olOauthToken' +-- +-- * 'olDelimiter' +-- +-- * 'olMaxResults' +-- +-- * 'olFields' +-- +-- * 'olAlt' +objectsList + :: Text -- ^ 'bucket' + -> ObjectsList +objectsList pOlBucket_ = + ObjectsList + { _olQuotaUser = Nothing + , _olPrettyPrint = True + , _olPrefix = Nothing + , _olUserIp = Nothing + , _olBucket = pOlBucket_ + , _olVersions = Nothing + , _olKey = Nothing + , _olProjection = Nothing + , _olPageToken = Nothing + , _olOauthToken = Nothing + , _olDelimiter = Nothing + , _olMaxResults = Nothing + , _olFields = Nothing + , _olAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +olQuotaUser :: Lens' ObjectsList' (Maybe Text) +olQuotaUser + = lens _olQuotaUser (\ s a -> s{_olQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +olPrettyPrint :: Lens' ObjectsList' Bool +olPrettyPrint + = lens _olPrettyPrint + (\ s a -> s{_olPrettyPrint = a}) + +-- | Filter results to objects whose names begin with this prefix. +olPrefix :: Lens' ObjectsList' (Maybe Text) +olPrefix = lens _olPrefix (\ s a -> s{_olPrefix = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +olUserIp :: Lens' ObjectsList' (Maybe Text) +olUserIp = lens _olUserIp (\ s a -> s{_olUserIp = a}) + +-- | Name of the bucket in which to look for objects. +olBucket :: Lens' ObjectsList' Text +olBucket = lens _olBucket (\ s a -> s{_olBucket = a}) + +-- | If true, lists all versions of a file as distinct results. +olVersions :: Lens' ObjectsList' (Maybe Bool) +olVersions + = lens _olVersions (\ s a -> s{_olVersions = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +olKey :: Lens' ObjectsList' (Maybe Text) +olKey = lens _olKey (\ s a -> s{_olKey = a}) + +-- | Set of properties to return. Defaults to noAcl. +olProjection :: Lens' ObjectsList' (Maybe Text) +olProjection + = lens _olProjection (\ s a -> s{_olProjection = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +olPageToken :: Lens' ObjectsList' (Maybe Text) +olPageToken + = lens _olPageToken (\ s a -> s{_olPageToken = a}) + +-- | OAuth 2.0 token for the current user. +olOauthToken :: Lens' ObjectsList' (Maybe Text) +olOauthToken + = lens _olOauthToken (\ s a -> s{_olOauthToken = a}) + +-- | Returns results in a directory-like mode. items will contain only +-- objects whose names, aside from the prefix, do not contain delimiter. +-- Objects whose names, aside from the prefix, contain delimiter will have +-- their name, truncated after the delimiter, returned in prefixes. +-- Duplicate prefixes are omitted. +olDelimiter :: Lens' ObjectsList' (Maybe Text) +olDelimiter + = lens _olDelimiter (\ s a -> s{_olDelimiter = a}) + +-- | Maximum number of items plus prefixes to return. As duplicate prefixes +-- are omitted, fewer total results may be returned than requested. +olMaxResults :: Lens' ObjectsList' (Maybe Word32) +olMaxResults + = lens _olMaxResults (\ s a -> s{_olMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +olFields :: Lens' ObjectsList' (Maybe Text) +olFields = lens _olFields (\ s a -> s{_olFields = a}) + +-- | Data format for the response. +olAlt :: Lens' ObjectsList' Text +olAlt = lens _olAlt (\ s a -> s{_olAlt = a}) + +instance GoogleRequest ObjectsList' where + type Rs ObjectsList' = Objects + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsList{..} + = go _olQuotaUser _olPrettyPrint _olPrefix _olUserIp + _olBucket + _olVersions + _olKey + _olProjection + _olPageToken + _olOauthToken + _olDelimiter + _olMaxResults + _olFields + _olAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsListAPI) r u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Patch.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Patch.hs new file mode 100644 index 000000000..bb2af1988 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Patch.hs @@ -0,0 +1,250 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Patch +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a data blob\'s associated metadata. This method supports patch +-- semantics. +-- +-- /See:/ for @StorageObjectsPatch@. +module Storage.Objects.Patch + ( + -- * REST Resource + ObjectsPatchAPI + + -- * Creating a Request + , objectsPatch + , ObjectsPatch + + -- * Request Lenses + , opQuotaUser + , opIfMetagenerationMatch + , opIfGenerationNotMatch + , opPrettyPrint + , opIfGenerationMatch + , opUserIp + , opBucket + , opKey + , opIfMetagenerationNotMatch + , opObject + , opProjection + , opOauthToken + , opGeneration + , opFields + , opAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsPatch@ which the +-- 'ObjectsPatch' request conforms to. +type ObjectsPatchAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> + QueryParam "generation" Word64 :> + Patch '[JSON] Object + +-- | Updates a data blob\'s associated metadata. This method supports patch +-- semantics. +-- +-- /See:/ 'objectsPatch' smart constructor. +data ObjectsPatch = ObjectsPatch + { _opQuotaUser :: !(Maybe Text) + , _opIfMetagenerationMatch :: !(Maybe Word64) + , _opIfGenerationNotMatch :: !(Maybe Word64) + , _opPrettyPrint :: !Bool + , _opIfGenerationMatch :: !(Maybe Word64) + , _opUserIp :: !(Maybe Text) + , _opBucket :: !Text + , _opKey :: !(Maybe Text) + , _opIfMetagenerationNotMatch :: !(Maybe Word64) + , _opObject :: !Text + , _opProjection :: !(Maybe Text) + , _opOauthToken :: !(Maybe Text) + , _opGeneration :: !(Maybe Word64) + , _opFields :: !(Maybe Text) + , _opAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsPatch'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'opQuotaUser' +-- +-- * 'opIfMetagenerationMatch' +-- +-- * 'opIfGenerationNotMatch' +-- +-- * 'opPrettyPrint' +-- +-- * 'opIfGenerationMatch' +-- +-- * 'opUserIp' +-- +-- * 'opBucket' +-- +-- * 'opKey' +-- +-- * 'opIfMetagenerationNotMatch' +-- +-- * 'opObject' +-- +-- * 'opProjection' +-- +-- * 'opOauthToken' +-- +-- * 'opGeneration' +-- +-- * 'opFields' +-- +-- * 'opAlt' +objectsPatch + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectsPatch +objectsPatch pOpBucket_ pOpObject_ = + ObjectsPatch + { _opQuotaUser = Nothing + , _opIfMetagenerationMatch = Nothing + , _opIfGenerationNotMatch = Nothing + , _opPrettyPrint = True + , _opIfGenerationMatch = Nothing + , _opUserIp = Nothing + , _opBucket = pOpBucket_ + , _opKey = Nothing + , _opIfMetagenerationNotMatch = Nothing + , _opObject = pOpObject_ + , _opProjection = Nothing + , _opOauthToken = Nothing + , _opGeneration = Nothing + , _opFields = Nothing + , _opAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +opQuotaUser :: Lens' ObjectsPatch' (Maybe Text) +opQuotaUser + = lens _opQuotaUser (\ s a -> s{_opQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +opIfMetagenerationMatch :: Lens' ObjectsPatch' (Maybe Word64) +opIfMetagenerationMatch + = lens _opIfMetagenerationMatch + (\ s a -> s{_opIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation does not match the given value. +opIfGenerationNotMatch :: Lens' ObjectsPatch' (Maybe Word64) +opIfGenerationNotMatch + = lens _opIfGenerationNotMatch + (\ s a -> s{_opIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +opPrettyPrint :: Lens' ObjectsPatch' Bool +opPrettyPrint + = lens _opPrettyPrint + (\ s a -> s{_opPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation matches the given value. +opIfGenerationMatch :: Lens' ObjectsPatch' (Maybe Word64) +opIfGenerationMatch + = lens _opIfGenerationMatch + (\ s a -> s{_opIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +opUserIp :: Lens' ObjectsPatch' (Maybe Text) +opUserIp = lens _opUserIp (\ s a -> s{_opUserIp = a}) + +-- | Name of the bucket in which the object resides. +opBucket :: Lens' ObjectsPatch' Text +opBucket = lens _opBucket (\ s a -> s{_opBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +opKey :: Lens' ObjectsPatch' (Maybe Text) +opKey = lens _opKey (\ s a -> s{_opKey = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration does not match the given value. +opIfMetagenerationNotMatch :: Lens' ObjectsPatch' (Maybe Word64) +opIfMetagenerationNotMatch + = lens _opIfMetagenerationNotMatch + (\ s a -> s{_opIfMetagenerationNotMatch = a}) + +-- | Name of the object. +opObject :: Lens' ObjectsPatch' Text +opObject = lens _opObject (\ s a -> s{_opObject = a}) + +-- | Set of properties to return. Defaults to full. +opProjection :: Lens' ObjectsPatch' (Maybe Text) +opProjection + = lens _opProjection (\ s a -> s{_opProjection = a}) + +-- | OAuth 2.0 token for the current user. +opOauthToken :: Lens' ObjectsPatch' (Maybe Text) +opOauthToken + = lens _opOauthToken (\ s a -> s{_opOauthToken = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +opGeneration :: Lens' ObjectsPatch' (Maybe Word64) +opGeneration + = lens _opGeneration (\ s a -> s{_opGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +opFields :: Lens' ObjectsPatch' (Maybe Text) +opFields = lens _opFields (\ s a -> s{_opFields = a}) + +-- | Data format for the response. +opAlt :: Lens' ObjectsPatch' Text +opAlt = lens _opAlt (\ s a -> s{_opAlt = a}) + +instance GoogleRequest ObjectsPatch' where + type Rs ObjectsPatch' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsPatch{..} + = go _opQuotaUser _opIfMetagenerationMatch + _opIfGenerationNotMatch + _opPrettyPrint + _opIfGenerationMatch + _opUserIp + _opBucket + _opKey + _opIfMetagenerationNotMatch + _opObject + _opProjection + _opOauthToken + _opGeneration + _opFields + _opAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsPatchAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs new file mode 100644 index 000000000..4a3fb2582 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs @@ -0,0 +1,247 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a data blob\'s associated metadata. +-- +-- /See:/ for @StorageObjectsUpdate@. +module Storage.Objects.Update + ( + -- * REST Resource + ObjectsUpdateAPI + + -- * Creating a Request + , objectsUpdate + , ObjectsUpdate + + -- * Request Lenses + , ouQuotaUser + , ouIfMetagenerationMatch + , ouIfGenerationNotMatch + , ouPrettyPrint + , ouIfGenerationMatch + , ouUserIp + , ouBucket + , ouKey + , ouIfMetagenerationNotMatch + , ouObject + , ouProjection + , ouOauthToken + , ouGeneration + , ouFields + , ouAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsUpdate@ which the +-- 'ObjectsUpdate' request conforms to. +type ObjectsUpdateAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + Capture "object" Text :> + QueryParam "ifMetagenerationMatch" Word64 :> + QueryParam "ifGenerationNotMatch" Word64 :> + QueryParam "ifGenerationMatch" Word64 :> + QueryParam "ifMetagenerationNotMatch" Word64 :> + QueryParam "projection" Text :> + QueryParam "generation" Word64 :> Put '[JSON] Object + +-- | Updates a data blob\'s associated metadata. +-- +-- /See:/ 'objectsUpdate' smart constructor. +data ObjectsUpdate = ObjectsUpdate + { _ouQuotaUser :: !(Maybe Text) + , _ouIfMetagenerationMatch :: !(Maybe Word64) + , _ouIfGenerationNotMatch :: !(Maybe Word64) + , _ouPrettyPrint :: !Bool + , _ouIfGenerationMatch :: !(Maybe Word64) + , _ouUserIp :: !(Maybe Text) + , _ouBucket :: !Text + , _ouKey :: !(Maybe Text) + , _ouIfMetagenerationNotMatch :: !(Maybe Word64) + , _ouObject :: !Text + , _ouProjection :: !(Maybe Text) + , _ouOauthToken :: !(Maybe Text) + , _ouGeneration :: !(Maybe Word64) + , _ouFields :: !(Maybe Text) + , _ouAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ouQuotaUser' +-- +-- * 'ouIfMetagenerationMatch' +-- +-- * 'ouIfGenerationNotMatch' +-- +-- * 'ouPrettyPrint' +-- +-- * 'ouIfGenerationMatch' +-- +-- * 'ouUserIp' +-- +-- * 'ouBucket' +-- +-- * 'ouKey' +-- +-- * 'ouIfMetagenerationNotMatch' +-- +-- * 'ouObject' +-- +-- * 'ouProjection' +-- +-- * 'ouOauthToken' +-- +-- * 'ouGeneration' +-- +-- * 'ouFields' +-- +-- * 'ouAlt' +objectsUpdate + :: Text -- ^ 'bucket' + -> Text -- ^ 'object' + -> ObjectsUpdate +objectsUpdate pOuBucket_ pOuObject_ = + ObjectsUpdate + { _ouQuotaUser = Nothing + , _ouIfMetagenerationMatch = Nothing + , _ouIfGenerationNotMatch = Nothing + , _ouPrettyPrint = True + , _ouIfGenerationMatch = Nothing + , _ouUserIp = Nothing + , _ouBucket = pOuBucket_ + , _ouKey = Nothing + , _ouIfMetagenerationNotMatch = Nothing + , _ouObject = pOuObject_ + , _ouProjection = Nothing + , _ouOauthToken = Nothing + , _ouGeneration = Nothing + , _ouFields = Nothing + , _ouAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ouQuotaUser :: Lens' ObjectsUpdate' (Maybe Text) +ouQuotaUser + = lens _ouQuotaUser (\ s a -> s{_ouQuotaUser = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration matches the given value. +ouIfMetagenerationMatch :: Lens' ObjectsUpdate' (Maybe Word64) +ouIfMetagenerationMatch + = lens _ouIfMetagenerationMatch + (\ s a -> s{_ouIfMetagenerationMatch = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation does not match the given value. +ouIfGenerationNotMatch :: Lens' ObjectsUpdate' (Maybe Word64) +ouIfGenerationNotMatch + = lens _ouIfGenerationNotMatch + (\ s a -> s{_ouIfGenerationNotMatch = a}) + +-- | Returns response with indentations and line breaks. +ouPrettyPrint :: Lens' ObjectsUpdate' Bool +ouPrettyPrint + = lens _ouPrettyPrint + (\ s a -> s{_ouPrettyPrint = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- generation matches the given value. +ouIfGenerationMatch :: Lens' ObjectsUpdate' (Maybe Word64) +ouIfGenerationMatch + = lens _ouIfGenerationMatch + (\ s a -> s{_ouIfGenerationMatch = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ouUserIp :: Lens' ObjectsUpdate' (Maybe Text) +ouUserIp = lens _ouUserIp (\ s a -> s{_ouUserIp = a}) + +-- | Name of the bucket in which the object resides. +ouBucket :: Lens' ObjectsUpdate' Text +ouBucket = lens _ouBucket (\ s a -> s{_ouBucket = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ouKey :: Lens' ObjectsUpdate' (Maybe Text) +ouKey = lens _ouKey (\ s a -> s{_ouKey = a}) + +-- | Makes the operation conditional on whether the object\'s current +-- metageneration does not match the given value. +ouIfMetagenerationNotMatch :: Lens' ObjectsUpdate' (Maybe Word64) +ouIfMetagenerationNotMatch + = lens _ouIfMetagenerationNotMatch + (\ s a -> s{_ouIfMetagenerationNotMatch = a}) + +-- | Name of the object. +ouObject :: Lens' ObjectsUpdate' Text +ouObject = lens _ouObject (\ s a -> s{_ouObject = a}) + +-- | Set of properties to return. Defaults to full. +ouProjection :: Lens' ObjectsUpdate' (Maybe Text) +ouProjection + = lens _ouProjection (\ s a -> s{_ouProjection = a}) + +-- | OAuth 2.0 token for the current user. +ouOauthToken :: Lens' ObjectsUpdate' (Maybe Text) +ouOauthToken + = lens _ouOauthToken (\ s a -> s{_ouOauthToken = a}) + +-- | If present, selects a specific revision of this object (as opposed to +-- the latest version, the default). +ouGeneration :: Lens' ObjectsUpdate' (Maybe Word64) +ouGeneration + = lens _ouGeneration (\ s a -> s{_ouGeneration = a}) + +-- | Selector specifying which fields to include in a partial response. +ouFields :: Lens' ObjectsUpdate' (Maybe Text) +ouFields = lens _ouFields (\ s a -> s{_ouFields = a}) + +-- | Data format for the response. +ouAlt :: Lens' ObjectsUpdate' Text +ouAlt = lens _ouAlt (\ s a -> s{_ouAlt = a}) + +instance GoogleRequest ObjectsUpdate' where + type Rs ObjectsUpdate' = Object + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsUpdate{..} + = go _ouQuotaUser _ouIfMetagenerationMatch + _ouIfGenerationNotMatch + _ouPrettyPrint + _ouIfGenerationMatch + _ouUserIp + _ouBucket + _ouKey + _ouIfMetagenerationNotMatch + _ouObject + _ouProjection + _ouOauthToken + _ouGeneration + _ouFields + _ouAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsUpdateAPI) r + u diff --git a/gogol-storage/gen/Network/Google/Resource/Storage/Objects/WatchAll.hs b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/WatchAll.hs new file mode 100644 index 000000000..369c288b0 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Resource/Storage/Objects/WatchAll.hs @@ -0,0 +1,240 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Storage.Objects.WatchAll +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Watch for changes on all objects in a bucket. +-- +-- /See:/ for @StorageObjectsWatchAll@. +module Storage.Objects.WatchAll + ( + -- * REST Resource + ObjectsWatchAllAPI + + -- * Creating a Request + , objectsWatchAll + , ObjectsWatchAll + + -- * Request Lenses + , owaQuotaUser + , owaPrettyPrint + , owaPrefix + , owaUserIp + , owaBucket + , owaVersions + , owaKey + , owaProjection + , owaPageToken + , owaOauthToken + , owaDelimiter + , owaMaxResults + , owaFields + , owaAlt + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types + +-- | A resource alias for @StorageObjectsWatchAll@ which the +-- 'ObjectsWatchAll' request conforms to. +type ObjectsWatchAllAPI = + "b" :> + Capture "bucket" Text :> + "o" :> + "watch" :> + QueryParam "prefix" Text :> + QueryParam "versions" Bool :> + QueryParam "projection" Text :> + QueryParam "pageToken" Text :> + QueryParam "delimiter" Text :> + QueryParam "maxResults" Word32 :> + Post '[JSON] Channel + +-- | Watch for changes on all objects in a bucket. +-- +-- /See:/ 'objectsWatchAll' smart constructor. +data ObjectsWatchAll = ObjectsWatchAll + { _owaQuotaUser :: !(Maybe Text) + , _owaPrettyPrint :: !Bool + , _owaPrefix :: !(Maybe Text) + , _owaUserIp :: !(Maybe Text) + , _owaBucket :: !Text + , _owaVersions :: !(Maybe Bool) + , _owaKey :: !(Maybe Text) + , _owaProjection :: !(Maybe Text) + , _owaPageToken :: !(Maybe Text) + , _owaOauthToken :: !(Maybe Text) + , _owaDelimiter :: !(Maybe Text) + , _owaMaxResults :: !(Maybe Word32) + , _owaFields :: !(Maybe Text) + , _owaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectsWatchAll'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'owaQuotaUser' +-- +-- * 'owaPrettyPrint' +-- +-- * 'owaPrefix' +-- +-- * 'owaUserIp' +-- +-- * 'owaBucket' +-- +-- * 'owaVersions' +-- +-- * 'owaKey' +-- +-- * 'owaProjection' +-- +-- * 'owaPageToken' +-- +-- * 'owaOauthToken' +-- +-- * 'owaDelimiter' +-- +-- * 'owaMaxResults' +-- +-- * 'owaFields' +-- +-- * 'owaAlt' +objectsWatchAll + :: Text -- ^ 'bucket' + -> ObjectsWatchAll +objectsWatchAll pOwaBucket_ = + ObjectsWatchAll + { _owaQuotaUser = Nothing + , _owaPrettyPrint = True + , _owaPrefix = Nothing + , _owaUserIp = Nothing + , _owaBucket = pOwaBucket_ + , _owaVersions = Nothing + , _owaKey = Nothing + , _owaProjection = Nothing + , _owaPageToken = Nothing + , _owaOauthToken = Nothing + , _owaDelimiter = Nothing + , _owaMaxResults = Nothing + , _owaFields = Nothing + , _owaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +owaQuotaUser :: Lens' ObjectsWatchAll' (Maybe Text) +owaQuotaUser + = lens _owaQuotaUser (\ s a -> s{_owaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +owaPrettyPrint :: Lens' ObjectsWatchAll' Bool +owaPrettyPrint + = lens _owaPrettyPrint + (\ s a -> s{_owaPrettyPrint = a}) + +-- | Filter results to objects whose names begin with this prefix. +owaPrefix :: Lens' ObjectsWatchAll' (Maybe Text) +owaPrefix + = lens _owaPrefix (\ s a -> s{_owaPrefix = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +owaUserIp :: Lens' ObjectsWatchAll' (Maybe Text) +owaUserIp + = lens _owaUserIp (\ s a -> s{_owaUserIp = a}) + +-- | Name of the bucket in which to look for objects. +owaBucket :: Lens' ObjectsWatchAll' Text +owaBucket + = lens _owaBucket (\ s a -> s{_owaBucket = a}) + +-- | If true, lists all versions of a file as distinct results. +owaVersions :: Lens' ObjectsWatchAll' (Maybe Bool) +owaVersions + = lens _owaVersions (\ s a -> s{_owaVersions = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +owaKey :: Lens' ObjectsWatchAll' (Maybe Text) +owaKey = lens _owaKey (\ s a -> s{_owaKey = a}) + +-- | Set of properties to return. Defaults to noAcl. +owaProjection :: Lens' ObjectsWatchAll' (Maybe Text) +owaProjection + = lens _owaProjection + (\ s a -> s{_owaProjection = a}) + +-- | A previously-returned page token representing part of the larger set of +-- results to view. +owaPageToken :: Lens' ObjectsWatchAll' (Maybe Text) +owaPageToken + = lens _owaPageToken (\ s a -> s{_owaPageToken = a}) + +-- | OAuth 2.0 token for the current user. +owaOauthToken :: Lens' ObjectsWatchAll' (Maybe Text) +owaOauthToken + = lens _owaOauthToken + (\ s a -> s{_owaOauthToken = a}) + +-- | Returns results in a directory-like mode. items will contain only +-- objects whose names, aside from the prefix, do not contain delimiter. +-- Objects whose names, aside from the prefix, contain delimiter will have +-- their name, truncated after the delimiter, returned in prefixes. +-- Duplicate prefixes are omitted. +owaDelimiter :: Lens' ObjectsWatchAll' (Maybe Text) +owaDelimiter + = lens _owaDelimiter (\ s a -> s{_owaDelimiter = a}) + +-- | Maximum number of items plus prefixes to return. As duplicate prefixes +-- are omitted, fewer total results may be returned than requested. +owaMaxResults :: Lens' ObjectsWatchAll' (Maybe Word32) +owaMaxResults + = lens _owaMaxResults + (\ s a -> s{_owaMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +owaFields :: Lens' ObjectsWatchAll' (Maybe Text) +owaFields + = lens _owaFields (\ s a -> s{_owaFields = a}) + +-- | Data format for the response. +owaAlt :: Lens' ObjectsWatchAll' Text +owaAlt = lens _owaAlt (\ s a -> s{_owaAlt = a}) + +instance GoogleRequest ObjectsWatchAll' where + type Rs ObjectsWatchAll' = Channel + request = requestWithRoute defReq storageURL + requestWithRoute r u ObjectsWatchAll{..} + = go _owaQuotaUser _owaPrettyPrint _owaPrefix + _owaUserIp + _owaBucket + _owaVersions + _owaKey + _owaProjection + _owaPageToken + _owaOauthToken + _owaDelimiter + _owaMaxResults + _owaFields + _owaAlt + where go + = clientWithRoute (Proxy :: Proxy ObjectsWatchAllAPI) + r + u diff --git a/gogol-storage/gen/Network/Google/Storage.hs b/gogol-storage/gen/Network/Google/Storage.hs new file mode 100644 index 000000000..f9285bf90 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Storage.hs @@ -0,0 +1,309 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Storage +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you store and retrieve potentially-large, immutable data objects. +-- +-- /See:/ +module Network.Google.Storage + ( + -- * API + StorageAPI + , storageAPI + , storageURL + + -- * Service Methods + + -- * REST Resources + + -- ** StorageBucketAccessControlsDelete + , module Storage.BucketAccessControls.Delete + + -- ** StorageBucketAccessControlsGet + , module Storage.BucketAccessControls.Get + + -- ** StorageBucketAccessControlsInsert + , module Storage.BucketAccessControls.Insert + + -- ** StorageBucketAccessControlsList + , module Storage.BucketAccessControls.List + + -- ** StorageBucketAccessControlsPatch + , module Storage.BucketAccessControls.Patch + + -- ** StorageBucketAccessControlsUpdate + , module Storage.BucketAccessControls.Update + + -- ** StorageBucketsDelete + , module Storage.Buckets.Delete + + -- ** StorageBucketsGet + , module Storage.Buckets.Get + + -- ** StorageBucketsInsert + , module Storage.Buckets.Insert + + -- ** StorageBucketsList + , module Storage.Buckets.List + + -- ** StorageBucketsPatch + , module Storage.Buckets.Patch + + -- ** StorageBucketsUpdate + , module Storage.Buckets.Update + + -- ** StorageChannelsStop + , module Storage.Channels.Stop + + -- ** StorageDefaultObjectAccessControlsDelete + , module Storage.DefaultObjectAccessControls.Delete + + -- ** StorageDefaultObjectAccessControlsGet + , module Storage.DefaultObjectAccessControls.Get + + -- ** StorageDefaultObjectAccessControlsInsert + , module Storage.DefaultObjectAccessControls.Insert + + -- ** StorageDefaultObjectAccessControlsList + , module Storage.DefaultObjectAccessControls.List + + -- ** StorageDefaultObjectAccessControlsPatch + , module Storage.DefaultObjectAccessControls.Patch + + -- ** StorageDefaultObjectAccessControlsUpdate + , module Storage.DefaultObjectAccessControls.Update + + -- ** StorageObjectAccessControlsDelete + , module Storage.ObjectAccessControls.Delete + + -- ** StorageObjectAccessControlsGet + , module Storage.ObjectAccessControls.Get + + -- ** StorageObjectAccessControlsInsert + , module Storage.ObjectAccessControls.Insert + + -- ** StorageObjectAccessControlsList + , module Storage.ObjectAccessControls.List + + -- ** StorageObjectAccessControlsPatch + , module Storage.ObjectAccessControls.Patch + + -- ** StorageObjectAccessControlsUpdate + , module Storage.ObjectAccessControls.Update + + -- ** StorageObjectsCompose + , module Storage.Objects.Compose + + -- ** StorageObjectsCopy + , module Storage.Objects.Copy + + -- ** StorageObjectsDelete + , module Storage.Objects.Delete + + -- ** StorageObjectsGet + , module Storage.Objects.Get + + -- ** StorageObjectsInsert + , module Storage.Objects.Insert + + -- ** StorageObjectsList + , module Storage.Objects.List + + -- ** StorageObjectsPatch + , module Storage.Objects.Patch + + -- ** StorageObjectsUpdate + , module Storage.Objects.Update + + -- ** StorageObjectsWatchAll + , module Storage.Objects.WatchAll + + -- * Types + + -- ** Buckets + , Buckets + , buckets + , bNextPageToken + , bKind + , bItems + + -- ** Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- ** Bucket + , Bucket + , bucket + , bucEtag + , bucLocation + , bucKind + , bucWebsite + , bucLifecycle + , bucOwner + , bucSelfLink + , bucName + , bucStorageClass + , bucVersioning + , bucCors + , bucTimeCreated + , bucId + , bucDefaultObjectAcl + , bucMetageneration + , bucLogging + , bucAcl + + -- ** BucketAccessControls + , BucketAccessControls + , bucketAccessControls + , bacKind + , bacItems + + -- ** Objects + , Objects + , objects + , oNextPageToken + , oKind + , oItems + , oPrefixes + + -- ** ComposeRequest + , ComposeRequest + , composeRequest + , crDestination + , crKind + , crSourceObjects + + -- ** BucketAccessControl + , BucketAccessControl + , bucketAccessControl + , bacaEmail + , bacaEtag + , bacaKind + , bacaDomain + , bacaBucket + , bacaRole + , bacaSelfLink + , bacaId + , bacaEntity + , bacaEntityId + + -- ** ObjectAccessControls + , ObjectAccessControls + , objectAccessControls + , oacKind + , oacItems + + -- ** Object + , Object + , object' + , objEtag + , objSize + , objKind + , objTimeDeleted + , objCrc32c + , objBucket + , objOwner + , objSelfLink + , objMediaLink + , objComponentCount + , objName + , objStorageClass + , objContentEncoding + , objMetadata + , objId + , objUpdated + , objContentLanguage + , objCacheControl + , objMetageneration + , objGeneration + , objAcl + , objContentDisposition + , objMd5Hash + , objContentType + + -- ** ObjectAccessControl + , ObjectAccessControl + , objectAccessControl + , oacaEmail + , oacaEtag + , oacaKind + , oacaDomain + , oacaBucket + , oacaRole + , oacaSelfLink + , oacaObject + , oacaId + , oacaEntity + , oacaGeneration + , oacaEntityId + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Storage.BucketAccessControls.Delete +import Network.Google.Resource.Storage.BucketAccessControls.Get +import Network.Google.Resource.Storage.BucketAccessControls.Insert +import Network.Google.Resource.Storage.BucketAccessControls.List +import Network.Google.Resource.Storage.BucketAccessControls.Patch +import Network.Google.Resource.Storage.BucketAccessControls.Update +import Network.Google.Resource.Storage.Buckets.Delete +import Network.Google.Resource.Storage.Buckets.Get +import Network.Google.Resource.Storage.Buckets.Insert +import Network.Google.Resource.Storage.Buckets.List +import Network.Google.Resource.Storage.Buckets.Patch +import Network.Google.Resource.Storage.Buckets.Update +import Network.Google.Resource.Storage.Channels.Stop +import Network.Google.Resource.Storage.DefaultObjectAccessControls.Delete +import Network.Google.Resource.Storage.DefaultObjectAccessControls.Get +import Network.Google.Resource.Storage.DefaultObjectAccessControls.Insert +import Network.Google.Resource.Storage.DefaultObjectAccessControls.List +import Network.Google.Resource.Storage.DefaultObjectAccessControls.Patch +import Network.Google.Resource.Storage.DefaultObjectAccessControls.Update +import Network.Google.Resource.Storage.ObjectAccessControls.Delete +import Network.Google.Resource.Storage.ObjectAccessControls.Get +import Network.Google.Resource.Storage.ObjectAccessControls.Insert +import Network.Google.Resource.Storage.ObjectAccessControls.List +import Network.Google.Resource.Storage.ObjectAccessControls.Patch +import Network.Google.Resource.Storage.ObjectAccessControls.Update +import Network.Google.Resource.Storage.Objects.Compose +import Network.Google.Resource.Storage.Objects.Copy +import Network.Google.Resource.Storage.Objects.Delete +import Network.Google.Resource.Storage.Objects.Get +import Network.Google.Resource.Storage.Objects.Insert +import Network.Google.Resource.Storage.Objects.List +import Network.Google.Resource.Storage.Objects.Patch +import Network.Google.Resource.Storage.Objects.Update +import Network.Google.Resource.Storage.Objects.WatchAll +import Network.Google.Storage.Types + +{- $resources +TODO +-} + +type StorageAPI = + Buckets :<|> Channels :<|> BucketAccessControls :<|> + Objects + :<|> DefaultObjectAccessControls + :<|> ObjectAccessControls + +storageAPI :: Proxy StorageAPI +storageAPI = Proxy diff --git a/gogol-storage/gen/Network/Google/Storage/Types.hs b/gogol-storage/gen/Network/Google/Storage/Types.hs new file mode 100644 index 000000000..60aa73b7f --- /dev/null +++ b/gogol-storage/gen/Network/Google/Storage/Types.hs @@ -0,0 +1,157 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Storage.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Storage.Types + ( + -- * Service URL + storageURL + + -- * Buckets + , Buckets + , buckets + , bNextPageToken + , bKind + , bItems + + -- * Channel + , Channel + , channel + , cResourceUri + , cResourceId + , cKind + , cExpiration + , cToken + , cAddress + , cPayload + , cParams + , cId + , cType + + -- * Bucket + , Bucket + , bucket + , bucEtag + , bucLocation + , bucKind + , bucWebsite + , bucLifecycle + , bucOwner + , bucSelfLink + , bucName + , bucStorageClass + , bucVersioning + , bucCors + , bucTimeCreated + , bucId + , bucDefaultObjectAcl + , bucMetageneration + , bucLogging + , bucAcl + + -- * BucketAccessControls + , BucketAccessControls + , bucketAccessControls + , bacKind + , bacItems + + -- * Objects + , Objects + , objects + , oNextPageToken + , oKind + , oItems + , oPrefixes + + -- * ComposeRequest + , ComposeRequest + , composeRequest + , crDestination + , crKind + , crSourceObjects + + -- * BucketAccessControl + , BucketAccessControl + , bucketAccessControl + , bacaEmail + , bacaEtag + , bacaKind + , bacaDomain + , bacaBucket + , bacaRole + , bacaSelfLink + , bacaId + , bacaEntity + , bacaEntityId + + -- * ObjectAccessControls + , ObjectAccessControls + , objectAccessControls + , oacKind + , oacItems + + -- * Object + , Object + , object' + , objEtag + , objSize + , objKind + , objTimeDeleted + , objCrc32c + , objBucket + , objOwner + , objSelfLink + , objMediaLink + , objComponentCount + , objName + , objStorageClass + , objContentEncoding + , objMetadata + , objId + , objUpdated + , objContentLanguage + , objCacheControl + , objMetageneration + , objGeneration + , objAcl + , objContentDisposition + , objMd5Hash + , objContentType + + -- * ObjectAccessControl + , ObjectAccessControl + , objectAccessControl + , oacaEmail + , oacaEtag + , oacaKind + , oacaDomain + , oacaBucket + , oacaRole + , oacaSelfLink + , oacaObject + , oacaId + , oacaEntity + , oacaGeneration + , oacaEntityId + ) where + +import Network.Google.Prelude +import Network.Google.Storage.Types.Product +import Network.Google.Storage.Types.Sum + +-- | URL referring to version 'v1beta2' of the Cloud Storage API. +storageURL :: BaseURL +storageURL + = BaseUrl Https + "https://www.googleapis.com/storage/v1beta2/" + 443 diff --git a/gogol-storage/gen/Network/Google/Storage/Types/Product.hs b/gogol-storage/gen/Network/Google/Storage/Types/Product.hs new file mode 100644 index 000000000..2c044c269 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Storage/Types/Product.hs @@ -0,0 +1,1267 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Storage.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Storage.Types.Product where + +import Network.Google.Prelude +import Network.Google.Storage.Types.Sum + +-- | A list of buckets. +-- +-- /See:/ 'buckets' smart constructor. +data Buckets = Buckets + { _bNextPageToken :: !(Maybe Text) + , _bKind :: !Text + , _bItems :: !(Maybe [Maybe Bucket]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Buckets' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bNextPageToken' +-- +-- * 'bKind' +-- +-- * 'bItems' +buckets + :: Buckets +buckets = + Buckets + { _bNextPageToken = Nothing + , _bKind = "storage#buckets" + , _bItems = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +bNextPageToken :: Lens' Buckets (Maybe Text) +bNextPageToken + = lens _bNextPageToken + (\ s a -> s{_bNextPageToken = a}) + +-- | The kind of item this is. For lists of buckets, this is always +-- storage#buckets. +bKind :: Lens' Buckets Text +bKind = lens _bKind (\ s a -> s{_bKind = a}) + +-- | The list of items. +bItems :: Lens' Buckets [Maybe Bucket] +bItems + = lens _bItems (\ s a -> s{_bItems = a}) . _Default . + _Coerce + +instance FromJSON Buckets where + parseJSON + = withObject "Buckets" + (\ o -> + Buckets <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "storage#buckets") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON Buckets where + toJSON Buckets{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _bNextPageToken, + Just ("kind" .= _bKind), ("items" .=) <$> _bItems]) + +-- | An notification channel used to watch for resource changes. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cResourceUri :: !(Maybe Text) + , _cResourceId :: !(Maybe Text) + , _cKind :: !Text + , _cExpiration :: !(Maybe Int64) + , _cToken :: !(Maybe Text) + , _cAddress :: !(Maybe Text) + , _cPayload :: !(Maybe Bool) + , _cParams :: !(Maybe ChannelParams) + , _cId :: !(Maybe Text) + , _cType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cResourceUri' +-- +-- * 'cResourceId' +-- +-- * 'cKind' +-- +-- * 'cExpiration' +-- +-- * 'cToken' +-- +-- * 'cAddress' +-- +-- * 'cPayload' +-- +-- * 'cParams' +-- +-- * 'cId' +-- +-- * 'cType' +channel + :: Channel +channel = + Channel + { _cResourceUri = Nothing + , _cResourceId = Nothing + , _cKind = "api#channel" + , _cExpiration = Nothing + , _cToken = Nothing + , _cAddress = Nothing + , _cPayload = Nothing + , _cParams = Nothing + , _cId = Nothing + , _cType = Nothing + } + +-- | A version-specific identifier for the watched resource. +cResourceUri :: Lens' Channel (Maybe Text) +cResourceUri + = lens _cResourceUri (\ s a -> s{_cResourceUri = a}) + +-- | An opaque ID that identifies the resource being watched on this channel. +-- Stable across different API versions. +cResourceId :: Lens' Channel (Maybe Text) +cResourceId + = lens _cResourceId (\ s a -> s{_cResourceId = a}) + +-- | Identifies this as a notification channel used to watch for changes to a +-- resource. Value: the fixed string \"api#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | Date and time of notification channel expiration, expressed as a Unix +-- timestamp, in milliseconds. Optional. +cExpiration :: Lens' Channel (Maybe Int64) +cExpiration + = lens _cExpiration (\ s a -> s{_cExpiration = a}) + +-- | An arbitrary string delivered to the target address with each +-- notification delivered over this channel. Optional. +cToken :: Lens' Channel (Maybe Text) +cToken = lens _cToken (\ s a -> s{_cToken = a}) + +-- | The address where notifications are delivered for this channel. +cAddress :: Lens' Channel (Maybe Text) +cAddress = lens _cAddress (\ s a -> s{_cAddress = a}) + +-- | A Boolean value to indicate whether payload is wanted. Optional. +cPayload :: Lens' Channel (Maybe Bool) +cPayload = lens _cPayload (\ s a -> s{_cPayload = a}) + +-- | Additional parameters controlling delivery channel behavior. Optional. +cParams :: Lens' Channel (Maybe ChannelParams) +cParams = lens _cParams (\ s a -> s{_cParams = a}) + +-- | A UUID or similar unique string that identifies this channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The type of delivery mechanism used for this channel. +cType :: Lens' Channel (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "resourceUri") <*> (o .:? "resourceId") <*> + (o .:? "kind" .!= "api#channel") + <*> (o .:? "expiration") + <*> (o .:? "token") + <*> (o .:? "address") + <*> (o .:? "payload") + <*> (o .:? "params") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("resourceUri" .=) <$> _cResourceUri, + ("resourceId" .=) <$> _cResourceId, + Just ("kind" .= _cKind), + ("expiration" .=) <$> _cExpiration, + ("token" .=) <$> _cToken, + ("address" .=) <$> _cAddress, + ("payload" .=) <$> _cPayload, + ("params" .=) <$> _cParams, ("id" .=) <$> _cId, + ("type" .=) <$> _cType]) + +-- | A bucket. +-- +-- /See:/ 'bucket' smart constructor. +data Bucket = Bucket + { _bucEtag :: !(Maybe Text) + , _bucLocation :: !(Maybe Text) + , _bucKind :: !Text + , _bucWebsite :: !(Maybe BucketWebsite) + , _bucLifecycle :: !(Maybe BucketLifecycle) + , _bucOwner :: !(Maybe BucketOwner) + , _bucSelfLink :: !(Maybe Text) + , _bucName :: !(Maybe Text) + , _bucStorageClass :: !(Maybe Text) + , _bucVersioning :: !(Maybe BucketVersioning) + , _bucCors :: !(Maybe [BucketCORSItem]) + , _bucTimeCreated :: !(Maybe UTCTime) + , _bucId :: !(Maybe Text) + , _bucDefaultObjectAcl :: !(Maybe [Maybe ObjectAccessControl]) + , _bucMetageneration :: !(Maybe Int64) + , _bucLogging :: !(Maybe BucketLogging) + , _bucAcl :: !(Maybe [Maybe BucketAccessControl]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Bucket' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bucEtag' +-- +-- * 'bucLocation' +-- +-- * 'bucKind' +-- +-- * 'bucWebsite' +-- +-- * 'bucLifecycle' +-- +-- * 'bucOwner' +-- +-- * 'bucSelfLink' +-- +-- * 'bucName' +-- +-- * 'bucStorageClass' +-- +-- * 'bucVersioning' +-- +-- * 'bucCors' +-- +-- * 'bucTimeCreated' +-- +-- * 'bucId' +-- +-- * 'bucDefaultObjectAcl' +-- +-- * 'bucMetageneration' +-- +-- * 'bucLogging' +-- +-- * 'bucAcl' +bucket + :: Bucket +bucket = + Bucket + { _bucEtag = Nothing + , _bucLocation = Nothing + , _bucKind = "storage#bucket" + , _bucWebsite = Nothing + , _bucLifecycle = Nothing + , _bucOwner = Nothing + , _bucSelfLink = Nothing + , _bucName = Nothing + , _bucStorageClass = Nothing + , _bucVersioning = Nothing + , _bucCors = Nothing + , _bucTimeCreated = Nothing + , _bucId = Nothing + , _bucDefaultObjectAcl = Nothing + , _bucMetageneration = Nothing + , _bucLogging = Nothing + , _bucAcl = Nothing + } + +-- | HTTP 1.1 Entity tag for the bucket. +bucEtag :: Lens' Bucket (Maybe Text) +bucEtag = lens _bucEtag (\ s a -> s{_bucEtag = a}) + +-- | The location of the bucket. Object data for objects in the bucket +-- resides in physical storage within this region. Typical values are US +-- and EU. Defaults to US. See the developer\'s guide for the authoritative +-- list. +bucLocation :: Lens' Bucket (Maybe Text) +bucLocation + = lens _bucLocation (\ s a -> s{_bucLocation = a}) + +-- | The kind of item this is. For buckets, this is always storage#bucket. +bucKind :: Lens' Bucket Text +bucKind = lens _bucKind (\ s a -> s{_bucKind = a}) + +-- | The bucket\'s website configuration. +bucWebsite :: Lens' Bucket (Maybe BucketWebsite) +bucWebsite + = lens _bucWebsite (\ s a -> s{_bucWebsite = a}) + +-- | The bucket\'s lifecycle configuration. See object lifecycle management +-- for more information. +bucLifecycle :: Lens' Bucket (Maybe BucketLifecycle) +bucLifecycle + = lens _bucLifecycle (\ s a -> s{_bucLifecycle = a}) + +-- | The owner of the bucket. This is always the project team\'s owner group. +bucOwner :: Lens' Bucket (Maybe BucketOwner) +bucOwner = lens _bucOwner (\ s a -> s{_bucOwner = a}) + +-- | The URI of this bucket. +bucSelfLink :: Lens' Bucket (Maybe Text) +bucSelfLink + = lens _bucSelfLink (\ s a -> s{_bucSelfLink = a}) + +-- | The name of the bucket. +bucName :: Lens' Bucket (Maybe Text) +bucName = lens _bucName (\ s a -> s{_bucName = a}) + +-- | The bucket\'s storage class. This defines how objects in the bucket are +-- stored and determines the SLA and the cost of storage. Typical values +-- are STANDARD and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. See +-- the developer\'s guide for the authoritative list. +bucStorageClass :: Lens' Bucket (Maybe Text) +bucStorageClass + = lens _bucStorageClass + (\ s a -> s{_bucStorageClass = a}) + +-- | The bucket\'s versioning configuration. +bucVersioning :: Lens' Bucket (Maybe BucketVersioning) +bucVersioning + = lens _bucVersioning + (\ s a -> s{_bucVersioning = a}) + +-- | The bucket\'s Cross-Origin Resource Sharing (CORS) configuration. +bucCors :: Lens' Bucket [BucketCORSItem] +bucCors + = lens _bucCors (\ s a -> s{_bucCors = a}) . _Default + . _Coerce + +-- | Creation time of the bucket in RFC 3339 format. +bucTimeCreated :: Lens' Bucket (Maybe UTCTime) +bucTimeCreated + = lens _bucTimeCreated + (\ s a -> s{_bucTimeCreated = a}) + +-- | The ID of the bucket. +bucId :: Lens' Bucket (Maybe Text) +bucId = lens _bucId (\ s a -> s{_bucId = a}) + +-- | Default access controls to apply to new objects when no ACL is provided. +bucDefaultObjectAcl :: Lens' Bucket [Maybe ObjectAccessControl] +bucDefaultObjectAcl + = lens _bucDefaultObjectAcl + (\ s a -> s{_bucDefaultObjectAcl = a}) + . _Default + . _Coerce + +-- | The metadata generation of this bucket. +bucMetageneration :: Lens' Bucket (Maybe Int64) +bucMetageneration + = lens _bucMetageneration + (\ s a -> s{_bucMetageneration = a}) + +-- | The bucket\'s logging configuration, which defines the destination +-- bucket and optional name prefix for the current bucket\'s logs. +bucLogging :: Lens' Bucket (Maybe BucketLogging) +bucLogging + = lens _bucLogging (\ s a -> s{_bucLogging = a}) + +-- | Access controls on the bucket. +bucAcl :: Lens' Bucket [Maybe BucketAccessControl] +bucAcl + = lens _bucAcl (\ s a -> s{_bucAcl = a}) . _Default . + _Coerce + +instance FromJSON Bucket where + parseJSON + = withObject "Bucket" + (\ o -> + Bucket <$> + (o .:? "etag") <*> (o .:? "location") <*> + (o .:? "kind" .!= "storage#bucket") + <*> (o .:? "website") + <*> (o .:? "lifecycle") + <*> (o .:? "owner") + <*> (o .:? "selfLink") + <*> (o .:? "name") + <*> (o .:? "storageClass") + <*> (o .:? "versioning") + <*> (o .:? "cors" .!= mempty) + <*> (o .:? "timeCreated") + <*> (o .:? "id") + <*> (o .:? "defaultObjectAcl" .!= mempty) + <*> (o .:? "metageneration") + <*> (o .:? "logging") + <*> (o .:? "acl" .!= mempty)) + +instance ToJSON Bucket where + toJSON Bucket{..} + = object + (catMaybes + [("etag" .=) <$> _bucEtag, + ("location" .=) <$> _bucLocation, + Just ("kind" .= _bucKind), + ("website" .=) <$> _bucWebsite, + ("lifecycle" .=) <$> _bucLifecycle, + ("owner" .=) <$> _bucOwner, + ("selfLink" .=) <$> _bucSelfLink, + ("name" .=) <$> _bucName, + ("storageClass" .=) <$> _bucStorageClass, + ("versioning" .=) <$> _bucVersioning, + ("cors" .=) <$> _bucCors, + ("timeCreated" .=) <$> _bucTimeCreated, + ("id" .=) <$> _bucId, + ("defaultObjectAcl" .=) <$> _bucDefaultObjectAcl, + ("metageneration" .=) <$> _bucMetageneration, + ("logging" .=) <$> _bucLogging, + ("acl" .=) <$> _bucAcl]) + +-- | An access-control list. +-- +-- /See:/ 'bucketAccessControls' smart constructor. +data BucketAccessControls = BucketAccessControls + { _bacKind :: !Text + , _bacItems :: !(Maybe [Maybe BucketAccessControl]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControls' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacKind' +-- +-- * 'bacItems' +bucketAccessControls + :: BucketAccessControls +bucketAccessControls = + BucketAccessControls + { _bacKind = "storage#bucketAccessControls" + , _bacItems = Nothing + } + +-- | The kind of item this is. For lists of bucket access control entries, +-- this is always storage#bucketAccessControls. +bacKind :: Lens' BucketAccessControls Text +bacKind = lens _bacKind (\ s a -> s{_bacKind = a}) + +-- | The list of items. +bacItems :: Lens' BucketAccessControls [Maybe BucketAccessControl] +bacItems + = lens _bacItems (\ s a -> s{_bacItems = a}) . + _Default + . _Coerce + +instance FromJSON BucketAccessControls where + parseJSON + = withObject "BucketAccessControls" + (\ o -> + BucketAccessControls <$> + (o .:? "kind" .!= "storage#bucketAccessControls") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON BucketAccessControls where + toJSON BucketAccessControls{..} + = object + (catMaybes + [Just ("kind" .= _bacKind), + ("items" .=) <$> _bacItems]) + +-- | A list of objects. +-- +-- /See:/ 'objects' smart constructor. +data Objects = Objects + { _oNextPageToken :: !(Maybe Text) + , _oKind :: !Text + , _oItems :: !(Maybe [Maybe Object]) + , _oPrefixes :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Objects' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oNextPageToken' +-- +-- * 'oKind' +-- +-- * 'oItems' +-- +-- * 'oPrefixes' +objects + :: Objects +objects = + Objects + { _oNextPageToken = Nothing + , _oKind = "storage#objects" + , _oItems = Nothing + , _oPrefixes = Nothing + } + +-- | The continuation token, used to page through large result sets. Provide +-- this value in a subsequent request to return the next page of results. +oNextPageToken :: Lens' Objects (Maybe Text) +oNextPageToken + = lens _oNextPageToken + (\ s a -> s{_oNextPageToken = a}) + +-- | The kind of item this is. For lists of objects, this is always +-- storage#objects. +oKind :: Lens' Objects Text +oKind = lens _oKind (\ s a -> s{_oKind = a}) + +-- | The list of items. +oItems :: Lens' Objects [Maybe Object] +oItems + = lens _oItems (\ s a -> s{_oItems = a}) . _Default . + _Coerce + +-- | The list of prefixes of objects matching-but-not-listed up to and +-- including the requested delimiter. +oPrefixes :: Lens' Objects [Text] +oPrefixes + = lens _oPrefixes (\ s a -> s{_oPrefixes = a}) . + _Default + . _Coerce + +instance FromJSON Objects where + parseJSON + = withObject "Objects" + (\ o -> + Objects <$> + (o .:? "nextPageToken") <*> + (o .:? "kind" .!= "storage#objects") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "prefixes" .!= mempty)) + +instance ToJSON Objects where + toJSON Objects{..} + = object + (catMaybes + [("nextPageToken" .=) <$> _oNextPageToken, + Just ("kind" .= _oKind), ("items" .=) <$> _oItems, + ("prefixes" .=) <$> _oPrefixes]) + +-- | A Compose request. +-- +-- /See:/ 'composeRequest' smart constructor. +data ComposeRequest = ComposeRequest + { _crDestination :: !(Maybe (Maybe Object)) + , _crKind :: !Text + , _crSourceObjects :: !(Maybe [ComposeRequestSourceObjectsItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ComposeRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crDestination' +-- +-- * 'crKind' +-- +-- * 'crSourceObjects' +composeRequest + :: ComposeRequest +composeRequest = + ComposeRequest + { _crDestination = Nothing + , _crKind = "storage#composeRequest" + , _crSourceObjects = Nothing + } + +-- | Properties of the resulting object +crDestination :: Lens' ComposeRequest (Maybe (Maybe Object)) +crDestination + = lens _crDestination + (\ s a -> s{_crDestination = a}) + +-- | The kind of item this is. +crKind :: Lens' ComposeRequest Text +crKind = lens _crKind (\ s a -> s{_crKind = a}) + +-- | The list of source objects that will be concatenated into a single +-- object. +crSourceObjects :: Lens' ComposeRequest [ComposeRequestSourceObjectsItem] +crSourceObjects + = lens _crSourceObjects + (\ s a -> s{_crSourceObjects = a}) + . _Default + . _Coerce + +instance FromJSON ComposeRequest where + parseJSON + = withObject "ComposeRequest" + (\ o -> + ComposeRequest <$> + (o .:? "destination") <*> + (o .:? "kind" .!= "storage#composeRequest") + <*> (o .:? "sourceObjects" .!= mempty)) + +instance ToJSON ComposeRequest where + toJSON ComposeRequest{..} + = object + (catMaybes + [("destination" .=) <$> _crDestination, + Just ("kind" .= _crKind), + ("sourceObjects" .=) <$> _crSourceObjects]) + +-- | An access-control entry. +-- +-- /See:/ 'bucketAccessControl' smart constructor. +data BucketAccessControl = BucketAccessControl + { _bacaEmail :: !(Maybe Text) + , _bacaEtag :: !(Maybe Text) + , _bacaKind :: !Text + , _bacaDomain :: !(Maybe Text) + , _bacaBucket :: !(Maybe Text) + , _bacaRole :: !(Maybe Text) + , _bacaSelfLink :: !(Maybe Text) + , _bacaId :: !(Maybe Text) + , _bacaEntity :: !(Maybe Text) + , _bacaEntityId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BucketAccessControl' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'bacaEmail' +-- +-- * 'bacaEtag' +-- +-- * 'bacaKind' +-- +-- * 'bacaDomain' +-- +-- * 'bacaBucket' +-- +-- * 'bacaRole' +-- +-- * 'bacaSelfLink' +-- +-- * 'bacaId' +-- +-- * 'bacaEntity' +-- +-- * 'bacaEntityId' +bucketAccessControl + :: BucketAccessControl +bucketAccessControl = + BucketAccessControl + { _bacaEmail = Nothing + , _bacaEtag = Nothing + , _bacaKind = "storage#bucketAccessControl" + , _bacaDomain = Nothing + , _bacaBucket = Nothing + , _bacaRole = Nothing + , _bacaSelfLink = Nothing + , _bacaId = Nothing + , _bacaEntity = Nothing + , _bacaEntityId = Nothing + } + +-- | The email address associated with the entity, if any. +bacaEmail :: Lens' BucketAccessControl (Maybe Text) +bacaEmail + = lens _bacaEmail (\ s a -> s{_bacaEmail = a}) + +-- | HTTP 1.1 Entity tag for the access-control entry. +bacaEtag :: Lens' BucketAccessControl (Maybe Text) +bacaEtag = lens _bacaEtag (\ s a -> s{_bacaEtag = a}) + +-- | The kind of item this is. For bucket access control entries, this is +-- always storage#bucketAccessControl. +bacaKind :: Lens' BucketAccessControl Text +bacaKind = lens _bacaKind (\ s a -> s{_bacaKind = a}) + +-- | The domain associated with the entity, if any. +bacaDomain :: Lens' BucketAccessControl (Maybe Text) +bacaDomain + = lens _bacaDomain (\ s a -> s{_bacaDomain = a}) + +-- | The name of the bucket. +bacaBucket :: Lens' BucketAccessControl (Maybe Text) +bacaBucket + = lens _bacaBucket (\ s a -> s{_bacaBucket = a}) + +-- | The access permission for the entity. Can be READER, WRITER, or OWNER. +bacaRole :: Lens' BucketAccessControl (Maybe Text) +bacaRole = lens _bacaRole (\ s a -> s{_bacaRole = a}) + +-- | The link to this access-control entry. +bacaSelfLink :: Lens' BucketAccessControl (Maybe Text) +bacaSelfLink + = lens _bacaSelfLink (\ s a -> s{_bacaSelfLink = a}) + +-- | The ID of the access-control entry. +bacaId :: Lens' BucketAccessControl (Maybe Text) +bacaId = lens _bacaId (\ s a -> s{_bacaId = a}) + +-- | The entity holding the permission, in one of the following forms: - +-- user-userId - user-email - group-groupId - group-email - domain-domain - +-- allUsers - allAuthenticatedUsers Examples: - The user liz\'example.com +-- would be user-liz\'example.com. - The group example\'googlegroups.com +-- would be group-example\'googlegroups.com. - To refer to all members of +-- the Google Apps for Business domain example.com, the entity would be +-- domain-example.com. +bacaEntity :: Lens' BucketAccessControl (Maybe Text) +bacaEntity + = lens _bacaEntity (\ s a -> s{_bacaEntity = a}) + +-- | The ID for the entity, if any. +bacaEntityId :: Lens' BucketAccessControl (Maybe Text) +bacaEntityId + = lens _bacaEntityId (\ s a -> s{_bacaEntityId = a}) + +instance FromJSON BucketAccessControl where + parseJSON + = withObject "BucketAccessControl" + (\ o -> + BucketAccessControl <$> + (o .:? "email") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "storage#bucketAccessControl") + <*> (o .:? "domain") + <*> (o .:? "bucket") + <*> (o .:? "role") + <*> (o .:? "selfLink") + <*> (o .:? "id") + <*> (o .:? "entity") + <*> (o .:? "entityId")) + +instance ToJSON BucketAccessControl where + toJSON BucketAccessControl{..} + = object + (catMaybes + [("email" .=) <$> _bacaEmail, + ("etag" .=) <$> _bacaEtag, + Just ("kind" .= _bacaKind), + ("domain" .=) <$> _bacaDomain, + ("bucket" .=) <$> _bacaBucket, + ("role" .=) <$> _bacaRole, + ("selfLink" .=) <$> _bacaSelfLink, + ("id" .=) <$> _bacaId, ("entity" .=) <$> _bacaEntity, + ("entityId" .=) <$> _bacaEntityId]) + +-- | An access-control list. +-- +-- /See:/ 'objectAccessControls' smart constructor. +data ObjectAccessControls = ObjectAccessControls + { _oacKind :: !Text + , _oacItems :: !(Maybe [JSON]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControls' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacKind' +-- +-- * 'oacItems' +objectAccessControls + :: ObjectAccessControls +objectAccessControls = + ObjectAccessControls + { _oacKind = "storage#objectAccessControls" + , _oacItems = Nothing + } + +-- | The kind of item this is. For lists of object access control entries, +-- this is always storage#objectAccessControls. +oacKind :: Lens' ObjectAccessControls Text +oacKind = lens _oacKind (\ s a -> s{_oacKind = a}) + +-- | The list of items. +oacItems :: Lens' ObjectAccessControls [JSON] +oacItems + = lens _oacItems (\ s a -> s{_oacItems = a}) . + _Default + . _Coerce + +instance FromJSON ObjectAccessControls where + parseJSON + = withObject "ObjectAccessControls" + (\ o -> + ObjectAccessControls <$> + (o .:? "kind" .!= "storage#objectAccessControls") <*> + (o .:? "items" .!= mempty)) + +instance ToJSON ObjectAccessControls where + toJSON ObjectAccessControls{..} + = object + (catMaybes + [Just ("kind" .= _oacKind), + ("items" .=) <$> _oacItems]) + +-- | An object. +-- +-- /See:/ 'object'' smart constructor. +data Object = Object + { _objEtag :: !(Maybe Text) + , _objSize :: !(Maybe Word64) + , _objKind :: !Text + , _objTimeDeleted :: !(Maybe UTCTime) + , _objCrc32c :: !(Maybe Text) + , _objBucket :: !(Maybe Text) + , _objOwner :: !(Maybe ObjectOwner) + , _objSelfLink :: !(Maybe Text) + , _objMediaLink :: !(Maybe Text) + , _objComponentCount :: !(Maybe Int32) + , _objName :: !(Maybe Text) + , _objStorageClass :: !(Maybe Text) + , _objContentEncoding :: !(Maybe Text) + , _objMetadata :: !(Maybe ObjectMetadata) + , _objId :: !(Maybe Text) + , _objUpdated :: !(Maybe UTCTime) + , _objContentLanguage :: !(Maybe Text) + , _objCacheControl :: !(Maybe Text) + , _objMetageneration :: !(Maybe Int64) + , _objGeneration :: !(Maybe Int64) + , _objAcl :: !(Maybe [Maybe ObjectAccessControl]) + , _objContentDisposition :: !(Maybe Text) + , _objMd5Hash :: !(Maybe Text) + , _objContentType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Object' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'objEtag' +-- +-- * 'objSize' +-- +-- * 'objKind' +-- +-- * 'objTimeDeleted' +-- +-- * 'objCrc32c' +-- +-- * 'objBucket' +-- +-- * 'objOwner' +-- +-- * 'objSelfLink' +-- +-- * 'objMediaLink' +-- +-- * 'objComponentCount' +-- +-- * 'objName' +-- +-- * 'objStorageClass' +-- +-- * 'objContentEncoding' +-- +-- * 'objMetadata' +-- +-- * 'objId' +-- +-- * 'objUpdated' +-- +-- * 'objContentLanguage' +-- +-- * 'objCacheControl' +-- +-- * 'objMetageneration' +-- +-- * 'objGeneration' +-- +-- * 'objAcl' +-- +-- * 'objContentDisposition' +-- +-- * 'objMd5Hash' +-- +-- * 'objContentType' +object' + :: Object +object' = + Object + { _objEtag = Nothing + , _objSize = Nothing + , _objKind = "storage#object" + , _objTimeDeleted = Nothing + , _objCrc32c = Nothing + , _objBucket = Nothing + , _objOwner = Nothing + , _objSelfLink = Nothing + , _objMediaLink = Nothing + , _objComponentCount = Nothing + , _objName = Nothing + , _objStorageClass = Nothing + , _objContentEncoding = Nothing + , _objMetadata = Nothing + , _objId = Nothing + , _objUpdated = Nothing + , _objContentLanguage = Nothing + , _objCacheControl = Nothing + , _objMetageneration = Nothing + , _objGeneration = Nothing + , _objAcl = Nothing + , _objContentDisposition = Nothing + , _objMd5Hash = Nothing + , _objContentType = Nothing + } + +-- | HTTP 1.1 Entity tag for the object. +objEtag :: Lens' Object (Maybe Text) +objEtag = lens _objEtag (\ s a -> s{_objEtag = a}) + +-- | Content-Length of the data in bytes. +objSize :: Lens' Object (Maybe Word64) +objSize = lens _objSize (\ s a -> s{_objSize = a}) + +-- | The kind of item this is. For objects, this is always storage#object. +objKind :: Lens' Object Text +objKind = lens _objKind (\ s a -> s{_objKind = a}) + +-- | Deletion time of the object in RFC 3339 format. Will be returned if and +-- only if this version of the object has been deleted. +objTimeDeleted :: Lens' Object (Maybe UTCTime) +objTimeDeleted + = lens _objTimeDeleted + (\ s a -> s{_objTimeDeleted = a}) + +-- | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using +-- base64. +objCrc32c :: Lens' Object (Maybe Text) +objCrc32c + = lens _objCrc32c (\ s a -> s{_objCrc32c = a}) + +-- | The bucket containing this object. +objBucket :: Lens' Object (Maybe Text) +objBucket + = lens _objBucket (\ s a -> s{_objBucket = a}) + +-- | The owner of the object. This will always be the uploader of the object. +objOwner :: Lens' Object (Maybe ObjectOwner) +objOwner = lens _objOwner (\ s a -> s{_objOwner = a}) + +-- | The link to this object. +objSelfLink :: Lens' Object (Maybe Text) +objSelfLink + = lens _objSelfLink (\ s a -> s{_objSelfLink = a}) + +-- | Media download link. +objMediaLink :: Lens' Object (Maybe Text) +objMediaLink + = lens _objMediaLink (\ s a -> s{_objMediaLink = a}) + +-- | Number of underlying components that make up this object. Components are +-- accumulated by compose operations and are limited to a count of 32. +objComponentCount :: Lens' Object (Maybe Int32) +objComponentCount + = lens _objComponentCount + (\ s a -> s{_objComponentCount = a}) + +-- | The name of this object. Required if not specified by URL parameter. +objName :: Lens' Object (Maybe Text) +objName = lens _objName (\ s a -> s{_objName = a}) + +-- | Storage class of the object. +objStorageClass :: Lens' Object (Maybe Text) +objStorageClass + = lens _objStorageClass + (\ s a -> s{_objStorageClass = a}) + +-- | Content-Encoding of the object data. +objContentEncoding :: Lens' Object (Maybe Text) +objContentEncoding + = lens _objContentEncoding + (\ s a -> s{_objContentEncoding = a}) + +-- | User-provided metadata, in key\/value pairs. +objMetadata :: Lens' Object (Maybe ObjectMetadata) +objMetadata + = lens _objMetadata (\ s a -> s{_objMetadata = a}) + +-- | The ID of the object. +objId :: Lens' Object (Maybe Text) +objId = lens _objId (\ s a -> s{_objId = a}) + +-- | Modification time of the object metadata in RFC 3339 format. +objUpdated :: Lens' Object (Maybe UTCTime) +objUpdated + = lens _objUpdated (\ s a -> s{_objUpdated = a}) + +-- | Content-Language of the object data. +objContentLanguage :: Lens' Object (Maybe Text) +objContentLanguage + = lens _objContentLanguage + (\ s a -> s{_objContentLanguage = a}) + +-- | Cache-Control directive for the object data. +objCacheControl :: Lens' Object (Maybe Text) +objCacheControl + = lens _objCacheControl + (\ s a -> s{_objCacheControl = a}) + +-- | The generation of the metadata for this object at this generation. Used +-- for metadata versioning. Has no meaning outside of the context of this +-- generation. +objMetageneration :: Lens' Object (Maybe Int64) +objMetageneration + = lens _objMetageneration + (\ s a -> s{_objMetageneration = a}) + +-- | The content generation of this object. Used for object versioning. +objGeneration :: Lens' Object (Maybe Int64) +objGeneration + = lens _objGeneration + (\ s a -> s{_objGeneration = a}) + +-- | Access controls on the object. +objAcl :: Lens' Object [Maybe ObjectAccessControl] +objAcl + = lens _objAcl (\ s a -> s{_objAcl = a}) . _Default . + _Coerce + +-- | Content-Disposition of the object data. +objContentDisposition :: Lens' Object (Maybe Text) +objContentDisposition + = lens _objContentDisposition + (\ s a -> s{_objContentDisposition = a}) + +-- | MD5 hash of the data; encoded using base64. +objMd5Hash :: Lens' Object (Maybe Text) +objMd5Hash + = lens _objMd5Hash (\ s a -> s{_objMd5Hash = a}) + +-- | Content-Type of the object data. +objContentType :: Lens' Object (Maybe Text) +objContentType + = lens _objContentType + (\ s a -> s{_objContentType = a}) + +instance FromJSON Object where + parseJSON + = withObject "Object" + (\ o -> + Object <$> + (o .:? "etag") <*> (o .:? "size") <*> + (o .:? "kind" .!= "storage#object") + <*> (o .:? "timeDeleted") + <*> (o .:? "crc32c") + <*> (o .:? "bucket") + <*> (o .:? "owner") + <*> (o .:? "selfLink") + <*> (o .:? "mediaLink") + <*> (o .:? "componentCount") + <*> (o .:? "name") + <*> (o .:? "storageClass") + <*> (o .:? "contentEncoding") + <*> (o .:? "metadata") + <*> (o .:? "id") + <*> (o .:? "updated") + <*> (o .:? "contentLanguage") + <*> (o .:? "cacheControl") + <*> (o .:? "metageneration") + <*> (o .:? "generation") + <*> (o .:? "acl" .!= mempty) + <*> (o .:? "contentDisposition") + <*> (o .:? "md5Hash") + <*> (o .:? "contentType")) + +instance ToJSON Object where + toJSON Object{..} + = object + (catMaybes + [("etag" .=) <$> _objEtag, ("size" .=) <$> _objSize, + Just ("kind" .= _objKind), + ("timeDeleted" .=) <$> _objTimeDeleted, + ("crc32c" .=) <$> _objCrc32c, + ("bucket" .=) <$> _objBucket, + ("owner" .=) <$> _objOwner, + ("selfLink" .=) <$> _objSelfLink, + ("mediaLink" .=) <$> _objMediaLink, + ("componentCount" .=) <$> _objComponentCount, + ("name" .=) <$> _objName, + ("storageClass" .=) <$> _objStorageClass, + ("contentEncoding" .=) <$> _objContentEncoding, + ("metadata" .=) <$> _objMetadata, + ("id" .=) <$> _objId, ("updated" .=) <$> _objUpdated, + ("contentLanguage" .=) <$> _objContentLanguage, + ("cacheControl" .=) <$> _objCacheControl, + ("metageneration" .=) <$> _objMetageneration, + ("generation" .=) <$> _objGeneration, + ("acl" .=) <$> _objAcl, + ("contentDisposition" .=) <$> _objContentDisposition, + ("md5Hash" .=) <$> _objMd5Hash, + ("contentType" .=) <$> _objContentType]) + +-- | An access-control entry. +-- +-- /See:/ 'objectAccessControl' smart constructor. +data ObjectAccessControl = ObjectAccessControl + { _oacaEmail :: !(Maybe Text) + , _oacaEtag :: !(Maybe Text) + , _oacaKind :: !Text + , _oacaDomain :: !(Maybe Text) + , _oacaBucket :: !(Maybe Text) + , _oacaRole :: !(Maybe Text) + , _oacaSelfLink :: !(Maybe Text) + , _oacaObject :: !(Maybe Text) + , _oacaId :: !(Maybe Text) + , _oacaEntity :: !(Maybe Text) + , _oacaGeneration :: !(Maybe Int64) + , _oacaEntityId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ObjectAccessControl' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'oacaEmail' +-- +-- * 'oacaEtag' +-- +-- * 'oacaKind' +-- +-- * 'oacaDomain' +-- +-- * 'oacaBucket' +-- +-- * 'oacaRole' +-- +-- * 'oacaSelfLink' +-- +-- * 'oacaObject' +-- +-- * 'oacaId' +-- +-- * 'oacaEntity' +-- +-- * 'oacaGeneration' +-- +-- * 'oacaEntityId' +objectAccessControl + :: ObjectAccessControl +objectAccessControl = + ObjectAccessControl + { _oacaEmail = Nothing + , _oacaEtag = Nothing + , _oacaKind = "storage#objectAccessControl" + , _oacaDomain = Nothing + , _oacaBucket = Nothing + , _oacaRole = Nothing + , _oacaSelfLink = Nothing + , _oacaObject = Nothing + , _oacaId = Nothing + , _oacaEntity = Nothing + , _oacaGeneration = Nothing + , _oacaEntityId = Nothing + } + +-- | The email address associated with the entity, if any. +oacaEmail :: Lens' ObjectAccessControl (Maybe Text) +oacaEmail + = lens _oacaEmail (\ s a -> s{_oacaEmail = a}) + +-- | HTTP 1.1 Entity tag for the access-control entry. +oacaEtag :: Lens' ObjectAccessControl (Maybe Text) +oacaEtag = lens _oacaEtag (\ s a -> s{_oacaEtag = a}) + +-- | The kind of item this is. For object access control entries, this is +-- always storage#objectAccessControl. +oacaKind :: Lens' ObjectAccessControl Text +oacaKind = lens _oacaKind (\ s a -> s{_oacaKind = a}) + +-- | The domain associated with the entity, if any. +oacaDomain :: Lens' ObjectAccessControl (Maybe Text) +oacaDomain + = lens _oacaDomain (\ s a -> s{_oacaDomain = a}) + +-- | The name of the bucket. +oacaBucket :: Lens' ObjectAccessControl (Maybe Text) +oacaBucket + = lens _oacaBucket (\ s a -> s{_oacaBucket = a}) + +-- | The access permission for the entity. Can be READER or OWNER. +oacaRole :: Lens' ObjectAccessControl (Maybe Text) +oacaRole = lens _oacaRole (\ s a -> s{_oacaRole = a}) + +-- | The link to this access-control entry. +oacaSelfLink :: Lens' ObjectAccessControl (Maybe Text) +oacaSelfLink + = lens _oacaSelfLink (\ s a -> s{_oacaSelfLink = a}) + +-- | The name of the object. +oacaObject :: Lens' ObjectAccessControl (Maybe Text) +oacaObject + = lens _oacaObject (\ s a -> s{_oacaObject = a}) + +-- | The ID of the access-control entry. +oacaId :: Lens' ObjectAccessControl (Maybe Text) +oacaId = lens _oacaId (\ s a -> s{_oacaId = a}) + +-- | The entity holding the permission, in one of the following forms: - +-- user-userId - user-email - group-groupId - group-email - domain-domain - +-- allUsers - allAuthenticatedUsers Examples: - The user liz\'example.com +-- would be user-liz\'example.com. - The group example\'googlegroups.com +-- would be group-example\'googlegroups.com. - To refer to all members of +-- the Google Apps for Business domain example.com, the entity would be +-- domain-example.com. +oacaEntity :: Lens' ObjectAccessControl (Maybe Text) +oacaEntity + = lens _oacaEntity (\ s a -> s{_oacaEntity = a}) + +-- | The content generation of the object. +oacaGeneration :: Lens' ObjectAccessControl (Maybe Int64) +oacaGeneration + = lens _oacaGeneration + (\ s a -> s{_oacaGeneration = a}) + +-- | The ID for the entity, if any. +oacaEntityId :: Lens' ObjectAccessControl (Maybe Text) +oacaEntityId + = lens _oacaEntityId (\ s a -> s{_oacaEntityId = a}) + +instance FromJSON ObjectAccessControl where + parseJSON + = withObject "ObjectAccessControl" + (\ o -> + ObjectAccessControl <$> + (o .:? "email") <*> (o .:? "etag") <*> + (o .:? "kind" .!= "storage#objectAccessControl") + <*> (o .:? "domain") + <*> (o .:? "bucket") + <*> (o .:? "role") + <*> (o .:? "selfLink") + <*> (o .:? "object") + <*> (o .:? "id") + <*> (o .:? "entity") + <*> (o .:? "generation") + <*> (o .:? "entityId")) + +instance ToJSON ObjectAccessControl where + toJSON ObjectAccessControl{..} + = object + (catMaybes + [("email" .=) <$> _oacaEmail, + ("etag" .=) <$> _oacaEtag, + Just ("kind" .= _oacaKind), + ("domain" .=) <$> _oacaDomain, + ("bucket" .=) <$> _oacaBucket, + ("role" .=) <$> _oacaRole, + ("selfLink" .=) <$> _oacaSelfLink, + ("object" .=) <$> _oacaObject, ("id" .=) <$> _oacaId, + ("entity" .=) <$> _oacaEntity, + ("generation" .=) <$> _oacaGeneration, + ("entityId" .=) <$> _oacaEntityId]) diff --git a/gogol-storage/gen/Network/Google/Storage/Types/Sum.hs b/gogol-storage/gen/Network/Google/Storage/Types/Sum.hs new file mode 100644 index 000000000..6f9358d93 --- /dev/null +++ b/gogol-storage/gen/Network/Google/Storage/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Storage.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Storage.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-storage/gogol-storage.cabal b/gogol-storage/gogol-storage.cabal new file mode 100644 index 000000000..67629efdd --- /dev/null +++ b/gogol-storage/gogol-storage.cabal @@ -0,0 +1,76 @@ +name: gogol-storage +version: 0.0.1 +synopsis: Cloud Storage API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you store and retrieve potentially-large, immutable data objects. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Storage.BucketAccessControls.Delete + , Network.Google.Resource.Storage.BucketAccessControls.Get + , Network.Google.Resource.Storage.BucketAccessControls.Insert + , Network.Google.Resource.Storage.BucketAccessControls.List + , Network.Google.Resource.Storage.BucketAccessControls.Patch + , Network.Google.Resource.Storage.BucketAccessControls.Update + , Network.Google.Resource.Storage.Buckets.Delete + , Network.Google.Resource.Storage.Buckets.Get + , Network.Google.Resource.Storage.Buckets.Insert + , Network.Google.Resource.Storage.Buckets.List + , Network.Google.Resource.Storage.Buckets.Patch + , Network.Google.Resource.Storage.Buckets.Update + , Network.Google.Resource.Storage.Channels.Stop + , Network.Google.Resource.Storage.DefaultObjectAccessControls.Delete + , Network.Google.Resource.Storage.DefaultObjectAccessControls.Get + , Network.Google.Resource.Storage.DefaultObjectAccessControls.Insert + , Network.Google.Resource.Storage.DefaultObjectAccessControls.List + , Network.Google.Resource.Storage.DefaultObjectAccessControls.Patch + , Network.Google.Resource.Storage.DefaultObjectAccessControls.Update + , Network.Google.Resource.Storage.ObjectAccessControls.Delete + , Network.Google.Resource.Storage.ObjectAccessControls.Get + , Network.Google.Resource.Storage.ObjectAccessControls.Insert + , Network.Google.Resource.Storage.ObjectAccessControls.List + , Network.Google.Resource.Storage.ObjectAccessControls.Patch + , Network.Google.Resource.Storage.ObjectAccessControls.Update + , Network.Google.Resource.Storage.Objects.Compose + , Network.Google.Resource.Storage.Objects.Copy + , Network.Google.Resource.Storage.Objects.Delete + , Network.Google.Resource.Storage.Objects.Get + , Network.Google.Resource.Storage.Objects.Insert + , Network.Google.Resource.Storage.Objects.List + , Network.Google.Resource.Storage.Objects.Patch + , Network.Google.Resource.Storage.Objects.Update + , Network.Google.Resource.Storage.Objects.WatchAll + , Network.Google.Storage + , Network.Google.Storage.Types + + other-modules: + Network.Google.Storage.Types.Product + , Network.Google.Storage.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-storage/src/.gitkeep b/gogol-storage/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-tagmanager/LICENSE b/gogol-tagmanager/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-tagmanager/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-tagmanager/Makefile b/gogol-tagmanager/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-tagmanager/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-tagmanager/README.md b/gogol-tagmanager/README.md new file mode 100644 index 000000000..a56c0adf5 --- /dev/null +++ b/gogol-tagmanager/README.md @@ -0,0 +1,28 @@ +# gogol-tagmanager + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Tag Manager API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-tagmanager` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-tagmanager/Setup.hs b/gogol-tagmanager/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-tagmanager/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Create.hs new file mode 100644 index 000000000..d8340b1f6 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Create.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersCreate@. +module TagManager.Accounts.Containers.Create + ( + -- * REST Resource + AccountsContainersCreateAPI + + -- * Creating a Request + , accountsContainersCreate + , AccountsContainersCreate + + -- * Request Lenses + , acccQuotaUser + , acccPrettyPrint + , acccUserIp + , acccAccountId + , acccKey + , acccOauthToken + , acccFields + , acccAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersCreate@ which the +-- 'AccountsContainersCreate' request conforms to. +type AccountsContainersCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> Post '[JSON] Container + +-- | Creates a Container. +-- +-- /See:/ 'accountsContainersCreate' smart constructor. +data AccountsContainersCreate = AccountsContainersCreate + { _acccQuotaUser :: !(Maybe Text) + , _acccPrettyPrint :: !Bool + , _acccUserIp :: !(Maybe Text) + , _acccAccountId :: !Text + , _acccKey :: !(Maybe Text) + , _acccOauthToken :: !(Maybe Text) + , _acccFields :: !(Maybe Text) + , _acccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acccQuotaUser' +-- +-- * 'acccPrettyPrint' +-- +-- * 'acccUserIp' +-- +-- * 'acccAccountId' +-- +-- * 'acccKey' +-- +-- * 'acccOauthToken' +-- +-- * 'acccFields' +-- +-- * 'acccAlt' +accountsContainersCreate + :: Text -- ^ 'accountId' + -> AccountsContainersCreate +accountsContainersCreate pAcccAccountId_ = + AccountsContainersCreate + { _acccQuotaUser = Nothing + , _acccPrettyPrint = True + , _acccUserIp = Nothing + , _acccAccountId = pAcccAccountId_ + , _acccKey = Nothing + , _acccOauthToken = Nothing + , _acccFields = Nothing + , _acccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acccQuotaUser :: Lens' AccountsContainersCreate' (Maybe Text) +acccQuotaUser + = lens _acccQuotaUser + (\ s a -> s{_acccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acccPrettyPrint :: Lens' AccountsContainersCreate' Bool +acccPrettyPrint + = lens _acccPrettyPrint + (\ s a -> s{_acccPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acccUserIp :: Lens' AccountsContainersCreate' (Maybe Text) +acccUserIp + = lens _acccUserIp (\ s a -> s{_acccUserIp = a}) + +-- | The GTM Account ID. +acccAccountId :: Lens' AccountsContainersCreate' Text +acccAccountId + = lens _acccAccountId + (\ s a -> s{_acccAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acccKey :: Lens' AccountsContainersCreate' (Maybe Text) +acccKey = lens _acccKey (\ s a -> s{_acccKey = a}) + +-- | OAuth 2.0 token for the current user. +acccOauthToken :: Lens' AccountsContainersCreate' (Maybe Text) +acccOauthToken + = lens _acccOauthToken + (\ s a -> s{_acccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acccFields :: Lens' AccountsContainersCreate' (Maybe Text) +acccFields + = lens _acccFields (\ s a -> s{_acccFields = a}) + +-- | Data format for the response. +acccAlt :: Lens' AccountsContainersCreate' Text +acccAlt = lens _acccAlt (\ s a -> s{_acccAlt = a}) + +instance GoogleRequest AccountsContainersCreate' + where + type Rs AccountsContainersCreate' = Container + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersCreate{..} + = go _acccQuotaUser _acccPrettyPrint _acccUserIp + _acccAccountId + _acccKey + _acccOauthToken + _acccFields + _acccAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Delete.hs new file mode 100644 index 000000000..292033b3b --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Delete.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersDelete@. +module TagManager.Accounts.Containers.Delete + ( + -- * REST Resource + AccountsContainersDeleteAPI + + -- * Creating a Request + , accountsContainersDelete + , AccountsContainersDelete + + -- * Request Lenses + , acdQuotaUser + , acdPrettyPrint + , acdContainerId + , acdUserIp + , acdAccountId + , acdKey + , acdOauthToken + , acdFields + , acdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersDelete@ which the +-- 'AccountsContainersDelete' request conforms to. +type AccountsContainersDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> Delete '[JSON] () + +-- | Deletes a Container. +-- +-- /See:/ 'accountsContainersDelete' smart constructor. +data AccountsContainersDelete = AccountsContainersDelete + { _acdQuotaUser :: !(Maybe Text) + , _acdPrettyPrint :: !Bool + , _acdContainerId :: !Text + , _acdUserIp :: !(Maybe Text) + , _acdAccountId :: !Text + , _acdKey :: !(Maybe Text) + , _acdOauthToken :: !(Maybe Text) + , _acdFields :: !(Maybe Text) + , _acdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdQuotaUser' +-- +-- * 'acdPrettyPrint' +-- +-- * 'acdContainerId' +-- +-- * 'acdUserIp' +-- +-- * 'acdAccountId' +-- +-- * 'acdKey' +-- +-- * 'acdOauthToken' +-- +-- * 'acdFields' +-- +-- * 'acdAlt' +accountsContainersDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersDelete +accountsContainersDelete pAcdContainerId_ pAcdAccountId_ = + AccountsContainersDelete + { _acdQuotaUser = Nothing + , _acdPrettyPrint = True + , _acdContainerId = pAcdContainerId_ + , _acdUserIp = Nothing + , _acdAccountId = pAcdAccountId_ + , _acdKey = Nothing + , _acdOauthToken = Nothing + , _acdFields = Nothing + , _acdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acdQuotaUser :: Lens' AccountsContainersDelete' (Maybe Text) +acdQuotaUser + = lens _acdQuotaUser (\ s a -> s{_acdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acdPrettyPrint :: Lens' AccountsContainersDelete' Bool +acdPrettyPrint + = lens _acdPrettyPrint + (\ s a -> s{_acdPrettyPrint = a}) + +-- | The GTM Container ID. +acdContainerId :: Lens' AccountsContainersDelete' Text +acdContainerId + = lens _acdContainerId + (\ s a -> s{_acdContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acdUserIp :: Lens' AccountsContainersDelete' (Maybe Text) +acdUserIp + = lens _acdUserIp (\ s a -> s{_acdUserIp = a}) + +-- | The GTM Account ID. +acdAccountId :: Lens' AccountsContainersDelete' Text +acdAccountId + = lens _acdAccountId (\ s a -> s{_acdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acdKey :: Lens' AccountsContainersDelete' (Maybe Text) +acdKey = lens _acdKey (\ s a -> s{_acdKey = a}) + +-- | OAuth 2.0 token for the current user. +acdOauthToken :: Lens' AccountsContainersDelete' (Maybe Text) +acdOauthToken + = lens _acdOauthToken + (\ s a -> s{_acdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acdFields :: Lens' AccountsContainersDelete' (Maybe Text) +acdFields + = lens _acdFields (\ s a -> s{_acdFields = a}) + +-- | Data format for the response. +acdAlt :: Lens' AccountsContainersDelete' Text +acdAlt = lens _acdAlt (\ s a -> s{_acdAlt = a}) + +instance GoogleRequest AccountsContainersDelete' + where + type Rs AccountsContainersDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersDelete{..} + = go _acdQuotaUser _acdPrettyPrint _acdContainerId + _acdUserIp + _acdAccountId + _acdKey + _acdOauthToken + _acdFields + _acdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Create.hs new file mode 100644 index 000000000..206ace90e --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Create.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersCreate@. +module TagManager.Accounts.Containers.Folders.Create + ( + -- * REST Resource + AccountsContainersFoldersCreateAPI + + -- * Creating a Request + , accountsContainersFoldersCreate + , AccountsContainersFoldersCreate + + -- * Request Lenses + , acfcQuotaUser + , acfcPrettyPrint + , acfcContainerId + , acfcUserIp + , acfcAccountId + , acfcKey + , acfcOauthToken + , acfcFields + , acfcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersCreate@ which the +-- 'AccountsContainersFoldersCreate' request conforms to. +type AccountsContainersFoldersCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> Post '[JSON] Folder + +-- | Creates a GTM Folder. +-- +-- /See:/ 'accountsContainersFoldersCreate' smart constructor. +data AccountsContainersFoldersCreate = AccountsContainersFoldersCreate + { _acfcQuotaUser :: !(Maybe Text) + , _acfcPrettyPrint :: !Bool + , _acfcContainerId :: !Text + , _acfcUserIp :: !(Maybe Text) + , _acfcAccountId :: !Text + , _acfcKey :: !(Maybe Text) + , _acfcOauthToken :: !(Maybe Text) + , _acfcFields :: !(Maybe Text) + , _acfcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acfcQuotaUser' +-- +-- * 'acfcPrettyPrint' +-- +-- * 'acfcContainerId' +-- +-- * 'acfcUserIp' +-- +-- * 'acfcAccountId' +-- +-- * 'acfcKey' +-- +-- * 'acfcOauthToken' +-- +-- * 'acfcFields' +-- +-- * 'acfcAlt' +accountsContainersFoldersCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersCreate +accountsContainersFoldersCreate pAcfcContainerId_ pAcfcAccountId_ = + AccountsContainersFoldersCreate + { _acfcQuotaUser = Nothing + , _acfcPrettyPrint = True + , _acfcContainerId = pAcfcContainerId_ + , _acfcUserIp = Nothing + , _acfcAccountId = pAcfcAccountId_ + , _acfcKey = Nothing + , _acfcOauthToken = Nothing + , _acfcFields = Nothing + , _acfcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acfcQuotaUser :: Lens' AccountsContainersFoldersCreate' (Maybe Text) +acfcQuotaUser + = lens _acfcQuotaUser + (\ s a -> s{_acfcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acfcPrettyPrint :: Lens' AccountsContainersFoldersCreate' Bool +acfcPrettyPrint + = lens _acfcPrettyPrint + (\ s a -> s{_acfcPrettyPrint = a}) + +-- | The GTM Container ID. +acfcContainerId :: Lens' AccountsContainersFoldersCreate' Text +acfcContainerId + = lens _acfcContainerId + (\ s a -> s{_acfcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acfcUserIp :: Lens' AccountsContainersFoldersCreate' (Maybe Text) +acfcUserIp + = lens _acfcUserIp (\ s a -> s{_acfcUserIp = a}) + +-- | The GTM Account ID. +acfcAccountId :: Lens' AccountsContainersFoldersCreate' Text +acfcAccountId + = lens _acfcAccountId + (\ s a -> s{_acfcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acfcKey :: Lens' AccountsContainersFoldersCreate' (Maybe Text) +acfcKey = lens _acfcKey (\ s a -> s{_acfcKey = a}) + +-- | OAuth 2.0 token for the current user. +acfcOauthToken :: Lens' AccountsContainersFoldersCreate' (Maybe Text) +acfcOauthToken + = lens _acfcOauthToken + (\ s a -> s{_acfcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acfcFields :: Lens' AccountsContainersFoldersCreate' (Maybe Text) +acfcFields + = lens _acfcFields (\ s a -> s{_acfcFields = a}) + +-- | Data format for the response. +acfcAlt :: Lens' AccountsContainersFoldersCreate' Text +acfcAlt = lens _acfcAlt (\ s a -> s{_acfcAlt = a}) + +instance GoogleRequest + AccountsContainersFoldersCreate' where + type Rs AccountsContainersFoldersCreate' = Folder + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersFoldersCreate{..} + = go _acfcQuotaUser _acfcPrettyPrint _acfcContainerId + _acfcUserIp + _acfcAccountId + _acfcKey + _acfcOauthToken + _acfcFields + _acfcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersFoldersCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Delete.hs new file mode 100644 index 000000000..6615c85c7 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Delete.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersDelete@. +module TagManager.Accounts.Containers.Folders.Delete + ( + -- * REST Resource + AccountsContainersFoldersDeleteAPI + + -- * Creating a Request + , accountsContainersFoldersDelete + , AccountsContainersFoldersDelete + + -- * Request Lenses + , acfdQuotaUser + , acfdPrettyPrint + , acfdContainerId + , acfdUserIp + , acfdFolderId + , acfdAccountId + , acfdKey + , acfdOauthToken + , acfdFields + , acfdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersDelete@ which the +-- 'AccountsContainersFoldersDelete' request conforms to. +type AccountsContainersFoldersDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> + Capture "folderId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Folder. +-- +-- /See:/ 'accountsContainersFoldersDelete' smart constructor. +data AccountsContainersFoldersDelete = AccountsContainersFoldersDelete + { _acfdQuotaUser :: !(Maybe Text) + , _acfdPrettyPrint :: !Bool + , _acfdContainerId :: !Text + , _acfdUserIp :: !(Maybe Text) + , _acfdFolderId :: !Text + , _acfdAccountId :: !Text + , _acfdKey :: !(Maybe Text) + , _acfdOauthToken :: !(Maybe Text) + , _acfdFields :: !(Maybe Text) + , _acfdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acfdQuotaUser' +-- +-- * 'acfdPrettyPrint' +-- +-- * 'acfdContainerId' +-- +-- * 'acfdUserIp' +-- +-- * 'acfdFolderId' +-- +-- * 'acfdAccountId' +-- +-- * 'acfdKey' +-- +-- * 'acfdOauthToken' +-- +-- * 'acfdFields' +-- +-- * 'acfdAlt' +accountsContainersFoldersDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'folderId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersDelete +accountsContainersFoldersDelete pAcfdContainerId_ pAcfdFolderId_ pAcfdAccountId_ = + AccountsContainersFoldersDelete + { _acfdQuotaUser = Nothing + , _acfdPrettyPrint = True + , _acfdContainerId = pAcfdContainerId_ + , _acfdUserIp = Nothing + , _acfdFolderId = pAcfdFolderId_ + , _acfdAccountId = pAcfdAccountId_ + , _acfdKey = Nothing + , _acfdOauthToken = Nothing + , _acfdFields = Nothing + , _acfdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acfdQuotaUser :: Lens' AccountsContainersFoldersDelete' (Maybe Text) +acfdQuotaUser + = lens _acfdQuotaUser + (\ s a -> s{_acfdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acfdPrettyPrint :: Lens' AccountsContainersFoldersDelete' Bool +acfdPrettyPrint + = lens _acfdPrettyPrint + (\ s a -> s{_acfdPrettyPrint = a}) + +-- | The GTM Container ID. +acfdContainerId :: Lens' AccountsContainersFoldersDelete' Text +acfdContainerId + = lens _acfdContainerId + (\ s a -> s{_acfdContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acfdUserIp :: Lens' AccountsContainersFoldersDelete' (Maybe Text) +acfdUserIp + = lens _acfdUserIp (\ s a -> s{_acfdUserIp = a}) + +-- | The GTM Folder ID. +acfdFolderId :: Lens' AccountsContainersFoldersDelete' Text +acfdFolderId + = lens _acfdFolderId (\ s a -> s{_acfdFolderId = a}) + +-- | The GTM Account ID. +acfdAccountId :: Lens' AccountsContainersFoldersDelete' Text +acfdAccountId + = lens _acfdAccountId + (\ s a -> s{_acfdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acfdKey :: Lens' AccountsContainersFoldersDelete' (Maybe Text) +acfdKey = lens _acfdKey (\ s a -> s{_acfdKey = a}) + +-- | OAuth 2.0 token for the current user. +acfdOauthToken :: Lens' AccountsContainersFoldersDelete' (Maybe Text) +acfdOauthToken + = lens _acfdOauthToken + (\ s a -> s{_acfdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acfdFields :: Lens' AccountsContainersFoldersDelete' (Maybe Text) +acfdFields + = lens _acfdFields (\ s a -> s{_acfdFields = a}) + +-- | Data format for the response. +acfdAlt :: Lens' AccountsContainersFoldersDelete' Text +acfdAlt = lens _acfdAlt (\ s a -> s{_acfdAlt = a}) + +instance GoogleRequest + AccountsContainersFoldersDelete' where + type Rs AccountsContainersFoldersDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersFoldersDelete{..} + = go _acfdQuotaUser _acfdPrettyPrint _acfdContainerId + _acfdUserIp + _acfdFolderId + _acfdAccountId + _acfdKey + _acfdOauthToken + _acfdFields + _acfdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersFoldersDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Entities/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Entities/List.hs new file mode 100644 index 000000000..9a584d459 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Entities/List.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.Entities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all entities in a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersEntitiesList@. +module TagManager.Accounts.Containers.Folders.Entities.List + ( + -- * REST Resource + AccountsContainersFoldersEntitiesListAPI + + -- * Creating a Request + , accountsContainersFoldersEntitiesList + , AccountsContainersFoldersEntitiesList + + -- * Request Lenses + , acfelQuotaUser + , acfelPrettyPrint + , acfelContainerId + , acfelUserIp + , acfelFolderId + , acfelAccountId + , acfelKey + , acfelOauthToken + , acfelFields + , acfelAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersEntitiesList@ which the +-- 'AccountsContainersFoldersEntitiesList' request conforms to. +type AccountsContainersFoldersEntitiesListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> + Capture "folderId" Text :> + "entities" :> Get '[JSON] FolderEntities + +-- | List all entities in a GTM Folder. +-- +-- /See:/ 'accountsContainersFoldersEntitiesList' smart constructor. +data AccountsContainersFoldersEntitiesList = AccountsContainersFoldersEntitiesList + { _acfelQuotaUser :: !(Maybe Text) + , _acfelPrettyPrint :: !Bool + , _acfelContainerId :: !Text + , _acfelUserIp :: !(Maybe Text) + , _acfelFolderId :: !Text + , _acfelAccountId :: !Text + , _acfelKey :: !(Maybe Text) + , _acfelOauthToken :: !(Maybe Text) + , _acfelFields :: !(Maybe Text) + , _acfelAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersEntitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acfelQuotaUser' +-- +-- * 'acfelPrettyPrint' +-- +-- * 'acfelContainerId' +-- +-- * 'acfelUserIp' +-- +-- * 'acfelFolderId' +-- +-- * 'acfelAccountId' +-- +-- * 'acfelKey' +-- +-- * 'acfelOauthToken' +-- +-- * 'acfelFields' +-- +-- * 'acfelAlt' +accountsContainersFoldersEntitiesList + :: Text -- ^ 'containerId' + -> Text -- ^ 'folderId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersEntitiesList +accountsContainersFoldersEntitiesList pAcfelContainerId_ pAcfelFolderId_ pAcfelAccountId_ = + AccountsContainersFoldersEntitiesList + { _acfelQuotaUser = Nothing + , _acfelPrettyPrint = True + , _acfelContainerId = pAcfelContainerId_ + , _acfelUserIp = Nothing + , _acfelFolderId = pAcfelFolderId_ + , _acfelAccountId = pAcfelAccountId_ + , _acfelKey = Nothing + , _acfelOauthToken = Nothing + , _acfelFields = Nothing + , _acfelAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acfelQuotaUser :: Lens' AccountsContainersFoldersEntitiesList' (Maybe Text) +acfelQuotaUser + = lens _acfelQuotaUser + (\ s a -> s{_acfelQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acfelPrettyPrint :: Lens' AccountsContainersFoldersEntitiesList' Bool +acfelPrettyPrint + = lens _acfelPrettyPrint + (\ s a -> s{_acfelPrettyPrint = a}) + +-- | The GTM Container ID. +acfelContainerId :: Lens' AccountsContainersFoldersEntitiesList' Text +acfelContainerId + = lens _acfelContainerId + (\ s a -> s{_acfelContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acfelUserIp :: Lens' AccountsContainersFoldersEntitiesList' (Maybe Text) +acfelUserIp + = lens _acfelUserIp (\ s a -> s{_acfelUserIp = a}) + +-- | The GTM Folder ID. +acfelFolderId :: Lens' AccountsContainersFoldersEntitiesList' Text +acfelFolderId + = lens _acfelFolderId + (\ s a -> s{_acfelFolderId = a}) + +-- | The GTM Account ID. +acfelAccountId :: Lens' AccountsContainersFoldersEntitiesList' Text +acfelAccountId + = lens _acfelAccountId + (\ s a -> s{_acfelAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acfelKey :: Lens' AccountsContainersFoldersEntitiesList' (Maybe Text) +acfelKey = lens _acfelKey (\ s a -> s{_acfelKey = a}) + +-- | OAuth 2.0 token for the current user. +acfelOauthToken :: Lens' AccountsContainersFoldersEntitiesList' (Maybe Text) +acfelOauthToken + = lens _acfelOauthToken + (\ s a -> s{_acfelOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acfelFields :: Lens' AccountsContainersFoldersEntitiesList' (Maybe Text) +acfelFields + = lens _acfelFields (\ s a -> s{_acfelFields = a}) + +-- | Data format for the response. +acfelAlt :: Lens' AccountsContainersFoldersEntitiesList' Text +acfelAlt = lens _acfelAlt (\ s a -> s{_acfelAlt = a}) + +instance GoogleRequest + AccountsContainersFoldersEntitiesList' where + type Rs AccountsContainersFoldersEntitiesList' = + FolderEntities + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersFoldersEntitiesList{..} + = go _acfelQuotaUser _acfelPrettyPrint + _acfelContainerId + _acfelUserIp + _acfelFolderId + _acfelAccountId + _acfelKey + _acfelOauthToken + _acfelFields + _acfelAlt + where go + = clientWithRoute + (Proxy :: + Proxy AccountsContainersFoldersEntitiesListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Get.hs new file mode 100644 index 000000000..06910bf8d --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Get.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersGet@. +module TagManager.Accounts.Containers.Folders.Get + ( + -- * REST Resource + AccountsContainersFoldersGetAPI + + -- * Creating a Request + , accountsContainersFoldersGet + , AccountsContainersFoldersGet + + -- * Request Lenses + , acfgQuotaUser + , acfgPrettyPrint + , acfgContainerId + , acfgUserIp + , acfgFolderId + , acfgAccountId + , acfgKey + , acfgOauthToken + , acfgFields + , acfgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersGet@ which the +-- 'AccountsContainersFoldersGet' request conforms to. +type AccountsContainersFoldersGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> + Capture "folderId" Text :> Get '[JSON] Folder + +-- | Gets a GTM Folder. +-- +-- /See:/ 'accountsContainersFoldersGet' smart constructor. +data AccountsContainersFoldersGet = AccountsContainersFoldersGet + { _acfgQuotaUser :: !(Maybe Text) + , _acfgPrettyPrint :: !Bool + , _acfgContainerId :: !Text + , _acfgUserIp :: !(Maybe Text) + , _acfgFolderId :: !Text + , _acfgAccountId :: !Text + , _acfgKey :: !(Maybe Text) + , _acfgOauthToken :: !(Maybe Text) + , _acfgFields :: !(Maybe Text) + , _acfgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acfgQuotaUser' +-- +-- * 'acfgPrettyPrint' +-- +-- * 'acfgContainerId' +-- +-- * 'acfgUserIp' +-- +-- * 'acfgFolderId' +-- +-- * 'acfgAccountId' +-- +-- * 'acfgKey' +-- +-- * 'acfgOauthToken' +-- +-- * 'acfgFields' +-- +-- * 'acfgAlt' +accountsContainersFoldersGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'folderId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersGet +accountsContainersFoldersGet pAcfgContainerId_ pAcfgFolderId_ pAcfgAccountId_ = + AccountsContainersFoldersGet + { _acfgQuotaUser = Nothing + , _acfgPrettyPrint = True + , _acfgContainerId = pAcfgContainerId_ + , _acfgUserIp = Nothing + , _acfgFolderId = pAcfgFolderId_ + , _acfgAccountId = pAcfgAccountId_ + , _acfgKey = Nothing + , _acfgOauthToken = Nothing + , _acfgFields = Nothing + , _acfgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acfgQuotaUser :: Lens' AccountsContainersFoldersGet' (Maybe Text) +acfgQuotaUser + = lens _acfgQuotaUser + (\ s a -> s{_acfgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acfgPrettyPrint :: Lens' AccountsContainersFoldersGet' Bool +acfgPrettyPrint + = lens _acfgPrettyPrint + (\ s a -> s{_acfgPrettyPrint = a}) + +-- | The GTM Container ID. +acfgContainerId :: Lens' AccountsContainersFoldersGet' Text +acfgContainerId + = lens _acfgContainerId + (\ s a -> s{_acfgContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acfgUserIp :: Lens' AccountsContainersFoldersGet' (Maybe Text) +acfgUserIp + = lens _acfgUserIp (\ s a -> s{_acfgUserIp = a}) + +-- | The GTM Folder ID. +acfgFolderId :: Lens' AccountsContainersFoldersGet' Text +acfgFolderId + = lens _acfgFolderId (\ s a -> s{_acfgFolderId = a}) + +-- | The GTM Account ID. +acfgAccountId :: Lens' AccountsContainersFoldersGet' Text +acfgAccountId + = lens _acfgAccountId + (\ s a -> s{_acfgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acfgKey :: Lens' AccountsContainersFoldersGet' (Maybe Text) +acfgKey = lens _acfgKey (\ s a -> s{_acfgKey = a}) + +-- | OAuth 2.0 token for the current user. +acfgOauthToken :: Lens' AccountsContainersFoldersGet' (Maybe Text) +acfgOauthToken + = lens _acfgOauthToken + (\ s a -> s{_acfgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acfgFields :: Lens' AccountsContainersFoldersGet' (Maybe Text) +acfgFields + = lens _acfgFields (\ s a -> s{_acfgFields = a}) + +-- | Data format for the response. +acfgAlt :: Lens' AccountsContainersFoldersGet' Text +acfgAlt = lens _acfgAlt (\ s a -> s{_acfgAlt = a}) + +instance GoogleRequest AccountsContainersFoldersGet' + where + type Rs AccountsContainersFoldersGet' = Folder + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersFoldersGet{..} + = go _acfgQuotaUser _acfgPrettyPrint _acfgContainerId + _acfgUserIp + _acfgFolderId + _acfgAccountId + _acfgKey + _acfgOauthToken + _acfgFields + _acfgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersFoldersGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/List.hs new file mode 100644 index 000000000..4d48640e4 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/List.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Folders of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersList@. +module TagManager.Accounts.Containers.Folders.List + ( + -- * REST Resource + AccountsContainersFoldersListAPI + + -- * Creating a Request + , accountsContainersFoldersList + , AccountsContainersFoldersList + + -- * Request Lenses + , acflQuotaUser + , acflPrettyPrint + , acflContainerId + , acflUserIp + , acflAccountId + , acflKey + , acflOauthToken + , acflFields + , acflAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersList@ which the +-- 'AccountsContainersFoldersList' request conforms to. +type AccountsContainersFoldersListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> Get '[JSON] ListFoldersResponse + +-- | Lists all GTM Folders of a Container. +-- +-- /See:/ 'accountsContainersFoldersList' smart constructor. +data AccountsContainersFoldersList = AccountsContainersFoldersList + { _acflQuotaUser :: !(Maybe Text) + , _acflPrettyPrint :: !Bool + , _acflContainerId :: !Text + , _acflUserIp :: !(Maybe Text) + , _acflAccountId :: !Text + , _acflKey :: !(Maybe Text) + , _acflOauthToken :: !(Maybe Text) + , _acflFields :: !(Maybe Text) + , _acflAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acflQuotaUser' +-- +-- * 'acflPrettyPrint' +-- +-- * 'acflContainerId' +-- +-- * 'acflUserIp' +-- +-- * 'acflAccountId' +-- +-- * 'acflKey' +-- +-- * 'acflOauthToken' +-- +-- * 'acflFields' +-- +-- * 'acflAlt' +accountsContainersFoldersList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersList +accountsContainersFoldersList pAcflContainerId_ pAcflAccountId_ = + AccountsContainersFoldersList + { _acflQuotaUser = Nothing + , _acflPrettyPrint = True + , _acflContainerId = pAcflContainerId_ + , _acflUserIp = Nothing + , _acflAccountId = pAcflAccountId_ + , _acflKey = Nothing + , _acflOauthToken = Nothing + , _acflFields = Nothing + , _acflAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acflQuotaUser :: Lens' AccountsContainersFoldersList' (Maybe Text) +acflQuotaUser + = lens _acflQuotaUser + (\ s a -> s{_acflQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acflPrettyPrint :: Lens' AccountsContainersFoldersList' Bool +acflPrettyPrint + = lens _acflPrettyPrint + (\ s a -> s{_acflPrettyPrint = a}) + +-- | The GTM Container ID. +acflContainerId :: Lens' AccountsContainersFoldersList' Text +acflContainerId + = lens _acflContainerId + (\ s a -> s{_acflContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acflUserIp :: Lens' AccountsContainersFoldersList' (Maybe Text) +acflUserIp + = lens _acflUserIp (\ s a -> s{_acflUserIp = a}) + +-- | The GTM Account ID. +acflAccountId :: Lens' AccountsContainersFoldersList' Text +acflAccountId + = lens _acflAccountId + (\ s a -> s{_acflAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acflKey :: Lens' AccountsContainersFoldersList' (Maybe Text) +acflKey = lens _acflKey (\ s a -> s{_acflKey = a}) + +-- | OAuth 2.0 token for the current user. +acflOauthToken :: Lens' AccountsContainersFoldersList' (Maybe Text) +acflOauthToken + = lens _acflOauthToken + (\ s a -> s{_acflOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acflFields :: Lens' AccountsContainersFoldersList' (Maybe Text) +acflFields + = lens _acflFields (\ s a -> s{_acflFields = a}) + +-- | Data format for the response. +acflAlt :: Lens' AccountsContainersFoldersList' Text +acflAlt = lens _acflAlt (\ s a -> s{_acflAlt = a}) + +instance GoogleRequest AccountsContainersFoldersList' + where + type Rs AccountsContainersFoldersList' = + ListFoldersResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersFoldersList{..} + = go _acflQuotaUser _acflPrettyPrint _acflContainerId + _acflUserIp + _acflAccountId + _acflKey + _acflOauthToken + _acflFields + _acflAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersFoldersListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Update.hs new file mode 100644 index 000000000..14a358164 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Update.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Folders.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersFoldersUpdate@. +module TagManager.Accounts.Containers.Folders.Update + ( + -- * REST Resource + AccountsContainersFoldersUpdateAPI + + -- * Creating a Request + , accountsContainersFoldersUpdate + , AccountsContainersFoldersUpdate + + -- * Request Lenses + , acfuQuotaUser + , acfuPrettyPrint + , acfuContainerId + , acfuUserIp + , acfuFingerprint + , acfuFolderId + , acfuAccountId + , acfuKey + , acfuOauthToken + , acfuFields + , acfuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersFoldersUpdate@ which the +-- 'AccountsContainersFoldersUpdate' request conforms to. +type AccountsContainersFoldersUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "folders" :> + Capture "folderId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Folder + +-- | Updates a GTM Folder. +-- +-- /See:/ 'accountsContainersFoldersUpdate' smart constructor. +data AccountsContainersFoldersUpdate = AccountsContainersFoldersUpdate + { _acfuQuotaUser :: !(Maybe Text) + , _acfuPrettyPrint :: !Bool + , _acfuContainerId :: !Text + , _acfuUserIp :: !(Maybe Text) + , _acfuFingerprint :: !(Maybe Text) + , _acfuFolderId :: !Text + , _acfuAccountId :: !Text + , _acfuKey :: !(Maybe Text) + , _acfuOauthToken :: !(Maybe Text) + , _acfuFields :: !(Maybe Text) + , _acfuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersFoldersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acfuQuotaUser' +-- +-- * 'acfuPrettyPrint' +-- +-- * 'acfuContainerId' +-- +-- * 'acfuUserIp' +-- +-- * 'acfuFingerprint' +-- +-- * 'acfuFolderId' +-- +-- * 'acfuAccountId' +-- +-- * 'acfuKey' +-- +-- * 'acfuOauthToken' +-- +-- * 'acfuFields' +-- +-- * 'acfuAlt' +accountsContainersFoldersUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'folderId' + -> Text -- ^ 'accountId' + -> AccountsContainersFoldersUpdate +accountsContainersFoldersUpdate pAcfuContainerId_ pAcfuFolderId_ pAcfuAccountId_ = + AccountsContainersFoldersUpdate + { _acfuQuotaUser = Nothing + , _acfuPrettyPrint = True + , _acfuContainerId = pAcfuContainerId_ + , _acfuUserIp = Nothing + , _acfuFingerprint = Nothing + , _acfuFolderId = pAcfuFolderId_ + , _acfuAccountId = pAcfuAccountId_ + , _acfuKey = Nothing + , _acfuOauthToken = Nothing + , _acfuFields = Nothing + , _acfuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acfuQuotaUser :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuQuotaUser + = lens _acfuQuotaUser + (\ s a -> s{_acfuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acfuPrettyPrint :: Lens' AccountsContainersFoldersUpdate' Bool +acfuPrettyPrint + = lens _acfuPrettyPrint + (\ s a -> s{_acfuPrettyPrint = a}) + +-- | The GTM Container ID. +acfuContainerId :: Lens' AccountsContainersFoldersUpdate' Text +acfuContainerId + = lens _acfuContainerId + (\ s a -> s{_acfuContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acfuUserIp :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuUserIp + = lens _acfuUserIp (\ s a -> s{_acfuUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the folder +-- in storage. +acfuFingerprint :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuFingerprint + = lens _acfuFingerprint + (\ s a -> s{_acfuFingerprint = a}) + +-- | The GTM Folder ID. +acfuFolderId :: Lens' AccountsContainersFoldersUpdate' Text +acfuFolderId + = lens _acfuFolderId (\ s a -> s{_acfuFolderId = a}) + +-- | The GTM Account ID. +acfuAccountId :: Lens' AccountsContainersFoldersUpdate' Text +acfuAccountId + = lens _acfuAccountId + (\ s a -> s{_acfuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acfuKey :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuKey = lens _acfuKey (\ s a -> s{_acfuKey = a}) + +-- | OAuth 2.0 token for the current user. +acfuOauthToken :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuOauthToken + = lens _acfuOauthToken + (\ s a -> s{_acfuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acfuFields :: Lens' AccountsContainersFoldersUpdate' (Maybe Text) +acfuFields + = lens _acfuFields (\ s a -> s{_acfuFields = a}) + +-- | Data format for the response. +acfuAlt :: Lens' AccountsContainersFoldersUpdate' Text +acfuAlt = lens _acfuAlt (\ s a -> s{_acfuAlt = a}) + +instance GoogleRequest + AccountsContainersFoldersUpdate' where + type Rs AccountsContainersFoldersUpdate' = Folder + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersFoldersUpdate{..} + = go _acfuQuotaUser _acfuPrettyPrint _acfuContainerId + _acfuUserIp + _acfuFingerprint + _acfuFolderId + _acfuAccountId + _acfuKey + _acfuOauthToken + _acfuFields + _acfuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersFoldersUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Get.hs new file mode 100644 index 000000000..3a9e904b3 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersGet@. +module TagManager.Accounts.Containers.Get + ( + -- * REST Resource + AccountsContainersGetAPI + + -- * Creating a Request + , accountsContainersGet + , AccountsContainersGet + + -- * Request Lenses + , acgQuotaUser + , acgPrettyPrint + , acgContainerId + , acgUserIp + , acgAccountId + , acgKey + , acgOauthToken + , acgFields + , acgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersGet@ which the +-- 'AccountsContainersGet' request conforms to. +type AccountsContainersGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> Get '[JSON] Container + +-- | Gets a Container. +-- +-- /See:/ 'accountsContainersGet' smart constructor. +data AccountsContainersGet = AccountsContainersGet + { _acgQuotaUser :: !(Maybe Text) + , _acgPrettyPrint :: !Bool + , _acgContainerId :: !Text + , _acgUserIp :: !(Maybe Text) + , _acgAccountId :: !Text + , _acgKey :: !(Maybe Text) + , _acgOauthToken :: !(Maybe Text) + , _acgFields :: !(Maybe Text) + , _acgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acgQuotaUser' +-- +-- * 'acgPrettyPrint' +-- +-- * 'acgContainerId' +-- +-- * 'acgUserIp' +-- +-- * 'acgAccountId' +-- +-- * 'acgKey' +-- +-- * 'acgOauthToken' +-- +-- * 'acgFields' +-- +-- * 'acgAlt' +accountsContainersGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersGet +accountsContainersGet pAcgContainerId_ pAcgAccountId_ = + AccountsContainersGet + { _acgQuotaUser = Nothing + , _acgPrettyPrint = True + , _acgContainerId = pAcgContainerId_ + , _acgUserIp = Nothing + , _acgAccountId = pAcgAccountId_ + , _acgKey = Nothing + , _acgOauthToken = Nothing + , _acgFields = Nothing + , _acgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acgQuotaUser :: Lens' AccountsContainersGet' (Maybe Text) +acgQuotaUser + = lens _acgQuotaUser (\ s a -> s{_acgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acgPrettyPrint :: Lens' AccountsContainersGet' Bool +acgPrettyPrint + = lens _acgPrettyPrint + (\ s a -> s{_acgPrettyPrint = a}) + +-- | The GTM Container ID. +acgContainerId :: Lens' AccountsContainersGet' Text +acgContainerId + = lens _acgContainerId + (\ s a -> s{_acgContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acgUserIp :: Lens' AccountsContainersGet' (Maybe Text) +acgUserIp + = lens _acgUserIp (\ s a -> s{_acgUserIp = a}) + +-- | The GTM Account ID. +acgAccountId :: Lens' AccountsContainersGet' Text +acgAccountId + = lens _acgAccountId (\ s a -> s{_acgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acgKey :: Lens' AccountsContainersGet' (Maybe Text) +acgKey = lens _acgKey (\ s a -> s{_acgKey = a}) + +-- | OAuth 2.0 token for the current user. +acgOauthToken :: Lens' AccountsContainersGet' (Maybe Text) +acgOauthToken + = lens _acgOauthToken + (\ s a -> s{_acgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acgFields :: Lens' AccountsContainersGet' (Maybe Text) +acgFields + = lens _acgFields (\ s a -> s{_acgFields = a}) + +-- | Data format for the response. +acgAlt :: Lens' AccountsContainersGet' Text +acgAlt = lens _acgAlt (\ s a -> s{_acgAlt = a}) + +instance GoogleRequest AccountsContainersGet' where + type Rs AccountsContainersGet' = Container + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersGet{..} + = go _acgQuotaUser _acgPrettyPrint _acgContainerId + _acgUserIp + _acgAccountId + _acgKey + _acgOauthToken + _acgFields + _acgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/List.hs new file mode 100644 index 000000000..4d768c186 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/List.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all Containers that belongs to a GTM Account. +-- +-- /See:/ for @TagmanagerAccountsContainersList@. +module TagManager.Accounts.Containers.List + ( + -- * REST Resource + AccountsContainersListAPI + + -- * Creating a Request + , accountsContainersList + , AccountsContainersList + + -- * Request Lenses + , aclQuotaUser + , aclPrettyPrint + , aclUserIp + , aclAccountId + , aclKey + , aclOauthToken + , aclFields + , aclAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersList@ which the +-- 'AccountsContainersList' request conforms to. +type AccountsContainersListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> Get '[JSON] ListContainersResponse + +-- | Lists all Containers that belongs to a GTM Account. +-- +-- /See:/ 'accountsContainersList' smart constructor. +data AccountsContainersList = AccountsContainersList + { _aclQuotaUser :: !(Maybe Text) + , _aclPrettyPrint :: !Bool + , _aclUserIp :: !(Maybe Text) + , _aclAccountId :: !Text + , _aclKey :: !(Maybe Text) + , _aclOauthToken :: !(Maybe Text) + , _aclFields :: !(Maybe Text) + , _aclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aclQuotaUser' +-- +-- * 'aclPrettyPrint' +-- +-- * 'aclUserIp' +-- +-- * 'aclAccountId' +-- +-- * 'aclKey' +-- +-- * 'aclOauthToken' +-- +-- * 'aclFields' +-- +-- * 'aclAlt' +accountsContainersList + :: Text -- ^ 'accountId' + -> AccountsContainersList +accountsContainersList pAclAccountId_ = + AccountsContainersList + { _aclQuotaUser = Nothing + , _aclPrettyPrint = True + , _aclUserIp = Nothing + , _aclAccountId = pAclAccountId_ + , _aclKey = Nothing + , _aclOauthToken = Nothing + , _aclFields = Nothing + , _aclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aclQuotaUser :: Lens' AccountsContainersList' (Maybe Text) +aclQuotaUser + = lens _aclQuotaUser (\ s a -> s{_aclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aclPrettyPrint :: Lens' AccountsContainersList' Bool +aclPrettyPrint + = lens _aclPrettyPrint + (\ s a -> s{_aclPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aclUserIp :: Lens' AccountsContainersList' (Maybe Text) +aclUserIp + = lens _aclUserIp (\ s a -> s{_aclUserIp = a}) + +-- | The GTM Account ID. +aclAccountId :: Lens' AccountsContainersList' Text +aclAccountId + = lens _aclAccountId (\ s a -> s{_aclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aclKey :: Lens' AccountsContainersList' (Maybe Text) +aclKey = lens _aclKey (\ s a -> s{_aclKey = a}) + +-- | OAuth 2.0 token for the current user. +aclOauthToken :: Lens' AccountsContainersList' (Maybe Text) +aclOauthToken + = lens _aclOauthToken + (\ s a -> s{_aclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aclFields :: Lens' AccountsContainersList' (Maybe Text) +aclFields + = lens _aclFields (\ s a -> s{_aclFields = a}) + +-- | Data format for the response. +aclAlt :: Lens' AccountsContainersList' Text +aclAlt = lens _aclAlt (\ s a -> s{_aclAlt = a}) + +instance GoogleRequest AccountsContainersList' where + type Rs AccountsContainersList' = + ListContainersResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersList{..} + = go _aclQuotaUser _aclPrettyPrint _aclUserIp + _aclAccountId + _aclKey + _aclOauthToken + _aclFields + _aclAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Create.hs new file mode 100644 index 000000000..87c0b804a --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Create.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.MACros.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Macro. +-- +-- /See:/ for @TagmanagerAccountsContainersMACrosCreate@. +module TagManager.Accounts.Containers.MACros.Create + ( + -- * REST Resource + AccountsContainersMacrosCreateAPI + + -- * Creating a Request + , accountsContainersMACrosCreate + , AccountsContainersMACrosCreate + + -- * Request Lenses + , acmaccQuotaUser + , acmaccPrettyPrint + , acmaccContainerId + , acmaccUserIp + , acmaccAccountId + , acmaccKey + , acmaccOauthToken + , acmaccFields + , acmaccAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMACrosCreate@ which the +-- 'AccountsContainersMACrosCreate' request conforms to. +type AccountsContainersMacrosCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "macros" :> Post '[JSON] MACro + +-- | Creates a GTM Macro. +-- +-- /See:/ 'accountsContainersMACrosCreate' smart constructor. +data AccountsContainersMACrosCreate = AccountsContainersMACrosCreate + { _acmaccQuotaUser :: !(Maybe Text) + , _acmaccPrettyPrint :: !Bool + , _acmaccContainerId :: !Text + , _acmaccUserIp :: !(Maybe Text) + , _acmaccAccountId :: !Text + , _acmaccKey :: !(Maybe Text) + , _acmaccOauthToken :: !(Maybe Text) + , _acmaccFields :: !(Maybe Text) + , _acmaccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMACrosCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmaccQuotaUser' +-- +-- * 'acmaccPrettyPrint' +-- +-- * 'acmaccContainerId' +-- +-- * 'acmaccUserIp' +-- +-- * 'acmaccAccountId' +-- +-- * 'acmaccKey' +-- +-- * 'acmaccOauthToken' +-- +-- * 'acmaccFields' +-- +-- * 'acmaccAlt' +accountsContainersMACrosCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersMACrosCreate +accountsContainersMACrosCreate pAcmaccContainerId_ pAcmaccAccountId_ = + AccountsContainersMACrosCreate + { _acmaccQuotaUser = Nothing + , _acmaccPrettyPrint = True + , _acmaccContainerId = pAcmaccContainerId_ + , _acmaccUserIp = Nothing + , _acmaccAccountId = pAcmaccAccountId_ + , _acmaccKey = Nothing + , _acmaccOauthToken = Nothing + , _acmaccFields = Nothing + , _acmaccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmaccQuotaUser :: Lens' AccountsContainersMACrosCreate' (Maybe Text) +acmaccQuotaUser + = lens _acmaccQuotaUser + (\ s a -> s{_acmaccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmaccPrettyPrint :: Lens' AccountsContainersMACrosCreate' Bool +acmaccPrettyPrint + = lens _acmaccPrettyPrint + (\ s a -> s{_acmaccPrettyPrint = a}) + +-- | The GTM Container ID. +acmaccContainerId :: Lens' AccountsContainersMACrosCreate' Text +acmaccContainerId + = lens _acmaccContainerId + (\ s a -> s{_acmaccContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmaccUserIp :: Lens' AccountsContainersMACrosCreate' (Maybe Text) +acmaccUserIp + = lens _acmaccUserIp (\ s a -> s{_acmaccUserIp = a}) + +-- | The GTM Account ID. +acmaccAccountId :: Lens' AccountsContainersMACrosCreate' Text +acmaccAccountId + = lens _acmaccAccountId + (\ s a -> s{_acmaccAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmaccKey :: Lens' AccountsContainersMACrosCreate' (Maybe Text) +acmaccKey + = lens _acmaccKey (\ s a -> s{_acmaccKey = a}) + +-- | OAuth 2.0 token for the current user. +acmaccOauthToken :: Lens' AccountsContainersMACrosCreate' (Maybe Text) +acmaccOauthToken + = lens _acmaccOauthToken + (\ s a -> s{_acmaccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmaccFields :: Lens' AccountsContainersMACrosCreate' (Maybe Text) +acmaccFields + = lens _acmaccFields (\ s a -> s{_acmaccFields = a}) + +-- | Data format for the response. +acmaccAlt :: Lens' AccountsContainersMACrosCreate' Text +acmaccAlt + = lens _acmaccAlt (\ s a -> s{_acmaccAlt = a}) + +instance GoogleRequest + AccountsContainersMACrosCreate' where + type Rs AccountsContainersMACrosCreate' = MACro + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersMACrosCreate{..} + = go _acmaccQuotaUser _acmaccPrettyPrint + _acmaccContainerId + _acmaccUserIp + _acmaccAccountId + _acmaccKey + _acmaccOauthToken + _acmaccFields + _acmaccAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersMacrosCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Delete.hs new file mode 100644 index 000000000..e92dc7f0c --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Delete.hs @@ -0,0 +1,195 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.MACros.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Macro. +-- +-- /See:/ for @TagmanagerAccountsContainersMACrosDelete@. +module TagManager.Accounts.Containers.MACros.Delete + ( + -- * REST Resource + AccountsContainersMacrosDeleteAPI + + -- * Creating a Request + , accountsContainersMACrosDelete + , AccountsContainersMACrosDelete + + -- * Request Lenses + , acmacdQuotaUser + , acmacdPrettyPrint + , acmacdContainerId + , acmacdUserIp + , acmacdAccountId + , acmacdKey + , acmacdMacroId + , acmacdOauthToken + , acmacdFields + , acmacdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMACrosDelete@ which the +-- 'AccountsContainersMACrosDelete' request conforms to. +type AccountsContainersMacrosDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "macros" :> + Capture "macroId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Macro. +-- +-- /See:/ 'accountsContainersMACrosDelete' smart constructor. +data AccountsContainersMACrosDelete = AccountsContainersMACrosDelete + { _acmacdQuotaUser :: !(Maybe Text) + , _acmacdPrettyPrint :: !Bool + , _acmacdContainerId :: !Text + , _acmacdUserIp :: !(Maybe Text) + , _acmacdAccountId :: !Text + , _acmacdKey :: !(Maybe Text) + , _acmacdMacroId :: !Text + , _acmacdOauthToken :: !(Maybe Text) + , _acmacdFields :: !(Maybe Text) + , _acmacdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMACrosDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmacdQuotaUser' +-- +-- * 'acmacdPrettyPrint' +-- +-- * 'acmacdContainerId' +-- +-- * 'acmacdUserIp' +-- +-- * 'acmacdAccountId' +-- +-- * 'acmacdKey' +-- +-- * 'acmacdMacroId' +-- +-- * 'acmacdOauthToken' +-- +-- * 'acmacdFields' +-- +-- * 'acmacdAlt' +accountsContainersMACrosDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'macroId' + -> AccountsContainersMACrosDelete +accountsContainersMACrosDelete pAcmacdContainerId_ pAcmacdAccountId_ pAcmacdMacroId_ = + AccountsContainersMACrosDelete + { _acmacdQuotaUser = Nothing + , _acmacdPrettyPrint = True + , _acmacdContainerId = pAcmacdContainerId_ + , _acmacdUserIp = Nothing + , _acmacdAccountId = pAcmacdAccountId_ + , _acmacdKey = Nothing + , _acmacdMacroId = pAcmacdMacroId_ + , _acmacdOauthToken = Nothing + , _acmacdFields = Nothing + , _acmacdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmacdQuotaUser :: Lens' AccountsContainersMACrosDelete' (Maybe Text) +acmacdQuotaUser + = lens _acmacdQuotaUser + (\ s a -> s{_acmacdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmacdPrettyPrint :: Lens' AccountsContainersMACrosDelete' Bool +acmacdPrettyPrint + = lens _acmacdPrettyPrint + (\ s a -> s{_acmacdPrettyPrint = a}) + +-- | The GTM Container ID. +acmacdContainerId :: Lens' AccountsContainersMACrosDelete' Text +acmacdContainerId + = lens _acmacdContainerId + (\ s a -> s{_acmacdContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmacdUserIp :: Lens' AccountsContainersMACrosDelete' (Maybe Text) +acmacdUserIp + = lens _acmacdUserIp (\ s a -> s{_acmacdUserIp = a}) + +-- | The GTM Account ID. +acmacdAccountId :: Lens' AccountsContainersMACrosDelete' Text +acmacdAccountId + = lens _acmacdAccountId + (\ s a -> s{_acmacdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmacdKey :: Lens' AccountsContainersMACrosDelete' (Maybe Text) +acmacdKey + = lens _acmacdKey (\ s a -> s{_acmacdKey = a}) + +-- | The GTM Macro ID. +acmacdMacroId :: Lens' AccountsContainersMACrosDelete' Text +acmacdMacroId + = lens _acmacdMacroId + (\ s a -> s{_acmacdMacroId = a}) + +-- | OAuth 2.0 token for the current user. +acmacdOauthToken :: Lens' AccountsContainersMACrosDelete' (Maybe Text) +acmacdOauthToken + = lens _acmacdOauthToken + (\ s a -> s{_acmacdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmacdFields :: Lens' AccountsContainersMACrosDelete' (Maybe Text) +acmacdFields + = lens _acmacdFields (\ s a -> s{_acmacdFields = a}) + +-- | Data format for the response. +acmacdAlt :: Lens' AccountsContainersMACrosDelete' Text +acmacdAlt + = lens _acmacdAlt (\ s a -> s{_acmacdAlt = a}) + +instance GoogleRequest + AccountsContainersMACrosDelete' where + type Rs AccountsContainersMACrosDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersMACrosDelete{..} + = go _acmacdQuotaUser _acmacdPrettyPrint + _acmacdContainerId + _acmacdUserIp + _acmacdAccountId + _acmacdKey + _acmacdMacroId + _acmacdOauthToken + _acmacdFields + _acmacdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersMacrosDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Get.hs new file mode 100644 index 000000000..393916937 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Get.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.MACros.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Macro. +-- +-- /See:/ for @TagmanagerAccountsContainersMACrosGet@. +module TagManager.Accounts.Containers.MACros.Get + ( + -- * REST Resource + AccountsContainersMacrosGetAPI + + -- * Creating a Request + , accountsContainersMACrosGet + , AccountsContainersMACrosGet + + -- * Request Lenses + , acmacgQuotaUser + , acmacgPrettyPrint + , acmacgContainerId + , acmacgUserIp + , acmacgAccountId + , acmacgKey + , acmacgMacroId + , acmacgOauthToken + , acmacgFields + , acmacgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMACrosGet@ which the +-- 'AccountsContainersMACrosGet' request conforms to. +type AccountsContainersMacrosGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "macros" :> + Capture "macroId" Text :> Get '[JSON] MACro + +-- | Gets a GTM Macro. +-- +-- /See:/ 'accountsContainersMACrosGet' smart constructor. +data AccountsContainersMACrosGet = AccountsContainersMACrosGet + { _acmacgQuotaUser :: !(Maybe Text) + , _acmacgPrettyPrint :: !Bool + , _acmacgContainerId :: !Text + , _acmacgUserIp :: !(Maybe Text) + , _acmacgAccountId :: !Text + , _acmacgKey :: !(Maybe Text) + , _acmacgMacroId :: !Text + , _acmacgOauthToken :: !(Maybe Text) + , _acmacgFields :: !(Maybe Text) + , _acmacgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMACrosGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmacgQuotaUser' +-- +-- * 'acmacgPrettyPrint' +-- +-- * 'acmacgContainerId' +-- +-- * 'acmacgUserIp' +-- +-- * 'acmacgAccountId' +-- +-- * 'acmacgKey' +-- +-- * 'acmacgMacroId' +-- +-- * 'acmacgOauthToken' +-- +-- * 'acmacgFields' +-- +-- * 'acmacgAlt' +accountsContainersMACrosGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'macroId' + -> AccountsContainersMACrosGet +accountsContainersMACrosGet pAcmacgContainerId_ pAcmacgAccountId_ pAcmacgMacroId_ = + AccountsContainersMACrosGet + { _acmacgQuotaUser = Nothing + , _acmacgPrettyPrint = True + , _acmacgContainerId = pAcmacgContainerId_ + , _acmacgUserIp = Nothing + , _acmacgAccountId = pAcmacgAccountId_ + , _acmacgKey = Nothing + , _acmacgMacroId = pAcmacgMacroId_ + , _acmacgOauthToken = Nothing + , _acmacgFields = Nothing + , _acmacgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmacgQuotaUser :: Lens' AccountsContainersMACrosGet' (Maybe Text) +acmacgQuotaUser + = lens _acmacgQuotaUser + (\ s a -> s{_acmacgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmacgPrettyPrint :: Lens' AccountsContainersMACrosGet' Bool +acmacgPrettyPrint + = lens _acmacgPrettyPrint + (\ s a -> s{_acmacgPrettyPrint = a}) + +-- | The GTM Container ID. +acmacgContainerId :: Lens' AccountsContainersMACrosGet' Text +acmacgContainerId + = lens _acmacgContainerId + (\ s a -> s{_acmacgContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmacgUserIp :: Lens' AccountsContainersMACrosGet' (Maybe Text) +acmacgUserIp + = lens _acmacgUserIp (\ s a -> s{_acmacgUserIp = a}) + +-- | The GTM Account ID. +acmacgAccountId :: Lens' AccountsContainersMACrosGet' Text +acmacgAccountId + = lens _acmacgAccountId + (\ s a -> s{_acmacgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmacgKey :: Lens' AccountsContainersMACrosGet' (Maybe Text) +acmacgKey + = lens _acmacgKey (\ s a -> s{_acmacgKey = a}) + +-- | The GTM Macro ID. +acmacgMacroId :: Lens' AccountsContainersMACrosGet' Text +acmacgMacroId + = lens _acmacgMacroId + (\ s a -> s{_acmacgMacroId = a}) + +-- | OAuth 2.0 token for the current user. +acmacgOauthToken :: Lens' AccountsContainersMACrosGet' (Maybe Text) +acmacgOauthToken + = lens _acmacgOauthToken + (\ s a -> s{_acmacgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmacgFields :: Lens' AccountsContainersMACrosGet' (Maybe Text) +acmacgFields + = lens _acmacgFields (\ s a -> s{_acmacgFields = a}) + +-- | Data format for the response. +acmacgAlt :: Lens' AccountsContainersMACrosGet' Text +acmacgAlt + = lens _acmacgAlt (\ s a -> s{_acmacgAlt = a}) + +instance GoogleRequest AccountsContainersMACrosGet' + where + type Rs AccountsContainersMACrosGet' = MACro + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersMACrosGet{..} + = go _acmacgQuotaUser _acmacgPrettyPrint + _acmacgContainerId + _acmacgUserIp + _acmacgAccountId + _acmacgKey + _acmacgMacroId + _acmacgOauthToken + _acmacgFields + _acmacgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersMacrosGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/List.hs new file mode 100644 index 000000000..aaaadbf0b --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/List.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.MACros.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Macros of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersMACrosList@. +module TagManager.Accounts.Containers.MACros.List + ( + -- * REST Resource + AccountsContainersMacrosListAPI + + -- * Creating a Request + , accountsContainersMACrosList + , AccountsContainersMACrosList + + -- * Request Lenses + , acmaclQuotaUser + , acmaclPrettyPrint + , acmaclContainerId + , acmaclUserIp + , acmaclAccountId + , acmaclKey + , acmaclOauthToken + , acmaclFields + , acmaclAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMACrosList@ which the +-- 'AccountsContainersMACrosList' request conforms to. +type AccountsContainersMacrosListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "macros" :> Get '[JSON] ListMACrosResponse + +-- | Lists all GTM Macros of a Container. +-- +-- /See:/ 'accountsContainersMACrosList' smart constructor. +data AccountsContainersMACrosList = AccountsContainersMACrosList + { _acmaclQuotaUser :: !(Maybe Text) + , _acmaclPrettyPrint :: !Bool + , _acmaclContainerId :: !Text + , _acmaclUserIp :: !(Maybe Text) + , _acmaclAccountId :: !Text + , _acmaclKey :: !(Maybe Text) + , _acmaclOauthToken :: !(Maybe Text) + , _acmaclFields :: !(Maybe Text) + , _acmaclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMACrosList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmaclQuotaUser' +-- +-- * 'acmaclPrettyPrint' +-- +-- * 'acmaclContainerId' +-- +-- * 'acmaclUserIp' +-- +-- * 'acmaclAccountId' +-- +-- * 'acmaclKey' +-- +-- * 'acmaclOauthToken' +-- +-- * 'acmaclFields' +-- +-- * 'acmaclAlt' +accountsContainersMACrosList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersMACrosList +accountsContainersMACrosList pAcmaclContainerId_ pAcmaclAccountId_ = + AccountsContainersMACrosList + { _acmaclQuotaUser = Nothing + , _acmaclPrettyPrint = True + , _acmaclContainerId = pAcmaclContainerId_ + , _acmaclUserIp = Nothing + , _acmaclAccountId = pAcmaclAccountId_ + , _acmaclKey = Nothing + , _acmaclOauthToken = Nothing + , _acmaclFields = Nothing + , _acmaclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmaclQuotaUser :: Lens' AccountsContainersMACrosList' (Maybe Text) +acmaclQuotaUser + = lens _acmaclQuotaUser + (\ s a -> s{_acmaclQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmaclPrettyPrint :: Lens' AccountsContainersMACrosList' Bool +acmaclPrettyPrint + = lens _acmaclPrettyPrint + (\ s a -> s{_acmaclPrettyPrint = a}) + +-- | The GTM Container ID. +acmaclContainerId :: Lens' AccountsContainersMACrosList' Text +acmaclContainerId + = lens _acmaclContainerId + (\ s a -> s{_acmaclContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmaclUserIp :: Lens' AccountsContainersMACrosList' (Maybe Text) +acmaclUserIp + = lens _acmaclUserIp (\ s a -> s{_acmaclUserIp = a}) + +-- | The GTM Account ID. +acmaclAccountId :: Lens' AccountsContainersMACrosList' Text +acmaclAccountId + = lens _acmaclAccountId + (\ s a -> s{_acmaclAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmaclKey :: Lens' AccountsContainersMACrosList' (Maybe Text) +acmaclKey + = lens _acmaclKey (\ s a -> s{_acmaclKey = a}) + +-- | OAuth 2.0 token for the current user. +acmaclOauthToken :: Lens' AccountsContainersMACrosList' (Maybe Text) +acmaclOauthToken + = lens _acmaclOauthToken + (\ s a -> s{_acmaclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmaclFields :: Lens' AccountsContainersMACrosList' (Maybe Text) +acmaclFields + = lens _acmaclFields (\ s a -> s{_acmaclFields = a}) + +-- | Data format for the response. +acmaclAlt :: Lens' AccountsContainersMACrosList' Text +acmaclAlt + = lens _acmaclAlt (\ s a -> s{_acmaclAlt = a}) + +instance GoogleRequest AccountsContainersMACrosList' + where + type Rs AccountsContainersMACrosList' = + ListMACrosResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersMACrosList{..} + = go _acmaclQuotaUser _acmaclPrettyPrint + _acmaclContainerId + _acmaclUserIp + _acmaclAccountId + _acmaclKey + _acmaclOauthToken + _acmaclFields + _acmaclAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersMacrosListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Update.hs new file mode 100644 index 000000000..d2e840f8a --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MACros/Update.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.MACros.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Macro. +-- +-- /See:/ for @TagmanagerAccountsContainersMACrosUpdate@. +module TagManager.Accounts.Containers.MACros.Update + ( + -- * REST Resource + AccountsContainersMacrosUpdateAPI + + -- * Creating a Request + , accountsContainersMACrosUpdate + , AccountsContainersMACrosUpdate + + -- * Request Lenses + , acmacuQuotaUser + , acmacuPrettyPrint + , acmacuContainerId + , acmacuUserIp + , acmacuFingerprint + , acmacuAccountId + , acmacuKey + , acmacuMacroId + , acmacuOauthToken + , acmacuFields + , acmacuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMACrosUpdate@ which the +-- 'AccountsContainersMACrosUpdate' request conforms to. +type AccountsContainersMacrosUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "macros" :> + Capture "macroId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] MACro + +-- | Updates a GTM Macro. +-- +-- /See:/ 'accountsContainersMACrosUpdate' smart constructor. +data AccountsContainersMACrosUpdate = AccountsContainersMACrosUpdate + { _acmacuQuotaUser :: !(Maybe Text) + , _acmacuPrettyPrint :: !Bool + , _acmacuContainerId :: !Text + , _acmacuUserIp :: !(Maybe Text) + , _acmacuFingerprint :: !(Maybe Text) + , _acmacuAccountId :: !Text + , _acmacuKey :: !(Maybe Text) + , _acmacuMacroId :: !Text + , _acmacuOauthToken :: !(Maybe Text) + , _acmacuFields :: !(Maybe Text) + , _acmacuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMACrosUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmacuQuotaUser' +-- +-- * 'acmacuPrettyPrint' +-- +-- * 'acmacuContainerId' +-- +-- * 'acmacuUserIp' +-- +-- * 'acmacuFingerprint' +-- +-- * 'acmacuAccountId' +-- +-- * 'acmacuKey' +-- +-- * 'acmacuMacroId' +-- +-- * 'acmacuOauthToken' +-- +-- * 'acmacuFields' +-- +-- * 'acmacuAlt' +accountsContainersMACrosUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'macroId' + -> AccountsContainersMACrosUpdate +accountsContainersMACrosUpdate pAcmacuContainerId_ pAcmacuAccountId_ pAcmacuMacroId_ = + AccountsContainersMACrosUpdate + { _acmacuQuotaUser = Nothing + , _acmacuPrettyPrint = True + , _acmacuContainerId = pAcmacuContainerId_ + , _acmacuUserIp = Nothing + , _acmacuFingerprint = Nothing + , _acmacuAccountId = pAcmacuAccountId_ + , _acmacuKey = Nothing + , _acmacuMacroId = pAcmacuMacroId_ + , _acmacuOauthToken = Nothing + , _acmacuFields = Nothing + , _acmacuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmacuQuotaUser :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuQuotaUser + = lens _acmacuQuotaUser + (\ s a -> s{_acmacuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmacuPrettyPrint :: Lens' AccountsContainersMACrosUpdate' Bool +acmacuPrettyPrint + = lens _acmacuPrettyPrint + (\ s a -> s{_acmacuPrettyPrint = a}) + +-- | The GTM Container ID. +acmacuContainerId :: Lens' AccountsContainersMACrosUpdate' Text +acmacuContainerId + = lens _acmacuContainerId + (\ s a -> s{_acmacuContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmacuUserIp :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuUserIp + = lens _acmacuUserIp (\ s a -> s{_acmacuUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the macro +-- in storage. +acmacuFingerprint :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuFingerprint + = lens _acmacuFingerprint + (\ s a -> s{_acmacuFingerprint = a}) + +-- | The GTM Account ID. +acmacuAccountId :: Lens' AccountsContainersMACrosUpdate' Text +acmacuAccountId + = lens _acmacuAccountId + (\ s a -> s{_acmacuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmacuKey :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuKey + = lens _acmacuKey (\ s a -> s{_acmacuKey = a}) + +-- | The GTM Macro ID. +acmacuMacroId :: Lens' AccountsContainersMACrosUpdate' Text +acmacuMacroId + = lens _acmacuMacroId + (\ s a -> s{_acmacuMacroId = a}) + +-- | OAuth 2.0 token for the current user. +acmacuOauthToken :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuOauthToken + = lens _acmacuOauthToken + (\ s a -> s{_acmacuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmacuFields :: Lens' AccountsContainersMACrosUpdate' (Maybe Text) +acmacuFields + = lens _acmacuFields (\ s a -> s{_acmacuFields = a}) + +-- | Data format for the response. +acmacuAlt :: Lens' AccountsContainersMACrosUpdate' Text +acmacuAlt + = lens _acmacuAlt (\ s a -> s{_acmacuAlt = a}) + +instance GoogleRequest + AccountsContainersMACrosUpdate' where + type Rs AccountsContainersMACrosUpdate' = MACro + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersMACrosUpdate{..} + = go _acmacuQuotaUser _acmacuPrettyPrint + _acmacuContainerId + _acmacuUserIp + _acmacuFingerprint + _acmacuAccountId + _acmacuKey + _acmacuMacroId + _acmacuOauthToken + _acmacuFields + _acmacuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersMacrosUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Move_folders/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Move_folders/Update.hs new file mode 100644 index 000000000..bd2121a2e --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Move_folders/Update.hs @@ -0,0 +1,230 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Move_folders.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Moves entities to a GTM Folder. +-- +-- /See:/ for @TagmanagerAccountsContainersMove_foldersUpdate@. +module TagManager.Accounts.Containers.Move_folders.Update + ( + -- * REST Resource + AccountsContainersMove_foldersUpdateAPI + + -- * Creating a Request + , accountsContainersMoveFoldersUpdate + , AccountsContainersMoveFoldersUpdate + + -- * Request Lenses + , acmuQuotaUser + , acmuPrettyPrint + , acmuContainerId + , acmuTriggerId + , acmuUserIp + , acmuVariableId + , acmuFolderId + , acmuAccountId + , acmuTagId + , acmuKey + , acmuOauthToken + , acmuFields + , acmuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersMove_foldersUpdate@ which the +-- 'AccountsContainersMoveFoldersUpdate' request conforms to. +type AccountsContainersMove_foldersUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "move_folders" :> + Capture "folderId" Text :> + QueryParams "triggerId" Text :> + QueryParams "variableId" Text :> + QueryParams "tagId" Text :> Put '[JSON] () + +-- | Moves entities to a GTM Folder. +-- +-- /See:/ 'accountsContainersMoveFoldersUpdate' smart constructor. +data AccountsContainersMoveFoldersUpdate = AccountsContainersMoveFoldersUpdate + { _acmuQuotaUser :: !(Maybe Text) + , _acmuPrettyPrint :: !Bool + , _acmuContainerId :: !Text + , _acmuTriggerId :: !(Maybe Text) + , _acmuUserIp :: !(Maybe Text) + , _acmuVariableId :: !(Maybe Text) + , _acmuFolderId :: !Text + , _acmuAccountId :: !Text + , _acmuTagId :: !(Maybe Text) + , _acmuKey :: !(Maybe Text) + , _acmuOauthToken :: !(Maybe Text) + , _acmuFields :: !(Maybe Text) + , _acmuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersMove_foldersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acmuQuotaUser' +-- +-- * 'acmuPrettyPrint' +-- +-- * 'acmuContainerId' +-- +-- * 'acmuTriggerId' +-- +-- * 'acmuUserIp' +-- +-- * 'acmuVariableId' +-- +-- * 'acmuFolderId' +-- +-- * 'acmuAccountId' +-- +-- * 'acmuTagId' +-- +-- * 'acmuKey' +-- +-- * 'acmuOauthToken' +-- +-- * 'acmuFields' +-- +-- * 'acmuAlt' +accountsContainersMoveFoldersUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'folderId' + -> Text -- ^ 'accountId' + -> AccountsContainersMoveFoldersUpdate +accountsContainersMoveFoldersUpdate pAcmuContainerId_ pAcmuFolderId_ pAcmuAccountId_ = + AccountsContainersMoveFoldersUpdate + { _acmuQuotaUser = Nothing + , _acmuPrettyPrint = True + , _acmuContainerId = pAcmuContainerId_ + , _acmuTriggerId = Nothing + , _acmuUserIp = Nothing + , _acmuVariableId = Nothing + , _acmuFolderId = pAcmuFolderId_ + , _acmuAccountId = pAcmuAccountId_ + , _acmuTagId = Nothing + , _acmuKey = Nothing + , _acmuOauthToken = Nothing + , _acmuFields = Nothing + , _acmuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acmuQuotaUser :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuQuotaUser + = lens _acmuQuotaUser + (\ s a -> s{_acmuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acmuPrettyPrint :: Lens' AccountsContainersMove_foldersUpdate' Bool +acmuPrettyPrint + = lens _acmuPrettyPrint + (\ s a -> s{_acmuPrettyPrint = a}) + +-- | The GTM Container ID. +acmuContainerId :: Lens' AccountsContainersMove_foldersUpdate' Text +acmuContainerId + = lens _acmuContainerId + (\ s a -> s{_acmuContainerId = a}) + +-- | The triggers to be moved to the folder. +acmuTriggerId :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuTriggerId + = lens _acmuTriggerId + (\ s a -> s{_acmuTriggerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acmuUserIp :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuUserIp + = lens _acmuUserIp (\ s a -> s{_acmuUserIp = a}) + +-- | The variables to be moved to the folder. +acmuVariableId :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuVariableId + = lens _acmuVariableId + (\ s a -> s{_acmuVariableId = a}) + +-- | The GTM Folder ID. +acmuFolderId :: Lens' AccountsContainersMove_foldersUpdate' Text +acmuFolderId + = lens _acmuFolderId (\ s a -> s{_acmuFolderId = a}) + +-- | The GTM Account ID. +acmuAccountId :: Lens' AccountsContainersMove_foldersUpdate' Text +acmuAccountId + = lens _acmuAccountId + (\ s a -> s{_acmuAccountId = a}) + +-- | The tags to be moved to the folder. +acmuTagId :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuTagId + = lens _acmuTagId (\ s a -> s{_acmuTagId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acmuKey :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuKey = lens _acmuKey (\ s a -> s{_acmuKey = a}) + +-- | OAuth 2.0 token for the current user. +acmuOauthToken :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuOauthToken + = lens _acmuOauthToken + (\ s a -> s{_acmuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acmuFields :: Lens' AccountsContainersMove_foldersUpdate' (Maybe Text) +acmuFields + = lens _acmuFields (\ s a -> s{_acmuFields = a}) + +-- | Data format for the response. +acmuAlt :: Lens' AccountsContainersMove_foldersUpdate' Text +acmuAlt = lens _acmuAlt (\ s a -> s{_acmuAlt = a}) + +instance GoogleRequest + AccountsContainersMove_foldersUpdate' where + type Rs AccountsContainersMove_foldersUpdate' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersMoveFoldersUpdate{..} + = go _acmuQuotaUser _acmuPrettyPrint _acmuContainerId + _acmuTriggerId + _acmuUserIp + _acmuVariableId + _acmuFolderId + _acmuAccountId + _acmuTagId + _acmuKey + _acmuOauthToken + _acmuFields + _acmuAlt + where go + = clientWithRoute + (Proxy :: + Proxy AccountsContainersMove_foldersUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Create.hs new file mode 100644 index 000000000..c32bd2ce2 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Create.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Rules.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Rule. +-- +-- /See:/ for @TagmanagerAccountsContainersRulesCreate@. +module TagManager.Accounts.Containers.Rules.Create + ( + -- * REST Resource + AccountsContainersRulesCreateAPI + + -- * Creating a Request + , accountsContainersRulesCreate + , AccountsContainersRulesCreate + + -- * Request Lenses + , acrcQuotaUser + , acrcPrettyPrint + , acrcContainerId + , acrcUserIp + , acrcAccountId + , acrcKey + , acrcOauthToken + , acrcFields + , acrcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersRulesCreate@ which the +-- 'AccountsContainersRulesCreate' request conforms to. +type AccountsContainersRulesCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "rules" :> Post '[JSON] Rule + +-- | Creates a GTM Rule. +-- +-- /See:/ 'accountsContainersRulesCreate' smart constructor. +data AccountsContainersRulesCreate = AccountsContainersRulesCreate + { _acrcQuotaUser :: !(Maybe Text) + , _acrcPrettyPrint :: !Bool + , _acrcContainerId :: !Text + , _acrcUserIp :: !(Maybe Text) + , _acrcAccountId :: !Text + , _acrcKey :: !(Maybe Text) + , _acrcOauthToken :: !(Maybe Text) + , _acrcFields :: !(Maybe Text) + , _acrcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersRulesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acrcQuotaUser' +-- +-- * 'acrcPrettyPrint' +-- +-- * 'acrcContainerId' +-- +-- * 'acrcUserIp' +-- +-- * 'acrcAccountId' +-- +-- * 'acrcKey' +-- +-- * 'acrcOauthToken' +-- +-- * 'acrcFields' +-- +-- * 'acrcAlt' +accountsContainersRulesCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersRulesCreate +accountsContainersRulesCreate pAcrcContainerId_ pAcrcAccountId_ = + AccountsContainersRulesCreate + { _acrcQuotaUser = Nothing + , _acrcPrettyPrint = True + , _acrcContainerId = pAcrcContainerId_ + , _acrcUserIp = Nothing + , _acrcAccountId = pAcrcAccountId_ + , _acrcKey = Nothing + , _acrcOauthToken = Nothing + , _acrcFields = Nothing + , _acrcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acrcQuotaUser :: Lens' AccountsContainersRulesCreate' (Maybe Text) +acrcQuotaUser + = lens _acrcQuotaUser + (\ s a -> s{_acrcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acrcPrettyPrint :: Lens' AccountsContainersRulesCreate' Bool +acrcPrettyPrint + = lens _acrcPrettyPrint + (\ s a -> s{_acrcPrettyPrint = a}) + +-- | The GTM Container ID. +acrcContainerId :: Lens' AccountsContainersRulesCreate' Text +acrcContainerId + = lens _acrcContainerId + (\ s a -> s{_acrcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acrcUserIp :: Lens' AccountsContainersRulesCreate' (Maybe Text) +acrcUserIp + = lens _acrcUserIp (\ s a -> s{_acrcUserIp = a}) + +-- | The GTM Account ID. +acrcAccountId :: Lens' AccountsContainersRulesCreate' Text +acrcAccountId + = lens _acrcAccountId + (\ s a -> s{_acrcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acrcKey :: Lens' AccountsContainersRulesCreate' (Maybe Text) +acrcKey = lens _acrcKey (\ s a -> s{_acrcKey = a}) + +-- | OAuth 2.0 token for the current user. +acrcOauthToken :: Lens' AccountsContainersRulesCreate' (Maybe Text) +acrcOauthToken + = lens _acrcOauthToken + (\ s a -> s{_acrcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acrcFields :: Lens' AccountsContainersRulesCreate' (Maybe Text) +acrcFields + = lens _acrcFields (\ s a -> s{_acrcFields = a}) + +-- | Data format for the response. +acrcAlt :: Lens' AccountsContainersRulesCreate' Text +acrcAlt = lens _acrcAlt (\ s a -> s{_acrcAlt = a}) + +instance GoogleRequest AccountsContainersRulesCreate' + where + type Rs AccountsContainersRulesCreate' = Rule + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersRulesCreate{..} + = go _acrcQuotaUser _acrcPrettyPrint _acrcContainerId + _acrcUserIp + _acrcAccountId + _acrcKey + _acrcOauthToken + _acrcFields + _acrcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersRulesCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Delete.hs new file mode 100644 index 000000000..39b3593a4 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Delete.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Rules.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Rule. +-- +-- /See:/ for @TagmanagerAccountsContainersRulesDelete@. +module TagManager.Accounts.Containers.Rules.Delete + ( + -- * REST Resource + AccountsContainersRulesDeleteAPI + + -- * Creating a Request + , accountsContainersRulesDelete + , AccountsContainersRulesDelete + + -- * Request Lenses + , acrdQuotaUser + , acrdPrettyPrint + , acrdContainerId + , acrdUserIp + , acrdRuleId + , acrdAccountId + , acrdKey + , acrdOauthToken + , acrdFields + , acrdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersRulesDelete@ which the +-- 'AccountsContainersRulesDelete' request conforms to. +type AccountsContainersRulesDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "rules" :> Capture "ruleId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Rule. +-- +-- /See:/ 'accountsContainersRulesDelete' smart constructor. +data AccountsContainersRulesDelete = AccountsContainersRulesDelete + { _acrdQuotaUser :: !(Maybe Text) + , _acrdPrettyPrint :: !Bool + , _acrdContainerId :: !Text + , _acrdUserIp :: !(Maybe Text) + , _acrdRuleId :: !Text + , _acrdAccountId :: !Text + , _acrdKey :: !(Maybe Text) + , _acrdOauthToken :: !(Maybe Text) + , _acrdFields :: !(Maybe Text) + , _acrdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersRulesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acrdQuotaUser' +-- +-- * 'acrdPrettyPrint' +-- +-- * 'acrdContainerId' +-- +-- * 'acrdUserIp' +-- +-- * 'acrdRuleId' +-- +-- * 'acrdAccountId' +-- +-- * 'acrdKey' +-- +-- * 'acrdOauthToken' +-- +-- * 'acrdFields' +-- +-- * 'acrdAlt' +accountsContainersRulesDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'ruleId' + -> Text -- ^ 'accountId' + -> AccountsContainersRulesDelete +accountsContainersRulesDelete pAcrdContainerId_ pAcrdRuleId_ pAcrdAccountId_ = + AccountsContainersRulesDelete + { _acrdQuotaUser = Nothing + , _acrdPrettyPrint = True + , _acrdContainerId = pAcrdContainerId_ + , _acrdUserIp = Nothing + , _acrdRuleId = pAcrdRuleId_ + , _acrdAccountId = pAcrdAccountId_ + , _acrdKey = Nothing + , _acrdOauthToken = Nothing + , _acrdFields = Nothing + , _acrdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acrdQuotaUser :: Lens' AccountsContainersRulesDelete' (Maybe Text) +acrdQuotaUser + = lens _acrdQuotaUser + (\ s a -> s{_acrdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acrdPrettyPrint :: Lens' AccountsContainersRulesDelete' Bool +acrdPrettyPrint + = lens _acrdPrettyPrint + (\ s a -> s{_acrdPrettyPrint = a}) + +-- | The GTM Container ID. +acrdContainerId :: Lens' AccountsContainersRulesDelete' Text +acrdContainerId + = lens _acrdContainerId + (\ s a -> s{_acrdContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acrdUserIp :: Lens' AccountsContainersRulesDelete' (Maybe Text) +acrdUserIp + = lens _acrdUserIp (\ s a -> s{_acrdUserIp = a}) + +-- | The GTM Rule ID. +acrdRuleId :: Lens' AccountsContainersRulesDelete' Text +acrdRuleId + = lens _acrdRuleId (\ s a -> s{_acrdRuleId = a}) + +-- | The GTM Account ID. +acrdAccountId :: Lens' AccountsContainersRulesDelete' Text +acrdAccountId + = lens _acrdAccountId + (\ s a -> s{_acrdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acrdKey :: Lens' AccountsContainersRulesDelete' (Maybe Text) +acrdKey = lens _acrdKey (\ s a -> s{_acrdKey = a}) + +-- | OAuth 2.0 token for the current user. +acrdOauthToken :: Lens' AccountsContainersRulesDelete' (Maybe Text) +acrdOauthToken + = lens _acrdOauthToken + (\ s a -> s{_acrdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acrdFields :: Lens' AccountsContainersRulesDelete' (Maybe Text) +acrdFields + = lens _acrdFields (\ s a -> s{_acrdFields = a}) + +-- | Data format for the response. +acrdAlt :: Lens' AccountsContainersRulesDelete' Text +acrdAlt = lens _acrdAlt (\ s a -> s{_acrdAlt = a}) + +instance GoogleRequest AccountsContainersRulesDelete' + where + type Rs AccountsContainersRulesDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersRulesDelete{..} + = go _acrdQuotaUser _acrdPrettyPrint _acrdContainerId + _acrdUserIp + _acrdRuleId + _acrdAccountId + _acrdKey + _acrdOauthToken + _acrdFields + _acrdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersRulesDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Get.hs new file mode 100644 index 000000000..fb99aa822 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Get.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Rules.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Rule. +-- +-- /See:/ for @TagmanagerAccountsContainersRulesGet@. +module TagManager.Accounts.Containers.Rules.Get + ( + -- * REST Resource + AccountsContainersRulesGetAPI + + -- * Creating a Request + , accountsContainersRulesGet + , AccountsContainersRulesGet + + -- * Request Lenses + , acrgQuotaUser + , acrgPrettyPrint + , acrgContainerId + , acrgUserIp + , acrgRuleId + , acrgAccountId + , acrgKey + , acrgOauthToken + , acrgFields + , acrgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersRulesGet@ which the +-- 'AccountsContainersRulesGet' request conforms to. +type AccountsContainersRulesGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "rules" :> Capture "ruleId" Text :> Get '[JSON] Rule + +-- | Gets a GTM Rule. +-- +-- /See:/ 'accountsContainersRulesGet' smart constructor. +data AccountsContainersRulesGet = AccountsContainersRulesGet + { _acrgQuotaUser :: !(Maybe Text) + , _acrgPrettyPrint :: !Bool + , _acrgContainerId :: !Text + , _acrgUserIp :: !(Maybe Text) + , _acrgRuleId :: !Text + , _acrgAccountId :: !Text + , _acrgKey :: !(Maybe Text) + , _acrgOauthToken :: !(Maybe Text) + , _acrgFields :: !(Maybe Text) + , _acrgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersRulesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acrgQuotaUser' +-- +-- * 'acrgPrettyPrint' +-- +-- * 'acrgContainerId' +-- +-- * 'acrgUserIp' +-- +-- * 'acrgRuleId' +-- +-- * 'acrgAccountId' +-- +-- * 'acrgKey' +-- +-- * 'acrgOauthToken' +-- +-- * 'acrgFields' +-- +-- * 'acrgAlt' +accountsContainersRulesGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'ruleId' + -> Text -- ^ 'accountId' + -> AccountsContainersRulesGet +accountsContainersRulesGet pAcrgContainerId_ pAcrgRuleId_ pAcrgAccountId_ = + AccountsContainersRulesGet + { _acrgQuotaUser = Nothing + , _acrgPrettyPrint = True + , _acrgContainerId = pAcrgContainerId_ + , _acrgUserIp = Nothing + , _acrgRuleId = pAcrgRuleId_ + , _acrgAccountId = pAcrgAccountId_ + , _acrgKey = Nothing + , _acrgOauthToken = Nothing + , _acrgFields = Nothing + , _acrgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acrgQuotaUser :: Lens' AccountsContainersRulesGet' (Maybe Text) +acrgQuotaUser + = lens _acrgQuotaUser + (\ s a -> s{_acrgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acrgPrettyPrint :: Lens' AccountsContainersRulesGet' Bool +acrgPrettyPrint + = lens _acrgPrettyPrint + (\ s a -> s{_acrgPrettyPrint = a}) + +-- | The GTM Container ID. +acrgContainerId :: Lens' AccountsContainersRulesGet' Text +acrgContainerId + = lens _acrgContainerId + (\ s a -> s{_acrgContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acrgUserIp :: Lens' AccountsContainersRulesGet' (Maybe Text) +acrgUserIp + = lens _acrgUserIp (\ s a -> s{_acrgUserIp = a}) + +-- | The GTM Rule ID. +acrgRuleId :: Lens' AccountsContainersRulesGet' Text +acrgRuleId + = lens _acrgRuleId (\ s a -> s{_acrgRuleId = a}) + +-- | The GTM Account ID. +acrgAccountId :: Lens' AccountsContainersRulesGet' Text +acrgAccountId + = lens _acrgAccountId + (\ s a -> s{_acrgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acrgKey :: Lens' AccountsContainersRulesGet' (Maybe Text) +acrgKey = lens _acrgKey (\ s a -> s{_acrgKey = a}) + +-- | OAuth 2.0 token for the current user. +acrgOauthToken :: Lens' AccountsContainersRulesGet' (Maybe Text) +acrgOauthToken + = lens _acrgOauthToken + (\ s a -> s{_acrgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acrgFields :: Lens' AccountsContainersRulesGet' (Maybe Text) +acrgFields + = lens _acrgFields (\ s a -> s{_acrgFields = a}) + +-- | Data format for the response. +acrgAlt :: Lens' AccountsContainersRulesGet' Text +acrgAlt = lens _acrgAlt (\ s a -> s{_acrgAlt = a}) + +instance GoogleRequest AccountsContainersRulesGet' + where + type Rs AccountsContainersRulesGet' = Rule + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersRulesGet{..} + = go _acrgQuotaUser _acrgPrettyPrint _acrgContainerId + _acrgUserIp + _acrgRuleId + _acrgAccountId + _acrgKey + _acrgOauthToken + _acrgFields + _acrgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersRulesGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/List.hs new file mode 100644 index 000000000..df01437f7 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/List.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Rules.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Rules of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersRulesList@. +module TagManager.Accounts.Containers.Rules.List + ( + -- * REST Resource + AccountsContainersRulesListAPI + + -- * Creating a Request + , accountsContainersRulesList + , AccountsContainersRulesList + + -- * Request Lenses + , acrlQuotaUser + , acrlPrettyPrint + , acrlContainerId + , acrlUserIp + , acrlAccountId + , acrlKey + , acrlOauthToken + , acrlFields + , acrlAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersRulesList@ which the +-- 'AccountsContainersRulesList' request conforms to. +type AccountsContainersRulesListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "rules" :> Get '[JSON] ListRulesResponse + +-- | Lists all GTM Rules of a Container. +-- +-- /See:/ 'accountsContainersRulesList' smart constructor. +data AccountsContainersRulesList = AccountsContainersRulesList + { _acrlQuotaUser :: !(Maybe Text) + , _acrlPrettyPrint :: !Bool + , _acrlContainerId :: !Text + , _acrlUserIp :: !(Maybe Text) + , _acrlAccountId :: !Text + , _acrlKey :: !(Maybe Text) + , _acrlOauthToken :: !(Maybe Text) + , _acrlFields :: !(Maybe Text) + , _acrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersRulesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acrlQuotaUser' +-- +-- * 'acrlPrettyPrint' +-- +-- * 'acrlContainerId' +-- +-- * 'acrlUserIp' +-- +-- * 'acrlAccountId' +-- +-- * 'acrlKey' +-- +-- * 'acrlOauthToken' +-- +-- * 'acrlFields' +-- +-- * 'acrlAlt' +accountsContainersRulesList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersRulesList +accountsContainersRulesList pAcrlContainerId_ pAcrlAccountId_ = + AccountsContainersRulesList + { _acrlQuotaUser = Nothing + , _acrlPrettyPrint = True + , _acrlContainerId = pAcrlContainerId_ + , _acrlUserIp = Nothing + , _acrlAccountId = pAcrlAccountId_ + , _acrlKey = Nothing + , _acrlOauthToken = Nothing + , _acrlFields = Nothing + , _acrlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acrlQuotaUser :: Lens' AccountsContainersRulesList' (Maybe Text) +acrlQuotaUser + = lens _acrlQuotaUser + (\ s a -> s{_acrlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acrlPrettyPrint :: Lens' AccountsContainersRulesList' Bool +acrlPrettyPrint + = lens _acrlPrettyPrint + (\ s a -> s{_acrlPrettyPrint = a}) + +-- | The GTM Container ID. +acrlContainerId :: Lens' AccountsContainersRulesList' Text +acrlContainerId + = lens _acrlContainerId + (\ s a -> s{_acrlContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acrlUserIp :: Lens' AccountsContainersRulesList' (Maybe Text) +acrlUserIp + = lens _acrlUserIp (\ s a -> s{_acrlUserIp = a}) + +-- | The GTM Account ID. +acrlAccountId :: Lens' AccountsContainersRulesList' Text +acrlAccountId + = lens _acrlAccountId + (\ s a -> s{_acrlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acrlKey :: Lens' AccountsContainersRulesList' (Maybe Text) +acrlKey = lens _acrlKey (\ s a -> s{_acrlKey = a}) + +-- | OAuth 2.0 token for the current user. +acrlOauthToken :: Lens' AccountsContainersRulesList' (Maybe Text) +acrlOauthToken + = lens _acrlOauthToken + (\ s a -> s{_acrlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acrlFields :: Lens' AccountsContainersRulesList' (Maybe Text) +acrlFields + = lens _acrlFields (\ s a -> s{_acrlFields = a}) + +-- | Data format for the response. +acrlAlt :: Lens' AccountsContainersRulesList' Text +acrlAlt = lens _acrlAlt (\ s a -> s{_acrlAlt = a}) + +instance GoogleRequest AccountsContainersRulesList' + where + type Rs AccountsContainersRulesList' = + ListRulesResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersRulesList{..} + = go _acrlQuotaUser _acrlPrettyPrint _acrlContainerId + _acrlUserIp + _acrlAccountId + _acrlKey + _acrlOauthToken + _acrlFields + _acrlAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersRulesListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Update.hs new file mode 100644 index 000000000..6f7fb6b09 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Rules/Update.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Rules.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Rule. +-- +-- /See:/ for @TagmanagerAccountsContainersRulesUpdate@. +module TagManager.Accounts.Containers.Rules.Update + ( + -- * REST Resource + AccountsContainersRulesUpdateAPI + + -- * Creating a Request + , accountsContainersRulesUpdate + , AccountsContainersRulesUpdate + + -- * Request Lenses + , acruQuotaUser + , acruPrettyPrint + , acruContainerId + , acruUserIp + , acruFingerprint + , acruRuleId + , acruAccountId + , acruKey + , acruOauthToken + , acruFields + , acruAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersRulesUpdate@ which the +-- 'AccountsContainersRulesUpdate' request conforms to. +type AccountsContainersRulesUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "rules" :> + Capture "ruleId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Rule + +-- | Updates a GTM Rule. +-- +-- /See:/ 'accountsContainersRulesUpdate' smart constructor. +data AccountsContainersRulesUpdate = AccountsContainersRulesUpdate + { _acruQuotaUser :: !(Maybe Text) + , _acruPrettyPrint :: !Bool + , _acruContainerId :: !Text + , _acruUserIp :: !(Maybe Text) + , _acruFingerprint :: !(Maybe Text) + , _acruRuleId :: !Text + , _acruAccountId :: !Text + , _acruKey :: !(Maybe Text) + , _acruOauthToken :: !(Maybe Text) + , _acruFields :: !(Maybe Text) + , _acruAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersRulesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acruQuotaUser' +-- +-- * 'acruPrettyPrint' +-- +-- * 'acruContainerId' +-- +-- * 'acruUserIp' +-- +-- * 'acruFingerprint' +-- +-- * 'acruRuleId' +-- +-- * 'acruAccountId' +-- +-- * 'acruKey' +-- +-- * 'acruOauthToken' +-- +-- * 'acruFields' +-- +-- * 'acruAlt' +accountsContainersRulesUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'ruleId' + -> Text -- ^ 'accountId' + -> AccountsContainersRulesUpdate +accountsContainersRulesUpdate pAcruContainerId_ pAcruRuleId_ pAcruAccountId_ = + AccountsContainersRulesUpdate + { _acruQuotaUser = Nothing + , _acruPrettyPrint = True + , _acruContainerId = pAcruContainerId_ + , _acruUserIp = Nothing + , _acruFingerprint = Nothing + , _acruRuleId = pAcruRuleId_ + , _acruAccountId = pAcruAccountId_ + , _acruKey = Nothing + , _acruOauthToken = Nothing + , _acruFields = Nothing + , _acruAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acruQuotaUser :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruQuotaUser + = lens _acruQuotaUser + (\ s a -> s{_acruQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acruPrettyPrint :: Lens' AccountsContainersRulesUpdate' Bool +acruPrettyPrint + = lens _acruPrettyPrint + (\ s a -> s{_acruPrettyPrint = a}) + +-- | The GTM Container ID. +acruContainerId :: Lens' AccountsContainersRulesUpdate' Text +acruContainerId + = lens _acruContainerId + (\ s a -> s{_acruContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acruUserIp :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruUserIp + = lens _acruUserIp (\ s a -> s{_acruUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the rule +-- in storage. +acruFingerprint :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruFingerprint + = lens _acruFingerprint + (\ s a -> s{_acruFingerprint = a}) + +-- | The GTM Rule ID. +acruRuleId :: Lens' AccountsContainersRulesUpdate' Text +acruRuleId + = lens _acruRuleId (\ s a -> s{_acruRuleId = a}) + +-- | The GTM Account ID. +acruAccountId :: Lens' AccountsContainersRulesUpdate' Text +acruAccountId + = lens _acruAccountId + (\ s a -> s{_acruAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acruKey :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruKey = lens _acruKey (\ s a -> s{_acruKey = a}) + +-- | OAuth 2.0 token for the current user. +acruOauthToken :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruOauthToken + = lens _acruOauthToken + (\ s a -> s{_acruOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acruFields :: Lens' AccountsContainersRulesUpdate' (Maybe Text) +acruFields + = lens _acruFields (\ s a -> s{_acruFields = a}) + +-- | Data format for the response. +acruAlt :: Lens' AccountsContainersRulesUpdate' Text +acruAlt = lens _acruAlt (\ s a -> s{_acruAlt = a}) + +instance GoogleRequest AccountsContainersRulesUpdate' + where + type Rs AccountsContainersRulesUpdate' = Rule + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersRulesUpdate{..} + = go _acruQuotaUser _acruPrettyPrint _acruContainerId + _acruUserIp + _acruFingerprint + _acruRuleId + _acruAccountId + _acruKey + _acruOauthToken + _acruFields + _acruAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersRulesUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Create.hs new file mode 100644 index 000000000..1d6dfa120 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Create.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Tags.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Tag. +-- +-- /See:/ for @TagmanagerAccountsContainersTagsCreate@. +module TagManager.Accounts.Containers.Tags.Create + ( + -- * REST Resource + AccountsContainersTagsCreateAPI + + -- * Creating a Request + , accountsContainersTagsCreate + , AccountsContainersTagsCreate + + -- * Request Lenses + , actccQuotaUser + , actccPrettyPrint + , actccContainerId + , actccUserIp + , actccAccountId + , actccKey + , actccOauthToken + , actccFields + , actccAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTagsCreate@ which the +-- 'AccountsContainersTagsCreate' request conforms to. +type AccountsContainersTagsCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "tags" :> Post '[JSON] Tag + +-- | Creates a GTM Tag. +-- +-- /See:/ 'accountsContainersTagsCreate' smart constructor. +data AccountsContainersTagsCreate = AccountsContainersTagsCreate + { _actccQuotaUser :: !(Maybe Text) + , _actccPrettyPrint :: !Bool + , _actccContainerId :: !Text + , _actccUserIp :: !(Maybe Text) + , _actccAccountId :: !Text + , _actccKey :: !(Maybe Text) + , _actccOauthToken :: !(Maybe Text) + , _actccFields :: !(Maybe Text) + , _actccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTagsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actccQuotaUser' +-- +-- * 'actccPrettyPrint' +-- +-- * 'actccContainerId' +-- +-- * 'actccUserIp' +-- +-- * 'actccAccountId' +-- +-- * 'actccKey' +-- +-- * 'actccOauthToken' +-- +-- * 'actccFields' +-- +-- * 'actccAlt' +accountsContainersTagsCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTagsCreate +accountsContainersTagsCreate pActccContainerId_ pActccAccountId_ = + AccountsContainersTagsCreate + { _actccQuotaUser = Nothing + , _actccPrettyPrint = True + , _actccContainerId = pActccContainerId_ + , _actccUserIp = Nothing + , _actccAccountId = pActccAccountId_ + , _actccKey = Nothing + , _actccOauthToken = Nothing + , _actccFields = Nothing + , _actccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actccQuotaUser :: Lens' AccountsContainersTagsCreate' (Maybe Text) +actccQuotaUser + = lens _actccQuotaUser + (\ s a -> s{_actccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actccPrettyPrint :: Lens' AccountsContainersTagsCreate' Bool +actccPrettyPrint + = lens _actccPrettyPrint + (\ s a -> s{_actccPrettyPrint = a}) + +-- | The GTM Container ID. +actccContainerId :: Lens' AccountsContainersTagsCreate' Text +actccContainerId + = lens _actccContainerId + (\ s a -> s{_actccContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actccUserIp :: Lens' AccountsContainersTagsCreate' (Maybe Text) +actccUserIp + = lens _actccUserIp (\ s a -> s{_actccUserIp = a}) + +-- | The GTM Account ID. +actccAccountId :: Lens' AccountsContainersTagsCreate' Text +actccAccountId + = lens _actccAccountId + (\ s a -> s{_actccAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actccKey :: Lens' AccountsContainersTagsCreate' (Maybe Text) +actccKey = lens _actccKey (\ s a -> s{_actccKey = a}) + +-- | OAuth 2.0 token for the current user. +actccOauthToken :: Lens' AccountsContainersTagsCreate' (Maybe Text) +actccOauthToken + = lens _actccOauthToken + (\ s a -> s{_actccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actccFields :: Lens' AccountsContainersTagsCreate' (Maybe Text) +actccFields + = lens _actccFields (\ s a -> s{_actccFields = a}) + +-- | Data format for the response. +actccAlt :: Lens' AccountsContainersTagsCreate' Text +actccAlt = lens _actccAlt (\ s a -> s{_actccAlt = a}) + +instance GoogleRequest AccountsContainersTagsCreate' + where + type Rs AccountsContainersTagsCreate' = Tag + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersTagsCreate{..} + = go _actccQuotaUser _actccPrettyPrint + _actccContainerId + _actccUserIp + _actccAccountId + _actccKey + _actccOauthToken + _actccFields + _actccAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTagsCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Delete.hs new file mode 100644 index 000000000..00921d7fb --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Delete.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Tags.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Tag. +-- +-- /See:/ for @TagmanagerAccountsContainersTagsDelete@. +module TagManager.Accounts.Containers.Tags.Delete + ( + -- * REST Resource + AccountsContainersTagsDeleteAPI + + -- * Creating a Request + , accountsContainersTagsDelete + , AccountsContainersTagsDelete + + -- * Request Lenses + , actdcQuotaUser + , actdcPrettyPrint + , actdcContainerId + , actdcUserIp + , actdcAccountId + , actdcTagId + , actdcKey + , actdcOauthToken + , actdcFields + , actdcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTagsDelete@ which the +-- 'AccountsContainersTagsDelete' request conforms to. +type AccountsContainersTagsDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "tags" :> Capture "tagId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Tag. +-- +-- /See:/ 'accountsContainersTagsDelete' smart constructor. +data AccountsContainersTagsDelete = AccountsContainersTagsDelete + { _actdcQuotaUser :: !(Maybe Text) + , _actdcPrettyPrint :: !Bool + , _actdcContainerId :: !Text + , _actdcUserIp :: !(Maybe Text) + , _actdcAccountId :: !Text + , _actdcTagId :: !Text + , _actdcKey :: !(Maybe Text) + , _actdcOauthToken :: !(Maybe Text) + , _actdcFields :: !(Maybe Text) + , _actdcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTagsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actdcQuotaUser' +-- +-- * 'actdcPrettyPrint' +-- +-- * 'actdcContainerId' +-- +-- * 'actdcUserIp' +-- +-- * 'actdcAccountId' +-- +-- * 'actdcTagId' +-- +-- * 'actdcKey' +-- +-- * 'actdcOauthToken' +-- +-- * 'actdcFields' +-- +-- * 'actdcAlt' +accountsContainersTagsDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'tagId' + -> AccountsContainersTagsDelete +accountsContainersTagsDelete pActdcContainerId_ pActdcAccountId_ pActdcTagId_ = + AccountsContainersTagsDelete + { _actdcQuotaUser = Nothing + , _actdcPrettyPrint = True + , _actdcContainerId = pActdcContainerId_ + , _actdcUserIp = Nothing + , _actdcAccountId = pActdcAccountId_ + , _actdcTagId = pActdcTagId_ + , _actdcKey = Nothing + , _actdcOauthToken = Nothing + , _actdcFields = Nothing + , _actdcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actdcQuotaUser :: Lens' AccountsContainersTagsDelete' (Maybe Text) +actdcQuotaUser + = lens _actdcQuotaUser + (\ s a -> s{_actdcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actdcPrettyPrint :: Lens' AccountsContainersTagsDelete' Bool +actdcPrettyPrint + = lens _actdcPrettyPrint + (\ s a -> s{_actdcPrettyPrint = a}) + +-- | The GTM Container ID. +actdcContainerId :: Lens' AccountsContainersTagsDelete' Text +actdcContainerId + = lens _actdcContainerId + (\ s a -> s{_actdcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actdcUserIp :: Lens' AccountsContainersTagsDelete' (Maybe Text) +actdcUserIp + = lens _actdcUserIp (\ s a -> s{_actdcUserIp = a}) + +-- | The GTM Account ID. +actdcAccountId :: Lens' AccountsContainersTagsDelete' Text +actdcAccountId + = lens _actdcAccountId + (\ s a -> s{_actdcAccountId = a}) + +-- | The GTM Tag ID. +actdcTagId :: Lens' AccountsContainersTagsDelete' Text +actdcTagId + = lens _actdcTagId (\ s a -> s{_actdcTagId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actdcKey :: Lens' AccountsContainersTagsDelete' (Maybe Text) +actdcKey = lens _actdcKey (\ s a -> s{_actdcKey = a}) + +-- | OAuth 2.0 token for the current user. +actdcOauthToken :: Lens' AccountsContainersTagsDelete' (Maybe Text) +actdcOauthToken + = lens _actdcOauthToken + (\ s a -> s{_actdcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actdcFields :: Lens' AccountsContainersTagsDelete' (Maybe Text) +actdcFields + = lens _actdcFields (\ s a -> s{_actdcFields = a}) + +-- | Data format for the response. +actdcAlt :: Lens' AccountsContainersTagsDelete' Text +actdcAlt = lens _actdcAlt (\ s a -> s{_actdcAlt = a}) + +instance GoogleRequest AccountsContainersTagsDelete' + where + type Rs AccountsContainersTagsDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersTagsDelete{..} + = go _actdcQuotaUser _actdcPrettyPrint + _actdcContainerId + _actdcUserIp + _actdcAccountId + _actdcTagId + _actdcKey + _actdcOauthToken + _actdcFields + _actdcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTagsDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Get.hs new file mode 100644 index 000000000..ee88f5e3c --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Get.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Tags.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Tag. +-- +-- /See:/ for @TagmanagerAccountsContainersTagsGet@. +module TagManager.Accounts.Containers.Tags.Get + ( + -- * REST Resource + AccountsContainersTagsGetAPI + + -- * Creating a Request + , accountsContainersTagsGet + , AccountsContainersTagsGet + + -- * Request Lenses + , actgcQuotaUser + , actgcPrettyPrint + , actgcContainerId + , actgcUserIp + , actgcAccountId + , actgcTagId + , actgcKey + , actgcOauthToken + , actgcFields + , actgcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTagsGet@ which the +-- 'AccountsContainersTagsGet' request conforms to. +type AccountsContainersTagsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "tags" :> Capture "tagId" Text :> Get '[JSON] Tag + +-- | Gets a GTM Tag. +-- +-- /See:/ 'accountsContainersTagsGet' smart constructor. +data AccountsContainersTagsGet = AccountsContainersTagsGet + { _actgcQuotaUser :: !(Maybe Text) + , _actgcPrettyPrint :: !Bool + , _actgcContainerId :: !Text + , _actgcUserIp :: !(Maybe Text) + , _actgcAccountId :: !Text + , _actgcTagId :: !Text + , _actgcKey :: !(Maybe Text) + , _actgcOauthToken :: !(Maybe Text) + , _actgcFields :: !(Maybe Text) + , _actgcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTagsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actgcQuotaUser' +-- +-- * 'actgcPrettyPrint' +-- +-- * 'actgcContainerId' +-- +-- * 'actgcUserIp' +-- +-- * 'actgcAccountId' +-- +-- * 'actgcTagId' +-- +-- * 'actgcKey' +-- +-- * 'actgcOauthToken' +-- +-- * 'actgcFields' +-- +-- * 'actgcAlt' +accountsContainersTagsGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'tagId' + -> AccountsContainersTagsGet +accountsContainersTagsGet pActgcContainerId_ pActgcAccountId_ pActgcTagId_ = + AccountsContainersTagsGet + { _actgcQuotaUser = Nothing + , _actgcPrettyPrint = True + , _actgcContainerId = pActgcContainerId_ + , _actgcUserIp = Nothing + , _actgcAccountId = pActgcAccountId_ + , _actgcTagId = pActgcTagId_ + , _actgcKey = Nothing + , _actgcOauthToken = Nothing + , _actgcFields = Nothing + , _actgcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actgcQuotaUser :: Lens' AccountsContainersTagsGet' (Maybe Text) +actgcQuotaUser + = lens _actgcQuotaUser + (\ s a -> s{_actgcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actgcPrettyPrint :: Lens' AccountsContainersTagsGet' Bool +actgcPrettyPrint + = lens _actgcPrettyPrint + (\ s a -> s{_actgcPrettyPrint = a}) + +-- | The GTM Container ID. +actgcContainerId :: Lens' AccountsContainersTagsGet' Text +actgcContainerId + = lens _actgcContainerId + (\ s a -> s{_actgcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actgcUserIp :: Lens' AccountsContainersTagsGet' (Maybe Text) +actgcUserIp + = lens _actgcUserIp (\ s a -> s{_actgcUserIp = a}) + +-- | The GTM Account ID. +actgcAccountId :: Lens' AccountsContainersTagsGet' Text +actgcAccountId + = lens _actgcAccountId + (\ s a -> s{_actgcAccountId = a}) + +-- | The GTM Tag ID. +actgcTagId :: Lens' AccountsContainersTagsGet' Text +actgcTagId + = lens _actgcTagId (\ s a -> s{_actgcTagId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actgcKey :: Lens' AccountsContainersTagsGet' (Maybe Text) +actgcKey = lens _actgcKey (\ s a -> s{_actgcKey = a}) + +-- | OAuth 2.0 token for the current user. +actgcOauthToken :: Lens' AccountsContainersTagsGet' (Maybe Text) +actgcOauthToken + = lens _actgcOauthToken + (\ s a -> s{_actgcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actgcFields :: Lens' AccountsContainersTagsGet' (Maybe Text) +actgcFields + = lens _actgcFields (\ s a -> s{_actgcFields = a}) + +-- | Data format for the response. +actgcAlt :: Lens' AccountsContainersTagsGet' Text +actgcAlt = lens _actgcAlt (\ s a -> s{_actgcAlt = a}) + +instance GoogleRequest AccountsContainersTagsGet' + where + type Rs AccountsContainersTagsGet' = Tag + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersTagsGet{..} + = go _actgcQuotaUser _actgcPrettyPrint + _actgcContainerId + _actgcUserIp + _actgcAccountId + _actgcTagId + _actgcKey + _actgcOauthToken + _actgcFields + _actgcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTagsGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/List.hs new file mode 100644 index 000000000..79cb50ac1 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/List.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Tags.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Tags of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersTagsList@. +module TagManager.Accounts.Containers.Tags.List + ( + -- * REST Resource + AccountsContainersTagsListAPI + + -- * Creating a Request + , accountsContainersTagsList + , AccountsContainersTagsList + + -- * Request Lenses + , actlcQuotaUser + , actlcPrettyPrint + , actlcContainerId + , actlcUserIp + , actlcAccountId + , actlcKey + , actlcOauthToken + , actlcFields + , actlcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTagsList@ which the +-- 'AccountsContainersTagsList' request conforms to. +type AccountsContainersTagsListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "tags" :> Get '[JSON] ListTagsResponse + +-- | Lists all GTM Tags of a Container. +-- +-- /See:/ 'accountsContainersTagsList' smart constructor. +data AccountsContainersTagsList = AccountsContainersTagsList + { _actlcQuotaUser :: !(Maybe Text) + , _actlcPrettyPrint :: !Bool + , _actlcContainerId :: !Text + , _actlcUserIp :: !(Maybe Text) + , _actlcAccountId :: !Text + , _actlcKey :: !(Maybe Text) + , _actlcOauthToken :: !(Maybe Text) + , _actlcFields :: !(Maybe Text) + , _actlcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTagsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actlcQuotaUser' +-- +-- * 'actlcPrettyPrint' +-- +-- * 'actlcContainerId' +-- +-- * 'actlcUserIp' +-- +-- * 'actlcAccountId' +-- +-- * 'actlcKey' +-- +-- * 'actlcOauthToken' +-- +-- * 'actlcFields' +-- +-- * 'actlcAlt' +accountsContainersTagsList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTagsList +accountsContainersTagsList pActlcContainerId_ pActlcAccountId_ = + AccountsContainersTagsList + { _actlcQuotaUser = Nothing + , _actlcPrettyPrint = True + , _actlcContainerId = pActlcContainerId_ + , _actlcUserIp = Nothing + , _actlcAccountId = pActlcAccountId_ + , _actlcKey = Nothing + , _actlcOauthToken = Nothing + , _actlcFields = Nothing + , _actlcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actlcQuotaUser :: Lens' AccountsContainersTagsList' (Maybe Text) +actlcQuotaUser + = lens _actlcQuotaUser + (\ s a -> s{_actlcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actlcPrettyPrint :: Lens' AccountsContainersTagsList' Bool +actlcPrettyPrint + = lens _actlcPrettyPrint + (\ s a -> s{_actlcPrettyPrint = a}) + +-- | The GTM Container ID. +actlcContainerId :: Lens' AccountsContainersTagsList' Text +actlcContainerId + = lens _actlcContainerId + (\ s a -> s{_actlcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actlcUserIp :: Lens' AccountsContainersTagsList' (Maybe Text) +actlcUserIp + = lens _actlcUserIp (\ s a -> s{_actlcUserIp = a}) + +-- | The GTM Account ID. +actlcAccountId :: Lens' AccountsContainersTagsList' Text +actlcAccountId + = lens _actlcAccountId + (\ s a -> s{_actlcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actlcKey :: Lens' AccountsContainersTagsList' (Maybe Text) +actlcKey = lens _actlcKey (\ s a -> s{_actlcKey = a}) + +-- | OAuth 2.0 token for the current user. +actlcOauthToken :: Lens' AccountsContainersTagsList' (Maybe Text) +actlcOauthToken + = lens _actlcOauthToken + (\ s a -> s{_actlcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actlcFields :: Lens' AccountsContainersTagsList' (Maybe Text) +actlcFields + = lens _actlcFields (\ s a -> s{_actlcFields = a}) + +-- | Data format for the response. +actlcAlt :: Lens' AccountsContainersTagsList' Text +actlcAlt = lens _actlcAlt (\ s a -> s{_actlcAlt = a}) + +instance GoogleRequest AccountsContainersTagsList' + where + type Rs AccountsContainersTagsList' = + ListTagsResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersTagsList{..} + = go _actlcQuotaUser _actlcPrettyPrint + _actlcContainerId + _actlcUserIp + _actlcAccountId + _actlcKey + _actlcOauthToken + _actlcFields + _actlcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTagsListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Update.hs new file mode 100644 index 000000000..cd233bf84 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Tags/Update.hs @@ -0,0 +1,205 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Tags.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Tag. +-- +-- /See:/ for @TagmanagerAccountsContainersTagsUpdate@. +module TagManager.Accounts.Containers.Tags.Update + ( + -- * REST Resource + AccountsContainersTagsUpdateAPI + + -- * Creating a Request + , accountsContainersTagsUpdate + , AccountsContainersTagsUpdate + + -- * Request Lenses + , actucQuotaUser + , actucPrettyPrint + , actucContainerId + , actucUserIp + , actucFingerprint + , actucAccountId + , actucTagId + , actucKey + , actucOauthToken + , actucFields + , actucAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTagsUpdate@ which the +-- 'AccountsContainersTagsUpdate' request conforms to. +type AccountsContainersTagsUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "tags" :> + Capture "tagId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Tag + +-- | Updates a GTM Tag. +-- +-- /See:/ 'accountsContainersTagsUpdate' smart constructor. +data AccountsContainersTagsUpdate = AccountsContainersTagsUpdate + { _actucQuotaUser :: !(Maybe Text) + , _actucPrettyPrint :: !Bool + , _actucContainerId :: !Text + , _actucUserIp :: !(Maybe Text) + , _actucFingerprint :: !(Maybe Text) + , _actucAccountId :: !Text + , _actucTagId :: !Text + , _actucKey :: !(Maybe Text) + , _actucOauthToken :: !(Maybe Text) + , _actucFields :: !(Maybe Text) + , _actucAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTagsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actucQuotaUser' +-- +-- * 'actucPrettyPrint' +-- +-- * 'actucContainerId' +-- +-- * 'actucUserIp' +-- +-- * 'actucFingerprint' +-- +-- * 'actucAccountId' +-- +-- * 'actucTagId' +-- +-- * 'actucKey' +-- +-- * 'actucOauthToken' +-- +-- * 'actucFields' +-- +-- * 'actucAlt' +accountsContainersTagsUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> Text -- ^ 'tagId' + -> AccountsContainersTagsUpdate +accountsContainersTagsUpdate pActucContainerId_ pActucAccountId_ pActucTagId_ = + AccountsContainersTagsUpdate + { _actucQuotaUser = Nothing + , _actucPrettyPrint = True + , _actucContainerId = pActucContainerId_ + , _actucUserIp = Nothing + , _actucFingerprint = Nothing + , _actucAccountId = pActucAccountId_ + , _actucTagId = pActucTagId_ + , _actucKey = Nothing + , _actucOauthToken = Nothing + , _actucFields = Nothing + , _actucAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actucQuotaUser :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucQuotaUser + = lens _actucQuotaUser + (\ s a -> s{_actucQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actucPrettyPrint :: Lens' AccountsContainersTagsUpdate' Bool +actucPrettyPrint + = lens _actucPrettyPrint + (\ s a -> s{_actucPrettyPrint = a}) + +-- | The GTM Container ID. +actucContainerId :: Lens' AccountsContainersTagsUpdate' Text +actucContainerId + = lens _actucContainerId + (\ s a -> s{_actucContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actucUserIp :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucUserIp + = lens _actucUserIp (\ s a -> s{_actucUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the tag in +-- storage. +actucFingerprint :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucFingerprint + = lens _actucFingerprint + (\ s a -> s{_actucFingerprint = a}) + +-- | The GTM Account ID. +actucAccountId :: Lens' AccountsContainersTagsUpdate' Text +actucAccountId + = lens _actucAccountId + (\ s a -> s{_actucAccountId = a}) + +-- | The GTM Tag ID. +actucTagId :: Lens' AccountsContainersTagsUpdate' Text +actucTagId + = lens _actucTagId (\ s a -> s{_actucTagId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actucKey :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucKey = lens _actucKey (\ s a -> s{_actucKey = a}) + +-- | OAuth 2.0 token for the current user. +actucOauthToken :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucOauthToken + = lens _actucOauthToken + (\ s a -> s{_actucOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actucFields :: Lens' AccountsContainersTagsUpdate' (Maybe Text) +actucFields + = lens _actucFields (\ s a -> s{_actucFields = a}) + +-- | Data format for the response. +actucAlt :: Lens' AccountsContainersTagsUpdate' Text +actucAlt = lens _actucAlt (\ s a -> s{_actucAlt = a}) + +instance GoogleRequest AccountsContainersTagsUpdate' + where + type Rs AccountsContainersTagsUpdate' = Tag + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersTagsUpdate{..} + = go _actucQuotaUser _actucPrettyPrint + _actucContainerId + _actucUserIp + _actucFingerprint + _actucAccountId + _actucTagId + _actucKey + _actucOauthToken + _actucFields + _actucAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTagsUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Create.hs new file mode 100644 index 000000000..3b62332a2 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Create.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Trigger. +-- +-- /See:/ for @TagmanagerAccountsContainersTriggersCreate@. +module TagManager.Accounts.Containers.Triggers.Create + ( + -- * REST Resource + AccountsContainersTriggersCreateAPI + + -- * Creating a Request + , accountsContainersTriggersCreate + , AccountsContainersTriggersCreate + + -- * Request Lenses + , actcQuotaUser + , actcPrettyPrint + , actcContainerId + , actcUserIp + , actcAccountId + , actcKey + , actcOauthToken + , actcFields + , actcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTriggersCreate@ which the +-- 'AccountsContainersTriggersCreate' request conforms to. +type AccountsContainersTriggersCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "triggers" :> Post '[JSON] Trigger + +-- | Creates a GTM Trigger. +-- +-- /See:/ 'accountsContainersTriggersCreate' smart constructor. +data AccountsContainersTriggersCreate = AccountsContainersTriggersCreate + { _actcQuotaUser :: !(Maybe Text) + , _actcPrettyPrint :: !Bool + , _actcContainerId :: !Text + , _actcUserIp :: !(Maybe Text) + , _actcAccountId :: !Text + , _actcKey :: !(Maybe Text) + , _actcOauthToken :: !(Maybe Text) + , _actcFields :: !(Maybe Text) + , _actcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTriggersCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actcQuotaUser' +-- +-- * 'actcPrettyPrint' +-- +-- * 'actcContainerId' +-- +-- * 'actcUserIp' +-- +-- * 'actcAccountId' +-- +-- * 'actcKey' +-- +-- * 'actcOauthToken' +-- +-- * 'actcFields' +-- +-- * 'actcAlt' +accountsContainersTriggersCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTriggersCreate +accountsContainersTriggersCreate pActcContainerId_ pActcAccountId_ = + AccountsContainersTriggersCreate + { _actcQuotaUser = Nothing + , _actcPrettyPrint = True + , _actcContainerId = pActcContainerId_ + , _actcUserIp = Nothing + , _actcAccountId = pActcAccountId_ + , _actcKey = Nothing + , _actcOauthToken = Nothing + , _actcFields = Nothing + , _actcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actcQuotaUser :: Lens' AccountsContainersTriggersCreate' (Maybe Text) +actcQuotaUser + = lens _actcQuotaUser + (\ s a -> s{_actcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actcPrettyPrint :: Lens' AccountsContainersTriggersCreate' Bool +actcPrettyPrint + = lens _actcPrettyPrint + (\ s a -> s{_actcPrettyPrint = a}) + +-- | The GTM Container ID. +actcContainerId :: Lens' AccountsContainersTriggersCreate' Text +actcContainerId + = lens _actcContainerId + (\ s a -> s{_actcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actcUserIp :: Lens' AccountsContainersTriggersCreate' (Maybe Text) +actcUserIp + = lens _actcUserIp (\ s a -> s{_actcUserIp = a}) + +-- | The GTM Account ID. +actcAccountId :: Lens' AccountsContainersTriggersCreate' Text +actcAccountId + = lens _actcAccountId + (\ s a -> s{_actcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actcKey :: Lens' AccountsContainersTriggersCreate' (Maybe Text) +actcKey = lens _actcKey (\ s a -> s{_actcKey = a}) + +-- | OAuth 2.0 token for the current user. +actcOauthToken :: Lens' AccountsContainersTriggersCreate' (Maybe Text) +actcOauthToken + = lens _actcOauthToken + (\ s a -> s{_actcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actcFields :: Lens' AccountsContainersTriggersCreate' (Maybe Text) +actcFields + = lens _actcFields (\ s a -> s{_actcFields = a}) + +-- | Data format for the response. +actcAlt :: Lens' AccountsContainersTriggersCreate' Text +actcAlt = lens _actcAlt (\ s a -> s{_actcAlt = a}) + +instance GoogleRequest + AccountsContainersTriggersCreate' where + type Rs AccountsContainersTriggersCreate' = Trigger + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersTriggersCreate{..} + = go _actcQuotaUser _actcPrettyPrint _actcContainerId + _actcUserIp + _actcAccountId + _actcKey + _actcOauthToken + _actcFields + _actcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTriggersCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Delete.hs new file mode 100644 index 000000000..98ba329bb --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Delete.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Trigger. +-- +-- /See:/ for @TagmanagerAccountsContainersTriggersDelete@. +module TagManager.Accounts.Containers.Triggers.Delete + ( + -- * REST Resource + AccountsContainersTriggersDeleteAPI + + -- * Creating a Request + , accountsContainersTriggersDelete + , AccountsContainersTriggersDelete + + -- * Request Lenses + , actdQuotaUser + , actdPrettyPrint + , actdContainerId + , actdTriggerId + , actdUserIp + , actdAccountId + , actdKey + , actdOauthToken + , actdFields + , actdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTriggersDelete@ which the +-- 'AccountsContainersTriggersDelete' request conforms to. +type AccountsContainersTriggersDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "triggers" :> + Capture "triggerId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Trigger. +-- +-- /See:/ 'accountsContainersTriggersDelete' smart constructor. +data AccountsContainersTriggersDelete = AccountsContainersTriggersDelete + { _actdQuotaUser :: !(Maybe Text) + , _actdPrettyPrint :: !Bool + , _actdContainerId :: !Text + , _actdTriggerId :: !Text + , _actdUserIp :: !(Maybe Text) + , _actdAccountId :: !Text + , _actdKey :: !(Maybe Text) + , _actdOauthToken :: !(Maybe Text) + , _actdFields :: !(Maybe Text) + , _actdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTriggersDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actdQuotaUser' +-- +-- * 'actdPrettyPrint' +-- +-- * 'actdContainerId' +-- +-- * 'actdTriggerId' +-- +-- * 'actdUserIp' +-- +-- * 'actdAccountId' +-- +-- * 'actdKey' +-- +-- * 'actdOauthToken' +-- +-- * 'actdFields' +-- +-- * 'actdAlt' +accountsContainersTriggersDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'triggerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTriggersDelete +accountsContainersTriggersDelete pActdContainerId_ pActdTriggerId_ pActdAccountId_ = + AccountsContainersTriggersDelete + { _actdQuotaUser = Nothing + , _actdPrettyPrint = True + , _actdContainerId = pActdContainerId_ + , _actdTriggerId = pActdTriggerId_ + , _actdUserIp = Nothing + , _actdAccountId = pActdAccountId_ + , _actdKey = Nothing + , _actdOauthToken = Nothing + , _actdFields = Nothing + , _actdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actdQuotaUser :: Lens' AccountsContainersTriggersDelete' (Maybe Text) +actdQuotaUser + = lens _actdQuotaUser + (\ s a -> s{_actdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actdPrettyPrint :: Lens' AccountsContainersTriggersDelete' Bool +actdPrettyPrint + = lens _actdPrettyPrint + (\ s a -> s{_actdPrettyPrint = a}) + +-- | The GTM Container ID. +actdContainerId :: Lens' AccountsContainersTriggersDelete' Text +actdContainerId + = lens _actdContainerId + (\ s a -> s{_actdContainerId = a}) + +-- | The GTM Trigger ID. +actdTriggerId :: Lens' AccountsContainersTriggersDelete' Text +actdTriggerId + = lens _actdTriggerId + (\ s a -> s{_actdTriggerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actdUserIp :: Lens' AccountsContainersTriggersDelete' (Maybe Text) +actdUserIp + = lens _actdUserIp (\ s a -> s{_actdUserIp = a}) + +-- | The GTM Account ID. +actdAccountId :: Lens' AccountsContainersTriggersDelete' Text +actdAccountId + = lens _actdAccountId + (\ s a -> s{_actdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actdKey :: Lens' AccountsContainersTriggersDelete' (Maybe Text) +actdKey = lens _actdKey (\ s a -> s{_actdKey = a}) + +-- | OAuth 2.0 token for the current user. +actdOauthToken :: Lens' AccountsContainersTriggersDelete' (Maybe Text) +actdOauthToken + = lens _actdOauthToken + (\ s a -> s{_actdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actdFields :: Lens' AccountsContainersTriggersDelete' (Maybe Text) +actdFields + = lens _actdFields (\ s a -> s{_actdFields = a}) + +-- | Data format for the response. +actdAlt :: Lens' AccountsContainersTriggersDelete' Text +actdAlt = lens _actdAlt (\ s a -> s{_actdAlt = a}) + +instance GoogleRequest + AccountsContainersTriggersDelete' where + type Rs AccountsContainersTriggersDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersTriggersDelete{..} + = go _actdQuotaUser _actdPrettyPrint _actdContainerId + _actdTriggerId + _actdUserIp + _actdAccountId + _actdKey + _actdOauthToken + _actdFields + _actdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTriggersDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Get.hs new file mode 100644 index 000000000..cf6943586 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Get.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Trigger. +-- +-- /See:/ for @TagmanagerAccountsContainersTriggersGet@. +module TagManager.Accounts.Containers.Triggers.Get + ( + -- * REST Resource + AccountsContainersTriggersGetAPI + + -- * Creating a Request + , accountsContainersTriggersGet + , AccountsContainersTriggersGet + + -- * Request Lenses + , actgQuotaUser + , actgPrettyPrint + , actgContainerId + , actgTriggerId + , actgUserIp + , actgAccountId + , actgKey + , actgOauthToken + , actgFields + , actgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTriggersGet@ which the +-- 'AccountsContainersTriggersGet' request conforms to. +type AccountsContainersTriggersGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "triggers" :> + Capture "triggerId" Text :> Get '[JSON] Trigger + +-- | Gets a GTM Trigger. +-- +-- /See:/ 'accountsContainersTriggersGet' smart constructor. +data AccountsContainersTriggersGet = AccountsContainersTriggersGet + { _actgQuotaUser :: !(Maybe Text) + , _actgPrettyPrint :: !Bool + , _actgContainerId :: !Text + , _actgTriggerId :: !Text + , _actgUserIp :: !(Maybe Text) + , _actgAccountId :: !Text + , _actgKey :: !(Maybe Text) + , _actgOauthToken :: !(Maybe Text) + , _actgFields :: !(Maybe Text) + , _actgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTriggersGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actgQuotaUser' +-- +-- * 'actgPrettyPrint' +-- +-- * 'actgContainerId' +-- +-- * 'actgTriggerId' +-- +-- * 'actgUserIp' +-- +-- * 'actgAccountId' +-- +-- * 'actgKey' +-- +-- * 'actgOauthToken' +-- +-- * 'actgFields' +-- +-- * 'actgAlt' +accountsContainersTriggersGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'triggerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTriggersGet +accountsContainersTriggersGet pActgContainerId_ pActgTriggerId_ pActgAccountId_ = + AccountsContainersTriggersGet + { _actgQuotaUser = Nothing + , _actgPrettyPrint = True + , _actgContainerId = pActgContainerId_ + , _actgTriggerId = pActgTriggerId_ + , _actgUserIp = Nothing + , _actgAccountId = pActgAccountId_ + , _actgKey = Nothing + , _actgOauthToken = Nothing + , _actgFields = Nothing + , _actgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actgQuotaUser :: Lens' AccountsContainersTriggersGet' (Maybe Text) +actgQuotaUser + = lens _actgQuotaUser + (\ s a -> s{_actgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actgPrettyPrint :: Lens' AccountsContainersTriggersGet' Bool +actgPrettyPrint + = lens _actgPrettyPrint + (\ s a -> s{_actgPrettyPrint = a}) + +-- | The GTM Container ID. +actgContainerId :: Lens' AccountsContainersTriggersGet' Text +actgContainerId + = lens _actgContainerId + (\ s a -> s{_actgContainerId = a}) + +-- | The GTM Trigger ID. +actgTriggerId :: Lens' AccountsContainersTriggersGet' Text +actgTriggerId + = lens _actgTriggerId + (\ s a -> s{_actgTriggerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actgUserIp :: Lens' AccountsContainersTriggersGet' (Maybe Text) +actgUserIp + = lens _actgUserIp (\ s a -> s{_actgUserIp = a}) + +-- | The GTM Account ID. +actgAccountId :: Lens' AccountsContainersTriggersGet' Text +actgAccountId + = lens _actgAccountId + (\ s a -> s{_actgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actgKey :: Lens' AccountsContainersTriggersGet' (Maybe Text) +actgKey = lens _actgKey (\ s a -> s{_actgKey = a}) + +-- | OAuth 2.0 token for the current user. +actgOauthToken :: Lens' AccountsContainersTriggersGet' (Maybe Text) +actgOauthToken + = lens _actgOauthToken + (\ s a -> s{_actgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actgFields :: Lens' AccountsContainersTriggersGet' (Maybe Text) +actgFields + = lens _actgFields (\ s a -> s{_actgFields = a}) + +-- | Data format for the response. +actgAlt :: Lens' AccountsContainersTriggersGet' Text +actgAlt = lens _actgAlt (\ s a -> s{_actgAlt = a}) + +instance GoogleRequest AccountsContainersTriggersGet' + where + type Rs AccountsContainersTriggersGet' = Trigger + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersTriggersGet{..} + = go _actgQuotaUser _actgPrettyPrint _actgContainerId + _actgTriggerId + _actgUserIp + _actgAccountId + _actgKey + _actgOauthToken + _actgFields + _actgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTriggersGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/List.hs new file mode 100644 index 000000000..c40bafc86 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/List.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Triggers.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Triggers of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersTriggersList@. +module TagManager.Accounts.Containers.Triggers.List + ( + -- * REST Resource + AccountsContainersTriggersListAPI + + -- * Creating a Request + , accountsContainersTriggersList + , AccountsContainersTriggersList + + -- * Request Lenses + , actlQuotaUser + , actlPrettyPrint + , actlContainerId + , actlUserIp + , actlAccountId + , actlKey + , actlOauthToken + , actlFields + , actlAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTriggersList@ which the +-- 'AccountsContainersTriggersList' request conforms to. +type AccountsContainersTriggersListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "triggers" :> Get '[JSON] ListTriggersResponse + +-- | Lists all GTM Triggers of a Container. +-- +-- /See:/ 'accountsContainersTriggersList' smart constructor. +data AccountsContainersTriggersList = AccountsContainersTriggersList + { _actlQuotaUser :: !(Maybe Text) + , _actlPrettyPrint :: !Bool + , _actlContainerId :: !Text + , _actlUserIp :: !(Maybe Text) + , _actlAccountId :: !Text + , _actlKey :: !(Maybe Text) + , _actlOauthToken :: !(Maybe Text) + , _actlFields :: !(Maybe Text) + , _actlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTriggersList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actlQuotaUser' +-- +-- * 'actlPrettyPrint' +-- +-- * 'actlContainerId' +-- +-- * 'actlUserIp' +-- +-- * 'actlAccountId' +-- +-- * 'actlKey' +-- +-- * 'actlOauthToken' +-- +-- * 'actlFields' +-- +-- * 'actlAlt' +accountsContainersTriggersList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTriggersList +accountsContainersTriggersList pActlContainerId_ pActlAccountId_ = + AccountsContainersTriggersList + { _actlQuotaUser = Nothing + , _actlPrettyPrint = True + , _actlContainerId = pActlContainerId_ + , _actlUserIp = Nothing + , _actlAccountId = pActlAccountId_ + , _actlKey = Nothing + , _actlOauthToken = Nothing + , _actlFields = Nothing + , _actlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actlQuotaUser :: Lens' AccountsContainersTriggersList' (Maybe Text) +actlQuotaUser + = lens _actlQuotaUser + (\ s a -> s{_actlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actlPrettyPrint :: Lens' AccountsContainersTriggersList' Bool +actlPrettyPrint + = lens _actlPrettyPrint + (\ s a -> s{_actlPrettyPrint = a}) + +-- | The GTM Container ID. +actlContainerId :: Lens' AccountsContainersTriggersList' Text +actlContainerId + = lens _actlContainerId + (\ s a -> s{_actlContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actlUserIp :: Lens' AccountsContainersTriggersList' (Maybe Text) +actlUserIp + = lens _actlUserIp (\ s a -> s{_actlUserIp = a}) + +-- | The GTM Account ID. +actlAccountId :: Lens' AccountsContainersTriggersList' Text +actlAccountId + = lens _actlAccountId + (\ s a -> s{_actlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actlKey :: Lens' AccountsContainersTriggersList' (Maybe Text) +actlKey = lens _actlKey (\ s a -> s{_actlKey = a}) + +-- | OAuth 2.0 token for the current user. +actlOauthToken :: Lens' AccountsContainersTriggersList' (Maybe Text) +actlOauthToken + = lens _actlOauthToken + (\ s a -> s{_actlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actlFields :: Lens' AccountsContainersTriggersList' (Maybe Text) +actlFields + = lens _actlFields (\ s a -> s{_actlFields = a}) + +-- | Data format for the response. +actlAlt :: Lens' AccountsContainersTriggersList' Text +actlAlt = lens _actlAlt (\ s a -> s{_actlAlt = a}) + +instance GoogleRequest + AccountsContainersTriggersList' where + type Rs AccountsContainersTriggersList' = + ListTriggersResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersTriggersList{..} + = go _actlQuotaUser _actlPrettyPrint _actlContainerId + _actlUserIp + _actlAccountId + _actlKey + _actlOauthToken + _actlFields + _actlAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTriggersListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Update.hs new file mode 100644 index 000000000..f209f007c --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Triggers/Update.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Trigger. +-- +-- /See:/ for @TagmanagerAccountsContainersTriggersUpdate@. +module TagManager.Accounts.Containers.Triggers.Update + ( + -- * REST Resource + AccountsContainersTriggersUpdateAPI + + -- * Creating a Request + , accountsContainersTriggersUpdate + , AccountsContainersTriggersUpdate + + -- * Request Lenses + , actuQuotaUser + , actuPrettyPrint + , actuContainerId + , actuTriggerId + , actuUserIp + , actuFingerprint + , actuAccountId + , actuKey + , actuOauthToken + , actuFields + , actuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersTriggersUpdate@ which the +-- 'AccountsContainersTriggersUpdate' request conforms to. +type AccountsContainersTriggersUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "triggers" :> + Capture "triggerId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Trigger + +-- | Updates a GTM Trigger. +-- +-- /See:/ 'accountsContainersTriggersUpdate' smart constructor. +data AccountsContainersTriggersUpdate = AccountsContainersTriggersUpdate + { _actuQuotaUser :: !(Maybe Text) + , _actuPrettyPrint :: !Bool + , _actuContainerId :: !Text + , _actuTriggerId :: !Text + , _actuUserIp :: !(Maybe Text) + , _actuFingerprint :: !(Maybe Text) + , _actuAccountId :: !Text + , _actuKey :: !(Maybe Text) + , _actuOauthToken :: !(Maybe Text) + , _actuFields :: !(Maybe Text) + , _actuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersTriggersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'actuQuotaUser' +-- +-- * 'actuPrettyPrint' +-- +-- * 'actuContainerId' +-- +-- * 'actuTriggerId' +-- +-- * 'actuUserIp' +-- +-- * 'actuFingerprint' +-- +-- * 'actuAccountId' +-- +-- * 'actuKey' +-- +-- * 'actuOauthToken' +-- +-- * 'actuFields' +-- +-- * 'actuAlt' +accountsContainersTriggersUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'triggerId' + -> Text -- ^ 'accountId' + -> AccountsContainersTriggersUpdate +accountsContainersTriggersUpdate pActuContainerId_ pActuTriggerId_ pActuAccountId_ = + AccountsContainersTriggersUpdate + { _actuQuotaUser = Nothing + , _actuPrettyPrint = True + , _actuContainerId = pActuContainerId_ + , _actuTriggerId = pActuTriggerId_ + , _actuUserIp = Nothing + , _actuFingerprint = Nothing + , _actuAccountId = pActuAccountId_ + , _actuKey = Nothing + , _actuOauthToken = Nothing + , _actuFields = Nothing + , _actuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +actuQuotaUser :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuQuotaUser + = lens _actuQuotaUser + (\ s a -> s{_actuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +actuPrettyPrint :: Lens' AccountsContainersTriggersUpdate' Bool +actuPrettyPrint + = lens _actuPrettyPrint + (\ s a -> s{_actuPrettyPrint = a}) + +-- | The GTM Container ID. +actuContainerId :: Lens' AccountsContainersTriggersUpdate' Text +actuContainerId + = lens _actuContainerId + (\ s a -> s{_actuContainerId = a}) + +-- | The GTM Trigger ID. +actuTriggerId :: Lens' AccountsContainersTriggersUpdate' Text +actuTriggerId + = lens _actuTriggerId + (\ s a -> s{_actuTriggerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +actuUserIp :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuUserIp + = lens _actuUserIp (\ s a -> s{_actuUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- trigger in storage. +actuFingerprint :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuFingerprint + = lens _actuFingerprint + (\ s a -> s{_actuFingerprint = a}) + +-- | The GTM Account ID. +actuAccountId :: Lens' AccountsContainersTriggersUpdate' Text +actuAccountId + = lens _actuAccountId + (\ s a -> s{_actuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +actuKey :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuKey = lens _actuKey (\ s a -> s{_actuKey = a}) + +-- | OAuth 2.0 token for the current user. +actuOauthToken :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuOauthToken + = lens _actuOauthToken + (\ s a -> s{_actuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +actuFields :: Lens' AccountsContainersTriggersUpdate' (Maybe Text) +actuFields + = lens _actuFields (\ s a -> s{_actuFields = a}) + +-- | Data format for the response. +actuAlt :: Lens' AccountsContainersTriggersUpdate' Text +actuAlt = lens _actuAlt (\ s a -> s{_actuAlt = a}) + +instance GoogleRequest + AccountsContainersTriggersUpdate' where + type Rs AccountsContainersTriggersUpdate' = Trigger + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersTriggersUpdate{..} + = go _actuQuotaUser _actuPrettyPrint _actuContainerId + _actuTriggerId + _actuUserIp + _actuFingerprint + _actuAccountId + _actuKey + _actuOauthToken + _actuFields + _actuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersTriggersUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Update.hs new file mode 100644 index 000000000..5559b0d24 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Update.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersUpdate@. +module TagManager.Accounts.Containers.Update + ( + -- * REST Resource + AccountsContainersUpdateAPI + + -- * Creating a Request + , accountsContainersUpdate + , AccountsContainersUpdate + + -- * Request Lenses + , acuQuotaUser + , acuPrettyPrint + , acuContainerId + , acuUserIp + , acuFingerprint + , acuAccountId + , acuKey + , acuOauthToken + , acuFields + , acuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersUpdate@ which the +-- 'AccountsContainersUpdate' request conforms to. +type AccountsContainersUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + QueryParam "fingerprint" Text :> + Put '[JSON] Container + +-- | Updates a Container. +-- +-- /See:/ 'accountsContainersUpdate' smart constructor. +data AccountsContainersUpdate = AccountsContainersUpdate + { _acuQuotaUser :: !(Maybe Text) + , _acuPrettyPrint :: !Bool + , _acuContainerId :: !Text + , _acuUserIp :: !(Maybe Text) + , _acuFingerprint :: !(Maybe Text) + , _acuAccountId :: !Text + , _acuKey :: !(Maybe Text) + , _acuOauthToken :: !(Maybe Text) + , _acuFields :: !(Maybe Text) + , _acuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acuQuotaUser' +-- +-- * 'acuPrettyPrint' +-- +-- * 'acuContainerId' +-- +-- * 'acuUserIp' +-- +-- * 'acuFingerprint' +-- +-- * 'acuAccountId' +-- +-- * 'acuKey' +-- +-- * 'acuOauthToken' +-- +-- * 'acuFields' +-- +-- * 'acuAlt' +accountsContainersUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersUpdate +accountsContainersUpdate pAcuContainerId_ pAcuAccountId_ = + AccountsContainersUpdate + { _acuQuotaUser = Nothing + , _acuPrettyPrint = True + , _acuContainerId = pAcuContainerId_ + , _acuUserIp = Nothing + , _acuFingerprint = Nothing + , _acuAccountId = pAcuAccountId_ + , _acuKey = Nothing + , _acuOauthToken = Nothing + , _acuFields = Nothing + , _acuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acuQuotaUser :: Lens' AccountsContainersUpdate' (Maybe Text) +acuQuotaUser + = lens _acuQuotaUser (\ s a -> s{_acuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acuPrettyPrint :: Lens' AccountsContainersUpdate' Bool +acuPrettyPrint + = lens _acuPrettyPrint + (\ s a -> s{_acuPrettyPrint = a}) + +-- | The GTM Container ID. +acuContainerId :: Lens' AccountsContainersUpdate' Text +acuContainerId + = lens _acuContainerId + (\ s a -> s{_acuContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acuUserIp :: Lens' AccountsContainersUpdate' (Maybe Text) +acuUserIp + = lens _acuUserIp (\ s a -> s{_acuUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- container in storage. +acuFingerprint :: Lens' AccountsContainersUpdate' (Maybe Text) +acuFingerprint + = lens _acuFingerprint + (\ s a -> s{_acuFingerprint = a}) + +-- | The GTM Account ID. +acuAccountId :: Lens' AccountsContainersUpdate' Text +acuAccountId + = lens _acuAccountId (\ s a -> s{_acuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acuKey :: Lens' AccountsContainersUpdate' (Maybe Text) +acuKey = lens _acuKey (\ s a -> s{_acuKey = a}) + +-- | OAuth 2.0 token for the current user. +acuOauthToken :: Lens' AccountsContainersUpdate' (Maybe Text) +acuOauthToken + = lens _acuOauthToken + (\ s a -> s{_acuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acuFields :: Lens' AccountsContainersUpdate' (Maybe Text) +acuFields + = lens _acuFields (\ s a -> s{_acuFields = a}) + +-- | Data format for the response. +acuAlt :: Lens' AccountsContainersUpdate' Text +acuAlt = lens _acuAlt (\ s a -> s{_acuAlt = a}) + +instance GoogleRequest AccountsContainersUpdate' + where + type Rs AccountsContainersUpdate' = Container + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsContainersUpdate{..} + = go _acuQuotaUser _acuPrettyPrint _acuContainerId + _acuUserIp + _acuFingerprint + _acuAccountId + _acuKey + _acuOauthToken + _acuFields + _acuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Create.hs new file mode 100644 index 000000000..84b86c649 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Create.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Variables.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a GTM Variable. +-- +-- /See:/ for @TagmanagerAccountsContainersVariablesCreate@. +module TagManager.Accounts.Containers.Variables.Create + ( + -- * REST Resource + AccountsContainersVariablesCreateAPI + + -- * Creating a Request + , accountsContainersVariablesCreate + , AccountsContainersVariablesCreate + + -- * Request Lenses + , acvcQuotaUser + , acvcPrettyPrint + , acvcContainerId + , acvcUserIp + , acvcAccountId + , acvcKey + , acvcOauthToken + , acvcFields + , acvcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVariablesCreate@ which the +-- 'AccountsContainersVariablesCreate' request conforms to. +type AccountsContainersVariablesCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "variables" :> Post '[JSON] Variable + +-- | Creates a GTM Variable. +-- +-- /See:/ 'accountsContainersVariablesCreate' smart constructor. +data AccountsContainersVariablesCreate = AccountsContainersVariablesCreate + { _acvcQuotaUser :: !(Maybe Text) + , _acvcPrettyPrint :: !Bool + , _acvcContainerId :: !Text + , _acvcUserIp :: !(Maybe Text) + , _acvcAccountId :: !Text + , _acvcKey :: !(Maybe Text) + , _acvcOauthToken :: !(Maybe Text) + , _acvcFields :: !(Maybe Text) + , _acvcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVariablesCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvcQuotaUser' +-- +-- * 'acvcPrettyPrint' +-- +-- * 'acvcContainerId' +-- +-- * 'acvcUserIp' +-- +-- * 'acvcAccountId' +-- +-- * 'acvcKey' +-- +-- * 'acvcOauthToken' +-- +-- * 'acvcFields' +-- +-- * 'acvcAlt' +accountsContainersVariablesCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersVariablesCreate +accountsContainersVariablesCreate pAcvcContainerId_ pAcvcAccountId_ = + AccountsContainersVariablesCreate + { _acvcQuotaUser = Nothing + , _acvcPrettyPrint = True + , _acvcContainerId = pAcvcContainerId_ + , _acvcUserIp = Nothing + , _acvcAccountId = pAcvcAccountId_ + , _acvcKey = Nothing + , _acvcOauthToken = Nothing + , _acvcFields = Nothing + , _acvcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvcQuotaUser :: Lens' AccountsContainersVariablesCreate' (Maybe Text) +acvcQuotaUser + = lens _acvcQuotaUser + (\ s a -> s{_acvcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvcPrettyPrint :: Lens' AccountsContainersVariablesCreate' Bool +acvcPrettyPrint + = lens _acvcPrettyPrint + (\ s a -> s{_acvcPrettyPrint = a}) + +-- | The GTM Container ID. +acvcContainerId :: Lens' AccountsContainersVariablesCreate' Text +acvcContainerId + = lens _acvcContainerId + (\ s a -> s{_acvcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvcUserIp :: Lens' AccountsContainersVariablesCreate' (Maybe Text) +acvcUserIp + = lens _acvcUserIp (\ s a -> s{_acvcUserIp = a}) + +-- | The GTM Account ID. +acvcAccountId :: Lens' AccountsContainersVariablesCreate' Text +acvcAccountId + = lens _acvcAccountId + (\ s a -> s{_acvcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvcKey :: Lens' AccountsContainersVariablesCreate' (Maybe Text) +acvcKey = lens _acvcKey (\ s a -> s{_acvcKey = a}) + +-- | OAuth 2.0 token for the current user. +acvcOauthToken :: Lens' AccountsContainersVariablesCreate' (Maybe Text) +acvcOauthToken + = lens _acvcOauthToken + (\ s a -> s{_acvcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvcFields :: Lens' AccountsContainersVariablesCreate' (Maybe Text) +acvcFields + = lens _acvcFields (\ s a -> s{_acvcFields = a}) + +-- | Data format for the response. +acvcAlt :: Lens' AccountsContainersVariablesCreate' Text +acvcAlt = lens _acvcAlt (\ s a -> s{_acvcAlt = a}) + +instance GoogleRequest + AccountsContainersVariablesCreate' where + type Rs AccountsContainersVariablesCreate' = Variable + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVariablesCreate{..} + = go _acvcQuotaUser _acvcPrettyPrint _acvcContainerId + _acvcUserIp + _acvcAccountId + _acvcKey + _acvcOauthToken + _acvcFields + _acvcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVariablesCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Delete.hs new file mode 100644 index 000000000..7bff2858b --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Delete.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Variables.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a GTM Variable. +-- +-- /See:/ for @TagmanagerAccountsContainersVariablesDelete@. +module TagManager.Accounts.Containers.Variables.Delete + ( + -- * REST Resource + AccountsContainersVariablesDeleteAPI + + -- * Creating a Request + , accountsContainersVariablesDelete + , AccountsContainersVariablesDelete + + -- * Request Lenses + , acvdQuotaUser + , acvdPrettyPrint + , acvdContainerId + , acvdUserIp + , acvdVariableId + , acvdAccountId + , acvdKey + , acvdOauthToken + , acvdFields + , acvdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVariablesDelete@ which the +-- 'AccountsContainersVariablesDelete' request conforms to. +type AccountsContainersVariablesDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "variables" :> + Capture "variableId" Text :> Delete '[JSON] () + +-- | Deletes a GTM Variable. +-- +-- /See:/ 'accountsContainersVariablesDelete' smart constructor. +data AccountsContainersVariablesDelete = AccountsContainersVariablesDelete + { _acvdQuotaUser :: !(Maybe Text) + , _acvdPrettyPrint :: !Bool + , _acvdContainerId :: !Text + , _acvdUserIp :: !(Maybe Text) + , _acvdVariableId :: !Text + , _acvdAccountId :: !Text + , _acvdKey :: !(Maybe Text) + , _acvdOauthToken :: !(Maybe Text) + , _acvdFields :: !(Maybe Text) + , _acvdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVariablesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvdQuotaUser' +-- +-- * 'acvdPrettyPrint' +-- +-- * 'acvdContainerId' +-- +-- * 'acvdUserIp' +-- +-- * 'acvdVariableId' +-- +-- * 'acvdAccountId' +-- +-- * 'acvdKey' +-- +-- * 'acvdOauthToken' +-- +-- * 'acvdFields' +-- +-- * 'acvdAlt' +accountsContainersVariablesDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'variableId' + -> Text -- ^ 'accountId' + -> AccountsContainersVariablesDelete +accountsContainersVariablesDelete pAcvdContainerId_ pAcvdVariableId_ pAcvdAccountId_ = + AccountsContainersVariablesDelete + { _acvdQuotaUser = Nothing + , _acvdPrettyPrint = True + , _acvdContainerId = pAcvdContainerId_ + , _acvdUserIp = Nothing + , _acvdVariableId = pAcvdVariableId_ + , _acvdAccountId = pAcvdAccountId_ + , _acvdKey = Nothing + , _acvdOauthToken = Nothing + , _acvdFields = Nothing + , _acvdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvdQuotaUser :: Lens' AccountsContainersVariablesDelete' (Maybe Text) +acvdQuotaUser + = lens _acvdQuotaUser + (\ s a -> s{_acvdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvdPrettyPrint :: Lens' AccountsContainersVariablesDelete' Bool +acvdPrettyPrint + = lens _acvdPrettyPrint + (\ s a -> s{_acvdPrettyPrint = a}) + +-- | The GTM Container ID. +acvdContainerId :: Lens' AccountsContainersVariablesDelete' Text +acvdContainerId + = lens _acvdContainerId + (\ s a -> s{_acvdContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvdUserIp :: Lens' AccountsContainersVariablesDelete' (Maybe Text) +acvdUserIp + = lens _acvdUserIp (\ s a -> s{_acvdUserIp = a}) + +-- | The GTM Variable ID. +acvdVariableId :: Lens' AccountsContainersVariablesDelete' Text +acvdVariableId + = lens _acvdVariableId + (\ s a -> s{_acvdVariableId = a}) + +-- | The GTM Account ID. +acvdAccountId :: Lens' AccountsContainersVariablesDelete' Text +acvdAccountId + = lens _acvdAccountId + (\ s a -> s{_acvdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvdKey :: Lens' AccountsContainersVariablesDelete' (Maybe Text) +acvdKey = lens _acvdKey (\ s a -> s{_acvdKey = a}) + +-- | OAuth 2.0 token for the current user. +acvdOauthToken :: Lens' AccountsContainersVariablesDelete' (Maybe Text) +acvdOauthToken + = lens _acvdOauthToken + (\ s a -> s{_acvdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvdFields :: Lens' AccountsContainersVariablesDelete' (Maybe Text) +acvdFields + = lens _acvdFields (\ s a -> s{_acvdFields = a}) + +-- | Data format for the response. +acvdAlt :: Lens' AccountsContainersVariablesDelete' Text +acvdAlt = lens _acvdAlt (\ s a -> s{_acvdAlt = a}) + +instance GoogleRequest + AccountsContainersVariablesDelete' where + type Rs AccountsContainersVariablesDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVariablesDelete{..} + = go _acvdQuotaUser _acvdPrettyPrint _acvdContainerId + _acvdUserIp + _acvdVariableId + _acvdAccountId + _acvdKey + _acvdOauthToken + _acvdFields + _acvdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVariablesDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Get.hs new file mode 100644 index 000000000..ba5dfd0e5 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Get.hs @@ -0,0 +1,192 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Variables.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Variable. +-- +-- /See:/ for @TagmanagerAccountsContainersVariablesGet@. +module TagManager.Accounts.Containers.Variables.Get + ( + -- * REST Resource + AccountsContainersVariablesGetAPI + + -- * Creating a Request + , accountsContainersVariablesGet + , AccountsContainersVariablesGet + + -- * Request Lenses + , acvgQuotaUser + , acvgPrettyPrint + , acvgContainerId + , acvgUserIp + , acvgVariableId + , acvgAccountId + , acvgKey + , acvgOauthToken + , acvgFields + , acvgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVariablesGet@ which the +-- 'AccountsContainersVariablesGet' request conforms to. +type AccountsContainersVariablesGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "variables" :> + Capture "variableId" Text :> Get '[JSON] Variable + +-- | Gets a GTM Variable. +-- +-- /See:/ 'accountsContainersVariablesGet' smart constructor. +data AccountsContainersVariablesGet = AccountsContainersVariablesGet + { _acvgQuotaUser :: !(Maybe Text) + , _acvgPrettyPrint :: !Bool + , _acvgContainerId :: !Text + , _acvgUserIp :: !(Maybe Text) + , _acvgVariableId :: !Text + , _acvgAccountId :: !Text + , _acvgKey :: !(Maybe Text) + , _acvgOauthToken :: !(Maybe Text) + , _acvgFields :: !(Maybe Text) + , _acvgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVariablesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvgQuotaUser' +-- +-- * 'acvgPrettyPrint' +-- +-- * 'acvgContainerId' +-- +-- * 'acvgUserIp' +-- +-- * 'acvgVariableId' +-- +-- * 'acvgAccountId' +-- +-- * 'acvgKey' +-- +-- * 'acvgOauthToken' +-- +-- * 'acvgFields' +-- +-- * 'acvgAlt' +accountsContainersVariablesGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'variableId' + -> Text -- ^ 'accountId' + -> AccountsContainersVariablesGet +accountsContainersVariablesGet pAcvgContainerId_ pAcvgVariableId_ pAcvgAccountId_ = + AccountsContainersVariablesGet + { _acvgQuotaUser = Nothing + , _acvgPrettyPrint = True + , _acvgContainerId = pAcvgContainerId_ + , _acvgUserIp = Nothing + , _acvgVariableId = pAcvgVariableId_ + , _acvgAccountId = pAcvgAccountId_ + , _acvgKey = Nothing + , _acvgOauthToken = Nothing + , _acvgFields = Nothing + , _acvgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvgQuotaUser :: Lens' AccountsContainersVariablesGet' (Maybe Text) +acvgQuotaUser + = lens _acvgQuotaUser + (\ s a -> s{_acvgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvgPrettyPrint :: Lens' AccountsContainersVariablesGet' Bool +acvgPrettyPrint + = lens _acvgPrettyPrint + (\ s a -> s{_acvgPrettyPrint = a}) + +-- | The GTM Container ID. +acvgContainerId :: Lens' AccountsContainersVariablesGet' Text +acvgContainerId + = lens _acvgContainerId + (\ s a -> s{_acvgContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvgUserIp :: Lens' AccountsContainersVariablesGet' (Maybe Text) +acvgUserIp + = lens _acvgUserIp (\ s a -> s{_acvgUserIp = a}) + +-- | The GTM Variable ID. +acvgVariableId :: Lens' AccountsContainersVariablesGet' Text +acvgVariableId + = lens _acvgVariableId + (\ s a -> s{_acvgVariableId = a}) + +-- | The GTM Account ID. +acvgAccountId :: Lens' AccountsContainersVariablesGet' Text +acvgAccountId + = lens _acvgAccountId + (\ s a -> s{_acvgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvgKey :: Lens' AccountsContainersVariablesGet' (Maybe Text) +acvgKey = lens _acvgKey (\ s a -> s{_acvgKey = a}) + +-- | OAuth 2.0 token for the current user. +acvgOauthToken :: Lens' AccountsContainersVariablesGet' (Maybe Text) +acvgOauthToken + = lens _acvgOauthToken + (\ s a -> s{_acvgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvgFields :: Lens' AccountsContainersVariablesGet' (Maybe Text) +acvgFields + = lens _acvgFields (\ s a -> s{_acvgFields = a}) + +-- | Data format for the response. +acvgAlt :: Lens' AccountsContainersVariablesGet' Text +acvgAlt = lens _acvgAlt (\ s a -> s{_acvgAlt = a}) + +instance GoogleRequest + AccountsContainersVariablesGet' where + type Rs AccountsContainersVariablesGet' = Variable + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVariablesGet{..} + = go _acvgQuotaUser _acvgPrettyPrint _acvgContainerId + _acvgUserIp + _acvgVariableId + _acvgAccountId + _acvgKey + _acvgOauthToken + _acvgFields + _acvgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVariablesGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/List.hs new file mode 100644 index 000000000..45a8559fa --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/List.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Variables.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Variables of a Container. +-- +-- /See:/ for @TagmanagerAccountsContainersVariablesList@. +module TagManager.Accounts.Containers.Variables.List + ( + -- * REST Resource + AccountsContainersVariablesListAPI + + -- * Creating a Request + , accountsContainersVariablesList + , AccountsContainersVariablesList + + -- * Request Lenses + , acvlQuotaUser + , acvlPrettyPrint + , acvlContainerId + , acvlUserIp + , acvlAccountId + , acvlKey + , acvlOauthToken + , acvlFields + , acvlAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVariablesList@ which the +-- 'AccountsContainersVariablesList' request conforms to. +type AccountsContainersVariablesListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "variables" :> Get '[JSON] ListVariablesResponse + +-- | Lists all GTM Variables of a Container. +-- +-- /See:/ 'accountsContainersVariablesList' smart constructor. +data AccountsContainersVariablesList = AccountsContainersVariablesList + { _acvlQuotaUser :: !(Maybe Text) + , _acvlPrettyPrint :: !Bool + , _acvlContainerId :: !Text + , _acvlUserIp :: !(Maybe Text) + , _acvlAccountId :: !Text + , _acvlKey :: !(Maybe Text) + , _acvlOauthToken :: !(Maybe Text) + , _acvlFields :: !(Maybe Text) + , _acvlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVariablesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvlQuotaUser' +-- +-- * 'acvlPrettyPrint' +-- +-- * 'acvlContainerId' +-- +-- * 'acvlUserIp' +-- +-- * 'acvlAccountId' +-- +-- * 'acvlKey' +-- +-- * 'acvlOauthToken' +-- +-- * 'acvlFields' +-- +-- * 'acvlAlt' +accountsContainersVariablesList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersVariablesList +accountsContainersVariablesList pAcvlContainerId_ pAcvlAccountId_ = + AccountsContainersVariablesList + { _acvlQuotaUser = Nothing + , _acvlPrettyPrint = True + , _acvlContainerId = pAcvlContainerId_ + , _acvlUserIp = Nothing + , _acvlAccountId = pAcvlAccountId_ + , _acvlKey = Nothing + , _acvlOauthToken = Nothing + , _acvlFields = Nothing + , _acvlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvlQuotaUser :: Lens' AccountsContainersVariablesList' (Maybe Text) +acvlQuotaUser + = lens _acvlQuotaUser + (\ s a -> s{_acvlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvlPrettyPrint :: Lens' AccountsContainersVariablesList' Bool +acvlPrettyPrint + = lens _acvlPrettyPrint + (\ s a -> s{_acvlPrettyPrint = a}) + +-- | The GTM Container ID. +acvlContainerId :: Lens' AccountsContainersVariablesList' Text +acvlContainerId + = lens _acvlContainerId + (\ s a -> s{_acvlContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvlUserIp :: Lens' AccountsContainersVariablesList' (Maybe Text) +acvlUserIp + = lens _acvlUserIp (\ s a -> s{_acvlUserIp = a}) + +-- | The GTM Account ID. +acvlAccountId :: Lens' AccountsContainersVariablesList' Text +acvlAccountId + = lens _acvlAccountId + (\ s a -> s{_acvlAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvlKey :: Lens' AccountsContainersVariablesList' (Maybe Text) +acvlKey = lens _acvlKey (\ s a -> s{_acvlKey = a}) + +-- | OAuth 2.0 token for the current user. +acvlOauthToken :: Lens' AccountsContainersVariablesList' (Maybe Text) +acvlOauthToken + = lens _acvlOauthToken + (\ s a -> s{_acvlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvlFields :: Lens' AccountsContainersVariablesList' (Maybe Text) +acvlFields + = lens _acvlFields (\ s a -> s{_acvlFields = a}) + +-- | Data format for the response. +acvlAlt :: Lens' AccountsContainersVariablesList' Text +acvlAlt = lens _acvlAlt (\ s a -> s{_acvlAlt = a}) + +instance GoogleRequest + AccountsContainersVariablesList' where + type Rs AccountsContainersVariablesList' = + ListVariablesResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVariablesList{..} + = go _acvlQuotaUser _acvlPrettyPrint _acvlContainerId + _acvlUserIp + _acvlAccountId + _acvlKey + _acvlOauthToken + _acvlFields + _acvlAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVariablesListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Update.hs new file mode 100644 index 000000000..151cb405f --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Update.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Variables.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Variable. +-- +-- /See:/ for @TagmanagerAccountsContainersVariablesUpdate@. +module TagManager.Accounts.Containers.Variables.Update + ( + -- * REST Resource + AccountsContainersVariablesUpdateAPI + + -- * Creating a Request + , accountsContainersVariablesUpdate + , AccountsContainersVariablesUpdate + + -- * Request Lenses + , acvuQuotaUser + , acvuPrettyPrint + , acvuContainerId + , acvuUserIp + , acvuFingerprint + , acvuVariableId + , acvuAccountId + , acvuKey + , acvuOauthToken + , acvuFields + , acvuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVariablesUpdate@ which the +-- 'AccountsContainersVariablesUpdate' request conforms to. +type AccountsContainersVariablesUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "variables" :> + Capture "variableId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Variable + +-- | Updates a GTM Variable. +-- +-- /See:/ 'accountsContainersVariablesUpdate' smart constructor. +data AccountsContainersVariablesUpdate = AccountsContainersVariablesUpdate + { _acvuQuotaUser :: !(Maybe Text) + , _acvuPrettyPrint :: !Bool + , _acvuContainerId :: !Text + , _acvuUserIp :: !(Maybe Text) + , _acvuFingerprint :: !(Maybe Text) + , _acvuVariableId :: !Text + , _acvuAccountId :: !Text + , _acvuKey :: !(Maybe Text) + , _acvuOauthToken :: !(Maybe Text) + , _acvuFields :: !(Maybe Text) + , _acvuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVariablesUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvuQuotaUser' +-- +-- * 'acvuPrettyPrint' +-- +-- * 'acvuContainerId' +-- +-- * 'acvuUserIp' +-- +-- * 'acvuFingerprint' +-- +-- * 'acvuVariableId' +-- +-- * 'acvuAccountId' +-- +-- * 'acvuKey' +-- +-- * 'acvuOauthToken' +-- +-- * 'acvuFields' +-- +-- * 'acvuAlt' +accountsContainersVariablesUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'variableId' + -> Text -- ^ 'accountId' + -> AccountsContainersVariablesUpdate +accountsContainersVariablesUpdate pAcvuContainerId_ pAcvuVariableId_ pAcvuAccountId_ = + AccountsContainersVariablesUpdate + { _acvuQuotaUser = Nothing + , _acvuPrettyPrint = True + , _acvuContainerId = pAcvuContainerId_ + , _acvuUserIp = Nothing + , _acvuFingerprint = Nothing + , _acvuVariableId = pAcvuVariableId_ + , _acvuAccountId = pAcvuAccountId_ + , _acvuKey = Nothing + , _acvuOauthToken = Nothing + , _acvuFields = Nothing + , _acvuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvuQuotaUser :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuQuotaUser + = lens _acvuQuotaUser + (\ s a -> s{_acvuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvuPrettyPrint :: Lens' AccountsContainersVariablesUpdate' Bool +acvuPrettyPrint + = lens _acvuPrettyPrint + (\ s a -> s{_acvuPrettyPrint = a}) + +-- | The GTM Container ID. +acvuContainerId :: Lens' AccountsContainersVariablesUpdate' Text +acvuContainerId + = lens _acvuContainerId + (\ s a -> s{_acvuContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvuUserIp :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuUserIp + = lens _acvuUserIp (\ s a -> s{_acvuUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- variable in storage. +acvuFingerprint :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuFingerprint + = lens _acvuFingerprint + (\ s a -> s{_acvuFingerprint = a}) + +-- | The GTM Variable ID. +acvuVariableId :: Lens' AccountsContainersVariablesUpdate' Text +acvuVariableId + = lens _acvuVariableId + (\ s a -> s{_acvuVariableId = a}) + +-- | The GTM Account ID. +acvuAccountId :: Lens' AccountsContainersVariablesUpdate' Text +acvuAccountId + = lens _acvuAccountId + (\ s a -> s{_acvuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvuKey :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuKey = lens _acvuKey (\ s a -> s{_acvuKey = a}) + +-- | OAuth 2.0 token for the current user. +acvuOauthToken :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuOauthToken + = lens _acvuOauthToken + (\ s a -> s{_acvuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvuFields :: Lens' AccountsContainersVariablesUpdate' (Maybe Text) +acvuFields + = lens _acvuFields (\ s a -> s{_acvuFields = a}) + +-- | Data format for the response. +acvuAlt :: Lens' AccountsContainersVariablesUpdate' Text +acvuAlt = lens _acvuAlt (\ s a -> s{_acvuAlt = a}) + +instance GoogleRequest + AccountsContainersVariablesUpdate' where + type Rs AccountsContainersVariablesUpdate' = Variable + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVariablesUpdate{..} + = go _acvuQuotaUser _acvuPrettyPrint _acvuContainerId + _acvuUserIp + _acvuFingerprint + _acvuVariableId + _acvuAccountId + _acvuKey + _acvuOauthToken + _acvuFields + _acvuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVariablesUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Create.hs new file mode 100644 index 000000000..03e8bb152 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Create.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsCreate@. +module TagManager.Accounts.Containers.Versions.Create + ( + -- * REST Resource + AccountsContainersVersionsCreateAPI + + -- * Creating a Request + , accountsContainersVersionsCreate + , AccountsContainersVersionsCreate + + -- * Request Lenses + , acvccQuotaUser + , acvccPrettyPrint + , acvccContainerId + , acvccUserIp + , acvccAccountId + , acvccKey + , acvccOauthToken + , acvccFields + , acvccAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsCreate@ which the +-- 'AccountsContainersVersionsCreate' request conforms to. +type AccountsContainersVersionsCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Post '[JSON] CreateContainerVersionResponse + +-- | Creates a Container Version. +-- +-- /See:/ 'accountsContainersVersionsCreate' smart constructor. +data AccountsContainersVersionsCreate = AccountsContainersVersionsCreate + { _acvccQuotaUser :: !(Maybe Text) + , _acvccPrettyPrint :: !Bool + , _acvccContainerId :: !Text + , _acvccUserIp :: !(Maybe Text) + , _acvccAccountId :: !Text + , _acvccKey :: !(Maybe Text) + , _acvccOauthToken :: !(Maybe Text) + , _acvccFields :: !(Maybe Text) + , _acvccAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvccQuotaUser' +-- +-- * 'acvccPrettyPrint' +-- +-- * 'acvccContainerId' +-- +-- * 'acvccUserIp' +-- +-- * 'acvccAccountId' +-- +-- * 'acvccKey' +-- +-- * 'acvccOauthToken' +-- +-- * 'acvccFields' +-- +-- * 'acvccAlt' +accountsContainersVersionsCreate + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsCreate +accountsContainersVersionsCreate pAcvccContainerId_ pAcvccAccountId_ = + AccountsContainersVersionsCreate + { _acvccQuotaUser = Nothing + , _acvccPrettyPrint = True + , _acvccContainerId = pAcvccContainerId_ + , _acvccUserIp = Nothing + , _acvccAccountId = pAcvccAccountId_ + , _acvccKey = Nothing + , _acvccOauthToken = Nothing + , _acvccFields = Nothing + , _acvccAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvccQuotaUser :: Lens' AccountsContainersVersionsCreate' (Maybe Text) +acvccQuotaUser + = lens _acvccQuotaUser + (\ s a -> s{_acvccQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvccPrettyPrint :: Lens' AccountsContainersVersionsCreate' Bool +acvccPrettyPrint + = lens _acvccPrettyPrint + (\ s a -> s{_acvccPrettyPrint = a}) + +-- | The GTM Container ID. +acvccContainerId :: Lens' AccountsContainersVersionsCreate' Text +acvccContainerId + = lens _acvccContainerId + (\ s a -> s{_acvccContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvccUserIp :: Lens' AccountsContainersVersionsCreate' (Maybe Text) +acvccUserIp + = lens _acvccUserIp (\ s a -> s{_acvccUserIp = a}) + +-- | The GTM Account ID. +acvccAccountId :: Lens' AccountsContainersVersionsCreate' Text +acvccAccountId + = lens _acvccAccountId + (\ s a -> s{_acvccAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvccKey :: Lens' AccountsContainersVersionsCreate' (Maybe Text) +acvccKey = lens _acvccKey (\ s a -> s{_acvccKey = a}) + +-- | OAuth 2.0 token for the current user. +acvccOauthToken :: Lens' AccountsContainersVersionsCreate' (Maybe Text) +acvccOauthToken + = lens _acvccOauthToken + (\ s a -> s{_acvccOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvccFields :: Lens' AccountsContainersVersionsCreate' (Maybe Text) +acvccFields + = lens _acvccFields (\ s a -> s{_acvccFields = a}) + +-- | Data format for the response. +acvccAlt :: Lens' AccountsContainersVersionsCreate' Text +acvccAlt = lens _acvccAlt (\ s a -> s{_acvccAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsCreate' where + type Rs AccountsContainersVersionsCreate' = + CreateContainerVersionResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsCreate{..} + = go _acvccQuotaUser _acvccPrettyPrint + _acvccContainerId + _acvccUserIp + _acvccAccountId + _acvccKey + _acvccOauthToken + _acvccFields + _acvccAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Delete.hs new file mode 100644 index 000000000..651456f6e --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Delete.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsDelete@. +module TagManager.Accounts.Containers.Versions.Delete + ( + -- * REST Resource + AccountsContainersVersionsDeleteAPI + + -- * Creating a Request + , accountsContainersVersionsDelete + , AccountsContainersVersionsDelete + + -- * Request Lenses + , acvdcQuotaUser + , acvdcPrettyPrint + , acvdcContainerId + , acvdcUserIp + , acvdcContainerVersionId + , acvdcAccountId + , acvdcKey + , acvdcOauthToken + , acvdcFields + , acvdcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsDelete@ which the +-- 'AccountsContainersVersionsDelete' request conforms to. +type AccountsContainersVersionsDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + Delete '[JSON] () + +-- | Deletes a Container Version. +-- +-- /See:/ 'accountsContainersVersionsDelete' smart constructor. +data AccountsContainersVersionsDelete = AccountsContainersVersionsDelete + { _acvdcQuotaUser :: !(Maybe Text) + , _acvdcPrettyPrint :: !Bool + , _acvdcContainerId :: !Text + , _acvdcUserIp :: !(Maybe Text) + , _acvdcContainerVersionId :: !Text + , _acvdcAccountId :: !Text + , _acvdcKey :: !(Maybe Text) + , _acvdcOauthToken :: !(Maybe Text) + , _acvdcFields :: !(Maybe Text) + , _acvdcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvdcQuotaUser' +-- +-- * 'acvdcPrettyPrint' +-- +-- * 'acvdcContainerId' +-- +-- * 'acvdcUserIp' +-- +-- * 'acvdcContainerVersionId' +-- +-- * 'acvdcAccountId' +-- +-- * 'acvdcKey' +-- +-- * 'acvdcOauthToken' +-- +-- * 'acvdcFields' +-- +-- * 'acvdcAlt' +accountsContainersVersionsDelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsDelete +accountsContainersVersionsDelete pAcvdcContainerId_ pAcvdcContainerVersionId_ pAcvdcAccountId_ = + AccountsContainersVersionsDelete + { _acvdcQuotaUser = Nothing + , _acvdcPrettyPrint = True + , _acvdcContainerId = pAcvdcContainerId_ + , _acvdcUserIp = Nothing + , _acvdcContainerVersionId = pAcvdcContainerVersionId_ + , _acvdcAccountId = pAcvdcAccountId_ + , _acvdcKey = Nothing + , _acvdcOauthToken = Nothing + , _acvdcFields = Nothing + , _acvdcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvdcQuotaUser :: Lens' AccountsContainersVersionsDelete' (Maybe Text) +acvdcQuotaUser + = lens _acvdcQuotaUser + (\ s a -> s{_acvdcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvdcPrettyPrint :: Lens' AccountsContainersVersionsDelete' Bool +acvdcPrettyPrint + = lens _acvdcPrettyPrint + (\ s a -> s{_acvdcPrettyPrint = a}) + +-- | The GTM Container ID. +acvdcContainerId :: Lens' AccountsContainersVersionsDelete' Text +acvdcContainerId + = lens _acvdcContainerId + (\ s a -> s{_acvdcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvdcUserIp :: Lens' AccountsContainersVersionsDelete' (Maybe Text) +acvdcUserIp + = lens _acvdcUserIp (\ s a -> s{_acvdcUserIp = a}) + +-- | The GTM Container Version ID. +acvdcContainerVersionId :: Lens' AccountsContainersVersionsDelete' Text +acvdcContainerVersionId + = lens _acvdcContainerVersionId + (\ s a -> s{_acvdcContainerVersionId = a}) + +-- | The GTM Account ID. +acvdcAccountId :: Lens' AccountsContainersVersionsDelete' Text +acvdcAccountId + = lens _acvdcAccountId + (\ s a -> s{_acvdcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvdcKey :: Lens' AccountsContainersVersionsDelete' (Maybe Text) +acvdcKey = lens _acvdcKey (\ s a -> s{_acvdcKey = a}) + +-- | OAuth 2.0 token for the current user. +acvdcOauthToken :: Lens' AccountsContainersVersionsDelete' (Maybe Text) +acvdcOauthToken + = lens _acvdcOauthToken + (\ s a -> s{_acvdcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvdcFields :: Lens' AccountsContainersVersionsDelete' (Maybe Text) +acvdcFields + = lens _acvdcFields (\ s a -> s{_acvdcFields = a}) + +-- | Data format for the response. +acvdcAlt :: Lens' AccountsContainersVersionsDelete' Text +acvdcAlt = lens _acvdcAlt (\ s a -> s{_acvdcAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsDelete' where + type Rs AccountsContainersVersionsDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsDelete{..} + = go _acvdcQuotaUser _acvdcPrettyPrint + _acvdcContainerId + _acvdcUserIp + _acvdcContainerVersionId + _acvdcAccountId + _acvdcKey + _acvdcOauthToken + _acvdcFields + _acvdcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Get.hs new file mode 100644 index 000000000..3a057817d --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Get.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsGet@. +module TagManager.Accounts.Containers.Versions.Get + ( + -- * REST Resource + AccountsContainersVersionsGetAPI + + -- * Creating a Request + , accountsContainersVersionsGet + , AccountsContainersVersionsGet + + -- * Request Lenses + , acvgcQuotaUser + , acvgcPrettyPrint + , acvgcContainerId + , acvgcUserIp + , acvgcContainerVersionId + , acvgcAccountId + , acvgcKey + , acvgcOauthToken + , acvgcFields + , acvgcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsGet@ which the +-- 'AccountsContainersVersionsGet' request conforms to. +type AccountsContainersVersionsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + Get '[JSON] ContainerVersion + +-- | Gets a Container Version. +-- +-- /See:/ 'accountsContainersVersionsGet' smart constructor. +data AccountsContainersVersionsGet = AccountsContainersVersionsGet + { _acvgcQuotaUser :: !(Maybe Text) + , _acvgcPrettyPrint :: !Bool + , _acvgcContainerId :: !Text + , _acvgcUserIp :: !(Maybe Text) + , _acvgcContainerVersionId :: !Text + , _acvgcAccountId :: !Text + , _acvgcKey :: !(Maybe Text) + , _acvgcOauthToken :: !(Maybe Text) + , _acvgcFields :: !(Maybe Text) + , _acvgcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvgcQuotaUser' +-- +-- * 'acvgcPrettyPrint' +-- +-- * 'acvgcContainerId' +-- +-- * 'acvgcUserIp' +-- +-- * 'acvgcContainerVersionId' +-- +-- * 'acvgcAccountId' +-- +-- * 'acvgcKey' +-- +-- * 'acvgcOauthToken' +-- +-- * 'acvgcFields' +-- +-- * 'acvgcAlt' +accountsContainersVersionsGet + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsGet +accountsContainersVersionsGet pAcvgcContainerId_ pAcvgcContainerVersionId_ pAcvgcAccountId_ = + AccountsContainersVersionsGet + { _acvgcQuotaUser = Nothing + , _acvgcPrettyPrint = True + , _acvgcContainerId = pAcvgcContainerId_ + , _acvgcUserIp = Nothing + , _acvgcContainerVersionId = pAcvgcContainerVersionId_ + , _acvgcAccountId = pAcvgcAccountId_ + , _acvgcKey = Nothing + , _acvgcOauthToken = Nothing + , _acvgcFields = Nothing + , _acvgcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvgcQuotaUser :: Lens' AccountsContainersVersionsGet' (Maybe Text) +acvgcQuotaUser + = lens _acvgcQuotaUser + (\ s a -> s{_acvgcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvgcPrettyPrint :: Lens' AccountsContainersVersionsGet' Bool +acvgcPrettyPrint + = lens _acvgcPrettyPrint + (\ s a -> s{_acvgcPrettyPrint = a}) + +-- | The GTM Container ID. +acvgcContainerId :: Lens' AccountsContainersVersionsGet' Text +acvgcContainerId + = lens _acvgcContainerId + (\ s a -> s{_acvgcContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvgcUserIp :: Lens' AccountsContainersVersionsGet' (Maybe Text) +acvgcUserIp + = lens _acvgcUserIp (\ s a -> s{_acvgcUserIp = a}) + +-- | The GTM Container Version ID. Specify published to retrieve the +-- currently published version. +acvgcContainerVersionId :: Lens' AccountsContainersVersionsGet' Text +acvgcContainerVersionId + = lens _acvgcContainerVersionId + (\ s a -> s{_acvgcContainerVersionId = a}) + +-- | The GTM Account ID. +acvgcAccountId :: Lens' AccountsContainersVersionsGet' Text +acvgcAccountId + = lens _acvgcAccountId + (\ s a -> s{_acvgcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvgcKey :: Lens' AccountsContainersVersionsGet' (Maybe Text) +acvgcKey = lens _acvgcKey (\ s a -> s{_acvgcKey = a}) + +-- | OAuth 2.0 token for the current user. +acvgcOauthToken :: Lens' AccountsContainersVersionsGet' (Maybe Text) +acvgcOauthToken + = lens _acvgcOauthToken + (\ s a -> s{_acvgcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvgcFields :: Lens' AccountsContainersVersionsGet' (Maybe Text) +acvgcFields + = lens _acvgcFields (\ s a -> s{_acvgcFields = a}) + +-- | Data format for the response. +acvgcAlt :: Lens' AccountsContainersVersionsGet' Text +acvgcAlt = lens _acvgcAlt (\ s a -> s{_acvgcAlt = a}) + +instance GoogleRequest AccountsContainersVersionsGet' + where + type Rs AccountsContainersVersionsGet' = + ContainerVersion + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsGet{..} + = go _acvgcQuotaUser _acvgcPrettyPrint + _acvgcContainerId + _acvgcUserIp + _acvgcContainerVersionId + _acvgcAccountId + _acvgcKey + _acvgcOauthToken + _acvgcFields + _acvgcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/List.hs new file mode 100644 index 000000000..2d97cfe19 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/List.hs @@ -0,0 +1,190 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all Container Versions of a GTM Container. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsList@. +module TagManager.Accounts.Containers.Versions.List + ( + -- * REST Resource + AccountsContainersVersionsListAPI + + -- * Creating a Request + , accountsContainersVersionsList + , AccountsContainersVersionsList + + -- * Request Lenses + , accQuotaUser + , accPrettyPrint + , accContainerId + , accUserIp + , accHeaders + , accAccountId + , accKey + , accOauthToken + , accFields + , accAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsList@ which the +-- 'AccountsContainersVersionsList' request conforms to. +type AccountsContainersVersionsListAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + QueryParam "headers" Bool :> + Get '[JSON] ListContainerVersionsResponse + +-- | Lists all Container Versions of a GTM Container. +-- +-- /See:/ 'accountsContainersVersionsList' smart constructor. +data AccountsContainersVersionsList = AccountsContainersVersionsList + { _accQuotaUser :: !(Maybe Text) + , _accPrettyPrint :: !Bool + , _accContainerId :: !Text + , _accUserIp :: !(Maybe Text) + , _accHeaders :: !Bool + , _accAccountId :: !Text + , _accKey :: !(Maybe Text) + , _accOauthToken :: !(Maybe Text) + , _accFields :: !(Maybe Text) + , _accAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'accQuotaUser' +-- +-- * 'accPrettyPrint' +-- +-- * 'accContainerId' +-- +-- * 'accUserIp' +-- +-- * 'accHeaders' +-- +-- * 'accAccountId' +-- +-- * 'accKey' +-- +-- * 'accOauthToken' +-- +-- * 'accFields' +-- +-- * 'accAlt' +accountsContainersVersionsList + :: Text -- ^ 'containerId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsList +accountsContainersVersionsList pAccContainerId_ pAccAccountId_ = + AccountsContainersVersionsList + { _accQuotaUser = Nothing + , _accPrettyPrint = True + , _accContainerId = pAccContainerId_ + , _accUserIp = Nothing + , _accHeaders = False + , _accAccountId = pAccAccountId_ + , _accKey = Nothing + , _accOauthToken = Nothing + , _accFields = Nothing + , _accAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +accQuotaUser :: Lens' AccountsContainersVersionsList' (Maybe Text) +accQuotaUser + = lens _accQuotaUser (\ s a -> s{_accQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +accPrettyPrint :: Lens' AccountsContainersVersionsList' Bool +accPrettyPrint + = lens _accPrettyPrint + (\ s a -> s{_accPrettyPrint = a}) + +-- | The GTM Container ID. +accContainerId :: Lens' AccountsContainersVersionsList' Text +accContainerId + = lens _accContainerId + (\ s a -> s{_accContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +accUserIp :: Lens' AccountsContainersVersionsList' (Maybe Text) +accUserIp + = lens _accUserIp (\ s a -> s{_accUserIp = a}) + +-- | Retrieve headers only when true. +accHeaders :: Lens' AccountsContainersVersionsList' Bool +accHeaders + = lens _accHeaders (\ s a -> s{_accHeaders = a}) + +-- | The GTM Account ID. +accAccountId :: Lens' AccountsContainersVersionsList' Text +accAccountId + = lens _accAccountId (\ s a -> s{_accAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +accKey :: Lens' AccountsContainersVersionsList' (Maybe Text) +accKey = lens _accKey (\ s a -> s{_accKey = a}) + +-- | OAuth 2.0 token for the current user. +accOauthToken :: Lens' AccountsContainersVersionsList' (Maybe Text) +accOauthToken + = lens _accOauthToken + (\ s a -> s{_accOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +accFields :: Lens' AccountsContainersVersionsList' (Maybe Text) +accFields + = lens _accFields (\ s a -> s{_accFields = a}) + +-- | Data format for the response. +accAlt :: Lens' AccountsContainersVersionsList' Text +accAlt = lens _accAlt (\ s a -> s{_accAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsList' where + type Rs AccountsContainersVersionsList' = + ListContainerVersionsResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsList{..} + = go _accQuotaUser _accPrettyPrint _accContainerId + _accUserIp + (Just _accHeaders) + _accAccountId + _accKey + _accOauthToken + _accFields + _accAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Publish.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Publish.hs new file mode 100644 index 000000000..4d9a7a6ef --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Publish.hs @@ -0,0 +1,209 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Publish +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Publishes a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsPublish@. +module TagManager.Accounts.Containers.Versions.Publish + ( + -- * REST Resource + AccountsContainersVersionsPublishAPI + + -- * Creating a Request + , accountsContainersVersionsPublish + , AccountsContainersVersionsPublish + + -- * Request Lenses + , acvpQuotaUser + , acvpPrettyPrint + , acvpContainerId + , acvpUserIp + , acvpFingerprint + , acvpContainerVersionId + , acvpAccountId + , acvpKey + , acvpOauthToken + , acvpFields + , acvpAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsPublish@ which the +-- 'AccountsContainersVersionsPublish' request conforms to. +type AccountsContainersVersionsPublishAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + "publish" :> + QueryParam "fingerprint" Text :> + Post '[JSON] PublishContainerVersionResponse + +-- | Publishes a Container Version. +-- +-- /See:/ 'accountsContainersVersionsPublish' smart constructor. +data AccountsContainersVersionsPublish = AccountsContainersVersionsPublish + { _acvpQuotaUser :: !(Maybe Text) + , _acvpPrettyPrint :: !Bool + , _acvpContainerId :: !Text + , _acvpUserIp :: !(Maybe Text) + , _acvpFingerprint :: !(Maybe Text) + , _acvpContainerVersionId :: !Text + , _acvpAccountId :: !Text + , _acvpKey :: !(Maybe Text) + , _acvpOauthToken :: !(Maybe Text) + , _acvpFields :: !(Maybe Text) + , _acvpAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsPublish'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvpQuotaUser' +-- +-- * 'acvpPrettyPrint' +-- +-- * 'acvpContainerId' +-- +-- * 'acvpUserIp' +-- +-- * 'acvpFingerprint' +-- +-- * 'acvpContainerVersionId' +-- +-- * 'acvpAccountId' +-- +-- * 'acvpKey' +-- +-- * 'acvpOauthToken' +-- +-- * 'acvpFields' +-- +-- * 'acvpAlt' +accountsContainersVersionsPublish + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsPublish +accountsContainersVersionsPublish pAcvpContainerId_ pAcvpContainerVersionId_ pAcvpAccountId_ = + AccountsContainersVersionsPublish + { _acvpQuotaUser = Nothing + , _acvpPrettyPrint = True + , _acvpContainerId = pAcvpContainerId_ + , _acvpUserIp = Nothing + , _acvpFingerprint = Nothing + , _acvpContainerVersionId = pAcvpContainerVersionId_ + , _acvpAccountId = pAcvpAccountId_ + , _acvpKey = Nothing + , _acvpOauthToken = Nothing + , _acvpFields = Nothing + , _acvpAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvpQuotaUser :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpQuotaUser + = lens _acvpQuotaUser + (\ s a -> s{_acvpQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvpPrettyPrint :: Lens' AccountsContainersVersionsPublish' Bool +acvpPrettyPrint + = lens _acvpPrettyPrint + (\ s a -> s{_acvpPrettyPrint = a}) + +-- | The GTM Container ID. +acvpContainerId :: Lens' AccountsContainersVersionsPublish' Text +acvpContainerId + = lens _acvpContainerId + (\ s a -> s{_acvpContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvpUserIp :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpUserIp + = lens _acvpUserIp (\ s a -> s{_acvpUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- container version in storage. +acvpFingerprint :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpFingerprint + = lens _acvpFingerprint + (\ s a -> s{_acvpFingerprint = a}) + +-- | The GTM Container Version ID. +acvpContainerVersionId :: Lens' AccountsContainersVersionsPublish' Text +acvpContainerVersionId + = lens _acvpContainerVersionId + (\ s a -> s{_acvpContainerVersionId = a}) + +-- | The GTM Account ID. +acvpAccountId :: Lens' AccountsContainersVersionsPublish' Text +acvpAccountId + = lens _acvpAccountId + (\ s a -> s{_acvpAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvpKey :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpKey = lens _acvpKey (\ s a -> s{_acvpKey = a}) + +-- | OAuth 2.0 token for the current user. +acvpOauthToken :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpOauthToken + = lens _acvpOauthToken + (\ s a -> s{_acvpOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvpFields :: Lens' AccountsContainersVersionsPublish' (Maybe Text) +acvpFields + = lens _acvpFields (\ s a -> s{_acvpFields = a}) + +-- | Data format for the response. +acvpAlt :: Lens' AccountsContainersVersionsPublish' Text +acvpAlt = lens _acvpAlt (\ s a -> s{_acvpAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsPublish' where + type Rs AccountsContainersVersionsPublish' = + PublishContainerVersionResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsPublish{..} + = go _acvpQuotaUser _acvpPrettyPrint _acvpContainerId + _acvpUserIp + _acvpFingerprint + _acvpContainerVersionId + _acvpAccountId + _acvpKey + _acvpOauthToken + _acvpFields + _acvpAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsPublishAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Restore.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Restore.hs new file mode 100644 index 000000000..c747a6aa7 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Restore.hs @@ -0,0 +1,200 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Restore +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Restores a Container Version. This will overwrite the container\'s +-- current configuration (including its macros, rules and tags). The +-- operation will not have any effect on the version that is being served +-- (i.e. the published version). +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsRestore@. +module TagManager.Accounts.Containers.Versions.Restore + ( + -- * REST Resource + AccountsContainersVersionsRestoreAPI + + -- * Creating a Request + , accountsContainersVersionsRestore + , AccountsContainersVersionsRestore + + -- * Request Lenses + , acvrQuotaUser + , acvrPrettyPrint + , acvrContainerId + , acvrUserIp + , acvrContainerVersionId + , acvrAccountId + , acvrKey + , acvrOauthToken + , acvrFields + , acvrAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsRestore@ which the +-- 'AccountsContainersVersionsRestore' request conforms to. +type AccountsContainersVersionsRestoreAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + "restore" :> Post '[JSON] ContainerVersion + +-- | Restores a Container Version. This will overwrite the container\'s +-- current configuration (including its macros, rules and tags). The +-- operation will not have any effect on the version that is being served +-- (i.e. the published version). +-- +-- /See:/ 'accountsContainersVersionsRestore' smart constructor. +data AccountsContainersVersionsRestore = AccountsContainersVersionsRestore + { _acvrQuotaUser :: !(Maybe Text) + , _acvrPrettyPrint :: !Bool + , _acvrContainerId :: !Text + , _acvrUserIp :: !(Maybe Text) + , _acvrContainerVersionId :: !Text + , _acvrAccountId :: !Text + , _acvrKey :: !(Maybe Text) + , _acvrOauthToken :: !(Maybe Text) + , _acvrFields :: !(Maybe Text) + , _acvrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsRestore'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvrQuotaUser' +-- +-- * 'acvrPrettyPrint' +-- +-- * 'acvrContainerId' +-- +-- * 'acvrUserIp' +-- +-- * 'acvrContainerVersionId' +-- +-- * 'acvrAccountId' +-- +-- * 'acvrKey' +-- +-- * 'acvrOauthToken' +-- +-- * 'acvrFields' +-- +-- * 'acvrAlt' +accountsContainersVersionsRestore + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsRestore +accountsContainersVersionsRestore pAcvrContainerId_ pAcvrContainerVersionId_ pAcvrAccountId_ = + AccountsContainersVersionsRestore + { _acvrQuotaUser = Nothing + , _acvrPrettyPrint = True + , _acvrContainerId = pAcvrContainerId_ + , _acvrUserIp = Nothing + , _acvrContainerVersionId = pAcvrContainerVersionId_ + , _acvrAccountId = pAcvrAccountId_ + , _acvrKey = Nothing + , _acvrOauthToken = Nothing + , _acvrFields = Nothing + , _acvrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvrQuotaUser :: Lens' AccountsContainersVersionsRestore' (Maybe Text) +acvrQuotaUser + = lens _acvrQuotaUser + (\ s a -> s{_acvrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvrPrettyPrint :: Lens' AccountsContainersVersionsRestore' Bool +acvrPrettyPrint + = lens _acvrPrettyPrint + (\ s a -> s{_acvrPrettyPrint = a}) + +-- | The GTM Container ID. +acvrContainerId :: Lens' AccountsContainersVersionsRestore' Text +acvrContainerId + = lens _acvrContainerId + (\ s a -> s{_acvrContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvrUserIp :: Lens' AccountsContainersVersionsRestore' (Maybe Text) +acvrUserIp + = lens _acvrUserIp (\ s a -> s{_acvrUserIp = a}) + +-- | The GTM Container Version ID. +acvrContainerVersionId :: Lens' AccountsContainersVersionsRestore' Text +acvrContainerVersionId + = lens _acvrContainerVersionId + (\ s a -> s{_acvrContainerVersionId = a}) + +-- | The GTM Account ID. +acvrAccountId :: Lens' AccountsContainersVersionsRestore' Text +acvrAccountId + = lens _acvrAccountId + (\ s a -> s{_acvrAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvrKey :: Lens' AccountsContainersVersionsRestore' (Maybe Text) +acvrKey = lens _acvrKey (\ s a -> s{_acvrKey = a}) + +-- | OAuth 2.0 token for the current user. +acvrOauthToken :: Lens' AccountsContainersVersionsRestore' (Maybe Text) +acvrOauthToken + = lens _acvrOauthToken + (\ s a -> s{_acvrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvrFields :: Lens' AccountsContainersVersionsRestore' (Maybe Text) +acvrFields + = lens _acvrFields (\ s a -> s{_acvrFields = a}) + +-- | Data format for the response. +acvrAlt :: Lens' AccountsContainersVersionsRestore' Text +acvrAlt = lens _acvrAlt (\ s a -> s{_acvrAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsRestore' where + type Rs AccountsContainersVersionsRestore' = + ContainerVersion + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsRestore{..} + = go _acvrQuotaUser _acvrPrettyPrint _acvrContainerId + _acvrUserIp + _acvrContainerVersionId + _acvrAccountId + _acvrKey + _acvrOauthToken + _acvrFields + _acvrAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsRestoreAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Undelete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Undelete.hs new file mode 100644 index 000000000..dc70be809 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Undelete.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Undelete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Undeletes a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsUndelete@. +module TagManager.Accounts.Containers.Versions.Undelete + ( + -- * REST Resource + AccountsContainersVersionsUndeleteAPI + + -- * Creating a Request + , accountsContainersVersionsUndelete + , AccountsContainersVersionsUndelete + + -- * Request Lenses + , acvucQuotaUser + , acvucPrettyPrint + , acvucContainerId + , acvucUserIp + , acvucContainerVersionId + , acvucAccountId + , acvucKey + , acvucOauthToken + , acvucFields + , acvucAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsUndelete@ which the +-- 'AccountsContainersVersionsUndelete' request conforms to. +type AccountsContainersVersionsUndeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + "undelete" :> Post '[JSON] ContainerVersion + +-- | Undeletes a Container Version. +-- +-- /See:/ 'accountsContainersVersionsUndelete' smart constructor. +data AccountsContainersVersionsUndelete = AccountsContainersVersionsUndelete + { _acvucQuotaUser :: !(Maybe Text) + , _acvucPrettyPrint :: !Bool + , _acvucContainerId :: !Text + , _acvucUserIp :: !(Maybe Text) + , _acvucContainerVersionId :: !Text + , _acvucAccountId :: !Text + , _acvucKey :: !(Maybe Text) + , _acvucOauthToken :: !(Maybe Text) + , _acvucFields :: !(Maybe Text) + , _acvucAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsUndelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acvucQuotaUser' +-- +-- * 'acvucPrettyPrint' +-- +-- * 'acvucContainerId' +-- +-- * 'acvucUserIp' +-- +-- * 'acvucContainerVersionId' +-- +-- * 'acvucAccountId' +-- +-- * 'acvucKey' +-- +-- * 'acvucOauthToken' +-- +-- * 'acvucFields' +-- +-- * 'acvucAlt' +accountsContainersVersionsUndelete + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsUndelete +accountsContainersVersionsUndelete pAcvucContainerId_ pAcvucContainerVersionId_ pAcvucAccountId_ = + AccountsContainersVersionsUndelete + { _acvucQuotaUser = Nothing + , _acvucPrettyPrint = True + , _acvucContainerId = pAcvucContainerId_ + , _acvucUserIp = Nothing + , _acvucContainerVersionId = pAcvucContainerVersionId_ + , _acvucAccountId = pAcvucAccountId_ + , _acvucKey = Nothing + , _acvucOauthToken = Nothing + , _acvucFields = Nothing + , _acvucAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +acvucQuotaUser :: Lens' AccountsContainersVersionsUndelete' (Maybe Text) +acvucQuotaUser + = lens _acvucQuotaUser + (\ s a -> s{_acvucQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +acvucPrettyPrint :: Lens' AccountsContainersVersionsUndelete' Bool +acvucPrettyPrint + = lens _acvucPrettyPrint + (\ s a -> s{_acvucPrettyPrint = a}) + +-- | The GTM Container ID. +acvucContainerId :: Lens' AccountsContainersVersionsUndelete' Text +acvucContainerId + = lens _acvucContainerId + (\ s a -> s{_acvucContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +acvucUserIp :: Lens' AccountsContainersVersionsUndelete' (Maybe Text) +acvucUserIp + = lens _acvucUserIp (\ s a -> s{_acvucUserIp = a}) + +-- | The GTM Container Version ID. +acvucContainerVersionId :: Lens' AccountsContainersVersionsUndelete' Text +acvucContainerVersionId + = lens _acvucContainerVersionId + (\ s a -> s{_acvucContainerVersionId = a}) + +-- | The GTM Account ID. +acvucAccountId :: Lens' AccountsContainersVersionsUndelete' Text +acvucAccountId + = lens _acvucAccountId + (\ s a -> s{_acvucAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +acvucKey :: Lens' AccountsContainersVersionsUndelete' (Maybe Text) +acvucKey = lens _acvucKey (\ s a -> s{_acvucKey = a}) + +-- | OAuth 2.0 token for the current user. +acvucOauthToken :: Lens' AccountsContainersVersionsUndelete' (Maybe Text) +acvucOauthToken + = lens _acvucOauthToken + (\ s a -> s{_acvucOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +acvucFields :: Lens' AccountsContainersVersionsUndelete' (Maybe Text) +acvucFields + = lens _acvucFields (\ s a -> s{_acvucFields = a}) + +-- | Data format for the response. +acvucAlt :: Lens' AccountsContainersVersionsUndelete' Text +acvucAlt = lens _acvucAlt (\ s a -> s{_acvucAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsUndelete' where + type Rs AccountsContainersVersionsUndelete' = + ContainerVersion + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsUndelete{..} + = go _acvucQuotaUser _acvucPrettyPrint + _acvucContainerId + _acvucUserIp + _acvucContainerVersionId + _acvucAccountId + _acvucKey + _acvucOauthToken + _acvucFields + _acvucAlt + where go + = clientWithRoute + (Proxy :: + Proxy AccountsContainersVersionsUndeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Update.hs new file mode 100644 index 000000000..38ad08864 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Versions/Update.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Containers.Versions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a Container Version. +-- +-- /See:/ for @TagmanagerAccountsContainersVersionsUpdate@. +module TagManager.Accounts.Containers.Versions.Update + ( + -- * REST Resource + AccountsContainersVersionsUpdateAPI + + -- * Creating a Request + , accountsContainersVersionsUpdate + , AccountsContainersVersionsUpdate + + -- * Request Lenses + , aaQuotaUser + , aaPrettyPrint + , aaContainerId + , aaUserIp + , aaFingerprint + , aaContainerVersionId + , aaAccountId + , aaKey + , aaOauthToken + , aaFields + , aaAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsContainersVersionsUpdate@ which the +-- 'AccountsContainersVersionsUpdate' request conforms to. +type AccountsContainersVersionsUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "containers" :> + Capture "containerId" Text :> + "versions" :> + Capture "containerVersionId" Text :> + QueryParam "fingerprint" Text :> + Put '[JSON] ContainerVersion + +-- | Updates a Container Version. +-- +-- /See:/ 'accountsContainersVersionsUpdate' smart constructor. +data AccountsContainersVersionsUpdate = AccountsContainersVersionsUpdate + { _aaQuotaUser :: !(Maybe Text) + , _aaPrettyPrint :: !Bool + , _aaContainerId :: !Text + , _aaUserIp :: !(Maybe Text) + , _aaFingerprint :: !(Maybe Text) + , _aaContainerVersionId :: !Text + , _aaAccountId :: !Text + , _aaKey :: !(Maybe Text) + , _aaOauthToken :: !(Maybe Text) + , _aaFields :: !(Maybe Text) + , _aaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsContainersVersionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaQuotaUser' +-- +-- * 'aaPrettyPrint' +-- +-- * 'aaContainerId' +-- +-- * 'aaUserIp' +-- +-- * 'aaFingerprint' +-- +-- * 'aaContainerVersionId' +-- +-- * 'aaAccountId' +-- +-- * 'aaKey' +-- +-- * 'aaOauthToken' +-- +-- * 'aaFields' +-- +-- * 'aaAlt' +accountsContainersVersionsUpdate + :: Text -- ^ 'containerId' + -> Text -- ^ 'containerVersionId' + -> Text -- ^ 'accountId' + -> AccountsContainersVersionsUpdate +accountsContainersVersionsUpdate pAaContainerId_ pAaContainerVersionId_ pAaAccountId_ = + AccountsContainersVersionsUpdate + { _aaQuotaUser = Nothing + , _aaPrettyPrint = True + , _aaContainerId = pAaContainerId_ + , _aaUserIp = Nothing + , _aaFingerprint = Nothing + , _aaContainerVersionId = pAaContainerVersionId_ + , _aaAccountId = pAaAccountId_ + , _aaKey = Nothing + , _aaOauthToken = Nothing + , _aaFields = Nothing + , _aaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aaQuotaUser :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaQuotaUser + = lens _aaQuotaUser (\ s a -> s{_aaQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aaPrettyPrint :: Lens' AccountsContainersVersionsUpdate' Bool +aaPrettyPrint + = lens _aaPrettyPrint + (\ s a -> s{_aaPrettyPrint = a}) + +-- | The GTM Container ID. +aaContainerId :: Lens' AccountsContainersVersionsUpdate' Text +aaContainerId + = lens _aaContainerId + (\ s a -> s{_aaContainerId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aaUserIp :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaUserIp = lens _aaUserIp (\ s a -> s{_aaUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- container version in storage. +aaFingerprint :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaFingerprint + = lens _aaFingerprint + (\ s a -> s{_aaFingerprint = a}) + +-- | The GTM Container Version ID. +aaContainerVersionId :: Lens' AccountsContainersVersionsUpdate' Text +aaContainerVersionId + = lens _aaContainerVersionId + (\ s a -> s{_aaContainerVersionId = a}) + +-- | The GTM Account ID. +aaAccountId :: Lens' AccountsContainersVersionsUpdate' Text +aaAccountId + = lens _aaAccountId (\ s a -> s{_aaAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aaKey :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaKey = lens _aaKey (\ s a -> s{_aaKey = a}) + +-- | OAuth 2.0 token for the current user. +aaOauthToken :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaOauthToken + = lens _aaOauthToken (\ s a -> s{_aaOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aaFields :: Lens' AccountsContainersVersionsUpdate' (Maybe Text) +aaFields = lens _aaFields (\ s a -> s{_aaFields = a}) + +-- | Data format for the response. +aaAlt :: Lens' AccountsContainersVersionsUpdate' Text +aaAlt = lens _aaAlt (\ s a -> s{_aaAlt = a}) + +instance GoogleRequest + AccountsContainersVersionsUpdate' where + type Rs AccountsContainersVersionsUpdate' = + ContainerVersion + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u + AccountsContainersVersionsUpdate{..} + = go _aaQuotaUser _aaPrettyPrint _aaContainerId + _aaUserIp + _aaFingerprint + _aaContainerVersionId + _aaAccountId + _aaKey + _aaOauthToken + _aaFields + _aaAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsContainersVersionsUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Get.hs new file mode 100644 index 000000000..3a614490b --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Get.hs @@ -0,0 +1,152 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a GTM Account. +-- +-- /See:/ for @TagmanagerAccountsGet@. +module TagManager.Accounts.Get + ( + -- * REST Resource + AccountsGetAPI + + -- * Creating a Request + , accountsGet + , AccountsGet + + -- * Request Lenses + , agQuotaUser + , agPrettyPrint + , agUserIp + , agAccountId + , agKey + , agOauthToken + , agFields + , agAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsGet@ which the +-- 'AccountsGet' request conforms to. +type AccountsGetAPI = + "accounts" :> + Capture "accountId" Text :> Get '[JSON] Account + +-- | Gets a GTM Account. +-- +-- /See:/ 'accountsGet' smart constructor. +data AccountsGet = AccountsGet + { _agQuotaUser :: !(Maybe Text) + , _agPrettyPrint :: !Bool + , _agUserIp :: !(Maybe Text) + , _agAccountId :: !Text + , _agKey :: !(Maybe Text) + , _agOauthToken :: !(Maybe Text) + , _agFields :: !(Maybe Text) + , _agAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'agQuotaUser' +-- +-- * 'agPrettyPrint' +-- +-- * 'agUserIp' +-- +-- * 'agAccountId' +-- +-- * 'agKey' +-- +-- * 'agOauthToken' +-- +-- * 'agFields' +-- +-- * 'agAlt' +accountsGet + :: Text -- ^ 'accountId' + -> AccountsGet +accountsGet pAgAccountId_ = + AccountsGet + { _agQuotaUser = Nothing + , _agPrettyPrint = True + , _agUserIp = Nothing + , _agAccountId = pAgAccountId_ + , _agKey = Nothing + , _agOauthToken = Nothing + , _agFields = Nothing + , _agAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +agQuotaUser :: Lens' AccountsGet' (Maybe Text) +agQuotaUser + = lens _agQuotaUser (\ s a -> s{_agQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +agPrettyPrint :: Lens' AccountsGet' Bool +agPrettyPrint + = lens _agPrettyPrint + (\ s a -> s{_agPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +agUserIp :: Lens' AccountsGet' (Maybe Text) +agUserIp = lens _agUserIp (\ s a -> s{_agUserIp = a}) + +-- | The GTM Account ID. +agAccountId :: Lens' AccountsGet' Text +agAccountId + = lens _agAccountId (\ s a -> s{_agAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +agKey :: Lens' AccountsGet' (Maybe Text) +agKey = lens _agKey (\ s a -> s{_agKey = a}) + +-- | OAuth 2.0 token for the current user. +agOauthToken :: Lens' AccountsGet' (Maybe Text) +agOauthToken + = lens _agOauthToken (\ s a -> s{_agOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +agFields :: Lens' AccountsGet' (Maybe Text) +agFields = lens _agFields (\ s a -> s{_agFields = a}) + +-- | Data format for the response. +agAlt :: Lens' AccountsGet' Text +agAlt = lens _agAlt (\ s a -> s{_agAlt = a}) + +instance GoogleRequest AccountsGet' where + type Rs AccountsGet' = Account + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsGet{..} + = go _agQuotaUser _agPrettyPrint _agUserIp + _agAccountId + _agKey + _agOauthToken + _agFields + _agAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsGetAPI) r u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/List.hs new file mode 100644 index 000000000..031e1c11f --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/List.hs @@ -0,0 +1,139 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists all GTM Accounts that a user has access to. +-- +-- /See:/ for @TagmanagerAccountsList@. +module TagManager.Accounts.List + ( + -- * REST Resource + AccountsListAPI + + -- * Creating a Request + , accountsList + , AccountsList + + -- * Request Lenses + , alQuotaUser + , alPrettyPrint + , alUserIp + , alKey + , alOauthToken + , alFields + , alAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsList@ which the +-- 'AccountsList' request conforms to. +type AccountsListAPI = + "accounts" :> Get '[JSON] ListAccountsResponse + +-- | Lists all GTM Accounts that a user has access to. +-- +-- /See:/ 'accountsList' smart constructor. +data AccountsList = AccountsList + { _alQuotaUser :: !(Maybe Text) + , _alPrettyPrint :: !Bool + , _alUserIp :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alQuotaUser' +-- +-- * 'alPrettyPrint' +-- +-- * 'alUserIp' +-- +-- * 'alKey' +-- +-- * 'alOauthToken' +-- +-- * 'alFields' +-- +-- * 'alAlt' +accountsList + :: AccountsList +accountsList = + AccountsList + { _alQuotaUser = Nothing + , _alPrettyPrint = True + , _alUserIp = Nothing + , _alKey = Nothing + , _alOauthToken = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' AccountsList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' AccountsList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' AccountsList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' AccountsList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' AccountsList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' AccountsList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' AccountsList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest AccountsList' where + type Rs AccountsList' = ListAccountsResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsList{..} + = go _alQuotaUser _alPrettyPrint _alUserIp _alKey + _alOauthToken + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsListAPI) r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Create.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Create.hs new file mode 100644 index 000000000..b9743341c --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Create.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Permissions.Create +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a user\'s Account & Container Permissions. +-- +-- /See:/ for @TagmanagerAccountsPermissionsCreate@. +module TagManager.Accounts.Permissions.Create + ( + -- * REST Resource + AccountsPermissionsCreateAPI + + -- * Creating a Request + , accountsPermissionsCreate + , AccountsPermissionsCreate + + -- * Request Lenses + , apcQuotaUser + , apcPrettyPrint + , apcUserIp + , apcAccountId + , apcKey + , apcOauthToken + , apcFields + , apcAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsPermissionsCreate@ which the +-- 'AccountsPermissionsCreate' request conforms to. +type AccountsPermissionsCreateAPI = + "accounts" :> + Capture "accountId" Text :> + "permissions" :> Post '[JSON] UserAccess + +-- | Creates a user\'s Account & Container Permissions. +-- +-- /See:/ 'accountsPermissionsCreate' smart constructor. +data AccountsPermissionsCreate = AccountsPermissionsCreate + { _apcQuotaUser :: !(Maybe Text) + , _apcPrettyPrint :: !Bool + , _apcUserIp :: !(Maybe Text) + , _apcAccountId :: !Text + , _apcKey :: !(Maybe Text) + , _apcOauthToken :: !(Maybe Text) + , _apcFields :: !(Maybe Text) + , _apcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPermissionsCreate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apcQuotaUser' +-- +-- * 'apcPrettyPrint' +-- +-- * 'apcUserIp' +-- +-- * 'apcAccountId' +-- +-- * 'apcKey' +-- +-- * 'apcOauthToken' +-- +-- * 'apcFields' +-- +-- * 'apcAlt' +accountsPermissionsCreate + :: Text -- ^ 'accountId' + -> AccountsPermissionsCreate +accountsPermissionsCreate pApcAccountId_ = + AccountsPermissionsCreate + { _apcQuotaUser = Nothing + , _apcPrettyPrint = True + , _apcUserIp = Nothing + , _apcAccountId = pApcAccountId_ + , _apcKey = Nothing + , _apcOauthToken = Nothing + , _apcFields = Nothing + , _apcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apcQuotaUser :: Lens' AccountsPermissionsCreate' (Maybe Text) +apcQuotaUser + = lens _apcQuotaUser (\ s a -> s{_apcQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apcPrettyPrint :: Lens' AccountsPermissionsCreate' Bool +apcPrettyPrint + = lens _apcPrettyPrint + (\ s a -> s{_apcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apcUserIp :: Lens' AccountsPermissionsCreate' (Maybe Text) +apcUserIp + = lens _apcUserIp (\ s a -> s{_apcUserIp = a}) + +-- | The GTM Account ID. +apcAccountId :: Lens' AccountsPermissionsCreate' Text +apcAccountId + = lens _apcAccountId (\ s a -> s{_apcAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apcKey :: Lens' AccountsPermissionsCreate' (Maybe Text) +apcKey = lens _apcKey (\ s a -> s{_apcKey = a}) + +-- | OAuth 2.0 token for the current user. +apcOauthToken :: Lens' AccountsPermissionsCreate' (Maybe Text) +apcOauthToken + = lens _apcOauthToken + (\ s a -> s{_apcOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +apcFields :: Lens' AccountsPermissionsCreate' (Maybe Text) +apcFields + = lens _apcFields (\ s a -> s{_apcFields = a}) + +-- | Data format for the response. +apcAlt :: Lens' AccountsPermissionsCreate' Text +apcAlt = lens _apcAlt (\ s a -> s{_apcAlt = a}) + +instance GoogleRequest AccountsPermissionsCreate' + where + type Rs AccountsPermissionsCreate' = UserAccess + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsPermissionsCreate{..} + = go _apcQuotaUser _apcPrettyPrint _apcUserIp + _apcAccountId + _apcKey + _apcOauthToken + _apcFields + _apcAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPermissionsCreateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Delete.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Delete.hs new file mode 100644 index 000000000..a08273f93 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Delete.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Permissions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a user from the account, revoking access to it and all of its +-- containers. +-- +-- /See:/ for @TagmanagerAccountsPermissionsDelete@. +module TagManager.Accounts.Permissions.Delete + ( + -- * REST Resource + AccountsPermissionsDeleteAPI + + -- * Creating a Request + , accountsPermissionsDelete + , AccountsPermissionsDelete + + -- * Request Lenses + , apdQuotaUser + , apdPrettyPrint + , apdUserIp + , apdAccountId + , apdKey + , apdOauthToken + , apdPermissionId + , apdFields + , apdAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsPermissionsDelete@ which the +-- 'AccountsPermissionsDelete' request conforms to. +type AccountsPermissionsDeleteAPI = + "accounts" :> + Capture "accountId" Text :> + "permissions" :> + Capture "permissionId" Text :> Delete '[JSON] () + +-- | Removes a user from the account, revoking access to it and all of its +-- containers. +-- +-- /See:/ 'accountsPermissionsDelete' smart constructor. +data AccountsPermissionsDelete = AccountsPermissionsDelete + { _apdQuotaUser :: !(Maybe Text) + , _apdPrettyPrint :: !Bool + , _apdUserIp :: !(Maybe Text) + , _apdAccountId :: !Text + , _apdKey :: !(Maybe Text) + , _apdOauthToken :: !(Maybe Text) + , _apdPermissionId :: !Text + , _apdFields :: !(Maybe Text) + , _apdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPermissionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apdQuotaUser' +-- +-- * 'apdPrettyPrint' +-- +-- * 'apdUserIp' +-- +-- * 'apdAccountId' +-- +-- * 'apdKey' +-- +-- * 'apdOauthToken' +-- +-- * 'apdPermissionId' +-- +-- * 'apdFields' +-- +-- * 'apdAlt' +accountsPermissionsDelete + :: Text -- ^ 'accountId' + -> Text -- ^ 'permissionId' + -> AccountsPermissionsDelete +accountsPermissionsDelete pApdAccountId_ pApdPermissionId_ = + AccountsPermissionsDelete + { _apdQuotaUser = Nothing + , _apdPrettyPrint = True + , _apdUserIp = Nothing + , _apdAccountId = pApdAccountId_ + , _apdKey = Nothing + , _apdOauthToken = Nothing + , _apdPermissionId = pApdPermissionId_ + , _apdFields = Nothing + , _apdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apdQuotaUser :: Lens' AccountsPermissionsDelete' (Maybe Text) +apdQuotaUser + = lens _apdQuotaUser (\ s a -> s{_apdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apdPrettyPrint :: Lens' AccountsPermissionsDelete' Bool +apdPrettyPrint + = lens _apdPrettyPrint + (\ s a -> s{_apdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apdUserIp :: Lens' AccountsPermissionsDelete' (Maybe Text) +apdUserIp + = lens _apdUserIp (\ s a -> s{_apdUserIp = a}) + +-- | The GTM Account ID. +apdAccountId :: Lens' AccountsPermissionsDelete' Text +apdAccountId + = lens _apdAccountId (\ s a -> s{_apdAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apdKey :: Lens' AccountsPermissionsDelete' (Maybe Text) +apdKey = lens _apdKey (\ s a -> s{_apdKey = a}) + +-- | OAuth 2.0 token for the current user. +apdOauthToken :: Lens' AccountsPermissionsDelete' (Maybe Text) +apdOauthToken + = lens _apdOauthToken + (\ s a -> s{_apdOauthToken = a}) + +-- | The GTM User ID. +apdPermissionId :: Lens' AccountsPermissionsDelete' Text +apdPermissionId + = lens _apdPermissionId + (\ s a -> s{_apdPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +apdFields :: Lens' AccountsPermissionsDelete' (Maybe Text) +apdFields + = lens _apdFields (\ s a -> s{_apdFields = a}) + +-- | Data format for the response. +apdAlt :: Lens' AccountsPermissionsDelete' Text +apdAlt = lens _apdAlt (\ s a -> s{_apdAlt = a}) + +instance GoogleRequest AccountsPermissionsDelete' + where + type Rs AccountsPermissionsDelete' = () + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsPermissionsDelete{..} + = go _apdQuotaUser _apdPrettyPrint _apdUserIp + _apdAccountId + _apdKey + _apdOauthToken + _apdPermissionId + _apdFields + _apdAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPermissionsDeleteAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Get.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Get.hs new file mode 100644 index 000000000..1385c8b69 --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Get.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Permissions.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Gets a user\'s Account & Container Permissions. +-- +-- /See:/ for @TagmanagerAccountsPermissionsGet@. +module TagManager.Accounts.Permissions.Get + ( + -- * REST Resource + AccountsPermissionsGetAPI + + -- * Creating a Request + , accountsPermissionsGet + , AccountsPermissionsGet + + -- * Request Lenses + , apgQuotaUser + , apgPrettyPrint + , apgUserIp + , apgAccountId + , apgKey + , apgOauthToken + , apgPermissionId + , apgFields + , apgAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsPermissionsGet@ which the +-- 'AccountsPermissionsGet' request conforms to. +type AccountsPermissionsGetAPI = + "accounts" :> + Capture "accountId" Text :> + "permissions" :> + Capture "permissionId" Text :> Get '[JSON] UserAccess + +-- | Gets a user\'s Account & Container Permissions. +-- +-- /See:/ 'accountsPermissionsGet' smart constructor. +data AccountsPermissionsGet = AccountsPermissionsGet + { _apgQuotaUser :: !(Maybe Text) + , _apgPrettyPrint :: !Bool + , _apgUserIp :: !(Maybe Text) + , _apgAccountId :: !Text + , _apgKey :: !(Maybe Text) + , _apgOauthToken :: !(Maybe Text) + , _apgPermissionId :: !Text + , _apgFields :: !(Maybe Text) + , _apgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPermissionsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apgQuotaUser' +-- +-- * 'apgPrettyPrint' +-- +-- * 'apgUserIp' +-- +-- * 'apgAccountId' +-- +-- * 'apgKey' +-- +-- * 'apgOauthToken' +-- +-- * 'apgPermissionId' +-- +-- * 'apgFields' +-- +-- * 'apgAlt' +accountsPermissionsGet + :: Text -- ^ 'accountId' + -> Text -- ^ 'permissionId' + -> AccountsPermissionsGet +accountsPermissionsGet pApgAccountId_ pApgPermissionId_ = + AccountsPermissionsGet + { _apgQuotaUser = Nothing + , _apgPrettyPrint = True + , _apgUserIp = Nothing + , _apgAccountId = pApgAccountId_ + , _apgKey = Nothing + , _apgOauthToken = Nothing + , _apgPermissionId = pApgPermissionId_ + , _apgFields = Nothing + , _apgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apgQuotaUser :: Lens' AccountsPermissionsGet' (Maybe Text) +apgQuotaUser + = lens _apgQuotaUser (\ s a -> s{_apgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apgPrettyPrint :: Lens' AccountsPermissionsGet' Bool +apgPrettyPrint + = lens _apgPrettyPrint + (\ s a -> s{_apgPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apgUserIp :: Lens' AccountsPermissionsGet' (Maybe Text) +apgUserIp + = lens _apgUserIp (\ s a -> s{_apgUserIp = a}) + +-- | The GTM Account ID. +apgAccountId :: Lens' AccountsPermissionsGet' Text +apgAccountId + = lens _apgAccountId (\ s a -> s{_apgAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apgKey :: Lens' AccountsPermissionsGet' (Maybe Text) +apgKey = lens _apgKey (\ s a -> s{_apgKey = a}) + +-- | OAuth 2.0 token for the current user. +apgOauthToken :: Lens' AccountsPermissionsGet' (Maybe Text) +apgOauthToken + = lens _apgOauthToken + (\ s a -> s{_apgOauthToken = a}) + +-- | The GTM User ID. +apgPermissionId :: Lens' AccountsPermissionsGet' Text +apgPermissionId + = lens _apgPermissionId + (\ s a -> s{_apgPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +apgFields :: Lens' AccountsPermissionsGet' (Maybe Text) +apgFields + = lens _apgFields (\ s a -> s{_apgFields = a}) + +-- | Data format for the response. +apgAlt :: Lens' AccountsPermissionsGet' Text +apgAlt = lens _apgAlt (\ s a -> s{_apgAlt = a}) + +instance GoogleRequest AccountsPermissionsGet' where + type Rs AccountsPermissionsGet' = UserAccess + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsPermissionsGet{..} + = go _apgQuotaUser _apgPrettyPrint _apgUserIp + _apgAccountId + _apgKey + _apgOauthToken + _apgPermissionId + _apgFields + _apgAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPermissionsGetAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/List.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/List.hs new file mode 100644 index 000000000..d73311aaa --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/List.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Permissions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List all users that have access to the account along with Account and +-- Container Permissions granted to each of them. +-- +-- /See:/ for @TagmanagerAccountsPermissionsList@. +module TagManager.Accounts.Permissions.List + ( + -- * REST Resource + AccountsPermissionsListAPI + + -- * Creating a Request + , accountsPermissionsList + , AccountsPermissionsList + + -- * Request Lenses + , aplQuotaUser + , aplPrettyPrint + , aplUserIp + , aplAccountId + , aplKey + , aplOauthToken + , aplFields + , aplAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsPermissionsList@ which the +-- 'AccountsPermissionsList' request conforms to. +type AccountsPermissionsListAPI = + "accounts" :> + Capture "accountId" Text :> + "permissions" :> Get '[JSON] ListAccountUsersResponse + +-- | List all users that have access to the account along with Account and +-- Container Permissions granted to each of them. +-- +-- /See:/ 'accountsPermissionsList' smart constructor. +data AccountsPermissionsList = AccountsPermissionsList + { _aplQuotaUser :: !(Maybe Text) + , _aplPrettyPrint :: !Bool + , _aplUserIp :: !(Maybe Text) + , _aplAccountId :: !Text + , _aplKey :: !(Maybe Text) + , _aplOauthToken :: !(Maybe Text) + , _aplFields :: !(Maybe Text) + , _aplAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPermissionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aplQuotaUser' +-- +-- * 'aplPrettyPrint' +-- +-- * 'aplUserIp' +-- +-- * 'aplAccountId' +-- +-- * 'aplKey' +-- +-- * 'aplOauthToken' +-- +-- * 'aplFields' +-- +-- * 'aplAlt' +accountsPermissionsList + :: Text -- ^ 'accountId' + -> AccountsPermissionsList +accountsPermissionsList pAplAccountId_ = + AccountsPermissionsList + { _aplQuotaUser = Nothing + , _aplPrettyPrint = True + , _aplUserIp = Nothing + , _aplAccountId = pAplAccountId_ + , _aplKey = Nothing + , _aplOauthToken = Nothing + , _aplFields = Nothing + , _aplAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aplQuotaUser :: Lens' AccountsPermissionsList' (Maybe Text) +aplQuotaUser + = lens _aplQuotaUser (\ s a -> s{_aplQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +aplPrettyPrint :: Lens' AccountsPermissionsList' Bool +aplPrettyPrint + = lens _aplPrettyPrint + (\ s a -> s{_aplPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aplUserIp :: Lens' AccountsPermissionsList' (Maybe Text) +aplUserIp + = lens _aplUserIp (\ s a -> s{_aplUserIp = a}) + +-- | The GTM Account ID. \'required tagmanager.accounts.permissions.list +aplAccountId :: Lens' AccountsPermissionsList' Text +aplAccountId + = lens _aplAccountId (\ s a -> s{_aplAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aplKey :: Lens' AccountsPermissionsList' (Maybe Text) +aplKey = lens _aplKey (\ s a -> s{_aplKey = a}) + +-- | OAuth 2.0 token for the current user. +aplOauthToken :: Lens' AccountsPermissionsList' (Maybe Text) +aplOauthToken + = lens _aplOauthToken + (\ s a -> s{_aplOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aplFields :: Lens' AccountsPermissionsList' (Maybe Text) +aplFields + = lens _aplFields (\ s a -> s{_aplFields = a}) + +-- | Data format for the response. +aplAlt :: Lens' AccountsPermissionsList' Text +aplAlt = lens _aplAlt (\ s a -> s{_aplAlt = a}) + +instance GoogleRequest AccountsPermissionsList' where + type Rs AccountsPermissionsList' = + ListAccountUsersResponse + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsPermissionsList{..} + = go _aplQuotaUser _aplPrettyPrint _aplUserIp + _aplAccountId + _aplKey + _aplOauthToken + _aplFields + _aplAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPermissionsListAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Update.hs new file mode 100644 index 000000000..3f90a01cc --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Permissions/Update.hs @@ -0,0 +1,174 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Permissions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a user\'s Account & Container Permissions. +-- +-- /See:/ for @TagmanagerAccountsPermissionsUpdate@. +module TagManager.Accounts.Permissions.Update + ( + -- * REST Resource + AccountsPermissionsUpdateAPI + + -- * Creating a Request + , accountsPermissionsUpdate + , AccountsPermissionsUpdate + + -- * Request Lenses + , apuQuotaUser + , apuPrettyPrint + , apuUserIp + , apuAccountId + , apuKey + , apuOauthToken + , apuPermissionId + , apuFields + , apuAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsPermissionsUpdate@ which the +-- 'AccountsPermissionsUpdate' request conforms to. +type AccountsPermissionsUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + "permissions" :> + Capture "permissionId" Text :> Put '[JSON] UserAccess + +-- | Updates a user\'s Account & Container Permissions. +-- +-- /See:/ 'accountsPermissionsUpdate' smart constructor. +data AccountsPermissionsUpdate = AccountsPermissionsUpdate + { _apuQuotaUser :: !(Maybe Text) + , _apuPrettyPrint :: !Bool + , _apuUserIp :: !(Maybe Text) + , _apuAccountId :: !Text + , _apuKey :: !(Maybe Text) + , _apuOauthToken :: !(Maybe Text) + , _apuPermissionId :: !Text + , _apuFields :: !(Maybe Text) + , _apuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsPermissionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apuQuotaUser' +-- +-- * 'apuPrettyPrint' +-- +-- * 'apuUserIp' +-- +-- * 'apuAccountId' +-- +-- * 'apuKey' +-- +-- * 'apuOauthToken' +-- +-- * 'apuPermissionId' +-- +-- * 'apuFields' +-- +-- * 'apuAlt' +accountsPermissionsUpdate + :: Text -- ^ 'accountId' + -> Text -- ^ 'permissionId' + -> AccountsPermissionsUpdate +accountsPermissionsUpdate pApuAccountId_ pApuPermissionId_ = + AccountsPermissionsUpdate + { _apuQuotaUser = Nothing + , _apuPrettyPrint = True + , _apuUserIp = Nothing + , _apuAccountId = pApuAccountId_ + , _apuKey = Nothing + , _apuOauthToken = Nothing + , _apuPermissionId = pApuPermissionId_ + , _apuFields = Nothing + , _apuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +apuQuotaUser :: Lens' AccountsPermissionsUpdate' (Maybe Text) +apuQuotaUser + = lens _apuQuotaUser (\ s a -> s{_apuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +apuPrettyPrint :: Lens' AccountsPermissionsUpdate' Bool +apuPrettyPrint + = lens _apuPrettyPrint + (\ s a -> s{_apuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +apuUserIp :: Lens' AccountsPermissionsUpdate' (Maybe Text) +apuUserIp + = lens _apuUserIp (\ s a -> s{_apuUserIp = a}) + +-- | The GTM Account ID. +apuAccountId :: Lens' AccountsPermissionsUpdate' Text +apuAccountId + = lens _apuAccountId (\ s a -> s{_apuAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +apuKey :: Lens' AccountsPermissionsUpdate' (Maybe Text) +apuKey = lens _apuKey (\ s a -> s{_apuKey = a}) + +-- | OAuth 2.0 token for the current user. +apuOauthToken :: Lens' AccountsPermissionsUpdate' (Maybe Text) +apuOauthToken + = lens _apuOauthToken + (\ s a -> s{_apuOauthToken = a}) + +-- | The GTM User ID. +apuPermissionId :: Lens' AccountsPermissionsUpdate' Text +apuPermissionId + = lens _apuPermissionId + (\ s a -> s{_apuPermissionId = a}) + +-- | Selector specifying which fields to include in a partial response. +apuFields :: Lens' AccountsPermissionsUpdate' (Maybe Text) +apuFields + = lens _apuFields (\ s a -> s{_apuFields = a}) + +-- | Data format for the response. +apuAlt :: Lens' AccountsPermissionsUpdate' Text +apuAlt = lens _apuAlt (\ s a -> s{_apuAlt = a}) + +instance GoogleRequest AccountsPermissionsUpdate' + where + type Rs AccountsPermissionsUpdate' = UserAccess + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsPermissionsUpdate{..} + = go _apuQuotaUser _apuPrettyPrint _apuUserIp + _apuAccountId + _apuKey + _apuOauthToken + _apuPermissionId + _apuFields + _apuAlt + where go + = clientWithRoute + (Proxy :: Proxy AccountsPermissionsUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs new file mode 100644 index 000000000..1b51c09ec --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Update.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.TagManager.Accounts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a GTM Account. +-- +-- /See:/ for @TagmanagerAccountsUpdate@. +module TagManager.Accounts.Update + ( + -- * REST Resource + AccountsUpdateAPI + + -- * Creating a Request + , accountsUpdate + , AccountsUpdate + + -- * Request Lenses + , auQuotaUser + , auPrettyPrint + , auUserIp + , auFingerprint + , auAccountId + , auKey + , auOauthToken + , auFields + , auAlt + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types + +-- | A resource alias for @TagmanagerAccountsUpdate@ which the +-- 'AccountsUpdate' request conforms to. +type AccountsUpdateAPI = + "accounts" :> + Capture "accountId" Text :> + QueryParam "fingerprint" Text :> Put '[JSON] Account + +-- | Updates a GTM Account. +-- +-- /See:/ 'accountsUpdate' smart constructor. +data AccountsUpdate = AccountsUpdate + { _auQuotaUser :: !(Maybe Text) + , _auPrettyPrint :: !Bool + , _auUserIp :: !(Maybe Text) + , _auFingerprint :: !(Maybe Text) + , _auAccountId :: !Text + , _auKey :: !(Maybe Text) + , _auOauthToken :: !(Maybe Text) + , _auFields :: !(Maybe Text) + , _auAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'auQuotaUser' +-- +-- * 'auPrettyPrint' +-- +-- * 'auUserIp' +-- +-- * 'auFingerprint' +-- +-- * 'auAccountId' +-- +-- * 'auKey' +-- +-- * 'auOauthToken' +-- +-- * 'auFields' +-- +-- * 'auAlt' +accountsUpdate + :: Text -- ^ 'accountId' + -> AccountsUpdate +accountsUpdate pAuAccountId_ = + AccountsUpdate + { _auQuotaUser = Nothing + , _auPrettyPrint = True + , _auUserIp = Nothing + , _auFingerprint = Nothing + , _auAccountId = pAuAccountId_ + , _auKey = Nothing + , _auOauthToken = Nothing + , _auFields = Nothing + , _auAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +auQuotaUser :: Lens' AccountsUpdate' (Maybe Text) +auQuotaUser + = lens _auQuotaUser (\ s a -> s{_auQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +auPrettyPrint :: Lens' AccountsUpdate' Bool +auPrettyPrint + = lens _auPrettyPrint + (\ s a -> s{_auPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +auUserIp :: Lens' AccountsUpdate' (Maybe Text) +auUserIp = lens _auUserIp (\ s a -> s{_auUserIp = a}) + +-- | When provided, this fingerprint must match the fingerprint of the +-- account in storage. +auFingerprint :: Lens' AccountsUpdate' (Maybe Text) +auFingerprint + = lens _auFingerprint + (\ s a -> s{_auFingerprint = a}) + +-- | The GTM Account ID. +auAccountId :: Lens' AccountsUpdate' Text +auAccountId + = lens _auAccountId (\ s a -> s{_auAccountId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +auKey :: Lens' AccountsUpdate' (Maybe Text) +auKey = lens _auKey (\ s a -> s{_auKey = a}) + +-- | OAuth 2.0 token for the current user. +auOauthToken :: Lens' AccountsUpdate' (Maybe Text) +auOauthToken + = lens _auOauthToken (\ s a -> s{_auOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +auFields :: Lens' AccountsUpdate' (Maybe Text) +auFields = lens _auFields (\ s a -> s{_auFields = a}) + +-- | Data format for the response. +auAlt :: Lens' AccountsUpdate' Text +auAlt = lens _auAlt (\ s a -> s{_auAlt = a}) + +instance GoogleRequest AccountsUpdate' where + type Rs AccountsUpdate' = Account + request = requestWithRoute defReq tagManagerURL + requestWithRoute r u AccountsUpdate{..} + = go _auQuotaUser _auPrettyPrint _auUserIp + _auFingerprint + _auAccountId + _auKey + _auOauthToken + _auFields + _auAlt + where go + = clientWithRoute (Proxy :: Proxy AccountsUpdateAPI) + r + u diff --git a/gogol-tagmanager/gen/Network/Google/TagManager.hs b/gogol-tagmanager/gen/Network/Google/TagManager.hs new file mode 100644 index 000000000..613acbdbd --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/TagManager.hs @@ -0,0 +1,534 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.TagManager +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | API for accessing Tag Manager accounts and containers. +-- +-- /See:/ +module Network.Google.TagManager + ( + -- * API + TagManagerAPI + , tagManagerAPI + , tagManagerURL + + -- * Service Methods + + -- * REST Resources + + -- ** TagmanagerAccountsContainersCreate + , module TagManager.Accounts.Containers.Create + + -- ** TagmanagerAccountsContainersDelete + , module TagManager.Accounts.Containers.Delete + + -- ** TagmanagerAccountsContainersFoldersCreate + , module TagManager.Accounts.Containers.Folders.Create + + -- ** TagmanagerAccountsContainersFoldersDelete + , module TagManager.Accounts.Containers.Folders.Delete + + -- ** TagmanagerAccountsContainersFoldersEntitiesList + , module TagManager.Accounts.Containers.Folders.Entities.List + + -- ** TagmanagerAccountsContainersFoldersGet + , module TagManager.Accounts.Containers.Folders.Get + + -- ** TagmanagerAccountsContainersFoldersList + , module TagManager.Accounts.Containers.Folders.List + + -- ** TagmanagerAccountsContainersFoldersUpdate + , module TagManager.Accounts.Containers.Folders.Update + + -- ** TagmanagerAccountsContainersGet + , module TagManager.Accounts.Containers.Get + + -- ** TagmanagerAccountsContainersList + , module TagManager.Accounts.Containers.List + + -- ** TagmanagerAccountsContainersMACrosCreate + , module TagManager.Accounts.Containers.MACros.Create + + -- ** TagmanagerAccountsContainersMACrosDelete + , module TagManager.Accounts.Containers.MACros.Delete + + -- ** TagmanagerAccountsContainersMACrosGet + , module TagManager.Accounts.Containers.MACros.Get + + -- ** TagmanagerAccountsContainersMACrosList + , module TagManager.Accounts.Containers.MACros.List + + -- ** TagmanagerAccountsContainersMACrosUpdate + , module TagManager.Accounts.Containers.MACros.Update + + -- ** TagmanagerAccountsContainersMove_foldersUpdate + , module TagManager.Accounts.Containers.Move_folders.Update + + -- ** TagmanagerAccountsContainersRulesCreate + , module TagManager.Accounts.Containers.Rules.Create + + -- ** TagmanagerAccountsContainersRulesDelete + , module TagManager.Accounts.Containers.Rules.Delete + + -- ** TagmanagerAccountsContainersRulesGet + , module TagManager.Accounts.Containers.Rules.Get + + -- ** TagmanagerAccountsContainersRulesList + , module TagManager.Accounts.Containers.Rules.List + + -- ** TagmanagerAccountsContainersRulesUpdate + , module TagManager.Accounts.Containers.Rules.Update + + -- ** TagmanagerAccountsContainersTagsCreate + , module TagManager.Accounts.Containers.Tags.Create + + -- ** TagmanagerAccountsContainersTagsDelete + , module TagManager.Accounts.Containers.Tags.Delete + + -- ** TagmanagerAccountsContainersTagsGet + , module TagManager.Accounts.Containers.Tags.Get + + -- ** TagmanagerAccountsContainersTagsList + , module TagManager.Accounts.Containers.Tags.List + + -- ** TagmanagerAccountsContainersTagsUpdate + , module TagManager.Accounts.Containers.Tags.Update + + -- ** TagmanagerAccountsContainersTriggersCreate + , module TagManager.Accounts.Containers.Triggers.Create + + -- ** TagmanagerAccountsContainersTriggersDelete + , module TagManager.Accounts.Containers.Triggers.Delete + + -- ** TagmanagerAccountsContainersTriggersGet + , module TagManager.Accounts.Containers.Triggers.Get + + -- ** TagmanagerAccountsContainersTriggersList + , module TagManager.Accounts.Containers.Triggers.List + + -- ** TagmanagerAccountsContainersTriggersUpdate + , module TagManager.Accounts.Containers.Triggers.Update + + -- ** TagmanagerAccountsContainersUpdate + , module TagManager.Accounts.Containers.Update + + -- ** TagmanagerAccountsContainersVariablesCreate + , module TagManager.Accounts.Containers.Variables.Create + + -- ** TagmanagerAccountsContainersVariablesDelete + , module TagManager.Accounts.Containers.Variables.Delete + + -- ** TagmanagerAccountsContainersVariablesGet + , module TagManager.Accounts.Containers.Variables.Get + + -- ** TagmanagerAccountsContainersVariablesList + , module TagManager.Accounts.Containers.Variables.List + + -- ** TagmanagerAccountsContainersVariablesUpdate + , module TagManager.Accounts.Containers.Variables.Update + + -- ** TagmanagerAccountsContainersVersionsCreate + , module TagManager.Accounts.Containers.Versions.Create + + -- ** TagmanagerAccountsContainersVersionsDelete + , module TagManager.Accounts.Containers.Versions.Delete + + -- ** TagmanagerAccountsContainersVersionsGet + , module TagManager.Accounts.Containers.Versions.Get + + -- ** TagmanagerAccountsContainersVersionsList + , module TagManager.Accounts.Containers.Versions.List + + -- ** TagmanagerAccountsContainersVersionsPublish + , module TagManager.Accounts.Containers.Versions.Publish + + -- ** TagmanagerAccountsContainersVersionsRestore + , module TagManager.Accounts.Containers.Versions.Restore + + -- ** TagmanagerAccountsContainersVersionsUndelete + , module TagManager.Accounts.Containers.Versions.Undelete + + -- ** TagmanagerAccountsContainersVersionsUpdate + , module TagManager.Accounts.Containers.Versions.Update + + -- ** TagmanagerAccountsGet + , module TagManager.Accounts.Get + + -- ** TagmanagerAccountsList + , module TagManager.Accounts.List + + -- ** TagmanagerAccountsPermissionsCreate + , module TagManager.Accounts.Permissions.Create + + -- ** TagmanagerAccountsPermissionsDelete + , module TagManager.Accounts.Permissions.Delete + + -- ** TagmanagerAccountsPermissionsGet + , module TagManager.Accounts.Permissions.Get + + -- ** TagmanagerAccountsPermissionsList + , module TagManager.Accounts.Permissions.List + + -- ** TagmanagerAccountsPermissionsUpdate + , module TagManager.Accounts.Permissions.Update + + -- ** TagmanagerAccountsUpdate + , module TagManager.Accounts.Update + + -- * Types + + -- ** ListFoldersResponse + , ListFoldersResponse + , listFoldersResponse + , lfrFolders + + -- ** ListVariablesResponse + , ListVariablesResponse + , listVariablesResponse + , lvrVariables + + -- ** ListRulesResponse + , ListRulesResponse + , listRulesResponse + , lrrRules + + -- ** PublishContainerVersionResponse + , PublishContainerVersionResponse + , publishContainerVersionResponse + , pcvrCompilerError + , pcvrContainerVersion + + -- ** MACro + , MACro + , mACro + , macScheduleEndMs + , macParentFolderId + , macContainerId + , macDisablingRuleId + , macFingerprint + , macAccountId + , macName + , macEnablingRuleId + , macMacroId + , macType + , macScheduleStartMs + , macNotes + , macParameter + + -- ** Tag + , Tag + , tag + , tagBlockingTriggerId + , tagScheduleEndMs + , tagParentFolderId + , tagLiveOnly + , tagContainerId + , tagPriority + , tagTeardownTag + , tagFingerprint + , tagTagFiringOption + , tagAccountId + , tagTagId + , tagName + , tagBlockingRuleId + , tagSetupTag + , tagFiringTriggerId + , tagType + , tagScheduleStartMs + , tagNotes + , tagFiringRuleId + , tagParameter + + -- ** TeardownTag + , TeardownTag + , teardownTag + , ttStopTeardownOnFailure + , ttTagName + + -- ** CreateContainerVersionResponse + , CreateContainerVersionResponse + , createContainerVersionResponse + , ccvrCompilerError + , ccvrContainerVersion + + -- ** ListTriggersResponse + , ListTriggersResponse + , listTriggersResponse + , ltrTriggers + + -- ** CreateContainerVersionRequestVersionOptions + , CreateContainerVersionRequestVersionOptions + , createContainerVersionRequestVersionOptions + , ccvrvoName + , ccvrvoQuickPreview + , ccvrvoNotes + + -- ** ContainerVersionHeader + , ContainerVersionHeader + , containerVersionHeader + , cvhNumTags + , cvhNumMacros + , cvhContainerId + , cvhContainerVersionId + , cvhAccountId + , cvhName + , cvhNumTriggers + , cvhDeleted + , cvhNumRules + , cvhNumVariables + + -- ** AccountAccess + , AccountAccess + , accountAccess + , aaPermission + + -- ** UserAccess + , UserAccess + , userAccess + , uaAccountAccess + , uaAccountId + , uaEmailAddress + , uaContainerAccess + , uaPermissionId + + -- ** ListAccountsResponse + , ListAccountsResponse + , listAccountsResponse + , larAccounts + + -- ** Variable + , Variable + , variable + , vScheduleEndMs + , vParentFolderId + , vContainerId + , vFingerprint + , vVariableId + , vAccountId + , vDisablingTriggerId + , vName + , vType + , vScheduleStartMs + , vNotes + , vEnablingTriggerId + , vParameter + + -- ** Rule + , Rule + , rule + , rContainerId + , rFingerprint + , rRuleId + , rAccountId + , rName + , rNotes + , rCondition + + -- ** Folder + , Folder + , folder + , fContainerId + , fFingerprint + , fFolderId + , fAccountId + , fName + + -- ** Account + , Account + , account + , aShareData + , aFingerprint + , aAccountId + , aName + + -- ** ListContainerVersionsResponse + , ListContainerVersionsResponse + , listContainerVersionsResponse + , lcvrContainerVersionHeader + , lcvrContainerVersion + + -- ** Container + , Container + , container + , cPublicId + , cUsageContext + , cEnabledBuiltInVariable + , cContainerId + , cFingerprint + , cTimeZoneCountryId + , cAccountId + , cDomainName + , cName + , cNotes + , cTimeZoneId + + -- ** ListAccountUsersResponse + , ListAccountUsersResponse + , listAccountUsersResponse + , laurUserAccess + + -- ** ListContainersResponse + , ListContainersResponse + , listContainersResponse + , lcrContainers + + -- ** SetupTag + , SetupTag + , setupTag + , stTagName + , stStopOnSetupFailure + + -- ** ContainerVersion + , ContainerVersion + , containerVersion + , cvMacro + , cvTag + , cvContainerId + , cvFingerprint + , cvContainerVersionId + , cvRule + , cvFolder + , cvVariable + , cvAccountId + , cvName + , cvContainer + , cvDeleted + , cvTrigger + , cvNotes + + -- ** ListTagsResponse + , ListTagsResponse + , listTagsResponse + , ltrTags + + -- ** ListMACrosResponse + , ListMACrosResponse + , listMACrosResponse + , lmacrMacros + + -- ** Trigger + , Trigger + , trigger + , tCustomEventFilter + , tParentFolderId + , tContainerId + , tTriggerId + , tCheckValidation + , tFingerprint + , tAutoEventFilter + , tUniqueTriggerId + , tAccountId + , tName + , tInterval + , tEnableAllVideos + , tWaitForTagsTimeout + , tLimit + , tFilter + , tType + , tVideoPercentageList + , tEventName + , tWaitForTags + + -- ** Condition + , Condition + , condition + , cType + , cParameter + + -- ** FolderEntities + , FolderEntities + , folderEntities + , feTag + , feVariable + , feTrigger + + -- ** ContainerAccess + , ContainerAccess + , containerAccess + , caContainerId + , caPermission + + -- ** Parameter + , Parameter + , parameter + , pList + , pValue + , pMap + , pKey + , pType + ) where + +import Network.Google.Prelude +import Network.Google.Resource.TagManager.Accounts.Containers.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.Entities.List +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.List +import Network.Google.Resource.TagManager.Accounts.Containers.Folders.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Get +import Network.Google.Resource.TagManager.Accounts.Containers.List +import Network.Google.Resource.TagManager.Accounts.Containers.MACros.Create +import Network.Google.Resource.TagManager.Accounts.Containers.MACros.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.MACros.Get +import Network.Google.Resource.TagManager.Accounts.Containers.MACros.List +import Network.Google.Resource.TagManager.Accounts.Containers.MACros.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Move_folders.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Rules.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Rules.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Rules.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Rules.List +import Network.Google.Resource.TagManager.Accounts.Containers.Rules.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Tags.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Tags.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Tags.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Tags.List +import Network.Google.Resource.TagManager.Accounts.Containers.Tags.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Triggers.List +import Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Variables.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Variables.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Variables.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Variables.List +import Network.Google.Resource.TagManager.Accounts.Containers.Variables.Update +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Create +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Delete +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Get +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.List +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Publish +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Restore +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Undelete +import Network.Google.Resource.TagManager.Accounts.Containers.Versions.Update +import Network.Google.Resource.TagManager.Accounts.Get +import Network.Google.Resource.TagManager.Accounts.List +import Network.Google.Resource.TagManager.Accounts.Permissions.Create +import Network.Google.Resource.TagManager.Accounts.Permissions.Delete +import Network.Google.Resource.TagManager.Accounts.Permissions.Get +import Network.Google.Resource.TagManager.Accounts.Permissions.List +import Network.Google.Resource.TagManager.Accounts.Permissions.Update +import Network.Google.Resource.TagManager.Accounts.Update +import Network.Google.TagManager.Types + +{- $resources +TODO +-} + +type TagManagerAPI = Accounts + +tagManagerAPI :: Proxy TagManagerAPI +tagManagerAPI = Proxy diff --git a/gogol-tagmanager/gen/Network/Google/TagManager/Types.hs b/gogol-tagmanager/gen/Network/Google/TagManager/Types.hs new file mode 100644 index 000000000..cd93844ea --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/TagManager/Types.hs @@ -0,0 +1,310 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.TagManager.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.TagManager.Types + ( + -- * Service URL + tagManagerURL + + -- * ListFoldersResponse + , ListFoldersResponse + , listFoldersResponse + , lfrFolders + + -- * ListVariablesResponse + , ListVariablesResponse + , listVariablesResponse + , lvrVariables + + -- * ListRulesResponse + , ListRulesResponse + , listRulesResponse + , lrrRules + + -- * PublishContainerVersionResponse + , PublishContainerVersionResponse + , publishContainerVersionResponse + , pcvrCompilerError + , pcvrContainerVersion + + -- * MACro + , MACro + , mACro + , macScheduleEndMs + , macParentFolderId + , macContainerId + , macDisablingRuleId + , macFingerprint + , macAccountId + , macName + , macEnablingRuleId + , macMacroId + , macType + , macScheduleStartMs + , macNotes + , macParameter + + -- * Tag + , Tag + , tag + , tagBlockingTriggerId + , tagScheduleEndMs + , tagParentFolderId + , tagLiveOnly + , tagContainerId + , tagPriority + , tagTeardownTag + , tagFingerprint + , tagTagFiringOption + , tagAccountId + , tagTagId + , tagName + , tagBlockingRuleId + , tagSetupTag + , tagFiringTriggerId + , tagType + , tagScheduleStartMs + , tagNotes + , tagFiringRuleId + , tagParameter + + -- * TeardownTag + , TeardownTag + , teardownTag + , ttStopTeardownOnFailure + , ttTagName + + -- * CreateContainerVersionResponse + , CreateContainerVersionResponse + , createContainerVersionResponse + , ccvrCompilerError + , ccvrContainerVersion + + -- * ListTriggersResponse + , ListTriggersResponse + , listTriggersResponse + , ltrTriggers + + -- * CreateContainerVersionRequestVersionOptions + , CreateContainerVersionRequestVersionOptions + , createContainerVersionRequestVersionOptions + , ccvrvoName + , ccvrvoQuickPreview + , ccvrvoNotes + + -- * ContainerVersionHeader + , ContainerVersionHeader + , containerVersionHeader + , cvhNumTags + , cvhNumMacros + , cvhContainerId + , cvhContainerVersionId + , cvhAccountId + , cvhName + , cvhNumTriggers + , cvhDeleted + , cvhNumRules + , cvhNumVariables + + -- * AccountAccess + , AccountAccess + , accountAccess + , aaPermission + + -- * UserAccess + , UserAccess + , userAccess + , uaAccountAccess + , uaAccountId + , uaEmailAddress + , uaContainerAccess + , uaPermissionId + + -- * ListAccountsResponse + , ListAccountsResponse + , listAccountsResponse + , larAccounts + + -- * Variable + , Variable + , variable + , vScheduleEndMs + , vParentFolderId + , vContainerId + , vFingerprint + , vVariableId + , vAccountId + , vDisablingTriggerId + , vName + , vType + , vScheduleStartMs + , vNotes + , vEnablingTriggerId + , vParameter + + -- * Rule + , Rule + , rule + , rContainerId + , rFingerprint + , rRuleId + , rAccountId + , rName + , rNotes + , rCondition + + -- * Folder + , Folder + , folder + , fContainerId + , fFingerprint + , fFolderId + , fAccountId + , fName + + -- * Account + , Account + , account + , aShareData + , aFingerprint + , aAccountId + , aName + + -- * ListContainerVersionsResponse + , ListContainerVersionsResponse + , listContainerVersionsResponse + , lcvrContainerVersionHeader + , lcvrContainerVersion + + -- * Container + , Container + , container + , cPublicId + , cUsageContext + , cEnabledBuiltInVariable + , cContainerId + , cFingerprint + , cTimeZoneCountryId + , cAccountId + , cDomainName + , cName + , cNotes + , cTimeZoneId + + -- * ListAccountUsersResponse + , ListAccountUsersResponse + , listAccountUsersResponse + , laurUserAccess + + -- * ListContainersResponse + , ListContainersResponse + , listContainersResponse + , lcrContainers + + -- * SetupTag + , SetupTag + , setupTag + , stTagName + , stStopOnSetupFailure + + -- * ContainerVersion + , ContainerVersion + , containerVersion + , cvMacro + , cvTag + , cvContainerId + , cvFingerprint + , cvContainerVersionId + , cvRule + , cvFolder + , cvVariable + , cvAccountId + , cvName + , cvContainer + , cvDeleted + , cvTrigger + , cvNotes + + -- * ListTagsResponse + , ListTagsResponse + , listTagsResponse + , ltrTags + + -- * ListMACrosResponse + , ListMACrosResponse + , listMACrosResponse + , lmacrMacros + + -- * Trigger + , Trigger + , trigger + , tCustomEventFilter + , tParentFolderId + , tContainerId + , tTriggerId + , tCheckValidation + , tFingerprint + , tAutoEventFilter + , tUniqueTriggerId + , tAccountId + , tName + , tInterval + , tEnableAllVideos + , tWaitForTagsTimeout + , tLimit + , tFilter + , tType + , tVideoPercentageList + , tEventName + , tWaitForTags + + -- * Condition + , Condition + , condition + , cType + , cParameter + + -- * FolderEntities + , FolderEntities + , folderEntities + , feTag + , feVariable + , feTrigger + + -- * ContainerAccess + , ContainerAccess + , containerAccess + , caContainerId + , caPermission + + -- * Parameter + , Parameter + , parameter + , pList + , pValue + , pMap + , pKey + , pType + ) where + +import Network.Google.Prelude +import Network.Google.TagManager.Types.Product +import Network.Google.TagManager.Types.Sum + +-- | URL referring to version 'v1' of the Tag Manager API. +tagManagerURL :: BaseURL +tagManagerURL + = BaseUrl Https + "https://www.googleapis.com/tagmanager/v1/" + 443 diff --git a/gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs b/gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs new file mode 100644 index 000000000..500faaedb --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs @@ -0,0 +1,2702 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.TagManager.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.TagManager.Types.Product where + +import Network.Google.Prelude +import Network.Google.TagManager.Types.Sum + +-- | List Folders Response. +-- +-- /See:/ 'listFoldersResponse' smart constructor. +newtype ListFoldersResponse = ListFoldersResponse + { _lfrFolders :: Maybe [Maybe Folder] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListFoldersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lfrFolders' +listFoldersResponse + :: ListFoldersResponse +listFoldersResponse = + ListFoldersResponse + { _lfrFolders = Nothing + } + +-- | All GTM Folders of a GTM Container. +lfrFolders :: Lens' ListFoldersResponse [Maybe Folder] +lfrFolders + = lens _lfrFolders (\ s a -> s{_lfrFolders = a}) . + _Default + . _Coerce + +instance FromJSON ListFoldersResponse where + parseJSON + = withObject "ListFoldersResponse" + (\ o -> + ListFoldersResponse <$> (o .:? "folders" .!= mempty)) + +instance ToJSON ListFoldersResponse where + toJSON ListFoldersResponse{..} + = object (catMaybes [("folders" .=) <$> _lfrFolders]) + +-- | List Variables Response. +-- +-- /See:/ 'listVariablesResponse' smart constructor. +newtype ListVariablesResponse = ListVariablesResponse + { _lvrVariables :: Maybe [Maybe Variable] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListVariablesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lvrVariables' +listVariablesResponse + :: ListVariablesResponse +listVariablesResponse = + ListVariablesResponse + { _lvrVariables = Nothing + } + +-- | All GTM Variables of a GTM Container. +lvrVariables :: Lens' ListVariablesResponse [Maybe Variable] +lvrVariables + = lens _lvrVariables (\ s a -> s{_lvrVariables = a}) + . _Default + . _Coerce + +instance FromJSON ListVariablesResponse where + parseJSON + = withObject "ListVariablesResponse" + (\ o -> + ListVariablesResponse <$> + (o .:? "variables" .!= mempty)) + +instance ToJSON ListVariablesResponse where + toJSON ListVariablesResponse{..} + = object + (catMaybes [("variables" .=) <$> _lvrVariables]) + +-- | List Rules Response. +-- +-- /See:/ 'listRulesResponse' smart constructor. +newtype ListRulesResponse = ListRulesResponse + { _lrrRules :: Maybe [Maybe Rule] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListRulesResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrrRules' +listRulesResponse + :: ListRulesResponse +listRulesResponse = + ListRulesResponse + { _lrrRules = Nothing + } + +-- | All GTM Rules of a GTM Container. +lrrRules :: Lens' ListRulesResponse [Maybe Rule] +lrrRules + = lens _lrrRules (\ s a -> s{_lrrRules = a}) . + _Default + . _Coerce + +instance FromJSON ListRulesResponse where + parseJSON + = withObject "ListRulesResponse" + (\ o -> + ListRulesResponse <$> (o .:? "rules" .!= mempty)) + +instance ToJSON ListRulesResponse where + toJSON ListRulesResponse{..} + = object (catMaybes [("rules" .=) <$> _lrrRules]) + +-- | Publish container version response. +-- +-- /See:/ 'publishContainerVersionResponse' smart constructor. +data PublishContainerVersionResponse = PublishContainerVersionResponse + { _pcvrCompilerError :: !(Maybe Bool) + , _pcvrContainerVersion :: !(Maybe (Maybe ContainerVersion)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PublishContainerVersionResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcvrCompilerError' +-- +-- * 'pcvrContainerVersion' +publishContainerVersionResponse + :: PublishContainerVersionResponse +publishContainerVersionResponse = + PublishContainerVersionResponse + { _pcvrCompilerError = Nothing + , _pcvrContainerVersion = Nothing + } + +-- | Compiler errors or not. +pcvrCompilerError :: Lens' PublishContainerVersionResponse (Maybe Bool) +pcvrCompilerError + = lens _pcvrCompilerError + (\ s a -> s{_pcvrCompilerError = a}) + +-- | The container version created. +pcvrContainerVersion :: Lens' PublishContainerVersionResponse (Maybe (Maybe ContainerVersion)) +pcvrContainerVersion + = lens _pcvrContainerVersion + (\ s a -> s{_pcvrContainerVersion = a}) + +instance FromJSON PublishContainerVersionResponse + where + parseJSON + = withObject "PublishContainerVersionResponse" + (\ o -> + PublishContainerVersionResponse <$> + (o .:? "compilerError") <*> + (o .:? "containerVersion")) + +instance ToJSON PublishContainerVersionResponse where + toJSON PublishContainerVersionResponse{..} + = object + (catMaybes + [("compilerError" .=) <$> _pcvrCompilerError, + ("containerVersion" .=) <$> _pcvrContainerVersion]) + +-- | Represents a Google Tag Manager Macro. +-- +-- /See:/ 'mACro' smart constructor. +data MACro = MACro + { _macScheduleEndMs :: !(Maybe Int64) + , _macParentFolderId :: !(Maybe Text) + , _macContainerId :: !(Maybe Text) + , _macDisablingRuleId :: !(Maybe [Text]) + , _macFingerprint :: !(Maybe Text) + , _macAccountId :: !(Maybe Text) + , _macName :: !(Maybe Text) + , _macEnablingRuleId :: !(Maybe [Text]) + , _macMacroId :: !(Maybe Text) + , _macType :: !(Maybe Text) + , _macScheduleStartMs :: !(Maybe Int64) + , _macNotes :: !(Maybe Text) + , _macParameter :: !(Maybe [Maybe Parameter]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MACro' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'macScheduleEndMs' +-- +-- * 'macParentFolderId' +-- +-- * 'macContainerId' +-- +-- * 'macDisablingRuleId' +-- +-- * 'macFingerprint' +-- +-- * 'macAccountId' +-- +-- * 'macName' +-- +-- * 'macEnablingRuleId' +-- +-- * 'macMacroId' +-- +-- * 'macType' +-- +-- * 'macScheduleStartMs' +-- +-- * 'macNotes' +-- +-- * 'macParameter' +mACro + :: MACro +mACro = + MACro + { _macScheduleEndMs = Nothing + , _macParentFolderId = Nothing + , _macContainerId = Nothing + , _macDisablingRuleId = Nothing + , _macFingerprint = Nothing + , _macAccountId = Nothing + , _macName = Nothing + , _macEnablingRuleId = Nothing + , _macMacroId = Nothing + , _macType = Nothing + , _macScheduleStartMs = Nothing + , _macNotes = Nothing + , _macParameter = Nothing + } + +-- | The end timestamp in milliseconds to schedule a macro. +macScheduleEndMs :: Lens' MACro (Maybe Int64) +macScheduleEndMs + = lens _macScheduleEndMs + (\ s a -> s{_macScheduleEndMs = a}) + +-- | Parent folder id. +macParentFolderId :: Lens' MACro (Maybe Text) +macParentFolderId + = lens _macParentFolderId + (\ s a -> s{_macParentFolderId = a}) + +-- | GTM Container ID. +macContainerId :: Lens' MACro (Maybe Text) +macContainerId + = lens _macContainerId + (\ s a -> s{_macContainerId = a}) + +-- | For mobile containers only: A list of rule IDs for disabling conditional +-- macros; the macro is enabled if one of the enabling rules is true while +-- all the disabling rules are false. Treated as an unordered set. +macDisablingRuleId :: Lens' MACro [Text] +macDisablingRuleId + = lens _macDisablingRuleId + (\ s a -> s{_macDisablingRuleId = a}) + . _Default + . _Coerce + +-- | The fingerprint of the GTM Macro as computed at storage time. This value +-- is recomputed whenever the macro is modified. +macFingerprint :: Lens' MACro (Maybe Text) +macFingerprint + = lens _macFingerprint + (\ s a -> s{_macFingerprint = a}) + +-- | GTM Account ID. +macAccountId :: Lens' MACro (Maybe Text) +macAccountId + = lens _macAccountId (\ s a -> s{_macAccountId = a}) + +-- | Macro display name. +macName :: Lens' MACro (Maybe Text) +macName = lens _macName (\ s a -> s{_macName = a}) + +-- | For mobile containers only: A list of rule IDs for enabling conditional +-- macros; the macro is enabled if one of the enabling rules is true while +-- all the disabling rules are false. Treated as an unordered set. +macEnablingRuleId :: Lens' MACro [Text] +macEnablingRuleId + = lens _macEnablingRuleId + (\ s a -> s{_macEnablingRuleId = a}) + . _Default + . _Coerce + +-- | The Macro ID uniquely identifies the GTM Macro. +macMacroId :: Lens' MACro (Maybe Text) +macMacroId + = lens _macMacroId (\ s a -> s{_macMacroId = a}) + +-- | GTM Macro Type. +macType :: Lens' MACro (Maybe Text) +macType = lens _macType (\ s a -> s{_macType = a}) + +-- | The start timestamp in milliseconds to schedule a macro. +macScheduleStartMs :: Lens' MACro (Maybe Int64) +macScheduleStartMs + = lens _macScheduleStartMs + (\ s a -> s{_macScheduleStartMs = a}) + +-- | User notes on how to apply this macro in the container. +macNotes :: Lens' MACro (Maybe Text) +macNotes = lens _macNotes (\ s a -> s{_macNotes = a}) + +-- | The macro\'s parameters. +macParameter :: Lens' MACro [Maybe Parameter] +macParameter + = lens _macParameter (\ s a -> s{_macParameter = a}) + . _Default + . _Coerce + +instance FromJSON MACro where + parseJSON + = withObject "MACro" + (\ o -> + MACro <$> + (o .:? "scheduleEndMs") <*> (o .:? "parentFolderId") + <*> (o .:? "containerId") + <*> (o .:? "disablingRuleId" .!= mempty) + <*> (o .:? "fingerprint") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "enablingRuleId" .!= mempty) + <*> (o .:? "macroId") + <*> (o .:? "type") + <*> (o .:? "scheduleStartMs") + <*> (o .:? "notes") + <*> (o .:? "parameter" .!= mempty)) + +instance ToJSON MACro where + toJSON MACro{..} + = object + (catMaybes + [("scheduleEndMs" .=) <$> _macScheduleEndMs, + ("parentFolderId" .=) <$> _macParentFolderId, + ("containerId" .=) <$> _macContainerId, + ("disablingRuleId" .=) <$> _macDisablingRuleId, + ("fingerprint" .=) <$> _macFingerprint, + ("accountId" .=) <$> _macAccountId, + ("name" .=) <$> _macName, + ("enablingRuleId" .=) <$> _macEnablingRuleId, + ("macroId" .=) <$> _macMacroId, + ("type" .=) <$> _macType, + ("scheduleStartMs" .=) <$> _macScheduleStartMs, + ("notes" .=) <$> _macNotes, + ("parameter" .=) <$> _macParameter]) + +-- | Represents a Google Tag Manager Tag. +-- +-- /See:/ 'tag' smart constructor. +data Tag = Tag + { _tagBlockingTriggerId :: !(Maybe [Text]) + , _tagScheduleEndMs :: !(Maybe Int64) + , _tagParentFolderId :: !(Maybe Text) + , _tagLiveOnly :: !(Maybe Bool) + , _tagContainerId :: !(Maybe Text) + , _tagPriority :: !(Maybe (Maybe Parameter)) + , _tagTeardownTag :: !(Maybe [Maybe TeardownTag]) + , _tagFingerprint :: !(Maybe Text) + , _tagTagFiringOption :: !(Maybe Text) + , _tagAccountId :: !(Maybe Text) + , _tagTagId :: !(Maybe Text) + , _tagName :: !(Maybe Text) + , _tagBlockingRuleId :: !(Maybe [Text]) + , _tagSetupTag :: !(Maybe [Maybe SetupTag]) + , _tagFiringTriggerId :: !(Maybe [Text]) + , _tagType :: !(Maybe Text) + , _tagScheduleStartMs :: !(Maybe Int64) + , _tagNotes :: !(Maybe Text) + , _tagFiringRuleId :: !(Maybe [Text]) + , _tagParameter :: !(Maybe [Maybe Parameter]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Tag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tagBlockingTriggerId' +-- +-- * 'tagScheduleEndMs' +-- +-- * 'tagParentFolderId' +-- +-- * 'tagLiveOnly' +-- +-- * 'tagContainerId' +-- +-- * 'tagPriority' +-- +-- * 'tagTeardownTag' +-- +-- * 'tagFingerprint' +-- +-- * 'tagTagFiringOption' +-- +-- * 'tagAccountId' +-- +-- * 'tagTagId' +-- +-- * 'tagName' +-- +-- * 'tagBlockingRuleId' +-- +-- * 'tagSetupTag' +-- +-- * 'tagFiringTriggerId' +-- +-- * 'tagType' +-- +-- * 'tagScheduleStartMs' +-- +-- * 'tagNotes' +-- +-- * 'tagFiringRuleId' +-- +-- * 'tagParameter' +tag + :: Tag +tag = + Tag + { _tagBlockingTriggerId = Nothing + , _tagScheduleEndMs = Nothing + , _tagParentFolderId = Nothing + , _tagLiveOnly = Nothing + , _tagContainerId = Nothing + , _tagPriority = Nothing + , _tagTeardownTag = Nothing + , _tagFingerprint = Nothing + , _tagTagFiringOption = Nothing + , _tagAccountId = Nothing + , _tagTagId = Nothing + , _tagName = Nothing + , _tagBlockingRuleId = Nothing + , _tagSetupTag = Nothing + , _tagFiringTriggerId = Nothing + , _tagType = Nothing + , _tagScheduleStartMs = Nothing + , _tagNotes = Nothing + , _tagFiringRuleId = Nothing + , _tagParameter = Nothing + } + +-- | Blocking trigger IDs. If any of the listed triggers evaluate to true, +-- the tag will not fire. +tagBlockingTriggerId :: Lens' Tag [Text] +tagBlockingTriggerId + = lens _tagBlockingTriggerId + (\ s a -> s{_tagBlockingTriggerId = a}) + . _Default + . _Coerce + +-- | The end timestamp in milliseconds to schedule a tag. +tagScheduleEndMs :: Lens' Tag (Maybe Int64) +tagScheduleEndMs + = lens _tagScheduleEndMs + (\ s a -> s{_tagScheduleEndMs = a}) + +-- | Parent folder id. +tagParentFolderId :: Lens' Tag (Maybe Text) +tagParentFolderId + = lens _tagParentFolderId + (\ s a -> s{_tagParentFolderId = a}) + +-- | If set to true, this tag will only fire in the live environment (e.g. +-- not in preview or debug mode). +tagLiveOnly :: Lens' Tag (Maybe Bool) +tagLiveOnly + = lens _tagLiveOnly (\ s a -> s{_tagLiveOnly = a}) + +-- | GTM Container ID. +tagContainerId :: Lens' Tag (Maybe Text) +tagContainerId + = lens _tagContainerId + (\ s a -> s{_tagContainerId = a}) + +-- | User defined numeric priority of the tag. Tags are fired asynchronously +-- in order of priority. Tags with higher numeric value fire first. A +-- tag\'s priority can be a positive or negative value. The default value +-- is 0. +tagPriority :: Lens' Tag (Maybe (Maybe Parameter)) +tagPriority + = lens _tagPriority (\ s a -> s{_tagPriority = a}) + +-- | The list of teardown tags. Currently we only allow one. +tagTeardownTag :: Lens' Tag [Maybe TeardownTag] +tagTeardownTag + = lens _tagTeardownTag + (\ s a -> s{_tagTeardownTag = a}) + . _Default + . _Coerce + +-- | The fingerprint of the GTM Tag as computed at storage time. This value +-- is recomputed whenever the tag is modified. +tagFingerprint :: Lens' Tag (Maybe Text) +tagFingerprint + = lens _tagFingerprint + (\ s a -> s{_tagFingerprint = a}) + +-- | Option to fire this tag. +tagTagFiringOption :: Lens' Tag (Maybe Text) +tagTagFiringOption + = lens _tagTagFiringOption + (\ s a -> s{_tagTagFiringOption = a}) + +-- | GTM Account ID. +tagAccountId :: Lens' Tag (Maybe Text) +tagAccountId + = lens _tagAccountId (\ s a -> s{_tagAccountId = a}) + +-- | The Tag ID uniquely identifies the GTM Tag. +tagTagId :: Lens' Tag (Maybe Text) +tagTagId = lens _tagTagId (\ s a -> s{_tagTagId = a}) + +-- | Tag display name. +tagName :: Lens' Tag (Maybe Text) +tagName = lens _tagName (\ s a -> s{_tagName = a}) + +-- | Blocking rule IDs. If any of the listed rules evaluate to true, the tag +-- will not fire. +tagBlockingRuleId :: Lens' Tag [Text] +tagBlockingRuleId + = lens _tagBlockingRuleId + (\ s a -> s{_tagBlockingRuleId = a}) + . _Default + . _Coerce + +-- | The list of setup tags. Currently we only allow one. +tagSetupTag :: Lens' Tag [Maybe SetupTag] +tagSetupTag + = lens _tagSetupTag (\ s a -> s{_tagSetupTag = a}) . + _Default + . _Coerce + +-- | Firing trigger IDs. A tag will fire when any of the listed triggers are +-- true and all of its blockingTriggerIds (if any specified) are false. +tagFiringTriggerId :: Lens' Tag [Text] +tagFiringTriggerId + = lens _tagFiringTriggerId + (\ s a -> s{_tagFiringTriggerId = a}) + . _Default + . _Coerce + +-- | GTM Tag Type. +tagType :: Lens' Tag (Maybe Text) +tagType = lens _tagType (\ s a -> s{_tagType = a}) + +-- | The start timestamp in milliseconds to schedule a tag. +tagScheduleStartMs :: Lens' Tag (Maybe Int64) +tagScheduleStartMs + = lens _tagScheduleStartMs + (\ s a -> s{_tagScheduleStartMs = a}) + +-- | User notes on how to apply this tag in the container. +tagNotes :: Lens' Tag (Maybe Text) +tagNotes = lens _tagNotes (\ s a -> s{_tagNotes = a}) + +-- | Firing rule IDs. A tag will fire when any of the listed rules are true +-- and all of its blockingRuleIds (if any specified) are false. +tagFiringRuleId :: Lens' Tag [Text] +tagFiringRuleId + = lens _tagFiringRuleId + (\ s a -> s{_tagFiringRuleId = a}) + . _Default + . _Coerce + +-- | The tag\'s parameters. +tagParameter :: Lens' Tag [Maybe Parameter] +tagParameter + = lens _tagParameter (\ s a -> s{_tagParameter = a}) + . _Default + . _Coerce + +instance FromJSON Tag where + parseJSON + = withObject "Tag" + (\ o -> + Tag <$> + (o .:? "blockingTriggerId" .!= mempty) <*> + (o .:? "scheduleEndMs") + <*> (o .:? "parentFolderId") + <*> (o .:? "liveOnly") + <*> (o .:? "containerId") + <*> (o .:? "priority") + <*> (o .:? "teardownTag" .!= mempty) + <*> (o .:? "fingerprint") + <*> (o .:? "tagFiringOption") + <*> (o .:? "accountId") + <*> (o .:? "tagId") + <*> (o .:? "name") + <*> (o .:? "blockingRuleId" .!= mempty) + <*> (o .:? "setupTag" .!= mempty) + <*> (o .:? "firingTriggerId" .!= mempty) + <*> (o .:? "type") + <*> (o .:? "scheduleStartMs") + <*> (o .:? "notes") + <*> (o .:? "firingRuleId" .!= mempty) + <*> (o .:? "parameter" .!= mempty)) + +instance ToJSON Tag where + toJSON Tag{..} + = object + (catMaybes + [("blockingTriggerId" .=) <$> _tagBlockingTriggerId, + ("scheduleEndMs" .=) <$> _tagScheduleEndMs, + ("parentFolderId" .=) <$> _tagParentFolderId, + ("liveOnly" .=) <$> _tagLiveOnly, + ("containerId" .=) <$> _tagContainerId, + ("priority" .=) <$> _tagPriority, + ("teardownTag" .=) <$> _tagTeardownTag, + ("fingerprint" .=) <$> _tagFingerprint, + ("tagFiringOption" .=) <$> _tagTagFiringOption, + ("accountId" .=) <$> _tagAccountId, + ("tagId" .=) <$> _tagTagId, ("name" .=) <$> _tagName, + ("blockingRuleId" .=) <$> _tagBlockingRuleId, + ("setupTag" .=) <$> _tagSetupTag, + ("firingTriggerId" .=) <$> _tagFiringTriggerId, + ("type" .=) <$> _tagType, + ("scheduleStartMs" .=) <$> _tagScheduleStartMs, + ("notes" .=) <$> _tagNotes, + ("firingRuleId" .=) <$> _tagFiringRuleId, + ("parameter" .=) <$> _tagParameter]) + +-- +-- /See:/ 'teardownTag' smart constructor. +data TeardownTag = TeardownTag + { _ttStopTeardownOnFailure :: !(Maybe Bool) + , _ttTagName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TeardownTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ttStopTeardownOnFailure' +-- +-- * 'ttTagName' +teardownTag + :: TeardownTag +teardownTag = + TeardownTag + { _ttStopTeardownOnFailure = Nothing + , _ttTagName = Nothing + } + +-- | If true, fire the teardown tag if and only if the main tag fires +-- successfully. If false, fire the teardown tag regardless of main tag +-- firing status. +ttStopTeardownOnFailure :: Lens' TeardownTag (Maybe Bool) +ttStopTeardownOnFailure + = lens _ttStopTeardownOnFailure + (\ s a -> s{_ttStopTeardownOnFailure = a}) + +-- | The name of the teardown tag. +ttTagName :: Lens' TeardownTag (Maybe Text) +ttTagName + = lens _ttTagName (\ s a -> s{_ttTagName = a}) + +instance FromJSON TeardownTag where + parseJSON + = withObject "TeardownTag" + (\ o -> + TeardownTag <$> + (o .:? "stopTeardownOnFailure") <*> + (o .:? "tagName")) + +instance ToJSON TeardownTag where + toJSON TeardownTag{..} + = object + (catMaybes + [("stopTeardownOnFailure" .=) <$> + _ttStopTeardownOnFailure, + ("tagName" .=) <$> _ttTagName]) + +-- | Create container versions response. +-- +-- /See:/ 'createContainerVersionResponse' smart constructor. +data CreateContainerVersionResponse = CreateContainerVersionResponse + { _ccvrCompilerError :: !(Maybe Bool) + , _ccvrContainerVersion :: !(Maybe (Maybe ContainerVersion)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateContainerVersionResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccvrCompilerError' +-- +-- * 'ccvrContainerVersion' +createContainerVersionResponse + :: CreateContainerVersionResponse +createContainerVersionResponse = + CreateContainerVersionResponse + { _ccvrCompilerError = Nothing + , _ccvrContainerVersion = Nothing + } + +-- | Compiler errors or not. +ccvrCompilerError :: Lens' CreateContainerVersionResponse (Maybe Bool) +ccvrCompilerError + = lens _ccvrCompilerError + (\ s a -> s{_ccvrCompilerError = a}) + +-- | The container version created. +ccvrContainerVersion :: Lens' CreateContainerVersionResponse (Maybe (Maybe ContainerVersion)) +ccvrContainerVersion + = lens _ccvrContainerVersion + (\ s a -> s{_ccvrContainerVersion = a}) + +instance FromJSON CreateContainerVersionResponse + where + parseJSON + = withObject "CreateContainerVersionResponse" + (\ o -> + CreateContainerVersionResponse <$> + (o .:? "compilerError") <*> + (o .:? "containerVersion")) + +instance ToJSON CreateContainerVersionResponse where + toJSON CreateContainerVersionResponse{..} + = object + (catMaybes + [("compilerError" .=) <$> _ccvrCompilerError, + ("containerVersion" .=) <$> _ccvrContainerVersion]) + +-- | List triggers response. +-- +-- /See:/ 'listTriggersResponse' smart constructor. +newtype ListTriggersResponse = ListTriggersResponse + { _ltrTriggers :: Maybe [Maybe Trigger] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTriggersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrTriggers' +listTriggersResponse + :: ListTriggersResponse +listTriggersResponse = + ListTriggersResponse + { _ltrTriggers = Nothing + } + +-- | All GTM Triggers of a GTM Container. +ltrTriggers :: Lens' ListTriggersResponse [Maybe Trigger] +ltrTriggers + = lens _ltrTriggers (\ s a -> s{_ltrTriggers = a}) . + _Default + . _Coerce + +instance FromJSON ListTriggersResponse where + parseJSON + = withObject "ListTriggersResponse" + (\ o -> + ListTriggersResponse <$> + (o .:? "triggers" .!= mempty)) + +instance ToJSON ListTriggersResponse where + toJSON ListTriggersResponse{..} + = object + (catMaybes [("triggers" .=) <$> _ltrTriggers]) + +-- | Options for new container versions. +-- +-- /See:/ 'createContainerVersionRequestVersionOptions' smart constructor. +data CreateContainerVersionRequestVersionOptions = CreateContainerVersionRequestVersionOptions + { _ccvrvoName :: !(Maybe Text) + , _ccvrvoQuickPreview :: !(Maybe Bool) + , _ccvrvoNotes :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CreateContainerVersionRequestVersionOptions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccvrvoName' +-- +-- * 'ccvrvoQuickPreview' +-- +-- * 'ccvrvoNotes' +createContainerVersionRequestVersionOptions + :: CreateContainerVersionRequestVersionOptions +createContainerVersionRequestVersionOptions = + CreateContainerVersionRequestVersionOptions + { _ccvrvoName = Nothing + , _ccvrvoQuickPreview = Nothing + , _ccvrvoNotes = Nothing + } + +-- | The name of the container version to be created. +ccvrvoName :: Lens' CreateContainerVersionRequestVersionOptions (Maybe Text) +ccvrvoName + = lens _ccvrvoName (\ s a -> s{_ccvrvoName = a}) + +-- | The creation of this version may be for quick preview and shouldn\'t be +-- saved. +ccvrvoQuickPreview :: Lens' CreateContainerVersionRequestVersionOptions (Maybe Bool) +ccvrvoQuickPreview + = lens _ccvrvoQuickPreview + (\ s a -> s{_ccvrvoQuickPreview = a}) + +-- | The notes of the container version to be created. +ccvrvoNotes :: Lens' CreateContainerVersionRequestVersionOptions (Maybe Text) +ccvrvoNotes + = lens _ccvrvoNotes (\ s a -> s{_ccvrvoNotes = a}) + +instance FromJSON + CreateContainerVersionRequestVersionOptions where + parseJSON + = withObject + "CreateContainerVersionRequestVersionOptions" + (\ o -> + CreateContainerVersionRequestVersionOptions <$> + (o .:? "name") <*> (o .:? "quickPreview") <*> + (o .:? "notes")) + +instance ToJSON + CreateContainerVersionRequestVersionOptions where + toJSON + CreateContainerVersionRequestVersionOptions{..} + = object + (catMaybes + [("name" .=) <$> _ccvrvoName, + ("quickPreview" .=) <$> _ccvrvoQuickPreview, + ("notes" .=) <$> _ccvrvoNotes]) + +-- | Represents a Google Tag Manager Container Version Header. +-- +-- /See:/ 'containerVersionHeader' smart constructor. +data ContainerVersionHeader = ContainerVersionHeader + { _cvhNumTags :: !(Maybe Text) + , _cvhNumMacros :: !(Maybe Text) + , _cvhContainerId :: !(Maybe Text) + , _cvhContainerVersionId :: !(Maybe Text) + , _cvhAccountId :: !(Maybe Text) + , _cvhName :: !(Maybe Text) + , _cvhNumTriggers :: !(Maybe Text) + , _cvhDeleted :: !(Maybe Bool) + , _cvhNumRules :: !(Maybe Text) + , _cvhNumVariables :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContainerVersionHeader' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cvhNumTags' +-- +-- * 'cvhNumMacros' +-- +-- * 'cvhContainerId' +-- +-- * 'cvhContainerVersionId' +-- +-- * 'cvhAccountId' +-- +-- * 'cvhName' +-- +-- * 'cvhNumTriggers' +-- +-- * 'cvhDeleted' +-- +-- * 'cvhNumRules' +-- +-- * 'cvhNumVariables' +containerVersionHeader + :: ContainerVersionHeader +containerVersionHeader = + ContainerVersionHeader + { _cvhNumTags = Nothing + , _cvhNumMacros = Nothing + , _cvhContainerId = Nothing + , _cvhContainerVersionId = Nothing + , _cvhAccountId = Nothing + , _cvhName = Nothing + , _cvhNumTriggers = Nothing + , _cvhDeleted = Nothing + , _cvhNumRules = Nothing + , _cvhNumVariables = Nothing + } + +-- | Number of tags in the container version. +cvhNumTags :: Lens' ContainerVersionHeader (Maybe Text) +cvhNumTags + = lens _cvhNumTags (\ s a -> s{_cvhNumTags = a}) + +-- | Number of macros in the container version. +cvhNumMacros :: Lens' ContainerVersionHeader (Maybe Text) +cvhNumMacros + = lens _cvhNumMacros (\ s a -> s{_cvhNumMacros = a}) + +-- | GTM Container ID. +cvhContainerId :: Lens' ContainerVersionHeader (Maybe Text) +cvhContainerId + = lens _cvhContainerId + (\ s a -> s{_cvhContainerId = a}) + +-- | The Container Version ID uniquely identifies the GTM Container Version. +cvhContainerVersionId :: Lens' ContainerVersionHeader (Maybe Text) +cvhContainerVersionId + = lens _cvhContainerVersionId + (\ s a -> s{_cvhContainerVersionId = a}) + +-- | GTM Account ID. +cvhAccountId :: Lens' ContainerVersionHeader (Maybe Text) +cvhAccountId + = lens _cvhAccountId (\ s a -> s{_cvhAccountId = a}) + +-- | Container version display name. +cvhName :: Lens' ContainerVersionHeader (Maybe Text) +cvhName = lens _cvhName (\ s a -> s{_cvhName = a}) + +-- | Number of triggers in the container version. +cvhNumTriggers :: Lens' ContainerVersionHeader (Maybe Text) +cvhNumTriggers + = lens _cvhNumTriggers + (\ s a -> s{_cvhNumTriggers = a}) + +-- | A value of true indicates this container version has been deleted. +cvhDeleted :: Lens' ContainerVersionHeader (Maybe Bool) +cvhDeleted + = lens _cvhDeleted (\ s a -> s{_cvhDeleted = a}) + +-- | Number of rules in the container version. +cvhNumRules :: Lens' ContainerVersionHeader (Maybe Text) +cvhNumRules + = lens _cvhNumRules (\ s a -> s{_cvhNumRules = a}) + +-- | Number of variables in the container version. +cvhNumVariables :: Lens' ContainerVersionHeader (Maybe Text) +cvhNumVariables + = lens _cvhNumVariables + (\ s a -> s{_cvhNumVariables = a}) + +instance FromJSON ContainerVersionHeader where + parseJSON + = withObject "ContainerVersionHeader" + (\ o -> + ContainerVersionHeader <$> + (o .:? "numTags") <*> (o .:? "numMacros") <*> + (o .:? "containerId") + <*> (o .:? "containerVersionId") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "numTriggers") + <*> (o .:? "deleted") + <*> (o .:? "numRules") + <*> (o .:? "numVariables")) + +instance ToJSON ContainerVersionHeader where + toJSON ContainerVersionHeader{..} + = object + (catMaybes + [("numTags" .=) <$> _cvhNumTags, + ("numMacros" .=) <$> _cvhNumMacros, + ("containerId" .=) <$> _cvhContainerId, + ("containerVersionId" .=) <$> _cvhContainerVersionId, + ("accountId" .=) <$> _cvhAccountId, + ("name" .=) <$> _cvhName, + ("numTriggers" .=) <$> _cvhNumTriggers, + ("deleted" .=) <$> _cvhDeleted, + ("numRules" .=) <$> _cvhNumRules, + ("numVariables" .=) <$> _cvhNumVariables]) + +-- | Defines the Google Tag Manager Account access permissions. +-- +-- /See:/ 'accountAccess' smart constructor. +newtype AccountAccess = AccountAccess + { _aaPermission :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccountAccess' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aaPermission' +accountAccess + :: AccountAccess +accountAccess = + AccountAccess + { _aaPermission = Nothing + } + +-- | List of Account permissions. Valid account permissions are read and +-- manage. +aaPermission :: Lens' AccountAccess [Text] +aaPermission + = lens _aaPermission (\ s a -> s{_aaPermission = a}) + . _Default + . _Coerce + +instance FromJSON AccountAccess where + parseJSON + = withObject "AccountAccess" + (\ o -> + AccountAccess <$> (o .:? "permission" .!= mempty)) + +instance ToJSON AccountAccess where + toJSON AccountAccess{..} + = object + (catMaybes [("permission" .=) <$> _aaPermission]) + +-- | Represents a user\'s permissions to an account and its container. +-- +-- /See:/ 'userAccess' smart constructor. +data UserAccess = UserAccess + { _uaAccountAccess :: !(Maybe (Maybe AccountAccess)) + , _uaAccountId :: !(Maybe Text) + , _uaEmailAddress :: !(Maybe Text) + , _uaContainerAccess :: !(Maybe [Maybe ContainerAccess]) + , _uaPermissionId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'UserAccess' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uaAccountAccess' +-- +-- * 'uaAccountId' +-- +-- * 'uaEmailAddress' +-- +-- * 'uaContainerAccess' +-- +-- * 'uaPermissionId' +userAccess + :: UserAccess +userAccess = + UserAccess + { _uaAccountAccess = Nothing + , _uaAccountId = Nothing + , _uaEmailAddress = Nothing + , _uaContainerAccess = Nothing + , _uaPermissionId = Nothing + } + +-- | GTM Account access permissions. +uaAccountAccess :: Lens' UserAccess (Maybe (Maybe AccountAccess)) +uaAccountAccess + = lens _uaAccountAccess + (\ s a -> s{_uaAccountAccess = a}) + +-- | GTM Account ID. +uaAccountId :: Lens' UserAccess (Maybe Text) +uaAccountId + = lens _uaAccountId (\ s a -> s{_uaAccountId = a}) + +-- | User\'s email address. +uaEmailAddress :: Lens' UserAccess (Maybe Text) +uaEmailAddress + = lens _uaEmailAddress + (\ s a -> s{_uaEmailAddress = a}) + +-- | GTM Container access permissions. +uaContainerAccess :: Lens' UserAccess [Maybe ContainerAccess] +uaContainerAccess + = lens _uaContainerAccess + (\ s a -> s{_uaContainerAccess = a}) + . _Default + . _Coerce + +-- | Account Permission ID. +uaPermissionId :: Lens' UserAccess (Maybe Text) +uaPermissionId + = lens _uaPermissionId + (\ s a -> s{_uaPermissionId = a}) + +instance FromJSON UserAccess where + parseJSON + = withObject "UserAccess" + (\ o -> + UserAccess <$> + (o .:? "accountAccess") <*> (o .:? "accountId") <*> + (o .:? "emailAddress") + <*> (o .:? "containerAccess" .!= mempty) + <*> (o .:? "permissionId")) + +instance ToJSON UserAccess where + toJSON UserAccess{..} + = object + (catMaybes + [("accountAccess" .=) <$> _uaAccountAccess, + ("accountId" .=) <$> _uaAccountId, + ("emailAddress" .=) <$> _uaEmailAddress, + ("containerAccess" .=) <$> _uaContainerAccess, + ("permissionId" .=) <$> _uaPermissionId]) + +-- | List Accounts Response. +-- +-- /See:/ 'listAccountsResponse' smart constructor. +newtype ListAccountsResponse = ListAccountsResponse + { _larAccounts :: Maybe [Maybe Account] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListAccountsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'larAccounts' +listAccountsResponse + :: ListAccountsResponse +listAccountsResponse = + ListAccountsResponse + { _larAccounts = Nothing + } + +-- | List of GTM Accounts that a user has access to. +larAccounts :: Lens' ListAccountsResponse [Maybe Account] +larAccounts + = lens _larAccounts (\ s a -> s{_larAccounts = a}) . + _Default + . _Coerce + +instance FromJSON ListAccountsResponse where + parseJSON + = withObject "ListAccountsResponse" + (\ o -> + ListAccountsResponse <$> + (o .:? "accounts" .!= mempty)) + +instance ToJSON ListAccountsResponse where + toJSON ListAccountsResponse{..} + = object + (catMaybes [("accounts" .=) <$> _larAccounts]) + +-- | Represents a Google Tag Manager Variable. +-- +-- /See:/ 'variable' smart constructor. +data Variable = Variable + { _vScheduleEndMs :: !(Maybe Int64) + , _vParentFolderId :: !(Maybe Text) + , _vContainerId :: !(Maybe Text) + , _vFingerprint :: !(Maybe Text) + , _vVariableId :: !(Maybe Text) + , _vAccountId :: !(Maybe Text) + , _vDisablingTriggerId :: !(Maybe [Text]) + , _vName :: !(Maybe Text) + , _vType :: !(Maybe Text) + , _vScheduleStartMs :: !(Maybe Int64) + , _vNotes :: !(Maybe Text) + , _vEnablingTriggerId :: !(Maybe [Text]) + , _vParameter :: !(Maybe [Maybe Parameter]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Variable' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vScheduleEndMs' +-- +-- * 'vParentFolderId' +-- +-- * 'vContainerId' +-- +-- * 'vFingerprint' +-- +-- * 'vVariableId' +-- +-- * 'vAccountId' +-- +-- * 'vDisablingTriggerId' +-- +-- * 'vName' +-- +-- * 'vType' +-- +-- * 'vScheduleStartMs' +-- +-- * 'vNotes' +-- +-- * 'vEnablingTriggerId' +-- +-- * 'vParameter' +variable + :: Variable +variable = + Variable + { _vScheduleEndMs = Nothing + , _vParentFolderId = Nothing + , _vContainerId = Nothing + , _vFingerprint = Nothing + , _vVariableId = Nothing + , _vAccountId = Nothing + , _vDisablingTriggerId = Nothing + , _vName = Nothing + , _vType = Nothing + , _vScheduleStartMs = Nothing + , _vNotes = Nothing + , _vEnablingTriggerId = Nothing + , _vParameter = Nothing + } + +-- | The end timestamp in milliseconds to schedule a variable. +vScheduleEndMs :: Lens' Variable (Maybe Int64) +vScheduleEndMs + = lens _vScheduleEndMs + (\ s a -> s{_vScheduleEndMs = a}) + +-- | Parent folder id. +vParentFolderId :: Lens' Variable (Maybe Text) +vParentFolderId + = lens _vParentFolderId + (\ s a -> s{_vParentFolderId = a}) + +-- | GTM Container ID. +vContainerId :: Lens' Variable (Maybe Text) +vContainerId + = lens _vContainerId (\ s a -> s{_vContainerId = a}) + +-- | The fingerprint of the GTM Variable as computed at storage time. This +-- value is recomputed whenever the variable is modified. +vFingerprint :: Lens' Variable (Maybe Text) +vFingerprint + = lens _vFingerprint (\ s a -> s{_vFingerprint = a}) + +-- | The Variable ID uniquely identifies the GTM Variable. +vVariableId :: Lens' Variable (Maybe Text) +vVariableId + = lens _vVariableId (\ s a -> s{_vVariableId = a}) + +-- | GTM Account ID. +vAccountId :: Lens' Variable (Maybe Text) +vAccountId + = lens _vAccountId (\ s a -> s{_vAccountId = a}) + +-- | For mobile containers only: A list of trigger IDs for disabling +-- conditional variables; the variable is enabled if one of the enabling +-- trigger is true while all the disabling trigger are false. Treated as an +-- unordered set. +vDisablingTriggerId :: Lens' Variable [Text] +vDisablingTriggerId + = lens _vDisablingTriggerId + (\ s a -> s{_vDisablingTriggerId = a}) + . _Default + . _Coerce + +-- | Variable display name. +vName :: Lens' Variable (Maybe Text) +vName = lens _vName (\ s a -> s{_vName = a}) + +-- | GTM Variable Type. +vType :: Lens' Variable (Maybe Text) +vType = lens _vType (\ s a -> s{_vType = a}) + +-- | The start timestamp in milliseconds to schedule a variable. +vScheduleStartMs :: Lens' Variable (Maybe Int64) +vScheduleStartMs + = lens _vScheduleStartMs + (\ s a -> s{_vScheduleStartMs = a}) + +-- | User notes on how to apply this variable in the container. +vNotes :: Lens' Variable (Maybe Text) +vNotes = lens _vNotes (\ s a -> s{_vNotes = a}) + +-- | For mobile containers only: A list of trigger IDs for enabling +-- conditional variables; the variable is enabled if one of the enabling +-- triggers is true while all the disabling triggers are false. Treated as +-- an unordered set. +vEnablingTriggerId :: Lens' Variable [Text] +vEnablingTriggerId + = lens _vEnablingTriggerId + (\ s a -> s{_vEnablingTriggerId = a}) + . _Default + . _Coerce + +-- | The variable\'s parameters. +vParameter :: Lens' Variable [Maybe Parameter] +vParameter + = lens _vParameter (\ s a -> s{_vParameter = a}) . + _Default + . _Coerce + +instance FromJSON Variable where + parseJSON + = withObject "Variable" + (\ o -> + Variable <$> + (o .:? "scheduleEndMs") <*> (o .:? "parentFolderId") + <*> (o .:? "containerId") + <*> (o .:? "fingerprint") + <*> (o .:? "variableId") + <*> (o .:? "accountId") + <*> (o .:? "disablingTriggerId" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "type") + <*> (o .:? "scheduleStartMs") + <*> (o .:? "notes") + <*> (o .:? "enablingTriggerId" .!= mempty) + <*> (o .:? "parameter" .!= mempty)) + +instance ToJSON Variable where + toJSON Variable{..} + = object + (catMaybes + [("scheduleEndMs" .=) <$> _vScheduleEndMs, + ("parentFolderId" .=) <$> _vParentFolderId, + ("containerId" .=) <$> _vContainerId, + ("fingerprint" .=) <$> _vFingerprint, + ("variableId" .=) <$> _vVariableId, + ("accountId" .=) <$> _vAccountId, + ("disablingTriggerId" .=) <$> _vDisablingTriggerId, + ("name" .=) <$> _vName, ("type" .=) <$> _vType, + ("scheduleStartMs" .=) <$> _vScheduleStartMs, + ("notes" .=) <$> _vNotes, + ("enablingTriggerId" .=) <$> _vEnablingTriggerId, + ("parameter" .=) <$> _vParameter]) + +-- | Represents a Google Tag Manager Rule. +-- +-- /See:/ 'rule' smart constructor. +data Rule = Rule + { _rContainerId :: !(Maybe Text) + , _rFingerprint :: !(Maybe Text) + , _rRuleId :: !(Maybe Text) + , _rAccountId :: !(Maybe Text) + , _rName :: !(Maybe Text) + , _rNotes :: !(Maybe Text) + , _rCondition :: !(Maybe [Maybe Condition]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Rule' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rContainerId' +-- +-- * 'rFingerprint' +-- +-- * 'rRuleId' +-- +-- * 'rAccountId' +-- +-- * 'rName' +-- +-- * 'rNotes' +-- +-- * 'rCondition' +rule + :: Rule +rule = + Rule + { _rContainerId = Nothing + , _rFingerprint = Nothing + , _rRuleId = Nothing + , _rAccountId = Nothing + , _rName = Nothing + , _rNotes = Nothing + , _rCondition = Nothing + } + +-- | GTM Container ID. +rContainerId :: Lens' Rule (Maybe Text) +rContainerId + = lens _rContainerId (\ s a -> s{_rContainerId = a}) + +-- | The fingerprint of the GTM Rule as computed at storage time. This value +-- is recomputed whenever the rule is modified. +rFingerprint :: Lens' Rule (Maybe Text) +rFingerprint + = lens _rFingerprint (\ s a -> s{_rFingerprint = a}) + +-- | The Rule ID uniquely identifies the GTM Rule. +rRuleId :: Lens' Rule (Maybe Text) +rRuleId = lens _rRuleId (\ s a -> s{_rRuleId = a}) + +-- | GTM Account ID. +rAccountId :: Lens' Rule (Maybe Text) +rAccountId + = lens _rAccountId (\ s a -> s{_rAccountId = a}) + +-- | Rule display name. +rName :: Lens' Rule (Maybe Text) +rName = lens _rName (\ s a -> s{_rName = a}) + +-- | User notes on how to apply this rule in the container. +rNotes :: Lens' Rule (Maybe Text) +rNotes = lens _rNotes (\ s a -> s{_rNotes = a}) + +-- | The list of conditions that make up this rule (implicit AND between +-- them). +rCondition :: Lens' Rule [Maybe Condition] +rCondition + = lens _rCondition (\ s a -> s{_rCondition = a}) . + _Default + . _Coerce + +instance FromJSON Rule where + parseJSON + = withObject "Rule" + (\ o -> + Rule <$> + (o .:? "containerId") <*> (o .:? "fingerprint") <*> + (o .:? "ruleId") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "notes") + <*> (o .:? "condition" .!= mempty)) + +instance ToJSON Rule where + toJSON Rule{..} + = object + (catMaybes + [("containerId" .=) <$> _rContainerId, + ("fingerprint" .=) <$> _rFingerprint, + ("ruleId" .=) <$> _rRuleId, + ("accountId" .=) <$> _rAccountId, + ("name" .=) <$> _rName, ("notes" .=) <$> _rNotes, + ("condition" .=) <$> _rCondition]) + +-- | Represents a Google Tag Manager Folder. +-- +-- /See:/ 'folder' smart constructor. +data Folder = Folder + { _fContainerId :: !(Maybe Text) + , _fFingerprint :: !(Maybe Text) + , _fFolderId :: !(Maybe Text) + , _fAccountId :: !(Maybe Text) + , _fName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Folder' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'fContainerId' +-- +-- * 'fFingerprint' +-- +-- * 'fFolderId' +-- +-- * 'fAccountId' +-- +-- * 'fName' +folder + :: Folder +folder = + Folder + { _fContainerId = Nothing + , _fFingerprint = Nothing + , _fFolderId = Nothing + , _fAccountId = Nothing + , _fName = Nothing + } + +-- | GTM Container ID. +fContainerId :: Lens' Folder (Maybe Text) +fContainerId + = lens _fContainerId (\ s a -> s{_fContainerId = a}) + +-- | The fingerprint of the GTM Folder as computed at storage time. This +-- value is recomputed whenever the folder is modified. +fFingerprint :: Lens' Folder (Maybe Text) +fFingerprint + = lens _fFingerprint (\ s a -> s{_fFingerprint = a}) + +-- | The Folder ID uniquely identifies the GTM Folder. +fFolderId :: Lens' Folder (Maybe Text) +fFolderId + = lens _fFolderId (\ s a -> s{_fFolderId = a}) + +-- | GTM Account ID. +fAccountId :: Lens' Folder (Maybe Text) +fAccountId + = lens _fAccountId (\ s a -> s{_fAccountId = a}) + +-- | Folder display name. +fName :: Lens' Folder (Maybe Text) +fName = lens _fName (\ s a -> s{_fName = a}) + +instance FromJSON Folder where + parseJSON + = withObject "Folder" + (\ o -> + Folder <$> + (o .:? "containerId") <*> (o .:? "fingerprint") <*> + (o .:? "folderId") + <*> (o .:? "accountId") + <*> (o .:? "name")) + +instance ToJSON Folder where + toJSON Folder{..} + = object + (catMaybes + [("containerId" .=) <$> _fContainerId, + ("fingerprint" .=) <$> _fFingerprint, + ("folderId" .=) <$> _fFolderId, + ("accountId" .=) <$> _fAccountId, + ("name" .=) <$> _fName]) + +-- | Represents a Google Tag Manager Account. +-- +-- /See:/ 'account' smart constructor. +data Account = Account + { _aShareData :: !(Maybe Bool) + , _aFingerprint :: !(Maybe Text) + , _aAccountId :: !(Maybe Text) + , _aName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Account' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aShareData' +-- +-- * 'aFingerprint' +-- +-- * 'aAccountId' +-- +-- * 'aName' +account + :: Account +account = + Account + { _aShareData = Nothing + , _aFingerprint = Nothing + , _aAccountId = Nothing + , _aName = Nothing + } + +-- | Whether the account shares data anonymously with Google and others. +aShareData :: Lens' Account (Maybe Bool) +aShareData + = lens _aShareData (\ s a -> s{_aShareData = a}) + +-- | The fingerprint of the GTM Account as computed at storage time. This +-- value is recomputed whenever the account is modified. +aFingerprint :: Lens' Account (Maybe Text) +aFingerprint + = lens _aFingerprint (\ s a -> s{_aFingerprint = a}) + +-- | The Account ID uniquely identifies the GTM Account. +aAccountId :: Lens' Account (Maybe Text) +aAccountId + = lens _aAccountId (\ s a -> s{_aAccountId = a}) + +-- | Account display name. +aName :: Lens' Account (Maybe Text) +aName = lens _aName (\ s a -> s{_aName = a}) + +instance FromJSON Account where + parseJSON + = withObject "Account" + (\ o -> + Account <$> + (o .:? "shareData") <*> (o .:? "fingerprint") <*> + (o .:? "accountId") + <*> (o .:? "name")) + +instance ToJSON Account where + toJSON Account{..} + = object + (catMaybes + [("shareData" .=) <$> _aShareData, + ("fingerprint" .=) <$> _aFingerprint, + ("accountId" .=) <$> _aAccountId, + ("name" .=) <$> _aName]) + +-- | List container versions response. +-- +-- /See:/ 'listContainerVersionsResponse' smart constructor. +data ListContainerVersionsResponse = ListContainerVersionsResponse + { _lcvrContainerVersionHeader :: !(Maybe [Maybe ContainerVersionHeader]) + , _lcvrContainerVersion :: !(Maybe [Maybe ContainerVersion]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListContainerVersionsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcvrContainerVersionHeader' +-- +-- * 'lcvrContainerVersion' +listContainerVersionsResponse + :: ListContainerVersionsResponse +listContainerVersionsResponse = + ListContainerVersionsResponse + { _lcvrContainerVersionHeader = Nothing + , _lcvrContainerVersion = Nothing + } + +-- | All container version headers of a GTM Container. +lcvrContainerVersionHeader :: Lens' ListContainerVersionsResponse [Maybe ContainerVersionHeader] +lcvrContainerVersionHeader + = lens _lcvrContainerVersionHeader + (\ s a -> s{_lcvrContainerVersionHeader = a}) + . _Default + . _Coerce + +-- | All versions of a GTM Container. +lcvrContainerVersion :: Lens' ListContainerVersionsResponse [Maybe ContainerVersion] +lcvrContainerVersion + = lens _lcvrContainerVersion + (\ s a -> s{_lcvrContainerVersion = a}) + . _Default + . _Coerce + +instance FromJSON ListContainerVersionsResponse where + parseJSON + = withObject "ListContainerVersionsResponse" + (\ o -> + ListContainerVersionsResponse <$> + (o .:? "containerVersionHeader" .!= mempty) <*> + (o .:? "containerVersion" .!= mempty)) + +instance ToJSON ListContainerVersionsResponse where + toJSON ListContainerVersionsResponse{..} + = object + (catMaybes + [("containerVersionHeader" .=) <$> + _lcvrContainerVersionHeader, + ("containerVersion" .=) <$> _lcvrContainerVersion]) + +-- | Represents a Google Tag Manager Container. +-- +-- /See:/ 'container' smart constructor. +data Container = Container + { _cPublicId :: !(Maybe Text) + , _cUsageContext :: !(Maybe [Text]) + , _cEnabledBuiltInVariable :: !(Maybe [Text]) + , _cContainerId :: !(Maybe Text) + , _cFingerprint :: !(Maybe Text) + , _cTimeZoneCountryId :: !(Maybe Text) + , _cAccountId :: !(Maybe Text) + , _cDomainName :: !(Maybe [Text]) + , _cName :: !(Maybe Text) + , _cNotes :: !(Maybe Text) + , _cTimeZoneId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Container' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cPublicId' +-- +-- * 'cUsageContext' +-- +-- * 'cEnabledBuiltInVariable' +-- +-- * 'cContainerId' +-- +-- * 'cFingerprint' +-- +-- * 'cTimeZoneCountryId' +-- +-- * 'cAccountId' +-- +-- * 'cDomainName' +-- +-- * 'cName' +-- +-- * 'cNotes' +-- +-- * 'cTimeZoneId' +container + :: Container +container = + Container + { _cPublicId = Nothing + , _cUsageContext = Nothing + , _cEnabledBuiltInVariable = Nothing + , _cContainerId = Nothing + , _cFingerprint = Nothing + , _cTimeZoneCountryId = Nothing + , _cAccountId = Nothing + , _cDomainName = Nothing + , _cName = Nothing + , _cNotes = Nothing + , _cTimeZoneId = Nothing + } + +-- | Container Public ID. +cPublicId :: Lens' Container (Maybe Text) +cPublicId + = lens _cPublicId (\ s a -> s{_cPublicId = a}) + +-- | List of Usage Contexts for the Container. Valid values include: web, +-- android, ios. +cUsageContext :: Lens' Container [Text] +cUsageContext + = lens _cUsageContext + (\ s a -> s{_cUsageContext = a}) + . _Default + . _Coerce + +-- | List of enabled built-in variables. Valid values include: pageUrl, +-- pageHostname, pagePath, referrer, event, clickElement, clickClasses, +-- clickId, clickTarget, clickUrl, clickText, formElement, formClasses, +-- formId, formTarget, formUrl, formText, errorMessage, errorUrl, +-- errorLine, newHistoryFragment, oldHistoryFragment, newHistoryState, +-- oldHistoryState, historySource, containerVersion, debugMode, +-- randomNumber, containerId. +cEnabledBuiltInVariable :: Lens' Container [Text] +cEnabledBuiltInVariable + = lens _cEnabledBuiltInVariable + (\ s a -> s{_cEnabledBuiltInVariable = a}) + . _Default + . _Coerce + +-- | The Container ID uniquely identifies the GTM Container. +cContainerId :: Lens' Container (Maybe Text) +cContainerId + = lens _cContainerId (\ s a -> s{_cContainerId = a}) + +-- | The fingerprint of the GTM Container as computed at storage time. This +-- value is recomputed whenever the account is modified. +cFingerprint :: Lens' Container (Maybe Text) +cFingerprint + = lens _cFingerprint (\ s a -> s{_cFingerprint = a}) + +-- | Container Country ID. +cTimeZoneCountryId :: Lens' Container (Maybe Text) +cTimeZoneCountryId + = lens _cTimeZoneCountryId + (\ s a -> s{_cTimeZoneCountryId = a}) + +-- | GTM Account ID. +cAccountId :: Lens' Container (Maybe Text) +cAccountId + = lens _cAccountId (\ s a -> s{_cAccountId = a}) + +-- | Optional list of domain names associated with the Container. +cDomainName :: Lens' Container [Text] +cDomainName + = lens _cDomainName (\ s a -> s{_cDomainName = a}) . + _Default + . _Coerce + +-- | Container display name. +cName :: Lens' Container (Maybe Text) +cName = lens _cName (\ s a -> s{_cName = a}) + +-- | Container Notes. +cNotes :: Lens' Container (Maybe Text) +cNotes = lens _cNotes (\ s a -> s{_cNotes = a}) + +-- | Container Time Zone ID. +cTimeZoneId :: Lens' Container (Maybe Text) +cTimeZoneId + = lens _cTimeZoneId (\ s a -> s{_cTimeZoneId = a}) + +instance FromJSON Container where + parseJSON + = withObject "Container" + (\ o -> + Container <$> + (o .:? "publicId") <*> + (o .:? "usageContext" .!= mempty) + <*> (o .:? "enabledBuiltInVariable" .!= mempty) + <*> (o .:? "containerId") + <*> (o .:? "fingerprint") + <*> (o .:? "timeZoneCountryId") + <*> (o .:? "accountId") + <*> (o .:? "domainName" .!= mempty) + <*> (o .:? "name") + <*> (o .:? "notes") + <*> (o .:? "timeZoneId")) + +instance ToJSON Container where + toJSON Container{..} + = object + (catMaybes + [("publicId" .=) <$> _cPublicId, + ("usageContext" .=) <$> _cUsageContext, + ("enabledBuiltInVariable" .=) <$> + _cEnabledBuiltInVariable, + ("containerId" .=) <$> _cContainerId, + ("fingerprint" .=) <$> _cFingerprint, + ("timeZoneCountryId" .=) <$> _cTimeZoneCountryId, + ("accountId" .=) <$> _cAccountId, + ("domainName" .=) <$> _cDomainName, + ("name" .=) <$> _cName, ("notes" .=) <$> _cNotes, + ("timeZoneId" .=) <$> _cTimeZoneId]) + +-- | List AccountUsers Response. +-- +-- /See:/ 'listAccountUsersResponse' smart constructor. +newtype ListAccountUsersResponse = ListAccountUsersResponse + { _laurUserAccess :: Maybe [Maybe UserAccess] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListAccountUsersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'laurUserAccess' +listAccountUsersResponse + :: ListAccountUsersResponse +listAccountUsersResponse = + ListAccountUsersResponse + { _laurUserAccess = Nothing + } + +-- | All GTM AccountUsers of a GTM Account. +laurUserAccess :: Lens' ListAccountUsersResponse [Maybe UserAccess] +laurUserAccess + = lens _laurUserAccess + (\ s a -> s{_laurUserAccess = a}) + . _Default + . _Coerce + +instance FromJSON ListAccountUsersResponse where + parseJSON + = withObject "ListAccountUsersResponse" + (\ o -> + ListAccountUsersResponse <$> + (o .:? "userAccess" .!= mempty)) + +instance ToJSON ListAccountUsersResponse where + toJSON ListAccountUsersResponse{..} + = object + (catMaybes [("userAccess" .=) <$> _laurUserAccess]) + +-- | List Containers Response. +-- +-- /See:/ 'listContainersResponse' smart constructor. +newtype ListContainersResponse = ListContainersResponse + { _lcrContainers :: Maybe [Maybe Container] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListContainersResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lcrContainers' +listContainersResponse + :: ListContainersResponse +listContainersResponse = + ListContainersResponse + { _lcrContainers = Nothing + } + +-- | All Containers of a GTM Account. +lcrContainers :: Lens' ListContainersResponse [Maybe Container] +lcrContainers + = lens _lcrContainers + (\ s a -> s{_lcrContainers = a}) + . _Default + . _Coerce + +instance FromJSON ListContainersResponse where + parseJSON + = withObject "ListContainersResponse" + (\ o -> + ListContainersResponse <$> + (o .:? "containers" .!= mempty)) + +instance ToJSON ListContainersResponse where + toJSON ListContainersResponse{..} + = object + (catMaybes [("containers" .=) <$> _lcrContainers]) + +-- +-- /See:/ 'setupTag' smart constructor. +data SetupTag = SetupTag + { _stTagName :: !(Maybe Text) + , _stStopOnSetupFailure :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SetupTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'stTagName' +-- +-- * 'stStopOnSetupFailure' +setupTag + :: SetupTag +setupTag = + SetupTag + { _stTagName = Nothing + , _stStopOnSetupFailure = Nothing + } + +-- | The name of the setup tag. +stTagName :: Lens' SetupTag (Maybe Text) +stTagName + = lens _stTagName (\ s a -> s{_stTagName = a}) + +-- | If true, fire the main tag if and only if the setup tag fires +-- successfully. If false, fire the main tag regardless of setup tag firing +-- status. +stStopOnSetupFailure :: Lens' SetupTag (Maybe Bool) +stStopOnSetupFailure + = lens _stStopOnSetupFailure + (\ s a -> s{_stStopOnSetupFailure = a}) + +instance FromJSON SetupTag where + parseJSON + = withObject "SetupTag" + (\ o -> + SetupTag <$> + (o .:? "tagName") <*> (o .:? "stopOnSetupFailure")) + +instance ToJSON SetupTag where + toJSON SetupTag{..} + = object + (catMaybes + [("tagName" .=) <$> _stTagName, + ("stopOnSetupFailure" .=) <$> _stStopOnSetupFailure]) + +-- | Represents a Google Tag Manager Container Version. +-- +-- /See:/ 'containerVersion' smart constructor. +data ContainerVersion = ContainerVersion + { _cvMacro :: !(Maybe [Maybe MACro]) + , _cvTag :: !(Maybe [Maybe Tag]) + , _cvContainerId :: !(Maybe Text) + , _cvFingerprint :: !(Maybe Text) + , _cvContainerVersionId :: !(Maybe Text) + , _cvRule :: !(Maybe [Maybe Rule]) + , _cvFolder :: !(Maybe [Maybe Folder]) + , _cvVariable :: !(Maybe [Maybe Variable]) + , _cvAccountId :: !(Maybe Text) + , _cvName :: !(Maybe Text) + , _cvContainer :: !(Maybe (Maybe Container)) + , _cvDeleted :: !(Maybe Bool) + , _cvTrigger :: !(Maybe [Maybe Trigger]) + , _cvNotes :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContainerVersion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cvMacro' +-- +-- * 'cvTag' +-- +-- * 'cvContainerId' +-- +-- * 'cvFingerprint' +-- +-- * 'cvContainerVersionId' +-- +-- * 'cvRule' +-- +-- * 'cvFolder' +-- +-- * 'cvVariable' +-- +-- * 'cvAccountId' +-- +-- * 'cvName' +-- +-- * 'cvContainer' +-- +-- * 'cvDeleted' +-- +-- * 'cvTrigger' +-- +-- * 'cvNotes' +containerVersion + :: ContainerVersion +containerVersion = + ContainerVersion + { _cvMacro = Nothing + , _cvTag = Nothing + , _cvContainerId = Nothing + , _cvFingerprint = Nothing + , _cvContainerVersionId = Nothing + , _cvRule = Nothing + , _cvFolder = Nothing + , _cvVariable = Nothing + , _cvAccountId = Nothing + , _cvName = Nothing + , _cvContainer = Nothing + , _cvDeleted = Nothing + , _cvTrigger = Nothing + , _cvNotes = Nothing + } + +-- | The macros in the container that this version was taken from. +cvMacro :: Lens' ContainerVersion [Maybe MACro] +cvMacro + = lens _cvMacro (\ s a -> s{_cvMacro = a}) . _Default + . _Coerce + +-- | The tags in the container that this version was taken from. +cvTag :: Lens' ContainerVersion [Maybe Tag] +cvTag + = lens _cvTag (\ s a -> s{_cvTag = a}) . _Default . + _Coerce + +-- | GTM Container ID. +cvContainerId :: Lens' ContainerVersion (Maybe Text) +cvContainerId + = lens _cvContainerId + (\ s a -> s{_cvContainerId = a}) + +-- | The fingerprint of the GTM Container Version as computed at storage +-- time. This value is recomputed whenever the container version is +-- modified. +cvFingerprint :: Lens' ContainerVersion (Maybe Text) +cvFingerprint + = lens _cvFingerprint + (\ s a -> s{_cvFingerprint = a}) + +-- | The Container Version ID uniquely identifies the GTM Container Version. +cvContainerVersionId :: Lens' ContainerVersion (Maybe Text) +cvContainerVersionId + = lens _cvContainerVersionId + (\ s a -> s{_cvContainerVersionId = a}) + +-- | The rules in the container that this version was taken from. +cvRule :: Lens' ContainerVersion [Maybe Rule] +cvRule + = lens _cvRule (\ s a -> s{_cvRule = a}) . _Default . + _Coerce + +-- | The folders in the container that this version was taken from. +cvFolder :: Lens' ContainerVersion [Maybe Folder] +cvFolder + = lens _cvFolder (\ s a -> s{_cvFolder = a}) . + _Default + . _Coerce + +-- | The variables in the container that this version was taken from. +cvVariable :: Lens' ContainerVersion [Maybe Variable] +cvVariable + = lens _cvVariable (\ s a -> s{_cvVariable = a}) . + _Default + . _Coerce + +-- | GTM Account ID. +cvAccountId :: Lens' ContainerVersion (Maybe Text) +cvAccountId + = lens _cvAccountId (\ s a -> s{_cvAccountId = a}) + +-- | Container version display name. +cvName :: Lens' ContainerVersion (Maybe Text) +cvName = lens _cvName (\ s a -> s{_cvName = a}) + +-- | The container that this version was taken from. +cvContainer :: Lens' ContainerVersion (Maybe (Maybe Container)) +cvContainer + = lens _cvContainer (\ s a -> s{_cvContainer = a}) + +-- | A value of true indicates this container version has been deleted. +cvDeleted :: Lens' ContainerVersion (Maybe Bool) +cvDeleted + = lens _cvDeleted (\ s a -> s{_cvDeleted = a}) + +-- | The triggers in the container that this version was taken from. +cvTrigger :: Lens' ContainerVersion [Maybe Trigger] +cvTrigger + = lens _cvTrigger (\ s a -> s{_cvTrigger = a}) . + _Default + . _Coerce + +-- | User notes on how to apply this container version in the container. +cvNotes :: Lens' ContainerVersion (Maybe Text) +cvNotes = lens _cvNotes (\ s a -> s{_cvNotes = a}) + +instance FromJSON ContainerVersion where + parseJSON + = withObject "ContainerVersion" + (\ o -> + ContainerVersion <$> + (o .:? "macro" .!= mempty) <*> + (o .:? "tag" .!= mempty) + <*> (o .:? "containerId") + <*> (o .:? "fingerprint") + <*> (o .:? "containerVersionId") + <*> (o .:? "rule" .!= mempty) + <*> (o .:? "folder" .!= mempty) + <*> (o .:? "variable" .!= mempty) + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "container") + <*> (o .:? "deleted") + <*> (o .:? "trigger" .!= mempty) + <*> (o .:? "notes")) + +instance ToJSON ContainerVersion where + toJSON ContainerVersion{..} + = object + (catMaybes + [("macro" .=) <$> _cvMacro, ("tag" .=) <$> _cvTag, + ("containerId" .=) <$> _cvContainerId, + ("fingerprint" .=) <$> _cvFingerprint, + ("containerVersionId" .=) <$> _cvContainerVersionId, + ("rule" .=) <$> _cvRule, ("folder" .=) <$> _cvFolder, + ("variable" .=) <$> _cvVariable, + ("accountId" .=) <$> _cvAccountId, + ("name" .=) <$> _cvName, + ("container" .=) <$> _cvContainer, + ("deleted" .=) <$> _cvDeleted, + ("trigger" .=) <$> _cvTrigger, + ("notes" .=) <$> _cvNotes]) + +-- | List Tags Response. +-- +-- /See:/ 'listTagsResponse' smart constructor. +newtype ListTagsResponse = ListTagsResponse + { _ltrTags :: Maybe [Maybe Tag] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListTagsResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltrTags' +listTagsResponse + :: ListTagsResponse +listTagsResponse = + ListTagsResponse + { _ltrTags = Nothing + } + +-- | All GTM Tags of a GTM Container. +ltrTags :: Lens' ListTagsResponse [Maybe Tag] +ltrTags + = lens _ltrTags (\ s a -> s{_ltrTags = a}) . _Default + . _Coerce + +instance FromJSON ListTagsResponse where + parseJSON + = withObject "ListTagsResponse" + (\ o -> + ListTagsResponse <$> (o .:? "tags" .!= mempty)) + +instance ToJSON ListTagsResponse where + toJSON ListTagsResponse{..} + = object (catMaybes [("tags" .=) <$> _ltrTags]) + +-- | List Macros Response. +-- +-- /See:/ 'listMACrosResponse' smart constructor. +newtype ListMACrosResponse = ListMACrosResponse + { _lmacrMacros :: Maybe [Maybe MACro] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ListMACrosResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lmacrMacros' +listMACrosResponse + :: ListMACrosResponse +listMACrosResponse = + ListMACrosResponse + { _lmacrMacros = Nothing + } + +-- | All GTM Macros of a GTM Container. +lmacrMacros :: Lens' ListMACrosResponse [Maybe MACro] +lmacrMacros + = lens _lmacrMacros (\ s a -> s{_lmacrMacros = a}) . + _Default + . _Coerce + +instance FromJSON ListMACrosResponse where + parseJSON + = withObject "ListMACrosResponse" + (\ o -> + ListMACrosResponse <$> (o .:? "macros" .!= mempty)) + +instance ToJSON ListMACrosResponse where + toJSON ListMACrosResponse{..} + = object (catMaybes [("macros" .=) <$> _lmacrMacros]) + +-- | Represents a Google Tag Manager Trigger +-- +-- /See:/ 'trigger' smart constructor. +data Trigger = Trigger + { _tCustomEventFilter :: !(Maybe [Maybe Condition]) + , _tParentFolderId :: !(Maybe Text) + , _tContainerId :: !(Maybe Text) + , _tTriggerId :: !(Maybe Text) + , _tCheckValidation :: !(Maybe (Maybe Parameter)) + , _tFingerprint :: !(Maybe Text) + , _tAutoEventFilter :: !(Maybe [Maybe Condition]) + , _tUniqueTriggerId :: !(Maybe (Maybe Parameter)) + , _tAccountId :: !(Maybe Text) + , _tName :: !(Maybe Text) + , _tInterval :: !(Maybe (Maybe Parameter)) + , _tEnableAllVideos :: !(Maybe (Maybe Parameter)) + , _tWaitForTagsTimeout :: !(Maybe (Maybe Parameter)) + , _tLimit :: !(Maybe (Maybe Parameter)) + , _tFilter :: !(Maybe [Maybe Condition]) + , _tType :: !(Maybe Text) + , _tVideoPercentageList :: !(Maybe (Maybe Parameter)) + , _tEventName :: !(Maybe (Maybe Parameter)) + , _tWaitForTags :: !(Maybe (Maybe Parameter)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Trigger' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tCustomEventFilter' +-- +-- * 'tParentFolderId' +-- +-- * 'tContainerId' +-- +-- * 'tTriggerId' +-- +-- * 'tCheckValidation' +-- +-- * 'tFingerprint' +-- +-- * 'tAutoEventFilter' +-- +-- * 'tUniqueTriggerId' +-- +-- * 'tAccountId' +-- +-- * 'tName' +-- +-- * 'tInterval' +-- +-- * 'tEnableAllVideos' +-- +-- * 'tWaitForTagsTimeout' +-- +-- * 'tLimit' +-- +-- * 'tFilter' +-- +-- * 'tType' +-- +-- * 'tVideoPercentageList' +-- +-- * 'tEventName' +-- +-- * 'tWaitForTags' +trigger + :: Trigger +trigger = + Trigger + { _tCustomEventFilter = Nothing + , _tParentFolderId = Nothing + , _tContainerId = Nothing + , _tTriggerId = Nothing + , _tCheckValidation = Nothing + , _tFingerprint = Nothing + , _tAutoEventFilter = Nothing + , _tUniqueTriggerId = Nothing + , _tAccountId = Nothing + , _tName = Nothing + , _tInterval = Nothing + , _tEnableAllVideos = Nothing + , _tWaitForTagsTimeout = Nothing + , _tLimit = Nothing + , _tFilter = Nothing + , _tType = Nothing + , _tVideoPercentageList = Nothing + , _tEventName = Nothing + , _tWaitForTags = Nothing + } + +-- | Used in the case of custom event, which is fired iff all Conditions are +-- true. +tCustomEventFilter :: Lens' Trigger [Maybe Condition] +tCustomEventFilter + = lens _tCustomEventFilter + (\ s a -> s{_tCustomEventFilter = a}) + . _Default + . _Coerce + +-- | Parent folder id. +tParentFolderId :: Lens' Trigger (Maybe Text) +tParentFolderId + = lens _tParentFolderId + (\ s a -> s{_tParentFolderId = a}) + +-- | GTM Container ID. +tContainerId :: Lens' Trigger (Maybe Text) +tContainerId + = lens _tContainerId (\ s a -> s{_tContainerId = a}) + +-- | The Trigger ID uniquely identifies the GTM Trigger. +tTriggerId :: Lens' Trigger (Maybe Text) +tTriggerId + = lens _tTriggerId (\ s a -> s{_tTriggerId = a}) + +-- | Whether or not we should only fire tags if the form submit or link click +-- event is not cancelled by some other event handler (e.g. because of +-- validation). Only valid for Form Submission and Link Click triggers. +tCheckValidation :: Lens' Trigger (Maybe (Maybe Parameter)) +tCheckValidation + = lens _tCheckValidation + (\ s a -> s{_tCheckValidation = a}) + +-- | The fingerprint of the GTM Trigger as computed at storage time. This +-- value is recomputed whenever the trigger is modified. +tFingerprint :: Lens' Trigger (Maybe Text) +tFingerprint + = lens _tFingerprint (\ s a -> s{_tFingerprint = a}) + +-- | Used in the case of auto event tracking. +tAutoEventFilter :: Lens' Trigger [Maybe Condition] +tAutoEventFilter + = lens _tAutoEventFilter + (\ s a -> s{_tAutoEventFilter = a}) + . _Default + . _Coerce + +-- | Globally unique id of the trigger that auto-generates this (a Form +-- Submit, Link Click or Timer listener) if any. Used to make incompatible +-- auto-events work together with trigger filtering based on trigger ids. +-- This value is populated during output generation since the tags implied +-- by triggers don\'t exist until then. Only valid for Form Submit, Link +-- Click and Timer triggers. +tUniqueTriggerId :: Lens' Trigger (Maybe (Maybe Parameter)) +tUniqueTriggerId + = lens _tUniqueTriggerId + (\ s a -> s{_tUniqueTriggerId = a}) + +-- | GTM Account ID. +tAccountId :: Lens' Trigger (Maybe Text) +tAccountId + = lens _tAccountId (\ s a -> s{_tAccountId = a}) + +-- | Trigger display name. +tName :: Lens' Trigger (Maybe Text) +tName = lens _tName (\ s a -> s{_tName = a}) + +-- | Time between triggering recurring Timer Events (in milliseconds). Only +-- valid for Timer triggers. +tInterval :: Lens' Trigger (Maybe (Maybe Parameter)) +tInterval + = lens _tInterval (\ s a -> s{_tInterval = a}) + +-- | Reloads the videos in the page that don\'t already have the YT API +-- enabled. If false, only capture events from videos that already have the +-- API enabled. Only valid for YouTube triggers. +tEnableAllVideos :: Lens' Trigger (Maybe (Maybe Parameter)) +tEnableAllVideos + = lens _tEnableAllVideos + (\ s a -> s{_tEnableAllVideos = a}) + +-- | How long to wait (in milliseconds) for tags to fire when +-- \'waits_for_tags\' above evaluates to true. Only valid for Form +-- Submission and Link Click triggers. +tWaitForTagsTimeout :: Lens' Trigger (Maybe (Maybe Parameter)) +tWaitForTagsTimeout + = lens _tWaitForTagsTimeout + (\ s a -> s{_tWaitForTagsTimeout = a}) + +-- | Limit of the number of GTM events this Timer Trigger will fire. If no +-- limit is set, we will continue to fire GTM events until the user leaves +-- the page. Only valid for Timer triggers. +tLimit :: Lens' Trigger (Maybe (Maybe Parameter)) +tLimit = lens _tLimit (\ s a -> s{_tLimit = a}) + +-- | The trigger will only fire iff all Conditions are true. +tFilter :: Lens' Trigger [Maybe Condition] +tFilter + = lens _tFilter (\ s a -> s{_tFilter = a}) . _Default + . _Coerce + +-- | Defines the data layer event that causes this trigger. +tType :: Lens' Trigger (Maybe Text) +tType = lens _tType (\ s a -> s{_tType = a}) + +-- | List of integer percentage values. The trigger will fire as each +-- percentage is reached in any instrumented videos. Only valid for YouTube +-- triggers. +tVideoPercentageList :: Lens' Trigger (Maybe (Maybe Parameter)) +tVideoPercentageList + = lens _tVideoPercentageList + (\ s a -> s{_tVideoPercentageList = a}) + +-- | Name of the GTM event that is fired. Only valid for Timer triggers. +tEventName :: Lens' Trigger (Maybe (Maybe Parameter)) +tEventName + = lens _tEventName (\ s a -> s{_tEventName = a}) + +-- | Whether or not we should delay the form submissions or link opening +-- until all of the tags have fired (by preventing the default action and +-- later simulating the default action). Only valid for Form Submission and +-- Link Click triggers. +tWaitForTags :: Lens' Trigger (Maybe (Maybe Parameter)) +tWaitForTags + = lens _tWaitForTags (\ s a -> s{_tWaitForTags = a}) + +instance FromJSON Trigger where + parseJSON + = withObject "Trigger" + (\ o -> + Trigger <$> + (o .:? "customEventFilter" .!= mempty) <*> + (o .:? "parentFolderId") + <*> (o .:? "containerId") + <*> (o .:? "triggerId") + <*> (o .:? "checkValidation") + <*> (o .:? "fingerprint") + <*> (o .:? "autoEventFilter" .!= mempty) + <*> (o .:? "uniqueTriggerId") + <*> (o .:? "accountId") + <*> (o .:? "name") + <*> (o .:? "interval") + <*> (o .:? "enableAllVideos") + <*> (o .:? "waitForTagsTimeout") + <*> (o .:? "limit") + <*> (o .:? "filter" .!= mempty) + <*> (o .:? "type") + <*> (o .:? "videoPercentageList") + <*> (o .:? "eventName") + <*> (o .:? "waitForTags")) + +instance ToJSON Trigger where + toJSON Trigger{..} + = object + (catMaybes + [("customEventFilter" .=) <$> _tCustomEventFilter, + ("parentFolderId" .=) <$> _tParentFolderId, + ("containerId" .=) <$> _tContainerId, + ("triggerId" .=) <$> _tTriggerId, + ("checkValidation" .=) <$> _tCheckValidation, + ("fingerprint" .=) <$> _tFingerprint, + ("autoEventFilter" .=) <$> _tAutoEventFilter, + ("uniqueTriggerId" .=) <$> _tUniqueTriggerId, + ("accountId" .=) <$> _tAccountId, + ("name" .=) <$> _tName, + ("interval" .=) <$> _tInterval, + ("enableAllVideos" .=) <$> _tEnableAllVideos, + ("waitForTagsTimeout" .=) <$> _tWaitForTagsTimeout, + ("limit" .=) <$> _tLimit, ("filter" .=) <$> _tFilter, + ("type" .=) <$> _tType, + ("videoPercentageList" .=) <$> _tVideoPercentageList, + ("eventName" .=) <$> _tEventName, + ("waitForTags" .=) <$> _tWaitForTags]) + +-- | Represents a predicate. +-- +-- /See:/ 'condition' smart constructor. +data Condition = Condition + { _cType :: !(Maybe Text) + , _cParameter :: !(Maybe [Maybe Parameter]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Condition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cType' +-- +-- * 'cParameter' +condition + :: Condition +condition = + Condition + { _cType = Nothing + , _cParameter = Nothing + } + +-- | The type of operator for this condition. +cType :: Lens' Condition (Maybe Text) +cType = lens _cType (\ s a -> s{_cType = a}) + +-- | A list of named parameters (key\/value), depending on the condition\'s +-- type. Notes: - For binary operators, include parameters named arg0 and +-- arg1 for specifying the left and right operands, respectively. - At this +-- time, the left operand (arg0) must be a reference to a macro. - For +-- case-insensitive Regex matching, include a boolean parameter named +-- ignore_case that is set to true. If not specified or set to any other +-- value, the matching will be case sensitive. - To negate an operator, +-- include a boolean parameter named negate boolean parameter that is set +-- to true. +cParameter :: Lens' Condition [Maybe Parameter] +cParameter + = lens _cParameter (\ s a -> s{_cParameter = a}) . + _Default + . _Coerce + +instance FromJSON Condition where + parseJSON + = withObject "Condition" + (\ o -> + Condition <$> + (o .:? "type") <*> (o .:? "parameter" .!= mempty)) + +instance ToJSON Condition where + toJSON Condition{..} + = object + (catMaybes + [("type" .=) <$> _cType, + ("parameter" .=) <$> _cParameter]) + +-- | Represents a Google Tag Manager Folder\'s contents. +-- +-- /See:/ 'folderEntities' smart constructor. +data FolderEntities = FolderEntities + { _feTag :: !(Maybe [Maybe Tag]) + , _feVariable :: !(Maybe [Maybe Variable]) + , _feTrigger :: !(Maybe [Maybe Trigger]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'FolderEntities' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'feTag' +-- +-- * 'feVariable' +-- +-- * 'feTrigger' +folderEntities + :: FolderEntities +folderEntities = + FolderEntities + { _feTag = Nothing + , _feVariable = Nothing + , _feTrigger = Nothing + } + +-- | The list of tags inside the folder. +feTag :: Lens' FolderEntities [Maybe Tag] +feTag + = lens _feTag (\ s a -> s{_feTag = a}) . _Default . + _Coerce + +-- | The list of variables inside the folder. +feVariable :: Lens' FolderEntities [Maybe Variable] +feVariable + = lens _feVariable (\ s a -> s{_feVariable = a}) . + _Default + . _Coerce + +-- | The list of triggers inside the folder. +feTrigger :: Lens' FolderEntities [Maybe Trigger] +feTrigger + = lens _feTrigger (\ s a -> s{_feTrigger = a}) . + _Default + . _Coerce + +instance FromJSON FolderEntities where + parseJSON + = withObject "FolderEntities" + (\ o -> + FolderEntities <$> + (o .:? "tag" .!= mempty) <*> + (o .:? "variable" .!= mempty) + <*> (o .:? "trigger" .!= mempty)) + +instance ToJSON FolderEntities where + toJSON FolderEntities{..} + = object + (catMaybes + [("tag" .=) <$> _feTag, + ("variable" .=) <$> _feVariable, + ("trigger" .=) <$> _feTrigger]) + +-- | Defines the Google Tag Manager Container access permissions. +-- +-- /See:/ 'containerAccess' smart constructor. +data ContainerAccess = ContainerAccess + { _caContainerId :: !(Maybe Text) + , _caPermission :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContainerAccess' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'caContainerId' +-- +-- * 'caPermission' +containerAccess + :: ContainerAccess +containerAccess = + ContainerAccess + { _caContainerId = Nothing + , _caPermission = Nothing + } + +-- | GTM Container ID. +caContainerId :: Lens' ContainerAccess (Maybe Text) +caContainerId + = lens _caContainerId + (\ s a -> s{_caContainerId = a}) + +-- | List of Container permissions. Valid container permissions are: read, +-- edit, delete, publish. +caPermission :: Lens' ContainerAccess [Text] +caPermission + = lens _caPermission (\ s a -> s{_caPermission = a}) + . _Default + . _Coerce + +instance FromJSON ContainerAccess where + parseJSON + = withObject "ContainerAccess" + (\ o -> + ContainerAccess <$> + (o .:? "containerId") <*> + (o .:? "permission" .!= mempty)) + +instance ToJSON ContainerAccess where + toJSON ContainerAccess{..} + = object + (catMaybes + [("containerId" .=) <$> _caContainerId, + ("permission" .=) <$> _caPermission]) + +-- | Represents a Google Tag Manager Parameter. +-- +-- /See:/ 'parameter' smart constructor. +data Parameter = Parameter + { _pList :: !(Maybe [Maybe Parameter]) + , _pValue :: !(Maybe Text) + , _pMap :: !(Maybe [Maybe Parameter]) + , _pKey :: !(Maybe Text) + , _pType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Parameter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pList' +-- +-- * 'pValue' +-- +-- * 'pMap' +-- +-- * 'pKey' +-- +-- * 'pType' +parameter + :: Parameter +parameter = + Parameter + { _pList = Nothing + , _pValue = Nothing + , _pMap = Nothing + , _pKey = Nothing + , _pType = Nothing + } + +-- | This list parameter\'s parameters (keys will be ignored). +pList :: Lens' Parameter [Maybe Parameter] +pList + = lens _pList (\ s a -> s{_pList = a}) . _Default . + _Coerce + +-- | A parameter\'s value (may contain macro references such as +-- \"{{myMacro}}\") as appropriate to the specified type. +pValue :: Lens' Parameter (Maybe Text) +pValue = lens _pValue (\ s a -> s{_pValue = a}) + +-- | This map parameter\'s parameters (must have keys; keys must be unique). +pMap :: Lens' Parameter [Maybe Parameter] +pMap + = lens _pMap (\ s a -> s{_pMap = a}) . _Default . + _Coerce + +-- | The named key that uniquely identifies a parameter. Required for +-- top-level parameters, as well as map values. Ignored for list values. +pKey :: Lens' Parameter (Maybe Text) +pKey = lens _pKey (\ s a -> s{_pKey = a}) + +-- | The parameter type. Valid values are: - boolean: The value represents a +-- boolean, represented as \'true\' or \'false\' - integer: The value +-- represents a 64-bit signed integer value, in base 10 - list: A list of +-- parameters should be specified - map: A map of parameters should be +-- specified - template: The value represents any text; this can include +-- macro references (even macro references that might return non-string +-- types) +pType :: Lens' Parameter (Maybe Text) +pType = lens _pType (\ s a -> s{_pType = a}) + +instance FromJSON Parameter where + parseJSON + = withObject "Parameter" + (\ o -> + Parameter <$> + (o .:? "list" .!= mempty) <*> (o .:? "value") <*> + (o .:? "map" .!= mempty) + <*> (o .:? "key") + <*> (o .:? "type")) + +instance ToJSON Parameter where + toJSON Parameter{..} + = object + (catMaybes + [("list" .=) <$> _pList, ("value" .=) <$> _pValue, + ("map" .=) <$> _pMap, ("key" .=) <$> _pKey, + ("type" .=) <$> _pType]) diff --git a/gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs b/gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs new file mode 100644 index 000000000..cb7922fde --- /dev/null +++ b/gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.TagManager.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.TagManager.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-tagmanager/gogol-tagmanager.cabal b/gogol-tagmanager/gogol-tagmanager.cabal new file mode 100644 index 000000000..82f6d6beb --- /dev/null +++ b/gogol-tagmanager/gogol-tagmanager.cabal @@ -0,0 +1,95 @@ +name: gogol-tagmanager +version: 0.0.1 +synopsis: Tag Manager API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + API for accessing Tag Manager accounts and containers. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.TagManager.Accounts.Containers.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.Entities.List + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.List + , Network.Google.Resource.TagManager.Accounts.Containers.Folders.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Get + , Network.Google.Resource.TagManager.Accounts.Containers.List + , Network.Google.Resource.TagManager.Accounts.Containers.MACros.Create + , Network.Google.Resource.TagManager.Accounts.Containers.MACros.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.MACros.Get + , Network.Google.Resource.TagManager.Accounts.Containers.MACros.List + , Network.Google.Resource.TagManager.Accounts.Containers.MACros.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Move_folders.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Rules.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Rules.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Rules.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Rules.List + , Network.Google.Resource.TagManager.Accounts.Containers.Rules.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Tags.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Tags.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Tags.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Tags.List + , Network.Google.Resource.TagManager.Accounts.Containers.Tags.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Triggers.List + , Network.Google.Resource.TagManager.Accounts.Containers.Triggers.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Variables.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Variables.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Variables.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Variables.List + , Network.Google.Resource.TagManager.Accounts.Containers.Variables.Update + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Create + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Delete + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Get + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.List + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Publish + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Restore + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Undelete + , Network.Google.Resource.TagManager.Accounts.Containers.Versions.Update + , Network.Google.Resource.TagManager.Accounts.Get + , Network.Google.Resource.TagManager.Accounts.List + , Network.Google.Resource.TagManager.Accounts.Permissions.Create + , Network.Google.Resource.TagManager.Accounts.Permissions.Delete + , Network.Google.Resource.TagManager.Accounts.Permissions.Get + , Network.Google.Resource.TagManager.Accounts.Permissions.List + , Network.Google.Resource.TagManager.Accounts.Permissions.Update + , Network.Google.Resource.TagManager.Accounts.Update + , Network.Google.TagManager + , Network.Google.TagManager.Types + + other-modules: + Network.Google.TagManager.Types.Product + , Network.Google.TagManager.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-tagmanager/src/.gitkeep b/gogol-tagmanager/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-translate/LICENSE b/gogol-translate/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-translate/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-translate/Makefile b/gogol-translate/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-translate/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-translate/README.md b/gogol-translate/README.md new file mode 100644 index 000000000..061873563 --- /dev/null +++ b/gogol-translate/README.md @@ -0,0 +1,28 @@ +# gogol-translate + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Translate API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-translate` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-translate/Setup.hs b/gogol-translate/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-translate/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-translate/gen/Network/Google/Resource/Language/Detections/List.hs b/gogol-translate/gen/Network/Google/Resource/Language/Detections/List.hs new file mode 100644 index 000000000..e086b2729 --- /dev/null +++ b/gogol-translate/gen/Network/Google/Resource/Language/Detections/List.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Language.Detections.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Detect the language of text. +-- +-- /See:/ for @LanguageDetectionsList@. +module Language.Detections.List + ( + -- * REST Resource + DetectionsListAPI + + -- * Creating a Request + , detectionsList + , DetectionsList + + -- * Request Lenses + , dlQuotaUser + , dlPrettyPrint + , dlUserIp + , dlQ + , dlKey + , dlOauthToken + , dlFields + , dlAlt + ) where + +import Network.Google.Prelude +import Network.Google.Translate.Types + +-- | A resource alias for @LanguageDetectionsList@ which the +-- 'DetectionsList' request conforms to. +type DetectionsListAPI = + "v2" :> + "detect" :> + QueryParams "q" Text :> + Get '[JSON] DetectionsListResponse + +-- | Detect the language of text. +-- +-- /See:/ 'detectionsList' smart constructor. +data DetectionsList = DetectionsList + { _dlQuotaUser :: !(Maybe Text) + , _dlPrettyPrint :: !Bool + , _dlUserIp :: !(Maybe Text) + , _dlQ :: !Text + , _dlKey :: !(Maybe Text) + , _dlOauthToken :: !(Maybe Text) + , _dlFields :: !(Maybe Text) + , _dlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DetectionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlQuotaUser' +-- +-- * 'dlPrettyPrint' +-- +-- * 'dlUserIp' +-- +-- * 'dlQ' +-- +-- * 'dlKey' +-- +-- * 'dlOauthToken' +-- +-- * 'dlFields' +-- +-- * 'dlAlt' +detectionsList + :: Text -- ^ 'q' + -> DetectionsList +detectionsList pDlQ_ = + DetectionsList + { _dlQuotaUser = Nothing + , _dlPrettyPrint = True + , _dlUserIp = Nothing + , _dlQ = pDlQ_ + , _dlKey = Nothing + , _dlOauthToken = Nothing + , _dlFields = Nothing + , _dlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +dlQuotaUser :: Lens' DetectionsList' (Maybe Text) +dlQuotaUser + = lens _dlQuotaUser (\ s a -> s{_dlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +dlPrettyPrint :: Lens' DetectionsList' Bool +dlPrettyPrint + = lens _dlPrettyPrint + (\ s a -> s{_dlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +dlUserIp :: Lens' DetectionsList' (Maybe Text) +dlUserIp = lens _dlUserIp (\ s a -> s{_dlUserIp = a}) + +-- | The text to detect +dlQ :: Lens' DetectionsList' Text +dlQ = lens _dlQ (\ s a -> s{_dlQ = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +dlKey :: Lens' DetectionsList' (Maybe Text) +dlKey = lens _dlKey (\ s a -> s{_dlKey = a}) + +-- | OAuth 2.0 token for the current user. +dlOauthToken :: Lens' DetectionsList' (Maybe Text) +dlOauthToken + = lens _dlOauthToken (\ s a -> s{_dlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +dlFields :: Lens' DetectionsList' (Maybe Text) +dlFields = lens _dlFields (\ s a -> s{_dlFields = a}) + +-- | Data format for the response. +dlAlt :: Lens' DetectionsList' Text +dlAlt = lens _dlAlt (\ s a -> s{_dlAlt = a}) + +instance GoogleRequest DetectionsList' where + type Rs DetectionsList' = DetectionsListResponse + request = requestWithRoute defReq translateURL + requestWithRoute r u DetectionsList{..} + = go _dlQuotaUser _dlPrettyPrint _dlUserIp + (Just _dlQ) + _dlKey + _dlOauthToken + _dlFields + _dlAlt + where go + = clientWithRoute (Proxy :: Proxy DetectionsListAPI) + r + u diff --git a/gogol-translate/gen/Network/Google/Resource/Language/Languages/List.hs b/gogol-translate/gen/Network/Google/Resource/Language/Languages/List.hs new file mode 100644 index 000000000..78e7fbc3a --- /dev/null +++ b/gogol-translate/gen/Network/Google/Resource/Language/Languages/List.hs @@ -0,0 +1,153 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Language.Languages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | List the source\/target languages supported by the API +-- +-- /See:/ for @LanguageLanguagesList@. +module Language.Languages.List + ( + -- * REST Resource + LanguagesListAPI + + -- * Creating a Request + , languagesList + , LanguagesList + + -- * Request Lenses + , llQuotaUser + , llPrettyPrint + , llUserIp + , llKey + , llOauthToken + , llTarget + , llFields + , llAlt + ) where + +import Network.Google.Prelude +import Network.Google.Translate.Types + +-- | A resource alias for @LanguageLanguagesList@ which the +-- 'LanguagesList' request conforms to. +type LanguagesListAPI = + "v2" :> + "languages" :> + QueryParam "target" Text :> + Get '[JSON] LanguagesListResponse + +-- | List the source\/target languages supported by the API +-- +-- /See:/ 'languagesList' smart constructor. +data LanguagesList = LanguagesList + { _llQuotaUser :: !(Maybe Text) + , _llPrettyPrint :: !Bool + , _llUserIp :: !(Maybe Text) + , _llKey :: !(Maybe Text) + , _llOauthToken :: !(Maybe Text) + , _llTarget :: !(Maybe Text) + , _llFields :: !(Maybe Text) + , _llAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LanguagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llQuotaUser' +-- +-- * 'llPrettyPrint' +-- +-- * 'llUserIp' +-- +-- * 'llKey' +-- +-- * 'llOauthToken' +-- +-- * 'llTarget' +-- +-- * 'llFields' +-- +-- * 'llAlt' +languagesList + :: LanguagesList +languagesList = + LanguagesList + { _llQuotaUser = Nothing + , _llPrettyPrint = True + , _llUserIp = Nothing + , _llKey = Nothing + , _llOauthToken = Nothing + , _llTarget = Nothing + , _llFields = Nothing + , _llAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +llQuotaUser :: Lens' LanguagesList' (Maybe Text) +llQuotaUser + = lens _llQuotaUser (\ s a -> s{_llQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +llPrettyPrint :: Lens' LanguagesList' Bool +llPrettyPrint + = lens _llPrettyPrint + (\ s a -> s{_llPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +llUserIp :: Lens' LanguagesList' (Maybe Text) +llUserIp = lens _llUserIp (\ s a -> s{_llUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +llKey :: Lens' LanguagesList' (Maybe Text) +llKey = lens _llKey (\ s a -> s{_llKey = a}) + +-- | OAuth 2.0 token for the current user. +llOauthToken :: Lens' LanguagesList' (Maybe Text) +llOauthToken + = lens _llOauthToken (\ s a -> s{_llOauthToken = a}) + +-- | the language and collation in which the localized results should be +-- returned +llTarget :: Lens' LanguagesList' (Maybe Text) +llTarget = lens _llTarget (\ s a -> s{_llTarget = a}) + +-- | Selector specifying which fields to include in a partial response. +llFields :: Lens' LanguagesList' (Maybe Text) +llFields = lens _llFields (\ s a -> s{_llFields = a}) + +-- | Data format for the response. +llAlt :: Lens' LanguagesList' Text +llAlt = lens _llAlt (\ s a -> s{_llAlt = a}) + +instance GoogleRequest LanguagesList' where + type Rs LanguagesList' = LanguagesListResponse + request = requestWithRoute defReq translateURL + requestWithRoute r u LanguagesList{..} + = go _llQuotaUser _llPrettyPrint _llUserIp _llKey + _llOauthToken + _llTarget + _llFields + _llAlt + where go + = clientWithRoute (Proxy :: Proxy LanguagesListAPI) r + u diff --git a/gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs b/gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs new file mode 100644 index 000000000..cd7e07528 --- /dev/null +++ b/gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Language.Translations.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns text translations from one language to another. +-- +-- /See:/ for @LanguageTranslationsList@. +module Language.Translations.List + ( + -- * REST Resource + TranslationsListAPI + + -- * Creating a Request + , translationsList + , TranslationsList + + -- * Request Lenses + , tlQuotaUser + , tlPrettyPrint + , tlUserIp + , tlFormat + , tlQ + , tlKey + , tlSource + , tlOauthToken + , tlCid + , tlTarget + , tlFields + , tlAlt + ) where + +import Network.Google.Prelude +import Network.Google.Translate.Types + +-- | A resource alias for @LanguageTranslationsList@ which the +-- 'TranslationsList' request conforms to. +type TranslationsListAPI = + "v2" :> + QueryParam "format" Text :> + QueryParams "q" Text :> + QueryParam "source" Text :> + QueryParams "cid" Text :> + QueryParam "target" Text :> + Get '[JSON] TranslationsListResponse + +-- | Returns text translations from one language to another. +-- +-- /See:/ 'translationsList' smart constructor. +data TranslationsList = TranslationsList + { _tlQuotaUser :: !(Maybe Text) + , _tlPrettyPrint :: !Bool + , _tlUserIp :: !(Maybe Text) + , _tlFormat :: !(Maybe Text) + , _tlQ :: !Text + , _tlKey :: !(Maybe Text) + , _tlSource :: !(Maybe Text) + , _tlOauthToken :: !(Maybe Text) + , _tlCid :: !(Maybe Text) + , _tlTarget :: !Text + , _tlFields :: !(Maybe Text) + , _tlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TranslationsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlQuotaUser' +-- +-- * 'tlPrettyPrint' +-- +-- * 'tlUserIp' +-- +-- * 'tlFormat' +-- +-- * 'tlQ' +-- +-- * 'tlKey' +-- +-- * 'tlSource' +-- +-- * 'tlOauthToken' +-- +-- * 'tlCid' +-- +-- * 'tlTarget' +-- +-- * 'tlFields' +-- +-- * 'tlAlt' +translationsList + :: Text -- ^ 'q' + -> Text -- ^ 'target' + -> TranslationsList +translationsList pTlQ_ pTlTarget_ = + TranslationsList + { _tlQuotaUser = Nothing + , _tlPrettyPrint = True + , _tlUserIp = Nothing + , _tlFormat = Nothing + , _tlQ = pTlQ_ + , _tlKey = Nothing + , _tlSource = Nothing + , _tlOauthToken = Nothing + , _tlCid = Nothing + , _tlTarget = pTlTarget_ + , _tlFields = Nothing + , _tlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tlQuotaUser :: Lens' TranslationsList' (Maybe Text) +tlQuotaUser + = lens _tlQuotaUser (\ s a -> s{_tlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tlPrettyPrint :: Lens' TranslationsList' Bool +tlPrettyPrint + = lens _tlPrettyPrint + (\ s a -> s{_tlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tlUserIp :: Lens' TranslationsList' (Maybe Text) +tlUserIp = lens _tlUserIp (\ s a -> s{_tlUserIp = a}) + +-- | The format of the text +tlFormat :: Lens' TranslationsList' (Maybe Text) +tlFormat = lens _tlFormat (\ s a -> s{_tlFormat = a}) + +-- | The text to translate +tlQ :: Lens' TranslationsList' Text +tlQ = lens _tlQ (\ s a -> s{_tlQ = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tlKey :: Lens' TranslationsList' (Maybe Text) +tlKey = lens _tlKey (\ s a -> s{_tlKey = a}) + +-- | The source language of the text +tlSource :: Lens' TranslationsList' (Maybe Text) +tlSource = lens _tlSource (\ s a -> s{_tlSource = a}) + +-- | OAuth 2.0 token for the current user. +tlOauthToken :: Lens' TranslationsList' (Maybe Text) +tlOauthToken + = lens _tlOauthToken (\ s a -> s{_tlOauthToken = a}) + +-- | The customization id for translate +tlCid :: Lens' TranslationsList' (Maybe Text) +tlCid = lens _tlCid (\ s a -> s{_tlCid = a}) + +-- | The target language into which the text should be translated +tlTarget :: Lens' TranslationsList' Text +tlTarget = lens _tlTarget (\ s a -> s{_tlTarget = a}) + +-- | Selector specifying which fields to include in a partial response. +tlFields :: Lens' TranslationsList' (Maybe Text) +tlFields = lens _tlFields (\ s a -> s{_tlFields = a}) + +-- | Data format for the response. +tlAlt :: Lens' TranslationsList' Text +tlAlt = lens _tlAlt (\ s a -> s{_tlAlt = a}) + +instance GoogleRequest TranslationsList' where + type Rs TranslationsList' = TranslationsListResponse + request = requestWithRoute defReq translateURL + requestWithRoute r u TranslationsList{..} + = go _tlQuotaUser _tlPrettyPrint _tlUserIp _tlFormat + (Just _tlQ) + _tlKey + _tlSource + _tlOauthToken + _tlCid + (Just _tlTarget) + _tlFields + _tlAlt + where go + = clientWithRoute + (Proxy :: Proxy TranslationsListAPI) + r + u diff --git a/gogol-translate/gen/Network/Google/Translate.hs b/gogol-translate/gen/Network/Google/Translate.hs new file mode 100644 index 000000000..b960b8c70 --- /dev/null +++ b/gogol-translate/gen/Network/Google/Translate.hs @@ -0,0 +1,82 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Translate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you translate text from one language to another +-- +-- /See:/ +module Network.Google.Translate + ( + -- * API + TranslateAPI + , translateAPI + , translateURL + + -- * Service Methods + + -- * REST Resources + + -- ** LanguageDetectionsList + , module Language.Detections.List + + -- ** LanguageLanguagesList + , module Language.Languages.List + + -- ** LanguageTranslationsList + , module Language.Translations.List + + -- * Types + + -- ** TranslationsResource + , TranslationsResource + , translationsResource + , trDetectedSourceLanguage + , trTranslatedText + + -- ** DetectionsListResponse + , DetectionsListResponse + , detectionsListResponse + , dlrDetections + + -- ** LanguagesListResponse + , LanguagesListResponse + , languagesListResponse + , llrLanguages + + -- ** LanguagesResource + , LanguagesResource + , languagesResource + , lrName + , lrLanguage + + -- ** TranslationsListResponse + , TranslationsListResponse + , translationsListResponse + , tlrTranslations + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Language.Detections.List +import Network.Google.Resource.Language.Languages.List +import Network.Google.Resource.Language.Translations.List +import Network.Google.Translate.Types + +{- $resources +TODO +-} + +type TranslateAPI = + Detections :<|> Languages :<|> Translations + +translateAPI :: Proxy TranslateAPI +translateAPI = Proxy diff --git a/gogol-translate/gen/Network/Google/Translate/Types.hs b/gogol-translate/gen/Network/Google/Translate/Types.hs new file mode 100644 index 000000000..939250a9f --- /dev/null +++ b/gogol-translate/gen/Network/Google/Translate/Types.hs @@ -0,0 +1,57 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Translate.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Translate.Types + ( + -- * Service URL + translateURL + + -- * TranslationsResource + , TranslationsResource + , translationsResource + , trDetectedSourceLanguage + , trTranslatedText + + -- * DetectionsListResponse + , DetectionsListResponse + , detectionsListResponse + , dlrDetections + + -- * LanguagesListResponse + , LanguagesListResponse + , languagesListResponse + , llrLanguages + + -- * LanguagesResource + , LanguagesResource + , languagesResource + , lrName + , lrLanguage + + -- * TranslationsListResponse + , TranslationsListResponse + , translationsListResponse + , tlrTranslations + ) where + +import Network.Google.Prelude +import Network.Google.Translate.Types.Product +import Network.Google.Translate.Types.Sum + +-- | URL referring to version 'v2' of the Translate API. +translateURL :: BaseURL +translateURL + = BaseUrl Https + "https://www.googleapis.com/language/translate/" + 443 diff --git a/gogol-translate/gen/Network/Google/Translate/Types/Product.hs b/gogol-translate/gen/Network/Google/Translate/Types/Product.hs new file mode 100644 index 000000000..893bebe1b --- /dev/null +++ b/gogol-translate/gen/Network/Google/Translate/Types/Product.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Translate.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Translate.Types.Product where + +import Network.Google.Prelude +import Network.Google.Translate.Types.Sum + +-- +-- /See:/ 'translationsResource' smart constructor. +data TranslationsResource = TranslationsResource + { _trDetectedSourceLanguage :: !(Maybe Text) + , _trTranslatedText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TranslationsResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'trDetectedSourceLanguage' +-- +-- * 'trTranslatedText' +translationsResource + :: TranslationsResource +translationsResource = + TranslationsResource + { _trDetectedSourceLanguage = Nothing + , _trTranslatedText = Nothing + } + +-- | Detected source language if source parameter is unspecified. +trDetectedSourceLanguage :: Lens' TranslationsResource (Maybe Text) +trDetectedSourceLanguage + = lens _trDetectedSourceLanguage + (\ s a -> s{_trDetectedSourceLanguage = a}) + +-- | The translation. +trTranslatedText :: Lens' TranslationsResource (Maybe Text) +trTranslatedText + = lens _trTranslatedText + (\ s a -> s{_trTranslatedText = a}) + +instance FromJSON TranslationsResource where + parseJSON + = withObject "TranslationsResource" + (\ o -> + TranslationsResource <$> + (o .:? "detectedSourceLanguage") <*> + (o .:? "translatedText")) + +instance ToJSON TranslationsResource where + toJSON TranslationsResource{..} + = object + (catMaybes + [("detectedSourceLanguage" .=) <$> + _trDetectedSourceLanguage, + ("translatedText" .=) <$> _trTranslatedText]) + +-- +-- /See:/ 'detectionsListResponse' smart constructor. +newtype DetectionsListResponse = DetectionsListResponse + { _dlrDetections :: Maybe [Maybe [DetectionsResourceItem]] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'DetectionsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'dlrDetections' +detectionsListResponse + :: DetectionsListResponse +detectionsListResponse = + DetectionsListResponse + { _dlrDetections = Nothing + } + +-- | A detections contains detection results of several text +dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]] +dlrDetections + = lens _dlrDetections + (\ s a -> s{_dlrDetections = a}) + . _Default + . _Coerce + +instance FromJSON DetectionsListResponse where + parseJSON + = withObject "DetectionsListResponse" + (\ o -> + DetectionsListResponse <$> + (o .:? "detections" .!= mempty)) + +instance ToJSON DetectionsListResponse where + toJSON DetectionsListResponse{..} + = object + (catMaybes [("detections" .=) <$> _dlrDetections]) + +-- +-- /See:/ 'languagesListResponse' smart constructor. +newtype LanguagesListResponse = LanguagesListResponse + { _llrLanguages :: Maybe [Maybe LanguagesResource] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LanguagesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'llrLanguages' +languagesListResponse + :: LanguagesListResponse +languagesListResponse = + LanguagesListResponse + { _llrLanguages = Nothing + } + +-- | List of source\/target languages supported by the translation API. If +-- target parameter is unspecified, the list is sorted by the ASCII code +-- point order of the language code. If target parameter is specified, the +-- list is sorted by the collation order of the language name in the target +-- language. +llrLanguages :: Lens' LanguagesListResponse [Maybe LanguagesResource] +llrLanguages + = lens _llrLanguages (\ s a -> s{_llrLanguages = a}) + . _Default + . _Coerce + +instance FromJSON LanguagesListResponse where + parseJSON + = withObject "LanguagesListResponse" + (\ o -> + LanguagesListResponse <$> + (o .:? "languages" .!= mempty)) + +instance ToJSON LanguagesListResponse where + toJSON LanguagesListResponse{..} + = object + (catMaybes [("languages" .=) <$> _llrLanguages]) + +-- +-- /See:/ 'languagesResource' smart constructor. +data LanguagesResource = LanguagesResource + { _lrName :: !(Maybe Text) + , _lrLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LanguagesResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lrName' +-- +-- * 'lrLanguage' +languagesResource + :: LanguagesResource +languagesResource = + LanguagesResource + { _lrName = Nothing + , _lrLanguage = Nothing + } + +-- | The localized name of the language if target parameter is given. +lrName :: Lens' LanguagesResource (Maybe Text) +lrName = lens _lrName (\ s a -> s{_lrName = a}) + +-- | The language code. +lrLanguage :: Lens' LanguagesResource (Maybe Text) +lrLanguage + = lens _lrLanguage (\ s a -> s{_lrLanguage = a}) + +instance FromJSON LanguagesResource where + parseJSON + = withObject "LanguagesResource" + (\ o -> + LanguagesResource <$> + (o .:? "name") <*> (o .:? "language")) + +instance ToJSON LanguagesResource where + toJSON LanguagesResource{..} + = object + (catMaybes + [("name" .=) <$> _lrName, + ("language" .=) <$> _lrLanguage]) + +-- +-- /See:/ 'translationsListResponse' smart constructor. +newtype TranslationsListResponse = TranslationsListResponse + { _tlrTranslations :: Maybe [Maybe TranslationsResource] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TranslationsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tlrTranslations' +translationsListResponse + :: TranslationsListResponse +translationsListResponse = + TranslationsListResponse + { _tlrTranslations = Nothing + } + +-- | Translations contains list of translation results of given text +tlrTranslations :: Lens' TranslationsListResponse [Maybe TranslationsResource] +tlrTranslations + = lens _tlrTranslations + (\ s a -> s{_tlrTranslations = a}) + . _Default + . _Coerce + +instance FromJSON TranslationsListResponse where + parseJSON + = withObject "TranslationsListResponse" + (\ o -> + TranslationsListResponse <$> + (o .:? "translations" .!= mempty)) + +instance ToJSON TranslationsListResponse where + toJSON TranslationsListResponse{..} + = object + (catMaybes + [("translations" .=) <$> _tlrTranslations]) diff --git a/gogol-translate/gen/Network/Google/Translate/Types/Sum.hs b/gogol-translate/gen/Network/Google/Translate/Types/Sum.hs new file mode 100644 index 000000000..9b5b267de --- /dev/null +++ b/gogol-translate/gen/Network/Google/Translate/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.Translate.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.Translate.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-translate/gogol-translate.cabal b/gogol-translate/gogol-translate.cabal new file mode 100644 index 000000000..505b34639 --- /dev/null +++ b/gogol-translate/gogol-translate.cabal @@ -0,0 +1,45 @@ +name: gogol-translate +version: 0.0.1 +synopsis: Translate API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you translate text from one language to another + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Language.Detections.List + , Network.Google.Resource.Language.Languages.List + , Network.Google.Resource.Language.Translations.List + , Network.Google.Translate + , Network.Google.Translate.Types + + other-modules: + Network.Google.Translate.Types.Product + , Network.Google.Translate.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-translate/src/.gitkeep b/gogol-translate/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-urlshortener/LICENSE b/gogol-urlshortener/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-urlshortener/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-urlshortener/Makefile b/gogol-urlshortener/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-urlshortener/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-urlshortener/README.md b/gogol-urlshortener/README.md new file mode 100644 index 000000000..b929236c4 --- /dev/null +++ b/gogol-urlshortener/README.md @@ -0,0 +1,28 @@ +# gogol-urlshortener + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the URL Shortener API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-urlshortener` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-urlshortener/Setup.hs b/gogol-urlshortener/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-urlshortener/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Get.hs b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Get.hs new file mode 100644 index 000000000..5c463cb80 --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Get.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.URLShortener.URL.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Expands a short URL or gets creation time and analytics. +-- +-- /See:/ for @URLshortenerURLGet@. +module URLShortener.URL.Get + ( + -- * REST Resource + UrlGetAPI + + -- * Creating a Request + , uRLGet + , URLGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugUserIp + , ugKey + , ugProjection + , ugOauthToken + , ugShortUrl + , ugFields + , ugAlt + ) where + +import Network.Google.Prelude +import Network.Google.URLShortener.Types + +-- | A resource alias for @URLshortenerURLGet@ which the +-- 'URLGet' request conforms to. +type UrlGetAPI = + "url" :> + QueryParam "projection" Text :> + QueryParam "shortUrl" Text :> Get '[JSON] URL + +-- | Expands a short URL or gets creation time and analytics. +-- +-- /See:/ 'uRLGet' smart constructor. +data URLGet = URLGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugUserIp :: !(Maybe Text) + , _ugKey :: !(Maybe Text) + , _ugProjection :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugShortUrl :: !Text + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugUserIp' +-- +-- * 'ugKey' +-- +-- * 'ugProjection' +-- +-- * 'ugOauthToken' +-- +-- * 'ugShortUrl' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +uRLGet + :: Text -- ^ 'shortUrl' + -> URLGet +uRLGet pUgShortUrl_ = + URLGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugUserIp = Nothing + , _ugKey = Nothing + , _ugProjection = Nothing + , _ugOauthToken = Nothing + , _ugShortUrl = pUgShortUrl_ + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' URLGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' URLGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' URLGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' URLGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | Additional information to return. +ugProjection :: Lens' URLGet' (Maybe Text) +ugProjection + = lens _ugProjection (\ s a -> s{_ugProjection = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' URLGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | The short URL, including the protocol. +ugShortUrl :: Lens' URLGet' Text +ugShortUrl + = lens _ugShortUrl (\ s a -> s{_ugShortUrl = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' URLGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' URLGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest URLGet' where + type Rs URLGet' = URL + request = requestWithRoute defReq uRLShortenerURL + requestWithRoute r u URLGet{..} + = go _ugQuotaUser _ugPrettyPrint _ugUserIp _ugKey + _ugProjection + _ugOauthToken + (Just _ugShortUrl) + _ugFields + _ugAlt + where go + = clientWithRoute (Proxy :: Proxy UrlGetAPI) r u diff --git a/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Insert.hs b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Insert.hs new file mode 100644 index 000000000..651fd434c --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/Insert.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.URLShortener.URL.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new short URL. +-- +-- /See:/ for @URLshortenerURLInsert@. +module URLShortener.URL.Insert + ( + -- * REST Resource + UrlInsertAPI + + -- * Creating a Request + , uRLInsert + , URLInsert + + -- * Request Lenses + , uiQuotaUser + , uiPrettyPrint + , uiUserIp + , uiKey + , uiOauthToken + , uiFields + , uiAlt + ) where + +import Network.Google.Prelude +import Network.Google.URLShortener.Types + +-- | A resource alias for @URLshortenerURLInsert@ which the +-- 'URLInsert' request conforms to. +type UrlInsertAPI = "url" :> Post '[JSON] URL + +-- | Creates a new short URL. +-- +-- /See:/ 'uRLInsert' smart constructor. +data URLInsert = URLInsert + { _uiQuotaUser :: !(Maybe Text) + , _uiPrettyPrint :: !Bool + , _uiUserIp :: !(Maybe Text) + , _uiKey :: !(Maybe Text) + , _uiOauthToken :: !(Maybe Text) + , _uiFields :: !(Maybe Text) + , _uiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uiQuotaUser' +-- +-- * 'uiPrettyPrint' +-- +-- * 'uiUserIp' +-- +-- * 'uiKey' +-- +-- * 'uiOauthToken' +-- +-- * 'uiFields' +-- +-- * 'uiAlt' +uRLInsert + :: URLInsert +uRLInsert = + URLInsert + { _uiQuotaUser = Nothing + , _uiPrettyPrint = True + , _uiUserIp = Nothing + , _uiKey = Nothing + , _uiOauthToken = Nothing + , _uiFields = Nothing + , _uiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uiQuotaUser :: Lens' URLInsert' (Maybe Text) +uiQuotaUser + = lens _uiQuotaUser (\ s a -> s{_uiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uiPrettyPrint :: Lens' URLInsert' Bool +uiPrettyPrint + = lens _uiPrettyPrint + (\ s a -> s{_uiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uiUserIp :: Lens' URLInsert' (Maybe Text) +uiUserIp = lens _uiUserIp (\ s a -> s{_uiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uiKey :: Lens' URLInsert' (Maybe Text) +uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) + +-- | OAuth 2.0 token for the current user. +uiOauthToken :: Lens' URLInsert' (Maybe Text) +uiOauthToken + = lens _uiOauthToken (\ s a -> s{_uiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uiFields :: Lens' URLInsert' (Maybe Text) +uiFields = lens _uiFields (\ s a -> s{_uiFields = a}) + +-- | Data format for the response. +uiAlt :: Lens' URLInsert' Text +uiAlt = lens _uiAlt (\ s a -> s{_uiAlt = a}) + +instance GoogleRequest URLInsert' where + type Rs URLInsert' = URL + request = requestWithRoute defReq uRLShortenerURL + requestWithRoute r u URLInsert{..} + = go _uiQuotaUser _uiPrettyPrint _uiUserIp _uiKey + _uiOauthToken + _uiFields + _uiAlt + where go + = clientWithRoute (Proxy :: Proxy UrlInsertAPI) r u diff --git a/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/List.hs b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/List.hs new file mode 100644 index 000000000..4d2f7fe14 --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/Resource/URLShortener/URL/List.hs @@ -0,0 +1,165 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.URLShortener.URL.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of URLs shortened by a user. +-- +-- /See:/ for @URLshortenerURLList@. +module URLShortener.URL.List + ( + -- * REST Resource + UrlListAPI + + -- * Creating a Request + , uRLList + , URLList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulUserIp + , ulStartToken + , ulKey + , ulProjection + , ulOauthToken + , ulFields + , ulAlt + ) where + +import Network.Google.Prelude +import Network.Google.URLShortener.Types + +-- | A resource alias for @URLshortenerURLList@ which the +-- 'URLList' request conforms to. +type UrlListAPI = + "url" :> + "history" :> + QueryParam "start-token" Text :> + QueryParam "projection" Text :> + Get '[JSON] URLHistory + +-- | Retrieves a list of URLs shortened by a user. +-- +-- /See:/ 'uRLList' smart constructor. +data URLList = URLList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulUserIp :: !(Maybe Text) + , _ulStartToken :: !(Maybe Text) + , _ulKey :: !(Maybe Text) + , _ulProjection :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulUserIp' +-- +-- * 'ulStartToken' +-- +-- * 'ulKey' +-- +-- * 'ulProjection' +-- +-- * 'ulOauthToken' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +uRLList + :: URLList +uRLList = + URLList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulUserIp = Nothing + , _ulStartToken = Nothing + , _ulKey = Nothing + , _ulProjection = Nothing + , _ulOauthToken = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' URLList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' URLList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' URLList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | Token for requesting successive pages of results. +ulStartToken :: Lens' URLList' (Maybe Text) +ulStartToken + = lens _ulStartToken (\ s a -> s{_ulStartToken = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' URLList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | Additional information to return. +ulProjection :: Lens' URLList' (Maybe Text) +ulProjection + = lens _ulProjection (\ s a -> s{_ulProjection = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' URLList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' URLList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' URLList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest URLList' where + type Rs URLList' = URLHistory + request = requestWithRoute defReq uRLShortenerURL + requestWithRoute r u URLList{..} + = go _ulQuotaUser _ulPrettyPrint _ulUserIp + _ulStartToken + _ulKey + _ulProjection + _ulOauthToken + _ulFields + _ulAlt + where go + = clientWithRoute (Proxy :: Proxy UrlListAPI) r u diff --git a/gogol-urlshortener/gen/Network/Google/URLShortener.hs b/gogol-urlshortener/gen/Network/Google/URLShortener.hs new file mode 100644 index 000000000..3b45f49f8 --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/URLShortener.hs @@ -0,0 +1,98 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.URLShortener +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you create, inspect, and manage goo.gl short URLs +-- +-- /See:/ +module Network.Google.URLShortener + ( + -- * API + URLShortenerAPI + , uRLShortenerAPI + , uRLShortenerURL + + -- * Service Methods + + -- * REST Resources + + -- ** URLshortenerURLGet + , module URLShortener.URL.Get + + -- ** URLshortenerURLInsert + , module URLShortener.URL.Insert + + -- ** URLshortenerURLList + , module URLShortener.URL.List + + -- * Types + + -- ** URL + , URL + , uRL + , urlStatus + , urlKind + , urlCreated + , urlAnalytics + , urlLongUrl + , urlId + + -- ** StringCount + , StringCount + , stringCount + , scCount + , scId + + -- ** AnalyticsSnapshot + , AnalyticsSnapshot + , analyticsSnapshot + , asPlatforms + , asShortUrlClicks + , asReferrers + , asCountries + , asLongUrlClicks + , asBrowsers + + -- ** AnalyticsSummary + , AnalyticsSummary + , analyticsSummary + , asWeek + , asAllTime + , asDay + , asTwoHours + , asMonth + + -- ** URLHistory + , URLHistory + , uRLHistory + , uhTotalItems + , uhNextPageToken + , uhItemsPerPage + , uhKind + , uhItems + ) where + +import Network.Google.Prelude +import Network.Google.Resource.URLShortener.URL.Get +import Network.Google.Resource.URLShortener.URL.Insert +import Network.Google.Resource.URLShortener.URL.List +import Network.Google.URLShortener.Types + +{- $resources +TODO +-} + +type URLShortenerAPI = URL + +uRLShortenerAPI :: Proxy URLShortenerAPI +uRLShortenerAPI = Proxy diff --git a/gogol-urlshortener/gen/Network/Google/URLShortener/Types.hs b/gogol-urlshortener/gen/Network/Google/URLShortener/Types.hs new file mode 100644 index 000000000..94953409a --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/URLShortener/Types.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.URLShortener.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.URLShortener.Types + ( + -- * Service URL + uRLShortenerURL + + -- * URL + , URL + , uRL + , urlStatus + , urlKind + , urlCreated + , urlAnalytics + , urlLongUrl + , urlId + + -- * StringCount + , StringCount + , stringCount + , scCount + , scId + + -- * AnalyticsSnapshot + , AnalyticsSnapshot + , analyticsSnapshot + , asPlatforms + , asShortUrlClicks + , asReferrers + , asCountries + , asLongUrlClicks + , asBrowsers + + -- * AnalyticsSummary + , AnalyticsSummary + , analyticsSummary + , asWeek + , asAllTime + , asDay + , asTwoHours + , asMonth + + -- * URLHistory + , URLHistory + , uRLHistory + , uhTotalItems + , uhNextPageToken + , uhItemsPerPage + , uhKind + , uhItems + ) where + +import Network.Google.Prelude +import Network.Google.URLShortener.Types.Product +import Network.Google.URLShortener.Types.Sum + +-- | URL referring to version 'v1' of the URL Shortener API. +uRLShortenerURL :: BaseURL +uRLShortenerURL + = BaseUrl Https + "https://www.googleapis.com/urlshortener/v1/" + 443 diff --git a/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs b/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs new file mode 100644 index 000000000..dda1d93e4 --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs @@ -0,0 +1,420 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.URLShortener.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.URLShortener.Types.Product where + +import Network.Google.Prelude +import Network.Google.URLShortener.Types.Sum + +-- +-- /See:/ 'uRL' smart constructor. +data URL = URL + { _urlStatus :: !(Maybe Text) + , _urlKind :: !Text + , _urlCreated :: !(Maybe Text) + , _urlAnalytics :: !(Maybe (Maybe AnalyticsSummary)) + , _urlLongUrl :: !(Maybe Text) + , _urlId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URL' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'urlStatus' +-- +-- * 'urlKind' +-- +-- * 'urlCreated' +-- +-- * 'urlAnalytics' +-- +-- * 'urlLongUrl' +-- +-- * 'urlId' +uRL + :: URL +uRL = + URL + { _urlStatus = Nothing + , _urlKind = "urlshortener#url" + , _urlCreated = Nothing + , _urlAnalytics = Nothing + , _urlLongUrl = Nothing + , _urlId = Nothing + } + +-- | Status of the target URL. Possible values: \"OK\", \"MALWARE\", +-- \"PHISHING\", or \"REMOVED\". A URL might be marked \"REMOVED\" if it +-- was flagged as spam, for example. +urlStatus :: Lens' URL (Maybe Text) +urlStatus + = lens _urlStatus (\ s a -> s{_urlStatus = a}) + +-- | The fixed string \"urlshortener#url\". +urlKind :: Lens' URL Text +urlKind = lens _urlKind (\ s a -> s{_urlKind = a}) + +-- | Time the short URL was created; ISO 8601 representation using the +-- yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ format, e.g. +-- \"2010-10-14T19:01:24.944+00:00\". +urlCreated :: Lens' URL (Maybe Text) +urlCreated + = lens _urlCreated (\ s a -> s{_urlCreated = a}) + +-- | A summary of the click analytics for the short and long URL. Might not +-- be present if not requested or currently unavailable. +urlAnalytics :: Lens' URL (Maybe (Maybe AnalyticsSummary)) +urlAnalytics + = lens _urlAnalytics (\ s a -> s{_urlAnalytics = a}) + +-- | Long URL, e.g. \"http:\/\/www.google.com\/\". Might not be present if +-- the status is \"REMOVED\". +urlLongUrl :: Lens' URL (Maybe Text) +urlLongUrl + = lens _urlLongUrl (\ s a -> s{_urlLongUrl = a}) + +-- | Short URL, e.g. \"http:\/\/goo.gl\/l6MS\". +urlId :: Lens' URL (Maybe Text) +urlId = lens _urlId (\ s a -> s{_urlId = a}) + +instance FromJSON URL where + parseJSON + = withObject "URL" + (\ o -> + URL <$> + (o .:? "status") <*> + (o .:? "kind" .!= "urlshortener#url") + <*> (o .:? "created") + <*> (o .:? "analytics") + <*> (o .:? "longUrl") + <*> (o .:? "id")) + +instance ToJSON URL where + toJSON URL{..} + = object + (catMaybes + [("status" .=) <$> _urlStatus, + Just ("kind" .= _urlKind), + ("created" .=) <$> _urlCreated, + ("analytics" .=) <$> _urlAnalytics, + ("longUrl" .=) <$> _urlLongUrl, + ("id" .=) <$> _urlId]) + +-- +-- /See:/ 'stringCount' smart constructor. +data StringCount = StringCount + { _scCount :: !(Maybe Int64) + , _scId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'StringCount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scCount' +-- +-- * 'scId' +stringCount + :: StringCount +stringCount = + StringCount + { _scCount = Nothing + , _scId = Nothing + } + +-- | Number of clicks for this top entry, e.g. for this particular country or +-- browser. +scCount :: Lens' StringCount (Maybe Int64) +scCount = lens _scCount (\ s a -> s{_scCount = a}) + +-- | Label assigned to this top entry, e.g. \"US\" or \"Chrome\". +scId :: Lens' StringCount (Maybe Text) +scId = lens _scId (\ s a -> s{_scId = a}) + +instance FromJSON StringCount where + parseJSON + = withObject "StringCount" + (\ o -> + StringCount <$> (o .:? "count") <*> (o .:? "id")) + +instance ToJSON StringCount where + toJSON StringCount{..} + = object + (catMaybes + [("count" .=) <$> _scCount, ("id" .=) <$> _scId]) + +-- +-- /See:/ 'analyticsSnapshot' smart constructor. +data AnalyticsSnapshot = AnalyticsSnapshot + { _asPlatforms :: !(Maybe [Maybe StringCount]) + , _asShortUrlClicks :: !(Maybe Int64) + , _asReferrers :: !(Maybe [Maybe StringCount]) + , _asCountries :: !(Maybe [Maybe StringCount]) + , _asLongUrlClicks :: !(Maybe Int64) + , _asBrowsers :: !(Maybe [Maybe StringCount]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnalyticsSnapshot' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asPlatforms' +-- +-- * 'asShortUrlClicks' +-- +-- * 'asReferrers' +-- +-- * 'asCountries' +-- +-- * 'asLongUrlClicks' +-- +-- * 'asBrowsers' +analyticsSnapshot + :: AnalyticsSnapshot +analyticsSnapshot = + AnalyticsSnapshot + { _asPlatforms = Nothing + , _asShortUrlClicks = Nothing + , _asReferrers = Nothing + , _asCountries = Nothing + , _asLongUrlClicks = Nothing + , _asBrowsers = Nothing + } + +-- | Top platforms or OSes, e.g. \"Windows\"; sorted by (descending) click +-- counts. Only present if this data is available. +asPlatforms :: Lens' AnalyticsSnapshot [Maybe StringCount] +asPlatforms + = lens _asPlatforms (\ s a -> s{_asPlatforms = a}) . + _Default + . _Coerce + +-- | Number of clicks on this short URL. +asShortUrlClicks :: Lens' AnalyticsSnapshot (Maybe Int64) +asShortUrlClicks + = lens _asShortUrlClicks + (\ s a -> s{_asShortUrlClicks = a}) + +-- | Top referring hosts, e.g. \"www.google.com\"; sorted by (descending) +-- click counts. Only present if this data is available. +asReferrers :: Lens' AnalyticsSnapshot [Maybe StringCount] +asReferrers + = lens _asReferrers (\ s a -> s{_asReferrers = a}) . + _Default + . _Coerce + +-- | Top countries (expressed as country codes), e.g. \"US\" or \"DE\"; +-- sorted by (descending) click counts. Only present if this data is +-- available. +asCountries :: Lens' AnalyticsSnapshot [Maybe StringCount] +asCountries + = lens _asCountries (\ s a -> s{_asCountries = a}) . + _Default + . _Coerce + +-- | Number of clicks on all goo.gl short URLs pointing to this long URL. +asLongUrlClicks :: Lens' AnalyticsSnapshot (Maybe Int64) +asLongUrlClicks + = lens _asLongUrlClicks + (\ s a -> s{_asLongUrlClicks = a}) + +-- | Top browsers, e.g. \"Chrome\"; sorted by (descending) click counts. Only +-- present if this data is available. +asBrowsers :: Lens' AnalyticsSnapshot [Maybe StringCount] +asBrowsers + = lens _asBrowsers (\ s a -> s{_asBrowsers = a}) . + _Default + . _Coerce + +instance FromJSON AnalyticsSnapshot where + parseJSON + = withObject "AnalyticsSnapshot" + (\ o -> + AnalyticsSnapshot <$> + (o .:? "platforms" .!= mempty) <*> + (o .:? "shortUrlClicks") + <*> (o .:? "referrers" .!= mempty) + <*> (o .:? "countries" .!= mempty) + <*> (o .:? "longUrlClicks") + <*> (o .:? "browsers" .!= mempty)) + +instance ToJSON AnalyticsSnapshot where + toJSON AnalyticsSnapshot{..} + = object + (catMaybes + [("platforms" .=) <$> _asPlatforms, + ("shortUrlClicks" .=) <$> _asShortUrlClicks, + ("referrers" .=) <$> _asReferrers, + ("countries" .=) <$> _asCountries, + ("longUrlClicks" .=) <$> _asLongUrlClicks, + ("browsers" .=) <$> _asBrowsers]) + +-- +-- /See:/ 'analyticsSummary' smart constructor. +data AnalyticsSummary = AnalyticsSummary + { _asWeek :: !(Maybe (Maybe AnalyticsSnapshot)) + , _asAllTime :: !(Maybe (Maybe AnalyticsSnapshot)) + , _asDay :: !(Maybe (Maybe AnalyticsSnapshot)) + , _asTwoHours :: !(Maybe (Maybe AnalyticsSnapshot)) + , _asMonth :: !(Maybe (Maybe AnalyticsSnapshot)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AnalyticsSummary' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asWeek' +-- +-- * 'asAllTime' +-- +-- * 'asDay' +-- +-- * 'asTwoHours' +-- +-- * 'asMonth' +analyticsSummary + :: AnalyticsSummary +analyticsSummary = + AnalyticsSummary + { _asWeek = Nothing + , _asAllTime = Nothing + , _asDay = Nothing + , _asTwoHours = Nothing + , _asMonth = Nothing + } + +-- | Click analytics over the last week. +asWeek :: Lens' AnalyticsSummary (Maybe (Maybe AnalyticsSnapshot)) +asWeek = lens _asWeek (\ s a -> s{_asWeek = a}) + +-- | Click analytics over all time. +asAllTime :: Lens' AnalyticsSummary (Maybe (Maybe AnalyticsSnapshot)) +asAllTime + = lens _asAllTime (\ s a -> s{_asAllTime = a}) + +-- | Click analytics over the last day. +asDay :: Lens' AnalyticsSummary (Maybe (Maybe AnalyticsSnapshot)) +asDay = lens _asDay (\ s a -> s{_asDay = a}) + +-- | Click analytics over the last two hours. +asTwoHours :: Lens' AnalyticsSummary (Maybe (Maybe AnalyticsSnapshot)) +asTwoHours + = lens _asTwoHours (\ s a -> s{_asTwoHours = a}) + +-- | Click analytics over the last month. +asMonth :: Lens' AnalyticsSummary (Maybe (Maybe AnalyticsSnapshot)) +asMonth = lens _asMonth (\ s a -> s{_asMonth = a}) + +instance FromJSON AnalyticsSummary where + parseJSON + = withObject "AnalyticsSummary" + (\ o -> + AnalyticsSummary <$> + (o .:? "week") <*> (o .:? "allTime") <*> + (o .:? "day") + <*> (o .:? "twoHours") + <*> (o .:? "month")) + +instance ToJSON AnalyticsSummary where + toJSON AnalyticsSummary{..} + = object + (catMaybes + [("week" .=) <$> _asWeek, + ("allTime" .=) <$> _asAllTime, ("day" .=) <$> _asDay, + ("twoHours" .=) <$> _asTwoHours, + ("month" .=) <$> _asMonth]) + +-- +-- /See:/ 'uRLHistory' smart constructor. +data URLHistory = URLHistory + { _uhTotalItems :: !(Maybe Int32) + , _uhNextPageToken :: !(Maybe Text) + , _uhItemsPerPage :: !(Maybe Int32) + , _uhKind :: !Text + , _uhItems :: !(Maybe [Maybe URL]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLHistory' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uhTotalItems' +-- +-- * 'uhNextPageToken' +-- +-- * 'uhItemsPerPage' +-- +-- * 'uhKind' +-- +-- * 'uhItems' +uRLHistory + :: URLHistory +uRLHistory = + URLHistory + { _uhTotalItems = Nothing + , _uhNextPageToken = Nothing + , _uhItemsPerPage = Nothing + , _uhKind = "urlshortener#urlHistory" + , _uhItems = Nothing + } + +-- | Total number of short URLs associated with this user (may be +-- approximate). +uhTotalItems :: Lens' URLHistory (Maybe Int32) +uhTotalItems + = lens _uhTotalItems (\ s a -> s{_uhTotalItems = a}) + +-- | A token to provide to get the next page of results. +uhNextPageToken :: Lens' URLHistory (Maybe Text) +uhNextPageToken + = lens _uhNextPageToken + (\ s a -> s{_uhNextPageToken = a}) + +-- | Number of items returned with each full \"page\" of results. Note that +-- the last page could have fewer items than the \"itemsPerPage\" value. +uhItemsPerPage :: Lens' URLHistory (Maybe Int32) +uhItemsPerPage + = lens _uhItemsPerPage + (\ s a -> s{_uhItemsPerPage = a}) + +-- | The fixed string \"urlshortener#urlHistory\". +uhKind :: Lens' URLHistory Text +uhKind = lens _uhKind (\ s a -> s{_uhKind = a}) + +-- | A list of URL resources. +uhItems :: Lens' URLHistory [Maybe URL] +uhItems + = lens _uhItems (\ s a -> s{_uhItems = a}) . _Default + . _Coerce + +instance FromJSON URLHistory where + parseJSON + = withObject "URLHistory" + (\ o -> + URLHistory <$> + (o .:? "totalItems") <*> (o .:? "nextPageToken") <*> + (o .:? "itemsPerPage") + <*> (o .:? "kind" .!= "urlshortener#urlHistory") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON URLHistory where + toJSON URLHistory{..} + = object + (catMaybes + [("totalItems" .=) <$> _uhTotalItems, + ("nextPageToken" .=) <$> _uhNextPageToken, + ("itemsPerPage" .=) <$> _uhItemsPerPage, + Just ("kind" .= _uhKind), ("items" .=) <$> _uhItems]) diff --git a/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Sum.hs b/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Sum.hs new file mode 100644 index 000000000..2ec09e17b --- /dev/null +++ b/gogol-urlshortener/gen/Network/Google/URLShortener/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.URLShortener.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.URLShortener.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-urlshortener/gogol-urlshortener.cabal b/gogol-urlshortener/gogol-urlshortener.cabal new file mode 100644 index 000000000..84bb02b28 --- /dev/null +++ b/gogol-urlshortener/gogol-urlshortener.cabal @@ -0,0 +1,45 @@ +name: gogol-urlshortener +version: 0.0.1 +synopsis: URL Shortener API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you create, inspect, and manage goo.gl short URLs + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.URLShortener.URL.Get + , Network.Google.Resource.URLShortener.URL.Insert + , Network.Google.Resource.URLShortener.URL.List + , Network.Google.URLShortener + , Network.Google.URLShortener.Types + + other-modules: + Network.Google.URLShortener.Types.Product + , Network.Google.URLShortener.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-urlshortener/src/.gitkeep b/gogol-urlshortener/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-webmaster-tools/LICENSE b/gogol-webmaster-tools/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-webmaster-tools/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-webmaster-tools/Makefile b/gogol-webmaster-tools/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-webmaster-tools/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-webmaster-tools/README.md b/gogol-webmaster-tools/README.md new file mode 100644 index 000000000..e7b8ca104 --- /dev/null +++ b/gogol-webmaster-tools/README.md @@ -0,0 +1,28 @@ +# gogol-webmaster-tools + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the Webmaster Tools API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-webmaster-tools` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-webmaster-tools/Setup.hs b/gogol-webmaster-tools/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-webmaster-tools/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Searchanalytics/Query.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Searchanalytics/Query.hs new file mode 100644 index 000000000..2532966d3 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Searchanalytics/Query.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Searchanalytics.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Query your data with filters and parameters that you define. Returns +-- zero or more rows grouped by the row keys that you define. You must +-- define a date range of one or more days. When date is one of the group +-- by values, any days without data are omitted from the result list. If +-- you need to know which days have data, issue a broad date range query +-- grouped by date for any metric, and see which day rows are returned. +-- +-- /See:/ for @WebmastersSearchanalyticsQuery@. +module Webmasters.Searchanalytics.Query + ( + -- * REST Resource + SearchanalyticsQueryAPI + + -- * Creating a Request + , searchanalyticsQuery + , SearchanalyticsQuery + + -- * Request Lenses + , sqQuotaUser + , sqPrettyPrint + , sqUserIp + , sqSiteUrl + , sqKey + , sqOauthToken + , sqFields + , sqAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSearchanalyticsQuery@ which the +-- 'SearchanalyticsQuery' request conforms to. +type SearchanalyticsQueryAPI = + "sites" :> + Capture "siteUrl" Text :> + "searchAnalytics" :> + "query" :> Post '[JSON] SearchAnalyticsQueryResponse + +-- | Query your data with filters and parameters that you define. Returns +-- zero or more rows grouped by the row keys that you define. You must +-- define a date range of one or more days. When date is one of the group +-- by values, any days without data are omitted from the result list. If +-- you need to know which days have data, issue a broad date range query +-- grouped by date for any metric, and see which day rows are returned. +-- +-- /See:/ 'searchanalyticsQuery' smart constructor. +data SearchanalyticsQuery = SearchanalyticsQuery + { _sqQuotaUser :: !(Maybe Text) + , _sqPrettyPrint :: !Bool + , _sqUserIp :: !(Maybe Text) + , _sqSiteUrl :: !Text + , _sqKey :: !(Maybe Text) + , _sqOauthToken :: !(Maybe Text) + , _sqFields :: !(Maybe Text) + , _sqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchanalyticsQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sqQuotaUser' +-- +-- * 'sqPrettyPrint' +-- +-- * 'sqUserIp' +-- +-- * 'sqSiteUrl' +-- +-- * 'sqKey' +-- +-- * 'sqOauthToken' +-- +-- * 'sqFields' +-- +-- * 'sqAlt' +searchanalyticsQuery + :: Text -- ^ 'siteUrl' + -> SearchanalyticsQuery +searchanalyticsQuery pSqSiteUrl_ = + SearchanalyticsQuery + { _sqQuotaUser = Nothing + , _sqPrettyPrint = True + , _sqUserIp = Nothing + , _sqSiteUrl = pSqSiteUrl_ + , _sqKey = Nothing + , _sqOauthToken = Nothing + , _sqFields = Nothing + , _sqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sqQuotaUser :: Lens' SearchanalyticsQuery' (Maybe Text) +sqQuotaUser + = lens _sqQuotaUser (\ s a -> s{_sqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sqPrettyPrint :: Lens' SearchanalyticsQuery' Bool +sqPrettyPrint + = lens _sqPrettyPrint + (\ s a -> s{_sqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sqUserIp :: Lens' SearchanalyticsQuery' (Maybe Text) +sqUserIp = lens _sqUserIp (\ s a -> s{_sqUserIp = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +sqSiteUrl :: Lens' SearchanalyticsQuery' Text +sqSiteUrl + = lens _sqSiteUrl (\ s a -> s{_sqSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sqKey :: Lens' SearchanalyticsQuery' (Maybe Text) +sqKey = lens _sqKey (\ s a -> s{_sqKey = a}) + +-- | OAuth 2.0 token for the current user. +sqOauthToken :: Lens' SearchanalyticsQuery' (Maybe Text) +sqOauthToken + = lens _sqOauthToken (\ s a -> s{_sqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sqFields :: Lens' SearchanalyticsQuery' (Maybe Text) +sqFields = lens _sqFields (\ s a -> s{_sqFields = a}) + +-- | Data format for the response. +sqAlt :: Lens' SearchanalyticsQuery' Text +sqAlt = lens _sqAlt (\ s a -> s{_sqAlt = a}) + +instance GoogleRequest SearchanalyticsQuery' where + type Rs SearchanalyticsQuery' = + SearchAnalyticsQueryResponse + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SearchanalyticsQuery{..} + = go _sqQuotaUser _sqPrettyPrint _sqUserIp _sqSiteUrl + _sqKey + _sqOauthToken + _sqFields + _sqAlt + where go + = clientWithRoute + (Proxy :: Proxy SearchanalyticsQueryAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Delete.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Delete.hs new file mode 100644 index 000000000..bb826311a --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Delete.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sitemaps.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a sitemap from this site. +-- +-- /See:/ for @WebmastersSitemapsDelete@. +module Webmasters.Sitemaps.Delete + ( + -- * REST Resource + SitemapsDeleteAPI + + -- * Creating a Request + , sitemapsDelete + , SitemapsDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdFeedpath + , sdUserIp + , sdSiteUrl + , sdKey + , sdOauthToken + , sdFields + , sdAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitemapsDelete@ which the +-- 'SitemapsDelete' request conforms to. +type SitemapsDeleteAPI = + "sites" :> + Capture "siteUrl" Text :> + "sitemaps" :> + Capture "feedpath" Text :> Delete '[JSON] () + +-- | Deletes a sitemap from this site. +-- +-- /See:/ 'sitemapsDelete' smart constructor. +data SitemapsDelete = SitemapsDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdFeedpath :: !Text + , _sdUserIp :: !(Maybe Text) + , _sdSiteUrl :: !Text + , _sdKey :: !(Maybe Text) + , _sdOauthToken :: !(Maybe Text) + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitemapsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdFeedpath' +-- +-- * 'sdUserIp' +-- +-- * 'sdSiteUrl' +-- +-- * 'sdKey' +-- +-- * 'sdOauthToken' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +sitemapsDelete + :: Text -- ^ 'feedpath' + -> Text -- ^ 'siteUrl' + -> SitemapsDelete +sitemapsDelete pSdFeedpath_ pSdSiteUrl_ = + SitemapsDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdFeedpath = pSdFeedpath_ + , _sdUserIp = Nothing + , _sdSiteUrl = pSdSiteUrl_ + , _sdKey = Nothing + , _sdOauthToken = Nothing + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SitemapsDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SitemapsDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | The URL of the actual sitemap. For example: +-- http:\/\/www.example.com\/sitemap.xml +sdFeedpath :: Lens' SitemapsDelete' Text +sdFeedpath + = lens _sdFeedpath (\ s a -> s{_sdFeedpath = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SitemapsDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +sdSiteUrl :: Lens' SitemapsDelete' Text +sdSiteUrl + = lens _sdSiteUrl (\ s a -> s{_sdSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SitemapsDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SitemapsDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SitemapsDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SitemapsDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SitemapsDelete' where + type Rs SitemapsDelete' = () + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitemapsDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdFeedpath + _sdUserIp + _sdSiteUrl + _sdKey + _sdOauthToken + _sdFields + _sdAlt + where go + = clientWithRoute (Proxy :: Proxy SitemapsDeleteAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Get.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Get.hs new file mode 100644 index 000000000..22ec77469 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Get.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sitemaps.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves information about a specific sitemap. +-- +-- /See:/ for @WebmastersSitemapsGet@. +module Webmasters.Sitemaps.Get + ( + -- * REST Resource + SitemapsGetAPI + + -- * Creating a Request + , sitemapsGet + , SitemapsGet + + -- * Request Lenses + , sgQuotaUser + , sgPrettyPrint + , sgFeedpath + , sgUserIp + , sgSiteUrl + , sgKey + , sgOauthToken + , sgFields + , sgAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitemapsGet@ which the +-- 'SitemapsGet' request conforms to. +type SitemapsGetAPI = + "sites" :> + Capture "siteUrl" Text :> + "sitemaps" :> + Capture "feedpath" Text :> Get '[JSON] WmxSitemap + +-- | Retrieves information about a specific sitemap. +-- +-- /See:/ 'sitemapsGet' smart constructor. +data SitemapsGet = SitemapsGet + { _sgQuotaUser :: !(Maybe Text) + , _sgPrettyPrint :: !Bool + , _sgFeedpath :: !Text + , _sgUserIp :: !(Maybe Text) + , _sgSiteUrl :: !Text + , _sgKey :: !(Maybe Text) + , _sgOauthToken :: !(Maybe Text) + , _sgFields :: !(Maybe Text) + , _sgAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitemapsGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sgQuotaUser' +-- +-- * 'sgPrettyPrint' +-- +-- * 'sgFeedpath' +-- +-- * 'sgUserIp' +-- +-- * 'sgSiteUrl' +-- +-- * 'sgKey' +-- +-- * 'sgOauthToken' +-- +-- * 'sgFields' +-- +-- * 'sgAlt' +sitemapsGet + :: Text -- ^ 'feedpath' + -> Text -- ^ 'siteUrl' + -> SitemapsGet +sitemapsGet pSgFeedpath_ pSgSiteUrl_ = + SitemapsGet + { _sgQuotaUser = Nothing + , _sgPrettyPrint = True + , _sgFeedpath = pSgFeedpath_ + , _sgUserIp = Nothing + , _sgSiteUrl = pSgSiteUrl_ + , _sgKey = Nothing + , _sgOauthToken = Nothing + , _sgFields = Nothing + , _sgAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sgQuotaUser :: Lens' SitemapsGet' (Maybe Text) +sgQuotaUser + = lens _sgQuotaUser (\ s a -> s{_sgQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sgPrettyPrint :: Lens' SitemapsGet' Bool +sgPrettyPrint + = lens _sgPrettyPrint + (\ s a -> s{_sgPrettyPrint = a}) + +-- | The URL of the actual sitemap. For example: +-- http:\/\/www.example.com\/sitemap.xml +sgFeedpath :: Lens' SitemapsGet' Text +sgFeedpath + = lens _sgFeedpath (\ s a -> s{_sgFeedpath = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sgUserIp :: Lens' SitemapsGet' (Maybe Text) +sgUserIp = lens _sgUserIp (\ s a -> s{_sgUserIp = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +sgSiteUrl :: Lens' SitemapsGet' Text +sgSiteUrl + = lens _sgSiteUrl (\ s a -> s{_sgSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sgKey :: Lens' SitemapsGet' (Maybe Text) +sgKey = lens _sgKey (\ s a -> s{_sgKey = a}) + +-- | OAuth 2.0 token for the current user. +sgOauthToken :: Lens' SitemapsGet' (Maybe Text) +sgOauthToken + = lens _sgOauthToken (\ s a -> s{_sgOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sgFields :: Lens' SitemapsGet' (Maybe Text) +sgFields = lens _sgFields (\ s a -> s{_sgFields = a}) + +-- | Data format for the response. +sgAlt :: Lens' SitemapsGet' Text +sgAlt = lens _sgAlt (\ s a -> s{_sgAlt = a}) + +instance GoogleRequest SitemapsGet' where + type Rs SitemapsGet' = WmxSitemap + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitemapsGet{..} + = go _sgQuotaUser _sgPrettyPrint _sgFeedpath + _sgUserIp + _sgSiteUrl + _sgKey + _sgOauthToken + _sgFields + _sgAlt + where go + = clientWithRoute (Proxy :: Proxy SitemapsGetAPI) r u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/List.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/List.hs new file mode 100644 index 000000000..37ed084e4 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/List.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sitemaps.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the sitemaps-entries submitted for this site, or included in the +-- sitemap index file (if sitemapIndex is specified in the request). +-- +-- /See:/ for @WebmastersSitemapsList@. +module Webmasters.Sitemaps.List + ( + -- * REST Resource + SitemapsListAPI + + -- * Creating a Request + , sitemapsList + , SitemapsList + + -- * Request Lenses + , slQuotaUser + , slPrettyPrint + , slUserIp + , slSiteUrl + , slSitemapIndex + , slKey + , slOauthToken + , slFields + , slAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitemapsList@ which the +-- 'SitemapsList' request conforms to. +type SitemapsListAPI = + "sites" :> + Capture "siteUrl" Text :> + "sitemaps" :> + QueryParam "sitemapIndex" Text :> + Get '[JSON] SitemapsListResponse + +-- | Lists the sitemaps-entries submitted for this site, or included in the +-- sitemap index file (if sitemapIndex is specified in the request). +-- +-- /See:/ 'sitemapsList' smart constructor. +data SitemapsList = SitemapsList + { _slQuotaUser :: !(Maybe Text) + , _slPrettyPrint :: !Bool + , _slUserIp :: !(Maybe Text) + , _slSiteUrl :: !Text + , _slSitemapIndex :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitemapsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPrettyPrint' +-- +-- * 'slUserIp' +-- +-- * 'slSiteUrl' +-- +-- * 'slSitemapIndex' +-- +-- * 'slKey' +-- +-- * 'slOauthToken' +-- +-- * 'slFields' +-- +-- * 'slAlt' +sitemapsList + :: Text -- ^ 'siteUrl' + -> SitemapsList +sitemapsList pSlSiteUrl_ = + SitemapsList + { _slQuotaUser = Nothing + , _slPrettyPrint = True + , _slUserIp = Nothing + , _slSiteUrl = pSlSiteUrl_ + , _slSitemapIndex = Nothing + , _slKey = Nothing + , _slOauthToken = Nothing + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SitemapsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SitemapsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SitemapsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +slSiteUrl :: Lens' SitemapsList' Text +slSiteUrl + = lens _slSiteUrl (\ s a -> s{_slSiteUrl = a}) + +-- | A URL of a site\'s sitemap index. For example: +-- http:\/\/www.example.com\/sitemapindex.xml +slSitemapIndex :: Lens' SitemapsList' (Maybe Text) +slSitemapIndex + = lens _slSitemapIndex + (\ s a -> s{_slSitemapIndex = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SitemapsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SitemapsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SitemapsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SitemapsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SitemapsList' where + type Rs SitemapsList' = SitemapsListResponse + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitemapsList{..} + = go _slQuotaUser _slPrettyPrint _slUserIp _slSiteUrl + _slSitemapIndex + _slKey + _slOauthToken + _slFields + _slAlt + where go + = clientWithRoute (Proxy :: Proxy SitemapsListAPI) r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Submit.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Submit.hs new file mode 100644 index 000000000..22202f0aa --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Submit.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sitemaps.Submit +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Submits a sitemap for a site. +-- +-- /See:/ for @WebmastersSitemapsSubmit@. +module Webmasters.Sitemaps.Submit + ( + -- * REST Resource + SitemapsSubmitAPI + + -- * Creating a Request + , sitemapsSubmit + , SitemapsSubmit + + -- * Request Lenses + , ssQuotaUser + , ssPrettyPrint + , ssFeedpath + , ssUserIp + , ssSiteUrl + , ssKey + , ssOauthToken + , ssFields + , ssAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitemapsSubmit@ which the +-- 'SitemapsSubmit' request conforms to. +type SitemapsSubmitAPI = + "sites" :> + Capture "siteUrl" Text :> + "sitemaps" :> + Capture "feedpath" Text :> Put '[JSON] () + +-- | Submits a sitemap for a site. +-- +-- /See:/ 'sitemapsSubmit' smart constructor. +data SitemapsSubmit = SitemapsSubmit + { _ssQuotaUser :: !(Maybe Text) + , _ssPrettyPrint :: !Bool + , _ssFeedpath :: !Text + , _ssUserIp :: !(Maybe Text) + , _ssSiteUrl :: !Text + , _ssKey :: !(Maybe Text) + , _ssOauthToken :: !(Maybe Text) + , _ssFields :: !(Maybe Text) + , _ssAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitemapsSubmit'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssQuotaUser' +-- +-- * 'ssPrettyPrint' +-- +-- * 'ssFeedpath' +-- +-- * 'ssUserIp' +-- +-- * 'ssSiteUrl' +-- +-- * 'ssKey' +-- +-- * 'ssOauthToken' +-- +-- * 'ssFields' +-- +-- * 'ssAlt' +sitemapsSubmit + :: Text -- ^ 'feedpath' + -> Text -- ^ 'siteUrl' + -> SitemapsSubmit +sitemapsSubmit pSsFeedpath_ pSsSiteUrl_ = + SitemapsSubmit + { _ssQuotaUser = Nothing + , _ssPrettyPrint = True + , _ssFeedpath = pSsFeedpath_ + , _ssUserIp = Nothing + , _ssSiteUrl = pSsSiteUrl_ + , _ssKey = Nothing + , _ssOauthToken = Nothing + , _ssFields = Nothing + , _ssAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ssQuotaUser :: Lens' SitemapsSubmit' (Maybe Text) +ssQuotaUser + = lens _ssQuotaUser (\ s a -> s{_ssQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ssPrettyPrint :: Lens' SitemapsSubmit' Bool +ssPrettyPrint + = lens _ssPrettyPrint + (\ s a -> s{_ssPrettyPrint = a}) + +-- | The URL of the sitemap to add. For example: +-- http:\/\/www.example.com\/sitemap.xml +ssFeedpath :: Lens' SitemapsSubmit' Text +ssFeedpath + = lens _ssFeedpath (\ s a -> s{_ssFeedpath = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ssUserIp :: Lens' SitemapsSubmit' (Maybe Text) +ssUserIp = lens _ssUserIp (\ s a -> s{_ssUserIp = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +ssSiteUrl :: Lens' SitemapsSubmit' Text +ssSiteUrl + = lens _ssSiteUrl (\ s a -> s{_ssSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ssKey :: Lens' SitemapsSubmit' (Maybe Text) +ssKey = lens _ssKey (\ s a -> s{_ssKey = a}) + +-- | OAuth 2.0 token for the current user. +ssOauthToken :: Lens' SitemapsSubmit' (Maybe Text) +ssOauthToken + = lens _ssOauthToken (\ s a -> s{_ssOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ssFields :: Lens' SitemapsSubmit' (Maybe Text) +ssFields = lens _ssFields (\ s a -> s{_ssFields = a}) + +-- | Data format for the response. +ssAlt :: Lens' SitemapsSubmit' Text +ssAlt = lens _ssAlt (\ s a -> s{_ssAlt = a}) + +instance GoogleRequest SitemapsSubmit' where + type Rs SitemapsSubmit' = () + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitemapsSubmit{..} + = go _ssQuotaUser _ssPrettyPrint _ssFeedpath + _ssUserIp + _ssSiteUrl + _ssKey + _ssOauthToken + _ssFields + _ssAlt + where go + = clientWithRoute (Proxy :: Proxy SitemapsSubmitAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Add.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Add.hs new file mode 100644 index 000000000..d48e4bebb --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Add.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sites.Add +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a site to the set of the user\'s sites in Webmaster Tools. +-- +-- /See:/ for @WebmastersSitesAdd@. +module Webmasters.Sites.Add + ( + -- * REST Resource + SitesAddAPI + + -- * Creating a Request + , sitesAdd + , SitesAdd + + -- * Request Lenses + , saQuotaUser + , saPrettyPrint + , saUserIp + , saSiteUrl + , saKey + , saOauthToken + , saFields + , saAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitesAdd@ which the +-- 'SitesAdd' request conforms to. +type SitesAddAPI = + "sites" :> Capture "siteUrl" Text :> Put '[JSON] () + +-- | Adds a site to the set of the user\'s sites in Webmaster Tools. +-- +-- /See:/ 'sitesAdd' smart constructor. +data SitesAdd = SitesAdd + { _saQuotaUser :: !(Maybe Text) + , _saPrettyPrint :: !Bool + , _saUserIp :: !(Maybe Text) + , _saSiteUrl :: !Text + , _saKey :: !(Maybe Text) + , _saOauthToken :: !(Maybe Text) + , _saFields :: !(Maybe Text) + , _saAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesAdd'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saQuotaUser' +-- +-- * 'saPrettyPrint' +-- +-- * 'saUserIp' +-- +-- * 'saSiteUrl' +-- +-- * 'saKey' +-- +-- * 'saOauthToken' +-- +-- * 'saFields' +-- +-- * 'saAlt' +sitesAdd + :: Text -- ^ 'siteUrl' + -> SitesAdd +sitesAdd pSaSiteUrl_ = + SitesAdd + { _saQuotaUser = Nothing + , _saPrettyPrint = True + , _saUserIp = Nothing + , _saSiteUrl = pSaSiteUrl_ + , _saKey = Nothing + , _saOauthToken = Nothing + , _saFields = Nothing + , _saAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +saQuotaUser :: Lens' SitesAdd' (Maybe Text) +saQuotaUser + = lens _saQuotaUser (\ s a -> s{_saQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +saPrettyPrint :: Lens' SitesAdd' Bool +saPrettyPrint + = lens _saPrettyPrint + (\ s a -> s{_saPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +saUserIp :: Lens' SitesAdd' (Maybe Text) +saUserIp = lens _saUserIp (\ s a -> s{_saUserIp = a}) + +-- | The URL of the site to add. +saSiteUrl :: Lens' SitesAdd' Text +saSiteUrl + = lens _saSiteUrl (\ s a -> s{_saSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +saKey :: Lens' SitesAdd' (Maybe Text) +saKey = lens _saKey (\ s a -> s{_saKey = a}) + +-- | OAuth 2.0 token for the current user. +saOauthToken :: Lens' SitesAdd' (Maybe Text) +saOauthToken + = lens _saOauthToken (\ s a -> s{_saOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +saFields :: Lens' SitesAdd' (Maybe Text) +saFields = lens _saFields (\ s a -> s{_saFields = a}) + +-- | Data format for the response. +saAlt :: Lens' SitesAdd' Text +saAlt = lens _saAlt (\ s a -> s{_saAlt = a}) + +instance GoogleRequest SitesAdd' where + type Rs SitesAdd' = () + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitesAdd{..} + = go _saQuotaUser _saPrettyPrint _saUserIp _saSiteUrl + _saKey + _saOauthToken + _saFields + _saAlt + where go + = clientWithRoute (Proxy :: Proxy SitesAddAPI) r u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Delete.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Delete.hs new file mode 100644 index 000000000..081923b10 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Delete.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sites.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes a site from the set of the user\'s Webmaster Tools sites. +-- +-- /See:/ for @WebmastersSitesDelete@. +module Webmasters.Sites.Delete + ( + -- * REST Resource + SitesDeleteAPI + + -- * Creating a Request + , sitesDelete + , SitesDelete + + -- * Request Lenses + , sddQuotaUser + , sddPrettyPrint + , sddUserIp + , sddSiteUrl + , sddKey + , sddOauthToken + , sddFields + , sddAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitesDelete@ which the +-- 'SitesDelete' request conforms to. +type SitesDeleteAPI = + "sites" :> + Capture "siteUrl" Text :> Delete '[JSON] () + +-- | Removes a site from the set of the user\'s Webmaster Tools sites. +-- +-- /See:/ 'sitesDelete' smart constructor. +data SitesDelete = SitesDelete + { _sddQuotaUser :: !(Maybe Text) + , _sddPrettyPrint :: !Bool + , _sddUserIp :: !(Maybe Text) + , _sddSiteUrl :: !Text + , _sddKey :: !(Maybe Text) + , _sddOauthToken :: !(Maybe Text) + , _sddFields :: !(Maybe Text) + , _sddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sddQuotaUser' +-- +-- * 'sddPrettyPrint' +-- +-- * 'sddUserIp' +-- +-- * 'sddSiteUrl' +-- +-- * 'sddKey' +-- +-- * 'sddOauthToken' +-- +-- * 'sddFields' +-- +-- * 'sddAlt' +sitesDelete + :: Text -- ^ 'siteUrl' + -> SitesDelete +sitesDelete pSddSiteUrl_ = + SitesDelete + { _sddQuotaUser = Nothing + , _sddPrettyPrint = True + , _sddUserIp = Nothing + , _sddSiteUrl = pSddSiteUrl_ + , _sddKey = Nothing + , _sddOauthToken = Nothing + , _sddFields = Nothing + , _sddAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sddQuotaUser :: Lens' SitesDelete' (Maybe Text) +sddQuotaUser + = lens _sddQuotaUser (\ s a -> s{_sddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sddPrettyPrint :: Lens' SitesDelete' Bool +sddPrettyPrint + = lens _sddPrettyPrint + (\ s a -> s{_sddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sddUserIp :: Lens' SitesDelete' (Maybe Text) +sddUserIp + = lens _sddUserIp (\ s a -> s{_sddUserIp = a}) + +-- | The URI of the property as defined in Search Console. Examples: +-- http:\/\/www.example.com\/ or android-app:\/\/com.example\/ +sddSiteUrl :: Lens' SitesDelete' Text +sddSiteUrl + = lens _sddSiteUrl (\ s a -> s{_sddSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sddKey :: Lens' SitesDelete' (Maybe Text) +sddKey = lens _sddKey (\ s a -> s{_sddKey = a}) + +-- | OAuth 2.0 token for the current user. +sddOauthToken :: Lens' SitesDelete' (Maybe Text) +sddOauthToken + = lens _sddOauthToken + (\ s a -> s{_sddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sddFields :: Lens' SitesDelete' (Maybe Text) +sddFields + = lens _sddFields (\ s a -> s{_sddFields = a}) + +-- | Data format for the response. +sddAlt :: Lens' SitesDelete' Text +sddAlt = lens _sddAlt (\ s a -> s{_sddAlt = a}) + +instance GoogleRequest SitesDelete' where + type Rs SitesDelete' = () + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitesDelete{..} + = go _sddQuotaUser _sddPrettyPrint _sddUserIp + _sddSiteUrl + _sddKey + _sddOauthToken + _sddFields + _sddAlt + where go + = clientWithRoute (Proxy :: Proxy SitesDeleteAPI) r u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Get.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Get.hs new file mode 100644 index 000000000..bd429359a --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/Get.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sites.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves information about specific site. +-- +-- /See:/ for @WebmastersSitesGet@. +module Webmasters.Sites.Get + ( + -- * REST Resource + SitesGetAPI + + -- * Creating a Request + , sitesGet + , SitesGet + + -- * Request Lenses + , sitQuotaUser + , sitPrettyPrint + , sitUserIp + , sitSiteUrl + , sitKey + , sitOauthToken + , sitFields + , sitAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitesGet@ which the +-- 'SitesGet' request conforms to. +type SitesGetAPI = + "sites" :> + Capture "siteUrl" Text :> Get '[JSON] WmxSite + +-- | Retrieves information about specific site. +-- +-- /See:/ 'sitesGet' smart constructor. +data SitesGet = SitesGet + { _sitQuotaUser :: !(Maybe Text) + , _sitPrettyPrint :: !Bool + , _sitUserIp :: !(Maybe Text) + , _sitSiteUrl :: !Text + , _sitKey :: !(Maybe Text) + , _sitOauthToken :: !(Maybe Text) + , _sitFields :: !(Maybe Text) + , _sitAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sitQuotaUser' +-- +-- * 'sitPrettyPrint' +-- +-- * 'sitUserIp' +-- +-- * 'sitSiteUrl' +-- +-- * 'sitKey' +-- +-- * 'sitOauthToken' +-- +-- * 'sitFields' +-- +-- * 'sitAlt' +sitesGet + :: Text -- ^ 'siteUrl' + -> SitesGet +sitesGet pSitSiteUrl_ = + SitesGet + { _sitQuotaUser = Nothing + , _sitPrettyPrint = True + , _sitUserIp = Nothing + , _sitSiteUrl = pSitSiteUrl_ + , _sitKey = Nothing + , _sitOauthToken = Nothing + , _sitFields = Nothing + , _sitAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sitQuotaUser :: Lens' SitesGet' (Maybe Text) +sitQuotaUser + = lens _sitQuotaUser (\ s a -> s{_sitQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sitPrettyPrint :: Lens' SitesGet' Bool +sitPrettyPrint + = lens _sitPrettyPrint + (\ s a -> s{_sitPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sitUserIp :: Lens' SitesGet' (Maybe Text) +sitUserIp + = lens _sitUserIp (\ s a -> s{_sitUserIp = a}) + +-- | The URI of the property as defined in Search Console. Examples: +-- http:\/\/www.example.com\/ or android-app:\/\/com.example\/ +sitSiteUrl :: Lens' SitesGet' Text +sitSiteUrl + = lens _sitSiteUrl (\ s a -> s{_sitSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sitKey :: Lens' SitesGet' (Maybe Text) +sitKey = lens _sitKey (\ s a -> s{_sitKey = a}) + +-- | OAuth 2.0 token for the current user. +sitOauthToken :: Lens' SitesGet' (Maybe Text) +sitOauthToken + = lens _sitOauthToken + (\ s a -> s{_sitOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sitFields :: Lens' SitesGet' (Maybe Text) +sitFields + = lens _sitFields (\ s a -> s{_sitFields = a}) + +-- | Data format for the response. +sitAlt :: Lens' SitesGet' Text +sitAlt = lens _sitAlt (\ s a -> s{_sitAlt = a}) + +instance GoogleRequest SitesGet' where + type Rs SitesGet' = WmxSite + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitesGet{..} + = go _sitQuotaUser _sitPrettyPrint _sitUserIp + _sitSiteUrl + _sitKey + _sitOauthToken + _sitFields + _sitAlt + where go + = clientWithRoute (Proxy :: Proxy SitesGetAPI) r u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/List.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/List.hs new file mode 100644 index 000000000..24403dd52 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sites/List.hs @@ -0,0 +1,137 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.Sites.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists the user\'s Webmaster Tools sites. +-- +-- /See:/ for @WebmastersSitesList@. +module Webmasters.Sites.List + ( + -- * REST Resource + SitesListAPI + + -- * Creating a Request + , sitesList + , SitesList + + -- * Request Lenses + , sQuotaUser + , sPrettyPrint + , sUserIp + , sKey + , sOauthToken + , sFields + , sAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersSitesList@ which the +-- 'SitesList' request conforms to. +type SitesListAPI = + "sites" :> Get '[JSON] SitesListResponse + +-- | Lists the user\'s Webmaster Tools sites. +-- +-- /See:/ 'sitesList' smart constructor. +data SitesList = SitesList + { _sQuotaUser :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sUserIp :: !(Maybe Text) + , _sKey :: !(Maybe Text) + , _sOauthToken :: !(Maybe Text) + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sQuotaUser' +-- +-- * 'sPrettyPrint' +-- +-- * 'sUserIp' +-- +-- * 'sKey' +-- +-- * 'sOauthToken' +-- +-- * 'sFields' +-- +-- * 'sAlt' +sitesList + :: SitesList +sitesList = + SitesList + { _sQuotaUser = Nothing + , _sPrettyPrint = True + , _sUserIp = Nothing + , _sKey = Nothing + , _sOauthToken = Nothing + , _sFields = Nothing + , _sAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' SitesList' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' SitesList' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' SitesList' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' SitesList' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' SitesList' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' SitesList' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' SitesList' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest SitesList' where + type Rs SitesList' = SitesListResponse + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u SitesList{..} + = go _sQuotaUser _sPrettyPrint _sUserIp _sKey + _sOauthToken + _sFields + _sAlt + where go + = clientWithRoute (Proxy :: Proxy SitesListAPI) r u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorscounts/Query.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorscounts/Query.hs new file mode 100644 index 000000000..a0bbd4d05 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorscounts/Query.hs @@ -0,0 +1,202 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.URLcrawlerrorscounts.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a time series of the number of URL crawl errors per error +-- category and platform. +-- +-- /See:/ for @WebmastersURLcrawlerrorscountsQuery@. +module Webmasters.URLcrawlerrorscounts.Query + ( + -- * REST Resource + UrlcrawlerrorscountsQueryAPI + + -- * Creating a Request + , uRLcrawlerrorscountsQuery + , URLcrawlerrorscountsQuery + + -- * Request Lenses + , uqQuotaUser + , uqPrettyPrint + , uqPlatform + , uqUserIp + , uqCategory + , uqSiteUrl + , uqKey + , uqLatestCountsOnly + , uqOauthToken + , uqFields + , uqAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersURLcrawlerrorscountsQuery@ which the +-- 'URLcrawlerrorscountsQuery' request conforms to. +type UrlcrawlerrorscountsQueryAPI = + "sites" :> + Capture "siteUrl" Text :> + "urlCrawlErrorsCounts" :> + "query" :> + QueryParam "platform" Text :> + QueryParam "category" Text :> + QueryParam "latestCountsOnly" Bool :> + Get '[JSON] URLCrawlErrorsCountsQueryResponse + +-- | Retrieves a time series of the number of URL crawl errors per error +-- category and platform. +-- +-- /See:/ 'uRLcrawlerrorscountsQuery' smart constructor. +data URLcrawlerrorscountsQuery = URLcrawlerrorscountsQuery + { _uqQuotaUser :: !(Maybe Text) + , _uqPrettyPrint :: !Bool + , _uqPlatform :: !(Maybe Text) + , _uqUserIp :: !(Maybe Text) + , _uqCategory :: !(Maybe Text) + , _uqSiteUrl :: !Text + , _uqKey :: !(Maybe Text) + , _uqLatestCountsOnly :: !Bool + , _uqOauthToken :: !(Maybe Text) + , _uqFields :: !(Maybe Text) + , _uqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLcrawlerrorscountsQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uqQuotaUser' +-- +-- * 'uqPrettyPrint' +-- +-- * 'uqPlatform' +-- +-- * 'uqUserIp' +-- +-- * 'uqCategory' +-- +-- * 'uqSiteUrl' +-- +-- * 'uqKey' +-- +-- * 'uqLatestCountsOnly' +-- +-- * 'uqOauthToken' +-- +-- * 'uqFields' +-- +-- * 'uqAlt' +uRLcrawlerrorscountsQuery + :: Text -- ^ 'siteUrl' + -> URLcrawlerrorscountsQuery +uRLcrawlerrorscountsQuery pUqSiteUrl_ = + URLcrawlerrorscountsQuery + { _uqQuotaUser = Nothing + , _uqPrettyPrint = True + , _uqPlatform = Nothing + , _uqUserIp = Nothing + , _uqCategory = Nothing + , _uqSiteUrl = pUqSiteUrl_ + , _uqKey = Nothing + , _uqLatestCountsOnly = True + , _uqOauthToken = Nothing + , _uqFields = Nothing + , _uqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +uqQuotaUser :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqQuotaUser + = lens _uqQuotaUser (\ s a -> s{_uqQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +uqPrettyPrint :: Lens' URLcrawlerrorscountsQuery' Bool +uqPrettyPrint + = lens _uqPrettyPrint + (\ s a -> s{_uqPrettyPrint = a}) + +-- | The user agent type (platform) that made the request. For example: web. +-- If not specified, returns results for all platforms. +uqPlatform :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqPlatform + = lens _uqPlatform (\ s a -> s{_uqPlatform = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +uqUserIp :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqUserIp = lens _uqUserIp (\ s a -> s{_uqUserIp = a}) + +-- | The crawl error category. For example: serverError. If not specified, +-- returns results for all categories. +uqCategory :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqCategory + = lens _uqCategory (\ s a -> s{_uqCategory = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +uqSiteUrl :: Lens' URLcrawlerrorscountsQuery' Text +uqSiteUrl + = lens _uqSiteUrl (\ s a -> s{_uqSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +uqKey :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqKey = lens _uqKey (\ s a -> s{_uqKey = a}) + +-- | If true, returns only the latest crawl error counts. +uqLatestCountsOnly :: Lens' URLcrawlerrorscountsQuery' Bool +uqLatestCountsOnly + = lens _uqLatestCountsOnly + (\ s a -> s{_uqLatestCountsOnly = a}) + +-- | OAuth 2.0 token for the current user. +uqOauthToken :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqOauthToken + = lens _uqOauthToken (\ s a -> s{_uqOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +uqFields :: Lens' URLcrawlerrorscountsQuery' (Maybe Text) +uqFields = lens _uqFields (\ s a -> s{_uqFields = a}) + +-- | Data format for the response. +uqAlt :: Lens' URLcrawlerrorscountsQuery' Text +uqAlt = lens _uqAlt (\ s a -> s{_uqAlt = a}) + +instance GoogleRequest URLcrawlerrorscountsQuery' + where + type Rs URLcrawlerrorscountsQuery' = + URLCrawlErrorsCountsQueryResponse + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u URLcrawlerrorscountsQuery{..} + = go _uqQuotaUser _uqPrettyPrint _uqPlatform + _uqUserIp + _uqCategory + _uqSiteUrl + _uqKey + (Just _uqLatestCountsOnly) + _uqOauthToken + _uqFields + _uqAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlcrawlerrorscountsQueryAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/Get.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/Get.hs new file mode 100644 index 000000000..1aca0f585 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/Get.hs @@ -0,0 +1,201 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.URLcrawlerrorssamples.Get +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves details about crawl errors for a site\'s sample URL. +-- +-- /See:/ for @WebmastersURLcrawlerrorssamplesGet@. +module Webmasters.URLcrawlerrorssamples.Get + ( + -- * REST Resource + UrlcrawlerrorssamplesGetAPI + + -- * Creating a Request + , uRLcrawlerrorssamplesGet + , URLcrawlerrorssamplesGet + + -- * Request Lenses + , ugQuotaUser + , ugPrettyPrint + , ugPlatform + , ugUserIp + , ugCategory + , ugSiteUrl + , ugUrl + , ugKey + , ugOauthToken + , ugFields + , ugAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersURLcrawlerrorssamplesGet@ which the +-- 'URLcrawlerrorssamplesGet' request conforms to. +type UrlcrawlerrorssamplesGetAPI = + "sites" :> + Capture "siteUrl" Text :> + "urlCrawlErrorsSamples" :> + Capture "url" Text :> + QueryParam "platform" Text :> + QueryParam "category" Text :> + Get '[JSON] URLCrawlErrorsSample + +-- | Retrieves details about crawl errors for a site\'s sample URL. +-- +-- /See:/ 'uRLcrawlerrorssamplesGet' smart constructor. +data URLcrawlerrorssamplesGet = URLcrawlerrorssamplesGet + { _ugQuotaUser :: !(Maybe Text) + , _ugPrettyPrint :: !Bool + , _ugPlatform :: !Text + , _ugUserIp :: !(Maybe Text) + , _ugCategory :: !Text + , _ugSiteUrl :: !Text + , _ugUrl :: !Text + , _ugKey :: !(Maybe Text) + , _ugOauthToken :: !(Maybe Text) + , _ugFields :: !(Maybe Text) + , _ugAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLcrawlerrorssamplesGet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ugQuotaUser' +-- +-- * 'ugPrettyPrint' +-- +-- * 'ugPlatform' +-- +-- * 'ugUserIp' +-- +-- * 'ugCategory' +-- +-- * 'ugSiteUrl' +-- +-- * 'ugUrl' +-- +-- * 'ugKey' +-- +-- * 'ugOauthToken' +-- +-- * 'ugFields' +-- +-- * 'ugAlt' +uRLcrawlerrorssamplesGet + :: Text -- ^ 'platform' + -> Text -- ^ 'category' + -> Text -- ^ 'siteUrl' + -> Text -- ^ 'url' + -> URLcrawlerrorssamplesGet +uRLcrawlerrorssamplesGet pUgPlatform_ pUgCategory_ pUgSiteUrl_ pUgUrl_ = + URLcrawlerrorssamplesGet + { _ugQuotaUser = Nothing + , _ugPrettyPrint = True + , _ugPlatform = pUgPlatform_ + , _ugUserIp = Nothing + , _ugCategory = pUgCategory_ + , _ugSiteUrl = pUgSiteUrl_ + , _ugUrl = pUgUrl_ + , _ugKey = Nothing + , _ugOauthToken = Nothing + , _ugFields = Nothing + , _ugAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ugQuotaUser :: Lens' URLcrawlerrorssamplesGet' (Maybe Text) +ugQuotaUser + = lens _ugQuotaUser (\ s a -> s{_ugQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ugPrettyPrint :: Lens' URLcrawlerrorssamplesGet' Bool +ugPrettyPrint + = lens _ugPrettyPrint + (\ s a -> s{_ugPrettyPrint = a}) + +-- | The user agent type (platform) that made the request. For example: web +ugPlatform :: Lens' URLcrawlerrorssamplesGet' Text +ugPlatform + = lens _ugPlatform (\ s a -> s{_ugPlatform = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ugUserIp :: Lens' URLcrawlerrorssamplesGet' (Maybe Text) +ugUserIp = lens _ugUserIp (\ s a -> s{_ugUserIp = a}) + +-- | The crawl error category. For example: authPermissions +ugCategory :: Lens' URLcrawlerrorssamplesGet' Text +ugCategory + = lens _ugCategory (\ s a -> s{_ugCategory = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +ugSiteUrl :: Lens' URLcrawlerrorssamplesGet' Text +ugSiteUrl + = lens _ugSiteUrl (\ s a -> s{_ugSiteUrl = a}) + +-- | The relative path (without the site) of the sample URL. It must be one +-- of the URLs returned by list(). For example, for the URL +-- https:\/\/www.example.com\/pagename on the site +-- https:\/\/www.example.com\/, the url value is pagename +ugUrl :: Lens' URLcrawlerrorssamplesGet' Text +ugUrl = lens _ugUrl (\ s a -> s{_ugUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ugKey :: Lens' URLcrawlerrorssamplesGet' (Maybe Text) +ugKey = lens _ugKey (\ s a -> s{_ugKey = a}) + +-- | OAuth 2.0 token for the current user. +ugOauthToken :: Lens' URLcrawlerrorssamplesGet' (Maybe Text) +ugOauthToken + = lens _ugOauthToken (\ s a -> s{_ugOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ugFields :: Lens' URLcrawlerrorssamplesGet' (Maybe Text) +ugFields = lens _ugFields (\ s a -> s{_ugFields = a}) + +-- | Data format for the response. +ugAlt :: Lens' URLcrawlerrorssamplesGet' Text +ugAlt = lens _ugAlt (\ s a -> s{_ugAlt = a}) + +instance GoogleRequest URLcrawlerrorssamplesGet' + where + type Rs URLcrawlerrorssamplesGet' = + URLCrawlErrorsSample + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u URLcrawlerrorssamplesGet{..} + = go _ugQuotaUser _ugPrettyPrint (Just _ugPlatform) + _ugUserIp + (Just _ugCategory) + _ugSiteUrl + _ugUrl + _ugKey + _ugOauthToken + _ugFields + _ugAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlcrawlerrorssamplesGetAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/List.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/List.hs new file mode 100644 index 000000000..4797512af --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/List.hs @@ -0,0 +1,188 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.URLcrawlerrorssamples.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Lists a site\'s sample URLs for the specified crawl error category and +-- platform. +-- +-- /See:/ for @WebmastersURLcrawlerrorssamplesList@. +module Webmasters.URLcrawlerrorssamples.List + ( + -- * REST Resource + UrlcrawlerrorssamplesListAPI + + -- * Creating a Request + , uRLcrawlerrorssamplesList + , URLcrawlerrorssamplesList + + -- * Request Lenses + , ulQuotaUser + , ulPrettyPrint + , ulPlatform + , ulUserIp + , ulCategory + , ulSiteUrl + , ulKey + , ulOauthToken + , ulFields + , ulAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersURLcrawlerrorssamplesList@ which the +-- 'URLcrawlerrorssamplesList' request conforms to. +type UrlcrawlerrorssamplesListAPI = + "sites" :> + Capture "siteUrl" Text :> + "urlCrawlErrorsSamples" :> + QueryParam "platform" Text :> + QueryParam "category" Text :> + Get '[JSON] URLCrawlErrorsSamplesListResponse + +-- | Lists a site\'s sample URLs for the specified crawl error category and +-- platform. +-- +-- /See:/ 'uRLcrawlerrorssamplesList' smart constructor. +data URLcrawlerrorssamplesList = URLcrawlerrorssamplesList + { _ulQuotaUser :: !(Maybe Text) + , _ulPrettyPrint :: !Bool + , _ulPlatform :: !Text + , _ulUserIp :: !(Maybe Text) + , _ulCategory :: !Text + , _ulSiteUrl :: !Text + , _ulKey :: !(Maybe Text) + , _ulOauthToken :: !(Maybe Text) + , _ulFields :: !(Maybe Text) + , _ulAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLcrawlerrorssamplesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ulQuotaUser' +-- +-- * 'ulPrettyPrint' +-- +-- * 'ulPlatform' +-- +-- * 'ulUserIp' +-- +-- * 'ulCategory' +-- +-- * 'ulSiteUrl' +-- +-- * 'ulKey' +-- +-- * 'ulOauthToken' +-- +-- * 'ulFields' +-- +-- * 'ulAlt' +uRLcrawlerrorssamplesList + :: Text -- ^ 'platform' + -> Text -- ^ 'category' + -> Text -- ^ 'siteUrl' + -> URLcrawlerrorssamplesList +uRLcrawlerrorssamplesList pUlPlatform_ pUlCategory_ pUlSiteUrl_ = + URLcrawlerrorssamplesList + { _ulQuotaUser = Nothing + , _ulPrettyPrint = True + , _ulPlatform = pUlPlatform_ + , _ulUserIp = Nothing + , _ulCategory = pUlCategory_ + , _ulSiteUrl = pUlSiteUrl_ + , _ulKey = Nothing + , _ulOauthToken = Nothing + , _ulFields = Nothing + , _ulAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ulQuotaUser :: Lens' URLcrawlerrorssamplesList' (Maybe Text) +ulQuotaUser + = lens _ulQuotaUser (\ s a -> s{_ulQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +ulPrettyPrint :: Lens' URLcrawlerrorssamplesList' Bool +ulPrettyPrint + = lens _ulPrettyPrint + (\ s a -> s{_ulPrettyPrint = a}) + +-- | The user agent type (platform) that made the request. For example: web +ulPlatform :: Lens' URLcrawlerrorssamplesList' Text +ulPlatform + = lens _ulPlatform (\ s a -> s{_ulPlatform = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ulUserIp :: Lens' URLcrawlerrorssamplesList' (Maybe Text) +ulUserIp = lens _ulUserIp (\ s a -> s{_ulUserIp = a}) + +-- | The crawl error category. For example: authPermissions +ulCategory :: Lens' URLcrawlerrorssamplesList' Text +ulCategory + = lens _ulCategory (\ s a -> s{_ulCategory = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +ulSiteUrl :: Lens' URLcrawlerrorssamplesList' Text +ulSiteUrl + = lens _ulSiteUrl (\ s a -> s{_ulSiteUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ulKey :: Lens' URLcrawlerrorssamplesList' (Maybe Text) +ulKey = lens _ulKey (\ s a -> s{_ulKey = a}) + +-- | OAuth 2.0 token for the current user. +ulOauthToken :: Lens' URLcrawlerrorssamplesList' (Maybe Text) +ulOauthToken + = lens _ulOauthToken (\ s a -> s{_ulOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ulFields :: Lens' URLcrawlerrorssamplesList' (Maybe Text) +ulFields = lens _ulFields (\ s a -> s{_ulFields = a}) + +-- | Data format for the response. +ulAlt :: Lens' URLcrawlerrorssamplesList' Text +ulAlt = lens _ulAlt (\ s a -> s{_ulAlt = a}) + +instance GoogleRequest URLcrawlerrorssamplesList' + where + type Rs URLcrawlerrorssamplesList' = + URLCrawlErrorsSamplesListResponse + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u URLcrawlerrorssamplesList{..} + = go _ulQuotaUser _ulPrettyPrint (Just _ulPlatform) + _ulUserIp + (Just _ulCategory) + _ulSiteUrl + _ulKey + _ulOauthToken + _ulFields + _ulAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlcrawlerrorssamplesListAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/MarkAsFixed.hs b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/MarkAsFixed.hs new file mode 100644 index 000000000..8f248168c --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLcrawlerrorssamples/MarkAsFixed.hs @@ -0,0 +1,207 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.Webmasters.URLcrawlerrorssamples.MarkAsFixed +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Marks the provided site\'s sample URL as fixed, and removes it from the +-- samples list. +-- +-- /See:/ for @WebmastersURLcrawlerrorssamplesMarkAsFixed@. +module Webmasters.URLcrawlerrorssamples.MarkAsFixed + ( + -- * REST Resource + UrlcrawlerrorssamplesMarkAsFixedAPI + + -- * Creating a Request + , uRLcrawlerrorssamplesMarkAsFixed + , URLcrawlerrorssamplesMarkAsFixed + + -- * Request Lenses + , umafQuotaUser + , umafPrettyPrint + , umafPlatform + , umafUserIp + , umafCategory + , umafSiteUrl + , umafUrl + , umafKey + , umafOauthToken + , umafFields + , umafAlt + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types + +-- | A resource alias for @WebmastersURLcrawlerrorssamplesMarkAsFixed@ which the +-- 'URLcrawlerrorssamplesMarkAsFixed' request conforms to. +type UrlcrawlerrorssamplesMarkAsFixedAPI = + "sites" :> + Capture "siteUrl" Text :> + "urlCrawlErrorsSamples" :> + Capture "url" Text :> + QueryParam "platform" Text :> + QueryParam "category" Text :> Delete '[JSON] () + +-- | Marks the provided site\'s sample URL as fixed, and removes it from the +-- samples list. +-- +-- /See:/ 'uRLcrawlerrorssamplesMarkAsFixed' smart constructor. +data URLcrawlerrorssamplesMarkAsFixed = URLcrawlerrorssamplesMarkAsFixed + { _umafQuotaUser :: !(Maybe Text) + , _umafPrettyPrint :: !Bool + , _umafPlatform :: !Text + , _umafUserIp :: !(Maybe Text) + , _umafCategory :: !Text + , _umafSiteUrl :: !Text + , _umafUrl :: !Text + , _umafKey :: !(Maybe Text) + , _umafOauthToken :: !(Maybe Text) + , _umafFields :: !(Maybe Text) + , _umafAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLcrawlerrorssamplesMarkAsFixed'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'umafQuotaUser' +-- +-- * 'umafPrettyPrint' +-- +-- * 'umafPlatform' +-- +-- * 'umafUserIp' +-- +-- * 'umafCategory' +-- +-- * 'umafSiteUrl' +-- +-- * 'umafUrl' +-- +-- * 'umafKey' +-- +-- * 'umafOauthToken' +-- +-- * 'umafFields' +-- +-- * 'umafAlt' +uRLcrawlerrorssamplesMarkAsFixed + :: Text -- ^ 'platform' + -> Text -- ^ 'category' + -> Text -- ^ 'siteUrl' + -> Text -- ^ 'url' + -> URLcrawlerrorssamplesMarkAsFixed +uRLcrawlerrorssamplesMarkAsFixed pUmafPlatform_ pUmafCategory_ pUmafSiteUrl_ pUmafUrl_ = + URLcrawlerrorssamplesMarkAsFixed + { _umafQuotaUser = Nothing + , _umafPrettyPrint = True + , _umafPlatform = pUmafPlatform_ + , _umafUserIp = Nothing + , _umafCategory = pUmafCategory_ + , _umafSiteUrl = pUmafSiteUrl_ + , _umafUrl = pUmafUrl_ + , _umafKey = Nothing + , _umafOauthToken = Nothing + , _umafFields = Nothing + , _umafAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +umafQuotaUser :: Lens' URLcrawlerrorssamplesMarkAsFixed' (Maybe Text) +umafQuotaUser + = lens _umafQuotaUser + (\ s a -> s{_umafQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +umafPrettyPrint :: Lens' URLcrawlerrorssamplesMarkAsFixed' Bool +umafPrettyPrint + = lens _umafPrettyPrint + (\ s a -> s{_umafPrettyPrint = a}) + +-- | The user agent type (platform) that made the request. For example: web +umafPlatform :: Lens' URLcrawlerrorssamplesMarkAsFixed' Text +umafPlatform + = lens _umafPlatform (\ s a -> s{_umafPlatform = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +umafUserIp :: Lens' URLcrawlerrorssamplesMarkAsFixed' (Maybe Text) +umafUserIp + = lens _umafUserIp (\ s a -> s{_umafUserIp = a}) + +-- | The crawl error category. For example: authPermissions +umafCategory :: Lens' URLcrawlerrorssamplesMarkAsFixed' Text +umafCategory + = lens _umafCategory (\ s a -> s{_umafCategory = a}) + +-- | The site\'s URL, including protocol. For example: +-- http:\/\/www.example.com\/ +umafSiteUrl :: Lens' URLcrawlerrorssamplesMarkAsFixed' Text +umafSiteUrl + = lens _umafSiteUrl (\ s a -> s{_umafSiteUrl = a}) + +-- | The relative path (without the site) of the sample URL. It must be one +-- of the URLs returned by list(). For example, for the URL +-- https:\/\/www.example.com\/pagename on the site +-- https:\/\/www.example.com\/, the url value is pagename +umafUrl :: Lens' URLcrawlerrorssamplesMarkAsFixed' Text +umafUrl = lens _umafUrl (\ s a -> s{_umafUrl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +umafKey :: Lens' URLcrawlerrorssamplesMarkAsFixed' (Maybe Text) +umafKey = lens _umafKey (\ s a -> s{_umafKey = a}) + +-- | OAuth 2.0 token for the current user. +umafOauthToken :: Lens' URLcrawlerrorssamplesMarkAsFixed' (Maybe Text) +umafOauthToken + = lens _umafOauthToken + (\ s a -> s{_umafOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +umafFields :: Lens' URLcrawlerrorssamplesMarkAsFixed' (Maybe Text) +umafFields + = lens _umafFields (\ s a -> s{_umafFields = a}) + +-- | Data format for the response. +umafAlt :: Lens' URLcrawlerrorssamplesMarkAsFixed' Text +umafAlt = lens _umafAlt (\ s a -> s{_umafAlt = a}) + +instance GoogleRequest + URLcrawlerrorssamplesMarkAsFixed' where + type Rs URLcrawlerrorssamplesMarkAsFixed' = () + request = requestWithRoute defReq webmasterToolsURL + requestWithRoute r u + URLcrawlerrorssamplesMarkAsFixed{..} + = go _umafQuotaUser _umafPrettyPrint + (Just _umafPlatform) + _umafUserIp + (Just _umafCategory) + _umafSiteUrl + _umafUrl + _umafKey + _umafOauthToken + _umafFields + _umafAlt + where go + = clientWithRoute + (Proxy :: Proxy UrlcrawlerrorssamplesMarkAsFixedAPI) + r + u diff --git a/gogol-webmaster-tools/gen/Network/Google/WebmasterTools.hs b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools.hs new file mode 100644 index 000000000..28de99476 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.WebmasterTools +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Lets you view Google Webmaster Tools data for your verified sites. +-- +-- /See:/ +module Network.Google.WebmasterTools + ( + -- * API + WebmasterToolsAPI + , webmasterToolsAPI + , webmasterToolsURL + + -- * Service Methods + + -- * REST Resources + + -- ** WebmastersSearchanalyticsQuery + , module Webmasters.Searchanalytics.Query + + -- ** WebmastersSitemapsDelete + , module Webmasters.Sitemaps.Delete + + -- ** WebmastersSitemapsGet + , module Webmasters.Sitemaps.Get + + -- ** WebmastersSitemapsList + , module Webmasters.Sitemaps.List + + -- ** WebmastersSitemapsSubmit + , module Webmasters.Sitemaps.Submit + + -- ** WebmastersSitesAdd + , module Webmasters.Sites.Add + + -- ** WebmastersSitesDelete + , module Webmasters.Sites.Delete + + -- ** WebmastersSitesGet + , module Webmasters.Sites.Get + + -- ** WebmastersSitesList + , module Webmasters.Sites.List + + -- ** WebmastersURLcrawlerrorscountsQuery + , module Webmasters.URLcrawlerrorscounts.Query + + -- ** WebmastersURLcrawlerrorssamplesGet + , module Webmasters.URLcrawlerrorssamples.Get + + -- ** WebmastersURLcrawlerrorssamplesList + , module Webmasters.URLcrawlerrorssamples.List + + -- ** WebmastersURLcrawlerrorssamplesMarkAsFixed + , module Webmasters.URLcrawlerrorssamples.MarkAsFixed + + -- * Types + + -- ** WmxSitemapContent + , WmxSitemapContent + , wmxSitemapContent + , wscIndexed + , wscType + , wscSubmitted + + -- ** URLCrawlErrorCountsPerType + , URLCrawlErrorCountsPerType + , uRLCrawlErrorCountsPerType + , ucecptPlatform + , ucecptEntries + , ucecptCategory + + -- ** APIdimensionFilterGroup + , APIdimensionFilterGroup + , aPIdimensionFilterGroup + , afgFilters + , afgGroupType + + -- ** URLSampleDetails + , URLSampleDetails + , uRLSampleDetails + , usdLinkedFromUrls + , usdContainingSitemaps + + -- ** APIdataRow + , APIdataRow + , aPIdataRow + , arImpressions + , arKeys + , arCtr + , arClicks + , arPosition + + -- ** APIdimensionFilter + , APIdimensionFilter + , aPIdimensionFilter + , afOperator + , afDimension + , afExpression + + -- ** URLCrawlErrorCount + , URLCrawlErrorCount + , uRLCrawlErrorCount + , ucecCount + , ucecTimestamp + + -- ** SearchAnalyticsQueryResponse + , SearchAnalyticsQueryResponse + , searchAnalyticsQueryResponse + , saqrRows + , saqrResponseAggregationType + + -- ** URLCrawlErrorsSamplesListResponse + , URLCrawlErrorsSamplesListResponse + , uRLCrawlErrorsSamplesListResponse + , uceslrUrlCrawlErrorSample + + -- ** URLCrawlErrorsCountsQueryResponse + , URLCrawlErrorsCountsQueryResponse + , uRLCrawlErrorsCountsQueryResponse + , ucecqrCountPerTypes + + -- ** URLCrawlErrorsSample + , URLCrawlErrorsSample + , uRLCrawlErrorsSample + , ucesResponseCode + , ucesUrlDetails + , ucesLastCrawled + , ucesPageUrl + , ucesFirstDetected + + -- ** SitemapsListResponse + , SitemapsListResponse + , sitemapsListResponse + , slrSitemap + + -- ** WmxSitemap + , WmxSitemap + , wmxSitemap + , wsContents + , wsPath + , wsIsSitemapsIndex + , wsLastSubmitted + , wsWarnings + , wsLastDownloaded + , wsIsPending + , wsType + , wsErrors + + -- ** SearchAnalyticsQueryRequest + , SearchAnalyticsQueryRequest + , searchAnalyticsQueryRequest + , saqrAggregationType + , saqrRowLimit + , saqrEndDate + , saqrSearchType + , saqrDimensionFilterGroups + , saqrStartDate + , saqrDimensions + + -- ** SitesListResponse + , SitesListResponse + , sitesListResponse + , slrSiteEntry + + -- ** WmxSite + , WmxSite + , wmxSite + , wsPermissionLevel + , wsSiteUrl + ) where + +import Network.Google.Prelude +import Network.Google.Resource.Webmasters.Searchanalytics.Query +import Network.Google.Resource.Webmasters.Sitemaps.Delete +import Network.Google.Resource.Webmasters.Sitemaps.Get +import Network.Google.Resource.Webmasters.Sitemaps.List +import Network.Google.Resource.Webmasters.Sitemaps.Submit +import Network.Google.Resource.Webmasters.Sites.Add +import Network.Google.Resource.Webmasters.Sites.Delete +import Network.Google.Resource.Webmasters.Sites.Get +import Network.Google.Resource.Webmasters.Sites.List +import Network.Google.Resource.Webmasters.URLcrawlerrorscounts.Query +import Network.Google.Resource.Webmasters.URLcrawlerrorssamples.Get +import Network.Google.Resource.Webmasters.URLcrawlerrorssamples.List +import Network.Google.Resource.Webmasters.URLcrawlerrorssamples.MarkAsFixed +import Network.Google.WebmasterTools.Types + +{- $resources +TODO +-} + +type WebmasterToolsAPI = + URLcrawlerrorssamples :<|> Sitemaps :<|> + Searchanalytics + :<|> Sites + :<|> URLcrawlerrorscounts + +webmasterToolsAPI :: Proxy WebmasterToolsAPI +webmasterToolsAPI = Proxy diff --git a/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types.hs b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types.hs new file mode 100644 index 000000000..c5a51e8dc --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types.hs @@ -0,0 +1,143 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.WebmasterTools.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.WebmasterTools.Types + ( + -- * Service URL + webmasterToolsURL + + -- * WmxSitemapContent + , WmxSitemapContent + , wmxSitemapContent + , wscIndexed + , wscType + , wscSubmitted + + -- * URLCrawlErrorCountsPerType + , URLCrawlErrorCountsPerType + , uRLCrawlErrorCountsPerType + , ucecptPlatform + , ucecptEntries + , ucecptCategory + + -- * APIdimensionFilterGroup + , APIdimensionFilterGroup + , aPIdimensionFilterGroup + , afgFilters + , afgGroupType + + -- * URLSampleDetails + , URLSampleDetails + , uRLSampleDetails + , usdLinkedFromUrls + , usdContainingSitemaps + + -- * APIdataRow + , APIdataRow + , aPIdataRow + , arImpressions + , arKeys + , arCtr + , arClicks + , arPosition + + -- * APIdimensionFilter + , APIdimensionFilter + , aPIdimensionFilter + , afOperator + , afDimension + , afExpression + + -- * URLCrawlErrorCount + , URLCrawlErrorCount + , uRLCrawlErrorCount + , ucecCount + , ucecTimestamp + + -- * SearchAnalyticsQueryResponse + , SearchAnalyticsQueryResponse + , searchAnalyticsQueryResponse + , saqrRows + , saqrResponseAggregationType + + -- * URLCrawlErrorsSamplesListResponse + , URLCrawlErrorsSamplesListResponse + , uRLCrawlErrorsSamplesListResponse + , uceslrUrlCrawlErrorSample + + -- * URLCrawlErrorsCountsQueryResponse + , URLCrawlErrorsCountsQueryResponse + , uRLCrawlErrorsCountsQueryResponse + , ucecqrCountPerTypes + + -- * URLCrawlErrorsSample + , URLCrawlErrorsSample + , uRLCrawlErrorsSample + , ucesResponseCode + , ucesUrlDetails + , ucesLastCrawled + , ucesPageUrl + , ucesFirstDetected + + -- * SitemapsListResponse + , SitemapsListResponse + , sitemapsListResponse + , slrSitemap + + -- * WmxSitemap + , WmxSitemap + , wmxSitemap + , wsContents + , wsPath + , wsIsSitemapsIndex + , wsLastSubmitted + , wsWarnings + , wsLastDownloaded + , wsIsPending + , wsType + , wsErrors + + -- * SearchAnalyticsQueryRequest + , SearchAnalyticsQueryRequest + , searchAnalyticsQueryRequest + , saqrAggregationType + , saqrRowLimit + , saqrEndDate + , saqrSearchType + , saqrDimensionFilterGroups + , saqrStartDate + , saqrDimensions + + -- * SitesListResponse + , SitesListResponse + , sitesListResponse + , slrSiteEntry + + -- * WmxSite + , WmxSite + , wmxSite + , wsPermissionLevel + , wsSiteUrl + ) where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types.Product +import Network.Google.WebmasterTools.Types.Sum + +-- | URL referring to version 'v3' of the Webmaster Tools API. +webmasterToolsURL :: BaseURL +webmasterToolsURL + = BaseUrl Https + "https://www.googleapis.com/webmasters/v3/" + 443 diff --git a/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Product.hs b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Product.hs new file mode 100644 index 000000000..0336eeb55 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Product.hs @@ -0,0 +1,1032 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.WebmasterTools.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.WebmasterTools.Types.Product where + +import Network.Google.Prelude +import Network.Google.WebmasterTools.Types.Sum + +-- | Information about the various content types in the sitemap. +-- +-- /See:/ 'wmxSitemapContent' smart constructor. +data WmxSitemapContent = WmxSitemapContent + { _wscIndexed :: !(Maybe Int64) + , _wscType :: !(Maybe Text) + , _wscSubmitted :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WmxSitemapContent' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wscIndexed' +-- +-- * 'wscType' +-- +-- * 'wscSubmitted' +wmxSitemapContent + :: WmxSitemapContent +wmxSitemapContent = + WmxSitemapContent + { _wscIndexed = Nothing + , _wscType = Nothing + , _wscSubmitted = Nothing + } + +-- | The number of URLs from the sitemap that were indexed (of the content +-- type). +wscIndexed :: Lens' WmxSitemapContent (Maybe Int64) +wscIndexed + = lens _wscIndexed (\ s a -> s{_wscIndexed = a}) + +-- | The specific type of content in this sitemap. For example: web. +wscType :: Lens' WmxSitemapContent (Maybe Text) +wscType = lens _wscType (\ s a -> s{_wscType = a}) + +-- | The number of URLs in the sitemap (of the content type). +wscSubmitted :: Lens' WmxSitemapContent (Maybe Int64) +wscSubmitted + = lens _wscSubmitted (\ s a -> s{_wscSubmitted = a}) + +instance FromJSON WmxSitemapContent where + parseJSON + = withObject "WmxSitemapContent" + (\ o -> + WmxSitemapContent <$> + (o .:? "indexed") <*> (o .:? "type") <*> + (o .:? "submitted")) + +instance ToJSON WmxSitemapContent where + toJSON WmxSitemapContent{..} + = object + (catMaybes + [("indexed" .=) <$> _wscIndexed, + ("type" .=) <$> _wscType, + ("submitted" .=) <$> _wscSubmitted]) + +-- | Number of errors per day for a specific error type (defined by platform +-- and category). +-- +-- /See:/ 'uRLCrawlErrorCountsPerType' smart constructor. +data URLCrawlErrorCountsPerType = URLCrawlErrorCountsPerType + { _ucecptPlatform :: !(Maybe Text) + , _ucecptEntries :: !(Maybe [Maybe URLCrawlErrorCount]) + , _ucecptCategory :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLCrawlErrorCountsPerType' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucecptPlatform' +-- +-- * 'ucecptEntries' +-- +-- * 'ucecptCategory' +uRLCrawlErrorCountsPerType + :: URLCrawlErrorCountsPerType +uRLCrawlErrorCountsPerType = + URLCrawlErrorCountsPerType + { _ucecptPlatform = Nothing + , _ucecptEntries = Nothing + , _ucecptCategory = Nothing + } + +-- | The general type of Googlebot that made the request (see list of +-- Googlebot user-agents for the user-agents used). +ucecptPlatform :: Lens' URLCrawlErrorCountsPerType (Maybe Text) +ucecptPlatform + = lens _ucecptPlatform + (\ s a -> s{_ucecptPlatform = a}) + +-- | The error count entries time series. +ucecptEntries :: Lens' URLCrawlErrorCountsPerType [Maybe URLCrawlErrorCount] +ucecptEntries + = lens _ucecptEntries + (\ s a -> s{_ucecptEntries = a}) + . _Default + . _Coerce + +-- | The crawl error type. +ucecptCategory :: Lens' URLCrawlErrorCountsPerType (Maybe Text) +ucecptCategory + = lens _ucecptCategory + (\ s a -> s{_ucecptCategory = a}) + +instance FromJSON URLCrawlErrorCountsPerType where + parseJSON + = withObject "URLCrawlErrorCountsPerType" + (\ o -> + URLCrawlErrorCountsPerType <$> + (o .:? "platform") <*> (o .:? "entries" .!= mempty) + <*> (o .:? "category")) + +instance ToJSON URLCrawlErrorCountsPerType where + toJSON URLCrawlErrorCountsPerType{..} + = object + (catMaybes + [("platform" .=) <$> _ucecptPlatform, + ("entries" .=) <$> _ucecptEntries, + ("category" .=) <$> _ucecptCategory]) + +-- +-- /See:/ 'aPIdimensionFilterGroup' smart constructor. +data APIdimensionFilterGroup = APIdimensionFilterGroup + { _afgFilters :: !(Maybe [Maybe APIdimensionFilter]) + , _afgGroupType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIdimensionFilterGroup' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'afgFilters' +-- +-- * 'afgGroupType' +aPIdimensionFilterGroup + :: APIdimensionFilterGroup +aPIdimensionFilterGroup = + APIdimensionFilterGroup + { _afgFilters = Nothing + , _afgGroupType = Nothing + } + +afgFilters :: Lens' APIdimensionFilterGroup [Maybe APIdimensionFilter] +afgFilters + = lens _afgFilters (\ s a -> s{_afgFilters = a}) . + _Default + . _Coerce + +afgGroupType :: Lens' APIdimensionFilterGroup (Maybe Text) +afgGroupType + = lens _afgGroupType (\ s a -> s{_afgGroupType = a}) + +instance FromJSON APIdimensionFilterGroup where + parseJSON + = withObject "APIdimensionFilterGroup" + (\ o -> + APIdimensionFilterGroup <$> + (o .:? "filters" .!= mempty) <*> (o .:? "groupType")) + +instance ToJSON APIdimensionFilterGroup where + toJSON APIdimensionFilterGroup{..} + = object + (catMaybes + [("filters" .=) <$> _afgFilters, + ("groupType" .=) <$> _afgGroupType]) + +-- | Additional details about the URL, set only when calling get(). +-- +-- /See:/ 'uRLSampleDetails' smart constructor. +data URLSampleDetails = URLSampleDetails + { _usdLinkedFromUrls :: !(Maybe [Text]) + , _usdContainingSitemaps :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLSampleDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'usdLinkedFromUrls' +-- +-- * 'usdContainingSitemaps' +uRLSampleDetails + :: URLSampleDetails +uRLSampleDetails = + URLSampleDetails + { _usdLinkedFromUrls = Nothing + , _usdContainingSitemaps = Nothing + } + +-- | A sample set of URLs linking to this URL. +usdLinkedFromUrls :: Lens' URLSampleDetails [Text] +usdLinkedFromUrls + = lens _usdLinkedFromUrls + (\ s a -> s{_usdLinkedFromUrls = a}) + . _Default + . _Coerce + +-- | List of sitemaps pointing at this URL. +usdContainingSitemaps :: Lens' URLSampleDetails [Text] +usdContainingSitemaps + = lens _usdContainingSitemaps + (\ s a -> s{_usdContainingSitemaps = a}) + . _Default + . _Coerce + +instance FromJSON URLSampleDetails where + parseJSON + = withObject "URLSampleDetails" + (\ o -> + URLSampleDetails <$> + (o .:? "linkedFromUrls" .!= mempty) <*> + (o .:? "containingSitemaps" .!= mempty)) + +instance ToJSON URLSampleDetails where + toJSON URLSampleDetails{..} + = object + (catMaybes + [("linkedFromUrls" .=) <$> _usdLinkedFromUrls, + ("containingSitemaps" .=) <$> + _usdContainingSitemaps]) + +-- +-- /See:/ 'aPIdataRow' smart constructor. +data APIdataRow = APIdataRow + { _arImpressions :: !(Maybe Double) + , _arKeys :: !(Maybe [Text]) + , _arCtr :: !(Maybe Double) + , _arClicks :: !(Maybe Double) + , _arPosition :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIdataRow' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'arImpressions' +-- +-- * 'arKeys' +-- +-- * 'arCtr' +-- +-- * 'arClicks' +-- +-- * 'arPosition' +aPIdataRow + :: APIdataRow +aPIdataRow = + APIdataRow + { _arImpressions = Nothing + , _arKeys = Nothing + , _arCtr = Nothing + , _arClicks = Nothing + , _arPosition = Nothing + } + +arImpressions :: Lens' APIdataRow (Maybe Double) +arImpressions + = lens _arImpressions + (\ s a -> s{_arImpressions = a}) + +arKeys :: Lens' APIdataRow [Text] +arKeys + = lens _arKeys (\ s a -> s{_arKeys = a}) . _Default . + _Coerce + +arCtr :: Lens' APIdataRow (Maybe Double) +arCtr = lens _arCtr (\ s a -> s{_arCtr = a}) + +arClicks :: Lens' APIdataRow (Maybe Double) +arClicks = lens _arClicks (\ s a -> s{_arClicks = a}) + +arPosition :: Lens' APIdataRow (Maybe Double) +arPosition + = lens _arPosition (\ s a -> s{_arPosition = a}) + +instance FromJSON APIdataRow where + parseJSON + = withObject "APIdataRow" + (\ o -> + APIdataRow <$> + (o .:? "impressions") <*> (o .:? "keys" .!= mempty) + <*> (o .:? "ctr") + <*> (o .:? "clicks") + <*> (o .:? "position")) + +instance ToJSON APIdataRow where + toJSON APIdataRow{..} + = object + (catMaybes + [("impressions" .=) <$> _arImpressions, + ("keys" .=) <$> _arKeys, ("ctr" .=) <$> _arCtr, + ("clicks" .=) <$> _arClicks, + ("position" .=) <$> _arPosition]) + +-- +-- /See:/ 'aPIdimensionFilter' smart constructor. +data APIdimensionFilter = APIdimensionFilter + { _afOperator :: !(Maybe Text) + , _afDimension :: !(Maybe Text) + , _afExpression :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'APIdimensionFilter' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'afOperator' +-- +-- * 'afDimension' +-- +-- * 'afExpression' +aPIdimensionFilter + :: APIdimensionFilter +aPIdimensionFilter = + APIdimensionFilter + { _afOperator = Nothing + , _afDimension = Nothing + , _afExpression = Nothing + } + +afOperator :: Lens' APIdimensionFilter (Maybe Text) +afOperator + = lens _afOperator (\ s a -> s{_afOperator = a}) + +afDimension :: Lens' APIdimensionFilter (Maybe Text) +afDimension + = lens _afDimension (\ s a -> s{_afDimension = a}) + +afExpression :: Lens' APIdimensionFilter (Maybe Text) +afExpression + = lens _afExpression (\ s a -> s{_afExpression = a}) + +instance FromJSON APIdimensionFilter where + parseJSON + = withObject "APIdimensionFilter" + (\ o -> + APIdimensionFilter <$> + (o .:? "operator") <*> (o .:? "dimension") <*> + (o .:? "expression")) + +instance ToJSON APIdimensionFilter where + toJSON APIdimensionFilter{..} + = object + (catMaybes + [("operator" .=) <$> _afOperator, + ("dimension" .=) <$> _afDimension, + ("expression" .=) <$> _afExpression]) + +-- | An entry in a URL crawl errors time series. +-- +-- /See:/ 'uRLCrawlErrorCount' smart constructor. +data URLCrawlErrorCount = URLCrawlErrorCount + { _ucecCount :: !(Maybe Int64) + , _ucecTimestamp :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLCrawlErrorCount' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucecCount' +-- +-- * 'ucecTimestamp' +uRLCrawlErrorCount + :: URLCrawlErrorCount +uRLCrawlErrorCount = + URLCrawlErrorCount + { _ucecCount = Nothing + , _ucecTimestamp = Nothing + } + +-- | The error count at the given timestamp. +ucecCount :: Lens' URLCrawlErrorCount (Maybe Int64) +ucecCount + = lens _ucecCount (\ s a -> s{_ucecCount = a}) + +-- | The date and time when the crawl attempt took place, in RFC 3339 format. +ucecTimestamp :: Lens' URLCrawlErrorCount (Maybe UTCTime) +ucecTimestamp + = lens _ucecTimestamp + (\ s a -> s{_ucecTimestamp = a}) + +instance FromJSON URLCrawlErrorCount where + parseJSON + = withObject "URLCrawlErrorCount" + (\ o -> + URLCrawlErrorCount <$> + (o .:? "count") <*> (o .:? "timestamp")) + +instance ToJSON URLCrawlErrorCount where + toJSON URLCrawlErrorCount{..} + = object + (catMaybes + [("count" .=) <$> _ucecCount, + ("timestamp" .=) <$> _ucecTimestamp]) + +-- | A list of rows, one per result, grouped by key. Metrics in each row are +-- aggregated for all data grouped by that key either by page or property, +-- as specified by the aggregation type parameter. +-- +-- /See:/ 'searchAnalyticsQueryResponse' smart constructor. +data SearchAnalyticsQueryResponse = SearchAnalyticsQueryResponse + { _saqrRows :: !(Maybe [Maybe APIdataRow]) + , _saqrResponseAggregationType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnalyticsQueryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saqrRows' +-- +-- * 'saqrResponseAggregationType' +searchAnalyticsQueryResponse + :: SearchAnalyticsQueryResponse +searchAnalyticsQueryResponse = + SearchAnalyticsQueryResponse + { _saqrRows = Nothing + , _saqrResponseAggregationType = Nothing + } + +-- | A list of rows grouped by the key values in the order given in the +-- query. +saqrRows :: Lens' SearchAnalyticsQueryResponse [Maybe APIdataRow] +saqrRows + = lens _saqrRows (\ s a -> s{_saqrRows = a}) . + _Default + . _Coerce + +-- | How the results were aggregated. +saqrResponseAggregationType :: Lens' SearchAnalyticsQueryResponse (Maybe Text) +saqrResponseAggregationType + = lens _saqrResponseAggregationType + (\ s a -> s{_saqrResponseAggregationType = a}) + +instance FromJSON SearchAnalyticsQueryResponse where + parseJSON + = withObject "SearchAnalyticsQueryResponse" + (\ o -> + SearchAnalyticsQueryResponse <$> + (o .:? "rows" .!= mempty) <*> + (o .:? "responseAggregationType")) + +instance ToJSON SearchAnalyticsQueryResponse where + toJSON SearchAnalyticsQueryResponse{..} + = object + (catMaybes + [("rows" .=) <$> _saqrRows, + ("responseAggregationType" .=) <$> + _saqrResponseAggregationType]) + +-- | List of crawl error samples. +-- +-- /See:/ 'uRLCrawlErrorsSamplesListResponse' smart constructor. +newtype URLCrawlErrorsSamplesListResponse = URLCrawlErrorsSamplesListResponse + { _uceslrUrlCrawlErrorSample :: Maybe [Maybe URLCrawlErrorsSample] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLCrawlErrorsSamplesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'uceslrUrlCrawlErrorSample' +uRLCrawlErrorsSamplesListResponse + :: URLCrawlErrorsSamplesListResponse +uRLCrawlErrorsSamplesListResponse = + URLCrawlErrorsSamplesListResponse + { _uceslrUrlCrawlErrorSample = Nothing + } + +-- | Information about the sample URL and its crawl error. +uceslrUrlCrawlErrorSample :: Lens' URLCrawlErrorsSamplesListResponse [Maybe URLCrawlErrorsSample] +uceslrUrlCrawlErrorSample + = lens _uceslrUrlCrawlErrorSample + (\ s a -> s{_uceslrUrlCrawlErrorSample = a}) + . _Default + . _Coerce + +instance FromJSON URLCrawlErrorsSamplesListResponse + where + parseJSON + = withObject "URLCrawlErrorsSamplesListResponse" + (\ o -> + URLCrawlErrorsSamplesListResponse <$> + (o .:? "urlCrawlErrorSample" .!= mempty)) + +instance ToJSON URLCrawlErrorsSamplesListResponse + where + toJSON URLCrawlErrorsSamplesListResponse{..} + = object + (catMaybes + [("urlCrawlErrorSample" .=) <$> + _uceslrUrlCrawlErrorSample]) + +-- | A time series of the number of URL crawl errors per error category and +-- platform. +-- +-- /See:/ 'uRLCrawlErrorsCountsQueryResponse' smart constructor. +newtype URLCrawlErrorsCountsQueryResponse = URLCrawlErrorsCountsQueryResponse + { _ucecqrCountPerTypes :: Maybe [Maybe URLCrawlErrorCountsPerType] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLCrawlErrorsCountsQueryResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucecqrCountPerTypes' +uRLCrawlErrorsCountsQueryResponse + :: URLCrawlErrorsCountsQueryResponse +uRLCrawlErrorsCountsQueryResponse = + URLCrawlErrorsCountsQueryResponse + { _ucecqrCountPerTypes = Nothing + } + +-- | The time series of the number of URL crawl errors per error category and +-- platform. +ucecqrCountPerTypes :: Lens' URLCrawlErrorsCountsQueryResponse [Maybe URLCrawlErrorCountsPerType] +ucecqrCountPerTypes + = lens _ucecqrCountPerTypes + (\ s a -> s{_ucecqrCountPerTypes = a}) + . _Default + . _Coerce + +instance FromJSON URLCrawlErrorsCountsQueryResponse + where + parseJSON + = withObject "URLCrawlErrorsCountsQueryResponse" + (\ o -> + URLCrawlErrorsCountsQueryResponse <$> + (o .:? "countPerTypes" .!= mempty)) + +instance ToJSON URLCrawlErrorsCountsQueryResponse + where + toJSON URLCrawlErrorsCountsQueryResponse{..} + = object + (catMaybes + [("countPerTypes" .=) <$> _ucecqrCountPerTypes]) + +-- | Contains information about specific crawl errors. +-- +-- /See:/ 'uRLCrawlErrorsSample' smart constructor. +data URLCrawlErrorsSample = URLCrawlErrorsSample + { _ucesResponseCode :: !(Maybe Int32) + , _ucesUrlDetails :: !(Maybe (Maybe URLSampleDetails)) + , _ucesLastCrawled :: !(Maybe UTCTime) + , _ucesPageUrl :: !(Maybe Text) + , _ucesFirstDetected :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'URLCrawlErrorsSample' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ucesResponseCode' +-- +-- * 'ucesUrlDetails' +-- +-- * 'ucesLastCrawled' +-- +-- * 'ucesPageUrl' +-- +-- * 'ucesFirstDetected' +uRLCrawlErrorsSample + :: URLCrawlErrorsSample +uRLCrawlErrorsSample = + URLCrawlErrorsSample + { _ucesResponseCode = Nothing + , _ucesUrlDetails = Nothing + , _ucesLastCrawled = Nothing + , _ucesPageUrl = Nothing + , _ucesFirstDetected = Nothing + } + +-- | The HTTP response code, if any. +ucesResponseCode :: Lens' URLCrawlErrorsSample (Maybe Int32) +ucesResponseCode + = lens _ucesResponseCode + (\ s a -> s{_ucesResponseCode = a}) + +-- | Additional details about the URL, set only when calling get(). +ucesUrlDetails :: Lens' URLCrawlErrorsSample (Maybe (Maybe URLSampleDetails)) +ucesUrlDetails + = lens _ucesUrlDetails + (\ s a -> s{_ucesUrlDetails = a}) + +-- | The time when the URL was last crawled, in RFC 3339 format. +ucesLastCrawled :: Lens' URLCrawlErrorsSample (Maybe UTCTime) +ucesLastCrawled + = lens _ucesLastCrawled + (\ s a -> s{_ucesLastCrawled = a}) + +-- | The URL of an error, relative to the site. +ucesPageUrl :: Lens' URLCrawlErrorsSample (Maybe Text) +ucesPageUrl + = lens _ucesPageUrl (\ s a -> s{_ucesPageUrl = a}) + +-- | The time the error was first detected, in RFC 3339 format. +ucesFirstDetected :: Lens' URLCrawlErrorsSample (Maybe UTCTime) +ucesFirstDetected + = lens _ucesFirstDetected + (\ s a -> s{_ucesFirstDetected = a}) + +instance FromJSON URLCrawlErrorsSample where + parseJSON + = withObject "URLCrawlErrorsSample" + (\ o -> + URLCrawlErrorsSample <$> + (o .:? "responseCode") <*> (o .:? "urlDetails") <*> + (o .:? "last_crawled") + <*> (o .:? "pageUrl") + <*> (o .:? "first_detected")) + +instance ToJSON URLCrawlErrorsSample where + toJSON URLCrawlErrorsSample{..} + = object + (catMaybes + [("responseCode" .=) <$> _ucesResponseCode, + ("urlDetails" .=) <$> _ucesUrlDetails, + ("last_crawled" .=) <$> _ucesLastCrawled, + ("pageUrl" .=) <$> _ucesPageUrl, + ("first_detected" .=) <$> _ucesFirstDetected]) + +-- | List of sitemaps. +-- +-- /See:/ 'sitemapsListResponse' smart constructor. +newtype SitemapsListResponse = SitemapsListResponse + { _slrSitemap :: Maybe [Maybe WmxSitemap] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitemapsListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrSitemap' +sitemapsListResponse + :: SitemapsListResponse +sitemapsListResponse = + SitemapsListResponse + { _slrSitemap = Nothing + } + +-- | Contains detailed information about a specific URL submitted as a +-- sitemap. +slrSitemap :: Lens' SitemapsListResponse [Maybe WmxSitemap] +slrSitemap + = lens _slrSitemap (\ s a -> s{_slrSitemap = a}) . + _Default + . _Coerce + +instance FromJSON SitemapsListResponse where + parseJSON + = withObject "SitemapsListResponse" + (\ o -> + SitemapsListResponse <$> + (o .:? "sitemap" .!= mempty)) + +instance ToJSON SitemapsListResponse where + toJSON SitemapsListResponse{..} + = object (catMaybes [("sitemap" .=) <$> _slrSitemap]) + +-- | Contains detailed information about a specific URL submitted as a +-- sitemap. +-- +-- /See:/ 'wmxSitemap' smart constructor. +data WmxSitemap = WmxSitemap + { _wsContents :: !(Maybe [Maybe WmxSitemapContent]) + , _wsPath :: !(Maybe Text) + , _wsIsSitemapsIndex :: !(Maybe Bool) + , _wsLastSubmitted :: !(Maybe UTCTime) + , _wsWarnings :: !(Maybe Int64) + , _wsLastDownloaded :: !(Maybe UTCTime) + , _wsIsPending :: !(Maybe Bool) + , _wsType :: !(Maybe Text) + , _wsErrors :: !(Maybe Int64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WmxSitemap' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsContents' +-- +-- * 'wsPath' +-- +-- * 'wsIsSitemapsIndex' +-- +-- * 'wsLastSubmitted' +-- +-- * 'wsWarnings' +-- +-- * 'wsLastDownloaded' +-- +-- * 'wsIsPending' +-- +-- * 'wsType' +-- +-- * 'wsErrors' +wmxSitemap + :: WmxSitemap +wmxSitemap = + WmxSitemap + { _wsContents = Nothing + , _wsPath = Nothing + , _wsIsSitemapsIndex = Nothing + , _wsLastSubmitted = Nothing + , _wsWarnings = Nothing + , _wsLastDownloaded = Nothing + , _wsIsPending = Nothing + , _wsType = Nothing + , _wsErrors = Nothing + } + +-- | The various content types in the sitemap. +wsContents :: Lens' WmxSitemap [Maybe WmxSitemapContent] +wsContents + = lens _wsContents (\ s a -> s{_wsContents = a}) . + _Default + . _Coerce + +-- | The url of the sitemap. +wsPath :: Lens' WmxSitemap (Maybe Text) +wsPath = lens _wsPath (\ s a -> s{_wsPath = a}) + +-- | If true, the sitemap is a collection of sitemaps. +wsIsSitemapsIndex :: Lens' WmxSitemap (Maybe Bool) +wsIsSitemapsIndex + = lens _wsIsSitemapsIndex + (\ s a -> s{_wsIsSitemapsIndex = a}) + +-- | Date & time in which this sitemap was submitted. Date format is in RFC +-- 3339 format (yyyy-mm-dd). +wsLastSubmitted :: Lens' WmxSitemap (Maybe UTCTime) +wsLastSubmitted + = lens _wsLastSubmitted + (\ s a -> s{_wsLastSubmitted = a}) + +-- | Number of warnings for the sitemap. These are generally non-critical +-- issues with URLs in the sitemaps. +wsWarnings :: Lens' WmxSitemap (Maybe Int64) +wsWarnings + = lens _wsWarnings (\ s a -> s{_wsWarnings = a}) + +-- | Date & time in which this sitemap was last downloaded. Date format is in +-- RFC 3339 format (yyyy-mm-dd). +wsLastDownloaded :: Lens' WmxSitemap (Maybe UTCTime) +wsLastDownloaded + = lens _wsLastDownloaded + (\ s a -> s{_wsLastDownloaded = a}) + +-- | If true, the sitemap has not been processed. +wsIsPending :: Lens' WmxSitemap (Maybe Bool) +wsIsPending + = lens _wsIsPending (\ s a -> s{_wsIsPending = a}) + +-- | The type of the sitemap. For example: rssFeed. +wsType :: Lens' WmxSitemap (Maybe Text) +wsType = lens _wsType (\ s a -> s{_wsType = a}) + +-- | Number of errors in the sitemap. These are issues with the sitemap +-- itself that need to be fixed before it can be processed correctly. +wsErrors :: Lens' WmxSitemap (Maybe Int64) +wsErrors = lens _wsErrors (\ s a -> s{_wsErrors = a}) + +instance FromJSON WmxSitemap where + parseJSON + = withObject "WmxSitemap" + (\ o -> + WmxSitemap <$> + (o .:? "contents" .!= mempty) <*> (o .:? "path") <*> + (o .:? "isSitemapsIndex") + <*> (o .:? "lastSubmitted") + <*> (o .:? "warnings") + <*> (o .:? "lastDownloaded") + <*> (o .:? "isPending") + <*> (o .:? "type") + <*> (o .:? "errors")) + +instance ToJSON WmxSitemap where + toJSON WmxSitemap{..} + = object + (catMaybes + [("contents" .=) <$> _wsContents, + ("path" .=) <$> _wsPath, + ("isSitemapsIndex" .=) <$> _wsIsSitemapsIndex, + ("lastSubmitted" .=) <$> _wsLastSubmitted, + ("warnings" .=) <$> _wsWarnings, + ("lastDownloaded" .=) <$> _wsLastDownloaded, + ("isPending" .=) <$> _wsIsPending, + ("type" .=) <$> _wsType, + ("errors" .=) <$> _wsErrors]) + +-- +-- /See:/ 'searchAnalyticsQueryRequest' smart constructor. +data SearchAnalyticsQueryRequest = SearchAnalyticsQueryRequest + { _saqrAggregationType :: !(Maybe Text) + , _saqrRowLimit :: !(Maybe Int32) + , _saqrEndDate :: !(Maybe Text) + , _saqrSearchType :: !(Maybe Text) + , _saqrDimensionFilterGroups :: !(Maybe [Maybe APIdimensionFilterGroup]) + , _saqrStartDate :: !(Maybe Text) + , _saqrDimensions :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchAnalyticsQueryRequest' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'saqrAggregationType' +-- +-- * 'saqrRowLimit' +-- +-- * 'saqrEndDate' +-- +-- * 'saqrSearchType' +-- +-- * 'saqrDimensionFilterGroups' +-- +-- * 'saqrStartDate' +-- +-- * 'saqrDimensions' +searchAnalyticsQueryRequest + :: SearchAnalyticsQueryRequest +searchAnalyticsQueryRequest = + SearchAnalyticsQueryRequest + { _saqrAggregationType = Nothing + , _saqrRowLimit = Nothing + , _saqrEndDate = Nothing + , _saqrSearchType = Nothing + , _saqrDimensionFilterGroups = Nothing + , _saqrStartDate = Nothing + , _saqrDimensions = Nothing + } + +-- | [Optional; Default is \"auto\"] How data is aggregated. If aggregated by +-- property, all data for the same property is aggregated; if aggregated by +-- page, all data is aggregated by canonical URI. If you filter or group by +-- page, choose AUTO; otherwise you can aggregate either by property or by +-- page, depending on how you want your data calculated; see the help +-- documentation to learn how data is calculated differently by site versus +-- by page. Note: If you group or filter by page, you cannot aggregate by +-- property. If you specify any value other than AUTO, the aggregation type +-- in the result will match the requested type, or if you request an +-- invalid type, you will get an error. The API will never change your +-- aggregation type if the requested type is invalid. +saqrAggregationType :: Lens' SearchAnalyticsQueryRequest (Maybe Text) +saqrAggregationType + = lens _saqrAggregationType + (\ s a -> s{_saqrAggregationType = a}) + +-- | [Optional; Default is 1000] The maximum number of rows to return. Must +-- be a number from 1 to 5,000 (inclusive). +saqrRowLimit :: Lens' SearchAnalyticsQueryRequest (Maybe Int32) +saqrRowLimit + = lens _saqrRowLimit (\ s a -> s{_saqrRowLimit = a}) + +-- | [Required] End date of the requested date range, in YYYY-MM-DD format, +-- in PST (UTC - 8:00). Must be greater than or equal to the start date. +-- This value is included in the range. +saqrEndDate :: Lens' SearchAnalyticsQueryRequest (Maybe Text) +saqrEndDate + = lens _saqrEndDate (\ s a -> s{_saqrEndDate = a}) + +-- | [Optional; Default is \"web\"] The search type to filter for. +saqrSearchType :: Lens' SearchAnalyticsQueryRequest (Maybe Text) +saqrSearchType + = lens _saqrSearchType + (\ s a -> s{_saqrSearchType = a}) + +-- | [Optional] Zero or more filters to apply to the dimension grouping +-- values; for example, \'query contains \"buy\"\' to see only data where +-- the query string contains the substring \"buy\" (not case-sensitive). +-- You can filter by a dimension without grouping by it. +saqrDimensionFilterGroups :: Lens' SearchAnalyticsQueryRequest [Maybe APIdimensionFilterGroup] +saqrDimensionFilterGroups + = lens _saqrDimensionFilterGroups + (\ s a -> s{_saqrDimensionFilterGroups = a}) + . _Default + . _Coerce + +-- | [Required] Start date of the requested date range, in YYYY-MM-DD format, +-- in PST time (UTC - 8:00). Must be less than or equal to the end date. +-- This value is included in the range. +saqrStartDate :: Lens' SearchAnalyticsQueryRequest (Maybe Text) +saqrStartDate + = lens _saqrStartDate + (\ s a -> s{_saqrStartDate = a}) + +-- | [Optional] Zero or more dimensions to group results by. Dimensions are +-- the group-by values in the Search Analytics page. Dimensions are +-- combined to create a unique row key for each row. Results are grouped in +-- the order that you supply these dimensions. +saqrDimensions :: Lens' SearchAnalyticsQueryRequest [Text] +saqrDimensions + = lens _saqrDimensions + (\ s a -> s{_saqrDimensions = a}) + . _Default + . _Coerce + +instance FromJSON SearchAnalyticsQueryRequest where + parseJSON + = withObject "SearchAnalyticsQueryRequest" + (\ o -> + SearchAnalyticsQueryRequest <$> + (o .:? "aggregationType") <*> (o .:? "rowLimit") <*> + (o .:? "endDate") + <*> (o .:? "searchType") + <*> (o .:? "dimensionFilterGroups" .!= mempty) + <*> (o .:? "startDate") + <*> (o .:? "dimensions" .!= mempty)) + +instance ToJSON SearchAnalyticsQueryRequest where + toJSON SearchAnalyticsQueryRequest{..} + = object + (catMaybes + [("aggregationType" .=) <$> _saqrAggregationType, + ("rowLimit" .=) <$> _saqrRowLimit, + ("endDate" .=) <$> _saqrEndDate, + ("searchType" .=) <$> _saqrSearchType, + ("dimensionFilterGroups" .=) <$> + _saqrDimensionFilterGroups, + ("startDate" .=) <$> _saqrStartDate, + ("dimensions" .=) <$> _saqrDimensions]) + +-- | List of sites with access level information. +-- +-- /See:/ 'sitesListResponse' smart constructor. +newtype SitesListResponse = SitesListResponse + { _slrSiteEntry :: Maybe [Maybe WmxSite] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SitesListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrSiteEntry' +sitesListResponse + :: SitesListResponse +sitesListResponse = + SitesListResponse + { _slrSiteEntry = Nothing + } + +-- | Contains permission level information about a Webmaster Tools site. For +-- more information, see Permissions in Webmaster Tools. +slrSiteEntry :: Lens' SitesListResponse [Maybe WmxSite] +slrSiteEntry + = lens _slrSiteEntry (\ s a -> s{_slrSiteEntry = a}) + . _Default + . _Coerce + +instance FromJSON SitesListResponse where + parseJSON + = withObject "SitesListResponse" + (\ o -> + SitesListResponse <$> (o .:? "siteEntry" .!= mempty)) + +instance ToJSON SitesListResponse where + toJSON SitesListResponse{..} + = object + (catMaybes [("siteEntry" .=) <$> _slrSiteEntry]) + +-- | Contains permission level information about a Webmaster Tools site. For +-- more information, see Permissions in Webmaster Tools. +-- +-- /See:/ 'wmxSite' smart constructor. +data WmxSite = WmxSite + { _wsPermissionLevel :: !(Maybe Text) + , _wsSiteUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WmxSite' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsPermissionLevel' +-- +-- * 'wsSiteUrl' +wmxSite + :: WmxSite +wmxSite = + WmxSite + { _wsPermissionLevel = Nothing + , _wsSiteUrl = Nothing + } + +-- | The user\'s permission level for the site. +wsPermissionLevel :: Lens' WmxSite (Maybe Text) +wsPermissionLevel + = lens _wsPermissionLevel + (\ s a -> s{_wsPermissionLevel = a}) + +-- | The URL of the site. +wsSiteUrl :: Lens' WmxSite (Maybe Text) +wsSiteUrl + = lens _wsSiteUrl (\ s a -> s{_wsSiteUrl = a}) + +instance FromJSON WmxSite where + parseJSON + = withObject "WmxSite" + (\ o -> + WmxSite <$> + (o .:? "permissionLevel") <*> (o .:? "siteUrl")) + +instance ToJSON WmxSite where + toJSON WmxSite{..} + = object + (catMaybes + [("permissionLevel" .=) <$> _wsPermissionLevel, + ("siteUrl" .=) <$> _wsSiteUrl]) diff --git a/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Sum.hs b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Sum.hs new file mode 100644 index 000000000..fec4349f4 --- /dev/null +++ b/gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.WebmasterTools.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.WebmasterTools.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-webmaster-tools/gogol-webmaster-tools.cabal b/gogol-webmaster-tools/gogol-webmaster-tools.cabal new file mode 100644 index 000000000..aea4bda24 --- /dev/null +++ b/gogol-webmaster-tools/gogol-webmaster-tools.cabal @@ -0,0 +1,55 @@ +name: gogol-webmaster-tools +version: 0.0.1 +synopsis: Webmaster Tools API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Lets you view Google Webmaster Tools data for your verified sites. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.Webmasters.Searchanalytics.Query + , Network.Google.Resource.Webmasters.Sitemaps.Delete + , Network.Google.Resource.Webmasters.Sitemaps.Get + , Network.Google.Resource.Webmasters.Sitemaps.List + , Network.Google.Resource.Webmasters.Sitemaps.Submit + , Network.Google.Resource.Webmasters.Sites.Add + , Network.Google.Resource.Webmasters.Sites.Delete + , Network.Google.Resource.Webmasters.Sites.Get + , Network.Google.Resource.Webmasters.Sites.List + , Network.Google.Resource.Webmasters.URLcrawlerrorscounts.Query + , Network.Google.Resource.Webmasters.URLcrawlerrorssamples.Get + , Network.Google.Resource.Webmasters.URLcrawlerrorssamples.List + , Network.Google.Resource.Webmasters.URLcrawlerrorssamples.MarkAsFixed + , Network.Google.WebmasterTools + , Network.Google.WebmasterTools.Types + + other-modules: + Network.Google.WebmasterTools.Types.Product + , Network.Google.WebmasterTools.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-webmaster-tools/src/.gitkeep b/gogol-webmaster-tools/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-youtube-analytics/LICENSE b/gogol-youtube-analytics/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-youtube-analytics/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-youtube-analytics/Makefile b/gogol-youtube-analytics/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-youtube-analytics/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-youtube-analytics/README.md b/gogol-youtube-analytics/README.md new file mode 100644 index 000000000..20ee3c060 --- /dev/null +++ b/gogol-youtube-analytics/README.md @@ -0,0 +1,28 @@ +# gogol-youtube-analytics + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the YouTube Analytics API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-youtube-analytics` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-youtube-analytics/Setup.hs b/gogol-youtube-analytics/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-youtube-analytics/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReportDefinitions/List.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReportDefinitions/List.hs new file mode 100644 index 000000000..f752d8f80 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReportDefinitions/List.hs @@ -0,0 +1,164 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.BatchReportDefinitions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of available batch report definitions. +-- +-- /See:/ for @YouTubeAnalyticsBatchReportDefinitionsList@. +module YouTubeAnalytics.BatchReportDefinitions.List + ( + -- * REST Resource + BatchReportDefinitionsListAPI + + -- * Creating a Request + , batchReportDefinitionsList + , BatchReportDefinitionsList + + -- * Request Lenses + , brdlQuotaUser + , brdlPrettyPrint + , brdlUserIp + , brdlOnBehalfOfContentOwner + , brdlKey + , brdlOauthToken + , brdlFields + , brdlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsBatchReportDefinitionsList@ which the +-- 'BatchReportDefinitionsList' request conforms to. +type BatchReportDefinitionsListAPI = + "batchReportDefinitions" :> + QueryParam "onBehalfOfContentOwner" Text :> + Get '[JSON] BatchReportDefinitionList + +-- | Retrieves a list of available batch report definitions. +-- +-- /See:/ 'batchReportDefinitionsList' smart constructor. +data BatchReportDefinitionsList = BatchReportDefinitionsList + { _brdlQuotaUser :: !(Maybe Text) + , _brdlPrettyPrint :: !Bool + , _brdlUserIp :: !(Maybe Text) + , _brdlOnBehalfOfContentOwner :: !Text + , _brdlKey :: !(Maybe Text) + , _brdlOauthToken :: !(Maybe Text) + , _brdlFields :: !(Maybe Text) + , _brdlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReportDefinitionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brdlQuotaUser' +-- +-- * 'brdlPrettyPrint' +-- +-- * 'brdlUserIp' +-- +-- * 'brdlOnBehalfOfContentOwner' +-- +-- * 'brdlKey' +-- +-- * 'brdlOauthToken' +-- +-- * 'brdlFields' +-- +-- * 'brdlAlt' +batchReportDefinitionsList + :: Text -- ^ 'onBehalfOfContentOwner' + -> BatchReportDefinitionsList +batchReportDefinitionsList pBrdlOnBehalfOfContentOwner_ = + BatchReportDefinitionsList + { _brdlQuotaUser = Nothing + , _brdlPrettyPrint = True + , _brdlUserIp = Nothing + , _brdlOnBehalfOfContentOwner = pBrdlOnBehalfOfContentOwner_ + , _brdlKey = Nothing + , _brdlOauthToken = Nothing + , _brdlFields = Nothing + , _brdlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +brdlQuotaUser :: Lens' BatchReportDefinitionsList' (Maybe Text) +brdlQuotaUser + = lens _brdlQuotaUser + (\ s a -> s{_brdlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brdlPrettyPrint :: Lens' BatchReportDefinitionsList' Bool +brdlPrettyPrint + = lens _brdlPrettyPrint + (\ s a -> s{_brdlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +brdlUserIp :: Lens' BatchReportDefinitionsList' (Maybe Text) +brdlUserIp + = lens _brdlUserIp (\ s a -> s{_brdlUserIp = a}) + +-- | The onBehalfOfContentOwner parameter identifies the content owner that +-- the user is acting on behalf of. +brdlOnBehalfOfContentOwner :: Lens' BatchReportDefinitionsList' Text +brdlOnBehalfOfContentOwner + = lens _brdlOnBehalfOfContentOwner + (\ s a -> s{_brdlOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brdlKey :: Lens' BatchReportDefinitionsList' (Maybe Text) +brdlKey = lens _brdlKey (\ s a -> s{_brdlKey = a}) + +-- | OAuth 2.0 token for the current user. +brdlOauthToken :: Lens' BatchReportDefinitionsList' (Maybe Text) +brdlOauthToken + = lens _brdlOauthToken + (\ s a -> s{_brdlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +brdlFields :: Lens' BatchReportDefinitionsList' (Maybe Text) +brdlFields + = lens _brdlFields (\ s a -> s{_brdlFields = a}) + +-- | Data format for the response. +brdlAlt :: Lens' BatchReportDefinitionsList' Text +brdlAlt = lens _brdlAlt (\ s a -> s{_brdlAlt = a}) + +instance GoogleRequest BatchReportDefinitionsList' + where + type Rs BatchReportDefinitionsList' = + BatchReportDefinitionList + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u BatchReportDefinitionsList{..} + = go _brdlQuotaUser _brdlPrettyPrint _brdlUserIp + (Just _brdlOnBehalfOfContentOwner) + _brdlKey + _brdlOauthToken + _brdlFields + _brdlAlt + where go + = clientWithRoute + (Proxy :: Proxy BatchReportDefinitionsListAPI) + r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReports/List.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReports/List.hs new file mode 100644 index 000000000..8c24ffcb0 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/BatchReports/List.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.BatchReports.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves a list of processed batch reports. +-- +-- /See:/ for @YouTubeAnalyticsBatchReportsList@. +module YouTubeAnalytics.BatchReports.List + ( + -- * REST Resource + BatchReportsListAPI + + -- * Creating a Request + , batchReportsList + , BatchReportsList + + -- * Request Lenses + , brlQuotaUser + , brlPrettyPrint + , brlBatchReportDefinitionId + , brlUserIp + , brlOnBehalfOfContentOwner + , brlKey + , brlOauthToken + , brlFields + , brlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsBatchReportsList@ which the +-- 'BatchReportsList' request conforms to. +type BatchReportsListAPI = + "batchReports" :> + QueryParam "batchReportDefinitionId" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Get '[JSON] BatchReportList + +-- | Retrieves a list of processed batch reports. +-- +-- /See:/ 'batchReportsList' smart constructor. +data BatchReportsList = BatchReportsList + { _brlQuotaUser :: !(Maybe Text) + , _brlPrettyPrint :: !Bool + , _brlBatchReportDefinitionId :: !Text + , _brlUserIp :: !(Maybe Text) + , _brlOnBehalfOfContentOwner :: !Text + , _brlKey :: !(Maybe Text) + , _brlOauthToken :: !(Maybe Text) + , _brlFields :: !(Maybe Text) + , _brlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReportsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brlQuotaUser' +-- +-- * 'brlPrettyPrint' +-- +-- * 'brlBatchReportDefinitionId' +-- +-- * 'brlUserIp' +-- +-- * 'brlOnBehalfOfContentOwner' +-- +-- * 'brlKey' +-- +-- * 'brlOauthToken' +-- +-- * 'brlFields' +-- +-- * 'brlAlt' +batchReportsList + :: Text -- ^ 'batchReportDefinitionId' + -> Text -- ^ 'onBehalfOfContentOwner' + -> BatchReportsList +batchReportsList pBrlBatchReportDefinitionId_ pBrlOnBehalfOfContentOwner_ = + BatchReportsList + { _brlQuotaUser = Nothing + , _brlPrettyPrint = True + , _brlBatchReportDefinitionId = pBrlBatchReportDefinitionId_ + , _brlUserIp = Nothing + , _brlOnBehalfOfContentOwner = pBrlOnBehalfOfContentOwner_ + , _brlKey = Nothing + , _brlOauthToken = Nothing + , _brlFields = Nothing + , _brlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +brlQuotaUser :: Lens' BatchReportsList' (Maybe Text) +brlQuotaUser + = lens _brlQuotaUser (\ s a -> s{_brlQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +brlPrettyPrint :: Lens' BatchReportsList' Bool +brlPrettyPrint + = lens _brlPrettyPrint + (\ s a -> s{_brlPrettyPrint = a}) + +-- | The batchReportDefinitionId parameter specifies the ID of the batch +-- reportort definition for which you are retrieving reports. +brlBatchReportDefinitionId :: Lens' BatchReportsList' Text +brlBatchReportDefinitionId + = lens _brlBatchReportDefinitionId + (\ s a -> s{_brlBatchReportDefinitionId = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +brlUserIp :: Lens' BatchReportsList' (Maybe Text) +brlUserIp + = lens _brlUserIp (\ s a -> s{_brlUserIp = a}) + +-- | The onBehalfOfContentOwner parameter identifies the content owner that +-- the user is acting on behalf of. +brlOnBehalfOfContentOwner :: Lens' BatchReportsList' Text +brlOnBehalfOfContentOwner + = lens _brlOnBehalfOfContentOwner + (\ s a -> s{_brlOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +brlKey :: Lens' BatchReportsList' (Maybe Text) +brlKey = lens _brlKey (\ s a -> s{_brlKey = a}) + +-- | OAuth 2.0 token for the current user. +brlOauthToken :: Lens' BatchReportsList' (Maybe Text) +brlOauthToken + = lens _brlOauthToken + (\ s a -> s{_brlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +brlFields :: Lens' BatchReportsList' (Maybe Text) +brlFields + = lens _brlFields (\ s a -> s{_brlFields = a}) + +-- | Data format for the response. +brlAlt :: Lens' BatchReportsList' Text +brlAlt = lens _brlAlt (\ s a -> s{_brlAlt = a}) + +instance GoogleRequest BatchReportsList' where + type Rs BatchReportsList' = BatchReportList + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u BatchReportsList{..} + = go _brlQuotaUser _brlPrettyPrint + (Just _brlBatchReportDefinitionId) + _brlUserIp + (Just _brlOnBehalfOfContentOwner) + _brlKey + _brlOauthToken + _brlFields + _brlAlt + where go + = clientWithRoute + (Proxy :: Proxy BatchReportsListAPI) + r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs new file mode 100644 index 000000000..a7ab2a0ee --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs @@ -0,0 +1,180 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.GroupItems.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Removes an item from a group. +-- +-- /See:/ for @YouTubeAnalyticsGroupItemsDelete@. +module YouTubeAnalytics.GroupItems.Delete + ( + -- * REST Resource + GroupItemsDeleteAPI + + -- * Creating a Request + , groupItemsDelete + , GroupItemsDelete + + -- * Request Lenses + , gidQuotaUser + , gidPrettyPrint + , gidUserIp + , gidOnBehalfOfContentOwner + , gidKey + , gidId + , gidOauthToken + , gidFields + , gidAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupItemsDelete@ which the +-- 'GroupItemsDelete' request conforms to. +type GroupItemsDeleteAPI = + "groupItems" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Removes an item from a group. +-- +-- /See:/ 'groupItemsDelete' smart constructor. +data GroupItemsDelete = GroupItemsDelete + { _gidQuotaUser :: !(Maybe Text) + , _gidPrettyPrint :: !Bool + , _gidUserIp :: !(Maybe Text) + , _gidOnBehalfOfContentOwner :: !(Maybe Text) + , _gidKey :: !(Maybe Text) + , _gidId :: !Text + , _gidOauthToken :: !(Maybe Text) + , _gidFields :: !(Maybe Text) + , _gidAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupItemsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gidQuotaUser' +-- +-- * 'gidPrettyPrint' +-- +-- * 'gidUserIp' +-- +-- * 'gidOnBehalfOfContentOwner' +-- +-- * 'gidKey' +-- +-- * 'gidId' +-- +-- * 'gidOauthToken' +-- +-- * 'gidFields' +-- +-- * 'gidAlt' +groupItemsDelete + :: Text -- ^ 'id' + -> GroupItemsDelete +groupItemsDelete pGidId_ = + GroupItemsDelete + { _gidQuotaUser = Nothing + , _gidPrettyPrint = True + , _gidUserIp = Nothing + , _gidOnBehalfOfContentOwner = Nothing + , _gidKey = Nothing + , _gidId = pGidId_ + , _gidOauthToken = Nothing + , _gidFields = Nothing + , _gidAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gidQuotaUser :: Lens' GroupItemsDelete' (Maybe Text) +gidQuotaUser + = lens _gidQuotaUser (\ s a -> s{_gidQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gidPrettyPrint :: Lens' GroupItemsDelete' Bool +gidPrettyPrint + = lens _gidPrettyPrint + (\ s a -> s{_gidPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gidUserIp :: Lens' GroupItemsDelete' (Maybe Text) +gidUserIp + = lens _gidUserIp (\ s a -> s{_gidUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +gidOnBehalfOfContentOwner :: Lens' GroupItemsDelete' (Maybe Text) +gidOnBehalfOfContentOwner + = lens _gidOnBehalfOfContentOwner + (\ s a -> s{_gidOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gidKey :: Lens' GroupItemsDelete' (Maybe Text) +gidKey = lens _gidKey (\ s a -> s{_gidKey = a}) + +-- | The id parameter specifies the YouTube group item ID for the group that +-- is being deleted. +gidId :: Lens' GroupItemsDelete' Text +gidId = lens _gidId (\ s a -> s{_gidId = a}) + +-- | OAuth 2.0 token for the current user. +gidOauthToken :: Lens' GroupItemsDelete' (Maybe Text) +gidOauthToken + = lens _gidOauthToken + (\ s a -> s{_gidOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gidFields :: Lens' GroupItemsDelete' (Maybe Text) +gidFields + = lens _gidFields (\ s a -> s{_gidFields = a}) + +-- | Data format for the response. +gidAlt :: Lens' GroupItemsDelete' Text +gidAlt = lens _gidAlt (\ s a -> s{_gidAlt = a}) + +instance GoogleRequest GroupItemsDelete' where + type Rs GroupItemsDelete' = () + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupItemsDelete{..} + = go _gidQuotaUser _gidPrettyPrint _gidUserIp + _gidOnBehalfOfContentOwner + _gidKey + (Just _gidId) + _gidOauthToken + _gidFields + _gidAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupItemsDeleteAPI) + r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Insert.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Insert.hs new file mode 100644 index 000000000..c75d2b22b --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Insert.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.GroupItems.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a group item. +-- +-- /See:/ for @YouTubeAnalyticsGroupItemsInsert@. +module YouTubeAnalytics.GroupItems.Insert + ( + -- * REST Resource + GroupItemsInsertAPI + + -- * Creating a Request + , groupItemsInsert + , GroupItemsInsert + + -- * Request Lenses + , giiQuotaUser + , giiPrettyPrint + , giiUserIp + , giiOnBehalfOfContentOwner + , giiKey + , giiOauthToken + , giiFields + , giiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupItemsInsert@ which the +-- 'GroupItemsInsert' request conforms to. +type GroupItemsInsertAPI = + "groupItems" :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] GroupItem + +-- | Creates a group item. +-- +-- /See:/ 'groupItemsInsert' smart constructor. +data GroupItemsInsert = GroupItemsInsert + { _giiQuotaUser :: !(Maybe Text) + , _giiPrettyPrint :: !Bool + , _giiUserIp :: !(Maybe Text) + , _giiOnBehalfOfContentOwner :: !(Maybe Text) + , _giiKey :: !(Maybe Text) + , _giiOauthToken :: !(Maybe Text) + , _giiFields :: !(Maybe Text) + , _giiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupItemsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giiQuotaUser' +-- +-- * 'giiPrettyPrint' +-- +-- * 'giiUserIp' +-- +-- * 'giiOnBehalfOfContentOwner' +-- +-- * 'giiKey' +-- +-- * 'giiOauthToken' +-- +-- * 'giiFields' +-- +-- * 'giiAlt' +groupItemsInsert + :: GroupItemsInsert +groupItemsInsert = + GroupItemsInsert + { _giiQuotaUser = Nothing + , _giiPrettyPrint = True + , _giiUserIp = Nothing + , _giiOnBehalfOfContentOwner = Nothing + , _giiKey = Nothing + , _giiOauthToken = Nothing + , _giiFields = Nothing + , _giiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +giiQuotaUser :: Lens' GroupItemsInsert' (Maybe Text) +giiQuotaUser + = lens _giiQuotaUser (\ s a -> s{_giiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +giiPrettyPrint :: Lens' GroupItemsInsert' Bool +giiPrettyPrint + = lens _giiPrettyPrint + (\ s a -> s{_giiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +giiUserIp :: Lens' GroupItemsInsert' (Maybe Text) +giiUserIp + = lens _giiUserIp (\ s a -> s{_giiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +giiOnBehalfOfContentOwner :: Lens' GroupItemsInsert' (Maybe Text) +giiOnBehalfOfContentOwner + = lens _giiOnBehalfOfContentOwner + (\ s a -> s{_giiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +giiKey :: Lens' GroupItemsInsert' (Maybe Text) +giiKey = lens _giiKey (\ s a -> s{_giiKey = a}) + +-- | OAuth 2.0 token for the current user. +giiOauthToken :: Lens' GroupItemsInsert' (Maybe Text) +giiOauthToken + = lens _giiOauthToken + (\ s a -> s{_giiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +giiFields :: Lens' GroupItemsInsert' (Maybe Text) +giiFields + = lens _giiFields (\ s a -> s{_giiFields = a}) + +-- | Data format for the response. +giiAlt :: Lens' GroupItemsInsert' Text +giiAlt = lens _giiAlt (\ s a -> s{_giiAlt = a}) + +instance GoogleRequest GroupItemsInsert' where + type Rs GroupItemsInsert' = GroupItem + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupItemsInsert{..} + = go _giiQuotaUser _giiPrettyPrint _giiUserIp + _giiOnBehalfOfContentOwner + _giiKey + _giiOauthToken + _giiFields + _giiAlt + where go + = clientWithRoute + (Proxy :: Proxy GroupItemsInsertAPI) + r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/List.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/List.hs new file mode 100644 index 000000000..235bb80c8 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/List.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.GroupItems.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of group items that match the API request +-- parameters. +-- +-- /See:/ for @YouTubeAnalyticsGroupItemsList@. +module YouTubeAnalytics.GroupItems.List + ( + -- * REST Resource + GroupItemsListAPI + + -- * Creating a Request + , groupItemsList + , GroupItemsList + + -- * Request Lenses + , gilQuotaUser + , gilPrettyPrint + , gilUserIp + , gilOnBehalfOfContentOwner + , gilKey + , gilGroupId + , gilOauthToken + , gilFields + , gilAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupItemsList@ which the +-- 'GroupItemsList' request conforms to. +type GroupItemsListAPI = + "groupItems" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "groupId" Text :> + Get '[JSON] GroupItemListResponse + +-- | Returns a collection of group items that match the API request +-- parameters. +-- +-- /See:/ 'groupItemsList' smart constructor. +data GroupItemsList = GroupItemsList + { _gilQuotaUser :: !(Maybe Text) + , _gilPrettyPrint :: !Bool + , _gilUserIp :: !(Maybe Text) + , _gilOnBehalfOfContentOwner :: !(Maybe Text) + , _gilKey :: !(Maybe Text) + , _gilGroupId :: !Text + , _gilOauthToken :: !(Maybe Text) + , _gilFields :: !(Maybe Text) + , _gilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupItemsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gilQuotaUser' +-- +-- * 'gilPrettyPrint' +-- +-- * 'gilUserIp' +-- +-- * 'gilOnBehalfOfContentOwner' +-- +-- * 'gilKey' +-- +-- * 'gilGroupId' +-- +-- * 'gilOauthToken' +-- +-- * 'gilFields' +-- +-- * 'gilAlt' +groupItemsList + :: Text -- ^ 'groupId' + -> GroupItemsList +groupItemsList pGilGroupId_ = + GroupItemsList + { _gilQuotaUser = Nothing + , _gilPrettyPrint = True + , _gilUserIp = Nothing + , _gilOnBehalfOfContentOwner = Nothing + , _gilKey = Nothing + , _gilGroupId = pGilGroupId_ + , _gilOauthToken = Nothing + , _gilFields = Nothing + , _gilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gilQuotaUser :: Lens' GroupItemsList' (Maybe Text) +gilQuotaUser + = lens _gilQuotaUser (\ s a -> s{_gilQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gilPrettyPrint :: Lens' GroupItemsList' Bool +gilPrettyPrint + = lens _gilPrettyPrint + (\ s a -> s{_gilPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gilUserIp :: Lens' GroupItemsList' (Maybe Text) +gilUserIp + = lens _gilUserIp (\ s a -> s{_gilUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +gilOnBehalfOfContentOwner :: Lens' GroupItemsList' (Maybe Text) +gilOnBehalfOfContentOwner + = lens _gilOnBehalfOfContentOwner + (\ s a -> s{_gilOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gilKey :: Lens' GroupItemsList' (Maybe Text) +gilKey = lens _gilKey (\ s a -> s{_gilKey = a}) + +-- | The id parameter specifies the unique ID of the group for which you want +-- to retrieve group items. +gilGroupId :: Lens' GroupItemsList' Text +gilGroupId + = lens _gilGroupId (\ s a -> s{_gilGroupId = a}) + +-- | OAuth 2.0 token for the current user. +gilOauthToken :: Lens' GroupItemsList' (Maybe Text) +gilOauthToken + = lens _gilOauthToken + (\ s a -> s{_gilOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gilFields :: Lens' GroupItemsList' (Maybe Text) +gilFields + = lens _gilFields (\ s a -> s{_gilFields = a}) + +-- | Data format for the response. +gilAlt :: Lens' GroupItemsList' Text +gilAlt = lens _gilAlt (\ s a -> s{_gilAlt = a}) + +instance GoogleRequest GroupItemsList' where + type Rs GroupItemsList' = GroupItemListResponse + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupItemsList{..} + = go _gilQuotaUser _gilPrettyPrint _gilUserIp + _gilOnBehalfOfContentOwner + _gilKey + (Just _gilGroupId) + _gilOauthToken + _gilFields + _gilAlt + where go + = clientWithRoute (Proxy :: Proxy GroupItemsListAPI) + r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Delete.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Delete.hs new file mode 100644 index 000000000..ccaeb4af5 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Delete.hs @@ -0,0 +1,175 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.Groups.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a group. +-- +-- /See:/ for @YouTubeAnalyticsGroupsDelete@. +module YouTubeAnalytics.Groups.Delete + ( + -- * REST Resource + GroupsDeleteAPI + + -- * Creating a Request + , groupsDelete + , GroupsDelete + + -- * Request Lenses + , gdQuotaUser + , gdPrettyPrint + , gdUserIp + , gdOnBehalfOfContentOwner + , gdKey + , gdId + , gdOauthToken + , gdFields + , gdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupsDelete@ which the +-- 'GroupsDelete' request conforms to. +type GroupsDeleteAPI = + "groups" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a group. +-- +-- /See:/ 'groupsDelete' smart constructor. +data GroupsDelete = GroupsDelete + { _gdQuotaUser :: !(Maybe Text) + , _gdPrettyPrint :: !Bool + , _gdUserIp :: !(Maybe Text) + , _gdOnBehalfOfContentOwner :: !(Maybe Text) + , _gdKey :: !(Maybe Text) + , _gdId :: !Text + , _gdOauthToken :: !(Maybe Text) + , _gdFields :: !(Maybe Text) + , _gdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gdQuotaUser' +-- +-- * 'gdPrettyPrint' +-- +-- * 'gdUserIp' +-- +-- * 'gdOnBehalfOfContentOwner' +-- +-- * 'gdKey' +-- +-- * 'gdId' +-- +-- * 'gdOauthToken' +-- +-- * 'gdFields' +-- +-- * 'gdAlt' +groupsDelete + :: Text -- ^ 'id' + -> GroupsDelete +groupsDelete pGdId_ = + GroupsDelete + { _gdQuotaUser = Nothing + , _gdPrettyPrint = True + , _gdUserIp = Nothing + , _gdOnBehalfOfContentOwner = Nothing + , _gdKey = Nothing + , _gdId = pGdId_ + , _gdOauthToken = Nothing + , _gdFields = Nothing + , _gdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gdQuotaUser :: Lens' GroupsDelete' (Maybe Text) +gdQuotaUser + = lens _gdQuotaUser (\ s a -> s{_gdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +gdPrettyPrint :: Lens' GroupsDelete' Bool +gdPrettyPrint + = lens _gdPrettyPrint + (\ s a -> s{_gdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gdUserIp :: Lens' GroupsDelete' (Maybe Text) +gdUserIp = lens _gdUserIp (\ s a -> s{_gdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +gdOnBehalfOfContentOwner :: Lens' GroupsDelete' (Maybe Text) +gdOnBehalfOfContentOwner + = lens _gdOnBehalfOfContentOwner + (\ s a -> s{_gdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gdKey :: Lens' GroupsDelete' (Maybe Text) +gdKey = lens _gdKey (\ s a -> s{_gdKey = a}) + +-- | The id parameter specifies the YouTube group ID for the group that is +-- being deleted. +gdId :: Lens' GroupsDelete' Text +gdId = lens _gdId (\ s a -> s{_gdId = a}) + +-- | OAuth 2.0 token for the current user. +gdOauthToken :: Lens' GroupsDelete' (Maybe Text) +gdOauthToken + = lens _gdOauthToken (\ s a -> s{_gdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gdFields :: Lens' GroupsDelete' (Maybe Text) +gdFields = lens _gdFields (\ s a -> s{_gdFields = a}) + +-- | Data format for the response. +gdAlt :: Lens' GroupsDelete' Text +gdAlt = lens _gdAlt (\ s a -> s{_gdAlt = a}) + +instance GoogleRequest GroupsDelete' where + type Rs GroupsDelete' = () + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupsDelete{..} + = go _gdQuotaUser _gdPrettyPrint _gdUserIp + _gdOnBehalfOfContentOwner + _gdKey + (Just _gdId) + _gdOauthToken + _gdFields + _gdAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsDeleteAPI) r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Insert.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Insert.hs new file mode 100644 index 000000000..6c822a1e4 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Insert.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.Groups.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a group. +-- +-- /See:/ for @YouTubeAnalyticsGroupsInsert@. +module YouTubeAnalytics.Groups.Insert + ( + -- * REST Resource + GroupsInsertAPI + + -- * Creating a Request + , groupsInsert + , GroupsInsert + + -- * Request Lenses + , giQuotaUser + , giPrettyPrint + , giUserIp + , giOnBehalfOfContentOwner + , giKey + , giOauthToken + , giFields + , giAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupsInsert@ which the +-- 'GroupsInsert' request conforms to. +type GroupsInsertAPI = + "groups" :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] Group + +-- | Creates a group. +-- +-- /See:/ 'groupsInsert' smart constructor. +data GroupsInsert = GroupsInsert + { _giQuotaUser :: !(Maybe Text) + , _giPrettyPrint :: !Bool + , _giUserIp :: !(Maybe Text) + , _giOnBehalfOfContentOwner :: !(Maybe Text) + , _giKey :: !(Maybe Text) + , _giOauthToken :: !(Maybe Text) + , _giFields :: !(Maybe Text) + , _giAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giQuotaUser' +-- +-- * 'giPrettyPrint' +-- +-- * 'giUserIp' +-- +-- * 'giOnBehalfOfContentOwner' +-- +-- * 'giKey' +-- +-- * 'giOauthToken' +-- +-- * 'giFields' +-- +-- * 'giAlt' +groupsInsert + :: GroupsInsert +groupsInsert = + GroupsInsert + { _giQuotaUser = Nothing + , _giPrettyPrint = True + , _giUserIp = Nothing + , _giOnBehalfOfContentOwner = Nothing + , _giKey = Nothing + , _giOauthToken = Nothing + , _giFields = Nothing + , _giAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +giQuotaUser :: Lens' GroupsInsert' (Maybe Text) +giQuotaUser + = lens _giQuotaUser (\ s a -> s{_giQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +giPrettyPrint :: Lens' GroupsInsert' Bool +giPrettyPrint + = lens _giPrettyPrint + (\ s a -> s{_giPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +giUserIp :: Lens' GroupsInsert' (Maybe Text) +giUserIp = lens _giUserIp (\ s a -> s{_giUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +giOnBehalfOfContentOwner :: Lens' GroupsInsert' (Maybe Text) +giOnBehalfOfContentOwner + = lens _giOnBehalfOfContentOwner + (\ s a -> s{_giOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +giKey :: Lens' GroupsInsert' (Maybe Text) +giKey = lens _giKey (\ s a -> s{_giKey = a}) + +-- | OAuth 2.0 token for the current user. +giOauthToken :: Lens' GroupsInsert' (Maybe Text) +giOauthToken + = lens _giOauthToken (\ s a -> s{_giOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +giFields :: Lens' GroupsInsert' (Maybe Text) +giFields = lens _giFields (\ s a -> s{_giFields = a}) + +-- | Data format for the response. +giAlt :: Lens' GroupsInsert' Text +giAlt = lens _giAlt (\ s a -> s{_giAlt = a}) + +instance GoogleRequest GroupsInsert' where + type Rs GroupsInsert' = Group + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupsInsert{..} + = go _giQuotaUser _giPrettyPrint _giUserIp + _giOnBehalfOfContentOwner + _giKey + _giOauthToken + _giFields + _giAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsInsertAPI) r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/List.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/List.hs new file mode 100644 index 000000000..d5e009266 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/List.hs @@ -0,0 +1,189 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.Groups.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of groups that match the API request parameters. +-- For example, you can retrieve all groups that the authenticated user +-- owns, or you can retrieve one or more groups by their unique IDs. +-- +-- /See:/ for @YouTubeAnalyticsGroupsList@. +module YouTubeAnalytics.Groups.List + ( + -- * REST Resource + GroupsListAPI + + -- * Creating a Request + , groupsList + , GroupsList + + -- * Request Lenses + , glQuotaUser + , glPrettyPrint + , glMine + , glUserIp + , glOnBehalfOfContentOwner + , glKey + , glId + , glOauthToken + , glFields + , glAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupsList@ which the +-- 'GroupsList' request conforms to. +type GroupsListAPI = + "groups" :> + QueryParam "mine" Bool :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Get '[JSON] GroupListResponse + +-- | Returns a collection of groups that match the API request parameters. +-- For example, you can retrieve all groups that the authenticated user +-- owns, or you can retrieve one or more groups by their unique IDs. +-- +-- /See:/ 'groupsList' smart constructor. +data GroupsList = GroupsList + { _glQuotaUser :: !(Maybe Text) + , _glPrettyPrint :: !Bool + , _glMine :: !(Maybe Bool) + , _glUserIp :: !(Maybe Text) + , _glOnBehalfOfContentOwner :: !(Maybe Text) + , _glKey :: !(Maybe Text) + , _glId :: !(Maybe Text) + , _glOauthToken :: !(Maybe Text) + , _glFields :: !(Maybe Text) + , _glAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glQuotaUser' +-- +-- * 'glPrettyPrint' +-- +-- * 'glMine' +-- +-- * 'glUserIp' +-- +-- * 'glOnBehalfOfContentOwner' +-- +-- * 'glKey' +-- +-- * 'glId' +-- +-- * 'glOauthToken' +-- +-- * 'glFields' +-- +-- * 'glAlt' +groupsList + :: GroupsList +groupsList = + GroupsList + { _glQuotaUser = Nothing + , _glPrettyPrint = True + , _glMine = Nothing + , _glUserIp = Nothing + , _glOnBehalfOfContentOwner = Nothing + , _glKey = Nothing + , _glId = Nothing + , _glOauthToken = Nothing + , _glFields = Nothing + , _glAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +glQuotaUser :: Lens' GroupsList' (Maybe Text) +glQuotaUser + = lens _glQuotaUser (\ s a -> s{_glQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +glPrettyPrint :: Lens' GroupsList' Bool +glPrettyPrint + = lens _glPrettyPrint + (\ s a -> s{_glPrettyPrint = a}) + +-- | Set this parameter\'s value to true to instruct the API to only return +-- groups owned by the authenticated user. +glMine :: Lens' GroupsList' (Maybe Bool) +glMine = lens _glMine (\ s a -> s{_glMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +glUserIp :: Lens' GroupsList' (Maybe Text) +glUserIp = lens _glUserIp (\ s a -> s{_glUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +glOnBehalfOfContentOwner :: Lens' GroupsList' (Maybe Text) +glOnBehalfOfContentOwner + = lens _glOnBehalfOfContentOwner + (\ s a -> s{_glOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +glKey :: Lens' GroupsList' (Maybe Text) +glKey = lens _glKey (\ s a -> s{_glKey = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube group +-- ID(s) for the resource(s) that are being retrieved. In a group resource, +-- the id property specifies the group\'s YouTube group ID. +glId :: Lens' GroupsList' (Maybe Text) +glId = lens _glId (\ s a -> s{_glId = a}) + +-- | OAuth 2.0 token for the current user. +glOauthToken :: Lens' GroupsList' (Maybe Text) +glOauthToken + = lens _glOauthToken (\ s a -> s{_glOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +glFields :: Lens' GroupsList' (Maybe Text) +glFields = lens _glFields (\ s a -> s{_glFields = a}) + +-- | Data format for the response. +glAlt :: Lens' GroupsList' Text +glAlt = lens _glAlt (\ s a -> s{_glAlt = a}) + +instance GoogleRequest GroupsList' where + type Rs GroupsList' = GroupListResponse + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupsList{..} + = go _glQuotaUser _glPrettyPrint _glMine _glUserIp + _glOnBehalfOfContentOwner + _glKey + _glId + _glOauthToken + _glFields + _glAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsListAPI) r u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Update.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Update.hs new file mode 100644 index 000000000..01eeb0534 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Groups/Update.hs @@ -0,0 +1,163 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.Groups.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies a group. For example, you could change a group\'s title. +-- +-- /See:/ for @YouTubeAnalyticsGroupsUpdate@. +module YouTubeAnalytics.Groups.Update + ( + -- * REST Resource + GroupsUpdateAPI + + -- * Creating a Request + , groupsUpdate + , GroupsUpdate + + -- * Request Lenses + , guQuotaUser + , guPrettyPrint + , guUserIp + , guOnBehalfOfContentOwner + , guKey + , guOauthToken + , guFields + , guAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsGroupsUpdate@ which the +-- 'GroupsUpdate' request conforms to. +type GroupsUpdateAPI = + "groups" :> + QueryParam "onBehalfOfContentOwner" Text :> + Put '[JSON] Group + +-- | Modifies a group. For example, you could change a group\'s title. +-- +-- /See:/ 'groupsUpdate' smart constructor. +data GroupsUpdate = GroupsUpdate + { _guQuotaUser :: !(Maybe Text) + , _guPrettyPrint :: !Bool + , _guUserIp :: !(Maybe Text) + , _guOnBehalfOfContentOwner :: !(Maybe Text) + , _guKey :: !(Maybe Text) + , _guOauthToken :: !(Maybe Text) + , _guFields :: !(Maybe Text) + , _guAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'guQuotaUser' +-- +-- * 'guPrettyPrint' +-- +-- * 'guUserIp' +-- +-- * 'guOnBehalfOfContentOwner' +-- +-- * 'guKey' +-- +-- * 'guOauthToken' +-- +-- * 'guFields' +-- +-- * 'guAlt' +groupsUpdate + :: GroupsUpdate +groupsUpdate = + GroupsUpdate + { _guQuotaUser = Nothing + , _guPrettyPrint = True + , _guUserIp = Nothing + , _guOnBehalfOfContentOwner = Nothing + , _guKey = Nothing + , _guOauthToken = Nothing + , _guFields = Nothing + , _guAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +guQuotaUser :: Lens' GroupsUpdate' (Maybe Text) +guQuotaUser + = lens _guQuotaUser (\ s a -> s{_guQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +guPrettyPrint :: Lens' GroupsUpdate' Bool +guPrettyPrint + = lens _guPrettyPrint + (\ s a -> s{_guPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +guUserIp :: Lens' GroupsUpdate' (Maybe Text) +guUserIp = lens _guUserIp (\ s a -> s{_guUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +guOnBehalfOfContentOwner :: Lens' GroupsUpdate' (Maybe Text) +guOnBehalfOfContentOwner + = lens _guOnBehalfOfContentOwner + (\ s a -> s{_guOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +guKey :: Lens' GroupsUpdate' (Maybe Text) +guKey = lens _guKey (\ s a -> s{_guKey = a}) + +-- | OAuth 2.0 token for the current user. +guOauthToken :: Lens' GroupsUpdate' (Maybe Text) +guOauthToken + = lens _guOauthToken (\ s a -> s{_guOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +guFields :: Lens' GroupsUpdate' (Maybe Text) +guFields = lens _guFields (\ s a -> s{_guFields = a}) + +-- | Data format for the response. +guAlt :: Lens' GroupsUpdate' Text +guAlt = lens _guAlt (\ s a -> s{_guAlt = a}) + +instance GoogleRequest GroupsUpdate' where + type Rs GroupsUpdate' = Group + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u GroupsUpdate{..} + = go _guQuotaUser _guPrettyPrint _guUserIp + _guOnBehalfOfContentOwner + _guKey + _guOauthToken + _guFields + _guAlt + where go + = clientWithRoute (Proxy :: Proxy GroupsUpdateAPI) r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Reports/Query.hs b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Reports/Query.hs new file mode 100644 index 000000000..d2dd2071e --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Reports/Query.hs @@ -0,0 +1,291 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTubeAnalytics.Reports.Query +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieve your YouTube Analytics reports. +-- +-- /See:/ for @YouTubeAnalyticsReportsQuery@. +module YouTubeAnalytics.Reports.Query + ( + -- * REST Resource + ReportsQueryAPI + + -- * Creating a Request + , reportsQuery + , ReportsQuery + + -- * Request Lenses + , rqQuotaUser + , rqMetrics + , rqPrettyPrint + , rqUserIp + , rqFilters + , rqIds + , rqEndDate + , rqKey + , rqCurrency + , rqSort + , rqDimensions + , rqOauthToken + , rqStartIndex + , rqMaxResults + , rqStartDate + , rqFields + , rqAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types + +-- | A resource alias for @YouTubeAnalyticsReportsQuery@ which the +-- 'ReportsQuery' request conforms to. +type ReportsQueryAPI = + "reports" :> + QueryParam "metrics" Text :> + QueryParam "filters" Text :> + QueryParam "ids" Text :> + QueryParam "end-date" Text :> + QueryParam "currency" Text :> + QueryParam "sort" Text :> + QueryParam "dimensions" Text :> + QueryParam "start-index" Int32 :> + QueryParam "max-results" Int32 :> + QueryParam "start-date" Text :> + Get '[JSON] ResultTable + +-- | Retrieve your YouTube Analytics reports. +-- +-- /See:/ 'reportsQuery' smart constructor. +data ReportsQuery = ReportsQuery + { _rqQuotaUser :: !(Maybe Text) + , _rqMetrics :: !Text + , _rqPrettyPrint :: !Bool + , _rqUserIp :: !(Maybe Text) + , _rqFilters :: !(Maybe Text) + , _rqIds :: !Text + , _rqEndDate :: !Text + , _rqKey :: !(Maybe Text) + , _rqCurrency :: !(Maybe Text) + , _rqSort :: !(Maybe Text) + , _rqDimensions :: !(Maybe Text) + , _rqOauthToken :: !(Maybe Text) + , _rqStartIndex :: !(Maybe Int32) + , _rqMaxResults :: !(Maybe Int32) + , _rqStartDate :: !Text + , _rqFields :: !(Maybe Text) + , _rqAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ReportsQuery'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rqQuotaUser' +-- +-- * 'rqMetrics' +-- +-- * 'rqPrettyPrint' +-- +-- * 'rqUserIp' +-- +-- * 'rqFilters' +-- +-- * 'rqIds' +-- +-- * 'rqEndDate' +-- +-- * 'rqKey' +-- +-- * 'rqCurrency' +-- +-- * 'rqSort' +-- +-- * 'rqDimensions' +-- +-- * 'rqOauthToken' +-- +-- * 'rqStartIndex' +-- +-- * 'rqMaxResults' +-- +-- * 'rqStartDate' +-- +-- * 'rqFields' +-- +-- * 'rqAlt' +reportsQuery + :: Text -- ^ 'metrics' + -> Text -- ^ 'ids' + -> Text -- ^ 'end-date' + -> Text -- ^ 'start-date' + -> ReportsQuery +reportsQuery pRqMetrics_ pRqIds_ pRqEndDate_ pRqStartDate_ = + ReportsQuery + { _rqQuotaUser = Nothing + , _rqMetrics = pRqMetrics_ + , _rqPrettyPrint = True + , _rqUserIp = Nothing + , _rqFilters = Nothing + , _rqIds = pRqIds_ + , _rqEndDate = pRqEndDate_ + , _rqKey = Nothing + , _rqCurrency = Nothing + , _rqSort = Nothing + , _rqDimensions = Nothing + , _rqOauthToken = Nothing + , _rqStartIndex = Nothing + , _rqMaxResults = Nothing + , _rqStartDate = pRqStartDate_ + , _rqFields = Nothing + , _rqAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +rqQuotaUser :: Lens' ReportsQuery' (Maybe Text) +rqQuotaUser + = lens _rqQuotaUser (\ s a -> s{_rqQuotaUser = a}) + +-- | A comma-separated list of YouTube Analytics metrics, such as views or +-- likes,dislikes. See the Available Reports document for a list of the +-- reports that you can retrieve and the metrics available in each report, +-- and see the Metrics document for definitions of those metrics. +rqMetrics :: Lens' ReportsQuery' Text +rqMetrics + = lens _rqMetrics (\ s a -> s{_rqMetrics = a}) + +-- | Returns response with indentations and line breaks. +rqPrettyPrint :: Lens' ReportsQuery' Bool +rqPrettyPrint + = lens _rqPrettyPrint + (\ s a -> s{_rqPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +rqUserIp :: Lens' ReportsQuery' (Maybe Text) +rqUserIp = lens _rqUserIp (\ s a -> s{_rqUserIp = a}) + +-- | A list of filters that should be applied when retrieving YouTube +-- Analytics data. The Available Reports document identifies the dimensions +-- that can be used to filter each report, and the Dimensions document +-- defines those dimensions. If a request uses multiple filters, join them +-- together with a semicolon (;), and the returned result table will +-- satisfy both filters. For example, a filters parameter value of +-- video==dMH0bHeiRNg;country==IT restricts the result set to include data +-- for the given video in Italy. +rqFilters :: Lens' ReportsQuery' (Maybe Text) +rqFilters + = lens _rqFilters (\ s a -> s{_rqFilters = a}) + +-- | Identifies the YouTube channel or content owner for which you are +-- retrieving YouTube Analytics data. - To request data for a YouTube user, +-- set the ids parameter value to channel==CHANNEL_ID, where CHANNEL_ID +-- specifies the unique YouTube channel ID. - To request data for a YouTube +-- CMS content owner, set the ids parameter value to +-- contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of the +-- content owner. +rqIds :: Lens' ReportsQuery' Text +rqIds = lens _rqIds (\ s a -> s{_rqIds = a}) + +-- | The end date for fetching YouTube Analytics data. The value should be in +-- YYYY-MM-DD format. +rqEndDate :: Lens' ReportsQuery' Text +rqEndDate + = lens _rqEndDate (\ s a -> s{_rqEndDate = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +rqKey :: Lens' ReportsQuery' (Maybe Text) +rqKey = lens _rqKey (\ s a -> s{_rqKey = a}) + +-- | The currency to which financial metrics should be converted. The default +-- is US Dollar (USD). If the result contains no financial metrics, this +-- flag will be ignored. Responds with an error if the specified currency +-- is not recognized. +rqCurrency :: Lens' ReportsQuery' (Maybe Text) +rqCurrency + = lens _rqCurrency (\ s a -> s{_rqCurrency = a}) + +-- | A comma-separated list of dimensions or metrics that determine the sort +-- order for YouTube Analytics data. By default the sort order is +-- ascending. The \'-\' prefix causes descending sort order. +rqSort :: Lens' ReportsQuery' (Maybe Text) +rqSort = lens _rqSort (\ s a -> s{_rqSort = a}) + +-- | A comma-separated list of YouTube Analytics dimensions, such as views or +-- ageGroup,gender. See the Available Reports document for a list of the +-- reports that you can retrieve and the dimensions used for those reports. +-- Also see the Dimensions document for definitions of those dimensions. +rqDimensions :: Lens' ReportsQuery' (Maybe Text) +rqDimensions + = lens _rqDimensions (\ s a -> s{_rqDimensions = a}) + +-- | OAuth 2.0 token for the current user. +rqOauthToken :: Lens' ReportsQuery' (Maybe Text) +rqOauthToken + = lens _rqOauthToken (\ s a -> s{_rqOauthToken = a}) + +-- | An index of the first entity to retrieve. Use this parameter as a +-- pagination mechanism along with the max-results parameter (one-based, +-- inclusive). +rqStartIndex :: Lens' ReportsQuery' (Maybe Int32) +rqStartIndex + = lens _rqStartIndex (\ s a -> s{_rqStartIndex = a}) + +-- | The maximum number of rows to include in the response. +rqMaxResults :: Lens' ReportsQuery' (Maybe Int32) +rqMaxResults + = lens _rqMaxResults (\ s a -> s{_rqMaxResults = a}) + +-- | The start date for fetching YouTube Analytics data. The value should be +-- in YYYY-MM-DD format. +rqStartDate :: Lens' ReportsQuery' Text +rqStartDate + = lens _rqStartDate (\ s a -> s{_rqStartDate = a}) + +-- | Selector specifying which fields to include in a partial response. +rqFields :: Lens' ReportsQuery' (Maybe Text) +rqFields = lens _rqFields (\ s a -> s{_rqFields = a}) + +-- | Data format for the response. +rqAlt :: Lens' ReportsQuery' Text +rqAlt = lens _rqAlt (\ s a -> s{_rqAlt = a}) + +instance GoogleRequest ReportsQuery' where + type Rs ReportsQuery' = ResultTable + request = requestWithRoute defReq youTubeAnalyticsURL + requestWithRoute r u ReportsQuery{..} + = go _rqQuotaUser (Just _rqMetrics) _rqPrettyPrint + _rqUserIp + _rqFilters + (Just _rqIds) + (Just _rqEndDate) + _rqKey + _rqCurrency + _rqSort + _rqDimensions + _rqOauthToken + _rqStartIndex + _rqMaxResults + (Just _rqStartDate) + _rqFields + _rqAlt + where go + = clientWithRoute (Proxy :: Proxy ReportsQueryAPI) r + u diff --git a/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics.hs b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics.hs new file mode 100644 index 000000000..a47d0d0f7 --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.YouTubeAnalytics +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Retrieve your YouTube Analytics reports. +-- +-- /See:/ +module Network.Google.YouTubeAnalytics + ( + -- * API + YouTubeAnalyticsAPI + , youTubeAnalyticsAPI + , youTubeAnalyticsURL + + -- * Service Methods + + -- * REST Resources + + -- ** YouTubeAnalyticsBatchReportDefinitionsList + , module YouTubeAnalytics.BatchReportDefinitions.List + + -- ** YouTubeAnalyticsBatchReportsList + , module YouTubeAnalytics.BatchReports.List + + -- ** YouTubeAnalyticsGroupItemsDelete + , module YouTubeAnalytics.GroupItems.Delete + + -- ** YouTubeAnalyticsGroupItemsInsert + , module YouTubeAnalytics.GroupItems.Insert + + -- ** YouTubeAnalyticsGroupItemsList + , module YouTubeAnalytics.GroupItems.List + + -- ** YouTubeAnalyticsGroupsDelete + , module YouTubeAnalytics.Groups.Delete + + -- ** YouTubeAnalyticsGroupsInsert + , module YouTubeAnalytics.Groups.Insert + + -- ** YouTubeAnalyticsGroupsList + , module YouTubeAnalytics.Groups.List + + -- ** YouTubeAnalyticsGroupsUpdate + , module YouTubeAnalytics.Groups.Update + + -- ** YouTubeAnalyticsReportsQuery + , module YouTubeAnalytics.Reports.Query + + -- * Types + + -- ** Group + , Group + , group' + , gEtag + , gSnippet + , gKind + , gContentDetails + , gId + + -- ** ResultTable + , ResultTable + , resultTable + , rtKind + , rtRows + , rtColumnHeaders + + -- ** BatchReportDefinition + , BatchReportDefinition + , batchReportDefinition + , brdStatus + , brdKind + , brdName + , brdId + , brdType + + -- ** BatchReport + , BatchReport + , batchReport + , brTimeUpdated + , brKind + , brReportId + , brTimeSpan + , brOutputs + , brId + + -- ** GroupItem + , GroupItem + , groupItem + , giEtag + , giKind + , giResource + , giGroupId + , giId + + -- ** BatchReportDefinitionList + , BatchReportDefinitionList + , batchReportDefinitionList + , brdlKind + , brdlItems + + -- ** BatchReportList + , BatchReportList + , batchReportList + , brlKind + , brlItems + + -- ** GroupItemListResponse + , GroupItemListResponse + , groupItemListResponse + , gilrEtag + , gilrKind + , gilrItems + + -- ** GroupListResponse + , GroupListResponse + , groupListResponse + , glrEtag + , glrKind + , glrItems + ) where + +import Network.Google.Prelude +import Network.Google.Resource.YouTubeAnalytics.BatchReportDefinitions.List +import Network.Google.Resource.YouTubeAnalytics.BatchReports.List +import Network.Google.Resource.YouTubeAnalytics.GroupItems.Delete +import Network.Google.Resource.YouTubeAnalytics.GroupItems.Insert +import Network.Google.Resource.YouTubeAnalytics.GroupItems.List +import Network.Google.Resource.YouTubeAnalytics.Groups.Delete +import Network.Google.Resource.YouTubeAnalytics.Groups.Insert +import Network.Google.Resource.YouTubeAnalytics.Groups.List +import Network.Google.Resource.YouTubeAnalytics.Groups.Update +import Network.Google.Resource.YouTubeAnalytics.Reports.Query +import Network.Google.YouTubeAnalytics.Types + +{- $resources +TODO +-} + +type YouTubeAnalyticsAPI = + Groups :<|> Reports :<|> GroupItems :<|> BatchReports + :<|> BatchReportDefinitions + +youTubeAnalyticsAPI :: Proxy YouTubeAnalyticsAPI +youTubeAnalyticsAPI = Proxy diff --git a/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types.hs b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types.hs new file mode 100644 index 000000000..e7bd8fc6d --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types.hs @@ -0,0 +1,100 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTubeAnalytics.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTubeAnalytics.Types + ( + -- * Service URL + youTubeAnalyticsURL + + -- * Group + , Group + , group' + , gEtag + , gSnippet + , gKind + , gContentDetails + , gId + + -- * ResultTable + , ResultTable + , resultTable + , rtKind + , rtRows + , rtColumnHeaders + + -- * BatchReportDefinition + , BatchReportDefinition + , batchReportDefinition + , brdStatus + , brdKind + , brdName + , brdId + , brdType + + -- * BatchReport + , BatchReport + , batchReport + , brTimeUpdated + , brKind + , brReportId + , brTimeSpan + , brOutputs + , brId + + -- * GroupItem + , GroupItem + , groupItem + , giEtag + , giKind + , giResource + , giGroupId + , giId + + -- * BatchReportDefinitionList + , BatchReportDefinitionList + , batchReportDefinitionList + , brdlKind + , brdlItems + + -- * BatchReportList + , BatchReportList + , batchReportList + , brlKind + , brlItems + + -- * GroupItemListResponse + , GroupItemListResponse + , groupItemListResponse + , gilrEtag + , gilrKind + , gilrItems + + -- * GroupListResponse + , GroupListResponse + , groupListResponse + , glrEtag + , glrKind + , glrItems + ) where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types.Product +import Network.Google.YouTubeAnalytics.Types.Sum + +-- | URL referring to version 'v1beta1' of the YouTube Analytics API. +youTubeAnalyticsURL :: BaseURL +youTubeAnalyticsURL + = BaseUrl Https + "https://www.googleapis.com/youtube/analytics/v1beta1/" + 443 diff --git a/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Product.hs b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Product.hs new file mode 100644 index 000000000..2f5bd5dee --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Product.hs @@ -0,0 +1,633 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTubeAnalytics.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTubeAnalytics.Types.Product where + +import Network.Google.Prelude +import Network.Google.YouTubeAnalytics.Types.Sum + +-- +-- /See:/ 'group'' smart constructor. +data Group = Group + { _gEtag :: !(Maybe Text) + , _gSnippet :: !(Maybe GroupSNIppet) + , _gKind :: !Text + , _gContentDetails :: !(Maybe GroupContentDetails) + , _gId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Group' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gEtag' +-- +-- * 'gSnippet' +-- +-- * 'gKind' +-- +-- * 'gContentDetails' +-- +-- * 'gId' +group' + :: Group +group' = + Group + { _gEtag = Nothing + , _gSnippet = Nothing + , _gKind = "youtube#group" + , _gContentDetails = Nothing + , _gId = Nothing + } + +gEtag :: Lens' Group (Maybe Text) +gEtag = lens _gEtag (\ s a -> s{_gEtag = a}) + +gSnippet :: Lens' Group (Maybe GroupSNIppet) +gSnippet = lens _gSnippet (\ s a -> s{_gSnippet = a}) + +gKind :: Lens' Group Text +gKind = lens _gKind (\ s a -> s{_gKind = a}) + +gContentDetails :: Lens' Group (Maybe GroupContentDetails) +gContentDetails + = lens _gContentDetails + (\ s a -> s{_gContentDetails = a}) + +gId :: Lens' Group (Maybe Text) +gId = lens _gId (\ s a -> s{_gId = a}) + +instance FromJSON Group where + parseJSON + = withObject "Group" + (\ o -> + Group <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#group") + <*> (o .:? "contentDetails") + <*> (o .:? "id")) + +instance ToJSON Group where + toJSON Group{..} + = object + (catMaybes + [("etag" .=) <$> _gEtag, + ("snippet" .=) <$> _gSnippet, + Just ("kind" .= _gKind), + ("contentDetails" .=) <$> _gContentDetails, + ("id" .=) <$> _gId]) + +-- | Contains a single result table. The table is returned as an array of +-- rows that contain the values for the cells of the table. Depending on +-- the metric or dimension, the cell can contain a string (video ID, +-- country code) or a number (number of views or number of likes). +-- +-- /See:/ 'resultTable' smart constructor. +data ResultTable = ResultTable + { _rtKind :: !Text + , _rtRows :: !(Maybe [[JSON]]) + , _rtColumnHeaders :: !(Maybe [ResultTableColumnHeadersItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResultTable' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'rtKind' +-- +-- * 'rtRows' +-- +-- * 'rtColumnHeaders' +resultTable + :: ResultTable +resultTable = + ResultTable + { _rtKind = "youtubeAnalytics#resultTable" + , _rtRows = Nothing + , _rtColumnHeaders = Nothing + } + +-- | This value specifies the type of data included in the API response. For +-- the query method, the kind property value will be +-- youtubeAnalytics#resultTable. +rtKind :: Lens' ResultTable Text +rtKind = lens _rtKind (\ s a -> s{_rtKind = a}) + +-- | The list contains all rows of the result table. Each item in the list is +-- an array that contains comma-delimited data corresponding to a single +-- row of data. The order of the comma-delimited data fields will match the +-- order of the columns listed in the columnHeaders field. If no data is +-- available for the given query, the rows element will be omitted from the +-- response. The response for a query with the day dimension will not +-- contain rows for the most recent days. +rtRows :: Lens' ResultTable [[JSON]] +rtRows + = lens _rtRows (\ s a -> s{_rtRows = a}) . _Default . + _Coerce + +-- | This value specifies information about the data returned in the rows +-- fields. Each item in the columnHeaders list identifies a field returned +-- in the rows value, which contains a list of comma-delimited data. The +-- columnHeaders list will begin with the dimensions specified in the API +-- request, which will be followed by the metrics specified in the API +-- request. The order of both dimensions and metrics will match the +-- ordering in the API request. For example, if the API request contains +-- the parameters dimensions=ageGroup,gender&metrics=viewerPercentage, the +-- API response will return columns in this order: +-- ageGroup,gender,viewerPercentage. +rtColumnHeaders :: Lens' ResultTable [ResultTableColumnHeadersItem] +rtColumnHeaders + = lens _rtColumnHeaders + (\ s a -> s{_rtColumnHeaders = a}) + . _Default + . _Coerce + +instance FromJSON ResultTable where + parseJSON + = withObject "ResultTable" + (\ o -> + ResultTable <$> + (o .:? "kind" .!= "youtubeAnalytics#resultTable") <*> + (o .:? "rows" .!= mempty) + <*> (o .:? "columnHeaders" .!= mempty)) + +instance ToJSON ResultTable where + toJSON ResultTable{..} + = object + (catMaybes + [Just ("kind" .= _rtKind), ("rows" .=) <$> _rtRows, + ("columnHeaders" .=) <$> _rtColumnHeaders]) + +-- | Contains single batchReportDefinition resource. +-- +-- /See:/ 'batchReportDefinition' smart constructor. +data BatchReportDefinition = BatchReportDefinition + { _brdStatus :: !(Maybe Text) + , _brdKind :: !Text + , _brdName :: !(Maybe Text) + , _brdId :: !(Maybe Text) + , _brdType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReportDefinition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brdStatus' +-- +-- * 'brdKind' +-- +-- * 'brdName' +-- +-- * 'brdId' +-- +-- * 'brdType' +batchReportDefinition + :: BatchReportDefinition +batchReportDefinition = + BatchReportDefinition + { _brdStatus = Nothing + , _brdKind = "youtubeAnalytics#batchReportDefinition" + , _brdName = Nothing + , _brdId = Nothing + , _brdType = Nothing + } + +-- | Status of the report definition. +brdStatus :: Lens' BatchReportDefinition (Maybe Text) +brdStatus + = lens _brdStatus (\ s a -> s{_brdStatus = a}) + +-- | This value specifies the type of data of this item. For batch report +-- definition the kind property value is +-- youtubeAnalytics#batchReportDefinition. +brdKind :: Lens' BatchReportDefinition Text +brdKind = lens _brdKind (\ s a -> s{_brdKind = a}) + +-- | Name of the report definition. +brdName :: Lens' BatchReportDefinition (Maybe Text) +brdName = lens _brdName (\ s a -> s{_brdName = a}) + +-- | The ID that YouTube assigns and uses to uniquely identify the report +-- definition. +brdId :: Lens' BatchReportDefinition (Maybe Text) +brdId = lens _brdId (\ s a -> s{_brdId = a}) + +-- | Type of the report definition. +brdType :: Lens' BatchReportDefinition (Maybe Text) +brdType = lens _brdType (\ s a -> s{_brdType = a}) + +instance FromJSON BatchReportDefinition where + parseJSON + = withObject "BatchReportDefinition" + (\ o -> + BatchReportDefinition <$> + (o .:? "status") <*> + (o .:? "kind" .!= + "youtubeAnalytics#batchReportDefinition") + <*> (o .:? "name") + <*> (o .:? "id") + <*> (o .:? "type")) + +instance ToJSON BatchReportDefinition where + toJSON BatchReportDefinition{..} + = object + (catMaybes + [("status" .=) <$> _brdStatus, + Just ("kind" .= _brdKind), ("name" .=) <$> _brdName, + ("id" .=) <$> _brdId, ("type" .=) <$> _brdType]) + +-- | Contains single batchReport resource. +-- +-- /See:/ 'batchReport' smart constructor. +data BatchReport = BatchReport + { _brTimeUpdated :: !(Maybe UTCTime) + , _brKind :: !Text + , _brReportId :: !(Maybe Text) + , _brTimeSpan :: !(Maybe BatchReportTimeSpan) + , _brOutputs :: !(Maybe [BatchReportOutputsItem]) + , _brId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brTimeUpdated' +-- +-- * 'brKind' +-- +-- * 'brReportId' +-- +-- * 'brTimeSpan' +-- +-- * 'brOutputs' +-- +-- * 'brId' +batchReport + :: BatchReport +batchReport = + BatchReport + { _brTimeUpdated = Nothing + , _brKind = "youtubeAnalytics#batchReport" + , _brReportId = Nothing + , _brTimeSpan = Nothing + , _brOutputs = Nothing + , _brId = Nothing + } + +-- | The time when the report was updated. +brTimeUpdated :: Lens' BatchReport (Maybe UTCTime) +brTimeUpdated + = lens _brTimeUpdated + (\ s a -> s{_brTimeUpdated = a}) + +-- | This value specifies the type of data of this item. For batch report the +-- kind property value is youtubeAnalytics#batchReport. +brKind :: Lens' BatchReport Text +brKind = lens _brKind (\ s a -> s{_brKind = a}) + +-- | The ID of the the report definition. +brReportId :: Lens' BatchReport (Maybe Text) +brReportId + = lens _brReportId (\ s a -> s{_brReportId = a}) + +-- | Period included in the report. For reports containing all entities +-- endTime is not set. Both startTime and endTime are inclusive. +brTimeSpan :: Lens' BatchReport (Maybe BatchReportTimeSpan) +brTimeSpan + = lens _brTimeSpan (\ s a -> s{_brTimeSpan = a}) + +-- | Report outputs. +brOutputs :: Lens' BatchReport [BatchReportOutputsItem] +brOutputs + = lens _brOutputs (\ s a -> s{_brOutputs = a}) . + _Default + . _Coerce + +-- | The ID that YouTube assigns and uses to uniquely identify the report. +brId :: Lens' BatchReport (Maybe Text) +brId = lens _brId (\ s a -> s{_brId = a}) + +instance FromJSON BatchReport where + parseJSON + = withObject "BatchReport" + (\ o -> + BatchReport <$> + (o .:? "timeUpdated") <*> + (o .:? "kind" .!= "youtubeAnalytics#batchReport") + <*> (o .:? "reportId") + <*> (o .:? "timeSpan") + <*> (o .:? "outputs" .!= mempty) + <*> (o .:? "id")) + +instance ToJSON BatchReport where + toJSON BatchReport{..} + = object + (catMaybes + [("timeUpdated" .=) <$> _brTimeUpdated, + Just ("kind" .= _brKind), + ("reportId" .=) <$> _brReportId, + ("timeSpan" .=) <$> _brTimeSpan, + ("outputs" .=) <$> _brOutputs, ("id" .=) <$> _brId]) + +-- +-- /See:/ 'groupItem' smart constructor. +data GroupItem = GroupItem + { _giEtag :: !(Maybe Text) + , _giKind :: !Text + , _giResource :: !(Maybe GroupItemResource) + , _giGroupId :: !(Maybe Text) + , _giId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'giEtag' +-- +-- * 'giKind' +-- +-- * 'giResource' +-- +-- * 'giGroupId' +-- +-- * 'giId' +groupItem + :: GroupItem +groupItem = + GroupItem + { _giEtag = Nothing + , _giKind = "youtube#groupItem" + , _giResource = Nothing + , _giGroupId = Nothing + , _giId = Nothing + } + +giEtag :: Lens' GroupItem (Maybe Text) +giEtag = lens _giEtag (\ s a -> s{_giEtag = a}) + +giKind :: Lens' GroupItem Text +giKind = lens _giKind (\ s a -> s{_giKind = a}) + +giResource :: Lens' GroupItem (Maybe GroupItemResource) +giResource + = lens _giResource (\ s a -> s{_giResource = a}) + +giGroupId :: Lens' GroupItem (Maybe Text) +giGroupId + = lens _giGroupId (\ s a -> s{_giGroupId = a}) + +giId :: Lens' GroupItem (Maybe Text) +giId = lens _giId (\ s a -> s{_giId = a}) + +instance FromJSON GroupItem where + parseJSON + = withObject "GroupItem" + (\ o -> + GroupItem <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#groupItem") + <*> (o .:? "resource") + <*> (o .:? "groupId") + <*> (o .:? "id")) + +instance ToJSON GroupItem where + toJSON GroupItem{..} + = object + (catMaybes + [("etag" .=) <$> _giEtag, Just ("kind" .= _giKind), + ("resource" .=) <$> _giResource, + ("groupId" .=) <$> _giGroupId, ("id" .=) <$> _giId]) + +-- | A paginated list of batchReportDefinition resources returned in response +-- to a youtubeAnalytics.batchReportDefinitions.list request. +-- +-- /See:/ 'batchReportDefinitionList' smart constructor. +data BatchReportDefinitionList = BatchReportDefinitionList + { _brdlKind :: !Text + , _brdlItems :: !(Maybe [Maybe BatchReportDefinition]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReportDefinitionList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brdlKind' +-- +-- * 'brdlItems' +batchReportDefinitionList + :: BatchReportDefinitionList +batchReportDefinitionList = + BatchReportDefinitionList + { _brdlKind = "youtubeAnalytics#batchReportDefinitionList" + , _brdlItems = Nothing + } + +-- | This value specifies the type of data included in the API response. For +-- the list method, the kind property value is +-- youtubeAnalytics#batchReportDefinitionList. +brdlKind :: Lens' BatchReportDefinitionList Text +brdlKind = lens _brdlKind (\ s a -> s{_brdlKind = a}) + +-- | A list of batchReportDefinition resources that match the request +-- criteria. +brdlItems :: Lens' BatchReportDefinitionList [Maybe BatchReportDefinition] +brdlItems + = lens _brdlItems (\ s a -> s{_brdlItems = a}) . + _Default + . _Coerce + +instance FromJSON BatchReportDefinitionList where + parseJSON + = withObject "BatchReportDefinitionList" + (\ o -> + BatchReportDefinitionList <$> + (o .:? "kind" .!= + "youtubeAnalytics#batchReportDefinitionList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON BatchReportDefinitionList where + toJSON BatchReportDefinitionList{..} + = object + (catMaybes + [Just ("kind" .= _brdlKind), + ("items" .=) <$> _brdlItems]) + +-- | A paginated list of batchReport resources returned in response to a +-- youtubeAnalytics.batchReport.list request. +-- +-- /See:/ 'batchReportList' smart constructor. +data BatchReportList = BatchReportList + { _brlKind :: !Text + , _brlItems :: !(Maybe [Maybe BatchReport]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'BatchReportList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'brlKind' +-- +-- * 'brlItems' +batchReportList + :: BatchReportList +batchReportList = + BatchReportList + { _brlKind = "youtubeAnalytics#batchReportList" + , _brlItems = Nothing + } + +-- | This value specifies the type of data included in the API response. For +-- the list method, the kind property value is +-- youtubeAnalytics#batchReportList. +brlKind :: Lens' BatchReportList Text +brlKind = lens _brlKind (\ s a -> s{_brlKind = a}) + +-- | A list of batchReport resources that match the request criteria. +brlItems :: Lens' BatchReportList [Maybe BatchReport] +brlItems + = lens _brlItems (\ s a -> s{_brlItems = a}) . + _Default + . _Coerce + +instance FromJSON BatchReportList where + parseJSON + = withObject "BatchReportList" + (\ o -> + BatchReportList <$> + (o .:? "kind" .!= "youtubeAnalytics#batchReportList") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON BatchReportList where + toJSON BatchReportList{..} + = object + (catMaybes + [Just ("kind" .= _brlKind), + ("items" .=) <$> _brlItems]) + +-- | A paginated list of grouList resources returned in response to a +-- youtubeAnalytics.groupApi.list request. +-- +-- /See:/ 'groupItemListResponse' smart constructor. +data GroupItemListResponse = GroupItemListResponse + { _gilrEtag :: !(Maybe Text) + , _gilrKind :: !Text + , _gilrItems :: !(Maybe [Maybe GroupItem]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupItemListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gilrEtag' +-- +-- * 'gilrKind' +-- +-- * 'gilrItems' +groupItemListResponse + :: GroupItemListResponse +groupItemListResponse = + GroupItemListResponse + { _gilrEtag = Nothing + , _gilrKind = "youtube#groupItemListResponse" + , _gilrItems = Nothing + } + +gilrEtag :: Lens' GroupItemListResponse (Maybe Text) +gilrEtag = lens _gilrEtag (\ s a -> s{_gilrEtag = a}) + +gilrKind :: Lens' GroupItemListResponse Text +gilrKind = lens _gilrKind (\ s a -> s{_gilrKind = a}) + +gilrItems :: Lens' GroupItemListResponse [Maybe GroupItem] +gilrItems + = lens _gilrItems (\ s a -> s{_gilrItems = a}) . + _Default + . _Coerce + +instance FromJSON GroupItemListResponse where + parseJSON + = withObject "GroupItemListResponse" + (\ o -> + GroupItemListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#groupItemListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON GroupItemListResponse where + toJSON GroupItemListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _gilrEtag, + Just ("kind" .= _gilrKind), + ("items" .=) <$> _gilrItems]) + +-- | A paginated list of grouList resources returned in response to a +-- youtubeAnalytics.groupApi.list request. +-- +-- /See:/ 'groupListResponse' smart constructor. +data GroupListResponse = GroupListResponse + { _glrEtag :: !(Maybe Text) + , _glrKind :: !Text + , _glrItems :: !(Maybe [Maybe Group]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GroupListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'glrEtag' +-- +-- * 'glrKind' +-- +-- * 'glrItems' +groupListResponse + :: GroupListResponse +groupListResponse = + GroupListResponse + { _glrEtag = Nothing + , _glrKind = "youtube#groupListResponse" + , _glrItems = Nothing + } + +glrEtag :: Lens' GroupListResponse (Maybe Text) +glrEtag = lens _glrEtag (\ s a -> s{_glrEtag = a}) + +glrKind :: Lens' GroupListResponse Text +glrKind = lens _glrKind (\ s a -> s{_glrKind = a}) + +glrItems :: Lens' GroupListResponse [Maybe Group] +glrItems + = lens _glrItems (\ s a -> s{_glrItems = a}) . + _Default + . _Coerce + +instance FromJSON GroupListResponse where + parseJSON + = withObject "GroupListResponse" + (\ o -> + GroupListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#groupListResponse") + <*> (o .:? "items" .!= mempty)) + +instance ToJSON GroupListResponse where + toJSON GroupListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _glrEtag, Just ("kind" .= _glrKind), + ("items" .=) <$> _glrItems]) diff --git a/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Sum.hs b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Sum.hs new file mode 100644 index 000000000..b59a7c94d --- /dev/null +++ b/gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTubeAnalytics.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTubeAnalytics.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-youtube-analytics/gogol-youtube-analytics.cabal b/gogol-youtube-analytics/gogol-youtube-analytics.cabal new file mode 100644 index 000000000..7d49787ec --- /dev/null +++ b/gogol-youtube-analytics/gogol-youtube-analytics.cabal @@ -0,0 +1,52 @@ +name: gogol-youtube-analytics +version: 0.0.1 +synopsis: YouTube Analytics API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Retrieve your YouTube Analytics reports. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.YouTubeAnalytics.BatchReportDefinitions.List + , Network.Google.Resource.YouTubeAnalytics.BatchReports.List + , Network.Google.Resource.YouTubeAnalytics.GroupItems.Delete + , Network.Google.Resource.YouTubeAnalytics.GroupItems.Insert + , Network.Google.Resource.YouTubeAnalytics.GroupItems.List + , Network.Google.Resource.YouTubeAnalytics.Groups.Delete + , Network.Google.Resource.YouTubeAnalytics.Groups.Insert + , Network.Google.Resource.YouTubeAnalytics.Groups.List + , Network.Google.Resource.YouTubeAnalytics.Groups.Update + , Network.Google.Resource.YouTubeAnalytics.Reports.Query + , Network.Google.YouTubeAnalytics + , Network.Google.YouTubeAnalytics.Types + + other-modules: + Network.Google.YouTubeAnalytics.Types.Product + , Network.Google.YouTubeAnalytics.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-youtube-analytics/src/.gitkeep b/gogol-youtube-analytics/src/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/gogol-youtube/LICENSE b/gogol-youtube/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/gogol-youtube/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/gogol-youtube/Makefile b/gogol-youtube/Makefile new file mode 100644 index 000000000..e7ed4e2ce --- /dev/null +++ b/gogol-youtube/Makefile @@ -0,0 +1 @@ +include ../share/library.mk diff --git a/gogol-youtube/README.md b/gogol-youtube/README.md new file mode 100644 index 000000000..52ad7d54e --- /dev/null +++ b/gogol-youtube/README.md @@ -0,0 +1,28 @@ +# gogol-youtube + +* [Version](#version) +* [Description](#description) +* [Contribute](#contribute) +* [Licence](#licence) + + +## Version + +`0.0.1` + + +## Description + +A client library for the YouTube Data API. + + +## Contribute + +For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues). + +> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information. + + +## Licence + +`gogol-youtube` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/). diff --git a/gogol-youtube/Setup.hs b/gogol-youtube/Setup.hs new file mode 100644 index 000000000..44671092b --- /dev/null +++ b/gogol-youtube/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/Insert.hs new file mode 100644 index 000000000..708616e4c --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/Insert.hs @@ -0,0 +1,168 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Activities.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Posts a bulletin for a specific channel. (The user submitting the +-- request must be authorized to act on the channel\'s behalf.) Note: Even +-- though an activity resource can contain information about actions like a +-- user rating a video or marking a video as a favorite, you need to use +-- other API methods to generate those activity resources. For example, you +-- would use the API\'s videos.rate() method to rate a video and the +-- playlistItems.insert() method to mark a video as a favorite. +-- +-- /See:/ for @YouTubeActivitiesInsert@. +module YouTube.Activities.Insert + ( + -- * REST Resource + ActivitiesInsertAPI + + -- * Creating a Request + , activitiesInsert + , ActivitiesInsert + + -- * Request Lenses + , aiQuotaUser + , aiPart + , aiPrettyPrint + , aiUserIp + , aiKey + , aiOauthToken + , aiFields + , aiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeActivitiesInsert@ which the +-- 'ActivitiesInsert' request conforms to. +type ActivitiesInsertAPI = + "activities" :> + QueryParam "part" Text :> Post '[JSON] Activity + +-- | Posts a bulletin for a specific channel. (The user submitting the +-- request must be authorized to act on the channel\'s behalf.) Note: Even +-- though an activity resource can contain information about actions like a +-- user rating a video or marking a video as a favorite, you need to use +-- other API methods to generate those activity resources. For example, you +-- would use the API\'s videos.rate() method to rate a video and the +-- playlistItems.insert() method to mark a video as a favorite. +-- +-- /See:/ 'activitiesInsert' smart constructor. +data ActivitiesInsert = ActivitiesInsert + { _aiQuotaUser :: !(Maybe Text) + , _aiPart :: !Text + , _aiPrettyPrint :: !Bool + , _aiUserIp :: !(Maybe Text) + , _aiKey :: !(Maybe Text) + , _aiOauthToken :: !(Maybe Text) + , _aiFields :: !(Maybe Text) + , _aiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aiQuotaUser' +-- +-- * 'aiPart' +-- +-- * 'aiPrettyPrint' +-- +-- * 'aiUserIp' +-- +-- * 'aiKey' +-- +-- * 'aiOauthToken' +-- +-- * 'aiFields' +-- +-- * 'aiAlt' +activitiesInsert + :: Text -- ^ 'part' + -> ActivitiesInsert +activitiesInsert pAiPart_ = + ActivitiesInsert + { _aiQuotaUser = Nothing + , _aiPart = pAiPart_ + , _aiPrettyPrint = True + , _aiUserIp = Nothing + , _aiKey = Nothing + , _aiOauthToken = Nothing + , _aiFields = Nothing + , _aiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +aiQuotaUser :: Lens' ActivitiesInsert' (Maybe Text) +aiQuotaUser + = lens _aiQuotaUser (\ s a -> s{_aiQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. +aiPart :: Lens' ActivitiesInsert' Text +aiPart = lens _aiPart (\ s a -> s{_aiPart = a}) + +-- | Returns response with indentations and line breaks. +aiPrettyPrint :: Lens' ActivitiesInsert' Bool +aiPrettyPrint + = lens _aiPrettyPrint + (\ s a -> s{_aiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +aiUserIp :: Lens' ActivitiesInsert' (Maybe Text) +aiUserIp = lens _aiUserIp (\ s a -> s{_aiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +aiKey :: Lens' ActivitiesInsert' (Maybe Text) +aiKey = lens _aiKey (\ s a -> s{_aiKey = a}) + +-- | OAuth 2.0 token for the current user. +aiOauthToken :: Lens' ActivitiesInsert' (Maybe Text) +aiOauthToken + = lens _aiOauthToken (\ s a -> s{_aiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +aiFields :: Lens' ActivitiesInsert' (Maybe Text) +aiFields = lens _aiFields (\ s a -> s{_aiFields = a}) + +-- | Data format for the response. +aiAlt :: Lens' ActivitiesInsert' Text +aiAlt = lens _aiAlt (\ s a -> s{_aiAlt = a}) + +instance GoogleRequest ActivitiesInsert' where + type Rs ActivitiesInsert' = Activity + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ActivitiesInsert{..} + = go _aiQuotaUser (Just _aiPart) _aiPrettyPrint + _aiUserIp + _aiKey + _aiOauthToken + _aiFields + _aiAlt + where go + = clientWithRoute + (Proxy :: Proxy ActivitiesInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/List.hs new file mode 100644 index 000000000..453d2cad7 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Activities/List.hs @@ -0,0 +1,285 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Activities.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of channel activity events that match the request +-- criteria. For example, you can retrieve events associated with a +-- particular channel, events associated with the user\'s subscriptions and +-- Google+ friends, or the YouTube home page feed, which is customized for +-- each user. +-- +-- /See:/ for @YouTubeActivitiesList@. +module YouTube.Activities.List + ( + -- * REST Resource + ActivitiesListAPI + + -- * Creating a Request + , activitiesList + , ActivitiesList + + -- * Request Lenses + , alPublishedAfter + , alQuotaUser + , alPart + , alPrettyPrint + , alHome + , alMine + , alRegionCode + , alUserIp + , alChannelId + , alKey + , alPageToken + , alOauthToken + , alMaxResults + , alPublishedBefore + , alFields + , alAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeActivitiesList@ which the +-- 'ActivitiesList' request conforms to. +type ActivitiesListAPI = + "activities" :> + QueryParam "publishedAfter" UTCTime :> + QueryParam "part" Text :> + QueryParam "home" Bool :> + QueryParam "mine" Bool :> + QueryParam "regionCode" Text :> + QueryParam "channelId" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "publishedBefore" UTCTime :> + Get '[JSON] ActivityListResponse + +-- | Returns a list of channel activity events that match the request +-- criteria. For example, you can retrieve events associated with a +-- particular channel, events associated with the user\'s subscriptions and +-- Google+ friends, or the YouTube home page feed, which is customized for +-- each user. +-- +-- /See:/ 'activitiesList' smart constructor. +data ActivitiesList = ActivitiesList + { _alPublishedAfter :: !(Maybe UTCTime) + , _alQuotaUser :: !(Maybe Text) + , _alPart :: !Text + , _alPrettyPrint :: !Bool + , _alHome :: !(Maybe Bool) + , _alMine :: !(Maybe Bool) + , _alRegionCode :: !(Maybe Text) + , _alUserIp :: !(Maybe Text) + , _alChannelId :: !(Maybe Text) + , _alKey :: !(Maybe Text) + , _alPageToken :: !(Maybe Text) + , _alOauthToken :: !(Maybe Text) + , _alMaxResults :: !Word32 + , _alPublishedBefore :: !(Maybe UTCTime) + , _alFields :: !(Maybe Text) + , _alAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitiesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alPublishedAfter' +-- +-- * 'alQuotaUser' +-- +-- * 'alPart' +-- +-- * 'alPrettyPrint' +-- +-- * 'alHome' +-- +-- * 'alMine' +-- +-- * 'alRegionCode' +-- +-- * 'alUserIp' +-- +-- * 'alChannelId' +-- +-- * 'alKey' +-- +-- * 'alPageToken' +-- +-- * 'alOauthToken' +-- +-- * 'alMaxResults' +-- +-- * 'alPublishedBefore' +-- +-- * 'alFields' +-- +-- * 'alAlt' +activitiesList + :: Text -- ^ 'part' + -> ActivitiesList +activitiesList pAlPart_ = + ActivitiesList + { _alPublishedAfter = Nothing + , _alQuotaUser = Nothing + , _alPart = pAlPart_ + , _alPrettyPrint = True + , _alHome = Nothing + , _alMine = Nothing + , _alRegionCode = Nothing + , _alUserIp = Nothing + , _alChannelId = Nothing + , _alKey = Nothing + , _alPageToken = Nothing + , _alOauthToken = Nothing + , _alMaxResults = 5 + , _alPublishedBefore = Nothing + , _alFields = Nothing + , _alAlt = "json" + } + +-- | The publishedAfter parameter specifies the earliest date and time that +-- an activity could have occurred for that activity to be included in the +-- API response. If the parameter value specifies a day, but not a time, +-- then any activities that occurred that day will be included in the +-- result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) +-- format. +alPublishedAfter :: Lens' ActivitiesList' (Maybe UTCTime) +alPublishedAfter + = lens _alPublishedAfter + (\ s a -> s{_alPublishedAfter = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +alQuotaUser :: Lens' ActivitiesList' (Maybe Text) +alQuotaUser + = lens _alQuotaUser (\ s a -> s{_alQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- activity resource properties that the API response will include. If the +-- parameter identifies a property that contains child properties, the +-- child properties will be included in the response. For example, in an +-- activity resource, the snippet property contains other properties that +-- identify the type of activity, a display title for the activity, and so +-- forth. If you set part=snippet, the API response will also contain all +-- of those nested properties. +alPart :: Lens' ActivitiesList' Text +alPart = lens _alPart (\ s a -> s{_alPart = a}) + +-- | Returns response with indentations and line breaks. +alPrettyPrint :: Lens' ActivitiesList' Bool +alPrettyPrint + = lens _alPrettyPrint + (\ s a -> s{_alPrettyPrint = a}) + +-- | Set this parameter\'s value to true to retrieve the activity feed that +-- displays on the YouTube home page for the currently authenticated user. +alHome :: Lens' ActivitiesList' (Maybe Bool) +alHome = lens _alHome (\ s a -> s{_alHome = a}) + +-- | Set this parameter\'s value to true to retrieve a feed of the +-- authenticated user\'s activities. +alMine :: Lens' ActivitiesList' (Maybe Bool) +alMine = lens _alMine (\ s a -> s{_alMine = a}) + +-- | The regionCode parameter instructs the API to return results for the +-- specified country. The parameter value is an ISO 3166-1 alpha-2 country +-- code. YouTube uses this value when the authorized user\'s previous +-- activity on YouTube does not provide enough information to generate the +-- activity feed. +alRegionCode :: Lens' ActivitiesList' (Maybe Text) +alRegionCode + = lens _alRegionCode (\ s a -> s{_alRegionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +alUserIp :: Lens' ActivitiesList' (Maybe Text) +alUserIp = lens _alUserIp (\ s a -> s{_alUserIp = a}) + +-- | The channelId parameter specifies a unique YouTube channel ID. The API +-- will then return a list of that channel\'s activities. +alChannelId :: Lens' ActivitiesList' (Maybe Text) +alChannelId + = lens _alChannelId (\ s a -> s{_alChannelId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +alKey :: Lens' ActivitiesList' (Maybe Text) +alKey = lens _alKey (\ s a -> s{_alKey = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +alPageToken :: Lens' ActivitiesList' (Maybe Text) +alPageToken + = lens _alPageToken (\ s a -> s{_alPageToken = a}) + +-- | OAuth 2.0 token for the current user. +alOauthToken :: Lens' ActivitiesList' (Maybe Text) +alOauthToken + = lens _alOauthToken (\ s a -> s{_alOauthToken = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +alMaxResults :: Lens' ActivitiesList' Word32 +alMaxResults + = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) + +-- | The publishedBefore parameter specifies the date and time before which +-- an activity must have occurred for that activity to be included in the +-- API response. If the parameter value specifies a day, but not a time, +-- then any activities that occurred that day will be excluded from the +-- result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) +-- format. +alPublishedBefore :: Lens' ActivitiesList' (Maybe UTCTime) +alPublishedBefore + = lens _alPublishedBefore + (\ s a -> s{_alPublishedBefore = a}) + +-- | Selector specifying which fields to include in a partial response. +alFields :: Lens' ActivitiesList' (Maybe Text) +alFields = lens _alFields (\ s a -> s{_alFields = a}) + +-- | Data format for the response. +alAlt :: Lens' ActivitiesList' Text +alAlt = lens _alAlt (\ s a -> s{_alAlt = a}) + +instance GoogleRequest ActivitiesList' where + type Rs ActivitiesList' = ActivityListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ActivitiesList{..} + = go _alPublishedAfter _alQuotaUser (Just _alPart) + _alPrettyPrint + _alHome + _alMine + _alRegionCode + _alUserIp + _alChannelId + _alKey + _alPageToken + _alOauthToken + (Just _alMaxResults) + _alPublishedBefore + _alFields + _alAlt + where go + = clientWithRoute (Proxy :: Proxy ActivitiesListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Delete.hs new file mode 100644 index 000000000..55ff4ea44 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Delete.hs @@ -0,0 +1,194 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Captions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a specified caption track. +-- +-- /See:/ for @YouTubeCaptionsDelete@. +module YouTube.Captions.Delete + ( + -- * REST Resource + CaptionsDeleteAPI + + -- * Creating a Request + , captionsDelete + , CaptionsDelete + + -- * Request Lenses + , cddOnBehalfOf + , cddQuotaUser + , cddPrettyPrint + , cddUserIp + , cddOnBehalfOfContentOwner + , cddKey + , cddId + , cddOauthToken + , cddFields + , cddAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCaptionsDelete@ which the +-- 'CaptionsDelete' request conforms to. +type CaptionsDeleteAPI = + "captions" :> + QueryParam "onBehalfOf" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a specified caption track. +-- +-- /See:/ 'captionsDelete' smart constructor. +data CaptionsDelete = CaptionsDelete + { _cddOnBehalfOf :: !(Maybe Text) + , _cddQuotaUser :: !(Maybe Text) + , _cddPrettyPrint :: !Bool + , _cddUserIp :: !(Maybe Text) + , _cddOnBehalfOfContentOwner :: !(Maybe Text) + , _cddKey :: !(Maybe Text) + , _cddId :: !Text + , _cddOauthToken :: !(Maybe Text) + , _cddFields :: !(Maybe Text) + , _cddAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cddOnBehalfOf' +-- +-- * 'cddQuotaUser' +-- +-- * 'cddPrettyPrint' +-- +-- * 'cddUserIp' +-- +-- * 'cddOnBehalfOfContentOwner' +-- +-- * 'cddKey' +-- +-- * 'cddId' +-- +-- * 'cddOauthToken' +-- +-- * 'cddFields' +-- +-- * 'cddAlt' +captionsDelete + :: Text -- ^ 'id' + -> CaptionsDelete +captionsDelete pCddId_ = + CaptionsDelete + { _cddOnBehalfOf = Nothing + , _cddQuotaUser = Nothing + , _cddPrettyPrint = True + , _cddUserIp = Nothing + , _cddOnBehalfOfContentOwner = Nothing + , _cddKey = Nothing + , _cddId = pCddId_ + , _cddOauthToken = Nothing + , _cddFields = Nothing + , _cddAlt = "json" + } + +-- | ID of the Google+ Page for the channel that the request is be on behalf +-- of +cddOnBehalfOf :: Lens' CaptionsDelete' (Maybe Text) +cddOnBehalfOf + = lens _cddOnBehalfOf + (\ s a -> s{_cddOnBehalfOf = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cddQuotaUser :: Lens' CaptionsDelete' (Maybe Text) +cddQuotaUser + = lens _cddQuotaUser (\ s a -> s{_cddQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cddPrettyPrint :: Lens' CaptionsDelete' Bool +cddPrettyPrint + = lens _cddPrettyPrint + (\ s a -> s{_cddPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cddUserIp :: Lens' CaptionsDelete' (Maybe Text) +cddUserIp + = lens _cddUserIp (\ s a -> s{_cddUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +cddOnBehalfOfContentOwner :: Lens' CaptionsDelete' (Maybe Text) +cddOnBehalfOfContentOwner + = lens _cddOnBehalfOfContentOwner + (\ s a -> s{_cddOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cddKey :: Lens' CaptionsDelete' (Maybe Text) +cddKey = lens _cddKey (\ s a -> s{_cddKey = a}) + +-- | The id parameter identifies the caption track that is being deleted. The +-- value is a caption track ID as identified by the id property in a +-- caption resource. +cddId :: Lens' CaptionsDelete' Text +cddId = lens _cddId (\ s a -> s{_cddId = a}) + +-- | OAuth 2.0 token for the current user. +cddOauthToken :: Lens' CaptionsDelete' (Maybe Text) +cddOauthToken + = lens _cddOauthToken + (\ s a -> s{_cddOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cddFields :: Lens' CaptionsDelete' (Maybe Text) +cddFields + = lens _cddFields (\ s a -> s{_cddFields = a}) + +-- | Data format for the response. +cddAlt :: Lens' CaptionsDelete' Text +cddAlt = lens _cddAlt (\ s a -> s{_cddAlt = a}) + +instance GoogleRequest CaptionsDelete' where + type Rs CaptionsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CaptionsDelete{..} + = go _cddOnBehalfOf _cddQuotaUser _cddPrettyPrint + _cddUserIp + _cddOnBehalfOfContentOwner + _cddKey + (Just _cddId) + _cddOauthToken + _cddFields + _cddAlt + where go + = clientWithRoute (Proxy :: Proxy CaptionsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Download.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Download.hs new file mode 100644 index 000000000..675f1cee6 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Download.hs @@ -0,0 +1,225 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Captions.Download +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Downloads a caption track. The caption track is returned in its original +-- format unless the request specifies a value for the tfmt parameter and +-- in its original language unless the request specifies a value for the +-- tlang parameter. +-- +-- /See:/ for @YouTubeCaptionsDownload@. +module YouTube.Captions.Download + ( + -- * REST Resource + CaptionsDownloadAPI + + -- * Creating a Request + , captionsDownload + , CaptionsDownload + + -- * Request Lenses + , cdOnBehalfOf + , cdQuotaUser + , cdPrettyPrint + , cdUserIp + , cdTlang + , cdOnBehalfOfContentOwner + , cdKey + , cdId + , cdTfmt + , cdOauthToken + , cdFields + , cdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCaptionsDownload@ which the +-- 'CaptionsDownload' request conforms to. +type CaptionsDownloadAPI = + "captions" :> + Capture "id" Text :> + QueryParam "onBehalfOf" Text :> + QueryParam "tlang" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "tfmt" Text :> Get '[JSON] () + +-- | Downloads a caption track. The caption track is returned in its original +-- format unless the request specifies a value for the tfmt parameter and +-- in its original language unless the request specifies a value for the +-- tlang parameter. +-- +-- /See:/ 'captionsDownload' smart constructor. +data CaptionsDownload = CaptionsDownload + { _cdOnBehalfOf :: !(Maybe Text) + , _cdQuotaUser :: !(Maybe Text) + , _cdPrettyPrint :: !Bool + , _cdUserIp :: !(Maybe Text) + , _cdTlang :: !(Maybe Text) + , _cdOnBehalfOfContentOwner :: !(Maybe Text) + , _cdKey :: !(Maybe Text) + , _cdId :: !Text + , _cdTfmt :: !(Maybe Text) + , _cdOauthToken :: !(Maybe Text) + , _cdFields :: !(Maybe Text) + , _cdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionsDownload'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cdOnBehalfOf' +-- +-- * 'cdQuotaUser' +-- +-- * 'cdPrettyPrint' +-- +-- * 'cdUserIp' +-- +-- * 'cdTlang' +-- +-- * 'cdOnBehalfOfContentOwner' +-- +-- * 'cdKey' +-- +-- * 'cdId' +-- +-- * 'cdTfmt' +-- +-- * 'cdOauthToken' +-- +-- * 'cdFields' +-- +-- * 'cdAlt' +captionsDownload + :: Text -- ^ 'id' + -> CaptionsDownload +captionsDownload pCdId_ = + CaptionsDownload + { _cdOnBehalfOf = Nothing + , _cdQuotaUser = Nothing + , _cdPrettyPrint = True + , _cdUserIp = Nothing + , _cdTlang = Nothing + , _cdOnBehalfOfContentOwner = Nothing + , _cdKey = Nothing + , _cdId = pCdId_ + , _cdTfmt = Nothing + , _cdOauthToken = Nothing + , _cdFields = Nothing + , _cdAlt = "json" + } + +-- | ID of the Google+ Page for the channel that the request is be on behalf +-- of +cdOnBehalfOf :: Lens' CaptionsDownload' (Maybe Text) +cdOnBehalfOf + = lens _cdOnBehalfOf (\ s a -> s{_cdOnBehalfOf = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cdQuotaUser :: Lens' CaptionsDownload' (Maybe Text) +cdQuotaUser + = lens _cdQuotaUser (\ s a -> s{_cdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cdPrettyPrint :: Lens' CaptionsDownload' Bool +cdPrettyPrint + = lens _cdPrettyPrint + (\ s a -> s{_cdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cdUserIp :: Lens' CaptionsDownload' (Maybe Text) +cdUserIp = lens _cdUserIp (\ s a -> s{_cdUserIp = a}) + +-- | The tlang parameter specifies that the API response should return a +-- translation of the specified caption track. The parameter value is an +-- ISO 639-1 two-letter language code that identifies the desired caption +-- language. The translation is generated by using machine translation, +-- such as Google Translate. +cdTlang :: Lens' CaptionsDownload' (Maybe Text) +cdTlang = lens _cdTlang (\ s a -> s{_cdTlang = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +cdOnBehalfOfContentOwner :: Lens' CaptionsDownload' (Maybe Text) +cdOnBehalfOfContentOwner + = lens _cdOnBehalfOfContentOwner + (\ s a -> s{_cdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cdKey :: Lens' CaptionsDownload' (Maybe Text) +cdKey = lens _cdKey (\ s a -> s{_cdKey = a}) + +-- | The id parameter identifies the caption track that is being retrieved. +-- The value is a caption track ID as identified by the id property in a +-- caption resource. +cdId :: Lens' CaptionsDownload' Text +cdId = lens _cdId (\ s a -> s{_cdId = a}) + +-- | The tfmt parameter specifies that the caption track should be returned +-- in a specific format. If the parameter is not included in the request, +-- the track is returned in its original format. +cdTfmt :: Lens' CaptionsDownload' (Maybe Text) +cdTfmt = lens _cdTfmt (\ s a -> s{_cdTfmt = a}) + +-- | OAuth 2.0 token for the current user. +cdOauthToken :: Lens' CaptionsDownload' (Maybe Text) +cdOauthToken + = lens _cdOauthToken (\ s a -> s{_cdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cdFields :: Lens' CaptionsDownload' (Maybe Text) +cdFields = lens _cdFields (\ s a -> s{_cdFields = a}) + +-- | Data format for the response. +cdAlt :: Lens' CaptionsDownload' Text +cdAlt = lens _cdAlt (\ s a -> s{_cdAlt = a}) + +instance GoogleRequest CaptionsDownload' where + type Rs CaptionsDownload' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CaptionsDownload{..} + = go _cdOnBehalfOf _cdQuotaUser _cdPrettyPrint + _cdUserIp + _cdTlang + _cdOnBehalfOfContentOwner + _cdKey + _cdId + _cdTfmt + _cdOauthToken + _cdFields + _cdAlt + where go + = clientWithRoute + (Proxy :: Proxy CaptionsDownloadAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Insert.hs new file mode 100644 index 000000000..7ef9abf09 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Insert.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Captions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a caption track. +-- +-- /See:/ for @YouTubeCaptionsInsert@. +module YouTube.Captions.Insert + ( + -- * REST Resource + CaptionsInsertAPI + + -- * Creating a Request + , captionsInsert + , CaptionsInsert + + -- * Request Lenses + , ciOnBehalfOf + , ciQuotaUser + , ciPart + , ciPrettyPrint + , ciUserIp + , ciOnBehalfOfContentOwner + , ciKey + , ciSync + , ciOauthToken + , ciFields + , ciAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCaptionsInsert@ which the +-- 'CaptionsInsert' request conforms to. +type CaptionsInsertAPI = + "captions" :> + QueryParam "onBehalfOf" Text :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "sync" Bool :> Post '[JSON] Caption + +-- | Uploads a caption track. +-- +-- /See:/ 'captionsInsert' smart constructor. +data CaptionsInsert = CaptionsInsert + { _ciOnBehalfOf :: !(Maybe Text) + , _ciQuotaUser :: !(Maybe Text) + , _ciPart :: !Text + , _ciPrettyPrint :: !Bool + , _ciUserIp :: !(Maybe Text) + , _ciOnBehalfOfContentOwner :: !(Maybe Text) + , _ciKey :: !(Maybe Text) + , _ciSync :: !(Maybe Bool) + , _ciOauthToken :: !(Maybe Text) + , _ciFields :: !(Maybe Text) + , _ciAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciOnBehalfOf' +-- +-- * 'ciQuotaUser' +-- +-- * 'ciPart' +-- +-- * 'ciPrettyPrint' +-- +-- * 'ciUserIp' +-- +-- * 'ciOnBehalfOfContentOwner' +-- +-- * 'ciKey' +-- +-- * 'ciSync' +-- +-- * 'ciOauthToken' +-- +-- * 'ciFields' +-- +-- * 'ciAlt' +captionsInsert + :: Text -- ^ 'part' + -> CaptionsInsert +captionsInsert pCiPart_ = + CaptionsInsert + { _ciOnBehalfOf = Nothing + , _ciQuotaUser = Nothing + , _ciPart = pCiPart_ + , _ciPrettyPrint = True + , _ciUserIp = Nothing + , _ciOnBehalfOfContentOwner = Nothing + , _ciKey = Nothing + , _ciSync = Nothing + , _ciOauthToken = Nothing + , _ciFields = Nothing + , _ciAlt = "json" + } + +-- | ID of the Google+ Page for the channel that the request is be on behalf +-- of +ciOnBehalfOf :: Lens' CaptionsInsert' (Maybe Text) +ciOnBehalfOf + = lens _ciOnBehalfOf (\ s a -> s{_ciOnBehalfOf = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ciQuotaUser :: Lens' CaptionsInsert' (Maybe Text) +ciQuotaUser + = lens _ciQuotaUser (\ s a -> s{_ciQuotaUser = a}) + +-- | The part parameter specifies the caption resource parts that the API +-- response will include. Set the parameter value to snippet. +ciPart :: Lens' CaptionsInsert' Text +ciPart = lens _ciPart (\ s a -> s{_ciPart = a}) + +-- | Returns response with indentations and line breaks. +ciPrettyPrint :: Lens' CaptionsInsert' Bool +ciPrettyPrint + = lens _ciPrettyPrint + (\ s a -> s{_ciPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ciUserIp :: Lens' CaptionsInsert' (Maybe Text) +ciUserIp = lens _ciUserIp (\ s a -> s{_ciUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +ciOnBehalfOfContentOwner :: Lens' CaptionsInsert' (Maybe Text) +ciOnBehalfOfContentOwner + = lens _ciOnBehalfOfContentOwner + (\ s a -> s{_ciOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ciKey :: Lens' CaptionsInsert' (Maybe Text) +ciKey = lens _ciKey (\ s a -> s{_ciKey = a}) + +-- | The sync parameter indicates whether YouTube should automatically +-- synchronize the caption file with the audio track of the video. If you +-- set the value to true, YouTube will disregard any time codes that are in +-- the uploaded caption file and generate new time codes for the captions. +-- You should set the sync parameter to true if you are uploading a +-- transcript, which has no time codes, or if you suspect the time codes in +-- your file are incorrect and want YouTube to try to fix them. +ciSync :: Lens' CaptionsInsert' (Maybe Bool) +ciSync = lens _ciSync (\ s a -> s{_ciSync = a}) + +-- | OAuth 2.0 token for the current user. +ciOauthToken :: Lens' CaptionsInsert' (Maybe Text) +ciOauthToken + = lens _ciOauthToken (\ s a -> s{_ciOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ciFields :: Lens' CaptionsInsert' (Maybe Text) +ciFields = lens _ciFields (\ s a -> s{_ciFields = a}) + +-- | Data format for the response. +ciAlt :: Lens' CaptionsInsert' Text +ciAlt = lens _ciAlt (\ s a -> s{_ciAlt = a}) + +instance GoogleRequest CaptionsInsert' where + type Rs CaptionsInsert' = Caption + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CaptionsInsert{..} + = go _ciOnBehalfOf _ciQuotaUser (Just _ciPart) + _ciPrettyPrint + _ciUserIp + _ciOnBehalfOfContentOwner + _ciKey + _ciSync + _ciOauthToken + _ciFields + _ciAlt + where go + = clientWithRoute (Proxy :: Proxy CaptionsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/List.hs new file mode 100644 index 000000000..77273e0e6 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/List.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Captions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of caption tracks that are associated with a specified +-- video. Note that the API response does not contain the actual captions +-- and that the captions.download method provides the ability to retrieve a +-- caption track. +-- +-- /See:/ for @YouTubeCaptionsList@. +module YouTube.Captions.List + ( + -- * REST Resource + CaptionsListAPI + + -- * Creating a Request + , captionsList + , CaptionsList + + -- * Request Lenses + , clOnBehalfOf + , clQuotaUser + , clPart + , clPrettyPrint + , clUserIp + , clOnBehalfOfContentOwner + , clVideoId + , clKey + , clId + , clOauthToken + , clFields + , clAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCaptionsList@ which the +-- 'CaptionsList' request conforms to. +type CaptionsListAPI = + "captions" :> + QueryParam "onBehalfOf" Text :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "videoId" Text :> + QueryParam "id" Text :> + Get '[JSON] CaptionListResponse + +-- | Returns a list of caption tracks that are associated with a specified +-- video. Note that the API response does not contain the actual captions +-- and that the captions.download method provides the ability to retrieve a +-- caption track. +-- +-- /See:/ 'captionsList' smart constructor. +data CaptionsList = CaptionsList + { _clOnBehalfOf :: !(Maybe Text) + , _clQuotaUser :: !(Maybe Text) + , _clPart :: !Text + , _clPrettyPrint :: !Bool + , _clUserIp :: !(Maybe Text) + , _clOnBehalfOfContentOwner :: !(Maybe Text) + , _clVideoId :: !Text + , _clKey :: !(Maybe Text) + , _clId :: !(Maybe Text) + , _clOauthToken :: !(Maybe Text) + , _clFields :: !(Maybe Text) + , _clAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clOnBehalfOf' +-- +-- * 'clQuotaUser' +-- +-- * 'clPart' +-- +-- * 'clPrettyPrint' +-- +-- * 'clUserIp' +-- +-- * 'clOnBehalfOfContentOwner' +-- +-- * 'clVideoId' +-- +-- * 'clKey' +-- +-- * 'clId' +-- +-- * 'clOauthToken' +-- +-- * 'clFields' +-- +-- * 'clAlt' +captionsList + :: Text -- ^ 'part' + -> Text -- ^ 'videoId' + -> CaptionsList +captionsList pClPart_ pClVideoId_ = + CaptionsList + { _clOnBehalfOf = Nothing + , _clQuotaUser = Nothing + , _clPart = pClPart_ + , _clPrettyPrint = True + , _clUserIp = Nothing + , _clOnBehalfOfContentOwner = Nothing + , _clVideoId = pClVideoId_ + , _clKey = Nothing + , _clId = Nothing + , _clOauthToken = Nothing + , _clFields = Nothing + , _clAlt = "json" + } + +-- | ID of the Google+ Page for the channel that the request is on behalf of. +clOnBehalfOf :: Lens' CaptionsList' (Maybe Text) +clOnBehalfOf + = lens _clOnBehalfOf (\ s a -> s{_clOnBehalfOf = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +clQuotaUser :: Lens' CaptionsList' (Maybe Text) +clQuotaUser + = lens _clQuotaUser (\ s a -> s{_clQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- caption resource parts that the API response will include. The part +-- names that you can include in the parameter value are id and snippet. +clPart :: Lens' CaptionsList' Text +clPart = lens _clPart (\ s a -> s{_clPart = a}) + +-- | Returns response with indentations and line breaks. +clPrettyPrint :: Lens' CaptionsList' Bool +clPrettyPrint + = lens _clPrettyPrint + (\ s a -> s{_clPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +clUserIp :: Lens' CaptionsList' (Maybe Text) +clUserIp = lens _clUserIp (\ s a -> s{_clUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +clOnBehalfOfContentOwner :: Lens' CaptionsList' (Maybe Text) +clOnBehalfOfContentOwner + = lens _clOnBehalfOfContentOwner + (\ s a -> s{_clOnBehalfOfContentOwner = a}) + +-- | The videoId parameter specifies the YouTube video ID of the video for +-- which the API should return caption tracks. +clVideoId :: Lens' CaptionsList' Text +clVideoId + = lens _clVideoId (\ s a -> s{_clVideoId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +clKey :: Lens' CaptionsList' (Maybe Text) +clKey = lens _clKey (\ s a -> s{_clKey = a}) + +-- | The id parameter specifies a comma-separated list of IDs that identify +-- the caption resources that should be retrieved. Each ID must identify a +-- caption track associated with the specified video. +clId :: Lens' CaptionsList' (Maybe Text) +clId = lens _clId (\ s a -> s{_clId = a}) + +-- | OAuth 2.0 token for the current user. +clOauthToken :: Lens' CaptionsList' (Maybe Text) +clOauthToken + = lens _clOauthToken (\ s a -> s{_clOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +clFields :: Lens' CaptionsList' (Maybe Text) +clFields = lens _clFields (\ s a -> s{_clFields = a}) + +-- | Data format for the response. +clAlt :: Lens' CaptionsList' Text +clAlt = lens _clAlt (\ s a -> s{_clAlt = a}) + +instance GoogleRequest CaptionsList' where + type Rs CaptionsList' = CaptionListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CaptionsList{..} + = go _clOnBehalfOf _clQuotaUser (Just _clPart) + _clPrettyPrint + _clUserIp + _clOnBehalfOfContentOwner + (Just _clVideoId) + _clKey + _clId + _clOauthToken + _clFields + _clAlt + where go + = clientWithRoute (Proxy :: Proxy CaptionsListAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Update.hs new file mode 100644 index 000000000..76bda1cad --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Update.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Captions.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a caption track. When updating a caption track, you can change +-- the track\'s draft status, upload a new caption file for the track, or +-- both. +-- +-- /See:/ for @YouTubeCaptionsUpdate@. +module YouTube.Captions.Update + ( + -- * REST Resource + CaptionsUpdateAPI + + -- * Creating a Request + , captionsUpdate + , CaptionsUpdate + + -- * Request Lenses + , cuOnBehalfOf + , cuQuotaUser + , cuPart + , cuPrettyPrint + , cuUserIp + , cuOnBehalfOfContentOwner + , cuKey + , cuSync + , cuOauthToken + , cuFields + , cuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCaptionsUpdate@ which the +-- 'CaptionsUpdate' request conforms to. +type CaptionsUpdateAPI = + "captions" :> + QueryParam "onBehalfOf" Text :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "sync" Bool :> Put '[JSON] Caption + +-- | Updates a caption track. When updating a caption track, you can change +-- the track\'s draft status, upload a new caption file for the track, or +-- both. +-- +-- /See:/ 'captionsUpdate' smart constructor. +data CaptionsUpdate = CaptionsUpdate + { _cuOnBehalfOf :: !(Maybe Text) + , _cuQuotaUser :: !(Maybe Text) + , _cuPart :: !Text + , _cuPrettyPrint :: !Bool + , _cuUserIp :: !(Maybe Text) + , _cuOnBehalfOfContentOwner :: !(Maybe Text) + , _cuKey :: !(Maybe Text) + , _cuSync :: !(Maybe Bool) + , _cuOauthToken :: !(Maybe Text) + , _cuFields :: !(Maybe Text) + , _cuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuOnBehalfOf' +-- +-- * 'cuQuotaUser' +-- +-- * 'cuPart' +-- +-- * 'cuPrettyPrint' +-- +-- * 'cuUserIp' +-- +-- * 'cuOnBehalfOfContentOwner' +-- +-- * 'cuKey' +-- +-- * 'cuSync' +-- +-- * 'cuOauthToken' +-- +-- * 'cuFields' +-- +-- * 'cuAlt' +captionsUpdate + :: Text -- ^ 'part' + -> CaptionsUpdate +captionsUpdate pCuPart_ = + CaptionsUpdate + { _cuOnBehalfOf = Nothing + , _cuQuotaUser = Nothing + , _cuPart = pCuPart_ + , _cuPrettyPrint = True + , _cuUserIp = Nothing + , _cuOnBehalfOfContentOwner = Nothing + , _cuKey = Nothing + , _cuSync = Nothing + , _cuOauthToken = Nothing + , _cuFields = Nothing + , _cuAlt = "json" + } + +-- | ID of the Google+ Page for the channel that the request is be on behalf +-- of +cuOnBehalfOf :: Lens' CaptionsUpdate' (Maybe Text) +cuOnBehalfOf + = lens _cuOnBehalfOf (\ s a -> s{_cuOnBehalfOf = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuQuotaUser :: Lens' CaptionsUpdate' (Maybe Text) +cuQuotaUser + = lens _cuQuotaUser (\ s a -> s{_cuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. Set the property value to +-- snippet if you are updating the track\'s draft status. Otherwise, set +-- the property value to id. +cuPart :: Lens' CaptionsUpdate' Text +cuPart = lens _cuPart (\ s a -> s{_cuPart = a}) + +-- | Returns response with indentations and line breaks. +cuPrettyPrint :: Lens' CaptionsUpdate' Bool +cuPrettyPrint + = lens _cuPrettyPrint + (\ s a -> s{_cuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuUserIp :: Lens' CaptionsUpdate' (Maybe Text) +cuUserIp = lens _cuUserIp (\ s a -> s{_cuUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +cuOnBehalfOfContentOwner :: Lens' CaptionsUpdate' (Maybe Text) +cuOnBehalfOfContentOwner + = lens _cuOnBehalfOfContentOwner + (\ s a -> s{_cuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuKey :: Lens' CaptionsUpdate' (Maybe Text) +cuKey = lens _cuKey (\ s a -> s{_cuKey = a}) + +-- | Note: The API server only processes the parameter value if the request +-- contains an updated caption file. The sync parameter indicates whether +-- YouTube should automatically synchronize the caption file with the audio +-- track of the video. If you set the value to true, YouTube will +-- automatically synchronize the caption track with the audio track. +cuSync :: Lens' CaptionsUpdate' (Maybe Bool) +cuSync = lens _cuSync (\ s a -> s{_cuSync = a}) + +-- | OAuth 2.0 token for the current user. +cuOauthToken :: Lens' CaptionsUpdate' (Maybe Text) +cuOauthToken + = lens _cuOauthToken (\ s a -> s{_cuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuFields :: Lens' CaptionsUpdate' (Maybe Text) +cuFields = lens _cuFields (\ s a -> s{_cuFields = a}) + +-- | Data format for the response. +cuAlt :: Lens' CaptionsUpdate' Text +cuAlt = lens _cuAlt (\ s a -> s{_cuAlt = a}) + +instance GoogleRequest CaptionsUpdate' where + type Rs CaptionsUpdate' = Caption + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CaptionsUpdate{..} + = go _cuOnBehalfOf _cuQuotaUser (Just _cuPart) + _cuPrettyPrint + _cuUserIp + _cuOnBehalfOfContentOwner + _cuKey + _cuSync + _cuOauthToken + _cuFields + _cuAlt + where go + = clientWithRoute (Proxy :: Proxy CaptionsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelBanners/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelBanners/Insert.hs new file mode 100644 index 000000000..80dc356ee --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelBanners/Insert.hs @@ -0,0 +1,185 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.ChannelBanners.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a channel banner image to YouTube. This method represents the +-- first two steps in a three-step process to update the banner image for a +-- channel: - Call the channelBanners.insert method to upload the binary +-- image data to YouTube. The image must have a 16:9 aspect ratio and be at +-- least 2120x1192 pixels. - Extract the url property\'s value from the +-- response that the API returns for step 1. - Call the channels.update +-- method to update the channel\'s branding settings. Set the +-- brandingSettings.image.bannerExternalUrl property\'s value to the URL +-- obtained in step 2. +-- +-- /See:/ for @YouTubeChannelBannersInsert@. +module YouTube.ChannelBanners.Insert + ( + -- * REST Resource + ChannelBannersInsertAPI + + -- * Creating a Request + , channelBannersInsert + , ChannelBannersInsert + + -- * Request Lenses + , cbiQuotaUser + , cbiPrettyPrint + , cbiUserIp + , cbiOnBehalfOfContentOwner + , cbiKey + , cbiOauthToken + , cbiFields + , cbiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelBannersInsert@ which the +-- 'ChannelBannersInsert' request conforms to. +type ChannelBannersInsertAPI = + "channelBanners" :> + "insert" :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] ChannelBannerResource + +-- | Uploads a channel banner image to YouTube. This method represents the +-- first two steps in a three-step process to update the banner image for a +-- channel: - Call the channelBanners.insert method to upload the binary +-- image data to YouTube. The image must have a 16:9 aspect ratio and be at +-- least 2120x1192 pixels. - Extract the url property\'s value from the +-- response that the API returns for step 1. - Call the channels.update +-- method to update the channel\'s branding settings. Set the +-- brandingSettings.image.bannerExternalUrl property\'s value to the URL +-- obtained in step 2. +-- +-- /See:/ 'channelBannersInsert' smart constructor. +data ChannelBannersInsert = ChannelBannersInsert + { _cbiQuotaUser :: !(Maybe Text) + , _cbiPrettyPrint :: !Bool + , _cbiUserIp :: !(Maybe Text) + , _cbiOnBehalfOfContentOwner :: !(Maybe Text) + , _cbiKey :: !(Maybe Text) + , _cbiOauthToken :: !(Maybe Text) + , _cbiFields :: !(Maybe Text) + , _cbiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelBannersInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cbiQuotaUser' +-- +-- * 'cbiPrettyPrint' +-- +-- * 'cbiUserIp' +-- +-- * 'cbiOnBehalfOfContentOwner' +-- +-- * 'cbiKey' +-- +-- * 'cbiOauthToken' +-- +-- * 'cbiFields' +-- +-- * 'cbiAlt' +channelBannersInsert + :: ChannelBannersInsert +channelBannersInsert = + ChannelBannersInsert + { _cbiQuotaUser = Nothing + , _cbiPrettyPrint = True + , _cbiUserIp = Nothing + , _cbiOnBehalfOfContentOwner = Nothing + , _cbiKey = Nothing + , _cbiOauthToken = Nothing + , _cbiFields = Nothing + , _cbiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cbiQuotaUser :: Lens' ChannelBannersInsert' (Maybe Text) +cbiQuotaUser + = lens _cbiQuotaUser (\ s a -> s{_cbiQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cbiPrettyPrint :: Lens' ChannelBannersInsert' Bool +cbiPrettyPrint + = lens _cbiPrettyPrint + (\ s a -> s{_cbiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cbiUserIp :: Lens' ChannelBannersInsert' (Maybe Text) +cbiUserIp + = lens _cbiUserIp (\ s a -> s{_cbiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +cbiOnBehalfOfContentOwner :: Lens' ChannelBannersInsert' (Maybe Text) +cbiOnBehalfOfContentOwner + = lens _cbiOnBehalfOfContentOwner + (\ s a -> s{_cbiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cbiKey :: Lens' ChannelBannersInsert' (Maybe Text) +cbiKey = lens _cbiKey (\ s a -> s{_cbiKey = a}) + +-- | OAuth 2.0 token for the current user. +cbiOauthToken :: Lens' ChannelBannersInsert' (Maybe Text) +cbiOauthToken + = lens _cbiOauthToken + (\ s a -> s{_cbiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cbiFields :: Lens' ChannelBannersInsert' (Maybe Text) +cbiFields + = lens _cbiFields (\ s a -> s{_cbiFields = a}) + +-- | Data format for the response. +cbiAlt :: Lens' ChannelBannersInsert' Text +cbiAlt = lens _cbiAlt (\ s a -> s{_cbiAlt = a}) + +instance GoogleRequest ChannelBannersInsert' where + type Rs ChannelBannersInsert' = ChannelBannerResource + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelBannersInsert{..} + = go _cbiQuotaUser _cbiPrettyPrint _cbiUserIp + _cbiOnBehalfOfContentOwner + _cbiKey + _cbiOauthToken + _cbiFields + _cbiAlt + where go + = clientWithRoute + (Proxy :: Proxy ChannelBannersInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Delete.hs new file mode 100644 index 000000000..30443da70 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Delete.hs @@ -0,0 +1,181 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.ChannelSections.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a channelSection. +-- +-- /See:/ for @YouTubeChannelSectionsDelete@. +module YouTube.ChannelSections.Delete + ( + -- * REST Resource + ChannelSectionsDeleteAPI + + -- * Creating a Request + , channelSectionsDelete + , ChannelSectionsDelete + + -- * Request Lenses + , csdQuotaUser + , csdPrettyPrint + , csdUserIp + , csdOnBehalfOfContentOwner + , csdKey + , csdId + , csdOauthToken + , csdFields + , csdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelSectionsDelete@ which the +-- 'ChannelSectionsDelete' request conforms to. +type ChannelSectionsDeleteAPI = + "channelSections" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a channelSection. +-- +-- /See:/ 'channelSectionsDelete' smart constructor. +data ChannelSectionsDelete = ChannelSectionsDelete + { _csdQuotaUser :: !(Maybe Text) + , _csdPrettyPrint :: !Bool + , _csdUserIp :: !(Maybe Text) + , _csdOnBehalfOfContentOwner :: !(Maybe Text) + , _csdKey :: !(Maybe Text) + , _csdId :: !Text + , _csdOauthToken :: !(Maybe Text) + , _csdFields :: !(Maybe Text) + , _csdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csdQuotaUser' +-- +-- * 'csdPrettyPrint' +-- +-- * 'csdUserIp' +-- +-- * 'csdOnBehalfOfContentOwner' +-- +-- * 'csdKey' +-- +-- * 'csdId' +-- +-- * 'csdOauthToken' +-- +-- * 'csdFields' +-- +-- * 'csdAlt' +channelSectionsDelete + :: Text -- ^ 'id' + -> ChannelSectionsDelete +channelSectionsDelete pCsdId_ = + ChannelSectionsDelete + { _csdQuotaUser = Nothing + , _csdPrettyPrint = True + , _csdUserIp = Nothing + , _csdOnBehalfOfContentOwner = Nothing + , _csdKey = Nothing + , _csdId = pCsdId_ + , _csdOauthToken = Nothing + , _csdFields = Nothing + , _csdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csdQuotaUser :: Lens' ChannelSectionsDelete' (Maybe Text) +csdQuotaUser + = lens _csdQuotaUser (\ s a -> s{_csdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csdPrettyPrint :: Lens' ChannelSectionsDelete' Bool +csdPrettyPrint + = lens _csdPrettyPrint + (\ s a -> s{_csdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csdUserIp :: Lens' ChannelSectionsDelete' (Maybe Text) +csdUserIp + = lens _csdUserIp (\ s a -> s{_csdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +csdOnBehalfOfContentOwner :: Lens' ChannelSectionsDelete' (Maybe Text) +csdOnBehalfOfContentOwner + = lens _csdOnBehalfOfContentOwner + (\ s a -> s{_csdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csdKey :: Lens' ChannelSectionsDelete' (Maybe Text) +csdKey = lens _csdKey (\ s a -> s{_csdKey = a}) + +-- | The id parameter specifies the YouTube channelSection ID for the +-- resource that is being deleted. In a channelSection resource, the id +-- property specifies the YouTube channelSection ID. +csdId :: Lens' ChannelSectionsDelete' Text +csdId = lens _csdId (\ s a -> s{_csdId = a}) + +-- | OAuth 2.0 token for the current user. +csdOauthToken :: Lens' ChannelSectionsDelete' (Maybe Text) +csdOauthToken + = lens _csdOauthToken + (\ s a -> s{_csdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csdFields :: Lens' ChannelSectionsDelete' (Maybe Text) +csdFields + = lens _csdFields (\ s a -> s{_csdFields = a}) + +-- | Data format for the response. +csdAlt :: Lens' ChannelSectionsDelete' Text +csdAlt = lens _csdAlt (\ s a -> s{_csdAlt = a}) + +instance GoogleRequest ChannelSectionsDelete' where + type Rs ChannelSectionsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelSectionsDelete{..} + = go _csdQuotaUser _csdPrettyPrint _csdUserIp + _csdOnBehalfOfContentOwner + _csdKey + (Just _csdId) + _csdOauthToken + _csdFields + _csdAlt + where go + = clientWithRoute + (Proxy :: Proxy ChannelSectionsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Insert.hs new file mode 100644 index 000000000..cf99206fa --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Insert.hs @@ -0,0 +1,211 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.ChannelSections.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a channelSection for the authenticated user\'s channel. +-- +-- /See:/ for @YouTubeChannelSectionsInsert@. +module YouTube.ChannelSections.Insert + ( + -- * REST Resource + ChannelSectionsInsertAPI + + -- * Creating a Request + , channelSectionsInsert + , ChannelSectionsInsert + + -- * Request Lenses + , csiQuotaUser + , csiPart + , csiPrettyPrint + , csiUserIp + , csiOnBehalfOfContentOwner + , csiKey + , csiOnBehalfOfContentOwnerChannel + , csiOauthToken + , csiFields + , csiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelSectionsInsert@ which the +-- 'ChannelSectionsInsert' request conforms to. +type ChannelSectionsInsertAPI = + "channelSections" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Post '[JSON] ChannelSection + +-- | Adds a channelSection for the authenticated user\'s channel. +-- +-- /See:/ 'channelSectionsInsert' smart constructor. +data ChannelSectionsInsert = ChannelSectionsInsert + { _csiQuotaUser :: !(Maybe Text) + , _csiPart :: !Text + , _csiPrettyPrint :: !Bool + , _csiUserIp :: !(Maybe Text) + , _csiOnBehalfOfContentOwner :: !(Maybe Text) + , _csiKey :: !(Maybe Text) + , _csiOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _csiOauthToken :: !(Maybe Text) + , _csiFields :: !(Maybe Text) + , _csiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csiQuotaUser' +-- +-- * 'csiPart' +-- +-- * 'csiPrettyPrint' +-- +-- * 'csiUserIp' +-- +-- * 'csiOnBehalfOfContentOwner' +-- +-- * 'csiKey' +-- +-- * 'csiOnBehalfOfContentOwnerChannel' +-- +-- * 'csiOauthToken' +-- +-- * 'csiFields' +-- +-- * 'csiAlt' +channelSectionsInsert + :: Text -- ^ 'part' + -> ChannelSectionsInsert +channelSectionsInsert pCsiPart_ = + ChannelSectionsInsert + { _csiQuotaUser = Nothing + , _csiPart = pCsiPart_ + , _csiPrettyPrint = True + , _csiUserIp = Nothing + , _csiOnBehalfOfContentOwner = Nothing + , _csiKey = Nothing + , _csiOnBehalfOfContentOwnerChannel = Nothing + , _csiOauthToken = Nothing + , _csiFields = Nothing + , _csiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csiQuotaUser :: Lens' ChannelSectionsInsert' (Maybe Text) +csiQuotaUser + = lens _csiQuotaUser (\ s a -> s{_csiQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part names that you +-- can include in the parameter value are snippet and contentDetails. +csiPart :: Lens' ChannelSectionsInsert' Text +csiPart = lens _csiPart (\ s a -> s{_csiPart = a}) + +-- | Returns response with indentations and line breaks. +csiPrettyPrint :: Lens' ChannelSectionsInsert' Bool +csiPrettyPrint + = lens _csiPrettyPrint + (\ s a -> s{_csiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csiUserIp :: Lens' ChannelSectionsInsert' (Maybe Text) +csiUserIp + = lens _csiUserIp (\ s a -> s{_csiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +csiOnBehalfOfContentOwner :: Lens' ChannelSectionsInsert' (Maybe Text) +csiOnBehalfOfContentOwner + = lens _csiOnBehalfOfContentOwner + (\ s a -> s{_csiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csiKey :: Lens' ChannelSectionsInsert' (Maybe Text) +csiKey = lens _csiKey (\ s a -> s{_csiKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +csiOnBehalfOfContentOwnerChannel :: Lens' ChannelSectionsInsert' (Maybe Text) +csiOnBehalfOfContentOwnerChannel + = lens _csiOnBehalfOfContentOwnerChannel + (\ s a -> s{_csiOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +csiOauthToken :: Lens' ChannelSectionsInsert' (Maybe Text) +csiOauthToken + = lens _csiOauthToken + (\ s a -> s{_csiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csiFields :: Lens' ChannelSectionsInsert' (Maybe Text) +csiFields + = lens _csiFields (\ s a -> s{_csiFields = a}) + +-- | Data format for the response. +csiAlt :: Lens' ChannelSectionsInsert' Text +csiAlt = lens _csiAlt (\ s a -> s{_csiAlt = a}) + +instance GoogleRequest ChannelSectionsInsert' where + type Rs ChannelSectionsInsert' = ChannelSection + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelSectionsInsert{..} + = go _csiQuotaUser (Just _csiPart) _csiPrettyPrint + _csiUserIp + _csiOnBehalfOfContentOwner + _csiKey + _csiOnBehalfOfContentOwnerChannel + _csiOauthToken + _csiFields + _csiAlt + where go + = clientWithRoute + (Proxy :: Proxy ChannelSectionsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/List.hs new file mode 100644 index 000000000..d406fb519 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/List.hs @@ -0,0 +1,246 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.ChannelSections.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns channelSection resources that match the API request criteria. +-- +-- /See:/ for @YouTubeChannelSectionsList@. +module YouTube.ChannelSections.List + ( + -- * REST Resource + ChannelSectionsListAPI + + -- * Creating a Request + , channelSectionsList + , ChannelSectionsList + + -- * Request Lenses + , cslQuotaUser + , cslPart + , cslPrettyPrint + , cslMine + , cslUserIp + , cslChannelId + , cslHl + , cslOnBehalfOfContentOwner + , cslKey + , cslId + , cslOauthToken + , cslFields + , cslAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelSectionsList@ which the +-- 'ChannelSectionsList' request conforms to. +type ChannelSectionsListAPI = + "channelSections" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "channelId" Text :> + QueryParam "hl" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> + Get '[JSON] ChannelSectionListResponse + +-- | Returns channelSection resources that match the API request criteria. +-- +-- /See:/ 'channelSectionsList' smart constructor. +data ChannelSectionsList = ChannelSectionsList + { _cslQuotaUser :: !(Maybe Text) + , _cslPart :: !Text + , _cslPrettyPrint :: !Bool + , _cslMine :: !(Maybe Bool) + , _cslUserIp :: !(Maybe Text) + , _cslChannelId :: !(Maybe Text) + , _cslHl :: !(Maybe Text) + , _cslOnBehalfOfContentOwner :: !(Maybe Text) + , _cslKey :: !(Maybe Text) + , _cslId :: !(Maybe Text) + , _cslOauthToken :: !(Maybe Text) + , _cslFields :: !(Maybe Text) + , _cslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cslQuotaUser' +-- +-- * 'cslPart' +-- +-- * 'cslPrettyPrint' +-- +-- * 'cslMine' +-- +-- * 'cslUserIp' +-- +-- * 'cslChannelId' +-- +-- * 'cslHl' +-- +-- * 'cslOnBehalfOfContentOwner' +-- +-- * 'cslKey' +-- +-- * 'cslId' +-- +-- * 'cslOauthToken' +-- +-- * 'cslFields' +-- +-- * 'cslAlt' +channelSectionsList + :: Text -- ^ 'part' + -> ChannelSectionsList +channelSectionsList pCslPart_ = + ChannelSectionsList + { _cslQuotaUser = Nothing + , _cslPart = pCslPart_ + , _cslPrettyPrint = True + , _cslMine = Nothing + , _cslUserIp = Nothing + , _cslChannelId = Nothing + , _cslHl = Nothing + , _cslOnBehalfOfContentOwner = Nothing + , _cslKey = Nothing + , _cslId = Nothing + , _cslOauthToken = Nothing + , _cslFields = Nothing + , _cslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cslQuotaUser :: Lens' ChannelSectionsList' (Maybe Text) +cslQuotaUser + = lens _cslQuotaUser (\ s a -> s{_cslQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- channelSection resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, and contentDetails. If the parameter identifies a property that +-- contains child properties, the child properties will be included in the +-- response. For example, in a channelSection resource, the snippet +-- property contains other properties, such as a display title for the +-- channelSection. If you set part=snippet, the API response will also +-- contain all of those nested properties. +cslPart :: Lens' ChannelSectionsList' Text +cslPart = lens _cslPart (\ s a -> s{_cslPart = a}) + +-- | Returns response with indentations and line breaks. +cslPrettyPrint :: Lens' ChannelSectionsList' Bool +cslPrettyPrint + = lens _cslPrettyPrint + (\ s a -> s{_cslPrettyPrint = a}) + +-- | Set this parameter\'s value to true to retrieve a feed of the +-- authenticated user\'s channelSections. +cslMine :: Lens' ChannelSectionsList' (Maybe Bool) +cslMine = lens _cslMine (\ s a -> s{_cslMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cslUserIp :: Lens' ChannelSectionsList' (Maybe Text) +cslUserIp + = lens _cslUserIp (\ s a -> s{_cslUserIp = a}) + +-- | The channelId parameter specifies a YouTube channel ID. The API will +-- only return that channel\'s channelSections. +cslChannelId :: Lens' ChannelSectionsList' (Maybe Text) +cslChannelId + = lens _cslChannelId (\ s a -> s{_cslChannelId = a}) + +-- | The hl parameter indicates that the snippet.localized property values in +-- the returned channelSection resources should be in the specified +-- language if localized values for that language are available. For +-- example, if the API request specifies hl=de, the snippet.localized +-- properties in the API response will contain German titles if German +-- titles are available. Channel owners can provide localized channel +-- section titles using either the channelSections.insert or +-- channelSections.update method. +cslHl :: Lens' ChannelSectionsList' (Maybe Text) +cslHl = lens _cslHl (\ s a -> s{_cslHl = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +cslOnBehalfOfContentOwner :: Lens' ChannelSectionsList' (Maybe Text) +cslOnBehalfOfContentOwner + = lens _cslOnBehalfOfContentOwner + (\ s a -> s{_cslOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cslKey :: Lens' ChannelSectionsList' (Maybe Text) +cslKey = lens _cslKey (\ s a -> s{_cslKey = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube +-- channelSection ID(s) for the resource(s) that are being retrieved. In a +-- channelSection resource, the id property specifies the YouTube +-- channelSection ID. +cslId :: Lens' ChannelSectionsList' (Maybe Text) +cslId = lens _cslId (\ s a -> s{_cslId = a}) + +-- | OAuth 2.0 token for the current user. +cslOauthToken :: Lens' ChannelSectionsList' (Maybe Text) +cslOauthToken + = lens _cslOauthToken + (\ s a -> s{_cslOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cslFields :: Lens' ChannelSectionsList' (Maybe Text) +cslFields + = lens _cslFields (\ s a -> s{_cslFields = a}) + +-- | Data format for the response. +cslAlt :: Lens' ChannelSectionsList' Text +cslAlt = lens _cslAlt (\ s a -> s{_cslAlt = a}) + +instance GoogleRequest ChannelSectionsList' where + type Rs ChannelSectionsList' = + ChannelSectionListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelSectionsList{..} + = go _cslQuotaUser (Just _cslPart) _cslPrettyPrint + _cslMine + _cslUserIp + _cslChannelId + _cslHl + _cslOnBehalfOfContentOwner + _cslKey + _cslId + _cslOauthToken + _cslFields + _cslAlt + where go + = clientWithRoute + (Proxy :: Proxy ChannelSectionsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs new file mode 100644 index 000000000..176a6daf2 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.ChannelSections.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Update a channelSection. +-- +-- /See:/ for @YouTubeChannelSectionsUpdate@. +module YouTube.ChannelSections.Update + ( + -- * REST Resource + ChannelSectionsUpdateAPI + + -- * Creating a Request + , channelSectionsUpdate + , ChannelSectionsUpdate + + -- * Request Lenses + , csuQuotaUser + , csuPart + , csuPrettyPrint + , csuUserIp + , csuOnBehalfOfContentOwner + , csuKey + , csuOauthToken + , csuFields + , csuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelSectionsUpdate@ which the +-- 'ChannelSectionsUpdate' request conforms to. +type ChannelSectionsUpdateAPI = + "channelSections" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Put '[JSON] ChannelSection + +-- | Update a channelSection. +-- +-- /See:/ 'channelSectionsUpdate' smart constructor. +data ChannelSectionsUpdate = ChannelSectionsUpdate + { _csuQuotaUser :: !(Maybe Text) + , _csuPart :: !Text + , _csuPrettyPrint :: !Bool + , _csuUserIp :: !(Maybe Text) + , _csuOnBehalfOfContentOwner :: !(Maybe Text) + , _csuKey :: !(Maybe Text) + , _csuOauthToken :: !(Maybe Text) + , _csuFields :: !(Maybe Text) + , _csuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csuQuotaUser' +-- +-- * 'csuPart' +-- +-- * 'csuPrettyPrint' +-- +-- * 'csuUserIp' +-- +-- * 'csuOnBehalfOfContentOwner' +-- +-- * 'csuKey' +-- +-- * 'csuOauthToken' +-- +-- * 'csuFields' +-- +-- * 'csuAlt' +channelSectionsUpdate + :: Text -- ^ 'part' + -> ChannelSectionsUpdate +channelSectionsUpdate pCsuPart_ = + ChannelSectionsUpdate + { _csuQuotaUser = Nothing + , _csuPart = pCsuPart_ + , _csuPrettyPrint = True + , _csuUserIp = Nothing + , _csuOnBehalfOfContentOwner = Nothing + , _csuKey = Nothing + , _csuOauthToken = Nothing + , _csuFields = Nothing + , _csuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csuQuotaUser :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuQuotaUser + = lens _csuQuotaUser (\ s a -> s{_csuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part names that you +-- can include in the parameter value are snippet and contentDetails. +csuPart :: Lens' ChannelSectionsUpdate' Text +csuPart = lens _csuPart (\ s a -> s{_csuPart = a}) + +-- | Returns response with indentations and line breaks. +csuPrettyPrint :: Lens' ChannelSectionsUpdate' Bool +csuPrettyPrint + = lens _csuPrettyPrint + (\ s a -> s{_csuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csuUserIp :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuUserIp + = lens _csuUserIp (\ s a -> s{_csuUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +csuOnBehalfOfContentOwner :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuOnBehalfOfContentOwner + = lens _csuOnBehalfOfContentOwner + (\ s a -> s{_csuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csuKey :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuKey = lens _csuKey (\ s a -> s{_csuKey = a}) + +-- | OAuth 2.0 token for the current user. +csuOauthToken :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuOauthToken + = lens _csuOauthToken + (\ s a -> s{_csuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csuFields :: Lens' ChannelSectionsUpdate' (Maybe Text) +csuFields + = lens _csuFields (\ s a -> s{_csuFields = a}) + +-- | Data format for the response. +csuAlt :: Lens' ChannelSectionsUpdate' Text +csuAlt = lens _csuAlt (\ s a -> s{_csuAlt = a}) + +instance GoogleRequest ChannelSectionsUpdate' where + type Rs ChannelSectionsUpdate' = ChannelSection + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelSectionsUpdate{..} + = go _csuQuotaUser (Just _csuPart) _csuPrettyPrint + _csuUserIp + _csuOnBehalfOfContentOwner + _csuKey + _csuOauthToken + _csuFields + _csuAlt + where go + = clientWithRoute + (Proxy :: Proxy ChannelSectionsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/List.hs new file mode 100644 index 000000000..750963020 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/List.hs @@ -0,0 +1,311 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Channels.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of zero or more channel resources that match the +-- request criteria. +-- +-- /See:/ for @YouTubeChannelsList@. +module YouTube.Channels.List + ( + -- * REST Resource + ChannelsListAPI + + -- * Creating a Request + , channelsList + , ChannelsList + + -- * Request Lenses + , chaQuotaUser + , chaPart + , chaPrettyPrint + , chaMine + , chaForUsername + , chaUserIp + , chaHl + , chaOnBehalfOfContentOwner + , chaKey + , chaCategoryId + , chaId + , chaMySubscribers + , chaPageToken + , chaOauthToken + , chaManagedByMe + , chaMaxResults + , chaFields + , chaAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelsList@ which the +-- 'ChannelsList' request conforms to. +type ChannelsListAPI = + "channels" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "forUsername" Text :> + QueryParam "hl" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "categoryId" Text :> + QueryParam "id" Text :> + QueryParam "mySubscribers" Bool :> + QueryParam "pageToken" Text :> + QueryParam "managedByMe" Bool :> + QueryParam "maxResults" Word32 :> + Get '[JSON] ChannelListResponse + +-- | Returns a collection of zero or more channel resources that match the +-- request criteria. +-- +-- /See:/ 'channelsList' smart constructor. +data ChannelsList = ChannelsList + { _chaQuotaUser :: !(Maybe Text) + , _chaPart :: !Text + , _chaPrettyPrint :: !Bool + , _chaMine :: !(Maybe Bool) + , _chaForUsername :: !(Maybe Text) + , _chaUserIp :: !(Maybe Text) + , _chaHl :: !(Maybe Text) + , _chaOnBehalfOfContentOwner :: !(Maybe Text) + , _chaKey :: !(Maybe Text) + , _chaCategoryId :: !(Maybe Text) + , _chaId :: !(Maybe Text) + , _chaMySubscribers :: !(Maybe Bool) + , _chaPageToken :: !(Maybe Text) + , _chaOauthToken :: !(Maybe Text) + , _chaManagedByMe :: !(Maybe Bool) + , _chaMaxResults :: !Word32 + , _chaFields :: !(Maybe Text) + , _chaAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'chaQuotaUser' +-- +-- * 'chaPart' +-- +-- * 'chaPrettyPrint' +-- +-- * 'chaMine' +-- +-- * 'chaForUsername' +-- +-- * 'chaUserIp' +-- +-- * 'chaHl' +-- +-- * 'chaOnBehalfOfContentOwner' +-- +-- * 'chaKey' +-- +-- * 'chaCategoryId' +-- +-- * 'chaId' +-- +-- * 'chaMySubscribers' +-- +-- * 'chaPageToken' +-- +-- * 'chaOauthToken' +-- +-- * 'chaManagedByMe' +-- +-- * 'chaMaxResults' +-- +-- * 'chaFields' +-- +-- * 'chaAlt' +channelsList + :: Text -- ^ 'part' + -> ChannelsList +channelsList pChaPart_ = + ChannelsList + { _chaQuotaUser = Nothing + , _chaPart = pChaPart_ + , _chaPrettyPrint = True + , _chaMine = Nothing + , _chaForUsername = Nothing + , _chaUserIp = Nothing + , _chaHl = Nothing + , _chaOnBehalfOfContentOwner = Nothing + , _chaKey = Nothing + , _chaCategoryId = Nothing + , _chaId = Nothing + , _chaMySubscribers = Nothing + , _chaPageToken = Nothing + , _chaOauthToken = Nothing + , _chaManagedByMe = Nothing + , _chaMaxResults = 5 + , _chaFields = Nothing + , _chaAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +chaQuotaUser :: Lens' ChannelsList' (Maybe Text) +chaQuotaUser + = lens _chaQuotaUser (\ s a -> s{_chaQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- channel resource properties that the API response will include. If the +-- parameter identifies a property that contains child properties, the +-- child properties will be included in the response. For example, in a +-- channel resource, the contentDetails property contains other properties, +-- such as the uploads properties. As such, if you set part=contentDetails, +-- the API response will also contain all of those nested properties. +chaPart :: Lens' ChannelsList' Text +chaPart = lens _chaPart (\ s a -> s{_chaPart = a}) + +-- | Returns response with indentations and line breaks. +chaPrettyPrint :: Lens' ChannelsList' Bool +chaPrettyPrint + = lens _chaPrettyPrint + (\ s a -> s{_chaPrettyPrint = a}) + +-- | Set this parameter\'s value to true to instruct the API to only return +-- channels owned by the authenticated user. +chaMine :: Lens' ChannelsList' (Maybe Bool) +chaMine = lens _chaMine (\ s a -> s{_chaMine = a}) + +-- | The forUsername parameter specifies a YouTube username, thereby +-- requesting the channel associated with that username. +chaForUsername :: Lens' ChannelsList' (Maybe Text) +chaForUsername + = lens _chaForUsername + (\ s a -> s{_chaForUsername = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +chaUserIp :: Lens' ChannelsList' (Maybe Text) +chaUserIp + = lens _chaUserIp (\ s a -> s{_chaUserIp = a}) + +-- | The hl parameter should be used for filter out the properties that are +-- not in the given language. Used for the brandingSettings part. +chaHl :: Lens' ChannelsList' (Maybe Text) +chaHl = lens _chaHl (\ s a -> s{_chaHl = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +chaOnBehalfOfContentOwner :: Lens' ChannelsList' (Maybe Text) +chaOnBehalfOfContentOwner + = lens _chaOnBehalfOfContentOwner + (\ s a -> s{_chaOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +chaKey :: Lens' ChannelsList' (Maybe Text) +chaKey = lens _chaKey (\ s a -> s{_chaKey = a}) + +-- | The categoryId parameter specifies a YouTube guide category, thereby +-- requesting YouTube channels associated with that category. +chaCategoryId :: Lens' ChannelsList' (Maybe Text) +chaCategoryId + = lens _chaCategoryId + (\ s a -> s{_chaCategoryId = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube channel +-- ID(s) for the resource(s) that are being retrieved. In a channel +-- resource, the id property specifies the channel\'s YouTube channel ID. +chaId :: Lens' ChannelsList' (Maybe Text) +chaId = lens _chaId (\ s a -> s{_chaId = a}) + +-- | Use the subscriptions.list method and its mySubscribers parameter to +-- retrieve a list of subscribers to the authenticated user\'s channel. +chaMySubscribers :: Lens' ChannelsList' (Maybe Bool) +chaMySubscribers + = lens _chaMySubscribers + (\ s a -> s{_chaMySubscribers = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +chaPageToken :: Lens' ChannelsList' (Maybe Text) +chaPageToken + = lens _chaPageToken (\ s a -> s{_chaPageToken = a}) + +-- | OAuth 2.0 token for the current user. +chaOauthToken :: Lens' ChannelsList' (Maybe Text) +chaOauthToken + = lens _chaOauthToken + (\ s a -> s{_chaOauthToken = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. Set this parameter\'s value to true to instruct the API to +-- only return channels managed by the content owner that the +-- onBehalfOfContentOwner parameter specifies. The user must be +-- authenticated as a CMS account linked to the specified content owner and +-- onBehalfOfContentOwner must be provided. +chaManagedByMe :: Lens' ChannelsList' (Maybe Bool) +chaManagedByMe + = lens _chaManagedByMe + (\ s a -> s{_chaManagedByMe = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +chaMaxResults :: Lens' ChannelsList' Word32 +chaMaxResults + = lens _chaMaxResults + (\ s a -> s{_chaMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +chaFields :: Lens' ChannelsList' (Maybe Text) +chaFields + = lens _chaFields (\ s a -> s{_chaFields = a}) + +-- | Data format for the response. +chaAlt :: Lens' ChannelsList' Text +chaAlt = lens _chaAlt (\ s a -> s{_chaAlt = a}) + +instance GoogleRequest ChannelsList' where + type Rs ChannelsList' = ChannelListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelsList{..} + = go _chaQuotaUser (Just _chaPart) _chaPrettyPrint + _chaMine + _chaForUsername + _chaUserIp + _chaHl + _chaOnBehalfOfContentOwner + _chaKey + _chaCategoryId + _chaId + _chaMySubscribers + _chaPageToken + _chaOauthToken + _chaManagedByMe + (Just _chaMaxResults) + _chaFields + _chaAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsListAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/Update.hs new file mode 100644 index 000000000..8891206f6 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/Update.hs @@ -0,0 +1,183 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Channels.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a channel\'s metadata. Note that this method currently only +-- supports updates to the channel resource\'s brandingSettings and +-- invideoPromotion objects and their child properties. +-- +-- /See:/ for @YouTubeChannelsUpdate@. +module YouTube.Channels.Update + ( + -- * REST Resource + ChannelsUpdateAPI + + -- * Creating a Request + , channelsUpdate + , ChannelsUpdate + + -- * Request Lenses + , cQuotaUser + , cPart + , cPrettyPrint + , cUserIp + , cOnBehalfOfContentOwner + , cKey + , cOauthToken + , cFields + , cAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeChannelsUpdate@ which the +-- 'ChannelsUpdate' request conforms to. +type ChannelsUpdateAPI = + "channels" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Put '[JSON] Channel + +-- | Updates a channel\'s metadata. Note that this method currently only +-- supports updates to the channel resource\'s brandingSettings and +-- invideoPromotion objects and their child properties. +-- +-- /See:/ 'channelsUpdate' smart constructor. +data ChannelsUpdate = ChannelsUpdate + { _cQuotaUser :: !(Maybe Text) + , _cPart :: !Text + , _cPrettyPrint :: !Bool + , _cUserIp :: !(Maybe Text) + , _cOnBehalfOfContentOwner :: !(Maybe Text) + , _cKey :: !(Maybe Text) + , _cOauthToken :: !(Maybe Text) + , _cFields :: !(Maybe Text) + , _cAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cQuotaUser' +-- +-- * 'cPart' +-- +-- * 'cPrettyPrint' +-- +-- * 'cUserIp' +-- +-- * 'cOnBehalfOfContentOwner' +-- +-- * 'cKey' +-- +-- * 'cOauthToken' +-- +-- * 'cFields' +-- +-- * 'cAlt' +channelsUpdate + :: Text -- ^ 'part' + -> ChannelsUpdate +channelsUpdate pCPart_ = + ChannelsUpdate + { _cQuotaUser = Nothing + , _cPart = pCPart_ + , _cPrettyPrint = True + , _cUserIp = Nothing + , _cOnBehalfOfContentOwner = Nothing + , _cKey = Nothing + , _cOauthToken = Nothing + , _cFields = Nothing + , _cAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cQuotaUser :: Lens' ChannelsUpdate' (Maybe Text) +cQuotaUser + = lens _cQuotaUser (\ s a -> s{_cQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The API currently only +-- allows the parameter value to be set to either brandingSettings or +-- invideoPromotion. (You cannot update both of those parts with a single +-- request.) Note that this method overrides the existing values for all of +-- the mutable properties that are contained in any parts that the +-- parameter value specifies. +cPart :: Lens' ChannelsUpdate' Text +cPart = lens _cPart (\ s a -> s{_cPart = a}) + +-- | Returns response with indentations and line breaks. +cPrettyPrint :: Lens' ChannelsUpdate' Bool +cPrettyPrint + = lens _cPrettyPrint (\ s a -> s{_cPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cUserIp :: Lens' ChannelsUpdate' (Maybe Text) +cUserIp = lens _cUserIp (\ s a -> s{_cUserIp = a}) + +-- | The onBehalfOfContentOwner parameter indicates that the authenticated +-- user is acting on behalf of the content owner specified in the parameter +-- value. This parameter is intended for YouTube content partners that own +-- and manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with needs +-- to be linked to the specified YouTube content owner. +cOnBehalfOfContentOwner :: Lens' ChannelsUpdate' (Maybe Text) +cOnBehalfOfContentOwner + = lens _cOnBehalfOfContentOwner + (\ s a -> s{_cOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cKey :: Lens' ChannelsUpdate' (Maybe Text) +cKey = lens _cKey (\ s a -> s{_cKey = a}) + +-- | OAuth 2.0 token for the current user. +cOauthToken :: Lens' ChannelsUpdate' (Maybe Text) +cOauthToken + = lens _cOauthToken (\ s a -> s{_cOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cFields :: Lens' ChannelsUpdate' (Maybe Text) +cFields = lens _cFields (\ s a -> s{_cFields = a}) + +-- | Data format for the response. +cAlt :: Lens' ChannelsUpdate' Text +cAlt = lens _cAlt (\ s a -> s{_cAlt = a}) + +instance GoogleRequest ChannelsUpdate' where + type Rs ChannelsUpdate' = Channel + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ChannelsUpdate{..} + = go _cQuotaUser (Just _cPart) _cPrettyPrint _cUserIp + _cOnBehalfOfContentOwner + _cKey + _cOauthToken + _cFields + _cAlt + where go + = clientWithRoute (Proxy :: Proxy ChannelsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Insert.hs new file mode 100644 index 000000000..d12ead7fe --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Insert.hs @@ -0,0 +1,161 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.CommentThreads.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a new top-level comment. To add a reply to an existing comment, +-- use the comments.insert method instead. +-- +-- /See:/ for @YouTubeCommentThreadsInsert@. +module YouTube.CommentThreads.Insert + ( + -- * REST Resource + CommentThreadsInsertAPI + + -- * Creating a Request + , commentThreadsInsert + , CommentThreadsInsert + + -- * Request Lenses + , ctiQuotaUser + , ctiPart + , ctiPrettyPrint + , ctiUserIp + , ctiKey + , ctiOauthToken + , ctiFields + , ctiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentThreadsInsert@ which the +-- 'CommentThreadsInsert' request conforms to. +type CommentThreadsInsertAPI = + "commentThreads" :> + QueryParam "part" Text :> Post '[JSON] CommentThread + +-- | Creates a new top-level comment. To add a reply to an existing comment, +-- use the comments.insert method instead. +-- +-- /See:/ 'commentThreadsInsert' smart constructor. +data CommentThreadsInsert = CommentThreadsInsert + { _ctiQuotaUser :: !(Maybe Text) + , _ctiPart :: !Text + , _ctiPrettyPrint :: !Bool + , _ctiUserIp :: !(Maybe Text) + , _ctiKey :: !(Maybe Text) + , _ctiOauthToken :: !(Maybe Text) + , _ctiFields :: !(Maybe Text) + , _ctiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctiQuotaUser' +-- +-- * 'ctiPart' +-- +-- * 'ctiPrettyPrint' +-- +-- * 'ctiUserIp' +-- +-- * 'ctiKey' +-- +-- * 'ctiOauthToken' +-- +-- * 'ctiFields' +-- +-- * 'ctiAlt' +commentThreadsInsert + :: Text -- ^ 'part' + -> CommentThreadsInsert +commentThreadsInsert pCtiPart_ = + CommentThreadsInsert + { _ctiQuotaUser = Nothing + , _ctiPart = pCtiPart_ + , _ctiPrettyPrint = True + , _ctiUserIp = Nothing + , _ctiKey = Nothing + , _ctiOauthToken = Nothing + , _ctiFields = Nothing + , _ctiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ctiQuotaUser :: Lens' CommentThreadsInsert' (Maybe Text) +ctiQuotaUser + = lens _ctiQuotaUser (\ s a -> s{_ctiQuotaUser = a}) + +-- | The part parameter identifies the properties that the API response will +-- include. Set the parameter value to snippet. The snippet part has a +-- quota cost of 2 units. +ctiPart :: Lens' CommentThreadsInsert' Text +ctiPart = lens _ctiPart (\ s a -> s{_ctiPart = a}) + +-- | Returns response with indentations and line breaks. +ctiPrettyPrint :: Lens' CommentThreadsInsert' Bool +ctiPrettyPrint + = lens _ctiPrettyPrint + (\ s a -> s{_ctiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ctiUserIp :: Lens' CommentThreadsInsert' (Maybe Text) +ctiUserIp + = lens _ctiUserIp (\ s a -> s{_ctiUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctiKey :: Lens' CommentThreadsInsert' (Maybe Text) +ctiKey = lens _ctiKey (\ s a -> s{_ctiKey = a}) + +-- | OAuth 2.0 token for the current user. +ctiOauthToken :: Lens' CommentThreadsInsert' (Maybe Text) +ctiOauthToken + = lens _ctiOauthToken + (\ s a -> s{_ctiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctiFields :: Lens' CommentThreadsInsert' (Maybe Text) +ctiFields + = lens _ctiFields (\ s a -> s{_ctiFields = a}) + +-- | Data format for the response. +ctiAlt :: Lens' CommentThreadsInsert' Text +ctiAlt = lens _ctiAlt (\ s a -> s{_ctiAlt = a}) + +instance GoogleRequest CommentThreadsInsert' where + type Rs CommentThreadsInsert' = CommentThread + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentThreadsInsert{..} + = go _ctiQuotaUser (Just _ctiPart) _ctiPrettyPrint + _ctiUserIp + _ctiKey + _ctiOauthToken + _ctiFields + _ctiAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentThreadsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/List.hs new file mode 100644 index 000000000..be3addbc6 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/List.hs @@ -0,0 +1,304 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.CommentThreads.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of comment threads that match the API request parameters. +-- +-- /See:/ for @YouTubeCommentThreadsList@. +module YouTube.CommentThreads.List + ( + -- * REST Resource + CommentThreadsListAPI + + -- * Creating a Request + , commentThreadsList + , CommentThreadsList + + -- * Request Lenses + , ctlQuotaUser + , ctlPart + , ctlPrettyPrint + , ctlModerationStatus + , ctlUserIp + , ctlSearchTerms + , ctlChannelId + , ctlAllThreadsRelatedToChannelId + , ctlVideoId + , ctlKey + , ctlId + , ctlPageToken + , ctlOauthToken + , ctlOrder + , ctlTextFormat + , ctlMaxResults + , ctlFields + , ctlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentThreadsList@ which the +-- 'CommentThreadsList' request conforms to. +type CommentThreadsListAPI = + "commentThreads" :> + QueryParam "part" Text :> + QueryParam "moderationStatus" Text :> + QueryParam "searchTerms" Text :> + QueryParam "channelId" Text :> + QueryParam "allThreadsRelatedToChannelId" Text :> + QueryParam "videoId" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "order" Text :> + QueryParam "textFormat" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] CommentThreadListResponse + +-- | Returns a list of comment threads that match the API request parameters. +-- +-- /See:/ 'commentThreadsList' smart constructor. +data CommentThreadsList = CommentThreadsList + { _ctlQuotaUser :: !(Maybe Text) + , _ctlPart :: !Text + , _ctlPrettyPrint :: !Bool + , _ctlModerationStatus :: !Text + , _ctlUserIp :: !(Maybe Text) + , _ctlSearchTerms :: !(Maybe Text) + , _ctlChannelId :: !(Maybe Text) + , _ctlAllThreadsRelatedToChannelId :: !(Maybe Text) + , _ctlVideoId :: !(Maybe Text) + , _ctlKey :: !(Maybe Text) + , _ctlId :: !(Maybe Text) + , _ctlPageToken :: !(Maybe Text) + , _ctlOauthToken :: !(Maybe Text) + , _ctlOrder :: !Text + , _ctlTextFormat :: !Text + , _ctlMaxResults :: !Word32 + , _ctlFields :: !(Maybe Text) + , _ctlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctlQuotaUser' +-- +-- * 'ctlPart' +-- +-- * 'ctlPrettyPrint' +-- +-- * 'ctlModerationStatus' +-- +-- * 'ctlUserIp' +-- +-- * 'ctlSearchTerms' +-- +-- * 'ctlChannelId' +-- +-- * 'ctlAllThreadsRelatedToChannelId' +-- +-- * 'ctlVideoId' +-- +-- * 'ctlKey' +-- +-- * 'ctlId' +-- +-- * 'ctlPageToken' +-- +-- * 'ctlOauthToken' +-- +-- * 'ctlOrder' +-- +-- * 'ctlTextFormat' +-- +-- * 'ctlMaxResults' +-- +-- * 'ctlFields' +-- +-- * 'ctlAlt' +commentThreadsList + :: Text -- ^ 'part' + -> CommentThreadsList +commentThreadsList pCtlPart_ = + CommentThreadsList + { _ctlQuotaUser = Nothing + , _ctlPart = pCtlPart_ + , _ctlPrettyPrint = True + , _ctlModerationStatus = "MODERATION_STATUS_PUBLISHED" + , _ctlUserIp = Nothing + , _ctlSearchTerms = Nothing + , _ctlChannelId = Nothing + , _ctlAllThreadsRelatedToChannelId = Nothing + , _ctlVideoId = Nothing + , _ctlKey = Nothing + , _ctlId = Nothing + , _ctlPageToken = Nothing + , _ctlOauthToken = Nothing + , _ctlOrder = "true" + , _ctlTextFormat = "FORMAT_HTML" + , _ctlMaxResults = 20 + , _ctlFields = Nothing + , _ctlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ctlQuotaUser :: Lens' CommentThreadsList' (Maybe Text) +ctlQuotaUser + = lens _ctlQuotaUser (\ s a -> s{_ctlQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- commentThread resource properties that the API response will include. +ctlPart :: Lens' CommentThreadsList' Text +ctlPart = lens _ctlPart (\ s a -> s{_ctlPart = a}) + +-- | Returns response with indentations and line breaks. +ctlPrettyPrint :: Lens' CommentThreadsList' Bool +ctlPrettyPrint + = lens _ctlPrettyPrint + (\ s a -> s{_ctlPrettyPrint = a}) + +-- | Set this parameter to limit the returned comment threads to a particular +-- moderation state. Note: This parameter is not supported for use in +-- conjunction with the id parameter. +ctlModerationStatus :: Lens' CommentThreadsList' Text +ctlModerationStatus + = lens _ctlModerationStatus + (\ s a -> s{_ctlModerationStatus = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ctlUserIp :: Lens' CommentThreadsList' (Maybe Text) +ctlUserIp + = lens _ctlUserIp (\ s a -> s{_ctlUserIp = a}) + +-- | The searchTerms parameter instructs the API to limit the API response to +-- only contain comments that contain the specified search terms. Note: +-- This parameter is not supported for use in conjunction with the id +-- parameter. +ctlSearchTerms :: Lens' CommentThreadsList' (Maybe Text) +ctlSearchTerms + = lens _ctlSearchTerms + (\ s a -> s{_ctlSearchTerms = a}) + +-- | The channelId parameter instructs the API to return comment threads +-- containing comments about the specified channel. (The response will not +-- include comments left on videos that the channel uploaded.) +ctlChannelId :: Lens' CommentThreadsList' (Maybe Text) +ctlChannelId + = lens _ctlChannelId (\ s a -> s{_ctlChannelId = a}) + +-- | The allThreadsRelatedToChannelId parameter instructs the API to return +-- all comment threads associated with the specified channel. The response +-- can include comments about the channel or about the channel\'s videos. +ctlAllThreadsRelatedToChannelId :: Lens' CommentThreadsList' (Maybe Text) +ctlAllThreadsRelatedToChannelId + = lens _ctlAllThreadsRelatedToChannelId + (\ s a -> s{_ctlAllThreadsRelatedToChannelId = a}) + +-- | The videoId parameter instructs the API to return comment threads +-- associated with the specified video ID. +ctlVideoId :: Lens' CommentThreadsList' (Maybe Text) +ctlVideoId + = lens _ctlVideoId (\ s a -> s{_ctlVideoId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctlKey :: Lens' CommentThreadsList' (Maybe Text) +ctlKey = lens _ctlKey (\ s a -> s{_ctlKey = a}) + +-- | The id parameter specifies a comma-separated list of comment thread IDs +-- for the resources that should be retrieved. +ctlId :: Lens' CommentThreadsList' (Maybe Text) +ctlId = lens _ctlId (\ s a -> s{_ctlId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken property +-- identifies the next page of the result that can be retrieved. Note: This +-- parameter is not supported for use in conjunction with the id parameter. +ctlPageToken :: Lens' CommentThreadsList' (Maybe Text) +ctlPageToken + = lens _ctlPageToken (\ s a -> s{_ctlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +ctlOauthToken :: Lens' CommentThreadsList' (Maybe Text) +ctlOauthToken + = lens _ctlOauthToken + (\ s a -> s{_ctlOauthToken = a}) + +-- | The order parameter specifies the order in which the API response should +-- list comment threads. Valid values are: - time - Comment threads are +-- ordered by time. This is the default behavior. - relevance - Comment +-- threads are ordered by relevance.Note: This parameter is not supported +-- for use in conjunction with the id parameter. +ctlOrder :: Lens' CommentThreadsList' Text +ctlOrder = lens _ctlOrder (\ s a -> s{_ctlOrder = a}) + +-- | Set this parameter\'s value to html or plainText to instruct the API to +-- return the comments left by users in html formatted or in plain text. +ctlTextFormat :: Lens' CommentThreadsList' Text +ctlTextFormat + = lens _ctlTextFormat + (\ s a -> s{_ctlTextFormat = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. Note: This parameter is not +-- supported for use in conjunction with the id parameter. +ctlMaxResults :: Lens' CommentThreadsList' Word32 +ctlMaxResults + = lens _ctlMaxResults + (\ s a -> s{_ctlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +ctlFields :: Lens' CommentThreadsList' (Maybe Text) +ctlFields + = lens _ctlFields (\ s a -> s{_ctlFields = a}) + +-- | Data format for the response. +ctlAlt :: Lens' CommentThreadsList' Text +ctlAlt = lens _ctlAlt (\ s a -> s{_ctlAlt = a}) + +instance GoogleRequest CommentThreadsList' where + type Rs CommentThreadsList' = + CommentThreadListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentThreadsList{..} + = go _ctlQuotaUser (Just _ctlPart) _ctlPrettyPrint + (Just _ctlModerationStatus) + _ctlUserIp + _ctlSearchTerms + _ctlChannelId + _ctlAllThreadsRelatedToChannelId + _ctlVideoId + _ctlKey + _ctlId + _ctlPageToken + _ctlOauthToken + (Just _ctlOrder) + (Just _ctlTextFormat) + (Just _ctlMaxResults) + _ctlFields + _ctlAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentThreadsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Update.hs new file mode 100644 index 000000000..28b76a48d --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/CommentThreads/Update.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.CommentThreads.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies the top-level comment in a comment thread. +-- +-- /See:/ for @YouTubeCommentThreadsUpdate@. +module YouTube.CommentThreads.Update + ( + -- * REST Resource + CommentThreadsUpdateAPI + + -- * Creating a Request + , commentThreadsUpdate + , CommentThreadsUpdate + + -- * Request Lenses + , ctuQuotaUser + , ctuPart + , ctuPrettyPrint + , ctuUserIp + , ctuKey + , ctuOauthToken + , ctuFields + , ctuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentThreadsUpdate@ which the +-- 'CommentThreadsUpdate' request conforms to. +type CommentThreadsUpdateAPI = + "commentThreads" :> + QueryParam "part" Text :> Put '[JSON] CommentThread + +-- | Modifies the top-level comment in a comment thread. +-- +-- /See:/ 'commentThreadsUpdate' smart constructor. +data CommentThreadsUpdate = CommentThreadsUpdate + { _ctuQuotaUser :: !(Maybe Text) + , _ctuPart :: !Text + , _ctuPrettyPrint :: !Bool + , _ctuUserIp :: !(Maybe Text) + , _ctuKey :: !(Maybe Text) + , _ctuOauthToken :: !(Maybe Text) + , _ctuFields :: !(Maybe Text) + , _ctuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctuQuotaUser' +-- +-- * 'ctuPart' +-- +-- * 'ctuPrettyPrint' +-- +-- * 'ctuUserIp' +-- +-- * 'ctuKey' +-- +-- * 'ctuOauthToken' +-- +-- * 'ctuFields' +-- +-- * 'ctuAlt' +commentThreadsUpdate + :: Text -- ^ 'part' + -> CommentThreadsUpdate +commentThreadsUpdate pCtuPart_ = + CommentThreadsUpdate + { _ctuQuotaUser = Nothing + , _ctuPart = pCtuPart_ + , _ctuPrettyPrint = True + , _ctuUserIp = Nothing + , _ctuKey = Nothing + , _ctuOauthToken = Nothing + , _ctuFields = Nothing + , _ctuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +ctuQuotaUser :: Lens' CommentThreadsUpdate' (Maybe Text) +ctuQuotaUser + = lens _ctuQuotaUser (\ s a -> s{_ctuQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of commentThread +-- resource properties that the API response will include. You must at +-- least include the snippet part in the parameter value since that part +-- contains all of the properties that the API request can update. +ctuPart :: Lens' CommentThreadsUpdate' Text +ctuPart = lens _ctuPart (\ s a -> s{_ctuPart = a}) + +-- | Returns response with indentations and line breaks. +ctuPrettyPrint :: Lens' CommentThreadsUpdate' Bool +ctuPrettyPrint + = lens _ctuPrettyPrint + (\ s a -> s{_ctuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +ctuUserIp :: Lens' CommentThreadsUpdate' (Maybe Text) +ctuUserIp + = lens _ctuUserIp (\ s a -> s{_ctuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +ctuKey :: Lens' CommentThreadsUpdate' (Maybe Text) +ctuKey = lens _ctuKey (\ s a -> s{_ctuKey = a}) + +-- | OAuth 2.0 token for the current user. +ctuOauthToken :: Lens' CommentThreadsUpdate' (Maybe Text) +ctuOauthToken + = lens _ctuOauthToken + (\ s a -> s{_ctuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +ctuFields :: Lens' CommentThreadsUpdate' (Maybe Text) +ctuFields + = lens _ctuFields (\ s a -> s{_ctuFields = a}) + +-- | Data format for the response. +ctuAlt :: Lens' CommentThreadsUpdate' Text +ctuAlt = lens _ctuAlt (\ s a -> s{_ctuAlt = a}) + +instance GoogleRequest CommentThreadsUpdate' where + type Rs CommentThreadsUpdate' = CommentThread + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentThreadsUpdate{..} + = go _ctuQuotaUser (Just _ctuPart) _ctuPrettyPrint + _ctuUserIp + _ctuKey + _ctuOauthToken + _ctuFields + _ctuAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentThreadsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Delete.hs new file mode 100644 index 000000000..cd17da32c --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Delete.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a comment. +-- +-- /See:/ for @YouTubeCommentsDelete@. +module YouTube.Comments.Delete + ( + -- * REST Resource + CommentsDeleteAPI + + -- * Creating a Request + , commentsDelete + , CommentsDelete + + -- * Request Lenses + , comoQuotaUser + , comoPrettyPrint + , comoUserIp + , comoKey + , comoId + , comoOauthToken + , comoFields + , comoAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsDelete@ which the +-- 'CommentsDelete' request conforms to. +type CommentsDeleteAPI = + "comments" :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a comment. +-- +-- /See:/ 'commentsDelete' smart constructor. +data CommentsDelete = CommentsDelete + { _comoQuotaUser :: !(Maybe Text) + , _comoPrettyPrint :: !Bool + , _comoUserIp :: !(Maybe Text) + , _comoKey :: !(Maybe Text) + , _comoId :: !Text + , _comoOauthToken :: !(Maybe Text) + , _comoFields :: !(Maybe Text) + , _comoAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comoQuotaUser' +-- +-- * 'comoPrettyPrint' +-- +-- * 'comoUserIp' +-- +-- * 'comoKey' +-- +-- * 'comoId' +-- +-- * 'comoOauthToken' +-- +-- * 'comoFields' +-- +-- * 'comoAlt' +commentsDelete + :: Text -- ^ 'id' + -> CommentsDelete +commentsDelete pComoId_ = + CommentsDelete + { _comoQuotaUser = Nothing + , _comoPrettyPrint = True + , _comoUserIp = Nothing + , _comoKey = Nothing + , _comoId = pComoId_ + , _comoOauthToken = Nothing + , _comoFields = Nothing + , _comoAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +comoQuotaUser :: Lens' CommentsDelete' (Maybe Text) +comoQuotaUser + = lens _comoQuotaUser + (\ s a -> s{_comoQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +comoPrettyPrint :: Lens' CommentsDelete' Bool +comoPrettyPrint + = lens _comoPrettyPrint + (\ s a -> s{_comoPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +comoUserIp :: Lens' CommentsDelete' (Maybe Text) +comoUserIp + = lens _comoUserIp (\ s a -> s{_comoUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +comoKey :: Lens' CommentsDelete' (Maybe Text) +comoKey = lens _comoKey (\ s a -> s{_comoKey = a}) + +-- | The id parameter specifies the comment ID for the resource that is being +-- deleted. +comoId :: Lens' CommentsDelete' Text +comoId = lens _comoId (\ s a -> s{_comoId = a}) + +-- | OAuth 2.0 token for the current user. +comoOauthToken :: Lens' CommentsDelete' (Maybe Text) +comoOauthToken + = lens _comoOauthToken + (\ s a -> s{_comoOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +comoFields :: Lens' CommentsDelete' (Maybe Text) +comoFields + = lens _comoFields (\ s a -> s{_comoFields = a}) + +-- | Data format for the response. +comoAlt :: Lens' CommentsDelete' Text +comoAlt = lens _comoAlt (\ s a -> s{_comoAlt = a}) + +instance GoogleRequest CommentsDelete' where + type Rs CommentsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsDelete{..} + = go _comoQuotaUser _comoPrettyPrint _comoUserIp + _comoKey + (Just _comoId) + _comoOauthToken + _comoFields + _comoAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Insert.hs new file mode 100644 index 000000000..66a9e3419 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Insert.hs @@ -0,0 +1,160 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a reply to an existing comment. Note: To create a top-level +-- comment, use the commentThreads.insert method. +-- +-- /See:/ for @YouTubeCommentsInsert@. +module YouTube.Comments.Insert + ( + -- * REST Resource + CommentsInsertAPI + + -- * Creating a Request + , commentsInsert + , CommentsInsert + + -- * Request Lenses + , comQuotaUser + , comPart + , comPrettyPrint + , comUserIp + , comKey + , comOauthToken + , comFields + , comAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsInsert@ which the +-- 'CommentsInsert' request conforms to. +type CommentsInsertAPI = + "comments" :> + QueryParam "part" Text :> Post '[JSON] Comment + +-- | Creates a reply to an existing comment. Note: To create a top-level +-- comment, use the commentThreads.insert method. +-- +-- /See:/ 'commentsInsert' smart constructor. +data CommentsInsert = CommentsInsert + { _comQuotaUser :: !(Maybe Text) + , _comPart :: !Text + , _comPrettyPrint :: !Bool + , _comUserIp :: !(Maybe Text) + , _comKey :: !(Maybe Text) + , _comOauthToken :: !(Maybe Text) + , _comFields :: !(Maybe Text) + , _comAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comQuotaUser' +-- +-- * 'comPart' +-- +-- * 'comPrettyPrint' +-- +-- * 'comUserIp' +-- +-- * 'comKey' +-- +-- * 'comOauthToken' +-- +-- * 'comFields' +-- +-- * 'comAlt' +commentsInsert + :: Text -- ^ 'part' + -> CommentsInsert +commentsInsert pComPart_ = + CommentsInsert + { _comQuotaUser = Nothing + , _comPart = pComPart_ + , _comPrettyPrint = True + , _comUserIp = Nothing + , _comKey = Nothing + , _comOauthToken = Nothing + , _comFields = Nothing + , _comAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +comQuotaUser :: Lens' CommentsInsert' (Maybe Text) +comQuotaUser + = lens _comQuotaUser (\ s a -> s{_comQuotaUser = a}) + +-- | The part parameter identifies the properties that the API response will +-- include. Set the parameter value to snippet. The snippet part has a +-- quota cost of 2 units. +comPart :: Lens' CommentsInsert' Text +comPart = lens _comPart (\ s a -> s{_comPart = a}) + +-- | Returns response with indentations and line breaks. +comPrettyPrint :: Lens' CommentsInsert' Bool +comPrettyPrint + = lens _comPrettyPrint + (\ s a -> s{_comPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +comUserIp :: Lens' CommentsInsert' (Maybe Text) +comUserIp + = lens _comUserIp (\ s a -> s{_comUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +comKey :: Lens' CommentsInsert' (Maybe Text) +comKey = lens _comKey (\ s a -> s{_comKey = a}) + +-- | OAuth 2.0 token for the current user. +comOauthToken :: Lens' CommentsInsert' (Maybe Text) +comOauthToken + = lens _comOauthToken + (\ s a -> s{_comOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +comFields :: Lens' CommentsInsert' (Maybe Text) +comFields + = lens _comFields (\ s a -> s{_comFields = a}) + +-- | Data format for the response. +comAlt :: Lens' CommentsInsert' Text +comAlt = lens _comAlt (\ s a -> s{_comAlt = a}) + +instance GoogleRequest CommentsInsert' where + type Rs CommentsInsert' = Comment + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsInsert{..} + = go _comQuotaUser (Just _comPart) _comPrettyPrint + _comUserIp + _comKey + _comOauthToken + _comFields + _comAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/List.hs new file mode 100644 index 000000000..905ae854f --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/List.hs @@ -0,0 +1,229 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of comments that match the API request parameters. +-- +-- /See:/ for @YouTubeCommentsList@. +module YouTube.Comments.List + ( + -- * REST Resource + CommentsListAPI + + -- * Creating a Request + , commentsList + , CommentsList + + -- * Request Lenses + , cllQuotaUser + , cllPart + , cllPrettyPrint + , cllUserIp + , cllKey + , cllId + , cllPageToken + , cllOauthToken + , cllTextFormat + , cllMaxResults + , cllParentId + , cllFields + , cllAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsList@ which the +-- 'CommentsList' request conforms to. +type CommentsListAPI = + "comments" :> + QueryParam "part" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "textFormat" Text :> + QueryParam "maxResults" Word32 :> + QueryParam "parentId" Text :> + Get '[JSON] CommentListResponse + +-- | Returns a list of comments that match the API request parameters. +-- +-- /See:/ 'commentsList' smart constructor. +data CommentsList = CommentsList + { _cllQuotaUser :: !(Maybe Text) + , _cllPart :: !Text + , _cllPrettyPrint :: !Bool + , _cllUserIp :: !(Maybe Text) + , _cllKey :: !(Maybe Text) + , _cllId :: !(Maybe Text) + , _cllPageToken :: !(Maybe Text) + , _cllOauthToken :: !(Maybe Text) + , _cllTextFormat :: !Text + , _cllMaxResults :: !Word32 + , _cllParentId :: !(Maybe Text) + , _cllFields :: !(Maybe Text) + , _cllAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cllQuotaUser' +-- +-- * 'cllPart' +-- +-- * 'cllPrettyPrint' +-- +-- * 'cllUserIp' +-- +-- * 'cllKey' +-- +-- * 'cllId' +-- +-- * 'cllPageToken' +-- +-- * 'cllOauthToken' +-- +-- * 'cllTextFormat' +-- +-- * 'cllMaxResults' +-- +-- * 'cllParentId' +-- +-- * 'cllFields' +-- +-- * 'cllAlt' +commentsList + :: Text -- ^ 'part' + -> CommentsList +commentsList pCllPart_ = + CommentsList + { _cllQuotaUser = Nothing + , _cllPart = pCllPart_ + , _cllPrettyPrint = True + , _cllUserIp = Nothing + , _cllKey = Nothing + , _cllId = Nothing + , _cllPageToken = Nothing + , _cllOauthToken = Nothing + , _cllTextFormat = "FORMAT_HTML" + , _cllMaxResults = 20 + , _cllParentId = Nothing + , _cllFields = Nothing + , _cllAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cllQuotaUser :: Lens' CommentsList' (Maybe Text) +cllQuotaUser + = lens _cllQuotaUser (\ s a -> s{_cllQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- comment resource properties that the API response will include. +cllPart :: Lens' CommentsList' Text +cllPart = lens _cllPart (\ s a -> s{_cllPart = a}) + +-- | Returns response with indentations and line breaks. +cllPrettyPrint :: Lens' CommentsList' Bool +cllPrettyPrint + = lens _cllPrettyPrint + (\ s a -> s{_cllPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cllUserIp :: Lens' CommentsList' (Maybe Text) +cllUserIp + = lens _cllUserIp (\ s a -> s{_cllUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cllKey :: Lens' CommentsList' (Maybe Text) +cllKey = lens _cllKey (\ s a -> s{_cllKey = a}) + +-- | The id parameter specifies a comma-separated list of comment IDs for the +-- resources that are being retrieved. In a comment resource, the id +-- property specifies the comment\'s ID. +cllId :: Lens' CommentsList' (Maybe Text) +cllId = lens _cllId (\ s a -> s{_cllId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken property +-- identifies the next page of the result that can be retrieved. Note: This +-- parameter is not supported for use in conjunction with the id parameter. +cllPageToken :: Lens' CommentsList' (Maybe Text) +cllPageToken + = lens _cllPageToken (\ s a -> s{_cllPageToken = a}) + +-- | OAuth 2.0 token for the current user. +cllOauthToken :: Lens' CommentsList' (Maybe Text) +cllOauthToken + = lens _cllOauthToken + (\ s a -> s{_cllOauthToken = a}) + +-- | This parameter indicates whether the API should return comments +-- formatted as HTML or as plain text. +cllTextFormat :: Lens' CommentsList' Text +cllTextFormat + = lens _cllTextFormat + (\ s a -> s{_cllTextFormat = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. Note: This parameter is not +-- supported for use in conjunction with the id parameter. +cllMaxResults :: Lens' CommentsList' Word32 +cllMaxResults + = lens _cllMaxResults + (\ s a -> s{_cllMaxResults = a}) + +-- | The parentId parameter specifies the ID of the comment for which replies +-- should be retrieved. Note: YouTube currently supports replies only for +-- top-level comments. However, replies to replies may be supported in the +-- future. +cllParentId :: Lens' CommentsList' (Maybe Text) +cllParentId + = lens _cllParentId (\ s a -> s{_cllParentId = a}) + +-- | Selector specifying which fields to include in a partial response. +cllFields :: Lens' CommentsList' (Maybe Text) +cllFields + = lens _cllFields (\ s a -> s{_cllFields = a}) + +-- | Data format for the response. +cllAlt :: Lens' CommentsList' Text +cllAlt = lens _cllAlt (\ s a -> s{_cllAlt = a}) + +instance GoogleRequest CommentsList' where + type Rs CommentsList' = CommentListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsList{..} + = go _cllQuotaUser (Just _cllPart) _cllPrettyPrint + _cllUserIp + _cllKey + _cllId + _cllPageToken + _cllOauthToken + (Just _cllTextFormat) + (Just _cllMaxResults) + _cllParentId + _cllFields + _cllAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsListAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/MarkAsSpam.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/MarkAsSpam.hs new file mode 100644 index 000000000..3129b2eee --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/MarkAsSpam.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.MarkAsSpam +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Expresses the caller\'s opinion that one or more comments should be +-- flagged as spam. +-- +-- /See:/ for @YouTubeCommentsMarkAsSpam@. +module YouTube.Comments.MarkAsSpam + ( + -- * REST Resource + CommentsMarkAsSpamAPI + + -- * Creating a Request + , commentsMarkAsSpam + , CommentsMarkAsSpam + + -- * Request Lenses + , cmasQuotaUser + , cmasPrettyPrint + , cmasUserIp + , cmasKey + , cmasId + , cmasOauthToken + , cmasFields + , cmasAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsMarkAsSpam@ which the +-- 'CommentsMarkAsSpam' request conforms to. +type CommentsMarkAsSpamAPI = + "comments" :> + "markAsSpam" :> + QueryParam "id" Text :> Post '[JSON] () + +-- | Expresses the caller\'s opinion that one or more comments should be +-- flagged as spam. +-- +-- /See:/ 'commentsMarkAsSpam' smart constructor. +data CommentsMarkAsSpam = CommentsMarkAsSpam + { _cmasQuotaUser :: !(Maybe Text) + , _cmasPrettyPrint :: !Bool + , _cmasUserIp :: !(Maybe Text) + , _cmasKey :: !(Maybe Text) + , _cmasId :: !Text + , _cmasOauthToken :: !(Maybe Text) + , _cmasFields :: !(Maybe Text) + , _cmasAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsMarkAsSpam'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cmasQuotaUser' +-- +-- * 'cmasPrettyPrint' +-- +-- * 'cmasUserIp' +-- +-- * 'cmasKey' +-- +-- * 'cmasId' +-- +-- * 'cmasOauthToken' +-- +-- * 'cmasFields' +-- +-- * 'cmasAlt' +commentsMarkAsSpam + :: Text -- ^ 'id' + -> CommentsMarkAsSpam +commentsMarkAsSpam pCmasId_ = + CommentsMarkAsSpam + { _cmasQuotaUser = Nothing + , _cmasPrettyPrint = True + , _cmasUserIp = Nothing + , _cmasKey = Nothing + , _cmasId = pCmasId_ + , _cmasOauthToken = Nothing + , _cmasFields = Nothing + , _cmasAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cmasQuotaUser :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasQuotaUser + = lens _cmasQuotaUser + (\ s a -> s{_cmasQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +cmasPrettyPrint :: Lens' CommentsMarkAsSpam' Bool +cmasPrettyPrint + = lens _cmasPrettyPrint + (\ s a -> s{_cmasPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cmasUserIp :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasUserIp + = lens _cmasUserIp (\ s a -> s{_cmasUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cmasKey :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasKey = lens _cmasKey (\ s a -> s{_cmasKey = a}) + +-- | The id parameter specifies a comma-separated list of IDs of comments +-- that the caller believes should be classified as spam. +cmasId :: Lens' CommentsMarkAsSpam' Text +cmasId = lens _cmasId (\ s a -> s{_cmasId = a}) + +-- | OAuth 2.0 token for the current user. +cmasOauthToken :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasOauthToken + = lens _cmasOauthToken + (\ s a -> s{_cmasOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cmasFields :: Lens' CommentsMarkAsSpam' (Maybe Text) +cmasFields + = lens _cmasFields (\ s a -> s{_cmasFields = a}) + +-- | Data format for the response. +cmasAlt :: Lens' CommentsMarkAsSpam' Text +cmasAlt = lens _cmasAlt (\ s a -> s{_cmasAlt = a}) + +instance GoogleRequest CommentsMarkAsSpam' where + type Rs CommentsMarkAsSpam' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsMarkAsSpam{..} + = go _cmasQuotaUser _cmasPrettyPrint _cmasUserIp + _cmasKey + (Just _cmasId) + _cmasOauthToken + _cmasFields + _cmasAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentsMarkAsSpamAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs new file mode 100644 index 000000000..5e79290fc --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs @@ -0,0 +1,196 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.SetModerationStatus +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Sets the moderation status of one or more comments. The API request must +-- be authorized by the owner of the channel or video associated with the +-- comments. +-- +-- /See:/ for @YouTubeCommentsSetModerationStatus@. +module YouTube.Comments.SetModerationStatus + ( + -- * REST Resource + CommentsSetModerationStatusAPI + + -- * Creating a Request + , commentsSetModerationStatus + , CommentsSetModerationStatus + + -- * Request Lenses + , csmsQuotaUser + , csmsPrettyPrint + , csmsBanAuthor + , csmsModerationStatus + , csmsUserIp + , csmsKey + , csmsId + , csmsOauthToken + , csmsFields + , csmsAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsSetModerationStatus@ which the +-- 'CommentsSetModerationStatus' request conforms to. +type CommentsSetModerationStatusAPI = + "comments" :> + "setModerationStatus" :> + QueryParam "banAuthor" Bool :> + QueryParam "moderationStatus" Text :> + QueryParam "id" Text :> Post '[JSON] () + +-- | Sets the moderation status of one or more comments. The API request must +-- be authorized by the owner of the channel or video associated with the +-- comments. +-- +-- /See:/ 'commentsSetModerationStatus' smart constructor. +data CommentsSetModerationStatus = CommentsSetModerationStatus + { _csmsQuotaUser :: !(Maybe Text) + , _csmsPrettyPrint :: !Bool + , _csmsBanAuthor :: !Bool + , _csmsModerationStatus :: !Text + , _csmsUserIp :: !(Maybe Text) + , _csmsKey :: !(Maybe Text) + , _csmsId :: !Text + , _csmsOauthToken :: !(Maybe Text) + , _csmsFields :: !(Maybe Text) + , _csmsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsSetModerationStatus'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csmsQuotaUser' +-- +-- * 'csmsPrettyPrint' +-- +-- * 'csmsBanAuthor' +-- +-- * 'csmsModerationStatus' +-- +-- * 'csmsUserIp' +-- +-- * 'csmsKey' +-- +-- * 'csmsId' +-- +-- * 'csmsOauthToken' +-- +-- * 'csmsFields' +-- +-- * 'csmsAlt' +commentsSetModerationStatus + :: Text -- ^ 'moderationStatus' + -> Text -- ^ 'id' + -> CommentsSetModerationStatus +commentsSetModerationStatus pCsmsModerationStatus_ pCsmsId_ = + CommentsSetModerationStatus + { _csmsQuotaUser = Nothing + , _csmsPrettyPrint = True + , _csmsBanAuthor = False + , _csmsModerationStatus = pCsmsModerationStatus_ + , _csmsUserIp = Nothing + , _csmsKey = Nothing + , _csmsId = pCsmsId_ + , _csmsOauthToken = Nothing + , _csmsFields = Nothing + , _csmsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +csmsQuotaUser :: Lens' CommentsSetModerationStatus' (Maybe Text) +csmsQuotaUser + = lens _csmsQuotaUser + (\ s a -> s{_csmsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +csmsPrettyPrint :: Lens' CommentsSetModerationStatus' Bool +csmsPrettyPrint + = lens _csmsPrettyPrint + (\ s a -> s{_csmsPrettyPrint = a}) + +-- | The banAuthor parameter lets you indicate that you want to automatically +-- reject any additional comments written by the comment\'s author. Set the +-- parameter value to true to ban the author. Note: This parameter is only +-- valid if the moderationStatus parameter is also set to rejected. +csmsBanAuthor :: Lens' CommentsSetModerationStatus' Bool +csmsBanAuthor + = lens _csmsBanAuthor + (\ s a -> s{_csmsBanAuthor = a}) + +-- | Identifies the new moderation status of the specified comments. +csmsModerationStatus :: Lens' CommentsSetModerationStatus' Text +csmsModerationStatus + = lens _csmsModerationStatus + (\ s a -> s{_csmsModerationStatus = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +csmsUserIp :: Lens' CommentsSetModerationStatus' (Maybe Text) +csmsUserIp + = lens _csmsUserIp (\ s a -> s{_csmsUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +csmsKey :: Lens' CommentsSetModerationStatus' (Maybe Text) +csmsKey = lens _csmsKey (\ s a -> s{_csmsKey = a}) + +-- | The id parameter specifies a comma-separated list of IDs that identify +-- the comments for which you are updating the moderation status. +csmsId :: Lens' CommentsSetModerationStatus' Text +csmsId = lens _csmsId (\ s a -> s{_csmsId = a}) + +-- | OAuth 2.0 token for the current user. +csmsOauthToken :: Lens' CommentsSetModerationStatus' (Maybe Text) +csmsOauthToken + = lens _csmsOauthToken + (\ s a -> s{_csmsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +csmsFields :: Lens' CommentsSetModerationStatus' (Maybe Text) +csmsFields + = lens _csmsFields (\ s a -> s{_csmsFields = a}) + +-- | Data format for the response. +csmsAlt :: Lens' CommentsSetModerationStatus' Text +csmsAlt = lens _csmsAlt (\ s a -> s{_csmsAlt = a}) + +instance GoogleRequest CommentsSetModerationStatus' + where + type Rs CommentsSetModerationStatus' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsSetModerationStatus{..} + = go _csmsQuotaUser _csmsPrettyPrint + (Just _csmsBanAuthor) + (Just _csmsModerationStatus) + _csmsUserIp + _csmsKey + (Just _csmsId) + _csmsOauthToken + _csmsFields + _csmsAlt + where go + = clientWithRoute + (Proxy :: Proxy CommentsSetModerationStatusAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Update.hs new file mode 100644 index 000000000..eafa6a3f1 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Update.hs @@ -0,0 +1,159 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Comments.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies a comment. +-- +-- /See:/ for @YouTubeCommentsUpdate@. +module YouTube.Comments.Update + ( + -- * REST Resource + CommentsUpdateAPI + + -- * Creating a Request + , commentsUpdate + , CommentsUpdate + + -- * Request Lenses + , cuuQuotaUser + , cuuPart + , cuuPrettyPrint + , cuuUserIp + , cuuKey + , cuuOauthToken + , cuuFields + , cuuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeCommentsUpdate@ which the +-- 'CommentsUpdate' request conforms to. +type CommentsUpdateAPI = + "comments" :> + QueryParam "part" Text :> Put '[JSON] Comment + +-- | Modifies a comment. +-- +-- /See:/ 'commentsUpdate' smart constructor. +data CommentsUpdate = CommentsUpdate + { _cuuQuotaUser :: !(Maybe Text) + , _cuuPart :: !Text + , _cuuPrettyPrint :: !Bool + , _cuuUserIp :: !(Maybe Text) + , _cuuKey :: !(Maybe Text) + , _cuuOauthToken :: !(Maybe Text) + , _cuuFields :: !(Maybe Text) + , _cuuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cuuQuotaUser' +-- +-- * 'cuuPart' +-- +-- * 'cuuPrettyPrint' +-- +-- * 'cuuUserIp' +-- +-- * 'cuuKey' +-- +-- * 'cuuOauthToken' +-- +-- * 'cuuFields' +-- +-- * 'cuuAlt' +commentsUpdate + :: Text -- ^ 'part' + -> CommentsUpdate +commentsUpdate pCuuPart_ = + CommentsUpdate + { _cuuQuotaUser = Nothing + , _cuuPart = pCuuPart_ + , _cuuPrettyPrint = True + , _cuuUserIp = Nothing + , _cuuKey = Nothing + , _cuuOauthToken = Nothing + , _cuuFields = Nothing + , _cuuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +cuuQuotaUser :: Lens' CommentsUpdate' (Maybe Text) +cuuQuotaUser + = lens _cuuQuotaUser (\ s a -> s{_cuuQuotaUser = a}) + +-- | The part parameter identifies the properties that the API response will +-- include. You must at least include the snippet part in the parameter +-- value since that part contains all of the properties that the API +-- request can update. +cuuPart :: Lens' CommentsUpdate' Text +cuuPart = lens _cuuPart (\ s a -> s{_cuuPart = a}) + +-- | Returns response with indentations and line breaks. +cuuPrettyPrint :: Lens' CommentsUpdate' Bool +cuuPrettyPrint + = lens _cuuPrettyPrint + (\ s a -> s{_cuuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +cuuUserIp :: Lens' CommentsUpdate' (Maybe Text) +cuuUserIp + = lens _cuuUserIp (\ s a -> s{_cuuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +cuuKey :: Lens' CommentsUpdate' (Maybe Text) +cuuKey = lens _cuuKey (\ s a -> s{_cuuKey = a}) + +-- | OAuth 2.0 token for the current user. +cuuOauthToken :: Lens' CommentsUpdate' (Maybe Text) +cuuOauthToken + = lens _cuuOauthToken + (\ s a -> s{_cuuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +cuuFields :: Lens' CommentsUpdate' (Maybe Text) +cuuFields + = lens _cuuFields (\ s a -> s{_cuuFields = a}) + +-- | Data format for the response. +cuuAlt :: Lens' CommentsUpdate' Text +cuuAlt = lens _cuuAlt (\ s a -> s{_cuuAlt = a}) + +instance GoogleRequest CommentsUpdate' where + type Rs CommentsUpdate' = Comment + request = requestWithRoute defReq youTubeURL + requestWithRoute r u CommentsUpdate{..} + = go _cuuQuotaUser (Just _cuuPart) _cuuPrettyPrint + _cuuUserIp + _cuuKey + _cuuOauthToken + _cuuFields + _cuuAlt + where go + = clientWithRoute (Proxy :: Proxy CommentsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/GuideCategories/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/GuideCategories/List.hs new file mode 100644 index 000000000..ab7c4e675 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/GuideCategories/List.hs @@ -0,0 +1,203 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.GuideCategories.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of categories that can be associated with YouTube +-- channels. +-- +-- /See:/ for @YouTubeGuideCategoriesList@. +module YouTube.GuideCategories.List + ( + -- * REST Resource + GuideCategoriesListAPI + + -- * Creating a Request + , guideCategoriesList + , GuideCategoriesList + + -- * Request Lenses + , gclQuotaUser + , gclPart + , gclPrettyPrint + , gclRegionCode + , gclUserIp + , gclHl + , gclKey + , gclId + , gclOauthToken + , gclFields + , gclAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeGuideCategoriesList@ which the +-- 'GuideCategoriesList' request conforms to. +type GuideCategoriesListAPI = + "guideCategories" :> + QueryParam "part" Text :> + QueryParam "regionCode" Text :> + QueryParam "hl" Text :> + QueryParam "id" Text :> + Get '[JSON] GuideCategoryListResponse + +-- | Returns a list of categories that can be associated with YouTube +-- channels. +-- +-- /See:/ 'guideCategoriesList' smart constructor. +data GuideCategoriesList = GuideCategoriesList + { _gclQuotaUser :: !(Maybe Text) + , _gclPart :: !Text + , _gclPrettyPrint :: !Bool + , _gclRegionCode :: !(Maybe Text) + , _gclUserIp :: !(Maybe Text) + , _gclHl :: !Text + , _gclKey :: !(Maybe Text) + , _gclId :: !(Maybe Text) + , _gclOauthToken :: !(Maybe Text) + , _gclFields :: !(Maybe Text) + , _gclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GuideCategoriesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gclQuotaUser' +-- +-- * 'gclPart' +-- +-- * 'gclPrettyPrint' +-- +-- * 'gclRegionCode' +-- +-- * 'gclUserIp' +-- +-- * 'gclHl' +-- +-- * 'gclKey' +-- +-- * 'gclId' +-- +-- * 'gclOauthToken' +-- +-- * 'gclFields' +-- +-- * 'gclAlt' +guideCategoriesList + :: Text -- ^ 'part' + -> GuideCategoriesList +guideCategoriesList pGclPart_ = + GuideCategoriesList + { _gclQuotaUser = Nothing + , _gclPart = pGclPart_ + , _gclPrettyPrint = True + , _gclRegionCode = Nothing + , _gclUserIp = Nothing + , _gclHl = "en-US" + , _gclKey = Nothing + , _gclId = Nothing + , _gclOauthToken = Nothing + , _gclFields = Nothing + , _gclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +gclQuotaUser :: Lens' GuideCategoriesList' (Maybe Text) +gclQuotaUser + = lens _gclQuotaUser (\ s a -> s{_gclQuotaUser = a}) + +-- | The part parameter specifies the guideCategory resource properties that +-- the API response will include. Set the parameter value to snippet. +gclPart :: Lens' GuideCategoriesList' Text +gclPart = lens _gclPart (\ s a -> s{_gclPart = a}) + +-- | Returns response with indentations and line breaks. +gclPrettyPrint :: Lens' GuideCategoriesList' Bool +gclPrettyPrint + = lens _gclPrettyPrint + (\ s a -> s{_gclPrettyPrint = a}) + +-- | The regionCode parameter instructs the API to return the list of guide +-- categories available in the specified country. The parameter value is an +-- ISO 3166-1 alpha-2 country code. +gclRegionCode :: Lens' GuideCategoriesList' (Maybe Text) +gclRegionCode + = lens _gclRegionCode + (\ s a -> s{_gclRegionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +gclUserIp :: Lens' GuideCategoriesList' (Maybe Text) +gclUserIp + = lens _gclUserIp (\ s a -> s{_gclUserIp = a}) + +-- | The hl parameter specifies the language that will be used for text +-- values in the API response. +gclHl :: Lens' GuideCategoriesList' Text +gclHl = lens _gclHl (\ s a -> s{_gclHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +gclKey :: Lens' GuideCategoriesList' (Maybe Text) +gclKey = lens _gclKey (\ s a -> s{_gclKey = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube channel +-- category ID(s) for the resource(s) that are being retrieved. In a +-- guideCategory resource, the id property specifies the YouTube channel +-- category ID. +gclId :: Lens' GuideCategoriesList' (Maybe Text) +gclId = lens _gclId (\ s a -> s{_gclId = a}) + +-- | OAuth 2.0 token for the current user. +gclOauthToken :: Lens' GuideCategoriesList' (Maybe Text) +gclOauthToken + = lens _gclOauthToken + (\ s a -> s{_gclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +gclFields :: Lens' GuideCategoriesList' (Maybe Text) +gclFields + = lens _gclFields (\ s a -> s{_gclFields = a}) + +-- | Data format for the response. +gclAlt :: Lens' GuideCategoriesList' Text +gclAlt = lens _gclAlt (\ s a -> s{_gclAlt = a}) + +instance GoogleRequest GuideCategoriesList' where + type Rs GuideCategoriesList' = + GuideCategoryListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u GuideCategoriesList{..} + = go _gclQuotaUser (Just _gclPart) _gclPrettyPrint + _gclRegionCode + _gclUserIp + (Just _gclHl) + _gclKey + _gclId + _gclOauthToken + _gclFields + _gclAlt + where go + = clientWithRoute + (Proxy :: Proxy GuideCategoriesListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nLanguages/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nLanguages/List.hs new file mode 100644 index 000000000..9edd0833a --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nLanguages/List.hs @@ -0,0 +1,173 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.I18nLanguages.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of application languages that the YouTube website +-- supports. +-- +-- /See:/ for @YouTubeI18nLanguagesList@. +module YouTube.I18nLanguages.List + ( + -- * REST Resource + I18nLanguagesListAPI + + -- * Creating a Request + , i18nLanguagesList + , I18nLanguagesList + + -- * Request Lenses + , illQuotaUser + , illPart + , illPrettyPrint + , illUserIp + , illHl + , illKey + , illOauthToken + , illFields + , illAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeI18nLanguagesList@ which the +-- 'I18nLanguagesList' request conforms to. +type I18nLanguagesListAPI = + "i18nLanguages" :> + QueryParam "part" Text :> + QueryParam "hl" Text :> + Get '[JSON] I18nLanguageListResponse + +-- | Returns a list of application languages that the YouTube website +-- supports. +-- +-- /See:/ 'i18nLanguagesList' smart constructor. +data I18nLanguagesList = I18nLanguagesList + { _illQuotaUser :: !(Maybe Text) + , _illPart :: !Text + , _illPrettyPrint :: !Bool + , _illUserIp :: !(Maybe Text) + , _illHl :: !Text + , _illKey :: !(Maybe Text) + , _illOauthToken :: !(Maybe Text) + , _illFields :: !(Maybe Text) + , _illAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nLanguagesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'illQuotaUser' +-- +-- * 'illPart' +-- +-- * 'illPrettyPrint' +-- +-- * 'illUserIp' +-- +-- * 'illHl' +-- +-- * 'illKey' +-- +-- * 'illOauthToken' +-- +-- * 'illFields' +-- +-- * 'illAlt' +i18nLanguagesList + :: Text -- ^ 'part' + -> I18nLanguagesList +i18nLanguagesList pIllPart_ = + I18nLanguagesList + { _illQuotaUser = Nothing + , _illPart = pIllPart_ + , _illPrettyPrint = True + , _illUserIp = Nothing + , _illHl = "en_US" + , _illKey = Nothing + , _illOauthToken = Nothing + , _illFields = Nothing + , _illAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +illQuotaUser :: Lens' I18nLanguagesList' (Maybe Text) +illQuotaUser + = lens _illQuotaUser (\ s a -> s{_illQuotaUser = a}) + +-- | The part parameter specifies the i18nLanguage resource properties that +-- the API response will include. Set the parameter value to snippet. +illPart :: Lens' I18nLanguagesList' Text +illPart = lens _illPart (\ s a -> s{_illPart = a}) + +-- | Returns response with indentations and line breaks. +illPrettyPrint :: Lens' I18nLanguagesList' Bool +illPrettyPrint + = lens _illPrettyPrint + (\ s a -> s{_illPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +illUserIp :: Lens' I18nLanguagesList' (Maybe Text) +illUserIp + = lens _illUserIp (\ s a -> s{_illUserIp = a}) + +-- | The hl parameter specifies the language that should be used for text +-- values in the API response. +illHl :: Lens' I18nLanguagesList' Text +illHl = lens _illHl (\ s a -> s{_illHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +illKey :: Lens' I18nLanguagesList' (Maybe Text) +illKey = lens _illKey (\ s a -> s{_illKey = a}) + +-- | OAuth 2.0 token for the current user. +illOauthToken :: Lens' I18nLanguagesList' (Maybe Text) +illOauthToken + = lens _illOauthToken + (\ s a -> s{_illOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +illFields :: Lens' I18nLanguagesList' (Maybe Text) +illFields + = lens _illFields (\ s a -> s{_illFields = a}) + +-- | Data format for the response. +illAlt :: Lens' I18nLanguagesList' Text +illAlt = lens _illAlt (\ s a -> s{_illAlt = a}) + +instance GoogleRequest I18nLanguagesList' where + type Rs I18nLanguagesList' = I18nLanguageListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u I18nLanguagesList{..} + = go _illQuotaUser (Just _illPart) _illPrettyPrint + _illUserIp + (Just _illHl) + _illKey + _illOauthToken + _illFields + _illAlt + where go + = clientWithRoute + (Proxy :: Proxy I18nLanguagesListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nRegions/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nRegions/List.hs new file mode 100644 index 000000000..fa518b484 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/I18nRegions/List.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.I18nRegions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of content regions that the YouTube website supports. +-- +-- /See:/ for @YouTubeI18nRegionsList@. +module YouTube.I18nRegions.List + ( + -- * REST Resource + I18nRegionsListAPI + + -- * Creating a Request + , i18nRegionsList + , I18nRegionsList + + -- * Request Lenses + , irlQuotaUser + , irlPart + , irlPrettyPrint + , irlUserIp + , irlHl + , irlKey + , irlOauthToken + , irlFields + , irlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeI18nRegionsList@ which the +-- 'I18nRegionsList' request conforms to. +type I18nRegionsListAPI = + "i18nRegions" :> + QueryParam "part" Text :> + QueryParam "hl" Text :> + Get '[JSON] I18nRegionListResponse + +-- | Returns a list of content regions that the YouTube website supports. +-- +-- /See:/ 'i18nRegionsList' smart constructor. +data I18nRegionsList = I18nRegionsList + { _irlQuotaUser :: !(Maybe Text) + , _irlPart :: !Text + , _irlPrettyPrint :: !Bool + , _irlUserIp :: !(Maybe Text) + , _irlHl :: !Text + , _irlKey :: !(Maybe Text) + , _irlOauthToken :: !(Maybe Text) + , _irlFields :: !(Maybe Text) + , _irlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nRegionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irlQuotaUser' +-- +-- * 'irlPart' +-- +-- * 'irlPrettyPrint' +-- +-- * 'irlUserIp' +-- +-- * 'irlHl' +-- +-- * 'irlKey' +-- +-- * 'irlOauthToken' +-- +-- * 'irlFields' +-- +-- * 'irlAlt' +i18nRegionsList + :: Text -- ^ 'part' + -> I18nRegionsList +i18nRegionsList pIrlPart_ = + I18nRegionsList + { _irlQuotaUser = Nothing + , _irlPart = pIrlPart_ + , _irlPrettyPrint = True + , _irlUserIp = Nothing + , _irlHl = "en_US" + , _irlKey = Nothing + , _irlOauthToken = Nothing + , _irlFields = Nothing + , _irlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +irlQuotaUser :: Lens' I18nRegionsList' (Maybe Text) +irlQuotaUser + = lens _irlQuotaUser (\ s a -> s{_irlQuotaUser = a}) + +-- | The part parameter specifies the i18nRegion resource properties that the +-- API response will include. Set the parameter value to snippet. +irlPart :: Lens' I18nRegionsList' Text +irlPart = lens _irlPart (\ s a -> s{_irlPart = a}) + +-- | Returns response with indentations and line breaks. +irlPrettyPrint :: Lens' I18nRegionsList' Bool +irlPrettyPrint + = lens _irlPrettyPrint + (\ s a -> s{_irlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +irlUserIp :: Lens' I18nRegionsList' (Maybe Text) +irlUserIp + = lens _irlUserIp (\ s a -> s{_irlUserIp = a}) + +-- | The hl parameter specifies the language that should be used for text +-- values in the API response. +irlHl :: Lens' I18nRegionsList' Text +irlHl = lens _irlHl (\ s a -> s{_irlHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +irlKey :: Lens' I18nRegionsList' (Maybe Text) +irlKey = lens _irlKey (\ s a -> s{_irlKey = a}) + +-- | OAuth 2.0 token for the current user. +irlOauthToken :: Lens' I18nRegionsList' (Maybe Text) +irlOauthToken + = lens _irlOauthToken + (\ s a -> s{_irlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +irlFields :: Lens' I18nRegionsList' (Maybe Text) +irlFields + = lens _irlFields (\ s a -> s{_irlFields = a}) + +-- | Data format for the response. +irlAlt :: Lens' I18nRegionsList' Text +irlAlt = lens _irlAlt (\ s a -> s{_irlAlt = a}) + +instance GoogleRequest I18nRegionsList' where + type Rs I18nRegionsList' = I18nRegionListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u I18nRegionsList{..} + = go _irlQuotaUser (Just _irlPart) _irlPrettyPrint + _irlUserIp + (Just _irlHl) + _irlKey + _irlOauthToken + _irlFields + _irlAlt + where go + = clientWithRoute (Proxy :: Proxy I18nRegionsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind.hs new file mode 100644 index 000000000..481b08f12 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind.hs @@ -0,0 +1,246 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Bind +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Binds a YouTube broadcast to a stream or removes an existing binding +-- between a broadcast and a stream. A broadcast can only be bound to one +-- video stream, though a video stream may be bound to more than one +-- broadcast. +-- +-- /See:/ for @YouTubeLiveBroadcastsBind@. +module YouTube.LiveBroadcasts.Bind + ( + -- * REST Resource + LiveBroadcastsBindAPI + + -- * Creating a Request + , liveBroadcastsBind + , LiveBroadcastsBind + + -- * Request Lenses + , lbbQuotaUser + , lbbPart + , lbbPrettyPrint + , lbbUserIp + , lbbOnBehalfOfContentOwner + , lbbKey + , lbbOnBehalfOfContentOwnerChannel + , lbbId + , lbbOauthToken + , lbbStreamId + , lbbFields + , lbbAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsBind@ which the +-- 'LiveBroadcastsBind' request conforms to. +type LiveBroadcastsBindAPI = + "liveBroadcasts" :> + "bind" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "streamId" Text :> + Post '[JSON] LiveBroadcast + +-- | Binds a YouTube broadcast to a stream or removes an existing binding +-- between a broadcast and a stream. A broadcast can only be bound to one +-- video stream, though a video stream may be bound to more than one +-- broadcast. +-- +-- /See:/ 'liveBroadcastsBind' smart constructor. +data LiveBroadcastsBind = LiveBroadcastsBind + { _lbbQuotaUser :: !(Maybe Text) + , _lbbPart :: !Text + , _lbbPrettyPrint :: !Bool + , _lbbUserIp :: !(Maybe Text) + , _lbbOnBehalfOfContentOwner :: !(Maybe Text) + , _lbbKey :: !(Maybe Text) + , _lbbOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbbId :: !Text + , _lbbOauthToken :: !(Maybe Text) + , _lbbStreamId :: !(Maybe Text) + , _lbbFields :: !(Maybe Text) + , _lbbAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsBind'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbbQuotaUser' +-- +-- * 'lbbPart' +-- +-- * 'lbbPrettyPrint' +-- +-- * 'lbbUserIp' +-- +-- * 'lbbOnBehalfOfContentOwner' +-- +-- * 'lbbKey' +-- +-- * 'lbbOnBehalfOfContentOwnerChannel' +-- +-- * 'lbbId' +-- +-- * 'lbbOauthToken' +-- +-- * 'lbbStreamId' +-- +-- * 'lbbFields' +-- +-- * 'lbbAlt' +liveBroadcastsBind + :: Text -- ^ 'part' + -> Text -- ^ 'id' + -> LiveBroadcastsBind +liveBroadcastsBind pLbbPart_ pLbbId_ = + LiveBroadcastsBind + { _lbbQuotaUser = Nothing + , _lbbPart = pLbbPart_ + , _lbbPrettyPrint = True + , _lbbUserIp = Nothing + , _lbbOnBehalfOfContentOwner = Nothing + , _lbbKey = Nothing + , _lbbOnBehalfOfContentOwnerChannel = Nothing + , _lbbId = pLbbId_ + , _lbbOauthToken = Nothing + , _lbbStreamId = Nothing + , _lbbFields = Nothing + , _lbbAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbbQuotaUser :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbQuotaUser + = lens _lbbQuotaUser (\ s a -> s{_lbbQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveBroadcast resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, contentDetails, and status. +lbbPart :: Lens' LiveBroadcastsBind' Text +lbbPart = lens _lbbPart (\ s a -> s{_lbbPart = a}) + +-- | Returns response with indentations and line breaks. +lbbPrettyPrint :: Lens' LiveBroadcastsBind' Bool +lbbPrettyPrint + = lens _lbbPrettyPrint + (\ s a -> s{_lbbPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbbUserIp :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbUserIp + = lens _lbbUserIp (\ s a -> s{_lbbUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbbOnBehalfOfContentOwner :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbOnBehalfOfContentOwner + = lens _lbbOnBehalfOfContentOwner + (\ s a -> s{_lbbOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbbKey :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbKey = lens _lbbKey (\ s a -> s{_lbbKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbbOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbOnBehalfOfContentOwnerChannel + = lens _lbbOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbbOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the unique ID of the broadcast that is being +-- bound to a video stream. +lbbId :: Lens' LiveBroadcastsBind' Text +lbbId = lens _lbbId (\ s a -> s{_lbbId = a}) + +-- | OAuth 2.0 token for the current user. +lbbOauthToken :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbOauthToken + = lens _lbbOauthToken + (\ s a -> s{_lbbOauthToken = a}) + +-- | The streamId parameter specifies the unique ID of the video stream that +-- is being bound to a broadcast. If this parameter is omitted, the API +-- will remove any existing binding between the broadcast and a video +-- stream. +lbbStreamId :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbStreamId + = lens _lbbStreamId (\ s a -> s{_lbbStreamId = a}) + +-- | Selector specifying which fields to include in a partial response. +lbbFields :: Lens' LiveBroadcastsBind' (Maybe Text) +lbbFields + = lens _lbbFields (\ s a -> s{_lbbFields = a}) + +-- | Data format for the response. +lbbAlt :: Lens' LiveBroadcastsBind' Text +lbbAlt = lens _lbbAlt (\ s a -> s{_lbbAlt = a}) + +instance GoogleRequest LiveBroadcastsBind' where + type Rs LiveBroadcastsBind' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsBind{..} + = go _lbbQuotaUser (Just _lbbPart) _lbbPrettyPrint + _lbbUserIp + _lbbOnBehalfOfContentOwner + _lbbKey + _lbbOnBehalfOfContentOwnerChannel + (Just _lbbId) + _lbbOauthToken + _lbbStreamId + _lbbFields + _lbbAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsBindAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind_direct.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind_direct.hs new file mode 100644 index 000000000..f8d2fbd01 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind_direct.hs @@ -0,0 +1,243 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Bind_direct +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Binds a YouTube broadcast to a stream or removes an existing binding +-- between a broadcast and a stream. A broadcast can only be bound to one +-- video stream, though a video stream may be bound to more than one +-- broadcast. +-- +-- /See:/ for @YouTubeLiveBroadcastsBind_direct@. +module YouTube.LiveBroadcasts.Bind_direct + ( + -- * REST Resource + LiveBroadcastsBind_directAPI + + -- * Creating a Request + , liveBroadcastsBindDirect + , LiveBroadcastsBindDirect + + -- * Request Lenses + , lQuotaUser + , lPart + , lPrettyPrint + , lUserIp + , lOnBehalfOfContentOwner + , lKey + , lOnBehalfOfContentOwnerChannel + , lId + , lOauthToken + , lStreamId + , lFields + , lAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsBind_direct@ which the +-- 'LiveBroadcastsBindDirect' request conforms to. +type LiveBroadcastsBind_directAPI = + "liveBroadcasts" :> + "bind" :> + "direct" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "streamId" Text :> + Post '[JSON] LiveBroadcast + +-- | Binds a YouTube broadcast to a stream or removes an existing binding +-- between a broadcast and a stream. A broadcast can only be bound to one +-- video stream, though a video stream may be bound to more than one +-- broadcast. +-- +-- /See:/ 'liveBroadcastsBindDirect' smart constructor. +data LiveBroadcastsBindDirect = LiveBroadcastsBindDirect + { _lQuotaUser :: !(Maybe Text) + , _lPart :: !Text + , _lPrettyPrint :: !Bool + , _lUserIp :: !(Maybe Text) + , _lOnBehalfOfContentOwner :: !(Maybe Text) + , _lKey :: !(Maybe Text) + , _lOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lId :: !Text + , _lOauthToken :: !(Maybe Text) + , _lStreamId :: !(Maybe Text) + , _lFields :: !(Maybe Text) + , _lAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsBind_direct'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lQuotaUser' +-- +-- * 'lPart' +-- +-- * 'lPrettyPrint' +-- +-- * 'lUserIp' +-- +-- * 'lOnBehalfOfContentOwner' +-- +-- * 'lKey' +-- +-- * 'lOnBehalfOfContentOwnerChannel' +-- +-- * 'lId' +-- +-- * 'lOauthToken' +-- +-- * 'lStreamId' +-- +-- * 'lFields' +-- +-- * 'lAlt' +liveBroadcastsBindDirect + :: Text -- ^ 'part' + -> Text -- ^ 'id' + -> LiveBroadcastsBindDirect +liveBroadcastsBindDirect pLPart_ pLId_ = + LiveBroadcastsBindDirect + { _lQuotaUser = Nothing + , _lPart = pLPart_ + , _lPrettyPrint = True + , _lUserIp = Nothing + , _lOnBehalfOfContentOwner = Nothing + , _lKey = Nothing + , _lOnBehalfOfContentOwnerChannel = Nothing + , _lId = pLId_ + , _lOauthToken = Nothing + , _lStreamId = Nothing + , _lFields = Nothing + , _lAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lQuotaUser :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lQuotaUser + = lens _lQuotaUser (\ s a -> s{_lQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveBroadcast resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, contentDetails, and status. +lPart :: Lens' LiveBroadcastsBind_direct' Text +lPart = lens _lPart (\ s a -> s{_lPart = a}) + +-- | Returns response with indentations and line breaks. +lPrettyPrint :: Lens' LiveBroadcastsBind_direct' Bool +lPrettyPrint + = lens _lPrettyPrint (\ s a -> s{_lPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lUserIp :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lUserIp = lens _lUserIp (\ s a -> s{_lUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lOnBehalfOfContentOwner :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lOnBehalfOfContentOwner + = lens _lOnBehalfOfContentOwner + (\ s a -> s{_lOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lKey :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lKey = lens _lKey (\ s a -> s{_lKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lOnBehalfOfContentOwnerChannel + = lens _lOnBehalfOfContentOwnerChannel + (\ s a -> s{_lOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the unique ID of the broadcast that is being +-- bound to a video stream. +lId :: Lens' LiveBroadcastsBind_direct' Text +lId = lens _lId (\ s a -> s{_lId = a}) + +-- | OAuth 2.0 token for the current user. +lOauthToken :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lOauthToken + = lens _lOauthToken (\ s a -> s{_lOauthToken = a}) + +-- | The streamId parameter specifies the unique ID of the video stream that +-- is being bound to a broadcast. If this parameter is omitted, the API +-- will remove any existing binding between the broadcast and a video +-- stream. +lStreamId :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lStreamId + = lens _lStreamId (\ s a -> s{_lStreamId = a}) + +-- | Selector specifying which fields to include in a partial response. +lFields :: Lens' LiveBroadcastsBind_direct' (Maybe Text) +lFields = lens _lFields (\ s a -> s{_lFields = a}) + +-- | Data format for the response. +lAlt :: Lens' LiveBroadcastsBind_direct' Text +lAlt = lens _lAlt (\ s a -> s{_lAlt = a}) + +instance GoogleRequest LiveBroadcastsBind_direct' + where + type Rs LiveBroadcastsBind_direct' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsBindDirect{..} + = go _lQuotaUser (Just _lPart) _lPrettyPrint _lUserIp + _lOnBehalfOfContentOwner + _lKey + _lOnBehalfOfContentOwnerChannel + (Just _lId) + _lOauthToken + _lStreamId + _lFields + _lAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsBind_directAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Control.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Control.hs new file mode 100644 index 000000000..991a011dc --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Control.hs @@ -0,0 +1,277 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Control +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Controls the settings for a slate that can be displayed in the broadcast +-- stream. +-- +-- /See:/ for @YouTubeLiveBroadcastsControl@. +module YouTube.LiveBroadcasts.Control + ( + -- * REST Resource + LiveBroadcastsControlAPI + + -- * Creating a Request + , liveBroadcastsControl + , LiveBroadcastsControl + + -- * Request Lenses + , lbcQuotaUser + , lbcPart + , lbcPrettyPrint + , lbcUserIp + , lbcOnBehalfOfContentOwner + , lbcKey + , lbcOnBehalfOfContentOwnerChannel + , lbcId + , lbcDisplaySlate + , lbcOauthToken + , lbcWalltime + , lbcOffsetTimeMs + , lbcFields + , lbcAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsControl@ which the +-- 'LiveBroadcastsControl' request conforms to. +type LiveBroadcastsControlAPI = + "liveBroadcasts" :> + "control" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "displaySlate" Bool :> + QueryParam "walltime" UTCTime :> + QueryParam "offsetTimeMs" Word64 :> + Post '[JSON] LiveBroadcast + +-- | Controls the settings for a slate that can be displayed in the broadcast +-- stream. +-- +-- /See:/ 'liveBroadcastsControl' smart constructor. +data LiveBroadcastsControl = LiveBroadcastsControl + { _lbcQuotaUser :: !(Maybe Text) + , _lbcPart :: !Text + , _lbcPrettyPrint :: !Bool + , _lbcUserIp :: !(Maybe Text) + , _lbcOnBehalfOfContentOwner :: !(Maybe Text) + , _lbcKey :: !(Maybe Text) + , _lbcOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbcId :: !Text + , _lbcDisplaySlate :: !(Maybe Bool) + , _lbcOauthToken :: !(Maybe Text) + , _lbcWalltime :: !(Maybe UTCTime) + , _lbcOffsetTimeMs :: !(Maybe Word64) + , _lbcFields :: !(Maybe Text) + , _lbcAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsControl'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbcQuotaUser' +-- +-- * 'lbcPart' +-- +-- * 'lbcPrettyPrint' +-- +-- * 'lbcUserIp' +-- +-- * 'lbcOnBehalfOfContentOwner' +-- +-- * 'lbcKey' +-- +-- * 'lbcOnBehalfOfContentOwnerChannel' +-- +-- * 'lbcId' +-- +-- * 'lbcDisplaySlate' +-- +-- * 'lbcOauthToken' +-- +-- * 'lbcWalltime' +-- +-- * 'lbcOffsetTimeMs' +-- +-- * 'lbcFields' +-- +-- * 'lbcAlt' +liveBroadcastsControl + :: Text -- ^ 'part' + -> Text -- ^ 'id' + -> LiveBroadcastsControl +liveBroadcastsControl pLbcPart_ pLbcId_ = + LiveBroadcastsControl + { _lbcQuotaUser = Nothing + , _lbcPart = pLbcPart_ + , _lbcPrettyPrint = True + , _lbcUserIp = Nothing + , _lbcOnBehalfOfContentOwner = Nothing + , _lbcKey = Nothing + , _lbcOnBehalfOfContentOwnerChannel = Nothing + , _lbcId = pLbcId_ + , _lbcDisplaySlate = Nothing + , _lbcOauthToken = Nothing + , _lbcWalltime = Nothing + , _lbcOffsetTimeMs = Nothing + , _lbcFields = Nothing + , _lbcAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbcQuotaUser :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcQuotaUser + = lens _lbcQuotaUser (\ s a -> s{_lbcQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveBroadcast resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, contentDetails, and status. +lbcPart :: Lens' LiveBroadcastsControl' Text +lbcPart = lens _lbcPart (\ s a -> s{_lbcPart = a}) + +-- | Returns response with indentations and line breaks. +lbcPrettyPrint :: Lens' LiveBroadcastsControl' Bool +lbcPrettyPrint + = lens _lbcPrettyPrint + (\ s a -> s{_lbcPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbcUserIp :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcUserIp + = lens _lbcUserIp (\ s a -> s{_lbcUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbcOnBehalfOfContentOwner :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcOnBehalfOfContentOwner + = lens _lbcOnBehalfOfContentOwner + (\ s a -> s{_lbcOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbcKey :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcKey = lens _lbcKey (\ s a -> s{_lbcKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbcOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcOnBehalfOfContentOwnerChannel + = lens _lbcOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbcOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the YouTube live broadcast ID that uniquely +-- identifies the broadcast in which the slate is being updated. +lbcId :: Lens' LiveBroadcastsControl' Text +lbcId = lens _lbcId (\ s a -> s{_lbcId = a}) + +-- | The displaySlate parameter specifies whether the slate is being enabled +-- or disabled. +lbcDisplaySlate :: Lens' LiveBroadcastsControl' (Maybe Bool) +lbcDisplaySlate + = lens _lbcDisplaySlate + (\ s a -> s{_lbcDisplaySlate = a}) + +-- | OAuth 2.0 token for the current user. +lbcOauthToken :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcOauthToken + = lens _lbcOauthToken + (\ s a -> s{_lbcOauthToken = a}) + +-- | The walltime parameter specifies the wall clock time at which the +-- specified slate change will occur. The value is specified in ISO 8601 +-- (YYYY-MM-DDThh:mm:ss.sssZ) format. +lbcWalltime :: Lens' LiveBroadcastsControl' (Maybe UTCTime) +lbcWalltime + = lens _lbcWalltime (\ s a -> s{_lbcWalltime = a}) + +-- | The offsetTimeMs parameter specifies a positive time offset when the +-- specified slate change will occur. The value is measured in milliseconds +-- from the beginning of the broadcast\'s monitor stream, which is the time +-- that the testing phase for the broadcast began. Even though it is +-- specified in milliseconds, the value is actually an approximation, and +-- YouTube completes the requested action as closely as possible to that +-- time. If you do not specify a value for this parameter, then YouTube +-- performs the action as soon as possible. See the Getting started guide +-- for more details. Important: You should only specify a value for this +-- parameter if your broadcast stream is delayed. +lbcOffsetTimeMs :: Lens' LiveBroadcastsControl' (Maybe Word64) +lbcOffsetTimeMs + = lens _lbcOffsetTimeMs + (\ s a -> s{_lbcOffsetTimeMs = a}) + +-- | Selector specifying which fields to include in a partial response. +lbcFields :: Lens' LiveBroadcastsControl' (Maybe Text) +lbcFields + = lens _lbcFields (\ s a -> s{_lbcFields = a}) + +-- | Data format for the response. +lbcAlt :: Lens' LiveBroadcastsControl' Text +lbcAlt = lens _lbcAlt (\ s a -> s{_lbcAlt = a}) + +instance GoogleRequest LiveBroadcastsControl' where + type Rs LiveBroadcastsControl' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsControl{..} + = go _lbcQuotaUser (Just _lbcPart) _lbcPrettyPrint + _lbcUserIp + _lbcOnBehalfOfContentOwner + _lbcKey + _lbcOnBehalfOfContentOwnerChannel + (Just _lbcId) + _lbcDisplaySlate + _lbcOauthToken + _lbcWalltime + _lbcOffsetTimeMs + _lbcFields + _lbcAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsControlAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Delete.hs new file mode 100644 index 000000000..9d5ff7f80 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Delete.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a broadcast. +-- +-- /See:/ for @YouTubeLiveBroadcastsDelete@. +module YouTube.LiveBroadcasts.Delete + ( + -- * REST Resource + LiveBroadcastsDeleteAPI + + -- * Creating a Request + , liveBroadcastsDelete + , LiveBroadcastsDelete + + -- * Request Lenses + , lbdQuotaUser + , lbdPrettyPrint + , lbdUserIp + , lbdOnBehalfOfContentOwner + , lbdKey + , lbdOnBehalfOfContentOwnerChannel + , lbdId + , lbdOauthToken + , lbdFields + , lbdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsDelete@ which the +-- 'LiveBroadcastsDelete' request conforms to. +type LiveBroadcastsDeleteAPI = + "liveBroadcasts" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a broadcast. +-- +-- /See:/ 'liveBroadcastsDelete' smart constructor. +data LiveBroadcastsDelete = LiveBroadcastsDelete + { _lbdQuotaUser :: !(Maybe Text) + , _lbdPrettyPrint :: !Bool + , _lbdUserIp :: !(Maybe Text) + , _lbdOnBehalfOfContentOwner :: !(Maybe Text) + , _lbdKey :: !(Maybe Text) + , _lbdOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbdId :: !Text + , _lbdOauthToken :: !(Maybe Text) + , _lbdFields :: !(Maybe Text) + , _lbdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbdQuotaUser' +-- +-- * 'lbdPrettyPrint' +-- +-- * 'lbdUserIp' +-- +-- * 'lbdOnBehalfOfContentOwner' +-- +-- * 'lbdKey' +-- +-- * 'lbdOnBehalfOfContentOwnerChannel' +-- +-- * 'lbdId' +-- +-- * 'lbdOauthToken' +-- +-- * 'lbdFields' +-- +-- * 'lbdAlt' +liveBroadcastsDelete + :: Text -- ^ 'id' + -> LiveBroadcastsDelete +liveBroadcastsDelete pLbdId_ = + LiveBroadcastsDelete + { _lbdQuotaUser = Nothing + , _lbdPrettyPrint = True + , _lbdUserIp = Nothing + , _lbdOnBehalfOfContentOwner = Nothing + , _lbdKey = Nothing + , _lbdOnBehalfOfContentOwnerChannel = Nothing + , _lbdId = pLbdId_ + , _lbdOauthToken = Nothing + , _lbdFields = Nothing + , _lbdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbdQuotaUser :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdQuotaUser + = lens _lbdQuotaUser (\ s a -> s{_lbdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lbdPrettyPrint :: Lens' LiveBroadcastsDelete' Bool +lbdPrettyPrint + = lens _lbdPrettyPrint + (\ s a -> s{_lbdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbdUserIp :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdUserIp + = lens _lbdUserIp (\ s a -> s{_lbdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbdOnBehalfOfContentOwner :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdOnBehalfOfContentOwner + = lens _lbdOnBehalfOfContentOwner + (\ s a -> s{_lbdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbdKey :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdKey = lens _lbdKey (\ s a -> s{_lbdKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbdOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdOnBehalfOfContentOwnerChannel + = lens _lbdOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbdOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the YouTube live broadcast ID for the +-- resource that is being deleted. +lbdId :: Lens' LiveBroadcastsDelete' Text +lbdId = lens _lbdId (\ s a -> s{_lbdId = a}) + +-- | OAuth 2.0 token for the current user. +lbdOauthToken :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdOauthToken + = lens _lbdOauthToken + (\ s a -> s{_lbdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lbdFields :: Lens' LiveBroadcastsDelete' (Maybe Text) +lbdFields + = lens _lbdFields (\ s a -> s{_lbdFields = a}) + +-- | Data format for the response. +lbdAlt :: Lens' LiveBroadcastsDelete' Text +lbdAlt = lens _lbdAlt (\ s a -> s{_lbdAlt = a}) + +instance GoogleRequest LiveBroadcastsDelete' where + type Rs LiveBroadcastsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsDelete{..} + = go _lbdQuotaUser _lbdPrettyPrint _lbdUserIp + _lbdOnBehalfOfContentOwner + _lbdKey + _lbdOnBehalfOfContentOwnerChannel + (Just _lbdId) + _lbdOauthToken + _lbdFields + _lbdAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs new file mode 100644 index 000000000..09ebb0c4a --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs @@ -0,0 +1,212 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a broadcast. +-- +-- /See:/ for @YouTubeLiveBroadcastsInsert@. +module YouTube.LiveBroadcasts.Insert + ( + -- * REST Resource + LiveBroadcastsInsertAPI + + -- * Creating a Request + , liveBroadcastsInsert + , LiveBroadcastsInsert + + -- * Request Lenses + , lbiQuotaUser + , lbiPart + , lbiPrettyPrint + , lbiUserIp + , lbiOnBehalfOfContentOwner + , lbiKey + , lbiOnBehalfOfContentOwnerChannel + , lbiOauthToken + , lbiFields + , lbiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsInsert@ which the +-- 'LiveBroadcastsInsert' request conforms to. +type LiveBroadcastsInsertAPI = + "liveBroadcasts" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Post '[JSON] LiveBroadcast + +-- | Creates a broadcast. +-- +-- /See:/ 'liveBroadcastsInsert' smart constructor. +data LiveBroadcastsInsert = LiveBroadcastsInsert + { _lbiQuotaUser :: !(Maybe Text) + , _lbiPart :: !Text + , _lbiPrettyPrint :: !Bool + , _lbiUserIp :: !(Maybe Text) + , _lbiOnBehalfOfContentOwner :: !(Maybe Text) + , _lbiKey :: !(Maybe Text) + , _lbiOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbiOauthToken :: !(Maybe Text) + , _lbiFields :: !(Maybe Text) + , _lbiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbiQuotaUser' +-- +-- * 'lbiPart' +-- +-- * 'lbiPrettyPrint' +-- +-- * 'lbiUserIp' +-- +-- * 'lbiOnBehalfOfContentOwner' +-- +-- * 'lbiKey' +-- +-- * 'lbiOnBehalfOfContentOwnerChannel' +-- +-- * 'lbiOauthToken' +-- +-- * 'lbiFields' +-- +-- * 'lbiAlt' +liveBroadcastsInsert + :: Text -- ^ 'part' + -> LiveBroadcastsInsert +liveBroadcastsInsert pLbiPart_ = + LiveBroadcastsInsert + { _lbiQuotaUser = Nothing + , _lbiPart = pLbiPart_ + , _lbiPrettyPrint = True + , _lbiUserIp = Nothing + , _lbiOnBehalfOfContentOwner = Nothing + , _lbiKey = Nothing + , _lbiOnBehalfOfContentOwnerChannel = Nothing + , _lbiOauthToken = Nothing + , _lbiFields = Nothing + , _lbiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbiQuotaUser :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiQuotaUser + = lens _lbiQuotaUser (\ s a -> s{_lbiQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part properties that +-- you can include in the parameter value are id, snippet, contentDetails, +-- and status. +lbiPart :: Lens' LiveBroadcastsInsert' Text +lbiPart = lens _lbiPart (\ s a -> s{_lbiPart = a}) + +-- | Returns response with indentations and line breaks. +lbiPrettyPrint :: Lens' LiveBroadcastsInsert' Bool +lbiPrettyPrint + = lens _lbiPrettyPrint + (\ s a -> s{_lbiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbiUserIp :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiUserIp + = lens _lbiUserIp (\ s a -> s{_lbiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbiOnBehalfOfContentOwner :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiOnBehalfOfContentOwner + = lens _lbiOnBehalfOfContentOwner + (\ s a -> s{_lbiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbiKey :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiKey = lens _lbiKey (\ s a -> s{_lbiKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbiOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiOnBehalfOfContentOwnerChannel + = lens _lbiOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbiOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +lbiOauthToken :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiOauthToken + = lens _lbiOauthToken + (\ s a -> s{_lbiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lbiFields :: Lens' LiveBroadcastsInsert' (Maybe Text) +lbiFields + = lens _lbiFields (\ s a -> s{_lbiFields = a}) + +-- | Data format for the response. +lbiAlt :: Lens' LiveBroadcastsInsert' Text +lbiAlt = lens _lbiAlt (\ s a -> s{_lbiAlt = a}) + +instance GoogleRequest LiveBroadcastsInsert' where + type Rs LiveBroadcastsInsert' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsInsert{..} + = go _lbiQuotaUser (Just _lbiPart) _lbiPrettyPrint + _lbiUserIp + _lbiOnBehalfOfContentOwner + _lbiKey + _lbiOnBehalfOfContentOwnerChannel + _lbiOauthToken + _lbiFields + _lbiAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/List.hs new file mode 100644 index 000000000..e75d2221b --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/List.hs @@ -0,0 +1,282 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of YouTube broadcasts that match the API request +-- parameters. +-- +-- /See:/ for @YouTubeLiveBroadcastsList@. +module YouTube.LiveBroadcasts.List + ( + -- * REST Resource + LiveBroadcastsListAPI + + -- * Creating a Request + , liveBroadcastsList + , LiveBroadcastsList + + -- * Request Lenses + , lblQuotaUser + , lblPart + , lblPrettyPrint + , lblMine + , lblUserIp + , lblBroadcastStatus + , lblOnBehalfOfContentOwner + , lblKey + , lblOnBehalfOfContentOwnerChannel + , lblId + , lblPageToken + , lblOauthToken + , lblMaxResults + , lblFields + , lblAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsList@ which the +-- 'LiveBroadcastsList' request conforms to. +type LiveBroadcastsListAPI = + "liveBroadcasts" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "broadcastStatus" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] LiveBroadcastListResponse + +-- | Returns a list of YouTube broadcasts that match the API request +-- parameters. +-- +-- /See:/ 'liveBroadcastsList' smart constructor. +data LiveBroadcastsList = LiveBroadcastsList + { _lblQuotaUser :: !(Maybe Text) + , _lblPart :: !Text + , _lblPrettyPrint :: !Bool + , _lblMine :: !(Maybe Bool) + , _lblUserIp :: !(Maybe Text) + , _lblBroadcastStatus :: !(Maybe Text) + , _lblOnBehalfOfContentOwner :: !(Maybe Text) + , _lblKey :: !(Maybe Text) + , _lblOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lblId :: !(Maybe Text) + , _lblPageToken :: !(Maybe Text) + , _lblOauthToken :: !(Maybe Text) + , _lblMaxResults :: !Word32 + , _lblFields :: !(Maybe Text) + , _lblAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lblQuotaUser' +-- +-- * 'lblPart' +-- +-- * 'lblPrettyPrint' +-- +-- * 'lblMine' +-- +-- * 'lblUserIp' +-- +-- * 'lblBroadcastStatus' +-- +-- * 'lblOnBehalfOfContentOwner' +-- +-- * 'lblKey' +-- +-- * 'lblOnBehalfOfContentOwnerChannel' +-- +-- * 'lblId' +-- +-- * 'lblPageToken' +-- +-- * 'lblOauthToken' +-- +-- * 'lblMaxResults' +-- +-- * 'lblFields' +-- +-- * 'lblAlt' +liveBroadcastsList + :: Text -- ^ 'part' + -> LiveBroadcastsList +liveBroadcastsList pLblPart_ = + LiveBroadcastsList + { _lblQuotaUser = Nothing + , _lblPart = pLblPart_ + , _lblPrettyPrint = True + , _lblMine = Nothing + , _lblUserIp = Nothing + , _lblBroadcastStatus = Nothing + , _lblOnBehalfOfContentOwner = Nothing + , _lblKey = Nothing + , _lblOnBehalfOfContentOwnerChannel = Nothing + , _lblId = Nothing + , _lblPageToken = Nothing + , _lblOauthToken = Nothing + , _lblMaxResults = 5 + , _lblFields = Nothing + , _lblAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lblQuotaUser :: Lens' LiveBroadcastsList' (Maybe Text) +lblQuotaUser + = lens _lblQuotaUser (\ s a -> s{_lblQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveBroadcast resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, contentDetails, and status. +lblPart :: Lens' LiveBroadcastsList' Text +lblPart = lens _lblPart (\ s a -> s{_lblPart = a}) + +-- | Returns response with indentations and line breaks. +lblPrettyPrint :: Lens' LiveBroadcastsList' Bool +lblPrettyPrint + = lens _lblPrettyPrint + (\ s a -> s{_lblPrettyPrint = a}) + +-- | The mine parameter can be used to instruct the API to only return +-- broadcasts owned by the authenticated user. Set the parameter value to +-- true to only retrieve your own broadcasts. +lblMine :: Lens' LiveBroadcastsList' (Maybe Bool) +lblMine = lens _lblMine (\ s a -> s{_lblMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lblUserIp :: Lens' LiveBroadcastsList' (Maybe Text) +lblUserIp + = lens _lblUserIp (\ s a -> s{_lblUserIp = a}) + +-- | The broadcastStatus parameter filters the API response to only include +-- broadcasts with the specified status. +lblBroadcastStatus :: Lens' LiveBroadcastsList' (Maybe Text) +lblBroadcastStatus + = lens _lblBroadcastStatus + (\ s a -> s{_lblBroadcastStatus = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lblOnBehalfOfContentOwner :: Lens' LiveBroadcastsList' (Maybe Text) +lblOnBehalfOfContentOwner + = lens _lblOnBehalfOfContentOwner + (\ s a -> s{_lblOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lblKey :: Lens' LiveBroadcastsList' (Maybe Text) +lblKey = lens _lblKey (\ s a -> s{_lblKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lblOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsList' (Maybe Text) +lblOnBehalfOfContentOwnerChannel + = lens _lblOnBehalfOfContentOwnerChannel + (\ s a -> s{_lblOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies a comma-separated list of YouTube broadcast +-- IDs that identify the broadcasts being retrieved. In a liveBroadcast +-- resource, the id property specifies the broadcast\'s ID. +lblId :: Lens' LiveBroadcastsList' (Maybe Text) +lblId = lens _lblId (\ s a -> s{_lblId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +lblPageToken :: Lens' LiveBroadcastsList' (Maybe Text) +lblPageToken + = lens _lblPageToken (\ s a -> s{_lblPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lblOauthToken :: Lens' LiveBroadcastsList' (Maybe Text) +lblOauthToken + = lens _lblOauthToken + (\ s a -> s{_lblOauthToken = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +lblMaxResults :: Lens' LiveBroadcastsList' Word32 +lblMaxResults + = lens _lblMaxResults + (\ s a -> s{_lblMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lblFields :: Lens' LiveBroadcastsList' (Maybe Text) +lblFields + = lens _lblFields (\ s a -> s{_lblFields = a}) + +-- | Data format for the response. +lblAlt :: Lens' LiveBroadcastsList' Text +lblAlt = lens _lblAlt (\ s a -> s{_lblAlt = a}) + +instance GoogleRequest LiveBroadcastsList' where + type Rs LiveBroadcastsList' = + LiveBroadcastListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsList{..} + = go _lblQuotaUser (Just _lblPart) _lblPrettyPrint + _lblMine + _lblUserIp + _lblBroadcastStatus + _lblOnBehalfOfContentOwner + _lblKey + _lblOnBehalfOfContentOwnerChannel + _lblId + _lblPageToken + _lblOauthToken + (Just _lblMaxResults) + _lblFields + _lblAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Transition.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Transition.hs new file mode 100644 index 000000000..ade0e3e2c --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Transition.hs @@ -0,0 +1,252 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Transition +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Changes the status of a YouTube live broadcast and initiates any +-- processes associated with the new status. For example, when you +-- transition a broadcast\'s status to testing, YouTube starts to transmit +-- video to that broadcast\'s monitor stream. Before calling this method, +-- you should confirm that the value of the status.streamStatus property +-- for the stream bound to your broadcast is active. +-- +-- /See:/ for @YouTubeLiveBroadcastsTransition@. +module YouTube.LiveBroadcasts.Transition + ( + -- * REST Resource + LiveBroadcastsTransitionAPI + + -- * Creating a Request + , liveBroadcastsTransition + , LiveBroadcastsTransition + + -- * Request Lenses + , lbtQuotaUser + , lbtPart + , lbtPrettyPrint + , lbtUserIp + , lbtBroadcastStatus + , lbtOnBehalfOfContentOwner + , lbtKey + , lbtOnBehalfOfContentOwnerChannel + , lbtId + , lbtOauthToken + , lbtFields + , lbtAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsTransition@ which the +-- 'LiveBroadcastsTransition' request conforms to. +type LiveBroadcastsTransitionAPI = + "liveBroadcasts" :> + "transition" :> + QueryParam "part" Text :> + QueryParam "broadcastStatus" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> Post '[JSON] LiveBroadcast + +-- | Changes the status of a YouTube live broadcast and initiates any +-- processes associated with the new status. For example, when you +-- transition a broadcast\'s status to testing, YouTube starts to transmit +-- video to that broadcast\'s monitor stream. Before calling this method, +-- you should confirm that the value of the status.streamStatus property +-- for the stream bound to your broadcast is active. +-- +-- /See:/ 'liveBroadcastsTransition' smart constructor. +data LiveBroadcastsTransition = LiveBroadcastsTransition + { _lbtQuotaUser :: !(Maybe Text) + , _lbtPart :: !Text + , _lbtPrettyPrint :: !Bool + , _lbtUserIp :: !(Maybe Text) + , _lbtBroadcastStatus :: !Text + , _lbtOnBehalfOfContentOwner :: !(Maybe Text) + , _lbtKey :: !(Maybe Text) + , _lbtOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbtId :: !Text + , _lbtOauthToken :: !(Maybe Text) + , _lbtFields :: !(Maybe Text) + , _lbtAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsTransition'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbtQuotaUser' +-- +-- * 'lbtPart' +-- +-- * 'lbtPrettyPrint' +-- +-- * 'lbtUserIp' +-- +-- * 'lbtBroadcastStatus' +-- +-- * 'lbtOnBehalfOfContentOwner' +-- +-- * 'lbtKey' +-- +-- * 'lbtOnBehalfOfContentOwnerChannel' +-- +-- * 'lbtId' +-- +-- * 'lbtOauthToken' +-- +-- * 'lbtFields' +-- +-- * 'lbtAlt' +liveBroadcastsTransition + :: Text -- ^ 'part' + -> Text -- ^ 'broadcastStatus' + -> Text -- ^ 'id' + -> LiveBroadcastsTransition +liveBroadcastsTransition pLbtPart_ pLbtBroadcastStatus_ pLbtId_ = + LiveBroadcastsTransition + { _lbtQuotaUser = Nothing + , _lbtPart = pLbtPart_ + , _lbtPrettyPrint = True + , _lbtUserIp = Nothing + , _lbtBroadcastStatus = pLbtBroadcastStatus_ + , _lbtOnBehalfOfContentOwner = Nothing + , _lbtKey = Nothing + , _lbtOnBehalfOfContentOwnerChannel = Nothing + , _lbtId = pLbtId_ + , _lbtOauthToken = Nothing + , _lbtFields = Nothing + , _lbtAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbtQuotaUser :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtQuotaUser + = lens _lbtQuotaUser (\ s a -> s{_lbtQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveBroadcast resource properties that the API response will include. +-- The part names that you can include in the parameter value are id, +-- snippet, contentDetails, and status. +lbtPart :: Lens' LiveBroadcastsTransition' Text +lbtPart = lens _lbtPart (\ s a -> s{_lbtPart = a}) + +-- | Returns response with indentations and line breaks. +lbtPrettyPrint :: Lens' LiveBroadcastsTransition' Bool +lbtPrettyPrint + = lens _lbtPrettyPrint + (\ s a -> s{_lbtPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbtUserIp :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtUserIp + = lens _lbtUserIp (\ s a -> s{_lbtUserIp = a}) + +-- | The broadcastStatus parameter identifies the state to which the +-- broadcast is changing. Note that to transition a broadcast to either the +-- testing or live state, the status.streamStatus must be active for the +-- stream that the broadcast is bound to. +lbtBroadcastStatus :: Lens' LiveBroadcastsTransition' Text +lbtBroadcastStatus + = lens _lbtBroadcastStatus + (\ s a -> s{_lbtBroadcastStatus = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbtOnBehalfOfContentOwner :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtOnBehalfOfContentOwner + = lens _lbtOnBehalfOfContentOwner + (\ s a -> s{_lbtOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbtKey :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtKey = lens _lbtKey (\ s a -> s{_lbtKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbtOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtOnBehalfOfContentOwnerChannel + = lens _lbtOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbtOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the unique ID of the broadcast that is +-- transitioning to another status. +lbtId :: Lens' LiveBroadcastsTransition' Text +lbtId = lens _lbtId (\ s a -> s{_lbtId = a}) + +-- | OAuth 2.0 token for the current user. +lbtOauthToken :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtOauthToken + = lens _lbtOauthToken + (\ s a -> s{_lbtOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lbtFields :: Lens' LiveBroadcastsTransition' (Maybe Text) +lbtFields + = lens _lbtFields (\ s a -> s{_lbtFields = a}) + +-- | Data format for the response. +lbtAlt :: Lens' LiveBroadcastsTransition' Text +lbtAlt = lens _lbtAlt (\ s a -> s{_lbtAlt = a}) + +instance GoogleRequest LiveBroadcastsTransition' + where + type Rs LiveBroadcastsTransition' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsTransition{..} + = go _lbtQuotaUser (Just _lbtPart) _lbtPrettyPrint + _lbtUserIp + (Just _lbtBroadcastStatus) + _lbtOnBehalfOfContentOwner + _lbtKey + _lbtOnBehalfOfContentOwnerChannel + (Just _lbtId) + _lbtOauthToken + _lbtFields + _lbtAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsTransitionAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Update.hs new file mode 100644 index 000000000..8d51a692d --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Update.hs @@ -0,0 +1,222 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveBroadcasts.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a broadcast. For example, you could modify the broadcast +-- settings defined in the liveBroadcast resource\'s contentDetails object. +-- +-- /See:/ for @YouTubeLiveBroadcastsUpdate@. +module YouTube.LiveBroadcasts.Update + ( + -- * REST Resource + LiveBroadcastsUpdateAPI + + -- * Creating a Request + , liveBroadcastsUpdate + , LiveBroadcastsUpdate + + -- * Request Lenses + , lbuQuotaUser + , lbuPart + , lbuPrettyPrint + , lbuUserIp + , lbuOnBehalfOfContentOwner + , lbuKey + , lbuOnBehalfOfContentOwnerChannel + , lbuOauthToken + , lbuFields + , lbuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveBroadcastsUpdate@ which the +-- 'LiveBroadcastsUpdate' request conforms to. +type LiveBroadcastsUpdateAPI = + "liveBroadcasts" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Put '[JSON] LiveBroadcast + +-- | Updates a broadcast. For example, you could modify the broadcast +-- settings defined in the liveBroadcast resource\'s contentDetails object. +-- +-- /See:/ 'liveBroadcastsUpdate' smart constructor. +data LiveBroadcastsUpdate = LiveBroadcastsUpdate + { _lbuQuotaUser :: !(Maybe Text) + , _lbuPart :: !Text + , _lbuPrettyPrint :: !Bool + , _lbuUserIp :: !(Maybe Text) + , _lbuOnBehalfOfContentOwner :: !(Maybe Text) + , _lbuKey :: !(Maybe Text) + , _lbuOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lbuOauthToken :: !(Maybe Text) + , _lbuFields :: !(Maybe Text) + , _lbuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbuQuotaUser' +-- +-- * 'lbuPart' +-- +-- * 'lbuPrettyPrint' +-- +-- * 'lbuUserIp' +-- +-- * 'lbuOnBehalfOfContentOwner' +-- +-- * 'lbuKey' +-- +-- * 'lbuOnBehalfOfContentOwnerChannel' +-- +-- * 'lbuOauthToken' +-- +-- * 'lbuFields' +-- +-- * 'lbuAlt' +liveBroadcastsUpdate + :: Text -- ^ 'part' + -> LiveBroadcastsUpdate +liveBroadcastsUpdate pLbuPart_ = + LiveBroadcastsUpdate + { _lbuQuotaUser = Nothing + , _lbuPart = pLbuPart_ + , _lbuPrettyPrint = True + , _lbuUserIp = Nothing + , _lbuOnBehalfOfContentOwner = Nothing + , _lbuKey = Nothing + , _lbuOnBehalfOfContentOwnerChannel = Nothing + , _lbuOauthToken = Nothing + , _lbuFields = Nothing + , _lbuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lbuQuotaUser :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuQuotaUser + = lens _lbuQuotaUser (\ s a -> s{_lbuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part properties that +-- you can include in the parameter value are id, snippet, contentDetails, +-- and status. Note that this method will override the existing values for +-- all of the mutable properties that are contained in any parts that the +-- parameter value specifies. For example, a broadcast\'s privacy status is +-- defined in the status part. As such, if your request is updating a +-- private or unlisted broadcast, and the request\'s part parameter value +-- includes the status part, the broadcast\'s privacy setting will be +-- updated to whatever value the request body specifies. If the request +-- body does not specify a value, the existing privacy setting will be +-- removed and the broadcast will revert to the default privacy setting. +lbuPart :: Lens' LiveBroadcastsUpdate' Text +lbuPart = lens _lbuPart (\ s a -> s{_lbuPart = a}) + +-- | Returns response with indentations and line breaks. +lbuPrettyPrint :: Lens' LiveBroadcastsUpdate' Bool +lbuPrettyPrint + = lens _lbuPrettyPrint + (\ s a -> s{_lbuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lbuUserIp :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuUserIp + = lens _lbuUserIp (\ s a -> s{_lbuUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lbuOnBehalfOfContentOwner :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuOnBehalfOfContentOwner + = lens _lbuOnBehalfOfContentOwner + (\ s a -> s{_lbuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lbuKey :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuKey = lens _lbuKey (\ s a -> s{_lbuKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lbuOnBehalfOfContentOwnerChannel :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuOnBehalfOfContentOwnerChannel + = lens _lbuOnBehalfOfContentOwnerChannel + (\ s a -> s{_lbuOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +lbuOauthToken :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuOauthToken + = lens _lbuOauthToken + (\ s a -> s{_lbuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lbuFields :: Lens' LiveBroadcastsUpdate' (Maybe Text) +lbuFields + = lens _lbuFields (\ s a -> s{_lbuFields = a}) + +-- | Data format for the response. +lbuAlt :: Lens' LiveBroadcastsUpdate' Text +lbuAlt = lens _lbuAlt (\ s a -> s{_lbuAlt = a}) + +instance GoogleRequest LiveBroadcastsUpdate' where + type Rs LiveBroadcastsUpdate' = LiveBroadcast + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveBroadcastsUpdate{..} + = go _lbuQuotaUser (Just _lbuPart) _lbuPrettyPrint + _lbuUserIp + _lbuOnBehalfOfContentOwner + _lbuKey + _lbuOnBehalfOfContentOwnerChannel + _lbuOauthToken + _lbuFields + _lbuAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveBroadcastsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Delete.hs new file mode 100644 index 000000000..74d548093 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Delete.hs @@ -0,0 +1,208 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveStreams.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a video stream. +-- +-- /See:/ for @YouTubeLiveStreamsDelete@. +module YouTube.LiveStreams.Delete + ( + -- * REST Resource + LiveStreamsDeleteAPI + + -- * Creating a Request + , liveStreamsDelete + , LiveStreamsDelete + + -- * Request Lenses + , lsdQuotaUser + , lsdPrettyPrint + , lsdUserIp + , lsdOnBehalfOfContentOwner + , lsdKey + , lsdOnBehalfOfContentOwnerChannel + , lsdId + , lsdOauthToken + , lsdFields + , lsdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveStreamsDelete@ which the +-- 'LiveStreamsDelete' request conforms to. +type LiveStreamsDeleteAPI = + "liveStreams" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a video stream. +-- +-- /See:/ 'liveStreamsDelete' smart constructor. +data LiveStreamsDelete = LiveStreamsDelete + { _lsdQuotaUser :: !(Maybe Text) + , _lsdPrettyPrint :: !Bool + , _lsdUserIp :: !(Maybe Text) + , _lsdOnBehalfOfContentOwner :: !(Maybe Text) + , _lsdKey :: !(Maybe Text) + , _lsdOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lsdId :: !Text + , _lsdOauthToken :: !(Maybe Text) + , _lsdFields :: !(Maybe Text) + , _lsdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsdQuotaUser' +-- +-- * 'lsdPrettyPrint' +-- +-- * 'lsdUserIp' +-- +-- * 'lsdOnBehalfOfContentOwner' +-- +-- * 'lsdKey' +-- +-- * 'lsdOnBehalfOfContentOwnerChannel' +-- +-- * 'lsdId' +-- +-- * 'lsdOauthToken' +-- +-- * 'lsdFields' +-- +-- * 'lsdAlt' +liveStreamsDelete + :: Text -- ^ 'id' + -> LiveStreamsDelete +liveStreamsDelete pLsdId_ = + LiveStreamsDelete + { _lsdQuotaUser = Nothing + , _lsdPrettyPrint = True + , _lsdUserIp = Nothing + , _lsdOnBehalfOfContentOwner = Nothing + , _lsdKey = Nothing + , _lsdOnBehalfOfContentOwnerChannel = Nothing + , _lsdId = pLsdId_ + , _lsdOauthToken = Nothing + , _lsdFields = Nothing + , _lsdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lsdQuotaUser :: Lens' LiveStreamsDelete' (Maybe Text) +lsdQuotaUser + = lens _lsdQuotaUser (\ s a -> s{_lsdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +lsdPrettyPrint :: Lens' LiveStreamsDelete' Bool +lsdPrettyPrint + = lens _lsdPrettyPrint + (\ s a -> s{_lsdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lsdUserIp :: Lens' LiveStreamsDelete' (Maybe Text) +lsdUserIp + = lens _lsdUserIp (\ s a -> s{_lsdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lsdOnBehalfOfContentOwner :: Lens' LiveStreamsDelete' (Maybe Text) +lsdOnBehalfOfContentOwner + = lens _lsdOnBehalfOfContentOwner + (\ s a -> s{_lsdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lsdKey :: Lens' LiveStreamsDelete' (Maybe Text) +lsdKey = lens _lsdKey (\ s a -> s{_lsdKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lsdOnBehalfOfContentOwnerChannel :: Lens' LiveStreamsDelete' (Maybe Text) +lsdOnBehalfOfContentOwnerChannel + = lens _lsdOnBehalfOfContentOwnerChannel + (\ s a -> s{_lsdOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies the YouTube live stream ID for the resource +-- that is being deleted. +lsdId :: Lens' LiveStreamsDelete' Text +lsdId = lens _lsdId (\ s a -> s{_lsdId = a}) + +-- | OAuth 2.0 token for the current user. +lsdOauthToken :: Lens' LiveStreamsDelete' (Maybe Text) +lsdOauthToken + = lens _lsdOauthToken + (\ s a -> s{_lsdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lsdFields :: Lens' LiveStreamsDelete' (Maybe Text) +lsdFields + = lens _lsdFields (\ s a -> s{_lsdFields = a}) + +-- | Data format for the response. +lsdAlt :: Lens' LiveStreamsDelete' Text +lsdAlt = lens _lsdAlt (\ s a -> s{_lsdAlt = a}) + +instance GoogleRequest LiveStreamsDelete' where + type Rs LiveStreamsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveStreamsDelete{..} + = go _lsdQuotaUser _lsdPrettyPrint _lsdUserIp + _lsdOnBehalfOfContentOwner + _lsdKey + _lsdOnBehalfOfContentOwnerChannel + (Just _lsdId) + _lsdOauthToken + _lsdFields + _lsdAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveStreamsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Insert.hs new file mode 100644 index 000000000..d01bc73a1 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Insert.hs @@ -0,0 +1,213 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveStreams.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a video stream. The stream enables you to send your video to +-- YouTube, which can then broadcast the video to your audience. +-- +-- /See:/ for @YouTubeLiveStreamsInsert@. +module YouTube.LiveStreams.Insert + ( + -- * REST Resource + LiveStreamsInsertAPI + + -- * Creating a Request + , liveStreamsInsert + , LiveStreamsInsert + + -- * Request Lenses + , lsiQuotaUser + , lsiPart + , lsiPrettyPrint + , lsiUserIp + , lsiOnBehalfOfContentOwner + , lsiKey + , lsiOnBehalfOfContentOwnerChannel + , lsiOauthToken + , lsiFields + , lsiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveStreamsInsert@ which the +-- 'LiveStreamsInsert' request conforms to. +type LiveStreamsInsertAPI = + "liveStreams" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Post '[JSON] LiveStream + +-- | Creates a video stream. The stream enables you to send your video to +-- YouTube, which can then broadcast the video to your audience. +-- +-- /See:/ 'liveStreamsInsert' smart constructor. +data LiveStreamsInsert = LiveStreamsInsert + { _lsiQuotaUser :: !(Maybe Text) + , _lsiPart :: !Text + , _lsiPrettyPrint :: !Bool + , _lsiUserIp :: !(Maybe Text) + , _lsiOnBehalfOfContentOwner :: !(Maybe Text) + , _lsiKey :: !(Maybe Text) + , _lsiOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lsiOauthToken :: !(Maybe Text) + , _lsiFields :: !(Maybe Text) + , _lsiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsiQuotaUser' +-- +-- * 'lsiPart' +-- +-- * 'lsiPrettyPrint' +-- +-- * 'lsiUserIp' +-- +-- * 'lsiOnBehalfOfContentOwner' +-- +-- * 'lsiKey' +-- +-- * 'lsiOnBehalfOfContentOwnerChannel' +-- +-- * 'lsiOauthToken' +-- +-- * 'lsiFields' +-- +-- * 'lsiAlt' +liveStreamsInsert + :: Text -- ^ 'part' + -> LiveStreamsInsert +liveStreamsInsert pLsiPart_ = + LiveStreamsInsert + { _lsiQuotaUser = Nothing + , _lsiPart = pLsiPart_ + , _lsiPrettyPrint = True + , _lsiUserIp = Nothing + , _lsiOnBehalfOfContentOwner = Nothing + , _lsiKey = Nothing + , _lsiOnBehalfOfContentOwnerChannel = Nothing + , _lsiOauthToken = Nothing + , _lsiFields = Nothing + , _lsiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lsiQuotaUser :: Lens' LiveStreamsInsert' (Maybe Text) +lsiQuotaUser + = lens _lsiQuotaUser (\ s a -> s{_lsiQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part properties that +-- you can include in the parameter value are id, snippet, cdn, and status. +lsiPart :: Lens' LiveStreamsInsert' Text +lsiPart = lens _lsiPart (\ s a -> s{_lsiPart = a}) + +-- | Returns response with indentations and line breaks. +lsiPrettyPrint :: Lens' LiveStreamsInsert' Bool +lsiPrettyPrint + = lens _lsiPrettyPrint + (\ s a -> s{_lsiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lsiUserIp :: Lens' LiveStreamsInsert' (Maybe Text) +lsiUserIp + = lens _lsiUserIp (\ s a -> s{_lsiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lsiOnBehalfOfContentOwner :: Lens' LiveStreamsInsert' (Maybe Text) +lsiOnBehalfOfContentOwner + = lens _lsiOnBehalfOfContentOwner + (\ s a -> s{_lsiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lsiKey :: Lens' LiveStreamsInsert' (Maybe Text) +lsiKey = lens _lsiKey (\ s a -> s{_lsiKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lsiOnBehalfOfContentOwnerChannel :: Lens' LiveStreamsInsert' (Maybe Text) +lsiOnBehalfOfContentOwnerChannel + = lens _lsiOnBehalfOfContentOwnerChannel + (\ s a -> s{_lsiOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +lsiOauthToken :: Lens' LiveStreamsInsert' (Maybe Text) +lsiOauthToken + = lens _lsiOauthToken + (\ s a -> s{_lsiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lsiFields :: Lens' LiveStreamsInsert' (Maybe Text) +lsiFields + = lens _lsiFields (\ s a -> s{_lsiFields = a}) + +-- | Data format for the response. +lsiAlt :: Lens' LiveStreamsInsert' Text +lsiAlt = lens _lsiAlt (\ s a -> s{_lsiAlt = a}) + +instance GoogleRequest LiveStreamsInsert' where + type Rs LiveStreamsInsert' = LiveStream + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveStreamsInsert{..} + = go _lsiQuotaUser (Just _lsiPart) _lsiPrettyPrint + _lsiUserIp + _lsiOnBehalfOfContentOwner + _lsiKey + _lsiOnBehalfOfContentOwnerChannel + _lsiOauthToken + _lsiFields + _lsiAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveStreamsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/List.hs new file mode 100644 index 000000000..c5a6fa396 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/List.hs @@ -0,0 +1,264 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveStreams.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of video streams that match the API request parameters. +-- +-- /See:/ for @YouTubeLiveStreamsList@. +module YouTube.LiveStreams.List + ( + -- * REST Resource + LiveStreamsListAPI + + -- * Creating a Request + , liveStreamsList + , LiveStreamsList + + -- * Request Lenses + , lslQuotaUser + , lslPart + , lslPrettyPrint + , lslMine + , lslUserIp + , lslOnBehalfOfContentOwner + , lslKey + , lslOnBehalfOfContentOwnerChannel + , lslId + , lslPageToken + , lslOauthToken + , lslMaxResults + , lslFields + , lslAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveStreamsList@ which the +-- 'LiveStreamsList' request conforms to. +type LiveStreamsListAPI = + "liveStreams" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] LiveStreamListResponse + +-- | Returns a list of video streams that match the API request parameters. +-- +-- /See:/ 'liveStreamsList' smart constructor. +data LiveStreamsList = LiveStreamsList + { _lslQuotaUser :: !(Maybe Text) + , _lslPart :: !Text + , _lslPrettyPrint :: !Bool + , _lslMine :: !(Maybe Bool) + , _lslUserIp :: !(Maybe Text) + , _lslOnBehalfOfContentOwner :: !(Maybe Text) + , _lslKey :: !(Maybe Text) + , _lslOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lslId :: !(Maybe Text) + , _lslPageToken :: !(Maybe Text) + , _lslOauthToken :: !(Maybe Text) + , _lslMaxResults :: !Word32 + , _lslFields :: !(Maybe Text) + , _lslAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lslQuotaUser' +-- +-- * 'lslPart' +-- +-- * 'lslPrettyPrint' +-- +-- * 'lslMine' +-- +-- * 'lslUserIp' +-- +-- * 'lslOnBehalfOfContentOwner' +-- +-- * 'lslKey' +-- +-- * 'lslOnBehalfOfContentOwnerChannel' +-- +-- * 'lslId' +-- +-- * 'lslPageToken' +-- +-- * 'lslOauthToken' +-- +-- * 'lslMaxResults' +-- +-- * 'lslFields' +-- +-- * 'lslAlt' +liveStreamsList + :: Text -- ^ 'part' + -> LiveStreamsList +liveStreamsList pLslPart_ = + LiveStreamsList + { _lslQuotaUser = Nothing + , _lslPart = pLslPart_ + , _lslPrettyPrint = True + , _lslMine = Nothing + , _lslUserIp = Nothing + , _lslOnBehalfOfContentOwner = Nothing + , _lslKey = Nothing + , _lslOnBehalfOfContentOwnerChannel = Nothing + , _lslId = Nothing + , _lslPageToken = Nothing + , _lslOauthToken = Nothing + , _lslMaxResults = 5 + , _lslFields = Nothing + , _lslAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lslQuotaUser :: Lens' LiveStreamsList' (Maybe Text) +lslQuotaUser + = lens _lslQuotaUser (\ s a -> s{_lslQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- liveStream resource properties that the API response will include. The +-- part names that you can include in the parameter value are id, snippet, +-- cdn, and status. +lslPart :: Lens' LiveStreamsList' Text +lslPart = lens _lslPart (\ s a -> s{_lslPart = a}) + +-- | Returns response with indentations and line breaks. +lslPrettyPrint :: Lens' LiveStreamsList' Bool +lslPrettyPrint + = lens _lslPrettyPrint + (\ s a -> s{_lslPrettyPrint = a}) + +-- | The mine parameter can be used to instruct the API to only return +-- streams owned by the authenticated user. Set the parameter value to true +-- to only retrieve your own streams. +lslMine :: Lens' LiveStreamsList' (Maybe Bool) +lslMine = lens _lslMine (\ s a -> s{_lslMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lslUserIp :: Lens' LiveStreamsList' (Maybe Text) +lslUserIp + = lens _lslUserIp (\ s a -> s{_lslUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lslOnBehalfOfContentOwner :: Lens' LiveStreamsList' (Maybe Text) +lslOnBehalfOfContentOwner + = lens _lslOnBehalfOfContentOwner + (\ s a -> s{_lslOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lslKey :: Lens' LiveStreamsList' (Maybe Text) +lslKey = lens _lslKey (\ s a -> s{_lslKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lslOnBehalfOfContentOwnerChannel :: Lens' LiveStreamsList' (Maybe Text) +lslOnBehalfOfContentOwnerChannel + = lens _lslOnBehalfOfContentOwnerChannel + (\ s a -> s{_lslOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies a comma-separated list of YouTube stream IDs +-- that identify the streams being retrieved. In a liveStream resource, the +-- id property specifies the stream\'s ID. +lslId :: Lens' LiveStreamsList' (Maybe Text) +lslId = lens _lslId (\ s a -> s{_lslId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +lslPageToken :: Lens' LiveStreamsList' (Maybe Text) +lslPageToken + = lens _lslPageToken (\ s a -> s{_lslPageToken = a}) + +-- | OAuth 2.0 token for the current user. +lslOauthToken :: Lens' LiveStreamsList' (Maybe Text) +lslOauthToken + = lens _lslOauthToken + (\ s a -> s{_lslOauthToken = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +lslMaxResults :: Lens' LiveStreamsList' Word32 +lslMaxResults + = lens _lslMaxResults + (\ s a -> s{_lslMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +lslFields :: Lens' LiveStreamsList' (Maybe Text) +lslFields + = lens _lslFields (\ s a -> s{_lslFields = a}) + +-- | Data format for the response. +lslAlt :: Lens' LiveStreamsList' Text +lslAlt = lens _lslAlt (\ s a -> s{_lslAlt = a}) + +instance GoogleRequest LiveStreamsList' where + type Rs LiveStreamsList' = LiveStreamListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveStreamsList{..} + = go _lslQuotaUser (Just _lslPart) _lslPrettyPrint + _lslMine + _lslUserIp + _lslOnBehalfOfContentOwner + _lslKey + _lslOnBehalfOfContentOwnerChannel + _lslId + _lslPageToken + _lslOauthToken + (Just _lslMaxResults) + _lslFields + _lslAlt + where go + = clientWithRoute (Proxy :: Proxy LiveStreamsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Update.hs new file mode 100644 index 000000000..38bac5d41 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/LiveStreams/Update.hs @@ -0,0 +1,219 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.LiveStreams.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a video stream. If the properties that you want to change cannot +-- be updated, then you need to create a new stream with the proper +-- settings. +-- +-- /See:/ for @YouTubeLiveStreamsUpdate@. +module YouTube.LiveStreams.Update + ( + -- * REST Resource + LiveStreamsUpdateAPI + + -- * Creating a Request + , liveStreamsUpdate + , LiveStreamsUpdate + + -- * Request Lenses + , lsuQuotaUser + , lsuPart + , lsuPrettyPrint + , lsuUserIp + , lsuOnBehalfOfContentOwner + , lsuKey + , lsuOnBehalfOfContentOwnerChannel + , lsuOauthToken + , lsuFields + , lsuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeLiveStreamsUpdate@ which the +-- 'LiveStreamsUpdate' request conforms to. +type LiveStreamsUpdateAPI = + "liveStreams" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Put '[JSON] LiveStream + +-- | Updates a video stream. If the properties that you want to change cannot +-- be updated, then you need to create a new stream with the proper +-- settings. +-- +-- /See:/ 'liveStreamsUpdate' smart constructor. +data LiveStreamsUpdate = LiveStreamsUpdate + { _lsuQuotaUser :: !(Maybe Text) + , _lsuPart :: !Text + , _lsuPrettyPrint :: !Bool + , _lsuUserIp :: !(Maybe Text) + , _lsuOnBehalfOfContentOwner :: !(Maybe Text) + , _lsuKey :: !(Maybe Text) + , _lsuOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _lsuOauthToken :: !(Maybe Text) + , _lsuFields :: !(Maybe Text) + , _lsuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsuQuotaUser' +-- +-- * 'lsuPart' +-- +-- * 'lsuPrettyPrint' +-- +-- * 'lsuUserIp' +-- +-- * 'lsuOnBehalfOfContentOwner' +-- +-- * 'lsuKey' +-- +-- * 'lsuOnBehalfOfContentOwnerChannel' +-- +-- * 'lsuOauthToken' +-- +-- * 'lsuFields' +-- +-- * 'lsuAlt' +liveStreamsUpdate + :: Text -- ^ 'part' + -> LiveStreamsUpdate +liveStreamsUpdate pLsuPart_ = + LiveStreamsUpdate + { _lsuQuotaUser = Nothing + , _lsuPart = pLsuPart_ + , _lsuPrettyPrint = True + , _lsuUserIp = Nothing + , _lsuOnBehalfOfContentOwner = Nothing + , _lsuKey = Nothing + , _lsuOnBehalfOfContentOwnerChannel = Nothing + , _lsuOauthToken = Nothing + , _lsuFields = Nothing + , _lsuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +lsuQuotaUser :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuQuotaUser + = lens _lsuQuotaUser (\ s a -> s{_lsuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. The part properties that +-- you can include in the parameter value are id, snippet, cdn, and status. +-- Note that this method will override the existing values for all of the +-- mutable properties that are contained in any parts that the parameter +-- value specifies. If the request body does not specify a value for a +-- mutable property, the existing value for that property will be removed. +lsuPart :: Lens' LiveStreamsUpdate' Text +lsuPart = lens _lsuPart (\ s a -> s{_lsuPart = a}) + +-- | Returns response with indentations and line breaks. +lsuPrettyPrint :: Lens' LiveStreamsUpdate' Bool +lsuPrettyPrint + = lens _lsuPrettyPrint + (\ s a -> s{_lsuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +lsuUserIp :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuUserIp + = lens _lsuUserIp (\ s a -> s{_lsuUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +lsuOnBehalfOfContentOwner :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuOnBehalfOfContentOwner + = lens _lsuOnBehalfOfContentOwner + (\ s a -> s{_lsuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +lsuKey :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuKey = lens _lsuKey (\ s a -> s{_lsuKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +lsuOnBehalfOfContentOwnerChannel :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuOnBehalfOfContentOwnerChannel + = lens _lsuOnBehalfOfContentOwnerChannel + (\ s a -> s{_lsuOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +lsuOauthToken :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuOauthToken + = lens _lsuOauthToken + (\ s a -> s{_lsuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +lsuFields :: Lens' LiveStreamsUpdate' (Maybe Text) +lsuFields + = lens _lsuFields (\ s a -> s{_lsuFields = a}) + +-- | Data format for the response. +lsuAlt :: Lens' LiveStreamsUpdate' Text +lsuAlt = lens _lsuAlt (\ s a -> s{_lsuAlt = a}) + +instance GoogleRequest LiveStreamsUpdate' where + type Rs LiveStreamsUpdate' = LiveStream + request = requestWithRoute defReq youTubeURL + requestWithRoute r u LiveStreamsUpdate{..} + = go _lsuQuotaUser (Just _lsuPart) _lsuPrettyPrint + _lsuUserIp + _lsuOnBehalfOfContentOwner + _lsuKey + _lsuOnBehalfOfContentOwnerChannel + _lsuOauthToken + _lsuFields + _lsuAlt + where go + = clientWithRoute + (Proxy :: Proxy LiveStreamsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Delete.hs new file mode 100644 index 000000000..26e7c1aea --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Delete.hs @@ -0,0 +1,158 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.PlaylistItems.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a playlist item. +-- +-- /See:/ for @YouTubePlaylistItemsDelete@. +module YouTube.PlaylistItems.Delete + ( + -- * REST Resource + PlaylistItemsDeleteAPI + + -- * Creating a Request + , playlistItemsDelete + , PlaylistItemsDelete + + -- * Request Lenses + , pidQuotaUser + , pidPrettyPrint + , pidUserIp + , pidKey + , pidId + , pidOauthToken + , pidFields + , pidAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistItemsDelete@ which the +-- 'PlaylistItemsDelete' request conforms to. +type PlaylistItemsDeleteAPI = + "playlistItems" :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a playlist item. +-- +-- /See:/ 'playlistItemsDelete' smart constructor. +data PlaylistItemsDelete = PlaylistItemsDelete + { _pidQuotaUser :: !(Maybe Text) + , _pidPrettyPrint :: !Bool + , _pidUserIp :: !(Maybe Text) + , _pidKey :: !(Maybe Text) + , _pidId :: !Text + , _pidOauthToken :: !(Maybe Text) + , _pidFields :: !(Maybe Text) + , _pidAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pidQuotaUser' +-- +-- * 'pidPrettyPrint' +-- +-- * 'pidUserIp' +-- +-- * 'pidKey' +-- +-- * 'pidId' +-- +-- * 'pidOauthToken' +-- +-- * 'pidFields' +-- +-- * 'pidAlt' +playlistItemsDelete + :: Text -- ^ 'id' + -> PlaylistItemsDelete +playlistItemsDelete pPidId_ = + PlaylistItemsDelete + { _pidQuotaUser = Nothing + , _pidPrettyPrint = True + , _pidUserIp = Nothing + , _pidKey = Nothing + , _pidId = pPidId_ + , _pidOauthToken = Nothing + , _pidFields = Nothing + , _pidAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pidQuotaUser :: Lens' PlaylistItemsDelete' (Maybe Text) +pidQuotaUser + = lens _pidQuotaUser (\ s a -> s{_pidQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pidPrettyPrint :: Lens' PlaylistItemsDelete' Bool +pidPrettyPrint + = lens _pidPrettyPrint + (\ s a -> s{_pidPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pidUserIp :: Lens' PlaylistItemsDelete' (Maybe Text) +pidUserIp + = lens _pidUserIp (\ s a -> s{_pidUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pidKey :: Lens' PlaylistItemsDelete' (Maybe Text) +pidKey = lens _pidKey (\ s a -> s{_pidKey = a}) + +-- | The id parameter specifies the YouTube playlist item ID for the playlist +-- item that is being deleted. In a playlistItem resource, the id property +-- specifies the playlist item\'s ID. +pidId :: Lens' PlaylistItemsDelete' Text +pidId = lens _pidId (\ s a -> s{_pidId = a}) + +-- | OAuth 2.0 token for the current user. +pidOauthToken :: Lens' PlaylistItemsDelete' (Maybe Text) +pidOauthToken + = lens _pidOauthToken + (\ s a -> s{_pidOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pidFields :: Lens' PlaylistItemsDelete' (Maybe Text) +pidFields + = lens _pidFields (\ s a -> s{_pidFields = a}) + +-- | Data format for the response. +pidAlt :: Lens' PlaylistItemsDelete' Text +pidAlt = lens _pidAlt (\ s a -> s{_pidAlt = a}) + +instance GoogleRequest PlaylistItemsDelete' where + type Rs PlaylistItemsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistItemsDelete{..} + = go _pidQuotaUser _pidPrettyPrint _pidUserIp _pidKey + (Just _pidId) + _pidOauthToken + _pidFields + _pidAlt + where go + = clientWithRoute + (Proxy :: Proxy PlaylistItemsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Insert.hs new file mode 100644 index 000000000..9ff804a30 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Insert.hs @@ -0,0 +1,182 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.PlaylistItems.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a resource to a playlist. +-- +-- /See:/ for @YouTubePlaylistItemsInsert@. +module YouTube.PlaylistItems.Insert + ( + -- * REST Resource + PlaylistItemsInsertAPI + + -- * Creating a Request + , playlistItemsInsert + , PlaylistItemsInsert + + -- * Request Lenses + , piiQuotaUser + , piiPart + , piiPrettyPrint + , piiUserIp + , piiOnBehalfOfContentOwner + , piiKey + , piiOauthToken + , piiFields + , piiAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistItemsInsert@ which the +-- 'PlaylistItemsInsert' request conforms to. +type PlaylistItemsInsertAPI = + "playlistItems" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] PlaylistItem + +-- | Adds a resource to a playlist. +-- +-- /See:/ 'playlistItemsInsert' smart constructor. +data PlaylistItemsInsert = PlaylistItemsInsert + { _piiQuotaUser :: !(Maybe Text) + , _piiPart :: !Text + , _piiPrettyPrint :: !Bool + , _piiUserIp :: !(Maybe Text) + , _piiOnBehalfOfContentOwner :: !(Maybe Text) + , _piiKey :: !(Maybe Text) + , _piiOauthToken :: !(Maybe Text) + , _piiFields :: !(Maybe Text) + , _piiAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piiQuotaUser' +-- +-- * 'piiPart' +-- +-- * 'piiPrettyPrint' +-- +-- * 'piiUserIp' +-- +-- * 'piiOnBehalfOfContentOwner' +-- +-- * 'piiKey' +-- +-- * 'piiOauthToken' +-- +-- * 'piiFields' +-- +-- * 'piiAlt' +playlistItemsInsert + :: Text -- ^ 'part' + -> PlaylistItemsInsert +playlistItemsInsert pPiiPart_ = + PlaylistItemsInsert + { _piiQuotaUser = Nothing + , _piiPart = pPiiPart_ + , _piiPrettyPrint = True + , _piiUserIp = Nothing + , _piiOnBehalfOfContentOwner = Nothing + , _piiKey = Nothing + , _piiOauthToken = Nothing + , _piiFields = Nothing + , _piiAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piiQuotaUser :: Lens' PlaylistItemsInsert' (Maybe Text) +piiQuotaUser + = lens _piiQuotaUser (\ s a -> s{_piiQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. +piiPart :: Lens' PlaylistItemsInsert' Text +piiPart = lens _piiPart (\ s a -> s{_piiPart = a}) + +-- | Returns response with indentations and line breaks. +piiPrettyPrint :: Lens' PlaylistItemsInsert' Bool +piiPrettyPrint + = lens _piiPrettyPrint + (\ s a -> s{_piiPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piiUserIp :: Lens' PlaylistItemsInsert' (Maybe Text) +piiUserIp + = lens _piiUserIp (\ s a -> s{_piiUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +piiOnBehalfOfContentOwner :: Lens' PlaylistItemsInsert' (Maybe Text) +piiOnBehalfOfContentOwner + = lens _piiOnBehalfOfContentOwner + (\ s a -> s{_piiOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piiKey :: Lens' PlaylistItemsInsert' (Maybe Text) +piiKey = lens _piiKey (\ s a -> s{_piiKey = a}) + +-- | OAuth 2.0 token for the current user. +piiOauthToken :: Lens' PlaylistItemsInsert' (Maybe Text) +piiOauthToken + = lens _piiOauthToken + (\ s a -> s{_piiOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piiFields :: Lens' PlaylistItemsInsert' (Maybe Text) +piiFields + = lens _piiFields (\ s a -> s{_piiFields = a}) + +-- | Data format for the response. +piiAlt :: Lens' PlaylistItemsInsert' Text +piiAlt = lens _piiAlt (\ s a -> s{_piiAlt = a}) + +instance GoogleRequest PlaylistItemsInsert' where + type Rs PlaylistItemsInsert' = PlaylistItem + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistItemsInsert{..} + = go _piiQuotaUser (Just _piiPart) _piiPrettyPrint + _piiUserIp + _piiOnBehalfOfContentOwner + _piiKey + _piiOauthToken + _piiFields + _piiAlt + where go + = clientWithRoute + (Proxy :: Proxy PlaylistItemsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/List.hs new file mode 100644 index 000000000..482283933 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/List.hs @@ -0,0 +1,260 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.PlaylistItems.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of playlist items that match the API request +-- parameters. You can retrieve all of the playlist items in a specified +-- playlist or retrieve one or more playlist items by their unique IDs. +-- +-- /See:/ for @YouTubePlaylistItemsList@. +module YouTube.PlaylistItems.List + ( + -- * REST Resource + PlaylistItemsListAPI + + -- * Creating a Request + , playlistItemsList + , PlaylistItemsList + + -- * Request Lenses + , pilQuotaUser + , pilPart + , pilPrettyPrint + , pilUserIp + , pilOnBehalfOfContentOwner + , pilVideoId + , pilKey + , pilId + , pilPageToken + , pilOauthToken + , pilPlaylistId + , pilMaxResults + , pilFields + , pilAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistItemsList@ which the +-- 'PlaylistItemsList' request conforms to. +type PlaylistItemsListAPI = + "playlistItems" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "videoId" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "playlistId" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PlaylistItemListResponse + +-- | Returns a collection of playlist items that match the API request +-- parameters. You can retrieve all of the playlist items in a specified +-- playlist or retrieve one or more playlist items by their unique IDs. +-- +-- /See:/ 'playlistItemsList' smart constructor. +data PlaylistItemsList = PlaylistItemsList + { _pilQuotaUser :: !(Maybe Text) + , _pilPart :: !Text + , _pilPrettyPrint :: !Bool + , _pilUserIp :: !(Maybe Text) + , _pilOnBehalfOfContentOwner :: !(Maybe Text) + , _pilVideoId :: !(Maybe Text) + , _pilKey :: !(Maybe Text) + , _pilId :: !(Maybe Text) + , _pilPageToken :: !(Maybe Text) + , _pilOauthToken :: !(Maybe Text) + , _pilPlaylistId :: !(Maybe Text) + , _pilMaxResults :: !Word32 + , _pilFields :: !(Maybe Text) + , _pilAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pilQuotaUser' +-- +-- * 'pilPart' +-- +-- * 'pilPrettyPrint' +-- +-- * 'pilUserIp' +-- +-- * 'pilOnBehalfOfContentOwner' +-- +-- * 'pilVideoId' +-- +-- * 'pilKey' +-- +-- * 'pilId' +-- +-- * 'pilPageToken' +-- +-- * 'pilOauthToken' +-- +-- * 'pilPlaylistId' +-- +-- * 'pilMaxResults' +-- +-- * 'pilFields' +-- +-- * 'pilAlt' +playlistItemsList + :: Text -- ^ 'part' + -> PlaylistItemsList +playlistItemsList pPilPart_ = + PlaylistItemsList + { _pilQuotaUser = Nothing + , _pilPart = pPilPart_ + , _pilPrettyPrint = True + , _pilUserIp = Nothing + , _pilOnBehalfOfContentOwner = Nothing + , _pilVideoId = Nothing + , _pilKey = Nothing + , _pilId = Nothing + , _pilPageToken = Nothing + , _pilOauthToken = Nothing + , _pilPlaylistId = Nothing + , _pilMaxResults = 5 + , _pilFields = Nothing + , _pilAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pilQuotaUser :: Lens' PlaylistItemsList' (Maybe Text) +pilQuotaUser + = lens _pilQuotaUser (\ s a -> s{_pilQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- playlistItem resource properties that the API response will include. If +-- the parameter identifies a property that contains child properties, the +-- child properties will be included in the response. For example, in a +-- playlistItem resource, the snippet property contains numerous fields, +-- including the title, description, position, and resourceId properties. +-- As such, if you set part=snippet, the API response will contain all of +-- those properties. +pilPart :: Lens' PlaylistItemsList' Text +pilPart = lens _pilPart (\ s a -> s{_pilPart = a}) + +-- | Returns response with indentations and line breaks. +pilPrettyPrint :: Lens' PlaylistItemsList' Bool +pilPrettyPrint + = lens _pilPrettyPrint + (\ s a -> s{_pilPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pilUserIp :: Lens' PlaylistItemsList' (Maybe Text) +pilUserIp + = lens _pilUserIp (\ s a -> s{_pilUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +pilOnBehalfOfContentOwner :: Lens' PlaylistItemsList' (Maybe Text) +pilOnBehalfOfContentOwner + = lens _pilOnBehalfOfContentOwner + (\ s a -> s{_pilOnBehalfOfContentOwner = a}) + +-- | The videoId parameter specifies that the request should return only the +-- playlist items that contain the specified video. +pilVideoId :: Lens' PlaylistItemsList' (Maybe Text) +pilVideoId + = lens _pilVideoId (\ s a -> s{_pilVideoId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pilKey :: Lens' PlaylistItemsList' (Maybe Text) +pilKey = lens _pilKey (\ s a -> s{_pilKey = a}) + +-- | The id parameter specifies a comma-separated list of one or more unique +-- playlist item IDs. +pilId :: Lens' PlaylistItemsList' (Maybe Text) +pilId = lens _pilId (\ s a -> s{_pilId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +pilPageToken :: Lens' PlaylistItemsList' (Maybe Text) +pilPageToken + = lens _pilPageToken (\ s a -> s{_pilPageToken = a}) + +-- | OAuth 2.0 token for the current user. +pilOauthToken :: Lens' PlaylistItemsList' (Maybe Text) +pilOauthToken + = lens _pilOauthToken + (\ s a -> s{_pilOauthToken = a}) + +-- | The playlistId parameter specifies the unique ID of the playlist for +-- which you want to retrieve playlist items. Note that even though this is +-- an optional parameter, every request to retrieve playlist items must +-- specify a value for either the id parameter or the playlistId parameter. +pilPlaylistId :: Lens' PlaylistItemsList' (Maybe Text) +pilPlaylistId + = lens _pilPlaylistId + (\ s a -> s{_pilPlaylistId = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +pilMaxResults :: Lens' PlaylistItemsList' Word32 +pilMaxResults + = lens _pilMaxResults + (\ s a -> s{_pilMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +pilFields :: Lens' PlaylistItemsList' (Maybe Text) +pilFields + = lens _pilFields (\ s a -> s{_pilFields = a}) + +-- | Data format for the response. +pilAlt :: Lens' PlaylistItemsList' Text +pilAlt = lens _pilAlt (\ s a -> s{_pilAlt = a}) + +instance GoogleRequest PlaylistItemsList' where + type Rs PlaylistItemsList' = PlaylistItemListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistItemsList{..} + = go _pilQuotaUser (Just _pilPart) _pilPrettyPrint + _pilUserIp + _pilOnBehalfOfContentOwner + _pilVideoId + _pilKey + _pilId + _pilPageToken + _pilOauthToken + _pilPlaylistId + (Just _pilMaxResults) + _pilFields + _pilAlt + where go + = clientWithRoute + (Proxy :: Proxy PlaylistItemsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Update.hs new file mode 100644 index 000000000..ee56dd222 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/PlaylistItems/Update.hs @@ -0,0 +1,171 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.PlaylistItems.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies a playlist item. For example, you could update the item\'s +-- position in the playlist. +-- +-- /See:/ for @YouTubePlaylistItemsUpdate@. +module YouTube.PlaylistItems.Update + ( + -- * REST Resource + PlaylistItemsUpdateAPI + + -- * Creating a Request + , playlistItemsUpdate + , PlaylistItemsUpdate + + -- * Request Lenses + , piuQuotaUser + , piuPart + , piuPrettyPrint + , piuUserIp + , piuKey + , piuOauthToken + , piuFields + , piuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistItemsUpdate@ which the +-- 'PlaylistItemsUpdate' request conforms to. +type PlaylistItemsUpdateAPI = + "playlistItems" :> + QueryParam "part" Text :> Put '[JSON] PlaylistItem + +-- | Modifies a playlist item. For example, you could update the item\'s +-- position in the playlist. +-- +-- /See:/ 'playlistItemsUpdate' smart constructor. +data PlaylistItemsUpdate = PlaylistItemsUpdate + { _piuQuotaUser :: !(Maybe Text) + , _piuPart :: !Text + , _piuPrettyPrint :: !Bool + , _piuUserIp :: !(Maybe Text) + , _piuKey :: !(Maybe Text) + , _piuOauthToken :: !(Maybe Text) + , _piuFields :: !(Maybe Text) + , _piuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piuQuotaUser' +-- +-- * 'piuPart' +-- +-- * 'piuPrettyPrint' +-- +-- * 'piuUserIp' +-- +-- * 'piuKey' +-- +-- * 'piuOauthToken' +-- +-- * 'piuFields' +-- +-- * 'piuAlt' +playlistItemsUpdate + :: Text -- ^ 'part' + -> PlaylistItemsUpdate +playlistItemsUpdate pPiuPart_ = + PlaylistItemsUpdate + { _piuQuotaUser = Nothing + , _piuPart = pPiuPart_ + , _piuPrettyPrint = True + , _piuUserIp = Nothing + , _piuKey = Nothing + , _piuOauthToken = Nothing + , _piuFields = Nothing + , _piuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piuQuotaUser :: Lens' PlaylistItemsUpdate' (Maybe Text) +piuQuotaUser + = lens _piuQuotaUser (\ s a -> s{_piuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. Note that this method +-- will override the existing values for all of the mutable properties that +-- are contained in any parts that the parameter value specifies. For +-- example, a playlist item can specify a start time and end time, which +-- identify the times portion of the video that should play when users +-- watch the video in the playlist. If your request is updating a playlist +-- item that sets these values, and the request\'s part parameter value +-- includes the contentDetails part, the playlist item\'s start and end +-- times will be updated to whatever value the request body specifies. If +-- the request body does not specify values, the existing start and end +-- times will be removed and replaced with the default settings. +piuPart :: Lens' PlaylistItemsUpdate' Text +piuPart = lens _piuPart (\ s a -> s{_piuPart = a}) + +-- | Returns response with indentations and line breaks. +piuPrettyPrint :: Lens' PlaylistItemsUpdate' Bool +piuPrettyPrint + = lens _piuPrettyPrint + (\ s a -> s{_piuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piuUserIp :: Lens' PlaylistItemsUpdate' (Maybe Text) +piuUserIp + = lens _piuUserIp (\ s a -> s{_piuUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piuKey :: Lens' PlaylistItemsUpdate' (Maybe Text) +piuKey = lens _piuKey (\ s a -> s{_piuKey = a}) + +-- | OAuth 2.0 token for the current user. +piuOauthToken :: Lens' PlaylistItemsUpdate' (Maybe Text) +piuOauthToken + = lens _piuOauthToken + (\ s a -> s{_piuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piuFields :: Lens' PlaylistItemsUpdate' (Maybe Text) +piuFields + = lens _piuFields (\ s a -> s{_piuFields = a}) + +-- | Data format for the response. +piuAlt :: Lens' PlaylistItemsUpdate' Text +piuAlt = lens _piuAlt (\ s a -> s{_piuAlt = a}) + +instance GoogleRequest PlaylistItemsUpdate' where + type Rs PlaylistItemsUpdate' = PlaylistItem + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistItemsUpdate{..} + = go _piuQuotaUser (Just _piuPart) _piuPrettyPrint + _piuUserIp + _piuKey + _piuOauthToken + _piuFields + _piuAlt + where go + = clientWithRoute + (Proxy :: Proxy PlaylistItemsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Delete.hs new file mode 100644 index 000000000..7b4ceae81 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Delete.hs @@ -0,0 +1,177 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Playlists.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a playlist. +-- +-- /See:/ for @YouTubePlaylistsDelete@. +module YouTube.Playlists.Delete + ( + -- * REST Resource + PlaylistsDeleteAPI + + -- * Creating a Request + , playlistsDelete + , PlaylistsDelete + + -- * Request Lenses + , pdQuotaUser + , pdPrettyPrint + , pdUserIp + , pdOnBehalfOfContentOwner + , pdKey + , pdId + , pdOauthToken + , pdFields + , pdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistsDelete@ which the +-- 'PlaylistsDelete' request conforms to. +type PlaylistsDeleteAPI = + "playlists" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a playlist. +-- +-- /See:/ 'playlistsDelete' smart constructor. +data PlaylistsDelete = PlaylistsDelete + { _pdQuotaUser :: !(Maybe Text) + , _pdPrettyPrint :: !Bool + , _pdUserIp :: !(Maybe Text) + , _pdOnBehalfOfContentOwner :: !(Maybe Text) + , _pdKey :: !(Maybe Text) + , _pdId :: !Text + , _pdOauthToken :: !(Maybe Text) + , _pdFields :: !(Maybe Text) + , _pdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pdQuotaUser' +-- +-- * 'pdPrettyPrint' +-- +-- * 'pdUserIp' +-- +-- * 'pdOnBehalfOfContentOwner' +-- +-- * 'pdKey' +-- +-- * 'pdId' +-- +-- * 'pdOauthToken' +-- +-- * 'pdFields' +-- +-- * 'pdAlt' +playlistsDelete + :: Text -- ^ 'id' + -> PlaylistsDelete +playlistsDelete pPdId_ = + PlaylistsDelete + { _pdQuotaUser = Nothing + , _pdPrettyPrint = True + , _pdUserIp = Nothing + , _pdOnBehalfOfContentOwner = Nothing + , _pdKey = Nothing + , _pdId = pPdId_ + , _pdOauthToken = Nothing + , _pdFields = Nothing + , _pdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +pdQuotaUser :: Lens' PlaylistsDelete' (Maybe Text) +pdQuotaUser + = lens _pdQuotaUser (\ s a -> s{_pdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +pdPrettyPrint :: Lens' PlaylistsDelete' Bool +pdPrettyPrint + = lens _pdPrettyPrint + (\ s a -> s{_pdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +pdUserIp :: Lens' PlaylistsDelete' (Maybe Text) +pdUserIp = lens _pdUserIp (\ s a -> s{_pdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +pdOnBehalfOfContentOwner :: Lens' PlaylistsDelete' (Maybe Text) +pdOnBehalfOfContentOwner + = lens _pdOnBehalfOfContentOwner + (\ s a -> s{_pdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +pdKey :: Lens' PlaylistsDelete' (Maybe Text) +pdKey = lens _pdKey (\ s a -> s{_pdKey = a}) + +-- | The id parameter specifies the YouTube playlist ID for the playlist that +-- is being deleted. In a playlist resource, the id property specifies the +-- playlist\'s ID. +pdId :: Lens' PlaylistsDelete' Text +pdId = lens _pdId (\ s a -> s{_pdId = a}) + +-- | OAuth 2.0 token for the current user. +pdOauthToken :: Lens' PlaylistsDelete' (Maybe Text) +pdOauthToken + = lens _pdOauthToken (\ s a -> s{_pdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +pdFields :: Lens' PlaylistsDelete' (Maybe Text) +pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) + +-- | Data format for the response. +pdAlt :: Lens' PlaylistsDelete' Text +pdAlt = lens _pdAlt (\ s a -> s{_pdAlt = a}) + +instance GoogleRequest PlaylistsDelete' where + type Rs PlaylistsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistsDelete{..} + = go _pdQuotaUser _pdPrettyPrint _pdUserIp + _pdOnBehalfOfContentOwner + _pdKey + (Just _pdId) + _pdOauthToken + _pdFields + _pdAlt + where go + = clientWithRoute (Proxy :: Proxy PlaylistsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Insert.hs new file mode 100644 index 000000000..da9570fff --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Insert.hs @@ -0,0 +1,206 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Playlists.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Creates a playlist. +-- +-- /See:/ for @YouTubePlaylistsInsert@. +module YouTube.Playlists.Insert + ( + -- * REST Resource + PlaylistsInsertAPI + + -- * Creating a Request + , playlistsInsert + , PlaylistsInsert + + -- * Request Lenses + , piQuotaUser + , piPart + , piPrettyPrint + , piUserIp + , piOnBehalfOfContentOwner + , piKey + , piOnBehalfOfContentOwnerChannel + , piOauthToken + , piFields + , piAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistsInsert@ which the +-- 'PlaylistsInsert' request conforms to. +type PlaylistsInsertAPI = + "playlists" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + Post '[JSON] Playlist + +-- | Creates a playlist. +-- +-- /See:/ 'playlistsInsert' smart constructor. +data PlaylistsInsert = PlaylistsInsert + { _piQuotaUser :: !(Maybe Text) + , _piPart :: !Text + , _piPrettyPrint :: !Bool + , _piUserIp :: !(Maybe Text) + , _piOnBehalfOfContentOwner :: !(Maybe Text) + , _piKey :: !(Maybe Text) + , _piOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _piOauthToken :: !(Maybe Text) + , _piFields :: !(Maybe Text) + , _piAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piQuotaUser' +-- +-- * 'piPart' +-- +-- * 'piPrettyPrint' +-- +-- * 'piUserIp' +-- +-- * 'piOnBehalfOfContentOwner' +-- +-- * 'piKey' +-- +-- * 'piOnBehalfOfContentOwnerChannel' +-- +-- * 'piOauthToken' +-- +-- * 'piFields' +-- +-- * 'piAlt' +playlistsInsert + :: Text -- ^ 'part' + -> PlaylistsInsert +playlistsInsert pPiPart_ = + PlaylistsInsert + { _piQuotaUser = Nothing + , _piPart = pPiPart_ + , _piPrettyPrint = True + , _piUserIp = Nothing + , _piOnBehalfOfContentOwner = Nothing + , _piKey = Nothing + , _piOnBehalfOfContentOwnerChannel = Nothing + , _piOauthToken = Nothing + , _piFields = Nothing + , _piAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +piQuotaUser :: Lens' PlaylistsInsert' (Maybe Text) +piQuotaUser + = lens _piQuotaUser (\ s a -> s{_piQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. +piPart :: Lens' PlaylistsInsert' Text +piPart = lens _piPart (\ s a -> s{_piPart = a}) + +-- | Returns response with indentations and line breaks. +piPrettyPrint :: Lens' PlaylistsInsert' Bool +piPrettyPrint + = lens _piPrettyPrint + (\ s a -> s{_piPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +piUserIp :: Lens' PlaylistsInsert' (Maybe Text) +piUserIp = lens _piUserIp (\ s a -> s{_piUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +piOnBehalfOfContentOwner :: Lens' PlaylistsInsert' (Maybe Text) +piOnBehalfOfContentOwner + = lens _piOnBehalfOfContentOwner + (\ s a -> s{_piOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +piKey :: Lens' PlaylistsInsert' (Maybe Text) +piKey = lens _piKey (\ s a -> s{_piKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +piOnBehalfOfContentOwnerChannel :: Lens' PlaylistsInsert' (Maybe Text) +piOnBehalfOfContentOwnerChannel + = lens _piOnBehalfOfContentOwnerChannel + (\ s a -> s{_piOnBehalfOfContentOwnerChannel = a}) + +-- | OAuth 2.0 token for the current user. +piOauthToken :: Lens' PlaylistsInsert' (Maybe Text) +piOauthToken + = lens _piOauthToken (\ s a -> s{_piOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +piFields :: Lens' PlaylistsInsert' (Maybe Text) +piFields = lens _piFields (\ s a -> s{_piFields = a}) + +-- | Data format for the response. +piAlt :: Lens' PlaylistsInsert' Text +piAlt = lens _piAlt (\ s a -> s{_piAlt = a}) + +instance GoogleRequest PlaylistsInsert' where + type Rs PlaylistsInsert' = Playlist + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistsInsert{..} + = go _piQuotaUser (Just _piPart) _piPrettyPrint + _piUserIp + _piOnBehalfOfContentOwner + _piKey + _piOnBehalfOfContentOwnerChannel + _piOauthToken + _piFields + _piAlt + where go + = clientWithRoute (Proxy :: Proxy PlaylistsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/List.hs new file mode 100644 index 000000000..38cd76953 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/List.hs @@ -0,0 +1,291 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Playlists.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of playlists that match the API request parameters. +-- For example, you can retrieve all playlists that the authenticated user +-- owns, or you can retrieve one or more playlists by their unique IDs. +-- +-- /See:/ for @YouTubePlaylistsList@. +module YouTube.Playlists.List + ( + -- * REST Resource + PlaylistsListAPI + + -- * Creating a Request + , playlistsList + , PlaylistsList + + -- * Request Lenses + , plQuotaUser + , plPart + , plPrettyPrint + , plMine + , plUserIp + , plChannelId + , plHl + , plOnBehalfOfContentOwner + , plKey + , plOnBehalfOfContentOwnerChannel + , plId + , plPageToken + , plOauthToken + , plMaxResults + , plFields + , plAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistsList@ which the +-- 'PlaylistsList' request conforms to. +type PlaylistsListAPI = + "playlists" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "channelId" Text :> + QueryParam "hl" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] PlaylistListResponse + +-- | Returns a collection of playlists that match the API request parameters. +-- For example, you can retrieve all playlists that the authenticated user +-- owns, or you can retrieve one or more playlists by their unique IDs. +-- +-- /See:/ 'playlistsList' smart constructor. +data PlaylistsList = PlaylistsList + { _plQuotaUser :: !(Maybe Text) + , _plPart :: !Text + , _plPrettyPrint :: !Bool + , _plMine :: !(Maybe Bool) + , _plUserIp :: !(Maybe Text) + , _plChannelId :: !(Maybe Text) + , _plHl :: !(Maybe Text) + , _plOnBehalfOfContentOwner :: !(Maybe Text) + , _plKey :: !(Maybe Text) + , _plOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _plId :: !(Maybe Text) + , _plPageToken :: !(Maybe Text) + , _plOauthToken :: !(Maybe Text) + , _plMaxResults :: !Word32 + , _plFields :: !(Maybe Text) + , _plAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plQuotaUser' +-- +-- * 'plPart' +-- +-- * 'plPrettyPrint' +-- +-- * 'plMine' +-- +-- * 'plUserIp' +-- +-- * 'plChannelId' +-- +-- * 'plHl' +-- +-- * 'plOnBehalfOfContentOwner' +-- +-- * 'plKey' +-- +-- * 'plOnBehalfOfContentOwnerChannel' +-- +-- * 'plId' +-- +-- * 'plPageToken' +-- +-- * 'plOauthToken' +-- +-- * 'plMaxResults' +-- +-- * 'plFields' +-- +-- * 'plAlt' +playlistsList + :: Text -- ^ 'part' + -> PlaylistsList +playlistsList pPlPart_ = + PlaylistsList + { _plQuotaUser = Nothing + , _plPart = pPlPart_ + , _plPrettyPrint = True + , _plMine = Nothing + , _plUserIp = Nothing + , _plChannelId = Nothing + , _plHl = Nothing + , _plOnBehalfOfContentOwner = Nothing + , _plKey = Nothing + , _plOnBehalfOfContentOwnerChannel = Nothing + , _plId = Nothing + , _plPageToken = Nothing + , _plOauthToken = Nothing + , _plMaxResults = 5 + , _plFields = Nothing + , _plAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +plQuotaUser :: Lens' PlaylistsList' (Maybe Text) +plQuotaUser + = lens _plQuotaUser (\ s a -> s{_plQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- playlist resource properties that the API response will include. If the +-- parameter identifies a property that contains child properties, the +-- child properties will be included in the response. For example, in a +-- playlist resource, the snippet property contains properties like author, +-- title, description, tags, and timeCreated. As such, if you set +-- part=snippet, the API response will contain all of those properties. +plPart :: Lens' PlaylistsList' Text +plPart = lens _plPart (\ s a -> s{_plPart = a}) + +-- | Returns response with indentations and line breaks. +plPrettyPrint :: Lens' PlaylistsList' Bool +plPrettyPrint + = lens _plPrettyPrint + (\ s a -> s{_plPrettyPrint = a}) + +-- | Set this parameter\'s value to true to instruct the API to only return +-- playlists owned by the authenticated user. +plMine :: Lens' PlaylistsList' (Maybe Bool) +plMine = lens _plMine (\ s a -> s{_plMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +plUserIp :: Lens' PlaylistsList' (Maybe Text) +plUserIp = lens _plUserIp (\ s a -> s{_plUserIp = a}) + +-- | This value indicates that the API should only return the specified +-- channel\'s playlists. +plChannelId :: Lens' PlaylistsList' (Maybe Text) +plChannelId + = lens _plChannelId (\ s a -> s{_plChannelId = a}) + +-- | The hl parameter should be used for filter out the properties that are +-- not in the given language. Used for the snippet part. +plHl :: Lens' PlaylistsList' (Maybe Text) +plHl = lens _plHl (\ s a -> s{_plHl = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +plOnBehalfOfContentOwner :: Lens' PlaylistsList' (Maybe Text) +plOnBehalfOfContentOwner + = lens _plOnBehalfOfContentOwner + (\ s a -> s{_plOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +plKey :: Lens' PlaylistsList' (Maybe Text) +plKey = lens _plKey (\ s a -> s{_plKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +plOnBehalfOfContentOwnerChannel :: Lens' PlaylistsList' (Maybe Text) +plOnBehalfOfContentOwnerChannel + = lens _plOnBehalfOfContentOwnerChannel + (\ s a -> s{_plOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube +-- playlist ID(s) for the resource(s) that are being retrieved. In a +-- playlist resource, the id property specifies the playlist\'s YouTube +-- playlist ID. +plId :: Lens' PlaylistsList' (Maybe Text) +plId = lens _plId (\ s a -> s{_plId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +plPageToken :: Lens' PlaylistsList' (Maybe Text) +plPageToken + = lens _plPageToken (\ s a -> s{_plPageToken = a}) + +-- | OAuth 2.0 token for the current user. +plOauthToken :: Lens' PlaylistsList' (Maybe Text) +plOauthToken + = lens _plOauthToken (\ s a -> s{_plOauthToken = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +plMaxResults :: Lens' PlaylistsList' Word32 +plMaxResults + = lens _plMaxResults (\ s a -> s{_plMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +plFields :: Lens' PlaylistsList' (Maybe Text) +plFields = lens _plFields (\ s a -> s{_plFields = a}) + +-- | Data format for the response. +plAlt :: Lens' PlaylistsList' Text +plAlt = lens _plAlt (\ s a -> s{_plAlt = a}) + +instance GoogleRequest PlaylistsList' where + type Rs PlaylistsList' = PlaylistListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistsList{..} + = go _plQuotaUser (Just _plPart) _plPrettyPrint + _plMine + _plUserIp + _plChannelId + _plHl + _plOnBehalfOfContentOwner + _plKey + _plOnBehalfOfContentOwnerChannel + _plId + _plPageToken + _plOauthToken + (Just _plMaxResults) + _plFields + _plAlt + where go + = clientWithRoute (Proxy :: Proxy PlaylistsListAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Update.hs new file mode 100644 index 000000000..a4f33efbf --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Playlists/Update.hs @@ -0,0 +1,186 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Playlists.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Modifies a playlist. For example, you could change a playlist\'s title, +-- description, or privacy status. +-- +-- /See:/ for @YouTubePlaylistsUpdate@. +module YouTube.Playlists.Update + ( + -- * REST Resource + PlaylistsUpdateAPI + + -- * Creating a Request + , playlistsUpdate + , PlaylistsUpdate + + -- * Request Lenses + , puQuotaUser + , puPart + , puPrettyPrint + , puUserIp + , puOnBehalfOfContentOwner + , puKey + , puOauthToken + , puFields + , puAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubePlaylistsUpdate@ which the +-- 'PlaylistsUpdate' request conforms to. +type PlaylistsUpdateAPI = + "playlists" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Put '[JSON] Playlist + +-- | Modifies a playlist. For example, you could change a playlist\'s title, +-- description, or privacy status. +-- +-- /See:/ 'playlistsUpdate' smart constructor. +data PlaylistsUpdate = PlaylistsUpdate + { _puQuotaUser :: !(Maybe Text) + , _puPart :: !Text + , _puPrettyPrint :: !Bool + , _puUserIp :: !(Maybe Text) + , _puOnBehalfOfContentOwner :: !(Maybe Text) + , _puKey :: !(Maybe Text) + , _puOauthToken :: !(Maybe Text) + , _puFields :: !(Maybe Text) + , _puAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistsUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'puQuotaUser' +-- +-- * 'puPart' +-- +-- * 'puPrettyPrint' +-- +-- * 'puUserIp' +-- +-- * 'puOnBehalfOfContentOwner' +-- +-- * 'puKey' +-- +-- * 'puOauthToken' +-- +-- * 'puFields' +-- +-- * 'puAlt' +playlistsUpdate + :: Text -- ^ 'part' + -> PlaylistsUpdate +playlistsUpdate pPuPart_ = + PlaylistsUpdate + { _puQuotaUser = Nothing + , _puPart = pPuPart_ + , _puPrettyPrint = True + , _puUserIp = Nothing + , _puOnBehalfOfContentOwner = Nothing + , _puKey = Nothing + , _puOauthToken = Nothing + , _puFields = Nothing + , _puAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +puQuotaUser :: Lens' PlaylistsUpdate' (Maybe Text) +puQuotaUser + = lens _puQuotaUser (\ s a -> s{_puQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. Note that this method +-- will override the existing values for mutable properties that are +-- contained in any parts that the request body specifies. For example, a +-- playlist\'s description is contained in the snippet part, which must be +-- included in the request body. If the request does not specify a value +-- for the snippet.description property, the playlist\'s existing +-- description will be deleted. +puPart :: Lens' PlaylistsUpdate' Text +puPart = lens _puPart (\ s a -> s{_puPart = a}) + +-- | Returns response with indentations and line breaks. +puPrettyPrint :: Lens' PlaylistsUpdate' Bool +puPrettyPrint + = lens _puPrettyPrint + (\ s a -> s{_puPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +puUserIp :: Lens' PlaylistsUpdate' (Maybe Text) +puUserIp = lens _puUserIp (\ s a -> s{_puUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +puOnBehalfOfContentOwner :: Lens' PlaylistsUpdate' (Maybe Text) +puOnBehalfOfContentOwner + = lens _puOnBehalfOfContentOwner + (\ s a -> s{_puOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +puKey :: Lens' PlaylistsUpdate' (Maybe Text) +puKey = lens _puKey (\ s a -> s{_puKey = a}) + +-- | OAuth 2.0 token for the current user. +puOauthToken :: Lens' PlaylistsUpdate' (Maybe Text) +puOauthToken + = lens _puOauthToken (\ s a -> s{_puOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +puFields :: Lens' PlaylistsUpdate' (Maybe Text) +puFields = lens _puFields (\ s a -> s{_puFields = a}) + +-- | Data format for the response. +puAlt :: Lens' PlaylistsUpdate' Text +puAlt = lens _puAlt (\ s a -> s{_puAlt = a}) + +instance GoogleRequest PlaylistsUpdate' where + type Rs PlaylistsUpdate' = Playlist + request = requestWithRoute defReq youTubeURL + requestWithRoute r u PlaylistsUpdate{..} + = go _puQuotaUser (Just _puPart) _puPrettyPrint + _puUserIp + _puOnBehalfOfContentOwner + _puKey + _puOauthToken + _puFields + _puAlt + where go + = clientWithRoute (Proxy :: Proxy PlaylistsUpdateAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Search/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Search/List.hs new file mode 100644 index 000000000..3ef0d360b --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Search/List.hs @@ -0,0 +1,652 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Search.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a collection of search results that match the query parameters +-- specified in the API request. By default, a search result set identifies +-- matching video, channel, and playlist resources, but you can also +-- configure queries to only retrieve a specific type of resource. +-- +-- /See:/ for @YouTubeSearchList@. +module YouTube.Search.List + ( + -- * REST Resource + SearchListAPI + + -- * Creating a Request + , searchList + , SearchList + + -- * Request Lenses + , sPublishedAfter + , sVideoDefinition + , sQuotaUser + , sPart + , sVideoDuration + , sPrettyPrint + , sVideoCaption + , sVideoLicense + , sRegionCode + , sForDeveloper + , sLocation + , sLocationRadius + , sUserIp + , sForContentOwner + , sChannelId + , sQ + , sForMine + , sVideoEmbeddable + , sEventType + , sOnBehalfOfContentOwner + , sVideoCategoryId + , sTopicId + , sKey + , sSafeSearch + , sVideoSyndicated + , sRelatedToVideoId + , sPageToken + , sType + , sOauthToken + , sChannelType + , sRelevanceLanguage + , sOrder + , sMaxResults + , sPublishedBefore + , sVideoType + , sVideoDimension + , sFields + , sAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeSearchList@ which the +-- 'SearchList' request conforms to. +type SearchListAPI = + "search" :> + QueryParam "publishedAfter" UTCTime :> + QueryParam "videoDefinition" Text :> + QueryParam "part" Text :> + QueryParam "videoDuration" Text :> + QueryParam "videoCaption" Text :> + QueryParam "videoLicense" Text :> + QueryParam "regionCode" Text :> + QueryParam "forDeveloper" Bool :> + QueryParam "location" Text :> + QueryParam "locationRadius" Text :> + QueryParam "forContentOwner" Bool :> + QueryParam "channelId" Text :> + QueryParam "q" Text :> + QueryParam "forMine" Bool :> + QueryParam "videoEmbeddable" Text :> + QueryParam "eventType" Text :> + QueryParam "onBehalfOfContentOwner" Text + :> + QueryParam "videoCategoryId" Text :> + QueryParam "topicId" Text :> + QueryParam "safeSearch" Text :> + QueryParam "videoSyndicated" Text + :> + QueryParam "relatedToVideoId" + Text + :> + QueryParam "pageToken" Text + :> + QueryParam "type" Text :> + QueryParam "channelType" + Text + :> + QueryParam + "relevanceLanguage" + Text + :> + QueryParam "order" + Text + :> + QueryParam + "maxResults" + Word32 + :> + QueryParam + "publishedBefore" + UTCTime + :> + QueryParam + "videoType" + Text + :> + QueryParam + "videoDimension" + Text + :> + Get '[JSON] + SearchListResponse + +-- | Returns a collection of search results that match the query parameters +-- specified in the API request. By default, a search result set identifies +-- matching video, channel, and playlist resources, but you can also +-- configure queries to only retrieve a specific type of resource. +-- +-- /See:/ 'searchList' smart constructor. +data SearchList = SearchList + { _sPublishedAfter :: !(Maybe UTCTime) + , _sVideoDefinition :: !(Maybe Text) + , _sQuotaUser :: !(Maybe Text) + , _sPart :: !Text + , _sVideoDuration :: !(Maybe Text) + , _sPrettyPrint :: !Bool + , _sVideoCaption :: !(Maybe Text) + , _sVideoLicense :: !(Maybe Text) + , _sRegionCode :: !(Maybe Text) + , _sForDeveloper :: !(Maybe Bool) + , _sLocation :: !(Maybe Text) + , _sLocationRadius :: !(Maybe Text) + , _sUserIp :: !(Maybe Text) + , _sForContentOwner :: !(Maybe Bool) + , _sChannelId :: !(Maybe Text) + , _sQ :: !(Maybe Text) + , _sForMine :: !(Maybe Bool) + , _sVideoEmbeddable :: !(Maybe Text) + , _sEventType :: !(Maybe Text) + , _sOnBehalfOfContentOwner :: !(Maybe Text) + , _sVideoCategoryId :: !(Maybe Text) + , _sTopicId :: !(Maybe Text) + , _sKey :: !(Maybe Text) + , _sSafeSearch :: !(Maybe Text) + , _sVideoSyndicated :: !(Maybe Text) + , _sRelatedToVideoId :: !(Maybe Text) + , _sPageToken :: !(Maybe Text) + , _sType :: !Text + , _sOauthToken :: !(Maybe Text) + , _sChannelType :: !(Maybe Text) + , _sRelevanceLanguage :: !(Maybe Text) + , _sOrder :: !Text + , _sMaxResults :: !Word32 + , _sPublishedBefore :: !(Maybe UTCTime) + , _sVideoType :: !(Maybe Text) + , _sVideoDimension :: !(Maybe Text) + , _sFields :: !(Maybe Text) + , _sAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sPublishedAfter' +-- +-- * 'sVideoDefinition' +-- +-- * 'sQuotaUser' +-- +-- * 'sPart' +-- +-- * 'sVideoDuration' +-- +-- * 'sPrettyPrint' +-- +-- * 'sVideoCaption' +-- +-- * 'sVideoLicense' +-- +-- * 'sRegionCode' +-- +-- * 'sForDeveloper' +-- +-- * 'sLocation' +-- +-- * 'sLocationRadius' +-- +-- * 'sUserIp' +-- +-- * 'sForContentOwner' +-- +-- * 'sChannelId' +-- +-- * 'sQ' +-- +-- * 'sForMine' +-- +-- * 'sVideoEmbeddable' +-- +-- * 'sEventType' +-- +-- * 'sOnBehalfOfContentOwner' +-- +-- * 'sVideoCategoryId' +-- +-- * 'sTopicId' +-- +-- * 'sKey' +-- +-- * 'sSafeSearch' +-- +-- * 'sVideoSyndicated' +-- +-- * 'sRelatedToVideoId' +-- +-- * 'sPageToken' +-- +-- * 'sType' +-- +-- * 'sOauthToken' +-- +-- * 'sChannelType' +-- +-- * 'sRelevanceLanguage' +-- +-- * 'sOrder' +-- +-- * 'sMaxResults' +-- +-- * 'sPublishedBefore' +-- +-- * 'sVideoType' +-- +-- * 'sVideoDimension' +-- +-- * 'sFields' +-- +-- * 'sAlt' +searchList + :: Text -- ^ 'part' + -> SearchList +searchList pSPart_ = + SearchList + { _sPublishedAfter = Nothing + , _sVideoDefinition = Nothing + , _sQuotaUser = Nothing + , _sPart = pSPart_ + , _sVideoDuration = Nothing + , _sPrettyPrint = True + , _sVideoCaption = Nothing + , _sVideoLicense = Nothing + , _sRegionCode = Nothing + , _sForDeveloper = Nothing + , _sLocation = Nothing + , _sLocationRadius = Nothing + , _sUserIp = Nothing + , _sForContentOwner = Nothing + , _sChannelId = Nothing + , _sQ = Nothing + , _sForMine = Nothing + , _sVideoEmbeddable = Nothing + , _sEventType = Nothing + , _sOnBehalfOfContentOwner = Nothing + , _sVideoCategoryId = Nothing + , _sTopicId = Nothing + , _sKey = Nothing + , _sSafeSearch = Nothing + , _sVideoSyndicated = Nothing + , _sRelatedToVideoId = Nothing + , _sPageToken = Nothing + , _sType = "video,channel,playlist" + , _sOauthToken = Nothing + , _sChannelType = Nothing + , _sRelevanceLanguage = Nothing + , _sOrder = "SEARCH_SORT_RELEVANCE" + , _sMaxResults = 5 + , _sPublishedBefore = Nothing + , _sVideoType = Nothing + , _sVideoDimension = Nothing + , _sFields = Nothing + , _sAlt = "json" + } + +-- | The publishedAfter parameter indicates that the API response should only +-- contain resources created after the specified time. The value is an RFC +-- 3339 formatted date-time value (1970-01-01T00:00:00Z). +sPublishedAfter :: Lens' SearchList' (Maybe UTCTime) +sPublishedAfter + = lens _sPublishedAfter + (\ s a -> s{_sPublishedAfter = a}) + +-- | The videoDefinition parameter lets you restrict a search to only include +-- either high definition (HD) or standard definition (SD) videos. HD +-- videos are available for playback in at least 720p, though higher +-- resolutions, like 1080p, might also be available. If you specify a value +-- for this parameter, you must also set the type parameter\'s value to +-- video. +sVideoDefinition :: Lens' SearchList' (Maybe Text) +sVideoDefinition + = lens _sVideoDefinition + (\ s a -> s{_sVideoDefinition = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sQuotaUser :: Lens' SearchList' (Maybe Text) +sQuotaUser + = lens _sQuotaUser (\ s a -> s{_sQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- search resource properties that the API response will include. Set the +-- parameter value to snippet. +sPart :: Lens' SearchList' Text +sPart = lens _sPart (\ s a -> s{_sPart = a}) + +-- | The videoDuration parameter filters video search results based on their +-- duration. If you specify a value for this parameter, you must also set +-- the type parameter\'s value to video. +sVideoDuration :: Lens' SearchList' (Maybe Text) +sVideoDuration + = lens _sVideoDuration + (\ s a -> s{_sVideoDuration = a}) + +-- | Returns response with indentations and line breaks. +sPrettyPrint :: Lens' SearchList' Bool +sPrettyPrint + = lens _sPrettyPrint (\ s a -> s{_sPrettyPrint = a}) + +-- | The videoCaption parameter indicates whether the API should filter video +-- search results based on whether they have captions. If you specify a +-- value for this parameter, you must also set the type parameter\'s value +-- to video. +sVideoCaption :: Lens' SearchList' (Maybe Text) +sVideoCaption + = lens _sVideoCaption + (\ s a -> s{_sVideoCaption = a}) + +-- | The videoLicense parameter filters search results to only include videos +-- with a particular license. YouTube lets video uploaders choose to attach +-- either the Creative Commons license or the standard YouTube license to +-- each of their videos. If you specify a value for this parameter, you +-- must also set the type parameter\'s value to video. +sVideoLicense :: Lens' SearchList' (Maybe Text) +sVideoLicense + = lens _sVideoLicense + (\ s a -> s{_sVideoLicense = a}) + +-- | The regionCode parameter instructs the API to return search results for +-- the specified country. The parameter value is an ISO 3166-1 alpha-2 +-- country code. +sRegionCode :: Lens' SearchList' (Maybe Text) +sRegionCode + = lens _sRegionCode (\ s a -> s{_sRegionCode = a}) + +-- | The forDeveloper parameter restricts the search to only retrieve videos +-- uploaded via the developer\'s application or website. The API server +-- uses the request\'s authorization credentials to identify the developer. +-- Therefore, a developer can restrict results to videos uploaded through +-- the developer\'s own app or website but not to videos uploaded through +-- other apps or sites. +sForDeveloper :: Lens' SearchList' (Maybe Bool) +sForDeveloper + = lens _sForDeveloper + (\ s a -> s{_sForDeveloper = a}) + +-- | The location parameter, in conjunction with the locationRadius +-- parameter, defines a circular geographic area and also restricts a +-- search to videos that specify, in their metadata, a geographic location +-- that falls within that area. The parameter value is a string that +-- specifies latitude\/longitude coordinates e.g. (37.42307,-122.08427). - +-- The location parameter value identifies the point at the center of the +-- area. - The locationRadius parameter specifies the maximum distance that +-- the location associated with a video can be from that point for the +-- video to still be included in the search results.The API returns an +-- error if your request specifies a value for the location parameter but +-- does not also specify a value for the locationRadius parameter. +sLocation :: Lens' SearchList' (Maybe Text) +sLocation + = lens _sLocation (\ s a -> s{_sLocation = a}) + +-- | The locationRadius parameter, in conjunction with the location +-- parameter, defines a circular geographic area. The parameter value must +-- be a floating point number followed by a measurement unit. Valid +-- measurement units are m, km, ft, and mi. For example, valid parameter +-- values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support +-- locationRadius parameter values larger than 1000 kilometers. Note: See +-- the definition of the location parameter for more information. +sLocationRadius :: Lens' SearchList' (Maybe Text) +sLocationRadius + = lens _sLocationRadius + (\ s a -> s{_sLocationRadius = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sUserIp :: Lens' SearchList' (Maybe Text) +sUserIp = lens _sUserIp (\ s a -> s{_sUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The forContentOwner parameter restricts the search to only +-- retrieve resources owned by the content owner specified by the +-- onBehalfOfContentOwner parameter. The user must be authenticated using a +-- CMS account linked to the specified content owner and +-- onBehalfOfContentOwner must be provided. +sForContentOwner :: Lens' SearchList' (Maybe Bool) +sForContentOwner + = lens _sForContentOwner + (\ s a -> s{_sForContentOwner = a}) + +-- | The channelId parameter indicates that the API response should only +-- contain resources created by the channel +sChannelId :: Lens' SearchList' (Maybe Text) +sChannelId + = lens _sChannelId (\ s a -> s{_sChannelId = a}) + +-- | The q parameter specifies the query term to search for. Your request can +-- also use the Boolean NOT (-) and OR (|) operators to exclude videos or +-- to find videos that are associated with one of several search terms. For +-- example, to search for videos matching either \"boating\" or +-- \"sailing\", set the q parameter value to boating|sailing. Similarly, to +-- search for videos matching either \"boating\" or \"sailing\" but not +-- \"fishing\", set the q parameter value to boating|sailing -fishing. Note +-- that the pipe character must be URL-escaped when it is sent in your API +-- request. The URL-escaped value for the pipe character is %7C. +sQ :: Lens' SearchList' (Maybe Text) +sQ = lens _sQ (\ s a -> s{_sQ = a}) + +-- | The forMine parameter restricts the search to only retrieve videos owned +-- by the authenticated user. If you set this parameter to true, then the +-- type parameter\'s value must also be set to video. +sForMine :: Lens' SearchList' (Maybe Bool) +sForMine = lens _sForMine (\ s a -> s{_sForMine = a}) + +-- | The videoEmbeddable parameter lets you to restrict a search to only +-- videos that can be embedded into a webpage. If you specify a value for +-- this parameter, you must also set the type parameter\'s value to video. +sVideoEmbeddable :: Lens' SearchList' (Maybe Text) +sVideoEmbeddable + = lens _sVideoEmbeddable + (\ s a -> s{_sVideoEmbeddable = a}) + +-- | The eventType parameter restricts a search to broadcast events. If you +-- specify a value for this parameter, you must also set the type +-- parameter\'s value to video. +sEventType :: Lens' SearchList' (Maybe Text) +sEventType + = lens _sEventType (\ s a -> s{_sEventType = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +sOnBehalfOfContentOwner :: Lens' SearchList' (Maybe Text) +sOnBehalfOfContentOwner + = lens _sOnBehalfOfContentOwner + (\ s a -> s{_sOnBehalfOfContentOwner = a}) + +-- | The videoCategoryId parameter filters video search results based on +-- their category. If you specify a value for this parameter, you must also +-- set the type parameter\'s value to video. +sVideoCategoryId :: Lens' SearchList' (Maybe Text) +sVideoCategoryId + = lens _sVideoCategoryId + (\ s a -> s{_sVideoCategoryId = a}) + +-- | The topicId parameter indicates that the API response should only +-- contain resources associated with the specified topic. The value +-- identifies a Freebase topic ID. +sTopicId :: Lens' SearchList' (Maybe Text) +sTopicId = lens _sTopicId (\ s a -> s{_sTopicId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sKey :: Lens' SearchList' (Maybe Text) +sKey = lens _sKey (\ s a -> s{_sKey = a}) + +-- | The safeSearch parameter indicates whether the search results should +-- include restricted content as well as standard content. +sSafeSearch :: Lens' SearchList' (Maybe Text) +sSafeSearch + = lens _sSafeSearch (\ s a -> s{_sSafeSearch = a}) + +-- | The videoSyndicated parameter lets you to restrict a search to only +-- videos that can be played outside youtube.com. If you specify a value +-- for this parameter, you must also set the type parameter\'s value to +-- video. +sVideoSyndicated :: Lens' SearchList' (Maybe Text) +sVideoSyndicated + = lens _sVideoSyndicated + (\ s a -> s{_sVideoSyndicated = a}) + +-- | The relatedToVideoId parameter retrieves a list of videos that are +-- related to the video that the parameter value identifies. The parameter +-- value must be set to a YouTube video ID and, if you are using this +-- parameter, the type parameter must be set to video. +sRelatedToVideoId :: Lens' SearchList' (Maybe Text) +sRelatedToVideoId + = lens _sRelatedToVideoId + (\ s a -> s{_sRelatedToVideoId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +sPageToken :: Lens' SearchList' (Maybe Text) +sPageToken + = lens _sPageToken (\ s a -> s{_sPageToken = a}) + +-- | The type parameter restricts a search query to only retrieve a +-- particular type of resource. The value is a comma-separated list of +-- resource types. +sType :: Lens' SearchList' Text +sType = lens _sType (\ s a -> s{_sType = a}) + +-- | OAuth 2.0 token for the current user. +sOauthToken :: Lens' SearchList' (Maybe Text) +sOauthToken + = lens _sOauthToken (\ s a -> s{_sOauthToken = a}) + +-- | The channelType parameter lets you restrict a search to a particular +-- type of channel. +sChannelType :: Lens' SearchList' (Maybe Text) +sChannelType + = lens _sChannelType (\ s a -> s{_sChannelType = a}) + +-- | The relevanceLanguage parameter instructs the API to return search +-- results that are most relevant to the specified language. The parameter +-- value is typically an ISO 639-1 two-letter language code. However, you +-- should use the values zh-Hans for simplified Chinese and zh-Hant for +-- traditional Chinese. Please note that results in other languages will +-- still be returned if they are highly relevant to the search query term. +sRelevanceLanguage :: Lens' SearchList' (Maybe Text) +sRelevanceLanguage + = lens _sRelevanceLanguage + (\ s a -> s{_sRelevanceLanguage = a}) + +-- | The order parameter specifies the method that will be used to order +-- resources in the API response. +sOrder :: Lens' SearchList' Text +sOrder = lens _sOrder (\ s a -> s{_sOrder = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +sMaxResults :: Lens' SearchList' Word32 +sMaxResults + = lens _sMaxResults (\ s a -> s{_sMaxResults = a}) + +-- | The publishedBefore parameter indicates that the API response should +-- only contain resources created before the specified time. The value is +-- an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). +sPublishedBefore :: Lens' SearchList' (Maybe UTCTime) +sPublishedBefore + = lens _sPublishedBefore + (\ s a -> s{_sPublishedBefore = a}) + +-- | The videoType parameter lets you restrict a search to a particular type +-- of videos. If you specify a value for this parameter, you must also set +-- the type parameter\'s value to video. +sVideoType :: Lens' SearchList' (Maybe Text) +sVideoType + = lens _sVideoType (\ s a -> s{_sVideoType = a}) + +-- | The videoDimension parameter lets you restrict a search to only retrieve +-- 2D or 3D videos. If you specify a value for this parameter, you must +-- also set the type parameter\'s value to video. +sVideoDimension :: Lens' SearchList' (Maybe Text) +sVideoDimension + = lens _sVideoDimension + (\ s a -> s{_sVideoDimension = a}) + +-- | Selector specifying which fields to include in a partial response. +sFields :: Lens' SearchList' (Maybe Text) +sFields = lens _sFields (\ s a -> s{_sFields = a}) + +-- | Data format for the response. +sAlt :: Lens' SearchList' Text +sAlt = lens _sAlt (\ s a -> s{_sAlt = a}) + +instance GoogleRequest SearchList' where + type Rs SearchList' = SearchListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u SearchList{..} + = go _sPublishedAfter _sVideoDefinition _sQuotaUser + (Just _sPart) + _sVideoDuration + _sPrettyPrint + _sVideoCaption + _sVideoLicense + _sRegionCode + _sForDeveloper + _sLocation + _sLocationRadius + _sUserIp + _sForContentOwner + _sChannelId + _sQ + _sForMine + _sVideoEmbeddable + _sEventType + _sOnBehalfOfContentOwner + _sVideoCategoryId + _sTopicId + _sKey + _sSafeSearch + _sVideoSyndicated + _sRelatedToVideoId + _sPageToken + (Just _sType) + _sOauthToken + _sChannelType + _sRelevanceLanguage + (Just _sOrder) + (Just _sMaxResults) + _sPublishedBefore + _sVideoType + _sVideoDimension + _sFields + _sAlt + where go + = clientWithRoute (Proxy :: Proxy SearchListAPI) r u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Delete.hs new file mode 100644 index 000000000..90dae267c --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Delete.hs @@ -0,0 +1,155 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Subscriptions.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a subscription. +-- +-- /See:/ for @YouTubeSubscriptionsDelete@. +module YouTube.Subscriptions.Delete + ( + -- * REST Resource + SubscriptionsDeleteAPI + + -- * Creating a Request + , subscriptionsDelete + , SubscriptionsDelete + + -- * Request Lenses + , sdQuotaUser + , sdPrettyPrint + , sdUserIp + , sdKey + , sdId + , sdOauthToken + , sdFields + , sdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeSubscriptionsDelete@ which the +-- 'SubscriptionsDelete' request conforms to. +type SubscriptionsDeleteAPI = + "subscriptions" :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a subscription. +-- +-- /See:/ 'subscriptionsDelete' smart constructor. +data SubscriptionsDelete = SubscriptionsDelete + { _sdQuotaUser :: !(Maybe Text) + , _sdPrettyPrint :: !Bool + , _sdUserIp :: !(Maybe Text) + , _sdKey :: !(Maybe Text) + , _sdId :: !Text + , _sdOauthToken :: !(Maybe Text) + , _sdFields :: !(Maybe Text) + , _sdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sdQuotaUser' +-- +-- * 'sdPrettyPrint' +-- +-- * 'sdUserIp' +-- +-- * 'sdKey' +-- +-- * 'sdId' +-- +-- * 'sdOauthToken' +-- +-- * 'sdFields' +-- +-- * 'sdAlt' +subscriptionsDelete + :: Text -- ^ 'id' + -> SubscriptionsDelete +subscriptionsDelete pSdId_ = + SubscriptionsDelete + { _sdQuotaUser = Nothing + , _sdPrettyPrint = True + , _sdUserIp = Nothing + , _sdKey = Nothing + , _sdId = pSdId_ + , _sdOauthToken = Nothing + , _sdFields = Nothing + , _sdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +sdQuotaUser :: Lens' SubscriptionsDelete' (Maybe Text) +sdQuotaUser + = lens _sdQuotaUser (\ s a -> s{_sdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +sdPrettyPrint :: Lens' SubscriptionsDelete' Bool +sdPrettyPrint + = lens _sdPrettyPrint + (\ s a -> s{_sdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +sdUserIp :: Lens' SubscriptionsDelete' (Maybe Text) +sdUserIp = lens _sdUserIp (\ s a -> s{_sdUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +sdKey :: Lens' SubscriptionsDelete' (Maybe Text) +sdKey = lens _sdKey (\ s a -> s{_sdKey = a}) + +-- | The id parameter specifies the YouTube subscription ID for the resource +-- that is being deleted. In a subscription resource, the id property +-- specifies the YouTube subscription ID. +sdId :: Lens' SubscriptionsDelete' Text +sdId = lens _sdId (\ s a -> s{_sdId = a}) + +-- | OAuth 2.0 token for the current user. +sdOauthToken :: Lens' SubscriptionsDelete' (Maybe Text) +sdOauthToken + = lens _sdOauthToken (\ s a -> s{_sdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +sdFields :: Lens' SubscriptionsDelete' (Maybe Text) +sdFields = lens _sdFields (\ s a -> s{_sdFields = a}) + +-- | Data format for the response. +sdAlt :: Lens' SubscriptionsDelete' Text +sdAlt = lens _sdAlt (\ s a -> s{_sdAlt = a}) + +instance GoogleRequest SubscriptionsDelete' where + type Rs SubscriptionsDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u SubscriptionsDelete{..} + = go _sdQuotaUser _sdPrettyPrint _sdUserIp _sdKey + (Just _sdId) + _sdOauthToken + _sdFields + _sdAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsDeleteAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Insert.hs new file mode 100644 index 000000000..cdd8c05f2 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/Insert.hs @@ -0,0 +1,156 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Subscriptions.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Adds a subscription for the authenticated user\'s channel. +-- +-- /See:/ for @YouTubeSubscriptionsInsert@. +module YouTube.Subscriptions.Insert + ( + -- * REST Resource + SubscriptionsInsertAPI + + -- * Creating a Request + , subscriptionsInsert + , SubscriptionsInsert + + -- * Request Lenses + , siQuotaUser + , siPart + , siPrettyPrint + , siUserIp + , siKey + , siOauthToken + , siFields + , siAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeSubscriptionsInsert@ which the +-- 'SubscriptionsInsert' request conforms to. +type SubscriptionsInsertAPI = + "subscriptions" :> + QueryParam "part" Text :> Post '[JSON] Subscription + +-- | Adds a subscription for the authenticated user\'s channel. +-- +-- /See:/ 'subscriptionsInsert' smart constructor. +data SubscriptionsInsert = SubscriptionsInsert + { _siQuotaUser :: !(Maybe Text) + , _siPart :: !Text + , _siPrettyPrint :: !Bool + , _siUserIp :: !(Maybe Text) + , _siKey :: !(Maybe Text) + , _siOauthToken :: !(Maybe Text) + , _siFields :: !(Maybe Text) + , _siAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'siQuotaUser' +-- +-- * 'siPart' +-- +-- * 'siPrettyPrint' +-- +-- * 'siUserIp' +-- +-- * 'siKey' +-- +-- * 'siOauthToken' +-- +-- * 'siFields' +-- +-- * 'siAlt' +subscriptionsInsert + :: Text -- ^ 'part' + -> SubscriptionsInsert +subscriptionsInsert pSiPart_ = + SubscriptionsInsert + { _siQuotaUser = Nothing + , _siPart = pSiPart_ + , _siPrettyPrint = True + , _siUserIp = Nothing + , _siKey = Nothing + , _siOauthToken = Nothing + , _siFields = Nothing + , _siAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +siQuotaUser :: Lens' SubscriptionsInsert' (Maybe Text) +siQuotaUser + = lens _siQuotaUser (\ s a -> s{_siQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. +siPart :: Lens' SubscriptionsInsert' Text +siPart = lens _siPart (\ s a -> s{_siPart = a}) + +-- | Returns response with indentations and line breaks. +siPrettyPrint :: Lens' SubscriptionsInsert' Bool +siPrettyPrint + = lens _siPrettyPrint + (\ s a -> s{_siPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +siUserIp :: Lens' SubscriptionsInsert' (Maybe Text) +siUserIp = lens _siUserIp (\ s a -> s{_siUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +siKey :: Lens' SubscriptionsInsert' (Maybe Text) +siKey = lens _siKey (\ s a -> s{_siKey = a}) + +-- | OAuth 2.0 token for the current user. +siOauthToken :: Lens' SubscriptionsInsert' (Maybe Text) +siOauthToken + = lens _siOauthToken (\ s a -> s{_siOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +siFields :: Lens' SubscriptionsInsert' (Maybe Text) +siFields = lens _siFields (\ s a -> s{_siFields = a}) + +-- | Data format for the response. +siAlt :: Lens' SubscriptionsInsert' Text +siAlt = lens _siAlt (\ s a -> s{_siAlt = a}) + +instance GoogleRequest SubscriptionsInsert' where + type Rs SubscriptionsInsert' = Subscription + request = requestWithRoute defReq youTubeURL + requestWithRoute r u SubscriptionsInsert{..} + = go _siQuotaUser (Just _siPart) _siPrettyPrint + _siUserIp + _siKey + _siOauthToken + _siFields + _siAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsInsertAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/List.hs new file mode 100644 index 000000000..7fdafe853 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/List.hs @@ -0,0 +1,318 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Subscriptions.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns subscription resources that match the API request criteria. +-- +-- /See:/ for @YouTubeSubscriptionsList@. +module YouTube.Subscriptions.List + ( + -- * REST Resource + SubscriptionsListAPI + + -- * Creating a Request + , subscriptionsList + , SubscriptionsList + + -- * Request Lenses + , slQuotaUser + , slPart + , slPrettyPrint + , slMine + , slUserIp + , slChannelId + , slOnBehalfOfContentOwner + , slKey + , slOnBehalfOfContentOwnerChannel + , slId + , slMySubscribers + , slForChannelId + , slPageToken + , slOauthToken + , slOrder + , slMaxResults + , slFields + , slAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeSubscriptionsList@ which the +-- 'SubscriptionsList' request conforms to. +type SubscriptionsListAPI = + "subscriptions" :> + QueryParam "part" Text :> + QueryParam "mine" Bool :> + QueryParam "channelId" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "id" Text :> + QueryParam "mySubscribers" Bool :> + QueryParam "forChannelId" Text :> + QueryParam "pageToken" Text :> + QueryParam "order" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] SubscriptionListResponse + +-- | Returns subscription resources that match the API request criteria. +-- +-- /See:/ 'subscriptionsList' smart constructor. +data SubscriptionsList = SubscriptionsList + { _slQuotaUser :: !(Maybe Text) + , _slPart :: !Text + , _slPrettyPrint :: !Bool + , _slMine :: !(Maybe Bool) + , _slUserIp :: !(Maybe Text) + , _slChannelId :: !(Maybe Text) + , _slOnBehalfOfContentOwner :: !(Maybe Text) + , _slKey :: !(Maybe Text) + , _slOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _slId :: !(Maybe Text) + , _slMySubscribers :: !(Maybe Bool) + , _slForChannelId :: !(Maybe Text) + , _slPageToken :: !(Maybe Text) + , _slOauthToken :: !(Maybe Text) + , _slOrder :: !Text + , _slMaxResults :: !Word32 + , _slFields :: !(Maybe Text) + , _slAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slQuotaUser' +-- +-- * 'slPart' +-- +-- * 'slPrettyPrint' +-- +-- * 'slMine' +-- +-- * 'slUserIp' +-- +-- * 'slChannelId' +-- +-- * 'slOnBehalfOfContentOwner' +-- +-- * 'slKey' +-- +-- * 'slOnBehalfOfContentOwnerChannel' +-- +-- * 'slId' +-- +-- * 'slMySubscribers' +-- +-- * 'slForChannelId' +-- +-- * 'slPageToken' +-- +-- * 'slOauthToken' +-- +-- * 'slOrder' +-- +-- * 'slMaxResults' +-- +-- * 'slFields' +-- +-- * 'slAlt' +subscriptionsList + :: Text -- ^ 'part' + -> SubscriptionsList +subscriptionsList pSlPart_ = + SubscriptionsList + { _slQuotaUser = Nothing + , _slPart = pSlPart_ + , _slPrettyPrint = True + , _slMine = Nothing + , _slUserIp = Nothing + , _slChannelId = Nothing + , _slOnBehalfOfContentOwner = Nothing + , _slKey = Nothing + , _slOnBehalfOfContentOwnerChannel = Nothing + , _slId = Nothing + , _slMySubscribers = Nothing + , _slForChannelId = Nothing + , _slPageToken = Nothing + , _slOauthToken = Nothing + , _slOrder = "SUBSCRIPTION_ORDER_RELEVANCE" + , _slMaxResults = 5 + , _slFields = Nothing + , _slAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +slQuotaUser :: Lens' SubscriptionsList' (Maybe Text) +slQuotaUser + = lens _slQuotaUser (\ s a -> s{_slQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more +-- subscription resource properties that the API response will include. If +-- the parameter identifies a property that contains child properties, the +-- child properties will be included in the response. For example, in a +-- subscription resource, the snippet property contains other properties, +-- such as a display title for the subscription. If you set part=snippet, +-- the API response will also contain all of those nested properties. +slPart :: Lens' SubscriptionsList' Text +slPart = lens _slPart (\ s a -> s{_slPart = a}) + +-- | Returns response with indentations and line breaks. +slPrettyPrint :: Lens' SubscriptionsList' Bool +slPrettyPrint + = lens _slPrettyPrint + (\ s a -> s{_slPrettyPrint = a}) + +-- | Set this parameter\'s value to true to retrieve a feed of the +-- authenticated user\'s subscriptions. +slMine :: Lens' SubscriptionsList' (Maybe Bool) +slMine = lens _slMine (\ s a -> s{_slMine = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +slUserIp :: Lens' SubscriptionsList' (Maybe Text) +slUserIp = lens _slUserIp (\ s a -> s{_slUserIp = a}) + +-- | The channelId parameter specifies a YouTube channel ID. The API will +-- only return that channel\'s subscriptions. +slChannelId :: Lens' SubscriptionsList' (Maybe Text) +slChannelId + = lens _slChannelId (\ s a -> s{_slChannelId = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +slOnBehalfOfContentOwner :: Lens' SubscriptionsList' (Maybe Text) +slOnBehalfOfContentOwner + = lens _slOnBehalfOfContentOwner + (\ s a -> s{_slOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +slKey :: Lens' SubscriptionsList' (Maybe Text) +slKey = lens _slKey (\ s a -> s{_slKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +slOnBehalfOfContentOwnerChannel :: Lens' SubscriptionsList' (Maybe Text) +slOnBehalfOfContentOwnerChannel + = lens _slOnBehalfOfContentOwnerChannel + (\ s a -> s{_slOnBehalfOfContentOwnerChannel = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube +-- subscription ID(s) for the resource(s) that are being retrieved. In a +-- subscription resource, the id property specifies the YouTube +-- subscription ID. +slId :: Lens' SubscriptionsList' (Maybe Text) +slId = lens _slId (\ s a -> s{_slId = a}) + +-- | Set this parameter\'s value to true to retrieve a feed of the +-- subscribers of the authenticated user. +slMySubscribers :: Lens' SubscriptionsList' (Maybe Bool) +slMySubscribers + = lens _slMySubscribers + (\ s a -> s{_slMySubscribers = a}) + +-- | The forChannelId parameter specifies a comma-separated list of channel +-- IDs. The API response will then only contain subscriptions matching +-- those channels. +slForChannelId :: Lens' SubscriptionsList' (Maybe Text) +slForChannelId + = lens _slForChannelId + (\ s a -> s{_slForChannelId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +slPageToken :: Lens' SubscriptionsList' (Maybe Text) +slPageToken + = lens _slPageToken (\ s a -> s{_slPageToken = a}) + +-- | OAuth 2.0 token for the current user. +slOauthToken :: Lens' SubscriptionsList' (Maybe Text) +slOauthToken + = lens _slOauthToken (\ s a -> s{_slOauthToken = a}) + +-- | The order parameter specifies the method that will be used to sort +-- resources in the API response. +slOrder :: Lens' SubscriptionsList' Text +slOrder = lens _slOrder (\ s a -> s{_slOrder = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. +slMaxResults :: Lens' SubscriptionsList' Word32 +slMaxResults + = lens _slMaxResults (\ s a -> s{_slMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +slFields :: Lens' SubscriptionsList' (Maybe Text) +slFields = lens _slFields (\ s a -> s{_slFields = a}) + +-- | Data format for the response. +slAlt :: Lens' SubscriptionsList' Text +slAlt = lens _slAlt (\ s a -> s{_slAlt = a}) + +instance GoogleRequest SubscriptionsList' where + type Rs SubscriptionsList' = SubscriptionListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u SubscriptionsList{..} + = go _slQuotaUser (Just _slPart) _slPrettyPrint + _slMine + _slUserIp + _slChannelId + _slOnBehalfOfContentOwner + _slKey + _slOnBehalfOfContentOwnerChannel + _slId + _slMySubscribers + _slForChannelId + _slPageToken + _slOauthToken + (Just _slOrder) + (Just _slMaxResults) + _slFields + _slAlt + where go + = clientWithRoute + (Proxy :: Proxy SubscriptionsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Thumbnails/Set.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Thumbnails/Set.hs new file mode 100644 index 000000000..061427c34 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Thumbnails/Set.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Thumbnails.Set +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a custom video thumbnail to YouTube and sets it for a video. +-- +-- /See:/ for @YouTubeThumbnailsSet@. +module YouTube.Thumbnails.Set + ( + -- * REST Resource + ThumbnailsSetAPI + + -- * Creating a Request + , thumbnailsSet + , ThumbnailsSet + + -- * Request Lenses + , tsQuotaUser + , tsPrettyPrint + , tsUserIp + , tsOnBehalfOfContentOwner + , tsVideoId + , tsKey + , tsOauthToken + , tsFields + , tsAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeThumbnailsSet@ which the +-- 'ThumbnailsSet' request conforms to. +type ThumbnailsSetAPI = + "thumbnails" :> + "set" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "videoId" Text :> + Post '[JSON] ThumbnailSetResponse + +-- | Uploads a custom video thumbnail to YouTube and sets it for a video. +-- +-- /See:/ 'thumbnailsSet' smart constructor. +data ThumbnailsSet = ThumbnailsSet + { _tsQuotaUser :: !(Maybe Text) + , _tsPrettyPrint :: !Bool + , _tsUserIp :: !(Maybe Text) + , _tsOnBehalfOfContentOwner :: !(Maybe Text) + , _tsVideoId :: !Text + , _tsKey :: !(Maybe Text) + , _tsOauthToken :: !(Maybe Text) + , _tsFields :: !(Maybe Text) + , _tsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ThumbnailsSet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsQuotaUser' +-- +-- * 'tsPrettyPrint' +-- +-- * 'tsUserIp' +-- +-- * 'tsOnBehalfOfContentOwner' +-- +-- * 'tsVideoId' +-- +-- * 'tsKey' +-- +-- * 'tsOauthToken' +-- +-- * 'tsFields' +-- +-- * 'tsAlt' +thumbnailsSet + :: Text -- ^ 'videoId' + -> ThumbnailsSet +thumbnailsSet pTsVideoId_ = + ThumbnailsSet + { _tsQuotaUser = Nothing + , _tsPrettyPrint = True + , _tsUserIp = Nothing + , _tsOnBehalfOfContentOwner = Nothing + , _tsVideoId = pTsVideoId_ + , _tsKey = Nothing + , _tsOauthToken = Nothing + , _tsFields = Nothing + , _tsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +tsQuotaUser :: Lens' ThumbnailsSet' (Maybe Text) +tsQuotaUser + = lens _tsQuotaUser (\ s a -> s{_tsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +tsPrettyPrint :: Lens' ThumbnailsSet' Bool +tsPrettyPrint + = lens _tsPrettyPrint + (\ s a -> s{_tsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +tsUserIp :: Lens' ThumbnailsSet' (Maybe Text) +tsUserIp = lens _tsUserIp (\ s a -> s{_tsUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +tsOnBehalfOfContentOwner :: Lens' ThumbnailsSet' (Maybe Text) +tsOnBehalfOfContentOwner + = lens _tsOnBehalfOfContentOwner + (\ s a -> s{_tsOnBehalfOfContentOwner = a}) + +-- | The videoId parameter specifies a YouTube video ID for which the custom +-- video thumbnail is being provided. +tsVideoId :: Lens' ThumbnailsSet' Text +tsVideoId + = lens _tsVideoId (\ s a -> s{_tsVideoId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +tsKey :: Lens' ThumbnailsSet' (Maybe Text) +tsKey = lens _tsKey (\ s a -> s{_tsKey = a}) + +-- | OAuth 2.0 token for the current user. +tsOauthToken :: Lens' ThumbnailsSet' (Maybe Text) +tsOauthToken + = lens _tsOauthToken (\ s a -> s{_tsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +tsFields :: Lens' ThumbnailsSet' (Maybe Text) +tsFields = lens _tsFields (\ s a -> s{_tsFields = a}) + +-- | Data format for the response. +tsAlt :: Lens' ThumbnailsSet' Text +tsAlt = lens _tsAlt (\ s a -> s{_tsAlt = a}) + +instance GoogleRequest ThumbnailsSet' where + type Rs ThumbnailsSet' = ThumbnailSetResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u ThumbnailsSet{..} + = go _tsQuotaUser _tsPrettyPrint _tsUserIp + _tsOnBehalfOfContentOwner + (Just _tsVideoId) + _tsKey + _tsOauthToken + _tsFields + _tsAlt + where go + = clientWithRoute (Proxy :: Proxy ThumbnailsSetAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoAbuseReportReasons/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoAbuseReportReasons/List.hs new file mode 100644 index 000000000..6497967be --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoAbuseReportReasons/List.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.VideoAbuseReportReasons.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of abuse reasons that can be used for reporting abusive +-- videos. +-- +-- /See:/ for @YouTubeVideoAbuseReportReasonsList@. +module YouTube.VideoAbuseReportReasons.List + ( + -- * REST Resource + VideoAbuseReportReasonsListAPI + + -- * Creating a Request + , videoAbuseReportReasonsList + , VideoAbuseReportReasonsList + + -- * Request Lenses + , varrlQuotaUser + , varrlPart + , varrlPrettyPrint + , varrlUserIp + , varrlHl + , varrlKey + , varrlOauthToken + , varrlFields + , varrlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideoAbuseReportReasonsList@ which the +-- 'VideoAbuseReportReasonsList' request conforms to. +type VideoAbuseReportReasonsListAPI = + "videoAbuseReportReasons" :> + QueryParam "part" Text :> + QueryParam "hl" Text :> + Get '[JSON] VideoAbuseReportReasonListResponse + +-- | Returns a list of abuse reasons that can be used for reporting abusive +-- videos. +-- +-- /See:/ 'videoAbuseReportReasonsList' smart constructor. +data VideoAbuseReportReasonsList = VideoAbuseReportReasonsList + { _varrlQuotaUser :: !(Maybe Text) + , _varrlPart :: !Text + , _varrlPrettyPrint :: !Bool + , _varrlUserIp :: !(Maybe Text) + , _varrlHl :: !Text + , _varrlKey :: !(Maybe Text) + , _varrlOauthToken :: !(Maybe Text) + , _varrlFields :: !(Maybe Text) + , _varrlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReportReasonsList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varrlQuotaUser' +-- +-- * 'varrlPart' +-- +-- * 'varrlPrettyPrint' +-- +-- * 'varrlUserIp' +-- +-- * 'varrlHl' +-- +-- * 'varrlKey' +-- +-- * 'varrlOauthToken' +-- +-- * 'varrlFields' +-- +-- * 'varrlAlt' +videoAbuseReportReasonsList + :: Text -- ^ 'part' + -> VideoAbuseReportReasonsList +videoAbuseReportReasonsList pVarrlPart_ = + VideoAbuseReportReasonsList + { _varrlQuotaUser = Nothing + , _varrlPart = pVarrlPart_ + , _varrlPrettyPrint = True + , _varrlUserIp = Nothing + , _varrlHl = "en_US" + , _varrlKey = Nothing + , _varrlOauthToken = Nothing + , _varrlFields = Nothing + , _varrlAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +varrlQuotaUser :: Lens' VideoAbuseReportReasonsList' (Maybe Text) +varrlQuotaUser + = lens _varrlQuotaUser + (\ s a -> s{_varrlQuotaUser = a}) + +-- | The part parameter specifies the videoCategory resource parts that the +-- API response will include. Supported values are id and snippet. +varrlPart :: Lens' VideoAbuseReportReasonsList' Text +varrlPart + = lens _varrlPart (\ s a -> s{_varrlPart = a}) + +-- | Returns response with indentations and line breaks. +varrlPrettyPrint :: Lens' VideoAbuseReportReasonsList' Bool +varrlPrettyPrint + = lens _varrlPrettyPrint + (\ s a -> s{_varrlPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +varrlUserIp :: Lens' VideoAbuseReportReasonsList' (Maybe Text) +varrlUserIp + = lens _varrlUserIp (\ s a -> s{_varrlUserIp = a}) + +-- | The hl parameter specifies the language that should be used for text +-- values in the API response. +varrlHl :: Lens' VideoAbuseReportReasonsList' Text +varrlHl = lens _varrlHl (\ s a -> s{_varrlHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +varrlKey :: Lens' VideoAbuseReportReasonsList' (Maybe Text) +varrlKey = lens _varrlKey (\ s a -> s{_varrlKey = a}) + +-- | OAuth 2.0 token for the current user. +varrlOauthToken :: Lens' VideoAbuseReportReasonsList' (Maybe Text) +varrlOauthToken + = lens _varrlOauthToken + (\ s a -> s{_varrlOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +varrlFields :: Lens' VideoAbuseReportReasonsList' (Maybe Text) +varrlFields + = lens _varrlFields (\ s a -> s{_varrlFields = a}) + +-- | Data format for the response. +varrlAlt :: Lens' VideoAbuseReportReasonsList' Text +varrlAlt = lens _varrlAlt (\ s a -> s{_varrlAlt = a}) + +instance GoogleRequest VideoAbuseReportReasonsList' + where + type Rs VideoAbuseReportReasonsList' = + VideoAbuseReportReasonListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideoAbuseReportReasonsList{..} + = go _varrlQuotaUser (Just _varrlPart) + _varrlPrettyPrint + _varrlUserIp + (Just _varrlHl) + _varrlKey + _varrlOauthToken + _varrlFields + _varrlAlt + where go + = clientWithRoute + (Proxy :: Proxy VideoAbuseReportReasonsListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoCategories/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoCategories/List.hs new file mode 100644 index 000000000..a30eb0904 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/VideoCategories/List.hs @@ -0,0 +1,199 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.VideoCategories.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of categories that can be associated with YouTube videos. +-- +-- /See:/ for @YouTubeVideoCategoriesList@. +module YouTube.VideoCategories.List + ( + -- * REST Resource + VideoCategoriesListAPI + + -- * Creating a Request + , videoCategoriesList + , VideoCategoriesList + + -- * Request Lenses + , vclQuotaUser + , vclPart + , vclPrettyPrint + , vclRegionCode + , vclUserIp + , vclHl + , vclKey + , vclId + , vclOauthToken + , vclFields + , vclAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideoCategoriesList@ which the +-- 'VideoCategoriesList' request conforms to. +type VideoCategoriesListAPI = + "videoCategories" :> + QueryParam "part" Text :> + QueryParam "regionCode" Text :> + QueryParam "hl" Text :> + QueryParam "id" Text :> + Get '[JSON] VideoCategoryListResponse + +-- | Returns a list of categories that can be associated with YouTube videos. +-- +-- /See:/ 'videoCategoriesList' smart constructor. +data VideoCategoriesList = VideoCategoriesList + { _vclQuotaUser :: !(Maybe Text) + , _vclPart :: !Text + , _vclPrettyPrint :: !Bool + , _vclRegionCode :: !(Maybe Text) + , _vclUserIp :: !(Maybe Text) + , _vclHl :: !Text + , _vclKey :: !(Maybe Text) + , _vclId :: !(Maybe Text) + , _vclOauthToken :: !(Maybe Text) + , _vclFields :: !(Maybe Text) + , _vclAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoCategoriesList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vclQuotaUser' +-- +-- * 'vclPart' +-- +-- * 'vclPrettyPrint' +-- +-- * 'vclRegionCode' +-- +-- * 'vclUserIp' +-- +-- * 'vclHl' +-- +-- * 'vclKey' +-- +-- * 'vclId' +-- +-- * 'vclOauthToken' +-- +-- * 'vclFields' +-- +-- * 'vclAlt' +videoCategoriesList + :: Text -- ^ 'part' + -> VideoCategoriesList +videoCategoriesList pVclPart_ = + VideoCategoriesList + { _vclQuotaUser = Nothing + , _vclPart = pVclPart_ + , _vclPrettyPrint = True + , _vclRegionCode = Nothing + , _vclUserIp = Nothing + , _vclHl = "en_US" + , _vclKey = Nothing + , _vclId = Nothing + , _vclOauthToken = Nothing + , _vclFields = Nothing + , _vclAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vclQuotaUser :: Lens' VideoCategoriesList' (Maybe Text) +vclQuotaUser + = lens _vclQuotaUser (\ s a -> s{_vclQuotaUser = a}) + +-- | The part parameter specifies the videoCategory resource properties that +-- the API response will include. Set the parameter value to snippet. +vclPart :: Lens' VideoCategoriesList' Text +vclPart = lens _vclPart (\ s a -> s{_vclPart = a}) + +-- | Returns response with indentations and line breaks. +vclPrettyPrint :: Lens' VideoCategoriesList' Bool +vclPrettyPrint + = lens _vclPrettyPrint + (\ s a -> s{_vclPrettyPrint = a}) + +-- | The regionCode parameter instructs the API to return the list of video +-- categories available in the specified country. The parameter value is an +-- ISO 3166-1 alpha-2 country code. +vclRegionCode :: Lens' VideoCategoriesList' (Maybe Text) +vclRegionCode + = lens _vclRegionCode + (\ s a -> s{_vclRegionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vclUserIp :: Lens' VideoCategoriesList' (Maybe Text) +vclUserIp + = lens _vclUserIp (\ s a -> s{_vclUserIp = a}) + +-- | The hl parameter specifies the language that should be used for text +-- values in the API response. +vclHl :: Lens' VideoCategoriesList' Text +vclHl = lens _vclHl (\ s a -> s{_vclHl = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vclKey :: Lens' VideoCategoriesList' (Maybe Text) +vclKey = lens _vclKey (\ s a -> s{_vclKey = a}) + +-- | The id parameter specifies a comma-separated list of video category IDs +-- for the resources that you are retrieving. +vclId :: Lens' VideoCategoriesList' (Maybe Text) +vclId = lens _vclId (\ s a -> s{_vclId = a}) + +-- | OAuth 2.0 token for the current user. +vclOauthToken :: Lens' VideoCategoriesList' (Maybe Text) +vclOauthToken + = lens _vclOauthToken + (\ s a -> s{_vclOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vclFields :: Lens' VideoCategoriesList' (Maybe Text) +vclFields + = lens _vclFields (\ s a -> s{_vclFields = a}) + +-- | Data format for the response. +vclAlt :: Lens' VideoCategoriesList' Text +vclAlt = lens _vclAlt (\ s a -> s{_vclAlt = a}) + +instance GoogleRequest VideoCategoriesList' where + type Rs VideoCategoriesList' = + VideoCategoryListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideoCategoriesList{..} + = go _vclQuotaUser (Just _vclPart) _vclPrettyPrint + _vclRegionCode + _vclUserIp + (Just _vclHl) + _vclKey + _vclId + _vclOauthToken + _vclFields + _vclAlt + where go + = clientWithRoute + (Proxy :: Proxy VideoCategoriesListAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Delete.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Delete.hs new file mode 100644 index 000000000..160d37e31 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Delete.hs @@ -0,0 +1,176 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.Delete +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a YouTube video. +-- +-- /See:/ for @YouTubeVideosDelete@. +module YouTube.Videos.Delete + ( + -- * REST Resource + VideosDeleteAPI + + -- * Creating a Request + , videosDelete + , VideosDelete + + -- * Request Lenses + , vdQuotaUser + , vdPrettyPrint + , vdUserIp + , vdOnBehalfOfContentOwner + , vdKey + , vdId + , vdOauthToken + , vdFields + , vdAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosDelete@ which the +-- 'VideosDelete' request conforms to. +type VideosDeleteAPI = + "videos" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> Delete '[JSON] () + +-- | Deletes a YouTube video. +-- +-- /See:/ 'videosDelete' smart constructor. +data VideosDelete = VideosDelete + { _vdQuotaUser :: !(Maybe Text) + , _vdPrettyPrint :: !Bool + , _vdUserIp :: !(Maybe Text) + , _vdOnBehalfOfContentOwner :: !(Maybe Text) + , _vdKey :: !(Maybe Text) + , _vdId :: !Text + , _vdOauthToken :: !(Maybe Text) + , _vdFields :: !(Maybe Text) + , _vdAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosDelete'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vdQuotaUser' +-- +-- * 'vdPrettyPrint' +-- +-- * 'vdUserIp' +-- +-- * 'vdOnBehalfOfContentOwner' +-- +-- * 'vdKey' +-- +-- * 'vdId' +-- +-- * 'vdOauthToken' +-- +-- * 'vdFields' +-- +-- * 'vdAlt' +videosDelete + :: Text -- ^ 'id' + -> VideosDelete +videosDelete pVdId_ = + VideosDelete + { _vdQuotaUser = Nothing + , _vdPrettyPrint = True + , _vdUserIp = Nothing + , _vdOnBehalfOfContentOwner = Nothing + , _vdKey = Nothing + , _vdId = pVdId_ + , _vdOauthToken = Nothing + , _vdFields = Nothing + , _vdAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vdQuotaUser :: Lens' VideosDelete' (Maybe Text) +vdQuotaUser + = lens _vdQuotaUser (\ s a -> s{_vdQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vdPrettyPrint :: Lens' VideosDelete' Bool +vdPrettyPrint + = lens _vdPrettyPrint + (\ s a -> s{_vdPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vdUserIp :: Lens' VideosDelete' (Maybe Text) +vdUserIp = lens _vdUserIp (\ s a -> s{_vdUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +vdOnBehalfOfContentOwner :: Lens' VideosDelete' (Maybe Text) +vdOnBehalfOfContentOwner + = lens _vdOnBehalfOfContentOwner + (\ s a -> s{_vdOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vdKey :: Lens' VideosDelete' (Maybe Text) +vdKey = lens _vdKey (\ s a -> s{_vdKey = a}) + +-- | The id parameter specifies the YouTube video ID for the resource that is +-- being deleted. In a video resource, the id property specifies the +-- video\'s ID. +vdId :: Lens' VideosDelete' Text +vdId = lens _vdId (\ s a -> s{_vdId = a}) + +-- | OAuth 2.0 token for the current user. +vdOauthToken :: Lens' VideosDelete' (Maybe Text) +vdOauthToken + = lens _vdOauthToken (\ s a -> s{_vdOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vdFields :: Lens' VideosDelete' (Maybe Text) +vdFields = lens _vdFields (\ s a -> s{_vdFields = a}) + +-- | Data format for the response. +vdAlt :: Lens' VideosDelete' Text +vdAlt = lens _vdAlt (\ s a -> s{_vdAlt = a}) + +instance GoogleRequest VideosDelete' where + type Rs VideosDelete' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosDelete{..} + = go _vdQuotaUser _vdPrettyPrint _vdUserIp + _vdOnBehalfOfContentOwner + _vdKey + (Just _vdId) + _vdOauthToken + _vdFields + _vdAlt + where go + = clientWithRoute (Proxy :: Proxy VideosDeleteAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/GetRating.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/GetRating.hs new file mode 100644 index 000000000..201869cc2 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/GetRating.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.GetRating +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Retrieves the ratings that the authorized user gave to a list of +-- specified videos. +-- +-- /See:/ for @YouTubeVideosGetRating@. +module YouTube.Videos.GetRating + ( + -- * REST Resource + VideosGetRatingAPI + + -- * Creating a Request + , videosGetRating + , VideosGetRating + + -- * Request Lenses + , vgrQuotaUser + , vgrPrettyPrint + , vgrUserIp + , vgrOnBehalfOfContentOwner + , vgrKey + , vgrId + , vgrOauthToken + , vgrFields + , vgrAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosGetRating@ which the +-- 'VideosGetRating' request conforms to. +type VideosGetRatingAPI = + "videos" :> + "getRating" :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "id" Text :> + Get '[JSON] VideoGetRatingResponse + +-- | Retrieves the ratings that the authorized user gave to a list of +-- specified videos. +-- +-- /See:/ 'videosGetRating' smart constructor. +data VideosGetRating = VideosGetRating + { _vgrQuotaUser :: !(Maybe Text) + , _vgrPrettyPrint :: !Bool + , _vgrUserIp :: !(Maybe Text) + , _vgrOnBehalfOfContentOwner :: !(Maybe Text) + , _vgrKey :: !(Maybe Text) + , _vgrId :: !Text + , _vgrOauthToken :: !(Maybe Text) + , _vgrFields :: !(Maybe Text) + , _vgrAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosGetRating'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vgrQuotaUser' +-- +-- * 'vgrPrettyPrint' +-- +-- * 'vgrUserIp' +-- +-- * 'vgrOnBehalfOfContentOwner' +-- +-- * 'vgrKey' +-- +-- * 'vgrId' +-- +-- * 'vgrOauthToken' +-- +-- * 'vgrFields' +-- +-- * 'vgrAlt' +videosGetRating + :: Text -- ^ 'id' + -> VideosGetRating +videosGetRating pVgrId_ = + VideosGetRating + { _vgrQuotaUser = Nothing + , _vgrPrettyPrint = True + , _vgrUserIp = Nothing + , _vgrOnBehalfOfContentOwner = Nothing + , _vgrKey = Nothing + , _vgrId = pVgrId_ + , _vgrOauthToken = Nothing + , _vgrFields = Nothing + , _vgrAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vgrQuotaUser :: Lens' VideosGetRating' (Maybe Text) +vgrQuotaUser + = lens _vgrQuotaUser (\ s a -> s{_vgrQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vgrPrettyPrint :: Lens' VideosGetRating' Bool +vgrPrettyPrint + = lens _vgrPrettyPrint + (\ s a -> s{_vgrPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vgrUserIp :: Lens' VideosGetRating' (Maybe Text) +vgrUserIp + = lens _vgrUserIp (\ s a -> s{_vgrUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +vgrOnBehalfOfContentOwner :: Lens' VideosGetRating' (Maybe Text) +vgrOnBehalfOfContentOwner + = lens _vgrOnBehalfOfContentOwner + (\ s a -> s{_vgrOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vgrKey :: Lens' VideosGetRating' (Maybe Text) +vgrKey = lens _vgrKey (\ s a -> s{_vgrKey = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube video +-- ID(s) for the resource(s) for which you are retrieving rating data. In a +-- video resource, the id property specifies the video\'s ID. +vgrId :: Lens' VideosGetRating' Text +vgrId = lens _vgrId (\ s a -> s{_vgrId = a}) + +-- | OAuth 2.0 token for the current user. +vgrOauthToken :: Lens' VideosGetRating' (Maybe Text) +vgrOauthToken + = lens _vgrOauthToken + (\ s a -> s{_vgrOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vgrFields :: Lens' VideosGetRating' (Maybe Text) +vgrFields + = lens _vgrFields (\ s a -> s{_vgrFields = a}) + +-- | Data format for the response. +vgrAlt :: Lens' VideosGetRating' Text +vgrAlt = lens _vgrAlt (\ s a -> s{_vgrAlt = a}) + +instance GoogleRequest VideosGetRating' where + type Rs VideosGetRating' = VideoGetRatingResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosGetRating{..} + = go _vgrQuotaUser _vgrPrettyPrint _vgrUserIp + _vgrOnBehalfOfContentOwner + _vgrKey + (Just _vgrId) + _vgrOauthToken + _vgrFields + _vgrAlt + where go + = clientWithRoute (Proxy :: Proxy VideosGetRatingAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Insert.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Insert.hs new file mode 100644 index 000000000..18afd510d --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Insert.hs @@ -0,0 +1,254 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.Insert +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a video to YouTube and optionally sets the video\'s metadata. +-- +-- /See:/ for @YouTubeVideosInsert@. +module YouTube.Videos.Insert + ( + -- * REST Resource + VideosInsertAPI + + -- * Creating a Request + , videosInsert + , VideosInsert + + -- * Request Lenses + , viQuotaUser + , viPart + , viPrettyPrint + , viStabilize + , viUserIp + , viOnBehalfOfContentOwner + , viKey + , viOnBehalfOfContentOwnerChannel + , viNotifySubscribers + , viAutoLevels + , viOauthToken + , viFields + , viAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosInsert@ which the +-- 'VideosInsert' request conforms to. +type VideosInsertAPI = + "videos" :> + QueryParam "part" Text :> + QueryParam "stabilize" Bool :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "onBehalfOfContentOwnerChannel" Text :> + QueryParam "notifySubscribers" Bool :> + QueryParam "autoLevels" Bool :> Post '[JSON] Video + +-- | Uploads a video to YouTube and optionally sets the video\'s metadata. +-- +-- /See:/ 'videosInsert' smart constructor. +data VideosInsert = VideosInsert + { _viQuotaUser :: !(Maybe Text) + , _viPart :: !Text + , _viPrettyPrint :: !Bool + , _viStabilize :: !(Maybe Bool) + , _viUserIp :: !(Maybe Text) + , _viOnBehalfOfContentOwner :: !(Maybe Text) + , _viKey :: !(Maybe Text) + , _viOnBehalfOfContentOwnerChannel :: !(Maybe Text) + , _viNotifySubscribers :: !Bool + , _viAutoLevels :: !(Maybe Bool) + , _viOauthToken :: !(Maybe Text) + , _viFields :: !(Maybe Text) + , _viAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosInsert'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'viQuotaUser' +-- +-- * 'viPart' +-- +-- * 'viPrettyPrint' +-- +-- * 'viStabilize' +-- +-- * 'viUserIp' +-- +-- * 'viOnBehalfOfContentOwner' +-- +-- * 'viKey' +-- +-- * 'viOnBehalfOfContentOwnerChannel' +-- +-- * 'viNotifySubscribers' +-- +-- * 'viAutoLevels' +-- +-- * 'viOauthToken' +-- +-- * 'viFields' +-- +-- * 'viAlt' +videosInsert + :: Text -- ^ 'part' + -> VideosInsert +videosInsert pViPart_ = + VideosInsert + { _viQuotaUser = Nothing + , _viPart = pViPart_ + , _viPrettyPrint = True + , _viStabilize = Nothing + , _viUserIp = Nothing + , _viOnBehalfOfContentOwner = Nothing + , _viKey = Nothing + , _viOnBehalfOfContentOwnerChannel = Nothing + , _viNotifySubscribers = True + , _viAutoLevels = Nothing + , _viOauthToken = Nothing + , _viFields = Nothing + , _viAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +viQuotaUser :: Lens' VideosInsert' (Maybe Text) +viQuotaUser + = lens _viQuotaUser (\ s a -> s{_viQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. Note that not all parts +-- contain properties that can be set when inserting or updating a video. +-- For example, the statistics object encapsulates statistics that YouTube +-- calculates for a video and does not contain values that you can set or +-- modify. If the parameter value specifies a part that does not contain +-- mutable values, that part will still be included in the API response. +viPart :: Lens' VideosInsert' Text +viPart = lens _viPart (\ s a -> s{_viPart = a}) + +-- | Returns response with indentations and line breaks. +viPrettyPrint :: Lens' VideosInsert' Bool +viPrettyPrint + = lens _viPrettyPrint + (\ s a -> s{_viPrettyPrint = a}) + +-- | The stabilize parameter indicates whether YouTube should adjust the +-- video to remove shaky camera motions. +viStabilize :: Lens' VideosInsert' (Maybe Bool) +viStabilize + = lens _viStabilize (\ s a -> s{_viStabilize = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +viUserIp :: Lens' VideosInsert' (Maybe Text) +viUserIp = lens _viUserIp (\ s a -> s{_viUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +viOnBehalfOfContentOwner :: Lens' VideosInsert' (Maybe Text) +viOnBehalfOfContentOwner + = lens _viOnBehalfOfContentOwner + (\ s a -> s{_viOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +viKey :: Lens' VideosInsert' (Maybe Text) +viKey = lens _viKey (\ s a -> s{_viKey = a}) + +-- | This parameter can only be used in a properly authorized request. Note: +-- This parameter is intended exclusively for YouTube content partners. The +-- onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID +-- of the channel to which a video is being added. This parameter is +-- required when a request specifies a value for the onBehalfOfContentOwner +-- parameter, and it can only be used in conjunction with that parameter. +-- In addition, the request must be authorized using a CMS account that is +-- linked to the content owner that the onBehalfOfContentOwner parameter +-- specifies. Finally, the channel that the onBehalfOfContentOwnerChannel +-- parameter value specifies must be linked to the content owner that the +-- onBehalfOfContentOwner parameter specifies. This parameter is intended +-- for YouTube content partners that own and manage many different YouTube +-- channels. It allows content owners to authenticate once and perform +-- actions on behalf of the channel specified in the parameter value, +-- without having to provide authentication credentials for each separate +-- channel. +viOnBehalfOfContentOwnerChannel :: Lens' VideosInsert' (Maybe Text) +viOnBehalfOfContentOwnerChannel + = lens _viOnBehalfOfContentOwnerChannel + (\ s a -> s{_viOnBehalfOfContentOwnerChannel = a}) + +-- | The notifySubscribers parameter indicates whether YouTube should send a +-- notification about the new video to users who subscribe to the video\'s +-- channel. A parameter value of True indicates that subscribers will be +-- notified of newly uploaded videos. However, a channel owner who is +-- uploading many videos might prefer to set the value to False to avoid +-- sending a notification about each new video to the channel\'s +-- subscribers. +viNotifySubscribers :: Lens' VideosInsert' Bool +viNotifySubscribers + = lens _viNotifySubscribers + (\ s a -> s{_viNotifySubscribers = a}) + +-- | The autoLevels parameter indicates whether YouTube should automatically +-- enhance the video\'s lighting and color. +viAutoLevels :: Lens' VideosInsert' (Maybe Bool) +viAutoLevels + = lens _viAutoLevels (\ s a -> s{_viAutoLevels = a}) + +-- | OAuth 2.0 token for the current user. +viOauthToken :: Lens' VideosInsert' (Maybe Text) +viOauthToken + = lens _viOauthToken (\ s a -> s{_viOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +viFields :: Lens' VideosInsert' (Maybe Text) +viFields = lens _viFields (\ s a -> s{_viFields = a}) + +-- | Data format for the response. +viAlt :: Lens' VideosInsert' Text +viAlt = lens _viAlt (\ s a -> s{_viAlt = a}) + +instance GoogleRequest VideosInsert' where + type Rs VideosInsert' = Video + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosInsert{..} + = go _viQuotaUser (Just _viPart) _viPrettyPrint + _viStabilize + _viUserIp + _viOnBehalfOfContentOwner + _viKey + _viOnBehalfOfContentOwnerChannel + (Just _viNotifySubscribers) + _viAutoLevels + _viOauthToken + _viFields + _viAlt + where go + = clientWithRoute (Proxy :: Proxy VideosInsertAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs new file mode 100644 index 000000000..2d896fb52 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs @@ -0,0 +1,309 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.List +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Returns a list of videos that match the API request parameters. +-- +-- /See:/ for @YouTubeVideosList@. +module YouTube.Videos.List + ( + -- * REST Resource + VideosListAPI + + -- * Creating a Request + , videosList + , VideosList + + -- * Request Lenses + , vlChart + , vlQuotaUser + , vlPart + , vlPrettyPrint + , vlRegionCode + , vlUserIp + , vlLocale + , vlMyRating + , vlHl + , vlOnBehalfOfContentOwner + , vlVideoCategoryId + , vlKey + , vlId + , vlPageToken + , vlOauthToken + , vlMaxResults + , vlFields + , vlAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosList@ which the +-- 'VideosList' request conforms to. +type VideosListAPI = + "videos" :> + QueryParam "chart" Text :> + QueryParam "part" Text :> + QueryParam "regionCode" Text :> + QueryParam "locale" Text :> + QueryParam "myRating" Text :> + QueryParam "hl" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + QueryParam "videoCategoryId" Text :> + QueryParam "id" Text :> + QueryParam "pageToken" Text :> + QueryParam "maxResults" Word32 :> + Get '[JSON] VideoListResponse + +-- | Returns a list of videos that match the API request parameters. +-- +-- /See:/ 'videosList' smart constructor. +data VideosList = VideosList + { _vlChart :: !(Maybe Text) + , _vlQuotaUser :: !(Maybe Text) + , _vlPart :: !Text + , _vlPrettyPrint :: !Bool + , _vlRegionCode :: !(Maybe Text) + , _vlUserIp :: !(Maybe Text) + , _vlLocale :: !(Maybe Text) + , _vlMyRating :: !(Maybe Text) + , _vlHl :: !(Maybe Text) + , _vlOnBehalfOfContentOwner :: !(Maybe Text) + , _vlVideoCategoryId :: !Text + , _vlKey :: !(Maybe Text) + , _vlId :: !(Maybe Text) + , _vlPageToken :: !(Maybe Text) + , _vlOauthToken :: !(Maybe Text) + , _vlMaxResults :: !Word32 + , _vlFields :: !(Maybe Text) + , _vlAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosList'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vlChart' +-- +-- * 'vlQuotaUser' +-- +-- * 'vlPart' +-- +-- * 'vlPrettyPrint' +-- +-- * 'vlRegionCode' +-- +-- * 'vlUserIp' +-- +-- * 'vlLocale' +-- +-- * 'vlMyRating' +-- +-- * 'vlHl' +-- +-- * 'vlOnBehalfOfContentOwner' +-- +-- * 'vlVideoCategoryId' +-- +-- * 'vlKey' +-- +-- * 'vlId' +-- +-- * 'vlPageToken' +-- +-- * 'vlOauthToken' +-- +-- * 'vlMaxResults' +-- +-- * 'vlFields' +-- +-- * 'vlAlt' +videosList + :: Text -- ^ 'part' + -> VideosList +videosList pVlPart_ = + VideosList + { _vlChart = Nothing + , _vlQuotaUser = Nothing + , _vlPart = pVlPart_ + , _vlPrettyPrint = True + , _vlRegionCode = Nothing + , _vlUserIp = Nothing + , _vlLocale = Nothing + , _vlMyRating = Nothing + , _vlHl = Nothing + , _vlOnBehalfOfContentOwner = Nothing + , _vlVideoCategoryId = "0" + , _vlKey = Nothing + , _vlId = Nothing + , _vlPageToken = Nothing + , _vlOauthToken = Nothing + , _vlMaxResults = 5 + , _vlFields = Nothing + , _vlAlt = "json" + } + +-- | The chart parameter identifies the chart that you want to retrieve. +vlChart :: Lens' VideosList' (Maybe Text) +vlChart = lens _vlChart (\ s a -> s{_vlChart = a}) + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vlQuotaUser :: Lens' VideosList' (Maybe Text) +vlQuotaUser + = lens _vlQuotaUser (\ s a -> s{_vlQuotaUser = a}) + +-- | The part parameter specifies a comma-separated list of one or more video +-- resource properties that the API response will include. If the parameter +-- identifies a property that contains child properties, the child +-- properties will be included in the response. For example, in a video +-- resource, the snippet property contains the channelId, title, +-- description, tags, and categoryId properties. As such, if you set +-- part=snippet, the API response will contain all of those properties. +vlPart :: Lens' VideosList' Text +vlPart = lens _vlPart (\ s a -> s{_vlPart = a}) + +-- | Returns response with indentations and line breaks. +vlPrettyPrint :: Lens' VideosList' Bool +vlPrettyPrint + = lens _vlPrettyPrint + (\ s a -> s{_vlPrettyPrint = a}) + +-- | The regionCode parameter instructs the API to select a video chart +-- available in the specified region. This parameter can only be used in +-- conjunction with the chart parameter. The parameter value is an ISO +-- 3166-1 alpha-2 country code. +vlRegionCode :: Lens' VideosList' (Maybe Text) +vlRegionCode + = lens _vlRegionCode (\ s a -> s{_vlRegionCode = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vlUserIp :: Lens' VideosList' (Maybe Text) +vlUserIp = lens _vlUserIp (\ s a -> s{_vlUserIp = a}) + +-- | DEPRECATED +vlLocale :: Lens' VideosList' (Maybe Text) +vlLocale = lens _vlLocale (\ s a -> s{_vlLocale = a}) + +-- | Set this parameter\'s value to like or dislike to instruct the API to +-- only return videos liked or disliked by the authenticated user. +vlMyRating :: Lens' VideosList' (Maybe Text) +vlMyRating + = lens _vlMyRating (\ s a -> s{_vlMyRating = a}) + +-- | The hl parameter instructs the API to retrieve localized resource +-- metadata for a specific application language that the YouTube website +-- supports. The parameter value must be a language code included in the +-- list returned by the i18nLanguages.list method. If localized resource +-- details are available in that language, the resource\'s +-- snippet.localized object will contain the localized values. However, if +-- localized details are not available, the snippet.localized object will +-- contain resource details in the resource\'s default language. +vlHl :: Lens' VideosList' (Maybe Text) +vlHl = lens _vlHl (\ s a -> s{_vlHl = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +vlOnBehalfOfContentOwner :: Lens' VideosList' (Maybe Text) +vlOnBehalfOfContentOwner + = lens _vlOnBehalfOfContentOwner + (\ s a -> s{_vlOnBehalfOfContentOwner = a}) + +-- | The videoCategoryId parameter identifies the video category for which +-- the chart should be retrieved. This parameter can only be used in +-- conjunction with the chart parameter. By default, charts are not +-- restricted to a particular category. +vlVideoCategoryId :: Lens' VideosList' Text +vlVideoCategoryId + = lens _vlVideoCategoryId + (\ s a -> s{_vlVideoCategoryId = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vlKey :: Lens' VideosList' (Maybe Text) +vlKey = lens _vlKey (\ s a -> s{_vlKey = a}) + +-- | The id parameter specifies a comma-separated list of the YouTube video +-- ID(s) for the resource(s) that are being retrieved. In a video resource, +-- the id property specifies the video\'s ID. +vlId :: Lens' VideosList' (Maybe Text) +vlId = lens _vlId (\ s a -> s{_vlId = a}) + +-- | The pageToken parameter identifies a specific page in the result set +-- that should be returned. In an API response, the nextPageToken and +-- prevPageToken properties identify other pages that could be retrieved. +-- Note: This parameter is supported for use in conjunction with the +-- myRating parameter, but it is not supported for use in conjunction with +-- the id parameter. +vlPageToken :: Lens' VideosList' (Maybe Text) +vlPageToken + = lens _vlPageToken (\ s a -> s{_vlPageToken = a}) + +-- | OAuth 2.0 token for the current user. +vlOauthToken :: Lens' VideosList' (Maybe Text) +vlOauthToken + = lens _vlOauthToken (\ s a -> s{_vlOauthToken = a}) + +-- | The maxResults parameter specifies the maximum number of items that +-- should be returned in the result set. Note: This parameter is supported +-- for use in conjunction with the myRating parameter, but it is not +-- supported for use in conjunction with the id parameter. +vlMaxResults :: Lens' VideosList' Word32 +vlMaxResults + = lens _vlMaxResults (\ s a -> s{_vlMaxResults = a}) + +-- | Selector specifying which fields to include in a partial response. +vlFields :: Lens' VideosList' (Maybe Text) +vlFields = lens _vlFields (\ s a -> s{_vlFields = a}) + +-- | Data format for the response. +vlAlt :: Lens' VideosList' Text +vlAlt = lens _vlAlt (\ s a -> s{_vlAlt = a}) + +instance GoogleRequest VideosList' where + type Rs VideosList' = VideoListResponse + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosList{..} + = go _vlChart _vlQuotaUser (Just _vlPart) + _vlPrettyPrint + _vlRegionCode + _vlUserIp + _vlLocale + _vlMyRating + _vlHl + _vlOnBehalfOfContentOwner + (Just _vlVideoCategoryId) + _vlKey + _vlId + _vlPageToken + _vlOauthToken + (Just _vlMaxResults) + _vlFields + _vlAlt + where go + = clientWithRoute (Proxy :: Proxy VideosListAPI) r u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Rate.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Rate.hs new file mode 100644 index 000000000..faf671c7b --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Rate.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.Rate +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Add a like or dislike rating to a video or remove a rating from a video. +-- +-- /See:/ for @YouTubeVideosRate@. +module YouTube.Videos.Rate + ( + -- * REST Resource + VideosRateAPI + + -- * Creating a Request + , videosRate + , VideosRate + + -- * Request Lenses + , vidQuotaUser + , vidRating + , vidPrettyPrint + , vidUserIp + , vidKey + , vidId + , vidOauthToken + , vidFields + , vidAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosRate@ which the +-- 'VideosRate' request conforms to. +type VideosRateAPI = + "videos" :> + "rate" :> + QueryParam "rating" Text :> + QueryParam "id" Text :> Post '[JSON] () + +-- | Add a like or dislike rating to a video or remove a rating from a video. +-- +-- /See:/ 'videosRate' smart constructor. +data VideosRate = VideosRate + { _vidQuotaUser :: !(Maybe Text) + , _vidRating :: !Text + , _vidPrettyPrint :: !Bool + , _vidUserIp :: !(Maybe Text) + , _vidKey :: !(Maybe Text) + , _vidId :: !Text + , _vidOauthToken :: !(Maybe Text) + , _vidFields :: !(Maybe Text) + , _vidAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosRate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vidQuotaUser' +-- +-- * 'vidRating' +-- +-- * 'vidPrettyPrint' +-- +-- * 'vidUserIp' +-- +-- * 'vidKey' +-- +-- * 'vidId' +-- +-- * 'vidOauthToken' +-- +-- * 'vidFields' +-- +-- * 'vidAlt' +videosRate + :: Text -- ^ 'rating' + -> Text -- ^ 'id' + -> VideosRate +videosRate pVidRating_ pVidId_ = + VideosRate + { _vidQuotaUser = Nothing + , _vidRating = pVidRating_ + , _vidPrettyPrint = True + , _vidUserIp = Nothing + , _vidKey = Nothing + , _vidId = pVidId_ + , _vidOauthToken = Nothing + , _vidFields = Nothing + , _vidAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vidQuotaUser :: Lens' VideosRate' (Maybe Text) +vidQuotaUser + = lens _vidQuotaUser (\ s a -> s{_vidQuotaUser = a}) + +-- | Specifies the rating to record. +vidRating :: Lens' VideosRate' Text +vidRating + = lens _vidRating (\ s a -> s{_vidRating = a}) + +-- | Returns response with indentations and line breaks. +vidPrettyPrint :: Lens' VideosRate' Bool +vidPrettyPrint + = lens _vidPrettyPrint + (\ s a -> s{_vidPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vidUserIp :: Lens' VideosRate' (Maybe Text) +vidUserIp + = lens _vidUserIp (\ s a -> s{_vidUserIp = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vidKey :: Lens' VideosRate' (Maybe Text) +vidKey = lens _vidKey (\ s a -> s{_vidKey = a}) + +-- | The id parameter specifies the YouTube video ID of the video that is +-- being rated or having its rating removed. +vidId :: Lens' VideosRate' Text +vidId = lens _vidId (\ s a -> s{_vidId = a}) + +-- | OAuth 2.0 token for the current user. +vidOauthToken :: Lens' VideosRate' (Maybe Text) +vidOauthToken + = lens _vidOauthToken + (\ s a -> s{_vidOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vidFields :: Lens' VideosRate' (Maybe Text) +vidFields + = lens _vidFields (\ s a -> s{_vidFields = a}) + +-- | Data format for the response. +vidAlt :: Lens' VideosRate' Text +vidAlt = lens _vidAlt (\ s a -> s{_vidAlt = a}) + +instance GoogleRequest VideosRate' where + type Rs VideosRate' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosRate{..} + = go _vidQuotaUser (Just _vidRating) _vidPrettyPrint + _vidUserIp + _vidKey + (Just _vidId) + _vidOauthToken + _vidFields + _vidAlt + where go + = clientWithRoute (Proxy :: Proxy VideosRateAPI) r u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/ReportAbuse.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/ReportAbuse.hs new file mode 100644 index 000000000..031ba1fbb --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/ReportAbuse.hs @@ -0,0 +1,169 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.ReportAbuse +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Report abuse for a video. +-- +-- /See:/ for @YouTubeVideosReportAbuse@. +module YouTube.Videos.ReportAbuse + ( + -- * REST Resource + VideosReportAbuseAPI + + -- * Creating a Request + , videosReportAbuse + , VideosReportAbuse + + -- * Request Lenses + , vraQuotaUser + , vraPrettyPrint + , vraUserIp + , vraOnBehalfOfContentOwner + , vraKey + , vraOauthToken + , vraFields + , vraAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosReportAbuse@ which the +-- 'VideosReportAbuse' request conforms to. +type VideosReportAbuseAPI = + "videos" :> + "reportAbuse" :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] () + +-- | Report abuse for a video. +-- +-- /See:/ 'videosReportAbuse' smart constructor. +data VideosReportAbuse = VideosReportAbuse + { _vraQuotaUser :: !(Maybe Text) + , _vraPrettyPrint :: !Bool + , _vraUserIp :: !(Maybe Text) + , _vraOnBehalfOfContentOwner :: !(Maybe Text) + , _vraKey :: !(Maybe Text) + , _vraOauthToken :: !(Maybe Text) + , _vraFields :: !(Maybe Text) + , _vraAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosReportAbuse'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vraQuotaUser' +-- +-- * 'vraPrettyPrint' +-- +-- * 'vraUserIp' +-- +-- * 'vraOnBehalfOfContentOwner' +-- +-- * 'vraKey' +-- +-- * 'vraOauthToken' +-- +-- * 'vraFields' +-- +-- * 'vraAlt' +videosReportAbuse + :: VideosReportAbuse +videosReportAbuse = + VideosReportAbuse + { _vraQuotaUser = Nothing + , _vraPrettyPrint = True + , _vraUserIp = Nothing + , _vraOnBehalfOfContentOwner = Nothing + , _vraKey = Nothing + , _vraOauthToken = Nothing + , _vraFields = Nothing + , _vraAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vraQuotaUser :: Lens' VideosReportAbuse' (Maybe Text) +vraQuotaUser + = lens _vraQuotaUser (\ s a -> s{_vraQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +vraPrettyPrint :: Lens' VideosReportAbuse' Bool +vraPrettyPrint + = lens _vraPrettyPrint + (\ s a -> s{_vraPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vraUserIp :: Lens' VideosReportAbuse' (Maybe Text) +vraUserIp + = lens _vraUserIp (\ s a -> s{_vraUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +vraOnBehalfOfContentOwner :: Lens' VideosReportAbuse' (Maybe Text) +vraOnBehalfOfContentOwner + = lens _vraOnBehalfOfContentOwner + (\ s a -> s{_vraOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vraKey :: Lens' VideosReportAbuse' (Maybe Text) +vraKey = lens _vraKey (\ s a -> s{_vraKey = a}) + +-- | OAuth 2.0 token for the current user. +vraOauthToken :: Lens' VideosReportAbuse' (Maybe Text) +vraOauthToken + = lens _vraOauthToken + (\ s a -> s{_vraOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vraFields :: Lens' VideosReportAbuse' (Maybe Text) +vraFields + = lens _vraFields (\ s a -> s{_vraFields = a}) + +-- | Data format for the response. +vraAlt :: Lens' VideosReportAbuse' Text +vraAlt = lens _vraAlt (\ s a -> s{_vraAlt = a}) + +instance GoogleRequest VideosReportAbuse' where + type Rs VideosReportAbuse' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosReportAbuse{..} + = go _vraQuotaUser _vraPrettyPrint _vraUserIp + _vraOnBehalfOfContentOwner + _vraKey + _vraOauthToken + _vraFields + _vraAlt + where go + = clientWithRoute + (Proxy :: Proxy VideosReportAbuseAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Update.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Update.hs new file mode 100644 index 000000000..0f50a833d --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/Update.hs @@ -0,0 +1,191 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Videos.Update +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Updates a video\'s metadata. +-- +-- /See:/ for @YouTubeVideosUpdate@. +module YouTube.Videos.Update + ( + -- * REST Resource + VideosUpdateAPI + + -- * Creating a Request + , videosUpdate + , VideosUpdate + + -- * Request Lenses + , vuQuotaUser + , vuPart + , vuPrettyPrint + , vuUserIp + , vuOnBehalfOfContentOwner + , vuKey + , vuOauthToken + , vuFields + , vuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeVideosUpdate@ which the +-- 'VideosUpdate' request conforms to. +type VideosUpdateAPI = + "videos" :> + QueryParam "part" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Put '[JSON] Video + +-- | Updates a video\'s metadata. +-- +-- /See:/ 'videosUpdate' smart constructor. +data VideosUpdate = VideosUpdate + { _vuQuotaUser :: !(Maybe Text) + , _vuPart :: !Text + , _vuPrettyPrint :: !Bool + , _vuUserIp :: !(Maybe Text) + , _vuOnBehalfOfContentOwner :: !(Maybe Text) + , _vuKey :: !(Maybe Text) + , _vuOauthToken :: !(Maybe Text) + , _vuFields :: !(Maybe Text) + , _vuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideosUpdate'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vuQuotaUser' +-- +-- * 'vuPart' +-- +-- * 'vuPrettyPrint' +-- +-- * 'vuUserIp' +-- +-- * 'vuOnBehalfOfContentOwner' +-- +-- * 'vuKey' +-- +-- * 'vuOauthToken' +-- +-- * 'vuFields' +-- +-- * 'vuAlt' +videosUpdate + :: Text -- ^ 'part' + -> VideosUpdate +videosUpdate pVuPart_ = + VideosUpdate + { _vuQuotaUser = Nothing + , _vuPart = pVuPart_ + , _vuPrettyPrint = True + , _vuUserIp = Nothing + , _vuOnBehalfOfContentOwner = Nothing + , _vuKey = Nothing + , _vuOauthToken = Nothing + , _vuFields = Nothing + , _vuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +vuQuotaUser :: Lens' VideosUpdate' (Maybe Text) +vuQuotaUser + = lens _vuQuotaUser (\ s a -> s{_vuQuotaUser = a}) + +-- | The part parameter serves two purposes in this operation. It identifies +-- the properties that the write operation will set as well as the +-- properties that the API response will include. Note that this method +-- will override the existing values for all of the mutable properties that +-- are contained in any parts that the parameter value specifies. For +-- example, a video\'s privacy setting is contained in the status part. As +-- such, if your request is updating a private video, and the request\'s +-- part parameter value includes the status part, the video\'s privacy +-- setting will be updated to whatever value the request body specifies. If +-- the request body does not specify a value, the existing privacy setting +-- will be removed and the video will revert to the default privacy +-- setting. In addition, not all parts contain properties that can be set +-- when inserting or updating a video. For example, the statistics object +-- encapsulates statistics that YouTube calculates for a video and does not +-- contain values that you can set or modify. If the parameter value +-- specifies a part that does not contain mutable values, that part will +-- still be included in the API response. +vuPart :: Lens' VideosUpdate' Text +vuPart = lens _vuPart (\ s a -> s{_vuPart = a}) + +-- | Returns response with indentations and line breaks. +vuPrettyPrint :: Lens' VideosUpdate' Bool +vuPrettyPrint + = lens _vuPrettyPrint + (\ s a -> s{_vuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +vuUserIp :: Lens' VideosUpdate' (Maybe Text) +vuUserIp = lens _vuUserIp (\ s a -> s{_vuUserIp = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The actual CMS account that the user authenticates with must be +-- linked to the specified YouTube content owner. +vuOnBehalfOfContentOwner :: Lens' VideosUpdate' (Maybe Text) +vuOnBehalfOfContentOwner + = lens _vuOnBehalfOfContentOwner + (\ s a -> s{_vuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +vuKey :: Lens' VideosUpdate' (Maybe Text) +vuKey = lens _vuKey (\ s a -> s{_vuKey = a}) + +-- | OAuth 2.0 token for the current user. +vuOauthToken :: Lens' VideosUpdate' (Maybe Text) +vuOauthToken + = lens _vuOauthToken (\ s a -> s{_vuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +vuFields :: Lens' VideosUpdate' (Maybe Text) +vuFields = lens _vuFields (\ s a -> s{_vuFields = a}) + +-- | Data format for the response. +vuAlt :: Lens' VideosUpdate' Text +vuAlt = lens _vuAlt (\ s a -> s{_vuAlt = a}) + +instance GoogleRequest VideosUpdate' where + type Rs VideosUpdate' = Video + request = requestWithRoute defReq youTubeURL + requestWithRoute r u VideosUpdate{..} + = go _vuQuotaUser (Just _vuPart) _vuPrettyPrint + _vuUserIp + _vuOnBehalfOfContentOwner + _vuKey + _vuOauthToken + _vuFields + _vuAlt + where go + = clientWithRoute (Proxy :: Proxy VideosUpdateAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Set.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Set.hs new file mode 100644 index 000000000..96981e8a5 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Set.hs @@ -0,0 +1,178 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Watermarks.Set +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Uploads a watermark image to YouTube and sets it for a channel. +-- +-- /See:/ for @YouTubeWatermarksSet@. +module YouTube.Watermarks.Set + ( + -- * REST Resource + WatermarksSetAPI + + -- * Creating a Request + , watermarksSet + , WatermarksSet + + -- * Request Lenses + , wsQuotaUser + , wsPrettyPrint + , wsUserIp + , wsChannelId + , wsOnBehalfOfContentOwner + , wsKey + , wsOauthToken + , wsFields + , wsAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeWatermarksSet@ which the +-- 'WatermarksSet' request conforms to. +type WatermarksSetAPI = + "watermarks" :> + "set" :> + QueryParam "channelId" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] () + +-- | Uploads a watermark image to YouTube and sets it for a channel. +-- +-- /See:/ 'watermarksSet' smart constructor. +data WatermarksSet = WatermarksSet + { _wsQuotaUser :: !(Maybe Text) + , _wsPrettyPrint :: !Bool + , _wsUserIp :: !(Maybe Text) + , _wsChannelId :: !Text + , _wsOnBehalfOfContentOwner :: !(Maybe Text) + , _wsKey :: !(Maybe Text) + , _wsOauthToken :: !(Maybe Text) + , _wsFields :: !(Maybe Text) + , _wsAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WatermarksSet'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsQuotaUser' +-- +-- * 'wsPrettyPrint' +-- +-- * 'wsUserIp' +-- +-- * 'wsChannelId' +-- +-- * 'wsOnBehalfOfContentOwner' +-- +-- * 'wsKey' +-- +-- * 'wsOauthToken' +-- +-- * 'wsFields' +-- +-- * 'wsAlt' +watermarksSet + :: Text -- ^ 'channelId' + -> WatermarksSet +watermarksSet pWsChannelId_ = + WatermarksSet + { _wsQuotaUser = Nothing + , _wsPrettyPrint = True + , _wsUserIp = Nothing + , _wsChannelId = pWsChannelId_ + , _wsOnBehalfOfContentOwner = Nothing + , _wsKey = Nothing + , _wsOauthToken = Nothing + , _wsFields = Nothing + , _wsAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wsQuotaUser :: Lens' WatermarksSet' (Maybe Text) +wsQuotaUser + = lens _wsQuotaUser (\ s a -> s{_wsQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wsPrettyPrint :: Lens' WatermarksSet' Bool +wsPrettyPrint + = lens _wsPrettyPrint + (\ s a -> s{_wsPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wsUserIp :: Lens' WatermarksSet' (Maybe Text) +wsUserIp = lens _wsUserIp (\ s a -> s{_wsUserIp = a}) + +-- | The channelId parameter specifies the YouTube channel ID for which the +-- watermark is being provided. +wsChannelId :: Lens' WatermarksSet' Text +wsChannelId + = lens _wsChannelId (\ s a -> s{_wsChannelId = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +wsOnBehalfOfContentOwner :: Lens' WatermarksSet' (Maybe Text) +wsOnBehalfOfContentOwner + = lens _wsOnBehalfOfContentOwner + (\ s a -> s{_wsOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wsKey :: Lens' WatermarksSet' (Maybe Text) +wsKey = lens _wsKey (\ s a -> s{_wsKey = a}) + +-- | OAuth 2.0 token for the current user. +wsOauthToken :: Lens' WatermarksSet' (Maybe Text) +wsOauthToken + = lens _wsOauthToken (\ s a -> s{_wsOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wsFields :: Lens' WatermarksSet' (Maybe Text) +wsFields = lens _wsFields (\ s a -> s{_wsFields = a}) + +-- | Data format for the response. +wsAlt :: Lens' WatermarksSet' Text +wsAlt = lens _wsAlt (\ s a -> s{_wsAlt = a}) + +instance GoogleRequest WatermarksSet' where + type Rs WatermarksSet' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u WatermarksSet{..} + = go _wsQuotaUser _wsPrettyPrint _wsUserIp + (Just _wsChannelId) + _wsOnBehalfOfContentOwner + _wsKey + _wsOauthToken + _wsFields + _wsAlt + where go + = clientWithRoute (Proxy :: Proxy WatermarksSetAPI) r + u diff --git a/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Unset.hs b/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Unset.hs new file mode 100644 index 000000000..e0a08b398 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Unset.hs @@ -0,0 +1,179 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.Resource.YouTube.Watermarks.Unset +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- | Deletes a channel\'s watermark image. +-- +-- /See:/ for @YouTubeWatermarksUnset@. +module YouTube.Watermarks.Unset + ( + -- * REST Resource + WatermarksUnsetAPI + + -- * Creating a Request + , watermarksUnset + , WatermarksUnset + + -- * Request Lenses + , wuQuotaUser + , wuPrettyPrint + , wuUserIp + , wuChannelId + , wuOnBehalfOfContentOwner + , wuKey + , wuOauthToken + , wuFields + , wuAlt + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types + +-- | A resource alias for @YouTubeWatermarksUnset@ which the +-- 'WatermarksUnset' request conforms to. +type WatermarksUnsetAPI = + "watermarks" :> + "unset" :> + QueryParam "channelId" Text :> + QueryParam "onBehalfOfContentOwner" Text :> + Post '[JSON] () + +-- | Deletes a channel\'s watermark image. +-- +-- /See:/ 'watermarksUnset' smart constructor. +data WatermarksUnset = WatermarksUnset + { _wuQuotaUser :: !(Maybe Text) + , _wuPrettyPrint :: !Bool + , _wuUserIp :: !(Maybe Text) + , _wuChannelId :: !Text + , _wuOnBehalfOfContentOwner :: !(Maybe Text) + , _wuKey :: !(Maybe Text) + , _wuOauthToken :: !(Maybe Text) + , _wuFields :: !(Maybe Text) + , _wuAlt :: !Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WatermarksUnset'' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wuQuotaUser' +-- +-- * 'wuPrettyPrint' +-- +-- * 'wuUserIp' +-- +-- * 'wuChannelId' +-- +-- * 'wuOnBehalfOfContentOwner' +-- +-- * 'wuKey' +-- +-- * 'wuOauthToken' +-- +-- * 'wuFields' +-- +-- * 'wuAlt' +watermarksUnset + :: Text -- ^ 'channelId' + -> WatermarksUnset +watermarksUnset pWuChannelId_ = + WatermarksUnset + { _wuQuotaUser = Nothing + , _wuPrettyPrint = True + , _wuUserIp = Nothing + , _wuChannelId = pWuChannelId_ + , _wuOnBehalfOfContentOwner = Nothing + , _wuKey = Nothing + , _wuOauthToken = Nothing + , _wuFields = Nothing + , _wuAlt = "json" + } + +-- | Available to use for quota purposes for server-side applications. Can be +-- any arbitrary string assigned to a user, but should not exceed 40 +-- characters. Overrides userIp if both are provided. +wuQuotaUser :: Lens' WatermarksUnset' (Maybe Text) +wuQuotaUser + = lens _wuQuotaUser (\ s a -> s{_wuQuotaUser = a}) + +-- | Returns response with indentations and line breaks. +wuPrettyPrint :: Lens' WatermarksUnset' Bool +wuPrettyPrint + = lens _wuPrettyPrint + (\ s a -> s{_wuPrettyPrint = a}) + +-- | IP address of the site where the request originates. Use this if you +-- want to enforce per-user limits. +wuUserIp :: Lens' WatermarksUnset' (Maybe Text) +wuUserIp = lens _wuUserIp (\ s a -> s{_wuUserIp = a}) + +-- | The channelId parameter specifies the YouTube channel ID for which the +-- watermark is being unset. +wuChannelId :: Lens' WatermarksUnset' Text +wuChannelId + = lens _wuChannelId (\ s a -> s{_wuChannelId = a}) + +-- | Note: This parameter is intended exclusively for YouTube content +-- partners. The onBehalfOfContentOwner parameter indicates that the +-- request\'s authorization credentials identify a YouTube CMS user who is +-- acting on behalf of the content owner specified in the parameter value. +-- This parameter is intended for YouTube content partners that own and +-- manage many different YouTube channels. It allows content owners to +-- authenticate once and get access to all their video and channel data, +-- without having to provide authentication credentials for each individual +-- channel. The CMS account that the user authenticates with must be linked +-- to the specified YouTube content owner. +wuOnBehalfOfContentOwner :: Lens' WatermarksUnset' (Maybe Text) +wuOnBehalfOfContentOwner + = lens _wuOnBehalfOfContentOwner + (\ s a -> s{_wuOnBehalfOfContentOwner = a}) + +-- | API key. Your API key identifies your project and provides you with API +-- access, quota, and reports. Required unless you provide an OAuth 2.0 +-- token. +wuKey :: Lens' WatermarksUnset' (Maybe Text) +wuKey = lens _wuKey (\ s a -> s{_wuKey = a}) + +-- | OAuth 2.0 token for the current user. +wuOauthToken :: Lens' WatermarksUnset' (Maybe Text) +wuOauthToken + = lens _wuOauthToken (\ s a -> s{_wuOauthToken = a}) + +-- | Selector specifying which fields to include in a partial response. +wuFields :: Lens' WatermarksUnset' (Maybe Text) +wuFields = lens _wuFields (\ s a -> s{_wuFields = a}) + +-- | Data format for the response. +wuAlt :: Lens' WatermarksUnset' Text +wuAlt = lens _wuAlt (\ s a -> s{_wuAlt = a}) + +instance GoogleRequest WatermarksUnset' where + type Rs WatermarksUnset' = () + request = requestWithRoute defReq youTubeURL + requestWithRoute r u WatermarksUnset{..} + = go _wuQuotaUser _wuPrettyPrint _wuUserIp + (Just _wuChannelId) + _wuOnBehalfOfContentOwner + _wuKey + _wuOauthToken + _wuFields + _wuAlt + where go + = clientWithRoute (Proxy :: Proxy WatermarksUnsetAPI) + r + u diff --git a/gogol-youtube/gen/Network/Google/YouTube.hs b/gogol-youtube/gen/Network/Google/YouTube.hs new file mode 100644 index 000000000..abc868e5f --- /dev/null +++ b/gogol-youtube/gen/Network/Google/YouTube.hs @@ -0,0 +1,1685 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | +-- Module : Network.Google.YouTube +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- -- | Programmatic access to YouTube features. +-- +-- /See:/ +module Network.Google.YouTube + ( + -- * API + YouTubeAPI + , youTubeAPI + , youTubeURL + + -- * Service Methods + + -- * REST Resources + + -- ** YouTubeActivitiesInsert + , module YouTube.Activities.Insert + + -- ** YouTubeActivitiesList + , module YouTube.Activities.List + + -- ** YouTubeCaptionsDelete + , module YouTube.Captions.Delete + + -- ** YouTubeCaptionsDownload + , module YouTube.Captions.Download + + -- ** YouTubeCaptionsInsert + , module YouTube.Captions.Insert + + -- ** YouTubeCaptionsList + , module YouTube.Captions.List + + -- ** YouTubeCaptionsUpdate + , module YouTube.Captions.Update + + -- ** YouTubeChannelBannersInsert + , module YouTube.ChannelBanners.Insert + + -- ** YouTubeChannelSectionsDelete + , module YouTube.ChannelSections.Delete + + -- ** YouTubeChannelSectionsInsert + , module YouTube.ChannelSections.Insert + + -- ** YouTubeChannelSectionsList + , module YouTube.ChannelSections.List + + -- ** YouTubeChannelSectionsUpdate + , module YouTube.ChannelSections.Update + + -- ** YouTubeChannelsList + , module YouTube.Channels.List + + -- ** YouTubeChannelsUpdate + , module YouTube.Channels.Update + + -- ** YouTubeCommentThreadsInsert + , module YouTube.CommentThreads.Insert + + -- ** YouTubeCommentThreadsList + , module YouTube.CommentThreads.List + + -- ** YouTubeCommentThreadsUpdate + , module YouTube.CommentThreads.Update + + -- ** YouTubeCommentsDelete + , module YouTube.Comments.Delete + + -- ** YouTubeCommentsInsert + , module YouTube.Comments.Insert + + -- ** YouTubeCommentsList + , module YouTube.Comments.List + + -- ** YouTubeCommentsMarkAsSpam + , module YouTube.Comments.MarkAsSpam + + -- ** YouTubeCommentsSetModerationStatus + , module YouTube.Comments.SetModerationStatus + + -- ** YouTubeCommentsUpdate + , module YouTube.Comments.Update + + -- ** YouTubeGuideCategoriesList + , module YouTube.GuideCategories.List + + -- ** YouTubeI18nLanguagesList + , module YouTube.I18nLanguages.List + + -- ** YouTubeI18nRegionsList + , module YouTube.I18nRegions.List + + -- ** YouTubeLiveBroadcastsBind + , module YouTube.LiveBroadcasts.Bind + + -- ** YouTubeLiveBroadcastsBind_direct + , module YouTube.LiveBroadcasts.Bind_direct + + -- ** YouTubeLiveBroadcastsControl + , module YouTube.LiveBroadcasts.Control + + -- ** YouTubeLiveBroadcastsDelete + , module YouTube.LiveBroadcasts.Delete + + -- ** YouTubeLiveBroadcastsInsert + , module YouTube.LiveBroadcasts.Insert + + -- ** YouTubeLiveBroadcastsList + , module YouTube.LiveBroadcasts.List + + -- ** YouTubeLiveBroadcastsTransition + , module YouTube.LiveBroadcasts.Transition + + -- ** YouTubeLiveBroadcastsUpdate + , module YouTube.LiveBroadcasts.Update + + -- ** YouTubeLiveStreamsDelete + , module YouTube.LiveStreams.Delete + + -- ** YouTubeLiveStreamsInsert + , module YouTube.LiveStreams.Insert + + -- ** YouTubeLiveStreamsList + , module YouTube.LiveStreams.List + + -- ** YouTubeLiveStreamsUpdate + , module YouTube.LiveStreams.Update + + -- ** YouTubePlaylistItemsDelete + , module YouTube.PlaylistItems.Delete + + -- ** YouTubePlaylistItemsInsert + , module YouTube.PlaylistItems.Insert + + -- ** YouTubePlaylistItemsList + , module YouTube.PlaylistItems.List + + -- ** YouTubePlaylistItemsUpdate + , module YouTube.PlaylistItems.Update + + -- ** YouTubePlaylistsDelete + , module YouTube.Playlists.Delete + + -- ** YouTubePlaylistsInsert + , module YouTube.Playlists.Insert + + -- ** YouTubePlaylistsList + , module YouTube.Playlists.List + + -- ** YouTubePlaylistsUpdate + , module YouTube.Playlists.Update + + -- ** YouTubeSearchList + , module YouTube.Search.List + + -- ** YouTubeSubscriptionsDelete + , module YouTube.Subscriptions.Delete + + -- ** YouTubeSubscriptionsInsert + , module YouTube.Subscriptions.Insert + + -- ** YouTubeSubscriptionsList + , module YouTube.Subscriptions.List + + -- ** YouTubeThumbnailsSet + , module YouTube.Thumbnails.Set + + -- ** YouTubeVideoAbuseReportReasonsList + , module YouTube.VideoAbuseReportReasons.List + + -- ** YouTubeVideoCategoriesList + , module YouTube.VideoCategories.List + + -- ** YouTubeVideosDelete + , module YouTube.Videos.Delete + + -- ** YouTubeVideosGetRating + , module YouTube.Videos.GetRating + + -- ** YouTubeVideosInsert + , module YouTube.Videos.Insert + + -- ** YouTubeVideosList + , module YouTube.Videos.List + + -- ** YouTubeVideosRate + , module YouTube.Videos.Rate + + -- ** YouTubeVideosReportAbuse + , module YouTube.Videos.ReportAbuse + + -- ** YouTubeVideosUpdate + , module YouTube.Videos.Update + + -- ** YouTubeWatermarksSet + , module YouTube.Watermarks.Set + + -- ** YouTubeWatermarksUnset + , module YouTube.Watermarks.Unset + + -- * Types + + -- ** Thumbnail + , Thumbnail + , thumbnail + , tHeight + , tUrl + , tWidth + + -- ** IngestionInfo + , IngestionInfo + , ingestionInfo + , iiBackupIngestionAddress + , iiIngestionAddress + , iiStreamName + + -- ** SubscriptionSubscriberSNIppet + , SubscriptionSubscriberSNIppet + , subscriptionSubscriberSNIppet + , sssChannelId + , sssThumbnails + , sssTitle + , sssDescription + + -- ** ChannelAuditDetails + , ChannelAuditDetails + , channelAuditDetails + , cadContentIdClaimsGoodStanding + , cadOverallGoodStanding + , cadCopyrightStrikesGoodStanding + , cadCommunityGuidelinesGoodStanding + + -- ** ChannelSectionSNIppet + , ChannelSectionSNIppet + , channelSectionSNIppet + , cssStyle + , cssChannelId + , cssLocalized + , cssTitle + , cssType + , cssPosition + , cssDefaultLanguage + + -- ** PromotedItem + , PromotedItem + , promotedItem + , piCustomMessage + , piPromotedByContentOwner + , piId + , piTiming + + -- ** PlaylistListResponse + , PlaylistListResponse + , playlistListResponse + , plrEtag + , plrTokenPagination + , plrNextPageToken + , plrPageInfo + , plrKind + , plrItems + , plrVisitorId + , plrEventId + , plrPrevPageToken + + -- ** SearchListResponse + , SearchListResponse + , searchListResponse + , slrEtag + , slrTokenPagination + , slrNextPageToken + , slrPageInfo + , slrKind + , slrItems + , slrVisitorId + , slrEventId + , slrPrevPageToken + + -- ** TokenPagination + , TokenPagination + , tokenPagination + + -- ** ActivityContentDetailsRecommendation + , ActivityContentDetailsRecommendation + , activityContentDetailsRecommendation + , acdrResourceId + , acdrSeedResourceId + , acdrReason + + -- ** ResourceId + , ResourceId + , resourceId + , riKind + , riChannelId + , riVideoId + , riPlaylistId + + -- ** SearchResult + , SearchResult + , searchResult + , srEtag + , srSnippet + , srKind + , srId + + -- ** ChannelStatus + , ChannelStatus + , channelStatus + , csIsLinked + , csLongUploadsStatus + , csPrivacyStatus + + -- ** LiveStreamSNIppet + , LiveStreamSNIppet + , liveStreamSNIppet + , lssPublishedAt + , lssChannelId + , lssIsDefaultStream + , lssTitle + , lssDescription + + -- ** PlaylistStatus + , PlaylistStatus + , playlistStatus + , psPrivacyStatus + + -- ** VideoContentDetails + , VideoContentDetails + , videoContentDetails + , vcdCountryRestriction + , vcdDefinition + , vcdDimension + , vcdCaption + , vcdRegionRestriction + , vcdDuration + , vcdContentRating + , vcdLicensedContent + + -- ** ChannelListResponse + , ChannelListResponse + , channelListResponse + , clrEtag + , clrTokenPagination + , clrNextPageToken + , clrPageInfo + , clrKind + , clrItems + , clrVisitorId + , clrEventId + , clrPrevPageToken + + -- ** VideoAbuseReportReasonListResponse + , VideoAbuseReportReasonListResponse + , videoAbuseReportReasonListResponse + , varrlrEtag + , varrlrKind + , varrlrItems + , varrlrVisitorId + , varrlrEventId + + -- ** LiveBroadcastContentDetails + , LiveBroadcastContentDetails + , liveBroadcastContentDetails + , lbcdEnableContentEncryption + , lbcdEnableLowLatency + , lbcdEnableEmbed + , lbcdStartWithSlate + , lbcdMonitorStream + , lbcdBoundStreamId + , lbcdRecordFromStart + , lbcdEnableClosedCaptions + , lbcdEnableDvr + + -- ** ActivityContentDetailsFavorite + , ActivityContentDetailsFavorite + , activityContentDetailsFavorite + , acdfResourceId + + -- ** VideoTopicDetails + , VideoTopicDetails + , videoTopicDetails + , vtdTopicIds + , vtdRelevantTopicIds + + -- ** LiveStream + , LiveStream + , liveStream + , lsStatus + , lsEtag + , lsSnippet + , lsKind + , lsContentDetails + , lsId + , lsCdn + + -- ** ChannelSection + , ChannelSection + , channelSection + , csEtag + , csSnippet + , csKind + , csContentDetails + , csTargeting + , csId + , csLocalizations + + -- ** LiveBroadcastTopicDetails + , LiveBroadcastTopicDetails + , liveBroadcastTopicDetails + , lbtdTopics + + -- ** ImageSettings + , ImageSettings + , imageSettings + , isBannerMobileLowImageUrl + , isBannerTabletExtraHdImageUrl + , isSmallBrandedBannerImageImapScript + , isBannerTvHighImageUrl + , isBannerMobileHdImageUrl + , isBannerTvMediumImageUrl + , isBannerTvImageUrl + , isBannerTabletImageUrl + , isBannerMobileImageUrl + , isTrackingImageUrl + , isBannerMobileMediumHdImageUrl + , isLargeBrandedBannerImageUrl + , isBannerExternalUrl + , isBackgroundImageUrl + , isSmallBrandedBannerImageUrl + , isBannerImageUrl + , isWatchIconImageUrl + , isBannerTvLowImageUrl + , isBannerMobileExtraHdImageUrl + , isLargeBrandedBannerImageImapScript + , isBannerTabletLowImageUrl + , isBannerTabletHdImageUrl + + -- ** ActivityContentDetailsUpload + , ActivityContentDetailsUpload + , activityContentDetailsUpload + , acduVideoId + + -- ** PlaylistContentDetails + , PlaylistContentDetails + , playlistContentDetails + , pcdItemCount + + -- ** ActivityContentDetailsSocial + , ActivityContentDetailsSocial + , activityContentDetailsSocial + , acdsResourceId + , acdsImageUrl + , acdsAuthor + , acdsReferenceUrl + , acdsType + + -- ** ActivityContentDetailsSubscription + , ActivityContentDetailsSubscription + , activityContentDetailsSubscription + , aResourceId + + -- ** ActivityContentDetailsComment + , ActivityContentDetailsComment + , activityContentDetailsComment + , acdcResourceId + + -- ** ActivityContentDetailsLike + , ActivityContentDetailsLike + , activityContentDetailsLike + , acdlResourceId + + -- ** VideoFileDetails + , VideoFileDetails + , videoFileDetails + , vfdBitrateBps + , vfdCreationTime + , vfdRecordingLocation + , vfdDurationMs + , vfdFileSize + , vfdFileType + , vfdContainer + , vfdVideoStreams + , vfdAudioStreams + , vfdFileName + + -- ** LiveBroadcastStatus + , LiveBroadcastStatus + , liveBroadcastStatus + , lbsLiveBroadcastPriority + , lbsRecordingStatus + , lbsLifeCycleStatus + , lbsPrivacyStatus + + -- ** ThumbnailSetResponse + , ThumbnailSetResponse + , thumbnailSetResponse + , tsrEtag + , tsrKind + , tsrItems + , tsrVisitorId + , tsrEventId + + -- ** ActivityContentDetailsPlaylistItem + , ActivityContentDetailsPlaylistItem + , activityContentDetailsPlaylistItem + , acdpiResourceId + , acdpiPlaylistId + , acdpiPlaylistItemId + + -- ** VideoStatus + , VideoStatus + , videoStatus + , vsFailureReason + , vsPublicStatsViewable + , vsRejectionReason + , vsPublishAt + , vsUploadStatus + , vsPrivacyStatus + , vsEmbeddable + , vsLicense + + -- ** PageInfo + , PageInfo + , pageInfo + , piResultsPerPage + , piTotalResults + + -- ** ActivityContentDetailsChannelItem + , ActivityContentDetailsChannelItem + , activityContentDetailsChannelItem + , acdciResourceId + + -- ** LiveBroadcastListResponse + , LiveBroadcastListResponse + , liveBroadcastListResponse + , lblrEtag + , lblrTokenPagination + , lblrNextPageToken + , lblrPageInfo + , lblrKind + , lblrItems + , lblrVisitorId + , lblrEventId + , lblrPrevPageToken + + -- ** VideoProcessingDetails + , VideoProcessingDetails + , videoProcessingDetails + , vpdProcessingFailureReason + , vpdProcessingIssuesAvailability + , vpdProcessingProgress + , vpdThumbnailsAvailability + , vpdTagSuggestionsAvailability + , vpdProcessingStatus + , vpdEditorSuggestionsAvailability + , vpdFileDetailsAvailability + + -- ** ChannelContentDetails + , ChannelContentDetails + , channelContentDetails + , ccdRelatedPlaylists + , ccdGooglePlusUserId + + -- ** ActivitySNIppet + , ActivitySNIppet + , activitySNIppet + , asPublishedAt + , asChannelTitle + , asChannelId + , asThumbnails + , asGroupId + , asTitle + , asType + , asDescription + + -- ** VideoListResponse + , VideoListResponse + , videoListResponse + , vlrEtag + , vlrTokenPagination + , vlrNextPageToken + , vlrPageInfo + , vlrKind + , vlrItems + , vlrVisitorId + , vlrEventId + , vlrPrevPageToken + + -- ** VideoSuggestionsTagSuggestion + , VideoSuggestionsTagSuggestion + , videoSuggestionsTagSuggestion + , vstsTag + , vstsCategoryRestricts + + -- ** CommentThreadSNIppet + , CommentThreadSNIppet + , commentThreadSNIppet + , ctsIsPublic + , ctsChannelId + , ctsCanReply + , ctsVideoId + , ctsTotalReplyCount + , ctsTopLevelComment + + -- ** ChannelTopicDetails + , ChannelTopicDetails + , channelTopicDetails + , ctdTopicIds + + -- ** VideoCategoryListResponse + , VideoCategoryListResponse + , videoCategoryListResponse + , vclrEtag + , vclrTokenPagination + , vclrNextPageToken + , vclrPageInfo + , vclrKind + , vclrItems + , vclrVisitorId + , vclrEventId + , vclrPrevPageToken + + -- ** VideoMonetizationDetails + , VideoMonetizationDetails + , videoMonetizationDetails + , vmdAccess + + -- ** LiveStreamConfigurationIssue + , LiveStreamConfigurationIssue + , liveStreamConfigurationIssue + , lsciSeverity + , lsciReason + , lsciType + , lsciDescription + + -- ** VideoAbuseReportReason + , VideoAbuseReportReason + , videoAbuseReportReason + , varrEtag + , varrSnippet + , varrKind + , varrId + + -- ** ChannelSectionTargeting + , ChannelSectionTargeting + , channelSectionTargeting + , cstRegions + , cstCountries + , cstLanguages + + -- ** ChannelSectionListResponse + , ChannelSectionListResponse + , channelSectionListResponse + , cslrEtag + , cslrKind + , cslrItems + , cslrVisitorId + , cslrEventId + + -- ** PlaylistSNIppet + , PlaylistSNIppet + , playlistSNIppet + , psPublishedAt + , psChannelTitle + , psChannelId + , psThumbnails + , psLocalized + , psTitle + , psDescription + , psTags + , psDefaultLanguage + + -- ** Channel + , Channel + , channel + , cStatus + , cEtag + , cAuditDetails + , cContentOwnerDetails + , cSnippet + , cKind + , cTopicDetails + , cContentDetails + , cConversionPings + , cBrandingSettings + , cId + , cInvideoPromotion + , cStatistics + , cLocalizations + + -- ** VideoGetRatingResponse + , VideoGetRatingResponse + , videoGetRatingResponse + , vgrrEtag + , vgrrKind + , vgrrItems + , vgrrVisitorId + , vgrrEventId + + -- ** LiveStreamListResponse + , LiveStreamListResponse + , liveStreamListResponse + , lslrEtag + , lslrTokenPagination + , lslrNextPageToken + , lslrPageInfo + , lslrKind + , lslrItems + , lslrVisitorId + , lslrEventId + , lslrPrevPageToken + + -- ** I18nRegion + , I18nRegion + , i18nRegion + , irEtag + , irSnippet + , irKind + , irId + + -- ** ActivityContentDetails + , ActivityContentDetails + , activityContentDetails + , acdPromotedItem + , acdChannelItem + , acdBulletin + , acdFavorite + , acdUpload + , acdComment + , acdSocial + , acdSubscription + , acdPlaylistItem + , acdLike + , acdRecommendation + + -- ** ChannelStatistics + , ChannelStatistics + , channelStatistics + , csCommentCount + , csSubscriberCount + , csVideoCount + , csHiddenSubscriberCount + , csViewCount + + -- ** ChannelId + , ChannelId + , channelId + , ciValue + + -- ** VideoAbuseReportReasonSNIppet + , VideoAbuseReportReasonSNIppet + , videoAbuseReportReasonSNIppet + , varrsSecondaryReasons + , varrsLabel + + -- ** VideoProcessingDetailsProcessingProgress + , VideoProcessingDetailsProcessingProgress + , videoProcessingDetailsProcessingProgress + , vpdppTimeLeftMs + , vpdppPartsTotal + , vpdppPartsProcessed + + -- ** Caption + , Caption + , caption + , capEtag + , capSnippet + , capKind + , capId + + -- ** VideoContentDetailsRegionRestriction + , VideoContentDetailsRegionRestriction + , videoContentDetailsRegionRestriction + , vcdrrAllowed + , vcdrrBlocked + + -- ** ThumbnailDetails + , ThumbnailDetails + , thumbnailDetails + , tdMedium + , tdMaxres + , tdDefault + , tdStandard + , tdHigh + + -- ** ChannelSNIppet + , ChannelSNIppet + , channelSNIppet + , csPublishedAt + , csCountry + , csThumbnails + , csLocalized + , csTitle + , csDescription + , csDefaultLanguage + + -- ** MonitorStreamInfo + , MonitorStreamInfo + , monitorStreamInfo + , msiBroadcastStreamDelayMs + , msiEmbedHtml + , msiEnableMonitorStream + + -- ** InvideoTiming + , InvideoTiming + , invideoTiming + , itDurationMs + , itOffsetMs + , itType + + -- ** VideoCategory + , VideoCategory + , videoCategory + , vcEtag + , vcSnippet + , vcKind + , vcId + + -- ** LiveBroadcast + , LiveBroadcast + , liveBroadcast + , lbStatus + , lbEtag + , lbSnippet + , lbKind + , lbTopicDetails + , lbContentDetails + , lbId + , lbStatistics + + -- ** ChannelSectionContentDetails + , ChannelSectionContentDetails + , channelSectionContentDetails + , cscdChannels + , cscdPlaylists + + -- ** Video + , Video + , video + , vStatus + , vEtag + , vProjectDetails + , vRecordingDetails + , vSnippet + , vKind + , vTopicDetails + , vContentDetails + , vConversionPings + , vAgeGating + , vFileDetails + , vSuggestions + , vId + , vStatistics + , vLocalizations + , vLiveStreamingDetails + , vPlayer + , vProcessingDetails + , vMonetizationDetails + + -- ** LiveStreamContentDetails + , LiveStreamContentDetails + , liveStreamContentDetails + , lscdClosedCaptionsIngestionUrl + , lscdIsReusable + + -- ** VideoCategorySNIppet + , VideoCategorySNIppet + , videoCategorySNIppet + , vcsAssignable + , vcsChannelId + , vcsTitle + + -- ** CommentThreadListResponse + , CommentThreadListResponse + , commentThreadListResponse + , ctlrEtag + , ctlrTokenPagination + , ctlrNextPageToken + , ctlrPageInfo + , ctlrKind + , ctlrItems + , ctlrVisitorId + , ctlrEventId + + -- ** PropertyValue + , PropertyValue + , propertyValue + , pvProperty + , pvValue + + -- ** I18nLanguage + , I18nLanguage + , i18nLanguage + , ilEtag + , ilSnippet + , ilKind + , ilId + + -- ** WatchSettings + , WatchSettings + , watchSettings + , wsFeaturedPlaylistId + , wsBackgroundColor + , wsTextColor + + -- ** VideoSNIppet + , VideoSNIppet + , videoSNIppet + , vsDefaultAudioLanguage + , vsPublishedAt + , vsChannelTitle + , vsChannelId + , vsThumbnails + , vsLocalized + , vsCategoryId + , vsTitle + , vsLiveBroadcastContent + , vsDescription + , vsTags + , vsDefaultLanguage + + -- ** AccessPolicy + , AccessPolicy + , accessPolicy + , apException + , apAllowed + + -- ** ActivityListResponse + , ActivityListResponse + , activityListResponse + , alrEtag + , alrTokenPagination + , alrNextPageToken + , alrPageInfo + , alrKind + , alrItems + , alrVisitorId + , alrEventId + , alrPrevPageToken + + -- ** CdnSettings + , CdnSettings + , cdnSettings + , csIngestionInfo + , csFormat + , csIngestionType + + -- ** VideoStatistics + , VideoStatistics + , videoStatistics + , vsLikeCount + , vsCommentCount + , vsFavoriteCount + , vsDislikeCount + , vsViewCount + + -- ** LiveBroadcastSNIppet + , LiveBroadcastSNIppet + , liveBroadcastSNIppet + , lbsActualEndTime + , lbsLiveChatId + , lbsPublishedAt + , lbsScheduledEndTime + , lbsChannelId + , lbsScheduledStartTime + , lbsThumbnails + , lbsTitle + , lbsActualStartTime + , lbsIsDefaultBroadcast + , lbsDescription + + -- ** LiveBroadcastStatistics + , LiveBroadcastStatistics + , liveBroadcastStatistics + , lbsTotalChatCount + , lbsConcurrentViewers + + -- ** GuideCategorySNIppet + , GuideCategorySNIppet + , guideCategorySNIppet + , gcsChannelId + , gcsTitle + + -- ** I18nRegionListResponse + , I18nRegionListResponse + , i18nRegionListResponse + , irlrEtag + , irlrKind + , irlrItems + , irlrVisitorId + , irlrEventId + + -- ** PlaylistItemStatus + , PlaylistItemStatus + , playlistItemStatus + , pisPrivacyStatus + + -- ** InvideoPosition + , InvideoPosition + , invideoPosition + , ipCornerPosition + , ipType + + -- ** VideoFileDetailsAudioStream + , VideoFileDetailsAudioStream + , videoFileDetailsAudioStream + , vfdasBitrateBps + , vfdasVendor + , vfdasCodec + , vfdasChannelCount + + -- ** ActivityContentDetailsBulletin + , ActivityContentDetailsBulletin + , activityContentDetailsBulletin + , acdbResourceId + + -- ** VideoAbuseReport + , VideoAbuseReport + , videoAbuseReport + , varSecondaryReasonId + , varReasonId + , varVideoId + , varLanguage + , varComments + + -- ** CaptionListResponse + , CaptionListResponse + , captionListResponse + , clrlEtag + , clrlKind + , clrlItems + , clrlVisitorId + , clrlEventId + + -- ** PromotedItemId + , PromotedItemId + , promotedItemId + , piiRecentlyUploadedBy + , piiVideoId + , piiWebsiteUrl + , piiType + + -- ** SearchResultSNIppet + , SearchResultSNIppet + , searchResultSNIppet + , srsPublishedAt + , srsChannelTitle + , srsChannelId + , srsThumbnails + , srsTitle + , srsLiveBroadcastContent + , srsDescription + + -- ** VideoConversionPings + , VideoConversionPings + , videoConversionPings + , vcpPings + + -- ** VideoLocalization + , VideoLocalization + , videoLocalization + , vlTitle + , vlDescription + + -- ** PlaylistItemListResponse + , PlaylistItemListResponse + , playlistItemListResponse + , pilrEtag + , pilrTokenPagination + , pilrNextPageToken + , pilrPageInfo + , pilrKind + , pilrItems + , pilrVisitorId + , pilrEventId + , pilrPrevPageToken + + -- ** LiveStreamHealthStatus + , LiveStreamHealthStatus + , liveStreamHealthStatus + , lshsStatus + , lshsConfigurationIssues + , lshsLastUpdateTimeSeconds + + -- ** CommentListResponse + , CommentListResponse + , commentListResponse + , comEtag + , comTokenPagination + , comNextPageToken + , comPageInfo + , comKind + , comItems + , comVisitorId + , comEventId + + -- ** VideoPlayer + , VideoPlayer + , videoPlayer + , vpEmbedHtml + + -- ** LocalizedString + , LocalizedString + , localizedString + , lsValue + , lsLanguage + + -- ** SubscriptionListResponse + , SubscriptionListResponse + , subscriptionListResponse + , sEtag + , sTokenPagination + , sNextPageToken + , sPageInfo + , sKind + , sItems + , sVisitorId + , sEventId + , sPrevPageToken + + -- ** GuideCategory + , GuideCategory + , guideCategory + , gcEtag + , gcSnippet + , gcKind + , gcId + + -- ** I18nLanguageListResponse + , I18nLanguageListResponse + , i18nLanguageListResponse + , illrEtag + , illrKind + , illrItems + , illrVisitorId + , illrEventId + + -- ** InvideoBranding + , InvideoBranding + , invideoBranding + , ibImageUrl + , ibTargetChannelId + , ibTiming + , ibImageBytes + , ibPosition + + -- ** ChannelBrandingSettings + , ChannelBrandingSettings + , channelBrandingSettings + , cbsImage + , cbsHints + , cbsChannel + , cbsWatch + + -- ** InvideoPromotion + , InvideoPromotion + , invideoPromotion + , ipUseSmartTiming + , ipItems + , ipDefaultTiming + , ipPosition + + -- ** PlaylistPlayer + , PlaylistPlayer + , playlistPlayer + , ppEmbedHtml + + -- ** CommentThread + , CommentThread + , commentThread + , ctEtag + , ctSnippet + , ctKind + , ctReplies + , ctId + + -- ** PlaylistLocalization + , PlaylistLocalization + , playlistLocalization + , plTitle + , plDescription + + -- ** Activity + , Activity + , activity + , aEtag + , aSnippet + , aKind + , aContentDetails + , aId + + -- ** ChannelBannerResource + , ChannelBannerResource + , channelBannerResource + , cbrEtag + , cbrKind + , cbrUrl + + -- ** LiveBroadcastTopicSNIppet + , LiveBroadcastTopicSNIppet + , liveBroadcastTopicSNIppet + , lbtsName + , lbtsReleaseDate + + -- ** ChannelConversionPings + , ChannelConversionPings + , channelConversionPings + , ccpPings + + -- ** PlaylistItemContentDetails + , PlaylistItemContentDetails + , playlistItemContentDetails + , picdStartAt + , picdNote + , picdVideoId + , picdEndAt + + -- ** ChannelLocalization + , ChannelLocalization + , channelLocalization + , clTitle + , clDescription + + -- ** VideoAgeGating + , VideoAgeGating + , videoAgeGating + , vagAlcoholContent + , vagRestricted + , vagVideoGameRating + + -- ** LocalizedProperty + , LocalizedProperty + , localizedProperty + , lpDefault + , lpLocalized + , lpDefaultLanguage + + -- ** VideoFileDetailsVideoStream + , VideoFileDetailsVideoStream + , videoFileDetailsVideoStream + , vfdvsHeightPixels + , vfdvsBitrateBps + , vfdvsVendor + , vfdvsRotation + , vfdvsFrameRateFps + , vfdvsCodec + , vfdvsAspectRatio + , vfdvsWidthPixels + + -- ** SubscriptionContentDetails + , SubscriptionContentDetails + , subscriptionContentDetails + , scdActivityType + , scdTotalItemCount + , scdNewItemCount + + -- ** LanguageTag + , LanguageTag + , languageTag + , ltValue + + -- ** LiveBroadcastTopic + , LiveBroadcastTopic + , liveBroadcastTopic + , lbtSnippet + , lbtUnmatched + , lbtType + + -- ** PlaylistItem + , PlaylistItem + , playlistItem + , pStatus + , pEtag + , pSnippet + , pKind + , pContentDetails + , pId + + -- ** ChannelConversionPing + , ChannelConversionPing + , channelConversionPing + , ccpContext + , ccpConversionUrl + + -- ** GuideCategoryListResponse + , GuideCategoryListResponse + , guideCategoryListResponse + , gclrEtag + , gclrTokenPagination + , gclrNextPageToken + , gclrPageInfo + , gclrKind + , gclrItems + , gclrVisitorId + , gclrEventId + , gclrPrevPageToken + + -- ** Subscription + , Subscription + , subscription + , subEtag + , subSubscriberSnippet + , subSnippet + , subKind + , subContentDetails + , subId + + -- ** I18nRegionSNIppet + , I18nRegionSNIppet + , i18nRegionSNIppet + , irsName + , irsGl + + -- ** CaptionSNIppet + , CaptionSNIppet + , captionSNIppet + , csFailureReason + , csStatus + , csLastUpdated + , csTrackKind + , csIsDraft + , csIsCC + , csVideoId + , csName + , csIsLarge + , csLanguage + , csIsAutoSynced + , csIsEasyReader + , csAudioTrackType + + -- ** Comment + , Comment + , comment + , ccEtag + , ccSnippet + , ccKind + , ccId + + -- ** PlaylistItemSNIppet + , PlaylistItemSNIppet + , playlistItemSNIppet + , pisResourceId + , pisPublishedAt + , pisChannelTitle + , pisChannelId + , pisThumbnails + , pisTitle + , pisPlaylistId + , pisDescription + , pisPosition + + -- ** VideoRating + , VideoRating + , videoRating + , vrRating + , vrVideoId + + -- ** VideoProjectDetails + , VideoProjectDetails + , videoProjectDetails + , vpdTags + + -- ** VideoSuggestions + , VideoSuggestions + , videoSuggestions + , vsProcessingErrors + , vsProcessingHints + , vsEditorSuggestions + , vsProcessingWarnings + , vsTagSuggestions + + -- ** Playlist + , Playlist + , playlist + , plaStatus + , plaEtag + , plaSnippet + , plaKind + , plaContentDetails + , plaId + , plaLocalizations + , plaPlayer + + -- ** ContentRating + , ContentRating + , contentRating + , crPefilmRating + , crCccRating + , crAnatelRating + , crMpaaRating + , crCceRating + , crMccaaRating + , crChfilmRating + , crIcaaRating + , crFcbmRating + , crBmukkRating + , crMoctwRating + , crNfvcbRating + , crDjctqRatingReasons + , crAgcomRating + , crCnaRating + , crCatvfrRating + , crCbfcRating + , crKfcbRating + , crSmsaRating + , crChvrsRating + , crIncaaRating + , crNfrcRating + , crCsaRating + , crMocRating + , crEirinRating + , crFskRating + , crEefilmRating + , crRcnofRating + , crMekuRating + , crIlfilmRating + , crIfcoRating + , crNbcplRating + , crGrfilmRating + , crRteRating + , crAcbRating + , crCatvRating + , crMdaRating + , crDjctqRating + , crSmaisRating + , crCscfRating + , crTvpgRating + , crRtcRating + , crYtRating + , crBbfcRating + , crKijkwijzerRating + , crMtrcbRating + , crFcoRating + , crCicfRating + , crCzfilmRating + , crNbcRating + , crFmocRating + , crRussiaRating + , crEgfilmRating + , crResorteviolenciaRating + , crMibacRating + , crMedietilsynetRating + , crMccypRating + , crNkclvRating + , crFpbRating + , crLsfRating + , crBfvcRating + , crCncRating + , crSkfilmRating + , crOflcRating + , crKmrbRating + + -- ** CommentSNIppet + , CommentSNIppet + , commentSNIppet + , csnipViewerRating + , csnipPublishedAt + , csnipAuthorChannelUrl + , csnipModerationStatus + , csnipLikeCount + , csnipChannelId + , csnipTextOriginal + , csnipVideoId + , csnipTextDisplay + , csnipAuthorProfileImageUrl + , csnipAuthorDisplayName + , csnipUpdatedAt + , csnipAuthorChannelId + , csnipCanRate + , csnipAuthorGoogleplusProfileUrl + , csnipParentId + + -- ** VideoRecordingDetails + , VideoRecordingDetails + , videoRecordingDetails + , vrdLocation + , vrdLocationDescription + , vrdRecordingDate + + -- ** ChannelSettings + , ChannelSettings + , channelSettings + , cShowRelatedChannels + , cDefaultTab + , cFeaturedChannelsTitle + , cCountry + , cProfileColor + , cModerateComments + , cKeywords + , cUnsubscribedTrailer + , cTrackingAnalyticsAccountId + , cFeaturedChannelsUrls + , cShowBrowseView + , cTitle + , cDescription + , cDefaultLanguage + + -- ** SubscriptionSNIppet + , SubscriptionSNIppet + , subscriptionSNIppet + , ssResourceId + , ssPublishedAt + , ssChannelTitle + , ssChannelId + , ssThumbnails + , ssTitle + , ssDescription + + -- ** LiveStreamStatus + , LiveStreamStatus + , liveStreamStatus + , lssStreamStatus + , lssHealthStatus + + -- ** VideoLiveStreamingDetails + , VideoLiveStreamingDetails + , videoLiveStreamingDetails + , vlsdActualEndTime + , vlsdConcurrentViewers + , vlsdScheduledEndTime + , vlsdScheduledStartTime + , vlsdActualStartTime + + -- ** CommentThreadReplies + , CommentThreadReplies + , commentThreadReplies + , ctrComments + + -- ** ChannelSectionLocalization + , ChannelSectionLocalization + , channelSectionLocalization + , cslTitle + + -- ** ActivityContentDetailsPromotedItem + , ActivityContentDetailsPromotedItem + , activityContentDetailsPromotedItem + , acdpiDestinationUrl + , acdpiClickTrackingUrl + , acdpiForecastingUrl + , acdpiDescriptionText + , acdpiCtaType + , acdpiVideoId + , acdpiAdTag + , acdpiCreativeViewUrl + , acdpiImpressionUrl + , acdpiCustomCtaButtonText + + -- ** GeoPoint + , GeoPoint + , geoPoint + , gpLatitude + , gpAltitude + , gpLongitude + + -- ** I18nLanguageSNIppet + , I18nLanguageSNIppet + , i18nLanguageSNIppet + , ilsHl + , ilsName + + -- ** VideoAbuseReportSecondaryReason + , VideoAbuseReportSecondaryReason + , videoAbuseReportSecondaryReason + , varsrId + , varsrLabel + + -- ** VideoConversionPing + , VideoConversionPing + , videoConversionPing + , vcpContext + , vcpConversionUrl + + -- ** ChannelContentOwnerDetails + , ChannelContentOwnerDetails + , channelContentOwnerDetails + , ccodTimeLinked + , ccodContentOwner + ) where + +import Network.Google.Prelude +import Network.Google.Resource.YouTube.Activities.Insert +import Network.Google.Resource.YouTube.Activities.List +import Network.Google.Resource.YouTube.Captions.Delete +import Network.Google.Resource.YouTube.Captions.Download +import Network.Google.Resource.YouTube.Captions.Insert +import Network.Google.Resource.YouTube.Captions.List +import Network.Google.Resource.YouTube.Captions.Update +import Network.Google.Resource.YouTube.ChannelBanners.Insert +import Network.Google.Resource.YouTube.Channels.List +import Network.Google.Resource.YouTube.Channels.Update +import Network.Google.Resource.YouTube.ChannelSections.Delete +import Network.Google.Resource.YouTube.ChannelSections.Insert +import Network.Google.Resource.YouTube.ChannelSections.List +import Network.Google.Resource.YouTube.ChannelSections.Update +import Network.Google.Resource.YouTube.Comments.Delete +import Network.Google.Resource.YouTube.Comments.Insert +import Network.Google.Resource.YouTube.Comments.List +import Network.Google.Resource.YouTube.Comments.MarkAsSpam +import Network.Google.Resource.YouTube.Comments.SetModerationStatus +import Network.Google.Resource.YouTube.Comments.Update +import Network.Google.Resource.YouTube.CommentThreads.Insert +import Network.Google.Resource.YouTube.CommentThreads.List +import Network.Google.Resource.YouTube.CommentThreads.Update +import Network.Google.Resource.YouTube.GuideCategories.List +import Network.Google.Resource.YouTube.I18nLanguages.List +import Network.Google.Resource.YouTube.I18nRegions.List +import Network.Google.Resource.YouTube.LiveBroadcasts.Bind +import Network.Google.Resource.YouTube.LiveBroadcasts.Bind_direct +import Network.Google.Resource.YouTube.LiveBroadcasts.Control +import Network.Google.Resource.YouTube.LiveBroadcasts.Delete +import Network.Google.Resource.YouTube.LiveBroadcasts.Insert +import Network.Google.Resource.YouTube.LiveBroadcasts.List +import Network.Google.Resource.YouTube.LiveBroadcasts.Transition +import Network.Google.Resource.YouTube.LiveBroadcasts.Update +import Network.Google.Resource.YouTube.LiveStreams.Delete +import Network.Google.Resource.YouTube.LiveStreams.Insert +import Network.Google.Resource.YouTube.LiveStreams.List +import Network.Google.Resource.YouTube.LiveStreams.Update +import Network.Google.Resource.YouTube.PlaylistItems.Delete +import Network.Google.Resource.YouTube.PlaylistItems.Insert +import Network.Google.Resource.YouTube.PlaylistItems.List +import Network.Google.Resource.YouTube.PlaylistItems.Update +import Network.Google.Resource.YouTube.Playlists.Delete +import Network.Google.Resource.YouTube.Playlists.Insert +import Network.Google.Resource.YouTube.Playlists.List +import Network.Google.Resource.YouTube.Playlists.Update +import Network.Google.Resource.YouTube.Search.List +import Network.Google.Resource.YouTube.Subscriptions.Delete +import Network.Google.Resource.YouTube.Subscriptions.Insert +import Network.Google.Resource.YouTube.Subscriptions.List +import Network.Google.Resource.YouTube.Thumbnails.Set +import Network.Google.Resource.YouTube.VideoAbuseReportReasons.List +import Network.Google.Resource.YouTube.VideoCategories.List +import Network.Google.Resource.YouTube.Videos.Delete +import Network.Google.Resource.YouTube.Videos.GetRating +import Network.Google.Resource.YouTube.Videos.Insert +import Network.Google.Resource.YouTube.Videos.List +import Network.Google.Resource.YouTube.Videos.Rate +import Network.Google.Resource.YouTube.Videos.ReportAbuse +import Network.Google.Resource.YouTube.Videos.Update +import Network.Google.Resource.YouTube.Watermarks.Set +import Network.Google.Resource.YouTube.Watermarks.Unset +import Network.Google.YouTube.Types + +{- $resources +TODO +-} + +type YouTubeAPI = + GuideCategories :<|> ChannelBanners :<|> + I18nLanguages + :<|> Videos + :<|> LiveBroadcasts + :<|> Captions + :<|> I18nRegions + :<|> VideoAbuseReportReasons + :<|> Channels + :<|> Activities + :<|> Watermarks + :<|> CommentThreads + :<|> Thumbnails + :<|> VideoCategories + :<|> Playlists + :<|> Comments + :<|> PlaylistItems + :<|> Subscriptions + :<|> Search + :<|> ChannelSections + :<|> LiveStreams + +youTubeAPI :: Proxy YouTubeAPI +youTubeAPI = Proxy diff --git a/gogol-youtube/gen/Network/Google/YouTube/Types.hs b/gogol-youtube/gen/Network/Google/YouTube/Types.hs new file mode 100644 index 000000000..a98b193ac --- /dev/null +++ b/gogol-youtube/gen/Network/Google/YouTube/Types.hs @@ -0,0 +1,1405 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTube.Types +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTube.Types + ( + -- * Service URL + youTubeURL + + -- * Thumbnail + , Thumbnail + , thumbnail + , tHeight + , tUrl + , tWidth + + -- * IngestionInfo + , IngestionInfo + , ingestionInfo + , iiBackupIngestionAddress + , iiIngestionAddress + , iiStreamName + + -- * SubscriptionSubscriberSNIppet + , SubscriptionSubscriberSNIppet + , subscriptionSubscriberSNIppet + , sssChannelId + , sssThumbnails + , sssTitle + , sssDescription + + -- * ChannelAuditDetails + , ChannelAuditDetails + , channelAuditDetails + , cadContentIdClaimsGoodStanding + , cadOverallGoodStanding + , cadCopyrightStrikesGoodStanding + , cadCommunityGuidelinesGoodStanding + + -- * ChannelSectionSNIppet + , ChannelSectionSNIppet + , channelSectionSNIppet + , cssStyle + , cssChannelId + , cssLocalized + , cssTitle + , cssType + , cssPosition + , cssDefaultLanguage + + -- * PromotedItem + , PromotedItem + , promotedItem + , piCustomMessage + , piPromotedByContentOwner + , piId + , piTiming + + -- * PlaylistListResponse + , PlaylistListResponse + , playlistListResponse + , plrEtag + , plrTokenPagination + , plrNextPageToken + , plrPageInfo + , plrKind + , plrItems + , plrVisitorId + , plrEventId + , plrPrevPageToken + + -- * SearchListResponse + , SearchListResponse + , searchListResponse + , slrEtag + , slrTokenPagination + , slrNextPageToken + , slrPageInfo + , slrKind + , slrItems + , slrVisitorId + , slrEventId + , slrPrevPageToken + + -- * TokenPagination + , TokenPagination + , tokenPagination + + -- * ActivityContentDetailsRecommendation + , ActivityContentDetailsRecommendation + , activityContentDetailsRecommendation + , acdrResourceId + , acdrSeedResourceId + , acdrReason + + -- * ResourceId + , ResourceId + , resourceId + , riKind + , riChannelId + , riVideoId + , riPlaylistId + + -- * SearchResult + , SearchResult + , searchResult + , srEtag + , srSnippet + , srKind + , srId + + -- * ChannelStatus + , ChannelStatus + , channelStatus + , csIsLinked + , csLongUploadsStatus + , csPrivacyStatus + + -- * LiveStreamSNIppet + , LiveStreamSNIppet + , liveStreamSNIppet + , lssPublishedAt + , lssChannelId + , lssIsDefaultStream + , lssTitle + , lssDescription + + -- * PlaylistStatus + , PlaylistStatus + , playlistStatus + , psPrivacyStatus + + -- * VideoContentDetails + , VideoContentDetails + , videoContentDetails + , vcdCountryRestriction + , vcdDefinition + , vcdDimension + , vcdCaption + , vcdRegionRestriction + , vcdDuration + , vcdContentRating + , vcdLicensedContent + + -- * ChannelListResponse + , ChannelListResponse + , channelListResponse + , clrEtag + , clrTokenPagination + , clrNextPageToken + , clrPageInfo + , clrKind + , clrItems + , clrVisitorId + , clrEventId + , clrPrevPageToken + + -- * VideoAbuseReportReasonListResponse + , VideoAbuseReportReasonListResponse + , videoAbuseReportReasonListResponse + , varrlrEtag + , varrlrKind + , varrlrItems + , varrlrVisitorId + , varrlrEventId + + -- * LiveBroadcastContentDetails + , LiveBroadcastContentDetails + , liveBroadcastContentDetails + , lbcdEnableContentEncryption + , lbcdEnableLowLatency + , lbcdEnableEmbed + , lbcdStartWithSlate + , lbcdMonitorStream + , lbcdBoundStreamId + , lbcdRecordFromStart + , lbcdEnableClosedCaptions + , lbcdEnableDvr + + -- * ActivityContentDetailsFavorite + , ActivityContentDetailsFavorite + , activityContentDetailsFavorite + , acdfResourceId + + -- * VideoTopicDetails + , VideoTopicDetails + , videoTopicDetails + , vtdTopicIds + , vtdRelevantTopicIds + + -- * LiveStream + , LiveStream + , liveStream + , lsStatus + , lsEtag + , lsSnippet + , lsKind + , lsContentDetails + , lsId + , lsCdn + + -- * ChannelSection + , ChannelSection + , channelSection + , csEtag + , csSnippet + , csKind + , csContentDetails + , csTargeting + , csId + , csLocalizations + + -- * LiveBroadcastTopicDetails + , LiveBroadcastTopicDetails + , liveBroadcastTopicDetails + , lbtdTopics + + -- * ImageSettings + , ImageSettings + , imageSettings + , isBannerMobileLowImageUrl + , isBannerTabletExtraHdImageUrl + , isSmallBrandedBannerImageImapScript + , isBannerTvHighImageUrl + , isBannerMobileHdImageUrl + , isBannerTvMediumImageUrl + , isBannerTvImageUrl + , isBannerTabletImageUrl + , isBannerMobileImageUrl + , isTrackingImageUrl + , isBannerMobileMediumHdImageUrl + , isLargeBrandedBannerImageUrl + , isBannerExternalUrl + , isBackgroundImageUrl + , isSmallBrandedBannerImageUrl + , isBannerImageUrl + , isWatchIconImageUrl + , isBannerTvLowImageUrl + , isBannerMobileExtraHdImageUrl + , isLargeBrandedBannerImageImapScript + , isBannerTabletLowImageUrl + , isBannerTabletHdImageUrl + + -- * ActivityContentDetailsUpload + , ActivityContentDetailsUpload + , activityContentDetailsUpload + , acduVideoId + + -- * PlaylistContentDetails + , PlaylistContentDetails + , playlistContentDetails + , pcdItemCount + + -- * ActivityContentDetailsSocial + , ActivityContentDetailsSocial + , activityContentDetailsSocial + , acdsResourceId + , acdsImageUrl + , acdsAuthor + , acdsReferenceUrl + , acdsType + + -- * ActivityContentDetailsSubscription + , ActivityContentDetailsSubscription + , activityContentDetailsSubscription + , aResourceId + + -- * ActivityContentDetailsComment + , ActivityContentDetailsComment + , activityContentDetailsComment + , acdcResourceId + + -- * ActivityContentDetailsLike + , ActivityContentDetailsLike + , activityContentDetailsLike + , acdlResourceId + + -- * VideoFileDetails + , VideoFileDetails + , videoFileDetails + , vfdBitrateBps + , vfdCreationTime + , vfdRecordingLocation + , vfdDurationMs + , vfdFileSize + , vfdFileType + , vfdContainer + , vfdVideoStreams + , vfdAudioStreams + , vfdFileName + + -- * LiveBroadcastStatus + , LiveBroadcastStatus + , liveBroadcastStatus + , lbsLiveBroadcastPriority + , lbsRecordingStatus + , lbsLifeCycleStatus + , lbsPrivacyStatus + + -- * ThumbnailSetResponse + , ThumbnailSetResponse + , thumbnailSetResponse + , tsrEtag + , tsrKind + , tsrItems + , tsrVisitorId + , tsrEventId + + -- * ActivityContentDetailsPlaylistItem + , ActivityContentDetailsPlaylistItem + , activityContentDetailsPlaylistItem + , acdpiResourceId + , acdpiPlaylistId + , acdpiPlaylistItemId + + -- * VideoStatus + , VideoStatus + , videoStatus + , vsFailureReason + , vsPublicStatsViewable + , vsRejectionReason + , vsPublishAt + , vsUploadStatus + , vsPrivacyStatus + , vsEmbeddable + , vsLicense + + -- * PageInfo + , PageInfo + , pageInfo + , piResultsPerPage + , piTotalResults + + -- * ActivityContentDetailsChannelItem + , ActivityContentDetailsChannelItem + , activityContentDetailsChannelItem + , acdciResourceId + + -- * LiveBroadcastListResponse + , LiveBroadcastListResponse + , liveBroadcastListResponse + , lblrEtag + , lblrTokenPagination + , lblrNextPageToken + , lblrPageInfo + , lblrKind + , lblrItems + , lblrVisitorId + , lblrEventId + , lblrPrevPageToken + + -- * VideoProcessingDetails + , VideoProcessingDetails + , videoProcessingDetails + , vpdProcessingFailureReason + , vpdProcessingIssuesAvailability + , vpdProcessingProgress + , vpdThumbnailsAvailability + , vpdTagSuggestionsAvailability + , vpdProcessingStatus + , vpdEditorSuggestionsAvailability + , vpdFileDetailsAvailability + + -- * ChannelContentDetails + , ChannelContentDetails + , channelContentDetails + , ccdRelatedPlaylists + , ccdGooglePlusUserId + + -- * ActivitySNIppet + , ActivitySNIppet + , activitySNIppet + , asPublishedAt + , asChannelTitle + , asChannelId + , asThumbnails + , asGroupId + , asTitle + , asType + , asDescription + + -- * VideoListResponse + , VideoListResponse + , videoListResponse + , vlrEtag + , vlrTokenPagination + , vlrNextPageToken + , vlrPageInfo + , vlrKind + , vlrItems + , vlrVisitorId + , vlrEventId + , vlrPrevPageToken + + -- * VideoSuggestionsTagSuggestion + , VideoSuggestionsTagSuggestion + , videoSuggestionsTagSuggestion + , vstsTag + , vstsCategoryRestricts + + -- * CommentThreadSNIppet + , CommentThreadSNIppet + , commentThreadSNIppet + , ctsIsPublic + , ctsChannelId + , ctsCanReply + , ctsVideoId + , ctsTotalReplyCount + , ctsTopLevelComment + + -- * ChannelTopicDetails + , ChannelTopicDetails + , channelTopicDetails + , ctdTopicIds + + -- * VideoCategoryListResponse + , VideoCategoryListResponse + , videoCategoryListResponse + , vclrEtag + , vclrTokenPagination + , vclrNextPageToken + , vclrPageInfo + , vclrKind + , vclrItems + , vclrVisitorId + , vclrEventId + , vclrPrevPageToken + + -- * VideoMonetizationDetails + , VideoMonetizationDetails + , videoMonetizationDetails + , vmdAccess + + -- * LiveStreamConfigurationIssue + , LiveStreamConfigurationIssue + , liveStreamConfigurationIssue + , lsciSeverity + , lsciReason + , lsciType + , lsciDescription + + -- * VideoAbuseReportReason + , VideoAbuseReportReason + , videoAbuseReportReason + , varrEtag + , varrSnippet + , varrKind + , varrId + + -- * ChannelSectionTargeting + , ChannelSectionTargeting + , channelSectionTargeting + , cstRegions + , cstCountries + , cstLanguages + + -- * ChannelSectionListResponse + , ChannelSectionListResponse + , channelSectionListResponse + , cslrEtag + , cslrKind + , cslrItems + , cslrVisitorId + , cslrEventId + + -- * PlaylistSNIppet + , PlaylistSNIppet + , playlistSNIppet + , psPublishedAt + , psChannelTitle + , psChannelId + , psThumbnails + , psLocalized + , psTitle + , psDescription + , psTags + , psDefaultLanguage + + -- * Channel + , Channel + , channel + , cStatus + , cEtag + , cAuditDetails + , cContentOwnerDetails + , cSnippet + , cKind + , cTopicDetails + , cContentDetails + , cConversionPings + , cBrandingSettings + , cId + , cInvideoPromotion + , cStatistics + , cLocalizations + + -- * VideoGetRatingResponse + , VideoGetRatingResponse + , videoGetRatingResponse + , vgrrEtag + , vgrrKind + , vgrrItems + , vgrrVisitorId + , vgrrEventId + + -- * LiveStreamListResponse + , LiveStreamListResponse + , liveStreamListResponse + , lslrEtag + , lslrTokenPagination + , lslrNextPageToken + , lslrPageInfo + , lslrKind + , lslrItems + , lslrVisitorId + , lslrEventId + , lslrPrevPageToken + + -- * I18nRegion + , I18nRegion + , i18nRegion + , irEtag + , irSnippet + , irKind + , irId + + -- * ActivityContentDetails + , ActivityContentDetails + , activityContentDetails + , acdPromotedItem + , acdChannelItem + , acdBulletin + , acdFavorite + , acdUpload + , acdComment + , acdSocial + , acdSubscription + , acdPlaylistItem + , acdLike + , acdRecommendation + + -- * ChannelStatistics + , ChannelStatistics + , channelStatistics + , csCommentCount + , csSubscriberCount + , csVideoCount + , csHiddenSubscriberCount + , csViewCount + + -- * ChannelId + , ChannelId + , channelId + , ciValue + + -- * VideoAbuseReportReasonSNIppet + , VideoAbuseReportReasonSNIppet + , videoAbuseReportReasonSNIppet + , varrsSecondaryReasons + , varrsLabel + + -- * VideoProcessingDetailsProcessingProgress + , VideoProcessingDetailsProcessingProgress + , videoProcessingDetailsProcessingProgress + , vpdppTimeLeftMs + , vpdppPartsTotal + , vpdppPartsProcessed + + -- * Caption + , Caption + , caption + , capEtag + , capSnippet + , capKind + , capId + + -- * VideoContentDetailsRegionRestriction + , VideoContentDetailsRegionRestriction + , videoContentDetailsRegionRestriction + , vcdrrAllowed + , vcdrrBlocked + + -- * ThumbnailDetails + , ThumbnailDetails + , thumbnailDetails + , tdMedium + , tdMaxres + , tdDefault + , tdStandard + , tdHigh + + -- * ChannelSNIppet + , ChannelSNIppet + , channelSNIppet + , csPublishedAt + , csCountry + , csThumbnails + , csLocalized + , csTitle + , csDescription + , csDefaultLanguage + + -- * MonitorStreamInfo + , MonitorStreamInfo + , monitorStreamInfo + , msiBroadcastStreamDelayMs + , msiEmbedHtml + , msiEnableMonitorStream + + -- * InvideoTiming + , InvideoTiming + , invideoTiming + , itDurationMs + , itOffsetMs + , itType + + -- * VideoCategory + , VideoCategory + , videoCategory + , vcEtag + , vcSnippet + , vcKind + , vcId + + -- * LiveBroadcast + , LiveBroadcast + , liveBroadcast + , lbStatus + , lbEtag + , lbSnippet + , lbKind + , lbTopicDetails + , lbContentDetails + , lbId + , lbStatistics + + -- * ChannelSectionContentDetails + , ChannelSectionContentDetails + , channelSectionContentDetails + , cscdChannels + , cscdPlaylists + + -- * Video + , Video + , video + , vStatus + , vEtag + , vProjectDetails + , vRecordingDetails + , vSnippet + , vKind + , vTopicDetails + , vContentDetails + , vConversionPings + , vAgeGating + , vFileDetails + , vSuggestions + , vId + , vStatistics + , vLocalizations + , vLiveStreamingDetails + , vPlayer + , vProcessingDetails + , vMonetizationDetails + + -- * LiveStreamContentDetails + , LiveStreamContentDetails + , liveStreamContentDetails + , lscdClosedCaptionsIngestionUrl + , lscdIsReusable + + -- * VideoCategorySNIppet + , VideoCategorySNIppet + , videoCategorySNIppet + , vcsAssignable + , vcsChannelId + , vcsTitle + + -- * CommentThreadListResponse + , CommentThreadListResponse + , commentThreadListResponse + , ctlrEtag + , ctlrTokenPagination + , ctlrNextPageToken + , ctlrPageInfo + , ctlrKind + , ctlrItems + , ctlrVisitorId + , ctlrEventId + + -- * PropertyValue + , PropertyValue + , propertyValue + , pvProperty + , pvValue + + -- * I18nLanguage + , I18nLanguage + , i18nLanguage + , ilEtag + , ilSnippet + , ilKind + , ilId + + -- * WatchSettings + , WatchSettings + , watchSettings + , wsFeaturedPlaylistId + , wsBackgroundColor + , wsTextColor + + -- * VideoSNIppet + , VideoSNIppet + , videoSNIppet + , vsDefaultAudioLanguage + , vsPublishedAt + , vsChannelTitle + , vsChannelId + , vsThumbnails + , vsLocalized + , vsCategoryId + , vsTitle + , vsLiveBroadcastContent + , vsDescription + , vsTags + , vsDefaultLanguage + + -- * AccessPolicy + , AccessPolicy + , accessPolicy + , apException + , apAllowed + + -- * ActivityListResponse + , ActivityListResponse + , activityListResponse + , alrEtag + , alrTokenPagination + , alrNextPageToken + , alrPageInfo + , alrKind + , alrItems + , alrVisitorId + , alrEventId + , alrPrevPageToken + + -- * CdnSettings + , CdnSettings + , cdnSettings + , csIngestionInfo + , csFormat + , csIngestionType + + -- * VideoStatistics + , VideoStatistics + , videoStatistics + , vsLikeCount + , vsCommentCount + , vsFavoriteCount + , vsDislikeCount + , vsViewCount + + -- * LiveBroadcastSNIppet + , LiveBroadcastSNIppet + , liveBroadcastSNIppet + , lbsActualEndTime + , lbsLiveChatId + , lbsPublishedAt + , lbsScheduledEndTime + , lbsChannelId + , lbsScheduledStartTime + , lbsThumbnails + , lbsTitle + , lbsActualStartTime + , lbsIsDefaultBroadcast + , lbsDescription + + -- * LiveBroadcastStatistics + , LiveBroadcastStatistics + , liveBroadcastStatistics + , lbsTotalChatCount + , lbsConcurrentViewers + + -- * GuideCategorySNIppet + , GuideCategorySNIppet + , guideCategorySNIppet + , gcsChannelId + , gcsTitle + + -- * I18nRegionListResponse + , I18nRegionListResponse + , i18nRegionListResponse + , irlrEtag + , irlrKind + , irlrItems + , irlrVisitorId + , irlrEventId + + -- * PlaylistItemStatus + , PlaylistItemStatus + , playlistItemStatus + , pisPrivacyStatus + + -- * InvideoPosition + , InvideoPosition + , invideoPosition + , ipCornerPosition + , ipType + + -- * VideoFileDetailsAudioStream + , VideoFileDetailsAudioStream + , videoFileDetailsAudioStream + , vfdasBitrateBps + , vfdasVendor + , vfdasCodec + , vfdasChannelCount + + -- * ActivityContentDetailsBulletin + , ActivityContentDetailsBulletin + , activityContentDetailsBulletin + , acdbResourceId + + -- * VideoAbuseReport + , VideoAbuseReport + , videoAbuseReport + , varSecondaryReasonId + , varReasonId + , varVideoId + , varLanguage + , varComments + + -- * CaptionListResponse + , CaptionListResponse + , captionListResponse + , clrlEtag + , clrlKind + , clrlItems + , clrlVisitorId + , clrlEventId + + -- * PromotedItemId + , PromotedItemId + , promotedItemId + , piiRecentlyUploadedBy + , piiVideoId + , piiWebsiteUrl + , piiType + + -- * SearchResultSNIppet + , SearchResultSNIppet + , searchResultSNIppet + , srsPublishedAt + , srsChannelTitle + , srsChannelId + , srsThumbnails + , srsTitle + , srsLiveBroadcastContent + , srsDescription + + -- * VideoConversionPings + , VideoConversionPings + , videoConversionPings + , vcpPings + + -- * VideoLocalization + , VideoLocalization + , videoLocalization + , vlTitle + , vlDescription + + -- * PlaylistItemListResponse + , PlaylistItemListResponse + , playlistItemListResponse + , pilrEtag + , pilrTokenPagination + , pilrNextPageToken + , pilrPageInfo + , pilrKind + , pilrItems + , pilrVisitorId + , pilrEventId + , pilrPrevPageToken + + -- * LiveStreamHealthStatus + , LiveStreamHealthStatus + , liveStreamHealthStatus + , lshsStatus + , lshsConfigurationIssues + , lshsLastUpdateTimeSeconds + + -- * CommentListResponse + , CommentListResponse + , commentListResponse + , comEtag + , comTokenPagination + , comNextPageToken + , comPageInfo + , comKind + , comItems + , comVisitorId + , comEventId + + -- * VideoPlayer + , VideoPlayer + , videoPlayer + , vpEmbedHtml + + -- * LocalizedString + , LocalizedString + , localizedString + , lsValue + , lsLanguage + + -- * SubscriptionListResponse + , SubscriptionListResponse + , subscriptionListResponse + , sEtag + , sTokenPagination + , sNextPageToken + , sPageInfo + , sKind + , sItems + , sVisitorId + , sEventId + , sPrevPageToken + + -- * GuideCategory + , GuideCategory + , guideCategory + , gcEtag + , gcSnippet + , gcKind + , gcId + + -- * I18nLanguageListResponse + , I18nLanguageListResponse + , i18nLanguageListResponse + , illrEtag + , illrKind + , illrItems + , illrVisitorId + , illrEventId + + -- * InvideoBranding + , InvideoBranding + , invideoBranding + , ibImageUrl + , ibTargetChannelId + , ibTiming + , ibImageBytes + , ibPosition + + -- * ChannelBrandingSettings + , ChannelBrandingSettings + , channelBrandingSettings + , cbsImage + , cbsHints + , cbsChannel + , cbsWatch + + -- * InvideoPromotion + , InvideoPromotion + , invideoPromotion + , ipUseSmartTiming + , ipItems + , ipDefaultTiming + , ipPosition + + -- * PlaylistPlayer + , PlaylistPlayer + , playlistPlayer + , ppEmbedHtml + + -- * CommentThread + , CommentThread + , commentThread + , ctEtag + , ctSnippet + , ctKind + , ctReplies + , ctId + + -- * PlaylistLocalization + , PlaylistLocalization + , playlistLocalization + , plTitle + , plDescription + + -- * Activity + , Activity + , activity + , aEtag + , aSnippet + , aKind + , aContentDetails + , aId + + -- * ChannelBannerResource + , ChannelBannerResource + , channelBannerResource + , cbrEtag + , cbrKind + , cbrUrl + + -- * LiveBroadcastTopicSNIppet + , LiveBroadcastTopicSNIppet + , liveBroadcastTopicSNIppet + , lbtsName + , lbtsReleaseDate + + -- * ChannelConversionPings + , ChannelConversionPings + , channelConversionPings + , ccpPings + + -- * PlaylistItemContentDetails + , PlaylistItemContentDetails + , playlistItemContentDetails + , picdStartAt + , picdNote + , picdVideoId + , picdEndAt + + -- * ChannelLocalization + , ChannelLocalization + , channelLocalization + , clTitle + , clDescription + + -- * VideoAgeGating + , VideoAgeGating + , videoAgeGating + , vagAlcoholContent + , vagRestricted + , vagVideoGameRating + + -- * LocalizedProperty + , LocalizedProperty + , localizedProperty + , lpDefault + , lpLocalized + , lpDefaultLanguage + + -- * VideoFileDetailsVideoStream + , VideoFileDetailsVideoStream + , videoFileDetailsVideoStream + , vfdvsHeightPixels + , vfdvsBitrateBps + , vfdvsVendor + , vfdvsRotation + , vfdvsFrameRateFps + , vfdvsCodec + , vfdvsAspectRatio + , vfdvsWidthPixels + + -- * SubscriptionContentDetails + , SubscriptionContentDetails + , subscriptionContentDetails + , scdActivityType + , scdTotalItemCount + , scdNewItemCount + + -- * LanguageTag + , LanguageTag + , languageTag + , ltValue + + -- * LiveBroadcastTopic + , LiveBroadcastTopic + , liveBroadcastTopic + , lbtSnippet + , lbtUnmatched + , lbtType + + -- * PlaylistItem + , PlaylistItem + , playlistItem + , pStatus + , pEtag + , pSnippet + , pKind + , pContentDetails + , pId + + -- * ChannelConversionPing + , ChannelConversionPing + , channelConversionPing + , ccpContext + , ccpConversionUrl + + -- * GuideCategoryListResponse + , GuideCategoryListResponse + , guideCategoryListResponse + , gclrEtag + , gclrTokenPagination + , gclrNextPageToken + , gclrPageInfo + , gclrKind + , gclrItems + , gclrVisitorId + , gclrEventId + , gclrPrevPageToken + + -- * Subscription + , Subscription + , subscription + , subEtag + , subSubscriberSnippet + , subSnippet + , subKind + , subContentDetails + , subId + + -- * I18nRegionSNIppet + , I18nRegionSNIppet + , i18nRegionSNIppet + , irsName + , irsGl + + -- * CaptionSNIppet + , CaptionSNIppet + , captionSNIppet + , csFailureReason + , csStatus + , csLastUpdated + , csTrackKind + , csIsDraft + , csIsCC + , csVideoId + , csName + , csIsLarge + , csLanguage + , csIsAutoSynced + , csIsEasyReader + , csAudioTrackType + + -- * Comment + , Comment + , comment + , ccEtag + , ccSnippet + , ccKind + , ccId + + -- * PlaylistItemSNIppet + , PlaylistItemSNIppet + , playlistItemSNIppet + , pisResourceId + , pisPublishedAt + , pisChannelTitle + , pisChannelId + , pisThumbnails + , pisTitle + , pisPlaylistId + , pisDescription + , pisPosition + + -- * VideoRating + , VideoRating + , videoRating + , vrRating + , vrVideoId + + -- * VideoProjectDetails + , VideoProjectDetails + , videoProjectDetails + , vpdTags + + -- * VideoSuggestions + , VideoSuggestions + , videoSuggestions + , vsProcessingErrors + , vsProcessingHints + , vsEditorSuggestions + , vsProcessingWarnings + , vsTagSuggestions + + -- * Playlist + , Playlist + , playlist + , plaStatus + , plaEtag + , plaSnippet + , plaKind + , plaContentDetails + , plaId + , plaLocalizations + , plaPlayer + + -- * ContentRating + , ContentRating + , contentRating + , crPefilmRating + , crCccRating + , crAnatelRating + , crMpaaRating + , crCceRating + , crMccaaRating + , crChfilmRating + , crIcaaRating + , crFcbmRating + , crBmukkRating + , crMoctwRating + , crNfvcbRating + , crDjctqRatingReasons + , crAgcomRating + , crCnaRating + , crCatvfrRating + , crCbfcRating + , crKfcbRating + , crSmsaRating + , crChvrsRating + , crIncaaRating + , crNfrcRating + , crCsaRating + , crMocRating + , crEirinRating + , crFskRating + , crEefilmRating + , crRcnofRating + , crMekuRating + , crIlfilmRating + , crIfcoRating + , crNbcplRating + , crGrfilmRating + , crRteRating + , crAcbRating + , crCatvRating + , crMdaRating + , crDjctqRating + , crSmaisRating + , crCscfRating + , crTvpgRating + , crRtcRating + , crYtRating + , crBbfcRating + , crKijkwijzerRating + , crMtrcbRating + , crFcoRating + , crCicfRating + , crCzfilmRating + , crNbcRating + , crFmocRating + , crRussiaRating + , crEgfilmRating + , crResorteviolenciaRating + , crMibacRating + , crMedietilsynetRating + , crMccypRating + , crNkclvRating + , crFpbRating + , crLsfRating + , crBfvcRating + , crCncRating + , crSkfilmRating + , crOflcRating + , crKmrbRating + + -- * CommentSNIppet + , CommentSNIppet + , commentSNIppet + , csnipViewerRating + , csnipPublishedAt + , csnipAuthorChannelUrl + , csnipModerationStatus + , csnipLikeCount + , csnipChannelId + , csnipTextOriginal + , csnipVideoId + , csnipTextDisplay + , csnipAuthorProfileImageUrl + , csnipAuthorDisplayName + , csnipUpdatedAt + , csnipAuthorChannelId + , csnipCanRate + , csnipAuthorGoogleplusProfileUrl + , csnipParentId + + -- * VideoRecordingDetails + , VideoRecordingDetails + , videoRecordingDetails + , vrdLocation + , vrdLocationDescription + , vrdRecordingDate + + -- * ChannelSettings + , ChannelSettings + , channelSettings + , cShowRelatedChannels + , cDefaultTab + , cFeaturedChannelsTitle + , cCountry + , cProfileColor + , cModerateComments + , cKeywords + , cUnsubscribedTrailer + , cTrackingAnalyticsAccountId + , cFeaturedChannelsUrls + , cShowBrowseView + , cTitle + , cDescription + , cDefaultLanguage + + -- * SubscriptionSNIppet + , SubscriptionSNIppet + , subscriptionSNIppet + , ssResourceId + , ssPublishedAt + , ssChannelTitle + , ssChannelId + , ssThumbnails + , ssTitle + , ssDescription + + -- * LiveStreamStatus + , LiveStreamStatus + , liveStreamStatus + , lssStreamStatus + , lssHealthStatus + + -- * VideoLiveStreamingDetails + , VideoLiveStreamingDetails + , videoLiveStreamingDetails + , vlsdActualEndTime + , vlsdConcurrentViewers + , vlsdScheduledEndTime + , vlsdScheduledStartTime + , vlsdActualStartTime + + -- * CommentThreadReplies + , CommentThreadReplies + , commentThreadReplies + , ctrComments + + -- * ChannelSectionLocalization + , ChannelSectionLocalization + , channelSectionLocalization + , cslTitle + + -- * ActivityContentDetailsPromotedItem + , ActivityContentDetailsPromotedItem + , activityContentDetailsPromotedItem + , acdpiDestinationUrl + , acdpiClickTrackingUrl + , acdpiForecastingUrl + , acdpiDescriptionText + , acdpiCtaType + , acdpiVideoId + , acdpiAdTag + , acdpiCreativeViewUrl + , acdpiImpressionUrl + , acdpiCustomCtaButtonText + + -- * GeoPoint + , GeoPoint + , geoPoint + , gpLatitude + , gpAltitude + , gpLongitude + + -- * I18nLanguageSNIppet + , I18nLanguageSNIppet + , i18nLanguageSNIppet + , ilsHl + , ilsName + + -- * VideoAbuseReportSecondaryReason + , VideoAbuseReportSecondaryReason + , videoAbuseReportSecondaryReason + , varsrId + , varsrLabel + + -- * VideoConversionPing + , VideoConversionPing + , videoConversionPing + , vcpContext + , vcpConversionUrl + + -- * ChannelContentOwnerDetails + , ChannelContentOwnerDetails + , channelContentOwnerDetails + , ccodTimeLinked + , ccodContentOwner + ) where + +import Network.Google.Prelude +import Network.Google.YouTube.Types.Product +import Network.Google.YouTube.Types.Sum + +-- | URL referring to version 'v3' of the YouTube Data API. +youTubeURL :: BaseURL +youTubeURL + = BaseUrl Https + "https://www.googleapis.com/youtube/v3/" + 443 diff --git a/gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs b/gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs new file mode 100644 index 000000000..b9d43de2e --- /dev/null +++ b/gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs @@ -0,0 +1,13242 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTube.Types.Product +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTube.Types.Product where + +import Network.Google.Prelude +import Network.Google.YouTube.Types.Sum + +-- | A thumbnail is an image representing a YouTube resource. +-- +-- /See:/ 'thumbnail' smart constructor. +data Thumbnail = Thumbnail + { _tHeight :: !(Maybe Word32) + , _tUrl :: !(Maybe Text) + , _tWidth :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Thumbnail' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tHeight' +-- +-- * 'tUrl' +-- +-- * 'tWidth' +thumbnail + :: Thumbnail +thumbnail = + Thumbnail + { _tHeight = Nothing + , _tUrl = Nothing + , _tWidth = Nothing + } + +-- | (Optional) Height of the thumbnail image. +tHeight :: Lens' Thumbnail (Maybe Word32) +tHeight = lens _tHeight (\ s a -> s{_tHeight = a}) + +-- | The thumbnail image\'s URL. +tUrl :: Lens' Thumbnail (Maybe Text) +tUrl = lens _tUrl (\ s a -> s{_tUrl = a}) + +-- | (Optional) Width of the thumbnail image. +tWidth :: Lens' Thumbnail (Maybe Word32) +tWidth = lens _tWidth (\ s a -> s{_tWidth = a}) + +instance FromJSON Thumbnail where + parseJSON + = withObject "Thumbnail" + (\ o -> + Thumbnail <$> + (o .:? "height") <*> (o .:? "url") <*> + (o .:? "width")) + +instance ToJSON Thumbnail where + toJSON Thumbnail{..} + = object + (catMaybes + [("height" .=) <$> _tHeight, ("url" .=) <$> _tUrl, + ("width" .=) <$> _tWidth]) + +-- | Describes information necessary for ingesting an RTMP or an HTTP stream. +-- +-- /See:/ 'ingestionInfo' smart constructor. +data IngestionInfo = IngestionInfo + { _iiBackupIngestionAddress :: !(Maybe Text) + , _iiIngestionAddress :: !(Maybe Text) + , _iiStreamName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'IngestionInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'iiBackupIngestionAddress' +-- +-- * 'iiIngestionAddress' +-- +-- * 'iiStreamName' +ingestionInfo + :: IngestionInfo +ingestionInfo = + IngestionInfo + { _iiBackupIngestionAddress = Nothing + , _iiIngestionAddress = Nothing + , _iiStreamName = Nothing + } + +-- | The backup ingestion URL that you should use to stream video to YouTube. +-- You have the option of simultaneously streaming the content that you are +-- sending to the ingestionAddress to this URL. +iiBackupIngestionAddress :: Lens' IngestionInfo (Maybe Text) +iiBackupIngestionAddress + = lens _iiBackupIngestionAddress + (\ s a -> s{_iiBackupIngestionAddress = a}) + +-- | The primary ingestion URL that you should use to stream video to +-- YouTube. You must stream video to this URL. Depending on which +-- application or tool you use to encode your video stream, you may need to +-- enter the stream URL and stream name separately or you may need to +-- concatenate them in the following format: STREAM_URL\/STREAM_NAME +iiIngestionAddress :: Lens' IngestionInfo (Maybe Text) +iiIngestionAddress + = lens _iiIngestionAddress + (\ s a -> s{_iiIngestionAddress = a}) + +-- | The HTTP or RTMP stream name that YouTube assigns to the video stream. +iiStreamName :: Lens' IngestionInfo (Maybe Text) +iiStreamName + = lens _iiStreamName (\ s a -> s{_iiStreamName = a}) + +instance FromJSON IngestionInfo where + parseJSON + = withObject "IngestionInfo" + (\ o -> + IngestionInfo <$> + (o .:? "backupIngestionAddress") <*> + (o .:? "ingestionAddress") + <*> (o .:? "streamName")) + +instance ToJSON IngestionInfo where + toJSON IngestionInfo{..} + = object + (catMaybes + [("backupIngestionAddress" .=) <$> + _iiBackupIngestionAddress, + ("ingestionAddress" .=) <$> _iiIngestionAddress, + ("streamName" .=) <$> _iiStreamName]) + +-- | Basic details about a subscription\'s subscriber including title, +-- description, channel ID and thumbnails. +-- +-- /See:/ 'subscriptionSubscriberSNIppet' smart constructor. +data SubscriptionSubscriberSNIppet = SubscriptionSubscriberSNIppet + { _sssChannelId :: !(Maybe Text) + , _sssThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _sssTitle :: !(Maybe Text) + , _sssDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionSubscriberSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sssChannelId' +-- +-- * 'sssThumbnails' +-- +-- * 'sssTitle' +-- +-- * 'sssDescription' +subscriptionSubscriberSNIppet + :: SubscriptionSubscriberSNIppet +subscriptionSubscriberSNIppet = + SubscriptionSubscriberSNIppet + { _sssChannelId = Nothing + , _sssThumbnails = Nothing + , _sssTitle = Nothing + , _sssDescription = Nothing + } + +-- | The channel ID of the subscriber. +sssChannelId :: Lens' SubscriptionSubscriberSNIppet (Maybe Text) +sssChannelId + = lens _sssChannelId (\ s a -> s{_sssChannelId = a}) + +-- | Thumbnails for this subscriber. +sssThumbnails :: Lens' SubscriptionSubscriberSNIppet (Maybe (Maybe ThumbnailDetails)) +sssThumbnails + = lens _sssThumbnails + (\ s a -> s{_sssThumbnails = a}) + +-- | The title of the subscriber. +sssTitle :: Lens' SubscriptionSubscriberSNIppet (Maybe Text) +sssTitle = lens _sssTitle (\ s a -> s{_sssTitle = a}) + +-- | The description of the subscriber. +sssDescription :: Lens' SubscriptionSubscriberSNIppet (Maybe Text) +sssDescription + = lens _sssDescription + (\ s a -> s{_sssDescription = a}) + +instance FromJSON SubscriptionSubscriberSNIppet where + parseJSON + = withObject "SubscriptionSubscriberSNIppet" + (\ o -> + SubscriptionSubscriberSNIppet <$> + (o .:? "channelId") <*> (o .:? "thumbnails") <*> + (o .:? "title") + <*> (o .:? "description")) + +instance ToJSON SubscriptionSubscriberSNIppet where + toJSON SubscriptionSubscriberSNIppet{..} + = object + (catMaybes + [("channelId" .=) <$> _sssChannelId, + ("thumbnails" .=) <$> _sssThumbnails, + ("title" .=) <$> _sssTitle, + ("description" .=) <$> _sssDescription]) + +-- | The auditDetails object encapsulates channel data that is relevant for +-- YouTube Partners during the audit process. +-- +-- /See:/ 'channelAuditDetails' smart constructor. +data ChannelAuditDetails = ChannelAuditDetails + { _cadContentIdClaimsGoodStanding :: !(Maybe Bool) + , _cadOverallGoodStanding :: !(Maybe Bool) + , _cadCopyrightStrikesGoodStanding :: !(Maybe Bool) + , _cadCommunityGuidelinesGoodStanding :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelAuditDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cadContentIdClaimsGoodStanding' +-- +-- * 'cadOverallGoodStanding' +-- +-- * 'cadCopyrightStrikesGoodStanding' +-- +-- * 'cadCommunityGuidelinesGoodStanding' +channelAuditDetails + :: ChannelAuditDetails +channelAuditDetails = + ChannelAuditDetails + { _cadContentIdClaimsGoodStanding = Nothing + , _cadOverallGoodStanding = Nothing + , _cadCopyrightStrikesGoodStanding = Nothing + , _cadCommunityGuidelinesGoodStanding = Nothing + } + +-- | Whether or not the channel has any unresolved claims. +cadContentIdClaimsGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool) +cadContentIdClaimsGoodStanding + = lens _cadContentIdClaimsGoodStanding + (\ s a -> s{_cadContentIdClaimsGoodStanding = a}) + +-- | Describes the general state of the channel. This field will always show +-- if there are any issues whatsoever with the channel. Currently this +-- field represents the result of the logical and operation over the +-- community guidelines good standing, the copyright strikes good standing +-- and the content ID claims good standing, but this may change in the +-- future. +cadOverallGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool) +cadOverallGoodStanding + = lens _cadOverallGoodStanding + (\ s a -> s{_cadOverallGoodStanding = a}) + +-- | Whether or not the channel has any copyright strikes. +cadCopyrightStrikesGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool) +cadCopyrightStrikesGoodStanding + = lens _cadCopyrightStrikesGoodStanding + (\ s a -> s{_cadCopyrightStrikesGoodStanding = a}) + +-- | Whether or not the channel respects the community guidelines. +cadCommunityGuidelinesGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool) +cadCommunityGuidelinesGoodStanding + = lens _cadCommunityGuidelinesGoodStanding + (\ s a -> s{_cadCommunityGuidelinesGoodStanding = a}) + +instance FromJSON ChannelAuditDetails where + parseJSON + = withObject "ChannelAuditDetails" + (\ o -> + ChannelAuditDetails <$> + (o .:? "contentIdClaimsGoodStanding") <*> + (o .:? "overallGoodStanding") + <*> (o .:? "copyrightStrikesGoodStanding") + <*> (o .:? "communityGuidelinesGoodStanding")) + +instance ToJSON ChannelAuditDetails where + toJSON ChannelAuditDetails{..} + = object + (catMaybes + [("contentIdClaimsGoodStanding" .=) <$> + _cadContentIdClaimsGoodStanding, + ("overallGoodStanding" .=) <$> + _cadOverallGoodStanding, + ("copyrightStrikesGoodStanding" .=) <$> + _cadCopyrightStrikesGoodStanding, + ("communityGuidelinesGoodStanding" .=) <$> + _cadCommunityGuidelinesGoodStanding]) + +-- | Basic details about a channel section, including title, style and +-- position. +-- +-- /See:/ 'channelSectionSNIppet' smart constructor. +data ChannelSectionSNIppet = ChannelSectionSNIppet + { _cssStyle :: !(Maybe Text) + , _cssChannelId :: !(Maybe Text) + , _cssLocalized :: !(Maybe (Maybe ChannelSectionLocalization)) + , _cssTitle :: !(Maybe Text) + , _cssType :: !(Maybe Text) + , _cssPosition :: !(Maybe Word32) + , _cssDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cssStyle' +-- +-- * 'cssChannelId' +-- +-- * 'cssLocalized' +-- +-- * 'cssTitle' +-- +-- * 'cssType' +-- +-- * 'cssPosition' +-- +-- * 'cssDefaultLanguage' +channelSectionSNIppet + :: ChannelSectionSNIppet +channelSectionSNIppet = + ChannelSectionSNIppet + { _cssStyle = Nothing + , _cssChannelId = Nothing + , _cssLocalized = Nothing + , _cssTitle = Nothing + , _cssType = Nothing + , _cssPosition = Nothing + , _cssDefaultLanguage = Nothing + } + +-- | The style of the channel section. +cssStyle :: Lens' ChannelSectionSNIppet (Maybe Text) +cssStyle = lens _cssStyle (\ s a -> s{_cssStyle = a}) + +-- | The ID that YouTube uses to uniquely identify the channel that published +-- the channel section. +cssChannelId :: Lens' ChannelSectionSNIppet (Maybe Text) +cssChannelId + = lens _cssChannelId (\ s a -> s{_cssChannelId = a}) + +-- | Localized title, read-only. +cssLocalized :: Lens' ChannelSectionSNIppet (Maybe (Maybe ChannelSectionLocalization)) +cssLocalized + = lens _cssLocalized (\ s a -> s{_cssLocalized = a}) + +-- | The channel section\'s title for multiple_playlists and +-- multiple_channels. +cssTitle :: Lens' ChannelSectionSNIppet (Maybe Text) +cssTitle = lens _cssTitle (\ s a -> s{_cssTitle = a}) + +-- | The type of the channel section. +cssType :: Lens' ChannelSectionSNIppet (Maybe Text) +cssType = lens _cssType (\ s a -> s{_cssType = a}) + +-- | The position of the channel section in the channel. +cssPosition :: Lens' ChannelSectionSNIppet (Maybe Word32) +cssPosition + = lens _cssPosition (\ s a -> s{_cssPosition = a}) + +-- | The language of the channel section\'s default title and description. +cssDefaultLanguage :: Lens' ChannelSectionSNIppet (Maybe Text) +cssDefaultLanguage + = lens _cssDefaultLanguage + (\ s a -> s{_cssDefaultLanguage = a}) + +instance FromJSON ChannelSectionSNIppet where + parseJSON + = withObject "ChannelSectionSNIppet" + (\ o -> + ChannelSectionSNIppet <$> + (o .:? "style") <*> (o .:? "channelId") <*> + (o .:? "localized") + <*> (o .:? "title") + <*> (o .:? "type") + <*> (o .:? "position") + <*> (o .:? "defaultLanguage")) + +instance ToJSON ChannelSectionSNIppet where + toJSON ChannelSectionSNIppet{..} + = object + (catMaybes + [("style" .=) <$> _cssStyle, + ("channelId" .=) <$> _cssChannelId, + ("localized" .=) <$> _cssLocalized, + ("title" .=) <$> _cssTitle, ("type" .=) <$> _cssType, + ("position" .=) <$> _cssPosition, + ("defaultLanguage" .=) <$> _cssDefaultLanguage]) + +-- | Describes a single promoted item. +-- +-- /See:/ 'promotedItem' smart constructor. +data PromotedItem = PromotedItem + { _piCustomMessage :: !(Maybe Text) + , _piPromotedByContentOwner :: !(Maybe Bool) + , _piId :: !(Maybe (Maybe PromotedItemId)) + , _piTiming :: !(Maybe (Maybe InvideoTiming)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PromotedItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piCustomMessage' +-- +-- * 'piPromotedByContentOwner' +-- +-- * 'piId' +-- +-- * 'piTiming' +promotedItem + :: PromotedItem +promotedItem = + PromotedItem + { _piCustomMessage = Nothing + , _piPromotedByContentOwner = Nothing + , _piId = Nothing + , _piTiming = Nothing + } + +-- | A custom message to display for this promotion. This field is currently +-- ignored unless the promoted item is a website. +piCustomMessage :: Lens' PromotedItem (Maybe Text) +piCustomMessage + = lens _piCustomMessage + (\ s a -> s{_piCustomMessage = a}) + +-- | If true, the content owner\'s name will be used when displaying the +-- promotion. This field can only be set when the update is made on behalf +-- of the content owner. +piPromotedByContentOwner :: Lens' PromotedItem (Maybe Bool) +piPromotedByContentOwner + = lens _piPromotedByContentOwner + (\ s a -> s{_piPromotedByContentOwner = a}) + +-- | Identifies the promoted item. +piId :: Lens' PromotedItem (Maybe (Maybe PromotedItemId)) +piId = lens _piId (\ s a -> s{_piId = a}) + +-- | The temporal position within the video where the promoted item will be +-- displayed. If present, it overrides the default timing. +piTiming :: Lens' PromotedItem (Maybe (Maybe InvideoTiming)) +piTiming = lens _piTiming (\ s a -> s{_piTiming = a}) + +instance FromJSON PromotedItem where + parseJSON + = withObject "PromotedItem" + (\ o -> + PromotedItem <$> + (o .:? "customMessage") <*> + (o .:? "promotedByContentOwner") + <*> (o .:? "id") + <*> (o .:? "timing")) + +instance ToJSON PromotedItem where + toJSON PromotedItem{..} + = object + (catMaybes + [("customMessage" .=) <$> _piCustomMessage, + ("promotedByContentOwner" .=) <$> + _piPromotedByContentOwner, + ("id" .=) <$> _piId, ("timing" .=) <$> _piTiming]) + +-- +-- /See:/ 'playlistListResponse' smart constructor. +data PlaylistListResponse = PlaylistListResponse + { _plrEtag :: !(Maybe Text) + , _plrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _plrNextPageToken :: !(Maybe Text) + , _plrPageInfo :: !(Maybe (Maybe PageInfo)) + , _plrKind :: !Text + , _plrItems :: !(Maybe [Maybe Playlist]) + , _plrVisitorId :: !(Maybe Text) + , _plrEventId :: !(Maybe Text) + , _plrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plrEtag' +-- +-- * 'plrTokenPagination' +-- +-- * 'plrNextPageToken' +-- +-- * 'plrPageInfo' +-- +-- * 'plrKind' +-- +-- * 'plrItems' +-- +-- * 'plrVisitorId' +-- +-- * 'plrEventId' +-- +-- * 'plrPrevPageToken' +playlistListResponse + :: PlaylistListResponse +playlistListResponse = + PlaylistListResponse + { _plrEtag = Nothing + , _plrTokenPagination = Nothing + , _plrNextPageToken = Nothing + , _plrPageInfo = Nothing + , _plrKind = "youtube#playlistListResponse" + , _plrItems = Nothing + , _plrVisitorId = Nothing + , _plrEventId = Nothing + , _plrPrevPageToken = Nothing + } + +-- | Etag of this resource. +plrEtag :: Lens' PlaylistListResponse (Maybe Text) +plrEtag = lens _plrEtag (\ s a -> s{_plrEtag = a}) + +plrTokenPagination :: Lens' PlaylistListResponse (Maybe (Maybe TokenPagination)) +plrTokenPagination + = lens _plrTokenPagination + (\ s a -> s{_plrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +plrNextPageToken :: Lens' PlaylistListResponse (Maybe Text) +plrNextPageToken + = lens _plrNextPageToken + (\ s a -> s{_plrNextPageToken = a}) + +plrPageInfo :: Lens' PlaylistListResponse (Maybe (Maybe PageInfo)) +plrPageInfo + = lens _plrPageInfo (\ s a -> s{_plrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#playlistListResponse\". +plrKind :: Lens' PlaylistListResponse Text +plrKind = lens _plrKind (\ s a -> s{_plrKind = a}) + +-- | A list of playlists that match the request criteria. +plrItems :: Lens' PlaylistListResponse [Maybe Playlist] +plrItems + = lens _plrItems (\ s a -> s{_plrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +plrVisitorId :: Lens' PlaylistListResponse (Maybe Text) +plrVisitorId + = lens _plrVisitorId (\ s a -> s{_plrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +plrEventId :: Lens' PlaylistListResponse (Maybe Text) +plrEventId + = lens _plrEventId (\ s a -> s{_plrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +plrPrevPageToken :: Lens' PlaylistListResponse (Maybe Text) +plrPrevPageToken + = lens _plrPrevPageToken + (\ s a -> s{_plrPrevPageToken = a}) + +instance FromJSON PlaylistListResponse where + parseJSON + = withObject "PlaylistListResponse" + (\ o -> + PlaylistListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#playlistListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON PlaylistListResponse where + toJSON PlaylistListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _plrEtag, + ("tokenPagination" .=) <$> _plrTokenPagination, + ("nextPageToken" .=) <$> _plrNextPageToken, + ("pageInfo" .=) <$> _plrPageInfo, + Just ("kind" .= _plrKind), + ("items" .=) <$> _plrItems, + ("visitorId" .=) <$> _plrVisitorId, + ("eventId" .=) <$> _plrEventId, + ("prevPageToken" .=) <$> _plrPrevPageToken]) + +-- +-- /See:/ 'searchListResponse' smart constructor. +data SearchListResponse = SearchListResponse + { _slrEtag :: !(Maybe Text) + , _slrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _slrNextPageToken :: !(Maybe Text) + , _slrPageInfo :: !(Maybe (Maybe PageInfo)) + , _slrKind :: !Text + , _slrItems :: !(Maybe [Maybe SearchResult]) + , _slrVisitorId :: !(Maybe Text) + , _slrEventId :: !(Maybe Text) + , _slrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'slrEtag' +-- +-- * 'slrTokenPagination' +-- +-- * 'slrNextPageToken' +-- +-- * 'slrPageInfo' +-- +-- * 'slrKind' +-- +-- * 'slrItems' +-- +-- * 'slrVisitorId' +-- +-- * 'slrEventId' +-- +-- * 'slrPrevPageToken' +searchListResponse + :: SearchListResponse +searchListResponse = + SearchListResponse + { _slrEtag = Nothing + , _slrTokenPagination = Nothing + , _slrNextPageToken = Nothing + , _slrPageInfo = Nothing + , _slrKind = "youtube#searchListResponse" + , _slrItems = Nothing + , _slrVisitorId = Nothing + , _slrEventId = Nothing + , _slrPrevPageToken = Nothing + } + +-- | Etag of this resource. +slrEtag :: Lens' SearchListResponse (Maybe Text) +slrEtag = lens _slrEtag (\ s a -> s{_slrEtag = a}) + +slrTokenPagination :: Lens' SearchListResponse (Maybe (Maybe TokenPagination)) +slrTokenPagination + = lens _slrTokenPagination + (\ s a -> s{_slrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +slrNextPageToken :: Lens' SearchListResponse (Maybe Text) +slrNextPageToken + = lens _slrNextPageToken + (\ s a -> s{_slrNextPageToken = a}) + +slrPageInfo :: Lens' SearchListResponse (Maybe (Maybe PageInfo)) +slrPageInfo + = lens _slrPageInfo (\ s a -> s{_slrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#searchListResponse\". +slrKind :: Lens' SearchListResponse Text +slrKind = lens _slrKind (\ s a -> s{_slrKind = a}) + +-- | A list of results that match the search criteria. +slrItems :: Lens' SearchListResponse [Maybe SearchResult] +slrItems + = lens _slrItems (\ s a -> s{_slrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +slrVisitorId :: Lens' SearchListResponse (Maybe Text) +slrVisitorId + = lens _slrVisitorId (\ s a -> s{_slrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +slrEventId :: Lens' SearchListResponse (Maybe Text) +slrEventId + = lens _slrEventId (\ s a -> s{_slrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +slrPrevPageToken :: Lens' SearchListResponse (Maybe Text) +slrPrevPageToken + = lens _slrPrevPageToken + (\ s a -> s{_slrPrevPageToken = a}) + +instance FromJSON SearchListResponse where + parseJSON + = withObject "SearchListResponse" + (\ o -> + SearchListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#searchListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON SearchListResponse where + toJSON SearchListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _slrEtag, + ("tokenPagination" .=) <$> _slrTokenPagination, + ("nextPageToken" .=) <$> _slrNextPageToken, + ("pageInfo" .=) <$> _slrPageInfo, + Just ("kind" .= _slrKind), + ("items" .=) <$> _slrItems, + ("visitorId" .=) <$> _slrVisitorId, + ("eventId" .=) <$> _slrEventId, + ("prevPageToken" .=) <$> _slrPrevPageToken]) + +-- | Stub token pagination template to suppress results. +-- +-- /See:/ 'tokenPagination' smart constructor. +data TokenPagination = + TokenPagination + deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request. +-- +tokenPagination + :: TokenPagination +tokenPagination = TokenPagination + +instance FromJSON TokenPagination where + parseJSON + = withObject "TokenPagination" + (\ o -> pure TokenPagination) + +instance ToJSON TokenPagination where + toJSON = const (Object mempty) + +-- | Information that identifies the recommended resource. +-- +-- /See:/ 'activityContentDetailsRecommendation' smart constructor. +data ActivityContentDetailsRecommendation = ActivityContentDetailsRecommendation + { _acdrResourceId :: !(Maybe (Maybe ResourceId)) + , _acdrSeedResourceId :: !(Maybe (Maybe ResourceId)) + , _acdrReason :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsRecommendation' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdrResourceId' +-- +-- * 'acdrSeedResourceId' +-- +-- * 'acdrReason' +activityContentDetailsRecommendation + :: ActivityContentDetailsRecommendation +activityContentDetailsRecommendation = + ActivityContentDetailsRecommendation + { _acdrResourceId = Nothing + , _acdrSeedResourceId = Nothing + , _acdrReason = Nothing + } + +-- | The resourceId object contains information that identifies the +-- recommended resource. +acdrResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe (Maybe ResourceId)) +acdrResourceId + = lens _acdrResourceId + (\ s a -> s{_acdrResourceId = a}) + +-- | The seedResourceId object contains information about the resource that +-- caused the recommendation. +acdrSeedResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe (Maybe ResourceId)) +acdrSeedResourceId + = lens _acdrSeedResourceId + (\ s a -> s{_acdrSeedResourceId = a}) + +-- | The reason that the resource is recommended to the user. +acdrReason :: Lens' ActivityContentDetailsRecommendation (Maybe Text) +acdrReason + = lens _acdrReason (\ s a -> s{_acdrReason = a}) + +instance FromJSON + ActivityContentDetailsRecommendation where + parseJSON + = withObject "ActivityContentDetailsRecommendation" + (\ o -> + ActivityContentDetailsRecommendation <$> + (o .:? "resourceId") <*> (o .:? "seedResourceId") <*> + (o .:? "reason")) + +instance ToJSON ActivityContentDetailsRecommendation + where + toJSON ActivityContentDetailsRecommendation{..} + = object + (catMaybes + [("resourceId" .=) <$> _acdrResourceId, + ("seedResourceId" .=) <$> _acdrSeedResourceId, + ("reason" .=) <$> _acdrReason]) + +-- | A resource id is a generic reference that points to another YouTube +-- resource. +-- +-- /See:/ 'resourceId' smart constructor. +data ResourceId = ResourceId + { _riKind :: !(Maybe Text) + , _riChannelId :: !(Maybe Text) + , _riVideoId :: !(Maybe Text) + , _riPlaylistId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ResourceId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'riKind' +-- +-- * 'riChannelId' +-- +-- * 'riVideoId' +-- +-- * 'riPlaylistId' +resourceId + :: ResourceId +resourceId = + ResourceId + { _riKind = Nothing + , _riChannelId = Nothing + , _riVideoId = Nothing + , _riPlaylistId = Nothing + } + +-- | The type of the API resource. +riKind :: Lens' ResourceId (Maybe Text) +riKind = lens _riKind (\ s a -> s{_riKind = a}) + +-- | The ID that YouTube uses to uniquely identify the referred resource, if +-- that resource is a channel. This property is only present if the +-- resourceId.kind value is youtube#channel. +riChannelId :: Lens' ResourceId (Maybe Text) +riChannelId + = lens _riChannelId (\ s a -> s{_riChannelId = a}) + +-- | The ID that YouTube uses to uniquely identify the referred resource, if +-- that resource is a video. This property is only present if the +-- resourceId.kind value is youtube#video. +riVideoId :: Lens' ResourceId (Maybe Text) +riVideoId + = lens _riVideoId (\ s a -> s{_riVideoId = a}) + +-- | The ID that YouTube uses to uniquely identify the referred resource, if +-- that resource is a playlist. This property is only present if the +-- resourceId.kind value is youtube#playlist. +riPlaylistId :: Lens' ResourceId (Maybe Text) +riPlaylistId + = lens _riPlaylistId (\ s a -> s{_riPlaylistId = a}) + +instance FromJSON ResourceId where + parseJSON + = withObject "ResourceId" + (\ o -> + ResourceId <$> + (o .:? "kind") <*> (o .:? "channelId") <*> + (o .:? "videoId") + <*> (o .:? "playlistId")) + +instance ToJSON ResourceId where + toJSON ResourceId{..} + = object + (catMaybes + [("kind" .=) <$> _riKind, + ("channelId" .=) <$> _riChannelId, + ("videoId" .=) <$> _riVideoId, + ("playlistId" .=) <$> _riPlaylistId]) + +-- | A search result contains information about a YouTube video, channel, or +-- playlist that matches the search parameters specified in an API request. +-- While a search result points to a uniquely identifiable resource, like a +-- video, it does not have its own persistent data. +-- +-- /See:/ 'searchResult' smart constructor. +data SearchResult = SearchResult + { _srEtag :: !(Maybe Text) + , _srSnippet :: !(Maybe (Maybe SearchResultSNIppet)) + , _srKind :: !Text + , _srId :: !(Maybe (Maybe ResourceId)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchResult' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srEtag' +-- +-- * 'srSnippet' +-- +-- * 'srKind' +-- +-- * 'srId' +searchResult + :: SearchResult +searchResult = + SearchResult + { _srEtag = Nothing + , _srSnippet = Nothing + , _srKind = "youtube#searchResult" + , _srId = Nothing + } + +-- | Etag of this resource. +srEtag :: Lens' SearchResult (Maybe Text) +srEtag = lens _srEtag (\ s a -> s{_srEtag = a}) + +-- | The snippet object contains basic details about a search result, such as +-- its title or description. For example, if the search result is a video, +-- then the title will be the video\'s title and the description will be +-- the video\'s description. +srSnippet :: Lens' SearchResult (Maybe (Maybe SearchResultSNIppet)) +srSnippet + = lens _srSnippet (\ s a -> s{_srSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#searchResult\". +srKind :: Lens' SearchResult Text +srKind = lens _srKind (\ s a -> s{_srKind = a}) + +-- | The id object contains information that can be used to uniquely identify +-- the resource that matches the search request. +srId :: Lens' SearchResult (Maybe (Maybe ResourceId)) +srId = lens _srId (\ s a -> s{_srId = a}) + +instance FromJSON SearchResult where + parseJSON + = withObject "SearchResult" + (\ o -> + SearchResult <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#searchResult") + <*> (o .:? "id")) + +instance ToJSON SearchResult where + toJSON SearchResult{..} + = object + (catMaybes + [("etag" .=) <$> _srEtag, + ("snippet" .=) <$> _srSnippet, + Just ("kind" .= _srKind), ("id" .=) <$> _srId]) + +-- | JSON template for the status part of a channel. +-- +-- /See:/ 'channelStatus' smart constructor. +data ChannelStatus = ChannelStatus + { _csIsLinked :: !(Maybe Bool) + , _csLongUploadsStatus :: !(Maybe Text) + , _csPrivacyStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csIsLinked' +-- +-- * 'csLongUploadsStatus' +-- +-- * 'csPrivacyStatus' +channelStatus + :: ChannelStatus +channelStatus = + ChannelStatus + { _csIsLinked = Nothing + , _csLongUploadsStatus = Nothing + , _csPrivacyStatus = Nothing + } + +-- | If true, then the user is linked to either a YouTube username or G+ +-- account. Otherwise, the user doesn\'t have a public YouTube identity. +csIsLinked :: Lens' ChannelStatus (Maybe Bool) +csIsLinked + = lens _csIsLinked (\ s a -> s{_csIsLinked = a}) + +-- | The long uploads status of this channel. See +csLongUploadsStatus :: Lens' ChannelStatus (Maybe Text) +csLongUploadsStatus + = lens _csLongUploadsStatus + (\ s a -> s{_csLongUploadsStatus = a}) + +-- | Privacy status of the channel. +csPrivacyStatus :: Lens' ChannelStatus (Maybe Text) +csPrivacyStatus + = lens _csPrivacyStatus + (\ s a -> s{_csPrivacyStatus = a}) + +instance FromJSON ChannelStatus where + parseJSON + = withObject "ChannelStatus" + (\ o -> + ChannelStatus <$> + (o .:? "isLinked") <*> (o .:? "longUploadsStatus") + <*> (o .:? "privacyStatus")) + +instance ToJSON ChannelStatus where + toJSON ChannelStatus{..} + = object + (catMaybes + [("isLinked" .=) <$> _csIsLinked, + ("longUploadsStatus" .=) <$> _csLongUploadsStatus, + ("privacyStatus" .=) <$> _csPrivacyStatus]) + +-- +-- /See:/ 'liveStreamSNIppet' smart constructor. +data LiveStreamSNIppet = LiveStreamSNIppet + { _lssPublishedAt :: !(Maybe UTCTime) + , _lssChannelId :: !(Maybe Text) + , _lssIsDefaultStream :: !(Maybe Bool) + , _lssTitle :: !(Maybe Text) + , _lssDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lssPublishedAt' +-- +-- * 'lssChannelId' +-- +-- * 'lssIsDefaultStream' +-- +-- * 'lssTitle' +-- +-- * 'lssDescription' +liveStreamSNIppet + :: LiveStreamSNIppet +liveStreamSNIppet = + LiveStreamSNIppet + { _lssPublishedAt = Nothing + , _lssChannelId = Nothing + , _lssIsDefaultStream = Nothing + , _lssTitle = Nothing + , _lssDescription = Nothing + } + +-- | The date and time that the stream was created. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +lssPublishedAt :: Lens' LiveStreamSNIppet (Maybe UTCTime) +lssPublishedAt + = lens _lssPublishedAt + (\ s a -> s{_lssPublishedAt = a}) + +-- | The ID that YouTube uses to uniquely identify the channel that is +-- transmitting the stream. +lssChannelId :: Lens' LiveStreamSNIppet (Maybe Text) +lssChannelId + = lens _lssChannelId (\ s a -> s{_lssChannelId = a}) + +lssIsDefaultStream :: Lens' LiveStreamSNIppet (Maybe Bool) +lssIsDefaultStream + = lens _lssIsDefaultStream + (\ s a -> s{_lssIsDefaultStream = a}) + +-- | The stream\'s title. The value must be between 1 and 128 characters +-- long. +lssTitle :: Lens' LiveStreamSNIppet (Maybe Text) +lssTitle = lens _lssTitle (\ s a -> s{_lssTitle = a}) + +-- | The stream\'s description. The value cannot be longer than 10000 +-- characters. +lssDescription :: Lens' LiveStreamSNIppet (Maybe Text) +lssDescription + = lens _lssDescription + (\ s a -> s{_lssDescription = a}) + +instance FromJSON LiveStreamSNIppet where + parseJSON + = withObject "LiveStreamSNIppet" + (\ o -> + LiveStreamSNIppet <$> + (o .:? "publishedAt") <*> (o .:? "channelId") <*> + (o .:? "isDefaultStream") + <*> (o .:? "title") + <*> (o .:? "description")) + +instance ToJSON LiveStreamSNIppet where + toJSON LiveStreamSNIppet{..} + = object + (catMaybes + [("publishedAt" .=) <$> _lssPublishedAt, + ("channelId" .=) <$> _lssChannelId, + ("isDefaultStream" .=) <$> _lssIsDefaultStream, + ("title" .=) <$> _lssTitle, + ("description" .=) <$> _lssDescription]) + +-- +-- /See:/ 'playlistStatus' smart constructor. +newtype PlaylistStatus = PlaylistStatus + { _psPrivacyStatus :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psPrivacyStatus' +playlistStatus + :: PlaylistStatus +playlistStatus = + PlaylistStatus + { _psPrivacyStatus = Nothing + } + +-- | The playlist\'s privacy status. +psPrivacyStatus :: Lens' PlaylistStatus (Maybe Text) +psPrivacyStatus + = lens _psPrivacyStatus + (\ s a -> s{_psPrivacyStatus = a}) + +instance FromJSON PlaylistStatus where + parseJSON + = withObject "PlaylistStatus" + (\ o -> PlaylistStatus <$> (o .:? "privacyStatus")) + +instance ToJSON PlaylistStatus where + toJSON PlaylistStatus{..} + = object + (catMaybes + [("privacyStatus" .=) <$> _psPrivacyStatus]) + +-- | Details about the content of a YouTube Video. +-- +-- /See:/ 'videoContentDetails' smart constructor. +data VideoContentDetails = VideoContentDetails + { _vcdCountryRestriction :: !(Maybe (Maybe AccessPolicy)) + , _vcdDefinition :: !(Maybe Text) + , _vcdDimension :: !(Maybe Text) + , _vcdCaption :: !(Maybe Text) + , _vcdRegionRestriction :: !(Maybe (Maybe VideoContentDetailsRegionRestriction)) + , _vcdDuration :: !(Maybe Text) + , _vcdContentRating :: !(Maybe (Maybe ContentRating)) + , _vcdLicensedContent :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcdCountryRestriction' +-- +-- * 'vcdDefinition' +-- +-- * 'vcdDimension' +-- +-- * 'vcdCaption' +-- +-- * 'vcdRegionRestriction' +-- +-- * 'vcdDuration' +-- +-- * 'vcdContentRating' +-- +-- * 'vcdLicensedContent' +videoContentDetails + :: VideoContentDetails +videoContentDetails = + VideoContentDetails + { _vcdCountryRestriction = Nothing + , _vcdDefinition = Nothing + , _vcdDimension = Nothing + , _vcdCaption = Nothing + , _vcdRegionRestriction = Nothing + , _vcdDuration = Nothing + , _vcdContentRating = Nothing + , _vcdLicensedContent = Nothing + } + +-- | The countryRestriction object contains information about the countries +-- where a video is (or is not) viewable. +vcdCountryRestriction :: Lens' VideoContentDetails (Maybe (Maybe AccessPolicy)) +vcdCountryRestriction + = lens _vcdCountryRestriction + (\ s a -> s{_vcdCountryRestriction = a}) + +-- | The value of definition indicates whether the video is available in high +-- definition or only in standard definition. +vcdDefinition :: Lens' VideoContentDetails (Maybe Text) +vcdDefinition + = lens _vcdDefinition + (\ s a -> s{_vcdDefinition = a}) + +-- | The value of dimension indicates whether the video is available in 3D or +-- in 2D. +vcdDimension :: Lens' VideoContentDetails (Maybe Text) +vcdDimension + = lens _vcdDimension (\ s a -> s{_vcdDimension = a}) + +-- | The value of captions indicates whether the video has captions or not. +vcdCaption :: Lens' VideoContentDetails (Maybe Text) +vcdCaption + = lens _vcdCaption (\ s a -> s{_vcdCaption = a}) + +-- | The regionRestriction object contains information about the countries +-- where a video is (or is not) viewable. The object will contain either +-- the contentDetails.regionRestriction.allowed property or the +-- contentDetails.regionRestriction.blocked property. +vcdRegionRestriction :: Lens' VideoContentDetails (Maybe (Maybe VideoContentDetailsRegionRestriction)) +vcdRegionRestriction + = lens _vcdRegionRestriction + (\ s a -> s{_vcdRegionRestriction = a}) + +-- | The length of the video. The tag value is an ISO 8601 duration in the +-- format PT#M#S, in which the letters PT indicate that the value specifies +-- a period of time, and the letters M and S refer to length in minutes and +-- seconds, respectively. The # characters preceding the M and S letters +-- are both integers that specify the number of minutes (or seconds) of the +-- video. For example, a value of PT15M51S indicates that the video is 15 +-- minutes and 51 seconds long. +vcdDuration :: Lens' VideoContentDetails (Maybe Text) +vcdDuration + = lens _vcdDuration (\ s a -> s{_vcdDuration = a}) + +-- | Specifies the ratings that the video received under various rating +-- schemes. +vcdContentRating :: Lens' VideoContentDetails (Maybe (Maybe ContentRating)) +vcdContentRating + = lens _vcdContentRating + (\ s a -> s{_vcdContentRating = a}) + +-- | The value of is_license_content indicates whether the video is licensed +-- content. +vcdLicensedContent :: Lens' VideoContentDetails (Maybe Bool) +vcdLicensedContent + = lens _vcdLicensedContent + (\ s a -> s{_vcdLicensedContent = a}) + +instance FromJSON VideoContentDetails where + parseJSON + = withObject "VideoContentDetails" + (\ o -> + VideoContentDetails <$> + (o .:? "countryRestriction") <*> (o .:? "definition") + <*> (o .:? "dimension") + <*> (o .:? "caption") + <*> (o .:? "regionRestriction") + <*> (o .:? "duration") + <*> (o .:? "contentRating") + <*> (o .:? "licensedContent")) + +instance ToJSON VideoContentDetails where + toJSON VideoContentDetails{..} + = object + (catMaybes + [("countryRestriction" .=) <$> + _vcdCountryRestriction, + ("definition" .=) <$> _vcdDefinition, + ("dimension" .=) <$> _vcdDimension, + ("caption" .=) <$> _vcdCaption, + ("regionRestriction" .=) <$> _vcdRegionRestriction, + ("duration" .=) <$> _vcdDuration, + ("contentRating" .=) <$> _vcdContentRating, + ("licensedContent" .=) <$> _vcdLicensedContent]) + +-- +-- /See:/ 'channelListResponse' smart constructor. +data ChannelListResponse = ChannelListResponse + { _clrEtag :: !(Maybe Text) + , _clrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _clrNextPageToken :: !(Maybe Text) + , _clrPageInfo :: !(Maybe (Maybe PageInfo)) + , _clrKind :: !Text + , _clrItems :: !(Maybe [Maybe Channel]) + , _clrVisitorId :: !(Maybe Text) + , _clrEventId :: !(Maybe Text) + , _clrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrEtag' +-- +-- * 'clrTokenPagination' +-- +-- * 'clrNextPageToken' +-- +-- * 'clrPageInfo' +-- +-- * 'clrKind' +-- +-- * 'clrItems' +-- +-- * 'clrVisitorId' +-- +-- * 'clrEventId' +-- +-- * 'clrPrevPageToken' +channelListResponse + :: ChannelListResponse +channelListResponse = + ChannelListResponse + { _clrEtag = Nothing + , _clrTokenPagination = Nothing + , _clrNextPageToken = Nothing + , _clrPageInfo = Nothing + , _clrKind = "youtube#channelListResponse" + , _clrItems = Nothing + , _clrVisitorId = Nothing + , _clrEventId = Nothing + , _clrPrevPageToken = Nothing + } + +-- | Etag of this resource. +clrEtag :: Lens' ChannelListResponse (Maybe Text) +clrEtag = lens _clrEtag (\ s a -> s{_clrEtag = a}) + +clrTokenPagination :: Lens' ChannelListResponse (Maybe (Maybe TokenPagination)) +clrTokenPagination + = lens _clrTokenPagination + (\ s a -> s{_clrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +clrNextPageToken :: Lens' ChannelListResponse (Maybe Text) +clrNextPageToken + = lens _clrNextPageToken + (\ s a -> s{_clrNextPageToken = a}) + +clrPageInfo :: Lens' ChannelListResponse (Maybe (Maybe PageInfo)) +clrPageInfo + = lens _clrPageInfo (\ s a -> s{_clrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#channelListResponse\". +clrKind :: Lens' ChannelListResponse Text +clrKind = lens _clrKind (\ s a -> s{_clrKind = a}) + +-- | A list of channels that match the request criteria. +clrItems :: Lens' ChannelListResponse [Maybe Channel] +clrItems + = lens _clrItems (\ s a -> s{_clrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +clrVisitorId :: Lens' ChannelListResponse (Maybe Text) +clrVisitorId + = lens _clrVisitorId (\ s a -> s{_clrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +clrEventId :: Lens' ChannelListResponse (Maybe Text) +clrEventId + = lens _clrEventId (\ s a -> s{_clrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +clrPrevPageToken :: Lens' ChannelListResponse (Maybe Text) +clrPrevPageToken + = lens _clrPrevPageToken + (\ s a -> s{_clrPrevPageToken = a}) + +instance FromJSON ChannelListResponse where + parseJSON + = withObject "ChannelListResponse" + (\ o -> + ChannelListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#channelListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON ChannelListResponse where + toJSON ChannelListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _clrEtag, + ("tokenPagination" .=) <$> _clrTokenPagination, + ("nextPageToken" .=) <$> _clrNextPageToken, + ("pageInfo" .=) <$> _clrPageInfo, + Just ("kind" .= _clrKind), + ("items" .=) <$> _clrItems, + ("visitorId" .=) <$> _clrVisitorId, + ("eventId" .=) <$> _clrEventId, + ("prevPageToken" .=) <$> _clrPrevPageToken]) + +-- +-- /See:/ 'videoAbuseReportReasonListResponse' smart constructor. +data VideoAbuseReportReasonListResponse = VideoAbuseReportReasonListResponse + { _varrlrEtag :: !(Maybe Text) + , _varrlrKind :: !Text + , _varrlrItems :: !(Maybe [Maybe VideoAbuseReportReason]) + , _varrlrVisitorId :: !(Maybe Text) + , _varrlrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReportReasonListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varrlrEtag' +-- +-- * 'varrlrKind' +-- +-- * 'varrlrItems' +-- +-- * 'varrlrVisitorId' +-- +-- * 'varrlrEventId' +videoAbuseReportReasonListResponse + :: VideoAbuseReportReasonListResponse +videoAbuseReportReasonListResponse = + VideoAbuseReportReasonListResponse + { _varrlrEtag = Nothing + , _varrlrKind = "youtube#videoAbuseReportReasonListResponse" + , _varrlrItems = Nothing + , _varrlrVisitorId = Nothing + , _varrlrEventId = Nothing + } + +-- | Etag of this resource. +varrlrEtag :: Lens' VideoAbuseReportReasonListResponse (Maybe Text) +varrlrEtag + = lens _varrlrEtag (\ s a -> s{_varrlrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoAbuseReportReasonListResponse\". +varrlrKind :: Lens' VideoAbuseReportReasonListResponse Text +varrlrKind + = lens _varrlrKind (\ s a -> s{_varrlrKind = a}) + +-- | A list of valid abuse reasons that are used with video.ReportAbuse. +varrlrItems :: Lens' VideoAbuseReportReasonListResponse [Maybe VideoAbuseReportReason] +varrlrItems + = lens _varrlrItems (\ s a -> s{_varrlrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +varrlrVisitorId :: Lens' VideoAbuseReportReasonListResponse (Maybe Text) +varrlrVisitorId + = lens _varrlrVisitorId + (\ s a -> s{_varrlrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +varrlrEventId :: Lens' VideoAbuseReportReasonListResponse (Maybe Text) +varrlrEventId + = lens _varrlrEventId + (\ s a -> s{_varrlrEventId = a}) + +instance FromJSON VideoAbuseReportReasonListResponse + where + parseJSON + = withObject "VideoAbuseReportReasonListResponse" + (\ o -> + VideoAbuseReportReasonListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= + "youtube#videoAbuseReportReasonListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON VideoAbuseReportReasonListResponse + where + toJSON VideoAbuseReportReasonListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _varrlrEtag, + Just ("kind" .= _varrlrKind), + ("items" .=) <$> _varrlrItems, + ("visitorId" .=) <$> _varrlrVisitorId, + ("eventId" .=) <$> _varrlrEventId]) + +-- | Detailed settings of a broadcast. +-- +-- /See:/ 'liveBroadcastContentDetails' smart constructor. +data LiveBroadcastContentDetails = LiveBroadcastContentDetails + { _lbcdEnableContentEncryption :: !(Maybe Bool) + , _lbcdEnableLowLatency :: !(Maybe Bool) + , _lbcdEnableEmbed :: !(Maybe Bool) + , _lbcdStartWithSlate :: !(Maybe Bool) + , _lbcdMonitorStream :: !(Maybe (Maybe MonitorStreamInfo)) + , _lbcdBoundStreamId :: !(Maybe Text) + , _lbcdRecordFromStart :: !(Maybe Bool) + , _lbcdEnableClosedCaptions :: !(Maybe Bool) + , _lbcdEnableDvr :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbcdEnableContentEncryption' +-- +-- * 'lbcdEnableLowLatency' +-- +-- * 'lbcdEnableEmbed' +-- +-- * 'lbcdStartWithSlate' +-- +-- * 'lbcdMonitorStream' +-- +-- * 'lbcdBoundStreamId' +-- +-- * 'lbcdRecordFromStart' +-- +-- * 'lbcdEnableClosedCaptions' +-- +-- * 'lbcdEnableDvr' +liveBroadcastContentDetails + :: LiveBroadcastContentDetails +liveBroadcastContentDetails = + LiveBroadcastContentDetails + { _lbcdEnableContentEncryption = Nothing + , _lbcdEnableLowLatency = Nothing + , _lbcdEnableEmbed = Nothing + , _lbcdStartWithSlate = Nothing + , _lbcdMonitorStream = Nothing + , _lbcdBoundStreamId = Nothing + , _lbcdRecordFromStart = Nothing + , _lbcdEnableClosedCaptions = Nothing + , _lbcdEnableDvr = Nothing + } + +-- | This setting indicates whether YouTube should enable content encryption +-- for the broadcast. +lbcdEnableContentEncryption :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdEnableContentEncryption + = lens _lbcdEnableContentEncryption + (\ s a -> s{_lbcdEnableContentEncryption = a}) + +lbcdEnableLowLatency :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdEnableLowLatency + = lens _lbcdEnableLowLatency + (\ s a -> s{_lbcdEnableLowLatency = a}) + +-- | This setting indicates whether the broadcast video can be played in an +-- embedded player. If you choose to archive the video (using the +-- enableArchive property), this setting will also apply to the archived +-- video. +lbcdEnableEmbed :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdEnableEmbed + = lens _lbcdEnableEmbed + (\ s a -> s{_lbcdEnableEmbed = a}) + +-- | This setting indicates whether the broadcast should automatically begin +-- with an in-stream slate when you update the broadcast\'s status to live. +-- After updating the status, you then need to send a liveCuepoints.insert +-- request that sets the cuepoint\'s eventState to end to remove the +-- in-stream slate and make your broadcast stream visible to viewers. +lbcdStartWithSlate :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdStartWithSlate + = lens _lbcdStartWithSlate + (\ s a -> s{_lbcdStartWithSlate = a}) + +-- | The monitorStream object contains information about the monitor stream, +-- which the broadcaster can use to review the event content before the +-- broadcast stream is shown publicly. +lbcdMonitorStream :: Lens' LiveBroadcastContentDetails (Maybe (Maybe MonitorStreamInfo)) +lbcdMonitorStream + = lens _lbcdMonitorStream + (\ s a -> s{_lbcdMonitorStream = a}) + +-- | This value uniquely identifies the live stream bound to the broadcast. +lbcdBoundStreamId :: Lens' LiveBroadcastContentDetails (Maybe Text) +lbcdBoundStreamId + = lens _lbcdBoundStreamId + (\ s a -> s{_lbcdBoundStreamId = a}) + +-- | Automatically start recording after the event goes live. The default +-- value for this property is true. Important: You must also set the +-- enableDvr property\'s value to true if you want the playback to be +-- available immediately after the broadcast ends. If you set this +-- property\'s value to true but do not also set the enableDvr property to +-- true, there may be a delay of around one day before the archived video +-- will be available for playback. +lbcdRecordFromStart :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdRecordFromStart + = lens _lbcdRecordFromStart + (\ s a -> s{_lbcdRecordFromStart = a}) + +-- | This setting indicates whether closed captioning is enabled for this +-- broadcast. The ingestion URL of the closed captions is returned through +-- the liveStreams API. +lbcdEnableClosedCaptions :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdEnableClosedCaptions + = lens _lbcdEnableClosedCaptions + (\ s a -> s{_lbcdEnableClosedCaptions = a}) + +-- | This setting determines whether viewers can access DVR controls while +-- watching the video. DVR controls enable the viewer to control the video +-- playback experience by pausing, rewinding, or fast forwarding content. +-- The default value for this property is true. Important: You must set the +-- value to true and also set the enableArchive property\'s value to true +-- if you want to make playback available immediately after the broadcast +-- ends. +lbcdEnableDvr :: Lens' LiveBroadcastContentDetails (Maybe Bool) +lbcdEnableDvr + = lens _lbcdEnableDvr + (\ s a -> s{_lbcdEnableDvr = a}) + +instance FromJSON LiveBroadcastContentDetails where + parseJSON + = withObject "LiveBroadcastContentDetails" + (\ o -> + LiveBroadcastContentDetails <$> + (o .:? "enableContentEncryption") <*> + (o .:? "enableLowLatency") + <*> (o .:? "enableEmbed") + <*> (o .:? "startWithSlate") + <*> (o .:? "monitorStream") + <*> (o .:? "boundStreamId") + <*> (o .:? "recordFromStart") + <*> (o .:? "enableClosedCaptions") + <*> (o .:? "enableDvr")) + +instance ToJSON LiveBroadcastContentDetails where + toJSON LiveBroadcastContentDetails{..} + = object + (catMaybes + [("enableContentEncryption" .=) <$> + _lbcdEnableContentEncryption, + ("enableLowLatency" .=) <$> _lbcdEnableLowLatency, + ("enableEmbed" .=) <$> _lbcdEnableEmbed, + ("startWithSlate" .=) <$> _lbcdStartWithSlate, + ("monitorStream" .=) <$> _lbcdMonitorStream, + ("boundStreamId" .=) <$> _lbcdBoundStreamId, + ("recordFromStart" .=) <$> _lbcdRecordFromStart, + ("enableClosedCaptions" .=) <$> + _lbcdEnableClosedCaptions, + ("enableDvr" .=) <$> _lbcdEnableDvr]) + +-- | Information about a video that was marked as a favorite video. +-- +-- /See:/ 'activityContentDetailsFavorite' smart constructor. +newtype ActivityContentDetailsFavorite = ActivityContentDetailsFavorite + { _acdfResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsFavorite' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdfResourceId' +activityContentDetailsFavorite + :: ActivityContentDetailsFavorite +activityContentDetailsFavorite = + ActivityContentDetailsFavorite + { _acdfResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the resource +-- that was marked as a favorite. +acdfResourceId :: Lens' ActivityContentDetailsFavorite (Maybe (Maybe ResourceId)) +acdfResourceId + = lens _acdfResourceId + (\ s a -> s{_acdfResourceId = a}) + +instance FromJSON ActivityContentDetailsFavorite + where + parseJSON + = withObject "ActivityContentDetailsFavorite" + (\ o -> + ActivityContentDetailsFavorite <$> + (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsFavorite where + toJSON ActivityContentDetailsFavorite{..} + = object + (catMaybes [("resourceId" .=) <$> _acdfResourceId]) + +-- | Freebase topic information related to the video. +-- +-- /See:/ 'videoTopicDetails' smart constructor. +data VideoTopicDetails = VideoTopicDetails + { _vtdTopicIds :: !(Maybe [Text]) + , _vtdRelevantTopicIds :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoTopicDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vtdTopicIds' +-- +-- * 'vtdRelevantTopicIds' +videoTopicDetails + :: VideoTopicDetails +videoTopicDetails = + VideoTopicDetails + { _vtdTopicIds = Nothing + , _vtdRelevantTopicIds = Nothing + } + +-- | A list of Freebase topic IDs that are centrally associated with the +-- video. These are topics that are centrally featured in the video, and it +-- can be said that the video is mainly about each of these. You can +-- retrieve information about each topic using the Freebase Topic API. +vtdTopicIds :: Lens' VideoTopicDetails [Text] +vtdTopicIds + = lens _vtdTopicIds (\ s a -> s{_vtdTopicIds = a}) . + _Default + . _Coerce + +-- | Similar to topic_id, except that these topics are merely relevant to the +-- video. These are topics that may be mentioned in, or appear in the +-- video. You can retrieve information about each topic using Freebase +-- Topic API. +vtdRelevantTopicIds :: Lens' VideoTopicDetails [Text] +vtdRelevantTopicIds + = lens _vtdRelevantTopicIds + (\ s a -> s{_vtdRelevantTopicIds = a}) + . _Default + . _Coerce + +instance FromJSON VideoTopicDetails where + parseJSON + = withObject "VideoTopicDetails" + (\ o -> + VideoTopicDetails <$> + (o .:? "topicIds" .!= mempty) <*> + (o .:? "relevantTopicIds" .!= mempty)) + +instance ToJSON VideoTopicDetails where + toJSON VideoTopicDetails{..} + = object + (catMaybes + [("topicIds" .=) <$> _vtdTopicIds, + ("relevantTopicIds" .=) <$> _vtdRelevantTopicIds]) + +-- | A live stream describes a live ingestion point. +-- +-- /See:/ 'liveStream' smart constructor. +data LiveStream = LiveStream + { _lsStatus :: !(Maybe (Maybe LiveStreamStatus)) + , _lsEtag :: !(Maybe Text) + , _lsSnippet :: !(Maybe (Maybe LiveStreamSNIppet)) + , _lsKind :: !Text + , _lsContentDetails :: !(Maybe (Maybe LiveStreamContentDetails)) + , _lsId :: !(Maybe Text) + , _lsCdn :: !(Maybe (Maybe CdnSettings)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStream' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsStatus' +-- +-- * 'lsEtag' +-- +-- * 'lsSnippet' +-- +-- * 'lsKind' +-- +-- * 'lsContentDetails' +-- +-- * 'lsId' +-- +-- * 'lsCdn' +liveStream + :: LiveStream +liveStream = + LiveStream + { _lsStatus = Nothing + , _lsEtag = Nothing + , _lsSnippet = Nothing + , _lsKind = "youtube#liveStream" + , _lsContentDetails = Nothing + , _lsId = Nothing + , _lsCdn = Nothing + } + +-- | The status object contains information about live stream\'s status. +lsStatus :: Lens' LiveStream (Maybe (Maybe LiveStreamStatus)) +lsStatus = lens _lsStatus (\ s a -> s{_lsStatus = a}) + +-- | Etag of this resource. +lsEtag :: Lens' LiveStream (Maybe Text) +lsEtag = lens _lsEtag (\ s a -> s{_lsEtag = a}) + +-- | The snippet object contains basic details about the stream, including +-- its channel, title, and description. +lsSnippet :: Lens' LiveStream (Maybe (Maybe LiveStreamSNIppet)) +lsSnippet + = lens _lsSnippet (\ s a -> s{_lsSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#liveStream\". +lsKind :: Lens' LiveStream Text +lsKind = lens _lsKind (\ s a -> s{_lsKind = a}) + +-- | The content_details object contains information about the stream, +-- including the closed captions ingestion URL. +lsContentDetails :: Lens' LiveStream (Maybe (Maybe LiveStreamContentDetails)) +lsContentDetails + = lens _lsContentDetails + (\ s a -> s{_lsContentDetails = a}) + +-- | The ID that YouTube assigns to uniquely identify the stream. +lsId :: Lens' LiveStream (Maybe Text) +lsId = lens _lsId (\ s a -> s{_lsId = a}) + +-- | The cdn object defines the live stream\'s content delivery network (CDN) +-- settings. These settings provide details about the manner in which you +-- stream your content to YouTube. +lsCdn :: Lens' LiveStream (Maybe (Maybe CdnSettings)) +lsCdn = lens _lsCdn (\ s a -> s{_lsCdn = a}) + +instance FromJSON LiveStream where + parseJSON + = withObject "LiveStream" + (\ o -> + LiveStream <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#liveStream") + <*> (o .:? "contentDetails") + <*> (o .:? "id") + <*> (o .:? "cdn")) + +instance ToJSON LiveStream where + toJSON LiveStream{..} + = object + (catMaybes + [("status" .=) <$> _lsStatus, + ("etag" .=) <$> _lsEtag, + ("snippet" .=) <$> _lsSnippet, + Just ("kind" .= _lsKind), + ("contentDetails" .=) <$> _lsContentDetails, + ("id" .=) <$> _lsId, ("cdn" .=) <$> _lsCdn]) + +-- +-- /See:/ 'channelSection' smart constructor. +data ChannelSection = ChannelSection + { _csEtag :: !(Maybe Text) + , _csSnippet :: !(Maybe (Maybe ChannelSectionSNIppet)) + , _csKind :: !Text + , _csContentDetails :: !(Maybe (Maybe ChannelSectionContentDetails)) + , _csTargeting :: !(Maybe (Maybe ChannelSectionTargeting)) + , _csId :: !(Maybe Text) + , _csLocalizations :: !(Maybe ChannelSectionLocalizations) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSection' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csEtag' +-- +-- * 'csSnippet' +-- +-- * 'csKind' +-- +-- * 'csContentDetails' +-- +-- * 'csTargeting' +-- +-- * 'csId' +-- +-- * 'csLocalizations' +channelSection + :: ChannelSection +channelSection = + ChannelSection + { _csEtag = Nothing + , _csSnippet = Nothing + , _csKind = "youtube#channelSection" + , _csContentDetails = Nothing + , _csTargeting = Nothing + , _csId = Nothing + , _csLocalizations = Nothing + } + +-- | Etag of this resource. +csEtag :: Lens' ChannelSection (Maybe Text) +csEtag = lens _csEtag (\ s a -> s{_csEtag = a}) + +-- | The snippet object contains basic details about the channel section, +-- such as its type, style and title. +csSnippet :: Lens' ChannelSection (Maybe (Maybe ChannelSectionSNIppet)) +csSnippet + = lens _csSnippet (\ s a -> s{_csSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#channelSection\". +csKind :: Lens' ChannelSection Text +csKind = lens _csKind (\ s a -> s{_csKind = a}) + +-- | The contentDetails object contains details about the channel section +-- content, such as a list of playlists or channels featured in the +-- section. +csContentDetails :: Lens' ChannelSection (Maybe (Maybe ChannelSectionContentDetails)) +csContentDetails + = lens _csContentDetails + (\ s a -> s{_csContentDetails = a}) + +-- | The targeting object contains basic targeting settings about the channel +-- section. +csTargeting :: Lens' ChannelSection (Maybe (Maybe ChannelSectionTargeting)) +csTargeting + = lens _csTargeting (\ s a -> s{_csTargeting = a}) + +-- | The ID that YouTube uses to uniquely identify the channel section. +csId :: Lens' ChannelSection (Maybe Text) +csId = lens _csId (\ s a -> s{_csId = a}) + +-- | Localizations for different languages +csLocalizations :: Lens' ChannelSection (Maybe ChannelSectionLocalizations) +csLocalizations + = lens _csLocalizations + (\ s a -> s{_csLocalizations = a}) + +instance FromJSON ChannelSection where + parseJSON + = withObject "ChannelSection" + (\ o -> + ChannelSection <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#channelSection") + <*> (o .:? "contentDetails") + <*> (o .:? "targeting") + <*> (o .:? "id") + <*> (o .:? "localizations")) + +instance ToJSON ChannelSection where + toJSON ChannelSection{..} + = object + (catMaybes + [("etag" .=) <$> _csEtag, + ("snippet" .=) <$> _csSnippet, + Just ("kind" .= _csKind), + ("contentDetails" .=) <$> _csContentDetails, + ("targeting" .=) <$> _csTargeting, + ("id" .=) <$> _csId, + ("localizations" .=) <$> _csLocalizations]) + +-- +-- /See:/ 'liveBroadcastTopicDetails' smart constructor. +newtype LiveBroadcastTopicDetails = LiveBroadcastTopicDetails + { _lbtdTopics :: Maybe [Maybe LiveBroadcastTopic] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastTopicDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbtdTopics' +liveBroadcastTopicDetails + :: LiveBroadcastTopicDetails +liveBroadcastTopicDetails = + LiveBroadcastTopicDetails + { _lbtdTopics = Nothing + } + +lbtdTopics :: Lens' LiveBroadcastTopicDetails [Maybe LiveBroadcastTopic] +lbtdTopics + = lens _lbtdTopics (\ s a -> s{_lbtdTopics = a}) . + _Default + . _Coerce + +instance FromJSON LiveBroadcastTopicDetails where + parseJSON + = withObject "LiveBroadcastTopicDetails" + (\ o -> + LiveBroadcastTopicDetails <$> + (o .:? "topics" .!= mempty)) + +instance ToJSON LiveBroadcastTopicDetails where + toJSON LiveBroadcastTopicDetails{..} + = object (catMaybes [("topics" .=) <$> _lbtdTopics]) + +-- | Branding properties for images associated with the channel. +-- +-- /See:/ 'imageSettings' smart constructor. +data ImageSettings = ImageSettings + { _isBannerMobileLowImageUrl :: !(Maybe Text) + , _isBannerTabletExtraHdImageUrl :: !(Maybe Text) + , _isSmallBrandedBannerImageImapScript :: !(Maybe (Maybe LocalizedProperty)) + , _isBannerTvHighImageUrl :: !(Maybe Text) + , _isBannerMobileHdImageUrl :: !(Maybe Text) + , _isBannerTvMediumImageUrl :: !(Maybe Text) + , _isBannerTvImageUrl :: !(Maybe Text) + , _isBannerTabletImageUrl :: !(Maybe Text) + , _isBannerMobileImageUrl :: !(Maybe Text) + , _isTrackingImageUrl :: !(Maybe Text) + , _isBannerMobileMediumHdImageUrl :: !(Maybe Text) + , _isLargeBrandedBannerImageUrl :: !(Maybe (Maybe LocalizedProperty)) + , _isBannerExternalUrl :: !(Maybe Text) + , _isBackgroundImageUrl :: !(Maybe (Maybe LocalizedProperty)) + , _isSmallBrandedBannerImageUrl :: !(Maybe (Maybe LocalizedProperty)) + , _isBannerImageUrl :: !(Maybe Text) + , _isWatchIconImageUrl :: !(Maybe Text) + , _isBannerTvLowImageUrl :: !(Maybe Text) + , _isBannerMobileExtraHdImageUrl :: !(Maybe Text) + , _isLargeBrandedBannerImageImapScript :: !(Maybe (Maybe LocalizedProperty)) + , _isBannerTabletLowImageUrl :: !(Maybe Text) + , _isBannerTabletHdImageUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ImageSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'isBannerMobileLowImageUrl' +-- +-- * 'isBannerTabletExtraHdImageUrl' +-- +-- * 'isSmallBrandedBannerImageImapScript' +-- +-- * 'isBannerTvHighImageUrl' +-- +-- * 'isBannerMobileHdImageUrl' +-- +-- * 'isBannerTvMediumImageUrl' +-- +-- * 'isBannerTvImageUrl' +-- +-- * 'isBannerTabletImageUrl' +-- +-- * 'isBannerMobileImageUrl' +-- +-- * 'isTrackingImageUrl' +-- +-- * 'isBannerMobileMediumHdImageUrl' +-- +-- * 'isLargeBrandedBannerImageUrl' +-- +-- * 'isBannerExternalUrl' +-- +-- * 'isBackgroundImageUrl' +-- +-- * 'isSmallBrandedBannerImageUrl' +-- +-- * 'isBannerImageUrl' +-- +-- * 'isWatchIconImageUrl' +-- +-- * 'isBannerTvLowImageUrl' +-- +-- * 'isBannerMobileExtraHdImageUrl' +-- +-- * 'isLargeBrandedBannerImageImapScript' +-- +-- * 'isBannerTabletLowImageUrl' +-- +-- * 'isBannerTabletHdImageUrl' +imageSettings + :: ImageSettings +imageSettings = + ImageSettings + { _isBannerMobileLowImageUrl = Nothing + , _isBannerTabletExtraHdImageUrl = Nothing + , _isSmallBrandedBannerImageImapScript = Nothing + , _isBannerTvHighImageUrl = Nothing + , _isBannerMobileHdImageUrl = Nothing + , _isBannerTvMediumImageUrl = Nothing + , _isBannerTvImageUrl = Nothing + , _isBannerTabletImageUrl = Nothing + , _isBannerMobileImageUrl = Nothing + , _isTrackingImageUrl = Nothing + , _isBannerMobileMediumHdImageUrl = Nothing + , _isLargeBrandedBannerImageUrl = Nothing + , _isBannerExternalUrl = Nothing + , _isBackgroundImageUrl = Nothing + , _isSmallBrandedBannerImageUrl = Nothing + , _isBannerImageUrl = Nothing + , _isWatchIconImageUrl = Nothing + , _isBannerTvLowImageUrl = Nothing + , _isBannerMobileExtraHdImageUrl = Nothing + , _isLargeBrandedBannerImageImapScript = Nothing + , _isBannerTabletLowImageUrl = Nothing + , _isBannerTabletHdImageUrl = Nothing + } + +-- | Banner image. Mobile size low resolution (320x88). +isBannerMobileLowImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerMobileLowImageUrl + = lens _isBannerMobileLowImageUrl + (\ s a -> s{_isBannerMobileLowImageUrl = a}) + +-- | Banner image. Tablet size extra high resolution (2560x424). +isBannerTabletExtraHdImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTabletExtraHdImageUrl + = lens _isBannerTabletExtraHdImageUrl + (\ s a -> s{_isBannerTabletExtraHdImageUrl = a}) + +-- | The image map script for the small banner image. +isSmallBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe (Maybe LocalizedProperty)) +isSmallBrandedBannerImageImapScript + = lens _isSmallBrandedBannerImageImapScript + (\ s a -> + s{_isSmallBrandedBannerImageImapScript = a}) + +-- | Banner image. TV size high resolution (1920x1080). +isBannerTvHighImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTvHighImageUrl + = lens _isBannerTvHighImageUrl + (\ s a -> s{_isBannerTvHighImageUrl = a}) + +-- | Banner image. Mobile size high resolution (1280x360). +isBannerMobileHdImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerMobileHdImageUrl + = lens _isBannerMobileHdImageUrl + (\ s a -> s{_isBannerMobileHdImageUrl = a}) + +-- | Banner image. TV size medium resolution (1280x720). +isBannerTvMediumImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTvMediumImageUrl + = lens _isBannerTvMediumImageUrl + (\ s a -> s{_isBannerTvMediumImageUrl = a}) + +-- | Banner image. TV size extra high resolution (2120x1192). +isBannerTvImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTvImageUrl + = lens _isBannerTvImageUrl + (\ s a -> s{_isBannerTvImageUrl = a}) + +-- | Banner image. Tablet size (1707x283). +isBannerTabletImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTabletImageUrl + = lens _isBannerTabletImageUrl + (\ s a -> s{_isBannerTabletImageUrl = a}) + +-- | Banner image. Mobile size (640x175). +isBannerMobileImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerMobileImageUrl + = lens _isBannerMobileImageUrl + (\ s a -> s{_isBannerMobileImageUrl = a}) + +-- | The URL for a 1px by 1px tracking pixel that can be used to collect +-- statistics for views of the channel or video pages. +isTrackingImageUrl :: Lens' ImageSettings (Maybe Text) +isTrackingImageUrl + = lens _isTrackingImageUrl + (\ s a -> s{_isTrackingImageUrl = a}) + +-- | Banner image. Mobile size medium\/high resolution (960x263). +isBannerMobileMediumHdImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerMobileMediumHdImageUrl + = lens _isBannerMobileMediumHdImageUrl + (\ s a -> s{_isBannerMobileMediumHdImageUrl = a}) + +-- | The URL for the 854px by 70px image that appears below the video player +-- in the expanded video view of the video watch page. +isLargeBrandedBannerImageUrl :: Lens' ImageSettings (Maybe (Maybe LocalizedProperty)) +isLargeBrandedBannerImageUrl + = lens _isLargeBrandedBannerImageUrl + (\ s a -> s{_isLargeBrandedBannerImageUrl = a}) + +-- | This is used only in update requests; if it\'s set, we use this URL to +-- generate all of the above banner URLs. +isBannerExternalUrl :: Lens' ImageSettings (Maybe Text) +isBannerExternalUrl + = lens _isBannerExternalUrl + (\ s a -> s{_isBannerExternalUrl = a}) + +-- | The URL for the background image shown on the video watch page. The +-- image should be 1200px by 615px, with a maximum file size of 128k. +isBackgroundImageUrl :: Lens' ImageSettings (Maybe (Maybe LocalizedProperty)) +isBackgroundImageUrl + = lens _isBackgroundImageUrl + (\ s a -> s{_isBackgroundImageUrl = a}) + +-- | The URL for the 640px by 70px banner image that appears below the video +-- player in the default view of the video watch page. +isSmallBrandedBannerImageUrl :: Lens' ImageSettings (Maybe (Maybe LocalizedProperty)) +isSmallBrandedBannerImageUrl + = lens _isSmallBrandedBannerImageUrl + (\ s a -> s{_isSmallBrandedBannerImageUrl = a}) + +-- | Banner image. Desktop size (1060x175). +isBannerImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerImageUrl + = lens _isBannerImageUrl + (\ s a -> s{_isBannerImageUrl = a}) + +-- | The URL for the image that appears above the top-left corner of the +-- video player. This is a 25-pixel-high image with a flexible width that +-- cannot exceed 170 pixels. +isWatchIconImageUrl :: Lens' ImageSettings (Maybe Text) +isWatchIconImageUrl + = lens _isWatchIconImageUrl + (\ s a -> s{_isWatchIconImageUrl = a}) + +-- | Banner image. TV size low resolution (854x480). +isBannerTvLowImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTvLowImageUrl + = lens _isBannerTvLowImageUrl + (\ s a -> s{_isBannerTvLowImageUrl = a}) + +-- | Banner image. Mobile size high resolution (1440x395). +isBannerMobileExtraHdImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerMobileExtraHdImageUrl + = lens _isBannerMobileExtraHdImageUrl + (\ s a -> s{_isBannerMobileExtraHdImageUrl = a}) + +-- | The image map script for the large banner image. +isLargeBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe (Maybe LocalizedProperty)) +isLargeBrandedBannerImageImapScript + = lens _isLargeBrandedBannerImageImapScript + (\ s a -> + s{_isLargeBrandedBannerImageImapScript = a}) + +-- | Banner image. Tablet size low resolution (1138x188). +isBannerTabletLowImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTabletLowImageUrl + = lens _isBannerTabletLowImageUrl + (\ s a -> s{_isBannerTabletLowImageUrl = a}) + +-- | Banner image. Tablet size high resolution (2276x377). +isBannerTabletHdImageUrl :: Lens' ImageSettings (Maybe Text) +isBannerTabletHdImageUrl + = lens _isBannerTabletHdImageUrl + (\ s a -> s{_isBannerTabletHdImageUrl = a}) + +instance FromJSON ImageSettings where + parseJSON + = withObject "ImageSettings" + (\ o -> + ImageSettings <$> + (o .:? "bannerMobileLowImageUrl") <*> + (o .:? "bannerTabletExtraHdImageUrl") + <*> (o .:? "smallBrandedBannerImageImapScript") + <*> (o .:? "bannerTvHighImageUrl") + <*> (o .:? "bannerMobileHdImageUrl") + <*> (o .:? "bannerTvMediumImageUrl") + <*> (o .:? "bannerTvImageUrl") + <*> (o .:? "bannerTabletImageUrl") + <*> (o .:? "bannerMobileImageUrl") + <*> (o .:? "trackingImageUrl") + <*> (o .:? "bannerMobileMediumHdImageUrl") + <*> (o .:? "largeBrandedBannerImageUrl") + <*> (o .:? "bannerExternalUrl") + <*> (o .:? "backgroundImageUrl") + <*> (o .:? "smallBrandedBannerImageUrl") + <*> (o .:? "bannerImageUrl") + <*> (o .:? "watchIconImageUrl") + <*> (o .:? "bannerTvLowImageUrl") + <*> (o .:? "bannerMobileExtraHdImageUrl") + <*> (o .:? "largeBrandedBannerImageImapScript") + <*> (o .:? "bannerTabletLowImageUrl") + <*> (o .:? "bannerTabletHdImageUrl")) + +instance ToJSON ImageSettings where + toJSON ImageSettings{..} + = object + (catMaybes + [("bannerMobileLowImageUrl" .=) <$> + _isBannerMobileLowImageUrl, + ("bannerTabletExtraHdImageUrl" .=) <$> + _isBannerTabletExtraHdImageUrl, + ("smallBrandedBannerImageImapScript" .=) <$> + _isSmallBrandedBannerImageImapScript, + ("bannerTvHighImageUrl" .=) <$> + _isBannerTvHighImageUrl, + ("bannerMobileHdImageUrl" .=) <$> + _isBannerMobileHdImageUrl, + ("bannerTvMediumImageUrl" .=) <$> + _isBannerTvMediumImageUrl, + ("bannerTvImageUrl" .=) <$> _isBannerTvImageUrl, + ("bannerTabletImageUrl" .=) <$> + _isBannerTabletImageUrl, + ("bannerMobileImageUrl" .=) <$> + _isBannerMobileImageUrl, + ("trackingImageUrl" .=) <$> _isTrackingImageUrl, + ("bannerMobileMediumHdImageUrl" .=) <$> + _isBannerMobileMediumHdImageUrl, + ("largeBrandedBannerImageUrl" .=) <$> + _isLargeBrandedBannerImageUrl, + ("bannerExternalUrl" .=) <$> _isBannerExternalUrl, + ("backgroundImageUrl" .=) <$> _isBackgroundImageUrl, + ("smallBrandedBannerImageUrl" .=) <$> + _isSmallBrandedBannerImageUrl, + ("bannerImageUrl" .=) <$> _isBannerImageUrl, + ("watchIconImageUrl" .=) <$> _isWatchIconImageUrl, + ("bannerTvLowImageUrl" .=) <$> + _isBannerTvLowImageUrl, + ("bannerMobileExtraHdImageUrl" .=) <$> + _isBannerMobileExtraHdImageUrl, + ("largeBrandedBannerImageImapScript" .=) <$> + _isLargeBrandedBannerImageImapScript, + ("bannerTabletLowImageUrl" .=) <$> + _isBannerTabletLowImageUrl, + ("bannerTabletHdImageUrl" .=) <$> + _isBannerTabletHdImageUrl]) + +-- | Information about the uploaded video. +-- +-- /See:/ 'activityContentDetailsUpload' smart constructor. +newtype ActivityContentDetailsUpload = ActivityContentDetailsUpload + { _acduVideoId :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsUpload' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acduVideoId' +activityContentDetailsUpload + :: ActivityContentDetailsUpload +activityContentDetailsUpload = + ActivityContentDetailsUpload + { _acduVideoId = Nothing + } + +-- | The ID that YouTube uses to uniquely identify the uploaded video. +acduVideoId :: Lens' ActivityContentDetailsUpload (Maybe Text) +acduVideoId + = lens _acduVideoId (\ s a -> s{_acduVideoId = a}) + +instance FromJSON ActivityContentDetailsUpload where + parseJSON + = withObject "ActivityContentDetailsUpload" + (\ o -> + ActivityContentDetailsUpload <$> (o .:? "videoId")) + +instance ToJSON ActivityContentDetailsUpload where + toJSON ActivityContentDetailsUpload{..} + = object + (catMaybes [("videoId" .=) <$> _acduVideoId]) + +-- +-- /See:/ 'playlistContentDetails' smart constructor. +newtype PlaylistContentDetails = PlaylistContentDetails + { _pcdItemCount :: Maybe Word32 + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pcdItemCount' +playlistContentDetails + :: PlaylistContentDetails +playlistContentDetails = + PlaylistContentDetails + { _pcdItemCount = Nothing + } + +-- | The number of videos in the playlist. +pcdItemCount :: Lens' PlaylistContentDetails (Maybe Word32) +pcdItemCount + = lens _pcdItemCount (\ s a -> s{_pcdItemCount = a}) + +instance FromJSON PlaylistContentDetails where + parseJSON + = withObject "PlaylistContentDetails" + (\ o -> + PlaylistContentDetails <$> (o .:? "itemCount")) + +instance ToJSON PlaylistContentDetails where + toJSON PlaylistContentDetails{..} + = object + (catMaybes [("itemCount" .=) <$> _pcdItemCount]) + +-- | Details about a social network post. +-- +-- /See:/ 'activityContentDetailsSocial' smart constructor. +data ActivityContentDetailsSocial = ActivityContentDetailsSocial + { _acdsResourceId :: !(Maybe (Maybe ResourceId)) + , _acdsImageUrl :: !(Maybe Text) + , _acdsAuthor :: !(Maybe Text) + , _acdsReferenceUrl :: !(Maybe Text) + , _acdsType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsSocial' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdsResourceId' +-- +-- * 'acdsImageUrl' +-- +-- * 'acdsAuthor' +-- +-- * 'acdsReferenceUrl' +-- +-- * 'acdsType' +activityContentDetailsSocial + :: ActivityContentDetailsSocial +activityContentDetailsSocial = + ActivityContentDetailsSocial + { _acdsResourceId = Nothing + , _acdsImageUrl = Nothing + , _acdsAuthor = Nothing + , _acdsReferenceUrl = Nothing + , _acdsType = Nothing + } + +-- | The resourceId object encapsulates information that identifies the +-- resource associated with a social network post. +acdsResourceId :: Lens' ActivityContentDetailsSocial (Maybe (Maybe ResourceId)) +acdsResourceId + = lens _acdsResourceId + (\ s a -> s{_acdsResourceId = a}) + +-- | An image of the post\'s author. +acdsImageUrl :: Lens' ActivityContentDetailsSocial (Maybe Text) +acdsImageUrl + = lens _acdsImageUrl (\ s a -> s{_acdsImageUrl = a}) + +-- | The author of the social network post. +acdsAuthor :: Lens' ActivityContentDetailsSocial (Maybe Text) +acdsAuthor + = lens _acdsAuthor (\ s a -> s{_acdsAuthor = a}) + +-- | The URL of the social network post. +acdsReferenceUrl :: Lens' ActivityContentDetailsSocial (Maybe Text) +acdsReferenceUrl + = lens _acdsReferenceUrl + (\ s a -> s{_acdsReferenceUrl = a}) + +-- | The name of the social network. +acdsType :: Lens' ActivityContentDetailsSocial (Maybe Text) +acdsType = lens _acdsType (\ s a -> s{_acdsType = a}) + +instance FromJSON ActivityContentDetailsSocial where + parseJSON + = withObject "ActivityContentDetailsSocial" + (\ o -> + ActivityContentDetailsSocial <$> + (o .:? "resourceId") <*> (o .:? "imageUrl") <*> + (o .:? "author") + <*> (o .:? "referenceUrl") + <*> (o .:? "type")) + +instance ToJSON ActivityContentDetailsSocial where + toJSON ActivityContentDetailsSocial{..} + = object + (catMaybes + [("resourceId" .=) <$> _acdsResourceId, + ("imageUrl" .=) <$> _acdsImageUrl, + ("author" .=) <$> _acdsAuthor, + ("referenceUrl" .=) <$> _acdsReferenceUrl, + ("type" .=) <$> _acdsType]) + +-- | Information about a channel that a user subscribed to. +-- +-- /See:/ 'activityContentDetailsSubscription' smart constructor. +newtype ActivityContentDetailsSubscription = ActivityContentDetailsSubscription + { _aResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsSubscription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aResourceId' +activityContentDetailsSubscription + :: ActivityContentDetailsSubscription +activityContentDetailsSubscription = + ActivityContentDetailsSubscription + { _aResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the resource +-- that the user subscribed to. +aResourceId :: Lens' ActivityContentDetailsSubscription (Maybe (Maybe ResourceId)) +aResourceId + = lens _aResourceId (\ s a -> s{_aResourceId = a}) + +instance FromJSON ActivityContentDetailsSubscription + where + parseJSON + = withObject "ActivityContentDetailsSubscription" + (\ o -> + ActivityContentDetailsSubscription <$> + (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsSubscription + where + toJSON ActivityContentDetailsSubscription{..} + = object + (catMaybes [("resourceId" .=) <$> _aResourceId]) + +-- | Information about a resource that received a comment. +-- +-- /See:/ 'activityContentDetailsComment' smart constructor. +newtype ActivityContentDetailsComment = ActivityContentDetailsComment + { _acdcResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsComment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdcResourceId' +activityContentDetailsComment + :: ActivityContentDetailsComment +activityContentDetailsComment = + ActivityContentDetailsComment + { _acdcResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the resource +-- associated with the comment. +acdcResourceId :: Lens' ActivityContentDetailsComment (Maybe (Maybe ResourceId)) +acdcResourceId + = lens _acdcResourceId + (\ s a -> s{_acdcResourceId = a}) + +instance FromJSON ActivityContentDetailsComment where + parseJSON + = withObject "ActivityContentDetailsComment" + (\ o -> + ActivityContentDetailsComment <$> + (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsComment where + toJSON ActivityContentDetailsComment{..} + = object + (catMaybes [("resourceId" .=) <$> _acdcResourceId]) + +-- | Information about a resource that received a positive (like) rating. +-- +-- /See:/ 'activityContentDetailsLike' smart constructor. +newtype ActivityContentDetailsLike = ActivityContentDetailsLike + { _acdlResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsLike' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdlResourceId' +activityContentDetailsLike + :: ActivityContentDetailsLike +activityContentDetailsLike = + ActivityContentDetailsLike + { _acdlResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the rated +-- resource. +acdlResourceId :: Lens' ActivityContentDetailsLike (Maybe (Maybe ResourceId)) +acdlResourceId + = lens _acdlResourceId + (\ s a -> s{_acdlResourceId = a}) + +instance FromJSON ActivityContentDetailsLike where + parseJSON + = withObject "ActivityContentDetailsLike" + (\ o -> + ActivityContentDetailsLike <$> (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsLike where + toJSON ActivityContentDetailsLike{..} + = object + (catMaybes [("resourceId" .=) <$> _acdlResourceId]) + +-- | Describes original video file properties, including technical details +-- about audio and video streams, but also metadata information like +-- content length, digitization time, or geotagging information. +-- +-- /See:/ 'videoFileDetails' smart constructor. +data VideoFileDetails = VideoFileDetails + { _vfdBitrateBps :: !(Maybe Word64) + , _vfdCreationTime :: !(Maybe Text) + , _vfdRecordingLocation :: !(Maybe (Maybe GeoPoint)) + , _vfdDurationMs :: !(Maybe Word64) + , _vfdFileSize :: !(Maybe Word64) + , _vfdFileType :: !(Maybe Text) + , _vfdContainer :: !(Maybe Text) + , _vfdVideoStreams :: !(Maybe [Maybe VideoFileDetailsVideoStream]) + , _vfdAudioStreams :: !(Maybe [Maybe VideoFileDetailsAudioStream]) + , _vfdFileName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoFileDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vfdBitrateBps' +-- +-- * 'vfdCreationTime' +-- +-- * 'vfdRecordingLocation' +-- +-- * 'vfdDurationMs' +-- +-- * 'vfdFileSize' +-- +-- * 'vfdFileType' +-- +-- * 'vfdContainer' +-- +-- * 'vfdVideoStreams' +-- +-- * 'vfdAudioStreams' +-- +-- * 'vfdFileName' +videoFileDetails + :: VideoFileDetails +videoFileDetails = + VideoFileDetails + { _vfdBitrateBps = Nothing + , _vfdCreationTime = Nothing + , _vfdRecordingLocation = Nothing + , _vfdDurationMs = Nothing + , _vfdFileSize = Nothing + , _vfdFileType = Nothing + , _vfdContainer = Nothing + , _vfdVideoStreams = Nothing + , _vfdAudioStreams = Nothing + , _vfdFileName = Nothing + } + +-- | The uploaded video file\'s combined (video and audio) bitrate in bits +-- per second. +vfdBitrateBps :: Lens' VideoFileDetails (Maybe Word64) +vfdBitrateBps + = lens _vfdBitrateBps + (\ s a -> s{_vfdBitrateBps = a}) + +-- | The date and time when the uploaded video file was created. The value is +-- specified in ISO 8601 format. Currently, the following ISO 8601 formats +-- are supported: - Date only: YYYY-MM-DD - Naive time: YYYY-MM-DDTHH:MM:SS +-- - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM +vfdCreationTime :: Lens' VideoFileDetails (Maybe Text) +vfdCreationTime + = lens _vfdCreationTime + (\ s a -> s{_vfdCreationTime = a}) + +-- | Geographic coordinates that identify the place where the uploaded video +-- was recorded. Coordinates are defined using WGS 84. +vfdRecordingLocation :: Lens' VideoFileDetails (Maybe (Maybe GeoPoint)) +vfdRecordingLocation + = lens _vfdRecordingLocation + (\ s a -> s{_vfdRecordingLocation = a}) + +-- | The length of the uploaded video in milliseconds. +vfdDurationMs :: Lens' VideoFileDetails (Maybe Word64) +vfdDurationMs + = lens _vfdDurationMs + (\ s a -> s{_vfdDurationMs = a}) + +-- | The uploaded file\'s size in bytes. This field is present whether a +-- video file or another type of file was uploaded. +vfdFileSize :: Lens' VideoFileDetails (Maybe Word64) +vfdFileSize + = lens _vfdFileSize (\ s a -> s{_vfdFileSize = a}) + +-- | The uploaded file\'s type as detected by YouTube\'s video processing +-- engine. Currently, YouTube only processes video files, but this field is +-- present whether a video file or another type of file was uploaded. +vfdFileType :: Lens' VideoFileDetails (Maybe Text) +vfdFileType + = lens _vfdFileType (\ s a -> s{_vfdFileType = a}) + +-- | The uploaded video file\'s container format. +vfdContainer :: Lens' VideoFileDetails (Maybe Text) +vfdContainer + = lens _vfdContainer (\ s a -> s{_vfdContainer = a}) + +-- | A list of video streams contained in the uploaded video file. Each item +-- in the list contains detailed metadata about a video stream. +vfdVideoStreams :: Lens' VideoFileDetails [Maybe VideoFileDetailsVideoStream] +vfdVideoStreams + = lens _vfdVideoStreams + (\ s a -> s{_vfdVideoStreams = a}) + . _Default + . _Coerce + +-- | A list of audio streams contained in the uploaded video file. Each item +-- in the list contains detailed metadata about an audio stream. +vfdAudioStreams :: Lens' VideoFileDetails [Maybe VideoFileDetailsAudioStream] +vfdAudioStreams + = lens _vfdAudioStreams + (\ s a -> s{_vfdAudioStreams = a}) + . _Default + . _Coerce + +-- | The uploaded file\'s name. This field is present whether a video file or +-- another type of file was uploaded. +vfdFileName :: Lens' VideoFileDetails (Maybe Text) +vfdFileName + = lens _vfdFileName (\ s a -> s{_vfdFileName = a}) + +instance FromJSON VideoFileDetails where + parseJSON + = withObject "VideoFileDetails" + (\ o -> + VideoFileDetails <$> + (o .:? "bitrateBps") <*> (o .:? "creationTime") <*> + (o .:? "recordingLocation") + <*> (o .:? "durationMs") + <*> (o .:? "fileSize") + <*> (o .:? "fileType") + <*> (o .:? "container") + <*> (o .:? "videoStreams" .!= mempty) + <*> (o .:? "audioStreams" .!= mempty) + <*> (o .:? "fileName")) + +instance ToJSON VideoFileDetails where + toJSON VideoFileDetails{..} + = object + (catMaybes + [("bitrateBps" .=) <$> _vfdBitrateBps, + ("creationTime" .=) <$> _vfdCreationTime, + ("recordingLocation" .=) <$> _vfdRecordingLocation, + ("durationMs" .=) <$> _vfdDurationMs, + ("fileSize" .=) <$> _vfdFileSize, + ("fileType" .=) <$> _vfdFileType, + ("container" .=) <$> _vfdContainer, + ("videoStreams" .=) <$> _vfdVideoStreams, + ("audioStreams" .=) <$> _vfdAudioStreams, + ("fileName" .=) <$> _vfdFileName]) + +-- +-- /See:/ 'liveBroadcastStatus' smart constructor. +data LiveBroadcastStatus = LiveBroadcastStatus + { _lbsLiveBroadcastPriority :: !(Maybe Text) + , _lbsRecordingStatus :: !(Maybe Text) + , _lbsLifeCycleStatus :: !(Maybe Text) + , _lbsPrivacyStatus :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbsLiveBroadcastPriority' +-- +-- * 'lbsRecordingStatus' +-- +-- * 'lbsLifeCycleStatus' +-- +-- * 'lbsPrivacyStatus' +liveBroadcastStatus + :: LiveBroadcastStatus +liveBroadcastStatus = + LiveBroadcastStatus + { _lbsLiveBroadcastPriority = Nothing + , _lbsRecordingStatus = Nothing + , _lbsLifeCycleStatus = Nothing + , _lbsPrivacyStatus = Nothing + } + +-- | Priority of the live broadcast event (internal state). +lbsLiveBroadcastPriority :: Lens' LiveBroadcastStatus (Maybe Text) +lbsLiveBroadcastPriority + = lens _lbsLiveBroadcastPriority + (\ s a -> s{_lbsLiveBroadcastPriority = a}) + +-- | The broadcast\'s recording status. +lbsRecordingStatus :: Lens' LiveBroadcastStatus (Maybe Text) +lbsRecordingStatus + = lens _lbsRecordingStatus + (\ s a -> s{_lbsRecordingStatus = a}) + +-- | The broadcast\'s status. The status can be updated using the API\'s +-- liveBroadcasts.transition method. +lbsLifeCycleStatus :: Lens' LiveBroadcastStatus (Maybe Text) +lbsLifeCycleStatus + = lens _lbsLifeCycleStatus + (\ s a -> s{_lbsLifeCycleStatus = a}) + +-- | The broadcast\'s privacy status. Note that the broadcast represents +-- exactly one YouTube video, so the privacy settings are identical to +-- those supported for videos. In addition, you can set this field by +-- modifying the broadcast resource or by setting the privacyStatus field +-- of the corresponding video resource. +lbsPrivacyStatus :: Lens' LiveBroadcastStatus (Maybe Text) +lbsPrivacyStatus + = lens _lbsPrivacyStatus + (\ s a -> s{_lbsPrivacyStatus = a}) + +instance FromJSON LiveBroadcastStatus where + parseJSON + = withObject "LiveBroadcastStatus" + (\ o -> + LiveBroadcastStatus <$> + (o .:? "liveBroadcastPriority") <*> + (o .:? "recordingStatus") + <*> (o .:? "lifeCycleStatus") + <*> (o .:? "privacyStatus")) + +instance ToJSON LiveBroadcastStatus where + toJSON LiveBroadcastStatus{..} + = object + (catMaybes + [("liveBroadcastPriority" .=) <$> + _lbsLiveBroadcastPriority, + ("recordingStatus" .=) <$> _lbsRecordingStatus, + ("lifeCycleStatus" .=) <$> _lbsLifeCycleStatus, + ("privacyStatus" .=) <$> _lbsPrivacyStatus]) + +-- +-- /See:/ 'thumbnailSetResponse' smart constructor. +data ThumbnailSetResponse = ThumbnailSetResponse + { _tsrEtag :: !(Maybe Text) + , _tsrKind :: !Text + , _tsrItems :: !(Maybe [Maybe ThumbnailDetails]) + , _tsrVisitorId :: !(Maybe Text) + , _tsrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ThumbnailSetResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tsrEtag' +-- +-- * 'tsrKind' +-- +-- * 'tsrItems' +-- +-- * 'tsrVisitorId' +-- +-- * 'tsrEventId' +thumbnailSetResponse + :: ThumbnailSetResponse +thumbnailSetResponse = + ThumbnailSetResponse + { _tsrEtag = Nothing + , _tsrKind = "youtube#thumbnailSetResponse" + , _tsrItems = Nothing + , _tsrVisitorId = Nothing + , _tsrEventId = Nothing + } + +-- | Etag of this resource. +tsrEtag :: Lens' ThumbnailSetResponse (Maybe Text) +tsrEtag = lens _tsrEtag (\ s a -> s{_tsrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#thumbnailSetResponse\". +tsrKind :: Lens' ThumbnailSetResponse Text +tsrKind = lens _tsrKind (\ s a -> s{_tsrKind = a}) + +-- | A list of thumbnails. +tsrItems :: Lens' ThumbnailSetResponse [Maybe ThumbnailDetails] +tsrItems + = lens _tsrItems (\ s a -> s{_tsrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +tsrVisitorId :: Lens' ThumbnailSetResponse (Maybe Text) +tsrVisitorId + = lens _tsrVisitorId (\ s a -> s{_tsrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +tsrEventId :: Lens' ThumbnailSetResponse (Maybe Text) +tsrEventId + = lens _tsrEventId (\ s a -> s{_tsrEventId = a}) + +instance FromJSON ThumbnailSetResponse where + parseJSON + = withObject "ThumbnailSetResponse" + (\ o -> + ThumbnailSetResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#thumbnailSetResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON ThumbnailSetResponse where + toJSON ThumbnailSetResponse{..} + = object + (catMaybes + [("etag" .=) <$> _tsrEtag, Just ("kind" .= _tsrKind), + ("items" .=) <$> _tsrItems, + ("visitorId" .=) <$> _tsrVisitorId, + ("eventId" .=) <$> _tsrEventId]) + +-- | Information about a new playlist item. +-- +-- /See:/ 'activityContentDetailsPlaylistItem' smart constructor. +data ActivityContentDetailsPlaylistItem = ActivityContentDetailsPlaylistItem + { _acdpiResourceId :: !(Maybe (Maybe ResourceId)) + , _acdpiPlaylistId :: !(Maybe Text) + , _acdpiPlaylistItemId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsPlaylistItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdpiResourceId' +-- +-- * 'acdpiPlaylistId' +-- +-- * 'acdpiPlaylistItemId' +activityContentDetailsPlaylistItem + :: ActivityContentDetailsPlaylistItem +activityContentDetailsPlaylistItem = + ActivityContentDetailsPlaylistItem + { _acdpiResourceId = Nothing + , _acdpiPlaylistId = Nothing + , _acdpiPlaylistItemId = Nothing + } + +-- | The resourceId object contains information about the resource that was +-- added to the playlist. +acdpiResourceId :: Lens' ActivityContentDetailsPlaylistItem (Maybe (Maybe ResourceId)) +acdpiResourceId + = lens _acdpiResourceId + (\ s a -> s{_acdpiResourceId = a}) + +-- | The value that YouTube uses to uniquely identify the playlist. +acdpiPlaylistId :: Lens' ActivityContentDetailsPlaylistItem (Maybe Text) +acdpiPlaylistId + = lens _acdpiPlaylistId + (\ s a -> s{_acdpiPlaylistId = a}) + +-- | ID of the item within the playlist. +acdpiPlaylistItemId :: Lens' ActivityContentDetailsPlaylistItem (Maybe Text) +acdpiPlaylistItemId + = lens _acdpiPlaylistItemId + (\ s a -> s{_acdpiPlaylistItemId = a}) + +instance FromJSON ActivityContentDetailsPlaylistItem + where + parseJSON + = withObject "ActivityContentDetailsPlaylistItem" + (\ o -> + ActivityContentDetailsPlaylistItem <$> + (o .:? "resourceId") <*> (o .:? "playlistId") <*> + (o .:? "playlistItemId")) + +instance ToJSON ActivityContentDetailsPlaylistItem + where + toJSON ActivityContentDetailsPlaylistItem{..} + = object + (catMaybes + [("resourceId" .=) <$> _acdpiResourceId, + ("playlistId" .=) <$> _acdpiPlaylistId, + ("playlistItemId" .=) <$> _acdpiPlaylistItemId]) + +-- | Basic details about a video category, such as its localized title. +-- +-- /See:/ 'videoStatus' smart constructor. +data VideoStatus = VideoStatus + { _vsFailureReason :: !(Maybe Text) + , _vsPublicStatsViewable :: !(Maybe Bool) + , _vsRejectionReason :: !(Maybe Text) + , _vsPublishAt :: !(Maybe UTCTime) + , _vsUploadStatus :: !(Maybe Text) + , _vsPrivacyStatus :: !(Maybe Text) + , _vsEmbeddable :: !(Maybe Bool) + , _vsLicense :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsFailureReason' +-- +-- * 'vsPublicStatsViewable' +-- +-- * 'vsRejectionReason' +-- +-- * 'vsPublishAt' +-- +-- * 'vsUploadStatus' +-- +-- * 'vsPrivacyStatus' +-- +-- * 'vsEmbeddable' +-- +-- * 'vsLicense' +videoStatus + :: VideoStatus +videoStatus = + VideoStatus + { _vsFailureReason = Nothing + , _vsPublicStatsViewable = Nothing + , _vsRejectionReason = Nothing + , _vsPublishAt = Nothing + , _vsUploadStatus = Nothing + , _vsPrivacyStatus = Nothing + , _vsEmbeddable = Nothing + , _vsLicense = Nothing + } + +-- | This value explains why a video failed to upload. This property is only +-- present if the uploadStatus property indicates that the upload failed. +vsFailureReason :: Lens' VideoStatus (Maybe Text) +vsFailureReason + = lens _vsFailureReason + (\ s a -> s{_vsFailureReason = a}) + +-- | This value indicates if the extended video statistics on the watch page +-- can be viewed by everyone. Note that the view count, likes, etc will +-- still be visible if this is disabled. +vsPublicStatsViewable :: Lens' VideoStatus (Maybe Bool) +vsPublicStatsViewable + = lens _vsPublicStatsViewable + (\ s a -> s{_vsPublicStatsViewable = a}) + +-- | This value explains why YouTube rejected an uploaded video. This +-- property is only present if the uploadStatus property indicates that the +-- upload was rejected. +vsRejectionReason :: Lens' VideoStatus (Maybe Text) +vsRejectionReason + = lens _vsRejectionReason + (\ s a -> s{_vsRejectionReason = a}) + +-- | The date and time when the video is scheduled to publish. It can be set +-- only if the privacy status of the video is private. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +vsPublishAt :: Lens' VideoStatus (Maybe UTCTime) +vsPublishAt + = lens _vsPublishAt (\ s a -> s{_vsPublishAt = a}) + +-- | The status of the uploaded video. +vsUploadStatus :: Lens' VideoStatus (Maybe Text) +vsUploadStatus + = lens _vsUploadStatus + (\ s a -> s{_vsUploadStatus = a}) + +-- | The video\'s privacy status. +vsPrivacyStatus :: Lens' VideoStatus (Maybe Text) +vsPrivacyStatus + = lens _vsPrivacyStatus + (\ s a -> s{_vsPrivacyStatus = a}) + +-- | This value indicates if the video can be embedded on another website. +vsEmbeddable :: Lens' VideoStatus (Maybe Bool) +vsEmbeddable + = lens _vsEmbeddable (\ s a -> s{_vsEmbeddable = a}) + +-- | The video\'s license. +vsLicense :: Lens' VideoStatus (Maybe Text) +vsLicense + = lens _vsLicense (\ s a -> s{_vsLicense = a}) + +instance FromJSON VideoStatus where + parseJSON + = withObject "VideoStatus" + (\ o -> + VideoStatus <$> + (o .:? "failureReason") <*> + (o .:? "publicStatsViewable") + <*> (o .:? "rejectionReason") + <*> (o .:? "publishAt") + <*> (o .:? "uploadStatus") + <*> (o .:? "privacyStatus") + <*> (o .:? "embeddable") + <*> (o .:? "license")) + +instance ToJSON VideoStatus where + toJSON VideoStatus{..} + = object + (catMaybes + [("failureReason" .=) <$> _vsFailureReason, + ("publicStatsViewable" .=) <$> + _vsPublicStatsViewable, + ("rejectionReason" .=) <$> _vsRejectionReason, + ("publishAt" .=) <$> _vsPublishAt, + ("uploadStatus" .=) <$> _vsUploadStatus, + ("privacyStatus" .=) <$> _vsPrivacyStatus, + ("embeddable" .=) <$> _vsEmbeddable, + ("license" .=) <$> _vsLicense]) + +-- | Paging details for lists of resources, including total number of items +-- available and number of resources returned in a single page. +-- +-- /See:/ 'pageInfo' smart constructor. +data PageInfo = PageInfo + { _piResultsPerPage :: !(Maybe Int32) + , _piTotalResults :: !(Maybe Int32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PageInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piResultsPerPage' +-- +-- * 'piTotalResults' +pageInfo + :: PageInfo +pageInfo = + PageInfo + { _piResultsPerPage = Nothing + , _piTotalResults = Nothing + } + +-- | The number of results included in the API response. +piResultsPerPage :: Lens' PageInfo (Maybe Int32) +piResultsPerPage + = lens _piResultsPerPage + (\ s a -> s{_piResultsPerPage = a}) + +-- | The total number of results in the result set. +piTotalResults :: Lens' PageInfo (Maybe Int32) +piTotalResults + = lens _piTotalResults + (\ s a -> s{_piTotalResults = a}) + +instance FromJSON PageInfo where + parseJSON + = withObject "PageInfo" + (\ o -> + PageInfo <$> + (o .:? "resultsPerPage") <*> (o .:? "totalResults")) + +instance ToJSON PageInfo where + toJSON PageInfo{..} + = object + (catMaybes + [("resultsPerPage" .=) <$> _piResultsPerPage, + ("totalResults" .=) <$> _piTotalResults]) + +-- | Details about a resource which was added to a channel. +-- +-- /See:/ 'activityContentDetailsChannelItem' smart constructor. +newtype ActivityContentDetailsChannelItem = ActivityContentDetailsChannelItem + { _acdciResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsChannelItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdciResourceId' +activityContentDetailsChannelItem + :: ActivityContentDetailsChannelItem +activityContentDetailsChannelItem = + ActivityContentDetailsChannelItem + { _acdciResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the resource +-- that was added to the channel. +acdciResourceId :: Lens' ActivityContentDetailsChannelItem (Maybe (Maybe ResourceId)) +acdciResourceId + = lens _acdciResourceId + (\ s a -> s{_acdciResourceId = a}) + +instance FromJSON ActivityContentDetailsChannelItem + where + parseJSON + = withObject "ActivityContentDetailsChannelItem" + (\ o -> + ActivityContentDetailsChannelItem <$> + (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsChannelItem + where + toJSON ActivityContentDetailsChannelItem{..} + = object + (catMaybes [("resourceId" .=) <$> _acdciResourceId]) + +-- +-- /See:/ 'liveBroadcastListResponse' smart constructor. +data LiveBroadcastListResponse = LiveBroadcastListResponse + { _lblrEtag :: !(Maybe Text) + , _lblrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _lblrNextPageToken :: !(Maybe Text) + , _lblrPageInfo :: !(Maybe (Maybe PageInfo)) + , _lblrKind :: !Text + , _lblrItems :: !(Maybe [Maybe LiveBroadcast]) + , _lblrVisitorId :: !(Maybe Text) + , _lblrEventId :: !(Maybe Text) + , _lblrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lblrEtag' +-- +-- * 'lblrTokenPagination' +-- +-- * 'lblrNextPageToken' +-- +-- * 'lblrPageInfo' +-- +-- * 'lblrKind' +-- +-- * 'lblrItems' +-- +-- * 'lblrVisitorId' +-- +-- * 'lblrEventId' +-- +-- * 'lblrPrevPageToken' +liveBroadcastListResponse + :: LiveBroadcastListResponse +liveBroadcastListResponse = + LiveBroadcastListResponse + { _lblrEtag = Nothing + , _lblrTokenPagination = Nothing + , _lblrNextPageToken = Nothing + , _lblrPageInfo = Nothing + , _lblrKind = "youtube#liveBroadcastListResponse" + , _lblrItems = Nothing + , _lblrVisitorId = Nothing + , _lblrEventId = Nothing + , _lblrPrevPageToken = Nothing + } + +-- | Etag of this resource. +lblrEtag :: Lens' LiveBroadcastListResponse (Maybe Text) +lblrEtag = lens _lblrEtag (\ s a -> s{_lblrEtag = a}) + +lblrTokenPagination :: Lens' LiveBroadcastListResponse (Maybe (Maybe TokenPagination)) +lblrTokenPagination + = lens _lblrTokenPagination + (\ s a -> s{_lblrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +lblrNextPageToken :: Lens' LiveBroadcastListResponse (Maybe Text) +lblrNextPageToken + = lens _lblrNextPageToken + (\ s a -> s{_lblrNextPageToken = a}) + +lblrPageInfo :: Lens' LiveBroadcastListResponse (Maybe (Maybe PageInfo)) +lblrPageInfo + = lens _lblrPageInfo (\ s a -> s{_lblrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#liveBroadcastListResponse\". +lblrKind :: Lens' LiveBroadcastListResponse Text +lblrKind = lens _lblrKind (\ s a -> s{_lblrKind = a}) + +-- | A list of broadcasts that match the request criteria. +lblrItems :: Lens' LiveBroadcastListResponse [Maybe LiveBroadcast] +lblrItems + = lens _lblrItems (\ s a -> s{_lblrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +lblrVisitorId :: Lens' LiveBroadcastListResponse (Maybe Text) +lblrVisitorId + = lens _lblrVisitorId + (\ s a -> s{_lblrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +lblrEventId :: Lens' LiveBroadcastListResponse (Maybe Text) +lblrEventId + = lens _lblrEventId (\ s a -> s{_lblrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +lblrPrevPageToken :: Lens' LiveBroadcastListResponse (Maybe Text) +lblrPrevPageToken + = lens _lblrPrevPageToken + (\ s a -> s{_lblrPrevPageToken = a}) + +instance FromJSON LiveBroadcastListResponse where + parseJSON + = withObject "LiveBroadcastListResponse" + (\ o -> + LiveBroadcastListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= + "youtube#liveBroadcastListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON LiveBroadcastListResponse where + toJSON LiveBroadcastListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _lblrEtag, + ("tokenPagination" .=) <$> _lblrTokenPagination, + ("nextPageToken" .=) <$> _lblrNextPageToken, + ("pageInfo" .=) <$> _lblrPageInfo, + Just ("kind" .= _lblrKind), + ("items" .=) <$> _lblrItems, + ("visitorId" .=) <$> _lblrVisitorId, + ("eventId" .=) <$> _lblrEventId, + ("prevPageToken" .=) <$> _lblrPrevPageToken]) + +-- | Describes processing status and progress and availability of some other +-- Video resource parts. +-- +-- /See:/ 'videoProcessingDetails' smart constructor. +data VideoProcessingDetails = VideoProcessingDetails + { _vpdProcessingFailureReason :: !(Maybe Text) + , _vpdProcessingIssuesAvailability :: !(Maybe Text) + , _vpdProcessingProgress :: !(Maybe (Maybe VideoProcessingDetailsProcessingProgress)) + , _vpdThumbnailsAvailability :: !(Maybe Text) + , _vpdTagSuggestionsAvailability :: !(Maybe Text) + , _vpdProcessingStatus :: !(Maybe Text) + , _vpdEditorSuggestionsAvailability :: !(Maybe Text) + , _vpdFileDetailsAvailability :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoProcessingDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vpdProcessingFailureReason' +-- +-- * 'vpdProcessingIssuesAvailability' +-- +-- * 'vpdProcessingProgress' +-- +-- * 'vpdThumbnailsAvailability' +-- +-- * 'vpdTagSuggestionsAvailability' +-- +-- * 'vpdProcessingStatus' +-- +-- * 'vpdEditorSuggestionsAvailability' +-- +-- * 'vpdFileDetailsAvailability' +videoProcessingDetails + :: VideoProcessingDetails +videoProcessingDetails = + VideoProcessingDetails + { _vpdProcessingFailureReason = Nothing + , _vpdProcessingIssuesAvailability = Nothing + , _vpdProcessingProgress = Nothing + , _vpdThumbnailsAvailability = Nothing + , _vpdTagSuggestionsAvailability = Nothing + , _vpdProcessingStatus = Nothing + , _vpdEditorSuggestionsAvailability = Nothing + , _vpdFileDetailsAvailability = Nothing + } + +-- | The reason that YouTube failed to process the video. This property will +-- only have a value if the processingStatus property\'s value is failed. +vpdProcessingFailureReason :: Lens' VideoProcessingDetails (Maybe Text) +vpdProcessingFailureReason + = lens _vpdProcessingFailureReason + (\ s a -> s{_vpdProcessingFailureReason = a}) + +-- | This value indicates whether the video processing engine has generated +-- suggestions that might improve YouTube\'s ability to process the the +-- video, warnings that explain video processing problems, or errors that +-- cause video processing problems. You can retrieve these suggestions by +-- requesting the suggestions part in your videos.list() request. +vpdProcessingIssuesAvailability :: Lens' VideoProcessingDetails (Maybe Text) +vpdProcessingIssuesAvailability + = lens _vpdProcessingIssuesAvailability + (\ s a -> s{_vpdProcessingIssuesAvailability = a}) + +-- | The processingProgress object contains information about the progress +-- YouTube has made in processing the video. The values are really only +-- relevant if the video\'s processing status is processing. +vpdProcessingProgress :: Lens' VideoProcessingDetails (Maybe (Maybe VideoProcessingDetailsProcessingProgress)) +vpdProcessingProgress + = lens _vpdProcessingProgress + (\ s a -> s{_vpdProcessingProgress = a}) + +-- | This value indicates whether thumbnail images have been generated for +-- the video. +vpdThumbnailsAvailability :: Lens' VideoProcessingDetails (Maybe Text) +vpdThumbnailsAvailability + = lens _vpdThumbnailsAvailability + (\ s a -> s{_vpdThumbnailsAvailability = a}) + +-- | This value indicates whether keyword (tag) suggestions are available for +-- the video. Tags can be added to a video\'s metadata to make it easier +-- for other users to find the video. You can retrieve these suggestions by +-- requesting the suggestions part in your videos.list() request. +vpdTagSuggestionsAvailability :: Lens' VideoProcessingDetails (Maybe Text) +vpdTagSuggestionsAvailability + = lens _vpdTagSuggestionsAvailability + (\ s a -> s{_vpdTagSuggestionsAvailability = a}) + +-- | The video\'s processing status. This value indicates whether YouTube was +-- able to process the video or if the video is still being processed. +vpdProcessingStatus :: Lens' VideoProcessingDetails (Maybe Text) +vpdProcessingStatus + = lens _vpdProcessingStatus + (\ s a -> s{_vpdProcessingStatus = a}) + +-- | This value indicates whether video editing suggestions, which might +-- improve video quality or the playback experience, are available for the +-- video. You can retrieve these suggestions by requesting the suggestions +-- part in your videos.list() request. +vpdEditorSuggestionsAvailability :: Lens' VideoProcessingDetails (Maybe Text) +vpdEditorSuggestionsAvailability + = lens _vpdEditorSuggestionsAvailability + (\ s a -> s{_vpdEditorSuggestionsAvailability = a}) + +-- | This value indicates whether file details are available for the uploaded +-- video. You can retrieve a video\'s file details by requesting the +-- fileDetails part in your videos.list() request. +vpdFileDetailsAvailability :: Lens' VideoProcessingDetails (Maybe Text) +vpdFileDetailsAvailability + = lens _vpdFileDetailsAvailability + (\ s a -> s{_vpdFileDetailsAvailability = a}) + +instance FromJSON VideoProcessingDetails where + parseJSON + = withObject "VideoProcessingDetails" + (\ o -> + VideoProcessingDetails <$> + (o .:? "processingFailureReason") <*> + (o .:? "processingIssuesAvailability") + <*> (o .:? "processingProgress") + <*> (o .:? "thumbnailsAvailability") + <*> (o .:? "tagSuggestionsAvailability") + <*> (o .:? "processingStatus") + <*> (o .:? "editorSuggestionsAvailability") + <*> (o .:? "fileDetailsAvailability")) + +instance ToJSON VideoProcessingDetails where + toJSON VideoProcessingDetails{..} + = object + (catMaybes + [("processingFailureReason" .=) <$> + _vpdProcessingFailureReason, + ("processingIssuesAvailability" .=) <$> + _vpdProcessingIssuesAvailability, + ("processingProgress" .=) <$> _vpdProcessingProgress, + ("thumbnailsAvailability" .=) <$> + _vpdThumbnailsAvailability, + ("tagSuggestionsAvailability" .=) <$> + _vpdTagSuggestionsAvailability, + ("processingStatus" .=) <$> _vpdProcessingStatus, + ("editorSuggestionsAvailability" .=) <$> + _vpdEditorSuggestionsAvailability, + ("fileDetailsAvailability" .=) <$> + _vpdFileDetailsAvailability]) + +-- | Details about the content of a channel. +-- +-- /See:/ 'channelContentDetails' smart constructor. +data ChannelContentDetails = ChannelContentDetails + { _ccdRelatedPlaylists :: !(Maybe ChannelContentDetailsRelatedPlaylists) + , _ccdGooglePlusUserId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccdRelatedPlaylists' +-- +-- * 'ccdGooglePlusUserId' +channelContentDetails + :: ChannelContentDetails +channelContentDetails = + ChannelContentDetails + { _ccdRelatedPlaylists = Nothing + , _ccdGooglePlusUserId = Nothing + } + +ccdRelatedPlaylists :: Lens' ChannelContentDetails (Maybe ChannelContentDetailsRelatedPlaylists) +ccdRelatedPlaylists + = lens _ccdRelatedPlaylists + (\ s a -> s{_ccdRelatedPlaylists = a}) + +-- | The googlePlusUserId object identifies the Google+ profile ID associated +-- with this channel. +ccdGooglePlusUserId :: Lens' ChannelContentDetails (Maybe Text) +ccdGooglePlusUserId + = lens _ccdGooglePlusUserId + (\ s a -> s{_ccdGooglePlusUserId = a}) + +instance FromJSON ChannelContentDetails where + parseJSON + = withObject "ChannelContentDetails" + (\ o -> + ChannelContentDetails <$> + (o .:? "relatedPlaylists") <*> + (o .:? "googlePlusUserId")) + +instance ToJSON ChannelContentDetails where + toJSON ChannelContentDetails{..} + = object + (catMaybes + [("relatedPlaylists" .=) <$> _ccdRelatedPlaylists, + ("googlePlusUserId" .=) <$> _ccdGooglePlusUserId]) + +-- | Basic details about an activity, including title, description, +-- thumbnails, activity type and group. +-- +-- /See:/ 'activitySNIppet' smart constructor. +data ActivitySNIppet = ActivitySNIppet + { _asPublishedAt :: !(Maybe UTCTime) + , _asChannelTitle :: !(Maybe Text) + , _asChannelId :: !(Maybe Text) + , _asThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _asGroupId :: !(Maybe Text) + , _asTitle :: !(Maybe Text) + , _asType :: !(Maybe Text) + , _asDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivitySNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'asPublishedAt' +-- +-- * 'asChannelTitle' +-- +-- * 'asChannelId' +-- +-- * 'asThumbnails' +-- +-- * 'asGroupId' +-- +-- * 'asTitle' +-- +-- * 'asType' +-- +-- * 'asDescription' +activitySNIppet + :: ActivitySNIppet +activitySNIppet = + ActivitySNIppet + { _asPublishedAt = Nothing + , _asChannelTitle = Nothing + , _asChannelId = Nothing + , _asThumbnails = Nothing + , _asGroupId = Nothing + , _asTitle = Nothing + , _asType = Nothing + , _asDescription = Nothing + } + +-- | The date and time that the video was uploaded. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +asPublishedAt :: Lens' ActivitySNIppet (Maybe UTCTime) +asPublishedAt + = lens _asPublishedAt + (\ s a -> s{_asPublishedAt = a}) + +-- | Channel title for the channel responsible for this activity +asChannelTitle :: Lens' ActivitySNIppet (Maybe Text) +asChannelTitle + = lens _asChannelTitle + (\ s a -> s{_asChannelTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the channel associated +-- with the activity. +asChannelId :: Lens' ActivitySNIppet (Maybe Text) +asChannelId + = lens _asChannelId (\ s a -> s{_asChannelId = a}) + +-- | A map of thumbnail images associated with the resource that is primarily +-- associated with the activity. For each object in the map, the key is the +-- name of the thumbnail image, and the value is an object that contains +-- other information about the thumbnail. +asThumbnails :: Lens' ActivitySNIppet (Maybe (Maybe ThumbnailDetails)) +asThumbnails + = lens _asThumbnails (\ s a -> s{_asThumbnails = a}) + +-- | The group ID associated with the activity. A group ID identifies user +-- events that are associated with the same user and resource. For example, +-- if a user rates a video and marks the same video as a favorite, the +-- entries for those events would have the same group ID in the user\'s +-- activity feed. In your user interface, you can avoid repetition by +-- grouping events with the same groupId value. +asGroupId :: Lens' ActivitySNIppet (Maybe Text) +asGroupId + = lens _asGroupId (\ s a -> s{_asGroupId = a}) + +-- | The title of the resource primarily associated with the activity. +asTitle :: Lens' ActivitySNIppet (Maybe Text) +asTitle = lens _asTitle (\ s a -> s{_asTitle = a}) + +-- | The type of activity that the resource describes. +asType :: Lens' ActivitySNIppet (Maybe Text) +asType = lens _asType (\ s a -> s{_asType = a}) + +-- | The description of the resource primarily associated with the activity. +asDescription :: Lens' ActivitySNIppet (Maybe Text) +asDescription + = lens _asDescription + (\ s a -> s{_asDescription = a}) + +instance FromJSON ActivitySNIppet where + parseJSON + = withObject "ActivitySNIppet" + (\ o -> + ActivitySNIppet <$> + (o .:? "publishedAt") <*> (o .:? "channelTitle") <*> + (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "groupId") + <*> (o .:? "title") + <*> (o .:? "type") + <*> (o .:? "description")) + +instance ToJSON ActivitySNIppet where + toJSON ActivitySNIppet{..} + = object + (catMaybes + [("publishedAt" .=) <$> _asPublishedAt, + ("channelTitle" .=) <$> _asChannelTitle, + ("channelId" .=) <$> _asChannelId, + ("thumbnails" .=) <$> _asThumbnails, + ("groupId" .=) <$> _asGroupId, + ("title" .=) <$> _asTitle, ("type" .=) <$> _asType, + ("description" .=) <$> _asDescription]) + +-- +-- /See:/ 'videoListResponse' smart constructor. +data VideoListResponse = VideoListResponse + { _vlrEtag :: !(Maybe Text) + , _vlrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _vlrNextPageToken :: !(Maybe Text) + , _vlrPageInfo :: !(Maybe (Maybe PageInfo)) + , _vlrKind :: !Text + , _vlrItems :: !(Maybe [Maybe Video]) + , _vlrVisitorId :: !(Maybe Text) + , _vlrEventId :: !(Maybe Text) + , _vlrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vlrEtag' +-- +-- * 'vlrTokenPagination' +-- +-- * 'vlrNextPageToken' +-- +-- * 'vlrPageInfo' +-- +-- * 'vlrKind' +-- +-- * 'vlrItems' +-- +-- * 'vlrVisitorId' +-- +-- * 'vlrEventId' +-- +-- * 'vlrPrevPageToken' +videoListResponse + :: VideoListResponse +videoListResponse = + VideoListResponse + { _vlrEtag = Nothing + , _vlrTokenPagination = Nothing + , _vlrNextPageToken = Nothing + , _vlrPageInfo = Nothing + , _vlrKind = "youtube#videoListResponse" + , _vlrItems = Nothing + , _vlrVisitorId = Nothing + , _vlrEventId = Nothing + , _vlrPrevPageToken = Nothing + } + +-- | Etag of this resource. +vlrEtag :: Lens' VideoListResponse (Maybe Text) +vlrEtag = lens _vlrEtag (\ s a -> s{_vlrEtag = a}) + +vlrTokenPagination :: Lens' VideoListResponse (Maybe (Maybe TokenPagination)) +vlrTokenPagination + = lens _vlrTokenPagination + (\ s a -> s{_vlrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +vlrNextPageToken :: Lens' VideoListResponse (Maybe Text) +vlrNextPageToken + = lens _vlrNextPageToken + (\ s a -> s{_vlrNextPageToken = a}) + +vlrPageInfo :: Lens' VideoListResponse (Maybe (Maybe PageInfo)) +vlrPageInfo + = lens _vlrPageInfo (\ s a -> s{_vlrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoListResponse\". +vlrKind :: Lens' VideoListResponse Text +vlrKind = lens _vlrKind (\ s a -> s{_vlrKind = a}) + +-- | A list of videos that match the request criteria. +vlrItems :: Lens' VideoListResponse [Maybe Video] +vlrItems + = lens _vlrItems (\ s a -> s{_vlrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +vlrVisitorId :: Lens' VideoListResponse (Maybe Text) +vlrVisitorId + = lens _vlrVisitorId (\ s a -> s{_vlrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +vlrEventId :: Lens' VideoListResponse (Maybe Text) +vlrEventId + = lens _vlrEventId (\ s a -> s{_vlrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +vlrPrevPageToken :: Lens' VideoListResponse (Maybe Text) +vlrPrevPageToken + = lens _vlrPrevPageToken + (\ s a -> s{_vlrPrevPageToken = a}) + +instance FromJSON VideoListResponse where + parseJSON + = withObject "VideoListResponse" + (\ o -> + VideoListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#videoListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON VideoListResponse where + toJSON VideoListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _vlrEtag, + ("tokenPagination" .=) <$> _vlrTokenPagination, + ("nextPageToken" .=) <$> _vlrNextPageToken, + ("pageInfo" .=) <$> _vlrPageInfo, + Just ("kind" .= _vlrKind), + ("items" .=) <$> _vlrItems, + ("visitorId" .=) <$> _vlrVisitorId, + ("eventId" .=) <$> _vlrEventId, + ("prevPageToken" .=) <$> _vlrPrevPageToken]) + +-- | A single tag suggestion with it\'s relevance information. +-- +-- /See:/ 'videoSuggestionsTagSuggestion' smart constructor. +data VideoSuggestionsTagSuggestion = VideoSuggestionsTagSuggestion + { _vstsTag :: !(Maybe Text) + , _vstsCategoryRestricts :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoSuggestionsTagSuggestion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vstsTag' +-- +-- * 'vstsCategoryRestricts' +videoSuggestionsTagSuggestion + :: VideoSuggestionsTagSuggestion +videoSuggestionsTagSuggestion = + VideoSuggestionsTagSuggestion + { _vstsTag = Nothing + , _vstsCategoryRestricts = Nothing + } + +-- | The keyword tag suggested for the video. +vstsTag :: Lens' VideoSuggestionsTagSuggestion (Maybe Text) +vstsTag = lens _vstsTag (\ s a -> s{_vstsTag = a}) + +-- | A set of video categories for which the tag is relevant. You can use +-- this information to display appropriate tag suggestions based on the +-- video category that the video uploader associates with the video. By +-- default, tag suggestions are relevant for all categories if there are no +-- restricts defined for the keyword. +vstsCategoryRestricts :: Lens' VideoSuggestionsTagSuggestion [Text] +vstsCategoryRestricts + = lens _vstsCategoryRestricts + (\ s a -> s{_vstsCategoryRestricts = a}) + . _Default + . _Coerce + +instance FromJSON VideoSuggestionsTagSuggestion where + parseJSON + = withObject "VideoSuggestionsTagSuggestion" + (\ o -> + VideoSuggestionsTagSuggestion <$> + (o .:? "tag") <*> + (o .:? "categoryRestricts" .!= mempty)) + +instance ToJSON VideoSuggestionsTagSuggestion where + toJSON VideoSuggestionsTagSuggestion{..} + = object + (catMaybes + [("tag" .=) <$> _vstsTag, + ("categoryRestricts" .=) <$> _vstsCategoryRestricts]) + +-- | Basic details about a comment thread. +-- +-- /See:/ 'commentThreadSNIppet' smart constructor. +data CommentThreadSNIppet = CommentThreadSNIppet + { _ctsIsPublic :: !(Maybe Bool) + , _ctsChannelId :: !(Maybe Text) + , _ctsCanReply :: !(Maybe Bool) + , _ctsVideoId :: !(Maybe Text) + , _ctsTotalReplyCount :: !(Maybe Word32) + , _ctsTopLevelComment :: !(Maybe (Maybe Comment)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctsIsPublic' +-- +-- * 'ctsChannelId' +-- +-- * 'ctsCanReply' +-- +-- * 'ctsVideoId' +-- +-- * 'ctsTotalReplyCount' +-- +-- * 'ctsTopLevelComment' +commentThreadSNIppet + :: CommentThreadSNIppet +commentThreadSNIppet = + CommentThreadSNIppet + { _ctsIsPublic = Nothing + , _ctsChannelId = Nothing + , _ctsCanReply = Nothing + , _ctsVideoId = Nothing + , _ctsTotalReplyCount = Nothing + , _ctsTopLevelComment = Nothing + } + +-- | Whether the thread (and therefore all its comments) is visible to all +-- YouTube users. +ctsIsPublic :: Lens' CommentThreadSNIppet (Maybe Bool) +ctsIsPublic + = lens _ctsIsPublic (\ s a -> s{_ctsIsPublic = a}) + +-- | The YouTube channel the comments in the thread refer to or the channel +-- with the video the comments refer to. If video_id isn\'t set the +-- comments refer to the channel itself. +ctsChannelId :: Lens' CommentThreadSNIppet (Maybe Text) +ctsChannelId + = lens _ctsChannelId (\ s a -> s{_ctsChannelId = a}) + +-- | Whether the current viewer of the thread can reply to it. This is viewer +-- specific - other viewers may see a different value for this field. +ctsCanReply :: Lens' CommentThreadSNIppet (Maybe Bool) +ctsCanReply + = lens _ctsCanReply (\ s a -> s{_ctsCanReply = a}) + +-- | The ID of the video the comments refer to, if any. No video_id implies a +-- channel discussion comment. +ctsVideoId :: Lens' CommentThreadSNIppet (Maybe Text) +ctsVideoId + = lens _ctsVideoId (\ s a -> s{_ctsVideoId = a}) + +-- | The total number of replies (not including the top level comment). +ctsTotalReplyCount :: Lens' CommentThreadSNIppet (Maybe Word32) +ctsTotalReplyCount + = lens _ctsTotalReplyCount + (\ s a -> s{_ctsTotalReplyCount = a}) + +-- | The top level comment of this thread. +ctsTopLevelComment :: Lens' CommentThreadSNIppet (Maybe (Maybe Comment)) +ctsTopLevelComment + = lens _ctsTopLevelComment + (\ s a -> s{_ctsTopLevelComment = a}) + +instance FromJSON CommentThreadSNIppet where + parseJSON + = withObject "CommentThreadSNIppet" + (\ o -> + CommentThreadSNIppet <$> + (o .:? "isPublic") <*> (o .:? "channelId") <*> + (o .:? "canReply") + <*> (o .:? "videoId") + <*> (o .:? "totalReplyCount") + <*> (o .:? "topLevelComment")) + +instance ToJSON CommentThreadSNIppet where + toJSON CommentThreadSNIppet{..} + = object + (catMaybes + [("isPublic" .=) <$> _ctsIsPublic, + ("channelId" .=) <$> _ctsChannelId, + ("canReply" .=) <$> _ctsCanReply, + ("videoId" .=) <$> _ctsVideoId, + ("totalReplyCount" .=) <$> _ctsTotalReplyCount, + ("topLevelComment" .=) <$> _ctsTopLevelComment]) + +-- | Freebase topic information related to the channel. +-- +-- /See:/ 'channelTopicDetails' smart constructor. +newtype ChannelTopicDetails = ChannelTopicDetails + { _ctdTopicIds :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelTopicDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctdTopicIds' +channelTopicDetails + :: ChannelTopicDetails +channelTopicDetails = + ChannelTopicDetails + { _ctdTopicIds = Nothing + } + +-- | A list of Freebase topic IDs associated with the channel. You can +-- retrieve information about each topic using the Freebase Topic API. +ctdTopicIds :: Lens' ChannelTopicDetails [Text] +ctdTopicIds + = lens _ctdTopicIds (\ s a -> s{_ctdTopicIds = a}) . + _Default + . _Coerce + +instance FromJSON ChannelTopicDetails where + parseJSON + = withObject "ChannelTopicDetails" + (\ o -> + ChannelTopicDetails <$> + (o .:? "topicIds" .!= mempty)) + +instance ToJSON ChannelTopicDetails where + toJSON ChannelTopicDetails{..} + = object + (catMaybes [("topicIds" .=) <$> _ctdTopicIds]) + +-- +-- /See:/ 'videoCategoryListResponse' smart constructor. +data VideoCategoryListResponse = VideoCategoryListResponse + { _vclrEtag :: !(Maybe Text) + , _vclrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _vclrNextPageToken :: !(Maybe Text) + , _vclrPageInfo :: !(Maybe (Maybe PageInfo)) + , _vclrKind :: !Text + , _vclrItems :: !(Maybe [Maybe VideoCategory]) + , _vclrVisitorId :: !(Maybe Text) + , _vclrEventId :: !(Maybe Text) + , _vclrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoCategoryListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vclrEtag' +-- +-- * 'vclrTokenPagination' +-- +-- * 'vclrNextPageToken' +-- +-- * 'vclrPageInfo' +-- +-- * 'vclrKind' +-- +-- * 'vclrItems' +-- +-- * 'vclrVisitorId' +-- +-- * 'vclrEventId' +-- +-- * 'vclrPrevPageToken' +videoCategoryListResponse + :: VideoCategoryListResponse +videoCategoryListResponse = + VideoCategoryListResponse + { _vclrEtag = Nothing + , _vclrTokenPagination = Nothing + , _vclrNextPageToken = Nothing + , _vclrPageInfo = Nothing + , _vclrKind = "youtube#videoCategoryListResponse" + , _vclrItems = Nothing + , _vclrVisitorId = Nothing + , _vclrEventId = Nothing + , _vclrPrevPageToken = Nothing + } + +-- | Etag of this resource. +vclrEtag :: Lens' VideoCategoryListResponse (Maybe Text) +vclrEtag = lens _vclrEtag (\ s a -> s{_vclrEtag = a}) + +vclrTokenPagination :: Lens' VideoCategoryListResponse (Maybe (Maybe TokenPagination)) +vclrTokenPagination + = lens _vclrTokenPagination + (\ s a -> s{_vclrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +vclrNextPageToken :: Lens' VideoCategoryListResponse (Maybe Text) +vclrNextPageToken + = lens _vclrNextPageToken + (\ s a -> s{_vclrNextPageToken = a}) + +vclrPageInfo :: Lens' VideoCategoryListResponse (Maybe (Maybe PageInfo)) +vclrPageInfo + = lens _vclrPageInfo (\ s a -> s{_vclrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoCategoryListResponse\". +vclrKind :: Lens' VideoCategoryListResponse Text +vclrKind = lens _vclrKind (\ s a -> s{_vclrKind = a}) + +-- | A list of video categories that can be associated with YouTube videos. +-- In this map, the video category ID is the map key, and its value is the +-- corresponding videoCategory resource. +vclrItems :: Lens' VideoCategoryListResponse [Maybe VideoCategory] +vclrItems + = lens _vclrItems (\ s a -> s{_vclrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +vclrVisitorId :: Lens' VideoCategoryListResponse (Maybe Text) +vclrVisitorId + = lens _vclrVisitorId + (\ s a -> s{_vclrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +vclrEventId :: Lens' VideoCategoryListResponse (Maybe Text) +vclrEventId + = lens _vclrEventId (\ s a -> s{_vclrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +vclrPrevPageToken :: Lens' VideoCategoryListResponse (Maybe Text) +vclrPrevPageToken + = lens _vclrPrevPageToken + (\ s a -> s{_vclrPrevPageToken = a}) + +instance FromJSON VideoCategoryListResponse where + parseJSON + = withObject "VideoCategoryListResponse" + (\ o -> + VideoCategoryListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= + "youtube#videoCategoryListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON VideoCategoryListResponse where + toJSON VideoCategoryListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _vclrEtag, + ("tokenPagination" .=) <$> _vclrTokenPagination, + ("nextPageToken" .=) <$> _vclrNextPageToken, + ("pageInfo" .=) <$> _vclrPageInfo, + Just ("kind" .= _vclrKind), + ("items" .=) <$> _vclrItems, + ("visitorId" .=) <$> _vclrVisitorId, + ("eventId" .=) <$> _vclrEventId, + ("prevPageToken" .=) <$> _vclrPrevPageToken]) + +-- | Details about monetization of a YouTube Video. +-- +-- /See:/ 'videoMonetizationDetails' smart constructor. +newtype VideoMonetizationDetails = VideoMonetizationDetails + { _vmdAccess :: Maybe (Maybe AccessPolicy) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoMonetizationDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vmdAccess' +videoMonetizationDetails + :: VideoMonetizationDetails +videoMonetizationDetails = + VideoMonetizationDetails + { _vmdAccess = Nothing + } + +-- | The value of access indicates whether the video can be monetized or not. +vmdAccess :: Lens' VideoMonetizationDetails (Maybe (Maybe AccessPolicy)) +vmdAccess + = lens _vmdAccess (\ s a -> s{_vmdAccess = a}) + +instance FromJSON VideoMonetizationDetails where + parseJSON + = withObject "VideoMonetizationDetails" + (\ o -> + VideoMonetizationDetails <$> (o .:? "access")) + +instance ToJSON VideoMonetizationDetails where + toJSON VideoMonetizationDetails{..} + = object (catMaybes [("access" .=) <$> _vmdAccess]) + +-- +-- /See:/ 'liveStreamConfigurationIssue' smart constructor. +data LiveStreamConfigurationIssue = LiveStreamConfigurationIssue + { _lsciSeverity :: !(Maybe Text) + , _lsciReason :: !(Maybe Text) + , _lsciType :: !(Maybe Text) + , _lsciDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamConfigurationIssue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsciSeverity' +-- +-- * 'lsciReason' +-- +-- * 'lsciType' +-- +-- * 'lsciDescription' +liveStreamConfigurationIssue + :: LiveStreamConfigurationIssue +liveStreamConfigurationIssue = + LiveStreamConfigurationIssue + { _lsciSeverity = Nothing + , _lsciReason = Nothing + , _lsciType = Nothing + , _lsciDescription = Nothing + } + +-- | How severe this issue is to the stream. +lsciSeverity :: Lens' LiveStreamConfigurationIssue (Maybe Text) +lsciSeverity + = lens _lsciSeverity (\ s a -> s{_lsciSeverity = a}) + +-- | The short-form reason for this issue. +lsciReason :: Lens' LiveStreamConfigurationIssue (Maybe Text) +lsciReason + = lens _lsciReason (\ s a -> s{_lsciReason = a}) + +-- | The kind of error happening. +lsciType :: Lens' LiveStreamConfigurationIssue (Maybe Text) +lsciType = lens _lsciType (\ s a -> s{_lsciType = a}) + +-- | The long-form description of the issue and how to resolve it. +lsciDescription :: Lens' LiveStreamConfigurationIssue (Maybe Text) +lsciDescription + = lens _lsciDescription + (\ s a -> s{_lsciDescription = a}) + +instance FromJSON LiveStreamConfigurationIssue where + parseJSON + = withObject "LiveStreamConfigurationIssue" + (\ o -> + LiveStreamConfigurationIssue <$> + (o .:? "severity") <*> (o .:? "reason") <*> + (o .:? "type") + <*> (o .:? "description")) + +instance ToJSON LiveStreamConfigurationIssue where + toJSON LiveStreamConfigurationIssue{..} + = object + (catMaybes + [("severity" .=) <$> _lsciSeverity, + ("reason" .=) <$> _lsciReason, + ("type" .=) <$> _lsciType, + ("description" .=) <$> _lsciDescription]) + +-- | A videoAbuseReportReason resource identifies a reason that a video could +-- be reported as abusive. Video abuse report reasons are used with +-- video.ReportAbuse. +-- +-- /See:/ 'videoAbuseReportReason' smart constructor. +data VideoAbuseReportReason = VideoAbuseReportReason + { _varrEtag :: !(Maybe Text) + , _varrSnippet :: !(Maybe (Maybe VideoAbuseReportReasonSNIppet)) + , _varrKind :: !Text + , _varrId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReportReason' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varrEtag' +-- +-- * 'varrSnippet' +-- +-- * 'varrKind' +-- +-- * 'varrId' +videoAbuseReportReason + :: VideoAbuseReportReason +videoAbuseReportReason = + VideoAbuseReportReason + { _varrEtag = Nothing + , _varrSnippet = Nothing + , _varrKind = "youtube#videoAbuseReportReason" + , _varrId = Nothing + } + +-- | Etag of this resource. +varrEtag :: Lens' VideoAbuseReportReason (Maybe Text) +varrEtag = lens _varrEtag (\ s a -> s{_varrEtag = a}) + +-- | The snippet object contains basic details about the abuse report reason. +varrSnippet :: Lens' VideoAbuseReportReason (Maybe (Maybe VideoAbuseReportReasonSNIppet)) +varrSnippet + = lens _varrSnippet (\ s a -> s{_varrSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoAbuseReportReason\". +varrKind :: Lens' VideoAbuseReportReason Text +varrKind = lens _varrKind (\ s a -> s{_varrKind = a}) + +-- | The ID of this abuse report reason. +varrId :: Lens' VideoAbuseReportReason (Maybe Text) +varrId = lens _varrId (\ s a -> s{_varrId = a}) + +instance FromJSON VideoAbuseReportReason where + parseJSON + = withObject "VideoAbuseReportReason" + (\ o -> + VideoAbuseReportReason <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#videoAbuseReportReason") + <*> (o .:? "id")) + +instance ToJSON VideoAbuseReportReason where + toJSON VideoAbuseReportReason{..} + = object + (catMaybes + [("etag" .=) <$> _varrEtag, + ("snippet" .=) <$> _varrSnippet, + Just ("kind" .= _varrKind), ("id" .=) <$> _varrId]) + +-- | ChannelSection targeting setting. +-- +-- /See:/ 'channelSectionTargeting' smart constructor. +data ChannelSectionTargeting = ChannelSectionTargeting + { _cstRegions :: !(Maybe [Text]) + , _cstCountries :: !(Maybe [Text]) + , _cstLanguages :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionTargeting' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cstRegions' +-- +-- * 'cstCountries' +-- +-- * 'cstLanguages' +channelSectionTargeting + :: ChannelSectionTargeting +channelSectionTargeting = + ChannelSectionTargeting + { _cstRegions = Nothing + , _cstCountries = Nothing + , _cstLanguages = Nothing + } + +-- | The region the channel section is targeting. +cstRegions :: Lens' ChannelSectionTargeting [Text] +cstRegions + = lens _cstRegions (\ s a -> s{_cstRegions = a}) . + _Default + . _Coerce + +-- | The country the channel section is targeting. +cstCountries :: Lens' ChannelSectionTargeting [Text] +cstCountries + = lens _cstCountries (\ s a -> s{_cstCountries = a}) + . _Default + . _Coerce + +-- | The language the channel section is targeting. +cstLanguages :: Lens' ChannelSectionTargeting [Text] +cstLanguages + = lens _cstLanguages (\ s a -> s{_cstLanguages = a}) + . _Default + . _Coerce + +instance FromJSON ChannelSectionTargeting where + parseJSON + = withObject "ChannelSectionTargeting" + (\ o -> + ChannelSectionTargeting <$> + (o .:? "regions" .!= mempty) <*> + (o .:? "countries" .!= mempty) + <*> (o .:? "languages" .!= mempty)) + +instance ToJSON ChannelSectionTargeting where + toJSON ChannelSectionTargeting{..} + = object + (catMaybes + [("regions" .=) <$> _cstRegions, + ("countries" .=) <$> _cstCountries, + ("languages" .=) <$> _cstLanguages]) + +-- +-- /See:/ 'channelSectionListResponse' smart constructor. +data ChannelSectionListResponse = ChannelSectionListResponse + { _cslrEtag :: !(Maybe Text) + , _cslrKind :: !Text + , _cslrItems :: !(Maybe [Maybe ChannelSection]) + , _cslrVisitorId :: !(Maybe Text) + , _cslrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cslrEtag' +-- +-- * 'cslrKind' +-- +-- * 'cslrItems' +-- +-- * 'cslrVisitorId' +-- +-- * 'cslrEventId' +channelSectionListResponse + :: ChannelSectionListResponse +channelSectionListResponse = + ChannelSectionListResponse + { _cslrEtag = Nothing + , _cslrKind = "youtube#channelSectionListResponse" + , _cslrItems = Nothing + , _cslrVisitorId = Nothing + , _cslrEventId = Nothing + } + +-- | Etag of this resource. +cslrEtag :: Lens' ChannelSectionListResponse (Maybe Text) +cslrEtag = lens _cslrEtag (\ s a -> s{_cslrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#channelSectionListResponse\". +cslrKind :: Lens' ChannelSectionListResponse Text +cslrKind = lens _cslrKind (\ s a -> s{_cslrKind = a}) + +-- | A list of ChannelSections that match the request criteria. +cslrItems :: Lens' ChannelSectionListResponse [Maybe ChannelSection] +cslrItems + = lens _cslrItems (\ s a -> s{_cslrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +cslrVisitorId :: Lens' ChannelSectionListResponse (Maybe Text) +cslrVisitorId + = lens _cslrVisitorId + (\ s a -> s{_cslrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +cslrEventId :: Lens' ChannelSectionListResponse (Maybe Text) +cslrEventId + = lens _cslrEventId (\ s a -> s{_cslrEventId = a}) + +instance FromJSON ChannelSectionListResponse where + parseJSON + = withObject "ChannelSectionListResponse" + (\ o -> + ChannelSectionListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= + "youtube#channelSectionListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON ChannelSectionListResponse where + toJSON ChannelSectionListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _cslrEtag, + Just ("kind" .= _cslrKind), + ("items" .=) <$> _cslrItems, + ("visitorId" .=) <$> _cslrVisitorId, + ("eventId" .=) <$> _cslrEventId]) + +-- | Basic details about a playlist, including title, description and +-- thumbnails. +-- +-- /See:/ 'playlistSNIppet' smart constructor. +data PlaylistSNIppet = PlaylistSNIppet + { _psPublishedAt :: !(Maybe UTCTime) + , _psChannelTitle :: !(Maybe Text) + , _psChannelId :: !(Maybe Text) + , _psThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _psLocalized :: !(Maybe (Maybe PlaylistLocalization)) + , _psTitle :: !(Maybe Text) + , _psDescription :: !(Maybe Text) + , _psTags :: !(Maybe [Text]) + , _psDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psPublishedAt' +-- +-- * 'psChannelTitle' +-- +-- * 'psChannelId' +-- +-- * 'psThumbnails' +-- +-- * 'psLocalized' +-- +-- * 'psTitle' +-- +-- * 'psDescription' +-- +-- * 'psTags' +-- +-- * 'psDefaultLanguage' +playlistSNIppet + :: PlaylistSNIppet +playlistSNIppet = + PlaylistSNIppet + { _psPublishedAt = Nothing + , _psChannelTitle = Nothing + , _psChannelId = Nothing + , _psThumbnails = Nothing + , _psLocalized = Nothing + , _psTitle = Nothing + , _psDescription = Nothing + , _psTags = Nothing + , _psDefaultLanguage = Nothing + } + +-- | The date and time that the playlist was created. The value is specified +-- in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +psPublishedAt :: Lens' PlaylistSNIppet (Maybe UTCTime) +psPublishedAt + = lens _psPublishedAt + (\ s a -> s{_psPublishedAt = a}) + +-- | The channel title of the channel that the video belongs to. +psChannelTitle :: Lens' PlaylistSNIppet (Maybe Text) +psChannelTitle + = lens _psChannelTitle + (\ s a -> s{_psChannelTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the channel that published +-- the playlist. +psChannelId :: Lens' PlaylistSNIppet (Maybe Text) +psChannelId + = lens _psChannelId (\ s a -> s{_psChannelId = a}) + +-- | A map of thumbnail images associated with the playlist. For each object +-- in the map, the key is the name of the thumbnail image, and the value is +-- an object that contains other information about the thumbnail. +psThumbnails :: Lens' PlaylistSNIppet (Maybe (Maybe ThumbnailDetails)) +psThumbnails + = lens _psThumbnails (\ s a -> s{_psThumbnails = a}) + +-- | Localized title and description, read-only. +psLocalized :: Lens' PlaylistSNIppet (Maybe (Maybe PlaylistLocalization)) +psLocalized + = lens _psLocalized (\ s a -> s{_psLocalized = a}) + +-- | The playlist\'s title. +psTitle :: Lens' PlaylistSNIppet (Maybe Text) +psTitle = lens _psTitle (\ s a -> s{_psTitle = a}) + +-- | The playlist\'s description. +psDescription :: Lens' PlaylistSNIppet (Maybe Text) +psDescription + = lens _psDescription + (\ s a -> s{_psDescription = a}) + +-- | Keyword tags associated with the playlist. +psTags :: Lens' PlaylistSNIppet [Text] +psTags + = lens _psTags (\ s a -> s{_psTags = a}) . _Default . + _Coerce + +-- | The language of the playlist\'s default title and description. +psDefaultLanguage :: Lens' PlaylistSNIppet (Maybe Text) +psDefaultLanguage + = lens _psDefaultLanguage + (\ s a -> s{_psDefaultLanguage = a}) + +instance FromJSON PlaylistSNIppet where + parseJSON + = withObject "PlaylistSNIppet" + (\ o -> + PlaylistSNIppet <$> + (o .:? "publishedAt") <*> (o .:? "channelTitle") <*> + (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "localized") + <*> (o .:? "title") + <*> (o .:? "description") + <*> (o .:? "tags" .!= mempty) + <*> (o .:? "defaultLanguage")) + +instance ToJSON PlaylistSNIppet where + toJSON PlaylistSNIppet{..} + = object + (catMaybes + [("publishedAt" .=) <$> _psPublishedAt, + ("channelTitle" .=) <$> _psChannelTitle, + ("channelId" .=) <$> _psChannelId, + ("thumbnails" .=) <$> _psThumbnails, + ("localized" .=) <$> _psLocalized, + ("title" .=) <$> _psTitle, + ("description" .=) <$> _psDescription, + ("tags" .=) <$> _psTags, + ("defaultLanguage" .=) <$> _psDefaultLanguage]) + +-- | A channel resource contains information about a YouTube channel. +-- +-- /See:/ 'channel' smart constructor. +data Channel = Channel + { _cStatus :: !(Maybe (Maybe ChannelStatus)) + , _cEtag :: !(Maybe Text) + , _cAuditDetails :: !(Maybe (Maybe ChannelAuditDetails)) + , _cContentOwnerDetails :: !(Maybe (Maybe ChannelContentOwnerDetails)) + , _cSnippet :: !(Maybe (Maybe ChannelSNIppet)) + , _cKind :: !Text + , _cTopicDetails :: !(Maybe (Maybe ChannelTopicDetails)) + , _cContentDetails :: !(Maybe (Maybe ChannelContentDetails)) + , _cConversionPings :: !(Maybe (Maybe ChannelConversionPings)) + , _cBrandingSettings :: !(Maybe (Maybe ChannelBrandingSettings)) + , _cId :: !(Maybe Text) + , _cInvideoPromotion :: !(Maybe (Maybe InvideoPromotion)) + , _cStatistics :: !(Maybe (Maybe ChannelStatistics)) + , _cLocalizations :: !(Maybe ChannelLocalizations) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Channel' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cStatus' +-- +-- * 'cEtag' +-- +-- * 'cAuditDetails' +-- +-- * 'cContentOwnerDetails' +-- +-- * 'cSnippet' +-- +-- * 'cKind' +-- +-- * 'cTopicDetails' +-- +-- * 'cContentDetails' +-- +-- * 'cConversionPings' +-- +-- * 'cBrandingSettings' +-- +-- * 'cId' +-- +-- * 'cInvideoPromotion' +-- +-- * 'cStatistics' +-- +-- * 'cLocalizations' +channel + :: Channel +channel = + Channel + { _cStatus = Nothing + , _cEtag = Nothing + , _cAuditDetails = Nothing + , _cContentOwnerDetails = Nothing + , _cSnippet = Nothing + , _cKind = "youtube#channel" + , _cTopicDetails = Nothing + , _cContentDetails = Nothing + , _cConversionPings = Nothing + , _cBrandingSettings = Nothing + , _cId = Nothing + , _cInvideoPromotion = Nothing + , _cStatistics = Nothing + , _cLocalizations = Nothing + } + +-- | The status object encapsulates information about the privacy status of +-- the channel. +cStatus :: Lens' Channel (Maybe (Maybe ChannelStatus)) +cStatus = lens _cStatus (\ s a -> s{_cStatus = a}) + +-- | Etag of this resource. +cEtag :: Lens' Channel (Maybe Text) +cEtag = lens _cEtag (\ s a -> s{_cEtag = a}) + +-- | The auditionDetails object encapsulates channel data that is relevant +-- for YouTube Partners during the audition process. +cAuditDetails :: Lens' Channel (Maybe (Maybe ChannelAuditDetails)) +cAuditDetails + = lens _cAuditDetails + (\ s a -> s{_cAuditDetails = a}) + +-- | The contentOwnerDetails object encapsulates channel data that is +-- relevant for YouTube Partners linked with the channel. +cContentOwnerDetails :: Lens' Channel (Maybe (Maybe ChannelContentOwnerDetails)) +cContentOwnerDetails + = lens _cContentOwnerDetails + (\ s a -> s{_cContentOwnerDetails = a}) + +-- | The snippet object contains basic details about the channel, such as its +-- title, description, and thumbnail images. +cSnippet :: Lens' Channel (Maybe (Maybe ChannelSNIppet)) +cSnippet = lens _cSnippet (\ s a -> s{_cSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#channel\". +cKind :: Lens' Channel Text +cKind = lens _cKind (\ s a -> s{_cKind = a}) + +-- | The topicDetails object encapsulates information about Freebase topics +-- associated with the channel. +cTopicDetails :: Lens' Channel (Maybe (Maybe ChannelTopicDetails)) +cTopicDetails + = lens _cTopicDetails + (\ s a -> s{_cTopicDetails = a}) + +-- | The contentDetails object encapsulates information about the channel\'s +-- content. +cContentDetails :: Lens' Channel (Maybe (Maybe ChannelContentDetails)) +cContentDetails + = lens _cContentDetails + (\ s a -> s{_cContentDetails = a}) + +-- | The conversionPings object encapsulates information about conversion +-- pings that need to be respected by the channel. +cConversionPings :: Lens' Channel (Maybe (Maybe ChannelConversionPings)) +cConversionPings + = lens _cConversionPings + (\ s a -> s{_cConversionPings = a}) + +-- | The brandingSettings object encapsulates information about the branding +-- of the channel. +cBrandingSettings :: Lens' Channel (Maybe (Maybe ChannelBrandingSettings)) +cBrandingSettings + = lens _cBrandingSettings + (\ s a -> s{_cBrandingSettings = a}) + +-- | The ID that YouTube uses to uniquely identify the channel. +cId :: Lens' Channel (Maybe Text) +cId = lens _cId (\ s a -> s{_cId = a}) + +-- | The invideoPromotion object encapsulates information about promotion +-- campaign associated with the channel. +cInvideoPromotion :: Lens' Channel (Maybe (Maybe InvideoPromotion)) +cInvideoPromotion + = lens _cInvideoPromotion + (\ s a -> s{_cInvideoPromotion = a}) + +-- | The statistics object encapsulates statistics for the channel. +cStatistics :: Lens' Channel (Maybe (Maybe ChannelStatistics)) +cStatistics + = lens _cStatistics (\ s a -> s{_cStatistics = a}) + +-- | Localizations for different languages +cLocalizations :: Lens' Channel (Maybe ChannelLocalizations) +cLocalizations + = lens _cLocalizations + (\ s a -> s{_cLocalizations = a}) + +instance FromJSON Channel where + parseJSON + = withObject "Channel" + (\ o -> + Channel <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "auditDetails") + <*> (o .:? "contentOwnerDetails") + <*> (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#channel") + <*> (o .:? "topicDetails") + <*> (o .:? "contentDetails") + <*> (o .:? "conversionPings") + <*> (o .:? "brandingSettings") + <*> (o .:? "id") + <*> (o .:? "invideoPromotion") + <*> (o .:? "statistics") + <*> (o .:? "localizations")) + +instance ToJSON Channel where + toJSON Channel{..} + = object + (catMaybes + [("status" .=) <$> _cStatus, ("etag" .=) <$> _cEtag, + ("auditDetails" .=) <$> _cAuditDetails, + ("contentOwnerDetails" .=) <$> _cContentOwnerDetails, + ("snippet" .=) <$> _cSnippet, + Just ("kind" .= _cKind), + ("topicDetails" .=) <$> _cTopicDetails, + ("contentDetails" .=) <$> _cContentDetails, + ("conversionPings" .=) <$> _cConversionPings, + ("brandingSettings" .=) <$> _cBrandingSettings, + ("id" .=) <$> _cId, + ("invideoPromotion" .=) <$> _cInvideoPromotion, + ("statistics" .=) <$> _cStatistics, + ("localizations" .=) <$> _cLocalizations]) + +-- +-- /See:/ 'videoGetRatingResponse' smart constructor. +data VideoGetRatingResponse = VideoGetRatingResponse + { _vgrrEtag :: !(Maybe Text) + , _vgrrKind :: !Text + , _vgrrItems :: !(Maybe [Maybe VideoRating]) + , _vgrrVisitorId :: !(Maybe Text) + , _vgrrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoGetRatingResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vgrrEtag' +-- +-- * 'vgrrKind' +-- +-- * 'vgrrItems' +-- +-- * 'vgrrVisitorId' +-- +-- * 'vgrrEventId' +videoGetRatingResponse + :: VideoGetRatingResponse +videoGetRatingResponse = + VideoGetRatingResponse + { _vgrrEtag = Nothing + , _vgrrKind = "youtube#videoGetRatingResponse" + , _vgrrItems = Nothing + , _vgrrVisitorId = Nothing + , _vgrrEventId = Nothing + } + +-- | Etag of this resource. +vgrrEtag :: Lens' VideoGetRatingResponse (Maybe Text) +vgrrEtag = lens _vgrrEtag (\ s a -> s{_vgrrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoGetRatingResponse\". +vgrrKind :: Lens' VideoGetRatingResponse Text +vgrrKind = lens _vgrrKind (\ s a -> s{_vgrrKind = a}) + +-- | A list of ratings that match the request criteria. +vgrrItems :: Lens' VideoGetRatingResponse [Maybe VideoRating] +vgrrItems + = lens _vgrrItems (\ s a -> s{_vgrrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +vgrrVisitorId :: Lens' VideoGetRatingResponse (Maybe Text) +vgrrVisitorId + = lens _vgrrVisitorId + (\ s a -> s{_vgrrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +vgrrEventId :: Lens' VideoGetRatingResponse (Maybe Text) +vgrrEventId + = lens _vgrrEventId (\ s a -> s{_vgrrEventId = a}) + +instance FromJSON VideoGetRatingResponse where + parseJSON + = withObject "VideoGetRatingResponse" + (\ o -> + VideoGetRatingResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#videoGetRatingResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON VideoGetRatingResponse where + toJSON VideoGetRatingResponse{..} + = object + (catMaybes + [("etag" .=) <$> _vgrrEtag, + Just ("kind" .= _vgrrKind), + ("items" .=) <$> _vgrrItems, + ("visitorId" .=) <$> _vgrrVisitorId, + ("eventId" .=) <$> _vgrrEventId]) + +-- +-- /See:/ 'liveStreamListResponse' smart constructor. +data LiveStreamListResponse = LiveStreamListResponse + { _lslrEtag :: !(Maybe Text) + , _lslrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _lslrNextPageToken :: !(Maybe Text) + , _lslrPageInfo :: !(Maybe (Maybe PageInfo)) + , _lslrKind :: !Text + , _lslrItems :: !(Maybe [Maybe LiveStream]) + , _lslrVisitorId :: !(Maybe Text) + , _lslrEventId :: !(Maybe Text) + , _lslrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lslrEtag' +-- +-- * 'lslrTokenPagination' +-- +-- * 'lslrNextPageToken' +-- +-- * 'lslrPageInfo' +-- +-- * 'lslrKind' +-- +-- * 'lslrItems' +-- +-- * 'lslrVisitorId' +-- +-- * 'lslrEventId' +-- +-- * 'lslrPrevPageToken' +liveStreamListResponse + :: LiveStreamListResponse +liveStreamListResponse = + LiveStreamListResponse + { _lslrEtag = Nothing + , _lslrTokenPagination = Nothing + , _lslrNextPageToken = Nothing + , _lslrPageInfo = Nothing + , _lslrKind = "youtube#liveStreamListResponse" + , _lslrItems = Nothing + , _lslrVisitorId = Nothing + , _lslrEventId = Nothing + , _lslrPrevPageToken = Nothing + } + +-- | Etag of this resource. +lslrEtag :: Lens' LiveStreamListResponse (Maybe Text) +lslrEtag = lens _lslrEtag (\ s a -> s{_lslrEtag = a}) + +lslrTokenPagination :: Lens' LiveStreamListResponse (Maybe (Maybe TokenPagination)) +lslrTokenPagination + = lens _lslrTokenPagination + (\ s a -> s{_lslrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +lslrNextPageToken :: Lens' LiveStreamListResponse (Maybe Text) +lslrNextPageToken + = lens _lslrNextPageToken + (\ s a -> s{_lslrNextPageToken = a}) + +lslrPageInfo :: Lens' LiveStreamListResponse (Maybe (Maybe PageInfo)) +lslrPageInfo + = lens _lslrPageInfo (\ s a -> s{_lslrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#liveStreamListResponse\". +lslrKind :: Lens' LiveStreamListResponse Text +lslrKind = lens _lslrKind (\ s a -> s{_lslrKind = a}) + +-- | A list of live streams that match the request criteria. +lslrItems :: Lens' LiveStreamListResponse [Maybe LiveStream] +lslrItems + = lens _lslrItems (\ s a -> s{_lslrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +lslrVisitorId :: Lens' LiveStreamListResponse (Maybe Text) +lslrVisitorId + = lens _lslrVisitorId + (\ s a -> s{_lslrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +lslrEventId :: Lens' LiveStreamListResponse (Maybe Text) +lslrEventId + = lens _lslrEventId (\ s a -> s{_lslrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +lslrPrevPageToken :: Lens' LiveStreamListResponse (Maybe Text) +lslrPrevPageToken + = lens _lslrPrevPageToken + (\ s a -> s{_lslrPrevPageToken = a}) + +instance FromJSON LiveStreamListResponse where + parseJSON + = withObject "LiveStreamListResponse" + (\ o -> + LiveStreamListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= "youtube#liveStreamListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON LiveStreamListResponse where + toJSON LiveStreamListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _lslrEtag, + ("tokenPagination" .=) <$> _lslrTokenPagination, + ("nextPageToken" .=) <$> _lslrNextPageToken, + ("pageInfo" .=) <$> _lslrPageInfo, + Just ("kind" .= _lslrKind), + ("items" .=) <$> _lslrItems, + ("visitorId" .=) <$> _lslrVisitorId, + ("eventId" .=) <$> _lslrEventId, + ("prevPageToken" .=) <$> _lslrPrevPageToken]) + +-- | A i18nRegion resource identifies a region where YouTube is available. +-- +-- /See:/ 'i18nRegion' smart constructor. +data I18nRegion = I18nRegion + { _irEtag :: !(Maybe Text) + , _irSnippet :: !(Maybe (Maybe I18nRegionSNIppet)) + , _irKind :: !Text + , _irId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nRegion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irEtag' +-- +-- * 'irSnippet' +-- +-- * 'irKind' +-- +-- * 'irId' +i18nRegion + :: I18nRegion +i18nRegion = + I18nRegion + { _irEtag = Nothing + , _irSnippet = Nothing + , _irKind = "youtube#i18nRegion" + , _irId = Nothing + } + +-- | Etag of this resource. +irEtag :: Lens' I18nRegion (Maybe Text) +irEtag = lens _irEtag (\ s a -> s{_irEtag = a}) + +-- | The snippet object contains basic details about the i18n region, such as +-- region code and human-readable name. +irSnippet :: Lens' I18nRegion (Maybe (Maybe I18nRegionSNIppet)) +irSnippet + = lens _irSnippet (\ s a -> s{_irSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#i18nRegion\". +irKind :: Lens' I18nRegion Text +irKind = lens _irKind (\ s a -> s{_irKind = a}) + +-- | The ID that YouTube uses to uniquely identify the i18n region. +irId :: Lens' I18nRegion (Maybe Text) +irId = lens _irId (\ s a -> s{_irId = a}) + +instance FromJSON I18nRegion where + parseJSON + = withObject "I18nRegion" + (\ o -> + I18nRegion <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#i18nRegion") + <*> (o .:? "id")) + +instance ToJSON I18nRegion where + toJSON I18nRegion{..} + = object + (catMaybes + [("etag" .=) <$> _irEtag, + ("snippet" .=) <$> _irSnippet, + Just ("kind" .= _irKind), ("id" .=) <$> _irId]) + +-- | Details about the content of an activity: the video that was shared, the +-- channel that was subscribed to, etc. +-- +-- /See:/ 'activityContentDetails' smart constructor. +data ActivityContentDetails = ActivityContentDetails + { _acdPromotedItem :: !(Maybe (Maybe ActivityContentDetailsPromotedItem)) + , _acdChannelItem :: !(Maybe (Maybe ActivityContentDetailsChannelItem)) + , _acdBulletin :: !(Maybe (Maybe ActivityContentDetailsBulletin)) + , _acdFavorite :: !(Maybe (Maybe ActivityContentDetailsFavorite)) + , _acdUpload :: !(Maybe (Maybe ActivityContentDetailsUpload)) + , _acdComment :: !(Maybe (Maybe ActivityContentDetailsComment)) + , _acdSocial :: !(Maybe (Maybe ActivityContentDetailsSocial)) + , _acdSubscription :: !(Maybe (Maybe ActivityContentDetailsSubscription)) + , _acdPlaylistItem :: !(Maybe (Maybe ActivityContentDetailsPlaylistItem)) + , _acdLike :: !(Maybe (Maybe ActivityContentDetailsLike)) + , _acdRecommendation :: !(Maybe (Maybe ActivityContentDetailsRecommendation)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdPromotedItem' +-- +-- * 'acdChannelItem' +-- +-- * 'acdBulletin' +-- +-- * 'acdFavorite' +-- +-- * 'acdUpload' +-- +-- * 'acdComment' +-- +-- * 'acdSocial' +-- +-- * 'acdSubscription' +-- +-- * 'acdPlaylistItem' +-- +-- * 'acdLike' +-- +-- * 'acdRecommendation' +activityContentDetails + :: ActivityContentDetails +activityContentDetails = + ActivityContentDetails + { _acdPromotedItem = Nothing + , _acdChannelItem = Nothing + , _acdBulletin = Nothing + , _acdFavorite = Nothing + , _acdUpload = Nothing + , _acdComment = Nothing + , _acdSocial = Nothing + , _acdSubscription = Nothing + , _acdPlaylistItem = Nothing + , _acdLike = Nothing + , _acdRecommendation = Nothing + } + +-- | The promotedItem object contains details about a resource which is being +-- promoted. This property is only present if the snippet.type is +-- promotedItem. +acdPromotedItem :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsPromotedItem)) +acdPromotedItem + = lens _acdPromotedItem + (\ s a -> s{_acdPromotedItem = a}) + +-- | The channelItem object contains details about a resource which was added +-- to a channel. This property is only present if the snippet.type is +-- channelItem. +acdChannelItem :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsChannelItem)) +acdChannelItem + = lens _acdChannelItem + (\ s a -> s{_acdChannelItem = a}) + +-- | The bulletin object contains details about a channel bulletin post. This +-- object is only present if the snippet.type is bulletin. +acdBulletin :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsBulletin)) +acdBulletin + = lens _acdBulletin (\ s a -> s{_acdBulletin = a}) + +-- | The favorite object contains information about a video that was marked +-- as a favorite video. This property is only present if the snippet.type +-- is favorite. +acdFavorite :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsFavorite)) +acdFavorite + = lens _acdFavorite (\ s a -> s{_acdFavorite = a}) + +-- | The upload object contains information about the uploaded video. This +-- property is only present if the snippet.type is upload. +acdUpload :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsUpload)) +acdUpload + = lens _acdUpload (\ s a -> s{_acdUpload = a}) + +-- | The comment object contains information about a resource that received a +-- comment. This property is only present if the snippet.type is comment. +acdComment :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsComment)) +acdComment + = lens _acdComment (\ s a -> s{_acdComment = a}) + +-- | The social object contains details about a social network post. This +-- property is only present if the snippet.type is social. +acdSocial :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsSocial)) +acdSocial + = lens _acdSocial (\ s a -> s{_acdSocial = a}) + +-- | The subscription object contains information about a channel that a user +-- subscribed to. This property is only present if the snippet.type is +-- subscription. +acdSubscription :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsSubscription)) +acdSubscription + = lens _acdSubscription + (\ s a -> s{_acdSubscription = a}) + +-- | The playlistItem object contains information about a new playlist item. +-- This property is only present if the snippet.type is playlistItem. +acdPlaylistItem :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsPlaylistItem)) +acdPlaylistItem + = lens _acdPlaylistItem + (\ s a -> s{_acdPlaylistItem = a}) + +-- | The like object contains information about a resource that received a +-- positive (like) rating. This property is only present if the +-- snippet.type is like. +acdLike :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsLike)) +acdLike = lens _acdLike (\ s a -> s{_acdLike = a}) + +-- | The recommendation object contains information about a recommended +-- resource. This property is only present if the snippet.type is +-- recommendation. +acdRecommendation :: Lens' ActivityContentDetails (Maybe (Maybe ActivityContentDetailsRecommendation)) +acdRecommendation + = lens _acdRecommendation + (\ s a -> s{_acdRecommendation = a}) + +instance FromJSON ActivityContentDetails where + parseJSON + = withObject "ActivityContentDetails" + (\ o -> + ActivityContentDetails <$> + (o .:? "promotedItem") <*> (o .:? "channelItem") <*> + (o .:? "bulletin") + <*> (o .:? "favorite") + <*> (o .:? "upload") + <*> (o .:? "comment") + <*> (o .:? "social") + <*> (o .:? "subscription") + <*> (o .:? "playlistItem") + <*> (o .:? "like") + <*> (o .:? "recommendation")) + +instance ToJSON ActivityContentDetails where + toJSON ActivityContentDetails{..} + = object + (catMaybes + [("promotedItem" .=) <$> _acdPromotedItem, + ("channelItem" .=) <$> _acdChannelItem, + ("bulletin" .=) <$> _acdBulletin, + ("favorite" .=) <$> _acdFavorite, + ("upload" .=) <$> _acdUpload, + ("comment" .=) <$> _acdComment, + ("social" .=) <$> _acdSocial, + ("subscription" .=) <$> _acdSubscription, + ("playlistItem" .=) <$> _acdPlaylistItem, + ("like" .=) <$> _acdLike, + ("recommendation" .=) <$> _acdRecommendation]) + +-- | Statistics about a channel: number of subscribers, number of videos in +-- the channel, etc. +-- +-- /See:/ 'channelStatistics' smart constructor. +data ChannelStatistics = ChannelStatistics + { _csCommentCount :: !(Maybe Word64) + , _csSubscriberCount :: !(Maybe Word64) + , _csVideoCount :: !(Maybe Word64) + , _csHiddenSubscriberCount :: !(Maybe Bool) + , _csViewCount :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelStatistics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csCommentCount' +-- +-- * 'csSubscriberCount' +-- +-- * 'csVideoCount' +-- +-- * 'csHiddenSubscriberCount' +-- +-- * 'csViewCount' +channelStatistics + :: ChannelStatistics +channelStatistics = + ChannelStatistics + { _csCommentCount = Nothing + , _csSubscriberCount = Nothing + , _csVideoCount = Nothing + , _csHiddenSubscriberCount = Nothing + , _csViewCount = Nothing + } + +-- | The number of comments for the channel. +csCommentCount :: Lens' ChannelStatistics (Maybe Word64) +csCommentCount + = lens _csCommentCount + (\ s a -> s{_csCommentCount = a}) + +-- | The number of subscribers that the channel has. +csSubscriberCount :: Lens' ChannelStatistics (Maybe Word64) +csSubscriberCount + = lens _csSubscriberCount + (\ s a -> s{_csSubscriberCount = a}) + +-- | The number of videos uploaded to the channel. +csVideoCount :: Lens' ChannelStatistics (Maybe Word64) +csVideoCount + = lens _csVideoCount (\ s a -> s{_csVideoCount = a}) + +-- | Whether or not the number of subscribers is shown for this user. +csHiddenSubscriberCount :: Lens' ChannelStatistics (Maybe Bool) +csHiddenSubscriberCount + = lens _csHiddenSubscriberCount + (\ s a -> s{_csHiddenSubscriberCount = a}) + +-- | The number of times the channel has been viewed. +csViewCount :: Lens' ChannelStatistics (Maybe Word64) +csViewCount + = lens _csViewCount (\ s a -> s{_csViewCount = a}) + +instance FromJSON ChannelStatistics where + parseJSON + = withObject "ChannelStatistics" + (\ o -> + ChannelStatistics <$> + (o .:? "commentCount") <*> (o .:? "subscriberCount") + <*> (o .:? "videoCount") + <*> (o .:? "hiddenSubscriberCount") + <*> (o .:? "viewCount")) + +instance ToJSON ChannelStatistics where + toJSON ChannelStatistics{..} + = object + (catMaybes + [("commentCount" .=) <$> _csCommentCount, + ("subscriberCount" .=) <$> _csSubscriberCount, + ("videoCount" .=) <$> _csVideoCount, + ("hiddenSubscriberCount" .=) <$> + _csHiddenSubscriberCount, + ("viewCount" .=) <$> _csViewCount]) + +-- +-- /See:/ 'channelId' smart constructor. +newtype ChannelId = ChannelId + { _ciValue :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ciValue' +channelId + :: ChannelId +channelId = + ChannelId + { _ciValue = Nothing + } + +ciValue :: Lens' ChannelId (Maybe Text) +ciValue = lens _ciValue (\ s a -> s{_ciValue = a}) + +instance FromJSON ChannelId where + parseJSON + = withObject "ChannelId" + (\ o -> ChannelId <$> (o .:? "value")) + +instance ToJSON ChannelId where + toJSON ChannelId{..} + = object (catMaybes [("value" .=) <$> _ciValue]) + +-- | Basic details about a video category, such as its localized title. +-- +-- /See:/ 'videoAbuseReportReasonSNIppet' smart constructor. +data VideoAbuseReportReasonSNIppet = VideoAbuseReportReasonSNIppet + { _varrsSecondaryReasons :: !(Maybe [Maybe VideoAbuseReportSecondaryReason]) + , _varrsLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReportReasonSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varrsSecondaryReasons' +-- +-- * 'varrsLabel' +videoAbuseReportReasonSNIppet + :: VideoAbuseReportReasonSNIppet +videoAbuseReportReasonSNIppet = + VideoAbuseReportReasonSNIppet + { _varrsSecondaryReasons = Nothing + , _varrsLabel = Nothing + } + +-- | The secondary reasons associated with this reason, if any are available. +-- (There might be 0 or more.) +varrsSecondaryReasons :: Lens' VideoAbuseReportReasonSNIppet [Maybe VideoAbuseReportSecondaryReason] +varrsSecondaryReasons + = lens _varrsSecondaryReasons + (\ s a -> s{_varrsSecondaryReasons = a}) + . _Default + . _Coerce + +-- | The localized label belonging to this abuse report reason. +varrsLabel :: Lens' VideoAbuseReportReasonSNIppet (Maybe Text) +varrsLabel + = lens _varrsLabel (\ s a -> s{_varrsLabel = a}) + +instance FromJSON VideoAbuseReportReasonSNIppet where + parseJSON + = withObject "VideoAbuseReportReasonSNIppet" + (\ o -> + VideoAbuseReportReasonSNIppet <$> + (o .:? "secondaryReasons" .!= mempty) <*> + (o .:? "label")) + +instance ToJSON VideoAbuseReportReasonSNIppet where + toJSON VideoAbuseReportReasonSNIppet{..} + = object + (catMaybes + [("secondaryReasons" .=) <$> _varrsSecondaryReasons, + ("label" .=) <$> _varrsLabel]) + +-- | Video processing progress and completion time estimate. +-- +-- /See:/ 'videoProcessingDetailsProcessingProgress' smart constructor. +data VideoProcessingDetailsProcessingProgress = VideoProcessingDetailsProcessingProgress + { _vpdppTimeLeftMs :: !(Maybe Word64) + , _vpdppPartsTotal :: !(Maybe Word64) + , _vpdppPartsProcessed :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoProcessingDetailsProcessingProgress' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vpdppTimeLeftMs' +-- +-- * 'vpdppPartsTotal' +-- +-- * 'vpdppPartsProcessed' +videoProcessingDetailsProcessingProgress + :: VideoProcessingDetailsProcessingProgress +videoProcessingDetailsProcessingProgress = + VideoProcessingDetailsProcessingProgress + { _vpdppTimeLeftMs = Nothing + , _vpdppPartsTotal = Nothing + , _vpdppPartsProcessed = Nothing + } + +-- | An estimate of the amount of time, in millseconds, that YouTube needs to +-- finish processing the video. +vpdppTimeLeftMs :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64) +vpdppTimeLeftMs + = lens _vpdppTimeLeftMs + (\ s a -> s{_vpdppTimeLeftMs = a}) + +-- | An estimate of the total number of parts that need to be processed for +-- the video. The number may be updated with more precise estimates while +-- YouTube processes the video. +vpdppPartsTotal :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64) +vpdppPartsTotal + = lens _vpdppPartsTotal + (\ s a -> s{_vpdppPartsTotal = a}) + +-- | The number of parts of the video that YouTube has already processed. You +-- can estimate the percentage of the video that YouTube has already +-- processed by calculating: 100 * parts_processed \/ parts_total Note that +-- since the estimated number of parts could increase without a +-- corresponding increase in the number of parts that have already been +-- processed, it is possible that the calculated progress could +-- periodically decrease while YouTube processes a video. +vpdppPartsProcessed :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64) +vpdppPartsProcessed + = lens _vpdppPartsProcessed + (\ s a -> s{_vpdppPartsProcessed = a}) + +instance FromJSON + VideoProcessingDetailsProcessingProgress where + parseJSON + = withObject + "VideoProcessingDetailsProcessingProgress" + (\ o -> + VideoProcessingDetailsProcessingProgress <$> + (o .:? "timeLeftMs") <*> (o .:? "partsTotal") <*> + (o .:? "partsProcessed")) + +instance ToJSON + VideoProcessingDetailsProcessingProgress where + toJSON VideoProcessingDetailsProcessingProgress{..} + = object + (catMaybes + [("timeLeftMs" .=) <$> _vpdppTimeLeftMs, + ("partsTotal" .=) <$> _vpdppPartsTotal, + ("partsProcessed" .=) <$> _vpdppPartsProcessed]) + +-- | A caption resource represents a YouTube caption track. A caption track +-- is associated with exactly one YouTube video. +-- +-- /See:/ 'caption' smart constructor. +data Caption = Caption + { _capEtag :: !(Maybe Text) + , _capSnippet :: !(Maybe (Maybe CaptionSNIppet)) + , _capKind :: !Text + , _capId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Caption' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'capEtag' +-- +-- * 'capSnippet' +-- +-- * 'capKind' +-- +-- * 'capId' +caption + :: Caption +caption = + Caption + { _capEtag = Nothing + , _capSnippet = Nothing + , _capKind = "youtube#caption" + , _capId = Nothing + } + +-- | Etag of this resource. +capEtag :: Lens' Caption (Maybe Text) +capEtag = lens _capEtag (\ s a -> s{_capEtag = a}) + +-- | The snippet object contains basic details about the caption. +capSnippet :: Lens' Caption (Maybe (Maybe CaptionSNIppet)) +capSnippet + = lens _capSnippet (\ s a -> s{_capSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#caption\". +capKind :: Lens' Caption Text +capKind = lens _capKind (\ s a -> s{_capKind = a}) + +-- | The ID that YouTube uses to uniquely identify the caption track. +capId :: Lens' Caption (Maybe Text) +capId = lens _capId (\ s a -> s{_capId = a}) + +instance FromJSON Caption where + parseJSON + = withObject "Caption" + (\ o -> + Caption <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#caption") + <*> (o .:? "id")) + +instance ToJSON Caption where + toJSON Caption{..} + = object + (catMaybes + [("etag" .=) <$> _capEtag, + ("snippet" .=) <$> _capSnippet, + Just ("kind" .= _capKind), ("id" .=) <$> _capId]) + +-- | DEPRECATED Region restriction of the video. +-- +-- /See:/ 'videoContentDetailsRegionRestriction' smart constructor. +data VideoContentDetailsRegionRestriction = VideoContentDetailsRegionRestriction + { _vcdrrAllowed :: !(Maybe [Text]) + , _vcdrrBlocked :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoContentDetailsRegionRestriction' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcdrrAllowed' +-- +-- * 'vcdrrBlocked' +videoContentDetailsRegionRestriction + :: VideoContentDetailsRegionRestriction +videoContentDetailsRegionRestriction = + VideoContentDetailsRegionRestriction + { _vcdrrAllowed = Nothing + , _vcdrrBlocked = Nothing + } + +-- | A list of region codes that identify countries where the video is +-- viewable. If this property is present and a country is not listed in its +-- value, then the video is blocked from appearing in that country. If this +-- property is present and contains an empty list, the video is blocked in +-- all countries. +vcdrrAllowed :: Lens' VideoContentDetailsRegionRestriction [Text] +vcdrrAllowed + = lens _vcdrrAllowed (\ s a -> s{_vcdrrAllowed = a}) + . _Default + . _Coerce + +-- | A list of region codes that identify countries where the video is +-- blocked. If this property is present and a country is not listed in its +-- value, then the video is viewable in that country. If this property is +-- present and contains an empty list, the video is viewable in all +-- countries. +vcdrrBlocked :: Lens' VideoContentDetailsRegionRestriction [Text] +vcdrrBlocked + = lens _vcdrrBlocked (\ s a -> s{_vcdrrBlocked = a}) + . _Default + . _Coerce + +instance FromJSON + VideoContentDetailsRegionRestriction where + parseJSON + = withObject "VideoContentDetailsRegionRestriction" + (\ o -> + VideoContentDetailsRegionRestriction <$> + (o .:? "allowed" .!= mempty) <*> + (o .:? "blocked" .!= mempty)) + +instance ToJSON VideoContentDetailsRegionRestriction + where + toJSON VideoContentDetailsRegionRestriction{..} + = object + (catMaybes + [("allowed" .=) <$> _vcdrrAllowed, + ("blocked" .=) <$> _vcdrrBlocked]) + +-- | Internal representation of thumbnails for a YouTube resource. +-- +-- /See:/ 'thumbnailDetails' smart constructor. +data ThumbnailDetails = ThumbnailDetails + { _tdMedium :: !(Maybe (Maybe Thumbnail)) + , _tdMaxres :: !(Maybe (Maybe Thumbnail)) + , _tdDefault :: !(Maybe (Maybe Thumbnail)) + , _tdStandard :: !(Maybe (Maybe Thumbnail)) + , _tdHigh :: !(Maybe (Maybe Thumbnail)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ThumbnailDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'tdMedium' +-- +-- * 'tdMaxres' +-- +-- * 'tdDefault' +-- +-- * 'tdStandard' +-- +-- * 'tdHigh' +thumbnailDetails + :: ThumbnailDetails +thumbnailDetails = + ThumbnailDetails + { _tdMedium = Nothing + , _tdMaxres = Nothing + , _tdDefault = Nothing + , _tdStandard = Nothing + , _tdHigh = Nothing + } + +-- | The medium quality image for this resource. +tdMedium :: Lens' ThumbnailDetails (Maybe (Maybe Thumbnail)) +tdMedium = lens _tdMedium (\ s a -> s{_tdMedium = a}) + +-- | The maximum resolution quality image for this resource. +tdMaxres :: Lens' ThumbnailDetails (Maybe (Maybe Thumbnail)) +tdMaxres = lens _tdMaxres (\ s a -> s{_tdMaxres = a}) + +-- | The default image for this resource. +tdDefault :: Lens' ThumbnailDetails (Maybe (Maybe Thumbnail)) +tdDefault + = lens _tdDefault (\ s a -> s{_tdDefault = a}) + +-- | The standard quality image for this resource. +tdStandard :: Lens' ThumbnailDetails (Maybe (Maybe Thumbnail)) +tdStandard + = lens _tdStandard (\ s a -> s{_tdStandard = a}) + +-- | The high quality image for this resource. +tdHigh :: Lens' ThumbnailDetails (Maybe (Maybe Thumbnail)) +tdHigh = lens _tdHigh (\ s a -> s{_tdHigh = a}) + +instance FromJSON ThumbnailDetails where + parseJSON + = withObject "ThumbnailDetails" + (\ o -> + ThumbnailDetails <$> + (o .:? "medium") <*> (o .:? "maxres") <*> + (o .:? "default") + <*> (o .:? "standard") + <*> (o .:? "high")) + +instance ToJSON ThumbnailDetails where + toJSON ThumbnailDetails{..} + = object + (catMaybes + [("medium" .=) <$> _tdMedium, + ("maxres" .=) <$> _tdMaxres, + ("default" .=) <$> _tdDefault, + ("standard" .=) <$> _tdStandard, + ("high" .=) <$> _tdHigh]) + +-- | Basic details about a channel, including title, description and +-- thumbnails. +-- +-- /See:/ 'channelSNIppet' smart constructor. +data ChannelSNIppet = ChannelSNIppet + { _csPublishedAt :: !(Maybe UTCTime) + , _csCountry :: !(Maybe Text) + , _csThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _csLocalized :: !(Maybe (Maybe ChannelLocalization)) + , _csTitle :: !(Maybe Text) + , _csDescription :: !(Maybe Text) + , _csDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csPublishedAt' +-- +-- * 'csCountry' +-- +-- * 'csThumbnails' +-- +-- * 'csLocalized' +-- +-- * 'csTitle' +-- +-- * 'csDescription' +-- +-- * 'csDefaultLanguage' +channelSNIppet + :: ChannelSNIppet +channelSNIppet = + ChannelSNIppet + { _csPublishedAt = Nothing + , _csCountry = Nothing + , _csThumbnails = Nothing + , _csLocalized = Nothing + , _csTitle = Nothing + , _csDescription = Nothing + , _csDefaultLanguage = Nothing + } + +-- | The date and time that the channel was created. The value is specified +-- in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +csPublishedAt :: Lens' ChannelSNIppet (Maybe UTCTime) +csPublishedAt + = lens _csPublishedAt + (\ s a -> s{_csPublishedAt = a}) + +-- | The country of the channel. +csCountry :: Lens' ChannelSNIppet (Maybe Text) +csCountry + = lens _csCountry (\ s a -> s{_csCountry = a}) + +-- | A map of thumbnail images associated with the channel. For each object +-- in the map, the key is the name of the thumbnail image, and the value is +-- an object that contains other information about the thumbnail. +csThumbnails :: Lens' ChannelSNIppet (Maybe (Maybe ThumbnailDetails)) +csThumbnails + = lens _csThumbnails (\ s a -> s{_csThumbnails = a}) + +-- | Localized title and description, read-only. +csLocalized :: Lens' ChannelSNIppet (Maybe (Maybe ChannelLocalization)) +csLocalized + = lens _csLocalized (\ s a -> s{_csLocalized = a}) + +-- | The channel\'s title. +csTitle :: Lens' ChannelSNIppet (Maybe Text) +csTitle = lens _csTitle (\ s a -> s{_csTitle = a}) + +-- | The description of the channel. +csDescription :: Lens' ChannelSNIppet (Maybe Text) +csDescription + = lens _csDescription + (\ s a -> s{_csDescription = a}) + +-- | The language of the channel\'s default title and description. +csDefaultLanguage :: Lens' ChannelSNIppet (Maybe Text) +csDefaultLanguage + = lens _csDefaultLanguage + (\ s a -> s{_csDefaultLanguage = a}) + +instance FromJSON ChannelSNIppet where + parseJSON + = withObject "ChannelSNIppet" + (\ o -> + ChannelSNIppet <$> + (o .:? "publishedAt") <*> (o .:? "country") <*> + (o .:? "thumbnails") + <*> (o .:? "localized") + <*> (o .:? "title") + <*> (o .:? "description") + <*> (o .:? "defaultLanguage")) + +instance ToJSON ChannelSNIppet where + toJSON ChannelSNIppet{..} + = object + (catMaybes + [("publishedAt" .=) <$> _csPublishedAt, + ("country" .=) <$> _csCountry, + ("thumbnails" .=) <$> _csThumbnails, + ("localized" .=) <$> _csLocalized, + ("title" .=) <$> _csTitle, + ("description" .=) <$> _csDescription, + ("defaultLanguage" .=) <$> _csDefaultLanguage]) + +-- | Settings and Info of the monitor stream +-- +-- /See:/ 'monitorStreamInfo' smart constructor. +data MonitorStreamInfo = MonitorStreamInfo + { _msiBroadcastStreamDelayMs :: !(Maybe Word32) + , _msiEmbedHtml :: !(Maybe Text) + , _msiEnableMonitorStream :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'MonitorStreamInfo' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'msiBroadcastStreamDelayMs' +-- +-- * 'msiEmbedHtml' +-- +-- * 'msiEnableMonitorStream' +monitorStreamInfo + :: MonitorStreamInfo +monitorStreamInfo = + MonitorStreamInfo + { _msiBroadcastStreamDelayMs = Nothing + , _msiEmbedHtml = Nothing + , _msiEnableMonitorStream = Nothing + } + +-- | If you have set the enableMonitorStream property to true, then this +-- property determines the length of the live broadcast delay. +msiBroadcastStreamDelayMs :: Lens' MonitorStreamInfo (Maybe Word32) +msiBroadcastStreamDelayMs + = lens _msiBroadcastStreamDelayMs + (\ s a -> s{_msiBroadcastStreamDelayMs = a}) + +-- | HTML code that embeds a player that plays the monitor stream. +msiEmbedHtml :: Lens' MonitorStreamInfo (Maybe Text) +msiEmbedHtml + = lens _msiEmbedHtml (\ s a -> s{_msiEmbedHtml = a}) + +-- | This value determines whether the monitor stream is enabled for the +-- broadcast. If the monitor stream is enabled, then YouTube will broadcast +-- the event content on a special stream intended only for the +-- broadcaster\'s consumption. The broadcaster can use the stream to review +-- the event content and also to identify the optimal times to insert +-- cuepoints. You need to set this value to true if you intend to have a +-- broadcast delay for your event. Note: This property cannot be updated +-- once the broadcast is in the testing or live state. +msiEnableMonitorStream :: Lens' MonitorStreamInfo (Maybe Bool) +msiEnableMonitorStream + = lens _msiEnableMonitorStream + (\ s a -> s{_msiEnableMonitorStream = a}) + +instance FromJSON MonitorStreamInfo where + parseJSON + = withObject "MonitorStreamInfo" + (\ o -> + MonitorStreamInfo <$> + (o .:? "broadcastStreamDelayMs") <*> + (o .:? "embedHtml") + <*> (o .:? "enableMonitorStream")) + +instance ToJSON MonitorStreamInfo where + toJSON MonitorStreamInfo{..} + = object + (catMaybes + [("broadcastStreamDelayMs" .=) <$> + _msiBroadcastStreamDelayMs, + ("embedHtml" .=) <$> _msiEmbedHtml, + ("enableMonitorStream" .=) <$> + _msiEnableMonitorStream]) + +-- | Describes a temporal position of a visual widget inside a video. +-- +-- /See:/ 'invideoTiming' smart constructor. +data InvideoTiming = InvideoTiming + { _itDurationMs :: !(Maybe Word64) + , _itOffsetMs :: !(Maybe Word64) + , _itType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvideoTiming' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'itDurationMs' +-- +-- * 'itOffsetMs' +-- +-- * 'itType' +invideoTiming + :: InvideoTiming +invideoTiming = + InvideoTiming + { _itDurationMs = Nothing + , _itOffsetMs = Nothing + , _itType = Nothing + } + +-- | Defines the duration in milliseconds for which the promotion should be +-- displayed. If missing, the client should use the default. +itDurationMs :: Lens' InvideoTiming (Maybe Word64) +itDurationMs + = lens _itDurationMs (\ s a -> s{_itDurationMs = a}) + +-- | Defines the time at which the promotion will appear. Depending on the +-- value of type the value of the offsetMs field will represent a time +-- offset from the start or from the end of the video, expressed in +-- milliseconds. +itOffsetMs :: Lens' InvideoTiming (Maybe Word64) +itOffsetMs + = lens _itOffsetMs (\ s a -> s{_itOffsetMs = a}) + +-- | Describes a timing type. If the value is offsetFromStart, then the +-- offsetMs field represents an offset from the start of the video. If the +-- value is offsetFromEnd, then the offsetMs field represents an offset +-- from the end of the video. +itType :: Lens' InvideoTiming (Maybe Text) +itType = lens _itType (\ s a -> s{_itType = a}) + +instance FromJSON InvideoTiming where + parseJSON + = withObject "InvideoTiming" + (\ o -> + InvideoTiming <$> + (o .:? "durationMs") <*> (o .:? "offsetMs") <*> + (o .:? "type")) + +instance ToJSON InvideoTiming where + toJSON InvideoTiming{..} + = object + (catMaybes + [("durationMs" .=) <$> _itDurationMs, + ("offsetMs" .=) <$> _itOffsetMs, + ("type" .=) <$> _itType]) + +-- | A videoCategory resource identifies a category that has been or could be +-- associated with uploaded videos. +-- +-- /See:/ 'videoCategory' smart constructor. +data VideoCategory = VideoCategory + { _vcEtag :: !(Maybe Text) + , _vcSnippet :: !(Maybe (Maybe VideoCategorySNIppet)) + , _vcKind :: !Text + , _vcId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoCategory' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcEtag' +-- +-- * 'vcSnippet' +-- +-- * 'vcKind' +-- +-- * 'vcId' +videoCategory + :: VideoCategory +videoCategory = + VideoCategory + { _vcEtag = Nothing + , _vcSnippet = Nothing + , _vcKind = "youtube#videoCategory" + , _vcId = Nothing + } + +-- | Etag of this resource. +vcEtag :: Lens' VideoCategory (Maybe Text) +vcEtag = lens _vcEtag (\ s a -> s{_vcEtag = a}) + +-- | The snippet object contains basic details about the video category, +-- including its title. +vcSnippet :: Lens' VideoCategory (Maybe (Maybe VideoCategorySNIppet)) +vcSnippet + = lens _vcSnippet (\ s a -> s{_vcSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#videoCategory\". +vcKind :: Lens' VideoCategory Text +vcKind = lens _vcKind (\ s a -> s{_vcKind = a}) + +-- | The ID that YouTube uses to uniquely identify the video category. +vcId :: Lens' VideoCategory (Maybe Text) +vcId = lens _vcId (\ s a -> s{_vcId = a}) + +instance FromJSON VideoCategory where + parseJSON + = withObject "VideoCategory" + (\ o -> + VideoCategory <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#videoCategory") + <*> (o .:? "id")) + +instance ToJSON VideoCategory where + toJSON VideoCategory{..} + = object + (catMaybes + [("etag" .=) <$> _vcEtag, + ("snippet" .=) <$> _vcSnippet, + Just ("kind" .= _vcKind), ("id" .=) <$> _vcId]) + +-- | A liveBroadcast resource represents an event that will be streamed, via +-- live video, on YouTube. +-- +-- /See:/ 'liveBroadcast' smart constructor. +data LiveBroadcast = LiveBroadcast + { _lbStatus :: !(Maybe (Maybe LiveBroadcastStatus)) + , _lbEtag :: !(Maybe Text) + , _lbSnippet :: !(Maybe (Maybe LiveBroadcastSNIppet)) + , _lbKind :: !Text + , _lbTopicDetails :: !(Maybe (Maybe LiveBroadcastTopicDetails)) + , _lbContentDetails :: !(Maybe (Maybe LiveBroadcastContentDetails)) + , _lbId :: !(Maybe Text) + , _lbStatistics :: !(Maybe (Maybe LiveBroadcastStatistics)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcast' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbStatus' +-- +-- * 'lbEtag' +-- +-- * 'lbSnippet' +-- +-- * 'lbKind' +-- +-- * 'lbTopicDetails' +-- +-- * 'lbContentDetails' +-- +-- * 'lbId' +-- +-- * 'lbStatistics' +liveBroadcast + :: LiveBroadcast +liveBroadcast = + LiveBroadcast + { _lbStatus = Nothing + , _lbEtag = Nothing + , _lbSnippet = Nothing + , _lbKind = "youtube#liveBroadcast" + , _lbTopicDetails = Nothing + , _lbContentDetails = Nothing + , _lbId = Nothing + , _lbStatistics = Nothing + } + +-- | The status object contains information about the event\'s status. +lbStatus :: Lens' LiveBroadcast (Maybe (Maybe LiveBroadcastStatus)) +lbStatus = lens _lbStatus (\ s a -> s{_lbStatus = a}) + +-- | Etag of this resource. +lbEtag :: Lens' LiveBroadcast (Maybe Text) +lbEtag = lens _lbEtag (\ s a -> s{_lbEtag = a}) + +-- | The snippet object contains basic details about the event, including its +-- title, description, start time, and end time. +lbSnippet :: Lens' LiveBroadcast (Maybe (Maybe LiveBroadcastSNIppet)) +lbSnippet + = lens _lbSnippet (\ s a -> s{_lbSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#liveBroadcast\". +lbKind :: Lens' LiveBroadcast Text +lbKind = lens _lbKind (\ s a -> s{_lbKind = a}) + +lbTopicDetails :: Lens' LiveBroadcast (Maybe (Maybe LiveBroadcastTopicDetails)) +lbTopicDetails + = lens _lbTopicDetails + (\ s a -> s{_lbTopicDetails = a}) + +-- | The contentDetails object contains information about the event\'s video +-- content, such as whether the content can be shown in an embedded video +-- player or if it will be archived and therefore available for viewing +-- after the event has concluded. +lbContentDetails :: Lens' LiveBroadcast (Maybe (Maybe LiveBroadcastContentDetails)) +lbContentDetails + = lens _lbContentDetails + (\ s a -> s{_lbContentDetails = a}) + +-- | The ID that YouTube assigns to uniquely identify the broadcast. +lbId :: Lens' LiveBroadcast (Maybe Text) +lbId = lens _lbId (\ s a -> s{_lbId = a}) + +-- | The statistics object contains info about the event\'s current stats. +-- These include concurrent viewers and total chat count. Statistics can +-- change (in either direction) during the lifetime of an event. Statistics +-- are only returned while the event is live. +lbStatistics :: Lens' LiveBroadcast (Maybe (Maybe LiveBroadcastStatistics)) +lbStatistics + = lens _lbStatistics (\ s a -> s{_lbStatistics = a}) + +instance FromJSON LiveBroadcast where + parseJSON + = withObject "LiveBroadcast" + (\ o -> + LiveBroadcast <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#liveBroadcast") + <*> (o .:? "topicDetails") + <*> (o .:? "contentDetails") + <*> (o .:? "id") + <*> (o .:? "statistics")) + +instance ToJSON LiveBroadcast where + toJSON LiveBroadcast{..} + = object + (catMaybes + [("status" .=) <$> _lbStatus, + ("etag" .=) <$> _lbEtag, + ("snippet" .=) <$> _lbSnippet, + Just ("kind" .= _lbKind), + ("topicDetails" .=) <$> _lbTopicDetails, + ("contentDetails" .=) <$> _lbContentDetails, + ("id" .=) <$> _lbId, + ("statistics" .=) <$> _lbStatistics]) + +-- | Details about a channelsection, including playlists and channels. +-- +-- /See:/ 'channelSectionContentDetails' smart constructor. +data ChannelSectionContentDetails = ChannelSectionContentDetails + { _cscdChannels :: !(Maybe [Text]) + , _cscdPlaylists :: !(Maybe [Text]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cscdChannels' +-- +-- * 'cscdPlaylists' +channelSectionContentDetails + :: ChannelSectionContentDetails +channelSectionContentDetails = + ChannelSectionContentDetails + { _cscdChannels = Nothing + , _cscdPlaylists = Nothing + } + +-- | The channel ids for type multiple_channels. +cscdChannels :: Lens' ChannelSectionContentDetails [Text] +cscdChannels + = lens _cscdChannels (\ s a -> s{_cscdChannels = a}) + . _Default + . _Coerce + +-- | The playlist ids for type single_playlist and multiple_playlists. For +-- singlePlaylist, only one playlistId is allowed. +cscdPlaylists :: Lens' ChannelSectionContentDetails [Text] +cscdPlaylists + = lens _cscdPlaylists + (\ s a -> s{_cscdPlaylists = a}) + . _Default + . _Coerce + +instance FromJSON ChannelSectionContentDetails where + parseJSON + = withObject "ChannelSectionContentDetails" + (\ o -> + ChannelSectionContentDetails <$> + (o .:? "channels" .!= mempty) <*> + (o .:? "playlists" .!= mempty)) + +instance ToJSON ChannelSectionContentDetails where + toJSON ChannelSectionContentDetails{..} + = object + (catMaybes + [("channels" .=) <$> _cscdChannels, + ("playlists" .=) <$> _cscdPlaylists]) + +-- | A video resource represents a YouTube video. +-- +-- /See:/ 'video' smart constructor. +data Video = Video + { _vStatus :: !(Maybe (Maybe VideoStatus)) + , _vEtag :: !(Maybe Text) + , _vProjectDetails :: !(Maybe (Maybe VideoProjectDetails)) + , _vRecordingDetails :: !(Maybe (Maybe VideoRecordingDetails)) + , _vSnippet :: !(Maybe (Maybe VideoSNIppet)) + , _vKind :: !Text + , _vTopicDetails :: !(Maybe (Maybe VideoTopicDetails)) + , _vContentDetails :: !(Maybe (Maybe VideoContentDetails)) + , _vConversionPings :: !(Maybe (Maybe VideoConversionPings)) + , _vAgeGating :: !(Maybe (Maybe VideoAgeGating)) + , _vFileDetails :: !(Maybe (Maybe VideoFileDetails)) + , _vSuggestions :: !(Maybe (Maybe VideoSuggestions)) + , _vId :: !(Maybe Text) + , _vStatistics :: !(Maybe (Maybe VideoStatistics)) + , _vLocalizations :: !(Maybe VideoLocalizations) + , _vLiveStreamingDetails :: !(Maybe (Maybe VideoLiveStreamingDetails)) + , _vPlayer :: !(Maybe (Maybe VideoPlayer)) + , _vProcessingDetails :: !(Maybe (Maybe VideoProcessingDetails)) + , _vMonetizationDetails :: !(Maybe (Maybe VideoMonetizationDetails)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Video' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vStatus' +-- +-- * 'vEtag' +-- +-- * 'vProjectDetails' +-- +-- * 'vRecordingDetails' +-- +-- * 'vSnippet' +-- +-- * 'vKind' +-- +-- * 'vTopicDetails' +-- +-- * 'vContentDetails' +-- +-- * 'vConversionPings' +-- +-- * 'vAgeGating' +-- +-- * 'vFileDetails' +-- +-- * 'vSuggestions' +-- +-- * 'vId' +-- +-- * 'vStatistics' +-- +-- * 'vLocalizations' +-- +-- * 'vLiveStreamingDetails' +-- +-- * 'vPlayer' +-- +-- * 'vProcessingDetails' +-- +-- * 'vMonetizationDetails' +video + :: Video +video = + Video + { _vStatus = Nothing + , _vEtag = Nothing + , _vProjectDetails = Nothing + , _vRecordingDetails = Nothing + , _vSnippet = Nothing + , _vKind = "youtube#video" + , _vTopicDetails = Nothing + , _vContentDetails = Nothing + , _vConversionPings = Nothing + , _vAgeGating = Nothing + , _vFileDetails = Nothing + , _vSuggestions = Nothing + , _vId = Nothing + , _vStatistics = Nothing + , _vLocalizations = Nothing + , _vLiveStreamingDetails = Nothing + , _vPlayer = Nothing + , _vProcessingDetails = Nothing + , _vMonetizationDetails = Nothing + } + +-- | The status object contains information about the video\'s uploading, +-- processing, and privacy statuses. +vStatus :: Lens' Video (Maybe (Maybe VideoStatus)) +vStatus = lens _vStatus (\ s a -> s{_vStatus = a}) + +-- | Etag of this resource. +vEtag :: Lens' Video (Maybe Text) +vEtag = lens _vEtag (\ s a -> s{_vEtag = a}) + +-- | The projectDetails object contains information about the project +-- specific video metadata. +vProjectDetails :: Lens' Video (Maybe (Maybe VideoProjectDetails)) +vProjectDetails + = lens _vProjectDetails + (\ s a -> s{_vProjectDetails = a}) + +-- | The recordingDetails object encapsulates information about the location, +-- date and address where the video was recorded. +vRecordingDetails :: Lens' Video (Maybe (Maybe VideoRecordingDetails)) +vRecordingDetails + = lens _vRecordingDetails + (\ s a -> s{_vRecordingDetails = a}) + +-- | The snippet object contains basic details about the video, such as its +-- title, description, and category. +vSnippet :: Lens' Video (Maybe (Maybe VideoSNIppet)) +vSnippet = lens _vSnippet (\ s a -> s{_vSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#video\". +vKind :: Lens' Video Text +vKind = lens _vKind (\ s a -> s{_vKind = a}) + +-- | The topicDetails object encapsulates information about Freebase topics +-- associated with the video. +vTopicDetails :: Lens' Video (Maybe (Maybe VideoTopicDetails)) +vTopicDetails + = lens _vTopicDetails + (\ s a -> s{_vTopicDetails = a}) + +-- | The contentDetails object contains information about the video content, +-- including the length of the video and its aspect ratio. +vContentDetails :: Lens' Video (Maybe (Maybe VideoContentDetails)) +vContentDetails + = lens _vContentDetails + (\ s a -> s{_vContentDetails = a}) + +-- | The conversionPings object encapsulates information about url pings that +-- need to be respected by the App in different video contexts. +vConversionPings :: Lens' Video (Maybe (Maybe VideoConversionPings)) +vConversionPings + = lens _vConversionPings + (\ s a -> s{_vConversionPings = a}) + +-- | Age restriction details related to a video. +vAgeGating :: Lens' Video (Maybe (Maybe VideoAgeGating)) +vAgeGating + = lens _vAgeGating (\ s a -> s{_vAgeGating = a}) + +-- | The fileDetails object encapsulates information about the video file +-- that was uploaded to YouTube, including the file\'s resolution, +-- duration, audio and video codecs, stream bitrates, and more. This data +-- can only be retrieved by the video owner. +vFileDetails :: Lens' Video (Maybe (Maybe VideoFileDetails)) +vFileDetails + = lens _vFileDetails (\ s a -> s{_vFileDetails = a}) + +-- | The suggestions object encapsulates suggestions that identify +-- opportunities to improve the video quality or the metadata for the +-- uploaded video. This data can only be retrieved by the video owner. +vSuggestions :: Lens' Video (Maybe (Maybe VideoSuggestions)) +vSuggestions + = lens _vSuggestions (\ s a -> s{_vSuggestions = a}) + +-- | The ID that YouTube uses to uniquely identify the video. +vId :: Lens' Video (Maybe Text) +vId = lens _vId (\ s a -> s{_vId = a}) + +-- | The statistics object contains statistics about the video. +vStatistics :: Lens' Video (Maybe (Maybe VideoStatistics)) +vStatistics + = lens _vStatistics (\ s a -> s{_vStatistics = a}) + +-- | List with all localizations. +vLocalizations :: Lens' Video (Maybe VideoLocalizations) +vLocalizations + = lens _vLocalizations + (\ s a -> s{_vLocalizations = a}) + +-- | The liveStreamingDetails object contains metadata about a live video +-- broadcast. The object will only be present in a video resource if the +-- video is an upcoming, live, or completed live broadcast. +vLiveStreamingDetails :: Lens' Video (Maybe (Maybe VideoLiveStreamingDetails)) +vLiveStreamingDetails + = lens _vLiveStreamingDetails + (\ s a -> s{_vLiveStreamingDetails = a}) + +-- | The player object contains information that you would use to play the +-- video in an embedded player. +vPlayer :: Lens' Video (Maybe (Maybe VideoPlayer)) +vPlayer = lens _vPlayer (\ s a -> s{_vPlayer = a}) + +-- | The processingProgress object encapsulates information about YouTube\'s +-- progress in processing the uploaded video file. The properties in the +-- object identify the current processing status and an estimate of the +-- time remaining until YouTube finishes processing the video. This part +-- also indicates whether different types of data or content, such as file +-- details or thumbnail images, are available for the video. The +-- processingProgress object is designed to be polled so that the video +-- uploaded can track the progress that YouTube has made in processing the +-- uploaded video file. This data can only be retrieved by the video owner. +vProcessingDetails :: Lens' Video (Maybe (Maybe VideoProcessingDetails)) +vProcessingDetails + = lens _vProcessingDetails + (\ s a -> s{_vProcessingDetails = a}) + +-- | The monetizationDetails object encapsulates information about the +-- monetization status of the video. +vMonetizationDetails :: Lens' Video (Maybe (Maybe VideoMonetizationDetails)) +vMonetizationDetails + = lens _vMonetizationDetails + (\ s a -> s{_vMonetizationDetails = a}) + +instance FromJSON Video where + parseJSON + = withObject "Video" + (\ o -> + Video <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "projectDetails") + <*> (o .:? "recordingDetails") + <*> (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#video") + <*> (o .:? "topicDetails") + <*> (o .:? "contentDetails") + <*> (o .:? "conversionPings") + <*> (o .:? "ageGating") + <*> (o .:? "fileDetails") + <*> (o .:? "suggestions") + <*> (o .:? "id") + <*> (o .:? "statistics") + <*> (o .:? "localizations") + <*> (o .:? "liveStreamingDetails") + <*> (o .:? "player") + <*> (o .:? "processingDetails") + <*> (o .:? "monetizationDetails")) + +instance ToJSON Video where + toJSON Video{..} + = object + (catMaybes + [("status" .=) <$> _vStatus, ("etag" .=) <$> _vEtag, + ("projectDetails" .=) <$> _vProjectDetails, + ("recordingDetails" .=) <$> _vRecordingDetails, + ("snippet" .=) <$> _vSnippet, + Just ("kind" .= _vKind), + ("topicDetails" .=) <$> _vTopicDetails, + ("contentDetails" .=) <$> _vContentDetails, + ("conversionPings" .=) <$> _vConversionPings, + ("ageGating" .=) <$> _vAgeGating, + ("fileDetails" .=) <$> _vFileDetails, + ("suggestions" .=) <$> _vSuggestions, + ("id" .=) <$> _vId, + ("statistics" .=) <$> _vStatistics, + ("localizations" .=) <$> _vLocalizations, + ("liveStreamingDetails" .=) <$> + _vLiveStreamingDetails, + ("player" .=) <$> _vPlayer, + ("processingDetails" .=) <$> _vProcessingDetails, + ("monetizationDetails" .=) <$> + _vMonetizationDetails]) + +-- | Detailed settings of a stream. +-- +-- /See:/ 'liveStreamContentDetails' smart constructor. +data LiveStreamContentDetails = LiveStreamContentDetails + { _lscdClosedCaptionsIngestionUrl :: !(Maybe Text) + , _lscdIsReusable :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lscdClosedCaptionsIngestionUrl' +-- +-- * 'lscdIsReusable' +liveStreamContentDetails + :: LiveStreamContentDetails +liveStreamContentDetails = + LiveStreamContentDetails + { _lscdClosedCaptionsIngestionUrl = Nothing + , _lscdIsReusable = Nothing + } + +-- | The ingestion URL where the closed captions of this stream are sent. +lscdClosedCaptionsIngestionUrl :: Lens' LiveStreamContentDetails (Maybe Text) +lscdClosedCaptionsIngestionUrl + = lens _lscdClosedCaptionsIngestionUrl + (\ s a -> s{_lscdClosedCaptionsIngestionUrl = a}) + +-- | Indicates whether the stream is reusable, which means that it can be +-- bound to multiple broadcasts. It is common for broadcasters to reuse the +-- same stream for many different broadcasts if those broadcasts occur at +-- different times. If you set this value to false, then the stream will +-- not be reusable, which means that it can only be bound to one broadcast. +-- Non-reusable streams differ from reusable streams in the following ways: +-- - A non-reusable stream can only be bound to one broadcast. - A +-- non-reusable stream might be deleted by an automated process after the +-- broadcast ends. - The liveStreams.list method does not list non-reusable +-- streams if you call the method and set the mine parameter to true. The +-- only way to use that method to retrieve the resource for a non-reusable +-- stream is to use the id parameter to identify the stream. +lscdIsReusable :: Lens' LiveStreamContentDetails (Maybe Bool) +lscdIsReusable + = lens _lscdIsReusable + (\ s a -> s{_lscdIsReusable = a}) + +instance FromJSON LiveStreamContentDetails where + parseJSON + = withObject "LiveStreamContentDetails" + (\ o -> + LiveStreamContentDetails <$> + (o .:? "closedCaptionsIngestionUrl") <*> + (o .:? "isReusable")) + +instance ToJSON LiveStreamContentDetails where + toJSON LiveStreamContentDetails{..} + = object + (catMaybes + [("closedCaptionsIngestionUrl" .=) <$> + _lscdClosedCaptionsIngestionUrl, + ("isReusable" .=) <$> _lscdIsReusable]) + +-- | Basic details about a video category, such as its localized title. +-- +-- /See:/ 'videoCategorySNIppet' smart constructor. +data VideoCategorySNIppet = VideoCategorySNIppet + { _vcsAssignable :: !(Maybe Bool) + , _vcsChannelId :: !Text + , _vcsTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoCategorySNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcsAssignable' +-- +-- * 'vcsChannelId' +-- +-- * 'vcsTitle' +videoCategorySNIppet + :: VideoCategorySNIppet +videoCategorySNIppet = + VideoCategorySNIppet + { _vcsAssignable = Nothing + , _vcsChannelId = "UCBR8-60-B28hp2BmDPdntcQ" + , _vcsTitle = Nothing + } + +vcsAssignable :: Lens' VideoCategorySNIppet (Maybe Bool) +vcsAssignable + = lens _vcsAssignable + (\ s a -> s{_vcsAssignable = a}) + +-- | The YouTube channel that created the video category. +vcsChannelId :: Lens' VideoCategorySNIppet Text +vcsChannelId + = lens _vcsChannelId (\ s a -> s{_vcsChannelId = a}) + +-- | The video category\'s title. +vcsTitle :: Lens' VideoCategorySNIppet (Maybe Text) +vcsTitle = lens _vcsTitle (\ s a -> s{_vcsTitle = a}) + +instance FromJSON VideoCategorySNIppet where + parseJSON + = withObject "VideoCategorySNIppet" + (\ o -> + VideoCategorySNIppet <$> + (o .:? "assignable") <*> + (o .:? "channelId" .!= "UCBR8-60-B28hp2BmDPdntcQ") + <*> (o .:? "title")) + +instance ToJSON VideoCategorySNIppet where + toJSON VideoCategorySNIppet{..} + = object + (catMaybes + [("assignable" .=) <$> _vcsAssignable, + Just ("channelId" .= _vcsChannelId), + ("title" .=) <$> _vcsTitle]) + +-- +-- /See:/ 'commentThreadListResponse' smart constructor. +data CommentThreadListResponse = CommentThreadListResponse + { _ctlrEtag :: !(Maybe Text) + , _ctlrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _ctlrNextPageToken :: !(Maybe Text) + , _ctlrPageInfo :: !(Maybe (Maybe PageInfo)) + , _ctlrKind :: !Text + , _ctlrItems :: !(Maybe [Maybe CommentThread]) + , _ctlrVisitorId :: !(Maybe Text) + , _ctlrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctlrEtag' +-- +-- * 'ctlrTokenPagination' +-- +-- * 'ctlrNextPageToken' +-- +-- * 'ctlrPageInfo' +-- +-- * 'ctlrKind' +-- +-- * 'ctlrItems' +-- +-- * 'ctlrVisitorId' +-- +-- * 'ctlrEventId' +commentThreadListResponse + :: CommentThreadListResponse +commentThreadListResponse = + CommentThreadListResponse + { _ctlrEtag = Nothing + , _ctlrTokenPagination = Nothing + , _ctlrNextPageToken = Nothing + , _ctlrPageInfo = Nothing + , _ctlrKind = "youtube#commentThreadListResponse" + , _ctlrItems = Nothing + , _ctlrVisitorId = Nothing + , _ctlrEventId = Nothing + } + +-- | Etag of this resource. +ctlrEtag :: Lens' CommentThreadListResponse (Maybe Text) +ctlrEtag = lens _ctlrEtag (\ s a -> s{_ctlrEtag = a}) + +ctlrTokenPagination :: Lens' CommentThreadListResponse (Maybe (Maybe TokenPagination)) +ctlrTokenPagination + = lens _ctlrTokenPagination + (\ s a -> s{_ctlrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +ctlrNextPageToken :: Lens' CommentThreadListResponse (Maybe Text) +ctlrNextPageToken + = lens _ctlrNextPageToken + (\ s a -> s{_ctlrNextPageToken = a}) + +ctlrPageInfo :: Lens' CommentThreadListResponse (Maybe (Maybe PageInfo)) +ctlrPageInfo + = lens _ctlrPageInfo (\ s a -> s{_ctlrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#commentThreadListResponse\". +ctlrKind :: Lens' CommentThreadListResponse Text +ctlrKind = lens _ctlrKind (\ s a -> s{_ctlrKind = a}) + +-- | A list of comment threads that match the request criteria. +ctlrItems :: Lens' CommentThreadListResponse [Maybe CommentThread] +ctlrItems + = lens _ctlrItems (\ s a -> s{_ctlrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +ctlrVisitorId :: Lens' CommentThreadListResponse (Maybe Text) +ctlrVisitorId + = lens _ctlrVisitorId + (\ s a -> s{_ctlrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +ctlrEventId :: Lens' CommentThreadListResponse (Maybe Text) +ctlrEventId + = lens _ctlrEventId (\ s a -> s{_ctlrEventId = a}) + +instance FromJSON CommentThreadListResponse where + parseJSON + = withObject "CommentThreadListResponse" + (\ o -> + CommentThreadListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= + "youtube#commentThreadListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON CommentThreadListResponse where + toJSON CommentThreadListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _ctlrEtag, + ("tokenPagination" .=) <$> _ctlrTokenPagination, + ("nextPageToken" .=) <$> _ctlrNextPageToken, + ("pageInfo" .=) <$> _ctlrPageInfo, + Just ("kind" .= _ctlrKind), + ("items" .=) <$> _ctlrItems, + ("visitorId" .=) <$> _ctlrVisitorId, + ("eventId" .=) <$> _ctlrEventId]) + +-- | A pair Property \/ Value. +-- +-- /See:/ 'propertyValue' smart constructor. +data PropertyValue = PropertyValue + { _pvProperty :: !(Maybe Text) + , _pvValue :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PropertyValue' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pvProperty' +-- +-- * 'pvValue' +propertyValue + :: PropertyValue +propertyValue = + PropertyValue + { _pvProperty = Nothing + , _pvValue = Nothing + } + +-- | A property. +pvProperty :: Lens' PropertyValue (Maybe Text) +pvProperty + = lens _pvProperty (\ s a -> s{_pvProperty = a}) + +-- | The property\'s value. +pvValue :: Lens' PropertyValue (Maybe Text) +pvValue = lens _pvValue (\ s a -> s{_pvValue = a}) + +instance FromJSON PropertyValue where + parseJSON + = withObject "PropertyValue" + (\ o -> + PropertyValue <$> + (o .:? "property") <*> (o .:? "value")) + +instance ToJSON PropertyValue where + toJSON PropertyValue{..} + = object + (catMaybes + [("property" .=) <$> _pvProperty, + ("value" .=) <$> _pvValue]) + +-- | An i18nLanguage resource identifies a UI language currently supported by +-- YouTube. +-- +-- /See:/ 'i18nLanguage' smart constructor. +data I18nLanguage = I18nLanguage + { _ilEtag :: !(Maybe Text) + , _ilSnippet :: !(Maybe (Maybe I18nLanguageSNIppet)) + , _ilKind :: !Text + , _ilId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nLanguage' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilEtag' +-- +-- * 'ilSnippet' +-- +-- * 'ilKind' +-- +-- * 'ilId' +i18nLanguage + :: I18nLanguage +i18nLanguage = + I18nLanguage + { _ilEtag = Nothing + , _ilSnippet = Nothing + , _ilKind = "youtube#i18nLanguage" + , _ilId = Nothing + } + +-- | Etag of this resource. +ilEtag :: Lens' I18nLanguage (Maybe Text) +ilEtag = lens _ilEtag (\ s a -> s{_ilEtag = a}) + +-- | The snippet object contains basic details about the i18n language, such +-- as language code and human-readable name. +ilSnippet :: Lens' I18nLanguage (Maybe (Maybe I18nLanguageSNIppet)) +ilSnippet + = lens _ilSnippet (\ s a -> s{_ilSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#i18nLanguage\". +ilKind :: Lens' I18nLanguage Text +ilKind = lens _ilKind (\ s a -> s{_ilKind = a}) + +-- | The ID that YouTube uses to uniquely identify the i18n language. +ilId :: Lens' I18nLanguage (Maybe Text) +ilId = lens _ilId (\ s a -> s{_ilId = a}) + +instance FromJSON I18nLanguage where + parseJSON + = withObject "I18nLanguage" + (\ o -> + I18nLanguage <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#i18nLanguage") + <*> (o .:? "id")) + +instance ToJSON I18nLanguage where + toJSON I18nLanguage{..} + = object + (catMaybes + [("etag" .=) <$> _ilEtag, + ("snippet" .=) <$> _ilSnippet, + Just ("kind" .= _ilKind), ("id" .=) <$> _ilId]) + +-- | Branding properties for the watch. +-- +-- /See:/ 'watchSettings' smart constructor. +data WatchSettings = WatchSettings + { _wsFeaturedPlaylistId :: !(Maybe Text) + , _wsBackgroundColor :: !(Maybe Text) + , _wsTextColor :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'WatchSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'wsFeaturedPlaylistId' +-- +-- * 'wsBackgroundColor' +-- +-- * 'wsTextColor' +watchSettings + :: WatchSettings +watchSettings = + WatchSettings + { _wsFeaturedPlaylistId = Nothing + , _wsBackgroundColor = Nothing + , _wsTextColor = Nothing + } + +-- | An ID that uniquely identifies a playlist that displays next to the +-- video player. +wsFeaturedPlaylistId :: Lens' WatchSettings (Maybe Text) +wsFeaturedPlaylistId + = lens _wsFeaturedPlaylistId + (\ s a -> s{_wsFeaturedPlaylistId = a}) + +-- | The text color for the video watch page\'s branded area. +wsBackgroundColor :: Lens' WatchSettings (Maybe Text) +wsBackgroundColor + = lens _wsBackgroundColor + (\ s a -> s{_wsBackgroundColor = a}) + +-- | The background color for the video watch page\'s branded area. +wsTextColor :: Lens' WatchSettings (Maybe Text) +wsTextColor + = lens _wsTextColor (\ s a -> s{_wsTextColor = a}) + +instance FromJSON WatchSettings where + parseJSON + = withObject "WatchSettings" + (\ o -> + WatchSettings <$> + (o .:? "featuredPlaylistId") <*> + (o .:? "backgroundColor") + <*> (o .:? "textColor")) + +instance ToJSON WatchSettings where + toJSON WatchSettings{..} + = object + (catMaybes + [("featuredPlaylistId" .=) <$> _wsFeaturedPlaylistId, + ("backgroundColor" .=) <$> _wsBackgroundColor, + ("textColor" .=) <$> _wsTextColor]) + +-- | Basic details about a video, including title, description, uploader, +-- thumbnails and category. +-- +-- /See:/ 'videoSNIppet' smart constructor. +data VideoSNIppet = VideoSNIppet + { _vsDefaultAudioLanguage :: !(Maybe Text) + , _vsPublishedAt :: !(Maybe UTCTime) + , _vsChannelTitle :: !(Maybe Text) + , _vsChannelId :: !(Maybe Text) + , _vsThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _vsLocalized :: !(Maybe (Maybe VideoLocalization)) + , _vsCategoryId :: !(Maybe Text) + , _vsTitle :: !(Maybe Text) + , _vsLiveBroadcastContent :: !(Maybe Text) + , _vsDescription :: !(Maybe Text) + , _vsTags :: !(Maybe [Text]) + , _vsDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsDefaultAudioLanguage' +-- +-- * 'vsPublishedAt' +-- +-- * 'vsChannelTitle' +-- +-- * 'vsChannelId' +-- +-- * 'vsThumbnails' +-- +-- * 'vsLocalized' +-- +-- * 'vsCategoryId' +-- +-- * 'vsTitle' +-- +-- * 'vsLiveBroadcastContent' +-- +-- * 'vsDescription' +-- +-- * 'vsTags' +-- +-- * 'vsDefaultLanguage' +videoSNIppet + :: VideoSNIppet +videoSNIppet = + VideoSNIppet + { _vsDefaultAudioLanguage = Nothing + , _vsPublishedAt = Nothing + , _vsChannelTitle = Nothing + , _vsChannelId = Nothing + , _vsThumbnails = Nothing + , _vsLocalized = Nothing + , _vsCategoryId = Nothing + , _vsTitle = Nothing + , _vsLiveBroadcastContent = Nothing + , _vsDescription = Nothing + , _vsTags = Nothing + , _vsDefaultLanguage = Nothing + } + +-- | The default_audio_language property specifies the language spoken in the +-- video\'s default audio track. +vsDefaultAudioLanguage :: Lens' VideoSNIppet (Maybe Text) +vsDefaultAudioLanguage + = lens _vsDefaultAudioLanguage + (\ s a -> s{_vsDefaultAudioLanguage = a}) + +-- | The date and time that the video was uploaded. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +vsPublishedAt :: Lens' VideoSNIppet (Maybe UTCTime) +vsPublishedAt + = lens _vsPublishedAt + (\ s a -> s{_vsPublishedAt = a}) + +-- | Channel title for the channel that the video belongs to. +vsChannelTitle :: Lens' VideoSNIppet (Maybe Text) +vsChannelTitle + = lens _vsChannelTitle + (\ s a -> s{_vsChannelTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the channel that the video +-- was uploaded to. +vsChannelId :: Lens' VideoSNIppet (Maybe Text) +vsChannelId + = lens _vsChannelId (\ s a -> s{_vsChannelId = a}) + +-- | A map of thumbnail images associated with the video. For each object in +-- the map, the key is the name of the thumbnail image, and the value is an +-- object that contains other information about the thumbnail. +vsThumbnails :: Lens' VideoSNIppet (Maybe (Maybe ThumbnailDetails)) +vsThumbnails + = lens _vsThumbnails (\ s a -> s{_vsThumbnails = a}) + +-- | Localized snippet selected with the hl parameter. If no such +-- localization exists, this field is populated with the default snippet. +-- (Read-only) +vsLocalized :: Lens' VideoSNIppet (Maybe (Maybe VideoLocalization)) +vsLocalized + = lens _vsLocalized (\ s a -> s{_vsLocalized = a}) + +-- | The YouTube video category associated with the video. +vsCategoryId :: Lens' VideoSNIppet (Maybe Text) +vsCategoryId + = lens _vsCategoryId (\ s a -> s{_vsCategoryId = a}) + +-- | The video\'s title. +vsTitle :: Lens' VideoSNIppet (Maybe Text) +vsTitle = lens _vsTitle (\ s a -> s{_vsTitle = a}) + +-- | Indicates if the video is an upcoming\/active live broadcast. Or it\'s +-- \"none\" if the video is not an upcoming\/active live broadcast. +vsLiveBroadcastContent :: Lens' VideoSNIppet (Maybe Text) +vsLiveBroadcastContent + = lens _vsLiveBroadcastContent + (\ s a -> s{_vsLiveBroadcastContent = a}) + +-- | The video\'s description. +vsDescription :: Lens' VideoSNIppet (Maybe Text) +vsDescription + = lens _vsDescription + (\ s a -> s{_vsDescription = a}) + +-- | A list of keyword tags associated with the video. Tags may contain +-- spaces. +vsTags :: Lens' VideoSNIppet [Text] +vsTags + = lens _vsTags (\ s a -> s{_vsTags = a}) . _Default . + _Coerce + +-- | The language of the videos\'s default snippet. +vsDefaultLanguage :: Lens' VideoSNIppet (Maybe Text) +vsDefaultLanguage + = lens _vsDefaultLanguage + (\ s a -> s{_vsDefaultLanguage = a}) + +instance FromJSON VideoSNIppet where + parseJSON + = withObject "VideoSNIppet" + (\ o -> + VideoSNIppet <$> + (o .:? "defaultAudioLanguage") <*> + (o .:? "publishedAt") + <*> (o .:? "channelTitle") + <*> (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "localized") + <*> (o .:? "categoryId") + <*> (o .:? "title") + <*> (o .:? "liveBroadcastContent") + <*> (o .:? "description") + <*> (o .:? "tags" .!= mempty) + <*> (o .:? "defaultLanguage")) + +instance ToJSON VideoSNIppet where + toJSON VideoSNIppet{..} + = object + (catMaybes + [("defaultAudioLanguage" .=) <$> + _vsDefaultAudioLanguage, + ("publishedAt" .=) <$> _vsPublishedAt, + ("channelTitle" .=) <$> _vsChannelTitle, + ("channelId" .=) <$> _vsChannelId, + ("thumbnails" .=) <$> _vsThumbnails, + ("localized" .=) <$> _vsLocalized, + ("categoryId" .=) <$> _vsCategoryId, + ("title" .=) <$> _vsTitle, + ("liveBroadcastContent" .=) <$> + _vsLiveBroadcastContent, + ("description" .=) <$> _vsDescription, + ("tags" .=) <$> _vsTags, + ("defaultLanguage" .=) <$> _vsDefaultLanguage]) + +-- | Rights management policy for YouTube resources. +-- +-- /See:/ 'accessPolicy' smart constructor. +data AccessPolicy = AccessPolicy + { _apException :: !(Maybe [Text]) + , _apAllowed :: !(Maybe Bool) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'AccessPolicy' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'apException' +-- +-- * 'apAllowed' +accessPolicy + :: AccessPolicy +accessPolicy = + AccessPolicy + { _apException = Nothing + , _apAllowed = Nothing + } + +-- | A list of region codes that identify countries where the default policy +-- do not apply. +apException :: Lens' AccessPolicy [Text] +apException + = lens _apException (\ s a -> s{_apException = a}) . + _Default + . _Coerce + +-- | The value of allowed indicates whether the access to the policy is +-- allowed or denied by default. +apAllowed :: Lens' AccessPolicy (Maybe Bool) +apAllowed + = lens _apAllowed (\ s a -> s{_apAllowed = a}) + +instance FromJSON AccessPolicy where + parseJSON + = withObject "AccessPolicy" + (\ o -> + AccessPolicy <$> + (o .:? "exception" .!= mempty) <*> (o .:? "allowed")) + +instance ToJSON AccessPolicy where + toJSON AccessPolicy{..} + = object + (catMaybes + [("exception" .=) <$> _apException, + ("allowed" .=) <$> _apAllowed]) + +-- +-- /See:/ 'activityListResponse' smart constructor. +data ActivityListResponse = ActivityListResponse + { _alrEtag :: !(Maybe Text) + , _alrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _alrNextPageToken :: !(Maybe Text) + , _alrPageInfo :: !(Maybe (Maybe PageInfo)) + , _alrKind :: !Text + , _alrItems :: !(Maybe [Maybe Activity]) + , _alrVisitorId :: !(Maybe Text) + , _alrEventId :: !(Maybe Text) + , _alrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'alrEtag' +-- +-- * 'alrTokenPagination' +-- +-- * 'alrNextPageToken' +-- +-- * 'alrPageInfo' +-- +-- * 'alrKind' +-- +-- * 'alrItems' +-- +-- * 'alrVisitorId' +-- +-- * 'alrEventId' +-- +-- * 'alrPrevPageToken' +activityListResponse + :: ActivityListResponse +activityListResponse = + ActivityListResponse + { _alrEtag = Nothing + , _alrTokenPagination = Nothing + , _alrNextPageToken = Nothing + , _alrPageInfo = Nothing + , _alrKind = "youtube#activityListResponse" + , _alrItems = Nothing + , _alrVisitorId = Nothing + , _alrEventId = Nothing + , _alrPrevPageToken = Nothing + } + +-- | Etag of this resource. +alrEtag :: Lens' ActivityListResponse (Maybe Text) +alrEtag = lens _alrEtag (\ s a -> s{_alrEtag = a}) + +alrTokenPagination :: Lens' ActivityListResponse (Maybe (Maybe TokenPagination)) +alrTokenPagination + = lens _alrTokenPagination + (\ s a -> s{_alrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +alrNextPageToken :: Lens' ActivityListResponse (Maybe Text) +alrNextPageToken + = lens _alrNextPageToken + (\ s a -> s{_alrNextPageToken = a}) + +alrPageInfo :: Lens' ActivityListResponse (Maybe (Maybe PageInfo)) +alrPageInfo + = lens _alrPageInfo (\ s a -> s{_alrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#activityListResponse\". +alrKind :: Lens' ActivityListResponse Text +alrKind = lens _alrKind (\ s a -> s{_alrKind = a}) + +-- | A list of activities, or events, that match the request criteria. +alrItems :: Lens' ActivityListResponse [Maybe Activity] +alrItems + = lens _alrItems (\ s a -> s{_alrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +alrVisitorId :: Lens' ActivityListResponse (Maybe Text) +alrVisitorId + = lens _alrVisitorId (\ s a -> s{_alrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +alrEventId :: Lens' ActivityListResponse (Maybe Text) +alrEventId + = lens _alrEventId (\ s a -> s{_alrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +alrPrevPageToken :: Lens' ActivityListResponse (Maybe Text) +alrPrevPageToken + = lens _alrPrevPageToken + (\ s a -> s{_alrPrevPageToken = a}) + +instance FromJSON ActivityListResponse where + parseJSON + = withObject "ActivityListResponse" + (\ o -> + ActivityListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#activityListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON ActivityListResponse where + toJSON ActivityListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _alrEtag, + ("tokenPagination" .=) <$> _alrTokenPagination, + ("nextPageToken" .=) <$> _alrNextPageToken, + ("pageInfo" .=) <$> _alrPageInfo, + Just ("kind" .= _alrKind), + ("items" .=) <$> _alrItems, + ("visitorId" .=) <$> _alrVisitorId, + ("eventId" .=) <$> _alrEventId, + ("prevPageToken" .=) <$> _alrPrevPageToken]) + +-- | Brief description of the live stream cdn settings. +-- +-- /See:/ 'cdnSettings' smart constructor. +data CdnSettings = CdnSettings + { _csIngestionInfo :: !(Maybe (Maybe IngestionInfo)) + , _csFormat :: !(Maybe Text) + , _csIngestionType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CdnSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csIngestionInfo' +-- +-- * 'csFormat' +-- +-- * 'csIngestionType' +cdnSettings + :: CdnSettings +cdnSettings = + CdnSettings + { _csIngestionInfo = Nothing + , _csFormat = Nothing + , _csIngestionType = Nothing + } + +-- | The ingestionInfo object contains information that YouTube provides that +-- you need to transmit your RTMP or HTTP stream to YouTube. +csIngestionInfo :: Lens' CdnSettings (Maybe (Maybe IngestionInfo)) +csIngestionInfo + = lens _csIngestionInfo + (\ s a -> s{_csIngestionInfo = a}) + +-- | The format of the video stream that you are sending to Youtube. +csFormat :: Lens' CdnSettings (Maybe Text) +csFormat = lens _csFormat (\ s a -> s{_csFormat = a}) + +-- | The method or protocol used to transmit the video stream. +csIngestionType :: Lens' CdnSettings (Maybe Text) +csIngestionType + = lens _csIngestionType + (\ s a -> s{_csIngestionType = a}) + +instance FromJSON CdnSettings where + parseJSON + = withObject "CdnSettings" + (\ o -> + CdnSettings <$> + (o .:? "ingestionInfo") <*> (o .:? "format") <*> + (o .:? "ingestionType")) + +instance ToJSON CdnSettings where + toJSON CdnSettings{..} + = object + (catMaybes + [("ingestionInfo" .=) <$> _csIngestionInfo, + ("format" .=) <$> _csFormat, + ("ingestionType" .=) <$> _csIngestionType]) + +-- | Statistics about the video, such as the number of times the video was +-- viewed or liked. +-- +-- /See:/ 'videoStatistics' smart constructor. +data VideoStatistics = VideoStatistics + { _vsLikeCount :: !(Maybe Word64) + , _vsCommentCount :: !(Maybe Word64) + , _vsFavoriteCount :: !(Maybe Word64) + , _vsDislikeCount :: !(Maybe Word64) + , _vsViewCount :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoStatistics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsLikeCount' +-- +-- * 'vsCommentCount' +-- +-- * 'vsFavoriteCount' +-- +-- * 'vsDislikeCount' +-- +-- * 'vsViewCount' +videoStatistics + :: VideoStatistics +videoStatistics = + VideoStatistics + { _vsLikeCount = Nothing + , _vsCommentCount = Nothing + , _vsFavoriteCount = Nothing + , _vsDislikeCount = Nothing + , _vsViewCount = Nothing + } + +-- | The number of users who have indicated that they liked the video by +-- giving it a positive rating. +vsLikeCount :: Lens' VideoStatistics (Maybe Word64) +vsLikeCount + = lens _vsLikeCount (\ s a -> s{_vsLikeCount = a}) + +-- | The number of comments for the video. +vsCommentCount :: Lens' VideoStatistics (Maybe Word64) +vsCommentCount + = lens _vsCommentCount + (\ s a -> s{_vsCommentCount = a}) + +-- | The number of users who currently have the video marked as a favorite +-- video. +vsFavoriteCount :: Lens' VideoStatistics (Maybe Word64) +vsFavoriteCount + = lens _vsFavoriteCount + (\ s a -> s{_vsFavoriteCount = a}) + +-- | The number of users who have indicated that they disliked the video by +-- giving it a negative rating. +vsDislikeCount :: Lens' VideoStatistics (Maybe Word64) +vsDislikeCount + = lens _vsDislikeCount + (\ s a -> s{_vsDislikeCount = a}) + +-- | The number of times the video has been viewed. +vsViewCount :: Lens' VideoStatistics (Maybe Word64) +vsViewCount + = lens _vsViewCount (\ s a -> s{_vsViewCount = a}) + +instance FromJSON VideoStatistics where + parseJSON + = withObject "VideoStatistics" + (\ o -> + VideoStatistics <$> + (o .:? "likeCount") <*> (o .:? "commentCount") <*> + (o .:? "favoriteCount") + <*> (o .:? "dislikeCount") + <*> (o .:? "viewCount")) + +instance ToJSON VideoStatistics where + toJSON VideoStatistics{..} + = object + (catMaybes + [("likeCount" .=) <$> _vsLikeCount, + ("commentCount" .=) <$> _vsCommentCount, + ("favoriteCount" .=) <$> _vsFavoriteCount, + ("dislikeCount" .=) <$> _vsDislikeCount, + ("viewCount" .=) <$> _vsViewCount]) + +-- +-- /See:/ 'liveBroadcastSNIppet' smart constructor. +data LiveBroadcastSNIppet = LiveBroadcastSNIppet + { _lbsActualEndTime :: !(Maybe UTCTime) + , _lbsLiveChatId :: !(Maybe Text) + , _lbsPublishedAt :: !(Maybe UTCTime) + , _lbsScheduledEndTime :: !(Maybe UTCTime) + , _lbsChannelId :: !(Maybe Text) + , _lbsScheduledStartTime :: !(Maybe UTCTime) + , _lbsThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _lbsTitle :: !(Maybe Text) + , _lbsActualStartTime :: !(Maybe UTCTime) + , _lbsIsDefaultBroadcast :: !(Maybe Bool) + , _lbsDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbsActualEndTime' +-- +-- * 'lbsLiveChatId' +-- +-- * 'lbsPublishedAt' +-- +-- * 'lbsScheduledEndTime' +-- +-- * 'lbsChannelId' +-- +-- * 'lbsScheduledStartTime' +-- +-- * 'lbsThumbnails' +-- +-- * 'lbsTitle' +-- +-- * 'lbsActualStartTime' +-- +-- * 'lbsIsDefaultBroadcast' +-- +-- * 'lbsDescription' +liveBroadcastSNIppet + :: LiveBroadcastSNIppet +liveBroadcastSNIppet = + LiveBroadcastSNIppet + { _lbsActualEndTime = Nothing + , _lbsLiveChatId = Nothing + , _lbsPublishedAt = Nothing + , _lbsScheduledEndTime = Nothing + , _lbsChannelId = Nothing + , _lbsScheduledStartTime = Nothing + , _lbsThumbnails = Nothing + , _lbsTitle = Nothing + , _lbsActualStartTime = Nothing + , _lbsIsDefaultBroadcast = Nothing + , _lbsDescription = Nothing + } + +-- | The date and time that the broadcast actually ended. This information is +-- only available once the broadcast\'s state is complete. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +lbsActualEndTime :: Lens' LiveBroadcastSNIppet (Maybe UTCTime) +lbsActualEndTime + = lens _lbsActualEndTime + (\ s a -> s{_lbsActualEndTime = a}) + +-- | The id of the live chat for this broadcast. +lbsLiveChatId :: Lens' LiveBroadcastSNIppet (Maybe Text) +lbsLiveChatId + = lens _lbsLiveChatId + (\ s a -> s{_lbsLiveChatId = a}) + +-- | The date and time that the broadcast was added to YouTube\'s live +-- broadcast schedule. The value is specified in ISO 8601 +-- (YYYY-MM-DDThh:mm:ss.sZ) format. +lbsPublishedAt :: Lens' LiveBroadcastSNIppet (Maybe UTCTime) +lbsPublishedAt + = lens _lbsPublishedAt + (\ s a -> s{_lbsPublishedAt = a}) + +-- | The date and time that the broadcast is scheduled to end. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +lbsScheduledEndTime :: Lens' LiveBroadcastSNIppet (Maybe UTCTime) +lbsScheduledEndTime + = lens _lbsScheduledEndTime + (\ s a -> s{_lbsScheduledEndTime = a}) + +-- | The ID that YouTube uses to uniquely identify the channel that is +-- publishing the broadcast. +lbsChannelId :: Lens' LiveBroadcastSNIppet (Maybe Text) +lbsChannelId + = lens _lbsChannelId (\ s a -> s{_lbsChannelId = a}) + +-- | The date and time that the broadcast is scheduled to start. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +lbsScheduledStartTime :: Lens' LiveBroadcastSNIppet (Maybe UTCTime) +lbsScheduledStartTime + = lens _lbsScheduledStartTime + (\ s a -> s{_lbsScheduledStartTime = a}) + +-- | A map of thumbnail images associated with the broadcast. For each nested +-- object in this object, the key is the name of the thumbnail image, and +-- the value is an object that contains other information about the +-- thumbnail. +lbsThumbnails :: Lens' LiveBroadcastSNIppet (Maybe (Maybe ThumbnailDetails)) +lbsThumbnails + = lens _lbsThumbnails + (\ s a -> s{_lbsThumbnails = a}) + +-- | The broadcast\'s title. Note that the broadcast represents exactly one +-- YouTube video. You can set this field by modifying the broadcast +-- resource or by setting the title field of the corresponding video +-- resource. +lbsTitle :: Lens' LiveBroadcastSNIppet (Maybe Text) +lbsTitle = lens _lbsTitle (\ s a -> s{_lbsTitle = a}) + +-- | The date and time that the broadcast actually started. This information +-- is only available once the broadcast\'s state is live. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +lbsActualStartTime :: Lens' LiveBroadcastSNIppet (Maybe UTCTime) +lbsActualStartTime + = lens _lbsActualStartTime + (\ s a -> s{_lbsActualStartTime = a}) + +lbsIsDefaultBroadcast :: Lens' LiveBroadcastSNIppet (Maybe Bool) +lbsIsDefaultBroadcast + = lens _lbsIsDefaultBroadcast + (\ s a -> s{_lbsIsDefaultBroadcast = a}) + +-- | The broadcast\'s description. As with the title, you can set this field +-- by modifying the broadcast resource or by setting the description field +-- of the corresponding video resource. +lbsDescription :: Lens' LiveBroadcastSNIppet (Maybe Text) +lbsDescription + = lens _lbsDescription + (\ s a -> s{_lbsDescription = a}) + +instance FromJSON LiveBroadcastSNIppet where + parseJSON + = withObject "LiveBroadcastSNIppet" + (\ o -> + LiveBroadcastSNIppet <$> + (o .:? "actualEndTime") <*> (o .:? "liveChatId") <*> + (o .:? "publishedAt") + <*> (o .:? "scheduledEndTime") + <*> (o .:? "channelId") + <*> (o .:? "scheduledStartTime") + <*> (o .:? "thumbnails") + <*> (o .:? "title") + <*> (o .:? "actualStartTime") + <*> (o .:? "isDefaultBroadcast") + <*> (o .:? "description")) + +instance ToJSON LiveBroadcastSNIppet where + toJSON LiveBroadcastSNIppet{..} + = object + (catMaybes + [("actualEndTime" .=) <$> _lbsActualEndTime, + ("liveChatId" .=) <$> _lbsLiveChatId, + ("publishedAt" .=) <$> _lbsPublishedAt, + ("scheduledEndTime" .=) <$> _lbsScheduledEndTime, + ("channelId" .=) <$> _lbsChannelId, + ("scheduledStartTime" .=) <$> _lbsScheduledStartTime, + ("thumbnails" .=) <$> _lbsThumbnails, + ("title" .=) <$> _lbsTitle, + ("actualStartTime" .=) <$> _lbsActualStartTime, + ("isDefaultBroadcast" .=) <$> _lbsIsDefaultBroadcast, + ("description" .=) <$> _lbsDescription]) + +-- | Statistics about the live broadcast. These represent a snapshot of the +-- values at the time of the request. Statistics are only returned for live +-- broadcasts. +-- +-- /See:/ 'liveBroadcastStatistics' smart constructor. +data LiveBroadcastStatistics = LiveBroadcastStatistics + { _lbsTotalChatCount :: !(Maybe Word64) + , _lbsConcurrentViewers :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastStatistics' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbsTotalChatCount' +-- +-- * 'lbsConcurrentViewers' +liveBroadcastStatistics + :: LiveBroadcastStatistics +liveBroadcastStatistics = + LiveBroadcastStatistics + { _lbsTotalChatCount = Nothing + , _lbsConcurrentViewers = Nothing + } + +-- | The total number of live chat messages currently on the broadcast. The +-- property and its value will be present if the broadcast is public, has +-- the live chat feature enabled, and has at least one message. Note that +-- this field will not be filled after the broadcast ends. So this property +-- would not identify the number of chat messages for an archived video of +-- a completed live broadcast. +lbsTotalChatCount :: Lens' LiveBroadcastStatistics (Maybe Word64) +lbsTotalChatCount + = lens _lbsTotalChatCount + (\ s a -> s{_lbsTotalChatCount = a}) + +-- | The number of viewers currently watching the broadcast. The property and +-- its value will be present if the broadcast has current viewers and the +-- broadcast owner has not hidden the viewcount for the video. Note that +-- YouTube stops tracking the number of concurrent viewers for a broadcast +-- when the broadcast ends. So, this property would not identify the number +-- of viewers watching an archived video of a live broadcast that already +-- ended. +lbsConcurrentViewers :: Lens' LiveBroadcastStatistics (Maybe Word64) +lbsConcurrentViewers + = lens _lbsConcurrentViewers + (\ s a -> s{_lbsConcurrentViewers = a}) + +instance FromJSON LiveBroadcastStatistics where + parseJSON + = withObject "LiveBroadcastStatistics" + (\ o -> + LiveBroadcastStatistics <$> + (o .:? "totalChatCount") <*> + (o .:? "concurrentViewers")) + +instance ToJSON LiveBroadcastStatistics where + toJSON LiveBroadcastStatistics{..} + = object + (catMaybes + [("totalChatCount" .=) <$> _lbsTotalChatCount, + ("concurrentViewers" .=) <$> _lbsConcurrentViewers]) + +-- | Basic details about a guide category. +-- +-- /See:/ 'guideCategorySNIppet' smart constructor. +data GuideCategorySNIppet = GuideCategorySNIppet + { _gcsChannelId :: !Text + , _gcsTitle :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GuideCategorySNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gcsChannelId' +-- +-- * 'gcsTitle' +guideCategorySNIppet + :: GuideCategorySNIppet +guideCategorySNIppet = + GuideCategorySNIppet + { _gcsChannelId = "UCBR8-60-B28hp2BmDPdntcQ" + , _gcsTitle = Nothing + } + +gcsChannelId :: Lens' GuideCategorySNIppet Text +gcsChannelId + = lens _gcsChannelId (\ s a -> s{_gcsChannelId = a}) + +-- | Description of the guide category. +gcsTitle :: Lens' GuideCategorySNIppet (Maybe Text) +gcsTitle = lens _gcsTitle (\ s a -> s{_gcsTitle = a}) + +instance FromJSON GuideCategorySNIppet where + parseJSON + = withObject "GuideCategorySNIppet" + (\ o -> + GuideCategorySNIppet <$> + (o .:? "channelId" .!= "UCBR8-60-B28hp2BmDPdntcQ") + <*> (o .:? "title")) + +instance ToJSON GuideCategorySNIppet where + toJSON GuideCategorySNIppet{..} + = object + (catMaybes + [Just ("channelId" .= _gcsChannelId), + ("title" .=) <$> _gcsTitle]) + +-- +-- /See:/ 'i18nRegionListResponse' smart constructor. +data I18nRegionListResponse = I18nRegionListResponse + { _irlrEtag :: !(Maybe Text) + , _irlrKind :: !Text + , _irlrItems :: !(Maybe [Maybe I18nRegion]) + , _irlrVisitorId :: !(Maybe Text) + , _irlrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nRegionListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irlrEtag' +-- +-- * 'irlrKind' +-- +-- * 'irlrItems' +-- +-- * 'irlrVisitorId' +-- +-- * 'irlrEventId' +i18nRegionListResponse + :: I18nRegionListResponse +i18nRegionListResponse = + I18nRegionListResponse + { _irlrEtag = Nothing + , _irlrKind = "youtube#i18nRegionListResponse" + , _irlrItems = Nothing + , _irlrVisitorId = Nothing + , _irlrEventId = Nothing + } + +-- | Etag of this resource. +irlrEtag :: Lens' I18nRegionListResponse (Maybe Text) +irlrEtag = lens _irlrEtag (\ s a -> s{_irlrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#i18nRegionListResponse\". +irlrKind :: Lens' I18nRegionListResponse Text +irlrKind = lens _irlrKind (\ s a -> s{_irlrKind = a}) + +-- | A list of regions where YouTube is available. In this map, the i18n +-- region ID is the map key, and its value is the corresponding i18nRegion +-- resource. +irlrItems :: Lens' I18nRegionListResponse [Maybe I18nRegion] +irlrItems + = lens _irlrItems (\ s a -> s{_irlrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +irlrVisitorId :: Lens' I18nRegionListResponse (Maybe Text) +irlrVisitorId + = lens _irlrVisitorId + (\ s a -> s{_irlrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +irlrEventId :: Lens' I18nRegionListResponse (Maybe Text) +irlrEventId + = lens _irlrEventId (\ s a -> s{_irlrEventId = a}) + +instance FromJSON I18nRegionListResponse where + parseJSON + = withObject "I18nRegionListResponse" + (\ o -> + I18nRegionListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#i18nRegionListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON I18nRegionListResponse where + toJSON I18nRegionListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _irlrEtag, + Just ("kind" .= _irlrKind), + ("items" .=) <$> _irlrItems, + ("visitorId" .=) <$> _irlrVisitorId, + ("eventId" .=) <$> _irlrEventId]) + +-- | Information about the playlist item\'s privacy status. +-- +-- /See:/ 'playlistItemStatus' smart constructor. +newtype PlaylistItemStatus = PlaylistItemStatus + { _pisPrivacyStatus :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pisPrivacyStatus' +playlistItemStatus + :: PlaylistItemStatus +playlistItemStatus = + PlaylistItemStatus + { _pisPrivacyStatus = Nothing + } + +-- | This resource\'s privacy status. +pisPrivacyStatus :: Lens' PlaylistItemStatus (Maybe Text) +pisPrivacyStatus + = lens _pisPrivacyStatus + (\ s a -> s{_pisPrivacyStatus = a}) + +instance FromJSON PlaylistItemStatus where + parseJSON + = withObject "PlaylistItemStatus" + (\ o -> + PlaylistItemStatus <$> (o .:? "privacyStatus")) + +instance ToJSON PlaylistItemStatus where + toJSON PlaylistItemStatus{..} + = object + (catMaybes + [("privacyStatus" .=) <$> _pisPrivacyStatus]) + +-- | Describes the spatial position of a visual widget inside a video. It is +-- a union of various position types, out of which only will be set one. +-- +-- /See:/ 'invideoPosition' smart constructor. +data InvideoPosition = InvideoPosition + { _ipCornerPosition :: !(Maybe Text) + , _ipType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvideoPosition' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipCornerPosition' +-- +-- * 'ipType' +invideoPosition + :: InvideoPosition +invideoPosition = + InvideoPosition + { _ipCornerPosition = Nothing + , _ipType = Nothing + } + +-- | Describes in which corner of the video the visual widget will appear. +ipCornerPosition :: Lens' InvideoPosition (Maybe Text) +ipCornerPosition + = lens _ipCornerPosition + (\ s a -> s{_ipCornerPosition = a}) + +-- | Defines the position type. +ipType :: Lens' InvideoPosition (Maybe Text) +ipType = lens _ipType (\ s a -> s{_ipType = a}) + +instance FromJSON InvideoPosition where + parseJSON + = withObject "InvideoPosition" + (\ o -> + InvideoPosition <$> + (o .:? "cornerPosition") <*> (o .:? "type")) + +instance ToJSON InvideoPosition where + toJSON InvideoPosition{..} + = object + (catMaybes + [("cornerPosition" .=) <$> _ipCornerPosition, + ("type" .=) <$> _ipType]) + +-- | Information about an audio stream. +-- +-- /See:/ 'videoFileDetailsAudioStream' smart constructor. +data VideoFileDetailsAudioStream = VideoFileDetailsAudioStream + { _vfdasBitrateBps :: !(Maybe Word64) + , _vfdasVendor :: !(Maybe Text) + , _vfdasCodec :: !(Maybe Text) + , _vfdasChannelCount :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoFileDetailsAudioStream' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vfdasBitrateBps' +-- +-- * 'vfdasVendor' +-- +-- * 'vfdasCodec' +-- +-- * 'vfdasChannelCount' +videoFileDetailsAudioStream + :: VideoFileDetailsAudioStream +videoFileDetailsAudioStream = + VideoFileDetailsAudioStream + { _vfdasBitrateBps = Nothing + , _vfdasVendor = Nothing + , _vfdasCodec = Nothing + , _vfdasChannelCount = Nothing + } + +-- | The audio stream\'s bitrate, in bits per second. +vfdasBitrateBps :: Lens' VideoFileDetailsAudioStream (Maybe Word64) +vfdasBitrateBps + = lens _vfdasBitrateBps + (\ s a -> s{_vfdasBitrateBps = a}) + +-- | A value that uniquely identifies a video vendor. Typically, the value is +-- a four-letter vendor code. +vfdasVendor :: Lens' VideoFileDetailsAudioStream (Maybe Text) +vfdasVendor + = lens _vfdasVendor (\ s a -> s{_vfdasVendor = a}) + +-- | The audio codec that the stream uses. +vfdasCodec :: Lens' VideoFileDetailsAudioStream (Maybe Text) +vfdasCodec + = lens _vfdasCodec (\ s a -> s{_vfdasCodec = a}) + +-- | The number of audio channels that the stream contains. +vfdasChannelCount :: Lens' VideoFileDetailsAudioStream (Maybe Word32) +vfdasChannelCount + = lens _vfdasChannelCount + (\ s a -> s{_vfdasChannelCount = a}) + +instance FromJSON VideoFileDetailsAudioStream where + parseJSON + = withObject "VideoFileDetailsAudioStream" + (\ o -> + VideoFileDetailsAudioStream <$> + (o .:? "bitrateBps") <*> (o .:? "vendor") <*> + (o .:? "codec") + <*> (o .:? "channelCount")) + +instance ToJSON VideoFileDetailsAudioStream where + toJSON VideoFileDetailsAudioStream{..} + = object + (catMaybes + [("bitrateBps" .=) <$> _vfdasBitrateBps, + ("vendor" .=) <$> _vfdasVendor, + ("codec" .=) <$> _vfdasCodec, + ("channelCount" .=) <$> _vfdasChannelCount]) + +-- | Details about a channel bulletin post. +-- +-- /See:/ 'activityContentDetailsBulletin' smart constructor. +newtype ActivityContentDetailsBulletin = ActivityContentDetailsBulletin + { _acdbResourceId :: Maybe (Maybe ResourceId) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsBulletin' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdbResourceId' +activityContentDetailsBulletin + :: ActivityContentDetailsBulletin +activityContentDetailsBulletin = + ActivityContentDetailsBulletin + { _acdbResourceId = Nothing + } + +-- | The resourceId object contains information that identifies the resource +-- associated with a bulletin post. +acdbResourceId :: Lens' ActivityContentDetailsBulletin (Maybe (Maybe ResourceId)) +acdbResourceId + = lens _acdbResourceId + (\ s a -> s{_acdbResourceId = a}) + +instance FromJSON ActivityContentDetailsBulletin + where + parseJSON + = withObject "ActivityContentDetailsBulletin" + (\ o -> + ActivityContentDetailsBulletin <$> + (o .:? "resourceId")) + +instance ToJSON ActivityContentDetailsBulletin where + toJSON ActivityContentDetailsBulletin{..} + = object + (catMaybes [("resourceId" .=) <$> _acdbResourceId]) + +-- +-- /See:/ 'videoAbuseReport' smart constructor. +data VideoAbuseReport = VideoAbuseReport + { _varSecondaryReasonId :: !(Maybe Text) + , _varReasonId :: !(Maybe Text) + , _varVideoId :: !(Maybe Text) + , _varLanguage :: !(Maybe Text) + , _varComments :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReport' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varSecondaryReasonId' +-- +-- * 'varReasonId' +-- +-- * 'varVideoId' +-- +-- * 'varLanguage' +-- +-- * 'varComments' +videoAbuseReport + :: VideoAbuseReport +videoAbuseReport = + VideoAbuseReport + { _varSecondaryReasonId = Nothing + , _varReasonId = Nothing + , _varVideoId = Nothing + , _varLanguage = Nothing + , _varComments = Nothing + } + +-- | The specific, or secondary, reason that this content is abusive (if +-- available). The value is an abuse report reason ID that is a valid +-- secondary reason for the primary reason. +varSecondaryReasonId :: Lens' VideoAbuseReport (Maybe Text) +varSecondaryReasonId + = lens _varSecondaryReasonId + (\ s a -> s{_varSecondaryReasonId = a}) + +-- | The high-level, or primary, reason that the content is abusive. The +-- value is an abuse report reason ID. +varReasonId :: Lens' VideoAbuseReport (Maybe Text) +varReasonId + = lens _varReasonId (\ s a -> s{_varReasonId = a}) + +-- | The ID that YouTube uses to uniquely identify the video. +varVideoId :: Lens' VideoAbuseReport (Maybe Text) +varVideoId + = lens _varVideoId (\ s a -> s{_varVideoId = a}) + +-- | The language that the content was viewed in. +varLanguage :: Lens' VideoAbuseReport (Maybe Text) +varLanguage + = lens _varLanguage (\ s a -> s{_varLanguage = a}) + +-- | Additional comments regarding the abuse report. +varComments :: Lens' VideoAbuseReport (Maybe Text) +varComments + = lens _varComments (\ s a -> s{_varComments = a}) + +instance FromJSON VideoAbuseReport where + parseJSON + = withObject "VideoAbuseReport" + (\ o -> + VideoAbuseReport <$> + (o .:? "secondaryReasonId") <*> (o .:? "reasonId") + <*> (o .:? "videoId") + <*> (o .:? "language") + <*> (o .:? "comments")) + +instance ToJSON VideoAbuseReport where + toJSON VideoAbuseReport{..} + = object + (catMaybes + [("secondaryReasonId" .=) <$> _varSecondaryReasonId, + ("reasonId" .=) <$> _varReasonId, + ("videoId" .=) <$> _varVideoId, + ("language" .=) <$> _varLanguage, + ("comments" .=) <$> _varComments]) + +-- +-- /See:/ 'captionListResponse' smart constructor. +data CaptionListResponse = CaptionListResponse + { _clrlEtag :: !(Maybe Text) + , _clrlKind :: !Text + , _clrlItems :: !(Maybe [Maybe Caption]) + , _clrlVisitorId :: !(Maybe Text) + , _clrlEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clrlEtag' +-- +-- * 'clrlKind' +-- +-- * 'clrlItems' +-- +-- * 'clrlVisitorId' +-- +-- * 'clrlEventId' +captionListResponse + :: CaptionListResponse +captionListResponse = + CaptionListResponse + { _clrlEtag = Nothing + , _clrlKind = "youtube#captionListResponse" + , _clrlItems = Nothing + , _clrlVisitorId = Nothing + , _clrlEventId = Nothing + } + +-- | Etag of this resource. +clrlEtag :: Lens' CaptionListResponse (Maybe Text) +clrlEtag = lens _clrlEtag (\ s a -> s{_clrlEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#captionListResponse\". +clrlKind :: Lens' CaptionListResponse Text +clrlKind = lens _clrlKind (\ s a -> s{_clrlKind = a}) + +-- | A list of captions that match the request criteria. +clrlItems :: Lens' CaptionListResponse [Maybe Caption] +clrlItems + = lens _clrlItems (\ s a -> s{_clrlItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +clrlVisitorId :: Lens' CaptionListResponse (Maybe Text) +clrlVisitorId + = lens _clrlVisitorId + (\ s a -> s{_clrlVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +clrlEventId :: Lens' CaptionListResponse (Maybe Text) +clrlEventId + = lens _clrlEventId (\ s a -> s{_clrlEventId = a}) + +instance FromJSON CaptionListResponse where + parseJSON + = withObject "CaptionListResponse" + (\ o -> + CaptionListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#captionListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON CaptionListResponse where + toJSON CaptionListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _clrlEtag, + Just ("kind" .= _clrlKind), + ("items" .=) <$> _clrlItems, + ("visitorId" .=) <$> _clrlVisitorId, + ("eventId" .=) <$> _clrlEventId]) + +-- | Describes a single promoted item id. It is a union of various possible +-- types. +-- +-- /See:/ 'promotedItemId' smart constructor. +data PromotedItemId = PromotedItemId + { _piiRecentlyUploadedBy :: !(Maybe Text) + , _piiVideoId :: !(Maybe Text) + , _piiWebsiteUrl :: !(Maybe Text) + , _piiType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PromotedItemId' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'piiRecentlyUploadedBy' +-- +-- * 'piiVideoId' +-- +-- * 'piiWebsiteUrl' +-- +-- * 'piiType' +promotedItemId + :: PromotedItemId +promotedItemId = + PromotedItemId + { _piiRecentlyUploadedBy = Nothing + , _piiVideoId = Nothing + , _piiWebsiteUrl = Nothing + , _piiType = Nothing + } + +-- | If type is recentUpload, this field identifies the channel from which to +-- take the recent upload. If missing, the channel is assumed to be the +-- same channel for which the invideoPromotion is set. +piiRecentlyUploadedBy :: Lens' PromotedItemId (Maybe Text) +piiRecentlyUploadedBy + = lens _piiRecentlyUploadedBy + (\ s a -> s{_piiRecentlyUploadedBy = a}) + +-- | If the promoted item represents a video, this field represents the +-- unique YouTube ID identifying it. This field will be present only if +-- type has the value video. +piiVideoId :: Lens' PromotedItemId (Maybe Text) +piiVideoId + = lens _piiVideoId (\ s a -> s{_piiVideoId = a}) + +-- | If the promoted item represents a website, this field represents the url +-- pointing to the website. This field will be present only if type has the +-- value website. +piiWebsiteUrl :: Lens' PromotedItemId (Maybe Text) +piiWebsiteUrl + = lens _piiWebsiteUrl + (\ s a -> s{_piiWebsiteUrl = a}) + +-- | Describes the type of the promoted item. +piiType :: Lens' PromotedItemId (Maybe Text) +piiType = lens _piiType (\ s a -> s{_piiType = a}) + +instance FromJSON PromotedItemId where + parseJSON + = withObject "PromotedItemId" + (\ o -> + PromotedItemId <$> + (o .:? "recentlyUploadedBy") <*> (o .:? "videoId") + <*> (o .:? "websiteUrl") + <*> (o .:? "type")) + +instance ToJSON PromotedItemId where + toJSON PromotedItemId{..} + = object + (catMaybes + [("recentlyUploadedBy" .=) <$> + _piiRecentlyUploadedBy, + ("videoId" .=) <$> _piiVideoId, + ("websiteUrl" .=) <$> _piiWebsiteUrl, + ("type" .=) <$> _piiType]) + +-- | Basic details about a search result, including title, description and +-- thumbnails of the item referenced by the search result. +-- +-- /See:/ 'searchResultSNIppet' smart constructor. +data SearchResultSNIppet = SearchResultSNIppet + { _srsPublishedAt :: !(Maybe UTCTime) + , _srsChannelTitle :: !(Maybe Text) + , _srsChannelId :: !(Maybe Text) + , _srsThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _srsTitle :: !(Maybe Text) + , _srsLiveBroadcastContent :: !(Maybe Text) + , _srsDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SearchResultSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'srsPublishedAt' +-- +-- * 'srsChannelTitle' +-- +-- * 'srsChannelId' +-- +-- * 'srsThumbnails' +-- +-- * 'srsTitle' +-- +-- * 'srsLiveBroadcastContent' +-- +-- * 'srsDescription' +searchResultSNIppet + :: SearchResultSNIppet +searchResultSNIppet = + SearchResultSNIppet + { _srsPublishedAt = Nothing + , _srsChannelTitle = Nothing + , _srsChannelId = Nothing + , _srsThumbnails = Nothing + , _srsTitle = Nothing + , _srsLiveBroadcastContent = Nothing + , _srsDescription = Nothing + } + +-- | The creation date and time of the resource that the search result +-- identifies. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) +-- format. +srsPublishedAt :: Lens' SearchResultSNIppet (Maybe UTCTime) +srsPublishedAt + = lens _srsPublishedAt + (\ s a -> s{_srsPublishedAt = a}) + +-- | The title of the channel that published the resource that the search +-- result identifies. +srsChannelTitle :: Lens' SearchResultSNIppet (Maybe Text) +srsChannelTitle + = lens _srsChannelTitle + (\ s a -> s{_srsChannelTitle = a}) + +-- | The value that YouTube uses to uniquely identify the channel that +-- published the resource that the search result identifies. +srsChannelId :: Lens' SearchResultSNIppet (Maybe Text) +srsChannelId + = lens _srsChannelId (\ s a -> s{_srsChannelId = a}) + +-- | A map of thumbnail images associated with the search result. For each +-- object in the map, the key is the name of the thumbnail image, and the +-- value is an object that contains other information about the thumbnail. +srsThumbnails :: Lens' SearchResultSNIppet (Maybe (Maybe ThumbnailDetails)) +srsThumbnails + = lens _srsThumbnails + (\ s a -> s{_srsThumbnails = a}) + +-- | The title of the search result. +srsTitle :: Lens' SearchResultSNIppet (Maybe Text) +srsTitle = lens _srsTitle (\ s a -> s{_srsTitle = a}) + +-- | It indicates if the resource (video or channel) has upcoming\/active +-- live broadcast content. Or it\'s \"none\" if there is not any +-- upcoming\/active live broadcasts. +srsLiveBroadcastContent :: Lens' SearchResultSNIppet (Maybe Text) +srsLiveBroadcastContent + = lens _srsLiveBroadcastContent + (\ s a -> s{_srsLiveBroadcastContent = a}) + +-- | A description of the search result. +srsDescription :: Lens' SearchResultSNIppet (Maybe Text) +srsDescription + = lens _srsDescription + (\ s a -> s{_srsDescription = a}) + +instance FromJSON SearchResultSNIppet where + parseJSON + = withObject "SearchResultSNIppet" + (\ o -> + SearchResultSNIppet <$> + (o .:? "publishedAt") <*> (o .:? "channelTitle") <*> + (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "title") + <*> (o .:? "liveBroadcastContent") + <*> (o .:? "description")) + +instance ToJSON SearchResultSNIppet where + toJSON SearchResultSNIppet{..} + = object + (catMaybes + [("publishedAt" .=) <$> _srsPublishedAt, + ("channelTitle" .=) <$> _srsChannelTitle, + ("channelId" .=) <$> _srsChannelId, + ("thumbnails" .=) <$> _srsThumbnails, + ("title" .=) <$> _srsTitle, + ("liveBroadcastContent" .=) <$> + _srsLiveBroadcastContent, + ("description" .=) <$> _srsDescription]) + +-- +-- /See:/ 'videoConversionPings' smart constructor. +newtype VideoConversionPings = VideoConversionPings + { _vcpPings :: Maybe [Maybe VideoConversionPing] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoConversionPings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcpPings' +videoConversionPings + :: VideoConversionPings +videoConversionPings = + VideoConversionPings + { _vcpPings = Nothing + } + +-- | Pings that the app shall fire for a video (authenticated by biscotti +-- cookie). Each ping has a context, in which the app must fire the ping, +-- and a url identifying the ping. +vcpPings :: Lens' VideoConversionPings [Maybe VideoConversionPing] +vcpPings + = lens _vcpPings (\ s a -> s{_vcpPings = a}) . + _Default + . _Coerce + +instance FromJSON VideoConversionPings where + parseJSON + = withObject "VideoConversionPings" + (\ o -> + VideoConversionPings <$> (o .:? "pings" .!= mempty)) + +instance ToJSON VideoConversionPings where + toJSON VideoConversionPings{..} + = object (catMaybes [("pings" .=) <$> _vcpPings]) + +-- | Localized versions of certain video properties (e.g. title). +-- +-- /See:/ 'videoLocalization' smart constructor. +data VideoLocalization = VideoLocalization + { _vlTitle :: !(Maybe Text) + , _vlDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoLocalization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vlTitle' +-- +-- * 'vlDescription' +videoLocalization + :: VideoLocalization +videoLocalization = + VideoLocalization + { _vlTitle = Nothing + , _vlDescription = Nothing + } + +-- | Localized version of the video\'s title. +vlTitle :: Lens' VideoLocalization (Maybe Text) +vlTitle = lens _vlTitle (\ s a -> s{_vlTitle = a}) + +-- | Localized version of the video\'s description. +vlDescription :: Lens' VideoLocalization (Maybe Text) +vlDescription + = lens _vlDescription + (\ s a -> s{_vlDescription = a}) + +instance FromJSON VideoLocalization where + parseJSON + = withObject "VideoLocalization" + (\ o -> + VideoLocalization <$> + (o .:? "title") <*> (o .:? "description")) + +instance ToJSON VideoLocalization where + toJSON VideoLocalization{..} + = object + (catMaybes + [("title" .=) <$> _vlTitle, + ("description" .=) <$> _vlDescription]) + +-- +-- /See:/ 'playlistItemListResponse' smart constructor. +data PlaylistItemListResponse = PlaylistItemListResponse + { _pilrEtag :: !(Maybe Text) + , _pilrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _pilrNextPageToken :: !(Maybe Text) + , _pilrPageInfo :: !(Maybe (Maybe PageInfo)) + , _pilrKind :: !Text + , _pilrItems :: !(Maybe [Maybe PlaylistItem]) + , _pilrVisitorId :: !(Maybe Text) + , _pilrEventId :: !(Maybe Text) + , _pilrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pilrEtag' +-- +-- * 'pilrTokenPagination' +-- +-- * 'pilrNextPageToken' +-- +-- * 'pilrPageInfo' +-- +-- * 'pilrKind' +-- +-- * 'pilrItems' +-- +-- * 'pilrVisitorId' +-- +-- * 'pilrEventId' +-- +-- * 'pilrPrevPageToken' +playlistItemListResponse + :: PlaylistItemListResponse +playlistItemListResponse = + PlaylistItemListResponse + { _pilrEtag = Nothing + , _pilrTokenPagination = Nothing + , _pilrNextPageToken = Nothing + , _pilrPageInfo = Nothing + , _pilrKind = "youtube#playlistItemListResponse" + , _pilrItems = Nothing + , _pilrVisitorId = Nothing + , _pilrEventId = Nothing + , _pilrPrevPageToken = Nothing + } + +-- | Etag of this resource. +pilrEtag :: Lens' PlaylistItemListResponse (Maybe Text) +pilrEtag = lens _pilrEtag (\ s a -> s{_pilrEtag = a}) + +pilrTokenPagination :: Lens' PlaylistItemListResponse (Maybe (Maybe TokenPagination)) +pilrTokenPagination + = lens _pilrTokenPagination + (\ s a -> s{_pilrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +pilrNextPageToken :: Lens' PlaylistItemListResponse (Maybe Text) +pilrNextPageToken + = lens _pilrNextPageToken + (\ s a -> s{_pilrNextPageToken = a}) + +pilrPageInfo :: Lens' PlaylistItemListResponse (Maybe (Maybe PageInfo)) +pilrPageInfo + = lens _pilrPageInfo (\ s a -> s{_pilrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#playlistItemListResponse\". +pilrKind :: Lens' PlaylistItemListResponse Text +pilrKind = lens _pilrKind (\ s a -> s{_pilrKind = a}) + +-- | A list of playlist items that match the request criteria. +pilrItems :: Lens' PlaylistItemListResponse [Maybe PlaylistItem] +pilrItems + = lens _pilrItems (\ s a -> s{_pilrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +pilrVisitorId :: Lens' PlaylistItemListResponse (Maybe Text) +pilrVisitorId + = lens _pilrVisitorId + (\ s a -> s{_pilrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +pilrEventId :: Lens' PlaylistItemListResponse (Maybe Text) +pilrEventId + = lens _pilrEventId (\ s a -> s{_pilrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +pilrPrevPageToken :: Lens' PlaylistItemListResponse (Maybe Text) +pilrPrevPageToken + = lens _pilrPrevPageToken + (\ s a -> s{_pilrPrevPageToken = a}) + +instance FromJSON PlaylistItemListResponse where + parseJSON + = withObject "PlaylistItemListResponse" + (\ o -> + PlaylistItemListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= "youtube#playlistItemListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON PlaylistItemListResponse where + toJSON PlaylistItemListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _pilrEtag, + ("tokenPagination" .=) <$> _pilrTokenPagination, + ("nextPageToken" .=) <$> _pilrNextPageToken, + ("pageInfo" .=) <$> _pilrPageInfo, + Just ("kind" .= _pilrKind), + ("items" .=) <$> _pilrItems, + ("visitorId" .=) <$> _pilrVisitorId, + ("eventId" .=) <$> _pilrEventId, + ("prevPageToken" .=) <$> _pilrPrevPageToken]) + +-- +-- /See:/ 'liveStreamHealthStatus' smart constructor. +data LiveStreamHealthStatus = LiveStreamHealthStatus + { _lshsStatus :: !(Maybe Text) + , _lshsConfigurationIssues :: !(Maybe [Maybe LiveStreamConfigurationIssue]) + , _lshsLastUpdateTimeSeconds :: !(Maybe Word64) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamHealthStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lshsStatus' +-- +-- * 'lshsConfigurationIssues' +-- +-- * 'lshsLastUpdateTimeSeconds' +liveStreamHealthStatus + :: LiveStreamHealthStatus +liveStreamHealthStatus = + LiveStreamHealthStatus + { _lshsStatus = Nothing + , _lshsConfigurationIssues = Nothing + , _lshsLastUpdateTimeSeconds = Nothing + } + +-- | The status code of this stream +lshsStatus :: Lens' LiveStreamHealthStatus (Maybe Text) +lshsStatus + = lens _lshsStatus (\ s a -> s{_lshsStatus = a}) + +-- | The configurations issues on this stream +lshsConfigurationIssues :: Lens' LiveStreamHealthStatus [Maybe LiveStreamConfigurationIssue] +lshsConfigurationIssues + = lens _lshsConfigurationIssues + (\ s a -> s{_lshsConfigurationIssues = a}) + . _Default + . _Coerce + +-- | The last time this status was updated (in seconds) +lshsLastUpdateTimeSeconds :: Lens' LiveStreamHealthStatus (Maybe Word64) +lshsLastUpdateTimeSeconds + = lens _lshsLastUpdateTimeSeconds + (\ s a -> s{_lshsLastUpdateTimeSeconds = a}) + +instance FromJSON LiveStreamHealthStatus where + parseJSON + = withObject "LiveStreamHealthStatus" + (\ o -> + LiveStreamHealthStatus <$> + (o .:? "status") <*> + (o .:? "configurationIssues" .!= mempty) + <*> (o .:? "lastUpdateTimeSeconds")) + +instance ToJSON LiveStreamHealthStatus where + toJSON LiveStreamHealthStatus{..} + = object + (catMaybes + [("status" .=) <$> _lshsStatus, + ("configurationIssues" .=) <$> + _lshsConfigurationIssues, + ("lastUpdateTimeSeconds" .=) <$> + _lshsLastUpdateTimeSeconds]) + +-- +-- /See:/ 'commentListResponse' smart constructor. +data CommentListResponse = CommentListResponse + { _comEtag :: !(Maybe Text) + , _comTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _comNextPageToken :: !(Maybe Text) + , _comPageInfo :: !(Maybe (Maybe PageInfo)) + , _comKind :: !Text + , _comItems :: !(Maybe [Maybe Comment]) + , _comVisitorId :: !(Maybe Text) + , _comEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'comEtag' +-- +-- * 'comTokenPagination' +-- +-- * 'comNextPageToken' +-- +-- * 'comPageInfo' +-- +-- * 'comKind' +-- +-- * 'comItems' +-- +-- * 'comVisitorId' +-- +-- * 'comEventId' +commentListResponse + :: CommentListResponse +commentListResponse = + CommentListResponse + { _comEtag = Nothing + , _comTokenPagination = Nothing + , _comNextPageToken = Nothing + , _comPageInfo = Nothing + , _comKind = "youtube#commentListResponse" + , _comItems = Nothing + , _comVisitorId = Nothing + , _comEventId = Nothing + } + +-- | Etag of this resource. +comEtag :: Lens' CommentListResponse (Maybe Text) +comEtag = lens _comEtag (\ s a -> s{_comEtag = a}) + +comTokenPagination :: Lens' CommentListResponse (Maybe (Maybe TokenPagination)) +comTokenPagination + = lens _comTokenPagination + (\ s a -> s{_comTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +comNextPageToken :: Lens' CommentListResponse (Maybe Text) +comNextPageToken + = lens _comNextPageToken + (\ s a -> s{_comNextPageToken = a}) + +comPageInfo :: Lens' CommentListResponse (Maybe (Maybe PageInfo)) +comPageInfo + = lens _comPageInfo (\ s a -> s{_comPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#commentListResponse\". +comKind :: Lens' CommentListResponse Text +comKind = lens _comKind (\ s a -> s{_comKind = a}) + +-- | A list of comments that match the request criteria. +comItems :: Lens' CommentListResponse [Maybe Comment] +comItems + = lens _comItems (\ s a -> s{_comItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +comVisitorId :: Lens' CommentListResponse (Maybe Text) +comVisitorId + = lens _comVisitorId (\ s a -> s{_comVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +comEventId :: Lens' CommentListResponse (Maybe Text) +comEventId + = lens _comEventId (\ s a -> s{_comEventId = a}) + +instance FromJSON CommentListResponse where + parseJSON + = withObject "CommentListResponse" + (\ o -> + CommentListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> (o .:? "kind" .!= "youtube#commentListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON CommentListResponse where + toJSON CommentListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _comEtag, + ("tokenPagination" .=) <$> _comTokenPagination, + ("nextPageToken" .=) <$> _comNextPageToken, + ("pageInfo" .=) <$> _comPageInfo, + Just ("kind" .= _comKind), + ("items" .=) <$> _comItems, + ("visitorId" .=) <$> _comVisitorId, + ("eventId" .=) <$> _comEventId]) + +-- | Player to be used for a video playback. +-- +-- /See:/ 'videoPlayer' smart constructor. +newtype VideoPlayer = VideoPlayer + { _vpEmbedHtml :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoPlayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vpEmbedHtml' +videoPlayer + :: VideoPlayer +videoPlayer = + VideoPlayer + { _vpEmbedHtml = Nothing + } + +-- | An +-- tag that embeds a player that will play the video. +vpEmbedHtml :: Lens' VideoPlayer (Maybe Text) +vpEmbedHtml + = lens _vpEmbedHtml (\ s a -> s{_vpEmbedHtml = a}) + +instance FromJSON VideoPlayer where + parseJSON + = withObject "VideoPlayer" + (\ o -> VideoPlayer <$> (o .:? "embedHtml")) + +instance ToJSON VideoPlayer where + toJSON VideoPlayer{..} + = object + (catMaybes [("embedHtml" .=) <$> _vpEmbedHtml]) + +-- +-- /See:/ 'localizedString' smart constructor. +data LocalizedString = LocalizedString + { _lsValue :: !(Maybe Text) + , _lsLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocalizedString' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lsValue' +-- +-- * 'lsLanguage' +localizedString + :: LocalizedString +localizedString = + LocalizedString + { _lsValue = Nothing + , _lsLanguage = Nothing + } + +lsValue :: Lens' LocalizedString (Maybe Text) +lsValue = lens _lsValue (\ s a -> s{_lsValue = a}) + +lsLanguage :: Lens' LocalizedString (Maybe Text) +lsLanguage + = lens _lsLanguage (\ s a -> s{_lsLanguage = a}) + +instance FromJSON LocalizedString where + parseJSON + = withObject "LocalizedString" + (\ o -> + LocalizedString <$> + (o .:? "value") <*> (o .:? "language")) + +instance ToJSON LocalizedString where + toJSON LocalizedString{..} + = object + (catMaybes + [("value" .=) <$> _lsValue, + ("language" .=) <$> _lsLanguage]) + +-- +-- /See:/ 'subscriptionListResponse' smart constructor. +data SubscriptionListResponse = SubscriptionListResponse + { _sEtag :: !(Maybe Text) + , _sTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _sNextPageToken :: !(Maybe Text) + , _sPageInfo :: !(Maybe (Maybe PageInfo)) + , _sKind :: !Text + , _sItems :: !(Maybe [Maybe Subscription]) + , _sVisitorId :: !(Maybe Text) + , _sEventId :: !(Maybe Text) + , _sPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'sEtag' +-- +-- * 'sTokenPagination' +-- +-- * 'sNextPageToken' +-- +-- * 'sPageInfo' +-- +-- * 'sKind' +-- +-- * 'sItems' +-- +-- * 'sVisitorId' +-- +-- * 'sEventId' +-- +-- * 'sPrevPageToken' +subscriptionListResponse + :: SubscriptionListResponse +subscriptionListResponse = + SubscriptionListResponse + { _sEtag = Nothing + , _sTokenPagination = Nothing + , _sNextPageToken = Nothing + , _sPageInfo = Nothing + , _sKind = "youtube#subscriptionListResponse" + , _sItems = Nothing + , _sVisitorId = Nothing + , _sEventId = Nothing + , _sPrevPageToken = Nothing + } + +-- | Etag of this resource. +sEtag :: Lens' SubscriptionListResponse (Maybe Text) +sEtag = lens _sEtag (\ s a -> s{_sEtag = a}) + +sTokenPagination :: Lens' SubscriptionListResponse (Maybe (Maybe TokenPagination)) +sTokenPagination + = lens _sTokenPagination + (\ s a -> s{_sTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +sNextPageToken :: Lens' SubscriptionListResponse (Maybe Text) +sNextPageToken + = lens _sNextPageToken + (\ s a -> s{_sNextPageToken = a}) + +sPageInfo :: Lens' SubscriptionListResponse (Maybe (Maybe PageInfo)) +sPageInfo + = lens _sPageInfo (\ s a -> s{_sPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#subscriptionListResponse\". +sKind :: Lens' SubscriptionListResponse Text +sKind = lens _sKind (\ s a -> s{_sKind = a}) + +-- | A list of subscriptions that match the request criteria. +sItems :: Lens' SubscriptionListResponse [Maybe Subscription] +sItems + = lens _sItems (\ s a -> s{_sItems = a}) . _Default . + _Coerce + +-- | The visitorId identifies the visitor. +sVisitorId :: Lens' SubscriptionListResponse (Maybe Text) +sVisitorId + = lens _sVisitorId (\ s a -> s{_sVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +sEventId :: Lens' SubscriptionListResponse (Maybe Text) +sEventId = lens _sEventId (\ s a -> s{_sEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +sPrevPageToken :: Lens' SubscriptionListResponse (Maybe Text) +sPrevPageToken + = lens _sPrevPageToken + (\ s a -> s{_sPrevPageToken = a}) + +instance FromJSON SubscriptionListResponse where + parseJSON + = withObject "SubscriptionListResponse" + (\ o -> + SubscriptionListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= "youtube#subscriptionListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON SubscriptionListResponse where + toJSON SubscriptionListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _sEtag, + ("tokenPagination" .=) <$> _sTokenPagination, + ("nextPageToken" .=) <$> _sNextPageToken, + ("pageInfo" .=) <$> _sPageInfo, + Just ("kind" .= _sKind), ("items" .=) <$> _sItems, + ("visitorId" .=) <$> _sVisitorId, + ("eventId" .=) <$> _sEventId, + ("prevPageToken" .=) <$> _sPrevPageToken]) + +-- | A guideCategory resource identifies a category that YouTube +-- algorithmically assigns based on a channel\'s content or other +-- indicators, such as the channel\'s popularity. The list is similar to +-- video categories, with the difference being that a video\'s uploader can +-- assign a video category but only YouTube can assign a channel category. +-- +-- /See:/ 'guideCategory' smart constructor. +data GuideCategory = GuideCategory + { _gcEtag :: !(Maybe Text) + , _gcSnippet :: !(Maybe (Maybe GuideCategorySNIppet)) + , _gcKind :: !Text + , _gcId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GuideCategory' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gcEtag' +-- +-- * 'gcSnippet' +-- +-- * 'gcKind' +-- +-- * 'gcId' +guideCategory + :: GuideCategory +guideCategory = + GuideCategory + { _gcEtag = Nothing + , _gcSnippet = Nothing + , _gcKind = "youtube#guideCategory" + , _gcId = Nothing + } + +-- | Etag of this resource. +gcEtag :: Lens' GuideCategory (Maybe Text) +gcEtag = lens _gcEtag (\ s a -> s{_gcEtag = a}) + +-- | The snippet object contains basic details about the category, such as +-- its title. +gcSnippet :: Lens' GuideCategory (Maybe (Maybe GuideCategorySNIppet)) +gcSnippet + = lens _gcSnippet (\ s a -> s{_gcSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#guideCategory\". +gcKind :: Lens' GuideCategory Text +gcKind = lens _gcKind (\ s a -> s{_gcKind = a}) + +-- | The ID that YouTube uses to uniquely identify the guide category. +gcId :: Lens' GuideCategory (Maybe Text) +gcId = lens _gcId (\ s a -> s{_gcId = a}) + +instance FromJSON GuideCategory where + parseJSON + = withObject "GuideCategory" + (\ o -> + GuideCategory <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#guideCategory") + <*> (o .:? "id")) + +instance ToJSON GuideCategory where + toJSON GuideCategory{..} + = object + (catMaybes + [("etag" .=) <$> _gcEtag, + ("snippet" .=) <$> _gcSnippet, + Just ("kind" .= _gcKind), ("id" .=) <$> _gcId]) + +-- +-- /See:/ 'i18nLanguageListResponse' smart constructor. +data I18nLanguageListResponse = I18nLanguageListResponse + { _illrEtag :: !(Maybe Text) + , _illrKind :: !Text + , _illrItems :: !(Maybe [Maybe I18nLanguage]) + , _illrVisitorId :: !(Maybe Text) + , _illrEventId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nLanguageListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'illrEtag' +-- +-- * 'illrKind' +-- +-- * 'illrItems' +-- +-- * 'illrVisitorId' +-- +-- * 'illrEventId' +i18nLanguageListResponse + :: I18nLanguageListResponse +i18nLanguageListResponse = + I18nLanguageListResponse + { _illrEtag = Nothing + , _illrKind = "youtube#i18nLanguageListResponse" + , _illrItems = Nothing + , _illrVisitorId = Nothing + , _illrEventId = Nothing + } + +-- | Etag of this resource. +illrEtag :: Lens' I18nLanguageListResponse (Maybe Text) +illrEtag = lens _illrEtag (\ s a -> s{_illrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#i18nLanguageListResponse\". +illrKind :: Lens' I18nLanguageListResponse Text +illrKind = lens _illrKind (\ s a -> s{_illrKind = a}) + +-- | A list of supported i18n languages. In this map, the i18n language ID is +-- the map key, and its value is the corresponding i18nLanguage resource. +illrItems :: Lens' I18nLanguageListResponse [Maybe I18nLanguage] +illrItems + = lens _illrItems (\ s a -> s{_illrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +illrVisitorId :: Lens' I18nLanguageListResponse (Maybe Text) +illrVisitorId + = lens _illrVisitorId + (\ s a -> s{_illrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +illrEventId :: Lens' I18nLanguageListResponse (Maybe Text) +illrEventId + = lens _illrEventId (\ s a -> s{_illrEventId = a}) + +instance FromJSON I18nLanguageListResponse where + parseJSON + = withObject "I18nLanguageListResponse" + (\ o -> + I18nLanguageListResponse <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#i18nLanguageListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId")) + +instance ToJSON I18nLanguageListResponse where + toJSON I18nLanguageListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _illrEtag, + Just ("kind" .= _illrKind), + ("items" .=) <$> _illrItems, + ("visitorId" .=) <$> _illrVisitorId, + ("eventId" .=) <$> _illrEventId]) + +-- +-- /See:/ 'invideoBranding' smart constructor. +data InvideoBranding = InvideoBranding + { _ibImageUrl :: !(Maybe Text) + , _ibTargetChannelId :: !(Maybe Text) + , _ibTiming :: !(Maybe (Maybe InvideoTiming)) + , _ibImageBytes :: !(Maybe Word8) + , _ibPosition :: !(Maybe (Maybe InvideoPosition)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvideoBranding' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ibImageUrl' +-- +-- * 'ibTargetChannelId' +-- +-- * 'ibTiming' +-- +-- * 'ibImageBytes' +-- +-- * 'ibPosition' +invideoBranding + :: InvideoBranding +invideoBranding = + InvideoBranding + { _ibImageUrl = Nothing + , _ibTargetChannelId = Nothing + , _ibTiming = Nothing + , _ibImageBytes = Nothing + , _ibPosition = Nothing + } + +ibImageUrl :: Lens' InvideoBranding (Maybe Text) +ibImageUrl + = lens _ibImageUrl (\ s a -> s{_ibImageUrl = a}) + +ibTargetChannelId :: Lens' InvideoBranding (Maybe Text) +ibTargetChannelId + = lens _ibTargetChannelId + (\ s a -> s{_ibTargetChannelId = a}) + +ibTiming :: Lens' InvideoBranding (Maybe (Maybe InvideoTiming)) +ibTiming = lens _ibTiming (\ s a -> s{_ibTiming = a}) + +ibImageBytes :: Lens' InvideoBranding (Maybe Word8) +ibImageBytes + = lens _ibImageBytes (\ s a -> s{_ibImageBytes = a}) + +ibPosition :: Lens' InvideoBranding (Maybe (Maybe InvideoPosition)) +ibPosition + = lens _ibPosition (\ s a -> s{_ibPosition = a}) + +instance FromJSON InvideoBranding where + parseJSON + = withObject "InvideoBranding" + (\ o -> + InvideoBranding <$> + (o .:? "imageUrl") <*> (o .:? "targetChannelId") <*> + (o .:? "timing") + <*> (o .:? "imageBytes") + <*> (o .:? "position")) + +instance ToJSON InvideoBranding where + toJSON InvideoBranding{..} + = object + (catMaybes + [("imageUrl" .=) <$> _ibImageUrl, + ("targetChannelId" .=) <$> _ibTargetChannelId, + ("timing" .=) <$> _ibTiming, + ("imageBytes" .=) <$> _ibImageBytes, + ("position" .=) <$> _ibPosition]) + +-- | Branding properties of a YouTube channel. +-- +-- /See:/ 'channelBrandingSettings' smart constructor. +data ChannelBrandingSettings = ChannelBrandingSettings + { _cbsImage :: !(Maybe (Maybe ImageSettings)) + , _cbsHints :: !(Maybe [Maybe PropertyValue]) + , _cbsChannel :: !(Maybe (Maybe ChannelSettings)) + , _cbsWatch :: !(Maybe (Maybe WatchSettings)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelBrandingSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cbsImage' +-- +-- * 'cbsHints' +-- +-- * 'cbsChannel' +-- +-- * 'cbsWatch' +channelBrandingSettings + :: ChannelBrandingSettings +channelBrandingSettings = + ChannelBrandingSettings + { _cbsImage = Nothing + , _cbsHints = Nothing + , _cbsChannel = Nothing + , _cbsWatch = Nothing + } + +-- | Branding properties for branding images. +cbsImage :: Lens' ChannelBrandingSettings (Maybe (Maybe ImageSettings)) +cbsImage = lens _cbsImage (\ s a -> s{_cbsImage = a}) + +-- | Additional experimental branding properties. +cbsHints :: Lens' ChannelBrandingSettings [Maybe PropertyValue] +cbsHints + = lens _cbsHints (\ s a -> s{_cbsHints = a}) . + _Default + . _Coerce + +-- | Branding properties for the channel view. +cbsChannel :: Lens' ChannelBrandingSettings (Maybe (Maybe ChannelSettings)) +cbsChannel + = lens _cbsChannel (\ s a -> s{_cbsChannel = a}) + +-- | Branding properties for the watch page. +cbsWatch :: Lens' ChannelBrandingSettings (Maybe (Maybe WatchSettings)) +cbsWatch = lens _cbsWatch (\ s a -> s{_cbsWatch = a}) + +instance FromJSON ChannelBrandingSettings where + parseJSON + = withObject "ChannelBrandingSettings" + (\ o -> + ChannelBrandingSettings <$> + (o .:? "image") <*> (o .:? "hints" .!= mempty) <*> + (o .:? "channel") + <*> (o .:? "watch")) + +instance ToJSON ChannelBrandingSettings where + toJSON ChannelBrandingSettings{..} + = object + (catMaybes + [("image" .=) <$> _cbsImage, + ("hints" .=) <$> _cbsHints, + ("channel" .=) <$> _cbsChannel, + ("watch" .=) <$> _cbsWatch]) + +-- | Describes an invideo promotion campaign consisting of multiple promoted +-- items. A campaign belongs to a single channel_id. +-- +-- /See:/ 'invideoPromotion' smart constructor. +data InvideoPromotion = InvideoPromotion + { _ipUseSmartTiming :: !(Maybe Bool) + , _ipItems :: !(Maybe [Maybe PromotedItem]) + , _ipDefaultTiming :: !(Maybe (Maybe InvideoTiming)) + , _ipPosition :: !(Maybe (Maybe InvideoPosition)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'InvideoPromotion' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ipUseSmartTiming' +-- +-- * 'ipItems' +-- +-- * 'ipDefaultTiming' +-- +-- * 'ipPosition' +invideoPromotion + :: InvideoPromotion +invideoPromotion = + InvideoPromotion + { _ipUseSmartTiming = Nothing + , _ipItems = Nothing + , _ipDefaultTiming = Nothing + , _ipPosition = Nothing + } + +-- | Indicates whether the channel\'s promotional campaign uses \"smart +-- timing.\" This feature attempts to show promotions at a point in the +-- video when they are more likely to be clicked and less likely to disrupt +-- the viewing experience. This feature also picks up a single promotion to +-- show on each video. +ipUseSmartTiming :: Lens' InvideoPromotion (Maybe Bool) +ipUseSmartTiming + = lens _ipUseSmartTiming + (\ s a -> s{_ipUseSmartTiming = a}) + +-- | List of promoted items in decreasing priority. +ipItems :: Lens' InvideoPromotion [Maybe PromotedItem] +ipItems + = lens _ipItems (\ s a -> s{_ipItems = a}) . _Default + . _Coerce + +-- | The default temporal position within the video where the promoted item +-- will be displayed. Can be overriden by more specific timing in the item. +ipDefaultTiming :: Lens' InvideoPromotion (Maybe (Maybe InvideoTiming)) +ipDefaultTiming + = lens _ipDefaultTiming + (\ s a -> s{_ipDefaultTiming = a}) + +-- | The spatial position within the video where the promoted item will be +-- displayed. +ipPosition :: Lens' InvideoPromotion (Maybe (Maybe InvideoPosition)) +ipPosition + = lens _ipPosition (\ s a -> s{_ipPosition = a}) + +instance FromJSON InvideoPromotion where + parseJSON + = withObject "InvideoPromotion" + (\ o -> + InvideoPromotion <$> + (o .:? "useSmartTiming") <*> + (o .:? "items" .!= mempty) + <*> (o .:? "defaultTiming") + <*> (o .:? "position")) + +instance ToJSON InvideoPromotion where + toJSON InvideoPromotion{..} + = object + (catMaybes + [("useSmartTiming" .=) <$> _ipUseSmartTiming, + ("items" .=) <$> _ipItems, + ("defaultTiming" .=) <$> _ipDefaultTiming, + ("position" .=) <$> _ipPosition]) + +-- +-- /See:/ 'playlistPlayer' smart constructor. +newtype PlaylistPlayer = PlaylistPlayer + { _ppEmbedHtml :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistPlayer' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ppEmbedHtml' +playlistPlayer + :: PlaylistPlayer +playlistPlayer = + PlaylistPlayer + { _ppEmbedHtml = Nothing + } + +-- | An +-- tag that embeds a player that will play the playlist. +ppEmbedHtml :: Lens' PlaylistPlayer (Maybe Text) +ppEmbedHtml + = lens _ppEmbedHtml (\ s a -> s{_ppEmbedHtml = a}) + +instance FromJSON PlaylistPlayer where + parseJSON + = withObject "PlaylistPlayer" + (\ o -> PlaylistPlayer <$> (o .:? "embedHtml")) + +instance ToJSON PlaylistPlayer where + toJSON PlaylistPlayer{..} + = object + (catMaybes [("embedHtml" .=) <$> _ppEmbedHtml]) + +-- | A comment thread represents information that applies to a top level +-- comment and all its replies. It can also include the top level comment +-- itself and some of the replies. +-- +-- /See:/ 'commentThread' smart constructor. +data CommentThread = CommentThread + { _ctEtag :: !(Maybe Text) + , _ctSnippet :: !(Maybe (Maybe CommentThreadSNIppet)) + , _ctKind :: !Text + , _ctReplies :: !(Maybe (Maybe CommentThreadReplies)) + , _ctId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThread' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctEtag' +-- +-- * 'ctSnippet' +-- +-- * 'ctKind' +-- +-- * 'ctReplies' +-- +-- * 'ctId' +commentThread + :: CommentThread +commentThread = + CommentThread + { _ctEtag = Nothing + , _ctSnippet = Nothing + , _ctKind = "youtube#commentThread" + , _ctReplies = Nothing + , _ctId = Nothing + } + +-- | Etag of this resource. +ctEtag :: Lens' CommentThread (Maybe Text) +ctEtag = lens _ctEtag (\ s a -> s{_ctEtag = a}) + +-- | The snippet object contains basic details about the comment thread and +-- also the top level comment. +ctSnippet :: Lens' CommentThread (Maybe (Maybe CommentThreadSNIppet)) +ctSnippet + = lens _ctSnippet (\ s a -> s{_ctSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#commentThread\". +ctKind :: Lens' CommentThread Text +ctKind = lens _ctKind (\ s a -> s{_ctKind = a}) + +-- | The replies object contains a limited number of replies (if any) to the +-- top level comment found in the snippet. +ctReplies :: Lens' CommentThread (Maybe (Maybe CommentThreadReplies)) +ctReplies + = lens _ctReplies (\ s a -> s{_ctReplies = a}) + +-- | The ID that YouTube uses to uniquely identify the comment thread. +ctId :: Lens' CommentThread (Maybe Text) +ctId = lens _ctId (\ s a -> s{_ctId = a}) + +instance FromJSON CommentThread where + parseJSON + = withObject "CommentThread" + (\ o -> + CommentThread <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#commentThread") + <*> (o .:? "replies") + <*> (o .:? "id")) + +instance ToJSON CommentThread where + toJSON CommentThread{..} + = object + (catMaybes + [("etag" .=) <$> _ctEtag, + ("snippet" .=) <$> _ctSnippet, + Just ("kind" .= _ctKind), + ("replies" .=) <$> _ctReplies, ("id" .=) <$> _ctId]) + +-- | Playlist localization setting +-- +-- /See:/ 'playlistLocalization' smart constructor. +data PlaylistLocalization = PlaylistLocalization + { _plTitle :: !(Maybe Text) + , _plDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistLocalization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plTitle' +-- +-- * 'plDescription' +playlistLocalization + :: PlaylistLocalization +playlistLocalization = + PlaylistLocalization + { _plTitle = Nothing + , _plDescription = Nothing + } + +-- | The localized strings for playlist\'s title. +plTitle :: Lens' PlaylistLocalization (Maybe Text) +plTitle = lens _plTitle (\ s a -> s{_plTitle = a}) + +-- | The localized strings for playlist\'s description. +plDescription :: Lens' PlaylistLocalization (Maybe Text) +plDescription + = lens _plDescription + (\ s a -> s{_plDescription = a}) + +instance FromJSON PlaylistLocalization where + parseJSON + = withObject "PlaylistLocalization" + (\ o -> + PlaylistLocalization <$> + (o .:? "title") <*> (o .:? "description")) + +instance ToJSON PlaylistLocalization where + toJSON PlaylistLocalization{..} + = object + (catMaybes + [("title" .=) <$> _plTitle, + ("description" .=) <$> _plDescription]) + +-- | An activity resource contains information about an action that a +-- particular channel, or user, has taken on YouTube.The actions reported +-- in activity feeds include rating a video, sharing a video, marking a +-- video as a favorite, commenting on a video, uploading a video, and so +-- forth. Each activity resource identifies the type of action, the channel +-- associated with the action, and the resource(s) associated with the +-- action, such as the video that was rated or uploaded. +-- +-- /See:/ 'activity' smart constructor. +data Activity = Activity + { _aEtag :: !(Maybe Text) + , _aSnippet :: !(Maybe (Maybe ActivitySNIppet)) + , _aKind :: !Text + , _aContentDetails :: !(Maybe (Maybe ActivityContentDetails)) + , _aId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Activity' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'aEtag' +-- +-- * 'aSnippet' +-- +-- * 'aKind' +-- +-- * 'aContentDetails' +-- +-- * 'aId' +activity + :: Activity +activity = + Activity + { _aEtag = Nothing + , _aSnippet = Nothing + , _aKind = "youtube#activity" + , _aContentDetails = Nothing + , _aId = Nothing + } + +-- | Etag of this resource. +aEtag :: Lens' Activity (Maybe Text) +aEtag = lens _aEtag (\ s a -> s{_aEtag = a}) + +-- | The snippet object contains basic details about the activity, including +-- the activity\'s type and group ID. +aSnippet :: Lens' Activity (Maybe (Maybe ActivitySNIppet)) +aSnippet = lens _aSnippet (\ s a -> s{_aSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#activity\". +aKind :: Lens' Activity Text +aKind = lens _aKind (\ s a -> s{_aKind = a}) + +-- | The contentDetails object contains information about the content +-- associated with the activity. For example, if the snippet.type value is +-- videoRated, then the contentDetails object\'s content identifies the +-- rated video. +aContentDetails :: Lens' Activity (Maybe (Maybe ActivityContentDetails)) +aContentDetails + = lens _aContentDetails + (\ s a -> s{_aContentDetails = a}) + +-- | The ID that YouTube uses to uniquely identify the activity. +aId :: Lens' Activity (Maybe Text) +aId = lens _aId (\ s a -> s{_aId = a}) + +instance FromJSON Activity where + parseJSON + = withObject "Activity" + (\ o -> + Activity <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#activity") + <*> (o .:? "contentDetails") + <*> (o .:? "id")) + +instance ToJSON Activity where + toJSON Activity{..} + = object + (catMaybes + [("etag" .=) <$> _aEtag, + ("snippet" .=) <$> _aSnippet, + Just ("kind" .= _aKind), + ("contentDetails" .=) <$> _aContentDetails, + ("id" .=) <$> _aId]) + +-- | A channel banner returned as the response to a channel_banner.insert +-- call. +-- +-- /See:/ 'channelBannerResource' smart constructor. +data ChannelBannerResource = ChannelBannerResource + { _cbrEtag :: !(Maybe Text) + , _cbrKind :: !Text + , _cbrUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelBannerResource' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cbrEtag' +-- +-- * 'cbrKind' +-- +-- * 'cbrUrl' +channelBannerResource + :: ChannelBannerResource +channelBannerResource = + ChannelBannerResource + { _cbrEtag = Nothing + , _cbrKind = "youtube#channelBannerResource" + , _cbrUrl = Nothing + } + +-- | Etag of this resource. +cbrEtag :: Lens' ChannelBannerResource (Maybe Text) +cbrEtag = lens _cbrEtag (\ s a -> s{_cbrEtag = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#channelBannerResource\". +cbrKind :: Lens' ChannelBannerResource Text +cbrKind = lens _cbrKind (\ s a -> s{_cbrKind = a}) + +-- | The URL of this banner image. +cbrUrl :: Lens' ChannelBannerResource (Maybe Text) +cbrUrl = lens _cbrUrl (\ s a -> s{_cbrUrl = a}) + +instance FromJSON ChannelBannerResource where + parseJSON + = withObject "ChannelBannerResource" + (\ o -> + ChannelBannerResource <$> + (o .:? "etag") <*> + (o .:? "kind" .!= "youtube#channelBannerResource") + <*> (o .:? "url")) + +instance ToJSON ChannelBannerResource where + toJSON ChannelBannerResource{..} + = object + (catMaybes + [("etag" .=) <$> _cbrEtag, Just ("kind" .= _cbrKind), + ("url" .=) <$> _cbrUrl]) + +-- +-- /See:/ 'liveBroadcastTopicSNIppet' smart constructor. +data LiveBroadcastTopicSNIppet = LiveBroadcastTopicSNIppet + { _lbtsName :: !(Maybe Text) + , _lbtsReleaseDate :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastTopicSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbtsName' +-- +-- * 'lbtsReleaseDate' +liveBroadcastTopicSNIppet + :: LiveBroadcastTopicSNIppet +liveBroadcastTopicSNIppet = + LiveBroadcastTopicSNIppet + { _lbtsName = Nothing + , _lbtsReleaseDate = Nothing + } + +-- | The name of the topic. +lbtsName :: Lens' LiveBroadcastTopicSNIppet (Maybe Text) +lbtsName = lens _lbtsName (\ s a -> s{_lbtsName = a}) + +-- | The date at which the topic was released. Filled for types: videoGame +lbtsReleaseDate :: Lens' LiveBroadcastTopicSNIppet (Maybe Text) +lbtsReleaseDate + = lens _lbtsReleaseDate + (\ s a -> s{_lbtsReleaseDate = a}) + +instance FromJSON LiveBroadcastTopicSNIppet where + parseJSON + = withObject "LiveBroadcastTopicSNIppet" + (\ o -> + LiveBroadcastTopicSNIppet <$> + (o .:? "name") <*> (o .:? "releaseDate")) + +instance ToJSON LiveBroadcastTopicSNIppet where + toJSON LiveBroadcastTopicSNIppet{..} + = object + (catMaybes + [("name" .=) <$> _lbtsName, + ("releaseDate" .=) <$> _lbtsReleaseDate]) + +-- | The conversionPings object encapsulates information about conversion +-- pings that need to be respected by the channel. +-- +-- /See:/ 'channelConversionPings' smart constructor. +newtype ChannelConversionPings = ChannelConversionPings + { _ccpPings :: Maybe [Maybe ChannelConversionPing] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelConversionPings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccpPings' +channelConversionPings + :: ChannelConversionPings +channelConversionPings = + ChannelConversionPings + { _ccpPings = Nothing + } + +-- | Pings that the app shall fire (authenticated by biscotti cookie). Each +-- ping has a context, in which the app must fire the ping, and a url +-- identifying the ping. +ccpPings :: Lens' ChannelConversionPings [Maybe ChannelConversionPing] +ccpPings + = lens _ccpPings (\ s a -> s{_ccpPings = a}) . + _Default + . _Coerce + +instance FromJSON ChannelConversionPings where + parseJSON + = withObject "ChannelConversionPings" + (\ o -> + ChannelConversionPings <$> + (o .:? "pings" .!= mempty)) + +instance ToJSON ChannelConversionPings where + toJSON ChannelConversionPings{..} + = object (catMaybes [("pings" .=) <$> _ccpPings]) + +-- +-- /See:/ 'playlistItemContentDetails' smart constructor. +data PlaylistItemContentDetails = PlaylistItemContentDetails + { _picdStartAt :: !(Maybe Text) + , _picdNote :: !(Maybe Text) + , _picdVideoId :: !(Maybe Text) + , _picdEndAt :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'picdStartAt' +-- +-- * 'picdNote' +-- +-- * 'picdVideoId' +-- +-- * 'picdEndAt' +playlistItemContentDetails + :: PlaylistItemContentDetails +playlistItemContentDetails = + PlaylistItemContentDetails + { _picdStartAt = Nothing + , _picdNote = Nothing + , _picdVideoId = Nothing + , _picdEndAt = Nothing + } + +-- | The time, measured in seconds from the start of the video, when the +-- video should start playing. (The playlist owner can specify the times +-- when the video should start and stop playing when the video is played in +-- the context of the playlist.) The default value is 0. +picdStartAt :: Lens' PlaylistItemContentDetails (Maybe Text) +picdStartAt + = lens _picdStartAt (\ s a -> s{_picdStartAt = a}) + +-- | A user-generated note for this item. +picdNote :: Lens' PlaylistItemContentDetails (Maybe Text) +picdNote = lens _picdNote (\ s a -> s{_picdNote = a}) + +-- | The ID that YouTube uses to uniquely identify a video. To retrieve the +-- video resource, set the id query parameter to this value in your API +-- request. +picdVideoId :: Lens' PlaylistItemContentDetails (Maybe Text) +picdVideoId + = lens _picdVideoId (\ s a -> s{_picdVideoId = a}) + +-- | The time, measured in seconds from the start of the video, when the +-- video should stop playing. (The playlist owner can specify the times +-- when the video should start and stop playing when the video is played in +-- the context of the playlist.) By default, assume that the video.endTime +-- is the end of the video. +picdEndAt :: Lens' PlaylistItemContentDetails (Maybe Text) +picdEndAt + = lens _picdEndAt (\ s a -> s{_picdEndAt = a}) + +instance FromJSON PlaylistItemContentDetails where + parseJSON + = withObject "PlaylistItemContentDetails" + (\ o -> + PlaylistItemContentDetails <$> + (o .:? "startAt") <*> (o .:? "note") <*> + (o .:? "videoId") + <*> (o .:? "endAt")) + +instance ToJSON PlaylistItemContentDetails where + toJSON PlaylistItemContentDetails{..} + = object + (catMaybes + [("startAt" .=) <$> _picdStartAt, + ("note" .=) <$> _picdNote, + ("videoId" .=) <$> _picdVideoId, + ("endAt" .=) <$> _picdEndAt]) + +-- | Channel localization setting +-- +-- /See:/ 'channelLocalization' smart constructor. +data ChannelLocalization = ChannelLocalization + { _clTitle :: !(Maybe Text) + , _clDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelLocalization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'clTitle' +-- +-- * 'clDescription' +channelLocalization + :: ChannelLocalization +channelLocalization = + ChannelLocalization + { _clTitle = Nothing + , _clDescription = Nothing + } + +-- | The localized strings for channel\'s title. +clTitle :: Lens' ChannelLocalization (Maybe Text) +clTitle = lens _clTitle (\ s a -> s{_clTitle = a}) + +-- | The localized strings for channel\'s description. +clDescription :: Lens' ChannelLocalization (Maybe Text) +clDescription + = lens _clDescription + (\ s a -> s{_clDescription = a}) + +instance FromJSON ChannelLocalization where + parseJSON + = withObject "ChannelLocalization" + (\ o -> + ChannelLocalization <$> + (o .:? "title") <*> (o .:? "description")) + +instance ToJSON ChannelLocalization where + toJSON ChannelLocalization{..} + = object + (catMaybes + [("title" .=) <$> _clTitle, + ("description" .=) <$> _clDescription]) + +-- +-- /See:/ 'videoAgeGating' smart constructor. +data VideoAgeGating = VideoAgeGating + { _vagAlcoholContent :: !(Maybe Bool) + , _vagRestricted :: !(Maybe Bool) + , _vagVideoGameRating :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAgeGating' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vagAlcoholContent' +-- +-- * 'vagRestricted' +-- +-- * 'vagVideoGameRating' +videoAgeGating + :: VideoAgeGating +videoAgeGating = + VideoAgeGating + { _vagAlcoholContent = Nothing + , _vagRestricted = Nothing + , _vagVideoGameRating = Nothing + } + +-- | Indicates whether or not the video has alcoholic beverage content. Only +-- users of legal purchasing age in a particular country, as identified by +-- ICAP, can view the content. +vagAlcoholContent :: Lens' VideoAgeGating (Maybe Bool) +vagAlcoholContent + = lens _vagAlcoholContent + (\ s a -> s{_vagAlcoholContent = a}) + +-- | Age-restricted trailers. For redband trailers and adult-rated +-- video-games. Only users aged 18+ can view the content. The the field is +-- true the content is restricted to viewers aged 18+. Otherwise The field +-- won\'t be present. +vagRestricted :: Lens' VideoAgeGating (Maybe Bool) +vagRestricted + = lens _vagRestricted + (\ s a -> s{_vagRestricted = a}) + +-- | Video game rating, if any. +vagVideoGameRating :: Lens' VideoAgeGating (Maybe Text) +vagVideoGameRating + = lens _vagVideoGameRating + (\ s a -> s{_vagVideoGameRating = a}) + +instance FromJSON VideoAgeGating where + parseJSON + = withObject "VideoAgeGating" + (\ o -> + VideoAgeGating <$> + (o .:? "alcoholContent") <*> (o .:? "restricted") <*> + (o .:? "videoGameRating")) + +instance ToJSON VideoAgeGating where + toJSON VideoAgeGating{..} + = object + (catMaybes + [("alcoholContent" .=) <$> _vagAlcoholContent, + ("restricted" .=) <$> _vagRestricted, + ("videoGameRating" .=) <$> _vagVideoGameRating]) + +-- +-- /See:/ 'localizedProperty' smart constructor. +data LocalizedProperty = LocalizedProperty + { _lpDefault :: !(Maybe Text) + , _lpLocalized :: !(Maybe [Maybe LocalizedString]) + , _lpDefaultLanguage :: !(Maybe (Maybe LanguageTag)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LocalizedProperty' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lpDefault' +-- +-- * 'lpLocalized' +-- +-- * 'lpDefaultLanguage' +localizedProperty + :: LocalizedProperty +localizedProperty = + LocalizedProperty + { _lpDefault = Nothing + , _lpLocalized = Nothing + , _lpDefaultLanguage = Nothing + } + +lpDefault :: Lens' LocalizedProperty (Maybe Text) +lpDefault + = lens _lpDefault (\ s a -> s{_lpDefault = a}) + +lpLocalized :: Lens' LocalizedProperty [Maybe LocalizedString] +lpLocalized + = lens _lpLocalized (\ s a -> s{_lpLocalized = a}) . + _Default + . _Coerce + +-- | The language of the default property. +lpDefaultLanguage :: Lens' LocalizedProperty (Maybe (Maybe LanguageTag)) +lpDefaultLanguage + = lens _lpDefaultLanguage + (\ s a -> s{_lpDefaultLanguage = a}) + +instance FromJSON LocalizedProperty where + parseJSON + = withObject "LocalizedProperty" + (\ o -> + LocalizedProperty <$> + (o .:? "default") <*> (o .:? "localized" .!= mempty) + <*> (o .:? "defaultLanguage")) + +instance ToJSON LocalizedProperty where + toJSON LocalizedProperty{..} + = object + (catMaybes + [("default" .=) <$> _lpDefault, + ("localized" .=) <$> _lpLocalized, + ("defaultLanguage" .=) <$> _lpDefaultLanguage]) + +-- | Information about a video stream. +-- +-- /See:/ 'videoFileDetailsVideoStream' smart constructor. +data VideoFileDetailsVideoStream = VideoFileDetailsVideoStream + { _vfdvsHeightPixels :: !(Maybe Word32) + , _vfdvsBitrateBps :: !(Maybe Word64) + , _vfdvsVendor :: !(Maybe Text) + , _vfdvsRotation :: !(Maybe Text) + , _vfdvsFrameRateFps :: !(Maybe Double) + , _vfdvsCodec :: !(Maybe Text) + , _vfdvsAspectRatio :: !(Maybe Double) + , _vfdvsWidthPixels :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoFileDetailsVideoStream' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vfdvsHeightPixels' +-- +-- * 'vfdvsBitrateBps' +-- +-- * 'vfdvsVendor' +-- +-- * 'vfdvsRotation' +-- +-- * 'vfdvsFrameRateFps' +-- +-- * 'vfdvsCodec' +-- +-- * 'vfdvsAspectRatio' +-- +-- * 'vfdvsWidthPixels' +videoFileDetailsVideoStream + :: VideoFileDetailsVideoStream +videoFileDetailsVideoStream = + VideoFileDetailsVideoStream + { _vfdvsHeightPixels = Nothing + , _vfdvsBitrateBps = Nothing + , _vfdvsVendor = Nothing + , _vfdvsRotation = Nothing + , _vfdvsFrameRateFps = Nothing + , _vfdvsCodec = Nothing + , _vfdvsAspectRatio = Nothing + , _vfdvsWidthPixels = Nothing + } + +-- | The encoded video content\'s height in pixels. +vfdvsHeightPixels :: Lens' VideoFileDetailsVideoStream (Maybe Word32) +vfdvsHeightPixels + = lens _vfdvsHeightPixels + (\ s a -> s{_vfdvsHeightPixels = a}) + +-- | The video stream\'s bitrate, in bits per second. +vfdvsBitrateBps :: Lens' VideoFileDetailsVideoStream (Maybe Word64) +vfdvsBitrateBps + = lens _vfdvsBitrateBps + (\ s a -> s{_vfdvsBitrateBps = a}) + +-- | A value that uniquely identifies a video vendor. Typically, the value is +-- a four-letter vendor code. +vfdvsVendor :: Lens' VideoFileDetailsVideoStream (Maybe Text) +vfdvsVendor + = lens _vfdvsVendor (\ s a -> s{_vfdvsVendor = a}) + +-- | The amount that YouTube needs to rotate the original source content to +-- properly display the video. +vfdvsRotation :: Lens' VideoFileDetailsVideoStream (Maybe Text) +vfdvsRotation + = lens _vfdvsRotation + (\ s a -> s{_vfdvsRotation = a}) + +-- | The video stream\'s frame rate, in frames per second. +vfdvsFrameRateFps :: Lens' VideoFileDetailsVideoStream (Maybe Double) +vfdvsFrameRateFps + = lens _vfdvsFrameRateFps + (\ s a -> s{_vfdvsFrameRateFps = a}) + +-- | The video codec that the stream uses. +vfdvsCodec :: Lens' VideoFileDetailsVideoStream (Maybe Text) +vfdvsCodec + = lens _vfdvsCodec (\ s a -> s{_vfdvsCodec = a}) + +-- | The video content\'s display aspect ratio, which specifies the aspect +-- ratio in which the video should be displayed. +vfdvsAspectRatio :: Lens' VideoFileDetailsVideoStream (Maybe Double) +vfdvsAspectRatio + = lens _vfdvsAspectRatio + (\ s a -> s{_vfdvsAspectRatio = a}) + +-- | The encoded video content\'s width in pixels. You can calculate the +-- video\'s encoding aspect ratio as width_pixels \/ height_pixels. +vfdvsWidthPixels :: Lens' VideoFileDetailsVideoStream (Maybe Word32) +vfdvsWidthPixels + = lens _vfdvsWidthPixels + (\ s a -> s{_vfdvsWidthPixels = a}) + +instance FromJSON VideoFileDetailsVideoStream where + parseJSON + = withObject "VideoFileDetailsVideoStream" + (\ o -> + VideoFileDetailsVideoStream <$> + (o .:? "heightPixels") <*> (o .:? "bitrateBps") <*> + (o .:? "vendor") + <*> (o .:? "rotation") + <*> (o .:? "frameRateFps") + <*> (o .:? "codec") + <*> (o .:? "aspectRatio") + <*> (o .:? "widthPixels")) + +instance ToJSON VideoFileDetailsVideoStream where + toJSON VideoFileDetailsVideoStream{..} + = object + (catMaybes + [("heightPixels" .=) <$> _vfdvsHeightPixels, + ("bitrateBps" .=) <$> _vfdvsBitrateBps, + ("vendor" .=) <$> _vfdvsVendor, + ("rotation" .=) <$> _vfdvsRotation, + ("frameRateFps" .=) <$> _vfdvsFrameRateFps, + ("codec" .=) <$> _vfdvsCodec, + ("aspectRatio" .=) <$> _vfdvsAspectRatio, + ("widthPixels" .=) <$> _vfdvsWidthPixels]) + +-- | Details about the content to witch a subscription refers. +-- +-- /See:/ 'subscriptionContentDetails' smart constructor. +data SubscriptionContentDetails = SubscriptionContentDetails + { _scdActivityType :: !(Maybe Text) + , _scdTotalItemCount :: !(Maybe Word32) + , _scdNewItemCount :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionContentDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'scdActivityType' +-- +-- * 'scdTotalItemCount' +-- +-- * 'scdNewItemCount' +subscriptionContentDetails + :: SubscriptionContentDetails +subscriptionContentDetails = + SubscriptionContentDetails + { _scdActivityType = Nothing + , _scdTotalItemCount = Nothing + , _scdNewItemCount = Nothing + } + +-- | The type of activity this subscription is for (only uploads, +-- everything). +scdActivityType :: Lens' SubscriptionContentDetails (Maybe Text) +scdActivityType + = lens _scdActivityType + (\ s a -> s{_scdActivityType = a}) + +-- | The approximate number of items that the subscription points to. +scdTotalItemCount :: Lens' SubscriptionContentDetails (Maybe Word32) +scdTotalItemCount + = lens _scdTotalItemCount + (\ s a -> s{_scdTotalItemCount = a}) + +-- | The number of new items in the subscription since its content was last +-- read. +scdNewItemCount :: Lens' SubscriptionContentDetails (Maybe Word32) +scdNewItemCount + = lens _scdNewItemCount + (\ s a -> s{_scdNewItemCount = a}) + +instance FromJSON SubscriptionContentDetails where + parseJSON + = withObject "SubscriptionContentDetails" + (\ o -> + SubscriptionContentDetails <$> + (o .:? "activityType") <*> (o .:? "totalItemCount") + <*> (o .:? "newItemCount")) + +instance ToJSON SubscriptionContentDetails where + toJSON SubscriptionContentDetails{..} + = object + (catMaybes + [("activityType" .=) <$> _scdActivityType, + ("totalItemCount" .=) <$> _scdTotalItemCount, + ("newItemCount" .=) <$> _scdNewItemCount]) + +-- +-- /See:/ 'languageTag' smart constructor. +newtype LanguageTag = LanguageTag + { _ltValue :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LanguageTag' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ltValue' +languageTag + :: LanguageTag +languageTag = + LanguageTag + { _ltValue = Nothing + } + +ltValue :: Lens' LanguageTag (Maybe Text) +ltValue = lens _ltValue (\ s a -> s{_ltValue = a}) + +instance FromJSON LanguageTag where + parseJSON + = withObject "LanguageTag" + (\ o -> LanguageTag <$> (o .:? "value")) + +instance ToJSON LanguageTag where + toJSON LanguageTag{..} + = object (catMaybes [("value" .=) <$> _ltValue]) + +-- +-- /See:/ 'liveBroadcastTopic' smart constructor. +data LiveBroadcastTopic = LiveBroadcastTopic + { _lbtSnippet :: !(Maybe (Maybe LiveBroadcastTopicSNIppet)) + , _lbtUnmatched :: !(Maybe Bool) + , _lbtType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveBroadcastTopic' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lbtSnippet' +-- +-- * 'lbtUnmatched' +-- +-- * 'lbtType' +liveBroadcastTopic + :: LiveBroadcastTopic +liveBroadcastTopic = + LiveBroadcastTopic + { _lbtSnippet = Nothing + , _lbtUnmatched = Nothing + , _lbtType = Nothing + } + +-- | Information about the topic matched. +lbtSnippet :: Lens' LiveBroadcastTopic (Maybe (Maybe LiveBroadcastTopicSNIppet)) +lbtSnippet + = lens _lbtSnippet (\ s a -> s{_lbtSnippet = a}) + +-- | If this flag is set it means that we have not been able to match the +-- topic title and type provided to a known entity. +lbtUnmatched :: Lens' LiveBroadcastTopic (Maybe Bool) +lbtUnmatched + = lens _lbtUnmatched (\ s a -> s{_lbtUnmatched = a}) + +-- | The type of the topic. +lbtType :: Lens' LiveBroadcastTopic (Maybe Text) +lbtType = lens _lbtType (\ s a -> s{_lbtType = a}) + +instance FromJSON LiveBroadcastTopic where + parseJSON + = withObject "LiveBroadcastTopic" + (\ o -> + LiveBroadcastTopic <$> + (o .:? "snippet") <*> (o .:? "unmatched") <*> + (o .:? "type")) + +instance ToJSON LiveBroadcastTopic where + toJSON LiveBroadcastTopic{..} + = object + (catMaybes + [("snippet" .=) <$> _lbtSnippet, + ("unmatched" .=) <$> _lbtUnmatched, + ("type" .=) <$> _lbtType]) + +-- | A playlistItem resource identifies another resource, such as a video, +-- that is included in a playlist. In addition, the playlistItem resource +-- contains details about the included resource that pertain specifically +-- to how that resource is used in that playlist. YouTube uses playlists to +-- identify special collections of videos for a channel, such as: - +-- uploaded videos - favorite videos - positively rated (liked) videos - +-- watch history - watch later To be more specific, these lists are +-- associated with a channel, which is a collection of a person, group, or +-- company\'s videos, playlists, and other YouTube information. You can +-- retrieve the playlist IDs for each of these lists from the channel +-- resource for a given channel. You can then use the playlistItems.list +-- method to retrieve any of those lists. You can also add or remove items +-- from those lists by calling the playlistItems.insert and +-- playlistItems.delete methods. For example, if a user gives a positive +-- rating to a video, you would insert that video into the liked videos +-- playlist for that user\'s channel. +-- +-- /See:/ 'playlistItem' smart constructor. +data PlaylistItem = PlaylistItem + { _pStatus :: !(Maybe (Maybe PlaylistItemStatus)) + , _pEtag :: !(Maybe Text) + , _pSnippet :: !(Maybe (Maybe PlaylistItemSNIppet)) + , _pKind :: !Text + , _pContentDetails :: !(Maybe (Maybe PlaylistItemContentDetails)) + , _pId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pStatus' +-- +-- * 'pEtag' +-- +-- * 'pSnippet' +-- +-- * 'pKind' +-- +-- * 'pContentDetails' +-- +-- * 'pId' +playlistItem + :: PlaylistItem +playlistItem = + PlaylistItem + { _pStatus = Nothing + , _pEtag = Nothing + , _pSnippet = Nothing + , _pKind = "youtube#playlistItem" + , _pContentDetails = Nothing + , _pId = Nothing + } + +-- | The status object contains information about the playlist item\'s +-- privacy status. +pStatus :: Lens' PlaylistItem (Maybe (Maybe PlaylistItemStatus)) +pStatus = lens _pStatus (\ s a -> s{_pStatus = a}) + +-- | Etag of this resource. +pEtag :: Lens' PlaylistItem (Maybe Text) +pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) + +-- | The snippet object contains basic details about the playlist item, such +-- as its title and position in the playlist. +pSnippet :: Lens' PlaylistItem (Maybe (Maybe PlaylistItemSNIppet)) +pSnippet = lens _pSnippet (\ s a -> s{_pSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#playlistItem\". +pKind :: Lens' PlaylistItem Text +pKind = lens _pKind (\ s a -> s{_pKind = a}) + +-- | The contentDetails object is included in the resource if the included +-- item is a YouTube video. The object contains additional information +-- about the video. +pContentDetails :: Lens' PlaylistItem (Maybe (Maybe PlaylistItemContentDetails)) +pContentDetails + = lens _pContentDetails + (\ s a -> s{_pContentDetails = a}) + +-- | The ID that YouTube uses to uniquely identify the playlist item. +pId :: Lens' PlaylistItem (Maybe Text) +pId = lens _pId (\ s a -> s{_pId = a}) + +instance FromJSON PlaylistItem where + parseJSON + = withObject "PlaylistItem" + (\ o -> + PlaylistItem <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#playlistItem") + <*> (o .:? "contentDetails") + <*> (o .:? "id")) + +instance ToJSON PlaylistItem where + toJSON PlaylistItem{..} + = object + (catMaybes + [("status" .=) <$> _pStatus, ("etag" .=) <$> _pEtag, + ("snippet" .=) <$> _pSnippet, + Just ("kind" .= _pKind), + ("contentDetails" .=) <$> _pContentDetails, + ("id" .=) <$> _pId]) + +-- | Pings that the app shall fire (authenticated by biscotti cookie). Each +-- ping has a context, in which the app must fire the ping, and a url +-- identifying the ping. +-- +-- /See:/ 'channelConversionPing' smart constructor. +data ChannelConversionPing = ChannelConversionPing + { _ccpContext :: !(Maybe Text) + , _ccpConversionUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelConversionPing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccpContext' +-- +-- * 'ccpConversionUrl' +channelConversionPing + :: ChannelConversionPing +channelConversionPing = + ChannelConversionPing + { _ccpContext = Nothing + , _ccpConversionUrl = Nothing + } + +-- | Defines the context of the ping. +ccpContext :: Lens' ChannelConversionPing (Maybe Text) +ccpContext + = lens _ccpContext (\ s a -> s{_ccpContext = a}) + +-- | The url (without the schema) that the player shall send the ping to. +-- It\'s at caller\'s descretion to decide which schema to use (http vs +-- https) Example of a returned url: +-- \/\/googleads.g.doubleclick.net\/pagead\/ +-- viewthroughconversion\/962985656\/?data=path%3DtHe_path%3Btype%3D +-- cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must +-- append biscotti authentication (ms param in case of mobile, for example) +-- to this ping. +ccpConversionUrl :: Lens' ChannelConversionPing (Maybe Text) +ccpConversionUrl + = lens _ccpConversionUrl + (\ s a -> s{_ccpConversionUrl = a}) + +instance FromJSON ChannelConversionPing where + parseJSON + = withObject "ChannelConversionPing" + (\ o -> + ChannelConversionPing <$> + (o .:? "context") <*> (o .:? "conversionUrl")) + +instance ToJSON ChannelConversionPing where + toJSON ChannelConversionPing{..} + = object + (catMaybes + [("context" .=) <$> _ccpContext, + ("conversionUrl" .=) <$> _ccpConversionUrl]) + +-- +-- /See:/ 'guideCategoryListResponse' smart constructor. +data GuideCategoryListResponse = GuideCategoryListResponse + { _gclrEtag :: !(Maybe Text) + , _gclrTokenPagination :: !(Maybe (Maybe TokenPagination)) + , _gclrNextPageToken :: !(Maybe Text) + , _gclrPageInfo :: !(Maybe (Maybe PageInfo)) + , _gclrKind :: !Text + , _gclrItems :: !(Maybe [Maybe GuideCategory]) + , _gclrVisitorId :: !(Maybe Text) + , _gclrEventId :: !(Maybe Text) + , _gclrPrevPageToken :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GuideCategoryListResponse' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gclrEtag' +-- +-- * 'gclrTokenPagination' +-- +-- * 'gclrNextPageToken' +-- +-- * 'gclrPageInfo' +-- +-- * 'gclrKind' +-- +-- * 'gclrItems' +-- +-- * 'gclrVisitorId' +-- +-- * 'gclrEventId' +-- +-- * 'gclrPrevPageToken' +guideCategoryListResponse + :: GuideCategoryListResponse +guideCategoryListResponse = + GuideCategoryListResponse + { _gclrEtag = Nothing + , _gclrTokenPagination = Nothing + , _gclrNextPageToken = Nothing + , _gclrPageInfo = Nothing + , _gclrKind = "youtube#guideCategoryListResponse" + , _gclrItems = Nothing + , _gclrVisitorId = Nothing + , _gclrEventId = Nothing + , _gclrPrevPageToken = Nothing + } + +-- | Etag of this resource. +gclrEtag :: Lens' GuideCategoryListResponse (Maybe Text) +gclrEtag = lens _gclrEtag (\ s a -> s{_gclrEtag = a}) + +gclrTokenPagination :: Lens' GuideCategoryListResponse (Maybe (Maybe TokenPagination)) +gclrTokenPagination + = lens _gclrTokenPagination + (\ s a -> s{_gclrTokenPagination = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the next page in the result set. +gclrNextPageToken :: Lens' GuideCategoryListResponse (Maybe Text) +gclrNextPageToken + = lens _gclrNextPageToken + (\ s a -> s{_gclrNextPageToken = a}) + +gclrPageInfo :: Lens' GuideCategoryListResponse (Maybe (Maybe PageInfo)) +gclrPageInfo + = lens _gclrPageInfo (\ s a -> s{_gclrPageInfo = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#guideCategoryListResponse\". +gclrKind :: Lens' GuideCategoryListResponse Text +gclrKind = lens _gclrKind (\ s a -> s{_gclrKind = a}) + +-- | A list of categories that can be associated with YouTube channels. In +-- this map, the category ID is the map key, and its value is the +-- corresponding guideCategory resource. +gclrItems :: Lens' GuideCategoryListResponse [Maybe GuideCategory] +gclrItems + = lens _gclrItems (\ s a -> s{_gclrItems = a}) . + _Default + . _Coerce + +-- | The visitorId identifies the visitor. +gclrVisitorId :: Lens' GuideCategoryListResponse (Maybe Text) +gclrVisitorId + = lens _gclrVisitorId + (\ s a -> s{_gclrVisitorId = a}) + +-- | Serialized EventId of the request which produced this response. +gclrEventId :: Lens' GuideCategoryListResponse (Maybe Text) +gclrEventId + = lens _gclrEventId (\ s a -> s{_gclrEventId = a}) + +-- | The token that can be used as the value of the pageToken parameter to +-- retrieve the previous page in the result set. +gclrPrevPageToken :: Lens' GuideCategoryListResponse (Maybe Text) +gclrPrevPageToken + = lens _gclrPrevPageToken + (\ s a -> s{_gclrPrevPageToken = a}) + +instance FromJSON GuideCategoryListResponse where + parseJSON + = withObject "GuideCategoryListResponse" + (\ o -> + GuideCategoryListResponse <$> + (o .:? "etag") <*> (o .:? "tokenPagination") <*> + (o .:? "nextPageToken") + <*> (o .:? "pageInfo") + <*> + (o .:? "kind" .!= + "youtube#guideCategoryListResponse") + <*> (o .:? "items" .!= mempty) + <*> (o .:? "visitorId") + <*> (o .:? "eventId") + <*> (o .:? "prevPageToken")) + +instance ToJSON GuideCategoryListResponse where + toJSON GuideCategoryListResponse{..} + = object + (catMaybes + [("etag" .=) <$> _gclrEtag, + ("tokenPagination" .=) <$> _gclrTokenPagination, + ("nextPageToken" .=) <$> _gclrNextPageToken, + ("pageInfo" .=) <$> _gclrPageInfo, + Just ("kind" .= _gclrKind), + ("items" .=) <$> _gclrItems, + ("visitorId" .=) <$> _gclrVisitorId, + ("eventId" .=) <$> _gclrEventId, + ("prevPageToken" .=) <$> _gclrPrevPageToken]) + +-- | A subscription resource contains information about a YouTube user +-- subscription. A subscription notifies a user when new videos are added +-- to a channel or when another user takes one of several actions on +-- YouTube, such as uploading a video, rating a video, or commenting on a +-- video. +-- +-- /See:/ 'subscription' smart constructor. +data Subscription = Subscription + { _subEtag :: !(Maybe Text) + , _subSubscriberSnippet :: !(Maybe (Maybe SubscriptionSubscriberSNIppet)) + , _subSnippet :: !(Maybe (Maybe SubscriptionSNIppet)) + , _subKind :: !Text + , _subContentDetails :: !(Maybe (Maybe SubscriptionContentDetails)) + , _subId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Subscription' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'subEtag' +-- +-- * 'subSubscriberSnippet' +-- +-- * 'subSnippet' +-- +-- * 'subKind' +-- +-- * 'subContentDetails' +-- +-- * 'subId' +subscription + :: Subscription +subscription = + Subscription + { _subEtag = Nothing + , _subSubscriberSnippet = Nothing + , _subSnippet = Nothing + , _subKind = "youtube#subscription" + , _subContentDetails = Nothing + , _subId = Nothing + } + +-- | Etag of this resource. +subEtag :: Lens' Subscription (Maybe Text) +subEtag = lens _subEtag (\ s a -> s{_subEtag = a}) + +-- | The subscriberSnippet object contains basic details about the +-- sbuscriber. +subSubscriberSnippet :: Lens' Subscription (Maybe (Maybe SubscriptionSubscriberSNIppet)) +subSubscriberSnippet + = lens _subSubscriberSnippet + (\ s a -> s{_subSubscriberSnippet = a}) + +-- | The snippet object contains basic details about the subscription, +-- including its title and the channel that the user subscribed to. +subSnippet :: Lens' Subscription (Maybe (Maybe SubscriptionSNIppet)) +subSnippet + = lens _subSnippet (\ s a -> s{_subSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#subscription\". +subKind :: Lens' Subscription Text +subKind = lens _subKind (\ s a -> s{_subKind = a}) + +-- | The contentDetails object contains basic statistics about the +-- subscription. +subContentDetails :: Lens' Subscription (Maybe (Maybe SubscriptionContentDetails)) +subContentDetails + = lens _subContentDetails + (\ s a -> s{_subContentDetails = a}) + +-- | The ID that YouTube uses to uniquely identify the subscription. +subId :: Lens' Subscription (Maybe Text) +subId = lens _subId (\ s a -> s{_subId = a}) + +instance FromJSON Subscription where + parseJSON + = withObject "Subscription" + (\ o -> + Subscription <$> + (o .:? "etag") <*> (o .:? "subscriberSnippet") <*> + (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#subscription") + <*> (o .:? "contentDetails") + <*> (o .:? "id")) + +instance ToJSON Subscription where + toJSON Subscription{..} + = object + (catMaybes + [("etag" .=) <$> _subEtag, + ("subscriberSnippet" .=) <$> _subSubscriberSnippet, + ("snippet" .=) <$> _subSnippet, + Just ("kind" .= _subKind), + ("contentDetails" .=) <$> _subContentDetails, + ("id" .=) <$> _subId]) + +-- | Basic details about an i18n region, such as region code and +-- human-readable name. +-- +-- /See:/ 'i18nRegionSNIppet' smart constructor. +data I18nRegionSNIppet = I18nRegionSNIppet + { _irsName :: !(Maybe Text) + , _irsGl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nRegionSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'irsName' +-- +-- * 'irsGl' +i18nRegionSNIppet + :: I18nRegionSNIppet +i18nRegionSNIppet = + I18nRegionSNIppet + { _irsName = Nothing + , _irsGl = Nothing + } + +-- | The human-readable name of the region. +irsName :: Lens' I18nRegionSNIppet (Maybe Text) +irsName = lens _irsName (\ s a -> s{_irsName = a}) + +-- | The region code as a 2-letter ISO country code. +irsGl :: Lens' I18nRegionSNIppet (Maybe Text) +irsGl = lens _irsGl (\ s a -> s{_irsGl = a}) + +instance FromJSON I18nRegionSNIppet where + parseJSON + = withObject "I18nRegionSNIppet" + (\ o -> + I18nRegionSNIppet <$> + (o .:? "name") <*> (o .:? "gl")) + +instance ToJSON I18nRegionSNIppet where + toJSON I18nRegionSNIppet{..} + = object + (catMaybes + [("name" .=) <$> _irsName, ("gl" .=) <$> _irsGl]) + +-- | Basic details about a caption track, such as its language and name. +-- +-- /See:/ 'captionSNIppet' smart constructor. +data CaptionSNIppet = CaptionSNIppet + { _csFailureReason :: !(Maybe Text) + , _csStatus :: !(Maybe Text) + , _csLastUpdated :: !(Maybe UTCTime) + , _csTrackKind :: !(Maybe Text) + , _csIsDraft :: !(Maybe Bool) + , _csIsCC :: !(Maybe Bool) + , _csVideoId :: !(Maybe Text) + , _csName :: !(Maybe Text) + , _csIsLarge :: !(Maybe Bool) + , _csLanguage :: !(Maybe Text) + , _csIsAutoSynced :: !(Maybe Bool) + , _csIsEasyReader :: !(Maybe Bool) + , _csAudioTrackType :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CaptionSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csFailureReason' +-- +-- * 'csStatus' +-- +-- * 'csLastUpdated' +-- +-- * 'csTrackKind' +-- +-- * 'csIsDraft' +-- +-- * 'csIsCC' +-- +-- * 'csVideoId' +-- +-- * 'csName' +-- +-- * 'csIsLarge' +-- +-- * 'csLanguage' +-- +-- * 'csIsAutoSynced' +-- +-- * 'csIsEasyReader' +-- +-- * 'csAudioTrackType' +captionSNIppet + :: CaptionSNIppet +captionSNIppet = + CaptionSNIppet + { _csFailureReason = Nothing + , _csStatus = Nothing + , _csLastUpdated = Nothing + , _csTrackKind = Nothing + , _csIsDraft = Nothing + , _csIsCC = Nothing + , _csVideoId = Nothing + , _csName = Nothing + , _csIsLarge = Nothing + , _csLanguage = Nothing + , _csIsAutoSynced = Nothing + , _csIsEasyReader = Nothing + , _csAudioTrackType = Nothing + } + +-- | The reason that YouTube failed to process the caption track. This +-- property is only present if the state property\'s value is failed. +csFailureReason :: Lens' CaptionSNIppet (Maybe Text) +csFailureReason + = lens _csFailureReason + (\ s a -> s{_csFailureReason = a}) + +-- | The caption track\'s status. +csStatus :: Lens' CaptionSNIppet (Maybe Text) +csStatus = lens _csStatus (\ s a -> s{_csStatus = a}) + +-- | The date and time when the caption track was last updated. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +csLastUpdated :: Lens' CaptionSNIppet (Maybe UTCTime) +csLastUpdated + = lens _csLastUpdated + (\ s a -> s{_csLastUpdated = a}) + +-- | The caption track\'s type. +csTrackKind :: Lens' CaptionSNIppet (Maybe Text) +csTrackKind + = lens _csTrackKind (\ s a -> s{_csTrackKind = a}) + +-- | Indicates whether the caption track is a draft. If the value is true, +-- then the track is not publicly visible. The default value is false. +csIsDraft :: Lens' CaptionSNIppet (Maybe Bool) +csIsDraft + = lens _csIsDraft (\ s a -> s{_csIsDraft = a}) + +-- | Indicates whether the track contains closed captions for the deaf and +-- hard of hearing. The default value is false. +csIsCC :: Lens' CaptionSNIppet (Maybe Bool) +csIsCC = lens _csIsCC (\ s a -> s{_csIsCC = a}) + +-- | The ID that YouTube uses to uniquely identify the video associated with +-- the caption track. +csVideoId :: Lens' CaptionSNIppet (Maybe Text) +csVideoId + = lens _csVideoId (\ s a -> s{_csVideoId = a}) + +-- | The name of the caption track. The name is intended to be visible to the +-- user as an option during playback. +csName :: Lens' CaptionSNIppet (Maybe Text) +csName = lens _csName (\ s a -> s{_csName = a}) + +-- | Indicates whether the caption track uses large text for the +-- vision-impaired. The default value is false. +csIsLarge :: Lens' CaptionSNIppet (Maybe Bool) +csIsLarge + = lens _csIsLarge (\ s a -> s{_csIsLarge = a}) + +-- | The language of the caption track. The property value is a BCP-47 +-- language tag. +csLanguage :: Lens' CaptionSNIppet (Maybe Text) +csLanguage + = lens _csLanguage (\ s a -> s{_csLanguage = a}) + +-- | Indicates whether YouTube synchronized the caption track to the audio +-- track in the video. The value will be true if a sync was explicitly +-- requested when the caption track was uploaded. For example, when calling +-- the captions.insert or captions.update methods, you can set the sync +-- parameter to true to instruct YouTube to sync the uploaded track to the +-- video. If the value is false, YouTube uses the time codes in the +-- uploaded caption track to determine when to display captions. +csIsAutoSynced :: Lens' CaptionSNIppet (Maybe Bool) +csIsAutoSynced + = lens _csIsAutoSynced + (\ s a -> s{_csIsAutoSynced = a}) + +-- | Indicates whether caption track is formatted for \"easy reader,\" +-- meaning it is at a third-grade level for language learners. The default +-- value is false. +csIsEasyReader :: Lens' CaptionSNIppet (Maybe Bool) +csIsEasyReader + = lens _csIsEasyReader + (\ s a -> s{_csIsEasyReader = a}) + +-- | The type of audio track associated with the caption track. +csAudioTrackType :: Lens' CaptionSNIppet (Maybe Text) +csAudioTrackType + = lens _csAudioTrackType + (\ s a -> s{_csAudioTrackType = a}) + +instance FromJSON CaptionSNIppet where + parseJSON + = withObject "CaptionSNIppet" + (\ o -> + CaptionSNIppet <$> + (o .:? "failureReason") <*> (o .:? "status") <*> + (o .:? "lastUpdated") + <*> (o .:? "trackKind") + <*> (o .:? "isDraft") + <*> (o .:? "isCC") + <*> (o .:? "videoId") + <*> (o .:? "name") + <*> (o .:? "isLarge") + <*> (o .:? "language") + <*> (o .:? "isAutoSynced") + <*> (o .:? "isEasyReader") + <*> (o .:? "audioTrackType")) + +instance ToJSON CaptionSNIppet where + toJSON CaptionSNIppet{..} + = object + (catMaybes + [("failureReason" .=) <$> _csFailureReason, + ("status" .=) <$> _csStatus, + ("lastUpdated" .=) <$> _csLastUpdated, + ("trackKind" .=) <$> _csTrackKind, + ("isDraft" .=) <$> _csIsDraft, + ("isCC" .=) <$> _csIsCC, + ("videoId" .=) <$> _csVideoId, + ("name" .=) <$> _csName, + ("isLarge" .=) <$> _csIsLarge, + ("language" .=) <$> _csLanguage, + ("isAutoSynced" .=) <$> _csIsAutoSynced, + ("isEasyReader" .=) <$> _csIsEasyReader, + ("audioTrackType" .=) <$> _csAudioTrackType]) + +-- | A comment represents a single YouTube comment. +-- +-- /See:/ 'comment' smart constructor. +data Comment = Comment + { _ccEtag :: !(Maybe Text) + , _ccSnippet :: !(Maybe (Maybe CommentSNIppet)) + , _ccKind :: !Text + , _ccId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Comment' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccEtag' +-- +-- * 'ccSnippet' +-- +-- * 'ccKind' +-- +-- * 'ccId' +comment + :: Comment +comment = + Comment + { _ccEtag = Nothing + , _ccSnippet = Nothing + , _ccKind = "youtube#comment" + , _ccId = Nothing + } + +-- | Etag of this resource. +ccEtag :: Lens' Comment (Maybe Text) +ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a}) + +-- | The snippet object contains basic details about the comment. +ccSnippet :: Lens' Comment (Maybe (Maybe CommentSNIppet)) +ccSnippet + = lens _ccSnippet (\ s a -> s{_ccSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#comment\". +ccKind :: Lens' Comment Text +ccKind = lens _ccKind (\ s a -> s{_ccKind = a}) + +-- | The ID that YouTube uses to uniquely identify the comment. +ccId :: Lens' Comment (Maybe Text) +ccId = lens _ccId (\ s a -> s{_ccId = a}) + +instance FromJSON Comment where + parseJSON + = withObject "Comment" + (\ o -> + Comment <$> + (o .:? "etag") <*> (o .:? "snippet") <*> + (o .:? "kind" .!= "youtube#comment") + <*> (o .:? "id")) + +instance ToJSON Comment where + toJSON Comment{..} + = object + (catMaybes + [("etag" .=) <$> _ccEtag, + ("snippet" .=) <$> _ccSnippet, + Just ("kind" .= _ccKind), ("id" .=) <$> _ccId]) + +-- | Basic details about a playlist, including title, description and +-- thumbnails. +-- +-- /See:/ 'playlistItemSNIppet' smart constructor. +data PlaylistItemSNIppet = PlaylistItemSNIppet + { _pisResourceId :: !(Maybe (Maybe ResourceId)) + , _pisPublishedAt :: !(Maybe UTCTime) + , _pisChannelTitle :: !(Maybe Text) + , _pisChannelId :: !(Maybe Text) + , _pisThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _pisTitle :: !(Maybe Text) + , _pisPlaylistId :: !(Maybe Text) + , _pisDescription :: !(Maybe Text) + , _pisPosition :: !(Maybe Word32) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'PlaylistItemSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pisResourceId' +-- +-- * 'pisPublishedAt' +-- +-- * 'pisChannelTitle' +-- +-- * 'pisChannelId' +-- +-- * 'pisThumbnails' +-- +-- * 'pisTitle' +-- +-- * 'pisPlaylistId' +-- +-- * 'pisDescription' +-- +-- * 'pisPosition' +playlistItemSNIppet + :: PlaylistItemSNIppet +playlistItemSNIppet = + PlaylistItemSNIppet + { _pisResourceId = Nothing + , _pisPublishedAt = Nothing + , _pisChannelTitle = Nothing + , _pisChannelId = Nothing + , _pisThumbnails = Nothing + , _pisTitle = Nothing + , _pisPlaylistId = Nothing + , _pisDescription = Nothing + , _pisPosition = Nothing + } + +-- | The id object contains information that can be used to uniquely identify +-- the resource that is included in the playlist as the playlist item. +pisResourceId :: Lens' PlaylistItemSNIppet (Maybe (Maybe ResourceId)) +pisResourceId + = lens _pisResourceId + (\ s a -> s{_pisResourceId = a}) + +-- | The date and time that the item was added to the playlist. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +pisPublishedAt :: Lens' PlaylistItemSNIppet (Maybe UTCTime) +pisPublishedAt + = lens _pisPublishedAt + (\ s a -> s{_pisPublishedAt = a}) + +-- | Channel title for the channel that the playlist item belongs to. +pisChannelTitle :: Lens' PlaylistItemSNIppet (Maybe Text) +pisChannelTitle + = lens _pisChannelTitle + (\ s a -> s{_pisChannelTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the user that added the +-- item to the playlist. +pisChannelId :: Lens' PlaylistItemSNIppet (Maybe Text) +pisChannelId + = lens _pisChannelId (\ s a -> s{_pisChannelId = a}) + +-- | A map of thumbnail images associated with the playlist item. For each +-- object in the map, the key is the name of the thumbnail image, and the +-- value is an object that contains other information about the thumbnail. +pisThumbnails :: Lens' PlaylistItemSNIppet (Maybe (Maybe ThumbnailDetails)) +pisThumbnails + = lens _pisThumbnails + (\ s a -> s{_pisThumbnails = a}) + +-- | The item\'s title. +pisTitle :: Lens' PlaylistItemSNIppet (Maybe Text) +pisTitle = lens _pisTitle (\ s a -> s{_pisTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the playlist that the +-- playlist item is in. +pisPlaylistId :: Lens' PlaylistItemSNIppet (Maybe Text) +pisPlaylistId + = lens _pisPlaylistId + (\ s a -> s{_pisPlaylistId = a}) + +-- | The item\'s description. +pisDescription :: Lens' PlaylistItemSNIppet (Maybe Text) +pisDescription + = lens _pisDescription + (\ s a -> s{_pisDescription = a}) + +-- | The order in which the item appears in the playlist. The value uses a +-- zero-based index, so the first item has a position of 0, the second item +-- has a position of 1, and so forth. +pisPosition :: Lens' PlaylistItemSNIppet (Maybe Word32) +pisPosition + = lens _pisPosition (\ s a -> s{_pisPosition = a}) + +instance FromJSON PlaylistItemSNIppet where + parseJSON + = withObject "PlaylistItemSNIppet" + (\ o -> + PlaylistItemSNIppet <$> + (o .:? "resourceId") <*> (o .:? "publishedAt") <*> + (o .:? "channelTitle") + <*> (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "title") + <*> (o .:? "playlistId") + <*> (o .:? "description") + <*> (o .:? "position")) + +instance ToJSON PlaylistItemSNIppet where + toJSON PlaylistItemSNIppet{..} + = object + (catMaybes + [("resourceId" .=) <$> _pisResourceId, + ("publishedAt" .=) <$> _pisPublishedAt, + ("channelTitle" .=) <$> _pisChannelTitle, + ("channelId" .=) <$> _pisChannelId, + ("thumbnails" .=) <$> _pisThumbnails, + ("title" .=) <$> _pisTitle, + ("playlistId" .=) <$> _pisPlaylistId, + ("description" .=) <$> _pisDescription, + ("position" .=) <$> _pisPosition]) + +-- +-- /See:/ 'videoRating' smart constructor. +data VideoRating = VideoRating + { _vrRating :: !(Maybe Text) + , _vrVideoId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoRating' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vrRating' +-- +-- * 'vrVideoId' +videoRating + :: VideoRating +videoRating = + VideoRating + { _vrRating = Nothing + , _vrVideoId = Nothing + } + +vrRating :: Lens' VideoRating (Maybe Text) +vrRating = lens _vrRating (\ s a -> s{_vrRating = a}) + +vrVideoId :: Lens' VideoRating (Maybe Text) +vrVideoId + = lens _vrVideoId (\ s a -> s{_vrVideoId = a}) + +instance FromJSON VideoRating where + parseJSON + = withObject "VideoRating" + (\ o -> + VideoRating <$> + (o .:? "rating") <*> (o .:? "videoId")) + +instance ToJSON VideoRating where + toJSON VideoRating{..} + = object + (catMaybes + [("rating" .=) <$> _vrRating, + ("videoId" .=) <$> _vrVideoId]) + +-- | Project specific details about the content of a YouTube Video. +-- +-- /See:/ 'videoProjectDetails' smart constructor. +newtype VideoProjectDetails = VideoProjectDetails + { _vpdTags :: Maybe [Text] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoProjectDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vpdTags' +videoProjectDetails + :: VideoProjectDetails +videoProjectDetails = + VideoProjectDetails + { _vpdTags = Nothing + } + +-- | A list of project tags associated with the video during the upload. +vpdTags :: Lens' VideoProjectDetails [Text] +vpdTags + = lens _vpdTags (\ s a -> s{_vpdTags = a}) . _Default + . _Coerce + +instance FromJSON VideoProjectDetails where + parseJSON + = withObject "VideoProjectDetails" + (\ o -> + VideoProjectDetails <$> (o .:? "tags" .!= mempty)) + +instance ToJSON VideoProjectDetails where + toJSON VideoProjectDetails{..} + = object (catMaybes [("tags" .=) <$> _vpdTags]) + +-- | Specifies suggestions on how to improve video content, including +-- encoding hints, tag suggestions, and editor suggestions. +-- +-- /See:/ 'videoSuggestions' smart constructor. +data VideoSuggestions = VideoSuggestions + { _vsProcessingErrors :: !(Maybe [Text]) + , _vsProcessingHints :: !(Maybe [Text]) + , _vsEditorSuggestions :: !(Maybe [Text]) + , _vsProcessingWarnings :: !(Maybe [Text]) + , _vsTagSuggestions :: !(Maybe [Maybe VideoSuggestionsTagSuggestion]) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoSuggestions' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vsProcessingErrors' +-- +-- * 'vsProcessingHints' +-- +-- * 'vsEditorSuggestions' +-- +-- * 'vsProcessingWarnings' +-- +-- * 'vsTagSuggestions' +videoSuggestions + :: VideoSuggestions +videoSuggestions = + VideoSuggestions + { _vsProcessingErrors = Nothing + , _vsProcessingHints = Nothing + , _vsEditorSuggestions = Nothing + , _vsProcessingWarnings = Nothing + , _vsTagSuggestions = Nothing + } + +-- | A list of errors that will prevent YouTube from successfully processing +-- the uploaded video video. These errors indicate that, regardless of the +-- video\'s current processing status, eventually, that status will almost +-- certainly be failed. +vsProcessingErrors :: Lens' VideoSuggestions [Text] +vsProcessingErrors + = lens _vsProcessingErrors + (\ s a -> s{_vsProcessingErrors = a}) + . _Default + . _Coerce + +-- | A list of suggestions that may improve YouTube\'s ability to process the +-- video. +vsProcessingHints :: Lens' VideoSuggestions [Text] +vsProcessingHints + = lens _vsProcessingHints + (\ s a -> s{_vsProcessingHints = a}) + . _Default + . _Coerce + +-- | A list of video editing operations that might improve the video quality +-- or playback experience of the uploaded video. +vsEditorSuggestions :: Lens' VideoSuggestions [Text] +vsEditorSuggestions + = lens _vsEditorSuggestions + (\ s a -> s{_vsEditorSuggestions = a}) + . _Default + . _Coerce + +-- | A list of reasons why YouTube may have difficulty transcoding the +-- uploaded video or that might result in an erroneous transcoding. These +-- warnings are generated before YouTube actually processes the uploaded +-- video file. In addition, they identify issues that are unlikely to cause +-- the video processing to fail but that might cause problems such as sync +-- issues, video artifacts, or a missing audio track. +vsProcessingWarnings :: Lens' VideoSuggestions [Text] +vsProcessingWarnings + = lens _vsProcessingWarnings + (\ s a -> s{_vsProcessingWarnings = a}) + . _Default + . _Coerce + +-- | A list of keyword tags that could be added to the video\'s metadata to +-- increase the likelihood that users will locate your video when searching +-- or browsing on YouTube. +vsTagSuggestions :: Lens' VideoSuggestions [Maybe VideoSuggestionsTagSuggestion] +vsTagSuggestions + = lens _vsTagSuggestions + (\ s a -> s{_vsTagSuggestions = a}) + . _Default + . _Coerce + +instance FromJSON VideoSuggestions where + parseJSON + = withObject "VideoSuggestions" + (\ o -> + VideoSuggestions <$> + (o .:? "processingErrors" .!= mempty) <*> + (o .:? "processingHints" .!= mempty) + <*> (o .:? "editorSuggestions" .!= mempty) + <*> (o .:? "processingWarnings" .!= mempty) + <*> (o .:? "tagSuggestions" .!= mempty)) + +instance ToJSON VideoSuggestions where + toJSON VideoSuggestions{..} + = object + (catMaybes + [("processingErrors" .=) <$> _vsProcessingErrors, + ("processingHints" .=) <$> _vsProcessingHints, + ("editorSuggestions" .=) <$> _vsEditorSuggestions, + ("processingWarnings" .=) <$> _vsProcessingWarnings, + ("tagSuggestions" .=) <$> _vsTagSuggestions]) + +-- | A playlist resource represents a YouTube playlist. A playlist is a +-- collection of videos that can be viewed sequentially and shared with +-- other users. A playlist can contain up to 200 videos, and YouTube does +-- not limit the number of playlists that each user creates. By default, +-- playlists are publicly visible to other users, but playlists can be +-- public or private. YouTube also uses playlists to identify special +-- collections of videos for a channel, such as: - uploaded videos - +-- favorite videos - positively rated (liked) videos - watch history - +-- watch later To be more specific, these lists are associated with a +-- channel, which is a collection of a person, group, or company\'s videos, +-- playlists, and other YouTube information. You can retrieve the playlist +-- IDs for each of these lists from the channel resource for a given +-- channel. You can then use the playlistItems.list method to retrieve any +-- of those lists. You can also add or remove items from those lists by +-- calling the playlistItems.insert and playlistItems.delete methods. +-- +-- /See:/ 'playlist' smart constructor. +data Playlist = Playlist + { _plaStatus :: !(Maybe (Maybe PlaylistStatus)) + , _plaEtag :: !(Maybe Text) + , _plaSnippet :: !(Maybe (Maybe PlaylistSNIppet)) + , _plaKind :: !Text + , _plaContentDetails :: !(Maybe (Maybe PlaylistContentDetails)) + , _plaId :: !(Maybe Text) + , _plaLocalizations :: !(Maybe PlaylistLocalizations) + , _plaPlayer :: !(Maybe (Maybe PlaylistPlayer)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'Playlist' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'plaStatus' +-- +-- * 'plaEtag' +-- +-- * 'plaSnippet' +-- +-- * 'plaKind' +-- +-- * 'plaContentDetails' +-- +-- * 'plaId' +-- +-- * 'plaLocalizations' +-- +-- * 'plaPlayer' +playlist + :: Playlist +playlist = + Playlist + { _plaStatus = Nothing + , _plaEtag = Nothing + , _plaSnippet = Nothing + , _plaKind = "youtube#playlist" + , _plaContentDetails = Nothing + , _plaId = Nothing + , _plaLocalizations = Nothing + , _plaPlayer = Nothing + } + +-- | The status object contains status information for the playlist. +plaStatus :: Lens' Playlist (Maybe (Maybe PlaylistStatus)) +plaStatus + = lens _plaStatus (\ s a -> s{_plaStatus = a}) + +-- | Etag of this resource. +plaEtag :: Lens' Playlist (Maybe Text) +plaEtag = lens _plaEtag (\ s a -> s{_plaEtag = a}) + +-- | The snippet object contains basic details about the playlist, such as +-- its title and description. +plaSnippet :: Lens' Playlist (Maybe (Maybe PlaylistSNIppet)) +plaSnippet + = lens _plaSnippet (\ s a -> s{_plaSnippet = a}) + +-- | Identifies what kind of resource this is. Value: the fixed string +-- \"youtube#playlist\". +plaKind :: Lens' Playlist Text +plaKind = lens _plaKind (\ s a -> s{_plaKind = a}) + +-- | The contentDetails object contains information like video count. +plaContentDetails :: Lens' Playlist (Maybe (Maybe PlaylistContentDetails)) +plaContentDetails + = lens _plaContentDetails + (\ s a -> s{_plaContentDetails = a}) + +-- | The ID that YouTube uses to uniquely identify the playlist. +plaId :: Lens' Playlist (Maybe Text) +plaId = lens _plaId (\ s a -> s{_plaId = a}) + +-- | Localizations for different languages +plaLocalizations :: Lens' Playlist (Maybe PlaylistLocalizations) +plaLocalizations + = lens _plaLocalizations + (\ s a -> s{_plaLocalizations = a}) + +-- | The player object contains information that you would use to play the +-- playlist in an embedded player. +plaPlayer :: Lens' Playlist (Maybe (Maybe PlaylistPlayer)) +plaPlayer + = lens _plaPlayer (\ s a -> s{_plaPlayer = a}) + +instance FromJSON Playlist where + parseJSON + = withObject "Playlist" + (\ o -> + Playlist <$> + (o .:? "status") <*> (o .:? "etag") <*> + (o .:? "snippet") + <*> (o .:? "kind" .!= "youtube#playlist") + <*> (o .:? "contentDetails") + <*> (o .:? "id") + <*> (o .:? "localizations") + <*> (o .:? "player")) + +instance ToJSON Playlist where + toJSON Playlist{..} + = object + (catMaybes + [("status" .=) <$> _plaStatus, + ("etag" .=) <$> _plaEtag, + ("snippet" .=) <$> _plaSnippet, + Just ("kind" .= _plaKind), + ("contentDetails" .=) <$> _plaContentDetails, + ("id" .=) <$> _plaId, + ("localizations" .=) <$> _plaLocalizations, + ("player" .=) <$> _plaPlayer]) + +-- | Ratings schemes. The country-specific ratings are mostly for movies and +-- shows. NEXT_ID: 66 +-- +-- /See:/ 'contentRating' smart constructor. +data ContentRating = ContentRating + { _crPefilmRating :: !(Maybe Text) + , _crCccRating :: !(Maybe Text) + , _crAnatelRating :: !(Maybe Text) + , _crMpaaRating :: !(Maybe Text) + , _crCceRating :: !(Maybe Text) + , _crMccaaRating :: !(Maybe Text) + , _crChfilmRating :: !(Maybe Text) + , _crIcaaRating :: !(Maybe Text) + , _crFcbmRating :: !(Maybe Text) + , _crBmukkRating :: !(Maybe Text) + , _crMoctwRating :: !(Maybe Text) + , _crNfvcbRating :: !(Maybe Text) + , _crDjctqRatingReasons :: !(Maybe [Text]) + , _crAgcomRating :: !(Maybe Text) + , _crCnaRating :: !(Maybe Text) + , _crCatvfrRating :: !(Maybe Text) + , _crCbfcRating :: !(Maybe Text) + , _crKfcbRating :: !(Maybe Text) + , _crSmsaRating :: !(Maybe Text) + , _crChvrsRating :: !(Maybe Text) + , _crIncaaRating :: !(Maybe Text) + , _crNfrcRating :: !(Maybe Text) + , _crCsaRating :: !(Maybe Text) + , _crMocRating :: !(Maybe Text) + , _crEirinRating :: !(Maybe Text) + , _crFskRating :: !(Maybe Text) + , _crEefilmRating :: !(Maybe Text) + , _crRcnofRating :: !(Maybe Text) + , _crMekuRating :: !(Maybe Text) + , _crIlfilmRating :: !(Maybe Text) + , _crIfcoRating :: !(Maybe Text) + , _crNbcplRating :: !(Maybe Text) + , _crGrfilmRating :: !(Maybe Text) + , _crRteRating :: !(Maybe Text) + , _crAcbRating :: !(Maybe Text) + , _crCatvRating :: !(Maybe Text) + , _crMdaRating :: !(Maybe Text) + , _crDjctqRating :: !(Maybe Text) + , _crSmaisRating :: !(Maybe Text) + , _crCscfRating :: !(Maybe Text) + , _crTvpgRating :: !(Maybe Text) + , _crRtcRating :: !(Maybe Text) + , _crYtRating :: !(Maybe Text) + , _crBbfcRating :: !(Maybe Text) + , _crKijkwijzerRating :: !(Maybe Text) + , _crMtrcbRating :: !(Maybe Text) + , _crFcoRating :: !(Maybe Text) + , _crCicfRating :: !(Maybe Text) + , _crCzfilmRating :: !(Maybe Text) + , _crNbcRating :: !(Maybe Text) + , _crFmocRating :: !(Maybe Text) + , _crRussiaRating :: !(Maybe Text) + , _crEgfilmRating :: !(Maybe Text) + , _crResorteviolenciaRating :: !(Maybe Text) + , _crMibacRating :: !(Maybe Text) + , _crMedietilsynetRating :: !(Maybe Text) + , _crMccypRating :: !(Maybe Text) + , _crNkclvRating :: !(Maybe Text) + , _crFpbRating :: !(Maybe Text) + , _crLsfRating :: !(Maybe Text) + , _crBfvcRating :: !(Maybe Text) + , _crCncRating :: !(Maybe Text) + , _crSkfilmRating :: !(Maybe Text) + , _crOflcRating :: !(Maybe Text) + , _crKmrbRating :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ContentRating' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'crPefilmRating' +-- +-- * 'crCccRating' +-- +-- * 'crAnatelRating' +-- +-- * 'crMpaaRating' +-- +-- * 'crCceRating' +-- +-- * 'crMccaaRating' +-- +-- * 'crChfilmRating' +-- +-- * 'crIcaaRating' +-- +-- * 'crFcbmRating' +-- +-- * 'crBmukkRating' +-- +-- * 'crMoctwRating' +-- +-- * 'crNfvcbRating' +-- +-- * 'crDjctqRatingReasons' +-- +-- * 'crAgcomRating' +-- +-- * 'crCnaRating' +-- +-- * 'crCatvfrRating' +-- +-- * 'crCbfcRating' +-- +-- * 'crKfcbRating' +-- +-- * 'crSmsaRating' +-- +-- * 'crChvrsRating' +-- +-- * 'crIncaaRating' +-- +-- * 'crNfrcRating' +-- +-- * 'crCsaRating' +-- +-- * 'crMocRating' +-- +-- * 'crEirinRating' +-- +-- * 'crFskRating' +-- +-- * 'crEefilmRating' +-- +-- * 'crRcnofRating' +-- +-- * 'crMekuRating' +-- +-- * 'crIlfilmRating' +-- +-- * 'crIfcoRating' +-- +-- * 'crNbcplRating' +-- +-- * 'crGrfilmRating' +-- +-- * 'crRteRating' +-- +-- * 'crAcbRating' +-- +-- * 'crCatvRating' +-- +-- * 'crMdaRating' +-- +-- * 'crDjctqRating' +-- +-- * 'crSmaisRating' +-- +-- * 'crCscfRating' +-- +-- * 'crTvpgRating' +-- +-- * 'crRtcRating' +-- +-- * 'crYtRating' +-- +-- * 'crBbfcRating' +-- +-- * 'crKijkwijzerRating' +-- +-- * 'crMtrcbRating' +-- +-- * 'crFcoRating' +-- +-- * 'crCicfRating' +-- +-- * 'crCzfilmRating' +-- +-- * 'crNbcRating' +-- +-- * 'crFmocRating' +-- +-- * 'crRussiaRating' +-- +-- * 'crEgfilmRating' +-- +-- * 'crResorteviolenciaRating' +-- +-- * 'crMibacRating' +-- +-- * 'crMedietilsynetRating' +-- +-- * 'crMccypRating' +-- +-- * 'crNkclvRating' +-- +-- * 'crFpbRating' +-- +-- * 'crLsfRating' +-- +-- * 'crBfvcRating' +-- +-- * 'crCncRating' +-- +-- * 'crSkfilmRating' +-- +-- * 'crOflcRating' +-- +-- * 'crKmrbRating' +contentRating + :: ContentRating +contentRating = + ContentRating + { _crPefilmRating = Nothing + , _crCccRating = Nothing + , _crAnatelRating = Nothing + , _crMpaaRating = Nothing + , _crCceRating = Nothing + , _crMccaaRating = Nothing + , _crChfilmRating = Nothing + , _crIcaaRating = Nothing + , _crFcbmRating = Nothing + , _crBmukkRating = Nothing + , _crMoctwRating = Nothing + , _crNfvcbRating = Nothing + , _crDjctqRatingReasons = Nothing + , _crAgcomRating = Nothing + , _crCnaRating = Nothing + , _crCatvfrRating = Nothing + , _crCbfcRating = Nothing + , _crKfcbRating = Nothing + , _crSmsaRating = Nothing + , _crChvrsRating = Nothing + , _crIncaaRating = Nothing + , _crNfrcRating = Nothing + , _crCsaRating = Nothing + , _crMocRating = Nothing + , _crEirinRating = Nothing + , _crFskRating = Nothing + , _crEefilmRating = Nothing + , _crRcnofRating = Nothing + , _crMekuRating = Nothing + , _crIlfilmRating = Nothing + , _crIfcoRating = Nothing + , _crNbcplRating = Nothing + , _crGrfilmRating = Nothing + , _crRteRating = Nothing + , _crAcbRating = Nothing + , _crCatvRating = Nothing + , _crMdaRating = Nothing + , _crDjctqRating = Nothing + , _crSmaisRating = Nothing + , _crCscfRating = Nothing + , _crTvpgRating = Nothing + , _crRtcRating = Nothing + , _crYtRating = Nothing + , _crBbfcRating = Nothing + , _crKijkwijzerRating = Nothing + , _crMtrcbRating = Nothing + , _crFcoRating = Nothing + , _crCicfRating = Nothing + , _crCzfilmRating = Nothing + , _crNbcRating = Nothing + , _crFmocRating = Nothing + , _crRussiaRating = Nothing + , _crEgfilmRating = Nothing + , _crResorteviolenciaRating = Nothing + , _crMibacRating = Nothing + , _crMedietilsynetRating = Nothing + , _crMccypRating = Nothing + , _crNkclvRating = Nothing + , _crFpbRating = Nothing + , _crLsfRating = Nothing + , _crBfvcRating = Nothing + , _crCncRating = Nothing + , _crSkfilmRating = Nothing + , _crOflcRating = Nothing + , _crKmrbRating = Nothing + } + +-- | The video\'s rating in Peru. +crPefilmRating :: Lens' ContentRating (Maybe Text) +crPefilmRating + = lens _crPefilmRating + (\ s a -> s{_crPefilmRating = a}) + +-- | The video\'s Consejo de Calificación Cinematográfica (Chile) rating. +crCccRating :: Lens' ContentRating (Maybe Text) +crCccRating + = lens _crCccRating (\ s a -> s{_crCccRating = a}) + +-- | The video\'s Anatel (Asociación Nacional de Televisión) rating for +-- Chilean television. +crAnatelRating :: Lens' ContentRating (Maybe Text) +crAnatelRating + = lens _crAnatelRating + (\ s a -> s{_crAnatelRating = a}) + +-- | The video\'s Motion Picture Association of America (MPAA) rating. +crMpaaRating :: Lens' ContentRating (Maybe Text) +crMpaaRating + = lens _crMpaaRating (\ s a -> s{_crMpaaRating = a}) + +-- | The video\'s rating from Portugal\'s Comissão de Classificação de +-- Espect´culos. +crCceRating :: Lens' ContentRating (Maybe Text) +crCceRating + = lens _crCceRating (\ s a -> s{_crCceRating = a}) + +-- | The video\'s rating from Malta\'s Film Age-Classification Board. +crMccaaRating :: Lens' ContentRating (Maybe Text) +crMccaaRating + = lens _crMccaaRating + (\ s a -> s{_crMccaaRating = a}) + +-- | The video\'s rating in Switzerland. +crChfilmRating :: Lens' ContentRating (Maybe Text) +crChfilmRating + = lens _crChfilmRating + (\ s a -> s{_crChfilmRating = a}) + +-- | The video\'s Instituto de la Cinematografía y de las Artes Audiovisuales +-- (ICAA - Spain) rating. +crIcaaRating :: Lens' ContentRating (Maybe Text) +crIcaaRating + = lens _crIcaaRating (\ s a -> s{_crIcaaRating = a}) + +-- | The video\'s rating from Malaysia\'s Film Censorship Board. +crFcbmRating :: Lens' ContentRating (Maybe Text) +crFcbmRating + = lens _crFcbmRating (\ s a -> s{_crFcbmRating = a}) + +-- | The video\'s rating from the Austrian Board of Media Classification +-- (Bundesministerium für Unterricht, Kunst und Kultur). +crBmukkRating :: Lens' ContentRating (Maybe Text) +crBmukkRating + = lens _crBmukkRating + (\ s a -> s{_crBmukkRating = a}) + +-- | The video\'s rating from Taiwan\'s Ministry of Culture (文化部). +crMoctwRating :: Lens' ContentRating (Maybe Text) +crMoctwRating + = lens _crMoctwRating + (\ s a -> s{_crMoctwRating = a}) + +-- | The video\'s rating from Nigeria\'s National Film and Video Censors +-- Board. +crNfvcbRating :: Lens' ContentRating (Maybe Text) +crNfvcbRating + = lens _crNfvcbRating + (\ s a -> s{_crNfvcbRating = a}) + +-- | Reasons that explain why the video received its DJCQT (Brazil) rating. +crDjctqRatingReasons :: Lens' ContentRating [Text] +crDjctqRatingReasons + = lens _crDjctqRatingReasons + (\ s a -> s{_crDjctqRatingReasons = a}) + . _Default + . _Coerce + +-- | The video\'s rating from Italy\'s Autorità per le Garanzie nelle +-- Comunicazioni (AGCOM). +crAgcomRating :: Lens' ContentRating (Maybe Text) +crAgcomRating + = lens _crAgcomRating + (\ s a -> s{_crAgcomRating = a}) + +-- | The video\'s rating from Romania\'s CONSILIUL NATIONAL AL +-- AUDIOVIZUALULUI (CNA). +crCnaRating :: Lens' ContentRating (Maybe Text) +crCnaRating + = lens _crCnaRating (\ s a -> s{_crCnaRating = a}) + +-- | The video\'s rating from the Canadian Radio-Television and +-- Telecommunications Commission (CRTC) for Canadian French-language +-- broadcasts. For more information, see the Canadian Broadcast Standards +-- Council website. +crCatvfrRating :: Lens' ContentRating (Maybe Text) +crCatvfrRating + = lens _crCatvfrRating + (\ s a -> s{_crCatvfrRating = a}) + +-- | The video\'s Central Board of Film Certification (CBFC - India) rating. +crCbfcRating :: Lens' ContentRating (Maybe Text) +crCbfcRating + = lens _crCbfcRating (\ s a -> s{_crCbfcRating = a}) + +-- | The video\'s rating from the Kenya Film Classification Board. +crKfcbRating :: Lens' ContentRating (Maybe Text) +crKfcbRating + = lens _crKfcbRating (\ s a -> s{_crKfcbRating = a}) + +-- | The video\'s rating from Statens medieråd (Sweden\'s National Media +-- Council). +crSmsaRating :: Lens' ContentRating (Maybe Text) +crSmsaRating + = lens _crSmsaRating (\ s a -> s{_crSmsaRating = a}) + +-- | The video\'s Canadian Home Video Rating System (CHVRS) rating. +crChvrsRating :: Lens' ContentRating (Maybe Text) +crChvrsRating + = lens _crChvrsRating + (\ s a -> s{_crChvrsRating = a}) + +-- | The video\'s INCAA (Instituto Nacional de Cine y Artes Audiovisuales - +-- Argentina) rating. +crIncaaRating :: Lens' ContentRating (Maybe Text) +crIncaaRating + = lens _crIncaaRating + (\ s a -> s{_crIncaaRating = a}) + +-- | The video\'s rating from the Bulgarian National Film Center. +crNfrcRating :: Lens' ContentRating (Maybe Text) +crNfrcRating + = lens _crNfrcRating (\ s a -> s{_crNfrcRating = a}) + +-- | The video\'s rating from France\'s Conseil supérieur de l?audiovisuel, +-- which rates broadcast content. +crCsaRating :: Lens' ContentRating (Maybe Text) +crCsaRating + = lens _crCsaRating (\ s a -> s{_crCsaRating = a}) + +-- | The video\'s Ministerio de Cultura (Colombia) rating. +crMocRating :: Lens' ContentRating (Maybe Text) +crMocRating + = lens _crMocRating (\ s a -> s{_crMocRating = a}) + +-- | The video\'s Eirin (映倫) rating. Eirin is the Japanese rating system. +crEirinRating :: Lens' ContentRating (Maybe Text) +crEirinRating + = lens _crEirinRating + (\ s a -> s{_crEirinRating = a}) + +-- | The video\'s Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - +-- Germany) rating. +crFskRating :: Lens' ContentRating (Maybe Text) +crFskRating + = lens _crFskRating (\ s a -> s{_crFskRating = a}) + +-- | The video\'s rating in Estonia. +crEefilmRating :: Lens' ContentRating (Maybe Text) +crEefilmRating + = lens _crEefilmRating + (\ s a -> s{_crEefilmRating = a}) + +-- | The video\'s rating from the Hungarian Nemzeti Filmiroda, the Rating +-- Committee of the National Office of Film. +crRcnofRating :: Lens' ContentRating (Maybe Text) +crRcnofRating + = lens _crRcnofRating + (\ s a -> s{_crRcnofRating = a}) + +-- | The video\'s rating from Finland\'s Kansallinen Audiovisuaalinen +-- Instituutti (National Audiovisual Institute). +crMekuRating :: Lens' ContentRating (Maybe Text) +crMekuRating + = lens _crMekuRating (\ s a -> s{_crMekuRating = a}) + +-- | The video\'s rating in Israel. +crIlfilmRating :: Lens' ContentRating (Maybe Text) +crIlfilmRating + = lens _crIlfilmRating + (\ s a -> s{_crIlfilmRating = a}) + +-- | The video\'s Irish Film Classification Office (IFCO - Ireland) rating. +-- See the IFCO website for more information. +crIfcoRating :: Lens' ContentRating (Maybe Text) +crIfcoRating + = lens _crIfcoRating (\ s a -> s{_crIfcoRating = a}) + +-- | The video\'s rating in Poland. +crNbcplRating :: Lens' ContentRating (Maybe Text) +crNbcplRating + = lens _crNbcplRating + (\ s a -> s{_crNbcplRating = a}) + +-- | The video\'s rating in Greece. +crGrfilmRating :: Lens' ContentRating (Maybe Text) +crGrfilmRating + = lens _crGrfilmRating + (\ s a -> s{_crGrfilmRating = a}) + +-- | The video\'s rating from Ireland\'s Raidió Teilifís Éireann. +crRteRating :: Lens' ContentRating (Maybe Text) +crRteRating + = lens _crRteRating (\ s a -> s{_crRteRating = a}) + +-- | The video\'s Australian Classification Board (ACB) or Australian +-- Communications and Media Authority (ACMA) rating. ACMA ratings are used +-- to classify children\'s television programming. +crAcbRating :: Lens' ContentRating (Maybe Text) +crAcbRating + = lens _crAcbRating (\ s a -> s{_crAcbRating = a}) + +-- | Rating system for Canadian TV - Canadian TV Classification System The +-- video\'s rating from the Canadian Radio-Television and +-- Telecommunications Commission (CRTC) for Canadian English-language +-- broadcasts. For more information, see the Canadian Broadcast Standards +-- Council website. +crCatvRating :: Lens' ContentRating (Maybe Text) +crCatvRating + = lens _crCatvRating (\ s a -> s{_crCatvRating = a}) + +-- | The video\'s rating from Singapore\'s Media Development Authority (MDA) +-- and, specifically, it\'s Board of Film Censors (BFC). +crMdaRating :: Lens' ContentRating (Maybe Text) +crMdaRating + = lens _crMdaRating (\ s a -> s{_crMdaRating = a}) + +-- | The video\'s Departamento de Justiça, Classificação, Qualificação e +-- Títulos (DJCQT - Brazil) rating. +crDjctqRating :: Lens' ContentRating (Maybe Text) +crDjctqRating + = lens _crDjctqRating + (\ s a -> s{_crDjctqRating = a}) + +-- | The video\'s rating in Iceland. +crSmaisRating :: Lens' ContentRating (Maybe Text) +crSmaisRating + = lens _crSmaisRating + (\ s a -> s{_crSmaisRating = a}) + +-- | The video\'s rating from Luxembourg\'s Commission de surveillance de la +-- classification des films (CSCF). +crCscfRating :: Lens' ContentRating (Maybe Text) +crCscfRating + = lens _crCscfRating (\ s a -> s{_crCscfRating = a}) + +-- | The video\'s TV Parental Guidelines (TVPG) rating. +crTvpgRating :: Lens' ContentRating (Maybe Text) +crTvpgRating + = lens _crTvpgRating (\ s a -> s{_crTvpgRating = a}) + +-- | The video\'s General Directorate of Radio, Television and Cinematography +-- (Mexico) rating. +crRtcRating :: Lens' ContentRating (Maybe Text) +crRtcRating + = lens _crRtcRating (\ s a -> s{_crRtcRating = a}) + +-- | A rating that YouTube uses to identify age-restricted content. +crYtRating :: Lens' ContentRating (Maybe Text) +crYtRating + = lens _crYtRating (\ s a -> s{_crYtRating = a}) + +-- | The video\'s British Board of Film Classification (BBFC) rating. +crBbfcRating :: Lens' ContentRating (Maybe Text) +crBbfcRating + = lens _crBbfcRating (\ s a -> s{_crBbfcRating = a}) + +-- | voor de Classificatie van Audiovisuele Media (Netherlands). +crKijkwijzerRating :: Lens' ContentRating (Maybe Text) +crKijkwijzerRating + = lens _crKijkwijzerRating + (\ s a -> s{_crKijkwijzerRating = a}) + +-- | The video\'s rating from the Movie and Television Review and +-- Classification Board (Philippines). +crMtrcbRating :: Lens' ContentRating (Maybe Text) +crMtrcbRating + = lens _crMtrcbRating + (\ s a -> s{_crMtrcbRating = a}) + +-- | The video\'s rating from Hong Kong\'s Office for Film, Newspaper and +-- Article Administration. +crFcoRating :: Lens' ContentRating (Maybe Text) +crFcoRating + = lens _crFcoRating (\ s a -> s{_crFcoRating = a}) + +-- | The video\'s rating from the Commission de Contrôle des Films (Belgium). +crCicfRating :: Lens' ContentRating (Maybe Text) +crCicfRating + = lens _crCicfRating (\ s a -> s{_crCicfRating = a}) + +-- | The video\'s rating in the Czech Republic. +crCzfilmRating :: Lens' ContentRating (Maybe Text) +crCzfilmRating + = lens _crCzfilmRating + (\ s a -> s{_crCzfilmRating = a}) + +-- | The video\'s rating from the Maldives National Bureau of Classification. +crNbcRating :: Lens' ContentRating (Maybe Text) +crNbcRating + = lens _crNbcRating (\ s a -> s{_crNbcRating = a}) + +-- | This property has been deprecated. Use the +-- contentDetails.contentRating.cncRating instead. +crFmocRating :: Lens' ContentRating (Maybe Text) +crFmocRating + = lens _crFmocRating (\ s a -> s{_crFmocRating = a}) + +-- | The video\'s National Film Registry of the Russian Federation (MKRF - +-- Russia) rating. +crRussiaRating :: Lens' ContentRating (Maybe Text) +crRussiaRating + = lens _crRussiaRating + (\ s a -> s{_crRussiaRating = a}) + +-- | The video\'s rating in Egypt. +crEgfilmRating :: Lens' ContentRating (Maybe Text) +crEgfilmRating + = lens _crEgfilmRating + (\ s a -> s{_crEgfilmRating = a}) + +-- | The video\'s rating in Venezuela. +crResorteviolenciaRating :: Lens' ContentRating (Maybe Text) +crResorteviolenciaRating + = lens _crResorteviolenciaRating + (\ s a -> s{_crResorteviolenciaRating = a}) + +-- | The video\'s rating from the Ministero dei Beni e delle Attività +-- Culturali e del Turismo (Italy). +crMibacRating :: Lens' ContentRating (Maybe Text) +crMibacRating + = lens _crMibacRating + (\ s a -> s{_crMibacRating = a}) + +-- | The video\'s rating from Medietilsynet, the Norwegian Media Authority. +crMedietilsynetRating :: Lens' ContentRating (Maybe Text) +crMedietilsynetRating + = lens _crMedietilsynetRating + (\ s a -> s{_crMedietilsynetRating = a}) + +-- | The video\'s rating from the Danish Film Institute\'s (Det Danske +-- Filminstitut) Media Council for Children and Young People. +crMccypRating :: Lens' ContentRating (Maybe Text) +crMccypRating + = lens _crMccypRating + (\ s a -> s{_crMccypRating = a}) + +-- | The video\'s rating from the Nacionãlais Kino centrs (National Film +-- Centre of Latvia). +crNkclvRating :: Lens' ContentRating (Maybe Text) +crNkclvRating + = lens _crNkclvRating + (\ s a -> s{_crNkclvRating = a}) + +-- | The video\'s rating from South Africa\'s Film and Publication Board. +crFpbRating :: Lens' ContentRating (Maybe Text) +crFpbRating + = lens _crFpbRating (\ s a -> s{_crFpbRating = a}) + +-- | The video\'s rating from Indonesia\'s Lembaga Sensor Film. +crLsfRating :: Lens' ContentRating (Maybe Text) +crLsfRating + = lens _crLsfRating (\ s a -> s{_crLsfRating = a}) + +-- | The video\'s rating from Thailand\'s Board of Film and Video Censors. +crBfvcRating :: Lens' ContentRating (Maybe Text) +crBfvcRating + = lens _crBfvcRating (\ s a -> s{_crBfvcRating = a}) + +-- | Rating system in France - Commission de classification cinematographique +crCncRating :: Lens' ContentRating (Maybe Text) +crCncRating + = lens _crCncRating (\ s a -> s{_crCncRating = a}) + +-- | The video\'s rating in Slovakia. +crSkfilmRating :: Lens' ContentRating (Maybe Text) +crSkfilmRating + = lens _crSkfilmRating + (\ s a -> s{_crSkfilmRating = a}) + +-- | The video\'s Office of Film and Literature Classification (OFLC - New +-- Zealand) rating. +crOflcRating :: Lens' ContentRating (Maybe Text) +crOflcRating + = lens _crOflcRating (\ s a -> s{_crOflcRating = a}) + +-- | The video\'s Korea Media Rating Board (영상물등급위원회) rating. The +-- KMRB rates videos in South Korea. +crKmrbRating :: Lens' ContentRating (Maybe Text) +crKmrbRating + = lens _crKmrbRating (\ s a -> s{_crKmrbRating = a}) + +instance FromJSON ContentRating where + parseJSON + = withObject "ContentRating" + (\ o -> + ContentRating <$> + (o .:? "pefilmRating") <*> (o .:? "cccRating") <*> + (o .:? "anatelRating") + <*> (o .:? "mpaaRating") + <*> (o .:? "cceRating") + <*> (o .:? "mccaaRating") + <*> (o .:? "chfilmRating") + <*> (o .:? "icaaRating") + <*> (o .:? "fcbmRating") + <*> (o .:? "bmukkRating") + <*> (o .:? "moctwRating") + <*> (o .:? "nfvcbRating") + <*> (o .:? "djctqRatingReasons" .!= mempty) + <*> (o .:? "agcomRating") + <*> (o .:? "cnaRating") + <*> (o .:? "catvfrRating") + <*> (o .:? "cbfcRating") + <*> (o .:? "kfcbRating") + <*> (o .:? "smsaRating") + <*> (o .:? "chvrsRating") + <*> (o .:? "incaaRating") + <*> (o .:? "nfrcRating") + <*> (o .:? "csaRating") + <*> (o .:? "mocRating") + <*> (o .:? "eirinRating") + <*> (o .:? "fskRating") + <*> (o .:? "eefilmRating") + <*> (o .:? "rcnofRating") + <*> (o .:? "mekuRating") + <*> (o .:? "ilfilmRating") + <*> (o .:? "ifcoRating") + <*> (o .:? "nbcplRating") + <*> (o .:? "grfilmRating") + <*> (o .:? "rteRating") + <*> (o .:? "acbRating") + <*> (o .:? "catvRating") + <*> (o .:? "mdaRating") + <*> (o .:? "djctqRating") + <*> (o .:? "smaisRating") + <*> (o .:? "cscfRating") + <*> (o .:? "tvpgRating") + <*> (o .:? "rtcRating") + <*> (o .:? "ytRating") + <*> (o .:? "bbfcRating") + <*> (o .:? "kijkwijzerRating") + <*> (o .:? "mtrcbRating") + <*> (o .:? "fcoRating") + <*> (o .:? "cicfRating") + <*> (o .:? "czfilmRating") + <*> (o .:? "nbcRating") + <*> (o .:? "fmocRating") + <*> (o .:? "russiaRating") + <*> (o .:? "egfilmRating") + <*> (o .:? "resorteviolenciaRating") + <*> (o .:? "mibacRating") + <*> (o .:? "medietilsynetRating") + <*> (o .:? "mccypRating") + <*> (o .:? "nkclvRating") + <*> (o .:? "fpbRating") + <*> (o .:? "lsfRating") + <*> (o .:? "bfvcRating") + <*> (o .:? "cncRating") + <*> (o .:? "skfilmRating") + <*> (o .:? "oflcRating") + <*> (o .:? "kmrbRating")) + +instance ToJSON ContentRating where + toJSON ContentRating{..} + = object + (catMaybes + [("pefilmRating" .=) <$> _crPefilmRating, + ("cccRating" .=) <$> _crCccRating, + ("anatelRating" .=) <$> _crAnatelRating, + ("mpaaRating" .=) <$> _crMpaaRating, + ("cceRating" .=) <$> _crCceRating, + ("mccaaRating" .=) <$> _crMccaaRating, + ("chfilmRating" .=) <$> _crChfilmRating, + ("icaaRating" .=) <$> _crIcaaRating, + ("fcbmRating" .=) <$> _crFcbmRating, + ("bmukkRating" .=) <$> _crBmukkRating, + ("moctwRating" .=) <$> _crMoctwRating, + ("nfvcbRating" .=) <$> _crNfvcbRating, + ("djctqRatingReasons" .=) <$> _crDjctqRatingReasons, + ("agcomRating" .=) <$> _crAgcomRating, + ("cnaRating" .=) <$> _crCnaRating, + ("catvfrRating" .=) <$> _crCatvfrRating, + ("cbfcRating" .=) <$> _crCbfcRating, + ("kfcbRating" .=) <$> _crKfcbRating, + ("smsaRating" .=) <$> _crSmsaRating, + ("chvrsRating" .=) <$> _crChvrsRating, + ("incaaRating" .=) <$> _crIncaaRating, + ("nfrcRating" .=) <$> _crNfrcRating, + ("csaRating" .=) <$> _crCsaRating, + ("mocRating" .=) <$> _crMocRating, + ("eirinRating" .=) <$> _crEirinRating, + ("fskRating" .=) <$> _crFskRating, + ("eefilmRating" .=) <$> _crEefilmRating, + ("rcnofRating" .=) <$> _crRcnofRating, + ("mekuRating" .=) <$> _crMekuRating, + ("ilfilmRating" .=) <$> _crIlfilmRating, + ("ifcoRating" .=) <$> _crIfcoRating, + ("nbcplRating" .=) <$> _crNbcplRating, + ("grfilmRating" .=) <$> _crGrfilmRating, + ("rteRating" .=) <$> _crRteRating, + ("acbRating" .=) <$> _crAcbRating, + ("catvRating" .=) <$> _crCatvRating, + ("mdaRating" .=) <$> _crMdaRating, + ("djctqRating" .=) <$> _crDjctqRating, + ("smaisRating" .=) <$> _crSmaisRating, + ("cscfRating" .=) <$> _crCscfRating, + ("tvpgRating" .=) <$> _crTvpgRating, + ("rtcRating" .=) <$> _crRtcRating, + ("ytRating" .=) <$> _crYtRating, + ("bbfcRating" .=) <$> _crBbfcRating, + ("kijkwijzerRating" .=) <$> _crKijkwijzerRating, + ("mtrcbRating" .=) <$> _crMtrcbRating, + ("fcoRating" .=) <$> _crFcoRating, + ("cicfRating" .=) <$> _crCicfRating, + ("czfilmRating" .=) <$> _crCzfilmRating, + ("nbcRating" .=) <$> _crNbcRating, + ("fmocRating" .=) <$> _crFmocRating, + ("russiaRating" .=) <$> _crRussiaRating, + ("egfilmRating" .=) <$> _crEgfilmRating, + ("resorteviolenciaRating" .=) <$> + _crResorteviolenciaRating, + ("mibacRating" .=) <$> _crMibacRating, + ("medietilsynetRating" .=) <$> + _crMedietilsynetRating, + ("mccypRating" .=) <$> _crMccypRating, + ("nkclvRating" .=) <$> _crNkclvRating, + ("fpbRating" .=) <$> _crFpbRating, + ("lsfRating" .=) <$> _crLsfRating, + ("bfvcRating" .=) <$> _crBfvcRating, + ("cncRating" .=) <$> _crCncRating, + ("skfilmRating" .=) <$> _crSkfilmRating, + ("oflcRating" .=) <$> _crOflcRating, + ("kmrbRating" .=) <$> _crKmrbRating]) + +-- | Basic details about a comment, such as its author and text. +-- +-- /See:/ 'commentSNIppet' smart constructor. +data CommentSNIppet = CommentSNIppet + { _csnipViewerRating :: !(Maybe Text) + , _csnipPublishedAt :: !(Maybe UTCTime) + , _csnipAuthorChannelUrl :: !(Maybe Text) + , _csnipModerationStatus :: !(Maybe Text) + , _csnipLikeCount :: !(Maybe Word32) + , _csnipChannelId :: !(Maybe Text) + , _csnipTextOriginal :: !(Maybe Text) + , _csnipVideoId :: !(Maybe Text) + , _csnipTextDisplay :: !(Maybe Text) + , _csnipAuthorProfileImageUrl :: !(Maybe Text) + , _csnipAuthorDisplayName :: !(Maybe Text) + , _csnipUpdatedAt :: !(Maybe UTCTime) + , _csnipAuthorChannelId :: !(Maybe (Maybe ChannelId)) + , _csnipCanRate :: !(Maybe Bool) + , _csnipAuthorGoogleplusProfileUrl :: !(Maybe Text) + , _csnipParentId :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'csnipViewerRating' +-- +-- * 'csnipPublishedAt' +-- +-- * 'csnipAuthorChannelUrl' +-- +-- * 'csnipModerationStatus' +-- +-- * 'csnipLikeCount' +-- +-- * 'csnipChannelId' +-- +-- * 'csnipTextOriginal' +-- +-- * 'csnipVideoId' +-- +-- * 'csnipTextDisplay' +-- +-- * 'csnipAuthorProfileImageUrl' +-- +-- * 'csnipAuthorDisplayName' +-- +-- * 'csnipUpdatedAt' +-- +-- * 'csnipAuthorChannelId' +-- +-- * 'csnipCanRate' +-- +-- * 'csnipAuthorGoogleplusProfileUrl' +-- +-- * 'csnipParentId' +commentSNIppet + :: CommentSNIppet +commentSNIppet = + CommentSNIppet + { _csnipViewerRating = Nothing + , _csnipPublishedAt = Nothing + , _csnipAuthorChannelUrl = Nothing + , _csnipModerationStatus = Nothing + , _csnipLikeCount = Nothing + , _csnipChannelId = Nothing + , _csnipTextOriginal = Nothing + , _csnipVideoId = Nothing + , _csnipTextDisplay = Nothing + , _csnipAuthorProfileImageUrl = Nothing + , _csnipAuthorDisplayName = Nothing + , _csnipUpdatedAt = Nothing + , _csnipAuthorChannelId = Nothing + , _csnipCanRate = Nothing + , _csnipAuthorGoogleplusProfileUrl = Nothing + , _csnipParentId = Nothing + } + +-- | The rating the viewer has given to this comment. For the time being this +-- will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. +-- This may change in the future. +csnipViewerRating :: Lens' CommentSNIppet (Maybe Text) +csnipViewerRating + = lens _csnipViewerRating + (\ s a -> s{_csnipViewerRating = a}) + +-- | The date and time when the comment was orignally published. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +csnipPublishedAt :: Lens' CommentSNIppet (Maybe UTCTime) +csnipPublishedAt + = lens _csnipPublishedAt + (\ s a -> s{_csnipPublishedAt = a}) + +-- | Link to the author\'s YouTube channel, if any. +csnipAuthorChannelUrl :: Lens' CommentSNIppet (Maybe Text) +csnipAuthorChannelUrl + = lens _csnipAuthorChannelUrl + (\ s a -> s{_csnipAuthorChannelUrl = a}) + +-- | The comment\'s moderation status. Will not be set if the comments were +-- requested through the id filter. +csnipModerationStatus :: Lens' CommentSNIppet (Maybe Text) +csnipModerationStatus + = lens _csnipModerationStatus + (\ s a -> s{_csnipModerationStatus = a}) + +-- | The total number of likes this comment has received. +csnipLikeCount :: Lens' CommentSNIppet (Maybe Word32) +csnipLikeCount + = lens _csnipLikeCount + (\ s a -> s{_csnipLikeCount = a}) + +-- | The id of the corresponding YouTube channel. In case of a channel +-- comment this is the channel the comment refers to. In case of a video +-- comment it\'s the video\'s channel. +csnipChannelId :: Lens' CommentSNIppet (Maybe Text) +csnipChannelId + = lens _csnipChannelId + (\ s a -> s{_csnipChannelId = a}) + +-- | The comment\'s original raw text as initially posted or last updated. +-- The original text will only be returned if it is accessible to the +-- viewer, which is only guaranteed if the viewer is the comment\'s author. +csnipTextOriginal :: Lens' CommentSNIppet (Maybe Text) +csnipTextOriginal + = lens _csnipTextOriginal + (\ s a -> s{_csnipTextOriginal = a}) + +-- | The ID of the video the comment refers to, if any. +csnipVideoId :: Lens' CommentSNIppet (Maybe Text) +csnipVideoId + = lens _csnipVideoId (\ s a -> s{_csnipVideoId = a}) + +-- | The comment\'s text. The format is either plain text or HTML dependent +-- on what has been requested. Even the plain text representation may +-- differ from the text originally posted in that it may replace video +-- links with video titles etc. +csnipTextDisplay :: Lens' CommentSNIppet (Maybe Text) +csnipTextDisplay + = lens _csnipTextDisplay + (\ s a -> s{_csnipTextDisplay = a}) + +-- | The URL for the avatar of the user who posted the comment. +csnipAuthorProfileImageUrl :: Lens' CommentSNIppet (Maybe Text) +csnipAuthorProfileImageUrl + = lens _csnipAuthorProfileImageUrl + (\ s a -> s{_csnipAuthorProfileImageUrl = a}) + +-- | The name of the user who posted the comment. +csnipAuthorDisplayName :: Lens' CommentSNIppet (Maybe Text) +csnipAuthorDisplayName + = lens _csnipAuthorDisplayName + (\ s a -> s{_csnipAuthorDisplayName = a}) + +-- | The date and time when was last updated . The value is specified in ISO +-- 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +csnipUpdatedAt :: Lens' CommentSNIppet (Maybe UTCTime) +csnipUpdatedAt + = lens _csnipUpdatedAt + (\ s a -> s{_csnipUpdatedAt = a}) + +-- | The id of the author\'s YouTube channel, if any. +csnipAuthorChannelId :: Lens' CommentSNIppet (Maybe (Maybe ChannelId)) +csnipAuthorChannelId + = lens _csnipAuthorChannelId + (\ s a -> s{_csnipAuthorChannelId = a}) + +-- | Whether the current viewer can rate this comment. +csnipCanRate :: Lens' CommentSNIppet (Maybe Bool) +csnipCanRate + = lens _csnipCanRate (\ s a -> s{_csnipCanRate = a}) + +-- | Link to the author\'s Google+ profile, if any. +csnipAuthorGoogleplusProfileUrl :: Lens' CommentSNIppet (Maybe Text) +csnipAuthorGoogleplusProfileUrl + = lens _csnipAuthorGoogleplusProfileUrl + (\ s a -> s{_csnipAuthorGoogleplusProfileUrl = a}) + +-- | The unique id of the parent comment, only set for replies. +csnipParentId :: Lens' CommentSNIppet (Maybe Text) +csnipParentId + = lens _csnipParentId + (\ s a -> s{_csnipParentId = a}) + +instance FromJSON CommentSNIppet where + parseJSON + = withObject "CommentSNIppet" + (\ o -> + CommentSNIppet <$> + (o .:? "viewerRating") <*> (o .:? "publishedAt") <*> + (o .:? "authorChannelUrl") + <*> (o .:? "moderationStatus") + <*> (o .:? "likeCount") + <*> (o .:? "channelId") + <*> (o .:? "textOriginal") + <*> (o .:? "videoId") + <*> (o .:? "textDisplay") + <*> (o .:? "authorProfileImageUrl") + <*> (o .:? "authorDisplayName") + <*> (o .:? "updatedAt") + <*> (o .:? "authorChannelId") + <*> (o .:? "canRate") + <*> (o .:? "authorGoogleplusProfileUrl") + <*> (o .:? "parentId")) + +instance ToJSON CommentSNIppet where + toJSON CommentSNIppet{..} + = object + (catMaybes + [("viewerRating" .=) <$> _csnipViewerRating, + ("publishedAt" .=) <$> _csnipPublishedAt, + ("authorChannelUrl" .=) <$> _csnipAuthorChannelUrl, + ("moderationStatus" .=) <$> _csnipModerationStatus, + ("likeCount" .=) <$> _csnipLikeCount, + ("channelId" .=) <$> _csnipChannelId, + ("textOriginal" .=) <$> _csnipTextOriginal, + ("videoId" .=) <$> _csnipVideoId, + ("textDisplay" .=) <$> _csnipTextDisplay, + ("authorProfileImageUrl" .=) <$> + _csnipAuthorProfileImageUrl, + ("authorDisplayName" .=) <$> _csnipAuthorDisplayName, + ("updatedAt" .=) <$> _csnipUpdatedAt, + ("authorChannelId" .=) <$> _csnipAuthorChannelId, + ("canRate" .=) <$> _csnipCanRate, + ("authorGoogleplusProfileUrl" .=) <$> + _csnipAuthorGoogleplusProfileUrl, + ("parentId" .=) <$> _csnipParentId]) + +-- | Recording information associated with the video. +-- +-- /See:/ 'videoRecordingDetails' smart constructor. +data VideoRecordingDetails = VideoRecordingDetails + { _vrdLocation :: !(Maybe (Maybe GeoPoint)) + , _vrdLocationDescription :: !(Maybe Text) + , _vrdRecordingDate :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoRecordingDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vrdLocation' +-- +-- * 'vrdLocationDescription' +-- +-- * 'vrdRecordingDate' +videoRecordingDetails + :: VideoRecordingDetails +videoRecordingDetails = + VideoRecordingDetails + { _vrdLocation = Nothing + , _vrdLocationDescription = Nothing + , _vrdRecordingDate = Nothing + } + +-- | The geolocation information associated with the video. +vrdLocation :: Lens' VideoRecordingDetails (Maybe (Maybe GeoPoint)) +vrdLocation + = lens _vrdLocation (\ s a -> s{_vrdLocation = a}) + +-- | The text description of the location where the video was recorded. +vrdLocationDescription :: Lens' VideoRecordingDetails (Maybe Text) +vrdLocationDescription + = lens _vrdLocationDescription + (\ s a -> s{_vrdLocationDescription = a}) + +-- | The date and time when the video was recorded. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ) format. +vrdRecordingDate :: Lens' VideoRecordingDetails (Maybe UTCTime) +vrdRecordingDate + = lens _vrdRecordingDate + (\ s a -> s{_vrdRecordingDate = a}) + +instance FromJSON VideoRecordingDetails where + parseJSON + = withObject "VideoRecordingDetails" + (\ o -> + VideoRecordingDetails <$> + (o .:? "location") <*> (o .:? "locationDescription") + <*> (o .:? "recordingDate")) + +instance ToJSON VideoRecordingDetails where + toJSON VideoRecordingDetails{..} + = object + (catMaybes + [("location" .=) <$> _vrdLocation, + ("locationDescription" .=) <$> + _vrdLocationDescription, + ("recordingDate" .=) <$> _vrdRecordingDate]) + +-- | Branding properties for the channel view. +-- +-- /See:/ 'channelSettings' smart constructor. +data ChannelSettings = ChannelSettings + { _cShowRelatedChannels :: !(Maybe Bool) + , _cDefaultTab :: !(Maybe Text) + , _cFeaturedChannelsTitle :: !(Maybe Text) + , _cCountry :: !(Maybe Text) + , _cProfileColor :: !(Maybe Text) + , _cModerateComments :: !(Maybe Bool) + , _cKeywords :: !(Maybe Text) + , _cUnsubscribedTrailer :: !(Maybe Text) + , _cTrackingAnalyticsAccountId :: !(Maybe Text) + , _cFeaturedChannelsUrls :: !(Maybe [Text]) + , _cShowBrowseView :: !(Maybe Bool) + , _cTitle :: !(Maybe Text) + , _cDescription :: !(Maybe Text) + , _cDefaultLanguage :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSettings' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cShowRelatedChannels' +-- +-- * 'cDefaultTab' +-- +-- * 'cFeaturedChannelsTitle' +-- +-- * 'cCountry' +-- +-- * 'cProfileColor' +-- +-- * 'cModerateComments' +-- +-- * 'cKeywords' +-- +-- * 'cUnsubscribedTrailer' +-- +-- * 'cTrackingAnalyticsAccountId' +-- +-- * 'cFeaturedChannelsUrls' +-- +-- * 'cShowBrowseView' +-- +-- * 'cTitle' +-- +-- * 'cDescription' +-- +-- * 'cDefaultLanguage' +channelSettings + :: ChannelSettings +channelSettings = + ChannelSettings + { _cShowRelatedChannels = Nothing + , _cDefaultTab = Nothing + , _cFeaturedChannelsTitle = Nothing + , _cCountry = Nothing + , _cProfileColor = Nothing + , _cModerateComments = Nothing + , _cKeywords = Nothing + , _cUnsubscribedTrailer = Nothing + , _cTrackingAnalyticsAccountId = Nothing + , _cFeaturedChannelsUrls = Nothing + , _cShowBrowseView = Nothing + , _cTitle = Nothing + , _cDescription = Nothing + , _cDefaultLanguage = Nothing + } + +-- | Whether related channels should be proposed. +cShowRelatedChannels :: Lens' ChannelSettings (Maybe Bool) +cShowRelatedChannels + = lens _cShowRelatedChannels + (\ s a -> s{_cShowRelatedChannels = a}) + +-- | Which content tab users should see when viewing the channel. +cDefaultTab :: Lens' ChannelSettings (Maybe Text) +cDefaultTab + = lens _cDefaultTab (\ s a -> s{_cDefaultTab = a}) + +-- | Title for the featured channels tab. +cFeaturedChannelsTitle :: Lens' ChannelSettings (Maybe Text) +cFeaturedChannelsTitle + = lens _cFeaturedChannelsTitle + (\ s a -> s{_cFeaturedChannelsTitle = a}) + +-- | The country of the channel. +cCountry :: Lens' ChannelSettings (Maybe Text) +cCountry = lens _cCountry (\ s a -> s{_cCountry = a}) + +-- | A prominent color that can be rendered on this channel page. +cProfileColor :: Lens' ChannelSettings (Maybe Text) +cProfileColor + = lens _cProfileColor + (\ s a -> s{_cProfileColor = a}) + +-- | Whether user-submitted comments left on the channel page need to be +-- approved by the channel owner to be publicly visible. +cModerateComments :: Lens' ChannelSettings (Maybe Bool) +cModerateComments + = lens _cModerateComments + (\ s a -> s{_cModerateComments = a}) + +-- | Lists keywords associated with the channel, comma-separated. +cKeywords :: Lens' ChannelSettings (Maybe Text) +cKeywords + = lens _cKeywords (\ s a -> s{_cKeywords = a}) + +-- | The trailer of the channel, for users that are not subscribers. +cUnsubscribedTrailer :: Lens' ChannelSettings (Maybe Text) +cUnsubscribedTrailer + = lens _cUnsubscribedTrailer + (\ s a -> s{_cUnsubscribedTrailer = a}) + +-- | The ID for a Google Analytics account to track and measure traffic to +-- the channels. +cTrackingAnalyticsAccountId :: Lens' ChannelSettings (Maybe Text) +cTrackingAnalyticsAccountId + = lens _cTrackingAnalyticsAccountId + (\ s a -> s{_cTrackingAnalyticsAccountId = a}) + +-- | The list of featured channels. +cFeaturedChannelsUrls :: Lens' ChannelSettings [Text] +cFeaturedChannelsUrls + = lens _cFeaturedChannelsUrls + (\ s a -> s{_cFeaturedChannelsUrls = a}) + . _Default + . _Coerce + +-- | Whether the tab to browse the videos should be displayed. +cShowBrowseView :: Lens' ChannelSettings (Maybe Bool) +cShowBrowseView + = lens _cShowBrowseView + (\ s a -> s{_cShowBrowseView = a}) + +-- | Specifies the channel title. +cTitle :: Lens' ChannelSettings (Maybe Text) +cTitle = lens _cTitle (\ s a -> s{_cTitle = a}) + +-- | Specifies the channel description. +cDescription :: Lens' ChannelSettings (Maybe Text) +cDescription + = lens _cDescription (\ s a -> s{_cDescription = a}) + +cDefaultLanguage :: Lens' ChannelSettings (Maybe Text) +cDefaultLanguage + = lens _cDefaultLanguage + (\ s a -> s{_cDefaultLanguage = a}) + +instance FromJSON ChannelSettings where + parseJSON + = withObject "ChannelSettings" + (\ o -> + ChannelSettings <$> + (o .:? "showRelatedChannels") <*> + (o .:? "defaultTab") + <*> (o .:? "featuredChannelsTitle") + <*> (o .:? "country") + <*> (o .:? "profileColor") + <*> (o .:? "moderateComments") + <*> (o .:? "keywords") + <*> (o .:? "unsubscribedTrailer") + <*> (o .:? "trackingAnalyticsAccountId") + <*> (o .:? "featuredChannelsUrls" .!= mempty) + <*> (o .:? "showBrowseView") + <*> (o .:? "title") + <*> (o .:? "description") + <*> (o .:? "defaultLanguage")) + +instance ToJSON ChannelSettings where + toJSON ChannelSettings{..} + = object + (catMaybes + [("showRelatedChannels" .=) <$> + _cShowRelatedChannels, + ("defaultTab" .=) <$> _cDefaultTab, + ("featuredChannelsTitle" .=) <$> + _cFeaturedChannelsTitle, + ("country" .=) <$> _cCountry, + ("profileColor" .=) <$> _cProfileColor, + ("moderateComments" .=) <$> _cModerateComments, + ("keywords" .=) <$> _cKeywords, + ("unsubscribedTrailer" .=) <$> _cUnsubscribedTrailer, + ("trackingAnalyticsAccountId" .=) <$> + _cTrackingAnalyticsAccountId, + ("featuredChannelsUrls" .=) <$> + _cFeaturedChannelsUrls, + ("showBrowseView" .=) <$> _cShowBrowseView, + ("title" .=) <$> _cTitle, + ("description" .=) <$> _cDescription, + ("defaultLanguage" .=) <$> _cDefaultLanguage]) + +-- | Basic details about a subscription, including title, description and +-- thumbnails of the subscribed item. +-- +-- /See:/ 'subscriptionSNIppet' smart constructor. +data SubscriptionSNIppet = SubscriptionSNIppet + { _ssResourceId :: !(Maybe (Maybe ResourceId)) + , _ssPublishedAt :: !(Maybe UTCTime) + , _ssChannelTitle :: !(Maybe Text) + , _ssChannelId :: !(Maybe Text) + , _ssThumbnails :: !(Maybe (Maybe ThumbnailDetails)) + , _ssTitle :: !(Maybe Text) + , _ssDescription :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'SubscriptionSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ssResourceId' +-- +-- * 'ssPublishedAt' +-- +-- * 'ssChannelTitle' +-- +-- * 'ssChannelId' +-- +-- * 'ssThumbnails' +-- +-- * 'ssTitle' +-- +-- * 'ssDescription' +subscriptionSNIppet + :: SubscriptionSNIppet +subscriptionSNIppet = + SubscriptionSNIppet + { _ssResourceId = Nothing + , _ssPublishedAt = Nothing + , _ssChannelTitle = Nothing + , _ssChannelId = Nothing + , _ssThumbnails = Nothing + , _ssTitle = Nothing + , _ssDescription = Nothing + } + +-- | The id object contains information about the channel that the user +-- subscribed to. +ssResourceId :: Lens' SubscriptionSNIppet (Maybe (Maybe ResourceId)) +ssResourceId + = lens _ssResourceId (\ s a -> s{_ssResourceId = a}) + +-- | The date and time that the subscription was created. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +ssPublishedAt :: Lens' SubscriptionSNIppet (Maybe UTCTime) +ssPublishedAt + = lens _ssPublishedAt + (\ s a -> s{_ssPublishedAt = a}) + +-- | Channel title for the channel that the subscription belongs to. +ssChannelTitle :: Lens' SubscriptionSNIppet (Maybe Text) +ssChannelTitle + = lens _ssChannelTitle + (\ s a -> s{_ssChannelTitle = a}) + +-- | The ID that YouTube uses to uniquely identify the subscriber\'s channel. +ssChannelId :: Lens' SubscriptionSNIppet (Maybe Text) +ssChannelId + = lens _ssChannelId (\ s a -> s{_ssChannelId = a}) + +-- | A map of thumbnail images associated with the video. For each object in +-- the map, the key is the name of the thumbnail image, and the value is an +-- object that contains other information about the thumbnail. +ssThumbnails :: Lens' SubscriptionSNIppet (Maybe (Maybe ThumbnailDetails)) +ssThumbnails + = lens _ssThumbnails (\ s a -> s{_ssThumbnails = a}) + +-- | The subscription\'s title. +ssTitle :: Lens' SubscriptionSNIppet (Maybe Text) +ssTitle = lens _ssTitle (\ s a -> s{_ssTitle = a}) + +-- | The subscription\'s details. +ssDescription :: Lens' SubscriptionSNIppet (Maybe Text) +ssDescription + = lens _ssDescription + (\ s a -> s{_ssDescription = a}) + +instance FromJSON SubscriptionSNIppet where + parseJSON + = withObject "SubscriptionSNIppet" + (\ o -> + SubscriptionSNIppet <$> + (o .:? "resourceId") <*> (o .:? "publishedAt") <*> + (o .:? "channelTitle") + <*> (o .:? "channelId") + <*> (o .:? "thumbnails") + <*> (o .:? "title") + <*> (o .:? "description")) + +instance ToJSON SubscriptionSNIppet where + toJSON SubscriptionSNIppet{..} + = object + (catMaybes + [("resourceId" .=) <$> _ssResourceId, + ("publishedAt" .=) <$> _ssPublishedAt, + ("channelTitle" .=) <$> _ssChannelTitle, + ("channelId" .=) <$> _ssChannelId, + ("thumbnails" .=) <$> _ssThumbnails, + ("title" .=) <$> _ssTitle, + ("description" .=) <$> _ssDescription]) + +-- | Brief description of the live stream status. +-- +-- /See:/ 'liveStreamStatus' smart constructor. +data LiveStreamStatus = LiveStreamStatus + { _lssStreamStatus :: !(Maybe Text) + , _lssHealthStatus :: !(Maybe (Maybe LiveStreamHealthStatus)) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'LiveStreamStatus' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'lssStreamStatus' +-- +-- * 'lssHealthStatus' +liveStreamStatus + :: LiveStreamStatus +liveStreamStatus = + LiveStreamStatus + { _lssStreamStatus = Nothing + , _lssHealthStatus = Nothing + } + +lssStreamStatus :: Lens' LiveStreamStatus (Maybe Text) +lssStreamStatus + = lens _lssStreamStatus + (\ s a -> s{_lssStreamStatus = a}) + +-- | The health status of the stream. +lssHealthStatus :: Lens' LiveStreamStatus (Maybe (Maybe LiveStreamHealthStatus)) +lssHealthStatus + = lens _lssHealthStatus + (\ s a -> s{_lssHealthStatus = a}) + +instance FromJSON LiveStreamStatus where + parseJSON + = withObject "LiveStreamStatus" + (\ o -> + LiveStreamStatus <$> + (o .:? "streamStatus") <*> (o .:? "healthStatus")) + +instance ToJSON LiveStreamStatus where + toJSON LiveStreamStatus{..} + = object + (catMaybes + [("streamStatus" .=) <$> _lssStreamStatus, + ("healthStatus" .=) <$> _lssHealthStatus]) + +-- | Details about the live streaming metadata. +-- +-- /See:/ 'videoLiveStreamingDetails' smart constructor. +data VideoLiveStreamingDetails = VideoLiveStreamingDetails + { _vlsdActualEndTime :: !(Maybe UTCTime) + , _vlsdConcurrentViewers :: !(Maybe Word64) + , _vlsdScheduledEndTime :: !(Maybe UTCTime) + , _vlsdScheduledStartTime :: !(Maybe UTCTime) + , _vlsdActualStartTime :: !(Maybe UTCTime) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoLiveStreamingDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vlsdActualEndTime' +-- +-- * 'vlsdConcurrentViewers' +-- +-- * 'vlsdScheduledEndTime' +-- +-- * 'vlsdScheduledStartTime' +-- +-- * 'vlsdActualStartTime' +videoLiveStreamingDetails + :: VideoLiveStreamingDetails +videoLiveStreamingDetails = + VideoLiveStreamingDetails + { _vlsdActualEndTime = Nothing + , _vlsdConcurrentViewers = Nothing + , _vlsdScheduledEndTime = Nothing + , _vlsdScheduledStartTime = Nothing + , _vlsdActualStartTime = Nothing + } + +-- | The time that the broadcast actually ended. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This value will not be +-- available until the broadcast is over. +vlsdActualEndTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime) +vlsdActualEndTime + = lens _vlsdActualEndTime + (\ s a -> s{_vlsdActualEndTime = a}) + +-- | The number of viewers currently watching the broadcast. The property and +-- its value will be present if the broadcast has current viewers and the +-- broadcast owner has not hidden the viewcount for the video. Note that +-- YouTube stops tracking the number of concurrent viewers for a broadcast +-- when the broadcast ends. So, this property would not identify the number +-- of viewers watching an archived video of a live broadcast that already +-- ended. +vlsdConcurrentViewers :: Lens' VideoLiveStreamingDetails (Maybe Word64) +vlsdConcurrentViewers + = lens _vlsdConcurrentViewers + (\ s a -> s{_vlsdConcurrentViewers = a}) + +-- | The time that the broadcast is scheduled to end. The value is specified +-- in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. If the value is empty or +-- the property is not present, then the broadcast is scheduled to continue +-- indefinitely. +vlsdScheduledEndTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime) +vlsdScheduledEndTime + = lens _vlsdScheduledEndTime + (\ s a -> s{_vlsdScheduledEndTime = a}) + +-- | The time that the broadcast is scheduled to begin. The value is +-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +vlsdScheduledStartTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime) +vlsdScheduledStartTime + = lens _vlsdScheduledStartTime + (\ s a -> s{_vlsdScheduledStartTime = a}) + +-- | The time that the broadcast actually started. The value is specified in +-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. This value will not be +-- available until the broadcast begins. +vlsdActualStartTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime) +vlsdActualStartTime + = lens _vlsdActualStartTime + (\ s a -> s{_vlsdActualStartTime = a}) + +instance FromJSON VideoLiveStreamingDetails where + parseJSON + = withObject "VideoLiveStreamingDetails" + (\ o -> + VideoLiveStreamingDetails <$> + (o .:? "actualEndTime") <*> + (o .:? "concurrentViewers") + <*> (o .:? "scheduledEndTime") + <*> (o .:? "scheduledStartTime") + <*> (o .:? "actualStartTime")) + +instance ToJSON VideoLiveStreamingDetails where + toJSON VideoLiveStreamingDetails{..} + = object + (catMaybes + [("actualEndTime" .=) <$> _vlsdActualEndTime, + ("concurrentViewers" .=) <$> _vlsdConcurrentViewers, + ("scheduledEndTime" .=) <$> _vlsdScheduledEndTime, + ("scheduledStartTime" .=) <$> + _vlsdScheduledStartTime, + ("actualStartTime" .=) <$> _vlsdActualStartTime]) + +-- | Comments written in (direct or indirect) reply to the top level comment. +-- +-- /See:/ 'commentThreadReplies' smart constructor. +newtype CommentThreadReplies = CommentThreadReplies + { _ctrComments :: Maybe [Maybe Comment] + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'CommentThreadReplies' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ctrComments' +commentThreadReplies + :: CommentThreadReplies +commentThreadReplies = + CommentThreadReplies + { _ctrComments = Nothing + } + +-- | A limited number of replies. Unless the number of replies returned +-- equals total_reply_count in the snippet the returned replies are only a +-- subset of the total number of replies. +ctrComments :: Lens' CommentThreadReplies [Maybe Comment] +ctrComments + = lens _ctrComments (\ s a -> s{_ctrComments = a}) . + _Default + . _Coerce + +instance FromJSON CommentThreadReplies where + parseJSON + = withObject "CommentThreadReplies" + (\ o -> + CommentThreadReplies <$> + (o .:? "comments" .!= mempty)) + +instance ToJSON CommentThreadReplies where + toJSON CommentThreadReplies{..} + = object + (catMaybes [("comments" .=) <$> _ctrComments]) + +-- | ChannelSection localization setting +-- +-- /See:/ 'channelSectionLocalization' smart constructor. +newtype ChannelSectionLocalization = ChannelSectionLocalization + { _cslTitle :: Maybe Text + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelSectionLocalization' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'cslTitle' +channelSectionLocalization + :: ChannelSectionLocalization +channelSectionLocalization = + ChannelSectionLocalization + { _cslTitle = Nothing + } + +-- | The localized strings for channel section\'s title. +cslTitle :: Lens' ChannelSectionLocalization (Maybe Text) +cslTitle = lens _cslTitle (\ s a -> s{_cslTitle = a}) + +instance FromJSON ChannelSectionLocalization where + parseJSON + = withObject "ChannelSectionLocalization" + (\ o -> + ChannelSectionLocalization <$> (o .:? "title")) + +instance ToJSON ChannelSectionLocalization where + toJSON ChannelSectionLocalization{..} + = object (catMaybes [("title" .=) <$> _cslTitle]) + +-- | Details about a resource which is being promoted. +-- +-- /See:/ 'activityContentDetailsPromotedItem' smart constructor. +data ActivityContentDetailsPromotedItem = ActivityContentDetailsPromotedItem + { _acdpiDestinationUrl :: !(Maybe Text) + , _acdpiClickTrackingUrl :: !(Maybe Text) + , _acdpiForecastingUrl :: !(Maybe [Text]) + , _acdpiDescriptionText :: !(Maybe Text) + , _acdpiCtaType :: !(Maybe Text) + , _acdpiVideoId :: !(Maybe Text) + , _acdpiAdTag :: !(Maybe Text) + , _acdpiCreativeViewUrl :: !(Maybe Text) + , _acdpiImpressionUrl :: !(Maybe [Text]) + , _acdpiCustomCtaButtonText :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ActivityContentDetailsPromotedItem' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'acdpiDestinationUrl' +-- +-- * 'acdpiClickTrackingUrl' +-- +-- * 'acdpiForecastingUrl' +-- +-- * 'acdpiDescriptionText' +-- +-- * 'acdpiCtaType' +-- +-- * 'acdpiVideoId' +-- +-- * 'acdpiAdTag' +-- +-- * 'acdpiCreativeViewUrl' +-- +-- * 'acdpiImpressionUrl' +-- +-- * 'acdpiCustomCtaButtonText' +activityContentDetailsPromotedItem + :: ActivityContentDetailsPromotedItem +activityContentDetailsPromotedItem = + ActivityContentDetailsPromotedItem + { _acdpiDestinationUrl = Nothing + , _acdpiClickTrackingUrl = Nothing + , _acdpiForecastingUrl = Nothing + , _acdpiDescriptionText = Nothing + , _acdpiCtaType = Nothing + , _acdpiVideoId = Nothing + , _acdpiAdTag = Nothing + , _acdpiCreativeViewUrl = Nothing + , _acdpiImpressionUrl = Nothing + , _acdpiCustomCtaButtonText = Nothing + } + +-- | The URL the client should direct the user to, if the user chooses to +-- visit the advertiser\'s website. +acdpiDestinationUrl :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiDestinationUrl + = lens _acdpiDestinationUrl + (\ s a -> s{_acdpiDestinationUrl = a}) + +-- | The URL the client should ping to indicate that the user clicked through +-- on this promoted item. +acdpiClickTrackingUrl :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiClickTrackingUrl + = lens _acdpiClickTrackingUrl + (\ s a -> s{_acdpiClickTrackingUrl = a}) + +-- | The list of forecasting URLs. The client should ping all of these URLs +-- when a promoted item is not available, to indicate that a promoted item +-- could have been shown. +acdpiForecastingUrl :: Lens' ActivityContentDetailsPromotedItem [Text] +acdpiForecastingUrl + = lens _acdpiForecastingUrl + (\ s a -> s{_acdpiForecastingUrl = a}) + . _Default + . _Coerce + +-- | The text description to accompany the promoted item. +acdpiDescriptionText :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiDescriptionText + = lens _acdpiDescriptionText + (\ s a -> s{_acdpiDescriptionText = a}) + +-- | The type of call-to-action, a message to the user indicating action that +-- can be taken. +acdpiCtaType :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiCtaType + = lens _acdpiCtaType (\ s a -> s{_acdpiCtaType = a}) + +-- | The ID that YouTube uses to uniquely identify the promoted video. +acdpiVideoId :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiVideoId + = lens _acdpiVideoId (\ s a -> s{_acdpiVideoId = a}) + +-- | The URL the client should fetch to request a promoted item. +acdpiAdTag :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiAdTag + = lens _acdpiAdTag (\ s a -> s{_acdpiAdTag = a}) + +-- | The URL the client should ping to indicate that the user was shown this +-- promoted item. +acdpiCreativeViewUrl :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiCreativeViewUrl + = lens _acdpiCreativeViewUrl + (\ s a -> s{_acdpiCreativeViewUrl = a}) + +-- | The list of impression URLs. The client should ping all of these URLs to +-- indicate that the user was shown this promoted item. +acdpiImpressionUrl :: Lens' ActivityContentDetailsPromotedItem [Text] +acdpiImpressionUrl + = lens _acdpiImpressionUrl + (\ s a -> s{_acdpiImpressionUrl = a}) + . _Default + . _Coerce + +-- | The custom call-to-action button text. If specified, it will override +-- the default button text for the cta_type. +acdpiCustomCtaButtonText :: Lens' ActivityContentDetailsPromotedItem (Maybe Text) +acdpiCustomCtaButtonText + = lens _acdpiCustomCtaButtonText + (\ s a -> s{_acdpiCustomCtaButtonText = a}) + +instance FromJSON ActivityContentDetailsPromotedItem + where + parseJSON + = withObject "ActivityContentDetailsPromotedItem" + (\ o -> + ActivityContentDetailsPromotedItem <$> + (o .:? "destinationUrl") <*> + (o .:? "clickTrackingUrl") + <*> (o .:? "forecastingUrl" .!= mempty) + <*> (o .:? "descriptionText") + <*> (o .:? "ctaType") + <*> (o .:? "videoId") + <*> (o .:? "adTag") + <*> (o .:? "creativeViewUrl") + <*> (o .:? "impressionUrl" .!= mempty) + <*> (o .:? "customCtaButtonText")) + +instance ToJSON ActivityContentDetailsPromotedItem + where + toJSON ActivityContentDetailsPromotedItem{..} + = object + (catMaybes + [("destinationUrl" .=) <$> _acdpiDestinationUrl, + ("clickTrackingUrl" .=) <$> _acdpiClickTrackingUrl, + ("forecastingUrl" .=) <$> _acdpiForecastingUrl, + ("descriptionText" .=) <$> _acdpiDescriptionText, + ("ctaType" .=) <$> _acdpiCtaType, + ("videoId" .=) <$> _acdpiVideoId, + ("adTag" .=) <$> _acdpiAdTag, + ("creativeViewUrl" .=) <$> _acdpiCreativeViewUrl, + ("impressionUrl" .=) <$> _acdpiImpressionUrl, + ("customCtaButtonText" .=) <$> + _acdpiCustomCtaButtonText]) + +-- | Geographical coordinates of a point, in WGS84. +-- +-- /See:/ 'geoPoint' smart constructor. +data GeoPoint = GeoPoint + { _gpLatitude :: !(Maybe Double) + , _gpAltitude :: !(Maybe Double) + , _gpLongitude :: !(Maybe Double) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'GeoPoint' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'gpLatitude' +-- +-- * 'gpAltitude' +-- +-- * 'gpLongitude' +geoPoint + :: GeoPoint +geoPoint = + GeoPoint + { _gpLatitude = Nothing + , _gpAltitude = Nothing + , _gpLongitude = Nothing + } + +-- | Latitude in degrees. +gpLatitude :: Lens' GeoPoint (Maybe Double) +gpLatitude + = lens _gpLatitude (\ s a -> s{_gpLatitude = a}) + +-- | Altitude above the reference ellipsoid, in meters. +gpAltitude :: Lens' GeoPoint (Maybe Double) +gpAltitude + = lens _gpAltitude (\ s a -> s{_gpAltitude = a}) + +-- | Longitude in degrees. +gpLongitude :: Lens' GeoPoint (Maybe Double) +gpLongitude + = lens _gpLongitude (\ s a -> s{_gpLongitude = a}) + +instance FromJSON GeoPoint where + parseJSON + = withObject "GeoPoint" + (\ o -> + GeoPoint <$> + (o .:? "latitude") <*> (o .:? "altitude") <*> + (o .:? "longitude")) + +instance ToJSON GeoPoint where + toJSON GeoPoint{..} + = object + (catMaybes + [("latitude" .=) <$> _gpLatitude, + ("altitude" .=) <$> _gpAltitude, + ("longitude" .=) <$> _gpLongitude]) + +-- | Basic details about an i18n language, such as language code and +-- human-readable name. +-- +-- /See:/ 'i18nLanguageSNIppet' smart constructor. +data I18nLanguageSNIppet = I18nLanguageSNIppet + { _ilsHl :: !(Maybe Text) + , _ilsName :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'I18nLanguageSNIppet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ilsHl' +-- +-- * 'ilsName' +i18nLanguageSNIppet + :: I18nLanguageSNIppet +i18nLanguageSNIppet = + I18nLanguageSNIppet + { _ilsHl = Nothing + , _ilsName = Nothing + } + +-- | A short BCP-47 code that uniquely identifies a language. +ilsHl :: Lens' I18nLanguageSNIppet (Maybe Text) +ilsHl = lens _ilsHl (\ s a -> s{_ilsHl = a}) + +-- | The human-readable name of the language in the language itself. +ilsName :: Lens' I18nLanguageSNIppet (Maybe Text) +ilsName = lens _ilsName (\ s a -> s{_ilsName = a}) + +instance FromJSON I18nLanguageSNIppet where + parseJSON + = withObject "I18nLanguageSNIppet" + (\ o -> + I18nLanguageSNIppet <$> + (o .:? "hl") <*> (o .:? "name")) + +instance ToJSON I18nLanguageSNIppet where + toJSON I18nLanguageSNIppet{..} + = object + (catMaybes + [("hl" .=) <$> _ilsHl, ("name" .=) <$> _ilsName]) + +-- +-- /See:/ 'videoAbuseReportSecondaryReason' smart constructor. +data VideoAbuseReportSecondaryReason = VideoAbuseReportSecondaryReason + { _varsrId :: !(Maybe Text) + , _varsrLabel :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoAbuseReportSecondaryReason' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'varsrId' +-- +-- * 'varsrLabel' +videoAbuseReportSecondaryReason + :: VideoAbuseReportSecondaryReason +videoAbuseReportSecondaryReason = + VideoAbuseReportSecondaryReason + { _varsrId = Nothing + , _varsrLabel = Nothing + } + +-- | The ID of this abuse report secondary reason. +varsrId :: Lens' VideoAbuseReportSecondaryReason (Maybe Text) +varsrId = lens _varsrId (\ s a -> s{_varsrId = a}) + +-- | The localized label for this abuse report secondary reason. +varsrLabel :: Lens' VideoAbuseReportSecondaryReason (Maybe Text) +varsrLabel + = lens _varsrLabel (\ s a -> s{_varsrLabel = a}) + +instance FromJSON VideoAbuseReportSecondaryReason + where + parseJSON + = withObject "VideoAbuseReportSecondaryReason" + (\ o -> + VideoAbuseReportSecondaryReason <$> + (o .:? "id") <*> (o .:? "label")) + +instance ToJSON VideoAbuseReportSecondaryReason where + toJSON VideoAbuseReportSecondaryReason{..} + = object + (catMaybes + [("id" .=) <$> _varsrId, + ("label" .=) <$> _varsrLabel]) + +-- +-- /See:/ 'videoConversionPing' smart constructor. +data VideoConversionPing = VideoConversionPing + { _vcpContext :: !(Maybe Text) + , _vcpConversionUrl :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'VideoConversionPing' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'vcpContext' +-- +-- * 'vcpConversionUrl' +videoConversionPing + :: VideoConversionPing +videoConversionPing = + VideoConversionPing + { _vcpContext = Nothing + , _vcpConversionUrl = Nothing + } + +-- | Defines the context of the ping. +vcpContext :: Lens' VideoConversionPing (Maybe Text) +vcpContext + = lens _vcpContext (\ s a -> s{_vcpContext = a}) + +-- | The url (without the schema) that the app shall send the ping to. It\'s +-- at caller\'s descretion to decide which schema to use (http vs https) +-- Example of a returned url: \/\/googleads.g.doubleclick.net\/pagead\/ +-- viewthroughconversion\/962985656\/?data=path%3DtHe_path%3Btype%3D +-- like%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA%3Bytvid%3DUrIaJUvIQDg&labe=default +-- The caller must append biscotti authentication (ms param in case of +-- mobile, for example) to this ping. +vcpConversionUrl :: Lens' VideoConversionPing (Maybe Text) +vcpConversionUrl + = lens _vcpConversionUrl + (\ s a -> s{_vcpConversionUrl = a}) + +instance FromJSON VideoConversionPing where + parseJSON + = withObject "VideoConversionPing" + (\ o -> + VideoConversionPing <$> + (o .:? "context") <*> (o .:? "conversionUrl")) + +instance ToJSON VideoConversionPing where + toJSON VideoConversionPing{..} + = object + (catMaybes + [("context" .=) <$> _vcpContext, + ("conversionUrl" .=) <$> _vcpConversionUrl]) + +-- | The contentOwnerDetails object encapsulates channel data that is +-- relevant for YouTube Partners linked with the channel. +-- +-- /See:/ 'channelContentOwnerDetails' smart constructor. +data ChannelContentOwnerDetails = ChannelContentOwnerDetails + { _ccodTimeLinked :: !(Maybe UTCTime) + , _ccodContentOwner :: !(Maybe Text) + } deriving (Eq,Read,Show,Data,Typeable,Generic) + +-- | Creates a value of 'ChannelContentOwnerDetails' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'ccodTimeLinked' +-- +-- * 'ccodContentOwner' +channelContentOwnerDetails + :: ChannelContentOwnerDetails +channelContentOwnerDetails = + ChannelContentOwnerDetails + { _ccodTimeLinked = Nothing + , _ccodContentOwner = Nothing + } + +-- | The date and time of when the channel was linked to the content owner. +-- The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +ccodTimeLinked :: Lens' ChannelContentOwnerDetails (Maybe UTCTime) +ccodTimeLinked + = lens _ccodTimeLinked + (\ s a -> s{_ccodTimeLinked = a}) + +-- | The ID of the content owner linked to the channel. +ccodContentOwner :: Lens' ChannelContentOwnerDetails (Maybe Text) +ccodContentOwner + = lens _ccodContentOwner + (\ s a -> s{_ccodContentOwner = a}) + +instance FromJSON ChannelContentOwnerDetails where + parseJSON + = withObject "ChannelContentOwnerDetails" + (\ o -> + ChannelContentOwnerDetails <$> + (o .:? "timeLinked") <*> (o .:? "contentOwner")) + +instance ToJSON ChannelContentOwnerDetails where + toJSON ChannelContentOwnerDetails{..} + = object + (catMaybes + [("timeLinked" .=) <$> _ccodTimeLinked, + ("contentOwner" .=) <$> _ccodContentOwner]) diff --git a/gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs b/gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs new file mode 100644 index 000000000..88154be84 --- /dev/null +++ b/gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} + +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +-- | +-- Module : Network.Google.YouTube.Types.Sum +-- Copyright : (c) 2015 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +module Network.Google.YouTube.Types.Sum where + +import Network.Google.Prelude diff --git a/gogol-youtube/gogol-youtube.cabal b/gogol-youtube/gogol-youtube.cabal new file mode 100644 index 000000000..d91487b6d --- /dev/null +++ b/gogol-youtube/gogol-youtube.cabal @@ -0,0 +1,104 @@ +name: gogol-youtube +version: 0.0.1 +synopsis: YouTube Data API Client. +homepage: https://github.com/brendanhay/gogol +bug-reports: https://github.com/brendanhay/gogol/issues +license: OtherLicense +license-file: LICENSE +author: Brendan Hay +maintainer: Brendan Hay +copyright: Copyright (c) 2015 Brendan Hay +category: Network, Google, Cloud +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: README.md + +description: + Programmatic access to YouTube features. + . + /Warning:/ This is an experimental prototype/preview release which is still + under exploratory development and not intended for public use, caveat emptor! + +source-repository head + type: git + location: git://github.com/brendanhay/gogol.git + +library + default-language: Haskell2010 + hs-source-dirs: src gen + + ghc-options: -Wall + + exposed-modules: + Network.Google.Resource.YouTube.Activities.Insert + , Network.Google.Resource.YouTube.Activities.List + , Network.Google.Resource.YouTube.Captions.Delete + , Network.Google.Resource.YouTube.Captions.Download + , Network.Google.Resource.YouTube.Captions.Insert + , Network.Google.Resource.YouTube.Captions.List + , Network.Google.Resource.YouTube.Captions.Update + , Network.Google.Resource.YouTube.ChannelBanners.Insert + , Network.Google.Resource.YouTube.ChannelSections.Delete + , Network.Google.Resource.YouTube.ChannelSections.Insert + , Network.Google.Resource.YouTube.ChannelSections.List + , Network.Google.Resource.YouTube.ChannelSections.Update + , Network.Google.Resource.YouTube.Channels.List + , Network.Google.Resource.YouTube.Channels.Update + , Network.Google.Resource.YouTube.CommentThreads.Insert + , Network.Google.Resource.YouTube.CommentThreads.List + , Network.Google.Resource.YouTube.CommentThreads.Update + , Network.Google.Resource.YouTube.Comments.Delete + , Network.Google.Resource.YouTube.Comments.Insert + , Network.Google.Resource.YouTube.Comments.List + , Network.Google.Resource.YouTube.Comments.MarkAsSpam + , Network.Google.Resource.YouTube.Comments.SetModerationStatus + , Network.Google.Resource.YouTube.Comments.Update + , Network.Google.Resource.YouTube.GuideCategories.List + , Network.Google.Resource.YouTube.I18nLanguages.List + , Network.Google.Resource.YouTube.I18nRegions.List + , Network.Google.Resource.YouTube.LiveBroadcasts.Bind + , Network.Google.Resource.YouTube.LiveBroadcasts.Bind_direct + , Network.Google.Resource.YouTube.LiveBroadcasts.Control + , Network.Google.Resource.YouTube.LiveBroadcasts.Delete + , Network.Google.Resource.YouTube.LiveBroadcasts.Insert + , Network.Google.Resource.YouTube.LiveBroadcasts.List + , Network.Google.Resource.YouTube.LiveBroadcasts.Transition + , Network.Google.Resource.YouTube.LiveBroadcasts.Update + , Network.Google.Resource.YouTube.LiveStreams.Delete + , Network.Google.Resource.YouTube.LiveStreams.Insert + , Network.Google.Resource.YouTube.LiveStreams.List + , Network.Google.Resource.YouTube.LiveStreams.Update + , Network.Google.Resource.YouTube.PlaylistItems.Delete + , Network.Google.Resource.YouTube.PlaylistItems.Insert + , Network.Google.Resource.YouTube.PlaylistItems.List + , Network.Google.Resource.YouTube.PlaylistItems.Update + , Network.Google.Resource.YouTube.Playlists.Delete + , Network.Google.Resource.YouTube.Playlists.Insert + , Network.Google.Resource.YouTube.Playlists.List + , Network.Google.Resource.YouTube.Playlists.Update + , Network.Google.Resource.YouTube.Search.List + , Network.Google.Resource.YouTube.Subscriptions.Delete + , Network.Google.Resource.YouTube.Subscriptions.Insert + , Network.Google.Resource.YouTube.Subscriptions.List + , Network.Google.Resource.YouTube.Thumbnails.Set + , Network.Google.Resource.YouTube.VideoAbuseReportReasons.List + , Network.Google.Resource.YouTube.VideoCategories.List + , Network.Google.Resource.YouTube.Videos.Delete + , Network.Google.Resource.YouTube.Videos.GetRating + , Network.Google.Resource.YouTube.Videos.Insert + , Network.Google.Resource.YouTube.Videos.List + , Network.Google.Resource.YouTube.Videos.Rate + , Network.Google.Resource.YouTube.Videos.ReportAbuse + , Network.Google.Resource.YouTube.Videos.Update + , Network.Google.Resource.YouTube.Watermarks.Set + , Network.Google.Resource.YouTube.Watermarks.Unset + , Network.Google.YouTube + , Network.Google.YouTube.Types + + other-modules: + Network.Google.YouTube.Types.Product + , Network.Google.YouTube.Types.Sum + + build-depends: + gogol-core == 0.0.1.* + , base >= 4.7 && < 5 diff --git a/gogol-youtube/src/.gitkeep b/gogol-youtube/src/.gitkeep new file mode 100644 index 000000000..e69de29bb